summaryrefslogtreecommitdiff
path: root/biblio/bibtex/contrib
diff options
context:
space:
mode:
Diffstat (limited to 'biblio/bibtex/contrib')
l---------biblio/bibtex/contrib/IEEEtran1
-rw-r--r--biblio/bibtex/contrib/abstyles-babel/README.217
-rw-r--r--biblio/bibtex/contrib/abstyles-babel/aabbrv.bst1062
-rw-r--r--biblio/bibtex/contrib/abstyles-babel/aalpha.bst1211
-rw-r--r--biblio/bibtex/contrib/abstyles-babel/acompat.bib45
-rw-r--r--biblio/bibtex/contrib/abstyles-babel/anotit.bst1075
-rw-r--r--biblio/bibtex/contrib/abstyles-babel/aplain.bst1062
-rw-r--r--biblio/bibtex/contrib/abstyles-babel/apreambl.tex200
-rw-r--r--biblio/bibtex/contrib/abstyles-babel/aunsnot.bst941
-rw-r--r--biblio/bibtex/contrib/abstyles-babel/aunsrt.bst928
-rw-r--r--biblio/bibtex/contrib/abstyles/README140
-rw-r--r--biblio/bibtex/contrib/abstyles/a4c.sty27
-rw-r--r--biblio/bibtex/contrib/abstyles/a4c.tex30
-rw-r--r--biblio/bibtex/contrib/abstyles/aabbrv.bst1061
-rw-r--r--biblio/bibtex/contrib/abstyles/aalpha.bst1210
-rw-r--r--biblio/bibtex/contrib/abstyles/abstdok.bbl37
-rw-r--r--biblio/bibtex/contrib/abstyles/abstdok.pdfbin0 -> 121954 bytes
-rw-r--r--biblio/bibtex/contrib/abstyles/abstdok.tex483
-rw-r--r--biblio/bibtex/contrib/abstyles/acompat.bib45
-rw-r--r--biblio/bibtex/contrib/abstyles/anotit.bst1074
-rw-r--r--biblio/bibtex/contrib/abstyles/aplain.bst1061
-rw-r--r--biblio/bibtex/contrib/abstyles/apreambl.doc396
-rw-r--r--biblio/bibtex/contrib/abstyles/apreambl.tex139
-rw-r--r--biblio/bibtex/contrib/abstyles/aunsnot.bst940
-rw-r--r--biblio/bibtex/contrib/abstyles/aunsrt.bst927
-rw-r--r--biblio/bibtex/contrib/abstyles/btxabst.doc2878
-rw-r--r--biblio/bibtex/contrib/abstyles/docmac.doc778
-rw-r--r--biblio/bibtex/contrib/abstyles/docmac.tex238
-rw-r--r--biblio/bibtex/contrib/abstyles/jourabbr.bib75
-rw-r--r--biblio/bibtex/contrib/abstyles/jourfull.bib74
l---------biblio/bibtex/contrib/achemso1
-rw-r--r--biblio/bibtex/contrib/acmtrans/acmtr.bib116
-rw-r--r--biblio/bibtex/contrib/acmtrans/acmtr2e.pdfbin0 -> 180516 bytes
-rw-r--r--biblio/bibtex/contrib/acmtrans/acmtr2e.tex1000
-rw-r--r--biblio/bibtex/contrib/acmtrans/acmtrans.bst1768
-rw-r--r--biblio/bibtex/contrib/acmtrans/acmtrans2e.cls1243
-rw-r--r--biblio/bibtex/contrib/alpha-persian/README.txt83
-rw-r--r--biblio/bibtex/contrib/alpha-persian/alpha-persian-l.userguide.pdfbin0 -> 2076432 bytes
-rw-r--r--biblio/bibtex/contrib/alpha-persian/alpha-persian-l.userguide.tex592
-rw-r--r--biblio/bibtex/contrib/alpha-persian/alpha-persian-p.userguide.pdfbin0 -> 3779241 bytes
-rw-r--r--biblio/bibtex/contrib/alpha-persian/alpha-persian-p.userguide.tex1183
-rw-r--r--biblio/bibtex/contrib/alpha-persian/alpha-persian.bst1831
-rw-r--r--biblio/bibtex/contrib/alpha-persian/image/21.jpgbin0 -> 257433 bytes
-rw-r--r--biblio/bibtex/contrib/alpha-persian/image/sh11.jpgbin0 -> 72757 bytes
-rw-r--r--biblio/bibtex/contrib/alpha-persian/image/sh12.jpgbin0 -> 350526 bytes
-rw-r--r--biblio/bibtex/contrib/alpha-persian/image/sh13.jpgbin0 -> 258306 bytes
-rw-r--r--biblio/bibtex/contrib/alpha-persian/image/sh14.PNGbin0 -> 258493 bytes
-rw-r--r--biblio/bibtex/contrib/alpha-persian/image/sh15.PNGbin0 -> 155555 bytes
-rw-r--r--biblio/bibtex/contrib/alpha-persian/image/sh16.PNGbin0 -> 240624 bytes
-rw-r--r--biblio/bibtex/contrib/alpha-persian/image/sh17.PNGbin0 -> 368147 bytes
-rw-r--r--biblio/bibtex/contrib/alpha-persian/image/sh18.jpgbin0 -> 345645 bytes
-rw-r--r--biblio/bibtex/contrib/alpha-persian/image/sh2.jpgbin0 -> 60488 bytes
-rw-r--r--biblio/bibtex/contrib/alpha-persian/image/sh20.jpgbin0 -> 171368 bytes
-rw-r--r--biblio/bibtex/contrib/alpha-persian/image/sh3.jpgbin0 -> 81302 bytes
-rw-r--r--biblio/bibtex/contrib/alpha-persian/image/sh4.jpgbin0 -> 111950 bytes
-rw-r--r--biblio/bibtex/contrib/alpha-persian/image/sh5.jpgbin0 -> 93244 bytes
-rw-r--r--biblio/bibtex/contrib/alpha-persian/image/sh6.jpgbin0 -> 222680 bytes
-rw-r--r--biblio/bibtex/contrib/alpha-persian/image/sh7.jpgbin0 -> 260778 bytes
-rw-r--r--biblio/bibtex/contrib/alpha-persian/image/sh8.jpgbin0 -> 205502 bytes
-rw-r--r--biblio/bibtex/contrib/alpha-persian/image/sh9.jpgbin0 -> 310441 bytes
-rw-r--r--biblio/bibtex/contrib/alpha-persian/image/sht.jpgbin0 -> 70749 bytes
-rw-r--r--biblio/bibtex/contrib/alpha-persian/pdflatexsample.tex19
-rw-r--r--biblio/bibtex/contrib/alpha-persian/sample1.bib28
-rw-r--r--biblio/bibtex/contrib/alpha-persian/sample10.bib70
-rw-r--r--biblio/bibtex/contrib/alpha-persian/sample2.bib30
-rw-r--r--biblio/bibtex/contrib/alpha-persian/sample3.bib33
-rw-r--r--biblio/bibtex/contrib/alpha-persian/sample4.bib47
-rw-r--r--biblio/bibtex/contrib/alpha-persian/sample5.bib99
-rw-r--r--biblio/bibtex/contrib/alpha-persian/sample6.bib82
-rw-r--r--biblio/bibtex/contrib/alpha-persian/sample7.bib204
-rw-r--r--biblio/bibtex/contrib/alpha-persian/sample8.bib201
-rw-r--r--biblio/bibtex/contrib/alpha-persian/sample9.bib144
-rw-r--r--biblio/bibtex/contrib/alpha-persian/xelatexsample.tex30
-rw-r--r--biblio/bibtex/contrib/apacite/README66
-rw-r--r--biblio/bibtex/contrib/apacite/apacite.dtx23244
-rw-r--r--biblio/bibtex/contrib/apacite/apacite.ins194
-rw-r--r--biblio/bibtex/contrib/apacite/apacite.pdfbin0 -> 622231 bytes
-rw-r--r--biblio/bibtex/contrib/apalike-german/README.html40
-rw-r--r--biblio/bibtex/contrib/apalike-german/README.md45
-rw-r--r--biblio/bibtex/contrib/apalike-german/apalike-german.bst1115
-rw-r--r--biblio/bibtex/contrib/apalike2/apalike2.bst1273
-rw-r--r--biblio/bibtex/contrib/astron/README37
-rw-r--r--biblio/bibtex/contrib/astron/astdoc.bib32
-rw-r--r--biblio/bibtex/contrib/astron/astdoc.pdfbin0 -> 187716 bytes
-rw-r--r--biblio/bibtex/contrib/astron/astdoc.tex1154
-rw-r--r--biblio/bibtex/contrib/astron/astron.bst1175
-rw-r--r--biblio/bibtex/contrib/astron/astron.sty70
-rw-r--r--biblio/bibtex/contrib/astron/example.bib120
-rw-r--r--biblio/bibtex/contrib/astron/example.tex50
-rw-r--r--biblio/bibtex/contrib/astron/mnemonic.bib442
-rw-r--r--biblio/bibtex/contrib/astron/puntxt.c49
-rw-r--r--biblio/bibtex/contrib/astron/template.bib201
-rw-r--r--biblio/bibtex/contrib/authordate/README21
-rw-r--r--biblio/bibtex/contrib/authordate/authordate1-4.sty79
-rw-r--r--biblio/bibtex/contrib/authordate/authordate1.bst1309
-rw-r--r--biblio/bibtex/contrib/authordate/authordate1.ltx18
-rw-r--r--biblio/bibtex/contrib/authordate/authordate2.bst1310
-rw-r--r--biblio/bibtex/contrib/authordate/authordate2.ltx18
-rw-r--r--biblio/bibtex/contrib/authordate/authordate3.bst1309
-rw-r--r--biblio/bibtex/contrib/authordate/authordate3.ltx18
-rw-r--r--biblio/bibtex/contrib/authordate/authordate4.bst1310
-rw-r--r--biblio/bibtex/contrib/authordate/authordate4.ltx18
-rw-r--r--biblio/bibtex/contrib/authordate/testadb.ltx183
-rw-r--r--biblio/bibtex/contrib/babelbib/ChangeLog192
-rw-r--r--biblio/bibtex/contrib/babelbib/Makefile101
-rw-r--r--biblio/bibtex/contrib/babelbib/README57
-rw-r--r--biblio/bibtex/contrib/babelbib/babelbib.dtx9503
-rw-r--r--biblio/bibtex/contrib/babelbib/babelbib.ins69
-rw-r--r--biblio/bibtex/contrib/babelbib/babelbib.pdfbin0 -> 731049 bytes
-rw-r--r--biblio/bibtex/contrib/babelbib/babelbibtest.bib3921
-rw-r--r--biblio/bibtex/contrib/babelbib/babelbibtest.tex115
-rw-r--r--biblio/bibtex/contrib/babelbib/getversion.tex8
-rw-r--r--biblio/bibtex/contrib/babelbib/tugboat-babelbib.pdfbin0 -> 403758 bytes
-rw-r--r--biblio/bibtex/contrib/bath-bst/Makefile72
-rw-r--r--biblio/bibtex/contrib/bath-bst/README.md111
-rw-r--r--biblio/bibtex/contrib/bath-bst/bath-bst-v1.pdfbin0 -> 278589 bytes
-rw-r--r--biblio/bibtex/contrib/bath-bst/bath-bst.dtx6094
-rw-r--r--biblio/bibtex/contrib/bath-bst/bath-bst.pdfbin0 -> 510481 bytes
-rw-r--r--biblio/bibtex/contrib/besjournals/README51
-rw-r--r--biblio/bibtex/contrib/besjournals/besjournals.bst1708
-rw-r--r--biblio/bibtex/contrib/besjournals/besjournals.dbj661
-rw-r--r--biblio/bibtex/contrib/bestpapers/Makefile35
-rw-r--r--biblio/bibtex/contrib/bestpapers/README16
-rw-r--r--biblio/bibtex/contrib/bestpapers/bestpapers-export.bst535
-rw-r--r--biblio/bibtex/contrib/bestpapers/bestpapers-guide.pdfbin0 -> 170043 bytes
-rw-r--r--biblio/bibtex/contrib/bestpapers/bestpapers-guide.tex158
-rw-r--r--biblio/bibtex/contrib/bestpapers/bestpapers.bst1280
-rw-r--r--biblio/bibtex/contrib/bestpapers/tex.bib108
-rw-r--r--biblio/bibtex/contrib/bestpapers/typography.bib214
-rw-r--r--biblio/bibtex/contrib/bib-fr/CHANGELOG21
-rw-r--r--biblio/bibtex/contrib/bib-fr/README10
-rw-r--r--biblio/bibtex/contrib/bib-fr/abbrv-fr.bst1234
-rw-r--r--biblio/bibtex/contrib/bib-fr/abbrvnat-fr.bst1506
-rw-r--r--biblio/bibtex/contrib/bib-fr/alpha-fr.bst1408
-rw-r--r--biblio/bibtex/contrib/bib-fr/apalike-fr.bst1222
-rw-r--r--biblio/bibtex/contrib/bib-fr/ieeetr-fr.bst1082
-rw-r--r--biblio/bibtex/contrib/bib-fr/plain-fr.bst1235
-rw-r--r--biblio/bibtex/contrib/bib-fr/plainnat-fr.bst1503
-rw-r--r--biblio/bibtex/contrib/bib-fr/siam-fr.bst1154
-rw-r--r--biblio/bibtex/contrib/bib-fr/unsrt-fr.bst1062
-rw-r--r--biblio/bibtex/contrib/bib-fr/unsrtnat-fr.bst1495
-rw-r--r--biblio/bibtex/contrib/bibhtml/LICENCE340
-rw-r--r--biblio/bibtex/contrib/bibhtml/README18
-rw-r--r--biblio/bibtex/contrib/bibhtml/abbrvhtml.bst1402
-rw-r--r--biblio/bibtex/contrib/bibhtml/alphahtml.bst1565
-rw-r--r--biblio/bibtex/contrib/bibhtml/alphahtmldate.bst1362
-rw-r--r--biblio/bibtex/contrib/bibhtml/alphahtmldater.bst1362
-rwxr-xr-xbiblio/bibtex/contrib/bibhtml/bibhtml464
-rw-r--r--biblio/bibtex/contrib/bibhtml/bibhtml-extract-aux.xslt99
-rw-r--r--biblio/bibtex/contrib/bibhtml/bibhtml-insert-bib.xslt51
-rw-r--r--biblio/bibtex/contrib/bibhtml/bibhtml.html580
-rw-r--r--biblio/bibtex/contrib/bibhtml/bibrefs.bib221
-rw-r--r--biblio/bibtex/contrib/bibhtml/detex.sed57
-rw-r--r--biblio/bibtex/contrib/bibhtml/plainhtml.bst1431
-rw-r--r--biblio/bibtex/contrib/bibhtml/plainhtmldate.bst1236
-rw-r--r--biblio/bibtex/contrib/bibhtml/plainhtmldater.bst1236
-rw-r--r--biblio/bibtex/contrib/bibhtml/style.css260
-rw-r--r--biblio/bibtex/contrib/bibhtml/unsrthtml.bst1256
l---------biblio/bibtex/contrib/bids1
-rw-r--r--biblio/bibtex/contrib/biolett-bst/README.txt33
-rw-r--r--biblio/bibtex/contrib/biolett-bst/biolett.bst1282
-rw-r--r--biblio/bibtex/contrib/bookdb/README41
-rw-r--r--biblio/bibtex/contrib/bookdb/bookdb.bst1759
-rw-r--r--biblio/bibtex/contrib/bookdb/bookdb.pdfbin0 -> 202980 bytes
-rw-r--r--biblio/bibtex/contrib/bookdb/bookdb.tex530
-rw-r--r--biblio/bibtex/contrib/catalan/README40
-rw-r--r--biblio/bibtex/contrib/catalan/bibtex/bst/caabbrv.bst1381
-rw-r--r--biblio/bibtex/contrib/catalan/bibtex/bst/caalpha.bst1539
-rw-r--r--biblio/bibtex/contrib/catalan/bibtex/bst/caauda0.bst2020
-rw-r--r--biblio/bibtex/contrib/catalan/bibtex/bst/caauda1.bst2023
-rw-r--r--biblio/bibtex/contrib/catalan/bibtex/bst/caauda2.bst2044
-rw-r--r--biblio/bibtex/contrib/catalan/bibtex/bst/caauda3.bst2047
-rw-r--r--biblio/bibtex/contrib/catalan/bibtex/bst/caplain.bst1381
-rw-r--r--biblio/bibtex/contrib/catalan/bibtex/bst/caunsrt.bst1232
-rw-r--r--biblio/bibtex/contrib/catalan/catalanbib.pdfbin0 -> 385974 bytes
-rw-r--r--biblio/bibtex/contrib/catalan/doc/bibtex/catalan/catalanbib.tex248
-rw-r--r--biblio/bibtex/contrib/catalan/doc/bibtex/catalan/exemples/caabbrv.tex19
-rw-r--r--biblio/bibtex/contrib/catalan/doc/bibtex/catalan/exemples/caalpha.tex19
-rw-r--r--biblio/bibtex/contrib/catalan/doc/bibtex/catalan/exemples/caauda0.tex21
-rw-r--r--biblio/bibtex/contrib/catalan/doc/bibtex/catalan/exemples/caauda1.tex21
-rw-r--r--biblio/bibtex/contrib/catalan/doc/bibtex/catalan/exemples/caauda2.tex21
-rw-r--r--biblio/bibtex/contrib/catalan/doc/bibtex/catalan/exemples/caauda3.tex24
-rw-r--r--biblio/bibtex/contrib/catalan/doc/bibtex/catalan/exemples/caplain.tex19
-rw-r--r--biblio/bibtex/contrib/catalan/doc/bibtex/catalan/exemples/caunsrt.tex19
-rw-r--r--biblio/bibtex/contrib/catalan/doc/bibtex/catalan/exemples/exemples.bib204
-rw-r--r--biblio/bibtex/contrib/chem-journal/jcc.bst997
-rw-r--r--biblio/bibtex/contrib/chem-journal/jpc.bst990
-rw-r--r--biblio/bibtex/contrib/chem-journal/pccp.bst989
-rw-r--r--biblio/bibtex/contrib/chem-journal/revcompchem.bst993
-rw-r--r--biblio/bibtex/contrib/chembst/README11
-rw-r--r--biblio/bibtex/contrib/chembst/chembst.dtx3110
-rw-r--r--biblio/bibtex/contrib/chembst/chembst.ins70
-rw-r--r--biblio/bibtex/contrib/chembst/chembst.pdfbin0 -> 239727 bytes
-rw-r--r--biblio/bibtex/contrib/chicago-annote/README2
-rw-r--r--biblio/bibtex/contrib/chicago-annote/chicago-annote.bst1689
-rw-r--r--biblio/bibtex/contrib/chicago/chicago.bst1653
-rw-r--r--biblio/bibtex/contrib/chicago/chicago.sty264
l---------biblio/bibtex/contrib/custom-bib1
-rw-r--r--biblio/bibtex/contrib/directory/README32
-rw-r--r--biblio/bibtex/contrib/directory/address-html.bst870
-rw-r--r--biblio/bibtex/contrib/directory/address-ldif.bst679
-rw-r--r--biblio/bibtex/contrib/directory/address-vcard.bst612
-rw-r--r--biblio/bibtex/contrib/directory/address.bst852
-rw-r--r--biblio/bibtex/contrib/directory/birthday.bst299
-rw-r--r--biblio/bibtex/contrib/directory/business.bib36
-rw-r--r--biblio/bibtex/contrib/directory/directory.pdfbin0 -> 194595 bytes
-rw-r--r--biblio/bibtex/contrib/directory/directory.sty436
-rw-r--r--biblio/bibtex/contrib/directory/directory.tex773
-rw-r--r--biblio/bibtex/contrib/directory/email-html.bst359
-rw-r--r--biblio/bibtex/contrib/directory/email.bst366
-rw-r--r--biblio/bibtex/contrib/directory/family.bib72
-rw-r--r--biblio/bibtex/contrib/directory/letter.bst359
-rw-r--r--biblio/bibtex/contrib/directory/phone.bst485
-rw-r--r--biblio/bibtex/contrib/dk-bib/88591-dk.csf106
-rw-r--r--biblio/bibtex/contrib/dk-bib/COPYRIGHT362
-rw-r--r--biblio/bibtex/contrib/dk-bib/Makefile71
-rw-r--r--biblio/bibtex/contrib/dk-bib/README9
-rw-r--r--biblio/bibtex/contrib/dk-bib/cp850-dk.csf106
-rw-r--r--biblio/bibtex/contrib/dk-bib/dk-abbrv.bst1301
-rw-r--r--biblio/bibtex/contrib/dk-bib/dk-alpha.bst1455
-rw-r--r--biblio/bibtex/contrib/dk-bib/dk-apali.bst1295
-rw-r--r--biblio/bibtex/contrib/dk-bib/dk-apali.sty37
-rw-r--r--biblio/bibtex/contrib/dk-bib/dk-bib.ltx352
-rw-r--r--biblio/bibtex/contrib/dk-bib/dk-bib.pdfbin0 -> 426879 bytes
-rw-r--r--biblio/bibtex/contrib/dk-bib/dk-bib.sty202
-rw-r--r--biblio/bibtex/contrib/dk-bib/dk-plain.bst1301
-rw-r--r--biblio/bibtex/contrib/dk-bib/dk-unsrt.bst1155
-rw-r--r--biblio/bibtex/contrib/dk-bib/litteratur.bib10
-rw-r--r--biblio/bibtex/contrib/dk-bib/mac-dk.csf99
-rw-r--r--biblio/bibtex/contrib/dk-bib/utf8-dk.csf127
-rw-r--r--biblio/bibtex/contrib/doc/README40
-rw-r--r--biblio/bibtex/contrib/doc/btxFAQ.pdfbin0 -> 533445 bytes
l---------biblio/bibtex/contrib/doc/btxdoc.pdf1
l---------biblio/bibtex/contrib/doc/btxhak.pdf1
-rw-r--r--biblio/bibtex/contrib/econ-bst/CHANGES.md284
-rw-r--r--biblio/bibtex/contrib/econ-bst/README.md43
-rw-r--r--biblio/bibtex/contrib/econ-bst/customization/README.md41
-rw-r--r--biblio/bibtex/contrib/econ-bst/customization/cited-part.tex52
-rw-r--r--biblio/bibtex/contrib/econ-bst/customization/econ-a.bst3541
-rw-r--r--biblio/bibtex/contrib/econ-bst/customization/econ-a.pdfbin0 -> 65579 bytes
-rw-r--r--biblio/bibtex/contrib/econ-bst/customization/econ-a.tex55
-rw-r--r--biblio/bibtex/contrib/econ-bst/customization/econ-aer.bst3538
-rw-r--r--biblio/bibtex/contrib/econ-bst/customization/econ-aer.pdfbin0 -> 100143 bytes
-rw-r--r--biblio/bibtex/contrib/econ-bst/customization/econ-aer.tex55
-rw-r--r--biblio/bibtex/contrib/econ-bst/customization/econ-b.bst3544
-rw-r--r--biblio/bibtex/contrib/econ-bst/customization/econ-b.pdfbin0 -> 98518 bytes
-rw-r--r--biblio/bibtex/contrib/econ-bst/customization/econ-b.tex55
-rw-r--r--biblio/bibtex/contrib/econ-bst/customization/econ-default.pdfbin0 -> 91915 bytes
-rw-r--r--biblio/bibtex/contrib/econ-bst/customization/econ-default.tex58
-rw-r--r--biblio/bibtex/contrib/econ-bst/customization/econ-econometrica.bst3530
-rw-r--r--biblio/bibtex/contrib/econ-bst/customization/econ-econometrica.pdfbin0 -> 91963 bytes
-rw-r--r--biblio/bibtex/contrib/econ-bst/customization/econ-econometrica.tex55
-rw-r--r--biblio/bibtex/contrib/econ-bst/customization/econ-jet.bst3545
-rw-r--r--biblio/bibtex/contrib/econ-bst/customization/econ-jet.pdfbin0 -> 80407 bytes
-rw-r--r--biblio/bibtex/contrib/econ-bst/customization/econ-jet.tex66
-rw-r--r--biblio/bibtex/contrib/econ-bst/customization/econ-jie.bst3543
-rw-r--r--biblio/bibtex/contrib/econ-bst/customization/econ-jie.pdfbin0 -> 80213 bytes
-rw-r--r--biblio/bibtex/contrib/econ-bst/customization/econ-jie.tex56
-rw-r--r--biblio/bibtex/contrib/econ-bst/customization/econ-no-sort.bst3521
-rw-r--r--biblio/bibtex/contrib/econ-bst/customization/econ-no-sort.pdfbin0 -> 91057 bytes
-rw-r--r--biblio/bibtex/contrib/econ-bst/customization/econ-no-sort.tex58
-rw-r--r--biblio/bibtex/contrib/econ-bst/customization/econ-numbers.pdfbin0 -> 91952 bytes
-rw-r--r--biblio/bibtex/contrib/econ-bst/customization/econ-numbers.tex72
-rw-r--r--biblio/bibtex/contrib/econ-bst/econ-example.bib537
-rw-r--r--biblio/bibtex/contrib/econ-bst/econ-example.pdfbin0 -> 179544 bytes
-rw-r--r--biblio/bibtex/contrib/econ-bst/econ-example.tex851
-rw-r--r--biblio/bibtex/contrib/econ-bst/econ.bst3521
-rw-r--r--biblio/bibtex/contrib/economic/CHANGELOG53
-rw-r--r--biblio/bibtex/contrib/economic/NEWS21
-rw-r--r--biblio/bibtex/contrib/economic/README210
-rw-r--r--biblio/bibtex/contrib/economic/aer-cje-ex.bib353
-rw-r--r--biblio/bibtex/contrib/economic/aer-cje-ex.tex45
-rw-r--r--biblio/bibtex/contrib/economic/aer-natbib-ex.tex45
-rw-r--r--biblio/bibtex/contrib/economic/aer.bst1221
-rw-r--r--biblio/bibtex/contrib/economic/aer.sty20
-rw-r--r--biblio/bibtex/contrib/economic/aertt.bst1221
-rw-r--r--biblio/bibtex/contrib/economic/aertt.sty23
-rw-r--r--biblio/bibtex/contrib/economic/agecon.bst1524
-rw-r--r--biblio/bibtex/contrib/economic/agecon.cls207
-rw-r--r--biblio/bibtex/contrib/economic/ajae-ex.bib386
-rw-r--r--biblio/bibtex/contrib/economic/ajae-ex.pdfbin0 -> 94505 bytes
-rw-r--r--biblio/bibtex/contrib/economic/ajae-ex.tex145
-rw-r--r--biblio/bibtex/contrib/economic/ajae.bst1663
-rw-r--r--biblio/bibtex/contrib/economic/ajae.cls308
-rw-r--r--biblio/bibtex/contrib/economic/apecon-ex.bib77
-rw-r--r--biblio/bibtex/contrib/economic/apecon-ex.pdfbin0 -> 278284 bytes
-rw-r--r--biblio/bibtex/contrib/economic/apecon-ex.tex161
-rw-r--r--biblio/bibtex/contrib/economic/apecon.bst1446
-rw-r--r--biblio/bibtex/contrib/economic/apecon.cls196
-rw-r--r--biblio/bibtex/contrib/economic/cje.bst1192
-rw-r--r--biblio/bibtex/contrib/economic/cje.sty21
-rw-r--r--biblio/bibtex/contrib/economic/ecca-ex.bib142
-rw-r--r--biblio/bibtex/contrib/economic/ecca-ex.pdfbin0 -> 94293 bytes
-rw-r--r--biblio/bibtex/contrib/economic/ecca-ex.tex183
-rw-r--r--biblio/bibtex/contrib/economic/ecca.bst1655
-rw-r--r--biblio/bibtex/contrib/economic/ecca.cls252
l---------biblio/bibtex/contrib/economic/econometrica-fr.bst1
l---------biblio/bibtex/contrib/economic/econometrica.bst1
-rw-r--r--biblio/bibtex/contrib/economic/ecta.bst1503
-rw-r--r--biblio/bibtex/contrib/economic/erae-ex.bib42
-rw-r--r--biblio/bibtex/contrib/economic/erae-ex.pdfbin0 -> 99317 bytes
-rw-r--r--biblio/bibtex/contrib/economic/erae-ex.tex151
-rw-r--r--biblio/bibtex/contrib/economic/erae.bst1533
-rw-r--r--biblio/bibtex/contrib/economic/erae.cls201
-rw-r--r--biblio/bibtex/contrib/economic/ier-bib-test.pdfbin0 -> 69672 bytes
-rw-r--r--biblio/bibtex/contrib/economic/ier-bib-test.tex26
-rw-r--r--biblio/bibtex/contrib/economic/ier-ex.bib115
-rw-r--r--biblio/bibtex/contrib/economic/ier.bst1549
-rw-r--r--biblio/bibtex/contrib/economic/itaxpf-ex-title.pdfbin0 -> 73580 bytes
-rw-r--r--biblio/bibtex/contrib/economic/itaxpf-ex-title.tex45
-rw-r--r--biblio/bibtex/contrib/economic/itaxpf-ex.bib44
-rw-r--r--biblio/bibtex/contrib/economic/itaxpf-ex.pdfbin0 -> 140537 bytes
-rw-r--r--biblio/bibtex/contrib/economic/itaxpf-ex.tex113
-rw-r--r--biblio/bibtex/contrib/economic/itaxpf.bst1480
-rw-r--r--biblio/bibtex/contrib/economic/itaxpf.cls232
-rw-r--r--biblio/bibtex/contrib/economic/jae.bst1467
-rw-r--r--biblio/bibtex/contrib/economic/jpe.bst1611
-rw-r--r--biblio/bibtex/contrib/economic/jrurstud.cls281
-rw-r--r--biblio/bibtex/contrib/economic/jss2.bst1647
-rw-r--r--biblio/bibtex/contrib/economic/njf.cls148
-rw-r--r--biblio/bibtex/contrib/economic/oega.bst1563
-rw-r--r--biblio/bibtex/contrib/economic/oegatb-ex.bib36
-rw-r--r--biblio/bibtex/contrib/economic/oegatb-ex.pdfbin0 -> 73392 bytes
-rw-r--r--biblio/bibtex/contrib/economic/oegatb-ex.pngbin0 -> 21977 bytes
-rw-r--r--biblio/bibtex/contrib/economic/oegatb-ex.tex253
-rw-r--r--biblio/bibtex/contrib/economic/oegatb.cls220
-rw-r--r--biblio/bibtex/contrib/economic/pocoec.cls257
-rw-r--r--biblio/bibtex/contrib/economic/regstud.bst1431
-rw-r--r--biblio/bibtex/contrib/economic/regstud.cls270
-rw-r--r--biblio/bibtex/contrib/economic/tandfx.bst1574
-rw-r--r--biblio/bibtex/contrib/economic/worlddev.bst1459
-rw-r--r--biblio/bibtex/contrib/economic/worlddev.cls243
-rw-r--r--biblio/bibtex/contrib/examples/xampl-aaai-named.ltx28
-rw-r--r--biblio/bibtex/contrib/examples/xampl-abbrv.ltx28
-rw-r--r--biblio/bibtex/contrib/examples/xampl-abstract.ltx28
-rw-r--r--biblio/bibtex/contrib/examples/xampl-acm.ltx28
-rw-r--r--biblio/bibtex/contrib/examples/xampl-agsm.ltx28
-rw-r--r--biblio/bibtex/contrib/examples/xampl-alpha.ltx28
-rw-r--r--biblio/bibtex/contrib/examples/xampl-amsalpha.ltx28
-rw-r--r--biblio/bibtex/contrib/examples/xampl-amsplain.ltx28
-rw-r--r--biblio/bibtex/contrib/examples/xampl-annotate.ltx28
-rw-r--r--biblio/bibtex/contrib/examples/xampl-annotation.ltx28
-rw-r--r--biblio/bibtex/contrib/examples/xampl-apa.ltx28
-rw-r--r--biblio/bibtex/contrib/examples/xampl-apalike.ltx28
-rw-r--r--biblio/bibtex/contrib/examples/xampl-apalike2.ltx28
-rw-r--r--biblio/bibtex/contrib/examples/xampl-astron.ltx28
-rw-r--r--biblio/bibtex/contrib/examples/xampl-authordate1.ltx28
-rw-r--r--biblio/bibtex/contrib/examples/xampl-authordate2.ltx28
-rw-r--r--biblio/bibtex/contrib/examples/xampl-authordate3.ltx28
-rw-r--r--biblio/bibtex/contrib/examples/xampl-authordate4.ltx28
-rw-r--r--biblio/bibtex/contrib/examples/xampl-bbs.ltx28
-rw-r--r--biblio/bibtex/contrib/examples/xampl-cbe.ltx28
-rw-r--r--biblio/bibtex/contrib/examples/xampl-cell.ltx28
-rw-r--r--biblio/bibtex/contrib/examples/xampl-dcu.ltx28
-rw-r--r--biblio/bibtex/contrib/examples/xampl-humanbio.ltx28
-rw-r--r--biblio/bibtex/contrib/examples/xampl-humannat.ltx28
-rw-r--r--biblio/bibtex/contrib/examples/xampl-ieeetr.ltx28
-rw-r--r--biblio/bibtex/contrib/examples/xampl-is-abbrv.ltx28
-rw-r--r--biblio/bibtex/contrib/examples/xampl-is-alpha.ltx28
-rw-r--r--biblio/bibtex/contrib/examples/xampl-is-plain.ltx28
-rw-r--r--biblio/bibtex/contrib/examples/xampl-is-unsrt.ltx28
-rw-r--r--biblio/bibtex/contrib/examples/xampl-jbact.ltx28
-rw-r--r--biblio/bibtex/contrib/examples/xampl-jmb.ltx28
-rw-r--r--biblio/bibtex/contrib/examples/xampl-jtb.ltx28
-rw-r--r--biblio/bibtex/contrib/examples/xampl-kluwer.ltx28
-rw-r--r--biblio/bibtex/contrib/examples/xampl-named.ltx28
-rw-r--r--biblio/bibtex/contrib/examples/xampl-namunsrt.ltx28
-rw-r--r--biblio/bibtex/contrib/examples/xampl-nar.ltx28
-rw-r--r--biblio/bibtex/contrib/examples/xampl-nature.ltx28
-rw-r--r--biblio/bibtex/contrib/examples/xampl-newapa.ltx28
-rw-r--r--biblio/bibtex/contrib/examples/xampl-phaip.ltx28
-rw-r--r--biblio/bibtex/contrib/examples/xampl-phapalik.ltx28
-rw-r--r--biblio/bibtex/contrib/examples/xampl-phcpc.ltx28
-rw-r--r--biblio/bibtex/contrib/examples/xampl-phiaea.ltx28
-rw-r--r--biblio/bibtex/contrib/examples/xampl-phjcp.ltx28
-rw-r--r--biblio/bibtex/contrib/examples/xampl-phnf.ltx28
-rw-r--r--biblio/bibtex/contrib/examples/xampl-phnflet.ltx28
-rw-r--r--biblio/bibtex/contrib/examples/xampl-phpf.ltx28
-rw-r--r--biblio/bibtex/contrib/examples/xampl-phppcf.ltx28
-rw-r--r--biblio/bibtex/contrib/examples/xampl-phreport.ltx28
-rw-r--r--biblio/bibtex/contrib/examples/xampl-phrmp.ltx28
-rw-r--r--biblio/bibtex/contrib/examples/xampl-plain.ltx28
-rw-r--r--biblio/bibtex/contrib/examples/xampl-plainyr.ltx28
-rw-r--r--biblio/bibtex/contrib/examples/xampl-siam.ltx28
-rw-r--r--biblio/bibtex/contrib/examples/xampl-unsrt.ltx28
-rw-r--r--biblio/bibtex/contrib/examples/xampl.ltx28
-rw-r--r--biblio/bibtex/contrib/francais-bst/README109
-rw-r--r--biblio/bibtex/contrib/francais-bst/francais.bst1739
-rw-r--r--biblio/bibtex/contrib/francais-bst/francaisbst.tex49
-rw-r--r--biblio/bibtex/contrib/francais-bst/francaissc.bst1759
-rw-r--r--biblio/bibtex/contrib/gbt7714/LICENSE416
-rw-r--r--biblio/bibtex/contrib/gbt7714/README.md163
-rw-r--r--biblio/bibtex/contrib/gbt7714/gbt7714-plain.bst2043
-rw-r--r--biblio/bibtex/contrib/gbt7714/gbt7714-unsrt.bst1866
-rw-r--r--biblio/bibtex/contrib/gbt7714/gbt7714.dtx3884
-rw-r--r--biblio/bibtex/contrib/gbt7714/gbt7714.pdfbin0 -> 322635 bytes
-rw-r--r--biblio/bibtex/contrib/gbt7714/gbt7714.sty124
-rw-r--r--biblio/bibtex/contrib/german/din1505/abbrvdin.bst2031
-rw-r--r--biblio/bibtex/contrib/german/din1505/alphadin.bst2212
-rw-r--r--biblio/bibtex/contrib/german/din1505/leitbild.bib145
-rw-r--r--biblio/bibtex/contrib/german/din1505/leitbild3.pdfbin0 -> 168623 bytes
-rw-r--r--biblio/bibtex/contrib/german/din1505/natbib.cfg19
-rw-r--r--biblio/bibtex/contrib/german/din1505/natdin.bst2234
-rw-r--r--biblio/bibtex/contrib/german/din1505/normpatsoft.pdfbin0 -> 200993 bytes
-rw-r--r--biblio/bibtex/contrib/german/din1505/plaindin.bst2038
-rw-r--r--biblio/bibtex/contrib/german/din1505/unsrtdin.bst1894
-rw-r--r--biblio/bibtex/contrib/german/dinat/dinat-index.html229
-rw-r--r--biblio/bibtex/contrib/german/dinat/dinat.bst1952
-rw-r--r--biblio/bibtex/contrib/german/dinat/history.html692
-rw-r--r--biblio/bibtex/contrib/germbib/README.bibgerm24
-rw-r--r--biblio/bibtex/contrib/germbib/bst/gerabbrv.bst1208
-rw-r--r--biblio/bibtex/contrib/germbib/bst/geralpha.bst1369
-rw-r--r--biblio/bibtex/contrib/germbib/bst/gerapali.bst1227
-rw-r--r--biblio/bibtex/contrib/germbib/bst/gerplain.bst1209
-rw-r--r--biblio/bibtex/contrib/germbib/bst/gerunsrt.bst1063
-rw-r--r--biblio/bibtex/contrib/germbib/document/apalike.doc60
l---------biblio/bibtex/contrib/germbib/document/btxbst.doc1
l---------biblio/bibtex/contrib/germbib/document/btxdoc.bib1
-rw-r--r--biblio/bibtex/contrib/germbib/document/btxdoc.tex1119
-rw-r--r--biblio/bibtex/contrib/germbib/document/btxhak.tex623
-rw-r--r--biblio/bibtex/contrib/germbib/document/gerbibtx.bib54
-rw-r--r--biblio/bibtex/contrib/germbib/document/gerbibtx.tex433
-rw-r--r--biblio/bibtex/contrib/germbib/for_tex/apalike.tex88
-rw-r--r--biblio/bibtex/contrib/germbib/styles/apalike.sty30
-rw-r--r--biblio/bibtex/contrib/germbib/styles/bibgerm.sty312
l---------biblio/bibtex/contrib/germbib/styles/german.MISSING1
-rw-r--r--biblio/bibtex/contrib/germbib/styles/mynormal.sty101
-rw-r--r--biblio/bibtex/contrib/germbib/test/gerxampl.bib359
-rw-r--r--biblio/bibtex/contrib/germbib/test/schaum.bib531
-rw-r--r--biblio/bibtex/contrib/germbib/test/testbibgerm.dvibin0 -> 2200 bytes
-rw-r--r--biblio/bibtex/contrib/germbib/test/testbibgerm.tex21
-rw-r--r--biblio/bibtex/contrib/germbib/test/testgerb.tex89
-rw-r--r--biblio/bibtex/contrib/germbib/test/xampl.bib359
-rw-r--r--biblio/bibtex/contrib/getrefs/getrefs.bst1180
-rw-r--r--biblio/bibtex/contrib/getrefs/getrefs.tex9
-rw-r--r--biblio/bibtex/contrib/getrefs/getrefs.txt72
-rw-r--r--biblio/bibtex/contrib/gost/README.md327
-rw-r--r--biblio/bibtex/contrib/gost/bibtex/cp1251.csf275
-rw-r--r--biblio/bibtex/contrib/gost/bibtex/koi8u.csf275
-rw-r--r--biblio/bibtex/contrib/gost/bibtex/ruscii.csf275
-rw-r--r--biblio/bibtex/contrib/gost/bibtex/utf8cyrillic.csf275
-rw-r--r--biblio/bibtex/contrib/gost/doc/examples/cp1251/bib/ex01.bib9
-rw-r--r--biblio/bibtex/contrib/gost/doc/examples/cp1251/bib/ex02.bib10
-rw-r--r--biblio/bibtex/contrib/gost/doc/examples/cp1251/bib/ex03.bib11
-rw-r--r--biblio/bibtex/contrib/gost/doc/examples/cp1251/bib/ex04.bib11
-rw-r--r--biblio/bibtex/contrib/gost/doc/examples/cp1251/bib/ex05.bib11
-rw-r--r--biblio/bibtex/contrib/gost/doc/examples/cp1251/bib/ex06.bib12
-rw-r--r--biblio/bibtex/contrib/gost/doc/examples/cp1251/bib/ex06a.bib10
-rw-r--r--biblio/bibtex/contrib/gost/doc/examples/cp1251/bib/ex07.bib9
-rw-r--r--biblio/bibtex/contrib/gost/doc/examples/cp1251/bib/ex08.bib10
-rw-r--r--biblio/bibtex/contrib/gost/doc/examples/cp1251/bib/ex09.bib12
-rw-r--r--biblio/bibtex/contrib/gost/doc/examples/cp1251/bib/ex10.bib9
-rw-r--r--biblio/bibtex/contrib/gost/doc/examples/cp1251/bib/ex11.bib11
-rw-r--r--biblio/bibtex/contrib/gost/doc/examples/cp1251/bib/ex12.bib8
-rw-r--r--biblio/bibtex/contrib/gost/doc/examples/cp1251/bib/ex13.bib10
-rw-r--r--biblio/bibtex/contrib/gost/doc/examples/cp1251/bib/ex14.bib11
-rw-r--r--biblio/bibtex/contrib/gost/doc/examples/cp1251/bib/ex14a.bib11
-rw-r--r--biblio/bibtex/contrib/gost/doc/examples/cp1251/bib/ex15.bib12
-rw-r--r--biblio/bibtex/contrib/gost/doc/examples/cp1251/bib/ex16.bib10
-rw-r--r--biblio/bibtex/contrib/gost/doc/examples/cp1251/bib/ex17.bib11
-rw-r--r--biblio/bibtex/contrib/gost/doc/examples/cp1251/bib/ex17a.bib8
-rw-r--r--biblio/bibtex/contrib/gost/doc/examples/cp1251/bib/ex17b.bib10
-rw-r--r--biblio/bibtex/contrib/gost/doc/examples/cp1251/bib/ex18.bib11
-rw-r--r--biblio/bibtex/contrib/gost/doc/examples/cp1251/bib/ex19.bib14
-rw-r--r--biblio/bibtex/contrib/gost/doc/examples/cp1251/bib/ex20.bib9
-rw-r--r--biblio/bibtex/contrib/gost/doc/examples/cp1251/bib/ex20a.bib28
-rw-r--r--biblio/bibtex/contrib/gost/doc/examples/cp1251/bib/ex20b.bib16
-rw-r--r--biblio/bibtex/contrib/gost/doc/examples/cp1251/bib/ex20c.bib20
-rw-r--r--biblio/bibtex/contrib/gost/doc/examples/cp1251/bib/ex21.bib14
-rw-r--r--biblio/bibtex/contrib/gost/doc/examples/cp1251/bib/ex21a.bib11
-rw-r--r--biblio/bibtex/contrib/gost/doc/examples/cp1251/bib/ex21b.bib17
-rw-r--r--biblio/bibtex/contrib/gost/doc/examples/cp1251/bib/ex23.bib11
-rw-r--r--biblio/bibtex/contrib/gost/doc/examples/cp1251/bib/ex24.bib15
-rw-r--r--biblio/bibtex/contrib/gost/doc/examples/cp1251/bib/ex24a.bib12
-rw-r--r--biblio/bibtex/contrib/gost/doc/examples/cp1251/bib/ex24b.bib14
-rw-r--r--biblio/bibtex/contrib/gost/doc/examples/cp1251/bib/ex25.bib11
-rw-r--r--biblio/bibtex/contrib/gost/doc/examples/cp1251/bib/ex26.bib12
-rw-r--r--biblio/bibtex/contrib/gost/doc/examples/cp1251/bib/ex27a.bib18
-rw-r--r--biblio/bibtex/contrib/gost/doc/examples/cp1251/bib/ex27b.bib10
-rw-r--r--biblio/bibtex/contrib/gost/doc/examples/cp1251/bib/ex27c.bib8
-rw-r--r--biblio/bibtex/contrib/gost/doc/examples/cp1251/bib/ex28.bib25
-rw-r--r--biblio/bibtex/contrib/gost/doc/examples/cp1251/bib/ex28a.bib32
-rw-r--r--biblio/bibtex/contrib/gost/doc/examples/cp1251/bib/ex29.bib15
-rw-r--r--biblio/bibtex/contrib/gost/doc/examples/cp1251/bib/ex30.bib27
-rw-r--r--biblio/bibtex/contrib/gost/doc/examples/cp1251/bib/ex31.bib40
-rw-r--r--biblio/bibtex/contrib/gost/doc/examples/cp1251/bib/examples.bib606
-rw-r--r--biblio/bibtex/contrib/gost/doc/examples/cp1251/gost.tex195
-rw-r--r--biblio/bibtex/contrib/gost/doc/examples/cp1251/gost2003.pdfbin0 -> 318845 bytes
-rw-r--r--biblio/bibtex/contrib/gost/doc/examples/cp1251/gost2003.tex16
-rw-r--r--biblio/bibtex/contrib/gost/doc/examples/cp1251/gost2008-customized.pdfbin0 -> 336335 bytes
-rw-r--r--biblio/bibtex/contrib/gost/doc/examples/cp1251/gost2008-customized.tex18
-rw-r--r--biblio/bibtex/contrib/gost/doc/examples/cp1251/gost2008.pdfbin0 -> 317099 bytes
-rw-r--r--biblio/bibtex/contrib/gost/doc/examples/cp1251/gost2008.tex12
-rw-r--r--biblio/bibtex/contrib/gost/doc/examples/cp1251/gost2008l.pdfbin0 -> 318844 bytes
-rw-r--r--biblio/bibtex/contrib/gost/doc/examples/cp1251/gost2008l.tex16
-rw-r--r--biblio/bibtex/contrib/gost/doc/examples/cp1251/gost2008n.pdfbin0 -> 207625 bytes
-rw-r--r--biblio/bibtex/contrib/gost/doc/examples/cp1251/gost2008n.tex118
-rw-r--r--biblio/bibtex/contrib/gost/doc/examples/cp1251/gost2008ns.pdfbin0 -> 207907 bytes
-rw-r--r--biblio/bibtex/contrib/gost/doc/examples/cp1251/gost2008ns.tex122
-rw-r--r--biblio/bibtex/contrib/gost/doc/examples/cp1251/gost780.pdfbin0 -> 316926 bytes
-rw-r--r--biblio/bibtex/contrib/gost/doc/examples/cp1251/gost780.tex15
-rw-r--r--biblio/bibtex/contrib/gost/doc/examples/cp1251/make-examples-on-win-cp1251.cmd34
-rw-r--r--biblio/bibtex/contrib/gost/doc/examples/utf8/bib/ex01.bib9
-rw-r--r--biblio/bibtex/contrib/gost/doc/examples/utf8/bib/ex02.bib10
-rw-r--r--biblio/bibtex/contrib/gost/doc/examples/utf8/bib/ex03.bib11
-rw-r--r--biblio/bibtex/contrib/gost/doc/examples/utf8/bib/ex04.bib11
-rw-r--r--biblio/bibtex/contrib/gost/doc/examples/utf8/bib/ex05.bib11
-rw-r--r--biblio/bibtex/contrib/gost/doc/examples/utf8/bib/ex06.bib12
-rw-r--r--biblio/bibtex/contrib/gost/doc/examples/utf8/bib/ex06a.bib10
-rw-r--r--biblio/bibtex/contrib/gost/doc/examples/utf8/bib/ex07.bib9
-rw-r--r--biblio/bibtex/contrib/gost/doc/examples/utf8/bib/ex08.bib10
-rw-r--r--biblio/bibtex/contrib/gost/doc/examples/utf8/bib/ex09.bib12
-rw-r--r--biblio/bibtex/contrib/gost/doc/examples/utf8/bib/ex10.bib9
-rw-r--r--biblio/bibtex/contrib/gost/doc/examples/utf8/bib/ex11.bib11
-rw-r--r--biblio/bibtex/contrib/gost/doc/examples/utf8/bib/ex12.bib8
-rw-r--r--biblio/bibtex/contrib/gost/doc/examples/utf8/bib/ex13.bib10
-rw-r--r--biblio/bibtex/contrib/gost/doc/examples/utf8/bib/ex14.bib11
-rw-r--r--biblio/bibtex/contrib/gost/doc/examples/utf8/bib/ex14a.bib11
-rw-r--r--biblio/bibtex/contrib/gost/doc/examples/utf8/bib/ex15.bib12
-rw-r--r--biblio/bibtex/contrib/gost/doc/examples/utf8/bib/ex16.bib10
-rw-r--r--biblio/bibtex/contrib/gost/doc/examples/utf8/bib/ex17.bib11
-rw-r--r--biblio/bibtex/contrib/gost/doc/examples/utf8/bib/ex17a.bib8
-rw-r--r--biblio/bibtex/contrib/gost/doc/examples/utf8/bib/ex17b.bib10
-rw-r--r--biblio/bibtex/contrib/gost/doc/examples/utf8/bib/ex18.bib11
-rw-r--r--biblio/bibtex/contrib/gost/doc/examples/utf8/bib/ex19.bib14
-rw-r--r--biblio/bibtex/contrib/gost/doc/examples/utf8/bib/ex20.bib9
-rw-r--r--biblio/bibtex/contrib/gost/doc/examples/utf8/bib/ex20a.bib28
-rw-r--r--biblio/bibtex/contrib/gost/doc/examples/utf8/bib/ex20b.bib16
-rw-r--r--biblio/bibtex/contrib/gost/doc/examples/utf8/bib/ex20c.bib20
-rw-r--r--biblio/bibtex/contrib/gost/doc/examples/utf8/bib/ex21.bib14
-rw-r--r--biblio/bibtex/contrib/gost/doc/examples/utf8/bib/ex21a.bib11
-rw-r--r--biblio/bibtex/contrib/gost/doc/examples/utf8/bib/ex21b.bib17
-rw-r--r--biblio/bibtex/contrib/gost/doc/examples/utf8/bib/ex22.bib12
-rw-r--r--biblio/bibtex/contrib/gost/doc/examples/utf8/bib/ex22a.bib46
-rw-r--r--biblio/bibtex/contrib/gost/doc/examples/utf8/bib/ex23.bib11
-rw-r--r--biblio/bibtex/contrib/gost/doc/examples/utf8/bib/ex24.bib15
-rw-r--r--biblio/bibtex/contrib/gost/doc/examples/utf8/bib/ex24a.bib12
-rw-r--r--biblio/bibtex/contrib/gost/doc/examples/utf8/bib/ex24b.bib14
-rw-r--r--biblio/bibtex/contrib/gost/doc/examples/utf8/bib/ex25.bib11
-rw-r--r--biblio/bibtex/contrib/gost/doc/examples/utf8/bib/ex26.bib12
-rw-r--r--biblio/bibtex/contrib/gost/doc/examples/utf8/bib/ex27a.bib18
-rw-r--r--biblio/bibtex/contrib/gost/doc/examples/utf8/bib/ex27b.bib10
-rw-r--r--biblio/bibtex/contrib/gost/doc/examples/utf8/bib/ex27c.bib8
-rw-r--r--biblio/bibtex/contrib/gost/doc/examples/utf8/bib/ex28.bib25
-rw-r--r--biblio/bibtex/contrib/gost/doc/examples/utf8/bib/ex28a.bib32
-rw-r--r--biblio/bibtex/contrib/gost/doc/examples/utf8/bib/ex29.bib15
-rw-r--r--biblio/bibtex/contrib/gost/doc/examples/utf8/bib/ex30.bib27
-rw-r--r--biblio/bibtex/contrib/gost/doc/examples/utf8/bib/ex31.bib40
-rw-r--r--biblio/bibtex/contrib/gost/doc/examples/utf8/bib/examples.bib664
-rw-r--r--biblio/bibtex/contrib/gost/doc/examples/utf8/make-examples-on-win-utf8.cmd34
-rw-r--r--biblio/bibtex/contrib/gost/doc/examples/utf8/ugost.tex194
-rw-r--r--biblio/bibtex/contrib/gost/doc/examples/utf8/ugost2003.pdfbin0 -> 229878 bytes
-rw-r--r--biblio/bibtex/contrib/gost/doc/examples/utf8/ugost2003.tex18
-rw-r--r--biblio/bibtex/contrib/gost/doc/examples/utf8/ugost2008-customized.pdfbin0 -> 251540 bytes
-rw-r--r--biblio/bibtex/contrib/gost/doc/examples/utf8/ugost2008-customized.tex18
-rw-r--r--biblio/bibtex/contrib/gost/doc/examples/utf8/ugost2008.pdfbin0 -> 229942 bytes
-rw-r--r--biblio/bibtex/contrib/gost/doc/examples/utf8/ugost2008.tex14
-rw-r--r--biblio/bibtex/contrib/gost/doc/examples/utf8/ugost2008l.pdfbin0 -> 229975 bytes
-rw-r--r--biblio/bibtex/contrib/gost/doc/examples/utf8/ugost2008l.tex18
-rw-r--r--biblio/bibtex/contrib/gost/doc/examples/utf8/ugost2008n.pdfbin0 -> 208310 bytes
-rw-r--r--biblio/bibtex/contrib/gost/doc/examples/utf8/ugost2008n.tex122
-rw-r--r--biblio/bibtex/contrib/gost/doc/examples/utf8/ugost2008ns.pdfbin0 -> 208400 bytes
-rw-r--r--biblio/bibtex/contrib/gost/doc/examples/utf8/ugost2008ns.tex123
-rw-r--r--biblio/bibtex/contrib/gost/doc/examples/utf8/ugost2008s.pdfbin0 -> 221365 bytes
-rw-r--r--biblio/bibtex/contrib/gost/doc/examples/utf8/ugost2008s.tex106
-rw-r--r--biblio/bibtex/contrib/gost/doc/gost.pdfbin0 -> 595440 bytes
-rw-r--r--biblio/bibtex/contrib/gost/source/gost.dtx5097
-rw-r--r--biblio/bibtex/contrib/gost/source/gost.ins81
-rw-r--r--biblio/bibtex/contrib/ijqc/README35
-rw-r--r--biblio/bibtex/contrib/ijqc/ijqc.bst1252
-rw-r--r--biblio/bibtex/contrib/ijqc/makefile45
-rw-r--r--biblio/bibtex/contrib/ijqc/mybib.bib1175
-rw-r--r--biblio/bibtex/contrib/ijqc/xampl.bbl459
-rw-r--r--biblio/bibtex/contrib/ijqc/xampl.pdfbin0 -> 105175 bytes
-rw-r--r--biblio/bibtex/contrib/ijqc/xampl.tex180
-rw-r--r--biblio/bibtex/contrib/index284
-rw-r--r--biblio/bibtex/contrib/inlinebib/MANIFEST7
-rw-r--r--biblio/bibtex/contrib/inlinebib/inlinebib.bst1125
-rw-r--r--biblio/bibtex/contrib/inlinebib/inlinebib.htm202
-rw-r--r--biblio/bibtex/contrib/inlinebib/inlinebib.sty165
-rw-r--r--biblio/bibtex/contrib/inlinebib/inlinebib.txt151
-rw-r--r--biblio/bibtex/contrib/inlinebib/inlinebib1.gifbin0 -> 3686 bytes
-rw-r--r--biblio/bibtex/contrib/inlinebib/inlinebib2.gifbin0 -> 12611 bytes
-rw-r--r--biblio/bibtex/contrib/inlinebib/pageranges.sty94
-rw-r--r--biblio/bibtex/contrib/iopart-num/README22
-rw-r--r--biblio/bibtex/contrib/iopart-num/iopart-num.bib174
-rw-r--r--biblio/bibtex/contrib/iopart-num/iopart-num.bst1722
-rw-r--r--biblio/bibtex/contrib/iopart-num/iopart-num.pdfbin0 -> 67557 bytes
-rw-r--r--biblio/bibtex/contrib/iopart-num/iopart-num.tex191
-rw-r--r--biblio/bibtex/contrib/is-bst/is-abbrv.bst1833
-rw-r--r--biblio/bibtex/contrib/is-bst/is-alpha.bst2020
-rw-r--r--biblio/bibtex/contrib/is-bst/is-plain.bst1835
-rw-r--r--biblio/bibtex/contrib/is-bst/is-unsrt.bst1673
-rw-r--r--biblio/bibtex/contrib/is-bst/xbtxbst.doc2665
-rw-r--r--biblio/bibtex/contrib/jmb/jmb.bst1368
-rw-r--r--biblio/bibtex/contrib/jmb/jmb.sty92
-rw-r--r--biblio/bibtex/contrib/jneurosci/README46
-rw-r--r--biblio/bibtex/contrib/jneurosci/jneurosci.bst1383
-rw-r--r--biblio/bibtex/contrib/jneurosci/jneurosci.pdfbin0 -> 244554 bytes
-rw-r--r--biblio/bibtex/contrib/jneurosci/jneurosci.sty89
-rw-r--r--biblio/bibtex/contrib/jneurosci/jneurosci.tex81
-rw-r--r--biblio/bibtex/contrib/jphysiol/README43
-rw-r--r--biblio/bibtex/contrib/jphysiol/jphysiol.bst1395
-rw-r--r--biblio/bibtex/contrib/jphysiol/jphysiol.sty93
-rw-r--r--biblio/bibtex/contrib/ksfh_nat/ksfh_nat.bst1277
-rw-r--r--biblio/bibtex/contrib/misc/IEEEannot.bst2626
-rw-r--r--biblio/bibtex/contrib/misc/aaai-named.bst1283
l---------biblio/bibtex/contrib/misc/abstract.bst1
-rw-r--r--biblio/bibtex/contrib/misc/achicago.README25
-rw-r--r--biblio/bibtex/contrib/misc/aichej.bst1380
-rw-r--r--biblio/bibtex/contrib/misc/ajl.bst1557
-rw-r--r--biblio/bibtex/contrib/misc/alphanum.bst1265
-rw-r--r--biblio/bibtex/contrib/misc/ama.bst987
l---------biblio/bibtex/contrib/misc/amsalpha.bst1
l---------biblio/bibtex/contrib/misc/amsplain.bst1
-rw-r--r--biblio/bibtex/contrib/misc/annotate.bst1280
-rw-r--r--biblio/bibtex/contrib/misc/annotation.bst1105
-rw-r--r--biblio/bibtex/contrib/misc/apa.bst1130
-rw-r--r--biblio/bibtex/contrib/misc/apasoft.bst1225
-rw-r--r--biblio/bibtex/contrib/misc/automatica.bst1280
-rw-r--r--biblio/bibtex/contrib/misc/bbs.bst1162
-rw-r--r--biblio/bibtex/contrib/misc/cbe.bst1161
-rw-r--r--biblio/bibtex/contrib/misc/chicagoa.bst1683
-rw-r--r--biblio/bibtex/contrib/misc/cj.bst1205
-rw-r--r--biblio/bibtex/contrib/misc/decsci.bst1504
-rw-r--r--biblio/bibtex/contrib/misc/development.bst1495
-rw-r--r--biblio/bibtex/contrib/misc/fbs.bst1260
-rw-r--r--biblio/bibtex/contrib/misc/finplain.bst1213
-rw-r--r--biblio/bibtex/contrib/misc/humanbio.bst1134
-rw-r--r--biblio/bibtex/contrib/misc/humannat.bst1205
-rw-r--r--biblio/bibtex/contrib/misc/jbact.bst1490
-rw-r--r--biblio/bibtex/contrib/misc/jqt1999.bst1142
-rw-r--r--biblio/bibtex/contrib/misc/jtb.bst1202
-rw-r--r--biblio/bibtex/contrib/misc/jtbnew.bst1493
-rw-r--r--biblio/bibtex/contrib/misc/namunsrt.bst949
-rw-r--r--biblio/bibtex/contrib/misc/nar.bst1144
-rw-r--r--biblio/bibtex/contrib/misc/neuron.bst1481
-rw-r--r--biblio/bibtex/contrib/misc/plainyr.bst1144
-rw-r--r--biblio/bibtex/contrib/misc/pnas.bst967
-rw-r--r--biblio/bibtex/contrib/misc/pnas2009.bst950
-rw-r--r--biblio/bibtex/contrib/misc/refer.bst166
-rw-r--r--biblio/bibtex/contrib/misc/these.bst1252
-rw-r--r--biblio/bibtex/contrib/misc/wmaainf.bst825
-rw-r--r--biblio/bibtex/contrib/mla/hum2.bst1641
-rw-r--r--biblio/bibtex/contrib/mla/hum2.sty310
-rw-r--r--biblio/bibtex/contrib/mla/mla.bst1533
-rw-r--r--biblio/bibtex/contrib/mla/mla.sty292
-rw-r--r--biblio/bibtex/contrib/mla/mlaa.bst1563
-rw-r--r--biblio/bibtex/contrib/munich/README22
-rw-r--r--biblio/bibtex/contrib/munich/documenation_munich_Bibtex_style.pdfbin0 -> 101935 bytes
-rw-r--r--biblio/bibtex/contrib/munich/documenation_munich_Bibtex_style.tex88
-rw-r--r--biblio/bibtex/contrib/munich/example_DB.bib45
-rw-r--r--biblio/bibtex/contrib/munich/example_munich_Bibtex_style.pdfbin0 -> 186686 bytes
-rw-r--r--biblio/bibtex/contrib/munich/example_munich_Bibtex_style.tex81
-rw-r--r--biblio/bibtex/contrib/munich/munich.bst1599
-rw-r--r--biblio/bibtex/contrib/named/named.bst1287
-rw-r--r--biblio/bibtex/contrib/named/named.sty10
-rw-r--r--biblio/bibtex/contrib/newapa/newapa.bst1468
-rw-r--r--biblio/bibtex/contrib/newapa/newapa.sty265
-rw-r--r--biblio/bibtex/contrib/norbib/norabbrv.bst1096
-rw-r--r--biblio/bibtex/contrib/norbib/noralpha.bst1250
-rw-r--r--biblio/bibtex/contrib/norbib/norplain.bst1096
-rw-r--r--biblio/bibtex/contrib/norbib/norunsrt.bst950
-rw-r--r--biblio/bibtex/contrib/other/README7
-rw-r--r--biblio/bibtex/contrib/other/phjcp.bst1888
-rw-r--r--biblio/bibtex/contrib/other/phyjabb.bib60
-rw-r--r--biblio/bibtex/contrib/other/phyjabb.btx63
-rw-r--r--biblio/bibtex/contrib/other/phyjfull.btx64
-rw-r--r--biblio/bibtex/contrib/other/physics.btx3569
-rw-r--r--biblio/bibtex/contrib/oxford/README112
-rw-r--r--biblio/bibtex/contrib/oxford/lang/english.mbs330
-rw-r--r--biblio/bibtex/contrib/oxford/lang/esperant.mbs292
-rw-r--r--biblio/bibtex/contrib/oxford/lang/finnish.mbs281
-rw-r--r--biblio/bibtex/contrib/oxford/lang/french.mbs292
-rw-r--r--biblio/bibtex/contrib/oxford/lang/german.mbs317
-rw-r--r--biblio/bibtex/contrib/oxford/lang/italian.mbs297
-rw-r--r--biblio/bibtex/contrib/oxford/lang/norsk.mbs299
-rw-r--r--biblio/bibtex/contrib/oxford/lang/spanish.mbs301
-rw-r--r--biblio/bibtex/contrib/oxford/lang/svenska.mbs297
-rw-r--r--biblio/bibtex/contrib/oxford/oxford.sty303
-rw-r--r--biblio/bibtex/contrib/oxford/oxford_en.bst1889
-rw-r--r--biblio/bibtex/contrib/oxford/oxford_in.bst1889
-rw-r--r--biblio/bibtex/contrib/oxford/oxford_se.bst1890
-rw-r--r--biblio/bibtex/contrib/perception/README4
-rw-r--r--biblio/bibtex/contrib/perception/perception.bst1584
-rw-r--r--biblio/bibtex/contrib/persian-bib/MyReferences.bib147
-rw-r--r--biblio/bibtex/contrib/persian-bib/Persian-bib-userguide.pdfbin0 -> 174160 bytes
-rw-r--r--biblio/bibtex/contrib/persian-bib/Persian-bib-userguide.tex370
-rw-r--r--biblio/bibtex/contrib/persian-bib/README58
-rw-r--r--biblio/bibtex/contrib/persian-bib/acm-fa.bst1435
-rw-r--r--biblio/bibtex/contrib/persian-bib/asa-fa.bst1774
-rw-r--r--biblio/bibtex/contrib/persian-bib/bibtex-example.tex30
-rw-r--r--biblio/bibtex/contrib/persian-bib/chicago-fa.bst2223
-rw-r--r--biblio/bibtex/contrib/persian-bib/cp1256fa.csf262
-rw-r--r--biblio/bibtex/contrib/persian-bib/gen_pdf.pl55
-rw-r--r--biblio/bibtex/contrib/persian-bib/ieeetr-fa.bst1257
-rw-r--r--biblio/bibtex/contrib/persian-bib/plain-fa-inLTR-beamer.bst1404
-rw-r--r--biblio/bibtex/contrib/persian-bib/plain-fa-inLTR.bst1401
-rw-r--r--biblio/bibtex/contrib/persian-bib/plain-fa.bst1390
-rw-r--r--biblio/bibtex/contrib/persian-bib/plainnat-fa.bst1917
-rw-r--r--biblio/bibtex/contrib/persian-bib/unsrt-fa.bst1225
-rw-r--r--biblio/bibtex/contrib/phy-bstyles/README46
-rw-r--r--biblio/bibtex/contrib/phy-bstyles/aip.bst1037
-rw-r--r--biblio/bibtex/contrib/phy-bstyles/aip.sty234
-rw-r--r--biblio/bibtex/contrib/phy-bstyles/cpc.bst1036
-rw-r--r--biblio/bibtex/contrib/phy-bstyles/cpp.el199
-rw-r--r--biblio/bibtex/contrib/phy-bstyles/iaea.bst1040
-rw-r--r--biblio/bibtex/contrib/phy-bstyles/jcp.bst1040
-rw-r--r--biblio/bibtex/contrib/phy-bstyles/nf.bst1035
-rw-r--r--biblio/bibtex/contrib/phy-bstyles/nf.sty166
-rw-r--r--biblio/bibtex/contrib/phy-bstyles/nflet.bst1033
-rw-r--r--biblio/bibtex/contrib/phy-bstyles/pf.bst1028
-rw-r--r--biblio/bibtex/contrib/phy-bstyles/physics.btx3569
-rw-r--r--biblio/bibtex/contrib/phy-bstyles/physjabb.bib66
-rw-r--r--biblio/bibtex/contrib/phy-bstyles/physjabb.btx71
-rw-r--r--biblio/bibtex/contrib/phy-bstyles/physjful.bib67
-rw-r--r--biblio/bibtex/contrib/phy-bstyles/physjful.btx73
-rw-r--r--biblio/bibtex/contrib/phy-bstyles/ppcf.bst1123
-rw-r--r--biblio/bibtex/contrib/phy-bstyles/report.bst1032
-rw-r--r--biblio/bibtex/contrib/phy-bstyles/rmp.bst1312
-rw-r--r--biblio/bibtex/contrib/sort-by-letters/README62
-rw-r--r--biblio/bibtex/contrib/sort-by-letters/abbrv-letters.bst1217
-rw-r--r--biblio/bibtex/contrib/sort-by-letters/alpha-letters.bst1377
-rw-r--r--biblio/bibtex/contrib/sort-by-letters/apalike-letters.bst1213
-rw-r--r--biblio/bibtex/contrib/sort-by-letters/frplainnat-letters.bst1448
-rw-r--r--biblio/bibtex/contrib/sort-by-letters/plain-letters.bst1217
-rw-r--r--biblio/bibtex/contrib/sort-by-letters/plainnat-letters.bst1529
-rw-r--r--biblio/bibtex/contrib/sort-by-letters/siam-letters.bst1154
-rw-r--r--biblio/bibtex/contrib/spain/README5
-rw-r--r--biblio/bibtex/contrib/spain/spain.bst1
-rw-r--r--biblio/bibtex/contrib/spain/spain.dbj1
-rw-r--r--biblio/bibtex/contrib/swebib/README4
-rw-r--r--biblio/bibtex/contrib/swebib/sweabbrv.bst1097
-rw-r--r--biblio/bibtex/contrib/swebib/swealpha.bst1257
-rw-r--r--biblio/bibtex/contrib/swebib/sweplain.bst1097
-rw-r--r--biblio/bibtex/contrib/swebib/sweplnat.bst1336
-rw-r--r--biblio/bibtex/contrib/swebib/sweunsrt.bst952
-rw-r--r--biblio/bibtex/contrib/test/test-aaai-named.ltx28
-rw-r--r--biblio/bibtex/contrib/test/test-abbrv.ltx28
-rw-r--r--biblio/bibtex/contrib/test/test-abstract.ltx28
-rw-r--r--biblio/bibtex/contrib/test/test-acm.ltx28
-rw-r--r--biblio/bibtex/contrib/test/test-agsm.ltx28
-rw-r--r--biblio/bibtex/contrib/test/test-alpha.ltx28
-rw-r--r--biblio/bibtex/contrib/test/test-amsalpha.ltx28
-rw-r--r--biblio/bibtex/contrib/test/test-amsplain.ltx28
-rw-r--r--biblio/bibtex/contrib/test/test-annotate.ltx28
-rw-r--r--biblio/bibtex/contrib/test/test-annotation.ltx28
-rw-r--r--biblio/bibtex/contrib/test/test-apa.ltx28
-rw-r--r--biblio/bibtex/contrib/test/test-apalike.ltx28
-rw-r--r--biblio/bibtex/contrib/test/test-apalike2.ltx28
-rw-r--r--biblio/bibtex/contrib/test/test-astron.ltx28
-rw-r--r--biblio/bibtex/contrib/test/test-authordate1.ltx28
-rw-r--r--biblio/bibtex/contrib/test/test-authordate2.ltx28
-rw-r--r--biblio/bibtex/contrib/test/test-authordate3.ltx28
-rw-r--r--biblio/bibtex/contrib/test/test-authordate4.ltx28
-rw-r--r--biblio/bibtex/contrib/test/test-bbs.ltx28
-rw-r--r--biblio/bibtex/contrib/test/test-cbe.ltx28
-rw-r--r--biblio/bibtex/contrib/test/test-cell.ltx28
-rw-r--r--biblio/bibtex/contrib/test/test-dcu.ltx28
-rw-r--r--biblio/bibtex/contrib/test/test-humanbio.ltx28
-rw-r--r--biblio/bibtex/contrib/test/test-humannat.ltx28
-rw-r--r--biblio/bibtex/contrib/test/test-ieeetr.ltx28
-rw-r--r--biblio/bibtex/contrib/test/test-is-abbrv.ltx28
-rw-r--r--biblio/bibtex/contrib/test/test-is-alpha.ltx28
-rw-r--r--biblio/bibtex/contrib/test/test-is-plain.ltx28
-rw-r--r--biblio/bibtex/contrib/test/test-is-unsrt.ltx28
-rw-r--r--biblio/bibtex/contrib/test/test-jbact.ltx28
-rw-r--r--biblio/bibtex/contrib/test/test-jmb.ltx28
-rw-r--r--biblio/bibtex/contrib/test/test-jtb.ltx28
-rw-r--r--biblio/bibtex/contrib/test/test-kluwer.ltx28
-rw-r--r--biblio/bibtex/contrib/test/test-named.ltx28
-rw-r--r--biblio/bibtex/contrib/test/test-namunsrt.ltx28
-rw-r--r--biblio/bibtex/contrib/test/test-nar.ltx28
-rw-r--r--biblio/bibtex/contrib/test/test-nature.ltx28
-rw-r--r--biblio/bibtex/contrib/test/test-newapa.ltx28
-rw-r--r--biblio/bibtex/contrib/test/test-phaip.ltx28
-rw-r--r--biblio/bibtex/contrib/test/test-phapalik.ltx28
-rw-r--r--biblio/bibtex/contrib/test/test-phcpc.ltx28
-rw-r--r--biblio/bibtex/contrib/test/test-phiaea.ltx28
-rw-r--r--biblio/bibtex/contrib/test/test-phjcp.ltx28
-rw-r--r--biblio/bibtex/contrib/test/test-phnf.ltx28
-rw-r--r--biblio/bibtex/contrib/test/test-phnflet.ltx28
-rw-r--r--biblio/bibtex/contrib/test/test-phpf.ltx28
-rw-r--r--biblio/bibtex/contrib/test/test-phppcf.ltx28
-rw-r--r--biblio/bibtex/contrib/test/test-phreport.ltx28
-rw-r--r--biblio/bibtex/contrib/test/test-phrmp.ltx28
-rw-r--r--biblio/bibtex/contrib/test/test-plain.ltx28
-rw-r--r--biblio/bibtex/contrib/test/test-plainyr.ltx28
-rw-r--r--biblio/bibtex/contrib/test/test-siam.ltx28
-rw-r--r--biblio/bibtex/contrib/test/test-unsrt.ltx28
-rw-r--r--biblio/bibtex/contrib/test/test.bib839
-rw-r--r--biblio/bibtex/contrib/test/test.ltx28
-rw-r--r--biblio/bibtex/contrib/urlbst/LICENCE-gpl-2.0.txt339
-rw-r--r--biblio/bibtex/contrib/urlbst/LICENCE-lppl.txt416
-rw-r--r--biblio/bibtex/contrib/urlbst/Makefile.in173
-rw-r--r--biblio/bibtex/contrib/urlbst/README53
-rw-r--r--biblio/bibtex/contrib/urlbst/VERSION1
-rw-r--r--biblio/bibtex/contrib/urlbst/abbrvurl.bst1464
-rw-r--r--biblio/bibtex/contrib/urlbst/alphaurl.bst1624
-rw-r--r--biblio/bibtex/contrib/urlbst/configure2985
-rw-r--r--biblio/bibtex/contrib/urlbst/configure.ac89
-rw-r--r--biblio/bibtex/contrib/urlbst/plainurl.bst1464
-rw-r--r--biblio/bibtex/contrib/urlbst/unsrturl.bst1318
-rw-r--r--biblio/bibtex/contrib/urlbst/urlbst889
-rw-r--r--biblio/bibtex/contrib/urlbst/urlbst.bib221
-rw-r--r--biblio/bibtex/contrib/urlbst/urlbst.html462
-rw-r--r--biblio/bibtex/contrib/urlbst/urlbst.in889
-rw-r--r--biblio/bibtex/contrib/urlbst/urlbst.pdfbin0 -> 205285 bytes
-rw-r--r--biblio/bibtex/contrib/urlbst/urlbst.tex398
-rw-r--r--biblio/bibtex/contrib/vak/README25
-rw-r--r--biblio/bibtex/contrib/vak/vak.bst1558
-rw-r--r--biblio/bibtex/contrib/vancouver/FAQ17
-rw-r--r--biblio/bibtex/contrib/vancouver/README41
-rw-r--r--biblio/bibtex/contrib/vancouver/vancouver.bib539
-rw-r--r--biblio/bibtex/contrib/vancouver/vancouver.bst1873
-rw-r--r--biblio/bibtex/contrib/vancouver/vancouver.pdfbin0 -> 87134 bytes
-rw-r--r--biblio/bibtex/contrib/vancouver/vancouver.tex238
-rw-r--r--biblio/bibtex/contrib/zootaxa-bst/CHANGES.md7
-rw-r--r--biblio/bibtex/contrib/zootaxa-bst/LICENSE415
-rw-r--r--biblio/bibtex/contrib/zootaxa-bst/README.md48
-rw-r--r--biblio/bibtex/contrib/zootaxa-bst/example-refs.bib961
-rw-r--r--biblio/bibtex/contrib/zootaxa-bst/example.pdfbin0 -> 114795 bytes
-rw-r--r--biblio/bibtex/contrib/zootaxa-bst/example.tex72
-rw-r--r--biblio/bibtex/contrib/zootaxa-bst/zootaxa.bst1145
824 files changed, 430985 insertions, 0 deletions
diff --git a/biblio/bibtex/contrib/IEEEtran b/biblio/bibtex/contrib/IEEEtran
new file mode 120000
index 0000000000..55908cd614
--- /dev/null
+++ b/biblio/bibtex/contrib/IEEEtran
@@ -0,0 +1 @@
+../../../macros/latex/contrib/IEEEtran/bibtex \ No newline at end of file
diff --git a/biblio/bibtex/contrib/abstyles-babel/README.2 b/biblio/bibtex/contrib/abstyles-babel/README.2
new file mode 100644
index 0000000000..122819ba5e
--- /dev/null
+++ b/biblio/bibtex/contrib/abstyles-babel/README.2
@@ -0,0 +1,17 @@
+
+ March 26, 1996.
+
+These files have been touched for working with Johannes L. Braams'
+babel system.
+
+The original distribution of these files are in
+
+ CTAN:/tex-archive/biblio/bibtex/contrib/abstyles
+
+where CTAN means ftp://ftp.dante.de, ftp://ftp.tex.ac.uk or
+ftp://ftp.shsu.edu
+
+Greetings,
+
+ Tom'as Bautista <bautista@cma.ulpgc.es>
+
diff --git a/biblio/bibtex/contrib/abstyles-babel/aabbrv.bst b/biblio/bibtex/contrib/abstyles-babel/aabbrv.bst
new file mode 100644
index 0000000000..802ec8ba5f
--- /dev/null
+++ b/biblio/bibtex/contrib/abstyles-babel/aabbrv.bst
@@ -0,0 +1,1062 @@
+% BibTeX bibliography style `AABBRV'
+ENTRY
+{ address
+author
+booktitle
+chapter
+edition
+editor
+howpublished
+institution
+journal
+key
+month
+note
+number
+organization
+pages
+publisher
+school
+series
+title
+type
+volume
+year
+}
+{}
+{ label }
+INTEGERS { output.state before.all mid.sentence after.sentence after.block
+continue.sentence }
+FUNCTION {init.state.consts}
+{ #0 'before.all :=
+#1 'mid.sentence :=
+#2 'after.sentence :=
+#3 'after.block :=
+#4 'continue.sentence :=
+}
+STRINGS { s t }
+FUNCTION {output.nonnull}
+{ 's :=
+output.state continue.sentence =
+{ " " * write$ }
+{ output.state mid.sentence =
+{ ", " * write$ }
+{ output.state after.block =
+{ add.period$ write$
+newline$
+"\newblock " write$
+}
+{ output.state before.all =
+'write$
+{ add.period$ " " * write$ }
+if$
+}
+if$
+}
+if$
+continue.sentence 'output.state :=
+}
+if$
+s
+}
+FUNCTION {output}
+{ duplicate$ empty$
+'pop$
+'output.nonnull
+if$
+}
+FUNCTION {output.check}
+{ 't :=
+duplicate$ empty$
+{ pop$ "empty " t * " in " * cite$ * warning$ }
+'output.nonnull
+if$
+}
+FUNCTION {output.bibitem}
+{ newline$
+"\bibitem{" write$
+cite$ write$
+"}" write$
+newline$
+""
+before.all 'output.state :=
+}
+FUNCTION {fin.entry}
+{ add.period$
+write$
+newline$
+}
+FUNCTION {new.block}
+{ output.state before.all =
+'skip$
+{ after.block 'output.state := }
+if$
+}
+FUNCTION {new.sentence}
+{ output.state after.block =
+'skip$
+{ output.state before.all =
+'skip$
+{ after.sentence 'output.state := }
+if$
+}
+if$
+}
+FUNCTION {new.clause}
+{ output.state after.sentence =
+'skip$
+{ output.state after.block =
+'skip$
+{ output.state before.all =
+'skip$
+{ mid.sentence 'output.state := }
+if$
+}
+if$
+}
+if$
+}
+FUNCTION {not}
+{ { #0 }
+{ #1 }
+if$
+}
+FUNCTION {and}
+{ 'skip$
+{ pop$ #0 }
+if$
+}
+FUNCTION {or}
+{ { pop$ #1 }
+'skip$
+if$
+}
+FUNCTION {new.block.checka}
+{ empty$
+'skip$
+'new.block
+if$
+}
+FUNCTION {new.block.checkb}
+{ empty$
+swap$ empty$
+and
+'skip$
+'new.block
+if$
+}
+FUNCTION {new.sentence.checka}
+{ empty$
+'skip$
+'new.sentence
+if$
+}
+FUNCTION {new.sentence.checkb}
+{ empty$
+swap$ empty$
+and
+'skip$
+'new.sentence
+if$
+}
+FUNCTION {new.clause.checka}
+{ empty$
+'skip$
+'new.clause
+if$
+}
+FUNCTION {new.clause.checkb}
+{ empty$
+swap$ empty$
+and
+'skip$
+'new.clause
+if$
+}
+FUNCTION {field.or.null}
+{ duplicate$ empty$
+{ pop$ "" }
+'skip$
+if$
+}
+FUNCTION {emphasize}
+{ duplicate$ empty$
+{ pop$ "" }
+{ "\abtype{2}{" swap$ * "}" * }
+if$
+}
+FUNCTION {capitalize}
+{ duplicate$ empty$
+{ pop$ "" }
+{ "\abtype{0}{" swap$ * "}" * }
+if$
+}
+FUNCTION {boldface}
+{ duplicate$ empty$
+{ pop$ "" }
+{ "\abtype{3}{" swap$ * "}" * }
+if$
+}
+FUNCTION {quote}
+{ duplicate$ empty$
+{ pop$ "" }
+{ "\abtype{1}{" swap$ * "}" * }
+if$
+}
+FUNCTION {parentheses}
+{ duplicate$ empty$
+{ pop$ "" }
+{ "\abtype{5}{" swap$ * "}" * }
+if$
+}
+INTEGERS { nameptr namesleft numnames }
+FUNCTION {format.names}
+{ 's :=
+#1 'nameptr :=
+s num.names$ 'numnames :=
+numnames 'namesleft :=
+{ namesleft #0 > }
+{ s nameptr "{f.~}{vv~}{ll}{, jj}" format.name$ 't :=
+nameptr #1 >
+{ namesleft #1 >
+{ ", " * t * }
+{ numnames #2 >
+{ "\abphrase{1}" * }
+'skip$
+if$
+t "others" =
+{ "\abphrase{2}" * }
+{ "\abphrase{0}" * t * }
+if$
+}
+if$
+}
+'t
+if$
+nameptr #1 + 'nameptr :=
+namesleft #1 - 'namesleft :=
+}
+while$
+}
+FUNCTION {format.authors}
+{ author empty$
+{ "" }
+{ author format.names capitalize }
+if$
+}
+FUNCTION {format.editors}
+{ editor empty$
+{ "" }
+{ editor format.names capitalize
+editor num.names$ #1 >
+{ "\abphrase{3}" * }
+{ "\abphrase{4}" * }
+if$
+}
+if$
+}
+FUNCTION {format.title}
+{ title empty$
+{ "" }
+{ title "t" change.case$ }
+if$
+}
+FUNCTION {n.dashify}
+{ 't :=
+""
+{ t empty$ not }
+{ t #1 #1 substring$ "-" =
+{ t #1 #2 substring$ "--" = not
+{ "--" *
+t #2 global.max$ substring$ 't :=
+}
+{ { t #1 #1 substring$ "-" = }
+{ "-" *
+t #2 global.max$ substring$ 't :=
+}
+while$
+}
+if$
+}
+{ t #1 #1 substring$ *
+t #2 global.max$ substring$ 't :=
+}
+if$
+}
+while$
+}
+FUNCTION {format.date}
+{ year empty$
+{ month empty$
+{ "" }
+{ "there's a month but no year in " cite$ * warning$
+month parentheses
+}
+if$
+}
+{ month empty$
+{ year parentheses }
+{ month " " * year * parentheses }
+if$
+}
+if$
+}
+FUNCTION {format.btitle}
+{ title quote
+}
+FUNCTION {tie.or.space.connect}
+{ duplicate$ text.length$ #3 <
+{ "~" }
+{ " " }
+if$
+swap$ * *
+}
+FUNCTION {either.or.check}
+{ empty$
+'pop$
+{ "can't use both " swap$ * " fields in " * cite$ * warning$ }
+if$
+}
+FUNCTION {format.bvolume}
+{ volume empty$
+{ "" }
+{ "\abphrase{8}" volume tie.or.space.connect
+series empty$
+'skip$
+{ "\abphrase{5}" * series quote * }
+if$
+"volume and number" number either.or.check
+}
+if$
+}
+FUNCTION {format.number.series}
+{ volume empty$
+{ number empty$
+{ series field.or.null }
+{ output.state mid.sentence = output.state continue.sentence = or
+{ "\abphrase{10}" }
+{ "\abphrase{11}" }
+if$
+number tie.or.space.connect
+series empty$
+{ "there's a number but no series in " cite$ * warning$ }
+{ "\abphrase{6}" * series * }
+if$
+}
+if$
+}
+{ "" }
+if$
+}
+FUNCTION {format.edition}
+{ edition empty$
+{ "" }
+{ output.state mid.sentence = output.state continue.sentence = or
+{ edition "l" change.case$ "\abphrase{12}" * }
+{ edition "t" change.case$ "\abphrase{12}" * }
+if$
+}
+if$
+}
+INTEGERS { multiresult }
+FUNCTION {multi.page.check}
+{ 't :=
+#0 'multiresult :=
+{ multiresult not
+t empty$ not
+and
+}
+{ t #1 #1 substring$
+duplicate$ "-" =
+swap$ duplicate$ "," =
+swap$ "+" =
+or or
+{ #1 'multiresult := }
+{ t #2 global.max$ substring$ 't := }
+if$
+}
+while$
+multiresult
+}
+FUNCTION {format.pages}
+{ pages empty$
+{ "" }
+{ pages multi.page.check
+{ "\abphrase{13}" pages n.dashify tie.or.space.connect }
+{ "\abphrase{14}" pages tie.or.space.connect }
+if$
+}
+if$
+}
+FUNCTION {format.vol.num.pages}
+{ volume field.or.null boldface
+number empty$
+'skip$
+{ "\abtype{4}{" number * "}" * *
+volume empty$
+{ "there's a number but no volume in " cite$ * warning$ }
+'skip$
+if$
+}
+if$
+pages empty$
+'skip$
+{ duplicate$ empty$
+{ pop$ format.pages }
+{ ", " * pages n.dashify * }
+if$
+}
+if$
+}
+FUNCTION {format.chapter.pages}
+{ chapter empty$
+'format.pages
+{ type empty$
+{ "\abphrase{15}" }
+{ type "l" change.case$ }
+if$
+chapter tie.or.space.connect
+pages empty$
+'skip$
+{ ", " * format.pages * }
+if$
+}
+if$
+}
+FUNCTION {format.in.ed.booktitle}
+{ booktitle empty$
+{ "" }
+{ editor empty$
+{ "\abphrase{7}" booktitle quote * }
+{ "\abphrase{7}" format.editors * ", " * booktitle quote * }
+if$
+}
+if$
+}
+FUNCTION {empty.misc.check}
+{ author empty$ title empty$ howpublished empty$
+month empty$ year empty$ note empty$
+and and and and and
+key empty$ not and
+{ "all relevant fields are empty in " cite$ * warning$ }
+'skip$
+if$
+}
+FUNCTION {format.thesis.type}
+{ type empty$
+'skip$
+{ pop$
+type "t" change.case$
+}
+if$
+}
+FUNCTION {format.tr.number}
+{ type empty$
+{ "\abphrase{16}" }
+'type
+if$
+number empty$
+{ "t" change.case$ }
+{ number tie.or.space.connect }
+if$
+}
+FUNCTION {format.article.crossref}
+{ key empty$
+{ journal empty$
+{ "need key or journal for " cite$ * " to crossref " * crossref *
+warning$
+""
+}
+{ "\abphrase{7}" journal emphasize * }
+if$
+}
+{ "\abphrase{7}" key * }
+if$
+" \cite{" * crossref * "}" *
+}
+FUNCTION {format.crossref.editor}
+{ editor #1 "{vv~}{ll}" format.name$
+editor num.names$ duplicate$
+#2 >
+{ pop$ "\abphrase{2}" * }
+{ #2 <
+'skip$
+{ editor #2 "{ff }{vv }{ll}{ jj}" format.name$ "others" =
+{ "\abphrase{2}" * }
+{ "\abphrase{0}" * editor #2 "{vv~}{ll}" format.name$ * }
+if$
+}
+if$
+}
+if$
+}
+FUNCTION {format.book.crossref}
+{ volume empty$
+{ "empty volume in " cite$ * "'s crossref of " * crossref * warning$
+"\abphrase{7}"
+}
+{ "\abphrase{9}" volume tie.or.space.connect
+"\abphrase{5}" *
+}
+if$
+editor empty$
+editor field.or.null author field.or.null =
+or
+{ key empty$
+{ series empty$
+{ "need editor, key, or series for " cite$ * " to crossref " *
+crossref * warning$
+"" *
+}
+{ series quote * }
+if$
+}
+{ key * }
+if$
+}
+{ format.crossref.editor * }
+if$
+" \cite{" * crossref * "}" *
+}
+FUNCTION {format.incoll.inproc.crossref}
+{ editor empty$
+editor field.or.null author field.or.null =
+or
+{ key empty$
+{ booktitle empty$
+{ "need editor, key, or booktitle for " cite$ * " to crossref " *
+crossref * warning$
+""
+}
+{ "\abphrase{7}" booktitle quote * }
+if$
+}
+{ "\abphrase{7}" key * }
+if$
+}
+{ "\abphrase{7}" format.crossref.editor * }
+if$
+" \cite{" * crossref * "}" *
+}
+FUNCTION {article}
+{ output.bibitem
+format.authors "author" output.check
+new.block
+format.title "title" output.check
+new.block
+crossref missing$
+{ journal emphasize "journal" output.check
+format.vol.num.pages output
+format.date "year" output.check
+}
+{ format.article.crossref output.nonnull
+new.clause
+format.pages output
+}
+if$
+new.block
+note output
+fin.entry
+}
+FUNCTION {book}
+{ output.bibitem
+author empty$
+{ format.editors "author and editor" output.check }
+{ format.authors output.nonnull
+crossref missing$
+{ "author and editor" editor either.or.check }
+'skip$
+if$
+}
+if$
+new.block
+format.btitle "title" output.check
+crossref missing$
+{ new.clause
+format.bvolume output
+new.block
+format.number.series output
+new.sentence
+publisher "publisher" output.check
+address new.clause.checka
+address output
+}
+{ new.block
+format.book.crossref output.nonnull
+}
+if$
+edition new.clause.checka
+format.edition output
+format.date "year" output.check
+new.block
+note output
+fin.entry
+}
+FUNCTION {booklet}
+{ output.bibitem
+format.authors output
+new.block
+format.title "title" output.check
+howpublished address new.block.checkb
+howpublished output
+address new.clause.checka
+address output
+format.date output
+new.block
+note output
+fin.entry
+}
+FUNCTION {inbook}
+{ output.bibitem
+author empty$
+{ format.editors "author and editor" output.check }
+{ format.authors output.nonnull
+crossref missing$
+{ "author and editor" editor either.or.check }
+'skip$
+if$
+}
+if$
+new.block
+format.btitle "title" output.check
+new.clause
+crossref missing$
+{ format.bvolume output
+new.clause
+format.chapter.pages "chapter and pages" output.check
+new.block
+format.number.series output
+new.sentence
+publisher "publisher" output.check
+address new.clause.checka
+address output
+}
+{ format.chapter.pages "chapter and pages" output.check
+new.block
+format.book.crossref output.nonnull
+}
+if$
+edition new.clause.checka
+format.edition output
+format.date "year" output.check
+new.block
+note output
+fin.entry
+}
+FUNCTION {incollection}
+{ output.bibitem
+format.authors "author" output.check
+new.block
+format.title "title" output.check
+new.block
+crossref missing$
+{ format.in.ed.booktitle "booktitle" output.check
+new.clause
+format.bvolume output
+new.clause
+format.number.series output
+new.clause
+format.chapter.pages output
+new.sentence
+publisher "publisher" output.check
+address new.clause.checka
+address output
+edition new.clause.checka
+format.edition output
+format.date "year" output.check
+}
+{ format.incoll.inproc.crossref output.nonnull
+new.clause
+format.chapter.pages output
+}
+if$
+new.block
+note output
+fin.entry
+}
+FUNCTION {inproceedings}
+{ output.bibitem
+format.authors "author" output.check
+new.block
+format.title "title" output.check
+new.block
+crossref missing$
+{ format.in.ed.booktitle "booktitle" output.check
+volume new.clause.checka
+format.bvolume output
+number series new.clause.checkb
+format.number.series output
+pages new.clause.checka
+format.pages output
+address empty$
+{ organization publisher new.sentence.checkb
+organization output
+publisher new.clause.checka
+publisher output
+format.date "year" output.check
+}
+{ new.clause
+address output.nonnull
+format.date "year" output.check
+new.sentence
+organization output
+new.clause
+publisher output
+}
+if$
+}
+{ format.incoll.inproc.crossref output.nonnull
+new.clause
+format.pages output
+}
+if$
+new.block
+note output
+fin.entry
+}
+FUNCTION {conference} { inproceedings }
+FUNCTION {manual}
+{ output.bibitem
+author empty$
+{ organization empty$
+'skip$
+{ organization output.nonnull
+new.clause
+address output
+}
+if$
+}
+{ format.authors output.nonnull }
+if$
+new.block
+format.btitle "title" output.check
+author empty$
+{ organization empty$
+{ address new.block.checka
+address output
+}
+'skip$
+if$
+}
+{ organization address new.block.checkb
+organization output
+address new.clause.checka
+address output
+}
+if$
+edition new.clause.checka
+format.edition output
+format.date output
+new.block
+note output
+fin.entry
+}
+FUNCTION {mastersthesis}
+{ output.bibitem
+format.authors "author" output.check
+new.block
+format.title "title" output.check
+new.block
+"\abphrase{17}" format.thesis.type output.nonnull
+new.clause
+school "school" output.check
+address new.clause.checka
+address output
+format.date "year" output.check
+new.block
+note output
+fin.entry
+}
+FUNCTION {misc}
+{ output.bibitem
+format.authors output
+title howpublished new.block.checkb
+format.title output
+howpublished new.block.checka
+howpublished output
+format.date output
+new.block
+note output
+fin.entry
+empty.misc.check
+}
+FUNCTION {phdthesis}
+{ output.bibitem
+format.authors "author" output.check
+new.block
+format.btitle "title" output.check
+new.block
+"\abphrase{18}" format.thesis.type output.nonnull
+new.clause
+school "school" output.check
+address new.clause.checka
+address output
+format.date "year" output.check
+new.block
+note output
+fin.entry
+}
+FUNCTION {proceedings}
+{ output.bibitem
+editor empty$
+{ organization output }
+{ format.editors output.nonnull }
+if$
+new.block
+format.btitle "title" output.check
+volume new.clause.checka
+format.bvolume output
+number series new.clause.checkb
+format.number.series output
+address empty$
+{ editor empty$
+{ publisher new.sentence.checka }
+{ organization publisher new.sentence.checkb
+organization output
+publisher new.clause.checka
+}
+if$
+publisher output
+format.date "year" output.check
+}
+{ new.clause
+address output.nonnull
+format.date "year" output.check
+new.sentence
+editor empty$
+'skip$
+{ organization output
+new.clause
+}
+if$
+publisher output
+}
+if$
+new.block
+note output
+fin.entry
+}
+FUNCTION {techreport}
+{ output.bibitem
+format.authors "author" output.check
+new.block
+format.title "title" output.check
+new.block
+format.tr.number output.nonnull
+new.clause
+institution "institution" output.check
+address new.clause.checka
+address output
+format.date "year" output.check
+new.block
+note output
+fin.entry
+}
+FUNCTION {unpublished}
+{ output.bibitem
+format.authors "author" output.check
+new.block
+format.title "title" output.check
+new.block
+note "note" output.check
+format.date output
+fin.entry
+}
+FUNCTION {default.type} { misc }
+MACRO {jan} {"\abmonth{1}"}
+MACRO {feb} {"\abmonth{2}"}
+MACRO {mar} {"\abmonth{3}"}
+MACRO {apr} {"\abmonth{4}"}
+MACRO {may} {"\abmonth{5}"}
+MACRO {jun} {"\abmonth{6}"}
+MACRO {jul} {"\abmonth{7}"}
+MACRO {aug} {"\abmonth{8}"}
+MACRO {sep} {"\abmonth{9}"}
+MACRO {oct} {"\abmonth{10}"}
+MACRO {nov} {"\abmonth{11}"}
+MACRO {dec} {"\abmonth{12}"}
+MACRO {first} {"\abedition{1}"}
+MACRO {second} {"\abedition{2}"}
+MACRO {third} {"\abedition{3}"}
+MACRO {fourth} {"\abedition{4}"}
+MACRO {fifth} {"\abedition{5}"}
+MACRO {sixth} {"\abedition{6}"}
+MACRO {seventh} {"\abedition{7}"}
+MACRO {eighth} {"\abedition{8}"}
+MACRO {ninth} {"\abedition{9}"}
+MACRO {tenth} {"\abedition{10}"}
+MACRO {section} {"\abchapter{0}"}
+MACRO {paragraph} {"\abchapter{1}"}
+MACRO {appendix} {"\abchapter{2}"}
+MACRO {part} {"\abchapter{3}"}
+READ
+FUNCTION {sortify}
+{ purify$
+"l" change.case$
+}
+INTEGERS { len }
+FUNCTION {chop.word}
+{ 's :=
+'len :=
+s #1 len substring$ =
+{ s len #1 + global.max$ substring$ }
+'s
+if$
+}
+FUNCTION {sort.format.names}
+{ 's :=
+#1 'nameptr :=
+""
+s num.names$ 'numnames :=
+numnames 'namesleft :=
+{ namesleft #0 > }
+{ nameptr #1 >
+{ " " * }
+'skip$
+if$
+s nameptr "{vv{ } }{ll{ }}{ f{ }}{ jj{ }}" format.name$ 't :=
+nameptr numnames = t "others" = and
+{ "et al" * }
+{ t sortify * }
+if$
+nameptr #1 + 'nameptr :=
+namesleft #1 - 'namesleft :=
+}
+while$
+}
+FUNCTION {sort.format.title}
+{ 't :=
+"A " #2
+"An " #3
+"The " #4 t chop.word
+chop.word
+chop.word
+sortify
+#1 global.max$ substring$
+}
+FUNCTION {author.sort}
+{ author empty$
+{ key empty$
+{ "to sort, need author or key in " cite$ * warning$
+""
+}
+{ key sortify }
+if$
+}
+{ author sort.format.names }
+if$
+}
+FUNCTION {author.editor.sort}
+{ author empty$
+{ editor empty$
+{ key empty$
+{ "to sort, need author, editor, or key in " cite$ * warning$
+""
+}
+{ key sortify }
+if$
+}
+{ editor sort.format.names }
+if$
+}
+{ author sort.format.names }
+if$
+}
+FUNCTION {author.organization.sort}
+{ author empty$
+{ organization empty$
+{ key empty$
+{ "to sort, need author, organization, or key in " cite$ * warning$
+""
+}
+{ key sortify }
+if$
+}
+{ "The " #4 organization chop.word sortify }
+if$
+}
+{ author sort.format.names }
+if$
+}
+FUNCTION {editor.organization.sort}
+{ editor empty$
+{ organization empty$
+{ key empty$
+{ "to sort, need editor, organization, or key in " cite$ * warning$
+""
+}
+{ key sortify }
+if$
+}
+{ "The " #4 organization chop.word sortify }
+if$
+}
+{ editor sort.format.names }
+if$
+}
+FUNCTION {presort}
+{ type$ "book" =
+type$ "inbook" =
+or
+'author.editor.sort
+{ type$ "proceedings" =
+'editor.organization.sort
+{ type$ "manual" =
+'author.organization.sort
+'author.sort
+if$
+}
+if$
+}
+if$
+" "
+*
+year field.or.null sortify
+*
+" "
+*
+title field.or.null
+sort.format.title
+*
+#1 entry.max$ substring$
+'sort.key$ :=
+}
+ITERATE {presort}
+SORT
+STRINGS { longest.label }
+INTEGERS { number.label longest.label.width }
+FUNCTION {initialize.longest.label}
+{ "" 'longest.label :=
+#1 'number.label :=
+#0 'longest.label.width :=
+}
+FUNCTION {longest.label.pass}
+{ number.label int.to.str$ 'label :=
+number.label #1 + 'number.label :=
+label width$ longest.label.width >
+{ label 'longest.label :=
+label width$ 'longest.label.width :=
+}
+'skip$
+if$
+}
+EXECUTE {initialize.longest.label}
+ITERATE {longest.label.pass}
+FUNCTION {begin.bib}
+{
+"\newif\ifabfull\abfullfalse" write$ newline$
+"\input apreambl" write$ newline$
+preamble$ empty$
+'skip$
+{ preamble$ write$ newline$ }
+if$
+"\begin{thebibliography}{" longest.label * "}" * write$ newline$
+}
+EXECUTE {begin.bib}
+EXECUTE {init.state.consts}
+ITERATE {call.type$}
+FUNCTION {end.bib}
+{ newline$
+"\end{thebibliography}" write$ newline$
+}
+EXECUTE {end.bib}
diff --git a/biblio/bibtex/contrib/abstyles-babel/aalpha.bst b/biblio/bibtex/contrib/abstyles-babel/aalpha.bst
new file mode 100644
index 0000000000..c5442664c6
--- /dev/null
+++ b/biblio/bibtex/contrib/abstyles-babel/aalpha.bst
@@ -0,0 +1,1211 @@
+% BibTeX bibliography style `AALPHA'
+ENTRY
+{ address
+author
+booktitle
+chapter
+edition
+editor
+howpublished
+institution
+journal
+key
+month
+note
+number
+organization
+pages
+publisher
+school
+series
+title
+type
+volume
+year
+}
+{}
+{ label extra.label sort.label }
+INTEGERS { output.state before.all mid.sentence after.sentence after.block
+continue.sentence }
+FUNCTION {init.state.consts}
+{ #0 'before.all :=
+#1 'mid.sentence :=
+#2 'after.sentence :=
+#3 'after.block :=
+#4 'continue.sentence :=
+}
+STRINGS { s t }
+FUNCTION {output.nonnull}
+{ 's :=
+output.state continue.sentence =
+{ " " * write$ }
+{ output.state mid.sentence =
+{ ", " * write$ }
+{ output.state after.block =
+{ add.period$ write$
+newline$
+"\newblock " write$
+}
+{ output.state before.all =
+'write$
+{ add.period$ " " * write$ }
+if$
+}
+if$
+}
+if$
+continue.sentence 'output.state :=
+}
+if$
+s
+}
+FUNCTION {output}
+{ duplicate$ empty$
+'pop$
+'output.nonnull
+if$
+}
+FUNCTION {output.check}
+{ 't :=
+duplicate$ empty$
+{ pop$ "empty " t * " in " * cite$ * warning$ }
+'output.nonnull
+if$
+}
+FUNCTION {output.bibitem}
+{ newline$
+"\bibitem[" write$
+label write$
+"]{" write$
+cite$ write$
+"}" write$
+newline$
+""
+before.all 'output.state :=
+}
+FUNCTION {fin.entry}
+{ add.period$
+write$
+newline$
+}
+FUNCTION {new.block}
+{ output.state before.all =
+'skip$
+{ after.block 'output.state := }
+if$
+}
+FUNCTION {new.sentence}
+{ output.state after.block =
+'skip$
+{ output.state before.all =
+'skip$
+{ after.sentence 'output.state := }
+if$
+}
+if$
+}
+FUNCTION {new.clause}
+{ output.state after.sentence =
+'skip$
+{ output.state after.block =
+'skip$
+{ output.state before.all =
+'skip$
+{ mid.sentence 'output.state := }
+if$
+}
+if$
+}
+if$
+}
+FUNCTION {not}
+{ { #0 }
+{ #1 }
+if$
+}
+FUNCTION {and}
+{ 'skip$
+{ pop$ #0 }
+if$
+}
+FUNCTION {or}
+{ { pop$ #1 }
+'skip$
+if$
+}
+FUNCTION {new.block.checka}
+{ empty$
+'skip$
+'new.block
+if$
+}
+FUNCTION {new.block.checkb}
+{ empty$
+swap$ empty$
+and
+'skip$
+'new.block
+if$
+}
+FUNCTION {new.sentence.checka}
+{ empty$
+'skip$
+'new.sentence
+if$
+}
+FUNCTION {new.sentence.checkb}
+{ empty$
+swap$ empty$
+and
+'skip$
+'new.sentence
+if$
+}
+FUNCTION {new.clause.checka}
+{ empty$
+'skip$
+'new.clause
+if$
+}
+FUNCTION {new.clause.checkb}
+{ empty$
+swap$ empty$
+and
+'skip$
+'new.clause
+if$
+}
+FUNCTION {field.or.null}
+{ duplicate$ empty$
+{ pop$ "" }
+'skip$
+if$
+}
+FUNCTION {emphasize}
+{ duplicate$ empty$
+{ pop$ "" }
+{ "\abtype{2}{" swap$ * "}" * }
+if$
+}
+FUNCTION {capitalize}
+{ duplicate$ empty$
+{ pop$ "" }
+{ "\abtype{0}{" swap$ * "}" * }
+if$
+}
+FUNCTION {boldface}
+{ duplicate$ empty$
+{ pop$ "" }
+{ "\abtype{3}{" swap$ * "}" * }
+if$
+}
+FUNCTION {quote}
+{ duplicate$ empty$
+{ pop$ "" }
+{ "\abtype{1}{" swap$ * "}" * }
+if$
+}
+FUNCTION {parentheses}
+{ duplicate$ empty$
+{ pop$ "" }
+{ "\abtype{5}{" swap$ * "}" * }
+if$
+}
+INTEGERS { nameptr namesleft numnames }
+FUNCTION {format.names}
+{ 's :=
+#1 'nameptr :=
+s num.names$ 'numnames :=
+numnames 'namesleft :=
+{ namesleft #0 > }
+{ s nameptr "{ff~}{vv~}{ll}{, jj}" format.name$ 't :=
+nameptr #1 >
+{ namesleft #1 >
+{ ", " * t * }
+{ numnames #2 >
+{ "\abphrase{1}" * }
+'skip$
+if$
+t "others" =
+{ "\abphrase{2}" * }
+{ "\abphrase{0}" * t * }
+if$
+}
+if$
+}
+'t
+if$
+nameptr #1 + 'nameptr :=
+namesleft #1 - 'namesleft :=
+}
+while$
+}
+FUNCTION {format.authors}
+{ author empty$
+{ "" }
+{ author format.names capitalize }
+if$
+}
+FUNCTION {format.editors}
+{ editor empty$
+{ "" }
+{ editor format.names capitalize
+editor num.names$ #1 >
+{ "\abphrase{3}" * }
+{ "\abphrase{4}" * }
+if$
+}
+if$
+}
+FUNCTION {format.title}
+{ title empty$
+{ "" }
+{ title "t" change.case$ }
+if$
+}
+FUNCTION {n.dashify}
+{ 't :=
+""
+{ t empty$ not }
+{ t #1 #1 substring$ "-" =
+{ t #1 #2 substring$ "--" = not
+{ "--" *
+t #2 global.max$ substring$ 't :=
+}
+{ { t #1 #1 substring$ "-" = }
+{ "-" *
+t #2 global.max$ substring$ 't :=
+}
+while$
+}
+if$
+}
+{ t #1 #1 substring$ *
+t #2 global.max$ substring$ 't :=
+}
+if$
+}
+while$
+}
+FUNCTION {format.date}
+{ year empty$
+{ month empty$
+{ "" }
+{ "there's a month but no year in " cite$ * warning$
+month parentheses
+}
+if$
+}
+{ month empty$
+{ year parentheses }
+{ month " " * year * parentheses }
+if$
+}
+if$
+}
+FUNCTION {format.btitle}
+{ title quote
+}
+FUNCTION {tie.or.space.connect}
+{ duplicate$ text.length$ #3 <
+{ "~" }
+{ " " }
+if$
+swap$ * *
+}
+FUNCTION {either.or.check}
+{ empty$
+'pop$
+{ "can't use both " swap$ * " fields in " * cite$ * warning$ }
+if$
+}
+FUNCTION {format.bvolume}
+{ volume empty$
+{ "" }
+{ "\abphrase{8}" volume tie.or.space.connect
+series empty$
+'skip$
+{ "\abphrase{5}" * series quote * }
+if$
+"volume and number" number either.or.check
+}
+if$
+}
+FUNCTION {format.number.series}
+{ volume empty$
+{ number empty$
+{ series field.or.null }
+{ output.state mid.sentence = output.state continue.sentence = or
+{ "\abphrase{10}" }
+{ "\abphrase{11}" }
+if$
+number tie.or.space.connect
+series empty$
+{ "there's a number but no series in " cite$ * warning$ }
+{ "\abphrase{6}" * series * }
+if$
+}
+if$
+}
+{ "" }
+if$
+}
+FUNCTION {format.edition}
+{ edition empty$
+{ "" }
+{ output.state mid.sentence = output.state continue.sentence = or
+{ edition "l" change.case$ "\abphrase{12}" * }
+{ edition "t" change.case$ "\abphrase{12}" * }
+if$
+}
+if$
+}
+INTEGERS { multiresult }
+FUNCTION {multi.page.check}
+{ 't :=
+#0 'multiresult :=
+{ multiresult not
+t empty$ not
+and
+}
+{ t #1 #1 substring$
+duplicate$ "-" =
+swap$ duplicate$ "," =
+swap$ "+" =
+or or
+{ #1 'multiresult := }
+{ t #2 global.max$ substring$ 't := }
+if$
+}
+while$
+multiresult
+}
+FUNCTION {format.pages}
+{ pages empty$
+{ "" }
+{ pages multi.page.check
+{ "\abphrase{13}" pages n.dashify tie.or.space.connect }
+{ "\abphrase{14}" pages tie.or.space.connect }
+if$
+}
+if$
+}
+FUNCTION {format.vol.num.pages}
+{ volume field.or.null boldface
+number empty$
+'skip$
+{ "\abtype{4}{" number * "}" * *
+volume empty$
+{ "there's a number but no volume in " cite$ * warning$ }
+'skip$
+if$
+}
+if$
+pages empty$
+'skip$
+{ duplicate$ empty$
+{ pop$ format.pages }
+{ ", " * pages n.dashify * }
+if$
+}
+if$
+}
+FUNCTION {format.chapter.pages}
+{ chapter empty$
+'format.pages
+{ type empty$
+{ "\abphrase{15}" }
+{ type "l" change.case$ }
+if$
+chapter tie.or.space.connect
+pages empty$
+'skip$
+{ ", " * format.pages * }
+if$
+}
+if$
+}
+FUNCTION {format.in.ed.booktitle}
+{ booktitle empty$
+{ "" }
+{ editor empty$
+{ "\abphrase{7}" booktitle quote * }
+{ "\abphrase{7}" format.editors * ", " * booktitle quote * }
+if$
+}
+if$
+}
+FUNCTION {empty.misc.check}
+{ author empty$ title empty$ howpublished empty$
+month empty$ year empty$ note empty$
+and and and and and
+key empty$ not and
+{ "all relevant fields are empty in " cite$ * warning$ }
+'skip$
+if$
+}
+FUNCTION {format.thesis.type}
+{ type empty$
+'skip$
+{ pop$
+type "t" change.case$
+}
+if$
+}
+FUNCTION {format.tr.number}
+{ type empty$
+{ "\abphrase{16}" }
+'type
+if$
+number empty$
+{ "t" change.case$ }
+{ number tie.or.space.connect }
+if$
+}
+FUNCTION {format.article.crossref}
+{ key empty$
+{ journal empty$
+{ "need key or journal for " cite$ * " to crossref " * crossref *
+warning$
+""
+}
+{ "\abphrase{7}" journal emphasize * }
+if$
+}
+{ "\abphrase{7}" key * }
+if$
+" \cite{" * crossref * "}" *
+}
+FUNCTION {format.crossref.editor}
+{ editor #1 "{vv~}{ll}" format.name$
+editor num.names$ duplicate$
+#2 >
+{ pop$ "\abphrase{2}" * }
+{ #2 <
+'skip$
+{ editor #2 "{ff }{vv }{ll}{ jj}" format.name$ "others" =
+{ "\abphrase{2}" * }
+{ "\abphrase{0}" * editor #2 "{vv~}{ll}" format.name$ * }
+if$
+}
+if$
+}
+if$
+}
+FUNCTION {format.book.crossref}
+{ volume empty$
+{ "empty volume in " cite$ * "'s crossref of " * crossref * warning$
+"\abphrase{7}"
+}
+{ "\abphrase{9}" volume tie.or.space.connect
+"\abphrase{5}" *
+}
+if$
+editor empty$
+editor field.or.null author field.or.null =
+or
+{ key empty$
+{ series empty$
+{ "need editor, key, or series for " cite$ * " to crossref " *
+crossref * warning$
+"" *
+}
+{ series quote * }
+if$
+}
+{ key * }
+if$
+}
+{ format.crossref.editor * }
+if$
+" \cite{" * crossref * "}" *
+}
+FUNCTION {format.incoll.inproc.crossref}
+{ editor empty$
+editor field.or.null author field.or.null =
+or
+{ key empty$
+{ booktitle empty$
+{ "need editor, key, or booktitle for " cite$ * " to crossref " *
+crossref * warning$
+""
+}
+{ "\abphrase{7}" booktitle quote * }
+if$
+}
+{ "\abphrase{7}" key * }
+if$
+}
+{ "\abphrase{7}" format.crossref.editor * }
+if$
+" \cite{" * crossref * "}" *
+}
+FUNCTION {article}
+{ output.bibitem
+format.authors "author" output.check
+new.block
+format.title "title" output.check
+new.block
+crossref missing$
+{ journal emphasize "journal" output.check
+format.vol.num.pages output
+format.date "year" output.check
+}
+{ format.article.crossref output.nonnull
+new.clause
+format.pages output
+}
+if$
+new.block
+note output
+fin.entry
+}
+FUNCTION {book}
+{ output.bibitem
+author empty$
+{ format.editors "author and editor" output.check }
+{ format.authors output.nonnull
+crossref missing$
+{ "author and editor" editor either.or.check }
+'skip$
+if$
+}
+if$
+new.block
+format.btitle "title" output.check
+crossref missing$
+{ new.clause
+format.bvolume output
+new.block
+format.number.series output
+new.sentence
+publisher "publisher" output.check
+address new.clause.checka
+address output
+}
+{ new.block
+format.book.crossref output.nonnull
+}
+if$
+edition new.clause.checka
+format.edition output
+format.date "year" output.check
+new.block
+note output
+fin.entry
+}
+FUNCTION {booklet}
+{ output.bibitem
+format.authors output
+new.block
+format.title "title" output.check
+howpublished address new.block.checkb
+howpublished output
+address new.clause.checka
+address output
+format.date output
+new.block
+note output
+fin.entry
+}
+FUNCTION {inbook}
+{ output.bibitem
+author empty$
+{ format.editors "author and editor" output.check }
+{ format.authors output.nonnull
+crossref missing$
+{ "author and editor" editor either.or.check }
+'skip$
+if$
+}
+if$
+new.block
+format.btitle "title" output.check
+new.clause
+crossref missing$
+{ format.bvolume output
+new.clause
+format.chapter.pages "chapter and pages" output.check
+new.block
+format.number.series output
+new.sentence
+publisher "publisher" output.check
+address new.clause.checka
+address output
+}
+{ format.chapter.pages "chapter and pages" output.check
+new.block
+format.book.crossref output.nonnull
+}
+if$
+edition new.clause.checka
+format.edition output
+format.date "year" output.check
+new.block
+note output
+fin.entry
+}
+FUNCTION {incollection}
+{ output.bibitem
+format.authors "author" output.check
+new.block
+format.title "title" output.check
+new.block
+crossref missing$
+{ format.in.ed.booktitle "booktitle" output.check
+new.clause
+format.bvolume output
+new.clause
+format.number.series output
+new.clause
+format.chapter.pages output
+new.sentence
+publisher "publisher" output.check
+address new.clause.checka
+address output
+edition new.clause.checka
+format.edition output
+format.date "year" output.check
+}
+{ format.incoll.inproc.crossref output.nonnull
+new.clause
+format.chapter.pages output
+}
+if$
+new.block
+note output
+fin.entry
+}
+FUNCTION {inproceedings}
+{ output.bibitem
+format.authors "author" output.check
+new.block
+format.title "title" output.check
+new.block
+crossref missing$
+{ format.in.ed.booktitle "booktitle" output.check
+volume new.clause.checka
+format.bvolume output
+number series new.clause.checkb
+format.number.series output
+pages new.clause.checka
+format.pages output
+address empty$
+{ organization publisher new.sentence.checkb
+organization output
+publisher new.clause.checka
+publisher output
+format.date "year" output.check
+}
+{ new.clause
+address output.nonnull
+format.date "year" output.check
+new.sentence
+organization output
+new.clause
+publisher output
+}
+if$
+}
+{ format.incoll.inproc.crossref output.nonnull
+new.clause
+format.pages output
+}
+if$
+new.block
+note output
+fin.entry
+}
+FUNCTION {conference} { inproceedings }
+FUNCTION {manual}
+{ output.bibitem
+author empty$
+{ organization empty$
+'skip$
+{ organization output.nonnull
+new.clause
+address output
+}
+if$
+}
+{ format.authors output.nonnull }
+if$
+new.block
+format.btitle "title" output.check
+author empty$
+{ organization empty$
+{ address new.block.checka
+address output
+}
+'skip$
+if$
+}
+{ organization address new.block.checkb
+organization output
+address new.clause.checka
+address output
+}
+if$
+edition new.clause.checka
+format.edition output
+format.date output
+new.block
+note output
+fin.entry
+}
+FUNCTION {mastersthesis}
+{ output.bibitem
+format.authors "author" output.check
+new.block
+format.title "title" output.check
+new.block
+"\abphrase{17}" format.thesis.type output.nonnull
+new.clause
+school "school" output.check
+address new.clause.checka
+address output
+format.date "year" output.check
+new.block
+note output
+fin.entry
+}
+FUNCTION {misc}
+{ output.bibitem
+format.authors output
+title howpublished new.block.checkb
+format.title output
+howpublished new.block.checka
+howpublished output
+format.date output
+new.block
+note output
+fin.entry
+empty.misc.check
+}
+FUNCTION {phdthesis}
+{ output.bibitem
+format.authors "author" output.check
+new.block
+format.btitle "title" output.check
+new.block
+"\abphrase{18}" format.thesis.type output.nonnull
+new.clause
+school "school" output.check
+address new.clause.checka
+address output
+format.date "year" output.check
+new.block
+note output
+fin.entry
+}
+FUNCTION {proceedings}
+{ output.bibitem
+editor empty$
+{ organization output }
+{ format.editors output.nonnull }
+if$
+new.block
+format.btitle "title" output.check
+volume new.clause.checka
+format.bvolume output
+number series new.clause.checkb
+format.number.series output
+address empty$
+{ editor empty$
+{ publisher new.sentence.checka }
+{ organization publisher new.sentence.checkb
+organization output
+publisher new.clause.checka
+}
+if$
+publisher output
+format.date "year" output.check
+}
+{ new.clause
+address output.nonnull
+format.date "year" output.check
+new.sentence
+editor empty$
+'skip$
+{ organization output
+new.clause
+}
+if$
+publisher output
+}
+if$
+new.block
+note output
+fin.entry
+}
+FUNCTION {techreport}
+{ output.bibitem
+format.authors "author" output.check
+new.block
+format.title "title" output.check
+new.block
+format.tr.number output.nonnull
+new.clause
+institution "institution" output.check
+address new.clause.checka
+address output
+format.date "year" output.check
+new.block
+note output
+fin.entry
+}
+FUNCTION {unpublished}
+{ output.bibitem
+format.authors "author" output.check
+new.block
+format.title "title" output.check
+new.block
+note "note" output.check
+format.date output
+fin.entry
+}
+FUNCTION {default.type} { misc }
+MACRO {jan} {"\abmonth{1}"}
+MACRO {feb} {"\abmonth{2}"}
+MACRO {mar} {"\abmonth{3}"}
+MACRO {apr} {"\abmonth{4}"}
+MACRO {may} {"\abmonth{5}"}
+MACRO {jun} {"\abmonth{6}"}
+MACRO {jul} {"\abmonth{7}"}
+MACRO {aug} {"\abmonth{8}"}
+MACRO {sep} {"\abmonth{9}"}
+MACRO {oct} {"\abmonth{10}"}
+MACRO {nov} {"\abmonth{11}"}
+MACRO {dec} {"\abmonth{12}"}
+MACRO {first} {"\abedition{1}"}
+MACRO {second} {"\abedition{2}"}
+MACRO {third} {"\abedition{3}"}
+MACRO {fourth} {"\abedition{4}"}
+MACRO {fifth} {"\abedition{5}"}
+MACRO {sixth} {"\abedition{6}"}
+MACRO {seventh} {"\abedition{7}"}
+MACRO {eighth} {"\abedition{8}"}
+MACRO {ninth} {"\abedition{9}"}
+MACRO {tenth} {"\abedition{10}"}
+MACRO {section} {"\abchapter{0}"}
+MACRO {paragraph} {"\abchapter{1}"}
+MACRO {appendix} {"\abchapter{2}"}
+MACRO {part} {"\abchapter{3}"}
+READ
+FUNCTION {sortify}
+{ purify$
+"l" change.case$
+}
+INTEGERS { len }
+FUNCTION {chop.word}
+{ 's :=
+'len :=
+s #1 len substring$ =
+{ s len #1 + global.max$ substring$ }
+'s
+if$
+}
+INTEGERS { et.al.char.used }
+FUNCTION {initialize.et.al.char.used}
+{ #0 'et.al.char.used :=
+}
+EXECUTE {initialize.et.al.char.used}
+FUNCTION {format.lab.names}
+{ 's :=
+s num.names$ 'numnames :=
+numnames #1 >
+{ numnames #4 >
+{ #3 'namesleft := }
+{ numnames 'namesleft := }
+if$
+#1 'nameptr :=
+""
+{ namesleft #0 > }
+{ nameptr numnames =
+{ s nameptr "{ff }{vv }{ll}{ jj}" format.name$ "others" =
+{ "{\etalchar{+}}" *
+#1 'et.al.char.used :=
+}
+{ s nameptr "{v{}}{l{}}" format.name$ * }
+if$
+}
+{ s nameptr "{v{}}{l{}}" format.name$ * }
+if$
+nameptr #1 + 'nameptr :=
+namesleft #1 - 'namesleft :=
+}
+while$
+numnames #4 >
+{ "{\etalchar{+}}" *
+#1 'et.al.char.used :=
+}
+'skip$
+if$
+}
+{ s #1 "{v{}}{l{}}" format.name$
+duplicate$ text.length$ #2 <
+{ pop$ s #1 "{ll}" format.name$ #3 text.prefix$ }
+'skip$
+if$
+}
+if$
+}
+FUNCTION {author.key.label}
+{ author empty$
+{ key empty$
+{ cite$ #1 #3 substring$ }
+{ key #3 text.prefix$ }
+if$
+}
+{ author format.lab.names }
+if$
+}
+FUNCTION {author.editor.key.label}
+{ author empty$
+{ editor empty$
+{ key empty$
+{ cite$ #1 #3 substring$ }
+{ key #3 text.prefix$ }
+if$
+}
+{ editor format.lab.names }
+if$
+}
+{ author format.lab.names }
+if$
+}
+FUNCTION {author.key.organization.label}
+{ author empty$
+{ key empty$
+{ organization empty$
+{ cite$ #1 #3 substring$ }
+{ "The " #4 organization chop.word #3 text.prefix$ }
+if$
+}
+{ key #3 text.prefix$ }
+if$
+}
+{ author format.lab.names }
+if$
+}
+FUNCTION {editor.key.organization.label}
+{ editor empty$
+{ key empty$
+{ organization empty$
+{ cite$ #1 #3 substring$ }
+{ "The " #4 organization chop.word #3 text.prefix$ }
+if$
+}
+{ key #3 text.prefix$ }
+if$
+}
+{ editor format.lab.names }
+if$
+}
+FUNCTION {calc.label}
+{ type$ "book" =
+type$ "inbook" =
+or
+'author.editor.key.label
+{ type$ "proceedings" =
+'editor.key.organization.label
+{ type$ "manual" =
+'author.key.organization.label
+'author.key.label
+if$
+}
+if$
+}
+if$
+duplicate$
+year field.or.null purify$ #-1 #2 substring$
+*
+'label :=
+year field.or.null purify$ #-1 #4 substring$
+*
+sortify 'sort.label :=
+}
+FUNCTION {sort.format.names}
+{ 's :=
+#1 'nameptr :=
+""
+s num.names$ 'numnames :=
+numnames 'namesleft :=
+{ namesleft #0 > }
+{ nameptr #1 >
+{ " " * }
+'skip$
+if$
+s nameptr "{vv{ } }{ll{ }}{ ff{ }}{ jj{ }}" format.name$ 't :=
+nameptr numnames = t "others" = and
+{ "et al" * }
+{ t sortify * }
+if$
+nameptr #1 + 'nameptr :=
+namesleft #1 - 'namesleft :=
+}
+while$
+}
+FUNCTION {sort.format.title}
+{ 't :=
+"A " #2
+"An " #3
+"The " #4 t chop.word
+chop.word
+chop.word
+sortify
+#1 global.max$ substring$
+}
+FUNCTION {author.sort}
+{ author empty$
+{ key empty$
+{ "to sort, need author or key in " cite$ * warning$
+""
+}
+{ key sortify }
+if$
+}
+{ author sort.format.names }
+if$
+}
+FUNCTION {author.editor.sort}
+{ author empty$
+{ editor empty$
+{ key empty$
+{ "to sort, need author, editor, or key in " cite$ * warning$
+""
+}
+{ key sortify }
+if$
+}
+{ editor sort.format.names }
+if$
+}
+{ author sort.format.names }
+if$
+}
+FUNCTION {author.organization.sort}
+{ author empty$
+{ organization empty$
+{ key empty$
+{ "to sort, need author, organization, or key in " cite$ * warning$
+""
+}
+{ key sortify }
+if$
+}
+{ "The " #4 organization chop.word sortify }
+if$
+}
+{ author sort.format.names }
+if$
+}
+FUNCTION {editor.organization.sort}
+{ editor empty$
+{ organization empty$
+{ key empty$
+{ "to sort, need editor, organization, or key in " cite$ * warning$
+""
+}
+{ key sortify }
+if$
+}
+{ "The " #4 organization chop.word sortify }
+if$
+}
+{ editor sort.format.names }
+if$
+}
+FUNCTION {presort}
+{ calc.label
+sort.label
+" "
+*
+type$ "book" =
+type$ "inbook" =
+or
+'author.editor.sort
+{ type$ "proceedings" =
+'editor.organization.sort
+{ type$ "manual" =
+'author.organization.sort
+'author.sort
+if$
+}
+if$
+}
+if$
+*
+" "
+*
+year field.or.null sortify
+*
+" "
+*
+title field.or.null
+sort.format.title
+*
+#1 entry.max$ substring$
+'sort.key$ :=
+}
+ITERATE {presort}
+SORT
+STRINGS { longest.label last.sort.label next.extra }
+INTEGERS { longest.label.width last.extra.num }
+FUNCTION {initialize.longest.label}
+{ "" 'longest.label :=
+#0 int.to.chr$ 'last.sort.label :=
+"" 'next.extra :=
+#0 'longest.label.width :=
+#0 'last.extra.num :=
+}
+FUNCTION {forward.pass}
+{ last.sort.label sort.label =
+{ last.extra.num #1 + 'last.extra.num :=
+last.extra.num int.to.chr$ 'extra.label :=
+}
+{ "a" chr.to.int$ 'last.extra.num :=
+"" 'extra.label :=
+sort.label 'last.sort.label :=
+}
+if$
+}
+FUNCTION {reverse.pass}
+{ next.extra "b" =
+{ "a" 'extra.label := }
+'skip$
+if$
+label extra.label * 'label :=
+label width$ longest.label.width >
+{ label 'longest.label :=
+label width$ 'longest.label.width :=
+}
+'skip$
+if$
+extra.label 'next.extra :=
+}
+EXECUTE {initialize.longest.label}
+ITERATE {forward.pass}
+REVERSE {reverse.pass}
+FUNCTION {begin.bib}
+{
+"\newif\ifabfull\abfulltrue" write$ newline$
+"\input apreambl" write$ newline$
+et.al.char.used
+{ "\newcommand{\etalchar}[1]{$^{#1}$}" write$ newline$ }
+'skip$
+if$
+preamble$ empty$
+'skip$
+{ preamble$ write$ newline$ }
+if$
+"\begin{thebibliography}{" longest.label * "}" * write$ newline$
+}
+EXECUTE {begin.bib}
+EXECUTE {init.state.consts}
+ITERATE {call.type$}
+FUNCTION {end.bib}
+{ newline$
+"\end{thebibliography}" write$ newline$
+}
+EXECUTE {end.bib}
diff --git a/biblio/bibtex/contrib/abstyles-babel/acompat.bib b/biblio/bibtex/contrib/abstyles-babel/acompat.bib
new file mode 100644
index 0000000000..fb94505e64
--- /dev/null
+++ b/biblio/bibtex/contrib/abstyles-babel/acompat.bib
@@ -0,0 +1,45 @@
+This is ACOMPAT.BIB, a BibTeX database file for the `adaptable' style
+family, written by Hans-Hermann Bode (HHBODE at DOSUNI1.BITNET), that contains
+compatibility definitions for use with standard styles. Use acompat as the
+very first item---even before jourfull or jourabbr---in your \bibliography
+command when you have to typeset your new databases---relying on the
+adaptable styles---with the standard styles.
+
+------------------------------------------------------------------------------
+
+First, we declare the \abfull switch that is defined by the adaptable
+styles. Here, it is unconditionally set to true which might not fit your
+needs (in this case, say \abfullfalse instead of \abfulltrue).
+
+@PREAMBLE{"\newif\ifabfull\abfulltrue"}
+
+------------------------------------------------------------------------------
+
+Next, the strings for edition numbers are defined.
+
+@STRING{first="First"}
+@STRING{second="Second"}
+@STRING{third="Third"}
+@STRING{fourth="Fourth"}
+@STRING{fifth="Fifth"}
+@STRING{sixth="Sixth"}
+@STRING{seventh="Seventh"}
+@STRING{eighth="Eighth"}
+@STRING{ninth="Ninth"}
+@STRING{tenth="Tenth"}
+
+------------------------------------------------------------------------------
+
+Finally, we have to set up strings for certain ``chapter'' names.
+
+@STRING{section="Section"}
+@STRING{paragraph="Paragraph"}
+@STRING{appendix="Appendix"}
+@STRING{part="Part"}
+
+------------------------------------------------------------------------------
+
+That's all there is to it. Now you can use your new databases with the old
+styles as well.
+
+------------------------------------------------------------------------------
diff --git a/biblio/bibtex/contrib/abstyles-babel/anotit.bst b/biblio/bibtex/contrib/abstyles-babel/anotit.bst
new file mode 100644
index 0000000000..6e8ec41b53
--- /dev/null
+++ b/biblio/bibtex/contrib/abstyles-babel/anotit.bst
@@ -0,0 +1,1075 @@
+% BibTeX bibliography style `ANOTIT'
+ENTRY
+{ address
+author
+booktitle
+chapter
+edition
+editor
+howpublished
+institution
+journal
+key
+month
+note
+number
+organization
+pages
+publisher
+school
+series
+title
+type
+volume
+year
+}
+{}
+{ label }
+INTEGERS { output.state before.all mid.sentence after.sentence after.block
+continue.sentence }
+FUNCTION {init.state.consts}
+{ #0 'before.all :=
+#1 'mid.sentence :=
+#2 'after.sentence :=
+#3 'after.block :=
+#4 'continue.sentence :=
+}
+STRINGS { s t }
+FUNCTION {output.nonnull}
+{ 's :=
+output.state continue.sentence =
+{ " " * write$ }
+{ output.state mid.sentence =
+{ ", " * write$ }
+{ output.state after.block =
+{ add.period$ write$
+newline$
+"\newblock " write$
+}
+{ output.state before.all =
+'write$
+{ add.period$ " " * write$ }
+if$
+}
+if$
+}
+if$
+continue.sentence 'output.state :=
+}
+if$
+s
+}
+FUNCTION {output}
+{ duplicate$ empty$
+'pop$
+'output.nonnull
+if$
+}
+FUNCTION {output.check}
+{ 't :=
+duplicate$ empty$
+{ pop$ "empty " t * " in " * cite$ * warning$ }
+'output.nonnull
+if$
+}
+FUNCTION {output.bibitem}
+{ newline$
+"\bibitem{" write$
+cite$ write$
+"}" write$
+newline$
+""
+before.all 'output.state :=
+}
+FUNCTION {fin.entry}
+{ add.period$
+write$
+newline$
+}
+FUNCTION {new.block}
+{ output.state before.all =
+'skip$
+{ after.block 'output.state := }
+if$
+}
+FUNCTION {new.sentence}
+{ output.state after.block =
+'skip$
+{ output.state before.all =
+'skip$
+{ after.sentence 'output.state := }
+if$
+}
+if$
+}
+FUNCTION {new.clause}
+{ output.state after.sentence =
+'skip$
+{ output.state after.block =
+'skip$
+{ output.state before.all =
+'skip$
+{ mid.sentence 'output.state := }
+if$
+}
+if$
+}
+if$
+}
+FUNCTION {not}
+{ { #0 }
+{ #1 }
+if$
+}
+FUNCTION {and}
+{ 'skip$
+{ pop$ #0 }
+if$
+}
+FUNCTION {or}
+{ { pop$ #1 }
+'skip$
+if$
+}
+FUNCTION {new.block.checka}
+{ empty$
+'skip$
+'new.block
+if$
+}
+FUNCTION {new.block.checkb}
+{ empty$
+swap$ empty$
+and
+'skip$
+'new.block
+if$
+}
+FUNCTION {new.sentence.checka}
+{ empty$
+'skip$
+'new.sentence
+if$
+}
+FUNCTION {new.sentence.checkb}
+{ empty$
+swap$ empty$
+and
+'skip$
+'new.sentence
+if$
+}
+FUNCTION {new.clause.checka}
+{ empty$
+'skip$
+'new.clause
+if$
+}
+FUNCTION {new.clause.checkb}
+{ empty$
+swap$ empty$
+and
+'skip$
+'new.clause
+if$
+}
+FUNCTION {field.or.null}
+{ duplicate$ empty$
+{ pop$ "" }
+'skip$
+if$
+}
+FUNCTION {emphasize}
+{ duplicate$ empty$
+{ pop$ "" }
+{ "\abtype{2}{" swap$ * "}" * }
+if$
+}
+FUNCTION {capitalize}
+{ duplicate$ empty$
+{ pop$ "" }
+{ "\abtype{0}{" swap$ * "}" * }
+if$
+}
+FUNCTION {boldface}
+{ duplicate$ empty$
+{ pop$ "" }
+{ "\abtype{3}{" swap$ * "}" * }
+if$
+}
+FUNCTION {quote}
+{ duplicate$ empty$
+{ pop$ "" }
+{ "\abtype{1}{" swap$ * "}" * }
+if$
+}
+FUNCTION {parentheses}
+{ duplicate$ empty$
+{ pop$ "" }
+{ "\abtype{5}{" swap$ * "}" * }
+if$
+}
+INTEGERS { nameptr namesleft numnames }
+FUNCTION {format.names}
+{ 's :=
+#1 'nameptr :=
+s num.names$ 'numnames :=
+numnames 'namesleft :=
+{ namesleft #0 > }
+{ s nameptr "{f.~}{vv~}{ll}{, jj}" format.name$ 't :=
+nameptr #1 >
+{ namesleft #1 >
+{ ", " * t * }
+{ numnames #2 >
+{ "\abphrase{1}" * }
+'skip$
+if$
+t "others" =
+{ "\abphrase{2}" * }
+{ "\abphrase{0}" * t * }
+if$
+}
+if$
+}
+'t
+if$
+nameptr #1 + 'nameptr :=
+namesleft #1 - 'namesleft :=
+}
+while$
+}
+FUNCTION {format.authors}
+{ author empty$
+{ "" }
+{ author format.names capitalize }
+if$
+}
+FUNCTION {format.editors}
+{ editor empty$
+{ "" }
+{ editor format.names capitalize
+editor num.names$ #1 >
+{ "\abphrase{3}" * }
+{ "\abphrase{4}" * }
+if$
+}
+if$
+}
+FUNCTION {format.title}
+{ title empty$
+{ "" }
+{ title "t" change.case$ }
+if$
+}
+FUNCTION {n.dashify}
+{ 't :=
+""
+{ t empty$ not }
+{ t #1 #1 substring$ "-" =
+{ t #1 #2 substring$ "--" = not
+{ "--" *
+t #2 global.max$ substring$ 't :=
+}
+{ { t #1 #1 substring$ "-" = }
+{ "-" *
+t #2 global.max$ substring$ 't :=
+}
+while$
+}
+if$
+}
+{ t #1 #1 substring$ *
+t #2 global.max$ substring$ 't :=
+}
+if$
+}
+while$
+}
+FUNCTION {format.date}
+{ year empty$
+{ month empty$
+{ "" }
+{ "there's a month but no year in " cite$ * warning$
+month parentheses
+}
+if$
+}
+{ month empty$
+{ year parentheses }
+{ month " " * year * parentheses }
+if$
+}
+if$
+}
+FUNCTION {format.btitle}
+{ title quote
+}
+FUNCTION {tie.or.space.connect}
+{ duplicate$ text.length$ #3 <
+{ "~" }
+{ " " }
+if$
+swap$ * *
+}
+FUNCTION {either.or.check}
+{ empty$
+'pop$
+{ "can't use both " swap$ * " fields in " * cite$ * warning$ }
+if$
+}
+FUNCTION {format.bvolume}
+{ volume empty$
+{ "" }
+{ "\abphrase{8}" volume tie.or.space.connect
+series empty$
+'skip$
+{ "\abphrase{5}" * series quote * }
+if$
+"volume and number" number either.or.check
+}
+if$
+}
+FUNCTION {format.number.series}
+{ volume empty$
+{ number empty$
+{ series field.or.null }
+{ output.state mid.sentence = output.state continue.sentence = or
+{ "\abphrase{10}" }
+{ "\abphrase{11}" }
+if$
+number tie.or.space.connect
+series empty$
+{ "there's a number but no series in " cite$ * warning$ }
+{ "\abphrase{6}" * series * }
+if$
+}
+if$
+}
+{ "" }
+if$
+}
+FUNCTION {format.edition}
+{ edition empty$
+{ "" }
+{ output.state mid.sentence = output.state continue.sentence = or
+{ edition "l" change.case$ "\abphrase{12}" * }
+{ edition "t" change.case$ "\abphrase{12}" * }
+if$
+}
+if$
+}
+INTEGERS { multiresult }
+FUNCTION {multi.page.check}
+{ 't :=
+#0 'multiresult :=
+{ multiresult not
+t empty$ not
+and
+}
+{ t #1 #1 substring$
+duplicate$ "-" =
+swap$ duplicate$ "," =
+swap$ "+" =
+or or
+{ #1 'multiresult := }
+{ t #2 global.max$ substring$ 't := }
+if$
+}
+while$
+multiresult
+}
+FUNCTION {format.pages}
+{ pages empty$
+{ "" }
+{ pages multi.page.check
+{ "\abphrase{13}" pages n.dashify tie.or.space.connect }
+{ "\abphrase{14}" pages tie.or.space.connect }
+if$
+}
+if$
+}
+FUNCTION {format.vol.num.pages}
+{ volume field.or.null boldface
+number empty$
+'skip$
+{ "\abtype{4}{" number * "}" * *
+volume empty$
+{ "there's a number but no volume in " cite$ * warning$ }
+'skip$
+if$
+}
+if$
+pages empty$
+'skip$
+{ duplicate$ empty$
+{ pop$ format.pages }
+{ ", " * pages n.dashify * }
+if$
+}
+if$
+}
+FUNCTION {format.chapter.pages}
+{ chapter empty$
+'format.pages
+{ type empty$
+{ "\abphrase{15}" }
+{ type "l" change.case$ }
+if$
+chapter tie.or.space.connect
+pages empty$
+'skip$
+{ ", " * format.pages * }
+if$
+}
+if$
+}
+FUNCTION {format.in.ed.booktitle}
+{ booktitle empty$
+{ "" }
+{ editor empty$
+{ "\abphrase{7}" booktitle quote * }
+{ "\abphrase{7}" format.editors * ", " * booktitle quote * }
+if$
+}
+if$
+}
+FUNCTION {empty.misc.check}
+{ author empty$ title empty$ howpublished empty$
+month empty$ year empty$ note empty$
+and and and and and
+key empty$ not and
+{ "all relevant fields are empty in " cite$ * warning$ }
+'skip$
+if$
+}
+FUNCTION {format.thesis.type}
+{ type empty$
+'skip$
+{ pop$
+type "t" change.case$
+}
+if$
+}
+FUNCTION {format.tr.number}
+{ type empty$
+{ "\abphrase{16}" }
+'type
+if$
+number empty$
+{ "t" change.case$ }
+{ number tie.or.space.connect }
+if$
+}
+FUNCTION {format.article.crossref}
+{ key empty$
+{ journal empty$
+{ "need key or journal for " cite$ * " to crossref " * crossref *
+warning$
+""
+}
+{ "\abphrase{7}" journal emphasize * }
+if$
+}
+{ "\abphrase{7}" key * }
+if$
+" \cite{" * crossref * "}" *
+}
+FUNCTION {format.crossref.editor}
+{ editor #1 "{vv~}{ll}" format.name$
+editor num.names$ duplicate$
+#2 >
+{ pop$ "\abphrase{2}" * }
+{ #2 <
+'skip$
+{ editor #2 "{ff }{vv }{ll}{ jj}" format.name$ "others" =
+{ "\abphrase{2}" * }
+{ "\abphrase{0}" * editor #2 "{vv~}{ll}" format.name$ * }
+if$
+}
+if$
+}
+if$
+}
+FUNCTION {format.book.crossref}
+{ volume empty$
+{ "empty volume in " cite$ * "'s crossref of " * crossref * warning$
+"\abphrase{7}"
+}
+{ "\abphrase{9}" volume tie.or.space.connect
+"\abphrase{5}" *
+}
+if$
+editor empty$
+editor field.or.null author field.or.null =
+or
+{ key empty$
+{ series empty$
+{ "need editor, key, or series for " cite$ * " to crossref " *
+crossref * warning$
+"" *
+}
+{ series quote * }
+if$
+}
+{ key * }
+if$
+}
+{ format.crossref.editor * }
+if$
+" \cite{" * crossref * "}" *
+}
+FUNCTION {format.incoll.inproc.crossref}
+{ editor empty$
+editor field.or.null author field.or.null =
+or
+{ key empty$
+{ booktitle empty$
+{ "need editor, key, or booktitle for " cite$ * " to crossref " *
+crossref * warning$
+""
+}
+{ "\abphrase{7}" booktitle quote * }
+if$
+}
+{ "\abphrase{7}" key * }
+if$
+}
+{ "\abphrase{7}" format.crossref.editor * }
+if$
+" \cite{" * crossref * "}" *
+}
+FUNCTION {article}
+{ output.bibitem
+format.authors "author" output.check
+new.block
+crossref missing$
+{ journal emphasize "journal" output.check
+format.vol.num.pages output
+format.date "year" output.check
+}
+{ format.article.crossref output.nonnull
+new.clause
+format.pages output
+}
+if$
+new.block
+note output
+fin.entry
+}
+FUNCTION {book}
+{ output.bibitem
+author empty$
+{ format.editors "author and editor" output.check }
+{ format.authors output.nonnull
+crossref missing$
+{ "author and editor" editor either.or.check }
+'skip$
+if$
+}
+if$
+new.block
+format.btitle "title" output.check
+crossref missing$
+{ new.clause
+format.bvolume output
+new.block
+format.number.series output
+new.sentence
+publisher "publisher" output.check
+address new.clause.checka
+address output
+}
+{ new.block
+format.book.crossref output.nonnull
+}
+if$
+edition new.clause.checka
+format.edition output
+format.date "year" output.check
+new.block
+note output
+fin.entry
+}
+FUNCTION {booklet}
+{ output.bibitem
+format.authors output
+new.block
+format.title "title" output.check
+howpublished address new.block.checkb
+howpublished output
+address new.clause.checka
+address output
+format.date output
+new.block
+note output
+fin.entry
+}
+FUNCTION {inbook}
+{ output.bibitem
+author empty$
+{ format.editors "author and editor" output.check }
+{ format.authors output.nonnull
+crossref missing$
+{ "author and editor" editor either.or.check }
+'skip$
+if$
+}
+if$
+new.block
+format.btitle "title" output.check
+new.clause
+crossref missing$
+{ format.bvolume output
+new.clause
+format.chapter.pages "chapter and pages" output.check
+new.block
+format.number.series output
+new.sentence
+publisher "publisher" output.check
+address new.clause.checka
+address output
+}
+{ format.chapter.pages "chapter and pages" output.check
+new.block
+format.book.crossref output.nonnull
+}
+if$
+edition new.clause.checka
+format.edition output
+format.date "year" output.check
+new.block
+note output
+fin.entry
+}
+FUNCTION {incollection}
+{ output.bibitem
+format.authors "author" output.check
+new.block
+chapter empty$ pages empty$ and
+{
+format.title "title" output.check
+new.block
+}
+'skip$
+if$
+crossref missing$
+{ format.in.ed.booktitle "booktitle" output.check
+new.clause
+format.bvolume output
+new.clause
+format.number.series output
+new.clause
+format.chapter.pages output
+new.sentence
+publisher "publisher" output.check
+address new.clause.checka
+address output
+edition new.clause.checka
+format.edition output
+format.date "year" output.check
+}
+{ format.incoll.inproc.crossref output.nonnull
+new.clause
+format.chapter.pages output
+}
+if$
+new.block
+note output
+fin.entry
+}
+FUNCTION {inproceedings}
+{ output.bibitem
+format.authors "author" output.check
+new.block
+pages empty$
+{
+format.title "title" output.check
+new.block
+}
+'skip$
+if$
+crossref missing$
+{ format.in.ed.booktitle "booktitle" output.check
+volume new.clause.checka
+format.bvolume output
+number series new.clause.checkb
+format.number.series output
+pages new.clause.checka
+format.pages output
+address empty$
+{ organization publisher new.sentence.checkb
+organization output
+publisher new.clause.checka
+publisher output
+format.date "year" output.check
+}
+{ new.clause
+address output.nonnull
+format.date "year" output.check
+new.sentence
+organization output
+new.clause
+publisher output
+}
+if$
+}
+{ format.incoll.inproc.crossref output.nonnull
+new.clause
+format.pages output
+}
+if$
+new.block
+note output
+fin.entry
+}
+FUNCTION {conference} { inproceedings }
+FUNCTION {manual}
+{ output.bibitem
+author empty$
+{ organization empty$
+'skip$
+{ organization output.nonnull
+new.clause
+address output
+}
+if$
+}
+{ format.authors output.nonnull }
+if$
+new.block
+format.btitle "title" output.check
+author empty$
+{ organization empty$
+{ address new.block.checka
+address output
+}
+'skip$
+if$
+}
+{ organization address new.block.checkb
+organization output
+address new.clause.checka
+address output
+}
+if$
+edition new.clause.checka
+format.edition output
+format.date output
+new.block
+note output
+fin.entry
+}
+FUNCTION {mastersthesis}
+{ output.bibitem
+format.authors "author" output.check
+new.block
+format.title "title" output.check
+new.block
+"\abphrase{17}" format.thesis.type output.nonnull
+new.clause
+school "school" output.check
+address new.clause.checka
+address output
+format.date "year" output.check
+new.block
+note output
+fin.entry
+}
+FUNCTION {misc}
+{ output.bibitem
+format.authors output
+title howpublished new.block.checkb
+format.title output
+howpublished new.block.checka
+howpublished output
+format.date output
+new.block
+note output
+fin.entry
+empty.misc.check
+}
+FUNCTION {phdthesis}
+{ output.bibitem
+format.authors "author" output.check
+new.block
+format.btitle "title" output.check
+new.block
+"\abphrase{18}" format.thesis.type output.nonnull
+new.clause
+school "school" output.check
+address new.clause.checka
+address output
+format.date "year" output.check
+new.block
+note output
+fin.entry
+}
+FUNCTION {proceedings}
+{ output.bibitem
+editor empty$
+{ organization output }
+{ format.editors output.nonnull }
+if$
+new.block
+format.btitle "title" output.check
+volume new.clause.checka
+format.bvolume output
+number series new.clause.checkb
+format.number.series output
+address empty$
+{ editor empty$
+{ publisher new.sentence.checka }
+{ organization publisher new.sentence.checkb
+organization output
+publisher new.clause.checka
+}
+if$
+publisher output
+format.date "year" output.check
+}
+{ new.clause
+address output.nonnull
+format.date "year" output.check
+new.sentence
+editor empty$
+'skip$
+{ organization output
+new.clause
+}
+if$
+publisher output
+}
+if$
+new.block
+note output
+fin.entry
+}
+FUNCTION {techreport}
+{ output.bibitem
+format.authors "author" output.check
+new.block
+number empty$
+{
+format.title "title" output.check
+new.block
+}
+'skip$
+if$
+format.tr.number output.nonnull
+new.clause
+institution "institution" output.check
+address new.clause.checka
+address output
+format.date "year" output.check
+new.block
+note output
+fin.entry
+}
+FUNCTION {unpublished}
+{ output.bibitem
+format.authors "author" output.check
+new.block
+format.title "title" output.check
+new.block
+note "note" output.check
+format.date output
+fin.entry
+}
+FUNCTION {default.type} { misc }
+MACRO {jan} {"\abmonth{1}"}
+MACRO {feb} {"\abmonth{2}"}
+MACRO {mar} {"\abmonth{3}"}
+MACRO {apr} {"\abmonth{4}"}
+MACRO {may} {"\abmonth{5}"}
+MACRO {jun} {"\abmonth{6}"}
+MACRO {jul} {"\abmonth{7}"}
+MACRO {aug} {"\abmonth{8}"}
+MACRO {sep} {"\abmonth{9}"}
+MACRO {oct} {"\abmonth{10}"}
+MACRO {nov} {"\abmonth{11}"}
+MACRO {dec} {"\abmonth{12}"}
+MACRO {first} {"\abedition{1}"}
+MACRO {second} {"\abedition{2}"}
+MACRO {third} {"\abedition{3}"}
+MACRO {fourth} {"\abedition{4}"}
+MACRO {fifth} {"\abedition{5}"}
+MACRO {sixth} {"\abedition{6}"}
+MACRO {seventh} {"\abedition{7}"}
+MACRO {eighth} {"\abedition{8}"}
+MACRO {ninth} {"\abedition{9}"}
+MACRO {tenth} {"\abedition{10}"}
+MACRO {section} {"\abchapter{0}"}
+MACRO {paragraph} {"\abchapter{1}"}
+MACRO {appendix} {"\abchapter{2}"}
+MACRO {part} {"\abchapter{3}"}
+READ
+FUNCTION {sortify}
+{ purify$
+"l" change.case$
+}
+INTEGERS { len }
+FUNCTION {chop.word}
+{ 's :=
+'len :=
+s #1 len substring$ =
+{ s len #1 + global.max$ substring$ }
+'s
+if$
+}
+FUNCTION {sort.format.names}
+{ 's :=
+#1 'nameptr :=
+""
+s num.names$ 'numnames :=
+numnames 'namesleft :=
+{ namesleft #0 > }
+{ nameptr #1 >
+{ " " * }
+'skip$
+if$
+s nameptr "{vv{ } }{ll{ }}{ f{ }}{ jj{ }}" format.name$ 't :=
+nameptr numnames = t "others" = and
+{ "et al" * }
+{ t sortify * }
+if$
+nameptr #1 + 'nameptr :=
+namesleft #1 - 'namesleft :=
+}
+while$
+}
+FUNCTION {sort.format.title}
+{ 't :=
+"A " #2
+"An " #3
+"The " #4 t chop.word
+chop.word
+chop.word
+sortify
+#1 global.max$ substring$
+}
+FUNCTION {author.sort}
+{ author empty$
+{ key empty$
+{ "to sort, need author or key in " cite$ * warning$
+""
+}
+{ key sortify }
+if$
+}
+{ author sort.format.names }
+if$
+}
+FUNCTION {author.editor.sort}
+{ author empty$
+{ editor empty$
+{ key empty$
+{ "to sort, need author, editor, or key in " cite$ * warning$
+""
+}
+{ key sortify }
+if$
+}
+{ editor sort.format.names }
+if$
+}
+{ author sort.format.names }
+if$
+}
+FUNCTION {author.organization.sort}
+{ author empty$
+{ organization empty$
+{ key empty$
+{ "to sort, need author, organization, or key in " cite$ * warning$
+""
+}
+{ key sortify }
+if$
+}
+{ "The " #4 organization chop.word sortify }
+if$
+}
+{ author sort.format.names }
+if$
+}
+FUNCTION {editor.organization.sort}
+{ editor empty$
+{ organization empty$
+{ key empty$
+{ "to sort, need editor, organization, or key in " cite$ * warning$
+""
+}
+{ key sortify }
+if$
+}
+{ "The " #4 organization chop.word sortify }
+if$
+}
+{ editor sort.format.names }
+if$
+}
+FUNCTION {presort}
+{ type$ "book" =
+type$ "inbook" =
+or
+'author.editor.sort
+{ type$ "proceedings" =
+'editor.organization.sort
+{ type$ "manual" =
+'author.organization.sort
+'author.sort
+if$
+}
+if$
+}
+if$
+" "
+*
+year field.or.null sortify
+*
+" "
+*
+title field.or.null
+sort.format.title
+*
+#1 entry.max$ substring$
+'sort.key$ :=
+}
+ITERATE {presort}
+SORT
+STRINGS { longest.label }
+INTEGERS { number.label longest.label.width }
+FUNCTION {initialize.longest.label}
+{ "" 'longest.label :=
+#1 'number.label :=
+#0 'longest.label.width :=
+}
+FUNCTION {longest.label.pass}
+{ number.label int.to.str$ 'label :=
+number.label #1 + 'number.label :=
+label width$ longest.label.width >
+{ label 'longest.label :=
+label width$ 'longest.label.width :=
+}
+'skip$
+if$
+}
+EXECUTE {initialize.longest.label}
+ITERATE {longest.label.pass}
+FUNCTION {begin.bib}
+{
+"\newif\ifabfull\abfullfalse" write$ newline$
+"\input apreambl" write$ newline$
+preamble$ empty$
+'skip$
+{ preamble$ write$ newline$ }
+if$
+"\begin{thebibliography}{" longest.label * "}" * write$ newline$
+}
+EXECUTE {begin.bib}
+EXECUTE {init.state.consts}
+ITERATE {call.type$}
+FUNCTION {end.bib}
+{ newline$
+"\end{thebibliography}" write$ newline$
+}
+EXECUTE {end.bib}
diff --git a/biblio/bibtex/contrib/abstyles-babel/aplain.bst b/biblio/bibtex/contrib/abstyles-babel/aplain.bst
new file mode 100644
index 0000000000..f9ac9f4a0a
--- /dev/null
+++ b/biblio/bibtex/contrib/abstyles-babel/aplain.bst
@@ -0,0 +1,1062 @@
+% BibTeX bibliography style `APLAIN'
+ENTRY
+{ address
+author
+booktitle
+chapter
+edition
+editor
+howpublished
+institution
+journal
+key
+month
+note
+number
+organization
+pages
+publisher
+school
+series
+title
+type
+volume
+year
+}
+{}
+{ label }
+INTEGERS { output.state before.all mid.sentence after.sentence after.block
+continue.sentence }
+FUNCTION {init.state.consts}
+{ #0 'before.all :=
+#1 'mid.sentence :=
+#2 'after.sentence :=
+#3 'after.block :=
+#4 'continue.sentence :=
+}
+STRINGS { s t }
+FUNCTION {output.nonnull}
+{ 's :=
+output.state continue.sentence =
+{ " " * write$ }
+{ output.state mid.sentence =
+{ ", " * write$ }
+{ output.state after.block =
+{ add.period$ write$
+newline$
+"\newblock " write$
+}
+{ output.state before.all =
+'write$
+{ add.period$ " " * write$ }
+if$
+}
+if$
+}
+if$
+continue.sentence 'output.state :=
+}
+if$
+s
+}
+FUNCTION {output}
+{ duplicate$ empty$
+'pop$
+'output.nonnull
+if$
+}
+FUNCTION {output.check}
+{ 't :=
+duplicate$ empty$
+{ pop$ "empty " t * " in " * cite$ * warning$ }
+'output.nonnull
+if$
+}
+FUNCTION {output.bibitem}
+{ newline$
+"\bibitem{" write$
+cite$ write$
+"}" write$
+newline$
+""
+before.all 'output.state :=
+}
+FUNCTION {fin.entry}
+{ add.period$
+write$
+newline$
+}
+FUNCTION {new.block}
+{ output.state before.all =
+'skip$
+{ after.block 'output.state := }
+if$
+}
+FUNCTION {new.sentence}
+{ output.state after.block =
+'skip$
+{ output.state before.all =
+'skip$
+{ after.sentence 'output.state := }
+if$
+}
+if$
+}
+FUNCTION {new.clause}
+{ output.state after.sentence =
+'skip$
+{ output.state after.block =
+'skip$
+{ output.state before.all =
+'skip$
+{ mid.sentence 'output.state := }
+if$
+}
+if$
+}
+if$
+}
+FUNCTION {not}
+{ { #0 }
+{ #1 }
+if$
+}
+FUNCTION {and}
+{ 'skip$
+{ pop$ #0 }
+if$
+}
+FUNCTION {or}
+{ { pop$ #1 }
+'skip$
+if$
+}
+FUNCTION {new.block.checka}
+{ empty$
+'skip$
+'new.block
+if$
+}
+FUNCTION {new.block.checkb}
+{ empty$
+swap$ empty$
+and
+'skip$
+'new.block
+if$
+}
+FUNCTION {new.sentence.checka}
+{ empty$
+'skip$
+'new.sentence
+if$
+}
+FUNCTION {new.sentence.checkb}
+{ empty$
+swap$ empty$
+and
+'skip$
+'new.sentence
+if$
+}
+FUNCTION {new.clause.checka}
+{ empty$
+'skip$
+'new.clause
+if$
+}
+FUNCTION {new.clause.checkb}
+{ empty$
+swap$ empty$
+and
+'skip$
+'new.clause
+if$
+}
+FUNCTION {field.or.null}
+{ duplicate$ empty$
+{ pop$ "" }
+'skip$
+if$
+}
+FUNCTION {emphasize}
+{ duplicate$ empty$
+{ pop$ "" }
+{ "\abtype{2}{" swap$ * "}" * }
+if$
+}
+FUNCTION {capitalize}
+{ duplicate$ empty$
+{ pop$ "" }
+{ "\abtype{0}{" swap$ * "}" * }
+if$
+}
+FUNCTION {boldface}
+{ duplicate$ empty$
+{ pop$ "" }
+{ "\abtype{3}{" swap$ * "}" * }
+if$
+}
+FUNCTION {quote}
+{ duplicate$ empty$
+{ pop$ "" }
+{ "\abtype{1}{" swap$ * "}" * }
+if$
+}
+FUNCTION {parentheses}
+{ duplicate$ empty$
+{ pop$ "" }
+{ "\abtype{5}{" swap$ * "}" * }
+if$
+}
+INTEGERS { nameptr namesleft numnames }
+FUNCTION {format.names}
+{ 's :=
+#1 'nameptr :=
+s num.names$ 'numnames :=
+numnames 'namesleft :=
+{ namesleft #0 > }
+{ s nameptr "{ff~}{vv~}{ll}{, jj}" format.name$ 't :=
+nameptr #1 >
+{ namesleft #1 >
+{ ", " * t * }
+{ numnames #2 >
+{ "\abphrase{1}" * }
+'skip$
+if$
+t "others" =
+{ "\abphrase{2}" * }
+{ "\abphrase{0}" * t * }
+if$
+}
+if$
+}
+'t
+if$
+nameptr #1 + 'nameptr :=
+namesleft #1 - 'namesleft :=
+}
+while$
+}
+FUNCTION {format.authors}
+{ author empty$
+{ "" }
+{ author format.names capitalize }
+if$
+}
+FUNCTION {format.editors}
+{ editor empty$
+{ "" }
+{ editor format.names capitalize
+editor num.names$ #1 >
+{ "\abphrase{3}" * }
+{ "\abphrase{4}" * }
+if$
+}
+if$
+}
+FUNCTION {format.title}
+{ title empty$
+{ "" }
+{ title "t" change.case$ }
+if$
+}
+FUNCTION {n.dashify}
+{ 't :=
+""
+{ t empty$ not }
+{ t #1 #1 substring$ "-" =
+{ t #1 #2 substring$ "--" = not
+{ "--" *
+t #2 global.max$ substring$ 't :=
+}
+{ { t #1 #1 substring$ "-" = }
+{ "-" *
+t #2 global.max$ substring$ 't :=
+}
+while$
+}
+if$
+}
+{ t #1 #1 substring$ *
+t #2 global.max$ substring$ 't :=
+}
+if$
+}
+while$
+}
+FUNCTION {format.date}
+{ year empty$
+{ month empty$
+{ "" }
+{ "there's a month but no year in " cite$ * warning$
+month parentheses
+}
+if$
+}
+{ month empty$
+{ year parentheses }
+{ month " " * year * parentheses }
+if$
+}
+if$
+}
+FUNCTION {format.btitle}
+{ title quote
+}
+FUNCTION {tie.or.space.connect}
+{ duplicate$ text.length$ #3 <
+{ "~" }
+{ " " }
+if$
+swap$ * *
+}
+FUNCTION {either.or.check}
+{ empty$
+'pop$
+{ "can't use both " swap$ * " fields in " * cite$ * warning$ }
+if$
+}
+FUNCTION {format.bvolume}
+{ volume empty$
+{ "" }
+{ "\abphrase{8}" volume tie.or.space.connect
+series empty$
+'skip$
+{ "\abphrase{5}" * series quote * }
+if$
+"volume and number" number either.or.check
+}
+if$
+}
+FUNCTION {format.number.series}
+{ volume empty$
+{ number empty$
+{ series field.or.null }
+{ output.state mid.sentence = output.state continue.sentence = or
+{ "\abphrase{10}" }
+{ "\abphrase{11}" }
+if$
+number tie.or.space.connect
+series empty$
+{ "there's a number but no series in " cite$ * warning$ }
+{ "\abphrase{6}" * series * }
+if$
+}
+if$
+}
+{ "" }
+if$
+}
+FUNCTION {format.edition}
+{ edition empty$
+{ "" }
+{ output.state mid.sentence = output.state continue.sentence = or
+{ edition "l" change.case$ "\abphrase{12}" * }
+{ edition "t" change.case$ "\abphrase{12}" * }
+if$
+}
+if$
+}
+INTEGERS { multiresult }
+FUNCTION {multi.page.check}
+{ 't :=
+#0 'multiresult :=
+{ multiresult not
+t empty$ not
+and
+}
+{ t #1 #1 substring$
+duplicate$ "-" =
+swap$ duplicate$ "," =
+swap$ "+" =
+or or
+{ #1 'multiresult := }
+{ t #2 global.max$ substring$ 't := }
+if$
+}
+while$
+multiresult
+}
+FUNCTION {format.pages}
+{ pages empty$
+{ "" }
+{ pages multi.page.check
+{ "\abphrase{13}" pages n.dashify tie.or.space.connect }
+{ "\abphrase{14}" pages tie.or.space.connect }
+if$
+}
+if$
+}
+FUNCTION {format.vol.num.pages}
+{ volume field.or.null boldface
+number empty$
+'skip$
+{ "\abtype{4}{" number * "}" * *
+volume empty$
+{ "there's a number but no volume in " cite$ * warning$ }
+'skip$
+if$
+}
+if$
+pages empty$
+'skip$
+{ duplicate$ empty$
+{ pop$ format.pages }
+{ ", " * pages n.dashify * }
+if$
+}
+if$
+}
+FUNCTION {format.chapter.pages}
+{ chapter empty$
+'format.pages
+{ type empty$
+{ "\abphrase{15}" }
+{ type "l" change.case$ }
+if$
+chapter tie.or.space.connect
+pages empty$
+'skip$
+{ ", " * format.pages * }
+if$
+}
+if$
+}
+FUNCTION {format.in.ed.booktitle}
+{ booktitle empty$
+{ "" }
+{ editor empty$
+{ "\abphrase{7}" booktitle quote * }
+{ "\abphrase{7}" format.editors * ", " * booktitle quote * }
+if$
+}
+if$
+}
+FUNCTION {empty.misc.check}
+{ author empty$ title empty$ howpublished empty$
+month empty$ year empty$ note empty$
+and and and and and
+key empty$ not and
+{ "all relevant fields are empty in " cite$ * warning$ }
+'skip$
+if$
+}
+FUNCTION {format.thesis.type}
+{ type empty$
+'skip$
+{ pop$
+type "t" change.case$
+}
+if$
+}
+FUNCTION {format.tr.number}
+{ type empty$
+{ "\abphrase{16}" }
+'type
+if$
+number empty$
+{ "t" change.case$ }
+{ number tie.or.space.connect }
+if$
+}
+FUNCTION {format.article.crossref}
+{ key empty$
+{ journal empty$
+{ "need key or journal for " cite$ * " to crossref " * crossref *
+warning$
+""
+}
+{ "\abphrase{7}" journal emphasize * }
+if$
+}
+{ "\abphrase{7}" key * }
+if$
+" \cite{" * crossref * "}" *
+}
+FUNCTION {format.crossref.editor}
+{ editor #1 "{vv~}{ll}" format.name$
+editor num.names$ duplicate$
+#2 >
+{ pop$ "\abphrase{2}" * }
+{ #2 <
+'skip$
+{ editor #2 "{ff }{vv }{ll}{ jj}" format.name$ "others" =
+{ "\abphrase{2}" * }
+{ "\abphrase{0}" * editor #2 "{vv~}{ll}" format.name$ * }
+if$
+}
+if$
+}
+if$
+}
+FUNCTION {format.book.crossref}
+{ volume empty$
+{ "empty volume in " cite$ * "'s crossref of " * crossref * warning$
+"\abphrase{7}"
+}
+{ "\abphrase{9}" volume tie.or.space.connect
+"\abphrase{5}" *
+}
+if$
+editor empty$
+editor field.or.null author field.or.null =
+or
+{ key empty$
+{ series empty$
+{ "need editor, key, or series for " cite$ * " to crossref " *
+crossref * warning$
+"" *
+}
+{ series quote * }
+if$
+}
+{ key * }
+if$
+}
+{ format.crossref.editor * }
+if$
+" \cite{" * crossref * "}" *
+}
+FUNCTION {format.incoll.inproc.crossref}
+{ editor empty$
+editor field.or.null author field.or.null =
+or
+{ key empty$
+{ booktitle empty$
+{ "need editor, key, or booktitle for " cite$ * " to crossref " *
+crossref * warning$
+""
+}
+{ "\abphrase{7}" booktitle quote * }
+if$
+}
+{ "\abphrase{7}" key * }
+if$
+}
+{ "\abphrase{7}" format.crossref.editor * }
+if$
+" \cite{" * crossref * "}" *
+}
+FUNCTION {article}
+{ output.bibitem
+format.authors "author" output.check
+new.block
+format.title "title" output.check
+new.block
+crossref missing$
+{ journal emphasize "journal" output.check
+format.vol.num.pages output
+format.date "year" output.check
+}
+{ format.article.crossref output.nonnull
+new.clause
+format.pages output
+}
+if$
+new.block
+note output
+fin.entry
+}
+FUNCTION {book}
+{ output.bibitem
+author empty$
+{ format.editors "author and editor" output.check }
+{ format.authors output.nonnull
+crossref missing$
+{ "author and editor" editor either.or.check }
+'skip$
+if$
+}
+if$
+new.block
+format.btitle "title" output.check
+crossref missing$
+{ new.clause
+format.bvolume output
+new.block
+format.number.series output
+new.sentence
+publisher "publisher" output.check
+address new.clause.checka
+address output
+}
+{ new.block
+format.book.crossref output.nonnull
+}
+if$
+edition new.clause.checka
+format.edition output
+format.date "year" output.check
+new.block
+note output
+fin.entry
+}
+FUNCTION {booklet}
+{ output.bibitem
+format.authors output
+new.block
+format.title "title" output.check
+howpublished address new.block.checkb
+howpublished output
+address new.clause.checka
+address output
+format.date output
+new.block
+note output
+fin.entry
+}
+FUNCTION {inbook}
+{ output.bibitem
+author empty$
+{ format.editors "author and editor" output.check }
+{ format.authors output.nonnull
+crossref missing$
+{ "author and editor" editor either.or.check }
+'skip$
+if$
+}
+if$
+new.block
+format.btitle "title" output.check
+new.clause
+crossref missing$
+{ format.bvolume output
+new.clause
+format.chapter.pages "chapter and pages" output.check
+new.block
+format.number.series output
+new.sentence
+publisher "publisher" output.check
+address new.clause.checka
+address output
+}
+{ format.chapter.pages "chapter and pages" output.check
+new.block
+format.book.crossref output.nonnull
+}
+if$
+edition new.clause.checka
+format.edition output
+format.date "year" output.check
+new.block
+note output
+fin.entry
+}
+FUNCTION {incollection}
+{ output.bibitem
+format.authors "author" output.check
+new.block
+format.title "title" output.check
+new.block
+crossref missing$
+{ format.in.ed.booktitle "booktitle" output.check
+new.clause
+format.bvolume output
+new.clause
+format.number.series output
+new.clause
+format.chapter.pages output
+new.sentence
+publisher "publisher" output.check
+address new.clause.checka
+address output
+edition new.clause.checka
+format.edition output
+format.date "year" output.check
+}
+{ format.incoll.inproc.crossref output.nonnull
+new.clause
+format.chapter.pages output
+}
+if$
+new.block
+note output
+fin.entry
+}
+FUNCTION {inproceedings}
+{ output.bibitem
+format.authors "author" output.check
+new.block
+format.title "title" output.check
+new.block
+crossref missing$
+{ format.in.ed.booktitle "booktitle" output.check
+volume new.clause.checka
+format.bvolume output
+number series new.clause.checkb
+format.number.series output
+pages new.clause.checka
+format.pages output
+address empty$
+{ organization publisher new.sentence.checkb
+organization output
+publisher new.clause.checka
+publisher output
+format.date "year" output.check
+}
+{ new.clause
+address output.nonnull
+format.date "year" output.check
+new.sentence
+organization output
+new.clause
+publisher output
+}
+if$
+}
+{ format.incoll.inproc.crossref output.nonnull
+new.clause
+format.pages output
+}
+if$
+new.block
+note output
+fin.entry
+}
+FUNCTION {conference} { inproceedings }
+FUNCTION {manual}
+{ output.bibitem
+author empty$
+{ organization empty$
+'skip$
+{ organization output.nonnull
+new.clause
+address output
+}
+if$
+}
+{ format.authors output.nonnull }
+if$
+new.block
+format.btitle "title" output.check
+author empty$
+{ organization empty$
+{ address new.block.checka
+address output
+}
+'skip$
+if$
+}
+{ organization address new.block.checkb
+organization output
+address new.clause.checka
+address output
+}
+if$
+edition new.clause.checka
+format.edition output
+format.date output
+new.block
+note output
+fin.entry
+}
+FUNCTION {mastersthesis}
+{ output.bibitem
+format.authors "author" output.check
+new.block
+format.title "title" output.check
+new.block
+"\abphrase{17}" format.thesis.type output.nonnull
+new.clause
+school "school" output.check
+address new.clause.checka
+address output
+format.date "year" output.check
+new.block
+note output
+fin.entry
+}
+FUNCTION {misc}
+{ output.bibitem
+format.authors output
+title howpublished new.block.checkb
+format.title output
+howpublished new.block.checka
+howpublished output
+format.date output
+new.block
+note output
+fin.entry
+empty.misc.check
+}
+FUNCTION {phdthesis}
+{ output.bibitem
+format.authors "author" output.check
+new.block
+format.btitle "title" output.check
+new.block
+"\abphrase{18}" format.thesis.type output.nonnull
+new.clause
+school "school" output.check
+address new.clause.checka
+address output
+format.date "year" output.check
+new.block
+note output
+fin.entry
+}
+FUNCTION {proceedings}
+{ output.bibitem
+editor empty$
+{ organization output }
+{ format.editors output.nonnull }
+if$
+new.block
+format.btitle "title" output.check
+volume new.clause.checka
+format.bvolume output
+number series new.clause.checkb
+format.number.series output
+address empty$
+{ editor empty$
+{ publisher new.sentence.checka }
+{ organization publisher new.sentence.checkb
+organization output
+publisher new.clause.checka
+}
+if$
+publisher output
+format.date "year" output.check
+}
+{ new.clause
+address output.nonnull
+format.date "year" output.check
+new.sentence
+editor empty$
+'skip$
+{ organization output
+new.clause
+}
+if$
+publisher output
+}
+if$
+new.block
+note output
+fin.entry
+}
+FUNCTION {techreport}
+{ output.bibitem
+format.authors "author" output.check
+new.block
+format.title "title" output.check
+new.block
+format.tr.number output.nonnull
+new.clause
+institution "institution" output.check
+address new.clause.checka
+address output
+format.date "year" output.check
+new.block
+note output
+fin.entry
+}
+FUNCTION {unpublished}
+{ output.bibitem
+format.authors "author" output.check
+new.block
+format.title "title" output.check
+new.block
+note "note" output.check
+format.date output
+fin.entry
+}
+FUNCTION {default.type} { misc }
+MACRO {jan} {"\abmonth{1}"}
+MACRO {feb} {"\abmonth{2}"}
+MACRO {mar} {"\abmonth{3}"}
+MACRO {apr} {"\abmonth{4}"}
+MACRO {may} {"\abmonth{5}"}
+MACRO {jun} {"\abmonth{6}"}
+MACRO {jul} {"\abmonth{7}"}
+MACRO {aug} {"\abmonth{8}"}
+MACRO {sep} {"\abmonth{9}"}
+MACRO {oct} {"\abmonth{10}"}
+MACRO {nov} {"\abmonth{11}"}
+MACRO {dec} {"\abmonth{12}"}
+MACRO {first} {"\abedition{1}"}
+MACRO {second} {"\abedition{2}"}
+MACRO {third} {"\abedition{3}"}
+MACRO {fourth} {"\abedition{4}"}
+MACRO {fifth} {"\abedition{5}"}
+MACRO {sixth} {"\abedition{6}"}
+MACRO {seventh} {"\abedition{7}"}
+MACRO {eighth} {"\abedition{8}"}
+MACRO {ninth} {"\abedition{9}"}
+MACRO {tenth} {"\abedition{10}"}
+MACRO {section} {"\abchapter{0}"}
+MACRO {paragraph} {"\abchapter{1}"}
+MACRO {appendix} {"\abchapter{2}"}
+MACRO {part} {"\abchapter{3}"}
+READ
+FUNCTION {sortify}
+{ purify$
+"l" change.case$
+}
+INTEGERS { len }
+FUNCTION {chop.word}
+{ 's :=
+'len :=
+s #1 len substring$ =
+{ s len #1 + global.max$ substring$ }
+'s
+if$
+}
+FUNCTION {sort.format.names}
+{ 's :=
+#1 'nameptr :=
+""
+s num.names$ 'numnames :=
+numnames 'namesleft :=
+{ namesleft #0 > }
+{ nameptr #1 >
+{ " " * }
+'skip$
+if$
+s nameptr "{vv{ } }{ll{ }}{ ff{ }}{ jj{ }}" format.name$ 't :=
+nameptr numnames = t "others" = and
+{ "et al" * }
+{ t sortify * }
+if$
+nameptr #1 + 'nameptr :=
+namesleft #1 - 'namesleft :=
+}
+while$
+}
+FUNCTION {sort.format.title}
+{ 't :=
+"A " #2
+"An " #3
+"The " #4 t chop.word
+chop.word
+chop.word
+sortify
+#1 global.max$ substring$
+}
+FUNCTION {author.sort}
+{ author empty$
+{ key empty$
+{ "to sort, need author or key in " cite$ * warning$
+""
+}
+{ key sortify }
+if$
+}
+{ author sort.format.names }
+if$
+}
+FUNCTION {author.editor.sort}
+{ author empty$
+{ editor empty$
+{ key empty$
+{ "to sort, need author, editor, or key in " cite$ * warning$
+""
+}
+{ key sortify }
+if$
+}
+{ editor sort.format.names }
+if$
+}
+{ author sort.format.names }
+if$
+}
+FUNCTION {author.organization.sort}
+{ author empty$
+{ organization empty$
+{ key empty$
+{ "to sort, need author, organization, or key in " cite$ * warning$
+""
+}
+{ key sortify }
+if$
+}
+{ "The " #4 organization chop.word sortify }
+if$
+}
+{ author sort.format.names }
+if$
+}
+FUNCTION {editor.organization.sort}
+{ editor empty$
+{ organization empty$
+{ key empty$
+{ "to sort, need editor, organization, or key in " cite$ * warning$
+""
+}
+{ key sortify }
+if$
+}
+{ "The " #4 organization chop.word sortify }
+if$
+}
+{ editor sort.format.names }
+if$
+}
+FUNCTION {presort}
+{ type$ "book" =
+type$ "inbook" =
+or
+'author.editor.sort
+{ type$ "proceedings" =
+'editor.organization.sort
+{ type$ "manual" =
+'author.organization.sort
+'author.sort
+if$
+}
+if$
+}
+if$
+" "
+*
+year field.or.null sortify
+*
+" "
+*
+title field.or.null
+sort.format.title
+*
+#1 entry.max$ substring$
+'sort.key$ :=
+}
+ITERATE {presort}
+SORT
+STRINGS { longest.label }
+INTEGERS { number.label longest.label.width }
+FUNCTION {initialize.longest.label}
+{ "" 'longest.label :=
+#1 'number.label :=
+#0 'longest.label.width :=
+}
+FUNCTION {longest.label.pass}
+{ number.label int.to.str$ 'label :=
+number.label #1 + 'number.label :=
+label width$ longest.label.width >
+{ label 'longest.label :=
+label width$ 'longest.label.width :=
+}
+'skip$
+if$
+}
+EXECUTE {initialize.longest.label}
+ITERATE {longest.label.pass}
+FUNCTION {begin.bib}
+{
+"\newif\ifabfull\abfulltrue" write$ newline$
+"\input apreambl" write$ newline$
+preamble$ empty$
+'skip$
+{ preamble$ write$ newline$ }
+if$
+"\begin{thebibliography}{" longest.label * "}" * write$ newline$
+}
+EXECUTE {begin.bib}
+EXECUTE {init.state.consts}
+ITERATE {call.type$}
+FUNCTION {end.bib}
+{ newline$
+"\end{thebibliography}" write$ newline$
+}
+EXECUTE {end.bib}
diff --git a/biblio/bibtex/contrib/abstyles-babel/apreambl.tex b/biblio/bibtex/contrib/abstyles-babel/apreambl.tex
new file mode 100644
index 0000000000..51b1022d29
--- /dev/null
+++ b/biblio/bibtex/contrib/abstyles-babel/apreambl.tex
@@ -0,0 +1,200 @@
+% This is APREAMBL.TEX, version 1.10e, written by Hans-Hermann Bode
+% (HHBODE@DOSUNI1.BITNET), for the BibTeX `adaptable' family, version 1.10.
+% See the file APREAMBL.DOC for a detailed documentation.
+
+% This program is distributed WITHOUT ANY WARRANTY, express or implied.
+
+% Copyright (C) 1991, 1992 Hans-Hermann Bode
+
+% Permission is granted to make and distribute verbatim copies of this
+% document provided that the copyright notice and this permission notice
+% are preserved on all copies.
+
+% Permission is granted to copy and distribute modified versions of this
+% document under the conditions for verbatim copying, provided that the
+% entire resulting derived work is distributed under the terms of a
+% permission notice identical to this one.
+
+% This file has been extended for the Spanish language
+% and modified to work with the J.L. Braams' Babel system
+% Tom'as Bautista
+% CAD Division of
+% the Center for Applied Microlectronics,
+% Univ. of Las Palmas de Gran Canaria, Canary Is.
+% June 2nd, 1995.
+
+\ifx\undefined\ifabfull
+ \typeout{*** Please, do not load this file directly ***}
+ \typeout{ It will be loaded when using the adaptable}
+ \typeout{ family BibTeX styles.}
+ \expandafter\endinput
+\fi
+
+\expandafter\ifx\csname__APREAMBLE_TEX\endcsname\relax \else\endinput\fi
+\expandafter\chardef\csname__APREAMBLE_TEX\endcsname=\the\catcode`\@
+\catcode`\@=11
+\gdef\abtype@english{%
+\def\abtype##1##2{%
+\ifcase##1{\sc##2}\or``##2''\or{\em##2\/}\or{\bf##2}\or(##2)\or(##2)\else##2\fi}}
+
+\gdef\abtype@german{%
+\def\abtype##1##2{%
+\ifcase##1{\sc##2}\or\glqq##2\grqq\or{\em##2\/}\or{\bf##2}\or(##2)\or(##2)\else##2\fi}}
+
+\gdef\abtype@spanish{%
+\def\abtype##1##2{%
+\ifcase##1{\sc##2}\or``##2''\or{\em##2\/}\or{\bf##2}\or(##2)\or(##2)\else##2\fi}}
+
+\ifabfull
+
+\gdef\abetc@english{
+
+\def\abphrase##1{%
+\ifcase##1{ and }\or{,}\or{ et~al.}\or{, editors}\or{, editor}\or%
+{ of }\or{ in }\or{In }\or{volume}\or{Volume}\or{number}\or{Number}\or%
+{ edition}\or{pages}\or{page}\or{chapter}\or%
+{Technical Report}\or{Master's thesis}\or{PhD thesis}\fi}
+
+\def\abmonth##1{\ifcase##1\or January\or February\or March\or April\or May\or
+ June\or July\or August\or September\or October\or November\or December\fi}
+
+\def\abedition##1{\ifcase##1\or First\or Second\or Third\or Fourth\or Fifth\or
+ Sixth\or Seventh\or Eighth\or Ninth\or Tenth\else?\fi}
+
+\def\abchapter##1{\ifcase##1Section\or Paragraph\or Appendix\or Part\fi}
+
+}
+
+\else
+
+\gdef\abetc@english{
+
+\def\abphrase##1{%
+\ifcase##1{ and }\or{,}\or{ et~al.}\or{, editors}\or{, editor}\or%
+{ of }\or{ in }\or{In }\or{vol.}\or{Vol.}\or{no.}\or{No.}\or%
+{ ed.}\or{pp.}\or{p.}\or{ch.}\or%
+{Technical Report}\or{Master's thesis}\or{PhD thesis}\fi}
+
+\def\abmonth##1{\ifcase##1\or Jan.\or Feb.\or Mar.\or Apr.\or May\or June\or
+ July\or Aug.\or Sept.\or Oct.\or Nov.\or Dec.\fi}
+
+\def\abedition##1{\ifcase##1\or 1st\or 2nd\or 3rd\or 4th\or 5th\or
+ 6th\or 7th\or 8th\or 9th\or 10th\else?\fi}
+
+\def\abchapter##1{\ifcase##1Sec.\or Par.\or App.\or Part\fi}
+
+}
+
+\fi
+
+\ifabfull
+
+\gdef\abetc@german{
+
+\def\abphrase##1{%
+\ifcase##1{ und }\or{}\or{ und andere}\or%
+{ (Herausgeber)}\or{ (Herausgeber)}\or%
+{ aus }\or{ in }\or{In }\or{Band}\or{Band}\or{Nummer}\or{Nummer}\or%
+{ Auf{\kern0pt}lage}\or{Seiten}\or{Seite}\or{Kapitel}\or%
+{Bericht}\or{Diplomarbeit}\or{Dissertation}\fi}
+
+\def\abmonth##1{\ifcase##1\or Januar\or Februar\or M\"arz\or April\or Mai\or
+ Juni\or Juli\or August\or September\or Oktober\or November\or Dezember\fi}
+
+\def\abedition##1{\ifcase##1\or Erste\or Zweite\or Dritte\or
+ Vierte\or F\"unf\-te\or Sechste\or Siebte\or Achte\or Neunte\or
+ Zehnte\else?\fi}
+
+\def\abchapter##1{\ifcase##1Abschnitt\or Absatz\or Anhang\or Teil\fi}
+
+}
+
+\else
+
+\gdef\abetc@german{
+
+\def\abphrase##1{%
+\ifcase##1{ und }\or{}\or{ u.\thinspace a.}\or{ (Hrsg.)}\or{ (Hrsg.)}\or%
+{ aus }\or{ in }\or{In }\or{Bd.}\or{Bd.}\or{Nr.}\or{Nr.}\or%
+{ Aufl.}\or{S.}\or{S.}\or{Kap.}\or%
+{Bericht}\or{Diplomarbeit}\or{Dissertation}\fi}
+
+\def\abmonth##1{\ifcase##1\or Jan.\or Feb.\or M\"arz\or Apr.\or Mai\or
+ Juni\or Juli\or Aug.\or Sep.\or Okt.\or Nov.\or Dez.\fi}
+
+\def\abedition##1{\ifcase##1\or 1.\or 2.\or 3.\or 4.\or 5.\or
+ 6.\or 7.\or 8.\or 9.\or 10.\else?\fi}
+
+\def\abchapter##1{\ifcase##1Abschn.\or Abs.\or Anh.\or Teil\fi}
+
+}
+
+\fi
+
+\ifabfull
+
+\gdef\abetc@spanish{
+
+\def\abphrase##1{%
+\ifcase##1{ y }\or{}\or{ et~al.}\or{, editores}\or{, editor}\or%
+{ de }\or{ en }\or{En }\or{tomo}\or{Tomo}\or{n\'umero}\or{N\'umero}\or%
+{ edici\'on}\or{p\'aginas}\or{p\'agina}\or{cap\'{\i}tulo}\or%
+{Informe t'ecnico}\or{Proyecto Fin de Carrera}\or{Tesis Doctoral}\fi}
+
+\def\abmonth##1{\ifcase##1\or enero\or febrero\or marzo\or abril\or mayo\or
+ junio\or julio\or agosto\or septiembre\or octubre\or noviembre\or
+ diciembre\fi}
+
+\def\abedition##1{\ifcase##1\or Primera\or Segunda\or Tercera\or
+ Cuarta\or Quinta\or Sexta\or S\'eptima\or Octava\or Novena\or
+ D\'ecima\else?\fi}
+
+\def\abchapter##1{\ifcase##1Apartado\or P\'arrafo\or Ap\'endice\or Parte\fi}
+
+}
+
+\else
+
+\gdef\abetc@spanish{
+
+\def\abphrase##1{%
+\ifcase##1{ y }\or{}\or{ et~al.}\or{, editores}\or{, editor}\or%
+{ de }\or{ en }\or{En }\or{vol.}\or{Vol.}\or%
+{n\raise1ex\hbox{\underbar{\scriptsize o}}}\or%
+{N\raise1ex\hbox{\underbar{\scriptsize o}}}\or%
+{ ed.}\or{p\'ags.}\or{p\'ag.}\or{cap.}\or%
+{Informe t'ecnico}\or{Proyecto Fin de Carrera}\or{Tesis Doctoral}\fi}
+
+\def\abmonth##1{\ifcase##1\or ene.\or feb.\or mar.\or abr.\or mayo\or jun.\or
+ jul.\or ago.\or sept.\or oct.\or nov.\or dic.\fi}
+
+\def\abedition##1{\ifcase##1\or 1\raise1ex\hbox{\underbar{\scriptsize a}}\or
+ 2\raise1ex\hbox{\underbar{\scriptsize a}}\or
+ 3\raise1ex\hbox{\underbar{\scriptsize a}}\or
+ 4\raise1ex\hbox{\underbar{\scriptsize a}}\or
+ 5\raise1ex\hbox{\underbar{\scriptsize a}}\or
+ 6\raise1ex\hbox{\underbar{\scriptsize a}}\or
+ 7\raise1ex\hbox{\underbar{\scriptsize a}}\or
+ 8\raise1ex\hbox{\underbar{\scriptsize a}}\or
+ 9\raise1ex\hbox{\underbar{\scriptsize a}}\or
+ 10\raise1ex\hbox{\underbar{\scriptsize a}}\else?\fi}
+
+\def\abchapter##1{\ifcase##1Apartado\or P\'ar.\or Ap\'endice\or Parte\fi}
+
+}
+
+\fi
+
+\ifx\undefined\iflanguage
+ \abtype@english \abetc@english
+\else
+ \abtype@english \abetc@english % This is the deafult option, in case
+ % your language is not supported.
+% \iflanguage{english}{\abtype@english \abetc@english}{}
+ \iflanguage{german}{\abtype@german \abetc@german}{}
+ \iflanguage{spanish}{\abtype@spanish \abetc@spanish}{}
+\fi
+
+\catcode`\@=\csname__APREAMBLE_TEX\endcsname
+
+\endinput
diff --git a/biblio/bibtex/contrib/abstyles-babel/aunsnot.bst b/biblio/bibtex/contrib/abstyles-babel/aunsnot.bst
new file mode 100644
index 0000000000..6a918d201e
--- /dev/null
+++ b/biblio/bibtex/contrib/abstyles-babel/aunsnot.bst
@@ -0,0 +1,941 @@
+% BibTeX bibliography style `AUNSNOT'
+ENTRY
+{ address
+author
+booktitle
+chapter
+edition
+editor
+howpublished
+institution
+journal
+key
+month
+note
+number
+organization
+pages
+publisher
+school
+series
+title
+type
+volume
+year
+}
+{}
+{ label }
+INTEGERS { output.state before.all mid.sentence after.sentence after.block
+continue.sentence }
+FUNCTION {init.state.consts}
+{ #0 'before.all :=
+#1 'mid.sentence :=
+#2 'after.sentence :=
+#3 'after.block :=
+#4 'continue.sentence :=
+}
+STRINGS { s t }
+FUNCTION {output.nonnull}
+{ 's :=
+output.state continue.sentence =
+{ " " * write$ }
+{ output.state mid.sentence =
+{ ", " * write$ }
+{ output.state after.block =
+{ add.period$ write$
+newline$
+"\newblock " write$
+}
+{ output.state before.all =
+'write$
+{ add.period$ " " * write$ }
+if$
+}
+if$
+}
+if$
+continue.sentence 'output.state :=
+}
+if$
+s
+}
+FUNCTION {output}
+{ duplicate$ empty$
+'pop$
+'output.nonnull
+if$
+}
+FUNCTION {output.check}
+{ 't :=
+duplicate$ empty$
+{ pop$ "empty " t * " in " * cite$ * warning$ }
+'output.nonnull
+if$
+}
+FUNCTION {output.bibitem}
+{ newline$
+"\bibitem{" write$
+cite$ write$
+"}" write$
+newline$
+""
+before.all 'output.state :=
+}
+FUNCTION {fin.entry}
+{ add.period$
+write$
+newline$
+}
+FUNCTION {new.block}
+{ output.state before.all =
+'skip$
+{ after.block 'output.state := }
+if$
+}
+FUNCTION {new.sentence}
+{ output.state after.block =
+'skip$
+{ output.state before.all =
+'skip$
+{ after.sentence 'output.state := }
+if$
+}
+if$
+}
+FUNCTION {new.clause}
+{ output.state after.sentence =
+'skip$
+{ output.state after.block =
+'skip$
+{ output.state before.all =
+'skip$
+{ mid.sentence 'output.state := }
+if$
+}
+if$
+}
+if$
+}
+FUNCTION {not}
+{ { #0 }
+{ #1 }
+if$
+}
+FUNCTION {and}
+{ 'skip$
+{ pop$ #0 }
+if$
+}
+FUNCTION {or}
+{ { pop$ #1 }
+'skip$
+if$
+}
+FUNCTION {new.block.checka}
+{ empty$
+'skip$
+'new.block
+if$
+}
+FUNCTION {new.block.checkb}
+{ empty$
+swap$ empty$
+and
+'skip$
+'new.block
+if$
+}
+FUNCTION {new.sentence.checka}
+{ empty$
+'skip$
+'new.sentence
+if$
+}
+FUNCTION {new.sentence.checkb}
+{ empty$
+swap$ empty$
+and
+'skip$
+'new.sentence
+if$
+}
+FUNCTION {new.clause.checka}
+{ empty$
+'skip$
+'new.clause
+if$
+}
+FUNCTION {new.clause.checkb}
+{ empty$
+swap$ empty$
+and
+'skip$
+'new.clause
+if$
+}
+FUNCTION {field.or.null}
+{ duplicate$ empty$
+{ pop$ "" }
+'skip$
+if$
+}
+FUNCTION {emphasize}
+{ duplicate$ empty$
+{ pop$ "" }
+{ "\abtype{2}{" swap$ * "}" * }
+if$
+}
+FUNCTION {capitalize}
+{ duplicate$ empty$
+{ pop$ "" }
+{ "\abtype{0}{" swap$ * "}" * }
+if$
+}
+FUNCTION {boldface}
+{ duplicate$ empty$
+{ pop$ "" }
+{ "\abtype{3}{" swap$ * "}" * }
+if$
+}
+FUNCTION {quote}
+{ duplicate$ empty$
+{ pop$ "" }
+{ "\abtype{1}{" swap$ * "}" * }
+if$
+}
+FUNCTION {parentheses}
+{ duplicate$ empty$
+{ pop$ "" }
+{ "\abtype{5}{" swap$ * "}" * }
+if$
+}
+INTEGERS { nameptr namesleft numnames }
+FUNCTION {format.names}
+{ 's :=
+#1 'nameptr :=
+s num.names$ 'numnames :=
+numnames 'namesleft :=
+{ namesleft #0 > }
+{ s nameptr "{f.~}{vv~}{ll}{, jj}" format.name$ 't :=
+nameptr #1 >
+{ namesleft #1 >
+{ ", " * t * }
+{ numnames #2 >
+{ "\abphrase{1}" * }
+'skip$
+if$
+t "others" =
+{ "\abphrase{2}" * }
+{ "\abphrase{0}" * t * }
+if$
+}
+if$
+}
+'t
+if$
+nameptr #1 + 'nameptr :=
+namesleft #1 - 'namesleft :=
+}
+while$
+}
+FUNCTION {format.authors}
+{ author empty$
+{ "" }
+{ author format.names capitalize }
+if$
+}
+FUNCTION {format.editors}
+{ editor empty$
+{ "" }
+{ editor format.names capitalize
+editor num.names$ #1 >
+{ "\abphrase{3}" * }
+{ "\abphrase{4}" * }
+if$
+}
+if$
+}
+FUNCTION {format.title}
+{ title empty$
+{ "" }
+{ title "t" change.case$ }
+if$
+}
+FUNCTION {n.dashify}
+{ 't :=
+""
+{ t empty$ not }
+{ t #1 #1 substring$ "-" =
+{ t #1 #2 substring$ "--" = not
+{ "--" *
+t #2 global.max$ substring$ 't :=
+}
+{ { t #1 #1 substring$ "-" = }
+{ "-" *
+t #2 global.max$ substring$ 't :=
+}
+while$
+}
+if$
+}
+{ t #1 #1 substring$ *
+t #2 global.max$ substring$ 't :=
+}
+if$
+}
+while$
+}
+FUNCTION {format.date}
+{ year empty$
+{ month empty$
+{ "" }
+{ "there's a month but no year in " cite$ * warning$
+month parentheses
+}
+if$
+}
+{ month empty$
+{ year parentheses }
+{ month " " * year * parentheses }
+if$
+}
+if$
+}
+FUNCTION {format.btitle}
+{ title quote
+}
+FUNCTION {tie.or.space.connect}
+{ duplicate$ text.length$ #3 <
+{ "~" }
+{ " " }
+if$
+swap$ * *
+}
+FUNCTION {either.or.check}
+{ empty$
+'pop$
+{ "can't use both " swap$ * " fields in " * cite$ * warning$ }
+if$
+}
+FUNCTION {format.bvolume}
+{ volume empty$
+{ "" }
+{ "\abphrase{8}" volume tie.or.space.connect
+series empty$
+'skip$
+{ "\abphrase{5}" * series quote * }
+if$
+"volume and number" number either.or.check
+}
+if$
+}
+FUNCTION {format.number.series}
+{ volume empty$
+{ number empty$
+{ series field.or.null }
+{ output.state mid.sentence = output.state continue.sentence = or
+{ "\abphrase{10}" }
+{ "\abphrase{11}" }
+if$
+number tie.or.space.connect
+series empty$
+{ "there's a number but no series in " cite$ * warning$ }
+{ "\abphrase{6}" * series * }
+if$
+}
+if$
+}
+{ "" }
+if$
+}
+FUNCTION {format.edition}
+{ edition empty$
+{ "" }
+{ output.state mid.sentence = output.state continue.sentence = or
+{ edition "l" change.case$ "\abphrase{12}" * }
+{ edition "t" change.case$ "\abphrase{12}" * }
+if$
+}
+if$
+}
+INTEGERS { multiresult }
+FUNCTION {multi.page.check}
+{ 't :=
+#0 'multiresult :=
+{ multiresult not
+t empty$ not
+and
+}
+{ t #1 #1 substring$
+duplicate$ "-" =
+swap$ duplicate$ "," =
+swap$ "+" =
+or or
+{ #1 'multiresult := }
+{ t #2 global.max$ substring$ 't := }
+if$
+}
+while$
+multiresult
+}
+FUNCTION {format.pages}
+{ pages empty$
+{ "" }
+{ pages multi.page.check
+{ "\abphrase{13}" pages n.dashify tie.or.space.connect }
+{ "\abphrase{14}" pages tie.or.space.connect }
+if$
+}
+if$
+}
+FUNCTION {format.vol.num.pages}
+{ volume field.or.null boldface
+number empty$
+'skip$
+{ "\abtype{4}{" number * "}" * *
+volume empty$
+{ "there's a number but no volume in " cite$ * warning$ }
+'skip$
+if$
+}
+if$
+pages empty$
+'skip$
+{ duplicate$ empty$
+{ pop$ format.pages }
+{ ", " * pages n.dashify * }
+if$
+}
+if$
+}
+FUNCTION {format.chapter.pages}
+{ chapter empty$
+'format.pages
+{ type empty$
+{ "\abphrase{15}" }
+{ type "l" change.case$ }
+if$
+chapter tie.or.space.connect
+pages empty$
+'skip$
+{ ", " * format.pages * }
+if$
+}
+if$
+}
+FUNCTION {format.in.ed.booktitle}
+{ booktitle empty$
+{ "" }
+{ editor empty$
+{ "\abphrase{7}" booktitle quote * }
+{ "\abphrase{7}" format.editors * ", " * booktitle quote * }
+if$
+}
+if$
+}
+FUNCTION {empty.misc.check}
+{ author empty$ title empty$ howpublished empty$
+month empty$ year empty$ note empty$
+and and and and and
+{ "all relevant fields are empty in " cite$ * warning$ }
+'skip$
+if$
+}
+FUNCTION {format.thesis.type}
+{ type empty$
+'skip$
+{ pop$
+type "t" change.case$
+}
+if$
+}
+FUNCTION {format.tr.number}
+{ type empty$
+{ "\abphrase{16}" }
+'type
+if$
+number empty$
+{ "t" change.case$ }
+{ number tie.or.space.connect }
+if$
+}
+FUNCTION {format.article.crossref}
+{ key empty$
+{ journal empty$
+{ "need key or journal for " cite$ * " to crossref " * crossref *
+warning$
+""
+}
+{ "\abphrase{7}" journal emphasize * }
+if$
+}
+{ "\abphrase{7}" key * }
+if$
+" \cite{" * crossref * "}" *
+}
+FUNCTION {format.crossref.editor}
+{ editor #1 "{vv~}{ll}" format.name$
+editor num.names$ duplicate$
+#2 >
+{ pop$ "\abphrase{2}" * }
+{ #2 <
+'skip$
+{ editor #2 "{ff }{vv }{ll}{ jj}" format.name$ "others" =
+{ "\abphrase{2}" * }
+{ "\abphrase{0}" * editor #2 "{vv~}{ll}" format.name$ * }
+if$
+}
+if$
+}
+if$
+}
+FUNCTION {format.book.crossref}
+{ volume empty$
+{ "empty volume in " cite$ * "'s crossref of " * crossref * warning$
+"\abphrase{7}"
+}
+{ "\abphrase{9}" volume tie.or.space.connect
+"\abphrase{5}" *
+}
+if$
+editor empty$
+editor field.or.null author field.or.null =
+or
+{ key empty$
+{ series empty$
+{ "need editor, key, or series for " cite$ * " to crossref " *
+crossref * warning$
+"" *
+}
+{ series quote * }
+if$
+}
+{ key * }
+if$
+}
+{ format.crossref.editor * }
+if$
+" \cite{" * crossref * "}" *
+}
+FUNCTION {format.incoll.inproc.crossref}
+{ editor empty$
+editor field.or.null author field.or.null =
+or
+{ key empty$
+{ booktitle empty$
+{ "need editor, key, or booktitle for " cite$ * " to crossref " *
+crossref * warning$
+""
+}
+{ "\abphrase{7}" booktitle quote * }
+if$
+}
+{ "\abphrase{7}" key * }
+if$
+}
+{ "\abphrase{7}" format.crossref.editor * }
+if$
+" \cite{" * crossref * "}" *
+}
+FUNCTION {article}
+{ output.bibitem
+format.authors "author" output.check
+new.block
+crossref missing$
+{ journal emphasize "journal" output.check
+format.vol.num.pages output
+format.date "year" output.check
+}
+{ format.article.crossref output.nonnull
+new.clause
+format.pages output
+}
+if$
+new.block
+note output
+fin.entry
+}
+FUNCTION {book}
+{ output.bibitem
+author empty$
+{ format.editors "author and editor" output.check }
+{ format.authors output.nonnull
+crossref missing$
+{ "author and editor" editor either.or.check }
+'skip$
+if$
+}
+if$
+new.block
+format.btitle "title" output.check
+crossref missing$
+{ new.clause
+format.bvolume output
+new.block
+format.number.series output
+new.sentence
+publisher "publisher" output.check
+address new.clause.checka
+address output
+}
+{ new.block
+format.book.crossref output.nonnull
+}
+if$
+edition new.clause.checka
+format.edition output
+format.date "year" output.check
+new.block
+note output
+fin.entry
+}
+FUNCTION {booklet}
+{ output.bibitem
+format.authors output
+new.block
+format.title "title" output.check
+howpublished address new.block.checkb
+howpublished output
+address new.clause.checka
+address output
+format.date output
+new.block
+note output
+fin.entry
+}
+FUNCTION {inbook}
+{ output.bibitem
+author empty$
+{ format.editors "author and editor" output.check }
+{ format.authors output.nonnull
+crossref missing$
+{ "author and editor" editor either.or.check }
+'skip$
+if$
+}
+if$
+new.block
+format.btitle "title" output.check
+new.clause
+crossref missing$
+{ format.bvolume output
+new.clause
+format.chapter.pages "chapter and pages" output.check
+new.block
+format.number.series output
+new.sentence
+publisher "publisher" output.check
+address new.clause.checka
+address output
+}
+{ format.chapter.pages "chapter and pages" output.check
+new.block
+format.book.crossref output.nonnull
+}
+if$
+edition new.clause.checka
+format.edition output
+format.date "year" output.check
+new.block
+note output
+fin.entry
+}
+FUNCTION {incollection}
+{ output.bibitem
+format.authors "author" output.check
+new.block
+chapter empty$ pages empty$ and
+{
+format.title "title" output.check
+new.block
+}
+'skip$
+if$
+crossref missing$
+{ format.in.ed.booktitle "booktitle" output.check
+new.clause
+format.bvolume output
+new.clause
+format.number.series output
+new.clause
+format.chapter.pages output
+new.sentence
+publisher "publisher" output.check
+address new.clause.checka
+address output
+edition new.clause.checka
+format.edition output
+format.date "year" output.check
+}
+{ format.incoll.inproc.crossref output.nonnull
+new.clause
+format.chapter.pages output
+}
+if$
+new.block
+note output
+fin.entry
+}
+FUNCTION {inproceedings}
+{ output.bibitem
+format.authors "author" output.check
+new.block
+pages empty$
+{
+format.title "title" output.check
+new.block
+}
+'skip$
+if$
+crossref missing$
+{ format.in.ed.booktitle "booktitle" output.check
+volume new.clause.checka
+format.bvolume output
+number series new.clause.checkb
+format.number.series output
+pages new.clause.checka
+format.pages output
+address empty$
+{ organization publisher new.sentence.checkb
+organization output
+publisher new.clause.checka
+publisher output
+format.date "year" output.check
+}
+{ new.clause
+address output.nonnull
+format.date "year" output.check
+new.sentence
+organization output
+new.clause
+publisher output
+}
+if$
+}
+{ format.incoll.inproc.crossref output.nonnull
+new.clause
+format.pages output
+}
+if$
+new.block
+note output
+fin.entry
+}
+FUNCTION {conference} { inproceedings }
+FUNCTION {manual}
+{ output.bibitem
+author empty$
+{ organization empty$
+'skip$
+{ organization output.nonnull
+new.clause
+address output
+}
+if$
+}
+{ format.authors output.nonnull }
+if$
+new.block
+format.btitle "title" output.check
+author empty$
+{ organization empty$
+{ address new.block.checka
+address output
+}
+'skip$
+if$
+}
+{ organization address new.block.checkb
+organization output
+address new.clause.checka
+address output
+}
+if$
+edition new.clause.checka
+format.edition output
+format.date output
+new.block
+note output
+fin.entry
+}
+FUNCTION {mastersthesis}
+{ output.bibitem
+format.authors "author" output.check
+new.block
+format.title "title" output.check
+new.block
+"\abphrase{17}" format.thesis.type output.nonnull
+new.clause
+school "school" output.check
+address new.clause.checka
+address output
+format.date "year" output.check
+new.block
+note output
+fin.entry
+}
+FUNCTION {misc}
+{ output.bibitem
+format.authors output
+title howpublished new.block.checkb
+format.title output
+howpublished new.block.checka
+howpublished output
+format.date output
+new.block
+note output
+fin.entry
+empty.misc.check
+}
+FUNCTION {phdthesis}
+{ output.bibitem
+format.authors "author" output.check
+new.block
+format.btitle "title" output.check
+new.block
+"\abphrase{18}" format.thesis.type output.nonnull
+new.clause
+school "school" output.check
+address new.clause.checka
+address output
+format.date "year" output.check
+new.block
+note output
+fin.entry
+}
+FUNCTION {proceedings}
+{ output.bibitem
+editor empty$
+{ organization output }
+{ format.editors output.nonnull }
+if$
+new.block
+format.btitle "title" output.check
+volume new.clause.checka
+format.bvolume output
+number series new.clause.checkb
+format.number.series output
+address empty$
+{ editor empty$
+{ publisher new.sentence.checka }
+{ organization publisher new.sentence.checkb
+organization output
+publisher new.clause.checka
+}
+if$
+publisher output
+format.date "year" output.check
+}
+{ new.clause
+address output.nonnull
+format.date "year" output.check
+new.sentence
+editor empty$
+'skip$
+{ organization output
+new.clause
+}
+if$
+publisher output
+}
+if$
+new.block
+note output
+fin.entry
+}
+FUNCTION {techreport}
+{ output.bibitem
+format.authors "author" output.check
+new.block
+number empty$
+{
+format.title "title" output.check
+new.block
+}
+'skip$
+if$
+format.tr.number output.nonnull
+new.clause
+institution "institution" output.check
+address new.clause.checka
+address output
+format.date "year" output.check
+new.block
+note output
+fin.entry
+}
+FUNCTION {unpublished}
+{ output.bibitem
+format.authors "author" output.check
+new.block
+format.title "title" output.check
+new.block
+note "note" output.check
+format.date output
+fin.entry
+}
+FUNCTION {default.type} { misc }
+MACRO {jan} {"\abmonth{1}"}
+MACRO {feb} {"\abmonth{2}"}
+MACRO {mar} {"\abmonth{3}"}
+MACRO {apr} {"\abmonth{4}"}
+MACRO {may} {"\abmonth{5}"}
+MACRO {jun} {"\abmonth{6}"}
+MACRO {jul} {"\abmonth{7}"}
+MACRO {aug} {"\abmonth{8}"}
+MACRO {sep} {"\abmonth{9}"}
+MACRO {oct} {"\abmonth{10}"}
+MACRO {nov} {"\abmonth{11}"}
+MACRO {dec} {"\abmonth{12}"}
+MACRO {first} {"\abedition{1}"}
+MACRO {second} {"\abedition{2}"}
+MACRO {third} {"\abedition{3}"}
+MACRO {fourth} {"\abedition{4}"}
+MACRO {fifth} {"\abedition{5}"}
+MACRO {sixth} {"\abedition{6}"}
+MACRO {seventh} {"\abedition{7}"}
+MACRO {eighth} {"\abedition{8}"}
+MACRO {ninth} {"\abedition{9}"}
+MACRO {tenth} {"\abedition{10}"}
+MACRO {section} {"\abchapter{0}"}
+MACRO {paragraph} {"\abchapter{1}"}
+MACRO {appendix} {"\abchapter{2}"}
+MACRO {part} {"\abchapter{3}"}
+READ
+STRINGS { longest.label }
+INTEGERS { number.label longest.label.width }
+FUNCTION {initialize.longest.label}
+{ "" 'longest.label :=
+#1 'number.label :=
+#0 'longest.label.width :=
+}
+FUNCTION {longest.label.pass}
+{ number.label int.to.str$ 'label :=
+number.label #1 + 'number.label :=
+label width$ longest.label.width >
+{ label 'longest.label :=
+label width$ 'longest.label.width :=
+}
+'skip$
+if$
+}
+EXECUTE {initialize.longest.label}
+ITERATE {longest.label.pass}
+FUNCTION {begin.bib}
+{
+"\newif\ifabfull\abfullfalse" write$ newline$
+"\input apreambl" write$ newline$
+preamble$ empty$
+'skip$
+{ preamble$ write$ newline$ }
+if$
+"\begin{thebibliography}{" longest.label * "}" * write$ newline$
+}
+EXECUTE {begin.bib}
+EXECUTE {init.state.consts}
+ITERATE {call.type$}
+FUNCTION {end.bib}
+{ newline$
+"\end{thebibliography}" write$ newline$
+}
+EXECUTE {end.bib}
diff --git a/biblio/bibtex/contrib/abstyles-babel/aunsrt.bst b/biblio/bibtex/contrib/abstyles-babel/aunsrt.bst
new file mode 100644
index 0000000000..a610403e42
--- /dev/null
+++ b/biblio/bibtex/contrib/abstyles-babel/aunsrt.bst
@@ -0,0 +1,928 @@
+% BibTeX bibliography style `AUNSRT'
+ENTRY
+{ address
+author
+booktitle
+chapter
+edition
+editor
+howpublished
+institution
+journal
+key
+month
+note
+number
+organization
+pages
+publisher
+school
+series
+title
+type
+volume
+year
+}
+{}
+{ label }
+INTEGERS { output.state before.all mid.sentence after.sentence after.block
+continue.sentence }
+FUNCTION {init.state.consts}
+{ #0 'before.all :=
+#1 'mid.sentence :=
+#2 'after.sentence :=
+#3 'after.block :=
+#4 'continue.sentence :=
+}
+STRINGS { s t }
+FUNCTION {output.nonnull}
+{ 's :=
+output.state continue.sentence =
+{ " " * write$ }
+{ output.state mid.sentence =
+{ ", " * write$ }
+{ output.state after.block =
+{ add.period$ write$
+newline$
+"\newblock " write$
+}
+{ output.state before.all =
+'write$
+{ add.period$ " " * write$ }
+if$
+}
+if$
+}
+if$
+continue.sentence 'output.state :=
+}
+if$
+s
+}
+FUNCTION {output}
+{ duplicate$ empty$
+'pop$
+'output.nonnull
+if$
+}
+FUNCTION {output.check}
+{ 't :=
+duplicate$ empty$
+{ pop$ "empty " t * " in " * cite$ * warning$ }
+'output.nonnull
+if$
+}
+FUNCTION {output.bibitem}
+{ newline$
+"\bibitem{" write$
+cite$ write$
+"}" write$
+newline$
+""
+before.all 'output.state :=
+}
+FUNCTION {fin.entry}
+{ add.period$
+write$
+newline$
+}
+FUNCTION {new.block}
+{ output.state before.all =
+'skip$
+{ after.block 'output.state := }
+if$
+}
+FUNCTION {new.sentence}
+{ output.state after.block =
+'skip$
+{ output.state before.all =
+'skip$
+{ after.sentence 'output.state := }
+if$
+}
+if$
+}
+FUNCTION {new.clause}
+{ output.state after.sentence =
+'skip$
+{ output.state after.block =
+'skip$
+{ output.state before.all =
+'skip$
+{ mid.sentence 'output.state := }
+if$
+}
+if$
+}
+if$
+}
+FUNCTION {not}
+{ { #0 }
+{ #1 }
+if$
+}
+FUNCTION {and}
+{ 'skip$
+{ pop$ #0 }
+if$
+}
+FUNCTION {or}
+{ { pop$ #1 }
+'skip$
+if$
+}
+FUNCTION {new.block.checka}
+{ empty$
+'skip$
+'new.block
+if$
+}
+FUNCTION {new.block.checkb}
+{ empty$
+swap$ empty$
+and
+'skip$
+'new.block
+if$
+}
+FUNCTION {new.sentence.checka}
+{ empty$
+'skip$
+'new.sentence
+if$
+}
+FUNCTION {new.sentence.checkb}
+{ empty$
+swap$ empty$
+and
+'skip$
+'new.sentence
+if$
+}
+FUNCTION {new.clause.checka}
+{ empty$
+'skip$
+'new.clause
+if$
+}
+FUNCTION {new.clause.checkb}
+{ empty$
+swap$ empty$
+and
+'skip$
+'new.clause
+if$
+}
+FUNCTION {field.or.null}
+{ duplicate$ empty$
+{ pop$ "" }
+'skip$
+if$
+}
+FUNCTION {emphasize}
+{ duplicate$ empty$
+{ pop$ "" }
+{ "\abtype{2}{" swap$ * "}" * }
+if$
+}
+FUNCTION {capitalize}
+{ duplicate$ empty$
+{ pop$ "" }
+{ "\abtype{0}{" swap$ * "}" * }
+if$
+}
+FUNCTION {boldface}
+{ duplicate$ empty$
+{ pop$ "" }
+{ "\abtype{3}{" swap$ * "}" * }
+if$
+}
+FUNCTION {quote}
+{ duplicate$ empty$
+{ pop$ "" }
+{ "\abtype{1}{" swap$ * "}" * }
+if$
+}
+FUNCTION {parentheses}
+{ duplicate$ empty$
+{ pop$ "" }
+{ "\abtype{5}{" swap$ * "}" * }
+if$
+}
+INTEGERS { nameptr namesleft numnames }
+FUNCTION {format.names}
+{ 's :=
+#1 'nameptr :=
+s num.names$ 'numnames :=
+numnames 'namesleft :=
+{ namesleft #0 > }
+{ s nameptr "{ff~}{vv~}{ll}{, jj}" format.name$ 't :=
+nameptr #1 >
+{ namesleft #1 >
+{ ", " * t * }
+{ numnames #2 >
+{ "\abphrase{1}" * }
+'skip$
+if$
+t "others" =
+{ "\abphrase{2}" * }
+{ "\abphrase{0}" * t * }
+if$
+}
+if$
+}
+'t
+if$
+nameptr #1 + 'nameptr :=
+namesleft #1 - 'namesleft :=
+}
+while$
+}
+FUNCTION {format.authors}
+{ author empty$
+{ "" }
+{ author format.names capitalize }
+if$
+}
+FUNCTION {format.editors}
+{ editor empty$
+{ "" }
+{ editor format.names capitalize
+editor num.names$ #1 >
+{ "\abphrase{3}" * }
+{ "\abphrase{4}" * }
+if$
+}
+if$
+}
+FUNCTION {format.title}
+{ title empty$
+{ "" }
+{ title "t" change.case$ }
+if$
+}
+FUNCTION {n.dashify}
+{ 't :=
+""
+{ t empty$ not }
+{ t #1 #1 substring$ "-" =
+{ t #1 #2 substring$ "--" = not
+{ "--" *
+t #2 global.max$ substring$ 't :=
+}
+{ { t #1 #1 substring$ "-" = }
+{ "-" *
+t #2 global.max$ substring$ 't :=
+}
+while$
+}
+if$
+}
+{ t #1 #1 substring$ *
+t #2 global.max$ substring$ 't :=
+}
+if$
+}
+while$
+}
+FUNCTION {format.date}
+{ year empty$
+{ month empty$
+{ "" }
+{ "there's a month but no year in " cite$ * warning$
+month parentheses
+}
+if$
+}
+{ month empty$
+{ year parentheses }
+{ month " " * year * parentheses }
+if$
+}
+if$
+}
+FUNCTION {format.btitle}
+{ title quote
+}
+FUNCTION {tie.or.space.connect}
+{ duplicate$ text.length$ #3 <
+{ "~" }
+{ " " }
+if$
+swap$ * *
+}
+FUNCTION {either.or.check}
+{ empty$
+'pop$
+{ "can't use both " swap$ * " fields in " * cite$ * warning$ }
+if$
+}
+FUNCTION {format.bvolume}
+{ volume empty$
+{ "" }
+{ "\abphrase{8}" volume tie.or.space.connect
+series empty$
+'skip$
+{ "\abphrase{5}" * series quote * }
+if$
+"volume and number" number either.or.check
+}
+if$
+}
+FUNCTION {format.number.series}
+{ volume empty$
+{ number empty$
+{ series field.or.null }
+{ output.state mid.sentence = output.state continue.sentence = or
+{ "\abphrase{10}" }
+{ "\abphrase{11}" }
+if$
+number tie.or.space.connect
+series empty$
+{ "there's a number but no series in " cite$ * warning$ }
+{ "\abphrase{6}" * series * }
+if$
+}
+if$
+}
+{ "" }
+if$
+}
+FUNCTION {format.edition}
+{ edition empty$
+{ "" }
+{ output.state mid.sentence = output.state continue.sentence = or
+{ edition "l" change.case$ "\abphrase{12}" * }
+{ edition "t" change.case$ "\abphrase{12}" * }
+if$
+}
+if$
+}
+INTEGERS { multiresult }
+FUNCTION {multi.page.check}
+{ 't :=
+#0 'multiresult :=
+{ multiresult not
+t empty$ not
+and
+}
+{ t #1 #1 substring$
+duplicate$ "-" =
+swap$ duplicate$ "," =
+swap$ "+" =
+or or
+{ #1 'multiresult := }
+{ t #2 global.max$ substring$ 't := }
+if$
+}
+while$
+multiresult
+}
+FUNCTION {format.pages}
+{ pages empty$
+{ "" }
+{ pages multi.page.check
+{ "\abphrase{13}" pages n.dashify tie.or.space.connect }
+{ "\abphrase{14}" pages tie.or.space.connect }
+if$
+}
+if$
+}
+FUNCTION {format.vol.num.pages}
+{ volume field.or.null boldface
+number empty$
+'skip$
+{ "\abtype{4}{" number * "}" * *
+volume empty$
+{ "there's a number but no volume in " cite$ * warning$ }
+'skip$
+if$
+}
+if$
+pages empty$
+'skip$
+{ duplicate$ empty$
+{ pop$ format.pages }
+{ ", " * pages n.dashify * }
+if$
+}
+if$
+}
+FUNCTION {format.chapter.pages}
+{ chapter empty$
+'format.pages
+{ type empty$
+{ "\abphrase{15}" }
+{ type "l" change.case$ }
+if$
+chapter tie.or.space.connect
+pages empty$
+'skip$
+{ ", " * format.pages * }
+if$
+}
+if$
+}
+FUNCTION {format.in.ed.booktitle}
+{ booktitle empty$
+{ "" }
+{ editor empty$
+{ "\abphrase{7}" booktitle quote * }
+{ "\abphrase{7}" format.editors * ", " * booktitle quote * }
+if$
+}
+if$
+}
+FUNCTION {empty.misc.check}
+{ author empty$ title empty$ howpublished empty$
+month empty$ year empty$ note empty$
+and and and and and
+{ "all relevant fields are empty in " cite$ * warning$ }
+'skip$
+if$
+}
+FUNCTION {format.thesis.type}
+{ type empty$
+'skip$
+{ pop$
+type "t" change.case$
+}
+if$
+}
+FUNCTION {format.tr.number}
+{ type empty$
+{ "\abphrase{16}" }
+'type
+if$
+number empty$
+{ "t" change.case$ }
+{ number tie.or.space.connect }
+if$
+}
+FUNCTION {format.article.crossref}
+{ key empty$
+{ journal empty$
+{ "need key or journal for " cite$ * " to crossref " * crossref *
+warning$
+""
+}
+{ "\abphrase{7}" journal emphasize * }
+if$
+}
+{ "\abphrase{7}" key * }
+if$
+" \cite{" * crossref * "}" *
+}
+FUNCTION {format.crossref.editor}
+{ editor #1 "{vv~}{ll}" format.name$
+editor num.names$ duplicate$
+#2 >
+{ pop$ "\abphrase{2}" * }
+{ #2 <
+'skip$
+{ editor #2 "{ff }{vv }{ll}{ jj}" format.name$ "others" =
+{ "\abphrase{2}" * }
+{ "\abphrase{0}" * editor #2 "{vv~}{ll}" format.name$ * }
+if$
+}
+if$
+}
+if$
+}
+FUNCTION {format.book.crossref}
+{ volume empty$
+{ "empty volume in " cite$ * "'s crossref of " * crossref * warning$
+"\abphrase{7}"
+}
+{ "\abphrase{9}" volume tie.or.space.connect
+"\abphrase{5}" *
+}
+if$
+editor empty$
+editor field.or.null author field.or.null =
+or
+{ key empty$
+{ series empty$
+{ "need editor, key, or series for " cite$ * " to crossref " *
+crossref * warning$
+"" *
+}
+{ series quote * }
+if$
+}
+{ key * }
+if$
+}
+{ format.crossref.editor * }
+if$
+" \cite{" * crossref * "}" *
+}
+FUNCTION {format.incoll.inproc.crossref}
+{ editor empty$
+editor field.or.null author field.or.null =
+or
+{ key empty$
+{ booktitle empty$
+{ "need editor, key, or booktitle for " cite$ * " to crossref " *
+crossref * warning$
+""
+}
+{ "\abphrase{7}" booktitle quote * }
+if$
+}
+{ "\abphrase{7}" key * }
+if$
+}
+{ "\abphrase{7}" format.crossref.editor * }
+if$
+" \cite{" * crossref * "}" *
+}
+FUNCTION {article}
+{ output.bibitem
+format.authors "author" output.check
+new.block
+format.title "title" output.check
+new.block
+crossref missing$
+{ journal emphasize "journal" output.check
+format.vol.num.pages output
+format.date "year" output.check
+}
+{ format.article.crossref output.nonnull
+new.clause
+format.pages output
+}
+if$
+new.block
+note output
+fin.entry
+}
+FUNCTION {book}
+{ output.bibitem
+author empty$
+{ format.editors "author and editor" output.check }
+{ format.authors output.nonnull
+crossref missing$
+{ "author and editor" editor either.or.check }
+'skip$
+if$
+}
+if$
+new.block
+format.btitle "title" output.check
+crossref missing$
+{ new.clause
+format.bvolume output
+new.block
+format.number.series output
+new.sentence
+publisher "publisher" output.check
+address new.clause.checka
+address output
+}
+{ new.block
+format.book.crossref output.nonnull
+}
+if$
+edition new.clause.checka
+format.edition output
+format.date "year" output.check
+new.block
+note output
+fin.entry
+}
+FUNCTION {booklet}
+{ output.bibitem
+format.authors output
+new.block
+format.title "title" output.check
+howpublished address new.block.checkb
+howpublished output
+address new.clause.checka
+address output
+format.date output
+new.block
+note output
+fin.entry
+}
+FUNCTION {inbook}
+{ output.bibitem
+author empty$
+{ format.editors "author and editor" output.check }
+{ format.authors output.nonnull
+crossref missing$
+{ "author and editor" editor either.or.check }
+'skip$
+if$
+}
+if$
+new.block
+format.btitle "title" output.check
+new.clause
+crossref missing$
+{ format.bvolume output
+new.clause
+format.chapter.pages "chapter and pages" output.check
+new.block
+format.number.series output
+new.sentence
+publisher "publisher" output.check
+address new.clause.checka
+address output
+}
+{ format.chapter.pages "chapter and pages" output.check
+new.block
+format.book.crossref output.nonnull
+}
+if$
+edition new.clause.checka
+format.edition output
+format.date "year" output.check
+new.block
+note output
+fin.entry
+}
+FUNCTION {incollection}
+{ output.bibitem
+format.authors "author" output.check
+new.block
+format.title "title" output.check
+new.block
+crossref missing$
+{ format.in.ed.booktitle "booktitle" output.check
+new.clause
+format.bvolume output
+new.clause
+format.number.series output
+new.clause
+format.chapter.pages output
+new.sentence
+publisher "publisher" output.check
+address new.clause.checka
+address output
+edition new.clause.checka
+format.edition output
+format.date "year" output.check
+}
+{ format.incoll.inproc.crossref output.nonnull
+new.clause
+format.chapter.pages output
+}
+if$
+new.block
+note output
+fin.entry
+}
+FUNCTION {inproceedings}
+{ output.bibitem
+format.authors "author" output.check
+new.block
+format.title "title" output.check
+new.block
+crossref missing$
+{ format.in.ed.booktitle "booktitle" output.check
+volume new.clause.checka
+format.bvolume output
+number series new.clause.checkb
+format.number.series output
+pages new.clause.checka
+format.pages output
+address empty$
+{ organization publisher new.sentence.checkb
+organization output
+publisher new.clause.checka
+publisher output
+format.date "year" output.check
+}
+{ new.clause
+address output.nonnull
+format.date "year" output.check
+new.sentence
+organization output
+new.clause
+publisher output
+}
+if$
+}
+{ format.incoll.inproc.crossref output.nonnull
+new.clause
+format.pages output
+}
+if$
+new.block
+note output
+fin.entry
+}
+FUNCTION {conference} { inproceedings }
+FUNCTION {manual}
+{ output.bibitem
+author empty$
+{ organization empty$
+'skip$
+{ organization output.nonnull
+new.clause
+address output
+}
+if$
+}
+{ format.authors output.nonnull }
+if$
+new.block
+format.btitle "title" output.check
+author empty$
+{ organization empty$
+{ address new.block.checka
+address output
+}
+'skip$
+if$
+}
+{ organization address new.block.checkb
+organization output
+address new.clause.checka
+address output
+}
+if$
+edition new.clause.checka
+format.edition output
+format.date output
+new.block
+note output
+fin.entry
+}
+FUNCTION {mastersthesis}
+{ output.bibitem
+format.authors "author" output.check
+new.block
+format.title "title" output.check
+new.block
+"\abphrase{17}" format.thesis.type output.nonnull
+new.clause
+school "school" output.check
+address new.clause.checka
+address output
+format.date "year" output.check
+new.block
+note output
+fin.entry
+}
+FUNCTION {misc}
+{ output.bibitem
+format.authors output
+title howpublished new.block.checkb
+format.title output
+howpublished new.block.checka
+howpublished output
+format.date output
+new.block
+note output
+fin.entry
+empty.misc.check
+}
+FUNCTION {phdthesis}
+{ output.bibitem
+format.authors "author" output.check
+new.block
+format.btitle "title" output.check
+new.block
+"\abphrase{18}" format.thesis.type output.nonnull
+new.clause
+school "school" output.check
+address new.clause.checka
+address output
+format.date "year" output.check
+new.block
+note output
+fin.entry
+}
+FUNCTION {proceedings}
+{ output.bibitem
+editor empty$
+{ organization output }
+{ format.editors output.nonnull }
+if$
+new.block
+format.btitle "title" output.check
+volume new.clause.checka
+format.bvolume output
+number series new.clause.checkb
+format.number.series output
+address empty$
+{ editor empty$
+{ publisher new.sentence.checka }
+{ organization publisher new.sentence.checkb
+organization output
+publisher new.clause.checka
+}
+if$
+publisher output
+format.date "year" output.check
+}
+{ new.clause
+address output.nonnull
+format.date "year" output.check
+new.sentence
+editor empty$
+'skip$
+{ organization output
+new.clause
+}
+if$
+publisher output
+}
+if$
+new.block
+note output
+fin.entry
+}
+FUNCTION {techreport}
+{ output.bibitem
+format.authors "author" output.check
+new.block
+format.title "title" output.check
+new.block
+format.tr.number output.nonnull
+new.clause
+institution "institution" output.check
+address new.clause.checka
+address output
+format.date "year" output.check
+new.block
+note output
+fin.entry
+}
+FUNCTION {unpublished}
+{ output.bibitem
+format.authors "author" output.check
+new.block
+format.title "title" output.check
+new.block
+note "note" output.check
+format.date output
+fin.entry
+}
+FUNCTION {default.type} { misc }
+MACRO {jan} {"\abmonth{1}"}
+MACRO {feb} {"\abmonth{2}"}
+MACRO {mar} {"\abmonth{3}"}
+MACRO {apr} {"\abmonth{4}"}
+MACRO {may} {"\abmonth{5}"}
+MACRO {jun} {"\abmonth{6}"}
+MACRO {jul} {"\abmonth{7}"}
+MACRO {aug} {"\abmonth{8}"}
+MACRO {sep} {"\abmonth{9}"}
+MACRO {oct} {"\abmonth{10}"}
+MACRO {nov} {"\abmonth{11}"}
+MACRO {dec} {"\abmonth{12}"}
+MACRO {first} {"\abedition{1}"}
+MACRO {second} {"\abedition{2}"}
+MACRO {third} {"\abedition{3}"}
+MACRO {fourth} {"\abedition{4}"}
+MACRO {fifth} {"\abedition{5}"}
+MACRO {sixth} {"\abedition{6}"}
+MACRO {seventh} {"\abedition{7}"}
+MACRO {eighth} {"\abedition{8}"}
+MACRO {ninth} {"\abedition{9}"}
+MACRO {tenth} {"\abedition{10}"}
+MACRO {section} {"\abchapter{0}"}
+MACRO {paragraph} {"\abchapter{1}"}
+MACRO {appendix} {"\abchapter{2}"}
+MACRO {part} {"\abchapter{3}"}
+READ
+STRINGS { longest.label }
+INTEGERS { number.label longest.label.width }
+FUNCTION {initialize.longest.label}
+{ "" 'longest.label :=
+#1 'number.label :=
+#0 'longest.label.width :=
+}
+FUNCTION {longest.label.pass}
+{ number.label int.to.str$ 'label :=
+number.label #1 + 'number.label :=
+label width$ longest.label.width >
+{ label 'longest.label :=
+label width$ 'longest.label.width :=
+}
+'skip$
+if$
+}
+EXECUTE {initialize.longest.label}
+ITERATE {longest.label.pass}
+FUNCTION {begin.bib}
+{
+"\newif\ifabfull\abfulltrue" write$ newline$
+"\input apreambl" write$ newline$
+preamble$ empty$
+'skip$
+{ preamble$ write$ newline$ }
+if$
+"\begin{thebibliography}{" longest.label * "}" * write$ newline$
+}
+EXECUTE {begin.bib}
+EXECUTE {init.state.consts}
+ITERATE {call.type$}
+FUNCTION {end.bib}
+{ newline$
+"\end{thebibliography}" write$ newline$
+}
+EXECUTE {end.bib}
diff --git a/biblio/bibtex/contrib/abstyles/README b/biblio/bibtex/contrib/abstyles/README
new file mode 100644
index 0000000000..fdaf313356
--- /dev/null
+++ b/biblio/bibtex/contrib/abstyles/README
@@ -0,0 +1,140 @@
+ -*-Text-*-
+This is the BibTeX `adaptable' family of style files, version 1.10 as of
+April 1992, derived from the `plain' family by Hans-Hermann Bode. It allows
+setting of certain style parameters and definition of phrases without
+changing the style files, thus a multiple-language support is provided and
+the user may adapt the bibliography layout to his or her requirements within
+some limits.
+
+Send suggestions and bug reports to HHBODE@DOSUNI1.BITNET.
+
+This directory contains the following files:
+
+./README this file
+./btxabst.doc master file for creating the bst files
+./aplain.bst adaptable style, `plain' version
+./aabbrv.bst adaptable style, `abbreviated' version
+./aunsrt.bst adaptable style, `unsorted' version
+./aalpha.bst adaptable style, `alphanumeric' version
+./anotit.bst adaptable style, `no titles' version
+./aunsnot.bst adaptable style, `unsorted/no titles' version
+./apreambl.doc preamble file, documentation
+./apreambl.tex preamble file, to be input at the beginning of the bibliography
+./jourabbr.bib journal names, abbreviated version
+./jourfull.bib journal names, full version
+./acompat.bib compatibility definitions for use with standard styles
+./abstdok.tex documentation of the adaptable family (in German)
+./abstdok.bbl bibliography for abstdok
+./a4c.sty definition of length parameters for DIN-A4 paper, LaTeX version
+./a4c.tex definition of length parameters for DIN-A4 paper, WEB version
+./docmac.doc documentation of documentation macros (indeed!)
+./docmac.tex documentation macros
+
+*** Installation -------------------------------------------------------------
+
+To get a working adaptable-styles system you have to copy the following
+files into special directories.
+
+-- Copy all *.bst files into a directory where BibTeX looks for style files.
+This will usually be a directory in the TEXINPUT(S) path, i.e., in the same
+path where TeX looks for its input files.
+
+-- Copy apreambl.tex into a directory where TeX looks for its input files,
+see above.
+
+-- Copy all *.bib files into a directory where BibTeX looks for bibliography
+databases. This will usually be a directory in the BIBINPUT(S) path.
+
+Optionally, you may copy a4c.* and docmac.tex into a directory in the
+TEXINPUT(S) path. These files will be needed when printing the
+documentation; they may be useful, however, for other applications as well.
+
+*** Printing the documentation -----------------------------------------------
+
+The main documentation is a LaTeX source in abstdok.tex. Run LaTeX on this
+file twice (for resolving cross references) and make sure that apreambl.tex,
+abstdok.bbl, and a4c.sty can be loaded. In addition, the file german.sty is
+required; it is not included in this distribution, since you should be able
+to get it from every good TeX server (at least in Germany). The style file
+a4c.sty will set up length parameters so that the document will come out
+centered with margins of 2 cm on each side of a DIN-A4 sheet; if this
+doesn't fit to your paper format, you may want to edit this file first.
+Unfortunately, this documentation is written in German (which is due to the
+fact that European people sometimes get nostalgic and switch to their native
+language); if you feel the need to translate this into English, don't
+hesitate to do so (and send me the file, so I can include it into the next
+distribution).
+
+The definition of the adaptable parameters is discussed in apreambl.doc (in
+English, yes). Run this through TeX (not LaTeX, and don't forget the .doc
+extension!) and make sure that a4c.tex and docmac.tex can be loaded. The
+file a4c.tex corresponds to a4c.sty above, and docmac.tex contains macros
+for typesetting a WEB-style documentation. In fact, apreambl.tex is derived
+from apreambl.doc by means of Joachim Schrod's MAKEPROG system, which is a
+general documentation tool much similar to the WEB system of structured
+documentation; docmac.tex is an enhancement of MAKEPROG's macro package
+progdoc.tex which makes the documentation layout more ``WEB-like''. If you
+want to change some of the adaptable parameters, the best way to do it is to
+get MAKEPROG (it should be available from the same source as the adaptable
+style files) and write a changefile to apreambl.doc. Then there is a good
+chance that you can apply your changes to future versions of this
+distribution without major modifications. Moreover, you can use MAKEPROG and
+docmac.tex for your own developments, it's worth a try! (In this case you may
+want to look at docmac's documentation: just run TeX on docmac.doc and make
+sure that docmac.tex is loadable.)
+
+Further documentation is provided in plain-text form in the files
+jourabbr.bib, jourfull.bib, and acompat.bib. You may want to edit the first
+two of them to add more journal names or other general stuff that should be
+defined at the beginning of your bibliographies.
+
+*** Usage hints (VERY brief) -------------------------------------------------
+
+It is assumed that you are familiar with the BibTeX philosophy and the
+standard style files, so here is a short description what you have to do in
+addition to use the adaptable styles.
+
+Choose one of the styles aplain, aabbrv, aunsrt, aalpha, anotit, or aunsnot
+(the first four are the adaptable versions of the corresponding standard
+styles, anotit is like aabbrv but omits titles of articles and some other
+redundant information, aunsnot is like anotit but doesn't sort the
+bibliography) and put a statement like
+
+ \bibliographystyle{aplain}
+
+somewhere into your document.
+
+Make sure that apreambl.tex is input before the \bibliography command is
+executed. The easiest way to do so is to include jourfull or jourabbr at the
+beginning of your \bibliography list. The file apreambl.tex carries out all
+parameter settings and switches between `full' and `abbreviated' as well as
+English and German versions of phrases automatically. The version it selects
+depends on the bibliography style and on the fact whether german.sty is
+loaded or not. The databases jourfull.bib and jourabbr.bib will load
+apreambl.tex and, furthermore, will define all strings that are lacking in
+the adaptable styles in comparison with the standard styles; hence, with
+this files you can use your old databases without changes, and---as
+mentioned above---this is the right place to add your own general
+definitions. So, a typical \bibliography command should look like
+
+ \bibliography{jourfull,user1,user2,user3}
+
+where user1, user2, and user3 are your private bibliography databases.
+
+If you ever feel the need to use one of the standard styles again, your
+databases---due to the use of special features of the adaptable styles---may
+not be compatible any more. The compatibility can be restored by means of
+acompat.bib, which defines all additional strings of the adaptable styles
+and should be included at the very beginning of the \bibliography list, e.g.,
+
+ \bibliography{acompat,jourfull,user1,user2,user3}\bibliographystyle{plain}
+
+Of course, acompat is not required for use with the adaptable styles alone.
+
+*** Correction ---------------------------------------------------------------
+
+In parts of the documentation, the files apreambl.doc and apreambl.tex are
+referred to as apreamble.doc and apreamble.tex. The names were shortened to
+avoid difficulties with some operating systems with low-length file names.
+
+ --H2B
diff --git a/biblio/bibtex/contrib/abstyles/a4c.sty b/biblio/bibtex/contrib/abstyles/a4c.sty
new file mode 100644
index 0000000000..7d407b75d1
--- /dev/null
+++ b/biblio/bibtex/contrib/abstyles/a4c.sty
@@ -0,0 +1,27 @@
+% This is A4C.STY, a LaTeX style file written by Hans-Hermann Bode
+% (HHBODE@DOSUNI1.BITNET), that sets up a page layout appropriate for DIN-A4
+% paper sheets (210 mm x 297 mm).
+%
+% The text is horizontally centered with margins of 2 cm left and right.
+%
+% It is assumed, that the DVI driver sets margins of 1 in left and top.
+%
+% Version Date Author Comment
+% 1.00 08 Sep 1991 H2B First version
+
+\textwidth21cm % full paper
+\textheight29.7cm
+
+\oddsidemargin2cm % margins
+\evensidemargin\oddsidemargin
+\topmargin2cm
+
+\addtolength{\textwidth}{-\oddsidemargin} % odd/left or even/right margin
+\addtolength{\textwidth}{-\evensidemargin} % odd/right or even/left margin
+\addtolength{\textheight}{-2\topmargin} % top and bottom margin
+\addtolength{\textheight}{-\headheight}
+\addtolength{\textheight}{-\headsep}
+\addtolength{\textheight}{-\footskip}
+
+\hoffset-1in % compensate the driver margins
+\voffset-1in
diff --git a/biblio/bibtex/contrib/abstyles/a4c.tex b/biblio/bibtex/contrib/abstyles/a4c.tex
new file mode 100644
index 0000000000..ae619c66ab
--- /dev/null
+++ b/biblio/bibtex/contrib/abstyles/a4c.tex
@@ -0,0 +1,30 @@
+% This is A4C.TEX, a TeX macro file for WEB written by Hans-Hermann Bode
+% (HHBODE@DOSUNI1.BITNET), that sets up a page layout appropriate for DIN-A4
+% paper sheets (210 mm x 297 mm).
+%
+% The text is horizontally centered with margins of 2 cm left and right.
+%
+% It is assumed, that the DVI driver sets margins of 1 in left and top.
+%
+% Version Date Author Comment
+% 1.00 08 Sep 1991 H2B First version
+% 1.00a 28 Sep 1991 H2B Correction: missing setpage included
+
+\pagewidth21cm % full paper
+\fullpageheight29.7cm
+
+\hoffset2cm % left margin
+\pageshift0cm % additionally for odd-numbered pages
+\voffset2cm % top margin
+
+\advance\pagewidth by-2\hoffset % minus margins
+\advance\pagewidth by-2\pageshift % minus extra margins
+\advance\fullpageheight by-2\voffset % minus margins
+
+\pageheight\fullpageheight % full text
+\advance\pageheight by-0.3in % minus header
+
+\advance\hoffset by-1in % compensate the driver margins
+\advance\voffset by-1in
+
+\setpage % tell TeX new dimensions
diff --git a/biblio/bibtex/contrib/abstyles/aabbrv.bst b/biblio/bibtex/contrib/abstyles/aabbrv.bst
new file mode 100644
index 0000000000..05f9a96843
--- /dev/null
+++ b/biblio/bibtex/contrib/abstyles/aabbrv.bst
@@ -0,0 +1,1061 @@
+% BibTeX bibliography style `AABBRV'
+ENTRY
+{ address
+author
+booktitle
+chapter
+edition
+editor
+howpublished
+institution
+journal
+key
+month
+note
+number
+organization
+pages
+publisher
+school
+series
+title
+type
+volume
+year
+}
+{}
+{ label }
+INTEGERS { output.state before.all mid.sentence after.sentence after.block
+continue.sentence }
+FUNCTION {init.state.consts}
+{ #0 'before.all :=
+#1 'mid.sentence :=
+#2 'after.sentence :=
+#3 'after.block :=
+#4 'continue.sentence :=
+}
+STRINGS { s t }
+FUNCTION {output.nonnull}
+{ 's :=
+output.state continue.sentence =
+{ " " * write$ }
+{ output.state mid.sentence =
+{ ", " * write$ }
+{ output.state after.block =
+{ add.period$ write$
+newline$
+"\newblock " write$
+}
+{ output.state before.all =
+'write$
+{ add.period$ " " * write$ }
+if$
+}
+if$
+}
+if$
+continue.sentence 'output.state :=
+}
+if$
+s
+}
+FUNCTION {output}
+{ duplicate$ empty$
+'pop$
+'output.nonnull
+if$
+}
+FUNCTION {output.check}
+{ 't :=
+duplicate$ empty$
+{ pop$ "empty " t * " in " * cite$ * warning$ }
+'output.nonnull
+if$
+}
+FUNCTION {output.bibitem}
+{ newline$
+"\bibitem{" write$
+cite$ write$
+"}" write$
+newline$
+""
+before.all 'output.state :=
+}
+FUNCTION {fin.entry}
+{ add.period$
+write$
+newline$
+}
+FUNCTION {new.block}
+{ output.state before.all =
+'skip$
+{ after.block 'output.state := }
+if$
+}
+FUNCTION {new.sentence}
+{ output.state after.block =
+'skip$
+{ output.state before.all =
+'skip$
+{ after.sentence 'output.state := }
+if$
+}
+if$
+}
+FUNCTION {new.clause}
+{ output.state after.sentence =
+'skip$
+{ output.state after.block =
+'skip$
+{ output.state before.all =
+'skip$
+{ mid.sentence 'output.state := }
+if$
+}
+if$
+}
+if$
+}
+FUNCTION {not}
+{ { #0 }
+{ #1 }
+if$
+}
+FUNCTION {and}
+{ 'skip$
+{ pop$ #0 }
+if$
+}
+FUNCTION {or}
+{ { pop$ #1 }
+'skip$
+if$
+}
+FUNCTION {new.block.checka}
+{ empty$
+'skip$
+'new.block
+if$
+}
+FUNCTION {new.block.checkb}
+{ empty$
+swap$ empty$
+and
+'skip$
+'new.block
+if$
+}
+FUNCTION {new.sentence.checka}
+{ empty$
+'skip$
+'new.sentence
+if$
+}
+FUNCTION {new.sentence.checkb}
+{ empty$
+swap$ empty$
+and
+'skip$
+'new.sentence
+if$
+}
+FUNCTION {new.clause.checka}
+{ empty$
+'skip$
+'new.clause
+if$
+}
+FUNCTION {new.clause.checkb}
+{ empty$
+swap$ empty$
+and
+'skip$
+'new.clause
+if$
+}
+FUNCTION {field.or.null}
+{ duplicate$ empty$
+{ pop$ "" }
+'skip$
+if$
+}
+FUNCTION {emphasize}
+{ duplicate$ empty$
+{ pop$ "" }
+{ "\abtype{2}{" swap$ * "}" * }
+if$
+}
+FUNCTION {capitalize}
+{ duplicate$ empty$
+{ pop$ "" }
+{ "\abtype{0}{" swap$ * "}" * }
+if$
+}
+FUNCTION {boldface}
+{ duplicate$ empty$
+{ pop$ "" }
+{ "\abtype{3}{" swap$ * "}" * }
+if$
+}
+FUNCTION {quote}
+{ duplicate$ empty$
+{ pop$ "" }
+{ "\abtype{1}{" swap$ * "}" * }
+if$
+}
+FUNCTION {parentheses}
+{ duplicate$ empty$
+{ pop$ "" }
+{ "\abtype{5}{" swap$ * "}" * }
+if$
+}
+INTEGERS { nameptr namesleft numnames }
+FUNCTION {format.names}
+{ 's :=
+#1 'nameptr :=
+s num.names$ 'numnames :=
+numnames 'namesleft :=
+{ namesleft #0 > }
+{ s nameptr "{f.~}{vv~}{ll}{, jj}" format.name$ 't :=
+nameptr #1 >
+{ namesleft #1 >
+{ ", " * t * }
+{ numnames #2 >
+{ "\abphrase{1}" * }
+'skip$
+if$
+t "others" =
+{ "\abphrase{2}" * }
+{ "\abphrase{0}" * t * }
+if$
+}
+if$
+}
+'t
+if$
+nameptr #1 + 'nameptr :=
+namesleft #1 - 'namesleft :=
+}
+while$
+}
+FUNCTION {format.authors}
+{ author empty$
+{ "" }
+{ author format.names capitalize }
+if$
+}
+FUNCTION {format.editors}
+{ editor empty$
+{ "" }
+{ editor format.names capitalize
+editor num.names$ #1 >
+{ "\abphrase{3}" * }
+{ "\abphrase{4}" * }
+if$
+}
+if$
+}
+FUNCTION {format.title}
+{ title empty$
+{ "" }
+{ title "t" change.case$ }
+if$
+}
+FUNCTION {n.dashify}
+{ 't :=
+""
+{ t empty$ not }
+{ t #1 #1 substring$ "-" =
+{ t #1 #2 substring$ "--" = not
+{ "--" *
+t #2 global.max$ substring$ 't :=
+}
+{ { t #1 #1 substring$ "-" = }
+{ "-" *
+t #2 global.max$ substring$ 't :=
+}
+while$
+}
+if$
+}
+{ t #1 #1 substring$ *
+t #2 global.max$ substring$ 't :=
+}
+if$
+}
+while$
+}
+FUNCTION {format.date}
+{ year empty$
+{ month empty$
+{ "" }
+{ "there's a month but no year in " cite$ * warning$
+month parentheses
+}
+if$
+}
+{ month empty$
+{ year parentheses }
+{ month " " * year * parentheses }
+if$
+}
+if$
+}
+FUNCTION {format.btitle}
+{ title quote
+}
+FUNCTION {tie.or.space.connect}
+{ duplicate$ text.length$ #3 <
+{ "~" }
+{ " " }
+if$
+swap$ * *
+}
+FUNCTION {either.or.check}
+{ empty$
+'pop$
+{ "can't use both " swap$ * " fields in " * cite$ * warning$ }
+if$
+}
+FUNCTION {format.bvolume}
+{ volume empty$
+{ "" }
+{ "\abphrase{8}" volume tie.or.space.connect
+series empty$
+'skip$
+{ "\abphrase{5}" * series quote * }
+if$
+"volume and number" number either.or.check
+}
+if$
+}
+FUNCTION {format.number.series}
+{ volume empty$
+{ number empty$
+{ series field.or.null }
+{ output.state mid.sentence = output.state continue.sentence = or
+{ "\abphrase{10}" }
+{ "\abphrase{11}" }
+if$
+number tie.or.space.connect
+series empty$
+{ "there's a number but no series in " cite$ * warning$ }
+{ "\abphrase{6}" * series * }
+if$
+}
+if$
+}
+{ "" }
+if$
+}
+FUNCTION {format.edition}
+{ edition empty$
+{ "" }
+{ output.state mid.sentence = output.state continue.sentence = or
+{ edition "l" change.case$ "\abphrase{12}" * }
+{ edition "t" change.case$ "\abphrase{12}" * }
+if$
+}
+if$
+}
+INTEGERS { multiresult }
+FUNCTION {multi.page.check}
+{ 't :=
+#0 'multiresult :=
+{ multiresult not
+t empty$ not
+and
+}
+{ t #1 #1 substring$
+duplicate$ "-" =
+swap$ duplicate$ "," =
+swap$ "+" =
+or or
+{ #1 'multiresult := }
+{ t #2 global.max$ substring$ 't := }
+if$
+}
+while$
+multiresult
+}
+FUNCTION {format.pages}
+{ pages empty$
+{ "" }
+{ pages multi.page.check
+{ "\abphrase{13}" pages n.dashify tie.or.space.connect }
+{ "\abphrase{14}" pages tie.or.space.connect }
+if$
+}
+if$
+}
+FUNCTION {format.vol.num.pages}
+{ volume field.or.null boldface
+number empty$
+'skip$
+{ "\abtype{4}{" number * "}" * *
+volume empty$
+{ "there's a number but no volume in " cite$ * warning$ }
+'skip$
+if$
+}
+if$
+pages empty$
+'skip$
+{ duplicate$ empty$
+{ pop$ format.pages }
+{ ", " * pages n.dashify * }
+if$
+}
+if$
+}
+FUNCTION {format.chapter.pages}
+{ chapter empty$
+'format.pages
+{ type empty$
+{ "\abphrase{15}" }
+{ type "l" change.case$ }
+if$
+chapter tie.or.space.connect
+pages empty$
+'skip$
+{ ", " * format.pages * }
+if$
+}
+if$
+}
+FUNCTION {format.in.ed.booktitle}
+{ booktitle empty$
+{ "" }
+{ editor empty$
+{ "\abphrase{7}" booktitle quote * }
+{ "\abphrase{7}" format.editors * ", " * booktitle quote * }
+if$
+}
+if$
+}
+FUNCTION {empty.misc.check}
+{ author empty$ title empty$ howpublished empty$
+month empty$ year empty$ note empty$
+and and and and and
+key empty$ not and
+{ "all relevant fields are empty in " cite$ * warning$ }
+'skip$
+if$
+}
+FUNCTION {format.thesis.type}
+{ type empty$
+'skip$
+{ pop$
+type "t" change.case$
+}
+if$
+}
+FUNCTION {format.tr.number}
+{ type empty$
+{ "\abphrase{16}" }
+'type
+if$
+number empty$
+{ "t" change.case$ }
+{ number tie.or.space.connect }
+if$
+}
+FUNCTION {format.article.crossref}
+{ key empty$
+{ journal empty$
+{ "need key or journal for " cite$ * " to crossref " * crossref *
+warning$
+""
+}
+{ "\abphrase{7}" journal emphasize * }
+if$
+}
+{ "\abphrase{7}" key * }
+if$
+" \cite{" * crossref * "}" *
+}
+FUNCTION {format.crossref.editor}
+{ editor #1 "{vv~}{ll}" format.name$
+editor num.names$ duplicate$
+#2 >
+{ pop$ "\abphrase{2}" * }
+{ #2 <
+'skip$
+{ editor #2 "{ff }{vv }{ll}{ jj}" format.name$ "others" =
+{ "\abphrase{2}" * }
+{ "\abphrase{0}" * editor #2 "{vv~}{ll}" format.name$ * }
+if$
+}
+if$
+}
+if$
+}
+FUNCTION {format.book.crossref}
+{ volume empty$
+{ "empty volume in " cite$ * "'s crossref of " * crossref * warning$
+"\abphrase{7}"
+}
+{ "\abphrase{9}" volume tie.or.space.connect
+"\abphrase{5}" *
+}
+if$
+editor empty$
+editor field.or.null author field.or.null =
+or
+{ key empty$
+{ series empty$
+{ "need editor, key, or series for " cite$ * " to crossref " *
+crossref * warning$
+"" *
+}
+{ series quote * }
+if$
+}
+{ key * }
+if$
+}
+{ format.crossref.editor * }
+if$
+" \cite{" * crossref * "}" *
+}
+FUNCTION {format.incoll.inproc.crossref}
+{ editor empty$
+editor field.or.null author field.or.null =
+or
+{ key empty$
+{ booktitle empty$
+{ "need editor, key, or booktitle for " cite$ * " to crossref " *
+crossref * warning$
+""
+}
+{ "\abphrase{7}" booktitle quote * }
+if$
+}
+{ "\abphrase{7}" key * }
+if$
+}
+{ "\abphrase{7}" format.crossref.editor * }
+if$
+" \cite{" * crossref * "}" *
+}
+FUNCTION {article}
+{ output.bibitem
+format.authors "author" output.check
+new.block
+format.title "title" output.check
+new.block
+crossref missing$
+{ journal emphasize "journal" output.check
+format.vol.num.pages output
+format.date "year" output.check
+}
+{ format.article.crossref output.nonnull
+new.clause
+format.pages output
+}
+if$
+new.block
+note output
+fin.entry
+}
+FUNCTION {book}
+{ output.bibitem
+author empty$
+{ format.editors "author and editor" output.check }
+{ format.authors output.nonnull
+crossref missing$
+{ "author and editor" editor either.or.check }
+'skip$
+if$
+}
+if$
+new.block
+format.btitle "title" output.check
+crossref missing$
+{ new.clause
+format.bvolume output
+new.block
+format.number.series output
+new.sentence
+publisher "publisher" output.check
+address new.clause.checka
+address output
+}
+{ new.block
+format.book.crossref output.nonnull
+}
+if$
+edition new.clause.checka
+format.edition output
+format.date "year" output.check
+new.block
+note output
+fin.entry
+}
+FUNCTION {booklet}
+{ output.bibitem
+format.authors output
+new.block
+format.title "title" output.check
+howpublished address new.block.checkb
+howpublished output
+address new.clause.checka
+address output
+format.date output
+new.block
+note output
+fin.entry
+}
+FUNCTION {inbook}
+{ output.bibitem
+author empty$
+{ format.editors "author and editor" output.check }
+{ format.authors output.nonnull
+crossref missing$
+{ "author and editor" editor either.or.check }
+'skip$
+if$
+}
+if$
+new.block
+format.btitle "title" output.check
+new.clause
+crossref missing$
+{ format.bvolume output
+new.clause
+format.chapter.pages "chapter and pages" output.check
+new.block
+format.number.series output
+new.sentence
+publisher "publisher" output.check
+address new.clause.checka
+address output
+}
+{ format.chapter.pages "chapter and pages" output.check
+new.block
+format.book.crossref output.nonnull
+}
+if$
+edition new.clause.checka
+format.edition output
+format.date "year" output.check
+new.block
+note output
+fin.entry
+}
+FUNCTION {incollection}
+{ output.bibitem
+format.authors "author" output.check
+new.block
+format.title "title" output.check
+new.block
+crossref missing$
+{ format.in.ed.booktitle "booktitle" output.check
+new.clause
+format.bvolume output
+new.clause
+format.number.series output
+new.clause
+format.chapter.pages output
+new.sentence
+publisher "publisher" output.check
+address new.clause.checka
+address output
+edition new.clause.checka
+format.edition output
+format.date "year" output.check
+}
+{ format.incoll.inproc.crossref output.nonnull
+new.clause
+format.chapter.pages output
+}
+if$
+new.block
+note output
+fin.entry
+}
+FUNCTION {inproceedings}
+{ output.bibitem
+format.authors "author" output.check
+new.block
+format.title "title" output.check
+new.block
+crossref missing$
+{ format.in.ed.booktitle "booktitle" output.check
+volume new.clause.checka
+format.bvolume output
+number series new.clause.checkb
+format.number.series output
+pages new.clause.checka
+format.pages output
+address empty$
+{ organization publisher new.sentence.checkb
+organization output
+publisher new.clause.checka
+publisher output
+format.date "year" output.check
+}
+{ new.clause
+address output.nonnull
+format.date "year" output.check
+new.sentence
+organization output
+new.clause
+publisher output
+}
+if$
+}
+{ format.incoll.inproc.crossref output.nonnull
+new.clause
+format.pages output
+}
+if$
+new.block
+note output
+fin.entry
+}
+FUNCTION {conference} { inproceedings }
+FUNCTION {manual}
+{ output.bibitem
+author empty$
+{ organization empty$
+'skip$
+{ organization output.nonnull
+new.clause
+address output
+}
+if$
+}
+{ format.authors output.nonnull }
+if$
+new.block
+format.btitle "title" output.check
+author empty$
+{ organization empty$
+{ address new.block.checka
+address output
+}
+'skip$
+if$
+}
+{ organization address new.block.checkb
+organization output
+address new.clause.checka
+address output
+}
+if$
+edition new.clause.checka
+format.edition output
+format.date output
+new.block
+note output
+fin.entry
+}
+FUNCTION {mastersthesis}
+{ output.bibitem
+format.authors "author" output.check
+new.block
+format.title "title" output.check
+new.block
+"\abphrase{17}" format.thesis.type output.nonnull
+new.clause
+school "school" output.check
+address new.clause.checka
+address output
+format.date "year" output.check
+new.block
+note output
+fin.entry
+}
+FUNCTION {misc}
+{ output.bibitem
+format.authors output
+title howpublished new.block.checkb
+format.title output
+howpublished new.block.checka
+howpublished output
+format.date output
+new.block
+note output
+fin.entry
+empty.misc.check
+}
+FUNCTION {phdthesis}
+{ output.bibitem
+format.authors "author" output.check
+new.block
+format.btitle "title" output.check
+new.block
+"\abphrase{18}" format.thesis.type output.nonnull
+new.clause
+school "school" output.check
+address new.clause.checka
+address output
+format.date "year" output.check
+new.block
+note output
+fin.entry
+}
+FUNCTION {proceedings}
+{ output.bibitem
+editor empty$
+{ organization output }
+{ format.editors output.nonnull }
+if$
+new.block
+format.btitle "title" output.check
+volume new.clause.checka
+format.bvolume output
+number series new.clause.checkb
+format.number.series output
+address empty$
+{ editor empty$
+{ publisher new.sentence.checka }
+{ organization publisher new.sentence.checkb
+organization output
+publisher new.clause.checka
+}
+if$
+publisher output
+format.date "year" output.check
+}
+{ new.clause
+address output.nonnull
+format.date "year" output.check
+new.sentence
+editor empty$
+'skip$
+{ organization output
+new.clause
+}
+if$
+publisher output
+}
+if$
+new.block
+note output
+fin.entry
+}
+FUNCTION {techreport}
+{ output.bibitem
+format.authors "author" output.check
+new.block
+format.title "title" output.check
+new.block
+format.tr.number output.nonnull
+new.clause
+institution "institution" output.check
+address new.clause.checka
+address output
+format.date "year" output.check
+new.block
+note output
+fin.entry
+}
+FUNCTION {unpublished}
+{ output.bibitem
+format.authors "author" output.check
+new.block
+format.title "title" output.check
+new.block
+note "note" output.check
+format.date output
+fin.entry
+}
+FUNCTION {default.type} { misc }
+MACRO {jan} {"\abmonth{1}"}
+MACRO {feb} {"\abmonth{2}"}
+MACRO {mar} {"\abmonth{3}"}
+MACRO {apr} {"\abmonth{4}"}
+MACRO {may} {"\abmonth{5}"}
+MACRO {jun} {"\abmonth{6}"}
+MACRO {jul} {"\abmonth{7}"}
+MACRO {aug} {"\abmonth{8}"}
+MACRO {sep} {"\abmonth{9}"}
+MACRO {oct} {"\abmonth{10}"}
+MACRO {nov} {"\abmonth{11}"}
+MACRO {dec} {"\abmonth{12}"}
+MACRO {first} {"\abedition{1}"}
+MACRO {second} {"\abedition{2}"}
+MACRO {third} {"\abedition{3}"}
+MACRO {fourth} {"\abedition{4}"}
+MACRO {fifth} {"\abedition{5}"}
+MACRO {sixth} {"\abedition{6}"}
+MACRO {seventh} {"\abedition{7}"}
+MACRO {eighth} {"\abedition{8}"}
+MACRO {ninth} {"\abedition{9}"}
+MACRO {tenth} {"\abedition{10}"}
+MACRO {section} {"\abchapter{0}"}
+MACRO {paragraph} {"\abchapter{1}"}
+MACRO {appendix} {"\abchapter{2}"}
+MACRO {part} {"\abchapter{3}"}
+READ
+FUNCTION {sortify}
+{ purify$
+"l" change.case$
+}
+INTEGERS { len }
+FUNCTION {chop.word}
+{ 's :=
+'len :=
+s #1 len substring$ =
+{ s len #1 + global.max$ substring$ }
+'s
+if$
+}
+FUNCTION {sort.format.names}
+{ 's :=
+#1 'nameptr :=
+""
+s num.names$ 'numnames :=
+numnames 'namesleft :=
+{ namesleft #0 > }
+{ nameptr #1 >
+{ " " * }
+'skip$
+if$
+s nameptr "{vv{ } }{ll{ }}{ f{ }}{ jj{ }}" format.name$ 't :=
+nameptr numnames = t "others" = and
+{ "et al" * }
+{ t sortify * }
+if$
+nameptr #1 + 'nameptr :=
+namesleft #1 - 'namesleft :=
+}
+while$
+}
+FUNCTION {sort.format.title}
+{ 't :=
+"A " #2
+"An " #3
+"The " #4 t chop.word
+chop.word
+chop.word
+sortify
+#1 global.max$ substring$
+}
+FUNCTION {author.sort}
+{ author empty$
+{ key empty$
+{ "to sort, need author or key in " cite$ * warning$
+""
+}
+{ key sortify }
+if$
+}
+{ author sort.format.names }
+if$
+}
+FUNCTION {author.editor.sort}
+{ author empty$
+{ editor empty$
+{ key empty$
+{ "to sort, need author, editor, or key in " cite$ * warning$
+""
+}
+{ key sortify }
+if$
+}
+{ editor sort.format.names }
+if$
+}
+{ author sort.format.names }
+if$
+}
+FUNCTION {author.organization.sort}
+{ author empty$
+{ organization empty$
+{ key empty$
+{ "to sort, need author, organization, or key in " cite$ * warning$
+""
+}
+{ key sortify }
+if$
+}
+{ "The " #4 organization chop.word sortify }
+if$
+}
+{ author sort.format.names }
+if$
+}
+FUNCTION {editor.organization.sort}
+{ editor empty$
+{ organization empty$
+{ key empty$
+{ "to sort, need editor, organization, or key in " cite$ * warning$
+""
+}
+{ key sortify }
+if$
+}
+{ "The " #4 organization chop.word sortify }
+if$
+}
+{ editor sort.format.names }
+if$
+}
+FUNCTION {presort}
+{ type$ "book" =
+type$ "inbook" =
+or
+'author.editor.sort
+{ type$ "proceedings" =
+'editor.organization.sort
+{ type$ "manual" =
+'author.organization.sort
+'author.sort
+if$
+}
+if$
+}
+if$
+" "
+*
+year field.or.null sortify
+*
+" "
+*
+title field.or.null
+sort.format.title
+*
+#1 entry.max$ substring$
+'sort.key$ :=
+}
+ITERATE {presort}
+SORT
+STRINGS { longest.label }
+INTEGERS { number.label longest.label.width }
+FUNCTION {initialize.longest.label}
+{ "" 'longest.label :=
+#1 'number.label :=
+#0 'longest.label.width :=
+}
+FUNCTION {longest.label.pass}
+{ number.label int.to.str$ 'label :=
+number.label #1 + 'number.label :=
+label width$ longest.label.width >
+{ label 'longest.label :=
+label width$ 'longest.label.width :=
+}
+'skip$
+if$
+}
+EXECUTE {initialize.longest.label}
+ITERATE {longest.label.pass}
+FUNCTION {begin.bib}
+{
+"\newif\ifabfull\abfullfalse" write$ newline$
+preamble$ empty$
+'skip$
+{ preamble$ write$ newline$ }
+if$
+"\begin{thebibliography}{" longest.label * "}" * write$ newline$
+}
+EXECUTE {begin.bib}
+EXECUTE {init.state.consts}
+ITERATE {call.type$}
+FUNCTION {end.bib}
+{ newline$
+"\end{thebibliography}" write$ newline$
+}
+EXECUTE {end.bib}
diff --git a/biblio/bibtex/contrib/abstyles/aalpha.bst b/biblio/bibtex/contrib/abstyles/aalpha.bst
new file mode 100644
index 0000000000..2d5af5e6cf
--- /dev/null
+++ b/biblio/bibtex/contrib/abstyles/aalpha.bst
@@ -0,0 +1,1210 @@
+% BibTeX bibliography style `AALPHA'
+ENTRY
+{ address
+author
+booktitle
+chapter
+edition
+editor
+howpublished
+institution
+journal
+key
+month
+note
+number
+organization
+pages
+publisher
+school
+series
+title
+type
+volume
+year
+}
+{}
+{ label extra.label sort.label }
+INTEGERS { output.state before.all mid.sentence after.sentence after.block
+continue.sentence }
+FUNCTION {init.state.consts}
+{ #0 'before.all :=
+#1 'mid.sentence :=
+#2 'after.sentence :=
+#3 'after.block :=
+#4 'continue.sentence :=
+}
+STRINGS { s t }
+FUNCTION {output.nonnull}
+{ 's :=
+output.state continue.sentence =
+{ " " * write$ }
+{ output.state mid.sentence =
+{ ", " * write$ }
+{ output.state after.block =
+{ add.period$ write$
+newline$
+"\newblock " write$
+}
+{ output.state before.all =
+'write$
+{ add.period$ " " * write$ }
+if$
+}
+if$
+}
+if$
+continue.sentence 'output.state :=
+}
+if$
+s
+}
+FUNCTION {output}
+{ duplicate$ empty$
+'pop$
+'output.nonnull
+if$
+}
+FUNCTION {output.check}
+{ 't :=
+duplicate$ empty$
+{ pop$ "empty " t * " in " * cite$ * warning$ }
+'output.nonnull
+if$
+}
+FUNCTION {output.bibitem}
+{ newline$
+"\bibitem[" write$
+label write$
+"]{" write$
+cite$ write$
+"}" write$
+newline$
+""
+before.all 'output.state :=
+}
+FUNCTION {fin.entry}
+{ add.period$
+write$
+newline$
+}
+FUNCTION {new.block}
+{ output.state before.all =
+'skip$
+{ after.block 'output.state := }
+if$
+}
+FUNCTION {new.sentence}
+{ output.state after.block =
+'skip$
+{ output.state before.all =
+'skip$
+{ after.sentence 'output.state := }
+if$
+}
+if$
+}
+FUNCTION {new.clause}
+{ output.state after.sentence =
+'skip$
+{ output.state after.block =
+'skip$
+{ output.state before.all =
+'skip$
+{ mid.sentence 'output.state := }
+if$
+}
+if$
+}
+if$
+}
+FUNCTION {not}
+{ { #0 }
+{ #1 }
+if$
+}
+FUNCTION {and}
+{ 'skip$
+{ pop$ #0 }
+if$
+}
+FUNCTION {or}
+{ { pop$ #1 }
+'skip$
+if$
+}
+FUNCTION {new.block.checka}
+{ empty$
+'skip$
+'new.block
+if$
+}
+FUNCTION {new.block.checkb}
+{ empty$
+swap$ empty$
+and
+'skip$
+'new.block
+if$
+}
+FUNCTION {new.sentence.checka}
+{ empty$
+'skip$
+'new.sentence
+if$
+}
+FUNCTION {new.sentence.checkb}
+{ empty$
+swap$ empty$
+and
+'skip$
+'new.sentence
+if$
+}
+FUNCTION {new.clause.checka}
+{ empty$
+'skip$
+'new.clause
+if$
+}
+FUNCTION {new.clause.checkb}
+{ empty$
+swap$ empty$
+and
+'skip$
+'new.clause
+if$
+}
+FUNCTION {field.or.null}
+{ duplicate$ empty$
+{ pop$ "" }
+'skip$
+if$
+}
+FUNCTION {emphasize}
+{ duplicate$ empty$
+{ pop$ "" }
+{ "\abtype{2}{" swap$ * "}" * }
+if$
+}
+FUNCTION {capitalize}
+{ duplicate$ empty$
+{ pop$ "" }
+{ "\abtype{0}{" swap$ * "}" * }
+if$
+}
+FUNCTION {boldface}
+{ duplicate$ empty$
+{ pop$ "" }
+{ "\abtype{3}{" swap$ * "}" * }
+if$
+}
+FUNCTION {quote}
+{ duplicate$ empty$
+{ pop$ "" }
+{ "\abtype{1}{" swap$ * "}" * }
+if$
+}
+FUNCTION {parentheses}
+{ duplicate$ empty$
+{ pop$ "" }
+{ "\abtype{5}{" swap$ * "}" * }
+if$
+}
+INTEGERS { nameptr namesleft numnames }
+FUNCTION {format.names}
+{ 's :=
+#1 'nameptr :=
+s num.names$ 'numnames :=
+numnames 'namesleft :=
+{ namesleft #0 > }
+{ s nameptr "{ff~}{vv~}{ll}{, jj}" format.name$ 't :=
+nameptr #1 >
+{ namesleft #1 >
+{ ", " * t * }
+{ numnames #2 >
+{ "\abphrase{1}" * }
+'skip$
+if$
+t "others" =
+{ "\abphrase{2}" * }
+{ "\abphrase{0}" * t * }
+if$
+}
+if$
+}
+'t
+if$
+nameptr #1 + 'nameptr :=
+namesleft #1 - 'namesleft :=
+}
+while$
+}
+FUNCTION {format.authors}
+{ author empty$
+{ "" }
+{ author format.names capitalize }
+if$
+}
+FUNCTION {format.editors}
+{ editor empty$
+{ "" }
+{ editor format.names capitalize
+editor num.names$ #1 >
+{ "\abphrase{3}" * }
+{ "\abphrase{4}" * }
+if$
+}
+if$
+}
+FUNCTION {format.title}
+{ title empty$
+{ "" }
+{ title "t" change.case$ }
+if$
+}
+FUNCTION {n.dashify}
+{ 't :=
+""
+{ t empty$ not }
+{ t #1 #1 substring$ "-" =
+{ t #1 #2 substring$ "--" = not
+{ "--" *
+t #2 global.max$ substring$ 't :=
+}
+{ { t #1 #1 substring$ "-" = }
+{ "-" *
+t #2 global.max$ substring$ 't :=
+}
+while$
+}
+if$
+}
+{ t #1 #1 substring$ *
+t #2 global.max$ substring$ 't :=
+}
+if$
+}
+while$
+}
+FUNCTION {format.date}
+{ year empty$
+{ month empty$
+{ "" }
+{ "there's a month but no year in " cite$ * warning$
+month parentheses
+}
+if$
+}
+{ month empty$
+{ year parentheses }
+{ month " " * year * parentheses }
+if$
+}
+if$
+}
+FUNCTION {format.btitle}
+{ title quote
+}
+FUNCTION {tie.or.space.connect}
+{ duplicate$ text.length$ #3 <
+{ "~" }
+{ " " }
+if$
+swap$ * *
+}
+FUNCTION {either.or.check}
+{ empty$
+'pop$
+{ "can't use both " swap$ * " fields in " * cite$ * warning$ }
+if$
+}
+FUNCTION {format.bvolume}
+{ volume empty$
+{ "" }
+{ "\abphrase{8}" volume tie.or.space.connect
+series empty$
+'skip$
+{ "\abphrase{5}" * series quote * }
+if$
+"volume and number" number either.or.check
+}
+if$
+}
+FUNCTION {format.number.series}
+{ volume empty$
+{ number empty$
+{ series field.or.null }
+{ output.state mid.sentence = output.state continue.sentence = or
+{ "\abphrase{10}" }
+{ "\abphrase{11}" }
+if$
+number tie.or.space.connect
+series empty$
+{ "there's a number but no series in " cite$ * warning$ }
+{ "\abphrase{6}" * series * }
+if$
+}
+if$
+}
+{ "" }
+if$
+}
+FUNCTION {format.edition}
+{ edition empty$
+{ "" }
+{ output.state mid.sentence = output.state continue.sentence = or
+{ edition "l" change.case$ "\abphrase{12}" * }
+{ edition "t" change.case$ "\abphrase{12}" * }
+if$
+}
+if$
+}
+INTEGERS { multiresult }
+FUNCTION {multi.page.check}
+{ 't :=
+#0 'multiresult :=
+{ multiresult not
+t empty$ not
+and
+}
+{ t #1 #1 substring$
+duplicate$ "-" =
+swap$ duplicate$ "," =
+swap$ "+" =
+or or
+{ #1 'multiresult := }
+{ t #2 global.max$ substring$ 't := }
+if$
+}
+while$
+multiresult
+}
+FUNCTION {format.pages}
+{ pages empty$
+{ "" }
+{ pages multi.page.check
+{ "\abphrase{13}" pages n.dashify tie.or.space.connect }
+{ "\abphrase{14}" pages tie.or.space.connect }
+if$
+}
+if$
+}
+FUNCTION {format.vol.num.pages}
+{ volume field.or.null boldface
+number empty$
+'skip$
+{ "\abtype{4}{" number * "}" * *
+volume empty$
+{ "there's a number but no volume in " cite$ * warning$ }
+'skip$
+if$
+}
+if$
+pages empty$
+'skip$
+{ duplicate$ empty$
+{ pop$ format.pages }
+{ ", " * pages n.dashify * }
+if$
+}
+if$
+}
+FUNCTION {format.chapter.pages}
+{ chapter empty$
+'format.pages
+{ type empty$
+{ "\abphrase{15}" }
+{ type "l" change.case$ }
+if$
+chapter tie.or.space.connect
+pages empty$
+'skip$
+{ ", " * format.pages * }
+if$
+}
+if$
+}
+FUNCTION {format.in.ed.booktitle}
+{ booktitle empty$
+{ "" }
+{ editor empty$
+{ "\abphrase{7}" booktitle quote * }
+{ "\abphrase{7}" format.editors * ", " * booktitle quote * }
+if$
+}
+if$
+}
+FUNCTION {empty.misc.check}
+{ author empty$ title empty$ howpublished empty$
+month empty$ year empty$ note empty$
+and and and and and
+key empty$ not and
+{ "all relevant fields are empty in " cite$ * warning$ }
+'skip$
+if$
+}
+FUNCTION {format.thesis.type}
+{ type empty$
+'skip$
+{ pop$
+type "t" change.case$
+}
+if$
+}
+FUNCTION {format.tr.number}
+{ type empty$
+{ "\abphrase{16}" }
+'type
+if$
+number empty$
+{ "t" change.case$ }
+{ number tie.or.space.connect }
+if$
+}
+FUNCTION {format.article.crossref}
+{ key empty$
+{ journal empty$
+{ "need key or journal for " cite$ * " to crossref " * crossref *
+warning$
+""
+}
+{ "\abphrase{7}" journal emphasize * }
+if$
+}
+{ "\abphrase{7}" key * }
+if$
+" \cite{" * crossref * "}" *
+}
+FUNCTION {format.crossref.editor}
+{ editor #1 "{vv~}{ll}" format.name$
+editor num.names$ duplicate$
+#2 >
+{ pop$ "\abphrase{2}" * }
+{ #2 <
+'skip$
+{ editor #2 "{ff }{vv }{ll}{ jj}" format.name$ "others" =
+{ "\abphrase{2}" * }
+{ "\abphrase{0}" * editor #2 "{vv~}{ll}" format.name$ * }
+if$
+}
+if$
+}
+if$
+}
+FUNCTION {format.book.crossref}
+{ volume empty$
+{ "empty volume in " cite$ * "'s crossref of " * crossref * warning$
+"\abphrase{7}"
+}
+{ "\abphrase{9}" volume tie.or.space.connect
+"\abphrase{5}" *
+}
+if$
+editor empty$
+editor field.or.null author field.or.null =
+or
+{ key empty$
+{ series empty$
+{ "need editor, key, or series for " cite$ * " to crossref " *
+crossref * warning$
+"" *
+}
+{ series quote * }
+if$
+}
+{ key * }
+if$
+}
+{ format.crossref.editor * }
+if$
+" \cite{" * crossref * "}" *
+}
+FUNCTION {format.incoll.inproc.crossref}
+{ editor empty$
+editor field.or.null author field.or.null =
+or
+{ key empty$
+{ booktitle empty$
+{ "need editor, key, or booktitle for " cite$ * " to crossref " *
+crossref * warning$
+""
+}
+{ "\abphrase{7}" booktitle quote * }
+if$
+}
+{ "\abphrase{7}" key * }
+if$
+}
+{ "\abphrase{7}" format.crossref.editor * }
+if$
+" \cite{" * crossref * "}" *
+}
+FUNCTION {article}
+{ output.bibitem
+format.authors "author" output.check
+new.block
+format.title "title" output.check
+new.block
+crossref missing$
+{ journal emphasize "journal" output.check
+format.vol.num.pages output
+format.date "year" output.check
+}
+{ format.article.crossref output.nonnull
+new.clause
+format.pages output
+}
+if$
+new.block
+note output
+fin.entry
+}
+FUNCTION {book}
+{ output.bibitem
+author empty$
+{ format.editors "author and editor" output.check }
+{ format.authors output.nonnull
+crossref missing$
+{ "author and editor" editor either.or.check }
+'skip$
+if$
+}
+if$
+new.block
+format.btitle "title" output.check
+crossref missing$
+{ new.clause
+format.bvolume output
+new.block
+format.number.series output
+new.sentence
+publisher "publisher" output.check
+address new.clause.checka
+address output
+}
+{ new.block
+format.book.crossref output.nonnull
+}
+if$
+edition new.clause.checka
+format.edition output
+format.date "year" output.check
+new.block
+note output
+fin.entry
+}
+FUNCTION {booklet}
+{ output.bibitem
+format.authors output
+new.block
+format.title "title" output.check
+howpublished address new.block.checkb
+howpublished output
+address new.clause.checka
+address output
+format.date output
+new.block
+note output
+fin.entry
+}
+FUNCTION {inbook}
+{ output.bibitem
+author empty$
+{ format.editors "author and editor" output.check }
+{ format.authors output.nonnull
+crossref missing$
+{ "author and editor" editor either.or.check }
+'skip$
+if$
+}
+if$
+new.block
+format.btitle "title" output.check
+new.clause
+crossref missing$
+{ format.bvolume output
+new.clause
+format.chapter.pages "chapter and pages" output.check
+new.block
+format.number.series output
+new.sentence
+publisher "publisher" output.check
+address new.clause.checka
+address output
+}
+{ format.chapter.pages "chapter and pages" output.check
+new.block
+format.book.crossref output.nonnull
+}
+if$
+edition new.clause.checka
+format.edition output
+format.date "year" output.check
+new.block
+note output
+fin.entry
+}
+FUNCTION {incollection}
+{ output.bibitem
+format.authors "author" output.check
+new.block
+format.title "title" output.check
+new.block
+crossref missing$
+{ format.in.ed.booktitle "booktitle" output.check
+new.clause
+format.bvolume output
+new.clause
+format.number.series output
+new.clause
+format.chapter.pages output
+new.sentence
+publisher "publisher" output.check
+address new.clause.checka
+address output
+edition new.clause.checka
+format.edition output
+format.date "year" output.check
+}
+{ format.incoll.inproc.crossref output.nonnull
+new.clause
+format.chapter.pages output
+}
+if$
+new.block
+note output
+fin.entry
+}
+FUNCTION {inproceedings}
+{ output.bibitem
+format.authors "author" output.check
+new.block
+format.title "title" output.check
+new.block
+crossref missing$
+{ format.in.ed.booktitle "booktitle" output.check
+volume new.clause.checka
+format.bvolume output
+number series new.clause.checkb
+format.number.series output
+pages new.clause.checka
+format.pages output
+address empty$
+{ organization publisher new.sentence.checkb
+organization output
+publisher new.clause.checka
+publisher output
+format.date "year" output.check
+}
+{ new.clause
+address output.nonnull
+format.date "year" output.check
+new.sentence
+organization output
+new.clause
+publisher output
+}
+if$
+}
+{ format.incoll.inproc.crossref output.nonnull
+new.clause
+format.pages output
+}
+if$
+new.block
+note output
+fin.entry
+}
+FUNCTION {conference} { inproceedings }
+FUNCTION {manual}
+{ output.bibitem
+author empty$
+{ organization empty$
+'skip$
+{ organization output.nonnull
+new.clause
+address output
+}
+if$
+}
+{ format.authors output.nonnull }
+if$
+new.block
+format.btitle "title" output.check
+author empty$
+{ organization empty$
+{ address new.block.checka
+address output
+}
+'skip$
+if$
+}
+{ organization address new.block.checkb
+organization output
+address new.clause.checka
+address output
+}
+if$
+edition new.clause.checka
+format.edition output
+format.date output
+new.block
+note output
+fin.entry
+}
+FUNCTION {mastersthesis}
+{ output.bibitem
+format.authors "author" output.check
+new.block
+format.title "title" output.check
+new.block
+"\abphrase{17}" format.thesis.type output.nonnull
+new.clause
+school "school" output.check
+address new.clause.checka
+address output
+format.date "year" output.check
+new.block
+note output
+fin.entry
+}
+FUNCTION {misc}
+{ output.bibitem
+format.authors output
+title howpublished new.block.checkb
+format.title output
+howpublished new.block.checka
+howpublished output
+format.date output
+new.block
+note output
+fin.entry
+empty.misc.check
+}
+FUNCTION {phdthesis}
+{ output.bibitem
+format.authors "author" output.check
+new.block
+format.btitle "title" output.check
+new.block
+"\abphrase{18}" format.thesis.type output.nonnull
+new.clause
+school "school" output.check
+address new.clause.checka
+address output
+format.date "year" output.check
+new.block
+note output
+fin.entry
+}
+FUNCTION {proceedings}
+{ output.bibitem
+editor empty$
+{ organization output }
+{ format.editors output.nonnull }
+if$
+new.block
+format.btitle "title" output.check
+volume new.clause.checka
+format.bvolume output
+number series new.clause.checkb
+format.number.series output
+address empty$
+{ editor empty$
+{ publisher new.sentence.checka }
+{ organization publisher new.sentence.checkb
+organization output
+publisher new.clause.checka
+}
+if$
+publisher output
+format.date "year" output.check
+}
+{ new.clause
+address output.nonnull
+format.date "year" output.check
+new.sentence
+editor empty$
+'skip$
+{ organization output
+new.clause
+}
+if$
+publisher output
+}
+if$
+new.block
+note output
+fin.entry
+}
+FUNCTION {techreport}
+{ output.bibitem
+format.authors "author" output.check
+new.block
+format.title "title" output.check
+new.block
+format.tr.number output.nonnull
+new.clause
+institution "institution" output.check
+address new.clause.checka
+address output
+format.date "year" output.check
+new.block
+note output
+fin.entry
+}
+FUNCTION {unpublished}
+{ output.bibitem
+format.authors "author" output.check
+new.block
+format.title "title" output.check
+new.block
+note "note" output.check
+format.date output
+fin.entry
+}
+FUNCTION {default.type} { misc }
+MACRO {jan} {"\abmonth{1}"}
+MACRO {feb} {"\abmonth{2}"}
+MACRO {mar} {"\abmonth{3}"}
+MACRO {apr} {"\abmonth{4}"}
+MACRO {may} {"\abmonth{5}"}
+MACRO {jun} {"\abmonth{6}"}
+MACRO {jul} {"\abmonth{7}"}
+MACRO {aug} {"\abmonth{8}"}
+MACRO {sep} {"\abmonth{9}"}
+MACRO {oct} {"\abmonth{10}"}
+MACRO {nov} {"\abmonth{11}"}
+MACRO {dec} {"\abmonth{12}"}
+MACRO {first} {"\abedition{1}"}
+MACRO {second} {"\abedition{2}"}
+MACRO {third} {"\abedition{3}"}
+MACRO {fourth} {"\abedition{4}"}
+MACRO {fifth} {"\abedition{5}"}
+MACRO {sixth} {"\abedition{6}"}
+MACRO {seventh} {"\abedition{7}"}
+MACRO {eighth} {"\abedition{8}"}
+MACRO {ninth} {"\abedition{9}"}
+MACRO {tenth} {"\abedition{10}"}
+MACRO {section} {"\abchapter{0}"}
+MACRO {paragraph} {"\abchapter{1}"}
+MACRO {appendix} {"\abchapter{2}"}
+MACRO {part} {"\abchapter{3}"}
+READ
+FUNCTION {sortify}
+{ purify$
+"l" change.case$
+}
+INTEGERS { len }
+FUNCTION {chop.word}
+{ 's :=
+'len :=
+s #1 len substring$ =
+{ s len #1 + global.max$ substring$ }
+'s
+if$
+}
+INTEGERS { et.al.char.used }
+FUNCTION {initialize.et.al.char.used}
+{ #0 'et.al.char.used :=
+}
+EXECUTE {initialize.et.al.char.used}
+FUNCTION {format.lab.names}
+{ 's :=
+s num.names$ 'numnames :=
+numnames #1 >
+{ numnames #4 >
+{ #3 'namesleft := }
+{ numnames 'namesleft := }
+if$
+#1 'nameptr :=
+""
+{ namesleft #0 > }
+{ nameptr numnames =
+{ s nameptr "{ff }{vv }{ll}{ jj}" format.name$ "others" =
+{ "{\etalchar{+}}" *
+#1 'et.al.char.used :=
+}
+{ s nameptr "{v{}}{l{}}" format.name$ * }
+if$
+}
+{ s nameptr "{v{}}{l{}}" format.name$ * }
+if$
+nameptr #1 + 'nameptr :=
+namesleft #1 - 'namesleft :=
+}
+while$
+numnames #4 >
+{ "{\etalchar{+}}" *
+#1 'et.al.char.used :=
+}
+'skip$
+if$
+}
+{ s #1 "{v{}}{l{}}" format.name$
+duplicate$ text.length$ #2 <
+{ pop$ s #1 "{ll}" format.name$ #3 text.prefix$ }
+'skip$
+if$
+}
+if$
+}
+FUNCTION {author.key.label}
+{ author empty$
+{ key empty$
+{ cite$ #1 #3 substring$ }
+{ key #3 text.prefix$ }
+if$
+}
+{ author format.lab.names }
+if$
+}
+FUNCTION {author.editor.key.label}
+{ author empty$
+{ editor empty$
+{ key empty$
+{ cite$ #1 #3 substring$ }
+{ key #3 text.prefix$ }
+if$
+}
+{ editor format.lab.names }
+if$
+}
+{ author format.lab.names }
+if$
+}
+FUNCTION {author.key.organization.label}
+{ author empty$
+{ key empty$
+{ organization empty$
+{ cite$ #1 #3 substring$ }
+{ "The " #4 organization chop.word #3 text.prefix$ }
+if$
+}
+{ key #3 text.prefix$ }
+if$
+}
+{ author format.lab.names }
+if$
+}
+FUNCTION {editor.key.organization.label}
+{ editor empty$
+{ key empty$
+{ organization empty$
+{ cite$ #1 #3 substring$ }
+{ "The " #4 organization chop.word #3 text.prefix$ }
+if$
+}
+{ key #3 text.prefix$ }
+if$
+}
+{ editor format.lab.names }
+if$
+}
+FUNCTION {calc.label}
+{ type$ "book" =
+type$ "inbook" =
+or
+'author.editor.key.label
+{ type$ "proceedings" =
+'editor.key.organization.label
+{ type$ "manual" =
+'author.key.organization.label
+'author.key.label
+if$
+}
+if$
+}
+if$
+duplicate$
+year field.or.null purify$ #-1 #2 substring$
+*
+'label :=
+year field.or.null purify$ #-1 #4 substring$
+*
+sortify 'sort.label :=
+}
+FUNCTION {sort.format.names}
+{ 's :=
+#1 'nameptr :=
+""
+s num.names$ 'numnames :=
+numnames 'namesleft :=
+{ namesleft #0 > }
+{ nameptr #1 >
+{ " " * }
+'skip$
+if$
+s nameptr "{vv{ } }{ll{ }}{ ff{ }}{ jj{ }}" format.name$ 't :=
+nameptr numnames = t "others" = and
+{ "et al" * }
+{ t sortify * }
+if$
+nameptr #1 + 'nameptr :=
+namesleft #1 - 'namesleft :=
+}
+while$
+}
+FUNCTION {sort.format.title}
+{ 't :=
+"A " #2
+"An " #3
+"The " #4 t chop.word
+chop.word
+chop.word
+sortify
+#1 global.max$ substring$
+}
+FUNCTION {author.sort}
+{ author empty$
+{ key empty$
+{ "to sort, need author or key in " cite$ * warning$
+""
+}
+{ key sortify }
+if$
+}
+{ author sort.format.names }
+if$
+}
+FUNCTION {author.editor.sort}
+{ author empty$
+{ editor empty$
+{ key empty$
+{ "to sort, need author, editor, or key in " cite$ * warning$
+""
+}
+{ key sortify }
+if$
+}
+{ editor sort.format.names }
+if$
+}
+{ author sort.format.names }
+if$
+}
+FUNCTION {author.organization.sort}
+{ author empty$
+{ organization empty$
+{ key empty$
+{ "to sort, need author, organization, or key in " cite$ * warning$
+""
+}
+{ key sortify }
+if$
+}
+{ "The " #4 organization chop.word sortify }
+if$
+}
+{ author sort.format.names }
+if$
+}
+FUNCTION {editor.organization.sort}
+{ editor empty$
+{ organization empty$
+{ key empty$
+{ "to sort, need editor, organization, or key in " cite$ * warning$
+""
+}
+{ key sortify }
+if$
+}
+{ "The " #4 organization chop.word sortify }
+if$
+}
+{ editor sort.format.names }
+if$
+}
+FUNCTION {presort}
+{ calc.label
+sort.label
+" "
+*
+type$ "book" =
+type$ "inbook" =
+or
+'author.editor.sort
+{ type$ "proceedings" =
+'editor.organization.sort
+{ type$ "manual" =
+'author.organization.sort
+'author.sort
+if$
+}
+if$
+}
+if$
+*
+" "
+*
+year field.or.null sortify
+*
+" "
+*
+title field.or.null
+sort.format.title
+*
+#1 entry.max$ substring$
+'sort.key$ :=
+}
+ITERATE {presort}
+SORT
+STRINGS { longest.label last.sort.label next.extra }
+INTEGERS { longest.label.width last.extra.num }
+FUNCTION {initialize.longest.label}
+{ "" 'longest.label :=
+#0 int.to.chr$ 'last.sort.label :=
+"" 'next.extra :=
+#0 'longest.label.width :=
+#0 'last.extra.num :=
+}
+FUNCTION {forward.pass}
+{ last.sort.label sort.label =
+{ last.extra.num #1 + 'last.extra.num :=
+last.extra.num int.to.chr$ 'extra.label :=
+}
+{ "a" chr.to.int$ 'last.extra.num :=
+"" 'extra.label :=
+sort.label 'last.sort.label :=
+}
+if$
+}
+FUNCTION {reverse.pass}
+{ next.extra "b" =
+{ "a" 'extra.label := }
+'skip$
+if$
+label extra.label * 'label :=
+label width$ longest.label.width >
+{ label 'longest.label :=
+label width$ 'longest.label.width :=
+}
+'skip$
+if$
+extra.label 'next.extra :=
+}
+EXECUTE {initialize.longest.label}
+ITERATE {forward.pass}
+REVERSE {reverse.pass}
+FUNCTION {begin.bib}
+{
+"\newif\ifabfull\abfulltrue" write$ newline$
+et.al.char.used
+{ "\newcommand{\etalchar}[1]{$^{#1}$}" write$ newline$ }
+'skip$
+if$
+preamble$ empty$
+'skip$
+{ preamble$ write$ newline$ }
+if$
+"\begin{thebibliography}{" longest.label * "}" * write$ newline$
+}
+EXECUTE {begin.bib}
+EXECUTE {init.state.consts}
+ITERATE {call.type$}
+FUNCTION {end.bib}
+{ newline$
+"\end{thebibliography}" write$ newline$
+}
+EXECUTE {end.bib}
diff --git a/biblio/bibtex/contrib/abstyles/abstdok.bbl b/biblio/bibtex/contrib/abstyles/abstdok.bbl
new file mode 100644
index 0000000000..9b49f06ae9
--- /dev/null
+++ b/biblio/bibtex/contrib/abstyles/abstdok.bbl
@@ -0,0 +1,37 @@
+\newif\ifabfull\abfulltrue
+\input apreambl \newif\ifger\gerfalse \ifnum\language=\german\gertrue\fi
+ \ifnum\language=\austrian\gertrue\fi \def\sortby#1{}\def\LaTeX{{\rm
+ L\kern-.36em\raise.3ex\hbox{\sc a}\kern-.15em
+ T\kern-.1667em\lower.7ex\hbox{E}\kern-.125emX}}\def\BibTeX{{\rm
+ B\kern-.05em{\sc i\kern-.025em b}\kern-.08em
+ T\kern-.1667em\lower.7ex\hbox{E}\kern-.125emX}}
+\begin{thebibliography}{1}
+
+\bibitem{art1}
+\abtype{0}{Donald~E. Knuth}.
+\newblock \abtype{1}{Fundamental Algorithms},
+ \abphrase{8}~1\abphrase{5}\abtype{1}{The Art of Computer Programming}.
+\newblock Ad\-di\-son-Wes\-ley, Reading, Massachusetts,
+ \abedition{2}\abphrase{12} \abtype{5}{\sortby{1973a}1973}.
+
+\bibitem{kopka-einf}
+\abtype{0}{Helmut Kopka}.
+\newblock \abtype{1}{{\LaTeX\ -- Eine Ein\-f\"uh\-rung}}.
+\newblock Ad\-di\-son-Wes\-ley, Bonn, \abedition{3}\abphrase{12}
+ \abtype{5}{1991}.
+
+\bibitem{latex}
+\abtype{0}{Leslie Lamport}.
+\newblock \abtype{1}{{\LaTeX \rm:} {A} Document Preparation System}.
+\newblock Ad\-di\-son-Wes\-ley, Reading, Massachusetts \abtype{5}{1986}.
+
+\bibitem{bibtex-doc}
+\abtype{0}{Oren Patashnik}.
+\newblock \abtype{1}{{{\BibTeX}}ing} \abtype{5}{\abmonth{1} 1988}.
+
+\bibitem{bibtex-hak}
+\abtype{0}{Oren Patashnik}.
+\newblock \abtype{1}{Designing {{\BibTeX}} Styles} \abtype{5}{\abmonth{1}
+ 1988}.
+
+\end{thebibliography}
diff --git a/biblio/bibtex/contrib/abstyles/abstdok.pdf b/biblio/bibtex/contrib/abstyles/abstdok.pdf
new file mode 100644
index 0000000000..9d2c07f0e3
--- /dev/null
+++ b/biblio/bibtex/contrib/abstyles/abstdok.pdf
Binary files differ
diff --git a/biblio/bibtex/contrib/abstyles/abstdok.tex b/biblio/bibtex/contrib/abstyles/abstdok.tex
new file mode 100644
index 0000000000..67911ed93e
--- /dev/null
+++ b/biblio/bibtex/contrib/abstyles/abstdok.tex
@@ -0,0 +1,483 @@
+ %-*-LaTeX-*-
+\documentstyle[twoside,german,a4c]{article}
+\pagestyle{headings}
+\frenchspacing
+\setlength{\doublerulesep}{0pt}
+
+\title{Neue \BibTeX-Style-Files: Die {\em adaptable family}}
+\author{Hans-Hermann Bode\thanks{Postanschrift: Arbeitsgruppe Systemforschung,
+ Universit"at Osnabr"uck, Artilleriestra"se 34, D-W-4500 Osnabr"uck; e-mail:
+ {\tt hhbode@dosuni1.bitnet}.}}
+\date{08. April 1992}
+
+\newcommand{\BibTeX}{{\rm B\kern-.05em{\sc i\kern-.025em b}\kern-.08em
+ T\kern-.1667em\lower.7ex\hbox{E}\kern-.125emX}}
+
+%-----------------------------------------------------------------------------
+
+\begin{document}
+
+\maketitle
+%\tableofcontents
+%\listoffigures
+%\listoftables
+
+\begin{abstract}\footnotesize
+ Es wird eine neue Familie von \BibTeX-Style-Files vorgestellt, die von den
+ Standard-Style-Files abgeleitet ist und sich durch nachtr"agliche
+ Anpa"sbarkeit von Layout und F"ullw"ortern seitens des Benutzers oder der
+ Benutzerin\footnote{Im folgenden gilt die Fu"snote auf Seite~v von Knuths
+ fundamentalem Werk~\cite{art1} sinngem"a"s.} auszeichnet. Das Paket
+ umfa"st neben den eigentlichen Stilen Dateien mit Definitionen, die
+ automatisch eine englische oder deutsche Bibliographie mit ausgeschriebenen
+ oder abgek"urzten F"ullw"ortern erzeugen und au"serdem die volle
+ Kompatibilit"at bestehender \BibTeX-Datenbanken zu den neuen Stilen sowie
+ umgekehrt die Vertr"aglichkeit neuer Datenbanken zu den alten Stilen
+ herstellen.
+\end{abstract}
+
+%-----------------------------------------------------------------------------
+
+Mit {\BibTeX} steht dem \LaTeX- wie dem plain-\TeX-Anwender ein
+au"serordentlich leistungsf"ahiges Werkzeug zur Verf"ugung, um
+Bibliographien zu Artikeln, Berichten, B"uchern und {\em literate
+programs\/} zu erstellen. Mu"ste man fr"uher m"uhsam alle zitierten
+Literaturstellen zusammensuchen, alle Angaben -- oft immer wieder dieselben
+-- per Hand eintippen (m"oglichst, ohne Fehler bei Seitenangaben,
+Bandnummern, Jahreszahlen usw.~zu machen) und sich schlie"slich auch noch um
+Layout-Fragen k"ummern, so beschr"ankt sich diese Arbeit mit {\BibTeX} auf
+die einmalige Eingabe der bibliographischen Informationen in eine
+Literaturdatenbank und das Aufrufen von \verb|\cite|-Kommandos mit einem
+Schl"ussel f"ur das zu zitierende Werk. {\BibTeX} stellt dann die
+Literaturliste zusammen und sorgt auch f"ur ein konsistentes Aussehen
+derselben.
+
+{\BibTeX} ist "`offizieller"' Bestandteil des \LaTeX-Makropakets und von
+Lamport in~\cite{latex} beschrieben, eine deutsche Fassung findet man etwa
+bei Kopka~\cite{kopka-einf}. Dar"uberhinaus erlaubt das zur
+Standard-\BibTeX-Distribution geh"orige Makropaket {\tt btxmac.tex} auch die
+Verwendung unter plain-\TeX\, und zwar mit der gleichen
+Benutzerschnittstelle (dieses Makropaket ist auch mit dem {\tt WEB}-System
+f"ur strukturierte Dokumentation kompatibel, so da"s \BibTeX\ auch beim {\em
+literate programming\/} eingesetzt werden kann). Oren Patashnik, der Autor
+des \BibTeX-Programms, legt mit~\cite{bibtex-doc} ein Manual f"ur
+\BibTeX-Benutzer vor, das im Gegensatz zu den zuvor genannten Stellen die
+jeweils aktuelle Version dokumentiert und das in einer Datei {\tt
+btxdoc.tex} jeder \BibTeX-Implementation beigegeben sein sollte. Die
+Kenntnis wenigstens einer der angegebenen Quellen wird hier vorausgesetzt
+und nicht weiter auf allgemeine Grundlagen der Benutzung von {\BibTeX}
+eingegangen.
+
+Das Schlu"skapitel von Patashniks Manual -- herausgegeben als separates
+Dokument~\cite{bibtex-hak} -- beschreibt M"oglichkeiten der Erzeugung von
+Style-Files, die das Layout der Bibliographie bestimmen. Vier solcher
+Style-Files ({\tt plain}, {\tt unsrt}, {\tt alpha} und {\tt abbrv}) geh"oren
+zum Standardumfang von {\BibTeX}. Weitere Styles -- wie {\tt siam}, {\tt
+ieeetr} oder {\tt apalike} -- wurden von Patashnik u.\,a.~erstellt, in
+erster Linie, um den Anforderungen bestimmter Zeitschriftenherausgeber zu
+entsprechen. Die Erzeugung von solchen Styles, auch wenn es nur um relativ
+geringf"ugige Ab"anderungen vorhandener Stile geht, ist allerdings ein recht
+m"uhsamer Vorgang (man mu"s Programme in einer Spezialsprache mit
+Postfixnotation schreiben), der die meisten {\BibTeX}-Anwender "uberfordern
+d"urfte. Aus diesem Grund entstand die {\em adaptable family}, die eine
+einfache Anpassung an pers"onliche oder fremde Vorstellungen erlaubt.
+
+\section*{Die Styles} %-------------------------------------------------------
+
+\begin{table}\small\centering
+ \caption{\sf "Ubersicht der Stile mit ihren Attributen.\strut}
+ \label{tab:stile}
+ \medskip
+ \begin{tabular}{lcccccc}
+ \hline\hline
+ Stil & numerisch & sortiert & initial & klein & kurz & titellos\\
+ \hline
+ {\tt aplain} & ja & ja & nein & ja & nein & nein\\
+ {\tt aunsrt} & ja & nein & nein & ja & nein & nein\\
+ {\tt aalpha} & nein & ja & nein & ja & nein & nein\\
+ {\tt aabbrv} & ja & ja & ja & ja & ja & nein\\
+ {\tt anotit} & ja & ja & ja & ja & ja & ja\\
+ {\tt aunsnot} & ja & nein & ja & ja & ja & ja\\
+ \hline\hline
+ \end{tabular}
+\end{table}
+
+Das grunds"atzliche Aussehen der Bibliographie wird auch bei den anpa"sbaren
+Versionen durch den jeweiligen, im \verb|\bibliographystyle| der \TeX-Quelle
+gew"ahlten Stil festgelegt. Dieser bestimmt im wesentlichen, welche
+Informationen "uberhaupt auszugeben sind und in welcher Reihenfolge diese
+angeordnet werden sollen; dar"uber hinaus sind f"ur jeden Stil eine Reihe von
+festen, unver"anderlichen Merkmalen vorgegeben, die in Tabelle~\ref{tab:stile}
+f"ur die sechs Stile der {\em adaptable family\/} zusammengefa"st sind.
+
+Alle Stile bis auf {\tt aalpha} erzeugen numerische Marken zur Kennzeichnung
+der Zitate ("`[1]"', "`[2]"' usw.), w"ahrend {\tt aalpha} die Marken
+alphanumerisch, i.\,allg.~aus K"urzeln f"ur die Autorennamen und
+Erscheinungsjahr, zusammensetzt (z.\,B.~"`[knu73]"'). Bei {\tt aunsrt} und
+{\tt aunsnot} erscheint die Bibliographie in der Reihenfolge der Zitate, bei
+den anderen Stilen wird sie nach Autorennamen, Erscheinungsjahren
+usw.~sortiert. Das Attribut "`initial"' zeigt an, ob die Vornamen der
+Autoren abgek"urzt werden oder nicht; das erstere ist der Fall f"ur {\tt
+aabbrv}, {\tt anotit} und {\tt aunsnot}, die zudem im Unterschied zu den
+"ubrigen Stilen als "`kurz"' gekennzeichnet sind (die Bedeutung dieses
+Attributs wird im n"achsten Abschnitt erkl"art). Alle Stile setzen
+Gro"sbuchstaben, die in Titeln von Zeitschriftenartikeln -- sofern diese
+"uberhaupt ausgegeben werden -- vorkommen und nicht am Satzanfang stehen, in
+Kleinschreibung um (Attribut "`klein"'); dies ist zwar f"ur deutsche Titel
+nicht geeignet, l"a"st sich aber leicht unterdr"ucken (s.~die Er"orterung am
+Ende dieses Artikels). Schlie"slich zeichnen sich die Stile {\tt anotit} und
+{\tt aunsnot} dadurch aus, da"s die Titel von Zeitschriftenartikeln
+unterdr"uckt werden, wie es etwa in der physikalischen Literatur
+durchg"angig "ublich ist.
+
+Insgesamt entsprechen die Stile {\tt aplain}, {\tt aunsrt}, {\tt aalpha} und
+{\tt aabbrv} -- wie auch aus der Namensgebung hervorgeht -- den vier
+Standardstilen von \BibTeX\ (Patashniks {\em plain family\/}), w"ahrend {\tt
+anotit} und {\tt aunsnot} hinzugef"ugt wurden, um eine L"ucke zu schlie"sen.
+
+\section*{Anpassung von Layout und F"ullw"ortern} %---------------------------
+
+Die Anpassung der {\tt a}-Stile erfolgt durch Definition bestimmter
+\TeX-Makros; andererseits funktionieren die Stile nicht, wenn diese Makros
+undefiniert sind. Die Definition geschieht zweckm"a"sigerweise "uber ein
+\verb|@PREAMBLE|-Kommando, das sich in einer der bibliographischen
+Datenbanken befindet (vgl.~das n"achste Kapitel). Die {\tt a}-Styles
+definieren einen Schalter \verb|abfull|, der in Abh"angigkeit davon, ob es
+sich um einen "`Kurzstil"' handelt oder nicht (s.~Tab.~\ref{tab:stile}), den
+Wert \verb|false| oder \verb|true| bekommt. So k"onnen sich die Makros
+automatisch darauf einstellen, F"ullw"orter abzuk"urzen oder voll
+auszuschreiben.
+
+\begin{table}\small\centering
+ \caption{\sf Zusammenstellung der verwendeten Makros.\strut}
+ \label{tab:makros}
+ \medskip
+ \begin{tabular}{lp{8cm}}
+ \hline\hline
+ Makroname & Bedeutung\\
+ \hline
+ \verb|\abtype| & Definiert die Schriftauszeichnung einzelner Felder
+ eines Bibliographieeintrags.\\
+ \verb|\abphrase| & Legt die F"ullw"orter fest.\\
+ \verb|\abmonth| & Enth"alt die Monatsnamen.\\
+ \verb|\abedition| & Stellt Bezeichnungen f"ur Auflagen eines Buches zur
+ Verf"ugung ("`Erste"', "`Zweite"', "`Dritte"' usw.).\\
+ \verb|\abchapter| & Gibt Namen f"ur bestimmte Segmente eines
+ Schriftst"ucks zur"uck ("`Abschnitt"', "`Absatz"',
+ "`Anhang"' oder "`Teil"').\\
+ \hline\hline
+ \end{tabular}
+\end{table}
+
+Die fraglichen Makros sind in Tab.~\ref{tab:makros} zusammengestellt. Alle
+Makronamen beginnen mit {\tt ab}. W"ahrend \verb|\abtype| f"ur die
+Schriftauszeichnung verantworlich ist, haben alle anderen Makros mit
+F"ullw"ortern zu tun und erlauben sprachspezifische Anpassungen sowie
+Unterscheidung zwischen "`Kurz-"' und "`Vollstilen"'. Es folgen detaillierte
+Beschreibungen der Makros mit ihren Parametern.
+
+\subsection*{{\tt abtype}}
+
+\begin{table}\small\centering
+ \caption{\sf Der erste Parameter von {\tt abtype}.\strut}\label{tab:abtype}
+ \medskip
+ \begin{tabular}{rp{5cm}}
+ \hline\hline
+ Code & Bedeutung\\
+ \hline
+ 0 & Namen von Autoren und Editoren\\
+ 1 & Titel von B"uchern und Reihen\\
+ 2 & Zeitschriftentitel\\
+ 3 & Bandnummern von Zeitschriften\\
+ 4 & Heftnummern von Zeitschriften\\
+ 5 & Datumsangaben\\
+ \hline\hline
+ \end{tabular}
+\end{table}
+
+Die Layoutsteuerung wird "uber das Makro \verb|\abtype| vorgenommen. Die {\tt
+a}-Stile schreiben die meisten Felder eines Eintrags indirekt "uber einen
+Aufruf von \verb|\abtype| in die Bibliographie, wobei zwei Argumente
+"ubergeben werden: eine Codenummer f"ur die Art des Feldes und der in das
+Feld einzutragende Text. Dieser kann dann vom Makro beliebig formatiert
+zur"uckgegeben werden. Die Codewerte f"ur den ersten Parameter von
+\verb|\abtype| findet man in Tab.~\ref{tab:abtype}.
+
+Durch eine Definition der Form
+\begin{verbatim}
+\def\abtype##1##2{%
+\ifcase##1{\sc##2}\or"`##2"'\or{\em##2\/}\or{\bf##2}\or%
+(##2)\or(##2)\else##2\fi}}
+\end{verbatim}
+also erreichte man beispielweise, da"s Autorennamen in {\sc Kapit"alchen},
+Buchtitel in "`Anf"uhrungszeichen"' und Zeitschriftentitel {\em kursiv\/}
+gesetzt werden und da"s Bandnummern von Zeitschriften {\bf fett} erscheinen,
+w"ahrend Heftnummern ebenso wie Datumsangaben geklammert werden.
+Vorsichtshalber wurde noch eine \verb|\else|-Klausel angef"ugt, die bewirkt,
+da"s bei Aufruf des Makros mit einem undefinierten Codewert das zweite
+Argument unformatiert zur"uckgegeben wird (f"ur die Original-{\tt a}-Stile
+w"are dies nicht erforderlich).
+
+\subsection*{{\tt abphrase}}
+
+\begin{table}\small\centering
+ \caption{\sf Der Parameter von {\tt abphrase}.\strut}\label{tab:abphrase}
+ \medskip
+ \begin{tabular}{rp{9.5cm}}
+ \hline\hline
+ Code & Bedeutung\\
+ \hline
+ 0 & Bindewort zwischen zwei oder vor dem letzten Namen einer Liste
+ ("`und"')\\
+ 1 & Satzzeichen vor dem letzten Bindewort einer Namensliste (im
+ Deutschen nichts, im Englischen ein Komma)\\
+ 2 & Ersatz f"ur Namen von Mitautoren und Mitherausgebern ("`u.\,a."' oder
+ "`et~al."')\\
+ 3 & Bezeichnung f"ur mehrere Herausgeber (z.\,B.~"`Editoren"')\\
+ 4 & Bezeichnung f"ur einen Herausgeber ("`Editor"')\\
+ 5 & Wort nach der Bandnummer einer Reihe oder Kreuzreferenz ("`aus"')\\
+ 6 & Wort nach der Ausgabennummer einer Reihe ("`in"')\\
+ 7 & Wort vor Querverweisen auf B"ucher, Artikel usw.~("`In"')\\
+ 8 & Wort vor einer Bandnummer mitten im Satz ("`volume"' auf
+ Englisch, aber "`Band"' auf Deutsch)\\
+ 9 & dto.~am Satzanfang ("`Volume"' bzw.~erneut "`Band"')\\
+ 10 & Wort vor einer Reihennummer mitten im Satz ("`Nummer"')\\
+ 11 & dto. am Satzanfang (im Deutschen dasselbe)\\
+ 12 & Wort hinter einer Auf"|lagennummer ("`Auf"|lage"')\\
+ 13 & Wort vor mehreren Seitennummern ("`Seiten"')\\
+ 14 & Wort vor einer einzelnen Seitennummer ("`Seite"')\\
+ 15 & Wort vor einer Kapitelnummer ("`Kapitel"')\\
+ 16 & Bezeichnung f"ur einen Forschungsbericht ("`Technical Report"')\\
+ 17 & Bezeichnung f"ur eine Diplomarbeit ("`Master's thesis"')\\
+ 18 & Bezeichnung f"ur eine Doktorarbeit ("`PhD Thesis"')\\
+ \hline\hline
+ \end{tabular}
+\end{table}
+
+Der gr"o"ste Teil der F"ullw"orter wird durch \verb|\abphrase| abgedeckt.
+Das Makro hat einen Parameter, der wieder eine Codenummer darstellt.
+Die vorkommenden Werte zeigt Tab.~\ref{tab:abphrase}.
+
+Ein Beispiel f"ur eine geeignete Definition von \verb|\abphrase| mit
+ausgeschriebenen, deutschen F"ullw"ortern w"are:
+\begin{verbatim}
+\def\abphrase##1{%
+\ifcase##1{ und }\or{}\or{ und andere}\or%
+{ (Herausgeber)}\or{ (Herausgeber)}\or%
+{ aus }\or{ in }\or{In }\or%
+{Band}\or{Band}\or{Nummer}\or{Nummer}\or%
+{ Auf"|lage}\or{Seiten}\or{Seite}\or{Kapitel}\or%
+{Bericht}\or{Diplomarbeit}\or{Dissertation}\fi}
+\end{verbatim}
+
+\subsection*{{\tt abmonth}}
+
+Einfacher als die vorangegangenen Makros ist \verb|\abmonth|: Es wird mit
+einer Zahl zwischen 1~und~12 als Argument aufgerufen und sollte die
+Bezeichnung f"ur den entsprechenden Monat zur"uckgeben; also etwa
+\begin{verbatim}
+\def\abmonth##1{\ifcase##1\or Januar\or Februar\or M"arz\or
+ April\or Mai\or Juni\or Juli\or August\or September\or
+ Oktober\or November\or Dezember\fi}
+\end{verbatim}
+Man beachte, da"s vor \verb|Januar| bereits ein \verb|\or| stehen mu"s, da
+dieser Monat den Code~1 hat und nicht~0. Desweiteren gilt, da"s die
+Definition von \verb|\abmonth| nur dann einen Effekt hat, wenn in den
+Bibliographiedatenbanken von den vordefinierten Strings {\tt jan}, {\tt
+feb}, \dots, {\tt dec} Gebrauch gemacht wird -- es sei denn, man ruft das
+Makro direkt auf, wovon man jedoch im Hinblick auf m"ogliche
+Kompatibilit"atsprobleme mit anderen Styles oder zuk"unftigen Versionen der
+anpa"sbaren Stile Abstand nehmen sollte.
+
+\subsection*{{\tt abedition}}
+
+Ein weiteres Makro mit einem numerischen Wert als Parameter ist
+\verb|\abedition|. Die "ubergebene Zahl bezeichnet eine Auf"|lagennummer und
+es sollte ein entsprechender String zur"uckgegeben werden, z.\,B.:
+\begin{verbatim}
+\def\abedition##1{\ifcase##1\or Erste\or Zweite\or Dritte\or
+ Vierte\or F"unfte\or Sechste\or Siebte\or Achte\or
+ Neunte\or Zehnte\else?\fi}
+\end{verbatim}
+In den anpa"sbaren Stilen existieren vordefinierte Strings {\tt first}, {\tt
+second}, \dots, {\tt tenth}, die man aus den gleichen Gr"unden wie oben f"ur
+das {\tt EDITION}-Feld der Bibliographieeintr"age verwenden sollte. Ein
+Problem ergibt sich, wenn eine Auflagennummer gr"o"ser als~10 ben"otigt
+wird; in diesem Fall sollte man das Makro entsprechend erweitern und
+zus"atzliche Strings durch {\tt @STRING}-Kommandos definieren.
+
+\subsection*{{\tt abchapter}}
+
+Schlie"slich ist noch ein Makro mit einem Code zwischen 0~und~3 f"ur
+Bezeichnungen verschiedener Segmente eines Dokuments zu definieren. Die
+Bedeutung ergibt sich unmittelbar aus dem Beispiel
+\begin{verbatim}
+\def\abchapter##1{\ifcase##1Abschnitt\or Absatz\or
+Anhang\or Teil\fi}
+\end{verbatim}
+Auch f"ur den Aufruf dieses Makros gibt es vordefinierte Strings, die man in
+den Datenbanken tunlichst benutzen sollte; sie hei"sen {\tt section}, {\tt
+paragraph}, {\tt appendix} und {\tt part} und sind gedacht f"ur den Einsatz
+im {\tt TYPE}-Feld mancher Eintr"age, mit welchem sich das {\tt
+CHAPTER}-Feld umwidmen l"a"st.
+
+\section*{Benutzungshinweise} %-----------------------------------------------
+
+Zum Gl"uck braucht man die im letzten Kapitel vorgestellten Makros nicht
+selbst einzugeben, sie sind vielmehr bereits in der Datei {\tt
+apreamble.tex} enthalten, die zum Lieferumfang des Pakets geh"ort. Sie
+stellt in Abh"angigkeit vom \verb|abfull|-Schalter ausgeschriebene oder
+abgek"urzte F"ullw"orter zur Verf"ugung. Mehr noch, diese Datei enth"alt
+neben den deutschen F"ullw"ortern auch "aquivalente Definitionen in
+englischer Sprache. Die Auswahl zwischen den beiden Sprachversionen wird
+automatisch getroffen, und zwar nach folgenden Kriterien:
+\begin{itemize}
+ \item Ist das Makropaket {\tt german.sty} {\em nicht\/} geladen, wird die
+englische Version genommen.
+ \item Wird dagegen festgestellt, da"s {\tt german.sty} eingelesen wurde,
+h"angt die Sprachauswahl vom eingestellten \verb|\language|-Wert ab:
+ \begin{itemize}
+ \item Ist dieser gleich \verb|\german| oder \verb|\austrian|, wird die
+ deutsche Version gew"ahlt.
+ \item In allen anderen F"allen ist es wieder die englische.
+ \end{itemize}
+\end{itemize}
+Auf diese Weise sollten zumindest alle diejenigen zufriedengestellt sein,
+die entweder nur englische Dokumente verfassen oder unter Benutzung von {\tt
+german.sty} sowohl englische als auch deutsche Texte schreiben. Nat"urlich
+steht es jedem frei, {\tt apreamble.tex} um zus"atzliche Sprachen zu
+erweitern oder die mittels \verb|\abtype| vorgenommenen Formatierungen nach
+eigenem Gutd"unken abzu"andern.
+
+Damit der oben vorgestellte Mechanismus zur Sprachauswahl funktioniert, mu"s
+die Datei {\tt german.sty} -- wenn "uberhaupt -- {\em vor\/} {\tt
+apreamble.tex} eingelesen werden. Dies sollte im Zusammenhang mit \LaTeX\
+kein Problem darstellen, da \verb|german| f"ur gew"ohnlich als
+Dokumentstiloption verwendet wird. Wie oben erw"ahnt l"a"st sich \BibTeX\
+aber auch mit plain-\TeX\ nutzen, wenn das Makropaket {\tt btxmac.tex}
+eingebunden wird; hier ist dann sicherzustellen, da"s der Befehl
+\verb|\input german.sty| vor \verb|\input apreamble| (bzw., wie im n"achsten
+Absatz erl"autert, vor \verb|\bibliography{...}|) erscheint. Alle zur {\em
+adaptable family\/} geh"origen Makros sind "ubrigens so abgefa"st, da"s sie
+sowohl mit \LaTeX\ als auch mit plain-\TeX\ funktionieren; insbesondere
+vertragen sie sich auch mit dem {\tt WEB}-System f"ur strukturierte
+Dokumentation.
+
+Weiterhin ist es nat"urlich erforderlich, da"s {\tt apreamble.tex} vor der
+eigentlichen Bibliographie eingelesen wird; auch daf"ur steht eine implizite
+L"osung bereit. Es ist ohnehin vorteilhaft, wenn man eine oder mehrere {\tt
+bib}-Dateien mit allgemeinen Definitionen (haupts"achlich
+\verb|@STRING|-Kommandos) anlegt und diese stets am Anfang der
+\verb|\bibliography|-Liste aufz"ahlt. Zum Lieferumfang der {\em adaptable
+family\/} geh"oren zwei solche Dateien, {\tt jourfull.bib} und {\tt
+jourabbr.bib}, die Namen f"ur Zeitschriften -- einmal in ausgeschriebener
+und zum anderen in abgek"urzter Form -- definieren, und zwar gerade die,
+welche in den Standard-Bibliographiestilen (der {\em plain family\/})
+bereits vordefiniert sind\footnote{Der Autor der {\em adaptable family\/}
+war der Meinung, da"s die Auswahl dieser Zeitschriften zu speziell auf ein
+Fach bezogen ist, und hat die Definitionen daher in seinen Stildateien
+weggelassen. Unter Benutzung dieser beiden Dateien ist jedoch die volle
+Kompatibilit"at von Datenbanken, die f"ur die Standardstile erstellt wurden,
+zu den anpa"sbaren Stilen gew"ahrleistet.}. Beide Dateien laden {\tt
+apreamble.tex} automatisch am Anfang der Bibliographie. Alles, was man zur
+Nutzung der anpa"sbaren Stile -- abgesehen vom eventuellen Laden von {\tt
+btxmac} -- innerhalb eines Dokuments zu tun hat, beschr"ankt sich somit auf
+zwei Kommandos, die typischerweise so aussehen:
+\begin{verbatim}
+\bibliography{jourfull,user1,user2,user3}\bibliographystyle{aplain}
+\end{verbatim}
+Dabei sind \verb|user1|, \verb|user2| und \verb|user3| irgendwelche
+Benutzerdatenbanken, \verb|jourfull| kann nat"urlich auch durch
+\verb|jourabbr| ersetzt werden (mu"s aber immer am Anfang der Liste stehen!)
+und statt \verb|aplain| kann selbstverst"andlich ein beliebiger anderer
+anpa"sbarer Stil verwendet werden. Es ist zu betonen, da"s die Auswahl
+"`ausgeschriebene oder abgek"urzte Zeitschriftennamen"' nicht vom
+Bibliographiestil bestimmt wird, sondern durch Angabe von \verb|jourfull|
+oder \verb|jourabbr| erfolgt.
+
+Au"serdem definieren die beiden Dateien {\tt jourfull.bib} und {\tt
+jourabbr.bib} Strings namens \verb|ifger|, \verb|else| und \verb|fi|, die es
+auf einfache Weise erm"oglichen, innerhalb der Datenbanken bei einzelnen
+Feldern von der automatischen Sprachauswahl zu profitieren. Beispielsweise
+k"onnte damit das \verb|NOTE|-Feld eines Eintrags etwa folgendes enthalten:
+\begin{verbatim}
+ifger # "Wird demn{\"a}chst erscheinen." # else # "To be published." # fi
+\end{verbatim}
+Wie man unschwer erkennt, handelt es sich um eine bedingte Anweisung:
+\verb|ifger| sorgt daf"ur, da"s der nachstehende Text ausgegeben wird, wenn
+die automatische Sprachauswahl sich f"ur "`deutsch"' entschieden hat,
+\verb|else| leitet die Alternative f"ur den gegenteiligen Fall ein und
+\verb|fi| schlie"st die ganze Konstruktion ab. Der Operator~\verb|#|
+verkettet die einzelnen Teile zu einem von \TeX\ interpretierbaren
+Gesamtstring.
+
+Gelegentlich mag es vorkommen, da"s man die neuen, auf die {\em adaptable
+family\/} zugeschnittenen Datenbanken mit einem der Standardstile verwenden
+will. Dies st"o"st auf Schwierigkeiten, da die anpa"sbaren Stile einige
+zus"atzliche Strings definieren, von denen man sicherlich Gebrauch gemacht
+hat (genauer: machen sollte). Es steht aber eine Datei {\tt acompat.bib} zur
+Verf"ugung, die alle zus"atzlichen Strings nachtr"aglich definiert. Bindet
+man diese noch vor {\tt jourfull.bib} oder {\tt jourabbr.bib} (die man f"ur
+die oben beschriebenen Mechanismen weiterhin braucht) in die
+\verb|\bibliography|-Liste ein, so steht einer Nutzung der Standardstile
+etwa in der Form
+\begin{verbatim}
+\bibliography{acompat,jourfull,user1,user2,user3}\bibliographystyle{plain}
+\end{verbatim}
+nichts mehr im Wege. Nat"urlich funktioniert die automatische Sprachauswahl
+jetzt nicht mehr bei den F"ull"-w"or"-tern, sondern nur noch bei den
+"`handgemachten"' \verb|ifger|-Konstruktionen.
+
+Abschlie"send noch eine Anmerkung zur Gro"s-/Kleinschreibung von
+Zeitschriftentiteln. Die Stile der {\em plain family\/} setzen solche stets
+in Kleinschreibung um; so wird z.\,B. aus
+\begin{verbatim}
+TITLE="A Horror Story about Integration Methods"
+\end{verbatim}
+die Titelangabe "`A horror story about integration methods"'. Es wurde
+verschiedentlich die Meinung vertreten, da"s ein deutscher Bibliographiestil
+diese Umsetzung abschalten sollte, da sie f"ur deutsche Titel nicht ad"aquat
+ist. Der Autor der {\em adaptable family\/} schlie"st sich dieser Meinung
+nicht an (und hat die Umsetzung daher beibehalten): Gro"s-/Kleinschreibung
+von Zeitschriftentiteln ist nicht eine Frage der Sprache, in der das
+Dokument gesetzt ist, sondern eine Funktion der Sprache des Titels selbst.
+So sollte die Eingabe
+\begin{verbatim}
+TITLE="Graphische Sprachelemente in ALGOL 68"
+\end{verbatim}
+{\em immer\/} zu der Ausgabe "`Graphische Sprachelemente in ALGOL~68"'
+f"uhren -- auch in einem englischen Dokument; ebensowenig ist etwas dagegen
+einzuwenden, wenn im obigen Beispiel mit dem englischen Titel die Umsetzung
+auch in einem deutschen Dokument stattfindet.
+
+Es ist also {\em bei den einzelnen Titelangaben\/} daf"ur zu sorgen, da"s die
+Umsetzung ggf.~verhindert wird. Dies ist aber -- bei den Standard- wie bei
+den anpa"sbaren Stilen -- leicht m"oglich, wie im
+\BibTeX-Manual~\cite{bibtex-doc} beschrieben wird: Man schlie"se den
+gesamten Titel in ein zus"atzliches Paar geschweifter Klammern ein. Also
+bewirkt
+\begin{verbatim}
+TITLE="{Graphische Sprachelemente in ALGOL 68}"
+\end{verbatim}
+genau das Gew"unschte (die G"ansef"u"schen z"ahlen als "au"seres Klammerpaar
+und k"onnten auch durch geschweifte Klammern ersetzt werden, die
+zus"atzlichen Klammern sind aber trotzdem erforderlich). Statt dessen
+k"onnte man auch nur die gro"szuschreibenden W"orter oder Buchstaben
+klammern, z.\,B.
+\begin{verbatim}
+TITLE="{G}raphische {S}prachelemente in {ALGOL} 68"
+\end{verbatim}
+Diese Technik wendet man manchmal auch in englischen Titeln an, etwa in
+\begin{verbatim}
+TITLE="Stiff {ODE} Solvers: A Review of Current and Coming Attractions"
+\end{verbatim}
+so da"s sich der Titel "`Stiff ODE solvers: A review of current and coming
+attractions"' ergibt (das Wort nach dem Doppelpunkt bleibt ohne besondere
+Ma"snahme gro"sgeschrieben).
+
+%-----------------------------------------------------------------------------
+
+\footnotesize\bibliography{jfull,inf}\bibliographystyle{aplain}
+%\addcontentsline{toc}{section}{\refname}
+
+\end{document}
diff --git a/biblio/bibtex/contrib/abstyles/acompat.bib b/biblio/bibtex/contrib/abstyles/acompat.bib
new file mode 100644
index 0000000000..fb94505e64
--- /dev/null
+++ b/biblio/bibtex/contrib/abstyles/acompat.bib
@@ -0,0 +1,45 @@
+This is ACOMPAT.BIB, a BibTeX database file for the `adaptable' style
+family, written by Hans-Hermann Bode (HHBODE at DOSUNI1.BITNET), that contains
+compatibility definitions for use with standard styles. Use acompat as the
+very first item---even before jourfull or jourabbr---in your \bibliography
+command when you have to typeset your new databases---relying on the
+adaptable styles---with the standard styles.
+
+------------------------------------------------------------------------------
+
+First, we declare the \abfull switch that is defined by the adaptable
+styles. Here, it is unconditionally set to true which might not fit your
+needs (in this case, say \abfullfalse instead of \abfulltrue).
+
+@PREAMBLE{"\newif\ifabfull\abfulltrue"}
+
+------------------------------------------------------------------------------
+
+Next, the strings for edition numbers are defined.
+
+@STRING{first="First"}
+@STRING{second="Second"}
+@STRING{third="Third"}
+@STRING{fourth="Fourth"}
+@STRING{fifth="Fifth"}
+@STRING{sixth="Sixth"}
+@STRING{seventh="Seventh"}
+@STRING{eighth="Eighth"}
+@STRING{ninth="Ninth"}
+@STRING{tenth="Tenth"}
+
+------------------------------------------------------------------------------
+
+Finally, we have to set up strings for certain ``chapter'' names.
+
+@STRING{section="Section"}
+@STRING{paragraph="Paragraph"}
+@STRING{appendix="Appendix"}
+@STRING{part="Part"}
+
+------------------------------------------------------------------------------
+
+That's all there is to it. Now you can use your new databases with the old
+styles as well.
+
+------------------------------------------------------------------------------
diff --git a/biblio/bibtex/contrib/abstyles/anotit.bst b/biblio/bibtex/contrib/abstyles/anotit.bst
new file mode 100644
index 0000000000..3d9b27546b
--- /dev/null
+++ b/biblio/bibtex/contrib/abstyles/anotit.bst
@@ -0,0 +1,1074 @@
+% BibTeX bibliography style `ANOTIT'
+ENTRY
+{ address
+author
+booktitle
+chapter
+edition
+editor
+howpublished
+institution
+journal
+key
+month
+note
+number
+organization
+pages
+publisher
+school
+series
+title
+type
+volume
+year
+}
+{}
+{ label }
+INTEGERS { output.state before.all mid.sentence after.sentence after.block
+continue.sentence }
+FUNCTION {init.state.consts}
+{ #0 'before.all :=
+#1 'mid.sentence :=
+#2 'after.sentence :=
+#3 'after.block :=
+#4 'continue.sentence :=
+}
+STRINGS { s t }
+FUNCTION {output.nonnull}
+{ 's :=
+output.state continue.sentence =
+{ " " * write$ }
+{ output.state mid.sentence =
+{ ", " * write$ }
+{ output.state after.block =
+{ add.period$ write$
+newline$
+"\newblock " write$
+}
+{ output.state before.all =
+'write$
+{ add.period$ " " * write$ }
+if$
+}
+if$
+}
+if$
+continue.sentence 'output.state :=
+}
+if$
+s
+}
+FUNCTION {output}
+{ duplicate$ empty$
+'pop$
+'output.nonnull
+if$
+}
+FUNCTION {output.check}
+{ 't :=
+duplicate$ empty$
+{ pop$ "empty " t * " in " * cite$ * warning$ }
+'output.nonnull
+if$
+}
+FUNCTION {output.bibitem}
+{ newline$
+"\bibitem{" write$
+cite$ write$
+"}" write$
+newline$
+""
+before.all 'output.state :=
+}
+FUNCTION {fin.entry}
+{ add.period$
+write$
+newline$
+}
+FUNCTION {new.block}
+{ output.state before.all =
+'skip$
+{ after.block 'output.state := }
+if$
+}
+FUNCTION {new.sentence}
+{ output.state after.block =
+'skip$
+{ output.state before.all =
+'skip$
+{ after.sentence 'output.state := }
+if$
+}
+if$
+}
+FUNCTION {new.clause}
+{ output.state after.sentence =
+'skip$
+{ output.state after.block =
+'skip$
+{ output.state before.all =
+'skip$
+{ mid.sentence 'output.state := }
+if$
+}
+if$
+}
+if$
+}
+FUNCTION {not}
+{ { #0 }
+{ #1 }
+if$
+}
+FUNCTION {and}
+{ 'skip$
+{ pop$ #0 }
+if$
+}
+FUNCTION {or}
+{ { pop$ #1 }
+'skip$
+if$
+}
+FUNCTION {new.block.checka}
+{ empty$
+'skip$
+'new.block
+if$
+}
+FUNCTION {new.block.checkb}
+{ empty$
+swap$ empty$
+and
+'skip$
+'new.block
+if$
+}
+FUNCTION {new.sentence.checka}
+{ empty$
+'skip$
+'new.sentence
+if$
+}
+FUNCTION {new.sentence.checkb}
+{ empty$
+swap$ empty$
+and
+'skip$
+'new.sentence
+if$
+}
+FUNCTION {new.clause.checka}
+{ empty$
+'skip$
+'new.clause
+if$
+}
+FUNCTION {new.clause.checkb}
+{ empty$
+swap$ empty$
+and
+'skip$
+'new.clause
+if$
+}
+FUNCTION {field.or.null}
+{ duplicate$ empty$
+{ pop$ "" }
+'skip$
+if$
+}
+FUNCTION {emphasize}
+{ duplicate$ empty$
+{ pop$ "" }
+{ "\abtype{2}{" swap$ * "}" * }
+if$
+}
+FUNCTION {capitalize}
+{ duplicate$ empty$
+{ pop$ "" }
+{ "\abtype{0}{" swap$ * "}" * }
+if$
+}
+FUNCTION {boldface}
+{ duplicate$ empty$
+{ pop$ "" }
+{ "\abtype{3}{" swap$ * "}" * }
+if$
+}
+FUNCTION {quote}
+{ duplicate$ empty$
+{ pop$ "" }
+{ "\abtype{1}{" swap$ * "}" * }
+if$
+}
+FUNCTION {parentheses}
+{ duplicate$ empty$
+{ pop$ "" }
+{ "\abtype{5}{" swap$ * "}" * }
+if$
+}
+INTEGERS { nameptr namesleft numnames }
+FUNCTION {format.names}
+{ 's :=
+#1 'nameptr :=
+s num.names$ 'numnames :=
+numnames 'namesleft :=
+{ namesleft #0 > }
+{ s nameptr "{f.~}{vv~}{ll}{, jj}" format.name$ 't :=
+nameptr #1 >
+{ namesleft #1 >
+{ ", " * t * }
+{ numnames #2 >
+{ "\abphrase{1}" * }
+'skip$
+if$
+t "others" =
+{ "\abphrase{2}" * }
+{ "\abphrase{0}" * t * }
+if$
+}
+if$
+}
+'t
+if$
+nameptr #1 + 'nameptr :=
+namesleft #1 - 'namesleft :=
+}
+while$
+}
+FUNCTION {format.authors}
+{ author empty$
+{ "" }
+{ author format.names capitalize }
+if$
+}
+FUNCTION {format.editors}
+{ editor empty$
+{ "" }
+{ editor format.names capitalize
+editor num.names$ #1 >
+{ "\abphrase{3}" * }
+{ "\abphrase{4}" * }
+if$
+}
+if$
+}
+FUNCTION {format.title}
+{ title empty$
+{ "" }
+{ title "t" change.case$ }
+if$
+}
+FUNCTION {n.dashify}
+{ 't :=
+""
+{ t empty$ not }
+{ t #1 #1 substring$ "-" =
+{ t #1 #2 substring$ "--" = not
+{ "--" *
+t #2 global.max$ substring$ 't :=
+}
+{ { t #1 #1 substring$ "-" = }
+{ "-" *
+t #2 global.max$ substring$ 't :=
+}
+while$
+}
+if$
+}
+{ t #1 #1 substring$ *
+t #2 global.max$ substring$ 't :=
+}
+if$
+}
+while$
+}
+FUNCTION {format.date}
+{ year empty$
+{ month empty$
+{ "" }
+{ "there's a month but no year in " cite$ * warning$
+month parentheses
+}
+if$
+}
+{ month empty$
+{ year parentheses }
+{ month " " * year * parentheses }
+if$
+}
+if$
+}
+FUNCTION {format.btitle}
+{ title quote
+}
+FUNCTION {tie.or.space.connect}
+{ duplicate$ text.length$ #3 <
+{ "~" }
+{ " " }
+if$
+swap$ * *
+}
+FUNCTION {either.or.check}
+{ empty$
+'pop$
+{ "can't use both " swap$ * " fields in " * cite$ * warning$ }
+if$
+}
+FUNCTION {format.bvolume}
+{ volume empty$
+{ "" }
+{ "\abphrase{8}" volume tie.or.space.connect
+series empty$
+'skip$
+{ "\abphrase{5}" * series quote * }
+if$
+"volume and number" number either.or.check
+}
+if$
+}
+FUNCTION {format.number.series}
+{ volume empty$
+{ number empty$
+{ series field.or.null }
+{ output.state mid.sentence = output.state continue.sentence = or
+{ "\abphrase{10}" }
+{ "\abphrase{11}" }
+if$
+number tie.or.space.connect
+series empty$
+{ "there's a number but no series in " cite$ * warning$ }
+{ "\abphrase{6}" * series * }
+if$
+}
+if$
+}
+{ "" }
+if$
+}
+FUNCTION {format.edition}
+{ edition empty$
+{ "" }
+{ output.state mid.sentence = output.state continue.sentence = or
+{ edition "l" change.case$ "\abphrase{12}" * }
+{ edition "t" change.case$ "\abphrase{12}" * }
+if$
+}
+if$
+}
+INTEGERS { multiresult }
+FUNCTION {multi.page.check}
+{ 't :=
+#0 'multiresult :=
+{ multiresult not
+t empty$ not
+and
+}
+{ t #1 #1 substring$
+duplicate$ "-" =
+swap$ duplicate$ "," =
+swap$ "+" =
+or or
+{ #1 'multiresult := }
+{ t #2 global.max$ substring$ 't := }
+if$
+}
+while$
+multiresult
+}
+FUNCTION {format.pages}
+{ pages empty$
+{ "" }
+{ pages multi.page.check
+{ "\abphrase{13}" pages n.dashify tie.or.space.connect }
+{ "\abphrase{14}" pages tie.or.space.connect }
+if$
+}
+if$
+}
+FUNCTION {format.vol.num.pages}
+{ volume field.or.null boldface
+number empty$
+'skip$
+{ "\abtype{4}{" number * "}" * *
+volume empty$
+{ "there's a number but no volume in " cite$ * warning$ }
+'skip$
+if$
+}
+if$
+pages empty$
+'skip$
+{ duplicate$ empty$
+{ pop$ format.pages }
+{ ", " * pages n.dashify * }
+if$
+}
+if$
+}
+FUNCTION {format.chapter.pages}
+{ chapter empty$
+'format.pages
+{ type empty$
+{ "\abphrase{15}" }
+{ type "l" change.case$ }
+if$
+chapter tie.or.space.connect
+pages empty$
+'skip$
+{ ", " * format.pages * }
+if$
+}
+if$
+}
+FUNCTION {format.in.ed.booktitle}
+{ booktitle empty$
+{ "" }
+{ editor empty$
+{ "\abphrase{7}" booktitle quote * }
+{ "\abphrase{7}" format.editors * ", " * booktitle quote * }
+if$
+}
+if$
+}
+FUNCTION {empty.misc.check}
+{ author empty$ title empty$ howpublished empty$
+month empty$ year empty$ note empty$
+and and and and and
+key empty$ not and
+{ "all relevant fields are empty in " cite$ * warning$ }
+'skip$
+if$
+}
+FUNCTION {format.thesis.type}
+{ type empty$
+'skip$
+{ pop$
+type "t" change.case$
+}
+if$
+}
+FUNCTION {format.tr.number}
+{ type empty$
+{ "\abphrase{16}" }
+'type
+if$
+number empty$
+{ "t" change.case$ }
+{ number tie.or.space.connect }
+if$
+}
+FUNCTION {format.article.crossref}
+{ key empty$
+{ journal empty$
+{ "need key or journal for " cite$ * " to crossref " * crossref *
+warning$
+""
+}
+{ "\abphrase{7}" journal emphasize * }
+if$
+}
+{ "\abphrase{7}" key * }
+if$
+" \cite{" * crossref * "}" *
+}
+FUNCTION {format.crossref.editor}
+{ editor #1 "{vv~}{ll}" format.name$
+editor num.names$ duplicate$
+#2 >
+{ pop$ "\abphrase{2}" * }
+{ #2 <
+'skip$
+{ editor #2 "{ff }{vv }{ll}{ jj}" format.name$ "others" =
+{ "\abphrase{2}" * }
+{ "\abphrase{0}" * editor #2 "{vv~}{ll}" format.name$ * }
+if$
+}
+if$
+}
+if$
+}
+FUNCTION {format.book.crossref}
+{ volume empty$
+{ "empty volume in " cite$ * "'s crossref of " * crossref * warning$
+"\abphrase{7}"
+}
+{ "\abphrase{9}" volume tie.or.space.connect
+"\abphrase{5}" *
+}
+if$
+editor empty$
+editor field.or.null author field.or.null =
+or
+{ key empty$
+{ series empty$
+{ "need editor, key, or series for " cite$ * " to crossref " *
+crossref * warning$
+"" *
+}
+{ series quote * }
+if$
+}
+{ key * }
+if$
+}
+{ format.crossref.editor * }
+if$
+" \cite{" * crossref * "}" *
+}
+FUNCTION {format.incoll.inproc.crossref}
+{ editor empty$
+editor field.or.null author field.or.null =
+or
+{ key empty$
+{ booktitle empty$
+{ "need editor, key, or booktitle for " cite$ * " to crossref " *
+crossref * warning$
+""
+}
+{ "\abphrase{7}" booktitle quote * }
+if$
+}
+{ "\abphrase{7}" key * }
+if$
+}
+{ "\abphrase{7}" format.crossref.editor * }
+if$
+" \cite{" * crossref * "}" *
+}
+FUNCTION {article}
+{ output.bibitem
+format.authors "author" output.check
+new.block
+crossref missing$
+{ journal emphasize "journal" output.check
+format.vol.num.pages output
+format.date "year" output.check
+}
+{ format.article.crossref output.nonnull
+new.clause
+format.pages output
+}
+if$
+new.block
+note output
+fin.entry
+}
+FUNCTION {book}
+{ output.bibitem
+author empty$
+{ format.editors "author and editor" output.check }
+{ format.authors output.nonnull
+crossref missing$
+{ "author and editor" editor either.or.check }
+'skip$
+if$
+}
+if$
+new.block
+format.btitle "title" output.check
+crossref missing$
+{ new.clause
+format.bvolume output
+new.block
+format.number.series output
+new.sentence
+publisher "publisher" output.check
+address new.clause.checka
+address output
+}
+{ new.block
+format.book.crossref output.nonnull
+}
+if$
+edition new.clause.checka
+format.edition output
+format.date "year" output.check
+new.block
+note output
+fin.entry
+}
+FUNCTION {booklet}
+{ output.bibitem
+format.authors output
+new.block
+format.title "title" output.check
+howpublished address new.block.checkb
+howpublished output
+address new.clause.checka
+address output
+format.date output
+new.block
+note output
+fin.entry
+}
+FUNCTION {inbook}
+{ output.bibitem
+author empty$
+{ format.editors "author and editor" output.check }
+{ format.authors output.nonnull
+crossref missing$
+{ "author and editor" editor either.or.check }
+'skip$
+if$
+}
+if$
+new.block
+format.btitle "title" output.check
+new.clause
+crossref missing$
+{ format.bvolume output
+new.clause
+format.chapter.pages "chapter and pages" output.check
+new.block
+format.number.series output
+new.sentence
+publisher "publisher" output.check
+address new.clause.checka
+address output
+}
+{ format.chapter.pages "chapter and pages" output.check
+new.block
+format.book.crossref output.nonnull
+}
+if$
+edition new.clause.checka
+format.edition output
+format.date "year" output.check
+new.block
+note output
+fin.entry
+}
+FUNCTION {incollection}
+{ output.bibitem
+format.authors "author" output.check
+new.block
+chapter empty$ pages empty$ and
+{
+format.title "title" output.check
+new.block
+}
+'skip$
+if$
+crossref missing$
+{ format.in.ed.booktitle "booktitle" output.check
+new.clause
+format.bvolume output
+new.clause
+format.number.series output
+new.clause
+format.chapter.pages output
+new.sentence
+publisher "publisher" output.check
+address new.clause.checka
+address output
+edition new.clause.checka
+format.edition output
+format.date "year" output.check
+}
+{ format.incoll.inproc.crossref output.nonnull
+new.clause
+format.chapter.pages output
+}
+if$
+new.block
+note output
+fin.entry
+}
+FUNCTION {inproceedings}
+{ output.bibitem
+format.authors "author" output.check
+new.block
+pages empty$
+{
+format.title "title" output.check
+new.block
+}
+'skip$
+if$
+crossref missing$
+{ format.in.ed.booktitle "booktitle" output.check
+volume new.clause.checka
+format.bvolume output
+number series new.clause.checkb
+format.number.series output
+pages new.clause.checka
+format.pages output
+address empty$
+{ organization publisher new.sentence.checkb
+organization output
+publisher new.clause.checka
+publisher output
+format.date "year" output.check
+}
+{ new.clause
+address output.nonnull
+format.date "year" output.check
+new.sentence
+organization output
+new.clause
+publisher output
+}
+if$
+}
+{ format.incoll.inproc.crossref output.nonnull
+new.clause
+format.pages output
+}
+if$
+new.block
+note output
+fin.entry
+}
+FUNCTION {conference} { inproceedings }
+FUNCTION {manual}
+{ output.bibitem
+author empty$
+{ organization empty$
+'skip$
+{ organization output.nonnull
+new.clause
+address output
+}
+if$
+}
+{ format.authors output.nonnull }
+if$
+new.block
+format.btitle "title" output.check
+author empty$
+{ organization empty$
+{ address new.block.checka
+address output
+}
+'skip$
+if$
+}
+{ organization address new.block.checkb
+organization output
+address new.clause.checka
+address output
+}
+if$
+edition new.clause.checka
+format.edition output
+format.date output
+new.block
+note output
+fin.entry
+}
+FUNCTION {mastersthesis}
+{ output.bibitem
+format.authors "author" output.check
+new.block
+format.title "title" output.check
+new.block
+"\abphrase{17}" format.thesis.type output.nonnull
+new.clause
+school "school" output.check
+address new.clause.checka
+address output
+format.date "year" output.check
+new.block
+note output
+fin.entry
+}
+FUNCTION {misc}
+{ output.bibitem
+format.authors output
+title howpublished new.block.checkb
+format.title output
+howpublished new.block.checka
+howpublished output
+format.date output
+new.block
+note output
+fin.entry
+empty.misc.check
+}
+FUNCTION {phdthesis}
+{ output.bibitem
+format.authors "author" output.check
+new.block
+format.btitle "title" output.check
+new.block
+"\abphrase{18}" format.thesis.type output.nonnull
+new.clause
+school "school" output.check
+address new.clause.checka
+address output
+format.date "year" output.check
+new.block
+note output
+fin.entry
+}
+FUNCTION {proceedings}
+{ output.bibitem
+editor empty$
+{ organization output }
+{ format.editors output.nonnull }
+if$
+new.block
+format.btitle "title" output.check
+volume new.clause.checka
+format.bvolume output
+number series new.clause.checkb
+format.number.series output
+address empty$
+{ editor empty$
+{ publisher new.sentence.checka }
+{ organization publisher new.sentence.checkb
+organization output
+publisher new.clause.checka
+}
+if$
+publisher output
+format.date "year" output.check
+}
+{ new.clause
+address output.nonnull
+format.date "year" output.check
+new.sentence
+editor empty$
+'skip$
+{ organization output
+new.clause
+}
+if$
+publisher output
+}
+if$
+new.block
+note output
+fin.entry
+}
+FUNCTION {techreport}
+{ output.bibitem
+format.authors "author" output.check
+new.block
+number empty$
+{
+format.title "title" output.check
+new.block
+}
+'skip$
+if$
+format.tr.number output.nonnull
+new.clause
+institution "institution" output.check
+address new.clause.checka
+address output
+format.date "year" output.check
+new.block
+note output
+fin.entry
+}
+FUNCTION {unpublished}
+{ output.bibitem
+format.authors "author" output.check
+new.block
+format.title "title" output.check
+new.block
+note "note" output.check
+format.date output
+fin.entry
+}
+FUNCTION {default.type} { misc }
+MACRO {jan} {"\abmonth{1}"}
+MACRO {feb} {"\abmonth{2}"}
+MACRO {mar} {"\abmonth{3}"}
+MACRO {apr} {"\abmonth{4}"}
+MACRO {may} {"\abmonth{5}"}
+MACRO {jun} {"\abmonth{6}"}
+MACRO {jul} {"\abmonth{7}"}
+MACRO {aug} {"\abmonth{8}"}
+MACRO {sep} {"\abmonth{9}"}
+MACRO {oct} {"\abmonth{10}"}
+MACRO {nov} {"\abmonth{11}"}
+MACRO {dec} {"\abmonth{12}"}
+MACRO {first} {"\abedition{1}"}
+MACRO {second} {"\abedition{2}"}
+MACRO {third} {"\abedition{3}"}
+MACRO {fourth} {"\abedition{4}"}
+MACRO {fifth} {"\abedition{5}"}
+MACRO {sixth} {"\abedition{6}"}
+MACRO {seventh} {"\abedition{7}"}
+MACRO {eighth} {"\abedition{8}"}
+MACRO {ninth} {"\abedition{9}"}
+MACRO {tenth} {"\abedition{10}"}
+MACRO {section} {"\abchapter{0}"}
+MACRO {paragraph} {"\abchapter{1}"}
+MACRO {appendix} {"\abchapter{2}"}
+MACRO {part} {"\abchapter{3}"}
+READ
+FUNCTION {sortify}
+{ purify$
+"l" change.case$
+}
+INTEGERS { len }
+FUNCTION {chop.word}
+{ 's :=
+'len :=
+s #1 len substring$ =
+{ s len #1 + global.max$ substring$ }
+'s
+if$
+}
+FUNCTION {sort.format.names}
+{ 's :=
+#1 'nameptr :=
+""
+s num.names$ 'numnames :=
+numnames 'namesleft :=
+{ namesleft #0 > }
+{ nameptr #1 >
+{ " " * }
+'skip$
+if$
+s nameptr "{vv{ } }{ll{ }}{ f{ }}{ jj{ }}" format.name$ 't :=
+nameptr numnames = t "others" = and
+{ "et al" * }
+{ t sortify * }
+if$
+nameptr #1 + 'nameptr :=
+namesleft #1 - 'namesleft :=
+}
+while$
+}
+FUNCTION {sort.format.title}
+{ 't :=
+"A " #2
+"An " #3
+"The " #4 t chop.word
+chop.word
+chop.word
+sortify
+#1 global.max$ substring$
+}
+FUNCTION {author.sort}
+{ author empty$
+{ key empty$
+{ "to sort, need author or key in " cite$ * warning$
+""
+}
+{ key sortify }
+if$
+}
+{ author sort.format.names }
+if$
+}
+FUNCTION {author.editor.sort}
+{ author empty$
+{ editor empty$
+{ key empty$
+{ "to sort, need author, editor, or key in " cite$ * warning$
+""
+}
+{ key sortify }
+if$
+}
+{ editor sort.format.names }
+if$
+}
+{ author sort.format.names }
+if$
+}
+FUNCTION {author.organization.sort}
+{ author empty$
+{ organization empty$
+{ key empty$
+{ "to sort, need author, organization, or key in " cite$ * warning$
+""
+}
+{ key sortify }
+if$
+}
+{ "The " #4 organization chop.word sortify }
+if$
+}
+{ author sort.format.names }
+if$
+}
+FUNCTION {editor.organization.sort}
+{ editor empty$
+{ organization empty$
+{ key empty$
+{ "to sort, need editor, organization, or key in " cite$ * warning$
+""
+}
+{ key sortify }
+if$
+}
+{ "The " #4 organization chop.word sortify }
+if$
+}
+{ editor sort.format.names }
+if$
+}
+FUNCTION {presort}
+{ type$ "book" =
+type$ "inbook" =
+or
+'author.editor.sort
+{ type$ "proceedings" =
+'editor.organization.sort
+{ type$ "manual" =
+'author.organization.sort
+'author.sort
+if$
+}
+if$
+}
+if$
+" "
+*
+year field.or.null sortify
+*
+" "
+*
+title field.or.null
+sort.format.title
+*
+#1 entry.max$ substring$
+'sort.key$ :=
+}
+ITERATE {presort}
+SORT
+STRINGS { longest.label }
+INTEGERS { number.label longest.label.width }
+FUNCTION {initialize.longest.label}
+{ "" 'longest.label :=
+#1 'number.label :=
+#0 'longest.label.width :=
+}
+FUNCTION {longest.label.pass}
+{ number.label int.to.str$ 'label :=
+number.label #1 + 'number.label :=
+label width$ longest.label.width >
+{ label 'longest.label :=
+label width$ 'longest.label.width :=
+}
+'skip$
+if$
+}
+EXECUTE {initialize.longest.label}
+ITERATE {longest.label.pass}
+FUNCTION {begin.bib}
+{
+"\newif\ifabfull\abfullfalse" write$ newline$
+preamble$ empty$
+'skip$
+{ preamble$ write$ newline$ }
+if$
+"\begin{thebibliography}{" longest.label * "}" * write$ newline$
+}
+EXECUTE {begin.bib}
+EXECUTE {init.state.consts}
+ITERATE {call.type$}
+FUNCTION {end.bib}
+{ newline$
+"\end{thebibliography}" write$ newline$
+}
+EXECUTE {end.bib}
diff --git a/biblio/bibtex/contrib/abstyles/aplain.bst b/biblio/bibtex/contrib/abstyles/aplain.bst
new file mode 100644
index 0000000000..7f98af6b12
--- /dev/null
+++ b/biblio/bibtex/contrib/abstyles/aplain.bst
@@ -0,0 +1,1061 @@
+% BibTeX bibliography style `APLAIN'
+ENTRY
+{ address
+author
+booktitle
+chapter
+edition
+editor
+howpublished
+institution
+journal
+key
+month
+note
+number
+organization
+pages
+publisher
+school
+series
+title
+type
+volume
+year
+}
+{}
+{ label }
+INTEGERS { output.state before.all mid.sentence after.sentence after.block
+continue.sentence }
+FUNCTION {init.state.consts}
+{ #0 'before.all :=
+#1 'mid.sentence :=
+#2 'after.sentence :=
+#3 'after.block :=
+#4 'continue.sentence :=
+}
+STRINGS { s t }
+FUNCTION {output.nonnull}
+{ 's :=
+output.state continue.sentence =
+{ " " * write$ }
+{ output.state mid.sentence =
+{ ", " * write$ }
+{ output.state after.block =
+{ add.period$ write$
+newline$
+"\newblock " write$
+}
+{ output.state before.all =
+'write$
+{ add.period$ " " * write$ }
+if$
+}
+if$
+}
+if$
+continue.sentence 'output.state :=
+}
+if$
+s
+}
+FUNCTION {output}
+{ duplicate$ empty$
+'pop$
+'output.nonnull
+if$
+}
+FUNCTION {output.check}
+{ 't :=
+duplicate$ empty$
+{ pop$ "empty " t * " in " * cite$ * warning$ }
+'output.nonnull
+if$
+}
+FUNCTION {output.bibitem}
+{ newline$
+"\bibitem{" write$
+cite$ write$
+"}" write$
+newline$
+""
+before.all 'output.state :=
+}
+FUNCTION {fin.entry}
+{ add.period$
+write$
+newline$
+}
+FUNCTION {new.block}
+{ output.state before.all =
+'skip$
+{ after.block 'output.state := }
+if$
+}
+FUNCTION {new.sentence}
+{ output.state after.block =
+'skip$
+{ output.state before.all =
+'skip$
+{ after.sentence 'output.state := }
+if$
+}
+if$
+}
+FUNCTION {new.clause}
+{ output.state after.sentence =
+'skip$
+{ output.state after.block =
+'skip$
+{ output.state before.all =
+'skip$
+{ mid.sentence 'output.state := }
+if$
+}
+if$
+}
+if$
+}
+FUNCTION {not}
+{ { #0 }
+{ #1 }
+if$
+}
+FUNCTION {and}
+{ 'skip$
+{ pop$ #0 }
+if$
+}
+FUNCTION {or}
+{ { pop$ #1 }
+'skip$
+if$
+}
+FUNCTION {new.block.checka}
+{ empty$
+'skip$
+'new.block
+if$
+}
+FUNCTION {new.block.checkb}
+{ empty$
+swap$ empty$
+and
+'skip$
+'new.block
+if$
+}
+FUNCTION {new.sentence.checka}
+{ empty$
+'skip$
+'new.sentence
+if$
+}
+FUNCTION {new.sentence.checkb}
+{ empty$
+swap$ empty$
+and
+'skip$
+'new.sentence
+if$
+}
+FUNCTION {new.clause.checka}
+{ empty$
+'skip$
+'new.clause
+if$
+}
+FUNCTION {new.clause.checkb}
+{ empty$
+swap$ empty$
+and
+'skip$
+'new.clause
+if$
+}
+FUNCTION {field.or.null}
+{ duplicate$ empty$
+{ pop$ "" }
+'skip$
+if$
+}
+FUNCTION {emphasize}
+{ duplicate$ empty$
+{ pop$ "" }
+{ "\abtype{2}{" swap$ * "}" * }
+if$
+}
+FUNCTION {capitalize}
+{ duplicate$ empty$
+{ pop$ "" }
+{ "\abtype{0}{" swap$ * "}" * }
+if$
+}
+FUNCTION {boldface}
+{ duplicate$ empty$
+{ pop$ "" }
+{ "\abtype{3}{" swap$ * "}" * }
+if$
+}
+FUNCTION {quote}
+{ duplicate$ empty$
+{ pop$ "" }
+{ "\abtype{1}{" swap$ * "}" * }
+if$
+}
+FUNCTION {parentheses}
+{ duplicate$ empty$
+{ pop$ "" }
+{ "\abtype{5}{" swap$ * "}" * }
+if$
+}
+INTEGERS { nameptr namesleft numnames }
+FUNCTION {format.names}
+{ 's :=
+#1 'nameptr :=
+s num.names$ 'numnames :=
+numnames 'namesleft :=
+{ namesleft #0 > }
+{ s nameptr "{ff~}{vv~}{ll}{, jj}" format.name$ 't :=
+nameptr #1 >
+{ namesleft #1 >
+{ ", " * t * }
+{ numnames #2 >
+{ "\abphrase{1}" * }
+'skip$
+if$
+t "others" =
+{ "\abphrase{2}" * }
+{ "\abphrase{0}" * t * }
+if$
+}
+if$
+}
+'t
+if$
+nameptr #1 + 'nameptr :=
+namesleft #1 - 'namesleft :=
+}
+while$
+}
+FUNCTION {format.authors}
+{ author empty$
+{ "" }
+{ author format.names capitalize }
+if$
+}
+FUNCTION {format.editors}
+{ editor empty$
+{ "" }
+{ editor format.names capitalize
+editor num.names$ #1 >
+{ "\abphrase{3}" * }
+{ "\abphrase{4}" * }
+if$
+}
+if$
+}
+FUNCTION {format.title}
+{ title empty$
+{ "" }
+{ title "t" change.case$ }
+if$
+}
+FUNCTION {n.dashify}
+{ 't :=
+""
+{ t empty$ not }
+{ t #1 #1 substring$ "-" =
+{ t #1 #2 substring$ "--" = not
+{ "--" *
+t #2 global.max$ substring$ 't :=
+}
+{ { t #1 #1 substring$ "-" = }
+{ "-" *
+t #2 global.max$ substring$ 't :=
+}
+while$
+}
+if$
+}
+{ t #1 #1 substring$ *
+t #2 global.max$ substring$ 't :=
+}
+if$
+}
+while$
+}
+FUNCTION {format.date}
+{ year empty$
+{ month empty$
+{ "" }
+{ "there's a month but no year in " cite$ * warning$
+month parentheses
+}
+if$
+}
+{ month empty$
+{ year parentheses }
+{ month " " * year * parentheses }
+if$
+}
+if$
+}
+FUNCTION {format.btitle}
+{ title quote
+}
+FUNCTION {tie.or.space.connect}
+{ duplicate$ text.length$ #3 <
+{ "~" }
+{ " " }
+if$
+swap$ * *
+}
+FUNCTION {either.or.check}
+{ empty$
+'pop$
+{ "can't use both " swap$ * " fields in " * cite$ * warning$ }
+if$
+}
+FUNCTION {format.bvolume}
+{ volume empty$
+{ "" }
+{ "\abphrase{8}" volume tie.or.space.connect
+series empty$
+'skip$
+{ "\abphrase{5}" * series quote * }
+if$
+"volume and number" number either.or.check
+}
+if$
+}
+FUNCTION {format.number.series}
+{ volume empty$
+{ number empty$
+{ series field.or.null }
+{ output.state mid.sentence = output.state continue.sentence = or
+{ "\abphrase{10}" }
+{ "\abphrase{11}" }
+if$
+number tie.or.space.connect
+series empty$
+{ "there's a number but no series in " cite$ * warning$ }
+{ "\abphrase{6}" * series * }
+if$
+}
+if$
+}
+{ "" }
+if$
+}
+FUNCTION {format.edition}
+{ edition empty$
+{ "" }
+{ output.state mid.sentence = output.state continue.sentence = or
+{ edition "l" change.case$ "\abphrase{12}" * }
+{ edition "t" change.case$ "\abphrase{12}" * }
+if$
+}
+if$
+}
+INTEGERS { multiresult }
+FUNCTION {multi.page.check}
+{ 't :=
+#0 'multiresult :=
+{ multiresult not
+t empty$ not
+and
+}
+{ t #1 #1 substring$
+duplicate$ "-" =
+swap$ duplicate$ "," =
+swap$ "+" =
+or or
+{ #1 'multiresult := }
+{ t #2 global.max$ substring$ 't := }
+if$
+}
+while$
+multiresult
+}
+FUNCTION {format.pages}
+{ pages empty$
+{ "" }
+{ pages multi.page.check
+{ "\abphrase{13}" pages n.dashify tie.or.space.connect }
+{ "\abphrase{14}" pages tie.or.space.connect }
+if$
+}
+if$
+}
+FUNCTION {format.vol.num.pages}
+{ volume field.or.null boldface
+number empty$
+'skip$
+{ "\abtype{4}{" number * "}" * *
+volume empty$
+{ "there's a number but no volume in " cite$ * warning$ }
+'skip$
+if$
+}
+if$
+pages empty$
+'skip$
+{ duplicate$ empty$
+{ pop$ format.pages }
+{ ", " * pages n.dashify * }
+if$
+}
+if$
+}
+FUNCTION {format.chapter.pages}
+{ chapter empty$
+'format.pages
+{ type empty$
+{ "\abphrase{15}" }
+{ type "l" change.case$ }
+if$
+chapter tie.or.space.connect
+pages empty$
+'skip$
+{ ", " * format.pages * }
+if$
+}
+if$
+}
+FUNCTION {format.in.ed.booktitle}
+{ booktitle empty$
+{ "" }
+{ editor empty$
+{ "\abphrase{7}" booktitle quote * }
+{ "\abphrase{7}" format.editors * ", " * booktitle quote * }
+if$
+}
+if$
+}
+FUNCTION {empty.misc.check}
+{ author empty$ title empty$ howpublished empty$
+month empty$ year empty$ note empty$
+and and and and and
+key empty$ not and
+{ "all relevant fields are empty in " cite$ * warning$ }
+'skip$
+if$
+}
+FUNCTION {format.thesis.type}
+{ type empty$
+'skip$
+{ pop$
+type "t" change.case$
+}
+if$
+}
+FUNCTION {format.tr.number}
+{ type empty$
+{ "\abphrase{16}" }
+'type
+if$
+number empty$
+{ "t" change.case$ }
+{ number tie.or.space.connect }
+if$
+}
+FUNCTION {format.article.crossref}
+{ key empty$
+{ journal empty$
+{ "need key or journal for " cite$ * " to crossref " * crossref *
+warning$
+""
+}
+{ "\abphrase{7}" journal emphasize * }
+if$
+}
+{ "\abphrase{7}" key * }
+if$
+" \cite{" * crossref * "}" *
+}
+FUNCTION {format.crossref.editor}
+{ editor #1 "{vv~}{ll}" format.name$
+editor num.names$ duplicate$
+#2 >
+{ pop$ "\abphrase{2}" * }
+{ #2 <
+'skip$
+{ editor #2 "{ff }{vv }{ll}{ jj}" format.name$ "others" =
+{ "\abphrase{2}" * }
+{ "\abphrase{0}" * editor #2 "{vv~}{ll}" format.name$ * }
+if$
+}
+if$
+}
+if$
+}
+FUNCTION {format.book.crossref}
+{ volume empty$
+{ "empty volume in " cite$ * "'s crossref of " * crossref * warning$
+"\abphrase{7}"
+}
+{ "\abphrase{9}" volume tie.or.space.connect
+"\abphrase{5}" *
+}
+if$
+editor empty$
+editor field.or.null author field.or.null =
+or
+{ key empty$
+{ series empty$
+{ "need editor, key, or series for " cite$ * " to crossref " *
+crossref * warning$
+"" *
+}
+{ series quote * }
+if$
+}
+{ key * }
+if$
+}
+{ format.crossref.editor * }
+if$
+" \cite{" * crossref * "}" *
+}
+FUNCTION {format.incoll.inproc.crossref}
+{ editor empty$
+editor field.or.null author field.or.null =
+or
+{ key empty$
+{ booktitle empty$
+{ "need editor, key, or booktitle for " cite$ * " to crossref " *
+crossref * warning$
+""
+}
+{ "\abphrase{7}" booktitle quote * }
+if$
+}
+{ "\abphrase{7}" key * }
+if$
+}
+{ "\abphrase{7}" format.crossref.editor * }
+if$
+" \cite{" * crossref * "}" *
+}
+FUNCTION {article}
+{ output.bibitem
+format.authors "author" output.check
+new.block
+format.title "title" output.check
+new.block
+crossref missing$
+{ journal emphasize "journal" output.check
+format.vol.num.pages output
+format.date "year" output.check
+}
+{ format.article.crossref output.nonnull
+new.clause
+format.pages output
+}
+if$
+new.block
+note output
+fin.entry
+}
+FUNCTION {book}
+{ output.bibitem
+author empty$
+{ format.editors "author and editor" output.check }
+{ format.authors output.nonnull
+crossref missing$
+{ "author and editor" editor either.or.check }
+'skip$
+if$
+}
+if$
+new.block
+format.btitle "title" output.check
+crossref missing$
+{ new.clause
+format.bvolume output
+new.block
+format.number.series output
+new.sentence
+publisher "publisher" output.check
+address new.clause.checka
+address output
+}
+{ new.block
+format.book.crossref output.nonnull
+}
+if$
+edition new.clause.checka
+format.edition output
+format.date "year" output.check
+new.block
+note output
+fin.entry
+}
+FUNCTION {booklet}
+{ output.bibitem
+format.authors output
+new.block
+format.title "title" output.check
+howpublished address new.block.checkb
+howpublished output
+address new.clause.checka
+address output
+format.date output
+new.block
+note output
+fin.entry
+}
+FUNCTION {inbook}
+{ output.bibitem
+author empty$
+{ format.editors "author and editor" output.check }
+{ format.authors output.nonnull
+crossref missing$
+{ "author and editor" editor either.or.check }
+'skip$
+if$
+}
+if$
+new.block
+format.btitle "title" output.check
+new.clause
+crossref missing$
+{ format.bvolume output
+new.clause
+format.chapter.pages "chapter and pages" output.check
+new.block
+format.number.series output
+new.sentence
+publisher "publisher" output.check
+address new.clause.checka
+address output
+}
+{ format.chapter.pages "chapter and pages" output.check
+new.block
+format.book.crossref output.nonnull
+}
+if$
+edition new.clause.checka
+format.edition output
+format.date "year" output.check
+new.block
+note output
+fin.entry
+}
+FUNCTION {incollection}
+{ output.bibitem
+format.authors "author" output.check
+new.block
+format.title "title" output.check
+new.block
+crossref missing$
+{ format.in.ed.booktitle "booktitle" output.check
+new.clause
+format.bvolume output
+new.clause
+format.number.series output
+new.clause
+format.chapter.pages output
+new.sentence
+publisher "publisher" output.check
+address new.clause.checka
+address output
+edition new.clause.checka
+format.edition output
+format.date "year" output.check
+}
+{ format.incoll.inproc.crossref output.nonnull
+new.clause
+format.chapter.pages output
+}
+if$
+new.block
+note output
+fin.entry
+}
+FUNCTION {inproceedings}
+{ output.bibitem
+format.authors "author" output.check
+new.block
+format.title "title" output.check
+new.block
+crossref missing$
+{ format.in.ed.booktitle "booktitle" output.check
+volume new.clause.checka
+format.bvolume output
+number series new.clause.checkb
+format.number.series output
+pages new.clause.checka
+format.pages output
+address empty$
+{ organization publisher new.sentence.checkb
+organization output
+publisher new.clause.checka
+publisher output
+format.date "year" output.check
+}
+{ new.clause
+address output.nonnull
+format.date "year" output.check
+new.sentence
+organization output
+new.clause
+publisher output
+}
+if$
+}
+{ format.incoll.inproc.crossref output.nonnull
+new.clause
+format.pages output
+}
+if$
+new.block
+note output
+fin.entry
+}
+FUNCTION {conference} { inproceedings }
+FUNCTION {manual}
+{ output.bibitem
+author empty$
+{ organization empty$
+'skip$
+{ organization output.nonnull
+new.clause
+address output
+}
+if$
+}
+{ format.authors output.nonnull }
+if$
+new.block
+format.btitle "title" output.check
+author empty$
+{ organization empty$
+{ address new.block.checka
+address output
+}
+'skip$
+if$
+}
+{ organization address new.block.checkb
+organization output
+address new.clause.checka
+address output
+}
+if$
+edition new.clause.checka
+format.edition output
+format.date output
+new.block
+note output
+fin.entry
+}
+FUNCTION {mastersthesis}
+{ output.bibitem
+format.authors "author" output.check
+new.block
+format.title "title" output.check
+new.block
+"\abphrase{17}" format.thesis.type output.nonnull
+new.clause
+school "school" output.check
+address new.clause.checka
+address output
+format.date "year" output.check
+new.block
+note output
+fin.entry
+}
+FUNCTION {misc}
+{ output.bibitem
+format.authors output
+title howpublished new.block.checkb
+format.title output
+howpublished new.block.checka
+howpublished output
+format.date output
+new.block
+note output
+fin.entry
+empty.misc.check
+}
+FUNCTION {phdthesis}
+{ output.bibitem
+format.authors "author" output.check
+new.block
+format.btitle "title" output.check
+new.block
+"\abphrase{18}" format.thesis.type output.nonnull
+new.clause
+school "school" output.check
+address new.clause.checka
+address output
+format.date "year" output.check
+new.block
+note output
+fin.entry
+}
+FUNCTION {proceedings}
+{ output.bibitem
+editor empty$
+{ organization output }
+{ format.editors output.nonnull }
+if$
+new.block
+format.btitle "title" output.check
+volume new.clause.checka
+format.bvolume output
+number series new.clause.checkb
+format.number.series output
+address empty$
+{ editor empty$
+{ publisher new.sentence.checka }
+{ organization publisher new.sentence.checkb
+organization output
+publisher new.clause.checka
+}
+if$
+publisher output
+format.date "year" output.check
+}
+{ new.clause
+address output.nonnull
+format.date "year" output.check
+new.sentence
+editor empty$
+'skip$
+{ organization output
+new.clause
+}
+if$
+publisher output
+}
+if$
+new.block
+note output
+fin.entry
+}
+FUNCTION {techreport}
+{ output.bibitem
+format.authors "author" output.check
+new.block
+format.title "title" output.check
+new.block
+format.tr.number output.nonnull
+new.clause
+institution "institution" output.check
+address new.clause.checka
+address output
+format.date "year" output.check
+new.block
+note output
+fin.entry
+}
+FUNCTION {unpublished}
+{ output.bibitem
+format.authors "author" output.check
+new.block
+format.title "title" output.check
+new.block
+note "note" output.check
+format.date output
+fin.entry
+}
+FUNCTION {default.type} { misc }
+MACRO {jan} {"\abmonth{1}"}
+MACRO {feb} {"\abmonth{2}"}
+MACRO {mar} {"\abmonth{3}"}
+MACRO {apr} {"\abmonth{4}"}
+MACRO {may} {"\abmonth{5}"}
+MACRO {jun} {"\abmonth{6}"}
+MACRO {jul} {"\abmonth{7}"}
+MACRO {aug} {"\abmonth{8}"}
+MACRO {sep} {"\abmonth{9}"}
+MACRO {oct} {"\abmonth{10}"}
+MACRO {nov} {"\abmonth{11}"}
+MACRO {dec} {"\abmonth{12}"}
+MACRO {first} {"\abedition{1}"}
+MACRO {second} {"\abedition{2}"}
+MACRO {third} {"\abedition{3}"}
+MACRO {fourth} {"\abedition{4}"}
+MACRO {fifth} {"\abedition{5}"}
+MACRO {sixth} {"\abedition{6}"}
+MACRO {seventh} {"\abedition{7}"}
+MACRO {eighth} {"\abedition{8}"}
+MACRO {ninth} {"\abedition{9}"}
+MACRO {tenth} {"\abedition{10}"}
+MACRO {section} {"\abchapter{0}"}
+MACRO {paragraph} {"\abchapter{1}"}
+MACRO {appendix} {"\abchapter{2}"}
+MACRO {part} {"\abchapter{3}"}
+READ
+FUNCTION {sortify}
+{ purify$
+"l" change.case$
+}
+INTEGERS { len }
+FUNCTION {chop.word}
+{ 's :=
+'len :=
+s #1 len substring$ =
+{ s len #1 + global.max$ substring$ }
+'s
+if$
+}
+FUNCTION {sort.format.names}
+{ 's :=
+#1 'nameptr :=
+""
+s num.names$ 'numnames :=
+numnames 'namesleft :=
+{ namesleft #0 > }
+{ nameptr #1 >
+{ " " * }
+'skip$
+if$
+s nameptr "{vv{ } }{ll{ }}{ ff{ }}{ jj{ }}" format.name$ 't :=
+nameptr numnames = t "others" = and
+{ "et al" * }
+{ t sortify * }
+if$
+nameptr #1 + 'nameptr :=
+namesleft #1 - 'namesleft :=
+}
+while$
+}
+FUNCTION {sort.format.title}
+{ 't :=
+"A " #2
+"An " #3
+"The " #4 t chop.word
+chop.word
+chop.word
+sortify
+#1 global.max$ substring$
+}
+FUNCTION {author.sort}
+{ author empty$
+{ key empty$
+{ "to sort, need author or key in " cite$ * warning$
+""
+}
+{ key sortify }
+if$
+}
+{ author sort.format.names }
+if$
+}
+FUNCTION {author.editor.sort}
+{ author empty$
+{ editor empty$
+{ key empty$
+{ "to sort, need author, editor, or key in " cite$ * warning$
+""
+}
+{ key sortify }
+if$
+}
+{ editor sort.format.names }
+if$
+}
+{ author sort.format.names }
+if$
+}
+FUNCTION {author.organization.sort}
+{ author empty$
+{ organization empty$
+{ key empty$
+{ "to sort, need author, organization, or key in " cite$ * warning$
+""
+}
+{ key sortify }
+if$
+}
+{ "The " #4 organization chop.word sortify }
+if$
+}
+{ author sort.format.names }
+if$
+}
+FUNCTION {editor.organization.sort}
+{ editor empty$
+{ organization empty$
+{ key empty$
+{ "to sort, need editor, organization, or key in " cite$ * warning$
+""
+}
+{ key sortify }
+if$
+}
+{ "The " #4 organization chop.word sortify }
+if$
+}
+{ editor sort.format.names }
+if$
+}
+FUNCTION {presort}
+{ type$ "book" =
+type$ "inbook" =
+or
+'author.editor.sort
+{ type$ "proceedings" =
+'editor.organization.sort
+{ type$ "manual" =
+'author.organization.sort
+'author.sort
+if$
+}
+if$
+}
+if$
+" "
+*
+year field.or.null sortify
+*
+" "
+*
+title field.or.null
+sort.format.title
+*
+#1 entry.max$ substring$
+'sort.key$ :=
+}
+ITERATE {presort}
+SORT
+STRINGS { longest.label }
+INTEGERS { number.label longest.label.width }
+FUNCTION {initialize.longest.label}
+{ "" 'longest.label :=
+#1 'number.label :=
+#0 'longest.label.width :=
+}
+FUNCTION {longest.label.pass}
+{ number.label int.to.str$ 'label :=
+number.label #1 + 'number.label :=
+label width$ longest.label.width >
+{ label 'longest.label :=
+label width$ 'longest.label.width :=
+}
+'skip$
+if$
+}
+EXECUTE {initialize.longest.label}
+ITERATE {longest.label.pass}
+FUNCTION {begin.bib}
+{
+"\newif\ifabfull\abfulltrue" write$ newline$
+preamble$ empty$
+'skip$
+{ preamble$ write$ newline$ }
+if$
+"\begin{thebibliography}{" longest.label * "}" * write$ newline$
+}
+EXECUTE {begin.bib}
+EXECUTE {init.state.consts}
+ITERATE {call.type$}
+FUNCTION {end.bib}
+{ newline$
+"\end{thebibliography}" write$ newline$
+}
+EXECUTE {end.bib}
diff --git a/biblio/bibtex/contrib/abstyles/apreambl.doc b/biblio/bibtex/contrib/abstyles/apreambl.doc
new file mode 100644
index 0000000000..8a8c434726
--- /dev/null
+++ b/biblio/bibtex/contrib/abstyles/apreambl.doc
@@ -0,0 +1,396 @@
+ %-*-Web-*-
+% This is APREAMBL.DOC, written by Hans-Hermann Bode (HHBODE@@DOSUNI1.BITNET).
+% Use MAKEPROG to generate the program, use TeX to produce the documentation.
+
+% This program is distributed WITHOUT ANY WARRANTY, express or implied.
+
+% Copyright (C) 1991, 1992 Hans-Hermann Bode
+
+% Permission is granted to make and distribute verbatim copies of this
+% document provided that the copyright notice and this permission notice
+% are preserved on all copies.
+
+% Permission is granted to copy and distribute modified versions of this
+% document under the conditions for verbatim copying, provided that the
+% entire resulting derived work is distributed under the terms of a
+% permission notice identical to this one.
+
+% Version history:
+%
+% Version Date Author Comment
+% 1.10a 18 Jul 1991 H2B First version for public release.
+% 1.10b 10 Aug 1991 H2B Improved handling of the language
+% switch, using MakeProg for
+% documentation.
+% 1.10c 04 Apr 1992 H2B Preventing multiple input, hiding
+% local identifiers, extending
+% documentation.
+% 1.10d 15 Apr 1992 H2B Incompatibility with german.sty 2.4a
+% fixed.
+% 1.10e 28 Jun 1992 H2B Problem with |\mdqoff| fixed.
+
+%-----------------------------------------------------------------------------
+
+\input docmac
+
+\def\title{APREAMBL}
+\def\curversion{1.10e}
+\def\curdate{June 1992}
+
+\def\topofcontents{\null\vfill
+ \centerline{\ttitlefont\title}
+ \medskip
+ \centerline{Preamble definitions for the \BibTeX\ `adaptable' family}
+ \medskip
+ \centerline{Version \curversion, \curdate}
+ \bigskip
+ \centerline{\sl Hans-Hermann Bode}
+ \centerline{\sl Arbeitsgruppe Systemforschung, Universit\"at Osnabr\"uck}
+ \vfill}
+
+\def\botofcontents{\vfill
+ \noindent
+ Copyright \copyright\ 1991,\thinspace1992 Hans-Hermann Bode
+ \bigskip\noindent
+ Permission is granted to make and distribute verbatim copies of this
+ document provided that the copyright notice and this permission notice
+ are preserved on all copies.
+ \smallskip\noindent
+ Permission is granted to copy and distribute modified versions of this
+ document under the conditions for verbatim copying, provided that the
+ entire resulting derived work is distributed under the terms of a
+ permission notice identical to this one.}
+
+%-----------------------------------------------------------------------------
+
+%\input amssym.def
+%\input btxmac
+%\input sammac
+\input a4c
+
+%\frenchspacing
+
+\def\BibTeX{{\rm B\kern-.05em{\sc i\kern-.025em b}\kern-.08em
+ T\kern-.1667em\lower.7ex\hbox{E}\kern-.125emX}}
+\def\LaTeX{{\rm L\kern-.36em\raise.3ex\hbox{\sc a}\kern-.15em
+ T\kern-.1667em\lower.7ex\hbox{E}\kern-.125emX}}
+
+\chap Introduction. %---------------------------------------------------------
+This file provides preamble definitions for use with the \BibTeX\
+`adaptable' family. It has to be read in at the beginning of a bibliography
+that was generated by one of the adaptable styles. Usually this will be done
+implicitly by means of an |@PREAMBLE| command in one of the bibliography
+databases included in the |\bibliography| enumeration (e.g.,
+\.{jourfull.bib} or \.{jourabbr.bib}), otherwise it must be |\input|
+explicitly right before the |\bibliography| macro is executed.
+
+\beginprog
+% This is APREAMBL.TEX, version 1.10e, written by Hans-Hermann Bode
+% (HHBODE@DOSUNI1.BITNET), for the BibTeX `adaptable' family, version 1.10.
+% See the file APREAMBL.DOC for a detailed documentation.
+
+% This program is distributed WITHOUT ANY WARRANTY, express or implied.
+
+% Copyright (C) 1991, 1992 Hans-Hermann Bode
+
+% Permission is granted to make and distribute verbatim copies of this
+% document provided that the copyright notice and this permission notice
+% are preserved on all copies.
+
+% Permission is granted to copy and distribute modified versions of this
+% document under the conditions for verbatim copying, provided that the
+% entire resulting derived work is distributed under the terms of a
+% permission notice identical to this one.
+\endprog
+
+\sect We use the---hopefully unique---identifier
+|\csname__APREAMBLE_TEX\endcsname| to decide whether this file was already
+read. If that identifier hasn't the meaning of |\relax|, we assume that this
+event arose and execute an |\endinput|; otherwise, we continue and store the
+|\catcode| of~|@| into it, which then will be set to~11 for use in local
+macro names. Hence, |\csname__APREAMBLE_TEX\endcsname| now is defined to
+prevent the file from multiply being input, and---on the other hand---we can
+restore the |\catcode| of~|@| in the end.
+
+\beginprog
+\expandafter\ifx\csname__APREAMBLE_TEX\endcsname\relax \else\endinput\fi
+\expandafter\chardef\csname__APREAMBLE_TEX\endcsname=\the\catcode`\@
+\catcode`\@=11
+\endprog
+
+\chap Setting style parameters. %---------------------------------------------
+The typesetting style of certain fields of the bibliography entries is
+determined by the |\abtype| command. It is called by the adaptable styles
+with two arguments: The first is a number that denotes the field in
+question, the second is the text to format. The meaning of the first
+parameter is declared in Tab.~1.
+$$\hbox{\sl Table~1: The first parameter of |\abtype|.\strut}$$
+$$\vbox{\halign{\strut\hfill#\hfill\quad & \vtop{\hsize=5cm\noindent#} \cr
+ \noalign{\hrule\hrule}
+ Value & Meaning \cr
+ \noalign{\hrule}
+ 0 & author and editor names \cr
+ 1 & titles of books and series \cr
+ 2 & journal titles \cr
+ 3 & journal volumes \cr
+ 4 & journal numbers \cr
+ 5 & dates \cr
+ \noalign{\hrule\hrule}
+ }}
+$$
+A comparison with the definition below shows that {\sc author and editor
+names} will be typeset in small caps, ``titles of books and series'' will be
+put in quotes, {\it journal titles\/} will come out in italics, {\bf journal
+volumes} will be boldface, and (journal numbers) and (dates) will be
+parenthesized. This may be changed to fit your needs.
+
+Currently, there is an English and a German version of the command. In the
+German version, the commands |\glqq| and |\grqq|---defined in
+\.{german.sty}---are used instead of |"`| and |"'|, in case we have
+|\mdqoff| (double-quotes inactive) but |\language=\german|.
+
+\beginprog
+\gdef\abtype@english{%
+\def\abtype##1##2{%
+\ifcase##1{\sc##2}\or``##2''\or{\em##2\/}\or{\bf##2}\or(##2)\or(##2)\else##2\fi}}
+
+\gdef\abtype@german{%
+\def\abtype##1##2{%
+\ifcase##1{\sc##2}\or\glqq##2\grqq\or{\em##2\/}\or{\bf##2}\or(##2)\or(##2)\else##2\fi}}
+\endprog
+
+\chap Definition of phrases. %------------------------------------------------
+Phrases are defined by the |\abphrase| command. The only parameter is a code
+for the phrase that is explained in Tab.~2.
+$$\hbox{\sl Table~2: The parameter of |\abphrase|.\strut}$$
+$$\vbox{\halign{\strut\hfill#\hfill\quad & \vtop{\hsize=10cm\noindent#} \cr
+ \noalign{\hrule\hrule}
+ Value & Meaning \cr
+ \noalign{\hrule}
+ 0 & conjunction between two or before the last name of a name list \cr
+ 1 & comes before the last conjunction of a name list \cr
+ 2 & replaces names of co-authors and co-editors (``et al.'') \cr
+ 3 & marks multiple editors \cr
+ 4 & marks a single editor \cr
+ 5 & ``of'' for a volume of a series or crossref \cr
+ 6 & ``in'' for a number in a series \cr
+ 7 & ``In'' for crossrefs to books, articles, etc. \cr
+ 8 & comes before a volume number, lower-case \cr
+ 9 & comes before a volume number, upper-case \cr
+ 10 & comes before a series number, lower-case \cr
+ 11 & comes before a series number, upper-case \cr
+ 12 & comes after an edition number \cr
+ 13 & comes before multiple page numbers \cr
+ 14 & comes before a single page number \cr
+ 15 & comes before a chapter number \cr
+ 16 & denotes a technical report \cr
+ 17 & denotes a master's thesis \cr
+ 18 & denotes a phd thesis \cr
+ \noalign{\hrule\hrule}
+ }}
+$$
+Besides, macros for month names, edition numbers, and ``chapter'' names are
+defined. (The |\abedition| command may be extended for higher edition numbers
+and called directly or---better---via |@STRING| declarations in the \.{bib}
+files).
+
+For all these commands there exists a ``full'' and an ``abbreviated''
+version. The |\ifabfull| switch is automatically defined by the adaptable
+styles in front of the preamble and tells which version to use.
+
+Furthermore, phrases can be supplied for various languages. For now, English
+and German versions are available, but other languages might be implemented
+similarly. If you carry out such an implementation, {\sl watch out for
+spaces\/} that may be significant.
+
+\sect Here is the English version:
+
+\beginprog
+\ifabfull
+
+\gdef\abetc@english{
+
+\def\abphrase##1{%
+\ifcase##1{ and }\or{,}\or{ et~al.}\or{, editors}\or{, editor}\or%
+{ of }\or{ in }\or{In }\or{volume}\or{Volume}\or{number}\or{Number}\or%
+{ edition}\or{pages}\or{page}\or{chapter}\or%
+{Technical Report}\or{Master's thesis}\or{PhD thesis}\fi}
+
+\def\abmonth##1{\ifcase##1\or January\or February\or March\or April\or May\or
+ June\or July\or August\or September\or October\or November\or December\fi}
+
+\def\abedition##1{\ifcase##1\or First\or Second\or Third\or Fourth\or Fifth\or
+ Sixth\or Seventh\or Eighth\or Ninth\or Tenth\else?\fi}
+
+\def\abchapter##1{\ifcase##1Section\or Paragraph\or Appendix\or Part\fi}
+
+}
+
+\else
+
+\gdef\abetc@english{
+
+\def\abphrase##1{%
+\ifcase##1{ and }\or{,}\or{ et~al.}\or{, editors}\or{, editor}\or%
+{ of }\or{ in }\or{In }\or{vol.}\or{Vol.}\or{no.}\or{No.}\or%
+{ ed.}\or{pp.}\or{p.}\or{ch.}\or%
+{Technical Report}\or{Master's thesis}\or{PhD thesis}\fi}
+
+\def\abmonth##1{\ifcase##1\or Jan.\or Feb.\or Mar.\or Apr.\or May\or June\or
+ July\or Aug.\or Sept.\or Oct.\or Nov.\or Dec.\fi}
+
+\def\abedition##1{\ifcase##1\or 1st\or 2nd\or 3rd\or 4th\or 5th\or
+ 6th\or 7th\or 8th\or 9th\or 10th\else?\fi}
+
+\def\abchapter##1{\ifcase##1Sec.\or Par.\or App.\or Part\fi}
+
+}
+
+\fi
+\endprog
+
+\sect And here is the German version, in which again we bear in mind the
+potential case that the current language is German but double-quotes are not
+active. Thus, we use |{\kern0pt}| instead of \.{"\vbar} (from
+\.{german.sty}) to get rid of ligatures and |\"| instead of |"| (ditto) for
+umlauts.
+
+\beginprog
+\ifabfull
+
+\gdef\abetc@german{
+
+\def\abphrase##1{%
+\ifcase##1{ und }\or{}\or{ und andere}\or{ (Herausgeber)}\or{ (Herausgeber)}\or%
+{ aus }\or{ in }\or{In }\or{Band}\or{Band}\or{Nummer}\or{Nummer}\or%
+{ Auf{\kern0pt}lage}\or{Seiten}\or{Seite}\or{Kapitel}\or%
+{Bericht}\or{Diplomarbeit}\or{Dissertation}\fi}
+
+\def\abmonth##1{\ifcase##1\or Januar\or Februar\or M\"arz\or April\or Mai\or
+ Juni\or Juli\or August\or September\or Oktober\or November\or Dezember\fi}
+
+\def\abedition##1{\ifcase##1\or Erste\or Zweite\or Dritte\or Vierte\or F\"unf\-te\or
+ Sechste\or Siebte\or Achte\or Neunte\or Zehnte\else?\fi}
+
+\def\abchapter##1{\ifcase##1Abschnitt\or Absatz\or Anhang\or Teil\fi}
+
+}
+
+\else
+
+\gdef\abetc@german{
+
+\def\abphrase##1{%
+\ifcase##1{ und }\or{}\or{ u.\thinspace a.}\or{ (Hrsg.)}\or{ (Hrsg.)}\or%
+{ aus }\or{ in }\or{In }\or{Bd.}\or{Bd.}\or{Nr.}\or{Nr.}\or%
+{ Aufl.}\or{S.}\or{S.}\or{Kap.}\or%
+{Bericht}\or{Diplomarbeit}\or{Dissertation}\fi}
+
+\def\abmonth##1{\ifcase##1\or Jan.\or Feb.\or M\"arz\or Apr.\or Mai\or
+ Juni\or Juli\or Aug.\or Sep.\or Okt.\or Nov.\or Dez.\fi}
+
+\def\abedition##1{\ifcase##1\or 1.\or 2.\or 3.\or 4.\or 5.\or
+ 6.\or 7.\or 8.\or 9.\or 10.\else?\fi}
+
+\def\abchapter##1{\ifcase##1Abschn.\or Abs.\or Anh.\or Teil\fi}
+
+}
+
+\fi
+\endprog
+
+\chap Establishing a language switch. %---------------------------------------
+Now we have reached the point where we have to decide which of the language
+versions defined above to use. We like to make this decision automatically,
+without bothering the user with the declaration of an extra language
+command. This, however, is a somewhat delicate task since, although \TeX~3
+defines a |\language| counter, it doesn't say which code belongs to a given
+actual language (and, in addition, what about former \TeX\ versions?).
+
+It will come out that at least two groups of users should agree with our way
+to handle this: those who always write English documents and those who use
+the \.{german.sty} macro package. If we detect that \.{german.sty} is loaded
+we follow the codes defined there, otherwise we create an English
+bibliography. (Due to this, \.{german.sty} clearly has to be loaded before
+\.{apreambl.tex}---if at all---; this should be no problem with \LaTeX\
+where |german| is a document-style option, but with plain \TeX, take care
+that |\input german.sty| comes before |\bibliography{...}| if necessary.)
+
+Incidentally, the checking of certain conditions and the definitions made in
+the following are stolen from \.{german.sty}.
+
+First, if |\language| has not yet been declared we allocate a counter:
+
+\beginprog
+\expandafter\ifx\csname language\endcsname\relax % \ifundefined{language}
+ \csname newcount\endcsname\language
+\fi
+\endprog
+
+\sect If the macro |\mdqon| is undefined or is equal to |\relax|, it is
+assumed that \.{german.sty} is not included. In this case we define language
+codes according to \.{german.sty} and select |\USenglish| as the default
+setting. The |\chardef| declarations for the other languages aren't really
+necessary for \.{apreambl}, but in this manner the user can rely on the
+fact that |\USenglish|, |\german|, |\austrian|, |\french|, and |\english| are
+defined and have appropriate meanings whether \.{german.sty} is loaded or
+not; so, he or she can make use of them in his or her \.{bib} files for
+special purposes.
+
+A slight surprise came about when \.{german.sty}, version 2.4a, was
+released: the control sequences above disappeared and are replaced by
+|\l@USenglish| etc. Furthermore, one can't rely on certain values for these
+anymore. To fix this problem quickly, we check for that new control
+sequences, if \.{german.sty} is loaded, and in case define the old ones
+appropriately (this may be changed in the future). Thus, \.{apreambl} should
+work with old and new versions of \.{german.sty}.
+
+\beginprog
+\expandafter\ifx\csname mdqon\endcsname\relax % \ifundefined{mdqon}
+ \chardef\USenglish=0
+ \chardef\german=1
+ \chardef\austrian=1
+ \chardef\french=2
+ \chardef\english=0
+ \language\USenglish
+\else
+ \expandafter\ifx\csname l@USenglish\endcsname\relax \else
+ \chardef\USenglish=\l@USenglish\fi
+ \expandafter\ifx\csname l@german\endcsname\relax \else
+ \chardef\german=\l@german\fi
+ \expandafter\ifx\csname l@austrian\endcsname\relax \else
+ \chardef\austrian=\l@austrian\fi
+ \expandafter\ifx\csname l@french\endcsname\relax \else
+ \chardef\french=\l@french\fi
+ \expandafter\ifx\csname l@english\endcsname\relax \else
+ \chardef\english=\l@english\fi
+\fi
+\endprog
+
+\sect Finally, depending on the language switch and the abbreviation mode, one
+of the macro sets is chosen. (At the moment, since only English and German
+macro versions are available, the German versions are used for |\german| and
+|\austrian|, and the English versions are used for all other languages.)
+
+\beginprog
+\ifnum\language=\german
+ \abtype@german \abetc@german
+\else\ifnum\language=\austrian
+ \abtype@german \abetc@german
+\else
+ \abtype@english \abetc@english
+\fi\fi
+\endprog
+
+\chap Postlude. %-------------------------------------------------------------
+At the very end, we restore the |\catcode| of~|@| and force the end of
+inputting this file.
+
+\beginprog
+\catcode`\@=\csname__APREAMBLE_TEX\endcsname
+\endinput
+\endprog
+
+%-----------------------------------------------------------------------------
+
+\contentspage
diff --git a/biblio/bibtex/contrib/abstyles/apreambl.tex b/biblio/bibtex/contrib/abstyles/apreambl.tex
new file mode 100644
index 0000000000..24bd7d3c96
--- /dev/null
+++ b/biblio/bibtex/contrib/abstyles/apreambl.tex
@@ -0,0 +1,139 @@
+% This is APREAMBL.TEX, version 1.10e, written by Hans-Hermann Bode
+% (HHBODE@DOSUNI1.BITNET), for the BibTeX `adaptable' family, version 1.10.
+% See the file APREAMBL.DOC for a detailed documentation.
+
+% This program is distributed WITHOUT ANY WARRANTY, express or implied.
+
+% Copyright (C) 1991, 1992 Hans-Hermann Bode
+
+% Permission is granted to make and distribute verbatim copies of this
+% document provided that the copyright notice and this permission notice
+% are preserved on all copies.
+
+% Permission is granted to copy and distribute modified versions of this
+% document under the conditions for verbatim copying, provided that the
+% entire resulting derived work is distributed under the terms of a
+% permission notice identical to this one.
+\expandafter\ifx\csname__APREAMBLE_TEX\endcsname\relax \else\endinput\fi
+\expandafter\chardef\csname__APREAMBLE_TEX\endcsname=\the\catcode`\@
+\catcode`\@=11
+\gdef\abtype@english{%
+\def\abtype##1##2{%
+\ifcase##1{\sc##2}\or``##2''\or{\em##2\/}\or{\bf##2}\or(##2)\or(##2)\else##2\fi}}
+
+\gdef\abtype@german{%
+\def\abtype##1##2{%
+\ifcase##1{\sc##2}\or\glqq##2\grqq\or{\em##2\/}\or{\bf##2}\or(##2)\or(##2)\else##2\fi}}
+\ifabfull
+
+\gdef\abetc@english{
+
+\def\abphrase##1{%
+\ifcase##1{ and }\or{,}\or{ et~al.}\or{, editors}\or{, editor}\or%
+{ of }\or{ in }\or{In }\or{volume}\or{Volume}\or{number}\or{Number}\or%
+{ edition}\or{pages}\or{page}\or{chapter}\or%
+{Technical Report}\or{Master's thesis}\or{PhD thesis}\fi}
+
+\def\abmonth##1{\ifcase##1\or January\or February\or March\or April\or May\or
+ June\or July\or August\or September\or October\or November\or December\fi}
+
+\def\abedition##1{\ifcase##1\or First\or Second\or Third\or Fourth\or Fifth\or
+ Sixth\or Seventh\or Eighth\or Ninth\or Tenth\else?\fi}
+
+\def\abchapter##1{\ifcase##1Section\or Paragraph\or Appendix\or Part\fi}
+
+}
+
+\else
+
+\gdef\abetc@english{
+
+\def\abphrase##1{%
+\ifcase##1{ and }\or{,}\or{ et~al.}\or{, editors}\or{, editor}\or%
+{ of }\or{ in }\or{In }\or{vol.}\or{Vol.}\or{no.}\or{No.}\or%
+{ ed.}\or{pp.}\or{p.}\or{ch.}\or%
+{Technical Report}\or{Master's thesis}\or{PhD thesis}\fi}
+
+\def\abmonth##1{\ifcase##1\or Jan.\or Feb.\or Mar.\or Apr.\or May\or June\or
+ July\or Aug.\or Sept.\or Oct.\or Nov.\or Dec.\fi}
+
+\def\abedition##1{\ifcase##1\or 1st\or 2nd\or 3rd\or 4th\or 5th\or
+ 6th\or 7th\or 8th\or 9th\or 10th\else?\fi}
+
+\def\abchapter##1{\ifcase##1Sec.\or Par.\or App.\or Part\fi}
+
+}
+
+\fi
+\ifabfull
+
+\gdef\abetc@german{
+
+\def\abphrase##1{%
+\ifcase##1{ und }\or{}\or{ und andere}\or{ (Herausgeber)}\or{ (Herausgeber)}\or%
+{ aus }\or{ in }\or{In }\or{Band}\or{Band}\or{Nummer}\or{Nummer}\or%
+{ Auf{\kern0pt}lage}\or{Seiten}\or{Seite}\or{Kapitel}\or%
+{Bericht}\or{Diplomarbeit}\or{Dissertation}\fi}
+
+\def\abmonth##1{\ifcase##1\or Januar\or Februar\or M\"arz\or April\or Mai\or
+ Juni\or Juli\or August\or September\or Oktober\or November\or Dezember\fi}
+
+\def\abedition##1{\ifcase##1\or Erste\or Zweite\or Dritte\or Vierte\or F\"unf\-te\or
+ Sechste\or Siebte\or Achte\or Neunte\or Zehnte\else?\fi}
+
+\def\abchapter##1{\ifcase##1Abschnitt\or Absatz\or Anhang\or Teil\fi}
+
+}
+
+\else
+
+\gdef\abetc@german{
+
+\def\abphrase##1{%
+\ifcase##1{ und }\or{}\or{ u.\thinspace a.}\or{ (Hrsg.)}\or{ (Hrsg.)}\or%
+{ aus }\or{ in }\or{In }\or{Bd.}\or{Bd.}\or{Nr.}\or{Nr.}\or%
+{ Aufl.}\or{S.}\or{S.}\or{Kap.}\or%
+{Bericht}\or{Diplomarbeit}\or{Dissertation}\fi}
+
+\def\abmonth##1{\ifcase##1\or Jan.\or Feb.\or M\"arz\or Apr.\or Mai\or
+ Juni\or Juli\or Aug.\or Sep.\or Okt.\or Nov.\or Dez.\fi}
+
+\def\abedition##1{\ifcase##1\or 1.\or 2.\or 3.\or 4.\or 5.\or
+ 6.\or 7.\or 8.\or 9.\or 10.\else?\fi}
+
+\def\abchapter##1{\ifcase##1Abschn.\or Abs.\or Anh.\or Teil\fi}
+
+}
+
+\fi
+\expandafter\ifx\csname language\endcsname\relax % \ifundefined{language}
+ \csname newcount\endcsname\language
+\fi
+\expandafter\ifx\csname mdqon\endcsname\relax % \ifundefined{mdqon}
+ \chardef\USenglish=0
+ \chardef\german=1
+ \chardef\austrian=1
+ \chardef\french=2
+ \chardef\english=0
+ \language\USenglish
+\else
+ \expandafter\ifx\csname l@USenglish\endcsname\relax \else
+ \chardef\USenglish=\l@USenglish\fi
+ \expandafter\ifx\csname l@german\endcsname\relax \else
+ \chardef\german=\l@german\fi
+ \expandafter\ifx\csname l@austrian\endcsname\relax \else
+ \chardef\austrian=\l@austrian\fi
+ \expandafter\ifx\csname l@french\endcsname\relax \else
+ \chardef\french=\l@french\fi
+ \expandafter\ifx\csname l@english\endcsname\relax \else
+ \chardef\english=\l@english\fi
+\fi
+\ifnum\language=\german
+ \abtype@german \abetc@german
+\else\ifnum\language=\austrian
+ \abtype@german \abetc@german
+\else
+ \abtype@english \abetc@english
+\fi\fi
+\catcode`\@=\csname__APREAMBLE_TEX\endcsname
+\endinput
diff --git a/biblio/bibtex/contrib/abstyles/aunsnot.bst b/biblio/bibtex/contrib/abstyles/aunsnot.bst
new file mode 100644
index 0000000000..ec64c143d1
--- /dev/null
+++ b/biblio/bibtex/contrib/abstyles/aunsnot.bst
@@ -0,0 +1,940 @@
+% BibTeX bibliography style `AUNSNOT'
+ENTRY
+{ address
+author
+booktitle
+chapter
+edition
+editor
+howpublished
+institution
+journal
+key
+month
+note
+number
+organization
+pages
+publisher
+school
+series
+title
+type
+volume
+year
+}
+{}
+{ label }
+INTEGERS { output.state before.all mid.sentence after.sentence after.block
+continue.sentence }
+FUNCTION {init.state.consts}
+{ #0 'before.all :=
+#1 'mid.sentence :=
+#2 'after.sentence :=
+#3 'after.block :=
+#4 'continue.sentence :=
+}
+STRINGS { s t }
+FUNCTION {output.nonnull}
+{ 's :=
+output.state continue.sentence =
+{ " " * write$ }
+{ output.state mid.sentence =
+{ ", " * write$ }
+{ output.state after.block =
+{ add.period$ write$
+newline$
+"\newblock " write$
+}
+{ output.state before.all =
+'write$
+{ add.period$ " " * write$ }
+if$
+}
+if$
+}
+if$
+continue.sentence 'output.state :=
+}
+if$
+s
+}
+FUNCTION {output}
+{ duplicate$ empty$
+'pop$
+'output.nonnull
+if$
+}
+FUNCTION {output.check}
+{ 't :=
+duplicate$ empty$
+{ pop$ "empty " t * " in " * cite$ * warning$ }
+'output.nonnull
+if$
+}
+FUNCTION {output.bibitem}
+{ newline$
+"\bibitem{" write$
+cite$ write$
+"}" write$
+newline$
+""
+before.all 'output.state :=
+}
+FUNCTION {fin.entry}
+{ add.period$
+write$
+newline$
+}
+FUNCTION {new.block}
+{ output.state before.all =
+'skip$
+{ after.block 'output.state := }
+if$
+}
+FUNCTION {new.sentence}
+{ output.state after.block =
+'skip$
+{ output.state before.all =
+'skip$
+{ after.sentence 'output.state := }
+if$
+}
+if$
+}
+FUNCTION {new.clause}
+{ output.state after.sentence =
+'skip$
+{ output.state after.block =
+'skip$
+{ output.state before.all =
+'skip$
+{ mid.sentence 'output.state := }
+if$
+}
+if$
+}
+if$
+}
+FUNCTION {not}
+{ { #0 }
+{ #1 }
+if$
+}
+FUNCTION {and}
+{ 'skip$
+{ pop$ #0 }
+if$
+}
+FUNCTION {or}
+{ { pop$ #1 }
+'skip$
+if$
+}
+FUNCTION {new.block.checka}
+{ empty$
+'skip$
+'new.block
+if$
+}
+FUNCTION {new.block.checkb}
+{ empty$
+swap$ empty$
+and
+'skip$
+'new.block
+if$
+}
+FUNCTION {new.sentence.checka}
+{ empty$
+'skip$
+'new.sentence
+if$
+}
+FUNCTION {new.sentence.checkb}
+{ empty$
+swap$ empty$
+and
+'skip$
+'new.sentence
+if$
+}
+FUNCTION {new.clause.checka}
+{ empty$
+'skip$
+'new.clause
+if$
+}
+FUNCTION {new.clause.checkb}
+{ empty$
+swap$ empty$
+and
+'skip$
+'new.clause
+if$
+}
+FUNCTION {field.or.null}
+{ duplicate$ empty$
+{ pop$ "" }
+'skip$
+if$
+}
+FUNCTION {emphasize}
+{ duplicate$ empty$
+{ pop$ "" }
+{ "\abtype{2}{" swap$ * "}" * }
+if$
+}
+FUNCTION {capitalize}
+{ duplicate$ empty$
+{ pop$ "" }
+{ "\abtype{0}{" swap$ * "}" * }
+if$
+}
+FUNCTION {boldface}
+{ duplicate$ empty$
+{ pop$ "" }
+{ "\abtype{3}{" swap$ * "}" * }
+if$
+}
+FUNCTION {quote}
+{ duplicate$ empty$
+{ pop$ "" }
+{ "\abtype{1}{" swap$ * "}" * }
+if$
+}
+FUNCTION {parentheses}
+{ duplicate$ empty$
+{ pop$ "" }
+{ "\abtype{5}{" swap$ * "}" * }
+if$
+}
+INTEGERS { nameptr namesleft numnames }
+FUNCTION {format.names}
+{ 's :=
+#1 'nameptr :=
+s num.names$ 'numnames :=
+numnames 'namesleft :=
+{ namesleft #0 > }
+{ s nameptr "{f.~}{vv~}{ll}{, jj}" format.name$ 't :=
+nameptr #1 >
+{ namesleft #1 >
+{ ", " * t * }
+{ numnames #2 >
+{ "\abphrase{1}" * }
+'skip$
+if$
+t "others" =
+{ "\abphrase{2}" * }
+{ "\abphrase{0}" * t * }
+if$
+}
+if$
+}
+'t
+if$
+nameptr #1 + 'nameptr :=
+namesleft #1 - 'namesleft :=
+}
+while$
+}
+FUNCTION {format.authors}
+{ author empty$
+{ "" }
+{ author format.names capitalize }
+if$
+}
+FUNCTION {format.editors}
+{ editor empty$
+{ "" }
+{ editor format.names capitalize
+editor num.names$ #1 >
+{ "\abphrase{3}" * }
+{ "\abphrase{4}" * }
+if$
+}
+if$
+}
+FUNCTION {format.title}
+{ title empty$
+{ "" }
+{ title "t" change.case$ }
+if$
+}
+FUNCTION {n.dashify}
+{ 't :=
+""
+{ t empty$ not }
+{ t #1 #1 substring$ "-" =
+{ t #1 #2 substring$ "--" = not
+{ "--" *
+t #2 global.max$ substring$ 't :=
+}
+{ { t #1 #1 substring$ "-" = }
+{ "-" *
+t #2 global.max$ substring$ 't :=
+}
+while$
+}
+if$
+}
+{ t #1 #1 substring$ *
+t #2 global.max$ substring$ 't :=
+}
+if$
+}
+while$
+}
+FUNCTION {format.date}
+{ year empty$
+{ month empty$
+{ "" }
+{ "there's a month but no year in " cite$ * warning$
+month parentheses
+}
+if$
+}
+{ month empty$
+{ year parentheses }
+{ month " " * year * parentheses }
+if$
+}
+if$
+}
+FUNCTION {format.btitle}
+{ title quote
+}
+FUNCTION {tie.or.space.connect}
+{ duplicate$ text.length$ #3 <
+{ "~" }
+{ " " }
+if$
+swap$ * *
+}
+FUNCTION {either.or.check}
+{ empty$
+'pop$
+{ "can't use both " swap$ * " fields in " * cite$ * warning$ }
+if$
+}
+FUNCTION {format.bvolume}
+{ volume empty$
+{ "" }
+{ "\abphrase{8}" volume tie.or.space.connect
+series empty$
+'skip$
+{ "\abphrase{5}" * series quote * }
+if$
+"volume and number" number either.or.check
+}
+if$
+}
+FUNCTION {format.number.series}
+{ volume empty$
+{ number empty$
+{ series field.or.null }
+{ output.state mid.sentence = output.state continue.sentence = or
+{ "\abphrase{10}" }
+{ "\abphrase{11}" }
+if$
+number tie.or.space.connect
+series empty$
+{ "there's a number but no series in " cite$ * warning$ }
+{ "\abphrase{6}" * series * }
+if$
+}
+if$
+}
+{ "" }
+if$
+}
+FUNCTION {format.edition}
+{ edition empty$
+{ "" }
+{ output.state mid.sentence = output.state continue.sentence = or
+{ edition "l" change.case$ "\abphrase{12}" * }
+{ edition "t" change.case$ "\abphrase{12}" * }
+if$
+}
+if$
+}
+INTEGERS { multiresult }
+FUNCTION {multi.page.check}
+{ 't :=
+#0 'multiresult :=
+{ multiresult not
+t empty$ not
+and
+}
+{ t #1 #1 substring$
+duplicate$ "-" =
+swap$ duplicate$ "," =
+swap$ "+" =
+or or
+{ #1 'multiresult := }
+{ t #2 global.max$ substring$ 't := }
+if$
+}
+while$
+multiresult
+}
+FUNCTION {format.pages}
+{ pages empty$
+{ "" }
+{ pages multi.page.check
+{ "\abphrase{13}" pages n.dashify tie.or.space.connect }
+{ "\abphrase{14}" pages tie.or.space.connect }
+if$
+}
+if$
+}
+FUNCTION {format.vol.num.pages}
+{ volume field.or.null boldface
+number empty$
+'skip$
+{ "\abtype{4}{" number * "}" * *
+volume empty$
+{ "there's a number but no volume in " cite$ * warning$ }
+'skip$
+if$
+}
+if$
+pages empty$
+'skip$
+{ duplicate$ empty$
+{ pop$ format.pages }
+{ ", " * pages n.dashify * }
+if$
+}
+if$
+}
+FUNCTION {format.chapter.pages}
+{ chapter empty$
+'format.pages
+{ type empty$
+{ "\abphrase{15}" }
+{ type "l" change.case$ }
+if$
+chapter tie.or.space.connect
+pages empty$
+'skip$
+{ ", " * format.pages * }
+if$
+}
+if$
+}
+FUNCTION {format.in.ed.booktitle}
+{ booktitle empty$
+{ "" }
+{ editor empty$
+{ "\abphrase{7}" booktitle quote * }
+{ "\abphrase{7}" format.editors * ", " * booktitle quote * }
+if$
+}
+if$
+}
+FUNCTION {empty.misc.check}
+{ author empty$ title empty$ howpublished empty$
+month empty$ year empty$ note empty$
+and and and and and
+{ "all relevant fields are empty in " cite$ * warning$ }
+'skip$
+if$
+}
+FUNCTION {format.thesis.type}
+{ type empty$
+'skip$
+{ pop$
+type "t" change.case$
+}
+if$
+}
+FUNCTION {format.tr.number}
+{ type empty$
+{ "\abphrase{16}" }
+'type
+if$
+number empty$
+{ "t" change.case$ }
+{ number tie.or.space.connect }
+if$
+}
+FUNCTION {format.article.crossref}
+{ key empty$
+{ journal empty$
+{ "need key or journal for " cite$ * " to crossref " * crossref *
+warning$
+""
+}
+{ "\abphrase{7}" journal emphasize * }
+if$
+}
+{ "\abphrase{7}" key * }
+if$
+" \cite{" * crossref * "}" *
+}
+FUNCTION {format.crossref.editor}
+{ editor #1 "{vv~}{ll}" format.name$
+editor num.names$ duplicate$
+#2 >
+{ pop$ "\abphrase{2}" * }
+{ #2 <
+'skip$
+{ editor #2 "{ff }{vv }{ll}{ jj}" format.name$ "others" =
+{ "\abphrase{2}" * }
+{ "\abphrase{0}" * editor #2 "{vv~}{ll}" format.name$ * }
+if$
+}
+if$
+}
+if$
+}
+FUNCTION {format.book.crossref}
+{ volume empty$
+{ "empty volume in " cite$ * "'s crossref of " * crossref * warning$
+"\abphrase{7}"
+}
+{ "\abphrase{9}" volume tie.or.space.connect
+"\abphrase{5}" *
+}
+if$
+editor empty$
+editor field.or.null author field.or.null =
+or
+{ key empty$
+{ series empty$
+{ "need editor, key, or series for " cite$ * " to crossref " *
+crossref * warning$
+"" *
+}
+{ series quote * }
+if$
+}
+{ key * }
+if$
+}
+{ format.crossref.editor * }
+if$
+" \cite{" * crossref * "}" *
+}
+FUNCTION {format.incoll.inproc.crossref}
+{ editor empty$
+editor field.or.null author field.or.null =
+or
+{ key empty$
+{ booktitle empty$
+{ "need editor, key, or booktitle for " cite$ * " to crossref " *
+crossref * warning$
+""
+}
+{ "\abphrase{7}" booktitle quote * }
+if$
+}
+{ "\abphrase{7}" key * }
+if$
+}
+{ "\abphrase{7}" format.crossref.editor * }
+if$
+" \cite{" * crossref * "}" *
+}
+FUNCTION {article}
+{ output.bibitem
+format.authors "author" output.check
+new.block
+crossref missing$
+{ journal emphasize "journal" output.check
+format.vol.num.pages output
+format.date "year" output.check
+}
+{ format.article.crossref output.nonnull
+new.clause
+format.pages output
+}
+if$
+new.block
+note output
+fin.entry
+}
+FUNCTION {book}
+{ output.bibitem
+author empty$
+{ format.editors "author and editor" output.check }
+{ format.authors output.nonnull
+crossref missing$
+{ "author and editor" editor either.or.check }
+'skip$
+if$
+}
+if$
+new.block
+format.btitle "title" output.check
+crossref missing$
+{ new.clause
+format.bvolume output
+new.block
+format.number.series output
+new.sentence
+publisher "publisher" output.check
+address new.clause.checka
+address output
+}
+{ new.block
+format.book.crossref output.nonnull
+}
+if$
+edition new.clause.checka
+format.edition output
+format.date "year" output.check
+new.block
+note output
+fin.entry
+}
+FUNCTION {booklet}
+{ output.bibitem
+format.authors output
+new.block
+format.title "title" output.check
+howpublished address new.block.checkb
+howpublished output
+address new.clause.checka
+address output
+format.date output
+new.block
+note output
+fin.entry
+}
+FUNCTION {inbook}
+{ output.bibitem
+author empty$
+{ format.editors "author and editor" output.check }
+{ format.authors output.nonnull
+crossref missing$
+{ "author and editor" editor either.or.check }
+'skip$
+if$
+}
+if$
+new.block
+format.btitle "title" output.check
+new.clause
+crossref missing$
+{ format.bvolume output
+new.clause
+format.chapter.pages "chapter and pages" output.check
+new.block
+format.number.series output
+new.sentence
+publisher "publisher" output.check
+address new.clause.checka
+address output
+}
+{ format.chapter.pages "chapter and pages" output.check
+new.block
+format.book.crossref output.nonnull
+}
+if$
+edition new.clause.checka
+format.edition output
+format.date "year" output.check
+new.block
+note output
+fin.entry
+}
+FUNCTION {incollection}
+{ output.bibitem
+format.authors "author" output.check
+new.block
+chapter empty$ pages empty$ and
+{
+format.title "title" output.check
+new.block
+}
+'skip$
+if$
+crossref missing$
+{ format.in.ed.booktitle "booktitle" output.check
+new.clause
+format.bvolume output
+new.clause
+format.number.series output
+new.clause
+format.chapter.pages output
+new.sentence
+publisher "publisher" output.check
+address new.clause.checka
+address output
+edition new.clause.checka
+format.edition output
+format.date "year" output.check
+}
+{ format.incoll.inproc.crossref output.nonnull
+new.clause
+format.chapter.pages output
+}
+if$
+new.block
+note output
+fin.entry
+}
+FUNCTION {inproceedings}
+{ output.bibitem
+format.authors "author" output.check
+new.block
+pages empty$
+{
+format.title "title" output.check
+new.block
+}
+'skip$
+if$
+crossref missing$
+{ format.in.ed.booktitle "booktitle" output.check
+volume new.clause.checka
+format.bvolume output
+number series new.clause.checkb
+format.number.series output
+pages new.clause.checka
+format.pages output
+address empty$
+{ organization publisher new.sentence.checkb
+organization output
+publisher new.clause.checka
+publisher output
+format.date "year" output.check
+}
+{ new.clause
+address output.nonnull
+format.date "year" output.check
+new.sentence
+organization output
+new.clause
+publisher output
+}
+if$
+}
+{ format.incoll.inproc.crossref output.nonnull
+new.clause
+format.pages output
+}
+if$
+new.block
+note output
+fin.entry
+}
+FUNCTION {conference} { inproceedings }
+FUNCTION {manual}
+{ output.bibitem
+author empty$
+{ organization empty$
+'skip$
+{ organization output.nonnull
+new.clause
+address output
+}
+if$
+}
+{ format.authors output.nonnull }
+if$
+new.block
+format.btitle "title" output.check
+author empty$
+{ organization empty$
+{ address new.block.checka
+address output
+}
+'skip$
+if$
+}
+{ organization address new.block.checkb
+organization output
+address new.clause.checka
+address output
+}
+if$
+edition new.clause.checka
+format.edition output
+format.date output
+new.block
+note output
+fin.entry
+}
+FUNCTION {mastersthesis}
+{ output.bibitem
+format.authors "author" output.check
+new.block
+format.title "title" output.check
+new.block
+"\abphrase{17}" format.thesis.type output.nonnull
+new.clause
+school "school" output.check
+address new.clause.checka
+address output
+format.date "year" output.check
+new.block
+note output
+fin.entry
+}
+FUNCTION {misc}
+{ output.bibitem
+format.authors output
+title howpublished new.block.checkb
+format.title output
+howpublished new.block.checka
+howpublished output
+format.date output
+new.block
+note output
+fin.entry
+empty.misc.check
+}
+FUNCTION {phdthesis}
+{ output.bibitem
+format.authors "author" output.check
+new.block
+format.btitle "title" output.check
+new.block
+"\abphrase{18}" format.thesis.type output.nonnull
+new.clause
+school "school" output.check
+address new.clause.checka
+address output
+format.date "year" output.check
+new.block
+note output
+fin.entry
+}
+FUNCTION {proceedings}
+{ output.bibitem
+editor empty$
+{ organization output }
+{ format.editors output.nonnull }
+if$
+new.block
+format.btitle "title" output.check
+volume new.clause.checka
+format.bvolume output
+number series new.clause.checkb
+format.number.series output
+address empty$
+{ editor empty$
+{ publisher new.sentence.checka }
+{ organization publisher new.sentence.checkb
+organization output
+publisher new.clause.checka
+}
+if$
+publisher output
+format.date "year" output.check
+}
+{ new.clause
+address output.nonnull
+format.date "year" output.check
+new.sentence
+editor empty$
+'skip$
+{ organization output
+new.clause
+}
+if$
+publisher output
+}
+if$
+new.block
+note output
+fin.entry
+}
+FUNCTION {techreport}
+{ output.bibitem
+format.authors "author" output.check
+new.block
+number empty$
+{
+format.title "title" output.check
+new.block
+}
+'skip$
+if$
+format.tr.number output.nonnull
+new.clause
+institution "institution" output.check
+address new.clause.checka
+address output
+format.date "year" output.check
+new.block
+note output
+fin.entry
+}
+FUNCTION {unpublished}
+{ output.bibitem
+format.authors "author" output.check
+new.block
+format.title "title" output.check
+new.block
+note "note" output.check
+format.date output
+fin.entry
+}
+FUNCTION {default.type} { misc }
+MACRO {jan} {"\abmonth{1}"}
+MACRO {feb} {"\abmonth{2}"}
+MACRO {mar} {"\abmonth{3}"}
+MACRO {apr} {"\abmonth{4}"}
+MACRO {may} {"\abmonth{5}"}
+MACRO {jun} {"\abmonth{6}"}
+MACRO {jul} {"\abmonth{7}"}
+MACRO {aug} {"\abmonth{8}"}
+MACRO {sep} {"\abmonth{9}"}
+MACRO {oct} {"\abmonth{10}"}
+MACRO {nov} {"\abmonth{11}"}
+MACRO {dec} {"\abmonth{12}"}
+MACRO {first} {"\abedition{1}"}
+MACRO {second} {"\abedition{2}"}
+MACRO {third} {"\abedition{3}"}
+MACRO {fourth} {"\abedition{4}"}
+MACRO {fifth} {"\abedition{5}"}
+MACRO {sixth} {"\abedition{6}"}
+MACRO {seventh} {"\abedition{7}"}
+MACRO {eighth} {"\abedition{8}"}
+MACRO {ninth} {"\abedition{9}"}
+MACRO {tenth} {"\abedition{10}"}
+MACRO {section} {"\abchapter{0}"}
+MACRO {paragraph} {"\abchapter{1}"}
+MACRO {appendix} {"\abchapter{2}"}
+MACRO {part} {"\abchapter{3}"}
+READ
+STRINGS { longest.label }
+INTEGERS { number.label longest.label.width }
+FUNCTION {initialize.longest.label}
+{ "" 'longest.label :=
+#1 'number.label :=
+#0 'longest.label.width :=
+}
+FUNCTION {longest.label.pass}
+{ number.label int.to.str$ 'label :=
+number.label #1 + 'number.label :=
+label width$ longest.label.width >
+{ label 'longest.label :=
+label width$ 'longest.label.width :=
+}
+'skip$
+if$
+}
+EXECUTE {initialize.longest.label}
+ITERATE {longest.label.pass}
+FUNCTION {begin.bib}
+{
+"\newif\ifabfull\abfullfalse" write$ newline$
+preamble$ empty$
+'skip$
+{ preamble$ write$ newline$ }
+if$
+"\begin{thebibliography}{" longest.label * "}" * write$ newline$
+}
+EXECUTE {begin.bib}
+EXECUTE {init.state.consts}
+ITERATE {call.type$}
+FUNCTION {end.bib}
+{ newline$
+"\end{thebibliography}" write$ newline$
+}
+EXECUTE {end.bib}
diff --git a/biblio/bibtex/contrib/abstyles/aunsrt.bst b/biblio/bibtex/contrib/abstyles/aunsrt.bst
new file mode 100644
index 0000000000..98fbd0611b
--- /dev/null
+++ b/biblio/bibtex/contrib/abstyles/aunsrt.bst
@@ -0,0 +1,927 @@
+% BibTeX bibliography style `AUNSRT'
+ENTRY
+{ address
+author
+booktitle
+chapter
+edition
+editor
+howpublished
+institution
+journal
+key
+month
+note
+number
+organization
+pages
+publisher
+school
+series
+title
+type
+volume
+year
+}
+{}
+{ label }
+INTEGERS { output.state before.all mid.sentence after.sentence after.block
+continue.sentence }
+FUNCTION {init.state.consts}
+{ #0 'before.all :=
+#1 'mid.sentence :=
+#2 'after.sentence :=
+#3 'after.block :=
+#4 'continue.sentence :=
+}
+STRINGS { s t }
+FUNCTION {output.nonnull}
+{ 's :=
+output.state continue.sentence =
+{ " " * write$ }
+{ output.state mid.sentence =
+{ ", " * write$ }
+{ output.state after.block =
+{ add.period$ write$
+newline$
+"\newblock " write$
+}
+{ output.state before.all =
+'write$
+{ add.period$ " " * write$ }
+if$
+}
+if$
+}
+if$
+continue.sentence 'output.state :=
+}
+if$
+s
+}
+FUNCTION {output}
+{ duplicate$ empty$
+'pop$
+'output.nonnull
+if$
+}
+FUNCTION {output.check}
+{ 't :=
+duplicate$ empty$
+{ pop$ "empty " t * " in " * cite$ * warning$ }
+'output.nonnull
+if$
+}
+FUNCTION {output.bibitem}
+{ newline$
+"\bibitem{" write$
+cite$ write$
+"}" write$
+newline$
+""
+before.all 'output.state :=
+}
+FUNCTION {fin.entry}
+{ add.period$
+write$
+newline$
+}
+FUNCTION {new.block}
+{ output.state before.all =
+'skip$
+{ after.block 'output.state := }
+if$
+}
+FUNCTION {new.sentence}
+{ output.state after.block =
+'skip$
+{ output.state before.all =
+'skip$
+{ after.sentence 'output.state := }
+if$
+}
+if$
+}
+FUNCTION {new.clause}
+{ output.state after.sentence =
+'skip$
+{ output.state after.block =
+'skip$
+{ output.state before.all =
+'skip$
+{ mid.sentence 'output.state := }
+if$
+}
+if$
+}
+if$
+}
+FUNCTION {not}
+{ { #0 }
+{ #1 }
+if$
+}
+FUNCTION {and}
+{ 'skip$
+{ pop$ #0 }
+if$
+}
+FUNCTION {or}
+{ { pop$ #1 }
+'skip$
+if$
+}
+FUNCTION {new.block.checka}
+{ empty$
+'skip$
+'new.block
+if$
+}
+FUNCTION {new.block.checkb}
+{ empty$
+swap$ empty$
+and
+'skip$
+'new.block
+if$
+}
+FUNCTION {new.sentence.checka}
+{ empty$
+'skip$
+'new.sentence
+if$
+}
+FUNCTION {new.sentence.checkb}
+{ empty$
+swap$ empty$
+and
+'skip$
+'new.sentence
+if$
+}
+FUNCTION {new.clause.checka}
+{ empty$
+'skip$
+'new.clause
+if$
+}
+FUNCTION {new.clause.checkb}
+{ empty$
+swap$ empty$
+and
+'skip$
+'new.clause
+if$
+}
+FUNCTION {field.or.null}
+{ duplicate$ empty$
+{ pop$ "" }
+'skip$
+if$
+}
+FUNCTION {emphasize}
+{ duplicate$ empty$
+{ pop$ "" }
+{ "\abtype{2}{" swap$ * "}" * }
+if$
+}
+FUNCTION {capitalize}
+{ duplicate$ empty$
+{ pop$ "" }
+{ "\abtype{0}{" swap$ * "}" * }
+if$
+}
+FUNCTION {boldface}
+{ duplicate$ empty$
+{ pop$ "" }
+{ "\abtype{3}{" swap$ * "}" * }
+if$
+}
+FUNCTION {quote}
+{ duplicate$ empty$
+{ pop$ "" }
+{ "\abtype{1}{" swap$ * "}" * }
+if$
+}
+FUNCTION {parentheses}
+{ duplicate$ empty$
+{ pop$ "" }
+{ "\abtype{5}{" swap$ * "}" * }
+if$
+}
+INTEGERS { nameptr namesleft numnames }
+FUNCTION {format.names}
+{ 's :=
+#1 'nameptr :=
+s num.names$ 'numnames :=
+numnames 'namesleft :=
+{ namesleft #0 > }
+{ s nameptr "{ff~}{vv~}{ll}{, jj}" format.name$ 't :=
+nameptr #1 >
+{ namesleft #1 >
+{ ", " * t * }
+{ numnames #2 >
+{ "\abphrase{1}" * }
+'skip$
+if$
+t "others" =
+{ "\abphrase{2}" * }
+{ "\abphrase{0}" * t * }
+if$
+}
+if$
+}
+'t
+if$
+nameptr #1 + 'nameptr :=
+namesleft #1 - 'namesleft :=
+}
+while$
+}
+FUNCTION {format.authors}
+{ author empty$
+{ "" }
+{ author format.names capitalize }
+if$
+}
+FUNCTION {format.editors}
+{ editor empty$
+{ "" }
+{ editor format.names capitalize
+editor num.names$ #1 >
+{ "\abphrase{3}" * }
+{ "\abphrase{4}" * }
+if$
+}
+if$
+}
+FUNCTION {format.title}
+{ title empty$
+{ "" }
+{ title "t" change.case$ }
+if$
+}
+FUNCTION {n.dashify}
+{ 't :=
+""
+{ t empty$ not }
+{ t #1 #1 substring$ "-" =
+{ t #1 #2 substring$ "--" = not
+{ "--" *
+t #2 global.max$ substring$ 't :=
+}
+{ { t #1 #1 substring$ "-" = }
+{ "-" *
+t #2 global.max$ substring$ 't :=
+}
+while$
+}
+if$
+}
+{ t #1 #1 substring$ *
+t #2 global.max$ substring$ 't :=
+}
+if$
+}
+while$
+}
+FUNCTION {format.date}
+{ year empty$
+{ month empty$
+{ "" }
+{ "there's a month but no year in " cite$ * warning$
+month parentheses
+}
+if$
+}
+{ month empty$
+{ year parentheses }
+{ month " " * year * parentheses }
+if$
+}
+if$
+}
+FUNCTION {format.btitle}
+{ title quote
+}
+FUNCTION {tie.or.space.connect}
+{ duplicate$ text.length$ #3 <
+{ "~" }
+{ " " }
+if$
+swap$ * *
+}
+FUNCTION {either.or.check}
+{ empty$
+'pop$
+{ "can't use both " swap$ * " fields in " * cite$ * warning$ }
+if$
+}
+FUNCTION {format.bvolume}
+{ volume empty$
+{ "" }
+{ "\abphrase{8}" volume tie.or.space.connect
+series empty$
+'skip$
+{ "\abphrase{5}" * series quote * }
+if$
+"volume and number" number either.or.check
+}
+if$
+}
+FUNCTION {format.number.series}
+{ volume empty$
+{ number empty$
+{ series field.or.null }
+{ output.state mid.sentence = output.state continue.sentence = or
+{ "\abphrase{10}" }
+{ "\abphrase{11}" }
+if$
+number tie.or.space.connect
+series empty$
+{ "there's a number but no series in " cite$ * warning$ }
+{ "\abphrase{6}" * series * }
+if$
+}
+if$
+}
+{ "" }
+if$
+}
+FUNCTION {format.edition}
+{ edition empty$
+{ "" }
+{ output.state mid.sentence = output.state continue.sentence = or
+{ edition "l" change.case$ "\abphrase{12}" * }
+{ edition "t" change.case$ "\abphrase{12}" * }
+if$
+}
+if$
+}
+INTEGERS { multiresult }
+FUNCTION {multi.page.check}
+{ 't :=
+#0 'multiresult :=
+{ multiresult not
+t empty$ not
+and
+}
+{ t #1 #1 substring$
+duplicate$ "-" =
+swap$ duplicate$ "," =
+swap$ "+" =
+or or
+{ #1 'multiresult := }
+{ t #2 global.max$ substring$ 't := }
+if$
+}
+while$
+multiresult
+}
+FUNCTION {format.pages}
+{ pages empty$
+{ "" }
+{ pages multi.page.check
+{ "\abphrase{13}" pages n.dashify tie.or.space.connect }
+{ "\abphrase{14}" pages tie.or.space.connect }
+if$
+}
+if$
+}
+FUNCTION {format.vol.num.pages}
+{ volume field.or.null boldface
+number empty$
+'skip$
+{ "\abtype{4}{" number * "}" * *
+volume empty$
+{ "there's a number but no volume in " cite$ * warning$ }
+'skip$
+if$
+}
+if$
+pages empty$
+'skip$
+{ duplicate$ empty$
+{ pop$ format.pages }
+{ ", " * pages n.dashify * }
+if$
+}
+if$
+}
+FUNCTION {format.chapter.pages}
+{ chapter empty$
+'format.pages
+{ type empty$
+{ "\abphrase{15}" }
+{ type "l" change.case$ }
+if$
+chapter tie.or.space.connect
+pages empty$
+'skip$
+{ ", " * format.pages * }
+if$
+}
+if$
+}
+FUNCTION {format.in.ed.booktitle}
+{ booktitle empty$
+{ "" }
+{ editor empty$
+{ "\abphrase{7}" booktitle quote * }
+{ "\abphrase{7}" format.editors * ", " * booktitle quote * }
+if$
+}
+if$
+}
+FUNCTION {empty.misc.check}
+{ author empty$ title empty$ howpublished empty$
+month empty$ year empty$ note empty$
+and and and and and
+{ "all relevant fields are empty in " cite$ * warning$ }
+'skip$
+if$
+}
+FUNCTION {format.thesis.type}
+{ type empty$
+'skip$
+{ pop$
+type "t" change.case$
+}
+if$
+}
+FUNCTION {format.tr.number}
+{ type empty$
+{ "\abphrase{16}" }
+'type
+if$
+number empty$
+{ "t" change.case$ }
+{ number tie.or.space.connect }
+if$
+}
+FUNCTION {format.article.crossref}
+{ key empty$
+{ journal empty$
+{ "need key or journal for " cite$ * " to crossref " * crossref *
+warning$
+""
+}
+{ "\abphrase{7}" journal emphasize * }
+if$
+}
+{ "\abphrase{7}" key * }
+if$
+" \cite{" * crossref * "}" *
+}
+FUNCTION {format.crossref.editor}
+{ editor #1 "{vv~}{ll}" format.name$
+editor num.names$ duplicate$
+#2 >
+{ pop$ "\abphrase{2}" * }
+{ #2 <
+'skip$
+{ editor #2 "{ff }{vv }{ll}{ jj}" format.name$ "others" =
+{ "\abphrase{2}" * }
+{ "\abphrase{0}" * editor #2 "{vv~}{ll}" format.name$ * }
+if$
+}
+if$
+}
+if$
+}
+FUNCTION {format.book.crossref}
+{ volume empty$
+{ "empty volume in " cite$ * "'s crossref of " * crossref * warning$
+"\abphrase{7}"
+}
+{ "\abphrase{9}" volume tie.or.space.connect
+"\abphrase{5}" *
+}
+if$
+editor empty$
+editor field.or.null author field.or.null =
+or
+{ key empty$
+{ series empty$
+{ "need editor, key, or series for " cite$ * " to crossref " *
+crossref * warning$
+"" *
+}
+{ series quote * }
+if$
+}
+{ key * }
+if$
+}
+{ format.crossref.editor * }
+if$
+" \cite{" * crossref * "}" *
+}
+FUNCTION {format.incoll.inproc.crossref}
+{ editor empty$
+editor field.or.null author field.or.null =
+or
+{ key empty$
+{ booktitle empty$
+{ "need editor, key, or booktitle for " cite$ * " to crossref " *
+crossref * warning$
+""
+}
+{ "\abphrase{7}" booktitle quote * }
+if$
+}
+{ "\abphrase{7}" key * }
+if$
+}
+{ "\abphrase{7}" format.crossref.editor * }
+if$
+" \cite{" * crossref * "}" *
+}
+FUNCTION {article}
+{ output.bibitem
+format.authors "author" output.check
+new.block
+format.title "title" output.check
+new.block
+crossref missing$
+{ journal emphasize "journal" output.check
+format.vol.num.pages output
+format.date "year" output.check
+}
+{ format.article.crossref output.nonnull
+new.clause
+format.pages output
+}
+if$
+new.block
+note output
+fin.entry
+}
+FUNCTION {book}
+{ output.bibitem
+author empty$
+{ format.editors "author and editor" output.check }
+{ format.authors output.nonnull
+crossref missing$
+{ "author and editor" editor either.or.check }
+'skip$
+if$
+}
+if$
+new.block
+format.btitle "title" output.check
+crossref missing$
+{ new.clause
+format.bvolume output
+new.block
+format.number.series output
+new.sentence
+publisher "publisher" output.check
+address new.clause.checka
+address output
+}
+{ new.block
+format.book.crossref output.nonnull
+}
+if$
+edition new.clause.checka
+format.edition output
+format.date "year" output.check
+new.block
+note output
+fin.entry
+}
+FUNCTION {booklet}
+{ output.bibitem
+format.authors output
+new.block
+format.title "title" output.check
+howpublished address new.block.checkb
+howpublished output
+address new.clause.checka
+address output
+format.date output
+new.block
+note output
+fin.entry
+}
+FUNCTION {inbook}
+{ output.bibitem
+author empty$
+{ format.editors "author and editor" output.check }
+{ format.authors output.nonnull
+crossref missing$
+{ "author and editor" editor either.or.check }
+'skip$
+if$
+}
+if$
+new.block
+format.btitle "title" output.check
+new.clause
+crossref missing$
+{ format.bvolume output
+new.clause
+format.chapter.pages "chapter and pages" output.check
+new.block
+format.number.series output
+new.sentence
+publisher "publisher" output.check
+address new.clause.checka
+address output
+}
+{ format.chapter.pages "chapter and pages" output.check
+new.block
+format.book.crossref output.nonnull
+}
+if$
+edition new.clause.checka
+format.edition output
+format.date "year" output.check
+new.block
+note output
+fin.entry
+}
+FUNCTION {incollection}
+{ output.bibitem
+format.authors "author" output.check
+new.block
+format.title "title" output.check
+new.block
+crossref missing$
+{ format.in.ed.booktitle "booktitle" output.check
+new.clause
+format.bvolume output
+new.clause
+format.number.series output
+new.clause
+format.chapter.pages output
+new.sentence
+publisher "publisher" output.check
+address new.clause.checka
+address output
+edition new.clause.checka
+format.edition output
+format.date "year" output.check
+}
+{ format.incoll.inproc.crossref output.nonnull
+new.clause
+format.chapter.pages output
+}
+if$
+new.block
+note output
+fin.entry
+}
+FUNCTION {inproceedings}
+{ output.bibitem
+format.authors "author" output.check
+new.block
+format.title "title" output.check
+new.block
+crossref missing$
+{ format.in.ed.booktitle "booktitle" output.check
+volume new.clause.checka
+format.bvolume output
+number series new.clause.checkb
+format.number.series output
+pages new.clause.checka
+format.pages output
+address empty$
+{ organization publisher new.sentence.checkb
+organization output
+publisher new.clause.checka
+publisher output
+format.date "year" output.check
+}
+{ new.clause
+address output.nonnull
+format.date "year" output.check
+new.sentence
+organization output
+new.clause
+publisher output
+}
+if$
+}
+{ format.incoll.inproc.crossref output.nonnull
+new.clause
+format.pages output
+}
+if$
+new.block
+note output
+fin.entry
+}
+FUNCTION {conference} { inproceedings }
+FUNCTION {manual}
+{ output.bibitem
+author empty$
+{ organization empty$
+'skip$
+{ organization output.nonnull
+new.clause
+address output
+}
+if$
+}
+{ format.authors output.nonnull }
+if$
+new.block
+format.btitle "title" output.check
+author empty$
+{ organization empty$
+{ address new.block.checka
+address output
+}
+'skip$
+if$
+}
+{ organization address new.block.checkb
+organization output
+address new.clause.checka
+address output
+}
+if$
+edition new.clause.checka
+format.edition output
+format.date output
+new.block
+note output
+fin.entry
+}
+FUNCTION {mastersthesis}
+{ output.bibitem
+format.authors "author" output.check
+new.block
+format.title "title" output.check
+new.block
+"\abphrase{17}" format.thesis.type output.nonnull
+new.clause
+school "school" output.check
+address new.clause.checka
+address output
+format.date "year" output.check
+new.block
+note output
+fin.entry
+}
+FUNCTION {misc}
+{ output.bibitem
+format.authors output
+title howpublished new.block.checkb
+format.title output
+howpublished new.block.checka
+howpublished output
+format.date output
+new.block
+note output
+fin.entry
+empty.misc.check
+}
+FUNCTION {phdthesis}
+{ output.bibitem
+format.authors "author" output.check
+new.block
+format.btitle "title" output.check
+new.block
+"\abphrase{18}" format.thesis.type output.nonnull
+new.clause
+school "school" output.check
+address new.clause.checka
+address output
+format.date "year" output.check
+new.block
+note output
+fin.entry
+}
+FUNCTION {proceedings}
+{ output.bibitem
+editor empty$
+{ organization output }
+{ format.editors output.nonnull }
+if$
+new.block
+format.btitle "title" output.check
+volume new.clause.checka
+format.bvolume output
+number series new.clause.checkb
+format.number.series output
+address empty$
+{ editor empty$
+{ publisher new.sentence.checka }
+{ organization publisher new.sentence.checkb
+organization output
+publisher new.clause.checka
+}
+if$
+publisher output
+format.date "year" output.check
+}
+{ new.clause
+address output.nonnull
+format.date "year" output.check
+new.sentence
+editor empty$
+'skip$
+{ organization output
+new.clause
+}
+if$
+publisher output
+}
+if$
+new.block
+note output
+fin.entry
+}
+FUNCTION {techreport}
+{ output.bibitem
+format.authors "author" output.check
+new.block
+format.title "title" output.check
+new.block
+format.tr.number output.nonnull
+new.clause
+institution "institution" output.check
+address new.clause.checka
+address output
+format.date "year" output.check
+new.block
+note output
+fin.entry
+}
+FUNCTION {unpublished}
+{ output.bibitem
+format.authors "author" output.check
+new.block
+format.title "title" output.check
+new.block
+note "note" output.check
+format.date output
+fin.entry
+}
+FUNCTION {default.type} { misc }
+MACRO {jan} {"\abmonth{1}"}
+MACRO {feb} {"\abmonth{2}"}
+MACRO {mar} {"\abmonth{3}"}
+MACRO {apr} {"\abmonth{4}"}
+MACRO {may} {"\abmonth{5}"}
+MACRO {jun} {"\abmonth{6}"}
+MACRO {jul} {"\abmonth{7}"}
+MACRO {aug} {"\abmonth{8}"}
+MACRO {sep} {"\abmonth{9}"}
+MACRO {oct} {"\abmonth{10}"}
+MACRO {nov} {"\abmonth{11}"}
+MACRO {dec} {"\abmonth{12}"}
+MACRO {first} {"\abedition{1}"}
+MACRO {second} {"\abedition{2}"}
+MACRO {third} {"\abedition{3}"}
+MACRO {fourth} {"\abedition{4}"}
+MACRO {fifth} {"\abedition{5}"}
+MACRO {sixth} {"\abedition{6}"}
+MACRO {seventh} {"\abedition{7}"}
+MACRO {eighth} {"\abedition{8}"}
+MACRO {ninth} {"\abedition{9}"}
+MACRO {tenth} {"\abedition{10}"}
+MACRO {section} {"\abchapter{0}"}
+MACRO {paragraph} {"\abchapter{1}"}
+MACRO {appendix} {"\abchapter{2}"}
+MACRO {part} {"\abchapter{3}"}
+READ
+STRINGS { longest.label }
+INTEGERS { number.label longest.label.width }
+FUNCTION {initialize.longest.label}
+{ "" 'longest.label :=
+#1 'number.label :=
+#0 'longest.label.width :=
+}
+FUNCTION {longest.label.pass}
+{ number.label int.to.str$ 'label :=
+number.label #1 + 'number.label :=
+label width$ longest.label.width >
+{ label 'longest.label :=
+label width$ 'longest.label.width :=
+}
+'skip$
+if$
+}
+EXECUTE {initialize.longest.label}
+ITERATE {longest.label.pass}
+FUNCTION {begin.bib}
+{
+"\newif\ifabfull\abfulltrue" write$ newline$
+preamble$ empty$
+'skip$
+{ preamble$ write$ newline$ }
+if$
+"\begin{thebibliography}{" longest.label * "}" * write$ newline$
+}
+EXECUTE {begin.bib}
+EXECUTE {init.state.consts}
+ITERATE {call.type$}
+FUNCTION {end.bib}
+{ newline$
+"\end{thebibliography}" write$ newline$
+}
+EXECUTE {end.bib}
diff --git a/biblio/bibtex/contrib/abstyles/btxabst.doc b/biblio/bibtex/contrib/abstyles/btxabst.doc
new file mode 100644
index 0000000000..2829e8a610
--- /dev/null
+++ b/biblio/bibtex/contrib/abstyles/btxabst.doc
@@ -0,0 +1,2878 @@
+% BibTeX `adaptable' family
+ % version 1.10 derived by Hans-Hermann Bode (H2B), Osnabr\"uck,
+ % (BitNet/EARN: HHBODE@DOSUNI1)
+ % from the `plain' family version 0.99b.
+ % The copying statement declared below extends to this file also with
+ % the file names btxabst.doc, aplain.bst, aunsrt.bst, aalpha.bst,
+ % aabbrv.bst, anotit.bst, and aunsnot.bst added.
+% BibTeX `plain' family
+ % version 0.99b for BibTeX versions 0.99a or later, LaTeX version 2.09.
+ % Copyright (C) 1985, all rights reserved.
+ % Copying of this file is authorized only if either
+ % (1) you make absolutely no changes to your copy, including name, or
+ % (2) if you do make changes, you name it something other than
+ % btxbst.doc, plain.bst, unsrt.bst, alpha.bst, and abbrv.bst.
+ % This restriction helps ensure that all standard styles are identical.
+ % The file btxbst.doc has the documentation for this style.
+% Please notify Oren Patashnik (PATASHNIK@SCORE.STANFORD.EDU) of any bugs in
+% these standard styles or in this documentation file.
+%
+% This is file btxbxt.doc; it helps document bibliography styles,
+% and is also a template file that you can use to make
+% several different style files, if you have access to a C preprocessor.
+% For example, the standard styles were made by doing something like
+% cpp -P -DAPLAIN btxabst.doc aplain.txt
+% cpp -P -DAUNSRT btxabst.doc aunsrt.txt
+% cpp -P -DAALPHA btxabst.doc aalpha.txt
+% cpp -P -DAABBRV btxabst.doc aabbrv.txt
+% cpp -P -DANOTIT btxabst.doc anotit.txt
+% cpp -P -DAUNSNOT btxabst.doc aunsnot.txt
+% and then renaming after removing unwanted comments and blank lines.
+% If you don't have access,
+% you can edit this file by hand to imitate the preprocessor,
+% with the following explanation of the C preprocessor constructs used here.
+%
+% The output of the preprocessor is the same as the input, except that certain
+% lines will be excluded (and some blank lines will be added). The sequence
+% #if VAR
+% lines to be included when VAR is not zero
+% #else
+% lines to be included when VAR is zero
+% #endif
+% (with the #-signs appearing in column 1) means that one set or the other of
+% the lines are to be included depending on the value of VAR.
+% The #else part is optional. Comments can be added after #else and #endif.
+% Variables can be set by
+% #define VAR value
+% and one can also use #ifdef VAR to see if VAR has any value, and #ifndef
+% to see if it has none.
+% Another #if form used in this file is #if !VAR, which includes the lines
+% after the #if only if VAR is zero.
+%
+% Convention: Use all uppercase identifiers for these preprocessor variables
+% so you can spot them easily
+%
+% The command line to the preprocessor should define one of APLAIN, AUNSRT, AALPHA
+% or AABBRV (though APLAIN will be used by default if none is given),
+% and the following lines will set various boolean variables to control the
+% various lines that are chosen from the rest of the file.
+% Each boolean variable should be set true (1) or false (0) in each style.
+% Here are the current variables, and their meanings:
+% LAB_ALPH: an alphabetic label is used (if false then a numeric
+% label is used)
+% SORTED: the entries should be sorted by label (if nonnumeric)
+% and other info, like authors (if false, then
+% entries remain in order of occurrence)
+% NAME_FULL: the authors, editors, etc., get the full names as
+% given in the bibliography file (if false, the first
+% names become initials)
+% ATIT_LOWER: titles of non-"books" (e.g., articles) should be
+% converted to lower-case, except the first letter or
+% first letter after a colon
+% (if false then they appear as in the database)
+% MONTH_FULL: months are spelled out in full (if false, then
+% they're abbreviated); now used generally for
+% distinction between ``full'' and ``abbreviated''
+% styles (H2B)
+% JOUR_FULL: macro journal names are spelled out in full
+% (if false then they are abbreviated, currently
+% as they appear in ACM publications); no more used
+% (H2B)
+% NO_TITLE: the titles of articles, incollections, inproceedings
+% and techreports are omitted, if there are other
+% informations to identify the work cited (added by H2B)
+%
+#ifndef AUNSRT
+# ifndef AALPHA
+# ifndef AABBRV
+# ifndef ANOTIT
+# ifndef AUNSNOT
+# define APLAIN 1
+# endif
+# endif
+# endif
+# endif
+#endif
+#ifdef APLAIN
+% aplain style (sorted numbers)
+# define LAB_ALPH 0
+# define SORTED 1
+# define NAME_FULL 1
+# define ATIT_LOWER 1
+# define MONTH_FULL 1
+# define JOUR_FULL 1
+# define NO_TITLE 0
+#endif
+#ifdef AUNSRT
+% aunsrt style (unsorted numbers)
+# define LAB_ALPH 0
+# define SORTED 0
+# define NAME_FULL 1
+# define ATIT_LOWER 1
+# define MONTH_FULL 1
+# define JOUR_FULL 1
+# define NO_TITLE 0
+#endif
+#ifdef AALPHA
+% aalpha style (sorted short alphabetics)
+# define LAB_ALPH 1
+# define SORTED 1
+# define NAME_FULL 1
+# define ATIT_LOWER 1
+# define MONTH_FULL 1
+# define JOUR_FULL 1
+# define NO_TITLE 0
+#endif
+#ifdef AABBRV
+% aabbrv style (sorted numbers, with abbreviations)
+# define LAB_ALPH 0
+# define SORTED 1
+# define NAME_FULL 0
+# define ATIT_LOWER 1
+# define MONTH_FULL 0
+# define JOUR_FULL 0
+# define NO_TITLE 0
+#endif
+#ifdef ANOTIT
+% anotit style (sorted numbers, with abbreviations, no article titles)
+# define LAB_ALPH 0
+# define SORTED 1
+# define NAME_FULL 0
+# define ATIT_LOWER 1
+# define MONTH_FULL 0
+# define JOUR_FULL 0
+# define NO_TITLE 1
+#endif
+#ifdef AUNSNOT
+% aunsnot style (unsorted numbers, with abbreviations, no article titles)
+# define LAB_ALPH 0
+# define SORTED 0
+# define NAME_FULL 0
+# define ATIT_LOWER 1
+# define MONTH_FULL 0
+# define JOUR_FULL 0
+# define NO_TITLE 1
+#endif
+%
+% Entry formatting: Similar to that recommended by Mary-Claire van Leunen
+% in "A Handbook for Scholars". Book-like titles are italicized
+% (emphasized) and non-book titles are converted to sentence
+% capitilization (and not enclosed in quotes).
+% This file outputs a \newblock between major blocks of an entry
+% (the name \newblock is analogous to the names \newline and \newpage)
+% so that the user can obtain an "open" format, which has a line break
+% before each block and lines after the first are indented within blocks,
+% by giving the optional \documentstyle argument `openbib';
+% The default is the "closed" format---blocks runs together.
+%
+% Citation alphabetic label format:
+% [Knu73] for single author (or editor or key)
+% [AHU83] (first letters of last names) for multiple authors
+%
+% Citation label numberic format:
+% [number]
+%
+% Reference list ordering for sorted, alphabetic lables:
+% alphabetical by citation label, then by author(s) or whatever
+% passes for author in the absence of one, then by year,
+% then title
+%
+% Reference list ordering for sorted, numeric lables:
+% alphabetical by author(s) or whatever passes
+% for author in the absence of one, then by year, then title
+%
+% Reference list ordering for unsorted:
+% by the order cited in the text
+%
+% History
+% 12/16/84 (HWT) Original `plain' version, by Howard Trickey.
+% 12/23/84 (LL) Some comments made by Leslie Lamport.
+% 2/16/85 (OP) Changes based on LL's comments, Oren Patashnik.
+% 2/17/85 (HWT) Template file and other standard styles made.
+% 3/28/85 (OP) First release, version 0.98b for BibTeX 0.98f.
+% 5/ 9/85 (OP) Version 0.98c for BibTeX 0.98i:
+% fixed Theoretical Computer Science macro name;
+% fixed the format.vol.num.pages function.
+% 1/24/88 (OP) Version 0.99a for BibTeX 0.99a, main changes:
+% assignment operator (:=) arguments reversed;
+% the preamble$ function outputs the database PREAMBLE;
+% entry.max$ and global.max$ (built-in) variables replace
+% entry.string.max and global.string.max functions;
+% alphabetizing by year then title, not just title;
+% many unnecessary ties removed; \it ==> \em;
+% the `alpha' style uses a superscripted `+' instead of a
+% `*' for unnamed names in constructing the label;
+% the `abbrv' style now uses "Mar." and "Sept.";
+% the functions calc.label and presort now look at just
+% the fields they're supposed to;
+% BOOKLET, MASTERSTHESIS, TECHREPORT use nonbook titles;
+% INBOOK and INCOLLECTION take an optional type (e.g.
+% type = "Section"), overriding the default "chapter";
+% BOOK, INBOOK, INCOLLECTION, and PROCEEDINGS now allow
+% either volume or number, not just volume;
+% INCOLLECTION now allows an edition and series field;
+% PROCEEDINGS and INPROCEEDINGS now use the address field
+% to tell where a conference was held;
+% INPROCEEDINGS and PROCEEDINGS now allow either volume
+% or number, and also a series field;
+% MASTERSTHESIS and PHDTHESIS accept types other than
+% "Master's thesis" and "PhD thesis";
+% UNPUBLISHED now outputs, in one block, note then date;
+% MANUAL now prints out the organization in
+% the first block if the author field is empty;
+% MISC can't be empty---it requires some optional field.
+% 3/23/88 (OP) Version 0.99b for BibTeX 0.99c---changed the three
+% erroneous occurrences of `cite ' to `cite$ '; this
+% change didn't affect the four standard styles, so the
+% 0.99a versions of those styles are still current.
+% 5/11/91 (H2B) Version 1.00 of the `b' style family by
+% Hans-Hermann Bode with the following changes and
+% extensions: renaming the styles, adding a `anotit'
+% style; adding an output.state named continue.sentence
+% and a new.clause function; setting author names in
+% small caps, putting booktitles in quotes rather than
+% to emphasize them, boldfacing volume numbers of
+% journals, including date specification in parentheses,
+% discarding macros for journal names.
+% 6/15/91 (H2B) Version 1.10 of the `adaptable' style family (which
+% replaces the `b' style family) with adaptable
+% type styles, phrases, conjunctions etc., new macros
+% for edition numbers and ``chapter'' names and a new
+% `aunsnot' style.
+%
+% The ENTRY declaration
+% Like Scribe's (according to pages 231-2 of the April '84 edition),
+% but no fullauthor or editors fields because BibTeX does name handling.
+% The annote field is commented out here because this family doesn't
+% include an annotated bibliography style. And in addition to the fields
+% listed here, BibTeX has a built-in crossref field, explained later.
+
+ENTRY
+% Fields:
+ { address
+% Usually the address of a publisher or other type of organization.
+% Put information in this field only if it helps the reader find the
+% thing---for example you should omit the address of a major
+% publisher entirely. For a PROCEEDINGS or an INPROCEEDINGS,
+% however, it's the address of the conference; for those two entry
+% types, include the publisher's or organization's address, if
+% necessary, in the publisher or organization field.
+% annote
+% Long annotation---for annotated bibliographies (begins sentence).
+ author
+% Name(s) of author(s), in BibTeX name format.
+ booktitle
+% Book title when the thing being referenced isn't the whole book.
+% For book entries, the title field should be used instead.
+ chapter
+% Chapter (or section or whatever) number.
+ edition
+% Edition of a book---should be an ordinal (e.g., "Second").
+ editor
+% Name(s) of editor(s), in BibTeX name format.
+% If there is also an author field, then the editor field should be
+% for the book or collection that the work appears in.
+ howpublished
+% How something strange has been published (begins sentence).
+ institution
+% Sponsoring institution of a technical report.
+ journal
+% Journal name (macros are provided for many).
+ key
+% Alphabetizing, labeling, and cross-referencing key
+% (needed when an entry has no author or editor).
+ month
+% Month (macros are provided).
+ note
+% To help the reader find a reference (begins sentence).
+ number
+% Number of a journal or technical report, or of a work in a series.
+ organization
+% Organization sponsoring a conference (or publishing a manual); if
+% the editor (or author) is empty, and if the organization produces
+% an awkward label or cross reference, you should put appropriately
+% condensed organization information in the key field as well.
+ pages
+% Page number or numbers (use `--' to separate a range, use `+'
+% to indicate pages following that don't form a simple range).
+ publisher
+% Publisher name.
+ school
+% School name (for theses).
+ series
+% The name of a series or set of books.
+% An individual book will will also have it's own title.
+ title
+% The title of the thing you're referred to.
+ type
+% Type of a Techreport (e.g., "Research Note") to be used instead of
+% the default "Technical Report"; or, similarly, the type of a
+% thesis; or of a part of a book.
+ volume
+% The volume number of a journal or multivolume work.
+ year
+% The year should contain only numerals (technically, it should end
+% with four numerals, after purification; doesn't a begin sentence).
+ }
+% There are no integer entry variables
+ {}
+% These string entry variables are used to form the citation label.
+% In a storage pinch, sort.label can be easily computed on the fly.
+#if LAB_ALPH
+#if SORTED
+ { label extra.label sort.label }
+#else !SORTED
+% It doesn't seem like a good idea to use an order-of-citation
+% reference list when using alphabetic labels, but when this happens
+% we do things a little differently
+ { label }
+#endif SORTED
+#else !LAB_ALPH
+ { label }
+#endif LAB_ALPH
+
+% The following macros have to be defined by the user (e.g., with the
+% expansions given below) for formatting of certain fields and to replace the
+% constant built-in strings for phrases, conjunctions etc. This makes the
+% BibTeX style files adaptable---a feature introduced by H2B.
+%
+% The type style of certain fields is determined by the \abtype command. The
+% first parameter is a number, that denotes the field in question, namely:
+% 0 author and editor names,
+% 1 titles of books and series,
+% 2 journal titles,
+% 3 journal volumes,
+% 4 journal numbers, and
+% 5 dates.
+% The second parameter is the text to format. Hence, the type style macro
+% could be something like:
+% \def\abtype#1#2{%
+% \ifcase#1{\sc#2}\or``#2''\or{\em#2\/}\or{\bf#2}\or(#2)\or(#2)\else#2\fi}
+% The \else clause returns the text unformatted, if the command is called with
+% an undefined field number (which is not used in this file).
+%
+% Phrases are defined by the \abphrase command. The only parameter is a code
+% for the phrase:
+% 0 conjunction between two or before the last name of a name list
+% 1 comes before the last conjunction of a name list
+% 2 replaces names of co-authors and co-editors (``et al.'')
+% 3 marks multiple editors
+% 4 marks a single editor
+% 5 ``of'' for a volume of a series or crossref
+% 6 ``in'' for a number in a series
+% 7 ``In'' for crossrefs to books, articles, etc.
+% 8 comes before a volume number, lower-case
+% 9 comes before a volume number, upper-case
+% 10 comes before a series number, lower-case
+% 11 comes before a series number, upper-case
+% 12 comes after an edition number
+% 13 comes before multiple page numbers
+% 14 comes before a single page number
+% 15 comes before a chapter number
+% 16 denotes a technical report
+% 17 denotes a master's thesis
+% 18 denotes a phd thesis
+% An appropriate definition of the phrases macro would be:
+% \def\abphrase#1{%
+% \ifcase#1{ and }\or{,}\or{ et~al.}\or{, editors}\or{, editor}\or%
+% { of }\or{ in }\or{In }\or{volume}\or{Volume}\or{number}\or{Number}\or%
+% { edition}\or{pages}\or{page}\or{chapter}\or%
+% {Technical Report}\or{Master's thesis}\or{PhD thesis}\fi}
+
+% Each entry function starts by calling output.bibitem, to write the
+% \bibitem and its arguments to the .BBL file. Then the various fields
+% are formatted and printed by output or output.check. Those functions
+% handle the writing of separators (commas, periods, \newblock's),
+% taking care not to do so when they are passed a null string.
+% Finally, fin.entry is called to add the final period and finish the
+% entry.
+%
+% A bibliographic reference is formatted into a number of `blocks':
+% in the open format, a block begins on a new line and subsequent
+% lines of the block are indented. A block may contain more than
+% one sentence (well, not a grammatical sentence, but something to
+% be ended with a sentence ending period). The entry functions should
+% call new.block whenever a block other than the first is about to be
+% started. They should call new.sentence whenever a new sentence is
+% to be started. The output functions will ensure that if two
+% new.sentence's occur without any non-null string being output between
+% them then there won't be two periods output. Similarly for two
+% successive new.block's.
+%
+% The output routines don't write their argument immediately.
+% Instead, by convention, that argument is saved on the stack to be
+% output next time (when we'll know what separator needs to come
+% after it). Meanwhile, the output routine has to pop the pending
+% output off the stack, append any needed separator, and write it.
+%
+% To tell which separator is needed, we maintain an output.state.
+% It will be one of these values:
+% before.all just after the \bibitem
+% continue.sentence in the middle of a sentence: blank---no
+% comma---needed if more sentence is
+% output (value added by H2B)
+% mid.sentence in the middle of a sentence: comma needed
+% if more sentence is output
+% after.sentence just after a sentence: period needed
+% after.block just after a block (and sentence):
+% period and \newblock needed.
+% Note: These styles don't use after.sentence.
+% This note doesn't apply really (H2B).
+%
+% VAR: output.state : INTEGER -- state variable for output
+%
+% The output.nonnull function saves its argument (assumed to be nonnull)
+% on the stack, and writes the old saved value followed by any needed
+% separator. The ordering of the tests is decreasing frequency of
+% occurrence.
+%
+% output.nonnull(s) ==
+% BEGIN
+% s := argument on stack
+% if output.state = continue.sentence then -- added by H2B
+% write$(pop() * " ") -- dto.
+% -- "pop" isn't a function: just use stack top
+% else
+% if output.state = mid.sentence then
+% write$(pop() * ", ")
+% else
+% if output.state = after.block then
+% write$(add.period$(pop()))
+% newline$
+% write$("\newblock ")
+% else
+% if output.state = before.all then
+% write$(pop())
+% else -- output.state should be after.sentence
+% write$(add.period$(pop()) * " ")
+% fi
+% fi
+% fi
+% output.state := continue.sentence
+% fi
+% push s on stack
+% END
+%
+% The output function calls output.nonnull if its argument is non-empty;
+% its argument may be a missing field (thus, not necessarily a string)
+%
+% output(s) ==
+% BEGIN
+% if not empty$(s) then output.nonnull(s)
+% fi
+% END
+%
+% The output.check function is the same as the output function except that, if
+% necessary, output.check warns the user that the t field shouldn't be empty
+% (this is because it probably won't be a good reference without the field;
+% the entry functions try to make the formatting look reasonable even when
+% such fields are empty).
+%
+% output.check(s,t) ==
+% BEGIN
+% if empty$(s) then
+% warning$("empty " * t * " in " * cite$)
+% else output.nonnull(s)
+% fi
+% END
+%
+% The output.bibitem function writes the \bibitem for the current entry
+% (the label should already have been set up), and sets up the separator
+% state for the output functions. And, it leaves a string on the stack
+% as per the output convention.
+%
+% output.bibitem ==
+% BEGIN
+% newline$
+% write$("\bibitem[") % for alphabetic labels,
+% write$(label) % these three lines
+% write$("]{") % are used
+% write$("\bibitem{") % this line for numeric labels
+% write$(cite$)
+% write$("}")
+% push "" on stack
+% output.state := before.all
+% END
+%
+% The fin.entry function finishes off an entry by adding a period to the
+% string remaining on the stack. If the state is still before.all
+% then nothing was produced for this entry, so the result will look bad,
+% but the user deserves it. (We don't omit the whole entry because the
+% entry was cited, and a bibitem is needed to define the citation label.)
+%
+% fin.entry ==
+% BEGIN
+% write$(add.period$(pop()))
+% newline$
+% END
+%
+% The new.block function prepares for a new block to be output, and
+% new.sentence prepares for a new sentence.
+% Added by H2B was new.clause, that prepares for a new subordinate clause.
+%
+% new.block ==
+% BEGIN
+% if output.state <> before.all then
+% output.state := after.block
+% fi
+% END
+%
+% new.sentence ==
+% BEGIN
+% if output.state <> after.block then
+% if output.state <> before.all then
+% output.state := after.sentence
+% fi
+% fi
+% END
+%
+% new.clause ==
+% BEGIN
+% if output.state <> after.sentence then
+% if output.state <> after.block then
+% if output.state <> before.all then
+% output.state := mid.sentence
+% fi
+% fi
+% fi
+% END
+%
+
+INTEGERS { output.state before.all mid.sentence after.sentence after.block
+ continue.sentence }
+
+FUNCTION {init.state.consts}
+{ #0 'before.all :=
+ #1 'mid.sentence :=
+ #2 'after.sentence :=
+ #3 'after.block :=
+ #4 'continue.sentence :=
+}
+
+% the variables s and t are temporary string holders
+
+STRINGS { s t }
+
+FUNCTION {output.nonnull}
+{ 's :=
+ output.state continue.sentence =
+ { " " * write$ }
+ { output.state mid.sentence =
+ { ", " * write$ }
+ { output.state after.block =
+ { add.period$ write$
+ newline$
+ "\newblock " write$
+ }
+ { output.state before.all =
+ 'write$
+ { add.period$ " " * write$ }
+ if$
+ }
+ if$
+ }
+ if$
+ continue.sentence 'output.state :=
+ }
+ if$
+ s
+}
+
+FUNCTION {output}
+{ duplicate$ empty$
+ 'pop$
+ 'output.nonnull
+ if$
+}
+
+FUNCTION {output.check}
+{ 't :=
+ duplicate$ empty$
+ { pop$ "empty " t * " in " * cite$ * warning$ }
+ 'output.nonnull
+ if$
+}
+
+FUNCTION {output.bibitem}
+{ newline$
+#if LAB_ALPH
+ "\bibitem[" write$
+ label write$
+ "]{" write$
+#else
+ "\bibitem{" write$
+#endif LAB_ALPH
+ cite$ write$
+ "}" write$
+ newline$
+ ""
+ before.all 'output.state :=
+}
+
+% This function finishes all entries.
+
+FUNCTION {fin.entry}
+{ add.period$
+ write$
+ newline$
+}
+
+FUNCTION {new.block}
+{ output.state before.all =
+ 'skip$
+ { after.block 'output.state := }
+ if$
+}
+
+FUNCTION {new.sentence}
+{ output.state after.block =
+ 'skip$
+ { output.state before.all =
+ 'skip$
+ { after.sentence 'output.state := }
+ if$
+ }
+ if$
+}
+
+FUNCTION {new.clause}
+{ output.state after.sentence =
+ 'skip$
+ { output.state after.block =
+ 'skip$
+ { output.state before.all =
+ 'skip$
+ { mid.sentence 'output.state := }
+ if$
+ }
+ if$
+ }
+ if$
+}
+
+% These three functions pop one or two (integer) arguments from the stack
+% and push a single one, either 0 or 1.
+% The 'skip$ in the `and' and `or' functions are used because
+% the corresponding if$ would be idempotent
+
+FUNCTION {not}
+{ { #0 }
+ { #1 }
+ if$
+}
+
+FUNCTION {and}
+{ 'skip$
+ { pop$ #0 }
+ if$
+}
+
+FUNCTION {or}
+{ { pop$ #1 }
+ 'skip$
+ if$
+}
+
+% Sometimes we begin a new block only if the block will be big enough. The
+% new.block.checka function issues a new.block if its argument is nonempty;
+% new.block.checkb does the same if either of its TWO arguments is nonempty.
+
+FUNCTION {new.block.checka}
+{ empty$
+ 'skip$
+ 'new.block
+ if$
+}
+
+FUNCTION {new.block.checkb}
+{ empty$
+ swap$ empty$
+ and
+ 'skip$
+ 'new.block
+ if$
+}
+
+% The new.sentence.check functions are analogous.
+
+FUNCTION {new.sentence.checka}
+{ empty$
+ 'skip$
+ 'new.sentence
+ if$
+}
+
+FUNCTION {new.sentence.checkb}
+{ empty$
+ swap$ empty$
+ and
+ 'skip$
+ 'new.sentence
+ if$
+}
+
+% And the new.clause.check functions, which were added by H2B, also.
+
+FUNCTION {new.clause.checka}
+{ empty$
+ 'skip$
+ 'new.clause
+ if$
+}
+
+FUNCTION {new.clause.checkb}
+{ empty$
+ swap$ empty$
+ and
+ 'skip$
+ 'new.clause
+ if$
+}
+
+% Here are some functions for formatting chunks of an entry.
+% By convention they either produce a string that can be followed by
+% a comma or period (using add.period$, so it is OK to end in a period),
+% or they produce the null string.
+%
+% A useful utility is the field.or.null function, which checks if the
+% argument is the result of pushing a `missing' field (one for which no
+% assignment was made when the current entry was read in from the database)
+% or the result of pushing a string having no non-white-space characters.
+% It returns the null string if so, otherwise it returns the field string.
+% Its main (but not only) purpose is to guarantee that what's left on the
+% stack is a string rather than a missing field.
+%
+% field.or.null(s) ==
+% BEGIN
+% if empty$(s) then return ""
+% else return s
+% END
+%
+% Another helper function is emphasize, which returns the argument emphazised,
+% if that is non-empty, otherwise it returns the null string. Italic
+% corrections aren't used, so this function should be used when punctation
+% will follow the result. In contrast to the last sentence, now italic
+% corrections are always used (H2B).
+%
+% emphasize(s) ==
+% BEGIN
+% if empty$(s) then return ""
+% else return "{\em " * s * "\/}"
+% END
+%
+% Similar to emphasize is capitalize, from which the argument comes out in
+% small caps. This function was added by H2B.
+%
+% capitalize(s) ==
+% BEGIN
+% if empty$(s) then return ""
+% else return "{\sc " * s * "}"
+% END
+%
+% And here is another such function---added by H2B---, that returns a boldface
+% string.
+%
+% boldface(s) ==
+% BEGIN
+% if empty$(s) then return ""
+% else return "{\bf " * s * "}"
+% END
+%
+% The function quote will put its argument string in quotes (added by H2B).
+%
+% quote(s) ==
+% BEGIN
+% if empty$(s) then return ""
+% else return "``" * s * "''"
+% END
+%
+% And parentheses includes it in parentheses (added by H2B).
+%
+% parentheses(s) ==
+% BEGIN
+% if empty$(s) then return ""
+% else return "(" * s * ")"
+% END
+%
+% The format.names function formats the argument (which should be in
+% BibTeX name format) into "First Von Last, Junior", separated by commas
+% and with an "and" before the last (but ending with "et~al." if the last
+% of multiple authors is "others"). This function's argument should always
+% contain at least one name.
+%
+% VAR: nameptr, namesleft, numnames: INTEGER
+% pseudoVAR: nameresult: STRING (it's what's accumulated on the stack)
+%
+% format.names(s) ==
+% BEGIN
+% nameptr := 1
+% numnames := num.names$(s)
+% namesleft := numnames
+% while namesleft > 0
+% do
+% % for full names:
+% t := format.name$(s, nameptr, "{ff~}{vv~}{ll}{, jj}")
+% % for abbreviated first names:
+% t := format.name$(s, nameptr, "{f.~}{vv~}{ll}{, jj}")
+% if nameptr > 1 then
+% if namesleft > 1 then nameresult := nameresult * ", " * t
+% else if numnames > 2
+% then nameresult := nameresult * ","
+% fi
+% if t = "others"
+% then nameresult := nameresult * " et~al."
+% else nameresult := nameresult * " and " * t
+% fi
+% fi
+% else nameresult := t
+% fi
+% nameptr := nameptr + 1
+% namesleft := namesleft - 1
+% od
+% return nameresult
+% END
+%
+% The format.authors function returns the result of format.names(author)
+% if the author is present, or else it returns the null string.
+% Capitalization of names added by H2B.
+%
+% format.authors ==
+% BEGIN
+% if empty$(author) then return ""
+% else return capitalize(format.names(author))
+% fi
+% END
+%
+% Format.editors is like format.authors, but it uses the editor field,
+% and appends ", editor" or ", editors".
+% Capitalization of names added by H2B.
+%
+% format.editors ==
+% BEGIN
+% if empty$(editor) then return ""
+% else
+% if num.names$(editor) > 1 then
+% return capitalize(format.names(editor)) * ", editors"
+% else
+% return capitalize(format.names(editor)) * ", editor"
+% fi
+% fi
+% END
+%
+% Other formatting functions are similar, so no "comment version" will be
+% given for them.
+%
+% The `pop$' in this function gets rid of the duplicate `empty' value and
+% the `skip$' returns the duplicate field value
+
+FUNCTION {field.or.null}
+{ duplicate$ empty$
+ { pop$ "" }
+ 'skip$
+ if$
+}
+
+FUNCTION {emphasize}
+{ duplicate$ empty$
+ { pop$ "" }
+ { "\abtype{2}{" swap$ * "}" * } %H2B
+ if$
+}
+
+FUNCTION {capitalize}
+{ duplicate$ empty$
+ { pop$ "" }
+ { "\abtype{0}{" swap$ * "}" * } %H2B
+ if$
+}
+
+FUNCTION {boldface}
+{ duplicate$ empty$
+ { pop$ "" }
+ { "\abtype{3}{" swap$ * "}" * } %H2B
+ if$
+}
+
+FUNCTION {quote}
+{ duplicate$ empty$
+ { pop$ "" }
+ { "\abtype{1}{" swap$ * "}" * } %H2B
+ if$
+}
+
+FUNCTION {parentheses}
+{ duplicate$ empty$
+ { pop$ "" }
+ { "\abtype{5}{" swap$ * "}" * } %H2B
+ if$
+}
+
+INTEGERS { nameptr namesleft numnames }
+
+FUNCTION {format.names}
+{ 's :=
+ #1 'nameptr :=
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+#if NAME_FULL
+ { s nameptr "{ff~}{vv~}{ll}{, jj}" format.name$ 't :=
+#else
+ { s nameptr "{f.~}{vv~}{ll}{, jj}" format.name$ 't :=
+#endif NAME_FULL
+ nameptr #1 >
+ { namesleft #1 >
+ { ", " * t * }
+ { numnames #2 >
+ { "\abphrase{1}" * } %H2B
+ 'skip$
+ if$
+ t "others" =
+ { "\abphrase{2}" * } %H2B
+ { "\abphrase{0}" * t * } %H2B
+ if$
+ }
+ if$
+ }
+ 't
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+}
+
+FUNCTION {format.authors}
+{ author empty$
+ { "" }
+ { author format.names capitalize }
+ if$
+}
+
+FUNCTION {format.editors}
+{ editor empty$
+ { "" }
+ { editor format.names capitalize
+ editor num.names$ #1 >
+ { "\abphrase{3}" * } %H2B
+ { "\abphrase{4}" * } %H2B
+ if$
+ }
+ if$
+}
+
+% The format.title function is used for non-book-like titles.
+% For most styles we convert to lowercase (except for the very first letter,
+% and except for the first one after a colon (followed by whitespace)),
+% and hope the user has brace-surrounded words that need to stay capitilized;
+% for some styles, however, we leave it as it is in the database.
+
+FUNCTION {format.title}
+{ title empty$
+ { "" }
+#if ATIT_LOWER
+ { title "t" change.case$ }
+#else
+ 'title
+#endif ATIT_LOWER
+ if$
+}
+
+% By default, BibTeX sets the global integer variable global.max$ to the BibTeX
+% constant glob_str_size, the maximum length of a global string variable.
+% Analogously, BibTeX sets the global integer variable entry.max$ to
+% ent_str_size, the maximum length of an entry string variable.
+% The style designer may change these if necessary (but this is unlikely)
+
+% The n.dashify function makes each single `-' in a string a double `--'
+% if it's not already
+%
+% pseudoVAR: pageresult: STRING (it's what's accumulated on the stack)
+%
+% n.dashify(s) ==
+% BEGIN
+% t := s
+% pageresult := ""
+% while (not empty$(t))
+% do
+% if (first character of t = "-")
+% then
+% if (next character isn't)
+% then
+% pageresult := pageresult * "--"
+% t := t with the "-" removed
+% else
+% while (first character of t = "-")
+% do
+% pageresult := pageresult * "-"
+% t := t with the "-" removed
+% od
+% fi
+% else
+% pageresult := pageresult * the first character
+% t := t with the first character removed
+% fi
+% od
+% return pageresult
+% END
+
+FUNCTION {n.dashify}
+{ 't :=
+ ""
+ { t empty$ not }
+ { t #1 #1 substring$ "-" =
+ { t #1 #2 substring$ "--" = not
+ { "--" *
+ t #2 global.max$ substring$ 't :=
+ }
+ { { t #1 #1 substring$ "-" = }
+ { "-" *
+ t #2 global.max$ substring$ 't :=
+ }
+ while$
+ }
+ if$
+ }
+ { t #1 #1 substring$ *
+ t #2 global.max$ substring$ 't :=
+ }
+ if$
+ }
+ while$
+}
+
+% The format.date function is for the month and year, but we give a warning if
+% there's an empty year but the month is there, and we return the empty string
+% if they're both empty.
+% The resulting string is enclosed in parentheses (H2B).
+
+FUNCTION {format.date}
+{ year empty$
+ { month empty$
+ { "" }
+ { "there's a month but no year in " cite$ * warning$
+ month parentheses
+ }
+ if$
+ }
+ { month empty$
+ { year parentheses }
+ { month " " * year * parentheses }
+ if$
+ }
+ if$
+}
+
+% The format.btitle is for formatting the title field when it is a book-like
+% entry---the style used here keeps it in uppers-and-lowers and emphasizes it.
+% The emphasis will be done by quotation marks (H2B).
+
+FUNCTION {format.btitle}
+{ title quote
+}
+
+% For several functions we'll need to connect two strings with a
+% tie (~) if the second one isn't very long (fewer than 3 characters).
+% The tie.or.space.connect function does that. It concatenates the two
+% strings on top of the stack, along with either a tie or space between
+% them, and puts this concatenation back onto the stack:
+%
+% tie.or.space.connect(str1,str2) ==
+% BEGIN
+% if text.length$(str2) < 3
+% then return the concatenation of str1, "~", and str2
+% else return the concatenation of str1, " ", and str2
+% END
+
+FUNCTION {tie.or.space.connect}
+{ duplicate$ text.length$ #3 <
+ { "~" }
+ { " " }
+ if$
+ swap$ * *
+}
+
+% The either.or.check function complains if both fields or an either-or pair
+% are nonempty.
+%
+% either.or.check(t,s) ==
+% BEGIN
+% if empty$(s) then
+% warning$(can't use both " * t * " fields in " * cite$)
+% fi
+% END
+
+FUNCTION {either.or.check}
+{ empty$
+ 'pop$
+ { "can't use both " swap$ * " fields in " * cite$ * warning$ }
+ if$
+}
+
+% The format.bvolume function is for formatting the volume and perhaps
+% series name of a multivolume work. If both a volume and a series field
+% are there, we assume the series field is the title of the whole multivolume
+% work (the title field should be the title of the thing being referred to),
+% and we add an "of <series>". This function is called in mid-sentence.
+% The emphasis will be done by quotation marks (H2B).
+
+FUNCTION {format.bvolume}
+{ volume empty$
+ { "" }
+ { "\abphrase{8}" volume tie.or.space.connect %H2B
+ series empty$
+ 'skip$
+ { "\abphrase{5}" * series quote * } %H2B
+ if$
+ "volume and number" number either.or.check
+ }
+ if$
+}
+
+% The format.number.series function is for formatting the series name
+% and perhaps number of a work in a series. This function is similar to
+% format.bvolume, although for this one the series must exist (and the
+% volume must not exist). If the number field is empty we output either
+% the series field unchanged if it exists or else the null string.
+% If both the number and series fields are there we assume the series field
+% gives the name of the whole series (the title field should be the title
+% of the work being one referred to), and we add an "in <series>".
+% We capitilize Number when this function is used at the beginning of a block.
+% The latter applies if output.state is mid.sentence or continue.sentence
+% (H2B).
+
+FUNCTION {format.number.series}
+{ volume empty$
+ { number empty$
+ { series field.or.null }
+ { output.state mid.sentence = output.state continue.sentence = or
+ { "\abphrase{10}" } %H2B
+ { "\abphrase{11}" } %H2B
+ if$
+ number tie.or.space.connect
+ series empty$
+ { "there's a number but no series in " cite$ * warning$ }
+ { "\abphrase{6}" * series * } %H2B
+ if$
+ }
+ if$
+ }
+ { "" }
+ if$
+}
+
+% The format.edition function appends " edition" to the edition, if present.
+% We lowercase the edition (it should be something like "Third"), because
+% this doesn't start a sentence.
+% The latter applies if output.state is mid.sentence or continue.sentence
+% (H2B).
+
+FUNCTION {format.edition}
+{ edition empty$
+ { "" }
+ { output.state mid.sentence = output.state continue.sentence = or
+ { edition "l" change.case$ "\abphrase{12}" * } %H2B
+ { edition "t" change.case$ "\abphrase{12}" * } %H2B
+ if$
+ }
+ if$
+}
+
+% The format.pages function is used for formatting a page range in a book
+% (and in rare circumstances, an article).
+%
+% The multi.page.check function examines the page field for a "-" or "," or "+"
+% so that format.pages can use "page" instead of "pages" if none exists.
+% Note: global.max$ here means "take the rest of the string"
+%
+% VAR: multiresult: INTEGER (actually, a boolean)
+%
+% multi.page.check(s) ==
+% BEGIN
+% t := s
+% multiresult := false
+% while ((not multiresult) and (not empty$(t)))
+% do
+% if (first character of t = "-" or "," or "+")
+% then multiresult := true
+% else t := t with the first character removed
+% fi
+% od
+% return multiresult
+% END
+
+INTEGERS { multiresult }
+
+FUNCTION {multi.page.check}
+{ 't :=
+ #0 'multiresult :=
+ { multiresult not
+ t empty$ not
+ and
+ }
+ { t #1 #1 substring$
+ duplicate$ "-" =
+ swap$ duplicate$ "," =
+ swap$ "+" =
+ or or
+ { #1 'multiresult := }
+ { t #2 global.max$ substring$ 't := }
+ if$
+ }
+ while$
+ multiresult
+}
+
+% This function doesn't begin a sentence so "pages" isn't capitalized.
+% Other functions that use this should keep that in mind.
+
+FUNCTION {format.pages}
+{ pages empty$
+ { "" }
+ { pages multi.page.check
+ { "\abphrase{13}" pages n.dashify tie.or.space.connect } %H2B
+ { "\abphrase{14}" pages tie.or.space.connect } %H2B
+ if$
+ }
+ if$
+}
+
+% The format.vol.num.pages function is for the volume, number, and page range
+% of a journal article. We use the format: vol(number):pages, with some
+% variations for empty fields. This doesn't begin a sentence.
+% The format was changed to `vol(number), pages', where the `vol' comes out in
+% boldface, by H2B.
+
+FUNCTION {format.vol.num.pages}
+{ volume field.or.null boldface
+ number empty$
+ 'skip$
+ { "\abtype{4}{" number * "}" * * %H2B
+ volume empty$
+ { "there's a number but no volume in " cite$ * warning$ }
+ 'skip$
+ if$
+ }
+ if$
+ pages empty$
+ 'skip$
+ { duplicate$ empty$
+ { pop$ format.pages }
+ { ", " * pages n.dashify * }
+ if$
+ }
+ if$
+}
+
+
+% The format.chapter.pages, if the chapter is present, puts whatever is in the
+% type field (or else "chapter" if type is empty) in front of a chapter number.
+% It then appends the pages, if present. This doesn't begin a sentence.
+
+FUNCTION {format.chapter.pages}
+{ chapter empty$
+ 'format.pages
+ { type empty$
+ { "\abphrase{15}" } %H2B
+ { type "l" change.case$ }
+ if$
+ chapter tie.or.space.connect
+ pages empty$
+ 'skip$
+ { ", " * format.pages * }
+ if$
+ }
+ if$
+}
+
+% The format.in.ed.booktitle function is used for starting out a sentence
+% that begins "In <booktitle>", putting an editor before the title if one
+% exists.
+% The emphasis will be done by quotation marks (H2B).
+
+FUNCTION {format.in.ed.booktitle}
+{ booktitle empty$
+ { "" }
+ { editor empty$
+ { "\abphrase{7}" booktitle quote * } %H2B
+ { "\abphrase{7}" format.editors * ", " * booktitle quote * } %H2B
+ if$
+ }
+ if$
+}
+
+% The function empty.misc.check complains if all six fields are empty, and
+% if there's been no sorting or alphabetic-label complaint.
+
+FUNCTION {empty.misc.check}
+{ author empty$ title empty$ howpublished empty$
+ month empty$ year empty$ note empty$
+ and and and and and
+#if SORTED
+ key empty$ not and
+#else !SORTED
+#if LAB_ALPH
+ key empty$ not and
+#endif LAB_ALPH
+#endif SORTED
+ { "all relevant fields are empty in " cite$ * warning$ }
+ 'skip$
+ if$
+}
+
+% The function format.thesis.type returns either the (case-changed) type field,
+% if it is defined, or else the default string already on the stack
+% (like "Master's thesis" or "PhD thesis").
+
+FUNCTION {format.thesis.type}
+{ type empty$
+ 'skip$
+ { pop$
+ type "t" change.case$
+ }
+ if$
+}
+
+% The function format.tr.number makes a string starting with "Technical Report"
+% (or type, if that field is defined), followed by the number if there is one;
+% it returns the starting part (with a case change) even if there is no number.
+% This is used at the beginning of a sentence.
+
+FUNCTION {format.tr.number}
+{ type empty$
+ { "\abphrase{16}" } %H2B
+ 'type
+ if$
+ number empty$
+ { "t" change.case$ }
+ { number tie.or.space.connect }
+ if$
+}
+
+% Now come the cross-referencing functions (these are invoked because
+% one entry in the database file(s) cross-references another, by giving
+% the other entry's database key in a `crossref' field). This feature
+% allows one or more titled things that are part of a larger titled
+% thing to cross-reference the larger thing. These styles allow for
+% five posibilities: (1) an ARTICLE may cross-reference an ARTICLE;
+% (2) a BOOK, (3) INBOOK, or (4) INCOLLECTION may cross-reference a BOOK;
+% or (5) an INPROCEEDINGS may cross-reference a PROCEEDINGS.
+% Each of these is explained in more detail later.
+%
+% An ARTICLE entry type may cross reference another ARTICLE (this is
+% intended for when an entire journal is devoted to a single topic---
+% but since there is no JOURNAL entry type, the journal, too, should be
+% classified as an ARTICLE but without the author and title fields).
+% This will result in two warning messages for the journal's entry
+% if it's included in the reference list, but such is life.
+% In the original true function the emphasis with italic correction had been
+% made by inserting the necessary TeX control sequences directly; this is
+% substituted by a call to emphasize (H2B).
+%
+% format.article.crossref ==
+% BEGIN
+% if empty$(key) then
+% if empty$(journal) then
+% warning$("need key or journal for " * cite$ *
+% " to crossref " * crossref)
+% return(" \cite{" * crossref * "}")
+% else
+% return("In " * emphazise.correct (journal) *
+% " \cite{" * crossref * "}")
+% fi
+% else
+% return("In " * key * " \cite{" * crossref * "}")
+% fi
+% END
+%
+% The other cross-referencing functions are similar, so no "comment version"
+% will be given for them.
+
+FUNCTION {format.article.crossref}
+{ key empty$
+ { journal empty$
+ { "need key or journal for " cite$ * " to crossref " * crossref *
+ warning$
+ ""
+ }
+ { "\abphrase{7}" journal emphasize * } %H2B
+ if$
+ }
+ { "\abphrase{7}" key * } %H2B
+ if$
+ " \cite{" * crossref * "}" *
+}
+
+% We use just the last names of editors for a cross reference: either
+% "editor", or "editor1 and editor2", or "editor1 et~al." depending on
+% whether there are one, or two, or more than two editors.
+
+FUNCTION {format.crossref.editor}
+{ editor #1 "{vv~}{ll}" format.name$
+ editor num.names$ duplicate$
+ #2 >
+ { pop$ "\abphrase{2}" * } %H2B
+ { #2 <
+ 'skip$
+ { editor #2 "{ff }{vv }{ll}{ jj}" format.name$ "others" =
+ { "\abphrase{2}" * } %H2B
+ { "\abphrase{0}" * editor #2 "{vv~}{ll}" format.name$ * } %H2B
+ if$
+ }
+ if$
+ }
+ if$
+}
+
+% A BOOK (or INBOOK) entry type (assumed to be for a single volume in a
+% multivolume work) may cross reference another BOOK (the entire multivolume).
+% Usually there will be an editor, in which case we use that to construct the
+% cross reference; otherwise we use a nonempty key field or else the series
+% field (since the series gives the title of the multivolume work).
+% The series title is enclosed in quotes rather than emphasized (H2B).
+
+FUNCTION {format.book.crossref}
+{ volume empty$
+ { "empty volume in " cite$ * "'s crossref of " * crossref * warning$
+ "\abphrase{7}" %H2B
+ }
+ { "\abphrase{9}" volume tie.or.space.connect %H2B
+ "\abphrase{5}" * %H2B
+ }
+ if$
+ editor empty$
+ editor field.or.null author field.or.null =
+ or
+ { key empty$
+ { series empty$
+ { "need editor, key, or series for " cite$ * " to crossref " *
+ crossref * warning$
+ "" *
+ }
+ { series quote * }
+ if$
+ }
+ { key * }
+ if$
+ }
+ { format.crossref.editor * }
+ if$
+ " \cite{" * crossref * "}" *
+}
+
+% An INCOLLECTION entry type may cross reference a BOOK (assumed to be the
+% collection), or an INPROCEEDINGS may cross reference a PROCEEDINGS.
+% Often there will be an editor, in which case we use that to construct
+% the cross reference; otherwise we use a nonempty key field or else
+% the booktitle field (which gives the cross-referenced work's title).
+% The booktitle is enclosed in quotes rather than emphasized (H2B).
+
+FUNCTION {format.incoll.inproc.crossref}
+{ editor empty$
+ editor field.or.null author field.or.null =
+ or
+ { key empty$
+ { booktitle empty$
+ { "need editor, key, or booktitle for " cite$ * " to crossref " *
+ crossref * warning$
+ ""
+ }
+ { "\abphrase{7}" booktitle quote * } %H2B
+ if$
+ }
+ { "\abphrase{7}" key * } %H2B
+ if$
+ }
+ { "\abphrase{7}" format.crossref.editor * } %H2B
+ if$
+ " \cite{" * crossref * "}" *
+}
+
+% Now we define the type functions for all entry types that may appear
+% in the .BIB file---e.g., functions like `article' and `book'. These
+% are the routines that actually generate the .BBL-file output for
+% the entry. These must all precede the READ command. In addition, the
+% style designer should have a function `default.type' for unknown types.
+% Note: The fields (within each list) are listed in order of appearance,
+% except as described for an `inbook' or a `proceedings'.
+%
+% The article function is for an article in a journal. An article may
+% CROSSREF another article.
+% Required fields: author, title, journal, year
+% Optional fields: volume, number, pages, month, note
+%
+% article ==
+% BEGIN
+% output.bibitem
+% output.check(format.authors,"author")
+% new.block
+% output.check(format.title,"title") % omitted if NO_TITLE (H2B)
+% new.block % dto.
+% if missing$(crossref) then
+% output.check(emphasize(journal),"journal")
+% % italic correction added (H2B)
+% output(format.vol.num.pages)
+% output.check(format.date,"year")
+% else
+% output.nonnull(format.article.crossref)
+% new.clause % added by H2B
+% output(format.pages)
+% fi
+% new.block
+% output(note)
+% fin.entry
+% END
+%
+% The book function is for a whole book. A book may CROSSREF another book.
+% Required fields: author or editor, title, publisher, year
+% Optional fields: volume or number, series, address, edition, month,
+% note
+%
+% book ==
+% BEGIN
+% if empty$(author) then output.check(format.editors,"author and editor")
+% else output.check(format.authors,"author")
+% if missing$(crossref) then
+% either.or.check("author and editor",editor)
+% fi
+% fi
+% new.block
+% output.check(format.btitle,"title")
+% if missing$(crossref) then
+% new.clause % added by H2B
+% output(format.bvolume)
+% new.block
+% output(format.number.series)
+% new.sentence
+% output.check(publisher,"publisher")
+% new.clause.checka(address) % added by H2B
+% output(address)
+% else
+% new.block
+% output.nonnull(format.book.crossref)
+% fi
+% edition new.clause.checka % added by H2B
+% output(format.edition)
+% output.check(format.date,"year")
+% new.block
+% output(note)
+% fin.entry
+% END
+%
+% The other entry functions are all quite similar, so no "comment version"
+% will be given for them.
+
+FUNCTION {article}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+#if !NO_TITLE
+ format.title "title" output.check
+ new.block
+#endif
+ crossref missing$
+ { journal emphasize "journal" output.check
+ format.vol.num.pages output
+ format.date "year" output.check
+ }
+ { format.article.crossref output.nonnull
+ new.clause
+ format.pages output
+ }
+ if$
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {book}
+{ output.bibitem
+ author empty$
+ { format.editors "author and editor" output.check }
+ { format.authors output.nonnull
+ crossref missing$
+ { "author and editor" editor either.or.check }
+ 'skip$
+ if$
+ }
+ if$
+ new.block
+ format.btitle "title" output.check
+ crossref missing$
+ { new.clause
+ format.bvolume output
+ new.block
+ format.number.series output
+ new.sentence
+ publisher "publisher" output.check
+ address new.clause.checka
+ address output
+ }
+ { new.block
+ format.book.crossref output.nonnull
+ }
+ if$
+ edition new.clause.checka
+ format.edition output
+ format.date "year" output.check
+ new.block
+ note output
+ fin.entry
+}
+
+% A booklet is a bound thing without a publisher or sponsoring institution.
+% Required: title
+% Optional: author, howpublished, address, month, year, note
+
+FUNCTION {booklet}
+{ output.bibitem
+ format.authors output
+ new.block
+ format.title "title" output.check
+ howpublished address new.block.checkb
+ howpublished output
+ address new.clause.checka
+ address output
+ format.date output
+ new.block
+ note output
+ fin.entry
+}
+
+% For the conference entry type, see inproceedings.
+
+% An inbook is a piece of a book: either a chapter and/or a page range.
+% It may CROSSREF a book. If there's no volume field, the type field
+% will come before number and series.
+% Required: author or editor, title, chapter and/or pages, publisher,year
+% Optional: volume or number, series, type, address, edition, month, note
+
+FUNCTION {inbook}
+{ output.bibitem
+ author empty$
+ { format.editors "author and editor" output.check }
+ { format.authors output.nonnull
+ crossref missing$
+ { "author and editor" editor either.or.check }
+ 'skip$
+ if$
+ }
+ if$
+ new.block
+ format.btitle "title" output.check
+ new.clause
+ crossref missing$
+ { format.bvolume output
+ new.clause
+ format.chapter.pages "chapter and pages" output.check
+ new.block
+ format.number.series output
+ new.sentence
+ publisher "publisher" output.check
+ address new.clause.checka
+ address output
+ }
+ { format.chapter.pages "chapter and pages" output.check
+ new.block
+ format.book.crossref output.nonnull
+ }
+ if$
+ edition new.clause.checka
+ format.edition output
+ format.date "year" output.check
+ new.block
+ note output
+ fin.entry
+}
+
+% An incollection is like inbook, but where there is a separate title
+% for the referenced thing (and perhaps an editor for the whole).
+% An incollection may CROSSREF a book.
+% Required: author, title, booktitle, publisher, year
+% Optional: editor, volume or number, series, type, chapter, pages,
+% address, edition, month, note
+% For the NO_TITLE option the title is suppressed, if the chapter or the pages
+% field is nonempty (H2B).
+
+FUNCTION {incollection}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+#if NO_TITLE
+ chapter empty$ pages empty$ and
+ {
+#endif
+ format.title "title" output.check
+ new.block
+#if NO_TITLE
+ }
+ 'skip$
+ if$
+#endif
+ crossref missing$
+ { format.in.ed.booktitle "booktitle" output.check
+ new.clause
+ format.bvolume output
+ new.clause
+ format.number.series output
+ new.clause
+ format.chapter.pages output
+ new.sentence
+ publisher "publisher" output.check
+ address new.clause.checka
+ address output
+ edition new.clause.checka
+ format.edition output
+ format.date "year" output.check
+ }
+ { format.incoll.inproc.crossref output.nonnull
+ new.clause
+ format.chapter.pages output
+ }
+ if$
+ new.block
+ note output
+ fin.entry
+}
+
+% An inproceedings is an article in a conference proceedings, and it may
+% CROSSREF a proceedings. If there's no address field, the month (& year)
+% will appear just before note.
+% Required: author, title, booktitle, year
+% Optional: editor, volume or number, series, pages, address, month,
+% organization, publisher, note
+% For the NO_TITLE option the title is suppressed, if the pages field is
+% nonempty (H2B).
+
+FUNCTION {inproceedings}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+#if NO_TITLE
+ pages empty$
+ {
+#endif
+ format.title "title" output.check
+ new.block
+#if NO_TITLE
+ }
+ 'skip$
+ if$
+#endif
+ crossref missing$
+ { format.in.ed.booktitle "booktitle" output.check
+ volume new.clause.checka
+ format.bvolume output
+ number series new.clause.checkb
+ format.number.series output
+ pages new.clause.checka
+ format.pages output
+ address empty$
+ { organization publisher new.sentence.checkb
+ organization output
+ publisher new.clause.checka
+ publisher output
+ format.date "year" output.check
+ }
+ { new.clause
+ address output.nonnull
+ format.date "year" output.check
+ new.sentence
+ organization output
+ new.clause
+ publisher output
+ }
+ if$
+ }
+ { format.incoll.inproc.crossref output.nonnull
+ new.clause
+ format.pages output
+ }
+ if$
+ new.block
+ note output
+ fin.entry
+}
+
+% The conference function is included for Scribe compatibility.
+
+FUNCTION {conference} { inproceedings }
+
+% A manual is technical documentation.
+% Required: title
+% Optional: author, organization, address, edition, month, year, note
+
+FUNCTION {manual}
+{ output.bibitem
+ author empty$
+ { organization empty$
+ 'skip$
+ { organization output.nonnull
+ new.clause
+ address output
+ }
+ if$
+ }
+ { format.authors output.nonnull }
+ if$
+ new.block
+ format.btitle "title" output.check
+ author empty$
+ { organization empty$
+ { address new.block.checka
+ address output
+ }
+ 'skip$
+ if$
+ }
+ { organization address new.block.checkb
+ organization output
+ address new.clause.checka
+ address output
+ }
+ if$
+ edition new.clause.checka
+ format.edition output
+ format.date output
+ new.block
+ note output
+ fin.entry
+}
+
+% A mastersthesis is a Master's thesis.
+% Required: author, title, school, year
+% Optional: type, address, month, note
+
+FUNCTION {mastersthesis}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.title "title" output.check
+ new.block
+ "\abphrase{17}" format.thesis.type output.nonnull %H2B
+ new.clause
+ school "school" output.check
+ address new.clause.checka
+ address output
+ format.date "year" output.check
+ new.block
+ note output
+ fin.entry
+}
+
+% A misc is something that doesn't fit elsewhere.
+% Required: at least one of the `optional' fields
+% Optional: author, title, howpublished, month, year, note
+
+FUNCTION {misc}
+{ output.bibitem
+ format.authors output
+ title howpublished new.block.checkb
+ format.title output
+ howpublished new.block.checka
+ howpublished output
+ format.date output
+ new.block
+ note output
+ fin.entry
+ empty.misc.check
+}
+
+% A phdthesis is like a mastersthesis.
+% Required: author, title, school, year
+% Optional: type, address, month, note
+
+FUNCTION {phdthesis}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.btitle "title" output.check
+ new.block
+ "\abphrase{18}" format.thesis.type output.nonnull %H2B
+ new.clause
+ school "school" output.check
+ address new.clause.checka
+ address output
+ format.date "year" output.check
+ new.block
+ note output
+ fin.entry
+}
+
+% A proceedings is a conference proceedings.
+% If there is an organization but no editor field, the organization will
+% appear as the first optional field (we try to make the first block nonempty);
+% if there's no address field, the month (& year) will appear just before note.
+% Required: title, year
+% Optional: editor, volume or number, series, address, month,
+% organization, publisher, note
+
+FUNCTION {proceedings}
+{ output.bibitem
+ editor empty$
+ { organization output }
+ { format.editors output.nonnull }
+ if$
+ new.block
+ format.btitle "title" output.check
+ volume new.clause.checka
+ format.bvolume output
+ number series new.clause.checkb
+ format.number.series output
+ address empty$
+ { editor empty$
+ { publisher new.sentence.checka }
+ { organization publisher new.sentence.checkb
+ organization output
+ publisher new.clause.checka
+ }
+ if$
+ publisher output
+ format.date "year" output.check
+ }
+ { new.clause
+ address output.nonnull
+ format.date "year" output.check
+ new.sentence
+ editor empty$
+ 'skip$
+ { organization output
+ new.clause
+ }
+ if$
+ publisher output
+ }
+ if$
+ new.block
+ note output
+ fin.entry
+}
+
+% A techreport is a technical report.
+% Required: author, title, institution, year
+% Optional: type, number, address, month, note
+% For the NO_TITLE option the title is suppressed, if the number field is
+% nonempty (H2B).
+
+FUNCTION {techreport}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+#if NO_TITLE
+ number empty$
+ {
+#endif
+ format.title "title" output.check
+ new.block
+#if NO_TITLE
+ }
+ 'skip$
+ if$
+#endif
+ format.tr.number output.nonnull
+ new.clause
+ institution "institution" output.check
+ address new.clause.checka
+ address output
+ format.date "year" output.check
+ new.block
+ note output
+ fin.entry
+}
+
+% An unpublished is something that hasn't been published.
+% Required: author, title, note
+% Optional: month, year
+
+FUNCTION {unpublished}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.title "title" output.check
+ new.block
+ note "note" output.check
+ format.date output
+ fin.entry
+}
+
+% We use entry type `misc' for an unknown type; BibTeX gives a warning.
+
+FUNCTION {default.type} { misc }
+
+% Here are macros for common things that may vary from style to style.
+% Users are encouraged to use these macros.
+%
+% Months are either written out in full or abbreviated
+%
+% The macros for the month names now expand to TeX macros, so they are
+% adaptable too. Thus no conditional MONTH_FULL is needed anymore (H2B).
+%
+% The \abmonth macro should be defined by the user as something like:
+% \def\abmonth#1{\ifcase#1\or January\or February\or March\or April\or May\or
+% June\or July\or August\or September\or October\or November\or December\fi}
+
+MACRO {jan} {"\abmonth{1}"}
+
+MACRO {feb} {"\abmonth{2}"}
+
+MACRO {mar} {"\abmonth{3}"}
+
+MACRO {apr} {"\abmonth{4}"}
+
+MACRO {may} {"\abmonth{5}"}
+
+MACRO {jun} {"\abmonth{6}"}
+
+MACRO {jul} {"\abmonth{7}"}
+
+MACRO {aug} {"\abmonth{8}"}
+
+MACRO {sep} {"\abmonth{9}"}
+
+MACRO {oct} {"\abmonth{10}"}
+
+MACRO {nov} {"\abmonth{11}"}
+
+MACRO {dec} {"\abmonth{12}"}
+
+% The next ten macros are provided for edition numbers. For higher numbers the
+% \abedition command should be extended by the user and called directly or---
+% better---via @STRING declarations in the BIB files. The \abedition command
+% to be defined by the user is, e.g.:
+% \def\abedition#1{\ifcase#1\or First\or Second\or Third\or Fourth\or Fifth\or
+% Sixth\or Seventh\or Eighth\or Ninth\or Tenth\else?\fi}
+
+MACRO {first} {"\abedition{1}"}
+
+MACRO {second} {"\abedition{2}"}
+
+MACRO {third} {"\abedition{3}"}
+
+MACRO {fourth} {"\abedition{4}"}
+
+MACRO {fifth} {"\abedition{5}"}
+
+MACRO {sixth} {"\abedition{6}"}
+
+MACRO {seventh} {"\abedition{7}"}
+
+MACRO {eighth} {"\abedition{8}"}
+
+MACRO {ninth} {"\abedition{9}"}
+
+MACRO {tenth} {"\abedition{10}"}
+
+% Finally, some macros are defined to re-dedicate the CHAPTER field via the
+% TYPE field. An appropriate \abchapter command were:
+% \def\abchapter#1{\ifcase#1Section\or Paragraph\or Appendix\or Part\fi}
+
+MACRO {section} {"\abchapter{0}"}
+
+MACRO {paragraph} {"\abchapter{1}"}
+
+MACRO {appendix} {"\abchapter{2}"}
+
+MACRO {part} {"\abchapter{3}"}
+
+% Journals are either written out in full or abbreviated;
+% the abbreviations are like those found in ACM publications.
+%
+% To get a completely different set of abbreviations, it may be best to make
+% a separate .bib file with nothing but those abbreviations; users could then
+% include that file name as the first argument to the \bibliography command.
+%
+% All journal macros were commented off, because the set applies only to a
+% very special field of sciences; so the hint in the previous paragraph
+% becomes mandatory (H2B).
+
+% #if JOUR_FULL
+%
+% MACRO {acmcs} {"ACM Computing Surveys"}
+%
+% MACRO {acta} {"Acta Informatica"}
+%
+% MACRO {cacm} {"Communications of the ACM"}
+%
+% MACRO {ibmjrd} {"IBM Journal of Research and Development"}
+%
+% MACRO {ibmsj} {"IBM Systems Journal"}
+%
+% MACRO {ieeese} {"IEEE Transactions on Software Engineering"}
+%
+% MACRO {ieeetc} {"IEEE Transactions on Computers"}
+%
+% MACRO {ieeetcad}
+% {"IEEE Transactions on Computer-Aided Design of Integrated Circuits"}
+%
+% MACRO {ipl} {"Information Processing Letters"}
+%
+% MACRO {jacm} {"Journal of the ACM"}
+%
+% MACRO {jcss} {"Journal of Computer and System Sciences"}
+%
+% MACRO {scp} {"Science of Computer Programming"}
+%
+% MACRO {sicomp} {"SIAM Journal on Computing"}
+%
+% MACRO {tocs} {"ACM Transactions on Computer Systems"}
+%
+% MACRO {tods} {"ACM Transactions on Database Systems"}
+%
+% MACRO {tog} {"ACM Transactions on Graphics"}
+%
+% MACRO {toms} {"ACM Transactions on Mathematical Software"}
+%
+% MACRO {toois} {"ACM Transactions on Office Information Systems"}
+%
+% MACRO {toplas} {"ACM Transactions on Programming Languages and Systems"}
+%
+% MACRO {tcs} {"Theoretical Computer Science"}
+%
+% #else !JOUR_FULL
+%
+% MACRO {acmcs} {"ACM Comput. Surv."}
+%
+% MACRO {acta} {"Acta Inf."}
+%
+% MACRO {cacm} {"Commun. ACM"}
+%
+% MACRO {ibmjrd} {"IBM J. Res. Dev."}
+%
+% MACRO {ibmsj} {"IBM Syst.~J."}
+%
+% MACRO {ieeese} {"IEEE Trans. Softw. Eng."}
+%
+% MACRO {ieeetc} {"IEEE Trans. Comput."}
+%
+% MACRO {ieeetcad}
+% {"IEEE Trans. Comput.-Aided Design Integrated Circuits"}
+%
+% MACRO {ipl} {"Inf. Process. Lett."}
+%
+% MACRO {jacm} {"J.~ACM"}
+%
+% MACRO {jcss} {"J.~Comput. Syst. Sci."}
+%
+% MACRO {scp} {"Sci. Comput. Programming"}
+%
+% MACRO {sicomp} {"SIAM J. Comput."}
+%
+% MACRO {tocs} {"ACM Trans. Comput. Syst."}
+%
+% MACRO {tods} {"ACM Trans. Database Syst."}
+%
+% MACRO {tog} {"ACM Trans. Gr."}
+%
+% MACRO {toms} {"ACM Trans. Math. Softw."}
+%
+% MACRO {toois} {"ACM Trans. Office Inf. Syst."}
+%
+% MACRO {toplas} {"ACM Trans. Prog. Lang. Syst."}
+%
+% MACRO {tcs} {"Theoretical Comput. Sci."}
+%
+% #endif JOUR_FULL
+
+% Now we read in the .BIB entries.
+
+READ
+
+% The sortify function converts to lower case after purify$ing; it's
+% used in sorting and in computing alphabetic labels after sorting
+%
+% The chop.word(w,len,s) function returns either s or, if the first len
+% letters of s equals w (this comparison is done in the third line of the
+% function's definition), it returns that part of s after w.
+
+#if SORTED
+
+FUNCTION {sortify}
+{ purify$
+ "l" change.case$
+}
+
+INTEGERS { len }
+
+FUNCTION {chop.word}
+{ 's :=
+ 'len :=
+ s #1 len substring$ =
+ { s len #1 + global.max$ substring$ }
+ 's
+ if$
+}
+
+#else !SORTED
+#if LAB_ALPH
+
+% We need the chop.word stuff for the dubious unsorted-list-with-labels case.
+
+INTEGERS { len }
+
+FUNCTION {chop.word}
+{ 's :=
+ 'len :=
+ s #1 len substring$ =
+ { s len #1 + global.max$ substring$ }
+ 's
+ if$
+}
+
+#endif LAB_ALPH
+#endif SORTED
+
+% This long comment applies only to alphabetic labels
+%
+% The format.lab.names function makes a short label by using the initials of
+% the von and Last parts of the names (but if there are more than four names,
+% (i.e., people) it truncates after three and adds a superscripted "+";
+% it also adds such a "+" if the last of multiple authors is "others").
+% If there is only one name, and its von and Last parts combined have just
+% a single name-token ("Knuth" has a single token, "Brinch Hansen" has two),
+% we take the first three letters of the last name. The boolean
+% et.al.char.used tells whether we've used a superscripted "+", so that we
+% know whether to include a LaTeX macro for it.
+%
+% format.lab.names(s) ==
+% BEGIN
+% numnames := num.names$(s)
+% if numnames > 1 then
+% if numnames > 4 then
+% namesleft := 3
+% else
+% namesleft := numnames
+% nameptr := 1
+% nameresult := ""
+% while namesleft > 0
+% do
+% if (name_ptr = numnames) and
+% format.name$(s, nameptr, "{ff }{vv }{ll}{ jj}") = "others"
+% then nameresult := nameresult * "{\etalchar{+}}"
+% et.al.char.used := true
+% else nameresult := nameresult *
+% format.name$(s, nameptr, "{v{}}{l{}}")
+% nameptr := nameptr + 1
+% namesleft := namesleft - 1
+% od
+% if numnames > 4 then
+% nameresult := nameresult * "{\etalchar{+}}"
+% et.al.char.used := true
+% else
+% t := format.name$(s, 1, "{v{}}{l{}}")
+% if text.length$(t) < 2 then % there's just one name-token
+% nameresult := text.prefix$(format.name$(s,1,"{ll}"),3)
+% else
+% nameresult := t
+% fi
+% fi
+% return nameresult
+% END
+%
+% Exactly what fields we look at in constructing the primary part of the label
+% depends on the entry type; this selectivity (as opposed to, say, always
+% looking at author, then editor, then key) helps ensure that "ignored" fields,
+% as described in the LaTeX book, really are ignored. Note that MISC is part
+% of the deepest `else' clause in the nested part of calc.label; thus, any
+% unrecognized entry type in the database is handled correctly.
+%
+% There is one auxiliary function for each of the four different sequences of
+% fields we use. The first of these functions looks at the author field, and
+% then, if necessary, the key field. The other three functions, which might
+% look at two fields and the key field, are similar, except that the key field
+% takes precedence over the organization field (for labels---not for sorting).
+%
+% The calc.label function calculates the preliminary label of an entry, which
+% is formed by taking three letters of information from the author or editor or
+% key or organization field (depending on the entry type and on what's empty,
+% but ignoring a leading "The " in the organization), and appending the last
+% two characters (digits) of the year. It is an error if the appropriate fields
+% among author, editor, organization, and key are missing, and we use
+% the first three letters of the cite$ in desperation when this happens.
+% The resulting label has the year part, but not the name part, purify$ed
+% (purify$ing the year allows some sorting shenanigans by the user).
+%
+% This function also calculates the version of the label to be used in sorting.
+%
+% The final label may need a trailing 'a', 'b', etc., to distinguish it from
+% otherwise identical labels, but we can't calculated those "extra.label"s
+% until after sorting.
+%
+% calc.label ==
+% BEGIN
+% if type$ = "book" or "inbook" then
+% author.editor.key.label
+% else if type$ = "proceedings" then
+% editor.key.organization.label
+% else if type$ = "manual" then
+% author.key.organization.label
+% else
+% author.key.label
+% fi fi fi
+% label := label * substring$(purify$(field.or.null(year)), -1, 2)
+% % assuming we will also sort, we calculate a sort.label
+% sort.label := sortify(label), but use the last four, not two, digits
+% END
+
+#if LAB_ALPH
+
+INTEGERS { et.al.char.used }
+
+FUNCTION {initialize.et.al.char.used}
+{ #0 'et.al.char.used :=
+}
+
+EXECUTE {initialize.et.al.char.used}
+
+FUNCTION {format.lab.names}
+{ 's :=
+ s num.names$ 'numnames :=
+ numnames #1 >
+ { numnames #4 >
+ { #3 'namesleft := }
+ { numnames 'namesleft := }
+ if$
+ #1 'nameptr :=
+ ""
+ { namesleft #0 > }
+ { nameptr numnames =
+ { s nameptr "{ff }{vv }{ll}{ jj}" format.name$ "others" =
+ { "{\etalchar{+}}" *
+ #1 'et.al.char.used :=
+ }
+ { s nameptr "{v{}}{l{}}" format.name$ * }
+ if$
+ }
+ { s nameptr "{v{}}{l{}}" format.name$ * }
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+ numnames #4 >
+ { "{\etalchar{+}}" *
+ #1 'et.al.char.used :=
+ }
+ 'skip$
+ if$
+ }
+ { s #1 "{v{}}{l{}}" format.name$
+ duplicate$ text.length$ #2 <
+ { pop$ s #1 "{ll}" format.name$ #3 text.prefix$ }
+ 'skip$
+ if$
+ }
+ if$
+}
+
+FUNCTION {author.key.label}
+{ author empty$
+ { key empty$
+#if SORTED
+ { cite$ #1 #3 substring$ }
+#else !SORTED % need warning here because we won't give it later
+ { "for label, need author or key in " cite$ * warning$
+ cite$ #1 #3 substring$
+ }
+#endif SORTED
+ { key #3 text.prefix$ }
+ if$
+ }
+ { author format.lab.names }
+ if$
+}
+
+FUNCTION {author.editor.key.label}
+{ author empty$
+ { editor empty$
+ { key empty$
+#if SORTED
+ { cite$ #1 #3 substring$ }
+#else !SORTED % need warning here because we won't give it later
+ { "for label, need author, editor, or key in " cite$ * warning$
+ cite$ #1 #3 substring$
+ }
+#endif SORTED
+ { key #3 text.prefix$ }
+ if$
+ }
+ { editor format.lab.names }
+ if$
+ }
+ { author format.lab.names }
+ if$
+}
+
+FUNCTION {author.key.organization.label}
+{ author empty$
+ { key empty$
+ { organization empty$
+#if SORTED
+ { cite$ #1 #3 substring$ }
+#else !SORTED % need warning here because we won't give it later
+ { "for label, need author, key, or organization in " cite$ *
+ warning$
+ cite$ #1 #3 substring$
+ }
+#endif SORTED
+ { "The " #4 organization chop.word #3 text.prefix$ }
+ if$
+ }
+ { key #3 text.prefix$ }
+ if$
+ }
+ { author format.lab.names }
+ if$
+}
+
+FUNCTION {editor.key.organization.label}
+{ editor empty$
+ { key empty$
+ { organization empty$
+#if SORTED
+ { cite$ #1 #3 substring$ }
+#else !SORTED % need warning here because we won't give it later
+ { "for label, need editor, key, or organization in " cite$ *
+ warning$
+ cite$ #1 #3 substring$
+ }
+#endif SORTED
+ { "The " #4 organization chop.word #3 text.prefix$ }
+ if$
+ }
+ { key #3 text.prefix$ }
+ if$
+ }
+ { editor format.lab.names }
+ if$
+}
+
+FUNCTION {calc.label}
+{ type$ "book" =
+ type$ "inbook" =
+ or
+ 'author.editor.key.label
+ { type$ "proceedings" =
+ 'editor.key.organization.label
+ { type$ "manual" =
+ 'author.key.organization.label
+ 'author.key.label
+ if$
+ }
+ if$
+ }
+ if$
+ duplicate$
+ year field.or.null purify$ #-1 #2 substring$
+ *
+ 'label :=
+ year field.or.null purify$ #-1 #4 substring$
+ *
+ sortify 'sort.label :=
+}
+
+% It doesn't seem like a particularly good idea to use an order-of-citation
+% reference list when using alphabetic labels, but we need to have a
+% special pass to calculate labels when this happens.
+
+#if !SORTED
+
+ITERATE {calc.label}
+
+#endif !SORTED
+
+#endif LAB_ALPH
+
+% When sorting, we compute the sortkey by executing "presort" on each entry.
+% The presort key contains a number of "sortify"ed strings, concatenated
+% with multiple blanks between them. This makes things like "brinch per"
+% come before "brinch hansen per".
+%
+% The fields used here are: the sort.label for alphabetic labels (as set by
+% calc.label), followed by the author names (or editor names or organization
+% (with a leading "The " removed) or key field, depending on entry type and on
+% what's empty), followed by year, followed by the first bit of the title
+% (chopping off a leading "The ", "A ", or "An ").
+% Names are formatted: Von Last First Junior.
+% The names within a part will be separated by a single blank
+% (such as "brinch hansen"), two will separate the name parts themselves
+% (except the von and last), three will separate the names,
+% four will separate the names from year (and from label, if alphabetic),
+% and four will separate year from title.
+%
+% The sort.format.names function takes an argument that should be in
+% BibTeX name format, and returns a string containing " "-separated
+% names in the format described above. The function is almost the same
+% as format.names.
+
+#if SORTED
+
+FUNCTION {sort.format.names}
+{ 's :=
+ #1 'nameptr :=
+ ""
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ { nameptr #1 >
+ { " " * }
+ 'skip$
+ if$
+#if NAME_FULL
+ s nameptr "{vv{ } }{ll{ }}{ ff{ }}{ jj{ }}" format.name$ 't :=
+#else
+ s nameptr "{vv{ } }{ll{ }}{ f{ }}{ jj{ }}" format.name$ 't :=
+#endif NAME_FULL
+ nameptr numnames = t "others" = and
+ { "et al" * }
+ { t sortify * }
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+}
+
+% The sort.format.title function returns the argument,
+% but first any leading "A "'s, "An "'s, or "The "'s are removed.
+% The chop.word function uses s, so we need another string variable, t
+
+FUNCTION {sort.format.title}
+{ 't :=
+ "A " #2
+ "An " #3
+ "The " #4 t chop.word
+ chop.word
+ chop.word
+ sortify
+ #1 global.max$ substring$
+}
+
+% The auxiliary functions here, for the presort function, are analogous to
+% the ones for calc.label; the same comments apply, except that the
+% organization field takes precedence here over the key field. For sorting
+% purposes, we still remove a leading "The " from the organization field.
+
+FUNCTION {author.sort}
+{ author empty$
+ { key empty$
+ { "to sort, need author or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { author sort.format.names }
+ if$
+}
+
+FUNCTION {author.editor.sort}
+{ author empty$
+ { editor empty$
+ { key empty$
+ { "to sort, need author, editor, or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { editor sort.format.names }
+ if$
+ }
+ { author sort.format.names }
+ if$
+}
+
+FUNCTION {author.organization.sort}
+{ author empty$
+ { organization empty$
+ { key empty$
+ { "to sort, need author, organization, or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { "The " #4 organization chop.word sortify }
+ if$
+ }
+ { author sort.format.names }
+ if$
+}
+
+FUNCTION {editor.organization.sort}
+{ editor empty$
+ { organization empty$
+ { key empty$
+ { "to sort, need editor, organization, or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { "The " #4 organization chop.word sortify }
+ if$
+ }
+ { editor sort.format.names }
+ if$
+}
+
+% There is a limit, entry.max$, on the length of an entry string variable
+% (which is what its sort.key$ is), so we take at most that many characters
+% of the constructed key, and hope there aren't many references that match
+% to that many characters!
+
+FUNCTION {presort}
+#if LAB_ALPH
+{ calc.label
+ sort.label
+ " "
+ *
+ type$ "book" =
+#else !LAB_ALPH
+{ type$ "book" =
+#endif LAB_ALPH
+ type$ "inbook" =
+ or
+ 'author.editor.sort
+ { type$ "proceedings" =
+ 'editor.organization.sort
+ { type$ "manual" =
+ 'author.organization.sort
+ 'author.sort
+ if$
+ }
+ if$
+ }
+ if$
+#if LAB_ALPH
+ *
+#endif LAB_ALPH
+ " "
+ *
+ year field.or.null sortify
+ *
+ " "
+ *
+ title field.or.null
+ sort.format.title
+ *
+ #1 entry.max$ substring$
+ 'sort.key$ :=
+}
+
+ITERATE {presort}
+
+% And now we can sort
+
+SORT
+
+#endif SORTED
+
+% This long comment applies only to alphabetic labels, when sorted
+%
+% Now comes the final computation for alphabetic labels, putting in the 'a's
+% and 'b's and so forth if required. This involves two passes: a forward
+% pass to put in the 'b's, 'c's and so on, and a backwards pass
+% to put in the 'a's (we don't want to put in 'a's unless we know there
+% are 'b's).
+% We have to keep track of the longest (in width$ terms) label, for use
+% by the "thebibliography" environment.
+%
+% VAR: longest.label, last.sort.label, next.extra: string
+% longest.label.width, last.extra.num: integer
+%
+% initialize.longest.label ==
+% BEGIN
+% longest.label := ""
+% last.sort.label := int.to.chr$(0)
+% next.extra := ""
+% longest.label.width := 0
+% last.extra.num := 0
+% END
+%
+% forward.pass ==
+% BEGIN
+% if last.sort.label = sort.label then
+% last.extra.num := last.extra.num + 1
+% extra.label := int.to.chr$(last.extra.num)
+% else
+% last.extra.num := chr.to.int$("a")
+% extra.label := ""
+% last.sort.label := sort.label
+% fi
+% END
+%
+% reverse.pass ==
+% BEGIN
+% if next.extra = "b" then
+% extra.label := "a"
+% fi
+% label := label * extra.label
+% if width$(label) > longest.label.width then
+% longest.label := label
+% longest.label.width := width$(label)
+% fi
+% next.extra := extra.label
+% END
+
+#if LAB_ALPH
+
+#if SORTED
+
+STRINGS { longest.label last.sort.label next.extra }
+
+INTEGERS { longest.label.width last.extra.num }
+
+FUNCTION {initialize.longest.label}
+{ "" 'longest.label :=
+ #0 int.to.chr$ 'last.sort.label :=
+ "" 'next.extra :=
+ #0 'longest.label.width :=
+ #0 'last.extra.num :=
+}
+
+FUNCTION {forward.pass}
+{ last.sort.label sort.label =
+ { last.extra.num #1 + 'last.extra.num :=
+ last.extra.num int.to.chr$ 'extra.label :=
+ }
+ { "a" chr.to.int$ 'last.extra.num :=
+ "" 'extra.label :=
+ sort.label 'last.sort.label :=
+ }
+ if$
+}
+
+FUNCTION {reverse.pass}
+{ next.extra "b" =
+ { "a" 'extra.label := }
+ 'skip$
+ if$
+ label extra.label * 'label :=
+ label width$ longest.label.width >
+ { label 'longest.label :=
+ label width$ 'longest.label.width :=
+ }
+ 'skip$
+ if$
+ extra.label 'next.extra :=
+}
+
+EXECUTE {initialize.longest.label}
+
+ITERATE {forward.pass}
+
+REVERSE {reverse.pass}
+
+#else !SORTED
+
+% It still doesn't seem like a good idea to use an order-of-citation
+% reference list when using alphabetic labels, but when this happens we
+% must compute the longest label
+
+STRINGS { longest.label }
+
+INTEGERS { longest.label.width }
+
+FUNCTION {initialize.longest.label}
+{ "" 'longest.label :=
+ #0 'longest.label.width :=
+}
+
+FUNCTION {longest.label.pass}
+{ label width$ longest.label.width >
+ { label 'longest.label :=
+ label width$ 'longest.label.width :=
+ }
+ 'skip$
+ if$
+}
+
+EXECUTE {initialize.longest.label}
+
+ITERATE {longest.label.pass}
+
+#endif SORTED
+
+#else !LAB_ALPH
+
+% Now comes the computation for numeric labels.
+% We use either the sorted order or original order.
+% We still have to keep track of the longest (in width$ terms) label, for use
+% by the "thebibliography" environment.
+
+STRINGS { longest.label }
+
+INTEGERS { number.label longest.label.width }
+
+FUNCTION {initialize.longest.label}
+{ "" 'longest.label :=
+ #1 'number.label :=
+ #0 'longest.label.width :=
+}
+
+FUNCTION {longest.label.pass}
+{ number.label int.to.str$ 'label :=
+ number.label #1 + 'number.label :=
+ label width$ longest.label.width >
+ { label 'longest.label :=
+ label width$ 'longest.label.width :=
+ }
+ 'skip$
+ if$
+}
+
+EXECUTE {initialize.longest.label}
+
+ITERATE {longest.label.pass}
+
+#endif LAB_ALPH
+
+% Now we're ready to start writing the .BBL file.
+% We begin, if necessary, with a LaTeX macro for unnamed names in an alphabetic
+% label; next comes stuff from the `preamble' command in the database files.
+% Then we give an incantation containing the command
+% \begin{thebibliography}{...}
+% where the `...' is the longest label.
+%
+% We also call init.state.consts, for use by the output routines.
+%
+% At first a TeX definition is output, that makes user commands able to
+% distinguish between a ``full'' and an ``abbreviated'' style (H2B).
+
+FUNCTION {begin.bib}
+{
+#if MONTH_FULL
+ "\newif\ifabfull\abfulltrue" write$ newline$
+#else
+ "\newif\ifabfull\abfullfalse" write$ newline$
+#endif
+#if LAB_ALPH
+ et.al.char.used
+ { "\newcommand{\etalchar}[1]{$^{#1}$}" write$ newline$ }
+ 'skip$
+ if$
+#endif LAB_ALPH
+ preamble$ empty$
+ 'skip$
+ { preamble$ write$ newline$ }
+ if$
+ "\begin{thebibliography}{" longest.label * "}" * write$ newline$
+}
+
+EXECUTE {begin.bib}
+
+EXECUTE {init.state.consts}
+
+% Now we produce the output for all the entries
+
+ITERATE {call.type$}
+
+% Finally, we finish up by writing the `\end{thebibliography}' command.
+
+FUNCTION {end.bib}
+{ newline$
+ "\end{thebibliography}" write$ newline$
+}
+
+EXECUTE {end.bib}
diff --git a/biblio/bibtex/contrib/abstyles/docmac.doc b/biblio/bibtex/contrib/abstyles/docmac.doc
new file mode 100644
index 0000000000..9327e67279
--- /dev/null
+++ b/biblio/bibtex/contrib/abstyles/docmac.doc
@@ -0,0 +1,778 @@
+% This is DOCMAC.DOC, Release 1 of 12 Aug 1991.
+%---------------------------------------------------------
+% This macro package is based on PROGDOC.DOC, which is
+% (c) 1988 by J.Schrod. Put into the public domain.
+% It is enhanced by incorporating some macros from WEBMAC.TEX to deal with
+% header lines and a table of contents and offers some additional typesetting
+% capabilities. The enhancements and changes are done by
+% Hans-Hermann Bode (HHBODE@DOSUNI1.BITNET).
+
+%
+% Macro package for the documentation of programs (and TeX macros)
+% english version
+%
+
+% Version of the basic PROGDOC.DOC:
+% first version (for ftp/Bitnet) (88-12-05)
+%
+% Release history of DOCMAC.DOC:
+%
+% Rel. Date Author Comment
+% 1 12 Aug 1991 H2B First change file to PROGDOC.DOC.
+%
+
+
+
+% documented with itself...
+\input docmac
+
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%
+% local macros
+%
+
+\font\mc=cmr9 % for names like ASCII
+
+\def\title{DOCMAC}
+
+
+\def\topofcontents{\null\vfill
+ \centerline{\titlefont\title}
+ \bigskip
+ \centerline{Joachim Schrod}
+ \medskip
+ \centerline{Hans-Hermann Bode}
+ \vfill}
+
+\def\botofcontents{\vfill
+ The macro package and the documentation was written initially by J.~Schrod
+ under the name \.{progdoc}. H.-H.~Bode enhanced the package with some stuff
+ from \.{webmac} and completed the documentation with material from the
+ ``\.{WEB} User Manual''; this makes up the chapter on
+ ``Formatting''---besides some minor changes in the remainder.
+ \par}
+
+\def\WEB{{\tt WEB\/}}
+\def\LaTeX{{\rm L\kern-.36em\raise.3ex\hbox{\sc a}\kern-.15em\TeX}}
+
+%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+
+
+
+
+\chap Introduction.
+
+\WEB{} systems allow the documentation of programs by supporting the
+separation in program fragments which can be collected and rearranged
+afterwards. This allows {\it top-down\/} programming as well as the
+{\it bottom-up\/} design of programs. Each program fragment can be
+documented, usually with \TeX{}. A disadvantadge is that \WEB{}
+actually exists only for a few programming languages (Pascal, C,
+Modula-2). Besides, building up \WEB{} systems for ``exotic''
+programming languages like \TeX{} is very difficult.
+
+This macro package was built to allow good documentation for programs
+in languages for which \WEB{} doesn't exist. It separates a program
+text in sections that can be documented. All sections, collected
+sequentially, will result in the complete program. In every section
+begin and end of the program part are marked with |\beginprog| and
+|\endprog|, this program part will be formatted as it is input
+(``verbatim'').
+
+The separation of the sections is done in this version (which is based
+on Plain~\TeX{}) by the macros |\chap| and |\sect|. But this can be
+changed easily, e.g.\ for preparing the documentation with \LaTeX{}.
+Then the last section group of this macro package must be omitted and
+the rest must be realized as a style option.
+
+In the documentation part of a section text pieces, e.g.\ names of
+variables, can be inserted verbatim to demonstrate the connection to
+the program text. These parts are included in vertical bars
+(`{\tt\vbar}') while the vertical bar itself can be obtained by
+|\origvert|.
+
+This macro package does not offer the creation of an index because it is not
+known which syntactical tokens the language has that should be mentioned in
+an index. If you want a table of contents, just say |\contentspage| at the
+end of your document (you need not put a |\bye| after that, |\contentspage|
+does this for you). Some remarks about future enhancements which should be
+done urgently are set in slanted type.
+
+
+\sect We have to realize three parts: (1)~the formatting of rather
+small verbatim texts in a line, (2)~the formatting of larger parts of
+program and (3)~the document structuring elements for the separation
+of the sections. Before we start we declare some shorthands for
+category codes.
+
+By declaring the at sign~(`|@|') as well as the underscore~`(|_|)' as
+letters we can use them in our macros.
+{\tolerance=10000
+(I agree with D.~Knuth that |\identifier_several_words_long| is much
+better readable than |\IdentifierSeveralWordsLong| and both are better
+than |\pr@@@s|.)
+With the at sign we can use the ``private'' Plain macros and with the
+underscore we can make our own macros more readable. But as we have
+to restore these category codes at the end of this macro file we store
+their former values in the control sequences |\atcode| and |\uscode|.
+This method is better than the usage of a group because not all macros
+have to be defined global this way.
+\par}
+
+\beginprog
+\chardef\escape=0
+\chardef\letter=11
+\chardef\other=12
+%\chardef\active=13 % is defined in Plain already
+
+\chardef\atcode=\catcode`\@
+\chardef\uscode=\catcode`\_
+
+\catcode`\@=\letter
+\catcode`\_=\letter
+\endprog
+
+
+
+
+\chap Local Verbatim Formatting.
+
+The main point of every verbatim formatting is the switching of the
+character codes of all characters that have a special \TeX{} meaning.
+This can be done with the control sequence |\dospecials| that applies
+the control sequence |\do| to all special characters. Additionally,
+every line is regarded as a paragraph without indentation. Between
+two paragraphs, i.e.\ between two lines, no extra space is set.
+Finally all blanks and tabular characters shall be obeyed and the
+inter word space after sentence terminators shall not be enlarged.
+The activation of the tabular characters with |\obeytabs| is
+equivalent to |\obeyspaces| in {\tt plain.tex\/}.
+
+Verbatim texts are set in monospace, we use (like in \WEB{}) the
+character set with the extended {\mc ASCII}. For \LaTeX{} we would
+have to add here |\ttex| to all size modifications like |\xpt|,
+|\xiipt|, etc.
+
+\beginprog
+\font\tentex=cmtex10 % typewriter extended ASCII 10pt
+\let\ttex=\tentex % only for PLAIN with base size 10pt
+
+\def\setup_verbatim{%
+ \def\do##1{\catcode`##1\other}\dospecials
+ \parskip\z@skip \parindent\z@
+ \obeylines \obeyspaces \obeytabs \frenchspacing
+ \ttex
+ }
+
+\let\tab=\space
+\begingroup
+ \catcode`\^^I=\active% % Attention: no tabs!
+ \gdef\obeytabs{\catcode`\^^I=\active\def^^I{\tab}}
+ \global\let^^I=\tab% % if an active tab appears in a \write
+\endgroup
+\endprog
+
+\sect After having saved the old meaning of `{\tt\vbar}' in
+|\origvert| and after declaring |\vbar| as a synonym for the character
+that has the code of a vertical bar in the actual font, the vertical
+bar can be made active. Then we call |\setup_verbatim|. But the
+newline characters shall not be processed, they shall be regarded like
+blank space. This can be reached by defining |\par| as |\space|.
+
+The next vertical bar in the input closes the group which becomes an
+(unbreakable) |\hbox| then. The old meanings of the special
+characters and of the vertical bar are restored and \TeX{} is in
+normal (horizontal) mode again.
+
+\beginprog
+\let\origvert=|
+\chardef\vbar=`\|
+
+\catcode`\|=\active
+
+\def|{%
+ \leavevmode
+ \hbox\bgroup
+ \let\par\space \setup_verbatim
+ \let|\egroup
+ }
+\endprog
+
+
+
+
+\chap Program Fragments in Verbatim.
+
+We need macros to format the program fragments without any
+linebreaking. Such a text area shall start with the macro
+|\beginprog| and end with |\endprog|. The macro |\endprog| must stand
+at the very beginning of a line and must be followed by white space
+(blank, tab or newline character). After |\beginprog| as well as
+after |\endprog| the rest of the line is ignored.
+
+Two demands must be regarded: There should be no length restrictions
+for the processed text, and the tabular characters should be expanded
+so that this macro works on PC's and on VAXes, too.
+
+
+\sect The implementation method is quite simple: We read the next
+line, test, wether the end is reached (by comparing with |\endprog|)
+and otherwise set the character actually read. Every character is
+inspected and tabular characters are expanded.
+
+Wether a line is set or wether the end of the processed area is
+reached is indicated by the switch |\if@print|. At the beginning of
+the |\beginprog| macro most settings are done with |\setup_verbatim|
+(the vertical bar must be handled separately) and the rest of the line
+is ignored. As everything is done within a group, the end of the
+verbatim text can be processed by simply closing this group.
+
+For the user it looks as if |\endprog| terminates the processing, but
+it just serves for the identification of the end, the true processing
+is done with the internal macro |\end_verbatim|.
+
+\beginprog
+\newif\if@print
+
+\def\beginprog{%
+ \endgraf
+ \bigbreak
+ \begingroup
+ \setup_verbatim \catcode`\|\other
+ \@printtrue
+ \ignore_rest_line
+ }
+\let\end_verbatim=\endgroup % internal command !
+\endprog
+
+
+\sect The first line is ignored, all the other lines are identified
+with |\set_next_line| and processed with |\do_set|. This separation
+in identification and processing allows that the line end character is
+active in the definition only for a short time.
+
+When a line is to be formatted, we first check with |\check_print|
+wether it contains |\endprog|, otherwise it is printed with
+|\print_char|. The printing must be done for every character
+individually because we want to check for tabular characters; the
+exact algorithm is described below. Here we just have to note that
+|\print_char| is used with two parameters of which the second one is
+finished with the token |\end_line|. The first parameter is the first
+character of the line, the second parameter is the rest of the line.
+If the line is empty, the argument of |\do_set| is empty, too; so the
+activation of |\print_char| must be finished with two |\end_line|.
+Then the first |\end_line| is the first argument for |\print_char| and
+the second argument is empty. But if the line did contain something,
+the second |\end_line| is evaluated, for this case it is defined as
+|\relax|.
+
+At last we call |\set_next_line| again to format the next line. If
+the end is reached, i.e.\ if a line with |\endprog| was found,
+|\set_next_line| is redefined as |\relax|. This can be done because
+the original meaning is restored while closing the group with
+|\end_verbatim|.
+
+\beginprog
+\begingroup
+ \obeylines% % ^^M is active! ==> every line must end with %
+ \gdef\ignore_rest_line#1^^M{\set_next_line}%
+ \gdef\set_next_line#1^^M{\do_set{#1}}%
+\endgroup
+
+\def\do_set#1{%
+ \endgraf
+ \check_print{#1}%
+ \if@print \indent \print_char#1\end_line\end_line
+ \else \let\set_next_line\end_verbatim
+ \fi
+ \set_next_line
+ }
+\let\end_line=\relax
+\endprog
+
+
+\sect Before we look at the problem of formatting a line, we declare
+|\check_print| that checks the end of the verbatim mode. We have to
+do two things: we must split everything in front of the first blank
+or tabular character and compare for identity with |\endprog|. The
+splitting is easy because the line which is our first argument
+contains blanks and tabulators as active characters. First we call
+|\cut_at_tab| that demands a tabular character as separator for its
+two pramenters so that everything in the line in front of the first
+tabulator is part of the first parameter. If there is no tabular
+character in the line, we append one so that the second parameter is
+empty. The same trick is used to separate the part in front of the
+first blank character from the resulting first part.
+
+The check is done with |\do_check|. We use a separate macro here so
+that we can indent it (in the following definition blanks are active!)
+
+\beginprog
+\begingroup
+\obeyspaces\obeytabs
+\gdef\check_print#1{\cut_at_tab#1^^I\end_line}
+\gdef\cut_at_tab#1^^I#2\end_line{\check_first_part#1 \end_line}% blank !
+\gdef\check_first_part#1 #2\end_line{\do_check{#1}}
+\endgroup
+\endprog
+
+
+\sect |\do_check| compares the line with a sample line that is
+available in |\@endverbatim|. During the definition of
+|\@endverbatim| it must be cared for that the escape character `|\|'
+is a printable character: A comparison with |\ifx| demands identical
+category codes. As a temporary escape character we use the vertical
+bar.
+
+\beginprog
+\def\do_check#1{%
+ \def\@line{#1}%
+ \ifx \@line\@endverbatim \@printfalse
+ \fi
+ }
+
+{\catcode`\|=\escape \catcode`\\=\other % | is temporary escape char
+ |gdef|@endverbatim{\endprog} % sample line
+} % here \endgroup can't be used
+\endprog
+
+
+\sect Now we can set a line: we start with the first character,
+followed by the rest of the line. Each character is counted in
+|\char_count|. At the beginning of a line |\char_count| is~1, this
+is reset at the end of the line.
+
+\goodbreak
+
+\beginprog
+\newcount\char_count \char_count\@ne
+
+\def\print_char#1#2\end_line{%
+ \print_first_char{#1}%
+ \print_rest_of_line{#2}%
+ }
+\endprog
+
+
+\sect For each character that is set |\char_count| is incremented.
+If a character is a tabulator, we set with |\print_tab| the fitting
+amount of blank characters, otherwise the character itself. We must
+compare the character that is stored in |\@char| with a macro of which
+the ``first-level'' expansion is an active tabulator. For this case
+we declare |\@tab|.
+
+\beginprog
+{\obeytabs\gdef\@tab{^^I}}
+
+\def\print_first_char#1{%
+ \def\@char{#1}%
+ \advance \char_count\@ne
+ \ifx \@char\@tab \print_tab
+ \else \@char
+ \fi
+ }
+\endprog
+
+
+\sect If we want to fill the line with blank spaces up to the next
+column with a number that can be divided by~8, we must be able to
+compute the column number modulo~8, but \TeX{} has no modulo operator.
+So we define the macro |\mod_viii| that computes its argument modulo~8
+and returns the result in the counter |\count_mod_viii|. For the
+computation we need the temporary counter |\count@|.
+
+\beginprog
+\newcount\count_mod_viii
+\def\mod_viii#1{%
+ \count@ #1\relax \count_mod_viii\count@
+ \divide \count@ 8\relax
+ \multiply \count@ 8\relax
+ \advance \count_mod_viii -\count@
+ }
+\endprog
+
+
+\sect Now we can declare |\print_tab|. We must remember that
+|\char_count| was incremented already, if we set only one blank
+character the counter keeps untouched.
+
+\beginprog
+\def\print_tab{%
+ \loop \space \mod_viii\char_count
+ \ifnum \count_mod_viii>\z@
+ \advance \char_count\@ne
+ \repeat
+ }
+\endprog
+
+
+\sect If the rest of the line is empty, we are ready. |\char_count|
+is reset to~1 for the next line.
+
+Inside the |\else| part of |\ifx| |\print_char| should not be used
+directly because this costs too much storage of \TeX{}. Instead we
+set a control sequence |\next| that is processed afterwards, depending
+on the result of the comparison. If there is still something to set,
+we use |\print_char| again, otherwise a syntactically similar macro
+that expands to |\relax|.
+
+\beginprog
+\def\print_rest_of_line#1{%
+ \def\@line{#1}%
+ \ifx \@line\empty \char_count\@ne
+ \def\next##1\end_line{\relax}%
+ \else \let\next\print_char
+ \fi
+ \next#1\end_line
+ }
+\endprog
+
+
+
+
+\chap Document Structuring.
+
+The layout of the document shall be like in \WEB{}. This can be done
+easily in Plain. If \LaTeX{} shall be used for the document
+preparation, this part of the macro must be eliminated. It will also
+be better to include the program parts \LaTeX-like as an environment
+between |\begin{prog}| and |\end{prog}| and to define control
+sequences |\makebaractive| and |\makebarother| for the switch of the
+special meaning of the vertical bar (`{\tt \origvert\/}') (for the
+{\tt tabular\/} environment!)
+
+All sections are enumerated, the number of the next section is stored
+in the counter |\sectno|. We differenciate between main sections
+which start a group of sections and between normal sections within a
+group.
+
+\beginprog
+\newcount\sectno \sectno=\@ne
+\endprog
+
+
+\sect The main sections are started with the macro |\chap| that has
+one parameter, the title of the section group. This parameter must be
+terminated by a dot. We start a new page, typeset the title in bold
+face and separate it from the section text with a |\medskip|. This
+text, the documentation part of the section, is formatted without
+paragraph indentation.
+
+The deletion of the paragraph indentation is done with |\everypar|.
+We do not care if |\everypar| is used for something else and delete it
+after usage.
+
+The section number is marked to appear {\it via\/} |\topmark| in the
+headline, the title goes as a running head into the headline too. The
+section number is displayed on the terminal as a progress report, and title,
+section and page number are recorded in the contents file.
+
+\begingroup \sl
+The dealing with |\everypar| should not be so cruel.
+\endgroup
+
+\beginprog
+\def\chap#1.{%
+ \mark{\number\sectno}
+ \endgraf
+ \vfill\eject
+ \def\rhead{\uppercase{\ignorespaces#1}} % define running headline
+ \message{*\number\sectno} % progress report
+ \let\Z=\let % now you can \send the control sequence \Z
+ \edef\next{\write\cont{\Z{#1}{\number\sectno}{\the\pageno}}}\next % to contents file
+ \noindent {\bf \number\sectno.\quad #1.}%
+ \advance \sectno\@ne
+ \endgraf
+ \medskip \nobreak
+ \everypar{%
+ \setbox0\lastbox
+ \global\everypar{}%
+ }%
+ }
+\endprog
+
+
+\sect Normal sections are started with |\sect|. This macro has no
+parameter. Between two paragraphs we set 2~pica space (if possible)
+and prefer the page breaking. Between the section number and the text
+one quad of space is set.
+
+\begingroup \sl
+The page break manipulation could be more sophisticated.
+\endgroup
+
+\beginprog
+\def\sect{%
+ \mark{\number\sectno}
+ \endgraf
+ \vskip 2pc plus 1pc minus 6dd \goodbreak
+ \noindent {\bf \number\sectno.}\advance \sectno\@ne
+ \quad \ignorespaces
+ }
+\endprog
+
+
+\chap Formatting.
+The macros in this chapter are extracted from \.{WEBMAC.TEX}, while most of
+the documentation is taken from Appendix~G of the ``\.{WEB} User Manual''.
+The macros in \.{docmac} make it possible to produce a variety of formats,
+and the purpose of this appendix is to explain some of the possibilities.
+Displayed examples, that are included in the documentation, come out centered
+to distinguish them from program text, which is flushleft.
+
+\def\lpile{\def\cr{\hfill\endline}\matrix} % I [D E Knuth] only use \lpile by itself
+
+\sect We begin the formatting part with some declarations that should make
+look the output a little better for documenting programs.
+
+\beginprog
+\parskip 0pt % no stretch between paragraphs
+\parindent 1em % for paragraphs and for the first line of Pascal text
+\endprog
+
+\sect Three fonts have been declared in addition to the standard fonts of
+\.{PLAIN} format: You can say `\.{\{\\sc stuff\}}' to get {\sc stuff}
+in small caps; and you can select the largish fonts \.{\\titlefont}
+and \.{\\ttitlefont} in the title of your document, where \.{\\ttitlefont}
+is a typewriter style of type.
+
+\beginprog
+\font\eightrm=cmr8
+\font\sc=cmcsc10 % this IS a caps-and-small-caps font!
+\let\mainfont=\tenrm
+\font\titlefont=cmr7 scaled\magstep4 % title on the contents page
+\font\ttitlefont=cmtt10 scaled\magstep2 % typewriter type in title
+%\font\tentex=cmtex10 % TeX extended character set (used in strings)
+ % already defined above
+\fontdimen7\tentex=0pt % no extra space after punctuation
+\endprog
+
+\sect You can say `\.{\\\\\{identifier\}}' to set \\{identifier} in
+italics.
+
+To get typewriter-like type, as when referring to `\.{WEB}', you
+can use the `\.{\\.}' macro (e.g., `\.{\\.\{WEB\}}'). In the argument to
+this macro you should insert an additional backslash before the symbols
+listed below, i.e.,
+before backslashes and dollar signs and the like.
+A `\.{\\\ }' here will result in the visible space symbol; to get an
+invisible space following a control sequence you can say `\.{\{\ \}}'.
+
+\beginprog
+\def\\#1{\hbox{\it#1\/\kern.05em}} % italic type for identifiers
+\def\|#1{\hbox{$#1$}} % one-letter identifiers look a bit better this way
+\def\&#1{\hbox{\bf#1\/}} % boldface type for reserved words
+\def\.#1{\hbox{\tentex % typewriter type for strings
+ \let\\=\BS % backslash in a string
+ \let\'=\RQ % right quote in a string
+ \let\`=\LQ % left quote in a string
+ \let\{=\LB % left brace in a string
+ \let\}=\RB % right brace in a string
+ \let\~=\TL % tilde in a string
+ \let\ =\SP % space in a string
+ \let\_=\UL % underline in a string
+ \let\&=\AM % ampersand in a string
+ #1}}
+\def\#{\hbox{\tt\char`\#}} % parameter sign
+\def\${\hbox{\tt\char`\$}} % dollar sign
+\def\%{\hbox{\tt\char`\%}} % percent sign
+\def\^{\ifmmode\mathchar"222 \else\char`^ \fi} % pointer or hat
+% circumflex accents can be obtained from \^^D instead of \^
+\def\AT!{@} % at sign for control text
+
+\chardef\AM=`\& % ampersand character in a string
+\chardef\BS=`\\ % backslash in a string
+\chardef\LB=`\{ % left brace in a string
+\def\LQ{{\tt\char'22}} % left quote in a string
+\chardef\RB=`\} % right brace in a string
+\def\RQ{{\tt\char'23}} % right quote in a string
+\def\SP{{\tt\char`\ }} % (visible) space in a string
+\chardef\TL=`\~ % tilde in a string
+\chardef\UL=`\_ % underline character in a string
+\endprog
+
+\sect The three control sequences \.{\\pagewidth}, \.{\\pageheight},
+and \.{\\fullpageheight} can be redefined in the limbo section at the
+beginning of your source file, to change the dimensions of each page.
+The standard settings
+$$\lpile{\.{\\pagewidth=6.5in}\cr
+ \.{\\pageheight=8.7in}\cr
+ \.{\\fullpageheight=9in}\cr}$$
+were used to prepare the present report; \.{\\fullpageheight} is
+\.{\\pageheight} plus room for the additional heading and page numbers at
+the top of each page. If you change any of these quantities, you should
+call the macro \.{\\setpage} immediately after making the change.
+
+The \.{\\pageshift} macro defines an amount by which right-hand
+pages (i.e., odd-numbered pages) are shifted right with respect to
+left-hand (even-numbered) ones. By adjusting this amount you may be
+able to get two-sided output in which the page numbers line up on
+opposite sides of each sheet.
+
+\beginprog
+\newdimen\pagewidth \pagewidth=6.5in % the width of each page
+\newdimen\pageheight \pageheight=8.7in % the height of each page
+\newdimen\fullpageheight \fullpageheight=9in % page height including headlines
+\newdimen\pageshift \pageshift=0in % shift righthand pages wrt lefthand ones
+\def\magnify#1{\mag=#1\pagewidth=6.5truein\pageheight=8.7truein
+ \fullpageheight=9truein\setpage}
+\def\setpage{\hsize\pagewidth\vsize\pageheight} % use after changing page size
+\endprog
+
+\sect The \.{\\title} macro will appear at the top of each page
+in small caps. For example, this document was produced after saying
+`\.{\\def\\title\{DOCMAC\}}'.
+
+\beginprog
+\def\lheader{\mainfont\the\pageno\eightrm\qquad\rhead\hfill\title\qquad
+ \tensy x\mainfont\topmark} % top line on left-hand pages
+\def\rheader{\tensy x\mainfont\topmark\eightrm\qquad\title\hfill\rhead
+ \qquad\mainfont\the\pageno} % top line on right-hand pages
+\def\page{\box255 }
+\def\normaloutput#1#2#3{\ifodd\pageno\hoffset=\pageshift\fi
+ \shipout\vbox{
+ \vbox to\fullpageheight{
+ \iftitle\global\titlefalse
+ \else\hbox to\pagewidth{\vbox to10pt{}\ifodd\pageno #3\else#2\fi}\fi
+ \vfill#1}} % parameter #1 is the page itself
+ \global\advance\pageno by1}
+
+\def\rhead{\.{DOCMAC} OUTPUT} % this running head is reset by starred sections
+\def\title{} % an optional title can be set by the user
+\endprog
+
+\sect The first page usually is assigned page number 1.
+To start on page 16, with contents
+on page 15, say this: `\.{\\def\\contentspagenumber\{15\}}
+\.{\\pageno=\\contentspagenumber} \.{\\advance\\pageno by 1}'.
+
+\beginprog
+\def\contentspagenumber{0} % default page number for table of contents
+\endprog
+
+\sect The macro \.{\\iftitle} will suppress the header line if it is
+defined by `\.{\\titletrue}'. The normal value is \.{\\titlefalse}
+except for the table of contents; thus, the contents
+page is usually unnumbered.
+
+Two macros are provided to give flexibility to the table of
+contents: \.{\\topofcontents} is invoked just before the contents
+info is read, and \.{\\botofcontents} is invoked just after.
+For example, you can define:
+$$\lpile{\.{\\def\\topofcontents\{\\null\\vfill}\cr
+ \.{ { }\\titlefalse \% include headline on the contents page}\cr
+ \.{ { }\\def\\rheader\{\\mainfont Appendix D\\hfil 15\}}\cr
+ \.{ { }\\centerline\{\\titlefont The \{\\ttitlefont WEAVE\}{ }processor\}}\cr
+ \.{ { }\\vskip 15pt \\centerline\{(Version 4)\}{ }\\vfill\}}\cr}$$
+Redefining \.{\\rheader}, which is the headline for right-hand pages,
+suffices in this case to put the desired information at the top of the
+contents page.
+
+\beginprog
+\newif\iftitle
+
+\def\topofcontents{\centerline{\titlefont\title}
+ \vfill} % this material will start the table of contents page
+\def\botofcontents{\vfill} % this material will end the table of contents page
+\endprog
+
+\sect Data for the table of contents is written to a file that
+is read when |\contentspage| is called; there's one line of data
+for every starred module. For example, when this document was being created, a
+file \.{DOCMAC.TOC} containing
+$$\lpile{\.{\\Z \{{ }Introduction\}\{1\}\{1\}}\cr
+ \.{\\Z \{{ }Local Verbatim Formatting\}\{3\}\{2\}}\cr}$$
+and similar lines was created. The \.{\\topofcontents} macro could
+redefine \.{\\Z} so that the information appears in another format.
+
+\beginprog
+\def\contentsfile{\jobname.toc} % file that gets table of contents info
+\def\readcontents{\expandafter\input \contentsfile}
+
+\newwrite\cont
+\output{\setbox0=\page % the first page is garbage
+ \openout\cont=\contentsfile
+ \global\output{\normaloutput\page\lheader\rheader}}
+\setpage
+\vbox to \vsize{} % the first \topmark won't be null
+
+\def\con{%
+ \write\cont{} % ensure that the contents file isn't empty
+ \closeout\cont % the contents information has been fully gathered
+ \par\vfill\eject % finish the preceding page
+ \rightskip 0pt \hyphenpenalty 50 \tolerance 200
+ \setpage
+ \output{\normaloutput\page\lheader\rheader}
+ \titletrue % prepare to output the table of contents
+ \pageno=\contentspagenumber \def\rhead{TABLE OF CONTENTS}
+ \message{Table of contents:}
+ \topofcontents
+ \line{\hfil Section\hbox to3em{\hss Page}}
+ \def\Z##1##2##3{\line{\ignorespaces##1
+ \leaders\hbox to .5em{.\hfil}\hfil\ ##2\hbox to3em{\hss##3}}}
+ \readcontents\relax % read the contents info
+ \botofcontents \end} % print the contents page(s) and terminate
+\let\contentspage=\con
+\endprog
+
+\sect Sometimes it is necessary or desirable to divide the output of
+\.{docmac} into subfiles that can be processed separately. For example,
+the listing of \TeX\ runs to more than 500 pages, and that is enough to
+exceed the capacity of many printing devices and/or their software.
+When an extremely large job isn't cut into smaller pieces, the entire
+process might be spoiled by a single error of some sort, making it
+necessary to start everything over.
+
+Here's a safe way to break a docmac'ed file into three parts:
+Say the pieces are $\alpha$,
+$\beta$, and $\gamma$, where each piece begins with a starred module.
+All macros should be defined in the opening limbo section of $\alpha$,
+and copies of this \TeX\ code should be placed at the
+beginning of $\beta$ and of $\gamma$. In order to process the parts
+separately, we need to take care of two things: The starting page
+numbers of $\beta$ and $\gamma$ need to be set up properly, and
+the table of contents data from all three runs needs to be
+accumulated.
+
+The \.{docmac} macros include two control sequences \.{\\contentsfile} and
+\.{\\readcontents} that facilitate the necessary processing. We include
+`\.{\\def\\contentsfile\{CONT1\}}' in the limbo section of~$\alpha$, we
+include `\.{\\def\\contentsfile\{CONT2\}}' in the limbo section of~$\beta$,
+and we include `\.{\\def\\contentsfile\{CONT3\}}' in the limbo section
+of~$\gamma$; this causes \TeX\ to write the contents data for
+$\alpha$,~$\beta$, and~$\gamma$ into \.{CONT1.TEX}, \.{CONT2.TEX}, and
+\.{CONT3.TEX}. Now in~$\gamma$ we say $$\.{\\def\\readcontents\{\\input CONT1
+\\input CONT2 \\input CONT3\}};$$ this brings in the data from all three
+pieces, in the proper order.
+
+However, we still need to solve the page-numbering problem. One way to
+do it is to include the following in the limbo material for $\beta$:
+$$\lpile{\.{\\message\{Please type the last page number of part 1: \}}\cr
+ \.{\\read -1 to \\temp \\pageno=\\temp \\advance\\pageno by 1}\cr}$$
+Then you simply provide the necessary data when \TeX\ requests
+it; a similar construction is used at the beginning of $\gamma$.
+
+This method can, of course, be used to divide a docmac'ed file into
+any number of pieces.
+
+\sect The counter \.{\\sectno} is set to the number of the
+module being typeset.
+
+\sect We are finished and just have to restore the category codes.
+
+\beginprog
+\catcode`\@=\atcode
+\catcode`\_=\uscode
+
+\endinput
+\endprog
+
+
+
+
+
+\contentspage
+
diff --git a/biblio/bibtex/contrib/abstyles/docmac.tex b/biblio/bibtex/contrib/abstyles/docmac.tex
new file mode 100644
index 0000000000..c832c74f1c
--- /dev/null
+++ b/biblio/bibtex/contrib/abstyles/docmac.tex
@@ -0,0 +1,238 @@
+\chardef\escape=0
+\chardef\letter=11
+\chardef\other=12
+%\chardef\active=13 % is defined in Plain already
+
+\chardef\atcode=\catcode`\@
+\chardef\uscode=\catcode`\_
+
+\catcode`\@=\letter
+\catcode`\_=\letter
+\font\tentex=cmtex10 % typewriter extended ASCII 10pt
+\let\ttex=\tentex % only for PLAIN with base size 10pt
+
+\def\setup_verbatim{%
+ \def\do##1{\catcode`##1\other}\dospecials
+ \parskip\z@skip \parindent\z@
+ \obeylines \obeyspaces \obeytabs \frenchspacing
+ \ttex
+ }
+
+\let\tab=\space
+\begingroup
+ \catcode`\^^I=\active% % Attention: no tabs!
+ \gdef\obeytabs{\catcode`\^^I=\active\def^^I{\tab}}
+ \global\let^^I=\tab% % if an active tab appears in a \write
+\endgroup
+\let\origvert=|
+\chardef\vbar=`\|
+
+\catcode`\|=\active
+
+\def|{%
+ \leavevmode
+ \hbox\bgroup
+ \let\par\space \setup_verbatim
+ \let|\egroup
+ }
+\newif\if@print
+
+\def\beginprog{%
+ \endgraf
+ \bigbreak
+ \begingroup
+ \setup_verbatim \catcode`\|\other
+ \@printtrue
+ \ignore_rest_line
+ }
+\let\end_verbatim=\endgroup % internal command !
+\begingroup
+ \obeylines% % ^^M is active! ==> every line must end with %
+ \gdef\ignore_rest_line#1^^M{\set_next_line}%
+ \gdef\set_next_line#1^^M{\do_set{#1}}%
+\endgroup
+
+\def\do_set#1{%
+ \endgraf
+ \check_print{#1}%
+ \if@print \indent \print_char#1\end_line\end_line
+ \else \let\set_next_line\end_verbatim
+ \fi
+ \set_next_line
+ }
+\let\end_line=\relax
+\begingroup
+\obeyspaces\obeytabs
+\gdef\check_print#1{\cut_at_tab#1^^I\end_line}
+\gdef\cut_at_tab#1^^I#2\end_line{\check_first_part#1 \end_line}% blank !
+\gdef\check_first_part#1 #2\end_line{\do_check{#1}}
+\endgroup
+\def\do_check#1{%
+ \def\@line{#1}%
+ \ifx \@line\@endverbatim \@printfalse
+ \fi
+ }
+
+{\catcode`\|=\escape \catcode`\\=\other % | is temporary escape char
+ |gdef|@endverbatim{\endprog} % sample line
+} % here \endgroup can't be used
+\newcount\char_count \char_count\@ne
+
+\def\print_char#1#2\end_line{%
+ \print_first_char{#1}%
+ \print_rest_of_line{#2}%
+ }
+{\obeytabs\gdef\@tab{^^I}}
+
+\def\print_first_char#1{%
+ \def\@char{#1}%
+ \advance \char_count\@ne
+ \ifx \@char\@tab \print_tab
+ \else \@char
+ \fi
+ }
+\newcount\count_mod_viii
+\def\mod_viii#1{%
+ \count@ #1\relax \count_mod_viii\count@
+ \divide \count@ 8\relax
+ \multiply \count@ 8\relax
+ \advance \count_mod_viii -\count@
+ }
+\def\print_tab{%
+ \loop \space \mod_viii\char_count
+ \ifnum \count_mod_viii>\z@
+ \advance \char_count\@ne
+ \repeat
+ }
+\def\print_rest_of_line#1{%
+ \def\@line{#1}%
+ \ifx \@line\empty \char_count\@ne
+ \def\next##1\end_line{\relax}%
+ \else \let\next\print_char
+ \fi
+ \next#1\end_line
+ }
+\newcount\sectno \sectno=\@ne
+\def\chap#1.{%
+ \mark{\number\sectno}
+ \endgraf
+ \vfill\eject
+ \def\rhead{\uppercase{\ignorespaces#1}} % define running headline
+ \message{*\number\sectno} % progress report
+ \let\Z=\let % now you can \send the control sequence \Z
+ \edef\next{\write\cont{\Z{#1}{\number\sectno}{\the\pageno}}}\next % to contents file
+ \noindent {\bf \number\sectno.\quad #1.}%
+ \advance \sectno\@ne
+ \endgraf
+ \medskip \nobreak
+ \everypar{%
+ \setbox0\lastbox
+ \global\everypar{}%
+ }%
+ }
+\def\sect{%
+ \mark{\number\sectno}
+ \endgraf
+ \vskip 2pc plus 1pc minus 6dd \goodbreak
+ \noindent {\bf \number\sectno.}\advance \sectno\@ne
+ \quad \ignorespaces
+ }
+\parskip 0pt % no stretch between paragraphs
+\parindent 1em % for paragraphs and for the first line of Pascal text
+\font\eightrm=cmr8
+\font\sc=cmcsc10 % this IS a caps-and-small-caps font!
+\let\mainfont=\tenrm
+\font\titlefont=cmr7 scaled\magstep4 % title on the contents page
+\font\ttitlefont=cmtt10 scaled\magstep2 % typewriter type in title
+%\font\tentex=cmtex10 % TeX extended character set (used in strings)
+ % already defined above
+\fontdimen7\tentex=0pt % no extra space after punctuation
+\def\\#1{\hbox{\it#1\/\kern.05em}} % italic type for identifiers
+\def\|#1{\hbox{$#1$}} % one-letter identifiers look a bit better this way
+\def\&#1{\hbox{\bf#1\/}} % boldface type for reserved words
+\def\.#1{\hbox{\tentex % typewriter type for strings
+ \let\\=\BS % backslash in a string
+ \let\'=\RQ % right quote in a string
+ \let\`=\LQ % left quote in a string
+ \let\{=\LB % left brace in a string
+ \let\}=\RB % right brace in a string
+ \let\~=\TL % tilde in a string
+ \let\ =\SP % space in a string
+ \let\_=\UL % underline in a string
+ \let\&=\AM % ampersand in a string
+ #1}}
+\def\#{\hbox{\tt\char`\#}} % parameter sign
+\def\${\hbox{\tt\char`\$}} % dollar sign
+\def\%{\hbox{\tt\char`\%}} % percent sign
+\def\^{\ifmmode\mathchar"222 \else\char`^ \fi} % pointer or hat
+% circumflex accents can be obtained from \^^D instead of \^
+\def\AT!{@} % at sign for control text
+
+\chardef\AM=`\& % ampersand character in a string
+\chardef\BS=`\\ % backslash in a string
+\chardef\LB=`\{ % left brace in a string
+\def\LQ{{\tt\char'22}} % left quote in a string
+\chardef\RB=`\} % right brace in a string
+\def\RQ{{\tt\char'23}} % right quote in a string
+\def\SP{{\tt\char`\ }} % (visible) space in a string
+\chardef\TL=`\~ % tilde in a string
+\chardef\UL=`\_ % underline character in a string
+\newdimen\pagewidth \pagewidth=6.5in % the width of each page
+\newdimen\pageheight \pageheight=8.7in % the height of each page
+\newdimen\fullpageheight \fullpageheight=9in % page height including headlines
+\newdimen\pageshift \pageshift=0in % shift righthand pages wrt lefthand ones
+\def\magnify#1{\mag=#1\pagewidth=6.5truein\pageheight=8.7truein
+ \fullpageheight=9truein\setpage}
+\def\setpage{\hsize\pagewidth\vsize\pageheight} % use after changing page size
+\def\lheader{\mainfont\the\pageno\eightrm\qquad\rhead\hfill\title\qquad
+ \tensy x\mainfont\topmark} % top line on left-hand pages
+\def\rheader{\tensy x\mainfont\topmark\eightrm\qquad\title\hfill\rhead
+ \qquad\mainfont\the\pageno} % top line on right-hand pages
+\def\page{\box255 }
+\def\normaloutput#1#2#3{\ifodd\pageno\hoffset=\pageshift\fi
+ \shipout\vbox{
+ \vbox to\fullpageheight{
+ \iftitle\global\titlefalse
+ \else\hbox to\pagewidth{\vbox to10pt{}\ifodd\pageno #3\else#2\fi}\fi
+ \vfill#1}} % parameter #1 is the page itself
+ \global\advance\pageno by1}
+
+\def\rhead{\.{DOCMAC} OUTPUT} % this running head is reset by starred sections
+\def\title{} % an optional title can be set by the user
+\def\contentspagenumber{0} % default page number for table of contents
+\newif\iftitle
+
+\def\topofcontents{\centerline{\titlefont\title}
+ \vfill} % this material will start the table of contents page
+\def\botofcontents{\vfill} % this material will end the table of contents page
+\def\contentsfile{\jobname.toc} % file that gets table of contents info
+\def\readcontents{\expandafter\input \contentsfile}
+
+\newwrite\cont
+\output{\setbox0=\page % the first page is garbage
+ \openout\cont=\contentsfile
+ \global\output{\normaloutput\page\lheader\rheader}}
+\setpage
+\vbox to \vsize{} % the first \topmark won't be null
+
+\def\con{%
+ \write\cont{} % ensure that the contents file isn't empty
+ \closeout\cont % the contents information has been fully gathered
+ \par\vfill\eject % finish the preceding page
+ \rightskip 0pt \hyphenpenalty 50 \tolerance 200
+ \setpage
+ \output{\normaloutput\page\lheader\rheader}
+ \titletrue % prepare to output the table of contents
+ \pageno=\contentspagenumber \def\rhead{TABLE OF CONTENTS}
+ \message{Table of contents:}
+ \topofcontents
+ \line{\hfil Section\hbox to3em{\hss Page}}
+ \def\Z##1##2##3{\line{\ignorespaces##1
+ \leaders\hbox to .5em{.\hfil}\hfil\ ##2\hbox to3em{\hss##3}}}
+ \readcontents\relax % read the contents info
+ \botofcontents \end} % print the contents page(s) and terminate
+\let\contentspage=\con
+\catcode`\@=\atcode
+\catcode`\_=\uscode
+
+\endinput
diff --git a/biblio/bibtex/contrib/abstyles/jourabbr.bib b/biblio/bibtex/contrib/abstyles/jourabbr.bib
new file mode 100644
index 0000000000..7d6a973755
--- /dev/null
+++ b/biblio/bibtex/contrib/abstyles/jourabbr.bib
@@ -0,0 +1,75 @@
+This is JOURABBR.BIB, a BibTeX database file for the `adaptable' style
+family, written by Hans-Hermann Bode (HHBODE at DOSUNI1.BITNET). Use jourabbr
+as the first item in your \bibliography command, if journal names should be
+written out abbreviated. You may edit this file to add more STRING
+definitions for journal names or other purposes or to delete some that you
+don't need.
+
+------------------------------------------------------------------------------
+
+First of all we use a PREAMBLE command to put some stuff at the beginning
+of the bibliography. Inputting of apreambl.tex is mandatory for the
+adaptable styles and should always be done at the beginning of the preamble.
+Next, a language switch---easier to use than that in apreamble.tex---is
+defined and set appropriate, that can be used to distinguish between german
+and all other languages; the same technique may be adapted to other
+languages as well. The \sortby command is suggested in the BibTeX manual
+(where it is called \noopsort) and is helpful to force sorting of certain
+entries.
+
+Caution: It is a good idea to leave this preamble intact, unless you know
+what you are doing!
+
+@PREAMBLE{"\input apreambl "
+ # "\newif\ifger\gerfalse "
+ # "\ifnum\language=\german\gertrue\fi "
+ # "\ifnum\language=\austrian\gertrue\fi "
+ # "\def\sortby#1{}"}
+
+------------------------------------------------------------------------------
+
+The next three STRING definitions make it more convenient to distinguish
+between german and other languages. Now you can say something like
+
+ ifger # "Wird demn{\"a}chst erscheinen." # else # "To be published." # fi
+
+in the NOTE field, say, of some database entry.
+
+@STRING{ifger="{\ifger}"}
+@STRING{else="{\else}"}
+@STRING{fi="{\fi}"}
+
+------------------------------------------------------------------------------
+
+Here are the definitions of abbreviated journal names from the plain style
+family, that are lacking in the adaptable style files themselves (so you can
+use your old databases with the adaptable styles as well). Complete this
+list with strings you need for additional journal names, publishing
+companies or whatever.
+
+@STRING{acmcs="ACM Comput. Surv."}
+@STRING{acta="Acta Inf."}
+@STRING{cacm="Commun. ACM"}
+@STRING{ibmjrd="IBM J. Res. Dev."}
+@STRING{ibmsj="IBM Syst.~J."}
+@STRING{ieeese="IEEE Trans. Softw. Eng."}
+@STRING{ieeetc="IEEE Trans. Comput."}
+@STRING{ieeetcad="IEEE Trans. Comput.-Aided Design Integrated Circuits"}
+@STRING{ipl="Inf. Process. Lett."}
+@STRING{jacm="J.~ACM"}
+@STRING{jcss="J.~Comput. Syst. Sci."}
+@STRING{scp="Sci. Comput. Programming"}
+@STRING{sicomp="SIAM J. Comput."}
+@STRING{tocs="ACM Trans. Comput. Syst."}
+@STRING{tods="ACM Trans. Database Syst."}
+@STRING{tog="ACM Trans. Gr."}
+@STRING{toms="ACM Trans. Math. Softw."}
+@STRING{toois="ACM Trans. Office Inf. Syst."}
+@STRING{toplas="ACM Trans. Prog. Lang. Syst."}
+@STRING{tcs="Theoretical Comput. Sci."}
+
+------------------------------------------------------------------------------
+
+That's it!
+
+------------------------------------------------------------------------------
diff --git a/biblio/bibtex/contrib/abstyles/jourfull.bib b/biblio/bibtex/contrib/abstyles/jourfull.bib
new file mode 100644
index 0000000000..6a1553d567
--- /dev/null
+++ b/biblio/bibtex/contrib/abstyles/jourfull.bib
@@ -0,0 +1,74 @@
+This is JOURFULL.BIB, a BibTeX database file for the `adaptable' style
+family, written by Hans-Hermann Bode (HHBODE at DOSUNI1.BITNET). Use jourfull
+as the first item in your \bibliography command, if journal names should be
+written out in full. You may edit this file to add more STRING definitions
+for journal names or other purposes or to delete some that you don't need.
+
+------------------------------------------------------------------------------
+
+First of all we use a PREAMBLE command to put some stuff at the beginning
+of the bibliography. Inputting of apreambl.tex is mandatory for the
+adaptable styles and should always be done at the beginning of the preamble.
+Next, a language switch---easier to use than that in apreamble.tex---is
+defined and set appropriate, that can be used to distinguish between german
+and all other languages; the same technique may be adapted to other
+languages as well. The \sortby command is suggested in the BibTeX manual
+(where it is called \noopsort) and is helpful to force sorting of certain
+entries.
+
+Caution: It is a good idea to leave this preamble intact, unless you know
+what you are doing!
+
+@PREAMBLE{"\input apreambl "
+ # "\newif\ifger\gerfalse "
+ # "\ifnum\language=\german\gertrue\fi "
+ # "\ifnum\language=\austrian\gertrue\fi "
+ # "\def\sortby#1{}"}
+
+------------------------------------------------------------------------------
+
+The next three STRING definitions make it more convenient to distinguish
+between german and other languages. Now you can say something like
+
+ ifger # "Wird demn{\"a}chst erscheinen." # else # "To be published." # fi
+
+in the NOTE field, say, of some database entry.
+
+@STRING{ifger="{\ifger}"}
+@STRING{else="{\else}"}
+@STRING{fi="{\fi}"}
+
+------------------------------------------------------------------------------
+
+Here are the definitions of full journal names from the plain style family,
+that are lacking in the adaptable style files themselves (so you can use
+your old databases with the adaptable styles as well). Complete this list
+with strings you need for additional journal names, publishing companies or
+whatever.
+
+@STRING{acmcs="ACM Computing Surveys"}
+@STRING{acta="Acta Informatica"}
+@STRING{cacm="Communications of the ACM"}
+@STRING{ibmjrd="IBM Journal of Research and Development"}
+@STRING{ibmsj="IBM Systems Journal"}
+@STRING{ieeese="IEEE Transactions on Software Engineering"}
+@STRING{ieeetc="IEEE Transactions on Computers"}
+@STRING{ieeetcad="IEEE Transactions on Computer-Aided Design of Integrated Circuits"}
+@STRING{ipl="Information Processing Letters"}
+@STRING{jacm="Journal of the ACM"}
+@STRING{jcss="Journal of Computer and System Sciences"}
+@STRING{scp="Science of Computer Programming"}
+@STRING{sicomp="SIAM Journal on Computing"}
+@STRING{tocs="ACM Transactions on Computer Systems"}
+@STRING{tods="ACM Transactions on Database Systems"}
+@STRING{tog="ACM Transactions on Graphics"}
+@STRING{toms="ACM Transactions on Mathematical Software"}
+@STRING{toois="ACM Transactions on Office Information Systems"}
+@STRING{toplas="ACM Transactions on Programming Languages and Systems"}
+@STRING{tcs="Theoretical Computer Science"}
+
+------------------------------------------------------------------------------
+
+That's it!
+
+------------------------------------------------------------------------------
diff --git a/biblio/bibtex/contrib/achemso b/biblio/bibtex/contrib/achemso
new file mode 120000
index 0000000000..9e7d00d268
--- /dev/null
+++ b/biblio/bibtex/contrib/achemso
@@ -0,0 +1 @@
+../../../macros/latex/contrib/achemso \ No newline at end of file
diff --git a/biblio/bibtex/contrib/acmtrans/acmtr.bib b/biblio/bibtex/contrib/acmtrans/acmtr.bib
new file mode 100644
index 0000000000..9d6d973579
--- /dev/null
+++ b/biblio/bibtex/contrib/acmtrans/acmtr.bib
@@ -0,0 +1,116 @@
+% acmtr.bib
+% $Header: acmtr.bib,v 1.3 96/01/30 14:27:43 boyland Exp $
+
+@mastersthesis{ko94,
+author = "Jacob Kornerup",
+title = "Mapping Powerlists onto Hypercubes",
+school = "The University of Texas at Austin",
+note = "(In preparation)",
+year = "1994"}
+%month = "dec",}
+
+@PhdThesis{gerndt:89,
+ author = "Michael Gerndt",
+ title = "Automatic Parallelization for Distributed-Memory
+ Multiprocessing Systems",
+ school = "University of Bonn",
+ year = 1989,
+ address = "Bonn, Germany",
+ month = dec
+}
+
+@article{6:1:1,
+author = "J. E. {Archer, Jr.} and R. Conway and F. B. Schneider",
+title = "User recovery and reversal in interactive systems",
+journal = "ACM Trans. Program. Lang. Syst.",
+volume = "6",
+number = "1",
+month = jan,
+year = 1984,
+pages = "1--19"}
+
+@article{7:1:137,
+author = "D. D. Dunlop and V. R. Basili",
+title = "Generalizing specifications for uniformly implemented loops",
+journal = "ACM Trans. Program. Lang. Syst.",
+volume = "7",
+number = "1",
+month = jan,
+year = 1985,
+pages = "137--158"}
+
+@article{7:2:183,
+author = "J. Heering and P. Klint",
+title = "Towards monolingual programming environments",
+journal = "ACM Trans. Program. Lang. Syst.",
+volume = "7",
+number = "2",
+month = apr,
+year = 1985,
+pages = "183--213"}
+
+@book{knuth:texbook,
+author = "Donald E. Knuth",
+title = "The {\TeX{}book}",
+publisher = "Addison-Wesley",
+address = "Reading, Mass.",
+year = 1984}
+
+@article{6:3:380,
+author = "E. Korach and D. Rotem and N. Santoro",
+title = "Distributed algorithms for finding centers and medians in networks",
+journal = "ACM Trans. Program. Lang. Syst.",
+volume = "6",
+number = "3",
+month = jul,
+year = 1984,
+pages = "380--401"}
+
+@book{lamport:latex,
+author = "Leslie Lamport",
+title = "\it {\LaTeX}: A Document Preparation System",
+publisher = "Addison-Wesley",
+address = "Reading, Mass.",
+year = 1986}
+
+@article{7:3:359,
+author = "F. Nielson",
+title = "Program transformations in a denotational setting",
+journal = "ACM Trans. Program. Lang. Syst.",
+volume = "7",
+number = "3",
+month = jul,
+year = 1985,
+pages = "359--379"}
+
+%testing
+@article{test,
+author = "F. Nielson",
+title = "Program transformations in a denotational setting",
+journal = "ACM Trans. Program. Lang. Syst.",
+volume = "7",
+number = "3",
+month = jul,
+year = 1986,
+pages = "359--379"}
+
+
+@inproceedings{reid:scribe,
+author = "Brian K. Reid",
+title = "A high-level approach to computer document formatting",
+booktitle = "Proceedings of the Seventh Annual Symposium on Principles of
+ Programming Languages",
+month = jan,
+year = 1980,
+publisher = "ACM",
+address = "New York",
+pages = "24--31"}
+
+
+
+
+
+
+
+
+
diff --git a/biblio/bibtex/contrib/acmtrans/acmtr2e.pdf b/biblio/bibtex/contrib/acmtrans/acmtr2e.pdf
new file mode 100644
index 0000000000..dc70cf0de8
--- /dev/null
+++ b/biblio/bibtex/contrib/acmtrans/acmtr2e.pdf
Binary files differ
diff --git a/biblio/bibtex/contrib/acmtrans/acmtr2e.tex b/biblio/bibtex/contrib/acmtrans/acmtr2e.tex
new file mode 100644
index 0000000000..f6dd45ba73
--- /dev/null
+++ b/biblio/bibtex/contrib/acmtrans/acmtr2e.tex
@@ -0,0 +1,1000 @@
+% acmtr.tex
+% revised 1/20/97
+% $Header: acmtr.tex,v 1.5 2/14/96 11:07:57 boyland Exp $
+
+\documentclass[hyperref]{acmtrans2e}
+\usepackage[pdfmark]{hyperref}
+
+%&t&{\tt #}&
+%&v&\verb|#|&
+
+\newcommand{\BibTeX}{{\rm B\kern-.05em{\sc i\kern-.025em b}\kern-.08em
+ T\kern-.1667em\lower.7ex\hbox{E}\kern-.125emX}}
+
+\firstfoot{ACM Transactions on Document Formatting,
+ Vol.\ 8, No.\ 1, January 1999, Pages \pages.}
+
+\runningfoot{ACM Transactions on Document Formatting,
+ Vol.\ 8, No.\ 1, January 1999.}
+
+\markboth{Leslie Lamport et al.}{Preparing Articles for the ACM Transactions}
+
+\title{Preparing Articles for the ACM Transactions
+with \LaTeX}
+\author{LESLIE LAMPORT\\Digital Equipment Corporation\\
+ANDREW W. APPEL\\Princeton University \and
+JOHN TANG BOYLAND\\University of California, Berkeley}
+\begin{abstract}
+The \LaTeX\ {\tt acmtrans} document style formats articles in
+the style of the ACM transactions. Users who have prepared their
+document with \LaTeX\ can, with very little effort, produce
+camera-ready copy for these journals.
+%Then the ACM production department
+%will re-typeset from scratch anyway, introducing typographical errors.
+\end{abstract}
+
+\category{D.2.7}{Software Engineering}{Distribution and Main\-ten\-ance}%
+[documentation]
+
+\category{H.4.0}{Information Systems Applications}{General}
+
+\category{I.7.2}{Text Processing}{Document Preparation}[languages \and
+ photocomposition]
+
+\terms{Documentation, Languages}
+
+\keywords{Document preparation, publications, typesetting}
+
+\begin{document}
+
+\setcounter{page}{111}
+
+\begin{bottomstuff}
+Author's address: L. Lamport, System Research Center,
+Digital Equipment Corporation, 130 Lytton Ave., Palo Alto, CA 94301.\newline
+Start of a second footnote ...
+\permission
+\copyright\ 1999 ACM 0164-0925/99/0100-0111 \$00.75
+\end{bottomstuff}
+\maketitle
+
+\section{Introduction}
+
+This article is a description of the \LaTeX\ {\tt acmtrans} document
+style for typesetting articles in the format of the ACM
+transactions---{\em Transactions on Programming Languages and
+Systems}, {\em Transactions on Database Systems}, etc. It has, of
+course, been typeset using this document style, so it is a
+self-illustrating article. The reader is assumed to be familiar
+with \LaTeX, as described by~\citeN{lamport:latex}.
+
+This document also describes the {\tt acmtrans} bibliography style.
+
+\LaTeX\ is a document preparation system
+implemented as a macro package in Donald Knuth's
+\TeX\ typesetting system~\cite{knuth:texbook}. It is based
+upon the premise that the user should describe the logical structure of
+his document and not how the document is to be formatted. Formatting
+is under the direction of a {\em document style} chosen by the user.
+The user can dramatically change the way the document is formatted by
+simply choosing a different document style. The idea of separating the
+logical structure from the formatting comes from Brian Reid's {\em
+Scribe\/} system~\cite{reid:scribe}.
+
+
+It is impossible to provide predefined logical structures to handle all
+situations that may arise in a document, so users must sometimes make
+their own formatting decisions. \LaTeX\ provides a number of features
+to assist in this task and, if necessary, the user can call upon the
+full power of \TeX, which is probably the most powerful typesetting
+system currently available. However, very little user formatting is
+necessary for the majority of documents that appear in journals such as
+the ACM transactions. Consequently, it is quite easy to convert
+an existing \LaTeX\ input file to the {\tt acmtrans} style.
+
+\section{The Title Page}
+
+\subsection{The Title, Author(s), and Abstract}
+
+Following order is mandatory to generate a correct title page:
+
+\begin{verbatim}
+ \documentstyle{acmtrans}
+ \markboth{}{}
+ \title{}
+ \author{}
+ \begin{abstract} ... \end{abstract}
+ \category{}{}{}
+ \terms{}
+ \keywords{}
+ \begin{document}
+ \begin{bottomstuff} ... \end{bottomstuff}
+ \maketitle
+\end{verbatim}
+
+\subsubsection{Title and Author}
+The \LaTeX\ \verb|\title| and \verb|\author| declarations and the
+\verb|\maketitle| command are employed as usual. However, the user
+must format the author a little differently to match the ACM standard.
+The following example \cite{6:1:1} illustrates most features:
+\begin{quote}
+\begin{verbatim}
+\author{JAMES E. ARCHER, JR.\\ Rational Machines
+ \and RICHARD CONWAY and FRED B. SCHNEIDER \\
+ Cornell University}
+\end{verbatim}
+\end{quote}
+Note that authors' names are in uppercase letters, authors are
+separated from their affiliation by a \verb|\\| command, multiple
+authors with the same affiliation are separated by ``and'' (or commas
+and ``and'' if there are more than two), and authors with different
+affiliations are separated by an \verb|\and| command. The following
+example \cite{6:3:380} shows what to do if there are more than
+two affiliations:
+\begin{quote}
+\begin{verbatim}
+\author{E. KORACH \\ IBM Israel \\
+ D. ROTEM \\ University of Waterloo
+ \and N. SANTORO \\ Carleton University}
+\end{verbatim}
+\end{quote}
+In both the title and the author, you may have to insert \verb|\\|
+commands if lines need to be broken.
+
+\subsubsection{Abstract}
+The abstract is typed as usual with the {\tt abstract} environment.
+However, this environment must come before the \verb|\maketitle|
+command.
+
+
+\subsection{Content Indicators and Keywords}
+
+The content indicators and keywords are entered with \LaTeX\
+declarations. The CR categories are indicated with \verb|\category|
+declarations. The first CR category of this article, appearing
+right below the abstract, was entered with the following command:
+\begin{quote}
+\begin{verbatim}
+\category{D.2.7}{Software Engineering}{Distribution and
+ Maintenance}[Documentation]
+\end{verbatim}
+\end{quote}
+Note that the last argument (which contains the subject descriptors)
+is optional, since some categories have none. Multiple subject descriptors
+are separated by \verb|\and| commands, as in the last category of
+this article:
+\begin{quote}
+\begin{verbatim}
+\category{I.7.2}{Text Processing}{Document Preparation}
+ [Languages \and Photocomposition]
+\end{verbatim}
+\end{quote}
+Use a separate \verb|\category| declaration for each CR category;
+they will be listed in the order that the commands appear. The
+\verb|\category| commands must precede the \verb|\maketitle|
+command.
+
+The General Terms are declared with a (single) \verb|\terms|
+command as in the one for this article:
+\begin{quote}
+\begin{verbatim}
+\terms{Documentation, Languages}
+\end{verbatim}
+\end{quote}
+The \verb|\terms| declaration must come before the \verb|\maketitle|
+command. The terms {\it must} be chosen from the following list:
+\begin{quote}
+Algorithms;
+Design;
+Documentation;
+Economics;
+Experimentation;
+Human factors;
+Languages;
+Legal aspects;
+Management;
+Measurement;
+Performance;
+Reliability;
+Security;
+Standardization;
+Theory;
+Verification;
+\end{quote}
+The general terms are
+orthogonal to the Categories, at least theoretically, and so
+may be applied to any elements of the classification tree.
+
+Think of them as `perspectives' from which any topic may
+be approached. Thus you could use {\em Theory} or {\em Performance} for an
+article about {\em C.2.1 Distributed Networks}. However,
+some of these general terms actually slide over into
+content areas. Thus {\em Legal aspects} is a general term
+applicable to any category, but also an entire node in the tree,
+{\em K.5}, devoted to {\em Legal aspects of computing,} with many sub-topics.
+
+So, though perhaps not perfect, the General Terms are most useful
+in online searches when used in combination with categories.
+
+The ``Additional Keywords and Phrases'' item on the title page
+is provided by the \verb|\keywords| declaration, {\bf listed alphabetically\/}.
+For this article,
+they were produced by the following command:
+\begin{quote}
+\begin{verbatim}
+\keywords{Document preparation, publications, typesetting}
+\end{verbatim}
+\end{quote}
+There is no prescribed list of ``additional keywords;'' use any that
+you want.
+
+\subsection{The Bottom of the Title Page}
+
+The bottom of the article's title page contains acknowledgment of
+support, the author(s) address(es), a ``permission to copy'' statement,
+and a line containing a copyright symbol (\copyright) and a mysterious
+number. This is all entered with a {\tt bottomstuff} environment;
+there must be no blank line after the \verb|\begin{bottomstuff}|
+command. The permission to copy statement is produced by the
+\verb|\permission| command.
+
+\subsection{The Page Headers}
+
+\verb|\markboth{}{}| generates the left- and right-page headers. The first
+argument is the author's name(s):
+
+\begin{itemize}
+\item If there is one author, then use author's full name (ex. Leslie Lamport);
+\item If there are two authors, then abbreviate each author's first name
+ (L.~Lamport and A.~Appel);
+\item If there are more than two authors, then the format is Leslie Lamport et al.
+\end{itemize}
+
+The second argument of \verb|markboth| is the title;
+if the title is too long,
+contract it by omitting subtitles and phrases, not by abbreviating words.
+
+
+\section{Ordinary Text}
+
+Most of the body of the text is typed just as in an ordinary
+document. This section lists the differences.
+
+\subsection{Lists}
+
+\subsubsection{Enumeration and Itemization}
+
+Let's begin with enumeration.
+\begin{longenum}
+\item The ACM style has two different formats for
+itemized lists, which I will call the {\em long\/} and {\em short\/}
+formats. The long format is generally used when the individual items
+are more than two or three lines long, but ACM has been inconsistent in
+their choice of format, sometimes using the long format for lists whose
+items are all one or two lines long and the short format for lists of
+long items. This list is an example of the long format.
+
+\item The ordinary {\tt enumerate} environment
+produces the short format. For the long format, use the
+{\tt longenum} environment.
+\begin{enumerate}\itemindent 10pt
+\item This inner enumeration uses the short format.
+\item It was produced using \LaTeX's ordinary {\tt enumerate}
+ environment.
+\item ACM has no standard for enumerations nested more than
+ two levels deep, so the {\tt acmtrans} style does not
+ handle them well.
+\end{enumerate}
+\end{longenum}
+
+Itemized lists are similar to enumerated ones.
+\begin{longitem}
+\item As with enumerations, there is a long and a short
+format for itemized lists. This list is in the long format.
+
+\item The long format is produced by the {\tt longitem}
+environment. The ordinary {\tt itemize} environment
+uses the short format.
+\begin{itemize}
+\item This is an itemized list using the short format.
+
+\item It was produced with the {\tt itemize} environment
+that is used in ordinary \LaTeX\ input.
+\end{itemize}
+\end{longitem}
+
+It is interesting to observe that the style of tick mark used
+for an itemization changed around 1985 from an en dash
+(--) to an em dash (---). % jtb: changed!
+
+\subsubsection{Descriptions}
+
+A list is a sequence of displayed text elements, called items, each
+composed of the following two elements:
+\begin{describe}{{\em item body\/}:}
+\item[{\em label\/}:]
+A marker that identifies or sets off the item. It
+is a number in an enumerated list and a tick mark in an itemized list.
+
+\item[{\em item body\/}:] The text of the item. It is usually ordinary prose,
+but sometimes consists of an equation, a program statement, etc.
+
+Or another paragraph, which will be indented like normal paragraphs.
+\end{describe}
+
+When the labels of a list are names rather than numbers or tick marks,
+the list is called a {\em description\/} list.
+The ACM style
+has both long and short description lists. The above list is a short
+description list; the bodies of all the items are indented enough to
+accommodate the widest label.
+The following list is a long description list.
+The {\tt acmtrans} style provides both kinds of description lists:
+\begin{description}
+\item[short]
+The {\tt describe} environment
+%that works the
+%same as the {\tt description} environment except that it
+takes an argument, which should be the same as the argument of the \verb|\item|
+command that produces the widest label. Thus, the above description
+list was begun with the command
+\begin{quote}
+\begin{verbatim}
+\begin{describe}{{\em item body\/}:}
+\end{verbatim}
+\end{quote}
+
+A description label is often emphasized in some way; in this example I
+used the \LaTeX\ \verb|\em| command, italicized the label. The ACM
+appears to have no standard convention for formatting the labels of a
+description list, so the {\tt describe} environment leaves the label
+formatting up to you. An \verb|\hfill| command can be used to produce
+a label like ``{\em gnu \hfill --\/}'' where {\em gnu\/} is flush left
+against the margin and the ``--'' is aligned flush right next to the
+item body.
+
+\item[long]
+The standard \LaTeX\ {\tt description} environment produces a long
+description list. It italicizes the labels, and puts a period after
+them, which seems to be what is done in the ACM transactions.
+\end{description}
+
+\subsection{Theorems, Etc.}
+
+%\newtheorem{theorem}{Theorem}[subsection]
+%\begin{theorem}
+%testing section counter
+%\end{theorem}
+
+\LaTeX\ provides a single class of theorem-like environments, which are
+defined with the \verb|\newtheorem| command. The ACM transactions
+style divides this class into two subclasses that are formatted
+differently. The first class includes theorems, corollaries, lemmas,
+and propositions. It is produced with the \verb|\newtheorem| command.
+Such a theorem-like environment is often followed by a proof, for which
+the {\tt acmtrans} style provides a {\tt proof} environment.
+
+\newtheorem{subtheorem}{Theorem}[subsection]
+\begin{subtheorem}
+Notice that theorems are numbered inside the nearest section\newline subsection.
+\end{subtheorem}
+
+When listing within the theorem environment, this style will now produce
+roman parantheses. Thank you David Sands.
+
+\begin{proof}
+This theorem is an instance of {\tt subtheorem}, theorems nested in
+subsections.
+\end{proof}
+
+
+The second subclass of theorem-like environments includes ones for
+definitions, examples, and remarks. These environments are defined
+with the \verb|\newdef| command, which works the same as
+\verb|\newtheorem|. Here
+is an example of such an environment.
+
+\newdef{subexample}[subtheorem]{Definition}
+
+\begin{subexample}
+This is an example of a Definition, typed with an {\tt subexample}
+environment defined with \verb|\newdef|.
+As you can see theorems are italicized and definitions are not.
+\end{subexample}
+
+\newtheorem{subproperty}[subtheorem]{Property}
+
+Sometimes theorem-like environments are numbered in unusual ways, or
+are identified by a name. Consider the following example
+from~\citeN{7:3:359}.
+\begin{subproperty}[{\rm Ca}]
+Let syn $\in$ Syn, occ $\in$ Occ be maximal and sta $\in$ Sta. Then
+Tcol\/{\rm [[}syn\/{\rm ]]} occ sta\hspace{-2pt} $\downarrow\!1$ $=$
+Tsto\/{\rm [[}syn\/{\rm ]]} sta.
+\end{subproperty}
+\begin{proof}[of Property {\rm Ca}]
+By straightforward structural induction, and is \linebreak
+omitted.
+\end{proof}
+It was obtained by giving optional arguments to the
+{\tt property} environment (defined with \verb|\newtheorem|)
+and the {\tt proof} environment and was typed as follows.
+\begin{quote}
+\begin{verbatim}
+\begin{subproperty}[{\rm Ca}] Let ... \end{subproperty}
+\begin{proof}[of Property {\rm Ca}] By straightforward ...
+\end{verbatim}
+\end{quote}
+Notice that the optional argument to the {\tt property} environment
+suppresses the automatic numbering. If a null optional argument
+were given to this environment by typing ``{\tt []}'', then
+it would have produced the label ``{\sc Property.}'' This is
+how unnumbered theorems, etc.\ are produced.
+
+Environments defined by \verb|\newdef| use the optional
+argument the same way as those defined by \verb|\newtheorem|.
+
+\vskip10pt
+With this definition
+
+\begin{verbatim}
+ \newtheorem{secthm}{Theorem}[section]
+\end{verbatim}
+\noindent
+one can solve the counter problems and counter and label problems for
+theorems, lemmas and definitions etc.
+
+With the above definition and with the following variations
+\begin{verbatim}
+ \newdef{secdefn}[secthm]{Definition} or
+ \newdef{seclem}[secthm]{Lemma} or
+ \newdef{sectheo}{secthm]{Theorem} etc.
+\end{verbatim}
+\noindent
+one can achieve
+\begin{enumerate}
+\item correct counters in definitions, theorems etc. in \verb|\section| environment.
+For example, to generate ``Definition 4.1.''; without the above two definitions, it produces ``Definition 4.0.1.'' and
+\item correct counter and label associated with definitions, theorems etc. in any environment (section or subsection). For example,
+\begin{verbatim}
+ \begin{secdefn}[\thesecthm\ (label)]
+ text text text
+ \end{secdefn}
+\end{verbatim}
+produces the correct definition counter + correct placement of the period as in
+``Definition 3.1 (label).''.
+\end{enumerate}
+
+\subsection{Overfull hbox - Stretching/filling one horizontal line}
+
+To solve a line break due to ``Overfull \verb|\hbox|'', here is a plain \TeX\
+solution; here \verb|\hsize| is the default setting of acmtrans.sty:
+
+\begin{center}
+\verb|\hbox to \hsize{line sentence to be stretched}|
+\end{center}
+
+This can be used in a list environment as well but \verb|\hsize| declared to a reduce
+dimension:
+
+\begin{verbatim}
+ \hbox{\vbox{\hsize = less than the default setting
+ \hbox to \hsize{line sentence to be stretched}}}
+\end{verbatim}
+
+\subsection{Programs}
+
+Good formatting of programs requires a knowledge of their semantics,
+and is beyond the scope of a document production system. While
+``pretty printers'' are useful for handling the many pages of a real
+program, the short examples that are published in articles should be
+formatted by hand to improve their clarity. The \LaTeX\ {\tt tabbing}
+environment makes the formatting of programs relatively easy,
+especially if the user defines commands for his particular language
+constructs.
+One may also use the {\tt verbatim} environment.
+
+The ACM transactions style requires that programs be formatted with
+different size fonts, depending upon whether they appear in the text or
+in a figure, but that is handled by the figure macro which
+automatically sets the correct font size.
+%The {\tt acmtrans} style provides a {\tt program}
+%environment that is exactly the same as the standard {\tt tabbing}
+%environment except for the size of the fonts it uses. This environment
+%should be used for formatting programs, whether they appear in the
+%running text or in a figure.
+Moreover, programs in running text should be indented two ems
+on each side (as provided by the {\tt quote} environment), and
+programs in regular figures should be centered.
+(Programs in ``narrow figures'' (q.v.) are left or right justified
+automatically).
+
+Here is an example of a program:
+\begin{quote}
+\begin{tabbing}
+{\bf type} date =\\
+\hspace*{1em}\= {\bf record} \= day: 1\,.\,.\,31;\+\+\\
+ month: 1\,.\,.\,12;\\
+ year: integer \-\\
+ {\bf end} \-\\
+{\bf var} mybirth, today : date;\\
+{\bf var} myage : integer;
+\end{tabbing}
+\end{quote}
+Figure~\ref{fig:prog} shows how the same program looks in a figure.
+\begin{figure}
+\centerline{\parbox{104pt}{% it's safe to overestimate the size here
+\begin{tabbing}
+{\bf type} date =\\
+\hspace*{1em}\= {\bf record} \= day: 1\,.\,.\,31;\+\+\\
+ month: 1\,.\,.\,12;\\
+ year: integer \-\\
+ {\bf end} \-\\
+{\bf var} mybirth, today : date;\\
+{\bf var} myage : integer;
+\end{tabbing}}}
+\caption{An example of a program centered in a figure}
+\label{fig:prog}
+\end{figure}
+
+%The ACM standard calls for the program to start flush at the left
+%margin, with each new level of nesting indented by a distance of one
+%em, and with the continuation of broken lines indented two ems. However,
+%this standard is not applied consistently.
+
+In addition to formatting programs, the {\tt tabbing} environment may be
+used for similar displayed material such as BNF syntax specifications
+and rewrite rules.
+
+\subsection{User-specified Formatting}
+
+If \LaTeX\ does not provide a particular text structure, the user must
+define it himself and specify how it is to be formatted. This is most
+easily done by defining the new structure in terms of existing ones;
+the \LaTeX\ {\tt list} and {\tt trivlist} environments are useful
+tools. However, it is occasionally necessary for the user to provide
+explicit formatting commands.
+
+The best guide to how something should be formatted is what has been
+done in the ACM transactions. While horizontal spacing tends to depend
+strongly upon the particular text, there is a standard amount of
+vertical space used to set off text. The ordinary \LaTeX\
+\verb|\medskip| command produces a vertical space of the appropriate
+size.
+
+\section{Figures and Tables}
+
+\subsection{Figures}
+
+The ordinary \LaTeX\ {\tt figure} environment works as usual.
+Figure~\ref{fig:ordinary}, which is Figure~6 of \citeN{7:3:359}, a bogus reference,
+\begin{figure}
+\centering
+\(\begin{array}{c|ccc}
+ & \bot & F & T \\
+\hline
+\bot & \bot & \bot & T \\
+F & \bot & F & T \\
+T & \bot & T & T
+\end{array}\)
+\caption{The truth table for the parallel-or.}
+\label{fig:ordinary}
+\end{figure}
+was produced in this way.
+Note that figures should never appear in the text or at the bottom of
+a page. (If you use the figure placement optional argument, use only
+\verb"t" or \verb"p" or both; do not use \verb"h" or \verb"b").
+
+Some figures (and tables) have no caption except for the figure number.
+For such figures (and tables), one uses a \verb|\nocaption| command,
+which has no argument, instead of the \verb|\caption| command.
+
+\begin{narrowfig}{3in}
+\begin{tabbing}
+{\bf type} date =\\
+\hspace*{1em}\= {\bf record} \= day: 1\,.\,.\,31;\+\+\\
+ month: 1\,.\,.\,12;\\
+ year: integer \-\\
+ {\bf end} \-\\
+{\bf var} mybirth, today : date;\\
+{\bf var} myage : integer;
+\end{tabbing}
+\caption{An example of a program displayed in a figure.}
+\label{fig:narrow}
+\end{narrowfig}
+
+In addition to this method of formatting figures, the ACM transactions
+also uses figures with side captions, as in Figure~\ref{fig:narrow}.
+Such a figure is produced with the {\tt narrowfig} environment. This
+environment has a single mandatory argument, which is the width of the
+figure.
+Note that if the figure is generated by {\tt tabbing} or {\tt
+tabular}, one can safely overestimate the size.
+It works just like the ordinary {\tt figure} environment,
+except it must contain only one \verb|\caption| or \verb|\nocaption|
+command, which must come after the figure itself.
+
+The {\tt narrowfig} environment should obviously not be used unless the
+figure is narrow enough to leave a reasonable amount of space beside it
+for the caption. The ACM seems to have no consistent policy for choosing
+which style of figure to employ.
+
+\subsection{Tables}
+
+The ordinary \LaTeX\ {\tt table} environment can be used, but it
+requires the user to add formatting commands to match the ACM
+transactions style. This formatting is performed automatically
+if the {\tt acmtable} environment is used instead, producing
+the result shown in Table~\ref{tab:table}, which shows the same
+table displayed in Figure~\ref{fig:ordinary}.
+\begin{acmtable}{100pt}
+\centering
+\(\begin{array}{c|ccc}
+ & \bot & F & T \\
+\hline
+\bot & \bot & \bot & T \\
+F & \bot & F & T \\
+T & \bot & T & T
+\end{array}\)
+\caption{The truth table for the parallel-or.}
+\label{tab:table}
+\end{acmtable}
+This environment has a mandatory argument that equals the width
+of the table---more precisely, it specifies the width of the rules
+above and below the table. There must be only one
+\verb|\caption| or \verb|\nocaption|
+command, which must come after the text of the table.
+(Even though the table caption is printed above the table, the
+\verb|\caption| command comes after the table in the input file.)
+
+
+\section{The End of the Document}
+
+\subsection{Appendix}
+
+The appendix (if the article has one) should precede the
+acknowledgments (if any) and bibliography.
+If the appendix isn't broken into separate sections,
+then you should add the following commands after the \verb|\appendix|
+command:
+\begin{quote}
+\begin{verbatim}
+\section*{APPENDIX}
+\setcounter{section}{1}
+\end{verbatim}
+\end{quote}
+Setting the counter is necessary so that numbered subsections and
+theorems will have the names ``A.{\em N\/}'' in the text.
+
+For an article with multiple appendices, one begins
+the appendix with an \verb|\appendix| followed by
+\verb|\section*{APPENDIX}|, and then starts each
+appendix with an ordinary \verb|\section| command.
+
+Information about electronic appendices is given in
+Section~\ref{sec:elecappendix} and in the Appendix.
+
+\subsection{Acknowledgments}
+
+An optional acknowledgments section follows all the text of the
+article, including any appendices. It is produced with the
+{\tt acks} environment. (Since I can never remember how many
+{\em e\/}'s there are in {\em acknowledgments}, it seemed
+like an abbreviation was in order for the environment name.
+One may also spell out the name as {\tt acknowledgments}).
+Sometimes, there is just a single acknowledgment.
+This may be given using the {\tt ack} or {\tt acknowledgment}
+environment.
+
+\subsection{Bibliography}
+
+The bibliography follows the acknowledgments, and is the last
+significant body of text in the article. It is produced by the usual
+\LaTeX\ commands.
+
+In 1993 the ACM changed bibliography styles, from numerical citations [13]
+to author's name and year \cite{7:3:359}.
+The user is encouraged to let \LaTeX\ produce his bibliography
+with the \verb|\bibliography| command, letting \BibTeX\ handle the
+formatting of the entries.
+The \verb|acmtrans.sty|
+bibliography style file now generates citations in this format.
+Put
+\begin{quote}
+\begin{verbatim}
+\bibliographystyle{acmtrans}
+\end{verbatim}
+\end{quote}
+between the \verb|\begin{document}| and the \verb|\end{document}|.
+
+The conventional \verb|\cite| command will generate citations as usual in
+\LaTeX.
+Note that the style file automatically omits repeating author
+names~\cite{7:3:359,test}.
+If you mention the work explicitly in your prose, you should use
+\verb|\citeN| command. This command generates for example, \citeN{7:3:359}
+discusses denotational program transformations. Or, you use
+\verb|\citeyear| and say that Nielson \citeyear{7:3:359} discusses
+them.
+The command \verb|\shortcite| is an alias for \verb|\citeyear|.
+Either command may be used in cases where one refers to multiple
+works (of the same authors!).
+For example, \verb|Nielson~\shortcite{7:3:359,test}| generates
+Nielson~\shortcite{7:3:359,test}.
+%To generate author~[year1; year2], give the author's name and then use
+%the command \verb|\citeNN{year1,year2}|,
+%which generates ``Nielson~\citeNN{7:3:359,test}.''
+
+More variations of \verb|\cite| are discussed in comments in the
+\verb|acmtrans.sty| file. Here are some {\bf examples} on how to get
+
+\begin{enumerate}
+\item{Appel [1996]} $\rightarrow$ using either \verb|\citeN| or \verb|\citeyear|
+\item{[Kempe 1879]} $\rightarrow$ \verb|\cite{kempe79}|
+\item{Appel [1995; 1996]} $\rightarrow$ \verb|\shortcite{ref1-key,ref2-key}|
+\item{Fil\'e [1981a; 1981b]} $\rightarrow$ \verb|Fil\'{e}~\shortcite{engelfriet/file:81sweep,|\\
+\hbox{}\kern.2in\verb|engelfriet/file:81passes}| or simply \verb|\shortcite{ref1-key, ref2-key}|
+\item{[Appel and Shao 1992; Shao and Appel 1994]} $\rightarrow$
+\verb|\cite{appel-zhong-lsc92,|\\
+\hbox{}\kern3.5in\verb|shao94:clo}|
+\item{Chow and Harrison [1992; 1994]} $\rightarrow$
+ Chow~and~Harrison~[\verb|\citeyearNP{CH-popl92};|
+ \hbox{}\kern2in\verb|\citeyearNP{CH-iccl94}|]
+\item{[Chow and Harrison 1992; 1994; Cousot and Cousot 1984]} $\rightarrow$
+\verb|[\citeNP{CH-popl92};|\\
+ \hbox{}\kern1.7in \verb|\citeyearNP{CH-iccl94}; \citeNP{CC-apct77}]|
+\item{[Cytron et al. 1991]} $\rightarrow$ \verb|\cite{cytron-et-al-toplas91}|
+\item{Briggs et al. [1994]} $\rightarrow$ \verb|\citeN{briggs-cooper-torczon-toplas94}| or
+\item{Duri et al. [1993]} $\rightarrow$ \verb|Duri~et~al.~\citeyear{DBDS-sigsoft93}|
+\item{[Chaitin 1982; Chaitin et al. 1981]} $\rightarrow$ \verb|\cite{chaitin-pldi82,chaitin-et-al-cl81}|
+\item{[Alblas 1991; Deransart et al. 1988; Knuth 1868]} $\rightarrow$
+\verb|\cite{alblas:91intro,|
+\hbox{}\kern1in\verb|deransart/jourdan/lorho:88ag,knuth:68semantics}|
+\item{[Gary and Johnson 1979]} $\rightarrow$ \verb|\cite{garey-johnson-bk79}|
+\item{[Brand and Zafiropulo 1983; Gouda et al. 1984;1987]} $\rightarrow$ \newline
+\verb|[\citeNP{brand83}; \citeNP{gouda84};\citeyearNP{gouda87}]|
+\end{enumerate}
+\noindent
+The list will be updated as we find unique cases.
+
+\subsection{Received Date}
+
+An ACM transactions article ends with the dates that the article and its
+revised versions were received and the date it was accepted for
+publication. In the {\tt acmtrans} document style, this information is
+produced with the {\tt received} environment. Type the body of the
+environment just as it should appear in the printed version.
+(Note that only \verb"Received" and the months should be capitalized,
+the entries should be separated by semicolons,
+and the whole ``sentence'' should {\em not} be terminated by a period.)
+You can get these dates from the editor-in-chief.
+
+\section{Running Heads and Feet}
+
+The running foot of all but the title page of the article is declared
+with the \linebreak
+\verb|\runningfoot| command. It contains the name of the
+journal, volume, number, and date. The foot for the title page
+contains this information plus the page numbers. It is declared
+with the \verb|\firstfoot| command.
+
+The \verb|\pages| command prints the page numbers of the article,
+producing something like ``123--132''. It is implemented with the
+\LaTeX\ \verb|\pageref| command, so it will not produce the correct
+page numbers the first time the file is run through \LaTeX, or if the
+number of the first or last page has changed since the last time.
+
+The default page style for the {\tt acmtrans} style is {\tt
+myheadings}. Thus, a \verb|\markboth| command is used to set the
+running heads. The left head contains the author's name (or authors'
+names) and the right head contains the title. For long titles,
+some contraction of the title is used.
+
+{\bf
+At present, the ACM prefers to strip in their own running heads and
+feet, so it is unnecessary to worry about them when producing
+camera-ready copy.
+}
+
+\section{Interacting with ACM's Production Staff}
+
+After your article is accepted, format your document and send
+a Postscript file to the editor-in-chief. An ACM copy editor will
+mark up a paper copy and send it back to you for corrections.
+If there are just a few corrections, they may be sent to you by e-mail.
+Iterate this process until the copy editor is satisfied (it may take
+one or two iterations).
+
+Then print your final camera-ready copy on a 1200-dpi phototypesetter
+(or a 600-dpi laser printer, if you must) and mail it to ACM.
+
+If you are using a laser printer for your final camera-ready copy,
+you may enjoy using special paper designed for this purpose (it gives
+a sharper image on a whiter background). One such paper
+(manufactured by Hammermill Papers) is:
+\begin{verse}
+ Hammermill Laser Plus (Featuring Wax Holdout)\\
+ 8$\frac{1}{2}$x11--12M--S24/60\\
+ 10450--5\\
+ For Prepress Proofing and Camera-Ready Masters.
+\end{verse}
+
+But the use of special paper is entirely optional; plain white laser-printer
+paper is fine.
+
+\subsection{ACM Copy Editors' Preferences}
+
+We wish to thank the authors who have mailed to us copies of their page proofs.
+From the page proofs (and explicit requests from ACM), here is a list of items most
+frequently marked up by the copy editors.
+
+\begin{description}\itemindent\labelsep % that is, no indentation
+\item[\bf Center] Displayed items like figures, pieces of program codes, and equations. Equation numbers to appear right flushed. Remember to add a period if the displayed equation ends in a sentence.
+\item[\bf Fonts] Following items in regular Roman font:
+\begin{itemize}
+\item such words like et al., e.g., i.e., ad hoc, and bona fide, and
+\item the body of the definition environment.
+\end{itemize}
+\item[\bf Etc] No double period when a sentence ends with ``etc.''
+\item[\bf Figure] Spell out the word ``figure'' when using in a sentence, as in Figure 1.
+Use a period as in ``Fig. 1.'' and not a colon as in ``Fig. 1:''
+\item[\bf Contractions] Avoid the use of contractions; for example, use
+{\em do not} instead of {\em don't}.
+(If you prefer to use contractions to avoid
+stuffiness, you'll have to tell the copy editor explicitly after you
+get the marked-up proofs.)
+\item[\bf Conference References] Please use {\it 4th International Conf. on
+Document Formatting}, not {\it Fourth International Conference ...}; that
+is, do not spell out the number.
+\item[\bf Journal References] Figure~\ref{fig:abbrev} gives common journal abbreviations; there is a duplicate list in the acmtrans.bst file for your convenience. Using the {\it abbreviation} feature of \BibTeX\ for journal
+names (and months!) makes it easy to follow the rules.
+\end{description}
+
+\begin{figure}\noindent
+\begin{tabular}{l|l||l|l}
+\footnotesize
+acmcs&ACM Comput. Surv.&jlp&J. Logic Program.\\
+acmlett&ACM Lett. Program. Lang. Syst.&jcss&J. Comput. Syst. Sci.\\
+acta&Acta Inf.&jsmrp&J. Softw. Maint. Res. Pract.\\
+al&Ada Lett.&jss&J. Syst. Softw.\\
+acr&Adv. Comput. Res.&jlsc&J. Lisp Symb. Comput.\\
+bit&Bit&lpls&Lett. Program. Lang. Syst.\\
+cacm&Commun. ACM&mscs&Math. Struct. Comput. Sci.\\
+cj&Comput. J.&mst&Math. Syst. Theor.\\
+cn&Comput. J.&ngc&New Gen. Comput.\\
+cl&Comput. Lang.&scp&Sci. Comput. Program.\\
+ict&Inf. Contr.&sicomp&SIAM J. Comput.\\
+ieebcs&IEE/BCS Softw. Eng. J.&spe&Softw. Pract. Exper.\\
+ieees&IEEE Softw.&tocs&ACM Trans. Comput. Syst.\\
+ieeese&IEEE Trans. Softw. Eng.&tods&ACM Trans. Database Syst.\\
+ieeetc&IEEE Trans. Comput.&tog&ACM Trans. Graphics\\
+ieeetpds&IEEE Trans. Parall. Distrib. Syst.&toms&ACM Trans. Math. Softw.\\
+ieeetit&IEEE Trans. Inf. Theory&toois&ACM Trans. Office Inf. Syst.\\
+ipl&Inf. Process. Lett.&toplas&ACM Trans. Program. Lang. Syst.\\
+icp&Inf. Comput.&tcs&Theor. Comput. Sci.\\
+ist&Inf. Softw. Tech.&tr&Tech. Rep.\\
+ijsa&Int. J. Supercomput. Appl.&jf&J. Funct. Program.\\
+ijpp&Int. J. Parallel Program.&jlc&J. Logic and Comput.\\
+\end{tabular}
+\caption{Common journal abbreviations.}
+\label{fig:abbrev}
+\end{figure}
+
+The best method of
+reducing the number of copy editorial markups is by using a recent ACM journal
+as a guide to typesetting your article.
+
+\section{Electronic Appendices}
+\label{sec:elecappendix}
+
+Because of severe constraints on how many pages it can print,
+{\it ACM Transactions on Programming Languages and Systems} (TOPLAS)
+accepts some articles with {\it electronic appendices:} appendices
+in Postscript format that will not appear in the printed article but
+will be available separately. If your article is accepted with an
+electronic appendix, you should put an appendix header where the
+appendix normally belongs (before the ``acknowledgments'').
+The body of the electronic appendix should be given after the
+references.
+The \verb|appendixhead| command is given
+\begin{quote}
+{\tt \verb|\|appendixhead\{{\it journal}\}\{{\it article-id}\}}
+\end{quote}
+where {\it journal} is the name of the journal (e.g. {\tt toplas} or
+{\tt todf}), and
+{\it article-id} is a number given to you by the Editor.
+The result of \verb|\appendixhead| looks like this:\footnote{%
+See the end of this document for the remainder of the explanation of
+electronic appendices}
+
+\appendix
+\section*{ONLINE-ONLY APPENDICES}
+\setcounter{secnumbookdepth}{-1}
+% \begin{NoHyper}
+\section{Splitting off the electronic appendix}
+\section{Single appendix}
+\section{Multiple appendices}
+% \end{NoHyper}
+\setcounter{secnumbookdepth}{3}
+
+\appendixhead{Appendix A is}{appendix}{http://www.acm.org/toplas}
+
+\begin{acks}
+We wish to thank Howard Trickey for providing the now-obsolete
+version of the {\tt acmtrans}
+bibliography style, and for giving advice on creating the new one;
+Rebecca Davies for helping to adapt
+Glenn Paulley's ``Chicago'' bibliography
+style to fit the new ACM style;
+and Marilyn Salmansohn and George Criscione for providing information
+on the official ACM transactions style.
+\end{acks}
+
+\bibliographystyle{acmtrans}
+\bibliography{acmtr}
+\begin{received}
+Received February 1986;
+November 1993;
+accepted January 1996
+\end{received}
+
+elecappendix{http://www.acm.org/toplas}{1998}{ACM Transactions on Document Formatting,
+ Vol.~8, No.~1, January 1999, Pages \pages.}{
+\copyright\ 1999 ACM 0164-0925/98/0100-0208A \$5.00}
+
+The contents of the electronic appendix is written after the references
+and the ``received'' environment.
+The electronic appendix is started
+by an \verb|\elecappendix| command that takes two
+required arguments:
+\begin{quote}
+{\tt \verb|\|elecappendix\{{\it year}\}\{{\it ref\/}\}}
+\end{quote}
+where
+{\it year} is the year of appearance (or, if this not known, the year
+of acceptance), necessary for the copyright notice, and
+{\it ref\/} is a sentence provided by the Editor describing the
+publication reference
+information regarding your article.
+
+\section{Splitting off the electronic appendix}
+
+If you have an electronic appendix, only the main body of the
+article, up through and including the description of how to obtain
+the electronic appendix, will be printed in the journal.
+
+It will be necessary to split your dvi or Postscript file into
+two parts: one to be printed, the other to be available by
+FTP. Please split your Postscript into two separate postscript files
+using {\tt dvipages} or {\tt pslpr} and
+email them separately to the Editor.
+
+Note that the pages of the appendix are numbered A-1, A-2, etc.
+so as not to interfere with the normal journal pagination.
+
+\section{Single Appendix}
+
+When an article has a single electronic appendix, then after
+the \verb|\elecappendix| command, type the following.
+\begin{quote}
+\begin{verbatim}
+\setcounter{section}{1}
+\end{verbatim}
+\end{quote}
+If the text starts immediately, add a \verb|\medskip| to set off the
+text from the horizontal rule created by \verb|\elecappendix|.
+
+\section{Multiple appendices}
+
+For an article with multiple electronic appendices, one begins
+the appendix with an \verb|\elecappendix|
+command, then starts each
+appendix with an ordinary \verb|\section| command. Lower levels of
+sectioning are produced by the ordinary sectioning commands.
+
+\end{document}
+
+
+
+
+
diff --git a/biblio/bibtex/contrib/acmtrans/acmtrans.bst b/biblio/bibtex/contrib/acmtrans/acmtrans.bst
new file mode 100644
index 0000000000..f9720fd4a9
--- /dev/null
+++ b/biblio/bibtex/contrib/acmtrans/acmtrans.bst
@@ -0,0 +1,1768 @@
+% "ACM Transactions" BibTeX style, acmtrans.bst
+% for BibTeX version 0.99c, LaTeX version 3.141
+% Revised 28-MARCH-1996
+% Revised 30-JUNE-1995
+% Revised 15-JAN-1996
+% $Header: acmtrans.bst,v 1.2 96/01/17 09:05:38 boyland Exp $
+%
+% Hacked by John T. Boyland at University of California, Berkeley
+% (with assistance by John R. Hauser)
+% Hacked by Andrew W. Appel and Rebecca L. Davies at Princeton University,
+% based on a "chicago.bst" by Glenn Paulley at U. Waterloo,
+% which was based on "newapa.bst" found at ymir.claremont.edu.
+%
+% Citation format: [author-last-name year]
+% [author-last-name and author-last-name year]
+% [author-last-name, author-last-name, and author-last-name year]
+% [author-last-name et al. year]
+% [author-last-name]
+% author-last-name [year]
+% [author-last-name and author-last-name]
+% [author-last-name et al.]
+% [year] or [year,year]
+% year or year,year
+%
+% Reference list ordering: alphabetical by author or whatever passes
+% for author in the absence of one.
+%
+% This BibTeX style has support for abbreviated author lists and for
+% year-only citations. This is done by having the citations
+% actually look like
+%
+% \citeauthoryear{full-author-info}{abbrev-author-info}{year}
+%
+% The LaTeX style has to have the following (or similar)
+%
+% \let\@internalcite\cite
+% \def\fullcite{\def\citeauthoryear##1##2##3{##1, ##3}\@internalcite}
+% \def\fullciteA{\def\citeauthoryear##1##2##3{##1}\@internalcite}
+% \def\shortcite{\def\citeauthoryear##1##2##3{##2, ##3}\@internalcite}
+% \def\shortciteA{\def\citeauthoryear##1##2##3{##2}\@internalcite}
+% \def\citeyear{\def\citeauthoryear##1##2##3{##3}\@internalcite}
+%
+% These TeX macro definitions are found in acmtrans.sty. Additional
+% commands to manipulate different components of a citation can be defined
+% so that, for example, you can list author's names without parentheses
+% if using a citation as a noun or object in a sentence.
+%
+% Features of acmtrans.bst:
+% ========================
+%
+% - all authors appear last name first.
+% - all pages are listed xx-xx, (no pp.) and are at the end of the reference
+% - publishers are identified as publisher, address
+% - conferences papers (inproceedings) may give city of conference,
+% date of conference, and journal that the proceedings appear in.
+% - months abbreviated to max four letters (eg. Mar.)
+% - volume of a series indicated after the title of the series
+% - editors appear after edited title and are identified by a trailing "Eds."
+% not in parentheses. Editor names are not given in small caps.
+% (unless there is no author line)
+% - names terminated with a period even if there is no first name.
+% - editions are indicated trailing after the work, not in parentheses.
+% - "et al." citations have a protected period to avoid bad spacing (jrh)
+% - "address" required when publisher given
+% - series (roman) and volume are in a sentence separate from (book-)title
+%
+%
+% Features of chicago.bst:
+% =======================
+%
+% - full names used in citations, but abbreviated citations are available
+% (see above)
+% - if an entry has a "month", then the month and year are also printed
+% as part of that bibitem.
+% - all conjunctions use "and" instead of "\&"
+% - major modification from Chicago Manual of Style (13th ed.) is that
+% only the first author in a reference appears last name first-
+% additional authors appear as J. Q. Public.
+% - pages are listed as "pp. xx-xx" in all entry types except
+% article entries.
+% - book, inbook, and manual use "location: publisher" (or organization)
+% for address and publisher. All other types list publishers separately.
+% - "pp." are used to identify page numbers for all entry types except
+% articles.
+% - organization is used as a citation label if neither author nor editor
+% is present (for manuals).
+% - "et al." is used for long author and editor lists, or when "others"
+% is used.
+%
+% Modifications and bug fixes from newapa.bst:
+% ===========================================
+%
+% - added month, year to bib entries if month is present
+% - fixed bug with In proceedings, added necessary comma after title
+% - all conjunctions changed to "and" from "\&"
+% - fixed bug with author labels in my.full.label: "et al." now is
+% generated when "others" is an author name
+% - major modification from Chicago Manual of Style (13th ed.) is that
+% only the first author in a reference appears last name first-
+% additional authors appear as J. Q. Public.
+% - pages are listed as "pp. xx-xx" in all entry types except
+% article entries. Unnecessary (IMHO) "()" around page numbers
+% were removed, and page numbers now don't end with a period.
+% - created chicago.sty for use with this bibstyle (required).
+% - fixed bugs in FUNCTION {format.vol.num.pages} for missing volume,
+% number, and /or pages. Renamed to format.jour.vol.
+% - fixed bug in formatting booktitles: additional period an error if
+% book has a volume.
+% - fixed bug: editors usually given redundant period before next clause
+% (format.editors.dot) removed.
+% - added label support for organizations, if both author and editor
+% are missing (from alpha.bst). If organization is too long, then
+% the key field is used for abbreviated citations.
+% - In proceedings or books of several volumes, no comma was written
+% between the "Volume x" and the page numbers (this was intentional
+% in newapa.bst). Fixed.
+% - Some journals may not have volumes/numbers, only month/year (eg.
+% IEEE Computer). Fixed bug in article style that assumed volume/number
+% was always present.
+%
+% Original documentation for newapa.sty:
+% =====================================
+%
+% This version was made by modifying the master file made by
+% Oren Patashnik (PATASHNIK@SCORE.STANFORD.EDU), and the 'named' BibTeX
+% style of Peter F. Patel-Schneider.
+%
+% Copyright (C) 1985, all rights reserved.
+% Copying of this file is authorized only if either
+% (1) you make absolutely no changes to your copy, including name, or
+% (2) if you do make changes, you name it something other than 'newapa.bst'.
+% There are undoubtably bugs in this style. If you make bug fixes,
+% improvements, etc. please let me know. My e-mail address is:
+% spencer@cgrg.ohio.state.edu or 71160.3141@compuserve.com
+%
+% This style was made from 'plain.bst', 'named.bst', and 'apalike.bst',
+% with lots of tweaking to make it look like APA style, along with tips
+% from Young Ryu and Brian Reiser's modifications of 'apalike.bst'.
+
+ENTRY
+ { address
+ author
+ booktitle
+ chapter
+ city % jtb: added
+ date % jtb: added
+ edition
+ editor
+ howpublished
+ institution
+ journal
+ key
+ month
+ note
+ number
+ organization
+ pages
+ publisher
+ school
+ series
+ title
+ type
+ volume
+ year
+ }
+ {}
+ { label.year extra.label sort.year sort.label }
+
+INTEGERS { output.state before.all mid.sentence after.sentence after.block }
+
+FUNCTION {init.state.consts}
+{ #0 'before.all :=
+ #1 'mid.sentence :=
+ #2 'after.sentence :=
+ #3 'after.block :=
+}
+
+STRINGS { s t u }
+
+FUNCTION {output.nonnull}
+{ 's :=
+ output.state mid.sentence =
+ { ", " * write$ }
+ { output.state after.block =
+ { add.period$ write$
+ newline$
+ "\newblock " write$
+ }
+ { output.state before.all =
+ 'write$
+ { add.period$ " " * write$ }
+ if$
+ }
+ if$
+ mid.sentence 'output.state :=
+ }
+ if$
+ s
+}
+
+% Use a colon to separate output. Used only for address/publisher
+% combination in book/inbook types, address/institution for manuals,
+% and organization:publisher for proceedings (inproceedings).
+%
+FUNCTION {output.nonnull.colon}
+{ 's :=
+ output.state mid.sentence =
+ { ": " * write$ }
+ { output.state after.block =
+ { add.period$ write$
+ newline$
+ "\newblock " write$
+ }
+ { output.state before.all =
+ 'write$
+ { add.period$ " " * write$ }
+ if$
+ }
+ if$
+ mid.sentence 'output.state :=
+ }
+ if$
+ s
+}
+
+FUNCTION {output}
+{ duplicate$ empty$
+ 'pop$
+ 'output.nonnull
+ if$
+}
+
+FUNCTION {output.colon}
+{ duplicate$ empty$
+ 'pop$
+ 'output.nonnull.colon
+ if$
+}
+
+FUNCTION {output.check}
+{ 't :=
+ duplicate$ empty$
+ { pop$ "empty " t * " in " * cite$ * warning$ }
+ 'output.nonnull
+ if$
+}
+
+FUNCTION {output.check.colon}
+{ 't :=
+ duplicate$ empty$
+ { pop$ "empty " t * " in " * cite$ * warning$ }
+ 'output.nonnull.colon
+ if$
+}
+
+FUNCTION {output.year.check}
+{ year empty$
+ { "empty year in " cite$ * warning$ }
+ { write$
+ " " year * extra.label *
+ mid.sentence 'output.state :=
+ }
+ if$
+}
+
+
+FUNCTION {fin.entry}
+{ add.period$
+ write$
+ newline$
+}
+
+FUNCTION {new.block}
+{ output.state before.all =
+ 'skip$
+ { after.block 'output.state := }
+ if$
+}
+
+FUNCTION {new.sentence}
+{ output.state after.block =
+ 'skip$
+ { output.state before.all =
+ 'skip$
+ { after.sentence 'output.state := }
+ if$
+ }
+ if$
+}
+
+FUNCTION {not}
+{ { #0 }
+ { #1 }
+ if$
+}
+
+FUNCTION {and}
+{ 'skip$
+ { pop$ #0 }
+ if$
+}
+
+FUNCTION {or}
+{ { pop$ #1 }
+ 'skip$
+ if$
+}
+
+FUNCTION {new.block.checka}
+{ empty$
+ 'skip$
+ 'new.block
+ if$
+}
+
+FUNCTION {new.block.checkb}
+{ empty$
+ swap$ empty$
+ and
+ 'skip$
+ 'new.block
+ if$
+}
+
+FUNCTION {new.sentence.checka}
+{ empty$
+ 'skip$
+ 'new.sentence
+ if$
+}
+
+FUNCTION {new.sentence.checkb}
+{ empty$
+ swap$ empty$
+ and
+ 'skip$
+ 'new.sentence
+ if$
+}
+
+FUNCTION {field.or.null}
+{ duplicate$ empty$
+ { pop$ "" }
+ 'skip$
+ if$
+}
+
+%
+% Emphasize the top string on the stack.
+%
+FUNCTION {emphasize}
+{ duplicate$ empty$
+ { pop$ "" }
+ { "{\em " swap$ * "}" * }
+ if$
+}
+
+%
+% Emphasize the top string on the stack, but add a trailing space.
+%
+FUNCTION {emphasize.space}
+{ duplicate$ empty$
+ { pop$ "" }
+ { "{\em " swap$ * "\/}" * }
+ if$
+}
+
+%
+% Emphasize the top string on stack, add a trailing comma and space.
+%
+FUNCTION {emphasize.comma}
+{ duplicate$ empty$
+ { pop$ "" }
+ { "{\em " swap$ * ",\/}" * }
+ if$
+}
+
+INTEGERS { nameptr namesleft numnames }
+%
+% Format bibliographical entries with the first author last name first,
+% and subsequent authors with initials followed by last name.
+% All names are formatted in this routine.
+%
+
+FUNCTION {format.names}
+{ 's :=
+ #1 'nameptr := % nameptr = 1;
+ s num.names$ 'numnames := % numnames = num.name$(s);
+ numnames 'namesleft :=
+ { namesleft #0 > }
+
+ { nameptr #1 =
+ {"{\sc " s nameptr "{vv~}{ll}{, jj}{, f.}" format.name$ * "}" * 't := }
+ {"{\sc " s nameptr "{vv~}{ll}{, jj}{, f.}" format.name$ * "}" * 't := }
+ if$
+ nameptr #1 >
+ { namesleft #1 >
+ { ", " * t * }
+ { numnames #2 >
+ { "," * }
+ 'skip$
+ if$
+ t "{\sc others}" =
+ { " {\sc et~al\mbox{.}}" * } % jrh: avoid spacing problems
+ { " {\sc and} " * t * } % from Chicago Manual of Style
+ if$
+ }
+ if$
+ }
+ 't
+ if$
+ nameptr #1 + 'nameptr := % nameptr += 1;
+ namesleft #1 - 'namesleft := % namesleft =- 1;
+ }
+ while$
+}
+
+FUNCTION {my.full.label}
+{ 's :=
+ #1 'nameptr := % nameptr = 1;
+ s num.names$ 'numnames := % numnames = num.name$(s);
+ numnames 'namesleft :=
+ { namesleft #0 > }
+
+ { s nameptr "{vv~}{ll}" format.name$ 't := % get the next name
+ nameptr #1 >
+ { namesleft #1 >
+ { ", " * t * }
+ { numnames #2 >
+ { "," * }
+ 'skip$
+ if$
+ t "others" =
+ { " et~al\mbox{.}" * } % jrh: avoid spacing problems
+ { " and " * t * } % from Chicago Manual of Style
+ if$
+ }
+ if$
+ }
+ 't
+ if$
+ nameptr #1 + 'nameptr := % nameptr += 1;
+ namesleft #1 - 'namesleft := % namesleft =- 1;
+ }
+ while$
+
+}
+
+FUNCTION {format.names.fml}
+%
+% Format names in "familiar" format, with first initial followed by
+% last name. Like format.names, ALL names are formatted.
+% jtb: The names are NOT put in small caps
+%
+{ 's :=
+ #1 'nameptr := % nameptr = 1;
+ s num.names$ 'numnames := % numnames = num.name$(s);
+ numnames 'namesleft :=
+ { namesleft #0 > }
+
+ { "{" s nameptr "{f.~}{vv~}{ll}{, jj}" format.name$ * "}" * 't :=
+
+ nameptr #1 >
+ { namesleft #1 >
+ { ", " * t * }
+ { numnames #2 >
+ { "," * }
+ 'skip$
+ if$
+ t "{others}" =
+ { " {et~al\mbox{.}}" * }
+ { " {and} " * t * }
+% { " {\&} " * t * }
+ if$
+ }
+ if$
+ }
+ 't
+ if$
+ nameptr #1 + 'nameptr := % nameptr += 1;
+ namesleft #1 - 'namesleft := % namesleft =- 1;
+ }
+ while$
+}
+
+FUNCTION {format.authors}
+{ author empty$
+ { "" }
+ { author format.names add.period$} % jtb: add period if none before
+ if$
+}
+
+FUNCTION {format.key}
+{ empty$
+ { key field.or.null }
+ { "" }
+ if$
+}
+
+%
+% Format editor names for use in the "in" types: inbook, incollection,
+% inproceedings: first initial, then last names. When editors are the
+% LABEL for an entry, then format.editor is used which lists editors
+% by last name first.
+%
+FUNCTION {format.editors.fml}
+{ editor empty$
+ { "" }
+ { editor format.names.fml
+ editor num.names$ #1 >
+ { ", Eds." * } % jtb: removed parentheses
+ { ", Ed." * } % jtb: removed parentheses
+ if$
+ }
+ if$
+}
+
+%
+% Format editor names for use in labels, last names first.
+%
+FUNCTION {format.editors}
+{ editor empty$
+ { "" }
+ { editor format.names
+ editor num.names$ #1 >
+ { ", Eds." * } % jtb: removed parentheses
+ { ", Ed." * } % jtb: removed parentheses
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.title}
+{ title empty$
+ { "" }
+ { title "t" change.case$ }
+ if$
+}
+
+% Note that the APA style requres case changes
+% in article titles. The following does not
+% change cases. If you perfer it, uncomment the
+% following and comment out the above.
+
+%FUNCTION {format.title}
+%{ title empty$
+% { "" }
+% { title }
+% if$
+%}
+
+FUNCTION {n.dashify}
+{ 't :=
+ ""
+ { t empty$ not }
+ { t #1 #1 substring$ "-" =
+ { t #1 #2 substring$ "--" = not
+ { "--" *
+ t #2 global.max$ substring$ 't :=
+ }
+ { { t #1 #1 substring$ "-" = }
+ { "-" *
+ t #2 global.max$ substring$ 't :=
+ }
+ while$
+ }
+ if$
+ }
+ { t #1 #1 substring$ *
+ t #2 global.max$ substring$ 't :=
+ }
+ if$
+ }
+ while$
+}
+
+FUNCTION {format.btitle}
+{ edition empty$
+ { title emphasize }
+ { title empty$
+ { title emphasize } % jtb: what is this supposed to do ?!?
+ { "{\em " title * "\/}, " * edition * " ed." * } % jtb: no parens for ed.
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.emphasize.booktitle}
+{ edition empty$
+ { booktitle emphasize }
+ { booktitle empty$
+ { booktitle emphasize } % jtb: what is this supposed to do ?!?
+ { "{\em " booktitle * "\/}, " * edition * " ed." * } % jtb: no ()s for ed.
+ if$
+ }
+ if$
+ }
+
+% jtb: if the preceding string (the title of the conference) is non-empty,
+% jtb: append the location, otherwise leave empty (so as to trigger the
+% jtb: error message in output.check
+FUNCTION {format.city}
+{ duplicate$ empty$
+ { }
+ { city empty$
+ { date empty$
+ { }
+ { " (" * date * ")" * }
+ if$
+ }
+ { date empty$
+ { " (" * city * ")" * }
+ { " (" * city * ", " * date * ")" * }
+ if$
+ }
+ if$
+ }
+ if$
+}
+
+FUNCTION {tie.or.space.connect}
+{ duplicate$ text.length$ #3 <
+ { "~" }
+ { " " }
+ if$
+ swap$ * *
+}
+
+FUNCTION {either.or.check}
+{ empty$
+ 'pop$
+ { "can't use both " swap$ * " fields in " * cite$ * warning$ }
+ if$
+}
+
+% jtb: If there is a series, this is added and the volume trails after it.
+% jtb: Otherwise, "Vol" is Capitalized.
+FUNCTION {format.bvolume}
+{ volume empty$
+ { "" }
+ { series empty$
+ { "Vol." volume tie.or.space.connect}
+ { series ", " * "vol." volume tie.or.space.connect *}
+ if$
+ "volume and number" number either.or.check
+ }
+ if$
+}
+
+FUNCTION {format.number.series}
+{ volume empty$
+ { number empty$
+ { series field.or.null }
+ { output.state mid.sentence =
+ { "Number" } % gnp - changed to mixed case always
+ { "Number" }
+ if$
+ number tie.or.space.connect
+ series empty$
+ { "there's a number but no series in " cite$ * warning$ }
+ { " in " * series * }
+ if$
+ }
+ if$
+ }
+ { "" }
+ if$
+}
+
+INTEGERS { multiresult }
+
+FUNCTION {multi.page.check}
+{ 't :=
+ #0 'multiresult :=
+ { multiresult not
+ t empty$ not
+ and
+ }
+ { t #1 #1 substring$
+ duplicate$ "-" =
+ swap$ duplicate$ "," =
+ swap$ "+" =
+ or or
+ { #1 'multiresult := }
+ { t #2 global.max$ substring$ 't := }
+ if$
+ }
+ while$
+ multiresult
+}
+
+FUNCTION {format.pages}
+{ pages empty$
+ { "" }
+ { pages multi.page.check
+ { pages n.dashify } % gnp - removed () % jtb: removed pp.
+ { pages }
+ if$
+ }
+ if$
+}
+
+% By Young (and Spencer)
+% GNP - fixed bugs with missing volume, number, and/or pages
+%
+% Format journal, volume, number, pages for article types.
+%
+FUNCTION {format.jour.vol}
+{ journal empty$
+ { "no journal in " cite$ * warning$
+ "" }
+ { journal emphasize.space }
+ if$
+ number empty$
+ { volume empty$
+ { "no number and no volume in " cite$ * warning$
+ "" * }
+ { "~{\em " * Volume * "}" * }
+ if$
+ }
+ { volume empty$
+ {"no volume for " cite$ * warning$
+ "~" * number * }
+ { "~" *
+ volume emphasize.comma
+ "~" * number * * }
+ if$
+ month empty$
+ {}
+ {" (" * month * ")" *}
+ if$
+ }
+ if$
+ pages empty$
+ {"page numbers missing in " cite$ * warning$
+ "" * } % gnp - place a null string on the stack for output
+ { duplicate$ empty$
+ { pop$ format.pages }
+ { ", " * pages n.dashify * } % gnp - removed pp. for articles
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.chapter.pages}
+{ chapter empty$
+ 'format.pages
+ { type empty$
+ { "Chapter" } % gnp - changed to mixed case
+ { type "t" change.case$ }
+ if$
+ chapter tie.or.space.connect
+ pages empty$
+ {"page numbers missing in " cite$ * warning$} % gnp - added check
+ { ", " * format.pages * }
+ if$
+ }
+ if$
+}
+
+% jtb: format for collections or proceedings not appearing in a journal
+FUNCTION {format.in.emphasize.booktitle}
+{ booktitle empty$
+ { "" }
+ { "In " format.emphasize.booktitle * }
+ if$
+}
+
+% jtb: format for proceedings appearing in a journal
+FUNCTION {format.in.booktitle}
+{ booktitle empty$
+ { "" }
+ { "In " booktitle * }
+ if$
+}
+
+FUNCTION {format.in.ed.booktitle}
+{ booktitle empty$
+ { "" }
+ { editor empty$
+ { "In " format.emphasize.booktitle * }
+ % jtb: swapped editor location
+ { "In " format.emphasize.booktitle * ", " * format.editors.fml * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.thesis.type}
+{ type empty$
+ 'skip$
+% {pop$
+ {{ "" }
+ type "t" change.case$}
+ if$
+}
+
+FUNCTION {format.tr.number}
+{ type empty$
+ { "Tech. Rep." }
+ 'type
+ if$
+ number empty$
+ { "t" change.case$ }
+ { number tie.or.space.connect }
+ if$
+}
+
+FUNCTION {format.article.crossref}
+{ "See"
+ "\citeN{" * crossref * "}" *
+}
+
+FUNCTION {format.crossref.editor}
+{ editor #1 "{vv~}{ll}" format.name$
+ editor num.names$ duplicate$
+ #2 >
+ { pop$ " et~al\mbox{.}" * } % jrh: avoid spacing problems
+ { #2 <
+ 'skip$
+ { editor #2 "{ff }{vv }{ll}{ jj}" format.name$ "others" =
+ { " et~al\mbox{.}" * } % jrh: avoid spacing problems
+ { " and " * editor #2 "{vv~}{ll}" format.name$ * }
+ if$
+ }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.book.crossref}
+{ volume empty$
+ { "empty volume in " cite$ * "'s crossref of " * crossref * warning$
+ "In "
+ }
+ { "Volume" volume tie.or.space.connect % gnp - changed to mixed case
+ " of " *
+ }
+ if$
+ editor empty$
+ editor field.or.null author field.or.null =
+ or
+ { key empty$
+ { series empty$
+ { "need editor, key, or series for " cite$ * " to crossref " *
+ crossref * warning$
+ "" *
+ }
+ { "{\em " * series * "\/}" * }
+ if$
+ }
+ { key * }
+ if$
+ }
+ { format.crossref.editor * }
+ if$
+ " \citeN{" * crossref * "}" *
+}
+
+FUNCTION {format.incoll.inproc.crossref}
+{ "See"
+ " \citeN{" * crossref * "}" *
+}
+
+% format.lab.names:
+%
+% determines "short" names for the abbreviated author information.
+% "Long" labels are created in calc.label, using the routine my.full.label
+% to format author and editor fields.
+%
+% There are 4 cases for labels. (n=3 in the example)
+% a) one author Foo
+% b) one to n Foo, Bar and Baz
+% c) use of "and others" Foo, Bar et al.
+% d) more than n Foo et al.
+%
+FUNCTION {format.lab.names}
+{ 's :=
+ s num.names$ 'numnames :=
+ numnames #2 > % change number to number of others allowed before
+ % forcing "et al".
+ { s #1 "{vv~}{ll}" format.name$ " et~al\mbox{.}" * } % jrh: \mbox{} added
+ {
+ numnames #1 - 'namesleft :=
+ #2 'nameptr :=
+ s #1 "{vv~}{ll}" format.name$
+ { namesleft #0 > }
+ { nameptr numnames =
+ { s nameptr "{ff }{vv }{ll}{ jj}" format.name$ "others" =
+ { " et~al\mbox{.}" * } % jrh: avoid spacing problems
+ { " and " * s nameptr "{vv~}{ll}" format.name$ * }
+ if$
+ }
+ { ", " * s nameptr "{vv~}{ll}" format.name$ * }
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+ }
+ if$
+}
+
+FUNCTION {author.key.label}
+{ author empty$
+ { key empty$
+ { "no key, author in " cite$ * warning$
+ cite$ #1 #3 substring$ }
+ 'key
+ if$
+ }
+ { author format.lab.names }
+ if$
+}
+
+FUNCTION {editor.key.label}
+{ editor empty$
+ { key empty$
+ { "no key, editor in " cite$ * warning$
+ cite$ #1 #3 substring$ }
+ 'key
+ if$
+ }
+ { editor format.lab.names }
+ if$
+}
+
+FUNCTION {author.key.organization.label}
+%
+% added - gnp. Provide label formatting by organization if author is null.
+%
+{ author empty$
+ { organization empty$
+ { key empty$
+ { "no key, author or organization in " cite$ * warning$
+ cite$ #1 #3 substring$ }
+ 'key
+ if$
+ }
+ { organization }
+ if$
+ }
+ { author format.lab.names }
+ if$
+}
+
+FUNCTION {editor.key.organization.label}
+%
+% added - gnp. Provide label formatting by organization if editor is null.
+%
+{ editor empty$
+ { organization empty$
+ { key empty$
+ { "no key, editor or organization in " cite$ * warning$
+ cite$ #1 #3 substring$ }
+ 'key
+ if$
+ }
+ { organization }
+ if$
+ }
+ { editor format.lab.names }
+ if$
+}
+
+FUNCTION {author.editor.key.label}
+{ author empty$
+ { editor empty$
+ { key empty$
+ { "no key, author, or editor in " cite$ * warning$
+ cite$ #1 #3 substring$ }
+ 'key
+ if$
+ }
+ { editor format.lab.names }
+ if$
+ }
+ { author format.lab.names }
+ if$
+}
+
+FUNCTION {calc.label}
+%
+% Changed - GNP. See also author.organization.sort, editor.organization.sort
+% Form label for BibTeX entry. The classification of which fields are used
+% for which type of entry (book, inbook, etc.) are taken from alpha.bst.
+% The change here from newapa is to also include organization as a
+% citation label if author or editor is missing.
+%
+{ type$ "book" =
+ type$ "inbook" =
+ or
+ 'author.editor.key.label
+ { type$ "proceedings" =
+ 'editor.key.organization.label
+ { type$ "manual" =
+ 'author.key.organization.label
+ 'author.key.label
+ if$
+ }
+ if$
+ }
+ if$
+
+ author empty$ % generate the full label citation information.
+ { editor empty$
+ { organization empty$
+ { "no author, editor, or organization in " cite$ * warning$
+ "??" }
+ { organization }
+ if$
+ }
+ { editor my.full.label }
+ if$
+ }
+ { author my.full.label }
+ if$
+
+% leave label on the stack, to be popped when required.
+
+ "}{" * swap$ * "}{" *
+% year field.or.null purify$ #-1 #4 substring$ *
+%
+% save the year for sort processing afterwards (adding a, b, c, etc.)
+%
+ year field.or.null purify$ #-1 #4 substring$
+ 'label.year :=
+}
+
+FUNCTION {output.bibitem}
+{ newline$
+
+ "\bibitem[\protect\citeauthoryear{" write$
+ calc.label write$
+ sort.year write$
+ "}]{" write$
+
+ cite$ write$
+ "}" write$
+ newline$
+ ""
+ before.all 'output.state :=
+}
+
+FUNCTION {article}
+{ output.bibitem
+ format.authors
+ "author" output.check
+ author format.key output % added
+ output.year.check % added
+ new.block
+ format.title
+ "title" output.check
+ new.block
+ crossref missing$
+ { format.jour.vol output
+ }
+ { format.article.crossref output.nonnull
+ format.pages output
+ }
+ if$
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {book}
+{ output.bibitem
+ author empty$
+ { format.editors
+ "author and editor" output.check }
+ { format.authors
+ output.nonnull
+ crossref missing$
+ { "author and editor" editor either.or.check }
+ 'skip$
+ if$
+ }
+ if$
+ output.year.check % added
+ new.block
+ format.btitle
+ "title" output.check
+ crossref missing$
+ { new.sentence % jtb: start a new sentence for series/volume
+ format.bvolume output
+ new.block
+ format.number.series output
+ new.sentence
+ publisher "publisher" output.check
+ address "address" output.check % jtb: require address
+ }
+ { new.block
+ format.book.crossref output.nonnull
+ }
+ if$
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {booklet}
+{ output.bibitem
+ format.authors output
+ author format.key output % added
+ output.year.check % added
+ new.block
+ format.title
+ "title" output.check
+ new.block
+ howpublished output
+ address output
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {inbook}
+{ output.bibitem
+ author empty$
+ { format.editors
+ "author and editor" output.check
+ }
+ { format.authors output.nonnull
+ crossref missing$
+ { "author and editor" editor either.or.check }
+ 'skip$
+ if$
+ }
+ if$
+ output.year.check % added
+ new.block
+ format.btitle
+ "title" output.check
+ crossref missing$
+ { new.sentence % jtb: start a new sentence for series/volume
+ format.bvolume output
+ new.block
+ format.number.series output
+ new.sentence
+ publisher "publisher" output.check
+ address "address" output.check % jtb: require address
+ format.chapter.pages
+ "chapter and pages" output.check % jtb: moved from before publisher
+ }
+ { format.chapter.pages "chapter and pages" output.check
+ new.block
+ format.book.crossref output.nonnull
+ }
+ if$
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {incollection}
+{ output.bibitem
+ format.authors
+ "author" output.check
+ author format.key output % added
+ output.year.check % added
+ new.block
+ format.title
+ "title" output.check
+ new.block
+ crossref missing$
+ { format.in.ed.booktitle
+ "booktitle" output.check
+ new.sentence % jtb: start a new sentence for series/volume
+ format.bvolume output
+ format.number.series output
+ new.sentence
+ publisher "publisher" output.check
+ address "address" output.check % jtb: require address
+ format.chapter.pages output % gnp - was special.output.nonnull
+% left out comma before page numbers
+ % jtb: moved from before publisher
+ }
+ { format.incoll.inproc.crossref
+ output.nonnull
+ format.chapter.pages output
+ }
+ if$
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {inproceedings}
+{ output.bibitem
+ format.authors
+ "author" output.check
+ author format.key output % added
+ output.year.check % added
+ new.block
+ format.title
+ "title" output.check
+ new.block
+ crossref missing$
+ { journal missing$ % jtb: proceedings appearing in journals
+ { format.in.emphasize.booktitle format.city "booktitle" output.check
+ format.editors.fml output
+ new.sentence % jtb: start a new sentence for series/volume
+ format.bvolume output
+ format.number.series output
+ new.sentence
+ organization output
+ publisher "publisher" output.check % jtb: require publisher (?)
+ address "address" output.check % jtb: require address
+ format.pages output % jtb: moved from before publisher
+ }
+ % jtb: new:
+ { format.in.booktitle format.city "booktitle" output.check
+ format.editors.fml output
+ new.sentence
+ format.jour.vol output
+ }
+ if$
+ }
+ { format.incoll.inproc.crossref output.nonnull
+ format.pages output
+ }
+ if$
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {conference} { inproceedings }
+
+FUNCTION {manual}
+{ output.bibitem
+ author empty$
+ { editor empty$
+ { organization "organization" output.check
+ organization format.key output } % if all else fails, use key
+ { format.editors "author and editor" output.check }
+ if$
+ }
+ { format.authors output.nonnull }
+ if$
+ output.year.check % added
+ new.block
+ format.btitle
+ "title" output.check
+ organization address new.block.checkb
+ % jtb: back to normal style: organization, address
+ organization "organization" output.check
+ address output
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {mastersthesis}
+{ output.bibitem
+ format.authors
+ "author" output.check
+ author format.key output % added
+ output.year.check % added
+ new.block
+ format.title
+ "title" output.check
+ new.block
+ "M.S.\ thesis" format.thesis.type output.nonnull
+ school "school" output.check
+ address output
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {misc}
+{ output.bibitem
+ format.authors output
+ author format.key output % added
+ output.year.check % added
+ title howpublished new.block.checkb
+ format.title output
+ new.block
+ howpublished output
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {phdthesis}
+{ output.bibitem
+ format.authors
+ "author" output.check
+ author format.key output % added
+ output.year.check % added
+ new.block
+ format.title
+ "title" output.check
+ new.block
+ format.thesis.type "Ph.D. thesis" output.nonnull
+ school "school" output.check
+ address output
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {proceedings}
+{ output.bibitem
+ editor empty$
+ { organization output
+ organization format.key output } % gnp - changed from author format.key
+ { format.editors output.nonnull }
+ if$
+% author format.key output % gnp - removed (should be either
+% editor or organization
+ output.year.check % added (newapa)
+ new.block
+ format.btitle format.city "title" output.check % jtb: added city
+ new.sentence
+ format.bvolume output
+ format.number.series output
+ new.sentence
+ organization output
+ % jtb: normal order: publisher, address
+ publisher output
+ address output
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {techreport}
+{ output.bibitem
+ format.authors
+ "author" output.check
+ author format.key output % added
+ output.year.check % added
+ new.block
+ format.title
+ "title" output.check
+ new.block
+ format.tr.number output % jtb: moved month ...
+ institution "institution" output.check
+ address output
+ new.sentence
+ month output % jtb: ... to here (no parens)
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {unpublished}
+{ output.bibitem
+ format.authors
+ "author" output.check
+ author format.key output % added
+ output.year.check % added
+ new.block
+ format.title
+ "title" output.check
+ new.block
+ note "note" output.check
+ fin.entry
+}
+
+FUNCTION {default.type} { misc }
+
+MACRO {jan} {"Jan."}
+
+MACRO {feb} {"Feb."}
+
+MACRO {mar} {"Mar."} % jtb: corrected: was "March"
+
+MACRO {apr} {"Apr."} % jtb: corrected: was "April"
+
+MACRO {may} {"May"}
+
+MACRO {jun} {"June"}
+
+MACRO {jul} {"July"}
+
+MACRO {aug} {"Aug."}
+
+MACRO {sep} {"Sept."}
+
+MACRO {oct} {"Oct."}
+
+MACRO {nov} {"Nov."}
+
+MACRO {dec} {"Dec."}
+
+MACRO {acmcs} {"ACM Comput. Surv."}
+
+MACRO {acmlett} {"ACM Lett. Program. Lang. Syst."}
+
+MACRO {acta} {"Acta Inf."}
+
+MACRO {ai} {"Artificial Intelligence"}
+
+MACRO {al} {"Ada Lett."}
+
+MACRO {acr} {"Adv. Comput. Res."}
+
+MACRO {bit} {"Bit"}
+
+MACRO {cacm} {"Commun. ACM"}
+
+MACRO {cj} {"Comput. J."}
+
+MACRO {cn} {"Comput. Netw."}
+
+MACRO {cl} {"Comput. Lang."}
+
+MACRO {ibmjrd} {"IBM J. Res. and Development"}
+
+MACRO {ibmsj} {"IBM Systems Journal"}
+
+MACRO {ict} {"Inf. Contr."}
+
+MACRO {ieebcs} {"IEE/BCS Softw. Eng. J."}
+
+MACRO {ieees} {"IEEE Softw."}
+
+MACRO {ieeese} {"IEEE Trans. Softw. Eng."}
+
+MACRO {ieeetc} {"IEEE Trans. Comput."}
+
+MACRO {ieeetcad}
+ {"IEEE Transactions on Computer-Aided Design of Integrated Circuits"}
+
+MACRO {ieeetpds} {"IEEE Trans. Parall. Distrib. Syst."}
+
+MACRO {ieeetit} {"IEEE Trans. Inf. Theory"}
+
+MACRO {ipl} {"Inf. Process. Lett."}
+
+MACRO {icp} {"Inf. Comput."}
+
+MACRO {ist} {"Inf. Softw. Tech."}
+
+MACRO {ijsa} {"Int. J. Supercomput. Appl."}
+
+MACRO {ijpp} {"Int. J. Parallel Program."}
+
+MACRO {jlp} {"J. Logic Program."}
+
+MACRO {jfp} {"J. Funct. Program."}
+
+MACRO {jcss} {"J. Comput. Syst. Sci."}
+
+MACRO {jsmrp} {"J. Softw. Maint. Res. Pract."}
+
+MACRO {jss} {"J. Syst. Softw."}
+
+MACRO {jlc} {"J. Logic and Comput."}
+
+MACRO {jlsc} {"J. Lisp Symb. Comput."}
+
+MACRO {lpls} {"Lett. Program. Lang. Syst."}
+
+MACRO {mor} {"Math. Oper. Res."}
+
+MACRO {mscs} {"Math. Struct. Comput. Sci."}
+
+MACRO {mst} {"Math. Syst. Theor."} % jtb: was Math. Syst. Theory
+ % jtb: (if you ask me, I prefer the old way)
+MACRO {ngc} {"New Gen. Comput."}
+
+MACRO {scp} {"Sci. Comput. Program."}
+
+MACRO {sicomp} {"SIAM J. Comput."}
+
+MACRO {spe} {"Softw. Pract. Exper."}
+
+MACRO {tocs} {"ACM Trans. Comput. Syst."}
+
+MACRO {tods} {"ACM Trans. Database Syst."}
+
+MACRO {tog} {"ACM Trans. Graphics"}
+
+MACRO {toms} {"ACM Trans. Math. Softw."}
+
+MACRO {toois} {"ACM Trans. Office Inf. Syst."}
+
+MACRO {toplas} {"ACM Trans. Program. Lang. Syst."}
+
+MACRO {tcs} {"Theor. Comput. Sci."} % jtb: was Theor. Comp. Sci.
+
+MACRO {tr} {"Tech. Rep."}
+
+READ
+
+FUNCTION {sortify}
+{ purify$
+ "l" change.case$
+}
+
+INTEGERS { len }
+
+FUNCTION {chop.word}
+{ 's :=
+ 'len :=
+ s #1 len substring$ =
+ { s len #1 + global.max$ substring$ }
+ 's
+ if$
+}
+
+
+
+FUNCTION {sort.format.names}
+{ 's :=
+ #1 'nameptr :=
+ ""
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ { nameptr #1 >
+ { " " * }
+ 'skip$
+ if$
+ s nameptr "{vv{ } }{ll{ }}{ f{ }}{ jj{ }}" format.name$ 't :=
+ nameptr numnames = t "others" = and
+ { " et~al" * }
+ { t sortify * }
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+}
+
+FUNCTION {sort.format.title}
+{ 't :=
+ "A " #2
+ "An " #3
+ "The " #4 t chop.word
+ chop.word
+ chop.word
+ sortify
+ #1 global.max$ substring$
+}
+
+FUNCTION {author.sort}
+{ author empty$
+ { key empty$
+ { "to sort, need author or key in " cite$ * warning$
+ "" }
+ { key sortify }
+ if$
+ }
+ { author sort.format.names }
+ if$
+}
+
+FUNCTION {editor.sort}
+{ editor empty$
+ { key empty$
+ { "to sort, need editor or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { editor sort.format.names }
+ if$
+}
+
+FUNCTION {author.editor.sort}
+{ author empty$
+ { "missing author in " cite$ * warning$
+ editor empty$
+ { key empty$
+ { "to sort, need author, editor, or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { editor sort.format.names }
+ if$
+ }
+ { author sort.format.names }
+ if$
+}
+
+FUNCTION {author.organization.sort}
+%
+% added - GNP. Stack author or organization for sorting (from alpha.bst).
+% Unlike alpha.bst, we need entire names, not abbreviations
+%
+{ author empty$
+ { organization empty$
+ { key empty$
+ { "to sort, need author, organization, or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { organization sortify }
+ if$
+ }
+ { author sort.format.names }
+ if$
+}
+
+FUNCTION {editor.organization.sort}
+%
+% added - GNP. Stack editor or organization for sorting (from alpha.bst).
+% Unlike alpha.bst, we need entire names, not abbreviations
+%
+{ editor empty$
+ { organization empty$
+ { key empty$
+ { "to sort, need editor, organization, or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { organization sortify }
+ if$
+ }
+ { editor sort.format.names }
+ if$
+}
+
+FUNCTION {presort}
+%
+% Presort creates the bibentry's label via a call to calc.label, and then
+% sorts the entries based on entry type. Chicago.bst adds support for
+% including organizations as the sort key; the following is stolen from
+% alpha.bst.
+%
+{ calc.label sortify % recalculate bibitem label
+ year field.or.null purify$ #-1 #4 substring$ * % add year
+ " "
+ *
+ type$ "book" =
+ type$ "inbook" =
+ or
+ 'author.editor.sort
+ { type$ "proceedings" =
+ 'editor.organization.sort
+ { type$ "manual" =
+ 'author.organization.sort
+ 'author.sort
+ if$
+ }
+ if$
+ }
+ if$
+ #1 entry.max$ substring$ % added for newapa
+ 'sort.label := % added for newapa
+ sort.label % added for newapa
+ *
+ " "
+ *
+ title field.or.null
+ sort.format.title
+ *
+ #1 entry.max$ substring$
+ 'sort.key$ :=
+}
+
+ITERATE {presort}
+
+SORT % by label, year, author/editor, title
+
+STRINGS { last.label next.extra }
+
+INTEGERS { last.extra.num }
+
+FUNCTION {initialize.extra.label.stuff}
+{ #0 int.to.chr$ 'last.label :=
+ "" 'next.extra :=
+ #0 'last.extra.num :=
+}
+
+FUNCTION {forward.pass}
+%
+% Pass through all entries, comparing current entry to last one.
+% Need to concatenate year to the stack (done by calc.label) to determine
+% if two entries are the same (see presort)
+%
+{ last.label
+ calc.label year field.or.null purify$ #-1 #4 substring$ * % add year
+ #1 entry.max$ substring$ = % are they equal?
+ { last.extra.num #1 + 'last.extra.num :=
+ last.extra.num int.to.chr$ 'extra.label :=
+ }
+ { "a" chr.to.int$ 'last.extra.num :=
+ "" 'extra.label :=
+ calc.label year field.or.null purify$ #-1 #4 substring$ * % add year
+ #1 entry.max$ substring$ 'last.label := % assign to last.label
+ }
+ if$
+}
+
+FUNCTION {reverse.pass}
+{ next.extra "b" =
+ { "a" 'extra.label := }
+ 'skip$
+ if$
+ label.year extra.label * 'sort.year :=
+ extra.label 'next.extra :=
+}
+
+EXECUTE {initialize.extra.label.stuff}
+
+ITERATE {forward.pass}
+
+REVERSE {reverse.pass}
+
+FUNCTION {bib.sort.order}
+{ sort.label
+ " "
+ *
+ year field.or.null sortify
+ *
+ " "
+ *
+ title field.or.null
+ sort.format.title
+ *
+ #1 entry.max$ substring$
+ 'sort.key$ :=
+}
+
+ITERATE {bib.sort.order}
+
+SORT % by sort.label, year, title --- giving final bib. order.
+
+FUNCTION {begin.bib}
+
+{ preamble$ empty$
+ 'skip$
+ { preamble$ write$ newline$ }
+ if$
+ "\begin{thebibliography}{}" write$ newline$
+}
+
+
+EXECUTE {begin.bib}
+
+EXECUTE {init.state.consts}
+
+ITERATE {call.type$}
+
+FUNCTION {end.bib}
+{ newline$
+ "\end{thebibliography}" write$ newline$
+}
+
+EXECUTE {end.bib}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/biblio/bibtex/contrib/acmtrans/acmtrans2e.cls b/biblio/bibtex/contrib/acmtrans/acmtrans2e.cls
new file mode 100644
index 0000000000..2a67feb385
--- /dev/null
+++ b/biblio/bibtex/contrib/acmtrans/acmtrans2e.cls
@@ -0,0 +1,1243 @@
+% latex2e by nr 7/3/96
+% acmtrans.cls revised 4/19/96
+% revised again 31-JAN-1996 (see end of file)
+% revised 5-14-1997 :
+% Don't use sans-serif font in categories and descriptors
+% include latexsym by default
+% Define longpage and shortpage
+% $Header: acmtrans.sty,v 1.3 96/01/31 13:12:53 boyland Exp $
+% Here is the basic framework that is needed to convert your paper
+% into ACM TOPLAS format and bibliographic format. For a tutorial
+% introduction, see ``acmtr.tex'' (compile it with LaTeX) that
+% accompanies the distribution of this style file.
+%
+% -> \documentclass{acmtrans}
+% -> \markboth{}{}
+% takes 2 arguments and it is for the left- and right-page headers:
+% the first set of braces is assigned for author's name(s)
+% and
+% the second set of braces is assigned for the title
+% (if the title is too long, contraction may be needed
+% -> \title{}
+% if the title is too long, it can be separated by \\
+% -> \author{}
+% author1 \\ author1 affiliation
+% \and
+% author2 \\ author2 affiliation
+% -> \begin{abstract}
+% -> \end{abstract}
+%
+% -> \category{}{}{}
+% takes 3 arguments for the Computing Reviews Classification Scheme.
+% ex: \category{D.3.3}{Programming Languages}{Language Constructs and
+% Features}[data types and structures]
+% the last argument, in square brackets, is optional.
+% -> \terms{} (ex: \terms{Human Factors, Languages})
+% -> \keywords{} (in alphabetical order \keywords{document processing, sequences,
+% string searching, subsequences, substrings})
+% -> \begin{document}
+%
+% -> \begin{bottomstuff}
+% similar to \thanks
+% for authors' addresses; research/grant statements
+% -> \end{bottomstuff}
+% -> \maketitle
+%
+% Now you can start the body of the paper; your figures, tables and
+% use all the latex constructs.
+%
+% -> \begin{acks}
+% acknowledgements
+% -> \end{acks}
+%
+% -> \bibliographystyle{acmtrans}
+% -> \bibliography{mybib_file}
+%
+% ****
+% If your paper has been accepted with a separate (electronic only)
+% appendix, you need to add the following control sequence:
+%
+% -> \appendixhead{}{}{}{}
+% takes 4 arguments to identify your appendix section.
+% first = journal name (e.g. toplas )
+% second = paper-id (a four-digit number)
+% third = year of appearance, for copyright notice
+% (approximation will suffice)
+% fourth = journal, volume and year of publication if known
+%
+% body of appendix
+%!!!!!! \appendixhead has be cut into two: \appendixhead and \elecappendix
+%!!!!!! See end of file. (jtb)
+%
+% -> \end{document}
+%
+% Do not worry about the other definitions in this style file
+% Remember to compile: latex, bibtex, latex latex
+%
+% Bibliographic cite forms needed:
+%
+% \cite{key}
+% which produces citations with author list and year.
+% eg. [Brown 1978; Jarke, et al. 1985]
+% \citeA{key}
+% which produces citations with only the author list.
+% eg. [Brown; Jarke, et al.]
+% \citeN{key}
+% which produces citations with the author list and year, but
+% can be used as nouns in a sentence; no brackets appear around
+% the author names, but only around the year.
+% eg. Shneiderman [1978] states that......
+% \citeN should only be used for a single citation.
+% \citeNN{refkey1,refkey2} for author [ref1year; ref2year]
+% \citeyear{key}
+% which produces the year information only, within brackets.
+%
+% Abbreviated author lists use the ``et al.'' construct.
+%
+% The above are examples of required ACM bibliographic cite formats needed.
+% *******************
+% Here is the complete list of cite forms from the chicago bibliographic style
+%
+% \cite{key}
+% which produces citations with abbreviated author list and year.
+% \citeNP{key}
+% which produces citations with abbreviated author list and year.
+% \citeA{key}
+% which produces only the abbreviated author list.
+% \citeANP{key}
+% which produces only the abbreviated author list.
+% \citeN{key}
+% which produces the abbreviated author list and year, with only the
+% year in parentheses. Use with only one citation.
+% \citeyear{key}
+% which produces the year information only, within parentheses.
+% \citeyearNP{key}
+% which produces the year information only.
+%
+% Abbreviated author lists use the ``et al.'' construct.
+%
+% `NP' means `no parentheses'
+%
+
+\NeedsTeXFormat{LaTeX2e}
+\ProvidesClass{acmtrans2e} [1996/07/03 ACM Transactions class based on <23 April 96>]
+\RequirePackage{latexsym}
+
+
+\if@compatibility\else
+\DeclareOption{a4paper}
+ {\setlength\paperheight {297mm}%
+ \setlength\paperwidth {210mm}%
+ \def\special@paper{210mm,297mm}}
+\DeclareOption{a5paper}
+ {\setlength\paperheight {210mm}%
+ \setlength\paperwidth {148mm}%
+ \def\special@paper{148mm,210mm}}
+\DeclareOption{b5paper}
+ {\setlength\paperheight {250mm}%
+ \setlength\paperwidth {176mm}%
+ \setlength\voffset {-15mm}%
+ \setlength\hoffset {-20mm}%
+ \def\special@paper{176mm,250mm}}
+\DeclareOption{letterpaper}
+ {\setlength\paperheight {11in}%
+ \setlength\paperwidth {8.5in}%
+ \def\special@paper{8.5in,11in}}
+\DeclareOption{legalpaper}
+ {\setlength\paperheight {14in}%
+ \setlength\paperwidth {8.5in}%
+ \def\special@paper{8.5in,14in}}
+\DeclareOption{executivepaper}
+ {\setlength\paperheight {10.5in}%
+ \setlength\paperwidth {7.25in}%
+ \def\special@paper{7.25in,10.5in}}
+\DeclareOption{landscape}
+ {\setlength\@tempdima {\paperheight}%
+ \setlength\paperheight {\paperwidth}%
+ \setlength\paperwidth {\@tempdima}}
+\fi
+
+\DeclareOption{checkMargin}{\setlength\overfullrule{5pt}}
+\DeclareOption{final}{\setlength\overfullrule{0pt}}
+
+\DeclareOption{oneside}{\@twosidefalse \@mparswitchfalse}
+\DeclareOption{twoside}{\@twosidetrue \@mparswitchtrue}
+
+\DeclareOption{10pt}{\def\@ptsize{0}} %needed for amssymbols.sty
+\DeclareOption{11pt}{\ClassError{acmtrans}{11pt style not supported}
+ {ACM transactions doecuments can be set in 10pt only}}
+\DeclareOption{12pt}{\ClassError{acmtrans}{11pt style not supported}
+ {ACM transactions doecuments can be set in 10pt only}}
+
+\DeclareOption{hyperref}{%
+ \def\pages{\realpageref{@firstpg}--\realpageref{@lastpg}}%
+ \def\mypage{\thepage}%
+ \setlength{\bibitemindent}{-1em}
+ \def\@getpagenum#1#2#3#4{#2}%
+ \def\pdfinfo#1#2{\pdfmark{pdfmark=/DOCINFO,Title=#1,Author=#2}}
+ }
+\DeclareOption{nohyperref}{
+ \def\pages{\pageref{@firstpg}--\pageref{@lastpg}}%
+ \def\@getpagenum#1#2{#2}%
+ \def\mypage{\thepage}%
+ \def\pdfinfo#1#2{}%
+ \def\href#1#2{#2}%
+ \def\pdfbookmark#1#2{}%
+ }
+\DeclareOption{notfinal}{
+ \def\pages{TBD}%
+ \def\mypage{TBD}%
+ \def\@getpagenum#1#2{#2}%
+ \def\pdfinfo#1#2{}%
+ \def\pdfbookmark#1#2{}%
+ }
+\DeclareOption{omitline}{\def\@abstractbottom{\relax}}
+\DeclareOption{dontomitline}{\def\@abstractbottom{\hbox{\vrule height .2pt width 30pc}}}
+\newlength{\bibitemindent}
+\ExecuteOptions{twoside,final,10pt,dontomitline,nohyperref,letterpaper} % defaults
+
+
+
+\ProcessOptions
+
+
+ \widowpenalty=5000
+ \clubpenalty=5000
+
+
+\lineskip 1pt \normallineskip 1pt
+\def\baselinestretch{1}
+
+\renewcommand\normalsize{%
+ \@setfontsize\normalsize\@xpt\@xiipt
+ \abovedisplayskip 6pt plus2pt minus1pt\belowdisplayskip \abovedisplayskip
+ \abovedisplayshortskip 6pt plus0pt minus 3pt
+ \belowdisplayshortskip 6pt plus0pt minus3pt\let\@listi\@listI}
+
+\newcommand\small{%
+ \@setfontsize\small\@ixpt{11pt}%
+ \abovedisplayskip 5pt plus 2pt minus 1pt\belowdisplayskip \abovedisplayskip
+ \abovedisplayshortskip 5pt plus0pt minus2pt\belowdisplayshortskip 5pt plus0pt
+ minus 2pt
+ \def\@listi{\leftmargin\leftmargini \topsep 5pt plus 2pt minus 1pt\parsep 0pt
+ plus .7pt
+ \itemsep 1.6pt plus .8pt}}
+\newcommand\footnotesize{%
+% \@setfontsize\footnotesize\@viiipt{10pt}
+ \@setsize\footnotesize{10pt}\viiipt\@viiipt
+ \abovedisplayskip 4pt plus 1pt minus 0pt\belowdisplayskip \abovedisplayskip
+ \abovedisplayshortskip 4pt plus 0pt minus 1pt\belowdisplayshortskip 4pt plus
+ 0pt minus 1pt
+ \def\@listi{\leftmargin\leftmargini \topsep 4pt plus 1pt minus
+ 0pt\parsep 0pt plus .5pt
+ \itemsep 1pt plus .7pt}}
+
+\newcommand\scriptsize{\@setfontsize\scriptsize\@viipt\@viiipt}
+\newcommand\tiny{\@setfontsize\tiny\@vpt\@vipt}
+\newcommand\large{\@setfontsize\large\@xiipt{14}}
+\newcommand\Large{\@setfontsize\Large\@xivpt{18}}
+\newcommand\LARGE{\@setfontsize\LARGE\@xviipt{20}}
+\newcommand\huge{\@setfontsize\huge\@xxpt{25}}
+\newcommand\Huge{\@setfontsize\Huge\@xxvpt{30}}
+
+\normalsize
+
+ \oddsidemargin .75in \evensidemargin .75in \marginparwidth .5in
+ \marginparsep .125in
+ \topmargin .25in \headheight 12pt\headsep 16pt
+ %% not in latex2e \footheight 10pt
+ \footskip 15pt
+
+\textheight 47pc \textwidth 30pc \columnsep 10pt \columnseprule 0pt
+
+\footnotesep 7pt
+\skip\footins 15pt plus 4pt minus 3pt
+\floatsep 12pt plus 2pt minus 2pt
+\textfloatsep \floatsep
+\intextsep 1pc plus 1pc
+%%% not in 2e %% \@maxsep 1pc
+%%% not in 2e %% \@dblmaxsep 20pt
+\dblfloatsep 12pt plus 2pt minus 2pt
+\dbltextfloatsep 20pt plus 2pt minus 4pt
+\@fptop 0pt plus 1fil \@fpsep 1pc plus 2fil \@fpbot 0pt plus 1fil
+\@dblfptop 0pt plus 1fil \@dblfpsep 8pt plus 2fil \@dblfpbot 0pt plus 1fil
+\marginparpush 6pt
+
+\parskip 0pt plus .1pt \parindent 10pt \partopsep 0pt
+\@lowpenalty 51 \@medpenalty 151 \@highpenalty 301
+\@beginparpenalty -\@lowpenalty \@endparpenalty -\@lowpenalty \@itempenalty
+-\@lowpenalty
+
+
+\def\part{\@ucheadtrue
+ \@startsection{part}{9}{\z@}{-10pt plus -4pt minus
+ -2pt}{4pt}{\reset@font\normalsize\sffamily}}
+\def\section{\@ucheadtrue
+ \@startsection{section}{1}{\z@}{-10pt plus -4pt minus
+ -2pt}{4pt}{\reset@font\normalsize\sffamily}}
+\def\subsection{\@ucheadfalse
+ \@startsection{subsection}{2}{\z@}{-8pt plus -2pt minus
+ -1pt}{4pt}{\reset@font\normalsize\sffamily}}
+\def\subsubsection{\@ucheadfalse
+ \@startsection{subsubsection}{3}{\parindent}{6pt plus
+1pt}{-5pt}{\reset@font\normalsize\itshape}}
+\def\paragraph{\@ucheadfalse
+ \@startsection{paragraph}{3}{\parindent}{6pt plus
+1pt}{-5pt}{\reset@font\normalsize\itshape}}
+
+\renewcommand{\@seccntformat}[1]{\textup{\csname the#1\endcsname}}
+
+\gdef\@period{.}
+\def\@trivlist{\@topsepadd\topsep
+\if@noskipsec \gdef\@period{}\leavevmode\gdef\@period{.}\fi
+ \ifvmode \advance\@topsepadd\partopsep \else \unskip\par\fi
+ \if@inlabel \@noparitemtrue \@noparlisttrue
+ \else \@noparlistfalse \@topsep\@topsepadd \fi
+ \advance\@topsep \parskip
+ \leftskip\z@\rightskip\@rightskip \parfillskip\@flushglue
+ \@setpar{\if@newlist\else{\@@par}\fi} \global\@newlisttrue
+\@outerparskip\parskip}
+
+
+\def\@startsection#1#2#3#4#5#6{%
+ \if@noskipsec \leavevmode \fi
+ \par
+ \@tempskipa #4\relax
+ \@afterindenttrue
+ \ifdim \@tempskipa <\z@
+ \@tempskipa -\@tempskipa \@afterindentfalse
+ \fi
+ \if@nobreak
+ \everypar{}%
+ \else
+ \addpenalty\@secpenalty\addvspace\@tempskipa
+ \fi
+ \@ifstar
+ {\@ssect{#3}{#4}{#5}{#6}}%
+ {\@dblarg{\@sect{#1}{#2}{#3}{#4}{#5}{#6}}}}
+\def\@sect#1#2#3#4#5#6[#7]#8{%
+ \ifnum #2>\c@secnumdepth
+ \let\@svsec\@empty
+ \else
+ \refstepcounter{#1}%
+ \if@uchead%
+ \protected@edef\@svsec{\@seccntformat{#1}.\quad\relax}%
+ \else%
+ \protected@edef\@svsec{\@seccntformat{#1}\quad\relax}%
+ \fi%
+ \fi
+ \@tempskipa #5\relax
+ \ifdim \@tempskipa>\z@
+ \begingroup
+ #6{%
+ \@hangfrom{\hskip #3\relax\@svsec}%
+ \interlinepenalty \@M \if@uchead\MakeUppercase{#8}\else#8\fi \@@par}%
+ \endgroup
+ \csname #1mark\endcsname{#7}%
+ \addcontentsline{toc}{#1}{%
+ \ifnum #2>\c@secnumdepth \else
+ \protect\numberline{\csname the#1\endcsname}%
+ \fi
+ #7}%
+ \else
+ \def\@svsechd{%
+ #6{\hskip #3\relax
+ \@svsec \if@uchead\Makeuppercase{#8}\else#8\fi}%
+ \csname #1mark\endcsname{#7}%
+ \addcontentsline{toc}{#1}{%
+ \ifnum #2>\c@secnumdepth \else
+ \protect\numberline{\csname the#1\endcsname}%
+ \fi
+ #7}}%
+ \fi
+ \@xsect{#5}}
+
+\def\@xsect#1{\@tempskipa #1\relax
+ \ifdim \@tempskipa>\z@
+ \par \nobreak
+ \vskip \@tempskipa
+ \@afterheading
+ \else \global\@nobreakfalse \global\@noskipsectrue
+ \everypar{\if@noskipsec \global\@noskipsecfalse
+ \clubpenalty\@M \hskip -\parindent
+ \begingroup \@svsechd\@period \endgroup \unskip
+ \hskip -#1
+ \else \clubpenalty \@clubpenalty
+ \everypar{}\fi}\fi\ignorespaces}
+\newif\if@uchead\@ucheadfalse
+
+
+\setcounter{secnumdepth}{3}
+\newcounter{secnumbookdepth}
+\setcounter{secnumbookdepth}{3}
+
+\newfont{\apbf}{cmbx9}
+
+\def\@withappendix#1{App--\number #1}
+
+\newcommand{\elecappendix}{
+}
+
+\def\appenheader{\global\@topnum\z@ \global\@botroom \textheight \begin{figure}
+\newfont{\sc}{cmcsc10}
+\parindent\z@
+\hbox{}
+\vskip -\textfloatsep
+\vskip 11pt
+\hrule height .2pt width 30pc
+\vskip 2pt\rule{0pt}{10pt}\ignorespaces}
+\def\endappenheader{\end{figure}\gdef\appendixhead{}}
+
+\def\@appsec{}
+
+\def\appendix{\par
+ \setcounter{section}{0}
+ \setcounter{subsection}{0}
+ \def\@appsec{APPENDIX }
+ \def\thesection{\Alph{section}}
+ \def\theHsection{\Alph{section}}}
+
+
+
+\labelsep 5pt
+\settowidth{\leftmargini}{(9)} \addtolength\leftmargini\labelsep
+\settowidth{\leftmarginii}{(b)} \addtolength\leftmarginii\labelsep
+\leftmarginiii \leftmarginii
+\leftmarginiv \leftmarginii
+\leftmarginv \leftmarginii
+\leftmarginvi \leftmarginii
+\leftmargin\leftmargini
+\labelwidth\leftmargini\advance\labelwidth-\labelsep
+\def\@listI{\leftmargin\leftmargini \parsep 0pt plus 1pt\topsep 6pt plus 2pt
+minus 2pt\itemsep 2pt plus 1pt minus .5pt}
+\let\@listi\@listI
+\@listi
+\def\@listii{\leftmargin\leftmarginii
+ \labelwidth\leftmarginii\advance\labelwidth-\labelsep
+ \topsep 0pt plus 1pt
+ \parsep 0pt plus .5pt
+ \itemsep \parsep}
+\def\@listiii{\leftmargin\leftmarginiii
+ \labelwidth\leftmarginiii\advance\labelwidth-\labelsep
+ \topsep 0pt plus 1pt
+ \parsep 0pt plus .5pt
+ \itemsep \parsep}
+\def\@listiv{\leftmargin\leftmarginiv
+ \labelwidth\leftmarginiv\advance\labelwidth-\labelsep}
+\def\@listv{\leftmargin\leftmarginv
+ \labelwidth\leftmarginv\advance\labelwidth-\labelsep}
+\def\@listvi{\leftmargin\leftmarginvi
+ \labelwidth\leftmarginvi\advance\labelwidth-\labelsep}
+
+
+
+
+\def\enumerate{\ifnum \@enumdepth >3 \@toodeep\else
+ \advance\@enumdepth \@ne
+ \edef\@enumctr{enum\romannumeral\the\@enumdepth}\list
+ {\csname label\@enumctr\endcsname}{\usecounter
+ {\@enumctr}\def\makelabel##1{##1\hss}}\fi}
+\def\longenum{\ifnum \@enumdepth >3 \@toodeep\else
+ \advance\@enumdepth \@ne
+ \edef\@enumctr{enum\romannumeral\the\@enumdepth}\list
+ {\csname label\@enumctr\endcsname}{\usecounter
+ {\@enumctr}\labelwidth\z@}\fi}
+%\leftmargin\z@ \itemindent\parindent}\fi} - this indents each item in enumerate
+\let\endlongenum\endlist
+%%--------------------CHANGED: always roman parentheses. dave ---------------%%
+\def\labelenumi{{\rm (}\arabic{enumi}\/{\rm )}}
+\def\theenumi{\arabic{enumi}}
+\def\labelenumii{{\rm (}\alph{enumii}\rm{)}}
+\def\theenumii{\alph{enumii}}
+\def\p@enumii{\theenumi}
+\def\labelenumiii{\roman{enumiii}.}
+\def\theenumiii{\roman{enumiii}}
+\def\p@enumiii{\theenumi{\rm (}\theenumii{\rm )}}
+\def\labelenumiv{\Alph{enumiv}.}
+\def\theenumiv{\Alph{enumiv}}
+\def\p@enumiv{\p@enumiii\theenumiii}
+
+\def\p@enumiv{\p@enumiii\theenumiii}
+
+\def\itemize{\list{---\hskip -\labelsep}{\settowidth
+ {\leftmargin}{---}\labelwidth\leftmargin
+ \addtolength{\labelwidth}{-\labelsep}}}
+\let\enditemize\endlist
+\def\longitem{\list{---}{\labelwidth\z@
+ \leftmargin\z@ \itemindent\parindent \advance\itemindent\labelsep}}
+\let\endlongitem\endlist
+\def\verse{\let\\=\@centercr
+ \list{}{\leftmargin 2pc
+ \itemindent -1.5em\listparindent \itemindent
+ \rightmargin\leftmargin\advance\leftmargin 1.5em}\item[]}
+\let\endverse\endlist
+\def\quotation{\list{}{\leftmargin 2pc \listparindent .5em
+ \itemindent\listparindent
+ \rightmargin\leftmargin \parsep 0pt plus 1pt}\item[]}
+\let\endquotation=\endlist
+\def\quote{\list{}{\leftmargin 2pc \rightmargin\leftmargin}\item[]}
+\let\endquote=\endlist
+
+\def\description{\list{}{\listparindent\parindent\labelwidth\z@
+ \leftmargin\z@ \itemindent\parindent\advance\itemindent\labelsep
+ \def\makelabel##1{\it ##1.}}}
+\let\enddescription\endlist
+
+\def\describe#1{\list{}{\listparindent\parindent\settowidth{\labelwidth}{#1}\leftmargin
+ \labelwidth\addtolength\leftmargin\labelsep\def\makelabel##1{##1\hfil}}}
+\let\enddescribe\endlist
+
+\def\program{\ifx\@currsize\normalsize\small \else \rm \fi\tabbing}
+\let\endprogram\endtabbing
+ \def\@begintheorem#1#2{\trivlist \item[\hskip 10pt\hskip
+ \labelsep{\sc #1\hskip 5pt\relax#2.}] \itshape}
+ \def\@opargbegintheorem#1#2#3{\trivlist
+ \item[\hskip 10pt \hskip \labelsep{\sc #1\savebox\@tempboxa{#3}\ifdim
+ \wd\@tempboxa>\z@ \hskip 5pt\relax \box\@tempboxa\fi.}] \itshape}
+
+\newif\if@qeded\global\@qededfalse
+\def\proof{\global\@qededfalse\@ifnextchar[{\@xproof}{\@proof}}
+\def\endproof{\if@qeded\else\qed\fi\endtrivlist}
+\def\qed{\unskip\kern 10pt{\unitlength1pt\linethickness{.4pt}\framebox(6,6){}}
+\global\@qededtrue}
+\def\@proof{\trivlist \item[\hskip 10pt\hskip
+ \labelsep{\sc Proof.}]\ignorespaces}
+\def\@xproof[#1]{\trivlist \item[\hskip 10pt\hskip
+ \labelsep{\sc Proof #1.}]\ignorespaces}
+
+\def\newdef#1#2{\expandafter\@ifdefinable\csname #1\endcsname
+{\@definecounter{#1}\expandafter\xdef\csname
+the#1\endcsname{\@thmcounter{#1}}\global
+ \@namedef{#1}{\@defthm{#1}{#2}}\global
+ \@namedef{end#1}{\@endtheorem}}}
+\def\@defthm#1#2{\refstepcounter
+ {#1}\@ifnextchar[{\@ydefthm{#1}{#2}}{\@xdefthm{#1}{#2}}}
+\def\@xdefthm#1#2{\@begindef{#2}{\csname the#1\endcsname}\ignorespaces}
+\def\@ydefthm#1#2[#3]{\trivlist \item[\hskip 10pt\hskip
+ \labelsep{\it #2\savebox\@tempboxa{#3}\ifdim
+ \wd\@tempboxa>\z@ \ \box\@tempboxa\fi.}]\ignorespaces}
+\def\@begindef#1#2{\trivlist \item[\hskip 10pt\hskip
+ \labelsep{\it #1\ \rm #2.}]}
+
+\def\theequation{\arabic{equation}}
+
+\def\titlepage{\@restonecolfalse\if@twocolumn\@restonecoltrue\onecolumn
+ \else \newpage \fi \thispagestyle{empty}\c@page\z@}
+\def\endtitlepage{\if@restonecol\twocolumn \else \newpage \fi}
+
+\arraycolsep 2.5pt \tabcolsep 6pt \arrayrulewidth .4pt \doublerulesep 2pt
+\tabbingsep \labelsep
+
+\skip\@mpfootins = \skip\footins
+\fboxsep = 3pt \fboxrule = .4pt
+
+\newcounter{part}
+\newcounter{section}
+\newcounter{subsection}[section]
+\newcounter{subsubsection}[subsection]
+\newcounter{paragraph}[subsubsection]
+
+\def\thepart{\Roman{part}}
+\def\thesection {\arabic{section}}
+\def\thesubsection {\thesection.\arabic{subsection}}
+\def\thesubsubsection {\thesubsection.\arabic{subsubsection}}
+\def\theparagraph {\thesubsubsection.\arabic{paragraph}}
+
+\def\@pnumwidth{1.55em}
+\def\@tocrmarg {2.55em}
+\def\@dotsep{4.5}
+\setcounter{tocdepth}{3}
+
+\def\tableofcontents{\section*{Contents\@mkboth{CONTENTS}{CONTENTS}}
+ \@starttoc{toc}}
+\def\l@part#1#2{\addpenalty{\@secpenalty}
+ \addvspace{2.25em plus 1pt} \begingroup
+ \@tempdima 3em \parindent \z@ \rightskip \@pnumwidth \parfillskip
+-\@pnumwidth
+ {\large \bf \leavevmode #1\hfil \hbox to\@pnumwidth{\hss #2}}\par
+ \nobreak \endgroup}
+\def\l@section#1#2{\addpenalty{\@secpenalty} \addvspace{1.0em plus 1pt}
+\@tempdima 1.5em \begingroup
+ \parindent \z@ \rightskip \@pnumwidth
+ \parfillskip -\@pnumwidth
+ \bf \leavevmode #1\hfil \hbox to\@pnumwidth{\hss #2}\par
+ \endgroup}
+\def\l@subsection{\@dottedtocline{2}{1.5em}{2.3em}}
+\def\l@subsubsection{\@dottedtocline{3}{3.8em}{3.2em}}
+\def\listoffigures{\section*{List of Figures\@mkboth
+ {LIST OF FIGURES}{LIST OF FIGURES}}\@starttoc{lof}}
+\def\l@figure{\@dottedtocline{1}{1.5em}{2.3em}}
+\def\listoftables{\section*{List of Tables\@mkboth
+ {LIST OF TABLES}{LIST OF TABLES}}\@starttoc{lot}}
+\let\l@table\l@figure
+
+
+\def\thebibliography#1{\par\footnotesize
+\@ucheadfalse
+\@startsection{subsection}{2}{\z@}{16pt plus 2pt minus
+ 1pt}{2pt}{\sf}*{REFERENCES}%
+\list{\arabic{enumi}.}{%
+ \settowidth{\labelwidth}{99.}%
+ \leftmargin\labelwidth
+ \advance\leftmargin\labelsep \topsep \z@ \parsep 0pt plus .1pt
+ \itemsep \parsep
+ \usecounter{enumi}}%
+ \def\newblock{\hskip .11em plus .33em minus .07em}
+ \sloppy
+ \widowpenalty=10000
+ \clubpenalty=10000
+ \sfcode`\.=1000\relax}
+\let\endthebibliography=\endlist
+
+
+\newif\if@restonecol
+\def\theindex{\@restonecoltrue\if@twocolumn\@restonecolfalse\fi
+\columnseprule \z@
+\columnsep 35pt\twocolumn[\section*{Index}]
+ \@mkboth{INDEX}{INDEX}\thispagestyle{plain}\parindent\z@
+ \parskip\z@ plus .3pt\relax\let\item\@idxitem}
+\def\@idxitem{\par\hangindent 40pt}
+\def\subitem{\par\hangindent 40pt \hspace*{20pt}}
+\def\subsubitem{\par\hangindent 40pt \hspace*{30pt}}
+\def\endtheindex{\if@restonecol\onecolumn\else\clearpage\fi}
+\def\indexspace{\par \vskip 10pt plus 5pt minus 3pt\relax}
+
+\def\footnoterule{\kern-3\p@
+ \hrule \@height 0.2\p@ \@width 47\p@
+ \kern 2.6\p@
+}
+
+\long\def\@makefntext#1{\parindent 1em\noindent
+ $^{\@thefnmark}$#1}
+
+
+\setcounter{topnumber}{3}
+\def\topfraction{.99}
+\setcounter{bottomnumber}{1}
+\def\bottomfraction{.5}
+\setcounter{totalnumber}{3}
+\def\textfraction{.01}
+\def\floatpagefraction{.85}
+\setcounter{dbltopnumber}{2}
+\def\dbltopfraction{.7}
+\def\dblfloatpagefraction{.5}
+
+\long\def\@makecaption#1#2{\vskip 1pc \setbox\@tempboxa\hbox{#1.\hskip
+1em\relax #2}
+ \ifdim \wd\@tempboxa >\hsize #1. #2\par \else \hbox
+to\hsize{\hfil\box\@tempboxa\hfil}
+ \fi}
+
+\def\nocaption{\refstepcounter\@captype \par
+ \vskip 1pc \hbox to\hsize{\hfil \footnotesize Figure \thefigure
+ \hfil}}
+
+
+\newcounter{figure}
+\def\thefigure{\@arabic\c@figure}
+\def\fps@figure{tbp}
+\def\ftype@figure{1}
+\def\ext@figure{lof}
+\def\fnum@figure{Fig.\ \thefigure}
+\def\figure{\let\normalsize\footnotesize \normalsize \@float{figure}}
+\let\endfigure\end@float
+\@namedef{figure*}{\@dblfloat{figure}}
+\@namedef{endfigure*}{\end@dblfloat}
+
+\newcounter{table}
+\def\thetable{\@Roman\c@table}
+\def\fps@table{tbp}
+\def\ftype@table{2}
+\def\ext@table{lot}
+\def\fnum@table{Table \thetable}
+\def\table{\let\normalsize\footnotesize \normalsize\@float{table}}
+\let\endtable\end@float
+\@namedef{table*}{\@dblfloat{table}}
+\@namedef{endtable*}{\end@dblfloat}
+\def\acmtable#1{\@narrowfig #1\relax
+ \let\caption\@atcap \let\nocaption\@atnocap
+ \def\@tmpnf{}\@ifnextchar[{\@xntab}{\@ntab}}
+\def\endacmtable{\hbox to \textwidth{\hfil
+\vbox{\hsize \@narrowfig
+\box\@nfcapbox
+{\baselineskip 4pt \hbox{\vrule height .4pt width \hsize}}
+\vskip -1pt
+\box\@nfigbox\vskip -1pt
+{\baselineskip 4pt \hbox{\vrule height .4pt width \hsize}}}\hfil}
+\end@float}
+\def\@xntab[#1]{\def\@tmpnf{[#1]}\@ntab}
+\def\@ntab{\expandafter\table\@tmpnf
+ \setbox\@nfigbox\vbox\bgroup
+ \hsize \@narrowfig \@parboxrestore}
+\def\@atmakecap #1#2{\setbox\@tempboxa\hbox{#1.\hskip 1em\relax #2}
+ \ifdim \wd\@tempboxa >\hsize \sloppy #1.\hskip 1em\relax #2 \par \else \hbox
+to\hsize{\hfil\box\@tempboxa\hfil}
+ \fi}
+\def\@atcap{\par\egroup\refstepcounter\@captype
+ \@dblarg{\@atcapx\@captype}}
+\long\def\@atcapx#1[#2]#3{\setbox\@nfcapbox\vbox {\hsize \wd\@nfigbox
+ \@parboxrestore
+ \@atmakecap{\csname fnum@#1\endcsname}{\ignorespaces #3}\par}}
+\def\@atnocap{\egroup \refstepcounter\@captype
+ \setbox\@nfcapbox\vbox {\hsize \wd\@nfigbox
+ \hbox to\hsize{\hfil \footnotesize Table \thetable\hfil}}}
+
+%
+%% Narrow figures
+%
+\def\narrowfig#1{\@narrowfig #1\relax
+ \let\caption\@nfcap \let\nocaption\@nfnocap
+ \def\@tmpnf{}\@ifnextchar[{\@xnfig}{\@nfig}}
+\def\endnarrowfig{\hbox to \textwidth{\if@nfeven
+ \box\@nfcapbox\hfil\box\@nfigbox
+ \else \box\@nfigbox\hfil\box\@nfcapbox\fi}\end@float}
+\def\@xnfig[#1]{\def\@tmpnf{[#1]}\@nfig}
+\def\@nfig{\expandafter\figure\@tmpnf
+ \setbox\@nfigbox\vbox\bgroup
+ \hsize \@narrowfig \@parboxrestore}
+\def\@nfmakecap #1#2{\setbox\@tempboxa\hbox{#1.\hskip 1em\relax #2}
+ \ifdim \wd\@tempboxa >\hsize \sloppy #1.\hskip 1em\relax #2 \par \else \hbox
+to\hsize{\if@nfeven\else\hfil\fi\box\@tempboxa\if@nfeven\hfil\fi}
+ \fi}
+\def\@nfcap{\par\egroup\refstepcounter\@captype
+ \@dblarg{\@nfcapx\@captype}}
+\long\def\@nfcapx#1[#2]#3{\@seteven
+ \setbox\@nfcapbox\vbox to \ht\@nfigbox
+ {\hsize \textwidth \advance\hsize -2pc \advance\hsize -\wd\@nfigbox
+ \@parboxrestore
+ \vfil
+ \@nfmakecap{\csname fnum@#1\endcsname}{\ignorespaces #3}\par
+ \vfil}}
+\def\@nfnocap{\egroup \refstepcounter\@captype \@seteven
+ \setbox\@nfcapbox\vbox to \ht\@nfigbox
+ {\hsize \textwidth \advance\hsize -2pc \advance\hsize -\wd\@nfigbox
+ \@parboxrestore
+ \vfil
+ \hbox to\hsize{\if@nfeven\else\hfil\fi
+ \footnotesize Figure \thefigure
+ \if@nfeven\hfil\fi}
+ \vfil}}
+\def\@seteven{\@nfeventrue
+ \@ifundefined{r@@nf\thefigure}{}{%
+ \edef\@tmpnf{\csname r@@nf\thefigure\endcsname}%
+ \edef\@tmpnf{\expandafter\@getpagenum\@tmpnf}%
+ \ifodd\@tmpnf\relax\@nfevenfalse\fi}%
+\label{@nf\thefigure}\edef\@tmpnfx{\if@nfeven e\else o\fi}
+\edef\@tmpnf{\write\@unused {\noexpand\ifodd \noexpand\c@page
+ \noexpand\if \@tmpnfx e\noexpand\@nfmsg{\thefigure} \noexpand\fi
+ \noexpand\else
+ \noexpand\if \@tmpnfx o\noexpand\@nfmsg{\thefigure}\noexpand\fi
+ \noexpand\fi }}\@tmpnf}
+\def\@nfmsg#1{Bad narrowfig: Figure #1 on page \thepage}
+
+\newdimen\@narrowfig
+\newbox\@nfigbox
+\newbox\@nfcapbox
+\newif\if@nfeven
+
+\def\and{\\ and\\}
+\def\maketitle{\newpage \thispagestyle{titlepage}\par
+ \begingroup \lineskip = \z@\null \vskip -30pt\relax
+ \parindent\z@ \LARGE {\raggedright \hyphenpenalty\@M
+ \sf \@title \par}
+\label{@firstpg}
+{ \vskip 13.5pt\relax \normalsize \sf %vskip 13.5pt between title and author
+ \begingroup \addtolength{\baselineskip}{2pt}
+ \@author\par \vskip -2pt
+ \endgroup }
+ {\ifx \@categories\@empty
+ \else
+ \baselineskip 17pt\relax
+ \hbox{\vrule height .2pt width 30pc}}
+ \vskip 8.5pt \footnotesize \box\@abstract \vskip 4pt\relax %vskip8.5 space above abstract
+ {\def\and{\unskip\/{\rm ; }}
+ Categories and Subject Descriptors: \@categories \fi}\par\vskip 4pt\relax
+ \box\@terms \vskip 4pt\relax
+ \box\@keywords \par
+ {\baselineskip 14pt\relax
+ \@abstractbottom
+ }
+ \vskip 23pt\relax
+ \endgroup
+\let\maketitle\relax
+ % \gdef\@author{}\gdef\@title{}
+ \gdef\@categories{}}
+
+
+\newbox\@abstract
+\newbox\@terms
+\newbox\@keywords
+\def\abstract{\global\setbox\@abstract=\vbox\bgroup \everypar{}
+ \footnotesize \hsize 30pc \parindent 10pt \noindent
+ \rule{0pt}{10pt}\ignorespaces}
+\def\endabstract{\egroup}
+
+\def\terms#1{\setbox\@terms=\vbox{\everypar{}
+ \footnotesize \hsize 30pc \parindent 0pt \noindent
+ General Terms: \ignorespaces #1}}
+\def\keywords#1{\setbox\@keywords=\vbox{\everypar{}
+ \footnotesize \hsize 30pc \parindent 0pt \noindent
+ Additional Key Words and Phrases: \ignorespaces #1}
+}
+
+\def\category#1#2#3{\@ifnextchar
+ [{\@category{#1}{#2}{#3}}{\@xcategory{#1}{#2}{#3}}}
+\def\@category#1#2#3[#4]{\edef\@tempa{\ifx \@categories\@empty
+ \else ; \fi}{\def\protect{\noexpand\protect
+ \noexpand}\def\and{\noexpand\and}\xdef\@categories{\@categories\@tempa #1
+[{\bf #2}]:
+ #3\kern\z@---\hskip\z@{\it #4}}}}
+\def\@xcategory#1#2#3{\edef\@tempa{\ifx \@categories\@empty \else ;
+\fi}{\def\protect{\noexpand\protect\noexpand}\def\and{\noexpand
+ \and}\xdef\@categories{\@categories\@tempa #1 [{\bf #2}]: #3}}}
+\def\@categories{}
+\def\bottomstuff{\global\@topnum\z@ \global\@botroom \textheight \begin{figure}
+\parindent\z@
+\hbox{}
+\vskip -\textfloatsep
+\vskip 10pt
+\hrule height .2pt width 30pc
+\vskip 2pt\rule{0pt}{10pt}\ignorespaces}
+\def\endbottomstuff{\end{figure}\gdef\permission{}}
+
+\newenvironment{ackslike}[1]
+ {\par \footnotesize
+ \@ucheadfalse
+ \@startsection{subsection}{2}{\z@}{-16pt plus -2pt minus -1pt}{2pt}{\sf}*
+ {\uppercase{#1}}\par\normalsize
+ \pdfbookmark{Acknowledgments}{Ack}
+ }
+ {\par}
+\newenvironment{acks}{\begin{ackslike}{ACKNOWLEDGMENTS}}{\end{ackslike}}
+
+\def\received{\par\footnotesize\addvspace{18pt plus 0pt minus
+4pt}\parindent\z@}
+\def\endreceived{\label{@lastpg}\hskip-2pt\par}
+
+\mark{{}{}}
+
+\def\ps@myheadings{\let\@mkboth\@gobbletwo
+\def\@oddhead{\hbox{}\hfill \small\sf \rightmark\hskip
+19pt{\Large$\cdot$}\hskip 17pt\mypage}
+\def\@oddfoot{\hbox{}\hfill\tiny\@runningfoot}
+\def\@evenhead{\small\sf\mypage \hskip 17pt{\Large$\cdot$}\hskip 19pt\leftmark\hfill \hbox{}}
+\def\@evenfoot{\tiny\@runningfoot\hfill\hbox{}}
+\def\sectionmark##1{}\def\subsectionmark##1{}}
+\def\@runningfoot{}
+\def\runningfoot#1{\def\@runningfoot{#1}}
+\def\@firstfoot{}
+\def\firstfoot#1{\def\@firstfoot{#1}}
+\def\ps@titlepage{\let\@mkboth\@gobbletwo
+\def\@oddhead{}\def\@oddfoot{\hbox{}\hfill
+\tiny\@firstfoot}\def\@evenhead{}\def\@evenfoot{\tiny\@firstfoot\hfill\hbox{}}}
+
+\def\today{\ifcase\month\or
+ January\or February\or March\or April\or May\or June\or
+ July\or August\or September\or October\or November\or December\fi
+ \space\number\day, \number\year}
+\def\@marrayclassiv{\@addtopreamble{$\displaystyle \@nextchar$}}
+\def\@marrayclassz{\ifcase \@lastchclass \@acolampacol \or \@ampacol \or
+ \or \or \@addamp \or
+ \@acolampacol \or \@firstampfalse \@acol \fi
+\edef\@preamble{\@preamble
+ \ifcase \@chnum
+ \hfil$\relax\displaystyle\@sharp$\hfil \or $\relax\displaystyle\@sharp$\hfil
+ \or \hfil$\relax\displaystyle\@sharp$\fi}}
+\def\marray{\arraycolsep 2.5pt\let\@acol\@arrayacol \let\@classz\@marrayclassz
+ \let\@classiv\@marrayclassiv \let\\\@arraycr\def\@halignto{}\@tabarray}
+\def\endmarray{\crcr\egroup\egroup}
+
+
+\ps@myheadings \pagenumbering{arabic} \onecolumn
+
+%-----------------------BIBLIOGRAPHY STUFF-------------------------
+% this is adapted (November 1993) by Andrew Appel and Rebecca Davies from
+%
+%%% filename = "chicago.sty",
+%%% version = "4", % MODIFIED!
+%%% date = "31 August 1992",
+%%% time = "09:42:44 199",
+%%% author = "Glenn Paulley",
+%%% address = "Data Structuring Group
+%%% Department of Computer Science
+%%% University of Waterloo
+%%% Waterloo, Ontario, Canada
+%%% N2L 3G1",
+%%% telephone = "(519) 885-1211",
+%%% FAX = "(519) 885-1208",
+%%% email = "gnpaulle@bluebox.uwaterloo.ca",
+
+%%% ====================================================================
+%
+% this file: Modification of chicago.sty for new ACM bibliography
+% style, which is similar (but not identical) to the ``Chicago'' style.
+%
+% chicago.sty: Style file for use with bibtex style chicago.bst, for
+% bibliographies formatted according to the 13th Edition of the Chicago
+% Manual of Style.
+%
+% 'newapa.bst' was made from 'plain.bst', 'named.bst', and 'apalike.bst',
+% with lots of tweaking to make it look like APA style, along with tips
+% from Young Ryu and Brian Reiser's modifications of 'apalike.bst'.
+% newapa.sty formed the basis of this style, chicago.sty. Author-date
+% references in newapa.bst formed the basis for chicago.bst. Chicagoa.bst
+% supports annotations.
+%
+% Version 4 (August, 1992):
+% - fixed chicago.bst and chicagoa.bst to handle long author lists in
+% sorting
+% - fixed chicago.bst and chicagoa.bst so that missing page numbers in
+% ``article'' entries are handled correctly
+% - modified chicago.sty to format entries with 2nd and subsequent lines
+% indented.
+%
+% Citation format: (author-last-name year)
+% (author-last-name and author-last-name year)
+% (author-last-name et al. year)
+% (author-last-name)
+% author-last-name
+% author-last-name (year)
+% (author-last-name and author-last-name)
+% (author-last-name et al.)
+% (year) or (year,year)
+% year or year,year
+%
+% Reference list ordering: alphabetical by author or whatever passes
+% for author in the absence of one.
+%
+% This BibTeX style has support for abbreviated author lists and for
+% year-only citations. This is done by having the citations
+% actually look like
+%
+% \citeauthoryear{full-author-info}{abbrev-author-info}{year}
+%
+% The LaTeX style has to have the following (or similar)
+%
+% \let\@internalcite\cite
+% \def\fullcite{\def\citeauthoryear##1##2##3{##1, ##3}\@internalcite}
+% \def\fullciteA{\def\citeauthoryear##1##2##3{##1}\@internalcite}
+% \def\shortcite{\def\citeauthoryear##1##2##3{##2, ##3}\@internalcite}
+% \def\shortciteA{\def\citeauthoryear##1##2##3{##2}\@internalcite}
+% \def\citeyear{\def\citeauthoryear##1##2##3{##3}\@internalcite}
+%
+%
+% -------------------------------------------------------------------------
+%
+% Citation macros.
+%
+\let\@internalcite\cite
+
+\def\cite{\def\@citeseppen{-1000}%
+ \def\@cite##1##2{[##1\if@tempswa , ##2\fi]}%
+ \def\citeauthoryear##1##2##3{##2 ##3}\@internalcite}
+\def\citeXNP#1#2{%
+ \def\@cite@label{#2}%
+ \def\@cite##1##2{##1\if@tempswa , ##2\fi}%
+ \def\citeauthoryear##1##2##3{\@cite@label}\@internalcite{#1}}
+% \def\@citeseppen{-1000}%
+% \def\@cite@label{#1}
+% \def\@cite##1##2{\if@tempswa ##2\fi}%
+% \def\citeauthoryear##1##2##3{##2 ##3}\@internalcite}
+\def\citeNP{\def\@citeseppen{-1000}%
+ \def\@cite##1##2{##1\if@tempswa , ##2\fi}%
+ \def\citeauthoryear##1##2##3{##2 ##3}\@internalcite}
+\def\citeN{\def\@citeseppen{-1000}%
+ \def\@cite##1##2{##1\if@tempswa , ##2]\else{]}\fi}%
+ \def\citeauthoryear##1##2##3{##2 [##3}\@citedata}
+\def\shortciteN{\def\@citeseppen{-1000}%
+ \def\@cite##1##2{##1\if@tempswa , ##2]\else{]}\fi}%
+ \def\citeauthoryear##1##2##3{##2 [##3}\@citedata}
+\def\citeS#1{[\citeANP{#1} \citeyearNP{#1}]}
+\def\citeNS#1{\citeANP{#1} \citeyear{#1}}
+\def\citeNPS#1{\citeANP{#1} \citeyearNP{#1}}
+\def\citeNN{\def\@citeseppen{-1000}%
+ \def\@cite##1##2{[##1\if@tempswa , ##2\fi]}%
+ \def\citeauthoryear##1##2##3{##3}\@citedata}
+
+\def\citeA{\def\@citeseppen{-1000}%
+ \def\@cite##1##2{[##1\if@tempswa , ##2\fi]}%
+ \def\citeauthoryear##1##2##3{##2}\@internalcite}
+\def\citeANP{\def\@citeseppen{-1000}%
+ \def\@cite##1##2{##1\if@tempswa , ##2\fi}%
+ \def\citeauthoryear##1##2##3{##2}\@internalcite}
+
+\def\citeyear{\def\@citeseppen{-1000}%
+ \def\@cite##1##2{[##1\if@tempswa , ##2\fi]}%
+ \def\citeauthoryear##1##2##3{##3}\@citedata}
+\def\citeyearNP{\def\@citeseppen{-1000}%
+ \def\@cite##1##2{##1\if@tempswa , ##2\fi}%
+ \def\citeauthoryear##1##2##3{##3}\@citedata}
+
+%
+% \@citedata and \@citedatax:
+%
+% Place commas in-between citations in the same \citeyear, \citeyearNP,
+% or \citeN command.
+% Use something like \citeN{ref1,ref2,ref3} and \citeN{ref4} for a list.
+%
+\def\@citedata{%
+ \@ifnextchar [{\@tempswatrue\@citedatax}%
+ {\@tempswafalse\@citedatax[]}%
+}
+
+\def\@citedatax[#1]#2{%
+\if@filesw\immediate\write\@auxout{\string\citation{#2}}\fi%
+ \def\@citea{}\@cite{\@for\@citeb:=#2\do%
+ {\@citea\def\@citea{; }\@ifundefined% by Young
+ {b@\@citeb}{{\bf ?}%
+ \@warning{Citation `\@citeb' on page \thepage \space undefined}}%
+{\csname b@\@citeb\endcsname}}}{#1}}%
+
+% don't box citations, separate with ; and a space
+% also, make the penalty between citations negative: a good place to break.
+%
+\def\@citex[#1]#2{%
+\if@filesw\immediate\write\@auxout{\string\citation{#2}}\fi%
+ \def\@citea{}\@cite{\@for\@citeb:=#2\do%
+ {\@citea\def\@citea{; }\@ifundefined% by Young
+ {b@\@citeb}{{\bf ?}%
+ \@warning{Citation `\@citeb' on page \thepage \space undefined}}%
+{\csname b@\@citeb\endcsname}}}{#1}}%
+
+% (from apalike.sty)
+% No labels in the bibliography.
+%
+\def\@biblabel#1{}
+
+% (from apalike.sty)
+% Set length of hanging indentation for bibliography entries.
+%
+\newlength{\bibhang}
+\setlength{\bibhang}{2em}
+
+% Indent second and subsequent lines of bibliographic entries. Stolen
+% from openbib.sty: \newblock is set to {}.
+
+\newdimen\bibindent
+\bibindent=1em
+\@ifundefined{refname}%
+ {\@ifundefined{chapter}%
+ {\newcommand{\refname}{\footnotesize REFERENCES}}%
+ {\newcommand{\refname}{\footnotesize BIBLIOGRAPHY}}%
+ }%
+ {}%
+\@ifundefined{chapter}%
+ {\def\thebibliography#1{\footnotesize \section*{\refname\@mkboth
+ {\uppercase{\refname}}{\uppercase{\refname}}}\list
+ {[\arabic{enumi}]}{
+ \settowidth\labelwidth{[#1]}
+ \leftmargin\labelwidth
+ \advance\leftmargin\labelsep
+ \advance\leftmargin\bibindent
+ \itemindent -\bibindent
+ \listparindent \itemindent
+ \parsep \z@
+ \usecounter{enumi}}
+ \def\newblock{}
+ \sloppy
+ \sfcode`\.=1000\relax}}
+ {\def\thebibliography#1{\footnotesize \chapter*{\refname\@mkboth
+ {\uppercase{\refname}}{\uppercase{\refname}}}\list
+ {[\arabic{enumi}]}{\settowidth\labelwidth{[#1]}
+ \leftmargin\labelwidth
+ \advance\leftmargin\labelsep
+ \advance\leftmargin\bibindent
+ \itemindent -\bibindent
+ \listparindent \itemindent
+ \parsep \z@
+ \usecounter{enumi}}
+ \def\newblock{}
+ \sloppy
+ \sfcode`\.=1000\relax}}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+% fixes to acm trans macro package
+% 31-JAN-1996
+% John Tang Boyland
+
+% newdef need to take the optional parameters of newtheorem
+\def\newdef#1{\@ifnextchar[{\@xnewdef{#1}}{\@ynewdef{#1}}}
+\def\@xnewdef#1[#2]#3{\newtheorem{italic@#1}[#2]{{\em #3}}\@newdef{#1}}
+\def\@ynewdef#1#2{\@ifnextchar[{\@xynewdef{#1}{#2}}{\@yynewdef{#1}{#2}}}
+\def\@xynewdef#1#2[#3]{\newtheorem{italic@#1}{{\em #2}}[#3]\@newdef{#1}}
+\def\@yynewdef#1#2{\newtheorem{italic@#1}{{\em #2}}\@newdef{#1}}
+% and now fix up definition, to change body to use roman font:
+\def\@newdef#1{\newenvironment{#1}{\@ifnextchar[{\@xstartdef{#1}}{\@ystartdef{#1}}}{\end{italic@#1}}}
+\def\@xstartdef#1[#2]{\begin{italic@#1}[#2]\rm}
+\def\@ystartdef#1{\begin{italic@#1}\rm}
+
+% footers produced too small (vpt), when ACM typsets them at 7.5pt (!).
+% A better compromise is viipt.
+\def\@oddfoot{\hbox{}\hfill\scriptsize\@runningfoot}
+\def\@evenfoot{\scriptsize\@runningfoot\hfill\hbox{}}
+
+% first footer was set to (vpt), when ACM typesets them at 6.5pt (!).
+% A better compromise is vipt.
+\def\firstfootsize{\@setsize\firstfootsize{7pt}\vipt\@vipt}
+\def\ps@titlepage{\let\@mkboth\@gobbletwo
+\def\@oddhead{}\def\@oddfoot{\hbox{}\hfill\firstfootsize\@firstfoot}%
+\def\@evenhead{}\def\@evenfoot{\firstfootsize\@firstfoot\hfill\hbox{}}}
+
+% new permission statement
+\long\def\permission{\par
+% linebreaks added to conform to the current style
+Permission to make digital/hard copy of all or part of this material without
+fee
+for personal or classroom use
+provided that the copies are not made or distributed for profit
+or commercial advantage, the ACM copyright/server notice, the title of the
+publication, and its date appear, and notice is given that copying is by
+permission of the ACM, Inc. To copy
+otherwise, to republish, to post on servers, or to redistribute to lists
+requires prior specific
+permission and/or a fee.\par}
+
+% make sure \permission doesn't get trashed
+\def\endbottomstuff{\end{figure}}
+
+% alternate way of using citeyear
+\def\shortcite#1{\citeyear{#1}}
+
+% enumerations and longenums are wrong
+% 1. the second line in a paragraph of an enumerations in theorems
+% (or other trivlists) doesn't line up under the first
+% 1. the second line of a longenum doesn't properly wrap around
+% back to the left margin.
+
+% the original definition of \@listI doesn't set labelwidth
+\def\@listI{\leftmargin\leftmargini
+ \labelwidth\leftmargini\advance\labelwidth-\labelsep
+ \parsep 0pt plus 1pt
+ \topsep 6pt plus 2pt minus 2pt
+ \itemsep 2pt plus 1pt minus .5pt}
+\let\@listi\@listI
+\@listi
+
+% add set of \labelwidth and \itemindent
+\def\longenum{\ifnum \@enumdepth >3 \@toodeep\else
+ \advance\@enumdepth \@ne
+ \edef\@enumctr{enum\romannumeral\the\@enumdepth}\list
+ {\csname label\@enumctr\endcsname}{\usecounter
+ {\@enumctr}\labelwidth\z@\leftmargin\z@
+ \itemindent\parindent \advance\itemindent\labelsep}\fi}
+
+% split electronic appendix into two parts:
+
+\def\appendixhead#1#2#3{
+{#1} available only online.
+You should be able to get the online-only {#2} from the citation page
+for this article:
+\smallskip
+
+\quad \href{#3}{{\small #3}}
+\smallskip
+
+Alternative instructions on how to obtain online-only appendices
+are given on the back inside cover of current issues of ACM TOPLAS
+or on the ACM TOPLAS web page: \nopagebreak \smallskip
+
+ \quad \href{http://www.acm.org/toplas}{{\small http://www.acm.org/toplas} }}
+
+\long\def\elecappendix#1#2#3#4{
+\clearpage
+\makeatletter
+\pagenumbering{withappendix}
+\makeatother
+\appendix
+\par\noindent{\sc This document is the online-only appendix to:}\hfill \vskip 1em
+{\vbox{\Large\sf \parindent0pt\@title{}}}\vskip .5em
+\vbox{\sf \parindent0pt\@author{}}\vskip .5em\noindent
+\vskip 10pt\noindent
+{\firstfootsize #3}
+\vskip 11pt\noindent
+\hrule height .2pt
+\par
+\bottomstuff
+\permission
+\par
+#4
+\par
+\endbottomstuff
+}
+
+% provide for a single acknowledgment
+\def\ack{ \par \footnotesize
+\@ucheadfalse
+\@startsection{subsection}{2}{\z@}{-16pt plus -2pt minus
+ -1pt}{2pt}{\sf}*{ACKNOWLEDGMENT}\par\normalsize
+\pdfbookmark{Acknowledgment}{Ack}
+}
+\def\endack{\par}
+
+% provide both spellings of Acknowledgment(s)
+\let\acknowledgments\acks
+\let\endacknowledgments\endacks
+\let\acknowledgment\ack
+\let\endacknowledgment\endack
+
+\newcommand{\longpage}{\enlargethispage{\baselineskip}}
+\newcommand{\shortpage}{\enlargethispage{-\baselineskip}}
+
+
+% Don't indent bibliography and
+% override \refname (which sets fontsize):
+\def\thebibliography#1{
+ \footnotesize\section*{\footnotesize\sf{REFERENCES}\@mkboth
+ {\uppercase{\refname}}{\uppercase{\refname}}}\pdfbookmark{References}{Ref}\list
+ {\@biblabel{\arabic{enumiv}}}{%
+ %\settowidth\labelwidth{[#1]}
+ \labelwidth 0pt
+ \leftmargin \bibindent
+ \labelsep 0pt
+ \itemindent -\bibindent
+ \listparindent -\bibindent
+ \labelsep -\bibindent
+ \usecounter{enumiv}%
+ \let\p@enumiv\@empty
+ \def\theenumiv{\arabic{enumiv}}}%
+ \def\newblock{\hskip .11em plus.33em minus.07em}%
+ \sloppy
+ \clubpenalty=4500
+ \widowpenalty=4500
+ \frenchspacing}
+\def\endthebibliography{%
+ \def\@noitemerr{\@warning{Empty `thebibliography' environment}}%
+ \endlist}
+\def\@lbibitem[#1]#2{\item[]\if@filesw
+ {\def\protect##1{\string ##1\space}\immediate
+ \write\@auxout{\string\bibcite{#2}{#1}}}\fi\hspace{\bibitemindent}\ignorespaces}
+% Fix cite so it doesn't repeat author lists in citations:
+
+\def\cite{\def\@citeseppen{-1000}%
+ \def\@cite##1##2{[##1\if@tempswa , ##2\fi]}%
+ \let\@lastauthor=\@noauthor
+ \let\citeauthoryear=\citeauthoryear@no@repeats\@internalcite}
+ %\def\citeauthoryear##1##2##3{##2 ##3}\@internalcite
+
+\def\@noauthor={\relax}
+\let\@lastauthor=\@noauthor
+\let\@currauthor=\@noauthor
+
+\def\citeauthoryear@no@repeats#1#2#3{%
+ \def\@currauthor{\csname @author #1\endcsname}%
+ \ifx\@lastauthor\@currauthor{#3}\else{#2 #3}\fi%
+ \let\@lastauthor=\@currauthor}
+
+\DeclareOldFontCommand{\rm}{\normalfont\rmfamily}{\mathrm}
+\DeclareOldFontCommand{\sf}{\normalfont\sffamily}{\mathsf}
+\DeclareOldFontCommand{\tt}{\normalfont\ttfamily}{\mathtt}
+\DeclareOldFontCommand{\bf}{\normalfont\bfseries}{\mathbf}
+\DeclareOldFontCommand{\it}{\normalfont\itshape}{\mathit}
+\DeclareOldFontCommand{\sl}{\normalfont\slshape}{\@nomath\sl}
+\DeclareOldFontCommand{\sc}{\normalfont\scshape}{\@nomath\sc}
+\DeclareRobustCommand*\cal{\@fontswitch\relax\mathcal}
+\DeclareRobustCommand*\mit{\@fontswitch\relax\mathnormal}
+
+
+\firstfoot{ACM Transactions on Programming Languages and Systems,
+ Vol.\ TBD, No.\ TDB, Month Year,
+Pages \pages.}
+
+\runningfoot{ACM Transactions on Programming Languages and Systems,
+ Vol.\ TBD, No.\ TDB, Month Year.}
diff --git a/biblio/bibtex/contrib/alpha-persian/README.txt b/biblio/bibtex/contrib/alpha-persian/README.txt
new file mode 100644
index 0000000000..0bd5c9b13b
--- /dev/null
+++ b/biblio/bibtex/contrib/alpha-persian/README.txt
@@ -0,0 +1,83 @@
+%----------------------------------------------------------------------------------------------------------------------------%
+%----------------------------------------------------------------------------------------------------------------------------%
+Bib. style "alpha-persian", Persian (farsi) version of alpha.bst and also for pdflatex compiler.
+ by: Shapour Madadpour February 2019
+E-mail: madad_sh@yahoo.com
+This package is dependent to XePersian Package for persian language and also without it for pdflatex with help of the following commands:
+%%%%%\let\lr\relax %\let\setlatin\relax %\let\resetlatinfont\relax %\newenvironment{LTRbibitems}{}{}%%%%
+This work is author-maintained (as per LPPL maintenance status)
+by Shapour Madadpour
+%>>>%It has two user guide for persian language users (alpha-persian-p.userguide) and english language users (alpha-persian-l.userguide).
+%----------------------------------------------------------------------------------------------------------------------------%
+
+Thanks to Mahmoud Amintoosi and Mostafa Vahedi for creating the other bibtex styles in persian.
+%----------------------------------------------------------------------------------------------------------------------------%
+
+For XePersian, a Persian Typesetting Package in XeTeX and also for pdflatex.
+It may be distributed and/or modified under the
+conditions of the LaTeX Project Public License (version 1.3c),
+either this version of this license or (at your option) any later version.
+%-----------------------------------------------------------------------------------------------------------------------------%
+
+% BibTeX standard bibliography style `alpha'
+ % Version 0.99b (8-Dec-10 release) for BibTeX versions 0.99a or later.
+ % Copyright (C) 1984, 1985, 1988, 2010 Howard Trickey and Oren Patashnik.
+ % Unlimited copying and redistribution of this file are permitted as long as
+ % it is unmodified. Modifications (and redistribution of modified versions)
+ % are also permitted, but only if the resulting file is renamed to something
+ % besides btxbst.doc, plain.bst, unsrt.bst, alpha.bst, and abbrv.bst.
+ % This restriction helps ensure that all standard styles are identical.
+ % The file btxbst.doc has the documentation for this style.
+%------------------------------------------------------------------------------------------------------------------------------%
+
+ This style has all of properties alpha style. in addition to:
+%++++++%%++++++++++++++++++++++++++++++++++++++++++++% Changes %++++++%%+++++++++++++++++++++++++++++++++++++++++++++++++%
+%>>+ The title structure, has essentially changed.
+%>>+ isbn Added. It Writes in Persian style "شابک"..
+%>>+ issn Added. It Writes in Persian style ""شاپا"".
+%>>+ doi Added. It Writes in Persian style "شناسه‌ی دیجیتال".
+%>>+ slabel Added. slabel field is used for arbitrary label.
+%>>+ mlabel Added. mlabel field is used for a part of manual alpha style (just for author name and \etalchar) label in persian.
+%>>+ madadurltest Added. madadurltest field is needed for title (with link).
+%>>+ murl Added. murl field is used for when you want to your title be with link.
+%>>+ quotation Added. quotation field is used for when you want to your title be with quotation mark.
+%>>+ Compatible with hyperref, url, natbib and cite packages
+%>>>+ This style has\noopsort command for sort the references manually.
+%-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------%
+%-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------%
+
+address
+author % Set for english and persian language(LTR and RTL text).with et~al in persian and english.
+booktitle
+chapter % Set for english and persian language(LTR and RTL text).
+doi %---Added and set for english and persian language(LTR and RTL text)---%It Writes in Persian style "شناسه‌ی دیجیتال".
+edition % Set for english and persian language(LTR and RTL text).
+editor % Set for english and persian language(LTR and RTL text).
+howpublished
+institution
+isbn %---Added and it set for english and persian language(LTR and RTL text)---%It Writes in Persian style "شابک".
+issn %---Added and it set for english and persian language(LTR and RTL text)---%It Writes in Persian style "شاپا".
+journal
+key
+language %---Added and it set for persian language(RTL text)---%
+madadurltest %---Added and it set for english and persian language(LTR and RTL text)---%madadurltest={1},(with murl field)
+ % is needed for title with link(this structure different from key structure).
+mlabel %---Added and it set for english and persian language(LTR and RTL text)---%mlabel field is used for a part of manual alpha style (just for author name
+ %---and \etalchar) label in persian.
+month
+murl %---Added and set for english and persian language(LTR and RTL text)---%murl field is used for when you want to your title be with link(with madadurltest={1} field).
+note
+number % Set for english and persian language(LTR and RTL text).
+organization
+pages % Set for english and persian language(LTR and RTL text).
+publisher
+quotation %---Added and set for english and persian language(LTR and RTL text)---%quotation field is used for when you want to your title be with quotation mark.
+school
+series % Set for english and persian language(LTR and RTL text).
+slabel %---Added and set for english and persian language(LTR and RTL text)---%slabel field is used for arbitrary label.(this structure different from key structure).
+title % The title structure, has essentially changed. You can link it by fill in the murl field with madadurltest={1} in the bibfile. Also you can show title with
+ % or Without. quotation mark by fill in the questiton field in the bibfile.
+type
+url %---Added and set for english and persian language(LTR and RTL text)---%
+volume % Set for english and persian language(LTR and RTL text).
+year \ No newline at end of file
diff --git a/biblio/bibtex/contrib/alpha-persian/alpha-persian-l.userguide.pdf b/biblio/bibtex/contrib/alpha-persian/alpha-persian-l.userguide.pdf
new file mode 100644
index 0000000000..f213ce4dfc
--- /dev/null
+++ b/biblio/bibtex/contrib/alpha-persian/alpha-persian-l.userguide.pdf
Binary files differ
diff --git a/biblio/bibtex/contrib/alpha-persian/alpha-persian-l.userguide.tex b/biblio/bibtex/contrib/alpha-persian/alpha-persian-l.userguide.tex
new file mode 100644
index 0000000000..1aa7191bdf
--- /dev/null
+++ b/biblio/bibtex/contrib/alpha-persian/alpha-persian-l.userguide.tex
@@ -0,0 +1,592 @@
+\documentclass{article}
+\usepackage{xcolor}
+\usepackage{float}
+\parindent0pt
+\usepackage[pagebackref=true,colorlinks,linkcolor=blue,citecolor=green!80!black]{hyperref}
+\usepackage{amssymb}
+\usepackage{amsmath}
+\usepackage{verbatim}
+\usepackage{fancyvrb}
+\usepackage{xcolor}
+\usepackage{ragged2e}
+\newcommand*\justifyv{%
+\fontdimen2\font=0.4em
+\fontdimen3\font=0.2em
+\fontdimen4\font=0.1em
+\fontdimen7\font=0.1em
+\hyphenchar\font=`\-
+}
+\usepackage{fancyhdr}
+%\usepackage{url}
+\usepackage[compress]{cite}
+%باید دوبار خروجی بگیرید.
+%\usepackage[numbers,sort&compress]{natbib}
+\usepackage{graphicx}
+\usepackage{xepersian}
+\settextfont{Yas}
+\newcommand{\PRL}[1]{\RL{\Parsifont #1}}
+\DefineVerbatimEnvironment{rtlverbatim}{Verbatim}{commandchars=+\[\]}
+\newfontfamily\Parsifont[Script=Arabic]{XB Niloofar}
+\newcommand{\prl}[1]{\RL{\Parsifont #1}}
+\newcommand{\pdflatex}{P\!\!\reflectbox{\raisebox{-1mm}{{\small D}}}F\LaTeX}
+\pagestyle{fancy}
+\fancyhf{}
+\rhead[OR]{\lr{\thepage}}
+\lhead[EL]{\lr{\leftmark}}
+\renewcommand{\headrulewidth}{1pt}
+\renewcommand{\footrulewidth}{1pt}
+\fancyfoot[C]{{\lr{\color{green!50!black} By Shapour Madadpour}}}
+\begin{document}
+\begin{latin}\tableofcontents
+\paragraph{\color{red!50!black} version: 1.3}
+\paragraph{\color{red!50!black}10 March 2019}
+\section{\lr{alpha-persian.bst with \XeLaTeX}} \label{12}
+\noindent
+Bib style ``alpha-persian", Persian (farsi) version of alpha.bst (RTL and LTR references).\\
+\begin{Verbatim}[fontsize=\bf,commandchars=\^\#\*,baselinestretch=1,firstnumber=1,formatcom=\color{red!50!black}]
+By: Shapour Madadpour
+E-mail: madad_sh@yahoo.com
+\end{Verbatim}
+{\color{red}$\hookrightarrow$ First Compile:} XeLaTex-BibTeX-XeLaTex-XeLaTex\\
+With this compile, persian references set at the end of latin references.\\
+{\tt\color{blue} Sample:}
+\end{latin}
+\begin{Verbatim}[numbers=left,fontsize=\bf,commandchars=\^\#\*,baselinestretch=1,firstnumber=1,formatcom=\color{green!50!black}]
+@article{karamzadeh2012prime,
+author={Karamzadeh, Omid Ali Shahny},
+title={The Prime Avoidance Lemma Revisited},
+key={7},
+journal={Kyungpook mathematical journal},
+volume={52},
+number={2},
+pages={149^raisebox#.5mm--* ^!^!^!153},
+year={2012},
+quotation={1},
+publisher={Department of Mathematics, Kyungpook National University}
+}
+@phdthesis{mmm,
+title={^prl#فضای توپولوژی*},
+author={^prl# رضایی علی‌آباد,علی*},
+journal={Kyungpook mathematical journal},
+pages={1163^raisebox#.5mm--* ^!^!^!1171},
+LANGUAGE ={Persian},
+mlabel={^prl#ا.م.ف*},
+murl={http://www.w3.org/TR/prov-o/},
+series={second series},
+year={2002},
+chapter={5},
+quotation={1},
+school={^prl#دانشگاه چمران اهواز*},
+}
+\end{Verbatim}
+\begin{figure}[H]
+\centering
+\includegraphics[width=\textwidth,height=3cm]{image/sh11}
+\end{figure}
+\begin{latin}\noindent
+{\color{red}$\hookrightarrow$ Second Compile:} XeLaTex-BibTeX 8 bit-XeLaTex-XeLaTex\\
+{\tt txs:///xelatex |bibtex8 -W -c cp1256fa %.aux| txs:///xelatex|txs:///
+xelatex.}\\
+With this compile, latin references set at the end of persian references.\\
+{\tt\color{blue} Sample:}
+\end{latin}
+\begin{figure}[H]
+\centering
+\includegraphics[width=\textwidth,height=3cm]{image/sht}
+\end{figure}
+\begin{latin}\noindent
+{\tt {\color{red}$\hookrightarrow$ quotation mark for title automatically.}}\\
+{\tt\color{blue} Sample:}
+\end{latin}
+\begin{Verbatim}[numbers=left,fontsize=\bf,commandchars=\^\#\*,baselinestretch=1,firstnumber=1,formatcom=\color{green!50!black}]
+@article{karamzadeh2012prime,
+author={Karamzadeh, Omid Ali Shahny},
+title={The Prime Avoidance Lemma Revisited},
+key={7},
+journal={Kyungpook mathematical journal},
+volume={52},
+number={2},
+pages={149^raisebox#.5mm--* ^!^!^!153},
+year={2012},
+quotation={1},
+madadurltest={1},
+murl={http://www.w3.org/TR/prov-o/},
+publisher={Department of Mathematics, Kyungpook National University}
+}
+@phdthesis{mmm,
+title={^prl#فضای توپولوژی*},
+author={^prl#رضایی علی‌آباد,علی*},
+journal={Kyungpook mathematical journal},
+pages={1163^raisebox#.5mm--* ^!^!^!1171},
+LANGUAGE={Persian},
+mlabel={^prl#ا.م.ف*},
+madadurltest={1},
+quotation={1},
+murl={http://www.w3.org/TR/prov-o/},
+series={second series},
+year={2002},
+chapter={5},
+school={^prl#دانشگاه چمران اهواز*},
+}
+\end{Verbatim}
+\begin{figure}[H]
+\centering
+\includegraphics[width=\textwidth,height=3cm]{image/sh2}
+\end{figure}
+\begin{latin}\noindent
+{\tt {\color{red}$\hookrightarrow$ with or without link for title automatically with hyperref\\ package.}}\\
+{\tt\color{blue} Sample:}
+\begin{Verbatim}[numbers=left,fontsize=\bf,commandchars=\^\#\*,baselinestretch=1,firstnumber=1,formatcom=\color{green!50!black}]
+\usepackage[pagebackref=true,colorlinks,linkcolor=blue]{hyperref}
+\usepackage{xepersian}
+\settextfont{Yas}
+\end{Verbatim}
+\end{latin}
+\begin{figure}[H]
+\centering
+\includegraphics[width=\textwidth,height=3cm]{image/sh3}
+\end{figure}
+\begin{latin}\noindent
+{\tt {\color{red}$\hookrightarrow$ in addition to url with url and hyperref packages, it can\\ have url feild without them.}}\\
+{\tt\color{blue} Sample with hyperref package:}
+\end{latin}
+\begin{Verbatim}[numbers=left,fontsize=\bf,commandchars=\^\#\*,baselinestretch=1,firstnumber=1,formatcom=\color{green!50!black}]
+@article{karamzadeh2012prime,
+author={Karamzadeh, Omid Ali Shahny},
+title={The Prime Avoidance Lemma Revisited},
+key={7},
+journal={Kyungpook mathematical journal},
+volume={52},
+number={2},
+pages={149--153},
+year={2012},
+quotation={1},
+url={http://www.w3.org/TR/prov-o/},
+publisher={Department of Mathematics, Kyungpook National University}
+}
+@phdthesis{mmm,
+title={^prl#فضای توپولوژی*},
+author={^prl#رضایی علی‌آباد,علی*},
+journal={Kyungpook mathematical journal},
+pages={1163^raisebox#.5mm--* ^!^!^!1171},
+LANGUAGE={Persian},
+mlabel={^prl#ا.م.ف*},
+madadurltest={1},
+quotation={1},
+murl={http://www.w3.org/TR/prov-o/},
+series={second series},
+year={2002},
+url={http://www.w3.org/TR/prov-o/},
+chapter={5},
+school={^prl#دانشگاه چمران اهواز*},
+}
+\end{Verbatim}
+\begin{figure}[H]
+\centering
+\includegraphics[width=\textwidth,height=3cm]{image/sh4}
+\end{figure}
+
+\begin{latin}
+{\tt {\color{blue}Sample without url and hyperref packages:}}
+\end{latin}\noindent
+\begin{figure}[H]
+\centering
+\includegraphics[width=\textwidth,height=3.5cm]{image/sh5}
+\end{figure}
+
+\begin{latin}
+{\tt{\color{red}$\hookrightarrow$ issn+isbn+doi+et~al in english and persian bibstyle:}}\\
+{ isbn Added. It Writes in Persian style \rl{"شابک``}.\\
+ issn Added. It Writes in Persian style \rl{"شاپا``}.\\
+doi Added. It Writes in Persian style\rl{"شناسه‌ی دیجیتال``}.}\\
+{\rl{"شابک``}, \rl{"شاپا``} and \rl{"شناسه‌ی دیجیتال``} for {\color{blue} first time} in persian bib style}\\
+{\tt\color{blue} Sample:}
+\begin{Verbatim}[numbers=left,fontsize=\bf,commandchars=\&\#\*,baselinestretch=1,firstnumber=1,formatcom=\color{green!50!black}]
+@inbook{d,
+AUTHOR={&prl#مددپور, شاپور* and &prl#مددپور, محمدحسین* and &prl#سایرین*},
+mlabel={&prl#مدد$^+$*},
+TITLE={&prl#همریختی و بروریختی در حلقه‌ها*},
+JOURNAL={&prl#مجله‌ی گراف فارس*},
+VOLUME ={1},
+YEAR={1395},
+MONTH={&prl#بهار*},
+PAGES={39&raisebox#.5mm--* &!&!&!43},
+quotation={1},
+LANGUAGE={Persian},
+url={http://www.w3.org/TR/prov-o/},
+doi={01.1000/doi-0121},
+isbn={123456789000},
+edition={&prl#دوم*},
+series={&prl#سری دوم*},
+number={10},
+chapter={5},
+madadurltest={1},
+murl={http://www.w3.org/TR/prov-o/},
+publisher={&prl#انتشارات دل آهنگ*},
+note={&prl#یک یادداشت اختیاری در این‌جا می‌توانید وارد کنید*},
+address={&prl#آدرس منتشر کننده*},
+}
+@book{kuznetsov1998elements,
+title={Elements of applied bifurcation theory},
+volume={112},
+madadurltest={1},
+year={1998},
+edition={third},
+publisher={Springer Verlag},
+murl={http://www.w3.org/TR/prov-o/},
+isbn={123456789000},
+number={10},
+pages={10&raisebox#.5mm--* &!&!&!19},
+series={second series},
+chapter={5},
+issn={1111-2222},
+doi={01.1000/doi-0121},
+editor={Kuznetsov, Y.A. and edward, Y.A.},
+address={The address of the publisher},
+}
+\end{Verbatim}
+\end{latin}
+\begin{figure}[H]
+\centering
+\includegraphics[width=\textwidth,height=5.5cm]{image/sh6}
+\end{figure}
+\begin{latin}
+{\tt {\color{red}$\hookrightarrow$ Flexible for each defined label with appropriative field.}}\\
+{\tt\color{blue} Sample:}
+\end{latin}
+\begin{Verbatim}[numbers=left,fontsize=\bf,commandchars=\&\#\*,baselinestretch=1,firstnumber=1,formatcom=\color{green!50!black}]
+slabel={$\checkmark\checkmark\checkmark$},
+OR
+slabel={$\spadesuit$},
+OR
+slabel={$\clubsuit$},
+\end{Verbatim}
+\begin{figure}[H]
+\centering
+\includegraphics[width=\textwidth,height=8cm]{image/sh7}
+\end{figure}
+
+\begin{latin}
+{\tt{\color{red}$\hookrightarrow$ in addition to general label, we can choose numbering label.}}\\
+{\tt\color{blue} Sample:}
+\begin{Verbatim}[numbers=left,fontsize=\bf,commandchars=\&\#\*,baselinestretch=1,firstnumber=1,formatcom=\color{green!50!black}]
+slabel={1},
+OR
+slabel={2},
+OR
+slabel={3},
+OR
+slabel={4},
+\end{Verbatim}
+\end{latin}
+\begin{figure}[H]
+\centering
+\includegraphics[width=\textwidth,height=7cm]{image/sh8}
+\end{figure}
+\begin{latin}
+{\tt {\color{red}$\hookrightarrow$ Compatible with hyperref, url, natbib and cite packages.}}
+\end{latin}
+\begin{latin}
+\begin{verbatim}
+\usepackage[numbers]{natbib}
+\usepackage[compress]{cite}
+\end{verbatim}
+{\tt\color{blue} Sample:}
+\end{latin}
+\begin{figure}[H]
+\centering
+\includegraphics[width=\textwidth,height=9cm]{image/sh9}
+\end{figure}
+\begin{latin}
+{\tt {\color{red}$\hookrightarrow$ you can sort persian references together and also
+english \linebreak references together and you can sort both of them together (mixed)\linebreak too with the help of
+\verb|\noopsort| command.}}\\
+{\tt\color{blue} Sample:}\\
+{\color{blue}$\hookrightarrow$ Compile: XeLaTex-BibTeX-XeLaTex-XeLaTex}
+\end{latin}
+\begin{Verbatim}[numbers=left,fontsize=\bf,commandchars=\&\#\*,baselinestretch=1,firstnumber=1,formatcom=\color{green!50!black}]
+@misc{whatever,
+AUTHOR="{\noopsort{2}}{Madadpour},Ahmad ",
+quotation={1},
+year={2001},
+chapter={5},
+title={Testing the effects of bibtex styles on bibliography formatting},
+murl={http://www.w3.org/TR/prov-o/},
+doi={01.1000/doi-0121},
+madadurltest={1},
+key={665},
+}
+@misc{B02f,
+howpublished={How it was published},
+AUTHOR="{\noopsort{4}}{Madadpour},Shapour ",
+year={2002},
+quotation={1},
+title={First},
+pages={13&raisebox#.5mm--* &!&!&!17},
+madadurltest={1},
+mlabel={$\checkmark^+$},
+murl={http://www.w3.org/TR/prov-o/},
+chapter={5},
+}
+@article{aliabad2004rings,
+title={reference test-Rings of continuous functions vanishing at infinity},
+AUTHOR= "{\noopsort{6}}{Madadpour},Alireza ",
+journal={Commentationes Mathematicae Universitatis Carolinae},
+volume={45},
+pages={519&raisebox#.5mm--* &!&!&!533},
+quotation={1},
+year={2004},
+murl={http://www.w3.org/TR/prov-o/},
+madadurltest={1},
+publisher={Charles University in Prague, Faculty of Mathematics and Physics},
+}
+@article{ali,
+title={reference test-Pasting topological spaces at one point},
+AUTHOR= "{\noopsort{8}}{Madadpour},Mahmood ",
+journal={Czechoslovak Mathematical Journal},
+volume={56},
+number={4},
+pages={1193&raisebox#.5mm--* &!&!&!1206},
+quotation={1},
+year={2006},
+publisher={Springer},
+url={http://www.w3.org/TR/prov-o/},
+}
+@article{Amintoosi87afzayesh,
+TITLE={&prl#افزایش وضوح ناحیه‌ای*},
+BOOKTITLE={&prl#چهاردهمین کنفرانس ملی سالانه انجمن کامپیوتر ایران*},
+author={{\noopsort{1}}{&prl#امین‌طوسی*}&prl#محمود, * and &prl# مزینی ,ناصر*and &prl#سایرین*},
+YEAR ={1387},
+ORGANIZATION={&prl#دانشگاه امیرکبیر*},
+ADDRESS={&prl#تهران، ایران*},
+journal={&prl#نام مجله‌ی چاپ‌کننده*},
+month={&prl#اسفند*},
+doi={01.1000/doi-0121},
+edition={&prl#ششم*},
+volume={45},
+number={3},
+pages={101&raisebox#.5mm--* &!&!&!108},
+issn={1111&raisebox#.5mm-* &!&!&!2222},
+madadurltest={1},
+chapter={5},
+quotation={1},
+LANGUAGE={Persian},
+mlabel={ا.م$^+$},
+slabel={$\heartsuit$},
+murl={http://www.w3.org/TR/prov-o/},
+}
+@inbook{d,
+AUTHOR={{\noopsort{1}}{&prl#مددپور*}&prl#شاپور, * and &prl# مددپور ,محمدحسین*and &prl#سایرین*},
+mlabel={&prl#مدد$^+$*},
+TITLE={&prl#همریختی و بروریختی در حلقه‌ها*},
+JOURNAL={&prl#مجله‌ی گراف فارس*},
+VOLUME={1},
+YEAR={1395},
+MONTH={&prl#بهار*},
+PAGES={39&raisebox#.5mm--* &!&!&!43},
+quotation={1},
+LANGUAGE={Persian},
+doi={&prl#01.1000/doi*&raisebox#.5mm-* &!&!&!0121},
+isbn={123456789000},
+edition={&prl#دوم*},
+series={&prl#سری دوم*},
+number={10},
+chapter={5},
+madadurltest={1},
+murl={http://www.w3.org/TR/prov-o/},
+publisher={&prl#انتشارات دل آهنگ*},
+note={&prl#یک یادداشت اختیاری در این‌جا می‌توانید وارد کنید*},
+address={‌&prl#آدرس منتشر کننده*},
+slabel={$\bigstar$},
+}
+@phdthesis{mmm,
+title={&prl#فضای توپولوژی*},
+author={{\noopsort{5}}{&prl#رضایی علی‌آباد*}&prl#علی,*},
+journal={Kyungpook mathematical journal},
+pages={1163&raisebox#.5mm--* &!&!&!1171},
+LANGUAGE ={Persian},
+mlabel={&prl#ا.م.ف*},
+madadurltest={1},
+quotation={1},
+murl={http://www.w3.org/TR/prov-o/},
+series={second series},
+year={2002},
+url={http://www.w3.org/TR/prov-o/},
+chapter={5},
+school={&prl#دانشگاه چمران اهواز*},
+}
+@inbook{yu,
+author={{\noopsort{1}}{&prl#نامداری*}&prl#مهرداد, * and &prl# کوچک‌پور ,عبدعلی*},
+mlabel ={&prl#ن.ا.م$^+$*},
+TITLE ={&prl#مقدمه‌ای بر نظریه‌ی اصولی مجموعه‌ها*},
+VOLUME={1},
+YEAR={1394},
+MONTH={&prl#بهار*},
+PAGES={39&raisebox#.5mm--* &!&!&!43},
+quotation={1},
+LANGUAGE={Persian},
+doi={322/511},
+isbn={978&raisebox#.5mm-* &!&!&!600&raisebox#.5mm-* &!&!&!141&raisebox#.5mm-* &!&!&!173&raisebox#.5mm-* &!&!&!1},
+edition={&prl#دوم*},
+series={&prl#سری دوم*},
+number={100},
+chapter={5},
+madadurltest={1},
+murl={http://www.w3.org/TR/prov-o/},
+publisher={&prl#انتشارات دانشگاه چمران*},
+note={&prl#یک یادداشت اختیاری در این‌جا می‌توانید وارد کنید*},
+address={&prl#آدرس منتشر کننده*},
+slabel={4},
+}
+\end{Verbatim}
+\begin{latin}
+{\color{blue}$\hookrightarrow$ Compile: XeLaTex-BibTeX-XeLaTex-XeLaTex}
+\end{latin}
+\begin{figure}[H]
+\centering
+\includegraphics[width=\textwidth,height=11.5cm]{image/sh12}
+\end{figure}
+
+
+
+
+
+\noindent
+\begin{latin}
+{\tt{\color{blue} General example with xelatex compiler:}}\\
+{\color{blue}$\hookrightarrow$ Compile: XeLaTex-BibTeX-XeLaTex-XeLaTex}
+\end{latin}
+\lr{\cite{B02f}}
+ و
+\cite{d}
+\cite{Amintoosi87afzayesh}
+\lr{\cite{aliabad2004rings}}
+\lr{\cite{ghafarzadeh2016stem}}
+\cite{aliabad2004rings,ali,whatever,B02f,d}
+و همچنین داریم:
+\lr{\cite{aliabad2004rings,ali,whatever,B02f,d}}
+
+\nocite{*}
+\bibliographystyle{alpha-persian}
+%\bibliography{sample1}
+%\bibliography{sample2}
+%\bibliography{sample3}
+%\bibliography{sample4}
+%\bibliography{sample5}
+%\bibliography{sample6}
+%\bibliography{sample7}
+\bibliography{sample8}
+\newpage
+\begin{latin}
+\section{\lr{alpha-persian.bst with \protect \pdflatex}}
+In addition to xelatex compile,
+You can also use from alpha-persian.bst with pdflatex compile (without xepersian package).
+To do this, just put the following codes before the \verb|\begin{document}|.
+\begin{verbatim}
+\let\lr\relax
+\let\setlatin\relax
+\let\resetlatinfont\relax
+\newenvironment{LTRbibitems}{}{}
+\end{verbatim}
+{\tt\color{blue} Sample:}\\
+{\color{blue}$\hookrightarrow$ Compile: pdfLaTeX-BibTeX-pdfLaTeX-pdfLaTeX}
+\begin{Verbatim}[numbers=left,fontsize=\bf,commandchars=\&\#\*,baselinestretch=1,firstnumber=1,formatcom=\color{green!50!black}]
+@misc{whatever,
+AUTHOR= "{\noopsort{1}}{Madadpour},Ahmad ",
+quotation={1},
+year={2001},
+chapter={5},
+title={Testing the effects of bibtex styles on
+bibliography formatting},
+murl={http://www.w3.org/TR/prov-o/},
+doi={01.1000/doi-0121},
+madadurltest={1},
+key={665},
+}
+@misc{B02f,
+howpublished = {How it was published},
+AUTHOR= "{\noopsort{2}}{Madadpour},Shapour and
+Madadpour , Mohamadhosain and Madadpour , Mitra ",
+year={2002},
+quotation={1},
+title={First},
+pages={13--17},
+madadurltest={1},
+mlabel={&prl#$\checkmark^+$*},
+murl={http://www.w3.org/TR/prov-o/},
+chapter={5},
+}
+@article{aliabad2004rings,
+title={reference test-Rings of continuous functions
+vanishing at infinity},
+AUTHOR= "{\noopsort{3}}{Madadpour},Alireza ",
+journal={Commentationes Mathematicae Universitatis Carolinae},
+volume={45},
+pages={519--533},
+quotation={1},
+year={2004},
+murl={http://www.w3.org/TR/prov-o/},
+madadurltest={1},
+publisher={Charles University in Prague, Faculty of
+Mathematics and Physics},
+}
+@article{ali,
+title={reference test-Pasting topological spaces at one point},
+AUTHOR = "{\noopsort{4}}{Madadpour},Mahmood ",
+journal={Czechoslovak Mathematical Journal},
+volume={56},
+number={4},
+pages={1193--1206},
+quotation={1},
+year={2006},
+publisher={Springer},
+url={http://www.w3.org/TR/prov-o/},
+}
+@book{kuznetsov1998elements,
+title={reference test-Elements of
+applied bifurcation theory},
+volume={112},
+madadurltest={1},
+year={1998},
+edition={third},
+publisher={Springer Verlag},
+murl={http://www.w3.org/TR/prov-o/},
+isbn={123456789000},
+number={10},
+pages={10--19},
+series={second series},
+chapter={5},
+AUTHOR= "{\noopsort{5}}{Madadpour},Behrooz ",
+address={The address of the publisher},
+}
+\end{Verbatim}
+\begin{latin}
+{\color{blue}$\hookrightarrow$ Compile: pdfLaTeX-BibTeX-pdfLaTeX-pdfLaTeX}
+\end{latin}
+\begin{figure}[H]
+\centering
+\includegraphics[width=\textwidth,height=8cm]{image/sh13}
+\end{figure}
+\section*{Notice}
+With pdflatex compiler, we have all the properties in section \ref{12}; so enjoy it.
+\end{latin}
+
+
+
+
+
+\end{document}
+In addition to latex compile,
+You can also use from alpha-persian.bst with pdflatex compile(without xepersian package).
+To do this, just put the following codes before the \begin{document}.
+\let\lr\relax
+\let\resetlatinfont\relax
+\newenvironment{LTRbibitems}{}{}
+
+
+\newcommand{\pdflatex}{\LR {\leavevmode $\smash {\hbox {P\lower .6ex \hbox
+ {\kern -.225em\bidi@reflect@box {D}}\hbox{\bidi@reflect@box{F}} \kern -.4em \LaTeX }}$}}
diff --git a/biblio/bibtex/contrib/alpha-persian/alpha-persian-p.userguide.pdf b/biblio/bibtex/contrib/alpha-persian/alpha-persian-p.userguide.pdf
new file mode 100644
index 0000000000..06e50e310d
--- /dev/null
+++ b/biblio/bibtex/contrib/alpha-persian/alpha-persian-p.userguide.pdf
Binary files differ
diff --git a/biblio/bibtex/contrib/alpha-persian/alpha-persian-p.userguide.tex b/biblio/bibtex/contrib/alpha-persian/alpha-persian-p.userguide.tex
new file mode 100644
index 0000000000..1a533201fd
--- /dev/null
+++ b/biblio/bibtex/contrib/alpha-persian/alpha-persian-p.userguide.tex
@@ -0,0 +1,1183 @@
+%alpha-persian-p.userguide
+%by: shapour madadpour
+%E-mail: madad_sh@yahoo.com
+\documentclass{article}
+\usepackage[top=4cm,left=3cm,right=3cm,bottom=2.5cm]{geometry}
+\usepackage{xcolor}
+\usepackage{float}
+\parindent0pt
+\usepackage[pagebackref=true,colorlinks,linkcolor=blue,citecolor=green!80!black]{hyperref}
+\usepackage{amssymb}
+\usepackage{amsmath}
+\usepackage{verbatim}
+\usepackage{fancyvrb}
+\usepackage{xcolor}
+\usepackage{ragged2e}
+\newcommand*\justifyv{%
+\fontdimen2\font=0.4em
+\fontdimen3\font=0.2em
+\fontdimen4\font=0.1em
+\fontdimen7\font=0.1em
+\hyphenchar\font=`\-
+}
+\usepackage{fancyhdr}
+%\usepackage{url}
+\usepackage[compress]{cite}
+%باید دوبار خروجی بگیرید.
+%\usepackage[numbers,sort&compress]{natbib}
+\usepackage{graphicx}
+\usepackage{xepersian}
+\settextfont[Scale=1.2]{Yas}
+\newcommand{\PRL}[1]{\RL{\Parsifont #1}}
+\DefineVerbatimEnvironment{rtlverbatim}{Verbatim}{commandchars=+\[\]}
+\newfontfamily\Parsifont[Script=Arabic]{XB Niloofar}
+\newcommand{\prl}[1]{\RL{\Parsifont #1}}
+\newcommand{\pdflatex}{P\!\!\reflectbox{\raisebox{-1mm}{{\small D}}}F\LaTeX}
+\pagestyle{fancy}
+\fancyhf{}
+\rhead[OR]{\thepage}
+\lhead[EL]{\leftmark}
+\renewcommand{\headrulewidth}{1pt}
+\renewcommand{\footrulewidth}{1pt}
+\fancyfoot[C]{{\rl{\color{green!50!black}تهیه‌ کننده: شاپور مددپور}}}
+\title{\textbf{
+ سبک آلفاپرشین; سبکی برای ایجاد مراجع فارسی و انگلیسی}}
+\author{\LARGE{\textbf{نویسنده و نگه‌دارنده‌ی بسته‌: شاپور مددپور}}
+\\[1cm]
+\LARGE{\textbf{
+کارشناس ارشد توپولوژی}}
+\\[1cm]
+\LARGE{\textbf{
+دبیر ریاضی، دبیرستان‌های اهواز}}
+}
+\begin{document}
+\maketitle
+\clearpage
+\baselineskip=1cm
+\tableofcontents\clearpage
+\baselineskip=.5cm
+\paragraph{\color{red!50!black}سبک ایجاد مراجع،
+\lr{alpha-persian.bst}~ نسخه: 3.1}
+\paragraph{\color{red!50!black}19 اسفند 1397}
+\paragraph{\color{red!50!black}
+نویسنده و نگه‌دارنده‌ی بسته‌: شاپور مددپور}
+\paragraph{\color{red!50!black}
+ایمیل:
+\lr{madad\_sh@yahoo.com}}\hfill
+
+\vspace*{2cm}
+سبک آلفاپرشین در اسفندماه 1397 توسط اینجانب ایجاد و در آدرس
+زیر از
+\lr{CTAN}
+(شبکه‌ی جامع بایگانی تک) و مخزن تکلایو قرار گرفت.
+\href{https://ctan.org/tex-archive/biblio/bibtex/contrib/alpha-persian}{https://ctan.org/tex-archive/biblio/bibtex/contrib/alpha-persian}\\[.6cm]
+در تصویر زیر نیز می‌توانید محل ثبت و مشخصات آن را در
+\lr{CTAN}
+ببینید.
+\begin{figure}[H]
+\centering
+\includegraphics[width=\textwidth,height=7cm]{image/sh18}
+\end{figure}\vspace*{-.87cm}
+\begin{figure}[H]
+\centering
+\includegraphics[width=\textwidth,height=4cm]{image/sh20}
+ \end{figure}
+\begin{figure}[H]
+\centering
+\includegraphics[width=\textwidth,height=8cm]{image/21}
+\end{figure}
+\section{دیباچه}
+پروژه‌ی
+\lr{\TeX}
+در سال 1978 در دانشگاه استنفورد توسط
+\textcolor{red}{\textbf{دونالد کنوث}}
+شروع شد. او در ابتدا تخمین زده بود که حدود شش ماه
+این کار را به اتمام می‌رساند اما در نهایت مراحل انجام این‌کار
+نزدیک به ده سال طول کشید.
+یک سال پس از آغاز پروژه‌اش، کنوث به
+یکی از سخنرانی مهم خود در نشست سالانه
+\lr{AMS}
+دعوت شد. او درباره‌ی کار خود در
+\lr{\TeX}
+از دید نه تنها جنبه‌های تایپی،
+بلکه ایده‌های ریاضی که در پشت برنامه بود، صحبت کرد.
+در سال 1985،
+\linebreak
+\textcolor{blue}{\textbf{لزلی لمپورت}}
+با معرفی
+\lr{\LaTeX}
+کمک مهمی به محبوبیت
+\lr{\TeX}
+کرد. در واقع
+\lr{\LaTeX}
+مجموعه‌ای از ماکروها
+است که اجازه می‌دهد تا
+نویسندگان به تعامل با سیستم در یک سطح بالاتر از کنوث
+بپردازند. امروزه، سیستم
+\lr{\TeX}
+همچنان یک استاندارد شناخته می‌شود.
+حق کپی رایت این نرم افزار بر عهده ی انجمن ریاضی آمریکا
+\LTRfootnote{(AMS) American Mathematical Society}
+می‌باشد.
+این نرم افزار به صورت رایگان در دسترس قرار دارد. با نرم
+افزار لاتک امروزه می‌توان پایان‌نامه، مقاله‌، کتاب، رزومه، نامه‌ی
+اداری‌، طرح سوال امتحانی و اسلاید به سبک بیمر برای دفاع
+و... تهیه کرد.
+\subsection{مزیتها‌ی لاتک در مقایسه با حروف‌چین‌های دیگر}
+\begin{enumerate}
+\item
+لاتک دارای بهترین خروجی است. خروجی آن معمولاً به صورت پی‌دی‌اف مورد نیاز است که با یک پردازش ساده قابل دسترسی است و
+نیازی به نرم‌افزارهای جانبی برای این‌کار ندارد.
+\item
+لاتک به خوبی به حروف‌چینی واقف است. فاصله‌ی بین کلمات و حروف استاندارد (و قابل تغییر) بوده و در زمینه‌های چیدن پارگراف‌ها
+و ... بی‌نظیر است.
+\item
+لاتک سریع است. این بدان معنی است که با یک پردازش ساده
+می‌توانید خروجی مورد نیاز خود در متن یا کارهای گرافیکی و درج تصویر و ... در زمانی مناسب دریافت کنید.
+\item
+لاتک ثبات دارد. (با بردن متون لاتک به دستگاه‌های دیگر،
+فرم نوشته‌ها به هم نمی‌ریزد)
+\item
+لاتک در عین ثباتش منعطف است.
+رسم جداول و نوشتن مراجع و فراخوانی تصاویر و ارجاع‌ها و
+.... در آن مشکل نیست.
+\item
+ورودی لاتک به صورت متنی است قابل حمل به دستگاه‌های
+دیگر و دارای حجم کم است و برای استایل‌های خاص مانند مقاله،
+کتاب و ... به صورت
+پیش‌فرض تنظیمات دارد.
+\item
+خروجی آن به فرمتهای
+\lr{HTML}
+یا
+\lr{PDF}
+یا
+\lr{PostScript}
+قابل تبدیل است.
+\item
+قابل اجرا بر روی بیشتر سیستم‌ها از جمله ویندوز و
+مکینتاش و .... است (مستقل از سیستم عامل است).
+\item
+لاتک بسیار مناسب و استاندارد برای کلیه‌ی مجامع علمی و
+... می‌باشد.
+\item
+لاتک رایگان است.
+\end{enumerate}
+\subsection{ایجاد مراجع در لاتک}
+در انتهای هر نوشته، مراجعی که در آن نوشته به آنها ارجاع داده شده
+است نوشته می‌شوند. یکی از سبک‌های زیبا و استاندارد جهانی برای
+ایجاد مراجع، سبک
+\lr{BibTeX}
+است. این روش، یک
+روش‌ قدرتمند و انعطاف‌پذیر برای نوشتن مراجع مقالات و
+مدیریت مراجع در لاتک است.
+
+سبک
+\lr{alpha-persian}
+که به تازگی توسط این‌جانب تهیه شده است و در
+\href{https://ctan.org/tex-archive/biblio/bibtex/contrib/alpha-persian}{این آدرس}
+از
+\lr{CTAN}
+قرار گرفته است یکی از سبک‌های
+\lr{BibTeX}
+است که
+که برای بسته‌ی زی‌پرشین جهت پشتیبانی از زبان فارسی و همچنین
+بدون استفاده از بسته‌ی زی‌پرشن برای نوشته‌های انگلیسی
+ تنظیم شده‌ است.
+\\
+قبل از بیان ویژگی‌های این سبک ابتدا جهت آشنایی بهتر با طریقه‌ی
+مرجع‌نویسی به کمک
+\lr{BibTeX}،
+یک نمونه را در زیر می‌آوریم.
+ابتدا یک فایل تک مطابق زیر ایجاد می‌کنیم که در این فایل باید
+سبک ظاهر شدن مراجع و همچنین محلی که می‌خواهیم مراجع در
+سند ما ظاهر شوند را به صورت زیر در سند خود مشخص کنیم.
+\begin{latin}
+\begin{Verbatim}[fontsize=\bf,baselinestretch=1,firstnumber=1,formatcom=\color{red!50!black}]
+\nocite{*}
+\bibliographystyle{alpha-persian}
+\bibliography{sample}
+\end{Verbatim}
+\end{latin}
+در دستورات بالا
+\lr{sample}
+نام فایلی است با پسوند
+\lr{.bib}
+که مراجع و موارد مربوط به آنها (نام و نام خانوادگی نویسنده‌ی اثر،
+سال انشار، شابک، شناسه‌ی دیجیتال و ...)
+به صورت خام در آنها تعریف می‌شوند.
+
+به عنوان مثال از سبک
+\lr{alpha-persian}
+در نمونه‌ی بالا استفاده شده است.
+توجه کنید که ویژگی‌های ظاهر شدن مراجع و موارد مربوط به آنها در
+سبک انتخابی شما تنظیم شده و شما در فایل با پسوند
+\lr{.bib}
+(در نمونه‌ی بالا منظور همان
+\lr{sample.bib}
+یا
+\lr{sample}
+است)
+فقط اطلاعات را وارد می‌کنید و تنظیم آنها به طور خودکار و توسط سبک انتخابی شما انجام می‌شود. برای ایجاد فایل
+\lr{bib}
+کافی است یک فایل جدید در ویرایشگر خود ایجاد و اطلاعات را در
+آن وارد کنید و سپس در هنگام ذخیره‌ی فایل، پسوند آن را
+\lr{.bib}
+(به عنوان نمونه \lr{sample.bib})
+انتخاب کنید و در پوشه‌ی حاوی فایل تک خود قرار دهید.
+دستور
+\verb|\nocite{*}|
+در دستورات بالا جهت ایجاد مراجع (بدون اینکه به آنها رجوع داده
+باشیم) می‌باشد.
+\\
+این سبک (\lr{alpha-persian}) در مخزن تکلایو و در آدرس زیر قرار دارد:
+\begin{latin}
+\begin{Verbatim}[fontsize=\bf,baselinestretch=1,firstnumber=1,formatcom=\color{red!50!black}]
+Direc­tory biblio/bibtex/contrib/alpha-persian
+\end{Verbatim}
+\end{latin}
+چنان‌چه از تکلایو
+2019
+به بالا استفاده می‌کنید نیازی به به‌روز کردن آن جهت استفاده از این سبک ندارید. اگر از تکلایو
+2018
+بهره می‌برید ابتدا مطابق تصاویر زیر تکلایو خود را به روز کنید (در
+مورد توزیع میک‌تک نیز به طور مشابه می‌توان عمل کرد).
+\subsection{به‌روز کردن تکلایو}
+در قسمت جستجوی ویندوز کلمه‌ی
+\lr{tlmgr}
+را جستجو کنید و روی آن کلیک کنید تا
+\lr{TeX Live Mananger 2018}
+مطابق شکل
+(\ref{23})
+ ظاهر گردد و مراحل انجام کار را مطابق شکل
+(\ref{23})
+از سر بگیرید. توجه کنید که ممکن است سرعت نت شما قوی نباشد لذا
+صبور بوده و مراحل را چند بار انجام دهید تا تکلایو شما به روز شود.
+در انتهای تصویر
+(\ref{24})
+ گزینه‌ی
+\lr{alpha-persian}
+ را باید مطابق نمونه تیک زده و گزینه‌ی
+\lr{Update}
+را تایید کنید.
+
+\begin{figure}[H]
+\centering
+\includegraphics[width=\textwidth,height=14cm]{image/sh14}
+\caption{مرحله‌ی اول به‌روز کردن تکلایو}
+\label{23}
+\end{figure}
+\begin{figure}[H]
+\centering
+\includegraphics[width=\textwidth,height=16cm]{image/sh15}
+\caption{مرحله‌ی دوم به‌روز کردن تکلایو}
+\label{24}
+\end{figure}
+\subsection{یک نمونه‌ی عملی}
+\paragraph{نمونه‌ی فایل تک}\hfill
+\begin{latin}
+\begin{Verbatim}[fontsize=\bf,baselinestretch=1,firstnumber=1,formatcom=\color{red!50!black}]
+\documentclass{article}
+\usepackage{xcolor}
+\usepackage[pagebackref=true,colorlinks,linkcolor=blue,%
+citecolor=green!80!black]{hyperref}
+\usepackage{xepersian}
+\settextfont{Yas}
+\begin{document}
+\nocite{*}
+\bibliographystyle{alpha-persian}
+\bibliography{sample}
+\end{document}
+\end{Verbatim}
+\end{latin}
+
+\paragraph{نمونه‌ی فایل
+\lr{bib}
+مطابق نمونه‌ی بالا با نام
+\lr{sample.bib}}
+این فایل را باید در پوشه‌ی سند خود قرار دهید تا در کنار فایل با
+پسوند
+\lr{.tex}
+شما باشد و در زمان پردازش مورد استفاده قرار گیرد.
+\hfill
+
+\begin{Verbatim}[numbers=left,fontsize=\bf,commandchars=\^\#\*,baselinestretch=1,firstnumber=1,formatcom=\color{green!50!black}]
+@article{karamzadeh2012prime,
+author={Karamzadeh, Omid Ali Shahny},
+title={The Prime Avoidance Lemma Revisited},
+key={7},
+journal={Kyungpook mathematical journal},
+volume={52},
+number={2},
+pages={149^raisebox#.5mm--* ^!^!^!153},
+year={2012},
+quotation={1},
+publisher={Department of Mathematics, Kyungpook National University}
+}
+@phdthesis{mmm,
+title={^prl#فضای توپولوژی*},
+author={^prl# رضایی علی‌آباد,علی*},
+journal={Kyungpook mathematical journal},
+pages={1163^raisebox#.5mm--* ^!^!^!1171},
+LANGUAGE={Persian},
+mlabel={^prl#ا.م.ف*},
+murl={http://uselatex.com/blog/},
+series={second series},
+year={2002},
+chapter={5},
+quotation={1},
+school={^prl#دانشگاه چمران اهواز*},
+}
+\end{Verbatim}
+\subsection{پردازش فایل}\label{34}
+در مورد پردازش این فایل‌ها بهتر است
+(\ref{33})
+را ببینید.
+\\
+می‌توان ویرایش‌‌گر خود را طوری تنظیم کرد که به صورت همزمان نیز
+هر چهار مرحله‌ی گفته شده در
+(\ref{33})
+انجام شود. برای این‌کار ویرایش‌گر خود (تک استودیو)
+را باز کنید و از منوی
+Options
+وارد
+\lr{Configure TeX studio}
+شوید و سپس در قسمت
+build
+یک یوزر جدید مطابق مراحل تصاویر
+(\ref{25})
+ ایجاد کنید.
+\\
+ مطابق شماره‌ها عمل کنید و در مرحله‌ی 4 کدهای زیر را وارد کنید:
+\begin{latin}
+\begin{Verbatim}[fontsize=\bf,commandchars=\^\#\*,baselinestretch=1,firstnumber=1,formatcom=\color{red!50!black}]
+txs:///xelatex |bibtex8 -W -c cp1256fa %.aux| txs:///xelatex|txs:///xelatex
+\end{Verbatim}
+\end{latin}
+\begin{figure}[H]
+\centering
+\includegraphics[width=\textwidth,height=10.3cm]{image/sh16}
+\caption{مرحله‌ی اول برای ایجاد
+\lr{Command}
+جدید}
+\label{25}
+\end{figure}\vspace*{-.6cm}
+\begin{figure}[H]
+\centering
+\includegraphics[width=\textwidth,height=9cm]{image/sh17}
+\caption{مرحله‌ی دوم برای ایجاد
+\lr{Command}
+جدید}
+\label{26}
+\end{figure}
+بعد از انجام 5 مرحله‌ی قبل و تایید مراحل با دکمه‌ی
+\lr{ok}
+فایل منبع خود را باز کنید و مطابق تصویر
+(\ref{26})،
+یوزرکامند
+\lr{xexebibxe}
+را از منوی
+\lr{Tools}
+اجرا کنید تا 4 مرحله‌ی پردازش بالا همزمان انجام شوند. \\
+با اجرای فرایند فوق
+ابتدا مراجع فارسی و سپس لاتین قرار می‌گیرند.
+ در غیر این صورت در مرحله‌ی 4 باید کد‌های زیر را وارد کنید:
+\begin{latin}
+\begin{Verbatim}[fontsize=\bf,commandchars=\^\#\*,baselinestretch=1,firstnumber=1,formatcom=\color{red!50!black}]
+txs:///xelatex |bibtex.exe %| txs:///xelatex|txs:///xelatex
+\end{Verbatim}
+\end{latin}
+بدیهی است که فرایند این مرحله کمی طولانی‌تر از حد معمول است و فقط آن را زمانی انجام دهید که می‌خواهید خروجی نهایی را از فایل خود بگیرید.
+\section{%
+سبک آلفاپرشین
+با پردازش‌گر زی‌لاتک
+\lr{(\XeLaTeX)}}
+\label{12}
+\noindent
+سبک آلفا‌پرشین جهت ایجاد مراجع چپ به راست و راست به چپ تنظیم
+گردیده است.
+
+\subsection{طریقه‌ی پردازش فایل در این سبک}\label{33}
+زمانی که در سند شما از این سبک استفاده شود به دو طریق
+می‌توانید فایل خود را پردازش کنید.
+
+\paragraph{طریق اول پردازش فایل}
+به صورت زیر و با چهار مرحله پردازش
+می‌توانید فایل خود را پردازش کنید.
+\vspace*{.5cm}
+\begin{latin}
+{\color{red}$\hookrightarrow$ First Compile:} XeLaTex-BibTeX-XeLaTex-XeLaTex\\
+\end{latin}
+در این نوع پردازش، ابتدا مراجع با زبان انگلیسی و سپس مراجع با
+زبان فارسی قرار می‌گیرند.
+\paragraph{\color{blue} نمونه}
+
+\begin{Verbatim}[numbers=left,fontsize=\bf,commandchars=\^\#\*,baselinestretch=1,firstnumber=1,formatcom=\color{green!50!black}]
+@article{karamzadeh2012prime,
+author={Karamzadeh, Omid Ali Shahny},
+title={The Prime Avoidance Lemma Revisited},
+key={7},
+journal={Kyungpook mathematical journal},
+volume={52},
+number={2},
+pages={149^raisebox#.5mm--* ^!^!^!153},
+year={2012},
+quotation={1},
+publisher={Department of Mathematics, Kyungpook National University}
+}
+@phdthesis{mmm,
+title={^prl#فضای توپولوژی*},
+author={^prl# رضایی علی‌آباد,علی*},
+journal={Kyungpook mathematical journal},
+pages={1163^raisebox#.5mm--* ^!^!^!1171},
+LANGUAGE ={Persian},
+mlabel={^prl#ا.م.ف*},
+murl={http://uselatex.com/blog/},
+series={second series},
+year={2002},
+chapter={5},
+quotation={1},
+school={^prl#دانشگاه چمران اهواز*},
+}
+\end{Verbatim}
+\begin{figure}[H]
+\centering
+\includegraphics[width=\textwidth,height=3.6cm]{image/sh11}
+\end{figure}
+\paragraph{طریق دوم پردازش فایل}
+به صورت زیر می‌توانید فایل خود را پردازش کنید.
+\vspace*{.5cm}
+\begin{latin}
+{\color{red}$\hookrightarrow$ Second Compile:} XeLaTex-BibTeX 8 bit-XeLaTex-XeLaTex\\
+\end{latin}
+که در آن منظور از پرازش
+{\lr {\tt BibTeX 8 bit}}
+ایجاد یک
+{\lr {\tt User Command}}
+در ویرایش‌گر خود و مطابق با
+(\ref{34})
+ و با دستور زیر در مرحله‌ی 4 از آن است:
+\begin{latin}
+\begin{Verbatim}[fontsize=\bf,commandchars=\^\#\*,baselinestretch=1,firstnumber=1,formatcom=\color{red!50!black}]
+bibtex8 -W -c cp1256fa %.aux
+\end{Verbatim}
+\end{latin}
+در این نوع پردازش، ابتدا مراجع با زبان فارسی و سپس مراجع با
+زبان انگلیسی قرار می‌گیرند.
+\begin{figure}[H]
+\centering
+\includegraphics[width=\textwidth,height=3.5cm]{image/sht}
+\end{figure}
+\subsection{ایجاد کوتیشن‌مارک ("عنوان نوشته``) برای عنوان نوشته به صورت خودکار}
+چنان‌چه بخواهید عنوان مقاله‌ی شما به صورت خودکار و به همراه
+کوتیشن‌مارک (علامت نقل قول) ظاهر
+گردد کافی است فیلد
+\lr{quotation}
+را در فایل
+\lr{bib}
+و به صورت زیر پر کنید:
+\begin{latin}
+\begin{Verbatim}[fontsize=\bf,commandchars=\^\#\*,baselinestretch=1,firstnumber=1,formatcom=\color{red!50!black}]
+quotation={1},
+\end{Verbatim}
+\end{latin}
+\paragraph{\color{blue} نمونه}
+نمونه‌‌ی زیر را ببینید:
+\begin{Verbatim}[numbers=left,fontsize=\bf,commandchars=\^\#\*,baselinestretch=1,firstnumber=1,formatcom=\color{green!50!black}]
+@article{karamzadeh2012prime,
+author={Karamzadeh, Omid Ali Shahny},
+title={The Prime Avoidance Lemma Revisited},
+key={7},
+journal={Kyungpook mathematical journal},
+volume={52},
+number={2},
+pages={149^raisebox#.5mm--* ^!^!^!153},
+year={2012},
+quotation={1},
+madadurltest={1},
+murl={http://uselatex.com/blog/},
+publisher={Department of Mathematics, Kyungpook National University}
+}
+@phdthesis{mmm,
+title={^prl#فضای توپولوژی*},
+author={^prl#رضایی علی‌آباد,علی*},
+journal={Kyungpook mathematical journal},
+pages={1163^raisebox#.5mm--* ^!^!^!1171},
+LANGUAGE={Persian},
+mlabel={^prl#ا.م.ف*},
+madadurltest={1},
+quotation={1},
+murl={http://uselatex.com/blog/},
+series={second series},
+year={2002},
+chapter={5},
+school={^prl#دانشگاه چمران اهواز*},
+}
+\end{Verbatim}
+\begin{figure}[H]
+\centering
+\includegraphics[width=\textwidth,height=3.5cm]{image/sh2}
+\end{figure}
+\subsection{ایجاد لینک در سبک آلفاپرشین}
+ در این سبک به سه طریق می‌توان لینک ایجاد کرد; که یکی از
+ شاخصه‌های منحصر به فرد این سبک است.
+\paragraph{طریق اول، ایجاد لینک مخفی برای عنوان:}
+در این روش عنوان، به کمک بسته‌ی هایپررف
+\lr{(hyperref)}
+به صورت لینک‌دار ظاهر می‌گردد و خود آدرس اینترنتی ظاهر نمی‌گردد. در این روش کافی است دو فیلد زیر را در فایل
+\lr{bib}
+پر کنید; که در آن محتویات
+\lr{murl}
+لینک مورد نظر شماست:
+\begin{latin}
+\begin{Verbatim}[fontsize=\bf,commandchars=\^\#\*,baselinestretch=1,firstnumber=1,formatcom=\color{red!50!black}]
+madadurltest={1},
+murl={http://uselatex.com/blog/},
+\end{Verbatim}
+\end{latin}
+\paragraph{طریق دوم، ایجاد لینک آشکار}
+برای ایجاد این نوع لینک کافی است مطابق زیر و
+\textbf{فقط}
+فیلد
+\lr{url}
+را پرکنید:
+\begin{latin}
+\begin{Verbatim}[fontsize=\bf,commandchars=\^\#\*,baselinestretch=1,firstnumber=1,formatcom=\color{red!50!black}]
+url={http://uselatex.com/blog/},
+\end{Verbatim}
+\end{latin}
+در این حالت خود لینک در مراجع ظاهر می‌گردد و همچنین در حالت
+مراجع فارسی از کلمه‌ی لینک به جای
+\lr{URL}
+استفاده می‌شود.
+\paragraph{طریق سوم}
+ترکیب دو روش بالا نیز مانند زیر امکان‌پذیر است:
+\begin{latin}
+\begin{Verbatim}[fontsize=\bf,commandchars=\^\#\*,baselinestretch=1,firstnumber=1,formatcom=\color{red!50!black}]
+madadurltest={1},
+murl={http://uselatex.com/blog/},
+url={http://uselatex.com/blog/},
+\end{Verbatim}
+\end{latin}
+نمونه‌‌های
+(\ref{112})
+را در این زمینه ببینید.
+\subsection{پشتیبانی از بسته‌ی هایپررف جهت ایجاد لینک برای عنوان نوشته (لینک مخفی و لینک آشکار)}\label{112}
+برای ایجاد لینک‌های مورد نظر کافی است بسته‌ی هایپررف را به صورت
+زیر قبل از بسته‌ی زی‌پرشین و در مقدمه‌ی سند فراخوانی کنید.
+\begin{latin}\noindent
+\begin{Verbatim}[fontsize=\bf,commandchars=\^\#\*,baselinestretch=1,firstnumber=1,formatcom=\color{red!50!black}]
+\usepackage[pagebackref=true,colorlinks,linkcolor=blue]{hyperref}
+\usepackage{xepersian}
+\settextfont{Yas}
+\end{Verbatim}
+\end{latin}
+\paragraph{\color{blue} نمونه}
+نمونه‌‌ی ایجاد لینک مخفی برای مقاله را در زیر ببینید:
+\begin{figure}[H]
+\centering
+\includegraphics[width=\textwidth,height=3.6cm]{image/sh3}
+\end{figure}
+\subsection{ایجاد
+\lr{{\large url}}
+بدون استفاده از بسته‌های یو‌آر‌اِل و هایپررف}
+این قابلیت در این سبک وجود دارد که می‌توان در صورت لزوم و عدم
+استفاده از بسته‌های
+\lr{url}
+\lr{hyperref}
+فیلد
+\lr{url}
+را ایجاد کرد.
+\paragraph{\color{blue} نمونه در صورت وجود بسته‌ی
+\lr{hyperref}‌}
+
+\begin{Verbatim}[numbers=left,fontsize=\bf,commandchars=\^\#\*,baselinestretch=1,firstnumber=1,formatcom=\color{green!50!black}]
+@article{karamzadeh2012prime,
+author={Karamzadeh, Omid Ali Shahny},
+title={The Prime Avoidance Lemma Revisited},
+key={7},
+journal={Kyungpook mathematical journal},
+volume={52},
+number={2},
+pages={149--153},
+year={2012},
+quotation={1},
+url={http://uselatex.com/blog/},
+publisher={Department of Mathematics, Kyungpook National University}
+}
+@phdthesis{mmm,
+title={^prl#فضای توپولوژی*},
+author={^prl#رضایی علی‌آباد,علی*},
+journal={Kyungpook mathematical journal},
+pages={1163^raisebox#.5mm--* ^!^!^!1171},
+LANGUAGE={Persian},
+mlabel={^prl#ا.م.ف*},
+madadurltest={1},
+quotation={1},
+murl={http://uselatex.com/blog/},
+series={second series},
+year={2002},
+url={http://uselatex.com/blog/},
+chapter={5},
+school={^prl#دانشگاه چمران اهواز*},
+}
+\end{Verbatim}
+\begin{figure}[H]
+\centering
+\includegraphics[width=\textwidth,height=4.5cm]{image/sh4}
+\end{figure}
+\paragraph{\color{blue} نمونه در صورت عدم وجود بسته‌های
+\lr{hyperref}
+\lr{url}}
+نمونه‌ی زیر را در این زمینه ببینید.
+\begin{figure}[H]
+\centering
+\includegraphics[width=\textwidth,height=4cm]{image/sh5}
+\end{figure}
+\subsection{ایجاد doi (شناسه‌ی دیجیتال)، isbn (شابک) و issn (شاپا) در یک نوشته}
+این سه قابلیت را سبک
+\lr{alpha}
+ دارا نیست. در سبک
+\lr{alpha-persian}
+این قابلیت‌ها به آن در حالت لاتین و فارسی افزوده شده است.
+در این سبک
+\lr{(alpha-persian)}
+ نام فارسی آنها (شناسه‌ی دیجیتال، شابک و شاپا)
+و به طور خودکار در مراجع فارسی اعمال می‌شود.
+\paragraph{\color{blue} نمونه‌ی ورودی در فایل
+\lr{bib}}
+به صورت زیر می‌توانید اطلاعات را در فایل
+\lr{bib}
+وارد کنید.
+\begin{latin}\noindent
+\begin{Verbatim}[fontsize=\bf,commandchars=\^\#\*,baselinestretch=1,firstnumber=1,formatcom=\color{red!50!black}]
+issn={1111-2222},
+doi={01.1000/doi-0121},
+isbn={123456789000},
+\end{Verbatim}
+\end{latin}
+\paragraph{\color{blue} نمونه‌ی کلی در فایل
+\lr{bib}}\hfill
+
+\begin{latin}
+\begin{Verbatim}[numbers=left,fontsize=\bf,commandchars=\&\#\*,baselinestretch=1,firstnumber=1,formatcom=\color{green!50!black}]
+@inbook{d,
+AUTHOR={&prl#مددپور, شاپور* and &prl#مددپور, محمدحسین* and &prl#سایرین*},
+mlabel={&prl#مدد$^+$*},
+TITLE={&prl#همریختی و بروریختی در حلقه‌ها*},
+JOURNAL={&prl#مجله‌ی گراف فارس*},
+VOLUME ={1},
+YEAR={1395},
+MONTH={&prl#بهار*},
+PAGES={39&raisebox#.5mm--* &!&!&!43},
+quotation={1},
+LANGUAGE={Persian},
+url={http://uselatex.com/blog/},
+doi={01.1000/doi-0121},
+isbn={123456789000},
+edition={&prl#دوم*},
+series={&prl#سری دوم*},
+number={10},
+chapter={5},
+madadurltest={1},
+murl={http://uselatex.com/blog/},
+publisher={&prl#انتشارات دل آهنگ*},
+note={&prl#یک یادداشت اختیاری در این‌جا می‌توانید وارد کنید*},
+address={&prl#آدرس منتشر کننده*},
+}
+@book{kuznetsov1998elements,
+title={Elements of applied bifurcation theory},
+volume={112},
+madadurltest={1},
+year={1998},
+edition={third},
+publisher={Springer Verlag},
+murl={http://uselatex.com/blog/},
+isbn={123456789000},
+number={10},
+pages={10&raisebox#.5mm--* &!&!&!19},
+series={second series},
+chapter={5},
+issn={1111-2222},
+doi={01.1000/doi-0121},
+editor={Kuznetsov, Y.A. and edward, Y.A.},
+address={The address of the publisher},
+}
+\end{Verbatim}
+\end{latin}
+\begin{figure}[H]
+\centering
+\includegraphics[width=\textwidth,height=6.5cm]{image/sh6}
+\end{figure}
+\subsection{تنوع برچسب مراجع در سبک آلفاپرشین}
+شاید مهمترین ویژگی این سبک، تنوع در برچسب
+\lr{(label)}
+ دادن به مراجع است. در سبک
+\lr{alpha}
+و در حالت پیش‌فرض، مراجع بر اساس نام خانوادگی نویسنده مرتب
+می‌شوند.
+\paragraph{حالت اول}
+در این سبک با پرکردن فیلد
+\lr{slabel}
+ و مطابق نمونه‌ی زیر می‌توانید برچسب دلخواه
+ (تعریف شده در لاتک) برای مراجع خود انتخاب کنید:
+\begin{Verbatim}[numbers=left,fontsize=\bf,commandchars=\&\#\*,baselinestretch=1,firstnumber=1,formatcom=\color{green!50!black}]
+slabel={$\checkmark\checkmark\checkmark$},
+OR
+slabel={$\spadesuit$},
+OR
+slabel={$\clubsuit$},
+\end{Verbatim}
+\begin{figure}[H]
+\centering
+\includegraphics[width=\textwidth,height=11cm]{image/sh7}
+\end{figure}
+این ویژگی منحصر به فرد
+برجسب‌گذاری برای برچسب‌ها این اختیار را به ما می‌دهد
+که از سیستم شماره‌گذاری عددی نیز به سادگی استفاده کنیم.
+برای انجام این کار ابتدا پردازش کنید و سپس با توجه به ترتیب سبک
+\lr{alpha}
+ شماره‌ی مراجع را انتخاب کنید که بر حسب نام خانوادگی نویسنده است. در ادامه و در
+(\ref{32})
+ می‌بینیم که می‌توان مراجع را با ترتیب دلخواه نیز مرتب کرد.
+نمونه‌‌ی زیر را ببینید.
+\begin{latin}
+\begin{Verbatim}[numbers=left,fontsize=\bf,commandchars=\&\#\*,baselinestretch=1,firstnumber=1,formatcom=\color{green!50!black}]
+slabel={1},
+OR
+slabel={2},
+OR
+slabel={3},
+OR
+slabel={4},
+\end{Verbatim}
+\end{latin}
+\begin{figure}[H]
+\centering
+\includegraphics[width=\textwidth,height=8cm]{image/sh8}
+\end{figure}
+\paragraph{حالت دوم}
+نوع دیگر ایجاد بر چسب، استفاده از حالت پیش‌فرض سبک
+\lr{alpha}
+است. در ای حالت برای مراجع لاتین نیازی به پرکردن فیلدی برای برچسب نیست اما به دلیل متفاوت بودن ساختار زبان فارسی و انگلیسی برای مراجع فارسی باید از فیلد
+\lr{mlabel}
+کمک و یکی از دو حالت زیر استفاده کنید.
+\begin{itemize}
+\item
+چنان‌چه فقط یک نویسنده داشته باشید سه حرف اول از بخش
+ آخر نام خانوادگی نویسنده (با یا بدون یک جداکننده‌ی دلخواه بین
+ حروف) را انتخاب کنید; به عنوان نمونه اگر نویسنده‌ی مقاله علی
+رضایی علی‌آباد باشد به صورت زیر فیلد
+\lr{mlabel}
+را پر کنید (یا روش دلخواه دیگر):
+\begin{latin}
+\begin{Verbatim}[fontsize=\bf,commandchars=\&\#\*,baselinestretch=1,formatcom=\color{red!50!black}]
+mlabel ={&prl#ع.ل.ی*}
+\end{Verbatim}
+\end{latin}
+\item
+اگر چند نویسنده داشته باشید حروف اول از ابتدای بخش آخر نام
+خانوادگی (با یا بدون یک جداکننده‌ی دلخواه بین حروف)
+نویسندگان را انتخاب
+کنید; به عنوان نمونه اگر نویسندگان یک مقاله به ترتیب وفا خلیفی،
+وحید دامن‌افشان و سید جواد رضویان باشند به صورت زیر فیلد
+\lr{mlabel}
+را پر کنید (یا روش دلخواه دیگر):
+\begin{latin}
+\begin{Verbatim}[fontsize=\bf,commandchars=\&\#\*,baselinestretch=1,formatcom=\color{red!50!black}]
+mlabel ={&prl#خ.د.ر*}
+\end{Verbatim}
+\end{latin}
+\end{itemize}
+\paragraph{نکته‌ی مهم}
+معمولاً زمانی که تعداد نویسندگان یک نوشته بیشتر از سه نفر باشند
+تمایل بر این است که در مراجع لاتین از عبارت
+\lr{«et all»}
+ و در فارسی از کلمه‌ی «سایرین» در نوشتن مراجع استفاده شود.
+برای ایجاد این نوع مراجع به صورت زیر عمل کنید:
+\\
+چنان‌چه در مراجع لاتین بخواهیم این اتفاق رخ دهد کافی است در انتهای نوشتن آن مرجع عبارت
+\lr{«and others»}
+ را به صورت زیر وارد کنید:
+\begin{latin}
+\begin{Verbatim}[fontsize=\bf,commandchars=\&\#\*,baselinestretch=1,formatcom=\color{red!50!black}]
+author={Rezaei, Ali and Namdari, Mehrdad and Eatemadi, Ali. and others},
+\end{Verbatim}
+\end{latin}
+در این حالت در برچسب این مرجع به طور خودکار بین نام و سال
+نوشته‌شدن آن نوشته یک «+» و در حالت توان و به زیبایی ایجاد
+می‌شود.
+چنان‌چه در مراجع فارسی بخواهیم این اتفاق رخ دهد کافی است
+در انتهای نوشتن آن مرجع به صورت زیر عمل کنید:
+\begin{latin}
+\begin{Verbatim}[fontsize=\bf,commandchars=\&\#\*,baselinestretch=1,formatcom=\color{red!50!black}]
+author={&prl#امین‌طوسی,محمود* and&prl# مزینی ,ناصر* and &prl#سایرین*},
+\end{Verbatim}
+\end{latin}
+در این حالت باید در
+\lr{mlabel}
+به صورت زیر
+\verb|$^+$|
+را ایجاد کنید:
+\begin{latin}
+\begin{Verbatim}[fontsize=\bf,commandchars=\&\#\*,baselinestretch=1,formatcom=\color{red!50!black}]
+mlabel = {&prl#ا.م*$^+$},
+\end{Verbatim}
+\end{latin}
+نمونه‌ی
+(\ref{35})
+را ببنید.
+\subsection{سازگاری این سبک با بسته‌های
+\lr{{\large cite}}
+\lr{{\large natbib}}}\label{35}
+این سبک اگر با بسته‌های فوق به کار رود ایجاد مشکل نخواهد کرد.
+برای فشرده کردن ارجاعات متوالی معمولاً به همراه این سبک
+از این بسته‌ها کمک می‌گیریم.
+
+\begin{latin}
+\begin{Verbatim}[fontsize=\bf,commandchars=\^\#\*,baselinestretch=1,firstnumber=1,formatcom=\color{red!50!black}]
+\usepackage[numbers,sort&compress]{natbib}
+\usepackage[compress]{cite}
+\end{Verbatim}
+\end{latin}\vspace*{-.8cm}
+\paragraph{\color{blue} نمونه}
+در نمونه‌ی زیر از بسته‌ی
+\lr{{\large cite}}
+برای فشرده‌ کردن ارجاعات متوالی استفاده شده است.
+\begin{figure}[H]
+\centering
+\includegraphics[width=\textwidth,height=12.5cm]{image/sh9}
+\end{figure}
+\subsection{ترتیب دلخواه برای مراجع}\label{32}
+در این سبک می‌توانید به کمک ساختار دستور
+\verb|\noopsort|
+مراجع فارسی را با هم و یا مراجع انگلیسی
+را نیز با هم و همچنین هر دو را به صورت ترکیبی بچینیم.
+برای انجام این کار ماکروی
+\verb|\noopsort|
+برای این سبک تنظیم شده است که می‌توانید آن را برای نام خانوادگی نویسنده‌ و به صورت زیر به کار ببرید:
+\begin{latin}
+\begin{Verbatim}[fontsize=\bf,commandchars=\^\#\*,baselinestretch=1,firstnumber=1,formatcom=\color{red!50!black}]
+AUTHOR = "{\noopsort{1}}{Madadpour},Shapour ",
+\end{Verbatim}
+\end{latin}
+توجه کنید چنان‌چه بخواهید تمام مراجع را به صورت دستی
+مرتب کنید باید برای تمام مراجع این‌کار را انجام دهید.
+\\
+پردازش این‌گونه فایل‌ها باید به صورت
+زیر برای زی‌لاتک و یا پی‌دی‌اف لاتک انجام شود:
+\begin{latin}
+\begin{Verbatim}[fontsize=\bf,commandchars=\^\#\*,baselinestretch=1,firstnumber=1,formatcom=\color{red!50!black}]
+XeLaTex-BibTeX-XeLaTex-XeLaTex
+OR
+pdfLaTeX-BibTeX-pdfLaTeX-pdfLaTeX
+\end{Verbatim}
+\end{latin}
+\begin{Verbatim}[numbers=left,fontsize=\bf,commandchars=\&\#\*,baselinestretch=1,firstnumber=1,formatcom=\color{green!50!black}]
+@misc{whatever,
+AUTHOR="{\noopsort{2}}{Madadpour},Ahmad ",
+quotation={1},
+year={2001},
+chapter={5},
+title={Testing the effects of bibtex styles on bibliography formatting},
+murl={http://www.w3.org/TR/prov-o/},
+doi={01.1000/doi-0121},
+madadurltest={1},
+key={665},
+}
+@misc{B02f,
+howpublished={How it was published},
+AUTHOR="{\noopsort{4}}{Madadpour},Shapour ",
+year={2002},
+quotation={1},
+title={First},
+pages={13&raisebox#.5mm--* &!&!&!17},
+madadurltest={1},
+mlabel={$\checkmark^+$},
+murl={http://www.w3.org/TR/prov-o/},
+chapter={5},
+}
+@article{aliabad2004rings,
+title={reference test-Rings of continuous functions vanishing at infinity},
+AUTHOR= "{\noopsort{6}}{Madadpour},Alireza ",
+journal={Commentationes Mathematicae Universitatis Carolinae},
+volume={45},
+pages={519&raisebox#.5mm--* &!&!&!533},
+quotation={1},
+year={2004},
+murl={http://www.w3.org/TR/prov-o/},
+madadurltest={1},
+publisher={Charles University in Prague, Faculty of Mathematics and Physics},
+}
+@article{ali,
+title={reference test-Pasting topological spaces at one point},
+AUTHOR= "{\noopsort{8}}{Madadpour},Mahmood ",
+journal={Czechoslovak Mathematical Journal},
+volume={56},
+number={4},
+pages={1193&raisebox#.5mm--* &!&!&!1206},
+quotation={1},
+year={2006},
+publisher={Springer},
+url={http://www.w3.org/TR/prov-o/},
+}
+@article{Amintoosi87afzayesh,
+TITLE={&prl#افزایش وضوح ناحیه‌ای*},
+BOOKTITLE={&prl#چهاردهمین کنفرانس ملی سالانه انجمن کامپیوتر ایران*},
+author={{\noopsort{1}}{&prl#امین‌طوسی*}&prl#محمود, * and &prl# مزینی ,ناصر*and &prl#سایرین*},
+YEAR ={1387},
+ORGANIZATION={&prl#دانشگاه امیرکبیر*},
+ADDRESS={&prl#تهران، ایران*},
+journal={&prl#نام مجله‌ی چاپ‌کننده*},
+month={&prl#اسفند*},
+doi={01.1000/doi-0121},
+edition={&prl#ششم*},
+volume={45},
+number={3},
+pages={101&raisebox#.5mm--* &!&!&!108},
+issn={1111&raisebox#.5mm-* &!&!&!2222},
+madadurltest={1},
+chapter={5},
+quotation={1},
+LANGUAGE={Persian},
+mlabel={ا.م$^+$},
+slabel={$\heartsuit$},
+murl={http://www.w3.org/TR/prov-o/},
+}
+@inbook{d,
+AUTHOR={{\noopsort{1}}{&prl#مددپور*}&prl#شاپور, * and &prl# مددپور ,محمدحسین*and &prl#سایرین*},
+mlabel={&prl#مدد$^+$*},
+TITLE={&prl#همریختی و بروریختی در حلقه‌ها*},
+JOURNAL={&prl#مجله‌ی گراف فارس*},
+VOLUME={1},
+YEAR={1395},
+MONTH={&prl#بهار*},
+PAGES={39&raisebox#.5mm--* &!&!&!43},
+quotation={1},
+LANGUAGE={Persian},
+doi={&prl#01.1000/doi*&raisebox#.5mm-* &!&!&!0121},
+isbn={123456789000},
+edition={&prl#دوم*},
+series={&prl#سری دوم*},
+number={10},
+chapter={5},
+madadurltest={1},
+murl={http://www.w3.org/TR/prov-o/},
+publisher={&prl#انتشارات دل آهنگ*},
+note={&prl#یک یادداشت اختیاری در این‌جا می‌توانید وارد کنید*},
+address={‌&prl#آدرس منتشر کننده*},
+slabel={$\bigstar$},
+}
+@phdthesis{mmm,
+title={&prl#فضای توپولوژی*},
+author={{\noopsort{5}}{&prl#رضایی علی‌آباد*}&prl#علی,*},
+journal={Kyungpook mathematical journal},
+pages={1163&raisebox#.5mm--* &!&!&!1171},
+LANGUAGE ={Persian},
+mlabel={&prl#ا.م.ف*},
+madadurltest={1},
+quotation={1},
+murl={http://www.w3.org/TR/prov-o/},
+series={second series},
+year={2002},
+url={http://www.w3.org/TR/prov-o/},
+chapter={5},
+school={&prl#دانشگاه چمران اهواز*},
+}
+@inbook{yu,
+author={{\noopsort{1}}{&prl#نامداری*}&prl#مهرداد, * and &prl# کوچک‌پور ,عبدعلی*},
+mlabel ={&prl#ن.ا.م$^+$*},
+TITLE ={&prl#مقدمه‌ای بر نظریه‌ی اصولی مجموعه‌ها*},
+VOLUME={1},
+YEAR={1394},
+MONTH={&prl#بهار*},
+PAGES={39&raisebox#.5mm--* &!&!&!43},
+quotation={1},
+LANGUAGE={Persian},
+doi={322/511},
+isbn={978&raisebox#.5mm-* &!&!&!600&raisebox#.5mm-* &!&!&!141&raisebox#.5mm-* &!&!&!173&raisebox#.5mm-* &!&!&!1},
+edition={&prl#دوم*},
+series={&prl#سری دوم*},
+number={100},
+chapter={5},
+madadurltest={1},
+murl={http://www.w3.org/TR/prov-o/},
+publisher={&prl#انتشارات دانشگاه چمران*},
+note={&prl#یک یادداشت اختیاری در این‌جا می‌توانید وارد کنید*},
+address={&prl#آدرس منتشر کننده*},
+slabel={4},
+}
+\end{Verbatim}
+\begin{figure}[H]
+\centering
+\includegraphics[width=\textwidth,height=15.5cm]{image/sh12}
+\end{figure}
+
+
+\paragraph{یک نمونه‌ی کلی}
+فایل
+\lr{bib}
+این نمونه در
+\href{https://ctan.org/tex-archive/biblio/bibtex/contrib/alpha-persian}{این آدرس از
+\lr{CTAN}}
+و با نام
+\lr{sample8}
+قابل دسترسی است.
+\\
+\noindent
+\begin{latin}
+{\color{blue}$\hookrightarrow$ Compile: XeLaTex-BibTeX 8 bit-XeLaTex-XeLaTex}\\
+\end{latin}
+\lr{\cite{B02f}}
+ و
+\cite{d}
+\cite{Amintoosi87afzayesh}
+\lr{\cite{aliabad2004rings}}
+\lr{\cite{ghafarzadeh2016stem}}
+\cite{aliabad2004rings,ali,whatever,B02f,d}
+و همچنین داریم:
+\\
+\lr{\cite{aliabad2004rings,ali,whatever,B02f,d}}
+
+\nocite{*}
+\bibliographystyle{alpha-persian}
+%\bibliography{sample1}
+%\bibliography{sample2}
+%\bibliography{sample3}
+%\bibliography{sample4}
+%\bibliography{sample5}
+%\bibliography{sample6}
+%\bibliography{sample7}
+\bibliography{sample8}
+\newpage
+\section{%
+سبک آلفاپرشین
+با پردازش‌گر پی‌دی‌اف ‌لاتک
+\lr{(\protect \pdflatex)}}
+استفاده از سبک آلفاپرشین
+بدون بسته‌ی زی‌پرشین و پردازشگر
+\lr{pdfLaTeX}
+نیز به سادگی امکان‌پذیر است.
+\\
+اگرچه این سبک برای استفاده‌ی فارسی‌زبانان و به کمک بسته‌ی
+زی‌پرشین تدارک دیده شده است; اما با قرار دادن ساختار زیرقبل از
+\verb|\begin{document}|
+در سند خود می‌توانید با پردازش‌گر
+\lr{pdfLaTeX}
+نیز برای اسناد لاتین بهره بگیرید:
+\begin{latin}
+\begin{Verbatim}[fontsize=\bf,commandchars=\^\#\*,baselinestretch=1,firstnumber=1,formatcom=\color{red!50!black}]
+\let\lr\relax
+\let\setlatin\relax
+\let\resetlatinfont\relax
+\newenvironment{LTRbibitems}{}{}
+\end{Verbatim}
+\end{latin}
+\paragraph{\color{blue} نمونه‌:}\hfill
+
+\begin{latin}
+{\color{blue}$\hookrightarrow$ Compile: pdfLaTeX-BibTeX-pdfLaTeX-pdfLaTeX}
+\begin{Verbatim}[numbers=left,fontsize=\bf,commandchars=\&\#\*,baselinestretch=1,firstnumber=1,formatcom=\color{green!50!black}]
+@misc{whatever,
+AUTHOR= "{\noopsort{1}}{Madadpour},Ahmad ",
+quotation={1},
+year={2001},
+chapter={5},
+title={Testing the effects of bibtex styles on
+bibliography formatting},
+murl={http://www.w3.org/TR/prov-o/},
+doi={01.1000/doi-0121},
+madadurltest={1},
+key={665},
+}
+@misc{B02f,
+howpublished = {How it was published},
+AUTHOR= "{\noopsort{2}}{Madadpour},Shapour and
+Madadpour , Mohamadhosain and Madadpour , Mitra ",
+year={2002},
+quotation={1},
+title={First},
+pages={13--17},
+madadurltest={1},
+mlabel={&prl#$\checkmark^+$*},
+murl={http://www.w3.org/TR/prov-o/},
+chapter={5},
+}
+@article{aliabad2004rings,
+title={reference test-Rings of continuous functions
+vanishing at infinity},
+AUTHOR= "{\noopsort{3}}{Madadpour},Alireza ",
+journal={Commentationes Mathematicae Universitatis Carolinae},
+volume={45},
+pages={519--533},
+quotation={1},
+year={2004},
+murl={http://www.w3.org/TR/prov-o/},
+madadurltest={1},
+publisher={Charles University in Prague, Faculty of
+Mathematics and Physics},
+}
+@article{ali,
+title={reference test-Pasting topological spaces at one point},
+AUTHOR = "{\noopsort{4}}{Madadpour},Mahmood ",
+journal={Czechoslovak Mathematical Journal},
+volume={56},
+number={4},
+pages={1193--1206},
+quotation={1},
+year={2006},
+publisher={Springer},
+url={http://www.w3.org/TR/prov-o/},
+}
+@book{kuznetsov1998elements,
+title={reference test-Elements of
+applied bifurcation theory},
+volume={112},
+madadurltest={1},
+year={1998},
+edition={third},
+publisher={Springer Verlag},
+murl={http://www.w3.org/TR/prov-o/},
+isbn={123456789000},
+number={10},
+pages={10--19},
+series={second series},
+chapter={5},
+AUTHOR= "{\noopsort{5}}{Madadpour},Behrooz ",
+address={The address of the publisher},
+}
+\end{Verbatim}
+\begin{latin}
+{\color{blue}$\hookrightarrow$ Compile: pdfLaTeX-BibTeX-pdfLaTeX-pdfLaTeX}
+\end{latin}
+\begin{figure}[H]
+\centering
+\includegraphics[width=\textwidth,height=11cm]{image/sh13}
+\end{figure}
+\end{latin}
+\paragraph{توجه}
+زمانی که از پردازش‌گر پی‌دی‌اف لاتک در اسناد لاتین استفاده می‌کنید
+تمام ویژگیهای پردازش با زی‌لاتک را نیز دارید.
+
+
+\noindent
+برگ سبزیست تحفه‌ی درویش و در پایان امیدوارم مفید واقع
+شود و مجدداً از تمام عزیزان کاربر و صاحب‌نظر خواهشمندم
+با توجه به این‌که تاکنون در گیت‌لب فایل این سبک را قرار
+نداده‌ام، هرگونه پیشنهاد را به ایمیل شخصی این‌جانب در نشانی
+\verb|madad_sh@yahoo.com|
+ارسال کنند و پیشاپیش از همکاری شما عزیزان سپاس‌گزارم.
+درود بر شما.
+\begin{center}
+{\LARGE نوزدهم اسفند هزار و سیصد و نود و هفت; شاپور مددپور}
+\end{center}
+
+
+\end{document}
diff --git a/biblio/bibtex/contrib/alpha-persian/alpha-persian.bst b/biblio/bibtex/contrib/alpha-persian/alpha-persian.bst
new file mode 100644
index 0000000000..22693abf9d
--- /dev/null
+++ b/biblio/bibtex/contrib/alpha-persian/alpha-persian.bst
@@ -0,0 +1,1831 @@
+%----------------------------------------------------------------------------------------------------------------------------%
+%----------------------------------------------------------------------------------------------------------------------------%
+
+%>>>% Bib. style "alpha-persian", Persian (farsi) version of alpha.bst and also for pdflatex compiler.
+%>>>% by: Shapour Madadpour March 2019
+%>>>% E-mail: madad_sh@yahoo.com
+%>>>%It has two user guide for persian language users (alpha-persian-p.userguide) and english language users (alpha-persian-l.userguide).
+%----------------------------------------------------------------------------------------------------------------------------%
+
+%>>>% Thanks to Mahmoud Amintoosi and Mostafa Vahedi for creating the other bibtex styles in persian.
+%----------------------------------------------------------------------------------------------------------------------------%
+
+%>>>% For XePersian, a Persian Typesetting Package in XeTeX and also for pdflatex with help of the following commands:
+%%%%%\let\lr\relax %\let\setlatin\relax %\let\resetlatinfont\relax %\newenvironment{LTRbibitems}{}{}%%%%
+%>>>% It may be distributed and/or modified under the
+%>>>% conditions of the LaTeX Project Public License (version 1.3c),
+%>>>% either this version of this license or (at your option) any later version.
+%>>>% This style has\noopsort command for sort the references manually.
+%-----------------------------------------------------------------------------------------------------------------------------%
+
+% BibTeX standard bibliography style `alpha'
+ % Version 0.99b (8-Dec-10 release) for BibTeX versions 0.99a or later.
+ % Copyright (C) 1984, 1985, 1988, 2010 Howard Trickey and Oren Patashnik.
+ % Unlimited copying and redistribution of this file are permitted as long as
+ % it is unmodified. Modifications (and redistribution of modified versions)
+ % are also permitted, but only if the resulting file is renamed to something
+ % besides btxbst.doc, plain.bst, unsrt.bst, alpha.bst, and abbrv.bst.
+ % This restriction helps ensure that all standard styles are identical.
+ % The file btxbst.doc has the documentation for this style.
+%------------------------------------------------------------------------------------------------------------------------------%
+
+%>>>% This style has all of properties alpha style. in addition to:
+%++++++%%++++++++++++++++++++++++++++++++++++++++++++% Changes %++++++%%+++++++++++++++++++++++++++++++++++++++++++++++++%
+%>>+ The title structure, has essentially changed.
+%>>+ isbn Added. It Writes in Persian style "شابک".
+%>>+ issn Added. It Writes in Persian style "شاپا".
+%>>+ doi Added. It Writes in Persian style "شناسه‌ی دیجیتال".
+%>>+ slabel Added. slabel field is used for arbitrary label.
+%>>+ mlabel Added. mlabel field is used for a part of manual alpha style (just for author name and \etalchar) label in persian.
+%>>+ madadurltest Added. madadurltest field is needed for title (with link).
+%>>+ murl Added. murl field is used for when you want to your title be with link.
+%>>+ quotation Added. quotation field is used for when you want to your title be with quotation mark.
+%>>+ Compatible with hyperref, url, natbib and cite packages
+%-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------%
+%-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------%
+
+ENTRY
+{address
+author % Set for english and persian language(LTR and RTL text).with et~al in persian and english.
+booktitle
+chapter % Set for english and persian language(LTR and RTL text).
+doi %---Added and set for english and persian language(LTR and RTL text)---%It Writes in Persian style "شناسه‌ی دیجیتال".
+edition % Set for english and persian language(LTR and RTL text).
+editor % Set for english and persian language(LTR and RTL text).
+howpublished
+institution
+isbn %---Added and it set for english and persian language(LTR and RTL text)---%It Writes in Persian style "شابک".
+issn %---Added and it set for english and persian language(LTR and RTL text)---%It Writes in Persian style "شاپا".
+journal
+key
+language %---Added and it set for persian language(RTL text)---%
+madadurltest %---Added and it set for english and persian language(LTR and RTL text)---%madadurltest={1},(with murl field)
+ % is needed for title with link(this structure different from key structure).
+mlabel %---Added and it set for english and persian language(LTR and RTL text)---%mlabel field is used for a part of manual alpha style (just for author name
+ %---and \etalchar) label in persian.
+month
+murl %---Added and set for english and persian language(LTR and RTL text)---%murl field is used for when you want to your title be with link(with madadurltest={1} field).
+note
+number % Set for english and persian language(LTR and RTL text).
+organization
+pages % Set for english and persian language(LTR and RTL text).
+publisher
+quotation %---Added and set for english and persian language(LTR and RTL text)---%quotation field is used for when you want to your title be with quotation mark.
+school
+series % Set for english and persian language(LTR and RTL text).
+slabel %---Added and set for english and persian language(LTR and RTL text)---%slabel field is used for arbitrary label.(this structure different from key structure).
+title % The title structure, has essentially changed. You can link it by fill in the murl field with madadurltest={1} in the bibfile. Also you can show title with
+ % or Without. quotation mark by fill in the questiton field in the bibfile.
+type
+url %---Added and set for english and persian language(LTR and RTL text)---%
+volume % Set for english and persian language(LTR and RTL text).
+year
+}
+{}
+{ label extra.label sort.label }
+%-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------%
+%-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------%
+
+INTEGERS { output.state before.all mid.sentence after.sentence after.block }
+FUNCTION {is.print.banners.to.terminal}{#1}
+%--------------------------------------------------------------------- FILE VERSION AND BANNER ---------------------------------------------------------------------------------%
+
+FUNCTION{bst.file.version} { "1.3" }
+FUNCTION{bst.file.date} { "2019/03/10" }
+FUNCTION{bst.file.website} { "http://www.parsilatex.com" }
+FUNCTION{bst.file.author} {"Sh.Madadpour" }
+FUNCTION {banner.message}
+{ is.print.banners.to.terminal
+ { "-- alpha-persian.bst version" " " * bst.file.version *
+ " (" * bst.file.date * ") " * %"by " * bst.file.author *
+ top$
+ "-- This is a BibTeX style for XePersian and also without it: " bst.file.website *
+ %top$
+ %" " *
+ top$
+ }
+ { skip$ }
+ if$
+}
+
+FUNCTION {completed.message}
+{ is.print.banners.to.terminal
+ { ""
+ top$
+ "Done."
+ top$
+ }
+ { skip$ }
+ if$
+}
+%------------------------------------------------------------------------------------------------------------------------------------------------------------------------------%
+%------------------------------------------------------------------------------------------------------------------------------------------------------------------------------%
+
+FUNCTION {init.state.consts}
+{ #0 'before.all :=
+ #1 'mid.sentence :=
+ #2 'after.sentence :=
+ #3 'after.block :=
+}
+
+STRINGS { s t }
+FUNCTION {output.nonnull}
+{ 's :=
+ output.state mid.sentence =
+ { ", " * write$ }
+ { output.state after.block =
+ { add.period$ write$
+ newline$
+ "\newblock " write$
+ }
+ { output.state before.all =
+ 'write$
+ { add.period$ " " * write$ }
+ if$
+ }
+ if$
+ mid.sentence 'output.state :=
+ }
+ if$
+ s
+}
+FUNCTION {author.mkey.label}
+{ author empty$
+ { key empty$
+ { cite$ #1 #3 substring$ }
+ { key #3 text.prefix$ }
+ if$
+ }
+ { ""}
+ if$
+}
+%----------------------------------------------------------------------------------add and change-----------------------------------------------------------------------------%
+%-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------%
+
+FUNCTION {format.mlabel}
+{slabel empty$
+{mlabel empty$
+{label}
+{"" mlabel *
+year purify$ #-1 #2 substring$ *}
+ if$
+}
+{"" slabel * }
+ if$
+}
+
+FUNCTION {format.madadurltest}
+{
+madadurltest empty$
+{quotation empty$
+{title "t" change.case$}
+{
+language missing$
+{#0}
+{language "l" change.case$ "persian" =}
+if$
+{" ''" title "`` " * * "t" change.case$}
+{" ``" title "'' " * * "t" change.case$}
+ if$
+ }
+if$
+}
+{
+quotation empty$
+{"\href{" murl * "}{" title * "}" * * "t" change.case$}
+{
+language missing$
+{#0}
+{language "l" change.case$ "persian" =}
+if$
+{"\href{" murl * "}{''" title * "``}" * * "t" change.case$}
+{"\href{" murl * "}{``" title * "''}" * * "t" change.case$}
+if$
+}
+if$
+}
+if$
+}
+
+FUNCTION {format.title}
+{ title empty$
+{ "" }
+{format.madadurltest}
+ if$
+}
+
+FUNCTION {format.url}
+{
+url empty$
+{ "" }
+{
+language missing$
+{#0}
+{language "l" change.case$ "persian" =}
+if$
+{"لینک: \url{" url * "}" * }
+{"URL: \url{" url * "}" * }
+if$
+}
+if$
+}
+
+FUNCTION {format.doi}
+{
+doi empty$
+{ "" }
+{
+language missing$
+{#0}
+{language "l" change.case$ "persian" =}
+if$
+{"شناسه‌ی دیجیتال: \doi{" doi * "}" * }
+{"\ldoi{" doi * "}" * }
+if$
+}
+if$
+}
+FUNCTION {format.isbn}
+{
+isbn empty$
+{ "" }
+{
+language missing$
+{#0}
+{language "l" change.case$ "persian" =}
+if$
+{"شابک: \isbn{" isbn * "}" * }
+{"\lisbn{" isbn * "}" * }
+if$
+}
+if$
+}
+
+FUNCTION {format.issn}
+{
+issn empty$
+{ "" }
+{
+language missing$
+{#0}
+{language "l" change.case$ "persian" =}
+if$
+{"شاپا: \issn{" issn * "}" * }
+{"\lissn{" issn * "}" * }
+if$
+}
+if$
+}
+
+FUNCTION {output.bibitem}
+{
+ newline$
+language missing$
+{#0}
+{language "l" change.case$ "persian" =}
+if$
+ { skip$ }
+ {
+ "\begin{LTRbibitems}" write$
+ newline$
+ "\resetlatinfont " write$
+ }
+if$
+newline$
+"\bibitem[" write$
+format.mlabel write$
+"]{" write$
+cite$ write$
+"}" write$
+newline$
+""
+before.all 'output.state :=
+}
+
+FUNCTION {fin.entry}
+{ add.period$
+ write$
+ newline$
+language missing$
+{#0}
+{language "l" change.case$ "persian" =}
+if$
+ {skip$}
+ { newline$
+ "\end{LTRbibitems}" write$
+ newline$
+ }
+ if$
+}
+%-------------------------------------------------------------------------some persian language setting----------------------------------------------------------------------%
+%-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------%
+
+FUNCTION {output}
+{ duplicate$ empty$
+ 'pop$
+ 'output.nonnull
+ if$
+}
+
+FUNCTION {output.check}
+{ 't :=
+ duplicate$ empty$
+ { pop$ "empty " t * " in " * cite$ * warning$ }
+ 'output.nonnull
+ if$
+}
+FUNCTION {new.block}
+{ output.state before.all =
+ 'skip$
+ { after.block 'output.state := }
+ if$
+}
+
+FUNCTION {new.sentence}
+{ output.state after.block =
+ 'skip$
+ { output.state before.all =
+ 'skip$
+ { after.sentence 'output.state := }
+ if$
+ }
+ if$
+}
+
+FUNCTION {not}
+{ { #0 }
+ { #1 }
+ if$
+}
+
+FUNCTION {and}
+{ 'skip$
+ { pop$ #0 }
+ if$
+}
+
+FUNCTION {or}
+{ { pop$ #1 }
+ 'skip$
+ if$
+}
+
+FUNCTION {new.block.checka}
+{ empty$
+ 'skip$
+ 'new.block
+ if$
+}
+
+FUNCTION {new.block.checkb}
+{ empty$
+ swap$ empty$
+ and
+ 'skip$
+ 'new.block
+ if$
+}
+
+FUNCTION {new.sentence.checka}
+{ empty$
+ 'skip$
+ 'new.sentence
+ if$
+}
+
+FUNCTION {new.sentence.checkb}
+{ empty$
+ swap$ empty$
+ and
+ 'skip$
+ 'new.sentence
+ if$
+}
+
+FUNCTION {field.or.null}
+{ duplicate$ empty$
+ { pop$ "" }
+ 'skip$
+ if$
+}
+
+FUNCTION {emphasize}
+{ duplicate$ empty$
+ { pop$ "" }
+ { "{\em " swap$ * "}" * }
+ if$
+}
+
+INTEGERS { nameptr namesleft numnames }
+
+FUNCTION {format.names}
+{ 's :=
+ #1 'nameptr :=
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ { s nameptr "{ff~}{vv~}{ll}{, jj}" format.name$ 't :=
+ nameptr #1 >
+ { namesleft #1 >
+ { ", " * t * }
+ { numnames #2 >
+ { "," * }
+ 'skip$
+ if$
+ t "others" =
+ {
+language missing$
+{#0}
+{language "l" change.case$ "persian" =}
+if$
+ { " سایرین." * }
+ { " and et~al." * }
+ if$
+ }
+ {
+language missing$
+{#0}
+{language "l" change.case$ "persian" =}
+if$
+ { " و " * t * }
+ { " and " * t * }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ 't
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+}
+
+FUNCTION {format.authors}
+{ author empty$
+ { "" }
+ { author format.names }
+ if$
+}
+
+FUNCTION {format.editors}
+{ editor empty$
+ { "" }
+ { editor format.names
+ editor num.names$ #1 >
+ {
+language missing$
+{#0}
+{language "l" change.case$ "persian" =}
+if$
+ { ", ویراستاران" * }
+ { ", editors" * }
+ if$
+ }
+ {
+language missing$
+{#0}
+{language "l" change.case$ "persian" =}
+if$
+ { ", ویراستار" * }
+ { ", editor" * }
+ if$
+ }
+ if$
+ }
+ if$
+}
+
+
+
+FUNCTION {n.dashify}
+{ 't :=
+ ""
+ { t empty$ not }
+ { t #1 #1 substring$ "-" =
+ { t #1 #2 substring$ "--" = not
+ { "--" *
+ t #2 global.max$ substring$ 't :=
+ }
+ { { t #1 #1 substring$ "-" = }
+ { "-" *
+ t #2 global.max$ substring$ 't :=
+ }
+ while$
+ }
+ if$
+ }
+ { t #1 #1 substring$ *
+ t #2 global.max$ substring$ 't :=
+ }
+ if$
+ }
+ while$
+}
+
+FUNCTION {format.date}
+{ year empty$
+ { month empty$
+ { "" }
+ { "there's a month but no year in " cite$ * warning$
+ month
+ }
+ if$
+ }
+ { month empty$
+ 'year
+ { month " " * year * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.btitle}
+{format.madadurltest emphasize
+}
+
+
+
+
+FUNCTION {tie.or.space.connect}
+{ duplicate$ text.length$ #3 <
+ { "~" }
+ { " " }
+ if$
+ swap$ * *
+}
+
+FUNCTION {either.or.check}
+{ empty$
+ 'pop$
+ { "can't use both " swap$ * " fields in " * cite$ * warning$ }
+ if$
+}
+
+FUNCTION {format.bvolume}
+{ volume empty$
+ { "" }
+ {
+language missing$
+{#0}
+{language "l" change.case$ "persian" =}
+if$
+ {
+ "جلد" volume tie.or.space.connect
+ series empty$
+ 'skip$
+ { " از " * series emphasize * }
+ if$
+ "volume and number" number either.or.check
+ }
+ { "volume" volume tie.or.space.connect
+ series empty$
+ 'skip$
+ { " of " * series emphasize * }
+ if$
+ "volume and number" number either.or.check
+ }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.number.series}
+{ volume empty$
+ { number empty$
+ { series field.or.null }
+ { output.state mid.sentence =
+ { language missing$
+{#0}
+{language "l" change.case$ "persian" =}
+if$
+ { "شماره‌ی" }
+ { "number" }
+ if$
+ }
+ { language missing$
+{#0}
+{language "l" change.case$ "persian" =}
+if$
+ { "شماره‌ی" }
+ { "Number" }
+ if$
+ }
+ if$
+ number tie.or.space.connect
+ series empty$
+ { "there's a number but no series in " cite$ * warning$ }
+ {
+language missing$
+{#0}
+{language "l" change.case$ "persian" =}
+if$
+ { " در " * series * }
+ { " in " * series * }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ { "" }
+ if$
+}
+
+
+FUNCTION {format.edition}
+{ edition empty$
+ { "" }
+ { language missing$
+{#0}
+{language "l" change.case$ "persian" =}
+if$
+ {
+ "ویرایش " edition *
+}
+{
+ output.state mid.sentence =
+ { edition "l" change.case$ " edition" * }
+ { edition "t" change.case$ " edition" * }
+ if$
+}
+ if$
+ }
+ if$
+}
+
+
+INTEGERS { multiresult }
+
+FUNCTION {multi.page.check}
+{ 't :=
+ #0 'multiresult :=
+ { multiresult not
+ t empty$ not
+ and
+ }
+ { t #1 #1 substring$
+ duplicate$ "-" =
+ swap$ duplicate$ "," =
+ swap$ "+" =
+ or or
+ { #1 'multiresult := }
+ { t #2 global.max$ substring$ 't := }
+ if$
+ }
+ while$
+ multiresult
+}
+
+FUNCTION {format.pages}
+{ pages empty$
+ { "" }
+ { pages multi.page.check
+ {
+language missing$
+{#0}
+{language "l" change.case$ "persian" =}
+if$
+ { "صفحات" pages n.dashify tie.or.space.connect }
+ { "pages" pages n.dashify tie.or.space.connect }
+ if$
+ }
+ {
+language missing$
+{#0}
+{language "l" change.case$ "persian" =}
+if$
+ { "صفحه‌ی" pages tie.or.space.connect }
+ { "page" pages tie.or.space.connect }
+ if$
+ }
+ if$
+ }
+ if$
+}
+
+
+FUNCTION {format.vol.num.pages}
+{ volume field.or.null
+ number empty$
+ 'skip$
+ { "(" number * ")" * *
+ volume empty$
+ { "there's a number but no volume in " cite$ * warning$ }
+ 'skip$
+ if$
+ }
+ if$
+ pages empty$
+ 'skip$
+ { duplicate$ empty$
+ { pop$ format.pages }
+ {
+language missing$
+{#0}
+{language "l" change.case$ "persian" =}
+if$
+ {"\setlatin{:} " * pages n.dashify *}
+ {":" * pages n.dashify *}
+ if$
+ }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.chapter.pages}
+{ chapter empty$
+ 'format.pages
+ { type empty$
+ {
+language missing$
+{#0}
+{language "l" change.case$ "persian" =}
+if$
+ {"فصل" }
+ {"chapter" }
+ if$
+ }
+ { type "l" change.case$ }
+ if$
+ chapter tie.or.space.connect
+ pages empty$
+ 'skip$
+ { ", " * format.pages * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.in.ed.booktitle}
+{ booktitle empty$
+ { "" }
+ { editor empty$
+ {
+language missing$
+{#0}
+{language "l" change.case$ "persian" =}
+if$
+{"در " booktitle emphasize *}
+{"In " booktitle emphasize *}
+if$
+}
+{
+language missing$
+{#0}
+{language "l" change.case$ "persian" =}
+if$
+{"در " format.editors * ", " * booktitle emphasize *}
+{"In " format.editors * ", " * booktitle emphasize *}
+if$
+ }
+ if$
+ }
+ if$
+}
+
+FUNCTION {empty.misc.check}
+{ author empty$ title empty$ howpublished empty$
+ month empty$ year empty$ note empty$
+ and and and and and
+ key empty$ not and
+ { "all relevant fields are empty in " cite$ * warning$ }
+ 'skip$
+ if$
+}
+
+FUNCTION {format.thesis.type}
+{ type empty$
+ 'skip$
+ { pop$
+ type "t" change.case$
+ }
+ if$
+}
+
+FUNCTION {format.tr.number}
+{ type empty$
+ {
+language missing$
+{#0}
+{language "l" change.case$ "persian" =}
+if$
+ { "گزارش فنی" }
+ { "Technical Report" }
+ if$
+}
+ 'type
+ if$
+ number empty$
+ { "t" change.case$ }
+ { number tie.or.space.connect }
+ if$
+}
+
+FUNCTION {format.article.crossref}
+{ key empty$
+ { journal empty$
+ { "need key or journal for " cite$ * " to crossref " * crossref *
+ warning$
+ ""
+ }
+ {
+language missing$
+{#0}
+{language "l" change.case$ "persian" =}
+if$
+ {"در {\em " journal * "\/}" * }
+ {"In {\em " journal * "\/}" * }
+ if$
+ }
+ if$
+ }
+ {
+language missing$
+{#0}
+{language "l" change.case$ "persian" =}
+if$
+{"در " key *}
+{"In " key *}
+if$
+ }
+ if$
+ " \cite{" * crossref * "}" *
+}
+
+FUNCTION {format.crossref.editor}
+{ editor #1 "{vv~}{ll}" format.name$
+ editor num.names$ duplicate$
+ #2 >
+ { pop$ " et~al." * }
+ { #2 <
+ 'skip$
+ { editor #2 "{ff }{vv }{ll}{ jj}" format.name$ "others" =
+ { " et~al." * }
+ { " and " * editor #2 "{vv~}{ll}" format.name$ * }
+ if$
+ }
+ if$
+ }
+ if$
+}
+
+
+
+
+FUNCTION {format.book.crossref}
+{ volume empty$
+ { "empty volume in " cite$ * "'s crossref of " * crossref * warning$
+ {
+language missing$
+{#0}
+{language "l" change.case$ "persian" =}
+if$
+
+ {" در "}
+ {" In "}
+ if$
+ }
+ }
+ {
+{
+language missing$
+{#0}
+{language "l" change.case$ "persian" =}
+if$
+ {"جلد" volume tie.or.space.connect}
+ {"Volume" volume tie.or.space.connect}
+ if$
+ }
+ {
+language missing$
+{#0}
+{language "l" change.case$ "persian" =}
+if$
+ {" از " *}
+ {" of " *}
+ if$
+ }
+ }
+ if$
+ editor empty$
+ editor field.or.null author field.or.null =
+ or
+ { key empty$
+ { series empty$
+ { "need editor, key, or series for " cite$ * " to crossref " *
+ crossref * warning$
+ "" *
+ }
+ { "{\em " * series * "\/}" * }
+ if$
+ }
+ { key * }
+ if$
+ }
+ { format.crossref.editor * }
+ if$
+ " \cite{" * crossref * "}" *
+}
+
+FUNCTION {format.incoll.inproc.crossref}
+{ editor empty$
+ editor field.or.null author field.or.null =
+ or
+ { key empty$
+ { booktitle empty$
+ { "need editor, key, or booktitle for " cite$ * " to crossref " *
+ crossref * warning$
+ ""
+ }
+ {
+language missing$
+{#0}
+{language "l" change.case$ "persian" =}
+if$
+{"در {\em " booktitle * "\/}" * }
+{"In {\em " booktitle * "\/}" * }
+if$
+}
+ if$
+ }
+ {
+language missing$
+{#0}
+{language "l" change.case$ "persian" =}
+if$
+{"در " key * }
+{"In " key * }
+ if$
+ }
+ if$
+ }
+ {
+language missing$
+{#0}
+{language "l" change.case$ "persian" =}
+if$
+{"در " format.crossref.editor * }
+ {"In " format.crossref.editor * }
+if$
+ }
+ if$
+ " \cite{" * crossref * "}" *
+}
+
+FUNCTION {article}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.title "title" output.check
+ new.block
+ crossref missing$
+ { journal emphasize "journal" output.check
+ format.vol.num.pages output
+ format.date "year" output.check
+ }
+ { format.article.crossref output.nonnull
+ format.pages output
+ }
+ if$
+new.block
+format.issn output
+new.block
+format.doi output
+new.block
+format.url output
+new.block
+note output
+fin.entry
+}
+
+FUNCTION {book}
+{ output.bibitem
+ author empty$
+ { format.editors "author and editor" output.check }
+ { format.authors output.nonnull
+ crossref missing$
+ { "author and editor" editor either.or.check }
+ 'skip$
+ if$
+ }
+ if$
+ new.block
+ format.btitle "title" output.check
+ crossref missing$
+ { format.bvolume output
+ new.block
+ format.number.series output
+ new.sentence
+ publisher "publisher" output.check
+ address output
+ }
+ { new.block
+ format.book.crossref output.nonnull
+ }
+ if$
+ format.edition output
+ format.date "year" output.check
+new.block
+format.isbn output
+ new.block
+ format.doi output
+new.block
+format.url output
+new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {booklet}
+{ output.bibitem
+ format.authors output
+ new.block
+ format.title "title" output.check
+ howpublished address new.block.checkb
+ howpublished output
+ address output
+ format.date output
+ new.block
+format.isbn output
+new.block
+format.doi output
+new.block
+format.url output
+new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {inbook}
+{ output.bibitem
+ author empty$
+ { format.editors "author and editor" output.check }
+ { format.authors output.nonnull
+ crossref missing$
+ { "author and editor" editor either.or.check }
+ 'skip$
+ if$
+ }
+ if$
+ new.block
+ format.btitle "title" output.check
+ crossref missing$
+ { format.bvolume output
+ format.chapter.pages "chapter and pages" output.check
+ new.block
+ format.number.series output
+ new.sentence
+ publisher "publisher" output.check
+ address output
+ }
+ { format.chapter.pages "chapter and pages" output.check
+ new.block
+ format.book.crossref output.nonnull
+ }
+ if$
+ format.edition output
+ format.date "year" output.check
+ new.block
+format.isbn output
+ new.block
+ format.doi output
+new.block
+format.url output
+new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {incollection}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.title "title" output.check
+ new.block
+ crossref missing$
+ { format.in.ed.booktitle "booktitle" output.check
+ format.bvolume output
+ format.number.series output
+ format.chapter.pages output
+ new.sentence
+ publisher "publisher" output.check
+ address output
+ format.edition output
+ format.date "year" output.check
+ }
+ { format.incoll.inproc.crossref output.nonnull
+ format.chapter.pages output
+ }
+ if$
+new.block
+format.isbn output
+ new.block
+ format.doi output
+new.block
+format.url output
+new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {inproceedings}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.title "title" output.check
+ new.block
+ crossref missing$
+ { format.in.ed.booktitle "booktitle" output.check
+ format.bvolume output
+ format.number.series output
+ format.pages output
+ address empty$
+ { organization publisher new.sentence.checkb
+ organization output
+ publisher output
+ format.date "year" output.check
+ }
+ { address output.nonnull
+ format.date "year" output.check
+ new.sentence
+ organization output
+ publisher output
+ }
+ if$
+ }
+ { format.incoll.inproc.crossref output.nonnull
+ format.pages output
+ }
+ if$
+ new.block
+format.isbn output
+ new.block
+ format.doi output
+new.block
+format.url output
+new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {conference} { inproceedings }
+
+FUNCTION {manual}
+{ output.bibitem
+ author empty$
+ { organization empty$
+ 'skip$
+ { organization output.nonnull
+ address output
+ }
+ if$
+ }
+ { format.authors output.nonnull }
+ if$
+ new.block
+ format.btitle "title" output.check
+ author empty$
+ { organization empty$
+ { address new.block.checka
+ address output
+ }
+ 'skip$
+ if$
+ }
+ { organization address new.block.checkb
+ organization output
+ address output
+ }
+ if$
+ format.edition output
+ format.date output
+ new.block
+format.isbn output
+ new.block
+ format.doi output
+new.block
+format.url output
+new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {mastersthesis}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.title "title" output.check
+ new.block
+language missing$
+{#0}
+{language "l" change.case$ "persian" =}
+if$
+ {"پایان‌‌نامه‌ی کارشناسی ارشد" format.thesis.type output.nonnull}
+ { "Master's thesis" format.thesis.type output.nonnull}
+ if$
+ school "school" output.check
+ address output
+ format.date "year" output.check
+ new.block
+ format.doi output
+new.block
+format.url output
+new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {misc}
+{ output.bibitem
+ format.authors output
+ title howpublished new.block.checkb
+ format.title output
+ howpublished new.block.checka
+ howpublished output
+ format.date output
+new.block
+format.issn output
+ new.block
+ format.doi output
+new.block
+format.url output
+new.block
+ note output
+ fin.entry
+ empty.misc.check
+}
+
+FUNCTION {phdthesis}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.btitle "title" output.check
+ new.block
+language missing$
+{#0}
+{language "l" change.case$ "persian" =}
+if$
+ {"رساله‌ی دکترا" format.thesis.type output.nonnull}
+ { "PhD thesis" format.thesis.type output.nonnull}
+ if$
+ school "school" output.check
+ address output
+ format.date "year" output.check
+ new.block
+ format.doi output
+new.block
+format.url output
+new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {proceedings}
+{ output.bibitem
+ editor empty$
+ { organization output }
+ { format.editors output.nonnull }
+ if$
+ new.block
+ format.btitle "title" output.check
+ format.bvolume output
+ format.number.series output
+ address empty$
+ { editor empty$
+ { publisher new.sentence.checka }
+ { organization publisher new.sentence.checkb
+ organization output
+ }
+ if$
+ publisher output
+ format.date "year" output.check
+ }
+ { address output.nonnull
+ format.date "year" output.check
+ new.sentence
+ editor empty$
+ 'skip$
+ { organization output }
+ if$
+ publisher output
+ }
+ if$
+ new.block
+format.isbn output
+ new.block
+ format.doi output
+new.block
+format.url output
+new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {techreport}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.title "title" output.check
+ new.block
+ format.tr.number output.nonnull
+ institution "institution" output.check
+ address output
+ format.date "year" output.check
+ new.block
+ format.doi output
+new.block
+format.url output
+new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {unpublished}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.title "title" output.check
+ new.block
+ note "note" output.check
+ format.date output
+new.block
+format.doi output
+new.block
+format.url output
+new.block
+fin.entry
+}
+
+FUNCTION {default.type} { misc }
+
+MACRO {jan} {"January"}
+
+MACRO {feb} {"February"}
+
+MACRO {mar} {"March"}
+
+MACRO {apr} {"April"}
+
+MACRO {may} {"May"}
+
+MACRO {jun} {"June"}
+
+MACRO {jul} {"July"}
+
+MACRO {aug} {"August"}
+
+MACRO {sep} {"September"}
+
+MACRO {oct} {"October"}
+
+MACRO {nov} {"November"}
+
+MACRO {dec} {"December"}
+
+MACRO {acmcs} {"ACM Computing Surveys"}
+
+MACRO {acta} {"Acta Informatica"}
+
+MACRO {cacm} {"Communications of the ACM"}
+
+MACRO {ibmjrd} {"IBM Journal of Research and Development"}
+
+MACRO {ibmsj} {"IBM Systems Journal"}
+
+MACRO {ieeese} {"IEEE Transactions on Software Engineering"}
+
+MACRO {ieeetc} {"IEEE Transactions on Computers"}
+
+MACRO {ieeetcad}
+ {"IEEE Transactions on Computer-Aided Design of Integrated Circuits"}
+
+MACRO {ipl} {"Information Processing Letters"}
+
+MACRO {jacm} {"Journal of the ACM"}
+
+MACRO {jcss} {"Journal of Computer and System Sciences"}
+
+MACRO {scp} {"Science of Computer Programming"}
+
+MACRO {sicomp} {"SIAM Journal on Computing"}
+
+MACRO {tocs} {"ACM Transactions on Computer Systems"}
+
+MACRO {tods} {"ACM Transactions on Database Systems"}
+
+MACRO {tog} {"ACM Transactions on Graphics"}
+
+MACRO {toms} {"ACM Transactions on Mathematical Software"}
+
+MACRO {toois} {"ACM Transactions on Office Information Systems"}
+
+MACRO {toplas} {"ACM Transactions on Programming Languages and Systems"}
+
+MACRO {tcs} {"Theoretical Computer Science"}
+
+READ
+
+FUNCTION {sortify}
+{ purify$
+ "l" change.case$
+}
+
+INTEGERS { len }
+
+FUNCTION {chop.word}
+{ 's :=
+ 'len :=
+ s #1 len substring$ =
+ { s len #1 + global.max$ substring$ }
+ 's
+ if$
+}
+
+INTEGERS { et.al.char.used }
+
+FUNCTION {initialize.et.al.char.used}
+{ #0 'et.al.char.used :=
+}
+
+EXECUTE {initialize.et.al.char.used}
+
+FUNCTION {format.lab.names}
+{ 's :=
+ s num.names$ 'numnames :=
+ numnames #1 >
+ { numnames #4 >
+ { #3 'namesleft := }
+ { numnames 'namesleft := }
+ if$
+ #1 'nameptr :=
+ ""
+ { namesleft #0 > }
+ { nameptr numnames =
+ { s nameptr "{ff }{vv }{ll}{ jj}" format.name$ "others" =
+ { "{\etalchar{+}}" *
+ #1 'et.al.char.used :=
+ }
+ { s nameptr "{v{}}{l{}}" format.name$ * }
+ if$
+ }
+ { s nameptr "{v{}}{l{}}" format.name$ * }
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+ numnames #4 >
+ { "{\etalchar{+}}" *
+ #1 'et.al.char.used :=
+ }
+ 'skip$
+ if$
+ }
+ { s #1 "{v{}}{l{}}" format.name$
+ duplicate$ text.length$ #2 <
+ { pop$ s #1 "{ll}" format.name$ #3 text.prefix$ }
+ 'skip$
+ if$
+ }
+ if$
+}
+
+FUNCTION {author.key.label}
+{ author empty$
+ { key empty$
+ { cite$ #1 #3 substring$ }
+ { key #3 text.prefix$ }
+ if$
+ }
+ { author format.lab.names }
+ if$
+}
+
+FUNCTION {author.editor.key.label}
+{ author empty$
+ { editor empty$
+ { key empty$
+ { cite$ #1 #3 substring$ }
+ { key #3 text.prefix$ }
+ if$
+ }
+ { editor format.lab.names }
+ if$
+ }
+ { author format.lab.names }
+ if$
+}
+
+FUNCTION {author.key.organization.label}
+{ author empty$
+ { key empty$
+ { organization empty$
+ { cite$ #1 #3 substring$ }
+ { "The " #4 organization chop.word #3 text.prefix$ }
+ if$
+ }
+ { key #3 text.prefix$ }
+ if$
+ }
+ { author format.lab.names }
+ if$
+}
+
+FUNCTION {editor.key.organization.label}
+{ editor empty$
+ { key empty$
+ { organization empty$
+ { cite$ #1 #3 substring$ }
+ { "The " #4 organization chop.word #3 text.prefix$ }
+ if$
+ }
+ { key #3 text.prefix$ }
+ if$
+ }
+ { editor format.lab.names }
+ if$
+}
+
+FUNCTION {calc.label}
+{ type$ "book" =
+ type$ "inbook" =
+ or
+ 'author.editor.key.label
+ { type$ "proceedings" =
+ 'editor.key.organization.label
+ { type$ "manual" =
+ 'author.key.organization.label
+ 'author.key.label
+ if$
+ }
+ if$
+ }
+ if$
+ duplicate$
+ year field.or.null purify$ #-1 #2 substring$
+ *
+ 'label :=
+ year field.or.null purify$ #-1 #4 substring$
+ *
+ sortify 'sort.label :=
+}
+
+FUNCTION {sort.format.names}
+{ 's :=
+ #1 'nameptr :=
+ ""
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ { nameptr #1 >
+ { " " * }
+ 'skip$
+ if$
+ s nameptr "{vv{ } }{ll{ }}{ ff{ }}{ jj{ }}" format.name$ 't :=
+ nameptr numnames = t "others" = and
+ { "et al" * }
+ { t sortify * }
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+}
+
+FUNCTION {sort.format.title}
+{ 't :=
+ "A " #2
+ "An " #3
+ "The " #4 t chop.word
+ chop.word
+ chop.word
+ sortify
+ #1 global.max$ substring$
+}
+
+FUNCTION {author.sort}
+{ author empty$
+ { key empty$
+ { "to sort, need author or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { author sort.format.names }
+ if$
+}
+
+FUNCTION {author.editor.sort}
+{ author empty$
+ { editor empty$
+ { key empty$
+ { "to sort, need author, editor, or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { editor sort.format.names }
+ if$
+ }
+ { author sort.format.names }
+ if$
+}
+
+FUNCTION {author.organization.sort}
+{ author empty$
+ { organization empty$
+ { key empty$
+ { "to sort, need author, organization, or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { "The " #4 organization chop.word sortify }
+ if$
+ }
+ { author sort.format.names }
+ if$
+}
+
+FUNCTION {editor.organization.sort}
+{ editor empty$
+ { organization empty$
+ { key empty$
+ { "to sort, need editor, organization, or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { "The " #4 organization chop.word sortify }
+ if$
+ }
+ { editor sort.format.names }
+ if$
+}
+
+FUNCTION {presort}
+{ calc.label
+ sort.label
+ " "
+ *
+ type$ "book" =
+ type$ "inbook" =
+ or
+ 'author.editor.sort
+ { type$ "proceedings" =
+ 'editor.organization.sort
+ { type$ "manual" =
+ 'author.organization.sort
+ 'author.sort
+ if$
+ }
+ if$
+ }
+ if$
+ *
+ " "
+ *
+ year field.or.null sortify
+ *
+ " "
+ *
+ title field.or.null
+ sort.format.title
+ *
+ #1 entry.max$ substring$
+ 'sort.key$ :=
+}
+
+ITERATE {presort}
+
+SORT
+
+STRINGS { longest.label last.sort.label next.extra }
+
+INTEGERS { longest.label.width last.extra.num }
+
+FUNCTION {initialize.longest.label}
+{ "" 'longest.label :=
+ #0 int.to.chr$ 'last.sort.label :=
+ "" 'next.extra :=
+ #0 'longest.label.width :=
+ #0 'last.extra.num :=
+}
+
+FUNCTION {forward.pass}
+{ last.sort.label sort.label =
+ { last.extra.num #1 + 'last.extra.num :=
+ last.extra.num int.to.chr$ 'extra.label :=
+ }
+ { "a" chr.to.int$ 'last.extra.num :=
+ "" 'extra.label :=
+ sort.label 'last.sort.label :=
+ }
+ if$
+}
+
+FUNCTION {reverse.pass}
+{ next.extra "b" =
+ { "a" 'extra.label := }
+ 'skip$
+ if$
+ label extra.label * 'label :=
+ label width$ longest.label.width >
+ { label 'longest.label :=
+ label width$ 'longest.label.width :=
+ }
+ 'skip$
+ if$
+ extra.label 'next.extra :=
+}
+
+EXECUTE {banner.message}
+
+EXECUTE {initialize.longest.label}
+
+ITERATE {forward.pass}
+
+REVERSE {reverse.pass}
+
+FUNCTION {begin.bib}
+{"% Generated by alpha-persian.bst, version: " bst.file.version * " (" * bst.file.date * ")" *
+ write$ newline$
+"%This style has been developed to use Persian bibstyle"
+ write$ newline$
+"%with the xepersian package"
+write$ newline$
+"% Author: " bst.file.author *
+write$ newline$
+et.al.char.used
+{ "\newcommand{\etalchar}[1]{$^{#1}$}" write$ newline$ }
+'skip$
+if$
+preamble$ empty$
+'skip$
+{preamble$ write$ newline$ }
+if$
+"\newcommand*{\ldoi}[1]{\lr{doi: #1}}"
+write$ newline$
+"\newcommand*{\lisbn}[1]{\lr{ISBN: #1}}"
+write$ newline$
+"\expandafter\ifx\csname href\endcsname\relax"
+write$ newline$
+"\def\href#1#2{#2}\fi"
+write$ newline$
+"\providecommand{\url}[1]{\texttt{#1}}"
+write$ newline$
+"\newcommand*{\lissn}[1]{\lr{ISSN: #1}}"
+write$ newline$
+"\expandafter\ifx\csname urlstyle\endcsname\relax"
+write$ newline$
+"\providecommand{\doi}[1]{\rl{\setlatin #1}}\else"
+write$ newline$
+" \providecommand{\doi}{\begingroup \urlstyle{rm}\Url}\fi"
+write$ newline$
+"\expandafter\ifx\csname urlstyle\endcsname\relax"
+write$ newline$
+"\providecommand{\isbn}[1]{\rl{\setlatin #1}}\else"
+write$ newline$
+"\providecommand{\isbn}{\begingroup \urlstyle{rm}\Url}\fi"
+write$ newline$
+"\expandafter\ifx\csname urlstyle\endcsname\relax"
+write$ newline$
+"\providecommand{\issn}[1]{\rl{\setlatin #1}}\else"
+write$ newline$
+"\providecommand{\issn}{\begingroup \urlstyle{rm}\Url}\fi"
+write$ newline$
+"\providecommand\noopsort[1]{}"
+write$ newline$
+"\begin{thebibliography}{" longest.label * "}" *
+write$ newline$
+}
+
+EXECUTE {begin.bib}
+
+EXECUTE {init.state.consts}
+
+ITERATE {call.type$}
+
+FUNCTION {end.bib}
+{ newline$
+ "\end{thebibliography}" write$ newline$
+}
+
+EXECUTE {end.bib}
+EXECUTE{completed.message}
+%--------------------------------------------------------------------------------------------------------------------------------------------------------------------------%
+%--------------------------------------------------------------------------------------------------------------------------------------------------------------------------%
+
+%>>>% Bib. style "alpha-persian", Persian (farsi) version of alpha.bst
+%>>>% by: Shapour Madadpour March 2019
+%>>>% E-mail: madad_sh@yahoo.com
+%--------------------------------------------------------------------------------------------------------------------------------------------------------------------------%
+%--------------------------------------------------------------------------------------------------------------------------------------------------------------------------% \ No newline at end of file
diff --git a/biblio/bibtex/contrib/alpha-persian/image/21.jpg b/biblio/bibtex/contrib/alpha-persian/image/21.jpg
new file mode 100644
index 0000000000..829183706d
--- /dev/null
+++ b/biblio/bibtex/contrib/alpha-persian/image/21.jpg
Binary files differ
diff --git a/biblio/bibtex/contrib/alpha-persian/image/sh11.jpg b/biblio/bibtex/contrib/alpha-persian/image/sh11.jpg
new file mode 100644
index 0000000000..4a9be3f8eb
--- /dev/null
+++ b/biblio/bibtex/contrib/alpha-persian/image/sh11.jpg
Binary files differ
diff --git a/biblio/bibtex/contrib/alpha-persian/image/sh12.jpg b/biblio/bibtex/contrib/alpha-persian/image/sh12.jpg
new file mode 100644
index 0000000000..e9a0b4b8f7
--- /dev/null
+++ b/biblio/bibtex/contrib/alpha-persian/image/sh12.jpg
Binary files differ
diff --git a/biblio/bibtex/contrib/alpha-persian/image/sh13.jpg b/biblio/bibtex/contrib/alpha-persian/image/sh13.jpg
new file mode 100644
index 0000000000..c8c9a72f62
--- /dev/null
+++ b/biblio/bibtex/contrib/alpha-persian/image/sh13.jpg
Binary files differ
diff --git a/biblio/bibtex/contrib/alpha-persian/image/sh14.PNG b/biblio/bibtex/contrib/alpha-persian/image/sh14.PNG
new file mode 100644
index 0000000000..9604f96b27
--- /dev/null
+++ b/biblio/bibtex/contrib/alpha-persian/image/sh14.PNG
Binary files differ
diff --git a/biblio/bibtex/contrib/alpha-persian/image/sh15.PNG b/biblio/bibtex/contrib/alpha-persian/image/sh15.PNG
new file mode 100644
index 0000000000..65473d1256
--- /dev/null
+++ b/biblio/bibtex/contrib/alpha-persian/image/sh15.PNG
Binary files differ
diff --git a/biblio/bibtex/contrib/alpha-persian/image/sh16.PNG b/biblio/bibtex/contrib/alpha-persian/image/sh16.PNG
new file mode 100644
index 0000000000..5575415531
--- /dev/null
+++ b/biblio/bibtex/contrib/alpha-persian/image/sh16.PNG
Binary files differ
diff --git a/biblio/bibtex/contrib/alpha-persian/image/sh17.PNG b/biblio/bibtex/contrib/alpha-persian/image/sh17.PNG
new file mode 100644
index 0000000000..981f258bff
--- /dev/null
+++ b/biblio/bibtex/contrib/alpha-persian/image/sh17.PNG
Binary files differ
diff --git a/biblio/bibtex/contrib/alpha-persian/image/sh18.jpg b/biblio/bibtex/contrib/alpha-persian/image/sh18.jpg
new file mode 100644
index 0000000000..197737b27b
--- /dev/null
+++ b/biblio/bibtex/contrib/alpha-persian/image/sh18.jpg
Binary files differ
diff --git a/biblio/bibtex/contrib/alpha-persian/image/sh2.jpg b/biblio/bibtex/contrib/alpha-persian/image/sh2.jpg
new file mode 100644
index 0000000000..4e9f440f47
--- /dev/null
+++ b/biblio/bibtex/contrib/alpha-persian/image/sh2.jpg
Binary files differ
diff --git a/biblio/bibtex/contrib/alpha-persian/image/sh20.jpg b/biblio/bibtex/contrib/alpha-persian/image/sh20.jpg
new file mode 100644
index 0000000000..ca5f3c39ef
--- /dev/null
+++ b/biblio/bibtex/contrib/alpha-persian/image/sh20.jpg
Binary files differ
diff --git a/biblio/bibtex/contrib/alpha-persian/image/sh3.jpg b/biblio/bibtex/contrib/alpha-persian/image/sh3.jpg
new file mode 100644
index 0000000000..f791a59ce3
--- /dev/null
+++ b/biblio/bibtex/contrib/alpha-persian/image/sh3.jpg
Binary files differ
diff --git a/biblio/bibtex/contrib/alpha-persian/image/sh4.jpg b/biblio/bibtex/contrib/alpha-persian/image/sh4.jpg
new file mode 100644
index 0000000000..ada885cf9c
--- /dev/null
+++ b/biblio/bibtex/contrib/alpha-persian/image/sh4.jpg
Binary files differ
diff --git a/biblio/bibtex/contrib/alpha-persian/image/sh5.jpg b/biblio/bibtex/contrib/alpha-persian/image/sh5.jpg
new file mode 100644
index 0000000000..8dc9411fa4
--- /dev/null
+++ b/biblio/bibtex/contrib/alpha-persian/image/sh5.jpg
Binary files differ
diff --git a/biblio/bibtex/contrib/alpha-persian/image/sh6.jpg b/biblio/bibtex/contrib/alpha-persian/image/sh6.jpg
new file mode 100644
index 0000000000..7dcf6f41df
--- /dev/null
+++ b/biblio/bibtex/contrib/alpha-persian/image/sh6.jpg
Binary files differ
diff --git a/biblio/bibtex/contrib/alpha-persian/image/sh7.jpg b/biblio/bibtex/contrib/alpha-persian/image/sh7.jpg
new file mode 100644
index 0000000000..7f95e8e0cf
--- /dev/null
+++ b/biblio/bibtex/contrib/alpha-persian/image/sh7.jpg
Binary files differ
diff --git a/biblio/bibtex/contrib/alpha-persian/image/sh8.jpg b/biblio/bibtex/contrib/alpha-persian/image/sh8.jpg
new file mode 100644
index 0000000000..bd5fde5dc0
--- /dev/null
+++ b/biblio/bibtex/contrib/alpha-persian/image/sh8.jpg
Binary files differ
diff --git a/biblio/bibtex/contrib/alpha-persian/image/sh9.jpg b/biblio/bibtex/contrib/alpha-persian/image/sh9.jpg
new file mode 100644
index 0000000000..b3602efff7
--- /dev/null
+++ b/biblio/bibtex/contrib/alpha-persian/image/sh9.jpg
Binary files differ
diff --git a/biblio/bibtex/contrib/alpha-persian/image/sht.jpg b/biblio/bibtex/contrib/alpha-persian/image/sht.jpg
new file mode 100644
index 0000000000..76b30d8f05
--- /dev/null
+++ b/biblio/bibtex/contrib/alpha-persian/image/sht.jpg
Binary files differ
diff --git a/biblio/bibtex/contrib/alpha-persian/pdflatexsample.tex b/biblio/bibtex/contrib/alpha-persian/pdflatexsample.tex
new file mode 100644
index 0000000000..072c9d55c5
--- /dev/null
+++ b/biblio/bibtex/contrib/alpha-persian/pdflatexsample.tex
@@ -0,0 +1,19 @@
+\documentclass{article}
+\usepackage{xcolor}
+\usepackage[pagebackref=true,colorlinks,linkcolor=blue,citecolor=green!80!black]{hyperref}
+\usepackage{amssymb}
+\usepackage{amsmath}
+\let\lr\relax
+\let\setlatin\relax
+\let\resetlatinfont\relax
+\newenvironment{LTRbibitems}{}{}
+\begin{document}
+According to
+\cite{B02f}
+and
+\cite{aliabad2004rings,ali,whatever,B02f}
+we have ...
+\nocite{*}
+\bibliographystyle{alpha-persian}
+\bibliography{sample10}
+\end{document}
diff --git a/biblio/bibtex/contrib/alpha-persian/sample1.bib b/biblio/bibtex/contrib/alpha-persian/sample1.bib
new file mode 100644
index 0000000000..2112aac84a
--- /dev/null
+++ b/biblio/bibtex/contrib/alpha-persian/sample1.bib
@@ -0,0 +1,28 @@
+
+
+@article{karamzadeh2012prime,
+author={Karamzadeh, Omid Ali Shahny},
+title={The Prime Avoidance Lemma Revisited},
+key ={7},
+ journal={Kyungpook mathematical journal},
+ volume={52},
+ number={2},
+ pages={149--153},
+ year={2012},
+ quotation={1},
+ publisher={Department of Mathematics, Kyungpook National University}
+}
+@phdthesis{mmm,
+ title={فضای توپولوژی},
+ author={ رضایی علی‌آباد,علی},
+journal={Kyungpook mathematical journal},
+ pages={1163--1171},
+LANGUAGE = {Persian},
+mlabel = {ا.م.ف},
+ murl = {http://www.w3.org/TR/prov-o/},
+series = {second series},
+year = {2002},
+chapter={5},
+ quotation={1},
+ school = {دانشگاه چمران اهواز},
+}
diff --git a/biblio/bibtex/contrib/alpha-persian/sample10.bib b/biblio/bibtex/contrib/alpha-persian/sample10.bib
new file mode 100644
index 0000000000..7f67afcfd6
--- /dev/null
+++ b/biblio/bibtex/contrib/alpha-persian/sample10.bib
@@ -0,0 +1,70 @@
+
+‌
+@misc{whatever,
+AUTHOR = "{\noopsort{1}}{Madadpour},Ahmad ",
+quotation={1},
+year = {2001},
+chapter={5},
+title = {Testing the effects of bibtex styles on bibliography formatting},
+ murl = {http://www.w3.org/TR/prov-o/},
+doi = {01.1000/doi-0121},
+madadurltest={1},
+key={665},
+}
+@misc{B02f,
+ howpublished = {How it was published},
+AUTHOR = "{\noopsort{2}}{Madadpour},Shapour and Madadpour , Mohamadhosain and Madadpour ,Mitra ",
+ year = {2002},
+quotation={1},
+ title = {First},
+pages={13--17},
+madadurltest={1},
+mlabel = {$\checkmark^+$},
+ murl = {http://www.w3.org/TR/prov-o/},
+chapter={5},
+}
+
+
+@article{aliabad2004rings,
+ title={reference test-Rings of continuous functions vanishing at infinity},
+AUTHOR = "{\noopsort{3}}{Madadpour},Alireza ",
+ journal={Commentationes Mathematicae Universitatis Carolinae},
+ volume={45},
+ pages={519--533},
+quotation={1},
+ year={2004},
+murl = {http://www.w3.org/TR/prov-o/},
+madadurltest={1},
+ publisher={Charles University in Prague, Faculty of Mathematics and Physics},
+}
+@article{ali,
+ title={reference test-Pasting topological spaces at one point},
+AUTHOR = "{\noopsort{4}}{Madadpour},Mahmood ",
+ journal={Czechoslovak Mathematical Journal},
+ volume={56},
+ number={4},
+ pages={1193--1206},
+quotation={1},
+ year={2006},
+ publisher={Springer},
+url = {http://www.w3.org/TR/prov-o/},
+}
+
+
+@book{kuznetsov1998elements,
+ title={reference test-Elements of applied bifurcation theory},
+ volume={112},
+madadurltest={1},
+ year={1998},
+edition ={third},
+publisher={Springer Verlag},
+murl = {http://www.w3.org/TR/prov-o/},
+isbn = {123456789000},
+number = {10},
+pages = {10--19},
+series = {second series},
+chapter={5},
+AUTHOR = "{\noopsort{5}}{Madadpour},Behrooz ",
+address = {The address of the publisher},
+}
+
diff --git a/biblio/bibtex/contrib/alpha-persian/sample2.bib b/biblio/bibtex/contrib/alpha-persian/sample2.bib
new file mode 100644
index 0000000000..faae03ef2a
--- /dev/null
+++ b/biblio/bibtex/contrib/alpha-persian/sample2.bib
@@ -0,0 +1,30 @@
+
+@article{karamzadeh2012prime,
+author={Karamzadeh, Omid Ali Shahny},
+title={The Prime Avoidance Lemma Revisited},
+key ={7},
+ journal={Kyungpook mathematical journal},
+ volume={52},
+ number={2},
+ pages={149--153},
+ year={2012},
+ quotation={1},
+madadurltest={1},
+murl = {http://www.w3.org/TR/prov-o/},
+ publisher={Department of Mathematics, Kyungpook National University}
+}
+@phdthesis{mmm,
+ title={فضای توپولوژی},
+ author={رضایی علی‌آباد,علی},
+journal={Kyungpook mathematical journal},
+ pages={1163--1171},
+LANGUAGE = {Persian},
+mlabel = {ا.م.ف},
+madadurltest={1},
+quotation={1},
+murl = {http://www.w3.org/TR/prov-o/},
+series = {second series},
+year = {2002},
+chapter={5},
+ school = {دانشگاه چمران اهواز},
+}
diff --git a/biblio/bibtex/contrib/alpha-persian/sample3.bib b/biblio/bibtex/contrib/alpha-persian/sample3.bib
new file mode 100644
index 0000000000..bec1309d11
--- /dev/null
+++ b/biblio/bibtex/contrib/alpha-persian/sample3.bib
@@ -0,0 +1,33 @@
+
+@article{karamzadeh2012prime,
+author={Karamzadeh, Omid Ali Shahny},
+title={The Prime Avoidance Lemma Revisited},
+key ={7},
+ journal={Kyungpook mathematical journal},
+ volume={52},
+ number={2},
+ pages={149--153},
+ year={2012},
+ quotation={1},
+url = {http://www.w3.org/TR/prov-o/},
+ publisher={Department of Mathematics, Kyungpook National University}
+}
+
+
+@phdthesis{mmm,
+ title={فضای توپولوژی},
+ author={رضایی علی‌آباد,علی},
+journal={Kyungpook mathematical journal},
+ pages={1163--1171},
+LANGUAGE = {Persian},
+mlabel = {ا.م.ف},
+madadurltest={1},
+quotation={1},
+murl = {http://www.w3.org/TR/prov-o/},
+series = {second series},
+year = {2002},
+url = {http://www.w3.org/TR/prov-o/},
+chapter={5},
+ school = {دانشگاه چمران اهواز},
+}
+
diff --git a/biblio/bibtex/contrib/alpha-persian/sample4.bib b/biblio/bibtex/contrib/alpha-persian/sample4.bib
new file mode 100644
index 0000000000..4a70d1cbbb
--- /dev/null
+++ b/biblio/bibtex/contrib/alpha-persian/sample4.bib
@@ -0,0 +1,47 @@
+@inbook{d,
+ AUTHOR = { مددپور, شاپور and مددپور, محمدحسین and سایرین},
+ mlabel = {مدد$^+$},
+ aaa = {1},
+ TITLE = {همریختی و بروریختی در حلقه‌ها},
+ JOURNAL = {مجله‌ی گراف فارس},
+ VOLUME = {1},
+ YEAR = {1395},
+ MONTH = {بهار},
+ PAGES = {39-43},
+quotation={1},
+ LANGUAGE = {Persian},
+url = {http://www.w3.org/TR/prov-o/},
+doi = {01.1000/doi-0121},
+isbn = {123456789000},
+edition ={دوم},
+series = {سری دوم},
+number = {10},
+chapter={5},
+madadurltest={1},
+ murl = {http://www.w3.org/TR/prov-o/},
+publisher = {انتشارات دل آهنگ},
+ note = {یک یادداشت اختیاری در این‌جا می‌توانید وارد کنید},
+ address = {آدرس منتشر کننده},
+}
+
+
+@book{kuznetsov1998elements,
+ title={Elements of applied bifurcation theory},
+ volume={112},
+madadurltest={1},
+ year={1998},
+edition ={third},
+publisher={Springer Verlag},
+murl = {http://www.w3.org/TR/prov-o/},
+isbn = {123456789000},
+number = {10},
+pages = {10--19},
+series = {second series},
+chapter={5},
+issn = {1111-2222},
+doi = {01.1000/doi-0121},
+ editor={Kuznetsov, Y.A. and edward, Y.A.},
+address = {The address of the publisher},
+}
+
+
diff --git a/biblio/bibtex/contrib/alpha-persian/sample5.bib b/biblio/bibtex/contrib/alpha-persian/sample5.bib
new file mode 100644
index 0000000000..f697983465
--- /dev/null
+++ b/biblio/bibtex/contrib/alpha-persian/sample5.bib
@@ -0,0 +1,99 @@
+
+
+@article{Amintoosi87afzayesh,
+TITLE = {افزایش وضوح ناحیه‌ای},
+BOOKTITLE = {چهاردهمین کنفرانس ملی سالانه انجمن کامپیوتر ایران},
+author={امین‌طوسی,محمود and مزینی ,ناصر and سایرین},
+YEAR = {1387},
+ORGANIZATION = {دانشگاه امیرکبیر},
+ADDRESS = {تهران، ایران},
+ journal = {نام مجله‌ی چاپ‌کننده},
+month = {اسفند},
+doi = {01.1000/doi-0121},
+edition ={ششم},
+editor={امین‌طوسی,محمود and مزینی ,ناصر and سایرین},
+volume={45},
+number={3},
+pages = {101--108},
+issn = {1111-2222},
+madadurltest={1},
+chapter={5},
+quotation={1},
+LANGUAGE = {Persian},
+mlabel = {ا.م$^+$},
+slabel = {$\clubsuit$},
+ murl = {http://www.w3.org/TR/prov-o/},
+}
+‌
+@misc{whatever,
+slabel = {$\checkmark$},
+ author = {Author, A.},
+quotation={1},
+ year = {2001},
+chapter={5},
+ title = {Testing the effects of biblatex styles on bibliography formatting},
+ murl = {http://www.w3.org/TR/prov-o/},
+doi = {01.1000/doi-0121},
+madadurltest={1},
+key={665},
+}
+
+
+@article{karamzadeh2012prime,
+author={Karamzadeh, Omid Ali Shahny},
+title={The Prime Avoidance Lemma Revisited},
+key ={7},
+slabel = {$\checkmark\checkmark$},
+ journal={Kyungpook mathematical journal},
+ volume={52},
+ number={2},
+ pages={149--153},
+ year={2012},
+ quotation={1},
+ publisher={Department of Mathematics, Kyungpook National University}
+}
+@inbook{d,
+ AUTHOR = {مددپور, شاپور and مددپور, محمدحسین and سایرین},
+ mlabel = {مدد$^+$},
+ TITLE = {همریختی و بروریختی در حلقه‌ها},
+ JOURNAL = {مجله‌ی گراف فارس},
+ VOLUME = {1},
+ YEAR = {1395},
+ MONTH = {بهار},
+ PAGES = {39-43},
+quotation={1},
+ LANGUAGE = {Persian},
+doi = {01.1000/doi-0121},
+isbn = {123456789000},
+edition ={دوم},
+series = {سری دوم},
+number = {10},
+chapter={5},
+madadurltest={1},
+ murl = {http://www.w3.org/TR/prov-o/},
+publisher = {انتشارات دل آهنگ},
+ note = {یک یادداشت اختیاری در این‌جا می‌توانید وارد کنید},
+ address = {آدرس منتشر کننده},
+slabel = {$\spadesuit$},
+}
+
+@book{kuznetsov1998elements,
+ title={Elements of applied bifurcation theory},
+ volume={112},
+slabel = {$\checkmark\checkmark\checkmark$},
+madadurltest={1},
+ year={1998},
+edition ={third},
+publisher={Springer Verlag},
+murl = {http://www.w3.org/TR/prov-o/},
+isbn = {123456789000},
+number = {10},
+pages = {10--19},
+series = {second series},
+chapter={5},
+ editor={Kuznetsov, Y.A. and edward, Y.A.},
+address = {The address of the publisher},
+}
+
+
+
diff --git a/biblio/bibtex/contrib/alpha-persian/sample6.bib b/biblio/bibtex/contrib/alpha-persian/sample6.bib
new file mode 100644
index 0000000000..7c8608ab04
--- /dev/null
+++ b/biblio/bibtex/contrib/alpha-persian/sample6.bib
@@ -0,0 +1,82 @@
+
+
+@article{Amintoosi87afzayesh,
+TITLE = {افزایش وضوح ناحیه‌ای},
+BOOKTITLE = {چهاردهمین کنفرانس ملی سالانه انجمن کامپیوتر ایران},
+author={امین‌طوسی,محمود and مزینی ,ناصر and سایرین},
+YEAR = {1387},
+ORGANIZATION = {دانشگاه امیرکبیر},
+ADDRESS = {تهران، ایران},
+ journal = {نام مجله‌ی چاپ‌کننده},
+month = {اسفند},
+doi = {01.1000/doi-0121},
+edition ={ششم},
+editor={امین‌طوسی,محمود and مزینی ,ناصر and سایرین},
+volume={45},
+number={3},
+pages = {101--108},
+issn = {1111-2222},
+madadurltest={1},
+chapter={5},
+quotation={1},
+LANGUAGE = {Persian},
+mlabel = {ا.م$^+$},
+slabel = {3},
+ murl = {http://www.w3.org/TR/prov-o/},
+}
+‌
+@misc{whatever,
+slabel = {1},
+ author = {Author, A.},
+quotation={1},
+ year = {2001},
+chapter={5},
+ title = {Testing the effects of biblatex styles on bibliography formatting},
+ murl = {http://www.w3.org/TR/prov-o/},
+doi = {01.1000/doi-0121},
+madadurltest={1},
+key={665},
+}
+
+
+@article{karamzadeh2012prime,
+author={Karamzadeh, Omid Ali Shahny},
+title={The Prime Avoidance Lemma Revisited},
+key ={7},
+slabel = {2},
+ journal={Kyungpook mathematical journal},
+ volume={52},
+ number={2},
+ pages={149--153},
+ year={2012},
+ quotation={1},
+ publisher={Department of Mathematics, Kyungpook National University}
+}
+@inbook{d,
+ AUTHOR = {مددپور, شاپور and مددپور, محمدحسین and سایرین},
+ mlabel = {مدد$^+$},
+ TITLE = {همریختی و بروریختی در حلقه‌ها},
+ JOURNAL = {مجله‌ی گراف فارس},
+ VOLUME = {1},
+ YEAR = {1395},
+ MONTH = {بهار},
+ PAGES = {39-43},
+quotation={1},
+ LANGUAGE = {Persian},
+doi = {01.1000/doi-0121},
+isbn = {123456789000},
+edition ={دوم},
+series = {سری دوم},
+number = {10},
+chapter={5},
+madadurltest={1},
+ murl = {http://www.w3.org/TR/prov-o/},
+publisher = {انتشارات دل آهنگ},
+ note = {یک یادداشت اختیاری در این‌جا می‌توانید وارد کنید},
+ address = {آدرس منتشر کننده},
+slabel = {4},
+}
+
+
+
+
diff --git a/biblio/bibtex/contrib/alpha-persian/sample7.bib b/biblio/bibtex/contrib/alpha-persian/sample7.bib
new file mode 100644
index 0000000000..8e8c086bfe
--- /dev/null
+++ b/biblio/bibtex/contrib/alpha-persian/sample7.bib
@@ -0,0 +1,204 @@
+
+
+@article{Amintoosi87afzayesh,
+TITLE = {افزایش وضوح ناحیه‌ای},
+BOOKTITLE = {چهاردهمین کنفرانس ملی سالانه انجمن کامپیوتر ایران},
+author={امین‌طوسی,محمود and مزینی ,ناصر and سایرین},
+YEAR = {1387},
+ORGANIZATION = {دانشگاه امیرکبیر},
+ADDRESS = {تهران، ایران},
+ journal = {نام مجله‌ی چاپ‌کننده},
+month = {اسفند},
+doi = {01.1000/doi-0121},
+edition ={ششم},
+editor={امین‌طوسی,محمود and مزینی ,ناصر and سایرین},
+volume={45},
+number={3},
+pages = {101--108},
+issn = {1111-2222},
+madadurltest={1},
+chapter={5},
+quotation={1},
+LANGUAGE = {Persian},
+mlabel = {ا.م$^+$},
+slabel = {دلخواه},
+ murl = {http://www.w3.org/TR/prov-o/},
+}
+‌
+@misc{whatever,
+slabel = {3},
+ author = {Author, A.},
+quotation={1},
+ year = {2001},
+chapter={5},
+ title = {Testing the effects of biblatex styles on bibliography formatting},
+ murl = {http://www.w3.org/TR/prov-o/},
+doi = {01.1000/doi-0121},
+madadurltest={1},
+key={665},
+}
+@misc{B02f,
+ howpublished = {How it was published},
+ author = {Buthor, B.},
+ year = {2002},
+quotation={1},
+ title = {First},
+pages={13--17},
+madadurltest={1},
+mlabel = {$\checkmark^+$},
+ murl = {http://www.w3.org/TR/prov-o/},
+chapter={5},
+}
+
+
+@article{aliabad2004rings,
+slabel = {1},
+ title={Rings of continuous functions vanishing at infinity},
+ author={Aliabad, Ali Rezaei and Azarpanah, F and Namdari, M and others},
+ journal={Commentationes Mathematicae Universitatis Carolinae},
+ volume={45},
+ pages={519--533},
+quotation={1},
+ year={2004},
+murl = {http://www.w3.org/TR/prov-o/},
+madadurltest={1},
+ publisher={Charles University in Prague, Faculty of Mathematics and Physics},
+}
+@article{ali,
+slabel = {2},
+ title={Pasting topological spaces at one point},
+ author={Aliabad, Ali Rezaei},
+ journal={Czechoslovak Mathematical Journal},
+ volume={56},
+ number={4},
+ pages={1193--1206},
+quotation={1},
+ year={2006},
+ publisher={Springer},
+url = {http://www.w3.org/TR/prov-o/},
+}
+
+@article{karamzadeh2012prime,
+author={Karamzadeh, Omid Ali Shahny},
+title={The Prime Avoidance Lemma Revisited},
+key ={7},
+ journal={Kyungpook mathematical journal},
+ volume={52},
+ number={2},
+ pages={149--153},
+ year={2012},
+ quotation={1},
+ publisher={Department of Mathematics, Kyungpook National University}
+}
+@article{ghafarzadeh2016stem,
+ title={Stem cell therapies for congenital heart disease},
+ author={Ghafarzadeh, Masoumeh and Namdari, Mehrdad and Eatemadi, Ali. and others},
+ journal={Biomedicine \& Pharmacotherapy},
+ volume={84},
+ pages={1163--1171},
+ year={2016},
+ number={1},
+ publisher={Elsevier},
+issn = {1111-2222},
+
+}
+@inbook{d,
+ AUTHOR = {مددپور, شاپور and مددپور, محمدحسین and سایرین},
+ mlabel = {مدد$^+$},
+ TITLE = {همریختی و بروریختی در حلقه‌ها},
+ JOURNAL = {مجله‌ی گراف فارس},
+ VOLUME = {1},
+ YEAR = {1395},
+ MONTH = {بهار},
+ PAGES = {39-43},
+quotation={1},
+ LANGUAGE = {Persian},
+url = {http://www.w3.org/TR/prov-o/},
+doi = {01.1000/doi-0121},
+isbn = {123456789000},
+edition ={دوم},
+series = {سری دوم},
+number = {10},
+chapter={5},
+madadurltest={1},
+ murl = {http://www.w3.org/TR/prov-o/},
+publisher = {انتشارات دل آهنگ},
+ note = {یک یادداشت اختیاری در این‌جا می‌توانید وارد کنید},
+ address = {آدرس منتشر کننده},
+}
+
+@book{kuznetsov1998elements,
+ title={Elements of applied bifurcation theory},
+ volume={112},
+madadurltest={1},
+ year={1998},
+edition ={third},
+publisher={Springer Verlag},
+murl = {http://www.w3.org/TR/prov-o/},
+isbn = {123456789000},
+number = {10},
+pages = {10--19},
+series = {second series},
+chapter={5},
+ editor={Kuznetsov, Y.A. and edward, Y.A.},
+address = {The address of the publisher},
+}
+
+@techreport{rt,
+ title={فضای توپولوژی},
+ author={رضایی علی‌آباد,علی},
+ pages={1163--1171},
+madadurltest={1},
+LANGUAGE = {Persian},
+mlabel = {ا.م.ف},
+ murl = {http://www.w3.org/TR/prov-o/},
+series = {second series},
+year = {2002},
+chapter={5},
+}
+@mastersthesis{ty,
+ title={فضای توپولوژی},
+ author={رضایی علی‌آباد,علی},
+key ={6},
+journal={Kyungpook mathematical journal},
+ pages={1163--1171},
+madadurltest={1},
+LANGUAGE = {Persian},
+mlabel = {ا.م.ف},
+ murl = {http://www.w3.org/TR/prov-o/},
+series = {second series},
+year = {2002},
+chapter={5},
+note ={یک یادداشت اختیاری},
+
+}
+@phdthesis{mmm,
+ title={فضای توپولوژی},
+ author={رضایی علی‌آباد,علی},
+journal={Kyungpook mathematical journal},
+ pages={1163--1171},
+madadurltest={1},
+LANGUAGE = {Persian},
+mlabel = {ا.م.ف},
+ murl = {http://www.w3.org/TR/prov-o/},
+series = {second series},
+year = {2002},
+chapter={5},
+ school = {دانشگاه چمران اهواز},
+}
+@booklet{mgh,
+ title={فضای توپولوژی},
+ author={رضایی علی‌آباد,علی},
+journal={Kyungpook mathematical journal},
+ pages={1163--1171},
+madadurltest={1},
+LANGUAGE = {Persian},
+mlabel = {ا.م.ف},
+ murl = {http://www.w3.org/TR/prov-o/},
+series = {second series},
+year = {2002},
+chapter={5},
+ howpublished = {چگونگی انتشار},
+address = {آدرس منتشر کننده},
+ key={4},
+}
diff --git a/biblio/bibtex/contrib/alpha-persian/sample8.bib b/biblio/bibtex/contrib/alpha-persian/sample8.bib
new file mode 100644
index 0000000000..f39d9bf0bd
--- /dev/null
+++ b/biblio/bibtex/contrib/alpha-persian/sample8.bib
@@ -0,0 +1,201 @@
+@article{Amintoosi87afzayesh,
+TITLE = {افزایش وضوح ناحیه‌ای},
+BOOKTITLE = {چهاردهمین کنفرانس ملی سالانه انجمن کامپیوتر ایران},
+author={امین‌طوسی,محمود and مزینی ,ناصر and سایرین},
+YEAR = {1387},
+ORGANIZATION = {دانشگاه امیرکبیر},
+ADDRESS = {تهران، ایران},
+ journal = {نام مجله‌ی چاپ‌کننده},
+month = {اسفند},
+doi = {01.1000/doi-0121},
+edition ={ششم},
+editor={امین‌طوسی,محمود and مزینی ,ناصر and سایرین},
+volume={45},
+number={3},
+pages = {101--108},
+issn = {1111-2222},
+madadurltest={1},
+chapter={5},
+quotation={1},
+LANGUAGE = {Persian},
+mlabel = {ا.م$^+$},
+slabel = {دلخواه},
+ murl = {http://www.w3.org/TR/prov-o/},
+}
+‌
+@misc{whatever,
+slabel = {3},
+ author = {Author, A.},
+quotation={1},
+ year = {2001},
+chapter={5},
+ title = {Testing the effects of biblatex styles on bibliography formatting},
+ murl = {http://www.w3.org/TR/prov-o/},
+doi = {01.1000/doi-0121},
+madadurltest={1},
+key={665},
+}
+@misc{B02f,
+ howpublished = {How it was published},
+ author = {Buthor, B.},
+ year = {2002},
+quotation={1},
+ title = {First},
+pages={13--17},
+madadurltest={1},
+mlabel = {$\checkmark^+$},
+ murl = {http://www.w3.org/TR/prov-o/},
+chapter={5},
+}
+
+
+@article{aliabad2004rings,
+slabel = {1},
+ title={Rings of continuous functions vanishing at infinity},
+ author={Aliabad, Ali Rezaei and Azarpanah, F and Namdari, M and others},
+ journal={Commentationes Mathematicae Universitatis Carolinae},
+ volume={45},
+ pages={519--533},
+quotation={1},
+ year={2004},
+murl = {http://www.w3.org/TR/prov-o/},
+madadurltest={1},
+ publisher={Charles University in Prague, Faculty of Mathematics and Physics},
+}
+@article{ali,
+slabel = {2},
+ title={Pasting topological spaces at one point},
+ author={Aliabad, Ali Rezaei},
+ journal={Czechoslovak Mathematical Journal},
+ volume={56},
+ number={4},
+ pages={1193--1206},
+quotation={1},
+ year={2006},
+ publisher={Springer},
+url = {http://www.w3.org/TR/prov-o/},
+}
+
+@article{karamzadeh2012prime,
+author={Karamzadeh, Omid Ali Shahny},
+title={The Prime Avoidance Lemma Revisited},
+key ={7},
+ journal={Kyungpook mathematical journal},
+ volume={52},
+ pages={149--153},
+ year={2012},
+ quotation={1},
+ publisher={Department of Mathematics, Kyungpook National University}
+}
+@article{ghafarzadeh2016stem,
+ title={Stem cell therapies for congenital heart disease},
+ author={Ghafarzadeh, Masoumeh and Namdari, Mehrdad and Eatemadi, Ali. and others},
+ journal={Biomedicine \& Pharmacotherapy},
+ volume={84},
+ pages={1163--1171},
+ year={2016},
+ number={1},
+ publisher={Elsevier},
+issn = {1111-2222},
+
+}
+@inbook{d,
+ AUTHOR = {مددپور, شاپور and مددپور, محمدحسین and سایرین},
+ mlabel = {مدد$^+$},
+ TITLE = {همریختی و بروریختی در حلقه‌ها},
+ JOURNAL = {مجله‌ی گراف فارس},
+ VOLUME = {1},
+ YEAR = {1395},
+ MONTH = {بهار},
+ PAGES = {39-43},
+quotation={1},
+ LANGUAGE = {Persian},
+url = {http://www.w3.org/TR/prov-o/},
+doi = {01.1000/doi-0121},
+isbn = {123456789000},
+edition ={دوم},
+series = {سری دوم},
+chapter={5},
+madadurltest={1},
+ murl = {http://www.w3.org/TR/prov-o/},
+publisher = {انتشارات دل آهنگ},
+ note = {یک یادداشت اختیاری در این‌جا می‌توانید وارد کنید},
+ address = {آدرس منتشر کننده},
+}
+
+@book{kuznetsov1998elements,
+ title={Elements of applied bifurcation theory},
+ volume={112},
+madadurltest={1},
+ year={1998},
+edition ={third},
+publisher={Springer Verlag},
+murl = {http://www.w3.org/TR/prov-o/},
+isbn = {123456789000},
+pages = {10--19},
+series = {second series},
+chapter={5},
+ editor={Kuznetsov, Y.A. and edward, Y.A.},
+address = {The address of the publisher},
+}
+
+@techreport{rt,
+ title={فضای توپولوژی},
+ author={رضایی علی‌آباد,علی},
+ pages={1163--1171},
+madadurltest={1},
+LANGUAGE = {Persian},
+mlabel = {ا.م.ف},
+ murl = {http://www.w3.org/TR/prov-o/},
+series = {second series},
+year = {2002},
+chapter={5},
+ institution={چمران اهواز}
+}
+@mastersthesis{ty,
+ title={فضای توپولوژی},
+ author={رضایی علی‌آباد,علی},
+key ={6},
+school={شریف},
+journal={Kyungpook mathematical journal},
+ pages={1163--1171},
+madadurltest={1},
+LANGUAGE = {Persian},
+mlabel = {ا.م.ف},
+ murl = {http://www.w3.org/TR/prov-o/},
+series = {second series},
+year = {2002},
+chapter={5},
+note ={یک یادداشت اختیاری},
+
+}
+@phdthesis{mmm,
+ title={فضای توپولوژی},
+ author={رضایی علی‌آباد,علی},
+journal={Kyungpook mathematical journal},
+ pages={1163--1171},
+madadurltest={1},
+LANGUAGE = {Persian},
+mlabel = {ا.م.ف},
+ murl = {http://www.w3.org/TR/prov-o/},
+series = {second series},
+year = {2002},
+chapter={5},
+ school = {دانشگاه چمران اهواز},
+}
+@booklet{mgh,
+ title={فضای توپولوژی},
+ author={رضایی علی‌آباد,علی},
+journal={Kyungpook mathematical journal},
+ pages={1163--1171},
+madadurltest={1},
+LANGUAGE = {Persian},
+mlabel = {ا.م.ف},
+ murl = {http://www.w3.org/TR/prov-o/},
+series = {second series},
+year = {2002},
+chapter={5},
+ howpublished = {چگونگی انتشار},
+address = {آدرس منتشر کننده},
+ key={4},
+}
diff --git a/biblio/bibtex/contrib/alpha-persian/sample9.bib b/biblio/bibtex/contrib/alpha-persian/sample9.bib
new file mode 100644
index 0000000000..faabdfc20b
--- /dev/null
+++ b/biblio/bibtex/contrib/alpha-persian/sample9.bib
@@ -0,0 +1,144 @@
+
+‌
+@misc{whatever,
+AUTHOR = "{\noopsort{2}}{Madadpour},Ahmad ",
+quotation={1},
+year = {2001},
+chapter={5},
+title = {Testing the effects of bibtex styles on bibliography formatting},
+ murl = {http://www.w3.org/TR/prov-o/},
+doi = {01.1000/doi-0121},
+madadurltest={1},
+key={665},
+}
+@misc{B02f,
+ howpublished = {How it was published},
+AUTHOR = "{\noopsort{4}}{Madadpour},Shapour ",
+ year = {2002},
+quotation={1},
+ title = {First},
+pages={13--17},
+madadurltest={1},
+mlabel = {$\checkmark^+$},
+ murl = {http://www.w3.org/TR/prov-o/},
+chapter={5},
+}
+
+
+@article{aliabad2004rings,
+ title={reference test-Rings of continuous functions vanishing at infinity},
+AUTHOR = "{\noopsort{6}}{Madadpour},Alireza ",
+ journal={Commentationes Mathematicae Universitatis Carolinae},
+ volume={45},
+ pages={519--533},
+quotation={1},
+ year={2004},
+murl = {http://www.w3.org/TR/prov-o/},
+madadurltest={1},
+ publisher={Charles University in Prague, Faculty of Mathematics and Physics},
+}
+@article{ali,
+ title={reference test-Pasting topological spaces at one point},
+AUTHOR = "{\noopsort{8}}{Madadpour},Mahmood ",
+ journal={Czechoslovak Mathematical Journal},
+ volume={56},
+ number={4},
+ pages={1193--1206},
+quotation={1},
+ year={2006},
+ publisher={Springer},
+url = {http://www.w3.org/TR/prov-o/},
+}
+
+
+@article{Amintoosi87afzayesh,
+TITLE = {افزایش وضوح ناحیه‌ای},
+BOOKTITLE = {چهاردهمین کنفرانس ملی سالانه انجمن کامپیوتر ایران},
+author={{\noopsort{1}}{امین‌طوسی},محمود and مزینی ,ناصر and سایرین},
+YEAR = {1387},
+ORGANIZATION = {دانشگاه امیرکبیر},
+ADDRESS = {تهران، ایران},
+ journal = {نام مجله‌ی چاپ‌کننده},
+month = {اسفند},
+doi = {01.1000/doi-0121},
+edition ={ششم},
+editor={امین‌طوسی,محمود and مزینی ,ناصر and سایرین},
+volume={45},
+number={3},
+pages = {101--108},
+issn = {1111-2222},
+madadurltest={1},
+chapter={5},
+quotation={1},
+LANGUAGE = {Persian},
+mlabel = {ا.م$^+$},
+slabel = {$\heartsuit$},
+ murl = {http://www.w3.org/TR/prov-o/},
+}
+
+@inbook{d,
+ AUTHOR = {{\noopsort{3}}{مددپور},شاپور and مددپور, محمدحسین and سایرین},
+ mlabel = {مدد$^+$},
+ TITLE = {همریختی و بروریختی در حلقه‌ها},
+ JOURNAL = {مجله‌ی گراف فارس},
+ VOLUME = {1},
+ YEAR = {1395},
+ MONTH = {بهار},
+ PAGES = {39-43},
+quotation={1},
+ LANGUAGE = {Persian},
+doi = {01.1000/doi-0121},
+isbn = {123456789000},
+edition ={دوم},
+series = {سری دوم},
+number = {10},
+chapter={5},
+madadurltest={1},
+ murl = {http://www.w3.org/TR/prov-o/},
+publisher = {انتشارات دل آهنگ},
+ note = {یک یادداشت اختیاری در این‌جا می‌توانید وارد کنید},
+ address = {آدرس منتشر کننده},
+slabel = {$\bigstar$},
+}
+
+@phdthesis{mmm,
+title={فضای توپولوژی},
+author={{\noopsort{5}}{رضایی علی‌آباد},علی},
+journal={Kyungpook mathematical journal},
+ pages={1163--1171},
+LANGUAGE = {Persian},
+mlabel = {ا.م.ف},
+madadurltest={1},
+quotation={1},
+murl = {http://www.w3.org/TR/prov-o/},
+series = {second series},
+year = {2002},
+url = {http://www.w3.org/TR/prov-o/},
+chapter={5},
+ school = {دانشگاه چمران اهواز},
+}
+@inbook{yu,
+ AUTHOR = {
+{\noopsort{7}}{نامداری},مهرداد and کوچک‌پور,عبدعلی},
+ mlabel = {ن.ا.م$^+$},
+ TITLE = {مقدمه‌ای بر نظریه‌ی اصولی مجموعه‌ها},
+ VOLUME = {1},
+ YEAR = {1394},
+ MONTH = {بهار},
+ PAGES = {39-43},
+quotation={1},
+ LANGUAGE = {Persian},
+doi = {322/511},
+isbn = {978-600-141-173-1},
+edition ={دوم},
+series = {سری دوم},
+number = {100},
+chapter={5},
+madadurltest={1},
+ murl = {http://www.w3.org/TR/prov-o/},
+publisher = {انتشارات دانشگاه چمران},
+ note = {یک یادداشت اختیاری در این‌جا می‌توانید وارد کنید},
+ address = {آدرس منتشر کننده},
+slabel = {4},
+}
+
diff --git a/biblio/bibtex/contrib/alpha-persian/xelatexsample.tex b/biblio/bibtex/contrib/alpha-persian/xelatexsample.tex
new file mode 100644
index 0000000000..6cef7553e2
--- /dev/null
+++ b/biblio/bibtex/contrib/alpha-persian/xelatexsample.tex
@@ -0,0 +1,30 @@
+\documentclass{article}
+\usepackage{xcolor}
+\usepackage[pagebackref=true,colorlinks,linkcolor=blue,citecolor=green!80!black]{hyperref}
+\usepackage{amssymb}
+\usepackage{amsmath}
+%\usepackage{url}
+%\usepackage[compress]{cite}
+%\usepackage[numbers,sort&compress]{natbib}
+\usepackage{xepersian}
+\settextfont{Yas}
+\begin{document}
+\lr{\cite{B02f}}
+\cite{d}
+\cite{Amintoosi87afzayesh}
+\lr{\cite{aliabad2004rings}}
+\lr{\cite{ghafarzadeh2016stem}}
+\cite{aliabad2004rings,ali,whatever,B02f,d}
+و همچنین داریم:
+\lr{\cite{aliabad2004rings,ali,whatever,B02f,d}}
+
+\nocite{*}
+\bibliographystyle{alpha-persian}
+\bibliography{sample8}
+%\bibliography{sample9}
+\end{document}
diff --git a/biblio/bibtex/contrib/apacite/README b/biblio/bibtex/contrib/apacite/README
new file mode 100644
index 0000000000..85499490f1
--- /dev/null
+++ b/biblio/bibtex/contrib/apacite/README
@@ -0,0 +1,66 @@
+
+THE APACITE PACKAGE
+===================
+
+Description
+-----------
+
+The apacite package (for LaTeX and BibTeX) implements the requirements
+of the American Psychological Association concerning citations and
+reference list. In addition, it provides a large number of options and
+other possibilities for customization, so that a wide range of citation
+styles and reference list styles can be handled. Furthermore, it also
+provides the possibility of automatically generating an author index.
+
+
+Copyright and license
+---------------------
+
+Copyright (C) 1994-2013 Erik Meijer and any individual authors listed
+elsewhere in this package.
+
+This package may be distributed and/or modified under the
+conditions of the LaTeX Project Public License, either
+version 1.3 of this license or (at your option) any later
+version. The latest version of this license is in:
+
+ http://www.latex-project.org/lppl.txt
+
+and version 1.3 or later is part of all distributions of
+LaTeX version 2005/12/01 or later.
+
+See the file apacite.dtx for more details.
+
+
+Building the package and its documentation
+------------------------------------------
+
+The generated LaTeX package (.sty), BibTeX style (.bst), and supporting
+files (.apc, .bib, .drv, .tex) are extracted by running:
+
+tex apacite.ins
+
+The documentation is then generated by the following sequence:
+
+pdflatex apacite.drv <== Produces apacite.pdf (documentation)
+bibtex apacite <== Produces apacite.bbl (reference list)
+pdflatex apacite.drv <== Include ref. list
+pdflatex apacite.drv <== Resolve citations
+pdflatex apacite.drv <== 'Labels may have changed'
+makeindex -o apacite.and apacite.adx <== (author index)
+pdflatex apacite.drv <== Include author index
+pdflatex apacite.drv <== Resolve table of contents
+
+Note that apacite comes with pre-built documentation (PDF format,
+U.S. letter-sized paper), so you only need to regenerate the
+documentation if you are unhappy with the documentation as
+provided. For example, if you want to generate a version for
+A4 paper, or if you want the full reference manual, including the
+documented source code and change log. In the latter case,
+edit the file apacite.drv according to your wishes (see the comments
+in that file) and insert the following lines in the sequence, after
+generating the author index:
+
+makeindex -s gind.ist apacite <== Produces apacite.ind (code index)
+makeindex -s gglo.ist -o apacite.gls apacite.glo <== (change log)
+
diff --git a/biblio/bibtex/contrib/apacite/apacite.dtx b/biblio/bibtex/contrib/apacite/apacite.dtx
new file mode 100644
index 0000000000..30d4088ede
--- /dev/null
+++ b/biblio/bibtex/contrib/apacite/apacite.dtx
@@ -0,0 +1,23244 @@
+% \iffalse meta-comment
+%
+% Copyright (C) 1994-2013 Erik Meijer and any individual authors listed
+% elsewhere in this file.
+%
+% This file is part of the `apacite' package.
+% -------------------------------------------
+%
+% It may be distributed and/or modified under the
+% conditions of the LaTeX Project Public License, either
+% version 1.3 of this license or (at your option) any later
+% version. The latest version of this license is in:
+%
+% http://www.latex-project.org/lppl.txt
+%
+% and version 1.3 or later is part of all distributions of
+% LaTeX version 2005/12/01 or later.
+%
+% The `apacite' package consists of the files apacite.dtx and
+% apacite.ins, and the following generated files:
+% apacite.sty, apacdoc.sty, apacite.drv,
+% apacite.bst, apacitex.bst, apacann.bst, apacannx.bst,
+% apa5ex.bib, apacxmpl.tex,
+% english.apc, dutch.apc, finnish.apc, french.apc,
+% german.apc, ngerman.apc, greek.apc, norsk.apc,
+% spanish.apc, swedish.apc.
+%
+% This work has the LPPL maintenance status `maintained'
+%
+% The Current Maintainer of this work is Erik Meijer
+%
+% This file may only be distributed together with a copy of the
+% source files of the apacite package, i.e., apacite.dtx and
+% apacite.ins. You may however distribute the apacite package without
+% the generated files.
+%
+% \fi
+%
+% \CheckSum{0}
+% \CharacterTable
+% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z
+% Lower-case \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z
+% Digits \0\1\2\3\4\5\6\7\8\9
+% Exclamation \! Double quote \" Hash (number) \#
+% Dollar \$ Percent \% Ampersand \&
+% Acute accent \' Left paren \( Right paren \)
+% Asterisk \* Plus \+ Comma \,
+% Minus \- Point \. Solidus \/
+% Colon \: Semicolon \; Less than \<
+% Equals \= Greater than \> Question mark \?
+% Commercial at \@ Left bracket \[ Backslash \\
+% Right bracket \] Circumflex \^ Underscore \_
+% Grave accent \` Left brace \{ Vertical bar \|
+% Right brace \} Tilde \~}
+%
+% \iffalse
+%<*dtx>
+\ProvidesFile{apacite.dtx}
+ [2013/07/21 v6.03 apacite dtx file]
+%</dtx>
+%<driver>\ProvidesFile{apacite.drv}
+%<package|docpkg>\NeedsTeXFormat{LaTeX2e}[1999/12/01]
+%<package>\ProvidesPackage{apacite}
+%<docpkg>\ProvidesPackage{apacdoc}
+%<english>\ProvidesFile{english.apc}
+%<dutch>\ProvidesFile{dutch.apc}
+%<finnish>\ProvidesFile{finnish.apc}
+%<german>\ProvidesFile{german.apc}
+%<ngerman>\ProvidesFile{ngerman.apc}
+%<greek>\ProvidesFile{greek.apc}
+%<norsk>\ProvidesFile{norsk.apc}
+%<spanish>\ProvidesFile{spanish.apc}
+%<swedish>\ProvidesFile{swedish.apc}
+%<xmpl>%% apacxmpl.tex
+%<bibdb>%% apa5ex.bib
+%<bibstyle&!annotated>%% apacite.bst
+%<bibstyle&annotated>%% apacann.bst
+%<xbibstyle&!annotated>%% apacitex.bst
+%<xbibstyle&annotated>%% apacannx.bst
+%^^A
+%^^A I have to find out how I can replace the hard-coded date+version with a
+%^^A command such that the value of the command is written to the file instead
+%^^A of the name.
+%^^A
+%<driver> [2013/07/21 v6.03 apacite documentation driver file]
+%<package> [2013/07/21 v6.03 APA citation]
+%<docpkg> [2013/07/21 v6.03 apacite documentation style]
+%<english> [2013/07/21 v6.03 apacite language file]
+%<dutch> [2013/07/21 v6.03 apacite language file]
+%<finnish> [2013/07/21 v6.03 apacite language file]
+%<german> [2013/07/21 v6.03 apacite language file]
+%<ngerman> [2013/07/21 v6.03 apacite language file]
+%<greek> [2013/07/21 v6.03 apacite language file]
+%<norsk> [2013/07/21 v6.03 apacite language file]
+%<spanish> [2013/07/21 v6.03 apacite language file]
+%<swedish> [2013/07/21 v6.03 apacite language file]
+%<xmpl>%% [2013/07/21 v6.03 LaTeX file for examples]
+%<bibdb>%% [2013/07/21 v6.03 bibliography database for examples]
+%<bibstyle&!annotated>%% [2013/07/21 v6.03 APA bibliography style]
+%<*xbibstyle&!annotated>
+%% [2013/07/21 v6.03 APA bibl. style with author index info]
+%</xbibstyle&!annotated>
+%<bibstyle&annotated>%% [2013/07/21 v6.03 APA annotated bibliography style]
+%<*xbibstyle&annotated>
+%% [2013/07/21 v6.03 APA annotated bibl. style with author index info]
+%</xbibstyle&annotated>
+%
+%<*install>
+%^^A =============================================
+%^^A Here is the docstrip installation file
+%^^A It is written on first LaTeX run if it
+%^^A does not already exist
+%^^A =============================================
+\begin{filecontents*}{apacite.ins}
+%%
+%% This file will generate fast loadable files and documentation
+%% driver files from apacite.dtx when run through LaTeX.
+%%
+%% Copyright (C) 1994-2013 Erik Meijer and any individual authors listed
+%% elsewhere in this file.
+%%
+%% This file is part of the `apacite' package.
+%% -------------------------------------------
+%%
+%% It may be distributed and/or modified under the
+%% conditions of the LaTeX Project Public License, either
+%% version 1.3 of this license or (at your option) any later
+%% version. The latest version of this license is in:
+%%
+%% http://www.latex-project.org/lppl.txt
+%%
+%% and version 1.3 or later is part of all distributions of
+%% LaTeX version 2005/12/01 or later.
+%%
+%% The `apacite' package consists of the files apacite.dtx and
+%% apacite.ins, and the following generated files:
+%% apacite.sty, apacdoc.sty, apacite.drv,
+%% apacite.bst, apacitex.bst, apacann.bst, apacannx.bst,
+%% apa5ex.bib, apacxmpl.tex,
+%% english.apc, dutch.apc, finnish.apc, french.apc,
+%% german.apc, ngerman.apc, greek.apc, norsk.apc,
+%% spanish.apc, swedish.apc.
+%%
+%% This work has the LPPL maintenance status `maintained'
+%%
+%% The Current Maintainer of this work is Erik Meijer
+%%
+%% This file may only be distributed together with a copy of the
+%% source files of the apacite package, i.e., apacite.dtx and
+%% apacite.ins. You may however distribute the apacite package without
+%% the generated files.
+
+\input docstrip.tex
+\keepsilent
+
+\declarepreamble\mainpreamble
+
+This is a generated file.
+
+Copyright (C) 1994-2013 Erik Meijer and any individual authors listed
+elsewhere in this file.
+
+This file is part of the `apacite' package.
+-------------------------------------------
+
+It may be distributed and/or modified under the
+conditions of the LaTeX Project Public License, either
+version 1.3 of this license or (at your option) any later
+version. The latest version of this license is in:
+
+ http://www.latex-project.org/lppl.txt
+
+and version 1.3 or later is part of all distributions of
+LaTeX version 2005/12/01 or later.
+
+The `apacite' package consists of the files apacite.dtx and
+apacite.ins, and the following generated files:
+apacite.sty, apacdoc.sty, apacite.drv,
+apacite.bst, apacitex.bst, apacann.bst, apacannx.bst,
+apa5ex.bib, apacxmpl.tex,
+english.apc, dutch.apc, finnish.apc, french.apc,
+german.apc, ngerman.apc, greek.apc, norsk.apc,
+spanish.apc, swedish.apc.
+
+This work has the LPPL maintenance status `maintained'
+
+The Current Maintainer of this work is Erik Meijer
+
+This file may only be distributed together with a copy of the
+source files of the apacite package, i.e., apacite.dtx and
+apacite.ins. You may however distribute the apacite package without
+the generated files.
+
+\endpreamble
+
+\declarepreamble\drvpreamble
+
+This is a generated file.
+
+Copyright (C) 1994-2013 Erik Meijer and any individual authors listed
+elsewhere in this file.
+
+This file is part of the `apacite' package.
+-------------------------------------------
+
+It may be distributed and/or modified under the
+conditions of the LaTeX Project Public License, either
+version 1.3 of this license or (at your option) any later
+version. The latest version of this license is in:
+
+ http://www.latex-project.org/lppl.txt
+
+and version 1.3 or later is part of all distributions of
+LaTeX version 2005/12/01 or later.
+
+The `apacite' package consists of the files apacite.dtx and
+apacite.ins, and the following generated files:
+apacite.sty, apacdoc.sty, apacite.drv,
+apacite.bst, apacitex.bst, apacann.bst, apacannx.bst,
+apa5ex.bib, apacxmpl.tex,
+english.apc, dutch.apc, finnish.apc, french.apc,
+german.apc, ngerman.apc, greek.apc, norsk.apc,
+spanish.apc, swedish.apc.
+
+This work has the LPPL maintenance status `maintained'
+
+The Current Maintainer of this work is Erik Meijer
+
+This file may only be distributed together with a copy of the
+source files of the apacite package, i.e., apacite.dtx and
+apacite.ins. You may however distribute the apacite package without
+the generated files.
+
+You are allowed to make changes to this file, in order to generate
+the user's manual with your preferred settings (e.g., to choose
+whether or not to include the documented source code). Please
+do not change apacite.dtx for this purpose.
+
+\endpreamble
+
+\edef\noendinputpostamble{%
+ \MetaPrefix ^^J%
+ \MetaPrefix\space End of file `\outFileName'.%
+}
+
+\askonceonly
+\generate{%
+ \usepreamble\mainpreamble
+ \file{apacite.sty}{\from{apacite.dtx}{package}}
+ \file{apacdoc.sty}{\from{apacite.dtx}{docpkg}}
+ \file{english.apc}{\from{apacite.dtx}{english}}
+ \file{dutch.apc}{\from{apacite.dtx}{dutch}}
+ \file{finnish.apc}{\from{apacite.dtx}{finnish}}
+ \file{french.apc}{\from{apacite.dtx}{french}}
+ \file{german.apc}{\from{apacite.dtx}{german}}
+ \file{ngerman.apc}{\from{apacite.dtx}{ngerman}}
+ \file{greek.apc}{\from{apacite.dtx}{greek}}
+ \file{norsk.apc}{\from{apacite.dtx}{norsk}}
+ \file{spanish.apc}{\from{apacite.dtx}{spanish}}
+ \file{swedish.apc}{\from{apacite.dtx}{swedish}}
+ \file{apacxmpl.tex}{\from{apacite.dtx}{xmpl}}
+ \usepreamble\drvpreamble
+ \file{apacite.drv}{\from{apacite.dtx}{driver}}
+ \usepreamble\mainpreamble
+ \usepostamble\noendinputpostamble
+ \file{apa5ex.bib}{\from{apacite.dtx}{bibdb}}
+ \file{apacite.bst}{\from{apacite.dtx}{bibstyle}}
+ \file{apacitex.bst}{\from{apacite.dtx}{xbibstyle}}
+ \file{apacann.bst}{\from{apacite.dtx}{bibstyle,annotated}}
+ \file{apacannx.bst}{\from{apacite.dtx}{xbibstyle,annotated}}
+}
+
+\obeyspaces
+\Msg{*****************************************************}
+\Msg{* *}
+\Msg{* To finish the installation you have to move the *}
+\Msg{* following files into a directory searched by TeX: *}
+\Msg{* *}
+\Msg{* All *.apc, *.sty *}
+\Msg{* *}
+\Msg{* and to move the following files into a directory *}
+\Msg{* searched by BibTeX: *}
+\Msg{* *}
+\Msg{* All *.bib, *.bst *}
+\Msg{* *}
+\Msg{* To produce the documentation, run the following *}
+\Msg{* script (or something similar, depending on your *}
+\Msg{* operating system): *}
+\Msg{* *}
+\Msg{* pdflatex apacite.drv *}
+\Msg{* bibtex apacite *}
+\Msg{* pdflatex apacite.drv *}
+\Msg{* pdflatex apacite.drv *}
+\Msg{* pdflatex apacite.drv *}
+\Msg{* makeindex -o apacite.and apacite.adx *}
+\Msg{* pdflatex apacite.drv *}
+\Msg{* pdflatex apacite.drv *}
+\Msg{* *}
+\Msg{* See the README file for a brief explanation and *}
+\Msg{* the file apacite.drv for how to customize the *}
+\Msg{* manual (e.g., to include the documented source *}
+\Msg{* code. *}
+\Msg{* *}
+\Msg{* Happy TeXing! *}
+\Msg{* *}
+\Msg{*****************************************************}
+
+\endbatchfile
+\end{filecontents*}
+%</install>
+%<*gobble>
+\IfFileExists{apacdoc.sty}{%
+ \let\finishprematurely\relax
+}{%
+ \typeout{**************************************************%
+ ********************}%
+ \typeout{*}%
+ \typeout{* To extract the package, style, and support files
+ of apacite,}%
+ \typeout{* run TeX on apacite.ins}%
+ \typeout{*}%
+ \typeout{* To (re)generate the apacite documentation, first
+ run TeX on}%
+ \typeout{* apacite.ins and then run LaTeX on apacite.drv
+ or apacite.dtx}%
+ \typeout{*}%
+ \typeout{**************************************************%
+ ********************^^J}%
+ \makeatletter
+ \edef\finishprematurely{\csname @@end\endcsname}%
+ \makeatother
+}
+\finishprematurely
+%</gobble>
+% \fi
+%
+% \DoNotIndex{\begin,\CodelineIndex,\CodelineNumbered,\def,\DisableCrossrefs}
+% \DoNotIndex{\DocInput,\documentclass,\EnableCrossrefs,\end,\GetFileInfo}
+% \DoNotIndex{\NeedsTeXFormat,\OnlyDescription,\RecordChanges,\usepackage}
+% \DoNotIndex{\ProvidesClass,\ProvidesPackage,\ProvidesFile,\RequirePackage}
+% \DoNotIndex{\LoadClass,\PassOptionsToClass,\PassOptionsToPackage}
+% \DoNotIndex{\DeclareOption,\CurrentOption,\ProcessOptions,\ExecuteOptions}
+% \DoNotIndex{\AtEndOfClass,\AtEndOfPackage,\AtBeginDocument,\AtEndDocument}
+% \DoNotIndex{\InputIfFileExists,\IfFileExists,\ClassError,\PackageError}
+% \DoNotIndex{\ClassWarning,\PackageWarning,\ClassWarningNoLine}
+% \DoNotIndex{\PackageWarningNoLine,\ClassInfo,\PackageInfo,\MessageBreak}
+% \DoNotIndex{\space,\protect,\DeclareRobustCommand,\CheckCommand}
+% \DoNotIndex{\newcommand,\renewcommand,\providecommand,\newenvironment}
+% \DoNotIndex{\renewenvironment,\newif,\newlength,\newcounter,\setlength}
+% \DoNotIndex{\setcounter,\if,\ifx,\ifcase,\ifnum,\ifdim,\else,\fi}
+% \DoNotIndex{\texttt,\textbf,\textrm,\textsl,\textsc,\reset@font}
+% \DoNotIndex{\textup,\textit,\textmd,\textsf,\emph,\futurelet}
+% \DoNotIndex{\ttfamily,\rmfamily,\sffamily,\mdseries,\bfseries,\upshape}
+% \DoNotIndex{\slshape,\scshape,\itshape,\em,\LaTeX,\LaTeXe}
+% \DoNotIndex{\filename,\fileversion,\filedate,\let,\makeindex}
+% \DoNotIndex{\@auxout,\@for,\@gobble,\@ifnextchar,\@m,\@mkboth,\@nil}
+% \DoNotIndex{\@noitemerr,\@tempa,\@tempswafalse,\@tempswatrue,\@warning}
+% \DoNotIndex{\advance,\arabic,\AtBeginDocument,\bf,\bibname,\chapter}
+% \DoNotIndex{\citation,\clubpenalty,\CodelineNumbered,\csname}
+% \DoNotIndex{\DisableCrossrefs,\do,\edef,\else,\endcsname,\endlist}
+% \DoNotIndex{\expandafter,\fi,\gdef,\global,\hbox,\hfill,\hskip,\hspace}
+% \DoNotIndex{\if,\if@filesw,\if@tempswa,\ifx,\immediate,\itemindent,\labelsep}
+% \DoNotIndex{\labelwidth,\lastskip,\leftmargin,\list,\mbox,\newblock}
+% \DoNotIndex{\newpage,\p@enumiv,\parindent,\penalty,\refname}
+% \DoNotIndex{\relax,\section,\settowidth,\sfcode,\sloppy,\small,\string}
+% \DoNotIndex{\theenumiv,\thepage,\unskip,\uppercase,\usecounter,\vskip}
+% \DoNotIndex{\widowpenalty,\write,\xdef,\z@,\catcode,\ifnum,\the}
+% \DoNotIndex{\@empty,\@ifundefined,\@latex@warning,\@minus,\@plus,\ }
+% \DoNotIndex{\document,\@namedef,\@listi,\markboth,\or,\p@}
+% \DoNotIndex{\listparindent,\noexpand,\par,\parsep,\pb,\pbf,\pbfseries}
+% \DoNotIndex{\pc,\pd,\pem,\pit,\pitshape,\pmdseries,\prm,\prmfamily,\psc}
+% \DoNotIndex{\pscshape,\psf,\psffamily,\psl,\pslshape,\ptt,\pttfamily}
+% \DoNotIndex{\pupshape,\@iden,\@firstofone,\@unexpandable@protect}
+% \DoNotIndex{\if@draft,\typeout}
+% \DoNotIndex{\@ifclassloaded,\@ifstar,\@onlypreamble,\@preamblecmds}
+% \DoNotIndex{\addtolength,\endinput,\@bsphack,\begingroup,\@wrindex}
+% \DoNotIndex{\@listctr,\bibname,\enddocument,\hfil,\ignorespaces,\item}
+% \DoNotIndex{\NAT@temp,\refname,\stepcounter,\@ifpackageloaded}
+% \DoNotIndex{\@gobbletwo,\index,\itemsep,\markright,\scriptsize}
+% \DoNotIndex{\textsuperscript,\@undefined}
+% \DoNotIndex{\@celt,\@cite@list,\@citea,\@citeb,\@compress@cite}
+% \DoNotIndex{\@bsphack,\@esphack,\@h@ld,\@make@cite@list,\@ne}
+% \DoNotIndex{\@sort@celt,\@tempcnta,\@tempcntb,\delimiter,\endgroup}
+% \DoNotIndex{\ifcat,\m@ne,\number}
+% \DoNotIndex{\@markboth,\@mkboth,\nobreak,\SK@,\SK@@citex}
+% \DoNotIndex{\SK@@label,\SK@@ref,SK@def,\SK@lbibitem,\bbl@redefine}
+% \DoNotIndex{\@safe@activesfalse,\@save@activestrue,\active@prefix}
+%
+% \DoNotIndex{\ ,\&,\{,\},\.,\!,\",\#,\%,\',\(,\),\*,\,,\-,\/}
+% \DoNotIndex{\:,\;,\<,\=,\>,\?,\@,\[,\\,\],\^,\_,\`,\|,\~}
+% \DoNotIndex{\@backslashchar,\@citec,\@element@,\@input@,\@nameuse}
+% \DoNotIndex{\@makeschapterhead,\@restonecolfalse,\@restonecoltrue}
+% \DoNotIndex{\@old@endthebibliography,\@oldbibpreamble,\@orig@@cite}
+% \DoNotIndex{\@orig@@nocitemeta,\@orig@nocite}
+% \DoNotIndex{\@tmp@arg,\@xp,\AA,\aa,\addcontentsline}
+% \DoNotIndex{\afterassignment,\aftergroup,\alph,\ast,\b@ex}
+% \DoNotIndex{\backslash,\baselineskip,\BibTeX,\bigskip,\bs}
+% \DoNotIndex{\clearpage,\cmd,\cmdfour,\cmdthree,\cmdthreealt}
+% \DoNotIndex{\cmdthreepre,\cmdtwo,\columnsep,\columnseprule,\count@}
+% \DoNotIndex{\dag,\do@url@hyp,\EM,\ensuremath,\entryname,\envirname}
+% \DoNotIndex{\evensidemargin,\fieldname,\flqq,\fname,\fontencoding}
+% \DoNotIndex{\fontfamily,\footnotesize,\footskip,\frqq}
+% \DoNotIndex{\g@addto@macro,\GlossaryPrologue,\headheight,\headsep}
+% \DoNotIndex{\hoffset,\if@mainmatter,\ifcodeline@index,\iffalse}
+% \DoNotIndex{\ifhave@multicol,\index@prologue,\IndexMin,\IndexParms}
+% \DoNotIndex{\IndexPrologue,\input,\jobname,\kern,\langle,\LaTeXrtf}
+% \DoNotIndex{\latextohtml,\lbrace,\LC,\ldots,\linewidth,\lower}
+% \DoNotIndex{\makeatletter,\makeatother,\MakeIndex,\MakeUppercase}
+% \DoNotIndex{\marginparpush,\marginparsep,\marginparwidth,\mid}
+% \DoNotIndex{\mathbin,\mathchar,\mathord,\newskip,\newwrite}
+% \DoNotIndex{\normalsize,\oddsidemargin,\oldBED,\oldBEd,\oldBEDS}
+% \DoNotIndex{\oldbibinitial,\oldbibliteral,\oldbibskipbracenodot}
+% \DoNotIndex{\oldBIn,\oldBRetrieved,\oldevensidemargin,\oldfootskip}
+% \DoNotIndex{\oldheadheight,\oldheadsep,\oldhoffset,\oldlinewidth}
+% \DoNotIndex{\oldmarginparpush,\oldmarginparsep,\oldmarginparwidth}
+% \DoNotIndex{\oldoddsidemargin,\oldtextheight,\oldtextwidth}
+% \DoNotIndex{\oldtopmargin,\oldvoffset,\onecolumn,\openout,\opt}
+% \DoNotIndex{\orig@printindex,\origbibDSM,\parskip,\Perl,\pfill}
+% \DoNotIndex{\pkg,\pkgoption,\protected@edef,\protected@write}
+% \DoNotIndex{\quad,\raggedright,\raisebox,\rangle,\rbrace,\rm,\sc}
+% \DoNotIndex{\selectfont,\simpleguillemots,\symbol,\TeX,\TeXht}
+% \DoNotIndex{\textheight,\textwidth,\thinspace,\thispagestyle}
+% \DoNotIndex{\thr@@,\times,\tiny,\topmargin,\triangleright}
+% \DoNotIndex{\twocolumn,\undefined,\voffset,\vspace,\X,\Y}
+%
+% \iffalse
+%<*driver>
+\documentclass{ltxdoc}
+%<driver>%\documentclass[twoside]{ltxdoc}
+%<driver>%\documentclass[a4paper]{ltxdoc}
+%<driver>%\documentclass[twoside,a4paper]{ltxdoc}
+%%
+\usepackage{apacdoc}[2013/07/21 v6.03]
+%% The |\providecommand|s make sure we don't get an error during
+%% installation.
+%% Define document-specific macros that are not interesting for
+%% users.
+\providecommand{\SetupAPACdoc}{}%
+\SetupAPACdoc
+%% Document page layout.
+\providecommand{\APACdocPageLayout}{}%
+\APACdocPageLayout
+%% Index styles for the source code documentation
+\providecommand{\SetupAPACdocPrologues}{}%
+\SetupAPACdocPrologues
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% LOADING OF PACKAGES
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% The following line is used for references to internet sources.
+%% It is not generally necessary for apacite, but used in the examples.
+\usepackage{url}
+%%
+%% Loading apacite with author index option.
+\usepackage[ltxemindex,bibnewpage]{apacite}[2013/07/21 v6.03]
+%%
+\raggedbottom
+%%
+%% To include the detailed explanation of the coding, comment out
+%% the next line
+\OnlyDescription
+%%
+%% To produce a command index: add the following line for one run,
+%% then run makeindex -s gind.ist apacite
+%% and reprocess, with or without this line (much faster without)
+%<driver>% \EnableCrossrefs\CodelineIndex
+%%
+%% To produce a change history: add the following line for one run,
+%% then run makeindex -s gglo.ist -o apacite.gls apacite.glo
+%% and reprocess, with or without this line (faster without)
+%<driver>% \RecordChanges
+%%
+\DisableCrossrefs % May stay; zapped by \EnableCrossrefs
+\CodelineNumbered % May stay
+%%
+\begin{document}
+ \DocInput{apacite.dtx}
+\end{document}
+%</driver>
+% \fi
+%
+% ^^A (I have to find out how to get the following remark in the right
+% ^^A place in the documentation.)
+% ^^A The earlier version numbers have been assigned retroactively;
+% ^^A originally, apacite had only release dates.
+%
+% \changes{v1.0}{1994/11/30}{First public version}
+% \changes{v2.0}{2000/09/22}{Second packaged version, the result of
+% continuous updating over many years. Not officially released through
+% ctan because there was no update of the documentation, but this was
+% available through my homepage at the time. Many additions in terms
+% of customizability, and introduction of the author indexing
+% facilities, which were first used in my PhD thesis in 1998.}
+% \changes{v2.1}{2003/03/27}{First official release since 1994. Compared
+% to 2.0, this primarily solved some important compatibility problems
+% with other packages.}
+% \changes{v2.2}{2003/09/05}{Updated for the 5th edition of the APA
+% manual, up to date documentation and test document, reorganized the
+% material, and improved compatibility.}
+% \changes{v3.0}{2004/07/01}{Now adds initials if necessary to
+% distinguish first authors; now adds 2nd and later authors if necessary
+% to distinguish references; now truncates author list after 6th author
+% and editor list after 1st in reference list if there are more than 6
+% authors/editors; improved sorting for reference list; improved author
+% index support; added explicit support for reporting a meta-analysis.}
+% \changes{v3.1}{2005/06/01}{Introduces explicit non-English language
+% support, solves some compatibility problems.}
+% \changes{v3.2}{2005/06/08}{Fix of a small but annoying bug.}
+% \changes{v4.00}{2007/09/03}{Solved many compatibility issues; improved
+% and extended language support; more extensive customizability.}
+% \changes{v4.05}{2009/03/01}{Some bug fixes; extended language support;
+% annotated bibliographies.}
+% \changes{v6.00}{2012/02/14}{First step toward compliance with v6 of
+% the APA manual; version number now indicates which version of the APA
+% manual is implemented.}
+% \changes{v6.01}{2012/02/25}{Bug fix}
+% \changes{v6.02}{2013/07/04}{Bug fixes}
+% \changes{v6.03}{2013/07/21}{Thesis formatting adapted to 6th edition
+% requirements}
+%
+% \GetFileInfo{apacite.sty}
+%
+% \setcounter{IndexColumns}{2}
+% \setlength{\IndexMin}{10cm}
+%
+% ^^A Start documentation here.
+%
+%
+% \iffalse
+%<*dtx>
+% \fi
+\MakePercentComment
+%
+% User's reference manual and test of the apacite package.
+% Written by Erik Meijer
+%
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%%% START OF ``NORMAL'' PART OF DOCUMENT
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\title{The \pkg{apacite} package%
+ \thanks{This document describes \pkg{apacite} version~\fileversion{}
+ dated \filedate.}
+ \vspace{0.3\baselineskip}\\
+ \large Citation and reference list with \LaTeX{} and \BibTeX{}
+ according to the rules of the American Psychological Association}
+\author{Erik Meijer\\
+ \textsf{apacite at gmail.com}
+}
+\date{\filedate}
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% If ecmr (T1) font not available:
+\simpleguillemots
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\maketitle
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\begin{abstract}
+ \noindent
+ This document describes and tests the \pkg{apacite} package
+ \APACversiondate{\filedate}. This is a package that can be used with
+ \LaTeX{} and \BibTeX{} to generate citations and a reference list,
+ formatted according to the rules of the American Psychological Association.
+ Furthermore, \pkg{apacite} contains an option to (almost) automatically
+ generate an author index as well. The package can be customized in many
+ ways.
+\end{abstract}
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\clearpage
+\tableofcontents
+\clearpage
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\section{Introduction}
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+The American Psychological Association (APA) is very strict about the style in
+which manuscripts submitted to its journals are written and formatted. The
+requirements of the APA are described in the \emph{Publication Manual of the
+American Psychological Association}, the latest version of which is the 6th
+edition \cite{APAManual6}. In the sequel, this is simply called the \emph{APA
+manual}.
+
+The APA manual discusses how candidate authors should write their manuscripts:
+writing style, parts of a manuscript and their order, presentation of the
+results in the form of tables and figures, and so forth. Candidate authors
+should study this and adhere to this.
+
+The APA manual also gives specific rules about the formatting of a manuscript.
+This includes double spacing, a running head, the typographic style of section
+headings, the placement of tables and figures on separate pages at the end of
+the document, and so forth. \LaTeX{} users will recognize these as ``style''
+elements that should be defined in a package (\fname{.sty} file) or class
+(\fname{.cls} file). Their specific documents (\fname{.tex} file) should be
+largely style-independent. This idea of separating content and logical
+structure from specific formatting is one of the basic elements of \LaTeX{}
+\cite[p.~7]{LaTeXbook}.
+
+An implementation of the formatting rules of the APA manual for use with
+\LaTeX{} is the \pkg{apa6} class by Brian Beitzel, which is a continuation of
+the earlier \pkg{apa} class by Athanassios Protopapas. This handles all kinds of
+issues about general document formatting, title page, section headings, figures
+and tables, and so forth. Therefore, if you intend to submit a manuscript to an
+APA journal, I strongly recommend using the \pkg{apa6} class.
+
+An important part of the APA style is the way citations and the reference list
+should be formatted. This takes 56 pages in the APA manual (pp.~169--224). This
+part is not handled by the \pkg{apa6} class, but by the \pkg{apacite} package.
+\pkg{apacite} can be used without \pkg{apa6}. The current document, for example,
+does not use the \pkg{apa6} class, because I find it desirable that possible
+users can study the \pkg{apacite} package and its documentation without having
+to install several other classes and packages first. Therefore, the current
+document uses standard \LaTeX{} as much as possible. (The \pkg{apa} class used
+to require the \pkg{apacite} package, but this was dropped because there is now
+also the \pkg{biblatex-apa} citation package as an alternative to
+\pkg{apacite}.)
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\subsection*{Philosophy of \pkg{apacite}}
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+The first priority of \pkg{apacite} is to implement the rules of the APA manual
+with regard to citation and reference list as closely as possible. However, just
+like its predecessors (culminating in Young U. Ryu's \pkg{theapa} package), and
+actually expanding much beyond their realm, \pkg{apacite} offers many
+possibilities for customization as well. Many details of \pkg{apacite},
+particularly punctuation and some fixed texts (e.g., ``Tech.\ Rep.'') can be
+changed easily by the user by redefining some commands in \LaTeX{}. Furthermore,
+\pkg{apacite} also offers several proper options to change some of its settings.
+
+Whether certain options or customizable aspects are implemented depends on two
+criteria: (1) Is it possible, easy (enough), and convenient to implement them
+without compromising the ability to adhere to the APA rules, and (2) Do I (EM)
+consider them important or useful enough to spend time to implement them.
+Actually, the decision process is the reverse of this: First, I decide whether
+I find it a relevant or useful option. If not, I will not implement it. If so,
+I will think about if and how I can implement it. If I have an idea for a
+solution that is practically feasible, I will pursue it. If I don't see a
+solution, if I think it will take me too much time, or if I think a solution
+will be inconvenient to other users, then I will not pursue it.
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\subsection*{New in this version}
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+Changes with respect to the previous version (v6.02,
+\APACversiondate{2013/07/04}):
+\begin{itemize}
+
+\item
+Thesis formatting (\entryname{@phdthesis}, \entryname{@mastersthesis})
+rewritten in order to conform to the 6th edition of the APA Manual.
+
+\item
+Added the \cmd{\APACaddressSchool} and \cmd{\APACtypeAddressSchool}
+commands to facilitate customization of the formatting of theses.
+
+\item
+Added the \cmd{\APACredefineOnce} command to \fname{apacdoc.sty}.
+
+\item
+Added examples 31--44 from the APA manual to \fname{apacxmpl.tex} and
+\fname{apa5ex.bib}.
+
+\item
+Improved source code documentation in the \fname{.dtx} file.
+
+\item
+Some minor changes and bug fixes.
+
+\end{itemize}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\subsection*{About this document}
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+The current document describes how to use \pkg{apacite} and largely assumes
+knowledge of or access to the standard \BibTeX{} documentation, such as
+\citeA{Pata88}, \citeA[Chapter~12]{KoDa04}, or \citeA[Chapters~12 and~13]{TLC2}.
+Hence, this document does not always describe how to use some of the citation
+commands or how to construct a bibliography database file in detail if there
+is no \pkg{apacite}-specific element to it. This document comes in two
+versions. The version supplied with the distribution is the user's manual.
+As is customary with packages that are distributed in \fname{.dtx} form, it is
+also possible to regenerate the user's manual in such a way that it includes
+the documented source code of the package as well. This is currently still
+in a primitive form compared to other packages, but it will be improved
+with later releases. The \fname{README} file describes how the documented
+source code can be included in this manual. \citeA{meijer07} contains some
+simple examples in which \pkg{apacite} is compared to standard \LaTeX/\BibTeX{}
+citation, as well as a description of how \pkg{apacite} works technically.
+
+{\bfseries Note that this manual is not completely up to date.}
+This is primarily the case for the specific discussion of the examples
+in section~\ref{sec:xmpl}, which focus on the 5th edition of the APA
+manual, but there may be some obsolete discussions or omissions elsewhere
+in the document as well.
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\section{Installation, package loading, and running \BibTeX{}}
+\label{sec:usage}
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\pkg{apacite} is distributed as a \fname{.dtx} file, like
+most \LaTeX{} packages. The file \fname{apacite.dtx} is supplemented by a
+\fname{README} file, which gives a brief introduction and installation
+instructions, the user's manual in the file \fname{apacite.pdf} (which you are
+reading right now), and the installation file \fname{apacite.ins}. Strictly
+speaking, only the \fname{apacite.dtx} file is necessary, because the
+installation file is regenerated from it if it is not available, and the user's
+manual is generated by running \LaTeX{} on \fname{apacite.dtx}. But it is
+customary (and convenient for potential users) to include the other files as
+well.
+
+The \LaTeX{} packages, \BibTeX{} style files, and other files in the
+distribution are generated by running \LaTeX{} on \fname{apacite.ins}.
+This generates the following files:
+\begin{description}
+\item[\fname{apacite.sty}] The \LaTeX{} citation package. This must
+ be placed in a directory where \TeX{} can find it.
+\item[\fname{apacite.bst}] The \BibTeX{} reference list style. This
+ must be placed in a directory where \BibTeX{} can find it.
+\item[\fname{apacitex.bst}] The \BibTeX{} reference list style with
+ added author index support. This must also be placed in a directory
+ where \BibTeX{} can find it.
+\item[\fname{apacann.bst}]
+\item[\fname{apacannx.bst}] Versions of \fname{apacite.bst} and
+ \fname{apacitex.bst} that generate annotated bibliographies (if the
+ \fieldname{annote} and/or \fieldname{annotate} fields are provided). Again,
+ these must be placed in a directory where \BibTeX{} can find it. Most
+ probably, some time in the future, the four \fname{.bst} files will be
+ combined in \fname{apacite.bst}, with the desired behavior induced by
+ options, but this is nontrivial and currently not implemented yet.
+\item[\fname{apacxmpl.tex}] \LaTeX{} file that (with the bibliography
+ database) implements the examples from the APA manual.
+ This can best be kept in the same directory as \fname{apacite.dtx}.
+\item[\fname{apa5ex.bib}] The file with bibliographic information
+ of the examples from the APA manual, this user's manual.
+ This is useful for users to find out how
+ certain nontrivial problems can be solved. This can best be kept
+ in the same directory as \fname{apacite.dtx}.
+\item[\fname{apacite.drv}] Documentation driver. Run \LaTeX{} on this
+ file to regenerate the user's manual. This is the current document,
+ and can also be ontained by running \LaTeX{} on \fname{apacite.dtx},
+ but you can edit the file \fname{apacite.drv} to change some settings,
+ e.g., choose whether or not the documented source code must be
+ included in the manual or not. Please don't edit \fname{apacite.dtx}
+ itself. The file \fname{apacite.drv} can best be kept
+ in the same directory as \fname{apacite.dtx}.
+\item[\fname{*.apc}] Language-specific modifications of \pkg{apacite}.
+ See section~\ref{sec:compat-babel} for a discussion of these.
+ These must be placed in a directory where \LaTeX{} can find them.
+ The files that are currently supplied are \fname{english.apc},
+ \fname{dutch.apc}, \fname{finnish.apc}, \fname{french.apc},
+ \fname{german.apc}, \fname{ngerman.apc}, \fname{greek.apc},
+ \fname{norsk.apc}, \fname{spanish.apc}, and \fname{swedish.apc}.
+\item[\fname{apacdoc.sty}] A \LaTeX{} package that contains commands
+ and settings used in this user's manual. This can be placed in a
+ directory where \TeX{} can find it, but given that it is primarily
+ useful for processing the user's manual and not intended as a
+ package for wider usage, it can also be left in the same directory as
+ \fname{apacite.dtx}. See section~\ref{sec:apacdoc} for a further discussion
+ of this package.
+\end{description}
+
+The \fname{apacite.sty} \LaTeX{} package is loaded by putting
+\mbox{}\vspace{0.7\baselineskip}\\
+\cmdthreealt{usepackage}{options}{apacite}
+\mbox{}\vspace{0.7\baselineskip}\\
+somewhere in your document between \cmd{\documentclass} and
+|\begin{document}|, or putting
+\mbox{}\vspace{0.7\baselineskip}\\
+\cmdthreealt{RequirePackage}{options}{apacite}
+\mbox{}\vspace{0.7\baselineskip}\\
+in your own personal \LaTeX{} package (say, \fname{mysettings.sty})
+that is loaded by your document.
+
+To load the \fname{apacite.bst} or \fname{apacitex.bst} bibliography style in
+\BibTeX{}, put
+\mbox{}\vspace{0.7\baselineskip}\\
+|\bibliographystyle{apacite}|
+\mbox{}\vspace{0.7\baselineskip}\\
+(or |apacitex|, |apacann|, or |apacannx|) in your document
+before the \cmd{\bibliography} command. The
+position of the bibliography (reference list) is determined by the line
+\mbox{}\vspace{0.7\baselineskip}\\
+\cmdtwo{bibliography}{bibfiles}
+\mbox{}\vspace{0.7\baselineskip}\\
+where \opt{bibfiles} is a list of filenames with \fname{.bib} extension, which
+contain the bibliographic information that is used by \BibTeX{} to construct the
+reference list. Usually, the \cmd{\bibliographystyle} and \cmd{\bibliography}
+are kept together (immediately follow each other) in the document, although when
+you are using the \pkg{apa6} document class with \pkg{apacite} support, the
+\cmd{\bibliographystyle} is defined by the class and you are not supposed to use
+the \cmd{\bibliographystyle} command yourself. See the documentation of the
+\pkg{apa6} documentclass for details about this.
+
+If you use one of the author indexing options, the author index is put in
+the \LaTeX{} output by the line
+\begin{verbatim}
+\printindex[autx]
+\end{verbatim}
+If you put this line in your document, but don't use one of the author
+indexing options, it will be ignored. For more on author indexing, see
+section~\ref{sec:autindex}.
+
+To get all parts in the final output, the following sequence of runs should
+typically be taken (when starting from scratch): (1) \LaTeX{}, (2) \BibTeX{},
+(3) \LaTeX{}, (4) \LaTeX{}, and, when author indexing is on, (5) \MakeIndex{},
+(6) \LaTeX{}, and (7) \LaTeX{}. The last one is to get the index in the table
+of contents. If the table of contents is on a regular page, i.e., an
+arabic-numbered page instead of a roman-numbered page in the front matter, it
+may even be necessary to run \MakeIndex{} another time, followed by \LaTeX{}
+once or twice. Occasionally, somewhere in the process, \LaTeX{} may complain
+about labels that may have changed, which requires even more additional
+\LaTeX{} runs at that stage. So the number of runs that are necessary to get
+everything right may become large.
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\section{Package options}
+\label{sec:options}
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+The following options are recognized by \pkg{apacite}:
+\begin{description}
+\item[\pkgoption{apaciteclassic}]
+\item[\pkgoption{natbibapa}]
+\item[\pkgoption{nocitation}] \mbox{}\\
+ These three option determine which citation commands are defined in
+ \pkg{apacite}. \pkgoption{apaciteclassic} defines the ``classic''
+ \pkg{apacite} citation commands \cmd{\cite}, \cmd{\citeA}, \cmd{\citeNP},
+ and so forth, which use angled bracket syntax for prenotes, for example,
+ |\cite<see>[for more details]{ex1}|. These are the commands
+ described in section~\ref{sec:cite} below. This is the default in the
+ current version, but this may change in the future.
+
+ \pkgoption{natbibapa}
+ loads the \pkg{natbib} package for the citation commands. These
+ commands, such as \cmd{\citet} and \cmd{\citep}, use double square
+ brackets, for example, |\citep[see][for more details]{ex1}|.
+ Because these commands are not defined by \pkg{apacite} but by
+ \pkg{natbib}, they are not documented in this manual. See the
+ \pkg{natbib} documentation for their usage. Using \pkg{natbib} has a
+ few advantages over using the classic \pkg{apacite} commands:
+ (i) the citation commands are robust, which means they can be used
+ inside other commands, such as \cmd{\caption}, whereas the \pkg{apacite}
+ commands, like the traditional \LaTeX{} \cmd{\cite} command, are
+ fragile and must be \cmd{\protect}ed when used inside other commands;
+ (ii) the angled brackets do not normally occur in text mode and when
+ they do, they have special meaning; this may lead to incompatibilities;
+ (iii) \pkg{natbib} supports sorting citations within a citation
+ command, and has commands such as \cmd{\Citet} that capitalize the
+ first letter of a citation; the classic \pkg{apacite} commands lack
+ this functionality;
+ (iv) it is easier to switch to other styles, even to numbered styles.
+
+ When the \pkgoption{nocitation} option is requested, no citation
+ commands (except for \cmd{\nocitemeta}) are defined in \pkg{apacite}.
+ This may be useful if you want to use another citation package and
+ want to avoid potential compatibility conflicts.
+
+ The option \pkgoption{natbibapa} is different from
+ \pkgoption{nocitation} combined with loading of \pkg{natbib} by the
+ user, because \pkgoption{natbibapa} modifies \pkg{natbib}'s and
+ \pkg{apacite}'s behavior in a way that better satisfies the APA
+ rules and fixes some compatibility problems.
+
+\item[\pkgoption{BCAY}] \mbox{}\\
+ This is a technical option for backwards compatibility with old versions
+ (pre-\APACversiondate{2003/09/05}) of \pkg{apacite}. In those versions of
+ \pkg{apacite}, the \cmd{\BCAY} construction was used to pass relevant
+ citation information from the \fname{.bbl} file (\BibTeX{}'s output) to
+ \LaTeX{}. This was taken over from its immediate predecessor, Young U. Ryu's
+ \pkg{theapa}. However, \pkg{natbib} does not recognize the \cmd{\BCAY}
+ construction, but it does recognize the analogous \cmd{\citeauthoryear}
+ construction, which was also used by an earlier predecessor of
+ \pkg{apacite}, \pkg{newapa}. Therefore, \pkg{apacite} has reverted to
+ \cmd{\citeauthoryear} as well. This makes different versions of
+ \pkg{apacite} incompatible with each other, because it is not possible to
+ support both constructions at the same time. This option is used to fix
+ that: In the (unlikely) event that you \emph{must} use a \fname{.bbl} file
+ that is generated by an old version of \pkg{apacite}, you can turn this
+ option on.
+
+\item[\pkgoption{mask}]
+\item[\pkgoption{unmask}] \mbox{}\\
+ Many journals use a double blind refereeing process. To conceal the
+ author's identity in such a masked review, it may be necessary to
+ suppress some citations, for example, to the working paper version
+ of the manuscript under review. \pkg{apa6} introduced masked citation
+ commands, which are now included in \pkg{apacite} as well. These
+ work as ordinary citations when the \pkgoption{mask} option is not
+ requested (or when the \pkgoption{unmask} option is chosen, which
+ is the default) and print a message mentioning suppression of citations
+ when \pkg{apacite} is loaded with the \pkgoption{mask} option.
+
+\item[\pkgoption{index}]
+\item[\pkgoption{indexpackage}]
+\item[\pkgoption{noindexpackage}] \mbox{}\\
+ The \pkgoption{index} option turns author indexing on. See
+ section~\ref{sec:autindex} for a discussion of the author indexing facility.
+ The \pkgoption{index} option should be used with the \fname{apacitex.bst}
+ (or \fname{apacannx.bst})
+ \BibTeX{} style, although it does not give errors with \fname{apacite.bst}
+ (or \fname{apacann.bst}),
+ but simply does not give author index entries, so then this option
+ typically does not have any effect (and an undesirable effect if
+ it does). The \pkgoption{indexpackage} and \pkgoption{noindexpackage}
+ select whether the author index entries should be generated according
+ to the method of the \pkg{index} package or using a more standard-\LaTeX{}
+ method.
+
+ By default, if the \pkgoption{index} option is requested, the
+ \pkgoption{indexpackage} option is turned on as well, consistent with
+ the behavior of previous versions of \pkg{apacite}.
+
+\item[\pkgoption{noindex}] \mbox{}\\
+ Turns author indexing off (the default). Typically used with
+ \fname{apacite.bst}, but can also be used with \fname{apacitex.bst}. In the
+ latter case, the author indexing commands are simply ignored. Therefore,
+ \fname{apacite.bst} is actually superfluous, but because author indexing
+ will be used rarely and \fname{apacitex.bst} is more likely to lead to errors
+ or incompatibilities, a ``clean'' (no author indexing) version,
+ \fname{apacite.bst}, is provided as well.
+
+\item[\pkgoption{suppresscorporate}] \mbox{}\\
+ Excludes corporate authors from the author index. The \cmd{\bibcorporate}
+ command must be used in the \fname{.bib} file to denote a corporate author;
+ see sections~\ref{subsec:fields}, \ref{subsec:labels}, and~\ref{sec:autindex}.
+
+\item[\pkgoption{includecorporate}] \mbox{}\\
+ Includes corporate authors in the author index, provided that an author index
+ is requested of course.
+
+\item[\pkgoption{stdindex}]
+\item[\pkgoption{tocindex}]
+\item[\pkgoption{emindex}]
+\item[\pkgoption{ltxemindex}] \mbox{}\\
+ These options select the style of index formatting. They all imply the
+ \pkgoption{index} option. The first three of these imply the
+ \pkgoption{indexpackage} option, whereas the fourth implies
+ \pkgoption{noindexpackage}. See section~\ref{sec:autindex}.
+
+\item[\pkgoption{numberedbib}] \mbox{}\\
+ This option implies that the bibliography (reference list) is a numbered
+ section or chapter, e.g., ``6.~References'', instead of just ``References''.
+
+\item[\pkgoption{unnumberedbib}] \mbox{}\\
+ The reverse of \pkgoption{numberedbib}: The bibliography is an unnumbered
+ section or chapter. This is the default. However, it is possible that when
+ using the \pkg{apa} document class, then \pkgoption{numberedbib} works
+ better, because that class turns section numbering off anyway and it may be
+ that \pkg{apa}'s page headings work well if the reference list is a
+ \cmd{\section} and not if it is a \cmd{\section*}. I have not experimented
+ with this (yet), however.
+
+\item[\pkgoption{sectionbib}] \mbox{}\\
+ With this option, the bibliography is a section and not a chapter. Mainly
+ useful in combination with the \pkg{chapterbib} package. Therefore, it will
+ be discussed in more detail in section~\ref{sec:compat-chapterbib}.
+
+\item[\pkgoption{nosectionbib}] \mbox{}\\
+ With this option, the bibliography is a chapter, if the \cmd{\chapter}
+ command is defined. Otherwise, it is always a section. Again, see
+ section~\ref{sec:compat-chapterbib}.
+
+\item[\pkgoption{tocbib}] \mbox{}\\
+ This puts the bibliography in the table of contents, even if it is
+ unnumbered, provided of course that a table of contents is requested in the
+ document (by \cmd{\tableofcontents}). This is the default.
+
+\item[\pkgoption{notocbib}] \mbox{}\\
+ This does not put the bibliography in the table of contents if it is an
+ unnumbered section or chapter. If it's numbered, it is always in the table
+ of contents.
+
+\item[\pkgoption{bibnewpage}] \mbox{}\\
+ The bibliography is started on a new page. This is required by some journal
+ styles, including the APA manual. The \pkg{apa} class already contained this
+ in its \pkgoption{man} option, but now it has been made available directly
+ in \pkg{apacite}.
+
+\item[\pkgoption{nobibnewpage}] \mbox{}\\
+ The bibliography is not explicitly started on a new page, although if the
+ bibliography is a chapter, it will be started on a new page anyway, because
+ chapters are started on a new page. This is the default in \pkg{apacite} and
+ thus is the only time a non-APA setting is used as default instead of an
+ available APA setting. Therefore, to satisfy the APA rules, you have to
+ request the \pkgoption{bibnewpage} option explicitly.
+
+\item[\pkgoption{doi}] \mbox{}\\
+ Includes doi information in the reference list; the default.
+
+\item[\pkgoption{nodoi}] \mbox{}\\
+ Suppresses doi information in the reference list.
+
+\end{description}
+%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\section{The citation commands}
+\label{sec:cite}
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+This section describes the commands that can be used to cite a work.
+Section~\ref{sec:classic} describes the commands available with the
+\pkgoption{apaciteclassic} option selected. Section~\ref{sec:natbibapa}
+is devoted to the citation commands with the \pkgoption{natbibapa}
+command selected. Apart from differences in syntax, there are a few
+important differences between these sets of commands:
+\begin{itemize}
+\item
+The \pkgoption{apaciteclassic} commands are \emph{fragile}, like the
+standard \LaTeX{} \cmd{\cite} command. This means that they cannot be
+used in other commands, like \cmd{\caption}, unless they are protected
+by putting \cmd{\protect} before them, for example,
+\begin{verbatim}
+\caption{Theoretical constructs from \protect\citeA{Jones01}}
+\end{verbatim}
+In contrast, the \pkg{natbib}/\pkgoption{natbibapa} commands are
+\emph{robust}, so they can be used in other commands without the
+need for \cmd{\protect}.
+\item
+The use of the angled brackets (`|<|' and `|>|') in the
+\pkgoption{apaciteclassic} commands sometimes causes compatibility
+problems, for example, with certain options of the \pkg{babel}
+package, such as \pkgoption{spanish}.
+\item
+With the \pkgoption{sort} option, \pkg{natbib} sorts citations
+within the same citation command in the same order as in the reference
+list, as required by the APA manual (p.~178). Therefore, when
+\pkg{apacite} is loaded with the \pkgoption{natbibapa} option, it
+loads \pkg{natbib} with the \pkgoption{sort} option.
+Sorting is not implemented in the \pkgoption{apaciteclassic} commands,
+and thus the user will need to manually order the citations
+alphabetically.
+\item
+\pkg{natbib} provides a set of commands (e.g., \cmd{\Citet}) that
+capitalize the first letter of a citation. This can be used when
+a citation, of which the first author's name starts with a lowercase
+letter, starts a sentence (APA manual, p.~101). This behavior would
+be very hard to reproduce with the \pkgoption{apaciteclassic}
+commands.
+\end{itemize}
+Overall, I believe that the \pkg{natbibapa} option will be preferred
+by most users, and I expect that I will make this the default in a
+future release of \pkg{apacite}. However, because most users of
+\pkg{apacite} will still be working on documents that use the
+\pkgoption{apaciteclassic} commands, this is still the default in the
+current version.
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\subsection{The ``classic'' \pkg{apacite} citation commands}
+\label{sec:classic}
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+This section describes the default behavior of the citation commands
+that are avilable with the \pkgoption{apaciteclassic} option.
+In section~\ref{sec:custom}, customization of this behavior will be
+discussed. Extensive examples are given in section~\ref{sec:xmpl}
+and the new examples file described there. Table~\ref{tab:basic-cite}
+gives a brief impression of the usage and results of the most common
+citation commands.
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\begin{table}[tp]
+\begin{center}
+\caption{Examples of usage of basic citation commands.}
+\label{tab:basic-cite}
+\begin{tabular}{@{}ll@{}}
+\hline
+Command & Result \\
+\hline
+|\cite<e.g.,>[p.~11]{Jone01,Ross87}| &
+ (e.g., Jones, 2001; Ross, 1987, p.~11) \\
+|\citeA<e.g.,>[p.~11]{Jone01,Ross87}| &
+ e.g., Jones (2001); Ross (1987, p.~11) \\
+|\citeauthor<e.g.,>[p.~11]{Jone01,Ross87}| &
+ e.g., Jones; Ross, p.~11 \\
+|\citeyear<e.g.,>[p.~11]{Jone01,Ross87}| &
+ (e.g., 2001; 1987, p.~11) \\
+|\citeyearNP<e.g.,>[p.~11]{Jone01,Ross87}| &
+ e.g., 2001; 1987, p.~11 \\
+|\citeNP<e.g.,>[p.~11]{Jone01,Ross87}| &
+ e.g., Jones, 2001; Ross, 1987, p.~11 \\
+\hline
+\end{tabular}
+\end{center}
+\end{table}
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\subsubsection*{Structure of the citation commands;
+ parenthetical citations}
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\DescribeMacro{\cite}
+The traditional \LaTeX{} citation command is \cmd{\cite}, and
+\pkg{apacite} reimplements this command. This command is used for
+\emph{parenthetical} citations. For example,
+``|\cite{Jone01}|'' results in ``(Jones, 2001)''. Here,
+|Jone01| is the \emph{key} that identifies the reference; it is
+defined in the \fname{.bib} file, see section~\ref{sec:bib}.
+An optional postfix---text that follows the actual citation---can
+be added as a standard \LaTeX{} optional argument in square brackets:
+``|\cite[p.~11]{Jone01}|'' results in ``(Jones, 2001, p.~11)''.
+Similarly, an optional prefix can be added between angled brackets:
+``|\cite<e.g.,>{Jone01}|'' results in ``(e.g., Jones, 2001)''.
+Finally, there can be both a prefix and a postfix (in that order):
+``|\cite<e.g.,>[p.~11]{Jone01}|'' results in
+``(e.g., Jones, 2001, p.~11)''. As usual, multiple references
+can be included within the same citation:
+``|\cite<e.g.,>[p.~11]{Jone01, Ross87}|'' results in
+(e.g., Jones, 2001; Ross, 1987, p.~11). The citation keys of multiple
+citations must be separated by commas, with optional spaces after the
+commas.
+
+By default, \pkg{apacite} follows the APA rules and includes the
+citation in round parentheses, separates the author and year by a
+comma, the different references by a semicolon, and the year and
+the postfix by a comma, but this can all be changed by the user;
+see section~\ref{sec:custom}.
+
+\pkg{apacite} defines a large number of alternative citation
+commands, but they all have this same structure:
+\cmdfour{command}{prefix}{postfix}{keys}. However, the prefix, and to
+a lesser extent the postfix, are most useful with the parenthetical
+citation commands.
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\subsubsection*{Text citations; splitting author and year; no
+parentheses}
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\DescribeMacro{\citeA}
+The \cmd{\citeA} command produces text citations:
+``|\citeA{Jone01}|'' results in ``Jones (2001)'' and.
+``|\citeA[p.~11]{Jone01}|'' results in ``Jones (2001, p.~11)''.
+Prefixes are generally not useful for text citations (you can simply
+include the prefix in the text), but supported. Multiple citations
+are also supported. These are typically only useful for cases in which
+the authors are the same and only the year is repeated:
+``|\citeA{Jone01, Jone02}|'' results in ``Jones (2001, 2002)''.
+Corresponding with the APA rules, an ``and'' before the last author
+is formatted as ``and'' in text citations, whereas it is formatted
+as ``\&'' in parenthetical citations:
+``|\citeA{SmJo03}|'' gives ``Smith and Jones (2003)'', whereas
+``|\cite{SmJo03}|'' gives ``(Smith \& Jones, 2003)''.
+
+\DescribeMacro{\citeauthor}
+If a proper citation has been given in a paragraph,\footnote{Note that
+a paragraph is not a section. Nor does it need to be declared as a
+\cmd{\paragraph}. A reminder for Dutch readers: ``section'' =
+``paragraaf'' and ``paragraph'' = ``alinea''.}
+the second reference to the source may omit the year if no ambiguity
+can arise (APA manual, p.~174). The \cmd{\citeauthor} command can
+be used for such purposes:
+\begin{verbatim}
+\citeA{Jone01} argued that [...]. The empirical results of
+\citeauthor{Jone01} supported his argument.
+\end{verbatim}
+gives ``Jones (2001) argued that [\ldots]. The empirical results of
+Jones supported his argument.''
+
+\DescribeMacro{\citeyear}
+The \cmd{\citeyear} command gives just the year part of a text
+citation. This can be used for constructions like
+``|\citeauthor{Jone01}' \citeyear{Jone01} method|'', which
+gives ``Jones' (2001) method''. Note that \cmd{\citeyear} inserts the
+parentheses.
+
+\DescribeMacro{\citeyearNP}
+Some constructions may require even more flexibility. The
+\cmd{\citeyearNP} command (NP = no parentheses) omits the
+parentheses, which can be useful for a construction like
+``|In \citeyearNP{Jone01},| |\citeauthor{Jone01}| |introduced|
+|his method|'', which gives ``In 2001, Jones introduced his method''.
+
+\DescribeMacro{\citeauthorNP}
+As mentioned above, text citations use ``and'' between authors,
+whereas parenthetical citations use ``\&''. The, \cmd{\citeauthor}
+command is a text citation command and thus should not be used
+in a parenthetical citation; \cmd{\citeauthorNP} is the corresponding
+parenthetical command, which gives just the authors, but now with
+``\&'' when applicable. Note that neither \cmd{\citeauthor} nor
+\cmd{\citeauthorNP} insert parentheses. In hindsight, it would have
+been more logical---following \cmd{\cite} and \cmd{\citeA}---to use
+\cmd{\citeauthorA} for what is now \cmd{\citeauthor} and
+\cmd{\citeauthor} for what is now \cmd{\citeauthorNP}, but
+\cmd{\citeauthor} already existed as a text citation command in
+\pkg{apacite}'s predecessor \pkg{theapa}, it is used as such in
+some other packages (e.g., \pkg{natbib}), and I didn't realize at
+the time that \pkg{apacite} would need both. Therefore, the name
+\cmd{\citeauthorNP} is modeled after \cmd{\citeNP}
+
+\DescribeMacro{\citeNP}
+The \cmd{\citeNP} command is \cmd{\cite} without the parentheses.
+This is useful for complex constructions like
+\begin{verbatim}
+\citeauthor{Jone01} (\citeyearNP{Jone01}; see also \citeNP{SmJo03})
+\end{verbatim}
+which gives
+``Jones (2001; see also Smith \& Jones, 2003)''.
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\subsubsection*{References without citation}
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\DescribeMacro{\nocite}
+The standard \LaTeX{} command \cmd{\nocite} is also provided by
+\pkg{apacite}; \cmdtwo{nocite}{keys} includes the references
+corresponding with the keys in the reference list, but does not
+generate a citation in the text. Therefore, it does not allow a pre-
+or postfix. However, it does allow multiple citations. Like the
+standard \LaTeX{} command, |\nocite{*}| includes all references
+from the \fname{.bib} file in the reference list. In general, the APA
+requires (p.~174) that each reference list entry should be cited in
+the text, and thus this command will rarely be used in APA style
+manuscripts. One potential application is a meta-analysis based
+on more than 50 works. (See \cmd{\nocitemeta} below.)
+
+\DescribeMacro{\nocitemeta}
+An exception to the one-to-one correspondence requirement between
+citations and reference list is when a meta-analysis is reported.
+This is a quantitative analysis with results, e.g., regression
+coefficients, from published work used as data in the current work.
+Studies that are included in the meta-analysis should be included
+in the reference list, but do not need to be cited. They should,
+however, be marked with an asterisk in the reference list. This
+can be obtained by using \cmd{\nocitemeta}, which is otherwise
+identical to \cmd{\nocite}: the syntax is \cmdtwo{nocitemeta}{keys}
+and |\nocitemeta{*}| includes all entries from the \fname{.bib} file
+in the reference list and flags all of them with an asterisk. This
+is an unlikely situation, though. Because other packages, in particular
+\pkg{natbib} do not define \cmd{\nocitemeta} or an analogous command,
+\pkg{apacite} provides \cmd{\nocitemeta} regardless of whether the
+\pkgoption{apaciteclassic}, \pkgoption{natbibapa}, or even
+\pkgoption{nocitation} option is requested.
+
+If a meta-analysis includes more than 50 studies, these should not
+be included in the main reference list, but in a separate online
+supplemental archive (APA manual, p.~183). \pkg{apacite} currently
+does not count the number of references included in the meta-analysis,
+and thus does not check whether the references should be included in
+a separate online supplemental archive, it does not disable the
+\cmd{\nocitemeta} command, and it does not automatically generate
+the supplemental document. This is the responsibility of the user.
+If there is demand for it, I might implement such a counter so that
+\pkg{apacite} can give a warning at the end of the \LaTeX{} run that
+there are more than 50 references included in the meta-analysis.
+Presumably, in the online supplemental archive, the references are
+not marked with an asterisk, so this would be an example where
+\cmd{\nocite} can be useful.
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\subsubsection*{Full and short author lists}
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\DescribeMacro{\fullcite}
+\DescribeMacro{\fullciteA}
+\DescribeMacro{\fullciteNP}
+\DescribeMacro{\fullciteauthor}
+\DescribeMacro{\fullciteauthorNP}
+When citing a work with one or two authors, all authors are included
+in each citation. When citing a work with six or more authors, only
+the first author's name is included in the text, followed by
+``et al.\hbox{}''. With three to five authors, the full list is
+included the first time the work is cited, and only the first with
+``et al.\hbox{}'' in subsequent citations.
+
+\DescribeMacro{\shortcite}
+\DescribeMacro{\shortciteA}
+\DescribeMacro{\shortciteNP}
+\DescribeMacro{\shortciteauthor}
+\DescribeMacro{\shortciteauthorNP}
+There are some special cases, where some of the authors and the year
+are the same, but not the whole author list, in which more names are
+retained on subsequent citations as well. Section~\ref{sec:xmpl}
+includes some examples of complex situations and how to deal with
+them. All of this is automatically handled by \pkg{apacite}.
+
+However, occasionally one may want to use the full
+author list even after a first citation, or the short author list in
+the first citation. For such (rare) cases, \pkg{apacite} provides
+``full'' and ``short'' versions of all citation commands that include
+an author (list) in the text. Other than forcing the full or short
+author list in the text, these commands are identical to the versions
+without ``|full|'' or ``|short|''.
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\subsubsection*{Masked citations}
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\DescribeMacro{\maskcite}
+\DescribeMacro{\maskciteA}
+\DescribeMacro{\maskciteNP}
+\DescribeMacro{\maskciteauthor}
+\DescribeMacro{\maskciteauthorNP}
+\DescribeMacro{\maskciteyear}
+\DescribeMacro{\maskciteyearNP}
+Many journals use a ``masked'' or double-blind review process, in
+which the identities of the authors are concealed from the reviewers.
+As the APA manual states (p.~226), it is the responsibility of the
+authors to ensure that the content of the manuscript does not reveal
+their identities. This may include suppressing citations to other
+work by the authors, in particular unpublished material, such as
+the working paper version of the manuscript under review. To this
+end, the \pkg{apa6} class introduced ``masked'' citation commands,
+which produce the desired citation for the unmasked mode, but
+insert a message stating that citations have been masked in masked
+mode. Because these are citation commands, they are more properly
+included in \pkg{apacite}, and they now are. I am coordinating with
+\pkg{apa6}'s author Brian Beitzel on this issue (and other points
+of interaction between \pkg{apa6} and \pkg{apacite}).
+
+\DescribeMacro{\maskfullcite}
+\DescribeMacro{\maskfullciteA}
+\DescribeMacro{\maskfullciteNP}
+\DescribeMacro{\maskfullciteauthor}
+\DescribeMacro{\maskfullciteauthorNP}
+All the citation commands introduced in this section have a
+corresponding masked version, which has the same syntax and the same
+name, except that ``|mask|'' is inserted immediately after the
+backslash. Thus, the masked version of \cmd{\cite} is \cmd{\maskcite},
+the masked version of \cmd{\fullciteauthorNP} is
+\cmd{\maskfullciteauthorNP}, and so forth.
+
+\DescribeMacro{\maskshortcite}
+\DescribeMacro{\maskshortciteA}
+\DescribeMacro{\maskshortciteNP}
+\DescribeMacro{\maskshortciteauthor}
+\DescribeMacro{\maskshortciteauthorNP}
+When \pkg{apacite} is loaded with the \pkgoption{mask} option, these
+masked citation commands insert the message
+``\emph{(1\ citation removed for masked review)}'', or
+``\emph{(2\ citations removed for masked review)}'', and so forth,
+depending on the number of citations included in the citation
+command. When \pkg{apacite} is loaded with the \pkgoption{unmask}
+option (the default), the masked citation commands are equivalent
+to the same commands without the ``|mask|''.
+
+\DescribeMacro{\masknocite}
+\DescribeMacro{\masktext}
+%% \DescribeMacro{\maskcitations}
+%% \DescribeMacro{\unmaskcitations}
+In addition to the masked citation commands, \pkg{apacite} also
+provides \cmd{\masknocite}, although its usefulness seems even more
+remote than \cmd{\nocite} itself in APA style documents. Because
+\cmd{\nocite} does not insert a citation, \cmd{\masknocite} does
+not remove citations in \pkgoption{mask} mode. It only prevents an
+entry in the reference list. Therefore, this command does not
+insert a message about removed citations in the text either. Hence,
+it does nothing in \pkgoption{mask} mode. An additional command
+provided by \pkg{apacite} is \cmd{\masktext}. This has one mandatory
+argument, the text that is to be masked. It also has an optional
+argument, which is the text to be inserted in \pkgoption{mask} mode.
+
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\subsubsection*{Ad-hoc citation commands}
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+In order to format the examples from the APA manual correctly in
+section~\ref{sec:xmpl}, the \fname{apacdoc.sty} package defines the
+following additional citation commands: \cmd{\DSMcite},
+\cmd{\biblecite}, and \cmd{\citesong}, and obvious variations with
+|full|, |short|, |A|, and |NP|. I have decided not to include these
+in \fname{apacite.sty}, primarily because I find it unattractive to
+introduce different types of citation commands for different types of
+citations. This also makes it more difficult to use the same document
+with another citation package. Perhaps I'll be able to provide,
+in a future version of \pkg{apacite}, more elegant solutions to the
+problems for which these commands were defined. See
+section~\ref{sec:apacdoc} for a description of the \fname{apacdoc.sty}
+package and some brief usage instructions.
+
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\subsection{Using \pkg{natbib} for citations}
+\label{sec:natbibapa}
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+With the \pkgoption{natbibapa} option, \pkg{apacite} loads \pkg{natbib}
+with the options \pkgoption{longnamesfirst} and \pkgoption{sort}. The
+former inserts the full author lists in the first citation and the
+short author lists in subsequent citations, in the same way the
+\pkgoption{apaciteclassic} commands do. The \pkgoption{sort} option
+sorts the citations within the same citation command in the same order
+as in the reference list, as required by the APA manual (p.~178).
+In addition to loading \pkg{natbib}, \pkg{apacite} includes some
+code to improve the interoperability, and it defines some additional
+commands that are specific to the \pkg{natbib}-\pkg{apacite}
+combination. The latter will be described below.
+
+Because the citation commands are defined by \pkg{natbib}, this is
+not the place for extensive documentation of them. See the \pkg{natbib}
+documentation. However, for completeness, I provide very brief
+information here. Table~\ref{tab:natbibapa} lists the commands and
+a brief description.
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\begin{table}[tp]
+\centering
+\caption{The \pkg{natbib} citation commands.}
+\label{tab:natbibapa}
+\begin{tabular}{@{}ll@{}}
+\hline
+Command & Description \\
+\hline
+\cmd{\citep} & Parenthetical citation \\
+\cmd{\citet} & Text citation \\
+\cmd{\citeauthor} & Author only (text citation) \\
+\cmd{\citeyear} & Year only (no parentheses) \\
+\cmd{\citeyearpar} & Year citation (with parentheses) \\
+\cmd{\citealp} & Parenthetical citation without the parentheses \\
+\cmd{\citealt} & Text citation without the parentheses \\
+\cmd{\citenum} & Number of the reference \\
+\cmd{\nocite} & No citation, only reference list entry \\
+\cmd{\Citep} etc. & Capitalized citation \\
+\cmd{\citep*} etc. & Full author lists \\
+\cmd{\shortcites} & Short author lists \\
+\cmd{\defcitealias} & Define alias (e.g., \emph{DSM-IV}) \\
+\cmd{\citepalias} & Parenthetical citation of alias \\
+\cmd{\citetalias} & Text citation of alias \\
+\cmd{\citetext} & Arbitrary text within citation parentheses \\
+\hline
+\end{tabular}
+\end{table}
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+Compared to the \pkgoption{apaciteclassic} commands,
+the \pkg{natbib} commands use square brackets for both the prefix and
+the postfix: ``|\command[prefix][postfix]{keys}|''. If only one
+optional argument is present, it is interpreted as a postfix. A
+citation with only a prefix is obtained by using both optional
+arguments, but leaving the postfix empty:
+``|\command[prefix][]{keys}|''. The full author list is obtained
+by adding a star after the command, for example, |\citet*{key}|.
+There is no separate command for the short author list, but it can
+be obtained with the construction |\shortcites{key}\citet{key}|.
+The first letter of the author list is capitalized with citation
+commands that capitalize the first letter of the citation command,
+such as \cmd{\Citet}.
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\subsubsection*{Filling some gaps and other additions}
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\DescribeMacro{\citeauthorp}
+\DescribeMacro{\citeauthort}
+\DescribeMacro{\Citeauthorp}
+\DescribeMacro{\Citeauthort}
+As mentioned in section~\ref{sec:classic}, the APA requires that
+``and'' between authors is ``and'' in text citations and ``\&'' in
+parenthetical citations, and therefore the \pkgoption{apaciteclassic}
+option defines two author-citing commands: \cmd{\citeauthor} for
+text citations and \cmd{\citeauthorNP} for parenthetical citations.
+However, \pkg{natbib} only provides \cmd{\citeauthor}. For
+consistency with \cmd{\citep} and \cmd{\citet}, when loaded with the
+\pkgoption{natbibapa} option, \pkg{apacite} defines
+\cmd{\citeauthorp} for parenthetical use and \cmd{\citeauthort} for
+text use, and the corresponding capitalized versions \cmd{\Citeauthorp}
+and \cmd{\Citeauthort}. The default command \cmd{\citeauthor} is a
+text citation command, so it's equivalent to \cmd{\citeauthort}.
+
+%% \DescribeMacro{\citefullauthorp}
+%% \DescribeMacro{\citefullauthort}
+%% \DescribeMacro{\Citefullauthorp}
+%% \DescribeMacro{\Citefullauthort}
+
+\DescribeMacro{\bibstyle@apacite}
+\DescribeMacro{\bibstyle@apa}
+The \pkg{natbib} package is also highly customizable, and one of
+the ways it allows customization is by the \cmd{\bibstyle@xxx}
+commands, which typically define the desired punctuation through
+\cmd{\bibpunct} and may define other customizations. These are
+executed by using the command |\citestyle{xxx}|. Furthermore, when
+\pkg{natbib} is loaded, it checks the bibliography style and if it
+is \fname{xxx.bst}, then it tries to execute |\citestyle{xxx}| if
+defined. With the \pkgoption{natbibapa} option, \pkg{apacite}
+defines \cmd{\bibstyle@apacite}, and as a synonym, \cmd{\bibstyle@apa}.
+Thus, the APA punctuation defaults can be obtained with
+|\citestyle{apacite}| or |\citestyle{apa}|, which are executed
+by \pkg{apacite}, so the user only needs to do this if the style
+has been changed.
+
+\DescribeMacro{\maskcitep}
+\DescribeMacro{\maskcitet}
+\DescribeMacro{\maskciteauthor}
+\DescribeMacro{\maskciteyear}
+\DescribeMacro{\maskciteyearpar}
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\subsubsection*{Masked citations}
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\DescribeMacro{\maskcitealp}
+\DescribeMacro{\maskcitealt}
+\DescribeMacro{\maskcitenum}
+\DescribeMacro{\maskcitetalias}
+\DescribeMacro{\maskcitepalias}
+Section~\ref{sec:classic} described masked citation commands that
+can be used in double-blind review processes in an effort to conceal
+the identity of the authors. Because \pkg{natbib} itself does not
+define such commands, \pkg{apacite} with the \pkgoption{natbibapa}
+option defines a full set of \pkg{natbib}-style masked citation
+commands. Again, these are identical to the un-|mask| version if
+the \pkgoption{mask} option is not requested, but insert a message
+about removed citations when the \pkgoption{mask} option is requested.
+
+\DescribeMacro{\maskCitep}
+\DescribeMacro{\maskCitet}
+\DescribeMacro{\maskCiteauthor}
+\DescribeMacro{\maskCitealp}
+\DescribeMacro{\maskCitealt}
+%% The |\mbox{}| is necessary to avoid errors about too many
+%% unprocessed floats. This gives some ugly vertical whitespace, but
+%% the only alternative would be to write some superfluous paragraphs,
+%% which is equally unattractive.
+\mbox{}
+
+\DescribeMacro{\maskciteauthorp}
+\DescribeMacro{\maskciteauthort}
+\DescribeMacro{\maskCiteauthorp}
+\DescribeMacro{\maskCiteauthort}
+\DescribeMacro{\masknocite}
+\DescribeMacro{\masktext}
+\mbox{}
+
+%% \DescribeMacro{\maskcite}
+%% \DescribeMacro{\maskcitefullauthor}
+%% \DescribeMacro{\maskCitefullauthor}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\section{Contents of the bibliography database file}
+\label{sec:bib}
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+The information that is used by \LaTeX/\BibTeX{} to generate
+the citations and reference list must be stored by the user in one
+or more files with the \fname{.bib} extension.
+A detailed overview of the contents of the \fname{.bib} file is
+given in \citeA[section~12.2]{KoDa04} and \citeA[section~13.2]{TLC2}.
+Roughly speaking, the
+\fname{.bib} file consists of a collection of \emph{entries}
+of the form
+\mbox{}\vspace{0.7\baselineskip}\\
+\verb+@+\opt{entryname}\verb+{+\opt{contents}\verb+}+
+\mbox{}\vspace{0.7\baselineskip}\\
+Most entries describe a work that may be referenced, e.g., a book
+or article. There are, however, two exceptions: a \entryname{preamble}
+entry (with \opt{entryname} = \verb+preamble+) and a \entryname{string}
+entry (with \opt{entryname} = \verb+string+). There is typically
+at most one \entryname{preamble} entry. Its \opt{contents} consist of a
+string---according to \BibTeX, i.e., between double quotes (\verb+"+)
+or an additional pair of braces (\verb+{+ and \verb+}+). This
+string, which typically consists of \LaTeX{} commands like
+\verb+\newcommand{\SortNoop}[1]{}+, is literally included
+in the document before the bibliography. It can therefore be used
+to define commands that are used in the (other) entries of the
+\fname{.bib} file and that are not standard \LaTeX{}.
+
+A \entryname{string} entry is similar, but the contents are now not
+included in the document. Instead, the string is assigned to a kind of
+``variable'', the name of which may contain characters
+not usually associated with variable names, like colons and
+hyphens, see \citeA[p.~769]{TLC2}. An example of a
+\entryname{string} entry is
+\begin{verbatim}
+@string{ JPSP = {Journal of Personality and Social Psychology} }
+\end{verbatim}
+Then, if in a later entry, the journal is
+\emph{Journal of Personality and Social Psychology}, you can format this
+as
+\begin{verbatim}
+ journal = JPSP,
+\end{verbatim}
+instead of the usual
+\begin{verbatim}
+ journal = {Journal of Personality and Social Psychology},
+\end{verbatim}
+This is not only convenient because it saves typing of common
+long journal names (and reduces the likelihood of typos), but it can
+also be used to define style-specific variations. For example, some
+styles abbreviate journal names, such as
+\emph{J.~Pers.\ Soc.\ Psych.}\hbox{} instead of
+\emph{Journal of Personality and Social Psychology}.
+You could then put the definitions of all full journal names
+in one \fname{.bib} file (\fname{fulljou.bib}, say) and the definitions
+of the abbreviated journal names in another (\fname{abbrjou.bib}, say).
+Suppose that the information about the referenced works is stored in a
+third file, say, \fname{myrefs.bib}, and that the ``NotAPA''
+style rules, implemented in the \fname{notapa.bst} \BibTeX{} style file,
+require the abbreviated journal names. Then you can use
+\begin{verbatim}
+\bibliographystyle{notapa}
+\bibliography{abbrjou,myrefs}
+\end{verbatim}
+to obtain a reference list complying with the ``NotAPA'' rules. If
+you change your mind and decide to switch to using the rules of the
+APA manual, you only need to change the two lines above into
+\begin{verbatim}
+\bibliographystyle{apacite}
+\bibliography{fulljou,myrefs}
+\end{verbatim}
+(and additionally load the \fname{apacite.sty} \LaTeX{} package
+through \cmd{\usepackage}).
+
+The remaining entry types are types that correspond with the
+type of a referenced work, e.g., \entryname{book} or
+\entryname{article}. These entry types (reference types) are
+discussed in section~\ref{subsec:types} below.
+Such entries have the following structure:
+\mbox{}\vspace{0.7\baselineskip}\\
+\verb+@+\opt{entryname}\verb+{+\opt{key}\verb+,+\\
+$\mbox{}\qquad$\opt{fieldname1}\verb+ = +\opt{value1}\verb+,+\\
+$\mbox{}\qquad$\opt{fieldname2}\verb+ = +\opt{value2}\verb+,+\\
+$\mbox{}\qquad\qquad\vdots$\\
+$\mbox{}\qquad$\opt{fieldnameN}\verb+ = +\opt{valueN}\verb+,+\\
+\verb+}+
+\mbox{}\vspace{0.7\baselineskip}\\
+where \opt{key} corresponds to the key used in the citation
+commands and matches the entry with the citation (and should
+therefore be unique). The fieldnames are \verb+author+, \verb+year+,
+etc., which are described in section~\ref{subsec:fields} below.
+The values are strings, either defined previously by a
+\entryname{string} entry or explicitly indicated as such here
+by putting the relevant information between double quotes
+(\verb+"+) or a pair of braces (\verb+{+ and \verb+}+).
+
+To be able to obey the rules of the APA manual, \pkg{apacite}
+provides several fields and reference types that are not
+described in the standard \BibTeX{} documentation
+\cite<e.g.,>[Chapter~13]{TLC2}. Furthermore,
+the meaning and usage of many fields and reference types that
+\emph{are} described there have been altered somewhat. Therefore,
+a complete description is given here.
+The symbol \LC{} will be used to indicate that the field or
+reference type is also described in \citeA[Appendix~B]{LaTeXbook},
+\citeA[Chapter~12]{KoDa04}, or \citeA[Chapter~13]{TLC2}, although, as
+mentioned above, the specific meaning of the item may have been
+changed.
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\subsection{Types of references}
+\label{subsec:types}
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+In this section, the list of reference types that are recognized by
+\pkg{apacite} is given. An overview of which fields can be used for which
+reference type is given in Table~\ref{tab:fieldref}. If fields are not
+relevant, but you use them anyway in your \fname{.bib} file, they are ignored.
+The fields and their use are described in more detail in
+section~\ref{subsec:fields}, but here some specific issues will already be
+mentioned.
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\begin{table}[p]
+\centering
+\caption{List of fields that are used by the various reference types
+ (blank = not used; \X{} = used;
+ \Y{} = used, but only for citations; \A{} = only used by
+ \pkg{apacann} and \pkg{apacannx}).}
+\label{tab:fieldref}
+\small
+\makebox[0pt]{% some manipulation to squeeze the table onto the page
+\newlength{\oldtabcolsep}
+\setlength{\oldtabcolsep}{\tabcolsep}
+\setlength{\tabcolsep}{2pt}
+\begin{tabular}{@{}l@{}cccccccccc@{}}
+\hline
+ & \multicolumn{10}{c}{Reference type}\\
+ \cline{2-11}
+%
+% Normally, I would use the sideways environment of the rotating
+% package to format this nicely, but I do not want to require
+% other packages to format this document, so I choose an uglier
+% solution here.
+%
+ & article\\
+ & magazine & & & & &
+ & phdthesis
+ &
+ & manual\\
+Field
+ & newspaper & book & incollection & techreport & intechreport & lecture
+ & mastersthesis
+ & unpublished
+ & misc
+ & literal\\
+\hline
+address & &\X&\X&\X&\X&\X&\X&\X&\X& \\
+annote &\A&\A&\A&\A&\A&\A&\A&\A&\A&\A\\
+annotate &\A&\A&\A&\A&\A&\A&\A&\A&\A&\A\\
+author &\X&\X&\X&\X&\X&\X&\X&\X&\X& \\
+booktitle & & &\X& &\X& & & & & \\
+chair & & & & & &\X& & & & \\
+chapter & & &\X& & & & & & & \\
+day &\X& &\X&\X&\X&\X& &\X&\X& \\
+doi &\X&\X&\X&\X&\X&\X&\X&\X&\X&\X\\
+edition & &\X&\X&\X&\X& &\X& &\X& \\
+editor &\X&\X&\X&\X&\X& & &\X&\X& \\
+englishtitle &\X&\X&\X&\X&\X&\X&\X&\X&\X& \\
+firstkey &\Y&\Y&\Y&\Y&\Y&\Y&\Y&\Y&\Y&\Y\\
+howpublished &\X&\X&\X&\X&\X&\X&\X&\X&\X& \\
+institution & & & &\X&\X& & & & & \\
+journal &\X& & & & & &\X& & & \\
+key &\Y&\Y&\Y&\Y&\Y&\Y&\Y&\Y&\Y&\Y\\
+lastchecked &\X&\X&\X&\X&\X&\X&\X&\X&\X& \\
+month &\X& &\X&\X&\X&\X& &\X&\X& \\
+note &\X&\X&\X&\X&\X&\X&\X&\X&\X& \\
+number &\X&\X& &\X&\X& &\X&\X&\X& \\
+organization & & & & & & & &\X& & \\
+originaladdress &\X&\X&\X& &\X& & & & & \\
+originalbooktitle &\X&\X&\X& &\X& & & & & \\
+originaledition &\X&\X&\X& &\X& & & & & \\
+originaleditor &\X&\X&\X& &\X& & & & & \\
+originaljournal &\X&\X&\X& &\X& & & & & \\
+originalnumber &\X&\X&\X& &\X& & & & & \\
+originalpages &\X&\X&\X& &\X& & & & & \\
+originalpublisher &\X&\X&\X& &\X& & & & & \\
+originalvolume &\X&\X&\X& &\X& & & & & \\
+originalyear &\X&\X&\X&\Y&\X&\Y&\X&\Y&\Y&\Y\\
+pages &\X& &\X& &\X& &\X& & & \\
+publisher & &\X&\X& & & & & &\X& \\
+school & & & & & & &\X& & & \\
+series & & & & & & & & & & \\
+symposium & & & & & &\X& & & & \\
+text & & & & & & & & & &\X\\
+title &\X&\X&\X&\X&\X&\X&\X&\X&\X& \\
+translator &\X&\X&\X&\Y&\X&\Y&\Y&\Y&\Y&\Y\\
+type &\X&\X&\X&\X&\X&\X&\X&\X&\X& \\
+url &\X&\X&\X&\X&\X&\X&\X&\X&\X& \\
+urldate &\X&\X&\X&\X&\X&\X&\X&\X&\X& \\
+volume &\X&\X&\X&\X&\X& &\X& &\X& \\
+year &\X&\X&\X&\X&\X&\X&\X&\X&\X&\Y\\
+\hline
+\end{tabular}%
+\setlength{\tabcolsep}{\oldtabcolsep}
+}
+%
+\end{table}
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+The following entry types (reference types) are defined in \pkg{apacite}:
+\begin{description}
+ \item[\entryname{article}\LC] \mbox{}\\
+ A journal article or comparable. If the
+ ``article'' referenced to is a special issue of a journal or
+ something else that has editors instead of authors, the
+ \fieldname{author} field should be empty and the \fieldname{editor}
+ field should be used for the editors. If the journal paginates
+ by issue instead of by volume, or when you are referring to a
+ whole special issue, the issue number should be given
+ in the \fieldname{number} field. In all other cases (including
+ referring to an article within a special issue), the
+ \fieldname{number} field must not be used. The \fieldname{type}
+ field can be used to denote the type of article, for example,
+ ``\verb+Letter to the editor+'', or
+ ``\verb+Review of the book \emph{Life in the middle}+''.
+
+ \item[\entryname{magazine}] \mbox{}\\
+ A magazine article. Unlike in early versions of \pkg{apacite},
+ this is now equivalent to \entryname{article}. However, with
+ an \entryname{article}, the \fieldname{month} and \fieldname{day}
+ fields should generally not be used, unless there is a compelling
+ reason to use them. For a magazine, the \fieldname{month}, and
+ \fieldname{day} (for weeklies) fields are commonly used.
+
+ \item[\entryname{newspaper}] \mbox{}\\
+ A newspaper article. This is similar to \entryname{article} and
+ \fieldname{magazine}, except that the pages are formatted a little
+ different, with ``pp.~23--49'' instead of just ``23--49''.
+
+ \item[\entryname{book}\LC] \mbox{}\\
+ An entire book. The \fieldname{type} field can be used
+ to denote a specific type of item (so generally not strictly
+ a book), e.g., ``\verb+Brochure+''. Similarly, the
+ \fieldname{number} field can be used if this is considered
+ useful. (It is used in example 24 in the APA manual, see
+ below.) This seems quite rare to me, however. It should
+ certainly \emph{not} be used for ISBN numbers and the like.
+
+ \item[\entryname{incollection}\LC] \mbox{}\\
+ An article in a (usually edited) book, or other kind of larger
+ work, except a report, for which the \entryname{intechreport}
+ entry is used. The \fieldname{booktitle} field contains the
+ title of the whole collection (book). The \fieldname{type}
+ field is currently used to denote the type of article, as
+ with the \entryname{article} reference type, although in some
+ cases, it may be more naturally to let the \fieldname{type}
+ field contain the type of the whole work (e.g., CD). Therefore,
+ I may change this somewhat in future versions of \pkg{apacite}.
+
+ \item[\entryname{techreport}\LC] \mbox{}\\
+ A report. This may be a ``technical'' report such as published
+ by universities, or a report from government organizations or
+ private companies. The \fieldname{type} field can be used to
+ indicate what kind of report it is, e.g.,
+ ``\verb+College Board Rep.+'' or ``\verb+{DHHS} Publication+''.
+ If the \fieldname{type} field is missing, the default type
+ ``\verb+Tech.\ Rep.\hbox{}+'' is used. (The \verb+\hbox{}+
+ ensures that \TeX{} does not view the period as the end of a
+ sentence, which would insert too much space.) If no type
+ description should
+ be given, \verb+\bibnotype+ should be used as the contents of
+ the \fieldname{type} field. The \fieldname{number} field can
+ be used to give the report number. The organization that
+ published the report should be given in the \fieldname{institution}
+ field.
+
+ \item[\entryname{intechreport}] \mbox{}\\
+ An article in a (usually edited) report. This is more or less
+ a combination of \entryname{incollection} and
+ \entryname{techreport}. It uses the same fields as the former
+ to describe the article itself, except \fieldname{type}, e.g.,
+ \fieldname{booktitle}, which is in this case the title of the
+ entire report,
+ and the same fields as the latter to describe the report.
+ In particular, the \fieldname{type}, \fieldname{number},
+ and \fieldname{institution} fields are used for the report.
+
+ \item[\entryname{lecture}] \mbox{}\\
+ A paper presented at a meeting. According to the APA manual,
+ the year and month should be given, but \pkg{apacite} also
+ uses the \fieldname{day} field when available.
+ The \fieldname{symposium} field can be used for the
+ name of the symposium and the \fieldname{chair} field for the chair of
+ the meeting. The \fieldname{howpublished} field should be used to
+ indicate the occasion at which the paper was presented if the
+ \fieldname{symposium} field is empty, e.g.,
+ ``\texttt{Paper presented at the meeting of the American
+ Professional Society on the Abuse of Children}''.
+ It can also be used to give additional information about
+ the symposium if the \fieldname{symposium} field is not empty.
+
+ \item[\entryname{phdthesis}\LC] \mbox{}\\
+ A doctoral dissertation. The \fieldname{school} field is used
+ to denote the university for which the thesis was written.
+ The \fieldname{type} field can be used for the thesis type,
+ e.g., ``\verb+PhD thesis+''. If it is empty, the default type
+ is used, which is ``\verb+Unpublished doctoral dissertation+''
+ or ``\verb+Doctoral dissertation+'', depending on whether
+ the \fieldname{journal} field is empty or not.
+
+ If the thesis is abstracted in \emph{Dissertation Abstracts
+ International} or similar, then the \fieldname{journal},
+ \fieldname{volume}, \fieldname{number}, and \fieldname{pages} fields
+ can be used as with journal articles. The \fieldname{year} field
+ should denote the year of the ``journal''.
+ The \fieldname{originalyear} field should be used to denote the year
+ of the original thesis, even if it is the same as the year of the
+ abstract, provided that the original thesis is used, and not
+ the abstract. Then, the \fieldname{school} field should also
+ be used, and optionally the \fieldname{type} field. If only
+ the abstract is used, it should presumably be treated as a
+ journal article.
+
+
+ \item[\entryname{mastersthesis}\LC] \mbox{}\\
+ This is equivalent to the \entryname{phdthesis} type, except that
+ the default ``unpublished'' and ``published'' \fieldname{type}s are
+ ``\verb+Unpublished master's thesis+'' and
+ ``\verb+Master's thesis+''.
+
+ \item[\entryname{unpublished}\LC] \mbox{}\\
+ For unpublished manuscripts and similarly ``obscure'' material.
+ The \fieldname{howpublished} field will typically be used to
+ indicate what kind of work is referred to (e.g.,
+ ``\verb+Unpublished manuscript+''). The \fieldname{organization}
+ field can be used to denote the organization in which the document
+ was produced, e.g., ``\texttt{Johns Hopkins University, Center
+ for Social Organization of Schools}''. Note that the larger
+ organization should be given first and the department after that.
+ The address (city and state, etc., see the discussion of the
+ \fieldname{address} field in section~\ref{subsec:fields} below)
+ of the organization should be given in the \fieldname{address}
+ field, unless it is already mentioned in the name of the
+ organization. Presumably, if the organization is
+ ``\verb+University of Groningen+'', the city name ``Groningen''
+ should not be given in the \fieldname{address} field, but
+ the country ``The Netherlands'' should. When both the
+ \fieldname{organization} and the \fieldname{address} field
+ are available, \pkg{apacite} formats these as
+ ``organization, address''. This is different from the
+ usual ``address: publisher'' form. This behavior cannot
+ explicitly be deduced from the 5th edition, nor from the
+ 4th edition, of the APA manual, but the 3rd edition
+ \cite{APAManual3} gives an explicit example (example 53,
+ p.~131): \citeA{APA-3rd-ed-ex53}.
+
+ \item[\entryname{misc}\LC] \mbox{}\\
+ For works that do not fit into the other categories, such as
+ motion pictures, cassette recordings, computer software, etc.
+ The \fieldname{type} field can be used to indicate the type
+ of work, and \pkg{apacite} recognizes a few specific types
+ that should be formatted a little differently, see the discussion
+ of the \fieldname{type} field below. If the \fieldname{address}
+ and \fieldname{publisher} fields are available, the address and
+ publisher part is formatted as with books. The \entryname{unpublished}
+ and \entryname{misc} types are very similar, but there are some
+ differences. For example, \entryname{unpublished} uses the
+ \entryname{organization} field and \entryname{misc} uses the
+ \fieldname{publisher} field, and this part is formatted differently.
+ Further, the \entryname{unpublished} type requires
+ \fieldname{author}, \fieldname{editor}, \fieldname{title}, or
+ \fieldname{type}, whereas with \fieldname{misc},
+ \fieldname{howpublished} takes the first position if these fields
+ are all empty. Finally, as briefly indicated above and discussed
+ in more detail below, \entryname{misc} recognizes some special
+ types in the \fieldname{type} field.
+
+ \item[\entryname{literal}] \mbox{}\\
+ If the other categories do not format the item correctly, this
+ category can be used. The \fieldname{text} field is copied literally
+ to the bibliography. The \fieldname{firstkey}, \fieldname{key},
+ \fieldname{year}, and possibly \fieldname{originalyear} and
+ \fieldname{translator} fields are necessary to get correct
+ in-text citations. However, I have never needed to use this
+ entry type and I think that \entryname{misc} should also
+ be able to format the entry correctly. Furthermore, the
+ correct placement of \entryname{literal} references in the
+ reference list (alphabetizing, sorting), may be problematic.
+
+ \item[\entryname{manual}\LC] \mbox{}\\
+ This is treated as a \entryname{misc}, except that when the
+ \fieldname{type} field is empty, it is assumed to be a
+ \cmd{\bibcomputersoftwaremanual}. See also the description of
+ the \fieldname{type} field below.
+
+ \item[\entryname{booklet}\LC]
+ \item[\entryname{inbook}\LC]
+ \item[\entryname{inproceedings}\LC]
+ \item[\entryname{proceedings}\LC] \mbox{}\\
+ These categories are defined by all standard citation styles. They
+ are, however, not needed for the examples in the APA manual. For
+ compatibility, however, they are included and defined as follows:
+ \entryname{booklet} = \entryname{proceedings} =
+ \entryname{misc}; \entryname{inbook} = \entryname{inproceedings} =
+ \entryname{incollection}. \citeA[p.~230]{KoDa04} also mention
+ \entryname{conference} as being the same as \entryname{inproceedings};
+ for compatibility, this is now supported in \pkg{apacite}.
+\end{description}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\subsection{Fields}
+\label{subsec:fields}
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+The following fields can be used to describe a reference in the
+\fname{.bib} file:
+\begin{description}
+
+ \item[\fieldname{address}\LC] \mbox{}\\%
+ The address (usually the city and state or country) of the
+ publisher, school, institution, or organization that published
+ the item or at which the item was produced. The APA manual
+ requires that the state or territory of a U.S.-city must be given
+ in the official two-letter U.S. Postal Services form.
+
+ \item[\fieldname{annote}\LC]
+ \item[\fieldname{annotate}\LC] \mbox{}\\
+ These are used with the \pkg{apacann} and \pkg{apacannx} bibliography
+ styles to generate annotated bibliographies, see
+ section~\ref{sec:annotate}. They are simply ignored without warning by
+ the \pkg{apacite} and \pkg{apacitex} bibliography styles.
+
+ \item[\fieldname{author}\LC] \mbox{}\\
+ The author(s) of the work. This may also be a corporate
+ author when applicable, but some specific measures must
+ then be taken to prevent the corporate name from being
+ interpreted as a first name and last name
+ (such as ``Association, A. P.''):
+\begin{verbatim}
+ author = {{\bibcorporate{American Psychological Association}}},
+\end{verbatim}
+ It is important to surround the \cmd{\bibcorporate}\marg{Author}
+ by an additional pair of braces. Otherwise, \BibTeX{} sorts
+ the entry as if its name was ``Bibcorporate\marg{Author}''.
+ Section~\ref{sec:xmpl} contains more examples.
+
+ As discussed in the standard \BibTeX{} documentation,
+ multiple authors must be separated by the word \verb+and+,
+ and each author's name can either be given in the form
+ ``\opt{firstnames}\verb+ +\opt{lastnames}'' or
+ ``\opt{lastnames}\verb+, +\opt{firstnames}''. However,
+ ``von'' parts and ``junior'' parts complicate issues
+ a bit. See the examples and the discussion of them.
+
+ I would generally give the full first name(s) in the \fname{.bib}
+ file, even though the APA manual only requires initials,
+ because other styles require full first name(s) and
+ \pkg{apacite} abbreviates to initials automatically.
+ I have done this only occasionally with the examples,
+ because the APA manual only gives the initials.
+ Therefore, I have only provided first names with a few
+ examples for which I knew the authors' first names.
+
+ Previous versions of the APA manual required that, if there
+ are more than six authors, only the first six should be named
+ in the reference list, followed by ``et al.'', which allowed
+ one to include only the first six plus ``|and others|'' in the
+ \fname{.bib} file. In the 6th edition, however, the APA changed
+ this. Now, when there are up to seven authors, they should
+ all be listed, but with eight or more, the first six should
+ be listed, plus dots (\ldots), plus the last author. Therefore,
+ ``|and others|'' should not be used anymore in the \fname{.bib}
+ file. (It was already discouraged in earlier versions of the
+ \pkg{apacite} documentation.) Thus, one should list all authors
+ in the \fname{.bib} file.
+
+ \item[\fieldname{booktitle}\LC] \mbox{}\\
+ The title of the larger work, typically book, but sometimes
+ something else, like a report, in which the referenced item
+ (article) was published.
+
+ \item[\fieldname{chair}] \mbox{}\\
+ The chair(s) of a symposium or meeting. Used for lectures.
+ It is formatted the same way as editors.
+
+ \item[\fieldname{chapter}\LC] \mbox{}\\
+ The chapter number if the referenced item is a chapter in
+ a larger collection. Typically used if the referenced work
+ is a chapter in an internet document. If the collection is
+ a book, page numbers (in the \fieldname{pages} field)
+ should be used instead according to the APA rules.
+
+ \item[\fieldname{crossref}\LC] \mbox{}\\
+ The \pkg{apacite} package does not recognize this field,
+ because the APA manual does not discuss explicit
+ cross-referencing. If the referenced work is a chapter
+ (article) in an edited book, all relevant information
+ should be given in the reference list as part of the
+ information about the referenced chapter, not as, e.g.,
+ ``In Wainrib (1992)''. If several chapters from the
+ book edited by Wainrib are referenced, the same information
+ about this book is given with each referenced chapter,
+ and the work itself is not a separate entry in the reference
+ list (unless it is explicitly referred to).
+
+ However, the \fieldname{crossref} field
+ \emph{can} be used, as part of standard \BibTeX{} usage.
+ Missing fields for the referenced work are then copied from
+ the cross-referenced entry, which must come \emph{after}
+ the referring entry in the \fname{.bib} file. If you use
+ this, remember to put the title of the book (also) in the
+ \fieldname{booktitle} field, because the \fieldname{title}
+ field of the referring entry is not empty (it contains
+ the chapter title).
+
+ I have not tested cross-referencing in detail, so I do not
+ know whether it behaves well (i.e., complies with the implicit
+ or explicit APA rules) under various circumstances.
+ Therefore, I do not recommend using it without thorough
+ testing.
+
+ \item[\fieldname{day}] \mbox{}\\
+ The day of the month on which the referenced item was published,
+ produced, or presented. Mainly used for articles in daily or
+ weekly magazines or newspapers, for lectures (although the
+ APA manual only specifies the month), and electronic documents.
+
+ \item[\fieldname{doi}] \mbox{}\\
+ Digital object identifier (DOI). The 6th edition of the APA manual
+ asks authors to supply this whenever available.
+
+ \item[\fieldname{edition}\LC] \mbox{}\\
+ The edition of the book or report. Traditionally, this is of the
+ form ``1st'', ``2nd'', ``3rd'', etc., or ``Rev.'' for a revised edition.
+ This form is still supported, but \pkg{apacite} now also supports
+ the form in which only the number is given: ``1'', ``2'', etc.
+ If \pkg{apacite} detects that only a number is given, it inserts
+ ``\cmd{\PrintOrdinal}\marg{number}'' in the \fname{.bbl} file.
+ This \LaTeX{} function converts the number again to ``1st'', etc.
+ The advantage of this is that the same bibliography database can be
+ used for documents in different languages: In the language-specific
+ (\fname{.apc}) files supplied with \pkg{apacite},
+ \cmd{\PrintOrdinal} is redefined according to the document
+ language.
+
+ \item[\fieldname{editor}\LC] \mbox{}\\
+ The editor(s) of a book, report, or special issue of a journal.
+ In the examples, this field is also ``misused'' for the
+ producer of a television series.
+
+ \item[\fieldname{englishtitle}] \mbox{}\\
+ The English translation of the title of an item with a non-English
+ title. The APA manual requires that if the referenced work has a
+ non-English title, an English translation should be given as well. For
+ an article in a journal with a non-English name or in a book with a
+ non-English title, the journal name or book title should not be
+ translated or put in this field, only the title of the referenced work
+ itself must be translated. Because, as of version
+ \APACversiondate{2005/06/01}, \pkg{apacite} contains some support of
+ other languages for the main document (see
+ section~\ref{sec:compat-babel}), this field needs rethinking, which
+ will be deferred to a future version (but, as always, suggestions
+ are welcome).
+
+ \item[\fieldname{firstkey}] \mbox{}\\
+ The \fieldname{firstkey} field, if not empty, is used as
+ ``author'' for the first citation to an item. Subsequent citations
+ then use the \fieldname{key} field. This can be used if there is
+ no author or editor field that can be used for citations, or in
+ certain cases with corporate authors, where the citation in the
+ text uses an abbreviation of the author's name for second and
+ subsequent citations, where the abbreviation is introduced in the
+ first citation. It can also be used to ``trick'' the system
+ in difficult cases. See also \fieldname{key}.
+
+ \item[\fieldname{howpublished}\LC] \mbox{}\\
+ A description of how something was ``published''. For example,
+ ``Unpublished manuscript'' or ``Paper presented at the meeting
+ of the American Professional Society on the Abuse of Children''.
+ Also used for more retrieval information about electronic
+ documents, e.g., ``Retrieved November 19, 2000, from the
+ PsycARTICLES database'', or
+\begin{verbatim}
+ howpublished = {Retrieved August 24, 2000, from Columbia University,
+ Institute for Learning Technologies Web site:
+ \url{http://www.ilt.columbia.edu/
+ publications/papers/newwine1.html}\bibnodot{.}}
+\end{verbatim}
+ However, if the retrieval information consists only of a
+ date and/or a URL, it is better to use the \fieldname{lastchecked}
+ and \fieldname{url} fields for this and let \pkg{apacite}
+ format this information. See also the \fieldname{note} field
+ for an alternative to the \fieldname{howpublished} field.
+
+ \item[\fieldname{institution}\LC] \mbox{}\\
+ The institution, university, or company that published a
+ (technical) report.
+
+ \item[\fieldname{journal}\LC] \mbox{}\\
+ The journal, magazine, newspaper, etc.{} in which an
+ article, a review, or an abstract of a thesis was published.
+
+ \item[\fieldname{key}\LC] \mbox{}\\
+ See \fieldname{firstkey}. The \fieldname{key} field, if not
+ empty, is used for second and subsequent citations, or all citations
+ if \fieldname{firstkey} is missing. If \fieldname{author} is
+ empty and \fieldname{editor} is empty or can not be used as
+ author (e.g., in \entryname{incollection}), the \fieldname{key}
+ field may be necessary to obtain a useful citation. This is
+ so, because the APA manual requires an abbreviation of the
+ title as in-text citation, and the abbreviation must be
+ sensible. In the current version, \pkg{apacite} uses the
+ whole title if \fieldname{firstkey} and \fieldname{key} are missing.
+ Therefore, if the title is considered too long to use in citations,
+ the user must provide an abbreviation in the \fieldname{key} field.
+ Furthermore, the user must then also define the formatting:
+ If the key is used for a difficult kind of author (e.g.,
+ corporate author), it should be formatted as an author,
+ i.e., in plain text, with names capitalized.
+ If the key is used for an abbreviation of an article
+ title, it should be in plain text, with major words capitalized
+ (unlike in the reference list), and between double quotes
+ (`` and ''; also unlike in the reference list).
+ If the key is used for an abbreviation of a book title, it
+ should be emphasized, with major words capitalized
+ (unlike in the reference list), but not between quotes.
+
+ In a field in the \fname{.bib} file that is also
+ used for the citations, such as the \fieldname{key} field,
+ formatting through, e.g.,
+\begin{verbatim}
+ key = {{\itshape Text}},
+ key = {{\em Text\/}},
+\end{verbatim}
+ can be done (note the extra pair of braces!), but the
+ seemingly more logical variations
+\begin{verbatim}
+ key = {\textit{Text}},
+ key = {{\textit{Text}}},
+ key = {\emph{Text}},
+ key = {{\emph{Text}}},
+\end{verbatim}
+ do not work.
+ However, it is generally preferable to use as less explicit
+ formatting in the \fname{.bib} files as possible, because this
+ decreases the possibilities of successfully using the
+ same \fname{.bib} file with other styles. The following works
+ excellent:
+\begin{verbatim}
+ key = {{\APACcitebtitle{Text}}},
+\end{verbatim}
+ where the \cmd{\APACcitebtitle} macro recognizes that the argument
+ should be formatted as a booktitle (i.e., in italics according to the
+ APA rules). This macro, and its companion \cmd{\APACciteatitle} for
+ article title formatting, are used by \pkg{apacite} if the
+ \fieldname{firstkey} and \fieldname{key} fields are missing,
+ but can also be used by the user. Note that if you use such a
+ \fname{.bib} file with another style, you have to provide
+ definitions of these macros yourself (which can be copied from
+ the \pkg{apacite} source code).
+
+ \emph{Warning:} the \fieldname{key} field, which acts
+ as a kind of pseudo-author, should not be confused with the
+ (citation) \opt{key} that is used to match citations with
+ entries in a \fname{.bib} file.
+
+ \item[\fieldname{lastchecked}] \mbox{}\\
+ The date on which a web page was last visited. Only used in
+ combination with the \fieldname{url} field. Currently,
+ \pkg{apacite} does not contain language-specific code to
+ dissect this date, but copies its contents literally to the
+ \fname{.bbl} file. Hence, if you intend to use the same
+ bibliography database for documents in different languages,
+ you may have to use a self-defined command for this. You can
+ use the \pkg{apacite} commands \cmd{\APACrefYearMonthDay}
+ and \cmd{\APACmonth} as templates for this. I will probably
+ provide such a facility in a future version of \pkg{apacite}.
+
+ \item[\fieldname{month}\LC] \mbox{}\\
+ The month something was published. Mainly used for
+ magazine or newspaper articles, lectures, and electronic documents.
+ Use the month macros \verb+jan+, \verb+feb+, etc. These are
+ predefined strings in the \fname{.bst} files, reverting to
+ ``\verb+{\APACmonth{01}}+'', etc. You can also use the additional
+ macros \verb+winter+, \verb+spring+, \verb+summer+, and \verb+fall+,
+ which the \fname{.bst} files translate into
+ ``\verb+{\APACmonth{13}}+''--``\verb+{\APACmonth{16}}+''.
+ The \cmd{\APACmonth} command translates the numbers to the month or
+ season names. This system allows language-specific behavior at
+ the \LaTeX{} stage.
+
+ \item[\fieldname{note}\LC] \mbox{}\\
+ A note. This puts additional information between parentheses
+ at the end of a reference list entry. In the examples from
+ the APA manual, it is used for NTIS No., ERIC No., and UMI No.,
+ and for notes about how to obtain the work
+ (``Available from \opt{organization}, \opt{full address}'').
+ If however, the work has been obtained from the internet
+ or from an ``aggregated database'', then the
+ \fieldname{howpublished} or \fieldname{url} field should be
+ used, because it should not be between parentheses then.
+
+ Finally, the \fieldname{note} field is used to give the
+ recording date (i.e., year) of a song when this is different
+ from the date (year) of copyright. The latter should be
+ put in the \fieldname{year} field.
+
+ Do not use the \fieldname{note} field to denote the original
+ publication of a reprint or translation, because the
+ \fieldname{originalyear} field must be used in those cases to
+ obtain the correct citation in the text \cite<e.g.,>{ex39}.
+
+ \item[\fieldname{number}\LC] \mbox{}\\
+ The number of a journal issue or a report. This can be quite
+ complex, for example, ``\verb+PRM~92-01+'', or
+ ``\verb+3, Pt.~2+'', or ``\verb+1, Serial No.~231+''.
+ These latter examples imply that the generality (language and
+ style independence) of the \fname{.bib} file is somewhat lost.
+ Furthermore, if the journal paginates by year and not by issue,
+ the issue number should not be mentioned at all (except when
+ referring to a whole special issue). Of course, \pkg{apacite}
+ does not know whether the journal paginates by issue or by year.
+ If the \fieldname{number} field is available, \pkg{apacite}
+ simply assumes that it should be included. It is the user's
+ responsibility to ensure that this is indeed the case.
+
+ \item[\fieldname{organization}\LC] \mbox{}\\
+ Used for the \entryname{unpublished} reference type to denote
+ the organization in which the unpublished work was produced.
+
+ \item[\fieldname{originaladdress}]
+ \item[\fieldname{originalbooktitle}]
+ \item[\fieldname{originaledition}]
+ \item[\fieldname{originaleditor}]
+ \item[\fieldname{originaljournal}]
+ \item[\fieldname{originalnumber}]
+ \item[\fieldname{originalpages}]
+ \item[\fieldname{originalpublisher}]
+ \item[\fieldname{originalvolume}]
+ \item[\fieldname{originalyear}] \mbox{}\\
+ These (\fieldname{original*-}) fields have the same
+ meaning as their counterparts without the ``original'' prefix,
+ except that they refer to the book or journal in which the
+ work was originally published. This can be used in referring to
+ translations or reprints of articles in journals or books. If the
+ original work is a book or other ``standalone'' work,
+ only the \fieldname{originalyear} field should be used. If the
+ original work is a (PhD or Master's) thesis that is also abstracted
+ in \emph{Dissertation Abstracts International},
+ \emph{Masters Abstracts International}, or comparable, the
+ \fieldname{originalyear} field should be used to denote the year
+ of the dissertation and the \fieldname{year} field to
+ denote the year of publication of the abstract, even if they
+ are the same.
+
+ \item[\fieldname{pages}\LC] \mbox{}\\
+ The (inclusive) page numbers of the article that is referred to,
+ in the journal or book in which it was published. If a range of
+ pages is given (which is usually the case), an en-dash should
+ be used: ``\verb+29--43+''. Other styles sometimes allow a
+ single hyphen (``\verb+29-43+''), which is then automatically
+ formatted as an en-dash (``29--43''), rather than as a hyphen
+ (``29-43''), but I have encountered situations, such as software
+ manuals (LISREL) and reports for the U.S. Government, in which
+ the page number was of the form ``II-3'',
+ meaning page~3 of chapter~2. In such a situation, you may
+ get page numbers like ``II-1--II-15'', where the distinction
+ between a hyphen and an en-dash becomes important. Therefore,
+ \pkg{apacite} does not perform such automatic transformations.
+
+ \item[\fieldname{publisher}\LC] \mbox{}\\
+ The publisher of the item. Primarily used for books.
+
+ \item[\fieldname{school}\LC] \mbox{}\\
+ The school or university for which a PhD thesis or
+ master's thesis was written.
+
+ \item[\fieldname{series}\LC] \mbox{}\\
+ Not used, although the APA manual has a rule for series.
+ If you refer to a volume in a series, the series title,
+ volume number, and volume title should be joined into
+ a two-part title , e.g., \emph{Handbook of child psychology:
+ Vol.~4. Socialization, personality, and social development},
+ see ex.~36. In \pkg{apacite} this whole part must be put in
+ the \fieldname{title} or \fieldname{booktitle} field
+ (whichever is appropriate).
+
+ For a long time, I have intended to support the
+ \fieldname{series} field to allow disentangling such
+ situations. However, in the end, I have decided not to
+ do this. The reason for this is that, according to my
+ interpretation, the meaning of ``series'' in the APA manual
+ is quite different from the meaning of the \fieldname{series}
+ field, as intended by Oren Patashnik (the author of \BibTeX{}
+ and the original style files). Many books are published in
+ some sort of series. For example, my book with Tom Wansbeek
+ \cite{WaMe00}, is vol.~37 in the \emph{Advanced Textbooks
+ in Economics} series, of which the series editors are
+ C.~J. Bliss and M.~D. Intriligator. The intention of the
+ \fieldname{series} field is to generate a reference list entry
+ like
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\begin{list}{\relax}{\labelsep=0em%
+ \parsep=0pt%
+ \itemsep=0pt plus .3pt\relax%
+ \leftmargin=2.5em%
+ \itemindent=-2.5em}%
+\sloppy\clubpenalty4000\widowpenalty4000
+\sfcode`\.=1000\relax
+\item
+Wansbeek, T., \& Meijer, E.
+\unskip\ \hskip .11em plus .33em minus .07em
+(2000).
+\unskip\ \hskip .11em plus .33em minus .07em
+\Bem{Measurement error and latent variables in econometrics}
+(Advanced Textbooks in Economics No.~37).
+\unskip\ \hskip .11em plus .33em minus .07em
+Amsterdam: North-Holland.
+\end{list}
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ In economics (and often in psychology, I guess), mentioning
+ the series usually does not add much relevant information,
+ and it is therefore typically omitted. I think this is how
+ the APA intends it as well. However, in computer science, it
+ is often very convenient, because certain series, like Springer's
+ \emph{Lecture Notes in Computer Science} (LNCS) have a certain
+ status of their own, and researchers know how to find volumes
+ in this series.
+
+ In my interpretation, the APA ``series'' refers to a single
+ multivolume work with separate editors for the constituent
+ volumes, but with a series editor who initiates the whole
+ series. In the example from the APA manual, the
+ \emph{Handbook of child psychology} is not a loose collection
+ of separate books by different authors, but a combined effort
+ managed by the series editor to give an overview of the field.
+ In this case, the series editor may be considered the primary
+ author and it makes sense to have the different volumes of the
+ series together in the reference list. With my book with
+ Tom Wansbeek, the series editors act more like journal editors,
+ and different volumes of the series are unrelated books that
+ do not need to be gathered together in the reference list.
+ It would make no sense to cite this book as
+ ``Bliss, Intriligator, Wansbeek, \& Meijer (2000)''.
+
+ Because in my interpretation, the usual meaning of the
+ \fieldname{series} field should not be included in the
+ reference list according to the APA rules, \pkg{apacite}
+ ignores the \fieldname{series} field. Perhaps I'll
+ implement the APA manual ``series'' rules by introducing
+ a \fieldname{volumetitle} field, but this will further reduce
+ compatibility with other citation styles.
+
+ \item[\fieldname{symposium}] \mbox{}\\
+ The name of the symposium or meeting at which a
+ lecture was given. This is typically used for the
+ construction ``In \opt{chair} (Chair), \opt{symposium}'',
+ see ex.~51. I have never used it myself, however,
+ I always use the ``Paper presented \dots'' form,
+ which puts this information in the \fieldname{howpublished}
+ field.
+
+ \item[\fieldname{text}] \mbox{}\\
+ Used for items of type \entryname{literal}. This field contains
+ the complete literal text to be used in the bibliography.
+ I've never used it.
+
+ \item[\fieldname{title}\LC] \mbox{}\\
+ The title of the work.
+
+ \item[\fieldname{translator}] \mbox{}\\
+ The translator of a book or article. This should
+ be formatted in the same way as \fieldname{author} and
+ \fieldname{editor}. If the \fieldname{translator} and
+ \fieldname{editor} fields are identical, they are
+ formatted as if there were only an editor, except that the
+ editor receives the suffix ``(Ed. \& Trans.)'' instead of
+ just ``(Ed.)'', or similarly if there is more than 1 editor.
+
+ \item[\fieldname{type}\LC] \mbox{}\\
+ The type of \entryname{phdthesis} (e.g.,
+ ``Doctoral dissertation''), type of \entryname{article}
+ (e.g., ``Letter to the editor''), type of \entryname{techreport}
+ (e.g., ``DHHS Publication''), type of \entryname{book}
+ (e.g., ``Brochure''), type of \entryname{misc}
+ (e.g., ``Cassette recording''), and so forth.
+
+ With a review (which is typically an \entryname{article}),
+ the \fieldname{type} field contains a lot of information
+ and formatting, e.g.:
+\begin{verbatim}
+ type = {Review of the book {\APACcitebtitle{Life in the middle:
+ Psychological and social development in middle age}}},
+\end{verbatim}
+ where I used the \cmd{\APACcitebtitle} command introduced above in
+ the discussion of the \fieldname{key} field.
+
+ In one of the APA manual examples, I used the \fieldname{type}
+ field to give a description of the subject of an unpublished
+ raw data file (``Auditory response latencies in rat auditory
+ cortex''), leaving the \fieldname{title} field blank.
+
+ For most reference types, if the \fieldname{type} field
+ is missing, it is simply ignored and no type description
+ is given. For a \entryname{techreport}, however, if the
+ \fieldname{type} field is missing, the default type
+ (``Tech.\ Rep.\hbox{}'') is inserted. In ex.~42 of the APA manual,
+ a report without a type description is given. To make it
+ possible to format a report successfully without a
+ type description, \pkg{apacite} recognizes
+\begin{verbatim}
+ type = {\bibnotype},
+\end{verbatim}
+ indicating that there should be no type description.
+
+ Another special purpose use of the \fieldname{type}
+ field is for a computer program, software, programming
+ language and/or manual. These are put into a \entryname{misc}
+ entry, but unlike other \entryname{misc} types (such as
+ motion pictures) the titles of these types should not
+ be italicized. This is now recognized by \pkg{apacite}
+ in the following way: When referring to a computer program,
+ software, programming language and/or manual, you should
+ use the \entryname{misc} reference type with
+ one of the following commands in the \fieldname{type} field:\\
+ \cmd{\bibcomputerprogram},\\
+ \cmd{\bibcomputerprogrammanual},\\
+ \cmd{\bibcomputerprogramandmanual},\\
+ \cmd{\bibcomputersoftware},\\
+ \cmd{\bibcomputersoftwaremanual},\\
+ \cmd{\bibcomputersoftwareandmanual}, or\\
+ \cmd{\bibprogramminglanguage}.\\
+ Using any of these commands as type designator of a
+ \entryname{misc} entry ensures that the title is not italicized,
+ as required. The \entryname{manual} entry is now equal to
+ \entryname{misc} with default type \cmd{\bibcomputersoftwaremanual}
+ if the \fieldname{type} field is empty.
+
+ Similarly, if you refer to a message that has been posted to
+ a newsgroup, internet forum, etc., you should use the
+ \entryname{misc} reference type with \cmd{\bibmessage} as
+ \fieldname{type} field.
+
+ \item[\fieldname{url}] \mbox{}\\
+ The web address of a document. Used if the cited document (or
+ other work) is a website or was obtained from a website. Long
+ web addresses can cause problems, because \BibTeX{} splits long
+ lines (more than 80 characters) in the \fname{.bbl} file and inserts
+ a \TeX{} comment (percent sign). In most situations, this works fine,
+ because the percent sign ``hides'' the line break, which would be
+ processed as an undesired space by \TeX{}. But within the argument of
+ a \cmd{\url} command, a percent sign is copied to the output, because
+ it is a valid character in a URL. To prevent this problem, insert
+ line breaks and/or spaces in the URL in the \fname{.bib} file:
+\begin{verbatim}
+ url = {ftp://ftp.princeton.edu/harnad/Psycoloquy/
+ 2000.volume.11/psyc.00.11.001.
+ language-sex-chromosomes.1.crow},
+\end{verbatim}
+ Then \BibTeX{} breaks lines at the spaces/line breaks if a line
+ break in the output is considered necessary (but not otherwise).
+ These spaces are suppressed by default in the output, which is usually
+ the desired behavior. But see the \pkg{hyperref} and \pkg{url}
+ documentation if you want this differently. Also note that in the
+ \fieldname{url} field, special characters like `|%|'
+ and `|#|' should be entered without a backslash, unlike the normal
+ situation if they would be used in the text.
+
+ \item[\fieldname{urldate}] \mbox{}\\
+ See \fieldname{lastchecked}. This one is apparently defined in the
+ \pkg{jurabib} package. It is unfortunate that different packages define
+ different fields for the same function.
+
+ \item[\fieldname{volume}\LC] \mbox{}\\
+ The volume or volumes of the referenced book(s) or
+ of the book in which the referenced article was published,
+ or the volume of the journal (magazine, newspaper, \ldots)
+ in which the referenced article was published.
+
+ \item[\fieldname{year}\LC] \mbox{}\\
+ The year in which the referenced item was published, or
+ if it was not published, the year in which it was written
+ or presented. For manuscripts or books that are accepted
+ for publication but have not yet been published, ``in press''
+ should be used according to the APA rules. The best way to do
+ this is to use the ``\cmd{\BIP}'' command, which can be redefined
+ by the user if the language or editorial style requires
+ something else than ``in press''. Furthermore, \cmd{\BIP}
+ is recognized by \pkg{apacite} and treated a little differently,
+ because for multiple ``in press'' references with the same
+ author(s), a hyphen (``-'') should be inserted between the
+ ``year'' (i.e., ``in press'') and the ``a'', ``b'', etc., that
+ follow it to distinguish the works, whereas this hyphen must
+ be omitted if the ``year'' is an ordinary year (1991a, 1991b).
+
+ If no date is explicitly given in (or on) the referenced work,
+ a ``n.d.'' (no date) should be given as year description.
+ For this, \pkg{apacite} supports the \cmd{\bibnodate}
+ command. This sometimes leads to different formatting as well,
+ e.g., by referencing a translation of a work of which there
+ is no original date. Then the \fieldname{originalyear}
+ field should be \cmd{\bibnodate} and the \fieldname{year} field
+ is then, e.g., \verb+1931+. If the \fieldname{translator}
+ field is not empty, the citation in the text is then formatted
+ as, e.g., ``\citeA{3.100-2}''.
+\end{description}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\subsection{Overriding the default sorting orders}
+\label{subsec:sort}
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+Occasionally, it may be necessary to override \BibTeX's default sorting.
+For example, the way \BibTeX{} handles accents and other nonstandard
+characters, which is typically fine for documents in English, may
+not be acceptable for documents in other languages:
+``\verb+\"{u}+'' is treated as ``\verb+u+'', ``\verb+\ss+'' is treated as
+``\verb+ss+'', and ``\verb+\ae+'' is treated as ``\verb+ae+''.
+In non-English languages this sorting may not be appropriate and one
+may desire that ``\verb+\"{u}+'' is treated as ``\verb+ue+''.
+Numerous problems are caused by different conventions in different languages.
+Some examples are given in the documentation of the \textsf{amsrefs}
+package. Non-latin scripts (Greek, Hebrew, Arabic, Chinese, etc.) may not be
+handled correctly as well. I am not able to judge this, nor does it seem
+to be a problem that must be solved in \textsf{apacite}. It has been
+announced that \BibTeX~1.0, when it will be released, will support
+non-English languages as well.
+
+An issue that occurs in English (APA) documents is that, according to
+the APA, numbers should be sorted as if they were spelled in words:
+``2003'' must be sorted as if it says ``\mbox{twothousandandthree}'';
+see example~4.04 in section~\ref{sec:xmpl} below.
+
+\DescribeMacro{\APACSortNoop}
+Overriding the default sorting order can be done by using the
+\cmd{\APACSortNoop} command in the \fname{.bib} file. This is a \LaTeX{}
+command provided by \pkg{apacite}. It has one mandatory argument, but it
+outputs nothing. However, \BibTeX{} does not know this and uses the
+contents of this command to sort the entry. For example,
+\begin{verbatim}
+ author = {M{\"{u}}ller, Gerd},
+\end{verbatim}
+is sorted as ``\verb*+muller g+'', whereas
+\begin{verbatim}
+ author = {{\APACSortNoop{Mueller}}M{\"{u}}ller, Gerd},
+\end{verbatim}
+is sorted as ``\verb*+muellermuller g+'', which typically results
+in the correct ordering. In the typeset document, both look like
+``M{\"{u}}ller''. Note that the extra pair of braces around the
+\cmd{\APACSortNoop} command are necessary to suggest to \BibTeX{}
+that it is an ``accent''. The specification
+\begin{verbatim}
+ author = {\APACSortNoop{Mueller}M{\"{u}}ller, Gerd},
+\end{verbatim}
+is sorted as ``\verb*+apacsortnoopmuellermuller g+'', which is
+incorrect.
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\section{Customization}
+\label{sec:custom}
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+The description in the previous sections, with the exception of
+section~\ref{sec:options}, primarily discussed the default behavior of
+\pkg{apacite}. However, as mentioned in the introduction, in addition to the
+options, \pkg{apacite} offers many possibilities for customization. Most
+punctuation used in the citations and reference list are implemented through
+\LaTeX{} commands instead of explicit symbols. Consequently, the user can
+fine-tune the behavior of \pkg{apacite} by redefining these commands, through
+\cmd{\renewcommand} after \pkg{apacite} has been loaded. Analogously, most
+fixed texts, like ``Tech.\ Rep.\hbox{}'' and ``Eds.\hbox{}'' are implemented
+through \LaTeX{} commands as well, and can similarly be changed by the user.
+The commands used by \pkg{apacite} are discussed in this section. Of course,
+the defaults are based on the rules of the APA manual.
+
+Some commands, predominantly punctuation, are used both in citations and in
+the reference list. If you want their definitions in citations to be different
+from their definitions in the reference list, you can simply redefine their
+definitions before starting the bibliography.
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\subsection{Punctuation and small formatting issues}
+\label{sec:custom-punct}
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+The following punctuation commands are provided and used for
+the citations and reference list.
+
+\DescribeMacro{\BAstyle}
+\DescribeMacro{\BAastyle}
+\cmd{\BAstyle} defines the text style of the authors (or whatever
+takes their place) for an in-text citation. It defaults to nothing:
+The authors use the same fonts as the text surrounding it. Introduced
+because some journals use a different style. For example,
+\emph{Statistica Neerlandica} uses small caps, so for that journal,
+you would define
+\begin{verbatim}
+\renewcommand{\BAstyle}{\scshape}
+\end{verbatim}
+Do not use the \cmd{\textsc}-type commands, but \cmd{\scshape},
+\cmd{\bfseries}, and so forth. The \cmd{\BAstyle} command is used for
+the author part by the \pkgoption{apaciteclassic} citation commands,
+except the author-only citation commands. \cmd{\BAastyle} is the same
+as \cmd{\BAstyle}, except that \cmd{\BAastyle} is used for the
+author-only citation commands.
+
+\DescribeMacro{\APACrefauthstyle}
+\cmd{\APACrefauthstyle} is similar to \cmd{\BAstyle}, except
+that this one is used for formatting authors in the reference list.
+In the current implementation, it also applies to editors in the
+author position, but not to editors in the editor position and
+not to titles and other elements that take the position of authors
+if there are no authors and editors.
+
+\DescribeMacro{\BBAA}
+\DescribeMacro{\BBAB}
+\DescribeMacro{\BAnd}
+\cmd{\BBAA} is the ``and'' between authors in a parenthetical
+citation and in the reference list, as in
+``(Mooijaart \& Bentler, 1986)'' or ``Mooijaart, A., \&
+Bentler, P.~M. (1986).''. Its default is ``\&''.
+\cmd{\BBAB} is the same ``and'' in a text citation, as in
+``Mooijaart and Bentler (1986)''. Its default is ``and''.
+The third ``and'', \cmd{\BAnd}, is used in the reference list
+if someone is both editor and translator:
+``In J. Strachey (Ed. \& Trans.),''. Default is ``\&''.
+
+\DescribeMacro{\BBOP}
+\DescribeMacro{\BBCP}
+\cmd{\BBOP} (opening parenthesis) and \cmd{\BBCP} (closing parenthesis)
+are used for the parentheses in a citation, as in ``(Rao, 1973)'' or
+``Rao (1973)'', and the year in the reference list, as in
+``Rao, C.~R. (1973).'' By default, they are round parentheses
+``('' and ``)''.
+
+\DescribeMacro{\BAP}
+\cmd{\BAP} is inserted after the prefix and before the first citation
+in a parenthetical citation. It defaults to an ordinary space. Note
+that if the prefix ends with a period, \TeX{} interprets this as a
+sentence ending and typically inserts a larger space, which is often
+not desirable. The standard way to avoid this would be to insert an
+explicit space (``|\ |''), but this does not work in a prefix. The
+solution is to insert an empty |\hbox{}| after the period:
+|\cite<cf.\hbox{}>{Jone01}|.
+
+\DescribeMacro{\BBAY}
+\DescribeMacro{\BBYY}
+\DescribeMacro{\BBN}
+\cmd{\BBAY} is the punctuation between author(s) and year in a
+parenthetical citation, as in ``(Rao, 1973)''. \cmd{\BBYY} is the
+punctuation between two subsequent years, if two works by the same
+author(s) are referenced in a single citation command, as in
+``(Rao, 1965, 1973)'' or ``Rao (1965, 1973)''. \cmd{\BBN} is the
+punctuation before a note (postfix) after a citation, as in
+``(Rao, 1973, p.~25)''. Default for all three is a comma and a
+space (``, '').
+
+\DescribeMacro{\BBC}
+\cmd{\BBC} is the punctuation between multiple cites, as in
+``(Rao, 1973; Mooijaart \& Bentler, 1986)''. Default is a semicolon
+and a space (``; '').
+
+\DescribeMacro{\BBOQ}
+\DescribeMacro{\BBCQ}
+\cmd{\BBOQ} (opening quote) and \cmd{\BBCQ} (closing quote) are the
+quotes around an article title in the reference list, for example the
+double quotes in ``Random polynomial factor analysis.'' Default is
+the empty string: no quotes are used. (The \pkg{theapa} package
+required the closing period to be part of the closing quote, but this
+has been changed, because the period must be left out if title
+comments, such as type, English translation of non-English title, or
+translator follow the title.)
+
+\DescribeMacro{\BPBI}
+\cmd{\BPBI} is the period between initials. Default is a period and a
+non-breaking space (``.~''), as required by the APA manual. However,
+many users prefer removing or reducing the space and in some
+non-English speaking countries this is customary. This can be achieved
+by redefining this command to, for example, just a period (no space),
+or ``|.\,|'' (small space). This command cannot be used to remove
+periods altogether, because there is still a period at the end. That
+is, redefining it as an empty string gives awkward results like
+``Bentler, PM., \& Mooijaart, A.''.
+
+\DescribeMacro{\BHBI}
+\cmd{\BHBI} is the hyphen between initials. Introduced for analogy with
+\cmd{\BPBI} and used for authors who have two or more first names
+with a hyphen between them, e.g., Jean-Paul Sartre. Default is
+a period and a hyphen. Unlike \cmd{\BPBI}, I think this one will not be
+changed often, although \BibTeX{} suppresses hyphens when it suppresses
+spaces between initials as well, so there are people who have different
+preferences. (Hence, \pkg{apacite} partly bypasses the standard
+\BibTeX{} formatting functions to make this work.)
+
+\DescribeMacro{\BCBT}
+\DescribeMacro{\BCBL}
+\cmd{\BCBT} is the comma between authors in the reference section when
+there are two authors, as in
+``Mooijaart, A., \& Bentler, P.~M. (1986).'' The comma after the ``A.''
+is this one. Default is a comma. The APA manual requires it, but other
+styles leave out this comma. In such a case, you would redefine this
+``comma'' to be the empty string:
+\begin{verbatim}
+\renewcommand{\BCBT}{}
+\end{verbatim}
+Analogously, \cmd{\BCBL} is the comma before the last author when there
+are three or more authors in a citation and in the reference section,
+as in ``(Gill, Murray, \& Wright, 1981)'' or
+``Gill, P.~E., Murray, W., \& Wright, M.~H. (1981).'' Its default is
+also a comma, as required by the APA manual, which is standard U.S.
+usage. Other styles, particularly European, such as British English,
+omit this comma. Again, in such a case, you would redefine this
+``comma'' to be the empty string. (This is in fact done in several of
+the language files. See section~\ref{sec:compat-babel}.)
+
+\DescribeMacro{\BDBL}
+\cmd{\BDBL} is the dots before the last author in the reference
+section when the reference has more than seven authors. The default
+is ``|, \dots{} |''. The APA manual seems to imply that there
+shouldn't be space around the dots, but I think it's better to have
+the space and I assume editors won't mind. However, if they insist on
+removing the space, you can redefine \cmd{\BDBL} accordingly.
+
+\DescribeMacro{\theBibCnt}
+\DescribeMacro{\BCnt}
+\DescribeMacro{\BCntIP}
+\DescribeMacro{\BCntND}
+If there are multiple citations with the same author and year, a
+letter should be added to the year to distinguish the references.
+For example, one may refer to two or more articles by J.~Smith
+published in 1982. They should be referred to as ``Smith (1982a)'',
+``Smith (1982b)'', and so forth. To accomplish this, the counter
+|BibCnt| is defined in \fname{apacite.sty}. The \cmd{\theBibCnt}
+command defines how the value of |BibCnt| is formatted. The default
+is ``|\alph{BibCnt}|'', that is, as a plain lowercase letter. To
+emphasize (italicize) the ``a'', ``b'', and so forth, you can redefine
+this as
+\begin{verbatim}
+\renewcommand{\theBibCnt}{{\em\alph{BibCnt}\/}}
+\end{verbatim}
+(This presumably works better than ``\verb+\emph{\alph{BibCnt}}+''.)
+To control this behavior, redefining the \cmd{\theBibCnt} command
+should normally be sufficient. However, the complete formatting
+commands are \cmd{\BCnt}, \cmd{\BCntIP}, and \cmd{\BCntND}. The
+second of these is for ``in press'' works, which need an extra hyphen
+between ``in press'' and the ``a'' and ``b'' suffixes. The third is
+similar, for works without a date, which is formatted as
+``n.d.\hbox{}'' in APA style. Their default definitions
+in \fname{apacite.sty} are
+\begin{verbatim}
+\DeclareRobustCommand{\BCnt}[1]{\setcounter{BibCnt}{#1}\theBibCnt}
+\DeclareRobustCommand{\BCntIP}[1]{\setcounter{BibCnt}{#1}\mbox{-\theBibCnt}}
+\DeclareRobustCommand{\BCntND}[1]{\setcounter{BibCnt}{#1}\mbox{-\theBibCnt}}
+\end{verbatim}
+
+\DescribeMacro{\APACciteatitle}
+\DescribeMacro{\APACcitebtitle}
+\cmd{\APACciteatitle} determines the formatting of the title of an
+article (or similar work) when used as a citation in the text when no
+author or editor is available for that purpose. Its default definition
+is
+\begin{verbatim}
+\newcommand{\APACciteatitle}[1]{``#1''}
+\end{verbatim}
+that is, the title is put between double quotes. Similarly,
+\cmd{\APACcitebtitle} determines the formatting of the title of a book
+(or other independent work) when used as a citation in the text when no
+author or editor is available for that purpose. Its default definition
+is
+\begin{verbatim}
+\newcommand{\APACcitebtitle}[1]{{\em #1\/}}
+\end{verbatim}
+that is, the title is emphasized (in italics) but not put between
+double quotes.
+
+\DescribeMacro{\APACmetastar}
+\cmd{\APACmetastar} is the asterisk that precedes an item in the
+bibliography to denote that it is included in the meta-analysis.
+The default value is ``\verb+\ensuremath{{}^\ast}+'', which
+prints as ``\APACmetastar''.
+
+\DescribeMacro{\bibnewpage}
+If the \pkgoption{bibnewpage} option is chosen, \cmd{\bibnewpage} is
+included before the bibliography. Its default definition is
+\cmd{\clearpage}, but \fname{apa.cls} used \cmd{\newpage} in a
+similar construction with its \pkgoption{man} option. See
+\citeA[p.~215]{LaTeXbook} or \citeA[p.~37]{KoDa04} for the differences
+between \cmd{\clearpage} and \cmd{\newpage}.
+
+\DescribeMacro{\bibliographytypesize}
+\cmd{\bibliographytypesize} is used before the reference list, but
+after the section or chapter heading. It is intended for the font size
+of the reference list: For \citeA{WaMe00}, I defined it as \cmd{\small}
+(and even then the reference list took up 34 pages). The default value
+is \cmd{\normalsize}.
+
+\DescribeMacro{\bibleftmargin}
+\DescribeMacro{\bibindent}
+\DescribeMacro{\bibitemsep}
+\DescribeMacro{\bibparsep}
+\DescribeMacro{\biblabelsep}
+Several parameters determine the layout of the reference list.
+\cmd{\bibleftmargin} gives the indentation of the second and subsequent
+lines of a reference list entry, relative to the usual left margin. It
+is not a proper command, but a rubber length, which means that it is
+not changed by \cmd{\renewcommand} but by \cmd{\setlength}. Its default
+value is 2.5em. \cmd{\bibindent} gives the indentation of the
+first line of a reference list entry, relative to the second line. It
+is also a rubber length, with default value is |-\bibleftmargin|, which
+means that the first line starts at the original left margin, and the
+second and subsequent lines are indented by 2.5em. \cmd{\biblabelsep}
+gives the horizontal separation between the reference list label and
+the rest of the entry. Normally, there are no reference list labels
+when using \pkg{apacite}, but this command allows one to define them
+through redefining \cmd{\@biblabel} and \cmd{\@lbibitem} without having
+to redefine the whole \envirname{bibliography} environment. I once used
+this to generate a numbered reference list for my CV. It is a rubber
+length in principle, but the default is a fixed length of 0pt.
+\cmd{\bibitemsep} gives the vertical separation between two reference
+list entries. It is also a rubber length, with default value
+``|0pt plus .3pt|'', i.e., 0pt, but it may be stretched a little to
+fill the page nicely. If you want to change it, e.g., to get a blank
+line between reference list entries, you can use
+\begin{verbatim}
+\setlength{\bibitemsep}{\baselineskip}
+\end{verbatim}
+Finally, \cmd{\bibparsep} gives the vertical separation between two
+paragraphs within the same reference list entry. Such a situation does
+not occur in the default setup, so it is not used, but it is
+conceivable that certain customizations lead to its use. It is a
+rubber length with default value 0pt.
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\subsection{Labels}
+\label{subsec:labels}
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+There are many specific pieces of text that can be put into the reference
+list or a citation by \pkg{apacite}. Here, these pieces are called
+\emph{labels}. Almost all of these are to some extent language-specific, and
+sometimes style-specific even within the same language. Therefore, they are
+implemented through \LaTeX{} commands, so that users can easily change them.
+In this section, these commands and their purposes are described, and their
+(U.S.\ English) defaults are given. Section~\ref{sec:compat-babel} below will
+discuss how these commands are changed if another language is used.
+
+The following label commands are used:
+\begin{description}
+
+ \item[\cmd{\onemaskedcitationmsg}] \DescribeMacro{\onemaskedcitationmsg}
+ \item[\cmd{\maskedcitationsmsg}] \DescribeMacro{\maskedcitationsmsg}
+ These commands have one mandatory argument (which should always
+ be 1 for \cmd{\onemaskedcitationmsg}) and define a message
+ stating that citations are removed for a masked review. The
+ default messages are
+ ``\emph{(1\ citation removed for masked review)}'' and
+ ``\emph{(}|#1|\emph{\ citations removed for masked review)}'',
+ respectively.
+
+ \item[\cmd{\bibmessage}] \DescribeMacro{\bibmessage}
+ This is the first of 9 specific type
+ commands that are recognized by \pkg{apacite}. If you
+ define the \fieldname{type} field of a \entryname{misc}
+ entry as ``\cmd{\bibmessage}'', the formatting of the
+ entry is changed (e.g., the title is not italicized),
+ see the discussion of the \fieldname{type} field in
+ section~\ref{subsec:fields} above. This one is used for
+ messages in newsgroups, internet forums, etc.
+ Default is ``\verb+Msg+''.
+
+ \item[\cmd{\bibcomputerprogram}] \DescribeMacro{\bibcomputerprogram}
+ Default is ``\verb+Computer program+''.
+
+ \item[\cmd{\bibcomputerprogrammanual}] \DescribeMacro{\bibcomputerprogrammanual}
+ Default is ``\verb+Computer program manual+''.
+
+ \item[\cmd{\bibcomputerprogramandmanual}] \DescribeMacro{\bibcomputerprogramandmanual}
+ Default is ``\verb+Computer program and manual+''.
+
+ \item[\cmd{\bibcomputersoftware}] \DescribeMacro{\bibcomputersoftware}
+ Default is ``\verb+Computer software+''.
+
+ \item[\cmd{\bibcomputersoftwaremanual}] \DescribeMacro{\bibcomputersoftwaremanual}
+ Default is ``\verb+Computer software manual+''.
+
+ \item[\cmd{\bibcomputersoftwareandmanual}] \DescribeMacro{\bibcomputersoftwareandmanual}
+ Default is ``\verb+Computer software and manual+''.
+
+ \item[\cmd{\bibprogramminglanguage}] \DescribeMacro{\bibprogramminglanguage}
+ Default is ``\verb+Programming language+''.
+
+ \item[\cmd{\bibnotype}] \DescribeMacro{\bibnotype}
+ This one is a bit different from the previous 8. It is used for
+ \entryname{techreport} entries to indicate that the type specifier
+ should be suppressed. Its default value is the empty string, but this
+ will not have an effect on \pkg{apacite} behavior, because the type
+ specifier is suppressed anyway by \pkg{apacite}. However, by defining it
+ as the empty string, formatting may become better (i.e., closer to the
+ desired formatting) with other styles.
+
+ \item[\cmd{\bibnodate}] \DescribeMacro{\bibnodate}
+ Used in the \fieldname{year} and
+ \fieldname{originalyear} fields to indicate that no
+ publication date has been given. Default value is ``\verb+n.d.\hbox{}+''.
+ The ``\verb+\hbox{}+'' ensures that \TeX{} does not treat
+ the last period as a sentence-ending period, after which
+ more space is inserted. This also applies to several other
+ labels discussed below.
+
+ \item[\cmd{\BOthers}] \DescribeMacro{\BOthers}
+ Used for ``others'' if the number of authors
+ or editors is too large, as in ``(Gill et al., 1981)''.
+ The default is ``\verb+et al.\hbox{}+''.
+
+ However, the definition contains a slight adaptation, because
+ in a previous version of \pkg{apacite}, there was a problem
+ implying that in some cases \BibTeX{} might put an extra period after
+ \cmd{\BOthers}, not recognizing that it already contains a period,
+ so that you would get ``et al.\hbox{}.'', which is undesirable.
+ It depends on the definition of \cmd{\BOthers} whether there should
+ be a period or not: If it is defined as ``\verb+et al.\hbox{}+'',
+ there should not be an additional period, but if it is defined
+ as, say, ``\verb+and others+'', then there should be an additional
+ period. But \BibTeX{} does not know what the (later) definition
+ of this command will be in \LaTeX{}. Therefore, the \cmd{\BOthers}
+ command is defined to have one argument. In \BibTeX,
+ \pkg{apacite} inserts \verb+\BOthers{.}+ in the output, so no
+ additional period is inserted by \BibTeX. By default, this
+ command is defined as ``\verb+et al.\hbox{}+'', and the argument is
+ simply ignored.
+
+ If you redefine the \cmd{\BOthers} command and need the additional
+ period, you can redefine it appropriately. However, in the current
+ version, the \cmd{\BOthers} command is distinguished from the
+ \cmd{\BOthersPeriod} command and I think the mentioned problems
+ do not occur anymore. Nevertheless, I have kept the definition of the
+ previous version. I may decide, after thorough testing, to change
+ this again in a next version.
+
+ There is still a complication, however. If you use a \cmd{\citeauthor}
+ at the end of a sentence, there may be a period too many, if
+ you end the sentence explicitly with it and \cmd{\BOthers} is
+ ``et al.\hbox{}''. On the other hand, if you omit the sentence-finishing
+ period but decide to redefine \cmd{\BOthers} to ``and others'',
+ the period is missing. Therefore, it seems wise not to end a sentence
+ with a \cmd{\citeauthor}, or you could define a command, e.g.,
+ \cmd{\finishsentence}, and insert it in an appropriate place.
+ Then, this command should be changed along with \cmd{\BOthers}.
+
+ \item[\cmd{\BOthersPeriod}] \DescribeMacro{\BOthersPeriod}
+ Also used for ``others'' if the number of
+ authors or editors is too large, as in
+ ``Gill, P. E., et al.\hbox{} (1981)''.
+ But this one is used for situations when it should always end with
+ a period. The default is ``\verb+et al.\hbox{}+''.
+
+ \item[\cmd{\bibcorporate}] \DescribeMacro{\bibcorporate}
+ This command can be used in the \fieldname{author}
+ field (and \fieldname{editor} and \fieldname{translator}) to tell
+ \pkg{apacite} that the author is a corporate author. See
+ section~\ref{subsec:fields} for an example of its usage. In combination
+ with the \pkgoption{includecorporate} and \pkgoption{suppresscorporate}
+ options, it can be used to include or exclude corporate authors from
+ the author index. The usage as described above is structured as if
+ \cmd{\bibcorporate} has an argument, the corporate author name, but
+ by default, this argument simply would have to be copied to the output
+ without further processing. Therefore, in the actual implementation,
+ \cmd{\bibcorporate} does not have an argument and reduces to \cmd{\relax},
+ i.e., it does nothing in \LaTeX{} and exerts its influence at the
+ \BibTeX{} stage.
+
+ \item[\cmd{\BIP}] \DescribeMacro{\BIP}
+ ``In press'', the string to be used as year for
+ in-press references. In the \fname{.bib} file, the \fieldname{year}
+ field should be ``\verb+\BIP+'', so that \pkg{apacite} can recognize
+ this and use appropriate formatting and sorting.
+ The default value is ``\verb+in press+''.
+
+ \item[\cmd{\BIn}] \DescribeMacro{\BIn}
+ Used for \entryname{incollection} and
+ \entryname{intechreport}, for ``In \opt{editor} (Ed.\hbox{}),
+ \opt{booktitle}'', and similar phrases. Default value is ``\verb+In+''.
+
+ \item[\cmd{\BCHAP}] \DescribeMacro{\BCHAP}
+ Used for \entryname{incollection} if the
+ \fieldname{pages} field is empty, to denote the chapter number
+ of the referenced work in the collection. Used primarily for
+ internet documents, where there are no page numbers.
+ Default value is ``chap.\hbox{}''. Note that in the text, in
+ particular in a citation, the APA (p.~179) prescribes ``Chapter'':
+ ``(Shimamura, 1989, Chapter~3)''. This is, however, something that
+ would be typed by the author of the manuscript, not inserted by
+ \pkg{apacite}, and thus \pkg{apacite} does not have a command
+ for this.
+
+ \item[\cmd{\BCHAPS}] \DescribeMacro{\BCHAPS}
+ Just like \cmd{\BCHAP}, but this one is used
+ if the \fieldname{chapter} field refers to more than 1 chapter.
+ Default value is ``chap.\hbox{}''.
+
+ \item[\cmd{\BED}] \DescribeMacro{\BED}
+ Editor in reference list, as in
+ ``In P. R. Krishnaiah (Ed.\hbox{})''. Default is ``\verb+Ed.\hbox{}+''.
+
+ \item[\cmd{\BEDS}] \DescribeMacro{\BEDS}
+ Editors (more than one editor) in reference list,
+ as in ``In C.~R. Rao \& J.~K. Ghosh (Eds.\hbox{})''.
+ Default is ``\verb+Eds.\hbox{}+''.
+
+ \item[\cmd{\BTRANS}] \DescribeMacro{\BTRANS}
+ Translator, as in ``(J. Strachey, Trans.\hbox{})''.
+ Default is ``\verb+Trans.\hbox{}+''.
+
+ \item[\cmd{\BTRANSS}] \DescribeMacro{\BTRANSS}
+ Translators. Default is ``\verb+Trans.\hbox{}+''.
+
+ \item[\cmd{\BTRANSL}] \DescribeMacro{\BTRANSL}
+ Translation. Used in a text citation when
+ referring to a translated work for which there is no date
+ for the original work. This is then formatted as
+ ``Aristotle (trans.\hbox{} 1931)''. Default is
+ ``\verb+trans.\hbox{}+''.
+
+ \item[\cmd{\BCHAIR}] \DescribeMacro{\BCHAIR}
+ Chair of a symposium, etc.
+ Default is ``\verb+Chair+''.
+
+ \item[\cmd{\BCHAIRS}] \DescribeMacro{\BCHAIRS}
+ Chairs. Default is ``\verb+Chairs+''.
+
+ \item[\cmd{\BVOL}] \DescribeMacro{\BVOL}
+ Volume, as in ``Vol.\hbox{}~1''.
+ Default is ``\verb+Vol.\hbox{}+''.
+
+ \item[\cmd{\BVOLS}] \DescribeMacro{\BVOLS}
+ Volumes, as in ``Vols.\hbox{} 1--4''.
+ Default is ``\verb+Vols.\hbox{}+''.
+
+ \item[\cmd{\BNUM}] \DescribeMacro{\BNUM}
+ Number, as in ``Tech.\ Rep.\hbox{}
+ No.\hbox{}~12''.
+ Default is ``\verb+No.\hbox{}+''.
+
+ \item[\cmd{\BNUMS}] \DescribeMacro{\BNUMS}
+ Numbers, as in ``Nos.\hbox{} 3--5''.
+ Default is ``\verb+Nos.\hbox{}+''.
+
+ \item[\cmd{\BEd}] \DescribeMacro{\BEd}
+ Edition, as in ``2nd ed.\hbox{}''.
+ Default is ``\verb+ed.\hbox{}+''.
+
+ \item[\cmd{\BPG}] \DescribeMacro{\BPG}
+ Page, default is ``\verb+p.\hbox{}+''.
+
+ \item[\cmd{\BPGS}] \DescribeMacro{\BPGS}
+ Pages, default is ``\verb+pp.\hbox{}+''.
+
+ \item[\cmd{\BTR}] \DescribeMacro{\BTR}
+ The (default) technical report type name, which can be
+ overridden by the \fieldname{type} field. Default is
+ ``\verb+Tech.\ Rep.\hbox{}+''
+
+ \item[\cmd{\BPhD}] \DescribeMacro{\BPhD}
+ The (default) PhD thesis type name, which can be
+ overridden by the \fieldname{type} field. Default is
+ ``\texttt{Doctoral dissertation}''.
+
+ \item[\cmd{\BUPhD}] \DescribeMacro{\BUPhD}
+ The (default) Unpublished PhD thesis type name,
+ which can be overridden by the \fieldname{type} field. Default is
+ ``\texttt{Unpublished doctoral dissertation}''.
+
+ \item[\cmd{\BMTh}] \DescribeMacro{\BMTh}
+ The (default) master's thesis type name, which can be
+ overridden by the \fieldname{type} field. Default is
+ ``\texttt{Master's thesis}''.
+
+ \item[\cmd{\BUMTh}] \DescribeMacro{\BUMTh}
+ The (default) unpublished master's thesis type name,
+ which can be overridden by the \fieldname{type} field. Default is
+ ``\texttt{Unpublished master's thesis}''.
+
+ \item[\cmd{\BOWP}] \DescribeMacro{\BOWP}
+ ``Original work published'', default is
+ ``\texttt{Original work published}''.
+
+ \item[\cmd{\BREPR}] \DescribeMacro{\BREPR}
+ ``Reprinted from'', default is
+ ``\texttt{Reprinted from}''.
+
+ \item[\cmd{\Bby}] \DescribeMacro{\Bby}
+ ``by'' in the construction
+ ``by P.~R. Krishnaiah, Ed.\hbox{}'' referring to the original
+ editor of a reprinted work. Default is ``\verb+by+''.
+
+ \item[\cmd{\BAuthor}] \DescribeMacro{\BAuthor}
+ ``Author'' as a description of the publisher
+ if the author and publisher are the same. Default is
+ ``\verb+Author+''
+
+ \item[\cmd{\BAvailFrom}] \DescribeMacro{\BAvailFrom}
+ ``Available from''. This is used in versions
+ of \pkg{apacite} up to [2009/03/01] if the \fieldname{url}
+ field is specified but the \fieldname{lastchecked} field is not.
+ This is now superseded by \cmd{\BRetrievedFrom}.
+ Default is ``\verb+Available from\ +''. Note the extra space.
+ This construction allows customization by redefining this command
+ as being empty, thereby omitting the phrase altogether, without
+ undesirable extra space.
+
+ \item[\cmd{\BRetrieved}] \DescribeMacro{\BRetrieved}
+ ``Retrieved from'', used if both the
+ \fieldname{url} field and the \fieldname{lastchecked} field are
+ specified. It has one argumnt: the date, i.e., the contents of
+ the \fieldname{lastchecked} field. The default is
+ ``\verb+Retrieved {#1}, from\ +'', again with extra space.
+
+ \item[\cmd{\BRetrievedFrom}] \DescribeMacro{\BRetrievedFrom}
+ ``Retrieved from'', used if the \fieldname{url}
+ field is specified but the \fieldname{lastchecked} field is not.
+ This was introduced, because the APA manual (p.~192) now states
+ that retrieval dates should be omitted ``unless the source
+ material may change over time'', and prescribes ``Retrieved from''
+ (p.~199).
+ Default is ``\verb+Retrieved from\ +'', again with extra space.
+
+ \item[\cmd{\BMsgPostedTo}] \DescribeMacro{\BMsgPostedTo}
+ Used for messages to newsgroups and the like.
+ Default is ``\verb+Message posted to\ +'', with space.
+
+ \item[\cmd{\refname}] \DescribeMacro{\refname}
+ Name of the reference list if it's a section.
+ (So it's the section name.) Default is ``\verb+References+''.
+ A problem with the current implementation is, that if you use
+ \pkg{babel}'s \cmd{\selectlanguage} command, then \cmd{\refname}
+ and \cmd{\bibname} are overwritten. Because \pkg{babel}'s
+ definitions of these commands are often (for various languages)
+ different from the names prescribed by the APA manual and analogous
+ bodies in other countries, it will often be necessary to redefine
+ \cmd{\refname} or \cmd{\bibname} if you have used
+ \cmd{\selectlanguage}. I hope to provide a fix in a next version
+ of \pkg{apacite}.
+
+ \item[\cmd{\bibname}] \DescribeMacro{\bibname}
+ Name of the reference list if it's a chapter.
+ Default is ``\verb+References+''. See also \cmd{\refname}.
+
+ \item[\cmd{\bibliographyprenote}] \DescribeMacro{\bibliographyprenote}
+ This command is used before
+ the reference list, but after the section or chapter heading,
+ and immediately after \cmd{\bibliographytypesize}.
+ It is intended for an optional note just before the references
+ in the reference list. It defaults to nothing, but can be changed
+ to a list of commands (e.g., if some commands should be different
+ in the reference list than in the text) and/or some text.
+
+ \item[\cmd{\APACmetaprenote}] \DescribeMacro{\APACmetaprenote}
+ If a meta-analysis is reported, the
+ works included in the meta-analysis should in the bibliography be
+ preceded by an asterisk, see the description of \cmd{\APACmetastar}
+ above. This should then be explained in a note before the references.
+ This command contains the text of that note. Default is
+ ``\texttt{References marked with an asterisk indicate studies
+ included in the meta-analysis.}''.
+
+ \item[\cmd{\authorindexname}] \DescribeMacro{\authorindexname}
+ Name (heading) of the author index.
+ Default is ``\verb+Author Index+''.
+
+ \item[\cmd{\doiprefix}] \DescribeMacro{\doiprefix}
+ String that is printed before a DOI.
+ Default is ``\verb+doi:+''.
+
+\end{description}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\subsection{More drastic formatting changes to the reference list}
+\label{sec:custom-big-formatting}
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+In earlier versions of \pkg{apacite}, most of the formatting of the
+reference list was done in the \BibTeX{} stage, i.e., by the \fname{.bst}
+files. This corresponds with most other \BibTeX{} styles. This makes
+it difficult for users to customize the formatting of the reference
+list: They would have to make their own \fname{.bst} file, by adapting
+\fname{apacite.bst}. Certain small changes are relatively easy to make,
+but \BibTeX's ``bst'' language is not easy to understand for most users,
+and thus most desired changes, though seemingly small, may be too
+complicated to implement. Another drawback of this setup is that, each
+time I release a new version of \pkg{apacite}, users would have to make
+the same adaptations again. In the early days of \pkg{apacite}, wasting
+disk space was another drawback, but this is not important anymore.
+
+To overcome the most salient of these problems, \pkg{apacite} has always
+deferred some formatting choices to the \LaTeX{} stage, by using tailor-made
+formatting commands instead of explicit formatting, as discussed in
+sections~\ref{sec:custom-punct} and~\ref{subsec:labels} above. The amount of
+formatting thus handled has slightly grown over time, but still most choices
+were hard wired in the \BibTeX{} styles.
+
+Since the \APACversiondate{2007/09/03} version of \pkg{apacite}, a big step
+has been made in transferring these choices to the \LaTeX{} domain. Hence,
+a much larger set of commands, with wider-ranging scope, has been defined,
+and considerably fewer choices are made at the \BibTeX{} stage. For
+example, \fname{apacite.bst} now inserts
+\mbox{}\vspace{0.7\baselineskip}\\
+\mbox{\cmd{\APACjournalVolNumPages}%
+ \marg{journal}%
+ \marg{volume}%
+ \marg{number}%
+ \marg{pages}%
+ }
+\mbox{}\vspace{0.7\baselineskip}\\
+in the \fname{.bbl} file for an \entryname{article} entry, and
+the actual formatting of this information is defined in
+\fname{apacite.sty}. If all four components are available, the
+default (APA manual) formatting of this looks like
+\mbox{}\vspace{0.7\baselineskip}\\
+\mbox{\Bem{Acta Paedopsychiatrica},
+ \Bem{38}(9),
+ {229--231}}
+\mbox{}\vspace{0.7\baselineskip}\\
+but by redefining this command, users can change this, e.g., to
+\mbox{}\vspace{0.7\baselineskip}\\
+\mbox{\Bem{Acta Paedopsychiatrica}
+ \textbf{38}, No.~9:
+ {229--231}}
+\mbox{}\vspace{0.7\baselineskip}\\
+The advantage of this is that users can fairly easily construct a
+customized style by redefining only a few commands in \LaTeX, by
+using \cmd{\renewcommand}. Users will generally find it much easier
+to do this than adapt the \fname{.bst} files. Furthermore, only
+the affected commands need to be redefined, so that, when a new
+version of \pkg{apacite} becomes available, all the new features
+can be used---with the exception of the redefined commands, of
+course---without having to adapt everything again. The drawback
+is that the \fname{.bbl} file becomes less readable and more
+difficult to adapt: Previously, it was easy to make ad-hoc changes
+by editing the \fname{.bbl} file, but this has now become more
+difficult. However, I intend to make this facility more user-friendly
+in the future, e.g., by introducing options in the \LaTeX{} package
+(say, \pkgoption{boldvolume}) or by introducing user-friendly
+commands that accomplish the same (say, \cmd{\boldvolume}), so that
+the advantages will clearly outweigh the disadvantages for the vast
+majority of users.
+
+Some packages (\pkg{amsrefs} and \pkg{biblatex} are the ones I am aware of)
+handle the formatting of the reference list completely in the \LaTeX{} domain,
+using \BibTeX{} only for sorting the reference list. The current version of
+\pkg{apacite} does not go that far; there are still certain choices that are
+hardwired in the \BibTeX{} code. Examples are the ordering of the various blocks
+(most notably the position of the year; some styles have this at the end) and
+the formatting of names. It is doubtful whether \pkg{apacite} will follow the
+path toward the end, like these other packages. Some formatting choices are
+closely connected with sorting of entries (e.g., by title if there is no author;
+this assumes that the title then takes the author position) or other cross-entry
+relations (such as adding `a' and `b' suffixes to the year). Therefore, it does
+not seem useful to disconnect these choices by handing them over to \LaTeX.
+
+The following commands are currently implemented to format the reference
+list. If you want to customize them, you can study the source code in
+the file \fname{apacite.sty}, copy it to you own package file, and adapt
+the code as desired.\\[-0.3\baselineskip]
+\par\noindent\DescribeMacro{\APACmonth}
+\makebox[2.1in][l]{\cmd{\APACmonth}}
+\makebox{Month name (as function of a number)}
+\par\noindent\DescribeMacro{\APACrefYear}
+\makebox[2.1in][l]{\cmd{\APACrefYear}}
+\makebox{Year in the reference list}
+\par\noindent\DescribeMacro{\APACrefYearMonthDay}
+\makebox[2.1in][l]{\cmd{\APACrefYearMonthDay}}
+\makebox{Year + month + day}
+\par\noindent\DescribeMacro{\APACrefatitle}
+\makebox[2.1in][l]{\cmd{\APACrefatitle}}
+\makebox{Title (article style, default upright)}
+\par\noindent\DescribeMacro{\APACrefbtitle}
+\makebox[2.1in][l]{\cmd{\APACrefbtitle}}
+\makebox{Title (book style, default italicized)}
+\par\noindent\DescribeMacro{\APACrefaetitle}
+\makebox[2.1in][l]{\cmd{\APACrefaetitle}}
+\makebox{English translation of title (article)}
+\par\noindent\DescribeMacro{\APACrefbetitle}
+\makebox[2.1in][l]{\cmd{\APACrefbetitle}}
+\makebox{English translation of title (book)}
+\par\noindent\DescribeMacro{\APACjournalVolNumPages}
+\makebox[2.1in][l]{\cmd{\APACjournalVolNumPages}}
+\makebox{Journal, volume, number, and pages}
+\par\noindent\DescribeMacro{\APACaddressPublisher}
+\makebox[2.1in][l]{\cmd{\APACaddressPublisher}}
+\makebox{Address and publisher}
+\par\noindent\DescribeMacro{\APACaddressInstitution}
+\makebox[2.1in][l]{\cmd{\APACaddressInstitution}}
+\makebox{Address and institution (for technical reports)}
+\par\noindent\DescribeMacro{\APACaddressPublisherEqAuth}
+\makebox[2.1in][l]{\cmd{\APACaddressPublisherEqAuth}}
+\makebox{Address and publisher if the publisher is the author}
+\par\noindent\DescribeMacro{\APACaddressInstitutionEqAuth}
+\makebox[2.1in][l]{\cmd{\APACaddressInstitutionEqAuth}}
+\makebox{Address and institution if the latter is the author}
+\par\noindent\DescribeMacro{\APACaddressSchool}
+\makebox[2.1in][l]{\cmd{\APACaddressSchool}}
+\makebox{Address and school (for theses)}
+\par\noindent\DescribeMacro{\APACtypeAddressSchool}
+\makebox[2.1in][l]{\cmd{\APACtypeAddressSchool}}
+\makebox{Type, address, and school (for theses)}
+\par\noindent\DescribeMacro{\APAChowpublished}
+\makebox[2.1in][l]{\cmd{\APAChowpublished}}
+\makebox{\fieldname{howpublished} field}
+\par\noindent\DescribeMacro{\APACorigED}
+\makebox[2.1in][l]{\cmd{\APACorigED}}
+\makebox{Original editor for reprints and translations}
+\par\noindent\DescribeMacro{\APACorigEDS}
+\makebox[2.1in][l]{\cmd{\APACorigEDS}}
+\makebox{Ditto, multiple editors}
+\par\noindent\DescribeMacro{\APACrefnote}
+\makebox[2.1in][l]{\cmd{\APACrefnote}}
+\makebox{Formatting of \fieldname{note} field}
+\par\noindent\DescribeMacro{\APACorigyearnote}
+\makebox[2.1in][l]{\cmd{\APACorigyearnote}}
+\makebox{Original year + optional note}
+\par\noindent\DescribeMacro{\APACorigjournalnote}
+\makebox[2.1in][l]{\cmd{\APACorigjournalnote}}
+\makebox{Original journal (+ volume, number, pages) + optional note}
+\par\noindent\DescribeMacro{\APACorigbooknote}
+\makebox[2.1in][l]{\cmd{\APACorigbooknote}}
+\makebox{Formatting of ``original'' information if the original is a book}
+\par\noindent\DescribeMacro{\APACbVolEdTR}
+\makebox[2.1in][l]{\cmd{\APACbVolEdTR}}
+\makebox{Technical report information}
+\par\noindent\DescribeMacro{\APACbVolEdTRpgs}
+\makebox[2.1in][l]{\cmd{\APACbVolEdTRpgs}}
+\makebox{Ditto, for \entryname{intechreport}}
+\par\noindent\DescribeMacro{\doi}
+\makebox[2.1in][l]{\cmd{\doi}}
+\makebox{Formatting of DOI string}\\[0.7\baselineskip]
+In addition, the following environments are used:\\[-0.3\baselineskip]
+\par\noindent\DescribeEnv{APACrefauthors} \makebox[1.3in][l]{\envirname{APACrefauthors} } \makebox{Formatting of authors (or editors acting as authors) in the reference list.}
+\par\noindent\DescribeEnv{APACrefURL} \makebox[1.3in][l]{\envirname{APACrefURL} } \makebox{Formatting of \fieldname{url} field}
+\par\noindent\DescribeEnv{APACrefDOI} \makebox[1.3in][l]{\envirname{APACrefDOI} } \makebox{Formatting of \fieldname{doi} field}
+\par\noindent\DescribeEnv{APACrefURLmsg} \makebox[1.3in][l]{\envirname{APACrefURLmsg} } \makebox{Formatting of \fieldname{url} field for messages}
+\par\noindent\DescribeEnv{APACrefannotation}\makebox[1.3in][l]{\envirname{APACrefannotation}} \makebox{Formatting of \fieldname{annote} or \fieldname{annotate} fields for annotated bibliographies.}
+\\[0.7\baselineskip]
+It is likely that these lists will be expanded in future versions of
+\pkg{apacite}.
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\section{Language support}
+\label{sec:compat-babel}
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+The APA is, of course, American, and therefore the rules in the APA manual
+are also based on the (U.S.) English language. Because \pkg{apacite} was
+primarily designed to implement the APA rules, and because I write all
+my scientific work in English, \pkg{apacite} originally did not contain
+explicit support for other languages. However, most language-specific
+elements have been implemented in the form of \LaTeX{} commands, so that
+users could define their own \LaTeX{} package in which these elements were
+changed. The labels discussed in section~\ref{subsec:labels} above are the
+most important part of this.
+
+Furthermore, when writing in a non-English language, the \pkg{babel} package
+will usually be loaded. The \pkg{babel} package is an extensive package that
+facilitates using \LaTeX{} for documents in languages other than English.
+There have been some compatibility problems between \pkg{babel} and
+\pkg{apacite}, and therefore since 2003 \pkg{apacite} contained some
+explicit code to overcome the compatibility problems. I think this works
+well, provided that \pkg{apacite} is loaded \emph{after} \pkg{babel}.
+
+Thus, although \pkg{apacite} did not support non-English languages
+explicitly, it did facilitate them. Supporting non-English languages is
+not a main objective of \pkg{apacite}, because it is not needed for
+the APA. Nevertheless, it potentially is a useful addition. Many journals in
+non-English languages and universities in countries where other languages
+are spoken base their rules on the APA manual. Therefore, it is
+efficient if, with a few adaptations, \pkg{apacite} can also be used in
+these circumstances. For this reason, and based on user requests,
+\pkg{apacite} has contained some explicit language support since June 2005.
+
+The unpacked \pkg{apacite} distribution contains files that have names
+according to the construction \opt{language}\fname{.apc}, i.e.,
+\fname{english.apc}, \fname{dutch.apc}, etc.
+These files define the language-specific modifications of \pkg{apacite},
+mainly translations of terms like ``and'', ``Ed.\hbox{}'', etc. They have been
+written by \pkg{apacite} users who are (native) speakers of the languages
+involved. If the \pkg{babel}, \pkg{german}, or \pkg{ngerman} package is
+loaded, \pkg{apacite} is able to determine the language of the document that
+is processed. Then the corresponding \fname{.apc} file, when available, is
+read. In this way, language-specific elements are changed to the relevant
+language. This is done fully automatically, the user does not have to do
+anything explicitly. However, sometimes an \fname{.apc} file makes some
+assumptions or choices that are nontrivial. Therefore, look at the source
+code of the \fname{.apc} file (or in the Implementation section of this
+manual if you have generated this manual with the \cmd{\AlsoImplementation}
+option) if you obtain unexpected results. These files contain some brief
+documentation of the specific issues relevant for the language at hand.
+
+The list with available \fname{.apc} files has been given in
+section~\ref{sec:usage}. One file is defined for each ``language'', which can
+be used for several ``dialects'' (in \pkg{babel} terminology). For example,
+\fname{english.apc} is also used if the language is ``american''. See the
+documentation of the \pkg{babel} and \pkg{(n)german} packages for a list of
+dialects of the language files supplied. If an \fname{.apc} file is not
+available for the language you need, you can use one of the supplied ones as a
+template and write your own. If you send it to me, I can include it in a next
+version of \pkg{apacite}.
+
+The \pkg{babelbib} package offers very sophisticated support of
+different languages. Perhaps some of the features that it offers are
+useful additions to \pkg{apacite} as well, and these may be included
+in a future version of \pkg{apacite}.
+
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\subsection{Language-specific issues}
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+This section lists issues that are specific to one or more language
+files. It is currently very incomplete. Again, I suggest you study
+the \fname{.apc} file of your language for more information.
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\subsubsection*{Spanish}
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\pkg{apacite}'s usage of |<| and |>| for pre-notes, as in
+|\cite<e.g.,>{jones06}| (inherited from its predecessor, \fname{theapa.sty}),
+conflicts with \pkg{babel}'s \pkgoption{spanish} option, which makes |<| and |>|
+active characters. Hence, either you must avoid using prenotes with
+\pkg{apacite}'s construction or you must disable \pkg{babel}'s behavior by
+inserting the command \cmd{\deactivatequoting} after loading \pkg{babel}.
+
+\DescribeMacro{\usespanishe}
+The default ``and'' between authors in Spanish is `y', but when the
+subsequent author's last name starts with an `I', this should be `e'.
+Therefore, \fname{spanish.apc} introduces the command \cmd{\usespanishe},
+which takes a comma-separated list of citation keys as argument. The ``and''
+in these citations is then formatted as `e'. So
+\begin{verbatim}
+\citeA{AnIn93},
+\citeA{AnIn95},
+\usespanishe{AnIn93, AnIn95}
+\citeA{AnIn93},
+\citeA{AnIn95}.
+\end{verbatim}
+gives as output ``Anderson y Ingram (1993), Anderson y Ingram (1995),
+Anderson e Ingram (1993), Anderson e Ingram (1995).''
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\subsection{Setting up \MiKTeX}
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\MiKTeX{} preloads the \pkg{babel} package and often uses \pkgoption{french}
+as the default language. The result is that \pkg{apacite} formats
+the heading of the reference list and other text strings in French.
+(Other distributions also preload \pkg{babel} but use
+\pkgoption{english} or \pkgoption{nohyphenation} as default.)
+I have received many reports from \pkg{apacite} users who use \MiKTeX{},
+who just want the default English, but get French output and don't
+know how to turn this off. Therefore, even though I believe this is a
+\MiKTeX{} issue and not an \pkg{apacite} issue, I\footnote{Actually,
+most of this investigation, testing, etc., was done by David Huffer,
+because I don't have \MiKTeX. Thanks, David!} have reluctantly
+decided to investigate this issue, and as a result of my investigation,
+provide this section.
+
+So here is the way to solve this problem (for \MiKTeX{} version 2.7;
+presumably it works similar for other versions):
+\begin{enumerate}
+\item
+Click Start $\rightarrow$ Programs $\rightarrow$ MiKTeX 2.7 $\rightarrow$
+Settings to open the \MiKTeX{} Options window. Click on the Languages tab.
+\item
+Select ``\pkgoption{english}'', ``\pkgoption{nohyphenation}'', or whatever
+else you'd like to be the default language, and use the Down button to move
+this to the bottom. The \emph{last} checked language is the default main
+document language.
+\item
+Click on the General tab and click on Update Formats.
+\end{enumerate}
+If you do this with ``\pkgoption{english}'' or ``\pkgoption{nohyphenation}''
+as default language, \pkg{apacite} will use English strings and punctuation.
+
+If you want to override the default (and/or you are not able to set the
+default, perhaps because you don't have the administrative permissions),
+you can also insert the line
+\begin{verbatim}
+\usepackage[english]{babel}
+\end{verbatim}
+in your document, before loading \pkg{apacite}.
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\section{Compatibility}
+\label{sec:compat}
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+Generally speaking, I would want \pkg{apacite} to be compatible with other
+packages, of course. However, what does compatibility mean? It can mean
+various things:
+\begin{enumerate}
+\item \label{compat1}%
+ The same \fname{.bib} file can be used with
+ different \BibTeX{} styles and \LaTeX{} citation packages;
+\item \label{compat2}%
+ The same citation commands as other citation packages;
+\item \label{compat3}%
+ Another \LaTeX{} citation package can be used with a
+ \fname{.bbl} file that is generated by the \pkg{apacite}
+ \BibTeX{} style;
+\item \label{compat4}%
+ The \pkg{apacite} \LaTeX{} citation package can be used with a
+ \fname{.bbl} file that is generated by another \BibTeX{} style;
+\item \label{compat5}%
+ The \pkg{apacite} \LaTeX{} citation package can be loaded at the
+ same time as other packages without errors or undesirable
+ side-effects.
+\end{enumerate}
+Because of the complicated rules of the APA manual, it is not always possible
+to achieve all kinds of compatibility with all other packages. Later in this
+section, I will discuss compatibility issues with other packages with which
+known incompatibility problems exist or have existed. A first example of this,
+the \pkg{babel} package, has already been mentioned above in
+section~\ref{sec:compat-babel}.
+
+Point~\ref{compat1} is the most important. If you have to write a completely
+different \fname{.bib} file for different citation styles, there does not seem
+to be an advantage in using \BibTeX{}. You might as well write the reference
+list explicitly in \LaTeX{} then. However, not even this point can be achieved
+completely, although the vast majority of the items will be the same for
+different styles. But there remain a number of choices that are style-specific
+and that lead to differences in the \fname{.bib} file. Examples from the APA
+manual are:
+\begin{itemize}
+\item If a referenced book is volume~III according to its title
+ page, this should be referenced as Vol.~3 according to the
+ APA manual rules, but that may not be the case with other
+ styles;
+\item Journal names are abbreviated by some styles, but not
+ according to the APA manual rules;
+\item Publisher names should be abbreviated according to the
+ APA manual, e.g., ``John Wiley \& Sons'' becomes ``Wiley''.
+ Other styles do not do this;
+\item The issue number of a journal should only be given if
+ the journal starts each issue with page~1, not if page
+ numbers of different issues in the same volume are consecutive.
+ Other styles may require the issue number in all cases;
+\item Page ranges are given as ``341--351'' in APA style, whereas
+ other styles use ``341--51'';
+\item The APA rules require a capital after a colon (`\verb+:+'),
+ so that subtitles start with a capital as well. Other styles
+ may not do this;
+\item The APA has specific rules about the address: For a U.S. city,
+ the state (or territory) should be given as a 2-letter code
+ from the U.S. Postal Services, and the province and country
+ should be given if it is a non-U.S. city. There
+ are some exceptions if the name of the state (and sometimes
+ even city) is already mentioned in the university name and
+ the university acts as publisher;
+\item Yearbooks like \emph{Annual Review of Psychology} should be treated
+ as journals according to the APA rules, whereas other styles
+ treat these as books;
+\item The additional fields (such as \fieldname{translator} and the
+ \fieldname{original*}-fields) that are used by \pkg{apacite} but are
+ not defined in other \BibTeX{} styles are of course
+ \pkg{apacite}-specific.
+\end{itemize}
+Some of these problems can be handled relatively elegantly. For example,
+the user could use a command like ``\verb+\RomanVol{3}+'' in the
+\fieldname{volume} field. Then, the user could define a counter,
+\verb+RomanVolcounter+, say, in \LaTeX{} and then define
+\cmd{\RomanVol} (similar to \cmd{\BCnt} discussed earlier) as
+\begin{verbatim}
+\newcommand{\RomanVol}[1]{%
+ \setcounter{RomanVolcounter}{#1}\theRomanVolcounter}
+\end{verbatim}
+where \cmd{\theRomanVolcounter} is defined as \verb+\arabic{RomanVolcounter}+
+if \pkg{apacite} is loaded and as \verb+\Roman{RomanVolcounter}+ if another
+package is loaded that desires this. The example with style-specific
+\fname{.bib} files that contain the definitions of journal-strings was already
+given in section~\ref{sec:bib} above. However, many users will not go through
+all this trouble, and not all problems can be solved in this way. So we have
+to realize that not all entries in the \fname{.bib} file will be suitable for
+all citation styles. On the other hand, most citation styles and journals are
+not as critical as APA journals and many styles in psychology and other social
+sciences (including economics) are very similar, so a \fname{.bib} file that
+is tailor-made for \pkg{apacite} is likely to be suitable enough for the
+styles of most relevant alternative journals.
+
+Point~\ref{compat2} above is currently not fulfilled. The \pkg{apacite}
+citation commands are directly based on those of its immediate
+predecessor, \pkg{theapa}. But the use of `|<|' and `|>|' for prefixes
+is not used by other packages. The \pkg{chicago} package uses
+\cmd{\citeA} instead of \cmd{\citeauthor}, many ``numerical'' citation
+styles only recognize \cmd{\cite}, and so forth. Because \pkg{natbib}
+is widely used and versatile, the \pkgoption{natbibapa} option loads
+\pkg{natbib} for the citation commands, thereby allowing at least a
+little ``compatibility'' (actuallu, borrowing) of citation commands.
+
+I think that points~\ref{compat3} and~\ref{compat4} are not that
+important. It seems to me that there is not much wrong with defining
+a style through a combination of a \fname{.sty} and \fname{.bst} file,
+each requiring the other to work. However, given the possibilities and
+philosophy of the \pkg{natbib} package, it is desirable that
+\fname{natbib.sty} can be used with \fname{apacite.bst}. This is the
+case, especially with the \pkgoption{natbibapa} option.
+
+Point~\ref{compat5} is very important, especially with other packages that are
+complementary to \pkg{apacite} in some sense. It would be very annoying having
+to choose between using \pkg{babel} and \pkg{apacite}, or between
+\pkg{hyperref} and \pkg{apacite}, etc. These packages serve totally different
+purposes, cannot usefully be compared, and are more valuable when they can be
+used jointly. The rest of this section addresses this issue for a number of
+packages with which compatibility problems are known to exist or have existed.
+
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\subsection{\pkg{natbib}}
+\label{sec:compat-natbib}
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+The \pkg{natbib} package is a general purpose citation package that is
+intended to work with a broad range of \BibTeX{} (and non-\BibTeX{}) styles
+that generate the bibliography. The \pkg{natbib} package is quite advanced and
+can be used to switch easily between completely different citation styles.
+Furthermore, the apparent popularity of \pkg{natbib} has inspired writers of
+packages that would otherwise be incompatible with \pkg{natbib} to write code
+to resolve these incompatibilities. I will mention some of these packages
+below.
+
+Using \pkg{natbib} for the citations has some advantages over using
+\pkg{apacite} for the citations. Apart from the abovementioned sorting
+of citations within a single citation command, these are mainly
+\pkg{natbib}'s better compatibility with some other important packages,
+although many compatibility problems with \pkg{apacite} have now been
+solved.
+
+When you want to use \pkg{natbib} for citation and \pkg{apacite} for the
+reference list, you still need to load the \LaTeX{} package \fname{apacite.sty}
+(with \cmd{\usepackage}), because of the commands that are included in the
+\BibTeX{} output (as defined in section~\ref{sec:custom} above). The best
+interoperability is obtained by loading \pkg{apacite} with the
+\pkgoption{natbibapa} option. There is then no need to load
+\pkg{natbib} explicitly, because \pkg{apacite} already does this.
+
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\subsection{\pkg{hyperref}, \pkg{backref}, and \pkg{url}}
+\label{sec:compat-hyper}
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+The \pkg{hyperref} package turns (\mbox{cross-}) references into hypertext
+links. This can be used in conjunction with a program such as \latextohtml{} to
+compose \fname{.html} files with clickable links, to internet pages or within
+the same document, or it can be used to create a \fname{.pdf} document with
+clickable crossreferences. Evidently, citations are also references. Therefore,
+the \pkg{hyperref} package transforms these into hypertext links as well, and
+needs to redefine the citation commands and reference list commands in order to
+do so. These redefinitions have caused severe incompatibility problems between
+\pkg{apacite} and \pkg{hyperref} in the past. These incompatibility
+problems have been solved and \pkg{apacite} is compatible with \pkg{hyperref},
+provided that \pkg{apacite} is loaded \emph{after} \pkg{hyperref}.
+However, some of the ``dirty tricks'' I needed for
+complicated examples in section~\ref{sec:xmpl} still conflict with
+\pkg{hyperref}. You will probably not encounter these problems very often, but
+if you do these can be easily solved by editing the \fname{.bbl} file instead of
+using dangerous tricks; see also section~\ref{sec:autindex} below.
+
+The \pkg{backref} package adds to each entry in the bibliography a list of pages
+(or sections) on which it is referenced. Hence, it serves as an alternative to
+an author index, in which not the entries themselves are backreferenced, but the
+authors of these entries, see section~\ref{sec:autindex}. Note that \pkg{natbib}
+offers yet another possibility, viz.\ the citations in the standard index, or a
+separate citation index, see the \pkg{natbib} documentation. In my opinion, the
+\pkg{backref} way of indexing the page numbers of the citations is more logical.
+Moreover, it is more condensed as well.
+
+Obviously, the \pkg{backref} package has to change the citation commands and
+reference list to be able to do its backreferencing. Because \pkg{apacite}
+redefines these as well, they are conflicting to some degree. A similar
+compatibility problem between \pkg{backref} and \pkg{natbib} was noticed by the
+author of \pkg{backref}. Therefore, \pkg{backref} contains some code to make it
+compatible with \pkg{natbib}. This code has been adapted for \pkg{apacite} and
+incorporated in \pkg{apacite}. Thus, \pkg{backref} as a standalone package has
+been made compatible with \pkg{apacite}. The drawback of this solution is that
+if changes are made in the \pkg{backref} package, this may result in new
+incompatibilities with \pkg{apacite} unless \pkg{apacite} is changed as well.
+Whether, and if so, when, this will occur will be a question for the future.
+
+Apart from being a standalone package, \pkg{backref} can also be combined with
+\pkg{hyperref}. It is then not loaded separately, but through the
+\pkgoption{backref} or \pkgoption{pagebackref} option of the \pkg{hyperref}
+package. In this case, the backreferences become hypertext links. See the
+discussion of the \pkg{hyperref} package above.
+
+The \pkg{url} package provides the \cmd{\url} command for formatting URLs, i.e.,
+web addresses. It is typically loaded if \pkg{hyperref} is also loaded, but it
+is very useful on its own as well. There are no compatibility problems with
+\pkg{apacite} and it is not required when using \pkg{apacite}. However, if you
+use the \fieldname{url} field, \pkg{apacite} puts it into a \cmd{\url} command.
+If the \cmd{\url} command is not defined by another package, \pkg{apacite}
+provides a crude definition, so that no errors are generated. But the formatting
+thus obtained usually does not satisfy the APA rules about formatting,
+especially its rules about line breaking within a URL. The default line breaking
+rules of the \pkg{url} package are fairly close to the APA rules, but there are
+some differences. Therefore, \pkg{apacite} provides several URL-styles that
+adhere to the APA line breaking rules, supplemented by the additional
+suggestions in \citeA[p.~645]{chicago}. These styles apply to URL formatting
+through the \cmd{\url} command anywhere in the document, not only in the
+reference list and not only in the \fieldname{url} field.
+
+The only difference between the URL styles defined by \pkg{apacite} is which
+font family they use: \verb+APACtt+ uses \cmd{\ttfamily}, \verb+APACsf+ uses
+\cmd{\sffamily}, \verb+APACrm+ uses \cmd{\rmfamily}, and \verb+APACsame+ does
+not define a font family, and thus uses the font family that is active at the
+start of the URL. \verb+APACtt+ is selected by default, but you can select
+another URL style by inserting the command \cmd{\urlstyle}\marg{style} in your
+document, after \verb+\begin{document}+. See the documentation of the \pkg{url}
+package for more details.
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\subsection{Multiple bibliographies}
+\label{sec:compat-chapterbib}
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+The \pkg{chapterbib} package allows separate bibliographies for separate
+chapters of a book, or, technically, separate \cmd{\include}d files. To work
+properly, it needs some small changes to the citation package, which are
+clearly described in the \pkg{chapterbib} documentation. These changes have
+been incorporated in \pkg{apacite}, and therefore \pkg{apacite} is compatible
+with \pkg{chapterbib}.
+
+It is generally advisable not to use the \pkgoption{sectionbib} option of
+\pkg{chapterbib}, because this redefines \cmd{\thebibliography}, which
+interferes with the redefinition by \pkg{apacite}. You can use the
+\pkgoption{sectionbib} option of \pkg{apacite} to accomplish that the
+bibliography or bibliographies are sections, rather than chapters.
+
+Moreover, \pkg{apacite} is configured such that it takes a section as default
+if it is in the main matter (signified by \cmd{\mainmatter}) of the document.
+In the back matter (\cmd{\backmatter}) the bibliography is put in a chapter.
+This is also the case if \cmd{\chapter} is defined but \cmd{\mainmatter} not.
+(Is this possible? Perhaps for reports?) Consequently, the
+\pkgoption{sectionbib} option is only useful in specific circumstances. The
+\pkgoption{nosectionbib} forces the bibliography to be a chapter, provided
+\cmd{\chapter} is defined. (I figured a \pkgoption{chapterbib} option would be
+a bit confusing, so I stuck with \pkgoption{nosectionbib}.)
+
+The \pkg{bibunits} package is an alternative to \pkg{chapterbib}. It allows a
+greater flexibility in choosing the scope of a bibliography (chapter, section,
+or arbitrarily defined part of the document). In previous versions, there
+have been some compatibility problems between \pkg{apacite} and \pkg{bibunits},
+but these have now been solved.
+
+The \pkg{multibib} and \pkg{multibbl} packages support using multiple
+bibliographies simultaneously. Thus, one can cite entries from multiple
+bibliographies in the same part of the document. This may be useful of one
+wants thematically different bibliographies or separate bibliographies for
+references in different scripts (e.g., Latin and Greek). These packages
+accomplish this by introducing different citation commands for the different
+bibliographies. \pkg{apacite} contains compatibility code such that these
+packages can be used jointly with \pkg{apacite}.
+
+The \pkg{bibtopic} package offers a similar functionality, but instead of
+using separate citation commands, it requires the user to keep the references
+in different \fname{.bib} files, so that there is one bibliography per
+\fname{.bib} file. \pkg{apacite} contains a little bit of compatibility code,
+which largely seems to work, but ``and'' between authors is always ``\&'', even
+in \cmd{\citeA}. I hope to fix this in a future version of \pkg{apacite}.
+
+Another package that offers similar functionality is \pkg{splitbib}. This
+uses neither different citation commands, nor separate \fname{.bib} files.
+rather, it requires the user to declare the ``category'' of each cited
+reference, typically at the beginning of the document. Again, \pkg{apacite}
+contains compatibility code such that simultaneous redefinitions of some
+of the citation and reference list commands do not conflict.
+
+A few caveats must be mentioned here. First, simultaneous bibliographies
+only work well if it is guaranteed that there are no ambiguities in the
+reference lists. With a single bibliography, ambiguities are resolved at the
+\BibTeX{} stage by adding initials to ambiguous first author names,
+adding additional authors before (or instead of) ``et al.\hbox{}'' to
+ambiguous multiple-author lists, and adding ``a'' and ``b'' suffixed to
+the year for references to different documents with the same authors published
+in the same year. Because, with the exception of \pkg{splitbib}, these
+packages require multiple \BibTeX{} runs on separate selections of references,
+\fname{apacite.bst} can only resolve ambiguities within the same bibliography.
+When there are cross-bibliography ambiguities, these are not resolved. It
+seems like these packages are primarily intended to work with numbered
+citation styles, or otherwise labeled citation styles, so that unique
+cross-bibliography numbers or labels can be generated at the \LaTeX{} stage.
+
+Second, I wrote the compatibility code in early 2006 and have not
+recently tested it thoroughly.
+Please let me know if you encounter problems. Then I'll
+try to fix them or at the least mention them in the next version of the
+manual. In particular, I believe that usage of \cmd{\nocitemeta} is not
+prefectly integrated yet: You may get the ``References marked\dots'' message
+even if the relevant bibliography does not contain marked references,
+or references that are \cmd{\nocitemeta}'d for one bibliography but not
+for another are marked for both. I don't think the \cmd{\nocitemeta}
+command is used much, so I would be surprised if anybody encountered
+such problems, but please let me know if you do. Then I'll try to fix them.
+
+Third, the compatibility code for all of these packages either follows
+instructions given in those packages, or brutally redefines part of the
+code of those packages. If these packages change, this may mean that
+new compatibility problems are created, or that improved features of
+these packages are not available when combined with \pkg{apacite}. I do
+not have the time to regularly check for updates of these packages and
+then study changes and/or test compatibility again. Instead, I only take
+action when a user notifies me of a problem, or I coincidentally find out
+myself. Therefore, again, please let me know if you encounter problems.
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\subsection{\pkg{bibentry}}
+\label{sec:compat-bibentry}
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\pkg{bibentry} is a package that allows including a complete reference
+list entry in the text (or a footnote, which is arguably more common).
+Previous versions of \pkg{apacite} were incompatible with \pkg{bibentry},
+but I believe this has been fixed now. However, the APA reference format,
+which uses periods to separate the elements of a reference list entry and
+not commas, does not appear to be very suitable for in-text use, so this
+is most likely only useful for footnotes that do not contain any other text.
+Also note that the final period of the reference entry is not suppressed.
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\subsection{Programs for conversion to html, rtf, etc.}
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+There are several programs that convert \LaTeX{} files to other types
+of files, most notably \fname{html} and \fname{rtf}. This may, for example,
+be useful if you want to publish your document on the internet or if you
+are requested to send a ``Word'' file to a journal. I have received reports
+that \latextohtml{} and \LaTeXrtf{} do not handle documents that use
+\pkg{apacite} well. Therefore, I have studied these programs. This section
+contains my observations. Note that these are quite old and not updated, and
+it is quite likely that the software mentioned in this section has been
+altered (improved) considerably. Therefore, the information may be outdated.
+Please let me know if there are major changes that I should be aware of.
+
+\latextohtml{} is a \Perl{} program that converts a \LaTeX{} input
+file into one or more \fname{.html} files, so that a document that is prepared
+with \LaTeX{} can be used as a (user-friendly) internet document.
+Similarly, \LaTeXrtf{} is a standalone program that converts a \LaTeX{}
+document to \fname{.rtf} format, which can be read by most word processors.
+This may be convenient if you (a \LaTeX{} user) want to share a document with
+someone who does not work with \LaTeX{}, or as mentioned above, if you are
+required to send a ``Word'' file to a journal.
+Both \latextohtml{} and \LaTeXrtf{} implement \LaTeX{} macros etc.\ in
+another programming language (\latextohtml{}: \Perl{}; \LaTeXrtf{}: C) and
+process the \fname{.tex} files directly. This design implies that the
+conversion program must know the definitions of all \LaTeX{} macros that
+are used. A drawback of this design is that essentially the same code has
+to be written in different programming languages (\LaTeX{} macros for the
+\fname{.sty} file, \Perl{} for \latextohtml{}, and C for \LaTeXrtf{}), but
+typically with some adaptations specific for the application at hand.
+
+With \LaTeXrtf{}, the \LaTeX{} macros that it is able to process are included
+in the C source code that is compiled. Consequently, no user additions are
+possible in principle. However, the source code is freely available, so if you
+define a \LaTeX{} macro, you could adapt \LaTeXrtf{}'s source code and
+recompile \LaTeXrtf{}. It is obvious that this is very inconvenient,
+especially if \LaTeX{} macros are defined differently for different styles or
+if they are defined differently in different parts of the same document.
+Version~1.9.15 and higher of \LaTeXrtf{} contains some support for
+\pkg{apacite}, but lags a few versions of \pkg{apacite} behind and thus
+doesn't work with recent versions of \pkg{apacite}. Moreover, even if this
+would be fixed, e.g., because I (or you) send patches to the \LaTeXrtf{}
+authors, this wouldn't do justice to the flexibility of \pkg{apacite}, i.e.,
+its customization options.
+
+In contrast with this, \latextohtml{} allows the possibility to supply
+external \Perl{} scripts. If \latextohtml{} encounters a
+\cmdtwo{usepackage}{package} command in the document, it attempts to read the
+corresponding \opt{package}\fname{.perl} \Perl{} script. \latextohtml{} is
+shipped with many such \Perl{} scripts. There is not one for \pkg{apacite},
+but there is one for \pkg{natbib}, which could possibly be adapted for
+\pkg{apacite}. Alternatively, you could use the \pkg{natbib} citation commands
+and use the \pkg{natbib} package (e.g., through loading \pkg{apacite}
+with the \pkgoption{natbibapa} option), which should work.
+
+An alternative to both \latextohtml{} and \LaTeXrtf{} is \TeXht{}. This is
+a collection of programs and style files that convert \LaTeX{} to
+various formats, such as html, xml, and OpenOffice format. If you have
+OpenOffice, the latter can be used to convert to Word (or rtf) format.
+The principle of \TeXht{} is to let \LaTeX{} do most of the formatting and
+processing of commands, and do the conversion at low-level \TeX{} commands.
+In this way, all newly defined commands and user-defined changes are
+automatically supported. This even carries over to redefinitions of macros
+in the middle of a document. However, for some specific purposes, there are
+some additional things that must be arranged. Therefore, \TeXht{} contains a
+large list of \fname{.4ht} files that are necessary to support various
+\LaTeX{} packages. One of these is the \fname{apacite.4ht} file. The main
+purpose of this file is to make citations into hyperlinks to the corresponding
+entries in the reference list. Currently, this only works partially, but
+the citation text itself is formatted correctly, so this is only a
+relatively minor inconvenience. But, of course, it would be better if this
+would work perfectly. Perhaps I'll study the problems in the future and
+solve this for a future version (although, technically, it is a \TeXht{}
+problem and not an \pkg{apacite} problem).
+
+The choice of which converter to use will typically not (only) depend on how
+good it works in conjunction with \pkg{apacite}. Furthermore, apart from the
+converters mentioned above, there are several additional converters that I
+haven't studied at all. I will only study them if I receive reports about
+incompatibility and even then it is far from certain that I will be willing or
+able to fix the problems. It would be very demanding if I would have to define
+the \pkg{apacite} commands in a large number of programming languages for a
+large number of different converters. Because I prefer the design of \TeXht{}
+and because this converter seems to work best at the moment, I will give a
+bit more attention to this one.
+
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\section{Generating an author index}
+\label{sec:autindex}
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+The \pkg{apacite} package contains an option to (almost) automatically
+generate an author index. This is done by using the \fname{apacitex.bst}
+\BibTeX{} style file instead of \fname{apacite.bst} and loading the
+\fname{apacite.sty} \LaTeX{} package with the \pkgoption{index} option,
+either explicitly or implicitly through one of the \pkgoption{stdindex},
+\pkgoption{tocindex}, \pkgoption{emindex}, or \pkgoption{ltxemindex} options.
+
+In earlier versions of \pkg{apacite}, the \pkgoption{index} option
+automatically loaded the \pkg{index} package for multiple indexes, so that
+you can have a subject index as well as an author index. However,
+the current document uses the standard \pkg{ltxdoc} class for documenting
+\LaTeX{} packages, and this class uses another method for supporting
+multiple indexes, which appears incompatible with the \pkg{index} package.
+I have been unable to resolve these compatibility problems and,
+therefore, have implemented another way to generate an author index in
+addition to other indexes. This uses the same principles as \pkg{ltxdoc}
+and thus does work for this user's manual. As a consequence,
+\pkg{apacite} now offers options that generate the author index either
+with the \pkg{index} package or without it.
+
+The \pkgoption{indexpackage} option implies that author indexing is done
+according to the \pkg{index}-scheme, whereas the \pkgoption{noindexpackage}
+uses the \pkg{ltxdoc}-based scheme. These options are ignored if the
+\pkgoption{index} option of \pkg{apacite} is not requested. When the
+\pkgoption{index} option is requested, the \pkgoption{indexpackage} option
+loads the \pkg{index} package. This is the default unless it is disabled
+by using either the \pkgoption{noindexpackage} option or the
+\pkgoption{ltxemindex} option.
+
+Obviously, the \pkg{index} package must be available in a directory that
+is read by \LaTeX{} if the \pkgoption{indexpackage} option is requested,
+either explicitly or implicitly. If a subject index is desired, it must be
+defined by the user, it is not defined by \pkg{apacite}. See the manual of
+the \pkg{index} package on how to do this. A default author index \emph{is}
+defined by \pkg{apacite}. The author index is then requested by putting
+\begin{verbatim}
+\printindex[autx]
+\end{verbatim}
+at the point in the \LaTeX{} document where the index is supposed to appear.
+To include the author index in the processed document, the following sequence
+must be followed: First, \LaTeX{}, which puts citation entries in the
+\fname{.aux} file. Second, \BibTeX{}, which generates the bibliography in the
+\fname{.bbl} file. Third, \LaTeX{} (at least) twice, which puts index entries
+in a \fname{.adx} file, Fourth, \MakeIndex{}, which uses the \fname{.adx} file
+as input and puts the formatted index in a \fname{.and} file, which can be
+processed by \LaTeX{}. So, if the main document is \fname{filename.tex}, then
+\MakeIndex{} must be called as follows:
+\begin{verbatim}
+makeindex -o filename.and filename.adx
+\end{verbatim}
+although the command with which the \MakeIndex{} program must be called
+may on some systems be slightly different, e.g., \fname{makeinde} or
+\fname{makeindx}. Furthermore, several additional options may be chosen
+on the \MakeIndex{} command line. Fifth, run \LaTeX{} again, which
+(finally) includes the formatted author index in the typeset document
+(\fname{.dvi} or \fname{.pdf} file).
+
+The \pkg{apacite} package provides some options to change the appearance of
+the index somewhat. With (only) the \pkgoption{index} option, the indexing
+facility is turned on, but the \envirname{theindex} environment is not explicitly
+(re)defined by \pkg{apacite}. This means that this environment is defined just
+like in standard \LaTeX{}, or the \pkg{index} package, or some other package
+that has been loaded that redefines this environment.
+
+The \pkgoption{stdindex} option explicitly uses the definition of the
+\envirname{theindex} environment that is defined in the \pkg{index} package
+[1995/09/28 v4.1beta Improved index support (dmj)].
+With this definition, the index does not appear in the table of contents. With
+the \pkgoption{tocindex} option, this definition is augmented with a table of
+contents entry. With the \pkgoption{emindex} option, there are some alternative
+definitions. It writes a table of contents entry as well, but the index itself
+is now set in two columns using the \pkg{multicol} package instead of the
+\cmd{\twocolumn} command, the text of the index is set in small type, and the
+page head is not put in uppercase. The \pkgoption{ltxemindex} option uses
+the same style as the \pkgoption{emindex} option, except that it does not
+load the \pkg{index} package and is thus tailored to a somewhat different
+indexing method.
+
+When a table of contents entry is desired, another additional \LaTeX{} run is
+required to obtain the table of contents with the author index included. In
+exceptional cases, the extra line in de table of contents may cause the text
+to be moved as well, so that it may be necessary to run \MakeIndex{} a second
+time, followed by yet one or two more \LaTeX{} runs.
+
+\DescribeMacro{\APACstdindex}
+\DescribeMacro{\APACtocindex}
+\DescribeMacro{\APACemindex}
+\DescribeMacro{\APACltxemindex}
+The definitions of the index discussed apply to all indexes in the
+document, so to, for example, the subject index as well as the author
+index. This may be undesirable, and therefore \pkg{apacite} provides
+the \cmd{\APACstdindex}, \cmd{\APACtocindex}, \cmd{\APACemindex}, and
+\cmd{\APACltxemindex} commands to switch index styles.
+These correspond to the package options \pkgoption{stdindex},
+\pkgoption{tocindex}, \pkgoption{emindex}, and \pkgoption{ltxemindex},
+respectively. Note, however, that the \pkgoption{ltxemindex} option
+and/or the \cmd{\APACltxemindex} command generally cannot be used in
+a document that uses one of the other styles, and vice versa, because
+the way \pkg{index} works is incompatible with how standard \LaTeX{}
+indexing works.
+
+If you want a different index style, either for all indexes in your document or
+only for some indexes, you can define such a style using the
+\cmd{\renewenvironment} command in the appropriate place. See the standard
+\LaTeX{} documentation for this command. The source code of the four commands
+mentioned here can be used as a template for such a style definition.
+
+Finally, some elements of the formatting of the index itself can be changed
+by using (and/or writing) an \fname{.ist} file containing the preferred
+options. \MakeIndex{} should then be called with the filename of this index
+style file after a ``\verb+-s+'' option on the command line, so, e.g.,
+\begin{verbatim}
+makeindex -s mystyle.ist -o filename.and filename.adx
+\end{verbatim}
+The \MakeIndex{} documentation discusses the possible options that can be put
+into the \fname{.ist} file.
+
+As discussed in sections~\ref{sec:options}, \ref{subsec:fields}, and
+\ref{subsec:labels}, the \pkgoption{suppresscorporate} and
+\pkgoption{includecorporate} options can be used to either
+exclude corporate authors from the author index or include them in it.
+The \cmd{\bibcorporate} command must be used in the \fname{.bib} file
+to denote a corporate author.
+
+For some of the examples from the APA manual, I had to use quite advanced
+\LaTeX{} tricks to obtain the correct formatting in the text, the reference
+list, and the author index; see section~\ref{sec:xmpl} below. This will
+typically not be necessary in practice. In the unlikely event that you
+encounter similar difficult cases, it will usually be sufficient to use
+a relatively simple trick in the \fname{.bib} file. In rare situations,
+this may still give incorrect formatting, most likely in the author index.
+Somewhat less rare is the situation when there is such a problematic case
+but you also want to use the \pkg{hyperref} package. The tricks I used
+conflict with \pkg{hyperref}.
+
+An easy solution to incorrect formatting and/or sorting in the author index is
+to edit the \fname{.bbl} file manually. This should be done at a time when
+\BibTeX{} will not have to be run again. Otherwise, the changes would be
+overwritten by the next \BibTeX{} run. This editing of the \fname{.bbl} file
+is not in the \TeX-spirit, but in my experience---I used it for two books
+with lots of references \cite{meijer1998, WaMe00}, with a previous version of
+\pkg{apacite} that caused a fair amount of problematic cases---this takes very
+little time, usually only minutes. Compare that with the time spent on writing
+a book, or with the time that would be necessary to manually make an author
+index. I also used it more recently for an edited book \cite{dLMe08a}
+with an adapted version of \pkg{apacite}, with essentially the current
+author indexing code, and had to do very little editing. The author index
+of the current document is automatically generated and does not contain
+any manual editing, although it does contain some advanced \LaTeX{} code
+to fix some issues.
+
+\DescribeMacro{\AX}
+The connection between the \fname{.bbl} file and the author index is through
+\cmd{\AX} commands that are entered by \fname{apacitex.bst} in the
+\fname{.bbl} file. These are responsible for the author indexing facilities.
+By looking at the contents of the \fname{.bbl} file, it is not difficult
+to see how problematic cases must be edited. For example, the entry for Bender
+is generated by the following lines:
+\begin{verbatim}
+\AX{bender jdirector
+@Bender, J\BPBI
+ {\protect\bibliteral{(Director)}\protect\indexskipbracenodot}.}%
+\end{verbatim}
+This can be changed to
+\begin{verbatim}
+\AX{bender j
+@Bender, J.}%
+\end{verbatim}
+which is formatted correctly in the author index without the need for
+advanced \LaTeX{} code, and conflicts with \pkg{hyperref} are resolved.
+Note that \pkg{apacite} uses the \opt{key}|@|\opt{visual} form of
+indexing. This form is used in \MakeIndex{} to distinguish between the actual
+representation in the index and the place where it should occur. The \opt{key}
+is used by \MakeIndex{} to sort the entry, but the entry actually appearing in
+the index is \opt{visual}. In the \opt{key} part as formatted by
+\pkg{apacite}, all names are in lower case letters and all accents and
+punctuation are removed. Furthermore, \pkg{apacite} inserts \emph{two} spaces
+between surname and initials, and to \MakeIndex{}, two spaces are different
+from one space. Spaces between surnames are removed, as well as spaces between
+initials. Finally, note that \pkg{apacite} always inserts a new line before
+the ``|@|''. This is to avoid bad line breaks by \BibTeX. To \MakeIndex,
+this means that each citation \opt{key} ends with a space.
+
+The author index of the current document does not contain entries for the authors
+Shocked and Goodenough as cited in section~\ref{sec:xmpl}, although it does for
+the reference list part. The reason for this is that the \fieldname{key} field was
+used for the citations. If you use the \fieldname{key} (and \fieldname{firstkey})
+field and you want the authors in the author index as well, you have to include
+the index command \cmd{\AX} explicitly. For example, the \fieldname{key} field
+for Michelle Shocked is
+\begin{verbatim}
+ key = {{\protect\bibsong{Shocked}{1992}{Over the
+ Waterfall}{track~5}}},
+\end{verbatim}
+and if we change this into
+\begin{verbatim}
+ key = {{\protect\bibsong{Shocked\AX{shocked m
+ @Shocked, M.}}{1992}{Over the Waterfall}{track~5}}},
+\end{verbatim}
+then citations to her are included in the author index.
+
+\DescribeMacro{\corporateAX}
+For corporate authors, the \cmd{\corporateAX} command is used instead of the
+\cmd{\AX} command. Depending on whether the \pkgoption{suppresscorporate}
+option or the \pkgoption{includecorporate} option is requested, either explicitly
+or implicitly, \cmd{\corporateAX} either swallows its argument or is equivalent
+to \cmd{\AX}. To make sure that this ends up correctly in the author index,
+it is important that this command as entered in the \fieldname{key} and/or
+\fieldname{firstkey} field is exactly as output by \fname{apacite.bst} for
+the \fieldname{author} field. The easiest way to accomplish this is to start
+with \fieldname{key} and/or \fieldname{firstkey} fields that do not have
+the \cmd{\corporateAX} command yet. Then, run \LaTeX{} and \BibTeX{} and
+extract the correct \cmd{\corporateAX} command from the \fname{.bbl} file
+and insert this in the \fieldname{key} and/or \fieldname{firstkey} fields.
+Rerun \BibTeX{} and after that proceed as usual. For example, the following
+is an excerpt from an entry for one of the examples from section~3.96 in the
+APA manual:
+\begin{verbatim}
+ author = {{\bibcorporate{National Institute of Mental Health}}},
+ firstkey = {{National Institute of Mental Health [NIMH]}},
+ key = {{NIMH}},
+\end{verbatim}
+If I run \LaTeX{} and \BibTeX{} on the current document, the \fname{.bbl}
+file contains the lines
+\begin{verbatim}
+\corporateAX{nationalinstituteofmentalhealth
+@{\bibcorporate{National Institute of Mental Health}}}%
+\end{verbatim}
+Note the \cmd{\bibcorporate} command and the additional braces. If these
+are left out,
+\begin{verbatim}
+ firstkey = {{National Institute of Mental Health
+ [NIMH]}\corporateAX{nationalinstituteofmentalhealth
+ @{National Institute of Mental Health}}},
+ key = {{NIMH}\corporateAX{nationalinstituteofmentalhealth
+ @{National Institute of Mental Health}}},
+\end{verbatim}
+then this organization gets two separate entries in the author index, which
+is incorrect. Instead, if we copy them literally,
+\begin{verbatim}
+ firstkey = {{National Institute of Mental Health
+ [NIMH]}\corporateAX{nationalinstituteofmentalhealth
+ @{\bibcorporate{National Institute of Mental Health}}}},
+ key = {{NIMH}\corporateAX{nationalinstituteofmentalhealth
+ @{\bibcorporate{National Institute of Mental Health}}}},
+\end{verbatim}
+then everything is as desired. The additional spaces before the ``\verb+@+''
+sign make no difference, but percentage signs should not be included in
+the \fname{.bib} file at the end of lines to hide a line break (as in
+\LaTeX{}), because \BibTeX{} does not recognize the percentage sign as
+a comment. Rather, it includes it in the \fname{.bbl} file and sometimes
+puts additional code behind it, which would then not be read by \LaTeX{}
+because \LaTeX{} does interpret the percent sign as a comment. This
+behavior has now become less likely, because \pkg{apacite} inserts
+numerous line breaks in the \fname{.bbl} file to avoid this problem and,
+more importantly, line breaks inserted by \BibTeX{} at undesired
+locations (e.g., in the middle of a command name or in the argument of
+a \cmd{\url} command), but is still a possibility.
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\section{Annotated bibliographies}
+\label{sec:annotate}
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+Annotated bibliographies can be obtained by requesting
+\begin{verbatim}
+\bibliographystyle{apacann}
+\end{verbatim}
+instead of
+\begin{verbatim}
+\bibliographystyle{apacite}
+\end{verbatim}
+or
+\begin{verbatim}
+\bibliographystyle{apacannx}
+\end{verbatim}
+instead of
+\begin{verbatim}
+\bibliographystyle{apacitex}
+\end{verbatim}
+The \BibTeX{} style files \fname{apacann.bst} and \fname{apacannx.bst} are
+almost identical to \fname{apacite.bst} and \fname{apacitex.bst}, respectively.
+The only relevant difference is that these styles include the contents of the
+\fieldname{annote} or \fieldname{annotate} field in the output, thereby
+generating an annotated bibliography.
+
+According to \citeA[pp.~810--811]{TLC2}, the \pkg{annotation} style uses the
+\fieldname{annote} field for annotations, whereas the \pkg{annotate} style
+defines the \fieldname{annotate} field for this purpose. To be compatible with
+both, \pkg{apacann} and \pkg{apacannx} support both of these fields. However,
+they are not both included in the output for the same reference, in case
+someone wants to make a file that is compatible with both the \pkg{annotate}
+and \pkg{annotation} styles and thus duplicates the information. In such a case,
+the contents of the \fieldname{annote} field is included in the output.
+
+\DescribeEnv{APACrefannotation}
+The annotation is inserted in the \fname{.bbl} file within a
+\envirname{APACrefannotation} environment. Hence, its formatting can be
+changed by the user by redefining this environment.
+
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\section{Auxiliary, ad hoc, and experimental commands in
+ \fname{apacdoc.sty}}
+\label{sec:apacdoc}
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+Section~\ref{sec:xmpl} below cites all examples from the APA manual.
+This is a test of \pkg{apacite} and a proof that it does what it's
+supposed to do---format citations and reference lists complying with
+the APA rules. However, the APA manual discusses many nonstandard
+issues and several of them need nonstandard treatment. Some of these
+can only be formatted by what I call ``tricking'' the system. This
+has been done by defining several \LaTeX{} commands that are too
+specifically tailored for a certain reference, or ad hoc in other
+ways, or more generally experimental and not well tested, and likely
+to lead to more (compatibility) errors. Therefore,
+I do not consider these commands suitable for inclusion in the
+\pkg{apacite} package proper, that is, the file \fname{apacite.sty}.
+
+They are not important enough for that, and thus you would rarely need
+them, and for most of them I anticipated (or hoped) at one point that
+better solutions would be available in the future. Thus, it seemed
+quite likely that major changes in these commands would be made,
+and I didn't want to feel obliged to keep supporting them for backwards
+compatibility. Rather, I considered these as illustrations of the
+power of \LaTeX{} and templates that users can base their own tricks
+upon. I still largely feel the same way about these commands, although
+I'm not convinced anymore that within reasonable time I will come up
+with elegant solutions that make them obsolete. Nevertheless, I still
+make improvements in this direction.
+
+These auxiliary, ad hoc, and experimental commands are defined in a
+supplementary package file, \fname{apacdoc.sty}. As
+this name indicates, it is a package that is intended to be used
+for the \pkg{apacite} documentation (i.e., the current document).
+It contains several commands and settings (like page margins) that
+are not interesting outside this document. However, as mentioned
+above, I needed many of the commands defined in this file for the
+examples in section~\ref{sec:xmpl}. Thus, you might encounter
+similar situations as well, and these commands may be useful for you.
+
+Because most of the commands in \fname{apacdoc.sty} will not be
+useful for you, it is generally not a good idea to load this file with
+\cmd{\usepackage} to use the commands that are useful to you.
+Instead, if you want to use them, you can copy their definitions
+to the top of your own document or personal style file (say,
+\fname{mysettings.sty}), study their behavior, and perhaps improve
+them. This reflects the ``illustration'' or ``template'' nature
+of these commands.
+
+Accordingly, this section briefly mentions the commands that may
+be useful outside the context of the current document. Thorough
+documentation is outside the scope of this manual; their definitions
+can be studied in the source code of \fname{apacdoc.sty}, and their
+usage is illustrated in section~\ref{sec:xmpl}. I will mildly
+support them, though: If you want to use them, you can ask me
+questions, but I will not put as much effort in fixing possible
+problems as I do with proper \pkg{apacite} issues.
+
+The list below mentions (some of) the numbered examples in
+section~\ref{sec:xmpl} in which the commands are used.
+\begin{description}
+
+\item[\cmd{\biblecite}]
+\DescribeMacro{\biblecite}
+\DescribeMacro{\bibleciteA}
+\DescribeMacro{\bibleciteNP}
+\DescribeMacro{\fullbiblecite}
+\DescribeMacro{\fullbibleciteA}
+\DescribeMacro{\fullbibleciteNP}
+\DescribeMacro{\shortbiblecite}
+\DescribeMacro{\shortbibleciteA}
+\DescribeMacro{\shortbibleciteNP}
+This command, and its siblings \cmd{\bibleciteA}, \cmd{\bibleciteNP},
+\cmd{\fullbiblecite}, \cmd{\fullbibleciteA}, \cmd{\fullbibleciteNP},
+\cmd{\shortbiblecite}, \cmd{\shortbibleciteA}, and
+\cmd{\shortbibleciteNP} are commands for citing the Bible. They
+have one mandatory argument: the relevant chapter and verse, for
+example, |\biblecite{1~Cor.\ 13:1}| (ex.~3.100-3).
+
+\item[\cmd{\bibleversion}]
+\DescribeMacro{\bibleversion}
+This defines the version of the Bible used:
+|\bibleversion{Revised Standard Version}|. Use this before using
+the bible citing commands, typically in the preamble of your document.
+Note that the Bible is not included in the reference list. You can use
+these commands as templates for references to other ``classic'' works.
+See ex.~3.100-3.
+
+\item[\cmd{\citesong}]
+\DescribeMacro{\citesong}
+\DescribeMacro{\citeAsong}
+\DescribeMacro{\citesongNP}
+\DescribeMacro{\fullcitesong}
+\DescribeMacro{\fullciteAsong}
+\DescribeMacro{\fullcitesongNP}
+\DescribeMacro{\shortcitesong}
+\DescribeMacro{\shortciteAsong}
+\DescribeMacro{\shortcitesongNP}
+This command and its siblings \cmd{\citeAsong}, \cmd{\citesongNP},
+\cmd{\fullcitesong}, \cmd{\fullciteAsong}, \cmd{\fullcitesongNP},
+\cmd{\shortcitesong}, \cmd{\shortciteAsong}, and \cmd{\shortcitesongNP}
+cite a song as required by the APA (except for the relative
+placement of closing quotes and comma). See ex.~69.
+
+\item[\cmd{\bibsong}]
+\DescribeMacro{\bibsong}
+For \cmd{\citesong} and its siblings, the \fieldname{key} field
+(and possibly \fieldname{firstkey}) should contain the relevant
+information in the form of a protected \cmd{\bibsong} command:
+\begin{verbatim}
+ key = {{\protect\bibsong{author}{year}{song title}{track info}}},
+\end{verbatim}
+See ex.~69.
+
+\item[\cmd{\bibInstring}]
+\DescribeMacro{\bibInstring}
+This command has one argument. The macro changes the definition of
+the macro \cmd{\BIn} to the argument and then immediately changes
+the definition back to the old definition. So it makes a one-time
+change. Used to change ``In'' a book to ``On'' a CD for citing songs.
+See ex.~69.
+
+\item[\cmd{\BOn}]
+\DescribeMacro{\BOn}
+``On'', for citing songs ``On'' a CD. See ex.~69.
+
+\item[\cmd{\DSMcite}]
+\DescribeMacro{\DSMcite}
+\DescribeMacro{\DSMciteA}
+\DescribeMacro{\DSMciteNP}
+\DescribeMacro{\DSMfullcite}
+\DescribeMacro{\DSMfullciteA}
+\DescribeMacro{\DSMfullciteNP}
+\DescribeMacro{\DSMshortcite}
+\DescribeMacro{\DSMshortciteA}
+\DescribeMacro{\DSMshortciteNP}
+This command and its siblings \cmd{\DSMciteA}, \cmd{\DSMciteNP},
+\cmd{\DSMfullcite}, \cmd{\DSMfullciteA}, \cmd{\DSMfullciteNP},
+\cmd{\DSMshortcite}, \cmd{\DSMshortciteA}, and \cmd{\DSMshortciteNP}
+cite the DSM. See ex.~29. They can also be used for other
+``named'' works. \pkg{natbib} offers a similar functionality
+through the definition of an \emph{alias}, but I think that to
+get this working in the way the APA wants (i.e., the alias is not
+used for the first citation, but only for second and subsequent
+citations), it cannot be directly used. But the technical
+implementation of its functionality may form a useful basis
+for a better (more elegant) solution for this type of citation.
+
+\item[\cmd{\bibDSM}]
+\DescribeMacro{\bibDSM}
+For \cmd{\DSMcite} and its siblings, the \fieldname{key} field
+(and possibly \fieldname{firstkey}) should contain the relevant
+\cmd{\bibDSM} command:
+\begin{verbatim}
+ key = {{\bibDSM{American Psychiatric Association}{Diagnostic
+ and Statistical Manual of Mental Disorders}{4th
+ ed.\hbox{}}{DSM-IV}}},
+\end{verbatim}
+See ex.~29.
+
+\item[\cmd{\DSMauthor},
+\cmd{\DSMfulltitle},
+\cmd{\DSMedition},
+\cmd{\DSMshorttitle}]
+\DescribeMacro{\DSMauthor}
+\DescribeMacro{\DSMfulltitle}
+\DescribeMacro{\DSMedition}
+\DescribeMacro{\DSMshorttitle}
+These four commands extract the four elements of a \cmd{\bibDSM}
+command. They are used in the \cmd{\DSMcite} command and its
+siblings, but may occasionally be useful by themselves.
+
+\item[\cmd{\bibliteral}] \DescribeMacro{\bibliteral}
+This command is used in some of the examples in
+section~\ref{sec:xmpl} to put some literal text into the
+reference list that would otherwise be abbreviated to a
+single ``initial'' at the \BibTeX{} stage. For example, in
+ex.~4.08, the authors are ``Bulatao, E. (with Winford, C.~A.)'',
+where ``(with Winford, C.~A.)'' is inserted by wrapping it
+in a \cmd{\bibliteral} command, which itself is wrapped in
+an additional pair of braces, so that \BibTeX{} treats it a
+a complicated ``accent'' and the argument as a complicated
+single character. This text should not be put in the author
+index, and therefore some manipulation through redefining
+the meaning of this command before and after the reference
+list is used to suppress this text, as well as an additional
+period, there. Used in examples 4.08, 65, 66, 68, and 70.
+
+\item[\cmd{\bibinitial}] \DescribeMacro{\bibinitial}
+This command is similar to \cmd{\bibliteral}. It is used in
+one example (ex.~67), where the ``author'' is a ``(Producer)'',
+but the initial of the author is put in the text because there
+is another author with the same surname (Miller). This
+causes problems not encountered in the examples where
+\cmd{\bibliteral} is used, and after a lot of trial and error,
+the current definition of \cmd{\bibinitial} was developed
+to format this particular author correctly in text, reference
+list, and author index. It looks like this is an improved
+version of the \cmd{\bibliteral} command, so perhaps in the
+next release I'll use \cmd{\bibinitial} for all the examples
+in which now \cmd{\bibliteral} is used.
+
+\item[\cmd{\bibreftext}] \DescribeMacro{\bibreftext}
+This command takes two arguments. By default, it ignores the
+first and inserts the second in the output. In this manual,
+it is redefined before the reference list to ignore its
+second argument and insert the first argument in the output.
+This is used in ex.~17, where the year in the in-text
+citation should be ``1992/1993'', whereas in the reference
+list, it should be 1992 (and the 1993 is mentioned elsewhere).
+For reprints and translations, this is handled automatically
+by \pkg{apacite} if you use the \fieldname{original*} fields,
+but this one is different.
+
+\item[\cmd{\Dutchvon}] \DescribeMacro{\Dutchvon}
+This command is equivalent to \cmd{\bibreftext}, but is used
+for a different situation, and therefore, depending on
+language, subtle style differences, and other preferences,
+you might want to change the definition of one but not of
+the other. This one illustrates how the Dutch way to treat
+``von'' parts of surnames can be handled. It is discussed
+in ex.~B-2, although it is not actually used in the examples,
+because the Dutch way to treat ``von'' parts is not APA
+style.
+
+\item[\cmd{\SwapArgs}] \DescribeMacro{\SwapArgs}
+This command takes two arguments and swaps their order. This
+is useful if you cite a work whose title, (corporate) author,
+or other element starts with an article that should be
+disregarded for ordering. \pkg{apacite} disregards ``a'',
+``an'', and ``the'' in the sorting of titles, but these are
+obviously English. For French, you could say
+\begin{verbatim}
+ title = {\SwapArgs{Marseillaise}{La }},
+\end{verbatim}
+which is thus alphabetized under M. (Not used in the examples.)
+
+\item[\cmd{\swallownext}] \DescribeMacro{\swallownext}
+Eats up the next character. Dangerous but sometimes useful.
+Used in the definitions of some of the following commands.
+
+\item[\cmd{\swallowdot}] \DescribeMacro{\swallowdot}
+Eats up the next character, but only if it's a dot (`.').
+Used in the definitions of some of the following commands.
+
+\item[\cmd{\bibnodot}] \DescribeMacro{\bibnodot}
+Used as |\bibnodot{.}|. Eats the period, but prevents \BibTeX{}
+from adding one. Used in examples 78, 79, 87, 91, and 95.
+This is likely to be useful for many users, and is stable, so it
+may be upgraded to \fname{apacite.sty} in the next release of
+\pkg{apacite}. The only thing against this is that it is used in
+highly unelegant manual formatting of a fairly large piece of the
+description of a reference to a website in a
+\fieldname{howpublished} field. I'd prefer to avoid this, but that
+would require either adding another idiosyncratic field or even
+less elegant trickery in the \fname{.bib} file.
+
+\item[\cmd{\bibskipbracenodot}] \DescribeMacro{\bibskipbracenodot}
+Suppresses the period after a subsequent closing brace. Quickly leads
+to errors because it uses very low level \TeX{} code that (locally)
+changes some fundamental settings. This is used in some examples
+(65, 68) where \cmd{\bibliteral} is used to insert a description
+of a first ``author'', such as ``(Producer)''. This is
+interpreted by \BibTeX{} as a complicated one-letter first
+name, and thus it adds a period to make it into an initial.
+This period is the one that's eaten by this command.
+Used in examples 65 and 68.
+
+\item[\cmd{\indexskipbracenodot}] \DescribeMacro{\indexskipbracenodot}
+This serves the same purpose as \cmd{\bibskipbracenodot}, and it
+uses the same code, but whereas \cmd{\bibskipbracenodot} is
+activated for the reference list, \cmd{\indexskipbracenodot}
+is only activated for the author index. This has technical
+reasons and it does not work under all circumstances. Used in
+examples 4.08-3, 65, 66, and 68.
+
+\item[\cmd{\APACredefineOnce}] \DescribeMacro{\APACredefineOnce}
+This macro takes two arguments: (1) the name of a command (without the
+backslash) and (2) arbitrary \TeX{} code. It then redefines the
+command (1) to the \TeX{} code (2) as a one-time change, so after the
+command (1) has been invoked once, it reverts to its definition before
+\cmd{\APACredefineOnce} was issued. This can be used to redefine, say,
+\cmd{\BRetrievedFrom} from ``Retrieved from'' to ``Retrieved from
+Poverty Alleviation website'' for a single reference but restore it
+to ``Retrieved from'' immediately afterwards.
+
+\item[\cmd{\bibeditortype}] \DescribeMacro{\bibeditortype}
+This has one argument. The macro changes the definitions of the macros
+\cmd{\BED} and \cmd{\BEDS} to the argument and then immediately
+changes the definitions back to their old definitions. So it makes a
+one-time change. This is used when there is someone in an ``editor-type''
+role, but with another designation, such as ``producer'' or ``director''.
+Ex.\ 36, 67, and 68.
+
+\item[\cmd{\renewbibeditortype}] \DescribeMacro{\renewbibeditortype}
+The above-mentioned definition of \cmd{\bibeditortype} is only relevant
+in the reference list: In the citations in the text and in the author
+index, the command should do nothing. Therefore, the command is
+initially defined as ``nothing''. The definition discussed above is
+initialized by \cmd{\renewbibeditortype}. This command is executed
+just before the reference list in the current document. (After the
+reference list, \cmd{\bibeditortype} becomes ``nothing'' again.)
+
+\item[\cmd{\BAbstractRetrieved}] \DescribeMacro{\BAbstractRetrieved}
+This command is similar to \cmd{\BRetrieved}, except that it
+inserts ``Abstract retrieved'' instead of ``Retrieved''. Used in
+examples 82 and 83.
+
+\item[\cmd{\BmakeAbstractRetrieved}]
+\DescribeMacro{\BmakeAbstractRetrieved}
+This command functions much like \cmd{\bibeditortype}: It replaces
+the next instance of \cmd{\BRetrieved} by \cmd{\BAbstractRetrieved}.
+Used in examples 82 and 83.
+
+\item[\cmd{\noedition}] \DescribeMacro{\noedition}
+Suppresses the ``ed.'' (or ``\cmd{\BEd}'', rather) of an
+\fieldname{edition}. Used in examples 92 and 94 to format a
+string like ``Version~4'' as an \fieldname{edition}.
+
+\item[\cmd{\APACmanBeforeBib}] \DescribeMacro{\APACmanBeforeBib}
+Illustrates how some of the commands defined above are used in practice:
+This command is given just before the \cmd{\bibliography} command, and
+redefines some of the commands above, so that their meaning
+is different in the reference list from their meaning in the main text.
+Similar commands: \cmd{\APACmanBeforeIndex}, \cmd{\APACmanAfterIndex}.
+
+\end{description}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\section{Known problems and todo-list}
+\label{sec:todo}
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+With any kind of software, there is usually a list with known problems (bugs)
+and desirable future work (to-do), and \pkg{apacite} is no exception. These
+subjects will be discussed in this section.
+
+A class of problems was already discussed in section~\ref{sec:compat} above.
+This concerns the incompatibility of the \fname{.bib} file with other citation
+styles, through \pkg{apacite}-specific fields, APA-specific contents of
+fields, or through special tricks. These lead to correctly formatted
+references in APA style, but may cause problems with using the \fname{.bib}
+file with other styles (in case APA journals reject your article~\ldots). As
+discussed there, however, this problem is unavoidable and presumably not a
+very big problem to most users.
+
+An incomplete list of other known problems and things that I would
+like to do with \pkg{apacite} follows below. Several items of this list
+are the direct result of the tricks I had to use for the examples in
+section~\ref{sec:xmpl} below.
+\begin{itemize}
+\item Fix a bug (which is unlikely to show up) in the \fname{.bst} file:
+ If there are two or more references, published in the same year, each
+ with 6 authors, the first 5 of which are the same but the 6th authors
+ are different, then these lead to ambiguous citations. The same thing
+ happens when one has 6 authors and another 7, with the same first 6
+ authors.
+\item In an \entryname{unpublished} entry, if \fieldname{author} and
+ \fieldname{organization} are equivalent, maybe we should replace
+ the latter with
+ ``Author'' in the output, analogous to the situation where
+ \fieldname{publisher} or \fieldname{institution} are equal to
+ \fieldname{author} in several of the other entry types.
+\item Solve several other rare cases where \pkgoption{apacite} does not
+ correctly implement the APA rules: (p.~175) If additional authors
+ are needed to resolve an ambiguity, end with ``et al.\hbox{}'',
+ even if this is only one author; (p.~179) citing the Qur'an;
+ (p.~184) same last name and same initials, but different first name;
+ (p.~185) ``ca.\hbox{}''; (p.~198) Advance online publication;
+ (p.~202) Abstract retrieved from; (pp.~208, 212) better deal with
+ named archives; (p.~214) uncertain author;
+ update the language files (\fname{.apc}) with correct definitions
+ of new text string commands; finish the examples file.
+ Many of these cases will not be a feature, but an ad-hoc workaround,
+ similar to the tricks that are described in section~\ref{sec:xmpl}.
+ Please contact me if you encounter any of these (or other
+ formatting errors) and need a workaround.
+\item Study referencing legal materials (Appendix~7.1).
+\item Support nonstandard types of authors, like ``Director'' and
+ ``Series Ed.\hbox{}''. This currently must be tricked in a
+ nonelegant way. Perhaps I (or you) can think of a better solution.
+\item If a work is authored by someone, ``with'' someone else: This
+ currently must be tricked in a nonelegant way. Perhaps I (or you)
+ can think of a better solution.
+\item Add more options and/or commands for easier customization of reference
+ list and author index.
+\item Continue with transferring reference list formatting code from
+ \BibTeX{} to \LaTeX.
+\item Introduce options for the \BibTeX{} part, e.g., index vs.\ noindex (so
+ that \fname{apacitex.bst} becomes superfluous); full first names
+ instead of only initials, or perhaps options for putting initials
+ in front of (2nd and later) author names; unsorted reference lists
+ or lists sorted chronologically (forward or reverse; for CVs); etc.
+\item Extend the \cmd{\bibcorporate} command with an optional argument that
+ gives the abbreviated form, so that the \fieldname{firstkey} and
+ \fieldname{key} fields do not have to be used for this common situation.
+\item Define \BibTeX{} macros or strings for commonly encountered
+ journals (at least the APA journals).
+\item Allow \fieldname{lastchecked} fields of the form |2009-02-01| and/or
+ |2009/02/01| and/or other schemes, and translate these into
+ language-specific date strings.
+\item Rewrite and reorganize the documentation; perhaps create a ``getting
+ started'' document.
+\item Improve the source code documentation, esp.\ the formatting,
+ indexing, and cross-referencing. (You only see this if you regenerate
+ this manual with the \cmd{\AlsoImplementation} flag set.)
+\end{itemize}
+Quite likely, other problems will come up when using the current version of
+\pkg{apacite}. I have lots of ideas for improvements, extensions, options, and
+so forth, but not much time to devote to it. Therefore, it is difficult to give
+a good estimate of when I will release a new update. However, in the meantime,
+if you have questions, remarks, suggestions, or bug reports, you can e-mail them
+to me.
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\section{Examples of the APA manual}
+\label{sec:xmpl}
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+{\bfseries Note: the text of this section has not been updated and
+reflects the working of the [2009/03/01] version of \pkg{apacite}
+vis-\`a-vis the 5th edition of the APA manual. The actual formatting
+is done by the current version of \pkg{apacite} and thus may not
+correspond to the text. This section is retained for the moment, because
+the majority may still be relevant and I haven't finished incorporating
+the examples from the 6th edition yet, and because it describes various
+workarounds and tips that may still be useful.}
+
+In this section, the \pkg{apacite} package is tested by citing the examples of
+the 5th edition of the APA manual \cite[pp.~207--281]{APAManual5}, and some
+additional references for additional purposes.
+
+The following list gives the examples from chapter~3 of the 5th edition of
+the APA manual, with
+section number. For these and all later examples, whenever I thought it
+necessary or desirable, I added some comments. These are indicated by the \EM{}
+symbol. Especially for later examples (from Chapter~4), the comments frequently
+pertain to the corresponding reference list entry.
+
+\begin{itemize}
+\item[3.94] \citeA{3.94-1} compared reaction times\\
+ In a recent study of reaction times \cite{3.94-1}\\
+ In \citeyearNP{3.94-1} \citeauthor{3.94-1} compared
+ reaction times\\
+ In a recent study of reaction times, \citeA{3.94-1}
+ described the method\ldots. \citeauthor{3.94-1} also found
+\item[3.95] \citeA{3.95-1} found\\
+ \citeA{3.95-1} found\\
+ \citeauthor{3.95-1} found\\
+ \fullcite{3.95-2} and \fullcite{3.95-3}\\
+ \citeA{3.95-2} and \citeA{3.95-3}\\
+ \EM It seems that if ``et al.\hbox{}'' would refer to one additional
+ author, then this author is named instead of the ``et al.\hbox{}''
+ clause.\\
+ \citeA{3.95-4} and \citeA{3.95-5}\\
+ as \citeA{3.95-6} demonstrated\\
+ \EM The comma after ``Nightlinger'' in the reference list
+ does not look right, but is explicitly required by the APA.
+ Of course, with people as authors,
+ one almost always has initials (although I have seen
+ an example of an econometrician who only had
+ one name), so this problem is not likely to occur.
+ With nicknames (``screen names'' as they are called in the
+ APA manual below ex. 85) in messages to newsgroups, initials
+ are typically missing, but then there is usually (always?)
+ only one author, so the problem does not exist either.
+ The problem can, however, come up when there are two authors,
+ the first of which is a corporate author, or with artists,
+ e.g., the song ``Into the Groove'' is written by
+ Madonna and Stephen Bray. \\
+ as has been shown \cite{3.95-7}
+\item[3.96] \cite{3.96-1}\\
+ \cite{3.96-1}\\
+ \cite{3.96-2}\\
+ \EM If the \fieldname{firstkey} field is different for different
+ references
+ and the \fieldname{key} field is the same, then, analogous
+ to the use of extra authors in 3.95 above, \pkg{apacite}
+ uses the \fieldname{firstkey} field for all citations:\\
+ \citeA{3.96-3}, \citeA{3.96-4}, \citeA{3.96-5}, \citeA{3.96-6};\\
+ \citeA{3.96-3}, \citeA{3.96-4}, \citeA{3.96-5}, \citeA{3.96-6}.\\
+ Although this is a constructed example, these organizations
+ really exist. The ``Koninklijke Nederlandse Schaakbond''
+ is the Royal Dutch Chess Association and the
+ ``Koninklijke Nederlandse Schaatsbond'' is the Royal Dutch
+ Skating Association. Both are abbreviated to KNSB and
+ presumably, both publish an annual report each year.
+ Furthermore, in these examples, I copied the contents of the
+ \fieldname{author} field to the \fieldname{publisher} field.
+ \pkg{apacite} recognizes this and puts the APA-requirement
+ ``Author'' as publisher description in the reference list.
+ Other styles may prefer the full publisher name again.
+\item[3.97] on free care \cite{3.97-1}\\
+ \EM The order of the
+ closing quotes and the comma is different from the
+ APA manual. I think this one is more logical, although the
+ APA manual's is the conventional one, presumably for
+ aesthetic reasons. I hope to implement this in a future
+ version.\\
+ the book \citeA{3.97-2}\\
+ \cite{3.97-3}\\
+ \EM If two articles both have no author and the title and
+ the year are the same, a's and b's should be used:
+ \citeA{3.97-4}, \citeA{3.97-5}, and \citeA{3.97-6}.
+ The latter two entries are correctly sorted by month,
+ through the way the month macros are defined in
+ the \fname{.bst} files.
+\item[3.98] \citeA{3.98-1} and \citeA{3.98-2} also found\\
+ \citeA{3.98-3} and \citeA{3.98-4} studied
+\item[3.99] Past research \cite{3.99-1,3.99-2}\\
+ Past research \cite{3.99-3,3.99-4,3.99-5}\\
+ Several studies
+ \cite{3.99-6,3.99-7,3.99-8,3.99-9,3.99-10,3.99-11}\\
+ Several studies \cite{3.99-12,3.99-13,3.99-14}\\
+ \EM \pkg{apacite} does not (yet?) sort the cited
+ references in the text (of course it does for the reference
+ list), as required by the APA manual.\\
+ (\citeNP{3.99-15}; see also \citeNP{3.99-16,3.99-17})\\
+ \EM Note that I had to use \cmd{\citeNP} here.
+\item[3.100] \cite{3.100-1}\\
+ \EM This is not an example, but a rule in the text.
+ The ``\bibnodate'' is handled by the \cmd{\bibnodate}
+ macro. It is not clear whether it is really meant that the
+ in-text form is \citeauthor{3.100-1}, \citeyearNP{3.100-1}
+ or the more logically consistent \citeA{3.100-1}.
+ The former can (currently) only be accomplished by using
+ \cmd{\citeauthor} and \cmd{\citeyearNP} explicitly,
+ whereas the latter is simply obtained by \cmd{\citeA}.\\
+ \cite{3.100-1b}\\
+ \EM Again, this is not an example, but a rule in the text.\\
+ \cite{3.100-2}\\
+ \citeA{3.100-3}\\
+ \EM For citations to the bible, I used \cmd{\biblecite} and
+ several obvious variations on it, as discussed in
+ section~\ref{sec:apacdoc}:\\
+ \cmd{\bibleciteA}, first cite: \bibleciteA{1 Cor.\ 13:1}\\
+ \cmd{\bibleciteA}, second cite: \bibleciteA{1 Cor.\ 13:1}\\
+ \cmd{\biblecite}, first cite: \fullbiblecite{1 Cor.\ 13:1}\\
+ \cmd{\biblecite}, second cite: \biblecite{1 Cor.\ 13:1}\\
+ (\cmd{\bibleciteNP}, first cite:
+ \fullbibleciteNP{1 Cor.\ 13:1} and some text surrounding it)\\
+ (\cmd{\bibleciteNP}, second cite:
+ \bibleciteNP{1 Cor.\ 13:1} and some text surrounding it)\\
+ \EM Here, there probably should be a comma if it's the first
+ cite and not a comma when it's a later cite. A difficult one.\\
+ \EM Ancient Greek and Roman works should be treated similarly,
+ i.e., not be listed in the reference list. But it seems to me
+ that title and/or author must be given in the text as well.
+ Maybe I will try to construct a tentative example of this in
+ a future release.
+\item[3.101] \cite[p.~332]{3.101-1}\\
+ \cite[Chapter~3]{3.101-2}\\
+ \EM If you like, you can use the \pkg{apacite}-defined
+ abbreviation commands \verb+\BPG+ and \verb+\BCHAP+.\\
+ \cite[\P~5]{3.101-3}\\
+ \cite[Conclusion section, para.~1]{3.101-4}
+\item[3.102] \EM Personal communication is not really citation and should
+ be done manually:\\
+ T.~K. Lutes (personal communication, April 18, 2001)\\
+ (V.-G. Nguyen, personal communication, September 28, 1998)
+\item[3.103] \cite<see Table~2 of>[for complete data]{3.103-1}
+\end{itemize}
+
+\noindent
+Chapter~4 of the APA manual deals with the reference list
+and only mentions some in-text citation issues in passing.
+Therefore, the rest mainly requires a lot of moving back and forth
+between the reference list and this part. I start with the
+more general part, sections 4.01--4.15, presented similar to
+the sections from chapter~3 as presented above.
+\begin{itemize}
+\item[4.04] \EM First, some examples mentioned in the text:\\
+ \citeA{4.04-t1},
+ \citeA{4.04-t2},
+ \citeA{4.04-t3},
+ \citeA{4.04-t4},
+ \citeA{4.04-t5},
+ \citeA{4.04-t6},
+ \citeA{4.04-t7},
+ \citeA{4.04-t8},
+ \citeA{4.04-t9}\\
+ \EM The APA manual states that prefixes must be treated
+ according to the rules of the language of origin. These rules
+ can differ a lot between languages (and countries) and it
+ is impossible to know all these rules. The APA manual gives two
+ examples, one in which ``De Vries'' is treated as the surname,
+ and one in which ``Helmholtz'' is the surname and ``von'' is
+ the ``von'' part of the name.
+
+ In the former case, the author is referred to as, say, ``De Vries
+ (1999)'' in text and ``De Vries, J. (1999).'', alphabetized under
+ ``D'' in the reference list. In the second example, the author is
+ referred to as, say, ``Helmholtz (1870)'' and listed in the
+ reference list as ``Helmholtz, H. L. F. von. (1870).'',
+ alphabetized under ``H''. To get this right, the author must be
+ defined as
+\begin{verbatim}
+ author = {H. L. F. von Helmholtz},
+\end{verbatim}
+ or
+\begin{verbatim}
+ author = {von Helmholtz, H. L. F.},
+\end{verbatim}
+ then \BibTeX{} will assign the correct parts to the first names,
+ ``von''-part, and last name. The seemingly logical
+\begin{verbatim}
+ author = {Helmholtz, H. L. F. von},
+\end{verbatim}
+ will not be formatted correctly, because ``von'' is now
+ considered to be part of the first names and therefore
+ abbreviated to ``v.''.
+
+ Below, under example B-2, I will further discuss some
+ issues about ``von'' parts.
+
+ \EM The APA manual requires that numerals are alphabetized
+ as if they were spelled out. This is not done by \pkg{apacite},
+ so when applicable should be done by the user, e.g.\ by using
+ the \cmd{\APACSortNoop} command as discussed in
+ section~\ref{subsec:sort}. I give one fictitious example
+ \cite{4.04-t10}.
+
+ \citeA{4.04-1}\\
+ \citeA{4.04-2}\\
+ \citeA{4.04-3}\\
+ \citeA{4.04-4}\\
+ \citeA{4.04-5}\\
+ \citeA{4.04-6}\\
+ \citeA{4.04-7}\\
+ \citeA{4.04-8}\\
+ \citeA{4.04-9}\\
+ \citeA{4.04-10}\\
+ \citeA{4.04-11}\\
+ \citeA{4.04-12}\\
+ \EM As stated in the APA manual, an exception to the rule
+ of sorting by title if author and year are the same occurs
+ when the works are identified as a series. Then ordering
+ the parts of the series sequentially can be done using the
+ \cmd{\APACSortNoop} command.\\
+ \EM Here, it says that only ``A'' and ``The'' are excluded
+ from the sorting (if they are the initial words), but I
+ assume they mean ``An'' as well. This is how it is
+ implemented in \pkg{apacite}.
+
+ \citeA{4.04-13}\\
+ \citeA{4.04-14}\\
+ \EM I have not (yet?) studied referencing legal materials.
+ In the first version of \pkg{apacite}, I defined a
+ \entryname{literal} type, so that the users can
+ literally format such entries themselves. This is still
+ available. However, I think that if you need to refer to
+ legal cases, you can find a way to use the
+ \entryname{misc} type to get it right. I might study this
+ and give examples in a next version of \pkg{apacite}.
+\item[4.05] \citeA{4.05-1}\\
+ \nocitemeta{4.05-2}\citeA{4.05-2}\\
+ \EM Here I used the \cmd{\nocitemeta} command to let
+ \pkg{apacite} know that a meta-analysis is reported and this
+ work is included in it. As you can see, you can still cite
+ the work by using the normal citation commands such as
+ \cmd{\citeA}.
+\item[4.08] \citeA{4.08-1}\\
+ \citeA{4.08-2}\\
+ \citeA{4.08-3}\\
+ \EM To obtain the ``(with \dots)'' description in the
+ reference list, I used the \cmd{\bibliteral} command.
+ Furthermore, to get this formatted correctly in the author
+ index, I used the \cmd{\indexskipbracenodot} command to
+ suppress an additional period. These commands are described
+ in section~\ref{sec:apacdoc}.
+
+ To \BibTeX{}, the \cmd{\bibliteral} construction is a complicated
+ accented character, which is the second initial of the author.
+ Consequently, this does not work properly with styles that put
+ the initials \emph{before} the surnames, and care must be
+ exercised with ``junior'' parts (see ex.~70). Furthermore,
+ this construction must be put between a pair of
+ braces in order for \BibTeX{} to treat it as an accented letter,
+ instead of abbreviating it.
+\item[4.09] \citeA{4.09-1}
+\item[4.10] \citeA{4.10-1}\\
+ \citeA{4.10-2}
+\item[4.11] \citeA{4.11-1}\\
+ \citeA{4.11-2}\\
+ \EM Note that in the \fname{.bib} file, the ``junior'' part comes
+ directly after the surname and a comma, with the initials
+ after the ``junior'' part, whereas in the formatted
+ reference list, the more logical order \opt{surname},
+ \opt{initials}, \opt{junior}, is used.
+\item[4.12] \citeA{4.12-1}
+\item[4.13] \citeA{4.13-1}\\
+ \EM ``For substantial reference works with a large editorial
+ board, naming the lead editor followed by \texttt{et al.} is
+ acceptable''. This is now implemented in \pkg{apacite} as
+ follows: If there are 7 or more editors, only the first one
+ is named, followed by ``et al.\hbox{}'' \cite{4.13-2}.
+\item[4.15] \citeA{4.15-1}\\
+ \EM Here I used the new \fieldname{url} and
+ \fieldname{lastchecked} fields.\\
+ \citeA{4.15-2}
+\end{itemize}
+
+\noindent
+The rest is from section~4.16, the examples section. The section number
+is omitted, but A--I are used instead for the unnumbered examples. For
+the numbered examples, only the number is given.
+The following enumerated list gives the example number, and
+the two basic in-text citation commands, both in a full and
+short form, of the examples.
+\begin{enumerate}
+\item[A-1] \cite{A-1} \\ \cite{A-1} \\ \fullciteA{A-1} \\ \citeA{A-1}
+\item \cite{ex1} \\ \cite{ex1} \\ \fullciteA{ex1} \\ \citeA{ex1}
+\item \cite{ex2} \\ \cite{ex2} \\ \fullciteA{ex2} \\ \citeA{ex2}
+\item \cite{ex3} \\ \cite{ex3} \\ \fullciteA{ex3} \\ \citeA{ex3}
+\item \cite{ex4} \\ \cite{ex4} \\ \fullciteA{ex4} \\ \citeA{ex4}\\
+ \cite{ex4-2} \\ \cite{ex4-2} \\ \fullciteA{ex4-2} \\ \citeA{ex4-2}\\
+ \EM Note that the list of authors can be finished with
+ ``\verb+and others+'' if there are more than 6 authors, or
+ all authors can be given, in which case \pkg{apacite} truncates
+ the list after the first~6. For compatibility with other styles,
+ the latter is preferable.
+\item \cite{ex5} \\ \cite{ex5} \\ \fullciteA{ex5} \\ \citeA{ex5}
+\item \cite{ex6} \\ \cite{ex6} \\ \fullciteA{ex6} \\ \citeA{ex6}
+\item \cite{ex7} \\ \cite{ex7} \\ \fullciteA{ex7} \\ \citeA{ex7}\\
+ \EM Here, I used
+\begin{verbatim}
+ month = spring,
+\end{verbatim}
+ using the new \verb+spring+ macro defined in the \fname{.bst} files.
+\item \cite{ex8} \\ \cite{ex8} \\ \fullciteA{ex8} \\ \citeA{ex8}\\
+ \EM Here, again, the order of the closing quotes and the
+ following comma should be reversed according to the APA rules.\\
+ \EM The \fieldname{month} field is formatted as
+\begin{verbatim}
+ month = aug # "/" # sep,
+\end{verbatim}
+ which uses the month macros and \BibTeX's concatenation
+ operator `\verb+#+'.
+\item \cite{ex9} \\ \cite{ex9} \\ \fullciteA{ex9} \\ \citeA{ex9}\\
+ \EM Here, again, the order of the closing quotes and the
+ following comma should be reversed according to the APA rules.
+\item \cite{ex10} \\ \cite{ex10}\\ \fullciteA{ex10}\\ \citeA{ex10}
+\item \cite{ex11} \\ \cite{ex11}\\ \fullciteA{ex11}\\ \citeA{ex11}\\
+ \EM Apparently, a weekly newspaper is not a magazine and should
+ therefore include ``p.\hbox{}'' or ``pp.\hbox{}'' in front of
+ the page
+ number(s), whereas a magazine article should not. I do not
+ understand the distinction very well and find it not very
+ useful as well, but will adhere to it. It means that the
+ \entryname{newspaper} type gets the ``pp.\hbox{}'', whereas
+ \entryname{magazine} and \entryname{article}, which are now
+ identical, do not.
+\item \cite{ex12} \\ \cite{ex12}\\ \fullciteA{ex12}\\ \citeA{ex12}\\
+ \EM Here, \verb+\emph{DSM-IV}+ must be entered without an extra
+ pair of braces in the title field; see ex.~73 for the intricacies
+ of braces and \verb+\emph+ in the title field.
+\item \cite{ex13} \\ \cite{ex13}\\ \fullciteA{ex13}\\ \citeA{ex13}\\
+ \EM Here, the \fieldname{number} field is \verb+1, Serial No.~231+.
+\item \cite{ex14} \\ \cite{ex14}\\ \fullciteA{ex14}\\ \citeA{ex14}\\
+ \EM Here, the \fieldname{number} field is \verb+3, Pt.~2+.
+\item \cite{ex15} \\ \cite{ex15}\\ \fullciteA{ex15}\\ \citeA{ex15}
+\item \cite{ex16} \\ \cite{ex16}\\ \fullciteA{ex16}\\ \citeA{ex16}
+\item \cite{ex17} \\ \cite{ex17}\\ \fullciteA{ex17}\\ \citeA{ex17}\\
+ \EM This case is the opposite of the more common situation where a
+ reprint is cited and an original publication year is given. I could
+ implement similar code to handle this case (and I may if I get requests
+ to do this), but for the moment, I decided to trick the system: I
+ used the \cmd{\bibreftext} command mentioned in
+ section~\ref{sec:apacdoc}. It must be called with two
+ arguments. Initially, it places the second argument in the text, but
+ just before the bibliography, its definition is changed so that the
+ first argument is placed in the reference list. By defining
+\begin{verbatim}
+ year = {{\protect\bibreftext{1992}{1992/1993}}},
+\end{verbatim}
+ in the \fname{.bib} file, the year is ``1992'' in the reference
+ list and ``1992/1993'' in the text citations. The \cmd{\protect}
+ is necessary to make sure that the \cmd{\bibreftext} macro is not
+ written out in the label-part of the bibliography, because then
+ only ``1992'' would appear in the text reference. The additional
+ pair of braces are necessary to make sure that the entry
+ is alphabetized correctly. When these are omitted, the entry
+ is alphabetized under the ``P'' of ``protect''. Of course, the
+ latter is only important if the reference list contains
+ multiple works by the same author(s), but the same phenomenon
+ is encountered when the \fieldname{author} or \fieldname{editor}
+ field starts with a command, or when there is no author or editor
+ and the \fieldname{title} field starts with a command, as in
+ the entry \citeA{4.04-t10} introduced in 4.04 above.
+
+ Of course, you can save yourself a lot of trouble by
+ obtaining the original article and citing that.
+\item \cite{ex18} \\ \cite{ex18}\\ \fullciteA{ex18}\\ \citeA{ex18}\\
+ \EM Here, the \fieldname{number} field is \verb+Suppl.~2+.
+\item \cite{ex19} \\ \cite{ex19}\\ \fullciteA{ex19}\\ \citeA{ex19}\\
+ \EM Other styles treat the \emph{Annual Review} as a book
+ (\emph{Sociological Methodology} is an even stronger example),
+ so this is a point where the \fname{.bib} file becomes
+ highly incompatible between styles. This cannot be avoided.
+\item \cite{ex20} \\ \cite{ex20}\\ \fullciteA{ex20}\\ \citeA{ex20}\\
+ \EM Here, the \fieldname{englishtitle} field is used for the
+ English translation of the German title. To get the German
+ capitalization of the title right, the capitalized words must
+ be protected by an additional pair of braces.
+\item \cite{ex21} \\ \cite{ex21}\\ \fullciteA{ex21}\\ \citeA{ex21}\\
+ \EM Apparently, a translator and original publication date
+ do not have to be mentioned here.
+\item Seidenberg and McClelland's study \cite<as cited in>{ex22}\\
+ %\cite{ex22} \\ \cite{ex22}\\ \fullciteA{ex22}\\ \citeA{ex22}\\
+ \EM The APA website (\url{http://www.apastyle.org/faqs.html})
+ mentions that the year should generally also be mentioned,
+ making it a complete cite, except that there is no reference
+ list entry. In my opinion, it would be better to list the
+ complete original work in the reference list as well, in case
+ readers do have access to the original work, but not to the
+ secondary source. But this is not the APA rule. \\
+ \EM You may like to have the authors of the unlisted reference
+ in the author index as well. Use the \cmd{\AX} command for
+ this, as explained in section~\ref{sec:autindex}.
+\item[B-1] \cite{B-1} \\ \cite{B-1} \\ \fullciteA{B-1} \\ \citeA{B-1}
+\item \cite{ex23} \\ \cite{ex23}\\ \fullciteA{ex23}\\ \citeA{ex23}\\
+ \EM Here, and in several other references, I put \verb+\hbox{}+
+ after the ``\verb+Jr.+'', so that \TeX{} does not consider the
+ period as a sentence-ending period.\\
+ \EM \pkg{apacite} now supports only an integer value (``\verb+3+'')
+ in the \fieldname{edition} field, and transforms this to
+ ``3rd''.
+\item \cite{ex24} \\ \cite{ex24}\\ \fullciteA{ex24}\\ \citeA{ex24}\\
+ \EM The APA manual gives a number, which would not ordinarily be
+ done with proper books and which suggests that it could also
+ be treated as a report. In that case, the default
+ ``Tech.\ Rep.\hbox{}''
+ description should be left out, however. This can be accomplished
+ by defining
+\begin{verbatim}
+ type = {\bibnotype},
+\end{verbatim}
+ which flags that the type must be left out, see ex.~42.
+ However, for books, it now works fine leaving the \fieldname{type}
+ field empty and giving the number in the \fieldname{number} field.
+\item \cite{ex25} \\ \cite{ex25}\\ \fullciteA{ex25}\\ \citeA{ex25}\\
+ \EM According to the note after ex.~25 in the APA manual,
+ an edited book with ``just one'' author should list
+ the editor (and translator, when available) after the
+ title, just like the translator. An example of this is
+ \citeA{ex25-t1}. (Should the original years of publication
+ be used here?)
+
+ However, what does ``just one author'' mean here? Does it mean that if
+ there are 2 authors and 1 or more editors, the editors should
+ not be mentioned, or the authors should not be mentioned?
+ Presumably, it means the following:
+ In the default case, an edited book consists of several chapters,
+ with different chapters written by different authors. In this case,
+ the reference to the whole book lists only the editor(s).
+ If every chapter is written by the same author, and there are 1
+ or more editors, their condition holds. I think that if all
+ chapters are written by the same $n$ ($\geq 2$) authors, it should
+ also be treated in this way, i.e., with the authors in the
+ author position and the editor behind the title. A difficult
+ case would appear if the book were a collection of works of, say,
+ 2 authors, with some chapters written by one and some by the
+ other, and some jointly, as in \citeA{ex25-t2}. These choices have
+ to be made by the user, however, \pkg{apacite} will format author,
+ editor, and translator, whenever available.
+\item \cite{ex26} \\ \cite{ex26}\\ \fullciteA{ex26}\\ \citeA{ex26}\\
+ \EM According to section~3.97, the title should be in italics.
+ In this example, in the citation, it is not given in italics,
+ but this must be an error, because they do give it in italics
+ on p.~219 (but give no date there).
+\item \cite{ex27} \\ \cite{ex27}\\ \fullciteA{ex27}\\ \citeA{ex27}\\
+ \EM Here, the \fieldname{edition} field has value
+ ``\verb+Rev.\hbox{}+'' and \pkg{apacite} handles this
+ noninteger value correctly as well.
+\item \cite{ex28} \\ \cite{ex28}\\ \fullciteA{ex28}\\ \citeA{ex28}\\
+ \EM Use the en-dash (``\verb+--+'') and not simply a hyphen
+ (``\verb+-+''), because the latter is not considered to mean
+ ``to'' by \pkg{apacite} (cf.\hbox{} ``Vol.~A-1'').
+\item \EM As mentioned in section~\ref{sec:apacdoc}, \fname{apacdoc.sty}
+ provides the \cmd{\DSMcite} macro and some related
+ alternatives to get the \emph{DSM} references right. On rereading
+ the description in the APA manual, I discovered that previous
+ versions of \pkg{apacite} did not format the first citation
+ correctly, although the description is a bit ambiguous as to
+ how exactly the first citation should be formatted. Therefore,
+ I looked at a recent issue of
+ \emph{Journal of Abnormal Psychology}, \emph{116}(3); and
+ \emph{Psychological Assessment}, \emph{19}(2). These show
+ some slight variations, some of which have good reasons, but
+ others seem arbitrary. In all articles I looked at, the first
+ citation was an in-text citation, and the following form was
+ the most frequently used, and thus implemented in
+ \fname{apacdoc.sty}:\\
+ \cmd{\DSMciteA}, first citation: \DSMciteA{ex29} \\
+ \EM The following citations then only use the abbreviated title:\\
+ \cmd{\DSMciteA}, second citation: \DSMciteA{ex29} \\
+ \EM Because I haven't found a parenthetical first cite, I
+ have to use some logic and common sense to define it:\\
+ \cmd{\DSMcite}, first citation: \DSMfullcite{ex29} \\
+ \EM Subsequent parenthetical cites are formatted as\\
+ \cmd{\DSMcite}, second citation: \DSMcite{ex29} \\
+ \EM Finally, here are ``\verb+NP+'' versions of them:\\
+ \cmd{\DSMciteNP}, first citation: \DSMfullciteNP{ex29} \\
+ \cmd{\DSMciteNP}, second citation: \DSMciteNP{ex29} \\
+ To use these citation commands, you have to provide a
+ \fieldname{key} field that contains a \cmd{\bibDSM}
+ command:
+\begin{verbatim}
+ key = {{\bibDSM{American Psychiatric Association}{Diagnostic
+ and Statistical Manual of Mental Disorders}{4th
+ ed.\hbox{}}{DSM-IV}}},
+\end{verbatim}
+ As is evident from this example, the four arguments are
+ author, full title, edition, short title. Thus, because
+ all this information is provided in the \fname{.bib}
+ entry (and not preprogrammed in \pkg{apacite}), it is
+ conceivable that this command is useful for other types
+ of works as well. The generality is a bit limited, though,
+ because all four arguments must be available and have
+ meaningful content (i.e., should not be empty). But it
+ is relatively straightforward to write your own specialized
+ citation commands, based on the \cmd{\DSMcite} code,
+ which do not require all parts to be available.
+
+ However, the \cmd{\DSM*} macros are still very rough. Multiple
+ citations are not handled well, so only one work should
+ be cited with such a macro. Furthermore, the pre- and
+ postfixes (through \verb+<...>+ and \verb+[...]+) are not
+ available. Note also that the edition should be spelled
+ out as ``\verb+4th ed.\hbox{}+''. When I experimented with
+ just ``\verb+4+'', trying to use the \cmd{\PrintOrdinal}
+ function, things went terribly wrong. Even if I put
+ \verb+\PrintOrdinal{4}+ in the \fieldname{key} field, it
+ didn't work. Finally, the ``ed.\hbox{}'' must be added
+ to allow reference to the ``3rd ed., rev.\hbox{}'' and the
+ ``4th ed., text rev.\hbox{}'' as well.
+
+ \EM In some of the articles I studied, ordinary citations
+ were used, esp.\ when page numbers were given in
+ parenthetical cites. Thus, you can also use\\
+ \verb+\cite[p.~25]{ex29}+: \cite[p.~25]{ex29}
+\item \cite{ex30} \\ \cite{ex30}\\ \fullciteA{ex30}\\ \citeA{ex30}\\
+ \EM Here, ``6th ed.'' comes before ``Vols.\ 1--20'', so it is
+ Vols.\ 1--20 of the 6th edition. Pre-[2003/09/05] versions
+ of \pkg{apacite} placed volumes before editions,
+ which is appropriate when different volumes of a series
+ are not updated jointly, so that you may have the 3rd edition
+ of Vol.~2, but only the 1st edition of Vol.~6. Should you
+ want this, you have to trick the system by putting both
+ elements in the \fieldname{edition} field:
+\begin{verbatim}
+ edition = {\BVOLS\ 1--20, 6th},
+\end{verbatim}
+ and leaving the \fieldname{volume} field empty.\\
+ \EM Does the remark about large editorial boards mean that the
+ APA intended to add ``et al.\hbox{}'' here? Anyway, here is an
+ example of such a situation: \citeA{ex30-2}.
+\item \cite{ex31} \\ \cite{ex31}\\ \fullciteA{ex31}\\ \citeA{ex31}
+\item \cite{ex32} \\ \cite{ex32}\\ \fullciteA{ex32}\\ \citeA{ex32}
+\item \cite{ex33} \\ \cite{ex33}\\ \fullciteA{ex33}\\ \citeA{ex33}\\
+ \EM This illustrates that a \fieldname{type} field can be used
+ with a \entryname{book} entry.
+\item[B-2] \cite{B-2} \\ \cite{B-2} \\ \fullciteA{B-2} \\ \citeA{B-2} \\
+ \EM This is a suitable point to discuss ``von'' parts further.
+ One of the editors in the current example is called
+ P. van den Broek. I am Dutch and I recognize this as a Dutch
+ name, so let's assume that this person is Dutch. Let us now
+ consider the situation that this person is the (only) author.
+ Then according to the Dutch rules, this person would be listed in the
+ reference list as ``Broek, P. van den. (1992)'' and listed under ``B'',
+ but referred to in the text as ``Van den Broek (1992)'', including
+ the ``von'' part and capitalizing the first letter. When an
+ initial precedes the ``von'' part (e.g., when there are two
+ primary authors with this surname, but with different initials),
+ then this person would be referred to in the text as
+ ``P. van den Broek (1992)'', including the ``von'' part, but now
+ in lower case. The Dutch rules are very difficult to do right in
+ \BibTeX{}/\LaTeX{} and they conflict with the rules for other
+ languages, and presumably with the rules of the APA, which would
+ require this person to be alphabetized under ``V'', at least.
+
+ For the current editor position, there is no big problem with
+ the APA rules. The ``von'' part can really be put in the ``von''
+ part as recognized by \BibTeX{}, which I did, or it can be enclosed
+ in braces, making the whole last name one part. Either will come
+ out right and the editor will not be referred to in the text
+ anyway. With styles that put the initials behind the surname,
+ it will only work right when put in the ``von'' part. In the
+ author position, however, things are different. Then this author
+ could be formatted as
+\begin{verbatim}
+ author = {Van {\lowercase{D}}en Broek, P.},
+\end{verbatim}
+ where the \verb+{\lowercase{D}}+ construction is used to prevent
+ \BibTeX{} from interpreting it as a ``von'' part, or
+\begin{verbatim}
+ author = {Van{\ }den{\ }Broek, P.},
+ author = {{Van den Broek}, P.},
+\end{verbatim}
+ which in most situations gives the correct version according to the
+ Dutch rules with the correct alphabetizing according to the APA
+ rules. Only in situations when the initial would appear
+ \emph{before} the surname (when there are other authors with the
+ same surname or when using other styles), this would lead to
+ unwanted results.
+
+ If you really want to alphabetize according to the Dutch rules
+ (which is \emph{not} APA in my interpretation), you can use the
+ following trick. \fname{apacdoc.sty} defines a macro \cmd{\Dutchvon}
+ with two arguments, which is equivalent to the \cmd{\bibreftext}
+ macro discussed in ex.~17 above. That is, in the beginning
+ of the document, it is defined as echoing its second argument,
+ and just before the reference list, it is redefined to echo
+ its first argument. Then define the author as
+\begin{verbatim}
+ author = {van den {\protect\Dutchvon{Broek}{Van den Broek}}, P.},
+\end{verbatim}
+ which, combined with the \pkg{apacite} formatting implies
+ that in text, ``Van den Broek'' is used, whereas the author
+ is alphabetized under ``B'' in the reference list, and listed
+ as ``Broek, P. van den''. Of course, we could simply have
+ used \cmd{\bibreftext} again, but that was used to cover a
+ completely different situation, and I can easily imagine that
+ when switching to another citation style, the former application
+ (i.e., 1992/1993) must be kept, but the ``von'' part is handled
+ differently, so that \cmd{\Dutchvon} must be redefined.
+ Based on this example, users should be able to define their
+ own tricks for similar peculiarities.
+
+ Finally, note that in Belgium, where many people
+ speak Dutch as well, it is customary to alphabetize under ``V''
+ anyway (``Van Damme'').
+\item \cite{ex34} \\ \cite{ex34}\\ \fullciteA{ex34}\\ \citeA{ex34}
+\item \cite{ex35} \\ \cite{ex35}\\ \fullciteA{ex35}\\ \citeA{ex35}\\
+ \EM The series title, volume number, and volume title are all
+ put into the \fieldname{booktitle} field.
+\item \cite{ex36} \\ \cite{ex36}\\ \fullciteA{ex36}\\ \citeA{ex36}\\
+ \EM Again, the series title, volume number, and volume title are
+ all put into the \fieldname{booktitle} field.\\
+ \EM I had to use some tricks to get the Series and Volume Editors'
+ descriptions right. The ``(Series Ed.\hbox{})'' is according to
+ \BibTeX{} part of the last name of the first editor,
+ and I used the \cmd{\bibeditortype} macro from
+ \fname{apacdoc.sty} to get the volume editor right.
+ See section~\ref{subsec:fields} for my interpretation of
+ APA's usage of the term ``series''.
+\item \cite{ex37} \\ \cite{ex37}\\ \fullciteA{ex37}\\ \citeA{ex37}\\
+ \EM Note that ``Van'' in the first editor's surname is
+ capitalized here, as in the APA manual. In the original Dutch,
+ this would be in lower case.
+\item \cite{ex38} \\ \cite{ex38}\\ \fullciteA{ex38}\\ \citeA{ex38}
+\item \cite{ex39} \\ \cite{ex39}\\ \fullciteA{ex39}\\ \citeA{ex39}\\
+ \EM Here, it is stated that the translator's name should be put
+ after the editor's name when both are different, but in ex.~40,
+ the translators are put after the title, before the editors.
+ Apparently, if the book is a collection of works by one
+ author(-group), edited and translated, then the translator
+ should come after the editor, but if different chapters
+ are translated by different translators, or perhaps not all
+ are translated works, then the translator should come after
+ the title. Of course, \pkg{apacite} has no way of knowing this.
+ In the current implementation, for an \entryname{incollection},
+ if the editor and translator are the same, they are formatted as
+ in this example, whereas if they are different, they are treated
+ as in ex.~40 below. I think this will be satisfactory in
+ most cases. If you really want the translator after the editor
+ when they are different, you can trick the system in a way
+ similar to ex.~36.
+\item \cite{ex40} \\ \cite{ex40}\\ \fullciteA{ex40}\\ \citeA{ex40}\\
+ \EM See my comments to ex.~39 above.
+
+ A test of the \fieldname{originaljournal} formatting:
+ \citeA{ex40-t1}.
+\item[C-1] \cite{C-1} \\ \cite{C-1} \\ \fullciteA{C-1} \\ \citeA{C-1}\\
+ \EM The APA manual initially formats the number with an
+ en-dash: ``91--5''. When it discusses the number separately,
+ however (p.~256), it uses a single hyphen: ``91-5''. Logically,
+ the latter makes more sense to me (and is generally used in
+ other numbers in the APA manual as well), so that's what I
+ did here. Moreover, if the en-dash would be entered as
+ ``\verb+--+'' in the \fieldname{number} field, \pkg{apacite}
+ would interpret this as ``to'' and insert ``Nos.\hbox{}''
+ instead of ``No.\hbox{}''. Thus, if you want the en-dash,
+ you have to put this in the \fname{.bib} file in a different
+ way, e.g., using the \cmd{\textendash} command.
+\item \cite{ex41} \\ \cite{ex41}\\ \fullciteA{ex41}\\ \citeA{ex41}
+\item \cite{ex42} \\ \cite{ex42}\\ \fullciteA{ex42}\\ \citeA{ex42}\\
+ \EM I used the \cmd{\bibnotype} command to suppress the default
+ ``(Tech.\ Rep.\hbox{})'' description. Actually, I don't think
+ there is anything wrong with calling a report a report, be it
+ ``technical'' by default, or by specifying
+\begin{verbatim}
+ type = {Report},
+\end{verbatim}
+ except that it's not done so in this specific example in the
+ APA manual. But there does not seem to be a rule against it.
+
+ \EM The NTIS information is put in a \fieldname{note} field.
+\item \cite{ex43} \\ \cite{ex43}\\ \fullciteA{ex43}\\ \citeA{ex43}\\
+ \EM The ERIC number is given in the \fieldname{note} field.
+\item \cite{ex44} \\ \cite{ex44}\\ \fullciteA{ex44}\\ \citeA{ex44}
+\item \cite{ex45} \\ \cite{ex45}\\ \fullciteA{ex45}\\ \citeA{ex45}
+\item \cite{ex46} \\ \cite{ex46}\\ \fullciteA{ex46}\\ \citeA{ex46}\\
+ \EM Note that in the example in the APA manual, ``Western Australia''
+ \emph{is} mentioned in the publisher location, whereas their rule
+ explicitly states that this should not be the case in this
+ situation, and they stress that again below the example.
+ Therefore, I did not mention ``Western Australia'' in the
+ \fieldname{publisher} field.
+\item \cite{ex47} \\ \cite{ex47}\\ \fullciteA{ex47}\\ \citeA{ex47}
+\item \cite{ex48} \\ \cite{ex48}\\ \fullciteA{ex48}\\ \citeA{ex48}
+\item \cite{ex49} \\ \cite{ex49}\\ \fullciteA{ex49}\\ \citeA{ex49}
+\item \cite{ex50} \\ \cite{ex50}\\ \fullciteA{ex50}\\ \citeA{ex50}
+\item \cite{ex51} \\ \cite{ex51}\\ \fullciteA{ex51}\\ \citeA{ex51}\\
+ \EM As of this version of \pkg{apacite}, the location of a
+ \entryname{lecture} can be given in the \fieldname{address}
+ field.
+\item \cite{ex52} \\ \cite{ex52}\\ \fullciteA{ex52}\\ \citeA{ex52}
+\item \cite{ex53} \\ \cite{ex53}\\ \fullciteA{ex53}\\ \citeA{ex53}
+\item \cite{ex54} \\ \cite{ex54}\\ \fullciteA{ex54}\\ \citeA{ex54}
+\item \cite{ex55} \\ \cite{ex55}\\ \fullciteA{ex55}\\ \citeA{ex55}\\
+ \EM It seems logical to suppress the original year in the
+ citation if it's the same as the year of the abstract, cf.\
+ the comment to ex.~17 in the APA manual (5th ed., p.~245).
+
+ \EM According to example 54 and the text below it, an ``A''
+ or ``B'' should be added to the volume number of \emph{DAI}
+ of this entry, presumably an ``A'', but because they did not
+ give one, I left it out as well.
+\item \cite{ex56} \\ \cite{ex56}\\ \fullciteA{ex56}\\ \citeA{ex56}
+\item \cite{ex57} \\ \cite{ex57}\\ \fullciteA{ex57}\\ \citeA{ex57}\\
+ \EM In ex.~59, the city should not be mentioned because it is
+ already mentioned in the name of the university. Here, the
+ city \emph{is} mentioned again, which seems contradictory.
+ This is all in the \fname{.bib} file; \pkg{apacite} uses
+ whatever is given there, so this is not a formatting problem
+ for \pkg{apacite} itself.
+\item \cite{ex58} \\ \cite{ex58}\\ \fullciteA{ex58}\\ \citeA{ex58}
+\item \cite{ex59} \\ \cite{ex59}\\ \fullciteA{ex59}\\ \citeA{ex59}\\
+ \EM See ex.~57 for the city issue.
+\item \cite{ex60} \\ \cite{ex60}\\ \fullciteA{ex60}\\ \citeA{ex60}
+\item \cite{ex61} \\ \cite{ex61}\\ \fullciteA{ex61}\\ \citeA{ex61}\\
+ \EM The description of the data goes into the
+ \fieldname{type} field. It may be more logical to put it
+ in the \fieldname{title} field, with some trickery to indicate
+ that it's a description and not a title, but putting it in the
+ \fieldname{type} field already ensures that it's formatted
+ correctly, so I think I'm gonna be lazy on this one. The same
+ applies more or less to reviews (G-1, 63, 64), although there
+ it is logical to put at least ``Review'' in the \fieldname{type}
+ field, so as we're already there, we might as well make it
+ complete.
+\item \cite{ex62} \\ \cite{ex62}\\ \fullciteA{ex62}\\ \citeA{ex62}\\
+ \EM ``Available from'' an address should be spelled out in the
+ \fieldname{note} field, to get the parentheses. ``Available
+ from'' a website is without parentheses, see ex.~95.
+\item[G-1] \cite{G-1} \\ \cite{G-1} \\ \fullciteA{G-1} \\ \citeA{G-1}\\
+ \EM See my comments to ex.~61 above about the logic of the
+ \fieldname{type} field. For a review, the \fieldname{type}
+ field must contain the message that it is a review of a
+ \emph{book} (or motion picture, or whatever it is a review of)
+ and give the title of the reviewed work in italics, which must
+ be manually formatted, e.g., by using the \cmd{\APACcitebtitle}
+ macro. The author of the reviewed work should apparently not be
+ mentioned.
+\item \cite{ex63} \\ \cite{ex63}\\ \fullciteA{ex63}\\ \citeA{ex63}
+\item \cite{ex64} \\ \cite{ex64}\\ \fullciteA{ex64}\\ \citeA{ex64} \\
+ \EM Here, the title of the motion picture,
+ \APACcitebtitle{Discovering Psychology}, is capitalized,
+ whereas this was not done with book titles in ex.~G-1 and 63.
+ I don't know whether this is an error or an implicit rule,
+ but this formatting must be done in the \fname{.bib} file,
+ so it's up to the user to do this as desired.
+\item \EM The rules for movies, television series, etc.\ do not appeal
+ very much to me, although they are not nearly as bad as those
+ for music recordings (ex.~69 and further, see below). My
+ primary objection is that when referring to movies and TV series,
+ the title is the most important characteristic. The director
+ may be a good second in some cases, but producers and writers are
+ almost always unknown to the general public and not relevant
+ when referring to them. You talk about the movie \emph{Jaws}
+ and not about Spielberg (1975) or whoever wrote the script.
+ Recognizing the primary creative input or authorship may be
+ politically correct, but not particularly informative.
+ However, you may think that my objections are mainly
+ driven by the difficulties of trying to format the entries
+ in \BibTeX{}. Anyway, here are my attempts to implement
+ the APA rules.\\
+ \cite{ex65-1} \\ \cite{ex65-1}\\ \fullciteA{ex65-1}\\ \citeA{ex65-1} \\
+ \EM I find ``United States'' a somewhat uninformative address.
+
+ \cite{ex65-2} \\ \cite{ex65-2}\\ \fullciteA{ex65-2}\\ \citeA{ex65-2} \\
+ \EM Note again that this and the following ``Available from''
+ must be between
+ parentheses (accomplished by putting it in the \fieldname{note} field),
+ whereas ``Available from'' some web site must not be between
+ parentheses, cf.\ ex.~95.
+
+ \EM In these examples, I used the \cmd{\bibliteral},
+ \cmd{\bibskipbracenodot}, and \cmd{\indexskipbracenodot} commands
+ from \fname{apacdoc.sty}.\\
+ \cite{ex65-3} \\ \cite{ex65-3}\\ \fullciteA{ex65-3}\\ \citeA{ex65-3}\\
+ \EM Here, I simply let ``(Producer)'' be part of the author name,
+ but because of this addendum, the entry is not sorted correctly
+ in the reference list: It should be before \citeA{APAManual6},
+ but because of the addendum, the authors are different to \BibTeX{}
+ and this one comes after \citeA{APAManual6}. The ordering can be
+ corrected by using the \cmd{\APACSortNoop} command as discussed in
+ section~\ref{subsec:sort}. However, the authors of these entries will
+ still be different. If it's important that they are the same (e.g.,
+ for the author index), the \fname{.bbl} file should be edited manually.
+ This seems an extremely rare event, though.
+\item \cite{ex66} \\ \cite{ex66}\\ \fullciteA{ex66}\\ \citeA{ex66} \\
+ \EM Here, I used the same tricks as in ex.~65.
+\item \cite{ex67} \\ \cite{ex67}\\ \fullciteA{ex67}\\ \citeA{ex67} \\
+ \EM I used several tricks introduced before: the \cmd{\bibeditortype}
+ (cf.\ ex.~36) construction to be able to use ``(Producer)'' in
+ the editor position instead of ``(Ed.\hbox{})'', and the ones used
+ in the previous examples. Because there is another Miller as well,
+ the initial is given here. To make sure that \BibTeX{} thinks
+ that there is only one initial, but the ``(Producer)'' is formatted
+ correctly, the name is defined as follows:
+\begin{verbatim}
+ editor = {Miller, {\bibinitial{R\bibeditortype{Producer}}}},
+\end{verbatim}
+ using the \cmd{\bibinitial} and \cmd{\bibeditortype} commands from
+ \fname{apacdoc.sty}.
+ It is then formatted correctly both in the text and in the reference
+ list if \cmd{\bibeditortype} is defined to swallow its argument
+ in the text, and redefined prior to the bibliography. After the
+ bibliography (before the index), it has to be redefined again
+ to swallow its argument.
+\item \cite{ex68} \\ \cite{ex68}\\ \fullciteA{ex68}\\ \citeA{ex68}\\
+ \EM Again, I used several tricks that were also used in the previous
+ examples.
+\item \EM The rules for music recordings do not make any sense, and they
+ are not entirely clear as well. It would seem to me that
+ most pop, rock, and other ``light'' music songs are almost always
+ attributed to the performing artist. You can usually read who the
+ composer and lyricist of the song are on the inlay-details
+ of the CD, but if you want the reader to refer to ``My Way'',
+ the reader will easier find it (in a CD store or on the
+ internet, for example) under ``Frank Sinatra'' than under
+ the composer's name (whoever that may be). Furthermore, the
+ year of release of the CD (or other medium) seems more relevant
+ in referring to the CD than the year of copyright of the
+ specific song, or the recording date.
+
+ For classical music, things are different. Then, the writer (composer)
+ is often more important than the performing artist, although
+ the percentage of people who know who wrote the lyrics for
+ Mozart's operas may not be high. Furthermore, it may be
+ time-consuming and not very relevant for most authors and
+ readers to find the year in which a certain piece was written,
+ although strictly speaking, we should use the ``date of copyright'',
+ which is not relevant for a lot of classical music.
+
+ However, when referring to Beethoven's 9th symphony, say, it will
+ typically not be very informative to refer to a specific recording on a
+ specific CD, unless that specific recording is the subject of interest,
+ but then it would seem that the ``performing artist'' (conductor or
+ orchestra) should take the role of ``author''. For example, when
+ comparing a performance of this symphony conducted in 1975 by Masur with
+ a performance of this symphony conducted in 1990 by Bernstein (assuming
+ this exists), it does not seem logical to compare ``9th Symphony''
+ (Beethoven, 1823a, tracks~1--4) with ``9th Symphony'' (Beethoven, 1823b,
+ tracks~1--4), but more logical to compare Masur (1975) with
+ Bernstein (1990).
+
+ Finally, it seems a bit strange that the track number should be
+ mentioned in text, but not in the reference list.
+
+ Again, you may think that my objections are mainly
+ driven by the difficulties of trying to format the entries
+ in \BibTeX. Nevertheless, here are my attempts to implement
+ the APA rules, using variations of the \cmd{\citesong}
+ command, defined in \fname{apacdoc.sty}:\\
+ \begin{tabular}{ll}
+ \cmd{\citeAsong}: & \citeAsong{ex69-1} \\
+ \cmd{\citesong}: & \citesong{ex69-1} \\
+ \cmd{\citesongNP}: & \citesongNP{ex69-1}\\
+ \cmd{\citeAsong}: & \citeAsong{ex69-2} \\
+ \cmd{\citesong}: & \citesong{ex69-2} \\
+ \cmd{\citesongNP}: & \citesongNP{ex69-2}
+ \end{tabular}\\
+ \EM The \fieldname{key} field contains the relevant
+ information in the form of a protected \cmd{\bibsong} command:
+\begin{verbatim}
+ key = {{\protect\bibsong{author}{year}{song title}{track info}}},
+\end{verbatim}
+ Furthermore, I used some tricks to get the reference list
+ entry right. I used the \entryname{incollection} type as
+ a basis, with the CD title in the \fieldname{booktitle} field.
+ At first sight, it seems natural to define
+\begin{verbatim}
+ type = {CD},
+\end{verbatim}
+ but with an \entryname{incollection}, the \fieldname{type}
+ field is put after the title, not after the book title.
+ I may change this for music-types (CD, record, etc.),
+ but this is currently not yet implemented. This means that the
+ ``[CD]'' description must be put in the \fieldname{booktitle}
+ field, after the CD title and with explicit formatting
+ commands:
+\begin{verbatim}
+ booktitle = {Arkansas Traveler {\upshape[\uppercase{CD}]}},
+\end{verbatim}
+ On the other hand, we can now use the \fieldname{type}
+ field to put the recording artists in for the second example:
+\begin{verbatim}
+ type = {Recorded by G. Bok, A. Mayo, \& E. Trickett},
+\end{verbatim}
+ We have to change the ``In'' string to ``On''
+ (``In'' a book versus ``On'' a CD). This is done with a
+ macro similar to the \cmd{\bibeditortype} macro discussed
+ in ex.~36. In this case, the macro is \cmd{\bibInstring},
+ defined in \fname{apacdoc.sty},
+ which has one argument. The macro changes the definition of
+ the macro \cmd{\BIn} to the argument and then immediately changes
+ the definition back to the old definition. So it makes a one-time
+ change. Of course, the \cmd{\bibInstring} macro only works
+ if it is executed \emph{before} the \cmd{\BIn} macro. The latter
+ macro comes before the \fieldname{booktitle}, so
+ \cmd{\bibInstring} must be added to a field that comes before
+ that. I put it in the \fieldname{title} field:
+\begin{verbatim}
+ title = {Over the Waterfall{\bibInstring{\BOn}}},
+\end{verbatim}
+ where \cmd{\BOn} is defined by default as ``\BOn''.
+ Finally, the recording date of the second example (1990) must
+ be put in the \fieldname{note} field.
+
+ If you want an author index, you would want the authors of
+ these works in the index as well. Because of the usage of the
+ \fieldname{key} field, this is not automatically done for the
+ citations. The \cmd{\AX} command has to be inserted explicitly,
+ see section~\ref{sec:autindex} above.
+
+ Note that this is all trickery within the \LaTeX{} domain
+ and the \fname{.bib} file, i.e., the user-definable and
+ user-customizable area.
+\item \cite{ex70} \\ \cite{ex70}\\ \fullciteA{ex70}\\ \citeA{ex70}
+\item \cite{ex71-1} \\ \cite{ex71-1}\\ \fullciteA{ex71-1}\\ \citeA{ex71-1} \\
+ \cite{ex71-2} \\ \cite{ex71-2}\\ \fullciteA{ex71-2}\\ \citeA{ex71-2} \\
+ \EM In contrast with earlier versions of \pkg{apacite}, in which
+ the ``Retrieved \dots'' message had to be formatted in the
+ \fieldname{howpublished} field, this is now formatted
+ automatically by using the \fieldname{url} and
+ \fieldname{lastchecked} fields.
+\item \cite{ex72} \\ \cite{ex72}\\ \fullciteA{ex72}\\ \citeA{ex72}
+\item \cite{ex73} \\ \cite{ex73}\\ \fullciteA{ex73}\\ \citeA{ex73} \\
+ \EM Note that the APA manual breaks a line \emph{after} a
+ period instead of before, against their own rules. Furthermore,
+ the APA manual uses a typeface in which `1' (one) and `l' (ell)
+ are not distinguishable. This requires some guessing of the
+ correct URLs. I think that this conflicts with their own stress
+ on accuracy w.r.t.\ URLs.
+
+ \EM Note the subtle use of braces to get \emph{Homo sapiens}
+ correctly formatted: The capital in \verb+\emph{Homo}+
+ is retained by \BibTeX, whereas the capital in
+ \verb+{\emph{Sapiens}}+ is changed into a lower case letter
+ by \BibTeX, because of the extra pair of braces.
+\item \cite{ex74} \\ \cite{ex74}\\ \fullciteA{ex74}\\ \citeA{ex74}
+\item \cite{ex75} \\ \cite{ex75}\\ \fullciteA{ex75}\\ \citeA{ex75}\\
+ \EM Note that \BibTeX{} does not consider a question mark
+ or an exclamation point as the end of the title and the beginning
+ of the subtitle. Hence, if there is a subtitle after it, the
+ capitalization of its first word is not retained (unlike
+ after a colon), so we have to protect it using braces in the
+ \fname{.bib} file.
+\item \cite{ex76} \\ \cite{ex76}\\ \fullciteA{ex76}\\ \citeA{ex76}
+\item \cite{ex77} \\ \cite{ex77}\\ \fullciteA{ex77}\\ \citeA{ex77}
+\item \cite{ex78} \\ \cite{ex78}\\ \fullciteA{ex78}\\ \citeA{ex78}\\
+ \EM For this example, the source is not simply the URL, but
+ with the qualification ``Columbia University, Institute for
+ Learning Technologies Web site:''. This means that we cannot
+ simply use the \fieldname{lastchecked} and \fieldname{url}
+ fields, but must revert to the way I proposed to format
+ references to electronic sources in previous versions of
+ \pkg{apacite}: by putting all the information in a
+ \fieldname{howpublished} field. This includes explicitly using
+ the \cmd{\url} command and adding ``\verb+\bibnodot{.}+''
+ immediately after the URL. The \cmd{\bibnodot} command,
+ defined in \fname{apacdoc.sty}, swallows the period, so that
+ there is no period after the URL in the reference list, thus
+ complying with the APA rules. This also applies to examples
+ 79, 87, 91, and 95, and all the examples that do not list
+ a specific URL, but only a description, like
+ ``the PsycARTICLES database'' (ex.~88).
+\item \cite{ex79} \\ \cite{ex79}\\ \fullciteA{ex79}\\ \citeA{ex79}
+\item \cite{ex80} \\ \cite{ex80}\\ \fullciteA{ex80}\\ \citeA{ex80}
+\item \cite{ex81} \\ \cite{ex81}\\ \fullciteA{ex81}\\ \citeA{ex81}
+\item \cite{ex82} \\ \cite{ex82}\\ \fullciteA{ex82}\\ \citeA{ex82}\\
+ \EM Here and in ex.~83, I used the \cmd{\BAbstractRetrieved}
+ and \cmd{\BmakeAbstractRetrieved} commands defined in
+ \fname{apacdoc.sty} to replace ``Retrieved'' by
+ ``Abstract retrieved''.
+\item \cite{ex83} \\ \cite{ex83}\\ \fullciteA{ex83}\\ \citeA{ex83} \\
+\item \cite{ex84} \\ \cite{ex84}\\ \fullciteA{ex84}\\ \citeA{ex84}
+\item \cite{ex85} \\ \cite{ex85}\\ \fullciteA{ex85}\\ \citeA{ex85} \\
+ \EM When referring to a message to a newsgroup, internet forum, etc.,
+ use the \entryname{misc} type. Then define
+\begin{verbatim}
+ type = {\bibmessage},
+\end{verbatim}
+ and use the \fieldname{number} field when relevant. The URL
+ of the message is given in the \fieldname{url} field. Then
+ the entry is formatted
+ correctly: If the message has a number, say 1, it reverts to
+ ``\verb+[\bibmessage~1]+'', i.e., ``[Msg~1]'' with the default
+ definition of \cmd{\bibmessage}. If there is no number, the
+ type identifier is omitted (because it is mentioned as
+ ``Message posted to [\dots]'' anyway). In both cases,
+ the title is formatted as an article title, i.e., not
+ italicized.
+\item \cite{ex86} \\ \cite{ex86}\\ \fullciteA{ex86}\\ \citeA{ex86}
+\item \cite{ex87} \\ \cite{ex87}\\ \fullciteA{ex87}\\ \citeA{ex87}
+\item \cite{ex88} \\ \cite{ex88}\\ \fullciteA{ex88}\\ \citeA{ex88}
+\item \cite{ex89} \\ \cite{ex89}\\ \fullciteA{ex89}\\ \citeA{ex89}
+\item \cite{ex90} \\ \cite{ex90}\\ \fullciteA{ex90}\\ \citeA{ex90} \\
+ \EM Here, ``de Ridder'' may well be a Dutch name. If the APA
+ manual is serious about its rule to format names as they
+ should according to the rule of the country of origin,
+ this name should then be formatted as ``De Ridder''.
+\item \cite{ex91} \\ \cite{ex91}\\ \fullciteA{ex91}\\ \citeA{ex91}
+\item \cite{ex92} \\ \cite{ex92}\\ \fullciteA{ex92}\\ \citeA{ex92}\\
+ \EM From ex.~94 below, I deduce that the version information
+ should be treated as an edition and not as part of the title.
+ Therefore, in this example and ex.~94, the version is formatted
+ in the \fieldname{edition} field:
+\begin{verbatim}
+ edition = {Version~4.0\noedition\ignorespaces},
+\end{verbatim}
+ using the \cmd{\noedition} command from \fname{apacdoc.sty},
+ which temporarily redefines \cmd{\BEd} to do nothing, and
+ \cmd{\ignorespaces}, which eats up the space that is ordinarily
+ present between the edition number and the ``ed.\hbox{}'' string.
+\item \cite{ex93} \\ \cite{ex93}\\ \fullciteA{ex93}\\ \citeA{ex93}\\
+ \EM To test the \entryname{manual} entry: \citeA{ex93-t1}.
+\item \cite{ex94} \\ \cite{ex94}\\ \fullciteA{ex94}\\ \citeA{ex94}\\
+ \EM The example in the APA manual does not list a date, not even
+ a ``n.d.\hbox{}''. Given the logic of the APA manual, this seems
+ an error to me, so I added a ``\cmd{\bibnodate}'' in the
+ \fieldname{year} field, which becomes ``\bibnodate'' in the
+ output. If it would really be the rule to omit the year, then
+ it is not clear when a year must be omitted and when not, or
+ replaced by ``n.d.\hbox{}''. Furthermore, formatting in both
+ the \fname{.sty} file and the \fname{.bst} file would have to
+ be adapted to anticipate a missing year. Currently, I assume
+ that there should always be something that acts like a date
+ (a year, an ``in press'', or a ``n.d.\hbox{}'').
+
+ \EM See ex.~92 for the treatment of the version.
+\item \cite{ex95} \\ \cite{ex95}\\ \fullciteA{ex95}\\ \citeA{ex95}\\
+ \EM Note that here, unlike ex.~44 and ex.~91,
+ ``U.S.'' is omitted before ``Department of Health and Human
+ Services''.
+\end{enumerate}
+
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\StopEventually{%
+\MakePercentComment
+%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%
+% Change History
+\PrintChanges
+%
+% Redefine commands that should be different in the bibliography.
+\APACmanBeforeBib
+%
+% Request apacite or apacitex bibliography style
+% depending on whether an index option was requested or not.
+\bibliographystyle{\APACbibstyle}%
+% Include the bibliography
+\bibliography{apa5ex}%
+%
+% Again redefine commands.
+\APACmanBeforeIndex
+%
+% Include the author index if the index option is on.
+\printindex[autx]
+%
+% Again redefine commands.
+\APACmanAfterIndex
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\PrintIndex
+\MakePercentIgnore
+}
+%
+\MakePercentIgnore
+% \iffalse
+%</dtx>
+% \fi
+%
+% \clearpage
+% \APACcodePageLayout
+% \section{Implementation}
+% The following sections describe the source code of the various
+% constituent parts of \pkg{apacite}.
+%
+%
+% \section{\LaTeX\ package (\fname{apacite.sty})}
+% This is the \LaTeX\ package part of \pkg{apacite}. We start with some
+% comments at the top of the package to recognize borrowed code.
+%
+% \begin{macrocode}
+%<*package>
+%%
+%% apacite.sty : citation and reference list according to APA manual
+%% Written by Erik Meijer
+%%
+%% Contains code adapted from
+%% index.sty [1995/09/28 v4.1beta Improved index support (dmj)],
+%% hyperref.dtx [6.71, 2000/10/04],
+%% babel.def [2001/03/01, v3.7h],
+%% backref.dtx [1.20, 2002/06/09],
+%% ltbibl.dtx [2004/02/15 v1.1q LaTeX Kernel (Bibliography)],
+%% bibtopic.dtx [2002/08/22 v1.0k],
+%% multibib.dtx [2004/01/28 v1.3 Multiple bibliographies for one document.],
+%% multibbl.dtx [2004/07/27 v1.1],
+%% amsrefs.dtx [2004/06/30 v2.0]
+%% ltidxglo.dtx [1996/01/20 v1.1e LaTeX Kernel (Index and Glossary)]
+%% doc.dtx [2004/02/09 v2.1b Standard LaTeX documentation package (FMi)]
+%% and code (used with permission) provided by:
+%% Stefan Bj\"ork.
+%%
+% \end{macrocode}
+%
+% \subsection{Options}
+%
+% ^^A There does not appear to be a \cmd{\DescribeOption} command.
+%
+% \subsubsection{Backwards compatibility}
+%
+% \begin{macro}{\@year@}
+% The \pkg{theapa} package used the \cmd{\BCAY} command where \pkg{newapa}
+% used \cmd{\citeauthoryear} for the same purpose. Because the first version
+% of \pkg{apacite} descended from \pkg{theapa}, it used \cmd{\BCAY} as well.
+% However, \pkg{natbib} does not recognize \cmd{\BCAY}, but it does
+% recognize \cmd{\citeauthoryear}. Therefore, since
+% \APACversiondate{2003/09/05}, \pkg{apacite} uses \cmd{\citeauthoryear}.
+% Unfortunately, the construction below can only be defined for one of them.
+% Therefore, this is a backwards compatibility option.
+% \begin{macrocode}
+\def\@year@\citeauthoryear#1#2#3{#3} % default
+\DeclareOption{BCAY}{% compatibility with old .bbl files
+ \def\@year@\BCAY#1#2#3{#3}%
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \subsubsection{Citation}
+%
+% \begin{macro}{\if@APAC@classic@cite}
+% \begin{macro}{\if@APAC@natbib@emu}
+% \begin{macro}{\if@APAC@natbib@apa}
+% \begin{macro}{\if@APAC@classic@or@emu}
+% \begin{macro}{\if@APAC@any@natbib}
+% \begin{macro}{\if@APAC@anycitation}
+% Allow different sets of citation commands through different options,
+% implemented through |\if| commands that enable and disable the relevant
+% parts of the code. \pkgoption{apaciteclassic} is the default, but this
+% may change in the future.
+% \begin{macrocode}
+\newif\if@APAC@classic@cite
+\newif\if@APAC@natbib@emu
+\newif\if@APAC@natbib@apa
+\newif\if@APAC@classic@or@emu
+\newif\if@APAC@any@natbib
+\newif\if@APAC@anycitation
+\DeclareOption{apaciteclassic}{%
+ \@APAC@classic@citetrue
+ \@APAC@natbib@emufalse
+ \@APAC@natbib@apafalse
+ \@APAC@classic@or@emutrue
+ \@APAC@any@natbibfalse
+ \@APAC@anycitationtrue
+}
+\DeclareOption{natbibemu}{%
+ \@APAC@classic@citefalse
+ \@APAC@natbib@emutrue
+ \@APAC@natbib@apafalse
+ \@APAC@classic@or@emutrue
+ \@APAC@any@natbibtrue
+ \@APAC@anycitationtrue
+}
+\DeclareOption{natbibapa}{%
+ \@APAC@classic@citefalse
+ \@APAC@natbib@emufalse
+ \@APAC@natbib@apatrue
+ \@APAC@classic@or@emufalse
+ \@APAC@any@natbibtrue
+ \@APAC@anycitationtrue
+}
+\DeclareOption{nocitation}{%
+ \@APAC@classic@citefalse
+ \@APAC@natbib@emufalse
+ \@APAC@natbib@apafalse
+ \@APAC@classic@or@emufalse
+ \@APAC@any@natbibfalse
+ \@APAC@anycitationfalse
+}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+%
+% The \pkgoption{mask} option masks citations that are flagged as
+% self-citations with the |\mask|-citation commands. The
+% \pkgoption{unmask} option (default) ignores the masking.
+%
+% \begin{macrocode}
+\newif\if@APAC@mask
+\DeclareOption{mask}{\@APAC@masktrue}
+\DeclareOption{unmask}{\@APAC@maskfalse}
+% \end{macrocode}
+%
+% \subsubsection{Bibliography}
+%
+% Various options for changing the formatting of the reference list. Most of
+%% ^^A \cmd{\if} somehow gives an error
+% these are implemented through |\if| commands, deferring the actual
+% implementation.
+% \begin{macro}{\if@numberedbib}
+% Should the bibliography section or chapter be numbered?
+% \begin{macrocode}
+\newif\if@numberedbib
+% \end{macrocode}
+% \end{macro}
+% The bibliography is a section or chapter with a number (e.g.,
+% section~6 or chapter~10). This does not work properly when the section or
+% chapter is in the backmatter.
+% \begin{macrocode}
+\DeclareOption{numberedbib}{\@numberedbibtrue}
+% \end{macrocode}
+% The bibliography is a section or chapter without a number (i.e.,
+% a section* or chapter*). This is the default.
+% \begin{macrocode}
+\DeclareOption{unnumberedbib}{\@numberedbibfalse}
+% \end{macrocode}
+% The next options determine whether the bibliography should be a section or
+% a chapter.
+% \begin{macro}{\if@sectionbib}
+% \begin{macro}{\if@sectionbibdefault}
+% With the \pkgoption{sectionbib} option, the bibliography is a section. This
+% is typically used with the \pkg{chapterbib} package; then each chapter has a
+% bibliography section. The \pkgoption{nosectionbib} option makes the
+% bibliography a chapter (if chapters are defined). If none of these options
+% are requested, \pkg{apacite} tries to guess the most logical choice. The
+% bibliography is a section if chapters are not defined or if we are in the
+% ``mainmatter'' of a document. Otherwise, i.e., in the ``backmatter'' of a
+% document that has chapters, it is a chapter. |\if@sectionbibdefault|
+% registers whether the default should be used (neither
+% \pkgoption{sectionbib} nor \pkgoption{nosectionbib} chosen) and if
+% the default is not used, |\if@sectionbib| registers which option was
+% chosen.
+% \begin{macrocode}
+\newif\if@sectionbib
+\newif\if@sectionbibdefault
+\@sectionbibfalse
+\@sectionbibdefaulttrue
+\DeclareOption{sectionbib}{%
+ \@sectionbibdefaultfalse
+ \@sectionbibtrue
+}
+\DeclareOption{nosectionbib}{%
+ \@sectionbibdefaultfalse
+ \@sectionbibfalse
+}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\if@tocbib}
+% These options determine whether the bibliography should be in the table of
+% contents.
+% \begin{macrocode}
+\newif\if@tocbib
+% \end{macrocode}
+% The bibliography in the table of contents, even if it's unnumbered. This is
+% the default.
+% \begin{macrocode}
+\DeclareOption{tocbib}{\@tocbibtrue}
+% \end{macrocode}
+% The bibliography not in the table of contents if it's unnumbered. This is
+% ignored if it's numbered.
+% \begin{macrocode}
+\DeclareOption{notocbib}{\@tocbibfalse}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@bibnewpage}
+% Start the bibliography on a new page? This is ignored if it's a chapter.
+% \begin{macrocode}
+\DeclareOption{bibnewpage}{\def\@bibnewpage{\bibnewpage}}
+\DeclareOption{nobibnewpage}{\let\@bibnewpage\relax}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\if@doi}
+% Should DOI information be printed in the reference list?
+% \begin{macrocode}
+\newif\if@doi
+\DeclareOption{doi}{\@doitrue}
+\DeclareOption{nodoi}{\@doifalse}
+% \end{macrocode}
+% \end{macro}
+%
+% \subsubsection{Author indexing}
+%
+% \begin{macro}{\if@APAC@index}
+% No author index.
+%% ^^A \cmd{\if} somehow gives an error
+% The |\if| is necessary because packages can not be required here, so
+% we must handle the consequences of the \pkgoption{index} and
+% \pkgoption{noindex} options later.
+% \begin{macrocode}
+\newif\if@APAC@index
+\DeclareOption{noindex}{\@APAC@indexfalse}%
+% \end{macrocode}
+% \end{macro}
+%
+% Request author index.
+% \begin{macrocode}
+\DeclareOption{index}{\@APAC@indextrue}%
+% \end{macrocode}
+%
+% \begin{macro}{\if@APAC@include@corporate}
+% Include corporate authors in index?
+%% ^^A \cmd{\if} somehow gives an error
+% Use an |\if| here, the real definitions are handled within the index
+% options.
+% \begin{macrocode}
+\newif\if@APAC@include@corporate
+\DeclareOption{includecorporate}{\@APAC@include@corporatetrue}%
+\DeclareOption{suppresscorporate}{\@APAC@include@corporatefalse}%
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\if@APAC@index@package}
+% Use \pkg{index} package or standard \LaTeX\ index? Again, we only define the
+% boolean.
+% \begin{macrocode}
+\newif\if@APAC@index@package
+\DeclareOption{indexpackage}{\@APAC@index@packagetrue}%
+\DeclareOption{noindexpackage}{\@APAC@index@packagefalse}%
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{environment}{index}
+% Some options for changing the \envirname{index} environment. The actual
+% definitions are done through macros below; here these macros are used.
+%
+% The first option uses the definition from the \pkg{index} package
+% |[1995/09/28 v4.1beta Improved index support (dmj)]|,
+% which is the same code as in |(v3.02, 15 September 1993)|,
+% i.e., without table of contents entry.
+% \begin{macrocode}
+\DeclareOption{stdindex}{%
+ \ExecuteOptions{index}% Request author index
+ \ExecuteOptions{indexpackage}% This option requires the index package
+ \AtEndOfPackage{\APACstdindex}% index environment as in index package
+}%
+% \end{macrocode}
+% The next option adds a table of contents entry to the standard index.
+% \begin{macrocode}
+\DeclareOption{tocindex}{%
+ \ExecuteOptions{index}% Request author index
+ \ExecuteOptions{indexpackage}% This option requires the index package
+ \AtEndOfPackage{\APACtocindex}% index environment as in index package
+ %% with toc entry added
+}%
+% \end{macrocode}
+% This option defines my (EM) own favorite index style. Maybe you like it too.
+% \begin{macrocode}
+\DeclareOption{emindex}{%
+ \ExecuteOptions{index}% Request author index
+ \ExecuteOptions{indexpackage}% This option requires the index package
+ \AtEndOfPackage{\APACemindex}% EM's index environment (see below)
+}%
+% \end{macrocode}
+% The next option is a variation on the \pkgoption{emindex} option, but uses
+% standard \LaTeX\ code (adapted from the \pkg{ltxdoc} class) instead of the
+% the \pkg{index} package to support multiple indexes.
+% \begin{macrocode}
+\DeclareOption{ltxemindex}{%
+ \ExecuteOptions{index}% Request author index
+ \ExecuteOptions{noindexpackage}% Don't use the index package
+ \AtEndOfPackage{\APACltxemindex}% EM's index environment without the index
+ %% package (see below)
+}
+% \end{macrocode}
+% \end{environment}
+%
+% \subsubsection{Obsolete compatibility options}
+%
+% For compatibility with older versions of \pkg{apacite}.
+% \begin{macrocode}
+\DeclareOption{hyper}{%
+ \PackageWarningNoLine{apacite}{Obsolete option `hyper' ignored}%
+}
+\DeclareOption{nohyper}{%
+ \PackageWarningNoLine{apacite}{Obsolete option `nohyper' ignored}%
+}
+\DeclareOption{accentfix}{%
+ \PackageWarningNoLine{apacite}{Obsolete option `accentfix' ignored}%
+}
+\DeclareOption{noaccentfix}{%
+ \PackageWarningNoLine{apacite}{Obsolete option `noaccentfix' ignored}%
+}
+% \end{macrocode}
+%
+% \subsection{Option processing}
+%
+% Execute default options.
+% \begin{macrocode}
+\ExecuteOptions{apaciteclassic,noindex,indexpackage,unnumberedbib,tocbib,%
+ nobibnewpage,suppresscorporate,doi,unmask}
+% \end{macrocode}
+% Execute user-requested options.
+% \begin{macrocode}
+\ProcessOptions
+% \end{macrocode}
+%
+% \subsection{Citation commands}
+%
+% \begin{macro}{\citeauthoryear}
+% The \cmd{\citeauthoryear} command is defined within the citation commands,
+% but some packages (\pkg{splitbib}, \pkg{bibentry}) choke if it has not
+% been defined. Therefore, we start with defining it to do nothing. However,
+% \pkg{natbib} defines this with a \cmd{\newcommand}, so if \pkg{natbib} is
+% loaded after \pkg{apacite}, defining it here would give an error. Therefore,
+% we postpone this to |\begin{document}| and only initialize it then if it
+% hasn't been defined before.
+% \begin{macrocode}
+\AtBeginDocument{%
+ \@ifundefined{citeauthoryear}{\def\citeauthoryear#1#2#3{}}{}%
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\themaskedRefs}
+% A counter for the number of masked citations, which should be
+% defined for all the citation options.
+% This construction ensures that there is no conflict if the
+% |maskedRefs| counter has already been defined (in \fname{apa6.cls}).
+% \begin{macrocode}
+\AtBeginDocument{%
+ \@ifundefined{themaskedRefs}{\newcounter{maskedRefs}}{}}
+% \end{macrocode}
+% \end{macro}
+%
+% \subsubsection{Shared code between the \pkgoption{apaciteclassic} and
+% \pkgoption{natbibemu} options}
+%
+% Define a few |\if|s outside the main |\if|, because \TeX{} otherwise
+% chokes.
+% \begin{macro}{\if@F@cite}
+% First citation in a multi-citation.
+% \begin{macrocode}
+\newif\if@F@cite\@F@citetrue
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\if@A@cite}
+% \begin{macro}{\if@Y@cite}
+% Two flags to denote whether only the author or only the year must be cited
+% or both.
+% \begin{macrocode}
+\newif\if@A@cite\@A@citefalse
+\newif\if@Y@cite\@Y@citefalse
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macrocode}
+\if@APAC@classic@or@emu
+% \end{macrocode}
+%
+% \begin{macro}{\nocite}
+% This induces an entry in the reference list, but not in the text. It is
+% also called by the other citation commands to handle some bookkeeping.
+% \begin{macrocode}
+\def\nocite#1{%
+% \end{macrocode}
+% No flag-setting in \cmd{\nocite}: a no-cite is not a citation, so a
+% subsequent citation may be the first one.
+% \begin{macrocode}
+ \@bsphack
+ \ifx\@onlypreamble\document
+% \end{macrocode}
+% We are after |\begin{document}|, so we can do the citations.
+% \begin{macrocode}
+ \@for\@citeb:=#1\do{%
+ \edef\@citeb{\expandafter\@firstofone\@citeb}%
+% \end{macrocode}
+% The \cmd{\@newciteauxhandle} is for compatibility with \pkg{multibib}.
+% \begin{macrocode}
+ \if@filesw
+ \immediate\write\@newciteauxhandle{\string\citation{\@citeb}}%
+ \fi
+ \@ifundefined{b@\@citeb\APAC@extra@b@citeb}{%
+% \end{macrocode}
+% Check for |\nocite{*}|.
+% \begin{macrocode}
+ \edef\B@my@dummy{*}%
+ \ifx\@citeb\B@my@dummy
+ \else
+ \G@refundefinedtrue
+ \@latex@warning{Citation `\@citeb' undefined}%
+ \fi
+ }{}%
+ }%
+ \else
+% \end{macrocode}
+% \pkg{apacite} has no compatibility problems with \LaTeX~2.09, because it
+% does not work with \LaTeX~2.09 anyway, so we can do the following,
+% suggested in \fname{ltbibl.dtx}:
+% \begin{macrocode}
+ \AtBeginDocument{\nocite{#1}}%
+ \fi
+ \@esphack
+% \end{macrocode}
+% For compatibility with \pkg{multibib}.
+% \begin{macrocode}
+ \@restore@auxhandle
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\B@my@dummy}
+% This needs to be initialized to avoid errors with \pkg{tex4ht}.
+% \begin{macrocode}
+\global\def\B@my@dummy{*}%
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@ifauthorsequalc@de}
+% Code to be executed if current author(s) equal(s) previous.
+% \begin{macrocode}
+\def\@ifauthorsequalc@de#1{%
+ \if@F@cite
+ \@F@citefalse
+ \else
+ \if@Y@cite
+ {\@BBY}%
+ \fi
+ \fi
+ \if@Y@cite
+ \hyper@natlinkstart{#1}%
+ {\csname Y@\@citeb\APAC@extra@b@citeb\endcsname}%
+ \hyper@natlinkend
+ \fi
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@ifauthorsunequalc@de}
+% Code to be executed if current author(s) do(es) not equal previous.
+% \begin{macrocode}
+\def\@ifauthorsunequalc@de#1{%
+ \if@F@cite
+ \@F@citefalse
+ \else
+ \if@Y@cite
+ {\@BAY}%
+ \fi
+ {\@BBC}%
+ \fi
+ \edef\@cite@undefined{?}%
+ \def\BBA{\@BBA}%
+ \if@A@cite
+ \hyper@natlinkstart{#1}%
+ {\csname b@\@citeb\APAC@extra@b@citeb\endcsname}%
+ \hyper@natlinkend
+ \if@Y@cite
+ {\@BBAY}%
+ \fi
+ \fi
+ \if@Y@cite
+ \hyper@natlinkstart{#1}%
+ {\csname Y@\@citeb\APAC@extra@b@citeb\endcsname}%
+ \hyper@natlinkend
+ \fi
+ \let\BBA\relax
+}
+% \end{macrocode}
+% \end{macro}
+%
+% End of shared code.
+% \begin{macrocode}
+\fi
+% \end{macrocode}
+%
+% \subsubsection{\pkg{apacite} ``classic'' commands}
+%
+% This defines the citation commands and syntax with angled brackets that
+% have traditionally been used by \pkg{apacite}.
+% \begin{macrocode}
+\if@APAC@classic@cite
+% \end{macrocode}
+%
+% \begin{macro}{\cite}
+% \begin{macro}{\fullcite}
+% \begin{macro}{\shortcite}
+% Parenthetical citation commands.
+% \begin{macrocode}
+\def\cite{%
+ \def\BCAY##1##2##3{\BCA{##1}{##2}}% kept for compat. with prev. versions
+ \def\citeauthoryear##1##2##3{\BCA{##1}{##2}}%
+ \def\@BBOP{\BBOP}% % open parenthesis
+ \def\@BBCP{\BBCP}% % close parenthesis
+ \@ifnextchar<% % >
+ {\@cite}%
+ {\@cite<>}%
+}
+\def\fullcite{%
+ \def\BCAY##1##2##3{\BCA{##1}{##1}}% kept for compat. with prev. versions
+ \def\citeauthoryear##1##2##3{\BCA{##1}{##1}}%
+ \def\@BBOP{\BBOP}% % open parenthesis
+ \def\@BBCP{\BBCP}% % close parenthesis
+ \@ifnextchar<% % >
+ {\@cite}%
+ {\@cite<>}%
+}
+\def\shortcite{%
+ \def\BCAY##1##2##3{\BCA{##2}{##2}}% kept for compat. with prev. versions
+ \def\citeauthoryear##1##2##3{\BCA{##2}{##2}}%
+ \def\@BBOP{\BBOP}% % open parenthesis
+ \def\@BBCP{\BBCP}% % close parenthesis
+ \@ifnextchar<% % >
+ {\@cite}%
+ {\@cite<>}%
+}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\citeNP}
+% \begin{macro}{\fullciteNP}
+% \begin{macro}{\shortciteNP}
+% Parenthetical citation commands, but without the actual parentheses.
+% \begin{macrocode}
+\def\citeNP{%
+ \def\BCAY##1##2##3{\BCA{##1}{##2}}% kept for compat. with prev. versions
+ \def\citeauthoryear##1##2##3{\BCA{##1}{##2}}%
+ \def\@BBOP{}% % open parenthesis
+ \def\@BBCP{}% % close parenthesis
+ \@ifnextchar<%% >
+ {\@cite}%
+ {\@cite<>}%
+}
+\def\fullciteNP{%
+ \def\BCAY##1##2##3{\BCA{##1}{##1}}% kept for compat. with prev. versions
+ \def\citeauthoryear##1##2##3{\BCA{##1}{##1}}%
+ \def\@BBOP{}% % open parenthesis
+ \def\@BBCP{}% % close parenthesis
+ \@ifnextchar<%% >
+ {\@cite}%
+ {\@cite<>}%
+}
+\def\shortciteNP{%
+ \def\BCAY##1##2##3{\BCA{##2}{##2}}% kept for compat. with prev. versions
+ \def\citeauthoryear##1##2##3{\BCA{##2}{##2}}%
+ \def\@BBOP{}% % open parenthesis
+ \def\@BBCP{}% % close parenthesis
+ \@ifnextchar<%% >
+ {\@cite}%
+ {\@cite<>}%
+}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\@cite}
+% Second layer of the parenthetical and NP citation commands.
+% \begin{macrocode}
+\def\@cite<#1>{%
+ \def\@BAP{\BAP}% % after precitation [=#1] before first citation
+ \def\@BBA{\BBAA}% % `and' between authors
+ \def\@BBAY{\BBAY}% % between author and year
+ \def\@BAY{}% % after year
+ \def\@BBY{\BBYY}% % between years of multiple citations with same author
+ \def\@BBC{\BBC}% % between cites
+ \def\@BBN{\BBN}% % after last citation before note/postcitation [=#2]
+ \def\@BAstyle{\BAstyle}% text style of authors
+ \@A@citetrue% % cite authors
+ \@Y@citetrue% % cite years
+ \@ifnextchar[% % ]
+ {\@@cite<#1>}%
+ {\@@cite<#1>[]}%
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\citeA}
+% \begin{macro}{\fullciteA}
+% \begin{macro}{\shortciteA}
+% In-text citation commands.
+% \begin{macrocode}
+\def\citeA{%
+ \def\BCAY##1##2##3{\BCA{##1}{##2}}% kept for compat. with prev. versions
+ \def\citeauthoryear##1##2##3{\BCA{##1}{##2}}%
+ \@ifnextchar<% %>
+ {\@citeA}%
+ {\@citeA<>}%
+}
+\def\fullciteA{%
+ \def\BCAY##1##2##3{\BCA{##1}{##1}}% kept for compat. with prev. versions
+ \def\citeauthoryear##1##2##3{\BCA{##1}{##1}}%
+ \@ifnextchar<% %>
+ {\@citeA}%
+ {\@citeA<>}%
+}
+\def\shortciteA{%
+ \def\BCAY##1##2##3{\BCA{##2}{##2}}% kept for compat. with prev. versions
+ \def\citeauthoryear##1##2##3{\BCA{##2}{##2}}%
+ \@ifnextchar<% %>
+ {\@citeA}%
+ {\@citeA<>}%
+}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\@citeA}
+% Second layer of in-text citation commands.
+% \begin{macrocode}
+\def\@citeA<#1>{%
+ \def\@BBOP{}% % open parenthesis.
+ \def\@BAP{\BAP}% % after precitation [=#1] before first citation
+ \def\@BBA{\BBAB}% % `and' between authors
+ \def\@BBAY{ \BBOP}%% between author and year
+ \def\@BAY{\BBCP}% % after year
+ \def\@BBY{\BBYY}% % between years of multiple citations with same author
+ \def\@BBC{\BBC}% % between cites
+ \def\@BBN{\BBN}% % after last citation before note/postcitation [=#2]
+ \def\@BBCP{}% % close parenthesis
+ \def\@BAstyle{\BAstyle}% text style of authors
+ \@A@citetrue% % cite authors
+ \@Y@citetrue% % cite years
+ \@ifnextchar[% % ]
+ {\@@cite<#1>}%
+ {\@@cite<#1>[]}%
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\citeauthor}
+% \begin{macro}{\fullciteauthor}
+% \begin{macro}{\shortciteauthor}
+% \begin{macro}{\citeauthorNP}
+% \begin{macro}{\fullciteauthorNP}
+% \begin{macro}{\shortciteauthorNP}
+% Commands that only cite the author, for parenthetical and in-text citations,
+% the difference being that `\&' is used in the parenthetical versions,
+% whereas the in-text versions use `and' between the authors. Note that all
+% are without parentheses; \cmd{\citeauthorA} would be a better name for
+% \cmd{\citeauthor} to clarify its role (cf.~\cmd{\citeA}, \cmd{\cite}, and
+% \cmd{\citeNP}), but for backwards compatibility and compatibility with
+% some other citation packages, it is \cmd{\citeauthor}.
+% \begin{macrocode}
+\def\citeauthor{%
+ \def\BCAY##1##2##3{\BCA{##1}{##2}}% kept for compat. with prev. versions
+ \def\citeauthoryear##1##2##3{\BCA{##1}{##2}}%
+ \@ifnextchar<% %>
+ {\@citeauthor}%
+ {\@citeauthor<>}%
+}
+\def\fullciteauthor{%
+ \def\BCAY##1##2##3{\BCA{##1}{##1}}% kept for compat. with prev. versions
+ \def\citeauthoryear##1##2##3{\BCA{##1}{##1}}%
+ \@ifnextchar<% %>
+ {\@citeauthor}%
+ {\@citeauthor<>}%
+}
+\def\shortciteauthor{%
+ \def\BCAY##1##2##3{\BCA{##2}{##2}}% kept for compat. with prev. versions
+ \def\citeauthoryear##1##2##3{\BCA{##2}{##2}}%
+ \@ifnextchar<% %>
+ {\@citeauthor}%
+ {\@citeauthor<>}%
+}
+\def\citeauthorNP{%
+ \def\BCAY##1##2##3{\BCA{##1}{##2}}% kept for compat. with prev. versions
+ \def\citeauthoryear##1##2##3{\BCA{##1}{##2}}%
+ \@ifnextchar<% %>
+ {\@citeauthorNP}%
+ {\@citeauthorNP<>}%
+}
+\def\fullciteauthorA{%
+ \def\BCAY##1##2##3{\BCA{##1}{##1}}% kept for compat. with prev. versions
+ \def\citeauthoryear##1##2##3{\BCA{##1}{##1}}%
+ \@ifnextchar<% %>
+ {\@citeauthorNP}%
+ {\@citeauthorNP<>}%
+}
+\def\shortciteauthorA{%
+ \def\BCAY##1##2##3{\BCA{##2}{##2}}% kept for compat. with prev. versions
+ \def\citeauthoryear##1##2##3{\BCA{##2}{##2}}%
+ \@ifnextchar<% %>
+ {\@citeauthorNP}%
+ {\@citeauthorNP<>}%
+}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\@citeauthor}
+% \begin{macro}{\@citeauthorNP}
+% Second layer of the author citation commands.
+% \begin{macrocode}
+\def\@citeauthor<#1>{%
+ \def\@BBOP{}% % open parenthesis
+ \def\@BAP{\BAP}% % after precitation [=#1] before first citation
+ \def\@BBA{\BBAB}% % `and' between authors
+ \def\@BBAY{}% % between author and year
+ \def\@BAY{}% % after year
+ \def\@BBY{}% % between years of multiple citations with same author
+ \def\@BBC{\BBC}% % between cites
+ \def\@BBN{\BBN}% % after last citation before note/postcitation [=#2]
+ \def\@BBCP{}% % close parenthesis
+ \def\@BAstyle{\BAastyle}% text style of authors
+ \@A@citetrue% % cite authors
+ \@Y@citefalse% % do not cite years
+ \@ifnextchar[% % ]
+ {\@@cite<#1>}%
+ {\@@cite<#1>[]}%
+}
+\def\@citeauthorNP<#1>{%
+ \def\@BBOP{}% % open parenthesis
+ \def\@BAP{\BAP}% % after precitation [=#1] before first citation
+ \def\@BBA{\BBAA}% % `and' between authors
+ \def\@BBAY{}% % between author and year
+ \def\@BAY{}% % after year
+ \def\@BBY{}% % between years of multiple citations with same author
+ \def\@BBC{\BBC}% % between cites
+ \def\@BBN{\BBN}% % after last citation before note/postcitation [=#2]
+ \def\@BBCP{}% % close parenthesis
+ \def\@BAstyle{\BAastyle}% text style of authors
+ \@A@citetrue% % cite authors
+ \@Y@citefalse% % do not cite years
+ \@ifnextchar[% % ]
+ {\@@cite<#1>}%
+ {\@@cite<#1>[]}%
+}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\citeyear}
+% \begin{macro}{\citeyearNP}
+% Cite only the year; parenthetical and without parentheses.
+% \begin{macrocode}
+\def\citeyear{%
+ \def\BCAY##1##2##3{\BCA{##1}{##2}}% kept for compat. with prev. versions
+ \def\citeauthoryear##1##2##3{\BCA{##1}{##2}}%
+ \def\@BBOP{\BBOP}% % open parenthesis
+ \def\@BBCP{\BBCP}% % close parenthesis
+ \@ifnextchar<% % >
+ {\@citeyear}%
+ {\@citeyear<>}%
+}
+\def\citeyearNP{%
+ \def\BCAY##1##2##3{\BCA{##1}{##2}}% kept for compat. with prev. versions
+ \def\citeauthoryear##1##2##3{\BCA{##1}{##2}}%
+ \def\@BBOP{}% % open parenthesis
+ \def\@BBCP{}% % close parenthesis
+ \@ifnextchar<% % >
+ {\@citeyear}%
+ {\@citeyear<>}%
+}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\@citeyear}
+% Second layer of the year citation commands.
+% \begin{macrocode}
+\def\@citeyear<#1>{%
+ \def\@BAP{\BAP}% % after precitation [=#1] before first citation
+ \def\@BBA{}% % `and' between authors
+ \def\@BBAY{}% % between author and year
+ \def\@BAY{}% % after year
+ \def\@BBY{\BBYY}% % between years of multiple citations with same author
+ \def\@BBC{\BBC}% % between cites
+ \def\@BBN{\BBN}% % after last citation before note/postcitation [=#2]
+ \def\@BAstyle{}% % text style of authors
+ \@A@citefalse% % do not cite authors
+ \@Y@citetrue% % cite years
+ \@ifnextchar[% % ]
+ {\@@cite<#1>}%
+ {\@@cite<#1>[]}%
+}
+% \end{macrocode}
+% \end{macro}
+%
+% We are now arriving at the core citation routines. The following commands
+% must have been defined:\\
+% \begin{tabular}{@{\qquad}ll@{}}
+% \cmd{\@BBOP} & open parenthesis \\
+% \cmd{\@BAP} & after precitation before first citation \\
+% \cmd{\@BBA} & `and' between authors \\
+% \cmd{\@BBAY} & between author and year \\
+% \cmd{\@BAY} & after year \\
+% \cmd{\@BBY} & between years of multiple citations with same author \\
+% \cmd{\@BBC} & between cites \\
+% \cmd{\@BBN} & after last citation before note/postcitation \\
+% \cmd{\@BBCP} & close parenthesis \\
+% \cmd{\@BAstyle} & formatting style of authors (e.g., \cmd{\scshape})
+% \end{tabular}
+%
+% \begin{macro}{\@@cite}
+% The core citation command. Standard \LaTeX{} and other packages use
+% \cmd{\@citex} for this. It may be useful to change this as well, to increase
+% the likelihood of compatibility with some packages.
+% \begin{macrocode}
+\def\@@cite<#1>[#2]#3{%
+% \end{macrocode}
+% Write citation(s) to .aux file(s)
+% \begin{macrocode}
+ \nocite{#3}%
+% \end{macrocode}
+% The previous cite, for multiple citations with same author.
+% \begin{macrocode}
+ \edef\@citeP{}%
+% \end{macrocode}
+% Open parenthesis and pre-note. The \cmd{\mbox} is to avoid \pkg{hyperref}
+% problems if a \cmd{\citeA} follows an \cmd{\item}.
+% \begin{macrocode}
+ \mbox{\@BBOP}%
+ \ifx\@empty#1\@empty
+ \else%
+ {\ignorespaces #1\@BAP}%
+ \fi%
+% \end{macrocode}
+% Loop over citation entries
+% \begin{macrocode}
+ \@for\@citeb:=#3\do{%
+% \end{macrocode}
+% Removes a possible space before the citation key, so that, e.g.,
+% \verb*+\cite{key1, key2}+ can be done.
+% \begin{macrocode}
+ \edef\@citeb{\expandafter\@firstofone\@citeb}%
+% \end{macrocode}
+% For \pkg{backref}.
+% \begin{macrocode}
+ \back@cite{\@citeb}%
+% \end{macrocode}
+% Check whether the citation is defined.
+% \begin{macrocode}
+ \@ifundefined{b@\@citeb\APAC@extra@b@citeb}%
+ {\expandafter\def\csname b@\@citeb\APAC@extra@b@citeb\endcsname{?}%
+ \expandafter\def\csname Y@\@citeb\APAC@extra@b@citeb\endcsname{?}%
+ %% The following is now handled by \nocite
+ %% \G@refundefinedtrue
+ %% \@latex@warning{Citation `\@citeb' undefined}%
+ }%%
+% \end{macrocode}
+% If the citation is defined, check whether the flag has been set that
+% identifies that this is not the first citation to the work. If this
+% flag has not been set, it will be set to |DUMMY|. If this is the first
+% citation to the work, the full citation is used; else the short version
+% is used.
+% \begin{macrocode}
+ {\@ifundefined{flag@\@citeb\APAC@extra@b@citeb}%
+ {\global\expandafter
+ \def\csname flag@\@citeb\APAC@extra@b@citeb\endcsname{DUMMY}%
+ \def\BCA##1##2{{\@BAstyle ##1}}%
+ }%
+ {\def\BCA##1##2{{\@BAstyle ##2}}%
+ }%
+ }%
+% \end{macrocode}
+% Check whether the current author(s) is (are) equivalent to the
+% previous. If so, only the year is cited in the text and a \cmd{\@BBY}
+% (probably comma and space) is inserted between the two years. The
+% \cmd{\protected@edef} fixes the problem with authors with accents
+% (e.g., J{\"{o}}reskog). Older versions of \pkg{apacite} solved this
+% less elegantly (\pkgoption{accentfix} option). This fix was provided by
+% Robert Schlicht. See also the new definition of \cmd{\@citeP} below.
+% \begin{macrocode}
+ \protected@edef\B@my@dummy{\csname
+ b@\@citeb\APAC@extra@b@citeb\endcsname}%
+ \ifx\@citeP\B@my@dummy
+ \@ifauthorsequalc@de{\@citeb\APAC@extra@b@citeb}%
+ \else
+ \@ifauthorsunequalc@de{\@citeb\APAC@extra@b@citeb}%
+ \fi
+% \end{macrocode}
+% Store the current author(s) for comparison in the next citation (if
+% any).
+% \begin{macrocode}
+ \protected@edef\@citeP{\csname b@\@citeb\APAC@extra@b@citeb\endcsname}%
+ \let\BCA\relax
+ }%%
+% \end{macrocode}
+% End of the loop over citation entries. Add the post-note and closing
+% parenthesis.
+% \begin{macrocode}
+ \ifx\@empty#2\@empty
+ \else%
+ {\@BBN #2}%
+ \fi%
+ \if@Y@cite%
+ {\@BAY}%
+ \fi%
+ {\@BBCP}%
+% \end{macrocode}
+% We're finished with this citation command. Initialize for the next
+% \cmd{\@@cite} call.
+% \begin{macrocode}
+ \@F@citetrue %
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\maskcitations}
+% \begin{macro}{\unmaskcitations}
+% \begin{macro}{\masknocite}
+% \begin{macro}{\maskcite}
+% \begin{macro}{\maskfullcite}
+% \begin{macro}{\maskshortcite}
+% \begin{macro}{\maskciteNP}
+% \begin{macro}{\maskfullciteNP}
+% \begin{macro}{\maskshortciteNP}
+% \begin{macro}{\maskciteA}
+% \begin{macro}{\maskfullciteA}
+% \begin{macro}{\maskshortciteA}
+% \begin{macro}{\maskciteauthor}
+% \begin{macro}{\maskfullciteauthor}
+% \begin{macro}{\maskshortciteauthor}
+% \begin{macro}{\maskciteauthorNP}
+% \begin{macro}{\maskfullciteauthorNP}
+% \begin{macro}{\maskshortciteauthorNP}
+% \begin{macro}{\maskciteyear}
+% \begin{macro}{\maskciteyearNP}
+% \begin{macro}{\masktext}
+% These commands allow masking of (self-)citations for a masked
+% review.
+% The \cmd{maskcitations} command defines the masked citation commands;
+% \cmd{unmaskcitations} does the same, but lets them be equal to the
+% non-mask versions. The advantage of putting these definitions within
+% a command is that we can switch between masked and unmasked within
+% the same document. This is not likely to be used very often in
+% practice, but is useful for writing tutorials.
+% \begin{macrocode}
+\newcommand{\maskcitations}{%
+ \def\masknocite##1{}%
+ \def\maskcite{%
+ \@ifnextchar<% % >
+ {\mask@cite}%
+ {\mask@cite<>}%
+ }%
+ \def\mask@cite<##1>{%
+ \@ifnextchar[% % ]
+ {\mask@@cite<##1>}%
+ {\mask@@cite<##1>[]}%
+ }%
+ \def\mask@@cite<##1>[##2]##3{%
+ \relax
+% \end{macrocode}
+% Count number of masked references.
+% \begin{macrocode}
+ \setcounter{maskedRefs}{0}%
+ \@for\@citeb:=##3\do{%
+ \addtocounter{maskedRefs}{1}%
+ }%
+ \ifnum\value{maskedRefs} = 1%
+ \onemaskedcitationmsg{\themaskedRefs}%
+ \else
+ \maskedcitationsmsg{\themaskedRefs}%
+ \fi
+ }%
+% \end{macrocode}
+% Let all other citation commands be identical to \cmd{\maskcite}.
+% We could try to do fancy things with parentheses, but it's unlikely
+% we will be able to cover all cases of interest, and users can easily
+% change their document if they don't like how this comes out.
+% \begin{macrocode}
+ \let\maskfullcite\maskcite
+ \let\maskshortcite\maskcite
+ \let\maskciteNP\maskcite
+ \let\maskfullciteNP\maskciteNP
+ \let\maskshortciteNP\maskciteNP
+ \let\maskciteA\maskcite
+ \let\maskfullciteA\maskciteA
+ \let\maskshortciteA\maskciteA
+ \let\maskciteauthor\maskcite
+ \let\maskfullciteauthor\maskciteauthor
+ \let\maskshortciteauthor\maskciteauthor
+ \let\maskciteauthorNP\maskciteauthor
+ \let\maskfullciteauthorNP\maskciteauthorNP
+ \let\maskshortciteauthorNP\maskciteauthorNP
+ \let\maskciteyear\maskcite
+ \let\maskciteyearNP\maskciteyear
+% \end{macrocode}
+% A user command to flexibly mask or unmask certain pieces of text.
+% An environment is technically more stable than a command, but less
+% intuitive for users. Under masking, this command prints the optional
+% alternative text |#1|, which defaults to nothing.
+% \begin{macrocode}
+ \DeclareRobustCommand{\masktext}[2][]{##1}%
+}
+% \end{macrocode}
+%
+% The ``mask'' citation commands revert to the same commands without
+% ``mask'' if the \pkgoption{mask} option is not set.
+% \begin{macrocode}
+\newcommand{\unmaskcitations}{%
+ \let\masknocite\nocite
+ \let\maskcite\cite
+ \let\maskfullcite\fullcite
+ \let\maskshortcite\shortcite
+ \let\maskciteNP\citeNP
+ \let\maskfullciteNP\fullciteNP
+ \let\maskshortciteNP\shortciteNP
+ \let\maskciteA\citeA
+ \let\maskfullciteA\fullciteA
+ \let\maskshortciteA\shortciteA
+ \let\maskciteauthor\citeauthor
+ \let\maskfullciteauthor\fullciteauthor
+ \let\maskshortciteauthor\shortciteauthor
+ \let\maskciteauthorNP\citeauthorNP
+ \let\maskfullciteauthorNP\fullciteauthorNP
+ \let\maskshortciteauthorNP\shortciteauthorNP
+ \let\maskciteyear\citeyear
+ \let\maskciteyearNP\citeyearNP
+% \end{macrocode}
+% Unmasked, this command prints the mandatory second argument |#2|.
+% \begin{macrocode}
+ \DeclareRobustCommand{\masktext}[2][]{##2}
+}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+%
+% End of ``classic'' citation commands.
+% \begin{macrocode}
+\fi
+% \end{macrocode}
+%
+% \subsubsection{Emulation of \pkg{natbib} citation commands}
+%
+% If requested, this section defines the \pkg{natbib} citation commands,
+% using the same syntax, without actually loading \pkg{natbib}. We also
+% define a few additional commands that \pkg{natbib} did not implement,
+% but that fit the scheme and serve some useful purpose for APA style
+% citation.
+%
+% |\if@APAC@alias@cite| needs to be defined outside the
+% |\if@APAC@natbib@emu| because otherwise \TeX{} does not process the
+% nested |\if|'s below correctly.
+% \begin{macrocode}
+\newif\if@APAC@alias@cite
+\@APAC@alias@citefalse
+\if@APAC@natbib@emu
+% \end{macrocode}
+%
+% \begin{macro}{\citep}
+% \begin{macro}{\shortcitep}
+% Parenthetical citation commands.
+% \begin{macrocode}
+\DeclareRobustCommand\citep{%
+ \@ifstar{% full cite
+ \def\BCAY##1##2##3{\BCA{##1}{##1}}% kept for compat. with prev. versions
+ \def\citeauthoryear##1##2##3{\BCA{##1}{##1}}%
+ }{% else
+ \def\BCAY##1##2##3{\BCA{##1}{##2}}% kept for compat. with prev. versions
+ \def\citeauthoryear##1##2##3{\BCA{##1}{##2}}%
+ }%
+ \def\@BBOP{\BBOP}% % open parenthesis
+ \def\@BBCP{\BBCP}% % close parenthesis
+ \@ifnextchar[% % ]
+ {\APACNAT@citep}%
+ {\APACNAT@citep[]}%
+}
+\DeclareRobustCommand\shortcitep{%
+ \def\BCAY##1##2##3{\BCA{##2}{##2}}% kept for compat. with prev. versions
+ \def\citeauthoryear##1##2##3{\BCA{##2}{##2}}%
+ \def\@BBOP{\BBOP}% % open parenthesis
+ \def\@BBCP{\BBCP}% % close parenthesis
+ \@ifnextchar[% % ]
+ {\APACNAT@citep}%
+ {\APACNAT@citep[]}%
+}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\citealp}
+% \begin{macro}{\shortcitealp}
+% Parenthetical citation commands, but without the actual parentheses.
+% \begin{macrocode}
+\DeclareRobustCommand\citealp{%
+ \@ifstar{% full cite
+ \def\BCAY##1##2##3{\BCA{##1}{##1}}% kept for compat. with prev. versions
+ \def\citeauthoryear##1##2##3{\BCA{##1}{##1}}%
+ }{% else
+ \def\BCAY##1##2##3{\BCA{##1}{##2}}% kept for compat. with prev. versions
+ \def\citeauthoryear##1##2##3{\BCA{##1}{##2}}%
+ }%
+ \def\@BBOP{}% % open parenthesis
+ \def\@BBCP{}% % close parenthesis
+ \@ifnextchar[%% ]
+ {\APACNAT@citep}%
+ {\APACNAT@citep[]}%
+}
+\DeclareRobustCommand\shortcitealp{%
+ \def\BCAY##1##2##3{\BCA{##2}{##2}}% kept for compat. with prev. versions
+ \def\citeauthoryear##1##2##3{\BCA{##2}{##2}}%
+ \def\@BBOP{}% % open parenthesis
+ \def\@BBCP{}% % close parenthesis
+ \@ifnextchar[%% ]
+ {\APACNAT@citep}%
+ {\APACNAT@citep[]}%
+}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\APACNAT@citep}
+% Second layer of the parenthetical and alp citation commands.
+% \begin{macrocode}
+\newcommand\APACNAT@citep{}
+\def\APACNAT@citep[#1]{%
+ \def\@BAP{\BAP}% % after precitation [=#1] before first citation
+ \def\@BBA{\BBAA}% % `and' between authors
+ \def\@BBAY{\BBAY}% % between author and year
+ \def\@BAY{}% % after year
+ \def\@BBY{\BBYY}% % between years of multiple citations with same author
+ \def\@BBC{\BBC}% % between cites
+ \def\@BBN{\BBN}% % after last citation before note/postcitation [=#2]
+ \def\@BAstyle{\BAstyle}% text style of authors
+ \@A@citetrue% % cite authors
+ \@Y@citetrue% % cite years
+ \@ifnextchar[% % ]
+ {\@citex[#1]}%
+ {\@citex[][#1]}%
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\citet}
+% \begin{macro}{\shortcitet}
+% In-text citation commands.
+% \begin{macrocode}
+\DeclareRobustCommand\citet{%
+ \@ifstar{%
+ \def\BCAY##1##2##3{\BCA{##1}{##1}}% kept for compat. with prev. versions
+ \def\citeauthoryear##1##2##3{\BCA{##1}{##1}}%
+ }{% else
+ \def\BCAY##1##2##3{\BCA{##1}{##2}}% kept for compat. with prev. versions
+ \def\citeauthoryear##1##2##3{\BCA{##1}{##2}}%
+ }%
+ \def\@BBAY{ \BBOP}%% between author and year
+ \@ifnextchar[% %]
+ {\APACNAT@citet}%
+ {\APACNAT@citet[]}%
+}
+\DeclareRobustCommand\shortcitet{%
+ \def\BCAY##1##2##3{\BCA{##2}{##2}}% kept for compat. with prev. versions
+ \def\citeauthoryear##1##2##3{\BCA{##2}{##2}}%
+ \def\@BBAY{ \BBOP}%% between author and year
+ \@ifnextchar[% %]
+ {\APACNAT@citet}%
+ {\APACNAT@citet[]}%
+}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\citealt}
+% \begin{macro}{\shortcitealt}
+% Text citation commands, but without the actual parentheses. Not sure when
+% this would be useful, but \pkg{natbib} defines them.
+% \begin{macrocode}
+\DeclareRobustCommand\citealt{%
+ \@ifstar{% full cite
+ \def\BCAY##1##2##3{\BCA{##1}{##1}}% kept for compat. with prev. versions
+ \def\citeauthoryear##1##2##3{\BCA{##1}{##1}}%
+ }{% else
+ \def\BCAY##1##2##3{\BCA{##1}{##2}}% kept for compat. with prev. versions
+ \def\citeauthoryear##1##2##3{\BCA{##1}{##2}}%
+ }%
+ \def\@BBOP{}% % open parenthesis
+ \def\@BBCP{}% % close parenthesis
+ \def\@BBAY{ }%% between author and year
+ \@ifnextchar[%% ]
+ {\APACNAT@citet}%
+ {\APACNAT@citet[]}%
+}
+\DeclareRobustCommand\shortcitealt{%
+ \def\BCAY##1##2##3{\BCA{##2}{##2}}% kept for compat. with prev. versions
+ \def\citeauthoryear##1##2##3{\BCA{##2}{##2}}%
+ \def\@BBOP{}% % open parenthesis
+ \def\@BBCP{}% % close parenthesis
+ \def\@BBAY{ }%% between author and year
+ \@ifnextchar[%% ]
+ {\APACNAT@citet}%
+ {\APACNAT@citet[]}%
+}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\APACNAT@citet}
+% Second layer of in-text and alt citation commands.
+% \begin{macrocode}
+\newcommand\APACNAT@citet{}
+\def\APACNAT@citet[#1]{%
+ \def\@BBOP{}% % open parenthesis.
+ \def\@BAP{\BAP}% % after precitation [=#1] before first citation
+ \def\@BBA{\BBAB}% % `and' between authors
+%% \def\@BBAY{ \BBOP}%% between author and year
+ \def\@BAY{\BBCP}% % after year
+ \def\@BBY{\BBYY}% % between years of multiple citations with same author
+ \def\@BBC{\BBC}% % between cites
+ \def\@BBN{\BBN}% % after last citation before note/postcitation [=#2]
+ \def\@BBCP{}% % close parenthesis
+ \def\@BAstyle{\BAstyle}% text style of authors
+ \@A@citetrue% % cite authors
+ \@Y@citetrue% % cite years
+ \@ifnextchar[% % ]
+ {\@citex[#1]}%
+ {\@citex[][#1]}%
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\citeauthort}
+% \begin{macro}{\shortciteauthort}
+% \begin{macro}{\citeauthorp}
+% \begin{macro}{\shortciteauthorp}
+% \begin{macro}{\citeauthor}
+% \begin{macro}{\citefullauthor}
+% \begin{macro}{\shortciteauthor}
+% Commands that only cite the author, for parenthetical and in-text citations,
+% the difference being that `\&' is used in the parenthetical versions,
+% whereas the in-text versions use `and' between the authors. Note that all
+% are without parentheses.
+% \begin{macrocode}
+\DeclareRobustCommand\citeauthort{%
+ \@ifstar{%
+ \def\BCAY##1##2##3{\BCA{##1}{##1}}% kept for compat. with prev. versions
+ \def\citeauthoryear##1##2##3{\BCA{##1}{##1}}%
+ }{% else
+ \def\BCAY##1##2##3{\BCA{##1}{##2}}% kept for compat. with prev. versions
+ \def\citeauthoryear##1##2##3{\BCA{##1}{##2}}%
+ }%
+ \@ifnextchar[% %]
+ {\APACNAT@citeauthort}%
+ {\APACNAT@citeauthort[]}%
+}
+\DeclareRobustCommand\shortciteauthort{%
+ \def\BCAY##1##2##3{\BCA{##2}{##2}}% kept for compat. with prev. versions
+ \def\citeauthoryear##1##2##3{\BCA{##2}{##2}}%
+ \@ifnextchar[% %]
+ {\APACNAT@citeauthort}%
+ {\APACNAT@citeauthort[]}%
+}
+\DeclareRobustCommand\citeauthorp{%
+ \@ifstar{%
+ \def\BCAY##1##2##3{\BCA{##1}{##1}}% kept for compat. with prev. versions
+ \def\citeauthoryear##1##2##3{\BCA{##1}{##1}}%
+ }{% else
+ \def\BCAY##1##2##3{\BCA{##1}{##2}}% kept for compat. with prev. versions
+ \def\citeauthoryear##1##2##3{\BCA{##1}{##2}}%
+ }%
+ \@ifnextchar[% %]
+ {\APACNAT@citeauthorp}%
+ {\APACNAT@citeauthorp[]}%
+}
+\DeclareRobustCommand\shortciteauthorp{%
+ \def\BCAY##1##2##3{\BCA{##2}{##2}}% kept for compat. with prev. versions
+ \def\citeauthoryear##1##2##3{\BCA{##2}{##2}}%
+ \@ifnextchar[% %]
+ {\APACNAT@citeauthorp}%
+ {\APACNAT@citeauthorp[]}%
+}
+\DeclareRobustCommand\citeauthor{\citeauthort}
+\DeclareRobustCommand\citefullauthor{\citeauthort*}
+\DeclareRobustCommand\shortciteauthor{\shortciteauthort}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\APACNAT@citeauthort}
+% \begin{macro}{\APACNAT@citeauthorp}
+% Second layer of the author citation commands.
+% \begin{macrocode}
+\newcommand\APACNAT@citeauthort{}
+\def\APACNAT@citeauthort[#1]{%
+ \def\@BBOP{}% % open parenthesis
+ \def\@BAP{\BAP}% % after precitation [=#1] before first citation
+ \def\@BBA{\BBAB}% % `and' between authors
+ \def\@BBAY{}% % between author and year
+ \def\@BAY{}% % after year
+ \def\@BBY{}% % between years of multiple citations with same author
+ \def\@BBC{\BBC}% % between cites
+ \def\@BBN{\BBN}% % after last citation before note/postcitation [=#2]
+ \def\@BBCP{}% % close parenthesis
+ \def\@BAstyle{\BAastyle}% text style of authors
+ \@A@citetrue% % cite authors
+ \@Y@citefalse% % do not cite years
+ \@ifnextchar[% % ]
+ {\@citex[#1]}%
+ {\@citex[][#1]}%
+}
+\newcommand\APACNAT@citeauthorp{}
+\def\APACNAT@citep[#1]{%
+ \def\@BBOP{}% % open parenthesis
+ \def\@BAP{\BAP}% % after precitation [=#1] before first citation
+ \def\@BBA{\BBAA}% % `and' between authors
+ \def\@BBAY{}% % between author and year
+ \def\@BAY{}% % after year
+ \def\@BBY{}% % between years of multiple citations with same author
+ \def\@BBC{\BBC}% % between cites
+ \def\@BBN{\BBN}% % after last citation before note/postcitation [=#2]
+ \def\@BBCP{}% % close parenthesis
+ \def\@BAstyle{\BAastyle}% text style of authors
+ \@A@citetrue% % cite authors
+ \@Y@citefalse% % do not cite years
+ \@ifnextchar[% % ]
+ {\@citex[#1]}%
+ {\@citex[][#1]}%
+}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\citeyearpar}
+% \begin{macro}{\citeyear}
+% Cite only the year; parenthetical and without parentheses. Note that these
+% are the \pkg{natbib} conventions, so unlike traditional \pkg{apacite}
+% \cmd{\citeyear}, \cmd{\citeyear} here does not include the parentheses.
+% \begin{macrocode}
+\DeclareRobustCommand\citeyearpar{%
+ \def\BCAY##1##2##3{\BCA{##1}{##2}}% kept for compat. with prev. versions
+ \def\citeauthoryear##1##2##3{\BCA{##1}{##2}}%
+ \def\@BBOP{\BBOP}% % open parenthesis
+ \def\@BBCP{\BBCP}% % close parenthesis
+ \@ifnextchar[% % ]
+ {\APACNAT@citeyear}%
+ {\APACNAT@citeyear[]}%
+}
+\DeclareRobustCommand\citeyear{%
+ \def\BCAY##1##2##3{\BCA{##1}{##2}}% kept for compat. with prev. versions
+ \def\citeauthoryear##1##2##3{\BCA{##1}{##2}}%
+ \def\@BBOP{}% % open parenthesis
+ \def\@BBCP{}% % close parenthesis
+ \@ifnextchar[% % ]
+ {\APACNAT@citeyear}%
+ {\APACNAT@citeyear[]}%
+}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\APACNAT@citeyear}
+% Second layer of the year citation commands.
+% \begin{macrocode}
+\newcommand\APACNAT@citeyear{}
+\def\APACNAT@citeyear[#1]{%
+ \def\@BAP{\BAP}% % after precitation [=#1] before first citation
+ \def\@BBA{}% % `and' between authors
+ \def\@BBAY{}% % between author and year
+ \def\@BAY{}% % after year
+ \def\@BBY{\BBYY}% % between years of multiple citations with same author
+ \def\@BBC{\BBC}% % between cites
+ \def\@BBN{\BBN}% % after last citation before note/postcitation [=#2]
+ \def\@BAstyle{}% % text style of authors
+ \@A@citefalse% % do not cite authors
+ \@Y@citetrue% % cite years
+ \@ifnextchar[% % ]
+ {\@citex[#1]}%
+ {\@citex[][#1]}%
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\APACNAT@citex}
+% The core citation command. We will let \cmd{\@citex} revert to this.
+% \begin{macrocode}
+\newcommand\APACNAT@citex{}
+\def\APACNAT@citex[#1][#2]#3{%
+% \end{macrocode}
+% Write citation(s) to \fname{.aux} file(s)
+% \begin{macrocode}
+ \nocite{#3}%
+% \end{macrocode}
+% The previous cite, for multiple citations with same author.
+% \begin{macrocode}
+ \edef\@citeP{}%
+% \end{macrocode}
+% Open parenthesis and pre-note. The \cmd{\mbox} is to avoid \pkg{hyperref}
+% problems if a citation command follows an \cmd{\item}. Better to change
+% this to using \cmd{\citetext}; for the todo list.
+% \begin{macrocode}
+ \mbox{\@BBOP}%
+ \ifx\@empty#1\@empty
+ \else%
+ {\ignorespaces #1\@BAP}%
+ \fi%
+% \end{macrocode}
+% Loop over citation entries
+% \begin{macrocode}
+ \@for\@citeb:=#3\do{%
+% \end{macrocode}
+% Removes a possible space before the citation key, so that, e.g.,
+% \verb*+\cite{key1, key2}+ can be done.
+% \begin{macrocode}
+ \edef\@citeb{\expandafter\@firstofone\@citeb}%
+% \end{macrocode}
+% For \pkg{backref}.
+% \begin{macrocode}
+ \back@cite{\@citeb}%
+% \end{macrocode}
+% If this is an alias cite, we should include the alias but not author
+% or year, so the code is slightly different.
+% \begin{macrocode}
+ \if@APAC@alias@cite
+% \end{macrocode}
+% Check whether the alias is defined.
+% \begin{macrocode}
+ \@ifundefined{al@\@citeb\APAC@extra@b@citeb}%
+ {\PackageWarning{apacite}{Undefined alias for citation \@citeb}
+ \expandafter\def\csname al@\@citeb\APAC@extra@b@citeb\endcsname{?}%
+ }{}%
+% \end{macrocode}
+% Replace the authors by the alias and don't cite years.
+% \begin{macrocode}
+ \@Y@citefalse % do not cite years
+ \def\BCA##1##2{{\@BAstyle \csname
+ al@\@citeb\APAC@extra@b@citeb\endcsname}}%
+% \end{macrocode}
+% Use the ``unequal'' code because the alias takes the place of the
+% authors.
+% \begin{macrocode}
+ \@ifauthorsunequalc@de{\@citeb\APAC@extra@b@citeb}%
+ \else
+% \end{macrocode}
+% The usual author and/or year citation. Check whether the citation is
+% defined.
+% \begin{macrocode}
+ \@ifundefined{b@\@citeb\APAC@extra@b@citeb}%
+ {\expandafter\def\csname b@\@citeb\APAC@extra@b@citeb\endcsname{?}%
+ \expandafter\def\csname Y@\@citeb\APAC@extra@b@citeb\endcsname{?}%
+ }%
+% \end{macrocode}
+% If the citation is defined, check whether the flag has been set that
+% identifies that this is not the first citation to the work. If this
+% flag has not been set, it will be set to |DUMMY|. If this is the first
+% citation to the work, the full citation is used; else the short version
+% is used.
+% \begin{macrocode}
+ {\@ifundefined{flag@\@citeb\APAC@extra@b@citeb}%
+ {\global\expandafter
+ \def\csname flag@\@citeb\APAC@extra@b@citeb\endcsname{DUMMY}%
+ \def\BCA##1##2{{\@BAstyle ##1}}%
+ }%
+ {\def\BCA##1##2{{\@BAstyle ##2}}%
+ }%
+ }%
+% \end{macrocode}
+% Check whether the current author(s) is (are) equivalent to the
+% previous. If so, only the year is cited in the text and a \cmd{\@BBY}
+% (probably comma and space) is inserted between the two years. The
+% \cmd{\protected@edef} fixes the problem with authors with accents
+% (e.g., J{\"{o}}reskog). Older versions of \pkg{apacite} solved this
+% less elegantly (\pkgoption{accentfix} option). This fix was provided by
+% Robert Schlicht. See also the new definition of \cmd{\@citeP} below.
+% \begin{macrocode}
+ \protected@edef\B@my@dummy{\csname
+ b@\@citeb\APAC@extra@b@citeb\endcsname}%
+ \ifx\@citeP\B@my@dummy
+ \@ifauthorsequalc@de{\@citeb\APAC@extra@b@citeb}%
+ \else
+ \@ifauthorsunequalc@de{\@citeb\APAC@extra@b@citeb}%
+ \fi
+% \end{macrocode}
+% Store the current author(s) for comparison in the next citation (if
+% any).
+% \begin{macrocode}
+ \protected@edef\@citeP{\csname
+ b@\@citeb\APAC@extra@b@citeb\endcsname}%
+ \let\BCA\relax
+ \fi
+ }%
+% \end{macrocode}
+% End of the loop over citation entries. Add the post-note and closing
+% parenthesis.
+% \begin{macrocode}
+ \ifx\@empty#2\@empty
+ \else%
+ {\@BBN #2}%
+ \fi%
+ \if@Y@cite%
+ {\@BAY}%
+ \fi%
+ {\@BBCP}%
+% \end{macrocode}
+% We're finished with this citation command. Initialize for the next
+% \cmd{\APACNAT@citex} call.
+% \begin{macrocode}
+ \@F@citetrue %
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\citetext}
+% To place any arbitrary text inside the citation braces, use
+% \cmd{\citetext}.
+% \begin{macrocode}
+\newcommand\citetext[1]{\mbox{}\BBOP{}#1\BBCP}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@citex}
+% The core citation command.
+% \begin{macrocode}
+\let\@citex\APACNAT@citex
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\cite}
+% The use of \cmd{\cite} is considered deprecated in \pkg{natbib}, but
+% we provide it as a backwards compatibility definition just like \pkg{natbib}.
+% Without optional arguments, it reverts to \cmd{\citep} and with optional
+% arguments (even empty ones), it reverts to \cmd{\citet}.
+% \begin{macrocode}
+\DeclareRobustCommand\cite{%
+ \@ifstar{%
+ \@ifnextchar[% %]
+ {\citep*}%
+ {\citet*}%
+ }{%
+ \@ifnextchar[% %]
+ {\citep}%
+ {\citet}%
+ }%
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\Citet}
+% \begin{macro}{\Citep}
+% \begin{macro}{\Citealt}
+% \begin{macro}{\Citealp}
+% \begin{macro}{\Citeauthort}
+% \begin{macro}{\Citeauthorp}
+% \begin{macro}{\Citeauthor}
+% \begin{macro}{\Citefullauthor}
+% \begin{macro}{\Cite}
+% Commands that capitalize the first name in a citation, to be used at the
+% beginning of a sentence. These are currently not implemented yet, so let's
+% just define them to be equal to the non-capitalized versions.
+% \begin{macrocode}
+\DeclareRobustCommand\Citet{\citet}
+\DeclareRobustCommand\Citep{\citep}
+\DeclareRobustCommand\Citealt{\citealt}
+\DeclareRobustCommand\Citealp{\citealp}
+\DeclareRobustCommand\Citeauthort{\citeauthort}
+\DeclareRobustCommand\Citeauthorp{\citeauthorp}
+\DeclareRobustCommand\Citeauthor{\citeauthor}
+\DeclareRobustCommand\Citefullauthor{\citefullauthor}
+\DeclareRobustCommand\Cite{\cite}
+\DeclareRobustCommand\shortCitet{\shortcitet}
+\DeclareRobustCommand\shortCitep{\shortcitep}
+\DeclareRobustCommand\shortCitealt{\shortcitealt}
+\DeclareRobustCommand\shortCitealp{\shortcitealp}
+\DeclareRobustCommand\shortCiteauthort{\shortciteauthort}
+\DeclareRobustCommand\shortCiteauthorp{\shortciteauthorp}
+\DeclareRobustCommand\shortCiteauthor{\shortciteauthor}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\shortcites}
+% This declares a list of citations that should be cited in their
+% short form. This can be overridden by using the starred form of
+% the citation commands later.
+% \begin{macrocode}
+\newcommand\shortcites[1]{%
+ \@bsphack
+ \@for\@citeb:=#1\do{%
+ \edef\@citeb{\expandafter\@firstofone\@citeb}%
+ \global\expandafter
+ \def\csname flag@\@citeb\APAC@extra@b@citeb\endcsname{DUMMY}%
+ }%
+ \@esphack
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\defcitealias}
+% \begin{macro}{\citetalias}
+% \begin{macro}{\citepalias}
+% Define an ``alias'', which can be an arbitrary text string, and use
+% this instead of the author and year in a citation. Adapted from
+% \fname{natbib.dtx}.
+% \begin{macrocode}
+\newcommand\defcitealias[2]{%
+ \@ifundefined{al@#1\APAC@extra@b@citeb}{}
+ {\PackageWarning{apacite}{Overwriting existing alias for citation #1}}
+ \@namedef{al@#1\APAC@extra@b@citeb}{#2}}
+\DeclareRobustCommand\citetalias{%
+ \@APAC@alias@citetrue
+ \citet
+}
+\DeclareRobustCommand\citepalias{%
+ \@APAC@alias@citetrue
+ \citep
+}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+%
+% Define \cmd{\citeindextype}, |\citeindextrue|, and |\citeindexfalse|
+% for compatibility with \pkg{natbib}. However, these don't do anything
+% in \pkg{apacite}, which supports author indexes using one of the
+% ``index'' options and back referencing of specific citations using
+% the \pkg{backref} package.
+% \begin{macrocode}
+\newif\ifciteindex \citeindexfalse
+\newcommand\citeindextype{default}
+% \end{macrocode}
+%
+% \begin{macro}{\citenumfont}
+% The \pkg{natbib} command \cmd{\citenum} is undefined and thus gives an
+% error, but the \cmd{\citenumfont} declaration is harmless and can stay.
+% \begin{macrocode}
+\let\citenumfont=\@empty
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\bibpunct}
+% This sets various punctuation commands equal to its arguments.
+% In contrast with the \pkg{natbib} implementation, the 5th argument
+% (4th mandatory argument) is ignored, because \pkg{apacite} currently
+% only supports author-year citations. Also, in contrast to the
+% \pkg{natbib} implementation, this does not disable subsequent
+% \cmd{\bibstyle} commands.
+% \begin{macrocode}
+\newcommand\bibpunct[7][, ]%
+ {\gdef\BBOP{#2}\gdef\BBCP{#3}\gdef\BBC{#4}%
+ \gdef\BBAY{#6}\gdef\BBYY{#7}\gdef\BBN{#1}%
+ }
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\bibstyle@apacite}
+% \begin{macro}{\bibstyle@apa}
+% These commands define the punctuation to be the \pkg{apacite}
+% default. This is normally not very useful, because this only
+% defines things as they are by default in \pkg{apacite} anyway, but
+% it may be useful as a simple reset if different parts of the
+% document need to use different styles.
+% \begin{macrocode}
+\newcommand\bibstyle@apacite{%
+ \bibpunct[, ]{(}{)}{; }{a}{, }{, }%
+ \setlength{\bibhang}{2.5em}%
+ \setlength{\bibsep}{0pt}%
+}
+\let\bibstyle@apa=\bibstyle@apacite
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\citestyle}
+% This command selects a predefined citation punctuation style.
+% In contrast to the \pkg{natbib} implementation, this is not
+% deactivated at |\begin{document}|, so it's possible to change
+% to a different style in the document body.
+% \begin{macrocode}
+\newcommand\citestyle[1]{\csname bibstyle@#1\endcsname}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\setcitestyle}
+% This sets individual punctuation parameters. Adapted from
+% \fname{natbib.dtx}.
+% \begin{macrocode}
+\newcommand\setcitestyle[1]{%
+ \@for\@tempa:=#1\do
+ {\def\@tempb{round}\ifx\@tempa\@tempb
+ \renewcommand\BBOP{(}\renewcommand\BBCP{)}\fi
+ \def\@tempb{square}\ifx\@tempa\@tempb
+ \renewcommand\BBOP{[}\renewcommand\BBCP{]}\fi
+ \def\@tempb{angle}\ifx\@tempa\@tempb
+ \renewcommand\BBOP{$<$}\renewcommand\BBCP{$>$}\fi
+ \def\@tempb{curly}\ifx\@tempa\@tempb
+ \renewcommand\BBOP{\{}\renewcommand\BBCP{\}}\fi
+ \def\@tempb{semicolon}\ifx\@tempa\@tempb
+ \renewcommand\BBC{; }\fi
+ \def\@tempb{colon}\ifx\@tempa\@tempb
+ \renewcommand\BBC{: }\fi
+ \def\@tempb{comma}\ifx\@tempa\@tempb
+ \renewcommand\BBC{, }\fi
+% \end{macrocode}
+% \pkg{apacite} supports author-year citation only, so |authoryear|,
+% |numbers|, and |super| are ignored. (Alternatively, we could have
+% issued an error for |numbers| and |super|.)
+% \begin{macrocode}
+ \def\@tempb{authoryear}\ifx\@tempa\@tempb
+ \fi
+ \def\@tempb{numbers}\ifx\@tempa\@tempb
+ \fi
+ \def\@tempb{super}\ifx\@tempa\@tempb
+ \fi
+ \expandafter\APAC@find@eq\@tempa=\relax\@nil
+ \if\@tempc\relax\else
+ \expandafter\APAC@rem@eq\@tempc
+ \def\@tempb{open}\ifx\@tempa\@tempb
+ \xdef\BBOP{\@tempc}\fi
+ \def\@tempb{close}\ifx\@tempa\@tempb
+ \xdef\BBCP{\@tempc}\fi
+ \def\@tempb{aysep}\ifx\@tempa\@tempb
+ \xdef\BBAY{\@tempc}\fi
+ \def\@tempb{yysep}\ifx\@tempa\@tempb
+ \xdef\BBYY{\@tempc}\fi
+ \def\@tempb{notesep}\ifx\@tempa\@tempb
+ \xdef\BBN{\@tempc}\fi
+ \def\@tempb{citesep}\ifx\@tempa\@tempb
+ \xdef\BBC{\@tempc}\fi
+ \fi
+ }%
+}
+\def\APAC@find@eq#1=#2\@nil{\def\@tempa{#1}\def\@tempc{#2}}
+\def\APAC@rem@eq#1={\def\@tempc{#1}}
+% \end{macrocode}
+% \end{macro}
+%
+% End of \pkg{natbib} emulation code.
+% \begin{macrocode}
+\fi
+% \end{macrocode}
+%
+% \subsubsection{Using \pkg{apacite} with \pkg{natbib} for citations}
+%
+% If requested, this section loads \pkg{natbib} with the options
+% \pkgoption{longnamesfirst} and \pkgoption{sort}, which are
+% necessary for APA-style adherence. Then, we redefine some
+% \pkg{natbib} and \pkg{apacite} commands to improve APA adherence of
+% the combination. We also define a few additional commands that
+% \pkg{natbib} did not implement, but that fit the scheme and serve
+% some useful purpose for APA style citation. Defer loading this part
+% until the end of the package, after loading the bibliography part.
+% (This needs to be fixed.)
+%
+% \begin{macrocode}
+\newcommand{\BBA@nat}{%
+ \ifNAT@swa
+% \end{macrocode}
+% parenthetical; ``\&''
+% \begin{macrocode}
+ \BBAA
+ \else
+% \end{macrocode}
+% in-text; ``and''
+% \begin{macrocode}
+ \BBAB
+ \fi
+}
+\if@APAC@natbib@apa
+ \AtEndOfPackage{%
+ \if@sectionbibdefault
+ \RequirePackage[longnamesfirst,sort]{natbib}
+ \else\if@sectionbib
+ \RequirePackage[longnamesfirst,sort,sectionbib]{natbib}
+ \else
+ \RequirePackage[longnamesfirst,sort]{natbib}
+ \fi\fi
+% \end{macrocode}
+%
+% \begin{macro}{\NAT@parse@date}
+% Redefine \pkg{natbib}'s date parsing function to avoid dropping the
+% year in ``(2008a, 2008b)''.
+% \begin{macrocode}
+\renewcommand\NAT@parse@date{}
+\def\NAT@parse@date#1#2#3#4#5#6@@{%
+ \def\NAT@year{#1#2}\def\NAT@exlab{{#3}}}
+% \end{macrocode}
+% \end{macro}
+% ``and'' vs.\ ``\&''.
+% \begin{macrocode}
+\DeclareRobustCommand{\BBA}{\BBA@nat}
+% \end{macrocode}
+% In the reflist ``\&''.
+% \begin{macrocode}
+\let\orig@nat@@lbibitem\@lbibitem
+\def\@lbibitem{\NAT@swatrue\orig@nat@@lbibitem}
+% \end{macrocode}
+%
+% Make sure we're in parenthetical mode when in \cmd{\citetext}
+% \begin{macrocode}
+\renewcommand\citetext[1]{\NAT@open\begingroup\NAT@swatrue
+ #1\endgroup\NAT@close}
+% \end{macrocode}
+%
+% \begin{macro}{\citeauthort}
+% \begin{macro}{\citeauthorp}
+% \begin{macro}{\citefullauthort}
+% \begin{macro}{\citefullauthorp}
+% \begin{macro}{\Citeauthort}
+% \begin{macro}{\Citeauthorp}
+% \begin{macro}{\Citefullauthort}
+% \begin{macro}{\Citefullauthorp}
+% There's only one \cmd{\citeauthor}, but we need to distinguish
+% between parenthetical and in-text. The most common is in-text, so
+% let \cmd{\citeauthor} be the in-text one, but define
+% \cmd{\citeauthort} to be the same, and add \cmd{\citeauthorp}.
+% \begin{macrocode}
+\DeclareRobustCommand\citeauthort{\citeauthor}
+\DeclareRobustCommand\Citeauthort{\Citeauthor}
+\DeclareRobustCommand\citeauthorp
+ {\begingroup\NAT@swatrue\let\NAT@ctype\@ne\NAT@parfalse
+ \@ifstar{\NAT@fulltrue\NAT@citetp}{\NAT@fullfalse\NAT@citetp}}
+\DeclareRobustCommand\Citeauthorp
+ {\begingroup\NAT@swatrue\let\NAT@ctype\@ne\NAT@parfalse
+ \let\NAT@up\NAT@Up
+ \@ifstar{\NAT@fulltrue\NAT@citetp}{\NAT@fullfalse\NAT@citetp}}
+% \end{macrocode}
+% For completeness of the system.
+% \begin{macrocode}
+\DeclareRobustCommand{\Citefullauthor}{\Citeauthor*}
+\DeclareRobustCommand{\citefullauthort}{\citeauthort*}
+\DeclareRobustCommand{\citefullauthorp}{\citeauthorp*}
+\DeclareRobustCommand{\Citefullauthort}{\Citeauthort*}
+\DeclareRobustCommand{\Citefullauthorp}{\Citeauthorp*}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\bibstyle@apacite}
+% \begin{macro}{\bibstyle@apa}
+% Other settings. I think the \pkg{natbib} defaults are good, but
+% let's define this explicitly and allow the usual \pkg{apacite}
+% customization options.
+% \begin{macrocode}
+\providecommand\bibstyle@apacite{%
+% \end{macrocode}
+% \pkg{natbib} is inconsistent with adding space.
+% \begin{macrocode}
+ \renewcommand{\BBAY}{,}%
+ \renewcommand{\BBC}{;}%
+ \renewcommand{\BBYY}{,}%
+ \bibpunct[\BBN ]{\BBOP }{\BBCP }{\BBC }{a}{\BBAY }{\BBYY }%
+ \setlength{\bibhang}{2.5em}%
+ \setlength{\bibsep}{0pt}%
+}
+\providecommand\bibstyle@apa{\bibstyle@apacite}
+\citestyle{apacite}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+% End of \pkg{natbib}--\pkg{apacite} code.
+% \begin{macrocode}
+}% end \cmd{\AtEndOfPackage}
+\fi
+% \end{macrocode}
+%
+% \subsubsection{Shared code for \pkgoption{natbibemu} and
+% \pkgoption{natbibapa}}
+%
+% This section defines some extensions of \pkg{natbib} that are
+% useful with both the \pkgoption{natbibemu} and \pkgoption{natbibapa}
+% options.
+%
+% \begin{macrocode}
+\if@APAC@any@natbib
+% \end{macrocode}
+%
+% \begin{macro}{\maskcitations}
+% \begin{macro}{\unmaskcitations}
+% \begin{macro}{\masknocite}
+% \begin{macro}{\maskcitep}
+% \begin{macro}{\maskcitealp}
+% \begin{macro}{\maskcitet}
+% \begin{macro}{\maskcitealt}
+% \begin{macro}{\maskciteauthor}
+% \begin{macro}{\maskcitefullauthor}
+% \begin{macro}{\maskciteyearpar}
+% \begin{macro}{\maskciteyear}
+% \begin{macro}{\maskcite}
+% \begin{macro}{\maskcitetalias}
+% \begin{macro}{\maskcitepalias}
+% \begin{macro}{\maskCitet}
+% \begin{macro}{\maskCitep}
+% \begin{macro}{\maskCitealt}
+% \begin{macro}{\maskCitealp}
+% \begin{macro}{\maskCiteauthor}
+% \begin{macro}{\maskcitenum}
+% \begin{macro}{\maskciteauthort}
+% \begin{macro}{\maskciteauthorp}
+% \begin{macro}{\maskCitefullauthor}
+% \begin{macro}{\maskCiteauthort}
+% \begin{macro}{\maskCiteauthorp}
+% \begin{macro}{\masktext}
+% These commands allow masking of (self-)citations for a masked
+% review.
+% The \cmd{maskcitations} command defines the masked citation commands;
+% \cmd{unmaskcitations} does the same, but lets them be equal to the
+% non-mask versions. The advantage of putting these definitions within
+% a command is that we can switch between masked and unmasked within
+% the same document. This is not likely to be used very often in
+% practice, but is useful for writing tutorials.
+% \begin{macrocode}
+\newcommand{\maskcitations}{%
+ \def\masknocite##1{}%
+ \DeclareRobustCommand\maskcite{%
+ \@ifnextchar[% % ]
+ {\mask@cite}%
+ {\mask@cite[]}%
+ }%
+ \def\mask@cite[##1]{%
+ \@ifnextchar[% % ]
+ {\mask@@cite[##1]}%
+ {\mask@@cite[##1][]}%
+ }%
+ \def\mask@@cite[##1][##2]##3{%
+ \relax
+% \end{macrocode}
+% Count number of masked references.
+% \begin{macrocode}
+ \setcounter{maskedRefs}{0}%
+ \@for\@citeb:=##3\do{%
+ \addtocounter{maskedRefs}{1}%
+ }%
+ \ifnum\value{maskedRefs} = 1%
+ \onemaskedcitationmsg{\themaskedRefs}%
+ \else
+ \maskedcitationsmsg{\themaskedRefs}%
+ \fi
+ }%
+% \end{macrocode}
+% Let all other citation commands be identical to \cmd{\maskcite}.
+% We could try to do fancy things with parentheses, but it's unlikely
+% we will be able to cover all cases of interest, and users can easily
+% change their document if they don't like how this comes out.
+% \begin{macrocode}
+ \let\maskcitep\maskcite
+ \let\maskcitealp\maskcite
+ \let\maskcitet\maskcite
+ \let\maskcitealt\maskcite
+ \let\maskciteauthor\maskcite
+ \let\maskcitefullauthor\maskcite
+ \let\maskciteyearpar\maskcite
+ \let\maskciteyear\maskcite
+ \let\maskcitetalias\maskcite
+ \let\maskcitepalias\maskcite
+ \let\maskCitet\maskcite
+ \let\maskCitep\maskcite
+ \let\maskCitealt\maskcite
+ \let\maskCitealp\maskcite
+ \let\maskCiteauthor\maskcite
+ \let\maskcitenum\maskcite
+ \let\maskciteauthort\maskcite
+ \let\maskciteauthorp\maskcite
+ \let\maskCitefullauthor\maskcite
+ \let\maskCiteauthort\maskcite
+ \let\maskCiteauthorp\maskcite
+% \end{macrocode}
+% A user command to flexibly mask or unmask certain pieces of text.
+% An environment is technically more stable than a command, but less
+% intuitive for users. Under masking, this command prints the optional
+% alternative text |#1|, which defaults to nothing.
+% \begin{macrocode}
+ \DeclareRobustCommand{\masktext}[2][]{##1}%
+}
+% \end{macrocode}
+%
+% The ``mask'' citation commands revert to the same commands without
+% ``mask'' if the \pkgoption{mask} option is not set.
+% \begin{macrocode}
+\newcommand{\unmaskcitations}{%
+ \let\masknocite\nocite
+ \let\maskcitep\citep
+ \let\maskcitealp\citealp
+ \let\maskcitet\citet
+ \let\maskcitealt\citealt
+ \let\maskciteauthor\citeauthor
+ \let\maskcitefullauthor\citefullauthor
+ \let\maskciteyearpar\citeyearpar
+ \let\maskciteyear\citeyear
+ \let\maskcite\cite
+ \let\maskcitetalias\citetalias
+ \let\maskcitepalias\citepalias
+ \let\maskCitet\Citet
+ \let\maskCitep\Citep
+ \let\maskCitealt\Citealt
+ \let\maskCitealp\Citealp
+ \let\maskCiteauthor\Citeauthor
+ \let\maskcitenum\citenum
+ \let\maskciteauthort\citeauthort
+ \let\maskciteauthorp\citeauthorp
+ \let\maskCitefullauthor\Citefullauthor
+ \let\maskCiteauthort\Citeauthort
+ \let\maskCiteauthorp\Citeauthorp
+% \end{macrocode}
+% Unmasked, this command prints the mandatory second argument |#2|.
+% \begin{macrocode}
+ \DeclareRobustCommand{\masktext}[2][]{##2}
+}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+%
+% End of \pkg{natbib} code.
+% \begin{macrocode}
+\fi
+% \end{macrocode}
+%
+% This is part of the shared code, but has to be put after loading
+% of \pkg{natbib}, so we'll put it here for the moment.
+% \begin{macrocode}
+\if@APAC@anycitation
+ \AtEndOfPackage{%
+ \if@APAC@mask
+ \maskcitations
+ \else
+ \unmaskcitations
+ \fi
+ }%
+\fi
+% \end{macrocode}
+%
+% \subsubsection{Meta analysis}
+%
+% To my knowledge. \cmd{\nocitemeta} is not defined by any other citation
+% package, so we'll provide it here regardless of the citation option
+% chosen.
+% \begin{macro}{\definemetaflag}
+% \begin{macro}{\nocitemeta}
+% This induces an entry in the reference list, but not in the text, and
+% compared to \cmd{\nocite} defines an additional flag that indicates that the
+% reference has been used in the meta-analysis reported. The construction
+% with \cmd{\definemetaflag} is necessary to support \cmd{\nocitemeta} in
+% an appendix \emph{after} the reference list. However, the previous version
+% did not require the |\if@filesw|, which suggests that that would work if
+% we can't write to the \fname{.aux} file, whereas the current one wouldn't.
+% I don't know under what conditions this would happen or be useful, but it
+% seems extremely rare. If somebody complains, I'll make a fix.
+% \begin{macrocode}
+\def\definemetaflag#1{%
+ \@bsphack
+% \end{macrocode}
+% Define the note that precedes the reference list.
+% \begin{macrocode}
+ \expandafter\global\expandafter\def
+ \csname APAC@metaprenote@\APAC@extra@b@citeb\endcsname{%
+ \APACmetaprenote}%
+ \@for\@citeb:=#1\do{%
+ \edef\@citeb{\expandafter\@firstofone\@citeb}%
+% \end{macrocode}
+% Define the meta-analysis flag for the current item.
+% \begin{macrocode}
+ \@ifundefined{flagmeta@\@citeb\APAC@extra@b@citeb}%
+ {\global\expandafter
+ \def\csname flagmeta@\@citeb\APAC@extra@b@citeb\endcsname{DUMMY}%
+ }%
+ {}%
+ }%
+ \@esphack
+}
+\def\nocitemeta#1{%
+ \nocite{#1}%
+ \@bsphack
+ \if@filesw
+ \@for\@citeb:=#1\do{%
+ \edef\@citeb{\expandafter\@firstofone\@citeb}%
+ \immediate\write
+ \@newciteauxhandle{\string\definemetaflag{\@citeb}}%
+ }%
+ \fi
+ \@esphack
+ \@restore@auxhandle
+}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+% \subsection{Bibliography structure}
+%
+% Here we define commands and environments that handle the structure of the
+% reference list, various global style parameters, and the communication with
+% the citation commands. Commands for detailed aspects of the entries
+% themselves are defined below.
+%
+% \begin{macro}{\bibnewpage}
+% Macro for starting a new page before the bibliography, if requested.
+% \begin{macrocode}
+\def\bibnewpage{\clearpage}%
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@biblabel}
+% No labels in the bibliography.
+% \begin{macrocode}
+\def\@biblabel#1{}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@lbibitem}
+% Label-bibitem. If \pkg{natbib} is loaded after \pkg{apacite} (or
+% \pkg{apacite} is loaded with the \pkgoption{natbibapa} option),
+% this is overwritten. I should introduce an option that disables
+% \pkg{apacite}'s bibliography-defining commands and/or senses whether
+% \pkg{natbib} is loaded, so this is never defined in such cases.
+% \begin{macrocode}
+\def\@lbibitem[#1]#2{%
+ \def\BBA{\BBAA}% ``\&''
+% \end{macrocode}
+% For compatibility with \pkg{chapterbib}, \pkg{bibunits}, \pkg{backref}, and
+% \pkg{hyperref}. Adapted from \fname{natbib.dtx}.
+% \begin{macrocode}
+ \item[\hyper@natanchorstart{#2\APAC@extra@b@citeb}%
+ \@biblabel{#1}%
+ \hyper@natanchorend]%
+ \if@filesw{%
+ \def\BBA{\string\BBA}%
+ \let\protect\noexpand
+% \end{macrocode}
+% \pkg{bibunits} redefines \cmd{\bibcite} through \cmd{\AtBeginDocument}
+% in a way that is incompatible with \pkg{apacite}'s definition. The
+% simplest way to get things working automatically seems to be
+% introducing the parallel \cmd{\APACbibcite} command. This should also
+% solve many other compatibility problems.
+% \begin{macrocode}
+ \immediate\write\@newciteauxhandle{\string\bibcite{#2}{#1}}%
+ \immediate\write\@newciteauxhandle{\string\APACbibcite{#2}{#1}}%
+ \def\BBA{\BBAA}%
+ }%
+ \fi
+ \ignorespaces
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\APACbibcite}
+% \begin{macro}{\bibcite}
+% These commands pass the author-year information from the reference list to
+% the citation commands. See above for the necessity for \cmd{\APACbibcite}.
+% \begin{macrocode}
+\def\APACbibcite#1#2{%
+ \global\expandafter
+ \def\csname b@#1\APAC@extra@binfo\endcsname{#2}% names
+ \global\expandafter
+ \def\csname Y@#1\APAC@extra@binfo\endcsname{\@year@#2}% year
+}
+% \end{macrocode}
+% We don't need this one anymore, but other packages may use it.
+% \begin{macrocode}
+\let\bibcite\APACbibcite
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\st@rtbibsection}
+% Start a new section for the reference list.
+% \begin{macrocode}
+\def\st@rtbibsection{%
+ \@bibnewpage% start a new page if desired
+ \if@numberedbib%
+ \section{\refname}% e.g., 6. References
+ \else%
+ \section*{\refname}% e.g., References
+ \if@tocbib%
+ \addcontentsline{toc}{section}{\refname}%
+ \fi%
+% \end{macrocode}
+% Ideally, we'd use something like |\sectionmark{{\refname}}|, so that
+% user-defined page heading styles are respected. But this does not work
+% properly, because it generates section numbers. Therefore, we define the
+% complete headings here. I need to find a better solution for this.
+% \begin{macrocode}
+ \@ifundefined{chapter}
+ {\@mkboth{{\refname}}{{\refname}}}%
+ {\markright{{\refname}}}%
+ \fi%
+}%
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\st@rtbibchapter}
+% Start a new chapter for the reference list.
+% \begin{macrocode}
+\def\st@rtbibchapter{%
+% \end{macrocode}
+% Here no \cmd{\@bibnewpage}, because it is assumed that the \cmd{\chapter}
+% starts a new page.
+% \begin{macrocode}
+ \if@numberedbib%
+ \chapter{\bibname}% e.g., 6. References
+ \else%
+ \chapter*{\bibname}% e.g., References
+ \if@tocbib%
+ \addcontentsline{toc}{chapter}{\bibname}%
+ \fi%
+% \end{macrocode}
+% Again, \cmd{\chaptermark} and \cmd{\sectionmark} don't work properly, so
+% define headings at a lower level.
+% \begin{macrocode}
+ \@mkboth{{\bibname}}{{\bibname}}%
+ \fi%
+}%
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{environment}{thebibliography}
+% This environment contains the reference list. For historical reasons, it is
+% defined in the plain \TeX{} way through definition of the
+% \cmd{\thebibliography} and \cmd{\endthebibliography} macros instead of
+% \cmd{\renewenvironment}.
+% \begin{macrocode}
+\def\thebibliography#1{%
+% \end{macrocode}
+% If \cmd{\chapter} is not defined, start a bibliography section.
+% \begin{macrocode}
+ \@ifundefined{chapter}%
+ {\st@rtbibsection}%
+% \end{macrocode}
+% Else, chapter is defined. Check first whether an explicit option has been
+% chosen.
+% \begin{macrocode}
+ {\if@sectionbibdefault
+% \end{macrocode}
+% No explicit option chosen, so we have to speculate. If \cmd{\mainmatter}
+% is not defined (typically a report), assume that the bibliography is
+% a chapter. If \cmd{\mainmatter} is defined, a bibliography in the
+% main matter is typically a chapter-specific one, so generate a
+% bibliography section. A bibliography in the back matter is most likely
+% a global one, so then generate a bibliography chapter.
+% \begin{macrocode}
+ {\@ifundefined{@mainmatterfalse}%
+ {\st@rtbibchapter}%
+ {\if@mainmatter
+ \st@rtbibsection
+ \else
+ \st@rtbibchapter
+ \fi
+ }%
+ }%
+% \end{macrocode}
+% If an explicit option has been chosen, simply use this.
+% \begin{macrocode}
+ \else
+ \if@sectionbib
+ \st@rtbibsection
+ \else
+ \st@rtbibchapter
+ \fi
+ \fi
+ }%
+% \end{macrocode}
+% Insert some code between the chapter or section heading and the reference
+% list. \cmd{\bibliographytypesize} will typically be used for some font
+% settings and \cmd{\bibliographyprenote} for explanatory text, but this is
+% up to the user. The ``metaprenote'' is a fixed text indicating that
+% marked references are included in the meta-analysis reported.
+% \begin{macrocode}
+ \bibliographytypesize % e.g., to put the bibliography in \small type
+ \bibliographyprenote % some explanatory note before the references
+ \@ifundefined{APAC@metaprenote@\APAC@extra@b@citeb}%
+ {}% skip
+ {\csname APAC@metaprenote@\APAC@extra@b@citeb\endcsname}%
+% \end{macrocode}
+% Initialize the list environment that holds the reference list.
+% \begin{macrocode}
+ \list{\relax}{\labelsep=\biblabelsep
+% \parskip\z@ \@plus .3\p@\relax
+ \parsep=\bibparsep
+ \itemsep=\bibitemsep
+ \leftmargin=\bibleftmargin
+ \itemindent=\bibindent}% changed to cope with 4th ed.
+% \end{macrocode}
+% \cmd{\newblock} is inserted between ``blocks'' of a reference entry and
+% inserts some stretchable and shrinkable extra space between the blocks.
+% \begin{macrocode}
+ \def\newblock{\hskip .11em plus .33em minus .07em}%
+ \sloppy\clubpenalty4000\widowpenalty4000
+ \sfcode`\.=1000\relax %'
+% \end{macrocode}
+% For compatibility with \pkg{bibtopic}.
+% \begin{macrocode}
+ \bt@beg@thb@hook
+% \end{macrocode}
+% To overrule \pkg{backref}.
+% \begin{macrocode}
+ \APACrestorebibitem
+}
+\def\endthebibliography{%
+% \end{macrocode}
+% For compatibility with \pkg{bibtopic}.
+% \begin{macrocode}
+ \bt@end@thb@hook
+% \end{macrocode}
+% Warning if no item was included in the list and return to normal font size.
+% If \cmd{\bibliographytypesize} includes other formatting as well, the user
+% has to reset this explicitly after the bibliography, at least if there is
+% text after it.
+% \begin{macrocode}
+ \def\@noitemerr{%
+ \@latex@warning{Empty `thebibliography' environment}%
+ }%
+ \endlist\normalsize
+}
+% \end{macrocode}
+% \end{environment}
+%
+% \subsection{Reference list formatting}
+%
+% Traditionally, the reference list formatting is almost completely done by
+% the bibliography style (\fname{.bst} file). Modeled after its predecessor,
+% \pkg{theapa}, \pkg{apacite} has always supported some possibilities for
+% customization through redefinable macros in the reference list. Due to my
+% own customization needs, requests by users, and the language support, an
+% increasing amount of reference list formatting is handled in this way. This
+% section defines the default implementation of these macros, which users
+% thus can redefine.
+%
+% \begin{macro}{\@connect@with@commas}
+% An auxiliary function: Make a comma-separated output list of the input,
+% recognizing empty arguments. Must be called with one argument, and the
+% argument contains a comma-separated list of elements. The elements of this
+% should generally be enclosed in braces.
+% \begin{macrocode}
+\def\@connect@with@commas#1{%
+ \def\@comma@space{\unskip, }%
+ \let\@connect@string\relax
+% \end{macrocode}
+% Loop over elements.
+% \begin{macrocode}
+ \@for\@element@:=#1\do{%
+% \end{macrocode}
+% Commas should only be inserted if both sides are nonempty.
+% \begin{macrocode}
+ \ifx\@empty\@element@%
+ \else
+% \end{macrocode}
+% Not empty: insert connect string (nothing for the first nonempty
+% element, a comma and space afterwards).
+% \begin{macrocode}
+ \@connect@string\@element@%
+ \let\@connect@string\@comma@space
+ \fi
+ }%
+ \let\@connect@string\@undefined
+ \let\@comma@space\@undefined
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\APACmetastar}
+% \begin{macro}{\APACinsertmetastar}
+% Insert an asterisk before the names in the reference list for entries that
+% are used in a meta-analysis.
+% \begin{macrocode}
+\newcommand{\APACmetastar}{\ensuremath{{}^\ast}}
+\def\APACinsertmetastar#1{%
+ \@for\@citeb:=#1\do{%
+ \edef\@citeb{\expandafter\@firstofone\@citeb}%
+ \@ifundefined{flagmeta@\@citeb\APAC@extra@b@citeb}%
+ {}% skip
+ {{\APACmetastar}}%
+ }%
+}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+% \begin{environment}{APACrefauthors}
+% An environment that allows some limited customization of author
+% formatting in the reference list. In this implementation customization
+% is handled through the \cmd{\APACrefauthstyle} macro, which allows some
+% style definition, in particular font changes such as \cmd{\sc}.
+% \begin{macrocode}
+\newenvironment{APACrefauthors}{%
+ \begingroup \APACrefauthstyle
+}{\endgroup }
+% \end{macrocode}
+% \end{environment}
+%
+% \begin{macro}{\APACrefYear}
+% Formatting of the year in the reference list. Note that instead of redefining
+% this command, one can also redefine the parentheses themselves. The argument
+% should never be empty. The companion macro \cmd{\APACrefYearMonthDay} is
+% defined below in the language-specific section.
+% \begin{macrocode}
+\newcommand{\APACrefYear}[1]{%
+ {\BBOP}{#1}{\BBCP}%
+}
+% \end{macrocode}
+% \end{macro}
+%
+% Title formatting. In these, |#1| is the capitalized title and |#2| is the
+% sentence-case title.
+%
+% \begin{macro}{\APACrefatitle}
+% Article title (roman, not capitalized).
+% \begin{macrocode}
+\newcommand{\APACrefatitle}[2]{#2}
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\APACrefbtitle}
+% Book title (italic, not capitalized).
+% \begin{macrocode}
+\newcommand{\APACrefbtitle}[2]{\Bem{#2}}
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\APACrefaetitle}
+% English translation of a foreign article title (bracketed, roman, not
+% capitalized).
+% \begin{macrocode}
+\newcommand{\APACrefaetitle}[2]{[#2]}
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\APACrefbetitle}
+% English translation of a foreign book title (bracketed, roman, not
+% capitalized).
+% \begin{macrocode}
+\newcommand{\APACrefbetitle}[2]{[#2]}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\APACjournalVolNumPages}
+% Journal, volume, number, pages
+% (|#1| = journal, |#2| = volume, |#3| = number, |#4| = formatted pages).
+% \begin{macrocode}
+\newcommand{\APACjournalVolNumPages}[4]{%
+ \Bem{#1}% journal
+ \ifx\@empty#2\@empty
+ \else
+ \unskip, \Bem{#2}% volume
+ \fi
+ \ifx\@empty#3\@empty
+ \else
+ \unskip({#3})% issue number
+ \fi
+ \ifx\@empty#4\@empty
+ \else
+ \unskip, {#4}% pages
+ \fi
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\APACaddressPublisher}
+% \begin{macro}{\APACaddressInstitution}
+% \begin{macro}{\APACaddressSchool}
+% Address and publisher, institution, or school (|#1| = address,
+% |#2| = publisher).
+% \begin{macrocode}
+\DeclareRobustCommand{\APACaddressPublisher}[2]{%
+ \ifx\@empty#1\@empty
+ \ifx\@empty#2\@empty
+ \else
+ {#2}% publisher
+ \fi
+ \else
+ {#1}% address
+ \ifx\@empty#2\@empty
+ \else
+ \unskip: {#2}% publisher
+ \fi
+ \fi
+}
+\let\APACaddressInstitution\APACaddressPublisher
+\DeclareRobustCommand{\APACaddressSchool}[2]{%
+ \ifx\@empty#2\@empty
+ \ifx\@empty#1\@empty
+ \else
+ {#1}% address
+ \fi
+ \else
+ {#2}% school
+ \ifx\@empty#1\@empty
+ \else
+ \unskip, {#1}% address
+ \fi
+ \fi
+}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\APACtypeAddressSchool}
+% Type, school, and address in parenthese after the title in a thesis.
+% \begin{macrocode}
+\DeclareRobustCommand{\APACtypeAddressSchool}[3]{%
+ \ifx\@empty#1\@empty
+ \ifx\@empty#3\@empty
+ \ifx\@empty#2\@empty
+ \else
+ ({#2})% address
+ \fi
+ \else
+ ({#3}% school
+ \ifx\@empty#2\@empty
+ \else
+ \unskip, {#2}% address
+ \fi
+ )%
+ \fi
+ \else
+ ({#1}% type
+ \ifx\@empty#3\@empty
+ \ifx\@empty#2\@empty
+ \else
+ \unskip, {#2}% address
+ \fi
+ \else
+ \unskip, {#3}% school
+ \ifx\@empty#2\@empty
+ \else
+ \unskip, {#2}% address
+ \fi
+ \fi
+ )%
+ \fi
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\APACaddressPublisherEqAuth}
+% \begin{macro}{\APACaddressInstitutionEqAuth}
+% Address and publisher/institution if the latter is also the author.
+% (|#1| = address, |#2| = publisher).
+% \begin{macrocode}
+\newcommand{\APACaddressPublisherEqAuth}[2]{%
+ \ifx\@empty#1\@empty
+ {\BAuthor{}}% Publisher formatted as ``Author''
+ \else
+ {#1\unskip: \BAuthor{}}% Address: Author
+ \fi
+}
+\let\APACaddressInstitutionEqAuth\APACaddressPublisherEqAuth
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\APAChowpublished}
+% Formatting of the \fieldname{howpublished} field. The
+% \cmd{\APAChowpublished} macro is only inserted in the \fname{.bbl} file if
+% the argument is nonempty. Because we don't want any special formatting, and
+% |\def\APAChowpublished#1{#1}| leads to problems with hash marks (`|#|') in
+% url's that may be present in \fieldname{howpublished}, we simply pretend
+% that \cmd{\APAChowpublished} does not have an argument and does nothing.
+% \begin{macrocode}
+\let\APAChowpublished\relax
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{environment}{APACrefURL}
+% URL formatting. Use an environment instead of a macro to avoid some problems
+% with url's as arguments of macros. The optional argument is the date that
+% the url was last checked.
+% \begin{macrocode}
+\newenvironment{APACrefURL}[1][]{%
+ \ifx\@empty#1\@empty
+ \BRetrievedFrom % Retrieved from
+ \else
+ \BRetrieved{#1}% Retrieved <date>, from
+ \fi
+}{}
+% \end{macrocode}
+% \end{environment}
+%
+% \begin{environment}{APACrefDOI}
+% DOI formatting. Use an environment instead of a macro to avoid some problems
+% with url's as arguments of macros.
+% \begin{macrocode}
+\newenvironment{APACrefDOI}{%
+ \global\let\old@doi\doi
+ \if@doi
+ \doiprefix
+ \else
+% \end{macrocode}
+% Suppression of DOIs. For non-APA styles.
+% \begin{macrocode}
+ \global\let\doi\@gobble
+ \fi
+% \end{macrocode}
+% Restore definition of \cmd{\doi}, in case a user wants to use this
+% command explicitly.
+% \begin{macrocode}
+ }{\global\let\doi\old@doi }
+% \end{macrocode}
+% \end{environment}
+%
+% \begin{environment}{APACrefURLmsg}
+% URLs of messages.
+% \begin{macrocode}
+\newenvironment{APACrefURLmsg}{%
+ \BMsgPostedTo
+}{}
+% \end{macrocode}
+% \end{environment}
+%
+% \begin{macro}{\APACorigED}
+% \begin{macro}{\APACorigEDS}
+% Original editor(s) for reprints and translations.
+% \begin{macrocode}
+\newcommand{\APACorigED}[1]{%
+ \ifx\@empty#1\@empty
+ \else
+ \Bby\ {#1}, \BED{}% ``by E. D. Itor (Ed.)''
+ \fi
+}
+\newcommand{\APACorigEDS}[1]{%
+ \ifx\@empty#1\@empty
+ \else
+ \Bby\ {#1}, \BEDS{}% ``by E. D. Itor \& A. N. Other (Eds.)''
+ \fi
+}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\APACbVolEdTR}
+% Volume, edition, type, number, for a technical report (|#1| = formatted
+% edition + volume, |#2| = formatted technical report type + number).
+% \begin{macrocode}
+\newcommand{\APACbVolEdTR}[2]{%
+ \ifx\@empty#1\@empty
+ \ifx\@empty#2\@empty
+ \else
+ {(#2)}% (Technical Report No.\ <no>)
+ \fi
+ \else
+ ({#1}% (2nd ed., Vol.~1
+ \ifx\@empty#2\@empty
+ \else
+ \unskip; {#2}% ; Technical Report No.\ <no>
+ \fi
+ )% Final parenthesis.
+ \fi
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\APACbVolEdTRpgs}
+% Volume, edition, type, number, pages for an \entryname{@intechreport}.
+% Arguments: |#1| = formatted edition + volume, |#2| = formatted technical
+% report type + number, |#3| = formatted pages.
+% \begin{macrocode}
+\newcommand{\APACbVolEdTRpgs}[3]{%
+ \ifx\@empty#1\@empty
+ \ifx\@empty#2\@empty
+ \ifx\@empty#3\@empty
+ \else
+ {(#3)}%% (pp. 10--30)
+ \fi
+ \else
+ %% (Technical Report No.\ <no>, pp. 10--30)
+ (\@connect@with@commas{{#2},{#3}})%
+ \fi
+ \else
+ ({#1}% (2nd ed., Vol.~1
+ \ifx\@empty#2\@empty
+ \ifx\@empty#3\@empty
+ \else
+ \unskip; {#3}% ; pp. 10--30
+ \fi
+ \else
+ %% ; Technical Report No.\ <no>, pp. 10--30
+ \unskip; \@connect@with@commas{{#2},{#3}}%
+ \fi
+ )% Final parenthesis.
+ \fi
+}
+% \end{macrocode}
+% \end{macro}
+%
+% Various note formatting functions.
+%
+% \begin{macro}{\APACrefnote}
+% Only a note.
+% \begin{macrocode}
+\newcommand{\APACrefnote}[1]{%
+ \ifx\@empty#1\@empty
+ \else
+ ({#1})%
+ \fi
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\APACorigyearnote}
+% Original year + optional note (|#1| = year, |#2| = note).
+% \begin{macrocode}
+\newcommand{\APACorigyearnote}[2]{%
+ \ifx\@empty#1\@empty
+% \end{macrocode}
+% Original year empty: format note.
+% \begin{macrocode}
+ \APACrefnote{#2}%
+ \else
+% \end{macrocode}
+% Check for \cmd{\bibnodate}. I think the following command does not check
+% whether |#1| = `\cmd{\bibnodate}', but expands them; but that should also
+% be OK and saves a lot of juggling with \cmd{\expandafter} commands.
+% \begin{macrocode}
+ \ifx\bibnodate#1\@empty
+% \end{macrocode}
+% Original year unknown: Format (only) note.
+% \begin{macrocode}
+ \APACrefnote{#2}%
+ \else
+% \end{macrocode}
+% Original year has been given: ``Original work published''.
+% \begin{macrocode}
+ (\BOWP{} {#1}%
+% \end{macrocode}
+% Insert note.
+% \begin{macrocode}
+ \ifx\@empty#2\@empty
+ \else
+ \unskip; {#2}%
+ \fi
+% \end{macrocode}
+% Final parenthesis.
+% \begin{macrocode}
+ )%
+ \fi
+ \fi
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\APACorigjournalnote}
+% Original journal + optional note.
+% Arguments: |#1| = year, |#2| = journal, |#3| = volume, |#4| = issue number,
+% |#5| = formatted pages, |#6| = note.
+% \begin{macrocode}
+\newcommand{\APACorigjournalnote}[6]{%
+ (\BREPR{} % ``(Reprinted from '' (note the space)
+ \Bem{#2}% Journal (should not be empty)
+ \ifx\@empty#1\@empty
+ \else
+ \unskip, {#1}% , year
+ \fi
+ \ifx\@empty#3\@empty
+ \else
+ \unskip, \Bem{#3}% , volume
+ \fi
+ \ifx\@empty#4\@empty
+ \else
+ \unskip{[#4]}% [issue number]
+ \fi
+ \ifx\@empty#5\@empty
+ \else
+ \unskip, {#5}% , pages
+ \fi
+ \ifx\@empty#6\@empty
+ \else
+ \unskip; {#6}% ; note
+ \fi
+ )% Final parenthesis
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\APACorigbooknote}
+% Original book + optional note. Arguments:
+% |#1| = year, |#2| = formatted editor, |#3| = formatted title,
+% |#4| = formatted edition, |#5| = formatted volume, |#6| = formatted pages,
+% |#7| = address, |#8| = publisher, |#9| = note.
+% \begin{macrocode}
+\newcommand{\APACorigbooknote}[9]{%
+ %% ``(Reprinted from '' (note the space)
+ (\BREPR{} %
+ %% Title, edition, volume, pages, editor, year, address: publisher
+% \end{macrocode}
+% These should not all be empty, but this is not checked here, because it's
+% done in the \fname{.bst} file.
+% \begin{macrocode}
+ \@connect@with@commas{%
+ {#3},{#4},{#5},{#6},{#2},{#1},{\APACaddressPublisher{#7}{#8}}%
+ }%%
+ \ifx\@empty#9\@empty
+ \else
+ ; #9%% ; note
+ \fi
+ )% Final parenthesis.
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{environment}{APACrefannotation}
+% Annotations; for annotated bibliographies. Cf.~\citeA[pp.~810--811]{TLC2}.
+% \begin{macrocode}
+\newenvironment{APACrefannotation}{%
+ \begin{quotation}\noindent\ignorespaces
+}{\end{quotation}}
+% \end{macrocode}
+% \end{environment}
+%
+% \subsection{Various specific style settings and utility macros}
+%
+% \begin{macro}{\BAstyle}
+% Text style of authors for citations that include the year as well
+% (\cmd{\cite}, \cmd{\shortcite}, \cmd{\fullcite}, \cmd{\citeA},
+% \cmd{\shortciteA}, \cmd{\fullciteA}, \cmd{\citeNP}, \cmd{\shortciteNP},
+% \cmd{\fullciteNP}).
+% \begin{macrocode}
+\newcommand{\BAstyle}{}%
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\BAastyle}
+% Text style of authors for \cmd{\citeauthor} and its variants
+% (\cmd{\shortciteauthor}, \cmd{\fullciteauthor}, \cmd{\citeauthorNP},
+% \cmd{\shortciteauthorNP}, \cmd{\fullciteauthorNP}).
+% \begin{macrocode}
+\newcommand{\BAastyle}{}%
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\APACrefauthstyle}
+% Text style of authors in reference list.
+% \begin{macrocode}
+\newcommand{\APACrefauthstyle}{}%
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\APACciteatitle}
+% \begin{macro}{\APACcitebtitle}
+% Formatting of ``article'' and ``book'' titles when they are used in a
+% citation, typically when there is no author and the title takes this role.
+% \begin{macrocode}
+\newcommand{\APACciteatitle}[1]{``#1''}
+\newcommand{\APACcitebtitle}[1]{{\em #1\/}}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\APACyear}
+% \begin{macro}{\APACexlab}
+% Formatting of the year and the extra label (`a', `b', etc.) that is used to
+% distinguish different works by the same author(s) in the same year. These
+% macros have been introduced to solve some problems with \pkg{natbib}'s
+% parsing macros.
+% \begin{macrocode}
+\newcommand{\APACyear}[1]{{#1}}%
+\newcommand{\APACexlab}[1]{{#1}}%
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\theBibCnt}
+% \begin{macro}{\BCnt}
+% The |BibCnt| counter is used to distinguish multiple citations with the same
+% author(s) and year. Using a counter allows the user control over its
+% formatting. The default formatting (APA style) is to add roman lowercase
+% letters: ``(Kruskal, 1964a, 1964b)''. The \cmd{\protect} is necessary when
+% \pkg{natbib} is used.
+% \begin{macrocode}
+\newcounter{BibCnt}
+\renewcommand{\theBibCnt}{\alph{BibCnt}}
+\DeclareRobustCommand{\BCnt}[1]{\setcounter{BibCnt}{#1}\theBibCnt}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\BCntIP}
+% \begin{macro}{\BCntND}
+% Variations of \cmd{\BCnt} for in-press and no-date citations. The \cmd{\mbox}
+% prevents a line break at the hyphen.
+% \begin{macrocode}
+\DeclareRobustCommand{\BCntIP}[1]{\setcounter{BibCnt}{#1}\mbox{-\theBibCnt}}
+\DeclareRobustCommand{\BCntND}[1]{\setcounter{BibCnt}{#1}\mbox{-\theBibCnt}}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\bibliographytypesize}
+% Font size of the references, but this macro can be abused to insert lots of
+% other style commands and/or text between the section or chapter heading and
+% the actual references as well.
+% \begin{macrocode}
+\let\bibliographytypesize\normalsize
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\bibliographyprenote}
+% An optional note just before the references in the reference list (but after
+% \cmd{\bibliographytypesize}). It defaults to nothing, but can be changed to
+% a list of commands (e.g., if author formatting should be different in the
+% reference list) and/or text (e.g., for an explanatory note).
+% \begin{macrocode}
+\newcommand{\bibliographyprenote}{}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\bibleftmargin}
+% \begin{macro}{\bibindent}
+% \begin{macro}{\bibparsep}
+% \begin{macro}{\bibitemsep}
+% \begin{macro}{\biblabelsep}
+% Declare a few length parameters for the reference list and give them
+% default values. Supporting the \pkg{natbib} length \cmd{\bibhang} would
+% be nice, but I don't see a way to do this in a user-friendly way that
+% allows loading \pkg{apacite} both with and without \pkg{natbib} and
+% also allows changing \cmd{\bibindent} and \cmd{\bibleftmargin}
+% separately.
+% \begin{macrocode}
+\newskip{\bibleftmargin}
+\newskip{\bibindent}
+\newskip{\bibparsep}
+\newskip{\bibitemsep}
+\newskip{\biblabelsep}
+\setlength{\bibleftmargin}{2.5em}
+\setlength{\bibindent}{-\bibleftmargin}
+\setlength{\bibparsep}{0pt}
+\setlength{\bibitemsep}{0pt plus .3pt}
+\setlength{\biblabelsep}{0pt}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\bibcorporate}
+% Formatting of corporate (group) authors. Its primary function is in the
+% \BibTeX{} stage. It is recognized by \fname{apacite.bst}, which handles
+% such authors slightly differently from ordinary authors.
+% \begin{macrocode}
+\let\bibcorporate\relax
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\BBA}
+% Initialize this command, which formats the ``and'' between authors.
+% \begin{macrocode}
+\newcommand{\BBA}{\BBAA}% `\&'
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\Bem}
+% Emphasis in the bibliography. A relic from \pkg{theapa}. It allows to use
+% underlining in the bibliography and italics in the text, but the default is
+% italics.
+% \begin{macrocode}
+\let\Bem\emph
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\bibnotype}
+% This macro indicates that the type information should be left empty. It is
+% used for \entryname{@techreport} and \entryname{@intechreport}, where
+% ``\cmd{\BTR}'' is the default type if the field is left empty. As such, it
+% primarily modifies the behavior of \fname{apacite.bst}.
+% \begin{macrocode}
+\newcommand{\bibnotype}{}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\APACSortNoop}
+% \begin{macro}{\bibphant}
+% The \cmd{\APACSortNoop} macro can be used to change the sorting order:
+% When put between a pair of braces at the beginning of a field, the entry is
+% sorted on the argument of this command, but the argument is never displayed.
+% \cmd{\bibphant} is the same as \cmd{\APACSortNoop}, so it is not discussed
+% in the main documentation. It is only kept for backwards compatibility with
+% old versions of \pkg{apacite}, in which it was documented.
+% \begin{macrocode}
+\newcommand{\APACSortNoop}[1]{}
+\let\bibphant\APACSortNoop
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\makehashother}
+% \begin{macro}{\makehashmacropar}
+% Setting the catcode of the hash mark `|#|'. This is mainly useful in some
+% cases in which the bibliography contains urls containing `|#|' symbols.
+% These are analogous to \cmd{\makeatother} and \cmd{\makeatletter}.
+% (They are undocumented in the main documentation!)
+% \begin{macrocode}
+\def\makehashother{\catcode`\#=12\relax}
+\def\makehashmacropar{\catcode`\#=6\relax}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+% \subsection{Author index setup and index styles}
+%
+% Here, the author index options are implemented. It also defines some index
+% styles and defines most of the index-related commands to do nothing in case
+% no author index is requested.
+%
+% \begin{macro}{\AX}
+% \begin{macro}{\corporateAX}
+% \begin{macro}{\@AXfile}
+% \begin{macro}{\currentindexname}
+% \begin{macro}{\printindex}
+% \begin{macro}{\PrintAX}
+% \begin{macro}{\orig@printindex}
+% \begin{macro}{\APAC@printindex}
+% \begin{macro}{\check@printindex}
+% Define the author-indexing macros and the index-printing commands.
+% \begin{macrocode}
+\if@APAC@index
+% \end{macrocode}
+% Author index requested.
+% \begin{macrocode}
+ \if@APAC@index@package
+% \end{macrocode}
+% Load \pkg{index} package.
+% \begin{macrocode}
+ \RequirePackage{index}[1995/09/28]
+% \end{macrocode}
+% Define the author index. This may be changed in the preamble of the
+% document (or in a user-provided package) by a \cmd{\renewindex}
+% command.
+% \begin{macrocode}
+ \newindex{autx}{adx}{and}{\authorindexname}
+% \end{macrocode}
+% Author indexing command. Some trial and error and adapting code from
+% other packages to get this right, esp.\ when \pkg{hyperref} is also
+% loaded.
+% \begin{macrocode}
+ \DeclareRobustCommand{\AX}[1]{%
+ \if@filesw{%
+ \protected@write\@auxout{}{%
+ \string\protected@write\string\tf@autx{}{%
+ \string\string\string
+ \indexentry{\string#1|hyperpage}{\thepage}}}%
+ }%
+ \fi
+ }%
+ \else
+% \end{macrocode}
+% Without the \pkg{index} package, using standard \LaTeX{}. This includes
+% a bit of code adapted from \fname{ltidxglo.dtx} and \fname{doc.dtx}.
+% \begin{macrocode}
+ \newwrite\@AXfile
+ \immediate\openout\@AXfile=\jobname.adx
+ \typeout
+ {Writing author index file \jobname.adx }%
+ \DeclareRobustCommand{\AX}[1]{%
+ \protected@write\@AXfile{}%
+ {\string\indexentry{\string#1}{\thepage}}%
+ }%
+ \def\PrintAX{\edef\currentindexname{\authorindexname}%
+ \@input@{\jobname.and}%
+ \global\let\PrintAX\@empty
+ }%
+ \AtBeginDocument{%
+% \end{macrocode}
+% Make sure that \cmd{\printindex} is defined.
+% \begin{macrocode}
+ \@ifundefined{printindex}{\makeindex}{}%
+% \end{macrocode}
+% Now, redefine \cmd{\printindex} to accommodate both \cmd{\printindex}
+% without argument and |\printindex[autx]|.
+% \begin{macrocode}
+ \let\orig@printindex\printindex
+ \def\printindex{\@ifnextchar[{\APAC@printindex}{%
+ \orig@printindex}}%
+ \def\APAC@printindex[autx]{\PrintAX}%
+ }%
+ \fi
+% \end{macrocode}
+% Include corporate authors in the author index?
+% \begin{macrocode}
+ \if@APAC@include@corporate
+ \let\corporateAX\AX
+ \else
+ \let\corporateAX\@gobble
+ \fi
+\else
+% \end{macrocode}
+% No author index. Wait until |\begin{document}| for checking whether another
+% package is loaded that defines \cmd{\printindex}.
+% \begin{macrocode}
+ \AtBeginDocument{%
+ \@ifundefined{printindex}%
+ {%
+% \end{macrocode}
+% \cmd{\printindex} has not been defined. Define \cmd{\printindex} so
+% that it suppresses the indexes.
+% \begin{macrocode}
+ \def\printindex{\@ifnextchar[{\check@printindex}{%
+ \check@printindex[]}}%
+ \def\check@printindex[#1]{\relax }%
+ }%
+ {%
+% \end{macrocode}
+% \cmd{\printindex} has been defined, so save its definition.
+% \begin{macrocode}
+ \let\orig@printindex\printindex
+% \end{macrocode}
+% Redefine \cmd{\printindex} so that it suppresses the author index
+% but does not change other indexes: (1) If there is no optional
+% argument, use the original definition.
+% \begin{macrocode}
+ \def\printindex{\@ifnextchar[{\check@printindex}{\orig@printindex}}%
+% \end{macrocode}
+% (2) If there is an optional argument, check whether it is equal to
+% ``|autx|''. If so, suppress this (author) index. If not, use the
+% original definition.
+% \begin{macrocode}
+ \def\check@printindex[#1]{%
+% \end{macrocode}
+% Use a clumsy way to check whether |#1| = |autx|, but seemingly more
+% elegant ways somehow didn't work.
+% \begin{macrocode}
+ \expandafter\def\csname APAC@#1\endcsname{DUMMY}%
+ \@ifundefined{APAC@autx}%
+ {\orig@printindex[#1]}%
+ {\let\APAC@autx\@undefined}%
+ }%
+ }%
+ }%
+% \end{macrocode}
+% Empty author indexing commands.
+% \begin{macrocode}
+ \let\AX\@gobble
+ \let\corporateAX\@gobble
+\fi
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+%
+% \begin{environment}{theindex}
+% \begin{macro}{\APACstdindex}
+% The \envirname{index} environment as defined in the \pkg{index} package;
+% literally copied from \fname{index.sty}.
+% \begin{macrocode}
+\newcommand{\APACstdindex}{%
+ \@ifclassloaded{article}{%
+ \renewenvironment{theindex}{%
+ \edef\indexname{\the\@nameuse{idxtitle@\@indextype}}%
+ \if@twocolumn
+ \@restonecolfalse
+ \else
+ \@restonecoltrue
+ \fi
+ \columnseprule \z@
+ \columnsep 35\p@
+ \twocolumn[%
+ \section*{\indexname}%
+ \ifx\index@prologue\@empty\else
+ \index@prologue
+ \bigskip
+ \fi
+ ]%
+ \@mkboth{\MakeUppercase\indexname}%
+ {\MakeUppercase\indexname}%
+ \thispagestyle{plain}%
+ \parindent\z@
+ \parskip\z@ \@plus .3\p@\relax
+ \let\item\@idxitem
+ }{%
+ \if@restonecol
+ \onecolumn
+ \else
+ \clearpage
+ \fi
+ }
+ }{%
+ \renewenvironment{theindex}{%
+ \edef\indexname{\the\@nameuse{idxtitle@\@indextype}}%
+ \if@twocolumn
+ \@restonecolfalse
+ \else
+ \@restonecoltrue
+ \fi
+ \columnseprule \z@
+ \columnsep 35\p@
+ \twocolumn[%
+ \@makeschapterhead{\indexname}%
+ \ifx\index@prologue\@empty\else
+ \index@prologue
+ \bigskip
+ \fi
+ ]%
+ \@mkboth{\MakeUppercase\indexname}%
+ {\MakeUppercase\indexname}%
+ \thispagestyle{plain}%
+ \parindent\z@
+ \parskip\z@ \@plus .3\p@\relax
+ \let\item\@idxitem
+ }{%
+ \if@restonecol
+ \onecolumn
+ \else
+ \clearpage
+ \fi
+ }%
+ }%
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\APACtocindex}
+% The \envirname{index} environment as defined in the \pkg{index} package, but
+% with a table of contents entry added.
+% \begin{macrocode}
+\newcommand{\APACtocindex}{%
+ \@ifclassloaded{article}{%
+ \renewenvironment{theindex}{%
+ \edef\indexname{\the\@nameuse{idxtitle@\@indextype}}%
+ \if@twocolumn
+ \@restonecolfalse
+ \else
+ \@restonecoltrue
+ \fi
+ \columnseprule \z@
+ \columnsep 35\p@
+ \twocolumn[%
+ \section*{\indexname}%
+ \ifx\index@prologue\@empty\else
+ \index@prologue
+ \bigskip
+ \fi
+ ]%
+ \@mkboth{\MakeUppercase\indexname}%
+ {\MakeUppercase\indexname}%
+% \end{macrocode}
+% The following line added by EM.
+% \begin{macrocode}
+ \addcontentsline{toc}{section}{\indexname}%
+ \thispagestyle{plain}%
+ \parindent\z@
+ \parskip\z@ \@plus .3\p@\relax
+ \let\item\@idxitem
+ }{%
+ \if@restonecol
+ \onecolumn
+ \else
+ \clearpage
+ \fi
+ }
+ }{%
+ \renewenvironment{theindex}{%
+ \edef\indexname{\the\@nameuse{idxtitle@\@indextype}}%
+ \if@twocolumn
+ \@restonecolfalse
+ \else
+ \@restonecoltrue
+ \fi
+ \columnseprule \z@
+ \columnsep 35\p@
+ \twocolumn[%
+ \@makeschapterhead{\indexname}%
+ \ifx\index@prologue\@empty\else
+ \index@prologue
+ \bigskip
+ \fi
+ ]%
+ \@mkboth{\MakeUppercase\indexname}%
+ {\MakeUppercase\indexname}%
+% \end{macrocode}
+% The following line added by EM.
+% \begin{macrocode}
+ \addcontentsline{toc}{chapter}{\indexname}%
+ \thispagestyle{plain}%
+ \parindent\z@
+ \parskip\z@ \@plus .3\p@\relax
+ \let\item\@idxitem
+ }{%
+ \if@restonecol
+ \onecolumn
+ \else
+ \clearpage
+ \fi
+ }%
+ }%
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\APACemindex}
+% An alternative style for the \envirname{index} environment, such that
+% automatically a chapter or section title is generated, with a corresponding
+% table of contents entry. The index is now in a \envirname{multicol}
+% environment.
+% \begin{macrocode}
+\newcommand{\APACemindex}{%
+ \RequirePackage{multicol}
+ \renewenvironment{theindex}{%
+ \edef\@indexname{\the\@nameuse{idxtitle@\@indextype}}%
+ \@ifundefined{chapter}%
+ {\section*{\@indexname}%
+ \addcontentsline{toc}{section}{\@indexname}%
+%% \sectionmark{{\@indexname}}% doesn't work: generates numbers
+ }%
+ {\chapter*{\@indexname}%
+ \addcontentsline{toc}{chapter}{\@indexname}%
+%% \chaptermark{{\@indexname}}% doesn't work: generates numbers
+%% % (except in the backmatter)
+%% \sectionmark{{\@indexname}}% doesn't work: generates numbers
+ }%
+ \@mkboth{{\@indexname}}{{\@indexname}}% Hence we need this.
+ \parindent\z@
+ \parskip\z@ \@plus .3\p@\relax
+ \let\item\@idxitem
+ \setlength{\columnsep}{2em}
+ \small
+ \begin{multicols}{2}
+ \raggedright
+ }%
+ {\end{multicols}\normalsize
+ }%
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\APACltxemindex}
+% A variation on \cmd{\APACemindex}, but without using the \pkg{index} package,
+% which conflicts with the standard \LaTeX{} documentation classes.
+% \begin{macrocode}
+\newcommand{\APACltxemindex}{%
+ \RequirePackage{multicol}
+ \renewenvironment{theindex}{%
+% \end{macrocode}
+% The index naming scheme of the \pkg{index} package is also absent.
+% Therefore, try to guess an index name.
+% \begin{macrocode}
+ \@ifundefined{currentindexname}{%
+ \@ifundefined{indexname}{%
+ \edef\@indexname{Index}%
+ }{\edef\@indexname{\indexname}}%
+ }{\edef\@indexname{\currentindexname}}%
+ \@ifundefined{chapter}%
+ {\section*{\@indexname}%
+ \addcontentsline{toc}{section}{\@indexname}%
+%% \sectionmark{{\@indexname}}% doesn't work: generates numbers
+ }%
+ {\chapter*{\@indexname}%
+ \addcontentsline{toc}{chapter}{\@indexname}%
+%% \chaptermark{{\@indexname}}% doesn't work: generates numbers
+%% % (except in the backmatter)
+%% \sectionmark{{\@indexname}}% doesn't work: generates numbers
+ }%
+ \@mkboth{{\@indexname}}{{\@indexname}}% Hence we need this.
+ \def\pfill{\relax{}}%
+ \parindent\z@
+ \parskip\z@ \@plus .3\p@\relax
+ \let\item\@idxitem
+ \setlength{\columnsep}{2em}
+ \small
+ \begin{multicols}{2}
+ \raggedright
+ }%
+ {\end{multicols}\normalsize
+ }%
+}
+% \end{macrocode}
+% \end{macro}
+% \end{environment}
+%
+% \subsection{Formatting of urls}
+%
+% \begin{macro}{\Url@force@Tilde}
+% \begin{macro}{\Url@APACdot}
+% \begin{macro}{\Url@APACcomma}
+% \begin{macro}{\Url@APACquestionmark}
+% \begin{macro}{\Url@APACexclamation}
+% \begin{macro}{\Url@APAChyphen}
+% \begin{macro}{\Url@APACunderscore}
+% \begin{macro}{\APACurlBreaks}
+% \begin{macro}{\url@APACttstyle}
+% \begin{macro}{\url@APACrmstyle}
+% \begin{macro}{\url@APACsfstyle}
+% \begin{macro}{\url@APACsamestyle}
+% The APA manual requires breaking of urls \emph{after} a slash or
+% \emph{before} a dot. In particular, there should not be a break between
+% ``|http:|'' and ``|//|''. This differs from the standard line breaking
+% style of the \pkg{url} package. Therefore, we define an APA-style for
+% url formatting here. (Maybe this should be part of the \pkg{apa} class,
+% but urls occur most often in the reference list, so we do it here.)
+% The \pkg{url} package also defines many other (punctuation) symbols at
+% which a line break may occur. The APA manual does not mention these, but
+% it seems in the spirit of the APA manual to use these as well. See also
+% \citeA[pp.~645--646]{chicago}.
+% \begin{macrocode}
+\AtBeginDocument{%
+ \@ifpackageloaded{url}{%
+% \end{macrocode}
+% To circumvent an ``undefined'' error.
+% \begin{macrocode}
+ \@ifundefined{Url@force@Tilde}{\def\Url@force@Tilde{\relax}}{}%
+% \end{macrocode}
+% The original dot. Simply using `|.|' causes an infinite loop. This command
+% is used below, so that encoding-issues can be resolved easier by redefining
+% \cmd{\Url@APACdot}. The same argument holds for the other punctuation
+% marks.
+% \begin{macrocode}
+ \def\Url@APACdot{\mathchar"2E }%
+ \def\Url@APACcomma{\mathchar"2C }%
+ \def\Url@APACquestionmark{\mathchar"3F }%
+ \def\Url@APACexclamation{\mathchar"21 }%
+ \def\Url@APAChyphen{\mathchar"2D }%
+ \def\Url@APACunderscore{\_}%
+% \end{macrocode}
+% Define the APA-style line breaks for urls.
+% \begin{macrocode}
+ \def\APACurlBreaks{%
+% \end{macrocode}
+% Remove dot (`|.|') and slash (`|/|') from the ordinary breaks and add
+% the slash to the big breaks, so that |http://| is broken after the second
+% slash instead of after the colon. The \cmd{\UrlNoBreaks} and
+% \cmd{UrlOrds} are the default ones from the \pkg{url} package, but they
+% are repeated here to obtain a complete style, so that we don't have to
+% rely on what is the \pkg{url} default (which might change).
+% \begin{macrocode}
+ \def\UrlBreaks{\do\@\do\\\do\|\do\;\do\>\do\]\do\)\do\'\do+\do\=\do\#}%
+ \def\UrlBigBreaks{\do\/\do\:\do@url@hyp}%
+ \def\UrlNoBreaks{\do\(\do\[\do\{\do\<}% \)
+ \def\UrlOrds{\do\*\do\~\do\'\do\"}%
+% \end{macrocode}
+% Define the dot as an empty binary relation (after which a break may
+% occur) followed by a dot-symbol (after which no break may occur).
+% \citeA{chicago} requires the same treatment of a few other punctuation
+% marks, different from \pkg{url}'s default behavior. We implement these
+% as well.
+% \begin{macrocode}
+ \def\UrlSpecials{%
+ \do\.{\mathbin{}\Url@APACdot }%
+ \do\,{\mathbin{}\Url@APACcomma }%
+ \do\-{\mathbin{}\Url@APAChyphen }%
+ \do\?{\mathbin{}\Url@APACquestionmark }%
+ \do\!{\mathbin{}\Url@APACexclamation }%
+ \do\_{\mathbin{}\Url@APACunderscore }%
+ \do\ {\Url@space}\do\%{\Url@percent}\do\^^M{\Url@space}%
+ \Url@force@Tilde}% package option may force faked text-ascii-tilde
+ }%%
+% \end{macrocode}
+% Change the underscore for when a non-tt font is used.
+% \begin{macrocode}
+ \def\Url@OTnonTT{\do\<{\langle}\do\>{\mathbin{\rangle}}\do
+ \_{\mathbin{}\_}\do\|{\mid}\do\{{\lbrace}\do\}{\mathbin{\rbrace}}\do
+ \\{\mathbin{\backslash}}\UrlTildeSpecial}
+% \end{macrocode}
+% Define four APA url-styles, based on the standard styles in
+% \fname{url.sty}, and use the |APACtt|-style as default.
+% \begin{macrocode}
+ \def\url@APACttstyle{\def\UrlFont{\ttfamily}\APACurlBreaks }%
+ \def\url@APACrmstyle{\def\UrlFont{\rmfamily}\APACurlBreaks }%
+ \def\url@APACsfstyle{\def\UrlFont{\sffamily}\APACurlBreaks }%
+ \def\url@APACsamestyle{\def\UrlFont{}\APACurlBreaks }%
+ \urlstyle{APACtt}%
+ }{}%
+}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\url}
+% In case \cmd{\url} is undefined, define a very simple version.
+% \begin{macrocode}
+\AtBeginDocument{%
+ \@ifundefined{url}{%
+ \def\url#1{\texttt{#1}}%
+ }{}%
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\doi}
+% \begin{macro}{\doiprefix}
+% Similarly, define \cmd{\doi}. Adapted from code in \fname{plainnat.bst}.
+% \begin{macrocode}
+\AtBeginDocument{%
+ \expandafter\ifx\csname urlstyle\endcsname\relax
+ \providecommand{\doi}[1]{#1}\else
+ \providecommand{\doi}{\begingroup \urlstyle{APACsame}\Url}\fi
+}
+\@ifundefined{doiprefix}{%
+ \newcommand{\doiprefix}{doi:\penalty0{}}%
+}{}%
+% \end{macrocode}
+% \end{macro}
+%
+% \subsection{Compatibility code}
+%
+% Many other packages redefine citation commands and reference list commands,
+% or at least affect them, even if that is not their core business. This leads
+% to all kinds of compatibility problems. Here, these are repaired.
+%
+% \subsubsection{\pkg{babel}}
+%
+% From \fname{hyperref.dtx}:
+% \begin{quote}
+% Package \pkg{babel} redefines \cmd{\bibcite} with macro
+% \cmd{\bbl@cite@choice}. It needs to be overwritten to avoid the warning
+% ``Label(s) may have changed.''.
+% \end{quote}
+% Here, a slightly adapted version of the code mentioned above is inserted. The
+% other \cmd{\bibcite}-restoring compatibility code above does something
+% similar, but does not do the job correctly if \pkg{babel} is loaded (why?).
+% This only works if \pkg{babel} is loaded before \pkg{apacite}; putting it in
+% a \cmd{\AtBeginDocument} does not work well.
+% \begin{macrocode}
+\@ifundefined{bbl@cite@choice}{}{%
+ \g@addto@macro\bbl@cite@choice{%
+ \let\bibcite\APACbibcite
+ }%
+}
+% \end{macrocode}
+%
+% \subsubsection{\pkg{natbib}}
+%
+% Above, we implemented some code for the \pkgoption{natbibapa} option.
+% The code here is intended as a fix for more general cases, but we
+% have to make sure not to conflict with the code above. This applies
+% to the redefinition of the \cmd{\NAT@parse@date} command.
+% \begin{macrocode}
+\if@APAC@natbib@apa
+\else
+\AtBeginDocument{%
+ \@ifpackageloaded{natbib}{%
+% \end{macrocode}
+% Redefine a \pkg{natbib} command. This may be ethically dubious, but without
+% it, \pkg{natbib} simply cannot handle \pkg{apacite}-generated \fname{.bbl}
+% files. The only reason I can think of why both \pkg{apacite} and \pkg{natbib}
+% would be loaded is exactly the situation when you want to use \pkg{natbib}
+% for the citations and \pkg{apacite} for the reference list. In this
+% situation you would load \fname{apacite.sty}, not for the citation commands,
+% but for the punctuation commands and labels defined by \pkg{apacite}. In this
+% situation, the redefinition below is necessary and therefore I do this here.
+% \begin{macrocode}
+ \def\NAT@parse@date#1#2#3#4#5#6@@{%
+ \def\NAT@year{{#1}}\def\NAT@exlab{{#2}}%
+ }%
+ }{}%
+}
+\fi
+% \end{macrocode}
+% \pkg{natbib} redefines \cmd{\thebibliography}, which interferes a little with
+% our purposes. Therefore, add some patches. This goes wrong if
+% \cmd{\bibpreamble} is redefined later on, i.e., by the user, but I haven't
+% come up with a better hack yet.
+% \begin{macrocode}
+\AtBeginDocument{%
+ \@ifpackageloaded{natbib}{%
+ \let\@oldbibpreamble\bibpreamble
+ \def\bibpreamble{%
+ \@oldbibpreamble%
+ \bibliographytypesize%
+ \bibliographyprenote%
+ \@ifundefined{APAC@metaprenote@\APAC@extra@b@citeb}%
+ {}% skip
+ {\csname APAC@metaprenote@\APAC@extra@b@citeb\endcsname}%
+ }%
+ \let\@old@endthebibliography\endthebibliography
+ \def\endthebibliography{\@old@endthebibliography%
+ \normalsize}%
+ }{}%
+}
+% \end{macrocode}
+%
+% \subsubsection{\pkg{hyperref}}
+%
+% The code here is adapted from \pkg{hyperref}, \pkg{natbib}, and their
+% respective documentation, to make use of their interoperability.
+% \begin{macrocode}
+\AtBeginDocument{%
+ \@ifundefined{NAT@parse}{%
+ \def\NAT@parse{This is a fake natbib command to fool hyperref.}}{}%
+ \@ifundefined{hyper@natlinkstart}{%
+ \let\hyper@natlinkstart\@gobble}{}%
+ \@ifundefined{hyper@natlinkend}{%
+ \let\hyper@natlinkend\relax}{}%
+ \@ifundefined{hyper@natanchorstart}{%
+ \let\hyper@natanchorstart\@gobble}{}%
+ \@ifundefined{hyper@natanchorend}{%
+ \let\hyper@natanchorend\relax}{}%
+ \@ifundefined{hyperpage}{%
+ \def\hyperpage#1{#1}}{}%
+% \end{macrocode}
+% Remove spaces from hyperlinks (\pkg{hyperref} keeps them, even if they are
+% removed from the visible output, so you'd get awkward results like
+% |\href{http://my .link}{http://my.link}|).
+% \begin{macrocode}
+ \@ifpackageloaded{hyperref}{%
+% \end{macrocode}
+% The next should always be true, but just to be sure\ldots
+% \begin{macrocode}
+ \@ifpackageloaded{url}{%
+% \end{macrocode}
+% Is \pkgoption{obeyspaces} option requested? If not, then remove spaces
+% from hyperlinks.
+% \begin{macrocode}
+ \ifx\@empty\Url@ObeySp\@empty
+ \def\url@#1{\def\@tmp@arg{\string#1}%
+ \HyPsd@Subst{ }{}{\@tmp@arg}%
+ \hyper@linkurl{\Hurl{#1}}{\@tmp@arg}}%
+ \fi
+ }{}%
+ }{}%
+}
+% \end{macrocode}
+%
+% \subsubsection{\pkg{backref}}
+%
+% \begin{macro}{\back@cite}
+% \begin{macro}{\CurrentBib}
+% \begin{macro}{\PrintBackRefs}
+% \begin{macro}{\APACrestorebibitem}
+% A bit of code that makes life a little easier, adapted from
+% \fname{amsrefs.dtx}.
+% \begin{macrocode}
+\def\back@cite{}%
+\def\CurrentBib{}%
+\def\PrintBackRefs{}%
+\def\APACrestorebibitem{}%
+\AtBeginDocument{%
+ \@ifpackageloaded{backref}{%
+% \end{macrocode}
+% Make sure that \cmd{\ifBR@verbose} is defined.
+% \begin{macrocode}
+ \@ifundefined{ifBR@verbose}{%
+ \let\ifBR@verbose\iffalse
+ \let\fi\fi}{}%
+% \end{macrocode}
+% A backcite command that makes the code of other commands better readable.
+% \begin{macrocode}
+ \def\back@cite#1{%
+ \ifBR@verbose
+ \PackageInfo{backref}{back cite \string`#1\string'}%
+ \fi
+ \Hy@backout{#1\APAC@extra@b@citeb}%
+ }%
+% \end{macrocode}
+% Adaptation of the \cmd{\bibitem} command so that \pkg{backref} does not
+% scan the whole entry. The placement of the backrefs is explicitly done
+% through \cmd{\PrintBackRefs}.
+% \begin{macrocode}
+ \def\APACrestorebibitem{%
+ \def\BR@@lbibitem[##1]##2{%
+ \BRorg@bibitem[{##1}]{##2}%
+ \def\CurrentBib{##2\APAC@extra@b@citeb}%
+ }%
+ }%
+% \end{macrocode}
+% Printing the backrefs: Revert to the standard \pkg{backref} macro.
+% \begin{macrocode}
+ \def\PrintBackRefs#1{\BR@backref{#1}}%
+ }{%
+% \end{macrocode}
+% Else: \pkg{backref} not loaded.
+% \begin{macrocode}
+ \let\back@cite\@gobble
+ \let\PrintBackRefs\@gobble
+ }%
+}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\BR@@lbibitem}
+% Frankly, at the moment, I do not completely understand why we need this. But
+% I'm sure it was for a good reason when I included this.
+% \begin{macrocode}
+\def\BR@@lbibitem[#1]#2#3\par{%
+ \BRorg@bibitem[#1]{#2}#3%
+ \BR@backref{#2}%
+}%
+% \end{macrocode}
+% \end{macro}
+%
+% \subsubsection{\pkg{chapterbib}}
+%
+% \begin{macro}{\@extra@b@citeb}
+% \begin{macro}{\@extra@binfo}
+% From the instructions of the \pkg{chapterbib} package.
+% \begin{macrocode}
+\@ifundefined{@extra@b@citeb}{\def\@extra@b@citeb{}}{}
+\gdef\@extra@binfo{}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\APAC@extra@b@citeb}
+% \begin{macro}{\APAC@extra@binfo}
+% Replacements of the \pkg{chapterbib} \cmd{\@extra@b@citeb} and
+% \cmd{\@extra@binfo} commands. These accumulate all kinds of additional flags
+% to accommodate multiple bibliographies of various packages (\pkg{chapterbib},
+% \pkg{bibunits}, \pkg{multibbl}).
+% \begin{macrocode}
+\def\APAC@extra@b@citeb{\APAC@curr@aux\APAC@bu\@extra@b@citeb}%
+\def\APAC@extra@binfo{\APAC@curr@aux\APAC@bu\@extra@binfo}%
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+% \subsubsection{\pkg{bibunits}}
+%
+% \begin{macro}{\APACstd@cite}
+% \begin{macro}{\APACstd@nocite}
+% \begin{macro}{\APACstd@lbibitem}
+% \begin{macro}{\APAC@bu}
+% Store the standard \pkg{apacite} definitions.
+% \begin{macrocode}
+\AtEndOfPackage{%
+ \let\APACstd@cite\cite
+ \let\APACstd@nocite\nocite
+ \let\APACstd@lbibitem\@lbibitem
+}
+% \end{macrocode}
+% Default definition, if \pkg{bibunits} is not loaded.
+% \begin{macrocode}
+\@ifundefined{APAC@bu}{\def\APAC@bu{}}{}
+\AtBeginDocument{%
+ \@ifpackageloaded{bibunits}{%
+% \end{macrocode}
+% To mimic \pkg{chapterbib} behavior (with flags etc.).
+% \begin{macrocode}
+ \def\APAC@bu{%
+ \ifx\cite\std@cite
+% \end{macrocode}
+% Outside a bibunit. The ``|@APACbu|'' strings are intended to minimize
+% the possibility of wrong matches, such as |\b@ex11| = |ex11| from the
+% global aux or |\b@ex11| = |ex1| from bibunit~1. The last `|@|' is
+% similarly intended to avoid confusion if both \pkg{bibunits} and
+% \pkg{chapterbib} are loaded (``|11@1|'' = 11th bibunit, 1st
+% \pkg{chapterbib} unit; ``|1@11|'' = 1st bibunit, 11th
+% \pkg{chapterbib} unit). It seems unlikely that both packages would be
+% used at the same time, but safety first.
+% \begin{macrocode}
+ @APACbu0@%
+ \else
+% \end{macrocode}
+% Within a bibunit: Use bibunit number to distinguish the bibunits.
+% \begin{macrocode}
+ @APACbu\the\@bibunitauxcnt @%
+ \fi
+ }%
+% \end{macrocode}
+% Standard \pkg{apacite} definition of the \cmd{\cite} and \cmd{\nocite}
+% commands. The latter is mainly necessary to avoid incorrect ``Citation
+% undefined'' warnings.
+% \begin{macrocode}
+ \let\std@cite\APACstd@cite
+ \let\std@nocite\APACstd@nocite
+% \end{macrocode}
+% Restore the \pkg{apacite} definition of \cmd{\bibitem}, mainly because of
+% the \cmd{\@newciteauxhandle} instead of \cmd{\@auxout}.
+% \begin{macrocode}
+ \def\std@lbibitem[#1]#2{%
+ \let\@APACtemp@auxout\@newciteauxhandle
+ \let\@newciteauxhandle\@bibunitaux
+ \APACstd@lbibitem[#1]{#2}%
+ \let\@newciteauxhandle\@APACtemp@auxout
+ }%
+% \end{macrocode}
+% To make sure everything works whether \pkg{bibunits} is loaded before or
+% after \pkg{apacite}.
+% \begin{macrocode}
+ \let\@lbibitem\std@lbibitem
+ }{}%
+}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+%
+% \subsubsection{\pkg{bibtopic}}
+%
+% \begin{macrocode}
+\AtBeginDocument{%
+ \@ifpackageloaded{bibtopic}{%
+% \end{macrocode}
+% Somewhat rudely disable this command to prevent an undesired error
+% message of \pkg{bibtopic}.
+% \begin{macrocode}
+ \renewcommand*\bt@change@thb{\relax}%
+ }{%
+% \end{macrocode}
+% These \pkg{bibtopic} hooks are included in the
+% \envirname{thebibliography} environment as generated by
+% \fname{apacite.bst}, so \pkg{bibtopic} should work correctly. If
+% \pkg{bibtopic} is not loaded, they should do nothing.
+% \begin{macrocode}
+ \providecommand{\bt@beg@thb@hook}{\relax}
+ \providecommand{\bt@end@thb@hook}{\relax}
+ }%
+}
+% \end{macrocode}
+%
+% \subsubsection{\pkg{multibbl}}
+%
+% Almost all of \pkg{multibbl}'s code is redefined here, mainly because
+% \pkg{apacite} needs to distinguish which citation refers to which
+% bibliography, so that flags can be correctly set whether a citation
+% is the first citation to the work from the specific bibliography and
+% correctly includes the meta-analysis flags with the various
+% bibliographies.
+%
+% \begin{macro}{\APAC@curr@aux}
+% Default flag definition if \pkg{multibbl} is not loaded.
+% \begin{macrocode}
+\@ifundefined{APAC@curr@aux}{\def\APAC@curr@aux{}}{}
+\AtBeginDocument{%
+ \@ifpackageloaded{multibbl}{%
+% \end{macrocode}
+% To mimic \pkg{chapterbib} behavior (with flags etc.).
+% \begin{macrocode}
+ \def\APAC@def@curr@aux#1{\def\APAC@curr@aux{@APACaux@#1@}}%
+% \end{macrocode}
+% \begin{macro}{\newbibliography}
+% Ditto. This puts the \cmd{\bibcite} commands in |#1.aux| instead of in
+% the main \fname{.aux} file, so that the flags can be differentiated.
+% This also means that the \fname{.aux} file has to be read by \LaTeX{}
+% before it is overwritten.
+% \begin{macrocode}
+ \def\newbibliography#1{%
+ \APAC@def@curr@aux{#1}%
+ \@input@{#1.aux}%
+ \begingroup
+ \if@filesw
+ \expandafter\newwrite\csname #1@auxfile\endcsname
+ \expandafter\immediate\openout
+ \csname #1@auxfile\endcsname #1.aux\relax
+ \typeout{Writing auxiliary file #1.aux }%
+ \fi
+ \endgroup
+ }%%
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\APAC@mbbl@bibliography}
+% \begin{macro}{\bibliography}
+% Add the flag to the bibliography.
+% \begin{macrocode}
+ \let\APAC@mbbl@bibliography\bibliography
+ \def\bibliography#1#2#3{%
+ \APAC@def@curr@aux{#1}%
+ \let\@APACtemp@auxout\@newciteauxhandle
+ \def\@APACtemp{\csname #1@auxfile\endcsname}%
+ \let\@newciteauxhandle\@APACtemp
+ \APAC@mbbl@bibliography{#1}{#2}{#3}%
+ \let\@newciteauxhandle\@APACtemp@auxout
+ }%%
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\@orig@@cite}
+% \begin{macro}{\@@cite}
+% Add an extra argument to \cmd{\@@cite}.
+% \begin{macrocode}
+ \let\@orig@@cite\@@cite
+ \def\@@cite<#1>[#2]#3#4{%
+ \nocite{#3}{#4}%
+ \let\@temp@nocite\nocite
+ \let\nocite\@gobble
+ \APAC@def@curr@aux{#3}%
+ \@orig@@cite<#1>[#2]{#4}%
+ \let\nocite\@temp@nocite
+ \let\@temp@nocite\@undefined
+ }%%
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\@orig@nocite}
+% \begin{macro}{\nocite}
+% Add an extra argument to \cmd{\nocite}.
+% \begin{macrocode}
+ \let\@orig@nocite\nocite
+ \def\nocite#1#2{%
+% \end{macrocode}
+% Define a flag.
+% \begin{macrocode}
+ \APAC@def@curr@aux{#1}%
+% \end{macrocode}
+% No flag-setting in \cmd{\nocite}: A no-cite is not a citation,
+% so a subsequent citation may be the first citation.
+% \begin{macrocode}
+ \@bsphack
+ \ifx\@onlypreamble\document
+% \end{macrocode}
+% Since we are after |\begin{document}| we can do the citations:
+% \begin{macrocode}
+ \@for\@citeb:=#2\do{%
+ \edef\@citeb{\expandafter\@firstofone\@citeb}%
+% \end{macrocode}
+% \cmd{\@newciteauxhandle} for compatibility with \pkg{multibib};
+% |#1@auxfile| for compatibility with \pkg{multibbl}.
+% \begin{macrocode}
+ \@ifundefined{#1@auxfile}{%
+ \if@filesw
+ \immediate\write\@newciteauxhandle{\string\citation{\@citeb}}%
+ \fi
+ }{\if@filesw
+ \expandafter\immediate%
+ \write\csname #1@auxfile\endcsname{\string\citation{\@citeb}}%
+ \fi
+ }%
+ \@ifundefined{b@\@citeb\APAC@extra@b@citeb}{%
+ \edef\B@my@dummy{*}%
+ \ifx\@citeb\B@my@dummy
+ \else
+ \G@refundefinedtrue
+ \@latex@warning{Citation `\@citeb' undefined}%
+ \fi
+ }{}%
+ }%
+ \else
+% \end{macrocode}
+% \pkg{apacite} has no compatibility problems with \LaTeX~2.09,
+% because it does not work with \LaTeX~2.09 anyway, so we can do the
+% following, suggested in \fname{ltbibl.dtx}:
+% \begin{macrocode}
+ \AtBeginDocument{\nocite{#1}{#2}}%
+ \fi
+ \@esphack
+% \end{macrocode}
+% For compatibility with \pkg{multibib}.
+% \begin{macrocode}
+ \@restore@auxhandle
+ }%
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\@orig@nocitemeta}
+% \begin{macro}{\nocitemeta}
+% Add an extra argument to \cmd{\nocitemeta}.
+% \begin{macrocode}
+ \let\@orig@@nocitemeta\nocitemeta
+ \def\nocitemeta#1#2{%
+ \nocite{#1}{#2}%
+ \let\@temp@nocite\nocite
+ \let\nocite\@gobble
+ \@orig@@nocitemeta{#2}%
+ \let\nocite\@temp@nocite
+ \let\@temp@nocite\@undefined
+ }%
+ }{}%
+}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+% \subsubsection{\pkg{multibib}}
+%
+% From the instructions in \fname{multibib.dtx}.
+% \begin{macrocode}
+\providecommand\@newciteauxhandle{\@auxout}
+\def\@restore@auxhandle{\gdef\@newciteauxhandle{\@auxout}}
+\AtBeginDocument{%
+ \@ifundefined{newcites}{\global\let\@restore@auxhandle\relax}{}%
+}
+% \end{macrocode}
+% List of citation commands.
+% \begin{macrocode}
+\if@APAC@classic@cite
+\def\@mb@citenamelist{%
+ cite,fullcite,shortcite,citeNP,fullciteNP,shortciteNP,%
+ citeA,fullciteA,shortciteA,citeauthor,fullciteauthor,shortciteauthor,%
+ citeauthorNP,fullciteauthorNP,shortciteauthorNP,%
+ citeyear,citeyearNP,nocite,nocitemeta,%
+ maskcite,maskfullcite,maskshortcite,maskciteNP,maskfullciteNP,%
+ maskshortciteNP,maskciteA,maskfullciteA,maskshortciteA,%
+ maskciteauthor,maskfullciteauthor,maskshortciteauthor,%
+ maskciteauthorNP,maskfullciteauthorNP,maskshortciteauthorNP,%
+ maskciteauthorA,maskfullciteauthorA,maskshortciteauthorA,%
+ maskciteyear,maskciteyearNP,masknocite%
+}
+\fi
+\if@APAC@natbib@apa
+\AtEndOfPackage{%
+% \end{macrocode}
+% The \pkg{natbib} commands, if they haven't been declared already.
+% \begin{macrocode}
+\@ifundefined{@mb@citenamelist}{%
+ \def\@mb@citenamelist{%
+ nocite,citep,citealp,citet,citealt,citeauthor,citefullauthor,%
+ citeyearpar,citeyear,citetext,cite,shortcites,citetalias,%
+ citepalias,Citet,Citep,Citealt,Citealp,Citeauthor,citenum}%
+}{}
+% \end{macrocode}
+% The commands \pkg{apacite} adds.
+% \begin{macrocode}
+\let\orig@mb@citenamelist\@mb@citenamelist
+\edef\@mb@citenamelist{%
+ \orig@mb@citenamelist,%
+ citeauthort,citeauthorp,citefullauthort,citefullauthorp,Citeauthort,%
+ Citeauthorp,Citefullauthort,Citefullauthorp,%
+ masknocite,maskcitep,maskcitealp,maskcitet,maskcitealt,%
+ maskciteauthor,maskcitefullauthor,maskciteyearpar,maskciteyear,%
+ maskcite,maskcitetalias,maskcitepalias,maskCitet,maskCitep,%
+ maskCitealt,maskCitealp,maskCiteauthor,maskcitenum,maskciteauthort,%
+ maskciteauthorp,maskCitefullauthor,maskCiteauthort,maskCiteauthorp,%
+ nocitemeta%
+}
+}
+\fi
+% \end{macrocode}
+%
+%
+% \subsection{Language-specific macros and loading of language file}
+% \label{sec:language-code}
+%
+% This section initializes a number of macros that are likely to be subject
+% to redefinition in the language-specific files. Most of these are fairly
+% obvious, particularly literal text strings, but some style issues are
+% language-specific as well, e.g., whether or not a comma should be inserted
+% before the last author. After initializing these macros, \pkg{apacite} tries
+% to infer which language-specific (\fname{.apc}) file must be loaded, if any,
+% and then loads this file.
+%
+% \subsubsection{Literal text strings}
+%
+% \begin{macro}{\onemaskedcitationmsg}
+% \begin{macro}{\maskedcitationsmsg}
+% Messages that are inserted in the text if citations are masked.
+% Put these messages in separate commands so that they're easily
+% changed; e.g., for different languages. We use \cmd{\emph} instead
+% of \cmd{\textit}, so that this is put upright if it's executed
+% within an italic surrounding, and the parentheses are included
+% within the \cmd{\emph}, which looks better if this is included in
+% another pair of parentheses. But all of this is easily changed.
+% \begin{macrocode}
+\newcommand{\onemaskedcitationmsg}[1]{%
+ \emph{(#1\ citation removed for masked review)}}
+\newcommand{\maskedcitationsmsg}[1]{%
+ \emph{(#1\ citations removed for masked review)}}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\refname}
+% \begin{macro}{\bibname}
+% \begin{macro}{\authorindexname}
+% The section/chapter headings to be used for the reference list and the
+% author index. One of the first two is typically already defined by the
+% document class (e.g., \fname{article.cls} defines \cmd{\refname},
+% \fname{book.cls} defines \cmd{\bibname}. When using \pkg{babel}, these are
+% both redefined at each \cmd{\selectlanguage} invocation. The
+% language-specific (\fname{.apc}) file typically should override that, because
+% the strings defined by \pkg{babel} are often not the same as the strings
+% prescribed by the style guides for Psychology. For example, the standard
+% definition of \cmd{\bibname} in English is ``Bibliography'', whereas the
+% APA insists on ``References'' (with a few exceptions). In other languages,
+% the \cmd{\refname} may also be defined differently from the \pkg{babel}
+% definition. See the various \fname{.apc} files for how \pkg{babel} is
+% overridden.
+% \begin{macrocode}
+\def\refname{References}% Name of ref. list if it's a section.
+\def\bibname{References}% Name of ref. list if it's a chapter.
+\newcommand{\authorindexname}{Author Index}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\APACmetaprenote}
+% A note used just before the references in the reference list when a
+% meta-analysis is reported.
+% \begin{macrocode}
+\newcommand{\APACmetaprenote}{%
+ References marked with an asterisk indicate studies included in
+ the meta-analysis.}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\bibmessage}
+% \begin{macro}{\bibcomputerprogram}
+% \begin{macro}{\bibcomputerprogrammanual}
+% \begin{macro}{\bibcomputerprogramandmanual}
+% \begin{macro}{\bibcomputersoftware}
+% \begin{macro}{\bibcomputersoftwaremanual}
+% \begin{macro}{\bibcomputersoftwareandmanual}
+% \begin{macro}{\bibprogramminglanguage}
+% Commands for specific types of \entryname{@misc} entries. Besides the strings
+% themselves (as language-specific text), these are significant in that they
+% are recognized by \fname{apacite.bst} and used to modify the formatting of
+% the corresponding reference list entries.
+% \begin{macrocode}
+\newcommand{\bibmessage}{Msg}% Message, for internet forums and the like
+\newcommand{\bibcomputerprogram}{Computer program}
+\newcommand{\bibcomputerprogrammanual}{Computer program manual}
+\newcommand{\bibcomputerprogramandmanual}{Computer program and manual}
+\newcommand{\bibcomputersoftware}{Computer software}
+\newcommand{\bibcomputersoftwaremanual}{Computer software manual}
+\newcommand{\bibcomputersoftwareandmanual}{Computer software and manual}
+\newcommand{\bibprogramminglanguage}{Programming language}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\bibnodate}
+% \begin{macro}{\BIP}
+% Two types of ``special'' years: ``no date'' and ``in press''. These are not
+% only text strings unlike normal years, but also are recognized by
+% \fname{apacite.bst} and treated differently there. Here and in many other
+% macros below, the \cmd{\hbox} ensures that \TeX{} does not interpret the
+% final period as a sentence-ending period, and thus does not insert the extra
+% space associated with that.
+% \begin{macrocode}
+\newcommand{\bibnodate}{n.d.\hbox{}}% no date
+\newcommand{\BIP}{in press} % in press
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\BOthers}
+% \begin{macro}{\BOthersPeriod}
+% ``and others''. The argument contains a period to suppress an additional one
+% in the reference list, i.e., it is used as |\BOthers{.}| and the period in the
+% argument is seen by \BibTeX{}, which does not insert an additional one, so
+% that we now correctly get |et al.| and not |et al..| in the reference list.
+% The difference between \cmd{\BOthers} and \cmd{\BOthersPeriod} is that the
+% latter is used in a context where there should always be a period at the
+% end. Given that \BibTeX{} does not insert it because of the mentioned usage
+% of a period in the argument, this explicit distinction is necessary here.
+% Hence, if an unabbreviated string is used to define these commands, their
+% definitions become different. For example,
+% \begin{verbatim}
+% \renewcommand{\BOthers}{and others}
+% \renewcommand{\BOthersPeriod}{and others.}
+% \end{verbatim}
+% This does not work perfectly if \cmd{\citeauthor} is used at the end of a
+% sentence. This is on the todo-list. For the moment, the user will have to
+% employ an explicit workaround, i.e., insert an additional period if
+% \cmd{\BOthers} does not contain one and omit this period if it does.
+% \begin{macrocode}
+\newcommand{\BOthers}[1]{et al.\hbox{}}% ``and others''
+\newcommand{\BOthersPeriod}[1]{et al.\hbox{}}% ``and others.'', with a period
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\BIn}
+% \begin{macro}{\Bby}
+% Used for ``In Editor (Ed.), \emph{Booktitle}'' and
+% ``by Editor, Ed., \emph{Booktitle}'', respectively.
+% \begin{macrocode}
+\newcommand{\BIn}{In} % for ``In '' editor...
+\newcommand{\Bby}{by} % for ``by '' editor... (in reprints)
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\BED}
+% \begin{macro}{\BEDS}
+% \begin{macro}{\BTRANS}
+% \begin{macro}{\BTRANSS}
+% \begin{macro}{\BTRANSL}
+% \begin{macro}{\BCHAIR}
+% \begin{macro}{\BCHAIRS}
+% Various types of non-author contributions.
+% \begin{macrocode}
+\newcommand{\BED}{Ed.\hbox{}} % editor
+\newcommand{\BEDS}{Eds.\hbox{}} % editors
+\newcommand{\BTRANS}{Trans.\hbox{}} % translator
+\newcommand{\BTRANSS}{Trans.\hbox{}} % translators
+\newcommand{\BTRANSL}{trans.\hbox{}} % translation, for the year field
+\newcommand{\BCHAIR}{Chair} % chair of symposium
+\newcommand{\BCHAIRS}{Chairs} % chairs
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\BVOL}
+% \begin{macro}{\BVOLS}
+% \begin{macro}{\BNUM}
+% \begin{macro}{\BNUMS}
+% \begin{macro}{\BEd}
+% \begin{macro}{\BCHAP}
+% \begin{macro}{\BCHAPS}
+% \begin{macro}{\BPG}
+% \begin{macro}{\BPGS}
+% Various strings that indicate what kind of number is given.
+% \begin{macrocode}
+\newcommand{\BVOL}{Vol.\hbox{}} % volume (of a multi-volume book)
+\newcommand{\BVOLS}{Vols.\hbox{}} % volumes
+\newcommand{\BNUM}{No.\hbox{}} % number (of a technical report)
+\newcommand{\BNUMS}{Nos.\hbox{}} % numbers
+\newcommand{\BEd}{ed.\hbox{}} % edition
+\newcommand{\BCHAP}{chap.\hbox{}} % chapter (for electronic documents)
+\newcommand{\BCHAPS}{chap.\hbox{}} % chapters
+\newcommand{\BPG}{p.\hbox{}} % page
+\newcommand{\BPGS}{pp.\hbox{}} % pages
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\BTR}
+% \begin{macro}{\BPhD}
+% \begin{macro}{\BUPhD}
+% \begin{macro}{\BMTh}
+% \begin{macro}{\BUMTh}
+% Various strings that indicate what kind of work is referenced.
+% \begin{macrocode}
+%% Default technical report type name.
+\newcommand{\BTR}{Tech.\ Rep.\hbox{}}
+%% Default PhD thesis type name.
+\newcommand{\BPhD}{Doctoral dissertation}
+%% Default unpublished PhD thesis type name.
+\newcommand{\BUPhD}{Unpublished doctoral dissertation}
+%% Default master's thesis type name.
+\newcommand{\BMTh}{Master's thesis}
+%% Default unpublished master's thesis type name.
+\newcommand{\BUMTh}{Unpublished master's thesis}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\BAuthor}
+% ``Author'', the string used for the publisher if the publisher is also the
+% author of the work.
+% \begin{macrocode}
+\newcommand{\BAuthor}{Author}% ``Author'' if publisher = author
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\BOWP}
+% \begin{macro}{\BREPR}
+% Two strings that are used for reprints and translations.
+% \begin{macrocode}
+\newcommand{\BOWP}{Original work published}
+\newcommand{\BREPR}{Reprinted from}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\BAvailFrom}
+% \begin{macro}{\BRetrieved}
+% \begin{macro}{\BRetrievedFrom}
+% \begin{macro}{\BMsgPostedTo}
+% Strings that indicate where on the internet the referenced document was
+% obtained.
+% \begin{macrocode}
+\newcommand{\BAvailFrom}{Available from\ }% Websites; note the space.
+%% The argument is the date on which it was last checked.
+\newcommand{\BRetrieved}[1]{Retrieved {#1}, from\ }% Websites; note the space.
+\newcommand{\BRetrievedFrom}{Retrieved from\ }% Websites; note the space.
+\newcommand{\BMsgPostedTo}{Message posted to\ }% Messages; note the space.
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+%
+% \subsubsection{Punctuation}
+%
+% Most of this is more style-specific than language specific, but there are
+% some punctuation differences between different languages, or even
+% ``dialects'' (in \pkg{babel}'s terminology) of the same ``language''.
+% Therefore, these are all included here and redefined in the \fname{.apc}
+% files.
+%
+% \begin{macro}{\BBOP}
+% \begin{macro}{\BBCP}
+% Opening and closing parentheses. Used to enclose the whole citation for a
+% parenthetical citation (e.g., \cmd{\cite}), only the year and post-note for
+% in-text citations (e.g., \cmd{\citeA}), and the year (and month and day, if
+% present) in the reference list. If different punctuation is desired for
+% the reference than used in citations, these commands can be redefined
+% immediately before the location of the \cmd{\bibliography} command. If
+% different punctuation is desired for parenthetical citations than for in-text
+% citations (seems unlikely), the citation commands themselves have to be
+% redefined.
+% \begin{macrocode}
+\newcommand{\BBOP}{(} % opening parenthesis
+\newcommand{\BBCP}{)} % closing parenthesis
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\BBOQ}
+% \begin{macro}{\BBCQ}
+% Opening and closing quotes for article-type titles in the reference list.
+% \begin{macrocode}
+\newcommand{\BBOQ}{} % opening quote for article title
+\newcommand{\BBCQ}{} % closing quote for article title
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\BBAA}
+% \begin{macro}{\BBAB}
+% \begin{macro}{\BAnd}
+% Three forms of ``and''. Of course, the word ``and'' is a literal text string,
+% so this part could also have been allocated to the the section that handles
+% those.
+% \begin{macrocode}
+\newcommand{\BBAA}{\&} % between authors in parenthetical cites and ref. list
+\newcommand{\BBAB}{and} % between authors in in-text citation
+\newcommand{\BAnd}{\&} % for ``Ed. \& Trans.'' in ref. list
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\BPBI}
+% \begin{macro}{\BHBI}
+% Punctuation between initials. This is primarily used to reduce or eliminate
+% space between initials. Note that there is currently not a similar command
+% for the last period after the initials, so that removing the periods in these
+% macros will generally give undesirable results.
+% \begin{macrocode}
+\DeclareRobustCommand{\BPBI}{.~}% Period between initials
+\DeclareRobustCommand{\BHBI}{.-}% Hyphen between initials
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\BAP}
+% \begin{macro}{\BBAY}
+% \begin{macro}{\BBYY}
+% \begin{macro}{\BBC}
+% \begin{macro}{\BBN}
+% \begin{macro}{\BCBT}
+% \begin{macro}{\BCBL}
+% \begin{macro}{\BDBL}
+% Punctuation between various parts of citations and reference list entries.
+% \begin{macrocode}
+\newcommand{\BAP}{ } % after prefix, before first citation
+\newcommand{\BBAY}{, } % between author(s) and year
+\newcommand{\BBYY}{, } % between years of multiple citations with same author
+\newcommand{\BBC}{; } % between cites
+\newcommand{\BBN}{, } % before note
+\newcommand{\BCBT}{,} % comma between authors in ref. list when no. of
+ %% authors = 2
+\newcommand{\BCBL}{,} % comma before last author when no. of authors > 2
+\newcommand{\BDBL}{, \dots{} }% dots before last author when no. of authors > 7
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+%
+% \subsubsection{Date formatting}
+%
+% This consists of literal strings (names of the months), relative ordering of
+% year, month, and day, and punctuation between the elements.
+%
+% \begin{macro}{\APACmonth}
+% This takes one argument. If it is a number between 1 and 12, the name of
+% the corresponding month is produced (1 = January, \dots, 12 = December),
+% and 13--16 represent the seasons. Anything else is copied literally. In this
+% way, other kinds of dates can be handled as well, such as
+% ``August/September''. Note that this in its turn can be flexibly entered
+% as |\APACmonth{08}/\APACmonth{09}| in the \fname{.bib} file.
+% \begin{macrocode}
+\newcommand{\APACmonth}[1]{\ifcase #1\or January\or February\or March\or
+ April\or May\or June\or July\or August\or September\or October\or
+ November\or December\or Winter\or Spring\or Summer\or Fall\else
+ {#1}\fi}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\APACrefYearMonthDay}
+% Year, month, and day in the reference list. Often used for newspaper articles
+% and presentations at conferences. By default, this results in something like
+% ``(2005, July~5)''. The month and day should be seen as parenthetical
+% refinements of the year, so that in other languages, the year should be
+% named first as well, regardless of the conventions for representing dates in
+% such languages.
+% \begin{macrocode}
+\newcommand{\APACrefYearMonthDay}[3]{%
+ {\BBOP}{#1}% year (+ addendum); should not be empty
+ \ifx\@empty#2\@empty
+ \ifx\@empty#3\@empty
+ \else
+ \unskip, {#3}% day
+ \fi
+ \else
+ \unskip, {#2}% month
+ \ifx\@empty#3\@empty
+ \else
+ \unskip~{#3}% day
+ \fi
+ \fi
+ {\BBCP}% closing parenthesis
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\APACdate}
+% A date in the ordinary form, like \cmd{\today}. This is needed for processing
+% the \fieldname{lastchecked} field. Should be able to handle dates in both
+% typical \LaTeX{} input format (|2005/07/05|) and ISO format
+% (|2005-07-05|, possibly with time after it, which will be ignored). Maybe
+% other formats as well; e.g., |20050705|, as in the Un*x |touch| command.
+% Not yet implemented.
+% \end{macro}
+%
+% \subsubsection{Ordinal numbers}
+%
+% Some functions, for use with the \fieldname{edition} field, which transform
+% a (cardinal) number (``1'', ``2'', \dots) to an ordinal number (``1st'',
+% ``2nd'', \dots).
+%
+% I copied the functions here literally from \fname{amsrefs.dtx} (starting
+% with \cmd{\PrintEdition} there) and made only one slight adaptation: removing
+% \cmd{\editiontext}. In the \APACversiondate{2007/09/03} version of
+% \pkg{apacite}, \cmd{\PrintOrdinal} and \cmd{\print@ordinal} were called
+% \cmd{\PrintCardinal} and \cmd{\print@cardinal}, respectively, and what is
+% called ``ordinal'' now was called ``cardinal''. This terminology was copied
+% from the documentation of \pkg{amsrefs}, but it is incorrect and has
+% therefore been changed in the current version. This causes a slight
+% incompatibility between versions of \pkg{apacite}. So in case users have
+% redefined one of these macros to fit their own needs, they should rename
+% these accordingly. Note, however, that the current version of \pkg{apacite}
+% redefines these macros in the language-specific files, so for most users,
+% this will presumably be sufficient.
+%
+% \begin{macro}{\@xp}
+% Abbreviation.
+% \begin{macrocode}
+\let\@xp\expandafter
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\PrintOrdinal}
+% \begin{macro}{\print@ordinal}
+% \begin{macro}{\CardinalNumeric}
+% \begin{macro}{\keep@last@digit}
+% |\PrintOrdinal{2}| gives ``2nd'', etc. If the argument is not an integer
+% number, it is copied literally to the output. At least, apparently, because
+% I do not really understand how it works. The \pkg{amsrefs} documentation
+% suggests that \cmd{\CardinalNumeric} already gives the ordinal number
+% (incorrectly called ``cardinal number'' there), and the name
+% \cmd{\CardinalNumeric} without `|@|' sign likewise suggests that it is a
+% user command, but some tests using this give garbage. Therefore,
+% \cmd{\PrintOrdinal} (a slight adaptation of \pkg{amsrefs}'
+% \cmd{\PrintEdition}) is the command that ultimately should be used.
+% \begin{macrocode}
+\newcommand{\PrintOrdinal}[1]{%
+ \afterassignment\print@ordinal
+ \count@ 0#1\relax\@nil
+}
+\def\print@ordinal#1#2\@nil{%
+ \ifx\relax#1\relax
+ \ifnum\count@>\z@
+ \CardinalNumeric\count@
+ \else
+ ??th%
+ \fi
+ \else
+ \ifnum \count@>\z@ \number\count@ \fi
+ #1#2\relax
+ \fi
+}
+\newcommand{\CardinalNumeric}[1]{%
+ \number#1\relax
+ \if
+ \ifnum#1<14
+ \ifnum#1>\thr@@ T\else F\fi
+ \else
+ F%
+ \fi
+ T%
+ th%
+ \else
+ \@xp\keep@last@digit\@xp#1\number#1\relax
+ \ifcase#1th\or st\or nd\or rd\else th\fi
+ \fi
+}
+\def\keep@last@digit#1#2{%
+ \ifx\relax#2%
+ \@xp\@gobbletwo
+ \else
+ #1=#2\relax
+ \fi
+ \keep@last@digit#1%
+}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+%
+% Load language dependent sections from an external file. Based on code by
+% Stefan Bj\"ork [2004/12/25], although heavily modified.
+% \begin{macrocode}
+\AtBeginDocument{%
+% \end{macrocode}
+% Both \pkg{babel} and \pkg{(n)german} use \cmd{\iflanguage} to check the main
+% language. They both also use \cmd{\languagename}, but that gives more
+% problems with ``dialects''. For example, if \cmd{\languagename} = |austrian|
+% then |\iflanguage{german}{Yes}{No}| gives Yes. This allows us to provide only
+% \fname{.apc} files for the language class without complicated code to check
+% whether a certain ``dialect'' is used.
+%
+% Check whether \cmd{\iflanguage} is defined. If not, no language support
+% is offered.
+% \begin{macrocode}
+ \@ifundefined{iflanguage}%
+ {\relax }%
+ {%
+% \end{macrocode}
+% Some \TeX{} distributions automatically preload \pkg{babel} with default
+% language ``|nohyphenation|'', so this language should revert to doing
+% nothing. Strangely enough, \cmd{\iflanguage} does not work correctly, so
+% I'll use a trick. (Some trial and error, because \fname{babel.dtx} states
+% that there must be a ``\verb*+\string +'' before the ``|nohyphenation|'',
+% but apparently in this situation this is not the case.)
+% \begin{macrocode}
+ \edef\APAC@tmp{nohyphenation}%
+ \ifx\languagename\APAC@tmp
+ \else
+% \end{macrocode}
+% Check whether $\langle$\cmd{\languagename}$\rangle$\fname{.apc} exists.
+% If so, load this file.
+% \begin{macrocode}
+ \InputIfFileExists{\languagename.apc}{}{%
+% \end{macrocode}
+% Else, i.e., $\langle$\cmd{\languagename}$\rangle$\fname{.apc} does not
+% exist. Try whether the current language is a dialect of one of the
+% known languages. This is not perfect, because languages for which no
+% hyphenation patterns have been found revert to the default language,
+% so that the wrong language file may be loaded here in that case. Also,
+% |UKenglish| uses different hyphenation patterns from |english|. I have
+% to find a better way to solve this.
+%
+% \begin{macro}{\APAC@iflang}
+% Define a modification of \cmd{\iflanguage} that executes the ``true''
+% code if the language is defined and equal to the current language and
+% does nothing otherwise. (Just \cmd{\iflanguage} gives an error if the
+% language is not loaded.)
+% \begin{macrocode}
+ \def\APAC@iflang##1##2{%
+ \expandafter\ifx\csname l@##1\endcsname\relax
+ \else
+ \ifnum\csname l@##1\endcsname=\language
+ {##2}%
+ \fi
+ \fi
+ }%
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\APAC@apcfile}
+% Define the language support file. The \cmd{\def} instead of a direct
+% \cmd{\input} is done to provide a mechanism to check whether any
+% language file has been defined.
+% \begin{macrocode}
+ \APAC@iflang{dutch}{\gdef\APAC@apcfile{dutch.apc}}%
+ \APAC@iflang{finnish}{\gdef\APAC@apcfile{finnish.apc}}%
+ \APAC@iflang{french}{\gdef\APAC@apcfile{french.apc}}%
+ \APAC@iflang{german}{\gdef\APAC@apcfile{german.apc}}%
+ \APAC@iflang{ngerman}{\gdef\APAC@apcfile{ngerman.apc}}%
+ \APAC@iflang{greek}{\gdef\APAC@apcfile{greek.apc}}%
+ \APAC@iflang{norsk}{\gdef\APAC@apcfile{norsk.apc}}%
+ \APAC@iflang{spanish}{\gdef\APAC@apcfile{spanish.apc}}%
+ \APAC@iflang{swedish}{\gdef\APAC@apcfile{swedish.apc}}%
+% \end{macrocode}
+% The hyphenation patterns for UK English are different from
+% US English, so this needs to be accommodated explicitly to avoid a
+% warning. Australian, New Zealand, and Canadian all use either the
+% British or American hyphenation patterns, so do not need to be
+% treated separately here.
+% \begin{macrocode}
+ \APAC@iflang{UKenglish}{\gdef\APAC@apcfile{english.apc}}%
+% \end{macrocode}
+% The default English as the last one. If a language is loaded without
+% hyphenation patterns, the English hyphenation patterns are used by
+% default in \pkg{babel}. In such a case, both this particular
+% language and English give a hit. Having English as the last one
+% means that in such a case, \pkg{apacite} assigns English,
+% corresponding with \pkg{babel}'s default.
+% \begin{macrocode}
+ \APAC@iflang{english}{\gdef\APAC@apcfile{english.apc}}%
+% \end{macrocode}
+% \end{macro}
+%
+% Give a warning if the process so far has not resulted in a target
+% language file, or if the target language file cannot be found.
+% \begin{macrocode}
+ \@ifundefined{APAC@apcfile}{%
+ \PackageWarningNoLine{apacite}{%
+ No suitable language definition file (\languagename.apc) found}%
+ }{%
+ \InputIfFileExists{\APAC@apcfile}{}{%
+ \PackageWarningNoLine{apacite}{%
+ Language definition file \APAC@apcfile\space not found}%
+ }%
+ }%
+% \end{macrocode}
+% Clear up some macros that are no longer needed.
+% \begin{macrocode}
+ \let\APAC@apcfile\@undefined
+ }%
+ \fi
+ \let\APAC@tmp\@undefined
+ }%
+ \let\APAC@iflang\@undefined
+}
+%%
+%</package>
+% \end{macrocode}
+%
+%
+% \section{Documentation package (\fname{apacdoc.sty})}
+% The \pkg{apacdoc} package is written for generating the \pkg{apacite}
+% user's manual. But it also contains a few commands that are too
+% experimental or otherwise unsuitable to be included in \fname{apacite.sty},
+% but which are necessary to format some examples from the APA manual
+% correctly. As such, these commands may be useful for users if they
+% encounter similar citation problems. In such a case, it is probably
+% better to copy the definitions of the desired commands to the top
+% of your \fname{.tex} document (before \verb+\begin{document}+) or
+% to a tailor-made \fname{.sty} file, rather than loading the \pkg{apacdoc}
+% package.
+%
+% \begin{macrocode}
+%<*docpkg>
+%%
+%% apacdoc.sty : Style package that is used for the apacite documentation.
+%% Written by Erik Meijer
+% \end{macrocode}
+% \subsection{Options}
+% \begin{macro}{\if@APACdoc@AX}
+% Generate author index?
+% \begin{macrocode}
+\newif\if@APACdoc@AX
+\DeclareOption{makeAX}{\@APACdoc@AXtrue}%
+\@APACdoc@AXfalse
+\ProcessOptions
+% \end{macrocode}
+% \end{macro}
+%
+% \subsection{Document-specific definitions that may be useful for wider use}
+% \begin{macro}{\bibliteral}
+% \begin{macro}{\bibinitial}
+% Echo argument literally. Can be used to define a certain author type
+% (``Producer'') in a place where \BibTeX{} expects a first name.
+% Using this command between a pair of braces makes sure that the text
+% is not abbreviated into an initial.
+% This is the result of lots of trial and error. If I change something
+% in another part, I typically have to change something here as well.
+% The \verb+\space+ is necessary because in the current setup, an additional
+% space is inserted in the bibliography, and \MakeIndex{} is space-sensitive.
+% \begin{macrocode}
+%% \DeclareRobustCommand{\bibliteral}[1]{\string\bibliteral{#1}}
+%% \newcommand{\bibliteral}[1]{#1}
+%% \newcommand{\bibliteral}[1]{\string\bibliteral{#1}}
+\newcommand{\bibliteral}[1]{\string\bibliteral\space{#1}}
+\DeclareRobustCommand{\bibinitial}[1]{\string#1}
+%% \newcommand{\bibinitial}{\string\bibinitial\space}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\bibnodot}
+% If the argument is a period (`|.|'), \BibTeX{} puts no period after it.
+% \begin{macrocode}
+\newcommand{\bibnodot}[1]{}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\SwapArgs}
+% Reverse order of the two arguments. Can be used for various reasons,
+% mostly related to sorting in the reference list.
+% \begin{macrocode}
+\newcommand{\SwapArgs}[2]{#2#1}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\bibreftext}
+% \begin{macro}{\Dutchvon}
+% The following macro is especially useful if the \fieldname{year}
+% field must be different in the text and the reference list,
+% e.g., ``1992/1993'' in the text and ``1992'' in reference list.
+% Then \fieldname{year} can be defined as |\bibreftext{1992}{1992/1993}|.
+% The definition below displays only the second argument (``text'').
+% Just before the reference list, this can then be redefined to
+% display only the first argument (``ref'').
+% \begin{macrocode}
+\newcommand{\bibreftext}[2]{#2}
+% \end{macrocode}
+% The same command, but now intended for Dutch-style ``von'' parts,
+% so in order to create some flexibility in formatting items from
+% a \fname{.bib} file, it is useful to have a separate macro for
+% this application.
+% \begin{macrocode}
+\newcommand{\Dutchvon}[2]{#2}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\APACredefineOnce}
+% This macro takes two arguments: (1) the name of a command (without the
+% backslash) and (2) arbitrary \TeX{} code. It then redefines the
+% command (1) to the \TeX{} code (2) as a one-time change, so after the
+% command (1) has been invoked once, it reverts to its definition before
+% \cmd{\APACredefineOnce} was issued. This can be used to redefine, say,
+% \cmd{\BRetrievedFrom} from ``Retrieved from'' to ``Retrieved from
+% Poverty Alleviation website'' for a single reference but restore it
+% to ``Retrieved from'' immediately afterwards.
+% \begin{macrocode}
+\DeclareRobustCommand\APACredefineOnce[2]{%
+ \global
+ \expandafter\let
+ \csname old#1\expandafter\endcsname
+ \csname #1\endcsname
+ \expandafter\gdef
+ \csname #1\expandafter\endcsname
+ {{#2}%
+ \global
+ \expandafter\let
+ \csname #1\expandafter\endcsname
+ \csname old#1\endcsname
+ }%
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\bibeditortype}
+% \begin{macro}{\renewbibeditortype}
+% The following macro changes the definitions of the macros \cmd{\BED}
+% and \cmd{\BEDS} to the argument of this macro and then immediately
+% changes the definitions back to their old definitions. So it makes a
+% one-time change. Can be used to use ``Producer'' instead of ``Ed.''
+% etc.
+% \begin{macrocode}
+\DeclareRobustCommand{\bibeditortype}[1]{\relax }%
+\def\renewbibeditortype{%
+ \def\oldBED{}%
+ \def\oldBEDS{}%
+ \DeclareRobustCommand{\bibeditortype}[1]{%
+ \global\let\oldBED\BED
+ \global\let\oldBEDS\BEDS
+ \global\def\BED{##1\global\let\BED\oldBED \global\let\BEDS\oldBEDS}%
+ \global\def\BEDS{##1\global\let\BED\oldBED \global\let\BEDS\oldBEDS}%
+ }%
+}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\bibInstring}
+% \begin{macro}{\BOn}
+% The following macro changes the definition of the macro \cmd{\BIn} to the
+% argument and then immediately changes the definition back to the old
+% definition. So it makes a one-time change. Can be used to use ``On''
+% instead of ``In'' for a CD-track, for which \cmd{\BOn} is supplied.
+% \begin{macrocode}
+\newcommand{\bibInstring}[1]{%
+ \global\let\oldBIn\BIn
+ \global\def\BIn{#1\global\let\BIn\oldBIn}%
+}
+\newcommand{\BOn}{On}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\BAbstractRetrieved}
+% \begin{macro}{\BmakeAbstractRetrieved}
+% The following macros are used to change ``Retrieved'' into
+% ``Abstract retrieved''. They use the same principle as
+% \cmd{\renewbibeditortype}.
+% \begin{macrocode}
+\global\def\BAbstractRetrieved#1{Abstract retrieved {#1}, from\ }%
+\DeclareRobustCommand{\BmakeAbstractRetrieved}{%
+ \global\def\oldBRetrieved{}%
+ \global\let\oldBRetrieved\BRetrieved
+ \global\def\BRetrieved##1{%
+ \BAbstractRetrieved{##1}%
+ \global\let\BRetrieved\oldBRetrieved%
+ }%
+}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\noedition}
+% Suppress ``ed.'' to format ``Version 4.0'' in an \fieldname{edition}
+% field.
+% \begin{macrocode}
+\DeclareRobustCommand{\noedition}{%
+ \global\def\oldBEd{}%
+ \global\let\oldBEd\BEd
+ \global\def\BEd{%
+ \unskip
+ \global\let\BEd\oldBEd
+ }%
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\swallownext}
+% \begin{macro}{\swallowdot}
+% \begin{macro}{\bibskipbracenodot}
+% \begin{macro}{\indexskipbracenodot}
+% The \cmd{\bibskipbracenodot} macro suppresses the period after a
+% following closing brace. It does not work entirely well at the
+% moment. In particular, it works differently in an \cmd{\AX} macro
+% in text and an \cmd{\AX} macro in the reference list. This probably
+% has something to do with robust vs.\ fragile macros and/or expansion
+% of the macro. I have experimented a lot with many variations, but
+% don't seem to get it right. I don't understand these issues well yet.
+% \cmd{\swallownext} swallows its argument; \cmd{\swallowdot} swallows
+% the next character if it's a period.
+% \begin{macrocode}
+\def\swallownext#1{\relax}
+\def\swallowdot{%
+ \@ifnextchar.%
+ {\swallownext}%
+ {\relax}%
+}
+% \end{macrocode}
+% When the above does not work, \cmd{\bibskipbracenodot} should reduce
+% to nothing. This is the current definition. Just before the
+% bibliography, it is redefined. \cmd{\indexskipbracenodot} has the
+% same purpose, but for the author index instead of the reference list.
+% \begin{macrocode}
+%% \def\bibskipbracenodot{\string\bibskipbracenodot}
+%% \def\bibskipbracenodot{\aftergroup\swallowdot}
+%% \let\bibskipbracenodot\relax
+\def\bibskipbracenodot{\noexpand\bibskipbracenodot}
+\def\indexskipbracenodot{\noexpand\indexskipbracenodot}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\APACmanBeforeBib}
+% Redefine commands that should be different in the bibliography.
+% \begin{macrocode}
+\newcommand{\APACmanBeforeBib}{%
+ \renewcommand{\bibreftext}[2]{##1}%
+ \renewcommand{\Dutchvon}[2]{##1}%
+ \renewbibeditortype
+ \global\let\oldbibskipbracenodot\bibskipbracenodot
+ \global\def\bibskipbracenodot{\aftergroup\swallowdot}%
+ \global\let\oldbibliteral\bibliteral
+ \renewcommand{\bibliteral}[1]{##1}%
+ \global\let\oldbibinitial\bibinitial
+ \renewcommand{\bibinitial}[1]{##1}%
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\APACbibstyle}
+% Dirty trick: request \fname{apacitex.bst} if \pkg{apacite} is loaded
+% with one of the index options, and request \fname{apacite.bst}
+% otherwise.
+% \begin{macrocode}
+\def\APACbibstyle{%
+ \if@APAC@index
+ apacitex% with index option
+ \else
+ apacite% without index option
+ \fi
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\APACmanBeforeIndex}
+% Redefine commands that should be different in the author index.
+% \begin{macrocode}
+\newcommand{\APACmanBeforeIndex}{%
+ \clearpage
+ \renewcommand{\bibeditortype}[1]{}%
+ \renewcommand{\bibliteral}[1]{\unskip}%
+ \global\let\indexskipbracenodot\bibskipbracenodot
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\APACmanAfterIndex}
+% Revert to the old definitions of commands after the index.
+% \begin{macrocode}
+\newcommand{\APACmanAfterIndex}{%
+ \global\let\bibskipbracenodot\oldbibskipbracenodot
+ \global\def\indexskipbracenodot{\noexpand\indexskipbracenodot}%
+ \APACdocindex
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\SetupAPACdocPrologues}
+% Redefine some indexing-related commands from \fname{doc.sty} and
+% \fname{ltxdoc.cls}. Unfortunately, I couldn't get the code index
+% and change history working with the \pkg{index} package, so I have
+% to tweak everything so that the \pkg{apacite} manual does not use the
+% \pkg{index} package (which is loaded by apacite when an
+% \pkgoption{index} option is requested).
+% \begin{macrocode}
+\newcommand{\SetupAPACdocPrologues}{%
+ \@ifundefined{IndexPrologue}{}{%
+ \IndexPrologue{%
+ \clearpage\section*{{Code Index}}%
+ \addcontentsline{toc}{section}{Code Index}%
+ \markboth{{Code Index}}{{Code Index}}%
+ Numbers written in italic refer to the page where the corresponding
+ entry is described; numbers underlined refer to the
+ \ifcodeline@index
+ code line of the
+ \fi
+ definition; numbers in roman refer to the
+ \ifcodeline@index
+ code lines
+ \else
+ pages
+ \fi
+ where the entry is used.
+ }%
+ }%
+ \@ifundefined{GlossaryPrologue}{}{%
+ \GlossaryPrologue{\section{{Change History}}%
+ \markboth{{Change History}}{{Change History}}%
+ }%
+ }%
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\APACdocindex}
+% From \fname{doc.dtx}.
+% \begin{macrocode}
+\def\APACdocindex{%
+ \ifhave@multicol
+ \renewenvironment{theindex}
+ {\begin{multicols}\c@IndexColumns[\index@prologue][\IndexMin]%
+ \IndexParms \let\item\@idxitem \ignorespaces}%
+ {\end{multicols}}
+ \else
+ \typeout{Can't find multicol.sty -- will use normal index layout if
+ necessary.}
+ \def\theindex{\@restonecoltrue\if@twocolumn\@restonecolfalse\fi
+ \columnseprule \z@ \columnsep 35\p@
+ \twocolumn[\index@prologue]%
+ \IndexParms \let\item\@idxitem \ignorespaces}
+ \def\endtheindex{\if@restonecol\onecolumn\else\clearpage\fi}
+ \fi
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \subsection{Citations to the Bible}
+% The \emph{APA manual} gives some rules how the Bible and other
+% classic works should be cited. These rules are not implemented
+% in standard \pkg{apacite}, so I provide a workaround here. This
+% needs to be fixed and generalized because the \emph{APA manual}
+% now also gives a Qur'an example.
+%
+% \begin{macro}{\bibleversion}
+% \begin{macro}{\@bibleversion}
+% To define which Bible version one has used.
+% \begin{macrocode}
+\def\bibleversion#1{\gdef\@bibleversion{#1}}
+\def\@bibleversion{Revised Standard Version}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\bibleciteA}
+% \begin{macro}{\fullbibleciteA}
+% \begin{macro}{\shortbibleciteA}
+% \begin{macro}{\biblecite}
+% \begin{macro}{\fullbiblecite}
+% \begin{macro}{\shortbiblecite}
+% \begin{macro}{\bibleciteNP}
+% \begin{macro}{\fullbibleciteNP}
+% \begin{macro}{\shortbibleciteNP}
+% The Bible citation commands follow the same names and syntax as the
+% ordinary citation commands, except that ``|bible|'' is inserted in
+% the command names.
+% \begin{macrocode}
+\def\bibleciteA#1{%
+ {\@ifundefined{flag@bible}%
+ {\fullbibleciteA{#1}}%
+ {\shortbibleciteA{#1}}%
+ }%
+}
+\def\fullbibleciteA#1{%
+% \end{macrocode}
+% Insert chapter and verse.
+% \begin{macrocode}
+ {#1}%
+% \end{macrocode}
+% Add Bible version.
+% \begin{macrocode}
+ { \BBOP\@bibleversion\BBCP}%
+% \end{macrocode}
+% Flag that the Bible has been cited.
+% \begin{macrocode}
+ {\global\expandafter\def\csname flag@bible\endcsname{DUMMY}}%
+}
+\def\shortbibleciteA#1{%
+ {#1}%
+% \end{macrocode}
+% Is this appropriate to flag that Bible has been cited, given that
+% we don't give the version here?
+% \begin{macrocode}
+ {\global\expandafter\def\csname flag@bible\endcsname{DUMMY}}%
+}
+\def\biblecite#1{%
+ {\@ifundefined{flag@bible}%
+ {\fullbiblecite{#1}}%
+ {\shortbiblecite{#1}}%
+ }%
+}
+\def\fullbiblecite#1{%
+ {\BBOP}%
+ {#1}%
+ {\BBAY{} \@bibleversion}%
+ {\BBCP}%
+ {\global\expandafter\def\csname flag@bible\endcsname{DUMMY}}%
+}
+\def\shortbiblecite#1{%
+ {\BBOP}%
+ {#1}%
+ {\BBCP}%
+ {\global\expandafter\def\csname flag@bible\endcsname{DUMMY}}%
+}
+\def\bibleciteNP#1{%
+ {\@ifundefined{flag@bible}%
+ {\fullbibleciteNP{#1}}%
+ {\shortbibleciteNP{#1}}%
+ }%
+}
+\def\fullbibleciteNP#1{%
+ {#1}%
+ {\BBAY{} \@bibleversion}%
+ {\global\expandafter\def\csname flag@bible\endcsname{DUMMY}}%
+}
+\def\shortbibleciteNP#1{%
+ {#1}%
+ {\global\expandafter\def\csname flag@bible\endcsname{DUMMY}}%
+}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+%
+% \subsection{Citing songs}
+% The \emph{APA manual} gives some rules how songs should be cited.
+% These rules require some tweaking of standard \pkg{apacite}. This is
+% done here.
+%
+% \begin{macro}{\bibsong}
+% \begin{macro}{\citeAsong}
+% \begin{macro}{\fullciteAsong}
+% \begin{macro}{\shortciteAsong}
+% \begin{macro}{\citesong}
+% \begin{macro}{\fullcitesong}
+% \begin{macro}{\shortcitesong}
+% \begin{macro}{\citesongNP}
+% \begin{macro}{\fullcitesongNP}
+% \begin{macro}{\shortcitesongNP}
+% The names of these macros are a bit internally inconsistent and
+% inconsistent with the \cmd{\biblecite} and \cmd{DSMcite} suites.
+% Fix this in a next version.
+% \begin{macrocode}
+\newcommand{\bibsong}[4]{}
+\newcommand{\citeAsong}[1]{%
+ \def\bibsong##1##2##3##4{%
+ \APACciteatitle{##3} {\BBOP}{##1}{\BBAY}{##2}{\BBN}{##4}{\BBCP}%
+ }%
+ \citeauthor{#1}%
+ \def\bibsong##1##2##3##4{}%
+}
+\newcommand{\fullciteAsong}[1]{%
+ \def\bibsong##1##2##3##4{%
+ \APACciteatitle{##3} {\BBOP}{##1}{\BBAY}{##2}{\BBN}{##4}{\BBCP}%
+ }%
+ \fullciteauthor{#1}%
+ \def\bibsong##1##2##3##4{}%
+}
+\newcommand{\shortciteAsong}[1]{%
+ \def\bibsong##1##2##3##4{%
+ \APACciteatitle{##3} {\BBOP}{##1}{\BBAY}{##2}{\BBN}{##4}{\BBCP}%
+ }%
+ \shortciteauthor{#1}%
+ \def\bibsong##1##2##3##4{}%
+}
+\newcommand{\citesong}[1]{%
+ \def\bibsong##1##2##3##4{%
+ {\BBOP}\APACciteatitle{##3},{\BAP}{##1}{\BBAY}{##2}{\BBN}{##4}%
+ {\BBCP}%
+ }%
+ \citeauthor{#1}%
+ \def\bibsong##1##2##3##4{}%
+}
+\newcommand{\fullcitesong}[1]{%
+ \def\bibsong##1##2##3##4{%
+ {\BBOP}\APACciteatitle{##3},{\BAP}{##1}{\BBAY}{##2}{\BBN}{##4}%
+ {\BBCP}%
+ }%
+ \fullciteauthor{#1}%
+ \def\bibsong##1##2##3##4{}%
+}
+\newcommand{\shortcitesong}[1]{%
+ \def\bibsong##1##2##3##4{%
+ {\BBOP}\APACciteatitle{##3},{\BAP}{##1}{\BBAY}{##2}{\BBN}{##4}%
+ {\BBCP}%
+ }%
+ \shortciteauthor{#1}%
+ \def\bibsong##1##2##3##4{}%
+}
+\newcommand{\citesongNP}[1]{%
+ \def\bibsong##1##2##3##4{%
+ \APACciteatitle{##3},{\BAP}{##1}{\BBAY}{##2}{\BBN}{##4}%
+ }%
+ \citeauthor{#1}%
+ \def\bibsong##1##2##3##4{}%
+}
+\newcommand{\fullcitesongNP}[1]{%
+ \def\bibsong##1##2##3##4{%
+ \APACciteatitle{##3},{\BAP}{##1}{\BBAY}{##2}{\BBN}{##4}%
+ }%
+ \fullciteauthor{#1}%
+ \def\bibsong##1##2##3##4{}%
+}
+\newcommand{\shortcitesongNP}[1]{%
+ \def\bibsong##1##2##3##4{%
+ \APACciteatitle{##3},{\BAP}{##1}{\BBAY}{##2}{\BBN}{##4}%
+ }%
+ \shortciteauthor{#1}%
+ \def\bibsong##1##2##3##4{}%
+}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+%
+% \subsection{Commands to cite the \emph{DSM}}
+% The \emph{APA manual} gives some rules how the \emph{DSM} should be
+% cited, which is a bit different from ordinary citations. These rules
+% are not implemented in standard \pkg{apacite}, so I provide a
+% workaround here.
+%
+% \begin{macro}{\bibDSM}
+% \begin{macro}{\origbibDSM}
+% \begin{macro}{\DSMauthor}
+% \begin{macro}{\DSMfulltitle}
+% \begin{macro}{\DSMshorttitle}
+% \begin{macro}{\DSMedition}
+% The \cmd{\bibDSM} macro has four arguments: (1) author, (2) full
+% title, (3) edition, (4) abbreviated title. The default definition
+% prints the author, so this gives something decent if an ordinary
+% citation command is used. The other macros extract the separate
+% arguments.
+% \begin{macrocode}
+\DeclareRobustCommand{\bibDSM}[4]{#1}
+\newcommand\origbibDSM{}
+\let\origbibDSM\bibDSM
+\newcommand{\DSMauthor}[1]{%
+ \def\bibDSM##1##2##3##4{##1}%
+ \citeauthor{#1}%
+ \let\bibDSM\origbibDSM
+}
+\newcommand{\DSMfulltitle}[1]{%
+ \def\bibDSM##1##2##3##4{##2}%
+ \citeauthor{#1}%
+ \let\bibDSM\origbibDSM
+}
+\newcommand{\DSMshorttitle}[1]{%
+ \def\bibDSM##1##2##3##4{##4}%
+ \citeauthor{#1}%
+ \let\bibDSM\origbibDSM
+}
+\newcommand{\DSMedition}[1]{%
+ \def\bibDSM##1##2##3##4{##3}%
+ \citeauthor{#1}%
+ \let\bibDSM\origbibDSM
+}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\DSMciteA}
+% \begin{macro}{\DSMfullciteA}
+% \begin{macro}{\DSMshortciteA}
+% \begin{macro}{\DSMcite}
+% \begin{macro}{\DSMfullcite}
+% \begin{macro}{\DSMshortcite}
+% \begin{macro}{\DSMciteNP}
+% \begin{macro}{\DSMfullciteNP}
+% \begin{macro}{\DSMshortciteNP}
+% The \emph{DSM} citation commands follow the same names and syntax as the
+% ordinary citation commands, except that ``|DSM|'' is inserted in
+% the command names.
+% \begin{macrocode}
+\newcommand{\DSMciteA}[1]{%
+ \@for\@citeb:=#1\do{%
+ \edef\@citeb{\expandafter\@firstofone\@citeb}%
+ \@ifundefined{flag@\@citeb\APAC@extra@b@citeb}%
+ {\DSMfullciteA{#1}}%
+ {\DSMshortciteA{#1}}%
+ }%
+}
+\newcommand{\DSMfullciteA}[1]{%
+% \end{macrocode}
+% \emph{Full Title} (edition; \emph{Short Title}; author, year)
+% \begin{macrocode}
+ \APACcitebtitle{\DSMfulltitle{#1}}
+ \BBOP
+ \DSMedition{#1};
+ \APACcitebtitle{\DSMshorttitle{#1}};
+ \citeNP{#1}%
+ \BBCP
+}
+\newcommand{\DSMshortciteA}[1]{%
+% \end{macrocode}
+% \emph{Short Title}
+% \begin{macrocode}
+ \APACcitebtitle{\DSMshorttitle{#1}}%
+}
+\newcommand{\DSMcite}[1]{%
+ \@for\@citeb:=#1\do{%
+ \edef\@citeb{\expandafter\@firstofone\@citeb}%
+ \@ifundefined{flag@\@citeb\APAC@extra@b@citeb}%
+ {\DSMfullcite{#1}}%
+ {\DSMshortcite{#1}}%
+ }%
+}
+\newcommand{\DSMfullcite}[1]{%
+ \BBOP
+ \APACcitebtitle{\DSMfulltitle{#1}},
+ \DSMedition{#1};
+ \APACcitebtitle{\DSMshorttitle{#1}};
+ \citeNP{#1}%
+ \BBCP
+}
+\newcommand{\DSMshortcite}[1]{%
+ \BBOP\APACcitebtitle{\DSMshorttitle{#1}}\BBCP
+}
+\newcommand{\DSMciteNP}[1]{%
+ \@for\@citeb:=#1\do{%
+ \edef\@citeb{\expandafter\@firstofone\@citeb}%
+ \@ifundefined{flag@\@citeb\APAC@extra@b@citeb}%
+ {\DSMfullciteNP{#1}}%
+ {\DSMshortciteNP{#1}}%
+ }%
+}
+\newcommand{\DSMfullciteNP}[1]{%
+ \APACcitebtitle{\DSMfulltitle{#1}},
+ \DSMedition{#1};
+ \APACcitebtitle{\DSMshorttitle{#1}};
+ \citeNP{#1}%
+}
+\newcommand{\DSMshortciteNP}[1]{%
+ \APACcitebtitle{\DSMshorttitle{#1}}%
+}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+%
+% \subsection{Document-specific definitions}
+%
+% \begin{macro}{\SetupAPACdoc}
+% These are some commands that are used in the \pkg{apacite} manual,
+% but are presumably not especially relevant for users.
+%
+% \begin{macro}{\MiKTeX}
+% \begin{macro}{\BibTeX}
+% \begin{macro}{\MakeIndex}
+% \begin{macro}{\latextohtml}
+% \begin{macro}{\LaTeXrtf}
+% \begin{macro}{\TeXht}
+% \begin{macro}{\Perl}
+% Names of programs and packages.
+% \begin{macrocode}
+\newcommand{\SetupAPACdoc}{%
+ \newcommand{\MiKTeX}{MiK\TeX}
+ \@ifundefined{BibTeX}{%
+ \def\BibTeX{{\rm B\kern-.05em{\sc i\kern-.025em b}\kern-.08em
+ T\kern-.1667em\lower.7ex\hbox{E}\kern-.125emX}}% from bibtex.web
+ }{}
+ \newcommand{\MakeIndex}{\textit{MakeIndex}}
+ \newcommand{\latextohtml}{\textup{\LaTeX2\texttt{HTML}}}% from html.sty
+ \newcommand{\LaTeXrtf}{\textup{\LaTeX2RTF}}%
+ \newcommand{\TeXht}{\textup{\TeX4ht}}%
+ \newcommand{\Perl}{\textsl{Perl}}%
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\EM}
+% My comments accompanying the examples. To be removed with better
+% source code documentation.
+% \begin{macrocode}
+ \newcommand{\EM}{\ensuremath{\triangleright\quad}}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\APACversiondate}
+% The date of a version of \pkg{apacite}. Makes it easy to search the
+% document for these dates. The \cmd{\relax} is a safety measure
+% (probably not needed), which ensures that the square brackets are
+% never interpreted as an optional argument.
+% \begin{macrocode}
+ \newcommand{\APACversiondate}[1]{\relax [##1]}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\LC}
+% \begin{macro}{\X}
+% \begin{macro}{\Y}
+% \begin{macro}{\A}
+% Some symbols that are used in the \pkg{apacite} manual.
+% \begin{macrocode}
+ \newcommand{\LC}{\mbox{${}^{\dag}$}}% \LaTeX{} Companion
+ \newcommand{\X}{\ensuremath{\times}}% for one table
+ \newcommand{\Y}{\ensuremath{c}}% for one table
+ \newcommand{\A}{\ensuremath{a}}% for one table
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\pkg}
+% \begin{macro}{\fname}
+% \begin{macro}{\fieldname}
+% \begin{macro}{\entryname}
+% \begin{macro}{\pkgoption}
+% \begin{macro}{\envirname}
+% Formatting of package names, options, etc.
+% \begin{macrocode}
+ \newcommand{\pkg}[1]{\textsf{##1}}% package name
+ \newcommand{\fname}[1]{\texttt{##1}}% file name
+ \newcommand{\fieldname}[1]{\texttt{##1}}% field name
+ \newcommand{\entryname}[1]{\texttt{##1}}% entry type name
+ \newcommand{\pkgoption}[1]{\texttt{##1}}% package option
+ \newcommand{\envirname}[1]{\texttt{##1}}% environment name
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\cmd}
+% \begin{macro}{\bs}
+% \begin{macro}{\opt}
+% \begin{macro}{\cmdtwo}
+% \begin{macro}{\cmdthree}
+% \begin{macro}{\cmdthreepre}
+% \begin{macro}{\cmdthreealt}
+% \begin{macro}{\cmdfour}
+% Formatting of macros.
+% \begin{macrocode}
+ \AtBeginDocument{%
+ \@ifundefined{cmd}{%
+ \newcommand{\cmd}[1]{\texttt{\string##1}}% command, incl. `\'
+ }{}%
+ }
+% \end{macrocode}
+% Some trickery with backslashes and |@| signs.
+% \begin{macrocode}
+ \newcommand{\bs}{{\ttfamily \@backslashchar}}% backslash
+ \newcommand{\opt}[1]{$\langle${\itshape ##1}$\rangle$}% generic text
+% \end{macrocode}
+% For \cmdtwo{nocite}{keys}:
+% \begin{macrocode}
+ \newcommand{\cmdtwo}[2]{{\mdseries\bs\texttt{##1\{}\opt{##2}%
+ \texttt{\}}}}%
+% \end{macrocode}
+% For \cmdthree{cite}{post}{keys}:
+% \begin{macrocode}
+ \newcommand{\cmdthree}[3]{{\mdseries\bs\texttt{##1[}\opt{##2}%
+ \texttt{]\{}\opt{##3}%
+ \texttt{\}}}}%
+% \end{macrocode}
+% For \cmdthreepre{cite}{pre}{keys}:
+% \begin{macrocode}
+ \newcommand{\cmdthreepre}[3]{{\mdseries\bs\texttt{##1<}\opt{##2}%
+ \texttt{>\{}\opt{##3}%
+ \texttt{\}}}}%
+% \end{macrocode}
+% For \cmdthreealt{usepackage}{options}{apacite}:
+% \begin{macrocode}
+ \newcommand{\cmdthreealt}[3]{{\mdseries\bs\texttt{##1[}\opt{##2}%
+ \texttt{]\{##3\}}}}%
+% \end{macrocode}
+% For all \cmdfour{cite}{pre}{post}{keys} variants:
+% \begin{macrocode}
+ \newcommand{\cmdfour}[4]{{\mdseries\bs\texttt{##1<}\opt{##2}%
+ \texttt{>[}\opt{##3}%
+ \texttt{]\{}\opt{##4}%
+ \texttt{\}}}}%
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\flqq}
+% \begin{macro}{\frqq}
+% \begin{macro}{\simpleguillemots}
+% It is not clear where and how the \cmd{\flqq} command is defined, so
+% provide an escape if it is not available. Use definitions from
+% \fname{fguill.sty} included here to avoid requiring a package that
+% may not be available. This can probably be improved by using
+% \cmd{\providecommand}.
+% \begin{macrocode}
+ \AtBeginDocument{%
+ \@ifundefined{flqq}{%
+ \newcommand{\flqq}{%
+ {\fontencoding{T1}\fontfamily{cmr}\selectfont\symbol{19}}}%
+ \newcommand{\frqq}{%
+ {\fontencoding{T1}\fontfamily{cmr}\selectfont\symbol{20}}}%
+ }{}%
+ }%
+ \newcommand{\simpleguillemots}{%
+ \renewcommand{\flqq}{\raisebox{2.5pt}{%
+ \tiny{\ensuremath{\mathord{<\!\!<}}}}}%
+ \renewcommand{\frqq}{\raisebox{2.5pt}{%
+ \tiny{\ensuremath{\mathord{>\!\!>}}}}}%
+ }%
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\APACdocPageLayout}
+% The basic page setup of the \pkg{apacite} manual.
+% \begin{macrocode}
+ \newcommand{\APACdocPageLayout}{%
+ \normalsize
+ \let\oldhoffset\hoffset
+ \let\oldvoffset\voffset
+ \let\oldoddsidemargin\oddsidemargin
+ \let\oldevensidemargin\evensidemargin
+ \let\oldtopmargin\topmargin
+ \let\oldheadheight\headheight
+ \let\oldheadsep\headsep
+ \let\oldtextheight\textheight
+ \let\oldfootskip\footskip
+ \let\oldtextwidth\textwidth
+ \let\oldlinewidth\linewidth
+ \let\oldmarginparsep\marginparsep
+ \let\oldmarginparwidth\marginparwidth
+ \let\oldmarginparpush\marginparpush
+ %%
+ %% \setlength{\hoffset}{-1in} % top-left reference point is
+ \setlength{\voffset}{-1in} % the top-left corner of the page
+ %% \setlength{\oddsidemargin}{1.3in}
+ %% \setlength{\evensidemargin}{1.3in}
+ \setlength{\topmargin}{1.35in}
+ %% %% \setlength{\headheight}{\baselineskip}
+ \setlength{\headheight}{0.12in}
+ \setlength{\headsep}{0.24in}
+ \setlength{\textheight}{7.9in}
+ \setlength{\footskip}{30pt}
+ %% \setlength{\textwidth}{5.9in}
+ %% \setlength{\linewidth}{\textwidth}
+ %% \setlength{\marginparsep}{0pt}
+ %% \setlength{\marginparwidth}{0pt}
+ %% \setlength{\marginparpush}{0pt}
+ }
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\APACcodePageLayout}
+% The page setup of the source code documentation part of the
+% \pkg{apacite} manual.
+% \begin{macrocode}
+ \newcommand{\APACcodePageLayout}{%
+ \let\hoffset\oldhoffset
+ \let\oddsidemargin\oldoddsidemargin
+ \let\evensidemargin\oldevensidemargin
+ \let\textwidth\oldtextwidth
+ \let\linewidth\oldlinewidth
+ \let\marginparsep\oldmarginparsep
+ \let\marginparwidth\oldmarginparwidth
+ \let\marginparpush\oldmarginparpush
+ }
+}
+%%
+%</docpkg>
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+%
+% \section{Language definition files}
+%
+% This section describes the code for the language-specific files
+% supplied with \pkg{apacite}.
+%
+% \subsection{\fname{english.apc}}
+%
+% This file redefines the language-specific elements of \pkg{apacite}
+% for the English language and its ``dialects'' in \pkg{babel}
+% terminology.
+%
+% \begin{macrocode}
+%<*english>
+%%
+%% english.apc - english version of apacite elements
+%% Written by Erik Meijer
+%%
+% \end{macrocode}
+% A fancy way to store and restore the category code of the |@| sign,
+% per Heiko Oberdiek.
+% \begin{macrocode}
+\edef\APACrestoreAtCode{%
+ \catcode`@=\the\catcode`@\relax
+}%
+\makeatletter
+\renewcommand{\onemaskedcitationmsg}[1]{%
+ \emph{(#1\ citation removed for masked review)}}%
+\renewcommand{\maskedcitationsmsg}[1]{%
+ \emph{(#1\ citations removed for masked review)}}%
+\renewcommand{\refname}{References}% Name of ref. list if it's a section.
+\renewcommand{\bibname}{References}% Name of ref. list if it's a chapter.
+\renewcommand{\authorindexname}{Author Index}% Name of Author Index
+%%
+%% A note before the references if a meta-analysis is reported.
+\renewcommand{\APACmetaprenote}{%
+ References marked with an asterisk indicate studies
+ included in the meta-analysis.}%
+%%
+%% Commands for specific types of @misc entries.
+\renewcommand{\bibmessage}{Msg}%
+\renewcommand{\bibcomputerprogram}{Computer program}%
+\renewcommand{\bibcomputerprogrammanual}{Computer program manual}%
+\renewcommand{\bibcomputerprogramandmanual}{Computer program and manual}%
+\renewcommand{\bibcomputersoftware}{Computer software}%
+\renewcommand{\bibcomputersoftwaremanual}{Computer software manual}%
+\renewcommand{\bibcomputersoftwareandmanual}{Computer software and manual}%
+\renewcommand{\bibprogramminglanguage}{Programming language}%
+%%
+%% Other labels
+\renewcommand{\bibnodate}{n.d.\hbox{}}% % ``no date''
+\renewcommand{\BIP}{in press}% % ``in press''
+\renewcommand{\BOthers}[1]{et al.\hbox{}}% ``and others''
+\renewcommand{\BOthersPeriod}[1]{et al.\hbox{}}% ``and others'' with a period
+\renewcommand{\BIn}{In}% % for ``In '' editor...
+\renewcommand{\Bby}{by}% % for ``by '' editor... (in reprints)
+\renewcommand{\BED}{Ed.\hbox{}}% % editor
+\renewcommand{\BEDS}{Eds.\hbox{}}% % editors
+\renewcommand{\BTRANS}{Trans.\hbox{}}% % translator
+\renewcommand{\BTRANSS}{Trans.\hbox{}}% % translators
+\renewcommand{\BTRANSL}{trans.\hbox{}}% % translation, for the year field
+\renewcommand{\BCHAIR}{Chair}% % chair of symposium
+\renewcommand{\BCHAIRS}{Chairs}% % chairs
+\renewcommand{\BVOL}{Vol.\hbox{}}% % volume
+\renewcommand{\BVOLS}{Vols.\hbox{}}% % volumes
+\renewcommand{\BNUM}{No.\hbox{}}% % number
+\renewcommand{\BNUMS}{Nos.\hbox{}}% % numbers
+\renewcommand{\BEd}{ed.\hbox{}}% % edition
+\renewcommand{\BCHAP}{chap.\hbox{}}% % chapter
+\renewcommand{\BCHAPS}{chap.\hbox{}}% % chapters
+\renewcommand{\BPG}{p.\hbox{}}% % page
+\renewcommand{\BPGS}{pp.\hbox{}}% % pages
+%% Default technical report type name.
+\renewcommand{\BTR}{Tech.\ Rep.\hbox{}}
+%% Default PhD thesis type name.
+\renewcommand{\BPhD}{Doctoral dissertation}
+%% Default unpublished PhD thesis type name.
+\renewcommand{\BUPhD}{Unpublished doctoral dissertation}
+%% Default master's thesis type name.
+\renewcommand{\BMTh}{Master's thesis}
+%% Default unpublished master's thesis type name.
+\renewcommand{\BUMTh}{Unpublished master's thesis}
+%%
+\renewcommand{\BAuthor}{Author}% ``Author'' if publisher = author
+\renewcommand{\BOWP}{Original work published}%
+\renewcommand{\BREPR}{Reprinted from}%
+\renewcommand{\BAvailFrom}{Available from\ }% Websites; note the space.
+%% The argument is the date on which it was last checked.
+\renewcommand{\BRetrieved}[1]{Retrieved {#1}, from\ }% Websites; note the space.
+\renewcommand{\BRetrievedFrom}{Retrieved from\ }% Websites; note the space.
+\renewcommand{\BMsgPostedTo}{Message posted to\ }% Messages; note the space.
+%%
+%% Punctuation
+\renewcommand{\BBOP}{(}% opening parenthesis
+\renewcommand{\BBCP}{)}% closing parenthesis
+\renewcommand{\BBOQ}{}% opening quote for article title
+\renewcommand{\BBCQ}{}% closing quote for article title
+\renewcommand{\BBAA}{\&}% between authors in parenthetical cites and ref. list
+\renewcommand{\BBAB}{and}% between authors in in-text citation
+\renewcommand{\BAnd}{\&}% for ``Ed. \& Trans.'' in ref. list
+\DeclareRobustCommand{\BPBI}{.~}% Period between initials
+\DeclareRobustCommand{\BHBI}{.-}% Hyphen between initials
+\renewcommand{\BAP}{ }% after prefix, before first citation
+\renewcommand{\BBAY}{, }% between author(s) and year
+\renewcommand{\BBYY}{, }% between years of multiple citations with same author
+\renewcommand{\BBC}{; }% between cites
+\renewcommand{\BBN}{, }% before note
+\renewcommand{\BCBT}{,}% comma between authors in ref. list when no. of
+ %% authors = 2
+\renewcommand{\BCBL}{,}% comma before last author when no. of authors > 2
+%% Remove excess space with the natbibapa option
+\if@APAC@natbib@apa
+ \renewcommand{\BBAY}{,}%
+ \renewcommand{\BBYY}{,}%
+ \renewcommand{\BBC}{;}%
+\fi
+%%
+%% Date formatting
+\renewcommand{\APACmonth}[1]{\ifcase #1\or January\or February\or March\or
+ April\or May\or June\or July\or August\or September\or October\or
+ November\or December\or Winter\or Spring\or Summer\or Fall\else
+ {#1}\fi}%
+\renewcommand{\APACrefYearMonthDay}[3]{%
+ {\BBOP}{#1}% year (+ addendum); should not be empty
+ \ifx\@empty#2\@empty
+ \ifx\@empty#3\@empty
+ \else
+ \unskip, {#3}% day
+ \fi
+ \else
+ \unskip, {#2}% month
+ \ifx\@empty#3\@empty
+ \else
+ \unskip~{#3}% day
+ \fi
+ \fi
+ {\BBCP}% closing parenthesis
+}%
+%% Some macros that transform a number (say, `2') to an ordinal one (`2nd')
+\renewcommand{\PrintOrdinal}[1]{%
+ \afterassignment\print@ordinal
+ \count@ 0#1\relax\@nil
+}%
+\def\print@ordinal#1#2\@nil{%
+ \ifx\relax#1\relax
+ \ifnum\count@>\z@
+ \CardinalNumeric\count@
+ \else
+ ??th%
+ \fi
+ \else
+ \ifnum \count@>\z@ \number\count@ \fi
+ #1#2\relax
+ \fi
+}%
+\renewcommand{\CardinalNumeric}[1]{%
+ \number#1\relax
+ \if
+ \ifnum#1<14
+ \ifnum#1>\thr@@ T\else F\fi
+ \else
+ F%
+ \fi
+ T%
+ th%
+ \else
+ \@xp\keep@last@digit\@xp#1\number#1\relax
+ \ifcase#1th\or st\or nd\or rd\else th\fi
+ \fi
+}%
+% \end{macrocode}
+% Differences between different versions of English, in particular British
+% and Australian vs.\ the default American.
+% \begin{macrocode}
+\def\APAC@tempb{US}%
+\edef\APAC@tempa{\string UKenglish}%
+\ifx\languagename\APAC@tempa
+ \def\APAC@tempb{UK}%
+\fi
+\edef\APAC@tempa{\string british}%
+\ifx\languagename\APAC@tempa
+ \def\APAC@tempb{UK}%
+\fi
+\def\APAC@tempa{UK}
+\ifx\APAC@tempa\APAC@tempb
+ \renewcommand{\BCBT}{}% no comma before `\&' in British
+ \renewcommand{\BCBL}{}% no comma before `\&' in British
+% \end{macrocode}
+% According to \pkg{babel}'s \fname{english.dtx}, in UK English, the date
+% is of the form 1st~January, although I thought January~1st was more common.
+% \begin{macrocode}
+ \renewcommand{\APACrefYearMonthDay}[3]{%
+ {\BBOP}{#1}% year (+ addendum); should not be empty
+ \ifx\@empty#3\@empty
+ \ifx\@empty#2\@empty
+ \else
+ \unskip, {#2}% month
+ \fi
+ \else
+ \unskip, {\PrintOrdinal{#3}}% day
+ \ifx\@empty#2\@empty
+ \else
+ \unskip~{#2}% month
+ \fi
+ \fi
+ {\BBCP}% closing parenthesis
+ }%
+\fi
+%%
+\edef\APAC@tempa{\string australian}%
+\ifx\languagename\APAC@tempa
+ \def\APAC@tempb{AU}%
+\fi
+% \end{macrocode}
+% New Zealand is equivalent to Australian for our purposes.
+% \begin{macrocode}
+\edef\APAC@tempa{\string newzealand}%
+\ifx\languagename\APAC@tempa
+ \def\APAC@tempb{AU}%
+\fi
+\def\APAC@tempa{AU}
+\ifx\APAC@tempa\APAC@tempb
+ \renewcommand{\BCBT}{}% no comma before `\&' in AU/NZ (?)
+ \renewcommand{\BCBL}{}% no comma before `\&' in AU/NZ (?)
+% \end{macrocode}
+% According to \pkg{babel}'s \fname{english.dtx}, In Australian and New
+% Zealand, the date is of the form 1~January.
+% \begin{macrocode}
+ \renewcommand{\APACrefYearMonthDay}[3]{%
+ {\BBOP}{#1}% year (+ addendum); should not be empty
+ \ifx\@empty#3\@empty
+ \ifx\@empty#2\@empty
+ \else
+ \unskip, {#2}% month
+ \fi
+ \else
+ \unskip, {#3}% day
+ \ifx\@empty#2\@empty
+ \else
+ \unskip~{#2}% month
+ \fi
+ \fi
+ {\BBCP}% closing parenthesis
+ }%
+\fi
+% \end{macrocode}
+% Clear up some macros that are no longer needed.
+% \begin{macrocode}
+\let\APAC@tempa\@undefined
+\let\APAC@tempb\@undefined
+% \end{macrocode}
+% Restore category code of |@| sign.
+% \begin{macrocode}
+\APACrestoreAtCode
+%</english>
+% \end{macrocode}
+%
+%
+%
+% \subsection{\fname{dutch.apc}}
+%
+% This file redefines the language-specific elements of \pkg{apacite}
+% for the Dutch language. The \pkg{babel} package considers Afrikaans
+% as a ``dialect'' of Dutch, but my limited knowledge of Afrikaans
+% suggests that most words are spelt differently (though are phonetically
+% similar), and many other words are simply different. So I doubt whether
+% this file can be directly applied to Afrikaans.
+%
+% For compiling the translated elements, the following sources were
+% used:
+% \begin{enumerate}
+% \item Instructions for the Dutch psychology journal ``De Psycholoog''
+% \cite{DePsych01}; indicated below as ``DP''.
+% \item Instructions for the Dutch psychology journal ``Nederlands Tijdschrift
+% voor de Psychologie en haar Grensgebieden'' \cite{NTPG04};
+% indicated below as ``NTPG''.
+% \item Instructions from the well-known book
+% \APACcitebtitle{Schrijfwijzer} \cite[pp.~404--410]{Renk02};
+% indicated below as ``SW''.
+% \item The previous three all state that their rules are adapted from the
+% APA manual. For translations that are not explicitly mentioned in
+% these sources, I used the extensive reference list from \citeA{Schr04}.
+% \item Finally, I consulted the \emph{Van Dale} English-Dutch dictionary
+% \cite{VanDale89}.
+% \end{enumerate}
+%
+% \begin{macrocode}
+%<*dutch>
+%%
+%% dutch.apc - dutch translation of apacite elements
+%% Written by Erik Meijer
+%%
+%% DP = De Psycholoog
+%% NTPG = Nederlands Tijdschrift voor de Psychologie en haar Grensgebieden
+%% SW = Schrijfwijzer
+%%
+% \end{macrocode}
+% A fancy way to store and restore the category code of the |@| sign,
+% per Heiko Oberdiek.
+% \begin{macrocode}
+\edef\APACrestoreAtCode{%
+ \catcode`@=\the\catcode`@\relax
+}%
+\makeatletter
+%%
+% \end{macrocode}
+%
+% Name of the reference list according to DP and NTPG.
+% SW gives the following general names:
+% \begin{itemize}
+% \item
+% ``Literatuuropgave'' [literally approx. ``Literature specification'']
+% \item
+% ``Literatuurlijst'' [literally ``Literature list'']
+% \end{itemize}
+% For more specific applications, SW gives the following names:
+% \begin{itemize}
+% \item
+% ``Bibliografie'' [``Bibliography'', ``a more or less complete survey
+% of publications in a certain area'']
+% \item
+% ``Geraadpleegde literatuur'' [``Consulted literature'']
+% \item
+% ``Aangehaalde literatuur'' [``Referenced literature'']
+% \end{itemize}
+%
+% \begin{macrocode}
+\renewcommand{\onemaskedcitationmsg}[1]{%
+ \emph{(#1\ citation removed for masked review)}}% !!! CHANGE
+\renewcommand{\maskedcitationsmsg}[1]{%
+ \emph{(#1\ citations removed for masked review)}}% !!! CHANGE
+\renewcommand{\refname}{Literatuur}% Name of ref. list if it's a section.
+\renewcommand{\bibname}{Literatuur}% Name of ref. list if it's a chapter.
+\renewcommand{\authorindexname}{Auteursindex}% Name of author index
+%%
+%% A note before the references if a meta-analysis is reported.
+%%
+\renewcommand{\APACmetaprenote}{%
+ Met een asterisk gemarkeerde referenties betreffen studies die in de
+ meta-analyse zijn gebruikt.}%
+%%
+%% Commands for specific types of @misc entries.
+\renewcommand{\bibmessage}{Bericht}%
+\renewcommand{\bibcomputerprogram}{Computerprogramma}%
+\renewcommand{\bibcomputerprogrammanual}{Handleiding van computerprogramma}%
+\renewcommand{\bibcomputerprogramandmanual}{Computerprogramma en handleiding}%
+\renewcommand{\bibcomputersoftware}{Computersoftware}%
+\renewcommand{\bibcomputersoftwaremanual}{Handleiding van computersoftware}%
+\renewcommand{\bibcomputersoftwareandmanual}{Computersoftware en handleiding}%
+\renewcommand{\bibprogramminglanguage}{Programmeertaal}%
+%%
+%% Other labels
+\renewcommand{\bibnodate}{z.~j.\hbox{}}% [SW] (``zonder jaartal'')
+\renewcommand{\BIP}{te verschijnen}% % [SW]
+\renewcommand{\BOthers}[1]{et al.\hbox{}}% % [DP]
+\renewcommand{\BOthersPeriod}[1]{et al.\hbox{}}% % [DP]
+%% NTPG requires the following, SW allows both variants:
+%% \renewcommand{\BOthers}[1]{e.~a.\hbox{}}% % [NTPG]
+%% \renewcommand{\BOthersPeriod}[1]{e.~a.\hbox{}}% % [NTPG]
+%%
+\renewcommand{\BIn}{In}% % for ``In '' editor...
+\renewcommand{\Bby}{door}% % for ``by '' editor... (in reprints)
+% \end{macrocode}
+%
+% ``Editor(s)'' is almost impossible to get right in Dutch, because SW
+% and DP require the translation of ``editor(s)'' to be dependent on
+% the language in which the referenced work is written:
+% \begin{itemize}
+% \item
+% ``Red.'' (or ``red.'') for referenced works in Dutch
+% \item
+% ``Ed.''/``Eds.'' for referenced works in English
+% \item
+% ``Hrsg.'' for referenced works in German
+% \item
+% ``edt.'' for referenced works in French
+% \end{itemize}
+% NTPG does not give an explicit rule for this, but only an example
+% in which an English work is referenced and ``Ed.'' is used.
+%
+% For the moment, I think it makes most sense to give the Dutch versions here:
+% \begin{macrocode}
+\renewcommand{\BED}{red.\hbox{}}% % [DP] (SW gives ``Red.'')
+\renewcommand{\BEDS}{red.\hbox{}}% % [DP] (SW gives ``Red.'')
+% \end{macrocode}
+%
+% Translators should not be mentioned according to DP.
+% NTPG does not explain how to format this.
+% SW gives a completely different format: ``Vertaald door:''
+% [``Translated by:''] followed by the name of the translator, or if the
+% translator is unknown: ``Vertaling van:'' [``Translation of:'']
+% followed by the original title. This is much too complicated, so I'll
+% choose a simple alternative.
+% \begin{macrocode}
+\renewcommand{\BTRANS}{vert.\hbox{}}% translator
+\renewcommand{\BTRANSS}{vert.\hbox{}}% translators
+\renewcommand{\BTRANSL}{vert.\hbox{}}% translation, for the year field
+%%
+\renewcommand{\BCHAIR}{voorz.\hbox{}}% chair of symposium
+\renewcommand{\BCHAIRS}{voorz.\hbox{}}% chairs
+% \end{macrocode}
+%
+% ``Volume'' according to SW. NTPG gives an example with ``Vol.'' but this is
+% presumably dependent on the language of the referenced work as well.
+% \begin{macrocode}
+\renewcommand{\BVOL}{Dl.\hbox{}}% volume [SW]
+\renewcommand{\BVOLS}{Dl.\hbox{}}% volumes [SW]
+\renewcommand{\BNUM}{nr.\hbox{}}% number [SW]
+\renewcommand{\BNUMS}{nr.\hbox{}}% numbers [SW]
+\renewcommand{\BEd}{dr.\hbox{}}% edition [SW]
+\renewcommand{\BCHAP}{hfdst.\hbox{}}% chapter
+\renewcommand{\BCHAPS}{hfdst.\hbox{}}% chapters
+\renewcommand{\BPG}{p.\hbox{}}% page
+\renewcommand{\BPGS}{pp.\hbox{}}% pages [SW]. DP gives ``p.'', NTPG both.
+% \end{macrocode}
+% Literally translating ``Tech.'' as ``Technisch'' does not make sense.
+% \begin{macrocode}
+%% Default technical report type name.
+\renewcommand{\BTR}{Rapport}%
+% \end{macrocode}
+% There is no Dutch ``DAI'' and the distinction between ``published'' and
+% ``unpublished'' PhD theses would generally be interpreted as ``published as
+% a book with an official publisher'' vs.\ ``privately published''. All PhD
+% theses in the Netherlands are required to be published with an ISBN number.
+% Therefore, in my view it is better to use the same term for ``published''
+% and ``unpublished''. (\citeNP{Schr04} use ``dissertatie''.)
+% \begin{macrocode}
+%% Default PhD thesis type name.
+\renewcommand{\BUPhD}{Academisch proefschrift}% ``published''
+\renewcommand{\BPhD}{Academisch proefschrift}% ``unpublished''
+% \end{macrocode}
+% There is no official forum to publish abstracts of master's theses either,
+% but, unlike PhD theses, they are (generally) unpublished.
+% The term used here refers to the Dutch educational system until ca. 2003.
+% Since ca. 2004, universities are gradually converting to a
+% bachelor--master system, so it's likely that this term will have to be
+% adapted in the near future.
+% \begin{macrocode}
+%% Default master's thesis type name.
+\renewcommand{\BMTh}{Doctoraalscriptie}% ``published''
+\renewcommand{\BUMTh}{Doctoraalscriptie}% ``unpublished''
+%%
+\renewcommand{\BAuthor}{Auteur}% ``Author'' if publisher = author
+% \end{macrocode}
+% From DP. They also require the original title after the
+% \fieldname{originalyear}. This is not implemented here.
+% \begin{macrocode}
+\renewcommand{\BOWP}{Oorspronkelijke editie}% Original work published
+\renewcommand{\BREPR}{Overgenomen uit}% Reprinted from
+%%
+%% THE NEXT FOUR ARE MY OWN TRANSLATIONS. CHECK!!!
+%% Websites and newsgroups; note the spaces.
+\renewcommand{\BAvailFrom}{Verkrijgbaar van\ }%
+%% The argument is the date on which it was last checked.
+\renewcommand{\BRetrieved}[1]{Op {#1} verkregen van\ }%
+\renewcommand{\BRetrievedFrom}{Verkregen van\ }%
+\renewcommand{\BMsgPostedTo}{Bericht geplaatst op\ }%
+%%
+%% Punctuation
+\renewcommand{\BBOP}{(}% opening parenthesis
+\renewcommand{\BBCP}{)}% closing parenthesis
+\renewcommand{\BBOQ}{}% opening quote for article title
+\renewcommand{\BBCQ}{}% closing quote for article title
+\renewcommand{\BBAA}{\&}% between authors in parenthetical cites and ref. list
+\renewcommand{\BBAB}{en}% between authors in in-text citation
+\renewcommand{\BAnd}{\&}% for ``Ed. \& Trans.'' in ref. list
+\DeclareRobustCommand{\BPBI}{.~}% Period between initials
+\DeclareRobustCommand{\BHBI}{.-}% Hyphen between initials
+\renewcommand{\BAP}{ }% after prefix, before first citation
+\renewcommand{\BBAY}{, }% between author(s) and year
+\renewcommand{\BBYY}{, }% between years of multiple citations with same author
+\renewcommand{\BBC}{; }% between cites
+\renewcommand{\BBN}{, }% before note
+%%
+%% No commas according to DP and SW. NTPG uses the US/APA comma.
+\renewcommand{\BCBT}{}% comma between authors in ref. list when no. of
+ %% authors = 2
+\renewcommand{\BCBL}{}% comma before last author when no. of authors > 2
+%% Remove excess space with the natbibapa option
+\if@APAC@natbib@apa
+ \renewcommand{\BBAY}{,}%
+ \renewcommand{\BBYY}{,}%
+ \renewcommand{\BBC}{;}%
+\fi
+%%
+%% Date formatting
+\renewcommand{\APACmonth}[1]{\ifcase #1\or januari\or februari\or maart\or
+ april\or mei\or juni\or juli\or augustus\or september\or oktober\or
+ november\or december\or winter\or lente\or zomer\or herfst\else
+ {#1}\fi}%
+\renewcommand{\APACrefYearMonthDay}[3]{%
+ {\BBOP}{#1}% year (+ addendum); should not be empty
+ \ifx\@empty#3\@empty
+ \ifx\@empty#2\@empty
+ \else
+ \unskip, {#2}% month
+ \fi
+ \else
+ \unskip, {#3}% day
+ \ifx\@empty#2\@empty
+ \else
+ \unskip~{#2}% month
+ \fi
+ \fi
+ {\BBCP}% closing parenthesis
+}%
+%% Some macros that transform a number (say, `2') to a ordinal one (`2nd')
+\renewcommand{\PrintOrdinal}[1]{%
+ \afterassignment\print@ordinal
+ \count@ 0#1\relax\@nil
+}%
+\def\print@ordinal#1#2\@nil{%
+ \ifx\relax#1\relax
+ \ifnum\count@>\z@
+ \CardinalNumeric\count@
+ \else
+ ??e%
+ \fi
+ \else
+ \ifnum \count@>\z@ \number\count@ \fi
+ #1#2\relax
+ \fi
+}%
+% \end{macrocode}
+% Dutch ordinal numbers are always obtained by simply putting an `e' after
+% the number, so this (and perhaps the code above) can be significantly
+% simplified. However, because I have trouble understanding this code (from
+% the \pkg{amsrefs} package) and experimenting did not give the expected
+% results, I won't mess with the code too much and stay close to the
+% English code.
+% \begin{macrocode}
+\renewcommand{\CardinalNumeric}[1]{%
+ \number#1\relax
+ \if
+ \ifnum#1<14
+ \ifnum#1>\thr@@ T\else F\fi
+ \else
+ F%
+ \fi
+ T%
+ e%
+ \else
+ \@xp\keep@last@digit\@xp#1\number#1\relax
+ \ifcase#1e\else e\fi
+ \fi
+}%
+% \end{macrocode}
+% Restore category code of |@| sign.
+% \begin{macrocode}
+\APACrestoreAtCode
+%</dutch>
+% \end{macrocode}
+%
+%
+%
+% \subsection{\fname{finnish.apc}}
+%
+% This file redefines the language-specific elements of \pkg{apacite}
+% for the Finnish language. Based on \citeA[Appendix~E]{KLO05}.
+%
+% \begin{macrocode}
+%<*finnish>
+%%
+%% finnish.apc - finnish version of apacite elements
+%% Written by Kari Pyykk\"o, with some minor edits by Erik Meijer.
+%%
+% \end{macrocode}
+% A fancy way to store and restore the category code of the |@| sign,
+% per Heiko Oberdiek.
+% \begin{macrocode}
+\edef\APACrestoreAtCode{%
+ \catcode`@=\the\catcode`@\relax
+}%
+\makeatletter
+\renewcommand{\onemaskedcitationmsg}[1]{%
+ \emph{(#1\ citation removed for masked review)}}% !!! CHANGE
+\renewcommand{\maskedcitationsmsg}[1]{%
+ \emph{(#1\ citations removed for masked review)}}% !!! CHANGE
+\renewcommand{\refname}{Viitteet}% Name of ref. list if it's a section.
+\renewcommand{\bibname}{Viitteet}% Name of ref. list if it's a chapter.
+\renewcommand{\authorindexname}{Tekij\"ahakemisto}% Name of Author Index
+%%
+%% A note before the references if a meta-analysis is reported.
+\renewcommand{\APACmetaprenote}{%
+ Viitteet merkitty t\"ahtimerkeill\"a osoittaen opintojen
+ sis\"altymist\"a meta-analyysiin.}%
+%%
+%% Commands for specific types of @misc entries.
+%%
+%% Msg
+\renewcommand{\bibmessage}{Sanoma}%
+%%
+%% Computer program
+\renewcommand{\bibcomputerprogram}{Tietokoneohjelma}%
+%%
+%% Computer program manual
+\renewcommand{\bibcomputerprogrammanual}{Tietokoneohjelman k\"asikirja}%
+%%
+%% Computer program and manual
+\renewcommand{\bibcomputerprogramandmanual}{Tietokoneohjelma ja k\"asikirja}%
+%%
+%% Computer software
+\renewcommand{\bibcomputersoftware}{Ohjelmisto}%
+%%
+%% Computer software manual
+\renewcommand{\bibcomputersoftwaremanual}{Ohjelmiston k\"asikirja}%
+%%
+%% Computer software and manual
+\renewcommand{\bibcomputersoftwareandmanual}{Ohjelmisto ja k\"asikirja}%
+%%
+%% Programming language
+\renewcommand{\bibprogramminglanguage}{Ohjelmointikieli}%
+%%
+%%
+%% Other labels
+%%
+%% n.d.
+\renewcommand{\bibnodate}{s.a.\hbox{}}% ``no date'', ``sine anno''
+%%
+%% in press
+\renewcommand{\BIP}{painossa}% % used as year for in-press citations
+%%
+%% et al.: ``and others'', not necessarily with a period
+\renewcommand{\BOthers}[1]{et al.\hbox{}}%
+%%
+%% et al.: ``and others'' with a period
+\renewcommand{\BOthersPeriod}[1]{et al.\hbox{}}%
+%%
+%% In
+\renewcommand{\BIn}{Teoksessa}% ``In'' editor...
+%%
+%% by
+\renewcommand{\Bby}{teoksesta}% ``by'' editor... (in reprints)
+%%
+%% Ed.
+\renewcommand{\BED}{toim.\hbox{}}% editor
+%%
+%% Eds.
+\renewcommand{\BEDS}{toim.\hbox{}}% editors
+%%
+%% Trans.
+\renewcommand{\BTRANS}{k\"a\"ant.\hbox{}}% translator
+%%
+%% Trans.
+\renewcommand{\BTRANSS}{k\"a\"ant.\hbox{}}% translators
+%%
+%% trans.
+\renewcommand{\BTRANSL}{k\"a\"an.\hbox{}}% translation, for the year field
+%%
+%% Chair
+\renewcommand{\BCHAIR}{pj.\hbox{}}% chair of symposium
+%%
+%% Chairs
+\renewcommand{\BCHAIRS}{pj.\hbox{}}% chairs
+%%
+%% Vol.
+\renewcommand{\BVOL}{osa}% volume
+%%
+%% Vols.
+\renewcommand{\BVOLS}{osat}% volumes
+%%
+%% No.
+\renewcommand{\BNUM}{nro}% number
+%%
+%% Nos.
+\renewcommand{\BNUMS}{nro}% numbers
+%%
+%% ed.
+\renewcommand{\BEd}{p.\hbox{}}% edition
+%%
+%% chap.
+\renewcommand{\BCHAP}{luku}% chapter
+%%
+%% chap.
+\renewcommand{\BCHAPS}{luvut}% chapters
+%%
+%% p.
+\renewcommand{\BPG}{s.\hbox{}}% page
+%%
+%% pp.
+\renewcommand{\BPGS}{s.\hbox{}}% pages
+%%
+%% Tech.\ Rep.
+\renewcommand{\BTR}{Tekn.\ rap.\hbox{}}% (default) technical report type name
+%%
+%% (default) PhD thesis type name
+\renewcommand{\BPhD}{V\"ait\"oskirja}%
+%%
+%% (default) unpublished PhD thesis type name
+\renewcommand{\BUPhD}{Julkaisematon v\"ait\"oskirja}%
+%%
+%% (default) master's thesis type name
+\renewcommand{\BMTh}{Pro gradu -tutkielma}%
+%%
+%% (default) unpublished master's thesis type name
+\renewcommand{\BUMTh}{Julkaisematon pro gradu -tutkielma}%
+%%
+\renewcommand{\BAuthor}{Tekij\"a}% ``Author'' if publisher = author
+%%
+%% Original work published
+\renewcommand{\BOWP}{Alkuaan julk.\hbox{}}%
+%%
+%% Reprinted from
+\renewcommand{\BREPR}{Uudelleen julk.\hbox{}}%
+%%
+%% (websites) Available from; note the space.
+\renewcommand{\BAvailFrom}{Saatavilla\ }%
+%%
+%% (websites) Retrieved ... from; note the space.
+%% The argument is the date on which it was last checked.
+\renewcommand{\BRetrieved}[1]{Lainattu {#1}, saatavilla\ }%
+\renewcommand{\BRetrievedFrom}{Lainattu saatavilla\ }%
+%%
+%% (newsgroups \& forums) Message posted to; note the space.
+\renewcommand{\BMsgPostedTo}{Viesti l\"ahetetty\ }%
+%%
+%% Punctuation
+\renewcommand{\BBOP}{(}% opening parenthesis
+\renewcommand{\BBCP}{)}% closing parenthesis
+\renewcommand{\BBOQ}{}% opening quote for article title
+\renewcommand{\BBCQ}{}% closing quote for article title
+\renewcommand{\BBAA}{\&}% between authors in parenthetical cites and ref. list
+%%
+%% and
+\renewcommand{\BBAB}{ja}% between authors in text
+%%
+\renewcommand{\BAnd}{\&}% for ``Ed. \& Trans.'' in ref. list
+\DeclareRobustCommand{\BPBI}{.~}% Period between initials
+\DeclareRobustCommand{\BHBI}{.-}% Hyphen between initials
+\renewcommand{\BAP}{ }% after prefix, before first citation
+\renewcommand{\BBAY}{, }% between author(s) and year
+\renewcommand{\BBYY}{, }% between years of multiple citations with same author
+\renewcommand{\BBC}{; }% between cites
+\renewcommand{\BBN}{, }% before note
+\renewcommand{\BCBT}{,}% comma between authors in ref. list when no. of
+ %% authors = 2
+\renewcommand{\BCBL}{,}% comma before last author when no. of authors > 2
+%% Remove excess space with the natbibapa option
+\if@APAC@natbib@apa
+ \renewcommand{\BBAY}{,}%
+ \renewcommand{\BBYY}{,}%
+ \renewcommand{\BBC}{;}%
+\fi
+%%
+%% Date formatting, adapted from babel's finnish.dtx
+\renewcommand{\APACmonth}[1]{\ifcase #1\or
+ tammikuuta\or helmikuuta\or maaliskuuta\or huhtikuuta\or
+ toukokuuta\or kes\"akuuta\or hein\"akuuta\or elokuuta\or
+ syyskuuta\or lokakuuta\or marraskuuta\or joulukuuta\or
+%% Winter Spring Summer Fall
+ talvea\or kev\"att\"a\or kes\"a\"a\or syksy\"a\else
+ {#1}\fi}%
+\renewcommand{\APACrefYearMonthDay}[3]{%
+ {\BBOP}{#1}% year (+ addendum); should not be empty
+ \ifx\@empty#3\@empty
+ \ifx\@empty#2\@empty
+ \else
+ \unskip, {#2}% month
+ \fi
+ \else
+ \unskip, {#3}.% day
+ \ifx\@empty#2\@empty
+ \else
+ \unskip~{#2}% month
+ \fi
+ \fi
+ {\BBCP}% closing parenthesis
+}%
+%%
+%% Some macros that transform a number (say, `2') to an ordinal one (`2nd')
+\renewcommand{\PrintOrdinal}[1]{%
+ \afterassignment\print@ordinal
+ \count@ 0#1\relax\@nil
+}%
+\def\print@ordinal#1#2\@nil{%
+ \ifx\relax#1\relax
+ \ifnum\count@>\z@
+ \CardinalNumeric\count@
+ \else
+ ??.%
+ \fi
+ \else
+ \ifnum \count@>\z@ \number\count@ \fi
+ #1#2\relax
+ \fi
+}%
+% \end{macrocode}
+% In Finnish, ordinal numbers are always obtained by simply
+% putting a period after the number. So I am reusing the German code here.
+% As mentioned in the section describing \fname{german.apc}, this (and perhaps
+% the code above) can then be significantly simplified, but, because I (EM)
+% have trouble understanding this code (from the \pkg{amsrefs} package) and
+% experimenting did not give the expected results, I won't mess with the code
+% too much and stay close to the English code.
+% \begin{macrocode}
+\renewcommand{\CardinalNumeric}[1]{%
+ \number#1\relax
+ \if
+ \ifnum#1<14
+ \ifnum#1>\thr@@ T\else F\fi
+ \else
+ F%
+ \fi
+ T%
+ .%
+ \else
+ \@xp\keep@last@digit\@xp#1\number#1\relax
+ \ifcase#1.\else .\fi
+ \fi
+}%
+% \end{macrocode}
+% Restore category code of |@| sign.
+% \begin{macrocode}
+\APACrestoreAtCode
+%</finnish>
+% \end{macrocode}
+%
+%
+% \subsection{\fname{french.apc}}
+%
+% This file redefines the language-specific elements of \pkg{apacite}
+% for the French language and its ``dialects'' in \pkg{babel}
+% terminology.
+%
+% \begin{macrocode}
+%<*french>
+%%
+%% french.apc - french version of apacite elements
+%% Adapted from english.apc by \'Eric Raufaste
+%%
+% \end{macrocode}
+% A fancy way to store and restore the category code of the |@| sign,
+% per Heiko Oberdiek.
+% \begin{macrocode}
+\edef\APACrestoreAtCode{%
+ \catcode`@=\the\catcode`@\relax
+}%
+\makeatletter
+\renewcommand{\onemaskedcitationmsg}[1]{%
+ \emph{(#1\ citation removed for masked review)}}% !!! CHANGE
+\renewcommand{\maskedcitationsmsg}[1]{%
+ \emph{(#1\ citations removed for masked review)}}% !!! CHANGE
+%%
+\renewcommand{\refname}{R\'ef\'erences}% Name of ref. list if it's a section.
+\renewcommand{\bibname}{R\'ef\'erences}% Name of ref. list if it's a chapter.
+%% The name (heading) of the Author Index
+\renewcommand{\authorindexname}{Index des auteurs}%
+%%
+%% A note before the references if a meta-analysis is reported.
+\renewcommand{\APACmetaprenote}{%
+ Les r\'ef\'erences marqu\'ees d'un ast\'erisque indiquent des \'etudes
+ incluses dans la m\'eta-analyse.}%
+%%
+%% Commands for specific types of @misc entries.
+\renewcommand{\bibmessage}{Msg}%
+\renewcommand{\bibcomputerprogram}{Logiciel}%
+\renewcommand{\bibcomputerprogrammanual}{Manuel de logiciel}%
+\renewcommand{\bibcomputerprogramandmanual}{Logiciel et manuel}%
+\renewcommand{\bibcomputersoftware}{Logiciel}%
+\renewcommand{\bibcomputersoftwaremanual}{Manuel de logiciel}%
+\renewcommand{\bibcomputersoftwareandmanual}{Logiciel et manuel}%
+\renewcommand{\bibprogramminglanguage}{Langage de programmation}%
+%%
+%% Other labels
+\renewcommand{\bibnodate}{s.~d.\hbox{}}% ``no date''
+\renewcommand{\BIP}{sous presse}% ``in press''
+\renewcommand{\BOthers}[1]{et al.\hbox{}}% ``and others''
+\renewcommand{\BOthersPeriod}[1]{et al.\hbox{}}% ``and others'' with a period
+\renewcommand{\BIn}{In}% % for ``In'' editor...
+\renewcommand{\Bby}{par}% % for ``by'' editor... (in reprints)
+\renewcommand{\BED}{Ed.\hbox{}}% % editor
+\renewcommand{\BEDS}{Eds.\hbox{}}% % editors
+\renewcommand{\BTRANS}{Trad.\hbox{}}% % translator
+\renewcommand{\BTRANSS}{Trad.\hbox{}}% % translators
+\renewcommand{\BTRANSL}{trad.\hbox{}}% % translation, for the year field
+\renewcommand{\BCHAIR}{Pr\'es.\hbox{}}% % chair of symposium
+\renewcommand{\BCHAIRS}{Pr\'es}% % chairs
+\renewcommand{\BVOL}{Vol.\hbox{}}% % volume
+\renewcommand{\BVOLS}{Vols.\hbox{}}% % volumes
+\renewcommand{\BNUM}{N\textsuperscript{o}}% % number
+\renewcommand{\BNUMS}{N\textsuperscript{os}}% numbers
+\renewcommand{\BEd}{\'ed.\hbox{}}% % edition
+\renewcommand{\BCHAP}{chap.\hbox{}}% % chapter
+\renewcommand{\BCHAPS}{chap.\hbox{}}% % chapters
+\renewcommand{\BPG}{p.\hbox{}}% % page
+\renewcommand{\BPGS}{pp.\hbox{}}% % pages
+%% Default technical report type name.
+\renewcommand{\BTR}{Rapport technique}%
+%% Default PhD thesis type name.
+\renewcommand{\BPhD}{Th\`ese de doctorat}%
+%% Default unpublished PhD thesis type name.
+\renewcommand{\BUPhD}{Th\`ese de doctorat non publi\'ee}%
+%% Default master's thesis type name.
+\renewcommand{\BMTh}{M\'emoire de Master}%
+%% Default unpublished master's thesis type name.
+\renewcommand{\BUMTh}{M\'emoire de Master non publi\'e}%
+%%
+\renewcommand{\BAuthor}{Auteur}%% Used if publisher = author
+\renewcommand{\BOWP}{\OE uvre originale publi\'ee en}%
+\renewcommand{\BREPR}{R\'eimprim\'e \`a partir de}%
+\renewcommand{\BAvailFrom}{Disponible sur\ }% Websites; note the space.
+%% Websites; note the space.
+%% The argument is the date on which it was last checked.
+\renewcommand{\BRetrieved}[1]{Consult\'e le {#1}, sur\ }%
+\renewcommand{\BRetrievedFrom}{Consult\'e sur\ }%
+\renewcommand{\BMsgPostedTo}{Message post\'e sur\ }% Messages; note the space.
+%%
+%% Punctuation
+\renewcommand{\BBOP}{(}% opening parenthesis
+\renewcommand{\BBCP}{)}% closing parenthesis
+\renewcommand{\BBOQ}{}% opening quote for article title
+\renewcommand{\BBCQ}{}% closing quote for article title
+\renewcommand{\BBAA}{\&}% between authors in parenthetical cites and ref. list
+\renewcommand{\BBAB}{et}% between authors in text
+\renewcommand{\BAnd}{\&}% for ``Ed. \& Trans.'' in ref. list
+\DeclareRobustCommand{\BPBI}{.~}% Period between initials
+\DeclareRobustCommand{\BHBI}{.-}% Hyphen between initials
+\renewcommand{\BAP}{ }% after prefix, before first citation
+\renewcommand{\BBAY}{, }% between author(s) and year
+\renewcommand{\BBYY}{, }% between years of multiple citations with same author
+\renewcommand{\BBC}{~; }% between cites
+\renewcommand{\BBN}{, }% before note
+\renewcommand{\BCBT}{,}% comma between authors in ref. list when no. of
+ %% authors = 2
+\renewcommand{\BCBL}{,}% comma before last author when no. of authors > 2
+%% Remove excess space with the natbibapa option
+\if@APAC@natbib@apa
+ \renewcommand{\BBAY}{,}%
+ \renewcommand{\BBYY}{,}%
+ \renewcommand{\BBC}{~;}%
+\fi
+%%
+%% Date formatting
+\renewcommand{\APACmonth}[1]{\ifcase #1\or janvier\or f\'evrier\or mars\or
+ avril\or mai\or juin\or juillet\or ao\^ut\or septembre\or octobre\or
+ novembre\or d\'ecembre\or hiver\or printemps\or \'et\'e\or automne\else
+ {#1}\fi}%
+%% Structure taken from definition of \today in frenchb.dtx
+\makeatletter
+\renewcommand{\APACrefYearMonthDay}[3]{%
+ {\BBOP}{#1}% year (+ addendum); should not be empty
+ \ifx\@empty#3\@empty
+ \ifx\@empty#2\@empty
+ \else
+ \unskip, {#2}% month
+ \fi
+ \else
+ \unskip, {#3}% day
+ \edef\APAC@tempa{#3}%
+ \edef\APAC@tempb{1}%
+ \ifx\APAC@tempa\APAC@tempb\@empty {\ier}\fi
+ \let\APAC@tempa\@undefined
+ \let\APAC@tempb\@undefined
+ %%
+ \ifx\@empty#2\@empty
+ \else
+ \unskip~{#2}% month
+ \fi
+ \fi
+ {\BBCP}% closing parenthesis
+}%
+%%
+%% Some macros that transform a number (say, `2') to an ordinal one (`2nd')
+% \end{macrocode}
+% Ordinal numbers should all be number + `\textsuperscript{e}',
+% except if number = 1, then it is ``1\textsuperscript{er}'' or
+% ``1\textsuperscript{re}''. \pkg{babel} provides the
+% commands \cmd{\ieme}, \cmd{\ier}, and \cmd{\iere} for formatting this.
+% We'll use these commands.
+%
+% \begin{macro}{\APACfirst}
+% \begin{macro}{\PrintOrdinalMale}
+% \pkg{apacite} only uses the ordinal numbers for edition numbers, and
+% the gender of ``\'edition'' is feminine, so we use the feminine form
+% ``1re'' by default. However, we put it in the macro \cmd{\APACfirst}.
+% Then we define \cmd{\PrintOrdinalMale} to redefine \cmd{\APACfirst}
+% to take the masculine form, then call \cmd{\PrintOrdinal}, and then
+% revert again, so that users can use this function for masculine words
+% (if desired).
+% \begin{macrocode}
+\DeclareRobustCommand{\APACfirst}{1\iere}%
+\DeclareRobustCommand{\PrintOrdinalMale}[1]{%
+ \DeclareRobustCommand{\APACfirst}{1\ier}%
+ \PrintOrdinal{#1}%
+ \DeclareRobustCommand{\APACfirst}{1\iere}%
+}%
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \begin{macrocode}
+\renewcommand{\PrintOrdinal}[1]{%
+ \afterassignment\print@ordinal
+ \count@ 0#1\relax\@nil
+}%
+\def\print@ordinal#1#2\@nil{%
+ \ifx\relax#1\relax
+ \ifnum\count@>\@ne
+ \CardinalNumeric\count@
+ \else
+ \ifnum1=\count@
+ {\APACfirst}%
+ \else
+ ??{\ieme}%
+ \fi
+ \fi
+ \else
+ \ifnum \count@>\z@ \number\count@ \fi
+ #1#2\relax
+ \fi
+}%
+\renewcommand{\CardinalNumeric}[1]{%
+ \number#1\relax
+ \if
+ \ifnum#1<14
+ \ifnum#1>\thr@@ T\else F\fi
+ \else
+ F%
+ \fi
+ T%
+ {\ieme}%
+ \else
+ \@xp\keep@last@digit\@xp#1\number#1\relax
+ \ifcase#1{\ieme}\else {\ieme}\fi
+ \fi
+}%
+%%
+%% In French, there should be a space before a colon `:', so we have to
+%% redefine a few macros that insert a colon.
+\renewcommand{\APACaddressPublisher}[2]{%
+ \ifx\@empty#1\@empty
+ %% publisher
+ \ifx\@empty#2\@empty
+ \else
+ {#2}%
+ \fi
+ %%
+ \else
+ %% address
+ {#1}%
+ %% publisher
+ \ifx\@empty#2\@empty
+ \else
+ \unskip{} : {#2}%
+ \fi
+ %%
+ \fi
+}%
+\let\APACaddressInstitution\APACaddressPublisher
+\renewcommand{\APACaddressPublisherEqAuth}[2]{%
+ \ifx\@empty#1\@empty
+ %% Publisher. This cannot be empty, because it is equal to the
+ %% author.
+ {\BAuthor{}}%
+ %%
+ \else
+ %% Address and publisher. These are not empty.
+ {#1\unskip{} : \BAuthor{}}%
+ %%
+ \fi
+}%
+\let\APACaddressInstitutionEqAuth\APACaddressPublisherEqAuth
+% \end{macrocode}
+% Restore category code of |@| sign.
+% \begin{macrocode}
+\APACrestoreAtCode
+%</french>
+% \end{macrocode}
+%
+%
+% \subsection{\fname{german.apc} and \fname{ngerman.apc}}
+%
+% This file redefines the language-specific elements of \pkg{apacite}
+% for the German language. These are based on the APA-inspired
+% instructions from the \citeA{DGPs07}. There is the traditional orthography
+% (`german') and the new orthography (`ngerman'), which are treated as
+% completely different languages by \pkg{babel} (unlike, e.g., the two
+% Norwegian languages), which presumably has technical reasons. We start
+% with `german'.
+%
+% \begin{macrocode}
+%<*german>
+%%
+%% german.apc - Deutsche Uebersetzung der Apacite-Elemente
+%% (German version of apacite elements)
+%% Written by Andreas Poege
+%% Some additions and adaptations by Erik Meijer.
+%%
+% \end{macrocode}
+% A fancy way to store and restore the category code of the |@| sign,
+% per Heiko Oberdiek.
+% \begin{macrocode}
+\edef\APACrestoreAtCode{%
+ \catcode`@=\the\catcode`@\relax
+}%
+\makeatletter
+\renewcommand{\onemaskedcitationmsg}[1]{%
+ \emph{(#1\ citation removed for masked review)}}% !!! CHANGE
+\renewcommand{\maskedcitationsmsg}[1]{%
+ \emph{(#1\ citations removed for masked review)}}% !!! CHANGE
+%% Bezeichnung fuer das Literaturverzeichnis, falls Section
+\renewcommand{\refname}{Literatur}%
+%% Bezeichnung fuer das Literaturverzeichnis, falls Chapter
+\renewcommand{\bibname}{Literaturverzeichnis}%
+%% Bezeichnung (heading) des Autorenverzeichnisses
+\renewcommand{\authorindexname}{Autorenregister}%
+%%
+%% Bemerkung vor Literaturangaben, falls eine Metaanalyse angegeben wurde
+\renewcommand{\APACmetaprenote}{Literaturangaben mit Stern kennzeichnen
+ Studien der Metaanalyse.}%
+%%
+%% Befehle fuer die speziellen @misc-Eintraege.
+\renewcommand{\bibmessage}{Msg.\hbox{}}% Newsgroup-, Internet-Messages
+\renewcommand{\bibcomputerprogram}{Computerprogramm}%
+\renewcommand{\bibcomputerprogrammanual}{Programm-Handbuch}%
+\renewcommand{\bibcomputerprogramandmanual}{Computerprogramm und Handbuch}%
+\renewcommand{\bibcomputersoftware}{Software}%
+\renewcommand{\bibcomputersoftwaremanual}{Software-Handbuch}%
+\renewcommand{\bibcomputersoftwareandmanual}{Software und Handbuch}%
+\renewcommand{\bibprogramminglanguage}{Programmiersprache}%
+%%
+%% Weitere Labels
+\renewcommand{\bibnodate}{o.\,J.\hbox{}}% "`ohne Jahresangabe"'
+\renewcommand{\BIP}{in Druck}% % Jahresangabe bei im Druck bef. Werken
+%%
+%% "`und andere"', das Argument beinhaltet einen Punkt, um einen weiteren im
+%% Literaturverzeichnis zu unterdruecken
+\renewcommand{\BOthers}[1]{et al.\hbox{}}%
+%% "`und andere"', das Argument beinhaltet einen Punkt, um einen weiteren im
+%% Literaturverzeichnis zu unterdruecken.
+\renewcommand{\BOthersPeriod}[1]{et al.\hbox{}}%
+%%
+\renewcommand{\BIn}{In}% % fuer "`In"' Herausgeber...
+\renewcommand{\Bby}{von}% % fuer "`von"' Herausgeber... (Nachdruck)
+\renewcommand{\BED}{Hrsg.\hbox{}}% % Herausgeber(in)
+\renewcommand{\BEDS}{Hrsg.\hbox{}}% % Herausgeber(innen)
+\renewcommand{\BTRANS}{\"Ubers.\hbox{}}%% Uebersetzer(in)
+\renewcommand{\BTRANSS}{\"Ubers.\hbox{}}% Uebersetzer(innen)
+\renewcommand{\BTRANSL}{\"Ubers.\hbox{}}% Uebersetzung (bei der Jahresangabe)
+\renewcommand{\BCHAIR}{Chair}% % Chair (bei Konferenzen)
+\renewcommand{\BCHAIRS}{Chairs}% % Chairs (bei Konferenzen)
+\renewcommand{\BVOL}{Bd.\hbox{}}% % Band
+\renewcommand{\BVOLS}{Bde.\hbox{}}% % Baende
+\renewcommand{\BNUM}{Nr.\hbox{}}% % Nummer
+\renewcommand{\BNUMS}{Nr.\hbox{}}% % Nummern
+\renewcommand{\BEd}{Aufl.\hbox{}}% % Auflage
+\renewcommand{\BCHAP}{Kap.\hbox{}}% % Kapitel
+\renewcommand{\BCHAPS}{Kap.\hbox{}}% % Kapitel
+\renewcommand{\BPG}{S.\hbox{}}% % Seite
+\renewcommand{\BPGS}{S.\hbox{}}% % Seiten
+%%
+%% (default) Bezeichnung fuer "`technical report"'
+\renewcommand{\BTR}{Bericht}%
+%% (default) Bezeichnung fuer Dissertation
+\renewcommand{\BPhD}{Dissertation}%
+%% (default) Bezeichnung fuer unveroeffentlichte Dissertation
+\renewcommand{\BUPhD}{Unver\"offentlichte Dissertation}%
+%% (default) Bezeichnung fuer Abschlussarbeit
+\renewcommand{\BMTh}{Diplomarbeit}%
+%% (default) Bezeichnung fuer unveroeffentlichte Abschlussarbeit
+\renewcommand{\BUMTh}{Unver\"offentlichte Diplomarbeit}%
+%%
+\renewcommand{\BAuthor}{Autor}% % ``Autor'' falls publisher = author
+\renewcommand{\BOWP}{Originalausgabe}% Originalausgabe
+\renewcommand{\BREPR}{Nachdruck von}% Nachdruck von
+%% Websites; note the spaces.
+\renewcommand{\BAvailFrom}{Verf\"ugbar unter\ }%
+%% The argument is the date on which it was last checked.
+\renewcommand{\BRetrieved}[1]{Zugriff am {#1} auf\ }%
+\renewcommand{\BRetrievedFrom}{Zugriff auf\ }%
+%% Note that here the English phrase is left untranslated in German.
+\renewcommand{\BMsgPostedTo}{Message posted to\ }%
+%%
+%% Deutsche Anpassung der Interpunktion und Formatierung
+\renewcommand{\BBOP}{(}% % Einleitende Klammer (default "(")
+\renewcommand{\BBCP}{)}% % Abschliessende Klammer (default ")")
+\renewcommand{\BBOQ}{}% % Einleitung v. Titel v. Artikel (default "")
+\renewcommand{\BBCQ}{}% % Abschluss v. Titel. von Artikel (default "")
+\renewcommand{\BBAA}{\&}%% Zwischen Autoren in Klammern (default "\&")
+\renewcommand{\BBAB}{und}% Zwischen Autoren im Text
+\renewcommand{\BAnd}{\&}%% Zwischen Hg. und Uebers., falls gleich (default "\&")
+\DeclareRobustCommand{\BPBI}{.~}% Period between initials
+\DeclareRobustCommand{\BHBI}{.-}% Hyphen between initials
+\renewcommand{\BAP}{ }% % Zeichen zw. Prefix und Zitat (default Leerzeichen)
+\renewcommand{\BBAY}{, }% Zwischen Autoren und Jahr(en) (default ", ")
+\renewcommand{\BBYY}{, }% Zwischen Jahren, wenn ein Author und mehrere Jahre
+\renewcommand{\BBC}{; }% Zwischen Autoren (mehrere Zitate) (default "; ")
+\renewcommand{\BBN}{, }% Zwischen Zitat und Postfix (default ", ")
+\renewcommand{\BCBT}{}% Zwischen 2 Autoren (zus. zu "&", default ",")
+\renewcommand{\BCBL}{}% Zwischen 3 o. mehr Autoren (zus. zu "&", default ",")
+%% Remove excess space with the natbibapa option
+\if@APAC@natbib@apa
+ \renewcommand{\BBAY}{,}%
+ \renewcommand{\BBYY}{,}%
+ \renewcommand{\BBC}{;}%
+\fi
+%%
+%% Date formatting, adapted from babel's germanb.dtx
+\renewcommand{\APACmonth}[1]{\ifcase #1\or
+ Januar\or Februar\or M\"arz\or April\or Mai\or Juni\or
+ Juli\or August\or September\or Oktober\or November\or Dezember\or
+ Winter\or Fr\"uhjahr\or Sommer\or Herbst\else {#1}\fi}%
+\renewcommand{\APACrefYearMonthDay}[3]{%
+ {\BBOP}{#1}% year (+ addendum); should not be empty
+ \ifx\@empty#3\@empty
+ \ifx\@empty#2\@empty
+ \else
+ \unskip, {#2}% month
+ \fi
+ \else
+ \unskip, {#3}.% day
+ \ifx\@empty#2\@empty
+ \else
+ \unskip~{#2}% month
+ \fi
+ \fi
+ {\BBCP}% closing parenthesis
+}%
+%% Some macros that transform a number (say, `2') to an ordinal one (`2nd'),
+%% adapted from amsrefs.dtx
+\renewcommand{\PrintOrdinal}[1]{%
+ \afterassignment\print@ordinal
+ \count@ 0#1\relax\@nil
+}%
+\def\print@ordinal#1#2\@nil{%
+ \ifx\relax#1\relax
+ \ifnum\count@>\z@
+ \CardinalNumeric\count@
+ \else
+ ??.%
+ \fi
+ \else
+ \ifnum \count@>\z@ \number\count@ \fi
+ #1#2\relax
+ \fi
+}%
+% \end{macrocode}
+% German ordinal numbers are always obtained by simply putting a period after
+% the number, so this (and perhaps the code above) can be significantly
+% simplified. However, because I (EM) have trouble understanding this code (from
+% the \pkg{amsrefs} package) and experimenting did not give the expected
+% results, I won't mess with the code too much and stay close to the
+% English code.
+% \begin{macrocode}
+\renewcommand{\CardinalNumeric}[1]{%
+ \number#1\relax
+ \if
+ \ifnum#1<14
+ \ifnum#1>\thr@@ T\else F\fi
+ \else
+ F%
+ \fi
+ T%
+ .%
+ \else
+ \@xp\keep@last@digit\@xp#1\number#1\relax
+ \ifcase#1.\else .\fi
+ \fi
+}%
+% \end{macrocode}
+% The DGPs puts a space between the volume and the issue number,
+% unlike the APA. So we have to slightly adapt this command.
+% (|#1| = journal, |#2| = volume, |#3| = number, |#4| = formatted pages).
+% \begin{macrocode}
+\renewcommand{\APACjournalVolNumPages}[4]{%
+ \Bem{#1}% journal
+ \ifx\@empty#2\@empty
+ \else
+ \unskip, \Bem{#2}% volume
+ \fi
+ \ifx\@empty#3\@empty
+ \else
+ \unskip\ ({#3})% issue number, with the added leading space
+ \fi
+ \ifx\@empty#4\@empty
+ \else
+ \unskip, {#4}% pages
+ \fi
+}%
+% \end{macrocode}
+% Presumably, for the original journal information of a reprint, a similar
+% space needs to be added.
+% Arguments: |#1| = year, |#2| = journal, |#3| = volume, |#4| = issue number,
+% |#5| = formatted pages, |#6| = note.
+% \begin{macrocode}
+\renewcommand{\APACorigjournalnote}[6]{%
+ (\BREPR{} % ``(Reprinted from '' (note the space)
+ \Bem{#2}% Journal (should not be empty)
+ \ifx\@empty#1\@empty
+ \else
+ \unskip, {#1}% , year
+ \fi
+ \ifx\@empty#3\@empty
+ \else
+ \unskip, \Bem{#3}% , volume
+ \fi
+ \ifx\@empty#4\@empty
+ \else
+ \unskip\ {[#4]}% \ [issue number]
+ \fi
+ \ifx\@empty#5\@empty
+ \else
+ \unskip, {#5}% , pages
+ \fi
+ \ifx\@empty#6\@empty
+ \else
+ \unskip; {#6}% ; note
+ \fi
+ )% Final parenthesis
+}%
+% \end{macrocode}
+% Differences between Austrian and German. (Apparently only the name of
+% January---``J\"anner'' vs.\ ``Januar''.)
+% \begin{macrocode}
+\edef\APACaustrian{\string austrian}%
+\ifx\languagename\APACaustrian
+ \renewcommand{\APACmonth}[1]{\ifcase #1\or
+ J\"anner\or Februar\or M\"arz\or April\or Mai\or Juni\or
+ Juli\or August\or September\or Oktober\or November\or Dezember\or
+ Winter\or Fr\"uhjahr\or Sommer\or Herbst\else {#1}\fi}%
+\fi
+\let\APACaustrian\undefined
+% \end{macrocode}
+% Restore category code of |@| sign.
+% \begin{macrocode}
+\APACrestoreAtCode
+%</german>
+% \end{macrocode}
+%
+%
+% Now, the file for the new orthography. Apparently, \fname{german.apc}
+% can also be used for the new orthography, so this is a very brief one:
+%
+% \begin{macrocode}
+%<*ngerman>
+%%
+%% ngerman.apc - german translation of apacite elements (new orthography)
+%% Written by Erik Meijer, based on instructions of Andreas Poege.
+%%
+%% According to Andreas Poege, his file german.apc can also be used
+%% for the new orthography, so I'll just do this:
+%%
+\input{german.apc}%
+%%
+% \end{macrocode}
+% Differences between Austrian and German. (Apparently only the name of
+% January---``J\"anner'' vs.\ ``Januar''.) This is not picked up in
+% \fname{german.apc}, because that file only checks for ``austrian'',
+% not for ``naustrian'', so we have to copy it here.
+% \begin{macrocode}
+\edef\APACaustrian{\string naustrian}%
+\ifx\languagename\APACaustrian
+ \renewcommand{\APACmonth}[1]{\ifcase #1\or
+ J\"anner\or Februar\or M\"arz\or April\or Mai\or Juni\or
+ Juli\or August\or September\or Oktober\or November\or Dezember\or
+ Winter\or Fr\"uhjahr\or Sommer\or Herbst\else {#1}\fi}%
+\fi
+\let\APACaustrian\undefined
+%%
+%%
+%</ngerman>
+% \end{macrocode}
+%
+%
+% \subsection{\fname{greek.apc}}
+%
+% This file redefines the language-specific elements of \pkg{apacite}
+% for the Greek language.
+%
+% \begin{macrocode}
+%<*greek>
+%%
+%% greek.apc - Greek version of apacite elements
+%% Greek translations by Athanassios Protopapas and Ioannis Dimakos
+%%
+% \end{macrocode}
+% A fancy way to store and restore the category code of the |@| sign,
+% per Heiko Oberdiek.
+% \begin{macrocode}
+\edef\APACrestoreAtCode{%
+ \catcode`@=\the\catcode`@\relax
+}%
+\makeatletter
+\renewcommand{\onemaskedcitationmsg}[1]{%
+ \emph{(#1\ citation removed for masked review)}}% !!! CHANGE
+\renewcommand{\maskedcitationsmsg}[1]{%
+ \emph{(#1\ citations removed for masked review)}}% !!! CHANGE
+%% Name of ref. list if it's a section.
+\renewcommand{\refname}{\textgreek{Bibliograf'ia}}%
+%% Name of ref. list if it's a chapter.
+\renewcommand{\bibname}{\textgreek{Bibliograf'ia}}%
+%% The name (heading) of the Author Index
+\renewcommand{\authorindexname}{\textgreek{Euret'hrio suggraf'ewn}}%
+%%
+%% A note before the references if a meta-analysis is reported.
+\renewcommand{\APACmetaprenote}{%
+ \textgreek{Oi ergas'iec pou sumperilamb'anontai sth meta-an'alush
+ shmei'wnontai me aster'isko}.}%
+%%
+%% Commands for specific types of @misc entries.
+\renewcommand{\bibmessage}{\textgreek{M'hnuma}}%
+\renewcommand{\bibcomputerprogram}{\textgreek{Logismik'o}}%
+\renewcommand{\bibcomputerprogrammanual}{%
+ \textgreek{Egqeir'idio logismiko'u}}%
+\renewcommand{\bibcomputerprogramandmanual}{%
+ \textgreek{Logismik'o kai egqeir'idio}}%
+\renewcommand{\bibcomputersoftware}{\textgreek{Logismik'o}}%
+\renewcommand{\bibcomputersoftwaremanual}{%
+ \textgreek{Egqeir'idio logismiko'u}}%
+\renewcommand{\bibcomputersoftwareandmanual}{%
+ \textgreek{Logismik'o kai egqeir'idio}}%
+\renewcommand{\bibprogramminglanguage}{%
+ \textgreek{Gl'wssa programmatismo'u}}%
+%%
+%% Other labels
+\renewcommand{\bibnodate}{\textgreek{qwr'ic hmeromhn'ia}}% ``no date''
+\renewcommand{\BIP}{\textgreek{up'o 'ekdosh}}% % ``in press''
+\renewcommand{\BOthers}[1]{\textgreek{k.\ sun.\hbox{}}}% ``and others''
+%% ``and others'' with a period
+\renewcommand{\BOthersPeriod}[1]{\textgreek{k.\ sun.\hbox{}}}%
+\renewcommand{\BIn}{\textgreek{Sto}}%% for ``In'' editor...
+% \end{macrocode}
+% The current command \cmd{\Bby} is problematic for application in Greek.
+% If it is followed by 1 male editor, then it should be ``|\textgreek{toy}|'';
+% in the case of 1 female editor, it should be ``|\textgreek{ths}|''; with
+% multiple editors, ``|\textgreek{twn}|'' is the correct translation. For
+% the moment, let's use the latter, which is gender-neutral and perhaps the
+% most common one. Note that a user can apply the sort of tricks that we
+% used in section~\ref{sec:xmpl} (Example~69) to make a one-time change to
+% the definition of \cmd{\Bby}. See the command \cmd{\bibInstring} in
+% section~\ref{sec:apacdoc}.
+% \begin{macrocode}
+\renewcommand{\Bby}{\textgreek{twn}}% for ``by'' editor... (in reprints)
+\renewcommand{\BED}{\textgreek{Epim.\hbox{}}}% % editor
+\renewcommand{\BEDS}{\textgreek{Epim.\hbox{}}}% % editors
+\renewcommand{\BTRANS}{\textgreek{Mtf.\hbox{}}}% % translator
+\renewcommand{\BTRANSS}{\textgreek{Mtf.\hbox{}}}%% translators
+\renewcommand{\BTRANSL}{\textgreek{mtf.\hbox{}}}%% translation
+\renewcommand{\BCHAIR}{\textgreek{Pr'oedroc}}% % chair of symposium
+\renewcommand{\BCHAIRS}{\textgreek{Pr'oedroi}}% % chairs
+\renewcommand{\BVOL}{\textgreek{t.\hbox{}}}% % volume
+\renewcommand{\BVOLS}{\textgreek{t.\hbox{}}}% % volumes
+\renewcommand{\BNUM}{\textgreek{ar.\hbox{}}}% % number
+\renewcommand{\BNUMS}{\textgreek{ar.\hbox{}}}% % numbers
+\renewcommand{\BEd}{\textgreek{'ekd.\hbox{}}}% % edition
+\renewcommand{\BCHAP}{\textgreek{kef.\hbox{}}}% % chapter
+\renewcommand{\BCHAPS}{\textgreek{kef.\hbox{}}}% % chapters
+\renewcommand{\BPG}{\textgreek{sel.\hbox{}}}% % page
+\renewcommand{\BPGS}{\textgreek{sel.\hbox{}}}% % pages
+%% Default technical report type name.
+\renewcommand{\BTR}{\textgreek{Teq.\ 'ekj.\hbox{}}}%
+%% Default PhD thesis type name.
+\renewcommand{\BPhD}{\textgreek{Didaktorik'h diatrib'h}}%
+%% (default) unpublished PhD thesis type name
+\renewcommand{\BUPhD}{\textgreek{Adhmos'ieuth didaktorik'h diatrib'h}}%
+%% (default) master's thesis type name
+\renewcommand{\BMTh}{\textgreek{Metaptuqiak'h diplwmatik'h ergas'ia}}%
+%% (default) unpublished master's thesis type name
+\renewcommand{\BUMTh}{%
+ \textgreek{Adhmos'ieuth metaptuqiak'h diplwmatik'h ergas'ia}}%
+%% ``Author'' if publisher = author
+\renewcommand{\BAuthor}{\textgreek{Auto'ekdosh}}%
+%% Original work published
+\renewcommand{\BOWP}{\textgreek{'Ekdosh prwtot'upou}}%
+%% Reprinted from
+\renewcommand{\BREPR}{\textgreek{Anat'upwsh ap'o}}%
+%% Websites; note the explicit spaces.
+\renewcommand{\BAvailFrom}{\textgreek{Diaj'esimo ap'o}\ }% Available from
+%% Retrieved ... from
+%% The argument is the date on which it was last checked.
+%% Correct only when ``date'' is full, not just month or year
+\renewcommand{\BRetrieved}[1]{%
+ \textgreek{Anakt'hjhke stis} {#1}, \textgreek{ap'o}\ }%
+\renewcommand{\BRetrievedFrom}{%
+ \textgreek{Anakt'hjhke stis} \textgreek{ap'o}\ }%
+% \end{macrocode}
+% If a URL follows without any leading words/phrase then this string
+% should be OK. If there is any other word before the URL then we
+% need to know its gender and number in order to produce the correct
+% translation. In the current \pkg{apacite} implementation, this is only
+% used with a URL immediately following, so we should be OK.
+% \begin{macrocode}
+%% Newsgroups, forums, etc.; ``Message posted to ''; note the space.
+\renewcommand{\BMsgPostedTo}{\textgreek{M'hnyma anarthm'eno se}\ }%
+%%
+%% Punctuation
+\renewcommand{\BBOP}{(}% opening parenthesis
+\renewcommand{\BBCP}{)}% closing parenthesis
+\renewcommand{\BBOQ}{}% opening quote for article title
+\renewcommand{\BBCQ}{}% closing quote for article title
+\renewcommand{\BBAA}{\&}% between authors in parenthetical cites and ref. list
+\renewcommand{\BBAB}{\textgreek{kai}}% between authors in text
+\renewcommand{\BAnd}{\&}% for ``Ed. \& Trans.'' in ref. list
+\DeclareRobustCommand{\BPBI}{.~}% Period between initials
+\DeclareRobustCommand{\BHBI}{.-}% Hyphen between initials
+\renewcommand{\BAP}{ }% after prefix, before first citation
+\renewcommand{\BBAY}{, }% between author(s) and year
+\renewcommand{\BBYY}{, }% between years of multiple citations with same author
+\renewcommand{\BBC}{; }% between cites
+\renewcommand{\BBN}{, }% before note
+\renewcommand{\BCBT}{,}% comma between authors in ref. list when no. of
+ %% authors = 2
+\renewcommand{\BCBL}{,}% comma before last author when no. of authors > 2
+%% Remove excess space with the natbibapa option
+\if@APAC@natbib@apa
+ \renewcommand{\BBAY}{,}%
+ \renewcommand{\BBYY}{,}%
+ \renewcommand{\BBC}{;}%
+\fi
+%%
+%% Date formatting. Adapted from babel's greek.dtx
+\renewcommand{\APACmonth}[1]{\textgreek{\ifcase #1\or
+ Ianouar'iou\or Febrouar'iou\or Mart'iou\or April'iou\or
+ Ma'"iou\or Ioun'iou\or Ioul'iou\or Augo'ustou\or
+ Septembr'iou\or Oktwbr'iou\or Noembr'iou\or Dekembr'iou\or
+ Qeim'wnas\or 'Anoixh\or Kaloka'iri\or Fjin'opwro\else
+ {#1}\fi}}%
+\renewcommand{\APACrefYearMonthDay}[3]{%
+ {\BBOP}{#1}% year (+ addendum); should not be empty
+ \ifx\@empty#3\@empty
+ \ifx\@empty#2\@empty
+ \else
+ \unskip, {#2}% month
+ \fi
+ \else
+ \unskip, {#3}% day
+ \ifx\@empty#2\@empty
+ \else
+ \unskip~{#2}% month
+ \fi
+ \fi
+ {\BBCP}% closing parenthesis
+}%
+%%
+% \end{macrocode}
+% The ordinal numbers are used only for editions in the current version of
+% \pkg{apacite}. Hence, we simply tag a ``|\textgreek{h}|'' to the number.
+% We could provide alternative versions later on if desired (see, e.g.,
+% \fname{french.apc}).
+% \begin{macrocode}
+%% Some macros that transform a number (say, `2') to an ordinal one (`2h').
+\renewcommand{\PrintOrdinal}[1]{%
+ \afterassignment\print@ordinal
+ \count@ 0#1\relax\@nil
+}%
+\def\print@ordinal#1#2\@nil{%
+ \ifx\relax#1\relax
+ \ifnum\count@>\z@
+ \CardinalNumeric\count@
+ \else
+ ??\textgreek{h}%
+ \fi
+ \else
+ \ifnum \count@>\z@ \number\count@ \fi
+ #1#2\relax
+ \fi
+}%
+\renewcommand{\CardinalNumeric}[1]{%
+ \number#1\relax
+ \if
+ \ifnum#1<14
+ \ifnum#1>\thr@@ T\else F\fi
+ \else
+ F%
+ \fi
+ T%
+ \textgreek{h}%
+ \else
+ \@xp\keep@last@digit\@xp#1\number#1\relax
+ \ifcase#1\textgreek{h}\or \textgreek{h}\else \textgreek{h}\fi
+ \fi
+}%
+% \end{macrocode}
+% Restore category code of |@| sign.
+% \begin{macrocode}
+\APACrestoreAtCode
+%</greek>
+% \end{macrocode}
+%
+%
+% \subsection{\fname{norsk.apc}}
+%
+% This file redefines the language-specific elements of \pkg{apacite}
+% for both Norwegian languages (Bokm{\aa}l and Nynorsk). In \pkg{babel}'s
+% setup, `norsk' is Bokm{\aa}l and `nynorsk' is a dialect of `norsk'.
+% This does not seem to reflect the relation between these languages
+% very well, but for compatibility with \pkg{babel} we use the same
+% file structure, i.e., \fname{norsk.apc} defines both languages.
+%
+% There are no official Norwegian translations of APA style. Some ideas
+% for this translation have been taken from \citeA{UIB08} and \citeA{UiO06}.
+%
+% \begin{macrocode}
+%<*norsk>
+%%
+%% norsk.apc - Norwegian Bokmal & Nynorsk versions of apacite elements.
+%% Version 1.1.
+%% Written by Karl Ove Hufthammer.
+%%
+% \end{macrocode}
+% A fancy way to store and restore the category code of the |@| sign,
+% per Heiko Oberdiek.
+% \begin{macrocode}
+\edef\APACrestoreAtCode{%
+ \catcode`@=\the\catcode`@\relax
+}%
+\makeatletter
+\renewcommand{\onemaskedcitationmsg}[1]{%
+ \emph{(#1\ citation removed for masked review)}}% !!! CHANGE
+\renewcommand{\maskedcitationsmsg}[1]{%
+ \emph{(#1\ citations removed for masked review)}}% !!! CHANGE
+\renewcommand{\refname}{Referanser}% Name of ref. list if it's a section.
+\renewcommand{\bibname}{Referanser}% Name of ref. list if it's a chapter.
+%% The name (heading) of the Author Index
+\renewcommand{\authorindexname}{Forfatterregister}%
+%%
+%% A note before the references if a meta-analysis is reported.
+\renewcommand{\APACmetaprenote}{%
+ Referanser merket med en stjerne viser til studier som er med i
+ metaanalysen.}
+%%
+%% Commands for specific types of @misc entries.
+\renewcommand{\bibmessage}{innlegg}%
+\renewcommand{\bibcomputerprogram}{dataprogram}%
+\renewcommand{\bibcomputerprogrammanual}{dataprogramh\aa ndbok}%
+\renewcommand{\bibcomputerprogramandmanual}{dataprogram og brukerh\aa ndbok}%
+\renewcommand{\bibcomputersoftware}{programvare}%
+\renewcommand{\bibcomputersoftwaremanual}{programvareh\aa ndbok}%
+\renewcommand{\bibcomputersoftwareandmanual}{programvare og brukerh\aa ndbok}%
+\renewcommand{\bibprogramminglanguage}{programmeringsspr\aa k}%
+%%
+%% Other labels
+\renewcommand{\bibnodate}{u.d.\hbox{}}% ``no date''
+\renewcommand{\BIP}{under publisering}% ``in press''
+\renewcommand{\BOthers}[1]{et al.\hbox{}}% ``and others''
+\renewcommand{\BOthersPeriod}[1]{et al.\hbox{}}% ``and others'', with a period
+\renewcommand{\BIn}{I}% % for ``In'' editor...
+\renewcommand{\Bby}{av}% % for ``by'' editor... (in reprints)
+\renewcommand{\BED}{red.\hbox{}}% % editor
+\renewcommand{\BEDS}{red.\hbox{}}% % editors
+\renewcommand{\BTRANS}{oms.\hbox{}}% % translator
+\renewcommand{\BTRANSS}{oms.\hbox{}}% % translators
+\renewcommand{\BTRANSL}{oms.\hbox{}}% % translation, for the year field
+\renewcommand{\BCHAIR}{ordstyrer}% % chair of symposium
+\renewcommand{\BCHAIRS}{ordstyrere}% % chairs
+\renewcommand{\BVOL}{vol.\hbox{}}% % volume
+\renewcommand{\BVOLS}{vol.\hbox{}}% % volumes
+\renewcommand{\BNUM}{nr.\hbox{}}% % number
+\renewcommand{\BNUMS}{nr.\hbox{}}% % numbers
+\renewcommand{\BEd}{utg.\hbox{}}% % edition
+\renewcommand{\BCHAP}{kap.\hbox{}}% % chapter
+\renewcommand{\BCHAPS}{kap.\hbox{}}% % chapters
+\renewcommand{\BPG}{s.\hbox{}}% % page
+\renewcommand{\BPGS}{s.\hbox{}}% % pages
+%% Default technical report type name.
+\renewcommand{\BTR}{Teknisk rapport}%
+%% Default PhD thesis type name.
+\renewcommand{\BPhD}{Akademisk avhandling}%
+%% Default unpublished PhD thesis type name.
+\renewcommand{\BUPhD}{Upublisert akademisk avhandling}%
+%% Default master's thesis type name.
+\renewcommand{\BMTh}{Masteroppgave}%
+%% Default unpublished master's thesis type name.
+\renewcommand{\BUMTh}{Upublisert masteroppgave}%
+%%
+\renewcommand{\BAuthor}{Forfatter}% ``Author'' if publisher = author
+\renewcommand{\BOWP}{Original publisert}% Original work published
+\renewcommand{\BREPR}{Opptrykk fra}% Reprinted from
+\renewcommand{\BAvailFrom}{Tilgjengelig fra\ }% Websites; note the space.
+%% The argument is the date on which it was last checked.
+\renewcommand{\BRetrieved}[1]{Hentet {#1} fra\ }% Websites; note the space.
+\renewcommand{\BRetrievedFrom}{Hentet fra\ }% Websites; note the space.
+\renewcommand{\BMsgPostedTo}{Innlegg p\aa \ }% Messages; note the space.
+% \end{macrocode}
+% To be in line with Norwegian rules of punctuation, a comma is never
+% used before `\&' or ``and'', and there is no space between initials.
+% \begin{macrocode}
+%%
+%% Punctuation
+\renewcommand{\BBOP}{(}% opening parenthesis
+\renewcommand{\BBCP}{)}% closing parenthesis
+\renewcommand{\BBOQ}{}% opening quote for article title
+\renewcommand{\BBCQ}{}% closing quote for article title
+\renewcommand{\BBAA}{\&}% between authors in parenthetical cites and ref. list
+\renewcommand{\BBAB}{og}% between authors in text
+\renewcommand{\BAnd}{\&}% for ``Ed. \& Trans.'' in ref. list
+\DeclareRobustCommand{\BPBI}{.}% Period between initials; no space
+\DeclareRobustCommand{\BHBI}{.-}% Hyphen between initials
+\renewcommand{\BAP}{ }% after prefix, before first citation
+\renewcommand{\BBAY}{, }% between author(s) and year
+\renewcommand{\BBYY}{, }% between years of multiple citations with same author
+\renewcommand{\BBC}{; }% between cites
+\renewcommand{\BBN}{, }% before note
+\renewcommand{\BCBT}{}% no comma between authors in ref. list when no. of
+ %% authors = 2
+\renewcommand{\BCBL}{}% no comma before last author when no. of authors > 2
+%% Remove excess space with the natbibapa option
+\if@APAC@natbib@apa
+ \renewcommand{\BBAY}{,}%
+ \renewcommand{\BBYY}{,}%
+ \renewcommand{\BBC}{;}%
+\fi
+%%
+%% Date formatting; adapted from babel's norsk.dtx
+\renewcommand{\APACmonth}[1]{\ifcase #1\or
+ januar\or februar\or mars\or april\or mai\or juni\or
+ juli\or august\or september\or oktober\or november\or desember\or
+ vinter\or v{\aa}r\or sommer\or h{\o}st\else
+ {#1}\fi}%
+\renewcommand{\APACrefYearMonthDay}[3]{%
+ {\BBOP}{#1}% year (+ addendum); should not be empty
+ \ifx\@empty#3\@empty
+ \ifx\@empty#2\@empty
+ \else
+ \unskip, {#2}% month
+ \fi
+ \else
+ \unskip, {#3}.% day
+ \ifx\@empty#2\@empty
+ \else
+ \unskip~{#2}% month
+ \fi
+ \fi
+ {\BBCP}% closing parenthesis
+}%
+%% Some macros that transform a number (say, `2') to an ordinal one (`2nd')
+\renewcommand{\PrintOrdinal}[1]{%
+ \afterassignment\print@ordinal
+ \count@ 0#1\relax\@nil
+}%
+\def\print@ordinal#1#2\@nil{%
+ \ifx\relax#1\relax
+ \ifnum\count@>\z@
+ \CardinalNumeric\count@
+ \else
+ ??.%
+ \fi
+ \else
+ \ifnum \count@>\z@ \number\count@ \fi
+ #1#2\relax
+ \fi
+}%
+% \end{macrocode}
+% Norwegian ordinal numbers are always obtained by simply putting a period
+% after the number, so this (and perhaps the code above) can be significantly
+% simplified. However, because I (EM) have trouble understanding this code (from
+% the \pkg{amsrefs} package) and experimenting did not give the expected
+% results, I won't mess with the code too much and stay close to the
+% English code.
+% \begin{macrocode}
+\renewcommand{\CardinalNumeric}[1]{%
+ \number#1\relax
+ \if
+ \ifnum#1<14
+ \ifnum#1>\thr@@ T\else F\fi
+ \else
+ F%
+ \fi
+ T%
+ .%
+ \else
+ \@xp\keep@last@digit\@xp#1\number#1\relax
+ \ifcase#1.\else .\fi
+ \fi
+}%
+%%
+%% Differences between norsk (bokmal) and nynorsk.
+\edef\APACnynorsk{\string nynorsk}%
+\ifx\languagename\APACnynorsk
+ \renewcommand{\refname}{Referansar}% Name of ref. list if it's a section.
+ \renewcommand{\bibname}{Referansar}% Name of ref. list if it's a chapter.
+ \renewcommand{\authorindexname}{Forfattarregister}%
+ \renewcommand{\APACmetaprenote}{%
+ Referansar merkte med ei stjerne viser til studiar som er med i
+ metaanalysen.}%
+ \renewcommand{\bibcomputerprogrammanual}{dataprogramhandbok}%
+ \renewcommand{\bibcomputerprogramandmanual}{dataprogram og brukarhandbok}%
+ \renewcommand{\bibcomputersoftwaremanual}{programvarehandbok}%
+ \renewcommand{\bibcomputersoftwareandmanual}{programvare og brukarhandbok}%
+ \renewcommand{\BCHAIR}{ordstyrar}% % chair of symposium
+ \renewcommand{\BCHAIRS}{ordstyrarar}% % chairs
+ %% Default master's thesis type name.
+ \renewcommand{\BMTh}{Masteroppg\aa ve}%
+ %% Default unpublished master's thesis type name.
+ \renewcommand{\BUMTh}{Upublisert masteroppg\aa ve}%
+ \renewcommand{\BAuthor}{Forfattar}% ``Author'' if publisher = author
+ \renewcommand{\BREPR}{Opptrykk fr\aa }% Reprinted from
+ \renewcommand{\BAvailFrom}{Tilgjengeleg fr\aa \ }% Websites; note the space.
+ \renewcommand{\BRetrieved}[1]{Henta {#1} fr\aa \ }% Websites; note the space.
+ \renewcommand{\APACmonth}[1]{\ifcase #1\or
+ januar\or februar\or mars\or april\or mai\or juni\or
+ juli\or august\or september\or oktober\or november\or desember\or
+ vinter\or v{\aa}r\or sommar\or haust\else
+ {#1}\fi}%
+\fi
+\let\APACnynorsk\undefined
+% \end{macrocode}
+% Restore category code of |@| sign.
+% \begin{macrocode}
+\APACrestoreAtCode
+%</norsk>
+% \end{macrocode}
+%
+%
+% \subsection{\fname{spanish.apc}}
+%
+% This file redefines the language-specific elements of \pkg{apacite}
+% for the Spanish language. Note that \pkg{apacite}'s usage of |<| and
+% |>| for pre-notes, as in |\cite<e.g.,>{jones06}| (inherited from its
+% predecessor, \fname{theapa.sty}), conflicts with \pkg{babel}'s
+% \pkgoption{spanish} option, which makes |<| and |>| active characters.
+% Hence, either you must avoid using prenotes with \pkg{apacite}'s
+% construction or you must disable \pkg{babel}'s behavior by inserting
+% the command \cmd{\deactivatequoting} after loading \pkg{babel}.
+%
+% \begin{macrocode}
+%<*spanish>
+%%
+%% spanish.apc - Versi\'on espa\~nola de elementos en apacite
+%% Escrito por Jorge L\'opez Puga
+%%
+% \end{macrocode}
+% A fancy way to store and restore the category code of the |@| sign,
+% per Heiko Oberdiek.
+% \begin{macrocode}
+\edef\APACrestoreAtCode{%
+ \catcode`@=\the\catcode`@\relax
+}%
+\makeatletter
+%% El nombre (del encabezado) de la Lista Referencias
+%% Nombre de la lista de ref. si es una secci\'on.
+\renewcommand{\refname}{Referencias}%
+%% Nomber de la lista de refs. si es un cap\'{\i}tulo.
+\renewcommand{\bibname}{Referencias}%
+%% El nombre (del encabezado) del \'Indice de Autores.
+\renewcommand{\authorindexname}{\'Indice de Autores}%
+%% Nota previa usada justo antes de la lista de referencias si un
+%% meta-an\'alisis es usado.
+\renewcommand{\APACmetaprenote}{%
+ Las referencias marcadas con un asterisco indican estudios incluidos en
+ el meta-an\'alisis.}%
+%% Comandos para tipos espec\'{\i}ficos de entradas @misc.
+\renewcommand{\bibmessage}{Msj}%
+\renewcommand{\bibcomputerprogram}{Programa inform\'atico}%
+\renewcommand{\bibcomputerprogrammanual}{Manual de programa inform\'atico}%
+\renewcommand{\bibcomputerprogramandmanual}{Programa inform\'atico y manual}%
+\renewcommand{\bibcomputersoftware}{Software inform\'atico}%
+\renewcommand{\bibcomputersoftwaremanual}{Manual de software inform\'atico}%
+\renewcommand{\bibcomputersoftwareandmanual}{Manual y software inform\'atico}%
+\renewcommand{\bibprogramminglanguage}{Lenguaje de programaci\'on}%
+%%
+%% Otras etiquetas
+\renewcommand{\bibnodate}{s.f.\hbox{}}% ``sin fecha''
+\renewcommand{\BIP}{en prensa}% Usado como a\~no para citas ``en prensa''
+%%
+%% El argumento contiene un punto, por tanto, evita poner uno adicional en
+%% la lista de referencias. No obstante algunas revistas aceptan ``et al.''
+%% que es lo que aparece por defecto.
+\renewcommand{\BOthers}[1]{y cols.\hbox{}}% ``y colaboradores''
+\renewcommand{\BOthersPeriod}[1]{y cols.\hbox{}}% ``y colaboradores''
+%%
+\renewcommand{\BIn}{En}% Para ``En'' editor...
+\renewcommand{\Bby}{por}% ``by'' editor (in reprints)
+\renewcommand{\BED}{Ed.\hbox{}}% editor
+\renewcommand{\BEDS}{Eds.\hbox{}}% editors
+\renewcommand{\BTRANS}{Traduc.\hbox{}}% traductor
+\renewcommand{\BTRANSS}{Traducs.\hbox{}}% traductores
+\renewcommand{\BTRANSL}{traduc.\hbox{}}% traducci\'on, para el campo a\~no
+\renewcommand{\BCHAIR}{Presidente}% Presidente/a de congreso
+\renewcommand{\BCHAIRS}{Presidencia}% Presidencia
+\renewcommand{\BVOL}{Vol.\hbox{}}% volume
+\renewcommand{\BVOLS}{Vols.\hbox{}}% volumes
+\renewcommand{\BNUM}{n\sptext{o}}% number
+\renewcommand{\BNUMS}{n\sptext{os}}% numbers
+\renewcommand{\BEd}{ed.\hbox{}}% edition
+\renewcommand{\BCHAP}{cap.\hbox{}}% cap\'{\i}tulo
+\renewcommand{\BCHAPS}{caps.\hbox{}}% cap\'{\i}tulos
+\renewcommand{\BPG}{p.\hbox{}}% page
+\renewcommand{\BPGS}{pp.\hbox{}}% pages
+%% Default technical report type name. --- Informe T\'ecnico
+\renewcommand{\BTR}{Inf.\ T\'ec.\hbox{}}%
+%% (por defecto) PhD thesis type name --- Tesis Doctoral
+\renewcommand{\BPhD}{Tesis Doctoral}%
+%% (por defecto) unpublished PhD thesis type name
+%% --- Tesis Doctoral no publicada
+\renewcommand{\BUPhD}{Tesis Doctoral no publicada}%
+%% (por defecto) master's thesis type name --- Tesis de Master
+\renewcommand{\BMTh}{Tesis de Master}%
+%% (por defecto) unpublished master's thesis type name
+%% --- Tesis de Master no publicada
+\renewcommand{\BUMTh}{Tesis de Master no publicada}%
+%%
+\renewcommand{\BAuthor}{Autor}% ``Author'' if publisher = author
+\renewcommand{\BOWP}{Trabajo original publicado en}% Original work published
+\renewcommand{\BREPR}{Reimpresi\'on de}% Reprinted from
+%%
+%% Websites and messages to newsgroups, forums, etc.; note the spaces.
+\renewcommand{\BAvailFrom}{Disponible en\ }% Available from
+%% The argument is the date on which it was last checked.
+\renewcommand{\BRetrieved}[1]{Descargado {#1}, de\ }% Retrieved ... from
+\renewcommand{\BRetrievedFrom}{Descargado de\ }% Retrieved from
+\renewcommand{\BMsgPostedTo}{Mensaje colgado en\ }% Message posted to
+%%
+%% Punctuation
+\renewcommand{\BBOP}{(}% opening parenthesis
+\renewcommand{\BBCP}{)}% closing parenthesis
+\renewcommand{\BBOQ}{}% opening quote for article title
+\renewcommand{\BBCQ}{}% closing quote for article title
+
+\renewcommand{\BBAA}{y}% Letra que va entre los autores en las referencias
+\renewcommand{\BBAB}{y}% Entre autores en el texto
+\renewcommand{\BAnd}{y}% for ``Ed. \& Trans.'' in ref. list
+\DeclareRobustCommand{\BPBI}{.~}% Period between initials
+\DeclareRobustCommand{\BHBI}{.-}% Hyphen between initials
+\renewcommand{\BAP}{ }% after prefix, before first citation
+\renewcommand{\BBAY}{, }% between author(s) and year
+\renewcommand{\BBYY}{, }% between years of multiple citations with same author
+\renewcommand{\BBC}{; }% between cites
+\renewcommand{\BBN}{, }% before note
+\renewcommand{\BCBT}{,}% comma between authors in ref. list when no. of
+ %% authors = 2
+\renewcommand{\BCBL}{,}% comma before last author when no. of authors > 2
+%% Remove excess space with the natbibapa option
+\if@APAC@natbib@apa
+ \renewcommand{\BBAY}{,}%
+ \renewcommand{\BBYY}{,}%
+ \renewcommand{\BBC}{;}%
+\fi
+%%
+%% Date formatting; adapted from babel's spanish.dtx
+\renewcommand{\APACmonth}[1]{\ifcase #1\or enero\or febrero\or
+ marzo\or abril\or mayo\or junio\or julio\or agosto\or
+ septiembre\or octubre\or noviembre\or diciembre\or
+ invierno\or primavera\or verano\or oto\~no\else
+ {#1}\fi}%
+\renewcommand{\APACrefYearMonthDay}[3]{%
+ {\BBOP}{#1}% year (+ addendum); should not be empty
+ \ifx\@empty#3\@empty
+ \ifx\@empty#2\@empty
+ \else
+ \unskip, {#2}% month --- mes
+ \fi
+ \else
+ \unskip, {#3}% day --- d\'ia
+ \ifx\@empty#2\@empty
+ \else
+ \unskip~de {#2}% month --- mes
+ \fi
+ \fi
+ {\BBCP}% closing parenthesis
+}%
+%% Some macros that transform a number (say, `2') to an ordinal one (`2nd')
+\renewcommand{\PrintOrdinal}[1]{%
+ \afterassignment\print@ordinal
+ \count@ 0#1\relax\@nil
+}%
+\def\print@ordinal#1#2\@nil{%
+ \ifx\relax#1\relax
+ \ifnum\count@>\z@
+ \CardinalNumeric\count@
+ \else
+ ??\sptext{a}%
+ \fi
+ \else
+ \ifnum \count@>\z@ \number\count@ \fi
+ #1#2\relax
+ \fi
+}%
+% \end{macrocode}
+% Spanish ordinal numbers are always obtained by putting
+% ``.\textsuperscript{a}'' after the number, at least for editions.
+% Therefore, the code here can be significantly simplified. However,
+% because I have trouble understanding this code (from the \pkg{amsrefs}
+% package) and experimenting did not give the expected results, I won't
+% mess with the code too much and stay close to the English code.
+% We use the \cmd{\sptext} command from \pkg{babel}'s \fname{spanish.dtx},
+% which formats the ``.\textsuperscript{a}'' slightly differently.
+% \begin{macrocode}
+\renewcommand{\CardinalNumeric}[1]{%
+ \number#1\relax
+ \if
+ \ifnum#1<14
+ \ifnum#1>\thr@@ T\else F\fi
+ \else
+ F%
+ \fi
+ T%
+ \sptext{a}%
+ \else
+ \@xp\keep@last@digit\@xp#1\number#1\relax
+ \ifcase#1\sptext{a}\else \sptext{a}\fi
+ \fi
+}%
+% \end{macrocode}
+% Some code for using `e' instead of `y' in Spanish if the following
+% name starts with `I'.
+% \begin{macrocode}
+\def\usespanishe#1{%
+ \@bsphack
+ \@for\@citeb:=#1\do{%
+ \edef\@citeb{\expandafter\@firstofone\@citeb}%
+ \@ifundefined{spanishe@\@citeb\APAC@extra@b@citeb}%
+ {\global\expandafter
+ \def\csname spanishe@\@citeb\APAC@extra@b@citeb\endcsname{DUMMY}%
+ }%
+ {}%
+ }%
+ \@esphack
+}
+\def\APACinsertmetastar#1{%
+ \@for\@citeb:=#1\do{%
+ \edef\@citeb{\expandafter\@firstofone\@citeb}%
+ \@ifundefined{flagmeta@\@citeb\APAC@extra@b@citeb}%
+ {}% skip
+ {{\APACmetastar}}%
+ \@ifundefined{spanishe@\@citeb\APAC@extra@b@citeb}%
+ {}% skip
+ {{% Use `e' instead of `y' in Spanish
+ \global\let\oldBBA\BBA
+ \global\def\BBA{e\global\let\BBA\oldBBA}%
+ }}%
+ }%
+}%
+\def\@ifauthorsunequalc@de#1{%
+ \if@F@cite
+ \@F@citefalse
+ \else
+ \if@Y@cite
+ {\@BAY}%
+ \fi
+ {\@BBC}%
+ \fi
+ \edef\@cite@undefined{?}%
+ \def\BBA{\@BBA}%
+ \@ifundefined{spanishe@\@citeb\APAC@extra@b@citeb}%
+ {}% skip
+ {{% Use `e' instead of `y' in Spanish
+ \global\let\oldBBA\BBA
+ \global\def\BBA{e\global\let\BBA\oldBBA}%
+ }}%
+ \if@A@cite
+ \hyper@natlinkstart{#1}%
+ {\csname b@\@citeb\APAC@extra@b@citeb\endcsname}%
+ \hyper@natlinkend
+ \if@Y@cite
+ {\@BBAY}%
+ \fi
+ \fi
+ \if@Y@cite
+ \hyper@natlinkstart{#1}%
+ {\csname Y@\@citeb\APAC@extra@b@citeb\endcsname}%
+ \hyper@natlinkend
+ \fi
+ \let\BBA\relax
+}%
+% \end{macrocode}
+% Restore category code of |@| sign.
+% \begin{macrocode}
+\APACrestoreAtCode
+%</spanish>
+% \end{macrocode}
+%
+%
+% \subsection{\fname{swedish.apc}}
+%
+% This file redefines the language-specific elements of \pkg{apacite}
+% for the Swedish language. Translation of APA elements into Swedish
+% is not obvious. Ideas of which terms to use have been taken from
+% \citeA{Erik01}, \citeA{Johnsson}, and \citeA{GU94}.
+%
+% \begin{macrocode}
+%<*swedish>
+%%
+%% swedish.apc - swedish translation of apacite elements
+%% Written by Stefan Bjork.
+%% Small adaptations by Erik Meijer
+%%
+% \end{macrocode}
+% A fancy way to store and restore the category code of the |@| sign,
+% per Heiko Oberdiek.
+% \begin{macrocode}
+\edef\APACrestoreAtCode{%
+ \catcode`@=\the\catcode`@\relax
+}%
+\makeatletter
+\renewcommand{\onemaskedcitationmsg}[1]{%
+ \emph{(#1\ citation removed for masked review)}}% !!! CHANGE
+\renewcommand{\maskedcitationsmsg}[1]{%
+ \emph{(#1\ citations removed for masked review)}}% !!! CHANGE
+%%
+%% Name of ref. list if it's a section.
+\renewcommand{\refname}{Referenser}%
+%% Name of ref. list if it's a chapter.
+\renewcommand{\bibname}{Litteraturf\"orteckning}%
+%% Author Index
+\renewcommand{\authorindexname}{F\"orfattarindex}%
+%%
+%% A note before the references if a meta-analysis is reported.
+\renewcommand{\APACmetaprenote}{%
+ Referenser markerade med stj\"arna avser studier inkluderade i
+ metaanalys.}%
+%%
+%% Commands for specific types of @misc entries.
+\renewcommand{\bibmessage}{meddelande}%
+\renewcommand{\bibcomputerprogram}{datorprogram}%
+\renewcommand{\bibcomputerprogrammanual}{handbok till datorprogram}%
+\renewcommand{\bibcomputerprogramandmanual}{datorprogram och handbok}%
+\renewcommand{\bibcomputersoftware}{mjukvara}%
+\renewcommand{\bibcomputersoftwaremanual}{handbok till mjukvara}%
+\renewcommand{\bibcomputersoftwareandmanual}{mjukvara och handbok}%
+\renewcommand{\bibprogramminglanguage}{programmeringsspr{\aa}k}%
+%%
+%% Other labels
+\renewcommand{\bibnodate}{u.~\aa{}.\hbox{}}% ``no date''
+\renewcommand{\BIP}{i tryck}% ``in press''
+\renewcommand{\BOthers}[1]{m.~fl.\hbox{}}% ``and others''
+\renewcommand{\BOthersPeriod}[1]{m.~fl.\hbox{}}% ``and others'', with a period
+\renewcommand{\BIn}{I}% for ``In'' editor...
+\renewcommand{\Bby}{av}% for ``by'' editor... (in reprints)
+\renewcommand{\BED}{red.\hbox{}}% editor
+\renewcommand{\BEDS}{red.\hbox{}}% editors
+\renewcommand{\BTRANS}{\"overs.\hbox{}}% translator
+\renewcommand{\BTRANSS}{\"overs.\hbox{}}% translators
+\renewcommand{\BTRANSL}{\"overs.\hbox{}}% translation, for the year field
+\renewcommand{\BCHAIR}{ordf\"orande}% chair of symposium
+\renewcommand{\BCHAIRS}{ordf\"oranden}% chairs
+\renewcommand{\BVOL}{vol.\hbox{}}% volume
+\renewcommand{\BVOLS}{vol.\hbox{}}% volumes
+\renewcommand{\BNUM}{nr.\hbox{}}% number
+\renewcommand{\BNUMS}{nr.\hbox{}}% numbers
+\renewcommand{\BEd}{utg{\aa}van}% edition
+\renewcommand{\BCHAP}{kap.\hbox{}}% chapter
+\renewcommand{\BCHAPS}{kap.\hbox{}}% chapters
+\renewcommand{\BPG}{s.\hbox{}}% page
+\renewcommand{\BPGS}{s.\hbox{}}% pages
+%% Default technical report type name.
+\renewcommand{\BTR}{forskningsrapport}%
+%% Default PhD thesis type name.
+\renewcommand{\BPhD}{doktorsavhandling}%
+%% Default unpublished PhD thesis type name.
+\renewcommand{\BUPhD}{opublicerad doktorsavhandling}%
+%% Default master's thesis type name.
+\renewcommand{\BMTh}{examensuppsats}%
+%% Default unpublished master's thesis type name.
+\renewcommand{\BUMTh}{opublicerad examensuppsats}%
+%%
+\renewcommand{\BAuthor}{F\"orfattare}% ``Author'' if publisher = author
+\renewcommand{\BOWP}{Original publicerat}% Original work published
+\renewcommand{\BREPR}{{\AA}terutgivning fr{\aa}n}% Reprinted from
+\renewcommand{\BAvailFrom}{Tillg\"anglig fr{\aa}n\ }% Websites; note the space.
+%% The argument is the date on which it was last checked.
+\renewcommand{\BRetrieved}[1]{H\"amtad {#1}, fr{\aa}n\ }% Websites; note the space.
+\renewcommand{\BRetrievedFrom}{H\"amtad fr{\aa}n\ }% Websites; note the space.
+\renewcommand{\BMsgPostedTo}{Meddelande postat till\ }% Messages; note the space.
+%%
+%% Punctuation
+\renewcommand{\BBOP}{(}% opening parenthesis
+\renewcommand{\BBCP}{)}% closing parenthesis
+\renewcommand{\BBOQ}{}% opening quote for article title
+\renewcommand{\BBCQ}{}% closing quote for article title
+\renewcommand{\BBAA}{\&}% between authors in parenthetical cites and ref. list
+\renewcommand{\BBAB}{och}% between authors in text
+\renewcommand{\BAnd}{\&}% for ``Ed. \& Trans.'' in ref. list
+\DeclareRobustCommand{\BPBI}{. }% Period between initials
+\DeclareRobustCommand{\BHBI}{.-}% Hyphen between initials
+\renewcommand{\BAP}{ }% after prefix, before first citation
+\renewcommand{\BBAY}{, }% between author(s) and year
+\renewcommand{\BBYY}{, }% between years of multiple citations with same author
+\renewcommand{\BBC}{; }% between cites
+\renewcommand{\BBN}{, }% before note
+\renewcommand{\BCBT}{}% no comma between authors in ref. list when no. of
+ %% authors = 2
+\renewcommand{\BCBL}{}% no comma before last author when no. of authors > 2
+%% Remove excess space with the natbibapa option
+\if@APAC@natbib@apa
+ \renewcommand{\BBAY}{,}%
+ \renewcommand{\BBYY}{,}%
+ \renewcommand{\BBC}{;}%
+\fi
+%%
+%% Date formatting; adapted from babel's swedish.dtx
+\renewcommand{\APACmonth}[1]{\ifcase #1\or
+ januari\or februari\or mars\or april\or maj\or juni\or
+ juli\or augusti\or september\or oktober\or november\or
+ december\or
+ vinter\or v{\aa}r\or sommar\or h\"ost\else
+ {#1}\fi}%
+%% Numbered version, which is preferred in the form ``(2008, 21/2)''.
+\def\APACswedishnumberedmonth#1{\ifcase #1\or
+ 1\or 2\or 3\or 4\or 5\or 6\or
+ 7\or 8\or 9\or 10\or 11\or 12\or
+ vinter\or v{\aa}r\or sommar\or h\"ost\else
+ {#1}\fi}%
+\renewcommand{\APACrefYearMonthDay}[3]{%
+ {\BBOP}{#1}% year (+ addendum); should not be empty
+ \ifx\@empty#3\@empty
+ \ifx\@empty#2\@empty
+ \else
+ %% Use full month if there is no day.
+ \unskip, {#2}% month
+ \fi
+ \else
+ \unskip, {#3}% day
+ \ifx\@empty#2\@empty
+ \else
+ %% Use numbered month if there is a day as well.
+ \let\APACorigmonth\APACmonth
+ \let\APACmonth\APACswedishnumberedmonth
+ \unskip{}/{#2}% month
+ \let\APACmonth\APACorigmonth
+ \let\APACorigmonth\@undefined
+ \fi
+ \fi
+ {\BBCP}% closing parenthesis
+}%
+%% Some macros that transform a number (say, `2') to an ordinal one (`2nd')
+\renewcommand{\PrintOrdinal}[1]{%
+ \afterassignment\print@ordinal
+ \count@ 0#1\relax\@nil
+}%
+\def\print@ordinal#1#2\@nil{%
+ \ifx\relax#1\relax
+ \ifnum\count@>\z@
+ \CardinalNumeric\count@
+ \else
+ ??:e%
+ \fi
+ \else
+ \ifnum \count@>\z@ \number\count@ \fi
+ #1#2\relax
+ \fi
+}%
+% \end{macrocode}
+% In swedish, ``1st'' = ``1:a'', ``2nd'' = ``2:a'', everything else =
+% ``:e''. From 20 onwards, if the last digit is 1 or 2, ``:a'' should
+% be used, and otherwise ``:e''.
+% \begin{macrocode}
+\renewcommand{\CardinalNumeric}[1]{%
+ \number#1\relax
+ \if
+ \ifnum#1<14
+ \ifnum#1>\thr@@ T\else F\fi
+ \else
+ F%
+ \fi
+ T%
+ :e%
+ \else
+ \@xp\keep@last@digit\@xp#1\number#1\relax
+ \ifcase#1:e\or :a\or :a\or :e\or :e\or :e\or :e\or :e\or :e\or
+ :e\else :e\fi
+ \fi
+}%
+% \end{macrocode}
+% Restore category code of |@| sign.
+% \begin{macrocode}
+\APACrestoreAtCode
+%</swedish>
+% \end{macrocode}
+%
+% \section{Bibliography database (\fname{apa5ex.bib})}
+%
+% This file includes the reference entries of all examples in the
+% APA manual, which are all formatted in the \pkg{apacite} reference
+% manual. As such, it shows how ordinary and (especially) difficult
+% items can be formatted.
+%
+% \subsection{References from the 5th edition of the Publication Manual}
+%
+% This includes some additional references that test some rules that are
+% mentioned in the text.
+% \begin{macrocode}
+%<*bibdb>
+%%
+%% apa5ex.bib: References from the 5th edition of the Publication Manual
+%% of the APA, plus a few additional references
+%% Written by Erik Meijer
+
+%% Entry labels are section number of the APA manual (5th ed.)
+%% plus a sequence number within the section.
+
+@misc{3.94-1,
+ author = {Walker},
+ year = {2000},
+ type = {Unknown},
+}
+
+@misc{3.95-1,
+ author = {Wasserstein and Zappulla and Rosen and Gerstman and Rock},
+ year = {1994},
+ type = {Unknown},
+}
+
+@misc{3.95-2,
+ author = {Bradley and Ramirez and Soo},
+ year = {1994},
+ type = {Unknown},
+}
+
+@misc{3.95-3,
+ author = {Bradley and Soo and Ramirez and Brown},
+ year = {1994},
+ type = {Unknown},
+}
+
+@misc{3.95-4,
+ author = {Kosslyn and Koenig and Barrett and Cave and Tang and Gabrieli},
+ year = {1996},
+ type = {Unknown},
+}
+
+@misc{3.95-5,
+ author = {Kosslyn and Koenig and Gabrieli and Tang and Marsolek and Daly},
+ year = {1996},
+ type = {Unknown},
+}
+
+@misc{3.95-6,
+ author = {Nightlinger and Littlewood},
+ year = {1993},
+ type = {Unknown},
+}
+
+@book{3.95-7,
+ author = {J{\"{o}}reskog, K[arl] G. and S{\"{o}}rbom, D[ag]},
+ year = {1989},
+ title = {{LISREL} 7: {A} Guide to the Program and Applications},
+ edition = {2},
+ address = {Chicago},
+ publisher = {SPSS},
+}
+
+@misc{3.96-1,
+ author = {{\bibcorporate{National Institute of Mental Health}}},
+ firstkey = {{National Institute of Mental Health [NIMH]}},
+ key = {{NIMH}},
+ year = {1999},
+ type = {Unknown},
+}
+
+@misc{3.96-2,
+ author = {{\bibcorporate{University of Pittsburgh}}},
+ year = {1993},
+ type = {Unknown},
+}
+
+@book{3.96-3,
+ author = {{\bibcorporate{Koninklijke Nederlandse Schaakbond}}},
+ firstkey = {{Koninklijke Nederlandse Schaakbond [KNSB]}},
+ key = {{KNSB}},
+ year = {2003},
+ title = {Jaarverslag 2002},
+ englishtitle = {Annual Report 2002},
+ address = {Amsterdam},
+ publisher = {{\bibcorporate{Koninklijke Nederlandse Schaakbond}}},
+ note = {Fake entry to study sorting and citing of references with
+ same key, but with different firstkey.},
+}
+
+@book{3.96-4,
+ author = {{\bibcorporate{Koninklijke Nederlandse Schaakbond}}},
+ firstkey = {{Koninklijke Nederlandse Schaakbond [KNSB]}},
+ key = {{KNSB}},
+ year = {2004},
+ title = {Jaarverslag 2003},
+ englishtitle = {Annual Report 2003},
+ address = {Amsterdam},
+ publisher = {{\bibcorporate{Koninklijke Nederlandse Schaakbond}}},
+ note = {Fake entry to study sorting and citing of references with
+ same key, but with different firstkey.},
+}
+
+@book{3.96-5,
+ author = {{\bibcorporate{Koninklijke Nederlandse Schaatsbond}}},
+ firstkey = {{Koninklijke Nederlandse Schaatsbond [KNSB]}},
+ key = {{KNSB}},
+ year = {2003},
+ title = {Jaarverslag 2002},
+ englishtitle = {Annual Report 2002},
+ address = {Amsterdam},
+ publisher = {{\bibcorporate{Koninklijke Nederlandse Schaatsbond}}},
+ note = {Fake entry to study sorting and citing of references with
+ same key, but with different firstkey.},
+}
+
+@book{3.96-6,
+ author = {{\bibcorporate{Koninklijke Nederlandse Schaatsbond}}},
+ firstkey = {{Koninklijke Nederlandse Schaatsbond [KNSB]}},
+ key = {{KNSB}},
+ year = {2004},
+ title = {Jaarverslag 2003},
+ englishtitle = {Annual Report 2003},
+ address = {Amsterdam},
+ publisher = {{\bibcorporate{Koninklijke Nederlandse Schaatsbond}}},
+ note = {Fake entry to study sorting and citing of references with
+ same key, but with different firstkey.},
+}
+
+@magazine{3.97-1,
+ key = {{\APACciteatitle{Study Finds}}},
+ year = {1982},
+ month = apr,
+ title = {Study Finds Free Care Used More},
+ journal = {{APA} Monitor},
+ pages = {14},
+}
+
+@book{3.97-2,
+ year = {1979},
+ title = {College Bound Seniors},
+ address = {Princeton, NJ},
+ publisher = {College Board Publications},
+}
+
+@misc{3.97-3,
+ author = {Anonymous},
+ year = {1998},
+ type = {Unknown},
+}
+
+@newspaper{3.97-4,
+ year = {2002},
+ month = mar,
+ day = {3},
+ title = {Editorial},
+ journal = {The Edited Newspaper},
+ pages = {2},
+ note = {Fake entry to study sorting and citing of references without
+ author, but with the same title.},
+}
+
+@newspaper{3.97-5,
+ year = {2003},
+ month = feb,
+ day = {12},
+ title = {Editorial},
+ journal = {The Edited Newspaper},
+ pages = {2},
+ note = {Fake entry to study sorting and citing of references without
+ author, but with the same title.},
+}
+
+@newspaper{3.97-6,
+ year = {2003},
+ month = jan,
+ day = {24},
+ title = {Editorial},
+ journal = {The Edited Newspaper},
+ pages = {2},
+ note = {Fake entry to study sorting and citing of references without
+ author, but with the same title.},
+}
+
+@book{3.98-1,
+ author = {Luce, R. Duncan},
+ year = {1959},
+ title = {Individual Choice Behavior},
+ address = {New York},
+ publisher = {Wiley},
+}
+
+@misc{3.98-2,
+ author = {Luce, P. A.},
+ year = {1986},
+ type = {Unknown},
+}
+
+@misc{3.98-3,
+ author = {Goldberg, J. M. and Neff},
+ year = {1961},
+ type = {Unknown},
+}
+
+@misc{3.98-4,
+ author = {Goldberg, M. E. and Wurtz},
+ year = {1972},
+ type = {Unknown},
+}
+
+@misc{3.99-1,
+ author = {Edeline and Weinberger},
+ year = {1991},
+ type = {Unknown},
+}
+
+@misc{3.99-2,
+ author = {Edeline and Weinberger},
+ year = {1993},
+ type = {Unknown},
+}
+
+@misc{3.99-3,
+ author = {Gogel},
+ year = {1984},
+ type = {Unknown},
+}
+
+@misc{3.99-4,
+ author = {Gogel},
+ year = {1990},
+ type = {Unknown},
+}
+
+@misc{3.99-5,
+ author = {Gogel},
+ year = {\BIP},
+ type = {Unknown},
+}
+
+@misc{3.99-6,
+ author = {Johnson},
+ year = {1991},
+ title = {Aaa},
+}
+
+@misc{3.99-7,
+ author = {Johnson},
+ year = {1991},
+ title = {Bbb},
+}
+
+@misc{3.99-8,
+ author = {Johnson},
+ year = {1991},
+ title = {Ccc},
+}
+
+@misc{3.99-9,
+ author = {Singh},
+ year = {1983},
+ type = {Unknown},
+}
+
+@misc{3.99-10,
+ author = {Singh},
+ year = {\BIP},
+ title = {Aaa},
+}
+
+@misc{3.99-11,
+ author = {Singh},
+ year = {\BIP},
+ title = {Bbb},
+}
+
+@misc{3.99-12,
+ author = {Balda},
+ year = {1980},
+ type = {Unknown},
+}
+
+@misc{3.99-13,
+ author = {Kamil},
+ year = {1988},
+ type = {Unknown},
+}
+
+@misc{3.99-14,
+ author = {Pepperberg and Funk},
+ year = {1990},
+ type = {Unknown},
+}
+
+@misc{3.99-15,
+ author = {Minor},
+ year = {2001},
+ type = {Unknown},
+}
+
+@misc{3.99-16,
+ author = {Adams},
+ year = {1999},
+ type = {Unknown},
+}
+
+@misc{3.99-17,
+ author = {Storandt},
+ year = {1997},
+ type = {Unknown},
+}
+
+@misc{3.100-1,
+ author = {Author},
+ year = {\bibnodate},
+ type = {Unknown},
+ note = {no example, but rule given in text},
+}
+
+@misc{3.100-1b,
+ author = {Author},
+ year = {2003 version},
+ type = {Unknown},
+ note = {no example, but rule given in text},
+}
+
+@book{3.100-2,
+ author = {Aristotle},
+ year = {1931},
+ title = {Unknown},
+ translator = {Someone},
+ originalyear = {\bibnodate},
+}
+
+@book{3.100-3,
+ author = {James},
+ year = {1983},
+ title = {Unknown},
+ originalyear = {1890},
+}
+
+@misc{3.101-1,
+ author = {Cheek and Buss},
+ year = {1981},
+ type = {Unknown},
+}
+
+@misc{3.101-2,
+ author = {Shimamura},
+ year = {1989},
+ type = {Unknown},
+}
+
+@misc{3.101-3,
+ author = {Myers},
+ year = {2000},
+ type = {Unknown},
+}
+
+@misc{3.101-4,
+ author = {Beutler},
+ year = {2000},
+ type = {Unknown},
+}
+
+@misc{3.103-1,
+ author = {Hashtroudi and Chrosniak and Schwartz},
+ year = {1991},
+ type = {Unknown},
+}
+
+@misc{4.04-t1,
+ author = {Brown, J. R.},
+ year = {\bibnodate},
+ type = {Unknown},
+}
+
+@misc{4.04-t2,
+ author = {Browning, A. R.},
+ year = {\bibnodate},
+ type = {Unknown},
+}
+
+@misc{4.04-t3,
+ author = {MacArthur},
+ year = {\bibnodate},
+ type = {Unknown},
+}
+
+@misc{4.04-t4,
+ author = {McAllister},
+ year = {\bibnodate},
+ type = {Unknown},
+}
+
+@misc{4.04-t5,
+ author = {MacNeil},
+ year = {\bibnodate},
+ type = {Unknown},
+}
+
+@misc{4.04-t6,
+ author = {M'Carthy},
+ year = {\bibnodate},
+ type = {Unknown},
+}
+
+@misc{4.04-t7,
+ author = {DeBase},
+ year = {\bibnodate},
+ type = {Unknown},
+}
+
+@misc{4.04-t8,
+ author = {De Vries, J.},
+ year = {\bibnodate},
+ type = {Unknown},
+}
+
+@misc{4.04-t9,
+ author = {von Helmholtz, H. L. F.},
+ year = {\bibnodate},
+ type = {Unknown},
+}
+
+@article{4.04-t10,
+ year = {2003},
+ title = {{\APACSortNoop{Two-Thousand and Three}}2003 Hottest Summer Ever},
+ journal = {Journal of Meteorology},
+ note = {This is a fake entry, used for didactical purposes.},
+}
+
+@misc{4.04-1,
+ author = {Hewlett, L. S.},
+ year = {1996},
+ type = {Unknown},
+}
+
+@misc{4.04-2,
+ author = {Hewlett, L. S.},
+ year = {1999},
+ type = {Unknown},
+}
+
+@misc{4.04-3,
+ author = {Alleyne, R. L.},
+ year = {2001},
+ type = {Unknown},
+}
+
+@misc{4.04-4,
+ author = {Alleyne, R. L. and Evans, A. J.},
+ year = {1999},
+ type = {Unknown},
+}
+
+@misc{4.04-5,
+ author = {Gosling, J. R. and Jerald, K. and Belfar, S. F.},
+ year = {2000},
+ type = {Unknown},
+}
+
+@misc{4.04-6,
+ author = {Gosling, J. R. and Tevlin, D. F.},
+ year = {1996},
+ type = {Unknown},
+}
+
+@misc{4.04-7,
+ author = {Hayward, D. and Firsching, A. and Brown, J.},
+ year = {1999},
+ type = {Unknown},
+}
+
+@misc{4.04-8,
+ author = {Hayward, D. and Firsching, A. and Smigel, J.},
+ year = {1999},
+ type = {Unknown},
+}
+
+@misc{4.04-9,
+ author = {Cabading, J. R. and Wright, K.},
+ year = {2000},
+ type = {Unknown},
+}
+
+@misc{4.04-10,
+ author = {Cabading, J. R. and Wright, K.},
+ year = {2001},
+ type = {Unknown},
+}
+
+@article{4.04-11,
+ author = {Baheti, J. R.},
+ year = {2001},
+ title = {Control {\ldots}},
+}
+
+@article{4.04-12,
+ author = {Baheti, J. R.},
+ year = {2001},
+ title = {Roles of {\ldots}},
+}
+
+@misc{4.04-13,
+ author = {Mathur, A. L. and Wallston, J.},
+ year = {1999},
+ type = {Unknown},
+}
+
+@misc{4.04-14,
+ author = {Mathur, S. E. and Ahlers, R. J.},
+ year = {1998},
+ type = {Unknown},
+}
+
+@book{4.05-1,
+ author = {Bandura, A. J.},
+ year = {1977},
+ title = {Social Learning Theory},
+ address = {Englewood Cliffs, NJ},
+ publisher = {Prentice Hall},
+}
+
+@article{4.05-2,
+ author = {Bretschneider, J. G. and McCoy, N. L.},
+ year = {1968},
+ title = {Sexual Interest and Behavior in Healthy
+ 80- to 102-Year-Olds},
+ journal = {Archives of Sexual Behavior},
+ volume = {14},
+ pages = {343--350},
+}
+
+@article{4.08-1,
+ author = {Kernis, M. H. and Cornell, D. P. and Sun, C.-R.
+ and Berry, A. and Harlow, T.},
+ year = {1993},
+ title = {There's More to Self-Esteem than Whether it is High
+ or Low: The Importance of Stability of Self-Esteem},
+ journal = {Journal of Personality and Social Psychology},
+ volume = {65},
+ pages = {1190--1204},
+}
+
+@book{4.08-2,
+ editor = {Robinson, D. N.},
+ year = {1992},
+ title = {Social Discourse and Moral Judgment},
+ address = {San Diego, CA},
+ publisher = {Academic Press},
+}
+
+@misc{4.08-3,
+ author = {Bulatao, E. {\protect\bibliteral{(with
+ Winford, C.~A.)}\protect\indexskipbracenodot}},
+ year = {\bibnodate},
+ type = {Unknown},
+}
+
+@article{4.09-1,
+ author = {Fowers, B. J. and Olson, D. H.},
+ year = {1993},
+ title = {{ENRICH} {Marital} {Satisfaction} {Scale}:
+ A Brief Research and Clinical Tool},
+ journal = {Journal of Family Psychology},
+ volume = {7},
+ pages = {176--185},
+}
+
+@article{4.10-1,
+ author = {Deutsch, F. M. and Lussier, J. B. and Servis, L. J.},
+ year = {1993},
+ title = {Husbands At Home: Predictors of Paternal Participation
+ in Childcare and Housework},
+ journal = {Journal of Personality and Social Psychology},
+ volume = {65},
+ pages = {1154--1166},
+}
+
+@incollection{4.10-2,
+ author = {O'Neil, J. M. and Egan, J.},
+ year = {1992},
+ title = {Men's and Women's Gender Role Journeys:
+ Metaphor for Healing, Transition, and Transformation},
+ editor = {Wainrib, B. R.},
+ booktitle = {Gender Issues Across the Life Cycle},
+ pages = {107--123},
+ address = {New York},
+ publisher = {Springer},
+}
+
+@article{4.11-1,
+ author = {Buss, D. M. and Schmitt, D. P.},
+ year = {1993},
+ title = {Sexual Strategies Theory: An Evolutionary Perspective
+ on Human Mating},
+ journal = {Psychological Review},
+ volume = {100},
+ pages = {204--232},
+}
+
+@magazine{4.11-2,
+ author = {Henry, III, W. A.},
+ year = {1990},
+ month = apr,
+ day = {9},
+ title = {Beyond the Melting Pot},
+ journal = {Time},
+ volume = {135},
+ pages = {28--31},
+}
+
+@book{4.12-1,
+ author = {Saxe, G. B.},
+ year = {1991},
+ title = {Cultural and Cognitive Development: Studies in
+ Mathematical Understanding},
+ address = {Hillsdale, NJ},
+ publisher = {Erlbaum},
+}
+
+@incollection{4.13-1,
+ author = {Baker, F. M. and Lightfoot, O. B.},
+ year = {1993},
+ title = {Psychiatric Care of Ethnic Elders},
+ editor = {Gaw, A. C.},
+ booktitle = {Culture, Ethnicity, and Mental Illness},
+ pages = {517--552},
+ address = {Washington, DC},
+ publisher = {American Psychiatric Press},
+}
+
+@incollection{4.13-2,
+ author = {Merikle, Philip M.},
+ year = {2000},
+ title = {Subliminal Perception},
+ editor = {Kazdin, Alan E. and Blanchard, Edward B. and
+ Bootzin, Richard R. and Bower, Gordon and
+ Close Conoley, Jane and Deaux, Kay and Fox, Ronald E. and
+ Harmon, Lenore W. and Howell, William C. and
+ Marsella, Anthony J. and Price, Richard H. and
+ Roediger, III, Henry L. and Rosenthal, Robert and
+ Schmitt, Neal W. and Singer, Jerome L. and Squire, Larry R. and
+ Zahn-Waxler, Carolyn},
+ booktitle = {Encyclopedia of Psychology},
+ volume = {7},
+ pages = {497--499},
+ address = {New York},
+ publisher = {Oxford University Press},
+}
+
+@misc{4.15-1,
+ key = {{\APACcitebtitle{Electronic Reference Formats}}},
+ title = {Electronic Reference Formats Recommended by the
+ {American} {Psychological} {Association}},
+ year = {2000},
+ month = oct,
+ day = {12},
+ lastchecked = {October 23, 2000},
+ URL = {http://www.apa.org/journals/webref.html},
+}
+
+@article{4.15-2,
+ author = {Eid, M. and Langeheine, R.},
+ year = {1999},
+ title = {The Measurement of Consistency and Occasion Specificity
+ with Latent Class Models: A New Model and its
+ Application to the Measurement of Affect},
+ journal = {Psychological Methods},
+ volume = {4},
+ pages = {100--116},
+ howpublished = {Retrieved November 19, 2000, from the PsycARTICLES database},
+}
+
+%
+% The rest is from section 4.16. Section number is omitted,
+% but A-I are used instead. For the numbered examples, these
+% letters are also omitted in favor of ``ex''.
+%
+
+@article{A-1,
+ author = {Herman, L. M. and Kuczaj, III, S. A. and Holder, M. D.},
+ year = {1993},
+ title = {Responses to Anomalous Gestural Sequences by a
+ Language-Trained Dolphin: {E}vidence for Processing
+ of Semantic Relations and Syntactic Information},
+ journal = {Journal of Experimental Psychology: General},
+ volume = {122},
+ pages = {184--194},
+}
+
+@article{ex1,
+ author = {Mellers, B. A.},
+ year = {2000},
+ title = {Choice and the Relative Pleasure of Consequences},
+ journal = {Psychological Bulletin},
+ volume = {126},
+ pages = {910--924},
+}
+
+@article{ex2,
+ author = {Klimoski, R. and Palmer, S.},
+ year = {1993},
+ title = {The {ADA} and the Hiring Process in Organizations},
+ journal = {Consulting Psychology Journal: Practice and Research},
+ volume = {45},
+ number = {2},
+ pages = {10--36},
+}
+
+@article{ex3,
+ author = {Saywitz, K. J. and Mannarino, A. P. and Berliner, L.
+ and Cohen, J. A.},
+ year = {2000},
+ title = {Treatment for Sexually Abused Children and Adolescents},
+ journal = {American Psychologist},
+ volume = {55},
+ pages = {1040--1049},
+}
+
+@article{ex4,
+ author = {Wolchik, S. A. and West, S. G. and Sandler, I. N. and
+ Tein, J. and Coatsworth, D. and Lengua, L. and others},
+ year = {2000},
+ title = {An Experimental Evaluation of Theory-Based Mother and
+ Mother-Child Programs for Children of Divorce},
+ journal = {Journal of Consulting and Clinical Psychology},
+ volume = {68},
+ pages = {843--856},
+}
+
+@article{ex4-2,
+ author = {Swait, Joffre and Adamowicz, Wiktor and Hanemann, Michael
+ and Diederich, Adele and Krosnick, Jon and Layton, David
+ and Provencher, William and Schkade, David and Tourangeau, Roger},
+ year = {2002},
+ title = {Context Dependence and Aggregation
+ in Disaggregate Choice Analysis},
+ journal = {Marketing Letters},
+ volume = {13},
+ pages = {195--205},
+}
+
+@article{ex5,
+ author = {Zuckerman, M. and Kieffer, S. C.},
+ year = {\BIP},
+ title = {Race Differences in Face-ism: {D}oes Facial Prominence
+ Imply Dominance?},
+ journal = {Journal of Personality and Social Psychology},
+}
+
+@magazine{ex6,
+ author = {Kandel, E. R. and Squire, L. R.},
+ year = {2000},
+ month = nov,
+ day = {10},
+ title = {Neuroscience: {B}reaking Down Scientific Barriers to the
+ Study of Brain and Mind},
+ journal = {Science},
+ volume = {290},
+ pages = {1113--1120},
+}
+
+@article{ex7,
+ author = {Brown, L. S.},
+ year = {1993},
+ month = spring,
+ title = {Antidomination Training as a Central Component of
+ Diversity in Clinical Psychology Education},
+ journal = {The Clinical Psychologist},
+ volume = {46},
+ pages = {83--87},
+}
+
+@article{ex8,
+ year = {1993},
+ month = aug # "/" # sep,
+ title = {The New Health-Care Lexicon},
+ journal = {Copy Editor},
+ volume = {4},
+ pages = {1--2},
+}
+
+@newspaper{ex9,
+ key = {{\APACciteatitle{New Drug}}},
+ year = {1993},
+ month = jul,
+ day = {15},
+ title = {New Drug Appears to Sharply Cut Risk of Death from
+ Heart Failure},
+ journal = {The Washington Post},
+ pages = {A12},
+}
+
+@newspaper{ex10,
+ author = {Schwartz, J.},
+ year = {1993},
+ month = sep,
+ day = {30},
+ title = {Obesity Affects Economic, Social Status},
+ journal = {The Washington Post},
+ pages = {A1, A4},
+}
+
+@newspaper{ex11,
+ author = {Berkowitz, A. D.},
+ year = {2000},
+ month = nov,
+ day = {24},
+ title = {How to Tackle the Problem of Student Drinking},
+ type = {Letter to the editor},
+ journal = {The Chronicle of Higher Education},
+ pages = {B20},
+}
+
+@article{ex12,
+ editor = {Barlow, D. H.},
+ year = {1991},
+ title = {Diagnoses, Dimensions, and \emph{DSM-IV}:
+ The Science of Classification},
+ type = {Special issue},
+ journal = {Journal of Abnormal Psychology},
+ volume = {100},
+ number = {3},
+}
+
+@article{ex13,
+ author = {Harris, P. L. and Kavanaugh, R. D.},
+ year = {1993},
+ title = {Young Children's Understanding of Pretense},
+ journal = {Monographs of the Society for Research in Child Development},
+ volume = {58},
+ number = {1, Serial No.~231},
+}
+
+@article{ex14,
+ author = {Battig, W. F. and Montague, W. E.},
+ year = {1969},
+ title = {Category Norms for Verbal Items in 56 Categories:
+ A Replication and Extension of the {Connecticut}
+ Category Norms},
+ journal = {Journal of Experimental Psychology Monographs},
+ volume = {80},
+ number = {3, Pt.~2},
+}
+
+@article{ex15,
+ author = {Ganster, D. C. and Schaubroeck, J. and Sime, W. E.
+ and Mayes, B. T.},
+ year = {1991},
+ title = {The Nomological Validity of the {Type}~{A} Personality
+ Among Employed Adults},
+ type = {Monograph},
+ journal = {Journal of Applied Psychology},
+ volume = {76},
+ pages = {143--168},
+}
+
+@article{ex16,
+ author = {Woolf, N. J. and Young, S. L. and Fanselow, M. S. and
+ Butcher, L. L.},
+ year = {1991},
+ title = {{MAP}-2 Expression in Cholinoceptive Pyramidal Cells
+ of Rodent Cortex and Hippocampus is Altered by
+ {Pavlovian} Conditioning},
+ type = {Abstract},
+ journal = {Society for Neuroscience Abstracts},
+ volume = {17},
+ pages = {480},
+}
+
+@article{ex17,
+ author = {Nakazato, K. and Shimonaka, Y. and Homma, A.},
+ year = {{\protect\bibreftext{1992}{1992/1993}}},
+ title = {Cognitive Functions of Centenarians: The {Tokyo}
+ {Metropolitan} {Centenarian} {Study}},
+ journal = {Japanese Journal of Developmental Psychology},
+ volume = {3},
+ pages = {9--16},
+ howpublished = {Abstract obtained from
+ {\APACcitebtitle{PsycSCAN: Neuropsychology}},
+ 1993, \emph{2}, Abstract No.~604},
+}
+
+@article{ex18,
+ author = {Regier, A. A. and Narrow, W. E. and Rae, D. S.},
+ year = {1990},
+ title = {The Epidemiology of Anxiety Disorders: The Epidemiologic
+ Catchment Area ({ECA}) Experience},
+ journal = {Journal of Psychiatric Research},
+ volume = {24},
+ number = {Suppl.~2},
+ pages = {3--14},
+}
+
+@article{ex19,
+ author = {Fiske, S. T.},
+ year = {1993},
+ title = {Social Cognition and Social Perception},
+ journal = {Annual Review of Psychology},
+ volume = {44},
+ pages = {155--194},
+}
+
+@article{ex20,
+ author = {Ising, M.},
+ year = {2000},
+ title = {Intensit{\"{a}}tsabh{\"{a}}ngigkeit evozierter {Potenzial} im
+ {EEG}: Sind impulsive {Personen} {Augmenter} oder
+ {Reducer}?},
+ englishtitle = {Intensity Dependence in Event-Related {EEG} Potentials:
+ Are Impulsive Individuals Augmenters or Reducers?},
+ journal = {Zeitschrift f{\"{u}}r Differentielle und Diagnostische
+ Psychologie},
+ volume = {21},
+ pages = {208--217},
+}
+
+@article{ex21,
+ author = {Stutte, H.},
+ year = {1972},
+ title = {Transcultural Child Psychiatry},
+ journal = {Acta Paedopsychiatrica},
+ volume = {38},
+ number = {9},
+ pages = {229--231},
+}
+
+@article{ex22,
+ author = {Coltheart, M. and Curtis, B. and Atkins, P. and Haller, M.},
+ year = {1993},
+ title = {Models of Reading Aloud: Dual-Route and
+ Parallel-Distributed-Processing Approaches},
+ journal = {Psychological Review},
+ volume = {100},
+ pages = {589--608},
+}
+
+@book{B-1,
+ author = {Beck, C. A. J. and Sales, B. D.},
+ year = {2001},
+ title = {Family Mediation: Facts, Myths, and Future Prospects},
+ address = {Washington, DC},
+ publisher = {American Psychological Association},
+}
+
+@book{ex23,
+ author = {Mitchell, T. R. and Larson, Jr.\hbox{}, J. R.},
+ year = {1987},
+ title = {People in Organizations: An Introduction to
+ Organizational Behavior},
+ edition = {3},
+ address = {New York},
+ publisher = {McGraw-Hill},
+}
+
+@book{ex24,
+ author = {{\bibcorporate{Australian Bureau of Statistics}}},
+ year = {1991},
+ title = {Estimated Resident Population by Age and Sex in
+ Statistical Local Areas, {New} {South} {Wales},
+ {June} 1990},
+ number = {3209.1},
+ address = {Canberra, Australian Capital Territory},
+ publisher = {{\bibcorporate{Australian Bureau of Statistics}}},
+}
+
+@book{ex25,
+ editor = {Gibbs, J. T. and Huang, L. N.},
+ year = {1991},
+ title = {Children of Color: Psychological Interventions with
+ Minority Youth},
+ address = {San Francisco},
+ publisher = {Jossey-Bass},
+}
+
+@book{ex25-t1,
+ author = {Vygotsky, L. S.},
+ year = {1978},
+ title = {Mind in Society: {T}he Development of Higher Mental
+ Processes},
+ editor = {Rice, Edgar},
+ translator = {Rice, Edgar},
+ address = {Cambridge, MA},
+ publisher = {Harvard University Press},
+ originalyear = {1930, 1933, 1935},
+}
+
+@book{ex25-t2,
+ author = {J{\"{o}}reskog, Karl G. and S{\"{o}}rbom, Dag},
+ year = {1979},
+ title = {Advances in Factor Analysis
+ and Structural Equation Models},
+ editor = {Magidson, Jay},
+ address = {Cambridge, MA},
+ publisher = {Abt Books},
+}
+
+@book{ex26,
+ year = {1993},
+ title = {Merriam-{Webster}'s Collegiate Dictionary},
+ edition = {10},
+ address = {Springfield, MA},
+ publisher = {Merriam-Webster},
+}
+
+@book{ex27,
+ author = {Rosenthal, R.},
+ year = {1987},
+ title = {Meta-Analytic Procedures for Social Research},
+ edition = {Rev.\hbox{}},
+ address = {Newbury Park, CA},
+ publisher = {Sage},
+}
+
+@book{ex28,
+ editor = {Koch, S.},
+ year = {1959--1963},
+ title = {Psychology: {A} Study of Science},
+ volume = {1--6},
+ address = {New York},
+ publisher = {McGraw-Hill},
+}
+
+@book{ex29,
+ key = {{\bibDSM{American Psychiatric
+ Association}{Diagnostic and Statistical Manual
+ of Mental Disorders}{4th ed.\hbox{}}{DSM-IV}}},
+ author = {{\bibcorporate{American Psychiatric Association}}},
+ year = {1994},
+ title = {Diagnostic and Statistical Manual of Mental Disorders},
+ edition = {4},
+ address = {Washington, DC},
+ publisher = {{\bibcorporate{American Psychiatric Association}}},
+}
+
+@book{ex30,
+ editor = {Sadie, S.},
+ year = {1980},
+ title = {The New {G}rove Dictionary of Music and Musicians},
+ edition = {6},
+ volume = {1--20},
+ address = {London},
+ publisher = {Macmillan},
+}
+
+@book{ex30-2,
+ editor = {Kazdin, Alan E. and Blanchard, Edward B. and
+ Bootzin, Richard R. and Bower, Gordon and
+ Close Conoley, Jane and Deaux, Kay and Fox, Ronald E. and
+ Harmon, Lenore W. and Howell, William C. and
+ Marsella, Anthony J. and Price, Richard H. and
+ Roediger, III, Henry L. and Rosenthal, Robert and
+ Schmitt, Neal W. and Singer, Jerome L. and Squire, Larry R. and
+ Zahn-Waxler, Carolyn},
+ year = {2000},
+ title = {Encyclopedia of Psychology},
+ address = {New York},
+ publisher = {Oxford University Press},
+}
+
+@book{ex31,
+ author = {Piaget, J. and Inhelder, B.},
+ year = {1951},
+ title = {La Gen{\`{e}}se de l'Id{\'{e}}e de Hasard chez l'Enfant},
+ englishtitle = {The Origin of the Idea of Chance in the Child},
+ address = {Paris},
+ publisher = {Presses Universitaires de France},
+}
+
+@book{ex32,
+ author = {Laplace, P.-S.},
+ year = {1951},
+ title = {A Philosophical Essay on Probabilities},
+ translator = {Truscott, F. W. and Emory, F. L.},
+ address = {New York},
+ publisher = {Dover},
+ originalyear = {1814},
+}
+
+@book{ex33,
+ author = {{\bibcorporate{Research and Training Center on
+ Independent Living}}},
+ firstkey = {{Research and Training Center on Independent Living [RTCIL]}},
+ key = {RTCIL},
+ year = {1993},
+ title = {Guidelines for Reporting and Writing About People
+ with Disabilities},
+ edition = {4},
+ type = {Brochure},
+ address = {Lawrence, KS},
+ publisher = {{\bibcorporate{Research and Training Center on
+ Independent Living}}},
+}
+
+@incollection{B-2,
+ author = {Massaro, D.},
+ year = {1992},
+ title = {Broadening the Domain of the Fuzzy Logical Model of Perception},
+ editor = {Pick, Jr.\hbox{}, H. L. and van den Broek, P. and Knill, D. C.},
+ booktitle = {Cognition: Conceptual and Methodological Issues},
+ pages = {51--84},
+ address = {Washington, DC},
+ publisher = {American Psychological Association},
+}
+
+@incollection{ex34,
+ author = {Bjork, R. A.},
+ year = {1989},
+ title = {Retrieval Inhibition as an Adaptive Mechanism in Human Memory},
+ editor = {Roediger, III, H. L. and Craik, F. I. M.},
+ booktitle = {Varieties of Memory \& Consciousness},
+ pages = {309--330},
+ address = {Hillsdale, NJ},
+ publisher = {Erlbaum},
+}
+
+@incollection{ex35,
+ author = {Auerbach, J. S.},
+ year = {\BIP},
+ title = {The Origins of Narcissism and Narcissistic Personality
+ Disorder: A Theoretical and Empirical Reformulation},
+ editor = {Masling, J. M. and Bornstein, R. F.},
+ booktitle = {Empirical Studies of Psychoanalytic Theories:
+ {Vol}.~4. {Psychoanalytic} Perspectives on Psychopathology},
+ address = {Washington, DC},
+ publisher = {American Psychological Association},
+}
+
+@incollection{ex36,
+ author = {Maccoby, E. E. and Martin, J.},
+ year = {1983},
+ title = {Socialization in the Context of the Family:
+ Parent-Child Interaction},
+ editor = {Mussen (Series Ed.\hbox{}), P. H. and
+ Hetherington{\bibeditortype{Vol.\ Ed.\hbox{}}}, E. M.},
+ booktitle = {Handbook of Child Psychology:
+ {Vol}.~4. {Socialization}, Personality, and Social Development},
+ edition = {4},
+ pages = {1--101},
+ address = {New York},
+ publisher = {Wiley},
+}
+
+@incollection{ex37,
+ author = {Davydov, V. V.},
+ year = {1972},
+ title = {De Introductie van het Begrip Grootheid in de Eerste
+ Klas van de Basisschool: Een Experimenteel Onderzoek},
+ englishtitle = {The Introduction of the Concept of Quantity in the
+ First Grade of the Primary School: An Experimental Study},
+ editor = {Van Parreren, C. F. and Carpay, J. A. M.},
+ booktitle = {Sovjetpsychologen aan het Woord},
+ pages = {227--289},
+ address = {Groningen, The Netherlands},
+ publisher = {Wolters-Noordhoff},
+}
+
+@incollection{ex38,
+ author = {Bergmann, P. G.},
+ year = {1993},
+ title = {Relativity},
+ booktitle = {The New Encyclopaedia {Britannica}},
+ volume = {26},
+ pages = {501--508},
+ address = {Chicago},
+ publisher = {Encyclopaedia Britannica},
+}
+
+@incollection{ex39,
+ author = {Freud, Sigmund},
+ year = {1961},
+ title = {The Ego and the Id},
+ editor = {Strachey, J.},
+ translator = {Strachey, J.},
+ booktitle = {The Standard Edition of the Complete Psychological
+ Works of {Sigmund} {Freud}},
+ volume = {19},
+ pages = {3--66},
+ address = {London},
+ publisher = {Hogarth Press},
+ originalyear = {1923},
+}
+
+@incollection{ex40,
+ author = {Piaget, J.},
+ year = {1988},
+ title = {Extracts from {Piaget}'s Theory},
+ translator = {Gellerier, G. and Langer, J.},
+ editor = {Richardson, K. and Sheldon, S.},
+ booktitle = {Cognitive Development to Adolescence: A Reader},
+ pages = {3--18},
+ address = {Hillsdale, NJ},
+ publisher = {Erlbaum},
+ originalbooktitle = {Manual of Child Psychology},
+ originalpages = {703--732},
+ originaleditor = {Mussen, P. H.},
+ originalyear = {1970},
+ originaladdress = {New York},
+ originalpublisher = {Wiley},
+}
+
+@incollection{ex40-t1,
+ author = {Browne, M[ichael] W.},
+ year = {1977},
+ title = {Generalized Least Squares Estimators in the Analysis
+ of Covariance Structures},
+ editor = {Aigner, D[ennis] J. and Goldberger, A[rthur] S.},
+ booktitle = {Latent Variables in Socio-Economic Models},
+ pages = {205--226},
+ address = {Amsterdam},
+ publisher = {North Holland},
+ originalyear = {1974},
+ originaljournal = {South African Statistical Journal},
+ originalvolume = {8},
+ originalpages = {1--24},
+}
+
+
+@techreport{C-1,
+ author = {Mazzeo, J. and Druesne, B. and Raffeld, P. C.
+ and Checketts, K. T. and Muhlstein, A.},
+ year = {1991},
+ title = {Comparability of Computer and Paper-and-Pencil Scores
+ for Two {CLEP} General Examinations},
+ type = {College Board Rep.},
+ number = {91-5},
+ address = {Princeton, NJ},
+ institution = {Educational Testing Service},
+}
+
+@techreport{ex41,
+ author = {{\bibcorporate{National Institute of Mental Health}}},
+ firstkey = {{National Institute of Mental Health [NIMH]}},
+ key = {{NIMH}},
+ year = {1990},
+ title = {Clinical Training in Serious Mental Illness},
+ type = {{DHHS} Publication},
+ number = {ADM 90-1679},
+ address = {Washington, DC},
+ institution = {U.S. Government Printing Office},
+}
+
+@techreport{ex42,
+ author = {Osgood, D. W. and Wilson, J. K.},
+ year = {1990},
+ title = {Covariation of Adolescent Health Problems},
+ type = {\bibnotype},
+ address = {Lincoln},
+ institution = {University of Nebraska},
+ note = {NTIS No.\hbox{} PB~91-154~377/AS},
+}
+
+@techreport{ex43,
+ author = {Mead, J. V.},
+ year = {1992},
+ title = {Looking at Old Photographs: Investigating the Teacher
+ Tales that Novice Teachers Bring with Them},
+ type = {Report},
+ number = {NCRTL-RR-92-4},
+ address = {East Lansing, MI},
+ institution = {National Center for Research on Teacher Learning},
+ note = {ERIC Document Reproduction Service No.\hbox{} ED346082},
+}
+
+@techreport{ex44,
+ author = {{\bibcorporate{U.S. Department of Health and
+ Human Services}}},
+ firstkey = {{U.S. Department of Health and Human Services [DHHS]}},
+ key = {{DHHS}},
+ year = {1992},
+ title = {Pressure Ulcers in Adults: Prediction and Prevention},
+ type = {AHCPR Publication},
+ number = {92-0047},
+ address = {Rockville, MD},
+ institution = {{\bibcorporate{U.S. Department of Health and
+ Human Services}}},
+}
+
+@intechreport{ex45,
+ author = {Matthews, K. A.},
+ year = {1985},
+ title = {Assessment of {Type}~{A} Behavior, Anger, and Hostility
+ in Epidemiologic Studies of Cardiovascular Disease},
+ editor = {Ostfield, A. M. and Eaker, E. D.},
+ booktitle = {Measuring Psychological Variables in Epidemiologic Studies
+ of Cardiovascular Disease},
+ type = {NIH Publication},
+ number = {85-2270},
+ pages = {153--183},
+ address = {Washington, DC},
+ institution = {U.S. Department of Health and Human Services},
+}
+
+@techreport{ex46,
+ author = {Broadhurst, R. G. and Maller, R. A.},
+ year = {1991},
+ title = {Sex Offending and Recidivism},
+ number = {3},
+ address = {Nedlands},
+ institution = {University of Western Australia, Crime Research Centre},
+}
+
+@techreport{ex47,
+ editor = {Shuker, R. and Openshaw, R. and Soler, J.},
+ year = {1990},
+ title = {Youth, Media, and Moral Panic in {New} {Zealand}:
+ From Hooligans to Video Nasties},
+ type = {Delta Research Monograph},
+ number = {11},
+ address = {Palmerston North, New Zealand},
+ institution = {Massey University, Department of Education},
+}
+
+@techreport{ex48,
+ author = {{\bibcorporate{Employee Benefit Research Institute}}},
+ firstkey = {{Employee Benefit Research Institute [EBRI]}},
+ key = {{EBRI}},
+ year = {1992},
+ month = feb,
+ title = {Sources of Health Insurance and Characteristics of the
+ Uninsured},
+ type = {Issue Brief},
+ number = {123},
+ address = {Washington, DC},
+ institution = {{\bibcorporate{Employee Benefit Research Institute}}},
+}
+
+@incollection{ex49,
+ author = {Deci, E. L. and Ryan, R. M.},
+ year = {1991},
+ title = {A Motivational Approach to Self:
+ Integration in Personality},
+ editor = {Dienstbier, R.},
+ booktitle = {Nebraska {Symposium} on {Motivation}: Vol.~38.
+ {Perspectives} on Motivation},
+ pages = {237--288},
+ address = {Lincoln},
+ publisher = {University of Nebraska Press},
+}
+
+@article{ex50,
+ author = {Cynx, J. and Williams, H. and Nottebohm, F.},
+ year = {1992},
+ title = {Hemispheric Differences in Avian Song Discrimination},
+ journal = {Proceedings of the National Academy of Sciences, USA},
+ volume = {89},
+ pages = {1372--1375},
+}
+
+@lecture{ex51,
+ author = {Lichstein, K. L. and Johnson, R. S. and Womack, T. D.
+ and Dean, J. E. and Childers, C. K.},
+ year = {1990},
+ month = jun,
+ title = {Relaxation Therapy for Polypharmacy Use in Elderly
+ Insomniacs and Noninsomniacs},
+ chair = {Rosenthal, T. L.},
+ symposium = {Reducing Medication in Geriatric Populations},
+ howpublished = {Symposium conducted at the meeting of the First
+ International Congress of Behavioral Medicine},
+ address = {Uppsala, Sweden},
+}
+
+@lecture{ex52,
+ author = {Lanktree, C. and Briere, J.},
+ year = {1991},
+ month = jan,
+ title = {Early Data on the {Trauma} {Symptom} {Checklist}
+ for {Children} ({TSC-C})},
+ howpublished = {Paper presented at the meeting of the American
+ Professional Society on the Abuse of Children},
+ address = {San Diego, CA},
+}
+
+@lecture{ex53,
+ author = {Ruby, J. and Fulton, C.},
+ year = {1993},
+ month = jun,
+ title = {Beyond Redlining: Editing Software that Works},
+ howpublished = {Poster session presented at the annual meeting of the
+ Society for Scholarly Publishing},
+ address = {Washington, DC},
+}
+
+@phdthesis{ex54,
+ author = {Bower, D. L.},
+ year = {1993},
+ title = {Employee Assistant Programs Supervisory Referrals:
+ Characteristics of Referring and Nonreferring
+ Supervisors},
+ journal = {Dissertation Abstracts International},
+ volume = {54},
+ number = {01},
+ pages = {534B},
+ note = {UMI No.~9315947},
+}
+
+@phdthesis{ex55,
+ author = {Ross, D. F.},
+ year = {1990},
+ title = {Unconscious Transference and Mistaken Identity: When
+ a Witness Misidentifies a Familiar but Innocent Person
+ from a Lineup},
+ school = {Cornell University},
+ originalyear = {1990},
+ journal = {Dissertation Abstracts International},
+ volume = {51},
+ pages = {417},
+}
+
+@phdthesis{ex56,
+ author = {Wilfley, D. E.},
+ year = {1989},
+ title = {Interpersonal Analyses of Bulimia: Normalweight
+ and Obese},
+ school = {University of Missouri},
+ address = {Columbia},
+}
+
+@mastersthesis{ex57,
+ author = {Almeida, D. M.},
+ year = {1990},
+ title = {Fathers' Participation in Family Work: Consequences
+ for Fathers' Stress and Father--Child Relations},
+ school = {University of Victoria},
+ address = {Victoria, British Columbia, Canada},
+}
+
+@unpublished{ex58,
+ author = {Stinson, C. and Milbrath, C. and Reidbord, S. and Bucci, W.},
+ year = {1992},
+ title = {Thematic Segmentation of Psychotherapy Transcripts for
+ Convergent Analyses},
+ howpublished = {Unpublished manuscript},
+}
+
+@unpublished{ex59,
+ author = {D{\'{e}}pret, E. F. and Fiske, S. T.},
+ year = {1993},
+ title = {Perceiving the Powerful: Intriguing Individuals Versus
+ Threatening Groups},
+ howpublished = {Unpublished manuscript},
+ organization = {University of Massachusetts at Amherst},
+}
+
+@unpublished{ex60,
+ author = {McIntosh, D. N.},
+ year = {1993},
+ title = {Religion as Schema, with Implications for the Relation
+ Between Religion and Coping},
+ howpublished = {Manuscript submitted for publication},
+}
+
+@unpublished{ex61,
+ author = {Bordi, F. and LeDoux, J. E.},
+ year = {1993},
+ type = {Auditory response latencies in rat auditory cortex},
+ howpublished = {Unpublished raw data},
+}
+
+@misc{ex62,
+ editor = {Klombers, N.},
+ year = {1993},
+ month = spring,
+ title = {{ADAA} {Reporter}},
+ note = {Available from the Anxiety Disorders Association of
+ America, 6000 Executive Boulevard, Suite 513,
+ Rockville, MD 20852},
+}
+
+@article{G-1,
+ author = {Mroczek, D. K.},
+ year = {2000},
+ title = {The Emerging Study of Midlife},
+ type = {Review of the book {\APACcitebtitle{Life in the middle:
+ Psychological and social development in middle age}}},
+ journal = {Contemporary Psychology: APA Review of Books},
+ volume = {45},
+ pages = {482--485},
+}
+
+@article{ex63,
+ author = {Schatz, B. R.},
+ year = {2000},
+ title = {Learning by Text or Context?},
+ type = {Review of the book
+ {\APACcitebtitle{The social life of information}}},
+ journal = {Science},
+ volume = {290},
+ pages = {1304},
+}
+
+@article{ex64,
+ author = {Kraus, S. J.},
+ year = {1992},
+ title = {Visions of Psychology: A Videotext of Classic Studies},
+ type = {Review of the motion picture
+ {\APACcitebtitle{Discovering Psychology}}},
+ journal = {Contemporary Psychology},
+ volume = {37},
+ pages = {1146--1147},
+}
+
+@misc{ex65-1,
+ author = {Scorsese, M. {\protect\bibliteral{(Producer)}\protect\bibskipbracenodot}
+ and Lonergan, K.
+ {\protect\bibliteral{(Writer/Director)}\protect\indexskipbracenodot}},
+ year = {2000},
+ title = {You Can Count On Me},
+ type = {Motion picture},
+ address = {United States},
+ publisher = {Paramount Pictures},
+}
+
+@misc{ex65-2,
+ author = {Harrison, J. {\protect\bibliteral{(Producer)}\protect\bibskipbracenodot}
+ and Schmiechen, R.
+ {\protect\bibliteral{(Director)}\protect\indexskipbracenodot}},
+ year = {1992},
+ title = {Changing Our Minds: The Story of {Evelyn} {Hooker}},
+ type = {Motion picture},
+ note = {Available from Changing Our Minds, Inc., 170 West End
+ Avenue, Suite 25R, New York, NY 10023},
+}
+
+@misc{ex65-3,
+ author = {{\bibcorporate{American Psychological Association (Producer)}}},
+ firstkey = {{American Psychological Association [APA]}},
+ key = {{APA}},
+ year = {2000},
+ title = {Responding Therapeutically to Patient Expressions of
+ Sexual Attraction: A Stimulus Training Tape},
+ type = {Motion picture},
+ note = {Available from the American Psychological Association,
+ 750 First Street, NE, Washington, DC 20002-4242},
+}
+
+@misc{ex66,
+ author = {Crystal, L. {\protect\bibliteral{(Executive
+ Producer)}\protect\indexskipbracenodot}},
+ year = {1993},
+ month = oct,
+ day = {11},
+ title = {The {MacNeil}/{Lehrer} News Hour},
+ type = {Television broadcast},
+ address = {New York and Washington, DC},
+ publisher = {Public Broadcasting Service},
+}
+
+@misc{ex67,
+ editor = {Miller, {\bibinitial{R\bibeditortype{Producer}}}},
+ year = {1989},
+ title = {The Mind},
+ type = {Television series},
+ address = {New York},
+ publisher = {WNET},
+}
+
+@incollection{ex68,
+ author = {Hall, B. {\protect\bibliteral{(Writer)}\protect\bibskipbracenodot}
+ and Bender, J.
+ {\protect\bibliteral{(Director)}\protect\indexskipbracenodot}},
+ year = {1991},
+ title = {The Rules of the Game},
+ type = {Television series episode},
+ editor = {Sander{\bibeditortype{Producer}}, J.},
+ booktitle = {I'll Fly Away},
+ address = {New York},
+ publisher = {New York Broadcasting Company},
+}
+
+@incollection{ex69-1,
+ key = {{\protect\bibsong{Shocked}{1992}{Over the
+ Waterfall}{track~5}}},
+ author = {Shocked, Michelle},
+ year = {1992},
+ title = {Over the Waterfall{\bibInstring{\BOn}}},
+ booktitle = {Arkansas Traveler {\upshape[\uppercase{CD}]}},
+ address = {New York},
+ publisher = {PolyGram Music},
+}
+
+@incollection{ex69-2,
+ key = {{\protect\bibsong{Goodenough}{1982}{Tails
+ and Trotters}{track~5}}},
+ author = {Goodenough, J. B.},
+ year = {1982},
+ title = {Tails and Trotters{\bibInstring{\BOn}}},
+ type = {Recorded by G. Bok, A. Mayo, \& E. Trickett},
+ booktitle = {And So Will We Yet {\upshape[\uppercase{CD}]}},
+ address = {Sharon, CT},
+ publisher = {Folk-Legacy Records},
+ note = {1990},
+}
+
+@misc{ex70,
+ author = {Costa, Jr.\hbox{} {\protect\bibliteral{(Speaker)}}, P. T.},
+ year = {1988},
+ title = {Personality, Continuity, and Changes of Adult Life},
+ type = {Cassette Recording},
+ number = {207-433-88A-B},
+ address = {Washington, DC},
+ publisher = {American Psychological Association},
+}
+
+@article{ex71-1,
+ author = {VandenBos, G. and Knapp, S. and Doe, J.},
+ year = {2001},
+ title = {Role of Reference Elements in the Selection of Resources
+ by Psychology Undergraduates},
+ type = {Electronic version},
+ journal = {Journal of Bibliographic Research},
+ volume = {5},
+ pages = {117--123},
+}
+
+@article{ex71-2,
+ author = {VandenBos, G. and Knapp, S. and Doe, J.},
+ year = {2001},
+ title = {Role of Reference Elements in the Selection of Resources
+ by Psychology Undergraduates},
+ journal = {Journal of Bibliographic Research},
+ volume = {5},
+ pages = {117--123},
+ lastchecked = {October 13, 2001},
+ url = {http://jbr.org/articles.html},
+}
+
+@article{ex72,
+ author = {Fredrickson, B. L.},
+ year = {2000},
+ month = mar,
+ day = {7},
+ title = {Cultivating Positive Emotions to Optimize Health
+ and Well-Being},
+ journal = {Prevention \& Treatment},
+ volume = {3},
+ pages = {Article 0001a},
+ lastchecked = {November 20, 2000},
+ url = {http://journals.apa.org/prevention/volume3/pre0030001a.html},
+}
+
+@article{ex73,
+ author = {Crow, T. J.},
+ year = {2000},
+ title = {Did \emph{Homo} {\emph{Sapiens}} Speciate on the
+ {\emph{Y}} Chromosome?},
+ journal = {Psycoloquy},
+ volume = {11},
+ lastchecked = {March 25, 2001},
+ url = {ftp://ftp.princeton.edu/harnad/Psycoloquy/
+ 2000.volume.11/psyc.00.11.001.
+ language-sex-chromosomes.1.crow},
+}
+
+@article{ex74,
+ author = {Glueckauf, R. L. and Whitton, J. and Baxter, J. and Kain, J.
+ and Vogelgesang, S. and Hudson, M. and others},
+ year = {1998},
+ month = jul,
+ title = {Videocounseling for Families of Rural Teens with
+ Epilepsy---{P}roject Update},
+ journal = {Telehealth News},
+ volume = {2},
+ number = {2},
+ lastchecked = {June 6, 2000},
+ url = {http://www.telehealth.net/subscribe/newslettr_4a.html#1},
+}
+
+@misc{ex75,
+ author = {{\bibcorporate{Greater New Milford (Ct) Area Healthy
+ Community 2000,
+ Task Force on Teen and Adolescent Issues}}},
+ firstkey = {{Greater New Milford (Ct) Area Healthy Community 2000,
+ Task Force on Teen and Adolescent Issues [TFTAI]}},
+ key = {{TFTAI}},
+ year = {\bibnodate},
+ title = {Who Has Time for a Family Meal? {You} Do!},
+ lastchecked = {October 5, 2000},
+ url = {http://www.familymealtime.org},
+}
+
+@incollection{ex76,
+ author = {{\bibcorporate{Benton Foundation}}},
+ year = {1998},
+ month = jul,
+ day = {7},
+ title = {Barriers to Closing the Gap},
+ booktitle = {Losing Ground Bit by Bit: Low-Income Communities in the
+ Information Age},
+ chapter = {2},
+ lastchecked = {August 18, 2001},
+ url = {http://www.benton.org/Library/Low-Income/two.html},
+}
+
+@misc{ex77,
+ year = {\bibnodate},
+ title = {{GVU}'s 8th {WWW} User Survey},
+ lastchecked = {August 8, 2000},
+ url = {http://www.cc.gatech.edu/gvu/user_surveys/survey-1997-10/},
+}
+
+@misc{ex78,
+ author = {Chou, L. and McClintock, R. and Moretti, F. and Nix, D. H.},
+ year = {1993},
+ title = {Technology and Education: New Wine in New Bottles:
+ Choosing Pasts and Imagining Educational Futures},
+ howpublished = {Retrieved August 24, 2000, from Columbia University,
+ Institute for Learning Technologies Web site:
+ \url{http://www.ilt.columbia.edu/
+ publications/papers/newwine1.html}\bibnodot{.}},
+}
+
+@misc{ex79,
+ author = {{\bibcorporate{University of California, San Francisco,
+ Institute for Health and Aging}}},
+ firstkey = {{University of California, San Francisco, Institute for
+ Health and Aging [UCSF-IHA]}},
+ key = {{UCSF-IHA}},
+ year = {1996},
+ month = nov,
+ title = {Chronic Care in {A}merica: {A} 21st Century Challenge},
+ howpublished = {Retrieved September 9, 2000, from the Robert Wood Johnson
+ Foundation Web site:
+ \url{http://www.rwjf.org/library/chrcare/}\bibnodot{.}},
+}
+
+@misc{ex80,
+ author = {{\bibcorporate{United States Sentencing Commission}}},
+ firstkey = {{United States Sentencing Commission [USSC]}},
+ key = {{USSC}},
+ year = {\bibnodate},
+ title = {{\APACSortNoop{Nineteen Ninety-Seven}}1997 Sourcebook of
+ Federal Sentencing Statistics},
+ lastchecked = {December 8, 1999},
+ url = {http://www.ussc.gov/annrpt/1997/sbtoc97.htm},
+}
+
+@misc{ex81,
+ author = {{\bibcorporate{Canarie, Inc.}}},
+ year = {1997},
+ month = sep,
+ day = {27},
+ title = {Towards a {Canadian} Health {IWAY}: Vision, Opportunities
+ and Future Steps},
+ lastchecked = {November 8, 2000},
+ url = {http://www.canarie.ca/press/publications/pdf/
+ health/healthvision.doc},
+}
+
+@techreport{ex82,
+ author = {Kruschke, J. K. and Bradley, A. L.},
+ year = {1995},
+ title = {Extensions to the Delta Rule of Associative Learning},
+ type = {Indiana University Cognitive Science Research Report},
+ number = {14\BmakeAbstractRetrieved},
+ lastchecked = {October 21, 2000},
+ url = {http://www.indiana.edu/~kruschke/deltarule_abstract.html},
+}
+
+@lecture{ex83,
+ author = {Cutler, L. D. and Fr{\"{o}}lich, B. and Hanrahan, P.},
+ year = {1997},
+ month = jan,
+ day = {16},
+ title = {Two-Handed Direct Manipulation on the Responsive
+ Workbench},
+ howpublished = {Paper presented at the 1997 Symposium on Interactive 3D
+ Graphics\BmakeAbstractRetrieved},
+ lastchecked = {June 12, 2000},
+ url = {http://www.graphics.stanford.edu/papers/twohanded/},
+}
+
+@lecture{ex84,
+ author = {Tan, G. and Lewandowsky, S.},
+ year = {1996},
+ title = {A Comparison of Operator Trust in Humans Versus Machines},
+ howpublished = {Paper presented at the CybErg 96 virtual conference},
+ lastchecked = {May 16, 2000},
+ url = {http://www.curtin.edu.au/conference/cyberg/
+ centre/outline.cgi/frame?dir=tan},
+}
+
+@misc{ex85,
+ author = {Chalmers, D.},
+ year = {2000},
+ month = nov,
+ day = {17},
+ title = {Seeing with Sound},
+ type = {\bibmessage},
+ number = {1},
+ url = {news://sci.psychology.consciousness}
+}
+
+@misc{ex86,
+ author = {Simons, D. J.},
+ year = {2000},
+ month = jul,
+ day = {14},
+ title = {News Resources for Visual Cognition},
+ type = {\bibmessage},
+ number = {31},
+ url = {http://groups.yahoo.com/group/visualcognition/message/31},
+}
+
+@misc{ex87,
+ author = {Hammond, T.},
+ year = {2000},
+ month = nov,
+ day = {20},
+ title = {{YAHC}: {Handle} {Parameters}, {DOI} {Genres}, etc.},
+ type = {\bibmessage},
+ howpublished = {Message posted to Ref-Links electronic mailing list,
+ archived at \url{http://www.doi.org/mail-archive/
+ ref-link/msg00088.html}\bibnodot{.}},
+}
+
+@article{ex88,
+ author = {Borman, W. C. and Hanson, M. A. and Oppler, S. H. and
+ Pulakos, E. D. and White, L. A.},
+ year = {1993},
+ title = {Role of Early Supervisory Experience in Supervisor Performance},
+ journal = {Journal of Applied Psychology},
+ volume = {78},
+ pages = {443--449},
+ howpublished = {Retrieved October 23, 2000, from the PsycARTICLES database},
+}
+
+@newspaper{ex89,
+ author = {Hilts, P. J.},
+ year = {1999},
+ month = feb,
+ day = {16},
+ title = {In Forecasting Their Emotions, Most People Flunk Out},
+ journal = {New York Times},
+ lastchecked = {November 21, 2000},
+ url = {http://www.nytimes.com},
+}
+
+@article{ex90,
+ author = {Fournier, M. and {\lowercase{D}}e Ridder, D. and Bensing, J.},
+ year = {1999},
+ title = {Optimism and Adaptation to Multiple Sclerosis: What Does
+ Optimism Mean?},
+ journal = {Journal of Behavioral Medicine},
+ volume = {22},
+ pages = {303--326},
+ howpublished = {Abstract retrieved October 23, 2000, from PsycINFO database},
+}
+
+@techreport{ex91,
+ author = {{\bibcorporate{U.S. General Accounting Office}}},
+ year = {1997},
+ month = feb,
+ title = {Telemedicine: Federal Strategy is Needed to Guide Investments},
+ type = {Publication},
+ number = {GAO/NSAID/HEHS-97-67},
+ howpublished = {Retrieved September 15, 2000, from General Accounting Office
+ Reports Online via GPO Access:
+ \url{http://www.access.gpo.gov/su_docs/aces/
+ aces160.shtml?/gao/index.html}\bibnodot{.}},
+}
+
+@misc{ex92,
+ author = {Miller, M. E.},
+ year = {1993},
+ title = {The {Interactive} {Tester}},
+ edition = {Version~4.0\noedition\ignorespaces},
+ type = {\bibcomputersoftware},
+ address = {Westminster, CA},
+ publisher = {Psytek Services},
+}
+
+@misc{ex93,
+ author = {Schwarzer, R.},
+ year = {1989},
+ title = {Statistics Software for Meta-Analysis},
+ type = {\bibcomputersoftwareandmanual},
+ lastchecked = {March 23, 2001},
+ url = {http://www.yorku.ca/faculty/academic/schwarze/meta_e.htm},
+}
+
+@manual{ex93-t1,
+ author = {{\bibcorporate{R Development Core Team}}},
+ year = {2004},
+ title = {R: A Language and Environment for Statistical Computing},
+ address = {Vienna, Austria},
+ publisher = {R Foundation for Statistical Computing},
+ url = {http://www.r-project.org},
+}
+
+@misc{ex94,
+ key = {{\APACcitebtitle{National Health Interview Survey}}},
+ title = {National {Health} {Interview} {Survey}---{Current} Health
+ Topics: 1991---{Longitudinal} Study of Aging},
+ edition = {Version~4\noedition\ignorespaces},
+ type = {Data file},
+ year = {\bibnodate},
+ address = {Hyattsville, MD},
+ publisher = {National Center for Health Statistics},
+}
+
+@misc{ex95,
+ author = {{\bibcorporate{Department of Health and Human Services,
+ National Center for Health Statistics}}},
+ firstkey = {{Department of Health and Human Services,
+ National Center for Health Statistics [DHHS-NCHS]}},
+ key = {{DHHS-NCHS}},
+ year = {1991},
+ title = {National {Health} {Provider} {Inventory}: Home Health
+ Agencies and Hospices, 1991},
+ type = {Data file},
+ howpublished = {Available from National Technical Information Service
+ Web site, \url{http://www.ntis.gov}\bibnodot{.}},
+}
+%</bibdb>
+% \end{macrocode}
+%
+% \subsection{The examples \LaTeX{} file (\fname{apacxmpl.tex})}
+%
+% The file \fname{apacxmpl.tex} contains the \LaTeX{} code for formatting
+% the examples from the APA manual. It can be studied to see how certain
+% nonstandard references can be formatted according to the APA rules,
+% to test \pkg{apacite}, and in particular to test compatibility with
+% other packages. We start with a standard head.
+% \begin{macrocode}
+%<*xmpl>
+\documentclass{article}
+\usepackage{url}
+\usepackage{apacite}
+\usepackage{apacdoc}
+
+\title{Testing \textsf{apacite}: Examples from the APA manual}
+\author{Erik Meijer\\
+ \textsf{apacite at gmail.com}
+}
+\date{2013/07/21}
+
+\begin{document}
+\maketitle
+\begin{abstract}
+This document tests \textsf{apacite} [2013/07/21 v6.03]. See the
+\textsf{apacite} documentation for more information.
+\end{abstract}
+
+%</xmpl>
+% \end{macrocode}
+%
+% \subsection{References from the 6th edition of the Publication Manual}
+%
+% These examples are from chapter~7 of the 6th edition of the APA manual.
+% \begin{macrocode}
+%<*xmpl>
+\section{Examples from chapter~7}
+
+\begin{enumerate}
+\item
+\cite{apa6:ch7-ex1} \\
+\cite{apa6:ch7-ex1} \\
+\fullciteA{apa6:ch7-ex1} \\
+\citeA{apa6:ch7-ex1}
+
+\item
+\cite{apa6:ch7-ex2} \\
+\cite{apa6:ch7-ex2} \\
+\fullciteA{apa6:ch7-ex2} \\
+\citeA{apa6:ch7-ex2}
+%</xmpl>
+%<*bibdb>
+@article{apa6:ch7-ex1,
+ author = {Herbst-Damm, Kathryn L. and Kulik, James A.},
+ year = {2005},
+ title = {Volunteer Support, Marital Status, and the Survival Times of
+ Terminally Ill Patients},
+ journal = {Health Psychology},
+ volume = {24},
+ pages = {225--229},
+ doi = {10.1037/0278-6133.24.2.225},
+}
+
+@article{apa6:ch7-ex2,
+ author = {Gilbert, David G. and McClernon, F. Joseph and
+ Rabinovich, Norka E. and Sugai, Chihiro and
+ Plath, Louisette C. and Asgaard, Greg and Zuo, Yantao and
+ Huggenvik, Jodi and Botros, Nazeih},
+ year = {2004},
+ title = {Effects of Quitting Smoking on {EEG} Activation and Attention
+ Last for More than 31 Days and are More Severe with Stress,
+ Dependence, {DRD2~A1} Allele, and Depressive Traits},
+ journal = {Nicotine \& Tobacco Research},
+ volume = {6},
+ pages = {249--267},
+ doi = {10.1080/14622200410001676305},
+}
+%</bibdb>
+% \end{macrocode}
+% Note that the page heading of the article itself gives the journal name with
+% an ampersand (`\&': \emph{Nicotine \& Tobacco Research}) and not with ``and''
+% as in the APA manual.
+% \begin{macrocode}
+%<*xmpl>
+\item
+\cite{apa6:ch7-ex3-1} \\
+\cite{apa6:ch7-ex3-1} \\
+\fullciteA{apa6:ch7-ex3-1} \\
+\citeA{apa6:ch7-ex3-1}\\
+\mbox{}\\
+\cite{apa6:ch7-ex3-2} \\
+\cite{apa6:ch7-ex3-2} \\
+\fullciteA{apa6:ch7-ex3-2} \\
+\citeA{apa6:ch7-ex3-2}
+%</xmpl>
+%<*bibdb>
+@article{apa6:ch7-ex3-1,
+ author = {Sillick, Tamra J. and Schutte, Nicola S.},
+ year = {2006},
+ title = {Emotional Intelligence and Self-Esteem Mediate Between Perceived
+ Early Parental Love and Adult Happiness},
+ journal = {E-Journal of Applied Psychology: Emotional Intelligence},
+ volume = {2},
+ number = {2},
+ pages = {38--48},
+ url = {http://ojs.lib.swin.edu.au/index.php/ejab},
+}
+
+@article{apa6:ch7-ex3-2,
+ author = {Light, Matthew A. and Light, Ivan H.},
+ year = {2008},
+ title = {The Geographic Expansion of {Mexican} Immigration in the
+ {United} {States} and its Implications for Local Law
+ Enforcement},
+ journal = {Law Enforcement Executive Forum},
+ volume = {8},
+ number = {1},
+ pages = {73--82},
+}
+%</bibdb>
+% \end{macrocode}
+% This journal appears to prefer the name \emph{Law Enforcement Executive
+% Forum} over \emph{Law Enforcement Executive Forum Journal} (see
+% \url{http://www.iletsbei.com/lee_forum/}).
+% \begin{macrocode}
+%<*xmpl>
+\item
+\cite{apa6:ch7-ex4} \\
+\cite{apa6:ch7-ex4} \\
+\fullciteA{apa6:ch7-ex4} \\
+\citeA{apa6:ch7-ex4}
+
+\item
+\cite{apa6:ch7-ex5} \\
+\cite{apa6:ch7-ex5} \\
+\fullciteA{apa6:ch7-ex5} \\
+\citeA{apa6:ch7-ex5}
+%</xmpl>
+%<*bibdb>
+@article{apa6:ch7-ex4,
+ author = {Guimard, Philippe and Florin, Agn\`es},
+ year = {2007},
+ title = {Les \'Evaluations des Enseignants en Grande Section de
+ Maternelle Sont-Elles Pr\'edictives des Difficult\'es de
+ Lecture au Cours Pr\'eparatoire?},
+ englishtitle = {Are Teacher Ratings in Kindergarten Predictive of
+ Reading Difficulties in First Grade?},
+ journal = {Approche Neuropsychologique des Apprentissages chez l'Enfant},
+ volume = {19},
+ pages = {5--17},
+}
+
+@article{apa6:ch7-ex5,
+ author = {Von Ledebur, Sidonia C.},
+ year = {2007},
+ title = {Optimizing Knowledge Transfer by New Employees in Companies},
+ journal = {Knowledge Management Research \& Practice},
+ howpublished = {Advance online publication},
+ doi = {10.1057/palgrave.kmrp.8500141},
+}
+%</bibdb>
+% \end{macrocode}
+% Here again the page heading of the article itself gives the journal name with
+% an ampersand (`\&') and not with ``and''. Note that the APA explicitly
+% changes ``von'' to ``Von'' to satisfy U.S. conventions of names. In
+% other languages, ``von'' would be retained. See elsewhere in this manual
+% for a discussion of how to treat von-parts.
+% \begin{macrocode}
+%<*xmpl>
+\item
+\cite{apa6:ch7-ex6} \\
+\cite{apa6:ch7-ex6} \\
+\fullciteA{apa6:ch7-ex6} \\
+\citeA{apa6:ch7-ex6}
+
+\item
+\cite{apa6:ch7-ex7} \\
+\cite{apa6:ch7-ex7} \\
+\fullciteA{apa6:ch7-ex7} \\
+\citeA{apa6:ch7-ex7}
+%</xmpl>
+%<*bibdb>
+@article{apa6:ch7-ex6,
+ author = {Briscoe, Robert},
+ year = {\BIP},
+ title = {Egocentric Spatial Representation in Action and Perception},
+ journal = {Philosophy and Phenomenological Research},
+ url = {http://cogprints.org/5780/1/ECSRAP.F07.pdf},
+}
+
+@magazine{apa6:ch7-ex7,
+ author = {Chamberlin, J. and Novotney, A. and Packard, E.
+ and Price, M.},
+ year = {2008},
+ month = may,
+ title = {Enhancing Worker Well-Being: Occupational Health
+ Psychologists Convene to Share Their Research on Work,
+ Stress, and Health},
+ journal = {Monitor on Psychology},
+ volume = {39},
+ number = {5},
+ pages = {26--29},
+}
+%</bibdb>
+% \end{macrocode}
+% The online version (\url{http://www.apa.org/monitor/2008/05/workstress.aspx})
+% does not have a comma in the title before the ``and''.
+% \begin{macrocode}
+%<*xmpl>
+\item
+\cite{apa6:ch7-ex8} \\
+\cite{apa6:ch7-ex8} \\
+\fullciteA{apa6:ch7-ex8} \\
+\citeA{apa6:ch7-ex8}
+%</xmpl>
+%<*bibdb>
+@magazine{apa6:ch7-ex8,
+ author = {Clay, Rebecca},
+ year = {2008},
+ month = jun,
+ title = {Science vs.\ Ideology: Psychologists Fight Back Against
+ the Misuse of Research},
+ journal = {Monitor on Psychology},
+ volume = {39},
+ number = {6},
+ url = {http://www.apa.org/monitor/},
+}
+%</bibdb>
+% \end{macrocode}
+% The APA manual incorrectly says ``about'' instead of ``against''.
+% \begin{macrocode}
+%<*xmpl>
+\item
+\cite{apa6:ch7-ex9} \\
+\cite{apa6:ch7-ex9} \\
+\fullciteA{apa6:ch7-ex9} \\
+\citeA{apa6:ch7-ex9}
+
+\item
+\cite{apa6:ch7-ex10} \\
+\cite{apa6:ch7-ex10} \\
+\fullciteA{apa6:ch7-ex10} \\
+\citeA{apa6:ch7-ex10}
+
+\item
+\cite{apa6:ch7-ex11} \\
+\cite{apa6:ch7-ex11} \\
+\fullciteA{apa6:ch7-ex11} \\
+\citeA{apa6:ch7-ex11}
+
+\item
+\cite{apa6:ch7-ex12-1} \\
+\cite{apa6:ch7-ex12-1} \\
+\fullciteA{apa6:ch7-ex12-1} \\
+\citeA{apa6:ch7-ex12-1}\\
+\mbox{}\\
+\cite{apa6:ch7-ex12-2} \\
+\cite{apa6:ch7-ex12-2} \\
+\fullciteA{apa6:ch7-ex12-2} \\
+\citeA{apa6:ch7-ex12-2}\\
+%</xmpl>
+%<*bibdb>
+@article{apa6:ch7-ex9,
+ key = {{\APACciteatitle{Six Sites Meet}}},
+ title = {Six Sites Meet for Comprehensive Anti-Gang
+ Initiative Conference},
+ year = {2006},
+ month = nov # "/" # dec,
+ journal = {OJJDP News @ a Glance},
+ url =
+ {http://www.ncjrs.gov/html/ojjdp/news_at_glance/216684/topstory.html},
+}
+
+@newspaper{apa6:ch7-ex10,
+ author = {Schwartz, John},
+ year = {1993},
+ month = sep,
+ day = {30},
+ title = {Obesity Affects Economic, Social Status},
+ journal = {The Washington Post},
+ pages = {A1, A4},
+}
+
+@newspaper{apa6:ch7-ex11,
+ author = {Brody, Jane E.},
+ year = {2007},
+ month = dec,
+ day = {11},
+ title = {Mental Reserves Keep Brain Agile},
+ journal = {The New York Times},
+ url = {http://www.nytimes.com},
+}
+
+@article{apa6:ch7-ex12-1,
+ editor = {Haney, Craig and Wiener, Richard L.},
+ year = {2004},
+ title = {Capital Punishment in the {United} {States}},
+ type = {Special issue},
+ journal = {Psychology, Public Policy, and Law},
+ volume = {10},
+ number = {4},
+}
+
+@article{apa6:ch7-ex12-2,
+ editor = {Yan, Zheng and Greenfield, Patricia},
+ year = {2006},
+ title = {Children, Adolescents, and the {Internet}},
+ type = {Special section},
+ journal = {Developmental Psychology},
+ volume = {42},
+ pages = {391--458},
+}
+%</bibdb>
+% \end{macrocode}
+% The journal lists the editors as Yan and Greenfield (in this order),
+% although the first article (editorial introduction/overview) has
+% Greenfield and Yan.
+%
+% The following is an implementation of the second bullet point: a special
+% issue with no editors.
+% \begin{macrocode}
+%<*xmpl>
+\mbox{}\\
+\cite{apa6:ch7-ex12-3} \\
+\cite{apa6:ch7-ex12-3} \\
+\fullciteA{apa6:ch7-ex12-3} \\
+\citeA{apa6:ch7-ex12-3}
+
+\item
+\cite{apa6:ch7-ex13-1} \\
+\cite{apa6:ch7-ex13-1} \\
+\fullciteA{apa6:ch7-ex13-1} \\
+\citeA{apa6:ch7-ex13-1}\\
+%</xmpl>
+%<*bibdb>
+@article{apa6:ch7-ex12-3,
+ key = {{\APACciteatitle{Capital Punishment}}},
+ title = {Capital Punishment in the {United} {States}},
+ year = {2004},
+ type = {Special issue},
+ journal = {Psychology, Public Policy, and Law},
+ volume = {10},
+ number = {4},
+}
+
+@article{apa6:ch7-ex13-1,
+ author = {Ganster, Daniel C. and Schaubroeck, John and
+ Sime, Wesley E. and Mayes, Bronston T.},
+ year = {1991},
+ title = {The Nomological Validity of the {Type~A} Personality Among
+ Employed Adults},
+ type = {Monograph},
+ journal = {Journal of Applied Psychology},
+ volume = {76},
+ pages = {143--168},
+ doi = {10.1037/0021-9010.76.1.143},
+}
+%</bibdb>
+% \end{macrocode}
+% The bullet points given here were explicit examples in the 5th edition.
+% We have to be liberal with what goes in the \fieldname{number} field
+% for these:
+% \begin{macrocode}
+%<*xmpl>
+\mbox{}\\
+\cite{apa6:ch7-ex13-2} \\
+\cite{apa6:ch7-ex13-2} \\
+\fullciteA{apa6:ch7-ex13-2} \\
+\citeA{apa6:ch7-ex13-2}\\
+\mbox{}\\
+\cite{apa6:ch7-ex13-3} \\
+\cite{apa6:ch7-ex13-3} \\
+\fullciteA{apa6:ch7-ex13-3} \\
+\citeA{apa6:ch7-ex13-3}
+%</xmpl>
+%<*bibdb>
+@article{apa6:ch7-ex13-2,
+ author = {Harris, Paul L. and Kavanaugh, Robert D.},
+ year = {1993},
+ title = {Young Children's Understanding of Pretense},
+ journal = {Monographs of the Society for Research in Child Development},
+ volume = {58},
+ number = {1, Serial No.~231},
+}
+
+@article{apa6:ch7-ex13-3,
+ author = {Battig, William F. and Montague, William E.},
+ year = {1969},
+ title = {Category Norms for Verbal Items in 56 Categories:
+ A Replication and Extension of the {Connecticut}
+ Category Norms},
+ journal = {Journal of Experimental Psychology Monographs},
+ volume = {80},
+ number = {3, Pt.~2},
+}
+%</bibdb>
+% \end{macrocode}
+% The 5th edition gives the journal as ``Journal of Experimental
+% Psychology Monographs'' and its front cover says ``Journal of Experimental
+% Psychology Monograph'', but the volume and issue number and online
+% categorization (on JSTOR) suggests that this is just a special issue
+% of \emph{Journal of Experimental Psychology}, which would argue in
+% favor of dropping the ``Monographs''.
+% \begin{macrocode}
+%<*xmpl>
+\item
+\cite{apa6:ch7-ex14} \\
+\cite{apa6:ch7-ex14} \\
+\fullciteA{apa6:ch7-ex14} \\
+\citeA{apa6:ch7-ex14}
+%</xmpl>
+%<*bibdb>
+@article{apa6:ch7-ex14,
+ key = {{\APACciteatitle{Editorial}}},
+ title = {Editorial: ``{What} Is a Disaster'' and Why Does This
+ Question Matter?},
+ year = {2006},
+ type = {Editorial},
+ journal = {Journal of Contingencies and Crisis Management},
+ volume = {14},
+ pages = {1--2},
+}
+%</bibdb>
+% \end{macrocode}
+% The doi is \doi{10.1111/j.1468-5973.2006.00475.x}; normally this would
+% be added.
+% \begin{macrocode}
+%<*xmpl>
+\item
+\cite{apa6:ch7-ex15} \\
+\cite{apa6:ch7-ex15} \\
+\fullciteA{apa6:ch7-ex15} \\
+\citeA{apa6:ch7-ex15}
+%</xmpl>
+%<*bibdb>
+@article{apa6:ch7-ex15,
+ author = {Marshall-Pescini, Sarah and Whiten, Andrew},
+ year = {2008},
+ title = {Social Learning of Nut-Cracking Behavior in {East} {African}
+ Sanctuary-Living Chimpanzees (\emph{Pan troglodytes
+ schweinfurthii})},
+ type = {Supplemental material},
+ journal = {Journal of Comparative Psychology},
+ volume = {122},
+ pages = {186--194},
+ doi = {10.1037/0735-7036.122.2.186.supp},
+}
+%</bibdb>
+% \end{macrocode}
+% Enclosing ``\verb+Pan troglodytes schweinfurthii+'' in exactly one pair of
+% braces (which happen to also be the delimiters for the \cmd{\emph} command)
+% ensures that the correct capitalization is output.
+% \begin{macrocode}
+%<*xmpl>
+\item
+\cite{apa6:ch7-ex16-1} \\
+\cite{apa6:ch7-ex16-1} \\
+\fullciteA{apa6:ch7-ex16-1} \\
+\citeA{apa6:ch7-ex16-1} \\
+\mbox{}\\
+\cite{apa6:ch7-ex16-2} \\
+\cite{apa6:ch7-ex16-2} \\
+\fullciteA{apa6:ch7-ex16-2} \\
+\citeA{apa6:ch7-ex16-2}
+%</xmpl>
+%<*bibdb>
+@article{apa6:ch7-ex16-1,
+ author = {Woolf, Nancy J. and Young, Stacey L. and Fanselow, Michael S.
+ and Butcher, Larry L.},
+ year = {1991},
+ title = {{MAP-2} Expression in Cholinoceptive Pyramidal Cells of
+ Rodent Cortex and Hippocampus is Altered by {Pavlovian}
+ Conditioning},
+ type = {Abstract},
+ journal = {Society for Neuroscience Abstracts},
+ volume = {17},
+ pages = {480},
+}
+
+@article{apa6:ch7-ex16-2,
+ author = {Lassen, Stephen R. and Steele, Michael M. and Sailor, Wayne},
+ year = {2006},
+ title = {The Relationship of School-Wide {Positive} {Behavior}
+ {Support} to Academic Achievement in an Urban Middle School},
+ journal = {Psychology in the Schools},
+ volume = {43},
+ pages = {701--712},
+ url = {http://www.interscience.wiley.com},
+}
+%</bibdb>
+% \end{macrocode}
+% The doi is \doi{10.1002/pits.20177}; normally this would be added. In
+% the title and the abstract, ``Positive Behavior Support'' is capitalized,
+% so presumably this is the proper name of an experimental program.
+% Therefore I have enclosed it in braces here as well, so that this
+% capitalization is preserved.
+% \begin{macrocode}
+%<*xmpl>
+\item
+\cite{apa6:ch7-ex17} \\
+\cite{apa6:ch7-ex17} \\
+\fullciteA{apa6:ch7-ex17} \\
+\citeA{apa6:ch7-ex17}
+%</xmpl>
+%<*bibdb>
+@article{apa6:ch7-ex17,
+ author = {Hare, Linda R. and O'Neill, Kevin},
+ year = {2000},
+ title = {Effectiveness and Efficiency in Small Academic Peer Groups:
+ A Case Study},
+ journal = {Small Group Research},
+ volume = {31},
+ pages = {24--53},
+ howpublished = {Abstract retrieved from {Sociological} {Abstracts}
+ database},
+ note = {(Accession No.\ 200010185)},
+}
+%</bibdb>
+% \end{macrocode}
+% The construction using the \fieldname{howpublished} and \fieldname{note}
+% fields does the job, but is not very elegant.
+% The doi (of the whole article) is \doi{10.1177/104649640003100102}, which
+% presumably normally would be added. The abstract is also freely available
+% on the Sage website (\url{http://sgr.sagepub.com/content/31/1/24} on
+% July 10, 2010), which is a lot more accessible than this database.
+% Note that the APA manual omits the subtitle. It is remarkable how
+% many such small errors there are in the APA manual.
+% \begin{macrocode}
+%<*xmpl>
+\item
+\cite{apa6:ch7-ex18} \\
+\cite{apa6:ch7-ex18} \\
+\fullciteA{apa6:ch7-ex18} \\
+\citeA{apa6:ch7-ex18}
+%</xmpl>
+%<*bibdb>
+@book{apa6:ch7-ex18,
+ author = {Shotton, Margaret A.},
+ year = {1989},
+ title = {Computer Addiction? {A} Study of Computer Dependency},
+ address = {London, England},
+ publisher = {Taylor \& Francis},
+}
+%</bibdb>
+% \end{macrocode}
+% I am puzzled by ``England''; ``UK'' seems more appropriate to me and that's
+% what I'm always using.
+% \begin{macrocode}
+%<*xmpl>
+\item
+\cite{apa6:ch7-ex19-1} \\
+\cite{apa6:ch7-ex19-1} \\
+\fullciteA{apa6:ch7-ex19-1} \\
+\citeA{apa6:ch7-ex19-1} \\
+\mbox{}\\
+\cite{apa6:ch7-ex19-2} \\
+\cite{apa6:ch7-ex19-2} \\
+\fullciteA{apa6:ch7-ex19-2} \\
+\citeA{apa6:ch7-ex19-2}
+%</xmpl>
+%<*bibdb>
+@book{apa6:ch7-ex19-1,
+ author = {Shotton, Margaret A.},
+ year = {1989},
+ title = {Computer Addiction? {A} Study of Computer Dependency},
+ type = {DX Reader version},
+ url = {http://www.ebookstore.tandf.co.uk/html/index.asp},
+}
+
+@book{apa6:ch7-ex19-2,
+ author = {Schiraldi, Glenn R.},
+ year = {2000},
+ title = {The Post-Traumatic Stress Disorder Sourcebook:
+ A Guide to Healing, Recovery, and Growth},
+ type = {Adobe Digital Editions version},
+ doi = {10.1036/0071393722},
+}
+%</bibdb>
+% \end{macrocode}
+% The website that this doi refers to gives the publication date as 2000,
+% so that's what I'm using here. (The APA uses 2001.) This is supposed to
+% be a ``free eBook'', but even after installing the Adobe software, the
+% link to the actual content gives a ``page not found'' error for me.
+% \begin{macrocode}
+%<*xmpl>
+\item
+\cite{apa6:ch7-ex20} \\
+\cite{apa6:ch7-ex20} \\
+\fullciteA{apa6:ch7-ex20} \\
+\citeA{apa6:ch7-ex20}
+%</xmpl>
+%<*bibdb>
+@book{apa6:ch7-ex20,
+ author = {O'Keeffe, Elton},
+ year = {\bibnodate},
+ title = {Egoism \& the Crisis in {Western} Values},
+ url = {http://www.onlineoriginals.com/showitem.asp?itemID=135},
+}
+%</bibdb>
+% \end{macrocode}
+% Note the typo in the last name of the author in the APA manual.
+% \begin{macrocode}
+%<*xmpl>
+\item
+\cite{apa6:ch7-ex21} \\
+\cite{apa6:ch7-ex21} \\
+\fullciteA{apa6:ch7-ex21} \\
+\citeA{apa6:ch7-ex21}
+%</xmpl>
+%<*bibdb>
+@incollection{apa6:ch7-ex21,
+ author = {Freud, Sigmund},
+ year = {1953},
+ title = {The Method of Interpreting Dreams:
+ An Analysis of a Specimen Dream},
+ editor = {Strachey, James},
+ translator = {Strachey, James},
+ booktitle = {The Standard Edition of the Complete Psychological
+ Works of {Sigmund} {Freud}},
+ volume = {4},
+ pages = {96--121},
+ originalyear = {1900},
+ url = {http://books.google.com/books},
+}
+%</bibdb>
+% \end{macrocode}
+% This url did not bring me very far. It took me quite some time and different
+% search strings to find the volume referred to. Search for author =
+% ``Strachey'', year = 1953, and then select ``The interpretation of dreams,
+% first part (1900)''; this leads in my case to
+% \url{http://books.google.com/books?id=moN_OQAACAAJ&
+% dq=inauthor:%22James+Strachey%22&hl=en&ei=9E1FTOyVOsHflgems_DrAw&
+% sa=X&oi=book_result&ct=result&resnum=8&ved=0CEcQ6AEwBw}, but there is
+% no preview available, and there is no useful information other than the
+% title and the author, so exactly what is ``retrieved'' is not clear to
+% me. After some internet searching, I did find
+% \url{http://www.pep-web.org/static.php?page=standardedition}, which has
+% a clickable table of contents, and presumably if you have a registered
+% IP address, the actual content. Apparently, my IP address is not registered,
+% so I had no access to the actual content.
+% \begin{macrocode}
+%<*xmpl>
+\item
+\cite{apa6:ch7-ex22} \\
+\cite{apa6:ch7-ex22} \\
+\fullciteA{apa6:ch7-ex22} \\
+\citeA{apa6:ch7-ex22}
+%</xmpl>
+%<*bibdb>
+@book{apa6:ch7-ex22,
+ editor = {Thomas, Noreen},
+ year = {2002},
+ title = {Perspectives on the Community College: A Journey of Discovery},
+ type = {Monograph},
+ url = {http://eric.ed.gov},
+}
+%</bibdb>
+% \end{macrocode}
+% The ERIC document number is ED\,463\,808.
+% \begin{macrocode}
+%<*xmpl>
+\item
+\cite{apa6:ch7-ex23} \\
+\cite{apa6:ch7-ex23} \\
+\fullciteA{apa6:ch7-ex23} \\
+\citeA{apa6:ch7-ex23}
+%</xmpl>
+%<*bibdb>
+@book{apa6:ch7-ex23,
+ editor = {Koch, Sigmund},
+ year = {1959--1963},
+ title = {Psychology: A Study of a Science},
+ volume = {1--6},
+ address = {New York, NY},
+ publisher = {McGraw-Hill},
+}
+%</bibdb>
+% \end{macrocode}
+% Note that the correct title has ``a'' before ``science''.
+% \begin{macrocode}
+%<*xmpl>
+\item
+\cite{apa6:ch7-ex24} \\
+\cite{apa6:ch7-ex24} \\
+\fullciteA{apa6:ch7-ex24} \\
+\citeA{apa6:ch7-ex24}
+%</xmpl>
+%<*bibdb>
+@incollection{apa6:ch7-ex24,
+ author = {Strong, Edward K., Jr. and Uhrbrock, Richard S.},
+ year = {1923},
+ title = {Bibliography on Job Analysis},
+ editor = {Outhwaite{\bibeditortype{Series Ed.\hbox{}}}, Leonard},
+ booktitle = {Personnel {Research} {Series}: Vol.~1. {Job} Analysis and the
+ Curriculum},
+ pages = {140--146},
+ doi = {10.1037/10762-000},
+}
+%</bibdb>
+% \end{macrocode}
+% There are several notable things with this reference: (1) The whole book is
+% written by the same authors, so I'd think we'd normally list the book title
+% in the \fieldname{title} field and in the text refer to the specific chapter
+% or pages, rather than single out the chapter in the reference list. (2)
+% The doi of the chapter is \doi{10.1037/10762-006}; the doi given here
+% is the one for the whole book. (3) It is unclear why we would mention the
+% series in which the book appears or the series editor. My impression from
+% earlier versions of the \emph{APA manual} is that this is only done if the
+% ``series'' is to be considered a joint work (like an encyclopedia) where
+% different volumes have different editors and there is a series editor. It is
+% my impression that the current work is just a book in a series of books, like
+% every publisher has its various series with their series editors. (Note that
+% the series title has to be capitalized.) So in summary, I would normally
+% format this example as
+% \begin{verbatim}
+% @book{apa6:ch7-ex24,
+% author = {Strong, Edward K., Jr. and Uhrbrock, Richard S.},
+% year = {1923},
+% title = {Job Analysis and the Curriculum},
+% doi = {10.1037/10762-000},
+% }
+% \end{verbatim}
+% where I'm using the url for the whole book, because I refer to the whole book.
+% \begin{macrocode}
+%<*xmpl>
+\item
+\cite{apa6:ch7-ex25} \\
+\cite{apa6:ch7-ex25} \\
+\fullciteA{apa6:ch7-ex25} \\
+\citeA{apa6:ch7-ex25}
+%</xmpl>
+%<*bibdb>
+@incollection{apa6:ch7-ex25,
+ author = {Haybron, Daniel M.},
+ year = {2008},
+ title = {Philosophy and the Science of Subjective Well-Being},
+ editor = {Eid, Michael and Larsen, Randy J.},
+ booktitle = {The Science of Subjective Well-Being},
+ pages = {17--43},
+ address = {New York, NY},
+ publisher = {Guilford Press},
+}
+%</bibdb>
+% \end{macrocode}
+% In previous versions of the \emph{APA manual} (e.g., 5th ed., p.~217), the
+% states or countries of a list of cities ``well known for publishing'',
+% including New York, were not given, but this has been abandoned in the 6th
+% ed.
+% \begin{macrocode}
+%<*xmpl>
+\item
+\cite{apa6:ch7-ex26} \\
+\cite{apa6:ch7-ex26} \\
+\fullciteA{apa6:ch7-ex26} \\
+\citeA{apa6:ch7-ex26}
+%</xmpl>
+%<*bibdb>
+@incollection{apa6:ch7-ex26,
+ author = {Piaget, Jean},
+ year = {1988},
+ title = {Extracts from {Piaget}'s Theory},
+ translator = {Gellerier, Guy and Langer, Jonas},
+ editor = {Richardson, Ken and Sheldon, Sue},
+ booktitle = {Cognitive Development to Adolescence: A Reader},
+ pages = {3--18},
+ address = {Hillsdale, NJ},
+ publisher = {Erlbaum},
+ originalbooktitle = {Manual of Child Psychology},
+ originalpages = {703--732},
+ originaleditor = {Mussen, Paul H.},
+ originalyear = {1970},
+ originaladdress = {New York, NY},
+ originalpublisher = {Wiley},
+}
+%</bibdb>
+% \end{macrocode}
+% It looks like the title of the Mussen book should be
+% \emph{Carmichael's Manual of Child Psychology} and it's the third edition.
+% \begin{macrocode}
+%<*xmpl>
+\item
+\cite{apa6:ch7-ex27} \\
+\cite{apa6:ch7-ex27} \\
+\fullciteA{apa6:ch7-ex27} \\
+\citeA{apa6:ch7-ex27}
+%</xmpl>
+%<*bibdb>
+@book{apa6:ch7-ex27,
+ editor = {VandenBos, Gary R.},
+ year = {2007},
+ title = {{APA} Dictionary of Psychology},
+ address = {Washington, DC},
+ publisher = {American Psychological Association},
+}
+%</bibdb>
+%<*xmpl>
+\item
+\cite{apa6:ch7-ex28} \\
+\cite{apa6:ch7-ex28} \\
+\fullciteA{apa6:ch7-ex28} \\
+\citeA{apa6:ch7-ex28}
+%</xmpl>
+%<*bibdb>
+@book{apa6:ch7-ex28,
+author = {{\bibcorporate{Real Academia Espa\~{n}ola}}},
+ year = {2001},
+ title = {Diccionario de la Lengua Espa\~{n}ola},
+ englishtitle = {Dictionary of the {Spanish} Language},
+ edition = {22},
+ address = {Madrid, Spain},
+ publisher = {{\bibcorporate{Real Academia Espa\~{n}ola}}},
+}
+%</bibdb>
+%<*xmpl>
+\item
+\cite{apa6:ch7-ex29} \\
+\cite{apa6:ch7-ex29} \\
+\fullciteA{apa6:ch7-ex29} \\
+\citeA{apa6:ch7-ex29}
+%</xmpl>
+%<*bibdb>
+@incollection{apa6:ch7-ex29,
+ author = {Graham, George},
+ year = {2007},
+ title = {Behaviorism},
+ editor = {Zalta, Edward N.},
+ booktitle = {The {Stanford} Encyclopedia of Philosophy},
+ edition = {Fall 2007},
+ url = {http://plato.stanford.edu/entries/behaviorism/},
+}
+%</bibdb>
+% \end{macrocode}
+% At the time of this writing (June 2011), this url contains the Fall 2010
+% version. The Fall 2007 version can be found at
+% \url{http://plato.stanford.edu/archives/fall2007/entries/behaviorism/}.
+% This is what the website itself says about citation:
+% \begin{quote}
+% Please note that you are being asked to cite a URL that is in a fixed,
+% archived edition of the encyclopedia. The reason for this is that the
+% Stanford Encyclopedia of Philosophy recommends that readers use a stable
+% citation for scholarly purposes. You should not cite the dynamic portion
+% of the encyclopedia.
+% \end{quote}
+% Furthermore,
+% \begin{quote}
+% There are over 50 \BibTeX{} styles and no standard format that is
+% guaranteed to work for all 50. So, we suggest you use our string as a
+% `useful suggestion' that might need to be adapted for your particular
+% \BibTeX{} file.
+% \end{quote}
+% \begin{verbatim}
+% @InCollection{sep-behaviorism,
+% author = {Graham, George},
+% title = {Behaviorism},
+% booktitle = {The Stanford Encyclopedia of Philosophy},
+% editor = {Edward N. Zalta},
+% howpublished = {\url{http://plato.stanford.edu/archives/fall2007/entries/behaviorism/}},
+% year = {2007},
+% edition = {Fall 2007},
+% }
+% \end{verbatim}
+% which is pretty similar to what I did above. The only big difference is that
+% that they put the url in the \fieldname{howpublished} field, which should
+% work fine with \pkg{apacite}, except that the APA wants the ``Retrieved from''
+% string, which is generated by \pkg{apacite} if you put the url in the
+% \fieldname{url} field but not if you put it in the \fieldname{howpublished}
+% field, so you'll have to insert it yourself in the \fieldname{howpublished}
+% field if you want to use that.
+% \begin{macrocode}
+%<*xmpl>
+\item
+\cite{apa6:ch7-ex30} \\
+\cite{apa6:ch7-ex30} \\
+\fullciteA{apa6:ch7-ex30} \\
+\citeA{apa6:ch7-ex30}
+%</xmpl>
+%<*bibdb>
+@incollection{apa6:ch7-ex30,
+ title = {Heuristic},
+ booktitle = {Merriam-{Webster}'s Online Dictionary},
+ edition = {11},
+ url = {http://www.m-w.com/dictionary/heuristic},
+}
+%</bibdb>
+% \end{macrocode}
+% One could argue that if the online edition refers to the 11th edition of
+% the print version, the year should also be the year of the print version,
+% instead of ``n.d.''.
+% \begin{macrocode}
+%<*xmpl>
+\item
+\cite{apa6:ch7-ex31} \\
+\cite{apa6:ch7-ex31} \\
+\fullciteA{apa6:ch7-ex31} \\
+\citeA{apa6:ch7-ex31}
+%</xmpl>
+%<*bibdb>
+@techreport{apa6:ch7-ex31,
+ author = {{\bibcorporate{U.S. Department of Health and Human
+ Services, National Institutes of Health, National Heart,
+ Lung, and Blood Institute}}},
+ firstkey = {{U.S. Department of Health and Human
+ Services, National Institutes of Health, National Heart,
+ Lung, and Blood Institute [NHLBI]}},
+ key = {{NHLBI}},
+ year = {2003},
+ title = {Managing Asthma: A Guide for Schools},
+ type = {NIH Publication},
+ number = {02-2650},
+ url = {http://www.nhlbi.nih.gov/health/prof/lung/asthma/asth_sch.pdf},
+}
+%</bibdb>
+% \end{macrocode}
+% This is an awfully long author name. In the 5th edition,
+% section~3.96, example~1, only ``National Institute of Mental Health''
+% was used, without all the higher levels in the hierarchy.
+% \begin{macrocode}
+%<*xmpl>
+\item
+\cite{apa6:ch7-ex32} \\
+\cite{apa6:ch7-ex32} \\
+\fullciteA{apa6:ch7-ex32} \\
+\citeA{apa6:ch7-ex32}
+%</xmpl>
+%<*bibdb>
+@techreport{apa6:ch7-ex32,
+ author = {{\bibcorporate{American Psychological Association, Task
+ Force on the Sexualization of Girls}}},
+ firstkey = {{American Psychological Association, Task
+ Force on the Sexualization of Girls [APA]}},
+ key = {{APA}},
+ year = {2007},
+ title = {Report of the {APA} {Task} {Force} on the {Sexualization}
+ of {Girls}},
+ type = {\bibnotype},
+ url = {http://www.apa.org/pi/wpo/sexualization.html},
+}
+%</bibdb>
+% \end{macrocode}
+% \begin{macrocode}
+%<*xmpl>
+\item
+\cite{apa6:ch7-ex33} \\
+\cite{apa6:ch7-ex33} \\
+\fullciteA{apa6:ch7-ex33} \\
+\citeA{apa6:ch7-ex33}
+%</xmpl>
+%<*bibdb>
+@techreport{apa6:ch7-ex33,
+ author = {Kessy, Severine S. A. and Urio, Fratern M.},
+ year = {2006},
+ title = {The Contribution of Microfinance Institutions to
+ Poverty Reduction in {Tanzania}},
+ type = {Research Report\APACredefineOnce{BRetrievedFrom}
+ {Retrieved from Research on Poverty Alleviation
+ website:\ }},
+ number = {06.3},
+ url = {http://www.repoa.or.tz/documents_storage/Publications/Reports/06.3_Kessy_and_Urio.pdf},
+}
+%</bibdb>
+% \end{macrocode}
+% Note the use of \cmd{\APACredefineOnce} from the \pkg{apacdoc}
+% package to make a one-time change of the \cmd{\BRetrievedFrom}
+% command to accommodate the ``Research on Poverty Alleviation
+% website''.
+% \begin{macrocode}
+%<*xmpl>
+\item
+\cite{apa6:ch7-ex34} \\
+\cite{apa6:ch7-ex34} \\
+\fullciteA{apa6:ch7-ex34} \\
+\citeA{apa6:ch7-ex34}
+%</xmpl>
+%<*bibdb>
+@techreport{apa6:ch7-ex34,
+ author = {McDaniel, Julie E. and Miskel, Cecil G.},
+ year = {2002},
+ title = {The Effect of Groups and Individuals on National
+ Decisionmaking: Influence and Domination in the
+ Reading Policymaking Environment},
+ type = {CIERA Report\APACredefineOnce{BRetrievedFrom}
+ {Retrieved from University of Michigan, Center for
+ Improvement of Early Reading Achievement website:\ }},
+ number = {3-025},
+ url = {http://www.ciera.org/library/reports/inquiry-3/3-025/3-025.pdf},
+}
+%</bibdb>
+% \end{macrocode}
+% The APA manual does not have a ``No.'' after ``CIERA Report'',
+% which seems like an error in the manual to me.
+% \begin{macrocode}
+%<*xmpl>
+\item
+\cite{apa6:ch7-ex35} \\
+\cite{apa6:ch7-ex35} \\
+\fullciteA{apa6:ch7-ex35} \\
+\citeA{apa6:ch7-ex35}
+%</xmpl>
+%<*bibdb>
+@techreport{apa6:ch7-ex35,
+ author = {{\bibcorporate{Employee Benefit Research Institute}}},
+ firstkey = {{Employee Benefit Research Institute [EBRI]}},
+ key = {{EBRI}},
+ year = {1992},
+ month = feb,
+ title = {Sources of Health Insurance and Characteristics of the
+ Uninsured, Analysis of the {March} 1991 {Current}
+ {Population} {Survey}},
+ type = {Issue Brief},
+ number = {123},
+ address = {Washington, DC},
+ institution = {{\bibcorporate{Employee Benefit Research Institute}}},
+}
+%</bibdb>
+% \end{macrocode}
+% The APA manual does not include a url, perhaps for the sake of
+% an example that shows address and publisher, but I was able to
+% retrieve it from \url{http://www.ebri.org/publications/ib/}
+% Also, the APA manual does not list the full title.
+% \begin{macrocode}
+%<*xmpl>
+\item
+\cite{apa6:ch7-ex36} \\
+\cite{apa6:ch7-ex36} \\
+\fullciteA{apa6:ch7-ex36} \\
+\citeA{apa6:ch7-ex36}
+%</xmpl>
+%<*bibdb>
+@lecture{apa6:ch7-ex36,
+ author = {Muellbauer, John},
+ year = {2007},
+ month = sep,
+ title = {Housing, Credit and Consumer Expenditure},
+ chair = {Ludvigson, Sydney C.},
+ symposium = {Housing and Consumer Behavior},
+ howpublished = {Symposium conducted at the meeting of the {Federal}
+ {Reserve} {Bank} of {Kansas} {City}},
+ address = {Jackson Hole, WY},
+}
+%</bibdb>
+% \end{macrocode}
+% There are several things not right about this entry. A minor point is
+% that the title does not have a comma after ``Credit''. More
+% importantly, the entry seems to misrepresent the symposium. On the
+% website
+% \url{http://www.kc.frb.org/publications/research/escp/escp-2007.cfm},
+% the symposium is listed as ``Housing, Housing Finance, \& Monetary
+% Policy, a symposium sponsored by the Federal Reserve Bank of Kansas
+% City''. So the title of the symposium is different and it is not a
+% ``meeting of'' but a ``symposium sponsored by''. ``Housing and
+% Consumer Behavior'' is the title of the session, in which
+% Muellbauer's paper is the only paper, so it appears this was simply
+% a provisional title of the paper. Ludvigson is the discussant, which
+% is not generally the same as the chair, and in fact Martin Feldstein
+% is listed as the chair of the general discussion, who also gives the
+% ``Overview and concluding remarks'' at the end of the symposium. The
+% Kansas City Fed's website posts two versions of the paper (neither of
+% which is listed in the APA manual): one downloadable from the website
+% mentioned above, which is nicely typeset and starts at page 267, and
+% thus looks like an edited published version, and one at
+% \url{http://www.kc.frb.org/publicat/sympos/2007/pdf/2007.09.17.muellbauer.pdf},
+% which looks like the accepted version from the author. The former
+% lists the middle initial ``N.'' of the author, whereas the latter
+% does not. Normally, one would cite the published version, but for the
+% sake of this example, we cite the paper presented. Nevertheless, the
+% description in the APA manual seems grossly inaccurate.
+% \begin{macrocode}
+%<*xmpl>
+\item
+\cite{apa6:ch7-ex37} \\
+\cite{apa6:ch7-ex37} \\
+\fullciteA{apa6:ch7-ex37} \\
+\citeA{apa6:ch7-ex37}
+%</xmpl>
+%<*bibdb>
+@lecture{apa6:ch7-ex37,
+ author = {Liu, Shuhua},
+ year = {2005},
+ month = may,
+ title = {Defending Against Business Crises with the Help of
+ Intelligent Agent Based Early Warning Solutions},
+ howpublished = {Paper presented at the Seventh International
+ Conference on Enterprise Information Systems},
+ address = {Miami, FL\APACredefineOnce{BRetrievedFrom}{Abstract
+ retrieved from\ }},
+ url = {http://www.iceis.org/iceis2005/abstracts_2005.htm},
+}
+%</bibdb>
+% \end{macrocode}
+% The website itself uses ``7th'' instead of ``Seventh''.
+% \begin{macrocode}
+%<*xmpl>
+\item
+\cite{apa6:ch7-ex38} \\
+\cite{apa6:ch7-ex38} \\
+\fullciteA{apa6:ch7-ex38} \\
+\citeA{apa6:ch7-ex38}
+%</xmpl>
+%<*bibdb>
+@article{apa6:ch7-ex38,
+ author = {Herculano-Houzel, Suzana and Collins, Christine E.
+ and Wong, Peiyan and Kaas, Jon H. and Lent, Roberto},
+ year = {2008},
+ title = {The Basic Nonuniformity of the Cerebral Cortex},
+ journal = {Proceedings of the National Academy of Sciences, USA},
+ volume = {105},
+ pages = {12593--12598},
+ doi = {10.1073/pnas.0805417105},
+}
+%</bibdb>
+% \end{macrocode}
+% Despite the name ``Proceedings'', this is an ordinary journal and
+% thus there is nothing special about this reference. It is
+% noteworthy, though, that in the first printing of the 6th edition
+% of the APA manual, ``, USA,'' was missing, and this addition is
+% listed as a correction in the errata on the APA website. Still this
+% is an interesting case where the APA departs from its policy of not
+% abbreviating journal titles: PNAS's website lists the name of the
+% journal as ``Proceedings of the National Academy of Sciences of the
+% United States of America'', and abbreviates it to PNAS.
+% \begin{macrocode}
+%<*xmpl>
+\item
+\cite{apa6:ch7-ex39} \\
+\cite{apa6:ch7-ex39} \\
+\fullciteA{apa6:ch7-ex39} \\
+\citeA{apa6:ch7-ex39}
+%</xmpl>
+%<*bibdb>
+@incollection{apa6:ch7-ex39,
+ author = {Katz, Itai and Gabayan, Kevin and Aghajan, Hamid},
+ year = {2007},
+ title = {A Multi-touch Surface Using Multiple Cameras},
+ editor = {Blanc-Talon, Jacques and Philips, Wilfried
+ and Popescu, Dan and Scheunders, Paul},
+ booktitle = {{Lecture} {Notes} in {Computer} {Science}: Vol.~4678.
+ {Advanced} Concepts for Intelligent Vision Systems},
+ pages = {97--108},
+ doi = {10.1007/978-3-540-74607-2_9},
+}
+%</bibdb>
+% \end{macrocode}
+% For references with a doi or url, the general rule in the 6th edition
+% is to omit the publisher and its address, so this is what I did, and
+% the example in the APA manual seems incorrect. Also, the
+% capitalization of the book title seems incorrect (cf.\ example~24).
+% From previous versions of the APA manual, I got the impression that
+% ``series'' in APA speak was the title of a coherent multivolume work
+% with possibly different volume editors, and not the name of a book
+% series with unrelated works. Because the \fieldname{series} field in
+% \BibTeX{} is intended for the latter, which would not normally be
+% included in a reference in psychology, \pkg{apacite} has ignored it
+% thus far. This example, however, falls in the latter category, and
+% thus I may need to reconsider how \pkg{apacite} deals with this,
+% especially because it seems more natural then to split what is now
+% in the \fieldname{booktitle} field into \fieldname{series},
+% \fieldname{volume}, and \fieldname{booktitle}. Note that the example
+% does not mention the series editors, unlike series examples in
+% previous editions of the APA manual.
+% \begin{macrocode}
+%<*xmpl>
+\item
+\cite{apa6:ch7-ex40} \\
+\cite{apa6:ch7-ex40} \\
+\fullciteA{apa6:ch7-ex40} \\
+\citeA{apa6:ch7-ex40} \\
+%</xmpl>
+%<*bibdb>
+@mastersthesis{apa6:ch7-ex40,
+ author = {McNiel, Donita S.},
+ year = {2006},
+ title = {Meaning Through Narrative: A Personal Narrative
+ Discussing Growing Up with an Alcoholic Mother},
+ howpublished = {Available from ProQuest Dissertations and Theses
+ database},
+ note = {UMI No.\ 1434728},
+}
+%</bibdb>
+% \end{macrocode}
+% The APA manual gives rules for unpublished theses, but provides no
+% explicit examples. So let's reuse two examples from the 5th edition
+% here. Note, however, that I obtained this information and the
+% abstracts, though not the full text, from ProQuest, and it says that
+% these are abstracted in \emph{DAI} (Series~B, Vol.~50, No.~11,
+% p.~5303, 1990) and \emph{MAI} (Vol.~30, No.~3, p.~906, 1992),
+% respectively. This also lists the title of the first one and the year
+% of the second one differently from the 5th edition of the APA manual.
+% I used the ProQuest information.
+% \begin{macrocode}
+%<*xmpl>
+\mbox{}\\
+\cite{apa6:ch7-ex40-2} \\
+\cite{apa6:ch7-ex40-2} \\
+\fullciteA{apa6:ch7-ex40-2} \\
+\citeA{apa6:ch7-ex40-2} \\
+\mbox{}\\
+\cite{apa6:ch7-ex40-3} \\
+\cite{apa6:ch7-ex40-3} \\
+\fullciteA{apa6:ch7-ex40-3} \\
+\citeA{apa6:ch7-ex40-3}
+%</xmpl>
+%<*bibdb>
+@phdthesis{apa6:ch7-ex40-2,
+ author = {Wilfley, Denise E.},
+ year = {1989},
+ title = {An Analysis of Psychological Distress, Self-concept,
+ and Patterns of Family Interactions in Two Subgroups
+ of Bulimia--Normal Weight and Obese},
+ school = {University of Missouri},
+ address = {Columbia},
+}
+@mastersthesis{apa6:ch7-ex40-3,
+ author = {Almeida, David M.},
+ year = {1989},
+ title = {Fathers' Participation in Family Work: Consequences
+ for Fathers' Stress and Father-Child Relations},
+ school = {University of Victoria},
+ address = {Victoria, British Columbia, Canada},
+}
+%</bibdb>
+%<*xmpl>
+\item
+\cite{apa6:ch7-ex41} \\
+\cite{apa6:ch7-ex41} \\
+\fullciteA{apa6:ch7-ex41} \\
+\citeA{apa6:ch7-ex41}
+%</xmpl>
+%<*bibdb>
+@phdthesis{apa6:ch7-ex41,
+ author = {Adams, Ronald Jerry},
+ year = {1973},
+ title = {Building a Foundation for Evaluation of Instruction in
+ Higher Education and Continuing Education},
+ url = {http://www.ohiolink.edu/etd/},
+}
+%</bibdb>
+% \end{macrocode}
+% \begin{macrocode}
+%<*xmpl>
+\item
+\cite{apa6:ch7-ex42} \\
+\cite{apa6:ch7-ex42} \\
+\fullciteA{apa6:ch7-ex42} \\
+\citeA{apa6:ch7-ex42}
+%</xmpl>
+%<*bibdb>
+@phdthesis{apa6:ch7-ex42,
+ author = {Bruckman, Amy},
+ year = {1997},
+ title = {{MOOSE} Crossing: Construction, Community, and
+ Learning in a Networked Virtual World for Kids},
+ school = {Massachusetts Institute of Technology},
+ url = {http://www-static.cc.gatech.edu/~asb/thesis/},
+}
+%</bibdb>
+% \end{macrocode}
+% On the thesis, the author's given names are listed as ``Amy Susan'',
+% but the APA manual only lists the first initial and the author cites
+% only her first given name in her reference list as well. The format
+% with MIT listed in parentheses fits neither rule on p.~207 of the
+% APA manual. Presumably, this was done because of a combination of
+% factors: thesis obtained from the web, but not a stable database,
+% and from the author's website at her current affiliation, not the
+% university where the degree was obtained.
+% \begin{macrocode}
+%<*xmpl>
+\item
+\cite{apa6:ch7-ex43} \\
+\cite{apa6:ch7-ex43} \\
+\fullciteA{apa6:ch7-ex43} \\
+\citeA{apa6:ch7-ex43}
+%</xmpl>
+%<*bibdb>
+@phdthesis{apa6:ch7-ex43,
+ author = {Appelbaum, Lawrence G.},
+ year = {2005},
+ title = {Three Studies of Human Information Processing:
+ Texture Amplification, Motion Representation, and
+ Figure-Ground Segregation},
+ journal = {Dissertation Abstracts International: Section B.
+ Sciences and Engineering},
+ volume = {65},
+ number = {10},
+ pages = {5428},
+}
+%</bibdb>
+% \end{macrocode}
+% Unlike previous versions of the APA manual, where DAI abstracts had a
+% parenthetical part like ``(Doctoral dissertation, University of
+% California, Irvine, 2004)'', this is now formatted purely as a
+% journal article, so I could have simply used the \entryname{@article}
+% entry type. The \fieldname{school} and in particular
+% \fieldname{originalyear} fields should now be omitted.
+% \begin{macrocode}
+%<*xmpl>
+\item
+\cite{apa6:ch7-ex44} \\
+\cite{apa6:ch7-ex44} \\
+\fullciteA{apa6:ch7-ex44} \\
+\citeA{apa6:ch7-ex44}
+%</xmpl>
+%<*bibdb>
+@phdthesis{apa6:ch7-ex44,
+ author = {Carlbom, Pelle},
+ year = {2000},
+ title = {Carbody and Passengers in Rail Vehicle Dynamics},
+ type = {Doctoral thesis},
+ school = {Royal Institute of Technology},
+ address = {Stockholm, Sweden},
+ url = {http://urn.kb.se/resolve?urn=urn:nbn:se:kth:diva-3029},
+}
+%</bibdb>
+% \end{macrocode}
+% This follows the same pattern as example~42. ``Doctoral thesis'' is
+% presumably an error; it should be ``Doctoral dissertation''.
+% \begin{macrocode}
+%<*xmpl>
+\end{enumerate}
+\bibliographystyle{apacite}
+\bibliography{apa5ex}
+\end{document}
+%</xmpl>
+% \end{macrocode}
+%
+% \subsection{Additional references}
+%
+% \begin{macrocode}
+%<*bibdb>
+@book{APAManual3,
+ author = {{\bibcorporate{American Psychological Association}}},
+ firstkey = {{American Psychological Association [APA]}},
+ key = {{APA}},
+ year = {1984},
+ title = {Publication Manual of the {American} {Psychological}
+ {Association}},
+ edition = {3},
+ address = {Washington, DC},
+ publisher = {{\bibcorporate{American Psychological Association}}},
+ note = {with revisions},
+}
+
+@book{APAManual5,
+ author = {{\bibcorporate{American Psychological Association}}},
+ firstkey = {{American Psychological Association [APA]}},
+ key = {{APA}},
+ year = {2001},
+ title = {Publication Manual of the {American} {Psychological}
+ {Association}},
+ edition = {5},
+ address = {Washington, DC},
+ publisher = {{\bibcorporate{American Psychological Association}}},
+}
+
+@book{APAManual6,
+ author = {{\bibcorporate{American Psychological Association}}},
+ firstkey = {{American Psychological Association [APA]}},
+ key = {{APA}},
+ year = {2009},
+ title = {Publication Manual of the {American} {Psychological}
+ {Association}},
+ edition = {6},
+ address = {Washington, DC},
+ publisher = {{\bibcorporate{American Psychological Association}}},
+}
+
+@book{chicago,
+ title = {The {Chicago} Manual of Style},
+ edition = {15},
+ year = {2003},
+ address = {Chicago},
+ publisher = {The University of Chicago Press},
+}
+
+@misc{Pata88,
+ author = {Patashnik, Oren},
+ year = {1988},
+ title = {{\BibTeX ing}},
+ url = {http://www.ctan.org/tex-archive/biblio/
+ bibtex/distribs/doc/btxdoc.tex},
+ lastchecked = {October 4, 2008},
+}
+
+@book{LaTeXbook,
+ author = {Lamport, Leslie},
+ year = {1994},
+ title = {{\APACSortNoop{LaTeX}}{\LaTeX}: A Document Preparation System.
+ {User}'s Guide and Reference Manual},
+ edition = {2},
+ address = {Reading, MA},
+ publisher = {Addison-Wesley},
+}
+
+@book{KoDa04,
+ author = {Kopka, Helmut and Daly, Patrick W.},
+ year = {2004},
+ title = {Guide To {\APACSortNoop{LaTeX}}{\LaTeX}},
+ edition = {4},
+ address = {Boston, MA},
+ publisher = {Addison-Wesley},
+}
+
+@book{TLC2,
+ author = {Mittelbach, Frank and Goossens, Michel},
+ year = {2004},
+ title = {The {\APACSortNoop{LaTeX}}{\LaTeX} Companion},
+ edition = {2},
+ address = {Boston, MA},
+ publisher = {Addison-Wesley},
+}
+
+@book{dLMe08a,
+ editor = {De Leeuw, Jan and Meijer, Erik},
+ year = {2008},
+ title = {Handbook of Multilevel Analysis},
+ address = {New York, NY},
+ publisher = {Springer},
+}
+
+@book{meijer1998,
+ author = {Meijer, Erik},
+ year = {1998},
+ title = {Structural Equation Models for Nonnormal Data},
+ address = {Leiden, Netherlands},
+ publisher = {DSWO Press},
+}
+
+@article{meijer07,
+ author = {Meijer, Erik},
+ year = {2007},
+ title = {Citations, Reference List, and Author Index with
+ \textsf{apacite}},
+ journal = {Eutypon},
+ volume = {16--19},
+ pages = {1--31},
+ url = {http://www.eutypon.gr/eutypon/e-cont-16-19.html},
+}
+
+@book{WaMe00,
+ author = {Wansbeek, Tom and Meijer, Erik},
+ year = {2000},
+ title = {Measurement Error and Latent Variables in Econometrics},
+ address = {Amsterdam, Netherlands},
+ publisher = {North-Holland},
+}
+
+@unpublished{APA-3rd-ed-ex53,
+ author = {Gottfredson, G. D.},
+ year = {1978},
+ title = {Why Don't Vocational Interests Predict Job
+ Satisfaction Better Than They Do?},
+ howpublished = {Unpublished manuscript},
+ organization = {Johns Hopkins University, Center for Social
+ Organization of Schools},
+ address = {Baltimore},
+}
+
+@misc{DePsych01,
+ key = {{\APACciteatitle{Uitgebreide Richtlijnen}}},
+ title = {Uitgebreide Richtlijnen voor het Aanleveren van Kopij},
+ englishtitle = {Detailed Guidelines for the Submission of Manuscripts},
+ year = {2001},
+ lastchecked = {January~3, 2005},
+ url = {http://upload.lectric.nl/data/nip7/Richtlijnen%20voor%20auteurs.pdf},
+}
+
+@article{NTPG04,
+ title = {Aanwijzingen voor Auteurs},
+ englishtitle = {Instructions for Authors},
+ year = {2004},
+ journal = {Nederlands Tijdschrift voor de Psychologie en haar
+ Grensgebieden},
+ volume = {59},
+ pages = {inside back cover},
+}
+
+@book{Renk02,
+ author = {Renkema, J.},
+ year = {2002},
+ title = {Schrijfwijzer},
+ englishtitle = {Writing Indicator},
+ edition = {4},
+ address = {Den Haag, The Netherlands},
+ publisher = {Sdu},
+}
+
+@article{Schr04,
+ author = {Schrooten, M. G. S. and Smulders, F. T. Y.},
+ year = {2004},
+ title = {Een Experimentele Kijk op Angst: Aandacht en Automatisme
+ in de Verwerking van Bedreigende Stimuli},
+ englishtitle = {Anxiety from an Experimental Point of View: Attention and
+ Automaticity in the Processing of Threatening Stimuli},
+ journal = {Nederlands Tijdschrift voor de Psychologie en haar
+ Grensgebieden},
+ volume = {59},
+ pages = {135--149},
+}
+
+@book{VanDale89,
+ key = {{\APACcitebtitle{van Dale}}},
+ title = {van {Dale} Groot Woordenboek {Engels}-{Nederlands}},
+ englishtitle = {van {Dale}'s Large Dictionary {English}-{Dutch}},
+ edition = {2},
+ year = {1989},
+ address = {Utrecht, The Netherlands},
+ publisher = {Van Dale},
+}
+
+@book{KLO05,
+ author = {Haapam\"aki, Tuula and Hedman, Arne
+ and H\"am\"al\"ainen, Esa and Kurvinen, Birgitta
+ and Lager, Lassi and Lindegren, Yrj\"o
+ and Murtomaa, Eeva and Vainikka, Eila},
+ year = {2005},
+ title = {Monografioiden kuvailu},
+ englishtitle = {Description for Monographic Publications},
+ address = {Helsinki, Finland},
+ publisher = {Helsingin yliopiston kirjasto},
+ url = {http://www.kansalliskirjasto.fi/kirjastoala/
+ luettelointisaannot/Files/liitetiedosto2/
+ monografioiden_kuvailu.pdf},
+ lastchecked = {January 19, 2009},
+}
+
+@book{DGPs07,
+ firstkey = {Deutsche Gesellschaft f\"ur Psychologie [DGPs]},
+ key = {DGPs},
+ author = {\bibcorporate{Deutsche Gesellschaft f\"ur Psychologie}},
+ year = {2007},
+ title = {Richtlinien zur {Manuskriptgestaltung}},
+ englishtitle = {Guidelines for Manuscript Preparation},
+ edition = {3},
+ address = {G\"ottingen, Germany},
+ publisher = {Hogrefe-Verlag},
+}
+
+@misc{UIB08,
+ author = {{\bibcorporate{University of Bergen}}},
+ year = {2008},
+ title = {American {Psychological} {Association} ({APA})},
+ url = {http://www.sokogskriv.no/norsk/basis/sitering-etikk/APA.pdf},
+ lastchecked = {October 12, 2008},
+ address = {Bergen, Norway},
+ publisher = {University of Bergen, University Library},
+}
+%% Referenced from
+%% \url{http://www.sokogskriv.no/norsk/basis/sitering-etikk/4-stiler.html}
+%%
+%% Original version:
+%% \url{http://www.ub.uib.no/felles/IK/APA.pdf}
+%% but this page does not exist anymore on 2008/10/12.
+%%
+%% Norwegian name:
+%% Universitetsbiblioteket, Universitetet I Bergen, 2008
+
+@misc{UiO06,
+ author = {{\bibcorporate{University of Oslo}}},
+ year = {2006},
+ title = {Normer for skriftlig arbeid},
+ englishtitle = {Standards for Written Works},
+ url = {http://www.uio.no/studier/emner/medisin/isv/SYKVIT4400/v07/
+ REV_normer_skriftl_arb.pdf},
+ lastchecked = {October 12, 2008},
+ address = {Oslo, Norway},
+ publisher = {University of Oslo, Institute of Nursing and Health Sciences},
+}
+%% Referenced from
+%% \url{http://www.uio.no/studier/emner/medisin/isv/SYKVIT4400/v07/}
+%%
+%% Norwegian name:
+%% Universitetet i Oslo, Sykepleievitenskap, 28.06.06
+
+
+@misc{Erik01,
+ author = {Erikson, Martin G.},
+ year = {2001},
+ title = {Att Skriva Litteraturreferenser Enligt {Harvard}-Systemet},
+ englishtitle = {Citations According to the {Harvard} System},
+ url = {http://www.his.se/upload/10631/referenser.pdf},
+ lastchecked = {October 18, 2008},
+ Eriksremark = {Originally downloaded December 9, 2004, from
+ \url{http://www.ida.his.se/ida/kurser/exjobb/kursmaterial/referenser.pdf},
+ but this site does not exist anymore.},
+}
+
+@misc{Johnsson,
+ author = {Johnsson, Mattias},
+ title = {Lathund for Referensskrivning},
+ englishtitle = {Cheat Sheet for Formatting of References},
+ url = {http://www.ped.gu.se/users/berner/htmarkiv/referens.html},
+ lastchecked = {October 18, 2008},
+ Eriksremark = {Originally downloaded December 9, 2004},
+}
+
+@misc{GU94,
+ title = {Referensskrivning},
+ englishtitle = {Formatting of References},
+ year = {1994},
+ url = {http://www.ped.gu.se/forskarutbildning/Referens_skrivning.htm},
+ lastchecked = {October 18, 2008},
+ Eriksremark = {Originally downloaded December 9, 2004.
+ Site is Gothenburg University Web site, but reference seems
+ specific enough. Authors may be (?)
+ Informatorn/Dahlgren/Ottosson, but I don't know first
+ names.},
+}
+
+%%
+%</bibdb>
+% \end{macrocode}
+%
+% \section{\BibTeX\ style (\fname{apacite.bst} and its siblings)}
+% The program in \BibTeX's language that formats the reference list.
+% Currently, this supplies four files: \fname{apacite.bst}, \fname{apacitex.bst}
+% \fname{apacann.bst}, and \fname{apacannx.bst}.
+% These files are almost identical, but \fname{apacitex.bst} and
+% \fname{apacannx.bst} generate information that can be used to generate an
+% author index, and \fname{apacann.bst} and \fname{apacannx.bst} use annotation
+% when available for annotated bibliographies.
+%
+% We start with file headers and a function that prints the version number in
+% the \fname{.blg} file.
+% \begin{macrocode}
+%<*!annotated>
+%<bibstyle>%% apacite.bst : reference list according to APA manual
+%<xbibstyle>%% apacitex.bst : reference list according to APA manual
+%<xbibstyle>%% with author indexing information
+%</!annotated>
+%<*annotated>
+%<bibstyle>%% apacann.bst : reference list according to APA manual
+%<bibstyle>%% with annotations
+%<xbibstyle>%% apacannx.bst : reference list according to APA manual
+%<xbibstyle>%% with annotations and author indexing information
+%</annotated>
+%<*bibstyle|xbibstyle>
+%% Written by Erik Meijer
+
+FUNCTION {identify.apacite.version}
+{ % Put identifying string in the .blg file
+%</bibstyle|xbibstyle>
+%<*!annotated>
+%<bibstyle> "apacite.bst"
+%<xbibstyle> "apacitex.bst"
+%<bibstyle> " [2013/07/21 v6.03 APA bibliography style]"
+%<xbibstyle> " [2013/07/21 v6.03 APA bibl. style with author index info]"
+%</!annotated>
+%<*annotated>
+%<bibstyle> "apacann.bst"
+%<xbibstyle> "apacannx.bst"
+%<bibstyle> " [2013/07/21 v6.03 APA annotated bibliography style]"
+%<*xbibstyle>
+" [2013/07/21 v6.03 APA annotated bibl. style with author index info]"
+%</xbibstyle>
+%</annotated>
+%<*bibstyle|xbibstyle>
+ * top$
+}
+% \end{macrocode}
+% Declaration of fields, integers, and strings for each entry.
+% \begin{macrocode}
+ENTRY
+ { address
+ annote
+ annotate
+ author
+ booktitle
+ chair
+ chapter
+ day
+ doi
+ edition
+ editor
+ englishtitle
+ firstkey
+ howpublished
+ institution
+ journal
+ key
+ lastchecked
+ month
+ nihms
+ note
+ number
+ organization
+ originaladdress
+ originalbooktitle
+ originaledition
+ originaleditor
+ originaljournal
+ originalnumber
+ originalpages
+ originalpublisher
+ originalvolume
+ originalyear
+ pages
+ pmcid
+ publisher
+ school
+ series
+ symposium
+ text
+ title
+ translator
+ type
+ url
+ urldate
+ volume
+ year
+ }
+ { cite.order %% order of first citation
+ title.number %% for sorting titles
+ cite.initials %% dummy (0-1) indicating whether or not
+ %% initials of the 1st author must
+ %% be used for citing
+ cite.num.names.full %% number of names to be cited for full and
+ cite.num.names.short %% short cite
+ add.to.year %% For a, b, c, etc. after year
+ %% in multiple citations with same author-year
+ }
+ { year.label %% For sorting entries by year
+ author.year.sort.label %% For sorting entries and checking whether
+ %% initials should be added, how many authors
+ %% should be cited and whether a, b, etc.
+ %% after year is necessary
+ title.sort.label %% for sorting titles
+ citeorder.sort.label %% for sorting by citation order
+ type.2 %% Replacement for type with misc entries and
+ %% entries that revert to misc.
+ }
+% \end{macrocode}
+% Declaration of global integers and strings.
+% \begin{macrocode}
+INTEGERS { len pos name.max old.number numnames numnames.old
+ nameptr lastname format.num.names cite.initials.old
+ cite.num.names.old add.to.year.old forward
+ multiresult dot brace.level
+ }
+
+STRINGS { s t u old.label field
+ aut1f aut1s aut1f.old aut1s.old
+ aut2 aut2.old
+ aut3 aut3.old
+ aut4 aut4.old
+ aut5 aut5.old
+ aut6 aut6.old
+ year.label.old
+ }
+% \end{macrocode}
+% Two functions that can be used for testing purposes.
+% \begin{macrocode}
+FUNCTION {test} { #0 }
+FUNCTION {dump.stack}
+{ "---- STACK {" cite$ * "} ----" * top$
+ stack$
+ "---- END STACK {" cite$ * "} ----" * top$
+}
+% \end{macrocode}
+% A small function that indicates whether index entries must be generated.
+% This is the only line that is different between \fname{apacite.bst} and
+% \fname{apacitex.bst} (and between \fname{apacann.bst} and
+% \fname{apacannx.bst}).
+% \begin{macrocode}
+%</bibstyle|xbibstyle>
+%<bibstyle>FUNCTION {make.index} { #0 }
+%<xbibstyle>FUNCTION {make.index} { #1 }
+%<*bibstyle|xbibstyle>
+% \end{macrocode}
+% A small function that indicates whether the reference list must be
+% sorted.
+% \begin{macrocode}
+FUNCTION {unsorted} { #0 }
+% \end{macrocode}
+% Month macros. We use numbers, along with a \LaTeX{} function, which
+% translates them into words. This allows language-specific deviations.
+% \begin{macrocode}
+MACRO {jan} {"{\APACmonth{01}}"}
+MACRO {feb} {"{\APACmonth{02}}"}
+MACRO {mar} {"{\APACmonth{03}}"}
+MACRO {apr} {"{\APACmonth{04}}"}
+MACRO {may} {"{\APACmonth{05}}"}
+MACRO {jun} {"{\APACmonth{06}}"}
+MACRO {jul} {"{\APACmonth{07}}"}
+MACRO {aug} {"{\APACmonth{08}}"}
+MACRO {sep} {"{\APACmonth{09}}"}
+MACRO {oct} {"{\APACmonth{10}}"}
+MACRO {nov} {"{\APACmonth{11}}"}
+MACRO {dec} {"{\APACmonth{12}}"}
+MACRO {winter} {"{\APACmonth{13}}"}
+MACRO {spring} {"{\APACmonth{14}}"}
+MACRO {summer} {"{\APACmonth{15}}"}
+MACRO {fall} {"{\APACmonth{16}}"}
+% \end{macrocode}
+% Logical ``not'': If the top element on the stack is $A$ then this function
+% does the following:
+% \begin{verbatim}
+% push { #0 }
+% push { #1 }
+% \end{verbatim}
+% So now the first three elements of the stack are
+% \verb+{ #1 }+ \verb+{ #0 }+ $A$.
+% These are popped and subjected to ``if'':
+% If $A > 0$ then \verb+{ #0 }+ is executed, else \verb+{ #1 }+ is executed:
+% \begin{verbatim}
+% if A > 0
+% then 0
+% else 1
+% \end{verbatim}
+% So consider integers as logicals, where 1 = true and 0 = false,
+% then this does
+% \begin{verbatim}
+% (if A then false else true)
+% \end{verbatim}
+% which is a logical ``not''.
+% \begin{macrocode}
+FUNCTION {not}
+{ { #0 }
+ { #1 }
+ if$
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% Logical 'and':
+% If the first 2 elements on the stack are A B
+% then this function does the following:
+% push 'skip$
+% push { pop$ #0 }
+% So now first 4 elements are
+% { pop$ #0 } 'skip$ A B
+% The first 3 are popped and subjected to 'if' (B is on top of
+% the stack):
+% If A > 0 then 'skip$ is executed, else { pop$ #0 } is executed:
+% if A > 0
+% then (B stays on top of stack)
+% else (B is popped and #0 is pushed)
+% So consider integers as logicals, where 1 = true and 0 = false,
+% then this does
+% (if A then B else false)
+% which is a logical 'and'.
+
+FUNCTION {and}
+{ 'skip$
+ { pop$ #0 }
+ if$
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% Logical 'or':
+% If the first 2 elements on the stack are A B
+% then this function does the following:
+% push { pop$ #1 }
+% push 'skip$
+% So now first 4 elements are
+% 'skip$ { pop$ #1 } A B
+% The first 3 are popped and subjected to 'if' (B is on top of
+% the stack):
+% If A > 0 then { pop$ #1 } is executed, else 'skip$ is executed:
+% if A > 0
+% then (B is popped and #1 is pushed)
+% else (B stays on top of stack)
+% So consider integers as logicals, where 1 = true and 0 = false,
+% then this does
+% (if A then true else B)
+% which is a logical 'or'.
+
+FUNCTION {or}
+{ { pop$ #1 }
+ 'skip$
+ if$
+}
+
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% GENERAL PURPOSE FUNCTIONS FOR FORMATTING %
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ % issues warning if field is empty
+ % call with
+ % "field" field warning.if.empty
+ % Note that the first field must be between quotes
+ % because it is the fieldname for use in the warning message.
+ %
+FUNCTION {warning.if.empty}
+{ empty$
+ { "No " swap$ * " in " * cite$ * warning$ }
+ { pop$ }
+ if$
+}
+
+
+
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ %
+ % issues warning if title, type, and howpublished are empty
+ %
+FUNCTION {check.relevant.fields}
+{ title empty$
+ type empty$ and
+ howpublished empty$ and
+ { "No title, type, and howpublished in " cite$ * warning$ }
+ 'skip$
+ if$
+}
+
+
+
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ %
+ % delivers 1 if (both editor and translator
+ % not empty and not equal to each other)
+ % 0 if (editor or translator empty) or
+ % (editor = translator)
+ %
+FUNCTION {editor.ne.trans}
+{ translator empty$
+ { #0 }
+ { editor empty$
+ { #0 }
+ { translator editor =
+ { #0 }
+ { #1 }
+ if$
+ }
+ if$
+ }
+ if$
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% Convert integer to string, assume that integer < 100,000
+
+FUNCTION {conv.int.to.str}
+{ duplicate$ #10 <
+ { "0000" swap$ int.to.str$ * }
+ { duplicate$ #100 <
+ { "000" swap$ int.to.str$ * }
+ { duplicate$ #1000 <
+ { "00" swap$ int.to.str$ * }
+ { duplicate$ #10000 <
+ { "0" swap$ int.to.str$ * }
+ { int.to.str$ }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+}
+
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% Delivers 1 if possibly editor in author position
+% 2 if editor not in author position
+% 3 if not applicable: use key
+% 0 if unknown type
+
+FUNCTION {ref.type}
+{ type$ "article" =
+ type$ "magazine" =
+ type$ "newspaper" =
+ type$ "book" =
+ type$ "techreport" =
+ type$ "unpublished" =
+ type$ "misc" =
+ type$ "booklet" =
+ type$ "manual" =
+ type$ "proceedings" =
+ or
+ or
+ or
+ or
+ or
+ or
+ or
+ or
+ or
+ { #1 }
+ { type$ "incollection" =
+ type$ "phdthesis" =
+ type$ "mastersthesis" =
+ type$ "lecture" =
+ type$ "inbook" =
+ type$ "inproceedings" =
+ type$ "conference" =
+ type$ "intechreport" =
+ or
+ or
+ or
+ or
+ or
+ or
+ or
+ { #2 }
+ { type$ "literal" =
+ { #3 }
+ { #0 }
+ if$
+ }
+ if$
+ }
+ if$
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% Delivers 1 if title is formatted as an "article"-type,
+% 0 otherwise
+
+FUNCTION {is.atype}
+{ type$ "article" =
+ type$ "magazine" =
+ type$ "newspaper" =
+ type$ "incollection" =
+ type$ "inbook" =
+ type$ "inproceedings" =
+ type$ "conference" =
+ type$ "intechreport" =
+ type$ "manual" =
+ or
+ or
+ or
+ or
+ or
+ or
+ or
+ or
+ { #1 }
+ { journal empty$ not
+ %
+ type$ "phdthesis" =
+ type$ "mastersthesis" =
+ or
+ %
+ and
+ { #1 }
+ { type$ "misc" =
+ type empty$ not and
+ { type "\bibmessage" =
+ type "\bibcomputerprogram" =
+ type "\bibcomputerprogrammanual" =
+ type "\bibcomputerprogramandmanual" =
+ type "\bibcomputersoftware" =
+ type "\bibcomputersoftwaremanual" =
+ type "\bibcomputersoftwareandmanual" =
+ type "\bibprogramminglanguage" =
+ or
+ or
+ or
+ or
+ or
+ or
+ or
+ { #1 }
+ { #0 }
+ if$
+ }
+ { #0 }
+ if$
+ }
+ if$
+ }
+ if$
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ %
+ % connects two strings with connect string
+ % if one of them empty, then connect string
+ % is left out
+ %
+ % call with S1 S2 connectstring connect.check
+ %
+FUNCTION {connect.check}
+{ 'u :=
+ %
+ % if S2 = ""
+ %
+ duplicate$ empty$
+ %
+ % then remove S2
+ %
+ { pop$
+ %
+ % S1 is on top of stack.
+ % if it is empty, it is replaced by the empty string ""
+ %
+ duplicate$ empty$
+ { pop$ "" }
+ 'skip$
+ if$
+ }
+ %
+ % else swap S1 and S2 so that S1 can be checked
+ %
+ { swap$
+ %
+ % if S1 is empty, remove S1 so that S2 is left on the
+ % stack and is the result is given
+ %
+ duplicate$ empty$
+ { pop$ }
+ %
+ % now the real work starts:
+ % push the connect string "C"
+ % so that top of stack is "C" "S1" "S2"
+ % concatenate, so that top of stack is
+ % "S1+C" "S2"
+ %
+ { u *
+ %
+ % swap and concatenate
+ %
+ swap$ *
+ }
+ if$
+ }
+ if$
+}
+
+
+
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ %
+ % connects two strings with space ("\ ")
+ % if length of second is 4 or larger,
+ % connects them with non-breaking space ("tie", "~")
+ % if length of second smaller than 4
+ %
+ % call with S1 S2 tie.or.space.connect
+ % result: "S1\ S2" or "S1~S2"
+ %
+FUNCTION {tie.or.space.connect}
+{ duplicate$ text.length$ #4 <
+ { "~" }
+ { "\ " }
+ if$
+ swap$ * *
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ %
+ % connects two strings with comma (", ")
+ % if one of them is empty, the comma is left out
+ %
+ % call with S1 S2 connect.with.comma.check
+ % result: "S1, S2"
+ %
+FUNCTION {connect.with.comma.check}
+{ ", " connect.check }
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ %
+ % connects two strings with semicolon ("; ")
+ % if one of them is empty, semicolon is left out
+ %
+ % call with S1 S2 connect.with.semicolon.check
+ % result: "S1; S2"
+ %
+FUNCTION {connect.with.semicolon.check}
+{ "; " connect.check }
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ %
+ % connects two strings with colon (": ")
+ % if one of them is empty, colon is left out
+ %
+ % call with S1 S2 connect.with.colon.check
+ % result: "S1: S2"
+ %
+FUNCTION {connect.with.colon.check}
+{ ": " connect.check }
+
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ %
+ % connects two strings with space ("\ ")
+ %
+ % call with S1 S2 connect.with.space.check
+ % result: "S1\ S2"
+ %
+FUNCTION {connect.with.space.check}
+{ "\ " connect.check }
+
+
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ %
+ % encloses string in pre- and postfix string
+ % call with
+ % prefix postfix S enclose.check
+ % delivers empty string if S empty
+ %
+FUNCTION {enclose.check}
+{ duplicate$ empty$
+ { pop$ pop$ pop$
+ ""
+ }
+ { swap$ * * }
+ if$
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ %
+ % emphasizes top of stack
+ % call with
+ % "string" emphasize.check
+ %
+FUNCTION {emphasize.check}
+{ "\Bem{" swap$
+ "}" swap$
+ enclose.check
+}
+
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ %
+ % brackets top of stack
+ % call with
+ % "string" bracket
+ %
+FUNCTION {bracket.check}
+{ "[" swap$
+ "]" swap$
+ enclose.check
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ %
+ % parenthesizes top of stack
+ % call with
+ % "string" parenthesize
+ %
+FUNCTION {parenthesize.check}
+{ "(" swap$
+ ")" swap$
+ enclose.check
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ %
+ % checks whether argument is "multiresult":
+ % whether it contains '-', '+', or ',' characters
+ % used with pages to check whether pp. or p. must be used
+ %
+FUNCTION {multi.result.check}
+{ 't :=
+ #0 'multiresult :=
+ %
+ % while (not multiresult) and (length(t) > 1) do
+ %
+ { multiresult not
+ t text.length$ #1 >
+ and
+ }
+ %
+ % if t(1-2) = "--" or t(1) = "+" or ","
+ % then multiresult = 1
+ % else t = t(2-last)
+ %
+ { t #1 #2 substring$ 's :=
+ "--" s =
+ { #1 'multiresult := }
+ { t #1 #1 substring$ 's :=
+ "+" s =
+ "," s =
+ or
+ { #1 'multiresult := }
+ { t #2 global.max$ substring$ 't := }
+ if$
+ }
+ if$
+ }
+ while$
+ multiresult
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ %
+ % Checks whether an author is a corporate author, i.e.,
+ % whether the field starts with "{\bibcorporate".
+ % Call with
+ % field is.bibcorporate
+ %
+FUNCTION {is.bibcorporate}
+{ #1 #14 substring$ "{\bibcorporate" = }
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% GENERAL PURPOSE FUNCTIONS FOR SORTING %
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% Remove non-alphanumeric characters
+% and change to lower case .
+
+FUNCTION {sortify}
+{ purify$
+ "l" change.case$
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% Remove spaces from a string. Used for sorting.
+%
+% Call with
+% string remove.spaces
+%
+% E.g.,
+% "fine old day" remove.spaces
+% gives "fineoldday" .
+
+FUNCTION {remove.spaces}
+{ % Remove spaces from string.
+ % Works best if string only contains alphanumeric characters and spaces.
+ 's := % The original string
+ s text.length$ 'len := % Its length (no. of characters)
+ "" 't := % Initialize the transformed string
+ #0 'pos :=
+ %
+ % while (pos < len) do
+ %
+ { pos len < }
+ { pos #1 + 'pos :=
+ s pos #1 substring$ 'u :=
+ %
+ % u is the pos-th character in s
+ % If it is a space, move to next character,
+ % else copy character to output.
+ %
+ u " " =
+ 'skip$
+ { t u * 't := }
+ if$
+ }
+ while$
+ %
+ % Now push the result back on the stack
+ t
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% BASIC OUTPUT FUNCTIONS %
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ %
+ % end block by writing what's left on the stack and
+ % starting a new line
+ %
+FUNCTION {output.end.block}
+{ write$
+ newline$
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ %
+ % end block by adding a period and writing what's left
+ % on the stack and starting a new line
+ %
+FUNCTION {output.dot.end.block}
+{ add.period$
+ output.end.block
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ %
+ % starting new block by writing what's left on the stack,
+ % starting a new line and adding some extra space or
+ % whatever is more defined in \newblock
+ %
+FUNCTION {output.new.block}
+{ output.end.block
+ "\newblock" write$ newline$
+}
+
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ %
+ % starting new block by writing what's left on the stack,
+ % starting a new line and adding some extra space or
+ % whatever is more defined in \newblock
+ %
+FUNCTION {output.dot.new.block}
+{ add.period$
+ output.new.block
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% Starting new block assuming that stack is empty.
+% Starting a new line and adding some extra space or
+% whatever is more defined in \newblock
+
+FUNCTION {start.new.block}
+{ "\unskip\ " write$ newline$
+ "\newblock " write$ newline$
+}
+% \end{macrocode}
+%
+% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% \subsection{Functions for sorting by author (or substitute),
+% year, title}
+% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% The ``classic'' versions are the ones with the von part
+% treated a in ``Beethoven, L. van'', whereas the nonclassic ones
+% have the new approach with the von part always before the last
+% name. The ``classic'' versions are not used in this version,
+% but I keep them defined so it's easy to switch, and perhaps
+% define an option in the future.
+% \begin{macrocode}
+
+FUNCTION {sort.name.format.classic} { "{ll{}}{ f{}}{ vv{}}{ jj{}}" }
+
+FUNCTION {cite.name.format.classic} { "{ll}" }
+
+FUNCTION {author.name.format.classic} { "{ll}{, f{\BPBI }.}{ vv}{, jj}" }
+
+FUNCTION {index.name.format.classic} { "{ll}{, f{\BPBI }.}{ vv}{, jj}" }
+
+FUNCTION {sort.name.format} { "{vv{}}{ll{}}{ f{}}{ jj{}}" }
+
+FUNCTION {cite.name.format} { "{vv }{ll}" }
+
+FUNCTION {cite.initials.name.format} { "{f{\BPBI }.~~}{vv }{ll}{ jj}" }
+
+FUNCTION {author.name.format} { "{vv }{ll}{, f{\BPBI }.}{, jj}" }
+
+FUNCTION {editor.name.format} { "{f{\BPBI }.~~}{vv }{ll}{ jj}" }
+
+FUNCTION {index.name.format} { "{vv }{ll}{, f{\BPBI }.}{, jj}" }
+
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% Check whether initials must be added (1).
+% Initialization.
+
+FUNCTION {init.initials}
+{ "yyyyy" 'aut1f.old :=
+ "yyyyy" 'aut1s.old :=
+ #0 'cite.initials.old :=
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% Check whether initials must be added (2).
+% Update when author, editor, and key fields are not used.
+%
+% Call with
+% field update.no.initials
+
+FUNCTION {update.no.initials}
+{ 'field :=
+ field 'aut1f.old :=
+ field 'aut1s.old :=
+ #0 'cite.initials.old :=
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% Check whether initials must be added (3).
+
+FUNCTION {check.add.initials.aut}
+{ %
+ % If last name is equal to previous last name
+ % but initials are different, then initials should
+ % be cited. If initials are also the same, initials
+ % should be cited if that is the case for the previous
+ % author .
+ %
+ aut1s aut1s.old =
+ { aut1f aut1f.old =
+ { cite.initials.old 'cite.initials := }
+ { #1 'cite.initials :=
+ aut1f 'aut1f.old :=
+ aut1s 'aut1s.old :=
+ cite.initials 'cite.initials.old :=
+ }
+ if$
+ }
+ { %
+ % Different last name.
+ aut1f 'aut1f.old :=
+ aut1s 'aut1s.old :=
+ cite.initials 'cite.initials.old :=
+ }
+ if$
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% Check whether initials must be added (4).
+% Call with
+% field check.add.initials.field
+
+FUNCTION {check.add.initials.field}
+{ 'field :=
+ field #1 cite.initials.name.format format.name$ 'aut1f :=
+ field #1 cite.name.format format.name$ 'aut1s :=
+ %
+ % Now do the actual work
+ %
+ check.add.initials.aut
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% Check whether initials must be added (4).
+
+FUNCTION {check.add.initials}
+{ %
+ % Check whether author or editor or other field acts as author.
+ % Initials are only relevant with author or editor.
+ %
+ firstkey empty$ not
+ { key empty$ not
+ { %
+ % Both key and firstkey are nonempty.
+ % Then, key is treated as last name of first author,
+ % and firstkey is treated as last name + initials of
+ % first author .
+ %
+ firstkey sortify remove.spaces 'aut1f :=
+ key sortify remove.spaces 'aut1s :=
+ check.add.initials.aut
+ }
+ { firstkey sortify remove.spaces update.no.initials }
+ if$
+ }
+ { key empty$ not
+ { key sortify remove.spaces update.no.initials }
+ { %
+ % No key or firstkey, so find out which field
+ % to use as author.
+ %
+ % Check reference type:
+ % if result is 1 then possibly editor acts as author
+ % 2 then editor does not act as author
+ % 3 then key should have been used
+ % 0 then unknown reference type
+ ref.type #2 =
+ { %
+ % Format first author with and without initials
+ author empty$
+ { title.sort.label update.no.initials }
+ { author check.add.initials.field }
+ if$
+ }
+ { %
+ % Format first author with and without initials
+ author empty$
+ { editor empty$
+ { title.sort.label update.no.initials }
+ { editor check.add.initials.field }
+ if$
+ }
+ { author check.add.initials.field }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% Compute tentative number of names that must be cited (1).
+% Call with
+% field tentative.cite.num.names.field
+
+FUNCTION {tentative.cite.num.names.field}
+{ 'field :=
+ field num.names$ 'numnames :=
+ numnames #3 <
+ { %
+ % 1 or 2 names: always cite all of them.
+ numnames 'cite.num.names.full :=
+ numnames 'cite.num.names.short :=
+ }
+ { numnames #6 <
+ { %
+ % 3-5 names: cite all of them the first time,
+ % only the first name later times
+ numnames 'cite.num.names.full :=
+ #1 'cite.num.names.short :=
+ }
+ { %
+ % 6 or more names: cite only the first name
+ #1 'cite.num.names.full :=
+ #1 'cite.num.names.short :=
+ }
+ if$
+ }
+ if$
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% Compute tentative number of names that must be cited (2).
+
+FUNCTION {tentative.cite.num.names}
+{ %
+ % Check whether author or editor or other field acts as author.
+ % Number of names is only relevant with author or editor.
+ %
+ firstkey empty$ not
+ {
+ #1 'cite.num.names.full :=
+ #1 'cite.num.names.short :=
+ }
+ { key empty$ not
+ {
+ #1 'cite.num.names.full :=
+ #1 'cite.num.names.short :=
+ }
+ { %
+ % No key or firstkey, so find out which field
+ % to use as author.
+ %
+ % Check reference type:
+ % if result is 1 then possibly editor acts as author
+ % 2 then editor does not act as author
+ % 3 then key should have been used
+ % 0 then unknown reference type
+ ref.type #2 =
+ { %
+ % Format first author with and without initials
+ author empty$
+ {
+ #1 'cite.num.names.full :=
+ #1 'cite.num.names.short :=
+ }
+ { author tentative.cite.num.names.field }
+ if$
+ }
+ { %
+ % Format first author with and without initials
+ author empty$
+ { editor empty$
+ {
+ #1 'cite.num.names.full :=
+ #1 'cite.num.names.short :=
+ }
+ { editor tentative.cite.num.names.field }
+ if$
+ }
+ { author tentative.cite.num.names.field }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% Initialize "number of names to be cited" before
+% looping over entries.
+
+FUNCTION {init.cite.num.names}
+{ #0 'cite.num.names.old :=
+ #0 'numnames.old :=
+ "yyyy" 'year.label.old :=
+ #0 'add.to.year.old :=
+ "" 'aut1f.old :=
+ "" 'aut2.old :=
+ "" 'aut3.old :=
+ "" 'aut4.old :=
+ "" 'aut5.old :=
+ "" 'aut6.old :=
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% Update "number of names to be cited" .
+
+FUNCTION {update.cite.num.names}
+{ cite.num.names.short 'cite.num.names.old :=
+ numnames 'numnames.old :=
+ year.label 'year.label.old :=
+ add.to.year 'add.to.year.old :=
+ aut1f 'aut1f.old :=
+ aut2 'aut2.old :=
+ aut3 'aut3.old :=
+ aut4 'aut4.old :=
+ aut5 'aut5.old :=
+ aut6 'aut6.old :=
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% Format (maximally) 6 authors for comparison issues
+% to determine number of authors that must be cited.
+% It is assumed that the 'field' and 'numnames' variables
+% have already been defined.
+
+FUNCTION {format.6.authors}
+{ %
+ % First author: with initials.
+ %
+ field #1 cite.initials.name.format format.name$ 'aut1f :=
+ %
+ % Second and later authors: without initials.
+ %
+ numnames #1 >
+ name.max #1 >
+ and
+ { %
+ % 2nd author
+ field #2 cite.name.format format.name$ 'aut2 :=
+ %
+ numnames #2 >
+ name.max #2 >
+ and
+ { %
+ % 3nd author
+ field #3 cite.name.format format.name$ 'aut3 :=
+ %
+ numnames #3 >
+ name.max #3 >
+ and
+ { %
+ % 4th author
+ field #4 cite.name.format format.name$ 'aut4 :=
+ %
+ numnames #4 >
+ name.max #4 >
+ and
+ { %
+ % 5th author
+ field #5 cite.name.format format.name$ 'aut5 :=
+ %
+ numnames #5 >
+ name.max #5 >
+ and
+ { %
+ % 6th author
+ field #6 cite.name.format format.name$ 'aut6 :=
+ }
+ { %
+ % 5 authors: 6 is empty
+ %
+ "" 'aut6 :=
+ }
+ if$
+ }
+ { %
+ % 4 authors: 5-6 are empty
+ %
+ "" 'aut5 :=
+ "" 'aut6 :=
+ }
+ if$
+ }
+ { %
+ % 3 authors: 4-6 are empty
+ %
+ "" 'aut4 :=
+ "" 'aut5 :=
+ "" 'aut6 :=
+ }
+ if$
+ }
+ { %
+ % 2 authors: 3-6 are empty
+ %
+ "" 'aut3 :=
+ "" 'aut4 :=
+ "" 'aut5 :=
+ "" 'aut6 :=
+ }
+ if$
+ }
+ { %
+ % Only 1 author: 2-6 are empty
+ %
+ "" 'aut2 :=
+ "" 'aut3 :=
+ "" 'aut4 :=
+ "" 'aut5 :=
+ "" 'aut6 :=
+ }
+ if$
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% Compute definitive number of names that must be cited
+% and whether a's or b's must be added to year (1).
+% a's or b's are necessary: update add.to.year variable
+
+FUNCTION {change.add.to.year}
+{
+ forward #1 =
+ { %
+ % Moving forward: this add.to.year number must be 1 higher than
+ % previous.
+ %
+ add.to.year.old #0 >
+ { add.to.year.old #1 + 'add.to.year := }
+ { #2 'add.to.year := }
+ if$
+ }
+ { %
+ % Moving backward: this add.to.year number must be 1 lower than
+ % previous.
+ %
+ add.to.year.old #1 - 'add.to.year :=
+ }
+ if$
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% Compute definitive number of names that must be cited
+% and whether a's or b's must be added to year (1).
+% Current and/or previous entry has 1 or 2 authors
+% or editors acting as authors and they are published in the
+% same year. The number of authors does not need to be changed
+% in this case, but a's or b's may be necessary.
+
+FUNCTION {definitive.cite.num.names.1.or.2}
+{ %
+ numnames numnames.old =
+ { %
+ % Same number of names: ambiguity could arise. Check whether current
+ % and previous have the same author(s).
+ %
+ aut1f aut1f.old =
+ { %
+ % Same first author: if the second author is also the same or if
+ % there is only one author, a's and b's should be added.
+ %
+ aut2 aut2.old =
+ numnames #2 =
+ and
+ %
+ numnames #1 =
+ or
+ { %
+ % Same author(s): add to year.
+ %
+ change.add.to.year
+ }
+ { %
+ % Different second author: no ambiguity possible.
+ %
+ skip$
+ }
+ if$
+ }
+ { %
+ % Different first author: no ambiguity possible.
+ %
+ skip$
+ }
+ if$
+ }
+ { %
+ % Different number of names: no ambiguity possible.
+ %
+ skip$
+ }
+ if$
+}
+
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% Compute definitive number of names that must be cited
+% and whether a's or b's must be added to year (2).
+% Both current and previous entries have 3 or more authors
+% or editors acting as authors and they are published in the
+% same year.
+
+FUNCTION {definitive.cite.num.names.3.or.more}
+{ %
+ % Check whether current and previous have the same first author.
+ %
+ aut1f aut1f.old =
+ { %
+ % Same first author: check second author
+ %
+ aut2 aut2.old =
+ { %
+ % Same 1st & 2nd author: check 3rd.
+ %
+ aut3 aut3.old =
+ { %
+ % Same 1st-3rd authors: check 4th.
+ %
+ numnames.old #3 =
+ { numnames #3 =
+ { %
+ % Both current and previous have 3 authors, which are
+ % the same, so both have identical author-year
+ % combinations, so ambiguity should be resolved by
+ % a's and b's. Check whether more authors were
+ % necessary for previous one.
+ %
+ change.add.to.year
+ cite.num.names.short cite.num.names.old <
+ { cite.num.names.old
+ 'cite.num.names.short :=
+ }
+ 'skip$
+ if$
+ }
+ { %
+ % Previous has 3 authors, current has more, with same
+ % first 3, so at least 4 must be used for current to
+ % make a difference.
+ %
+ cite.num.names.short #4 <
+ { #4 'cite.num.names.short := }
+ 'skip$
+ if$
+ }
+ if$
+ }
+ { numnames #3 =
+ { %
+ % Current has 3 authors, previous has more, with same
+ % first 3, so all 3 of current must be used.
+ %
+ numnames 'cite.num.names.short :=
+ }
+ { %
+ % Same 1st-3rd author and both current and previous
+ % have at least 4 authors: check 4th.
+ %
+ aut4 aut4.old =
+ { %
+ % Same 1st-4th authors: check 5th.
+ %
+ numnames.old #4 =
+ { numnames #4 =
+ { %
+ % Both current and previous have 4 authors,
+ % which are the same, so both have
+ % identical author-year combinations, so
+ % ambiguity should be resolved by a's and
+ % b's. Check whether more authors were
+ % necessary for previous one.
+ %
+ change.add.to.year
+ cite.num.names.short cite.num.names.old <
+ { cite.num.names.old
+ 'cite.num.names.short :=
+ }
+ 'skip$
+ if$
+ }
+ { %
+ % Previous has 4 authors, current has more,
+ % with same first 4, so at least 5 must be
+ % used for current to make a difference.
+ %
+ cite.num.names.short #5 <
+ { #5 'cite.num.names.short := }
+ 'skip$
+ if$
+ }
+ if$
+ }
+ { numnames #4 =
+ { %
+ % Current has 4 authors, previous has more,
+ % with same first 4, so all 4 of current
+ % must be used.
+ %
+ numnames 'cite.num.names.short :=
+ }
+ { %
+ % Same 1st-4th author and both current and
+ % previous have at least 5 authors: check
+ % 5th.
+ %
+ aut5 aut5.old =
+ { %
+ % Same 1st-5th authors: check 6th.
+ %
+ numnames.old #5 =
+ { numnames #5 =
+ { %
+ % Both current and previous
+ % have 5 authors, which are the
+ % same, so both have identical
+ % author-year combinations, so
+ % ambiguity should be resolved
+ % by a's and b's. Check whether
+ % more authors were necessary
+ % for previous one.
+ %
+ change.add.to.year
+ cite.num.names.short
+ cite.num.names.old <
+ { cite.num.names.old
+ 'cite.num.names.short :=
+ }
+ 'skip$
+ if$
+ }
+ { %
+ % Previous has 5 authors,
+ % current has more, with same
+ % first 5, so at least 6 must
+ % be used for current to make
+ % a difference.
+ %
+ cite.num.names.short #6 <
+ { #6 'cite.num.names.short := }
+ 'skip$
+ if$
+ }
+ if$
+ }
+ { numnames #5 =
+ { %
+ % Current has 5 authors,
+ % previous has more, with same
+ % first 5, so all 5 of current
+ % must be used.
+ %
+ numnames 'cite.num.names.short :=
+ }
+ { %
+ % Same 1st-5th author and both
+ % current and previous have at
+ % least 6 authors. If one has
+ % 6 authors and the other has
+ % more or the 6th is different,
+ % 6 should be used (which is
+ % the maximum).
+ %
+ numnames #6 >
+ numnames.old #6 =
+ and
+ %
+ numnames #6 =
+ numnames.old #6 >
+ and
+ %
+ or
+ %
+ aut6 aut6.old =
+ not
+ %
+ or
+ { #6 cite.num.names.short <
+ { #6
+ 'cite.num.names.short
+ :=
+ }
+ 'skip$
+ if$
+ }
+ { %
+ % The first 6 authors are
+ % the same and either both
+ % have 6 or both have more.
+ % So for all practical
+ % purposes they have
+ % identical author-year
+ % combination, so ambiguity
+ % should be resolved by a's
+ % and b's. Check whether
+ % more authors were
+ % necessary for previous
+ % one.
+ %
+ change.add.to.year
+ cite.num.names.short
+ cite.num.names.old
+ <
+ { cite.num.names.old
+ 'cite.num.names.short
+ :=
+ }
+ 'skip$
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ { %
+ % Different 5th author: citing 5 authors is
+ % sufficient for this comparison.
+ %
+ cite.num.names.short #5 <
+ { #5 'cite.num.names.short := }
+ 'skip$
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ { %
+ % Different 4th author: citing 4 authors is
+ % sufficient for this comparison.
+ %
+ cite.num.names.short #4 <
+ { #4 'cite.num.names.short := }
+ 'skip$
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ { %
+ % Different 3rd author: citing 3 authors is sufficient for this
+ % comparison.
+ %
+ cite.num.names.short #3 <
+ { #3 'cite.num.names.short := }
+ 'skip$
+ if$
+ }
+ if$
+ }
+ { %
+ % Different 2nd author: citing 2 authors is sufficient for this
+ % comparison.
+ %
+ cite.num.names.short #2 <
+ { #2 'cite.num.names.short := }
+ 'skip$
+ if$
+ }
+ if$
+ }
+ { %
+ % Different first author: no ambiguity, move to next entry.
+ %
+ skip$
+ }
+ if$
+}
+
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% Compute definitive number of names that must be cited
+% and whether a's or b's must be added to year (3).
+% Current entry has an author or editor acting as author.
+%
+% Call with
+% field definitive.cite.num.names.field
+%
+% What should we do with explicit "others"? Is now ignored.
+% If this causes ambiguity that could be resolved, the user
+% should have added additional author names.
+
+FUNCTION {definitive.cite.num.names.field}
+{ 'field :=
+ field num.names$ 'numnames :=
+ %
+ % Format authors
+ %
+ format.6.authors
+ %
+ % Now compare authors with authors of previous entry.
+ %
+ cite.num.names.short numnames.old >
+ { %
+ % The previous entry has less authors than already defined
+ % necessary to be cited. No ambiguity is possible and we're ready.
+ %
+ skip$
+ }
+ { %
+ % Both previous and current entry have at least one author .
+ %
+ year.label year.label.old =
+ { %
+ % Same year label: possibly ambiguous citation.
+ %
+ % First check: current and/or previous have 1 or
+ % 2 authors.
+ %
+ numnames #3 <
+ numnames.old #3 <
+ or
+ %
+ { definitive.cite.num.names.1.or.2 }
+ { definitive.cite.num.names.3.or.more }
+ if$
+ }
+ { %
+ % Different year label: everything's fine,
+ % move to next entry.
+ %
+ skip$
+ }
+ if$
+ }
+ if$
+ %
+ % If during the previous process the name maximum is exceeded
+ % (which was not checked), correct this. NOTE: If the name
+ % maximum is smaller than 6, this could lead to ambiguous
+ % citations if, e.g., the year and the first 5 authors are
+ % the same, but the 6th author is different.
+ %
+ cite.num.names.short name.max >
+ { name.max 'cite.num.names.short := }
+ 'skip$
+ if$
+ %
+ % For a "full" cite, the number of names should always be at least
+ % as large as for a "short" cite.
+ %
+ cite.num.names.full cite.num.names.short <
+ { cite.num.names.short 'cite.num.names.full := }
+ 'skip$
+ if$
+ %
+ % Update "old" variables for next entry.
+ %
+ update.cite.num.names
+}
+
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% Compute definitive number of names that must be cited (4)
+% and especially whether a's and b's should be added.
+% This function is for the situation when author or editor
+% are not used and firstkey, key, or something else is
+% used to cite the referenced work.
+%
+% Call with
+% formatted.field definitive.cite.no.names
+
+FUNCTION {definitive.cite.no.names}
+{ %
+ % The formatted field that acts as author is on top
+ % of the stack.
+ 'aut1f :=
+ "" 'aut2 :=
+ "" 'aut3 :=
+ "" 'aut4 :=
+ "" 'aut5 :=
+ "" 'aut6 :=
+ #1 'numnames :=
+ %
+ year.label year.label.old =
+ { %
+ % Same year label: possibly ambiguous citation.
+ %
+ definitive.cite.num.names.1.or.2
+ }
+ { %
+ % Different year label: everything's fine,
+ % move to next entry.
+ %
+ skip$
+ }
+ if$
+ %
+ % Update "old" variables for next entry.
+ %
+ update.cite.num.names
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% Compute definitive number of names that must be cited (5).
+
+FUNCTION {definitive.cite.num.names}
+{ %
+ % Check whether author or editor or other field acts as author.
+ % Number of names is only relevant with author or editor.
+ %
+ firstkey empty$ not
+ { firstkey sortify remove.spaces definitive.cite.no.names }
+ { key empty$ not
+ { key sortify remove.spaces definitive.cite.no.names }
+ { %
+ % No key or firstkey, so find out which field
+ % to use as author.
+ %
+ % Check reference type:
+ % if result is 1 then possibly editor acts as author
+ % 2 then editor does not act as author
+ % 3 then key should have been used
+ % 0 then unknown reference type
+ ref.type #2 =
+ { %
+ % Format first author with and without initials
+ author empty$
+ { title.sort.label definitive.cite.no.names }
+ { author definitive.cite.num.names.field }
+ if$
+ }
+ { %
+ % Format first author with and without initials
+ author empty$
+ { editor empty$
+ { title.sort.label definitive.cite.no.names }
+ { editor definitive.cite.num.names.field }
+ if$
+ }
+ { author definitive.cite.num.names.field }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% Make a tentative year sorting label (without `a' and `b').
+
+FUNCTION {make.tentative.year.sort.label}
+{ %
+ % Implicit or explicit ``no date'' is put at the front
+ % (the year zero; years B.C. will imply complications)
+ % because these are possibly old works.
+ % ``In press'' is put at the end.
+ %
+ year empty$
+ { "0000" 'year.label := }
+ { year "\bibnodate" =
+ year "l" change.case$ "no date" = or
+ year "l" change.case$ "n.d." = or
+ { "0000" 'year.label := }
+ { year "\BIP" =
+ year "l" change.case$ "in press" = or
+ year "l" change.case$ "forthcoming" = or
+ { "9999" 'year.label := }
+ { % It is not checked whether the year field
+ % makes sense.
+ year sortify remove.spaces 'year.label :=
+ }
+ if$
+ }
+ if$
+ }
+ if$
+ %
+ % Push year sort label on the stack
+ year.label
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% Give month and day when available.
+
+FUNCTION {month.number.day}
+{ month empty$
+ { "" }
+ { month sortify remove.spaces
+ %
+ % Add the day when available.
+ day empty$
+ 'skip$
+ { "/" *
+ day sortify remove.spaces *
+ }
+ if$
+ }
+ if$
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% Make tentative sort label with names in field on top of
+% the stack.
+%
+% Call with
+% field make.name.sort.label
+% where 'field' is the field that takes the author-role.
+
+FUNCTION {make.name.sort.label}
+{ %
+ % Author or editor-acting-as-author available.
+ % => Make tentative "short cite with initials" author
+ % label (L1) of one of the forms
+ % "Last1 F1"
+ % "Last1 F1 Last2"
+ % "Last1 F1 zzzz" ("zzzz" representing et al.)
+ % => If more than 2 'authors': make label (L2) for 2nd-6th authors
+ % of one of the forms
+ % "Last2 Last3"
+ % "Last2 Last3 Last4"
+ % "Last2 Last3 Last4 Last5"
+ % "Last2 Last3 Last4 Last5 Last6"
+ % "Last2 Last3 Last4 Last5 Last6 zzzz"
+ %
+ % Then format year label (L3) of one of the forms:
+ % "0000" (missing year or explicit 'no date')
+ % "9999" ('in press')
+ % year (otherwise; don't use originalyear here yet)
+ %
+ % From earlier sorting of titles, we have title number. Convert
+ % to string, which gives title label (L4) .
+ %
+ % Then tentative sorting label (author.year.sort.label) is a
+ % concatenation of
+ % L1
+ % " "
+ % L3
+ % " "
+ % L2
+ % " "
+ % L4
+ %
+ % The name field is on top of the stack.
+ 'field :=
+ %
+ % numnames is the total number of names contained in field
+ field num.names$ 'numnames :=
+ %
+ % Format first author
+ field #1 sort.name.format format.name$
+ %
+ % Format the second author if there are two, or else "zzzz" = et al.
+ numnames #1 =
+ 'skip$
+ { numnames #2 =
+ { %
+ % Two authors: format second author
+ field #2 "{ll{}}" format.name$ 's :=
+ s "others" =
+ { " zzzz" * } % Add "et al."-substitute
+ { " " * s * } % Add second author
+ if$
+ }
+ { " zzzz" * } % 3 or more authors: add "et al."-substitute
+ if$
+ }
+ if$
+ " " * % Add spaces
+ make.tentative.year.sort.label * % Add year (L3).
+ " " * % Add spaces
+ %
+ % Now build up L2 if applicable
+ numnames #3 <
+ 'skip$
+ { %
+ % Treat last author slightly differently
+ numnames name.max >
+ { name.max 'lastname :=
+ " zzzz" % Push "et al."-substitute on stack
+ }
+ { numnames 'lastname :=
+ "" % Push empty string on stack
+ }
+ if$
+ %
+ % Names 2 to "last" - 1
+ "" % Push empty string on stack
+ #2 'nameptr :=
+ { nameptr lastname < }
+ { % Add name no. nameptr
+ field nameptr "{ll{}}" format.name$ *
+ " " *
+ nameptr #1 + 'nameptr :=
+ }
+ while$
+ %
+ % "Last" author
+ field lastname "{ll{}}" format.name$ 's :=
+ s "others" =
+ { "zzzz" * } % Add "et al."-substitute
+ { s * } % Add last author
+ if$
+ %
+ swap$ * % Add the previously formatted empty string or
+ % "et al."-substitute if there are many authors.
+ * % Add L2 to the earlier labels.
+ }
+ if$
+ %
+ " " * % Add spaces
+ title.number conv.int.to.str * % Add sorted title number (L4).
+ sortify % Clean up and convert to lowercase
+ " " * % Add spaces
+ month.number.day * % Add month and day when available
+ 'author.year.sort.label := % Assign result to sort label.
+}
+
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% Called by make.tentative.sort.label to make tentative
+% sort label if key or firstkey is available or author and
+% editor are empty or unusable.
+%
+% Call with
+% field make.field.year.sort.label
+% where 'field' is the field that takes the author-role,
+% perhaps already subjected to removing articles from the
+% beginning.
+
+FUNCTION {make.field.year.sort.label}
+{ %
+ % 'field' acts as first author (L1), subsequent authors
+ % are empty (L2).
+ %
+ % Then format year label (L3) of one of the forms:
+ % "0000" (missing year or explicit 'no date')
+ % "9999" ('in press')
+ % year (otherwise; don't use originalyear here yet)
+ %
+ % From earlier sorting of titles, we have title number. Convert
+ % to string, which gives title label (L4) .
+ %
+ % Then tentative sorting label (author.year.sort.label) is a
+ % concatenation of
+ % L1
+ % " "
+ % L3
+ % " "
+ % L2
+ % " "
+ % L4
+ %
+ % 'field' is on top of the stack. It is already supposed to be cleaned
+ % (i.e., sortified and space-removed), so this is already L1.
+ " " * % Add spaces to L1
+ make.tentative.year.sort.label * % Add year (L3).
+ " " * % Add spaces
+ " " * % L2 is empty, add spaces
+ title.number conv.int.to.str * % Add sorted title number (L4).
+ sortify % Clean up and convert to lowercase
+ " " * % Add spaces
+ month.number.day * % Add month and day when available
+ 'author.year.sort.label := % Assign result to sort label.
+}
+
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% Called by make.tentative.sort.label to make tentative
+% sort label if key or firstkey are not available and
+% author or editor may be used
+
+FUNCTION {make.author.editor.sort.label}
+{ author empty$
+ { editor empty$
+ { %
+ % Use what has previously been stored in title.sort.label
+ % as author substitute .
+ title.sort.label make.field.year.sort.label
+ }
+ { editor make.name.sort.label }
+ if$
+ }
+ { author make.name.sort.label }
+ if$
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% Called by make.tentative.sort.label to make tentative
+% sort label if key or firstkey are not available and
+% author (but not editor) may be used
+
+FUNCTION {make.author.sort.label}
+{ author empty$
+ { %
+ % Use what has previously been stored in title.sort.label
+ % as author substitute .
+ title.sort.label make.field.year.sort.label
+ }
+ { author make.name.sort.label }
+ if$
+}
+
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% Make tentative label for citing and sorting and do some
+% preprocessing.
+
+FUNCTION {make.tentative.sort.label}
+{ %
+ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ % General strategy:
+ %
+ % Ordinary situation: author or editor-acting-as-author
+ % available.
+ % => Make tentative "short cite with initials" author
+ % label (L1) of one of the forms
+ % "Last1 F1"
+ % "Last1 F1 Last2"
+ % "Last1 F1 zzzz" ("zzzz" representing et al.)
+ % => If more than 2 'authors': make label (L2) for 2nd-6th authors
+ % of one of the forms
+ % "Last2 Last3"
+ % "Last2 Last3 Last4"
+ % "Last2 Last3 Last4 Last5"
+ % "Last2 Last3 Last4 Last5 Last6"
+ % "Last2 Last3 Last4 Last5 Last6 zzzz"
+ % When key is available (overrules author and editor fields):
+ % => L1 = key, L2 = ""
+ % No author, editor, and key: define title or substitute as key
+ % and format as key.
+ %
+ % Then format year label (L3) of one of the forms:
+ % "0000" (missing year or explicit 'no date')
+ % "9999" ('in press')
+ % year (otherwise; don't use originalyear here yet)
+ %
+ % From earlier sorting of titles, we have title number. Convert
+ % to string, which gives title label (L4) .
+ %
+ % Then tentative sorting label (author.year.sort.label) is a
+ % concatenation of
+ % L1
+ % " "
+ % L3
+ % " "
+ % L2
+ % " "
+ % L4
+ %
+ % This can then be sorted, from which it can be derived
+ % whether initials are necessary, how many names must
+ % be used for short and full citations, and whether "a"'s and
+ % "b"'s etc. are necessary behind the year labels.
+ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ %
+ % key and firstkey overrule author information
+ %
+ firstkey empty$ not
+ { key empty$ not
+ { %
+ % Both key and firstkey available:
+ % for sorting and checking initials, treat key as last
+ % name and firstkey as initials.
+ %
+ key sortify remove.spaces
+ " " *
+ firstkey sortify remove.spaces *
+ make.field.year.sort.label
+ }
+ { firstkey sortify remove.spaces make.field.year.sort.label }
+ if$
+ }
+ { key empty$ not
+ { key sortify remove.spaces make.field.year.sort.label }
+ { %
+ % No key or firstkey, so find out which field
+ % to use as author.
+ %
+ % Check reference type:
+ % if result is 1 then possibly editor acts as author
+ % 2 then editor does not act as author
+ % 3 then key should have been used
+ % 0 then unknown reference type
+ ref.type
+ duplicate$ #1 =
+ { pop$
+ make.author.editor.sort.label
+ }
+ { duplicate$ #2 =
+ { pop$
+ make.author.sort.label
+ }
+ { #3 =
+ { "no key in " cite$ * warning$
+ make.author.editor.sort.label
+ }
+ { make.author.editor.sort.label }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+ %
+ author.year.sort.label 'sort.key$ :=
+}
+
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% Make final sort label with names in field on top of
+% the stack.
+%
+% Call with
+% field make.definitive.name.sort.label
+%
+% where 'field' is the field that takes the author-role.
+
+FUNCTION {make.definitive.name.sort.label}
+{ %
+ % Author or editor-acting-as-author available.
+ % => Make author-with-initials label (L1) of one of the forms
+ % "Last1 F1 Last2 F2 ... LastN FN"
+ % "Last1 F1 Last2 F2 ... Last6 F6 zzzz"
+ % (where N <= 6 is the total number of authors, and
+ % "zzzz" represents et al. if there are more than 6 authors)
+ % No author, editor, and key: define title or substitute as sort key.
+ %
+ % The name field is on top of the stack.
+ 'field :=
+ %
+ % numnames is the total number of names contained in field
+ field num.names$ 'numnames :=
+ %
+ % If there are more than 6 authors, only 6 are mentioned.
+ numnames name.max >
+ { name.max 'format.num.names := }
+ { numnames 'format.num.names := }
+ if$
+ % Initialize stack with empty string
+ ""
+ %
+ % Cycle over authors.
+ #1 'nameptr :=
+ { nameptr format.num.names < }
+ { % Format author and add spaces
+ field nameptr sort.name.format format.name$ *
+ " " *
+ nameptr #1 + 'nameptr :=
+ }
+ while$
+ % Format last author that must be formatted
+ field nameptr sort.name.format format.name$ *
+ % Add et al. if necessary
+ nameptr numnames <
+ { " zzzz" * }
+ 'skip$
+ if$
+ sortify % Clean up and change case
+ " " * % Add spaces
+ year.label * % Add year
+ " " * % Add spaces
+ title.number conv.int.to.str * % Add sorted title number
+ " " * % Add spaces
+ month.number.day * % Add month and day when available
+ 'author.year.sort.label := % Assign result to sort label.
+}
+
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% Called to make definitive sort label if author and
+% editor are empty or unusable.
+%
+% Call with
+% field make.definitive.field.year.sort.label
+% where 'field' is the field that takes the author-role,
+% perhaps already subjected to removing articles from the
+% beginning.
+
+FUNCTION {make.definitive.field.year.sort.label}
+{ %
+ % 'field' acts as author (L1).
+ %
+ % Then format year label (L2) of one of the forms:
+ % "0000" (missing year or explicit `no date')
+ % "9999" (`in press')
+ % year (otherwise; don't use originalyear here yet)
+ %
+ % From earlier sorting of titles, we have title number. Convert
+ % to string, which gives title label (L3) .
+ %
+ % Then tentative sorting label (author.year.sort.label) is a
+ % concatenation of
+ % L1
+ % " "
+ % L2
+ % " "
+ % L3
+ %
+ % 'field' is on top of the stack. It is already supposed to be cleaned
+ % (i.e., sortified and space-removed), so this is already L1.
+ " " * % Add spaces
+ year.label * % Add year
+ " " * % Add spaces
+ title.number conv.int.to.str * % Add sorted title number
+ " " * % Add spaces
+ month.number.day * % Add month and day when available
+ 'author.year.sort.label := % Assign result to sort label.
+}
+
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% Called by make.final.sort.key if author or editor
+% may be used.
+
+FUNCTION {make.definitive.author.editor.sort.label}
+{ author empty$
+ { editor empty$
+ { %
+ % Use what has previously been stored in title.sort.label
+ % as author substitute .
+ title.sort.label make.definitive.field.year.sort.label
+ }
+ { editor make.definitive.name.sort.label }
+ if$
+ }
+ { author make.definitive.name.sort.label }
+ if$
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% Called by make.final.sort.key if author but not editor
+% may be used.
+
+FUNCTION {make.definitive.author.sort.label}
+{ author empty$
+ { %
+ % Use what has previously been stored in title.sort.label
+ % as author substitute .
+ title.sort.label make.definitive.field.year.sort.label
+ }
+ { author make.definitive.name.sort.label }
+ if$
+}
+% \end{macrocode}
+% Make the final sort key. The general strategy is the following. The
+% ordinary situation is that an author or editor-acting-as-author
+% is available. In this case, make an author-with-initials label (L1)
+% of one of the forms
+% \begin{verbatim}
+% "Last1 F1 Last2 F2 ... LastN FN"
+% "Last1 F1 Last2 F2 ... Last6 F6 zzzz"
+% \end{verbatim}
+% where $N \leq 6$ is the total number of authors, and ``|zzzz|''
+% represents et al.\ if there are more than 6 authors. If there is
+% no author, editor, and key, define the title or its substitute as a
+% sort key. Note that there are two spaces between last name and first
+% name and three spaces between authors.
+%
+% Next format a year label (L2) that is equal to the \fieldname{year}
+% field, unless that is missing or an explicit ``no date'', in which
+% case it is |0000| (and thus comes first) or if it is an explicit
+% in press (|\BIP|), in which case the year label is |9999| (and thus
+% it comes last). We don't use the \fieldname{originalyear} field here
+% yet. We add |/|\fieldname{month}|/|\fieldname{day} to the year label
+% when available.
+%
+% From earlier sorting of titles, we have the sorted title number. This
+% is converted to a string, which gives title label (L3).
+%
+% Then the final sorting label (|author.year.sort.label|) is a
+% concatenation of L1, L2, and L3, with four spaces between them. This
+% can then be sorted.
+%
+% If the reference type is 1, then possibly the editor acts as author;
+% if it is 2, then editor does not act as author; if it is 3, then the
+% \fieldname{key} field should have been used; if it is 0, this is an
+% unknown reference type.
+% \begin{macrocode}
+FUNCTION {make.final.sort.key}
+{ ref.type #2 =
+ { make.definitive.author.sort.label }
+ { make.definitive.author.editor.sort.label }
+ if$
+% \end{macrocode}
+% With the \pkgoption{unsorted} option, the reference listed is sorted
+% in the order in which \BibTeX{} reads the references, that is, in
+% order of first citation.
+% \begin{macrocode}
+ unsorted
+ { citeorder.sort.label 'sort.key$ := }
+ { author.year.sort.label 'sort.key$ := }
+ if$
+}
+
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% FUNCTIONS THAT ALLOW SORTING BY TITLE %
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% Remove first N characters of string if they are equal to
+% teststring .
+%
+% Call with
+% teststring N string chop.word
+%
+% E.g.,
+% "A " #2 "A fine old day" chop.word
+% gives "fine old day"
+% and
+% "A " #2 "The fine old day" chop.word
+% gives "The fine old day".
+
+FUNCTION {chop.word}
+{ 's :=
+ 'len :=
+ s #1 len substring$ =
+ { s len #1 + global.max$ substring$ }
+ { s }
+ if$
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% Remove "a ", "an ", and "the " from beginning of string.
+%
+% Call with
+% string chop.articles
+
+FUNCTION {chop.articles}
+{ 's :=
+ "a " #2
+ "an " #3
+ "the " #4
+ s
+ chop.word
+ chop.word
+ chop.word
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% Format title and other non-name/date entries for sort key.
+%
+% Call with
+% field format.sort.title
+%
+% Make sure that field is not empty, this is not checked here!
+
+FUNCTION {format.sort.title}
+{ %
+ % Remove non-alphanumeric characters and change to lower case .
+ sortify
+ %
+ % Remove "a ", "an ", and "the " from the front .
+ chop.articles #1 entry.max$ substring$
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% Make title sorting label or substitute.
+
+FUNCTION {make.sort.title}
+{ title empty$
+ { text empty$
+ { type empty$
+ { howpublished empty$
+ { note empty$
+ { url empty$
+ { " " }
+ { url format.sort.title }
+ if$
+ }
+ { note format.sort.title }
+ if$
+ }
+ { howpublished format.sort.title }
+ if$
+ }
+ { type format.sort.title }
+ if$
+ }
+ { text format.sort.title }
+ if$
+ }
+ { title format.sort.title }
+ if$
+ remove.spaces
+ 'title.sort.label :=
+ title.sort.label 'sort.key$ :=
+}
+% \end{macrocode}
+% Make title number: rank number of sorted title.
+% \begin{macrocode}
+FUNCTION {make.title.number}
+{ title.sort.label old.label =
+ {
+% \end{macrocode}
+% A tie: old and new label are the same.
+% \begin{macrocode}
+ old.number 'title.number :=
+ }
+ {
+% \end{macrocode}
+% The usual situation: titles are different.
+% \begin{macrocode}
+ old.number #1 + 'title.number :=
+ title.number 'old.number :=
+ title.sort.label 'old.label :=
+ }
+ if$
+}
+% \end{macrocode}
+% Order in which reference was first cited (integer and conversion to string).
+% \begin{macrocode}
+FUNCTION {make.citeorder.number}
+{ old.number #1 + 'cite.order :=
+ cite.order 'old.number :=
+ cite.order conv.int.to.str 'citeorder.sort.label :=
+}
+% \end{macrocode}
+%
+% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% \subsection{Name formatting}
+% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% In order to support removal of spaces between the initials,
+% we have to split the formatting of the constituent parts,
+% because something like |"{ll}{, f{\BPBI }.}{ vv}{, jj}"| removes
+% the hyphens between initials as well. The ``classic'' versions
+% treat the von part differently. They were used in pervious versions
+% of \pkg{apacite}.
+%
+% \begin{macrocode}
+
+FUNCTION {last.part.name.format.classic} { "{ll}" }
+
+FUNCTION {von.junior.name.format.classic} { "{ vv}{, jj}" }
+
+FUNCTION {last.part.name.format} { "{vv }{ll}" }
+
+FUNCTION {initials.with.space.name.format} { "{f.}" }
+
+FUNCTION {von.last.junior.name.format} { "{vv }{ll}{ jj}" }
+
+FUNCTION {von.junior.name.format} { "{, jj}" }
+
+FUNCTION {one.complete.name.format} { "{vv }{ll}{, jj}{, ff}" }
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% text.length$ views "special characters" as 1, whereas
+% substring$ looks at the number of actual characters.
+% So
+% "{\TeX}" text.length$ = 1
+% "{TeX}" text.length$ = 3
+% but
+% "{\TeX}" #4 #2 substring$ = "eX"
+% "{TeX}" #4 #2 substring$ = "X}"
+% Therefore, it is convenient to have a string length function
+% that uses the same numbering as substring$:
+% "{\TeX}" string.length = 6
+% "{TeX}" string.length = 5
+
+FUNCTION {string.length}
+{ #0 'pos :=
+ % If the next character exists, i.e., is not empty,
+ % add 1 to the string length.
+ % We cannot use empty$ because " " empty$ is true.
+ { duplicate$ pos #1 + #1 substring$ "" = not }
+ { pos #1 + 'pos := }
+ while$
+ pop$ pos
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% Replace ". " and ".~" with "\BPBI " (period between initials)
+% and ".-" with "\BHBI " (hyphen between initials)
+% but only at brace level 0.
+
+FUNCTION {transform.spaces.and.hyphens}
+{ 's := % The original string
+ s string.length 'len := % Its length (no. of characters)
+ "" 't := % Initialize the transformed string
+ #1 'pos :=
+ #0 'brace.level :=
+ %
+ % while (pos < len) do
+ %
+ { pos len < }
+ { % First, check whether we are at brace level 0
+ brace.level #0 =
+ {
+ % At least two characters left: check for ". ", ".~", and ".-".
+ % If so, replace and shift two positions.
+ s pos #2 substring$ ". " =
+ s pos #2 substring$ ".~" = or
+ { t "\BPBI " * 't :=
+ pos #2 + 'pos :=
+ }
+ { s pos #2 substring$ ".-" =
+ { t "\BHBI " * 't :=
+ pos #2 + 'pos :=
+ }
+ { % neither is true, copy one character and shift one position
+ t s pos #1 substring$ * 't :=
+ % Check whether we need to increase brace level.
+ % Note that this is not sophisticated: it does not capture
+ % \{, \verb+}+, etc.
+ % Note also that unbalanced braces cause problems.
+ s pos #1 substring$ "{" =
+ { brace.level #1 + 'brace.level := }
+ 'skip$
+ if$
+ pos #1 + 'pos :=
+ }
+ if$
+ }
+ if$
+ }
+ { % Not at brace level 0: copy result literally
+ t s pos #1 substring$ * 't :=
+ % Check whether we need to increase or decrease brace level.
+ % Note that this is not sophisticated: it does not capture
+ % \{, \verb+}+, etc.
+ s pos #1 substring$ "{" =
+ { brace.level #1 + 'brace.level := }
+ { s pos #1 substring$ "}" =
+ { brace.level #1 - 'brace.level := }
+ 'skip$
+ if$
+ }
+ if$
+ pos #1 + 'pos :=
+ }
+ if$
+ }
+ while$
+ %
+ pos len =
+ { % Last character, copy
+ t s pos #1 substring$ * 't :=
+ }
+ { % pos = len + 1, so s ends with ". " or ".-"
+ % This should not have happened, but make the best out of it.
+ % Push last two characters of s on the stack, i.e., ". " or ".-".
+ s len #1 - #2 substring$
+ % Remove "\BPBI " or "\BHBI " from t
+ t text.length$ 'len := % Length of t (no. of characters)
+ t #1 len #6 - substring$
+ % Concatenate and assign to t
+ swap$ * 't :=
+ }
+ if$
+ %
+ % Now push the result back on the stack
+ t
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% Format only the initials of a name, retaining hyphens, but
+% removing spaces between first names. So "Jean Pierre" becomes "J.P."
+% and "Jean-Pierre" becomes "J.-P.".
+
+FUNCTION {format.initials.with.hyphen}
+{ % Format initials.
+ % Call with
+ % field authornumber format.initials.with.hyphen
+ % e.g.
+ % author #1 format.initials.with.hyphen
+ % Instead of field, a string may also be used.
+ %
+ % First, format initials in the default way, retaining spaces
+ % and hyphens.
+ initials.with.space.name.format format.name$
+ transform.spaces.and.hyphens
+}
+
+FUNCTION {format.last.part.name}
+{ % Format a name with last.part.name.format,
+ % as part of more complicated things.
+ % Call with
+ % field authornumber format.last.part.name
+ % e.g.
+ % author #1 format.last.part.name
+ % Instead of field, a string may also be used.
+ last.part.name.format format.name$
+}
+
+FUNCTION {format.von.last.junior.name}
+{ % Format a name with von.last.junior.name.format,
+ % for citing or as part of more complicated things.
+ % Call with
+ % field authornumber format.von.last.junior.name
+ % e.g.
+ % author #1 format.von.last.junior.name
+ % Instead of field, a string may also be used.
+ von.last.junior.name.format format.name$
+}
+
+FUNCTION {format.von.junior.name}
+{ % Format a name with von.last.junior.name.format,
+ % for citing or as part of more complicated things.
+ % Call with
+ % field authornumber format.von.junior.name
+ % e.g.
+ % author #1 format.von.junior.name
+ % Instead of field, a string may also be used.
+ von.junior.name.format format.name$
+}
+
+FUNCTION {format.cite.initials.name}
+{ % Format a name for citing with initials.
+ % Call with
+ % field authornumber format.cite.initials.name
+ % e.g.
+ % author #1 format.cite.initials.name
+ % Instead of field, a string may also be used.
+ %
+ % First, extract the complete name, format it in the canonical form,
+ % and push on the stack.
+ one.complete.name.format format.name$
+ %
+ % Format the initials and push on the stack.
+ duplicate$ #1 format.initials.with.hyphen
+ %
+ % Format the von-last-junior part and push on the stack.
+ swap$ #1 format.von.last.junior.name
+ %
+ % Connect with "~" hyphen (if they're both non-empty).
+ "~" connect.check
+}
+
+FUNCTION {format.author.name}
+{ % Format an author name for the reference list.
+ % Call with
+ % field authornumber format.author.name
+ % e.g.
+ % author #1 format.author.name
+ % Instead of field, a string may also be used.
+ %
+ % First, extract the complete name, format it in the canonical form,
+ % and push on the stack.
+ one.complete.name.format format.name$
+ %
+ % Make two copies of the name, format the last name and push on the stack.
+ duplicate$ duplicate$ #1 format.last.part.name
+ %
+ % Format the initials and push on the stack.
+ swap$ #1 format.initials.with.hyphen
+ %
+ % Connect with last name.
+ connect.with.comma.check
+ %
+ % Format the von-junior part and connect with initials.
+ swap$ #1 format.von.junior.name "" connect.check
+}
+
+FUNCTION {format.editor.name}
+{ % Format a name for the reference list as an editor.
+ % Call with
+ % field authornumber format.editor.name
+ % e.g.
+ % author #1 format.editor.name
+ % Instead of field, a string may also be used.
+ %
+ format.cite.initials.name
+}
+
+FUNCTION {format.index.name}
+{ % Format an author name for the index.
+ % Call with
+ % field authornumber format.index.name
+ % e.g.
+ % author #1 format.index.name
+ % Instead of field, a string may also be used.
+ %
+ format.author.name
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% CITATION LABELS %
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% \end{macrocode}
+%
+% \begin{macro}{comma.between.two}
+% \begin{macro}{comma.between.names}
+% \begin{macro}{comma.before.last}
+% \begin{macro}{dots.before.last}
+% \begin{macro}{and.before.last}
+% \begin{macro}{et.al.string.cite}
+% \begin{macro}{et.al.string}
+% \begin{macro}{et.al.string.period}
+% Some macro strings about commas etc.\ between authors.
+% \begin{macrocode}
+FUNCTION {comma.between.two} { "\BCBT {}" }
+
+FUNCTION {comma.between.names} { ", " }
+
+FUNCTION {comma.before.last} { "\BCBL {}" }
+
+FUNCTION {dots.before.last} { "\BDBL {}" }
+
+FUNCTION {and.before.last} { "\ \BBA {} " }
+
+FUNCTION {et.al.string.cite} { "\ \protect \BOthers {.}" }
+
+FUNCTION {et.al.string} { "\ \BOthers {.}" }
+
+FUNCTION {et.al.string.period} { "\ \BOthersPeriod {.}" }
+
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macrocode}
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% Add author index entry when desired.
+% "field" must have been defined before and must contain the
+% contents of the relevant author field.
+% "nameptr" must also have been defined before. It is the
+% number of the author that must be formatted. (So if it is
+% #2, then the 2nd author must be formatted.)
+% What's on top of the stack (the formatted author) is written
+% to the .bbl file.
+
+FUNCTION {add.name.index}
+{ %
+ %
+ make.index
+ { "%" * write$ newline$
+ % Check for corporate author
+ field is.bibcorporate
+ { "\corporateAX{" }
+ { "\AX{" }
+ if$
+ write$
+ field nameptr sort.name.format format.name$ sortify write$ newline$
+ "@" write$
+ field nameptr format.index.name
+ "}%" * write$ newline$
+ }
+ { "%" * write$ newline$ }
+ if$
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% Citation labels when author or editor may be used.
+% Field is on top of the stack.
+%
+% Call with
+% format.num.names field make.name.cite.label
+
+FUNCTION {make.name.cite.label}
+{ 'field :=
+ 'format.num.names :=
+ %
+ field num.names$ 'numnames := % numnames is the total number of names
+ % contained in field
+ %
+ % It is implicit in the APA manual that if "et al." would refer
+ % to exactly one author, then this author should be named
+ % instead of "et al."
+ %
+ format.num.names numnames #1 - =
+ { numnames 'format.num.names := }
+ 'skip$
+ if$
+ %
+ % Format first author: with or without initials
+ %
+ #1 'nameptr :=
+ cite.initials #1 =
+ { field nameptr format.cite.initials.name }
+ { field nameptr cite.name.format format.name$ }
+ if$
+ add.name.index % Add index entry when desired.
+ %
+ numnames #1 =
+ 'skip$
+ { format.num.names #1 =
+ { %
+ % First author et al.
+ %
+ et.al.string.cite write$
+ }
+ { numnames #2 =
+ { %
+ % Given that format.num.names > 1, it is 2.
+ % Format second author.
+ %
+ #2 'nameptr :=
+ field nameptr cite.name.format format.name$ 's :=
+ %
+ % Check if 2nd author is explicit "others".
+ % If so, insert "et al." string.
+ %
+ s "others" =
+ { et.al.string.cite write$ } % First et al.
+ { %
+ % First \& Second
+ %
+ and.before.last write$
+ s
+ add.name.index % Add index entry when desired.
+ }
+ if$
+ }
+ { %
+ % 3 or more names, 2 or more must be cited
+ %
+ % for nameptr := 2 to format.num.names - 1 do
+ %
+ #2 'nameptr :=
+ { nameptr format.num.names < }
+ { %
+ % Put comma between consecutive authors
+ %
+ comma.between.names write$
+ %
+ % Format and add next author
+ %
+ field nameptr cite.name.format format.name$
+ add.name.index % Add index entry when desired.
+ %
+ % Move to next author
+ %
+ nameptr #1 + 'nameptr :=
+ }
+ while$
+ %
+ % nameptr = format.num.names
+ % Format this author.
+ %
+ field nameptr cite.name.format format.name$ 's :=
+ %
+ format.num.names numnames =
+ { %
+ % This is also the last author. Add (optional) comma.
+ %
+ comma.before.last write$
+ %
+ % Check if this author is explicit "others".
+ % If so, insert "et al." string.
+ %
+ s "others" =
+ { et.al.string.cite write$ }
+ { and.before.last write$
+ s
+ add.name.index % Add index entry when desired.
+ }
+ if$
+ }
+ { %
+ % This is not the last author.
+ % Add comma, author name, and "et al."
+ %
+ comma.between.names write$
+ s
+ add.name.index % Add index entry when desired.
+ %
+ comma.before.last et.al.string.cite * write$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% Citation labels when no author, editor, firstkey or key
+% is available.
+
+FUNCTION {make.title.cite.label}
+{ %
+ % Formatting: check if formatted as article title or
+ % as book title, and insert this formatting.
+ %
+ is.atype
+ { "\APACciteatitle {" }
+ { "\APACcitebtitle {" }
+ if$
+ %
+ title empty$
+ { text empty$
+ { type empty$
+ { howpublished empty$
+ { note empty$
+ { url empty$
+ { cite$ }
+ { url }
+ if$
+ }
+ { note }
+ if$
+ }
+ { howpublished }
+ if$
+ }
+ { type }
+ if$
+ }
+ { text }
+ if$
+ }
+ { title }
+ if$
+ %
+ % Connect with formatting.
+ %
+ * "}" *
+ %
+ % Write to output
+ %
+ write$
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% Citation labels when author or editor may be used.
+
+FUNCTION {make.author.editor.cite.label}
+{ author empty$
+ { editor empty$
+ { %
+ % No author or editor:
+ % Use title or other description as citation label.
+ %
+ make.title.cite.label
+ "}{%" write$ newline$
+ make.title.cite.label
+ }
+ { cite.num.names.full editor make.name.cite.label
+ "}{%" write$ newline$
+ cite.num.names.short editor make.name.cite.label
+ }
+ if$
+ }
+ { cite.num.names.full author make.name.cite.label
+ "}{%" write$ newline$
+ cite.num.names.short author make.name.cite.label
+ }
+ if$
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% Citation labels when author (but not editor) may be used.
+
+FUNCTION {make.author.cite.label}
+{ author empty$
+ { %
+ % No author:
+ % Use title or other description as citation label.
+ %
+ make.title.cite.label
+ "}{%" write$ newline$
+ make.title.cite.label
+ }
+ { cite.num.names.full author make.name.cite.label
+ "}{%" write$ newline$
+ cite.num.names.short author make.name.cite.label
+ }
+ if$
+}
+
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% Make "a" or "b" supplement to year label when necessary.
+
+FUNCTION {make.definitive.year.supplement}
+{ %
+ % Add "a", "b", etc. when necessary.
+ %
+ add.to.year #0 =
+ { "" }
+ { "{\protect "
+ year empty$
+ { "\BCntND " * }
+ { year "\bibnodate" =
+ year "l" change.case$ "no date" = or
+ year "l" change.case$ "n.d." = or
+ { "\BCntND " * }
+ { year "\BIP" =
+ year "l" change.case$ "in press" = or
+ year "l" change.case$ "forthcoming" = or
+ { "\BCntIP " * }
+ { "\BCnt " * }
+ if$
+ }
+ if$
+ }
+ if$
+ "{" * add.to.year int.to.str$ * "}}" *
+ }
+ if$
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% Add \protect if year is \BIP or \bibnodate.
+
+FUNCTION {protect.year}
+{ year empty$
+ { "{\protect \bibnodate {}}" }
+ { year "\bibnodate" =
+ year "l" change.case$ "no date" = or
+ year "l" change.case$ "n.d." = or
+ { "{\protect \bibnodate {}}" }
+ { year "\BIP" =
+ year "l" change.case$ "in press" = or
+ year "l" change.case$ "forthcoming" = or
+ { "{\protect \BIP {}}" }
+ { year }
+ if$
+ }
+ if$
+ }
+ if$
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% Make year label that is used for citations in text.
+
+FUNCTION {make.definitive.year.label}
+{ "{\protect \APACyear {"
+ originalyear empty$
+ { protect.year }
+ { originalyear "\bibnodate" = % date of original publication unknown
+ originalyear "l" change.case$ "no date" = or
+ originalyear "l" change.case$ "n.d." = or
+ { translator empty$
+ { protect.year }
+ { "{\protect \BTRANSL {}}~" protect.year * }
+ if$
+ }
+ { year empty$
+ { originalyear "/{\protect \bibnodate {}}" * } % 1923/n.d.
+ { originalyear year =
+ { protect.year }
+ { originalyear "/" * protect.year * } % 1923/1961
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+ * "}}%" * write$ newline$
+ %
+ % Add "a", "b", etc. when necessary.
+ %
+ "{\protect \APACexlab {" "}}"
+ make.definitive.year.supplement enclose.check
+}
+
+
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% Make citation labels:
+% - Full formatted author list (or substitute if no author
+% available) for first citation;
+% - Short formatted author list (ditto) for subsequent
+% citations;
+% - Year, with originalyear when applicable, and "a" or "b"
+% etc. addendum when necessary.
+
+FUNCTION {make.cite.labels}
+{ newline$
+ %
+ % Write a few lines for testing purposes.
+ %
+ test
+ { "\bibitem [] {} \fullciteA {" cite$ * "}" * write$ newline$
+ "\bibitem [] {} \citeA {" cite$ * "}" * write$ newline$
+ }
+ 'skip$
+ if$
+ %
+ "\bibitem [\protect \citeauthoryear {%" write$ newline$
+ %
+ % When key or firstkey is available, this takes precedence.
+ %
+ firstkey empty$ not
+ { %
+ % Full cite: firstkey.
+ %
+ firstkey write$
+ "}{%" write$ newline$
+ %
+ % Short cite: if key is not empty and cite.initials is 0,
+ % then key, else firstkey.
+ %
+ cite.initials #0 =
+ key empty$ not
+ and
+ { key }
+ { firstkey }
+ if$
+ write$
+ }
+ { key empty$ not
+ { %
+ % No firstkey, but key available:
+ % Both full and short labels are key.
+ %
+ key write$
+ "}{%" write$ newline$
+ key write$
+ }
+ { % No key or firstkey, so find out which field
+ % to use as author.
+ %
+ % Check reference type:
+ % if result is 1 then possibly editor acts as author
+ % 2 then editor does not act as author
+ % 3 then key should have been used
+ % 0 then unknown reference type
+ ref.type #2 =
+ { make.author.cite.label }
+ { make.author.editor.cite.label }
+ if$
+ }
+ if$
+ }
+ if$
+ "}{%" write$ newline$
+ %
+ % Make year label that's used for citations
+ %
+ make.definitive.year.label write$
+ "}]{%" write$ newline$
+ cite$ write$
+ "} " write$ newline$
+ % author.year.sort.label write$ newline$ % for testing purposes
+ % year.label write$ newline$ % for testing purposes
+ %
+ % If the item is used in a meta-analysis, indicate this with
+ % a star.
+ %
+ "\APACinsertmetastar {%" write$ newline$
+ cite$ write$
+ "}%" write$ newline$
+}
+
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% FORMATTING OF REFERENCE LIST %
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% "(Ed.)" or "(Eds.)" postfix.
+% editor must not be empty
+
+FUNCTION {editor.postfix}
+{ editor num.names$ #1 >
+ { "(\BEDS)" }
+ { "(\BED)" }
+ if$
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% "(Ed. \& Trans.)" postfix
+% editor must not be empty
+
+FUNCTION {editor.trans.postfix}
+{ editor num.names$ #1 >
+ { "(\BEDS{} \BAnd{} \BTRANSS)" }
+ { "(\BED{} \BAnd{} \BTRANS)" }
+ if$
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ %
+ % "(Trans.)" postfix
+ % translator must not be empty
+ %
+FUNCTION {trans.postfix}
+{ translator num.names$ #1 >
+ { "(\BTRANSS)" }
+ { "(\BTRANS)" }
+ if$
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% Format authors (or editors acting as authors) for the
+% reference list, according to APA 5th ed. rules.
+%
+% Call with
+% dot field authors.editors.reflist.apa5
+% where field is the field (string) that contains the authors
+% (or editors acting as authors) that must be formatted and
+% dot is 1 or 0 indicating whether or not a period must end
+% the formatting.
+
+FUNCTION {authors.editors.reflist.apa5}
+{ 'field :=
+ 'dot :=
+ %
+ field num.names$ 'numnames := % numnames is the total number of names
+ % contained in field
+ numnames 'format.num.names := % Format all authors
+ format.num.names name.max > % Unless this exceeds the maximum of 6.
+ { dot
+ { name.max 'format.num.names := } % Format 6 authors
+ { cite.num.names.full 'format.num.names := } % Format 1 editor
+ if$
+ }
+ 'skip$
+ if$
+ %
+ % Enclose authors in APACrefauthors environment to allow crude style
+ % options in \LaTeX.
+ "\begin{APACrefauthors}%"
+ write$ newline$
+ %
+ % It is kind of explicit in the APA manual that if "et al." would
+ % refer to exactly one author (the 7th), then this author should
+ % still be replaced by "et al.", unlike with citations.
+ % So format.num.names is not adapted.
+ %
+ % Format first author
+ %
+ #1 'nameptr :=
+ field nameptr format.author.name
+ %
+ % Add period if required and if this is the only author.
+ %
+ numnames #1 =
+ dot
+ and
+ { add.period$ }
+ 'skip$
+ if$
+ add.name.index % Add index entry when desired.
+ %
+ numnames #1 =
+ 'skip$
+ { format.num.names #1 =
+ { %
+ % First author et al.
+ %
+ comma.between.two
+ %
+ % Add period if required.
+ %
+ dot
+ { et.al.string.period * }
+ { et.al.string * }
+ if$
+ write$
+ }
+ { numnames #2 =
+ { %
+ % Given that format.num.names > 1, it is 2.
+ %
+ comma.between.two write$
+ %
+ % Format second author.
+ %
+ #2 'nameptr :=
+ field nameptr format.author.name 's :=
+ %
+ % Check if 2nd author is explicit "others".
+ % If so, insert "et al." string.
+ %
+ s "others" =
+ { %
+ % First et al.
+ % Add period if required.
+ %
+ dot
+ { et.al.string.period }
+ { et.al.string }
+ if$
+ write$
+ }
+ { %
+ % First \& Second
+ %
+ and.before.last write$
+ %
+ % Add period if required.
+ %
+ dot
+ { s add.period$ }
+ { s }
+ if$
+ add.name.index % Add index entry when desired.
+ }
+ if$
+ }
+ { %
+ % 3 or more names, 2 or more must be cited
+ %
+ % for nameptr := 2 to format.num.names - 1 do
+ %
+ #2 'nameptr :=
+ { nameptr format.num.names < }
+ { %
+ % Put comma between consecutive authors
+ %
+ comma.between.names write$
+ %
+ % Format and add next author
+ %
+ field nameptr format.author.name
+ add.name.index % Add index entry when desired.
+ %
+ % Move to next author
+ %
+ nameptr #1 + 'nameptr :=
+ }
+ while$
+ %
+ % nameptr = format.num.names
+ % Format this author.
+ %
+ field nameptr format.author.name 's :=
+ %
+ format.num.names numnames =
+ { %
+ % This is also the last author. Add (optional) comma.
+ %
+ comma.before.last write$
+ %
+ % Check if this author is explicit "others".
+ % If so, insert "et al." string.
+ %
+ s "others" =
+ { %
+ % Add period if required.
+ %
+ dot
+ { et.al.string.period }
+ { et.al.string }
+ if$
+ write$
+ }
+ { and.before.last write$
+ %
+ % Add period if required.
+ %
+ dot
+ { s add.period$ }
+ { s }
+ if$
+ add.name.index % Add index entry when desired.
+ }
+ if$
+ }
+ { %
+ % This is not the last author.
+ % Add comma, author name, and "et al."
+ %
+ comma.between.names write$
+ s
+ add.name.index % Add index entry when desired.
+ %
+ comma.before.last
+ %
+ % Add period if required.
+ %
+ dot
+ { et.al.string.period * }
+ { et.al.string * }
+ if$
+ write$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+ %
+ % End APACrefauthors environment.
+ "\end{APACrefauthors}%"
+ write$ newline$
+}
+
+%
+% \begin{macro}{authors.reflist.apa6}
+% Format authors for the reference list according to the rules of the
+% 6th edition of the \emph{APA Manual}, i.e., if there are more than 7
+% authors, list the first 6, then dots, and then the last.
+% Call with
+% \begin{verbatim}
+% dot field authors.reflist.apa6
+% \end{verbatim}
+% where \texttt{field} is the field (string) that contains the authors
+% (or editors acting as authors) that must be formatted and \texttt{dot}
+% is 1 or 0 indicating whether or not a period must end the formatting.
+% \begin{macrocode}
+FUNCTION {authors.reflist.apa6}
+{ 'field :=
+ 'dot :=
+% \end{macrocode}
+% \texttt{numnames} is the total number of names in the \texttt{field}.
+% \texttt{format.num.names} is the number of names to be formatted,
+% which is \texttt{numnames} or 7, whichever is smaller
+% \begin{macrocode}
+ field num.names$ 'numnames :=
+ numnames #7 >
+ { #7 'format.num.names := }
+ { numnames 'format.num.names := }
+ if$
+% \end{macrocode}
+% Enclose authors in \envirname{APACrefauthors} environment to allow crude
+% style options in \LaTeX.
+% \begin{macrocode}
+ "\begin{APACrefauthors}%"
+ write$ newline$
+% \end{macrocode}
+% Format first author.
+% \begin{macrocode}
+ #1 'nameptr :=
+ field nameptr format.author.name
+ numnames #1 =
+% \end{macrocode}
+% Add period if required and if this is the only author, and add index
+% entry when desired.
+% \begin{macrocode}
+ { dot
+ { add.period$ }
+ 'skip$
+ if$
+ add.name.index
+ }
+ { add.name.index
+ numnames #2 =
+% \end{macrocode}
+% Optional comma between two authors; format second author and store in
+% \texttt{s}.
+% \begin{macrocode}
+ { comma.between.two write$
+ #2 'nameptr :=
+ field nameptr format.author.name 's :=
+ s "others" =
+% \end{macrocode}
+% Second author is explicit ``|others|''. Therefore, insert
+% ``et al.'' string. Note that this does not correspond with the
+% 6th edition of the \emph{APA manual}, so give a warning here,
+% but after that format the authors as in the 5th edition:
+% ``First, et al.''. Add a period if required.
+% \begin{macrocode}
+ { "`others' not consistent with 6th ed. of the APA Manual"
+ warning$
+ dot
+ { et.al.string.period }
+ { et.al.string }
+ if$
+ write$ newline$
+ }
+% \end{macrocode}
+% There really are two authors: ``First, \& Second'', with a period
+% after the latter if required.
+% \begin{macrocode}
+ { and.before.last write$
+ dot
+ { s add.period$ }
+ { s }
+ if$
+ add.name.index
+ }
+ if$
+ }
+% \end{macrocode}
+% Three or more authors, Format all the ones that need to be formatted,
+% except the last one, which needs special treatment.
+% \begin{macrocode}
+ { %% for nameptr := 2 to format.num.names - 1 do
+ #2 'nameptr :=
+ { nameptr format.num.names < }
+% \end{macrocode}
+% Put comma between consecutive authors and format and add the next
+% author and the optional index entry, and increase the loop variable.
+% \begin{macrocode}
+ { comma.between.names write$
+ field nameptr format.author.name
+ add.name.index
+ nameptr #1 + 'nameptr :=
+ }
+ while$
+% \end{macrocode}
+% Format the last author. If all authors are formatted, add an
+% ampersand; otherwise, add dots (new in 6th ed.).
+% \begin{macrocode}
+ field numnames format.author.name 's :=
+ format.num.names numnames =
+ { comma.before.last write$
+% \end{macrocode}
+% Check if this author is an explicit ``|others|''. If so, insert
+% ``et al.'' string. Note that this does not correspond with the
+% 6th edition of the \emph{APA manual}, so give a warning here. Add
+% a period if required.
+% \begin{macrocode}
+ s "others" =
+ { "`others' not consistent with 6th ed. of the APA "
+ "Manual" *
+ warning$
+ dot
+ { et.al.string.period }
+ { et.al.string }
+ if$
+ write$
+ }
+ { and.before.last write$
+ dot
+ { s add.period$ }
+ { s }
+ if$
+ add.name.index
+ }
+ if$
+ }
+% \end{macrocode}
+% We skipped some authors. Indicate by dots.
+% \begin{macrocode}
+ { dots.before.last write$
+ s
+ add.name.index
+ }
+ if$
+ }
+ if$
+ }
+ if$
+% \end{macrocode}
+% End \envirname{APACrefauthors} environment.
+% \begin{macrocode}
+ "\end{APACrefauthors}%"
+ write$ newline$
+}
+
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{format.author.names}
+% Format authors (or editors acting as authors) for the reference list.
+% Call with
+% \begin{verbatim}
+% dot field format.author.names
+% \end{verbatim}
+% where \texttt{field} is the field (string) that contains the authors
+% (or editors acting as authors) that must be formatted and \texttt{dot}
+% is 1 or 0 indicating whether or not a period must end the formatting.
+% \begin{macrocode}
+FUNCTION {format.author.names}
+{ 'field :=
+ 'dot :=
+% \end{macrocode}
+% This is a temporary trick, which needs to be cleaned up. We
+% now check whether |dot| is 1, which indicates it's an author
+% field. If it's not, it's an editor field. In the former case,
+% if there are more than 7 authors, the first 6 plus dots plus
+% the last author must be given, whereas in the latter case,
+% only the first and ``et al.'' needs to be given. The latter
+% is the same behavior as in the 5th edition, so we use that
+% function, whereas we use an adapted function for authors in
+% the 6th edition.
+% \begin{macrocode}
+ dot
+ { dot field authors.reflist.apa6 }
+ { dot field authors.editors.reflist.apa5 }
+ if$
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macrocode}
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% Format authors in reference list, where it is given that
+% the author field is not empty.
+
+FUNCTION {format.authors}
+{ #1 author format.author.names }
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% Format editors in reference list in case editors act as
+% authors (such as reference to entire edited book)
+%
+% Letheridge, S., \& Cannon, C. R. (Eds.).
+% or
+% Letheridge, S. (Ed.). (if only 1 editor)
+%
+% editor must not be empty
+
+FUNCTION {format.editors.as.authors}
+{ #0 editor format.author.names
+ "\ " editor.postfix * add.period$ write$ newline$
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%
+% Format editors in reference list in case editors are also
+% translators and act as authors (such as reference to entire
+% edited book of translated articles)
+%
+% Letheridge, S., \& Cannon, C. R. (Eds. and Trans.).
+% or
+% Letheridge, S. (Ed. and Trans.). (if only 1 editor)
+%
+% editor must not be empty
+
+FUNCTION {format.ed.trans.as.authors}
+{ #0 editor format.author.names
+ "\ " editor.trans.postfix * add.period$ write$ newline$
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% Format a list of names with the initials before the
+% last names (i.e., names in the editor position),
+% commas between names (not between 2),
+% and ampersand (\&) before last name.
+% These names are not put in the author index.
+%
+% Call with
+% field format.editor.names
+
+FUNCTION {format.editor.names}
+{ 'field :=
+ %
+ field num.names$ 'numnames := % numnames is the total number of names
+ % contained in field
+ numnames 'format.num.names := % Format all authors
+ format.num.names name.max > % Unless this exceeds the maximum of 6.
+ { #1 'format.num.names := } % Then it becomes 1 (First et al.)
+ 'skip$
+ if$
+ %
+ % Format first editor
+ %
+ field #1 format.editor.name
+ %
+ numnames #1 =
+ 'skip$
+ { format.num.names #1 =
+ { et.al.string * } % First editor et al., no comma.
+ { numnames #2 =
+ { %
+ % Given that format.num.names > 1, it is 2.
+ % No comma. Format second editor.
+ %
+ field #2 format.editor.name 's :=
+ %
+ % Check if 2nd editor is explicit "others".
+ % If so, insert "et al." string.
+ %
+ s "others" =
+ { et.al.string * } % First et al.
+ { and.before.last * s * } % First \& Second
+ if$
+ }
+ { %
+ % 3 or more names, 2 or more must be cited
+ %
+ % for nameptr := 2 to format.num.names - 1 do
+ %
+ #2 'nameptr :=
+ { nameptr format.num.names < }
+ { %
+ % Put comma between consecutive editors
+ %
+ comma.between.names *
+ %
+ % Format and add next editor
+ %
+ field nameptr format.editor.name *
+ %
+ % Move to next editor
+ %
+ nameptr #1 + 'nameptr :=
+ }
+ while$
+ %
+ % nameptr = format.num.names
+ % Format this editor.
+ %
+ field nameptr format.editor.name 's :=
+ %
+ format.num.names numnames =
+ { %
+ % This is also the last editor. Add (optional) comma.
+ %
+ comma.before.last *
+ %
+ % Check if this editor is explicit "others".
+ % If so, insert "et al." string.
+ %
+ s "others" =
+ { et.al.string * }
+ { and.before.last * s * }
+ if$
+ }
+ { %
+ % This is not the last editor.
+ % Add comma, editor name, and "et al."
+ %
+ comma.between.names * s *
+ comma.before.last * et.al.string *
+ }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+}
+
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ %
+ % format editors in case editors do not act as authors
+ % (such as reference to chapter in edited book)
+ %
+ % L. W. Poon (Ed.) (1 editor)
+ % or
+ % A. S. Gurman \& D. P. Kniskern (Eds.) (2 editors)
+ % or
+ % L. Poon, A. Jones, \& D. P. Smith (Eds.) (>2 editors)
+ %
+ % editor must not be empty
+ %
+FUNCTION {format.editors.in.line}
+{ editor format.editor.names
+ editor.postfix connect.with.space.check
+}
+
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ %
+ % format editors in case editors are also translators
+ % and do not act as authors
+ % (such as reference to chapter in edited book
+ % of translated articles)
+ %
+ % L. W. Poon (Ed. and Trans.) (1 editor)
+ % or
+ % A. S. Gurman \& D. P. Kniskern (Eds. and Trans.) (2 editors)
+ % or
+ % L. Poon, A. Jones, \& D. P. Smith (Eds. and Trans.) (>2 editors)
+ %
+ % editor must not be empty
+ %
+FUNCTION {format.editors.trans.in.line}
+{ editor format.editor.names
+ editor.trans.postfix connect.with.space.check
+}
+
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ %
+ % format translators in case translators act as editors
+ % (such as reference to chapter in translated book)
+ %
+ % L. W. Poon (Trans.) (1 translator)
+ % or
+ % A. S. Gurman \& D. P. Kniskern (Trans.) (2 translators)
+ % or
+ % L. Poon, A. Jones, \& D. P. Smith (Trans.) (>2 translators)
+ %
+ % translator must not be empty
+ %
+FUNCTION {format.translators.in.line}
+{ translator format.editor.names
+ trans.postfix connect.with.space.check
+}
+
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ %
+ % format translators in case translator does not act as editor
+ % (such as reference to translated book)
+ %
+ % L. Solotaroff, Trans.
+ %
+FUNCTION {format.translators.in.paren.check}
+{ translator empty$
+ { "" }
+ { translator format.editor.names
+ translator num.names$ #1 >
+ { ", \BTRANSS{}" * }
+ { ", \BTRANS{}" * }
+ if$
+ }
+ if$
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ %
+ % format editors and translators in case neither act as editor
+ % (such as reference to edited or translated book with a
+ % a single author)
+ %
+ % L. Solotaroff, Ed.
+ % L. Solotaroff, Ed. \& Trans.
+ % L. Solotaroff, Trans.
+ % L. Solotaroff, Ed. \& S. Prokofieff, Trans.
+ %
+FUNCTION {format.editors.translators.in.paren.check}
+{ editor empty$
+ { translator empty$
+ { "" }
+ { translator format.editor.names
+ translator num.names$ #1 >
+ { ", \BTRANSS{}" * }
+ { ", \BTRANS{}" * }
+ if$
+ }
+ if$
+ }
+ { editor format.editor.names
+ editor num.names$ #1 >
+ { ", \BEDS{}" * }
+ { ", \BED{}" * }
+ if$
+ translator empty$
+ 'skip$
+ { editor translator =
+ { editor num.names$ #1 >
+ { " \BAnd{} \BTRANSS" * }
+ { " \BAnd{} \BTRANS" * }
+ if$
+ }
+ { " \BAnd{} " *
+ translator format.editor.names *
+ translator num.names$ #1 >
+ { ", \BTRANSS{}" * }
+ { ", \BTRANS{}" * }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ %
+ % translator of article
+ %
+FUNCTION {format.atrans.check}
+{ format.translators.in.paren.check parenthesize.check }
+
+
+
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ %
+ % format "In editor (Ed.), "
+ %
+FUNCTION {format.in.editors}
+{ "\BIn{} "
+ editor empty$
+ 'skip$
+ { format.editors.in.line * ", " * }
+ if$
+}
+
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ %
+ % format "In translator (Trans.),"
+ %
+FUNCTION {format.in.trans}
+{ "\BIn{} "
+ translator empty$
+ 'skip$
+ { format.translators.in.line * ", " * }
+ if$
+}
+
+
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ %
+ % format "In editor (Ed. and Trans.)"
+ % or "In editor (Ed.)" if editor not equal to translator
+ %
+FUNCTION {format.in.editors.trans}
+{ "\BIn{} "
+ editor empty$
+ { translator empty$
+ 'skip$
+ { format.translators.in.line * ", " * }
+ if$
+ }
+ { translator empty$
+ { format.editors.in.line * }
+ { editor translator =
+ { format.editors.trans.in.line * }
+ { format.editors.in.line * }
+ if$
+ }
+ if$
+ ", " *
+ }
+ if$
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% DATE %
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% Formats year (+ extra label) between parentheses (which
+% may be redefined by \BBOP and \BBCP).
+% Extra label can be used for
+% Bentler, P. M. (1983a) <article 1>
+% Bentler, P. M. (1983b) <article 2>
+
+FUNCTION {format.year.check}
+{ "\APACrefYear{"
+ protect.year *
+ %
+ % Add "a", "b", etc. when necessary.
+ %
+ make.definitive.year.supplement *
+ "}" *
+}
+
+
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% Formats year (+ extra label) + month + day between
+% parentheses (which may be redefined by \BBOP and \BBCP).
+% Extra label can be used for
+% Bentler, P. M. (1983a, June 7) <article 1>
+% Bentler, P. M. (1983b, April 4) <article 2>
+
+FUNCTION {format.year.month.day.check}
+{ "\APACrefYearMonthDay{"
+ protect.year *
+ %
+ % Add "a", "b", etc. when necessary.
+ %
+ make.definitive.year.supplement *
+ "}{" *
+ %
+ % Add month and day when present.
+ %
+ month empty$
+ 'skip$
+ { month * }
+ if$
+ "}{" *
+ day empty$
+ 'skip$
+ { day * }
+ if$
+ "}" *
+}
+
+% \end{macrocode}
+%
+% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% \subsection{Title formatting}
+% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% \begin{macro}{format.atitle.no.dot}
+% Title of article in journal or book, without finishing period.
+% The field must be on top of stack (so \fieldname{englishtitle} can
+% be handled as well).
+% \begin{macrocode}
+FUNCTION {format.atitle.no.dot}
+{ "{\BBOQ}" swap$
+ "{\BBCQ}" swap$
+ duplicate$ empty$
+ 'skip$
+ { duplicate$
+ % Two arguments: Title twice: (1) don't change case; (2) change case
+ "\APACrefatitle {" swap$ * "} {" * swap$
+ "t" change.case$
+ * "}" *
+ }
+ if$
+ enclose.check
+}
+
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{format.atitle.dot}
+% Title of article in journal or book, with finishing period.
+% The field must be on top of stack (so \fieldname{englishtitle} can
+% be handled as well).
+% \begin{macrocode}
+FUNCTION {format.atitle.dot}
+{ "{\BBOQ}" swap$
+ "{\BBCQ}" swap$
+ duplicate$ empty$
+ 'skip$
+ { duplicate$
+ % Two arguments: Title twice: (1) don't change case; (2) change case
+ "\APACrefatitle {" swap$ * "} {" * swap$
+ "t" change.case$
+ * "}" * add.period$
+ }
+ if$
+ enclose.check
+}
+
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{format.atitle.connect}
+% Title of article in journal or book. The field must be on top of stack.
+% The second element on stack must be connected: if that is empty, then
+% |format.atitle.dot|, else |format.atitle.no.dot|, connect, and add a
+% period.
+% \begin{macrocode}
+FUNCTION {format.atitle.connect}
+{ swap$
+ duplicate$ empty$
+ { pop$
+ format.atitle.dot
+ }
+ { swap$
+ format.atitle.no.dot
+ swap$ connect.with.space.check
+ add.period$
+ }
+ if$
+}
+
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{format.btitle.no.dot}
+% Title of a book or so, without period. Call with
+% \begin{verbatim}
+% field format.btitle.no.dot
+% \end{verbatim}
+% \begin{macrocode}
+FUNCTION {format.btitle.no.dot}
+{ duplicate$ empty$
+ { pop$
+ ""
+ }
+ { duplicate$
+ % Two arguments: Title twice: (1) don't change case; (2) change case
+ "\APACrefbtitle {" swap$ * "} {" * swap$
+ "t" change.case$
+ * "}" *
+ }
+ if$
+}
+
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{format.btitle.dot}
+% Title of book or so, with period. Call with
+% \begin{verbatim}
+% field format.btitle.dot
+% \end{verbatim}
+% \begin{macrocode}
+FUNCTION {format.btitle.dot}
+{ duplicate$ empty$
+ { pop$
+ ""
+ }
+ { add.period$ format.btitle.no.dot }
+ if$
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macrocode}
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ %
+ % title of book and similar
+ % field must be on top of stack
+ % second element on stack must be connected:
+ % if that is empty, then btitle.dot
+ % else btitle.no.dot, connect, and add period
+ %
+FUNCTION {format.btitle.connect}
+{ swap$
+ duplicate$ empty$
+ { pop$
+ format.btitle.dot
+ }
+ { swap$
+ format.btitle.no.dot
+ swap$ connect.with.space.check
+ add.period$
+ }
+ if$
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ %
+ % title of book and similar
+ % field must be on top of stack
+ % second element on stack must be connected
+ %
+FUNCTION {format.btitle.connect.no.dot}
+{ swap$
+ duplicate$ empty$
+ { pop$
+ format.btitle.no.dot
+ }
+ { swap$
+ format.btitle.no.dot
+ swap$ connect.with.space.check
+ }
+ if$
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ %
+ % format englishtitle (of nonenglish article, etc.)
+ %
+FUNCTION {format.aetitle.check}
+{ englishtitle empty$
+ { "" }
+ { % Two arguments: Title twice: (1) don't change case; (2) change case
+ "\APACrefaetitle {" englishtitle * "} {" *
+ englishtitle "t" change.case$ * "}" *
+ }
+ if$
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ %
+ % format englishtitle (of nonenglish book, etc.)
+ %
+FUNCTION {format.betitle.check}
+{ englishtitle empty$
+ { "" }
+ { % Two arguments: Title twice: (1) don't change case; (2) change case
+ "\APACrefbetitle {" englishtitle * "} {" *
+ englishtitle "t" change.case$ * "}" *
+ }
+ if$
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ %
+ % format type (of article, etc.)
+ %
+FUNCTION {format.atype.check}
+{ type bracket.check }
+
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ %
+ % format title and englishtitle (of article, etc.)
+ %
+FUNCTION {format.atitle.check}
+{ format.aetitle.check
+ title format.atitle.connect
+}
+
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ %
+ % format title, englishtitle, and type
+ % (of article, etc.)
+ %
+FUNCTION {format.atitle.type.check}
+{ format.aetitle.check
+ format.atype.check connect.with.space.check
+ title format.atitle.connect
+}
+
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ %
+ % format title, englishtitle,
+ % and translator (of article, etc.)
+ %
+FUNCTION {format.atitle.trans.check}
+{ format.aetitle.check
+ format.atrans.check connect.with.space.check
+ title format.atitle.connect
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ %
+ % format title, englishtitle, type,
+ % and translator (of article, etc.)
+ %
+FUNCTION {format.atitle.type.trans.check}
+{ format.aetitle.check
+ format.atype.check connect.with.space.check
+ format.atrans.check connect.with.space.check
+ title format.atitle.connect
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% JOURNAL FORMATTING %
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ %
+ % format journal, volume, number and pages
+ % call with
+ % formatted.pages format.journal.vol.num.pages.check
+ %
+FUNCTION { format.journal.vol.num.pages.check }
+{ "journal" journal warning.if.empty
+ duplicate$ empty$
+ journal empty$ and
+ volume empty$ and
+ number empty$ and
+ { pop$ "" }
+ { "\APACjournalVolNumPages{" journal "" connect.check
+ "}{" * volume "" connect.check
+ "}{" * number "" connect.check
+ "}{" * swap$ "" connect.check
+ "}" *
+ }
+ if$
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% BOOK VOLUME, EDITION, AND OTHER SUPPLEMENTARY INFO %
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ %
+ % volume of book, checks whether
+ % "Volume" or "Volumes"
+ %
+ % call with
+ % field format.bvolume.check
+ %
+FUNCTION {format.bvolume.check}
+{ duplicate$ empty$
+ 'skip$
+ { duplicate$ multi.result.check
+ { "\BVOLS" swap$ tie.or.space.connect }
+ { "\BVOL" swap$ tie.or.space.connect }
+ if$
+ }
+ if$
+}
+
+
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ %
+ % edition of book, must not be empty
+ % call with
+ % field format.edition.check
+ %
+FUNCTION {format.edition.check}
+{ duplicate$ empty$
+ 'skip$
+ { "\PrintOrdinal{" swap$ * "}" *
+ "\BEd" connect.with.space.check
+ }
+ if$
+}
+
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ %
+ % volume and edition of book
+ %
+FUNCTION {format.bvol.edition.check}
+{ edition format.edition.check
+ volume format.bvolume.check
+ connect.with.comma.check
+}
+
+
+
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ %
+ % volume and edition of book
+ %
+FUNCTION {format.bvol.edition}
+{ format.bvol.edition.check
+ parenthesize.check
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ %
+ % volume and edition and translator of translated book
+ %
+FUNCTION {format.bvol.edition.trans}
+{ format.bvol.edition.check
+ format.translators.in.paren.check connect.with.semicolon.check
+ parenthesize.check
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ %
+ % volume, edition, editor, and translator of (translated) book
+ %
+FUNCTION {format.bvol.edition.editor.trans}
+{ format.bvol.edition.check
+ format.editors.translators.in.paren.check connect.with.semicolon.check
+ parenthesize.check
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ %
+ % formats pages by first checking if 1 or more pages
+ % and prefixing pages with "p." or "pp." (these strings
+ % are given in the commands \BPG and \BPGS, respectively),
+ % whichever is applicable, and do a tie or space connect
+ %
+ % call with
+ % field format.bpages.check
+ %
+FUNCTION {format.bpages.check}
+{ duplicate$ empty$
+ 'skip$
+ { duplicate$ multi.result.check
+ { "\BPGS" swap$ tie.or.space.connect }
+ { "\BPG~" swap$ * }
+ if$
+ }
+ if$
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ %
+ % formats chapters by first checking if 1 or more chapters
+ % and prefixing pages with "chap." (this string
+ % is given in the commands \BCHAP and \BCHAPS, respectively),
+ % whichever is applicable, and do a tie or space connect
+ %
+ % call with
+ % field format.bchapter.check
+ %
+FUNCTION {format.bchapter.check}
+{ duplicate$ empty$
+ 'skip$
+ { duplicate$ multi.result.check
+ { "\BCHAPS" swap$ tie.or.space.connect }
+ { "\BCHAP" swap$ tie.or.space.connect }
+ if$
+ }
+ if$
+}
+
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ %
+ % volume, edition, and pages or chapter of article in book etc.
+ %
+FUNCTION {format.bvol.edition.pages}
+{ format.bvol.edition.check
+ pages empty$
+ { chapter format.bchapter.check connect.with.comma.check }
+ { pages format.bpages.check connect.with.comma.check }
+ if$
+ parenthesize.check
+}
+
+
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ %
+ % title, volume, edition of book
+ %
+FUNCTION {format.btitle.vol.edition}
+{ format.betitle.check
+ format.bvol.edition connect.with.space.check
+ title format.btitle.connect.no.dot
+}
+
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ %
+ % title, volume, edition, and translator of book
+ %
+FUNCTION {format.btitle.vol.edition.trans}
+{ format.betitle.check
+ format.bvol.edition.trans connect.with.space.check
+ title format.btitle.connect.no.dot
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ %
+ % title, volume, edition, editor, and translator of book
+ %
+FUNCTION {format.btitle.vol.edition.editor.trans}
+{ format.betitle.check
+ format.bvol.edition.editor.trans connect.with.space.check
+ title format.btitle.connect.no.dot
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% ADDRESS AND PUBLISHER %
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ %
+ % format address and publisher of book etc.
+ %
+ % New York: Wiley
+ % or
+ % Wiley (if address empty)
+ % or
+ % New York (if publisher empty)
+ %
+FUNCTION {format.address.publisher}
+{ %
+ % If publisher = author or publisher = "author" or publisher = "Author"
+ % then hand over the final choice how to format this to \LaTeX.
+ % (I could imagine similar code for editors, but the APA manual does
+ % not mention it and then we'd have to check whether the editor is in
+ % the author position, so let's keep it simple until someone complains.)
+ %
+ author empty$
+ publisher empty$ or
+ { publisher "\APACaddressPublisher{" }
+ { author publisher =
+ "author" publisher = or
+ "Author" publisher = or
+ { author "\APACaddressPublisherEqAuth{" }
+ { publisher "\APACaddressPublisher{" }
+ if$
+ }
+ if$
+ address "" connect.check "}{" *
+ % Recover publisher that was pushed onto the stack previously.
+ swap$ "" connect.check "}" *
+}
+
+% \end{macrocode}
+%
+% \begin{macro}{format.address.publisher.check}
+% Format \fieldname{address} and \fieldname{publisher} of a book etc.:
+% ``New York, NY: Wiley'' or ``Wiley'' (if \fieldname{address} is empty)
+% or ``New York, NY'' (if \fieldname{publisher} is empty), or do nothing
+% if both are empty.
+% \begin{macrocode}
+FUNCTION {format.address.publisher.check}
+{ publisher empty$
+ address empty$
+ and
+ 'skip$
+ {
+% \end{macrocode}
+% Clear the stack.
+% \begin{macrocode}
+ duplicate$ empty$
+ 'skip$
+ { output.new.block }
+ if$
+ format.address.publisher
+ }
+ if$
+}
+
+% \end{macrocode}
+% \end{macro}
+% \begin{macrocode}
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% TYPE AND NUMBER OF A REPORT %
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ %
+ % format number as in reports: No. 2017
+ % call with
+ % field format.rnumber.check
+ %
+FUNCTION {format.rnumber.check}
+{ duplicate$ empty$
+ 'skip$
+ { duplicate$ multi.result.check
+ { "\BNUMS" swap$ tie.or.space.connect }
+ { "\BNUM" swap$ tie.or.space.connect }
+ if$
+ }
+ if$
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ %
+ % format type and number of a standalone item
+ % call with
+ % format.type.number
+ %
+FUNCTION { format.type.number }
+{ type empty$
+ { type.2 }
+ { type }
+ if$
+ number empty$
+ { bracket.check }
+ { number format.rnumber.check connect.with.space.check
+ parenthesize.check
+ }
+ if$
+}
+
+% \end{macrocode}
+% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% \paragraph{Howpublished formatting functions}
+% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% The third function is a cleaner version. The first one is used with
+% various entry types; the second one with \entryname{@misc}, the
+% third one in v6.03 only with theses.
+% \begin{macrocode}
+FUNCTION {format.howpublished}
+{ howpublished empty$
+ 'skip$
+ { % clear the stack
+ duplicate$ empty$
+ 'pop$
+ { output.dot.new.block }
+ if$
+ "\APAChowpublished {" howpublished * "}" *
+ }
+ if$
+}
+FUNCTION {output.howpublished}
+{ howpublished empty$
+ 'skip$
+ { "\APAChowpublished {" howpublished * "}" *
+ output.dot.new.block
+ }
+ if$
+}
+FUNCTION {howpublished.block}
+{ howpublished empty$
+ 'skip$
+ { start.new.block
+ "\APAChowpublished {" howpublished * "}" *
+ output.dot.end.block
+ }
+ if$
+}
+% \end{macrocode}
+%
+% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% \subsection{URL and DOI formatting functions}
+% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% \begin{macro}{begin.end.url.env}
+% Begin and end of a URL environment.
+% \begin{macrocode}
+FUNCTION {begin.end.url.env}
+{ "\begin{APACrefURL} "
+% \end{macrocode}
+% For ``Retrieved $\langle$\textit{date}$\rangle$, from''
+% \begin{macrocode}
+ lastchecked empty$
+ { urldate empty$
+ 'skip$
+ { "[{" * urldate * "}]" * }
+ if$
+ }
+ { "[{" * lastchecked * "}]" * }
+ if$
+ " \end{APACrefURL} "
+}
+
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{begin.end.doi.env}
+% Begin and end of a DOI environment.
+% \begin{macrocode}
+FUNCTION {begin.end.doi.env}
+{ "\begin{APACrefDOI} "
+ " \end{APACrefDOI} "
+}
+
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{begin.end.msg.env}
+% Begin and end of a message environment.
+% \begin{macrocode}
+FUNCTION {begin.end.msg.env}
+{ "\begin{APACrefURLmsg} "
+ " \end{APACrefURLmsg} "
+}
+% \end{macrocode}
+% \end{macro}
+% Format \fieldname{url} given that it is not empty.
+% \begin{macrocode}
+FUNCTION {format.url}
+% \end{macrocode}
+% First format begin and end of the enclosing environment.
+% With posted messages, a different environment is used.
+% \begin{macrocode}
+{ type.2 empty$
+ { begin.end.url.env }
+ { type.2 "\bibmessage" =
+ { begin.end.msg.env }
+ { begin.end.url.env }
+ if$
+ }
+ if$
+ "\url{" url * "}" *
+% \end{macrocode}
+% Enclose url string in begin and end environment.
+% \begin{macrocode}
+ enclose.check
+}
+% \end{macrocode}
+% Process a whole url block. Skip if a \fieldname{doi} is also present
+% because then \fieldname{doi} has precedence.
+% \begin{macrocode}
+FUNCTION {url.block}
+{ doi empty$
+ { url empty$
+ 'skip$
+ { start.new.block
+ format.url
+ output.end.block
+ }
+ if$
+ }
+ 'skip$
+ if$
+}
+% \end{macrocode}
+% Format \fieldname{doi} given that it is not empty.
+% \begin{macrocode}
+FUNCTION {format.doi}
+% \end{macrocode}
+% Format begin and end of the enclosing environment.
+% \begin{macrocode}
+{ begin.end.doi.env
+ "\doi{" doi * "}" *
+% \end{macrocode}
+% Enclose doi string in begin and end environment.
+% \begin{macrocode}
+ enclose.check
+}
+% \end{macrocode}
+% Process a whole doi block.
+% \begin{macrocode}
+FUNCTION {doi.block}
+{ doi empty$
+ 'skip$
+ { start.new.block
+ format.doi
+ output.end.block
+ }
+ if$
+}
+% \end{macrocode}
+%
+% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% \subsection{Note formatting functions}
+% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% Format optional note.
+% \begin{macrocode}
+FUNCTION {format.note}
+{ "\APACrefnote{" "}" note enclose.check }
+% \end{macrocode}
+% Process a whole note block (only \fieldname{note}).
+% \begin{macrocode}
+FUNCTION {note.block}
+{ note empty$
+ 'skip$
+ { start.new.block
+ format.note
+ output.end.block
+ }
+ if$
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ %
+ % format original year of publication and note
+ % (reprint or translation)
+ %
+FUNCTION {format.orig.year.note}
+{ originalyear empty$
+ { format.note }
+ { "\APACorigyearnote{"
+ originalyear "" connect.check "}{" *
+ note "" connect.check "}" *
+ }
+ if$
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ %
+ % format original journal of publication and note
+ % (reprint or translation)
+ %
+FUNCTION {format.orig.journal.note}
+{ "\APACorigjournalnote{"
+ originalyear "" connect.check "}{" *
+ originaljournal "" connect.check "}{" *
+ originalvolume "" connect.check "}{" *
+ originalnumber "" connect.check "}{" *
+ originalpages "" connect.check "}{" *
+ note "" connect.check "}" *
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ %
+ % format original book of publication and note
+ % (reprint or translation)
+ %
+FUNCTION {format.orig.book.note}
+{ "\APACorigbooknote{" originalyear "" connect.check "}{" *
+ %
+ originaleditor empty$
+ 'skip$
+ { originaleditor num.names$ #1 >
+ { "\APACorigEDS {" * originaleditor format.editor.names * "}" * }
+ { "\APACorigED {" * originaleditor format.editor.names * "}" * }
+ if$
+ }
+ if$
+ %
+ "}{" *
+ originalbooktitle format.btitle.no.dot "" connect.check "} {" *
+ originaledition format.edition.check "" connect.check "} {" *
+ originalvolume format.bvolume.check "" connect.check "} {" *
+ originalpages format.bpages.check "" connect.check "} {" *
+ originaladdress "" connect.check "} {" *
+ originalpublisher "" connect.check "} {" *
+ note "" connect.check "}" *
+}
+
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ %
+ % format information about original publication of reprint
+ % and format optional note
+ %
+FUNCTION {format.orig.note}
+{ originaljournal empty$
+ { originalbooktitle empty$
+ { note empty$
+ { originalyear empty$
+ 'skip$
+ { originalyear "\bibnodate" =
+ originalyear "l" change.case$ "no date" = or
+ originalyear "l" change.case$ "n.d." = or
+ 'skip$
+ { output.new.block
+ format.orig.year.note
+ }
+ if$
+ }
+ if$
+ }
+ { output.new.block
+ format.orig.year.note
+ }
+ if$
+ }
+ { output.new.block
+ format.orig.book.note
+ }
+ if$
+ }
+ { output.new.block
+ format.orig.journal.note
+ }
+ if$
+}
+% \end{macrocode}
+% Finish current entry by writing what's left on the stack and starting
+% a new line.
+% \begin{macrocode}
+FUNCTION {fin.entry}
+{ doi empty$
+ 'skip$
+ { output.new.block
+ format.doi
+ }
+ if$
+ output.end.block
+ "\PrintBackRefs{\CurrentBib}" write$ newline$
+ test
+ { "\vspace{\baselineskip}" write$ newline$ }
+ 'skip$
+ if$
+%<*annotated>
+ %
+ % According to TLC2, pp. 810-811, both annote and annotate fields are
+ % known, so support them both, but do not print them both, in case
+ % someone wants to make a file that is compatible with both the annotate
+ % and annotation styles and thus duplicates the information. Instead, we
+ % give annote priority.
+ %
+ annote empty$
+ {% Try annotate
+ annotate empty$
+ 'skip$
+ { % add annotation
+ "\begin{APACrefannotation}" write$ newline$
+ annotate write$ newline$
+ "\end{APACrefannotation}" write$ newline$
+ }
+ if$
+ }
+ { % add annotation
+ "\begin{APACrefannotation}" write$ newline$
+ annote write$ newline$
+ "\end{APACrefannotation}" write$ newline$
+ }
+ if$
+%</annotated>
+}
+% \end{macrocode}
+% Finish current entry: process \fieldname{doi}, back references, and
+% annotation if requested.
+% \begin{macrocode}
+FUNCTION {fin.entry.2}
+{ doi.block
+ "\PrintBackRefs{\CurrentBib}" write$ newline$
+ test
+ { "\vspace{\baselineskip}" write$ newline$ }
+ 'skip$
+ if$
+%<*annotated>
+% \end{macrocode}
+% According to TLC2, pp. 810--811, both \fieldname{annote} and
+% \fieldname{annotate} fields are known, so support them both, but do
+% not print them both, in case someone wants to make a \fname{.bib}
+% file that is compatible with both the \pkg{annotate} and
+% and \pkg{annotation} styles and thus duplicates the information.
+% Instead, we give \fieldname{annote} priority.
+% \begin{macrocode}
+ annote empty$
+ {% Try annotate
+ annotate empty$
+ 'skip$
+ { % add annotation
+ "\begin{APACrefannotation}" write$ newline$
+ annotate write$ newline$
+ "\end{APACrefannotation}" write$ newline$
+ }
+ if$
+ }
+ { % add annotation
+ "\begin{APACrefannotation}" write$ newline$
+ annote write$ newline$
+ "\end{APACrefannotation}" write$ newline$
+ }
+ if$
+%</annotated>
+}
+% \end{macrocode}
+%
+% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% \subsection{Top-level and near-top level functions for formatting complete
+% entries}
+% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% Article in periodical: \entryname{journal}, \entryname{magazine},
+% \entryname{newspaper}. Call with
+% \begin{verbatim}
+% formatted.pages formatted.date periodical
+% \end{verbatim}
+% \begin{macrocode}
+FUNCTION {periodical}
+{
+% \end{macrocode}
+% \fieldname{author} or \fieldname{editor}, \fieldname{year},
+% \fieldname{title}, \fieldname{englishtitle}, \fieldname{type}.
+% \begin{macrocode}
+ author empty$
+ %
+ % no author: possibly special issue with editors as authors
+ % (APA manual, ex. 11, p. 121)
+ %
+ { editor empty$
+ %
+ % no author or editor: title serves as author.
+ % title formatted as article title (APA manual not consistent in this,
+ % compare statement on p. 119: ``treat as book title'' and
+ % example 8, p. 121: no underlining => article title)
+ %
+ { format.atitle.type.trans.check output.new.block
+ %
+ % now formatted date on top of stack
+ %
+ output.dot.new.block
+ }
+ %
+ % format editor and year, and check if year is present
+ % format article title and check if title or type present
+ %
+ { format.editors.as.authors start.new.block
+ %
+ % now formatted date on top of stack
+ %
+ output.dot.new.block
+ format.atitle.type.trans.check output.new.block
+ }
+ if$
+ }
+ %
+ % format author and year, and check if year is present
+ % format article title and check if title or type present
+ %
+ { format.authors start.new.block
+ %
+ % now formatted date on top of stack
+ %
+ output.dot.new.block
+ format.atitle.type.trans.check output.new.block
+ }
+ if$
+ %
+ % format journal name, volume and issue number, and pages
+ % and check if journal not empty
+ %
+ format.journal.vol.num.pages.check
+ %
+ % if not empty, insert howpublished.
+ % (used if article is retrieved from the internet)
+ %
+ format.howpublished add.period$
+ %
+ % format url
+ %
+ url empty$
+ 'skip$
+ { % Clear the stack
+ duplicate$ empty$
+ 'skip$
+ { output.new.block }
+ if$
+ format.url
+ }
+ if$
+ %
+ % possible reprint and optional note
+ %
+ format.orig.note
+ fin.entry
+}
+
+
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ %
+ % journal article
+ %
+FUNCTION {article}
+{ pages format.year.month.day.check periodical }
+
+
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ %
+ % magazine article
+ %
+FUNCTION {magazine}
+{ pages format.year.month.day.check periodical }
+
+
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ %
+ % newspaper article
+ %
+FUNCTION {newspaper}
+{ pages format.bpages.check format.year.month.day.check periodical }
+
+
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ %
+ % (translation of) entire book
+ %
+FUNCTION {book}
+{ %
+ % author or editor,
+ % year, title, englishtitle, translator
+ %
+ author empty$
+ %
+ % no author: possibly edited book with editors as authors
+ %
+ { editor empty$
+ %
+ % no author or editor: title serves as author.
+ % title formatted as book title
+ %
+ { format.btitle.vol.edition.trans
+ format.type.number connect.with.space.check
+ output.dot.new.block
+ format.year.check add.period$
+ }
+ %
+ % format editor and year, and check if year is present
+ % format booktitle, volume, and edition and check if title present
+ %
+ { translator empty$
+ { format.editors.as.authors start.new.block
+ format.year.check output.dot.new.block
+ format.btitle.vol.edition
+ }
+ %
+ % format translator correctly
+ %
+ { translator editor =
+ not
+ { format.editors.as.authors start.new.block
+ format.year.check output.dot.new.block
+ format.btitle.vol.edition.trans
+ }
+ { format.ed.trans.as.authors start.new.block
+ format.year.check output.dot.new.block
+ format.btitle.vol.edition
+ }
+ if$
+ }
+ if$
+ format.type.number connect.with.space.check
+ add.period$
+ }
+ if$
+ }
+ %
+ % format author and year, and check if year is present
+ % format booktitle, volume, and edition and check if title present
+ %
+ { format.authors start.new.block
+ format.year.check output.dot.new.block
+ format.btitle.vol.edition.editor.trans
+ format.type.number connect.with.space.check
+ add.period$
+ }
+ if$
+ %
+ % format address and publisher
+ %
+ format.address.publisher.check
+ %
+ % if not empty, insert howpublished.
+ % (used if book is retrieved from the internet)
+ %
+ format.howpublished add.period$
+ %
+ % format url
+ %
+ url empty$
+ 'skip$
+ { % Clear the stack
+ duplicate$ empty$
+ 'skip$
+ { output.new.block }
+ if$
+ format.url
+ }
+ if$
+ %
+ % format original publication (of reprint/translation)
+ % and optional note
+ %
+ format.orig.note
+ fin.entry
+}
+%
+% \end{macrocode}
+% Article or chapter in edited book.
+% \begin{macrocode}
+FUNCTION {incollection}
+{ author empty$
+% \end{macrocode}
+% No \fieldname{author}: \fieldname{title} serves as author. The title is
+% formatted as an article title.
+% \begin{macrocode}
+ { editor.ne.trans
+ { format.atitle.type.trans.check }
+ { format.atitle.type.check }
+ if$
+ output.new.block
+% \end{macrocode}
+% Format \fieldname{month} and \fieldname{day} as well when available,
+% esp.\ for ``collections'' that are not books, such as parts of internet
+% documents.
+% \begin{macrocode}
+ format.year.month.day.check add.period$
+ }
+% \end{macrocode}
+% Format \fieldname{author} and \fieldname{year}, and check whether
+% \fieldname{year} is present. Format article title and check whether
+% \fieldname{title} or \fieldname{type} are present.
+% \begin{macrocode}
+ { format.authors start.new.block
+ format.year.month.day.check output.dot.new.block
+ editor.ne.trans
+ { format.atitle.type.trans.check }
+ { format.atitle.type.check }
+ if$
+ }
+ if$
+% \end{macrocode}
+% Format ``In '' \fieldname{editor} `` (Ed.\ \& Trans.), ''
+% \fieldname{booktitle}, \fieldname{volume}, \fieldname{edition},
+% \fieldname{pages}. Leave empty if all these fields are missing.
+% \begin{macrocode}
+ editor empty$
+ translator empty$ and
+ edition empty$ and
+ volume empty$ and
+ pages empty$ and
+ chapter empty$ and
+ booktitle empty$ and
+ 'skip$
+ {
+ output.new.block
+ format.in.editors.trans
+ format.bvol.edition.pages
+ booktitle format.btitle.connect * add.period$
+ }
+ if$
+% \end{macrocode}
+% Format \fieldname{address} and \fieldname{publisher}.
+% \begin{macrocode}
+ format.address.publisher.check
+% \end{macrocode}
+% If not empty, insert \fieldname{howpublished}.
+% \begin{macrocode}
+ format.howpublished add.period$
+% \end{macrocode}
+% Format \fieldname{url}.
+% \begin{macrocode}
+ url empty$
+ 'skip$
+ {
+% \end{macrocode}
+% Clear the stack.
+% \begin{macrocode}
+ duplicate$ empty$
+ 'skip$
+ { output.new.block }
+ if$
+ format.url
+ }
+ if$
+% \end{macrocode}
+% Format original publication (of reprint/translation) and optional note.
+% \begin{macrocode}
+ format.orig.note
+ fin.entry
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% REPORTS %
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ %
+ % technical report number
+ %
+FUNCTION {format.tr.number}
+{ type empty$
+ { "\BTR{}" }
+ { type "\bibnotype" =
+ { "" }
+ { type }
+ if$
+ }
+ if$
+ number format.rnumber.check connect.with.space.check
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ %
+ % title, volume, edition, report number
+ %
+FUNCTION {format.tr.title.number}
+{ format.betitle.check
+ % Single out the situation in which there is no number
+ % and type = {\bibnotype}, i.e., no type as well.
+ % (Why not use book then?)
+ type empty$
+ { % Now, we're in the regular situation with at least a
+ % number, a type, a volume, or an edition.
+ "\APACbVolEdTR{" format.bvol.edition.check * "}{" *
+ format.tr.number * "}" *
+ }
+ { type "\bibnotype" =
+ number empty$
+ volume empty$
+ edition empty$
+ and
+ and
+ and
+ { "" }
+ { % Now, we're in the regular situation with at least a
+ % number, a type, a volume, or an edition.
+ "\APACbVolEdTR {" format.bvol.edition.check * "}{" *
+ format.tr.number * "}" *
+ }
+ if$
+ }
+ if$
+ connect.with.space.check
+ title format.btitle.connect
+}
+
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ %
+ % format address and institution of reports etc.
+ %
+ % Washington, DC: National Institute of Education
+ % or
+ % National Institute of Education (if address empty)
+ %
+ % warning if no institution
+ %
+FUNCTION {format.address.institution.check}
+{ url empty$
+ doi empty$ and
+ { "institution" institution warning.if.empty
+ "address" address warning.if.empty
+ }
+ 'skip$
+ if$
+ institution empty$
+ address empty$
+ and
+ 'skip$
+ { % Clear the stack
+ duplicate$ empty$
+ 'skip$
+ { output.new.block }
+ if$
+ %
+ % If institution = author or institution = "author"
+ % or institution = "Author" then hand over the final choice how to
+ % format this to \LaTeX. See also format.address.publisher
+ %
+ author empty$
+ institution empty$ or
+ { institution "\APACaddressInstitution{" }
+ { author institution =
+ "author" institution = or
+ "Author" institution = or
+ { author "\APACaddressInstitutionEqAuth{" }
+ { institution "\APACaddressInstitution{" }
+ if$
+ }
+ if$
+ address "" connect.check "}{" *
+ % Recover institution that was pushed onto the stack previously.
+ swap$ "" connect.check "}" *
+ }
+ if$
+}
+
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ %
+ % reports
+ %
+FUNCTION {techreport}
+{ author empty$
+ %
+ % no author: possibly edited report with editors as authors
+ %
+ { editor empty$
+ %
+ % no author or editor: title serves as author.
+ % title formatted as book title
+ %
+ { format.tr.title.number output.dot.new.block
+ format.year.month.day.check add.period$
+ }
+ %
+ % format editor and year, and check if year is present
+ % format report title and check if title present
+ % format volume, edition, type, and number
+ %
+ { format.editors.as.authors start.new.block
+ format.year.month.day.check output.dot.new.block
+ format.tr.title.number add.period$
+ }
+ if$
+ }
+ %
+ % format author and year, and check if year is present
+ % format report title and check if title present
+ % format volume, edition, type, and number
+ %
+ { format.authors start.new.block
+ format.year.month.day.check output.dot.new.block
+ format.tr.title.number add.period$
+ }
+ if$
+ %
+ % format address and institution, check if institution present
+ %
+ format.address.institution.check
+ %
+ % if not empty, insert howpublished.
+ % (used if report is retrieved from the internet)
+ %
+ format.howpublished add.period$
+ %
+ % format url
+ %
+ url empty$
+ 'skip$
+ { % Clear the stack
+ duplicate$ empty$
+ 'skip$
+ { output.new.block }
+ if$
+ format.url
+ }
+ if$
+ %
+ % format optional note
+ %
+ note empty$
+ 'skip$
+ { % Clear the stack
+ duplicate$ empty$
+ 'skip$
+ { output.new.block }
+ if$
+ format.note
+ }
+ if$
+ fin.entry
+}
+
+
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ %
+ % (translated) article or chapter in report
+ %
+FUNCTION {intechreport}
+{ author empty$
+ %
+ % no author: title serves as author.
+ % title formatted as article title (APA manual not consistent in this,
+ % compare statement on p. 119: ``treat as book title'' and
+ % example 8, p. 121: no underlining => article title)
+ %
+ { editor.ne.trans
+ { format.atitle.trans.check }
+ { format.atitle.check }
+ if$
+ output.new.block
+ format.year.month.day.check output.dot.new.block
+ }
+ %
+ % format author and year, and check if year is present
+ % format article title and check if title or type present
+ %
+ { format.authors start.new.block
+ format.year.month.day.check output.dot.new.block
+ editor.ne.trans
+ { format.atitle.trans.check }
+ { format.atitle.check }
+ if$
+ output.new.block
+ }
+ if$
+ %
+ % format "In " editor " (Ed. \& Trans.), "
+ % booktitle, volume, edition, pages
+ %
+ format.in.editors.trans
+ %
+ % volume, edition, report type and number, pages
+ %
+ "\APACbVolEdTRpgs {" format.bvol.edition.check * "} {" *
+ format.tr.number *
+ "} {" * pages format.bpages.check *
+ "}" *
+ %
+ booktitle format.btitle.connect *
+ add.period$
+ %
+ % format address and publisher
+ %
+ format.address.institution.check
+ %
+ % if not empty, insert howpublished.
+ % (used if report is retrieved from the internet)
+ %
+ format.howpublished add.period$
+ %
+ % format url
+ %
+ url empty$
+ 'skip$
+ { % Clear the stack
+ duplicate$ empty$
+ 'skip$
+ { output.new.block }
+ if$
+ format.url
+ }
+ if$
+ %
+ % format original publication (of reprint/translation)
+ % and optional note
+ %
+ format.orig.note
+ fin.entry
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ %
+ % papers presented at conferences etc.
+ %
+FUNCTION {lecture}
+{ author empty$
+ { "author" author warning.if.empty }
+ { format.authors start.new.block }
+ if$
+ %
+ % format year, month, and day, and check if year present
+ % format title and check if title present
+ % format howpublished and check if howpublished present
+ %
+ format.year.month.day.check output.dot.new.block
+ symposium empty$
+ { format.betitle.check
+ title format.btitle.connect output.new.block
+ howpublished empty$
+ { "symposium and howpublished missing in " cite$ * warning$
+ ""
+ }
+ { "\APAChowpublished {" howpublished * "}" * }
+ if$
+ address connect.with.comma.check
+ }
+ { format.atitle.type.check output.new.block
+ "\BIn{} "
+ chair empty$
+ 'skip$
+ { chair format.editor.names
+ chair num.names$ #1 >
+ { "(\BCHAIRS)" }
+ { "(\BCHAIR)" }
+ if$
+ connect.with.space.check * ", " *
+ }
+ if$
+ symposium format.btitle.no.dot *
+ format.howpublished
+ address connect.with.comma.check
+ }
+ if$
+ add.period$
+ %
+ % format url
+ %
+ url empty$
+ 'skip$
+ { % Clear the stack
+ duplicate$ empty$
+ 'skip$
+ { output.new.block }
+ if$
+ format.url
+ }
+ if$
+ %
+ % format optional note
+ %
+ note empty$
+ 'skip$
+ { % Clear the stack
+ duplicate$ empty$
+ 'skip$
+ { output.new.block }
+ if$
+ format.note
+ }
+ if$
+ fin.entry
+}
+
+% \end{macrocode}
+% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% \paragraph{Theses}
+% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% Format thesis title, with \fieldname{type} and \fieldname{school},
+% if necessary. Call with
+% \begin{verbatim}
+% "default.published.thesis" "default.unpublished.thesis" format.ttitle.type.school
+% \end{verbatim}
+% The type now needs to be done here, and the school as well if the
+% dissertation was retrieved from the internet, which we'll take to
+% be the same as \fieldname{url} non-empty. Note that \pkg{apacite}
+% cannot distinguish between institutional databases (ex.~41 in the
+% 6th ed.\ of the APA manual) and ordinary websites (ex.~42), so the
+% user should provide the \fieldname{school} if it's necessary but
+% not otherwise. If both \fieldname{url} and \fieldname{howpublished}
+% are empty, the type is taken to be the unpublished thesis type
+% (unless overridden by the \fieldname{type} field); otherwise, the
+% published type is used (unless overridden).
+% \begin{macrocode}
+FUNCTION {format.ttitle.type.school}
+{ doi empty$ not
+ url empty$ not or
+ howpublished empty$ not or
+ { pop$ }
+ { swap$ pop$ }
+ if$
+% \end{macrocode}
+% Single out the situation in which |type = {\bibnotype}|, i.e.,
+% no type.
+% \begin{macrocode}
+ type empty$
+ 'skip$
+ { type "\bibnotype" =
+ { pop$
+ ""
+ }
+ { pop$
+ type
+ }
+ if$
+ }
+ if$
+% \end{macrocode}
+% The desired type is on top of the stack. Build \LaTeX{} command.
+% \begin{macrocode}
+ duplicate$ empty$
+ doi empty$
+ url empty$ and
+ howpublished empty$ and
+ address empty$
+ school empty$ and or and
+ { 'pop$
+ title empty$ not
+ englishtitle empty$ not or
+ { start.new.block }
+ 'skip$
+ if$
+ ""
+ }
+ { start.new.block
+ "\APACtypeAddressSchool {" swap$ * "}{" *
+% \end{macrocode}
+% If unpublished, school and location are listed in the next block.
+% \begin{macrocode}
+ doi empty$
+ url empty$ and
+ howpublished empty$ and
+ { "}{}" * }
+ { address "" connect.check "}{" *
+ school "" connect.check "}" *
+ }
+ if$
+ }
+ if$
+% \end{macrocode}
+% Format english translation of title, if present, title itself, and
+% connect everything.
+% \begin{macrocode}
+ format.betitle.check swap$
+ connect.with.space.check
+ "title" title warning.if.empty
+ title format.btitle.connect
+}
+% \end{macrocode}
+% Block that indicates school and location for unpublished theses.
+% \begin{macrocode}
+FUNCTION {unpub.address.school.block}
+% \end{macrocode}
+% Determine whether this is an unpublished thesis (no \fieldname{url},
+% \fieldname{doi}, or \fieldname{howpublished}.
+% \begin{macrocode}
+{ doi empty$
+ url empty$ and
+ howpublished empty$ and
+% \end{macrocode}
+% If so, there should be a \fieldname{school}, so issue a warning if
+% it's empty.
+% \begin{macrocode}
+ { "school" school warning.if.empty
+ school empty$
+ address empty$ and
+ 'skip$
+ { start.new.block
+ "\APACaddressSchool {" address "" connect.check "}{" *
+ school "" connect.check "}" *
+ output.dot.end.block
+ }
+ if$
+ }
+% \end{macrocode}
+% Do nothing if it's not an unpublished thesis.
+% \begin{macrocode}
+ 'skip$
+ if$
+}
+% \end{macrocode}
+% Format theses. Call with
+% \begin{verbatim}
+% "default.published.thesis" "default.unpublished.thesis" thesis
+% \end{verbatim}
+% \begin{macrocode}
+FUNCTION {thesis}
+% \end{macrocode}
+% DAI and similar are now formatted purely as articles, so remove
+% the two default types on top of the stack and redirect to the
+% |article| function.
+% \begin{macrocode}
+{ journal empty$ not
+ { pop$ pop$
+ article
+ }
+ { author empty$
+ { "author" author warning.if.empty }
+ { format.authors start.new.block }
+ if$
+% \end{macrocode}
+% Check if \fieldname{year} is present and format year. Ditto for
+% \fieldname{title} with \fieldname{type} (and \fieldname{school}
+% if the dissertation was obtained from a website).
+% \begin{macrocode}
+ format.year.check output.dot.end.block
+ format.ttitle.type.school output.dot.end.block
+% \end{macrocode}
+% Put name of institution (\fieldname{school}) and its address here if
+% it's an unpublished thesis.
+% \begin{macrocode}
+ unpub.address.school.block
+% \end{macrocode}
+% If not empty, insert \fieldname{howpublished}. This is used if the
+% thesis was retrieved from a database.
+% \begin{macrocode}
+ howpublished.block
+% \end{macrocode}
+% Format \fieldname{url}, in case the thesis was downloaded from a
+% webpage, optional \fieldname{note}, and finalize with the standard
+% parts (\fieldname{doi}, back references).
+% \begin{macrocode}
+ url.block
+ note.block
+ fin.entry.2
+ }
+ if$
+}
+% \end{macrocode}
+% PhD theses and master's these, respectively. These set the default
+% published and unpublished thesis types and then call |thesis|.
+% \begin{macrocode}
+FUNCTION {phdthesis}
+{ "\BPhD" "\BUPhD" thesis }
+FUNCTION {mastersthesis}
+{ "\BMTh" "\BUMTh" thesis }
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% OTHER %
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ %
+ % title of something (used in unpublished and misc)
+ % english translation of title
+ % type and number of something
+ %
+FUNCTION {format.btitle.type.num}
+{ format.betitle.check
+ format.bvol.edition connect.with.space.check
+ format.type.number
+ connect.with.space.check
+ title empty$
+ { add.period$ }
+ { title format.btitle.connect }
+ if$
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ %
+ % title of message or software-related thing (used in misc)
+ % english translation of title
+ % type and number of something
+ %
+FUNCTION {format.mtitle.type.num}
+{ format.aetitle.check
+ format.bvol.edition connect.with.space.check
+ type.2 "\bibmessage" =
+ { number empty$
+ 'skip$
+ { type.2 number tie.or.space.connect
+ bracket.check
+ connect.with.space.check
+ }
+ if$
+ }
+ { format.type.number
+ connect.with.space.check
+ }
+ if$
+ title empty$
+ { add.period$ }
+ { title format.atitle.connect }
+ if$
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ %
+ % title, english translation of title,
+ % type and number of something (used in misc)
+ %
+FUNCTION {output.misctitle.type.num}
+{ type.2 empty$
+ { format.btitle.type.num }
+ { type.2 "\bibmessage" =
+ type.2 "\bibcomputerprogram" = or
+ type.2 "\bibcomputerprogrammanual" = or
+ type.2 "\bibcomputerprogramandmanual" = or
+ type.2 "\bibcomputersoftware" = or
+ type.2 "\bibcomputersoftwaremanual" = or
+ type.2 "\bibcomputersoftwareandmanual" = or
+ type.2 "\bibprogramminglanguage" = or
+ { format.mtitle.type.num }
+ { format.btitle.type.num }
+ if$
+ }
+ if$
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ %
+ % unpublished manuscripts, etc.
+ %
+FUNCTION {unpublished}
+{ check.relevant.fields
+ author empty$
+ %
+ % no author: possibly edited book with editors as authors
+ %
+ { editor empty$
+ %
+ % no author or editor: title serves as author.
+ % title formatted as book title
+ %
+ { format.btitle.type.num output.new.block
+ format.year.month.day.check add.period$
+ }
+ %
+ % format editor and year, and check if year is present
+ % format book title, volume, and edition and check if title present
+ %
+ { format.editors.as.authors start.new.block
+ format.year.month.day.check output.dot.new.block
+ format.btitle.type.num
+ }
+ if$
+ }
+ %
+ % format author and year, and check if year is present
+ % format book title, volume, and edition
+ % and check if title or type present
+ %
+ { format.authors start.new.block
+ format.year.month.day.check output.dot.new.block
+ format.btitle.type.num
+ }
+ if$
+ howpublished empty$
+ organization empty$ and
+ address empty$ and
+ 'skip$
+ { output.new.block
+ "\APAChowpublished{" "}" howpublished enclose.check
+ organization connect.with.comma.check
+ address connect.with.comma.check
+ add.period$
+ }
+ if$
+ %
+ % format url
+ %
+ url empty$
+ 'skip$
+ { % Clear the stack
+ duplicate$ empty$
+ 'skip$
+ { output.new.block }
+ if$
+ format.url
+ }
+ if$
+ %
+ % format optional note
+ %
+ note empty$
+ 'skip$
+ { % Clear the stack
+ duplicate$ empty$
+ 'skip$
+ { output.new.block }
+ if$
+ format.note
+ }
+ if$
+ fin.entry
+}
+
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ %
+ % nonprint media and other things that don't fit
+ %
+FUNCTION {misc}
+{ %
+ % To handle @manual: use type.2 instead of type.
+ type.2 empty$
+ type empty$ not and
+ { type 'type.2 := }
+ 'skip$
+ if$
+ %
+ author empty$
+ %
+ % no author: possibly edited item with editors as authors
+ %
+ { editor empty$
+ %
+ % no author or editor: title/type serves as author.
+ % title formatted as book title
+ %
+ % if no title and no type, howpublished is title
+ %
+ { title empty$
+ type.2 empty$ and
+ { howpublished empty$
+ { "No author, editor, title, type, and howpublished in "
+ cite$ * warning$
+ ""
+ }
+ { "\APAChowpublished{" howpublished * "}" * add.period$ }
+ if$
+ format.year.month.day.check add.period$
+ }
+ { output.misctitle.type.num output.new.block
+ format.year.month.day.check add.period$
+ format.howpublished add.period$
+ }
+ if$
+ }
+ %
+ % format editor and year, and check if year is present
+ % format book title, volume, and edition and check if title present
+ %
+ { format.editors.as.authors start.new.block
+ format.year.month.day.check output.dot.new.block
+ output.misctitle.type.num
+ format.howpublished add.period$
+ }
+ if$
+ }
+ %
+ % format author and year, and check if year is present
+ % format book title, volume, and edition
+ % and check if title or type present
+ %
+ { format.authors start.new.block
+ format.year.month.day.check output.dot.new.block
+ output.misctitle.type.num
+ format.howpublished add.period$
+ }
+ if$
+ %
+ address empty$
+ publisher empty$ and
+ 'skip$
+ { % Clear the stack
+ duplicate$ empty$
+ 'skip$
+ { output.new.block }
+ if$
+ format.address.publisher add.period$
+ }
+ if$
+ %
+ % format url
+ %
+ url empty$
+ 'skip$
+ { % Clear the stack
+ duplicate$ empty$
+ 'skip$
+ { output.new.block }
+ if$
+ format.url
+ }
+ if$
+ %
+ % format optional note
+ %
+ note empty$
+ 'skip$
+ { % Clear the stack
+ duplicate$ empty$
+ 'skip$
+ { output.new.block }
+ if$
+ format.note
+ }
+ if$
+ fin.entry
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ %
+ % for legal cases and other cases that need to be
+ % done by hand
+ %
+FUNCTION {literal}
+{ "key" key warning.if.empty
+ "text" text warning.if.empty
+ text empty$
+ { "" }
+ { text }
+ if$
+ fin.entry
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ %
+ % technical documentation
+ %
+FUNCTION {manual}
+{ %
+ % If type is empty, assume that it is a computer software manual.
+ %
+ type empty$
+ { "\bibcomputersoftwaremanual" 'type.2 := }
+ 'skip$
+ if$
+ misc
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ %
+ % booklet
+ %
+FUNCTION {booklet}
+{ misc }
+
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ %
+ % part of a book
+ %
+FUNCTION {inbook}
+{ incollection }
+
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ %
+ % article in proceedings
+ %
+FUNCTION {inproceedings}
+{ incollection }
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ %
+ % article in proceedings (Kopka & Daly, 2004, p. 230)
+ %
+FUNCTION {conference}
+{ inproceedings }
+
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ %
+ % proceedings
+ %
+FUNCTION {proceedings}
+{ misc }
+
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ %
+ % unknown types
+ %
+FUNCTION {default.type}
+{ misc }
+
+% \end{macrocode}
+% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% \subsection{Initialization functions}
+% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% This currently only defines the maximum number of names to be
+% formatted and this is not even used. This is something that I may
+% want to revisit in order to make it more flexible.
+% \begin{macrocode}
+FUNCTION {initialize}
+{
+ #6 'name.max :=
+%% #250 'entry.max$ :=
+%% #5000 'global.max$ :=
+}
+% \end{macrocode}
+% For numbering the entries according to current sorting order.
+% \begin{macrocode}
+FUNCTION {init.old.number}
+{ #0 'old.number := }
+% \end{macrocode}
+% For comparing labels across entries.
+% \begin{macrocode}
+FUNCTION {init.old.label}
+{ "zzzzzz" 'old.label := }
+% \end{macrocode}
+% For all entries, initialize flags whether initials must be cited and
+% whether an `a', `b', etc.\ needs to be added to the year. Both are
+% initialized as not needed.
+% \begin{macrocode}
+FUNCTION {init.cite.initials.add.to.year}
+{ #0 'cite.initials :=
+ #0 'add.to.year :=
+}
+% \end{macrocode}
+% Functions that indicate whether we're moving forward (|ITERATE|) or
+% backward (|REVERSE|) through the entry list.
+% \begin{macrocode}
+FUNCTION {move.forward}
+{ #1 'forward := }
+FUNCTION {move.backward}
+{ #0 'forward := }
+% \end{macrocode}
+% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% \subsection{Basic bibliography output functions}
+% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% Beginning of the \envirname{thebibliography} environment: Write
+% preamble if there is one, write |\begin| command.
+% \begin{macrocode}
+FUNCTION {begin.bib}
+{ preamble$ empty$
+ 'skip$
+ { preamble$ write$ newline$ }
+ if$
+ "\begin{thebibliography}{}" write$ newline$
+}
+% \end{macrocode}
+% Write |\end{thebibliography}| command.
+% \begin{macrocode}
+FUNCTION {end.bib}
+{ newline$
+ "\end{thebibliography}" write$ newline$
+}
+% \end{macrocode}
+% Write the citation labels and reference list entry to the
+% \fname{.bbl} file.
+% \begin{macrocode}
+FUNCTION {write.bbl.entry}
+{
+% \end{macrocode}
+% Output \cmd{\bibitem} and \cmd{\citeauthoryear} commands.
+% \begin{macrocode}
+ make.cite.labels
+% \end{macrocode}
+% Format and output reference list entry.
+% \begin{macrocode}
+ call.type$
+}
+% \end{macrocode}
+% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% \subsection{Read and process entries and make the bibliography}
+% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% Read citations from \fname{.aux} file and extract corresponding
+% entries from \fname{.bib} file.
+% \begin{macrocode}
+READ
+% \end{macrocode}
+% Write version info to \fname{.blg} file.
+% \begin{macrocode}
+EXECUTE { identify.apacite.version }
+% \end{macrocode}
+% Some initializations.
+% \begin{macrocode}
+EXECUTE { initialize }
+% \end{macrocode}
+% Store the citation order in an integer variable, and a corresponding
+% string variable that can be used for sorting.
+% \begin{macrocode}
+EXECUTE { init.old.number }
+ITERATE { make.citeorder.number }
+% \end{macrocode}
+% Sort items by title in order to replace each title by its number in
+% later sorting.
+% \begin{macrocode}
+ITERATE { make.sort.title }
+SORT
+EXECUTE { init.old.number }
+EXECUTE { init.old.label }
+ITERATE { make.title.number }
+% \end{macrocode}
+% Generate some tentative author-year labels and do some
+% preprocessing for the later definitive author and year labels.
+% \begin{macrocode}
+ITERATE { make.tentative.sort.label }
+SORT
+% \end{macrocode}
+% Check whether initials must be added to first author, how many
+% authors must be formatted, whether an `a', `b', etc., must be added
+% to the year label.
+% \begin{macrocode}
+ITERATE { init.cite.initials.add.to.year }
+EXECUTE { init.initials }
+ITERATE { check.add.initials }
+EXECUTE { init.initials }
+REVERSE { check.add.initials }
+ITERATE { tentative.cite.num.names }
+EXECUTE { init.cite.num.names }
+EXECUTE { move.forward }
+ITERATE { definitive.cite.num.names }
+EXECUTE { init.cite.num.names }
+EXECUTE { move.backward }
+REVERSE { definitive.cite.num.names }
+% \end{macrocode}
+% Make final sorting label and do definitive sorting.
+% \begin{macrocode}
+ITERATE { make.final.sort.key }
+SORT
+% \end{macrocode}
+% Write preamble and |\begin{thebibliography}{}| statement.
+% \begin{macrocode}
+EXECUTE { begin.bib }
+% \end{macrocode}
+% Make final cite labels, format reference list entry, and write to
+% \fname{.bbl} file.
+% \begin{macrocode}
+ITERATE { write.bbl.entry }
+% \end{macrocode}
+% Write |\end{thebibliography}| statement.
+% \begin{macrocode}
+EXECUTE { end.bib }
+
+%</bibstyle|xbibstyle>
+% \end{macrocode}
+%
+%
+% \Finale
+\endinput
+%
diff --git a/biblio/bibtex/contrib/apacite/apacite.ins b/biblio/bibtex/contrib/apacite/apacite.ins
new file mode 100644
index 0000000000..1328acc3a9
--- /dev/null
+++ b/biblio/bibtex/contrib/apacite/apacite.ins
@@ -0,0 +1,194 @@
+%%
+%% This file will generate fast loadable files and documentation
+%% driver files from apacite.dtx when run through LaTeX.
+%%
+%% Copyright (C) 1994-2013 Erik Meijer and any individual authors listed
+%% elsewhere in this file.
+%%
+%% This file is part of the `apacite' package.
+%% -------------------------------------------
+%%
+%% It may be distributed and/or modified under the
+%% conditions of the LaTeX Project Public License, either
+%% version 1.3 of this license or (at your option) any later
+%% version. The latest version of this license is in:
+%%
+%% http://www.latex-project.org/lppl.txt
+%%
+%% and version 1.3 or later is part of all distributions of
+%% LaTeX version 2005/12/01 or later.
+%%
+%% The `apacite' package consists of the files apacite.dtx and
+%% apacite.ins, and the following generated files:
+%% apacite.sty, apacdoc.sty, apacite.drv,
+%% apacite.bst, apacitex.bst, apacann.bst, apacannx.bst,
+%% apa5ex.bib, apacxmpl.tex,
+%% english.apc, dutch.apc, finnish.apc, french.apc,
+%% german.apc, ngerman.apc, greek.apc, norsk.apc,
+%% spanish.apc, swedish.apc.
+%%
+%% This work has the LPPL maintenance status `maintained'
+%%
+%% The Current Maintainer of this work is Erik Meijer
+%%
+%% This file may only be distributed together with a copy of the
+%% source files of the apacite package, i.e., apacite.dtx and
+%% apacite.ins. You may however distribute the apacite package without
+%% the generated files.
+
+\input docstrip.tex
+\keepsilent
+
+\declarepreamble\mainpreamble
+
+This is a generated file.
+
+Copyright (C) 1994-2013 Erik Meijer and any individual authors listed
+elsewhere in this file.
+
+This file is part of the `apacite' package.
+-------------------------------------------
+
+It may be distributed and/or modified under the
+conditions of the LaTeX Project Public License, either
+version 1.3 of this license or (at your option) any later
+version. The latest version of this license is in:
+
+ http://www.latex-project.org/lppl.txt
+
+and version 1.3 or later is part of all distributions of
+LaTeX version 2005/12/01 or later.
+
+The `apacite' package consists of the files apacite.dtx and
+apacite.ins, and the following generated files:
+apacite.sty, apacdoc.sty, apacite.drv,
+apacite.bst, apacitex.bst, apacann.bst, apacannx.bst,
+apa5ex.bib, apacxmpl.tex,
+english.apc, dutch.apc, finnish.apc, french.apc,
+german.apc, ngerman.apc, greek.apc, norsk.apc,
+spanish.apc, swedish.apc.
+
+This work has the LPPL maintenance status `maintained'
+
+The Current Maintainer of this work is Erik Meijer
+
+This file may only be distributed together with a copy of the
+source files of the apacite package, i.e., apacite.dtx and
+apacite.ins. You may however distribute the apacite package without
+the generated files.
+
+\endpreamble
+
+\declarepreamble\drvpreamble
+
+This is a generated file.
+
+Copyright (C) 1994-2013 Erik Meijer and any individual authors listed
+elsewhere in this file.
+
+This file is part of the `apacite' package.
+-------------------------------------------
+
+It may be distributed and/or modified under the
+conditions of the LaTeX Project Public License, either
+version 1.3 of this license or (at your option) any later
+version. The latest version of this license is in:
+
+ http://www.latex-project.org/lppl.txt
+
+and version 1.3 or later is part of all distributions of
+LaTeX version 2005/12/01 or later.
+
+The `apacite' package consists of the files apacite.dtx and
+apacite.ins, and the following generated files:
+apacite.sty, apacdoc.sty, apacite.drv,
+apacite.bst, apacitex.bst, apacann.bst, apacannx.bst,
+apa5ex.bib, apacxmpl.tex,
+english.apc, dutch.apc, finnish.apc, french.apc,
+german.apc, ngerman.apc, greek.apc, norsk.apc,
+spanish.apc, swedish.apc.
+
+This work has the LPPL maintenance status `maintained'
+
+The Current Maintainer of this work is Erik Meijer
+
+This file may only be distributed together with a copy of the
+source files of the apacite package, i.e., apacite.dtx and
+apacite.ins. You may however distribute the apacite package without
+the generated files.
+
+You are allowed to make changes to this file, in order to generate
+the user's manual with your preferred settings (e.g., to choose
+whether or not to include the documented source code). Please
+do not change apacite.dtx for this purpose.
+
+\endpreamble
+
+\edef\noendinputpostamble{%
+ \MetaPrefix ^^J%
+ \MetaPrefix\space End of file `\outFileName'.%
+}
+
+\askonceonly
+\generate{%
+ \usepreamble\mainpreamble
+ \file{apacite.sty}{\from{apacite.dtx}{package}}
+ \file{apacdoc.sty}{\from{apacite.dtx}{docpkg}}
+ \file{english.apc}{\from{apacite.dtx}{english}}
+ \file{dutch.apc}{\from{apacite.dtx}{dutch}}
+ \file{finnish.apc}{\from{apacite.dtx}{finnish}}
+ \file{french.apc}{\from{apacite.dtx}{french}}
+ \file{german.apc}{\from{apacite.dtx}{german}}
+ \file{ngerman.apc}{\from{apacite.dtx}{ngerman}}
+ \file{greek.apc}{\from{apacite.dtx}{greek}}
+ \file{norsk.apc}{\from{apacite.dtx}{norsk}}
+ \file{spanish.apc}{\from{apacite.dtx}{spanish}}
+ \file{swedish.apc}{\from{apacite.dtx}{swedish}}
+ \file{apacxmpl.tex}{\from{apacite.dtx}{xmpl}}
+ \usepreamble\drvpreamble
+ \file{apacite.drv}{\from{apacite.dtx}{driver}}
+ \usepreamble\mainpreamble
+ \usepostamble\noendinputpostamble
+ \file{apa5ex.bib}{\from{apacite.dtx}{bibdb}}
+ \file{apacite.bst}{\from{apacite.dtx}{bibstyle}}
+ \file{apacitex.bst}{\from{apacite.dtx}{xbibstyle}}
+ \file{apacann.bst}{\from{apacite.dtx}{bibstyle,annotated}}
+ \file{apacannx.bst}{\from{apacite.dtx}{xbibstyle,annotated}}
+}
+
+\obeyspaces
+\Msg{*****************************************************}
+\Msg{* *}
+\Msg{* To finish the installation you have to move the *}
+\Msg{* following files into a directory searched by TeX: *}
+\Msg{* *}
+\Msg{* All *.apc, *.sty *}
+\Msg{* *}
+\Msg{* and to move the following files into a directory *}
+\Msg{* searched by BibTeX: *}
+\Msg{* *}
+\Msg{* All *.bib, *.bst *}
+\Msg{* *}
+\Msg{* To produce the documentation, run the following *}
+\Msg{* script (or something similar, depending on your *}
+\Msg{* operating system): *}
+\Msg{* *}
+\Msg{* pdflatex apacite.drv *}
+\Msg{* bibtex apacite *}
+\Msg{* pdflatex apacite.drv *}
+\Msg{* pdflatex apacite.drv *}
+\Msg{* pdflatex apacite.drv *}
+\Msg{* makeindex -o apacite.and apacite.adx *}
+\Msg{* pdflatex apacite.drv *}
+\Msg{* pdflatex apacite.drv *}
+\Msg{* *}
+\Msg{* See the README file for a brief explanation and *}
+\Msg{* the file apacite.drv for how to customize the *}
+\Msg{* manual (e.g., to include the documented source *}
+\Msg{* code. *}
+\Msg{* *}
+\Msg{* Happy TeXing! *}
+\Msg{* *}
+\Msg{*****************************************************}
+
+\endbatchfile
diff --git a/biblio/bibtex/contrib/apacite/apacite.pdf b/biblio/bibtex/contrib/apacite/apacite.pdf
new file mode 100644
index 0000000000..9420e5f8b5
--- /dev/null
+++ b/biblio/bibtex/contrib/apacite/apacite.pdf
Binary files differ
diff --git a/biblio/bibtex/contrib/apalike-german/README.html b/biblio/bibtex/contrib/apalike-german/README.html
new file mode 100644
index 0000000000..2a9ac1a31d
--- /dev/null
+++ b/biblio/bibtex/contrib/apalike-german/README.html
@@ -0,0 +1,40 @@
+<!DOCTYPE html><html><head><meta charset="utf-8"><title>Untitled Document.md</title><script type="text/javascript">
+//<![CDATA[
+window.__cfRocketOptions = {byc:0,p:0,petok:"b5913de6261340895918104164db936969affe08-1521285932-1800"};
+//]]>
+</script>
+<script type="text/javascript" src="https://ajax.cloudflare.com/cdn-cgi/scripts/935cb224/cloudflare-static/rocket.min.js"></script>
+<style>@charset "UTF-8";@import 'https://cdnjs.cloudflare.com/ajax/libs/KaTeX/0.9.0-alpha2/katex.min.css';code{color:#c7254e;background-color:#f9f2f4;border-radius:4px}code,kbd{padding:2px 4px}kbd{color:#fff;background-color:#333;border-radius:3px;box-shadow:inset 0 -1px 0 rgba(0,0,0,.25)}kbd kbd{padding:0;font-size:100%;box-shadow:none}pre{display:block;margin:0 0 10px;word-break:break-all;word-wrap:break-word;color:#333;background-color:#f5f5f5;border:1px solid #ccc;border-radius:4px}pre code{padding:0;font-size:inherit;color:inherit;white-space:pre-wrap;background-color:transparent;border-radius:0}.pre-scrollable{max-height:340px;overflow-y:scroll}table{background-color:transparent}th{text-align:left}.table{width:100%;max-width:100%;margin-bottom:20px}.table>thead>tr>th{padding:8px;line-height:1.4285714;border-top:1px solid #ddd}.table>thead>tr>td,.table>tbody>tr>th,.table>tbody>tr>td,.table>tfoot>tr>th,.table>tfoot>tr>td{padding:8px;line-height:1.4285714;vertical-align:top;border-top:1px solid #ddd}.table>thead>tr>th{vertical-align:bottom;border-bottom:2px solid #ddd}.table>caption+thead>tr:first-child>th,.table>caption+thead>tr:first-child>td,.table>colgroup+thead>tr:first-child>th,.table>colgroup+thead>tr:first-child>td,.table>thead:first-child>tr:first-child>th,.table>thead:first-child>tr:first-child>td{border-top:0}.table>tbody+tbody{border-top:2px solid #ddd}.table .table{background-color:#fff}.table-condensed>thead>tr>th,.table-condensed>thead>tr>td,.table-condensed>tbody>tr>th,.table-condensed>tbody>tr>td,.table-condensed>tfoot>tr>th,.table-condensed>tfoot>tr>td{padding:5px}.table-bordered,.table-bordered>thead>tr>th,.table-bordered>thead>tr>td,.table-bordered>tbody>tr>th,.table-bordered>tbody>tr>td,.table-bordered>tfoot>tr>th,.table-bordered>tfoot>tr>td{border:1px solid #ddd}.table-bordered>thead>tr>th,.table-bordered>thead>tr>td{border-bottom-width:2px}.table-striped>tbody>tr:nth-child(odd)>td,.table-striped>tbody>tr:nth-child(odd)>th{background-color:#f9f9f9}.table-hover>tbody>tr:hover>td,.table-hover>tbody>tr:hover>th{background-color:#f5f5f5}table col[class*="col-"]{position:static;float:none;display:table-column}table td[class*="col-"],table th[class*="col-"]{position:static;float:none;display:table-cell}.table>thead>tr>td.active,.table>thead>tr>th.active,.table>thead>tr.active>td,.table>thead>tr.active>th,.table>tbody>tr>td.active,.table>tbody>tr>th.active,.table>tbody>tr.active>td,.table>tbody>tr.active>th,.table>tfoot>tr>td.active,.table>tfoot>tr>th.active,.table>tfoot>tr.active>td,.table>tfoot>tr.active>th{background-color:#f5f5f5}.table-hover>tbody>tr>td.active:hover,.table-hover>tbody>tr>th.active:hover,.table-hover>tbody>tr.active:hover>td,.table-hover>tbody>tr:hover>.active,.table-hover>tbody>tr.active:hover>th{background-color:#e8e8e8}.table>thead>tr>td.success,.table>thead>tr>th.success,.table>thead>tr.success>td,.table>thead>tr.success>th,.table>tbody>tr>td.success,.table>tbody>tr>th.success,.table>tbody>tr.success>td,.table>tbody>tr.success>th,.table>tfoot>tr>td.success,.table>tfoot>tr>th.success,.table>tfoot>tr.success>td,.table>tfoot>tr.success>th{background-color:#dff0d8}.table-hover>tbody>tr>td.success:hover,.table-hover>tbody>tr>th.success:hover,.table-hover>tbody>tr.success:hover>td,.table-hover>tbody>tr:hover>.success,.table-hover>tbody>tr.success:hover>th{background-color:#d0e9c6}.table>thead>tr>td.info,.table>thead>tr>th.info,.table>thead>tr.info>td,.table>thead>tr.info>th,.table>tbody>tr>td.info,.table>tbody>tr>th.info,.table>tbody>tr.info>td,.table>tbody>tr.info>th,.table>tfoot>tr>td.info,.table>tfoot>tr>th.info,.table>tfoot>tr.info>td,.table>tfoot>tr.info>th{background-color:#d9edf7}.table-hover>tbody>tr>td.info:hover,.table-hover>tbody>tr>th.info:hover,.table-hover>tbody>tr.info:hover>td,.table-hover>tbody>tr:hover>.info,.table-hover>tbody>tr.info:hover>th{background-color:#c4e3f3}.table>thead>tr>td.warning,.table>thead>tr>th.warning,.table>thead>tr.warning>td,.table>thead>tr.warning>th,.table>tbody>tr>td.warning,.table>tbody>tr>th.warning,.table>tbody>tr.warning>td,.table>tbody>tr.warning>th,.table>tfoot>tr>td.warning,.table>tfoot>tr>th.warning,.table>tfoot>tr.warning>td,.table>tfoot>tr.warning>th{background-color:#fcf8e3}.table-hover>tbody>tr>td.warning:hover,.table-hover>tbody>tr>th.warning:hover,.table-hover>tbody>tr.warning:hover>td,.table-hover>tbody>tr:hover>.warning,.table-hover>tbody>tr.warning:hover>th{background-color:#faf2cc}.table>thead>tr>td.danger,.table>thead>tr>th.danger,.table>thead>tr.danger>td,.table>thead>tr.danger>th,.table>tbody>tr>td.danger,.table>tbody>tr>th.danger,.table>tbody>tr.danger>td,.table>tbody>tr.danger>th,.table>tfoot>tr>td.danger,.table>tfoot>tr>th.danger,.table>tfoot>tr.danger>td,.table>tfoot>tr.danger>th{background-color:#f2dede}.table-hover>tbody>tr>td.danger:hover,.table-hover>tbody>tr>th.danger:hover,.table-hover>tbody>tr.danger:hover>td,.table-hover>tbody>tr:hover>.danger,.table-hover>tbody>tr.danger:hover>th{background-color:#ebcccc}fieldset{border:0;min-width:0}legend{display:block;width:100%;margin-bottom:20px;font-size:21px;line-height:inherit;color:#333;border-bottom:1px solid #e5e5e5}label{display:inline-block;max-width:100%;margin-bottom:5px;font-weight:700}input[type="radio"],input[type="checkbox"]{margin:4px 0 0;margin-top:1px \9;line-height:normal}input[type="file"]{display:block}input[type="range"]{display:block;width:100%}select[multiple],select[size]{height:auto}input[type="file"]:focus,input[type="radio"]:focus,input[type="checkbox"]:focus{outline:thin dotted;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}output{padding-top:7px}output,.form-control{display:block;font-size:14px;line-height:1.4285714;color:#555}.form-control{width:100%;height:34px;padding:6px 12px;background-color:#fff;background-image:none;border:1px solid #ccc;border-radius:4px;box-shadow:inset 0 1px 1px rgba(0,0,0,.075);-webkit-transition:border-color ease-in-out .15s,box-shadow ease-in-out .15s;transition:border-color ease-in-out .15s,box-shadow ease-in-out .15s}.form-control:focus{border-color:#66afe9;outline:0;box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 8px rgba(102,175,233,.6)}.form-control::-moz-placeholder{color:#777;opacity:1}.form-control:-ms-input-placeholder{color:#777}.form-control::-webkit-input-placeholder{color:#777}.form-control[disabled],.form-control[readonly],fieldset[disabled] .form-control{cursor:not-allowed;background-color:#eee;opacity:1}textarea.form-control{height:auto}input[type="date"],input[type="time"],input[type="datetime-local"],input[type="month"]{line-height:34px;line-height:1.4285714 \0}input[type="date"].input-sm,.form-horizontal .form-group-sm input[type="date"].form-control,.input-group-sm>input[type="date"].form-control,.input-group-sm>input[type="date"].input-group-addon,.input-group-sm>.input-group-btn>input[type="date"].btn,input[type="time"].input-sm,.form-horizontal .form-group-sm input[type="time"].form-control,.input-group-sm>input[type="time"].form-control,.input-group-sm>input[type="time"].input-group-addon,.input-group-sm>.input-group-btn>input[type="time"].btn,input[type="datetime-local"].input-sm,.form-horizontal .form-group-sm input[type="datetime-local"].form-control,.input-group-sm>input[type="datetime-local"].form-control,.input-group-sm>input[type="datetime-local"].input-group-addon,.input-group-sm>.input-group-btn>input[type="datetime-local"].btn,input[type="month"].input-sm,.form-horizontal .form-group-sm input[type="month"].form-control,.input-group-sm>input[type="month"].form-control,.input-group-sm>input[type="month"].input-group-addon,.input-group-sm>.input-group-btn>input[type="month"].btn{line-height:30px}input[type="date"].input-lg,.form-horizontal .form-group-lg input[type="date"].form-control,.input-group-lg>input[type="date"].form-control,.input-group-lg>input[type="date"].input-group-addon,.input-group-lg>.input-group-btn>input[type="date"].btn,input[type="time"].input-lg,.form-horizontal .form-group-lg input[type="time"].form-control,.input-group-lg>input[type="time"].form-control,.input-group-lg>input[type="time"].input-group-addon,.input-group-lg>.input-group-btn>input[type="time"].btn,input[type="datetime-local"].input-lg,.form-horizontal .form-group-lg input[type="datetime-local"].form-control,.input-group-lg>input[type="datetime-local"].form-control,.input-group-lg>input[type="datetime-local"].input-group-addon,.input-group-lg>.input-group-btn>input[type="datetime-local"].btn,input[type="month"].input-lg,.form-horizontal .form-group-lg input[type="month"].form-control,.input-group-lg>input[type="month"].form-control,.input-group-lg>input[type="month"].input-group-addon,.input-group-lg>.input-group-btn>input[type="month"].btn{line-height:46px}.form-group{margin-bottom:15px}.radio,.checkbox{position:relative;display:block;min-height:20px;margin-top:10px;margin-bottom:10px}.radio label,.checkbox label{padding-left:20px;margin-bottom:0;font-weight:400;cursor:pointer}.radio input[type="radio"],.radio-inline input[type="radio"],.checkbox input[type="checkbox"],.checkbox-inline input[type="checkbox"]{position:absolute;margin-left:-20px;margin-top:4px \9}.radio+.radio,.checkbox+.checkbox{margin-top:-5px}.radio-inline,.checkbox-inline{display:inline-block;padding-left:20px;margin-bottom:0;vertical-align:middle;font-weight:400;cursor:pointer}.radio-inline+.radio-inline,.checkbox-inline+.checkbox-inline{margin-top:0;margin-left:10px}input[type="radio"][disabled],input[type="radio"].disabled,fieldset[disabled] input[type="radio"],input[type="checkbox"][disabled],input[type="checkbox"].disabled,fieldset[disabled] input[type="checkbox"],.radio-inline.disabled,fieldset[disabled] .radio-inline,.checkbox-inline.disabled,fieldset[disabled] .checkbox-inline,.radio.disabled label,fieldset[disabled] .radio label,.checkbox.disabled label,fieldset[disabled] .checkbox label{cursor:not-allowed}.form-control-static{padding-top:7px;padding-bottom:7px;margin-bottom:0}.form-control-static.input-lg,.form-horizontal .form-group-lg .form-control-static.form-control,.input-group-lg>.form-control-static.form-control,.input-group-lg>.form-control-static.input-group-addon,.input-group-lg>.input-group-btn>.form-control-static.btn,.form-control-static.input-sm,.form-horizontal .form-group-sm .form-control-static.form-control,.input-group-sm>.form-control-static.form-control,.input-group-sm>.form-control-static.input-group-addon,.input-group-sm>.input-group-btn>.form-control-static.btn{padding-left:0;padding-right:0}.input-sm,.form-horizontal .form-group-sm .form-control,.input-group-sm>.form-control{height:30px;padding:5px 10px;font-size:12px;line-height:1.5;border-radius:3px}.input-group-sm>.input-group-addon{height:30px;line-height:1.5}.input-group-sm>.input-group-btn>.btn{height:30px;padding:5px 10px;font-size:12px;line-height:1.5;border-radius:3px}select.input-sm,.form-horizontal .form-group-sm select.form-control,.input-group-sm>select.form-control,.input-group-sm>select.input-group-addon,.input-group-sm>.input-group-btn>select.btn{height:30px;line-height:30px}textarea.input-sm,.form-horizontal .form-group-sm textarea.form-control,.input-group-sm>textarea.form-control,.input-group-sm>textarea.input-group-addon,.input-group-sm>.input-group-btn>textarea.btn,select[multiple].input-sm,.form-horizontal .form-group-sm select[multiple].form-control,.input-group-sm>select[multiple].form-control,.input-group-sm>select[multiple].input-group-addon,.input-group-sm>.input-group-btn>select[multiple].btn{height:auto}.input-lg,.form-horizontal .form-group-lg .form-control,.input-group-lg>.form-control{height:46px;padding:10px 16px;font-size:18px;line-height:1.33;border-radius:6px}.input-group-lg>.input-group-addon{height:46px;line-height:1.33}.input-group-lg>.input-group-btn>.btn{height:46px;padding:10px 16px;font-size:18px;line-height:1.33;border-radius:6px}select.input-lg,.form-horizontal .form-group-lg select.form-control,.input-group-lg>select.form-control,.input-group-lg>select.input-group-addon,.input-group-lg>.input-group-btn>select.btn{height:46px;line-height:46px}textarea.input-lg,.form-horizontal .form-group-lg textarea.form-control,.input-group-lg>textarea.form-control,.input-group-lg>textarea.input-group-addon,.input-group-lg>.input-group-btn>textarea.btn,select[multiple].input-lg,.form-horizontal .form-group-lg select[multiple].form-control,.input-group-lg>select[multiple].form-control,.input-group-lg>select[multiple].input-group-addon,.input-group-lg>.input-group-btn>select[multiple].btn{height:auto}.has-feedback{position:relative}.has-feedback .form-control{padding-right:42.5px}.form-control-feedback{position:absolute;top:25px;right:0;z-index:2;display:block;width:34px;height:34px;line-height:34px;text-align:center}.input-lg+.form-control-feedback,.form-horizontal .form-group-lg .form-control+.form-control-feedback,.input-group-lg>.form-control+.form-control-feedback,.input-group-lg>.input-group-addon+.form-control-feedback,.input-group-lg>.input-group-btn>.btn+.form-control-feedback{width:46px;height:46px;line-height:46px}.input-sm+.form-control-feedback,.form-horizontal .form-group-sm .form-control+.form-control-feedback,.input-group-sm>.form-control+.form-control-feedback,.input-group-sm>.input-group-addon+.form-control-feedback,.input-group-sm>.input-group-btn>.btn+.form-control-feedback{width:30px;height:30px;line-height:30px}.has-success .help-block,.has-success .control-label,.has-success .radio,.has-success .checkbox,.has-success .radio-inline,.has-success .checkbox-inline{color:#3c763d}.has-success .form-control{border-color:#3c763d;box-shadow:inset 0 1px 1px rgba(0,0,0,.075)}.has-success .form-control:focus{border-color:#2b542c;box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #67b168}.has-success .input-group-addon{color:#3c763d;border-color:#3c763d;background-color:#dff0d8}.has-success .form-control-feedback{color:#3c763d}.has-warning .help-block,.has-warning .control-label,.has-warning .radio,.has-warning .checkbox,.has-warning .radio-inline,.has-warning .checkbox-inline{color:#8a6d3b}.has-warning .form-control{border-color:#8a6d3b;box-shadow:inset 0 1px 1px rgba(0,0,0,.075)}.has-warning .form-control:focus{border-color:#66512c;box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #c0a16b}.has-warning .input-group-addon{color:#8a6d3b;border-color:#8a6d3b;background-color:#fcf8e3}.has-warning .form-control-feedback{color:#8a6d3b}.has-error .help-block,.has-error .control-label,.has-error .radio,.has-error .checkbox,.has-error .radio-inline,.has-error .checkbox-inline{color:#a94442}.has-error .form-control{border-color:#a94442;box-shadow:inset 0 1px 1px rgba(0,0,0,.075)}.has-error .form-control:focus{border-color:#843534;box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #ce8483}.has-error .input-group-addon{color:#a94442;border-color:#a94442;background-color:#f2dede}.has-error .form-control-feedback{color:#a94442}.has-feedback label.sr-only~.form-control-feedback{top:0}.help-block{display:block;margin-top:5px;margin-bottom:10px;color:#737373}.form-horizontal .radio,.form-horizontal .checkbox,.form-horizontal .radio-inline,.form-horizontal .checkbox-inline{margin-top:0;margin-bottom:0;padding-top:7px}.form-horizontal .radio,.form-horizontal .checkbox{min-height:27px}.form-horizontal .form-group{margin-left:-15px;margin-right:-15px}.form-horizontal .form-group:before{content:" ";display:table}.form-horizontal .form-group:after{content:" ";display:table;clear:both}.form-horizontal .has-feedback .form-control-feedback{top:0;right:15px}.btn{display:inline-block;vertical-align:middle;cursor:pointer;background-image:none;border:1px solid transparent;white-space:nowrap;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.btn:focus,.btn:active:focus,.btn.active:focus{outline:thin dotted;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}.btn:hover,.btn:focus{color:#333;text-decoration:none}.btn:active,.btn.active{outline:0;background-image:none;box-shadow:inset 0 3px 5px rgba(0,0,0,.125)}.btn.disabled,.btn[disabled],fieldset[disabled] .btn{cursor:not-allowed;pointer-events:none;opacity:.65;filter:alpha(opacity=65);box-shadow:none}.btn-default{color:#333;background-color:#fff;border-color:#ccc}.btn-default:hover,.btn-default:focus,.btn-default:active,.btn-default.active,.open>.btn-default.dropdown-toggle{color:#333;background-color:#e6e6e6;border-color:#adadad}.btn-default:active,.btn-default.active,.open>.btn-default.dropdown-toggle{background-image:none}.btn-default.disabled,.btn-default.disabled:hover,.btn-default.disabled:focus,.btn-default.disabled:active,.btn-default.disabled.active,.btn-default[disabled],.btn-default[disabled]:hover,.btn-default[disabled]:focus,.btn-default[disabled]:active,.btn-default[disabled].active,fieldset[disabled] .btn-default,fieldset[disabled] .btn-default:hover,fieldset[disabled] .btn-default:focus,fieldset[disabled] .btn-default:active,fieldset[disabled] .btn-default.active{background-color:#fff;border-color:#ccc}.btn-default .badge{color:#fff;background-color:#333}.btn-primary{color:#fff;background-color:#428bca;border-color:#357ebd}.btn-primary:hover,.btn-primary:focus,.btn-primary:active,.btn-primary.active,.open>.btn-primary.dropdown-toggle{color:#fff;background-color:#3071a9;border-color:#285e8e}.btn-primary:active,.btn-primary.active,.open>.btn-primary.dropdown-toggle{background-image:none}.btn-primary.disabled,.btn-primary.disabled:hover,.btn-primary.disabled:focus,.btn-primary.disabled:active,.btn-primary.disabled.active,.btn-primary[disabled],.btn-primary[disabled]:hover,.btn-primary[disabled]:focus,.btn-primary[disabled]:active,.btn-primary[disabled].active,fieldset[disabled] .btn-primary,fieldset[disabled] .btn-primary:hover,fieldset[disabled] .btn-primary:focus,fieldset[disabled] .btn-primary:active,fieldset[disabled] .btn-primary.active{background-color:#428bca;border-color:#357ebd}.btn-primary .badge{color:#428bca;background-color:#fff}.btn-success{color:#fff;background-color:#5cb85c;border-color:#4cae4c}.btn-success:hover,.btn-success:focus,.btn-success:active,.btn-success.active,.open>.btn-success.dropdown-toggle{color:#fff;background-color:#449d44;border-color:#398439}.btn-success:active,.btn-success.active,.open>.btn-success.dropdown-toggle{background-image:none}.btn-success.disabled,.btn-success.disabled:hover,.btn-success.disabled:focus,.btn-success.disabled:active,.btn-success.disabled.active,.btn-success[disabled],.btn-success[disabled]:hover,.btn-success[disabled]:focus,.btn-success[disabled]:active,.btn-success[disabled].active,fieldset[disabled] .btn-success,fieldset[disabled] .btn-success:hover,fieldset[disabled] .btn-success:focus,fieldset[disabled] .btn-success:active,fieldset[disabled] .btn-success.active{background-color:#5cb85c;border-color:#4cae4c}.btn-success .badge{color:#5cb85c;background-color:#fff}.btn-info{color:#fff;background-color:#5bc0de;border-color:#46b8da}.btn-info:hover,.btn-info:focus,.btn-info:active,.btn-info.active,.open>.btn-info.dropdown-toggle{color:#fff;background-color:#31b0d5;border-color:#269abc}.btn-info:active,.btn-info.active,.open>.btn-info.dropdown-toggle{background-image:none}.btn-info.disabled,.btn-info.disabled:hover,.btn-info.disabled:focus,.btn-info.disabled:active,.btn-info.disabled.active,.btn-info[disabled],.btn-info[disabled]:hover,.btn-info[disabled]:focus,.btn-info[disabled]:active,.btn-info[disabled].active,fieldset[disabled] .btn-info,fieldset[disabled] .btn-info:hover,fieldset[disabled] .btn-info:focus,fieldset[disabled] .btn-info:active,fieldset[disabled] .btn-info.active{background-color:#5bc0de;border-color:#46b8da}.btn-info .badge{color:#5bc0de;background-color:#fff}.btn-warning{color:#fff;background-color:#f0ad4e;border-color:#eea236}.btn-warning:hover,.btn-warning:focus,.btn-warning:active,.btn-warning.active,.open>.btn-warning.dropdown-toggle{color:#fff;background-color:#ec971f;border-color:#d58512}.btn-warning:active,.btn-warning.active,.open>.btn-warning.dropdown-toggle{background-image:none}.btn-warning.disabled,.btn-warning.disabled:hover,.btn-warning.disabled:focus,.btn-warning.disabled:active,.btn-warning.disabled.active,.btn-warning[disabled],.btn-warning[disabled]:hover,.btn-warning[disabled]:focus,.btn-warning[disabled]:active,.btn-warning[disabled].active,fieldset[disabled] .btn-warning,fieldset[disabled] .btn-warning:hover,fieldset[disabled] .btn-warning:focus,fieldset[disabled] .btn-warning:active,fieldset[disabled] .btn-warning.active{background-color:#f0ad4e;border-color:#eea236}.btn-warning .badge{color:#f0ad4e;background-color:#fff}.btn-danger{color:#fff;background-color:#d9534f;border-color:#d43f3a}.btn-danger:hover,.btn-danger:focus,.btn-danger:active,.btn-danger.active,.open>.btn-danger.dropdown-toggle{color:#fff;background-color:#c9302c;border-color:#ac2925}.btn-danger:active,.btn-danger.active,.open>.btn-danger.dropdown-toggle{background-image:none}.btn-danger.disabled,.btn-danger.disabled:hover,.btn-danger.disabled:focus,.btn-danger.disabled:active,.btn-danger.disabled.active,.btn-danger[disabled],.btn-danger[disabled]:hover,.btn-danger[disabled]:focus,.btn-danger[disabled]:active,.btn-danger[disabled].active,fieldset[disabled] .btn-danger,fieldset[disabled] .btn-danger:hover,fieldset[disabled] .btn-danger:focus,fieldset[disabled] .btn-danger:active,fieldset[disabled] .btn-danger.active{background-color:#d9534f;border-color:#d43f3a}.btn-danger .badge{color:#d9534f;background-color:#fff}.btn-link{color:#428bca;font-weight:400;cursor:pointer;border-radius:0}.btn-link,.btn-link:active,.btn-link[disabled],fieldset[disabled] .btn-link{background-color:transparent;box-shadow:none}.btn-link,.btn-link:hover,.btn-link:focus,.btn-link:active{border-color:transparent}.btn-link:hover,.btn-link:focus{color:#2a6496;text-decoration:underline;background-color:transparent}.btn-link[disabled]:hover,.btn-link[disabled]:focus,fieldset[disabled] .btn-link:hover,fieldset[disabled] .btn-link:focus{color:#777;text-decoration:none}.btn-lg{padding:10px 16px;font-size:18px;line-height:1.33;border-radius:6px}.btn-sm{padding:5px 10px}.btn-sm,.btn-xs{font-size:12px;line-height:1.5;border-radius:3px}.btn-xs{padding:1px 5px}.btn-block{display:block;width:100%}.btn-block+.btn-block{margin-top:5px}input[type="submit"].btn-block,input[type="reset"].btn-block,input[type="button"].btn-block{width:100%}.fade{opacity:0;-webkit-transition:opacity .15s linear;transition:opacity .15s linear}.fade.in{opacity:1}.collapse{display:none}.collapse.in{display:block}tr.collapse.in{display:table-row}tbody.collapse.in{display:table-row-group}.collapsing{position:relative;height:0;overflow:hidden;-webkit-transition:height .35s ease;transition:height .35s ease}.input-group{position:relative;display:table;border-collapse:separate}.input-group[class*="col-"]{float:none;padding-left:0;padding-right:0}.input-group .form-control{position:relative;z-index:2;float:left;width:100%;margin-bottom:0}.input-group-addon,.input-group-btn,.input-group .form-control{display:table-cell}.input-group-addon:not(:first-child):not(:last-child),.input-group-btn:not(:first-child):not(:last-child),.input-group .form-control:not(:first-child):not(:last-child){border-radius:0}.input-group-addon{white-space:nowrap}.input-group-addon,.input-group-btn{width:1%;vertical-align:middle}.input-group-addon{padding:6px 12px;font-size:14px;font-weight:400;line-height:1;color:#555;text-align:center;background-color:#eee;border:1px solid #ccc;border-radius:4px}.input-group-addon.input-sm,.form-horizontal .form-group-sm .input-group-addon.form-control,.input-group-sm>.input-group-addon,.input-group-sm>.input-group-btn>.input-group-addon.btn{padding:5px 10px;font-size:12px;border-radius:3px}.input-group-addon.input-lg,.form-horizontal .form-group-lg .input-group-addon.form-control,.input-group-lg>.input-group-addon,.input-group-lg>.input-group-btn>.input-group-addon.btn{padding:10px 16px;font-size:18px;border-radius:6px}.input-group-addon input[type="radio"],.input-group-addon input[type="checkbox"]{margin-top:0}.input-group .form-control:first-child,.input-group-addon:first-child,.input-group-btn:first-child>.btn,.input-group-btn:first-child>.btn-group>.btn,.input-group-btn:first-child>.dropdown-toggle,.input-group-btn:last-child>.btn:not(:last-child):not(.dropdown-toggle),.input-group-btn:last-child>.btn-group:not(:last-child)>.btn{border-bottom-right-radius:0;border-top-right-radius:0}.input-group-addon:first-child{border-right:0}.input-group .form-control:last-child,.input-group-addon:last-child,.input-group-btn:last-child>.btn,.input-group-btn:last-child>.btn-group>.btn,.input-group-btn:last-child>.dropdown-toggle,.input-group-btn:first-child>.btn:not(:first-child),.input-group-btn:first-child>.btn-group:not(:first-child)>.btn{border-bottom-left-radius:0;border-top-left-radius:0}.input-group-addon:last-child{border-left:0}.input-group-btn{font-size:0;white-space:nowrap}.input-group-btn,.input-group-btn>.btn{position:relative}.input-group-btn>.btn+.btn{margin-left:-1px}.input-group-btn>.btn:hover,.input-group-btn>.btn:focus,.input-group-btn>.btn:active{z-index:2}.input-group-btn:first-child>.btn,.input-group-btn:first-child>.btn-group{margin-right:-1px}.input-group-btn:last-child>.btn,.input-group-btn:last-child>.btn-group{margin-left:-1px}.pagination{display:inline-block;padding-left:0;margin:20px 0;border-radius:4px}.pagination>li{display:inline}.pagination>li>a,.pagination>li>span{position:relative;float:left;padding:6px 12px;line-height:1.4285714;text-decoration:none;color:#428bca;background-color:#fff;border:1px solid #ddd;margin-left:-1px}.pagination>li:first-child>a,.pagination>li:first-child>span{margin-left:0;border-bottom-left-radius:4px;border-top-left-radius:4px}.pagination>li:last-child>a,.pagination>li:last-child>span{border-bottom-right-radius:4px;border-top-right-radius:4px}.pagination>li>a:hover,.pagination>li>a:focus,.pagination>li>span:hover,.pagination>li>span:focus{color:#2a6496;background-color:#eee;border-color:#ddd}.pagination>.active>a,.pagination>.active>a:hover,.pagination>.active>a:focus,.pagination>.active>span,.pagination>.active>span:hover,.pagination>.active>span:focus{z-index:2;color:#fff;background-color:#428bca;border-color:#428bca;cursor:default}.pagination>.disabled>span,.pagination>.disabled>span:hover,.pagination>.disabled>span:focus,.pagination>.disabled>a,.pagination>.disabled>a:hover,.pagination>.disabled>a:focus{color:#777;background-color:#fff;border-color:#ddd;cursor:not-allowed}.pagination-lg>li>a,.pagination-lg>li>span{padding:10px 16px;font-size:18px}.pagination-lg>li:first-child>a,.pagination-lg>li:first-child>span{border-bottom-left-radius:6px;border-top-left-radius:6px}.pagination-lg>li:last-child>a,.pagination-lg>li:last-child>span{border-bottom-right-radius:6px;border-top-right-radius:6px}.pagination-sm>li>a,.pagination-sm>li>span{padding:5px 10px;font-size:12px}.pagination-sm>li:first-child>a,.pagination-sm>li:first-child>span{border-bottom-left-radius:3px;border-top-left-radius:3px}.pagination-sm>li:last-child>a,.pagination-sm>li:last-child>span{border-bottom-right-radius:3px;border-top-right-radius:3px}.close{float:right;font-size:21px;font-weight:700;line-height:1;color:#000;text-shadow:0 1px 0 #fff;opacity:.2;filter:alpha(opacity=20)}.close:hover,.close:focus{color:#000;text-decoration:none;cursor:pointer;opacity:.5;filter:alpha(opacity=50)}button.close{padding:0;cursor:pointer;background:0 0;border:0;-webkit-appearance:none}.modal-open,.modal{overflow:hidden}.modal{display:none;position:fixed;top:0;right:0;bottom:0;left:0;z-index:1050;-webkit-overflow-scrolling:touch;outline:0}.modal.fade .modal-dialog{-webkit-transform:translate3d(0,-25%,0);transform:translate3d(0,-25%,0);-webkit-transition:-webkit-transform .3s ease-out;transition:transform .3s ease-out;transition:transform .3s ease-out,-webkit-transform .3s ease-out}.modal.in .modal-dialog{-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}.modal-open .modal{overflow-x:hidden;overflow-y:auto}.modal-dialog{position:relative;width:auto;margin:10px}.modal-content{position:relative;background-color:#fff;border:1px solid #999;border:1px solid rgba(0,0,0,.2);border-radius:6px;box-shadow:0 3px 9px rgba(0,0,0,.5);background-clip:padding-box;outline:0}.modal-backdrop{position:fixed;top:0;right:0;bottom:0;left:0;z-index:1040;background-color:#000}.modal-backdrop.fade{opacity:0;filter:alpha(opacity=0)}.modal-backdrop.in{opacity:.5;filter:alpha(opacity=50)}.modal-header{padding:15px;border-bottom:1px solid #e5e5e5;min-height:16.4285714px}.modal-header .close{margin-top:-2px}.modal-title{margin:0;line-height:1.4285714}.modal-body{position:relative;padding:15px}.modal-footer{padding:15px;text-align:right;border-top:1px solid #e5e5e5}.modal-footer:before,.modal-footer:after{content:" ";display:table}.modal-footer:after{clear:both}.modal-footer .btn+.btn{margin-left:5px;margin-bottom:0}.modal-footer .btn-group .btn+.btn{margin-left:-1px}.modal-footer .btn-block+.btn-block{margin-left:0}.modal-scrollbar-measure{position:absolute;top:-9999px;width:50px;height:50px;overflow:scroll}.clearfix:before,.clearfix:after{content:" ";display:table}.clearfix:after{clear:both}.center-block{display:block;margin-left:auto;margin-right:auto}.pull-right{float:right!important}.pull-left{float:left!important}.hide{display:none!important}.show{display:block!important}.invisible{visibility:hidden}.text-hide{font:0/0 a;color:transparent;text-shadow:none;background-color:transparent;border:0}.hidden{display:none!important;visibility:hidden!important}.affix{position:fixed;-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}.hljs{display:block;overflow-x:auto;padding:.5em;background:#002b36;color:#839496;-webkit-text-size-adjust:none}.hljs-comment,.hljs-template_comment,.diff .hljs-header,.hljs-doctype,.hljs-pi,.lisp .hljs-string,.hljs-javadoc{color:#586e75}.hljs-keyword,.hljs-winutils,.method,.hljs-addition,.css .hljs-tag,.hljs-request,.hljs-status,.nginx .hljs-title{color:#859900}.hljs-number,.hljs-command,.hljs-string,.hljs-tag .hljs-value,.hljs-rules .hljs-value,.hljs-phpdoc,.hljs-dartdoc,.tex .hljs-formula,.hljs-regexp,.hljs-hexcolor,.hljs-link_url{color:#2aa198}.hljs-title,.hljs-localvars,.hljs-chunk,.hljs-decorator,.hljs-built_in,.hljs-identifier,.vhdl .hljs-literal,.hljs-id,.css .hljs-function{color:#268bd2}.hljs-attribute,.hljs-variable,.lisp .hljs-body,.smalltalk .hljs-number,.hljs-constant,.hljs-class .hljs-title,.hljs-parent,.hljs-type,.hljs-link_reference{color:#b58900}.hljs-preprocessor,.hljs-preprocessor .hljs-keyword,.hljs-pragma,.hljs-shebang,.hljs-symbol,.hljs-symbol .hljs-string,.diff .hljs-change,.hljs-special,.hljs-attr_selector,.hljs-subst,.hljs-cdata,.css .hljs-pseudo,.hljs-header{color:#cb4b16}.hljs-deletion,.hljs-important{color:#dc322f}.hljs-link_label{color:#6c71c4}.tex .hljs-formula{background:#073642}*,*:before,*:after{box-sizing:border-box}html{-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%}body{margin:0}article,aside,details,figcaption,figure,footer,header,hgroup,main,nav,section,summary{display:block}audio,canvas,progress,video{display:inline-block;vertical-align:baseline}audio:not([controls]){display:none;height:0}[hidden],template{display:none}a{background:0 0}a:active,a:hover{outline:0}abbr[title]{border-bottom:1px dotted}b,strong{font-weight:700}dfn{font-style:italic}h1{margin:.67em 0}mark{background:#ff0;color:#000}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sup{top:-.5em}sub{bottom:-.25em}images{border:0}svg:not(:root){overflow:hidden}figure{margin:1em 40px}hr{box-sizing:content-box;height:0}pre{overflow:auto}code,kbd{font-size:1em}code,kbd,pre,samp{font-family:monospace,monospace}samp{font-size:1em}button,input,optgroup,select,textarea{color:inherit;font:inherit;margin:0}button{overflow:visible}button,select{text-transform:none}button,html input[type="button"],input[type="reset"],input[type="submit"]{-webkit-appearance:button;cursor:pointer}button[disabled],html input[disabled]{cursor:default}button::-moz-focus-inner,input::-moz-focus-inner{border:0;padding:0}input{line-height:normal}input[type="checkbox"],input[type="radio"]{box-sizing:border-box;padding:0}input[type="number"]::-webkit-inner-spin-button,input[type="number"]::-webkit-outer-spin-button{height:auto}input[type="search"]{-webkit-appearance:textfield;box-sizing:content-box}input[type="search"]::-webkit-search-cancel-button,input[type="search"]::-webkit-search-decoration{-webkit-appearance:none}fieldset{border:1px solid silver;margin:0 2px;padding:.35em .625em .75em}legend{border:0;padding:0}textarea{overflow:auto}optgroup{font-weight:700}table{border-collapse:collapse;border-spacing:0}.debug{background-color:#ffc0cb!important}.ellipsis{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.ir{background-color:transparent;border:0;overflow:hidden}.ir::before{content:'';display:block;height:150%;width:0}html{font-size:.875em;background:#fff;color:#373D49}html,body{font-family:Georgia,Cambria,serif;height:100%}body{font-size:1rem;font-weight:400;line-height:2rem}ul,ol{margin-bottom:.83999rem;padding-top:.16001rem}li{-webkit-font-feature-settings:'kern' 1,'onum' 1,'liga' 1;font-feature-settings:'kern' 1,'onum' 1,'liga' 1;margin-left:1rem}li>ul,li>ol{margin-bottom:0}p{padding-top:.66001rem;-webkit-font-feature-settings:'kern' 1,'onum' 1,'liga' 1;font-feature-settings:'kern' 1,'onum' 1,'liga' 1;margin-top:0}p,pre{margin-bottom:1.33999rem}pre{font-size:1rem;padding:.66001rem 9.5px 9.5px;line-height:2rem;background:-webkit-linear-gradient(top,#fff 0,#fff .75rem,#f5f7fa .75rem,#f5f7fa 2.75rem,#fff 2.75rem,#fff 4rem);background:linear-gradient(to bottom,#fff 0,#fff .75rem,#f5f7fa .75rem,#f5f7fa 2.75rem,#fff 2.75rem,#fff 4rem);background-size:100% 4rem;border-color:#D3DAEA}blockquote{margin:0}blockquote p{font-size:1rem;margin-bottom:.33999rem;font-style:italic;padding:.66001rem 1rem 1rem;border-left:3px solid #A0AABF}th,td{padding:12px}h1,h2,h3,h4,h5,h6{font-family:"Source Sans Pro","Helvetica Neue",Helvetica,Arial,sans-serif;-webkit-font-feature-settings:'dlig' 1,'liga' 1,'lnum' 1,'kern' 1;font-feature-settings:'dlig' 1,'liga' 1,'lnum' 1,'kern' 1;font-style:normal;font-weight:600;margin-top:0}h1{line-height:3rem;font-size:2.0571429rem;margin-bottom:.21999rem;padding-top:.78001rem}h2{font-size:1.953125rem;margin-bottom:.1835837rem;padding-top:.8164163rem}h2,h3{line-height:3rem}h3{font-size:1.6457143rem;margin-bottom:.07599rem;padding-top:.92401rem}h4{font-size:1.5625rem;margin-bottom:.546865rem;padding-top:.453135rem}h5{font-size:1.25rem;margin-bottom:-.56251rem;padding-top:.56251rem}h6{font-size:1rem;margin-bottom:-.65001rem;padding-top:.65001rem}a{cursor:pointer;color:#35D7BB;text-decoration:none}a:hover,a:focus{border-bottom-color:#35D7BB;color:#dff9f4}img{height:auto;max-width:100%}.g{display:block}.g:after{clear:both;content:'';display:table}.g-b{float:left;margin:0;width:100%}.g{margin-left:-16px;margin-right:-16px}.g-b{padding-left:16px;padding-right:16px}.g-b--center{display:block;float:none;margin:0 auto}.g-b--right{float:right}.g-b--1of1{width:100%}.g-b--1of2,.g-b--2of4,.g-b--3of6,.g-b--4of8,.g-b--5of10,.g-b--6of12{width:50%}.g-b--1of3,.g-b--2of6,.g-b--4of12{width:33.333%}.g-b--2of3,.g-b--4of6,.g-b--8of12{width:66.666%}.g-b--1of4,.g-b--2of8,.g-b--3of12{width:25%}.g-b--3of4,.g-b--6of8,.g-b--9of12{width:75%}.g-b--1of5,.g-b--2of10{width:20%}.g-b--2of5,.g-b--4of10{width:40%}.g-b--3of5,.g-b--6of10{width:60%}.g-b--4of5,.g-b--8of10{width:80%}.g-b--1of6,.g-b--2of12{width:16.666%}.g-b--5of6,.g-b--10of12{width:83.333%}.g-b--1of8{width:12.5%}.g-b--3of8{width:37.5%}.g-b--5of8{width:62.5%}.g-b--7of8{width:87.5%}.g-b--1of10{width:10%}.g-b--3of10{width:30%}.g-b--7of10{width:70%}.g-b--9of10{width:90%}.g-b--1of12{width:8.333%}.g-b--5of12{width:41.666%}.g-b--7of12{width:58.333%}.g-b--11of12{width:91.666%}.g-b--push--1of1{margin-left:100%}.g-b--push--1of2,.g-b--push--2of4,.g-b--push--3of6,.g-b--push--4of8,.g-b--push--5of10,.g-b--push--6of12{margin-left:50%}.g-b--push--1of3,.g-b--push--2of6,.g-b--push--4of12{margin-left:33.333%}.g-b--push--2of3,.g-b--push--4of6,.g-b--push--8of12{margin-left:66.666%}.g-b--push--1of4,.g-b--push--2of8,.g-b--push--3of12{margin-left:25%}.g-b--push--3of4,.g-b--push--6of8,.g-b--push--9of12{margin-left:75%}.g-b--push--1of5,.g-b--push--2of10{margin-left:20%}.g-b--push--2of5,.g-b--push--4of10{margin-left:40%}.g-b--push--3of5,.g-b--push--6of10{margin-left:60%}.g-b--push--4of5,.g-b--push--8of10{margin-left:80%}.g-b--push--1of6,.g-b--push--2of12{margin-left:16.666%}.g-b--push--5of6,.g-b--push--10of12{margin-left:83.333%}.g-b--push--1of8{margin-left:12.5%}.g-b--push--3of8{margin-left:37.5%}.g-b--push--5of8{margin-left:62.5%}.g-b--push--7of8{margin-left:87.5%}.g-b--push--1of10{margin-left:10%}.g-b--push--3of10{margin-left:30%}.g-b--push--7of10{margin-left:70%}.g-b--push--9of10{margin-left:90%}.g-b--push--1of12{margin-left:8.333%}.g-b--push--5of12{margin-left:41.666%}.g-b--push--7of12{margin-left:58.333%}.g-b--push--11of12{margin-left:91.666%}.g-b--pull--1of1{margin-right:100%}.g-b--pull--1of2,.g-b--pull--2of4,.g-b--pull--3of6,.g-b--pull--4of8,.g-b--pull--5of10,.g-b--pull--6of12{margin-right:50%}.g-b--pull--1of3,.g-b--pull--2of6,.g-b--pull--4of12{margin-right:33.333%}.g-b--pull--2of3,.g-b--pull--4of6,.g-b--pull--8of12{margin-right:66.666%}.g-b--pull--1of4,.g-b--pull--2of8,.g-b--pull--3of12{margin-right:25%}.g-b--pull--3of4,.g-b--pull--6of8,.g-b--pull--9of12{margin-right:75%}.g-b--pull--1of5,.g-b--pull--2of10{margin-right:20%}.g-b--pull--2of5,.g-b--pull--4of10{margin-right:40%}.g-b--pull--3of5,.g-b--pull--6of10{margin-right:60%}.g-b--pull--4of5,.g-b--pull--8of10{margin-right:80%}.g-b--pull--1of6,.g-b--pull--2of12{margin-right:16.666%}.g-b--pull--5of6,.g-b--pull--10of12{margin-right:83.333%}.g-b--pull--1of8{margin-right:12.5%}.g-b--pull--3of8{margin-right:37.5%}.g-b--pull--5of8{margin-right:62.5%}.g-b--pull--7of8{margin-right:87.5%}.g-b--pull--1of10{margin-right:10%}.g-b--pull--3of10{margin-right:30%}.g-b--pull--7of10{margin-right:70%}.g-b--pull--9of10{margin-right:90%}.g-b--pull--1of12{margin-right:8.333%}.g-b--pull--5of12{margin-right:41.666%}.g-b--pull--7of12{margin-right:58.333%}.g-b--pull--11of12{margin-right:91.666%}.splashscreen{position:fixed;top:0;left:0;width:100%;height:100%;background-color:#373D49;z-index:22}.splashscreen-dillinger{width:260px;height:auto;display:block;margin:0 auto;padding-bottom:3rem}.splashscreen p{font-size:1.25rem;padding-top:.56251rem;font-family:"Source Sans Pro","Helvetica Neue",Helvetica,Arial,sans-serif;font-weight:400;text-align:center;max-width:500px;margin:0 auto;color:#FFF}.sp-center{position:relative;-webkit-transform:translateY(-50%);transform:translateY(-50%);top:50%}.open-menu>.wrapper{overflow-x:hidden}.page{margin:0 auto;position:relative;top:0;left:0;width:100%;height:100%;z-index:2;-webkit-transition:all .25s ease-in-out;transition:all .25s ease-in-out;background-color:#fff;padding-top:51px;will-change:left}.open-menu .page{left:270px}.title{line-height:1rem;font-size:.8rem;margin-bottom:.77999rem;padding-top:.22001rem;font-weight:500;color:#A0AABF;letter-spacing:1px;text-transform:uppercase;padding-left:16px;padding-right:16px;margin-top:1rem}.split-preview .title{padding-left:0}.title-document{line-height:1rem;font-size:1.25rem;margin-bottom:.89999rem;padding-top:.10001rem;font-weight:400;font-family:"Ubuntu Mono",Monaco;color:#373D49;padding-left:16px;padding-right:16px;width:80%;min-width:300px;outline:0;border:none}.icon{display:block;margin:0 auto;width:36px;height:36px;border-radius:3px;text-align:center}.icon svg{display:inline-block;margin-left:auto;margin-right:auto}.icon-preview{background-color:#373D49;line-height:40px}.icon-preview svg{width:19px;height:12px}.icon-settings{background-color:#373D49;line-height:44px}.icon-settings svg{width:18px;height:18px}.icon-link{width:16px;height:16px;line-height:1;margin-right:24px;text-align:right}.navbar{background-color:#373D49;height:51px;width:100%;position:fixed;top:0;left:0;z-index:6;-webkit-transition:all .25s ease-in-out;transition:all .25s ease-in-out;will-change:left}.navbar:after{content:"";display:table;clear:both}.open-menu .navbar{left:270px}.navbar-brand{float:left;margin:0 0 0 24px;padding:0;line-height:42px}.navbar-brand svg{width:85px;height:11px}.nav-left{float:left}.nav-right{float:right}.nav-sidebar{width:100%}.menu{list-style:none;margin:0;padding:0}.menu a{border:0;color:#A0AABF;font-family:"Source Sans Pro","Helvetica Neue",Helvetica,Arial,sans-serif;outline:none;text-transform:uppercase}.menu a:hover{color:#35D7BB}.menu .menu-item{border:0;display:none;float:left;margin:0;position:relative}.menu .menu-item>a{display:block;font-size:12px;height:51px;letter-spacing:1px;line-height:51px;padding:0 24px}.menu .menu-item--settings,.menu .menu-item--preview,.menu .menu-item--save-to.in-sidebar,.menu .menu-item--import-from.in-sidebar,.menu .menu-item--link-unlink.in-sidebar,.menu .menu-item--documents.in-sidebar{display:block}.menu .menu-item--documents{padding-bottom:1rem}.menu .menu-item.open>a{background-color:#1D212A}.menu .menu-item-icon>a{height:auto;padding:0}.menu .menu-item-icon:hover>a{background-color:transparent}.menu .menu-link.open i{background-color:#1D212A}.menu .menu-link.open g{fill:#35D7BB}.menu .menu-link-preview,.menu .menu-link-settings{margin-top:8px;width:51px}.menu-sidebar{width:100%}.menu-sidebar .menu-item{float:none;margin-bottom:1px;width:100%}.menu-sidebar .menu-item.open>a{background-color:#373D49}.menu-sidebar .open .caret{-webkit-transform:rotate(180deg);transform:rotate(180deg)}.menu-sidebar>.menu-item:hover .dropdown a,.menu-sidebar>.menu-item:hover .settings a{background-color:transparent}.menu-sidebar .menu-link{background-color:#373D49;font-weight:600}.menu-sidebar .menu-link:after{content:"";display:table;clear:both}.menu-sidebar .menu-link>span{float:left}.menu-sidebar .menu-link>.caret{float:right;text-align:right;top:22px}.menu-sidebar .dropdown,.menu-sidebar .settings{background-color:transparent;position:static;width:100%}.dropdown{position:absolute;right:0;top:51px;width:188px}.dropdown,.settings{display:none;background-color:#1D212A}.dropdown{padding:0}.dropdown,.settings,.sidebar-list{list-style:none;margin:0}.sidebar-list{padding:0}.dropdown li{margin:32px 0;padding:0 0 0 32px}.dropdown li,.settings li{line-height:1}.sidebar-list li{line-height:1;margin:32px 0;padding:0 0 0 32px}.dropdown a{color:#D0D6E2}.dropdown a,.settings a,.sidebar-list a{display:block;text-transform:none}.sidebar-list a{color:#D0D6E2}.dropdown a:after,.settings a:after,.sidebar-list a:after{content:"";display:table;clear:both}.dropdown .icon,.settings .icon,.sidebar-list .icon{float:right}.open .dropdown,.open .settings,.open .sidebar-list{display:block}.open .dropdown.collapse,.open .collapse.settings,.open .sidebar-list.collapse{display:none}.open .dropdown.collapse.in,.open .collapse.in.settings,.open .sidebar-list.collapse.in{display:block}.dropdown .unlinked .icon,.settings .unlinked .icon,.sidebar-list .unlinked .icon{opacity:.3}.dropdown.documents li,.documents.settings li,.sidebar-list.documents li{background-image:url("../img/icons/file.svg");background-position:240px center;background-repeat:no-repeat;background-size:14px 16px;padding:3px 32px}.dropdown.documents li.octocat,.documents.settings li.octocat,.sidebar-list.documents li.octocat{background-image:url("../img/icons/octocat.svg");background-position:234px center;background-size:24px 24px}.dropdown.documents li:last-child,.documents.settings li:last-child,.sidebar-list.documents li:last-child{margin-bottom:1rem}.dropdown.documents li.active a,.documents.settings li.active a,.sidebar-list.documents li.active a{color:#35D7BB}.settings{position:fixed;top:67px;right:16px;border-radius:3px;width:288px;background-color:#373D49;padding:16px;z-index:7}.show-settings .settings{display:block}.settings .has-checkbox{float:left}.settings a{font-size:1.25rem;font-family:"Source Sans Pro","Helvetica Neue",Helvetica,Arial,sans-serif;font-weight:400;-webkit-font-smoothing:antialiased;line-height:28px;color:#D0D6E2}.settings a:after{content:"";display:table;clear:both}.settings a:hover{color:#35D7BB}.settings li{border-bottom:1px solid #4F535B;margin:0;padding:16px 0}.settings li:last-child{border-bottom:none}.brand{border:none;display:block}.brand:hover g{fill:#35D7BB}.toggle{display:block;float:left;height:16px;padding:25px 16px 26px;width:40px}.toggle span:after,.toggle span:before{content:'';left:0;position:absolute;top:-6px}.toggle span:after{top:6px}.toggle span{display:block;position:relative}.toggle span,.toggle span:after,.toggle span:before{-webkit-backface-visibility:hidden;backface-visibility:hidden;background-color:#D3DAEA;height:2px;-webkit-transition:all .3s;transition:all .3s;width:20px}.open-menu .toggle span{background-color:transparent}.open-menu .toggle span:before{-webkit-transform:rotate(45deg) translate(3px,3px);transform:rotate(45deg) translate(3px,3px)}.open-menu .toggle span:after{-webkit-transform:rotate(-45deg) translate(5px,-6px);transform:rotate(-45deg) translate(5px,-6px)}.caret{display:inline-block;width:0;height:0;margin-left:6px;vertical-align:middle;position:relative;top:-1px;border-top:4px solid;border-right:4px solid transparent;border-left:4px solid transparent}.sidebar{overflow:auto;height:100%;padding-right:15px;padding-bottom:15px;width:285px}.sidebar-wrapper{-webkit-overflow-scrolling:touch;background-color:#2B2F36;left:0;height:100%;overflow-y:hidden;position:fixed;top:0;width:285px;z-index:1}.sidebar-branding{width:160px;padding:0;margin:16px auto}.header{border-bottom:1px solid #E8E8E8;position:relative}.words,.characters{line-height:1rem;font-size:.8rem;margin-bottom:.77999rem;padding-top:.22001rem;font-weight:500;font-family:"Source Sans Pro","Helvetica Neue",Helvetica,Arial,sans-serif;color:#A0AABF;letter-spacing:1px;text-transform:uppercase;z-index:5;position:absolute;right:16px;top:0}.words span,.characters span{color:#000}.words+.characters{top:22px}.btn{text-align:center;display:inline-block;width:100%;text-transform:uppercase;font-weight:600;font-family:"Source Sans Pro","Helvetica Neue",Helvetica,Arial,sans-serif;font-size:14px;text-shadow:0 1px 0 #1b8b77;padding:16px 24px;background-color:#35D7BB;border-radius:3px;margin:0 auto 16px;line-height:1;color:#fff;-webkit-transition:all .15s linear;transition:all .15s linear;-webkit-font-smoothing:antialiased}.btn--new,.btn--save{display:block;width:238px}.btn--new:hover,.btn--new:focus,.btn--save:hover,.btn--save:focus{color:#fff;border-bottom-color:transparent;box-shadow:0 1px 3px #24b59c;text-shadow:0 1px 0 #24b59c}.btn--save{background-color:#4A5261;text-shadow:0 1px 1px #1e2127}.btn--save:hover,.btn--save:focus{color:#fff;border-bottom-color:transparent;box-shadow:0 1px 5px #08090a;text-shadow:none}.btn--delete{display:block;width:238px;background-color:transparent;font-size:12px;text-shadow:none}.btn--delete:hover,.btn--delete:focus{color:#fff;border-bottom-color:transparent;text-shadow:0 1px 0 #08090a;opacity:.8}.btn--delete-modal,.btn--ok,.btn--close{border-top:0;background-color:#4A5261;text-shadow:0 1px 0 #08090a;margin:0}.btn--delete-modal:hover,.btn--delete-modal:focus,.btn--ok:hover,.btn--ok:focus,.btn--close:hover,.btn--close:focus{color:#fff;background-color:#292d36;text-shadow:none}.btn--delete-modal{display:inline;width:auto}.overlay{position:absolute;top:0;left:0;width:100%;height:100%;background-color:rgba(55,61,73,.8);-webkit-transition:all .25s ease-in-out;transition:all .25s ease-in-out;-webkit-transition-timing-function:ease-out;transition-timing-function:ease-out;will-change:left,opacity,visibility;z-index:5;opacity:0;visibility:hidden}.show-settings .overlay{visibility:visible;opacity:1}.switch{float:right;line-height:1}.switch input{display:none}.switch small{display:inline-block;cursor:pointer;padding:0 24px 0 0;-webkit-transition:all ease .2s;transition:all ease .2s;background-color:#2B2F36;border-color:#2B2F36}.switch small,.switch small:before{border-radius:30px;box-shadow:inset 0 0 2px 0 #14171F}.switch small:before{display:block;content:'';width:28px;height:28px;background:#fff}.switch.checked small{padding-right:0;padding-left:24px;background-color:#35D7BB;box-shadow:none}.modal--dillinger.about .modal-dialog{font-size:1.25rem;max-width:500px}.modal--dillinger.scope .modal-dialog{max-width:300px;margin:5rem auto}.modal--dillinger .modal-dialog{max-width:600px;width:auto;margin:5rem auto}.modal--dillinger .modal-content{background:#373D49;border-radius:3px;box-shadow:0 2px 5px 0 #2C3B59;color:#fff;font-family:"Source Sans Pro","Helvetica Neue",Helvetica,Arial,sans-serif;font-weight:400;padding:2rem}.modal--dillinger ul{list-style-type:disc;margin:1rem 0;padding:0 0 0 1rem}.modal--dillinger li{padding:0;margin:0}.modal--dillinger .modal-header{border:0;padding:0}.modal--dillinger .modal-body{padding:0}.modal--dillinger .modal-footer{border:0;padding:0}.modal--dillinger .close{color:#fff;opacity:1}.modal-backdrop{background-color:#373D49}.pagination--dillinger{padding:0!important;margin:1.5rem 0!important;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-ms-flex-line-pack:stretch;align-content:stretch}.pagination--dillinger,.pagination--dillinger li{display:-webkit-box;display:-ms-flexbox;display:flex}.pagination--dillinger li{-webkit-box-flex:1;-ms-flex-positive:1;flex-grow:1;text-align:center}.pagination--dillinger li:first-child>a,.pagination--dillinger li.disabled>a,.pagination--dillinger li.disabled>a:hover,.pagination--dillinger li.disabled>a:focus,.pagination--dillinger li>a{background-color:transparent;border-color:#4F535B;border-right-color:transparent}.pagination--dillinger li.active>a,.pagination--dillinger li.active>a:hover,.pagination--dillinger li.active>a:focus{border-color:#4A5261;background-color:#4A5261;color:#fff}.pagination--dillinger li>a{float:none;color:#fff;width:100%;display:block;text-align:center;margin:0;border-right-color:transparent;padding:6px}.pagination--dillinger li>a:hover,.pagination--dillinger li>a:focus{border-color:#35D7BB;background-color:#35D7BB;color:#fff}.pagination--dillinger li:last-child a{border-color:#4F535B}.pagination--dillinger li:first-child a{border-right-color:transparent}.diNotify{position:absolute;z-index:9999;left:0;right:0;top:0;margin:0 auto;max-width:400px;text-align:center;-webkit-transition:top .5s ease-in-out,opacity .5s ease-in-out;transition:top .5s ease-in-out,opacity .5s ease-in-out;visibility:hidden}.diNotify-body{-webkit-font-smoothing:antialiased;background-color:#35D7BB;background:#666E7F;border-radius:3px;color:#fff;font-family:"Source Sans Pro","Helvetica Neue",Helvetica,Arial,sans-serif;font-weight:400;overflow:hidden;padding:1rem 2rem .5rem;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:baseline;-ms-flex-align:baseline;align-items:baseline;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center}.diNotify-icon{display:block;width:16px;height:16px;line-height:16px;position:relative;top:3px}.diNotify-message{padding-left:1rem}.zen-wrapper{position:fixed;top:0;left:0;right:0;bottom:0;width:100%;height:100%;z-index:10;background-color:#FFF;opacity:0;-webkit-transition:opacity .25s ease-in-out;transition:opacity .25s ease-in-out}.zen-wrapper.on{opacity:1}.enter-zen-mode{background-image:url("../img/icons/enter-zen.svg");right:.5rem;top:.313rem;display:none}.enter-zen-mode,.close-zen-mode{font:0/0 a;color:transparent;text-shadow:none;background-color:transparent;border:0;background-repeat:no-repeat;width:32px;height:32px;display:block;position:absolute}.close-zen-mode{background-image:url("../img/icons/exit-zen.svg");right:1rem;top:1rem}.zen-page{position:relative;top:0;bottom:0;z-index:11;height:100%;width:100%}#zen{font-size:1.25rem;width:300px;height:80%;margin:0 auto;position:relative;top:10%}#zen:before,#zen:after{content:"";position:absolute;height:10%;width:100%;z-index:12;pointer-events:none}#preview .table{width:auto}.ui-resizable{position:relative}.ui-resizable-handle{position:absolute;font-size:.1px;z-index:99999;display:block}.ui-resizable-e{background-color:#666;border-right:8px solid #e8e8e8;border-left:1px solid #222;width:10px;z-index:88!important;position:relative}.ui-resizable-e:after{content:"-";display:block;position:absolute;top:calc(50% - 16px);left:0;height:25px;width:2px;background-color:rgba(0,0,0,.4);margin:3px}#editor{cursor:ew-resize;position:relative;z-index:auto}.profile-pic{float:left;width:250px}#_default_ a::before{color:#A0AABF}#_default_ img{display:none}#_default_ #_default_{display:block;float:left;max-width:38%;word-wrap:break-word}#_default_ .default-ad{display:none}#_default_ ._default_{display:block}#_default_ a{color:#35d7bb;text-decoration:none}#_default_ a:hover{color:#8ae8d8}#_default_ .default-image{display:none}#_default_ .default-title:after{content:" — "}#_default_ .default-title,#_default_ .default-description{display:inline}#_default_ .default-title{position:relative;font-weight:600;display:none}#_default_ a:before{position:relative;top:0;padding:5px;color:#a0aabf;content:"Ad";text-transform:uppercase;font-size:8px;font-family:Verdana,sans-serif}#_default_{display:block;float:left;max-width:38%;word-wrap:break-word}#_default_ ._default_{display:block;font-size:.75rem;height:51px;letter-spacing:1px;line-height:1rem;padding:18px 24px}.split{overflow:scroll;padding:0!important}.split-editor{padding-left:0;padding-right:0;position:relative;z-index:3}.show-preview .split-editor{display:none}.split-preview{background-color:#fff;display:none;top:0;position:relative;z-index:4}.show-preview .split-preview{display:block}#editor{font-size:1rem;font-family:"Ubuntu Mono",Monaco;font-weight:400;line-height:2rem;width:100%;height:100%}#editor .ace_gutter{-webkit-font-smoothing:antialiased}.editor-header{width:50%;float:left;border-bottom:1px solid #E8E8E8;position:relative}.editor-header--first{border-right:1px solid #E8E8E8}.editor-header .title{display:inline-block}.preview-html{padding:15px}.preview-html a{color:#A0AABF;text-decoration:underline}.preview-src{white-space:normal}.preview-mode-toggle-src{background-image:url("../img/icons/code.svg")}.preview-mode-toggle-src,.preview-mode-toggle-html{font:0/0 a;color:transparent;text-shadow:none;background-color:transparent;border:0;background-repeat:no-repeat;width:32px;height:32px;display:block;position:absolute;right:.5rem;top:.5rem;display:none}.preview-mode-toggle-html{background-image:url("../img/icons/eye.svg")}.sr-only{visibility:hidden;text-overflow:110%;overflow:hidden;top:-100px;position:absolute}.mnone{margin:0!important}@media screen and (min-width:27.5em){html{font-size:.875em}body{font-size:1rem}ul,ol{margin-bottom:.83999rem;padding-top:.16001rem}p{padding-top:.66001rem}p,pre{margin-bottom:1.33999rem}pre,blockquote p{font-size:1rem;padding-top:.66001rem}blockquote p{margin-bottom:.33999rem}h1{font-size:2.0571429rem;margin-bottom:.21999rem;padding-top:.78001rem}h2{font-size:1.953125rem;margin-bottom:.1835837rem;padding-top:.8164163rem}h3{font-size:1.6457143rem;margin-bottom:.07599rem;padding-top:.92401rem}h4{font-size:1.5625rem;margin-bottom:.546865rem;padding-top:.453135rem}h5{font-size:1.25rem;margin-bottom:-.56251rem;padding-top:.56251rem}h6{font-size:1rem;margin-bottom:-.65001rem;padding-top:.65001rem}.g{margin-left:-16px;margin-right:-16px}.g-b{padding-left:16px;padding-right:16px}.g-b--m1of1{width:100%}.g-b--m1of2,.g-b--m2of4,.g-b--m3of6,.g-b--m4of8,.g-b--m5of10,.g-b--m6of12{width:50%}.g-b--m1of3,.g-b--m2of6,.g-b--m4of12{width:33.333%}.g-b--m2of3,.g-b--m4of6,.g-b--m8of12{width:66.666%}.g-b--m1of4,.g-b--m2of8,.g-b--m3of12{width:25%}.g-b--m3of4,.g-b--m6of8,.g-b--m9of12{width:75%}.g-b--m1of5,.g-b--m2of10{width:20%}.g-b--m2of5,.g-b--m4of10{width:40%}.g-b--m3of5,.g-b--m6of10{width:60%}.g-b--m4of5,.g-b--m8of10{width:80%}.g-b--m1of6,.g-b--m2of12{width:16.666%}.g-b--m5of6,.g-b--m10of12{width:83.333%}.g-b--m1of8{width:12.5%}.g-b--m3of8{width:37.5%}.g-b--m5of8{width:62.5%}.g-b--m7of8{width:87.5%}.g-b--m1of10{width:10%}.g-b--m3of10{width:30%}.g-b--m7of10{width:70%}.g-b--m9of10{width:90%}.g-b--m1of12{width:8.333%}.g-b--m5of12{width:41.666%}.g-b--m7of12{width:58.333%}.g-b--m11of12{width:91.666%}.g-b--push--m1of1{margin-left:100%}.g-b--push--m1of2,.g-b--push--m2of4,.g-b--push--m3of6,.g-b--push--m4of8,.g-b--push--m5of10,.g-b--push--m6of12{margin-left:50%}.g-b--push--m1of3,.g-b--push--m2of6,.g-b--push--m4of12{margin-left:33.333%}.g-b--push--m2of3,.g-b--push--m4of6,.g-b--push--m8of12{margin-left:66.666%}.g-b--push--m1of4,.g-b--push--m2of8,.g-b--push--m3of12{margin-left:25%}.g-b--push--m3of4,.g-b--push--m6of8,.g-b--push--m9of12{margin-left:75%}.g-b--push--m1of5,.g-b--push--m2of10{margin-left:20%}.g-b--push--m2of5,.g-b--push--m4of10{margin-left:40%}.g-b--push--m3of5,.g-b--push--m6of10{margin-left:60%}.g-b--push--m4of5,.g-b--push--m8of10{margin-left:80%}.g-b--push--m1of6,.g-b--push--m2of12{margin-left:16.666%}.g-b--push--m5of6,.g-b--push--m10of12{margin-left:83.333%}.g-b--push--m1of8{margin-left:12.5%}.g-b--push--m3of8{margin-left:37.5%}.g-b--push--m5of8{margin-left:62.5%}.g-b--push--m7of8{margin-left:87.5%}.g-b--push--m1of10{margin-left:10%}.g-b--push--m3of10{margin-left:30%}.g-b--push--m7of10{margin-left:70%}.g-b--push--m9of10{margin-left:90%}.g-b--push--m1of12{margin-left:8.333%}.g-b--push--m5of12{margin-left:41.666%}.g-b--push--m7of12{margin-left:58.333%}.g-b--push--m11of12{margin-left:91.666%}.g-b--pull--m1of1{margin-right:100%}.g-b--pull--m1of2,.g-b--pull--m2of4,.g-b--pull--m3of6,.g-b--pull--m4of8,.g-b--pull--m5of10,.g-b--pull--m6of12{margin-right:50%}.g-b--pull--m1of3,.g-b--pull--m2of6,.g-b--pull--m4of12{margin-right:33.333%}.g-b--pull--m2of3,.g-b--pull--m4of6,.g-b--pull--m8of12{margin-right:66.666%}.g-b--pull--m1of4,.g-b--pull--m2of8,.g-b--pull--m3of12{margin-right:25%}.g-b--pull--m3of4,.g-b--pull--m6of8,.g-b--pull--m9of12{margin-right:75%}.g-b--pull--m1of5,.g-b--pull--m2of10{margin-right:20%}.g-b--pull--m2of5,.g-b--pull--m4of10{margin-right:40%}.g-b--pull--m3of5,.g-b--pull--m6of10{margin-right:60%}.g-b--pull--m4of5,.g-b--pull--m8of10{margin-right:80%}.g-b--pull--m1of6,.g-b--pull--m2of12{margin-right:16.666%}.g-b--pull--m5of6,.g-b--pull--m10of12{margin-right:83.333%}.g-b--pull--m1of8{margin-right:12.5%}.g-b--pull--m3of8{margin-right:37.5%}.g-b--pull--m5of8{margin-right:62.5%}.g-b--pull--m7of8{margin-right:87.5%}.g-b--pull--m1of10{margin-right:10%}.g-b--pull--m3of10{margin-right:30%}.g-b--pull--m7of10{margin-right:70%}.g-b--pull--m9of10{margin-right:90%}.g-b--pull--m1of12{margin-right:8.333%}.g-b--pull--m5of12{margin-right:41.666%}.g-b--pull--m7of12{margin-right:58.333%}.g-b--pull--m11of12{margin-right:91.666%}.splashscreen p{font-size:1.25rem;margin-bottom:1.43749rem;padding-top:.56251rem}.title{font-size:.8rem;margin-bottom:.77999rem;padding-top:.22001rem}.title-document{margin-bottom:.89999rem;padding-top:.10001rem}.title-document,.settings a{font-size:1.25rem}.words,.characters{font-size:.8rem;margin-bottom:.77999rem;padding-top:.22001rem}.modal--dillinger.about .modal-dialog,#zen{font-size:1.25rem}#zen{width:400px}#editor{font-size:1rem}}@media screen and (min-width:46.25em){html{font-size:.875em}body{font-size:1rem}ul,ol{margin-bottom:.83999rem;padding-top:.16001rem}p{padding-top:.66001rem}p,pre{margin-bottom:1.33999rem}pre,blockquote p{font-size:1rem;padding-top:.66001rem}blockquote p{margin-bottom:.33999rem}h1{font-size:2.0571429rem;margin-bottom:.21999rem;padding-top:.78001rem}h2{font-size:1.953125rem;margin-bottom:.1835837rem;padding-top:.8164163rem}h3{font-size:1.6457143rem;margin-bottom:.07599rem;padding-top:.92401rem}h4{font-size:1.5625rem;margin-bottom:.546865rem;padding-top:.453135rem}h5{font-size:1.25rem;margin-bottom:-.56251rem;padding-top:.56251rem}h6{font-size:1rem;margin-bottom:-.65001rem;padding-top:.65001rem}.g{margin-left:-16px;margin-right:-16px}.g-b{padding-left:16px;padding-right:16px}.g-b--t1of1{width:100%}.g-b--t1of2,.g-b--t2of4,.g-b--t3of6,.g-b--t4of8,.g-b--t5of10,.g-b--t6of12{width:50%}.g-b--t1of3,.g-b--t2of6,.g-b--t4of12{width:33.333%}.g-b--t2of3,.g-b--t4of6,.g-b--t8of12{width:66.666%}.g-b--t1of4,.g-b--t2of8,.g-b--t3of12{width:25%}.g-b--t3of4,.g-b--t6of8,.g-b--t9of12{width:75%}.g-b--t1of5,.g-b--t2of10{width:20%}.g-b--t2of5,.g-b--t4of10{width:40%}.g-b--t3of5,.g-b--t6of10{width:60%}.g-b--t4of5,.g-b--t8of10{width:80%}.g-b--t1of6,.g-b--t2of12{width:16.666%}.g-b--t5of6,.g-b--t10of12{width:83.333%}.g-b--t1of8{width:12.5%}.g-b--t3of8{width:37.5%}.g-b--t5of8{width:62.5%}.g-b--t7of8{width:87.5%}.g-b--t1of10{width:10%}.g-b--t3of10{width:30%}.g-b--t7of10{width:70%}.g-b--t9of10{width:90%}.g-b--t1of12{width:8.333%}.g-b--t5of12{width:41.666%}.g-b--t7of12{width:58.333%}.g-b--t11of12{width:91.666%}.g-b--push--t1of1{margin-left:100%}.g-b--push--t1of2,.g-b--push--t2of4,.g-b--push--t3of6,.g-b--push--t4of8,.g-b--push--t5of10,.g-b--push--t6of12{margin-left:50%}.g-b--push--t1of3,.g-b--push--t2of6,.g-b--push--t4of12{margin-left:33.333%}.g-b--push--t2of3,.g-b--push--t4of6,.g-b--push--t8of12{margin-left:66.666%}.g-b--push--t1of4,.g-b--push--t2of8,.g-b--push--t3of12{margin-left:25%}.g-b--push--t3of4,.g-b--push--t6of8,.g-b--push--t9of12{margin-left:75%}.g-b--push--t1of5,.g-b--push--t2of10{margin-left:20%}.g-b--push--t2of5,.g-b--push--t4of10{margin-left:40%}.g-b--push--t3of5,.g-b--push--t6of10{margin-left:60%}.g-b--push--t4of5,.g-b--push--t8of10{margin-left:80%}.g-b--push--t1of6,.g-b--push--t2of12{margin-left:16.666%}.g-b--push--t5of6,.g-b--push--t10of12{margin-left:83.333%}.g-b--push--t1of8{margin-left:12.5%}.g-b--push--t3of8{margin-left:37.5%}.g-b--push--t5of8{margin-left:62.5%}.g-b--push--t7of8{margin-left:87.5%}.g-b--push--t1of10{margin-left:10%}.g-b--push--t3of10{margin-left:30%}.g-b--push--t7of10{margin-left:70%}.g-b--push--t9of10{margin-left:90%}.g-b--push--t1of12{margin-left:8.333%}.g-b--push--t5of12{margin-left:41.666%}.g-b--push--t7of12{margin-left:58.333%}.g-b--push--t11of12{margin-left:91.666%}.g-b--pull--t1of1{margin-right:100%}.g-b--pull--t1of2,.g-b--pull--t2of4,.g-b--pull--t3of6,.g-b--pull--t4of8,.g-b--pull--t5of10,.g-b--pull--t6of12{margin-right:50%}.g-b--pull--t1of3,.g-b--pull--t2of6,.g-b--pull--t4of12{margin-right:33.333%}.g-b--pull--t2of3,.g-b--pull--t4of6,.g-b--pull--t8of12{margin-right:66.666%}.g-b--pull--t1of4,.g-b--pull--t2of8,.g-b--pull--t3of12{margin-right:25%}.g-b--pull--t3of4,.g-b--pull--t6of8,.g-b--pull--t9of12{margin-right:75%}.g-b--pull--t1of5,.g-b--pull--t2of10{margin-right:20%}.g-b--pull--t2of5,.g-b--pull--t4of10{margin-right:40%}.g-b--pull--t3of5,.g-b--pull--t6of10{margin-right:60%}.g-b--pull--t4of5,.g-b--pull--t8of10{margin-right:80%}.g-b--pull--t1of6,.g-b--pull--t2of12{margin-right:16.666%}.g-b--pull--t5of6,.g-b--pull--t10of12{margin-right:83.333%}.g-b--pull--t1of8{margin-right:12.5%}.g-b--pull--t3of8{margin-right:37.5%}.g-b--pull--t5of8{margin-right:62.5%}.g-b--pull--t7of8{margin-right:87.5%}.g-b--pull--t1of10{margin-right:10%}.g-b--pull--t3of10{margin-right:30%}.g-b--pull--t7of10{margin-right:70%}.g-b--pull--t9of10{margin-right:90%}.g-b--pull--t1of12{margin-right:8.333%}.g-b--pull--t5of12{margin-right:41.666%}.g-b--pull--t7of12{margin-right:58.333%}.g-b--pull--t11of12{margin-right:91.666%}.splashscreen-dillinger{width:500px}.splashscreen p{font-size:1.25rem;margin-bottom:1.43749rem;padding-top:.56251rem}.title{font-size:.8rem;margin-bottom:.77999rem;padding-top:.22001rem}.title-document{font-size:1.25rem;margin-bottom:.89999rem;padding-top:.10001rem}.menu .menu-item--save-to,.menu .menu-item--import-from{display:block}.menu .menu-item--preview,.menu .menu-item--save-to.in-sidebar,.menu .menu-item--import-from.in-sidebar{display:none}.settings a{font-size:1.25rem}.words,.characters{font-size:.8rem;margin-bottom:.77999rem;padding-top:.22001rem}.modal--dillinger.about .modal-dialog{font-size:1.25rem}.enter-zen-mode{display:block}.close-zen-mode{right:3rem;top:3rem}#zen{font-size:1.25rem;width:500px}.split-editor{border-right:1px solid #E8E8E8;float:left;height:calc(100vh - 172px);-webkit-overflow-scrolling:touch;padding-right:16px;width:50%}.show-preview .split-editor{display:block}.split-preview{display:block;float:right;height:calc(100vh - 172px);-webkit-overflow-scrolling:touch;position:relative;top:0;width:50%}#editor{font-size:1rem}.preview-mode-toggle-src,.preview-mode-toggle-html{display:block}}@media screen and (min-width:62.5em){html{font-size:.875em}body{font-size:1rem}ul,ol{margin-bottom:.83999rem;padding-top:.16001rem}p{padding-top:.66001rem}p,pre{margin-bottom:1.33999rem}pre,blockquote p{font-size:1rem;padding-top:.66001rem}blockquote p{margin-bottom:.33999rem}h1{font-size:2.0571429rem;margin-bottom:.21999rem;padding-top:.78001rem}h2{font-size:1.953125rem;margin-bottom:.1835837rem;padding-top:.8164163rem}h3{font-size:1.6457143rem;margin-bottom:.07599rem;padding-top:.92401rem}h4{font-size:1.5625rem;margin-bottom:.546865rem;padding-top:.453135rem}h5{font-size:1.25rem;margin-bottom:-.56251rem;padding-top:.56251rem}h6{font-size:1rem;margin-bottom:-.65001rem;padding-top:.65001rem}.g{margin-left:-16px;margin-right:-16px}.g-b{padding-left:16px;padding-right:16px}.g-b--d1of1{width:100%}.g-b--d1of2,.g-b--d2of4,.g-b--d3of6,.g-b--d4of8,.g-b--d5of10,.g-b--d6of12{width:50%}.g-b--d1of3,.g-b--d2of6,.g-b--d4of12{width:33.333%}.g-b--d2of3,.g-b--d4of6,.g-b--d8of12{width:66.666%}.g-b--d1of4,.g-b--d2of8,.g-b--d3of12{width:25%}.g-b--d3of4,.g-b--d6of8,.g-b--d9of12{width:75%}.g-b--d1of5,.g-b--d2of10{width:20%}.g-b--d2of5,.g-b--d4of10{width:40%}.g-b--d3of5,.g-b--d6of10{width:60%}.g-b--d4of5,.g-b--d8of10{width:80%}.g-b--d1of6,.g-b--d2of12{width:16.666%}.g-b--d5of6,.g-b--d10of12{width:83.333%}.g-b--d1of8{width:12.5%}.g-b--d3of8{width:37.5%}.g-b--d5of8{width:62.5%}.g-b--d7of8{width:87.5%}.g-b--d1of10{width:10%}.g-b--d3of10{width:30%}.g-b--d7of10{width:70%}.g-b--d9of10{width:90%}.g-b--d1of12{width:8.333%}.g-b--d5of12{width:41.666%}.g-b--d7of12{width:58.333%}.g-b--d11of12{width:91.666%}.g-b--push--d1of1{margin-left:100%}.g-b--push--d1of2,.g-b--push--d2of4,.g-b--push--d3of6,.g-b--push--d4of8,.g-b--push--d5of10,.g-b--push--d6of12{margin-left:50%}.g-b--push--d1of3,.g-b--push--d2of6,.g-b--push--d4of12{margin-left:33.333%}.g-b--push--d2of3,.g-b--push--d4of6,.g-b--push--d8of12{margin-left:66.666%}.g-b--push--d1of4,.g-b--push--d2of8,.g-b--push--d3of12{margin-left:25%}.g-b--push--d3of4,.g-b--push--d6of8,.g-b--push--d9of12{margin-left:75%}.g-b--push--d1of5,.g-b--push--d2of10{margin-left:20%}.g-b--push--d2of5,.g-b--push--d4of10{margin-left:40%}.g-b--push--d3of5,.g-b--push--d6of10{margin-left:60%}.g-b--push--d4of5,.g-b--push--d8of10{margin-left:80%}.g-b--push--d1of6,.g-b--push--d2of12{margin-left:16.666%}.g-b--push--d5of6,.g-b--push--d10of12{margin-left:83.333%}.g-b--push--d1of8{margin-left:12.5%}.g-b--push--d3of8{margin-left:37.5%}.g-b--push--d5of8{margin-left:62.5%}.g-b--push--d7of8{margin-left:87.5%}.g-b--push--d1of10{margin-left:10%}.g-b--push--d3of10{margin-left:30%}.g-b--push--d7of10{margin-left:70%}.g-b--push--d9of10{margin-left:90%}.g-b--push--d1of12{margin-left:8.333%}.g-b--push--d5of12{margin-left:41.666%}.g-b--push--d7of12{margin-left:58.333%}.g-b--push--d11of12{margin-left:91.666%}.g-b--pull--d1of1{margin-right:100%}.g-b--pull--d1of2,.g-b--pull--d2of4,.g-b--pull--d3of6,.g-b--pull--d4of8,.g-b--pull--d5of10,.g-b--pull--d6of12{margin-right:50%}.g-b--pull--d1of3,.g-b--pull--d2of6,.g-b--pull--d4of12{margin-right:33.333%}.g-b--pull--d2of3,.g-b--pull--d4of6,.g-b--pull--d8of12{margin-right:66.666%}.g-b--pull--d1of4,.g-b--pull--d2of8,.g-b--pull--d3of12{margin-right:25%}.g-b--pull--d3of4,.g-b--pull--d6of8,.g-b--pull--d9of12{margin-right:75%}.g-b--pull--d1of5,.g-b--pull--d2of10{margin-right:20%}.g-b--pull--d2of5,.g-b--pull--d4of10{margin-right:40%}.g-b--pull--d3of5,.g-b--pull--d6of10{margin-right:60%}.g-b--pull--d4of5,.g-b--pull--d8of10{margin-right:80%}.g-b--pull--d1of6,.g-b--pull--d2of12{margin-right:16.666%}.g-b--pull--d5of6,.g-b--pull--d10of12{margin-right:83.333%}.g-b--pull--d1of8{margin-right:12.5%}.g-b--pull--d3of8{margin-right:37.5%}.g-b--pull--d5of8{margin-right:62.5%}.g-b--pull--d7of8{margin-right:87.5%}.g-b--pull--d1of10{margin-right:10%}.g-b--pull--d3of10{margin-right:30%}.g-b--pull--d7of10{margin-right:70%}.g-b--pull--d9of10{margin-right:90%}.g-b--pull--d1of12{margin-right:8.333%}.g-b--pull--d5of12{margin-right:41.666%}.g-b--pull--d7of12{margin-right:58.333%}.g-b--pull--d11of12{margin-right:91.666%}.splashscreen-dillinger{width:700px}.splashscreen p{font-size:1.25rem;margin-bottom:1.43749rem;padding-top:.56251rem}.title{font-size:.8rem;margin-bottom:.77999rem;padding-top:.22001rem}.title-document{font-size:1.25rem;margin-bottom:.89999rem;padding-top:.10001rem}.menu .menu-item--export-as{display:block}.menu .menu-item--preview{display:none}.settings a{font-size:1.25rem}.words,.characters{font-size:.8rem;margin-bottom:.77999rem;padding-top:.22001rem}.modal--dillinger.about .modal-dialog,#zen{font-size:1.25rem}#zen{width:700px}#editor{font-size:1rem}}@media screen and (min-width:87.5em){html{font-size:.875em}body{font-size:1rem}ul,ol{margin-bottom:.83999rem;padding-top:.16001rem}p{padding-top:.66001rem}p,pre{margin-bottom:1.33999rem}pre,blockquote p{font-size:1rem;padding-top:.66001rem}blockquote p{margin-bottom:.33999rem}h1{font-size:2.0571429rem;margin-bottom:.21999rem;padding-top:.78001rem}h2{font-size:1.953125rem;margin-bottom:.1835837rem;padding-top:.8164163rem}h3{font-size:1.6457143rem;margin-bottom:.07599rem;padding-top:.92401rem}h4{font-size:1.5625rem;margin-bottom:.546865rem;padding-top:.453135rem}h5{font-size:1.25rem;margin-bottom:-.56251rem;padding-top:.56251rem}h6{font-size:1rem;margin-bottom:-.65001rem;padding-top:.65001rem}.splashscreen-dillinger{width:800px}.splashscreen p{font-size:1.25rem;margin-bottom:1.43749rem;padding-top:.56251rem}.title{font-size:.8rem;margin-bottom:.77999rem;padding-top:.22001rem}.title-document{margin-bottom:.89999rem;padding-top:.10001rem}.title-document,.settings a{font-size:1.25rem}.words,.characters{font-size:.8rem;margin-bottom:.77999rem;padding-top:.22001rem}.modal--dillinger.about .modal-dialog,#zen{font-size:1.25rem}#editor{font-size:1rem}}@media (min-width:768px){.form-inline .form-group{display:inline-block;margin-bottom:0;vertical-align:middle}.form-inline .form-control{display:inline-block;width:auto;vertical-align:middle}.form-inline .input-group{display:inline-table;vertical-align:middle}.form-inline .input-group .input-group-addon,.form-inline .input-group .input-group-btn,.form-inline .input-group .form-control{width:auto}.form-inline .input-group>.form-control{width:100%}.form-inline .control-label{margin-bottom:0;vertical-align:middle}.form-inline .radio,.form-inline .checkbox{display:inline-block;margin-top:0;margin-bottom:0;vertical-align:middle}.form-inline .radio label,.form-inline .checkbox label{padding-left:0}.form-inline .radio input[type="radio"],.form-inline .checkbox input[type="checkbox"]{position:relative;margin-left:0}.form-inline .has-feedback .form-control-feedback{top:0}.form-horizontal .control-label{text-align:right;margin-bottom:0;padding-top:7px}.form-horizontal .form-group-lg .control-label{padding-top:14.3px}.form-horizontal .form-group-sm .control-label{padding-top:6px}.modal-dialog{width:600px;margin:30px auto}.modal-content{box-shadow:0 5px 15px rgba(0,0,0,.5)}.modal-sm{width:300px}}@media (min-width:992px){.modal-lg{width:900px}}@media screen and (max-width:1200px){#_default_{max-width:30%}#_default_ ._default_{font-size:.825rem;line-height:.875rem;padding:12px 12px 6px 24px;text-align:justify}}@media screen and (max-width:1100px){#_default_{max-width:27%}#_default_ ._default_{font-size:.8rem;line-height:.85rem;padding:12px 6px 6px 24px;text-align:justify}}@media screen and (max-width:1000px){#_default_{max-width:24%}#_default_ ._default_{font-size:.775rem;line-height:.8rem;padding:12px 6px 6px 24px;text-align:justify}}@media screen and (max-width:900px){#_default_{max-width:30%}}@media screen and (max-width:767px){.table-responsive{width:100%;margin-bottom:15px;overflow-y:hidden;overflow-x:auto;-ms-overflow-style:-ms-autohiding-scrollbar;border:1px solid #ddd;-webkit-overflow-scrolling:touch}.table-responsive>.table{margin-bottom:0}.table-responsive>.table>thead>tr>th,.table-responsive>.table>thead>tr>td,.table-responsive>.table>tbody>tr>th,.table-responsive>.table>tbody>tr>td,.table-responsive>.table>tfoot>tr>th,.table-responsive>.table>tfoot>tr>td{white-space:nowrap}.table-responsive>.table-bordered{border:0}.table-responsive>.table-bordered>thead>tr>th:first-child,.table-responsive>.table-bordered>thead>tr>td:first-child,.table-responsive>.table-bordered>tbody>tr>th:first-child,.table-responsive>.table-bordered>tbody>tr>td:first-child,.table-responsive>.table-bordered>tfoot>tr>th:first-child,.table-responsive>.table-bordered>tfoot>tr>td:first-child{border-left:0}.table-responsive>.table-bordered>thead>tr>th:last-child,.table-responsive>.table-bordered>thead>tr>td:last-child,.table-responsive>.table-bordered>tbody>tr>th:last-child,.table-responsive>.table-bordered>tbody>tr>td:last-child,.table-responsive>.table-bordered>tfoot>tr>th:last-child,.table-responsive>.table-bordered>tfoot>tr>td:last-child{border-right:0}.table-responsive>.table-bordered>tbody>tr:last-child>th,.table-responsive>.table-bordered>tbody>tr:last-child>td,.table-responsive>.table-bordered>tfoot>tr:last-child>th,.table-responsive>.table-bordered>tfoot>tr:last-child>td{border-bottom:0}}@media screen and (max-width:720px){#_default_{max-width:60%}#_default_ ._default_{font-size:.75rem;line-height:1rem;padding:12px 24px}}@media screen and (max-width:620px){#_default_{max-width:50%}#_default_ ._default_{font-size:.66rem;letter-spacing:1px;line-height:1rem;padding:10px 24px}}@media screen and (max-width:520px){#_default_ ._default_{font-size:.4rem;line-height:.875rem;padding:6px 12px 6px 24px;text-align:justify}}@media screen and (max-width:460px){#_default_{display:none}}@media screen and (max-width:46.1875em){.editor-header{display:none}.editor-header--first{display:block;width:100%}}</style></head><body id="preview">
+<h1><a id="The_apalikegerman_package_an_author_year_style_for_BibTeX_0"></a>The <code>apalike-german</code> package: an author year style for BibTeX</h1>
+<h2><a id="Objective_2"></a>Objective</h2>
+<p>I made <code>apalike-german.bst</code> because I was forced to use plain old BibTeX in conjunction with <code>apalike.bst</code> but I needed German localization. It is simply a copy of the original file. My editions concern the following:</p>
+<ul>
+<li>Inserted words were translated to German.</li>
+<li>Puryifing of label numbers is removed. Thus, dots in the label year shall not be removed.</li>
+<li>Capitalization of title words will remain.</li>
+</ul>
+<h2><a id="Installing_10"></a>Installing</h2>
+<p>Create the directory <code>{TEXMF}/bibtex/bst/apalike-german</code>, move <code>apalike-german.bst</code> there and update the file name database.</p>
+<h2><a id="Usage_14"></a>Usage</h2>
+<p>First let me point out that if you are not forced to use plain BibTeX it is much better to rely on the <code>biblatex</code> package, preferably in conjunction with Biber. Thus, you gain much more flexibility for your references. If you took this into account, call <code>\bibliographystyle{apalike-german}</code> as usual after <code>\begin{document}</code>.</p>
+<p>In case a numerical year lacks you can use an expression like “n.d.”:</p>
+<pre><code>@MISC{undated-item,
+ ...
+ year = {o.J.},
+}
+</code></pre>
+<p>The dots are kept, but only four digits are allowed!</p>
+<h2><a id="Help_27"></a>Help</h2>
+<p>Best is to use the <a href="https://github.com/CarlOrff/apalike-german">GitHub tracker</a>.</p>
+<p>Or visit me on <a href="https://ingram-braun.net/public/programming/tex/apalike-german-bst-bibtex-bibliography-author-date-style#ib_campaign=$apalike-german&amp;ib_medium=repository&amp;ib_source=readme">my website and use the comment function</a> there.</p>
+<h2><a id="History_33"></a>History</h2>
+<ul>
+<li>11-sep-2016: Original version by Ingram Braun</li>
+<li>17-mar-2018: Macro <code>mar</code> bug fixed (<a href="https://github.com/CarlOrff/apalike-german/issues/1">Issue #1</a>).</li>
+</ul>
+<h2><a id="Copyright_38"></a>Copyright</h2>
+<p>© 2016–2018 by <a href="https://ingram-braun.net/#ib_campaign=$apalike-german&amp;ib_medium=repository&amp;ib_source=readme">Ingram Braun</a>, 1986–2010 by Oren Patashnik.</p>
+<h2><a id="License_42"></a>License</h2>
+<p><a href="https://www.latex-project.org/lppl.txt">The LaTeX Project Public License 1.3c or later</a></p>
+
+</body></html> \ No newline at end of file
diff --git a/biblio/bibtex/contrib/apalike-german/README.md b/biblio/bibtex/contrib/apalike-german/README.md
new file mode 100644
index 0000000000..f3672bdbd5
--- /dev/null
+++ b/biblio/bibtex/contrib/apalike-german/README.md
@@ -0,0 +1,45 @@
+# The `apalike-german` package: an author year style for BibTeX
+
+## Objective
+
+I made `apalike-german.bst` because I was forced to use plain old BibTeX in conjunction with `apalike.bst` but I needed German localization. It is simply a copy of the original file. My editions concern the following:
+
+ - Inserted words were translated to German.
+ - Puryifing of label numbers is removed. Thus, dots in the label year shall not be removed.
+ - Capitalization of title words will remain.
+
+## Installing
+
+Create the directory `{TEXMF}/bibtex/bst/apalike-german`, move `apalike-german.bst` there and update the file name database.
+
+## Usage
+
+First let me point out that if you are not forced to use plain BibTeX it is much better to rely on the `biblatex` package, preferably in conjunction with Biber. Thus, you gain much more flexibility for your references. If you took this into account, call `\bibliographystyle{apalike-german}` as usual after `\begin{document}`.
+
+In case a numerical year lacks you can use an expression like "n.d.":
+
+ @MISC{undated-item,
+ ...
+ year = {o.J.},
+ }
+
+The dots are kept, but only four digits are allowed!
+
+## Help
+
+Best is to use the [GitHub tracker](https://github.com/CarlOrff/apalike-german).
+
+Or visit me on [my website and use the comment function](https://ingram-braun.net/public/programming/tex/apalike-german-bst-bibtex-bibliography-author-date-style#ib_campaign=$apalike-german&ib_medium=repository&ib_source=readme) there.
+
+## History
+
+ - 11-sep-2016: Original version by Ingram Braun
+ - 17-mar-2018: Macro `mar` bug fixed ([Issue #1](https://github.com/CarlOrff/apalike-german/issues/1)).
+
+## Copyright
+
+© 2016–2018 by [Ingram Braun](https://ingram-braun.net/#ib_campaign=$apalike-german&ib_medium=repository&ib_source=readme), 1986–2010 by Oren Patashnik.
+
+## License
+
+[The LaTeX Project Public License 1.3c or later](http://www.latex-project.org/lppl.txt) \ No newline at end of file
diff --git a/biblio/bibtex/contrib/apalike-german/apalike-german.bst b/biblio/bibtex/contrib/apalike-german/apalike-german.bst
new file mode 100644
index 0000000000..e8df34904d
--- /dev/null
+++ b/biblio/bibtex/contrib/apalike-german/apalike-german.bst
@@ -0,0 +1,1115 @@
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%
+% This is a copy of apalike.bst 0.99a with German localization.
+%
+% History:
+% 11-sep-2016: Original version by Ingram Braun (https://ingram-braun.net/).
+% 17-mar-2018: Macro "mar" bug fixed.
+%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+% BibTeX `apalike' bibliography style (version 0.99a, 8-Dec-10), adapted
+% the `alpha' style, version 0.99a; for BibTeX version 0.99a.
+%
+% Copyright (C) 1988, 2010 Oren Patashnik.
+% Unlimited copying and redistribution of this file are permitted as long as
+% it is unmodified. Modifications (and redistribution of modified versions)
+% are also permitted, but only if the resulting file is renamed.
+%
+% Differences between this style and `alpha' are generally heralded by a `%'.
+% The file btxbst.doc has the documentation for alpha.bst.
+%
+% This style should be used with the `apalike' LaTeX style (apalike.sty).
+% \cite's come out like "(Jones, 1986)" in the text but there are no labels
+% in the bibliography, and something like "(1986)" comes out immediately
+% after the author. Author (and editor) names appear as last name, comma,
+% initials. A `year' field is required for every entry, and so is either
+% an author (or in some cases, an editor) field or a key field.
+%
+% Editorial note:
+% Many journals require a style like `apalike', but I strongly, strongly,
+% strongly recommend that you not use it if you have a choice---use something
+% like `plain' instead. Mary-Claire van Leunen (A Handbook for Scholars,
+% Knopf, 1979) argues convincingly that a style like `plain' encourages better
+% writing than one like `apalike'. Furthermore the strongest arguments for
+% using an author-date style like `apalike'---that it's "the most practical"
+% (The Chicago Manual of Style, University of Chicago Press, thirteenth
+% edition, 1982, pages 400--401)---fall flat on their face with the new
+% computer-typesetting technology. For instance page 401 anachronistically
+% states "The chief disadvantage of [a style like `plain'] is that additions
+% or deletions cannot be made after the manuscript is typed without changing
+% numbers in both text references and list." LaTeX sidesteps the disadvantage.
+%
+% History:
+% 15-sep-86 (OP) Original version by Oren Patashnik, ideas from Susan King.
+% 10-nov-86 (OP) Truncated the sort.key$ string to the correct length
+% in bib.sort.order to eliminate error message.
+% 24-jan-88 (OP) Updated for BibTeX version 0.99a, from alpha.bst 0.99a;
+% apalike now sorts by author, then year, then title;
+% THIS `apalike' VERSION DOES NOT WORK WITH BIBTEX 0.98i.
+% 8-dec-10 (OP) Still version 0.99a, as the code itself was unchanged;
+% this release clarified the license.
+
+ENTRY
+ { address
+ author
+ booktitle
+ chapter
+ edition
+ editor
+ howpublished
+ institution
+ journal
+ key
+% month not used in apalike
+ note
+ number
+ organization
+ pages
+ publisher
+ school
+ series
+ title
+ type
+ volume
+ year
+ }
+ {}
+ { label extra.label sort.label }
+
+INTEGERS { output.state before.all mid.sentence after.sentence after.block }
+
+FUNCTION {init.state.consts}
+{ #0 'before.all :=
+ #1 'mid.sentence :=
+ #2 'after.sentence :=
+ #3 'after.block :=
+}
+
+STRINGS { s t }
+
+FUNCTION {output.nonnull}
+{ 's :=
+ output.state mid.sentence =
+ { ", " * write$ }
+ { output.state after.block =
+ { add.period$ write$
+ newline$
+ "\newblock " write$
+ }
+ { output.state before.all =
+ 'write$
+ { add.period$ " " * write$ }
+ if$
+ }
+ if$
+ mid.sentence 'output.state :=
+ }
+ if$
+ s
+}
+
+FUNCTION {output}
+{ duplicate$ empty$
+ 'pop$
+ 'output.nonnull
+ if$
+}
+
+FUNCTION {output.check}
+{ 't :=
+ duplicate$ empty$
+ { pop$ "empty " t * " in " * cite$ * warning$ }
+ 'output.nonnull
+ if$
+}
+
+% apalike needs this function because
+% the year has special punctuation;
+% apalike ignores the month
+FUNCTION {output.year.check}
+{ year empty$
+ { "empty year in " cite$ * warning$ }
+ { write$
+ " (" year * extra.label * ")" *
+ mid.sentence 'output.state :=
+ }
+ if$
+}
+
+FUNCTION {output.bibitem}
+{ newline$
+ "\bibitem[" write$
+ label write$
+ "]{" write$
+ cite$ write$
+ "}" write$
+ newline$
+ ""
+ before.all 'output.state :=
+}
+
+FUNCTION {fin.entry}
+{ add.period$
+ write$
+ newline$
+}
+
+FUNCTION {new.block}
+{ output.state before.all =
+ 'skip$
+ { after.block 'output.state := }
+ if$
+}
+
+FUNCTION {new.sentence}
+{ output.state after.block =
+ 'skip$
+ { output.state before.all =
+ 'skip$
+ { after.sentence 'output.state := }
+ if$
+ }
+ if$
+}
+
+FUNCTION {not}
+{ { #0 }
+ { #1 }
+ if$
+}
+
+FUNCTION {and}
+{ 'skip$
+ { pop$ #0 }
+ if$
+}
+
+FUNCTION {or}
+{ { pop$ #1 }
+ 'skip$
+ if$
+}
+
+FUNCTION {new.block.checkb}
+{ empty$
+ swap$ empty$
+ and
+ 'skip$
+ 'new.block
+ if$
+}
+
+FUNCTION {field.or.null}
+{ duplicate$ empty$
+ { pop$ "" }
+ 'skip$
+ if$
+}
+
+FUNCTION {emphasize}
+{ duplicate$ empty$
+ { pop$ "" }
+ { "{\em " swap$ * "}" * }
+ if$
+}
+
+INTEGERS { nameptr namesleft numnames }
+
+FUNCTION {format.names}
+{ 's :=
+ #1 'nameptr :=
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ { s nameptr "{vv~}{ll}{, jj}{, f.}" format.name$ 't := % last name first
+ nameptr #1 >
+ { namesleft #1 >
+ { ", " * t * }
+ { numnames #2 >
+ { "," * }
+ 'skip$
+ if$
+ t "others" =
+ { " u~a." * }
+ { " und " * t * }
+ if$
+ }
+ if$
+ }
+ 't
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+}
+
+FUNCTION {format.authors}
+{ author empty$
+ { "" }
+ { author format.names }
+ if$
+}
+
+FUNCTION {format.key} % this function is just for apalike
+{ empty$
+ { key field.or.null }
+ { "" }
+ if$
+}
+
+FUNCTION {format.editors}
+{ editor empty$
+ { "" }
+ { editor format.names
+ editor num.names$ #1 >
+ { ", Herausgeber" * }
+ { ", Herausgeber" * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.title}
+{ title empty$
+ { "" }
+ { title }
+ if$
+}
+
+FUNCTION {n.dashify}
+{ 't :=
+ ""
+ { t empty$ not }
+ { t #1 #1 substring$ "-" =
+ { t #1 #2 substring$ "--" = not
+ { "--" *
+ t #2 global.max$ substring$ 't :=
+ }
+ { { t #1 #1 substring$ "-" = }
+ { "-" *
+ t #2 global.max$ substring$ 't :=
+ }
+ while$
+ }
+ if$
+ }
+ { t #1 #1 substring$ *
+ t #2 global.max$ substring$ 't :=
+ }
+ if$
+ }
+ while$
+}
+
+FUNCTION {format.btitle}
+{ title emphasize
+}
+
+FUNCTION {tie.or.space.connect}
+{ duplicate$ text.length$ #3 <
+ { "~" }
+ { " " }
+ if$
+ swap$ * *
+}
+
+FUNCTION {either.or.check}
+{ empty$
+ 'pop$
+ { "can't use both " swap$ * " fields in " * cite$ * warning$ }
+ if$
+}
+
+FUNCTION {format.bvolume}
+{ volume empty$
+ { "" }
+ { "Band" volume tie.or.space.connect
+ series empty$
+ 'skip$
+ { " in " * series emphasize * }
+ if$
+ "volume and number" number either.or.check
+ }
+ if$
+}
+
+FUNCTION {format.number.series}
+{ volume empty$
+ { number empty$
+ { series field.or.null }
+ { output.state mid.sentence =
+ { "Nummer" }
+ { "Nummer" }
+ if$
+ number tie.or.space.connect
+ series empty$
+ { "there's a number but no series in " cite$ * warning$ }
+ { " in " * series * }
+ if$
+ }
+ if$
+ }
+ { "" }
+ if$
+}
+
+FUNCTION {format.edition}
+{ edition empty$
+ { "" }
+ { output.state mid.sentence =
+ { edition "l" change.case$ ". Auf\kern0pt lage" * }
+ { edition "t" change.case$ ". Auf\kern0pt lage" * }
+ if$
+ }
+ if$
+}
+
+INTEGERS { multiresult }
+
+FUNCTION {multi.page.check}
+{ 't :=
+ #0 'multiresult :=
+ { multiresult not
+ t empty$ not
+ and
+ }
+ { t #1 #1 substring$
+ duplicate$ "-" =
+ swap$ duplicate$ "," =
+ swap$ "+" =
+ or or
+ { #1 'multiresult := }
+ { t #2 global.max$ substring$ 't := }
+ if$
+ }
+ while$
+ multiresult
+}
+
+FUNCTION {format.pages}
+{ pages empty$
+ { "" }
+ { pages multi.page.check
+ { "Seiten" pages n.dashify tie.or.space.connect }
+ { "Seite" pages tie.or.space.connect }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.vol.num.pages}
+{ volume field.or.null
+ number empty$
+ 'skip$
+ { "(" number * ")" * *
+ volume empty$
+ { "there's a number but no volume in " cite$ * warning$ }
+ 'skip$
+ if$
+ }
+ if$
+ pages empty$
+ 'skip$
+ { duplicate$ empty$
+ { pop$ format.pages }
+ { ":" * pages n.dashify * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.chapter.pages}
+{ chapter empty$
+ 'format.pages
+ { type empty$
+ { "Kapitel" }
+ { type "l" change.case$ }
+ if$
+ chapter tie.or.space.connect
+ pages empty$
+ 'skip$
+ { ", " * format.pages * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.in.ed.booktitle}
+{ booktitle empty$
+ { "" }
+ { editor empty$
+ { "In " booktitle emphasize * }
+ { "In " format.editors * ", " * booktitle emphasize * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.thesis.type}
+{ type empty$
+ 'skip$
+ { pop$
+ type "t" change.case$
+ }
+ if$
+}
+
+FUNCTION {format.tr.number}
+{ type empty$
+ { "Technischer Bericht" }
+ 'type
+ if$
+ number empty$
+ { "t" change.case$ }
+ { number tie.or.space.connect }
+ if$
+}
+
+FUNCTION {format.article.crossref}
+{ "In" % this is for apalike
+ " \cite{" * crossref * "}" *
+}
+
+FUNCTION {format.book.crossref}
+{ volume empty$
+ { "empty volume in " cite$ * "'s crossref of " * crossref * warning$
+ "In "
+ }
+ { "Band" volume tie.or.space.connect
+ " von " *
+ }
+ if$
+ "\cite{" * crossref * "}" * % this is for apalike
+}
+
+FUNCTION {format.incoll.inproc.crossref}
+{ "In" % this is for apalike
+ " \cite{" * crossref * "}" *
+}
+
+FUNCTION {article}
+{ output.bibitem
+ format.authors "author" output.check
+ author format.key output % special for
+ output.year.check % apalike
+ new.block
+ format.title "title" output.check
+ new.block
+ crossref missing$
+ { journal emphasize "journal" output.check
+ format.vol.num.pages output
+ }
+ { format.article.crossref output.nonnull
+ format.pages output
+ }
+ if$
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {book}
+{ output.bibitem
+ author empty$
+ { format.editors "author and editor" output.check
+ editor format.key output
+ }
+ { format.authors output.nonnull
+ crossref missing$
+ { "author and editor" editor either.or.check }
+ 'skip$
+ if$
+ }
+ if$
+ output.year.check % special for apalike
+ new.block
+ format.btitle "title" output.check
+ crossref missing$
+ { format.bvolume output
+ new.block
+ format.number.series output
+ new.sentence
+ publisher "publisher" output.check
+ address output
+ }
+ { new.block
+ format.book.crossref output.nonnull
+ }
+ if$
+ format.edition output
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {booklet}
+{ output.bibitem
+ format.authors output
+ author format.key output % special for
+ output.year.check % apalike
+ new.block
+ format.title "title" output.check
+ new.block
+ howpublished output
+ address output
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {inbook}
+{ output.bibitem
+ author empty$
+ { format.editors "author and editor" output.check
+ editor format.key output
+ }
+ { format.authors output.nonnull
+ crossref missing$
+ { "author and editor" editor either.or.check }
+ 'skip$
+ if$
+ }
+ if$
+ output.year.check % special for apalike
+ new.block
+ format.btitle "title" output.check
+ crossref missing$
+ { format.bvolume output
+ format.chapter.pages "chapter and pages" output.check
+ new.block
+ format.number.series output
+ new.sentence
+ publisher "publisher" output.check
+ address output
+ }
+ { format.chapter.pages "chapter and pages" output.check
+ new.block
+ format.book.crossref output.nonnull
+ }
+ if$
+ format.edition output
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {incollection}
+{ output.bibitem
+ format.authors "author" output.check
+ author format.key output % special for
+ output.year.check % apalike
+ new.block
+ format.title "title" output.check
+ new.block
+ crossref missing$
+ { format.in.ed.booktitle "booktitle" output.check
+ format.bvolume output
+ format.number.series output
+ format.chapter.pages output
+ new.sentence
+ publisher "publisher" output.check
+ address output
+ format.edition output
+ }
+ { format.incoll.inproc.crossref output.nonnull
+ format.chapter.pages output
+ }
+ if$
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {inproceedings}
+{ output.bibitem
+ format.authors "author" output.check
+ author format.key output % special for
+ output.year.check % apalike
+ new.block
+ format.title "title" output.check
+ new.block
+ crossref missing$
+ { format.in.ed.booktitle "booktitle" output.check
+ format.bvolume output
+ format.number.series output
+ format.pages output
+ address output % for apalike
+ new.sentence % there's no year
+ organization output % here so things
+ publisher output % are simpler
+ }
+ { format.incoll.inproc.crossref output.nonnull
+ format.pages output
+ }
+ if$
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {conference} { inproceedings }
+
+FUNCTION {manual}
+{ output.bibitem
+ format.authors output
+ author format.key output % special for
+ output.year.check % apalike
+ new.block
+ format.btitle "title" output.check
+ organization address new.block.checkb
+ organization output
+ address output
+ format.edition output
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {mastersthesis}
+{ output.bibitem
+ format.authors "author" output.check
+ author format.key output % special for
+ output.year.check % apalike
+ new.block
+ format.title "title" output.check
+ new.block
+ "Master's thesis" format.thesis.type output.nonnull
+ school "school" output.check
+ address output
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {misc}
+{ output.bibitem
+ format.authors output
+ author format.key output % special for
+ output.year.check % apalike
+ new.block
+ format.title output
+ new.block
+ howpublished output
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {phdthesis}
+{ output.bibitem
+ format.authors "author" output.check
+ author format.key output % special for
+ output.year.check % apalike
+ new.block
+ format.btitle "title" output.check
+ new.block
+ "Dissertation" format.thesis.type output.nonnull
+ school "school" output.check
+ address output
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {proceedings}
+{ output.bibitem
+ format.editors output
+ editor format.key output % special for
+ output.year.check % apalike
+ new.block
+ format.btitle "title" output.check
+ format.bvolume output
+ format.number.series output
+ address output % for apalike
+ new.sentence % we always output
+ organization output % a nonempty organization
+ publisher output % here
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {techreport}
+{ output.bibitem
+ format.authors "author" output.check
+ author format.key output % special for
+ output.year.check % apalike
+ new.block
+ format.title "title" output.check
+ new.block
+ format.tr.number output.nonnull
+ institution "institution" output.check
+ address output
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {unpublished}
+{ output.bibitem
+ format.authors "author" output.check
+ author format.key output % special for
+ output.year.check % apalike
+ new.block
+ format.title "title" output.check
+ new.block
+ note "note" output.check
+ fin.entry
+}
+
+FUNCTION {default.type} { misc }
+
+MACRO {jan} {"Januar"}
+
+MACRO {feb} {"Februar"}
+
+MACRO {mar} {"M\^^b{a}rz"}
+
+MACRO {apr} {"April"}
+
+MACRO {may} {"Mai"}
+
+MACRO {jun} {"Juni"}
+
+MACRO {jul} {"Juli"}
+
+MACRO {aug} {"August"}
+
+MACRO {sep} {"September"}
+
+MACRO {oct} {"Oktober"}
+
+MACRO {nov} {"November"}
+
+MACRO {dec} {"Dezember"}
+
+MACRO {acmcs} {"ACM Computing Surveys"}
+
+MACRO {acta} {"Acta Informatica"}
+
+MACRO {cacm} {"Communications of the ACM"}
+
+MACRO {ibmjrd} {"IBM Journal of Research and Development"}
+
+MACRO {ibmsj} {"IBM Systems Journal"}
+
+MACRO {ieeese} {"IEEE Transactions on Software Engineering"}
+
+MACRO {ieeetc} {"IEEE Transactions on Computers"}
+
+MACRO {ieeetcad}
+ {"IEEE Transactions on Computer-Aided Design of Integrated Circuits"}
+
+MACRO {ipl} {"Information Processing Letters"}
+
+MACRO {jacm} {"Journal of the ACM"}
+
+MACRO {jcss} {"Journal of Computer and System Sciences"}
+
+MACRO {scp} {"Science of Computer Programming"}
+
+MACRO {sicomp} {"SIAM Journal on Computing"}
+
+MACRO {tocs} {"ACM Transactions on Computer Systems"}
+
+MACRO {tods} {"ACM Transactions on Database Systems"}
+
+MACRO {tog} {"ACM Transactions on Graphics"}
+
+MACRO {toms} {"ACM Transactions on Mathematical Software"}
+
+MACRO {toois} {"ACM Transactions on Office Information Systems"}
+
+MACRO {toplas} {"ACM Transactions on Programming Languages and Systems"}
+
+MACRO {tcs} {"Theoretical Computer Science"}
+
+READ
+
+FUNCTION {sortify}
+{ purify$
+ "l" change.case$
+}
+
+INTEGERS { len }
+
+FUNCTION {chop.word}
+{ 's :=
+ 'len :=
+ s #1 len substring$ =
+ { s len #1 + global.max$ substring$ }
+ 's
+ if$
+}
+
+% There are three apalike cases: one person (Jones),
+% two (Jones and de~Bruijn), and more (Jones et~al.).
+% This function is much like format.crossref.editors.
+%
+FUNCTION {format.lab.names}
+{ 's :=
+ s #1 "{vv~}{ll}" format.name$
+ s num.names$ duplicate$
+ #2 >
+ { pop$ " et~al." * }
+ { #2 <
+ 'skip$
+ { s #2 "{ff }{vv }{ll}{ jj}" format.name$ "others" =
+ { " u~a." * }
+ { " und " * s #2 "{vv~}{ll}" format.name$ * }
+ if$
+ }
+ if$
+ }
+ if$
+}
+
+FUNCTION {author.key.label}
+{ author empty$
+ { key empty$
+ { cite$ #1 #3 substring$ }
+ 'key % apalike uses the whole key
+ if$
+ }
+ { author format.lab.names }
+ if$
+}
+
+FUNCTION {author.editor.key.label}
+{ author empty$
+ { editor empty$
+ { key empty$
+ { cite$ #1 #3 substring$ }
+ 'key % apalike uses the whole key
+ if$
+ }
+ { editor format.lab.names }
+ if$
+ }
+ { author format.lab.names }
+ if$
+}
+
+FUNCTION {editor.key.label}
+{ editor empty$
+ { key empty$
+ { cite$ #1 #3 substring$ }
+ 'key % apalike uses the whole key, no organization
+ if$
+ }
+ { editor format.lab.names }
+ if$
+}
+
+FUNCTION {calc.label}
+{ type$ "book" =
+ type$ "inbook" =
+ or
+ 'author.editor.key.label
+ { type$ "proceedings" =
+ 'editor.key.label % apalike ignores organization
+ 'author.key.label % for labeling and sorting
+ if$
+ }
+ if$
+ ", " % these three lines are
+ * % for apalike, which
+ year field.or.null #-1 #4 substring$ % uses all four digits
+ *
+ 'label :=
+}
+
+FUNCTION {sort.format.names}
+{ 's :=
+ #1 'nameptr :=
+ ""
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ { nameptr #1 >
+ { " " * }
+ 'skip$
+ if$ % apalike uses initials
+ s nameptr "{vv{ } }{ll{ }}{ f{ }}{ jj{ }}" format.name$ 't := % <= here
+ nameptr numnames = t "others" = and
+ { "u. a." * }
+ { t sortify * }
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+}
+
+FUNCTION {sort.format.title}
+{ 't :=
+ "A " #2
+ "An " #3
+ "The " #4 t chop.word
+ chop.word
+ chop.word
+ sortify
+ #1 global.max$ substring$
+}
+
+FUNCTION {author.sort}
+{ author empty$
+ { key empty$
+ { "to sort, need author or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { author sort.format.names }
+ if$
+}
+
+FUNCTION {author.editor.sort}
+{ author empty$
+ { editor empty$
+ { key empty$
+ { "to sort, need author, editor, or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { editor sort.format.names }
+ if$
+ }
+ { author sort.format.names }
+ if$
+}
+
+FUNCTION {editor.sort}
+{ editor empty$
+ { key empty$
+ { "to sort, need editor or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { editor sort.format.names }
+ if$
+}
+
+% apalike uses two sorting passes; the first one sets the
+% labels so that the `a's, `b's, etc. can be computed;
+% the second pass puts the references in "correct" order.
+% The presort function is for the first pass. It computes
+% label, sort.label, and title, and then concatenates.
+FUNCTION {presort}
+{ calc.label
+ label sortify
+ " "
+ *
+ type$ "book" =
+ type$ "inbook" =
+ or
+ 'author.editor.sort
+ { type$ "proceedings" =
+ 'editor.sort
+ 'author.sort
+ if$
+ }
+ if$
+ #1 entry.max$ substring$ % for
+ 'sort.label := % apalike
+ sort.label % style
+ *
+ " "
+ *
+ title field.or.null
+ sort.format.title
+ *
+ #1 entry.max$ substring$
+ 'sort.key$ :=
+}
+
+ITERATE {presort}
+
+SORT % by label, sort.label, title---for final label calculation
+
+STRINGS { last.label next.extra } % apalike labels are only for the text;
+
+INTEGERS { last.extra.num } % there are none in the bibliography
+
+FUNCTION {initialize.extra.label.stuff} % and hence there is no `longest.label'
+{ #0 int.to.chr$ 'last.label :=
+ "" 'next.extra :=
+ #0 'last.extra.num :=
+}
+
+FUNCTION {forward.pass}
+{ last.label label =
+ { last.extra.num #1 + 'last.extra.num :=
+ last.extra.num int.to.chr$ 'extra.label :=
+ }
+ { "a" chr.to.int$ 'last.extra.num :=
+ "" 'extra.label :=
+ label 'last.label :=
+ }
+ if$
+}
+
+FUNCTION {reverse.pass}
+{ next.extra "b" =
+ { "a" 'extra.label := }
+ 'skip$
+ if$
+ label extra.label * 'label :=
+ extra.label 'next.extra :=
+}
+
+EXECUTE {initialize.extra.label.stuff}
+
+ITERATE {forward.pass}
+
+REVERSE {reverse.pass}
+
+% Now that the label is right we sort for real,
+% on sort.label then year then title. This is
+% for the second sorting pass.
+FUNCTION {bib.sort.order}
+{ sort.label
+ " "
+ *
+ year field.or.null sortify
+ *
+ " "
+ *
+ title field.or.null
+ sort.format.title
+ *
+ #1 entry.max$ substring$
+ 'sort.key$ :=
+}
+
+ITERATE {bib.sort.order}
+
+SORT % by sort.label, year, title---giving final bibliography order
+
+FUNCTION {begin.bib}
+{ preamble$ empty$ % no \etalchar in apalike
+ 'skip$
+ { preamble$ write$ newline$ }
+ if$
+ "\begin{thebibliography}{}" write$ newline$ % no labels in apalike
+}
+
+EXECUTE {begin.bib}
+
+EXECUTE {init.state.consts}
+
+ITERATE {call.type$}
+
+FUNCTION {end.bib}
+{ newline$
+ "\end{thebibliography}" write$ newline$
+}
+
+EXECUTE {end.bib}
diff --git a/biblio/bibtex/contrib/apalike2/apalike2.bst b/biblio/bibtex/contrib/apalike2/apalike2.bst
new file mode 100644
index 0000000000..8109d80d24
--- /dev/null
+++ b/biblio/bibtex/contrib/apalike2/apalike2.bst
@@ -0,0 +1,1273 @@
+% BibTeX `apalike' bibliography style (24-Jan-88 version)
+% Adapted from the `alpha' style, version 0.99a; for BibTeX version 0.99a.
+% Copyright (C) 1988, all rights reserved.
+% Copying of this file is allowed, provided that if you make any changes at all
+% you name it something other than `apalike.bst'.
+% This restriction helps ensure that all copies are identical.
+% Differences between this style and `alpha' are generally heralded by a `%'.
+% The file btxbst.doc has the documentation for alpha.bst.
+%
+% This style should be used with the `apalike' LaTeX style (apalike.sty).
+% \cite's come out like "(Jones, 1986)" in the text but there are no labels
+% in the bibliography, and something like "(1986)" comes out immediately
+% after the author. Author (and editor) names appear as last name, comma,
+% initials. A `year' field is required for every entry, and so is either
+% an author (or in some cases, an editor) field or a key field.
+%
+% Editorial note:
+% Many journals require a style like `apalike', but I strongly, strongly,
+% strongly recommend that you not use it if you have a choice---use something
+% like `plain' instead. Mary-Claire van Leunen (A Handbook for Scholars,
+% Knopf, 1979) argues convincingly that a style like `plain' encourages better
+% writing than one like `apalike'. Furthermore the strongest arguments for
+% using an author-date style like `apalike'---that it's "the most practical"
+% (The Chicago Manual of Style, University of Chicago Press, thirteenth
+% edition, 1982, pages 400--401)---fall flat on their face with the new
+% computer-typesetting technology. For instance page 401 anachronistically
+% states "The chief disadvantage of [a style like `plain'] is that additions
+% or deletions cannot be made after the manuscript is typed without changing
+% numbers in both text references and list." LaTeX sidesteps the disadvantage.
+%
+% History:
+% 15-sep-86 (SK,OP) Original version, by Susan King and Oren Patashnik.
+% 10-nov-86 (OP) Truncated the sort.key$ string to the correct length
+% in bib.sort.order to eliminate error message.
+% 24-jan-88 (OP) Updated for BibTeX version 0.99a, from alpha.bst 0.99a;
+% apalike now sorts by author, then year, then title;
+% THIS `apalike' VERSION DOES NOT WORK WITH BIBTEX 0.98i.
+% Local modifications 10/89 -- Brian Reiser
+
+ENTRY
+ { address
+ author
+ booktitle
+ chapter
+ edition
+ editor
+ howpublished
+ institution
+ journal
+ key
+% month not used in apalike
+ note
+ number
+ organization
+ pages
+ publisher
+ school
+ series
+ title
+ type
+ volume
+ year
+ }
+ {}
+ { label extra.label sort.label }
+
+INTEGERS { output.state before.all mid.sentence after.sentence after.block }
+
+FUNCTION {init.state.consts}
+{ #0 'before.all :=
+ #1 'mid.sentence :=
+ #2 'after.sentence :=
+ #3 'after.block :=
+}
+
+STRINGS { s t }
+
+FUNCTION {output.nonnull}
+{ 's :=
+ output.state mid.sentence =
+ { ", " * write$ }
+ { output.state after.block =
+ { add.period$ write$
+ newline$
+ "\newblock " write$
+ }
+ { output.state before.all =
+ 'write$
+ { add.period$ " " * write$ }
+ if$
+ }
+ if$
+ mid.sentence 'output.state :=
+ }
+ if$
+ s
+}
+
+FUNCTION {eho.special.output.nonnull}
+{ 's :=
+ output.state mid.sentence =
+ { " " * write$ }
+ { output.state after.block =
+ { % add.period$ write$
+ ": " write$
+ newline$
+ "\newblock " write$
+ }
+ { output.state before.all =
+ 'write$
+ { % add.period$ " " * write$
+ ": " * write$
+ }
+ if$
+ }
+ if$
+ mid.sentence 'output.state :=
+ }
+ if$
+ s
+}
+
+FUNCTION {eho.special.output}
+{ duplicate$ empty$
+ 'pop$
+ 'eho.special.output.nonnull
+ if$
+}
+
+%% Added by Eric Ho <eho@word> on Wed Jan 10 20:13:56 1990
+%% A special patch for output.nonnull in book environment.
+
+FUNCTION {eho.output.nonnull}
+{ 's :=
+ output.state mid.sentence =
+ { ": " * write$ }
+ { output.state after.block =
+ { add.period$ write$
+ newline$
+ "\newblock " write$
+ }
+ { output.state before.all =
+ 'write$
+ { add.period$ " " * write$ }
+ if$
+ }
+ if$
+ mid.sentence 'output.state :=
+ }
+ if$
+ s
+}
+
+FUNCTION {output}
+{ duplicate$ empty$
+ 'pop$
+ 'output.nonnull
+ if$
+}
+
+%% Added by Eric Ho <eho@word> on Wed Jan 10 20:13:56 1990
+%% A special patch for output in book environment.
+
+FUNCTION {eho.output}
+{ duplicate$ empty$
+ 'pop$
+ 'eho.output.nonnull
+ if$
+}
+
+FUNCTION {output.check}
+{ 't :=
+ duplicate$ empty$
+ { pop$ "empty " t * " in " * cite$ * warning$ }
+ 'output.nonnull
+ if$
+}
+
+%% Added by Eric Ho <eho@word> on Wed Jan 10 20:13:56 1990
+%% A special patch for output.check in book environment.
+
+FUNCTION {eho.output.check}
+{ 't :=
+ duplicate$ empty$
+ { pop$ "empty " t * " in " * cite$ * warning$ }
+ 'eho.output.nonnull
+ if$
+}
+
+% apalike needs this function because
+% the year has special punctuation;
+% apalike ignores the month
+FUNCTION {output.year.check}
+{ year empty$
+ { "empty year in " cite$ * warning$ }
+ { write$
+ " (" year * extra.label * ")" *
+ mid.sentence 'output.state :=
+ }
+ if$
+}
+
+FUNCTION {output.bibitem}
+{ newline$
+ "\bibitem[" write$
+ label write$
+ "]{" write$
+ cite$ write$
+ "}" write$
+ newline$
+ ""
+ before.all 'output.state :=
+}
+
+FUNCTION {fin.entry}
+{ add.period$
+ write$
+ newline$
+}
+
+FUNCTION {new.block}
+{ output.state before.all =
+ 'skip$
+ { after.block 'output.state := }
+ if$
+}
+
+FUNCTION {new.sentence}
+{ output.state after.block =
+ 'skip$
+ { output.state before.all =
+ 'skip$
+ { after.sentence 'output.state := }
+ if$
+ }
+ if$
+}
+
+FUNCTION {not}
+{ { #0 }
+ { #1 }
+ if$
+}
+
+FUNCTION {and}
+{ 'skip$
+ { pop$ #0 }
+ if$
+}
+
+FUNCTION {or}
+{ { pop$ #1 }
+ 'skip$
+ if$
+}
+
+FUNCTION {new.block.checkb}
+{ empty$
+ swap$ empty$
+ and
+ 'skip$
+ 'new.block
+ if$
+}
+
+FUNCTION {field.or.null}
+{ duplicate$ empty$
+ { pop$ "" }
+ 'skip$
+ if$
+}
+
+FUNCTION {emphasize}
+{ duplicate$ empty$
+ { pop$ "" }
+ { "{\em " swap$ * "}" * }
+ if$
+}
+
+INTEGERS { nameptr namesleft numnames }
+
+FUNCTION {format.names}
+{ 's :=
+ #1 'nameptr :=
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ { s nameptr "{vv~}{ll}{, jj}{, f.}" format.name$ 't := % last name first
+ nameptr #1 >
+ { namesleft #1 >
+ { ", " * t * }
+ { numnames #2 >
+ { "," * }
+ 'skip$
+ if$
+ t "others" =
+ { " et~al." * }
+ { " \& " * t * } % changed from " and " for names -- BJR 10/5/89
+ if$
+ }
+ if$
+ }
+ 't
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+}
+
+%% Added by Fri Jan 12 19:03:22 1990 on Fri Jan 12 19:03:27 1990
+%% Mainly to make sure that editors have initials before last names.
+
+FUNCTION {eho.format.names}
+{ 's :=
+ #1 'nameptr :=
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ { s nameptr "{f.} {vv~}{ll}{, jj}" format.name$ 't := %% initials first.
+ nameptr #1 >
+ { namesleft #1 >
+ { ", " * t * }
+ { numnames #2 >
+ { "," * }
+ 'skip$
+ if$
+ t "others" =
+ { " et~al." * }
+ { " \& " * t * } % changed from " and " for names -- BJR 10/5/89
+ if$
+ }
+ if$
+ }
+ 't
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+}
+
+FUNCTION {format.authors}
+{ author empty$
+ { "" }
+ { author format.names }
+ if$
+}
+
+FUNCTION {format.key} % this function is just for apalike
+{ empty$
+ { key field.or.null }
+ { "" }
+ if$
+}
+
+FUNCTION {format.editors}
+{ editor empty$
+ { "" }
+ { editor format.names
+ editor num.names$ #1 >
+ { ", Eds." * } % changed from ", editors" -- BJR 10/5/89
+ { ", Ed." * } % changed from ", editor" -- BJR 10/5/89
+ if$
+ }
+ if$
+}
+
+%% Added by Eric Ho <eho@word> Fri Jan 12 19:11:12 1990
+%% Mainly to call eho.format.names instead of format.names and
+%% to make Eds or Ed to be surrounded by pararentheses instead of preceeded by
+%% a comma.
+
+FUNCTION {eho.format.editors}
+{ editor empty$
+ { "" }
+ { editor eho.format.names
+ editor num.names$ #1 >
+ { " (Eds.)" * } % changed from ", editors" -- BJR 10/5/89
+ { " (Ed.)" * } % changed from ", editor" -- BJR 10/5/89
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.title}
+{ title empty$
+ { "" }
+ { title "t" change.case$ }
+ if$
+}
+
+FUNCTION {n.dashify}
+{ 't :=
+ ""
+ { t empty$ not }
+ { t #1 #1 substring$ "-" =
+ { t #1 #2 substring$ "--" = not
+ { "--" *
+ t #2 global.max$ substring$ 't :=
+ }
+ { { t #1 #1 substring$ "-" = }
+ { "-" *
+ t #2 global.max$ substring$ 't :=
+ }
+ while$
+ }
+ if$
+ }
+ { t #1 #1 substring$ *
+ t #2 global.max$ substring$ 't :=
+ }
+ if$
+ }
+ while$
+}
+
+FUNCTION {format.btitle}
+{ title emphasize
+}
+
+FUNCTION {tie.or.space.connect}
+{ duplicate$ text.length$ #3 <
+ { "~" }
+ { " " }
+ if$
+ swap$ * *
+}
+
+FUNCTION {either.or.check}
+{ empty$
+ 'pop$
+ { "can't use both " swap$ * " fields in " * cite$ * warning$ }
+ if$
+}
+
+FUNCTION {format.bvolume}
+{ volume empty$
+ { "" }
+ { "volume" volume tie.or.space.connect
+ series empty$
+ 'skip$
+ { " of " * series emphasize * }
+ if$
+ "volume and number" number either.or.check
+ }
+ if$
+}
+
+FUNCTION {format.number.series}
+{ volume empty$
+ { number empty$
+ { series field.or.null }
+ { output.state mid.sentence =
+ { "number" }
+ { "Number" }
+ if$
+ number tie.or.space.connect
+ series empty$
+ { "there's a number but no series in " cite$ * warning$ }
+ { " in " * series * }
+ if$
+ }
+ if$
+ }
+ { "" }
+ if$
+}
+
+FUNCTION {format.edition}
+{ edition empty$
+ { "" }
+ { output.state mid.sentence =
+ { edition "l" change.case$ " edition" * }
+ { edition "t" change.case$ " edition" * }
+ if$
+ }
+ if$
+}
+
+INTEGERS { multiresult }
+
+FUNCTION {multi.page.check}
+{ 't :=
+ #0 'multiresult :=
+ { multiresult not
+ t empty$ not
+ and
+ }
+ { t #1 #1 substring$
+ duplicate$ "-" =
+ swap$ duplicate$ "," =
+ swap$ "+" =
+ or or
+ { #1 'multiresult := }
+ { t #2 global.max$ substring$ 't := }
+ if$
+ }
+ while$
+ multiresult
+}
+
+FUNCTION {format.pages}
+{ pages empty$
+ { "" }
+ { pages multi.page.check
+% { "pages" pages n.dashify tie.or.space.connect }
+% { "page" pages tie.or.space.connect }
+ { "(pp.\" pages n.dashify tie.or.space.connect }
+ { "(pp.\" pages tie.or.space.connect }
+ if$
+ ")." *
+ }
+ if$
+}
+
+FUNCTION {format.vol.num.pages}
+{ volume field.or.null
+ number empty$
+ 'skip$
+ { "(" number * ")" * *
+ volume empty$
+ { "there's a number but no volume in " cite$ * warning$ }
+ 'skip$
+ if$
+ }
+ if$
+ pages empty$
+ 'skip$
+ { duplicate$ empty$
+ { pop$ format.pages }
+ { ", " * pages n.dashify * } % changed from ":" for vol,pgs -- BJR 10/5/89
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.chapter.pages}
+{ chapter empty$
+ 'format.pages
+ { type empty$
+ { "chapter" }
+ { type "l" change.case$ }
+ if$
+ chapter tie.or.space.connect
+ pages empty$
+ 'skip$
+ { ", " * format.pages * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.in.ed.booktitle}
+{ booktitle empty$
+ { "" }
+ { editor empty$
+ { "In " booktitle emphasize * }
+ { "In " format.editors * ", " * booktitle emphasize * }
+ if$
+ }
+ if$
+}
+
+%% Added by Eric Ho <eho@word> Fri Jan 12 19:17:37 1990
+%% Primarily to call eho.format.editors instead of format.editors.
+
+FUNCTION {eho.format.in.ed.booktitle}
+{ booktitle empty$
+ { "" }
+ { editor empty$
+ { "In " booktitle emphasize * }
+ { "In " eho.format.editors * ", " * booktitle emphasize * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.thesis.type}
+{ type empty$
+ 'skip$
+ { pop$
+ type "t" change.case$
+ }
+ if$
+}
+
+FUNCTION {format.tr.number}
+{ type empty$
+ { "Technical Report" }
+ 'type
+ if$
+ number empty$
+ { "t" change.case$ }
+ { number tie.or.space.connect }
+ if$
+}
+
+FUNCTION {format.article.crossref}
+{ "In" % this is for apalike
+ " \cite{" * crossref * "}" *
+}
+
+FUNCTION {format.book.crossref}
+{ volume empty$
+ { "empty volume in " cite$ * "'s crossref of " * crossref * warning$
+ "In "
+ }
+ { "Volume" volume tie.or.space.connect
+ " of " *
+ }
+ if$
+ "\cite{" * crossref * "}" * % this is for apalike
+}
+
+FUNCTION {format.incoll.inproc.crossref}
+{ "In" % this is for apalike
+ " \cite{" * crossref * "}" *
+}
+
+FUNCTION {article}
+{ output.bibitem
+ format.authors "author" output.check
+ author format.key output % special for
+ output.year.check % apalike
+ new.block
+ format.title "title" output.check
+ new.block
+ crossref missing$
+ { journal emphasize "journal" output.check
+ format.vol.num.pages output
+ }
+ { format.article.crossref output.nonnull
+ format.pages output
+ }
+ if$
+ new.block
+ note output
+ fin.entry
+}
+
+%% Modified by Eric Ho <eho@word> on Wed Jan 10 20:30:11 1990
+%% Making it to call eho.output.check instead of output.check and eho.output
+%% instead of output.
+
+FUNCTION {book}
+{ output.bibitem
+ author empty$
+ { format.editors "author and editor" output.check
+ editor format.key output
+ }
+ { format.authors output.nonnull
+ crossref missing$
+ { "author and editor" editor either.or.check }
+ 'skip$
+ if$
+ }
+ if$
+ output.year.check % special for apalike
+ new.block
+ format.btitle "title" output.check
+ crossref missing$
+ { format.bvolume output
+ new.block
+ format.number.series output
+ new.sentence
+% publisher "publisher" output.check
+% address output
+% switched order of publisher and address for book -- BJR 10/5/89
+ address eho.output % Using eho.output instead of output.
+ publisher "publisher" eho.output.check % Using eho.output.check
+ % instead of output.check.
+ }
+ { new.block
+ format.book.crossref output.nonnull
+ }
+ if$
+ format.edition output
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {booklet}
+{ output.bibitem
+ format.authors output
+ author format.key output % special for
+ output.year.check % apalike
+ new.block
+ format.title "title" output.check
+ new.block
+ howpublished output
+ address output
+ new.block
+ note output
+ fin.entry
+}
+
+%% Modified by Eric Ho <eho@word> on Wed Jan 10 20:27:26 1990
+%% Making it to call eho.output.check instead of output.check and eho.output
+%% instead of output.
+
+FUNCTION {inbook}
+{ output.bibitem
+ author empty$
+ { format.editors "author and editor" output.check
+ editor format.key output
+ }
+ { format.authors output.nonnull
+ crossref missing$
+ { "author and editor" editor either.or.check }
+ 'skip$
+ if$
+ }
+ if$
+ output.year.check % special for apalike
+ new.block
+ format.btitle "title" output.check
+ crossref missing$
+ { format.bvolume output
+ format.chapter.pages "chapter and pages" output.check
+ new.block
+ format.number.series output
+ new.sentence
+ publisher "publisher" eho.output.check % Using eho.output.check instead
+ % of output.check.
+ address eho.output % Using eho.output instead of output.
+ }
+ { format.chapter.pages "chapter and pages" output.check
+ new.block
+ format.book.crossref output.nonnull
+ }
+ if$
+ format.edition output
+ new.block
+ note output
+ fin.entry
+}
+
+%% Modified by Eric Ho <eho@word> on Wed Jan 10 20:27:26 1990
+%% Making it to call eho.output.check instead of output.check and eho.output
+%% instead of output. Also modified by Eric Ho <eho@word> on Fri Jan 12
+%% 19:21:59 1990 so as to call eho.format.in.ed.booktitle instead of the old
+%% format.in.ed.booktitle.
+
+FUNCTION {incollection}
+{ output.bibitem
+ format.authors "author" output.check
+ author format.key output % special for
+ output.year.check % apalike
+ new.block
+ format.title "title" output.check
+ new.block
+ crossref missing$
+ { eho.format.in.ed.booktitle "booktitle" output.check
+ % The above line is changed by Eric Ho <eho@word> on Fri Jan 12
+ % 19:20:28 1990 so that it'll call eho.format.in.ed.booktitle instead
+ % of format.in.ed.booktitle.
+
+ format.bvolume output
+ format.number.series output
+ format.chapter.pages eho.special.output
+ new.sentence
+% publisher "publisher" output.check
+% address output
+% switched order of publisher and address for incollection -- BJR 1/3/90
+ address eho.output % Use eho.output instead of output.
+ publisher "publisher" eho.output.check % Use eho.output.check instead
+ % of output.check.
+ format.edition output
+ }
+ { format.incoll.inproc.crossref output.nonnull
+ format.chapter.pages output
+ }
+ if$
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {inproceedings}
+{ output.bibitem
+ format.authors "author" output.check
+ author format.key output % special for
+ output.year.check % apalike
+ new.block
+ format.title "title" output.check
+ new.block
+ crossref missing$
+ { % format.in.ed.booktitle "booktitle" output.check
+ eho.format.in.ed.booktitle "booktitle" output.check
+ format.bvolume output
+ format.number.series output
+ format.pages eho.special.output
+ address eho.special.output % for apalike
+ new.sentence % there's no year
+ organization eho.special.output % here so things
+ publisher eho.special.output % are simpler
+ }
+ { format.incoll.inproc.crossref output.nonnull
+ format.pages output
+ }
+ if$
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {conference} { inproceedings }
+
+FUNCTION {manual}
+{ output.bibitem
+ format.authors output
+ author format.key output % special for
+ output.year.check % apalike
+ new.block
+ format.btitle "title" output.check
+ organization address new.block.checkb
+ organization output
+ address output
+ format.edition output
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {mastersthesis}
+{ output.bibitem
+ format.authors "author" output.check
+ author format.key output % special for
+ output.year.check % apalike
+ new.block
+ format.title "title" output.check
+ new.block
+ "Master's thesis" format.thesis.type output.nonnull
+ school "school" output.check
+ address output
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {misc}
+{ output.bibitem
+ format.authors output
+ author format.key output % special for
+ output.year.check % apalike
+ new.block
+ format.title output
+ new.block
+ howpublished output
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {phdthesis}
+{ output.bibitem
+ format.authors "author" output.check
+ author format.key output % special for
+ output.year.check % apalike
+ new.block
+ format.btitle "title" output.check
+ new.block
+ "PhD thesis" format.thesis.type output.nonnull
+ school "school" output.check
+ address output
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {proceedings}
+{ output.bibitem
+ format.editors output
+ editor format.key output % special for
+ output.year.check % apalike
+ new.block
+ format.btitle "title" output.check
+ format.bvolume output
+ format.number.series output
+ address output % for apalike
+ new.sentence % we always output
+ organization output % a nonempty organization
+ publisher output % here
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {techreport}
+{ output.bibitem
+ format.authors "author" output.check
+ author format.key output % special for
+ output.year.check % apalike
+ new.block
+% format.title "title" output.check
+ format.btitle "title" output.check % change to ital title -- BJR
+ new.block
+ format.tr.number output.nonnull
+ institution "institution" output.check
+ address output
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {unpublished}
+{ output.bibitem
+ format.authors "author" output.check
+ author format.key output % special for
+ output.year.check % apalike
+ new.block
+ format.title "title" output.check
+ new.block
+ note "note" output.check
+ fin.entry
+}
+
+FUNCTION {default.type} { misc }
+
+MACRO {jan} {"January"}
+
+MACRO {feb} {"February"}
+
+MACRO {mar} {"March"}
+
+MACRO {apr} {"April"}
+
+MACRO {may} {"May"}
+
+MACRO {jun} {"June"}
+
+MACRO {jul} {"July"}
+
+MACRO {aug} {"August"}
+
+MACRO {sep} {"September"}
+
+MACRO {oct} {"October"}
+
+MACRO {nov} {"November"}
+
+MACRO {dec} {"December"}
+
+MACRO {acmcs} {"ACM Computing Surveys"}
+
+MACRO {acta} {"Acta Informatica"}
+
+MACRO {cacm} {"Communications of the ACM"}
+
+MACRO {ibmjrd} {"IBM Journal of Research and Development"}
+
+MACRO {ibmsj} {"IBM Systems Journal"}
+
+MACRO {ieeese} {"IEEE Transactions on Software Engineering"}
+
+MACRO {ieeetc} {"IEEE Transactions on Computers"}
+
+MACRO {ieeetcad}
+ {"IEEE Transactions on Computer-Aided Design of Integrated Circuits"}
+
+MACRO {ipl} {"Information Processing Letters"}
+
+MACRO {jacm} {"Journal of the ACM"}
+
+MACRO {jcss} {"Journal of Computer and System Sciences"}
+
+MACRO {scp} {"Science of Computer Programming"}
+
+MACRO {sicomp} {"SIAM Journal on Computing"}
+
+MACRO {tocs} {"ACM Transactions on Computer Systems"}
+
+MACRO {tods} {"ACM Transactions on Database Systems"}
+
+MACRO {tog} {"ACM Transactions on Graphics"}
+
+MACRO {toms} {"ACM Transactions on Mathematical Software"}
+
+MACRO {toois} {"ACM Transactions on Office Information Systems"}
+
+MACRO {toplas} {"ACM Transactions on Programming Languages and Systems"}
+
+MACRO {tcs} {"Theoretical Computer Science"}
+
+READ
+
+FUNCTION {sortify}
+{ purify$
+ "l" change.case$
+}
+
+INTEGERS { len }
+
+FUNCTION {chop.word}
+{ 's :=
+ 'len :=
+ s #1 len substring$ =
+ { s len #1 + global.max$ substring$ }
+ 's
+ if$
+}
+
+% There are three apalike cases: one person (Jones),
+% two (Jones and de~Bruijn), and more (Jones et~al.).
+% This function is much like format.crossref.editors.
+%
+FUNCTION {format.lab.names}
+{ 's :=
+ s #1 "{vv~}{ll}" format.name$
+ s num.names$ duplicate$
+ #2 >
+ { pop$ " et~al." * }
+ { #2 <
+ 'skip$
+ { s #2 "{ff }{vv }{ll}{ jj}" format.name$ "others" =
+ { " et~al." * }
+ { " \& " * s #2 "{vv~}{ll}" format.name$ * } % " and " -- BJR 10/5/89
+ if$
+ }
+ if$
+ }
+ if$
+}
+
+FUNCTION {author.key.label}
+{ author empty$
+ { key empty$
+ { cite$ #1 #3 substring$ }
+ 'key % apalike uses the whole key
+ if$
+ }
+ { author format.lab.names }
+ if$
+}
+
+FUNCTION {author.editor.key.label}
+{ author empty$
+ { editor empty$
+ { key empty$
+ { cite$ #1 #3 substring$ }
+ 'key % apalike uses the whole key
+ if$
+ }
+ { editor format.lab.names }
+ if$
+ }
+ { author format.lab.names }
+ if$
+}
+
+FUNCTION {editor.key.label}
+{ editor empty$
+ { key empty$
+ { cite$ #1 #3 substring$ }
+ 'key % apalike uses the whole key, no organization
+ if$
+ }
+ { editor format.lab.names }
+ if$
+}
+
+FUNCTION {calc.label}
+{ type$ "book" =
+ type$ "inbook" =
+ or
+ 'author.editor.key.label
+ { type$ "proceedings" =
+ 'editor.key.label % apalike ignores organization
+ 'author.key.label % for labeling and sorting
+ if$
+ }
+ if$
+ ", " % these three lines are
+ * % for apalike, which
+ year field.or.null purify$ #-1 #4 substring$ % uses all four digits
+ *
+ 'label :=
+}
+
+FUNCTION {sort.format.names}
+{ 's :=
+ #1 'nameptr :=
+ ""
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ { nameptr #1 >
+ { " " * }
+ 'skip$
+ if$ % apalike uses initials
+ s nameptr "{vv{ } }{ll{ }}{ f{ }}{ jj{ }}" format.name$ 't := % <= here
+ nameptr numnames = t "others" = and
+ { "et al" * }
+ { t sortify * }
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+}
+
+FUNCTION {sort.format.title}
+{ 't :=
+ "A " #2
+ "An " #3
+ "The " #4 t chop.word
+ chop.word
+ chop.word
+ sortify
+ #1 global.max$ substring$
+}
+
+FUNCTION {author.sort}
+{ author empty$
+ { key empty$
+ { "to sort, need author or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { author sort.format.names }
+ if$
+}
+
+FUNCTION {author.editor.sort}
+{ author empty$
+ { editor empty$
+ { key empty$
+ { "to sort, need author, editor, or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { editor sort.format.names }
+ if$
+ }
+ { author sort.format.names }
+ if$
+}
+
+FUNCTION {editor.sort}
+{ editor empty$
+ { key empty$
+ { "to sort, need editor or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { editor sort.format.names }
+ if$
+}
+
+% apalike uses two sorting passes; the first one sets the
+% labels so that the `a's, `b's, etc. can be computed;
+% the second pass puts the references in "correct" order.
+% The presort function is for the first pass. It computes
+% label, sort.label, and title, and then concatenates.
+FUNCTION {presort}
+{ calc.label
+ label sortify
+ " "
+ *
+ type$ "book" =
+ type$ "inbook" =
+ or
+ 'author.editor.sort
+ { type$ "proceedings" =
+ 'editor.sort
+ 'author.sort
+ if$
+ }
+ if$
+ #1 entry.max$ substring$ % for
+ 'sort.label := % apalike
+ sort.label % style
+ *
+ " "
+ *
+ title field.or.null
+ sort.format.title
+ *
+ #1 entry.max$ substring$
+ 'sort.key$ :=
+}
+
+ITERATE {presort}
+
+SORT % by label, sort.label, title---for final label calculation
+
+STRINGS { last.label next.extra } % apalike labels are only for the text;
+
+INTEGERS { last.extra.num } % there are none in the bibliography
+
+FUNCTION {initialize.extra.label.stuff} % and hence there is no `longest.label'
+{ #0 int.to.chr$ 'last.label :=
+ "" 'next.extra :=
+ #0 'last.extra.num :=
+}
+
+FUNCTION {forward.pass}
+{ last.label label =
+ { last.extra.num #1 + 'last.extra.num :=
+ last.extra.num int.to.chr$ 'extra.label :=
+ }
+ { "a" chr.to.int$ 'last.extra.num :=
+ "" 'extra.label :=
+ label 'last.label :=
+ }
+ if$
+}
+
+FUNCTION {reverse.pass}
+{ next.extra "b" =
+ { "a" 'extra.label := }
+ 'skip$
+ if$
+ label extra.label * 'label :=
+ extra.label 'next.extra :=
+}
+
+EXECUTE {initialize.extra.label.stuff}
+
+ITERATE {forward.pass}
+
+REVERSE {reverse.pass}
+
+% Now that the label is right we sort for real,
+% on sort.label then year then title. This is
+% for the second sorting pass.
+FUNCTION {bib.sort.order}
+{ sort.label
+ " "
+ *
+ year field.or.null sortify
+ *
+ " "
+ *
+ title field.or.null
+ sort.format.title
+ *
+ #1 entry.max$ substring$
+ 'sort.key$ :=
+}
+
+ITERATE {bib.sort.order}
+
+SORT % by sort.label, year, title---giving final bibliography order
+
+FUNCTION {begin.bib}
+{ preamble$ empty$ % no \etalchar in apalike
+ 'skip$
+ { preamble$ write$ newline$ }
+ if$
+ "\begin{thebibliography}{}" write$ newline$ % no labels in apalike
+}
+
+EXECUTE {begin.bib}
+
+EXECUTE {init.state.consts}
+
+ITERATE {call.type$}
+
+FUNCTION {end.bib}
+{ newline$
+ "\end{thebibliography}" write$ newline$
+}
+
+EXECUTE {end.bib}
diff --git a/biblio/bibtex/contrib/astron/README b/biblio/bibtex/contrib/astron/README
new file mode 100644
index 0000000000..a16608fef7
--- /dev/null
+++ b/biblio/bibtex/contrib/astron/README
@@ -0,0 +1,37 @@
+ ASTRON.BST
+
+ A BibTeX style for astronomical journals, for use with
+ BibTeX 0.99c.
+
+
+
+This distribution contains the following files:
+
+ astron.bst The BibTeX style for Astronomical Journals
+ astron.sty The associated LaTeX style
+
+ astdoc.tex LaTeX source of the documentation
+ astdoc.bib + related files
+ astdoc.aux
+ astdoc.bbl
+ astdoc.toc
+
+ example.tex LaTeX file with example citations
+ example.bib Example of a bibliographic database
+
+ mnemonic.bib Supporting files
+ template.bib
+
+ README This file
+
+To prepare the LaTeX documentation on the ASTRON bibliography style,
+run LaTeX on ASTDOC.TEX. If you have copied all ASTDOC files and the
+ASTRON style files onto your computer, you will need only one run to
+get a DVI file with all cross references in place.
+
+*** BUG REPORT ***
+
+A major bug has been reported: the UUCP mail address in the
+documentation and in the copyright header of the various files
+should NOT read: l42@nikhef.nikhefh.nl
+but it SHOULD read: l42@nikhefh.nikhef.nl
diff --git a/biblio/bibtex/contrib/astron/astdoc.bib b/biblio/bibtex/contrib/astron/astdoc.bib
new file mode 100644
index 0000000000..ea7721b725
--- /dev/null
+++ b/biblio/bibtex/contrib/astron/astdoc.bib
@@ -0,0 +1,32 @@
+@ARTICLE{daniel,
+ AUTHOR = "H.-U. Daniel and J. Berger and D. Savaray",
+ YEAR = 1989,
+ TITLE = "TeX and Mathor3--TeX for Astronomy and Astrophysics
+ Journal and Supplement Series",
+ JOURNAL = mess,
+ VOLUME = 56,
+ PAGES = "67-68"}
+
+@BOOK{burkhardt,
+ EDITOR = "G. Burkhardt and U. Esser and H. Hefele and I. Heinrich
+ and W. Hoffmann and D. Krahn and V. R. Matas and
+ L. D. Schmadel and R. Wielen and G. Zech",
+ TITLE = "Astronomy and Astrophysics Abstracts",
+ VOLUME = "49A",
+ YEAR = 1990,
+ PUBLISHER = "Springer-Verlag",
+ ADDRESS = "Heidelberg"}
+
+@BOOK{lamport,
+ AUTHOR = "Leslie Lamport",
+ TITLE = "LaTeX, A Document Preparation System",
+ PUBLISHER = "Addison-Wesley",
+ ADDRESS = "Reading, Massachusetts",
+ YEAR = 1986 }
+
+@UNPUBLISHED{patashnik,
+ AUTHOR = "Oren Patashnik",
+ TITLE = "{\BibTeX{}ing}",
+ ADDRESS = "Stanford University",
+ YEAR = 1988,
+ NOTE = "Supplied with {\BibTeX} distributions" }
diff --git a/biblio/bibtex/contrib/astron/astdoc.pdf b/biblio/bibtex/contrib/astron/astdoc.pdf
new file mode 100644
index 0000000000..112c45bca7
--- /dev/null
+++ b/biblio/bibtex/contrib/astron/astdoc.pdf
Binary files differ
diff --git a/biblio/bibtex/contrib/astron/astdoc.tex b/biblio/bibtex/contrib/astron/astdoc.tex
new file mode 100644
index 0000000000..c2a15325ab
--- /dev/null
+++ b/biblio/bibtex/contrib/astron/astdoc.tex
@@ -0,0 +1,1154 @@
+% Copyright (C) 1990 Sake J. Hogeveen.
+
+% This file contains the LaTeX source of the documentation for the BibTeX
+% style file ASTRON.BST and the complementary LaTeX style ASTRON.STY.
+
+% Copyright Notice:
+% The files ASTRON.BST, ASTRON.STY, ASTDOC.TEX, ASTDOC.BIB, EXAMPLE.TEX,
+% EXAMPLE.BIB, MNEMONIC.BIB, and TEMPLATE.BIB are a package.
+% You may copy and distribute them freely for non-commercial purposes,
+% provided that you keep the package together and this copyright notice
+% in tact.
+% You may not alter or modify the files; this helps to ensure that all
+% distributions of ASTRON.BST and related files are the same.
+% If you make any modifications, then you must give the files new names,
+% other than the present.
+% The author bears no responsibilities for errors in this document or
+% the software it describes; and shall not be held liable for any indirect,
+% incidental, or consequential damages.
+
+% If you find any bugs in the style files, or omissions in the documentation,
+% please report them to: E-mail A410SAKE@SARA.NL; UUCP: l42@nikhefh.nikhef.nl
+
+\documentstyle[titlepage,astron]{article}
+
+\textwidth 5.5in
+\textheight 8.5in
+\hoffset -.35in
+\voffset -.6in
+
+\setcounter{secnumdepth}{2}
+\setcounter{tocdepth}{3}
+
+\def\BibTeX{{\rm B\kern-.05em{\sc i\kern-.025em b}\kern-.08em\TeX }}
+
+\title{%{\huge\tt astron.bst} \bigskip \\
+ A \BibTeX\ Style for Astronomical Journals}
+\author{(for use with BibTeX 0.99c) \bigskip \\
+ Sake J. Hogeveen}
+\date{\vspace{.5in}
+ \fbox{\parbox{3in}{\small This is a preliminary version. Please
+ report any bugs in the style files, and errors or omissions in the
+ documentation to one of the E-mail addresses below.
+ This package is sent to several astronomical journals, with a request
+ for their official approval of its use.
+ Version 1.0 will hopefully contain a list of journals that have given
+ their consent.}}\vfil
+ \parbox{4.5 in}{\normalsize Copyright \copyright 1990, Sake J. Hogeveen.
+ The files {\tt astron.bst}, {\tt astron.sty}, {\tt astdoc.tex},
+ {\tt astdoc.bib}, {\tt mnemonic.bib}, {\tt example.bib}, {\tt example.tex},
+ and {\tt template.bib} are a package.
+ You may copy and distribute them freely for non-commercial purposes,
+ provided that you keep the package together and this copyright notice
+ in tact.
+ You may not alter or modify the files; this helps to ensure that all
+ distributions of {\tt astron.bst} and related files are the same.
+ If you make any modifications, then you must give the files new names,
+ other than the present. \\
+ The author bears no responsibilities for errors in this document or
+ the software it describes; and shall not be held liable for any indirect,
+ incidental, or consequential damages.}\vfil
+ \parbox{5.5 in}{\begin{center} \normalsize
+ Astronomical Institute `Anton Pannekoek', Roetersstraat 15,
+ 1018 {\sc wb} Amsterdam, \\ The Netherlands \medskip \\
+ E-mail: Earn/Internet: {\tt A410SAKE@SARA.NL};
+ UUCP: {\tt l42@nikhefh.nikhef.nl}\end{center}}}
+
+\begin{document}
+\maketitle
+\renewcommand{\BibTeX}{BibTeX}
+\renewcommand{\LaTeX}{LaTeX}
+\tableofcontents
+\newpage
+
+\section*{Introduction}
+\addcontentsline{toc}{section}{Introduction}
+
+This document describes the \BibTeX\ style {\tt astron.bst}.
+\BibTeX\ is a programme that makes it much easier to produce a list of
+references for papers that are prepared with \LaTeX, and it comes with
+nearly every distribution of \LaTeX.
+Consult your local \TeX{}nician if you cannot find it on the computer(s)
+you use.
+
+The {\tt astron.bst} style is designed to produce a list of references in
+the author-year format that is commonly used among astronomical journals.
+The style file produces references in the exact format of
+{\sl Astronomy and Astrophysics}, the European astronomical journal.
+However, the formats of the various astronomical journals (notably
+Monthly Notices of the Royal Astronomical Society, Astrophysics and
+Space Science, The Astronomical Journal, and The Astrophysical Journal)
+only differ in typographical details, such as punctuation and the use
+of italics.
+
+In the near future we may expect astronomical journals to accept
+source or {\sc dvi} files of papers prepared with \TeX\ and \LaTeX.
+It will be possible to use \BibTeX\ and the style {\tt astron.bst}
+presented here {\sl without restrictions\/} with any of the \LaTeX\ style
+files that may be distributed by the journals or their publishers.
+
+For some aspects of scientific publishing with \TeX\ and \LaTeX, see
+appendix~\ref{aspects}
+
+\section{\BibTeX}
+
+This documentation is not intended as an introduction to \BibTeX,
+nor to \LaTeX.
+You are assumed to be familiar with both.
+If you are not: \LaTeX\ is documented in its {\sl User's Guide and
+Reference Manual\/} by Leslie Lamport \cite*{lamport}.
+\BibTeX\ is documented by its author: Oren Patashnik \cite*{patashnik}.
+The manual comes with each distribution of \BibTeX.
+It explains how \BibTeX\ should be used, and how style files can be created
+or adapted.
+
+\BibTeX\ is also documented in section 4.2.3, `Using \BibTeX', and appendix~B,
+`The Bibliography Database', of the \LaTeX\ {\sl User's Guide}.
+If you only want to use existing bibliography styles, the
+information in the \LaTeX\ {\sl User's Guide and Reference Manual\/}
+\cite{lamport} is sufficient.
+
+\section{The `{\tt astron}' style files}
+
+With this package you should find the \BibTeX\ style file {\tt astron.bst}
+and the complementary \LaTeX\ style file {\tt astron.sty}.
+You should install both on the computer on which you run \LaTeX\ and
+\BibTeX.
+Preferably you should put the files in the directory where the standard
+and/or optional \LaTeX\ and \BibTeX\ style files are kept.
+If you are on a multi-user system and have no permission to write
+to these directories, ask your system manager to install them for you.
+If you are the only astronomer on the system, and hence the only user of
+the `{\tt astron}' style, you may also put the files in your working
+directory.
+
+\subsection{$\backslash${\tt cite} and $\backslash${\tt cite*}}
+
+Citations in the author-year format usually look like: `(Author, year)'.
+But sometimes the name of the author is part of the running text,
+and you want to make a citation look like: `\ldots{} Author (year)'.
+To allow for both forms of citations, {\tt astron.sty} provides two
+commands: \verb|\cite| and \verb|\cite*|.
+The command \verb|\cite{|{\it label\/}\verb|}| will produce the full
+citation `(Author, year)', while the command
+\verb|\cite*{|{\it label\/}\verb|}| will produce the short citation `(year)'.
+
+These commands are not standard \LaTeX\ (\LaTeX\ only provides the \verb|\cite|
+command).
+They are added to the vocabulary of any \LaTeX\ document style by including
+the `astron' option in your document style call, e.g.:
+\begin{quotation}
+ \noindent\verb|\documentstyle[11pt,astron]{article}|
+\end{quotation}
+where `{\tt 11pt}' and `{\tt article}' represent the document styles you
+chose to use.
+
+If you want to make a citation of an other format than the formats produced
+by \verb|\cite| or \verb|\cite*|, you will have to type the entire citation
+yourself and use the \verb|\nocite| command.
+The call `\verb|\nocite{|{\it label\/}\verb|}|' in your document will cause
+\LaTeX\ and \BibTeX\ to include the citation indicated by {\it label\/} in
+the list of references, but the \verb|\nocite| command will {\sl not\/}
+be replaced by the {\it key\/} text.
+
+\subsection{{\tt astron.bst} and {\tt astron.sty}}
+
+The style file {\tt astron.bst} causes \BibTeX\ to produce a
+{\it document\/}{\tt .bbl} file with a list of references according
+to the usual format:
+%
+\begin{quotation}
+\noindent \verb|\begin{thebibliography}{}| \\
+\verb|\bibitem[|{\it key}\verb|]{|{\it label}\verb|}|{\it bibliography entry} \\
+\indent $\vdots$ \\
+\verb|\end{thebibliography}|
+\end{quotation}
+%
+The {\it label\/} is, of course, the label which you use in the
+\verb|\cite{|{\it label\/}\verb|}| and \verb|\cite*{|{\it label\/}\verb|}|
+calls in your \LaTeX\ document, and by which \BibTeX\ recognizes entries
+in the {\it database\/}{\tt.bib} file.
+
+\noindent The style file {\tt astron.bst} causes \BibTeX\ to produce {\it key\/}s
+with the format: \verb|{|{\it Author\/}\verb|}{|{\it year\/}\verb|}|.
+The style file {\tt astron.sty} causes \LaTeX\ to replace a
+\verb|\cite{|{\it label\/}\verb|}| call by the text `(Author, year)',
+and a \verb|\cite*{|{\it label\/}\verb|}| call by the text `(year)'.
+Due to the definition of \verb|\@biblabel| in {\tt astron.sty}, the {\it key\/}
+is not printed in the actual list of references.
+
+\subsection{Required, optional, and ignored fields}
+\label{fields}
+
+The bibliography style `{\tt astron}' has its own ideas about which fields
+in an entry are required, optional or ignored.
+Astronomical journals make an effort of `economic' printing, which means
+that they leave everything out that is not absolutely necessary.
+
+The classes of the fields in each entry are tabulated in
+appendix~\ref{classes}.
+One thing I will give away here: in the `author-year' citation system
+it is obvious that {\tt author} and {\tt year} information is
+required for every entry.
+Remember that `required' means that \BibTeX\ issues a warning if the field
+is empty, i.e., if the information is not available in your
+{\it database\/}{\tt .bib} file.
+
+\section{Examples}
+
+The files {\tt example.bib} and {\tt example.tex} show what a bibliographic
+database file might look like, and demonstrate the use of the \verb|\cite|
+and \verb|\cite*| commands in various forms.
+
+\section{Abbreviations}
+\label{abbreviations}
+
+The file {\tt mnemonic.bib} contains a list of mnemonics which may
+be used in the `{\tt journal}' fields of the entries in the bibliographic
+database.
+If you want to use the mnemonics, you should include {\tt mnemonic.bib}
+into the \verb|\bibliography| call:
+%
+\begin{quotation}
+\noindent\verb|\bibliography{mnemonic,|{\it other bibliographic
+ database files\/}\verb|}|
+\end{quotation}
+%
+If you have an entry: `{\tt journal = aa}' (note: {\sl without\/}
+quotes or braces around `{\tt aa}'), then \BibTeX\ will cause the
+mnemonic to be replaced by the text {\it Astron.\ Astrophys.\/} in the
+final list of references.
+
+The list in appendix~\ref{mnemonics} contains the same journals and
+periodicals as section 001 `Periodicals' in
+{\sl Astronomy and Astrophysics Abstracts}, Vol.~49A \cite{burkhardt}.
+The abbreviations follow the recommendations of the ``International
+List of Periodical Title Word Abbreviations'', so you are strongly
+encouraged to use them.
+
+If you want to cite periodicals which are not in {\tt mnemonic.bib},
+or if you think you will never use 90\% of the mnemonics in the
+supplied file, you could create your own mnemonics file, and copy
+from {\tt mnemonic.bib} the abbreviations which you do use.
+
+\section{Maintaining the database}
+
+To setup and maintain bibliographic databases for \BibTeX, this package
+contains a file {\tt template.bib}, which contains templates of the
+entries with their required and optional fields (according to
+{\tt astron.bst}).
+If you want to add an entry to a database, you can copy the relevant
+template from {\tt template.bib} into your database file, and then
+complete the entry with the relevant information.
+
+I have used this method to maintain the databases for quite some time,
+and I find that it saves me from a lot of arduous typing, and many
+typing errors.
+
+\section{Credits}
+
+The \BibTeX\ and \LaTeX\ `{\tt astron}' styles are adaptations of the
+`{\tt apalike}' styles developed by Oren Patashnik and Suzan King.
+The \verb|\cite| and \verb|\cite*| trickery is adapted from
+`{\tt named.bst}' by Peter~F. Patel-Schneider.
+
+\bibliographystyle{astron}
+\bibliography{mnemonic,astdoc}
+
+\appendix
+
+\newpage
+\section{Aspects of publishing with \TeX\ and \LaTeX}
+\label{aspects}
+
+New developments, such as \TeX\ and \LaTeX, are about to radically change
+the conventional ways of scientific publishing.
+Experiments with the acceptance of papers prepared with \TeX\ or
+\LaTeX\ are already going on \cite{daniel}.
+
+The principle is simple and appealing.
+Authors prepare their papers with \TeX\ or \LaTeX, and send their manuscripts
+to the publishers on floppy disk or via electronic mail.
+A publisher runs \TeX\ or \LaTeX\ on the manuscript, and produces a
+(high quality) printable copy of the paper.
+The costly and time consuming steps of typesetting and proofreading
+would then be eliminated.
+
+But before everything will run smoothly, some aspects of scientific publishing
+with \TeX\ and \LaTeX\ will have to be considered, and some problems need to
+be addressed.
+
+\subsection{Generalized Mark-up}
+
+Although papers in the various scientific journals exhibit a great variety
+in typographical appearance, a common underlying structure can be recognized.
+The papers can be characterized by: a heading (with the title of the paper,
+and the author's names and affiliations); an abstract or summary; sections;
+tables; figures; equations; a list of references; and sometimes appendices.
+The typographical form of a paper is intended to support this structure.
+The typography is, in fact, derived from the structure, as becomes evident
+from the typographical instructions that are scribbled on to the oldfashioned
+typewriter written manuscripts by a desk editor.
+
+A desk editor recognizes the structural elements of a paper from the
+typography of the typewriter written manuscript.
+The author has {\sl implicitly\/} structured his manuscript by applying
+some rudimentary typography.
+The structure of a manuscript can be formalized, by asking the author to
+{\sl explicitly\/} state what comes next, e.g. like this:
+%
+\begin{quotation}
+\noindent\begin{verbatim}
+title: Gnats and Gnus again
+author: A.N. Author
+affiliation: The Gnats and Gnus Institute,
+ Somewhere Lane 15, Downtown, Inthecountry.
+abstract:
+ Some people get fed up with examples that are about Gnats and Gnus.
+ This paper brings about new information, which shows that Gnats and
+ Gnus are a species with such unexpected virtues, that the reader will
+ never be agonized again, but, to the contrary, cannot wait to learn
+ more about them.
+introduction:
+\end{verbatim}
+\par$\vdots$
+\end{quotation}
+%
+A desk editor could again scribble his remarks in this manuscript,
+to indicate to a typesetter what typographical form is required for
+each of the structural elements.
+The `scribbeling' of the desk editor is, by the way, called `mark-up'.
+An other desk editor, of a different journal, could also scribble
+in {\sl his\/} remarks, which would make sure that the typesetter
+applies the typographical rules of this other journal.
+
+So we have not only {\sl formalized\/} the mark-up of the paper, we
+have also made it independent of the typographical form.
+Mark-up which is independent of the typographical form is said to be
+{\sl generalized\/} mark-up.
+
+The idea of modern (scientific) publishing is that the author supplies
+a manuscript, which is marked-up employing a `Generalized Mark-up
+Language'\footnote{
+ In fact, there is at present an international effort being made of
+ the development of what is called the `Standard Generalized Mark-up
+ Language' (SGML).
+ SGML will be~/~is an ISO standard.
+ SGML will be mainly used by publishers and by organisations to maintain
+ large databases.
+
+ As an author you do not have to worry that you will yet again have
+ to learn something new: suppliers of word-processors will incorporate
+ SGML in their products, so you will produce SGML manuscripts without
+ knowing it.}.
+
+This manuscript can be processed by {\em any\/} publisher into the
+typographical format of a particular publication.
+The advantages of the concept are obvious: 1.~the author does not
+have to bother with typographical matters, and 2.~the publisher is
+completely in control of the appearance of a publication, just as he
+always has been.
+
+\subsection{\TeX}
+
+So how do \TeX\ and \LaTeX\ fit into this concept?
+Let us first look at \TeX, and then at \LaTeX.
+
+\TeX\ is a computerized typesetting system, geared towards the typesetting
+of manuscripts which contain a lot of mathematics.
+Like the traditional typesetting systems, \TeX\ requires information
+from the user about {\sl where\/} and {\sl how\/} things are to be put on
+paper.
+\TeX\ provides many basic commands, but these commands are hardly ever
+used directly.
+The commands are grouped in {\sl macros}, which perform (typographically)
+logical functions.
+Macros are grouped into {\sl macro packages}.
+\TeX\ comes with a standard macro package `{\tt plain.tex}', and it is this
+macro package that is used by most authors who say they use \TeX.
+
+However, this `plain' macro package still requires information from the
+user about where and how things are to be put on paper.
+And it is here that a problem arises.
+Because if `plain' \TeX\ were to be used for scientific publishing, it
+would mean that authors have to concern themselves with the layout and
+the typographical details of the journal(s) they are publishing in.
+Although publishers would not dare to doubt the scientific capabilities
+of authors, they have serious concerns about their qualities as typographers.
+And with good reason, as years of experience with `camera ready' manuscripts
+have shown.
+
+But, because \TeX\ actually is a computer programme, there are great powers
+hidden inside.
+By building on the `plain' macros, or by developing completely new ones, the
+concept of macros can be carried further, until a package is achieved which,
+to the user, looks like a `Generalized Mark-up Language'.
+
+\subsection{\LaTeX\ as a Generalized Mark-up Language}
+
+A \TeX\ macro package with the properties of a Generalized Mark-up Language
+has already been developed.
+It is called \LaTeX.
+With \LaTeX\ the author uses `generalized mark-up' commands such as
+`\verb|\title|', `\verb|\begin{abstract}|', `\verb|\section|',
+`\verb|\appendix|', which bear no relation to a particular typographical
+format at all.
+The typographical format of the final printed copy of a \LaTeX\ manuscript
+is determined by so-called `style files'.
+\LaTeX\ comes with four standard style files, which allow the user to
+produce typographically sound articles (papers), books, reports, and letters.
+But these style files may be replaced by others, to produce an entirely
+different typographical format of a document from the {\sl same\/}
+mark-up commands.
+Thus, if a publisher accepts the source text of a \LaTeX\ manuscript, he
+can convert it into printed output with almost any desired
+typographical format,
+{\sl without\/} changing the original text.
+
+\subsection{\TeX, and the `typewriter syndrome'}
+
+If you are an editor or a publisher, you will have met authors who
+say that they much prefer \TeX\ over \LaTeX.
+They try to convince you that they can do much more with it than can be
+done with \LaTeX.
+What they mean is, that they have more direct control of what the
+{\sl printed output\/} looks like, and hence, over the typography of their
+product.
+We should realize that authors who say they use \TeX, in fact use the
+`plain' macro package.
+Some 90\% of these authors use `plain' \TeX\ as a sophisticated typewriter.
+For instance, when they start a new section, they tell \TeX\ to leave some
+white space between the preceding text and the new section heading,
+switch to a different font, type the heading, leave some white space again,
+switch back to the font for the running text, and continue to type the
+next paragraph.
+
+This is all fine when an author types a manuscript for his own purposes,
+or one that will be typeset again by a professional typesetter.
+Of course, a publisher could provide a set of instructions which tell
+the author how everything should be formatted, just like the instructions
+that are provided for `camera ready' papers.
+But publishers know how well authors keep to these instructions, and many
+authors have nightmares about camera ready manuscripts, which cost them
+blood, sweat, tears, and far too much time to prepare.
+
+Furthermore, \TeX\ is not intended to be used in this way.
+When `plain' \TeX\ is used as a typewriter, not even 5\% of its potential
+capabilities are challenged.
+The design of \TeX\ allows it to be adapted to the structural and typographical
+demands of the publications of many, different branches of science, by
+means of the `macro' concept.
+For very specialized branches, special macro packages can be developed
+(and are developed, such as the $\cal AMS$\TeX\ package of the American
+Mathematical Society).
+Other branches, like astronomy, could do with a `general purpose' package,
+such as \LaTeX.
+
+Authors will have to adapt to the concept of Generalized Mark-up, and
+be cured from the `typewriter syndrome'.
+Only through generalized mark-up, the principle of directly publishing
+the manuscript provided by the author will work.
+And the benefits will be great:
+it allows the author to fully concentrate on the writing of the manuscript,
+without worries about the layout; it leaves the publisher in full
+control of the typographical appearance of his publications; and the
+time between submission and publication can be reduced considerably.
+
+\subsection{Consultation and education}
+
+Like with every beautiful concept, there are some practical hazards and
+problems involved in scientific publishing with \TeX\ and \LaTeX.
+The mark-up commands provided by \LaTeX\ do not cover every peculiarity
+you may have in scientific papers, and not all commands are strictly
+`generalized', i.e., some do have a direct typographical effect\footnote{
+ This is not a problem peculiar to \LaTeX, it is a problem that designers
+ of generalized mark-up languages are struggling with in general.}.
+%
+And then authors should use the proper commands for their mark-up, which
+they have to select from an overwhelming number of available commands.
+
+Publishers can provide special or optional style files, which add new
+mark-up commands to the \LaTeX\ vocabulary.
+But this has to be done very cautiously, because every new command means a
+deviation from standard \LaTeX, and requires extra attention from the
+authors.
+New commands should not be added without proper consultation of the
+community of authors that has to use a particular macro package.
+
+Authors will have to be educated about the proper mark-up of their papers.
+Experience at Springer-Verlag (Heidelberg) and Kluwer Academic Publishers
+(Dordrecht), with \TeX\ and \LaTeX\ manuscripts provided by authors, has
+shown that the much greater possibilities of these systems in comparison to
+the old typewriter, are only to often used in the wrong way.
+This means that \TeX\ and \LaTeX\ manuscripts need so much polishing and
+brushing up, that the effort involved equals or sometimes surpasses that
+of having the manuscript typeset in the traditional way.
+
+What authors have to learn about the mark-up of their papers, are rules
+that generally apply to the proper typesetting of mathematical texts.
+These rules are not dependent of a particular journal (although, of course,
+some branches of science may have their peculiarities, but these are then
+again common for the branch).
+Rules of proper typesetting are mentioned at many places in the
+{\sl TeX{}book\/} and in the {\sl \LaTeX\ User's Guide and Reference Manual}.
+But the learning of \TeX\ and \LaTeX\ is at present still a matter
+of teaching it yourself, and many authors seem to miss the good advice
+that is given.
+
+\subsection{Concluding remarks}
+
+The use of \TeX\ and \LaTeX\ for scientific publishing will only succeed
+if we adapt to the concept of `generalized mark-up'.
+Only in that way an author can fully concentrate on the writing of his
+manuscript, and leave the typographical intricacies to the publisher.
+Much has yet to be learned by everyone involved: authors, editors, and
+publishers.
+We can learn from each other: publishers can learn from authors what
+is wrong about their macro packages; authors can learn from publishers
+which rules of proper typesetting they violate.
+
+It would be a good thing if the processes of consultation and education
+were formalized in working groups, or something similar.
+I know there are publishers who are reluctant about formalized consultation,
+because they are afraid it slows down their efforts to get going with
+\TeX\ and \LaTeX.
+However, it is my opinion that they can only benefit from participating
+in some form of formalized consultation.
+The introduction of \TeX\ and \LaTeX\ will take time anyway, and by listening
+to the authors, publishers may be prevented from releasing macro packages
+which are not accepted by the authors.
+
+Authors could in such negotiations stress that they will only opt for some
+form of generalized mark-up, because working truly camera ready would
+take too much of their time.
+An inventory could be made of what authors have to learn about the proper
+mark-up of mathematical texts, and courses could be set up to educate the
+new generation of authors.
+I think that some time from now universities will provide introductory courses
+in \LaTeX, just as they are now providing introductory courses in computer
+programming. \smallskip \\
+
+In the mean time, \LaTeX\ users can enjoy this \BibTeX\ style, which extends
+the concept of generalized mark-up to such a horrifying thing as the
+compilation of a list of references.
+
+
+
+\newpage
+\section{Classes of the fields}
+\label{classes}
+
+Fields in the entries of the bibliographic database are attributed one of
+three classes: required, optional, or ignored.
+The table in this appendix lists the class of each field in each entry.
+See also Sect.~\ref{fields}.
+
+\newcommand{\R}{{\sl R}}
+\renewcommand{\O}{{\sl O}}
+\newcommand{\I}{--}
+
+\vfil
+\noindent\begin{center}
+{\bf Table \thesection.1:} Classes of the fields. \\
+(\R $=$ Required, \O $=$ Optional, \I $=$ Ignored) \medskip \\
+%
+\begin{tabular}{lccccccc} \hline
+ & \multicolumn{7}{c}{\bf Entry} \\
+{\bf Field} & article & book & booklet & conference$^a$ & inbook & incoll.$^b$
+ & inproc.$^c$ \\ \hline\hline
+address & \I & \O & \O & \O & \O & \O & \O \\
+annote & \I & \I & \I & \I & \I & \I & \I \\
+author & \R & \R & \R & \R & \R & \R & \R \\
+booktitle & \I & \I & \I & \R & \I & \R & \R \\
+chapter & \I & \I & \I & \I & \R & \O & \I \\
+crossref & \O & \O & \I & \O & \O & \O & \O \\
+edition & \I & \O & \I & \I & \O & \O & \I \\
+editor & \I & \O & \I & \O & \O & \O & \O \\
+howpublished & \I & \I & \O & \I & \I & \I & \I \\
+institution & \I & \I & \I & \I & \I & \I & \I \\
+journal & \R & \I & \I & \I & \I & \I & \I \\
+key & \O & \O & \O & \O & \O & \O & \O \\
+month & \I & \I & \I & \I & \I & \I & \I \\
+note & \O & \O & \O & \O & \O & \O & \O \\
+number & \I & \O & \I & \O & \O & \O & \O \\
+organisation & \I & \I & \I & \O & \I & \I & \O \\
+pages & \O & \I & \I & \O & \O & \O & \O \\
+publisher & \I & \R & \I & \O & \R & \R & \O \\
+school & \I & \I & \I & \I & \I & \I & \I \\
+series & \I & \O & \I & \O & \O & \O & \O \\
+title & \I & \R & \R & \I & \R & \I & \I \\
+type & \I & \I & \I & \I & \I & \I & \I \\
+volume & \O & \O & \I & \O & \O & \O & \O \\
+year & \R & \R & \R & \R & \R & \R & \R \\ \hline
+\end{tabular}
+\end{center}
+$^a$ `conference' is the same as `inproceedings' \\
+$^b$ incoll.\ $=$ incollection \\
+$^c$ inproc.\ $=$ inproceedings
+
+\newpage
+
+\null\vfil
+\noindent\begin{center}
+{\bf Table \thesection.1:} Classes of the fields ({\it continued\/}). \\
+(\R $=$ Required, \O $=$ Optional, \I $=$ Ignored) \medskip \\
+%
+\begin{tabular}{lccccccc} \hline
+ & \multicolumn{7}{c}{\bf Entry} \\
+{\bf Field} & manual & masters.$^d$ & misc & phd.$^e$ & proc.$^f$ & tech.$^g$
+ & unpubl.$^h$ \\ \hline\hline
+address & \O & \O & \I & \O & \O & \O & \I \\
+annote & \I & \I & \I & \I & \I & \I & \I \\
+author & \R & \R & \R & \R & \R & \R & \R \\
+booktitle & \I & \I & \I & \I & \I & \I & \I \\
+chapter & \I & \I & \I & \I & \I & \I & \I \\
+crossref & \I & \I & \I & \I & \I & \I & \I \\
+edition & \O & \I & \I & \I & \I & \I & \I \\
+editor & \I & \I & \I & \I & \O & \I & \I \\
+howpublished & \I & \I & \O & \I & \I & \I & \I \\
+institution & \I & \I & \I & \I & \I & \O & \I \\
+journal & \I & \I & \I & \I & \I & \I & \I \\
+key & \O & \O & \O & \O & \O & \O & \O \\
+month & \I & \I & \I & \I & \I & \I & \I \\
+note & \O & \O & \O & \O & \O & \O & \R \\
+number & \I & \I & \I & \I & \O & \I & \I \\
+organisation & \O & \I & \I & \I & \O & \I & \I \\
+pages & \I & \I & \I & \I & \I & \I & \I \\
+publisher & \I & \I & \I & \I & \O & \I & \I \\
+school & \I & \R & \I & \R & \I & \I & \I \\
+series & \I & \I & \I & \I & \O & \I & \I \\
+title & \R & \I & \O & \I & \R & \R & \R \\
+type & \O & \O & \O & \O & \O & \O & \O \\
+volume & \I & \I & \I & \I & \O & \I & \I \\
+year & \R & \R & \R & \R & \R & \R & \R \\ \hline
+\end{tabular}
+\end{center}
+$^d$ masters.\ $=$ mastersthesis \\
+$^e$ phd.\ $=$ phdthesis \\
+$^f$ proc.\ $=$ proceedings \\
+$^g$ tech.\ $=$ techreport \\
+$^h$ unpubl.\ $=$ unpublished
+
+\newpage
+\section{Changing the style files yourself}
+
+The `{\tt astron}' bibliography style has been designed to meet the
+requirements of astronomical journals.
+Maybe you are working on documents which could do with about the same
+documentstyle, but not quite.
+Then you may want to modify the `{\tt astron}' styles to your needs.
+To help you on your way, here is a summary of what happens in each style
+file.
+
+You do remember to name modified style files anything other than
+{\tt astron.bst} or {\tt astron.sty}, don't you?
+
+\subsection{{\tt astron.bst}}
+
+The style {\tt astron.bst} causes \BibTeX\ to create a bibliography file
+which looks like:
+%
+\begin{quotation}
+\noindent \verb|\begin{thebibliography}{}| \\
+\verb|\bibitem[|{\it key}\verb|]{|{\it label}\verb|}|{\it bibliography entry} \\
+\indent $\vdots$ \\
+\verb|\end{thebibliography}|
+\end{quotation}
+%
+The {\it key\/} is formatted from the {\tt author} and {\tt year} entries
+in the bibliographic database.
+It looks like: \verb|{|{\it Author\/}\verb|}{|{\it year\/}\verb|}|.
+
+The {\it bibliography entry\/} is formatted from the required and optional
+information in the fields of an entry, like {\tt author}, {\tt year},
+{\tt title}, {\tt volume}, {\tt pages}, et cetera.
+According to the definitions in {\tt astron.bst}, \BibTeX\ takes care of
+the typographical intricacies of the {\it bibliography entry}, such
+as punctuation, italics for journal names and booktitles, boldface for
+journal volumes, etc.
+
+As an example, here is what {\tt astron.bst} made \BibTeX\ make of
+\verb|\cite{lamport}| in this document:
+%
+\begin{quotation}
+\noindent\begin{verbatim}
+\bibitem[\protect\astroncite{Lamport}{1986}]{lamport}
+Lamport, L.: 1986,
+\newblock {\em LaTeX, A Document Preparation System},
+\newblock Addison-Wesley, Reading, Massachusetts
+\end{verbatim}
+\end{quotation}
+
+\subsection{{\tt astron.sty}}
+
+The style file {\tt astron.sty} is a \LaTeX\ style file.
+It defines the \verb|\cite| and \verb|\cite*| commands such that
+\verb|\cite{|{\it label\/}\verb|}| is replaced by `(Author, year)'
+in the running text, and \verb|\cite*{|{\it label\/}\verb|}| by
+`(year)'.
+
+It also defines the {\tt thebibliography} environment.
+It causes the text `{\bf References}' to be produced as the heading of
+the list of references in `{\tt article}\,s', and `{\bf Bibliography}'
+as the heading in `{\tt report}\,s' and `{\tt book}\,s'
+
+The {\tt thebibliography} environment is defined in terms of the
+\LaTeX\ `{\tt list}' environment, in which the items are preceded
+by `\verb|\bibitem|'.
+All parameters related to the `{\tt list}' environment, such as
+`{\tt itemsep}', `{\tt leftmargin}', etc., are set at the
+\verb|\begin{thebibliography}| call. \medskip \\
+%
+To summarize in brief: the \BibTeX\ style {\tt astron.bst} takes care
+of the typographical details of each item in the bibliography;
+the \LaTeX\ style {\tt astron.sty} takes care of the global
+typographical appearance of the bibliography.
+
+\twocolumn
+\section{Mnemonics}
+\label{mnemonics}
+
+This appendix lists the mnemonics by which the abbreviations of journal
+names may be called in the {\tt journal} fields of the entries in the
+bibliographic database.
+See also Sect.~\ref{abbreviations}. \medskip \\
+
+% This file contains the abbreviations for journal names.
+% From: Astronomy and Astrophysics Abstracts, 1990, Vol. 49A.
+
+\newcommand{\printba}[2]{\noindent#2 \dotfill\ {\tt #1}\par}
+\frenchspacing
+\footnotesize
+
+\sloppy
+\printba{aao}{AAO Newsl.}
+\printba{aavso}{AAVSO Newsl.}
+\printba{acta}{Acta Astron.}
+\printba{aaguv}{Acta Astron. Geophys. Univ. Comenianae}
+\printba{actastsin}{Acta Astron. Sin.}
+\printba{actapsin}{Acta Astrophys. Sin.}
+\printba{agg}{Acta Geod. Geophys.}
+\printba{ags}{Acta Geophys. Sin.}
+\printba{appsb}{Acta Phys. Pol., Ser. B}
+\printba{atash}{Acta Tech. Acad. Sci. Hung.}
+\printba{advp}{Adv. Phys.}
+\printba{advsr}{Adv. Space Res.}
+\printba{aip}{AIP Conf. Proc.}
+\printba{aavsob}{Am. Assoc. Variable Star Obs. Bull.}
+\printba{aavsoc}{Am. Assoc. Variable Star Obs. Circ.}
+\printba{amjp}{Am. J. Phys.}
+\printba{aatar}{Anglo--Aust. Telesc., Annu. Rep.}
+\printba{ag}{Ann. Geophys.}
+\printba{apl}{Ann. Phys. (Leipzig)}
+\printba{apny}{Ann. Phys. (N.Y.)}
+\printba{app}{Ann. Phys. (Paris)}
+\printba{ao}{Appl. Opt.}
+\printba{appl}{Appl. Phys. Lett.}
+\printba{apb}{Appl. Phys., B}
+\printba{as}{Appl. Spectrosc.}
+\printba{ahes}{Arch. Hist. Exact Sci.}
+\printba{archuk}{Archeoastronomy (U.K.)}
+\printba{asbts}{Archenhold--Sternw. Berlin--Treptow, Sonderdr.}
+\printba{asbtvs}{Archenhold--Sternw. Berlin--Treptow, Vortr. Schr.}
+\printba{aonaicnl}{Arecibo Obs./NAIC, Newsl.}
+\printba{artsat}{Artif. Satell.}
+\printba{aiisao}{Astrofiz. Issled. Izv. Spets. Astrofiz. Obs.}
+\printba{af}{Astrofizika}
+\printba{aa}{Astron. Astrophys.}
+\printba{aar}{Astron. Astrophys. Rev.}
+\printba{aas}{Astron. Astrophys. Suppl. Ser.}
+\printba{abco}{Astron. Bull. (Carter Obs.)}
+\printba{agas}{Astron. Ges., Abstr. Ser.}
+\printba{asther}{Astron. Her.}
+\printba{aiubc}{Astron. Inst. Univ. Brno, Contrib.}
+\printba{astj}{Astron. J.}
+\printba{an}{Astron. Nachr.}
+\printba{astnow}{Astron. Now}
+\printba{astraum}{Astron. Raumfahrt}
+\printba{astriha}{Astron. Rechen-Inst.Heidelb., Mitt., Ser. A}
+\printba{astrihb}{Astron. Rechen-Inst.Heidelb., Mitt., Ser. B}
+\printba{astschu}{Astron. Sch.}
+\printba{asttid}{Astron. Tidsskr.}
+\printba{asttsir}{Astron. Tsirk.}
+\printba{astvest}{Astron. Vestn.}
+\printba{astzh}{Astron. Zh.}
+\printba{astuai}{Astronomia UAI}
+\printba{astie}{Astronomie}
+\printba{asty}{Astronomy}
+\printba{apj}{Astrophys. J.}
+\printba{apjl}{Astrophys. J., Lett.}
+\printba{apjss}{Astrophys. J., Suppl. Ser.}
+\printba{aplc}{Astrophys. Lett. Commmun.}
+\printba{apss}{Astrophys. Space. Sci.}
+\printba{ap}{Astrophysics}
+\printba{aanlsor}{Atti Accad. Naz. Lincei, Ser. Ottava, Rend.}
+\printba{ajast}{Aust. J. Astron.}
+\printba{ajp}{Aust. J. Phys.}
+\printba{bavm}{BAV Mitt.}
+\printba{bavr}{BAV Rundbrief}
+\printba{bbsag}{BBSAG Bull.}
+\printba{bestarnl}{Be Star Newsl.}
+\printba{bildw}{Bild Wiss.}
+\printba{bipm}{BIPM Circ. T}
+\printba{boaumkt}{Biul. Obs. Astron. Uniw. M. Kopernika Toruniu}
+\printba{boe}{Bol. Obs. Ebro}
+\printba{broa}{Bol. ROA}
+\printba{blm}{Boundary-Layer Meteorol.}
+\printba{boop}{Boyden Obs., Occas. Publ.}
+\printba{bastac}{Br. Astron. Assoc. Circ.}
+\printba{bjp}{Bulg. J. Phys.}
+\printba{baas}{Bull. Am. Astron. Soc.}
+\printba{baps}{Bull. Am. Phys. Soc.}
+\printba{bafoev}{Bull. Assoc. Fr. Obs. Etoiles Variables}
+\printba{bastic}{Bull. Astron. Inst. Czech.}
+\printba{basi}{Bull. Astron. Soc. India}
+\printba{bcao}{Bull. Crimean Astrophys. Obs.}
+\printba{bgsi}{Bull. Geogr. Surv. Inst.}
+\printba{bicds}{Bull. Inf. Cent. Donn\'ees Stellaires}
+\printba{boab}{Bull. Obs. Astron. Belgr.}
+\printba{crassgvs}{C. R. Acad. Sci., S\'er. G\'en., Vie Sci.}
+\printba{crassii}{C. R. Acad. Sci., II}
+\printba{cjp}{Can. J. Phys.}
+\printba{cm}{Celest. Mech.}
+\printba{cassos}{Cent. Astron. Sci. Spat., Obs. Sol.}
+\printba{cent}{Centaurus}
+\printba{cpl}{Chem. Phys. Lett.}
+\printba{chinaa}{Chin. Astron. Astrophys.}
+\printba{chinp}{Chin. Phys.}
+\printba{chinpl}{Chin. Phys. Lett.}
+\printba{ciel}{Ciel}
+\printba{cielt}{Ciel Terre}
+\printba{ccotl}{Circ. Czech. Obs. Time Lattiude}
+\printba{cinf}{Circ. Inf.}
+\printba{ctls}{Circ. Time Latitude Serv.}
+\printba{cqg}{Classical Quantum Gravity}
+\printba{cast}{Comments Astrophys.}
+\printba{cnpp}{Comments Nucl. Part. Phys.}
+\printba{cppcf}{Comments Plasma Phys. Controlled Fusion}
+\printba{cfsua}{Commun. Fac. Sci. Univ. Ankara, Ser. A2, A3}
+\printba{cko}{Commun. Konkoly Obs.}
+\printba{cmp}{Commun. Math. Phys.}
+\printba{culo}{Commun. Univ. Lond. Obs.}
+\printba{comp}{Comput. Phys.}
+\printba{compcom}{Comput. Phys. Commun.}
+\printba{cp}{Contemp. Phys.}
+\printba{caosp}{Contrib. Astron. Obs. Skalnat\'e Pleso}
+\printba{cap}{Contrib. Atmos. Phys.}
+\printba{cdaut}{Contrib. Dep. Astron., Univ. Tokyo}
+\printba{clo}{Contrib. Lick Obs.}
+\printba{cncopb}{Contrib. Nicholas Copernicus Obs. Planetarium Brno}
+\printba{cnjro}{Contrib. Nizamiah Japal-Rangapur Obs.}
+\printba{cpp}{Contrib. Plasma Phys.}
+\printba{cvvo}{Contrib. Van Vleck Obs.}
+\printba{cr}{Cosmic Res.}
+\printba{cryo}{Cryogenics}
+\printba{czjp}{Czech. J. Phys., Sect. B}
+\printba{drho}{Data Rep. Hydrogr. Obs., Ser. Astron. Geod.}
+\printba{dgkbawb}{Dtsch. Geod. Komm. Bayer. Akad. Wiss., Reihe B}
+\printba{dgkbawc}{Dtsch. Geod. Komm. Bayer. Akad. Wiss., Reihe C}
+\printba{dgkbawe}{Dtsch. Geod. Komm. Bayer. Akad. Wiss., Reihe E}
+\printba{epsl}{Earth Planet. Sci. Lett.}
+\printba{erb}{Earth Rotation Bull.}
+\printba{emp}{Earth, Moon, Planets}
+\printba{esrev}{Earth--Sci. Rev.}
+\printba{esab}{ESA Bull.}
+\printba{esaiuenl}{ESA IUE Newsl.}
+\printba{esaj}{ESA J.}
+\printba{esoar}{ESO Ann. Rep.}
+\printba{ejp}{Eur. J. Phys.}
+\printba{epl}{Europhys. Lett.}
+\printba{epn}{Europhys. News}
+\printba{expast}{Exp. Astron.}
+\printba{fiz}{Fizika}
+\printba{fortp}{Fortschr. Phys.}
+\printba{fp}{Found. Phys.}
+\printba{funcp}{Fundam. Cosmic Phys.}
+\printba{gaab}{G.~A.A.B.}
+\printba{gast}{G. Astron.}
+\printba{gem}{Gemini}
+\printba{grg}{Gen. Relativ. Gravitation}
+\printba{gca}{Geochim. Cosmochim. Acta}
+\printba{ga}{Geomagn. Aehron.}
+\printba{gafd}{Geophys. Astrophys. Fluid Dyn.}
+\printba{gj}{Geophys. J.}
+\printba{grl}{Geophys. Res. Lett.}
+\printba{geo}{Geophysics}
+\printba{geos}{GEOS Circ.}
+\printba{gbg}{Gerlands Beitr. Geophys.}
+\printba{heav}{Heavens}
+\printba{hpa}{Helv. Phys. Acta}
+\printba{hepnp}{High Energ. Phys. Nucl. Phys.}
+\printba{hob}{Hvar Obs. Bull.}
+\printba{hi}{Hyperfine Interact.}
+\printba{iappp}{I.A.P.P.P. Commun.}
+\printba{iauc}{IAU Circ.}
+\printba{iauib}{IAU Inf. Bull.}
+\printba{icarus}{Icarus}
+\printba{i3etm}{IEEE Trans. Magn.}
+\printba{i3etns}{IEEE Trans. Nucl. Sci.}
+\printba{i3etps}{IEEE Trans. Plasma Sci.}
+\printba{iersbb}{IERS Bull. B}
+\printba{iersba}{IERS Bull.--A}
+\printba{ijpap}{Indian J. Pure Appl. Phys.}
+\printba{ijrsp}{Indian J. Radio Space Phys.}
+\printba{ibvs}{Inf. Bull. Variable Stars}
+\printba{iaatub}{Inst. Astron. Astrophys. Tech. Univ. Berlin, Mitt.}
+\printba{iag}{Inst. Astron. Geod., Univ. Madr., Publ.}
+\printba{ia}{Inst. Astron., Univ. Camb., Annu. Rep.}
+\printba{icq}{Int. Comet Q.}
+\printba{ijimw}{Int. J. Infrared Millimeter Waves}
+\printba{ijmp}{Int. J. Mod. Phys. A}
+\printba{ijtp}{Int. J. Theor. Phys.}
+\printba{ip}{Inverse Probl.}
+\printba{iastj}{Ir. Astron. J.}
+\printba{iris}{IRIS Bull. A}
+\printba{iskz}{Issled. Solntsa Krasnykh Zvezd}
+\printba{intsa}{Itogi Nauki Tekh., Ser. Astron.}
+\printba{intsppk}{Itogi NAuki Tekh., Ser. Plazmennye Protsessy Kosmose}
+\printba{iaoe}{Izv. Astron. Obs. Ehngel'gardt.}
+\printba{ikao}{Izv. Krym. Astrofiz. Obs.}
+\printba{ivuzr}{Izv. Vyssch. Uchebn. Zaved., Radiofiz.}
+\printba{jasa}{J. Acoust. Soc. Am.}
+\printba{jaavso}{J. Am. Assoc. Variable Star Obs.}
+\printba{jam}{J. Appl. Meteorol.}
+\printba{jap}{J. Appl. Phys.}
+\printba{jastf}{J. Astron. Fr.}
+\printba{japast}{J. Astrophys. Astron.}
+\printba{jas}{J. Atmos. Sci.}
+\printba{jatp}{J. Atmos. Terr. Phys.}
+\printba{jbasta}{J. Br. Astron. Assoc.}
+\printba{jbis}{J. Br. Interplanet. Soc.}
+\printba{jcp}{J. Chem. Phys.}
+\printba{jcomp}{J. Comp. Phys.}
+\printba{jel}{J. Electrostat.}
+\printba{jfseu}{J. Fac Sci., Ege Univ., Ser. A}
+\printba{jfm}{J. Fluid Mech.}
+\printba{jgr}{J. Geophys. Res.}
+\printba{jhast}{J. Hist. Astron.}
+\printba{jms}{J. Mater. Sci.}
+\printba{jmp}{J. Math. Phys.}
+\printba{jmo}{J. Mod. Opt.}
+\printba{jop}{J. Opt. (Paris)}
+\printba{josaa}{J. Opt. Soc. Am. A}
+\printba{josab}{J. Opt. Soc. Am. B}
+\printba{jp}{J. Phys.}
+\printba{jpa}{J. Phys. A}
+\printba{jpb}{J. Phys. B}
+\printba{jpd}{J. Phys. D}
+\printba{jpe}{J. Phys. E}
+\printba{jpg}{J. Phys. G}
+\printba{jpsj}{J. Phys. Soc. Jpn.}
+\printba{jpp}{J. Plasma Phys.}
+\printba{jqsrt}{J. Quant. Spectrosc. Radiat. Transfer}
+\printba{jrasc}{J. R. Astron. Soc. Can.}
+\printba{jsp}{J. Stat. Phys.}
+\printba{jvst}{J. Vac. Sci. Technol., A}
+\printba{jetpl}{JETP Lett.}
+\printba{jhatd}{Johns Hopkins APL Tech. Dig.}
+\printba{jjap1}{Jpn. J. Appl. Phys., Part 1}
+\printba{jjap2}{Jpn. J. Appl. Phys., Part 2}
+\printba{kai}{Kapteyn Astron. Inst., Annu. Rep.}
+\printba{kexto}{Kexue Tongbao}
+\printba{kfnt}{Kinematika Fiz. Nebesn. Tel}
+\printba{kob}{Kodaikanal Obs. Bull.}
+\printba{kt}{Komet. Tsirk.}
+\printba{ki}{Kosm. Issled.}
+\printba{koz}{Kozmos}
+\printba{kpm}{KPM}
+\printba{lo}{Laser Optoelektron.}
+\printba{latc}{Latitude Circ.}
+\printba{lest}{LEST Found., Annu. Rep.}
+\printba{lmp}{Lett. Math. Phys.}
+\printba{lob}{Lick Obs. Bull.}
+\printba{mg}{Manuscr. Geod.}
+\printba{ml}{Mater. Lett.}
+\printba{mrb}{Mater. Res. Bull.}
+\printba{mfs}{Mem. Fac. Sci., Kyoto Univ., Ser. Phys., Astrophys., Geophys., Chem.}
+\printba{msai}{Mem. Soc. Astron. Ital.}
+\printba{merc}{Mercury}
+\printba{mess}{Messenger}
+\printba{met}{Meteoritics}
+\printba{metka}{Meteoritika}
+\printba{metro}{Metrologica}
+\printba{mpb}{Minor Planet Bull.}
+\printba{mpc}{Minor Planet Circ.}
+\printba{masbt}{Mitt. Archenold--Sternw. Berlin Treptow}
+\printba{mag}{Mitt. Astron. Ges.}
+\printba{mlotud}{Mitt. Lohrmann--Obs., Tech. Univ. Dresden}
+\printba{mss}{Mitt. Sternw. Sonneberg}
+\printba{mvs}{Mitt. Ver{\"a}nderliche Sterne}
+\printba{mzpe}{Mitt. Zentralinst. Phys. Erde}
+\printba{mpla}{Mod. Phys. Lett. A}
+\printba{mn}{Mon. Not. R. Astron. Soc.}
+\printba{mnassa}{Mon. Notes Astron. Soc. S. Afr.}
+\printba{nint}{Nablyud. Iskusstv. Nebesn. Tel.}
+\printba{nogb}{Nachr. Olbers--Ges. Bremen}
+\printba{naoj}{Natl. Astron. Obs. (Jpn.), Repr.}
+\printba{ng}{Natl. Geogr.}
+\printba{nraoa}{Natl. Radio Astron. Obs., Repr., Ser. A}
+\printba{nraob}{Natl. Radio Astron. Obs., Repr., Ser. B}
+\printba{nat}{Nature}
+\printba{natwis}{Naturwissenschaften}
+\printba{ni}{Nauchn. Inf.}
+\printba{nlasny}{News Lett. Astron. Soc. N.Y.}
+\printba{nrodaour}{Nizamiah Rangapur Obs. Dep. Astron., Osmania Univ., Repr.}
+\printba{nraow}{NRAO Workshop}
+\printba{nimpra}{Nucl. Instrum. Methods Phys. Res., Sect. A}
+\printba{nimprb}{Nucl. Instrum. Methods Phys. Res., Sect. B}
+\printba{npa}{Nucl. Phys. A}
+\printba{npb}{Nucl. Phys. B, Part. Phys.}
+\printba{nca}{Nuovo Cimento A}
+\printba{ncb}{Nuovo Cimento B}
+\printba{ncc}{Nuovo Cimento C}
+\printba{ot}{Obs. Trav.}
+\printba{obs}{Observatory}
+\printba{onl}{Occultation Newsl.}
+\printba{ozvp}{{\"O}sterr. Z. Vermessungswes. Photogramm.}
+\printba{oc}{Opt. Commun.}
+\printba{oe}{Opt. Eng.}
+\printba{olt}{Opt. Laser Technol.}
+\printba{ol}{Opt. Lett.}
+\printba{on}{Opt. News}
+\printba{os}{Opt. Spectrosc.}
+\printba{optik}{Optik}
+\printba{ofeb}{Origins Life Evol. Biosphere}
+\printba{orion}{Orion}
+\printba{orione}{Orione}
+\printba{oac}{Oss. Astrofis. Catania, Pubbl.}
+\printba{pz}{Perem. Zvezdy}
+\printba{pb}{Phys. Bl.}
+\printba{pcm}{Phys. Chem. Miner.}
+\printba{pfa}{Phys. Fluids, A}
+\printba{pfb}{Phys. Fluids, B}
+\printba{pla}{Phys. Lett. A}
+\printba{plb}{Phys. Lett. B}
+\printba{pr}{Phys. Rep.}
+\printba{pra}{Phys. Rev. A}
+\printba{prb}{Phys. Rev. B}
+\printba{prc}{Phys. Rev. C}
+\printba{prd}{Phys. Rev. D}
+\printba{prl}{Phys. Rev. Lett.}
+\printba{ps}{Phys. Scr.}
+\printba{ptch}{Phys. Teach.}
+\printba{ptod}{Phys. Today}
+\printba{pha}{Physica A}
+\printba{phb}{Physica B}
+\printba{phd}{Physica D}
+\printba{paz}{Pis'ma Astron. Zh.}
+\printba{pss}{Planet. Space Sci.}
+\printba{ppcf}{Plasma Phys. Controlled Fusion}
+\printba{pa}{Postepy Astron.}
+\printba{pram}{Pram\~{a}na}
+\printba{pri}{Priroda}
+\printba{pasa}{Proc. Astron. Soc. Aust.}
+\printba{pi3e}{Proc. IEEE}
+\printba{prsl}{Proc. R. Soc. London, Ser. A}
+\printba{posp}{Proceedings of SPIE}
+\printba{past}{Prog. Astron.}
+\printba{ptp}{Prog. Theor. Phys.}
+\printba{paicas}{Publ. Astron. Inst. Czech. Acad. Sci.}
+\printba{pasj}{Publ. Astron. Soc. Jpn.}
+\printba{pasp}{Publ. Astron. Soc. Pac.}
+\printba{pbao}{Publ. Beijing Astron. Obs.}
+\printba{pdaub}{Publ. Dep. Astron., Univ. Beogr.}
+\printba{pdao}{Publ. Dom. Astrophys. Obs.}
+\printba{pnlaoj}{Publ. Natl. Astron. Obs. Jpn.}
+\printba{ppmo}{Publ. Purple Mt. Obs.}
+\printba{psao}{Publ. Shaanxi Astron. Obs.}
+\printba{pscds}{Publ. Sp\'ec. Cent. Donn\'ees Stellaires}
+\printba{pyo}{Publ. Yunnan Obs.}
+\printba{pag}{Pure Appl. Geophys.}
+\printba{qbsa}{Q. Bull. Sol. Act.}
+\printba{qjras}{Q. J. R. Astron. Soc.}
+\printba{rad}{Radiant}
+\printba{rsci}{Radio Sci.}
+\printba{reche}{Recherche}
+\printba{rpp}{Rep. Prog. Phys.}
+\printba{ra}{Rev. Astron.}
+\printba{rg}{Rev. Geophys.}
+\printba{rmf}{Rev. Mex. Fis.}
+\printba{rmp}{Rev. Mod. Phys.}
+\printba{rrp}{Rev. Roum. Phys.}
+\printba{rsi}{Rev. Sci. Instrum.}
+\printba{rnc}{Riv. Nuovo Cimento}
+\printba{rh}{\v{R}\'{\i}\v{s}e hv\v{e}zd}
+\printba{saaoar}{S. Afr. Astron. Obs., Annu. Rep.}
+\printba{saaoc}{S. Afr. Astron. Obs., Circ.}
+\printba{saaon}{SAAO Newsl.}
+\printba{sciam}{Sci. Am.}
+\printba{scch}{Sci. China, Ser. A}
+\printba{srtu}{Sci. Rep. T\^{o}hoku Univ., Eighth Ser.}
+\printba{sc}{Science}
+\printba{sar}{Sendai Astron. Rap.}
+\printba{st}{Sidereal Times}
+\printba{sky}{Sky Telesc.}
+\printba{sbaavso}{Sol. Bull. (AAVSO)}
+\printba{se}{Sol. Energy}
+\printba{sp}{Sol. Phys.}
+\printba{srd}{Sol. Radio Data}
+\printba{ssres}{Sol. Syst. Res.}
+\printba{sdb}{Soln. Dannye, Byull.}
+\printba{sonne}{Sonne}
+\printba{sbo}{Soobshch. Byurak. Obs.}
+\printba{ssao}{Soobshch. Spets. Astrofiz. Obs.}
+\printba{sost}{South. Stars}
+\printba{sa}{Sov. Astron.}
+\printba{sal}{Sov. Astron. Lett.}
+\printba{sjot}{Sov. J. Opt. Technol.}
+\printba{spd}{Sov. Phys. -- Dokl.}
+\printba{spj}{Sov. Phys. -- JETP}
+\printba{spu}{Sov. Phys. -- Usp.}
+\printba{space}{Space}
+\printba{ssr}{Space Sci. Rev.}
+\printba{stsi}{Space Telesc. Sci. Inst., Newsl.}
+\printba{sf}{Spaceflight}
+\printba{sterne}{Sterne}
+\printba{sw}{Sterne Weltraum}
+\printba{sb}{Sternenbote}
+\printba{strlast}{Strolling Astron.}
+\printba{sgg}{Stud. Geophys. Geod.}
+\printba{taot}{Tartu Astrof{\"u}{\"u}s. Obs. Teated}
+\printba{tect}{Tectonophysics}
+\printba{tellus}{Tellus, Ser. A}
+\printba{tmf}{Teor. Mat. Fiz.}
+\printba{tp}{Theor. Pap.}
+\printba{tsb}{Time Serv. Bull.}
+\printba{tmnr}{Tokyo Meteor Network Rep.}
+\printba{tai}{Tsirk. Astron. Inst. (Tashkent)}
+\printba{ufz}{Ukr. Fiz. Zh.}
+\printba{ucla}{Universe Classroom}
+\printba{uao}{Upps. Astron. Obs., Rep.}
+\printba{urania}{Urania}
+\printba{usnoc}{U.S. Nav. Obs., Circ.}
+\printba{usnos4}{U.S. Nav. Obs., Ser. 4}
+\printba{ufn}{Usp. Fiz. Nauk}
+\printba{vsb}{Variable Star Bull.}
+\printba{vasiona}{Vasiona}
+\printba{varih}{Ver{\"o}ff. Astron. Rechen--Inst. Heidelb.}
+\printba{vzpe}{Ver{\"o}ff. Zentralinst. Phys. Erde}
+\printba{vesmir}{Vesm\'{\i}r}
+\printba{vansssr}{Vestn. Akad. Nauk SSSR}
+\printba{vku}{Vestn. Kiev. Univ., Astron.}
+\printba{va}{Vistas Astron.}
+\printba{wgn}{WGN}
+\printba{wztud}{Wiss. Z. Tech. Univ. Dresden}
+\printba{yama}{Yamamoto Circ.}
+\printba{zamp}{Z. Angew. Math. Phys.}
+\printba{zna}{Z. Naturforsch., A}
+\printba{zpa}{Z. Phys., A}
+\printba{zpc}{Z. Phys., C}
+\printba{zv}{Zemlya Vselennaya}
+\printba{zenit}{Zenit}
+\printba{zetf}{Zh. Ehksp. Teor. Fiz.}
+
+\end{document}
diff --git a/biblio/bibtex/contrib/astron/astron.bst b/biblio/bibtex/contrib/astron/astron.bst
new file mode 100644
index 0000000000..b8b6e88172
--- /dev/null
+++ b/biblio/bibtex/contrib/astron/astron.bst
@@ -0,0 +1,1175 @@
+% Copyright (C) 1990 Sake J. Hogeveen.
+
+% This is ASTRON.BST, a BibTeX style for use with BibTeX version 0.99c.
+% ASTRON.BST has to be used in conjunction with the LaTeX style ASTRON.STY.
+% The use of both styles is documented in ASTDOC.TEX.
+
+% ASTRON.BST is an adaptation of APALIKE.BST by Oren Patashnik and Suzan King.
+
+% This style produces citations in the `author-year' format, which is widely
+% used among astronomical journals.
+% It supports two forms of citation: the \cite command produces: (Author, year)
+% in the text; the \cite* command only: (year) .
+
+% The long an short citation trickery is adapted from NAMED.BST by
+% Peter F. Patel-Schneider.
+
+% Copyright Notice:
+% The files ASTRON.BST, ASTRON.STY, ASTDOC.TEX, ASTDOC.BIB, EXAMPLE.TEX,
+% EXAMPLE.BIB, MNEMONIC.BIB, and TEMPLATE.BIB are a package.
+% You may copy and distribute them freely for non-commercial purposes,
+% provided that you keep the package together and this copyright notice
+% in tact.
+% You may not alter or modify the files; this helps to ensure that all
+% distributions of ASTRON.BST and related files are the same.
+% If you make any modifications, then you must give the files new names,
+% other than the present.
+% The author bears no responsibilities for errors in this document or
+% the software it describes; and shall not be held liable for any indirect,
+% incidental, or consequential damages.
+
+ENTRY
+ { address
+ author
+ booktitle
+ chapter
+ edition
+ editor
+ howpublished
+ institution
+ journal
+ key
+% month not used in apalike
+ note
+ number
+ organization
+ pages
+ publisher
+ school
+ series
+ title
+ type
+ volume
+ year
+ }
+ {}
+ { label extra.label sort.label }
+
+INTEGERS { output.state before.all mid.sentence after.sentence after.block }
+
+FUNCTION {init.state.consts}
+{ #0 'before.all :=
+ #1 'mid.sentence :=
+ #2 'after.sentence :=
+ #3 'after.block :=
+}
+
+STRINGS { s t }
+
+FUNCTION {output.nonnull}
+{ 's :=
+ output.state mid.sentence =
+ { ", " * write$ }
+ { output.state after.block =
+ { ", " * write$
+ newline$
+ "\newblock " write$
+ }
+ { output.state before.all =
+ 'write$
+ { ", " * write$ }
+ if$
+ }
+ if$
+ mid.sentence 'output.state :=
+ }
+ if$
+ s
+}
+
+FUNCTION {output.nonnull.extra}
+{ 's :=
+ output.state mid.sentence =
+ { " " * write$ }
+ { output.state after.block =
+ { ", " * write$
+ newline$
+ "\newblock " write$
+ }
+ { output.state before.all =
+ 'write$
+ { ", " * write$ }
+ if$
+ }
+ if$
+ mid.sentence 'output.state :=
+ }
+ if$
+ s
+}
+
+FUNCTION {output}
+{ duplicate$ empty$
+ 'pop$
+ 'output.nonnull
+ if$
+}
+
+FUNCTION {output.extra}
+{ duplicate$ empty$
+ 'pop$
+ 'output.nonnull.extra
+ if$
+}
+
+FUNCTION {output.check}
+{ 't :=
+ duplicate$ empty$
+ { pop$ "empty " t * " in " * cite$ * warning$ }
+ 'output.nonnull
+ if$
+}
+
+FUNCTION {output.check.extra}
+{ 't :=
+ duplicate$ empty$
+ { pop$ "empty " t * " in " * cite$ * warning$ }
+ 'output.nonnull.extra
+ if$
+}
+
+% apalike needs this function because
+% the year has special punctuation;
+% apalike ignores the month
+FUNCTION {output.year.check}
+{ year empty$
+ { "empty year in " cite$ * warning$ }
+ { write$
+ ": " year * extra.label *
+ mid.sentence 'output.state :=
+ }
+ if$
+}
+
+FUNCTION {output.bibitem}
+{ newline$
+ "\bibitem[" write$
+ label write$
+ "]{" write$
+ cite$ write$
+ "}" write$
+ newline$
+ ""
+ before.all 'output.state :=
+}
+
+FUNCTION {fin.entry}
+{ write$
+ newline$
+}
+
+FUNCTION {new.block}
+{ output.state before.all =
+ 'skip$
+ { after.block 'output.state := }
+ if$
+}
+
+FUNCTION {new.sentence}
+{ output.state after.block =
+ 'skip$
+ { output.state before.all =
+ 'skip$
+ { after.sentence 'output.state := }
+ if$
+ }
+ if$
+}
+
+FUNCTION {not}
+{ { #0 }
+ { #1 }
+ if$
+}
+
+FUNCTION {and}
+{ 'skip$
+ { pop$ #0 }
+ if$
+}
+
+FUNCTION {or}
+{ { pop$ #1 }
+ 'skip$
+ if$
+}
+
+FUNCTION {new.block.checkb}
+{ empty$
+ swap$ empty$
+ and
+ 'skip$
+ 'new.block
+ if$
+}
+
+FUNCTION {field.or.null}
+{ duplicate$ empty$
+ { pop$ "" }
+ 'skip$
+ if$
+}
+
+FUNCTION {boldface}
+{ duplicate$ empty$
+ { pop$ "" }
+ { "{\bf " swap$ * "}" * }
+ if$
+}
+
+FUNCTION {emphasize}
+{ duplicate$ empty$
+ { pop$ "" }
+ { "{\em " swap$ * "}" * }
+ if$
+}
+
+INTEGERS { nameptr namesleft numnames }
+
+FUNCTION {format.names}
+{ 's :=
+ #1 'nameptr :=
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ { s nameptr "{vv~}{ll}{, jj}{, f.}" format.name$ 't := % last name first
+ nameptr #1 >
+ { namesleft #1 >
+ { ", " * t * }
+ { numnames #2 >
+ { "," * }
+ 'skip$
+ if$
+ t "others" =
+ { " et~al." * }
+ { " and " * t * }
+ if$
+ }
+ if$
+ }
+ 't
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+}
+
+FUNCTION {format.ed.names}
+{ 's :=
+ #1 'nameptr :=
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ { s nameptr "{f. }{vv~}{ll}{, jj}" format.name$ 't :=
+ nameptr #1 >
+ { namesleft #1 >
+ { ", " * t * }
+ { numnames #2 >
+ { "," * }
+ 'skip$
+ if$
+ t "others" =
+ { " et~al." * }
+ { " and " * t * }
+ if$
+ }
+ if$
+ }
+ 't
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+}
+
+FUNCTION {format.authors}
+{ author empty$
+ { "" }
+ { author format.names }
+ if$
+}
+
+FUNCTION {format.key} % this function is just for apalike
+{ empty$
+ { key field.or.null }
+ { "" }
+ if$
+}
+
+FUNCTION {format.editors}
+{ editor empty$
+ { "" }
+ { editor format.names
+ editor num.names$ #1 >
+ { " (eds.)" * }
+ { " (ed.)" * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.editors.extra}
+{ editor empty$
+ { "" }
+ { editor format.ed.names
+ editor num.names$ #1 >
+ { " (eds.)" * }
+ { " (ed.)" * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.title}
+{ title empty$
+ { "" }
+ { title "t" change.case$ }
+ if$
+}
+
+FUNCTION {n.dashify}
+{ 't :=
+ ""
+ { t empty$ not }
+ { t #1 #1 substring$ "-" =
+ { t #1 #2 substring$ "--" = not
+ { "--" *
+ t #2 global.max$ substring$ 't :=
+ }
+ { { t #1 #1 substring$ "-" = }
+ { "-" *
+ t #2 global.max$ substring$ 't :=
+ }
+ while$
+ }
+ if$
+ }
+ { t #1 #1 substring$ *
+ t #2 global.max$ substring$ 't :=
+ }
+ if$
+ }
+ while$
+}
+
+FUNCTION {first.page.number}
+{ 't :=
+ ""
+ { t "" =
+ { #0 }
+ { t #1 #1 substring$ "-" = not }
+ if$
+ }
+ { t #1 #1 substring$ *
+ t #2 global.max$ substring$ 't :=
+ }
+ while$
+}
+
+FUNCTION {format.btitle}
+{ title emphasize
+}
+
+FUNCTION {tie.or.space.connect}
+{ duplicate$ text.length$ #3 <
+ { "~" }
+ { " " }
+ if$
+ swap$ * *
+}
+
+FUNCTION {either.or.check}
+{ empty$
+ 'pop$
+ { "can't use both " swap$ * " fields in " * cite$ * warning$ }
+ if$
+}
+
+FUNCTION {format.bvolume}
+{ volume empty$
+ { "" }
+ { "Vol." volume tie.or.space.connect
+ series empty$
+ 'skip$
+ { " of " * series emphasize * }
+ if$
+ "volume and number" number either.or.check
+ }
+ if$
+}
+
+FUNCTION {format.number.series}
+{ volume empty$
+ { number empty$
+ { series field.or.null }
+ { output.state mid.sentence =
+ { "No." }
+ { "No." }
+ if$
+ number tie.or.space.connect
+ series empty$
+ { "there's a number but no series in " cite$ * warning$ }
+ { " in " * series * }
+ if$
+ }
+ if$
+ }
+ { "" }
+ if$
+}
+
+FUNCTION {format.edition}
+{ edition empty$
+ { "" }
+ { output.state mid.sentence =
+ { edition "l" change.case$ " edition" * }
+ { edition "t" change.case$ " edition" * }
+ if$
+ }
+ if$
+}
+
+INTEGERS { multiresult }
+
+FUNCTION {multi.page.check}
+{ 't :=
+ #0 'multiresult :=
+ { multiresult not
+ t empty$ not
+ and
+ }
+ { t #1 #1 substring$
+ duplicate$ "-" =
+ swap$ duplicate$ "," =
+ swap$ "+" =
+ or or
+ { #1 'multiresult := }
+ { t #2 global.max$ substring$ 't := }
+ if$
+ }
+ while$
+ multiresult
+}
+
+FUNCTION {format.pages}
+{ pages empty$
+ { "" }
+ { pages multi.page.check
+ { "pp" pages n.dashify tie.or.space.connect }
+ { "p." pages tie.or.space.connect }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.page}
+{ pages empty$
+ { "" }
+ { "p.~" pages first.page.number * }
+ if$
+}
+
+FUNCTION {format.vol.num.pages}
+{ volume field.or.null
+ number empty$
+ 'skip$
+ { "(" number * ")" * *
+ volume empty$
+ { "there's a number but no volume in " cite$ * warning$ }
+ 'skip$
+ if$
+ }
+ if$
+ pages empty$
+ 'skip$
+ { duplicate$ empty$
+ { pop$ format.pages }
+ { boldface ", " * pages n.dashify * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.vol.num.page}
+{ volume field.or.null
+ number empty$
+ 'skip$
+ { "(" number * ")" * *
+ volume empty$
+ { "there's a number but no volume in " cite$ * warning$ }
+ 'skip$
+ if$
+ }
+ if$
+ pages empty$
+ 'skip$
+ { duplicate$ empty$
+ { pop$ format.pages }
+ { boldface ", " * pages first.page.number * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.chapter.pages}
+{ chapter empty$
+ 'format.pages
+ { type empty$
+ { "Chapt." }
+ { type "l" change.case$ }
+ if$
+ chapter tie.or.space.connect
+ pages empty$
+ 'skip$
+ { ", " * format.pages * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.in.ed.booktitle}
+{ booktitle empty$
+ { "" }
+ { editor empty$
+ { "in " booktitle emphasize * }
+ { "in " format.editors.extra * ", " * booktitle emphasize * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.thesis.type}
+{ type empty$
+ 'skip$
+ { pop$
+ type "t" change.case$
+ }
+ if$
+}
+
+FUNCTION {format.tr.number}
+{ type empty$
+ { "Technical Report" }
+ 'type
+ if$
+ number empty$
+ { "t" change.case$ }
+ { number tie.or.space.connect }
+ if$
+}
+
+FUNCTION {format.article.crossref}
+{ "in" % this is for apalike
+ " \cite{" * crossref * "}" *
+}
+
+FUNCTION {format.book.crossref}
+{ volume empty$
+ { "empty volume in " cite$ * "'s crossref of " * crossref * warning$
+ "in "
+ }
+ { "Vol." volume tie.or.space.connect
+ " of " *
+ }
+ if$
+ "\cite{" * crossref * "}" * % this is for apalike
+}
+
+FUNCTION {format.incoll.inproc.crossref}
+{ "in" % this is for apalike
+ " \cite{" * crossref * "}" *
+}
+
+FUNCTION {article}
+{ output.bibitem
+ format.authors "author" output.check
+ author format.key output % special for
+ output.year.check % apalike
+ new.block
+ crossref missing$
+ { journal emphasize "journal" output.check.extra
+ format.vol.num.page output.extra
+ }
+ { format.article.crossref output.nonnull
+ format.page output
+ }
+ if$
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {book}
+{ output.bibitem
+ author empty$
+ { format.editors "author and editor" output.check
+ editor format.key output
+ }
+ { format.authors output.nonnull
+ crossref missing$
+ { "author and editor" editor either.or.check }
+ 'skip$
+ if$
+ }
+ if$
+ output.year.check % special for apalike
+ new.block
+ format.btitle "title" output.check
+ crossref missing$
+ { format.bvolume output
+ new.block
+ format.number.series output
+ new.sentence
+ publisher "publisher" output.check
+ address output
+ }
+ { new.block
+ format.book.crossref output.nonnull
+ }
+ if$
+ format.edition output
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {booklet}
+{ output.bibitem
+ format.authors output
+ author format.key output % special for
+ output.year.check % apalike
+ new.block
+ format.btitle "title" output.check
+ new.block
+ howpublished output
+ address output
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {inbook}
+{ output.bibitem
+ author empty$
+ { format.editors "author and editor" output.check
+ editor format.key output
+ }
+ { format.authors output.nonnull
+ crossref missing$
+ { "author and editor" editor either.or.check }
+ 'skip$
+ if$
+ }
+ if$
+ output.year.check % special for apalike
+ new.block
+ format.btitle "title" output.check
+ crossref missing$
+ { format.bvolume output
+ format.chapter.pages "chapter and pages" output.check
+ new.block
+ format.number.series output
+ new.sentence
+ publisher "publisher" output.check
+ address output
+ }
+ { format.chapter.pages "chapter and pages" output.check
+ new.block
+ format.book.crossref output.nonnull
+ }
+ if$
+ format.edition output
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {incollection}
+{ output.bibitem
+ format.authors "author" output.check
+ author format.key output % special for
+ output.year.check % apalike
+ new.block
+% format.title "title" output.check
+% new.block
+ crossref missing$
+ { format.in.ed.booktitle "booktitle" output.check
+ format.bvolume output
+ format.number.series output
+ format.chapter.pages output
+ new.sentence
+ publisher "publisher" output.check
+ address output
+ format.edition output
+ }
+ { format.incoll.inproc.crossref output.nonnull
+ format.chapter.pages output
+ }
+ if$
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {inproceedings}
+{ output.bibitem
+ format.authors "author" output.check
+ author format.key output % special for
+ output.year.check % apalike
+ new.block
+% format.title "title" output.check
+% new.block
+ crossref missing$
+ { format.in.ed.booktitle "booktitle" output.check
+ format.bvolume output
+ format.number.series output
+ format.pages output
+ new.sentence % there's no year
+ organization output % here so things
+ publisher output % are simpler
+ address output % for apalike
+ }
+ { format.incoll.inproc.crossref output.nonnull
+ format.pages output
+ }
+ if$
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {conference} { inproceedings }
+
+FUNCTION {manual}
+{ output.bibitem
+ format.authors output
+ author format.key output % special for
+ output.year.check % apalike
+ new.block
+ format.btitle "title" output.check
+ organization address new.block.checkb
+ organization output
+ address output
+ format.edition output
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {mastersthesis}
+{ output.bibitem
+ format.authors "author" output.check
+ author format.key output % special for
+ output.year.check % apalike
+ new.block
+% format.title "title" output.check
+% new.block
+ "Master's thesis" emphasize format.thesis.type output.nonnull
+ school "school" output.check
+ address output
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {misc}
+{ output.bibitem
+ format.authors output
+ author format.key output % special for
+ output.year.check % apalike
+ new.block
+ format.btitle output
+ new.block
+ howpublished output
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {phdthesis}
+{ output.bibitem
+ format.authors "author" output.check
+ author format.key output % special for
+ output.year.check % apalike
+ new.block
+% format.btitle "title" output.check
+% new.block
+ "Ph.D. thesis" emphasize format.thesis.type output.nonnull
+ school "school" output.check
+ address output
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {proceedings}
+{ output.bibitem
+ format.editors output
+ editor format.key output % special for
+ output.year.check % apalike
+ new.block
+ format.btitle "title" output.check
+ format.bvolume output
+ format.number.series output
+ address output % for apalike
+ new.sentence % we always output
+ organization output % a nonempty organization
+ publisher output % here
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {techreport}
+{ output.bibitem
+ format.authors "author" output.check
+ author format.key output % special for
+ output.year.check % apalike
+ new.block
+ format.btitle "title" output.check
+ new.block
+ format.tr.number output.nonnull
+ institution "institution" output.check
+ address output
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {unpublished}
+{ output.bibitem
+ format.authors "author" output.check
+ author format.key output % special for
+ output.year.check % apalike
+ new.block
+ format.btitle "title" output.check
+ new.block
+ note "note" output.check
+ fin.entry
+}
+
+FUNCTION {default.type} { misc }
+
+MACRO {jan} {"Jan."}
+
+MACRO {feb} {"Feb."}
+
+MACRO {mar} {"Mar."}
+
+MACRO {apr} {"Apr,"}
+
+MACRO {may} {"May"}
+
+MACRO {jun} {"June"}
+
+MACRO {jul} {"July"}
+
+MACRO {aug} {"Aug."}
+
+MACRO {sep} {"Sept."}
+
+MACRO {oct} {"Oct."}
+
+MACRO {nov} {"Nov."}
+
+MACRO {dec} {"Dec."}
+
+READ
+
+FUNCTION {sortify}
+{ purify$
+ "l" change.case$
+}
+
+INTEGERS { len }
+
+FUNCTION {chop.word}
+{ 's :=
+ 'len :=
+ s #1 len substring$ =
+ { s len #1 + global.max$ substring$ }
+ 's
+ if$
+}
+
+% There are three apalike cases: one person (Jones),
+% two (Jones and de~Bruijn), and more (Jones et~al.).
+% This function is much like format.crossref.editors.
+%
+FUNCTION {format.lab.names}
+{ 's :=
+ s #1 "{vv~}{ll}" format.name$
+ s num.names$ duplicate$
+ #2 >
+ { pop$ " et~al." * }
+ { #2 <
+ 'skip$
+ { s #2 "{ff }{vv }{ll}{ jj}" format.name$ "others" =
+ { " et~al." * }
+ { " and " * s #2 "{vv~}{ll}" format.name$ * }
+ if$
+ }
+ if$
+ }
+ if$
+}
+
+FUNCTION {author.key.label}
+{ author empty$
+ { key empty$
+ { cite$ #1 #3 substring$ }
+ 'key % apalike uses the whole key
+ if$
+ }
+ { author format.lab.names }
+ if$
+}
+
+FUNCTION {author.editor.key.label}
+{ author empty$
+ { editor empty$
+ { key empty$
+ { cite$ #1 #3 substring$ }
+ 'key % apalike uses the whole key
+ if$
+ }
+ { editor format.lab.names }
+ if$
+ }
+ { author format.lab.names }
+ if$
+}
+
+FUNCTION {editor.key.label}
+{ editor empty$
+ { key empty$
+ { cite$ #1 #3 substring$ }
+ 'key % apalike uses the whole key, no organization
+ if$
+ }
+ { editor format.lab.names }
+ if$
+}
+
+FUNCTION {calc.label}
+{ type$ "book" =
+ type$ "inbook" =
+ or
+ 'author.editor.key.label
+ { type$ "proceedings" =
+ 'editor.key.label % apalike ignores organization
+ 'author.key.label % for labeling and sorting
+ if$
+ }
+ if$
+ "\protect\astroncite{" swap$ * "}{" % these three lines are
+ * % for apalike, which
+ year field.or.null purify$ #-1 #4 substring$ % uses all four digits
+ * % the mathing closing "}" comes in at the reverse.pass
+ 'label :=
+}
+
+FUNCTION {sort.format.names}
+{ 's :=
+ #1 'nameptr :=
+ ""
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ { nameptr #1 >
+ { " " * }
+ 'skip$
+ if$ % apalike uses initials
+ s nameptr "{vv{ } }{ll{ }}{ f{ }}{ jj{ }}" format.name$ 't := % <= here
+ nameptr numnames = t "others" = and
+ { "et al" * }
+ { t sortify * }
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+}
+
+FUNCTION {sort.format.title}
+{ 't :=
+ "A " #2
+ "An " #3
+ "The " #4 t chop.word
+ chop.word
+ chop.word
+ sortify
+ #1 global.max$ substring$
+}
+
+FUNCTION {author.sort}
+{ author empty$
+ { key empty$
+ { "to sort, need author or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { author sort.format.names }
+ if$
+}
+
+FUNCTION {author.editor.sort}
+{ author empty$
+ { editor empty$
+ { key empty$
+ { "to sort, need author, editor, or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { editor sort.format.names }
+ if$
+ }
+ { author sort.format.names }
+ if$
+}
+
+FUNCTION {editor.sort}
+{ editor empty$
+ { key empty$
+ { "to sort, need editor or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { editor sort.format.names }
+ if$
+}
+
+% apalike uses two sorting passes; the first one sets the
+% labels so that the `a's, `b's, etc. can be computed;
+% the second pass puts the references in "correct" order.
+% The presort function is for the first pass. It computes
+% label, sort.label, and title, and then concatenates.
+FUNCTION {presort}
+{ calc.label
+ label sortify
+ " "
+ *
+ type$ "book" =
+ type$ "inbook" =
+ or
+ 'author.editor.sort
+ { type$ "proceedings" =
+ 'editor.sort
+ 'author.sort
+ if$
+ }
+ if$
+ #1 entry.max$ substring$ % for
+ 'sort.label := % apalike
+ sort.label % style
+ *
+ " "
+ *
+ title field.or.null
+ sort.format.title
+ *
+ #1 entry.max$ substring$
+ 'sort.key$ :=
+}
+
+ITERATE {presort}
+
+SORT % by label, sort.label, title---for final label calculation
+
+STRINGS { last.label next.extra } % apalike labels are only for the text;
+
+INTEGERS { last.extra.num } % there are none in the bibliography
+
+FUNCTION {initialize.extra.label.stuff} % and hence there is no `longest.label'
+{ #0 int.to.chr$ 'last.label :=
+ "" 'next.extra :=
+ #0 'last.extra.num :=
+}
+
+FUNCTION {forward.pass}
+{ last.label label =
+ { last.extra.num #1 + 'last.extra.num :=
+ last.extra.num int.to.chr$ 'extra.label :=
+ }
+ { "a" chr.to.int$ 'last.extra.num :=
+ "" 'extra.label :=
+ label 'last.label :=
+ }
+ if$
+}
+
+FUNCTION {reverse.pass}
+{ next.extra "b" =
+ { "a" 'extra.label := }
+ 'skip$
+ if$
+ label extra.label * "}" * 'label :=
+ extra.label 'next.extra :=
+}
+
+EXECUTE {initialize.extra.label.stuff}
+
+ITERATE {forward.pass}
+
+REVERSE {reverse.pass}
+
+% Now that the label is right we sort for real,
+% on sort.label then year then title. This is
+% for the second sorting pass.
+FUNCTION {bib.sort.order}
+{ sort.label
+ " "
+ *
+ year field.or.null sortify
+ *
+ " "
+ *
+ title field.or.null
+ sort.format.title
+ *
+ #1 entry.max$ substring$
+ 'sort.key$ :=
+}
+
+ITERATE {bib.sort.order}
+
+SORT % by sort.label, year, title---giving final bibliography order
+
+FUNCTION {begin.bib}
+{ preamble$ empty$ % no \etalchar in apalike
+ 'skip$
+ { preamble$ write$ newline$ }
+ if$
+ "\begin{thebibliography}{}" write$ newline$ % no labels in apalike
+}
+
+EXECUTE {begin.bib}
+
+EXECUTE {init.state.consts}
+
+ITERATE {call.type$}
+
+FUNCTION {end.bib}
+{ newline$
+ "\end{thebibliography}" write$ newline$
+}
+
+EXECUTE {end.bib}
diff --git a/biblio/bibtex/contrib/astron/astron.sty b/biblio/bibtex/contrib/astron/astron.sty
new file mode 100644
index 0000000000..d42ed59188
--- /dev/null
+++ b/biblio/bibtex/contrib/astron/astron.sty
@@ -0,0 +1,70 @@
+% Copyright (C) 1990 Sake J. Hogeveen.
+
+% This is ASTRON.STY, a LaTeX style for use with the BibTeX style ASTRON.BST.
+
+% ASTRON.BST is an adaptation of APALIKE.BST by Oren Patashnik and Suzan King.
+
+% This style produces citations in the `author-year' format, which is widely
+% used among astronomical journals.
+% It supports two forms of citation: the \cite command produces: (Author, year)
+% in the text; the \cite* command only: (year) .
+
+% The long an short citation trickery is adapted from NAMED.BST by
+% Peter F. Patel-Schneider.
+
+% Copyright Notice:
+% The files ASTRON.BST, ASTRON.STY, ASTDOC.TEX, ASTDOC.BIB, EXAMPLE.TEX,
+% EXAMPLE.BIB, MNEMONIC.BIB, and TEMPLATE.BIB are a package.
+% You may copy and distribute them freely for non-commercial purposes,
+% provided that you keep the package together and this copyright notice
+% in tact.
+% You may not alter or modify the files; this helps to ensure that all
+% distributions of ASTRON.BST and related files are the same.
+% If you make any modifications, then you must give the files new names,
+% other than the present.
+% The author bears no responsibilities for errors in this document or
+% the software it describes; and shall not be held liable for any indirect,
+% incidental, or consequential damages.
+
+% If you find any bugs in the style files, or omissions in the documentation,
+% please report them to: E-mail A410SAKE@SARA.NL; UUCP: l42@nikhefh.nikhef.nl
+
+\@ifundefined{chapter}{\def\thebibliography#1{\section*{References\@mkboth
+ {REFERENCES}{REFERENCES}}\list
+ {\relax}{\setlength{\labelsep}{0em}
+ \setlength{\itemindent}{-\bibhang}
+ \setlength{\itemsep}{0pt}
+ \setlength{\parsep}{0pt}
+ \setlength{\leftmargin}{\bibhang}}
+ \def\newblock{\hskip .11em plus .33em minus .07em}
+ \sloppy\clubpenalty4000\widowpenalty4000
+ \sfcode`\.=1000\relax}}%
+{\def\thebibliography#1{\chapter*{Bibliography\@mkboth
+ {BIBLIOGRAPHY}{BIBLIOGRAPHY}}\list
+ {\relax}{\setlength{\labelsep}{0em}
+ \setlength{\itemindent}{-\bibhang}
+ \setlength{\itemsep}{0pt}
+ \setlength{\parsep}{0pt}
+ \setlength{\leftmargin}{\bibhang}}
+ \def\newblock{\hskip .11em plus .33em minus .07em}
+ \sloppy\clubpenalty4000\widowpenalty4000
+ \sfcode`\.=1000\relax}}
+
+\newlength{\bibhang}
+\setlength{\bibhang}{1.4em}
+
+\let\@internalcite\cite
+\def\cite{\@ifstar{\citeyear}{\citefull}}
+\def\citefull{\def\astroncite##1##2{##1, ##2}\@internalcite}
+\def\citeyear{\def\astroncite##1##2{##2}\@internalcite}
+
+\def\@citex[#1]#2{\if@filesw\immediate\write\@auxout{\string\citation{#2}}\fi
+ \def\@citea{}\@cite{\@for\@citeb:=#2\do
+ {\@citea\def\@citea{; }\@ifundefined
+ {b@\@citeb}{{\bf ?}\@warning
+ {Citation `\@citeb' on page \thepage \space undefined}}%
+{\csname b@\@citeb\endcsname}}}{#1}}
+
+\def\@cite#1#2{(#1\if@tempswa , #2\fi)}
+\def\@biblabel#1{}
+
diff --git a/biblio/bibtex/contrib/astron/example.bib b/biblio/bibtex/contrib/astron/example.bib
new file mode 100644
index 0000000000..0086753bea
--- /dev/null
+++ b/biblio/bibtex/contrib/astron/example.bib
@@ -0,0 +1,120 @@
+% In this example file, the entries are listed alphabetically.
+% In a real bibliographic database it is, of course, better to maintain
+% the entries in alphabetical order of the authors.
+
+@ARTICLE{einstein,
+ author = "Albert Einstein",
+ year = 1911,
+ journal = "Wied. Ann.",
+ volume = 35,
+ pages = "898--908"}
+
+@BOOK{burkhardt,
+ year = 1990,
+ title = "Astronomy and Astrophysics Abstracts",
+ publisher = "Springer-Verlag",
+ address = "Heidelberg",
+ editor = "G. Burkhardt and U. Esser and H. Hefele and I. Heinrich
+ and W. Hoffmann and D. Krahn and V. R. Matas and
+ L. D. Schmadel and R. Wielen and G. Zech",
+ volume = "49A"}
+
+@BOOKLET{fokker,
+ author = "A. D. Fokker",
+ year = 1972,
+ title = "Zonsactiviteit",
+ howpublished = "Sterrekundig Instituut",
+ address = "Utrecht"}
+
+% `CONFERENCE' is the same as `inproceedings'.
+
+@INBOOK{pringle:ibs,
+ editor = "J. E. Pringle and R. A. Wade",
+ year = 1985,
+ chapter = 2,
+ title = "Interacting Binary Stars",
+ publisher = "Cambridge University Press",
+ address = "Cambridge",
+ pages = "21--38"}
+
+@INCOLLECTION{chandrasekhar,
+ author = "S. Chandrasekhar",
+ year = 1967,
+ title = "Geodesics in G{\"o}dels Universe",
+ booktitle = "The Nature of Time",
+ publisher = "Cornell University Press",
+ address = "Ithaca, New York",
+ editor = "T. Gold",
+ pages = "68-74"}
+
+@INPROCEEDINGS{menzel,
+ author = "D. H. Menzel",
+ year = 1970,
+ title = "Laser Action in Non--LTE Atmospheres",
+ booktitle = "Spectrum Formation in Stars with Steady State Extended
+ Atmospheres",
+ editor = "H. G. Groth and P. Wellmann",
+ pages = "134-137",
+ publisher = "National Bureau of Standards",
+ series = "Proc. of the IAU Colloquium No. 2"}
+
+@MANUAL{hplot,
+ author = "R. Brun and H. R. Renshall and H. Watkins",
+ year = 1986,
+ title = "HPLOT User's Guide",
+ organization = "Cern Computer Centre",
+ address = "Geneva"}
+
+@MASTERSTHESIS{ott,
+ author = "Erica Ott",
+ year = 1989,
+ title = "An Interstellar Striptease",
+ school = "University of Amsterdam",
+ address = "Amsterdam"}
+
+% There is no MISC entry in this example.
+
+@PHDTHESIS{pannekoek,
+ author = "Anton Pannekoek",
+ year = 1902,
+ title = "Untersuchungen {\"u}ber den Lichtwechsel Algols",
+ school = "University of Leiden",
+ address = "Leiden, The Netherlands"}
+
+@PROCEEDINGS{blaauw,
+ year = 1955,
+ title = "Co-ordination of Galactic Research",
+ editor = "Adriaan Blaauw",
+ publisher = "Cambridge at the University Press",
+ address = "Cambridge",
+ series = "IAU Symposium No. 1"}
+
+@TECHREPORT{hogeveen,
+ author = "S. J. Hogeveen",
+ year = 1990,
+ title = "Concept of a LaTeX style package for the
+ Astronomy and Astrophysics publications",
+ institution = "Astronomical Institute `Anton Pannekoek'",
+ address = "Amsterdam"}
+
+% There is no UNPUBLISHED entry in this example.
+
+% Here are two more ARTICLE entries, to show what happens when more than
+% one paper of the same author, published in the same year, are cited.
+
+@ARTICLE{kuip:ds1,
+ author = "Gerard P. Kuiper",
+ title = "Problems of double star astronomy {I}",
+ journal = pasp,
+ year = 1935,
+ volume = 47,
+ pages = "15-42"}
+
+@ARTICLE{kuip:ds2,
+ author = "Gerard P. Kuiper",
+ title = "Problems of double star astronomy {II}",
+ journal = pasp,
+ year = 1935,
+ volume = 47,
+ pages = "121-150"}
+
diff --git a/biblio/bibtex/contrib/astron/example.tex b/biblio/bibtex/contrib/astron/example.tex
new file mode 100644
index 0000000000..3ef32868dd
--- /dev/null
+++ b/biblio/bibtex/contrib/astron/example.tex
@@ -0,0 +1,50 @@
+\documentstyle[astron]{article}
+
+\title{Citation Examples}
+\author{S. J. Hogeveen}
+
+\begin{document}
+\maketitle
+
+\section*{Introduction}
+
+This file gives examples of citations as they can be made with the
+`{\tt astron}' bibliography style.
+To see how citations are made, you should look at the source text of
+this example: {\tt example.tex}.
+The bibliography database that goes with this example is: {\tt example.bib}.
+To get everything right, you must: 1.~run LaTeX on {\tt example.tex},
+2.~run BibTeX on {\tt example}, 3.~run LaTeX on {\tt example},
+4.~run LaTeX on {\tt example}.
+
+\section*{Citations}
+
+You can make full and short citations.
+A full citation is used if the author's name is not part of the running text,
+like in: `Due to general relativistic effects \cite{einstein}, light of a
+star will \ldots'.
+A short (year only) citation is used if the name of the author {\sl is\/} part
+of the running text, like in: `Einstein \cite*{einstein} has shown that
+light of a star that passes the sun will \ldots'.
+
+You can also (short) cite more references in one \verb|\cite| or \verb|\cite*|
+call, {\sl and\/} add an optional note, like in: `As many authors have shown
+\cite[but not necessarily in this order]{einstein,burkhardt,chandrasekhar,%
+pannekoek,pringle:ibs}.
+% Note that no white spaces are left between the citation labels and the commas.
+% If you do leave blanks, BibTeX will complain.
+Here is what happens if you cite two (or more) publications of the same author
+which appeared in the same year: \cite{kuip:ds1,kuip:ds2}.
+The \verb|\cite*| form of the same citations yields: Kuiper
+\cite*{kuip:ds1,kuip:ds2}.
+
+Finally, we invoke the entire database to be entered in the list of references
+with a \verb|\nocite{*}| call \nocite{*}.
+Note that the \verb|\nocite| command is not replaced by {\it key\/}
+information.
+
+\bibliography{mnemonic,example}
+\bibliographystyle{astron}
+
+\end{document}
+
diff --git a/biblio/bibtex/contrib/astron/mnemonic.bib b/biblio/bibtex/contrib/astron/mnemonic.bib
new file mode 100644
index 0000000000..3cbd02aa17
--- /dev/null
+++ b/biblio/bibtex/contrib/astron/mnemonic.bib
@@ -0,0 +1,442 @@
+% Copyright (C) 1990 Sake J. Hogeveen.
+
+% This is MNEMONIC.BIB, a bibliography database file that provides mnemonics
+% for journal names, which can be used in the `journal' field of bibliography
+% entries in databases for BibTeX.
+% The abbreviations of the journal names in this file follow the rules of
+% the International List of Periodical Title Word Abbreviations.
+% From: Astronomy and Astrophysics Abstracts, 1990, Vol. 49A
+
+% Copyright Notice:
+% The files ASTRON.BST, ASTRON.STY, ASTDOC.TEX, ASTDOC.BIB, EXAMPLE.TEX,
+% EXAMPLE.BIB, MNEMONIC.BIB, and TEMPLATE.BIB are a package.
+% You may copy and distribute them freely for non-commercial purposes,
+% provided that you keep the package together and this copyright notice
+% in tact.
+% You may not alter or modify the files; this helps to ensure that all
+% distributions of ASTRON.BST and related files are the same.
+% If you make any modifications, then you must give the files new names,
+% other than the present.
+% The author bears no responsibilities for errors in this document or
+% the software it describes; and shall not be held liable for any indirect,
+% incidental, or consequential damages.
+
+@STRING{aao = "AAO Newsl."}
+@STRING{aavso = "AAVSO Newsl."}
+@STRING{acta = "Acta Astron."}
+@STRING{aaguv = "Acta Astron. Geophys. Univ. Comenianae"}
+@STRING{actastsin = "Acta Astron. Sin."}
+@STRING{actapsin = "Acta Astrophys. Sin."}
+@STRING{agg = "Acta Geod. Geophys."}
+@STRING{ags = "Acta Geophys. Sin."}
+@STRING{appsb = "Acta Phys. Pol., Ser. B"}
+@STRING{atash = "Acta Tech. Acad. Sci. Hung."}
+@STRING{advp = "Adv. Phys."}
+@STRING{advsr = "Adv. Space Res."}
+@STRING{aip = "AIP Conf. Proc."}
+@STRING{aavsob = "Am. Assoc. Variable Star Obs. Bull."}
+@STRING{aavsoc = "Am. Assoc. Variable Star Obs. Circ."}
+@STRING{amjp = "Am. J. Phys."}
+@STRING{aatar = "Anglo--Aust. Telesc., Annu. Rep."}
+@STRING{ag = "Ann. Geophys."}
+@STRING{apl = "Ann. Phys. (Leipzig)"}
+@STRING{apny = "Ann. Phys. (N.Y.)"}
+@STRING{app = "Ann. Phys. (Paris)"}
+@STRING{ao = "Appl. Opt."}
+@STRING{appl = "Appl. Phys. Lett."}
+@STRING{apb = "Appl. Phys., B"}
+@STRING{as = "Appl. Spectrosc."}
+@STRING{ahes = "Arch. Hist. Exact Sci."}
+@STRING{archuk = "Archeoastronomy (U.K.)"}
+@STRING{asbts = "Archenhold--Sternw. Berlin--Treptow, Sonderdr."}
+@STRING{asbtvs = "Archenhold--Sternw. Berlin--Treptow, Vortr. Schr."}
+@STRING{aonaicnl = "Arecibo Obs./NAIC, Newsl."}
+@STRING{artsat = "Artif. Satell."}
+@STRING{aiisao = "Astrofiz. Issled. Izv. Spets. Astrofiz. Obs."}
+@STRING{af = "Astrofizika"}
+@STRING{aa = "Astron. Astrophys."}
+@STRING{aar = "Astron. Astrophys. Rev."}
+@STRING{aas = "Astron. Astrophys. Suppl. Ser."}
+@STRING{abco = "Astron. Bull. (Carter Obs.)"}
+@STRING{agas = "Astron. Ges., Abstr. Ser."}
+@STRING{asther = "Astron. Her."}
+@STRING{aiubc = "Astron. Inst. Univ. Brno, Contrib."}
+@STRING{astj = "Astron. J."}
+@STRING{an = "Astron. Nachr."}
+@STRING{astnow = "Astron. Now"}
+@STRING{astraum = "Astron. Raumfahrt"}
+@STRING{astriha = "Astron. Rechen-Inst.Heidelb., Mitt., Ser. A"}
+@STRING{astrihb = "Astron. Rechen-Inst.Heidelb., Mitt., Ser. B"}
+@STRING{astschu = "Astron. Sch."}
+@STRING{asttid = "Astron. Tidsskr."}
+@STRING{asttsir = "Astron. Tsirk."}
+@STRING{astvest = "Astron. Vestn."}
+@STRING{astzh = "Astron. Zh."}
+@STRING{astuai = "Astronomia UAI"}
+@STRING{astie = "Astronomie"}
+@STRING{asty = "Astronomy"}
+@STRING{apj = "Astrophys. J."}
+@STRING{apjl = "Astrophys. J., Lett."}
+@STRING{apjss = "Astrophys. J., Suppl. Ser."}
+@STRING{aplc = "Astrophys. Lett. Commun."}
+@STRING{apss = "Astrophys. Space. Sci."}
+@STRING{ap = "Astrophysics"}
+@STRING{aanlsor = "Atti Accad. Naz. Lincei, Ser. Ottava, Rend."}
+@STRING{ajast = "Aust. J. Astron."}
+@STRING{ajp = "Aust. J. Phys."}
+@STRING{bavm = "BAV Mitt."}
+@STRING{bavr = "BAV Rundbrief"}
+@STRING{bbsag = "BBSAG Bull."}
+@STRING{bestarnl = "Be Star Newsl."}
+@STRING{bildw = "Bild Wiss."}
+@STRING{bipm = "BIPM Circ. T"}
+@STRING{boaumkt = "Biul. Obs. Astron. Uniw. M. Kopernika Toruniu"}
+@STRING{boe = "Bol. Obs. Ebro"}
+@STRING{broa = "Bol. ROA"}
+@STRING{blm = "Boundary-Layer Meteorol."}
+@STRING{boop = "Boyden Obs., Occas. Publ."}
+@STRING{bastac = "Br. Astron. Assoc. Circ."}
+@STRING{bjp = "Bulg. J. Phys."}
+@STRING{baas = "Bull. Am. Astron. Soc."}
+@STRING{baps = "Bull. Am. Phys. Soc."}
+@STRING{bafoev = "Bull. Assoc. Fr. Obs. Etoiles Variables"}
+@STRING{bastic = "Bull. Astron. Inst. Czech."}
+@STRING{basi = "Bull. Astron. Soc. India"}
+@STRING{bcao = "Bull. Crimean Astrophys. Obs."}
+@STRING{bgsi = "Bull. Geogr. Surv. Inst."}
+@STRING{bicds = "Bull. Inf. Cent. Donn\'ees Stellaires"}
+@STRING{boab = "Bull. Obs. Astron. Belgr."}
+@STRING{crassgvs = "C. R. Acad. Sci., S\'er. G\'en., Vie Sci."}
+@STRING{crassii = "C. R. Acad. Sci., II"}
+@STRING{cjp = "Can. J. Phys."}
+@STRING{cm = "Celest. Mech."}
+@STRING{cassos = "Cent. Astron. Sci. Spat., Obs. Sol."}
+@STRING{cent = "Centaurus"}
+@STRING{cpl = "Chem. Phys. Lett."}
+@STRING{chinaa = "Chin. Astron. Astrophys."}
+@STRING{chinp = "Chin. Phys."}
+@STRING{chinpl = "Chin. Phys. Lett."}
+@STRING{ciel = "Ciel"}
+@STRING{cielt = "Ciel Terre"}
+@STRING{ccotl = "Circ. Czech. Obs. Time Lattiude"}
+@STRING{cinf = "Circ. Inf."}
+@STRING{ctls = "Circ. Time Latitude Serv."}
+@STRING{cqg = "Classical Quantum Gravity"}
+@STRING{cast = "Comments Astrophys."}
+@STRING{cnpp = "Comments Nucl. Part. Phys."}
+@STRING{cppcf = "Comments Plasma Phys. Controlled Fusion"}
+@STRING{cfsua = "Commun. Fac. Sci. Univ. Ankara, Ser. A2, A3"}
+@STRING{cko = "Commun. Konkoly Obs."}
+@STRING{cmp = "Commun. Math. Phys."}
+@STRING{culo = "Commun. Univ. Lond. Obs."}
+@STRING{comp = "Comput. Phys."}
+@STRING{compcom = "Comput. Phys. Commun."}
+@STRING{cp = "Contemp. Phys."}
+@STRING{caosp = "Contrib. Astron. Obs. Skalnat\'e Pleso"}
+@STRING{cap = "Contrib. Atmos. Phys."}
+@STRING{cdaut = "Contrib. Dep. Astron., Univ. Tokyo"}
+@STRING{clo = "Contrib. Lick Obs."}
+@STRING{cncopb = "Contrib. Nicholas Copernicus Obs. Planetarium Brno"}
+@STRING{cnjro = "Contrib. Nizamiah Japal-Rangapur Obs."}
+@STRING{cpp = "Contrib. Plasma Phys."}
+@STRING{cvvo = "Contrib. Van Vleck Obs."}
+@STRING{cr = "Cosmic Res."}
+@STRING{cryo = "Cryogenics"}
+@STRING{czjp = "Czech. J. Phys., Sect. B"}
+@STRING{drho = "Data Rep. Hydrogr. Obs., Ser. Astron. Geod."}
+@STRING{dgkbawb = "Dtsch. Geod. Komm. Bayer. Akad. Wiss., Reihe B"}
+@STRING{dgkbawc = "Dtsch. Geod. Komm. Bayer. Akad. Wiss., Reihe C"}
+@STRING{dgkbawe = "Dtsch. Geod. Komm. Bayer. Akad. Wiss., Reihe E"}
+@STRING{epsl = "Earth Planet. Sci. Lett."}
+@STRING{erb = "Earth Rotation Bull."}
+@STRING{emp = "Earth, Moon, Planets"}
+@STRING{esrev = "Earth--Sci. Rev."}
+@STRING{esab = "ESA Bull."}
+@STRING{esaiuenl = "ESA IUE Newsl."}
+@STRING{esaj = "ESA J."}
+@STRING{esoar = "ESO Ann. Rep."}
+@STRING{ejp = "Eur. J. Phys."}
+@STRING{epl = "Europhys. Lett."}
+@STRING{epn = "Europhys. News"}
+@STRING{expast = "Exp. Astron."}
+@STRING{fiz = "Fizika"}
+@STRING{fortp = "Fortschr. Phys."}
+@STRING{fp = "Found. Phys."}
+@STRING{funcp = "Fundam. Cosmic Phys."}
+@STRING{gaab = "G.~A.A.B."}
+@STRING{gast = "G. Astron."}
+@STRING{gem = "Gemini"}
+@STRING{grg = "Gen. Relativ. Gravitation"}
+@STRING{gca = "Geochim. Cosmochim. Acta"}
+@STRING{ga = "Geomagn. Aehron."}
+@STRING{gafd = "Geophys. Astrophys. Fluid Dyn."}
+@STRING{gj = "Geophys. J."}
+@STRING{grl = "Geophys. Res. Lett."}
+@STRING{geo = "Geophysics"}
+@STRING{geos = "GEOS Circ."}
+@STRING{gbg = "Gerlands Beitr. Geophys."}
+@STRING{heav = "Heavens"}
+@STRING{hpa = "Helv. Phys. Acta"}
+@STRING{hepnp = "High Energ. Phys. Nucl. Phys."}
+@STRING{hob = "Hvar Obs. Bull."}
+@STRING{hi = "Hyperfine Interact."}
+@STRING{iappp = "I.A.P.P.P. Commun."}
+@STRING{iauc = "IAU Circ."}
+@STRING{iauib = "IAU Inf. Bull."}
+@STRING{icarus = "Icarus"}
+@STRING{i3etm = "IEEE Trans. Magn."}
+@STRING{i3etns = "IEEE Trans. Nucl. Sci."}
+@STRING{i3etps = "IEEE Trans. Plasma Sci."}
+@STRING{iersbb = "IERS Bull. B"}
+@STRING{iersba = "IERS Bull.--A"}
+@STRING{ijpap = "Indian J. Pure Appl. Phys."}
+@STRING{ijrsp = "Indian J. Radio Space Phys."}
+@STRING{ibvs = "Inf. Bull. Variable Stars"}
+@STRING{iaatub = "Inst. Astron. Astrophys. Tech. Univ. Berlin, Mitt."}
+@STRING{iag = "Inst. Astron. Geod., Univ. Madr., Publ."}
+@STRING{ia = "Inst. Astron., Univ. Camb., Annu. Rep."}
+@STRING{icq = "Int. Comet Q."}
+@STRING{ijimw = "Int. J. Infrared Millimeter Waves"}
+@STRING{ijmp = "Int. J. Mod. Phys. A"}
+@STRING{ijtp = "Int. J. Theor. Phys."}
+@STRING{ip = "Inverse Probl."}
+@STRING{iastj = "Ir. Astron. J."}
+@STRING{iris = "IRIS Bull. A"}
+@STRING{iskz = "Issled. Solntsa Krasnykh Zvezd"}
+@STRING{intsa = "Itogi Nauki Tekh., Ser. Astron."}
+@STRING{intsppk = "Itogi NAuki Tekh., Ser. Plazmennye Protsessy Kosmose"}
+@STRING{iaoe = "Izv. Astron. Obs. Ehngel'gardt."}
+@STRING{ikao = "Izv. Krym. Astrofiz. Obs."}
+@STRING{ivuzr = "Izv. Vyssch. Uchebn. Zaved., Radiofiz."}
+@STRING{jasa = "J. Acoust. Soc. Am."}
+@STRING{jaavso = "J. Am. Assoc. Variable Star Obs."}
+@STRING{jam = "J. Appl. Meteorol."}
+@STRING{jap = "J. Appl. Phys."}
+@STRING{jastf = "J. Astron. Fr."}
+@STRING{japast = "J. Astrophys. Astron."}
+@STRING{jas = "J. Atmos. Sci."}
+@STRING{jatp = "J. Atmos. Terr. Phys."}
+@STRING{jbasta = "J. Br. Astron. Assoc."}
+@STRING{jbis = "J. Br. Interplanet. Soc."}
+@STRING{jcp = "J. Chem. Phys."}
+@STRING{jcomp = "J. Comp. Phys."}
+@STRING{jel = "J. Electrostat."}
+@STRING{jfseu = "J. Fac Sci., Ege Univ., Ser. A"}
+@STRING{jfm = "J. Fluid Mech."}
+@STRING{jgr = "J. Geophys. Res."}
+@STRING{jhast = "J. Hist. Astron."}
+@STRING{jms = "J. Mater. Sci."}
+@STRING{jmp = "J. Math. Phys."}
+@STRING{jmo = "J. Mod. Opt."}
+@STRING{jop = "J. Opt. (Paris)"}
+@STRING{josaa = "J. Opt. Soc. Am. A"}
+@STRING{josab = "J. Opt. Soc. Am. B"}
+@STRING{jp = "J. Phys."}
+@STRING{jpa = "J. Phys. A"}
+@STRING{jpb = "J. Phys. B"}
+@STRING{jpd = "J. Phys. D"}
+@STRING{jpe = "J. Phys. E"}
+@STRING{jpg = "J. Phys. G"}
+@STRING{jpsj = "J. Phys. Soc. Jpn."}
+@STRING{jpp = "J. Plasma Phys."}
+@STRING{jqsrt = "J. Quant. Spectrosc. Radiat. Transfer"}
+@STRING{jrasc = "J. R. Astron. Soc. Can."}
+@STRING{jsp = "J. Stat. Phys."}
+@STRING{jvst = "J. Vac. Sci. Technol., A"}
+@STRING{jetpl = "JETP Lett."}
+@STRING{jhatd = "Johns Hopkins APL Tech. Dig."}
+@STRING{jjap1 = "Jpn. J. Appl. Phys., Part 1"}
+@STRING{jjap2 = "Jpn. J. Appl. Phys., Part 2"}
+@STRING{kai = "Kapteyn Astron. Inst., Annu. Rep."}
+@STRING{kexto = "Kexue Tongbao"}
+@STRING{kfnt = "Kinematika Fiz. Nebesn. Tel"}
+@STRING{kob = "Kodaikanal Obs. Bull."}
+@STRING{kt = "Komet. Tsirk."}
+@STRING{ki = "Kosm. Issled."}
+@STRING{koz = "Kozmos"}
+@STRING{kpm = "KPM"}
+@STRING{lo = "Laser Optoelektron."}
+@STRING{latc = "Latitude Circ."}
+@STRING{lest = "LEST Found., Annu. Rep."}
+@STRING{lmp = "Lett. Math. Phys."}
+@STRING{lob = "Lick Obs. Bull."}
+@STRING{mg = "Manuscr. Geod."}
+@STRING{ml = "Mater. Lett."}
+@STRING{mrb = "Mater. Res. Bull."}
+@STRING{mfs = "Mem. Fac. Sci., Kyoto Univ., Ser. Phys., Astrophys., Geophys., Chem."}
+@STRING{msai = "Mem. Soc. Astron. Ital."}
+@STRING{merc = "Mercury"}
+@STRING{mess = "Messenger"}
+@STRING{met = "Meteoritics"}
+@STRING{metka = "Meteoritika"}
+@STRING{metro = "Metrologica"}
+@STRING{mpb = "Minor Planet Bull."}
+@STRING{mpc = "Minor Planet Circ."}
+@STRING{masbt = "Mitt. Archenold--Sternw. Berlin Treptow"}
+@STRING{mag = "Mitt. Astron. Ges."}
+@STRING{mlotud = "Mitt. Lohrmann--Obs., Tech. Univ. Dresden"}
+@STRING{mss = "Mitt. Sternw. Sonneberg"}
+@STRING{mvs = "Mitt. Ver{\"a}nderliche Sterne"}
+@STRING{mzpe = "Mitt. Zentralinst. Phys. Erde"}
+@STRING{mpla = "Mod. Phys. Lett. A"}
+@STRING{mn = "Mon. Not. R. Astron. Soc."}
+@STRING{mnassa = "Mon. Notes Astron. Soc. S. Afr."}
+@STRING{nint = "Nablyud. Iskusstv. Nebesn. Tel."}
+@STRING{nogb = "Nachr. Olbers--Ges. Bremen"}
+@STRING{naoj = "Natl. Astron. Obs. (Jpn.), Repr."}
+@STRING{ng = "Natl. Geogr."}
+@STRING{nraoa = "Natl. Radio Astron. Obs., Repr., Ser. A"}
+@STRING{nraob = "Natl. Radio Astron. Obs., Repr., Ser. B"}
+@STRING{nat = "Nature"}
+@STRING{natwis = "Naturwissenschaften"}
+@STRING{ni = "Nauchn. Inf."}
+@STRING{nlasny = "News Lett. Astron. Soc. N.Y."}
+@STRING{nrodaour = "Nizamiah Rangapur Obs. Dep. Astron., Osmania Univ., Repr."}
+@STRING{nraow = "NRAO Workshop"}
+@STRING{nimpra = "Nucl. Instrum. Methods Phys. Res., Sect. A"}
+@STRING{nimprb = "Nucl. Instrum. Methods Phys. Res., Sect. B"}
+@STRING{npa = "Nucl. Phys. A"}
+@STRING{npb = "Nucl. Phys. B, Part. Phys."}
+@STRING{nca = "Nuovo Cimento A"}
+@STRING{ncb = "Nuovo Cimento B"}
+@STRING{ncc = "Nuovo Cimento C"}
+@STRING{ot = "Obs. Trav."}
+@STRING{obs = "Observatory"}
+@STRING{onl = "Occultation Newsl."}
+@STRING{ozvp = "{\"O}sterr. Z. Vermessungswes. Photogramm."}
+@STRING{oc = "Opt. Commun."}
+@STRING{oe = "Opt. Eng."}
+@STRING{olt = "Opt. Laser Technol."}
+@STRING{ol = "Opt. Lett."}
+@STRING{on = "Opt. News"}
+@STRING{os = "Opt. Spectrosc."}
+@STRING{optik = "Optik"}
+@STRING{ofeb = "Origins Life Evol. Biosphere"}
+@STRING{orion = "Orion"}
+@STRING{orione = "Orione"}
+@STRING{oac = "Oss. Astrofis. Catania, Pubbl."}
+@STRING{pz = "Perem. Zvezdy"}
+@STRING{pb = "Phys. Bl."}
+@STRING{pcm = "Phys. Chem. Miner."}
+@STRING{pfa = "Phys. Fluids, A"}
+@STRING{pfb = "Phys. Fluids, B"}
+@STRING{pla = "Phys. Lett. A"}
+@STRING{plb = "Phys. Lett. B"}
+@STRING{pr = "Phys. Rep."}
+@STRING{pra = "Phys. Rev. A"}
+@STRING{prb = "Phys. Rev. B"}
+@STRING{prc = "Phys. Rev. C"}
+@STRING{prd = "Phys. Rev. D"}
+@STRING{prl = "Phys. Rev. Lett."}
+@STRING{ps = "Phys. Scr."}
+@STRING{ptch = "Phys. Teach."}
+@STRING{ptod = "Phys. Today"}
+@STRING{pha = "Physica A"}
+@STRING{phb = "Physica B"}
+@STRING{phd = "Physica D"}
+@STRING{paz = "Pis'ma Astron. Zh."}
+@STRING{pss = "Planet. Space Sci."}
+@STRING{ppcf = "Plasma Phys. Controlled Fusion"}
+@STRING{pa = "Postepy Astron."}
+@STRING{pram = "Pram\~{a}na"}
+@STRING{pri = "Priroda"}
+@STRING{pasa = "Proc. Astron. Soc. Aust."}
+@STRING{pi3e = "Proc. IEEE"}
+@STRING{prsl = "Proc. R. Soc. London, Ser. A"}
+@STRING{posp = "Proceedings of SPIE"}
+@STRING{past = "Prog. Astron."}
+@STRING{ptp = "Prog. Theor. Phys."}
+@STRING{paicas = "Publ. Astron. Inst. Czech. Acad. Sci."}
+@STRING{pasj = "Publ. Astron. Soc. Jpn."}
+@STRING{pasp = "Publ. Astron. Soc. Pac."}
+@STRING{pbao = "Publ. Beijing Astron. Obs."}
+@STRING{pdaub = "Publ. Dep. Astron., Univ. Beogr."}
+@STRING{pdao = "Publ. Dom. Astrophys. Obs."}
+@STRING{pnlaoj = "Publ. Natl. Astron. Obs. Jpn."}
+@STRING{ppmo = "Publ. Purple Mt. Obs."}
+@STRING{psao = "Publ. Shaanxi Astron. Obs."}
+@STRING{pscds = "Publ. Sp\'ec. Cent. Donn\'ees Stellaires"}
+@STRING{pyo = "Publ. Yunnan Obs."}
+@STRING{pag = "Pure Appl. Geophys."}
+@STRING{qbsa = "Q. Bull. Sol. Act."}
+@STRING{qjras = "Q. J. R. Astron. Soc."}
+@STRING{rad = "Radiant"}
+@STRING{rsci = "Radio Sci."}
+@STRING{reche = "Recherche"}
+@STRING{rpp = "Rep. Prog. Phys."}
+@STRING{ra = "Rev. Astron."}
+@STRING{rg = "Rev. Geophys."}
+@STRING{rmf = "Rev. Mex. Fis."}
+@STRING{rmp = "Rev. Mod. Phys."}
+@STRING{rrp = "Rev. Roum. Phys."}
+@STRING{rsi = "Rev. Sci. Instrum."}
+@STRING{rnc = "Riv. Nuovo Cimento"}
+@STRING{rh = "\v{R}\'{\i}\v{s}e hv\v{e}zd"}
+@STRING{saaoar = "S. Afr. Astron. Obs., Annu. Rep."}
+@STRING{saaoc = "S. Afr. Astron. Obs., Circ."}
+@STRING{saaon = "SAAO Newsl."}
+@STRING{sciam = "Sci. Am."}
+@STRING{scch = "Sci. China, Ser. A"}
+@STRING{srtu = "Sci. Rep. T\^{o}hoku Univ., Eighth Ser."}
+@STRING{sc = "Science"}
+@STRING{sar = "Sendai Astron. Rap."}
+@STRING{st = "Sidereal Times"}
+@STRING{sky = "Sky Telesc."}
+@STRING{sbaavso = "Sol. Bull. (AAVSO)"}
+@STRING{se = "Sol. Energy"}
+@STRING{sp = "Sol. Phys."}
+@STRING{srd = "Sol. Radio Data"}
+@STRING{ssres = "Sol. Syst. Res."}
+@STRING{sdb = "Soln. Dannye, Byull."}
+@STRING{sonne = "Sonne"}
+@STRING{sbo = "Soobshch. Byurak. Obs."}
+@STRING{ssao = "Soobshch. Spets. Astrofiz. Obs."}
+@STRING{sost = "South. Stars"}
+@STRING{sa = "Sov. Astron."}
+@STRING{sal = "Sov. Astron. Lett."}
+@STRING{sjot = "Sov. J. Opt. Technol."}
+@STRING{spd = "Sov. Phys. -- Dokl."}
+@STRING{spj = "Sov. Phys. -- JETP"}
+@STRING{spu = "Sov. Phys. -- Usp."}
+@STRING{space = "Space"}
+@STRING{ssr = "Space Sci. Rev."}
+@STRING{stsi = "Space Telesc. Sci. Inst., Newsl."}
+@STRING{sf = "Spaceflight"}
+@STRING{sterne = "Sterne"}
+@STRING{sw = "Sterne Weltraum"}
+@STRING{sb = "Sternenbote"}
+@STRING{strlast = "Strolling Astron."}
+@STRING{sgg = "Stud. Geophys. Geod."}
+@STRING{taot = "Tartu Astrof{\"u}{\"u}s. Obs. Teated"}
+@STRING{tect = "Tectonophysics"}
+@STRING{tellus = "Tellus, Ser. A"}
+@STRING{tmf = "Teor. Mat. Fiz."}
+@STRING{tp = "Theor. Pap."}
+@STRING{tsb = "Time Serv. Bull."}
+@STRING{tmnr = "Tokyo Meteor Network Rep."}
+@STRING{tai = "Tsirk. Astron. Inst. (Tashkent)"}
+@STRING{ufz = "Ukr. Fiz. Zh."}
+@STRING{ucla = "Universe Classroom"}
+@STRING{uao = "Upps. Astron. Obs., Rep."}
+@STRING{urania = "Urania"}
+@STRING{usnoc = "U.S. Nav. Obs., Circ."}
+@STRING{usnos4 = "U.S. Nav. Obs., Ser. 4"}
+@STRING{ufn = "Usp. Fiz. Nauk"}
+@STRING{vsb = "Variable Star Bull."}
+@STRING{vasiona = "Vasiona"}
+@STRING{varih = "Ver{\"o}ff. Astron. Rechen--Inst. Heidelb."}
+@STRING{vzpe = "Ver{\"o}ff. Zentralinst. Phys. Erde"}
+@STRING{vesmir = "Vesm\'{\i}r"}
+@STRING{vansssr = "Vestn. Akad. Nauk SSSR"}
+@STRING{vku = "Vestn. Kiev. Univ., Astron."}
+@STRING{va = "Vistas Astron."}
+@STRING{wgn = "WGN"}
+@STRING{wztud = "Wiss. Z. Tech. Univ. Dresden"}
+@STRING{yama = "Yamamoto Circ."}
+@STRING{zamp = "Z. Angew. Math. Phys."}
+@STRING{zna = "Z. Naturforsch., A"}
+@STRING{zpa = "Z. Phys., A"}
+@STRING{zpc = "Z. Phys., C"}
+@STRING{zv = "Zemlya Vselennaya"}
+@STRING{zenit = "Zenit"}
+@STRING{zetf = "Zh. Ehksp. Teor. Fiz."}
diff --git a/biblio/bibtex/contrib/astron/puntxt.c b/biblio/bibtex/contrib/astron/puntxt.c
new file mode 100644
index 0000000000..26908c9d93
--- /dev/null
+++ b/biblio/bibtex/contrib/astron/puntxt.c
@@ -0,0 +1,49 @@
+/* Filter a LISTSERV PUNCH format message into normal text */
+
+#include <stdio.h>
+#include <string.h>
+
+int
+main()
+{
+ char buffer[81];
+ char *p;
+ int len, n, k;
+
+ k = 0;
+ while (gets(buffer) != (char*)NULL)
+ {
+ k++;
+ if (strcmp(buffer,"END/") == 0)
+ break;
+ p = strchr(buffer,'/');
+ if (p != (char*)NULL) p = strchr(p+1,'/');
+ if (p != (char*)NULL) ++p;
+ if ( (sscanf(buffer,"%d/%d/",&len,&n) != 2) || (p == (char*)NULL) )
+ {
+ fprintf(stderr,"Conversion error on line %d = [%s]\n",k,buffer);
+#if 0
+ exit(1);
+#endif
+ n = 1;
+ }
+
+ if (p != (char*)NULL)
+ fputs(p,stdout);
+ else
+ {
+ fputs("????",stdout);
+ fputs(buffer,stdout);
+ }
+
+ for (; n > 1; --n) /* copy continuation lines */
+ {
+ if (gets(buffer) == (char*)NULL)
+ break;
+ k++;
+ fputs(buffer,stdout);
+ }
+ fputc('\n',stdout);
+ }
+ exit (0);
+}
diff --git a/biblio/bibtex/contrib/astron/template.bib b/biblio/bibtex/contrib/astron/template.bib
new file mode 100644
index 0000000000..c87c8a33d3
--- /dev/null
+++ b/biblio/bibtex/contrib/astron/template.bib
@@ -0,0 +1,201 @@
+% This file contains templates for each entry in the bibliographic database.
+% It provides only the fields which are defined as required and optional
+% in the BibTeX style ASTRON.BST.
+% First come the required fields, then the optional. Text in fields requires
+% quotes (already provided in the templates); numbers don't.
+% Remember to delete the fields which you do not use. This will prevent
+% BibTeX from producing many irrelevant warnings and error messages.
+
+% Usage (compare with @ARTICLE template):
+%
+% @ARTICLE{citation_label,
+% author = "Title",
+% year = 1990,
+% journal = "The full name", % or: journal = abbrv,
+% volume = 42,
+% pages = 24, % or: pages = "24--31",
+% crossref = "other_citation_label",
+% key = "alternative_sort_key", % See LaTeX or BibTeX User's Guide
+% type = "type of the publication",
+% note = "additional information"}
+
+@ARTICLE{,
+ author = "",
+ year = ,
+ journal = "",
+ volume = ,
+ pages = ,
+ crossref = "",
+ key = "",
+ type = "",
+ note = ""}
+
+@BOOK{,
+ author = "",
+ year = ,
+ title = "",
+ publisher = "",
+ address = "",
+ editor = "",
+ edition = "",
+ volume = ,
+ series = "",
+ number = ,
+ crossref = "",
+ key = "",
+ type = "",
+ note = ""}
+
+@BOOKLET{,
+ author = "",
+ year = ,
+ title = "",
+ howpublished = "",
+ address = "",
+ key = "",
+ type = "",
+ note = ""}
+
+@CONFERENCE{, % `Conference' is the same as `inproceedings'.
+ author = "",
+ year = ,
+ title = "",
+ booktitle = "",
+ editor = "",
+ volume = ,
+ pages = ,
+ publisher = "",
+ address = "",
+ organization = "",
+ series = "",
+ number = ,
+ crossref = "",
+ key = "",
+ type = "",
+ note = ""}
+
+@INBOOK{,
+ author = "",
+ year = ,
+ chapter = ,
+ title = "",
+ publisher = "",
+ address = "",
+ editor = "",
+ edition = "",
+ volume = "",
+ series = "",
+ number = ,
+ pages = ,
+ crossref = "",
+ key = "",
+ type = "",
+ note = ""}
+
+@INCOLLECTION{,
+ author = "",
+ year = ,
+ title = "",
+ booktitle = "",
+ publisher = "",
+ address = "",
+ chapter = ,
+ editor = "",
+ edition = "",
+ volume = "",
+ series = "",
+ number = ,
+ pages = ,
+ crossref = "",
+ key = "",
+ type = "",
+ note = ""}
+
+@INPROCEEDINGS{,
+ author = "",
+ year = ,
+ title = "",
+ booktitle = "",
+ editor = "",
+ volume = ,
+ pages = ,
+ publisher = "",
+ address = "",
+ organization = "",
+ series = "",
+ number = ,
+ crossref = "",
+ key = "",
+ type = "",
+ note = ""}
+
+@MANUAL{,
+ author = "",
+ year = ,
+ title = "",
+ organization = "",
+ edition = "",
+ address = "",
+ key = "",
+ type = "",
+ note = ""}
+
+@MASTERSTHESIS{,
+ author = "",
+ year = ,
+ school = "",
+ address = "",
+ key = "",
+ type = "",
+ note = ""}
+
+@MISC{,
+ author = "",
+ year = ,
+ title = "",
+ howpublished = "",
+ key = "",
+ type = "",
+ note = ""}
+
+@PHDTHESIS{,
+ author = "",
+ year = ,
+ school = "",
+ address = "",
+ key = "",
+ type = "",
+ note = ""}
+
+@PROCEEDINGS{,
+ author = "",
+ year = ,
+ title = "",
+ editor = "",
+ volume = ,
+ publisher = "",
+ address = "",
+ organization = "",
+ series = "",
+ number = ,
+ key = "",
+ type = "",
+ note = ""}
+
+@TECHREPORT{,
+ author = "",
+ year = ,
+ title = "",
+ institution = "",
+ address = "",
+ key = "",
+ type = "",
+ note = ""}
+
+@UNPUBLISHED{,
+ author = "",
+ year = ,
+ title = "",
+ note = "",
+ key = "",
+ type = ""}
diff --git a/biblio/bibtex/contrib/authordate/README b/biblio/bibtex/contrib/authordate/README
new file mode 100644
index 0000000000..2eb5a0e667
--- /dev/null
+++ b/biblio/bibtex/contrib/authordate/README
@@ -0,0 +1,21 @@
+This directory contains 4 BibTeX style files for producing author-date
+reference-lists. The styles are loosely based on the recommendations of
+British Standard 1629 (1976 edition), Butcher's "Copy-editing" (Cambridge
+University Press, 1981) and the Chicago Manual of Style (1982 edition).
+
+The files are:
+authordate1.bst - Author's names are typeset in roman. Uppercase letters in
+ article, journal and book titles are left as given in the
+ bib file.
+authordate2.bst - As authordate1, but with downstyle titles, i.e., titles that
+ are lowercase except for the first letter, any letter
+ following a colon, and letters protected by { and }.
+authordate3.bst - As authordate1, but with author's names in small capitals.
+authordate4.bst - As authordate3, but with downstyle titles.
+
+These style files must be used in conjunction with certain re-definitions
+of thebibliography and \cite, as provided in the LaTeX style-option file
+authordate1-4.sty. For example, your LaTeX input file might contain
+ \documentstyle[authordate1-4]{report}
+and
+ \bibliographystyle{authordate2}
diff --git a/biblio/bibtex/contrib/authordate/authordate1-4.sty b/biblio/bibtex/contrib/authordate/authordate1-4.sty
new file mode 100644
index 0000000000..5364cf3805
--- /dev/null
+++ b/biblio/bibtex/contrib/authordate/authordate1-4.sty
@@ -0,0 +1,79 @@
+% This LaTeX style-option file, authordate1-4.sty, is intended for documents
+% that use the author-date citation system. When used in conjunction with
+% authordate1.bst, ... , authordate4.bst, it allows citations of the
+% form \shortcite{bloggs-60} as well as the usual \cite{bloggs-60}.
+% When
+% ... \cite{bloggs-60} ... \shortcite{bloggs-60} ...
+% appears in the input file,
+% ... (Bloggs, 1960) ... (1960) ...
+% appears in the final document.
+%
+% Note that:
+% - a command \bibtitle is defined, to generate the bibliography title
+% - a command \bibheadtitle is defined, to generate the text to be used
+% by \pagestyle{headings}
+% - \bibtitle and \bibheadtitle are set to generate "References" and
+% "REFERENCES" respectively.
+% - an \addcontentsline{toc}{...}{\bibtitle} is issued.
+% Thus:
+% - the default bibliography title is "References", but can be changed by
+% having \renewcommand{\bibtitle}{...} before \begin{thebibliography}
+% or \bibliography
+% - the default page header text is "REFERENCES", but can be changed by
+% \renewcommand{\bibheadtitle}{...}
+% - \tableofcontents will give a table of contents that mentions the
+% bibliography.
+%
+% David Rhead
+% Cripps Computing Centre
+% February 1990
+
+% Code taken from apalike.sty.
+%
+\def\@cite#1#2{(#1\if@tempswa , #2\fi)}
+\def\@biblabel#1{}
+
+% Set length of hanging indentation for bibliography entries
+%
+\newlength{\bibhang}
+\setlength{\bibhang}{2em}
+
+% Define default title and page-head text.
+%
+\def\bibtitle{References}
+\def\bibheadtitle{REFERENCES}
+
+\@ifundefined{chapter}{\def\thebibliography#1{\section*{\bibtitle\@mkboth
+ {\bibheadtitle}{\bibheadtitle}}
+ \addcontentsline{toc}{section}{\bibtitle}\list % For styles in
+ {\relax}{\setlength{\labelsep}{0em} % which \chapter
+ \setlength{\itemindent}{-\bibhang} % is undefined.
+ \setlength{\leftmargin}{\bibhang}}
+ \def\newblock{\hskip .11em plus .33em minus .07em}
+ \sloppy\clubpenalty4000\widowpenalty4000
+ \sfcode`\.=1000\relax}}%
+{\def\thebibliography#1{\chapter*{\bibtitle\@mkboth % For styles in
+ {\bibheadtitle}{\bibheadtitle}} % which \chapter
+ \addcontentsline{toc}{chapter}{\bibtitle}\list % is defined.
+ {\relax}{\setlength{\labelsep}{0em}
+ \setlength{\itemindent}{-\bibhang}
+ \setlength{\leftmargin}{\bibhang}}
+ \def\newblock{\hskip .11em plus .33em minus .07em}
+ \sloppy\clubpenalty4000\widowpenalty4000
+ \sfcode`\.=1000\relax}}
+%
+% Code taken from aaai.sty.
+%
+% don't box citations, add space between multiple citations, separate with ;
+\def\@citex[#1]#2{\if@filesw\immediate\write\@auxout{\string\citation{#2}}\fi
+ \def\@citea{}\@cite{\@for\@citeb:=#2\do
+ {\@citea\def\@citea{; }\@ifundefined
+ {b@\@citeb}{{\bf ?}\@warning
+ {Citation `\@citeb' on page \thepage \space undefined}}%
+{\csname b@\@citeb\endcsname}}}{#1}}
+% Allow short (name-less) citations, when used in
+% conjunction with a bibliography style that creates labels like
+% \citename{<names>, }<year>
+\let\@internalcite\cite
+\def\cite{\def\citename##1{##1}\@internalcite}
+\def\shortcite{\def\citename##1{}\@internalcite}
diff --git a/biblio/bibtex/contrib/authordate/authordate1.bst b/biblio/bibtex/contrib/authordate/authordate1.bst
new file mode 100644
index 0000000000..4c82b29213
--- /dev/null
+++ b/biblio/bibtex/contrib/authordate/authordate1.bst
@@ -0,0 +1,1309 @@
+% This BibTeX 0.99 style file is intended for documents that use the
+% author-date citation system. It should be used in conjunction with the
+% authordate1-4.sty (or equivalent) LaTeX style-option.
+%
+% In deciding on the bibliography layout to be implemented, the following
+% works have been consulted:
+% 1. British Standard 5605: "Citing publications by bibliographic
+% references", 1978.
+% 2. British Standard 1629: "Bibliographic references", 1976.
+% (Note: There is now a 1989 edition.)
+% 3. "Copy-editing" by Judith Butcher, Cambridge University Press, 1981.
+% 4. "The Oxford Dictionary for Writers and Editors", Oxford University
+% Press, 1981 (for abbreviations).
+% 5. "The Chicago Manual of Style", Chicago University Press, 1982.
+%
+% Discretion has been used in certain matters. In particular:
+% - Titles are italic except when there is a "contribution title" and
+% a "main publication title", in which case the "contribution title"
+% is roman while the "main publication title" is italic.
+% - When there is a PUBLISHER, it is assumed that ADDRESS contains "place of
+% publication"; output is of the form "place-of-publication: publisher".
+% When there is an ORGANIZATION as well as a PUBLISHER, output is of the
+% form "place-of-publication: publisher, for organization". Otherwise,
+% it is assumed that ADDRESS is a postal address, and output is of the
+% form "institution, address", "organization, address", "school, address"
+% or "howpublished, address".
+% - If there is a MONTH but no VOLUME or NUMBER for a journal-article, the
+% MONTH is used on the assumption that it contains information that is
+% equivalent to VOLUME or NUMBER. MONTH is ignored for other documents
+% that have a PUBLISHER, but output after YEAR for anything else.
+% - When CHAPTER and/or PAGES are specified with INBOOK, it is assumed that
+% these fields are being used to pick out particular pages of interest
+% (as an alternative to using the optional [...] argument of \cite);
+% the information is put at the very end of the entry, in line with BS 1629.
+% When CHAPTER and/or PAGES are specified for INCOLLECTION or INPROCEEDINGS,
+% it is assumed that the fields are being used to specify the location of
+% the part/article of interest; the information is put before the
+% BOOKTITLE, in line with Chicago's treatment of "parts" and "chapters".
+% - Since "volume" can be used in various ways (see page 219 of Butcher),
+% this file assumes that, when there is a SERIES, any VOLUME and NUMBER
+% refer to position in the SERIES (i.e. Butcher's meaning 4).
+% If there is a VOLUME but no SERIES, it is assumed that VOLUME refers
+% to a volume within a particular work (i.e. Butcher's meaning 1, 2 or 3).
+% For INPROCEEDINGS and INCOLLECTION, this information goes after the
+% BOOKTITLE. (If you prefer to have volume information before EDITOR,
+% as on page 449 of Chicago, you can set TYPE = "Vol." with INCOLLECTION.)
+%
+% This file differs from authordate2.bst, authordate3.bst and authordate4.bst
+% in that:
+% - The titles of articles, journals and books are left in whatever
+% combination of upper-case and lower-case appears in the .bib file.
+% - Author's and editor's names are in roman.
+%
+% The combination of authordate1.bst and authordate1-4.sty allows citations
+% of the form \shortcite{bloggs-60} as well as the usual \cite{bloggs-60}.
+% When
+% ... \cite{bloggs-60} ... \shortcite{bloggs-60} ...
+% appears in the input file,
+% ... (Bloggs, 1960) ... (1960) ...
+% appears in the final document.
+%
+% This file was developed from apalike.bst. It also uses code taken from
+% acm.bst, aaai-named.bst, btxbst.doc, ieeetr.bst and siam.bst.
+%
+% David Rhead
+% Cripps Computing Centre
+% Nottingham University
+% March 1990
+%
+
+ENTRY
+ { address
+ author
+ booktitle
+ chapter
+ edition
+ editor
+ howpublished
+ institution
+ journal
+ key
+ month
+ note
+ number
+ organization
+ pages
+ publisher
+ school
+ series
+ title
+ type
+ volume
+ year
+ }
+ {}
+ { label extra.label sort.label }
+
+INTEGERS { output.state before.all mid.sentence after.sentence after.block }
+
+FUNCTION {init.state.consts}
+{ #0 'before.all :=
+ #1 'mid.sentence :=
+ #2 'after.sentence :=
+ #3 'after.block :=
+}
+
+STRINGS { s t }
+
+FUNCTION {output.nonnull}
+{ 's :=
+ output.state mid.sentence =
+ { ", " * write$ }
+ { output.state after.block =
+ { add.period$ write$
+ newline$
+ "\newblock " write$
+ }
+ { output.state before.all =
+ 'write$
+ { add.period$ " " * write$ }
+ if$
+ }
+ if$
+ mid.sentence 'output.state :=
+ }
+ if$
+ s
+}
+
+FUNCTION {output}
+{ duplicate$ empty$
+ 'pop$
+ 'output.nonnull
+ if$
+}
+
+FUNCTION {output.check}
+{ 't :=
+ duplicate$ empty$
+ { pop$ "empty " t * " in " * cite$ * warning$ }
+ 'output.nonnull
+ if$
+}
+
+FUNCTION {output.year.month.check}
+{ year empty$
+ { "empty year in " cite$ * warning$ }
+ { add.period$ write$
+ month empty$
+ { " " year * extra.label * "." *
+ after.sentence 'output.state :=
+ }
+ { " " year * extra.label * " (" * month * ")." *
+ after.sentence 'output.state :=
+ }
+ if$
+ }
+ if$
+}
+
+FUNCTION {output.year.check}
+{ year empty$
+ { "empty year in " cite$ * warning$ }
+ { add.period$ write$
+ " " year * extra.label * "." *
+ after.sentence 'output.state :=
+ }
+ if$
+}
+
+FUNCTION {output.bibitem}
+{ newline$
+ "\bibitem[" write$
+ label write$
+ "]{" write$
+ cite$ write$
+ "}" write$
+ newline$
+ ""
+ before.all 'output.state :=
+}
+
+FUNCTION {fin.entry}
+{ add.period$
+ write$
+ newline$
+}
+
+FUNCTION {new.block}
+{ output.state before.all =
+ 'skip$
+ { after.block 'output.state := }
+ if$
+}
+
+FUNCTION {new.sentence}
+{ output.state after.block =
+ 'skip$
+ { output.state before.all =
+ 'skip$
+ { after.sentence 'output.state := }
+ if$
+ }
+ if$
+}
+
+FUNCTION {not}
+{ { #0 }
+ { #1 }
+ if$
+}
+
+FUNCTION {and}
+{ 'skip$
+ { pop$ #0 }
+ if$
+}
+
+FUNCTION {or}
+{ { pop$ #1 }
+ 'skip$
+ if$
+}
+
+FUNCTION {new.block.checkb}
+{ empty$
+ swap$ empty$
+ and
+ 'skip$
+ 'new.block
+ if$
+}
+
+FUNCTION {field.or.null}
+{ duplicate$ empty$
+ { pop$ "" }
+ 'skip$
+ if$
+}
+
+FUNCTION {boldface}
+{ duplicate$ empty$
+ { pop$ "" }
+ { "{\bf " swap$ * "}" * }
+ if$
+}
+
+FUNCTION {emphasize}
+{ duplicate$ empty$
+ { pop$ "" }
+ { "{\em " swap$ * "}" * }
+ if$
+}
+
+INTEGERS { nameptr namesleft numnames }
+
+FUNCTION {format.names}
+{ 's :=
+ #1 'nameptr :=
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ { s nameptr "{vv~}{ll}{, jj}{, ff}" format.name$ 't :=
+ nameptr #1 >
+ { namesleft #1 >
+ { ", " * t * }
+ { t "others" =
+ { ", {\em et~al.}" * }
+ { ", \& " * t * } % Butcher, pages
+ if$ % 186-189.
+ }
+ if$
+ }
+ 't
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+}
+
+FUNCTION {format.authors}
+{ author empty$
+ { "" }
+ { author format.names }
+ if$
+}
+
+FUNCTION {format.key}
+{ empty$
+ { key field.or.null }
+ { "" }
+ if$
+}
+
+FUNCTION {format.editors}
+{ editor empty$
+ { "" }
+ { editor format.names
+ editor num.names$ #1 > % Use ODWE abbrevs.
+ { " (eds)" * } % to avoid
+ { " (ed)" * } % ambiguity between
+ if$ % "editor" and
+ } % "edition".
+ if$
+}
+
+FUNCTION {format.title} % Nothing needs
+{ title empty$ % doing here in
+ { "" } % authordate1.bst
+ { title } % or
+ if$ % authordate3.bst.
+}
+
+FUNCTION {n.dashify}
+{ 't :=
+ ""
+ { t empty$ not }
+ { t #1 #1 substring$ "-" =
+ { t #1 #2 substring$ "--" = not
+ { "--" *
+ t #2 global.max$ substring$ 't :=
+ }
+ { { t #1 #1 substring$ "-" = }
+ { "-" *
+ t #2 global.max$ substring$ 't :=
+ }
+ while$
+ }
+ if$
+ }
+ { t #1 #1 substring$ *
+ t #2 global.max$ substring$ 't :=
+ }
+ if$
+ }
+ while$
+}
+
+FUNCTION {format.btitle}
+{ title empty$
+ { "" } % Don't change case
+ { title emphasize } % in
+ if$ % authordate1.bst
+} % or
+ % authordate3.bst.
+FUNCTION {tie.or.space.connect}
+{ duplicate$ text.length$ #3 <
+ { "~" }
+ { " " }
+ if$
+ swap$ * *
+}
+
+FUNCTION {either.or.check}
+{ empty$
+ 'pop$
+ { "can't use both " swap$ * " fields in " * cite$ * warning$ }
+ if$
+}
+
+INTEGERS { multiresult }
+
+FUNCTION {multi.page.check}
+{ 't :=
+ #0 'multiresult :=
+ { multiresult not
+ t empty$ not
+ and
+ }
+ { t #1 #1 substring$
+ duplicate$ "-" =
+ swap$ duplicate$ "," =
+ swap$ "+" =
+ or or
+ { #1 'multiresult := }
+ { t #2 global.max$ substring$ 't := }
+ if$
+ }
+ while$
+ multiresult
+}
+
+FUNCTION {format.numberinseries}
+{ number empty$
+ { "" }
+ { number multi.page.check
+ { ", nos. " number n.dashify tie.or.space.connect }
+ { ", no. " number tie.or.space.connect }
+ if$
+ }
+ if$
+}
+
+FUNCTION {booklike.series.volume.number} % Chicago, pages
+{ series empty$ % 450-451.
+ { volume empty$
+ { " " }
+ { " Vol. " volume * }
+ if$
+ }
+ {
+ volume empty$
+ { number empty$
+ { series }
+ { series format.numberinseries * }
+ if$
+ }
+ { number empty$
+ { series ", vol. " volume * * }
+ { series ", vol. " * volume * format.numberinseries * }
+ if$
+ }
+ if$
+ }
+ if$
+}
+
+FUNCTION {incollectionlike.series.volume.number}
+{ series empty$
+ { volume empty$
+ { " " }
+ { " vol. " volume * }
+ if$
+ }
+ { new.block
+ volume empty$
+ { number empty$
+ { series }
+ { series format.numberinseries * }
+ if$
+ }
+ { number empty$
+ { series ", vol. " volume * * }
+ { series ", vol. " * volume * format.numberinseries * }
+ if$
+ }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.edition}
+{ edition empty$
+ { "" }
+ { output.state mid.sentence =
+ { edition "l" change.case$ " edn." * }
+ { edition "t" change.case$ " edn." * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.pages}
+{ pages empty$
+ { "" }
+ { pages multi.page.check
+ { "" pages n.dashify tie.or.space.connect }
+ { "" pages tie.or.space.connect }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.pagesinbook} % By the time the
+{ pages empty$ % reader has read
+ { "" } % address, pub'r,
+ { pages multi.page.check % note (where the
+ { "Pages " pages n.dashify tie.or.space.connect } % note may end with
+ { "Page " pages tie.or.space.connect } % numbers), s/he
+ if$ % may not recognise
+ } % a number-range as
+ if$ % meaning pages.
+} % Avoid ambiguity
+ % (Butcher, p.181).
+
+FUNCTION {format.vol.num.date.pages}
+{ volume empty$
+ { month empty$
+ { "" }
+ { month }
+ if$
+ }
+ { volume boldface field.or.null
+ number empty$
+ { month empty$
+ 'skip$
+ { "(" month * ")" * * }
+ if$
+ }
+ { "(" number * ")" * *
+ volume empty$
+ { "there's a number but no volume in " cite$ * warning$ }
+ 'skip$
+ if$
+ }
+ if$
+ }
+ if$
+ pages empty$
+ 'skip$
+ { duplicate$ empty$
+ { pop$ format.pages }
+ { ", " * pages n.dashify * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.chapter.pages.inbook}
+{ chapter empty$
+ 'format.pagesinbook
+ { type empty$
+ { "Chap." }
+ { type }
+ if$
+ chapter tie.or.space.connect
+ pages empty$
+ 'skip$
+ { ", " * format.pagesinbook "l" change.case$ * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.chapter.pages.incoll}
+{ chapter empty$
+ { pages empty$
+ { "{\em In:} " }
+ { "{\em " format.pagesinbook " of:} " * * }
+ if$
+ }
+ { type empty$
+ { "{\em Chap. " chapter * }
+ { "{\em " type * " " * chapter * }
+ if$
+ pages empty$
+ { " of:} " * }
+ { ", " * format.pagesinbook "l" change.case$ " of:} " * * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.in.ed.booktitle} % Achieves effect
+{ booktitle empty$ % shown in 16.51
+ { "" } % of Chicago, at
+ { editor empty$ % expense of not
+ { format.chapter.pages.incoll % achieving effects
+ booktitle emphasize * } % shown in 16.50
+ { format.chapter.pages.incoll % of Chicago, on
+ format.editors * ", " * % page 189 of
+ booktitle emphasize * } % Butcher and in
+ if$ % 4.4 of BS 1629.
+ }
+ if$ % Don't change
+} % case.
+
+FUNCTION {format.thesis.type}
+{ type empty$
+ 'skip$
+ { pop$
+ type % Don't change
+ } % case.
+ if$
+}
+
+FUNCTION {format.tr.number}
+{ type empty$
+ { "Tech. rept." } % ODWE abbrevs.
+ 'type
+ if$
+ number empty$
+ { } % Whatever was
+ { number tie.or.space.connect } % having its case
+ if$ % changed, leave
+} % it alone.
+
+FUNCTION {format.addr.pub}
+{ publisher empty$
+ { "" }
+ { address empty$
+ { "" }
+ { address ": " * }
+ if$
+ publisher *
+ }
+ if$
+}
+
+FUNCTION {format.addr.pub.org} % If there's an
+{ address empty$ % an organization
+ { publisher * ", for " * organization * } % and a publisher
+ { address ": " * publisher * ", for " * organization * } % too.
+ if$
+}
+
+FUNCTION {format.addr.inst}
+{ address empty$
+ { institution empty$
+ { "" }
+ { institution }
+ if$
+ }
+ { institution empty$
+ { "" }
+ { institution ", " * }
+ if$
+ address *
+ }
+ if$
+}
+
+FUNCTION {format.addr.org}
+{ address empty$
+ { organization empty$
+ { "" }
+ { organization }
+ if$
+ }
+ { organization empty$
+ { "" }
+ { organization ", " * }
+ if$
+ address *
+ }
+ if$
+}
+
+FUNCTION {format.article.crossref}
+{ "{\em In:}"
+ " \cite{" * crossref * "}" *
+}
+
+FUNCTION {format.book.crossref}
+{ volume empty$
+ { "empty volume in " cite$ * "'s crossref of " * crossref * warning$
+ "{\em In:}"
+ }
+ { " Vol." volume tie.or.space.connect
+ " of " *
+ }
+ if$
+ "\cite{" * crossref * "}" *
+}
+
+FUNCTION {format.incoll.inproc.crossref}
+{ "{\em In:}"
+ " \cite{" * crossref * "}" *
+}
+
+FUNCTION {article}
+{ output.bibitem
+ format.authors "author" output.check
+ author format.key output
+ output.year.check
+ new.block
+ format.title "title" output.check
+ new.block
+ crossref missing$
+ { journal emphasize % Don't change
+ "journal" output.check % case.
+ format.vol.num.date.pages output
+ }
+ { format.article.crossref output.nonnull
+ format.pages output
+ }
+ if$
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {book}
+{ output.bibitem
+ author empty$
+ { format.editors "author and editor" output.check
+ editor format.key output
+ }
+ { format.authors output.nonnull
+ crossref missing$
+ { "author and editor" editor either.or.check }
+ 'skip$
+ if$
+ }
+ if$
+ output.year.check
+ new.block
+ format.btitle "title" output.check
+ crossref missing$
+ { new.sentence
+ format.edition output
+ new.block
+ booklike.series.volume.number output
+ new.block
+ format.addr.pub "publisher" output.check
+ }
+ { new.block
+ format.book.crossref output.nonnull
+ }
+ if$
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {booklet}
+{ output.bibitem
+ format.authors output
+ author format.key output
+ output.year.month.check
+ new.block
+ format.btitle "title" output.check
+ new.block
+ howpublished output
+ address output
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {inbook}
+{ output.bibitem
+ author empty$
+ { format.editors "author and editor" output.check
+ editor format.key output
+ }
+ { format.authors output.nonnull
+ crossref missing$
+ { "author and editor" editor either.or.check }
+ 'skip$
+ if$
+ }
+ if$
+ output.year.check
+ new.block
+ format.btitle "title" output.check
+ crossref missing$
+ { new.sentence
+ format.edition output
+ new.block
+ booklike.series.volume.number output
+ new.block
+ format.addr.pub "publisher" output.check
+ }
+ { new.block
+ format.book.crossref output.nonnull
+ }
+ if$
+ new.block
+ note output
+ new.block % BS 1629 (rather
+ format.chapter.pages.inbook "chapter and pages" output.check
+ fin.entry % than Chicago,
+} % p. 451)
+
+FUNCTION {incollection}
+{ output.bibitem
+ author empty$
+ { format.editors "editor" output.check
+ editor format.key output }
+ { format.authors "author" output.check
+ author format.key output }
+ if$
+ output.year.check
+ new.block
+ format.title "title" output.check
+ new.block
+ crossref missing$ % Chapter and/or
+ { format.in.ed.booktitle output % page numbers can
+ format.edition output % come out via this
+ incollectionlike.series.volume.number output % route, too.
+ new.block
+ format.addr.pub "publisher" output.check
+ }
+ { format.incoll.inproc.crossref output.nonnull
+ new.block
+ }
+ if$
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {inproceedings}
+{ output.bibitem
+ format.authors "author" output.check
+ author format.key output
+ publisher empty$
+ { output.year.month.check }
+ { output.year.check }
+ if$
+ new.block
+ format.title "title" output.check
+ new.block
+ crossref missing$
+ { format.in.ed.booktitle "booktitle" output.check
+ incollectionlike.series.volume.number output
+ new.block
+ publisher empty$
+ {
+ organization empty$
+ 'skip$
+ { format.addr.org output }
+ if$
+ }
+ {
+ organization empty$
+ { format.addr.pub output }
+ { format.addr.pub.org output }
+ if$
+ }
+ if$
+ }
+ { format.incoll.inproc.crossref output.nonnull
+ }
+ if$
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {conference} { inproceedings }
+
+FUNCTION {manual}
+{ output.bibitem
+ format.authors output
+ author format.key output
+ output.year.month.check
+ new.block
+ format.btitle "title" output.check
+ new.sentence
+ format.edition output
+ new.block
+ organization address new.block.checkb
+ format.addr.org output
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {mastersthesis}
+{ output.bibitem
+ format.authors "author" output.check
+ author format.key output
+ output.year.month.check
+ new.block
+ format.btitle "title" output.check
+ new.block
+ "M.Phil. thesis" format.thesis.type output.nonnull % ODWE abbrev.
+ school "school" output.check
+ address output
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {misc}
+{ output.bibitem
+ format.authors output
+ author format.key output
+ output.year.month.check
+ new.block
+ format.btitle output
+ new.block
+ howpublished output
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {phdthesis}
+{ output.bibitem
+ format.authors "author" output.check
+ author format.key output
+ output.year.month.check
+ new.block
+ format.btitle "title" output.check
+ new.block
+ "Ph.D. thesis" format.thesis.type output.nonnull % Butcher,
+ school "school" output.check % page 174.
+ address output
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {proceedings}
+{ output.bibitem
+ format.editors "author and editor" output.check
+ editor format.key output
+ publisher empty$
+ { output.year.month.check }
+ { output.year.check }
+ if$
+ new.block
+ format.btitle "title" output.check
+ new.block
+ booklike.series.volume.number output
+ new.block
+ publisher empty$
+ {
+ organization empty$
+ 'skip$
+ { format.addr.org output }
+ if$
+ }
+ {
+ organization empty$
+ { format.addr.pub output }
+ { format.addr.pub.org output }
+ if$
+ }
+ if$
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {techreport}
+{ output.bibitem
+ format.authors "author" output.check
+ author format.key output
+ output.year.month.check
+ new.block
+ format.btitle "title" output.check
+ new.block
+ format.tr.number output.nonnull
+ new.sentence
+ format.addr.inst "institution" output.check
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {unpublished}
+{ output.bibitem
+ format.authors "author" output.check
+ author format.key output
+ output.year.month.check
+ new.block
+ format.btitle "title" output.check
+ new.block
+ note "note" output.check
+ fin.entry
+}
+
+FUNCTION {default.type} { misc }
+
+MACRO {jan} {"Jan."} % ODWE, "months", &
+ % Chicago, p. 383.
+MACRO {feb} {"Feb."}
+
+MACRO {mar} {"Mar."}
+
+MACRO {apr} {"Apr."}
+
+MACRO {may} {"May"}
+
+MACRO {jun} {"June"}
+
+MACRO {jul} {"July"}
+
+MACRO {aug} {"Aug."}
+
+MACRO {sep} {"Sept."}
+
+MACRO {oct} {"Oct."}
+
+MACRO {nov} {"Nov."}
+
+MACRO {dec} {"Dec."}
+
+MACRO {acmcs} {"ACM Computing Surveys"}
+
+MACRO {acta} {"Acta Informatica"}
+
+MACRO {cacm} {"Communications of the ACM"}
+
+MACRO {ibmjrd} {"IBM Journal of Research and Development"}
+
+MACRO {ibmsj} {"IBM Systems Journal"}
+
+MACRO {ieeese} {"IEEE Transactions on Software Engineering"}
+
+MACRO {ieeetc} {"IEEE Transactions on Computers"}
+
+MACRO {ieeetcad}
+ {"IEEE Transactions on Computer-Aided Design of Integrated Circuits"}
+
+MACRO {ipl} {"Information Processing Letters"}
+
+MACRO {jacm} {"Journal of the ACM"}
+
+MACRO {jcss} {"Journal of Computer and System Sciences"}
+
+MACRO {scp} {"Science of Computer Programming"}
+
+MACRO {sicomp} {"SIAM Journal on Computing"}
+
+MACRO {tocs} {"ACM Transactions on Computer Systems"}
+
+MACRO {tods} {"ACM Transactions on Database Systems"}
+
+MACRO {tog} {"ACM Transactions on Graphics"}
+
+MACRO {toms} {"ACM Transactions on Mathematical Software"}
+
+MACRO {toois} {"ACM Transactions on Office Information Systems"}
+
+MACRO {toplas} {"ACM Transactions on Programming Languages and Systems"}
+
+MACRO {tcs} {"Theoretical Computer Science"}
+
+READ
+
+FUNCTION {sortify}
+{ purify$
+ "l" change.case$
+}
+
+INTEGERS { len }
+
+FUNCTION {chop.word}
+{ 's :=
+ 'len :=
+ s #1 len substring$ =
+ { s len #1 + global.max$ substring$ }
+ 's
+ if$
+}
+
+FUNCTION {format.lab.names}
+{ 's :=
+ s #1 "{vv~}{ll}" format.name$
+ s num.names$ duplicate$
+ #2 >
+ { pop$ " {\em et~al.}" * }
+ { #2 <
+ 'skip$
+ { s #2 "{ff }{vv }{ll}{ jj}" format.name$ "others" =
+ { " {\em et~al.}" * }
+ { " \& " * s #2 "{vv~}{ll}" format.name$ * }
+ if$
+ }
+ if$
+ }
+ if$
+}
+
+FUNCTION {author.key.label}
+{ author empty$
+ { key empty$
+ { cite$ #1 #3 substring$ }
+ 'key
+ if$
+ }
+ { author format.lab.names }
+ if$
+}
+
+FUNCTION {author.editor.key.label}
+{ author empty$
+ { editor empty$
+ { key empty$
+ { cite$ #1 #3 substring$ }
+ 'key
+ if$
+ }
+ { editor format.lab.names }
+ if$
+ }
+ { author format.lab.names }
+ if$
+}
+
+FUNCTION {editor.key.label}
+{ editor empty$
+ { key empty$
+ { cite$ #1 #3 substring$ }
+ 'key
+ if$
+ }
+ { editor format.lab.names }
+ if$
+}
+
+FUNCTION {calc.label}
+ { type$ "book" =
+ type$ "inbook" =
+ type$ "incollection" = % For sensible
+ or or % treatment of
+ 'author.editor.key.label % Singer in
+ { type$ "proceedings" = % BS 1629.
+ 'editor.key.label
+ 'author.key.label
+ if$
+ }
+ if$
+ duplicate$
+ year empty$
+ {
+ "\protect\citename{" swap$ * ", }" *
+ "n.d." * 'label := % Chicago,
+ } % page 457.
+ {
+ "\protect\citename{" swap$ * ", }" *
+ year
+ *
+ 'label :=
+ }
+ if$
+ year field.or.null purify$ *
+ sortify 'sort.label :=
+}
+
+
+FUNCTION {sort.format.names} % To produce the
+{ 's := % order of entries
+ #1 'nameptr := % specified in item
+ "" % (3) on page 187
+ s num.names$ 'numnames := % of Butcher.
+ numnames 'namesleft :=
+ { namesleft #0 > nameptr #3 < and } % Only 1st 2 names
+ { nameptr #1 > % matter for
+ { " " * } % sorting.
+ 'skip$
+ if$ % Anything that's
+ nameptr #2 = numnames #2 > and % "et al" goes
+ { "zzzzz" * } % after works by 2
+ { % authors.
+ s nameptr "{vv{ } }{ll{ }}{ ff{ }}{ jj{ }}" format.name$ 't :=
+ nameptr numnames = t "others" = and
+ { "zzzzz" * }
+ { t sortify * }
+ if$
+ }
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+}
+
+FUNCTION {sort.format.title}
+{ 't :=
+ "A " #2
+ "An " #3
+ "The " #4 t chop.word
+ chop.word
+ chop.word
+ sortify
+ #1 global.max$ substring$
+}
+
+FUNCTION {author.sort}
+{ author empty$
+ { key empty$
+ { "to sort, need author or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { author sort.format.names }
+ if$
+}
+
+FUNCTION {author.editor.sort}
+{ author empty$
+ { editor empty$
+ { key empty$
+ { "to sort, need author, editor, or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { editor sort.format.names }
+ if$
+ }
+ { author sort.format.names }
+ if$
+}
+
+FUNCTION {editor.sort}
+{ editor empty$
+ { key empty$
+ { "to sort, need editor or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { editor sort.format.names }
+ if$
+}
+
+FUNCTION {presort} % Two sorting
+{ calc.label % passes, from
+ label sortify % apalike.bst.
+ " "
+ *
+ type$ "book" =
+ type$ "inbook" =
+ type$ "incollection" = % For Singer
+ or or % in BS 1629.
+ 'author.editor.sort
+ { type$ "proceedings" =
+ 'editor.sort
+ 'author.sort
+ if$
+ }
+ if$
+ #1 entry.max$ substring$
+ 'sort.label :=
+ sort.label
+ *
+ " "
+ *
+ title field.or.null
+ sort.format.title
+ *
+ #1 entry.max$ substring$
+ 'sort.key$ :=
+}
+
+ITERATE {presort}
+
+SORT
+
+STRINGS { last.label next.extra }
+
+INTEGERS { last.extra.num }
+
+FUNCTION {initialize.extra.label.stuff}
+{ #0 int.to.chr$ 'last.label :=
+ "" 'next.extra :=
+ #0 'last.extra.num :=
+}
+
+FUNCTION {forward.pass}
+{ last.label label =
+ { last.extra.num #1 + 'last.extra.num :=
+ last.extra.num int.to.chr$ 'extra.label :=
+ }
+ { "a" chr.to.int$ 'last.extra.num :=
+ "" 'extra.label :=
+ label 'last.label :=
+ }
+ if$
+}
+
+FUNCTION {reverse.pass}
+{ next.extra "b" =
+ { "a" 'extra.label := }
+ 'skip$
+ if$ % Code needed here
+ % if \citeauthor
+ % and \citeyear
+ label extra.label * 'label := % were supported.
+ extra.label 'next.extra :=
+}
+
+EXECUTE {initialize.extra.label.stuff}
+
+ITERATE {forward.pass}
+
+REVERSE {reverse.pass}
+
+FUNCTION {bib.sort.order}
+{ sort.label
+ " "
+ *
+ year field.or.null sortify
+ *
+ " "
+ *
+ title field.or.null
+ sort.format.title
+ *
+ #1 entry.max$ substring$
+ 'sort.key$ :=
+}
+
+ITERATE {bib.sort.order}
+
+SORT
+
+FUNCTION {begin.bib}
+{ preamble$ empty$
+ 'skip$
+ { preamble$ write$ newline$ }
+ if$
+ "\begin{thebibliography}{}" write$ newline$
+}
+
+EXECUTE {begin.bib}
+
+EXECUTE {init.state.consts}
+
+ITERATE {call.type$}
+
+FUNCTION {end.bib}
+{ newline$
+ "\end{thebibliography}" write$ newline$
+}
+
+EXECUTE {end.bib}
diff --git a/biblio/bibtex/contrib/authordate/authordate1.ltx b/biblio/bibtex/contrib/authordate/authordate1.ltx
new file mode 100644
index 0000000000..39db7ab4b5
--- /dev/null
+++ b/biblio/bibtex/contrib/authordate/authordate1.ltx
@@ -0,0 +1,18 @@
+% -*-latex-*-
+% Document name: /usr/local/lib/tex/bibtex/authordate1.ltx
+% Creator: David Rhead [David_Rhead@vme.nott.ac.uk]
+% Creation Date: Sun 28 Jun 92 19:10:19 BST
+
+\documentstyle[authordate1-4]{report}
+
+\raggedright
+
+\begin{document}
+
+\input{testadb.ltx}
+
+\bibliographystyle{authordate1}
+
+\bibliography{test}
+
+\end{document}
diff --git a/biblio/bibtex/contrib/authordate/authordate2.bst b/biblio/bibtex/contrib/authordate/authordate2.bst
new file mode 100644
index 0000000000..39e2a8ae29
--- /dev/null
+++ b/biblio/bibtex/contrib/authordate/authordate2.bst
@@ -0,0 +1,1310 @@
+% This BibTeX 0.99 style file is intended for documents that use the
+% author-date citation system. It should be used in conjunction with the
+% authordate1-4.sty (or equivalent) LaTeX style-option.
+%
+% In deciding on the bibliography layout to be implemented, the following
+% works have been consulted:
+% 1. British Standard 5605: "Citing publications by bibliographic
+% references", 1978.
+% 2. British Standard 1629: "Bibliographic references", 1976.
+% (Note: There is now a 1989 edition.)
+% 3. "Copy-editing" by Judith Butcher, Cambridge University Press, 1981.
+% 4. "The Oxford Dictionary for Writers and Editors", Oxford University
+% Press, 1981 (for abbreviations).
+% 5. "The Chicago Manual of Style", Chicago University Press, 1982.
+%
+% Discretion has been used in certain matters. In particular:
+% - Titles are italic except when there is a "contribution title" and
+% a "main publication title", in which case the "contribution title"
+% is roman while the "main publication title" is italic.
+% - When there is a PUBLISHER, it is assumed that ADDRESS contains "place of
+% publication"; output is of the form "place-of-publication: publisher".
+% When there is an ORGANIZATION as well as a PUBLISHER, output is of the
+% form "place-of-publication: publisher, for organization". Otherwise,
+% it is assumed that ADDRESS is a postal address, and output is of the
+% form "institution, address", "organization, address", "school, address"
+% or "howpublished, address".
+% - If there is a MONTH but no VOLUME or NUMBER for a journal-article, the
+% MONTH is used on the assumption that it contains information that is
+% equivalent to VOLUME or NUMBER. MONTH is ignored for other documents
+% that have a PUBLISHER, but output after YEAR for anything else.
+% - When CHAPTER and/or PAGES are specified with INBOOK, it is assumed that
+% these fields are being used to pick out particular pages of interest
+% (as an alternative to using the optional [...] argument of \cite);
+% the information is put at the very end of the entry, in line with BS 1629.
+% When CHAPTER and/or PAGES are specified for INCOLLECTION or INPROCEEDINGS,
+% it is assumed that the fields are being used to specify the location of
+% the part/article of interest; the information is put before the
+% BOOKTITLE, in line with Chicago's treatment of "parts" and "chapters".
+% - Since "volume" can be used in various ways (see page 219 of Butcher),
+% this file assumes that, when there is a SERIES, any VOLUME and NUMBER
+% refer to position in the SERIES (i.e. Butcher's meaning 4).
+% If there is a VOLUME but no SERIES, it is assumed that VOLUME refers
+% to a volume within a particular work (i.e. Butcher's meaning 1, 2 or 3).
+% For INPROCEEDINGS and INCOLLECTION, this information goes after the
+% BOOKTITLE. (If you prefer to have volume information before EDITOR,
+% as on page 449 of Chicago, you can set TYPE = "Vol." with INCOLLECTION.)
+%
+% This file differs from authordate1.bst, authordate3.bst and authordate4.bst
+% in that:
+% - Titles of journals, articles and boooks are "downstyle". Apart from the
+% first character, and the first character following : and white space,
+% uppercase letters are converted to lowercase unless protected by {}.
+% - Author's and editor's names are in roman.
+%
+% The combination of authordate2.bst and authordate1-4.sty allows citations
+% of the form \shortcite{bloggs-60} as well as the usual \cite{bloggs-60}.
+% When
+% ... \cite{bloggs-60} ... \shortcite{bloggs-60} ...
+% appears in the input file,
+% ... (Bloggs, 1960) ... (1960) ...
+% appears in the final document.
+%
+% This file was developed from apalike.bst. It also uses code taken from
+% acm.bst, aaai-named.bst, btxbst.doc, ieeetr.bst and siam.bst.
+%
+% David Rhead
+% Cripps Computing Centre
+% Nottingham University
+% March 1990
+%
+
+ENTRY
+ { address
+ author
+ booktitle
+ chapter
+ edition
+ editor
+ howpublished
+ institution
+ journal
+ key
+ month
+ note
+ number
+ organization
+ pages
+ publisher
+ school
+ series
+ title
+ type
+ volume
+ year
+ }
+ {}
+ { label extra.label sort.label }
+
+INTEGERS { output.state before.all mid.sentence after.sentence after.block }
+
+FUNCTION {init.state.consts}
+{ #0 'before.all :=
+ #1 'mid.sentence :=
+ #2 'after.sentence :=
+ #3 'after.block :=
+}
+
+STRINGS { s t }
+
+FUNCTION {output.nonnull}
+{ 's :=
+ output.state mid.sentence =
+ { ", " * write$ }
+ { output.state after.block =
+ { add.period$ write$
+ newline$
+ "\newblock " write$
+ }
+ { output.state before.all =
+ 'write$
+ { add.period$ " " * write$ }
+ if$
+ }
+ if$
+ mid.sentence 'output.state :=
+ }
+ if$
+ s
+}
+
+FUNCTION {output}
+{ duplicate$ empty$
+ 'pop$
+ 'output.nonnull
+ if$
+}
+
+FUNCTION {output.check}
+{ 't :=
+ duplicate$ empty$
+ { pop$ "empty " t * " in " * cite$ * warning$ }
+ 'output.nonnull
+ if$
+}
+
+FUNCTION {output.year.month.check}
+{ year empty$
+ { "empty year in " cite$ * warning$ }
+ { add.period$ write$
+ month empty$
+ { " " year * extra.label * "." *
+ after.sentence 'output.state :=
+ }
+ { " " year * extra.label * " (" * month * ")." *
+ after.sentence 'output.state :=
+ }
+ if$
+ }
+ if$
+}
+
+FUNCTION {output.year.check}
+{ year empty$
+ { "empty year in " cite$ * warning$ }
+ { add.period$ write$
+ " " year * extra.label * "." *
+ after.sentence 'output.state :=
+ }
+ if$
+}
+
+FUNCTION {output.bibitem}
+{ newline$
+ "\bibitem[" write$
+ label write$
+ "]{" write$
+ cite$ write$
+ "}" write$
+ newline$
+ ""
+ before.all 'output.state :=
+}
+
+FUNCTION {fin.entry}
+{ add.period$
+ write$
+ newline$
+}
+
+FUNCTION {new.block}
+{ output.state before.all =
+ 'skip$
+ { after.block 'output.state := }
+ if$
+}
+
+FUNCTION {new.sentence}
+{ output.state after.block =
+ 'skip$
+ { output.state before.all =
+ 'skip$
+ { after.sentence 'output.state := }
+ if$
+ }
+ if$
+}
+
+FUNCTION {not}
+{ { #0 }
+ { #1 }
+ if$
+}
+
+FUNCTION {and}
+{ 'skip$
+ { pop$ #0 }
+ if$
+}
+
+FUNCTION {or}
+{ { pop$ #1 }
+ 'skip$
+ if$
+}
+
+FUNCTION {new.block.checkb}
+{ empty$
+ swap$ empty$
+ and
+ 'skip$
+ 'new.block
+ if$
+}
+
+FUNCTION {field.or.null}
+{ duplicate$ empty$
+ { pop$ "" }
+ 'skip$
+ if$
+}
+
+FUNCTION {boldface}
+{ duplicate$ empty$
+ { pop$ "" }
+ { "{\bf " swap$ * "}" * }
+ if$
+}
+
+FUNCTION {emphasize}
+{ duplicate$ empty$
+ { pop$ "" }
+ { "{\em " swap$ * "}" * }
+ if$
+}
+
+INTEGERS { nameptr namesleft numnames }
+
+FUNCTION {format.names}
+{ 's :=
+ #1 'nameptr :=
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ { s nameptr "{vv~}{ll}{, jj}{, ff}" format.name$ 't :=
+ nameptr #1 >
+ { namesleft #1 >
+ { ", " * t * }
+ { t "others" =
+ { ", {\em et~al.}" * }
+ { ", \& " * t * } % Butcher, pages
+ if$ % 186-189.
+ }
+ if$
+ }
+ 't
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+}
+
+FUNCTION {format.authors}
+{ author empty$
+ { "" }
+ { author format.names }
+ if$
+}
+
+FUNCTION {format.key}
+{ empty$
+ { key field.or.null }
+ { "" }
+ if$
+}
+
+FUNCTION {format.editors}
+{ editor empty$
+ { "" }
+ { editor format.names
+ editor num.names$ #1 > % Use ODWE abbrevs.
+ { " (eds)" * } % to avoid
+ { " (ed)" * } % ambiguity between
+ if$ % "editor" and
+ } % "edition".
+ if$
+}
+
+FUNCTION {format.title} % Howells example
+{ title empty$ % in BS 5605 comes
+ { "" } % out wrong because
+ { title "t" change.case$ } % Patashnik
+ if$ % capitalizes
+} % after a colon.
+
+FUNCTION {n.dashify}
+{ 't :=
+ ""
+ { t empty$ not }
+ { t #1 #1 substring$ "-" =
+ { t #1 #2 substring$ "--" = not
+ { "--" *
+ t #2 global.max$ substring$ 't :=
+ }
+ { { t #1 #1 substring$ "-" = }
+ { "-" *
+ t #2 global.max$ substring$ 't :=
+ }
+ while$
+ }
+ if$
+ }
+ { t #1 #1 substring$ *
+ t #2 global.max$ substring$ 't :=
+ }
+ if$
+ }
+ while$
+}
+
+FUNCTION {format.btitle}
+{ title empty$
+ { "" }
+ { title "t" change.case$ emphasize }
+ if$
+}
+
+FUNCTION {tie.or.space.connect}
+{ duplicate$ text.length$ #3 <
+ { "~" }
+ { " " }
+ if$
+ swap$ * *
+}
+
+FUNCTION {either.or.check}
+{ empty$
+ 'pop$
+ { "can't use both " swap$ * " fields in " * cite$ * warning$ }
+ if$
+}
+
+INTEGERS { multiresult }
+
+FUNCTION {multi.page.check}
+{ 't :=
+ #0 'multiresult :=
+ { multiresult not
+ t empty$ not
+ and
+ }
+ { t #1 #1 substring$
+ duplicate$ "-" =
+ swap$ duplicate$ "," =
+ swap$ "+" =
+ or or
+ { #1 'multiresult := }
+ { t #2 global.max$ substring$ 't := }
+ if$
+ }
+ while$
+ multiresult
+}
+
+FUNCTION {format.numberinseries}
+{ number empty$
+ { "" }
+ { number multi.page.check
+ { ", nos. " number n.dashify tie.or.space.connect }
+ { ", no. " number tie.or.space.connect }
+ if$
+ }
+ if$
+}
+
+FUNCTION {booklike.series.volume.number} % Chicago, pages
+{ series empty$ % 450-451.
+ { volume empty$
+ { " " }
+ { " Vol. " volume * }
+ if$
+ }
+ {
+ volume empty$
+ { number empty$
+ { series }
+ { series format.numberinseries * }
+ if$
+ }
+ { number empty$
+ { series ", vol. " volume * * }
+ { series ", vol. " * volume * format.numberinseries * }
+ if$
+ }
+ if$
+ }
+ if$
+}
+
+FUNCTION {incollectionlike.series.volume.number}
+{ series empty$
+ { volume empty$
+ { " " }
+ { " vol. " volume * }
+ if$
+ }
+ { new.block
+ volume empty$
+ { number empty$
+ { series }
+ { series format.numberinseries * }
+ if$
+ }
+ { number empty$
+ { series ", vol. " volume * * }
+ { series ", vol. " * volume * format.numberinseries * }
+ if$
+ }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.edition}
+{ edition empty$
+ { "" }
+ { output.state mid.sentence =
+ { edition "l" change.case$ " edn." * }
+ { edition "t" change.case$ " edn." * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.pages}
+{ pages empty$
+ { "" }
+ { pages multi.page.check
+ { "" pages n.dashify tie.or.space.connect }
+ { "" pages tie.or.space.connect }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.pagesinbook} % By the time the
+{ pages empty$ % reader has read
+ { "" } % address, pub'r,
+ { pages multi.page.check % note (where the
+ { "Pages " pages n.dashify tie.or.space.connect } % note may end with
+ { "Page " pages tie.or.space.connect } % numbers), s/he
+ if$ % may not recognise
+ } % a number-range as
+ if$ % meaning pages.
+} % Avoid ambiguity
+ % (Butcher, p.181).
+
+FUNCTION {format.vol.num.date.pages}
+{ volume empty$
+ { month empty$
+ { "" }
+ { month }
+ if$
+ }
+ { volume boldface field.or.null
+ number empty$
+ { month empty$
+ 'skip$
+ { "(" month * ")" * * }
+ if$
+ }
+ { "(" number * ")" * *
+ volume empty$
+ { "there's a number but no volume in " cite$ * warning$ }
+ 'skip$
+ if$
+ }
+ if$
+ }
+ if$
+ pages empty$
+ 'skip$
+ { duplicate$ empty$
+ { pop$ format.pages }
+ { ", " * pages n.dashify * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.chapter.pages.inbook}
+{ chapter empty$
+ 'format.pagesinbook
+ { type empty$
+ { "Chap." }
+ { type }
+ if$
+ chapter tie.or.space.connect
+ pages empty$
+ 'skip$
+ { ", " * format.pagesinbook "l" change.case$ * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.chapter.pages.incoll}
+{ chapter empty$
+ { pages empty$
+ { "{\em In:} " }
+ { "{\em " format.pagesinbook " of:} " * * }
+ if$
+ }
+ { type empty$
+ { "{\em Chap. " chapter * }
+ { "{\em " type * " " * chapter * }
+ if$
+ pages empty$
+ { " of:} " * }
+ { ", " * format.pagesinbook "l" change.case$ " of:} " * * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.in.ed.booktitle} % Achieves effect
+{ booktitle empty$ % shown in 16.51
+ { "" } % of Chicago, at
+ { editor empty$ % expense of not
+ { format.chapter.pages.incoll % achieving effects
+ booktitle "t" change.case$ emphasize * } % shown in 16.50
+ { format.chapter.pages.incoll % of Chicago, on
+ format.editors * ", " * % page 189 of
+ booktitle "t" change.case$ emphasize * } % Butcher and in
+ if$ % 4.4 of BS 1629.
+ }
+ if$
+}
+
+FUNCTION {format.thesis.type}
+{ type empty$
+ 'skip$
+ { pop$
+ type "t" change.case$
+ }
+ if$
+}
+
+FUNCTION {format.tr.number}
+{ type empty$
+ { "Tech. rept." } % ODWE abbrevs.
+ 'type
+ if$
+ number empty$
+ { "t" change.case$ }
+ { number tie.or.space.connect }
+ if$
+}
+
+FUNCTION {format.addr.pub}
+{ publisher empty$
+ { "" }
+ { address empty$
+ { "" }
+ { address ": " * }
+ if$
+ publisher *
+ }
+ if$
+}
+
+FUNCTION {format.addr.pub.org} % If there's an
+{ address empty$ % an organization
+ { publisher * ", for " * organization * } % and a publisher
+ { address ": " * publisher * ", for " * organization * } % too.
+ if$
+}
+
+FUNCTION {format.addr.inst}
+{ address empty$
+ { institution empty$
+ { "" }
+ { institution }
+ if$
+ }
+ { institution empty$
+ { "" }
+ { institution ", " * }
+ if$
+ address *
+ }
+ if$
+}
+
+FUNCTION {format.addr.org}
+{ address empty$
+ { organization empty$
+ { "" }
+ { organization }
+ if$
+ }
+ { organization empty$
+ { "" }
+ { organization ", " * }
+ if$
+ address *
+ }
+ if$
+}
+
+FUNCTION {format.article.crossref}
+{ "{\em In:}"
+ " \cite{" * crossref * "}" *
+}
+
+FUNCTION {format.book.crossref}
+{ volume empty$
+ { "empty volume in " cite$ * "'s crossref of " * crossref * warning$
+ "{\em In:}"
+ }
+ { " Vol." volume tie.or.space.connect
+ " of " *
+ }
+ if$
+ "\cite{" * crossref * "}" *
+}
+
+FUNCTION {format.incoll.inproc.crossref}
+{ "{\em In:}"
+ " \cite{" * crossref * "}" *
+}
+
+FUNCTION {article}
+{ output.bibitem
+ format.authors "author" output.check
+ author format.key output
+ output.year.check
+ new.block
+ format.title "title" output.check
+ new.block
+ crossref missing$
+ { journal "t" change.case$ emphasize
+ "journal" output.check
+ format.vol.num.date.pages output
+ }
+ { format.article.crossref output.nonnull
+ format.pages output
+ }
+ if$
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {book}
+{ output.bibitem
+ author empty$
+ { format.editors "author and editor" output.check
+ editor format.key output
+ }
+ { format.authors output.nonnull
+ crossref missing$
+ { "author and editor" editor either.or.check }
+ 'skip$
+ if$
+ }
+ if$
+ output.year.check
+ new.block
+ format.btitle "title" output.check
+ crossref missing$
+ { new.sentence
+ format.edition output
+ new.block
+ booklike.series.volume.number output
+ new.block
+ format.addr.pub "publisher" output.check
+ }
+ { new.block
+ format.book.crossref output.nonnull
+ }
+ if$
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {booklet}
+{ output.bibitem
+ format.authors output
+ author format.key output
+ output.year.month.check
+ new.block
+ format.btitle "title" output.check
+ new.block
+ howpublished output
+ address output
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {inbook}
+{ output.bibitem
+ author empty$
+ { format.editors "author and editor" output.check
+ editor format.key output
+ }
+ { format.authors output.nonnull
+ crossref missing$
+ { "author and editor" editor either.or.check }
+ 'skip$
+ if$
+ }
+ if$
+ output.year.check
+ new.block
+ format.btitle "title" output.check
+ crossref missing$
+ { new.sentence
+ format.edition output
+ new.block
+ booklike.series.volume.number output
+ new.block
+ format.addr.pub "publisher" output.check
+ }
+ { new.block
+ format.book.crossref output.nonnull
+ }
+ if$
+ new.block
+ note output
+ new.block % BS 1629 (rather
+ format.chapter.pages.inbook "chapter and pages" output.check
+ fin.entry % than Chicago,
+} % p. 451)
+
+FUNCTION {incollection}
+{ output.bibitem
+ author empty$
+ { format.editors "editor" output.check
+ editor format.key output }
+ { format.authors "author" output.check
+ author format.key output }
+ if$
+ output.year.check
+ new.block
+ format.title "title" output.check
+ new.block
+ crossref missing$ % Chapter and/or
+ { format.in.ed.booktitle output % page numbers can
+ format.edition output % come out via this
+ incollectionlike.series.volume.number output % route, too.
+ new.block
+ format.addr.pub "publisher" output.check
+ }
+ { format.incoll.inproc.crossref output.nonnull
+ new.block
+ }
+ if$
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {inproceedings}
+{ output.bibitem
+ format.authors "author" output.check
+ author format.key output
+ publisher empty$
+ { output.year.month.check }
+ { output.year.check }
+ if$
+ new.block
+ format.title "title" output.check
+ new.block
+ crossref missing$
+ { format.in.ed.booktitle "booktitle" output.check
+ incollectionlike.series.volume.number output
+ new.block
+ publisher empty$
+ {
+ organization empty$
+ 'skip$
+ { format.addr.org output }
+ if$
+ }
+ {
+ organization empty$
+ { format.addr.pub output }
+ { format.addr.pub.org output }
+ if$
+ }
+ if$
+ }
+ { format.incoll.inproc.crossref output.nonnull
+ }
+ if$
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {conference} { inproceedings }
+
+FUNCTION {manual}
+{ output.bibitem
+ format.authors output
+ author format.key output
+ output.year.month.check
+ new.block
+ format.btitle "title" output.check
+ new.sentence
+ format.edition output
+ new.block
+ organization address new.block.checkb
+ format.addr.org output
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {mastersthesis}
+{ output.bibitem
+ format.authors "author" output.check
+ author format.key output
+ output.year.month.check
+ new.block
+ format.btitle "title" output.check
+ new.block
+ "M.Phil. thesis" format.thesis.type output.nonnull % ODWE abbrev.
+ school "school" output.check
+ address output
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {misc}
+{ output.bibitem
+ format.authors output
+ author format.key output
+ output.year.month.check
+ new.block
+ format.btitle output
+ new.block
+ howpublished output
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {phdthesis}
+{ output.bibitem
+ format.authors "author" output.check
+ author format.key output
+ output.year.month.check
+ new.block
+ format.btitle "title" output.check
+ new.block
+ "Ph.D. thesis" format.thesis.type output.nonnull % Butcher,
+ school "school" output.check % page 174.
+ address output
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {proceedings}
+{ output.bibitem
+ format.editors "author and editor" output.check
+ editor format.key output
+ publisher empty$
+ { output.year.month.check }
+ { output.year.check }
+ if$
+ new.block
+ format.btitle "title" output.check
+ new.block
+ booklike.series.volume.number output
+ new.block
+ publisher empty$
+ {
+ organization empty$
+ 'skip$
+ { format.addr.org output }
+ if$
+ }
+ {
+ organization empty$
+ { format.addr.pub output }
+ { format.addr.pub.org output }
+ if$
+ }
+ if$
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {techreport}
+{ output.bibitem
+ format.authors "author" output.check
+ author format.key output
+ output.year.month.check
+ new.block
+ format.btitle "title" output.check
+ new.block
+ format.tr.number output.nonnull
+ new.sentence
+ format.addr.inst "institution" output.check
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {unpublished}
+{ output.bibitem
+ format.authors "author" output.check
+ author format.key output
+ output.year.month.check
+ new.block
+ format.btitle "title" output.check
+ new.block
+ note "note" output.check
+ fin.entry
+}
+
+FUNCTION {default.type} { misc }
+
+MACRO {jan} {"Jan."} % ODWE, "months", &
+ % Chicago, p. 383.
+MACRO {feb} {"Feb."}
+
+MACRO {mar} {"Mar."}
+
+MACRO {apr} {"Apr."}
+
+MACRO {may} {"May"}
+
+MACRO {jun} {"June"}
+
+MACRO {jul} {"July"}
+
+MACRO {aug} {"Aug."}
+
+MACRO {sep} {"Sept."}
+
+MACRO {oct} {"Oct."}
+
+MACRO {nov} {"Nov."}
+
+MACRO {dec} {"Dec."}
+
+MACRO {acmcs} {"ACM Computing Surveys"}
+
+MACRO {acta} {"Acta Informatica"}
+
+MACRO {cacm} {"Communications of the ACM"}
+
+MACRO {ibmjrd} {"IBM Journal of Research and Development"}
+
+MACRO {ibmsj} {"IBM Systems Journal"}
+
+MACRO {ieeese} {"IEEE Transactions on Software Engineering"}
+
+MACRO {ieeetc} {"IEEE Transactions on Computers"}
+
+MACRO {ieeetcad}
+ {"IEEE Transactions on Computer-Aided Design of Integrated Circuits"}
+
+MACRO {ipl} {"Information Processing Letters"}
+
+MACRO {jacm} {"Journal of the ACM"}
+
+MACRO {jcss} {"Journal of Computer and System Sciences"}
+
+MACRO {scp} {"Science of Computer Programming"}
+
+MACRO {sicomp} {"SIAM Journal on Computing"}
+
+MACRO {tocs} {"ACM Transactions on Computer Systems"}
+
+MACRO {tods} {"ACM Transactions on Database Systems"}
+
+MACRO {tog} {"ACM Transactions on Graphics"}
+
+MACRO {toms} {"ACM Transactions on Mathematical Software"}
+
+MACRO {toois} {"ACM Transactions on Office Information Systems"}
+
+MACRO {toplas} {"ACM Transactions on Programming Languages and Systems"}
+
+MACRO {tcs} {"Theoretical Computer Science"}
+
+READ
+
+FUNCTION {sortify}
+{ purify$
+ "l" change.case$
+}
+
+INTEGERS { len }
+
+FUNCTION {chop.word}
+{ 's :=
+ 'len :=
+ s #1 len substring$ =
+ { s len #1 + global.max$ substring$ }
+ 's
+ if$
+}
+
+FUNCTION {format.lab.names}
+{ 's :=
+ s #1 "{vv~}{ll}" format.name$
+ s num.names$ duplicate$
+ #2 >
+ { pop$ " {\em et~al.}" * }
+ { #2 <
+ 'skip$
+ { s #2 "{ff }{vv }{ll}{ jj}" format.name$ "others" =
+ { " {\em et~al.}" * }
+ { " \& " * s #2 "{vv~}{ll}" format.name$ * }
+ if$
+ }
+ if$
+ }
+ if$
+}
+
+FUNCTION {author.key.label}
+{ author empty$
+ { key empty$
+ { cite$ #1 #3 substring$ }
+ 'key
+ if$
+ }
+ { author format.lab.names }
+ if$
+}
+
+FUNCTION {author.editor.key.label}
+{ author empty$
+ { editor empty$
+ { key empty$
+ { cite$ #1 #3 substring$ }
+ 'key
+ if$
+ }
+ { editor format.lab.names }
+ if$
+ }
+ { author format.lab.names }
+ if$
+}
+
+FUNCTION {editor.key.label}
+{ editor empty$
+ { key empty$
+ { cite$ #1 #3 substring$ }
+ 'key
+ if$
+ }
+ { editor format.lab.names }
+ if$
+}
+
+FUNCTION {calc.label}
+ { type$ "book" =
+ type$ "inbook" =
+ type$ "incollection" = % For sensible
+ or or % treatment of
+ 'author.editor.key.label % Singer in
+ { type$ "proceedings" = % BS 1629.
+ 'editor.key.label
+ 'author.key.label
+ if$
+ }
+ if$
+ duplicate$
+ year empty$
+ {
+ "\protect\citename{" swap$ * ", }" *
+ "n.d." * 'label := % Chicago,
+ } % page 457.
+ {
+ "\protect\citename{" swap$ * ", }" *
+ year
+ *
+ 'label :=
+ }
+ if$
+ year field.or.null purify$ *
+ sortify 'sort.label :=
+}
+
+
+FUNCTION {sort.format.names} % To produce the
+{ 's := % order of entries
+ #1 'nameptr := % specified in item
+ "" % (3) on page 187
+ s num.names$ 'numnames := % of Butcher.
+ numnames 'namesleft :=
+ { namesleft #0 > nameptr #3 < and } % Only 1st 2 names
+ { nameptr #1 > % matter for
+ { " " * } % sorting.
+ 'skip$
+ if$ % Anything that's
+ nameptr #2 = numnames #2 > and % "et al" goes
+ { "zzzzz" * } % after works by 2
+ { % authors.
+ s nameptr "{vv{ } }{ll{ }}{ ff{ }}{ jj{ }}" format.name$ 't :=
+ nameptr numnames = t "others" = and
+ { "zzzzz" * }
+ { t sortify * }
+ if$
+ }
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+}
+
+FUNCTION {sort.format.title}
+{ 't :=
+ "A " #2
+ "An " #3
+ "The " #4 t chop.word
+ chop.word
+ chop.word
+ sortify
+ #1 global.max$ substring$
+}
+
+FUNCTION {author.sort}
+{ author empty$
+ { key empty$
+ { "to sort, need author or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { author sort.format.names }
+ if$
+}
+
+FUNCTION {author.editor.sort}
+{ author empty$
+ { editor empty$
+ { key empty$
+ { "to sort, need author, editor, or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { editor sort.format.names }
+ if$
+ }
+ { author sort.format.names }
+ if$
+}
+
+FUNCTION {editor.sort}
+{ editor empty$
+ { key empty$
+ { "to sort, need editor or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { editor sort.format.names }
+ if$
+}
+
+FUNCTION {presort} % Two sorting
+{ calc.label % passes, from
+ label sortify % apalike.bst.
+ " "
+ *
+ type$ "book" =
+ type$ "inbook" =
+ type$ "incollection" = % For Singer
+ or or % in BS 1629.
+ 'author.editor.sort
+ { type$ "proceedings" =
+ 'editor.sort
+ 'author.sort
+ if$
+ }
+ if$
+ #1 entry.max$ substring$
+ 'sort.label :=
+ sort.label
+ *
+ " "
+ *
+ title field.or.null
+ sort.format.title
+ *
+ #1 entry.max$ substring$
+ 'sort.key$ :=
+}
+
+ITERATE {presort}
+
+SORT
+
+STRINGS { last.label next.extra }
+
+INTEGERS { last.extra.num }
+
+FUNCTION {initialize.extra.label.stuff}
+{ #0 int.to.chr$ 'last.label :=
+ "" 'next.extra :=
+ #0 'last.extra.num :=
+}
+
+FUNCTION {forward.pass}
+{ last.label label =
+ { last.extra.num #1 + 'last.extra.num :=
+ last.extra.num int.to.chr$ 'extra.label :=
+ }
+ { "a" chr.to.int$ 'last.extra.num :=
+ "" 'extra.label :=
+ label 'last.label :=
+ }
+ if$
+}
+
+FUNCTION {reverse.pass}
+{ next.extra "b" =
+ { "a" 'extra.label := }
+ 'skip$
+ if$ % Code needed here
+ % if \citeauthor
+ % and \citeyear
+ label extra.label * 'label := % were supported.
+ extra.label 'next.extra :=
+}
+
+EXECUTE {initialize.extra.label.stuff}
+
+ITERATE {forward.pass}
+
+REVERSE {reverse.pass}
+
+FUNCTION {bib.sort.order}
+{ sort.label
+ " "
+ *
+ year field.or.null sortify
+ *
+ " "
+ *
+ title field.or.null
+ sort.format.title
+ *
+ #1 entry.max$ substring$
+ 'sort.key$ :=
+}
+
+ITERATE {bib.sort.order}
+
+SORT
+
+FUNCTION {begin.bib}
+{ preamble$ empty$
+ 'skip$
+ { preamble$ write$ newline$ }
+ if$
+ "\begin{thebibliography}{}" write$ newline$
+}
+
+EXECUTE {begin.bib}
+
+EXECUTE {init.state.consts}
+
+ITERATE {call.type$}
+
+FUNCTION {end.bib}
+{ newline$
+ "\end{thebibliography}" write$ newline$
+}
+
+EXECUTE {end.bib}
diff --git a/biblio/bibtex/contrib/authordate/authordate2.ltx b/biblio/bibtex/contrib/authordate/authordate2.ltx
new file mode 100644
index 0000000000..c2a49b7fb1
--- /dev/null
+++ b/biblio/bibtex/contrib/authordate/authordate2.ltx
@@ -0,0 +1,18 @@
+% -*-latex-*-
+% Document name: /usr/local/lib/tex/bibtex/authordate2.ltx
+% Creator: David Rhead [David_Rhead@vme.nott.ac.uk]
+% Creation Date: Sun 28 Jun 92 19:10:19 BST
+
+\documentstyle[authordate1-4]{report}
+
+\raggedright
+
+\begin{document}
+
+\input{testadb.ltx}
+
+\bibliographystyle{authordate2}
+
+\bibliography{test}
+
+\end{document}
diff --git a/biblio/bibtex/contrib/authordate/authordate3.bst b/biblio/bibtex/contrib/authordate/authordate3.bst
new file mode 100644
index 0000000000..d105c7c215
--- /dev/null
+++ b/biblio/bibtex/contrib/authordate/authordate3.bst
@@ -0,0 +1,1309 @@
+% This BibTeX 0.99 style file is intended for documents that use the
+% author-date citation system. It should be used in conjunction with the
+% authordate1-4.sty (or equivalent) LaTeX style-option.
+%
+% In deciding on the bibliography layout to be implemented, the following
+% works have been consulted:
+% 1. British Standard 5605: "Citing publications by bibliographic
+% references", 1978.
+% 2. British Standard 1629: "Bibliographic references", 1976.
+% (Note: There is now a 1989 edition.)
+% 3. "Copy-editing" by Judith Butcher, Cambridge University Press, 1981.
+% 4. "The Oxford Dictionary for Writers and Editors", Oxford University
+% Press, 1981 (for abbreviations).
+% 5. "The Chicago Manual of Style", Chicago University Press, 1982.
+%
+% Discretion has been used in certain matters. In particular:
+% - Titles are italic except when there is a "contribution title" and
+% a "main publication title", in which case the "contribution title"
+% is roman while the "main publication title" is italic.
+% - When there is a PUBLISHER, it is assumed that ADDRESS contains "place of
+% publication"; output is of the form "place-of-publication: publisher".
+% When there is an ORGANIZATION as well as a PUBLISHER, output is of the
+% form "place-of-publication: publisher, for organization". Otherwise,
+% it is assumed that ADDRESS is a postal address, and output is of the
+% form "institution, address", "organization, address", "school, address"
+% or "howpublished, address".
+% - If there is a MONTH but no VOLUME or NUMBER for a journal-article, the
+% MONTH is used on the assumption that it contains information that is
+% equivalent to VOLUME or NUMBER. MONTH is ignored for other documents
+% that have a PUBLISHER, but output after YEAR for anything else.
+% - When CHAPTER and/or PAGES are specified with INBOOK, it is assumed that
+% these fields are being used to pick out particular pages of interest
+% (as an alternative to using the optional [...] argument of \cite);
+% the information is put at the very end of the entry, in line with BS 1629.
+% When CHAPTER and/or PAGES are specified for INCOLLECTION or INPROCEEDINGS,
+% it is assumed that the fields are being used to specify the location of
+% the part/article of interest; the information is put before the
+% BOOKTITLE, in line with Chicago's treatment of "parts" and "chapters".
+% - Since "volume" can be used in various ways (see page 219 of Butcher),
+% this file assumes that, when there is a SERIES, any VOLUME and NUMBER
+% refer to position in the SERIES (i.e. Butcher's meaning 4).
+% If there is a VOLUME but no SERIES, it is assumed that VOLUME refers
+% to a volume within a particular work (i.e. Butcher's meaning 1, 2 or 3).
+% For INPROCEEDINGS and INCOLLECTION, this information goes after the
+% BOOKTITLE. (If you prefer to have volume information before EDITOR,
+% as on page 449 of Chicago, you can set TYPE = "Vol." with INCOLLECTION.)
+%
+% This file differs from authordate1.bst, authordate2.bst and authordate4.bst
+% in that:
+% - The titles of articles, journals and books are left in whatever
+% combination of upper-case and lower-case appears in the .bib file.
+% - Author's and editor's names are in small capitals.
+%
+% The combination of authordate3.bst and authordate1-4.sty allows citations
+% of the form \shortcite{bloggs-60} as well as the usual \cite{bloggs-60}.
+% When
+% ... \cite{bloggs-60} ... \shortcite{bloggs-60} ...
+% appears in the input file,
+% ... (Bloggs, 1960) ... (1960) ...
+% appears in the final document.
+%
+% This file was developed from apalike.bst. It also uses code taken from
+% acm.bst, aaai-named.bst, btxbst.doc, ieeetr.bst and siam.bst.
+%
+% David Rhead
+% Cripps Computing Centre
+% Nottingham University
+% March 1990
+%
+
+ENTRY
+ { address
+ author
+ booktitle
+ chapter
+ edition
+ editor
+ howpublished
+ institution
+ journal
+ key
+ month
+ note
+ number
+ organization
+ pages
+ publisher
+ school
+ series
+ title
+ type
+ volume
+ year
+ }
+ {}
+ { label extra.label sort.label }
+
+INTEGERS { output.state before.all mid.sentence after.sentence after.block }
+
+FUNCTION {init.state.consts}
+{ #0 'before.all :=
+ #1 'mid.sentence :=
+ #2 'after.sentence :=
+ #3 'after.block :=
+}
+
+STRINGS { s t }
+
+FUNCTION {output.nonnull}
+{ 's :=
+ output.state mid.sentence =
+ { ", " * write$ }
+ { output.state after.block =
+ { add.period$ write$
+ newline$
+ "\newblock " write$
+ }
+ { output.state before.all =
+ 'write$
+ { add.period$ " " * write$ }
+ if$
+ }
+ if$
+ mid.sentence 'output.state :=
+ }
+ if$
+ s
+}
+
+FUNCTION {output}
+{ duplicate$ empty$
+ 'pop$
+ 'output.nonnull
+ if$
+}
+
+FUNCTION {output.check}
+{ 't :=
+ duplicate$ empty$
+ { pop$ "empty " t * " in " * cite$ * warning$ }
+ 'output.nonnull
+ if$
+}
+
+FUNCTION {output.year.month.check}
+{ year empty$
+ { "empty year in " cite$ * warning$ }
+ { add.period$ write$
+ month empty$
+ { " " year * extra.label * "." *
+ after.sentence 'output.state :=
+ }
+ { " " year * extra.label * " (" * month * ")." *
+ after.sentence 'output.state :=
+ }
+ if$
+ }
+ if$
+}
+
+FUNCTION {output.year.check}
+{ year empty$
+ { "empty year in " cite$ * warning$ }
+ { add.period$ write$
+ " " year * extra.label * "." *
+ after.sentence 'output.state :=
+ }
+ if$
+}
+
+FUNCTION {output.bibitem}
+{ newline$
+ "\bibitem[" write$
+ label write$
+ "]{" write$
+ cite$ write$
+ "}" write$
+ newline$
+ ""
+ before.all 'output.state :=
+}
+
+FUNCTION {fin.entry}
+{ add.period$
+ write$
+ newline$
+}
+
+FUNCTION {new.block}
+{ output.state before.all =
+ 'skip$
+ { after.block 'output.state := }
+ if$
+}
+
+FUNCTION {new.sentence}
+{ output.state after.block =
+ 'skip$
+ { output.state before.all =
+ 'skip$
+ { after.sentence 'output.state := }
+ if$
+ }
+ if$
+}
+
+FUNCTION {not}
+{ { #0 }
+ { #1 }
+ if$
+}
+
+FUNCTION {and}
+{ 'skip$
+ { pop$ #0 }
+ if$
+}
+
+FUNCTION {or}
+{ { pop$ #1 }
+ 'skip$
+ if$
+}
+
+FUNCTION {new.block.checkb}
+{ empty$
+ swap$ empty$
+ and
+ 'skip$
+ 'new.block
+ if$
+}
+
+FUNCTION {field.or.null}
+{ duplicate$ empty$
+ { pop$ "" }
+ 'skip$
+ if$
+}
+
+FUNCTION {boldface}
+{ duplicate$ empty$
+ { pop$ "" }
+ { "{\bf " swap$ * "}" * }
+ if$
+}
+
+FUNCTION {emphasize}
+{ duplicate$ empty$
+ { pop$ "" }
+ { "{\em " swap$ * "}" * }
+ if$
+}
+
+INTEGERS { nameptr namesleft numnames }
+
+FUNCTION {format.names}
+{ 's :=
+ #1 'nameptr :=
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ { s nameptr "{vv~}{ll}{, jj}{, ff}" format.name$ 't :=
+ nameptr #1 >
+ { namesleft #1 >
+ { ", " * t * }
+ { t "others" =
+ { ", {\em et~al.}" * }
+ { ", \& " * t * } % Butcher, pages
+ if$ % 186-189.
+ }
+ if$
+ }
+ 't
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+}
+
+FUNCTION {format.authors}
+{ author empty$
+ { "" } % Small capitals
+ { "{\sc " * author format.names "}" * } % for
+ if$ % authordate3.bst
+} % and
+ % authordate4.bst.
+FUNCTION {format.key}
+{ empty$
+ { "{\sc " * key field.or.null "}" * } % Small capitals.
+ { "" }
+ if$
+}
+
+FUNCTION {format.editors}
+{ editor empty$
+ { "" } % Small capitals.
+ { "{\sc " * editor format.names "}" *
+ editor num.names$ #1 > % Use ODWE abbrevs.
+ { " (eds)" * } % to avoid
+ { " (ed)" * } % ambiguity between
+ if$ % "editor" and
+ } % "edition".
+ if$
+}
+
+FUNCTION {format.title} % Nothing needs
+{ title empty$ % doing here in
+ { "" } % authordate1.bst
+ { title } % or
+ if$ % authordate3.bst.
+}
+
+FUNCTION {n.dashify}
+{ 't :=
+ ""
+ { t empty$ not }
+ { t #1 #1 substring$ "-" =
+ { t #1 #2 substring$ "--" = not
+ { "--" *
+ t #2 global.max$ substring$ 't :=
+ }
+ { { t #1 #1 substring$ "-" = }
+ { "-" *
+ t #2 global.max$ substring$ 't :=
+ }
+ while$
+ }
+ if$
+ }
+ { t #1 #1 substring$ *
+ t #2 global.max$ substring$ 't :=
+ }
+ if$
+ }
+ while$
+}
+
+FUNCTION {format.btitle}
+{ title empty$
+ { "" } % Don't change case
+ { title emphasize } % in
+ if$ % authordate1.bst
+} % or
+ % authordate3.bst.
+FUNCTION {tie.or.space.connect}
+{ duplicate$ text.length$ #3 <
+ { "~" }
+ { " " }
+ if$
+ swap$ * *
+}
+
+FUNCTION {either.or.check}
+{ empty$
+ 'pop$
+ { "can't use both " swap$ * " fields in " * cite$ * warning$ }
+ if$
+}
+
+INTEGERS { multiresult }
+
+FUNCTION {multi.page.check}
+{ 't :=
+ #0 'multiresult :=
+ { multiresult not
+ t empty$ not
+ and
+ }
+ { t #1 #1 substring$
+ duplicate$ "-" =
+ swap$ duplicate$ "," =
+ swap$ "+" =
+ or or
+ { #1 'multiresult := }
+ { t #2 global.max$ substring$ 't := }
+ if$
+ }
+ while$
+ multiresult
+}
+
+FUNCTION {format.numberinseries}
+{ number empty$
+ { "" }
+ { number multi.page.check
+ { ", nos. " number n.dashify tie.or.space.connect }
+ { ", no. " number tie.or.space.connect }
+ if$
+ }
+ if$
+}
+
+FUNCTION {booklike.series.volume.number} % Chicago, pages
+{ series empty$ % 450-451.
+ { volume empty$
+ { " " }
+ { " Vol. " volume * }
+ if$
+ }
+ {
+ volume empty$
+ { number empty$
+ { series }
+ { series format.numberinseries * }
+ if$
+ }
+ { number empty$
+ { series ", vol. " volume * * }
+ { series ", vol. " * volume * format.numberinseries * }
+ if$
+ }
+ if$
+ }
+ if$
+}
+
+FUNCTION {incollectionlike.series.volume.number}
+{ series empty$
+ { volume empty$
+ { " " }
+ { " vol. " volume * }
+ if$
+ }
+ { new.block
+ volume empty$
+ { number empty$
+ { series }
+ { series format.numberinseries * }
+ if$
+ }
+ { number empty$
+ { series ", vol. " volume * * }
+ { series ", vol. " * volume * format.numberinseries * }
+ if$
+ }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.edition}
+{ edition empty$
+ { "" }
+ { output.state mid.sentence =
+ { edition "l" change.case$ " edn." * }
+ { edition "t" change.case$ " edn." * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.pages}
+{ pages empty$
+ { "" }
+ { pages multi.page.check
+ { "" pages n.dashify tie.or.space.connect }
+ { "" pages tie.or.space.connect }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.pagesinbook} % By the time the
+{ pages empty$ % reader has read
+ { "" } % address, pub'r,
+ { pages multi.page.check % note (where the
+ { "Pages " pages n.dashify tie.or.space.connect } % note may end with
+ { "Page " pages tie.or.space.connect } % numbers), s/he
+ if$ % may not recognise
+ } % a number-range as
+ if$ % meaning pages.
+} % Avoid ambiguity
+ % (Butcher, p.181).
+
+FUNCTION {format.vol.num.date.pages}
+{ volume empty$
+ { month empty$
+ { "" }
+ { month }
+ if$
+ }
+ { volume boldface field.or.null
+ number empty$
+ { month empty$
+ 'skip$
+ { "(" month * ")" * * }
+ if$
+ }
+ { "(" number * ")" * *
+ volume empty$
+ { "there's a number but no volume in " cite$ * warning$ }
+ 'skip$
+ if$
+ }
+ if$
+ }
+ if$
+ pages empty$
+ 'skip$
+ { duplicate$ empty$
+ { pop$ format.pages }
+ { ", " * pages n.dashify * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.chapter.pages.inbook}
+{ chapter empty$
+ 'format.pagesinbook
+ { type empty$
+ { "Chap." }
+ { type }
+ if$
+ chapter tie.or.space.connect
+ pages empty$
+ 'skip$
+ { ", " * format.pagesinbook "l" change.case$ * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.chapter.pages.incoll}
+{ chapter empty$
+ { pages empty$
+ { "{\em In:} " }
+ { "{\em " format.pagesinbook " of:} " * * }
+ if$
+ }
+ { type empty$
+ { "{\em Chap. " chapter * }
+ { "{\em " type * " " * chapter * }
+ if$
+ pages empty$
+ { " of:} " * }
+ { ", " * format.pagesinbook "l" change.case$ " of:} " * * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.in.ed.booktitle} % Achieves effect
+{ booktitle empty$ % shown in 16.51
+ { "" } % of Chicago, at
+ { editor empty$ % expense of not
+ { format.chapter.pages.incoll % achieving effects
+ booktitle emphasize * } % shown in 16.50
+ { format.chapter.pages.incoll % of Chicago, on
+ format.editors * ", " * % page 189 of
+ booktitle emphasize * } % Butcher and in
+ if$ % 4.4 of BS 1629.
+ }
+ if$ % Don't change
+} % case.
+
+FUNCTION {format.thesis.type}
+{ type empty$
+ 'skip$
+ { pop$
+ type % Don't change
+ } % case.
+ if$
+}
+
+FUNCTION {format.tr.number}
+{ type empty$
+ { "Tech. rept." } % ODWE abbrevs.
+ 'type
+ if$
+ number empty$
+ { } % Whatever was
+ { number tie.or.space.connect } % having its case
+ if$ % changed, leave
+} % it alone.
+
+FUNCTION {format.addr.pub}
+{ publisher empty$
+ { "" }
+ { address empty$
+ { "" }
+ { address ": " * }
+ if$
+ publisher *
+ }
+ if$
+}
+
+FUNCTION {format.addr.pub.org} % If there's an
+{ address empty$ % an organization
+ { publisher * ", for " * organization * } % and a publisher
+ { address ": " * publisher * ", for " * organization * } % too.
+ if$
+}
+
+FUNCTION {format.addr.inst}
+{ address empty$
+ { institution empty$
+ { "" }
+ { institution }
+ if$
+ }
+ { institution empty$
+ { "" }
+ { institution ", " * }
+ if$
+ address *
+ }
+ if$
+}
+
+FUNCTION {format.addr.org}
+{ address empty$
+ { organization empty$
+ { "" }
+ { organization }
+ if$
+ }
+ { organization empty$
+ { "" }
+ { organization ", " * }
+ if$
+ address *
+ }
+ if$
+}
+
+FUNCTION {format.article.crossref}
+{ "{\em In:}"
+ " \cite{" * crossref * "}" *
+}
+
+FUNCTION {format.book.crossref}
+{ volume empty$
+ { "empty volume in " cite$ * "'s crossref of " * crossref * warning$
+ "{\em In:}"
+ }
+ { " Vol." volume tie.or.space.connect
+ " of " *
+ }
+ if$
+ "\cite{" * crossref * "}" *
+}
+
+FUNCTION {format.incoll.inproc.crossref}
+{ "{\em In:}"
+ " \cite{" * crossref * "}" *
+}
+
+FUNCTION {article}
+{ output.bibitem
+ format.authors "author" output.check
+ author format.key output
+ output.year.check
+ new.block
+ format.title "title" output.check
+ new.block
+ crossref missing$
+ { journal emphasize % Don't change
+ "journal" output.check % case.
+ format.vol.num.date.pages output
+ }
+ { format.article.crossref output.nonnull
+ format.pages output
+ }
+ if$
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {book}
+{ output.bibitem
+ author empty$
+ { format.editors "author and editor" output.check
+ editor format.key output
+ }
+ { format.authors output.nonnull
+ crossref missing$
+ { "author and editor" editor either.or.check }
+ 'skip$
+ if$
+ }
+ if$
+ output.year.check
+ new.block
+ format.btitle "title" output.check
+ crossref missing$
+ { new.sentence
+ format.edition output
+ new.block
+ booklike.series.volume.number output
+ new.block
+ format.addr.pub "publisher" output.check
+ }
+ { new.block
+ format.book.crossref output.nonnull
+ }
+ if$
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {booklet}
+{ output.bibitem
+ format.authors output
+ author format.key output
+ output.year.month.check
+ new.block
+ format.btitle "title" output.check
+ new.block
+ howpublished output
+ address output
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {inbook}
+{ output.bibitem
+ author empty$
+ { format.editors "author and editor" output.check
+ editor format.key output
+ }
+ { format.authors output.nonnull
+ crossref missing$
+ { "author and editor" editor either.or.check }
+ 'skip$
+ if$
+ }
+ if$
+ output.year.check
+ new.block
+ format.btitle "title" output.check
+ crossref missing$
+ { new.sentence
+ format.edition output
+ new.block
+ booklike.series.volume.number output
+ new.block
+ format.addr.pub "publisher" output.check
+ }
+ { new.block
+ format.book.crossref output.nonnull
+ }
+ if$
+ new.block
+ note output
+ new.block % BS 1629 (rather
+ format.chapter.pages.inbook "chapter and pages" output.check
+ fin.entry % than Chicago,
+} % p. 451)
+
+FUNCTION {incollection}
+{ output.bibitem
+ author empty$
+ { format.editors "editor" output.check
+ editor format.key output }
+ { format.authors "author" output.check
+ author format.key output }
+ if$
+ output.year.check
+ new.block
+ format.title "title" output.check
+ new.block
+ crossref missing$ % Chapter and/or
+ { format.in.ed.booktitle output % page numbers can
+ format.edition output % come out via this
+ incollectionlike.series.volume.number output % route, too.
+ new.block
+ format.addr.pub "publisher" output.check
+ }
+ { format.incoll.inproc.crossref output.nonnull
+ new.block
+ }
+ if$
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {inproceedings}
+{ output.bibitem
+ format.authors "author" output.check
+ author format.key output
+ publisher empty$
+ { output.year.month.check }
+ { output.year.check }
+ if$
+ new.block
+ format.title "title" output.check
+ new.block
+ crossref missing$
+ { format.in.ed.booktitle "booktitle" output.check
+ incollectionlike.series.volume.number output
+ new.block
+ publisher empty$
+ {
+ organization empty$
+ 'skip$
+ { format.addr.org output }
+ if$
+ }
+ {
+ organization empty$
+ { format.addr.pub output }
+ { format.addr.pub.org output }
+ if$
+ }
+ if$
+ }
+ { format.incoll.inproc.crossref output.nonnull
+ }
+ if$
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {conference} { inproceedings }
+
+FUNCTION {manual}
+{ output.bibitem
+ format.authors output
+ author format.key output
+ output.year.month.check
+ new.block
+ format.btitle "title" output.check
+ new.sentence
+ format.edition output
+ new.block
+ organization address new.block.checkb
+ format.addr.org output
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {mastersthesis}
+{ output.bibitem
+ format.authors "author" output.check
+ author format.key output
+ output.year.month.check
+ new.block
+ format.btitle "title" output.check
+ new.block
+ "M.Phil. thesis" format.thesis.type output.nonnull % ODWE abbrev.
+ school "school" output.check
+ address output
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {misc}
+{ output.bibitem
+ format.authors output
+ author format.key output
+ output.year.month.check
+ new.block
+ format.btitle output
+ new.block
+ howpublished output
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {phdthesis}
+{ output.bibitem
+ format.authors "author" output.check
+ author format.key output
+ output.year.month.check
+ new.block
+ format.btitle "title" output.check
+ new.block
+ "Ph.D. thesis" format.thesis.type output.nonnull % Butcher,
+ school "school" output.check % page 174.
+ address output
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {proceedings}
+{ output.bibitem
+ format.editors "author and editor" output.check
+ editor format.key output
+ publisher empty$
+ { output.year.month.check }
+ { output.year.check }
+ if$
+ new.block
+ format.btitle "title" output.check
+ new.block
+ booklike.series.volume.number output
+ new.block
+ publisher empty$
+ {
+ organization empty$
+ 'skip$
+ { format.addr.org output }
+ if$
+ }
+ {
+ organization empty$
+ { format.addr.pub output }
+ { format.addr.pub.org output }
+ if$
+ }
+ if$
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {techreport}
+{ output.bibitem
+ format.authors "author" output.check
+ author format.key output
+ output.year.month.check
+ new.block
+ format.btitle "title" output.check
+ new.block
+ format.tr.number output.nonnull
+ new.sentence
+ format.addr.inst "institution" output.check
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {unpublished}
+{ output.bibitem
+ format.authors "author" output.check
+ author format.key output
+ output.year.month.check
+ new.block
+ format.btitle "title" output.check
+ new.block
+ note "note" output.check
+ fin.entry
+}
+
+FUNCTION {default.type} { misc }
+
+MACRO {jan} {"Jan."} % ODWE, "months", &
+ % Chicago, p. 383.
+MACRO {feb} {"Feb."}
+
+MACRO {mar} {"Mar."}
+
+MACRO {apr} {"Apr."}
+
+MACRO {may} {"May"}
+
+MACRO {jun} {"June"}
+
+MACRO {jul} {"July"}
+
+MACRO {aug} {"Aug."}
+
+MACRO {sep} {"Sept."}
+
+MACRO {oct} {"Oct."}
+
+MACRO {nov} {"Nov."}
+
+MACRO {dec} {"Dec."}
+
+MACRO {acmcs} {"ACM Computing Surveys"}
+
+MACRO {acta} {"Acta Informatica"}
+
+MACRO {cacm} {"Communications of the ACM"}
+
+MACRO {ibmjrd} {"IBM Journal of Research and Development"}
+
+MACRO {ibmsj} {"IBM Systems Journal"}
+
+MACRO {ieeese} {"IEEE Transactions on Software Engineering"}
+
+MACRO {ieeetc} {"IEEE Transactions on Computers"}
+
+MACRO {ieeetcad}
+ {"IEEE Transactions on Computer-Aided Design of Integrated Circuits"}
+
+MACRO {ipl} {"Information Processing Letters"}
+
+MACRO {jacm} {"Journal of the ACM"}
+
+MACRO {jcss} {"Journal of Computer and System Sciences"}
+
+MACRO {scp} {"Science of Computer Programming"}
+
+MACRO {sicomp} {"SIAM Journal on Computing"}
+
+MACRO {tocs} {"ACM Transactions on Computer Systems"}
+
+MACRO {tods} {"ACM Transactions on Database Systems"}
+
+MACRO {tog} {"ACM Transactions on Graphics"}
+
+MACRO {toms} {"ACM Transactions on Mathematical Software"}
+
+MACRO {toois} {"ACM Transactions on Office Information Systems"}
+
+MACRO {toplas} {"ACM Transactions on Programming Languages and Systems"}
+
+MACRO {tcs} {"Theoretical Computer Science"}
+
+READ
+
+FUNCTION {sortify}
+{ purify$
+ "l" change.case$
+}
+
+INTEGERS { len }
+
+FUNCTION {chop.word}
+{ 's :=
+ 'len :=
+ s #1 len substring$ =
+ { s len #1 + global.max$ substring$ }
+ 's
+ if$
+}
+
+FUNCTION {format.lab.names}
+{ 's :=
+ s #1 "{vv~}{ll}" format.name$
+ s num.names$ duplicate$
+ #2 >
+ { pop$ " {\em et~al.}" * }
+ { #2 <
+ 'skip$
+ { s #2 "{ff }{vv }{ll}{ jj}" format.name$ "others" =
+ { " {\em et~al.}" * }
+ { " \& " * s #2 "{vv~}{ll}" format.name$ * }
+ if$
+ }
+ if$
+ }
+ if$
+}
+
+FUNCTION {author.key.label}
+{ author empty$
+ { key empty$
+ { cite$ #1 #3 substring$ }
+ 'key
+ if$
+ }
+ { author format.lab.names }
+ if$
+}
+
+FUNCTION {author.editor.key.label}
+{ author empty$
+ { editor empty$
+ { key empty$
+ { cite$ #1 #3 substring$ }
+ 'key
+ if$
+ }
+ { editor format.lab.names }
+ if$
+ }
+ { author format.lab.names }
+ if$
+}
+
+FUNCTION {editor.key.label}
+{ editor empty$
+ { key empty$
+ { cite$ #1 #3 substring$ }
+ 'key
+ if$
+ }
+ { editor format.lab.names }
+ if$
+}
+
+FUNCTION {calc.label}
+ { type$ "book" =
+ type$ "inbook" =
+ type$ "incollection" = % For sensible
+ or or % treatment of
+ 'author.editor.key.label % Singer in
+ { type$ "proceedings" = % BS 1629.
+ 'editor.key.label
+ 'author.key.label
+ if$
+ }
+ if$
+ duplicate$
+ year empty$
+ {
+ "\protect\citename{" swap$ * ", }" *
+ "n.d." * 'label := % Chicago,
+ } % page 457.
+ {
+ "\protect\citename{" swap$ * ", }" *
+ year
+ *
+ 'label :=
+ }
+ if$
+ year field.or.null purify$ *
+ sortify 'sort.label :=
+}
+
+
+FUNCTION {sort.format.names} % To produce the
+{ 's := % order of entries
+ #1 'nameptr := % specified in item
+ "" % (3) on page 187
+ s num.names$ 'numnames := % of Butcher.
+ numnames 'namesleft :=
+ { namesleft #0 > nameptr #3 < and } % Only 1st 2 names
+ { nameptr #1 > % matter for
+ { " " * } % sorting.
+ 'skip$
+ if$ % Anything that's
+ nameptr #2 = numnames #2 > and % "et al" goes
+ { "zzzzz" * } % after works by 2
+ { % authors.
+ s nameptr "{vv{ } }{ll{ }}{ ff{ }}{ jj{ }}" format.name$ 't :=
+ nameptr numnames = t "others" = and
+ { "zzzzz" * }
+ { t sortify * }
+ if$
+ }
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+}
+
+FUNCTION {sort.format.title}
+{ 't :=
+ "A " #2
+ "An " #3
+ "The " #4 t chop.word
+ chop.word
+ chop.word
+ sortify
+ #1 global.max$ substring$
+}
+
+FUNCTION {author.sort}
+{ author empty$
+ { key empty$
+ { "to sort, need author or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { author sort.format.names }
+ if$
+}
+
+FUNCTION {author.editor.sort}
+{ author empty$
+ { editor empty$
+ { key empty$
+ { "to sort, need author, editor, or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { editor sort.format.names }
+ if$
+ }
+ { author sort.format.names }
+ if$
+}
+
+FUNCTION {editor.sort}
+{ editor empty$
+ { key empty$
+ { "to sort, need editor or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { editor sort.format.names }
+ if$
+}
+
+FUNCTION {presort} % Two sorting
+{ calc.label % passes, from
+ label sortify % apalike.bst.
+ " "
+ *
+ type$ "book" =
+ type$ "inbook" =
+ type$ "incollection" = % For Singer
+ or or % in BS 1629.
+ 'author.editor.sort
+ { type$ "proceedings" =
+ 'editor.sort
+ 'author.sort
+ if$
+ }
+ if$
+ #1 entry.max$ substring$
+ 'sort.label :=
+ sort.label
+ *
+ " "
+ *
+ title field.or.null
+ sort.format.title
+ *
+ #1 entry.max$ substring$
+ 'sort.key$ :=
+}
+
+ITERATE {presort}
+
+SORT
+
+STRINGS { last.label next.extra }
+
+INTEGERS { last.extra.num }
+
+FUNCTION {initialize.extra.label.stuff}
+{ #0 int.to.chr$ 'last.label :=
+ "" 'next.extra :=
+ #0 'last.extra.num :=
+}
+
+FUNCTION {forward.pass}
+{ last.label label =
+ { last.extra.num #1 + 'last.extra.num :=
+ last.extra.num int.to.chr$ 'extra.label :=
+ }
+ { "a" chr.to.int$ 'last.extra.num :=
+ "" 'extra.label :=
+ label 'last.label :=
+ }
+ if$
+}
+
+FUNCTION {reverse.pass}
+{ next.extra "b" =
+ { "a" 'extra.label := }
+ 'skip$
+ if$ % Code needed here
+ % if \citeauthor
+ % and \citeyear
+ label extra.label * 'label := % were supported.
+ extra.label 'next.extra :=
+}
+
+EXECUTE {initialize.extra.label.stuff}
+
+ITERATE {forward.pass}
+
+REVERSE {reverse.pass}
+
+FUNCTION {bib.sort.order}
+{ sort.label
+ " "
+ *
+ year field.or.null sortify
+ *
+ " "
+ *
+ title field.or.null
+ sort.format.title
+ *
+ #1 entry.max$ substring$
+ 'sort.key$ :=
+}
+
+ITERATE {bib.sort.order}
+
+SORT
+
+FUNCTION {begin.bib}
+{ preamble$ empty$
+ 'skip$
+ { preamble$ write$ newline$ }
+ if$
+ "\begin{thebibliography}{}" write$ newline$
+}
+
+EXECUTE {begin.bib}
+
+EXECUTE {init.state.consts}
+
+ITERATE {call.type$}
+
+FUNCTION {end.bib}
+{ newline$
+ "\end{thebibliography}" write$ newline$
+}
+
+EXECUTE {end.bib}
diff --git a/biblio/bibtex/contrib/authordate/authordate3.ltx b/biblio/bibtex/contrib/authordate/authordate3.ltx
new file mode 100644
index 0000000000..0f9ff70398
--- /dev/null
+++ b/biblio/bibtex/contrib/authordate/authordate3.ltx
@@ -0,0 +1,18 @@
+% -*-latex-*-
+% Document name: /usr/local/lib/tex/bibtex/authordate3.ltx
+% Creator: David Rhead [David_Rhead@vme.nott.ac.uk]
+% Creation Date: Sun 28 Jun 92 19:10:19 BST
+
+\documentstyle[authordate1-4]{report}
+
+\raggedright
+
+\begin{document}
+
+\input{testadb.ltx}
+
+\bibliographystyle{authordate3}
+
+\bibliography{test}
+
+\end{document}
diff --git a/biblio/bibtex/contrib/authordate/authordate4.bst b/biblio/bibtex/contrib/authordate/authordate4.bst
new file mode 100644
index 0000000000..b8f76ab695
--- /dev/null
+++ b/biblio/bibtex/contrib/authordate/authordate4.bst
@@ -0,0 +1,1310 @@
+% This BibTeX 0.99 style file is intended for documents that use the
+% author-date citation system. It should be used in conjunction with the
+% authordate1-4.sty (or equivalent) LaTeX style-option.
+%
+% In deciding on the bibliography layout to be implemented, the following
+% works have been consulted:
+% 1. British Standard 5605: "Citing publications by bibliographic
+% references", 1978.
+% 2. British Standard 1629: "Bibliographic references", 1976.
+% (Note: There is now a 1989 edition.)
+% 3. "Copy-editing" by Judith Butcher, Cambridge University Press, 1981.
+% 4. "The Oxford Dictionary for Writers and Editors", Oxford University
+% Press, 1981 (for abbreviations).
+% 5. "The Chicago Manual of Style", Chicago University Press, 1982.
+%
+% Discretion has been used in certain matters. In particular:
+% - Titles are italic except when there is a "contribution title" and
+% a "main publication title", in which case the "contribution title"
+% is roman while the "main publication title" is italic.
+% - When there is a PUBLISHER, it is assumed that ADDRESS contains "place of
+% publication"; output is of the form "place-of-publication: publisher".
+% When there is an ORGANIZATION as well as a PUBLISHER, output is of the
+% form "place-of-publication: publisher, for organization". Otherwise,
+% it is assumed that ADDRESS is a postal address, and output is of the
+% form "institution, address", "organization, address", "school, address"
+% or "howpublished, address".
+% - If there is a MONTH but no VOLUME or NUMBER for a journal-article, the
+% MONTH is used on the assumption that it contains information that is
+% equivalent to VOLUME or NUMBER. MONTH is ignored for other documents
+% that have a PUBLISHER, but output after YEAR for anything else.
+% - When CHAPTER and/or PAGES are specified with INBOOK, it is assumed that
+% these fields are being used to pick out particular pages of interest
+% (as an alternative to using the optional [...] argument of \cite);
+% the information is put at the very end of the entry, in line with BS 1629.
+% When CHAPTER and/or PAGES are specified for INCOLLECTION or INPROCEEDINGS,
+% it is assumed that the fields are being used to specify the location of
+% the part/article of interest; the information is put before the
+% BOOKTITLE, in line with Chicago's treatment of "parts" and "chapters".
+% - Since "volume" can be used in various ways (see page 219 of Butcher),
+% this file assumes that, when there is a SERIES, any VOLUME and NUMBER
+% refer to position in the SERIES (i.e. Butcher's meaning 4).
+% If there is a VOLUME but no SERIES, it is assumed that VOLUME refers
+% to a volume within a particular work (i.e. Butcher's meaning 1, 2 or 3).
+% For INPROCEEDINGS and INCOLLECTION, this information goes after the
+% BOOKTITLE. (If you prefer to have volume information before EDITOR,
+% as on page 449 of Chicago, you can set TYPE = "Vol." with INCOLLECTION.)
+%
+% This file differs from authordate1.bst, authordate2.bst and authordate3.bst
+% in that:
+% - Titles of articles, journals and books are "downstyle". Apart from the
+% first character, and the first character following : and white space,
+% uppercase letters are converted to lowercase unless protected by {}.
+% - Author's and editor's names are in small capitals.
+%
+% The combination of authordate4.bst and authordate1-4.sty allows citations
+% of the form \shortcite{bloggs-60} as well as the usual \cite{bloggs-60}.
+% When
+% ... \cite{bloggs-60} ... \shortcite{bloggs-60} ...
+% appears in the input file,
+% ... (Bloggs, 1960) ... (1960) ...
+% appears in the final document.
+%
+% This file was developed from apalike.bst. It also uses code taken from
+% acm.bst, aaai-named.bst, btxbst.doc, ieeetr.bst and siam.bst.
+%
+% David Rhead
+% Cripps Computing Centre
+% Nottingham University
+% March 1990
+%
+
+ENTRY
+ { address
+ author
+ booktitle
+ chapter
+ edition
+ editor
+ howpublished
+ institution
+ journal
+ key
+ month
+ note
+ number
+ organization
+ pages
+ publisher
+ school
+ series
+ title
+ type
+ volume
+ year
+ }
+ {}
+ { label extra.label sort.label }
+
+INTEGERS { output.state before.all mid.sentence after.sentence after.block }
+
+FUNCTION {init.state.consts}
+{ #0 'before.all :=
+ #1 'mid.sentence :=
+ #2 'after.sentence :=
+ #3 'after.block :=
+}
+
+STRINGS { s t }
+
+FUNCTION {output.nonnull}
+{ 's :=
+ output.state mid.sentence =
+ { ", " * write$ }
+ { output.state after.block =
+ { add.period$ write$
+ newline$
+ "\newblock " write$
+ }
+ { output.state before.all =
+ 'write$
+ { add.period$ " " * write$ }
+ if$
+ }
+ if$
+ mid.sentence 'output.state :=
+ }
+ if$
+ s
+}
+
+FUNCTION {output}
+{ duplicate$ empty$
+ 'pop$
+ 'output.nonnull
+ if$
+}
+
+FUNCTION {output.check}
+{ 't :=
+ duplicate$ empty$
+ { pop$ "empty " t * " in " * cite$ * warning$ }
+ 'output.nonnull
+ if$
+}
+
+FUNCTION {output.year.month.check}
+{ year empty$
+ { "empty year in " cite$ * warning$ }
+ { add.period$ write$
+ month empty$
+ { " " year * extra.label * "." *
+ after.sentence 'output.state :=
+ }
+ { " " year * extra.label * " (" * month * ")." *
+ after.sentence 'output.state :=
+ }
+ if$
+ }
+ if$
+}
+
+FUNCTION {output.year.check}
+{ year empty$
+ { "empty year in " cite$ * warning$ }
+ { add.period$ write$
+ " " year * extra.label * "." *
+ after.sentence 'output.state :=
+ }
+ if$
+}
+
+FUNCTION {output.bibitem}
+{ newline$
+ "\bibitem[" write$
+ label write$
+ "]{" write$
+ cite$ write$
+ "}" write$
+ newline$
+ ""
+ before.all 'output.state :=
+}
+
+FUNCTION {fin.entry}
+{ add.period$
+ write$
+ newline$
+}
+
+FUNCTION {new.block}
+{ output.state before.all =
+ 'skip$
+ { after.block 'output.state := }
+ if$
+}
+
+FUNCTION {new.sentence}
+{ output.state after.block =
+ 'skip$
+ { output.state before.all =
+ 'skip$
+ { after.sentence 'output.state := }
+ if$
+ }
+ if$
+}
+
+FUNCTION {not}
+{ { #0 }
+ { #1 }
+ if$
+}
+
+FUNCTION {and}
+{ 'skip$
+ { pop$ #0 }
+ if$
+}
+
+FUNCTION {or}
+{ { pop$ #1 }
+ 'skip$
+ if$
+}
+
+FUNCTION {new.block.checkb}
+{ empty$
+ swap$ empty$
+ and
+ 'skip$
+ 'new.block
+ if$
+}
+
+FUNCTION {field.or.null}
+{ duplicate$ empty$
+ { pop$ "" }
+ 'skip$
+ if$
+}
+
+FUNCTION {boldface}
+{ duplicate$ empty$
+ { pop$ "" }
+ { "{\bf " swap$ * "}" * }
+ if$
+}
+
+FUNCTION {emphasize}
+{ duplicate$ empty$
+ { pop$ "" }
+ { "{\em " swap$ * "}" * }
+ if$
+}
+
+INTEGERS { nameptr namesleft numnames }
+
+FUNCTION {format.names}
+{ 's :=
+ #1 'nameptr :=
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ { s nameptr "{vv~}{ll}{, jj}{, ff}" format.name$ 't :=
+ nameptr #1 >
+ { namesleft #1 >
+ { ", " * t * }
+ { t "others" =
+ { ", {\em et~al.}" * }
+ { ", \& " * t * } % Butcher, pages
+ if$ % 186-189.
+ }
+ if$
+ }
+ 't
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+}
+
+FUNCTION {format.authors}
+{ author empty$
+ { "" } % Small capitals
+ { "{\sc " * author format.names "}" * } % for
+ if$ % authordate3.bst
+} % and
+ % authordate4.bst.
+FUNCTION {format.key}
+{ empty$
+ { "{\sc " * key field.or.null "}" * } % Small capitals.
+ { "" }
+ if$
+}
+
+FUNCTION {format.editors}
+{ editor empty$
+ { "" } % Small capitals.
+ { "{\sc " * editor format.names "}" *
+ editor num.names$ #1 > % Use ODWE abbrevs.
+ { " (eds)" * } % to avoid
+ { " (ed)" * } % ambiguity between
+ if$ % "editor" and
+ } % "edition".
+ if$
+}
+
+FUNCTION {format.title} % Howells example
+{ title empty$ % in BS 5605 comes
+ { "" } % out wrong because
+ { title "t" change.case$ } % Patashnik
+ if$ % capitalizes
+} % after a colon.
+
+FUNCTION {n.dashify}
+{ 't :=
+ ""
+ { t empty$ not }
+ { t #1 #1 substring$ "-" =
+ { t #1 #2 substring$ "--" = not
+ { "--" *
+ t #2 global.max$ substring$ 't :=
+ }
+ { { t #1 #1 substring$ "-" = }
+ { "-" *
+ t #2 global.max$ substring$ 't :=
+ }
+ while$
+ }
+ if$
+ }
+ { t #1 #1 substring$ *
+ t #2 global.max$ substring$ 't :=
+ }
+ if$
+ }
+ while$
+}
+
+FUNCTION {format.btitle}
+{ title empty$
+ { "" }
+ { title "t" change.case$ emphasize }
+ if$
+}
+
+FUNCTION {tie.or.space.connect}
+{ duplicate$ text.length$ #3 <
+ { "~" }
+ { " " }
+ if$
+ swap$ * *
+}
+
+FUNCTION {either.or.check}
+{ empty$
+ 'pop$
+ { "can't use both " swap$ * " fields in " * cite$ * warning$ }
+ if$
+}
+
+INTEGERS { multiresult }
+
+FUNCTION {multi.page.check}
+{ 't :=
+ #0 'multiresult :=
+ { multiresult not
+ t empty$ not
+ and
+ }
+ { t #1 #1 substring$
+ duplicate$ "-" =
+ swap$ duplicate$ "," =
+ swap$ "+" =
+ or or
+ { #1 'multiresult := }
+ { t #2 global.max$ substring$ 't := }
+ if$
+ }
+ while$
+ multiresult
+}
+
+FUNCTION {format.numberinseries}
+{ number empty$
+ { "" }
+ { number multi.page.check
+ { ", nos. " number n.dashify tie.or.space.connect }
+ { ", no. " number tie.or.space.connect }
+ if$
+ }
+ if$
+}
+
+FUNCTION {booklike.series.volume.number} % Chicago, pages
+{ series empty$ % 450-451.
+ { volume empty$
+ { " " }
+ { " Vol. " volume * }
+ if$
+ }
+ {
+ volume empty$
+ { number empty$
+ { series }
+ { series format.numberinseries * }
+ if$
+ }
+ { number empty$
+ { series ", vol. " volume * * }
+ { series ", vol. " * volume * format.numberinseries * }
+ if$
+ }
+ if$
+ }
+ if$
+}
+
+FUNCTION {incollectionlike.series.volume.number}
+{ series empty$
+ { volume empty$
+ { " " }
+ { " vol. " volume * }
+ if$
+ }
+ { new.block
+ volume empty$
+ { number empty$
+ { series }
+ { series format.numberinseries * }
+ if$
+ }
+ { number empty$
+ { series ", vol. " volume * * }
+ { series ", vol. " * volume * format.numberinseries * }
+ if$
+ }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.edition}
+{ edition empty$
+ { "" }
+ { output.state mid.sentence =
+ { edition "l" change.case$ " edn." * }
+ { edition "t" change.case$ " edn." * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.pages}
+{ pages empty$
+ { "" }
+ { pages multi.page.check
+ { "" pages n.dashify tie.or.space.connect }
+ { "" pages tie.or.space.connect }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.pagesinbook} % By the time the
+{ pages empty$ % reader has read
+ { "" } % address, pub'r,
+ { pages multi.page.check % note (where the
+ { "Pages " pages n.dashify tie.or.space.connect } % note may end with
+ { "Page " pages tie.or.space.connect } % numbers), s/he
+ if$ % may not recognise
+ } % a number-range as
+ if$ % meaning pages.
+} % Avoid ambiguity
+ % (Butcher, p.181).
+
+FUNCTION {format.vol.num.date.pages}
+{ volume empty$
+ { month empty$
+ { "" }
+ { month }
+ if$
+ }
+ { volume boldface field.or.null
+ number empty$
+ { month empty$
+ 'skip$
+ { "(" month * ")" * * }
+ if$
+ }
+ { "(" number * ")" * *
+ volume empty$
+ { "there's a number but no volume in " cite$ * warning$ }
+ 'skip$
+ if$
+ }
+ if$
+ }
+ if$
+ pages empty$
+ 'skip$
+ { duplicate$ empty$
+ { pop$ format.pages }
+ { ", " * pages n.dashify * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.chapter.pages.inbook}
+{ chapter empty$
+ 'format.pagesinbook
+ { type empty$
+ { "Chap." }
+ { type }
+ if$
+ chapter tie.or.space.connect
+ pages empty$
+ 'skip$
+ { ", " * format.pagesinbook "l" change.case$ * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.chapter.pages.incoll}
+{ chapter empty$
+ { pages empty$
+ { "{\em In:} " }
+ { "{\em " format.pagesinbook " of:} " * * }
+ if$
+ }
+ { type empty$
+ { "{\em Chap. " chapter * }
+ { "{\em " type * " " * chapter * }
+ if$
+ pages empty$
+ { " of:} " * }
+ { ", " * format.pagesinbook "l" change.case$ " of:} " * * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.in.ed.booktitle} % Achieves effect
+{ booktitle empty$ % shown in 16.51
+ { "" } % of Chicago, at
+ { editor empty$ % expense of not
+ { format.chapter.pages.incoll % achieving effects
+ booktitle "t" change.case$ emphasize * } % shown in 16.50
+ { format.chapter.pages.incoll % of Chicago, on
+ format.editors * ", " * % page 189 of
+ booktitle "t" change.case$ emphasize * } % Butcher and in
+ if$ % 4.4 of BS 1629.
+ }
+ if$
+}
+
+FUNCTION {format.thesis.type}
+{ type empty$
+ 'skip$
+ { pop$
+ type "t" change.case$
+ }
+ if$
+}
+
+FUNCTION {format.tr.number}
+{ type empty$
+ { "Tech. rept." } % ODWE abbrevs.
+ 'type
+ if$
+ number empty$
+ { "t" change.case$ }
+ { number tie.or.space.connect }
+ if$
+}
+
+FUNCTION {format.addr.pub}
+{ publisher empty$
+ { "" }
+ { address empty$
+ { "" }
+ { address ": " * }
+ if$
+ publisher *
+ }
+ if$
+}
+
+FUNCTION {format.addr.pub.org} % If there's an
+{ address empty$ % an organization
+ { publisher * ", for " * organization * } % and a publisher
+ { address ": " * publisher * ", for " * organization * } % too.
+ if$
+}
+
+FUNCTION {format.addr.inst}
+{ address empty$
+ { institution empty$
+ { "" }
+ { institution }
+ if$
+ }
+ { institution empty$
+ { "" }
+ { institution ", " * }
+ if$
+ address *
+ }
+ if$
+}
+
+FUNCTION {format.addr.org}
+{ address empty$
+ { organization empty$
+ { "" }
+ { organization }
+ if$
+ }
+ { organization empty$
+ { "" }
+ { organization ", " * }
+ if$
+ address *
+ }
+ if$
+}
+
+FUNCTION {format.article.crossref}
+{ "{\em In:}"
+ " \cite{" * crossref * "}" *
+}
+
+FUNCTION {format.book.crossref}
+{ volume empty$
+ { "empty volume in " cite$ * "'s crossref of " * crossref * warning$
+ "{\em In:}"
+ }
+ { " Vol." volume tie.or.space.connect
+ " of " *
+ }
+ if$
+ "\cite{" * crossref * "}" *
+}
+
+FUNCTION {format.incoll.inproc.crossref}
+{ "{\em In:}"
+ " \cite{" * crossref * "}" *
+}
+
+FUNCTION {article}
+{ output.bibitem
+ format.authors "author" output.check
+ author format.key output
+ output.year.check
+ new.block
+ format.title "title" output.check
+ new.block
+ crossref missing$
+ { journal "t" change.case$ emphasize
+ "journal" output.check
+ format.vol.num.date.pages output
+ }
+ { format.article.crossref output.nonnull
+ format.pages output
+ }
+ if$
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {book}
+{ output.bibitem
+ author empty$
+ { format.editors "author and editor" output.check
+ editor format.key output
+ }
+ { format.authors output.nonnull
+ crossref missing$
+ { "author and editor" editor either.or.check }
+ 'skip$
+ if$
+ }
+ if$
+ output.year.check
+ new.block
+ format.btitle "title" output.check
+ crossref missing$
+ { new.sentence
+ format.edition output
+ new.block
+ booklike.series.volume.number output
+ new.block
+ format.addr.pub "publisher" output.check
+ }
+ { new.block
+ format.book.crossref output.nonnull
+ }
+ if$
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {booklet}
+{ output.bibitem
+ format.authors output
+ author format.key output
+ output.year.month.check
+ new.block
+ format.btitle "title" output.check
+ new.block
+ howpublished output
+ address output
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {inbook}
+{ output.bibitem
+ author empty$
+ { format.editors "author and editor" output.check
+ editor format.key output
+ }
+ { format.authors output.nonnull
+ crossref missing$
+ { "author and editor" editor either.or.check }
+ 'skip$
+ if$
+ }
+ if$
+ output.year.check
+ new.block
+ format.btitle "title" output.check
+ crossref missing$
+ { new.sentence
+ format.edition output
+ new.block
+ booklike.series.volume.number output
+ new.block
+ format.addr.pub "publisher" output.check
+ }
+ { new.block
+ format.book.crossref output.nonnull
+ }
+ if$
+ new.block
+ note output
+ new.block % BS 1629 (rather
+ format.chapter.pages.inbook "chapter and pages" output.check
+ fin.entry % than Chicago,
+} % p. 451)
+
+FUNCTION {incollection}
+{ output.bibitem
+ author empty$
+ { format.editors "editor" output.check
+ editor format.key output }
+ { format.authors "author" output.check
+ author format.key output }
+ if$
+ output.year.check
+ new.block
+ format.title "title" output.check
+ new.block
+ crossref missing$ % Chapter and/or
+ { format.in.ed.booktitle output % page numbers can
+ format.edition output % come out via this
+ incollectionlike.series.volume.number output % route, too.
+ new.block
+ format.addr.pub "publisher" output.check
+ }
+ { format.incoll.inproc.crossref output.nonnull
+ new.block
+ }
+ if$
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {inproceedings}
+{ output.bibitem
+ format.authors "author" output.check
+ author format.key output
+ publisher empty$
+ { output.year.month.check }
+ { output.year.check }
+ if$
+ new.block
+ format.title "title" output.check
+ new.block
+ crossref missing$
+ { format.in.ed.booktitle "booktitle" output.check
+ incollectionlike.series.volume.number output
+ new.block
+ publisher empty$
+ {
+ organization empty$
+ 'skip$
+ { format.addr.org output }
+ if$
+ }
+ {
+ organization empty$
+ { format.addr.pub output }
+ { format.addr.pub.org output }
+ if$
+ }
+ if$
+ }
+ { format.incoll.inproc.crossref output.nonnull
+ }
+ if$
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {conference} { inproceedings }
+
+FUNCTION {manual}
+{ output.bibitem
+ format.authors output
+ author format.key output
+ output.year.month.check
+ new.block
+ format.btitle "title" output.check
+ new.sentence
+ format.edition output
+ new.block
+ organization address new.block.checkb
+ format.addr.org output
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {mastersthesis}
+{ output.bibitem
+ format.authors "author" output.check
+ author format.key output
+ output.year.month.check
+ new.block
+ format.btitle "title" output.check
+ new.block
+ "M.Phil. thesis" format.thesis.type output.nonnull % ODWE abbrev.
+ school "school" output.check
+ address output
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {misc}
+{ output.bibitem
+ format.authors output
+ author format.key output
+ output.year.month.check
+ new.block
+ format.btitle output
+ new.block
+ howpublished output
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {phdthesis}
+{ output.bibitem
+ format.authors "author" output.check
+ author format.key output
+ output.year.month.check
+ new.block
+ format.btitle "title" output.check
+ new.block
+ "Ph.D. thesis" format.thesis.type output.nonnull % Butcher,
+ school "school" output.check % page 174.
+ address output
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {proceedings}
+{ output.bibitem
+ format.editors "author and editor" output.check
+ editor format.key output
+ publisher empty$
+ { output.year.month.check }
+ { output.year.check }
+ if$
+ new.block
+ format.btitle "title" output.check
+ new.block
+ booklike.series.volume.number output
+ new.block
+ publisher empty$
+ {
+ organization empty$
+ 'skip$
+ { format.addr.org output }
+ if$
+ }
+ {
+ organization empty$
+ { format.addr.pub output }
+ { format.addr.pub.org output }
+ if$
+ }
+ if$
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {techreport}
+{ output.bibitem
+ format.authors "author" output.check
+ author format.key output
+ output.year.month.check
+ new.block
+ format.btitle "title" output.check
+ new.block
+ format.tr.number output.nonnull
+ new.sentence
+ format.addr.inst "institution" output.check
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {unpublished}
+{ output.bibitem
+ format.authors "author" output.check
+ author format.key output
+ output.year.month.check
+ new.block
+ format.btitle "title" output.check
+ new.block
+ note "note" output.check
+ fin.entry
+}
+
+FUNCTION {default.type} { misc }
+
+MACRO {jan} {"Jan."} % ODWE, "months", &
+ % Chicago, p. 383.
+MACRO {feb} {"Feb."}
+
+MACRO {mar} {"Mar."}
+
+MACRO {apr} {"Apr."}
+
+MACRO {may} {"May"}
+
+MACRO {jun} {"June"}
+
+MACRO {jul} {"July"}
+
+MACRO {aug} {"Aug."}
+
+MACRO {sep} {"Sept."}
+
+MACRO {oct} {"Oct."}
+
+MACRO {nov} {"Nov."}
+
+MACRO {dec} {"Dec."}
+
+MACRO {acmcs} {"ACM Computing Surveys"}
+
+MACRO {acta} {"Acta Informatica"}
+
+MACRO {cacm} {"Communications of the ACM"}
+
+MACRO {ibmjrd} {"IBM Journal of Research and Development"}
+
+MACRO {ibmsj} {"IBM Systems Journal"}
+
+MACRO {ieeese} {"IEEE Transactions on Software Engineering"}
+
+MACRO {ieeetc} {"IEEE Transactions on Computers"}
+
+MACRO {ieeetcad}
+ {"IEEE Transactions on Computer-Aided Design of Integrated Circuits"}
+
+MACRO {ipl} {"Information Processing Letters"}
+
+MACRO {jacm} {"Journal of the ACM"}
+
+MACRO {jcss} {"Journal of Computer and System Sciences"}
+
+MACRO {scp} {"Science of Computer Programming"}
+
+MACRO {sicomp} {"SIAM Journal on Computing"}
+
+MACRO {tocs} {"ACM Transactions on Computer Systems"}
+
+MACRO {tods} {"ACM Transactions on Database Systems"}
+
+MACRO {tog} {"ACM Transactions on Graphics"}
+
+MACRO {toms} {"ACM Transactions on Mathematical Software"}
+
+MACRO {toois} {"ACM Transactions on Office Information Systems"}
+
+MACRO {toplas} {"ACM Transactions on Programming Languages and Systems"}
+
+MACRO {tcs} {"Theoretical Computer Science"}
+
+READ
+
+FUNCTION {sortify}
+{ purify$
+ "l" change.case$
+}
+
+INTEGERS { len }
+
+FUNCTION {chop.word}
+{ 's :=
+ 'len :=
+ s #1 len substring$ =
+ { s len #1 + global.max$ substring$ }
+ 's
+ if$
+}
+
+FUNCTION {format.lab.names}
+{ 's :=
+ s #1 "{vv~}{ll}" format.name$
+ s num.names$ duplicate$
+ #2 >
+ { pop$ " {\em et~al.}" * }
+ { #2 <
+ 'skip$
+ { s #2 "{ff }{vv }{ll}{ jj}" format.name$ "others" =
+ { " {\em et~al.}" * }
+ { " \& " * s #2 "{vv~}{ll}" format.name$ * }
+ if$
+ }
+ if$
+ }
+ if$
+}
+
+FUNCTION {author.key.label}
+{ author empty$
+ { key empty$
+ { cite$ #1 #3 substring$ }
+ 'key
+ if$
+ }
+ { author format.lab.names }
+ if$
+}
+
+FUNCTION {author.editor.key.label}
+{ author empty$
+ { editor empty$
+ { key empty$
+ { cite$ #1 #3 substring$ }
+ 'key
+ if$
+ }
+ { editor format.lab.names }
+ if$
+ }
+ { author format.lab.names }
+ if$
+}
+
+FUNCTION {editor.key.label}
+{ editor empty$
+ { key empty$
+ { cite$ #1 #3 substring$ }
+ 'key
+ if$
+ }
+ { editor format.lab.names }
+ if$
+}
+
+FUNCTION {calc.label}
+ { type$ "book" =
+ type$ "inbook" =
+ type$ "incollection" = % For sensible
+ or or % treatment of
+ 'author.editor.key.label % Singer in
+ { type$ "proceedings" = % BS 1629.
+ 'editor.key.label
+ 'author.key.label
+ if$
+ }
+ if$
+ duplicate$
+ year empty$
+ {
+ "\protect\citename{" swap$ * ", }" *
+ "n.d." * 'label := % Chicago,
+ } % page 457.
+ {
+ "\protect\citename{" swap$ * ", }" *
+ year
+ *
+ 'label :=
+ }
+ if$
+ year field.or.null purify$ *
+ sortify 'sort.label :=
+}
+
+
+FUNCTION {sort.format.names} % To produce the
+{ 's := % order of entries
+ #1 'nameptr := % specified in item
+ "" % (3) on page 187
+ s num.names$ 'numnames := % of Butcher.
+ numnames 'namesleft :=
+ { namesleft #0 > nameptr #3 < and } % Only 1st 2 names
+ { nameptr #1 > % matter for
+ { " " * } % sorting.
+ 'skip$
+ if$ % Anything that's
+ nameptr #2 = numnames #2 > and % "et al" goes
+ { "zzzzz" * } % after works by 2
+ { % authors.
+ s nameptr "{vv{ } }{ll{ }}{ ff{ }}{ jj{ }}" format.name$ 't :=
+ nameptr numnames = t "others" = and
+ { "zzzzz" * }
+ { t sortify * }
+ if$
+ }
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+}
+
+FUNCTION {sort.format.title}
+{ 't :=
+ "A " #2
+ "An " #3
+ "The " #4 t chop.word
+ chop.word
+ chop.word
+ sortify
+ #1 global.max$ substring$
+}
+
+FUNCTION {author.sort}
+{ author empty$
+ { key empty$
+ { "to sort, need author or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { author sort.format.names }
+ if$
+}
+
+FUNCTION {author.editor.sort}
+{ author empty$
+ { editor empty$
+ { key empty$
+ { "to sort, need author, editor, or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { editor sort.format.names }
+ if$
+ }
+ { author sort.format.names }
+ if$
+}
+
+FUNCTION {editor.sort}
+{ editor empty$
+ { key empty$
+ { "to sort, need editor or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { editor sort.format.names }
+ if$
+}
+
+FUNCTION {presort} % Two sorting
+{ calc.label % passes, from
+ label sortify % apalike.bst.
+ " "
+ *
+ type$ "book" =
+ type$ "inbook" =
+ type$ "incollection" = % For Singer
+ or or % in BS 1629.
+ 'author.editor.sort
+ { type$ "proceedings" =
+ 'editor.sort
+ 'author.sort
+ if$
+ }
+ if$
+ #1 entry.max$ substring$
+ 'sort.label :=
+ sort.label
+ *
+ " "
+ *
+ title field.or.null
+ sort.format.title
+ *
+ #1 entry.max$ substring$
+ 'sort.key$ :=
+}
+
+ITERATE {presort}
+
+SORT
+
+STRINGS { last.label next.extra }
+
+INTEGERS { last.extra.num }
+
+FUNCTION {initialize.extra.label.stuff}
+{ #0 int.to.chr$ 'last.label :=
+ "" 'next.extra :=
+ #0 'last.extra.num :=
+}
+
+FUNCTION {forward.pass}
+{ last.label label =
+ { last.extra.num #1 + 'last.extra.num :=
+ last.extra.num int.to.chr$ 'extra.label :=
+ }
+ { "a" chr.to.int$ 'last.extra.num :=
+ "" 'extra.label :=
+ label 'last.label :=
+ }
+ if$
+}
+
+FUNCTION {reverse.pass}
+{ next.extra "b" =
+ { "a" 'extra.label := }
+ 'skip$
+ if$ % Code needed here
+ % if \citeauthor
+ % and \citeyear
+ label extra.label * 'label := % were supported.
+ extra.label 'next.extra :=
+}
+
+EXECUTE {initialize.extra.label.stuff}
+
+ITERATE {forward.pass}
+
+REVERSE {reverse.pass}
+
+FUNCTION {bib.sort.order}
+{ sort.label
+ " "
+ *
+ year field.or.null sortify
+ *
+ " "
+ *
+ title field.or.null
+ sort.format.title
+ *
+ #1 entry.max$ substring$
+ 'sort.key$ :=
+}
+
+ITERATE {bib.sort.order}
+
+SORT
+
+FUNCTION {begin.bib}
+{ preamble$ empty$
+ 'skip$
+ { preamble$ write$ newline$ }
+ if$
+ "\begin{thebibliography}{}" write$ newline$
+}
+
+EXECUTE {begin.bib}
+
+EXECUTE {init.state.consts}
+
+ITERATE {call.type$}
+
+FUNCTION {end.bib}
+{ newline$
+ "\end{thebibliography}" write$ newline$
+}
+
+EXECUTE {end.bib}
diff --git a/biblio/bibtex/contrib/authordate/authordate4.ltx b/biblio/bibtex/contrib/authordate/authordate4.ltx
new file mode 100644
index 0000000000..56d4696cdf
--- /dev/null
+++ b/biblio/bibtex/contrib/authordate/authordate4.ltx
@@ -0,0 +1,18 @@
+% -*-latex-*-
+% Document name: /usr/local/lib/tex/bibtex/authordate4.ltx
+% Creator: David Rhead [David_Rhead@vme.nott.ac.uk]
+% Creation Date: Sun 28 Jun 92 19:10:19 BST
+
+\documentstyle[authordate1-4]{report}
+
+\raggedright
+
+\begin{document}
+
+\input{testadb.ltx}
+
+\bibliographystyle{authordate4}
+
+\bibliography{test}
+
+\end{document}
diff --git a/biblio/bibtex/contrib/authordate/testadb.ltx b/biblio/bibtex/contrib/authordate/testadb.ltx
new file mode 100644
index 0000000000..f5cf41fe01
--- /dev/null
+++ b/biblio/bibtex/contrib/authordate/testadb.ltx
@@ -0,0 +1,183 @@
+\chapter{Introduction}
+
+This document shows the effect of referring to some of the examples given
+by \cite{bs-1629}, \cite{bs-5605}, \cite{bs-6371}, \cite{butcher-81} and
+\cite{chicago-82}.
+
+\chapter{Examples given in BS 5605}
+
+\section{Citations from section 4}
+
+% Standard LaTeX provides \cite but not \shortcite.
+%
+Johnson \shortcite{johnson-74} describes \dots\\
+In a recent study \cite{johnson-74}, it is described as \dots\\
+%
+Howells \shortcite{howells-66-pop} discussed the subject briefly \dots\\
+%
+In a further article \cite{howells-66-var}, greater attention was
+given \dots\\
+%
+% BS 5605 uses &, whereas Chicago (page 402) would use "and" here.
+% Butcher (page 186) accepts either.
+Johnson and Howells \shortcite{johnson-howells} take a different view \dots\\
+%
+This work \cite{johnson-etc} quotes \dots\\
+%
+Elsewhere \cite{anon-67} it is shown \dots\\
+%
+Howells \shortcite[p.\ 29]{howells-66-var} describes \dots\\
+
+\section{Another reference from section 5}
+
+In \cite{howells-51} \dots\\
+
+\section{References from section 6}
+
+\dots\ \cite{fletcher-hopkins} \dots\\
+%
+\dots\ \cite{wright-63} \dots\\
+%
+\dots\ \cite{feigl-58} \dots\\
+
+\chapter{Examples given in BS 1629}
+
+\dots\ \cite{hoel-71-whole} \dots\\
+%
+\dots\ \cite{hoel-71-portion} \dots\\
+%
+\dots\ \cite{singer-whole} \dots\\
+%
+\dots\ \cite{singer-portion-chapter} \dots\\
+%
+\dots\ \cite{singer-portion-volume} \dots\\
+%
+% BS 5605 says that "if a contribution is separately paginated ... the part
+% number should be inserted in parentheses". BibTeX cannot tell whether
+% a contribution is separately paginated but, if the number field is present
+% in the bib file, will produce a reference in the required form.
+\dots\ \cite{godfrey-59} \dots\\
+%
+\dots\ \cite{ramsbottom-31} \dots\\
+%
+\dots\ \cite{bs-2570-manual} \dots\\
+%
+\dots\ \cite{bs-2570-techreport} \dots\\
+%
+\dots\ \cite{bs-2570-inbook} \dots\\
+%
+\dots\ \cite{ellis-walton} \dots\\
+%
+\dots\ \cite{hanlon-72} \dots\\
+%
+\dots\ \cite{winget-67} \dots\\
+%
+\dots\ \cite{bry-afflerbach} \dots\\
+%
+\dots\ \cite{ranganathan-51} \dots\\
+%
+\dots\ \cite{mccolvin-nodate} \dots\\
+
+\chapter{Examples given in BS 6371}
+
+\dots\ measures which the lords were urging on the king
+\cite[fol. 22]{exchequer-34-39}. Henry seems to have been ineffectual
+according to Traquair \shortcite{traquair-38}. With the appointment of a
+new receiver of rents \cite[fol. 2]{exchequer-34-39}, \dots\\
+
+\dots\ \cite{pym-24} \dots\\
+%
+\dots\ \cite{croft-78} \dots\\
+
+\chapter{Examples given by Butcher}
+
+\dots\ the synthesis of amino acids \cite[pp.\ 131--8]{darcy-20-amaz}
+amazed \dots\\
+%
+\dots\ the synthesis of amino acids by D'Arcy
+\shortcite[pp.\ 131--8]{darcy-20-amaz} amazed \dots\\
+%
+\dots\ if more than one is included in one text reference,
+one says \shortcite{darcy-20-amaz,darcy-20-again}.\\
+%
+\dots\ \cite{jones-n-h-r} \dots\\
+%
+\dots\ \cite{jones-s-r} \dots\\
+%
+\dots\ \cite{jones-65} \dots\\
+%
+\dots\ \cite{jones-69} \dots\\
+%
+\dots\ \cite{jones-abrams} \dots\\
+%
+\dots\ \cite{jones-a-s} \dots\\
+%
+\dots\ \cite{jones-smith} \dots\\
+%
+\dots\ \cite{bloggs-60} \dots\\
+%
+\dots\ \cite{bloggs-61} \dots\\
+%
+\dots\ \cite{bloggs-jones} \dots\\
+%
+\dots\ \cite{bloggs-s-j} \dots\\
+%
+\dots\ \cite{brown-f-s} \dots\\
+%
+\dots\ \cite{eckstein-zuckerman} \dots\\
+%
+\dots\ \cite{heller-lederis} \dots\\
+%
+\dots\ \cite{wood-61} \dots\\
+
+\chapter{Examples given by Chicago}
+
+\section{Citations from chapter 15}
+
+\dots\ \cite[121--25]{pratt-75} \dots\\
+%
+\dots\ \cite{light-72,light-wong,kingston-76} \dots\\
+%
+\dots\ \cite{kelley-96-spring,kelley-96-autumn,kelley-07} \dots\\
+
+\section{References from chapter 16}
+
+\dots\ \cite{brunswick-85} \dots\\
+%
+\dots\ \cite{wright-78-book} \dots\\
+%
+\dots\ \cite{wright-78-incollection} \dots\\
+%
+\dots\ \cite{kendeigh-52} \dots\\
+%
+\dots\ \cite{chapman-75} \dots\\
+%
+\dots\ \cite{hershkovitz-62} \dots\\
+%
+\dots\ \cite{ogilvy-65} \dots\\
+%
+\dots\ \cite{mcneill-63} \dots\\
+%
+\dots\ \cite{thomson-71} \dots\\
+%
+\dots\ \cite{gordon-75} \dots\\
+%
+\dots\ \cite{milton-24} \dots\\
+%
+\dots\ \cite{chomsky-73} \dots\\
+%
+\dots\ \cite{chave-64} \dots\\
+%
+\dots\ \cite{smart-76} \dots\\
+%
+\dots\ \cite{jackson-79} \dots\\
+%
+\dots\ \cite{prufer-64} \dots\\
+%
+\dots\ \cite{mann-68} \dots\\
+%
+\dots\ \cite{maguire-76} \dots\\
+%
+\dots\ \cite{downes-74} \dots\\
+%
+\dots\ \cite{hunt-76} \dots\\
diff --git a/biblio/bibtex/contrib/babelbib/ChangeLog b/biblio/bibtex/contrib/babelbib/ChangeLog
new file mode 100644
index 0000000000..7495370ef0
--- /dev/null
+++ b/biblio/bibtex/contrib/babelbib/ChangeLog
@@ -0,0 +1,192 @@
+2019/03/11 1.32 Norbert Preining (norbert@preining.info>
+ - Fix Spanish abbreviations for month 5,6,7 (Debian bug: #689450)
+
+2012/01/03 1.31 Harald Harders (harald.harders@gmx.de)
+ - Added Serbian, Czech, and Romanian language
+ - Corrections in Portuguese, Croatian, Swedish
+ - Change handling of editions to allow keyword `edition' before the edition number
+ - Added Romanian and Swedish numerals
+ - Fix definition of \btxnumerallong in Spanish
+
+2010/01/06 1.30 Harald Harders (h.harders@tu-bs.de)
+ - Added Croatian language
+
+2009/10/10 1.29 Harald Harders (h.harders@tu-bs.de)
+ - Fix output of "urldate"
+
+2009/06/23 1.28 Harald Harders (h.harders@tu-bs.de)
+ - Corrected Diciembre in Spanish language
+ - Automatic formatting of month year combinations
+ (either "June 2009" or "06/2009")
+
+2009/06/19 1.27 Harald Harders (h.harders@tu-bs.de)
+ - Capitalised month names in Poruguese but not in Brazilian
+ - Fixed publisherfont in babamspl.bst
+ - Added Russian language
+
+2009/06/17 1.26 Harald Harders (h.harders@tu-bs.de)
+ - Correct journal article title font in babamspl.bst
+ - Linebreak added between url and urldate
+ - Added Galician and Bahasa languages
+ - Added French and Portuguese numerals
+ - Corrected Spanish numerals
+ - Removed comma before `and' in long lists of authors in Portuguese
+ and Swedish
+
+2008/09/24 1.25 Harald Harders (h.harders@tu-bs.de)
+ - Add font command for publisher
+ - Remove change of language in alpha-numerical bib items because
+ of occasional exceeded TeX memory
+
+2008/02/17 1.24 Harald Harders (h.harders@tu-bs.de)
+ - Put \btxISSN and \btxISBN into an \mbox to prevent them from being
+ hyphenated
+
+2006/08/18 1.23 Harald Harders (h.harders@tu-bs.de)
+ - Fix bug in typesetting title of articles for babamspl.bst
+
+2006/01/02 1.22 Harald Harders (h.harders@tu-bs.de)
+ - Remove space after \btxurlfont again (has been lost sometimes)
+ because a linebreak between \url and the argument breaks
+ hyperref.sty.
+
+2005/11/20 1.21 Harald Harders (h.harders@tu-bs.de)
+ - Fix problem when the first bibliography entry is in an unknown
+ language.
+
+2005/11/13 1.20 Harald Harders (h.harders@tu-bs.de)
+ - Add Greek language.
+ - Change method to write urldate to enable to write it in brackets.
+ - Bugfix in names writing of abbreviated styles.
+ - Ensure to write URL's in latin font.
+ - Numerals for French and Spanish.
+ - Add the fields ANNOTE and ANNOTELANGUAGE to all bibTeX styles and
+ introduce the command \btxannotation which prints the annotations
+ on request.
+ - Add the package options isbn, noisbn, issn, noissn, varlanguage,
+ nolanguagenames, annote, and noannote.
+ - Add new font jtitle for titles of journal articles.
+ - Fix a bug with additional spaces after names.
+
+2005/11/05 1.17 Harald Harders (h.harders@tu-bs.de)
+ - Change the language in alpha-numerical bib items.
+ - Handle numerical edition numbers.
+
+2005/10/31 1.16 Harald Harders (h.harders@tu-bs.de)
+ - Allow to alter space between two abbreviated forenames.
+
+2005/09/01 1.15 Harald Harders (h.harders@tu-bs.de)
+ - Add \biblanguage that switches to the keyword language within a
+ field.
+ - Small bug fix in loading language files (Angel Tsankov).
+
+2005/07/11 1.14 Robert Fuster (rfuster@mat.upv.es)
+ - Complete and correct catalan.
+
+2005/06/27 1.13 Philip Ratcliffe (philip.ratcliffe@email.it)
+ - Apply corrections to and complete Italian language.
+
+2005/06/19 1.12 Harald Harders (h.harders@tu-bs.de)
+ - Add new font \btxlastname for last names.
+ - Add extra formatting of lastnames to BibTeX styles.
+ - Add the command \setbtxfallbacklanguage to force a fall-back
+ language.
+
+2005/06/19 1.12 Daniel Winkelmann (daniel.winkelmann@club-internet.fr)
+ - Correct \btxlanguagenameenglish, \btxmastthesis, and \btxmonaugshort
+ in french.bdf.
+
+2005/06/12 1.11 Harald Harders (h.harders@tu-bs.de)
+ - Avoid some additional line breaks in author and editor names.
+ - Switch ISBN and ISSN in bibliographies on and off
+ (does not work for AmS style).
+ - Remove space after \btxurlfont because a linebreak between \url and
+ the argument breaks hyperref.sty (which is a pity because this can
+ lead to line-break problems with long arguments).
+
+2005/05/24 1.10 Harald Harders (h.harders@tu-bs.de)
+ - Allow different ordering of forenames and lastnames.
+ - Protect the \foreignlanguage calls (avoids problems with natbib).
+ - Bug in Portuguese removed.
+
+2005/04/15 1.02 Harald Harders (h.harders@tu-bs.de)
+ - Language Portuguese completed.
+
+2005/04/11 1.01 Harald Harders (h.harders@tu-bs.de)
+ - Added space after the \btx... commands in the bst files to avoid
+ line-breaking problem.
+
+2005/02/16 1.00 Harald Harders (h.harders@tu-bs.de)
+ - Move ChangeLog from README to ChangeLog.
+ - Shorten version string.
+ - Renamed franceis to francais.
+ - Handle package frenchpro.
+ - Remove warning for old babel package with french language.
+ - Rewritten warning about frenchle.sty package.
+ - Remove emphasize and smallcaps from BibTeX styles.
+ - Added urldate to all BibTeX styles.
+
+2004/06/28 0.46 Harald Harders (h.harders@tu-bs.de)
+ - Enable to switch off printout of language name with babamspl style.
+
+2004/04/21 0.45 Harald Harders (h.harders@tu-bs.de)
+ - Added Esperanto and Finnish.
+
+2004/02/12 0.44a Harald Harders (h.harders@tu-bs.de)
+ - Adapted Makefile for TeXLive.
+
+2004/01/06 0.44 Harald Harders (h.harders@tu-bs.de)
+ - Improved spacings in documentation.
+
+2004/01/06 0.43 Harald Harders (h.harders@tu-bs.de)
+ - Document the problem using frenchle.sty when using
+ french language with some babel versions.
+ - Warn if using french language.
+ - Fix a bug in detection of the used languages that
+ did not work with some versions of babel.
+
+2003/11/09 0.42 Harald Harders (h.harders@tu-bs.de)
+ - Use unique version strings for all files of the bundle.
+ - Reorganise documentation.
+
+2003/11/02 0.41 Harald Harders (h.harders@tu-bs.de)
+ - Added Norwegian and corrected Swedish.
+
+2003/09/26 0.40 Harald Harders (h.harders@tu-bs.de)
+ - babalpha.bst: Use long strings for Technical Reports.
+ - Move the definition of the bst files into the dtx file.
+ - If no language field is given for an item, fall back to the
+ document's main language instead of an undefined behaviour.
+ - If no \url command is defined, produce an error message
+ when using the url field.
+
+2003/07/28 0.34 Harald Harders (h.harders@tu-bs.de)
+ - Added Afrikaans.
+
+2003/05/07 0.33 Harald Harders (h.harders@tu-bs.de)
+ - Added Portuguese, Swedish, Spanish, and Danish.
+
+2003/05/06 0.32 Harald Harders (h.harders@tu-bs.de)
+ - Added French.
+
+2003/05/06 0.32 Harald Harders (h.harders@tu-bs.de)
+ - Move decision about change of case from bst files to the style file.
+ - Add new font for journal names.
+
+2003/05/01 0.31 Harald Harders (h.harders@tu-bs.de)
+ - Added some language names for Italian.
+
+2003/04/21 0.3 Harald Harders (h.harders@tu-bs.de)
+ - Improved \setbiblanguage command.
+ - Added \setbtxcommands to add and change keywords.
+
+2003/04/20 0.2 Harald Harders (h.harders@tu-bs.de)
+ - Added option `languagenames'.
+ - Removed Italian from list of automatically loaded
+ languages, since it is not complete.
+ - Added language names to the current language definitions.
+ - Changed the font changing scheme to use the command
+ \setbibliographyfont instead of \renewcommand.
+
+2003/04/11 0.1 Harald Harders (h.harders@tu-bs.de)
+ - Total new version.
diff --git a/biblio/bibtex/contrib/babelbib/Makefile b/biblio/bibtex/contrib/babelbib/Makefile
new file mode 100644
index 0000000000..0e81fa0c85
--- /dev/null
+++ b/biblio/bibtex/contrib/babelbib/Makefile
@@ -0,0 +1,101 @@
+
+SRCDIR=babelbib
+INSTALLDIR=`kpsewhich --expand-path='$$TEXMFLOCAL'`/tex/latex/babelbib
+DOCDIR=`kpsewhich --expand-path='$$TEXMFLOCAL'`/doc/latex/babelbib
+BSTDIR=`kpsewhich --expand-path='$$TEXMFLOCAL'`/bibtex/bst/babelbib
+VERSION=`latex getversion | grep '^VERSION' | sed 's/^VERSION \\(.*\\)\\.\\(.*\\)/\\1_\\2/'`
+
+
+.SUFFIXES: .sty .ins .dtx .ps .pdf
+
+.ins.sty:
+ latex $<
+
+.dtx.pdf:
+ pdflatex $<
+ pdflatex $<
+ makeindex -s gind.ist $(*D)/$(*F)
+ makeindex -s gglo.ist -o $(*D)/$(*F).gls $(*D)/$(*F).glo
+ pdflatex $<
+
+all: babelbib babelbib.pdf babelbibtest.pdf tugboat-babelbib.pdf
+
+babelbibtest.pdf: babelbibtest.tex babelbibtest.bib babelbib.sty
+ pdflatex babelbibtest
+ bibtex babelbibtest
+ pdflatex babelbibtest
+ pdflatex babelbibtest
+
+babelbib: babelbib.sty
+
+tugboat-babelbib.pdf:
+ if `test -f "tugboat-babelbib.tex"`; then \
+ pdflatex tugboat-babelbib; \
+ bibtex tugboat-babelbib; \
+ pdflatex tugboat-babelbib; \
+ pdflatex tugboat-babelbib; \
+ fi
+
+
+clean:
+ @-rm -f *.glo *.gls *.idx *.ilg *.ind *.toc *.log *.aux *.blg *.bbl
+ @-rm -f *~
+
+distclean: clean
+ @-rm -f babelbib.sty babelbib.pdf babelbib.ps
+ @-rm -f babelbibtest.pdf babelbibtest.ps
+ @-rm -f *.bdf bab*.bst
+ @-rm -f tugboat-babelbib.pdf tugboat-babelbib.bib
+ @-rm -rf texmf/
+
+tar: all clean
+ @echo Lege babelbib-$(VERSION).tar.gz an
+ -rm -f babelbib-$(VERSION).tar.gz
+ tar czCf .. babelbib-$(VERSION).tar.gz \
+ $(SRCDIR)/README \
+ $(SRCDIR)/ChangeLog \
+ $(SRCDIR)/Makefile \
+ $(SRCDIR)/babelbib.dtx \
+ $(SRCDIR)/babelbib.ins \
+ $(SRCDIR)/babelbib.pdf \
+ $(SRCDIR)/babelbibtest.tex \
+ $(SRCDIR)/babelbibtest.bib \
+ $(SRCDIR)/getversion.tex \
+ $(SRCDIR)/tugboat-babelbib.pdf
+ rm -f getversion.log
+
+
+zip: texlive
+ -@rm -f babelbib-$(VERSION).zip
+ zip -r babelbib-$(VERSION).zip texmf
+ rm -rf texmf
+ rm -f getversion.log
+
+
+texlive: all tugboat-babelbib.pdf clean
+ rm -rf texmf
+ mkdir -p texmf/tex/latex/babelbib/
+ mkdir -p texmf/doc/latex/babelbib/
+ mkdir -p texmf/source/latex/babelbib/
+ mkdir -p texmf/bibtex/bst/babelbib/
+ cp *.sty *.bdf texmf/tex/latex/babelbib/
+ cp babelbib.pdf README ChangeLog babelbibtest.tex texmf/doc/latex/babelbib/
+ cp babelbibtest.bib tugboat-babelbib.pdf texmf/doc/latex/babelbib/
+ cp babelbib.dtx babelbib.ins texmf/source/latex/babelbib/
+ cp Makefile getversion.tex texmf/source/latex/babelbib/
+ cp *.bst texmf/bibtex/bst/babelbib/
+
+
+install: all
+ if [ ! -d $(INSTALLDIR) ]; then mkdir -p $(INSTALLDIR); fi
+ if [ ! -d $(DOCDIR) ]; then mkdir -p $(DOCDIR); fi
+ if [ ! -d $(BSTDIR) ]; then mkdir -p $(BSTDIR); fi
+ install -m644 babelbib.sty $(INSTALLDIR)
+ install -m644 *.bdf $(INSTALLDIR)
+ install -m644 *.bst $(BSTDIR)
+ install -m644 babelbib.pdf $(DOCDIR)
+ texhash
+
+
+babelbib.sty: babelbib.ins babelbib.dtx
+
diff --git a/biblio/bibtex/contrib/babelbib/README b/biblio/bibtex/contrib/babelbib/README
new file mode 100644
index 0000000000..0d58543872
--- /dev/null
+++ b/biblio/bibtex/contrib/babelbib/README
@@ -0,0 +1,57 @@
+Multilingual bibliographies: The babelbib package
+=================================================
+
+
+This package enables to generate multilingual bibliographies in
+cooperation with babel. Two approaches are possible: Each citation
+may be written in another language, or the whole bibliography can
+be typeset in a language chosen by the user. The current version
+supports Afrikaans, Bahasa, Catalan, Croatian, Danish, Dutch, English,
+Esperanto, Finnish, French, Galician, German, Greek, Italian, Norwegian,
+Portuguese, Romanian, Russian, Serbian, Spanish, and Swedish.
+ In addition, the package supports commands to change the typography
+of the bibliographies.
+ Many of the standard and extended bibliography styles are available.
+
+Please help me to add more languages to babelbib.
+
+The file tugboat-babelbib.pdf is a draft of an article that has been
+published in TUGboat. It contains a detailed documentation of the babelbib
+package and how to extend it. The source code for this file is not included.
+This article is about version 0.40 of this package but is up-to-date in most
+parts.
+
+Copyright 2003--2019 Harald Harders
+
+This program can be redistributed and/or modified under the terms
+of the LaTeX Project Public License Distributed from CTAN
+archives in directory macros/latex/base/lppl.txt; either
+version 1 of the License, or any later version.
+
+
+
+Installation:
+
+automatic: - run make
+ - run make install
+ or
+ - run make
+ - copy *.sty, *.bst, and *.bdf to the correct places in the
+ texmf tree
+ - run texhash or the corresponding command of your distribution
+
+by hand: - execute latex on babelbib.ins
+ - execute latex on babelbib.dtx (2x)
+ - copy *.sty, *.bst, and *.bdf to the correct places in the
+ texmf tree
+ - run texhash or the corresponding command of your distribution
+
+
+To do:
+- Add more languages.
+- Test the different BibTeX styles.
+- Add definition of \btxurldatecomment to Esperanto and Afrikaans.
+
+2012-01-03
+Harald Harders
+h.harders@tu-bs.de
diff --git a/biblio/bibtex/contrib/babelbib/babelbib.dtx b/biblio/bibtex/contrib/babelbib/babelbib.dtx
new file mode 100644
index 0000000000..0a609cbbeb
--- /dev/null
+++ b/biblio/bibtex/contrib/babelbib/babelbib.dtx
@@ -0,0 +1,9503 @@
+% \iffalse meta comment
+% File: babelbib.dtx Copyright (C) 2003--2019 Harald Harders
+% \fi
+%
+% \iffalse
+%
+%<*driver>
+\documentclass{ltxdoc}
+\usepackage[T1]{fontenc}
+\usepackage[latin1]{inputenc}
+\usepackage[ngerman,english]{babel}
+%\usepackage{url}
+\usepackage{array}
+\usepackage{amsmath}
+\usepackage{hyperref}
+\IfFileExists{booktabs.sty}%
+ {\usepackage{booktabs}}%
+ {\let\toprule\hline
+ \let\midrule\hline
+ \let\bottomrule\hline}
+\IfFileExists{babelbib.sty}{\usepackage[fixlanguage]{babelbib}
+ \let\babelbibSTYfound\active}{\GenericWarning{babelbib.dtx}{Package
+ file babelbib.sty not found (Documentation will be messed up!^^J^^A
+ Generate babelbib.sty by LaTeXing babelbib.ins, process
+ babelbib.dtx again)^^J}\stop}
+\GetFileInfo{babelbib.sty}
+\title{Multilingual bibliographies: The \texttt{babelbib} package}
+\author{Harald Harders\\\texttt{harald.harders@gmx.de}}
+\date{Version \fileversion, \filedate, printed \today}
+\newlength{\tempdima}%
+\makeatletter
+\renewenvironment{table}[1][]{%
+ \@float{table}[#1]%
+ \centering%
+ \setlength{\tempdima}{\abovecaptionskip}%
+ \setlength{\abovecaptionskip}{\belowcaptionskip}%
+ \setlength{\belowcaptionskip}{\tempdima}%
+ }{%
+\end@float
+}
+\makeatother
+\EnableCrossrefs
+\CodelineIndex
+\DoNotIndex{\def,\edef,\let,\newcommand,\newenvironment,\newcounter}
+\DoNotIndex{\setcounter,\space,\",\@empty,\begin,\end,\iffalse,\fi,\extras}
+\DoNotIndex{\bibs,\ifx,\else,\fi,\ ,\ae,\emph,\input,\foreignlanguage}
+\DoNotIndex{\IeC,\cyrv,\CYRV,\cyrt,\CYRT,\cyrya,\protect}
+\CodelineNumbered
+\RecordChanges
+\CheckSum{14887}
+\hyphenation{bib-lio-gra-phy}
+\begin{document}
+ \DocInput{babelbib.dtx}
+\end{document}
+%</driver>
+% \fi
+%
+% \changes{0.1}{2003/04/11}{Total new version}%
+% \changes{0.2}{2003/04/20}{Rewritten in main parts}%
+% \changes{0.42}{2003/11/09}{Use unique version strings for all files
+% of the bundle}%
+% \changes{0.42}{2003/11/09}{Reorganise docstrip code}%
+% \changes{0.43}{2004/01/06}{Document the problem using
+% \texttt{frenchle.sty} when using \texttt{french} language with
+% some babel versions}%
+% \changes{0.44}{2004/01/06}{Improved spacings in documentation}%
+% \changes{0.44a}{2004/02/12}{Adapted Makefile for \TeX Live}%
+% \changes{0.46}{2004/06/28}{Enable to switch off printout of language
+% name with \texttt{babamspl} style}%
+% \changes{1.00}{2005/02/16}{Rewritten warning about \texttt{frenchle.sty}
+% package}%
+% \changes{1.00}{2005/02/16}{Shorten version string}%
+% \changes{1.00}{2005/02/16}{Added \texttt{urldate} to all \BibTeX\
+% styles}%
+% \changes{1.01}{2005/04/11}{Added space after the \cs{btx}\ldots\
+% commands in the \texttt{bst} files to avoid line-breaking problem}%
+% \changes{1.02}{2005/04/15}{Language Portuguese completed}%
+% \changes{1.10}{2005/05/24}{Allow different ordering of forenames and
+% lastnames}%
+% \changes{1.10}{2005/05/24}{Protect the \cs{foreignlanguage} calls
+% (avoids problems with natbib)}%
+% \changes{1.11}{2005/06/12}{Avoid some additional line breaks in
+% author and editor names}%
+% \changes{1.11}{2005/06/12}{Switch ISBN and ISSN in bibliographies on
+% and off (does not work for \protect\AmS\ style)}%
+% \changes{1.11}{2005/06/12}{Remove space after \cs{btxurlfont}
+% because a linebreak between \cs{url} and the argument breaks
+% \texttt{hyperref.sty} (which is a pity because this can lead to
+% line-break problems with long arguments)}%
+% \changes{1.12}{2005/06/19}{Correct \cs{btxlanguagenameenglish},
+% \cs{btxmastthesis}, and \cs{btxmonaugshort} in
+% \texttt{french.bdf}}%
+% \changes{1.13}{2005/06/27}{Apply corrections to and complete Italian
+% language}%
+% \changes{1.14}{2005/07/11}{Complete and correct catalan}%
+% \changes{1.20}{2005/11/13}{Add Greek language}%
+% \changes{1.20}{2005/11/13}{Change method to write \texttt{urldate}
+% to enable to write it in brackets}%
+% \changes{1.20}{2005/11/13}{Bugfix in names writing of abbreviated
+% styles}%
+% \changes{1.20}{2005/11/13}{Ensure to write URL's in latin font}%
+% \changes{1.20}{2005/11/13}{Numerals for French and Spanish}%
+% \changes{1.20}{2005/11/13}{Add the fields \texttt{ANNOTE} and
+% \texttt{ANNOTELANGUAGE} to all bib\TeX\ styles and introduce the
+% command \cs{btxannotation} which prints the annotations on
+% request.}%
+% \changes{1.20}{2005/11/13}{Add the package options \texttt{isbn},
+% \texttt{noisbn}, \texttt{issn}, \texttt{noissn},
+% \texttt{varlanguage}, \texttt{nolanguagenames}, \texttt{annote}, and
+% \texttt{noannote}}%
+% \changes{1.20}{2005/11/13}{Add new font \texttt{jtitle} for titles
+% of journal articles}%
+% \changes{1.20}{2005/11/13}{Fix a bug with additional spaces after
+% names}%
+% \changes{1.21}{2005/11/20}{Fix problem when the first bibliography entry
+% is in an unknown language}%
+% \changes{1.22}{2006/01/02}{Remove space after \cs{btxurlfont} again
+% because a linebreak between \cs{url} and the argument breaks
+% \texttt{hyperref.sty}}%
+% \changes{1.23}{2006/08/18}{Fix bug in typesetting title of articles for
+% \texttt{babamspl.bst}}%
+% \changes{1.24}{2008/02/17}{Put \cs{btxISSN} and \cs{btxISBN} into an
+% \cs{mbox} to prevent them from being hyphenated}%
+% \changes{1.25}{2008/09/24}{Add font command for publisher}%
+% \changes{1.25}{2008/09/24}{Remove change of language in
+% alpha-numerical bib items because of occasional exceeded TeX memory}%
+% \changes{1.26}{2009/06/17}{Correct journal article title font in
+% \texttt{babamspl.bst}}%
+% \changes{1.26}{2009/06/17}{Linebreak added between url and urldate}%
+% \changes{1.26}{2009/06/17}{Added Galician and Bahasa languages}%
+% \changes{1.26}{2009/06/17}{Added French and Portuguese numerals}%
+% \changes{1.26}{2009/06/17}{Corrected Spanish numerals}%
+% \changes{1.26}{2009/06/17}{Removed comma before `and' in long lists
+% of authors in Portuguese and Swedish}%
+% \changes{1.27}{2009/06/19}{Capitalised month names in Poruguese but
+% not in Brazilian}%
+% \changes{1.27}{2009/06/19}{Fixed publisherfont in babamspl.bst}%
+% \changes{1.27}{2009/06/19}{Added Russian language}%
+% \changes{1.28}{2009/07/05}{Corrected Diciembre in Spanish language}%
+% \changes{1.28}{2009/07/05}{Automatic formatting of month year
+% combinations (either ``June 2009'' or ``06/2009'')}%
+% \changes{1.28}{2009/07/05}{Some corrections in Brazilian Portuguese}%
+% \changes{1.29}{2009/10/10}{Fix output of ``urldate''}%
+% \changes{1.30}{2010/01/06}{Added Croatian language}%
+% \changes{1.31}{2012/01/03}{Corrections in Portuguese, Croatian, Swedish}%
+% \changes{1.31}{2012/01/03}{Added Serbian, Czech, and Romanian language}%
+% \changes{1.31}{2012/01/03}{Change handling of editions to allow
+% keyword `edition' before the edition number}%
+% \changes{1.32}{2019/03/11}{Fix Spanish month abbreviation missing periods}%
+%
+% \maketitle
+% \begin{abstract}
+% \noindent
+% This package enables to generate multilingual bibliographies in
+% cooperation with |babel|.
+% Two approaches are possible:
+% Each citation may be written in another language, or the whole
+% bibliography can be typeset in a language chosen by the user.
+%
+% In addition, the package supports commands to change the typography
+% of the bibliographies.
+%
+% The current version supports Afrikaans, Bahasa, Catalan, Croatian,
+% Danish, Dutch,
+% English, Esperanto, Finnish, French,\footnote{Babelbib does not work
+% with \texttt{frenchle} prior V5,987. Please update the frenchle
+% package or use the native babel support for French, instead.}
+% Galician, German, Greek, Italian, Norwegian, Portuguese, Romanian,
+% Russian, Serbian, Spanish, and Swedish.
+% Please help me to add more languages.
+%
+% Many of the standard and extended bibliography styles are available.
+% Please read section~\ref{sec:styles}.
+%
+% If you have used version 0.1 of this package:
+% The mechanism to change fonts has changed, please read
+% section~\ref{sec:typography}.
+%
+% Have a look to \texttt{tugboat-babelbib.pdf} which includes detailed
+% descriptions how to use and extend the babelbib bundle.
+% \end{abstract}
+%
+% \tableofcontents
+%
+% \section*{Copyright}
+% Copyright 2003--2019 Harald Harders.
+%
+% This program can be redistributed and/or modified under the terms
+% of the LaTeX Project Public License Distributed from CTAN
+% archives in directory macros/latex/base/lppl.txt; either
+% version 1 of the License, or any later version.
+%
+% \section{Introduction}
+%
+% This package is a replacement for |bibgerm.sty| \cite{germbib} with the
+% aim to be extendable to other languages more easily.
+% In addition, |babelbib| provides a more flexible typography of
+% bibliographies without the need to change |bst| files.
+% But there are two shortcomings: This package needs
+% |babel.sty|~\cite{babel} (thus, it does not work with |german.sty|
+% or |ngerman.sty|), and it is written for \LaTeXe\ and does not work
+% with plain \TeX.
+%
+% The current version supports Afrikaans, Bahasa, Catalan, Croatian,
+% Czech, Danish, Dutch, English, Esperanto, Finnish,
+% French,\footnote{Babelbib does not work with \texttt{frenchle}
+% prior V5,987. Please update the frenchle package or use the native
+% babel support for French, instead.}
+% Galician, German, Greek, Italian, Norwegian, Portuguese, Romanian,
+% Russian, Serbian, Spanish, and Swedish.
+%
+% If you have used version 0.1 of this package:
+% The mechanism to change fonts have changed, please read
+% section~\ref{sec:typography}.
+%
+% \section{Usage}%
+% \label{sec:usage}%
+%
+% To use this package place
+% \begin{verbatim}
+%\usepackage{babelbib}\end{verbatim}
+% into the preamble of your document.
+% The package loads all necessary language definitions for all files
+% it knows that are loaded by |babel|.
+%
+% By default, the language of the bibliographic keywords (``editor'',
+% ``page'', etc.) switches for each item to the language of the cited
+% document.\footnote{This is equivalent to using the package option
+% \texttt{varlanguage}.}
+% If all citations shall be written in the same language, add the
+% option\index{fixlanguage=\texttt{fixlanguage}|usage} |fixlanguage|
+% to the package call.
+% Then, all bibliographies are typeset in the document's main
+% language.
+% To change the bibliography's language, use
+% \DescribeMacro{\selectbiblanguage}
+% |\selectbiblanguage{|$\langle$language$\rangle$|}|.
+% This command only has an effect, if |fixlanguage| is set.
+%
+% |babelbib| supports the \BibTeX\ styles |babplain|, |babplai3|,
+% |babalpha|, |babunsrt|, |bababbrv|, and |bababbr3| that correspond
+% to the standard |bst| files, but include international support as
+% well as flexible typography.\footnote{The versions with the
+% \texttt{3} in the filenames replace the second and later authors by
+% \emph{et al.}, if more than three authors are given.}
+% As usual, you select the style using
+% \DescribeMacro{\bibliographystyle}
+% |\bibliographystyle{|$\langle$filename$\rangle$|}|.
+% In addition, the package supports the \BibTeX\ style |babamspl|
+% which corresponds to |amsplain| by the \AmS.
+% \changes{0.2}{2003/04/20}{Added option \texttt{languagenames} to
+% define commands for language names}%
+% \index{languagenames=\texttt{languagenames}|usage}%
+% If you want to use this style, you have to add the option
+% |languagenames| to the call of the package.
+% Default is |nolanguagenames|.
+%
+% \DescribeMacro{\declarebtxcommands}%
+% If you don't like some of the keywords provided by |babelbib|, or if
+% you want to use new ones, you are able to get these using the
+% command \cs{declarebtxcommands}.
+% It takes two arguments, where the first is the language for which
+% you want to add or change keywords, and the second is the list of
+% command definitions.
+% It seems to be best to show that for an example.
+% You may want to change the definitions for Ph.D.\ theses for English
+% and German with new orthography (the defaults are ``PhD thesis'' resp.\
+% \foreignlanguage{ngerman}{"`Dissertation"'}).
+% You can reach a change by the following code:
+% \begin{verbatim}
+%\declarebtxcommands{english}{%
+% \def\btxphdthesis#1{\protect\foreignlanguage{english}{Ph.D.\ thesis}}%
+%}
+%\declarebtxcommands{ngerman}{%
+% \def\btxphdthesis#1{\protect\foreignlanguage{ngerman}{Doktorarbeit}}%
+%}\end{verbatim}
+% You may change more than one command in one |\setbtxcommand|
+% command.
+% You just have to add more of the |\def|\ldots\ lines.
+% But please don't forget the percent sign at the end of the lines in
+% order to avoid unwanted spaces in the output.
+% The \AmS\ \BibTeX\ style |amsplain| uses ``Ph.D.\ thesis'' instead
+% of the default ``PhD thesis'' for |babamspl|.
+% If you want the same keyword as in the \AmS\ original, you can use
+% the \cs{declarebtxcommands} line shown above.
+%
+%
+% \section{Preparing the \texttt{bib} files}
+%
+% In order to use the feature of multilingual bibliographies, add the
+% field |language| to every entry in your |bib| files.
+% This field gives the language of the cited document, e.\,g.
+% \begin{verbatim}
+%@InBook{dieter1997a,
+% editor = {Dieter, George~E. and others},
+% title = {Materials Selection and Design},
+% chapter = {Effects of Composition, Processing, and Structure on
+% Properties of Engineering Plastics},
+% publisher = {ASM International},
+% year = 1997,
+% volume = 20,
+% series = {ASM Handbook},
+% pages = {434--456},
+% language = {english},
+% isbn = {0-87170-386-6}
+%}\end{verbatim}
+% Then, the output of the document data (title, authors, series, etc.)
+% is typeset with correct hyphenation patterns.
+% Wheather also the keywords (``edition'', ``pages'', etc.) are
+% switched to the citation language, depends on wheather |fixlanguage|
+% has been used.
+% All languages that appear in the bibliography have to be loaded by
+% |babel|.
+%
+% \DescribeMacro{\setbtxfallbacklanguage}
+% If the field |language| is missing, the citation is typeset using a
+% fall-back language.
+% By default, the document's main language (that one that is active at
+% \cs{begin\{document\}}) is used.
+% You can change the fall-back language by using
+% \cs{setbtxfallbacklanguage\marg{language}}, e.\,g.,
+% \begin{verbatim}
+%\setbtxfallbacklanguage{ngerman}\end{verbatim}
+%
+% |babelbib| supports a couple of additional fields:
+% |ISBN|, |ISSN|, |URL|, |URLDATE|, and |ANNOTE|.
+% |ISBN| and |ISSN| take the ISBN or ISSN respectively.
+% |URL| is the address of a WWW page while |URLDATE| is the date when
+% the WWW page has been visited.
+% The field |URL| is typeset using the command |\url| if available,
+% e.\,g., if the user has loaded |url.sty|.
+% Otherwise, |babelbib| defines a |\url| command which just calls
+% |\texttt|.
+% |ANNOTE| typesets annotations after each entry in the bibliography.
+% By default, a |quotation| environment (starting with \cs{noindent})
+% is used.
+% If the field |ANNOTELANGUAGE| is also given, the language is
+% switched to the specified language.
+% Otherwise the language of the keywords is used.
+%
+% You can change the behaviour by redefining
+% \cs{btxannotation}\marg{annotations}.
+% The annotations are only printed when the package option |annote| is
+% used.
+%
+% \DescribeMacro{\biblanguage}%
+% If you want to use language-dependent commands as \cs{alsoname} in a
+% bibliography that was produced with |fixlanguage| you will be
+% surprised that the commands change the output depending on the
+% language of the citation.
+% If you want to write a field with the keyword language, you can use
+% the command \cs{biblanguage}, e.g.,
+% \begin{verbatim}
+%@Article{abinger1988a,
+% author = {Abinger, R. and Hammer, F. and Leopold, J. and others},
+% title = {Gro"sschaden an einem 300"=MW"=Dampfturbosatz},
+% journal = {Der Maschinenschaden},
+% year = 1988,
+% volume = 61,
+% number = 2,
+% pages = {58--60},
+% language = {ngerman},
+% note = {\biblanguage{\alsoname~\cite{abinger1990a}}}
+%}\end{verbatim}
+% This will give the note ``\alsoname~[\ldots]'' instead of
+% ``{\selectlanguage{ngerman}\alsoname~[\ldots]}'' when the
+% bibliography uses English keywords.
+%
+%
+% \section{Available bibliography styles}%
+% \label{sec:styles}%
+%
+% The |babelbib| bundle contains adapted versions of the standard
+% bibliography styles |plain|, |unsrt|, |abbrv|, and |alpha|.
+% They are called |babplain|, |babunsrt|, |bababbrv|, and |babalpha|,
+% respectively.
+% All variants write names in a special manner when more than one
+% author is given.
+% The first author ist written ``Lastname, Forename'' while all other
+% authors are written ``Forename Lastname''.
+% This is done to emphesize the ordering by the lastname.
+%
+% If you don't want this behaviour you can use additional variants
+% that use the same notation for all names.
+% By appending |-fl| to the style name, e.\,g., |babalpha-fl|, all names
+% are written ``Forename Lastname''.
+% By appending |-lf|, e.\,g., |babalpha-lf|, all names are written
+% ``Lastname, Forename''.
+%
+% The style |babamspl| is the |babelbib| equivalent to |amsplain|.
+%
+%
+% \section{Customisation of the bibliography's typography}
+% \label{sec:typography}%
+%
+% In constrast to the standard and |germbib| |bst| files, the
+% appearance of the different data types is not fixed for |bab*.bst|.
+% There are commands for some data fields that determine the used
+% font.
+%
+% \DescribeMacro{\setbibliographyfont}%
+% You can change some font specifications in the bibliography using
+% the command
+% \cs{setbibliographyfont\{\textrm{\meta{element}}\}\{\textrm{\meta{font command}}\}},
+% where \meta{element} is a typographic element, listed in
+% table~\ref{tab:elements}.
+% \begin{table}[tp]
+% \centering
+% \caption{Default values for the fonts in bibliographies.
+% If no value is given, the standard font (normally upright roman)
+% is used.}
+% \label{tab:elements}
+% \begin{tabular}{llll}
+% \toprule
+% Element& Data types& \multicolumn{2}{c}{Default value for
+% \BibTeX\ style} \\
+% && |bababbrv|, |babalpha|& |babamspl| \\
+% && |babplain|, |babunsrt|& \\
+% \midrule
+% name& Authors, editors& & \\
+% lastname& Lastnames of Authors, editors& & \\
+% title& All kinds of titles& \cs{emph}& \cs{emph}\\
+% jtitle& Title of journal articles& \cs{emph}& \cs{emph}\\
+% etal& ``\emph{et al.}''& \cs{emph}& \\
+% journal& Journal name& & \\
+% publisher& Publisher name& & \\
+% volume& Volume (journal)& & \cs{textbf} \\
+% ISBN& ISBN& \cs{MakeUppercase}& \cs{MakeUppercase} \\
+% ISSN& ISSN& \cs{MakeUppercase}& \cs{MakeUppercase} \\
+% url& URL& \cs{url}& \cs{url} \\
+% urldate& visiting date of URL& & \\
+% ordinal& ordinal numbers in edition& & \\
+% \bottomrule
+% \end{tabular}
+% \end{table}
+% \meta{font command} is a command that takes one argument, e.\,g.\
+% |\textbf|, |\emph|, or |\textsc|.
+% If no suitable command is available, you have to define one, first.
+% For example, you can get a bold italic font as follows:
+% \begin{verbatim}
+%\newcommand\textitbf[1]{{\bfseries\itshape #1\/}}%
+%\setbibliographyfont{title}{\textitbf}%\end{verbatim}
+% As it can be seen in this example, the argument of the used font
+% command mustn't be specified in |\setbibliographyfont|.
+%
+%
+% \subsection{Names}
+%
+% The \meta{element} |name| changes the whole name of the author,
+% including forename and lastname.
+% If |lastname| is also specified, it changes the lastname within the
+% font for the name.
+% For example,
+% \begin{verbatim}
+%\setbibliographyfont{name}{\emph}
+%\setbibliographyfont{lastname}{\MakeUppercase}\end{verbatim}
+% leads to |\emph{Harald \MakeUppercase{Harders}}| resp.\
+% ``\emph{Harald \MakeUppercase{Harders}}''.
+%
+%
+% By default, a colon is printed after the author names.
+% If you want another sign, just redefine the command
+% \cs{btxauthorcolon}:
+% \begin{verbatim}
+%\renewcommand\btxauthorcolon{,}\end{verbatim}
+% Unfortunately, it cannot detect whether the name ends on a fullstop.
+% Thus, things like ``Harders, H.. \emph{Title of document}'' may
+% appear.
+%
+%
+% \subsection{URL's}
+%
+% The font definition for |urldate| can also be used not to change the
+% font but to provide a command that writes the date in the correct
+% language, e.\,g., using the |isodate| package:
+% \begin{verbatim}
+%\usepackage[short]{isodate}
+%\setbibliographyfont{urldate}{\printdate}\end{verbatim}
+%
+% When using |urldate|, normally a string is printed between the url
+% itself and the the date, e.g., in English
+% ``\url{http://www.dante.de}, visited on 2005-11-11''.
+% The string is ``|, visited on |''.
+% This is reached by the definition of the internal command
+% \cs{btxurldatecomment}, e.g., for English
+% \begin{verbatim}
+%\def\btxurldatecomment#1{%
+% \protect\foreignlanguage{english}{, visited on #1}%
+%}\end{verbatim}
+% You can change this command, for example, to typeset the date in
+% brackets:
+% \begin{verbatim}
+%\declarebtxcommands{english}{%
+% \def\btxurldatecomment#1{ [#1]}%
+%}\end{verbatim}
+% Be sure not to forget the leading space.
+% It is necessary to be able to begin with a comma which does not have
+% a space before it.
+%
+%
+% \subsection{ISBN and ISSN}
+%
+% \DescribeMacro{\btxISBN}%
+% \DescribeMacro{\btxISSN}%
+% There are two additional commands, \cs{btxISBN} and \cs{btxISSN}.
+% They generate the strings ``ISBN'' and ``ISSN'' in bibliographies.
+% By default, they do it without a change of the font.
+% For example, if using oldstyle digits, it could be worth to change
+% them e.\,g.\ to
+% \begin{verbatim}
+%\renewcommand\btxISBN{\textsc{isbn}}
+%\renewcommand\btxISSN{\textsc{issn}}\end{verbatim}
+%
+% \DescribeMacro{\btxprintISBN}%
+% \DescribeMacro{\btxprintISSN}%
+% By default, the ISBN resp.\ ISSN is printed if present in the data
+% base.
+% You can switch this behaviour off by using \cs{btxprintISBN\{false\}}
+% resp.\ \cs{btxprintISSN\{false\}}.
+% Similarly, printing is switched on by \cs{btxprintISBN\{true\}}
+% resp.\ \cs{btxprintISSN\{true\}}.
+% Alternatively, you can switch on or off the ISBN and ISSN when
+% loading the package by using the package options |isbn|, |noisbn|,
+% |issn|, or |noissn|.
+%
+% This, however, only works for the ``standard'' styles, i.\,e., not for
+% the \AmS\ style |babamspl|.
+%
+% If you are using |babamspl|, the language names of the citations are
+% printed by default, as the original \AmS\ style does it.
+% You can avoid this by adding following line to your preamble:
+% \begin{verbatim}
+%\newcommand\btxprintamslanguage[1]{}\end{verbatim}
+%
+%
+% \subsection{Spaces between forenames}
+%
+% \DescribeMacro{\btxfnamespaceshort}%
+% \DescribeMacro{\btxfnamespacelong}%
+% The spaces between multiple forenames are written by
+% \cs{btxfnamespacelong} and \cs{btxfnamespaceshort} for full and
+% abbreviated forenames, respectively.
+% By default, a normal space is used between full forenames, and a
+% thin space (\cs{,}) is used between abbreviated forenames (with the
+% exception English where no space is printed).
+% These defaults can be changed language-dependent:
+% \begin{verbatim}
+%\declarebtxcommands{english}{%
+% \def\btxfnamespaceshort{\,}%
+% \def\btxfnamespacelong{~}%
+%}\end{verbatim}
+%
+%
+% \subsection{Edition numbers}
+%
+% Ordinal numbers for editions are handled by \LaTeX\ when typesetting
+% the bibliography.
+% You just have to give the number itself in the |bib| file and it is
+% typeset correctly in the bibliography, e.g.,
+% \begin{verbatim}
+%edition = 3\end{verbatim}
+% is typeset as "`3."' in German and ``3rd'' in English.
+% For some other languages, corresponding definitions are included in
+% this package as well.
+% Unfortunately, I do not know about some languages how to write
+% ordinal numbers.
+% Thus, in some languages, a warning is produced and the given
+% number is printed without a change (``3'' in the example).
+% If not a pure number is given, it also is typeset without a change.
+% You can add or change the output of edition numbers on a language
+% basis, e.g.,
+% \begin{verbatim}
+%\declarebtxcommands{english}{%
+% \def\btxnumeralshort#1{%
+% \btxnumeralenglish{english}{#1}}%
+% \def\btxnumerallong#1{%
+% \ifnumber{#1}{%
+% \ifcase#1 0th\or first\or second\or third\or forth\or fifth\or
+% sixth\or seventh\or eighth\or nineth\or tenth\else
+% \btxnumeralenglish{english}{#1}%
+% \fi}{#1}}%
+%}\end{verbatim}
+% This example typesets the ordinals between 1st and 10th as words and
+% switches to the short form for larger numbers in English language
+% for the long version and uses the default function for the short
+% version.
+%
+% Three output formats are predefined:
+% \cs{btxnumeraldot} prints the number with a dot followed, as
+% it is common in German.
+% \cs{btxnumeralenglish} adds ``st'', ``nd'', ``rd'', or
+% ``th'', depending on the number.
+% And \cs{btxnumeralfallback} generates a warning and prints
+% the number as given.
+%
+% If you, for instance, want to switch the Danish behaviour to be as
+% the German is, use these commands:
+% \begin{verbatim}
+%\declarebtxcommands{danish}{%
+% \def\btxnumeralshort#1{\btxnumeraldot{danish}{#1}}%
+% \def\btxnumerallong#1{\btxnumeraldot{danish}{#1}}%
+%}\end{verbatim}
+%
+% For the English variant, a font |numeral| is predefined that
+% typesets the appended characters.
+% If you, for example, want to print the superscripted, use
+% \begin{verbatim}
+%\setbibliographyfont{numeral}{\textsuperscript}\end{verbatim}
+%
+% If you know how numerals are handled in a language, please send me
+% an eMail.
+%
+%
+% \subsection{Printing of month and year}
+%
+% \DescribeMacro{datename}%
+% Starting with version 1.29, |babelbib| prints dates in the format
+% ``MMM YYYY' with the name of the month in case the month is
+% specified in an bibliography entry by default (or by using the
+% package option |datename|).
+% For example,
+% \begin{verbatim}
+%@Manual{baeker1998a,
+% title = {Automatische Neuvernetzung mit ABAQUS/Standard -- Technik
+% und Anwendungen},
+% author = {B\"aker, M.},
+% organization = {Institut f\"ur Werkstoffe, Technische Universit\"at
+% Braunschweig},
+% address = {Braunschweig},
+% month = oct,
+% year = 1998,
+% language = {ngerman}
+%}
+%
+%@TechReport{aurenhammer1996a,
+% author = {Aurenhammer, F. and Klein, R.},
+% title = {Voronoi Diagrams},
+% institution = {FernUniversit\"at Gesamthochschule in Hagen},
+% year = 1996,
+% number = 198,
+% month = 5,
+% language = {english}
+%}\end{verbatim}
+% results in
+% \begingroup
+% \def\section*#1{}
+% \begin{thebibliography}{1}
+% \providebibliographyfont{name}{}%
+% \providebibliographyfont{title}{\emph}%
+% \providebibliographyfont{etal}{\emph}%
+% \providebibliographyfont{volume}{}%
+% \providebibliographyfont{ISBN}{\MakeUppercase}%
+% \providebibliographyfont{ISSN}{\MakeUppercase}%
+% \providebibliographyfont{url}{\url}%
+%
+% \btxselectlanguage {ngerman}
+% \bibitem {baeker1998a}
+% \btxnamefont {\btxlastnamefont {B\"aker}, M.}\btxauthorcolon\ \btxtitlefont
+% {Automatische Neuvernetzung mit ABAQUS/Standard -- Technik und Anwendungen}.
+% \newblock Institut f\"ur Werkstoffe, Technische Universit\"at Braunschweig,
+% Braunschweig, \btxprintmonthyear{.}{10}{1998}{long}.
+%\bibitem {aurenhammer1996a}
+%\btxnamefont {\btxlastnamefont {Aurenhammer}, F.} \btxandlong {}\ \btxnamefont
+% {R. \btxlastnamefont {Klein}}\btxauthorcolon\ \btxtitlefont
+% {\btxifchangecase {Voronoi diagrams}{Voronoi Diagrams}}.
+% \newblock \Btxtechreplong {}\ 198, FernUniversit\"at Gesamthochschule
+% in Hagen,
+% \btxprintmonthyear{.}{5}{1996}{long}.
+% \end{thebibliography}
+% \endgroup
+% Note that this conversion only works if you specify the month using
+% the predefined macro names |jan|, |feb|, etc.\ or if you specify the
+% month numerically (|1|, |2|, |3|, etc.).
+% If you use strings (e.\,g., ``January''), the handling of months
+% does not work so that month and year are printed as given in any
+% case.
+%
+% Whether the full name (e.\,g., ``October'') or an abbreviation
+% (e.\,g., ``Oct.'') is printed, is determined by the bibliography
+% style (|.bst|).
+%
+%
+% \DescribeMacro{datenumeric}%
+% By loading |babelbib| with the package option |datenumeric|, the
+% month is converted to a number.
+% Currently, the output format is ``MM/YYYY'' in all languages.
+% The result looks as follows:
+% \begingroup
+% \def\section*#1{}
+% \makeatletter
+% \btx@datenumeric
+% \makeatother
+% \begin{thebibliography}{1}
+% \providebibliographyfont{name}{}%
+% \providebibliographyfont{title}{\emph}%
+% \providebibliographyfont{etal}{\emph}%
+% \providebibliographyfont{volume}{}%
+% \providebibliographyfont{ISBN}{\MakeUppercase}%
+% \providebibliographyfont{ISSN}{\MakeUppercase}%
+% \providebibliographyfont{url}{\url}%
+%
+% \btxselectlanguage {ngerman}
+% \bibitem {baeker1998a}
+% \btxnamefont {\btxlastnamefont {B\"aker}, M.}\btxauthorcolon\ \btxtitlefont
+% {Automatische Neuvernetzung mit ABAQUS/Standard -- Technik und Anwendungen}.
+% \newblock Institut f\"ur Werkstoffe, Technische Universit\"at Braunschweig,
+% Braunschweig, \btxprintmonthyear{.}{10}{1998}{long}.
+%\bibitem {aurenhammer1996a}
+%\btxnamefont {\btxlastnamefont {Aurenhammer}, F.} \btxandlong {}\ \btxnamefont
+% {R. \btxlastnamefont {Klein}}\btxauthorcolon\ \btxtitlefont
+% {\btxifchangecase {Voronoi diagrams}{Voronoi Diagrams}}.
+% \newblock \Btxtechreplong {}\ 198, FernUniversit\"at Gesamthochschule
+% in Hagen,
+% \btxprintmonthyear{.}{5}{1996}{long}.
+% \end{thebibliography}
+% \endgroup
+%
+% \DescribeMacro{\btxprintmonthyearnum}%
+% If you don't like the used format, you might change it by redefining
+% the macro \cs{btxprintmonthyearnum} for your language as follows:
+% \begin{verbatim}
+%\declarebtxcommands{danish}{%
+% \def\btxprintmonthyearnum#1#2{#1-#2}%
+%}\end{verbatim}
+% Here, the first argument is the month, the second the year.
+%
+% \DescribeMacro{dateasis}%
+% By loading |babelbib| with the package option |dateasis|, the month
+% is printed as specified in the |bib| file in the format ``MMM YYYY''.
+% Beware that the internal macro names |jan|, |feb|, etc.\ are handled
+% as numbers so that following output is gained:
+% \begingroup
+% \def\section*#1{}
+% \makeatletter
+% \btx@dateasis
+% \makeatother
+% \begin{thebibliography}{1}
+% \providebibliographyfont{name}{}%
+% \providebibliographyfont{title}{\emph}%
+% \providebibliographyfont{etal}{\emph}%
+% \providebibliographyfont{volume}{}%
+% \providebibliographyfont{ISBN}{\MakeUppercase}%
+% \providebibliographyfont{ISSN}{\MakeUppercase}%
+% \providebibliographyfont{url}{\url}%
+%
+% \btxselectlanguage {ngerman}
+% \bibitem {baeker1998a}
+% \btxnamefont {\btxlastnamefont {B\"aker}, M.}\btxauthorcolon\ \btxtitlefont
+% {Automatische Neuvernetzung mit ABAQUS/Standard -- Technik und Anwendungen}.
+% \newblock Institut f\"ur Werkstoffe, Technische Universit\"at Braunschweig,
+% Braunschweig, \btxprintmonthyear{.}{10}{1998}{long}.
+%\bibitem {aurenhammer1996a}
+%\btxnamefont {\btxlastnamefont {Aurenhammer}, F.} \btxandlong {}\ \btxnamefont
+% {R. \btxlastnamefont {Klein}}\btxauthorcolon\ \btxtitlefont
+% {\btxifchangecase {Voronoi diagrams}{Voronoi Diagrams}}.
+% \newblock \Btxtechreplong {}\ 198, FernUniversit\"at Gesamthochschule
+% in Hagen,
+% \btxprintmonthyear{.}{5}{1996}{long}.
+% \end{thebibliography}
+% \endgroup
+%
+%
+%
+% \section{How to add new languages}
+%
+% The language definitions are placed in special files with the
+% extension |.bdf|.
+% If you want to add a new language to the |babelbib| system, you
+% should copy one of the existing |bdf| files and change the new
+% file.
+% Make sure to use an existing |bdf| file of the most recent babelbib
+% version.
+%
+% Since |babelbib.sty| contains a list of known languages, it will not
+% find the new language definition file, automatically.
+% Then, you can give the name of the new file without extension as an
+% option when loading |babelbib|.
+% For example, to load |mylang.bdf|, you have to load the package as
+% follows:
+% \begin{verbatim}
+%\usepackage[mylang]{babelbib}\end{verbatim}
+%
+% If you have developed a new |bdf| file, please send it to
+% |harald.harders@gmx.de|.
+% Then, I will add it to the |babelbib| system.
+%
+% \section{Problems and Incompatibilities}
+%
+% \begin{itemize}
+% \item
+% Babelbib does not work together with old versions of the
+% |frenchle| package prior V5,987.
+% Please update the frenchle package or use the native babel support
+% for the French language, instead.
+% \item
+% If babelbib is used together with one of the classes of the
+% KOMA-Script bundle, some additional spaces are added when
+% numerical edition numbers are used.
+% This is a KOMA-Script bug and will be fixed in the next
+% KOMA-Script release.
+% \end{itemize}
+%
+% \section{To Do}
+%
+% \begin{itemize}
+% \item Add more languages.
+% \item Complete Dutch.
+% \item Add the possibility to switch off ISBN and ISSN to |babasmpl|.
+% \end{itemize}
+%
+%
+% \section*{Acknowledgements}
+%
+% Danie Els, \url{dnjels@sun.ac.za} (Afrikaans);
+% Taneli Huuskonen, \url{huuskone@cc.helsinki.fi} (Esperanto, Finnish);
+% V\'\i ctor Lua\~na, \url{victor@fluor.quimica.uniovi.es} (Spanish);
+% Hans Fredrik Nordhaug, \url{hansfn@mi.uib.no} (Norwegian, Swedish);
+% Robert Fuster, \url{rfuster@imm.upv.es} (Catalan);
+% Markus Kohm, \url{komascript@gmx.info} (Different schemes for writing names);
+% Matthias D. Eisner, \url{matthias.eisner@ethz.ch} (protect
+% \cs{foreignlanguage} calls);
+% Daniel Winkelmann, \url{daniel.winkelmann@club-internet.fr}
+% (idea for different formatting of forenames and lastnames);
+% Jan Steffan, \url{me@jansteffan.de} (\cs{setbtxfallbacklanguage});
+% Philip Ratcliffe, \url{philip.ratcliffe@email.it} (corrections for
+% Italian); Angel Tsankov, \url{bigman@abv.bg} (bugfix with
+% \cs{bbbb\meta{\cs{CurrentOption}}loaded});
+% Prokopis Prokopidis, \url{prokopis@ilsp.gr} (Greek);
+% Daniel Flipo, \url{daniel.flipo@univ-lille1.fr} (French numerals);
+% Ignacio Fern\'andez Galv\'an, \url{jellby@yahoo.com} (Spanish
+% numerals);
+% Peter Bartke, \url{bartke@inf.fu-berlin.de} (idea of annote field);
+% Yanti Yulianti, \url{y_yanti@students.itb.ac.id} (Bahasa);
+% Miguel Rodr{\'\i}guez Penabad, \url{penabad@udc.es} (Galician);
+% Jos\'e Carlos Santos, \url{jcsantos@fc.up.pt} (Portuguese);
+% Iago Qui\~nones, \url{iagoqo@gmail.com} (bugfix for Spanish);
+% Erik \"Osthols, \url{erik.osthols@gmail.com} (Swedish);
+% Zoran Filipovic, \url{zoran.filipovic@yahoo.com} (Serbian);
+% Andrei Dragomirescu, \url{andrei.dragomirescu@gmail.com};
+% Tomas Hnizdil, \url{tomash.cz@gmail.com}.
+%
+% Furthermore, I thank the person who provided Russian.
+% Unfortunately, I cannot find the name anymore.
+%
+%\begin{thebibliography}{1}
+% \providebibliographyfont{name}{}%
+% \providebibliographyfont{title}{\emph}%
+% \providebibliographyfont{etal}{\emph}%
+% \providebibliographyfont{volume}{}%
+% \providebibliographyfont{ISBN}{\MakeUppercase}%
+% \providebibliographyfont{ISSN}{\MakeUppercase}%
+% \providebibliographyfont{url}{\url}%
+%
+%\selectlanguage{\english}
+%\bibitem{babel}
+%\btxnamefont{Braams, Johannes}: \btxtitlefont{Babel, a multilingual package
+% for use with \LaTeX's standard document classes}, 2002.
+%\newblock \btxurlfont{CTAN:macros/latex/required/babel/}.
+%
+%\selectlanguage{\english}
+%\bibitem{germbib}
+%\btxnamefont{Wallmeier, M.}, A.~Scherer\btxandcomma{} \btxandlong{}\
+% \btxnamefont{H.~Harders}: \btxtitlefont{Macros for german {\BibTeX}ing},
+% 2000.
+%\newblock \btxurlfont{CTAN:biblio/bibtex/contrib/germbib/}.
+%
+%\end{thebibliography}
+%
+% \StopEventually{\PrintChanges \PrintIndex}
+%
+%
+% \section{The implementation}
+%
+% Source lines that look like \texttt{$\langle$*...$\rangle$} or
+% \texttt{$\langle$/...$\rangle$} where \texttt{...} is arbitrary text
+% are not written into the output files.
+% If a source line starts with \texttt{$\langle$...$\rangle$}, this
+% part of the line is omitted.
+%
+% \subsection{Headings of the files}
+%
+% Heading of the package and the other files:
+% \begin{macrocode}
+%<*package>
+\NeedsTeXFormat{LaTeX2e}[1998/06/01]
+\ProvidesPackage{babelbib}
+%</package>
+% \end{macrocode}
+% File heads of the |bdf| files:
+% \begin{macrocode}
+%<afrikaans>%% Language definitions for Afrikaans by
+%<afrikaans>%% Danie Els <dnjels@sun.ac.za>
+%<afrikaans>\ProvidesFile{afrikaans.bdf}
+%<bahasa>%% Language definitions for Bahasa by
+%<bahasa>%% Yanti Yulianti <y_yanti@students.itb.ac.id>
+%<bahasa>\ProvidesFile{bahasa.bdf}
+%<catalan>%% Language definitions for Catalan by
+%<catalan>%% Robert Fuster <rfuster@imm.upv.es>
+%<catalan>\ProvidesFile{catalan.bdf}
+%<croatian>%% Language definitions for Croatian by
+%<croatian>%% Vedran Mileti\'c <vmiletic@inf.uniri.hr>,
+%<croatian>%% Ivan Kokan <ivan.kokan@gmail.com>,
+%<croatian>%% Ivica Naki\'c <nakic@math.hr>
+%<croatian>\ProvidesFile{croatian.bdf}
+%<czech>%% Language definitions for Czech by
+%<czech>%% Tomas Hnizdil <tomash.cz@gmail.com>
+%<czech>\ProvidesFile{czech.bdf}
+%<danish>\ProvidesFile{danish.bdf}
+%<dutch>\ProvidesFile{dutch.bdf}
+%<english>\ProvidesFile{english.bdf}
+%<esperanto>%% Language definitions for Esperanto by
+%<esperanto>%% Taneli Huuskonen <huuskone@cc.helsinki.fi>
+%<esperanto>\ProvidesFile{esperanto.bdf}
+%<finnish>%% Language definitions for Finnish by
+%<finnish>%% Taneli Huuskonen <huuskone@cc.helsinki.fi>
+%<finnish>\ProvidesFile{finnish.bdf}
+%<french>\ProvidesFile{french.bdf}
+%<galician>%% Language definitions for Galician by
+%<galician>%% Miguel Rodr{\'\i}guez Penabad <penabad@udc.es>
+%<galician>\ProvidesFile{galician.bdf}
+%<german>\ProvidesFile{german.bdf}
+%<greek>\ProvidesFile{greek.bdf}
+%<greek>%% Language definitions for Greek by
+%<greek>%% Prokopis Prokopidis <prokopis@ilsp.gr>
+%<italian>\ProvidesFile{italian.bdf}
+%<norsk>%% Language definitions for Norwegian by
+%<norsk>%% Hans Fredrik Nordhaug <hansfn@mi.uib.no>
+%<norsk>\ProvidesFile{norsk.bdf}
+%<portuguese>%% Language definitions for Portuguese by
+%<portuguese>%% Jos\'e Carlos Santos <jcsantos@fc.up.pt>
+%<portuguese>\ProvidesFile{portuguese.bdf}
+%<romanian>%% Language definitions for Romanian by
+%<romanian>%% Andrei Dragomirescu <andrei.dragomirescu@gmail.com>
+%<romanian>\ProvidesFile{romanian.bdf}
+%<russian>%% Language definitions for Russian by
+%<russian>%% ... (can't find the information. If it was you please tell me!)
+%<russian>\ProvidesFile{russian.bdf}
+%<serbian>%% Language definitions for Serbian by
+%<serbian>%% Zoran Filipovic <zoran.filipovic@yahoo.com>
+%<serbian>\ProvidesFile{serbian.bdf}
+%<spanish>%% Language definitions for Spanish by
+%<spanish>%% V{\'\i}ctor Lua{\~n}a <victor@fluor.quimica.uniovi.es>
+%<spanish>\ProvidesFile{spanish.bdf}
+%<swedish>%% Language definitions for Swedish by
+%<swedish>%% Hans Fredrik Nordhaug <hansfn@mi.uib.no> and
+%<swedish>%% Erik \"Osthols <erik.osthols@gmail.com>
+%<swedish>\ProvidesFile{swedish.bdf}
+% \end{macrocode}
+% Version information unique for all generated files:
+% \begin{macrocode}
+%<latex> [2019/03/11 v1.32 babelbib: multilingual bibliographies (HH)]
+%<bst>%% 2019/03/11 v1.32 babelbib: multilingual bibliographies (HH)
+% \end{macrocode}
+%
+% \subsection{The package itself}
+%
+% \index{fixlanguage=\texttt{fixlanguage}|main}%
+% Define an option which fixes the language in the bibliography to the
+% main language of the document.
+% \begin{macrocode}
+%<*package>
+\newif\ifbbbbfixlanguage
+\DeclareOption{fixlanguage}{\bbbbfixlanguagetrue}
+\DeclareOption{varlanguage}{\bbbbfixlanguagefalse}
+% \end{macrocode}
+% \changes{0.2}{2003/04/20}{Added option \texttt{languagenames} to
+% define commands for language names}%
+% \index{languagenames=\texttt{languagenames}|main}%
+% If this option is used, generate the commands
+% \cs{btxlanguagename}\meta{language} that save how languages are
+% called in other languages, e.\,g. in German, French is called
+% \foreignlanguage{ngerman}{"`franzsisch"'}.
+% \begin{macrocode}
+\newif\ifbbbblanguagenames
+\DeclareOption{nolanguagenames}{\bbbblanguagenamesfalse}
+\DeclareOption{languagenames}{\bbbblanguagenamestrue}
+% \end{macrocode}
+% \begin{macrocode}
+\newif\ifbbbbannotations
+\DeclareOption{annote}{\bbbbannotationstrue}
+\DeclareOption{noannote}{\bbbbannotationsfalse}
+% \end{macrocode}
+% \begin{macro}{\ifbtx@printISBN}
+% \begin{macro}{\ifbtx@printISSN}
+% The booleans that store the necessary information if ISBN and ISSN
+% shall be printed.
+% \begin{macrocode}
+\newif\ifbtx@printISBN
+\newif\ifbtx@printISSN
+\DeclareOption{isbn}{\btx@printISBNtrue}
+\DeclareOption{noisbn}{\btx@printISBNfalse}
+\DeclareOption{issn}{\btx@printISSNtrue}
+\DeclareOption{noissn}{\btx@printISSNfalse}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\bbbbifundefined}
+% \begin{macrocode}
+\newcommand\btxprintmonthyear[4]{}
+\newcommand*\btx@dateasis{%
+ \def\btxprintmonthyear##1##2##3##4{##2\ ##3}%
+}
+\newcommand*\btx@datenumeric{%
+ \def\btxprintmonthyear##1##2##3##4{%
+ \ifnumber{##2}{\btxprintmonthyearnum{##2}{##3}}{##2\ ##3}}%
+}
+\newcommand*\btx@datename{%
+ \def\btxprintmonthyear##1##2##3##4{%
+ \ifnumber{##2}{%
+ \ifcase ##2 \or
+ \csname btxmonjan##4\endcsname{##1}\or
+ \csname btxmonfeb##4\endcsname{##1}\or
+ \csname btxmonmar##4\endcsname{##1}\or
+ \csname btxmonapr##4\endcsname{##1}\or
+ \csname btxmonmay##4\endcsname{##1}\or
+ \csname btxmonjun##4\endcsname{##1}\or
+ \csname btxmonjul##4\endcsname{##1}\or
+ \csname btxmonaug##4\endcsname{##1}\or
+ \csname btxmonsep##4\endcsname{##1}\or
+ \csname btxmonoct##4\endcsname{##1}\or
+ \csname btxmonnov##4\endcsname{##1}\or
+ \csname btxmondec##4\endcsname{##1}\or
+ \PackageError{babelbib}{%
+ Month outside range 1 to 12 used}{%
+ Better use the BibTeX names jan, feb, mar, etc.}%
+ \fi
+ \ ##3%
+ }{%
+ ##2\ ##3}%
+ }%
+}
+\DeclareOption{dateasis}{\btx@dateasis}
+\DeclareOption{datenumeric}{\btx@datenumeric}
+\DeclareOption{datename}{\btx@datename}
+% \end{macrocode}
+% \end{macro}
+% If additional options are given, try to load these as
+% languages. This is implemented in order to be able to use a new
+% language that is not yet supported by the official |babelbib|.
+% \changes{1.15}{2005/09/01}{Small bug fix in loading language files}%
+% \begin{macrocode}
+\DeclareOption*{%
+ \InputIfFileExists{\CurrentOption.bdf}{%
+ \expandafter\def\csname bbbb\CurrentOption loaded\endcsname{\@empty}%
+ }{%
+ \PackageError{babelbib}{%
+ Language definition file \CurrentOption.bdf not found}{%
+ Maybe you misspelled the language option?}%
+ }%
+}
+% \end{macrocode}
+% Default options.
+% \begin{macrocode}
+\ExecuteOptions{varlanguage,nolanguagenames,noannote,isbn,issn,datename}
+% \end{macrocode}
+% Process the given options.
+% \begin{macrocode}
+\ProcessOptions*
+% \end{macrocode}
+% \begin{macro}{\bbbbifundefined}
+% Define a replacement for \cs{@ifundefined} that does not define the
+% command it is tested for as side effect.
+% This command has been taken from a news posting by Markus Kohm
+% (|markus.kohm@gmx.de|).
+% \begin{macrocode}
+\newcommand*{\bbbbifundefined}[1]{%
+ \begingroup\expandafter\expandafter\expandafter\endgroup
+ \expandafter\ifx\csname #1\endcsname\relax
+ \expandafter\@firstoftwo
+ \else
+ \expandafter\@secondoftwo
+ \fi
+}
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\bbbbaddto}
+% Adds the command named |\bibs#2| to the command |\extras#1|, if this
+% command is defined before, where |#1| and |#2| are the arguments of
+% |\bbbbaddto|. For internal use only.
+% \changes{0.32}{2003/05/06}{Changed \cs{bbbbaddto} in order to allow
+% different commands to be added to \cs{extras}\meta{language}}%
+% \begin{macrocode}
+\newcommand\bbbbaddto[2]{%
+% \end{macrocode}
+% Test wheather |\extras#1| is defined.
+% \begin{macrocode}
+ \expandafter\bbbbifundefined{extras#1}{}{%
+% \end{macrocode}
+% Call |babel|'s command to append |\bibs#1| to |\extras#1|.
+% \begin{macrocode}
+ \expandafter\addto\expandafter{\csname extras#1\endcsname}{%
+ \csname #2\endcsname}%
+ \typeout{babelbib extension \@backslashchar #2 added to
+ \string\extras #1}%
+ }%
+}
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\inputbdf}
+% Input the file |#2.bdf| if babel has loaded the language |#1|.
+% For internal use only.
+% \begin{macrocode}
+\newcommand\inputbdf[2]{%
+% \end{macrocode}
+% \changes{0.43}{2004/01/05}{Test on \cs{date}\meta{language} instead on
+% \cs{l@}\meta{language} (caused problems with \TeX Live)}%
+% Test wheather |\date#1| is defined which is the case if the language
+% |#1| has been loaded.
+% \begin{macrocode}
+ \bbbbifundefined{date#1}{}{%
+% \end{macrocode}
+% Input |#2.bdf|.
+% \begin{macrocode}
+ \@ifundefined{bbbb#2loaded}{%
+ \expandafter\def\csname bbbb#2loaded\endcsname{\@empty}%
+ \input{#2.bdf}%
+ }{}%
+ }%
+}
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\selectbiblanguage}
+% \changes{0.3}{2003/04/21}{Handling of usage before or after
+% \texttt{begin\{document\}} added}%
+% Define |\selectbiblanguage| which explicitly selects the language
+% for the bibliography. This is only useful when the option
+% |fixlanguage| is used.
+% Otherwise the command produces a warning and does nothing else.
+%
+% Since all the language dependent macros are not know before
+% |\begin{document}|, the command |\selectbiblanguage| has to wait
+% until there, before doing any action.
+% Because after |\begin{document}|, it can do the action immediately,
+% |\selectbiblanguge| has to be redefined there.
+% \begin{macrocode}
+\ifbbbbfixlanguage
+% \end{macrocode}
+% Define the |\selectlanguage| command for usage before
+% |\begin{document}|.
+% \begin{macrocode}
+ \newcommand\selectbiblanguage[1]{%
+ \AtBeginDocument{\@selectbiblanguage{#1}}%
+ }
+% \end{macrocode}
+% Redefine it at |\begin{document}|.
+% \begin{macrocode}
+ \AtBeginDocument{%
+ \renewcommand\selectbiblanguage[1]{\@selectbiblanguage{#1}}%
+ }
+% \end{macrocode}
+% Define the ``real'' command that does the action.
+% It tests wheather |\bibs#1| and |\extras#1| are known and produces
+% error messages if not.
+% If everything is okay, change the bibliography language.
+% \begin{macrocode}
+ \newcommand\@selectbiblanguage[1]{%
+ \bbbbifundefined{bibs#1}{%
+ \bbbbifundefined{date#1}{%
+ \PackageError{babelbib}{Language #1 in bibliography not loaded
+ by babel}{%
+ The language #1 hasn't been loaded by babel.
+ Add it to the\MessageBreak
+ options of the \string\usepackage{babel} command or to the
+ global options.}%
+ }{%
+ \PackageError{babelbib}{Language #1 in bibliography unknown by
+ babelbib}{%
+ There are no definitions for #1 available in the
+ current\MessageBreak
+ version of babelbib. Please contact harald.harders@gmx.de.}%
+ }%
+ }{%
+ \typeout{babelbib: Set language for keywords in the bibliography fixed to #1}%
+ \csname bibs#1\endcsname
+ }%
+ }
+\else
+ \newcommand\selectbiblanguage[1]{%
+ \PackageWarning{babelbib}{Command \string\selectbiblanguage\space
+ used without package\MessageBreak
+ option fixlanguage. Ignored}%
+ }
+ \AtBeginDocument{%
+ \typeout{babelbib: Use citation-dependent languages in bibliography}%
+ }
+\fi
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\btxselectlanguage}
+% \changes{0.2}{2003/04/20}{Added}%
+% Define |\selectbiblanguage| which selects a language and complains
+% if babelbib does not know about this language.
+% For internal use, only.
+% \begin{macrocode}
+\newcommand\btxselectlanguage[1]{%
+ \bbbbifundefined{bibs#1}{%
+ \bbbbifundefined{date#1}{%
+ \PackageError{babelbib}{Language #1 in bibliography not loaded
+ by babel}{%
+ The language #1 hasn't been loaded by babel.
+ Add it to the\MessageBreak
+ options of the \string\usepackage{babel} command or to the
+ global options.}%
+ }{%
+ \ifbbbbfixlanguage
+ \PackageWarning{babelbib}{Language #1 in bibliography
+ unknown\MessageBreak
+ by babelbib. Hyphenation will be\MessageBreak
+ incorrect}%
+ \else
+ \PackageError{babelbib}{Language #1 in bibliography unknown by
+ babelbib}{%
+ There are no definitions for #1 available in the
+ current\MessageBreak
+ version of babelbib. Please contact harald.harders@gmx.de.}%
+ \fi
+ }%
+ }{%
+ \csname extras#1\endcsname
+ \selectlanguage{#1}%
+ }%
+}
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\biblanguage}
+% \changes{1.15}{2005/09/01}{Add \cs{biblanguage} that switches to the
+% keyword language within a field}%
+% Define \cs{biblanguage} which switches to the keyword language
+% within a field.
+% \begin{macrocode}
+\newcommand\biblanguage[1]{{%
+ \expandafter\selectlanguage\expandafter{\biblanguagename}#1}}
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\btxlanguagename}
+% \changes{0.2}{2003/04/20}{Added}%
+% Define |\btxlanguagename| which typesets the name of the language
+% given in the argument, spoken in the current active language.
+% \begin{macrocode}
+\newcommand\btxlanguagename[1]{%
+ \bbbbifundefined{btxlanguagename#1}{%
+ \PackageError{babelbib}{Languagename for #1 not
+ defined\MessageBreak
+ in \languagename\space language}{%
+ Either you have forgotten to specify the option `languagenames'
+ when loading\MessageBreak
+ babelbib, or the command \string\bibs\languagename\space does
+ not contain a definition\MessageBreak
+ for the command \string\btxlanguagename#1.
+ In the latter case, please\MessageBreak
+ contact harald.harders@gmx.de.}%
+ #1%
+ }{%
+ \@nameuse{btxlanguagename#1}%
+ }%
+}
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\setbtxfallbacklanguage}
+% \changes{1.12}{2005/06/19}{Add the command \cs{setbtxfallbacklanguage}
+% to force a fall-back language}%
+% \begin{macrocode}
+\newcommand*\setbtxfallbacklanguage[1]{%
+ \edef\btxfallbacklanguage{#1}%
+ \typeout{babelbib: Set bibliography fall-back language to
+ \btxfallbacklanguage}%
+}
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\btxfallbacklanguage}
+% \changes{0.40}{2003/09/26}{Add the command \cs{btxfallbacklanguage}
+% for items without given language}%
+% \begin{macrocode}
+\AtBeginDocument{%
+ \@ifundefined{btxfallbacklanguage}{%
+ \edef\btxfallbacklanguage{\languagename}%
+ \typeout{babelbib: Set bibliography fall-back language to
+ \btxfallbacklanguage}%
+ }{%
+ \typeout{babelbib: Bibliography fall-back language unchanged
+ (\btxfallbacklanguage)}%
+ }%
+}
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\declarebtxcommands}
+% \changes{0.3}{2003/04/21}{Added}%
+% Declare |\declarebtxcommands| which adds or replaces one or more of the
+% |\Btx| or |\btx| commands defined in a \cs{bibs}\meta{language}
+% command.
+% The first argument gives the language for which the commands shall
+% be added or changed.
+% The second argument includes the definitions of the commands.
+% For an example, see section~\ref{sec:usage}.
+% \begin{macrocode}
+\newcommand*\declarebtxcommands[2]{%
+ \AtBeginDocument{%
+ \typeout{babelbib: Add a command to \string\bibs#1}%
+ \expandafter\g@addto@macro\csname bibs#1\endcsname{#2}%
+ \ifbbbbfixlanguage
+ \selectbiblanguage{\biblanguagename}%
+ \fi
+ }%
+}
+% \end{macrocode}
+% This command may only be used in the preamble.
+% \begin{macrocode}
+\@onlypreamble\declarebtxcommands
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\btxifchangecaseon}
+% \begin{macro}{\btxifchangecaseoff}
+% \changes{0.32}{2003/05/06}{Move change of case from bst to sty}%
+% The bst files write titles twice, first with changed case and second
+% with preserved case.
+% The macros \cs{btxifchangecaseon} and \cs{btxifchangecaseoff}
+% typeset one of these versions.
+% The languages append one of these commands to the
+% \cs{extras}\meta{language} commands.
+% \begin{macrocode}
+\newcommand*\btxifchangecaseon{%
+ \def\btxifchangecase{\@firstoftwo}%
+}%
+\newcommand*\btxifchangecaseoff{%
+ \def\btxifchangecase{\@secondoftwo}%
+}%
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \begin{macro}{\setbibliographyfont}
+% \changes{0.2}{2003/04/20}{Don't change the font commands directly
+% but use this command}%
+% Define |\setbibliographyfont| and |\setbibliographyfont*| that set
+% the font declared by the first argument |#1| to the second argument
+% |#2|.
+% The second argument has to be a macro with one argument, like
+% |\textbf|, |\emph|, |\textsc|, etc.
+% The normal version generates an error, if the internal command
+% |\btx#1font| is not defined.
+% The star version doesn't.
+% error.
+% \begin{macrocode}
+\newcommand\setbibliographyfont{%
+ \@ifnextchar*{\@@setbibliographyfont}{\@setbibliographyfont}%
+}
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\@setbibliographyfont}
+% \begin{macrocode}
+\newcommand\@setbibliographyfont[2]{%
+ \bbbbifundefined{btx#1font}{%
+ \PackageError{babelbib}{Bibliography font `#1' can't be set}{%
+ You have tried to define a font for the bibliographic element
+ \MessageBreak
+ `#1', which is unknown to babelbib}%
+ }{%
+ \expandafter\renewcommand\csname btx#1font\endcsname{#2}%
+ \typeout{babelbib: Bibliography font for `#1' changed.}%
+ }%
+}
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\@@setbibliographyfont}
+% The first argument is the |*| and ignored.
+% \begin{macrocode}
+\newcommand\@@setbibliographyfont[3]{%
+ \bbbbifundefined{btx#2font}{%
+ \expandafter\newcommand\csname btx#2font\endcsname{#3}%
+ \typeout{babelbib: Bibliography font for `#2' newly defined.}%
+ }{%
+ \expandafter\renewcommand\csname btx#2font\endcsname{#3}%
+ \typeout{babelbib: Bibliography font for `#2' changed.}%
+ }%
+}
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\providebibliographyfont}
+% \changes{0.2}{2003/04/20}{Added}%
+% Define |\providebibliographyfont| and |\providebibliographyfont*|
+% that do the same as |\setbibliographyfont| and
+% |\setbibliographyfont*|, but only, if |\setbibliographyfont| has not
+% been used for |#1|, before.
+% It is similar to |\providecommmand| which only defines that command
+% if it is undefined, before.
+% This command is intended to be used by the \BibTeX\ style, but can
+% also be used by the user.
+% \begin{macrocode}
+\newcommand\providebibliographyfont{%
+ \@ifnextchar*{\@@providebibliographyfont}{\@providebibliographyfont}%
+}
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\@providebibliographyfont}
+% \begin{macrocode}
+\newcommand\@providebibliographyfont[2]{%
+ \bbbbifundefined{btx#1font}{%
+ \PackageError{babelbib}{Bibliography font `#1' can't be set}{%
+ You have tried to define a font for the bibliographic element
+ \MessageBreak
+ `#1', which is unknown to babelbib}%
+ }{%
+ \expandafter\ifx\csname btx#1font\endcsname\@empty
+ \expandafter\renewcommand\csname btx#1font\endcsname{#2}%
+ \typeout{babelbib: Using the BibTeX style's default font for `#1'.}%
+ \else
+ \typeout{babelbib: Using user changed font for `#1'.}%
+ \fi
+ }%
+}
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\@@setbibliographyfont}
+% The first argument is the |*| and ignored.
+% \begin{macrocode}
+\newcommand\@@providebibliographyfont[3]{%
+ \bbbbifundefined{btx#2font}{%
+ \expandafter\newcommand\csname btx#2font\endcsname{#3}%
+ \typeout{babelbib: Using the BibTeX style's default font for `#2'.}%
+ }{%
+ \expandafter\ifx\csname btx#2font\endcsname\@empty
+ \expandafter\renewcommand\csname btx#2font\endcsname{#3}%
+ \typeout{babelbib: Using the BibTeX style's default font for `#2'.}%
+ \else
+ \typeout{babelbib: Using user changed font for `#2'.}%
+ \fi
+ }%
+}
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\btxnamefont}
+% \changes{0.32}{2003/05/06}{Add new font for journal names}%
+% \changes{1.12}{2005/06/19}{Add new font \cs{btxlastname} for last
+% names}%
+% Define the dummy commands for available fonts
+% \begin{macrocode}
+\newcommand*\btxnamefont{}
+\let\btxnamefont=\@empty
+\newcommand*\btxlastnamefont{}
+\let\btxlastnamefont=\@empty
+\newcommand\btxtitlefont{}
+\let\btxtitlefont=\@empty
+\newcommand\btxjtitlefont{}
+\let\btxjtitlefont=\@empty
+\newcommand\btxetalfont{}
+\let\btxetalfont=\@empty
+\newcommand\btxjournalfont{}
+\let\btxjournalfont=\@empty
+\newcommand\btxpublisherfont{}
+\let\btxpublisherfont=\@empty
+\newcommand\btxvolumefont{}
+\let\btxvolumefont=\@empty
+\newcommand\btxISBNfont{}
+\let\btxISBNfont=\@empty
+\newcommand\btxISSNfont{}
+\let\btxISSNfont=\@empty
+\newcommand\btxurlfont{}
+\let\btxurlfont=\@empty
+\newcommand\btxurldatefont{}
+\let\btxurldatefont=\@empty
+\newcommand\btxnumeralfont{}
+\let\btxnumeralfont=\@empty
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\btxauthorcolon}
+% \changes{0.2}{2003/04/20}{Added}%
+% Define |\btxauthorcolon| which defines the characters typeset after
+% the authors, if they are written before the title.
+% By default, it is a ``:''.
+% \begin{macrocode}
+\newcommand\btxauthorcolon{:}
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\btxISBN}
+% Define |\btxISBN| which outputs "`ISBN"' in a bibliography.
+% For example, it could be defined to |\textsc{isbn}| when old style
+% digits are used.
+% \begin{macrocode}
+\newcommand\btxISBN{ISBN}
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\btxISSN}
+% Define |\btxISSN| which outputs "`ISSN"' in a bibliography.
+% For example, it could be defined to |\textsc{issn}| when old style
+% digits are used.
+% \begin{macrocode}
+\newcommand\btxISSN{ISSN}
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\ifbtxprintISBN}
+% \begin{macro}{\ifbtxprintISSN}
+% These commands are used by the bibliography styles to typeset the
+% ISBN or ISSN only if wanted.
+% \begin{macrocode}
+\DeclareRobustCommand\ifbtxprintISBN[1]{\ifbtx@printISBN #1\fi}
+\DeclareRobustCommand\ifbtxprintISSN[1]{\ifbtx@printISSN #1\fi}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \begin{macro}{\btxprintISBN}
+% \begin{macro}{\btxprintISSN}
+% These macros are used to switch on or off printing of ISBN resp.\
+% ISSN.
+% Valid arguments are |true| and |false|.
+% \begin{macrocode}
+\newcommand*\btxprintISBN[1]{\csname btx@printISBN#1\endcsname}
+\newcommand*\btxprintISSN[1]{\csname btx@printISSN#1\endcsname}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \begin{macro}{\btxannotation}
+% A command that typesets annotations.
+% \begin{macrocode}
+\ifbbbbannotations
+ \DeclareRobustCommand\btxannotation[1]{%
+ \begin{quotation}%
+ \noindent
+ #1%
+ \end{quotation}%
+ }
+\else
+ \DeclareRobustCommand\btxannotation[1]{}%
+\fi
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\btx@ifnumerical}
+% Test wheather argument 1 is a number (from KOMA script)
+% \begin{macrocode}
+\providecommand\ifnumber[3]{%
+ \begingroup\@tempswafalse\let\scr@next\test@number
+ \expandafter\scr@next#1\scr@next
+ \if@tempswa\endgroup#2\else\endgroup#3\fi
+}
+\providecommand*\test@number[1]{%
+ \ifx \scr@next#1%
+ \let\scr@next\relax
+ \else
+ \@tempcnta=\expandafter\expandafter\expandafter\number
+ \expandafter`#1\relax
+ \ifnum \@tempcnta>47\relax
+ \ifnum \@tempcnta<58\relax
+ \@tempswatrue
+ \else\@tempswafalse\fi
+ \else\@tempswafalse\fi
+ \if@tempswa\else\let\scr@next\gobble@till@next\fi\fi
+ \scr@next
+}
+\def\gobble@till@next#1\scr@next{}
+% \end{macrocode}
+% \end{macro}
+% \changes{1.17}{2005/11/05}{Handle numerical edition numbers}%
+% \begin{macro}{\btx@parsenum}
+% Parses the number given by \cs{btx@parsenum}\meta{number}\cs{@empty}
+% prints it and returns the last two digits in \cs{btx@digita} and
+% \cs{btx@digitb}.
+% \begin{macrocode}
+\def\btx@parsenum#1#2#3\@empty{%
+ #1%
+ \edef\btx@digitb{#3}%
+ \ifx\@empty\btx@digitb
+ #2%
+ \edef\btx@digita{#1}%
+ \edef\btx@digitb{#2}%
+ \else
+ \expandafter\btx@parsenum#2#3\@empty
+ \fi
+}
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\btxnumeralfallback}
+% \begin{macrocode}
+\DeclareRobustCommand\btxnumeralfallback[2]{%
+ \foreignlanguage{#1}{%
+ \ifnumber{#2}{%
+ \PackageWarning{babelbib}{Handling of numerical editions not
+ handled\MessageBreak by language #1 for edition `#2'}%
+ }{}%
+ #2%
+ }%
+}%
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\btxnumeraldot}
+% \begin{macrocode}
+\DeclareRobustCommand\btxnumeraldot[2]{%
+ \foreignlanguage{#1}{\ifnumber{#2}{#2.}{#2}}%
+}
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\btxnumeralenglish}
+% \begin{macrocode}
+\DeclareRobustCommand\btxnumeralenglish[2]{%
+ \foreignlanguage{#1}{%
+ \ifnumber{#2}{%
+ \expandafter\btx@parsenum#2\@empty\@empty\@empty
+ \btxnumeralfont{%
+ \ifx\btx@digitb\@empty
+ \ifcase\btx@digita th\or st\or nd\or rd\else th\fi
+ \else
+ \ifnum\btx@digita=1
+ th%
+ \else
+ \ifcase\btx@digitb th\or st\or nd\or rd\else th\fi
+ \fi
+ \fi
+ }%
+ }{#2}%
+ }%
+}
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\btxnumeralromanian}
+% \changes{1.31}{2012/01/03}{Added Romanian numerals}%
+% \begin{macrocode}
+\newcounter{btxromaniannumeral}%
+\renewcommand\thebtxromaniannumeral{\Roman{btxromaniannumeral}}%
+\DeclareRobustCommand\btxnumeralromanian[2]{%
+ \foreignlanguage{#1}{%
+ \ifnumber{#2}{%
+ \setcounter{btxromaniannumeral}{#2}%
+ \ifcase#2 0\or \thebtxromaniannumeral\else a \thebtxromaniannumeral-a \fi
+ }{#2}%
+ }%
+}
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\btxnumeralswedish}
+% \changes{1.31}{2012/01/03}{Added Swedish numerals}%
+% \begin{macrocode}
+\DeclareRobustCommand\btxnumeralswedish[2]{%
+ \foreignlanguage{#1}{%
+ \ifnumber{#2}{%
+ \expandafter\btx@parsenum#2\@empty\@empty\@empty
+ \btxnumeralfont{%
+ \ifx\btx@digitb\@empty
+ \ifcase\btx@digita :e\or :a\or :a\or :e\else :e\fi
+ \else
+ \ifnum\btx@digita=1
+ :a%
+ \else
+ \ifcase\btx@digitb :e\or :a\or :a\or :e\else :e\fi
+ \fi
+ \fi
+ }%
+ }{#2}%
+ }%
+}
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\url}
+% \changes{0.40}{2003/09/26}{If no \cs{url} command is defined,
+% produce an error}%
+% \changes{0.2}{2003/04/20}{Added, if not available by another
+% package}%
+% Define |\url| which, by default, is used for URLs. Only necessary if
+% not provided by another package, e.\,g.\ |url.sty|.
+% \begin{macrocode}
+\AtBeginDocument{%
+ \providecommand\url[1]{%
+ \PackageError{babelbib}{No \string\url\space command defined but
+ field URL used\MessageBreak
+ in bibliography}{%
+ Please define a \string\url\space command for printing URLs
+ before \string\begin{document}, e.\,g.\MessageBreak
+ by loading the package `url.sty'.}%
+ \texttt{#1}%
+ }%
+}
+% \end{macrocode}
+% \end{macro}
+% Perform the following commands at |\begin{document}| in order to be
+% sure to do that after loading |babel|.
+% \begin{macrocode}
+\AtBeginDocument{%
+% \end{macrocode}
+% Load |babel| if that has not been done, yet.
+% \begin{macrocode}
+ \RequirePackage{babel}
+% \end{macrocode}
+% Input all know languages that babel has also loaded, before.
+% \changes{0.2}{2003/04/20}{Removed Italian from the list of
+% automatically found languages, since it is not complete, yet}%
+% \changes{0.31}{2003/05/01}{Added Italian to the list of automatically
+% found languages, again}%
+% \changes{0.34}{2003/07/28}{Added Afrikaans}%
+% \changes{0.41}{2003/11/03}{Added Norwegian (by Hans Fredrik Nordhaug)}%
+% \changes{1.00}{2005/02/16}{Renamed franceis to francais}%
+% \begin{macrocode}
+ \inputbdf{afrikaans}{afrikaans}
+ \inputbdf{american}{english}
+ \inputbdf{austrian}{german}
+ \inputbdf{bahasa}{bahasa}
+ \inputbdf{brazil}{portuguese}
+ \inputbdf{brazilian}{portuguese}
+ \inputbdf{british}{english}
+ \inputbdf{canadian}{english}
+ \inputbdf{canadien}{french}
+ \inputbdf{catalan}{catalan}
+ \inputbdf{croatian}{croatian}
+ \inputbdf{czech}{czech}
+ \inputbdf{danish}{danish}
+ \inputbdf{dutch}{dutch}
+ \inputbdf{english}{english}
+ \inputbdf{esperanto}{esperanto}
+ \inputbdf{finnish}{finnish}
+ \inputbdf{francais}{french}
+ \inputbdf{french}{french}
+ \inputbdf{frenchb}{french}
+ \inputbdf{galician}{galician}
+ \inputbdf{german}{german}
+ \inputbdf{germanb}{german}
+ \inputbdf{greek}{greek}
+ \inputbdf{italian}{italian}
+ \inputbdf{norsk}{norsk}
+ \inputbdf{mexican}{spanish}
+ \inputbdf{naustrian}{german}
+ \inputbdf{ngerman}{german}
+ \inputbdf{portuges}{portuguese}
+ \inputbdf{portuguese}{portuguese}
+ \inputbdf{romanian}{romanian}
+ \inputbdf{russian}{russian}
+ \inputbdf{russianb}{russian}
+ \inputbdf{serbian}{serbian}
+ \inputbdf{spanish}{spanish}
+ \inputbdf{swedish}{swedish}
+ \inputbdf{UKenglish}{english}
+ \inputbdf{USenglish}{english}
+% \end{macrocode}
+% Call |\bibs#1|, where |#1| stands for the main language of the
+% document, to activate the additional bibliographic commands.
+% \begin{macrocode}
+ \ifbbbbfixlanguage
+ \typeout{babelbib: Load BibTeX extensions
+ \string\bibs\bbl@main@language\space for \bbl@main@language}%
+ \selectbiblanguage{\bbl@main@language}%
+ \else
+ \expandafter\selectlanguage\expandafter{\bbl@main@language}%
+ \fi
+}
+%</package>
+% \end{macrocode}
+%
+% \subsection{The language definitions}
+%
+% \subsubsection{German}
+% \begin{macrocode}
+%<*german>
+% \end{macrocode}
+%
+% \begin{macro}{\bibsgerman}
+% Define |\bibsgerman| which itself defines all necessary expressions
+% used in bibliographies that differ in different languages.
+% This command is used for all German dialects.
+%
+% Since the language of the keywords may differ from the language of
+% the bibliography item, the keyword language is set for each keyword.
+% Because this command is also used for dialects, it has an optional
+% argument which is set to the dialect.
+% \begin{macrocode}
+\newcommand\bibsgerman[1][german]{%
+% \end{macrocode}
+% Define the command |\biblanguagename| that always returns the name
+% of the current language for bibliographies.
+% \begin{macrocode}
+ \def\biblanguagename{#1}%
+% \end{macrocode}
+% First, define all commands for usage within a sentence (which
+% normally start with a lowercase letter, if they aren't a noun).
+% These commands start with a lowercase letter.
+%
+% Many commands have an argument. This may be used by the bib\TeX\
+% styles to append a dot after abbreviations, e.\,g.\
+% |\btxetalshort{.}|.
+% \begin{macrocode}
+ \def\btxetalshort##1{\protect\foreignlanguage{#1}{et~al##1{}}}%
+ \def\btxetallong##1{\protect\foreignlanguage{#1}{et~alii}}%
+ \def\btxandshort##1{\protect\foreignlanguage{#1}{und}}%
+ \def\btxandlong##1{\protect\foreignlanguage{#1}{und}}%
+% \end{macrocode}
+% The command |\btxandcomma| contains a ``,'' if a comma is added
+% before the ``and'' in a list of more than two items.
+% For German, this is not the case.
+% \begin{macrocode}
+ \def\btxandcomma##1{}%
+ \def\btxinlong##1{\protect\foreignlanguage{#1}{in:}}%
+ \def\btxinshort##1{\protect\foreignlanguage{#1}{in:}}%
+ \def\btxofseriesshort##1{\protect\foreignlanguage{#1}{d.\ Reihe}}%
+ \def\btxinseriesshort##1{\protect\foreignlanguage{#1}{in}}%
+ \def\btxofserieslong##1{\protect\foreignlanguage{#1}{der Reihe}}%
+ \def\btxinserieslong##1{\protect\foreignlanguage{#1}{in}}%
+ \def\btxeditorshort##1{\protect\foreignlanguage{#1}{Hrsg##1{}}}%
+ \def\btxeditorlong##1{\protect\foreignlanguage{#1}{Herausgeber}}%
+ \def\btxeditorsshort##1{\protect\foreignlanguage{#1}{Hrsg##1{}}}%
+ \def\btxeditorslong##1{\protect\foreignlanguage{#1}{Herausgeber}}%
+ \def\btxvolumeshort##1{\protect\foreignlanguage{#1}{Bd##1{}}}%
+ \def\btxvolumelong##1{\protect\foreignlanguage{#1}{Band}}%
+ \def\btxnumbershort##1{\protect\foreignlanguage{#1}{Nr##1{}}}%
+ \def\btxnumberlong##1{\protect\foreignlanguage{#1}{Nummer}}%
+% \end{macrocode}
+% Avoid the ligature in
+% \foreignlanguage{ngerman}{"`Auf"|lage"'} in the same way, |babel|
+% does it.
+% This is a change in the behaviour to the |germbib| package.
+% In \foreignlanguage{ngerman}{"`Aufl"'} the ligature is still
+% used since this is done in abbreviations.
+% \begin{macrocode}
+ \def\btxeditionshort##1{\protect\foreignlanguage{#1}{Aufl##1{}}}%
+ \def\btxeditionlong##1{\protect\foreignlanguage{#1}{%
+ Auf\penalty10000\discretionary{-}{}{\kern.03em}%
+ \allowhyphens lage}}%
+ \def\btxeditionnumshort##1##2{\btxnumeralshort{##1}~\btxeditionshort{##2}}%
+ \def\btxeditionnumlong##1##2{\btxnumerallong{##1}~\btxeditionlong{##2}}%
+ \def\btxchaptershort##1{\protect\foreignlanguage{#1}{Kap##1{}}}%
+ \def\btxchapterlong##1{\protect\foreignlanguage{#1}{Kapitel}}%
+ \def\btxpageshort##1{\protect\foreignlanguage{#1}{S##1{}}}%
+ \def\btxpagelong##1{\protect\foreignlanguage{#1}{Seite}}%
+ \def\btxpagesshort##1{\protect\foreignlanguage{#1}{S##1{}}}%
+ \def\btxpageslong##1{\protect\foreignlanguage{#1}{Seiten}}%
+ \def\btxmastthesis##1{\protect\foreignlanguage{#1}{Diplomarbeit}}%
+% \end{macrocode}
+% Use \foreignlanguage{ngerman}{"`Dissertation"'} instead of
+% \foreignlanguage{ngerman}{"`Doktorarbeit"'} for PhD theses.
+% This is a change in the behaviour to the |germbib| package.
+% \begin{macrocode}
+ \def\btxphdthesis##1{\protect\foreignlanguage{#1}{Dissertation}}%
+ \def\btxtechrepshort##1{\protect\foreignlanguage{#1}{Techn.\ Ber##1{}}}%
+ \def\btxtechreplong##1{\protect\foreignlanguage{#1}{Technischer Bericht}}%
+ \def\btxmonjanlong##1{\protect\foreignlanguage{#1}{Januar}}%
+ \def\btxmonfeblong##1{\protect\foreignlanguage{#1}{Februar}}%
+ \def\btxmonmarlong##1{\protect\foreignlanguage{#1}{M\"arz}}%
+ \def\btxmonaprlong##1{\protect\foreignlanguage{#1}{April}}%
+ \def\btxmonmaylong##1{\protect\foreignlanguage{#1}{Mai}}%
+ \def\btxmonjunlong##1{\protect\foreignlanguage{#1}{Juni}}%
+ \def\btxmonjullong##1{\protect\foreignlanguage{#1}{Juli}}%
+ \def\btxmonauglong##1{\protect\foreignlanguage{#1}{August}}%
+ \def\btxmonseplong##1{\protect\foreignlanguage{#1}{September}}%
+ \def\btxmonoctlong##1{\protect\foreignlanguage{#1}{Oktober}}%
+ \def\btxmonnovlong##1{\protect\foreignlanguage{#1}{November}}%
+ \def\btxmondeclong##1{\protect\foreignlanguage{#1}{Dezember}}%
+ \def\btxmonjanshort##1{\protect\foreignlanguage{#1}{Jan##1{}}}%
+ \def\btxmonfebshort##1{\protect\foreignlanguage{#1}{Feb##1{}}}%
+ \def\btxmonmarshort##1{\protect\foreignlanguage{#1}{M\"arz}}%
+ \def\btxmonaprshort##1{\protect\foreignlanguage{#1}{Apr##1{}}}%
+ \def\btxmonmayshort##1{\protect\foreignlanguage{#1}{Mai}}%
+ \def\btxmonjunshort##1{\protect\foreignlanguage{#1}{Juni}}%
+ \def\btxmonjulshort##1{\protect\foreignlanguage{#1}{Juli}}%
+ \def\btxmonaugshort##1{\protect\foreignlanguage{#1}{Aug##1{}}}%
+ \def\btxmonsepshort##1{\protect\foreignlanguage{#1}{Sep##1{}}}%
+ \def\btxmonoctshort##1{\protect\foreignlanguage{#1}{Okt##1{}}}%
+ \def\btxmonnovshort##1{\protect\foreignlanguage{#1}{Nov##1{}}}%
+ \def\btxmondecshort##1{\protect\foreignlanguage{#1}{Dez##1{}}}%
+% \end{macrocode}
+% Then, define all commands for usage at the begin of a sentence
+% (which start with an uppercase letter).
+% These commands start with an uppercase letter.
+% Since, in German, many nouns are the same in the middle and at the
+% start of a sentence, the |\Btx| variants just call the |\btx|
+% variant.
+% \begin{macrocode}
+ \def\Btxinlong##1{\protect\foreignlanguage{#1}{In:}}%
+ \def\Btxinshort##1{\protect\foreignlanguage{#1}{In:}}%
+ \def\Btxeditorshort{\btxeditorshort}%
+ \def\Btxeditorlong{\btxeditorlong}%
+ \def\Btxeditorsshort{\btxeditorsshort}%
+ \def\Btxeditorslong{\btxeditorslong}%
+ \def\Btxvolumeshort{\btxvolumeshort}%
+ \def\Btxvolumelong{\btxvolumelong}%
+ \def\Btxnumbershort{\btxnumbershort}%
+ \def\Btxnumberlong{\btxnumberlong}%
+ \def\Btxeditionshort{\btxeditionshort}%
+ \def\Btxeditionlong{\btxeditionlong}%
+ \def\Btxeditionnumshort##1##2{\btxnumeralshort{##1}~\Btxeditionshort{##2}}%
+ \def\Btxeditionnumlong##1##2{\btxnumerallong{##1}~\Btxeditionlong{##2}}%
+ \def\Btxchaptershort{\btxchaptershort}%
+ \def\Btxchapterlong{\btxchapterlong}%
+ \def\Btxpageshort{\btxpageshort}%
+ \def\Btxpagelong{\btxpagelong}%
+ \def\Btxpagesshort{\btxpagesshort}%
+ \def\Btxpageslong{\btxpageslong}%
+ \def\Btxtechrepshort{\btxtechrepshort}%
+ \def\Btxtechreplong{\btxtechreplong}%
+ \def\btxurldatecomment##1{\protect\foreignlanguage{#1}{, besucht: ##1}}%
+% \end{macrocode}
+% \changes{1.16}{2005/10/31}{Allow to alter space between two
+% forenames}%
+% The command \cs{btxfnamespaceshort} and \cs{btxfnamespacelong}
+% contain the space between two abbreviated resp.\ full forenames.
+% \begin{macrocode}
+ \def\btxfnamespaceshort{\,}%
+ \def\btxfnamespacelong{ }%
+% \end{macrocode}
+% \changes{1.17}{2005/11/05}{Handle numerical edition numbers}%
+% Handle numerical edition numbers.
+% \begin{macrocode}
+ \def\btxnumeralshort##1{\btxnumeraldot{#1}{##1}}%
+ \def\btxnumerallong##1{\btxnumeraldot{#1}{##1}}%
+% \end{macrocode}
+% Define how to print month and year in numeric format, e.\,g. MM/YYYY.
+% \begin{macrocode}
+ \def\btxprintmonthyearnum##1##2{##1/##2}%
+% \end{macrocode}
+% A command that just puts some user defined text in the language of
+% the keywords.
+% \begin{macrocode}
+% \def\btxkeywordlanguage##1{\protect\foreignlanguage{#1}{##1}}%
+ \def\btxkeywordlanguage##1{{\protect\selectlanguage{#1}##1}}%
+% \end{macrocode}
+% \changes{0.2}{2003/04/20}{Added language names}%
+% Names of all known languages in the current language.
+% For example, used by |babamspl.bst|.
+% \begin{macrocode}
+ \ifbbbblanguagenames
+ \def\btxlanguagenameamerican{\protect\foreignlanguage{#1}{englisch}}%
+ \def\btxlanguagenameaustrian{\protect\foreignlanguage{#1}{deutsch}}%
+ \def\btxlanguagenamebrazil{\protect\foreignlanguage{#1}{portugiesisch}}%
+ \def\btxlanguagenamebrazilian{\protect\foreignlanguage{#1}{portugiesisch}}%
+ \def\btxlanguagenamebritish{\protect\foreignlanguage{#1}{englisch}}%
+ \def\btxlanguagenamebulgarian{\protect\foreignlanguage{#1}{bulgarisch}}%
+ \def\btxlanguagenamecanadian{\protect\foreignlanguage{#1}{englisch}}%
+ \def\btxlanguagenamecanadien{\protect\foreignlanguage{#1}{franz\"osisch}}%
+ \def\btxlanguagenamecatalan{\protect\foreignlanguage{#1}{katalanisch}}%
+ \def\btxlanguagenamecroatian{\protect\foreignlanguage{#1}{kroatisch}}%
+ \def\btxlanguagenameczech{\protect\foreignlanguage{#1}{tschechisch}}%
+ \def\btxlanguagenamedanish{\protect\foreignlanguage{#1}{d\"anisch}}%
+ \def\btxlanguagenamedutch{\protect\foreignlanguage{#1}{niederl\"andisch}}%
+ \def\btxlanguagenameenglish{\protect\foreignlanguage{#1}{englisch}}%
+ \def\btxlanguagenameesperanto{\protect\foreignlanguage{#1}{esperanto}}%
+ \def\btxlanguagenamefinnish{\protect\foreignlanguage{#1}{finnisch}}%
+ \def\btxlanguagenamefrancais{\protect\foreignlanguage{#1}{franz\"osisch}}%
+ \def\btxlanguagenamefrench{\protect\foreignlanguage{#1}{franz\"osisch}}%
+ \def\btxlanguagenamefrenchb{\protect\foreignlanguage{#1}{franz\"osisch}}%
+ \def\btxlanguagenamegerman{\protect\foreignlanguage{#1}{deutsch}}%
+ \def\btxlanguagenamegermanb{\protect\foreignlanguage{#1}{deutsch}}%
+ \def\btxlanguagenamegreek{\protect\foreignlanguage{#1}{griechisch}}%
+ \def\btxlanguagenamehebrew{\protect\foreignlanguage{#1}{hebr\"aisch}}%
+ \def\btxlanguagenamehungarian{\protect\foreignlanguage{#1}{ungarisch}}%
+ \def\btxlanguagenameicelandic{\protect\foreignlanguage{#1}{isl\"andisch}}%
+ \def\btxlanguagenameirish{\protect\foreignlanguage{#1}{irisch}}%
+ \def\btxlanguagenameitalian{\protect\foreignlanguage{#1}{italienisch}}%
+ \def\btxlanguagenamelatin{\protect\foreignlanguage{#1}{lateinisch}}%
+ \def\btxlanguagenamenaustrian{\protect\foreignlanguage{#1}{deutsch}}%
+ \def\btxlanguagenamengerman{\protect\foreignlanguage{#1}{deutsch}}%
+ \def\btxlanguagenamenorsk{\protect\foreignlanguage{#1}{norwegisch}}%
+ \def\btxlanguagenamenynorsk{\protect\foreignlanguage{#1}{neunorwegisch}}%
+ \def\btxlanguagenamepolish{\protect\foreignlanguage{#1}{polnisch}}%
+ \def\btxlanguagenameportuges{\protect\foreignlanguage{#1}{portugiesisch}}%
+ \def\btxlanguagenameportuguese{\protect\foreignlanguage{#1}{portugiesisch}}%
+ \def\btxlanguagenamerussian{\protect\foreignlanguage{#1}{russisch}}%
+ \def\btxlanguagenamescottish{\protect\foreignlanguage{#1}{schottisch}}%
+ \def\btxlanguagenameserbian{\protect\foreignlanguage{#1}{serbisch}}%
+ \def\btxlanguagenamespanish{\protect\foreignlanguage{#1}{spanisch}}%
+ \def\btxlanguagenameswedish{\protect\foreignlanguage{#1}{schwedisch}}%
+ \def\btxlanguagenameturkish{\protect\foreignlanguage{#1}{t\"urkisch}}%
+ \def\btxlanguagenameUKenglish{\protect\foreignlanguage{#1}{englisch}}%
+ \def\btxlanguagenameUSenglish{\protect\foreignlanguage{#1}{englisch}}%
+ \fi
+}
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\bibsgermanb}
+% Do the same for the language ``germanb''. Since there is no
+% difference, just call |\bibsgerman|.
+% \begin{macrocode}
+\newcommand\bibsgermanb{\bibsgerman}
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\bibsngerman}
+% Do the same for German with new ortography. Call |\bibsgerman| with
+% new hyphenation patterns.
+% \begin{macrocode}
+\newcommand\bibsngerman[1][ngerman]{\bibsgerman[#1]}
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\bibsaustrian}
+% Once again. Austrians use \foreignlanguage{ngerman}{"`J\"anner"'}
+% instead of \foreignlanguage{ngerman}{"`Januar"'}. Thus, redefine the
+% corresponding command.
+% \begin{macrocode}
+\newcommand\bibsaustrian[1][austrian]{%
+ \bibsgerman[#1]%
+ \def\btxmonjanlong##1{\protect\foreignlanguage{#1}{J\"anner}}%
+ \def\btxmonjanshort##1{\protect\foreignlanguage{#1}{J\"an##1{}}}%
+}
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\bibsnaustrian}
+% New Austrian is the same as Austrian.
+% \begin{macrocode}
+\newcommand\bibsnaustrian[1][naustrian]{%
+ \bibsngerman[#1]%
+ \def\btxmonjanlong##1{\protect\foreignlanguage{#1}{J\"anner}}%
+ \def\btxmonjanshort##1{\protect\foreignlanguage{#1}{J\"an##1{}}}%
+}
+% \end{macrocode}
+% \end{macro}
+% The rest has to be executed after loading |babel.sty|, because the
+% |\extra...| commands have to be defined for all used languages.
+% \begin{macrocode}
+\AtBeginDocument{%
+% \end{macrocode}
+% If the language is fixed, do nothing.
+% \begin{macrocode}
+ \ifbbbbfixlanguage
+ \else
+% \end{macrocode}
+% Append the corresponding |\#2| command to each used language,
+% namely |\extras#1|.
+% \begin{macrocode}
+ \bbbbaddto{austrian}{bibsaustrian}
+ \bbbbaddto{german}{bibsgerman}
+ \bbbbaddto{germanb}{bibsgermanb}
+ \bbbbaddto{naustrian}{bibsnaustrian}
+ \bbbbaddto{ngerman}{bibsngerman}
+ \fi
+% \end{macrocode}
+% \changes{0.32}{2003/05/06}{Move change of case from bst to sty}%
+% Switch off the change of case in titles for all German dialects by
+% appending \cs{btxifchangecaseoff} to \cs{extras}\meta{language}.
+% \begin{macrocode}
+ \bbbbaddto{austrian}{btxifchangecaseoff}
+ \bbbbaddto{german}{btxifchangecaseoff}
+ \bbbbaddto{germanb}{btxifchangecaseoff}
+ \bbbbaddto{naustrian}{btxifchangecaseoff}
+ \bbbbaddto{ngerman}{btxifchangecaseoff}
+}
+%</german>
+% \end{macrocode}
+%
+% \subsubsection{Galician}
+% \changes{1.26}{2009/06/17}{Added Galician language}%
+% \begin{macrocode}
+%<*galician>
+% \end{macrocode}
+%
+% The language definition for Galician was provided by Miguel
+% Rodr{\'\i}guez Penabad.
+%
+% \begin{macro}{\bibsgalician}
+% Bibliographic commands for Galician.
+% \begin{macrocode}
+\newcommand\bibsgalician[1][galician]{%
+ \def\biblanguagename{#1}%
+ \def\btxetalshort##1{\protect\foreignlanguage{#1}{e~cols##1{}}}%
+ \def\btxetallong##1{\protect\foreignlanguage{#1}{e~colaboradores}}%
+ \def\btxandshort##1{\protect\foreignlanguage{#1}{e}}%
+ \def\btxandlong##1{\protect\foreignlanguage{#1}{e}}%
+ \def\btxandcomma##1{}%
+ \def\btxinlong##1{\protect\foreignlanguage{#1}{en}}%
+ \def\btxinshort##1{\protect\foreignlanguage{#1}{en}}%
+ \def\btxofseriesshort##1{\protect\foreignlanguage{#1}{de}}%
+ \def\btxinseriesshort##1{\protect\foreignlanguage{#1}{en}}%
+ \def\btxofserieslong##1{\protect\foreignlanguage{#1}{de}}%
+ \def\btxinserieslong##1{\protect\foreignlanguage{#1}{en}}%
+ \def\btxeditorshort##1{\protect\foreignlanguage{#1}{ed##1{}}}%
+ \def\btxeditorlong##1{\protect\foreignlanguage{#1}{editor}}%
+ \def\btxeditorsshort##1{\protect\foreignlanguage{#1}{eds##1{}}}%
+ \def\btxeditorslong##1{\protect\foreignlanguage{#1}{editores}}%
+ \def\btxvolumeshort##1{\protect\foreignlanguage{#1}{vol##1{}}}%
+ \def\btxvolumelong##1{\protect\foreignlanguage{#1}{volume}}%
+ \def\btxnumbershort##1{\protect\foreignlanguage{#1}{%
+ n\textsuperscript{\underline{o}}}}%
+ \def\btxnumberlong##1{\protect\foreignlanguage{#1}{n\'umero}}%
+ \def\btxeditionshort##1{\protect\foreignlanguage{#1}{ed##1{}}}%
+ \def\btxeditionlong##1{\protect\foreignlanguage{#1}{edici\'{o}n}}%
+ \def\btxeditionnumshort##1##2{\btxnumeralshort{##1}~\btxeditionshort{##2}}%
+ \def\btxeditionnumlong##1##2{\btxnumerallong{##1}~\btxeditionlong{##2}}%
+ \def\btxchaptershort##1{\protect\foreignlanguage{#1}{cap##1{}}}%
+ \def\btxchapterlong##1{\protect\foreignlanguage{#1}{cap{\'\i}tulo}}%
+ \def\btxpageshort##1{\protect\foreignlanguage{#1}{p\'ax##1{}}}%
+ \def\btxpagelong##1{\protect\foreignlanguage{#1}{p\'axina}}%
+ \def\btxpagesshort##1{\protect\foreignlanguage{#1}{p\'axs##1{}}}%
+ \def\btxpageslong##1{\protect\foreignlanguage{#1}{p\'axinas}}%
+ \def\btxmastthesis##1{\protect\foreignlanguage{#1}{Tese de Licenciatura}}%
+ \def\btxphdthesis##1{\protect\foreignlanguage{#1}{Tese de Doutoramento}}%
+ \def\btxtechrepshort##1{\protect\foreignlanguage{#1}{Informe t\'ecnico##1{}}}%
+ \def\btxtechreplong##1{\protect\foreignlanguage{#1}{Informe t\'ecnico}}%
+ \def\btxmonjanlong##1{\protect\foreignlanguage{#1}{Xaneiro}}%
+ \def\btxmonfeblong##1{\protect\foreignlanguage{#1}{Febreiro}}%
+ \def\btxmonmarlong##1{\protect\foreignlanguage{#1}{Marzo}}%
+ \def\btxmonaprlong##1{\protect\foreignlanguage{#1}{Abril}}%
+ \def\btxmonmaylong##1{\protect\foreignlanguage{#1}{Maio}}%
+ \def\btxmonjunlong##1{\protect\foreignlanguage{#1}{Xu\~no}}%
+ \def\btxmonjullong##1{\protect\foreignlanguage{#1}{Xullo}}%
+ \def\btxmonauglong##1{\protect\foreignlanguage{#1}{Agosto}}%
+ \def\btxmonseplong##1{\protect\foreignlanguage{#1}{Setembro}}%
+ \def\btxmonoctlong##1{\protect\foreignlanguage{#1}{Outubro}}%
+ \def\btxmonnovlong##1{\protect\foreignlanguage{#1}{Novembro}}%
+ \def\btxmondeclong##1{\protect\foreignlanguage{#1}{Decembro}}%
+ \def\btxmonjanshort##1{\protect\foreignlanguage{#1}{Xan##1{}}}%
+ \def\btxmonfebshort##1{\protect\foreignlanguage{#1}{Feb##1{}}}%
+ \def\btxmonmarshort##1{\protect\foreignlanguage{#1}{Mar##1{}}}%
+ \def\btxmonaprshort##1{\protect\foreignlanguage{#1}{Abr##1{}}}%
+ \def\btxmonmayshort##1{\protect\foreignlanguage{#1}{Mai}}%
+ \def\btxmonjunshort##1{\protect\foreignlanguage{#1}{Xu\~n}}%
+ \def\btxmonjulshort##1{\protect\foreignlanguage{#1}{Xul}}%
+ \def\btxmonaugshort##1{\protect\foreignlanguage{#1}{Ago##1{}}}%
+ \def\btxmonsepshort##1{\protect\foreignlanguage{#1}{Set##1{}}}%
+ \def\btxmonoctshort##1{\protect\foreignlanguage{#1}{Out##1{}}}%
+ \def\btxmonnovshort##1{\protect\foreignlanguage{#1}{Nov##1{}}}%
+ \def\btxmondecshort##1{\protect\foreignlanguage{#1}{Dec##1{}}}%
+ \def\Btxinlong##1{\protect\foreignlanguage{#1}{En}}%
+ \def\Btxinshort##1{\protect\foreignlanguage{#1}{En}}%
+ \def\Btxeditorshort##1{\protect\foreignlanguage{#1}{Ed##1{}}}%
+ \def\Btxeditorlong##1{\protect\foreignlanguage{#1}{Editor}}%
+ \def\Btxeditorsshort##1{\protect\foreignlanguage{#1}{Ed##1{}}}%
+ \def\Btxeditorslong##1{\protect\foreignlanguage{#1}{Editores}}%
+ \def\Btxvolumeshort##1{\protect\foreignlanguage{#1}{Vol##1{}}}%
+ \def\Btxvolumelong##1{\protect\foreignlanguage{#1}{Volume}}%
+ \def\Btxnumbershort##1{\protect\foreignlanguage{#1}{%
+ N\textsuperscript{\underline{o}}}}%
+ \def\Btxnumberlong##1{\protect\foreignlanguage{#1}{N\'umero}}%
+ \def\Btxeditionshort##1{\protect\foreignlanguage{#1}{Ed##1{}}}%
+ \def\Btxeditionlong##1{\protect\foreignlanguage{#1}{Edici\'on}}%
+ \def\Btxeditionnumshort##1##2{\btxnumeralshort{##1}~\Btxeditionshort{##2}}%
+ \def\Btxeditionnumlong##1##2{\btxnumerallong{##1}~\Btxeditionlong{##2}}%
+ \def\Btxchaptershort##1{\protect\foreignlanguage{#1}{Cap##1{}}}%
+ \def\Btxchapterlong##1{\protect\foreignlanguage{#1}{Cap\'\itulo}}%
+ \def\Btxpageshort##1{\protect\foreignlanguage{#1}{P\'ax##1{}}}%
+ \def\Btxpagelong##1{\protect\foreignlanguage{#1}{P\'axina}}%
+ \def\Btxpagesshort##1{\protect\foreignlanguage{#1}{P\'axs##1{}}}%
+ \def\Btxpageslong##1{\protect\foreignlanguage{#1}{P\'axinas}}%
+ \def\Btxtechrepshort##1{\protect\foreignlanguage{#1}{Informe t\'ecnico}}%
+ \def\Btxtechreplong##1{\protect\foreignlanguage{#1}{Informe t\'ecnico}}%
+ \def\btxurldatecomment##1{\protect\foreignlanguage{#1}{, visitado o ##1}}%
+ \def\btxfnamespaceshort{\,}%
+ \def\btxfnamespacelong{ }%
+ \def\btxnumeralshort##1{\protect\foreignlanguage{#1}{%
+ \ifnumber{##1}{##1\textsuperscript{a}}{##1}}}%
+ \def\btxnumerallong##1{\btxnumeralshort{##1}}%
+% \end{macrocode}
+% Define how to print month and year in numeric format, e.\,g. MM/YYYY.
+% \begin{macrocode}
+ \def\btxprintmonthyearnum##1##2{##1/##2}%
+ \def\btxkeywordlanguage##1{{\protect\selectlanguage{#1}##1}}%
+ \ifbbbblanguagenames
+ \def\btxlanguagenameamerican{\protect\foreignlanguage{#1}{ingl\'es}}%
+ \def\btxlanguagenameaustrian{\protect\foreignlanguage{#1}{alem\'an}}%
+ \def\btxlanguagenamebrazil{\protect\foreignlanguage{#1}{portugu\'es}}%
+ \def\btxlanguagenamebrazilian{\protect\foreignlanguage{#1}{portugu\'es}}%
+ \def\btxlanguagenamebritish{\protect\foreignlanguage{#1}{ingl\'es}}%
+ \def\btxlanguagenamebulgarian{\protect\foreignlanguage{#1}{b\'ulgaro}}%
+ \def\btxlanguagenamecanadian{\protect\foreignlanguage{#1}{ingl\'es}}%
+ \def\btxlanguagenamecanadien{\protect\foreignlanguage{#1}{franc\'es}}%
+ \def\btxlanguagenamecatalan{\protect\foreignlanguage{#1}{catal\'an}}%
+ \def\btxlanguagenamecroatian{\protect\foreignlanguage{#1}{croata}}%
+ \def\btxlanguagenameczech{\protect\foreignlanguage{#1}{checo}}%
+ \def\btxlanguagenamedanish{\protect\foreignlanguage{#1}{dan\'es}}%
+ \def\btxlanguagenamedutch{\protect\foreignlanguage{#1}{holand\'es}}%
+ \def\btxlanguagenameenglish{\protect\foreignlanguage{#1}{ingl\'es}}%
+ \def\btxlanguagenameesperanto{\protect\foreignlanguage{#1}{esperanto}}%
+ \def\btxlanguagenamefinnish{\protect\foreignlanguage{#1}{finland\'es}}%
+ \def\btxlanguagenamefrancais{\protect\foreignlanguage{#1}{franc\'es}}%
+ \def\btxlanguagenamefrench{\protect\foreignlanguage{#1}{franc\'es}}%
+ \def\btxlanguagenamefrenchb{\protect\foreignlanguage{#1}{franc\'es}}%
+ \def\btxlanguagenamegerman{\protect\foreignlanguage{#1}{alem\'an}}%
+ \def\btxlanguagenamegermanb{\protect\foreignlanguage{#1}{alem\'an}}%
+ \def\btxlanguagenamegreek{\protect\foreignlanguage{#1}{grego}}%
+ \def\btxlanguagenamehebrew{\protect\foreignlanguage{#1}{hebreo}}%
+ \def\btxlanguagenamehungarian{\protect\foreignlanguage{#1}{h\'ungaro}}%
+ \def\btxlanguagenameicelandic{\protect\foreignlanguage{#1}{island\'es}}%
+ \def\btxlanguagenameirish{\protect\foreignlanguage{#1}{irland\'es}}%
+ \def\btxlanguagenameitalian{\protect\foreignlanguage{#1}{italiano}}%
+ \def\btxlanguagenamelatin{\protect\foreignlanguage{#1}{lat\'\i n}}%
+ \def\btxlanguagenamenaustrian{\protect\foreignlanguage{#1}{alem\'an}}%
+ \def\btxlanguagenamengerman{\protect\foreignlanguage{#1}{alem\'an}}%
+ \def\btxlanguagenamenorsk{\protect\foreignlanguage{#1}{noruego}}%
+ \def\btxlanguagenamenynorsk{\protect\foreignlanguage{#1}{noruego}}%
+ \def\btxlanguagenamepolish{\protect\foreignlanguage{#1}{polaco}}%
+ \def\btxlanguagenameportuges{\protect\foreignlanguage{#1}{portugu\'es}}%
+ \def\btxlanguagenameportuguese{\protect\foreignlanguage{#1}{portugu\'es}}%
+ \def\btxlanguagenamerussian{\protect\foreignlanguage{#1}{ruso}}%
+ \def\btxlanguagenamescottish{\protect\foreignlanguage{#1}{escoc\'es}}%
+ \def\btxlanguagenameserbian{\protect\foreignlanguage{#1}{serbio}}%
+ \def\btxlanguagenamespanish{\protect\foreignlanguage{#1}{espa\~nol}}%
+ \def\btxlanguagenameswedish{\protect\foreignlanguage{#1}{sueco}}%
+ \def\btxlanguagenameturkish{\protect\foreignlanguage{#1}{turco}}%
+ \def\btxlanguagenameUKenglish{\protect\foreignlanguage{#1}{ingl\'es}}%
+ \def\btxlanguagenameUSenglish{\protect\foreignlanguage{#1}{ingl\'es}}%
+ \fi
+}
+% \end{macrocode}
+% \end{macro}
+% Append the definitions to the language-calling commands.
+% \begin{macrocode}
+\AtBeginDocument{%
+ \ifbbbbfixlanguage
+ \else
+ \bbbbaddto{galician}{bibsgalician}
+ \fi
+ \bbbbaddto{galician}{btxifchangecaseoff}
+}
+%</galician>
+% \end{macrocode}
+%
+% \subsubsection{English}
+% \begin{macrocode}
+%<*english>
+% \end{macrocode}
+%
+% The language definition for English is mostly the same as the German
+% one. Therefore, it is not described in detail, again.
+%
+% \begin{macro}{\bibsenglish}
+% \changes{1.00}{2005/02/16}{Handle package \texttt{frenchpro}}%
+% |french.sty| already defines \cs{bibsenglish}.
+% In this case it has to be redefined, otherwise newly defined.
+% \begin{macrocode}
+\makeatletter
+\@ifpackageloaded{french}{}{\newcommand\bibsenglish{}}
+\makeatother
+% \end{macrocode}
+% \changes{0.2}{2003/04/20}{Changed some abbreviations}%
+% Bibliographic commands for English.
+% \begin{macrocode}
+\renewcommand\bibsenglish[1][english]{%
+ \def\biblanguagename{#1}%
+ \def\btxetalshort##1{\protect\foreignlanguage{#1}{et~al##1{}}}%
+ \def\btxetallong##1{\protect\foreignlanguage{#1}{et~alii}}%
+ \def\btxandshort##1{\protect\foreignlanguage{#1}{and}}%
+ \def\btxandlong##1{\protect\foreignlanguage{#1}{and}}%
+ \def\btxandcomma##1{,}%
+ \def\btxinlong##1{\protect\foreignlanguage{#1}{in}}%
+ \def\btxinshort##1{\protect\foreignlanguage{#1}{in}}%
+ \def\btxofseriesshort##1{\protect\foreignlanguage{#1}{of}}%
+ \def\btxinseriesshort##1{\protect\foreignlanguage{#1}{in}}%
+ \def\btxofserieslong##1{\protect\foreignlanguage{#1}{of}}%
+ \def\btxinserieslong##1{\protect\foreignlanguage{#1}{in}}%
+ \def\btxeditorshort##1{\protect\foreignlanguage{#1}{ed##1{}}}%
+ \def\btxeditorlong##1{\protect\foreignlanguage{#1}{editor}}%
+ \def\btxeditorsshort##1{\protect\foreignlanguage{#1}{eds##1{}}}%
+ \def\btxeditorslong##1{\protect\foreignlanguage{#1}{editors}}%
+ \def\btxvolumeshort##1{\protect\foreignlanguage{#1}{vol##1{}}}%
+ \def\btxvolumelong##1{\protect\foreignlanguage{#1}{volume}}%
+ \def\btxnumbershort##1{\protect\foreignlanguage{#1}{no##1{}}}%
+ \def\btxnumberlong##1{\protect\foreignlanguage{#1}{number}}%
+ \def\btxeditionshort##1{\protect\foreignlanguage{#1}{ed##1{}}}%
+ \def\btxeditionlong##1{\protect\foreignlanguage{#1}{edition}}%
+ \def\btxeditionnumshort##1##2{\btxnumeralshort{##1}~\btxeditionshort{##2}}%
+ \def\btxeditionnumlong##1##2{\btxnumerallong{##1}~\btxeditionlong{##2}}%
+ \def\btxchaptershort##1{\protect\foreignlanguage{#1}{ch##1{}}}%
+ \def\btxchapterlong##1{\protect\foreignlanguage{#1}{chapter}}%
+ \def\btxpageshort##1{\protect\foreignlanguage{#1}{p##1{}}}%
+ \def\btxpagelong##1{\protect\foreignlanguage{#1}{page}}%
+ \def\btxpagesshort##1{\protect\foreignlanguage{#1}{pp##1{}}}%
+ \def\btxpageslong##1{\protect\foreignlanguage{#1}{pages}}%
+ \def\btxmastthesis##1{\protect\foreignlanguage{#1}{Master's thesis}}%
+ \def\btxphdthesis##1{\protect\foreignlanguage{#1}{PhD thesis}}%
+ \def\btxtechrepshort##1{\protect\foreignlanguage{#1}{Techn.\ rep##1{}}}%
+ \def\btxtechreplong##1{\protect\foreignlanguage{#1}{Technical report}}%
+ \def\btxmonjanlong##1{\protect\foreignlanguage{#1}{January}}%
+ \def\btxmonfeblong##1{\protect\foreignlanguage{#1}{February}}%
+ \def\btxmonmarlong##1{\protect\foreignlanguage{#1}{March}}%
+ \def\btxmonaprlong##1{\protect\foreignlanguage{#1}{April}}%
+ \def\btxmonmaylong##1{\protect\foreignlanguage{#1}{May}}%
+ \def\btxmonjunlong##1{\protect\foreignlanguage{#1}{June}}%
+ \def\btxmonjullong##1{\protect\foreignlanguage{#1}{July}}%
+ \def\btxmonauglong##1{\protect\foreignlanguage{#1}{August}}%
+ \def\btxmonseplong##1{\protect\foreignlanguage{#1}{September}}%
+ \def\btxmonoctlong##1{\protect\foreignlanguage{#1}{October}}%
+ \def\btxmonnovlong##1{\protect\foreignlanguage{#1}{November}}%
+ \def\btxmondeclong##1{\protect\foreignlanguage{#1}{December}}%
+ \def\btxmonjanshort##1{\protect\foreignlanguage{#1}{Jan##1{}}}%
+ \def\btxmonfebshort##1{\protect\foreignlanguage{#1}{Feb##1{}}}%
+ \def\btxmonmarshort##1{\protect\foreignlanguage{#1}{Mar##1{}}}%
+ \def\btxmonaprshort##1{\protect\foreignlanguage{#1}{Apr##1{}}}%
+ \def\btxmonmayshort##1{\protect\foreignlanguage{#1}{May}}%
+ \def\btxmonjunshort##1{\protect\foreignlanguage{#1}{June}}%
+ \def\btxmonjulshort##1{\protect\foreignlanguage{#1}{July}}%
+ \def\btxmonaugshort##1{\protect\foreignlanguage{#1}{Aug##1{}}}%
+ \def\btxmonsepshort##1{\protect\foreignlanguage{#1}{Sept##1{}}}%
+ \def\btxmonoctshort##1{\protect\foreignlanguage{#1}{Oct##1{}}}%
+ \def\btxmonnovshort##1{\protect\foreignlanguage{#1}{Nov##1{}}}%
+ \def\btxmondecshort##1{\protect\foreignlanguage{#1}{Dec##1{}}}%
+ \def\Btxinlong##1{\protect\foreignlanguage{#1}{In}}%
+ \def\Btxinshort##1{\protect\foreignlanguage{#1}{In}}%
+ \def\Btxeditorshort##1{\protect\foreignlanguage{#1}{Ed##1{}}}%
+ \def\Btxeditorlong##1{\protect\foreignlanguage{#1}{Editor}}%
+ \def\Btxeditorsshort##1{\protect\foreignlanguage{#1}{Eds##1{}}}%
+ \def\Btxeditorslong##1{\protect\foreignlanguage{#1}{Editors}}%
+ \def\Btxvolumeshort##1{\protect\foreignlanguage{#1}{Vol##1{}}}%
+ \def\Btxvolumelong##1{\protect\foreignlanguage{#1}{Volume}}%
+ \def\Btxnumbershort##1{\protect\foreignlanguage{#1}{No##1{}}}%
+ \def\Btxnumberlong##1{\protect\foreignlanguage{#1}{Number}}%
+ \def\Btxeditionshort##1{\protect\foreignlanguage{#1}{Ed##1{}}}%
+ \def\Btxeditionlong##1{\protect\foreignlanguage{#1}{Edition}}%
+ \def\Btxeditionnumshort##1##2{\btxnumeralshort{##1}~\Btxeditionshort{##2}}%
+ \def\Btxeditionnumlong##1##2{\btxnumerallong{##1}~\Btxeditionlong{##2}}%
+ \def\Btxchaptershort##1{\protect\foreignlanguage{#1}{Ch##1{}}}%
+ \def\Btxchapterlong##1{\protect\foreignlanguage{#1}{Chapter}}%
+ \def\Btxpageshort##1{\protect\foreignlanguage{#1}{P##1{}}}%
+ \def\Btxpagelong##1{\protect\foreignlanguage{#1}{Page}}%
+ \def\Btxpagesshort##1{\protect\foreignlanguage{#1}{Pp##1{}}}%
+ \def\Btxpageslong##1{\protect\foreignlanguage{#1}{Pages}}%
+ \def\Btxtechrepshort##1{\protect\foreignlanguage{#1}{Tech.\ Rep##1{}}}%
+ \def\Btxtechreplong##1{\protect\foreignlanguage{#1}{Technical Report}}%
+ \def\btxurldatecomment##1{\protect\foreignlanguage{#1}{, visited on ##1}}%
+ \def\btxfnamespaceshort{}%
+ \def\btxfnamespacelong{ }%
+ \def\btxnumeralshort##1{\btxnumeralenglish{#1}{##1}}%
+ \def\btxnumerallong##1{\btxnumeralenglish{#1}{##1}}%
+% \end{macrocode}
+% Define how to print month and year in numeric format, e.\,g. MM/YYYY.
+% \begin{macrocode}
+ \def\btxprintmonthyearnum##1##2{##1/##2}%
+ \def\btxkeywordlanguage##1{{\protect\selectlanguage{#1}##1}}%
+% \end{macrocode}
+% \changes{0.2}{2003/04/20}{Added language names}%
+% Names of all known languages in the current language.
+% \begin{macrocode}
+ \ifbbbblanguagenames
+ \def\btxlanguagenameamerican{\protect\foreignlanguage{#1}{english}}%
+ \def\btxlanguagenameaustrian{\protect\foreignlanguage{#1}{german}}%
+ \def\btxlanguagenamebrazil{\protect\foreignlanguage{#1}{portuguese}}%
+ \def\btxlanguagenamebrazilian{\protect\foreignlanguage{#1}{portuguese}}%
+ \def\btxlanguagenamebritish{\protect\foreignlanguage{#1}{english}}%
+ \def\btxlanguagenamebulgarian{\protect\foreignlanguage{#1}{bulgarian}}%
+ \def\btxlanguagenamecanadian{\protect\foreignlanguage{#1}{english}}%
+ \def\btxlanguagenamecanadien{\protect\foreignlanguage{#1}{french}}%
+ \def\btxlanguagenamecatalan{\protect\foreignlanguage{#1}{catalan}}%
+ \def\btxlanguagenamecroatian{\protect\foreignlanguage{#1}{croatian}}%
+ \def\btxlanguagenameczech{\protect\foreignlanguage{#1}{czech}}%
+ \def\btxlanguagenamedanish{\protect\foreignlanguage{#1}{danish}}%
+ \def\btxlanguagenamedutch{\protect\foreignlanguage{#1}{dutch}}%
+ \def\btxlanguagenameenglish{\protect\foreignlanguage{#1}{english}}%
+ \def\btxlanguagenameesperanto{\protect\foreignlanguage{#1}{esperanto}}%
+ \def\btxlanguagenamefinnish{\protect\foreignlanguage{#1}{finnish}}%
+ \def\btxlanguagenamefrancais{\protect\foreignlanguage{#1}{french}}%
+ \def\btxlanguagenamefrench{\protect\foreignlanguage{#1}{french}}%
+ \def\btxlanguagenamefrenchb{\protect\foreignlanguage{#1}{french}}%
+ \def\btxlanguagenamegerman{\protect\foreignlanguage{#1}{german}}%
+ \def\btxlanguagenamegermanb{\protect\foreignlanguage{#1}{german}}%
+ \def\btxlanguagenamegreek{\protect\foreignlanguage{#1}{greek}}%
+ \def\btxlanguagenamehebrew{\protect\foreignlanguage{#1}{hebrew}}%
+ \def\btxlanguagenamehungarian{\protect\foreignlanguage{#1}{hungarian}}%
+ \def\btxlanguagenameicelandic{\protect\foreignlanguage{#1}{icelandic}}%
+ \def\btxlanguagenameirish{\protect\foreignlanguage{#1}{irish}}%
+ \def\btxlanguagenameitalian{\protect\foreignlanguage{#1}{italian}}%
+ \def\btxlanguagenamelatin{\protect\foreignlanguage{#1}{latin}}%
+ \def\btxlanguagenamenaustrian{\protect\foreignlanguage{#1}{german}}%
+ \def\btxlanguagenamengerman{\protect\foreignlanguage{#1}{german}}%
+ \def\btxlanguagenamenorsk{\protect\foreignlanguage{#1}{norwegian}}%
+ \def\btxlanguagenamenynorsk{\protect\foreignlanguage{#1}{new-norwegian}}%
+ \def\btxlanguagenamepolish{\protect\foreignlanguage{#1}{polish}}%
+ \def\btxlanguagenameportuges{\protect\foreignlanguage{#1}{portuguese}}%
+ \def\btxlanguagenameportuguese{\protect\foreignlanguage{#1}{portuguese}}%
+ \def\btxlanguagenamerussian{\protect\foreignlanguage{#1}{russian}}%
+ \def\btxlanguagenamescottish{\protect\foreignlanguage{#1}{scottish}}%
+ \def\btxlanguagenameserbian{\protect\foreignlanguage{#1}{serbian}}%
+ \def\btxlanguagenamespanish{\protect\foreignlanguage{#1}{spanish}}%
+ \def\btxlanguagenameswedish{\protect\foreignlanguage{#1}{swedish}}%
+ \def\btxlanguagenameturkish{\protect\foreignlanguage{#1}{turkish}}%
+ \def\btxlanguagenameUKenglish{\protect\foreignlanguage{#1}{english}}%
+ \def\btxlanguagenameUSenglish{\protect\foreignlanguage{#1}{english}}%
+ \fi
+}
+% \end{macrocode}
+% \end{macro}
+% Copy the commands to the other languages.
+% \begin{macrocode}
+\newcommand\bibsamerican{\bibsenglish[american]}
+\newcommand\bibsbritish{\bibsenglish[british]}
+\newcommand\bibscanadian{\bibsenglish[canadian]}
+\newcommand\bibsUKenglish{\bibsenglish[UKenglish]}
+\newcommand\bibsUSenglish{\bibsenglish[USenglish]}
+% \end{macrocode}
+% Append the definitions to the language-calling commands.
+% \begin{macrocode}
+\AtBeginDocument{%
+ \ifbbbbfixlanguage
+ \else
+ \bbbbaddto{american}{bibsamerican}
+ \bbbbaddto{british}{bibsbritish}
+ \bbbbaddto{canadian}{bibscanadian}
+ \bbbbaddto{english}{bibsenglish}
+ \bbbbaddto{UKenglish}{bibsUKenglish}
+ \bbbbaddto{USenglish}{bibsUSenglish}
+ \fi
+% \end{macrocode}
+% \changes{0.32}{2003/05/06}{Move change of case from bst to sty}%
+% Switch on the change of case in titles for all English dialects by
+% appending \cs{btxifchangecaseoff} to \cs{extras}\meta{language}.
+% \begin{macrocode}
+ \bbbbaddto{american}{btxifchangecaseon}
+ \bbbbaddto{british}{btxifchangecaseon}
+ \bbbbaddto{canadian}{btxifchangecaseon}
+ \bbbbaddto{english}{btxifchangecaseon}
+ \bbbbaddto{UKenglish}{btxifchangecaseon}
+ \bbbbaddto{USenglish}{btxifchangecaseon}
+}
+%</english>
+% \end{macrocode}
+%
+% \subsubsection{Italian}
+% \begin{macrocode}
+%<*italian>
+% \end{macrocode}
+%
+% \begin{macro}{\bibsitalian}
+% Bibliographic commands for Italian.
+% \changes{0.33}{2003/05/22}{Changed some Italian keywords according
+% to the custom-bib file italian.mbs}%
+% \begin{macrocode}
+\newcommand\bibsitalian[1][italian]{%
+ \def\biblanguagename{#1}%
+ \def\btxetalshort##1{\protect\foreignlanguage{#1}{et~al##1{}}}%
+ \def\btxetallong##1{\protect\foreignlanguage{#1}{et~alii}}%
+ \def\btxandshort##1{\protect\foreignlanguage{#1}{e}}%
+ \def\btxandlong##1{\protect\foreignlanguage{#1}{e}}%
+ \def\btxandcomma##1{}%
+ \def\btxinlong##1{\protect\foreignlanguage{#1}{in}}%
+ \def\btxinshort##1{\protect\foreignlanguage{#1}{in}}%
+ \def\btxofseriesshort##1{\protect\foreignlanguage{#1}{della serie}}%
+ \def\btxinseriesshort##1{\protect\foreignlanguage{#1}{nella serie}}%
+ \def\btxofserieslong##1{\protect\foreignlanguage{#1}{della serie}}%
+ \def\btxinserieslong##1{\protect\foreignlanguage{#1}{nella serie}}%
+ \def\btxeditorshort##1{\protect\foreignlanguage{#1}{cur##1{}}}%
+ \def\btxeditorlong##1{\protect\foreignlanguage{#1}{curatore}}%
+ \def\btxeditorsshort##1{\protect\foreignlanguage{#1}{cur##1{}}}%
+ \def\btxeditorslong##1{\protect\foreignlanguage{#1}{curatori}}%
+ \def\btxvolumeshort##1{\protect\foreignlanguage{#1}{vol##1{}}}%
+ \def\btxvolumelong##1{\protect\foreignlanguage{#1}{volume}}%
+ \def\btxnumbershort##1{\protect\foreignlanguage{#1}{no##1{}}}%
+ \def\btxnumberlong##1{\protect\foreignlanguage{#1}{numero}}%
+ \def\btxeditionshort##1{\protect\foreignlanguage{#1}{ed##1{}}}%
+ \def\btxeditionlong##1{\protect\foreignlanguage{#1}{edizione}}%
+ \def\btxeditionnumshort##1##2{\btxnumeralshort{##1}~\btxeditionshort{##2}}%
+ \def\btxeditionnumlong##1##2{\btxnumerallong{##1}~\btxeditionlong{##2}}%
+ \def\btxchaptershort##1{\protect\foreignlanguage{#1}{cap##1{}}}%
+ \def\btxchapterlong##1{\protect\foreignlanguage{#1}{capitolo}}%
+ \def\btxpageshort##1{\protect\foreignlanguage{#1}{p##1{}}}%
+ \def\btxpagelong##1{\protect\foreignlanguage{#1}{pagina}}%
+ \def\btxpagesshort##1{\protect\foreignlanguage{#1}{pp##1{}}}%
+ \def\btxpageslong##1{\protect\foreignlanguage{#1}{pagine}}%
+ \def\btxmastthesis##1{\protect\foreignlanguage{#1}{tesi di laurea}}%
+ \def\btxphdthesis##1{\protect\foreignlanguage{#1}{tesi di dottorato}}%
+ \def\btxtechrepshort##1{\protect\foreignlanguage{#1}{Rapp.\ Tecnico}}%
+ \def\btxtechreplong##1{\protect\foreignlanguage{#1}{Rapporto Tecnico}}%
+ \def\btxmonjanlong##1{\protect\foreignlanguage{#1}{gennaio}}%
+ \def\btxmonfeblong##1{\protect\foreignlanguage{#1}{febbraio}}%
+ \def\btxmonmarlong##1{\protect\foreignlanguage{#1}{marzo}}%
+ \def\btxmonaprlong##1{\protect\foreignlanguage{#1}{aprile}}%
+ \def\btxmonmaylong##1{\protect\foreignlanguage{#1}{maggio}}%
+ \def\btxmonjunlong##1{\protect\foreignlanguage{#1}{giugno}}%
+ \def\btxmonjullong##1{\protect\foreignlanguage{#1}{luglio}}%
+ \def\btxmonauglong##1{\protect\foreignlanguage{#1}{agosto}}%
+ \def\btxmonseplong##1{\protect\foreignlanguage{#1}{settembre}}%
+ \def\btxmonoctlong##1{\protect\foreignlanguage{#1}{ottobre}}%
+ \def\btxmonnovlong##1{\protect\foreignlanguage{#1}{novembre}}%
+ \def\btxmondeclong##1{\protect\foreignlanguage{#1}{dicembre}}%
+ \def\btxmonjanshort##1{\protect\foreignlanguage{#1}{gen##1{}}}%
+ \def\btxmonfebshort##1{\protect\foreignlanguage{#1}{feb##1{}}}%
+ \def\btxmonmarshort##1{\protect\foreignlanguage{#1}{mar##1{}}}%
+ \def\btxmonaprshort##1{\protect\foreignlanguage{#1}{apr##1{}}}%
+ \def\btxmonmayshort##1{\protect\foreignlanguage{#1}{mag##1{}}}%
+ \def\btxmonjunshort##1{\protect\foreignlanguage{#1}{giu##1{}}}%
+ \def\btxmonjulshort##1{\protect\foreignlanguage{#1}{lug##1{}}}%
+ \def\btxmonaugshort##1{\protect\foreignlanguage{#1}{ago##1{}}}%
+ \def\btxmonsepshort##1{\protect\foreignlanguage{#1}{set##1{}}}%
+ \def\btxmonoctshort##1{\protect\foreignlanguage{#1}{ott##1{}}}%
+ \def\btxmonnovshort##1{\protect\foreignlanguage{#1}{nov##1{}}}%
+ \def\btxmondecshort##1{\protect\foreignlanguage{#1}{dic##1{}}}%
+ \def\Btxinlong##1{\protect\foreignlanguage{#1}{Nel}}%
+ \def\Btxinshort##1{\protect\foreignlanguage{#1}{Nel}}%
+ \def\Btxeditorshort##1{\protect\foreignlanguage{#1}{Cur##1{}}}%
+ \def\Btxeditorlong##1{\protect\foreignlanguage{#1}{Curatore}}%
+ \def\Btxeditorsshort##1{\protect\foreignlanguage{#1}{Cur##1{}}}%
+ \def\Btxeditorslong##1{\protect\foreignlanguage{#1}{Curatori}}%
+ \def\Btxvolumeshort##1{\protect\foreignlanguage{#1}{Vol##1{}}}%
+ \def\Btxvolumelong##1{\protect\foreignlanguage{#1}{Volume}}%
+ \def\Btxnumbershort##1{\protect\foreignlanguage{#1}{No##1{}}}%
+ \def\Btxnumberlong##1{\protect\foreignlanguage{#1}{Numero}}%
+ \def\Btxeditionshort##1{\protect\foreignlanguage{#1}{Ed##1{}}}%
+ \def\Btxeditionlong##1{\protect\foreignlanguage{#1}{Edizione}}%
+ \def\Btxeditionnumshort##1##2{\btxnumeralshort{##1}~\Btxeditionshort{##2}}%
+ \def\Btxeditionnumlong##1##2{\btxnumerallong{##1}~\Btxeditionlong{##2}}%
+ \def\Btxchaptershort##1{\protect\foreignlanguage{#1}{Cap##1{}}}%
+ \def\Btxchapterlong##1{\protect\foreignlanguage{#1}{Capitolo}}%
+ \def\Btxpageshort##1{\protect\foreignlanguage{#1}{P##1{}}}%
+ \def\Btxpagelong##1{\protect\foreignlanguage{#1}{Pagina}}%
+ \def\Btxpagesshort##1{\protect\foreignlanguage{#1}{Pp##1{}}}%
+ \def\Btxpageslong##1{\protect\foreignlanguage{#1}{Pagine}}%
+ \def\Btxtechrepshort##1{\protect\foreignlanguage{#1}{Rap.\ Tecnico}}%
+ \def\Btxtechreplong##1{\protect\foreignlanguage{#1}{Rapporto Tecnico}}%
+ \def\btxurldatecomment##1{\protect\foreignlanguage{#1}{, accesso a ##1}}%
+ \def\btxfnamespaceshort{\,}%
+ \def\btxfnamespacelong{ }%
+ \def\btxnumeralshort##1{\btxnumeralfallback{#1}{##1}}%
+ \def\btxnumerallong##1{\btxnumeralfallback{#1}{##1}}%
+% \end{macrocode}
+% Define how to print month and year in numeric format, e.\,g. MM/YYYY.
+% \begin{macrocode}
+ \def\btxprintmonthyearnum##1##2{##1/##2}%
+ \def\btxkeywordlanguage##1{{\protect\selectlanguage{#1}##1}}%
+% \end{macrocode}
+% \changes{0.2}{2003/04/20}{Added placeholders for language names}%
+% \changes{0.31}{2003/05/01}{Added some language names for Italian}%
+% Names of all known languages in the current language.
+% \begin{macrocode}
+ \ifbbbblanguagenames
+ \def\btxlanguagenameamerican{\protect\foreignlanguage{#1}{inglese}}%
+ \def\btxlanguagenameaustrian{\protect\foreignlanguage{#1}{tedesco}}%
+ \def\btxlanguagenamebrazil{\protect\foreignlanguage{#1}{portoghese}}%
+ \def\btxlanguagenamebrazilian{\protect\foreignlanguage{#1}{portoghese}}%
+ \def\btxlanguagenamebritish{\protect\foreignlanguage{#1}{inglese}}%
+ \def\btxlanguagenamebulgarian{\protect\foreignlanguage{#1}{bulgaro}}%
+ \def\btxlanguagenamecanadian{\protect\foreignlanguage{#1}{inglese}}%
+ \def\btxlanguagenamecanadien{\protect\foreignlanguage{#1}{francese}}%
+ \def\btxlanguagenamecatalan{\protect\foreignlanguage{#1}{catalano}}%
+ \def\btxlanguagenamecroatian{\protect\foreignlanguage{#1}{croato}}%
+ \def\btxlanguagenameczech{\protect\foreignlanguage{#1}{ceco}}%
+ \def\btxlanguagenamedanish{\protect\foreignlanguage{#1}{danese}}%
+ \def\btxlanguagenamedutch{\protect\foreignlanguage{#1}{olandese}}%
+ \def\btxlanguagenameenglish{\protect\foreignlanguage{#1}{inglese}}%
+ \def\btxlanguagenameesperanto{\protect\foreignlanguage{#1}{esperanto}}%
+ \def\btxlanguagenamefinnish{\protect\foreignlanguage{#1}{finlandese}}%
+ \def\btxlanguagenamefrancais{\protect\foreignlanguage{#1}{francese}}%
+ \def\btxlanguagenamefrench{\protect\foreignlanguage{#1}{francese}}%
+ \def\btxlanguagenamefrenchb{\protect\foreignlanguage{#1}{francese}}%
+ \def\btxlanguagenamegerman{\protect\foreignlanguage{#1}{tedesco}}%
+ \def\btxlanguagenamegermanb{\protect\foreignlanguage{#1}{tedesco}}%
+ \def\btxlanguagenamegreek{\protect\foreignlanguage{#1}{greco}}%
+ \def\btxlanguagenamehebrew{\protect\foreignlanguage{#1}{ebreo}}%
+ \def\btxlanguagenamehungarian{\protect\foreignlanguage{#1}{ungherese}}%
+ \def\btxlanguagenameicelandic{\protect\foreignlanguage{#1}{islandese}}%
+ \def\btxlanguagenameirish{\protect\foreignlanguage{#1}{irlandese}}%
+ \def\btxlanguagenameitalian{\protect\foreignlanguage{#1}{italiano}}%
+ \def\btxlanguagenamelatin{\protect\foreignlanguage{#1}{latino}}%
+ \def\btxlanguagenamenaustrian{\protect\foreignlanguage{#1}{tedesco}}%
+ \def\btxlanguagenamengerman{\protect\foreignlanguage{#1}{tedesco}}%
+ \def\btxlanguagenamenorsk{\protect\foreignlanguage{#1}{norvegese}}%
+ \def\btxlanguagenamenynorsk{\protect\foreignlanguage{#1}{nuovo norvegese}}%
+ \def\btxlanguagenamepolish{\protect\foreignlanguage{#1}{polacco}}%
+ \def\btxlanguagenameportuges{\protect\foreignlanguage{#1}{portoghese}}%
+ \def\btxlanguagenameportuguese{\protect\foreignlanguage{#1}{portoghese}}%
+ \def\btxlanguagenamerussian{\protect\foreignlanguage{#1}{russo}}%
+ \def\btxlanguagenamescottish{\protect\foreignlanguage{#1}{scozzese}}%
+ \def\btxlanguagenameserbian{\protect\foreignlanguage{#1}{serbo}}%
+ \def\btxlanguagenamespanish{\protect\foreignlanguage{#1}{spagnolo}}%
+ \def\btxlanguagenameswedish{\protect\foreignlanguage{#1}{svedese}}%
+ \def\btxlanguagenameturkish{\protect\foreignlanguage{#1}{turco}}%
+ \def\btxlanguagenameUKenglish{\protect\foreignlanguage{#1}{inglese}}%
+ \def\btxlanguagenameUSenglish{\protect\foreignlanguage{#1}{inglese}}%
+ \fi
+}
+% \end{macrocode}
+% \end{macro}
+% Append the definitions to the language-calling commands.
+% \begin{macrocode}
+\AtBeginDocument{%
+ \ifbbbbfixlanguage
+ \else
+ \bbbbaddto{italian}{bibsitalian}
+ \fi
+% \end{macrocode}
+% \changes{0.32}{2003/05/06}{Move change of case from bst to sty}%
+% Switch off the change of case in titles for Italian by
+% appending \cs{btxifchangecaseoff} to \cs{extrasitalian}.
+% \begin{macrocode}
+ \bbbbaddto{italian}{btxifchangecaseoff}
+}
+%</italian>
+% \end{macrocode}
+%
+% \subsubsection{Greek}
+% \begin{macrocode}
+%<*greek>
+% \end{macrocode}
+%
+% The language definition for Greek was provided by Prokopis
+% Prokopidis.
+%
+% \begin{macro}{\bibsgreek}
+% Bibliographic commands for Greek.
+% \begin{macrocode}
+\newcommand\bibsgreek[1][greek]{%
+ \def\biblanguagename{#1}%
+ \def\btxetalshort##1{\protect\foreignlanguage{#1}{k.'a##1{}}}%
+ \def\btxetallong##1{\protect\foreignlanguage{#1}{kai 'alloi}}%
+ \def\btxandshort##1{\protect\foreignlanguage{#1}{kai}}%
+ \def\btxandlong##1{\protect\foreignlanguage{#1}{kai}}%
+ \def\btxandcomma##1{,}%
+ \def\btxinlong##1{\protect\foreignlanguage{#1}{sto}}%
+ \def\btxinshort##1{\protect\foreignlanguage{#1}{sto}}%
+ \def\btxofseriesshort##1{\protect\foreignlanguage{#1}{tou}}%
+ \def\btxinseriesshort##1{\protect\foreignlanguage{#1}{sto}}%
+ \def\btxofserieslong##1{\protect\foreignlanguage{#1}{tou}}%
+ \def\btxinserieslong##1{\protect\foreignlanguage{#1}{sto}}%
+ \def\btxeditorshort##1{\protect\foreignlanguage{#1}{epim##1{}}}%
+ \def\btxeditorlong##1{\protect\foreignlanguage{#1}{epimelht'hc}}%
+ \def\btxeditorsshort##1{\protect\foreignlanguage{#1}{epim##1{}}}%
+ \def\btxeditorslong##1{\protect\foreignlanguage{#1}{epimelht'ec}}%
+ \def\btxvolumeshort##1{\protect\foreignlanguage{#1}{t'om##1{}}}%
+ \def\btxvolumelong##1{\protect\foreignlanguage{#1}{t'omoc}}%
+ \def\btxnumbershort##1{\protect\foreignlanguage{#1}{ar##1{}}}%
+ \def\btxnumberlong##1{\protect\foreignlanguage{#1}{arijm'oc}}%
+ \def\btxeditionshort##1{\protect\foreignlanguage{#1}{'ekd##1{}}}%
+ \def\btxeditionlong##1{\protect\foreignlanguage{#1}{'ekdosh}}%
+ \def\btxeditionnumshort##1##2{\btxnumeralshort{##1}~\btxeditionshort{##2}}%
+ \def\btxeditionnumlong##1##2{\btxnumerallong{##1}~\btxeditionlong{##2}}%
+ \def\btxchaptershort##1{\protect\foreignlanguage{#1}{kef##1{}}}%
+ \def\btxchapterlong##1{\protect\foreignlanguage{#1}{kef'alaio}}%
+ \def\btxpageshort##1{\protect\foreignlanguage{#1}{sel##1{}}}%
+ \def\btxpagelong##1{\protect\foreignlanguage{#1}{sel'ida}}%
+ \def\btxpagesshort##1{\protect\foreignlanguage{#1}{sel##1{}}}%
+ \def\btxpageslong##1{\protect\foreignlanguage{#1}{sel'idec}}%
+ \def\btxmastthesis##1{\protect\foreignlanguage{#1}{Metaptuqiak'h ergas'ia}}%
+ \def\btxphdthesis##1{\protect\foreignlanguage{#1}{Didaktorik'h diatrib'h}}%
+ \def\btxtechrepshort##1{\protect\foreignlanguage{#1}{Teqn.\ anaf##1{}}}%
+ \def\btxtechreplong##1{\protect\foreignlanguage{#1}{Teqnik'h anafor'a}}%
+ \def\btxmonjanlong##1{\protect\foreignlanguage{#1}{Ianou'arioc}}%
+ \def\btxmonfeblong##1{\protect\foreignlanguage{#1}{Febrou'arioc}}%
+ \def\btxmonmarlong##1{\protect\foreignlanguage{#1}{M'artioc}}%
+ \def\btxmonaprlong##1{\protect\foreignlanguage{#1}{Apr'ilioc}}%
+ \def\btxmonmaylong##1{\protect\foreignlanguage{#1}{M'aioc}}%
+ \def\btxmonjunlong##1{\protect\foreignlanguage{#1}{Io'unioc}}%
+ \def\btxmonjullong##1{\protect\foreignlanguage{#1}{Io'ulioc}}%
+ \def\btxmonauglong##1{\protect\foreignlanguage{#1}{A'ugoustoc}}%
+ \def\btxmonseplong##1{\protect\foreignlanguage{#1}{Sept'embrioc}}%
+ \def\btxmonoctlong##1{\protect\foreignlanguage{#1}{Okt'wbrioc}}%
+ \def\btxmonnovlong##1{\protect\foreignlanguage{#1}{No'embrioc}}%
+ \def\btxmondeclong##1{\protect\foreignlanguage{#1}{Dek'embrioc}}%
+ \def\btxmonjanshort##1{\protect\foreignlanguage{#1}{Ian##1{}}}%
+ \def\btxmonfebshort##1{\protect\foreignlanguage{#1}{Feb##1{}}}%
+ \def\btxmonmarshort##1{\protect\foreignlanguage{#1}{M'ar##1{}}}%
+ \def\btxmonaprshort##1{\protect\foreignlanguage{#1}{Apr##1{}}}%
+ \def\btxmonmayshort##1{\protect\foreignlanguage{#1}{M'ai}}%
+ \def\btxmonjunshort##1{\protect\foreignlanguage{#1}{Io'un##1{}}}%
+ \def\btxmonjulshort##1{\protect\foreignlanguage{#1}{Io'ul##1{}}}%
+ \def\btxmonaugshort##1{\protect\foreignlanguage{#1}{A'ug##1{}}}%
+ \def\btxmonsepshort##1{\protect\foreignlanguage{#1}{Sept##1{}}}%
+ \def\btxmonoctshort##1{\protect\foreignlanguage{#1}{Okt##1{}}}%
+ \def\btxmonnovshort##1{\protect\foreignlanguage{#1}{No'e##1{}}}%
+ \def\btxmondecshort##1{\protect\foreignlanguage{#1}{Dek##1{}}}%
+ \def\Btxinlong##1{\protect\foreignlanguage{#1}{Sto}}%
+ \def\Btxinshort##1{\protect\foreignlanguage{#1}{Sto}}%
+ \def\Btxeditorshort##1{\protect\foreignlanguage{#1}{Epim##1{}}}%
+ \def\Btxeditorlong##1{\protect\foreignlanguage{#1}{Epimelht'hc}}%
+ \def\Btxeditorsshort##1{\protect\foreignlanguage{#1}{Epim##1{}}}%
+ \def\Btxeditorslong##1{\protect\foreignlanguage{#1}{Epimelht'ec}}%
+ \def\Btxvolumeshort##1{\protect\foreignlanguage{#1}{T'om##1{}}}%
+ \def\Btxvolumelong##1{\protect\foreignlanguage{#1}{T'omoc}}%
+ \def\Btxnumbershort##1{\protect\foreignlanguage{#1}{Ar##1{}}}%
+ \def\Btxnumberlong##1{\protect\foreignlanguage{#1}{Arijm'oc}}%
+ \def\Btxeditionshort##1{\protect\foreignlanguage{#1}{'Ekd##1{}}}%
+ \def\Btxeditionlong##1{\protect\foreignlanguage{#1}{'Ekdosh}}%
+ \def\Btxeditionnumshort##1##2{\btxnumeralshort{##1}~\Btxeditionshort{##2}}%
+ \def\Btxeditionnumlong##1##2{\btxnumerallong{##1}~\Btxeditionlong{##2}}%
+ \def\Btxchaptershort##1{\protect\foreignlanguage{#1}{Kef##1{}}}%
+ \def\Btxchapterlong##1{\protect\foreignlanguage{#1}{Kef'alaio}}%
+ \def\Btxpageshort##1{\protect\foreignlanguage{#1}{Sel##1{}}}%
+ \def\Btxpagelong##1{\protect\foreignlanguage{#1}{Sel'ida}}%
+ \def\Btxpagesshort##1{\protect\foreignlanguage{#1}{Sel##1{}}}%
+ \def\Btxpageslong##1{\protect\foreignlanguage{#1}{Sel'idec}}%
+ \def\Btxtechrepshort##1{\protect\foreignlanguage{#1}{Teqn.\ Anaf##1{}}}%
+ \def\Btxtechreplong##1{\protect\foreignlanguage{#1}{Teqnik'h Anafor'a}}%
+ \def\btxurldatecomment##1{\protect\foreignlanguage{#1}{, ep'iskeyh thn ##1}}%
+ \def\btxfnamespaceshort{\,}%
+ \def\btxfnamespacelong{ }%
+ \def\btxnumeralshort##1{\protect\foreignlanguage{#1}{%
+ \ifnumber{##1}{##1h}{##1}}}%
+ \def\btxnumerallong##1{\protect\foreignlanguage{#1}{\ifnumber{##1}{%
+ \ifcase##1 ##1h\or pr'wth\or de'uterh\or tr'ith\or t'etarth%
+ \or p'empth\or 'ekth\or 'ebdomh\or 'ogdoh\or 'enath\else ##1h\fi
+ }{##1}}}%
+% \end{macrocode}
+% Define how to print month and year in numeric format, e.\,g. MM/YYYY.
+% \begin{macrocode}
+ \def\btxprintmonthyearnum##1##2{##1/##2}%
+ \def\btxkeywordlanguage##1{{\protect\selectlanguage{#1}##1}}%
+% \end{macrocode}
+% Names of all known languages in the current language.
+% \begin{macrocode}
+ \ifbbbblanguagenames
+ \def\btxlanguagenameamerican{\protect\foreignlanguage{#1}{agglik'a}}%
+ \def\btxlanguagenameaustrian{\protect\foreignlanguage{#1}{germanik'a}}%
+ \def\btxlanguagenamebrazil{\protect\foreignlanguage{#1}{portogalik'a}}%
+ \def\btxlanguagenamebrazilian{\protect\foreignlanguage{#1}{portogalik'a}}%
+ \def\btxlanguagenamebritish{\protect\foreignlanguage{#1}{agglik'a}}%
+ \def\btxlanguagenamebulgarian{\protect\foreignlanguage{#1}{boulgarik'a}}%
+ \def\btxlanguagenamecanadian{\protect\foreignlanguage{#1}{agglik'a}}%
+ \def\btxlanguagenamecanadien{\protect\foreignlanguage{#1}{gallik'a}}%
+ \def\btxlanguagenamecatalan{\protect\foreignlanguage{#1}{katalanik'a}}%
+ \def\btxlanguagenamecroatian{\protect\foreignlanguage{#1}{kroatik'a}}%
+ \def\btxlanguagenameczech{\protect\foreignlanguage{#1}{tseqik'a}}%
+ \def\btxlanguagenamedanish{\protect\foreignlanguage{#1}{danik'a}}%
+ \def\btxlanguagenamedutch{\protect\foreignlanguage{#1}{ollandik'a}}%
+ \def\btxlanguagenameenglish{\protect\foreignlanguage{#1}{agglik'a}}%
+ \def\btxlanguagenameesperanto{\protect\foreignlanguage{#1}{esperanto}}%
+ \def\btxlanguagenamefinnish{\protect\foreignlanguage{#1}{finlandik'a}}%
+ \def\btxlanguagenamefrancais{\protect\foreignlanguage{#1}{gallik'a}}%
+ \def\btxlanguagenamefrench{\protect\foreignlanguage{#1}{gallik'a}}%
+ \def\btxlanguagenamefrenchb{\protect\foreignlanguage{#1}{gallik'a}}%
+ \def\btxlanguagenamegerman{\protect\foreignlanguage{#1}{germanik'a}}%
+ \def\btxlanguagenamegermanb{\protect\foreignlanguage{#1}{germanik'a}}%
+ \def\btxlanguagenamegreek{\protect\foreignlanguage{#1}{ellhnik'a}}%
+ \def\btxlanguagenamehebrew{\protect\foreignlanguage{#1}{ebra"ik'a}}%
+ \def\btxlanguagenamehungarian{\protect\foreignlanguage{#1}{ouggrik'a}}%
+ \def\btxlanguagenameicelandic{\protect\foreignlanguage{#1}{islandik'a}}%
+ \def\btxlanguagenameirish{\protect\foreignlanguage{#1}{irlandik'a}}%
+ \def\btxlanguagenameitalian{\protect\foreignlanguage{#1}{italik'a}}%
+ \def\btxlanguagenamelatin{\protect\foreignlanguage{#1}{latinik'a}}%
+ \def\btxlanguagenamenaustrian{\protect\foreignlanguage{#1}{germanik'a}}%
+ \def\btxlanguagenamengerman{\protect\foreignlanguage{#1}{germanik'a}}%
+ \def\btxlanguagenamenorsk{\protect\foreignlanguage{#1}{norbhgik'a}}%
+ \def\btxlanguagenamenynorsk{\protect\foreignlanguage{#1}{n'ea norbhgik'a}}%
+ \def\btxlanguagenamepolish{\protect\foreignlanguage{#1}{polwnik'a}}%
+ \def\btxlanguagenameportuges{\protect\foreignlanguage{#1}{portogalik'a}}%
+ \def\btxlanguagenameportuguese{\protect\foreignlanguage{#1}{portogalik'a}}%
+ \def\btxlanguagenamerussian{\protect\foreignlanguage{#1}{rwsik'a}}%
+ \def\btxlanguagenamescottish{\protect\foreignlanguage{#1}{skwts'ezika}}%
+ \def\btxlanguagenameserbian{\protect\foreignlanguage{#1}{serbik'a}}%
+ \def\btxlanguagenamespanish{\protect\foreignlanguage{#1}{ispanik'a}}%
+ \def\btxlanguagenameswedish{\protect\foreignlanguage{#1}{souhdik'a}}%
+ \def\btxlanguagenameturkish{\protect\foreignlanguage{#1}{tourkik'a}}%
+ \def\btxlanguagenameUKenglish{\protect\foreignlanguage{#1}{agglik'a}}%
+ \def\btxlanguagenameUSenglish{\protect\foreignlanguage{#1}{agglik'a}}%
+ \fi
+}
+% \end{macrocode}
+% \end{macro}
+% Append the definitions to the language-calling commands.
+% \begin{macrocode}
+\AtBeginDocument{%
+ \ifbbbbfixlanguage
+ \else
+ \bbbbaddto{greek}{bibsgreek}
+ \fi
+ \bbbbaddto{greek}{btxifchangecaseoff}
+}
+%</greek>
+% \end{macrocode}
+%
+%
+% \subsubsection{Norwegian}
+% \begin{macrocode}
+%<*norsk>
+% \end{macrocode}
+%
+% The language definition for Norwegian was provided by Hans Fredrik
+% Nordhaug.
+%
+% \begin{macro}{\bibsnorsk}
+% Bibliographic commands for Norsk.
+% \begin{macrocode}
+\newcommand\bibsnorsk[1][norsk]{%
+ \def\biblanguagename{#1}%
+ \def\btxetalshort##1{\protect\foreignlanguage{#1}{et~al##1{}}}%
+ \def\btxetallong##1{\protect\foreignlanguage{#1}{et~alii}}%
+ \def\btxandshort##1{\protect\foreignlanguage{#1}{og}}%
+ \def\btxandlong##1{\protect\foreignlanguage{#1}{og}}%
+ \def\btxandcomma##1{}%
+ \def\btxinlong##1{\protect\foreignlanguage{#1}{i}}%
+ \def\btxinshort##1{\protect\foreignlanguage{#1}{i}}%
+ \def\btxofseriesshort##1{\protect\foreignlanguage{#1}{av}}%
+ \def\btxinseriesshort##1{\protect\foreignlanguage{#1}{i}}%
+ \def\btxofserieslong##1{\protect\foreignlanguage{#1}{av}}%
+ \def\btxinserieslong##1{\protect\foreignlanguage{#1}{i}}%
+ \def\btxeditorshort##1{\protect\foreignlanguage{#1}{red##1{}}}%
+ \def\btxeditorlong##1{\protect\foreignlanguage{#1}{redakt\o r}}%
+ \def\btxeditorsshort##1{\protect\foreignlanguage{#1}{red##1{}}}%
+ \def\btxeditorslong##1{\protect\foreignlanguage{#1}{redakt\o rer}}%
+ \def\btxvolumeshort##1{\protect\foreignlanguage{#1}{bd##1{}}}%
+ \def\btxvolumelong##1{\protect\foreignlanguage{#1}{bind}}%
+ \def\btxnumbershort##1{\protect\foreignlanguage{#1}{nr##1{}}}%
+ \def\btxnumberlong##1{\protect\foreignlanguage{#1}{nummer}}%
+ \def\btxeditionshort##1{\protect\foreignlanguage{#1}{utg##1{}}}%
+ \def\btxeditionlong##1{\protect\foreignlanguage{#1}{utgave}}%
+ \def\btxeditionnumshort##1##2{\btxnumeralshort{##1}~\btxeditionshort{##2}}%
+ \def\btxeditionnumlong##1##2{\btxnumerallong{##1}~\btxeditionlong{##2}}%
+ \def\btxchaptershort##1{\protect\foreignlanguage{#1}{kap##1{}}}%
+ \def\btxchapterlong##1{\protect\foreignlanguage{#1}{kapittel}}%
+ \def\btxpageshort##1{\protect\foreignlanguage{#1}{s##1{}}}%
+ \def\btxpagelong##1{\protect\foreignlanguage{#1}{side}}%
+ \def\btxpagesshort##1{\protect\foreignlanguage{#1}{s##1{}}}%
+ \def\btxpageslong##1{\protect\foreignlanguage{#1}{sider}}%
+ \def\btxmastthesis##1{\protect\foreignlanguage{#1}{Masteroppgave}}%
+ \def\btxphdthesis##1{\protect\foreignlanguage{#1}{PhD-avhandling}}%
+ \def\btxtechrepshort##1{\protect\foreignlanguage{#1}{tekn.\ rap##1{}}}%
+ \def\btxtechreplong##1{\protect\foreignlanguage{#1}{teknisk rapport}}%
+ \def\btxmonjanlong##1{\protect\foreignlanguage{#1}{Januar}}%
+ \def\btxmonfeblong##1{\protect\foreignlanguage{#1}{Februar}}%
+ \def\btxmonmarlong##1{\protect\foreignlanguage{#1}{Mars}}%
+ \def\btxmonaprlong##1{\protect\foreignlanguage{#1}{April}}%
+ \def\btxmonmaylong##1{\protect\foreignlanguage{#1}{Mai}}%
+ \def\btxmonjunlong##1{\protect\foreignlanguage{#1}{Juni}}%
+ \def\btxmonjullong##1{\protect\foreignlanguage{#1}{Juli}}%
+ \def\btxmonauglong##1{\protect\foreignlanguage{#1}{August}}%
+ \def\btxmonseplong##1{\protect\foreignlanguage{#1}{September}}%
+ \def\btxmonoctlong##1{\protect\foreignlanguage{#1}{Oktober}}%
+ \def\btxmonnovlong##1{\protect\foreignlanguage{#1}{November}}%
+ \def\btxmondeclong##1{\protect\foreignlanguage{#1}{Desember}}%
+ \def\btxmonjanshort##1{\protect\foreignlanguage{#1}{Jan##1{}}}%
+ \def\btxmonfebshort##1{\protect\foreignlanguage{#1}{Feb##1{}}}%
+ \def\btxmonmarshort##1{\protect\foreignlanguage{#1}{Mar##1{}}}%
+ \def\btxmonaprshort##1{\protect\foreignlanguage{#1}{Apr##1{}}}%
+ \def\btxmonmayshort##1{\protect\foreignlanguage{#1}{Mai}}%
+ \def\btxmonjunshort##1{\protect\foreignlanguage{#1}{Jun##1{}}}%
+ \def\btxmonjulshort##1{\protect\foreignlanguage{#1}{Jul##1{}}}%
+ \def\btxmonaugshort##1{\protect\foreignlanguage{#1}{Aug##1{}}}%
+ \def\btxmonsepshort##1{\protect\foreignlanguage{#1}{Sep##1{}}}%
+ \def\btxmonoctshort##1{\protect\foreignlanguage{#1}{Okt##1{}}}%
+ \def\btxmonnovshort##1{\protect\foreignlanguage{#1}{Nov##1{}}}%
+ \def\btxmondecshort##1{\protect\foreignlanguage{#1}{Des##1{}}}%
+ \def\Btxinlong##1{\protect\foreignlanguage{#1}{I}}%
+ \def\Btxinshort##1{\protect\foreignlanguage{#1}{I}}%
+ \def\Btxeditorshort##1{\protect\foreignlanguage{#1}{Red##1{}}}%
+ \def\Btxeditorlong##1{\protect\foreignlanguage{#1}{Redakt\o r}}%
+ \def\Btxeditorsshort##1{\protect\foreignlanguage{#1}{Red##1{}}}%
+ \def\Btxeditorslong##1{\protect\foreignlanguage{#1}{Redakt\o rer}}%
+ \def\Btxvolumeshort##1{\protect\foreignlanguage{#1}{Bd##1{}}}%
+ \def\Btxvolumelong##1{\protect\foreignlanguage{#1}{Bind}}%
+ \def\Btxnumbershort##1{\protect\foreignlanguage{#1}{Nr##1{}}}%
+ \def\Btxnumberlong##1{\protect\foreignlanguage{#1}{Nummer}}%
+ \def\Btxeditionshort##1{\protect\foreignlanguage{#1}{Utg##1{}}}%
+ \def\Btxeditionlong##1{\protect\foreignlanguage{#1}{Utgave}}%
+ \def\Btxeditionnumshort##1##2{\btxnumeralshort{##1}~\Btxeditionshort{##2}}%
+ \def\Btxeditionnumlong##1##2{\btxnumerallong{##1}~\Btxeditionlong{##2}}%
+ \def\Btxchaptershort##1{\protect\foreignlanguage{#1}{Kap##1{}}}%
+ \def\Btxchapterlong##1{\protect\foreignlanguage{#1}{Kapittel}}%
+ \def\Btxpageshort##1{\protect\foreignlanguage{#1}{S##1{}}}%
+ \def\Btxpagelong##1{\protect\foreignlanguage{#1}{Side}}%
+ \def\Btxpagesshort##1{\protect\foreignlanguage{#1}{S##1{}}}%
+ \def\Btxpageslong##1{\protect\foreignlanguage{#1}{Sider}}%
+ \def\Btxtechrepshort##1{\protect\foreignlanguage{#1}{Tekn.\ rap##1{}}}%
+ \def\Btxtechreplong##1{\protect\foreignlanguage{#1}{Teknisk rapport}}%
+ \def\btxurldatecomment##1{\protect\foreignlanguage{#1}{, sjekket: ##1}}%
+ \def\btxfnamespaceshort{\,}%
+ \def\btxfnamespacelong{ }%
+ \def\btxnumeralshort##1{\btxnumeralfallback{#1}{##1}}%
+ \def\btxnumerallong##1{\btxnumeralfallback{#1}{##1}}%
+% \end{macrocode}
+% Define how to print month and year in numeric format, e.\,g. MM/YYYY.
+% \begin{macrocode}
+ \def\btxprintmonthyearnum##1##2{##1/##2}%
+ \def\btxkeywordlanguage##1{{\protect\selectlanguage{#1}##1}}%
+% \end{macrocode}
+% Names of all known languages in the current language.
+% \begin{macrocode}
+ \ifbbbblanguagenames
+ \def\btxlanguagenameamerican{\protect\foreignlanguage{#1}{engelsk}}%
+ \def\btxlanguagenameaustrian{\protect\foreignlanguage{#1}{tysk}}%
+ \def\btxlanguagenamebrazil{\protect\foreignlanguage{#1}{portugisisk}}%
+ \def\btxlanguagenamebrazilian{\protect\foreignlanguage{#1}{portugisisk}}%
+ \def\btxlanguagenamebritish{\protect\foreignlanguage{#1}{engelsk}}%
+ \def\btxlanguagenamebulgarian{\protect\foreignlanguage{#1}{bulgarsk}}%
+ \def\btxlanguagenamecanadian{\protect\foreignlanguage{#1}{engelsk}}%
+ \def\btxlanguagenamecanadien{\protect\foreignlanguage{#1}{fransk}}%
+ \def\btxlanguagenamecatalan{\protect\foreignlanguage{#1}{katalansk}}%
+ \def\btxlanguagenamecroatian{\protect\foreignlanguage{#1}{kroatisk}}%
+ \def\btxlanguagenameczech{\protect\foreignlanguage{#1}{tsjekkisk}}%
+ \def\btxlanguagenamedanish{\protect\foreignlanguage{#1}{dansk}}%
+ \def\btxlanguagenamedutch{\protect\foreignlanguage{#1}{nederlandsk}}%
+ \def\btxlanguagenameenglish{\protect\foreignlanguage{#1}{engelsk}}%
+ \def\btxlanguagenameesperanto{\protect\foreignlanguage{#1}{esperanto}}%
+ \def\btxlanguagenamefinnish{\protect\foreignlanguage{#1}{finsk}}%
+ \def\btxlanguagenamefrancais{\protect\foreignlanguage{#1}{fransk}}%
+ \def\btxlanguagenamefrench{\protect\foreignlanguage{#1}{fransk}}%
+ \def\btxlanguagenamefrenchb{\protect\foreignlanguage{#1}{fransk}}%
+ \def\btxlanguagenamegerman{\protect\foreignlanguage{#1}{tysk}}%
+ \def\btxlanguagenamegermanb{\protect\foreignlanguage{#1}{tysk}}%
+ \def\btxlanguagenamegreek{\protect\foreignlanguage{#1}{gr\ae sk}}%
+ \def\btxlanguagenamehebrew{\protect\foreignlanguage{#1}{hebraisk}}%
+ \def\btxlanguagenamehungarian{\protect\foreignlanguage{#1}{ungarsk}}%
+ \def\btxlanguagenameicelandic{\protect\foreignlanguage{#1}{islandsk}}%
+ \def\btxlanguagenameirish{\protect\foreignlanguage{#1}{irsk}}%
+ \def\btxlanguagenameitalian{\protect\foreignlanguage{#1}{italiensk}}%
+ \def\btxlanguagenamelatin{\protect\foreignlanguage{#1}{latinsk}}%
+ \def\btxlanguagenamenaustrian{\protect\foreignlanguage{#1}{tysk}}%
+ \def\btxlanguagenamengerman{\protect\foreignlanguage{#1}{tysk}}%
+ \def\btxlanguagenamenorsk{\protect\foreignlanguage{#1}{norsk}}%
+ \def\btxlanguagenamenynorsk{\protect\foreignlanguage{#1}{nynorsk}}%
+ \def\btxlanguagenamepolish{\protect\foreignlanguage{#1}{polsk}}%
+ \def\btxlanguagenameportuges{\protect\foreignlanguage{#1}{portugisisk}}%
+ \def\btxlanguagenameportuguese{\protect\foreignlanguage{#1}{portugisisk}}%
+ \def\btxlanguagenamerussian{\protect\foreignlanguage{#1}{russisk}}%
+ \def\btxlanguagenamescottish{\protect\foreignlanguage{#1}{skotsk}}%
+ \def\btxlanguagenameserbian{\protect\foreignlanguage{#1}{serbisk}}%
+ \def\btxlanguagenamespanish{\protect\foreignlanguage{#1}{spansk}}%
+ \def\btxlanguagenameswedish{\protect\foreignlanguage{#1}{svensk}}%
+ \def\btxlanguagenameturkish{\protect\foreignlanguage{#1}{tyrkisk}}%
+ \def\btxlanguagenameUKenglish{\protect\foreignlanguage{#1}{engelsk}}%
+ \def\btxlanguagenameUSenglish{\protect\foreignlanguage{#1}{engelsk}}%
+ \fi
+}
+\newcommand\bibsnorwegian{\bibsnorsk}
+% \end{macrocode}
+% \end{macro}
+% Append the definitions to the language-calling commands.
+% \begin{macrocode}
+\AtBeginDocument{%
+ \ifbbbbfixlanguage
+ \else
+ \bbbbaddto{norsk}{bibsnorsk}
+ \fi
+% \end{macrocode}
+% Switch off the change of case in titles for Norsk by
+% appending \cs{btxifchangecaseoff} to \cs{extrasnorsk}.
+% \begin{macrocode}
+ \bbbbaddto{norsk}{btxifchangecaseoff}
+}
+%</norsk>
+% \end{macrocode}
+%
+% \subsubsection{French}
+% \changes{0.32}{2003/05/06}{Added French language}%
+% \begin{macrocode}
+%<*french>
+% \end{macrocode}
+%
+% \begin{macro}{\bibsfrench}
+% \changes{1.00}{2005/02/16}{Handle package \texttt{frenchpro}}%
+% |french.sty| already defines \cs{bibsfrench}.
+% In this case it has to be redefined, otherwise newly defined.
+% \begin{macrocode}
+\makeatletter
+\@ifpackageloaded{french}{}{\newcommand\bibsfrench{}}
+\makeatother
+% \end{macrocode}
+% Bibliographic commands for French.
+% \begin{macrocode}
+\renewcommand\bibsfrench[1][french]{%
+ \def\biblanguagename{#1}%
+ \def\btxetalshort##1{\protect\foreignlanguage{#1}{et~al##1{}}}%
+ \def\btxetallong##1{\protect\foreignlanguage{#1}{et~alii}}%
+ \def\btxandshort##1{\protect\foreignlanguage{#1}{et}}%
+ \def\btxandlong##1{\protect\foreignlanguage{#1}{et}}%
+ \def\btxandcomma##1{}%
+ \def\btxinlong##1{\protect\foreignlanguage{#1}{dans}}%
+ \def\btxinshort##1{\protect\foreignlanguage{#1}{dans}}%
+ \def\btxofseriesshort##1{\protect\foreignlanguage{#1}{de}}%
+ \def\btxinseriesshort##1{\protect\foreignlanguage{#1}{dans}}%
+ \def\btxofserieslong##1{\protect\foreignlanguage{#1}{de}}%
+ \def\btxinserieslong##1{\protect\foreignlanguage{#1}{dans}}%
+ \def\btxeditorshort##1{\protect\foreignlanguage{#1}{r\'ed##1{}}}%
+ \def\btxeditorlong##1{\protect\foreignlanguage{#1}{r\'edacteur}}%
+ \def\btxeditorsshort##1{\protect\foreignlanguage{#1}{r\'eds##1{}}}%
+ \def\btxeditorslong##1{\protect\foreignlanguage{#1}{r\'edacteurs}}%
+ \def\btxvolumeshort##1{\protect\foreignlanguage{#1}{t##1{}}}%
+ \def\btxvolumelong##1{\protect\foreignlanguage{#1}{tome}}%
+ \def\btxnumbershort##1{\protect\foreignlanguage{#1}{%
+ n\textsuperscript{o}\kern.2em\relax{}}}%
+ \def\btxnumberlong##1{\protect\foreignlanguage{#1}{num\'ero}}%
+ \def\btxeditionshort##1{\protect\foreignlanguage{#1}{\'ed##1{}}}%
+ \def\btxeditionlong##1{\protect\foreignlanguage{#1}{\'edition}}%
+ \def\btxeditionnumshort##1##2{\btxnumeralshort{##1}~\btxeditionshort{##2}}%
+ \def\btxeditionnumlong##1##2{\btxnumerallong{##1}~\btxeditionlong{##2}}%
+ \def\btxchaptershort##1{\protect\foreignlanguage{#1}{chap##1{}}}%
+ \def\btxchapterlong##1{\protect\foreignlanguage{#1}{chapitre}}%
+ \def\btxpageshort##1{\protect\foreignlanguage{#1}{p##1{}}}%
+ \def\btxpagelong##1{\protect\foreignlanguage{#1}{page}}%
+ \def\btxpagesshort##1{\protect\foreignlanguage{#1}{p##1{}}}%
+ \def\btxpageslong##1{\protect\foreignlanguage{#1}{pages}}%
+ \def\btxmastthesis##1{\protect\foreignlanguage{#1}{M\'emoire de ma\^itrise}}%
+ \def\btxphdthesis##1{\protect\foreignlanguage{#1}{Th\`ese de doctorat}}%
+ \def\btxtechrepshort##1{\protect\foreignlanguage{#1}{rap.\ tech##1{}}}%
+ \def\btxtechreplong##1{\protect\foreignlanguage{#1}{rapport technique}}%
+ \def\btxmonjanlong##1{\protect\foreignlanguage{#1}{janvier}}%
+ \def\btxmonfeblong##1{\protect\foreignlanguage{#1}{f\'evrier}}%
+ \def\btxmonmarlong##1{\protect\foreignlanguage{#1}{mars}}%
+ \def\btxmonaprlong##1{\protect\foreignlanguage{#1}{avril}}%
+ \def\btxmonmaylong##1{\protect\foreignlanguage{#1}{mai}}%
+ \def\btxmonjunlong##1{\protect\foreignlanguage{#1}{juin}}%
+ \def\btxmonjullong##1{\protect\foreignlanguage{#1}{juillet}}%
+ \def\btxmonauglong##1{\protect\foreignlanguage{#1}{ao\^ut}}%
+ \def\btxmonseplong##1{\protect\foreignlanguage{#1}{septembre}}%
+ \def\btxmonoctlong##1{\protect\foreignlanguage{#1}{octobre}}%
+ \def\btxmonnovlong##1{\protect\foreignlanguage{#1}{novembre}}%
+ \def\btxmondeclong##1{\protect\foreignlanguage{#1}{d\'ecembre}}%
+ \def\btxmonjanshort##1{\protect\foreignlanguage{#1}{jan##1{}}}%
+ \def\btxmonfebshort##1{\protect\foreignlanguage{#1}{f\'ev##1{}}}%
+ \def\btxmonmarshort##1{\protect\foreignlanguage{#1}{mar##1{}}}%
+ \def\btxmonaprshort##1{\protect\foreignlanguage{#1}{avr##1{}}}%
+ \def\btxmonmayshort##1{\protect\foreignlanguage{#1}{mai}}%
+ \def\btxmonjunshort##1{\protect\foreignlanguage{#1}{juin}}%
+ \def\btxmonjulshort##1{\protect\foreignlanguage{#1}{juil##1{}}}%
+ \def\btxmonaugshort##1{\protect\foreignlanguage{#1}{ao\^ut}}%
+ \def\btxmonsepshort##1{\protect\foreignlanguage{#1}{sept##1{}}}%
+ \def\btxmonoctshort##1{\protect\foreignlanguage{#1}{oct##1{}}}%
+ \def\btxmonnovshort##1{\protect\foreignlanguage{#1}{nov##1{}}}%
+ \def\btxmondecshort##1{\protect\foreignlanguage{#1}{d\'ec##1{}}}%
+ \def\Btxinlong##1{\protect\foreignlanguage{#1}{Dans}}%
+ \def\Btxinshort##1{\protect\foreignlanguage{#1}{Dans}}%
+ \def\Btxeditorshort##1{\protect\foreignlanguage{#1}{R\'ed##1{}}}%
+ \def\Btxeditorlong##1{\protect\foreignlanguage{#1}{R\'edacteur}}%
+ \def\Btxeditorsshort##1{\protect\foreignlanguage{#1}{R\'eds##1{}}}%
+ \def\Btxeditorslong##1{\protect\foreignlanguage{#1}{R\'edacteurs}}%
+ \def\Btxvolumeshort##1{\protect\foreignlanguage{#1}{T##1{}}}%
+ \def\Btxvolumelong##1{\protect\foreignlanguage{#1}{Tome}}%
+ \def\Btxnumbershort##1{\protect\foreignlanguage{#1}{%
+ N\textsuperscript{o}\kern.2em\relax}}%
+ \def\Btxnumberlong##1{\protect\foreignlanguage{#1}{Num\'ero}}%
+ \def\Btxeditionshort##1{\protect\foreignlanguage{#1}{\'Ed##1{}}}%
+ \def\Btxeditionlong##1{\protect\foreignlanguage{#1}{\'Edition}}%
+ \def\Btxeditionnumshort##1##2{\btxnumeralshort{##1}~\Btxeditionshort{##2}}%
+ \def\Btxeditionnumlong##1##2{\btxnumerallong{##1}~\Btxeditionlong{##2}}%
+ \def\Btxchaptershort##1{\protect\foreignlanguage{#1}{Chap##1{}}}%
+ \def\Btxchapterlong##1{\protect\foreignlanguage{#1}{Chapitre}}%
+ \def\Btxpageshort##1{\protect\foreignlanguage{#1}{P##1{}}}%
+ \def\Btxpagelong##1{\protect\foreignlanguage{#1}{Page}}%
+ \def\Btxpagesshort##1{\protect\foreignlanguage{#1}{P##1{}}}%
+ \def\Btxpageslong##1{\protect\foreignlanguage{#1}{Pages}}%
+ \def\Btxtechrepshort##1{\protect\foreignlanguage{#1}{Rap. tech##1{}}}%
+ \def\Btxtechreplong##1{\protect\foreignlanguage{#1}{Rapport technique}}%
+ \def\btxurldatecomment##1{\protect\foreignlanguage{#1}{, visit\'e le ##1}}%
+ \def\btxfnamespaceshort{\,}%
+ \def\btxfnamespacelong{ }%
+ \def\btxnumeralshort##1{\btxnumeralfrench{#1}{##1}}%
+ \def\btxnumerallong##1{\btxnumeralfrench{#1}{##1}}%
+% \end{macrocode}
+% Define how to print month and year in numeric format, e.\,g. MM/YYYY.
+% \begin{macrocode}
+ \def\btxprintmonthyearnum##1##2{##1/##2}%
+ \def\btxkeywordlanguage##1{{\protect\selectlanguage{#1}##1}}%
+% \end{macrocode}
+% Names of all known languages in the current language.
+% \begin{macrocode}
+ \ifbbbblanguagenames
+ \def\btxlanguagenameamerican{\protect\foreignlanguage{#1}{anglais}}%
+ \def\btxlanguagenameaustrian{\protect\foreignlanguage{#1}{allemand}}%
+ \def\btxlanguagenamebrazil{\protect\foreignlanguage{#1}{portugais}}%
+ \def\btxlanguagenamebrazilian{\protect\foreignlanguage{#1}{portugais}}%
+ \def\btxlanguagenamebritish{\protect\foreignlanguage{#1}{anglais}}%
+ \def\btxlanguagenamebulgarian{\protect\foreignlanguage{#1}{bulgare}}%
+ \def\btxlanguagenamecanadian{\protect\foreignlanguage{#1}{anglais}}%
+ \def\btxlanguagenamecanadien{\protect\foreignlanguage{#1}{fran\c{c}ais}}%
+ \def\btxlanguagenamecatalan{\protect\foreignlanguage{#1}{catalan}}%
+ \def\btxlanguagenamecroatian{\protect\foreignlanguage{#1}{croate}}%
+ \def\btxlanguagenameczech{\protect\foreignlanguage{#1}{tch\`eque}}%
+ \def\btxlanguagenamedanish{\protect\foreignlanguage{#1}{danois}}%
+ \def\btxlanguagenamedutch{\protect\foreignlanguage{#1}{n\'eerlandais}}%
+ \def\btxlanguagenameenglish{\protect\foreignlanguage{#1}{anglais}}%
+ \def\btxlanguagenameesperanto{\protect\foreignlanguage{#1}{esperanto}}%
+ \def\btxlanguagenamefinnish{\protect\foreignlanguage{#1}{finnois}}%
+ \def\btxlanguagenamefrancais{\protect\foreignlanguage{#1}{fran\c{c}ais}}%
+ \def\btxlanguagenamefrench{\protect\foreignlanguage{#1}{fran\c{c}ais}}%
+ \def\btxlanguagenamefrenchb{\protect\foreignlanguage{#1}{fran\c{c}ais}}%
+ \def\btxlanguagenamegerman{\protect\foreignlanguage{#1}{allemand}}%
+ \def\btxlanguagenamegermanb{\protect\foreignlanguage{#1}{allemand}}%
+ \def\btxlanguagenamegreek{\protect\foreignlanguage{#1}{grec}}%
+ \def\btxlanguagenamehebrew{\protect\foreignlanguage{#1}{h\'ebreu}}%
+ \def\btxlanguagenamehungarian{\protect\foreignlanguage{#1}{hongrois}}%
+ \def\btxlanguagenameicelandic{\protect\foreignlanguage{#1}{islandais}}%
+ \def\btxlanguagenameirish{\protect\foreignlanguage{#1}{irlandais}}%
+ \def\btxlanguagenameitalian{\protect\foreignlanguage{#1}{italien}}%
+ \def\btxlanguagenamelatin{\protect\foreignlanguage{#1}{latin}}%
+ \def\btxlanguagenamenaustrian{\protect\foreignlanguage{#1}{allemand}}%
+ \def\btxlanguagenamengerman{\protect\foreignlanguage{#1}{allemand}}%
+ \def\btxlanguagenamenorsk{\protect\foreignlanguage{#1}{norv\'egien}}%
+ \def\btxlanguagenamenynorsk{\protect\foreignlanguage{#1}{nouveau
+ norv\'egien}}%
+ \def\btxlanguagenamepolish{\protect\foreignlanguage{#1}{polonais}}%
+ \def\btxlanguagenameportuges{\protect\foreignlanguage{#1}{portugais}}%
+ \def\btxlanguagenameportuguese{\protect\foreignlanguage{#1}{portugais}}%
+ \def\btxlanguagenamerussian{\protect\foreignlanguage{#1}{russe}}%
+ \def\btxlanguagenamescottish{\protect\foreignlanguage{#1}{\'ecossais}}%
+ \def\btxlanguagenameserbian{\protect\foreignlanguage{#1}{serbe}}%
+ \def\btxlanguagenamespanish{\protect\foreignlanguage{#1}{espagnol}}%
+ \def\btxlanguagenameswedish{\protect\foreignlanguage{#1}{su\'edois}}%
+ \def\btxlanguagenameturkish{\protect\foreignlanguage{#1}{turc}}%
+ \def\btxlanguagenameUKenglish{\protect\foreignlanguage{#1}{anglais}}%
+ \def\btxlanguagenameUSenglish{\protect\foreignlanguage{#1}{anglais}}%
+ \fi
+}
+% \end{macrocode}
+% \end{macro}
+% Copy the commands to the other languages.
+% \begin{macrocode}
+\newcommand\bibsfrancais{\bibsfrench[francais]}
+\newcommand\bibsfrenchb{\bibsfrench[frenchb]}
+\newcommand\bibscanadien{\bibsfrench[canadien]}
+% \end{macrocode}
+% Append the definitions to the language-calling commands.
+% \begin{macrocode}
+\AtBeginDocument{%
+ \ifbbbbfixlanguage
+ \else
+ \bbbbaddto{francais}{bibsfrancais}
+ \bbbbaddto{french}{bibsfrench}
+ \bbbbaddto{frenchb}{bibsfrenchb}
+ \bbbbaddto{canadien}{bibscanadien}
+ \fi
+% \end{macrocode}
+% Switch on the change of case in titles for all French dialects by
+% appending \cs{btxifchangecaseoff} to \cs{extras}\meta{language}.
+% \begin{macrocode}
+ \bbbbaddto{francais}{btxifchangecaseoff}
+ \bbbbaddto{french}{btxifchangecaseoff}
+ \bbbbaddto{frenchb}{btxifchangecaseoff}
+ \bbbbaddto{canadien}{btxifchangecaseoff}
+}
+% \end{macrocode}
+% \begin{macro}{\btxnumeralfrench}
+% \begin{macrocode}
+\makeatletter
+\DeclareRobustCommand\btxnumeralfrench[2]{%
+ \foreignlanguage{#1}{%
+ \ifnumber{#2}{%
+ \expandafter\btx@parsenum#2\@empty\@empty\@empty
+ \btxnumeralfont{%
+ \ifx\btx@digitb\@empty
+ \ifcase\btx@digita \ieme\or \iere\else \ieme\fi
+ \else
+ \ifnum\btx@digita=1
+ th%
+ \else
+ \ifcase\btx@digitb \ieme\or \iere\else \ieme\fi
+ \fi
+ \fi
+ }%
+ }{#2}%
+ }%
+}
+\makeatother
+% \end{macrocode}
+% \end{macro}
+% \changes{0.43}{2004/01/06}{Warn if using \texttt{french} language}%
+% \changes{0.44}{2004/01/06}{Only warn if babel version is too old}%
+% \changes{1.00}{2005/02/16}{Remove warning for old babel package with
+% \texttt{french} language}%
+% \begin{macrocode}
+%</french>
+% \end{macrocode}
+%
+% \subsubsection{Romanian}
+% \changes{1.31}{2012/01/03}{Added Serbian, Czech, and Romanian language}%
+% \begin{macrocode}
+%<*romanian>
+% \end{macrocode}
+%
+% \begin{macro}{\bibsromanian}
+% Bibliographic commands for Romanian.
+% \begin{macrocode}
+\newcommand\bibsromanian[1][romanian]{%
+ \def\biblanguagename{#1}%
+ \def\btxetalshort##1{\protect\foreignlanguage{#1}{et~al##1{}}}%
+ \def\btxetallong##1{\protect\foreignlanguage{#1}{et~alii}}%
+ \def\btxandshort##1{\protect\foreignlanguage{#1}{\hskip-1.5ex}}%
+ \def\btxandlong##1{\protect\foreignlanguage{#1}{\c{s}i}}%
+ \def\btxandcomma##1{,}%
+ \def\btxinlong##1{\protect\foreignlanguage{#1}{\^{i}n}}%
+ \def\btxinshort##1{\protect\foreignlanguage{#1}{\^{i}n}}%
+ \def\btxofseriesshort##1{\protect\foreignlanguage{#1}{din seria}}%
+ \def\btxinseriesshort##1{\protect\foreignlanguage{#1}{\^{i}n}}%
+ \def\btxofserieslong##1{\protect\foreignlanguage{#1}{din seria}}%
+ \def\btxinserieslong##1{\protect\foreignlanguage{#1}{\^{i}n}}%
+ \def\btxeditorshort##1{\protect\foreignlanguage{#1}{ed##1{}}}%
+ \def\btxeditorlong##1{\protect\foreignlanguage{#1}{editor}}%
+ \def\btxeditorsshort##1{\protect\foreignlanguage{#1}{ed##1{}}}%
+ \def\btxeditorslong##1{\protect\foreignlanguage{#1}{editori}}%
+ \def\btxvolumeshort##1{\protect\foreignlanguage{#1}{vol##1{}}}%
+ \def\btxvolumelong##1{\protect\foreignlanguage{#1}{volumul}}%
+ \def\btxnumbershort##1{\protect\foreignlanguage{#1}{nr##1{}}}%
+ \def\btxnumberlong##1{\protect\foreignlanguage{#1}{num\~{a}rul}}%
+ \def\btxeditionshort##1{\protect\foreignlanguage{#1}{Ed{##1}}}%
+ \def\btxeditionlong##1{\protect\foreignlanguage{#1}{Edi\c{t}ia}}%
+ \def\btxeditionnumshort##1##2{\btxeditionshort{##2}~\btxnumeralshort{##1}}%
+ \def\btxeditionnumlong##1##2{\btxeditionlong{##2}~\btxnumerallong{##1}}%
+ \def\btxchaptershort##1{\protect\foreignlanguage{#1}{cap##1{}}}%
+ \def\btxchapterlong##1{\protect\foreignlanguage{#1}{capitolul}}%
+ \def\btxpageshort##1{\protect\foreignlanguage{#1}{p##1{}}}%
+ \def\btxpagelong##1{\protect\foreignlanguage{#1}{pagina}}%
+ \def\btxpagesshort##1{\protect\foreignlanguage{#1}{pp##1{}}}%
+ \def\btxpageslong##1{\protect\foreignlanguage{#1}{paginile}}%
+ \def\btxmastthesis##1{\protect\foreignlanguage{#1}{%
+ Tez\~{a} de dizerta\c{t}ie}}%
+ \def\btxphdthesis##1{\protect\foreignlanguage{#1}{Tez\~{a} de doctorat}}%
+ \def\btxtechrepshort##1{\protect\foreignlanguage{#1}{Rap.\ tehn##1{}}}%
+ \def\btxtechreplong##1{\protect\foreignlanguage{#1}{Raport tehnic}}%
+ \def\btxmonjanlong##1{\protect\foreignlanguage{#1}{ianuarie}}%
+ \def\btxmonfeblong##1{\protect\foreignlanguage{#1}{februarie}}%
+ \def\btxmonmarlong##1{\protect\foreignlanguage{#1}{martie}}%
+ \def\btxmonaprlong##1{\protect\foreignlanguage{#1}{aprilie}}%
+ \def\btxmonmaylong##1{\protect\foreignlanguage{#1}{mai}}%
+ \def\btxmonjunlong##1{\protect\foreignlanguage{#1}{iunie}}%
+ \def\btxmonjullong##1{\protect\foreignlanguage{#1}{iulie}}%
+ \def\btxmonauglong##1{\protect\foreignlanguage{#1}{august}}%
+ \def\btxmonseplong##1{\protect\foreignlanguage{#1}{septembrie}}%
+ \def\btxmonoctlong##1{\protect\foreignlanguage{#1}{octombrie}}%
+ \def\btxmonnovlong##1{\protect\foreignlanguage{#1}{noiembrie}}%
+ \def\btxmondeclong##1{\protect\foreignlanguage{#1}{decembrie}}%
+ \def\btxmonjanshort##1{\protect\foreignlanguage{#1}{ian##1{}}}%
+ \def\btxmonfebshort##1{\protect\foreignlanguage{#1}{feb##1{}}}%
+ \def\btxmonmarshort##1{\protect\foreignlanguage{#1}{mart##1{}}}%
+ \def\btxmonaprshort##1{\protect\foreignlanguage{#1}{apr##1{}}}%
+ \def\btxmonmayshort##1{\protect\foreignlanguage{#1}{mai}}%
+ \def\btxmonjunshort##1{\protect\foreignlanguage{#1}{iun}}%
+ \def\btxmonjulshort##1{\protect\foreignlanguage{#1}{iul}}%
+ \def\btxmonaugshort##1{\protect\foreignlanguage{#1}{aug##1{}}}%
+ \def\btxmonsepshort##1{\protect\foreignlanguage{#1}{sept##1{}}}%
+ \def\btxmonoctshort##1{\protect\foreignlanguage{#1}{oct##1{}}}%
+ \def\btxmonnovshort##1{\protect\foreignlanguage{#1}{nov##1{}}}%
+ \def\btxmondecshort##1{\protect\foreignlanguage{#1}{dec##1{}}}%
+ \def\Btxinlong##1{\protect\foreignlanguage{#1}{\^{I}}}%
+ \def\Btxinshort##1{\protect\foreignlanguage{#1}{\^{I}}}%
+ \def\Btxeditorshort##1{\protect\foreignlanguage{#1}{Ed##1{}}}%
+ \def\Btxeditorlong##1{\protect\foreignlanguage{#1}{Editor}}%
+ \def\Btxeditorsshort##1{\protect\foreignlanguage{#1}{Ed##1{}}}%
+ \def\Btxeditorslong##1{\protect\foreignlanguage{#1}{Editori}}%
+ \def\Btxvolumeshort##1{\protect\foreignlanguage{#1}{Vol##1{}}}%
+ \def\Btxvolumelong##1{\protect\foreignlanguage{#1}{Volumul}}%
+ \def\Btxnumbershort##1{\protect\foreignlanguage{#1}{Nr##1{}}}%
+ \def\Btxnumberlong##1{\protect\foreignlanguage{#1}{Num\~{a}}}%
+ \def\Btxeditionshort##1{\protect\foreignlanguage{#1}{\hskip-1.5ex}}%
+ \def\Btxeditionlong##1{\protect\foreignlanguage{#1}{\hskip-1.5ex}}%
+ \def\Btxeditionnumshort##1##2{\btxnumeralshort{##1}~\Btxeditionshort{##2}}%
+ \def\Btxeditionnumlong##1##2{\btxnumerallong{##1}~\Btxeditionlong{##2}}%
+ \def\Btxchaptershort##1{\protect\foreignlanguage{#1}{Cap##1{}}}%
+ \def\Btxchapterlong##1{\protect\foreignlanguage{#1}{Capitolul}}%
+ \def\Btxpageshort##1{\protect\foreignlanguage{#1}{P##1{}}}%
+ \def\Btxpagelong##1{\protect\foreignlanguage{#1}{Pagina}}%
+ \def\Btxpagesshort##1{\protect\foreignlanguage{#1}{Pp##1{}}}%
+ \def\Btxpageslong##1{\protect\foreignlanguage{#1}{Paginile}}%
+ \def\Btxtechrepshort##1{\protect\foreignlanguage{#1}{Rap.\ tehn##1{}}}%
+ \def\Btxtechreplong##1{\protect\foreignlanguage{#1}{Raport tehnic}}%
+ \def\btxurldatecomment##1{\protect\foreignlanguage{#1}{, accesat la ##1}}%
+ \def\btxfnamespaceshort{}%
+ \def\btxfnamespacelong{ }%
+ \def\btxnumeralshort##1{\btxnumeralromanian{#1}{##1}}%
+ \def\btxnumerallong##1{\btxnumeralromanian{#1}{##1}}%
+% \end{macrocode}
+% Define how to print month and year in numeric format, e.\,g. MM/YYYY.
+% \begin{macrocode}
+ \def\btxprintmonthyearnum##1##2{##1/##2}%
+ \def\btxkeywordlanguage##1{{\protect\selectlanguage{#1}##1}}%
+ \ifbbbblanguagenames
+ \def\btxlanguagenameamerican{\protect\foreignlanguage{#1}{englez\~{a}}}%
+ \def\btxlanguagenameaustrian{\protect\foreignlanguage{#1}{german\~{a}}}%
+ \def\btxlanguagenamebrazil{\protect\foreignlanguage{#1}{portughez\~{a}}}%
+ \def\btxlanguagenamebrazilian{\protect\foreignlanguage{#1}{portughez\~{a}}}%
+ \def\btxlanguagenamebritish{\protect\foreignlanguage{#1}{englez\~{a}}}%
+ \def\btxlanguagenamebulgarian{\protect\foreignlanguage{#1}{bulgar\~{a}}}%
+ \def\btxlanguagenamecanadian{\protect\foreignlanguage{#1}{englez\~{a}}}%
+ \def\btxlanguagenamecanadien{\protect\foreignlanguage{#1}{francez\~{a}}}%
+ \def\btxlanguagenamecatalan{\protect\foreignlanguage{#1}{cataln\~{a}}}%
+ \def\btxlanguagenamecroatian{\protect\foreignlanguage{#1}{croat\~{a}}}%
+ \def\btxlanguagenameczech{\protect\foreignlanguage{#1}{ceh\~{a}}}%
+ \def\btxlanguagenamedanish{\protect\foreignlanguage{#1}{danez\~{a}}}%
+ \def\btxlanguagenamedutch{\protect\foreignlanguage{#1}{olandez\~{a}}}%
+ \def\btxlanguagenameenglish{\protect\foreignlanguage{#1}{englez\~{a}}}%
+ \def\btxlanguagenameesperanto{\protect\foreignlanguage{#1}{esperanto}}%
+ \def\btxlanguagenamefinnish{\protect\foreignlanguage{#1}{finlandez\~{a}}}%
+ \def\btxlanguagenamefrancais{\protect\foreignlanguage{#1}{fracez\~{a}}}%
+ \def\btxlanguagenamefrench{\protect\foreignlanguage{#1}{francez\~{a}}}%
+ \def\btxlanguagenamefrenchb{\protect\foreignlanguage{#1}{francez\~{a}}}%
+ \def\btxlanguagenamegerman{\protect\foreignlanguage{#1}{german\~{a}}}%
+ \def\btxlanguagenamegermanb{\protect\foreignlanguage{#1}{german\~{a}}}%
+ \def\btxlanguagenamegreek{\protect\foreignlanguage{#1}{greac\~{a}}}%
+ \def\btxlanguagenamehebrew{\protect\foreignlanguage{#1}{ebraic\~{a}}}%
+ \def\btxlanguagenamehungarian{\protect\foreignlanguage{#1}{ungar\~{a}}}%
+ \def\btxlanguagenameicelandic{\protect\foreignlanguage{#1}{islandez\~{a}}}%
+ \def\btxlanguagenameirish{\protect\foreignlanguage{#1}{irlandez\~{a}}}%
+ \def\btxlanguagenameitalian{\protect\foreignlanguage{#1}{italian\~{a}}}%
+ \def\btxlanguagenamelatin{\protect\foreignlanguage{#1}{latin\~{a}}}%
+ \def\btxlanguagenamenaustrian{\protect\foreignlanguage{#1}{german\~{a}}}%
+ \def\btxlanguagenamengerman{\protect\foreignlanguage{#1}{german\~{a}}}%
+ \def\btxlanguagenamenorsk{\protect\foreignlanguage{#1}{norvegian\~{a}}}%
+ \def\btxlanguagenamenynorsk{\protect\foreignlanguage{#1}{neo-norvegian\~{a}}}%
+ \def\btxlanguagenamepolish{\protect\foreignlanguage{#1}{polonez\~{a}}}%
+ \def\btxlanguagenameportuges{\protect\foreignlanguage{#1}{portughez\~{a}}}%
+ \def\btxlanguagenameportuguese{\protect\foreignlanguage{#1}{portughez\~{a}}}%
+ \def\btxlanguagenamerussian{\protect\foreignlanguage{#1}{rus\~{a}}}%
+ \def\btxlanguagenamescottish{\protect\foreignlanguage{#1}{sco\c{t}ian\~{a}}}%
+ \def\btxlanguagenameserbian{\protect\foreignlanguage{#1}{s\^{i}rb\~{a}}}%
+ \def\btxlanguagenamespanish{\protect\foreignlanguage{#1}{spaniol\~{a}}}%
+ \def\btxlanguagenameswedish{\protect\foreignlanguage{#1}{suedez\~{a}}}%
+ \def\btxlanguagenameturkish{\protect\foreignlanguage{#1}{turc\~{a}}}%
+ \def\btxlanguagenameUKenglish{\protect\foreignlanguage{#1}{englez\~{a}}}%
+ \def\btxlanguagenameUSenglish{\protect\foreignlanguage{#1}{englez\~{a}}}%
+ \fi
+}
+% \end{macrocode}
+% \end{macro}
+% Append the definitions to the language-calling commands.
+% \begin{macrocode}
+\AtBeginDocument{%
+ \ifbbbbfixlanguage
+ \else
+ \bbbbaddto{romanian}{bibsromanian}
+ \fi
+% \end{macrocode}
+% Switch off the change of case in titles for all Romanian dialects by
+% appending \cs{btxifchangecaseoff} to \cs{extras}\meta{language}.
+% \begin{macrocode}
+ \bbbbaddto{romanian}{btxifchangecaseoff}
+}
+%</romanian>
+% \end{macrocode}
+%
+% \subsubsection{Russian}
+% \begin{macrocode}
+%<*russian>
+% \end{macrocode}
+%
+% \begin{macro}{\bibsrussian}
+% Bibliographic commands for Russian.
+% \begin{macrocode}
+\newcommand\bibsrussian[1][russian]{%
+ \def\biblanguagename{#1}%
+ \def\btxetalshort##1{\protect\foreignlanguage{#1}{\IeC {\cyri }~\IeC
+ {\cyrd }\IeC {\cyrr }.##1{}}}%
+ \def\btxetallong##1{\protect\foreignlanguage{#1}{\IeC {\cyri }~\IeC
+ {\cyrd }\IeC {\cyrr }\IeC {\cyru }\IeC {\cyrg }\IeC {\cyri }\IeC
+ {\cyre }}}%
+ \def\btxandshort##1{\protect\foreignlanguage{#1}{\IeC {\cyri }}}%
+ \def\btxandlong##1{\protect\foreignlanguage{#1}{\IeC {\cyri }}}%
+ \def\btxandcomma##1{,}%
+ \def\btxinlong##1{\protect\foreignlanguage{#1}{\IeC {\cyrv }}}%
+ \def\btxinshort##1{\protect\foreignlanguage{#1}{\IeC {\cyrv }}}%
+ \def\btxofseriesshort##1{\protect\foreignlanguage{#1}{\IeC {\cyri
+ }\IeC {\cyrz }}}%
+ \def\btxinseriesshort##1{\protect\foreignlanguage{#1}{\IeC {\cyrv }}}%
+ \def\btxofserieslong##1{\protect\foreignlanguage{#1}{\IeC {\cyri
+ }\IeC {\cyrz }}}%
+ \def\btxinserieslong##1{\protect\foreignlanguage{#1}{\IeC {\cyrv }}}%
+ \def\btxeditorshort##1{\protect\foreignlanguage{#1}{\IeC {\cyrr
+ }\IeC {\cyre }\IeC {\cyrd }.##1{}}}%
+ \def\btxeditorlong##1{\protect\foreignlanguage{#1}{\IeC {\cyrr }\IeC
+ {\cyre }\IeC {\cyrd }\IeC {\cyra }\IeC {\cyrk }\IeC {\cyrt }\IeC
+ {\cyro }\IeC {\cyrr }}}%
+ \def\btxeditorsshort##1{\protect\foreignlanguage{#1}{\IeC {\cyrr
+ }\IeC {\cyre }\IeC {\cyrd }.##1{}}}%
+ \def\btxeditorslong##1{\protect\foreignlanguage{#1}{\IeC {\cyrr
+ }\IeC {\cyre }\IeC {\cyrd }\IeC {\cyra }\IeC {\cyrk }\IeC {\cyrt
+ }\IeC {\cyro }\IeC {\cyrr }\IeC {\cyrery }}}%
+ \def\btxvolumeshort##1{\protect\foreignlanguage{#1}{\IeC {\cyrt }.##1{}}}%
+ \def\btxvolumelong##1{\protect\foreignlanguage{#1}{\IeC {\cyrt }\IeC
+ {\cyro }\IeC {\cyrm }}}%
+ \def\btxnumbershort##1{\protect\foreignlanguage{#1}{%
+ n\textsuperscript{\underline{o}}}}%
+ \def\btxnumberlong##1{\protect\foreignlanguage{#1}{\IeC {\cyrn }\IeC
+ {\cyro }\IeC {\cyrm }\IeC {\cyre }\IeC {\cyrr }}}%
+ \def\btxeditionshort##1{\protect\foreignlanguage{#1}{\IeC {\cyrr
+ }\IeC {\cyre }\IeC {\cyrd }.##1{}}}%
+ \def\btxeditionlong##1{\protect\foreignlanguage{#1}{\IeC {\cyrr
+ }\IeC {\cyre }\IeC {\cyrd }\IeC {\cyra }\IeC {\cyrk }\IeC {\cyrc
+ }\IeC {\cyri }\IeC {\cyrya }}}%
+ \def\btxeditionnumshort##1##2{\btxnumeralshort{##1}~\btxeditionshort{##2}}%
+ \def\btxeditionnumlong##1##2{\btxnumerallong{##1}~\btxeditionlong{##2}}%
+ \def\btxchaptershort##1{\protect\foreignlanguage{#1}{\IeC {\cyrg
+ }\IeC {\cyrl }.##1{}}}%
+ \def\btxchapterlong##1{\protect\foreignlanguage{#1}{\IeC {\cyrg
+ }\IeC {\cyrl }\IeC {\cyra }\IeC {\cyrv }\IeC {\cyra }}}%
+ \def\btxpageshort##1{\protect\foreignlanguage{#1}{\IeC {\cyrs }\IeC
+ {\cyrt }\IeC {\cyrr }.##1{}}}%
+ \def\btxpagelong##1{\protect\foreignlanguage{#1}{\IeC {\cyrs }\IeC
+ {\cyrt }\IeC {\cyrr }\IeC {\cyra }\IeC {\cyrn }\IeC {\cyri }\IeC
+ {\cyrc }\IeC {\cyra }}}%
+ \def\btxpagesshort##1{\protect\foreignlanguage{#1}{\IeC {\cyrs }\IeC
+ {\cyrt }\IeC {\cyrr }.##1{}}}%
+ \def\btxpageslong##1{\protect\foreignlanguage{#1}{\IeC {\cyrs }\IeC
+ {\cyrt }\IeC {\cyrr }\IeC {\cyra }\IeC {\cyrn }\IeC {\cyri }\IeC
+ {\cyrc }\IeC {\cyrery }}}%
+ \def\btxmastthesis##1{\protect\foreignlanguage{#1}{\IeC {\CYRD }\IeC
+ {\cyri }\IeC {\cyrp }\IeC {\cyrl }\IeC {\cyro }\IeC {\cyrm }
+ \IeC {\cyrm }\IeC {\cyra }\IeC {\cyrg }\IeC {\cyri }\IeC {\cyrs
+ }\IeC {\cyrt }\IeC {\cyrr }\IeC {\cyra }}}%
+ \def\btxphdthesis##1{\protect\foreignlanguage{#1}{\IeC {\CYRK }\IeC
+ {\cyra }\IeC {\cyrn }\IeC {\cyrd }\IeC {\cyri }\IeC {\cyrd }\IeC
+ {\cyra }\IeC {\cyrt }\IeC {\cyrs }\IeC {\cyrk }\IeC {\cyra }\IeC
+ {\cyrya } \IeC {\cyrd }\IeC {\cyri }\IeC {\cyrs }\IeC {\cyrs
+ }\IeC {\cyre }\IeC {\cyrr }\IeC {\cyrt }\IeC {\cyra }\IeC {\cyrc
+ }\IeC {\cyri }\IeC {\cyrya }}}%
+ \def\btxtechrepshort##1{\protect\foreignlanguage{#1}{\IeC {\cyrt
+ }\IeC {\cyre }\IeC {\cyrh }.\ \IeC {\cyro }\IeC {\cyrt }\IeC
+ {\cyrch }\IeC {\cyre }\IeC {\cyrt }##1{}}}%
+ \def\btxtechreplong##1{\protect\foreignlanguage{#1}{\IeC {\cyrt
+ }\IeC {\cyre }\IeC {\cyrh }\IeC {\cyrn }\IeC {\cyri }\IeC
+ {\cyrch }\IeC {\cyre }\IeC {\cyrs }\IeC {\cyrk }\IeC {\cyri
+ }\IeC {\cyrishrt } \IeC {\cyro }\IeC {\cyrt }\IeC {\cyrch }\IeC
+ {\cyre }\IeC {\cyrt }}}%
+ \def\btxmonjanlong##1{\protect\foreignlanguage{#1}{\IeC {\cyrya
+ }\IeC {\cyrn }\IeC {\cyrv }\IeC {\cyra }\IeC {\cyrr }\IeC
+ {\cyrsftsn }}}%
+ \def\btxmonfeblong##1{\protect\foreignlanguage{#1}{\IeC {\cyrf }\IeC
+ {\cyre }\IeC {\cyrv }\IeC {\cyrr }\IeC {\cyra }\IeC {\cyrl }\IeC
+ {\cyrsftsn }}}%
+ \def\btxmonmarlong##1{\protect\foreignlanguage{#1}{\IeC {\cyrm }\IeC
+ {\cyra }\IeC {\cyrr }\IeC {\cyrt }}}%
+ \def\btxmonaprlong##1{\protect\foreignlanguage{#1}{\IeC {\cyra }\IeC
+ {\cyrp }\IeC {\cyrr }\IeC {\cyre }\IeC {\cyrl }\IeC {\cyrsftsn
+ }}}%
+ \def\btxmonmaylong##1{\protect\foreignlanguage{#1}{\IeC {\cyrm }\IeC
+ {\cyra }\IeC {\cyrishrt }}}%
+ \def\btxmonjunlong##1{\protect\foreignlanguage{#1}{\IeC {\cyri }\IeC
+ {\cyryu }\IeC {\cyrn }\IeC {\cyrsftsn }}}%
+ \def\btxmonjullong##1{\protect\foreignlanguage{#1}{\IeC {\cyri }\IeC
+ {\cyryu }\IeC {\cyrl }\IeC {\cyrsftsn }}}%
+ \def\btxmonauglong##1{\protect\foreignlanguage{#1}{\IeC {\cyra }\IeC
+ {\cyrv }\IeC {\cyrg }\IeC {\cyru }\IeC {\cyrs }\IeC {\cyrt }}}%
+ \def\btxmonseplong##1{\protect\foreignlanguage{#1}{\IeC {\cyrs }\IeC
+ {\cyre }\IeC {\cyrn }\IeC {\cyrt }\IeC {\cyrya }\IeC {\cyrb
+ }\IeC {\cyrr }\IeC {\cyrsftsn }}}%
+ \def\btxmonoctlong##1{\protect\foreignlanguage{#1}{\IeC {\cyro }\IeC
+ {\cyrk }\IeC {\cyrt }\IeC {\cyrya }\IeC {\cyrb }\IeC {\cyrr
+ }\IeC {\cyrsftsn }}}%
+ \def\btxmonnovlong##1{\protect\foreignlanguage{#1}{\IeC {\cyrn }\IeC
+ {\cyro }\IeC {\cyrya }\IeC {\cyrb }\IeC {\cyrr }\IeC {\cyrsftsn
+ }}}%
+ \def\btxmondeclong##1{\protect\foreignlanguage{#1}{\IeC {\cyrd }\IeC
+ {\cyre }\IeC {\cyrk }\IeC {\cyra }\IeC {\cyrb }\IeC {\cyrr }\IeC
+ {\cyrsftsn }}}%
+ \def\btxmonjanshort##1{\protect\foreignlanguage{#1}{\IeC {\cyrya
+ }\IeC {\cyrn }\IeC {\cyrv }.##1{}}}%
+ \def\btxmonfebshort##1{\protect\foreignlanguage{#1}{\IeC {\cyrf
+ }\IeC {\cyre }\IeC {\cyrv }.##1{}}}%
+ \def\btxmonmarshort##1{\protect\foreignlanguage{#1}{\IeC {\cyrm
+ }\IeC {\cyra }\IeC {\cyrr }.##1{}}}%
+ \def\btxmonaprshort##1{\protect\foreignlanguage{#1}{\IeC {\cyra
+ }\IeC {\cyrp }\IeC {\cyrr }.##1{}}}%
+ \def\btxmonmayshort##1{\protect\foreignlanguage{#1}{\IeC {\cyrm
+ }\IeC {\cyra }\IeC {\cyrishrt }}}%
+ \def\btxmonjunshort##1{\protect\foreignlanguage{#1}{\IeC {\cyri
+ }\IeC {\cyryu }\IeC {\cyrn }\IeC {\cyrsftsn }##1{}}}%
+ \def\btxmonjulshort##1{\protect\foreignlanguage{#1}{\IeC {\cyri
+ }\IeC {\cyryu }\IeC {\cyrl }\IeC {\cyrsftsn }##1{}}}%
+ \def\btxmonaugshort##1{\protect\foreignlanguage{#1}{\IeC {\cyra
+ }\IeC {\cyrv }\IeC {\cyrg }.##1{}}}%
+ \def\btxmonsepshort##1{\protect\foreignlanguage{#1}{\IeC {\cyrs
+ }\IeC {\cyre }\IeC {\cyrn }.##1{}}}%
+ \def\btxmonoctshort##1{\protect\foreignlanguage{#1}{\IeC {\cyro
+ }\IeC {\cyrk }\IeC {\cyrt }.##1{}}}%
+ \def\btxmonnovshort##1{\protect\foreignlanguage{#1}{\IeC {\cyrn
+ }\IeC {\cyro }\IeC {\cyrya }.##1{}}}%
+ \def\btxmondecshort##1{\protect\foreignlanguage{#1}{\IeC {\cyrd
+ }\IeC {\cyre }\IeC {\cyrk }.##1{}}}%
+ \def\Btxinlong##1{\protect\foreignlanguage{#1}{\IeC {\CYRV }}}%
+ \def\Btxinshort##1{\protect\foreignlanguage{#1}{\IeC {\CYRV }}}%
+ \def\Btxeditorshort##1{\protect\foreignlanguage{#1}{\IeC {\CYRR
+ }\IeC {\cyre }\IeC {\cyrd }.##1{}}}%
+ \def\Btxeditorlong##1{\protect\foreignlanguage{#1}{\IeC {\CYRR }\IeC
+ {\cyre }\IeC {\cyrd }\IeC {\cyra }\IeC {\cyrk }\IeC {\cyrt }\IeC
+ {\cyro }\IeC {\cyrr }}}%
+ \def\Btxeditorsshort##1{\protect\foreignlanguage{#1}{\IeC {\CYRR
+ }\IeC {\cyre }\IeC {\cyrd }.##1{}}}%
+ \def\Btxeditorslong##1{\protect\foreignlanguage{#1}{\IeC {\CYRR
+ }\IeC {\cyre }\IeC {\cyrd }\IeC {\cyra }\IeC {\cyrk }\IeC {\cyrt
+ }\IeC {\cyro }\IeC {\cyrr }\IeC {\cyrery }}}%
+ \def\Btxvolumeshort##1{\protect\foreignlanguage{#1}{\IeC {\CYRT }.##1{}}}%
+ \def\Btxvolumelong##1{\protect\foreignlanguage{#1}{\IeC {\CYRT }\IeC
+ {\cyro }\IeC {\cyrm }}}%
+ \def\Btxnumbershort##1{\protect\foreignlanguage{#1}{%
+ N\textsuperscript{\underline{o}}}}%
+ \def\Btxnumberlong##1{\protect\foreignlanguage{#1}{\IeC {\CYRN }\IeC
+ {\cyro }\IeC {\cyrm }\IeC {\cyre }\IeC {\cyrr }}}%
+ \def\Btxeditionshort##1{\protect\foreignlanguage{#1}{\IeC {\CYRR
+ }\IeC {\cyre }\IeC {\cyrd }.##1{}}}%
+ \def\Btxeditionlong##1{\protect\foreignlanguage{#1}{\IeC {\CYRR
+ }\IeC {\cyre }\IeC {\cyrd }\IeC {\cyra }\IeC {\cyrk }\IeC {\cyrc
+ }\IeC {\cyri }\IeC {\cyrya }}}%
+ \def\Btxeditionnumshort##1##2{\btxnumeralshort{##1}~\Btxeditionshort{##2}}%
+ \def\Btxeditionnumlong##1##2{\btxnumerallong{##1}~\Btxeditionlong{##2}}%
+ \def\Btxchaptershort##1{\protect\foreignlanguage{#1}{\IeC {\CYRG
+ }\IeC {\cyrl }.##1{}}}%
+ \def\Btxchapterlong##1{\protect\foreignlanguage{#1}{\IeC {\CYRG
+ }\IeC {\cyrl }\IeC {\cyra }\IeC {\cyrv }\IeC {\cyra }}}%
+ \def\Btxpageshort##1{\protect\foreignlanguage{#1}{\IeC {\CYRS }\IeC
+ {\cyrt }\IeC {\cyrr }.##1{}}}%
+ \def\Btxpagelong##1{\protect\foreignlanguage{#1}{\IeC {\CYRS }\IeC
+ {\cyrt }\IeC {\cyrr }\IeC {\cyra }\IeC {\cyrn }\IeC {\cyri }\IeC
+ {\cyrc }\IeC {\cyra }}}%
+ \def\Btxpagesshort##1{\protect\foreignlanguage{#1}{\IeC {\CYRS }\IeC
+ {\cyrt }\IeC {\cyrr }.##1{}}}%
+ \def\Btxpageslong##1{\protect\foreignlanguage{#1}{\IeC {\CYRS }\IeC
+ {\cyrt }\IeC {\cyrr }\IeC {\cyra }\IeC {\cyrn }\IeC {\cyri }\IeC
+ {\cyrc }\IeC {\cyrery }}}%
+ \def\Btxtechrepshort##1{\protect\foreignlanguage{#1}{\IeC {\CYRT
+ }\IeC {\cyre }\IeC {\cyrh }.\ \IeC {\cyro }\IeC {\cyrt }\IeC
+ {\cyrch }\IeC {\cyre }\IeC {\cyrt }##1{}}}%
+ \def\Btxtechreplong##1{\protect\foreignlanguage{#1}{\IeC {\CYRT
+ }\IeC {\cyre }\IeC {\cyrh }\IeC {\cyrn }\IeC {\cyri }\IeC
+ {\cyrch }\IeC {\cyre }\IeC {\cyrs }\IeC {\cyrk }\IeC {\cyri
+ }\IeC {\cyrishrt } \IeC {\cyro }\IeC {\cyrt }\IeC {\cyrch }\IeC
+ {\cyre }\IeC {\cyrt }}}%
+ \def\btxurldatecomment##1{\protect\foreignlanguage{#1}{, \IeC {\cyrp
+ }\IeC {\cyro }\IeC {\cyrs }\IeC {\cyre }\IeC {\cyrshch }\IeC
+ {\cyre }\IeC {\cyrn }\IeC {\cyro } ##1}}%
+ \def\btxfnamespaceshort{\,}%
+ \def\btxfnamespacelong{ }%
+ \def\btxnumeralshort##1{\btxnumeralfallback{#1}{##1}}%
+ \def\btxnumerallong##1{\btxnumeralfallback{#1}{##1}}%
+% \end{macrocode}
+% Define how to print month and year in numeric format, e.\,g. MM/YYYY.
+% \begin{macrocode}
+ \def\btxprintmonthyearnum##1##2{##1/##2}%
+ \def\btxkeywordlanguage##1{{\protect\selectlanguage{#1}##1}}%
+ \ifbbbblanguagenames
+ \def\btxlanguagenameamerican{\protect\foreignlanguage{#1}{\IeC
+ {\cyra }\IeC {\cyrn }\IeC {\cyrg }\IeC {\cyrl }\IeC {\cyri
+ }\IeC {\cyrishrt }\IeC {\cyrs }\IeC {\cyrk }\IeC {\cyri }\IeC
+ {\cyrishrt }}}%
+ \def\btxlanguagenameaustrian{\protect\foreignlanguage{#1}{\IeC
+ {\cyra }\IeC {\cyrv }\IeC {\cyrs }\IeC {\cyrt }\IeC {\cyrr
+ }\IeC {\cyri }\IeC {\cyrishrt }\IeC {\cyrs }\IeC {\cyrk }\IeC
+ {\cyri }\IeC {\cyrishrt }}}%
+ \def\btxlanguagenamebrazil{\protect\foreignlanguage{#1}{\IeC
+ {\cyrp }\IeC {\cyro }\IeC {\cyrr }\IeC {\cyrt }\IeC {\cyru
+ }\IeC {\cyrg }\IeC {\cyra }\IeC {\cyrl }\IeC {\cyrsftsn }\IeC
+ {\cyrs }\IeC {\cyrk }\IeC {\cyri }\IeC {\cyrishrt }}}%
+ \def\btxlanguagenamebrazilian{\protect\foreignlanguage{#1}{\IeC
+ {\cyrp }\IeC {\cyro }\IeC {\cyrr }\IeC {\cyrt }\IeC {\cyru
+ }\IeC {\cyrg }\IeC {\cyra }\IeC {\cyrl }\IeC {\cyrsftsn }\IeC
+ {\cyrs }\IeC {\cyrk }\IeC {\cyri }\IeC {\cyrishrt }}}%
+ \def\btxlanguagenamebritish{\protect\foreignlanguage{#1}{\IeC
+ {\cyra }\IeC {\cyrn }\IeC {\cyrg }\IeC {\cyrl }\IeC {\cyri
+ }\IeC {\cyrishrt }\IeC {\cyrs }\IeC {\cyrk }\IeC {\cyri }\IeC
+ {\cyrishrt }}}%
+ \def\btxlanguagenamebulgarian{\protect\foreignlanguage{#1}{\IeC
+ {\cyrb }\IeC {\cyro }\IeC {\cyrl }\IeC {\cyrg }\IeC {\cyra
+ }\IeC {\cyrr }\IeC {\cyrs }\IeC {\cyrk }\IeC {\cyri }\IeC
+ {\cyrishrt }}}%
+ \def\btxlanguagenamecanadian{\protect\foreignlanguage{#1}{\IeC
+ {\cyra }\IeC {\cyrn }\IeC {\cyrg }\IeC {\cyrl }\IeC {\cyri
+ }\IeC {\cyrishrt }\IeC {\cyrs }\IeC {\cyrk }\IeC {\cyri }\IeC
+ {\cyrishrt }}}%
+ \def\btxlanguagenamecanadien{\protect\foreignlanguage{#1}{\IeC
+ {\cyrf }\IeC {\cyrr }\IeC {\cyra }\IeC {\cyrn }\IeC {\cyrc
+ }\IeC {\cyru }\IeC {\cyrz }\IeC {\cyrs }\IeC {\cyrk }\IeC
+ {\cyri }\IeC {\cyrishrt }}}%
+ \def\btxlanguagenamecatalan{\protect\foreignlanguage{#1}{\IeC
+ {\cyrk }\IeC {\cyra }\IeC {\cyrt }\IeC {\cyra }\IeC {\cyrl
+ }\IeC {\cyro }\IeC {\cyrn }\IeC {\cyrs }\IeC {\cyrk }\IeC
+ {\cyri }\IeC {\cyrishrt }}}%
+ \def\btxlanguagenamecroatian{\protect\foreignlanguage{#1}{\IeC
+ {\cyrh }\IeC {\cyro }\IeC {\cyrr }\IeC {\cyrv }\IeC {\cyra
+ }\IeC {\cyrt }\IeC {\cyrs }\IeC {\cyrk }\IeC {\cyri }\IeC
+ {\cyrishrt }}}%
+ \def\btxlanguagenameczech{\protect\foreignlanguage{#1}{\IeC
+ {\cyrch }\IeC {\cyre }\IeC {\cyrsh }\IeC {\cyrs }\IeC {\cyrk
+ }\IeC {\cyri }\IeC {\cyrishrt }}}%
+ \def\btxlanguagenamedanish{\protect\foreignlanguage{#1}{\IeC
+ {\cyrd }\IeC {\cyra }\IeC {\cyrt }\IeC {\cyrs }\IeC {\cyrk
+ }\IeC {\cyri }\IeC {\cyrishrt }}}%
+ \def\btxlanguagenamedutch{\protect\foreignlanguage{#1}{\IeC {\cyrg
+ }\IeC {\cyro }\IeC {\cyrl }\IeC {\cyrl }\IeC {\cyra }\IeC
+ {\cyrn }\IeC {\cyrd }\IeC {\cyrs }\IeC {\cyrk }\IeC {\cyri
+ }\IeC {\cyrishrt }}}%
+ \def\btxlanguagenameenglish{\protect\foreignlanguage{#1}{\IeC
+ {\cyra }\IeC {\cyrn }\IeC {\cyrg }\IeC {\cyrl }\IeC {\cyri
+ }\IeC {\cyrishrt }\IeC {\cyrs }\IeC {\cyrk }\IeC {\cyri }\IeC
+ {\cyrishrt }}}%
+ \def\btxlanguagenameesperanto{\protect\foreignlanguage{#1}{\IeC
+ {\cyrerev }\IeC {\cyrs }\IeC {\cyrp }\IeC {\cyre }\IeC {\cyrr
+ }\IeC {\cyra }\IeC {\cyrn }\IeC {\cyrt }\IeC {\cyro }}}%
+ \def\btxlanguagenamefinnish{\protect\foreignlanguage{#1}{\IeC
+ {\cyrf }\IeC {\cyri }\IeC {\cyrn }\IeC {\cyrs }\IeC {\cyrk
+ }\IeC {\cyri }\IeC {\cyrishrt }}}%
+ \def\btxlanguagenamefranceis{\protect\foreignlanguage{#1}{\IeC
+ {\cyrf }\IeC {\cyrr }\IeC {\cyra }\IeC {\cyrn }\IeC {\cyrc
+ }\IeC {\cyru }\IeC {\cyrz }\IeC {\cyrs }\IeC {\cyrk }\IeC
+ {\cyri }\IeC {\cyrishrt }}}%
+ \def\btxlanguagenamefrench{\protect\foreignlanguage{#1}{\IeC
+ {\cyrf }\IeC {\cyrr }\IeC {\cyra }\IeC {\cyrn }\IeC {\cyrc
+ }\IeC {\cyru }\IeC {\cyrz }\IeC {\cyrs }\IeC {\cyrk }\IeC
+ {\cyri }\IeC {\cyrishrt }}}%
+ \def\btxlanguagenamefrenchb{\protect\foreignlanguage{#1}{\IeC
+ {\cyrf }\IeC {\cyrr }\IeC {\cyra }\IeC {\cyrn }\IeC {\cyrc
+ }\IeC {\cyru }\IeC {\cyrz }\IeC {\cyrs }\IeC {\cyrk }\IeC
+ {\cyri }\IeC {\cyrishrt }}}%
+ \def\btxlanguagenamegerman{\protect\foreignlanguage{#1}{\IeC
+ {\cyrn }\IeC {\cyre }\IeC {\cyrm }\IeC {\cyre }\IeC {\cyrc
+ }\IeC {\cyrk }\IeC {\cyri }\IeC {\cyrishrt }}}%
+ \def\btxlanguagenamegermanb{\protect\foreignlanguage{#1}{\IeC
+ {\cyrn }\IeC {\cyre }\IeC {\cyrm }\IeC {\cyre }\IeC {\cyrc
+ }\IeC {\cyrk }\IeC {\cyri }\IeC {\cyrishrt }}}%
+ \def\btxlanguagenamegreek{\protect\foreignlanguage{#1}{\IeC {\cyrg
+ }\IeC {\cyrr }\IeC {\cyre }\IeC {\cyrch }\IeC {\cyre }\IeC
+ {\cyrs }\IeC {\cyrk }\IeC {\cyri }\IeC {\cyrishrt }}}%
+ \def\btxlanguagenamehebrew{\protect\foreignlanguage{#1}{\IeC
+ {\cyre }\IeC {\cyrv }\IeC {\cyrr }\IeC {\cyre }\IeC {\cyrishrt
+ }\IeC {\cyrs }\IeC {\cyrk }\IeC {\cyri }\IeC {\cyrishrt }}}%
+ \def\btxlanguagenamehungarian{\protect\foreignlanguage{#1}{\IeC
+ {\cyrv }\IeC {\cyre }\IeC {\cyrn }\IeC {\cyrg }\IeC {\cyre
+ }\IeC {\cyrr }\IeC {\cyrs }\IeC {\cyrk }\IeC {\cyri }\IeC
+ {\cyrishrt }}}%
+ \def\btxlanguagenameicelandic{\protect\foreignlanguage{#1}{\IeC
+ {\cyri }\IeC {\cyrs }\IeC {\cyrl }\IeC {\cyra }\IeC {\cyrn
+ }\IeC {\cyrd }\IeC {\cyrs }\IeC {\cyrk }\IeC {\cyri }\IeC
+ {\cyrishrt }}}%
+ \def\btxlanguagenameirish{\protect\foreignlanguage{#1}{\IeC {\cyri
+ }\IeC {\cyrr }\IeC {\cyrl }\IeC {\cyra }\IeC {\cyrn }\IeC
+ {\cyrd }\IeC {\cyrs }\IeC {\cyrk }\IeC {\cyri }\IeC {\cyrishrt
+ }}}%
+ \def\btxlanguagenameitalian{\protect\foreignlanguage{#1}{\IeC
+ {\cyri }\IeC {\cyrt }\IeC {\cyra }\IeC {\cyrl }\IeC {\cyrsftsn
+ }\IeC {\cyrya }\IeC {\cyrn }\IeC {\cyrs }\IeC {\cyrk }\IeC
+ {\cyri }\IeC {\cyrishrt }}}%
+ \def\btxlanguagenamelatin{\protect\foreignlanguage{#1}{\IeC {\cyrl
+ }\IeC {\cyra }\IeC {\cyrt }\IeC {\cyri }\IeC {\cyrn }\IeC
+ {\cyrs }\IeC {\cyrk }\IeC {\cyri }\IeC {\cyrishrt }}}%
+ \def\btxlanguagenamenaustrian{\protect\foreignlanguage{#1}{\IeC
+ {\cyrn }\IeC {\cyre }\IeC {\cyrm }\IeC {\cyre }\IeC {\cyrc
+ }\IeC {\cyrk }\IeC {\cyri }\IeC {\cyrishrt }}}%
+ \def\btxlanguagenamengerman{\protect\foreignlanguage{#1}{\IeC
+ {\cyrn }\IeC {\cyre }\IeC {\cyrm }\IeC {\cyre }\IeC {\cyrc
+ }\IeC {\cyrk }\IeC {\cyri }\IeC {\cyrishrt }}}%
+ \def\btxlanguagenamenorsk{\protect\foreignlanguage{#1}{\IeC {\cyrn
+ }\IeC {\cyro }\IeC {\cyrr }\IeC {\cyrv }\IeC {\cyre }\IeC
+ {\cyrzh }\IeC {\cyrs }\IeC {\cyrk }\IeC {\cyri }\IeC
+ {\cyrishrt }}}%
+ \def\btxlanguagenamenynorsk{\protect\foreignlanguage{#1}{\IeC
+ {\cyrn }\IeC {\cyro }\IeC {\cyrv }\IeC {\cyro }\IeC {\cyrn
+ }\IeC {\cyro }\IeC {\cyrr }\IeC {\cyrv }\IeC {\cyre }\IeC
+ {\cyrzh }\IeC {\cyrs }\IeC {\cyrk }\IeC {\cyri }\IeC
+ {\cyrishrt }}}%
+ \def\btxlanguagenamepolish{\protect\foreignlanguage{#1}{\IeC
+ {\cyrp }\IeC {\cyro }\IeC {\cyrl }\IeC {\cyrsftsn }\IeC {\cyrs
+ }\IeC {\cyrk }\IeC {\cyri }\IeC {\cyrishrt }}}%
+ \def\btxlanguagenameportuges{\protect\foreignlanguage{#1}{\IeC
+ {\cyrp }\IeC {\cyro }\IeC {\cyrr }\IeC {\cyrt }\IeC {\cyru
+ }\IeC {\cyrg }\IeC {\cyra }\IeC {\cyrl }\IeC {\cyrsftsn }\IeC
+ {\cyrs }\IeC {\cyrk }\IeC {\cyri }\IeC {\cyrishrt }}}%
+ \def\btxlanguagenameportuguese{\protect\foreignlanguage{#1}{\IeC
+ {\cyrp }\IeC {\cyro }\IeC {\cyrr }\IeC {\cyrt }\IeC {\cyru
+ }\IeC {\cyrg }\IeC {\cyra }\IeC {\cyrl }\IeC {\cyrsftsn }\IeC
+ {\cyrs }\IeC {\cyrk }\IeC {\cyri }\IeC {\cyrishrt }}}%
+ \def\btxlanguagenamerussian{\protect\foreignlanguage{#1}{\IeC
+ {\cyrr }\IeC {\cyru }\IeC {\cyrs }\IeC {\cyrs }\IeC {\cyrk
+ }\IeC {\cyri }\IeC {\cyrishrt }}}%
+ \def\btxlanguagenamescottish{\protect\foreignlanguage{#1}{\IeC
+ {\cyrsh }\IeC {\cyro }\IeC {\cyrt }\IeC {\cyrl }\IeC {\cyra
+ }\IeC {\cyrn }\IeC {\cyrd }\IeC {\cyrs }\IeC {\cyrk }\IeC
+ {\cyri }\IeC {\cyrishrt }}}%
+ \def\btxlanguagenameserbian{\protect\foreignlanguage{#1}{\IeC
+ {\cyrs }\IeC {\cyre }\IeC {\cyrr }\IeC {\cyrb }\IeC {\cyrs
+ }\IeC {\cyrk }\IeC {\cyri }\IeC {\cyrishrt }}}%
+ \def\btxlanguagenamespanish{\protect\foreignlanguage{#1}{\IeC
+ {\cyri }\IeC {\cyrs }\IeC {\cyrp }\IeC {\cyra }\IeC {\cyrn
+ }\IeC {\cyrs }\IeC {\cyrk }\IeC {\cyri }\IeC {\cyrishrt }}}%
+ \def\btxlanguagenameswedish{\protect\foreignlanguage{#1}{\IeC
+ {\cyrsh }\IeC {\cyrv }\IeC {\cyre }\IeC {\cyrd }\IeC {\cyrs
+ }\IeC {\cyrk }\IeC {\cyri }\IeC {\cyrishrt }}}%
+ \def\btxlanguagenameturkish{\protect\foreignlanguage{#1}{\IeC
+ {\cyrt }\IeC {\cyru }\IeC {\cyrr }\IeC {\cyre }\IeC {\cyrc
+ }\IeC {\cyrk }\IeC {\cyri }\IeC {\cyrishrt }}}%
+ \def\btxlanguagenameukrainian{\protect\foreignlanguage{#1}{\IeC
+ {\cyru }\IeC {\cyrk }\IeC {\cyrr }\IeC {\cyra }\IeC {\cyri
+ }\IeC {\cyrn }\IeC {\cyrs }\IeC {\cyrk }\IeC {\cyri }\IeC
+ {\cyrishrt }}}%
+ \def\btxlanguagenameUKenglish{\protect\foreignlanguage{#1}{\IeC
+ {\cyra }\IeC {\cyrn }\IeC {\cyrg }\IeC {\cyrl }\IeC {\cyri
+ }\IeC {\cyrishrt }\IeC {\cyrs }\IeC {\cyrk }\IeC {\cyri }\IeC
+ {\cyrishrt }}}%
+ \def\btxlanguagenameUSenglish{\protect\foreignlanguage{#1}{\IeC
+ {\cyra }\IeC {\cyrn }\IeC {\cyrg }\IeC {\cyrl }\IeC {\cyri
+ }\IeC {\cyrishrt }\IeC {\cyrs }\IeC {\cyrk }\IeC {\cyri }\IeC
+ {\cyrishrt }}}%
+ \fi
+}
+% \end{macrocode}
+% \end{macro}
+% Copy the commands to the other languages.
+% \begin{macrocode}
+\newcommand\bibsrussianb{\bibsrussian[russianb]}
+% \end{macrocode}
+% Append the definitions to the language-calling commands.
+% \begin{macrocode}
+\AtBeginDocument{%
+ \ifbbbbfixlanguage
+ \else
+ \bbbbaddto{russianb}{bibrussianb}
+ \bbbbaddto{russian}{bibsrussian}
+ \fi
+% \end{macrocode}
+% Switch off the change of case in titles for all Russian dialects by
+% appending \cs{btxifchangecaseoff} to \cs{extras}\meta{language}.
+% \begin{macrocode}
+ \bbbbaddto{russianb}{btxifchangecaseoff}
+ \bbbbaddto{russian}{btxifchangecaseoff}
+}
+%</russian>
+% \end{macrocode}
+%
+% \subsubsection{Serbian}
+% \changes{1.31}{2012/01/03}{Added Serbian, Czech, and Romanian language}%
+% \begin{macrocode}
+%<*serbian>
+% \end{macrocode}
+%
+% The language definition for Serbian was provided by Zoran Filipovic.
+%
+% \begin{macro}{\bibsserbian}
+% Bibliographic commands for Serbian.
+% \begin{macrocode}
+\newcommand\bibsserbian[1][serbian]{%
+ \def\biblanguagename{#1}%
+ \def\btxetalshort##1{\protect\foreignlanguage{#1}{i~dr.##1{}}}%
+ \def\btxetallong##1{\protect\foreignlanguage{#1}{i~drugi}}%
+ \def\btxandshort##1{\protect\foreignlanguage{#1}{i}}%
+ \def\btxandlong##1{\protect\foreignlanguage{#1}{i}}%
+ \def\btxandcomma##1{,}%
+ \def\btxinlong##1{\protect\foreignlanguage{#1}{u:}}%
+ \def\btxinshort##1{\protect\foreignlanguage{#1}{u:}}%
+ \def\btxofseriesshort##1{\protect\foreignlanguage{#1}{iz}}%
+ \def\btxinseriesshort##1{\protect\foreignlanguage{#1}{u}}%
+ \def\btxofserieslong##1{\protect\foreignlanguage{#1}{iz}}%
+ \def\btxinserieslong##1{\protect\foreignlanguage{#1}{u}}%
+ \def\btxeditorshort##1{\protect\foreignlanguage{#1}{ur.##1{}}}%
+ \def\btxeditorlong##1{\protect\foreignlanguage{#1}{urednik}}%
+ \def\btxeditorsshort##1{\protect\foreignlanguage{#1}{ur.##1{}}}%
+ \def\btxeditorslong##1{\protect\foreignlanguage{#1}{urednici}}%
+ \def\btxvolumeshort##1{\protect\foreignlanguage{#1}{tm.##1{}}}%
+ \def\btxvolumelong##1{\protect\foreignlanguage{#1}{tom}}%
+ \def\btxnumbershort##1{\protect\foreignlanguage{#1}{br.##1{}}}%
+ \def\btxnumberlong##1{\protect\foreignlanguage{#1}{broj}}%
+ \def\btxeditionshort##1{\protect\foreignlanguage{#1}{ed.##1{}}}%
+ \def\btxeditionlong##1{\protect\foreignlanguage{#1}{edicija}}%
+ \def\btxeditionnumshort##1##2{\btxnumeralshort{##1}~\btxeditionshort{##2}}%
+ \def\btxeditionnumlong##1##2{\btxnumerallong{##1}~\btxeditionlong{##2}}%
+ \def\btxchaptershort##1{\protect\foreignlanguage{#1}{pog.##1{}}}%
+ \def\btxchapterlong##1{\protect\foreignlanguage{#1}{poglavlje}}%
+ \def\btxpageshort##1{\protect\foreignlanguage{#1}{str.##1{}}}%
+ \def\btxpagelong##1{\protect\foreignlanguage{#1}{strana}}%
+ \def\btxpagesshort##1{\protect\foreignlanguage{#1}{str.##1{}}}%
+ \def\btxpageslong##1{\protect\foreignlanguage{#1}{strane}}%
+ \def\btxmastthesis##1{\protect\foreignlanguage{#1}{Magistarska teza}}%
+ \def\btxphdthesis##1{\protect\foreignlanguage{#1}{Doktorska disertacija}}%
+ \def\btxtechrepshort##1{\protect\foreignlanguage{#1}{Tehn.\ izv##1{}}}%
+ \def\btxtechreplong##1{\protect\foreignlanguage{#1}{%
+ Tehni\v cki izve\v staj}}%
+ \def\btxmonjanlong##1{\protect\foreignlanguage{#1}{Januar}}%
+ \def\btxmonfeblong##1{\protect\foreignlanguage{#1}{Februar}}%
+ \def\btxmonmarlong##1{\protect\foreignlanguage{#1}{Mart}}%
+ \def\btxmonaprlong##1{\protect\foreignlanguage{#1}{April}}%
+ \def\btxmonmaylong##1{\protect\foreignlanguage{#1}{Maj}}%
+ \def\btxmonjunlong##1{\protect\foreignlanguage{#1}{Jun}}%
+ \def\btxmonjullong##1{\protect\foreignlanguage{#1}{Jul}}%
+ \def\btxmonauglong##1{\protect\foreignlanguage{#1}{Avgust}}%
+ \def\btxmonseplong##1{\protect\foreignlanguage{#1}{Septembar}}%
+ \def\btxmonoctlong##1{\protect\foreignlanguage{#1}{Octobar}}%
+ \def\btxmonnovlong##1{\protect\foreignlanguage{#1}{Novembar}}%
+ \def\btxmondeclong##1{\protect\foreignlanguage{#1}{Decembar}}%
+ \def\btxmonjanshort##1{\protect\foreignlanguage{#1}{Jan##1{}}}%
+ \def\btxmonfebshort##1{\protect\foreignlanguage{#1}{Feb##1{}}}%
+ \def\btxmonmarshort##1{\protect\foreignlanguage{#1}{Mar##1{}}}%
+ \def\btxmonaprshort##1{\protect\foreignlanguage{#1}{Apr##1{}}}%
+ \def\btxmonmayshort##1{\protect\foreignlanguage{#1}{Maj}}%
+ \def\btxmonjunshort##1{\protect\foreignlanguage{#1}{Jun}}%
+ \def\btxmonjulshort##1{\protect\foreignlanguage{#1}{Jul}}%
+ \def\btxmonaugshort##1{\protect\foreignlanguage{#1}{Avg##1{}}}%
+ \def\btxmonsepshort##1{\protect\foreignlanguage{#1}{Sept##1{}}}%
+ \def\btxmonoctshort##1{\protect\foreignlanguage{#1}{Oct##1{}}}%
+ \def\btxmonnovshort##1{\protect\foreignlanguage{#1}{Nov##1{}}}%
+ \def\btxmondecshort##1{\protect\foreignlanguage{#1}{Dec##1{}}}%
+ \def\Btxinlong##1{\protect\foreignlanguage{#1}{U:}}%
+ \def\Btxinshort##1{\protect\foreignlanguage{#1}{U:}}%
+ \def\Btxeditorshort##1{\protect\foreignlanguage{#1}{Ur.##1{}}}%
+ \def\Btxeditorlong##1{\protect\foreignlanguage{#1}{Urednik}}%
+ \def\Btxeditorsshort##1{\protect\foreignlanguage{#1}{Ur.##1{}}}%
+ \def\Btxeditorslong##1{\protect\foreignlanguage{#1}{Urednici}}%
+ \def\Btxvolumeshort##1{\protect\foreignlanguage{#1}{Tm.##1{}}}%
+ \def\Btxvolumelong##1{\protect\foreignlanguage{#1}{Tom}}%
+ \def\Btxnumbershort##1{\protect\foreignlanguage{#1}{Br.##1{}}}%
+ \def\Btxnumberlong##1{\protect\foreignlanguage{#1}{Broj}}%
+ \def\Btxeditionshort##1{\protect\foreignlanguage{#1}{Ed.##1{}}}%
+ \def\Btxeditionlong##1{\protect\foreignlanguage{#1}{Edicija}}%
+ \def\Btxeditionnumshort##1##2{\btxnumeralshort{##1}~\Btxeditionshort{##2}}%
+ \def\Btxeditionnumlong##1##2{\btxnumerallong{##1}~\Btxeditionlong{##2}}%
+ \def\Btxchaptershort##1{\protect\foreignlanguage{#1}{Pog.##1{}}}%
+ \def\Btxchapterlong##1{\protect\foreignlanguage{#1}{Poglavlje}}%
+ \def\Btxpageshort##1{\protect\foreignlanguage{#1}{Str.##1{}}}%
+ \def\Btxpagelong##1{\protect\foreignlanguage{#1}{Strana}}%
+ \def\Btxpagesshort##1{\protect\foreignlanguage{#1}{Str.##1{}}}%
+ \def\Btxpageslong##1{\protect\foreignlanguage{#1}{Strane}}%
+ \def\Btxtechrepshort##1{\protect\foreignlanguage{#1}{Tehn.\ Izv##1{}}}%
+ \def\Btxtechreplong##1{\protect\foreignlanguage{#1}{Tehni\v cki Izve\ staj}}%
+ \def\btxurldatecomment##1{\protect\foreignlanguage{#1}{, poseta na: ##1}}%
+ \def\btxfnamespaceshort{}%
+ \def\btxfnamespacelong{ }%
+ \def\btxnumeralshort##1{\btxnumeralenglish{#1}{##1}}%
+ \def\btxnumerallong##1{\btxnumeralenglish{#1}{##1}}%
+% \end{macrocode}
+% Define how to print month and year in numeric format, e.\,g. MM/YYYY.
+% \begin{macrocode}
+ \def\btxprintmonthyearnum##1##2{##1/##2}%
+ \def\btxkeywordlanguage##1{{\protect\selectlanguage{#1}##1}}%
+ \ifbbbblanguagenames
+ \def\btxlanguagenameamerican{\protect\foreignlanguage{#1}{engleski}}%
+ \def\btxlanguagenameaustrian{\protect\foreignlanguage{#1}{nema\v cki}}%
+ \def\btxlanguagenamebrazil{\protect\foreignlanguage{#1}{portugalski}}%
+ \def\btxlanguagenamebrazilian{\protect\foreignlanguage{#1}{portugalski}}%
+ \def\btxlanguagenamebritish{\protect\foreignlanguage{#1}{engleski}}%
+ \def\btxlanguagenamebulgarian{\protect\foreignlanguage{#1}{bugarski}}%
+ \def\btxlanguagenamecanadian{\protect\foreignlanguage{#1}{engleski}}%
+ \def\btxlanguagenamecanadien{\protect\foreignlanguage{#1}{francuski}}%
+ \def\btxlanguagenamecatalan{\protect\foreignlanguage{#1}{katalonski}}%
+ \def\btxlanguagenamecroatian{\protect\foreignlanguage{#1}{hrvatski}}%
+ \def\btxlanguagenameczech{\protect\foreignlanguage{#1}{\v ce\v ski}}%
+ \def\btxlanguagenamedanish{\protect\foreignlanguage{#1}{danski}}%
+ \def\btxlanguagenamedutch{\protect\foreignlanguage{#1}{holandski}}%
+ \def\btxlanguagenameenglish{\protect\foreignlanguage{#1}{engleski}}%
+ \def\btxlanguagenameesperanto{\protect\foreignlanguage{#1}{esperanto}}%
+ \def\btxlanguagenamefinnish{\protect\foreignlanguage{#1}{finski}}%
+ \def\btxlanguagenamefrancais{\protect\foreignlanguage{#1}{francuski}}%
+ \def\btxlanguagenamefrench{\protect\foreignlanguage{#1}{francuski}}%
+ \def\btxlanguagenamefrenchb{\protect\foreignlanguage{#1}{francuski}}%
+ \def\btxlanguagenamegerman{\protect\foreignlanguage{#1}{nema\v cki}}%
+ \def\btxlanguagenamegermanb{\protect\foreignlanguage{#1}{nema\v cki}}%
+ \def\btxlanguagenamegreek{\protect\foreignlanguage{#1}{gr\v cki}}%
+ \def\btxlanguagenamehebrew{\protect\foreignlanguage{#1}{jevrejski}}%
+ \def\btxlanguagenamehungarian{\protect\foreignlanguage{#1}{ma\dj arski}}%
+ \def\btxlanguagenameicelandic{\protect\foreignlanguage{#1}{islandski}}%
+ \def\btxlanguagenameirish{\protect\foreignlanguage{#1}{irski}}%
+ \def\btxlanguagenameitalian{\protect\foreignlanguage{#1}{italianski}}%
+ \def\btxlanguagenamelatin{\protect\foreignlanguage{#1}{latinski}}%
+ \def\btxlanguagenamenaustrian{\protect\foreignlanguage{#1}{nema\v cki}}%
+ \def\btxlanguagenamengerman{\protect\foreignlanguage{#1}{nema\v cki}}%
+ \def\btxlanguagenamenorsk{\protect\foreignlanguage{#1}{norve\v ski}}%
+ \def\btxlanguagenamenynorsk{\protect\foreignlanguage{#1}{%
+ novi-norve\v ski}}%
+ \def\btxlanguagenamepolish{\protect\foreignlanguage{#1}{poljski}}%
+ \def\btxlanguagenameportuges{\protect\foreignlanguage{#1}{portugalski}}%
+ \def\btxlanguagenameportuguese{\protect\foreignlanguage{#1}{portugalski}}%
+ \def\btxlanguagenamerussian{\protect\foreignlanguage{#1}{ruski}}%
+ \def\btxlanguagenamescottish{\protect\foreignlanguage{#1}{\v skotski}}%
+ \def\btxlanguagenameserbian{\protect\foreignlanguage{#1}{srpski}}%
+ \def\btxlanguagenamespanish{\protect\foreignlanguage{#1}{\v spanski}}%
+ \def\btxlanguagenameswedish{\protect\foreignlanguage{#1}{\v svedski}}%
+ \def\btxlanguagenameturkish{\protect\foreignlanguage{#1}{turski}}%
+ \def\btxlanguagenameUKenglish{\protect\foreignlanguage{#1}{engleski}}%
+ \def\btxlanguagenameUSenglish{\protect\foreignlanguage{#1}{engleski}}%
+ \fi
+}
+% \end{macrocode}
+% \end{macro}
+% Append the definitions to the language-calling commands.
+% \begin{macrocode}
+\AtBeginDocument{%
+ \ifbbbbfixlanguage
+ \else
+ \bbbbaddto{serbian}{bibsserbian}
+ \fi
+ \bbbbaddto{serbian}{btxifchangecaseoff}
+}
+%</serbian>
+% \end{macrocode}
+%
+% \subsubsection{Spanish}
+% \changes{0.33}{2003/05/22}{Added Spanish language}%
+% \changes{1.32}{2019/03/11}{Corrected Spanish abbrevs (by Pablo Daniel Pareja Obregon)}%
+% \begin{macrocode}
+%<*spanish>
+% \end{macrocode}
+%
+% The language definition for Spanish was provided by V{\'\i}ctor
+% Lua{\~n}a and slightly changed by me according to |spanish.mbs|
+% (custom-bib package).
+%
+% \begin{macro}{\bibsspanish}
+% Bibliographic commands for Spanish.
+% \begin{macrocode}
+\newcommand\bibsspanish[1][spanish]{%
+ \def\biblanguagename{#1}%
+ \def\btxetalshort##1{\protect\foreignlanguage{#1}{y~cols##1{}}}%
+ \def\btxetallong##1{\protect\foreignlanguage{#1}{y~colaboradores}}%
+ \def\btxandshort##1{\protect\foreignlanguage{#1}{y}}%
+ \def\btxandlong##1{\protect\foreignlanguage{#1}{y}}%
+ \def\btxandcomma##1{}%
+ \def\btxinlong##1{\protect\foreignlanguage{#1}{en}}%
+ \def\btxinshort##1{\protect\foreignlanguage{#1}{en}}%
+ \def\btxofseriesshort##1{\protect\foreignlanguage{#1}{de}}%
+ \def\btxinseriesshort##1{\protect\foreignlanguage{#1}{en}}%
+ \def\btxofserieslong##1{\protect\foreignlanguage{#1}{de}}%
+ \def\btxinserieslong##1{\protect\foreignlanguage{#1}{en}}%
+ \def\btxeditorshort##1{\protect\foreignlanguage{#1}{ed##1{}}}%
+ \def\btxeditorlong##1{\protect\foreignlanguage{#1}{editor}}%
+ \def\btxeditorsshort##1{\protect\foreignlanguage{#1}{eds##1{}}}%
+ \def\btxeditorslong##1{\protect\foreignlanguage{#1}{editores}}%
+ \def\btxvolumeshort##1{\protect\foreignlanguage{#1}{vol##1{}}}%
+ \def\btxvolumelong##1{\protect\foreignlanguage{#1}{volumen}}%
+ \def\btxnumbershort##1{\protect\foreignlanguage{#1}{%
+ n\textsuperscript{\underline{o}}}}%
+ \def\btxnumberlong##1{\protect\foreignlanguage{#1}{n\'umero}}%
+ \def\btxeditionshort##1{\protect\foreignlanguage{#1}{ed##1{}}}%
+ \def\btxeditionlong##1{\protect\foreignlanguage{#1}{edici{\'o}n}}%
+ \def\btxeditionnumshort##1##2{\btxnumeralshort{##1}~\btxeditionshort{##2}}%
+ \def\btxeditionnumlong##1##2{\btxnumerallong{##1}~\btxeditionlong{##2}}%
+ \def\btxchaptershort##1{\protect\foreignlanguage{#1}{cap##1{}}}%
+ \def\btxchapterlong##1{\protect\foreignlanguage{#1}{cap{\'\i}tulo}}%
+ \def\btxpageshort##1{\protect\foreignlanguage{#1}{p\'ag##1{}}}%
+ \def\btxpagelong##1{\protect\foreignlanguage{#1}{p\'agina}}%
+ \def\btxpagesshort##1{\protect\foreignlanguage{#1}{p\'ags##1{}}}%
+ \def\btxpageslong##1{\protect\foreignlanguage{#1}{p\'aginas}}%
+ \def\btxmastthesis##1{\protect\foreignlanguage{#1}{Tesis de Licenciatura}}%
+ \def\btxphdthesis##1{\protect\foreignlanguage{#1}{Tesis de Doctorado}}%
+ \def\btxtechrepshort##1{\protect\foreignlanguage{#1}{Informe t\'ecnico##1{}}}%
+ \def\btxtechreplong##1{\protect\foreignlanguage{#1}{Informe t\'ecnico}}%
+ \def\btxmonjanlong##1{\protect\foreignlanguage{#1}{Enero}}%
+ \def\btxmonfeblong##1{\protect\foreignlanguage{#1}{Febrero}}%
+ \def\btxmonmarlong##1{\protect\foreignlanguage{#1}{Marzo}}%
+ \def\btxmonaprlong##1{\protect\foreignlanguage{#1}{Abril}}%
+ \def\btxmonmaylong##1{\protect\foreignlanguage{#1}{Mayo}}%
+ \def\btxmonjunlong##1{\protect\foreignlanguage{#1}{Junio}}%
+ \def\btxmonjullong##1{\protect\foreignlanguage{#1}{Julio}}%
+ \def\btxmonauglong##1{\protect\foreignlanguage{#1}{Agosto}}%
+ \def\btxmonseplong##1{\protect\foreignlanguage{#1}{Septiembre}}%
+ \def\btxmonoctlong##1{\protect\foreignlanguage{#1}{Octubre}}%
+ \def\btxmonnovlong##1{\protect\foreignlanguage{#1}{Noviembre}}%
+ \def\btxmondeclong##1{\protect\foreignlanguage{#1}{Diciembre}}%
+ \def\btxmonjanshort##1{\protect\foreignlanguage{#1}{Ene##1{}}}%
+ \def\btxmonfebshort##1{\protect\foreignlanguage{#1}{Feb##1{}}}%
+ \def\btxmonmarshort##1{\protect\foreignlanguage{#1}{Mar##1{}}}%
+ \def\btxmonaprshort##1{\protect\foreignlanguage{#1}{Abr##1{}}}%
+ \def\btxmonmayshort##1{\protect\foreignlanguage{#1}{May##1{}}}%
+ \def\btxmonjunshort##1{\protect\foreignlanguage{#1}{Jun##1{}}}%
+ \def\btxmonjulshort##1{\protect\foreignlanguage{#1}{Jul##1{}}}%
+ \def\btxmonaugshort##1{\protect\foreignlanguage{#1}{Ago##1{}}}%
+ \def\btxmonsepshort##1{\protect\foreignlanguage{#1}{Sep##1{}}}%
+ \def\btxmonoctshort##1{\protect\foreignlanguage{#1}{Oct##1{}}}%
+ \def\btxmonnovshort##1{\protect\foreignlanguage{#1}{Nov##1{}}}%
+ \def\btxmondecshort##1{\protect\foreignlanguage{#1}{Dic##1{}}}%
+ \def\Btxinlong##1{\protect\foreignlanguage{#1}{En}}%
+ \def\Btxinshort##1{\protect\foreignlanguage{#1}{En}}%
+ \def\Btxeditorshort##1{\protect\foreignlanguage{#1}{Ed##1{}}}%
+ \def\Btxeditorlong##1{\protect\foreignlanguage{#1}{Editor}}%
+ \def\Btxeditorsshort##1{\protect\foreignlanguage{#1}{Ed##1{}}}%
+ \def\Btxeditorslong##1{\protect\foreignlanguage{#1}{Editores}}%
+ \def\Btxvolumeshort##1{\protect\foreignlanguage{#1}{Vol##1{}}}%
+ \def\Btxvolumelong##1{\protect\foreignlanguage{#1}{Volumen}}%
+ \def\Btxnumbershort##1{\protect\foreignlanguage{#1}{%
+ N\textsuperscript{\underline{o}}}}%
+ \def\Btxnumberlong##1{\protect\foreignlanguage{#1}{N\'umero}}%
+ \def\Btxeditionshort##1{\protect\foreignlanguage{#1}{Ed##1{}}}%
+ \def\Btxeditionlong##1{\protect\foreignlanguage{#1}{Edici\'on}}%
+ \def\Btxeditionnumshort##1##2{\btxnumeralshort{##1}~\Btxeditionshort{##2}}%
+ \def\Btxeditionnumlong##1##2{\btxnumerallong{##1}~\Btxeditionlong{##2}}%
+ \def\Btxchaptershort##1{\protect\foreignlanguage{#1}{Cap##1{}}}%
+ \def\Btxchapterlong##1{\protect\foreignlanguage{#1}{Cap\'\itulo}}%
+ \def\Btxpageshort##1{\protect\foreignlanguage{#1}{P\'ag##1{}}}%
+ \def\Btxpagelong##1{\protect\foreignlanguage{#1}{P\'agina}}%
+ \def\Btxpagesshort##1{\protect\foreignlanguage{#1}{P\'ags##1{}}}%
+ \def\Btxpageslong##1{\protect\foreignlanguage{#1}{P\'aginas}}%
+ \def\Btxtechrepshort##1{\protect\foreignlanguage{#1}{Informe t\'ecnico}}%
+ \def\Btxtechreplong##1{\protect\foreignlanguage{#1}{Informe t\'ecnico}}%
+ \def\btxurldatecomment##1{\protect\foreignlanguage{#1}{, visitado el ##1}}%
+ \def\btxfnamespaceshort{\,}%
+ \def\btxfnamespacelong{ }%
+ \def\btxnumeralshort##1{\protect\foreignlanguage{#1}{%
+ \ifnumber{##1}{##1\textsuperscript{\underline a}}{##1}}}%
+% \def\btxnumeralshort##1{\ifnumber{##1}{\protect\foreignlanguage{#1}{%
+% ##1\ifcase##1 \ieme\or \iere\else \ieme\fi}}{##1}}%
+% \end{macrocode}
+% \changes{1.31}{2012/01/03}{Fix definition of \cs{btxnumerallong} in
+% Spanish}
+% Bug and solution for \cs{btxnumerallong} reported by Iago Quiones
+% \begin{macrocode}
+ \def\btxnumerallong##1{\btxnumeralshort{##1}}%
+% \end{macrocode}
+% Define how to print month and year in numeric format, e.\,g. MM/YYYY.
+% \begin{macrocode}
+ \def\btxprintmonthyearnum##1##2{##1/##2}%
+ \def\btxkeywordlanguage##1{{\protect\selectlanguage{#1}##1}}%
+ \ifbbbblanguagenames
+ \def\btxlanguagenameamerican{\protect\foreignlanguage{#1}{ingl\'es}}%
+ \def\btxlanguagenameaustrian{\protect\foreignlanguage{#1}{alem\'an}}%
+ \def\btxlanguagenamebrazil{\protect\foreignlanguage{#1}{portugu\'es}}%
+ \def\btxlanguagenamebrazilian{\protect\foreignlanguage{#1}{portugu\'es}}%
+ \def\btxlanguagenamebritish{\protect\foreignlanguage{#1}{ingl\'es}}%
+ \def\btxlanguagenamebulgarian{\protect\foreignlanguage{#1}{b\'ulgaro}}%
+ \def\btxlanguagenamecanadian{\protect\foreignlanguage{#1}{ingl\'es}}%
+ \def\btxlanguagenamecanadien{\protect\foreignlanguage{#1}{franc\'es}}%
+ \def\btxlanguagenamecatalan{\protect\foreignlanguage{#1}{catalan}}%
+ \def\btxlanguagenamecroatian{\protect\foreignlanguage{#1}{croata}}%
+ \def\btxlanguagenameczech{\protect\foreignlanguage{#1}{checo}}%
+ \def\btxlanguagenamedanish{\protect\foreignlanguage{#1}{dan\'es}}%
+ \def\btxlanguagenamedutch{\protect\foreignlanguage{#1}{holand\'es}}%
+ \def\btxlanguagenameenglish{\protect\foreignlanguage{#1}{ingl\'es}}%
+ \def\btxlanguagenameesperanto{\protect\foreignlanguage{#1}{esperanto}}%
+ \def\btxlanguagenamefinnish{\protect\foreignlanguage{#1}{finland\'es}}%
+ \def\btxlanguagenamefrancais{\protect\foreignlanguage{#1}{franc\'es}}%
+ \def\btxlanguagenamefrench{\protect\foreignlanguage{#1}{franc\'es}}%
+ \def\btxlanguagenamefrenchb{\protect\foreignlanguage{#1}{franc\'es}}%
+ \def\btxlanguagenamegerman{\protect\foreignlanguage{#1}{alem\'an}}%
+ \def\btxlanguagenamegermanb{\protect\foreignlanguage{#1}{alem\'an}}%
+ \def\btxlanguagenamegreek{\protect\foreignlanguage{#1}{griego}}%
+ \def\btxlanguagenamehebrew{\protect\foreignlanguage{#1}{hebreo}}%
+ \def\btxlanguagenamehungarian{\protect\foreignlanguage{#1}{h\'ungaro}}%
+ \def\btxlanguagenameicelandic{\protect\foreignlanguage{#1}{island\'es}}%
+ \def\btxlanguagenameirish{\protect\foreignlanguage{#1}{irland\'es}}%
+ \def\btxlanguagenameitalian{\protect\foreignlanguage{#1}{italiano}}%
+ \def\btxlanguagenamelatin{\protect\foreignlanguage{#1}{lat\'\i n}}%
+ \def\btxlanguagenamenaustrian{\protect\foreignlanguage{#1}{alem\'an}}%
+ \def\btxlanguagenamengerman{\protect\foreignlanguage{#1}{alem\'an}}%
+ \def\btxlanguagenamenorsk{\protect\foreignlanguage{#1}{noruego}}%
+ \def\btxlanguagenamenynorsk{\protect\foreignlanguage{#1}{noruego}}%
+ \def\btxlanguagenamepolish{\protect\foreignlanguage{#1}{polaco}}%
+ \def\btxlanguagenameportuges{\protect\foreignlanguage{#1}{portugu\'es}}%
+ \def\btxlanguagenameportuguese{\protect\foreignlanguage{#1}{portugu\'es}}%
+ \def\btxlanguagenamerussian{\protect\foreignlanguage{#1}{ruso}}%
+ \def\btxlanguagenamescottish{\protect\foreignlanguage{#1}{escoc\'es}}%
+ \def\btxlanguagenameserbian{\protect\foreignlanguage{#1}{serbio}}%
+ \def\btxlanguagenamespanish{\protect\foreignlanguage{#1}{espa\~nol}}%
+ \def\btxlanguagenameswedish{\protect\foreignlanguage{#1}{sueco}}%
+ \def\btxlanguagenameturkish{\protect\foreignlanguage{#1}{turco}}%
+ \def\btxlanguagenameUKenglish{\protect\foreignlanguage{#1}{ingl\'es}}%
+ \def\btxlanguagenameUSenglish{\protect\foreignlanguage{#1}{ingl\'es}}%
+ \fi
+}
+% \end{macrocode}
+% \end{macro}
+% Copy the commands to the other languages.
+% \begin{macrocode}
+\newcommand\bibsmexican[1][mexican]{%
+ \bibsspanish[mexican]%
+ \def\btxmastthesis##1{\protect\foreignlanguage{#1}{Tesis de Maestr{\'\i}a}}%
+}
+% \end{macrocode}
+% Append the definitions to the language-calling commands.
+% \begin{macrocode}
+\AtBeginDocument{%
+ \ifbbbbfixlanguage
+ \else
+ \bbbbaddto{spanish}{bibsspanish}
+ \bbbbaddto{mexican}{bibsmexican}
+ \fi
+ \bbbbaddto{spanish}{btxifchangecaseoff}
+ \bbbbaddto{mexican}{btxifchangecaseoff}
+}
+%</spanish>
+% \end{macrocode}
+%
+% \subsubsection{Czech}
+% \changes{1.31}{2012/01/03}{Added Serbian, Czech, and Romanian language}%
+% \begin{macrocode}
+%<*czech>
+% \end{macrocode}
+%
+% The language definition for Czech was provided by
+% Tomas Hnizdil, \url{tomash.cz@gmail.com}.
+%
+% \begin{macro}{\bibsczech}
+% \begin{macrocode}
+\newcommand\bibsczech[1][czech]{%
+ \def\biblanguagename{#1}%
+ \def\btxetalshort##1{\protect\foreignlanguage{#1}{a~kol##1{}}}%
+ \def\btxetallong##1{\protect\foreignlanguage{#1}{a~kolektiv}}%
+ \def\btxandshort##1{\protect\foreignlanguage{#1}{a}}%
+ \def\btxandlong##1{\protect\foreignlanguage{#1}{a}}%
+ \def\btxandcomma##1{}%
+ \def\btxinlong##1{\protect\foreignlanguage{#1}{v}}%
+ \def\btxinshort##1{\protect\foreignlanguage{#1}{v}}%
+ \def\btxofseriesshort##1{\protect\foreignlanguage{#1}{z}}%
+ \def\btxinseriesshort##1{\protect\foreignlanguage{#1}{v}}%
+ \def\btxofserieslong##1{\protect\foreignlanguage{#1}{z}}%
+ \def\btxinserieslong##1{\protect\foreignlanguage{#1}{v}}%
+ \def\btxeditorshort##1{\protect\foreignlanguage{#1}{edit##1{}}}%
+ \def\btxeditorlong##1{\protect\foreignlanguage{#1}{editor}}%
+ \def\btxeditorsshort##1{\protect\foreignlanguage{#1}{edit##1{}}}%
+ \def\btxeditorslong##1{\protect\foreignlanguage{#1}{edito\v{r}i}}%
+ \def\btxvolumeshort##1{\protect\foreignlanguage{#1}{sv##1{}}}%
+ \def\btxvolumelong##1{\protect\foreignlanguage{#1}{svazek}}%
+ \def\btxnumbershort##1{\protect\foreignlanguage{#1}{\v{c}##1{}}}%
+ \def\btxnumberlong##1{\protect\foreignlanguage{#1}{\v{c}\'islo}}%
+ \def\btxeditionshort##1{\protect\foreignlanguage{#1}{ed##1{}}}%
+ \def\btxeditionlong##1{\protect\foreignlanguage{#1}{edice}}%
+ \def\btxeditionnumshort##1##2{\btxnumeralshort{##1}~\btxeditionshort{##2}}%
+ \def\btxeditionnumlong##1##2{\btxnumerallong{##1}~\btxeditionlong{##2}}%
+ \def\btxchaptershort##1{\protect\foreignlanguage{#1}{kap##1{}}}%
+ \def\btxchapterlong##1{\protect\foreignlanguage{#1}{kapitola}}%
+ \def\btxpageshort##1{\protect\foreignlanguage{#1}{str##1{}}}%
+ \def\btxpagelong##1{\protect\foreignlanguage{#1}{strana}}%
+ \def\btxpagesshort##1{\protect\foreignlanguage{#1}{str##1{}}}%
+ \def\btxpageslong##1{\protect\foreignlanguage{#1}{strany}}%
+ \def\btxmastthesis##1{\protect\foreignlanguage{#1}{diplomov\'a pr\'ace}}%
+ \def\btxphdthesis##1{\protect\foreignlanguage{#1}{disertace}}%
+ \def\btxtechrepshort##1{\protect\foreignlanguage{#1}{Tech.\ zpr##1}}%
+ \def\btxtechreplong##1{\protect\foreignlanguage{#1}{Technick\'a zpr\'ava}}%
+ \def\btxmonjanlong##1{\protect\foreignlanguage{#1}{leden}}%
+ \def\btxmonfeblong##1{\protect\foreignlanguage{#1}{\'unor}}%
+ \def\btxmonmarlong##1{\protect\foreignlanguage{#1}{b\v{r}eze}}%
+ \def\btxmonaprlong##1{\protect\foreignlanguage{#1}{duben}}%
+ \def\btxmonmaylong##1{\protect\foreignlanguage{#1}{kv\v{e}ten}}%
+ \def\btxmonjunlong##1{\protect\foreignlanguage{#1}{\v{c}erven}}%
+ \def\btxmonjullong##1{\protect\foreignlanguage{#1}{\v{c}ervenec}}%
+ \def\btxmonauglong##1{\protect\foreignlanguage{#1}{srpen}}%
+ \def\btxmonseplong##1{\protect\foreignlanguage{#1}{z\'a\v{r}\'i}}%
+ \def\btxmonoctlong##1{\protect\foreignlanguage{#1}{\v{r}\'ijen}}%
+ \def\btxmonnovlong##1{\protect\foreignlanguage{#1}{listopad}}%
+ \def\btxmondeclong##1{\protect\foreignlanguage{#1}{prosinec}}%
+ \def\btxmonjanshort##1{\protect\foreignlanguage{#1}{led##1{}}}%
+ \def\btxmonfebshort##1{\protect\foreignlanguage{#1}{\'uno##1{}}}%
+ \def\btxmonmarshort##1{\protect\foreignlanguage{#1}{b\v{r}e##1{}}}%
+ \def\btxmonaprshort##1{\protect\foreignlanguage{#1}{dub##1{}}}%
+ \def\btxmonmayshort##1{\protect\foreignlanguage{#1}{kv\v{e}##1{}}}%
+ \def\btxmonjunshort##1{\protect\foreignlanguage{#1}{\v{c}er##1{}}}%
+ \def\btxmonjulshort##1{\protect\foreignlanguage{#1}{\v{c}ec##1{}}}%
+ \def\btxmonaugshort##1{\protect\foreignlanguage{#1}{srp##1{}}}%
+ \def\btxmonsepshort##1{\protect\foreignlanguage{#1}{z\'a\v{r}##1{}}}%
+ \def\btxmonoctshort##1{\protect\foreignlanguage{#1}{\v{r}\'ij##1{}}}%
+ \def\btxmonnovshort##1{\protect\foreignlanguage{#1}{lis##1{}}}%
+ \def\btxmondecshort##1{\protect\foreignlanguage{#1}{pro##1{}}}%
+ \def\Btxinlong##1{\protect\foreignlanguage{#1}{V}}%
+ \def\Btxinshort##1{\protect\foreignlanguage{#1}{V}}%
+ \def\Btxeditorshort##1{\protect\foreignlanguage{#1}{Edit##1{}}}%
+ \def\Btxeditorlong##1{\protect\foreignlanguage{#1}{Editor}}%
+ \def\Btxeditorsshort##1{\protect\foreignlanguage{#1}{Edit##1{}}}%
+ \def\Btxeditorslong##1{\protect\foreignlanguage{#1}{Edito\v{r}i}}%
+ \def\Btxvolumeshort##1{\protect\foreignlanguage{#1}{Sv##1{}}}%
+ \def\Btxvolumelong##1{\protect\foreignlanguage{#1}{Svazek}}%
+ \def\Btxnumbershort##1{\protect\foreignlanguage{#1}{\v{C}##1{}}}%
+ \def\Btxnumberlong##1{\protect\foreignlanguage{#1}{\v{C}\'islo}}%
+ \def\Btxeditionshort##1{\protect\foreignlanguage{#1}{Ed##1{}}}%
+ \def\Btxeditionlong##1{\protect\foreignlanguage{#1}{Edice}}%
+ \def\Btxeditionnumshort##1##2{\btxnumeralshort{##1}~\Btxeditionshort{##2}}%
+ \def\Btxeditionnumlong##1##2{\btxnumerallong{##1}~\Btxeditionlong{##2}}%
+ \def\Btxchaptershort##1{\protect\foreignlanguage{#1}{Kap##1{}}}%
+ \def\Btxchapterlong##1{\protect\foreignlanguage{#1}{Kapitola}}%
+ \def\Btxpageshort##1{\protect\foreignlanguage{#1}{Str##1{}}}%
+ \def\Btxpagelong##1{\protect\foreignlanguage{#1}{Strana}}%
+ \def\Btxpagesshort##1{\protect\foreignlanguage{#1}{Str##1{}}}%
+ \def\Btxpageslong##1{\protect\foreignlanguage{#1}{Strany}}%
+ \def\Btxtechrepshort##1{\protect\foreignlanguage{#1}{Techn.\ zpr##1}}%
+ \def\Btxtechreplong##1{\protect\foreignlanguage{#1}{Technick\'a zpr\'ava}}%
+ \def\btxurldatecomment##1{\protect\foreignlanguage{#1}{, dostupn\'e z ##1}}%
+ \def\btxfnamespaceshort{\,}%
+ \def\btxfnamespacelong{ }%
+ \def\btxnumeralshort##1{\btxnumeralfallback{#1}{##1}}%
+ \def\btxnumerallong##1{\btxnumeralfallback{#1}{##1}}%
+% \end{macrocode}
+% Define how to print month and year in numeric format, e.\,g. MM/YYYY.
+% \begin{macrocode}
+ \def\btxprintmonthyearnum##1##2{##1/##2}%
+ \def\btxkeywordlanguage##1{{\protect\selectlanguage{#1}##1}}%
+ \ifbbbblanguagenames
+ \def\btxlanguagenameamerican{\protect\foreignlanguage{#1}{anglicky}}%
+ \def\btxlanguagenameaustrian{\protect\foreignlanguage{#1}{n\v{e}mecky}}%
+ \def\btxlanguagenamebrazil{\protect\foreignlanguage{#1}{portugalsky}}%
+ \def\btxlanguagenamebrazilian{\protect\foreignlanguage{#1}{portugalsky}}%
+ \def\btxlanguagenamebritish{\protect\foreignlanguage{#1}{anglicky}}%
+ \def\btxlanguagenamebulgarian{\protect\foreignlanguage{#1}{bulharsky}}%
+ \def\btxlanguagenamecanadian{\protect\foreignlanguage{#1}{anglicky}}%
+ \def\btxlanguagenamecanadien{\protect\foreignlanguage{#1}{francouzsky}}%
+ \def\btxlanguagenamecatalan{\protect\foreignlanguage{#1}{katal\'ansky}}%
+ \def\btxlanguagenamecroatian{\protect\foreignlanguage{#1}{chorvatsky}}%
+ \def\btxlanguagenameczech{\protect\foreignlanguage{#1}{\v{c}esky}}%
+ \def\btxlanguagenamedanish{\protect\foreignlanguage{#1}{danese}}%
+ \def\btxlanguagenamedutch{\protect\foreignlanguage{#1}{holandsky}}%
+ \def\btxlanguagenameenglish{\protect\foreignlanguage{#1}{anglicky}}%
+ \def\btxlanguagenameesperanto{\protect\foreignlanguage{#1}{esperanto}}%
+ \def\btxlanguagenamefinnish{\protect\foreignlanguage{#1}{finsky}}%
+ \def\btxlanguagenamefrancais{\protect\foreignlanguage{#1}{francouzsky}}%
+ \def\btxlanguagenamefrench{\protect\foreignlanguage{#1}{francouzsky}}%
+ \def\btxlanguagenamefrenchb{\protect\foreignlanguage{#1}{francouzsky}}%
+ \def\btxlanguagenamegerman{\protect\foreignlanguage{#1}{n\v{e}mecky}}%
+ \def\btxlanguagenamegermanb{\protect\foreignlanguage{#1}{n\v{e}mecky}}%
+ \def\btxlanguagenamegreek{\protect\foreignlanguage{#1}{\v{r}ecky}}%
+ \def\btxlanguagenamehebrew{\protect\foreignlanguage{#1}{hebrejsky}}%
+ \def\btxlanguagenamehungarian{\protect\foreignlanguage{#1}{ma~arsky}}%
+ \def\btxlanguagenameicelandic{\protect\foreignlanguage{#1}{islandsky}}%
+ \def\btxlanguagenameirish{\protect\foreignlanguage{#1}{irsky}}%
+ \def\btxlanguagenameitalian{\protect\foreignlanguage{#1}{italsky}}%
+ \def\btxlanguagenamelatin{\protect\foreignlanguage{#1}{latinsky}}%
+ \def\btxlanguagenamenaustrian{\protect\foreignlanguage{#1}{n\v{e}mecky}}%
+ \def\btxlanguagenamengerman{\protect\foreignlanguage{#1}{n\v{e}mecky}}%
+ \def\btxlanguagenamenorsk{\protect\foreignlanguage{#1}{norsky}}%
+ \def\btxlanguagenamenynorsk{\protect\foreignlanguage{#1}{norsky}}%
+ \def\btxlanguagenamepolish{\protect\foreignlanguage{#1}{polsky}}%
+ \def\btxlanguagenameportuges{\protect\foreignlanguage{#1}{portugalsky}}%
+ \def\btxlanguagenameportuguese{\protect\foreignlanguage{#1}{portugalsky}}%
+ \def\btxlanguagenamerussian{\protect\foreignlanguage{#1}{rusky}}%
+ \def\btxlanguagenamescottish{\protect\foreignlanguage{#1}{skotsky}}%
+ \def\btxlanguagenameserbian{\protect\foreignlanguage{#1}{srbsky}}%
+ \def\btxlanguagenamespanish{\protect\foreignlanguage{#1}{%
+ \v{s}pan\v{e}lsky}}%
+ \def\btxlanguagenameswedish{\protect\foreignlanguage{#1}{\v{s}v\'edsky}}%
+ \def\btxlanguagenameturkish{\protect\foreignlanguage{#1}{turecky}}%
+ \def\btxlanguagenameUKenglish{\protect\foreignlanguage{#1}{anglicky}}%
+ \def\btxlanguagenameUSenglish{\protect\foreignlanguage{#1}{anglicky}}%
+ \fi
+}
+% \end{macrocode}
+% \end{macro}
+% Append the definitions to the language-calling commands.
+% \begin{macrocode}
+\AtBeginDocument{%
+ \ifbbbbfixlanguage
+ \else
+ \bbbbaddto{czech}{bibsczech}
+ \fi
+% \end{macrocode}
+% Switch on the change of case in titles for all Afrikaans dialects by
+% appending \cs{btxifchangecaseoff} to \cs{extras}\meta{language}.
+% \begin{macrocode}
+ \bbbbaddto{czech}{btxifchangecaseoff}
+}
+%</czech>
+% \end{macrocode}
+%
+% \subsubsection{Danish}
+% \changes{0.33}{2003/05/22}{Added Danish language}%
+% \begin{macrocode}
+%<*danish>
+% \end{macrocode}
+%
+% \begin{macro}{\bibsdanish}
+% Bibliographic commands for Danish.
+% \begin{macrocode}
+\newcommand\bibsdanish[1][danish]{%
+ \def\biblanguagename{#1}%
+ \def\btxetalshort##1{\protect\foreignlanguage{#1}{et~al##1{}}}%
+ \def\btxetallong##1{\protect\foreignlanguage{#1}{et~alii}}%
+ \def\btxandshort##1{\protect\foreignlanguage{#1}{og}}%
+ \def\btxandlong##1{\protect\foreignlanguage{#1}{og}}%
+ \def\btxandcomma##1{}%
+ \def\btxinlong##1{\protect\foreignlanguage{#1}{i}}%
+ \def\btxinshort##1{\protect\foreignlanguage{#1}{i}}%
+ \def\btxofseriesshort##1{\protect\foreignlanguage{#1}{af}}%
+ \def\btxinseriesshort##1{\protect\foreignlanguage{#1}{i}}%
+ \def\btxofserieslong##1{\protect\foreignlanguage{#1}{af}}%
+ \def\btxinserieslong##1{\protect\foreignlanguage{#1}{i}}%
+ \def\btxeditorshort##1{\protect\foreignlanguage{#1}{red##1{}}}%
+ \def\btxeditorlong##1{\protect\foreignlanguage{#1}{redakt\o r}}%
+ \def\btxeditorsshort##1{\protect\foreignlanguage{#1}{red##1{}}}%
+ \def\btxeditorslong##1{\protect\foreignlanguage{#1}{redakt\o rer}}%
+ \def\btxvolumeshort##1{\protect\foreignlanguage{#1}{bd##1{}}}%
+ \def\btxvolumelong##1{\protect\foreignlanguage{#1}{bind}}%
+ \def\btxnumbershort##1{\protect\foreignlanguage{#1}{nr##1{}}}%
+ \def\btxnumberlong##1{\protect\foreignlanguage{#1}{nummer}}%
+ \def\btxeditionshort##1{\protect\foreignlanguage{#1}{udg##1{}}}%
+ \def\btxeditionlong##1{\protect\foreignlanguage{#1}{udgave}}%
+ \def\btxeditionnumshort##1##2{\btxnumeralshort{##1}~\btxeditionshort{##2}}%
+ \def\btxeditionnumlong##1##2{\btxnumerallong{##1}~\btxeditionlong{##2}}%
+ \def\btxchaptershort##1{\protect\foreignlanguage{#1}{kap##1{}}}%
+ \def\btxchapterlong##1{\protect\foreignlanguage{#1}{kapitel}}%
+ \def\btxpageshort##1{\protect\foreignlanguage{#1}{s##1{}}}%
+ \def\btxpagelong##1{\protect\foreignlanguage{#1}{side}}%
+ \def\btxpagesshort##1{\protect\foreignlanguage{#1}{pp##1{}}}%
+ \def\btxpageslong##1{\protect\foreignlanguage{#1}{sider}}%
+ \def\btxmastthesis##1{\protect\foreignlanguage{#1}{Speciale}}%
+ \def\btxphdthesis##1{\protect\foreignlanguage{#1}{ph.d.-afhandling}}%
+ \def\btxtechrepshort##1{\protect\foreignlanguage{#1}{Tekn.\ rap##1{}}}%
+ \def\btxtechreplong##1{\protect\foreignlanguage{#1}{Teknisk rapport}}%
+ \def\btxmonjanlong##1{\protect\foreignlanguage{#1}{Januar}}%
+ \def\btxmonfeblong##1{\protect\foreignlanguage{#1}{Februar}}%
+ \def\btxmonmarlong##1{\protect\foreignlanguage{#1}{Marts}}%
+ \def\btxmonaprlong##1{\protect\foreignlanguage{#1}{April}}%
+ \def\btxmonmaylong##1{\protect\foreignlanguage{#1}{Maj}}%
+ \def\btxmonjunlong##1{\protect\foreignlanguage{#1}{Juni}}%
+ \def\btxmonjullong##1{\protect\foreignlanguage{#1}{Juli}}%
+ \def\btxmonauglong##1{\protect\foreignlanguage{#1}{August}}%
+ \def\btxmonseplong##1{\protect\foreignlanguage{#1}{September}}%
+ \def\btxmonoctlong##1{\protect\foreignlanguage{#1}{Oktober}}%
+ \def\btxmonnovlong##1{\protect\foreignlanguage{#1}{November}}%
+ \def\btxmondeclong##1{\protect\foreignlanguage{#1}{December}}%
+ \def\btxmonjanshort##1{\protect\foreignlanguage{#1}{Jan##1{}}}%
+ \def\btxmonfebshort##1{\protect\foreignlanguage{#1}{Feb##1{}}}%
+ \def\btxmonmarshort##1{\protect\foreignlanguage{#1}{Mar##1{}}}%
+ \def\btxmonaprshort##1{\protect\foreignlanguage{#1}{Apr##1{}}}%
+ \def\btxmonmayshort##1{\protect\foreignlanguage{#1}{Maj}}%
+ \def\btxmonjunshort##1{\protect\foreignlanguage{#1}{Jun##1{}}}%
+ \def\btxmonjulshort##1{\protect\foreignlanguage{#1}{Jul##1{}}}%
+ \def\btxmonaugshort##1{\protect\foreignlanguage{#1}{Aug##1{}}}%
+ \def\btxmonsepshort##1{\protect\foreignlanguage{#1}{Sep##1{}}}%
+ \def\btxmonoctshort##1{\protect\foreignlanguage{#1}{Okt##1{}}}%
+ \def\btxmonnovshort##1{\protect\foreignlanguage{#1}{Nov##1{}}}%
+ \def\btxmondecshort##1{\protect\foreignlanguage{#1}{Dec##1{}}}%
+ \def\Btxinlong##1{\protect\foreignlanguage{#1}{I}}%
+ \def\Btxinshort##1{\protect\foreignlanguage{#1}{I}}%
+ \def\Btxeditorshort##1{\protect\foreignlanguage{#1}{Red##1{}}}%
+ \def\Btxeditorlong##1{\protect\foreignlanguage{#1}{Redakt\o r}}%
+ \def\Btxeditorsshort##1{\protect\foreignlanguage{#1}{Red##1{}}}%
+ \def\Btxeditorslong##1{\protect\foreignlanguage{#1}{Redakt\o rer}}%
+ \def\Btxvolumeshort##1{\protect\foreignlanguage{#1}{Bd##1{}}}%
+ \def\Btxvolumelong##1{\protect\foreignlanguage{#1}{Bind}}%
+ \def\Btxnumbershort##1{\protect\foreignlanguage{#1}{Nr##1{}}}%
+ \def\Btxnumberlong##1{\protect\foreignlanguage{#1}{Nummer}}%
+ \def\Btxeditionshort##1{\protect\foreignlanguage{#1}{Udg##1{}}}%
+ \def\Btxeditionlong##1{\protect\foreignlanguage{#1}{Udgave}}%
+ \def\Btxeditionnumshort##1##2{\btxnumeralshort{##1}~\Btxeditionshort{##2}}%
+ \def\Btxeditionnumlong##1##2{\btxnumerallong{##1}~\Btxeditionlong{##2}}%
+ \def\Btxchaptershort##1{\protect\foreignlanguage{#1}{Kap##1{}}}%
+ \def\Btxchapterlong##1{\protect\foreignlanguage{#1}{Kapitel}}%
+ \def\Btxpageshort##1{\protect\foreignlanguage{#1}{S##1{}}}%
+ \def\Btxpagelong##1{\protect\foreignlanguage{#1}{Side}}%
+ \def\Btxpagesshort##1{\protect\foreignlanguage{#1}{Pp##1{}}}%
+ \def\Btxpageslong##1{\protect\foreignlanguage{#1}{Sider}}%
+ \def\Btxtechrepshort##1{\protect\foreignlanguage{#1}{Tekn.\ rap##1{}}}%
+ \def\Btxtechreplong##1{\protect\foreignlanguage{#1}{Teknisk rapport}}%
+ \def\btxurldatecomment##1{\protect\foreignlanguage{#1}{, bes\o gt den ##1}}%
+ \def\btxfnamespaceshort{\,}%
+ \def\btxfnamespacelong{ }%
+ \def\btxnumeralshort##1{\btxnumeralfallback{#1}{##1}}%
+ \def\btxnumerallong##1{\btxnumeralfallback{#1}{##1}}%
+% \end{macrocode}
+% Define how to print month and year in numeric format, e.\,g. MM/YYYY.
+% \begin{macrocode}
+ \def\btxprintmonthyearnum##1##2{##1/##2}%
+ \def\btxkeywordlanguage##1{{\protect\selectlanguage{#1}##1}}%
+ \ifbbbblanguagenames
+ \def\btxlanguagenameamerican{\protect\foreignlanguage{#1}{engelsk}}%
+ \def\btxlanguagenameaustrian{\protect\foreignlanguage{#1}{tysk}}%
+ \def\btxlanguagenamebrazil{\protect\foreignlanguage{#1}{portugisisk}}%
+ \def\btxlanguagenamebrazilian{\protect\foreignlanguage{#1}{portugisisk}}%
+ \def\btxlanguagenamebritish{\protect\foreignlanguage{#1}{engelsk}}%
+ \def\btxlanguagenamebulgarian{\protect\foreignlanguage{#1}{bulgarsk}}%
+ \def\btxlanguagenamecanadian{\protect\foreignlanguage{#1}{engelsk}}%
+ \def\btxlanguagenamecanadien{\protect\foreignlanguage{#1}{fransk}}%
+ \def\btxlanguagenamecatalan{\protect\foreignlanguage{#1}{katalansk}}%
+ \def\btxlanguagenamecroatian{\protect\foreignlanguage{#1}{kroatisk}}%
+ \def\btxlanguagenameczech{\protect\foreignlanguage{#1}{tjekkisk}}%
+ \def\btxlanguagenamedanish{\protect\foreignlanguage{#1}{dansk}}%
+ \def\btxlanguagenamedutch{\protect\foreignlanguage{#1}{nederlandsk}}%
+ \def\btxlanguagenameenglish{\protect\foreignlanguage{#1}{engelsk}}%
+ \def\btxlanguagenameesperanto{\protect\foreignlanguage{#1}{esperanto}}%
+ \def\btxlanguagenamefinnish{\protect\foreignlanguage{#1}{finsk}}%
+ \def\btxlanguagenamefrancais{\protect\foreignlanguage{#1}{fransk}}%
+ \def\btxlanguagenamefrench{\protect\foreignlanguage{#1}{fransk}}%
+ \def\btxlanguagenamefrenchb{\protect\foreignlanguage{#1}{fransk}}%
+ \def\btxlanguagenamegerman{\protect\foreignlanguage{#1}{tysk}}%
+ \def\btxlanguagenamegermanb{\protect\foreignlanguage{#1}{tysk}}%
+ \def\btxlanguagenamegreek{\protect\foreignlanguage{#1}{gr\ae sk}}%
+ \def\btxlanguagenamehebrew{\protect\foreignlanguage{#1}{hebraisk}}%
+ \def\btxlanguagenamehungarian{\protect\foreignlanguage{#1}{ungarsk}}%
+ \def\btxlanguagenameicelandic{\protect\foreignlanguage{#1}{islandsk}}%
+ \def\btxlanguagenameirish{\protect\foreignlanguage{#1}{irsk}}%
+ \def\btxlanguagenameitalian{\protect\foreignlanguage{#1}{italiensk}}%
+ \def\btxlanguagenamelatin{\protect\foreignlanguage{#1}{latinsk}}%
+ \def\btxlanguagenamenaustrian{\protect\foreignlanguage{#1}{tysk}}%
+ \def\btxlanguagenamengerman{\protect\foreignlanguage{#1}{tysk}}%
+ \def\btxlanguagenamenorsk{\protect\foreignlanguage{#1}{norsk}}%
+ \def\btxlanguagenamenynorsk{\protect\foreignlanguage{#1}{nynorsk}}%
+ \def\btxlanguagenamepolish{\protect\foreignlanguage{#1}{polsk}}%
+ \def\btxlanguagenameportuges{\protect\foreignlanguage{#1}{portugisisk}}%
+ \def\btxlanguagenameportuguese{\protect\foreignlanguage{#1}{portugisisk}}%
+ \def\btxlanguagenamerussian{\protect\foreignlanguage{#1}{russisk}}%
+ \def\btxlanguagenamescottish{\protect\foreignlanguage{#1}{skotsk}}%
+ \def\btxlanguagenameserbian{\protect\foreignlanguage{#1}{serbisk}}%
+ \def\btxlanguagenamespanish{\protect\foreignlanguage{#1}{spansk}}%
+ \def\btxlanguagenameswedish{\protect\foreignlanguage{#1}{svensk}}%
+ \def\btxlanguagenameturkish{\protect\foreignlanguage{#1}{tyrkisk}}%
+ \def\btxlanguagenameUKenglish{\protect\foreignlanguage{#1}{engelsk}}%
+ \def\btxlanguagenameUSenglish{\protect\foreignlanguage{#1}{engelsk}}%
+ \fi
+}
+% \end{macrocode}
+% \end{macro}
+% Append the definitions to the language-calling commands.
+% \begin{macrocode}
+\AtBeginDocument{%
+ \ifbbbbfixlanguage
+ \else
+ \bbbbaddto{danish}{bibsdanish}
+ \fi
+ \bbbbaddto{danish}{btxifchangecaseoff}
+}
+%</danish>
+% \end{macrocode}
+%
+% \subsubsection{Finnish}
+% \changes{0.45}{2004/04/21}{Added Finnish language}%
+% \begin{macrocode}
+%<*finnish>
+% \end{macrocode}
+%
+% \begin{macro}{\bibsfinnish}
+% Bibliographic commands for Finnish.
+% \begin{macrocode}
+\newcommand\bibsfinnish[1][finnish]{%
+ \def\biblanguagename{#1}%
+ \def\btxetalshort##1{\protect\foreignlanguage{#1}{et~al##1{}}}%
+ \def\btxetallong##1{\protect\foreignlanguage{#1}{et~alii}}%
+ \def\btxandshort##1{\protect\foreignlanguage{#1}{ja}}%
+ \def\btxandlong##1{\protect\foreignlanguage{#1}{ja}}%
+ \def\btxandcomma##1{}%
+ \def\btxinlong##1{\protect\foreignlanguage{#1}{teoksessa}}%
+ \def\btxinshort##1{\protect\foreignlanguage{#1}{teoksessa}}%
+ \def\btxofseriesshort##1{\protect\foreignlanguage{#1}{sarjassa}}%
+ \def\btxinseriesshort##1{\protect\foreignlanguage{#1}{sarjassa}}%
+ \def\btxofserieslong##1{\protect\foreignlanguage{#1}{sarjassa}}%
+ \def\btxinserieslong##1{\protect\foreignlanguage{#1}{sarjassa}}%
+ \def\btxeditorshort##1{\protect\foreignlanguage{#1}{toim##1{}}}%
+ \def\btxeditorlong##1{\protect\foreignlanguage{#1}{toimittaja}}%
+ \def\btxeditorsshort##1{\protect\foreignlanguage{#1}{toim##1{}}}%
+ \def\btxeditorslong##1{\protect\foreignlanguage{#1}{toimittajat}}%
+ \def\btxvolumeshort##1{\protect\foreignlanguage{#1}{nide}}%
+ \def\btxvolumelong##1{\protect\foreignlanguage{#1}{nide}}%
+ \def\btxnumbershort##1{\protect\foreignlanguage{#1}{nro##1{}}}%
+ \def\btxnumberlong##1{\protect\foreignlanguage{#1}{numero}}%
+ \def\btxeditionshort##1{\protect\foreignlanguage{#1}{p##1{}}}%
+ \def\btxeditionlong##1{\protect\foreignlanguage{#1}{painos}}%
+ \def\btxeditionnumshort##1##2{\btxnumeralshort{##1}~\btxeditionshort{##2}}%
+ \def\btxeditionnumlong##1##2{\btxnumerallong{##1}~\btxeditionlong{##2}}%
+ \def\btxchaptershort##1{\protect\foreignlanguage{#1}{l##1{}}}%
+ \def\btxchapterlong##1{\protect\foreignlanguage{#1}{luku}}%
+ \def\btxpageshort##1{\protect\foreignlanguage{#1}{s##1{}}}%
+ \def\btxpagelong##1{\protect\foreignlanguage{#1}{sivu}}%
+ \def\btxpagesshort##1{\protect\foreignlanguage{#1}{ss##1{}}}%
+ \def\btxpageslong##1{\protect\foreignlanguage{#1}{sivut}}%
+ \def\btxmastthesis##1{\protect\foreignlanguage{#1}{Pro Gradu -ty\"o}}%
+ \def\btxphdthesis##1{\protect\foreignlanguage{#1}{v\"ait\"oskirja}}%
+ \def\btxtechrepshort##1{\protect\foreignlanguage{#1}{tekn.\ rap##1{}}}%
+ \def\btxtechreplong##1{\protect\foreignlanguage{#1}{tekninen raportti}}%
+ \def\btxmonjanlong##1{\protect\foreignlanguage{#1}{tammikuu}}%
+ \def\btxmonfeblong##1{\protect\foreignlanguage{#1}{helmikuu}}%
+ \def\btxmonmarlong##1{\protect\foreignlanguage{#1}{maaliskuu}}%
+ \def\btxmonaprlong##1{\protect\foreignlanguage{#1}{huhtikuu}}%
+ \def\btxmonmaylong##1{\protect\foreignlanguage{#1}{toukokuu}}%
+ \def\btxmonjunlong##1{\protect\foreignlanguage{#1}{kes\"akuu}}%
+ \def\btxmonjullong##1{\protect\foreignlanguage{#1}{hein\"akuu}}%
+ \def\btxmonauglong##1{\protect\foreignlanguage{#1}{elokuu}}%
+ \def\btxmonseplong##1{\protect\foreignlanguage{#1}{syyskuu}}%
+ \def\btxmonoctlong##1{\protect\foreignlanguage{#1}{lokakuu}}%
+ \def\btxmonnovlong##1{\protect\foreignlanguage{#1}{marraskuu}}%
+ \def\btxmondeclong##1{\protect\foreignlanguage{#1}{joulukuu}}%
+ \def\btxmonjanshort##1{\protect\foreignlanguage{#1}{tam##1{}}}%
+ \def\btxmonfebshort##1{\protect\foreignlanguage{#1}{hel##1{}}}%
+ \def\btxmonmarshort##1{\protect\foreignlanguage{#1}{maa##1{}}}%
+ \def\btxmonaprshort##1{\protect\foreignlanguage{#1}{huh##1{}}}%
+ \def\btxmonmayshort##1{\protect\foreignlanguage{#1}{tou##1{}}}%
+ \def\btxmonjunshort##1{\protect\foreignlanguage{#1}{kes##1{}}}%
+ \def\btxmonjulshort##1{\protect\foreignlanguage{#1}{hei##1{}}}%
+ \def\btxmonaugshort##1{\protect\foreignlanguage{#1}{elo##1{}}}%
+ \def\btxmonsepshort##1{\protect\foreignlanguage{#1}{syy##1{}}}%
+ \def\btxmonoctshort##1{\protect\foreignlanguage{#1}{lok##1{}}}%
+ \def\btxmonnovshort##1{\protect\foreignlanguage{#1}{mar##1{}}}%
+ \def\btxmondecshort##1{\protect\foreignlanguage{#1}{jou##1{}}}%
+ \def\Btxinlong##1{\protect\foreignlanguage{#1}{Teoksessa}}%
+ \def\Btxinshort##1{\protect\foreignlanguage{#1}{Teoksessa}}%
+ \def\Btxeditorshort##1{\protect\foreignlanguage{#1}{Toim##1{}}}%
+ \def\Btxeditorlong##1{\protect\foreignlanguage{#1}{Toimittaja}}%
+ \def\Btxeditorsshort##1{\protect\foreignlanguage{#1}{Toim##1{}}}%
+ \def\Btxeditorslong##1{\protect\foreignlanguage{#1}{Toimittajat}}%
+ \def\Btxvolumeshort##1{\protect\foreignlanguage{#1}{Nide##1{}}}%
+ \def\Btxvolumelong##1{\protect\foreignlanguage{#1}{Nide}}%
+ \def\Btxnumbershort##1{\protect\foreignlanguage{#1}{Nro##1{}}}%
+ \def\Btxnumberlong##1{\protect\foreignlanguage{#1}{Numero}}%
+ \def\Btxeditionshort##1{\protect\foreignlanguage{#1}{P##1{}}}%
+ \def\Btxeditionlong##1{\protect\foreignlanguage{#1}{Painos}}%
+ \def\Btxeditionnumshort##1##2{\btxnumeralshort{##1}~\Btxeditionshort{##2}}%
+ \def\Btxeditionnumlong##1##2{\btxnumerallong{##1}~\Btxeditionlong{##2}}%
+ \def\Btxchaptershort##1{\protect\foreignlanguage{#1}{L##1{}}}%
+ \def\Btxchapterlong##1{\protect\foreignlanguage{#1}{Luku}}%
+ \def\Btxpageshort##1{\protect\foreignlanguage{#1}{S##1{}}}%
+ \def\Btxpagelong##1{\protect\foreignlanguage{#1}{Sivu}}%
+ \def\Btxpagesshort##1{\protect\foreignlanguage{#1}{Ss##1{}}}%
+ \def\Btxpageslong##1{\protect\foreignlanguage{#1}{Sivut}}%
+ \def\Btxtechrepshort##1{\protect\foreignlanguage{#1}{Tekn.\ rap##1{}}}%
+ \def\Btxtechreplong##1{\protect\foreignlanguage{#1}{Tekninen raportti}}%
+ \def\btxurldatecomment##1{\protect\foreignlanguage{#1}{, vierailtu ##1}}%
+ \def\btxfnamespaceshort{\,}%
+ \def\btxfnamespacelong{ }%
+ \def\btxnumeralshort##1{\btxnumeralfallback{#1}{##1}}%
+ \def\btxnumerallong##1{\btxnumeralfallback{#1}{##1}}%
+% \end{macrocode}
+% Define how to print month and year in numeric format, e.\,g. MM/YYYY.
+% \begin{macrocode}
+ \def\btxprintmonthyearnum##1##2{##1/##2}%
+ \def\btxkeywordlanguage##1{{\protect\selectlanguage{#1}##1}}%
+ \ifbbbblanguagenames
+ \def\btxlanguagenameamerican{\protect\foreignlanguage{#1}{englanti}}%
+ \def\btxlanguagenameaustrian{\protect\foreignlanguage{#1}{saksa}}%
+ \def\btxlanguagenamebrazil{\protect\foreignlanguage{#1}{portugali}}%
+ \def\btxlanguagenamebrazilian{\protect\foreignlanguage{#1}{portugali}}%
+ \def\btxlanguagenamebritish{\protect\foreignlanguage{#1}{englanti}}%
+ \def\btxlanguagenamebulgarian{\protect\foreignlanguage{#1}{bulgaria}}%
+ \def\btxlanguagenamecanadian{\protect\foreignlanguage{#1}{englanti}}%
+ \def\btxlanguagenamecanadien{\protect\foreignlanguage{#1}{ranska}}%
+ \def\btxlanguagenamecatalan{\protect\foreignlanguage{#1}{katalaani}}%
+ \def\btxlanguagenamecroatian{\protect\foreignlanguage{#1}{kroaati}}%
+ \def\btxlanguagenameczech{\protect\foreignlanguage{#1}{tsekki}}%
+ \def\btxlanguagenamedanish{\protect\foreignlanguage{#1}{tanska}}%
+ \def\btxlanguagenamedutch{\protect\foreignlanguage{#1}{hollanti}}%
+ \def\btxlanguagenameenglish{\protect\foreignlanguage{#1}{englanti}}%
+ \def\btxlanguagenameesperanto{\protect\foreignlanguage{#1}{esperanto}}%
+ \def\btxlanguagenamefinnish{\protect\foreignlanguage{#1}{suomi}}%
+ \def\btxlanguagenamefrancais{\protect\foreignlanguage{#1}{ranska}}%
+ \def\btxlanguagenamefrench{\protect\foreignlanguage{#1}{ranska}}%
+ \def\btxlanguagenamefrenchb{\protect\foreignlanguage{#1}{ranska}}%
+ \def\btxlanguagenamegerman{\protect\foreignlanguage{#1}{saksa}}%
+ \def\btxlanguagenamegermanb{\protect\foreignlanguage{#1}{saksa}}%
+ \def\btxlanguagenamegreek{\protect\foreignlanguage{#1}{kreikka}}%
+ \def\btxlanguagenamehebrew{\protect\foreignlanguage{#1}{heprea}}%
+ \def\btxlanguagenamehungarian{\protect\foreignlanguage{#1}{unkari}}%
+ \def\btxlanguagenameicelandic{\protect\foreignlanguage{#1}{islanti}}%
+ \def\btxlanguagenameirish{\protect\foreignlanguage{#1}{iiri}}%
+ \def\btxlanguagenameitalian{\protect\foreignlanguage{#1}{italia}}%
+ \def\btxlanguagenamelatin{\protect\foreignlanguage{#1}{latina}}%
+ \def\btxlanguagenamenaustrian{\protect\foreignlanguage{#1}{saksa}}%
+ \def\btxlanguagenamengerman{\protect\foreignlanguage{#1}{saksa}}%
+ \def\btxlanguagenamenorsk{\protect\foreignlanguage{#1}{norja}}%
+ \def\btxlanguagenamenynorsk{\protect\foreignlanguage{#1}{uusnorja}}%
+ \def\btxlanguagenamepolish{\protect\foreignlanguage{#1}{puola}}%
+ \def\btxlanguagenameportuges{\protect\foreignlanguage{#1}{portugali}}%
+ \def\btxlanguagenameportuguese{\protect\foreignlanguage{#1}{portugali}}%
+ \def\btxlanguagenamerussian{\protect\foreignlanguage{#1}{ven\"j\"a}}%
+ \def\btxlanguagenamescottish{\protect\foreignlanguage{#1}{skotti}}%
+ \def\btxlanguagenameserbian{\protect\foreignlanguage{#1}{serbi}}%
+ \def\btxlanguagenamespanish{\protect\foreignlanguage{#1}{espanja}}%
+ \def\btxlanguagenameswedish{\protect\foreignlanguage{#1}{ruotsi}}%
+ \def\btxlanguagenameturkish{\protect\foreignlanguage{#1}{turkki}}%
+ \def\btxlanguagenameUKenglish{\protect\foreignlanguage{#1}{englanti}}%
+ \def\btxlanguagenameUSenglish{\protect\foreignlanguage{#1}{englanti}}%
+ \fi
+}
+% \end{macrocode}
+% \end{macro}
+% Append the definitions to the language-calling commands.
+% \begin{macrocode}
+\AtBeginDocument{%
+ \ifbbbbfixlanguage
+ \else
+ \bbbbaddto{finnish}{bibsfinnish}
+ \fi
+% \end{macrocode}
+% Switch off the change of case in titles by appending
+% \cs{btxifchangecaseoff} to \cs{extras}\meta{language}.
+% \begin{macrocode}
+ \bbbbaddto{finnish}{btxifchangecaseoff}
+}
+%</finnish>
+% \end{macrocode}
+%
+% \subsubsection{Esperanto}
+% \changes{0.45}{2004/04/21}{Added Esperanto language}%
+% \begin{macrocode}
+%<*esperanto>
+% \end{macrocode}
+%
+% \begin{macro}{\bibsesperanto}
+% Bibliographic commands for Esperanto.
+% \begin{macrocode}
+\newcommand\bibsesperanto[1][esperanto]{%
+ \def\biblanguagename{#1}%
+ \def\btxetalshort##1{\protect\foreignlanguage{#1}{k~al##1{}}}%
+ \def\btxetallong##1{\protect\foreignlanguage{#1}{kaj~aliaj}}%
+ \def\btxandshort##1{\protect\foreignlanguage{#1}{k}}%
+ \def\btxandlong##1{\protect\foreignlanguage{#1}{kaj}}%
+ \def\btxandcomma##1{}%
+ \def\btxinlong##1{\protect\foreignlanguage{#1}{en}}%
+ \def\btxinshort##1{\protect\foreignlanguage{#1}{en}}%
+ \def\btxofseriesshort##1{\protect\foreignlanguage{#1}{de}}%
+ \def\btxinseriesshort##1{\protect\foreignlanguage{#1}{en}}%
+ \def\btxofserieslong##1{\protect\foreignlanguage{#1}{de}}%
+ \def\btxinserieslong##1{\protect\foreignlanguage{#1}{en}}%
+ \def\btxeditorshort##1{\protect\foreignlanguage{#1}{red##1{}}}%
+ \def\btxeditorlong##1{\protect\foreignlanguage{#1}{redaktoro}}%
+ \def\btxeditorsshort##1{\protect\foreignlanguage{#1}{red-oj##1{}}}%
+ \def\btxeditorslong##1{\protect\foreignlanguage{#1}{redaktoroj}}%
+ \def\btxvolumeshort##1{\protect\foreignlanguage{#1}{vol##1{}}}%
+ \def\btxvolumelong##1{\protect\foreignlanguage{#1}{volumo}}%
+ \def\btxnumbershort##1{\protect\foreignlanguage{#1}{no##1{}}}%
+ \def\btxnumberlong##1{\protect\foreignlanguage{#1}{nombro}}%
+ \def\btxeditionshort##1{\protect\foreignlanguage{#1}{red##1{}}}%
+ \def\btxeditionlong##1{\protect\foreignlanguage{#1}{redakcio}}%
+ \def\btxeditionnumshort##1##2{\btxnumeralshort{##1}~\btxeditionshort{##2}}%
+ \def\btxeditionnumlong##1##2{\btxnumerallong{##1}~\btxeditionlong{##2}}%
+ \def\btxchaptershort##1{\protect\foreignlanguage{#1}{\^c##1{}}}%
+ \def\btxchapterlong##1{\protect\foreignlanguage{#1}{\^capitro}}%
+ \def\btxpageshort##1{\protect\foreignlanguage{#1}{p##1{}}}%
+ \def\btxpagelong##1{\protect\foreignlanguage{#1}{pa\^go}}%
+ \def\btxpagesshort##1{\protect\foreignlanguage{#1}{pp##1{}}}%
+ \def\btxpageslong##1{\protect\foreignlanguage{#1}{pa\^goj}}%
+ \def\btxmastthesis##1{\protect\foreignlanguage{#1}{magistra disertacio}}%
+ \def\btxphdthesis##1{\protect\foreignlanguage{#1}{doktora disertacio}}%
+ \def\btxtechrepshort##1{\protect\foreignlanguage{#1}{Tekn.\ rap##1{}}}%
+ \def\btxtechreplong##1{\protect\foreignlanguage{#1}{Teknika raporto}}%
+ \def\btxmonjanlong##1{\protect\foreignlanguage{#1}{Januaro}}%
+ \def\btxmonfeblong##1{\protect\foreignlanguage{#1}{Februaro}}%
+ \def\btxmonmarlong##1{\protect\foreignlanguage{#1}{Marco}}%
+ \def\btxmonaprlong##1{\protect\foreignlanguage{#1}{Aprilo}}%
+ \def\btxmonmaylong##1{\protect\foreignlanguage{#1}{Majo}}%
+ \def\btxmonjunlong##1{\protect\foreignlanguage{#1}{Junio}}%
+ \def\btxmonjullong##1{\protect\foreignlanguage{#1}{Julio}}%
+ \def\btxmonauglong##1{\protect\foreignlanguage{#1}{A\u{u}gusto}}%
+ \def\btxmonseplong##1{\protect\foreignlanguage{#1}{Septembro}}%
+ \def\btxmonoctlong##1{\protect\foreignlanguage{#1}{Oktobro}}%
+ \def\btxmonnovlong##1{\protect\foreignlanguage{#1}{Novembro}}%
+ \def\btxmondeclong##1{\protect\foreignlanguage{#1}{Decembro}}%
+ \def\btxmonjanshort##1{\protect\foreignlanguage{#1}{Jan##1{}}}%
+ \def\btxmonfebshort##1{\protect\foreignlanguage{#1}{Feb##1{}}}%
+ \def\btxmonmarshort##1{\protect\foreignlanguage{#1}{Mar##1{}}}%
+ \def\btxmonaprshort##1{\protect\foreignlanguage{#1}{Apr##1{}}}%
+ \def\btxmonmayshort##1{\protect\foreignlanguage{#1}{Maj##1{}}}%
+ \def\btxmonjunshort##1{\protect\foreignlanguage{#1}{Jun##1{}}}%
+ \def\btxmonjulshort##1{\protect\foreignlanguage{#1}{Jul##1{}}}%
+ \def\btxmonaugshort##1{\protect\foreignlanguage{#1}{Aug##1{}}}%
+ \def\btxmonsepshort##1{\protect\foreignlanguage{#1}{Sept##1{}}}%
+ \def\btxmonoctshort##1{\protect\foreignlanguage{#1}{Okt##1{}}}%
+ \def\btxmonnovshort##1{\protect\foreignlanguage{#1}{Nov##1{}}}%
+ \def\btxmondecshort##1{\protect\foreignlanguage{#1}{Dec##1{}}}%
+ \def\Btxinlong##1{\protect\foreignlanguage{#1}{En}}%
+ \def\Btxinshort##1{\protect\foreignlanguage{#1}{En}}%
+ \def\Btxeditorshort##1{\protect\foreignlanguage{#1}{Red##1{}}}%
+ \def\Btxeditorlong##1{\protect\foreignlanguage{#1}{Redaktoro}}%
+ \def\Btxeditorsshort##1{\protect\foreignlanguage{#1}{Red##1{}}}%
+ \def\Btxeditorslong##1{\protect\foreignlanguage{#1}{Redaktoroj}}%
+ \def\Btxvolumeshort##1{\protect\foreignlanguage{#1}{Vol##1{}}}%
+ \def\Btxvolumelong##1{\protect\foreignlanguage{#1}{Volumo}}%
+ \def\Btxnumbershort##1{\protect\foreignlanguage{#1}{No##1{}}}%
+ \def\Btxnumberlong##1{\protect\foreignlanguage{#1}{Nombro}}%
+ \def\Btxeditionshort##1{\protect\foreignlanguage{#1}{Red##1{}}}%
+ \def\Btxeditionlong##1{\protect\foreignlanguage{#1}{Redakcio}}%
+ \def\Btxeditionnumshort##1##2{\btxnumeralshort{##1}~\Btxeditionshort{##2}}%
+ \def\Btxeditionnumlong##1##2{\btxnumerallong{##1}~\Btxeditionlong{##2}}%
+ \def\Btxchaptershort##1{\protect\foreignlanguage{#1}{\^C##1{}}}%
+ \def\Btxchapterlong##1{\protect\foreignlanguage{#1}{\^Capitro}}%
+ \def\Btxpageshort##1{\protect\foreignlanguage{#1}{P##1{}}}%
+ \def\Btxpagelong##1{\protect\foreignlanguage{#1}{Pa\^go}}%
+ \def\Btxpagesshort##1{\protect\foreignlanguage{#1}{Pp##1{}}}%
+ \def\Btxpageslong##1{\protect\foreignlanguage{#1}{Pa\^goj}}%
+ \def\Btxtechrepshort##1{\protect\foreignlanguage{#1}{Tekn.\ Rap##1{}}}%
+ \def\Btxtechreplong##1{\protect\foreignlanguage{#1}{Teknika Raporto}}%
+% \def\btxurldatecomment##1{\protect\foreignlanguage{#1}{, ?? ##1}}%
+ \def\btxurldatecomment##1{\PackageError{babelbib}{Comment for
+ urldate in Esperanto undefined. Please send the translation for
+ 'visited on' to harald.harders@tu-bs.de}{} [##1]}%
+ \def\btxfnamespaceshort{\,}%
+ \def\btxfnamespacelong{ }%
+ \def\btxnumeralshort##1{\btxnumeralfallback{#1}{##1}}%
+ \def\btxnumerallong##1{\btxnumeralfallback{#1}{##1}}%
+% \end{macrocode}
+% Define how to print month and year in numeric format, e.\,g. MM/YYYY.
+% \begin{macrocode}
+ \def\btxprintmonthyearnum##1##2{##1/##2}%
+ \def\btxkeywordlanguage##1{{\protect\selectlanguage{#1}##1}}%
+ \ifbbbblanguagenames
+ \def\btxlanguagenameamerican{\protect\foreignlanguage{#1}{angla}}%
+ \def\btxlanguagenameaustrian{\protect\foreignlanguage{#1}{germana}}%
+ \def\btxlanguagenamebrazil{\protect\foreignlanguage{#1}{portugala}}%
+ \def\btxlanguagenamebrazilian{\protect\foreignlanguage{#1}{portugala}}%
+ \def\btxlanguagenamebritish{\protect\foreignlanguage{#1}{angla}}%
+ \def\btxlanguagenamebulgarian{\protect\foreignlanguage{#1}{bulgara}}%
+ \def\btxlanguagenamecanadian{\protect\foreignlanguage{#1}{angla}}%
+ \def\btxlanguagenamecanadien{\protect\foreignlanguage{#1}{franca}}%
+ \def\btxlanguagenamecatalan{\protect\foreignlanguage{#1}{katalana}}%
+ \def\btxlanguagenamecroatian{\protect\foreignlanguage{#1}{kroata}}%
+ \def\btxlanguagenameczech{\protect\foreignlanguage{#1}{\^ce\^ha}}%
+ \def\btxlanguagenamedanish{\protect\foreignlanguage{#1}{dana}}%
+ \def\btxlanguagenamedutch{\protect\foreignlanguage{#1}{nederlanda}}%
+ \def\btxlanguagenameenglish{\protect\foreignlanguage{#1}{angla}}%
+ \def\btxlanguagenameesperanto{\protect\foreignlanguage{#1}{esperanto}}%
+ \def\btxlanguagenamefinnish{\protect\foreignlanguage{#1}{finna}}%
+ \def\btxlanguagenamefrancais{\protect\foreignlanguage{#1}{franca}}%
+ \def\btxlanguagenamefrench{\protect\foreignlanguage{#1}{franca}}%
+ \def\btxlanguagenamefrenchb{\protect\foreignlanguage{#1}{franca}}%
+ \def\btxlanguagenamegerman{\protect\foreignlanguage{#1}{germana}}%
+ \def\btxlanguagenamegermanb{\protect\foreignlanguage{#1}{germana}}%
+ \def\btxlanguagenamegreek{\protect\foreignlanguage{#1}{greka}}%
+ \def\btxlanguagenamehebrew{\protect\foreignlanguage{#1}{hebrea}}%
+ \def\btxlanguagenamehungarian{\protect\foreignlanguage{#1}{hungara}}%
+ \def\btxlanguagenameicelandic{\protect\foreignlanguage{#1}{islanda}}%
+ \def\btxlanguagenameirish{\protect\foreignlanguage{#1}{irlanda}}%
+ \def\btxlanguagenameitalian{\protect\foreignlanguage{#1}{itala}}%
+ \def\btxlanguagenamelatin{\protect\foreignlanguage{#1}{latino}}%
+ \def\btxlanguagenamenaustrian{\protect\foreignlanguage{#1}{germana}}%
+ \def\btxlanguagenamengerman{\protect\foreignlanguage{#1}{germana}}%
+ \def\btxlanguagenamenorsk{\protect\foreignlanguage{#1}{norvega}}%
+ \def\btxlanguagenamenynorsk{\protect\foreignlanguage{#1}{nov-norvega}}%
+ \def\btxlanguagenamepolish{\protect\foreignlanguage{#1}{pola}}%
+ \def\btxlanguagenameportuges{\protect\foreignlanguage{#1}{portugala}}%
+ \def\btxlanguagenameportuguese{\protect\foreignlanguage{#1}{portugala}}%
+ \def\btxlanguagenamerussian{\protect\foreignlanguage{#1}{rusa}}%
+ \def\btxlanguagenamescottish{\protect\foreignlanguage{#1}{skota}}%
+ \def\btxlanguagenameserbian{\protect\foreignlanguage{#1}{serba}}%
+ \def\btxlanguagenamespanish{\protect\foreignlanguage{#1}{hispana}}%
+ \def\btxlanguagenameswedish{\protect\foreignlanguage{#1}{sveda}}%
+ \def\btxlanguagenameturkish{\protect\foreignlanguage{#1}{turka}}%
+ \def\btxlanguagenameUKenglish{\protect\foreignlanguage{#1}{angla}}%
+ \def\btxlanguagenameUSenglish{\protect\foreignlanguage{#1}{angla}}%
+ \fi
+}
+% \end{macrocode}
+% \end{macro}
+% Append the definitions to the language-calling commands.
+% \begin{macrocode}
+\AtBeginDocument{%
+ \ifbbbbfixlanguage
+ \else
+ \bbbbaddto{esperanto}{bibsesperanto}
+ \fi
+% \end{macrocode}
+% Switch off the change of case in titles by appending
+% \cs{btxifchangecaseoff} to \cs{extras}\meta{language}.
+% \begin{macrocode}
+ \bbbbaddto{esperanto}{btxifchangecaseoff}
+}
+%</esperanto>
+% \end{macrocode}
+%
+% \subsubsection{Portuguese}
+% \changes{0.33}{2003/05/22}{Added Portuguese language}%
+% \changes{1.02}{2005/04/15}{Language Portuguese completed}%
+% \changes{1.10}{2005/04/24}{Bug in Portuguese removed}%
+% \begin{macrocode}
+%<*portuguese>
+% \end{macrocode}
+%
+% \begin{macro}{\bibsportuguese}
+% Bibliographic commands for Portuguese.
+% \begin{macrocode}
+\newcommand\bibsportuguese[1][portuguese]{%
+ \def\biblanguagename{#1}%
+ \def\btxetalshort##1{\protect\foreignlanguage{#1}{et~al##1{}}}%
+ \def\btxetallong##1{\protect\foreignlanguage{#1}{et~alii}}%
+ \def\btxandshort##1{\protect\foreignlanguage{#1}{e}}%
+ \def\btxandlong##1{\protect\foreignlanguage{#1}{e}}%
+ \def\btxandcomma##1{}%
+ \def\btxinlong##1{\protect\foreignlanguage{#1}{em}}%
+ \def\btxinshort##1{\protect\foreignlanguage{#1}{em}}%
+ \def\btxofseriesshort##1{\protect\foreignlanguage{#1}{de}}%
+ \def\btxinseriesshort##1{\protect\foreignlanguage{#1}{em}}%
+ \def\btxofserieslong##1{\protect\foreignlanguage{#1}{de}}%
+ \def\btxinserieslong##1{\protect\foreignlanguage{#1}{em}}%
+ \def\btxeditorshort##1{\protect\foreignlanguage{#1}{ed##1{}}}%
+ \def\btxeditorlong##1{\protect\foreignlanguage{#1}{editor}}%
+ \def\btxeditorsshort##1{\protect\foreignlanguage{#1}{eds##1{}}}%
+ \def\btxeditorslong##1{\protect\foreignlanguage{#1}{editores}}%
+ \def\btxvolumeshort##1{\protect\foreignlanguage{#1}{vol##1{}}}%
+ \def\btxvolumelong##1{\protect\foreignlanguage{#1}{volume}}%
+ \def\btxnumbershort##1{\protect\foreignlanguage{#1}{%
+ n\textsuperscript{\underline{o}}}}%
+ \def\btxnumberlong##1{\protect\foreignlanguage{#1}{n\'umero}}%
+ \def\btxeditionshort##1{\protect\foreignlanguage{#1}{ed##1{}}}%
+ \def\btxeditionlong##1{\protect\foreignlanguage{#1}{edi\c c\~ao}}%
+ \def\btxeditionnumshort##1##2{\btxnumeralshort{##1}~\btxeditionshort{##2}}%
+ \def\btxeditionnumlong##1##2{\btxnumerallong{##1}~\btxeditionlong{##2}}%
+ \def\btxchaptershort##1{\protect\foreignlanguage{#1}{cap##1{}}}%
+ \def\btxchapterlong##1{\protect\foreignlanguage{#1}{cap\'\i tulo}}%
+ \def\btxpageshort##1{\protect\foreignlanguage{#1}{p\'ag##1{}}}%
+ \def\btxpagelong##1{\protect\foreignlanguage{#1}{p\'agina}}%
+ \def\btxpagesshort##1{\protect\foreignlanguage{#1}{p\'ags##1{}}}%
+ \def\btxpageslong##1{\protect\foreignlanguage{#1}{p\'aginas}}%
+ \def\btxmastthesis##1{\protect\foreignlanguage{#1}{Tese de Mestrado}}%
+ \def\btxphdthesis##1{\protect\foreignlanguage{#1}{Tese de Doutoramento}}%
+ \def\btxtechrepshort##1{\protect\foreignlanguage{#1}{Rel.\ T\'ec##1{}}}%
+ \def\btxtechreplong##1{\protect\foreignlanguage{#1}{Relat\'orio T\'ecnico}}%
+ \def\btxmonjanlong##1{\protect\foreignlanguage{#1}{janeiro}}%
+ \def\btxmonfeblong##1{\protect\foreignlanguage{#1}{fevereiro}}%
+ \def\btxmonmarlong##1{\protect\foreignlanguage{#1}{mar\c co}}%
+ \def\btxmonaprlong##1{\protect\foreignlanguage{#1}{abril}}%
+ \def\btxmonmaylong##1{\protect\foreignlanguage{#1}{maio}}%
+ \def\btxmonjunlong##1{\protect\foreignlanguage{#1}{junho}}%
+ \def\btxmonjullong##1{\protect\foreignlanguage{#1}{julho}}%
+ \def\btxmonauglong##1{\protect\foreignlanguage{#1}{agosto}}%
+ \def\btxmonseplong##1{\protect\foreignlanguage{#1}{setembro}}%
+ \def\btxmonoctlong##1{\protect\foreignlanguage{#1}{outubro}}%
+ \def\btxmonnovlong##1{\protect\foreignlanguage{#1}{novembro}}%
+ \def\btxmondeclong##1{\protect\foreignlanguage{#1}{dezembro}}%
+ \def\btxmonjanshort##1{\protect\foreignlanguage{#1}{jan##1{}}}%
+ \def\btxmonfebshort##1{\protect\foreignlanguage{#1}{fev##1{}}}%
+ \def\btxmonmarshort##1{\protect\foreignlanguage{#1}{mar##1{}}}%
+ \def\btxmonaprshort##1{\protect\foreignlanguage{#1}{abr##1{}}}%
+ \def\btxmonmayshort##1{\protect\foreignlanguage{#1}{maio}}%
+ \def\btxmonjunshort##1{\protect\foreignlanguage{#1}{jun##1{}}}%
+ \def\btxmonjulshort##1{\protect\foreignlanguage{#1}{jul##1{}}}%
+ \def\btxmonaugshort##1{\protect\foreignlanguage{#1}{ago##1{}}}%
+ \def\btxmonsepshort##1{\protect\foreignlanguage{#1}{set##1{}}}%
+ \def\btxmonoctshort##1{\protect\foreignlanguage{#1}{out##1{}}}%
+ \def\btxmonnovshort##1{\protect\foreignlanguage{#1}{nov##1{}}}%
+ \def\btxmondecshort##1{\protect\foreignlanguage{#1}{dez##1{}}}%
+ \def\Btxinlong##1{\protect\foreignlanguage{#1}{Em}}%
+ \def\Btxinshort##1{\protect\foreignlanguage{#1}{Em}}%
+ \def\Btxeditorshort##1{\protect\foreignlanguage{#1}{Ed##1{}}}%
+ \def\Btxeditorlong##1{\protect\foreignlanguage{#1}{Editor}}%
+ \def\Btxeditorsshort##1{\protect\foreignlanguage{#1}{Eds##1{}}}%
+ \def\Btxeditorslong##1{\protect\foreignlanguage{#1}{Editores}}%
+ \def\Btxvolumeshort##1{\protect\foreignlanguage{#1}{Vol##1{}}}%
+ \def\Btxvolumelong##1{\protect\foreignlanguage{#1}{Volume}}%
+ \def\Btxnumbershort##1{\protect\foreignlanguage{#1}{%
+ N\textsuperscript{\underline{o}}}}%
+ \def\Btxnumberlong##1{\protect\foreignlanguage{#1}{N\'umero}}%
+ \def\Btxeditionshort##1{\protect\foreignlanguage{#1}{Ed##1{}}}%
+ \def\Btxeditionlong##1{\protect\foreignlanguage{#1}{Edi\c c\~ao}}%
+ \def\Btxeditionnumshort##1##2{\btxnumeralshort{##1}~\Btxeditionshort{##2}}%
+ \def\Btxeditionnumlong##1##2{\btxnumerallong{##1}~\Btxeditionlong{##2}}%
+ \def\Btxchaptershort##1{\protect\foreignlanguage{#1}{Cap##1{}}}%
+ \def\Btxchapterlong##1{\protect\foreignlanguage{#1}{Cap\'{\i}tulo}}%
+ \def\Btxpageshort##1{\protect\foreignlanguage{#1}{P\'ag##1{}}}%
+ \def\Btxpagelong##1{\protect\foreignlanguage{#1}{P\'agina}}%
+ \def\Btxpagesshort##1{\protect\foreignlanguage{#1}{P\'ags##1{}}}%
+ \def\Btxpageslong##1{\protect\foreignlanguage{#1}{P\'aginas}}%
+ \def\Btxtechrepshort##1{\protect\foreignlanguage{#1}{Rel.\ T\'ec##1{}}}%
+ \def\Btxtechreplong##1{\protect\foreignlanguage{#1}{Relat\'orio T\'ecnico}}%
+ \def\btxurldatecomment##1{\protect\foreignlanguage{#1}{, acedido em ##1}}%
+ \def\btxfnamespaceshort{\,}%
+ \def\btxfnamespacelong{ }%
+ \def\btxnumeralshort##1{\protect\foreignlanguage{#1}{%
+ \ifnumber{##1}{##1\textsuperscript{\underline a}}{##1}}}%
+ \def\btxnumerallong##1{\btxnumeralshort{##1}}%
+% \end{macrocode}
+% Define how to print month and year in numeric format, e.\,g. MM/YYYY.
+% \begin{macrocode}
+ \def\btxprintmonthyearnum##1##2{##1/##2}%
+ \def\btxkeywordlanguage##1{{\protect\selectlanguage{#1}##1}}%
+ \ifbbbblanguagenames
+ \def\btxlanguagenameamerican{\protect\foreignlanguage{#1}{ingl\^es}}%
+ \def\btxlanguagenameaustrian{\protect\foreignlanguage{#1}{alem\~ao}}%
+ \def\btxlanguagenamebrazil{\protect\foreignlanguage{#1}{portugu\^es}}%
+ \def\btxlanguagenamebrazilian{\protect\foreignlanguage{#1}{portugu\^es}}%
+ \def\btxlanguagenamebritish{\protect\foreignlanguage{#1}{ingl\^es}}%
+ \def\btxlanguagenamebulgarian{\protect\foreignlanguage{#1}{b\'ulgaro}}%
+ \def\btxlanguagenamecanadian{\protect\foreignlanguage{#1}{ingl\^es}}%
+ \def\btxlanguagenamecanadien{\protect\foreignlanguage{#1}{franc\^es}}%
+ \def\btxlanguagenamecatalan{\protect\foreignlanguage{#1}{catal\~ao}}%
+ \def\btxlanguagenamecroatian{\protect\foreignlanguage{#1}{croata}}%
+ \def\btxlanguagenameczech{\protect\foreignlanguage{#1}{checo}}%
+ \def\btxlanguagenamedanish{\protect\foreignlanguage{#1}{dinamarqu\^es}}%
+ \def\btxlanguagenamedutch{\protect\foreignlanguage{#1}{holand\^es}}%
+ \def\btxlanguagenameenglish{\protect\foreignlanguage{#1}{ingl\^es}}%
+ \def\btxlanguagenameesperanto{\protect\foreignlanguage{#1}{esperanto}}%
+ \def\btxlanguagenamefinnish{\protect\foreignlanguage{#1}{finland\^es}}%
+ \def\btxlanguagenamefranceis{\protect\foreignlanguage{#1}{franc\^es}}%
+ \def\btxlanguagenamefrench{\protect\foreignlanguage{#1}{franc\^es}}%
+ \def\btxlanguagenamefrenchb{\protect\foreignlanguage{#1}{franc\^es}}%
+ \def\btxlanguagenamegerman{\protect\foreignlanguage{#1}{\alem\~ao}}%
+ \def\btxlanguagenamegermanb{\protect\foreignlanguage{#1}{\alem\~ao}}%
+ \def\btxlanguagenamegreek{\protect\foreignlanguage{#1}{grego}}%
+ \def\btxlanguagenamehebrew{\protect\foreignlanguage{#1}{hebreu}}%
+ \def\btxlanguagenamehungarian{\protect\foreignlanguage{#1}{h\'ungaro}}%
+ \def\btxlanguagenameicelandic{\protect\foreignlanguage{#1}{island\^es}}%
+ \def\btxlanguagenameirish{\protect\foreignlanguage{#1}{irland\^es}}%
+ \def\btxlanguagenameitalian{\protect\foreignlanguage{#1}{italiano}}%
+ \def\btxlanguagenamelatin{\protect\foreignlanguage{#1}{latim}}%
+ \def\btxlanguagenamenaustrian{\protect\foreignlanguage{#1}{\alem\~ao}}%
+ \def\btxlanguagenamengerman{\protect\foreignlanguage{#1}{\alem\~ao}}%
+ \def\btxlanguagenamenorsk{\protect\foreignlanguage{#1}{noruegu\^es}}%
+ \def\btxlanguagenamenynorsk{\protect\foreignlanguage{#1}{neo-noruegu\^es}}%
+ \def\btxlanguagenamepolish{\protect\foreignlanguage{#1}{polaco}}%
+ \def\btxlanguagenameportuges{\protect\foreignlanguage{#1}{portugu\^es}}%
+ \def\btxlanguagenameportuguese{\protect\foreignlanguage{#1}{portugu\^es}}%
+ \def\btxlanguagenamerussian{\protect\foreignlanguage{#1}{russio}}%
+ \def\btxlanguagenamescottish{\protect\foreignlanguage{#1}{escoc\^es}}%
+ \def\btxlanguagenameserbian{\protect\foreignlanguage{#1}{s\'ervio}}%
+ \def\btxlanguagenamespanish{\protect\foreignlanguage{#1}{espanhol}}%
+ \def\btxlanguagenameswedish{\protect\foreignlanguage{#1}{sueco}}%
+ \def\btxlanguagenameturkish{\protect\foreignlanguage{#1}{turco}}%
+ \def\btxlanguagenameUKenglish{\protect\foreignlanguage{#1}{ingl\^es}}%
+ \def\btxlanguagenameUSenglish{\protect\foreignlanguage{#1}{ingl\^es}}%
+ \fi
+}
+% \end{macrocode}
+% \end{macro}
+% Copy the commands to the other languages.
+% \begin{macrocode}
+\newcommand\bibsportuges[1][portuges]{\bibsportuguese[#1]}
+\newcommand\bibsbrazil[1][brazil]{\bibsbrazilian[#1]}
+\newcommand\bibsbrazilian[1][brazilian]{%
+ \bibsportuguese[#1]%
+ \def\btxmonjanlong##1{\protect\foreignlanguage{#1}{janeiro}}%
+ \def\btxmonfeblong##1{\protect\foreignlanguage{#1}{fevereiro}}%
+ \def\btxmonmarlong##1{\protect\foreignlanguage{#1}{mar\c co}}%
+ \def\btxmonaprlong##1{\protect\foreignlanguage{#1}{abril}}%
+ \def\btxmonmaylong##1{\protect\foreignlanguage{#1}{maio}}%
+ \def\btxmonjunlong##1{\protect\foreignlanguage{#1}{junho}}%
+ \def\btxmonjullong##1{\protect\foreignlanguage{#1}{julho}}%
+ \def\btxmonauglong##1{\protect\foreignlanguage{#1}{agosto}}%
+ \def\btxmonseplong##1{\protect\foreignlanguage{#1}{setembro}}%
+ \def\btxmonoctlong##1{\protect\foreignlanguage{#1}{outubro}}%
+ \def\btxmonnovlong##1{\protect\foreignlanguage{#1}{novembro}}%
+ \def\btxmondeclong##1{\protect\foreignlanguage{#1}{dezembro}}%
+ \def\btxmonjanshort##1{\protect\foreignlanguage{#1}{jan##1{}}}%
+ \def\btxmonfebshort##1{\protect\foreignlanguage{#1}{fev##1{}}}%
+ \def\btxmonmarshort##1{\protect\foreignlanguage{#1}{mar##1{}}}%
+ \def\btxmonaprshort##1{\protect\foreignlanguage{#1}{abr##1{}}}%
+ \def\btxmonmayshort##1{\protect\foreignlanguage{#1}{mai##1{}}}%
+ \def\btxmonjunshort##1{\protect\foreignlanguage{#1}{jun##1{}}}%
+ \def\btxmonjulshort##1{\protect\foreignlanguage{#1}{jul##1{}}}%
+ \def\btxmonaugshort##1{\protect\foreignlanguage{#1}{ago##1{}}}%
+ \def\btxmonsepshort##1{\protect\foreignlanguage{#1}{set##1{}}}%
+ \def\btxmonoctshort##1{\protect\foreignlanguage{#1}{out##1{}}}%
+ \def\btxmonnovshort##1{\protect\foreignlanguage{#1}{nov##1{}}}%
+ \def\btxmondecshort##1{\protect\foreignlanguage{#1}{dez##1{}}}%
+ \def\btxpageshort##1{\protect\foreignlanguage{#1}{p##1{}}}%
+ \def\btxpagesshort##1{\protect\foreignlanguage{#1}{pp##1{}}}%
+ \def\Btxpageshort##1{\protect\foreignlanguage{#1}{P##1{}}}%
+ \def\Btxpagesshort##1{\protect\foreignlanguage{#1}{Pp##1{}}}%
+ \def\btxurldatecomment##1{\protect\foreignlanguage{#1}{, acesso em ##1}}%
+}
+% \end{macrocode}
+% Append the definitions to the language-calling commands.
+% \begin{macrocode}
+\AtBeginDocument{%
+ \ifbbbbfixlanguage
+ \else
+ \bbbbaddto{brazil}{bibsbrazil}
+ \bbbbaddto{brazilian}{bibsbrazilian}
+ \bbbbaddto{portuges}{bibsportuges}
+ \bbbbaddto{portuguese}{bibsportuguese}
+ \fi
+% \end{macrocode}
+% Switch off the change of case in titles for all Portuguese dialects by
+% appending \cs{btxifchangecaseoff} to \cs{extras}\meta{language}.
+% \begin{macrocode}
+ \bbbbaddto{brazil}{btxifchangecaseoff}
+ \bbbbaddto{brazilian}{btxifchangecaseoff}
+ \bbbbaddto{portuges}{btxifchangecaseoff}
+ \bbbbaddto{portuguese}{btxifchangecaseoff}
+}
+%</portuguese>
+% \end{macrocode}
+%
+% \subsubsection{Dutch}
+% \changes{0.33}{2003/05/22}{Added Dutch language}%
+% \begin{macrocode}
+%<*dutch>
+% \end{macrocode}
+%
+% \begin{macro}{\bibsdutch}
+% Bibliographic commands for Dutch.
+% \begin{macrocode}
+\newcommand\bibsdutch[1][dutch]{%
+ \def\biblanguagename{#1}%
+ \def\btxetalshort##1{\protect\foreignlanguage{#1}{et~al##1{}}}%
+ \def\btxetallong##1{\protect\foreignlanguage{#1}{en anderen}}%
+ \def\btxandshort##1{\protect\foreignlanguage{#1}{en}}%
+ \def\btxandlong##1{\protect\foreignlanguage{#1}{en}}%
+ \def\btxandcomma##1{,}%
+ \def\btxinlong##1{\protect\foreignlanguage{#1}{in}}%
+ \def\btxinshort##1{\protect\foreignlanguage{#1}{in}}%
+ \def\btxofseriesshort##1{\protect\foreignlanguage{#1}{van}}%
+ \def\btxinseriesshort##1{\protect\foreignlanguage{#1}{in}}%
+ \def\btxofserieslong##1{\protect\foreignlanguage{#1}{van}}%
+ \def\btxinserieslong##1{\protect\foreignlanguage{#1}{in}}%
+ \def\btxeditorshort##1{\protect\foreignlanguage{#1}{red##1{}}}%
+ \def\btxeditorlong##1{\protect\foreignlanguage{#1}{redactie}}%
+ \def\btxeditorsshort##1{\protect\foreignlanguage{#1}{red##1{}}}%
+ \def\btxeditorslong##1{\protect\foreignlanguage{#1}{redactie}}%
+ \def\btxvolumeshort##1{\protect\foreignlanguage{#1}{vol##1{}}}%
+ \def\btxvolumelong##1{\protect\foreignlanguage{#1}{volume}}%
+ \def\btxnumbershort##1{\protect\foreignlanguage{#1}{nr##1{}}}%
+ \def\btxnumberlong##1{\protect\foreignlanguage{#1}{nummer}}%
+ \def\btxeditionshort##1{\protect\foreignlanguage{#1}{druk}}%
+ \def\btxeditionlong##1{\protect\foreignlanguage{#1}{uitgave}}%
+ \def\btxeditionnumshort##1##2{\btxnumeralshort{##1}~\btxeditionshort{##2}}%
+ \def\btxeditionnumlong##1##2{\btxnumerallong{##1}~\btxeditionlong{##2}}%
+ \def\btxchaptershort##1{\protect\foreignlanguage{#1}{hfdst##1{}}}%
+ \def\btxchapterlong##1{\protect\foreignlanguage{#1}{hoofdstuk}}%
+ \def\btxpageshort##1{\protect\foreignlanguage{#1}{pag##1{}}}%
+ \def\btxpagelong##1{\protect\foreignlanguage{#1}{pagina}}%
+ \def\btxpagesshort##1{\protect\foreignlanguage{#1}{pag##1{}}}%
+ \def\btxpageslong##1{\protect\foreignlanguage{#1}{pagina's}}%
+ \def\btxmastthesis##1{\protect\foreignlanguage{#1}{scriptie}}%
+ \def\btxphdthesis##1{\protect\foreignlanguage{#1}{proefschrift}}%
+ \def\btxtechrepshort##1{\protect\foreignlanguage{#1}{Tech.\ Rapp##1{}}}%
+ \def\btxtechreplong##1{\protect\foreignlanguage{#1}{Technisch Rapport}}%
+ \def\btxmonjanlong##1{\protect\foreignlanguage{#1}{Januari}}%
+ \def\btxmonfeblong##1{\protect\foreignlanguage{#1}{Februari}}%
+ \def\btxmonmarlong##1{\protect\foreignlanguage{#1}{Maart}}%
+ \def\btxmonaprlong##1{\protect\foreignlanguage{#1}{April}}%
+ \def\btxmonmaylong##1{\protect\foreignlanguage{#1}{Mei}}%
+ \def\btxmonjunlong##1{\protect\foreignlanguage{#1}{Juni}}%
+ \def\btxmonjullong##1{\protect\foreignlanguage{#1}{Juli}}%
+ \def\btxmonauglong##1{\protect\foreignlanguage{#1}{Augustus}}%
+ \def\btxmonseplong##1{\protect\foreignlanguage{#1}{September}}%
+ \def\btxmonoctlong##1{\protect\foreignlanguage{#1}{Oktober}}%
+ \def\btxmonnovlong##1{\protect\foreignlanguage{#1}{November}}%
+ \def\btxmondeclong##1{\protect\foreignlanguage{#1}{December}}%
+ \def\btxmonjanshort##1{\protect\foreignlanguage{#1}{Jan##1{}}}%
+ \def\btxmonfebshort##1{\protect\foreignlanguage{#1}{Feb##1{}}}%
+ \def\btxmonmarshort##1{\protect\foreignlanguage{#1}{Mrt}}%
+ \def\btxmonaprshort##1{\protect\foreignlanguage{#1}{Apr##1{}}}%
+ \def\btxmonmayshort##1{\protect\foreignlanguage{#1}{Mei}}%
+ \def\btxmonjunshort##1{\protect\foreignlanguage{#1}{Jun##1{}}}%
+ \def\btxmonjulshort##1{\protect\foreignlanguage{#1}{Jul##1{}}}%
+ \def\btxmonaugshort##1{\protect\foreignlanguage{#1}{Aug##1{}}}%
+ \def\btxmonsepshort##1{\protect\foreignlanguage{#1}{Sep##1{}}}%
+ \def\btxmonoctshort##1{\protect\foreignlanguage{#1}{Okt##1{}}}%
+ \def\btxmonnovshort##1{\protect\foreignlanguage{#1}{Nov##1{}}}%
+ \def\btxmondecshort##1{\protect\foreignlanguage{#1}{Dec##1{}}}%
+ \def\Btxinlong##1{\protect\foreignlanguage{#1}{In}}%
+ \def\Btxinshort##1{\protect\foreignlanguage{#1}{In}}%
+ \def\Btxeditorshort##1{\protect\foreignlanguage{#1}{Red##1{}}}%
+ \def\Btxeditorlong##1{\protect\foreignlanguage{#1}{Redactie}}%
+ \def\Btxeditorsshort##1{\protect\foreignlanguage{#1}{Red##1{}}}%
+ \def\Btxeditorslong##1{\protect\foreignlanguage{#1}{Redactie}}%
+ \def\Btxvolumeshort##1{\protect\foreignlanguage{#1}{Vol##1{}}}%
+ \def\Btxvolumelong##1{\protect\foreignlanguage{#1}{Volume}}%
+ \def\Btxnumbershort##1{\protect\foreignlanguage{#1}{Nr##1{}}}%
+ \def\Btxnumberlong##1{\protect\foreignlanguage{#1}{Nummer}}%
+ \def\Btxeditionshort##1{\protect\foreignlanguage{#1}{Druk}}%
+ \def\Btxeditionlong##1{\protect\foreignlanguage{#1}{Uitgave}}%
+ \def\Btxeditionnumshort##1##2{\btxnumeralshort{##1}~\Btxeditionshort{##2}}%
+ \def\Btxeditionnumlong##1##2{\btxnumerallong{##1}~\Btxeditionlong{##2}}%
+ \def\Btxchaptershort##1{\protect\foreignlanguage{#1}{Hfdst##1{}}}%
+ \def\Btxchapterlong##1{\protect\foreignlanguage{#1}{Hoofdstuk}}%
+ \def\Btxpageshort##1{\protect\foreignlanguage{#1}{Pag##1{}}}%
+ \def\Btxpagelong##1{\protect\foreignlanguage{#1}{Pagina}}%
+ \def\Btxpagesshort##1{\protect\foreignlanguage{#1}{Pags##1{}}}%
+ \def\Btxpageslong##1{\protect\foreignlanguage{#1}{Pagina's}}%
+ \def\Btxtechrepshort##1{\protect\foreignlanguage{#1}{Tech.\ Rapp##1{}}}%
+ \def\Btxtechreplong##1{\protect\foreignlanguage{#1}{Technisch Rapport}}%
+ \def\btxurldatecomment##1{\protect\foreignlanguage{#1}{, bezocht op ##1}}%
+ \def\btxfnamespaceshort{\,}%
+ \def\btxfnamespacelong{ }%
+ \def\btxnumeralshort##1{\btxnumeralfallback{#1}{##1}}%
+ \def\btxnumerallong##1{\btxnumeralfallback{#1}{##1}}%
+% \end{macrocode}
+% Define how to print month and year in numeric format, e.\,g. MM/YYYY.
+% \begin{macrocode}
+ \def\btxprintmonthyearnum##1##2{##1/##2}%
+ \def\btxkeywordlanguage##1{{\protect\selectlanguage{#1}##1}}%
+ \ifbbbblanguagenames
+ \def\btxlanguagenameamerican{\protect\foreignlanguage{#1}{engels}}%
+ % \def\btxlanguagenameaustrian{\protect\foreignlanguage{#1}{german}}%
+ \def\btxlanguagenamebrazil{\protect\foreignlanguage{#1}{portugees}}%
+ \def\btxlanguagenamebrazilian{\protect\foreignlanguage{#1}{portugees}}%
+ \def\btxlanguagenamebritish{\protect\foreignlanguage{#1}{engels}}%
+ % \def\btxlanguagenamebulgarian{\protect\foreignlanguage{#1}{bulgarian}}%
+ \def\btxlanguagenamecanadian{\protect\foreignlanguage{#1}{engels}}%
+ % \def\btxlanguagenamecanadien{\protect\foreignlanguage{#1}{french}}%
+ % \def\btxlanguagenamecatalan{\protect\foreignlanguage{#1}{catalan}}%
+ % \def\btxlanguagenamecroatian{\protect\foreignlanguage{#1}{croatian}}%
+ % \def\btxlanguagenameczech{\protect\foreignlanguage{#1}{czech}}%
+ % \def\btxlanguagenamedanish{\protect\foreignlanguage{#1}{d\"anisch}}%
+ % \def\btxlanguagenamedutch{\protect\foreignlanguage{#1}{dutch}}%
+ \def\btxlanguagenameenglish{\protect\foreignlanguage{#1}{engels}}%
+ % \def\btxlanguagenameesperanto{\protect\foreignlanguage{#1}{esperanto}}%
+ % \def\btxlanguagenamefinnish{\protect\foreignlanguage{#1}{finnish}}%
+ % \def\btxlanguagenamefrancais{\protect\foreignlanguage{#1}{french}}%
+ % \def\btxlanguagenamefrench{\protect\foreignlanguage{#1}{french}}%
+ % \def\btxlanguagenamefrenchb{\protect\foreignlanguage{#1}{french}}%
+ % \def\btxlanguagenamegerman{\protect\foreignlanguage{#1}{german}}%
+ % \def\btxlanguagenamegermanb{\protect\foreignlanguage{#1}{german}}%
+ % \def\btxlanguagenamegreek{\protect\foreignlanguage{#1}{greek}}%
+ % \def\btxlanguagenamehebrew{\protect\foreignlanguage{#1}{hebrew}}%
+ % \def\btxlanguagenamehungarian{\protect\foreignlanguage{#1}{hungarian}}%
+ % \def\btxlanguagenameicelandic{\protect\foreignlanguage{#1}{icelandic}}%
+ % \def\btxlanguagenameirish{\protect\foreignlanguage{#1}{irish}}%
+ % \def\btxlanguagenameitalian{\protect\foreignlanguage{#1}{italian}}%
+ % \def\btxlanguagenamelatin{\protect\foreignlanguage{#1}{latin}}%
+ % \def\btxlanguagenamenaustrian{\protect\foreignlanguage{#1}{german}}%
+ % \def\btxlanguagenamengerman{\protect\foreignlanguage{#1}{german}}%
+ % \def\btxlanguagenamenorsk{\protect\foreignlanguage{#1}{norwegian}}%
+ % \def\btxlanguagenamenynorsk{\protect\foreignlanguage{#1}{new-norwegian}}%
+ % \def\btxlanguagenamepolish{\protect\foreignlanguage{#1}{polish}}%
+ \def\btxlanguagenameportuges{\protect\foreignlanguage{#1}{portugees}}%
+ \def\btxlanguagenameportuguese{\protect\foreignlanguage{#1}{portugees}}%
+ % \def\btxlanguagenamerussian{\protect\foreignlanguage{#1}{russian}}%
+ % \def\btxlanguagenamescottish{\protect\foreignlanguage{#1}{scottish}}%
+ % \def\btxlanguagenameserbian{\protect\foreignlanguage{#1}{serbian}}%
+ % \def\btxlanguagenamespanish{\protect\foreignlanguage{#1}{spanish}}%
+ % \def\btxlanguagenameswedish{\protect\foreignlanguage{#1}{swedish}}%
+ % \def\btxlanguagenameturkish{\protect\foreignlanguage{#1}{turkish}}%
+ \def\btxlanguagenameUKenglish{\protect\foreignlanguage{#1}{engels}}%
+ \def\btxlanguagenameUSenglish{\protect\foreignlanguage{#1}{engels}}%
+ \fi
+}
+% \end{macrocode}
+% \end{macro}
+% Append the definitions to the language-calling commands.
+% \begin{macrocode}
+\AtBeginDocument{%
+ \ifbbbbfixlanguage
+ \else
+ \bbbbaddto{dutch}{bibsdutch}
+ \fi
+% \end{macrocode}
+% Switch on the change of case in titles for all Dutch dialects by
+% appending \cs{btxifchangecaseoff} to \cs{extras}\meta{language}.
+% \begin{macrocode}
+ \bbbbaddto{dutch}{btxifchangecaseoff}
+}
+%</dutch>
+% \end{macrocode}
+%
+% \subsubsection{Swedish}
+% \changes{0.33}{2003/05/22}{Added Swedish language}%
+% \changes{0.41}{2003/11/03}{Corrected swedish (by Hans Fredrik Nordhaug)}%
+% \changes{1.31}{2012/01/03}{Corrected Swedish (by Erik {\"O}sthols)}%
+% \begin{macrocode}
+%<*swedish>
+% \end{macrocode}
+%
+% The language definition for Swedish was provided by Hans Fredrik
+% Nordhaug and Erik {\"O}sthols.
+%
+% \begin{macro}{\bibsswedish}
+% Bibliographic commands for Swedish.
+% \begin{macrocode}
+\newcommand\bibsswedish[1][swedish]{%
+ \def\biblanguagename{#1}%
+ \def\btxetalshort##1{\protect\foreignlanguage{#1}{et~al##1{}}}%
+ \def\btxetallong##1{\protect\foreignlanguage{#1}{et~alii}}%
+ \def\btxandshort##1{\protect\foreignlanguage{#1}{och}}%
+ \def\btxandlong##1{\protect\foreignlanguage{#1}{och}}%
+ \def\btxandcomma##1{}%
+ \def\btxinlong##1{\protect\foreignlanguage{#1}{i}}%
+ \def\btxinshort##1{\protect\foreignlanguage{#1}{i}}%
+ \def\btxofseriesshort##1{\protect\foreignlanguage{#1}{av}}%
+ \def\btxinseriesshort##1{\protect\foreignlanguage{#1}{i}}%
+ \def\btxofserieslong##1{\protect\foreignlanguage{#1}{av}}%
+ \def\btxinserieslong##1{\protect\foreignlanguage{#1}{i}}%
+ \def\btxeditorshort##1{\protect\foreignlanguage{#1}{red##1{}}}%
+ \def\btxeditorlong##1{\protect\foreignlanguage{#1}{redakt\"or}}%
+ \def\btxeditorsshort##1{\protect\foreignlanguage{#1}{red##1{}}}%
+ \def\btxeditorslong##1{\protect\foreignlanguage{#1}{redakt\"orer}}%
+ \def\btxvolumeshort##1{\protect\foreignlanguage{#1}{vol##1{}}}%
+ \def\btxvolumelong##1{\protect\foreignlanguage{#1}{volym}}%
+ \def\btxnumbershort##1{\protect\foreignlanguage{#1}{nr##1{}}}%
+ \def\btxnumberlong##1{\protect\foreignlanguage{#1}{nummer}}%
+ \def\btxeditionshort##1{\protect\foreignlanguage{#1}{utg}}%
+ \def\btxeditionlong##1{\protect\foreignlanguage{#1}{utg\aa va}}%
+ \def\btxeditionnumshort##1##2{\btxnumeralshort{##1}~\btxeditionshort{##2}}%
+ \def\btxeditionnumlong##1##2{\btxnumerallong{##1}~\btxeditionlong{##2}}%
+ \def\btxchaptershort##1{\protect\foreignlanguage{#1}{kap##1{}}}%
+ \def\btxchapterlong##1{\protect\foreignlanguage{#1}{kapitel}}%
+ \def\btxpageshort##1{\protect\foreignlanguage{#1}{ss##1{}}}%
+ \def\btxpagelong##1{\protect\foreignlanguage{#1}{sida}}%
+ \def\btxpagesshort##1{\protect\foreignlanguage{#1}{s##1{}}}%
+ \def\btxpageslong##1{\protect\foreignlanguage{#1}{sidor}}%
+ \def\btxmastthesis##1{\protect\foreignlanguage{#1}{examensarbete}}%
+ \def\btxphdthesis##1{\protect\foreignlanguage{#1}{doktorsavhandling}}%
+ \def\btxtechrepshort##1{\protect\foreignlanguage{#1}{Tekn.\ rapp##1{}}}%
+ \def\btxtechreplong##1{\protect\foreignlanguage{#1}{Teknisk rapport}}%
+ \def\btxmonjanlong##1{\protect\foreignlanguage{#1}{januari}}%
+ \def\btxmonfeblong##1{\protect\foreignlanguage{#1}{februari}}%
+ \def\btxmonmarlong##1{\protect\foreignlanguage{#1}{mars}}%
+ \def\btxmonaprlong##1{\protect\foreignlanguage{#1}{april}}%
+ \def\btxmonmaylong##1{\protect\foreignlanguage{#1}{maj}}%
+ \def\btxmonjunlong##1{\protect\foreignlanguage{#1}{juni}}%
+ \def\btxmonjullong##1{\protect\foreignlanguage{#1}{juli}}%
+ \def\btxmonauglong##1{\protect\foreignlanguage{#1}{augusti}}%
+ \def\btxmonseplong##1{\protect\foreignlanguage{#1}{september}}%
+ \def\btxmonoctlong##1{\protect\foreignlanguage{#1}{oktober}}%
+ \def\btxmonnovlong##1{\protect\foreignlanguage{#1}{november}}%
+ \def\btxmondeclong##1{\protect\foreignlanguage{#1}{december}}%
+ \def\btxmonjanshort##1{\protect\foreignlanguage{#1}{jan##1{}}}%
+ \def\btxmonfebshort##1{\protect\foreignlanguage{#1}{feb##1{}}}%
+ \def\btxmonmarshort##1{\protect\foreignlanguage{#1}{mar}}%
+ \def\btxmonaprshort##1{\protect\foreignlanguage{#1}{apr##1{}}}%
+ \def\btxmonmayshort##1{\protect\foreignlanguage{#1}{maj}}%
+ \def\btxmonjunshort##1{\protect\foreignlanguage{#1}{jun##1{}}}%
+ \def\btxmonjulshort##1{\protect\foreignlanguage{#1}{jul##1{}}}%
+ \def\btxmonaugshort##1{\protect\foreignlanguage{#1}{aug##1{}}}%
+ \def\btxmonsepshort##1{\protect\foreignlanguage{#1}{sep##1{}}}%
+ \def\btxmonoctshort##1{\protect\foreignlanguage{#1}{okt##1{}}}%
+ \def\btxmonnovshort##1{\protect\foreignlanguage{#1}{nov##1{}}}%
+ \def\btxmondecshort##1{\protect\foreignlanguage{#1}{dec##1{}}}%
+ \def\Btxinlong##1{\protect\foreignlanguage{#1}{I}}%
+ \def\Btxinshort##1{\protect\foreignlanguage{#1}{I}}%
+ \def\Btxeditorshort##1{\protect\foreignlanguage{#1}{Red##1{}}}%
+ \def\Btxeditorlong##1{\protect\foreignlanguage{#1}{Redakt\"or}}%
+ \def\Btxeditorsshort##1{\protect\foreignlanguage{#1}{Red##1{}}}%
+ \def\Btxeditorslong##1{\protect\foreignlanguage{#1}{Redakt\"orer}}%
+ \def\Btxvolumeshort##1{\protect\foreignlanguage{#1}{Vol##1{}}}%
+ \def\Btxvolumelong##1{\protect\foreignlanguage{#1}{Volym}}%
+ \def\Btxnumbershort##1{\protect\foreignlanguage{#1}{Nr##1{}}}%
+ \def\Btxnumberlong##1{\protect\foreignlanguage{#1}{Nummer}}%
+ \def\Btxeditionshort##1{\protect\foreignlanguage{#1}{Utg}}%
+ \def\Btxeditionlong##1{\protect\foreignlanguage{#1}{Utg\aa va}}%
+ \def\Btxeditionnumshort##1##2{\btxnumeralshort{##1}~\Btxeditionshort{##2}}%
+ \def\Btxeditionnumlong##1##2{\btxnumerallong{##1}~\Btxeditionlong{##2}}%
+ \def\Btxchaptershort##1{\protect\foreignlanguage{#1}{Kap##1{}}}%
+ \def\Btxchapterlong##1{\protect\foreignlanguage{#1}{Kapitel}}%
+ \def\Btxpageshort##1{\protect\foreignlanguage{#1}{S##1{}}}%
+ \def\Btxpagelong##1{\protect\foreignlanguage{#1}{Sida}}%
+ \def\Btxpagesshort##1{\protect\foreignlanguage{#1}{Ss##1{}}}%
+ \def\Btxpageslong##1{\protect\foreignlanguage{#1}{Sida}}%
+ \def\Btxtechrepshort##1{\protect\foreignlanguage{#1}{Tekn.\ Rapp##1{}}}%
+ \def\Btxtechreplong##1{\protect\foreignlanguage{#1}{Teknisk Rapport}}%
+ \def\btxurldatecomment##1{\protect\foreignlanguage{#1}{, nedladdad ##1}}%
+ \def\btxfnamespaceshort{\,}%
+ \def\btxfnamespacelong{ }%
+ \def\btxnumeralshort#1{\btxnumeralswedish{swedish}{#1}}%
+ \def\btxnumerallong##1{\btxnumeralfallback{#1}{##1}}%
+ \def\btxnumerallong##1{%
+ \ifnumber{##1}{%
+ \ifcase##1 0:e\or f\"orsta\or andra\or tredje\or fj\"arde\or femte\or
+ sj\"atte\or sjunde\or {\aa}ttonde\or nionde\or tionde\else
+ \btxnumeralswedish{swedish}{##1}%
+ \fi}{##1}%
+ }%
+% \end{macrocode}
+% Define how to print month and year in numeric format, e.\,g. MM/YYYY.
+% \begin{macrocode}
+ \def\btxprintmonthyearnum##1##2{##1~##2}%
+ \def\btxkeywordlanguage##1{{\protect\selectlanguage{#1}##1}}%
+ \ifbbbblanguagenames
+ \def\btxlanguagenameamerican{\protect\foreignlanguage{#1}{engelska}}%
+ \def\btxlanguagenameaustrian{\protect\foreignlanguage{#1}{tyska}}%
+ \def\btxlanguagenamebrazil{\protect\foreignlanguage{#1}{portugisiska}}%
+ \def\btxlanguagenamebrazilian{\protect\foreignlanguage{#1}{portugisiska}}%
+ \def\btxlanguagenamebritish{\protect\foreignlanguage{#1}{engelska}}%
+ \def\btxlanguagenamebulgarian{\protect\foreignlanguage{#1}{bulgariska}}%
+ \def\btxlanguagenamecanadian{\protect\foreignlanguage{#1}{engelska}}%
+ \def\btxlanguagenamecanadien{\protect\foreignlanguage{#1}{franska}}%
+ \def\btxlanguagenamecatalan{\protect\foreignlanguage{#1}{katalanska}}%
+ \def\btxlanguagenamecroatian{\protect\foreignlanguage{#1}{kroatiska}}%
+ \def\btxlanguagenameczech{\protect\foreignlanguage{#1}{tjeckiska}}%
+ \def\btxlanguagenamedanish{\protect\foreignlanguage{#1}{danska}}%
+ \def\btxlanguagenamedutch{\protect\foreignlanguage{#1}{nederl\"andska}}%
+ \def\btxlanguagenameenglish{\protect\foreignlanguage{#1}{engelska}}%
+ \def\btxlanguagenameesperanto{\protect\foreignlanguage{#1}{esperanto}}%
+ \def\btxlanguagenamefinnish{\protect\foreignlanguage{#1}{finska}}%
+ \def\btxlanguagenamefrancais{\protect\foreignlanguage{#1}{franska}}%
+ \def\btxlanguagenamefrench{\protect\foreignlanguage{#1}{franska}}%
+ \def\btxlanguagenamefrenchb{\protect\foreignlanguage{#1}{franska}}%
+ \def\btxlanguagenamegerman{\protect\foreignlanguage{#1}{tyska}}%
+ \def\btxlanguagenamegermanb{\protect\foreignlanguage{#1}{tyska}}%
+ \def\btxlanguagenamegreek{\protect\foreignlanguage{#1}{grekiska}}%
+ \def\btxlanguagenamehebrew{\protect\foreignlanguage{#1}{hebreiska}}%
+ \def\btxlanguagenamehungarian{\protect\foreignlanguage{#1}{ungerska}}%
+ \def\btxlanguagenameicelandic{\protect\foreignlanguage{#1}{isl\"andska}}%
+ \def\btxlanguagenameirish{\protect\foreignlanguage{#1}{iriska}}%
+ \def\btxlanguagenameitalian{\protect\foreignlanguage{#1}{italienska}}%
+ \def\btxlanguagenamelatin{\protect\foreignlanguage{#1}{latin}}%
+ \def\btxlanguagenamenaustrian{\protect\foreignlanguage{#1}{tyska}}%
+ \def\btxlanguagenamengerman{\protect\foreignlanguage{#1}{tyska}}%
+ \def\btxlanguagenamenorsk{\protect\foreignlanguage{#1}{norska}}%
+ \def\btxlanguagenamenynorsk{\protect\foreignlanguage{#1}{nynorska}}%
+ \def\btxlanguagenamepolish{\protect\foreignlanguage{#1}{polska}}%
+ \def\btxlanguagenameportuges{\protect\foreignlanguage{#1}{portugisiska}}%
+ \def\btxlanguagenameportuguese{\protect\foreignlanguage{#1}{portugisiska}}%
+ \def\btxlanguagenamerussian{\protect\foreignlanguage{#1}{ryska}}%
+ \def\btxlanguagenamescottish{\protect\foreignlanguage{#1}{skotska}}%
+ \def\btxlanguagenameserbian{\protect\foreignlanguage{#1}{serbiska}}%
+ \def\btxlanguagenamespanish{\protect\foreignlanguage{#1}{spanska}}%
+ \def\btxlanguagenameswedish{\protect\foreignlanguage{#1}{svenska}}%
+ \def\btxlanguagenameturkish{\protect\foreignlanguage{#1}{turkiska}}%
+ \def\btxlanguagenameUKenglish{\protect\foreignlanguage{#1}{engelska}}%
+ \def\btxlanguagenameUSenglish{\protect\foreignlanguage{#1}{engelska}}%
+ \fi
+}
+% \end{macrocode}
+% \end{macro}
+% Append the definitions to the language-calling commands.
+% \begin{macrocode}
+\AtBeginDocument{%
+ \ifbbbbfixlanguage
+ \else
+ \bbbbaddto{swedish}{bibsswedish}
+ \fi
+% \end{macrocode}
+% Switch on the change of case in titles for all Swedish dialects by
+% appending \cs{btxifchangecaseoff} to \cs{extras}\meta{language}.
+% \begin{macrocode}
+ \bbbbaddto{swedish}{btxifchangecaseoff}
+}
+%</swedish>
+% \end{macrocode}
+%
+% \subsubsection{Afrikaans}
+% \changes{0.34}{2003/07/28}{Added Afrikaans language}%
+% \begin{macrocode}
+%<*afrikaans>
+% \end{macrocode}
+%
+% The language definition for Afrikaans was provided by Danie Els.
+%
+% \begin{macro}{\bibsafrikaans}
+% Bibliographic commands for Afrikaans.
+% \begin{macrocode}
+\newcommand\bibsafrikaans[1][afrikaans]{%
+ \def\biblanguagename{#1}%
+ \def\btxetalshort##1{\protect\foreignlanguage{#1}{et~al##1{}}}%
+ \def\btxetallong##1{\protect\foreignlanguage{#1}{et~alii}}%
+ \def\btxandshort##1{\protect\foreignlanguage{#1}{en}}%
+ \def\btxandlong##1{\protect\foreignlanguage{#1}{en}}%
+ \def\btxandcomma##1{\protect\foreignlanguage{#1}{}}%
+ \def\btxinlong##1{\protect\foreignlanguage{#1}{in}}%
+ \def\btxinshort##1{\protect\foreignlanguage{#1}{in}}%
+ \def\btxofseriesshort##1{\protect\foreignlanguage{#1}{van}}%
+ \def\btxinseriesshort##1{\protect\foreignlanguage{#1}{in}}%
+ \def\btxofserieslong##1{\protect\foreignlanguage{#1}{van}}%
+ \def\btxinserieslong##1{\protect\foreignlanguage{#1}{in}}%
+ \def\btxeditorshort##1{\protect\foreignlanguage{#1}{red##1{}}}%
+ \def\btxeditorlong##1{\protect\foreignlanguage{#1}{redakteur}}%
+ \def\btxeditorsshort##1{\protect\foreignlanguage{#1}{reds##1{}}}%
+ \def\btxeditorslong##1{\protect\foreignlanguage{#1}{redakteurs}}%
+ \def\btxvolumeshort##1{\protect\foreignlanguage{#1}{vol##1{}}}%
+ \def\btxvolumelong##1{\protect\foreignlanguage{#1}{volume}}%
+ \def\btxnumbershort##1{\protect\foreignlanguage{#1}{no##1{}}}%
+ \def\btxnumberlong##1{\protect\foreignlanguage{#1}{nommer}}%
+ \def\btxeditionshort##1{\protect\foreignlanguage{#1}{uitg##1{}}}%
+ \def\btxeditionlong##1{\protect\foreignlanguage{#1}{uitgawe}}%
+ \def\btxeditionnumshort##1##2{\btxnumeralshort{##1}~\btxeditionshort{##2}}%
+ \def\btxeditionnumlong##1##2{\btxnumerallong{##1}~\btxeditionlong{##2}}%
+ \def\btxchaptershort##1{\protect\foreignlanguage{#1}{hfst##1{}}}%
+ \def\btxchapterlong##1{\protect\foreignlanguage{#1}{hoofstuk}}%
+ \def\btxpageshort##1{\protect\foreignlanguage{#1}{p##1{}}}%
+ \def\btxpagelong##1{\protect\foreignlanguage{#1}{bladsy}}%
+ \def\btxpagesshort##1{\protect\foreignlanguage{#1}{pp##1{}}}%
+ \def\btxpageslong##1{\protect\foreignlanguage{#1}{bladsye}}%
+ \def\btxmastthesis##1{\protect\foreignlanguage{#1}{Meesters tesis}}%
+ \def\btxphdthesis##1{\protect\foreignlanguage{#1}{PhD verhandeling}}%
+ \def\btxtechrepshort##1{\protect\foreignlanguage{#1}{Tegn.\ versl##1{}}}%
+ \def\btxtechreplong##1{\protect\foreignlanguage{#1}{Tegniese verslag}}%
+ \def\btxmonjanlong##1{\protect\foreignlanguage{#1}{Januarie}}%
+ \def\btxmonfeblong##1{\protect\foreignlanguage{#1}{Februarie}}%
+ \def\btxmonmarlong##1{\protect\foreignlanguage{#1}{Maart}}%
+ \def\btxmonaprlong##1{\protect\foreignlanguage{#1}{April}}%
+ \def\btxmonmaylong##1{\protect\foreignlanguage{#1}{Mei}}%
+ \def\btxmonjunlong##1{\protect\foreignlanguage{#1}{Junie}}%
+ \def\btxmonjullong##1{\protect\foreignlanguage{#1}{Julie}}%
+ \def\btxmonauglong##1{\protect\foreignlanguage{#1}{Augustus}}%
+ \def\btxmonseplong##1{\protect\foreignlanguage{#1}{September}}%
+ \def\btxmonoctlong##1{\protect\foreignlanguage{#1}{Oktober}}%
+ \def\btxmonnovlong##1{\protect\foreignlanguage{#1}{November}}%
+ \def\btxmondeclong##1{\protect\foreignlanguage{#1}{Desember}}%
+ \def\btxmonjanshort##1{\protect\foreignlanguage{#1}{Jan##1{}}}%
+ \def\btxmonfebshort##1{\protect\foreignlanguage{#1}{Feb##1{}}}%
+ \def\btxmonmarshort##1{\protect\foreignlanguage{#1}{Mrt##1{}}}%
+ \def\btxmonaprshort##1{\protect\foreignlanguage{#1}{Apr##1{}}}%
+ \def\btxmonmayshort##1{\protect\foreignlanguage{#1}{Mei##1}}%
+ \def\btxmonjunshort##1{\protect\foreignlanguage{#1}{Jun##1}}%
+ \def\btxmonjulshort##1{\protect\foreignlanguage{#1}{Jul##1}}%
+ \def\btxmonaugshort##1{\protect\foreignlanguage{#1}{Aug##1{}}}%
+ \def\btxmonsepshort##1{\protect\foreignlanguage{#1}{Sep##1{}}}%
+ \def\btxmonoctshort##1{\protect\foreignlanguage{#1}{Okt##1{}}}%
+ \def\btxmonnovshort##1{\protect\foreignlanguage{#1}{Nov##1{}}}%
+ \def\btxmondecshort##1{\protect\foreignlanguage{#1}{Des##1{}}}%
+ \def\Btxinlong##1{\protect\foreignlanguage{#1}{In}}%
+ \def\Btxinshort##1{\protect\foreignlanguage{#1}{In}}%
+ \def\Btxeditorshort##1{\protect\foreignlanguage{#1}{Red##1{}}}%
+ \def\Btxeditorlong##1{\protect\foreignlanguage{#1}{Redakteur}}%
+ \def\Btxeditorsshort##1{\protect\foreignlanguage{#1}{Reds##1{}}}%
+ \def\Btxeditorslong##1{\protect\foreignlanguage{#1}{Redakteurs}}%
+ \def\Btxvolumeshort##1{\protect\foreignlanguage{#1}{Vol##1{}}}%
+ \def\Btxvolumelong##1{\protect\foreignlanguage{#1}{Volume}}%
+ \def\Btxnumbershort##1{\protect\foreignlanguage{#1}{No##1{}}}%
+ \def\Btxnumberlong##1{\protect\foreignlanguage{#1}{Nommer}}%
+ \def\Btxeditionshort##1{\protect\foreignlanguage{#1}{Uitg##1{}}}%
+ \def\Btxeditionlong##1{\protect\foreignlanguage{#1}{Uitgawe}}%
+ \def\Btxeditionnumshort##1##2{\btxnumeralshort{##1}~\Btxeditionshort{##2}}%
+ \def\Btxeditionnumlong##1##2{\btxnumerallong{##1}~\Btxeditionlong{##2}}%
+ \def\Btxchaptershort##1{\protect\foreignlanguage{#1}{Hfst##1{}}}%
+ \def\Btxchapterlong##1{\protect\foreignlanguage{#1}{Hoofstuk}}%
+ \def\Btxpageshort##1{\protect\foreignlanguage{#1}{P##1{}}}%
+ \def\Btxpagelong##1{\protect\foreignlanguage{#1}{Bladsy}}%
+ \def\Btxpagesshort##1{\protect\foreignlanguage{#1}{Pp##1{}}}%
+ \def\Btxpageslong##1{\protect\foreignlanguage{#1}{Bladsye}}%
+ \def\Btxtechrepshort##1{\protect\foreignlanguage{#1}{Tegn.\ Verslag}}%
+ \def\Btxtechreplong##1{\protect\foreignlanguage{#1}{Tegniese Verslag}}%
+% \def\btxurldatecomment##1{\protect\foreignlanguage{#1}{, ?? ##1}}%
+ \def\btxurldatecomment##1{\PackageError{babelbib}{Comment for
+ urldate in Afrikaans undefined. Please send the translation for
+ 'visited on' to harald.harders@tu-bs.de}{} [##1]}%
+ \def\btxfnamespaceshort{\,}%
+ \def\btxfnamespacelong{ }%
+ \def\btxnumeralshort##1{\btxnumeralfallback{#1}{##1}}%
+ \def\btxnumerallong##1{\btxnumeralfallback{#1}{##1}}%
+% \end{macrocode}
+% Define how to print month and year in numeric format, e.\,g. MM/YYYY.
+% \begin{macrocode}
+ \def\btxprintmonthyearnum##1##2{##1/##2}%
+ \def\btxkeywordlanguage##1{{\protect\selectlanguage{#1}##1}}%
+ \ifbbbblanguagenames
+ \def\btxlanguagenameafrikaans{\protect\foreignlanguage{#1}{afrikaans}}%
+ \def\btxlanguagenameamerican{\protect\foreignlanguage{#1}{engels}}%
+ \def\btxlanguagenameaustrian{\protect\foreignlanguage{#1}{duits}}%
+ \def\btxlanguagenamebrazil{\protect\foreignlanguage{#1}{portugees}}%
+ \def\btxlanguagenamebrazilian{\protect\foreignlanguage{#1}{portugees}}%
+ \def\btxlanguagenamebritish{\protect\foreignlanguage{#1}{engels}}%
+ \def\btxlanguagenamebulgarian{\protect\foreignlanguage{#1}{bulgaars}}%
+ \def\btxlanguagenamecanadian{\protect\foreignlanguage{#1}{engels}}%
+ \def\btxlanguagenamecanadien{\protect\foreignlanguage{#1}{frans}}%
+ \def\btxlanguagenamecatalan{\protect\foreignlanguage{#1}{katalaans}}%
+ \def\btxlanguagenamecroatian{\protect\foreignlanguage{#1}{kroaties}}%
+ \def\btxlanguagenameczech{\protect\foreignlanguage{#1}{tsjeggies}}%
+ \def\btxlanguagenamedanish{\protect\foreignlanguage{#1}{deens}}%
+ \def\btxlanguagenamedutch{\protect\foreignlanguage{#1}{nederlands}}%
+ \def\btxlanguagenameenglish{\protect\foreignlanguage{#1}{engels}}%
+ \def\btxlanguagenameesperanto{\protect\foreignlanguage{#1}{esperanto}}%
+ \def\btxlanguagenamefinnish{\protect\foreignlanguage{#1}{fins}}%
+ \def\btxlanguagenamefrancais{\protect\foreignlanguage{#1}{frans}}%
+ \def\btxlanguagenamefrench{\protect\foreignlanguage{#1}{frans}}%
+ \def\btxlanguagenamefrenchb{\protect\foreignlanguage{#1}{frans}}%
+ \def\btxlanguagenamegerman{\protect\foreignlanguage{#1}{duits}}%
+ \def\btxlanguagenamegermanb{\protect\foreignlanguage{#1}{duits}}%
+ \def\btxlanguagenamegreek{\protect\foreignlanguage{#1}{grieks}}%
+ \def\btxlanguagenamehebrew{\protect\foreignlanguage{#1}{hebreeus}}%
+ \def\btxlanguagenamenhungarian{\protect\foreignlanguage{#1}{hongaars}}%
+ \def\btxlanguagenamenicelandic{\protect\foreignlanguage{#1}{yslands}}%
+ \def\btxlanguagenamenirish{\protect\foreignlanguage{#1}{iers}}%
+ \def\btxlanguagenamenitalian{\protect\foreignlanguage{#1}{italiaans}}%
+ \def\btxlanguagenamenlatin{\protect\foreignlanguage{#1}{latyn}}%
+ \def\btxlanguagenamenaustrian{\protect\foreignlanguage{#1}{duits}}%
+ \def\btxlanguagenamengerman{\protect\foreignlanguage{#1}{duits}}%
+ \def\btxlanguagenamennorsk{\protect\foreignlanguage{#1}{noors}}%
+ \def\btxlanguagenamennynorsk{\protect\foreignlanguage{#1}{neo-noors}}%
+ \def\btxlanguagenamenpolish{\protect\foreignlanguage{#1}{pools}}%
+ \def\btxlanguagenamenportuges{\protect\foreignlanguage{#1}{portugees}}%
+ \def\btxlanguagenamenportuguese{\protect\foreignlanguage{#1}{portugees}}%
+ \def\btxlanguagenamenrussian{\protect\foreignlanguage{#1}{russies}}%
+ \def\btxlanguagenamenscottish{\protect\foreignlanguage{#1}{skots}}%
+ \def\btxlanguagenamenserbian{\protect\foreignlanguage{#1}{serwies}}%
+ \def\btxlanguagenamenspanish{\protect\foreignlanguage{#1}{spaans}}%
+ \def\btxlanguagenamenswedish{\protect\foreignlanguage{#1}{sweeds}}%
+ \def\btxlanguagenamenturkish{\protect\foreignlanguage{#1}{turks}}%
+ \def\btxlanguagenameUKenglish{\protect\foreignlanguage{#1}{engels}}%
+ \def\btxlanguagenameUSenglish{\protect\foreignlanguage{#1}{engels}}%
+ \fi
+}
+% \end{macrocode}
+% \end{macro}
+% Append the definitions to the language-calling commands.
+% \begin{macrocode}
+\AtBeginDocument{%
+ \ifbbbbfixlanguage
+ \else
+ \bbbbaddto{afrikaans}{bibsafrikaans}
+ \fi
+% \end{macrocode}
+% Switch on the change of case in titles for all Afrikaans dialects by
+% appending \cs{btxifchangecaseoff} to \cs{extras}\meta{language}.
+% \begin{macrocode}
+ \bbbbaddto{afrikaans}{btxifchangecaseoff}
+}
+%</afrikaans>
+% \end{macrocode}
+%
+% \subsubsection{Bahasa}
+% \begin{macrocode}
+%<*bahasa>
+% \end{macrocode}
+%
+% The language definition for Bahasa was provided by Yanti Yulianti.
+%
+% \begin{macro}{\bibsbahasa}
+% Bibliographic commands for Bahasa.
+% \begin{macrocode}
+\newcommand\bibsbahasa[1][bahasa]{%
+ \def\biblanguagename{#1}%
+ \def\btxetalshort##1{\protect\foreignlanguage{#1}{et~al##1{}}}%
+ \def\btxetallong##1{\protect\foreignlanguage{#1}{en~alii }}%
+ \def\btxandshort##1{\protect\foreignlanguage{#1}{dan}}%
+ \def\btxandlong##1{\protect\foreignlanguage{#1}{dan}}%
+ \def\btxandcomma##1{,}%
+ \def\btxinlong##1{\protect\foreignlanguage{#1}{dalam}}%
+ \def\btxinshort##1{\protect\foreignlanguage{#1}{dalam}}%
+ \def\btxofseriesshort##1{\protect\foreignlanguage{#1}{dari}}%
+ \def\btxinseriesshort##1{\protect\foreignlanguage{#1}{dalam}}%
+ \def\btxofserieslong##1{\protect\foreignlanguage{#1}{dari}}%
+ \def\btxinserieslong##1{\protect\foreignlanguage{#1}{dalam}}%
+ \def\btxeditorshort##1{\protect\foreignlanguage{#1}{red##1{}}}%
+ \def\btxeditorlong##1{\protect\foreignlanguage{#1}{redaktur}}%
+ \def\btxeditorsshort##1{\protect\foreignlanguage{#1}{red##1{}}}%
+ \def\btxeditorslong##1{\protect\foreignlanguage{#1}{redaktur}}%
+ \def\btxvolumeshort##1{\protect\foreignlanguage{#1}{vol##1{}}}%
+ \def\btxvolumelong##1{\protect\foreignlanguage{#1}{volume}}%
+ \def\btxnumbershort##1{\protect\foreignlanguage{#1}{nr##1{}}}%
+ \def\btxnumberlong##1{\protect\foreignlanguage{#1}{nomor}}%
+ \def\btxeditionshort##1{\protect\foreignlanguage{#1}{edisi}}%
+ \def\btxeditionlong##1{\protect\foreignlanguage{#1}{edisi}}%
+ \def\btxeditionnumshort##1##2{\btxnumeralshort{##1}~\btxeditionshort{##2}}%
+ \def\btxeditionnumlong##1##2{\btxnumerallong{##1}~\btxeditionlong{##2}}%
+ \def\btxchaptershort##1{\protect\foreignlanguage{#1}{bab##1{}}}%
+ \def\btxchapterlong##1{\protect\foreignlanguage{#1}{bab}}%
+ \def\btxpageshort##1{\protect\foreignlanguage{#1}{hal##1{}}}%
+ \def\btxpagelong##1{\protect\foreignlanguage{#1}{halaman}}%
+ \def\btxpagesshort##1{\protect\foreignlanguage{#1}{hal##1{}}}%
+ \def\btxpageslong##1{\protect\foreignlanguage{#1}{halaman}}%
+ \def\btxmastthesis##1{\protect\foreignlanguage{#1}{tesis Master}}%
+ \def\btxphdthesis##1{\protect\foreignlanguage{#1}{disertasi Dokotor}}%
+ \def\btxtechrepshort##1{\protect\foreignlanguage{#1}{Lap.\ Rapp##1{}}}%
+ \def\btxtechreplong##1{\protect\foreignlanguage{#1}{Laporan}}%
+ \def\btxmonjanlong##1{\protect\foreignlanguage{#1}{Januari}}%
+ \def\btxmonfeblong##1{\protect\foreignlanguage{#1}{Februari}}%
+ \def\btxmonmarlong##1{\protect\foreignlanguage{#1}{Maret}}%
+ \def\btxmonaprlong##1{\protect\foreignlanguage{#1}{April}}%
+ \def\btxmonmaylong##1{\protect\foreignlanguage{#1}{Mei}}%
+ \def\btxmonjunlong##1{\protect\foreignlanguage{#1}{Juni}}%
+ \def\btxmonjullong##1{\protect\foreignlanguage{#1}{Juli}}%
+ \def\btxmonauglong##1{\protect\foreignlanguage{#1}{Augustus}}%
+ \def\btxmonseplong##1{\protect\foreignlanguage{#1}{September}}%
+ \def\btxmonoctlong##1{\protect\foreignlanguage{#1}{Oktober}}%
+ \def\btxmonnovlong##1{\protect\foreignlanguage{#1}{November}}%
+ \def\btxmondeclong##1{\protect\foreignlanguage{#1}{Desember}}%
+ \def\btxmonjanshort##1{\protect\foreignlanguage{#1}{Jan##1{}}}%
+ \def\btxmonfebshort##1{\protect\foreignlanguage{#1}{Feb##1{}}}%
+ \def\btxmonmarshort##1{\protect\foreignlanguage{#1}{Mrt}}%
+ \def\btxmonaprshort##1{\protect\foreignlanguage{#1}{Apr##1{}}}%
+ \def\btxmonmayshort##1{\protect\foreignlanguage{#1}{Mei}}%
+ \def\btxmonjunshort##1{\protect\foreignlanguage{#1}{Jun##1{}}}%
+ \def\btxmonjulshort##1{\protect\foreignlanguage{#1}{Jul##1{}}}%
+ \def\btxmonaugshort##1{\protect\foreignlanguage{#1}{Aug##1{}}}%
+ \def\btxmonsepshort##1{\protect\foreignlanguage{#1}{Sep##1{}}}%
+ \def\btxmonoctshort##1{\protect\foreignlanguage{#1}{Okt##1{}}}%
+ \def\btxmonnovshort##1{\protect\foreignlanguage{#1}{Nov##1{}}}%
+ \def\btxmondecshort##1{\protect\foreignlanguage{#1}{Des##1{}}}%
+ \def\Btxinlong##1{\protect\foreignlanguage{#1}{Dalam}}%
+ \def\Btxinshort##1{\protect\foreignlanguage{#1}{Dalam}}%
+ \def\Btxeditorshort##1{\protect\foreignlanguage{#1}{Red##1{}}}%
+ \def\Btxeditorlong##1{\protect\foreignlanguage{#1}{Redaktur}}%
+ \def\Btxeditorsshort##1{\protect\foreignlanguage{#1}{Red##1{}}}%
+ \def\Btxeditorslong##1{\protect\foreignlanguage{#1}{Redaktur}}%
+ \def\Btxvolumeshort##1{\protect\foreignlanguage{#1}{Vol##1{}}}%
+ \def\Btxvolumelong##1{\protect\foreignlanguage{#1}{Volume}}%
+ \def\Btxnumbershort##1{\protect\foreignlanguage{#1}{Nr##1{}}}%
+ \def\Btxnumberlong##1{\protect\foreignlanguage{#1}{Nomor}}%
+ \def\Btxeditionshort##1{\protect\foreignlanguage{#1}{Ed}}%
+ \def\Btxeditionlong##1{\protect\foreignlanguage{#1}{Edisi}}%
+ \def\Btxeditionnumshort##1##2{\btxnumeralshort{##1}~\Btxeditionshort{##2}}%
+ \def\Btxeditionnumlong##1##2{\btxnumerallong{##1}~\Btxeditionlong{##2}}%
+ \def\Btxchaptershort##1{\protect\foreignlanguage{#1}{Bab##1{}}}%
+ \def\Btxchapterlong##1{\protect\foreignlanguage{#1}{Bab}}%
+ \def\Btxpageshort##1{\protect\foreignlanguage{#1}{Hal##1{}}}%
+ \def\Btxpagelong##1{\protect\foreignlanguage{#1}{Halaman}}%
+ \def\Btxpagesshort##1{\protect\foreignlanguage{#1}{Hal##1{}}}%
+ \def\Btxpageslong##1{\protect\foreignlanguage{#1}{Halaman}}%
+ \def\Btxtechrepshort##1{\protect\foreignlanguage{#1}{Lap.\ Rapp##1{}}}%
+ \def\Btxtechreplong##1{\protect\foreignlanguage{#1}{Laporan}}%
+ \def\btxurldatecomment##1{\protect\foreignlanguage{#1}{%
+ , diambil tanggal ##1}}%
+ \def\btxfnamespaceshort{\,}%
+ \def\btxfnamespacelong{ }%
+ \def\btxnumeralshort##1{\btxnumeralfallback{#1}{##1}}%
+ \def\btxnumerallong##1{\btxnumeralfallback{#1}{##1}}%
+% \end{macrocode}
+% Define how to print month and year in numeric format, e.\,g. MM/YYYY.
+% \begin{macrocode}
+ \def\btxprintmonthyearnum##1##2{##1/##2}%
+ \def\btxkeywordlanguage##1{{\protect\selectlanguage{#1}##1}}%
+ \ifbbbblanguagenames
+ \def\btxlanguagenameamerican{\protect\foreignlanguage{#1}{inggris}}%
+ \def\btxlanguagenameaustrian{\protect\foreignlanguage{#1}{jerman}}%
+ \def\btxlanguagenamebrazil{\protect\foreignlanguage{#1}{portugis}}%
+ \def\btxlanguagenamebrazilian{\protect\foreignlanguage{#1}{portugis}}%
+ \def\btxlanguagenamebritish{\protect\foreignlanguage{#1}{inggris}}%
+ \def\btxlanguagenamebulgarian{\protect\foreignlanguage{#1}{bulgaria}}%
+ \def\btxlanguagenamecanadian{\protect\foreignlanguage{#1}{inggris}}%
+ \def\btxlanguagenamecanadien{\protect\foreignlanguage{#1}{prancis}}%
+ \def\btxlanguagenamecatalan{\protect\foreignlanguage{#1}{catalanya}}%
+ \def\btxlanguagenamecroatian{\protect\foreignlanguage{#1}{kroasia}}%
+ \def\btxlanguagenameczech{\protect\foreignlanguage{#1}{ceko}}%
+ \def\btxlanguagenamedanish{\protect\foreignlanguage{#1}{denmark}}%
+ \def\btxlanguagenamedutch{\protect\foreignlanguage{#1}{belanda}}%
+ \def\btxlanguagenameenglish{\protect\foreignlanguage{#1}{inggris}}%
+ \def\btxlanguagenameesperanto{\protect\foreignlanguage{#1}{spanyol}}%
+ \def\btxlanguagenamefinnish{\protect\foreignlanguage{#1}{finlandia}}%
+ \def\btxlanguagenamefrancais{\protect\foreignlanguage{#1}{prancis}}%
+ \def\btxlanguagenamefrench{\protect\foreignlanguage{#1}{prancis}}%
+ \def\btxlanguagenamefrenchb{\protect\foreignlanguage{#1}{prancis}}%
+ \def\btxlanguagenamegerman{\protect\foreignlanguage{#1}{jerman}}%
+ \def\btxlanguagenamegermanb{\protect\foreignlanguage{#1}{jerman}}%
+ \def\btxlanguagenamegreek{\protect\foreignlanguage{#1}{yunani}}%
+ \def\btxlanguagenamehebrew{\protect\foreignlanguage{#1}{yahudi}}%
+ \def\btxlanguagenamehungarian{\protect\foreignlanguage{#1}{hungaria}}%
+ \def\btxlanguagenameicelandic{\protect\foreignlanguage{#1}{islandia}}%
+ \def\btxlanguagenameirish{\protect\foreignlanguage{#1}{irlandia}}%
+ \def\btxlanguagenameitalian{\protect\foreignlanguage{#1}{italia}}%
+ \def\btxlanguagenamelatin{\protect\foreignlanguage{#1}{latin}}%
+ \def\btxlanguagenamenaustrian{\protect\foreignlanguage{#1}{jerman}}%
+ % \def\btxlanguagenamengerman{\protect\foreignlanguage{#1}{jerman}}%
+ % \def\btxlanguagenamenorsk{\protect\foreignlanguage{#1}{norwegia}}%
+ % \def\btxlanguagenamenynorsk{\protect\foreignlanguage{#1}{norwegia baru}}%
+ % \def\btxlanguagenamepolish{\protect\foreignlanguage{#1}{polish}}%
+ \def\btxlanguagenameportuges{\protect\foreignlanguage{#1}{portugis}}%
+ \def\btxlanguagenameportuguese{\protect\foreignlanguage{#1}{portugis}}%
+ \def\btxlanguagenamerussian{\protect\foreignlanguage{#1}{russia}}%
+ \def\btxlanguagenamescottish{\protect\foreignlanguage{#1}{skotlandia}}%
+ \def\btxlanguagenameserbian{\protect\foreignlanguage{#1}{serbia}}%
+ \def\btxlanguagenamespanish{\protect\foreignlanguage{#1}{spanyol}}%
+ \def\btxlanguagenameswedish{\protect\foreignlanguage{#1}{swedia}}%
+ \def\btxlanguagenameturkish{\protect\foreignlanguage{#1}{turki}}%
+ \def\btxlanguagenameUKenglish{\protect\foreignlanguage{#1}{inggris}}%
+ \def\btxlanguagenameUSenglish{\protect\foreignlanguage{#1}{inggris}}%
+ \fi
+}
+% \end{macrocode}
+% \end{macro}
+% Append the definitions to the language-calling commands.
+% \begin{macrocode}
+\AtBeginDocument{%
+ \ifbbbbfixlanguage
+ \else
+ \bbbbaddto{bahasa}{bibsbahasa}
+ \fi
+ \bbbbaddto{bahasa}{btxifchangecaseoff}
+}
+%</bahasa>
+% \end{macrocode}
+%
+% \subsubsection{Catalan}
+% \changes{1.00}{2005/02/16}{Added Catalan language}%
+% \begin{macrocode}
+%<*catalan>
+% \end{macrocode}
+%
+% The language definition for Catalan was provided by
+% Robert Fuster, rfuster@imm.upv.es.
+%
+% \begin{macro}{\bibsafrikaans}
+% \begin{macrocode}
+\newcommand\bibscatalan[1][catalan]{%
+ \def\biblanguagename{#1}%
+ \def\btxetalshort##1{\protect\foreignlanguage{#1}{i~al##1{}}}%
+ \def\btxetallong##1{\protect\foreignlanguage{#1}{i~altres}}%
+ \def\btxandshort##1{\protect\foreignlanguage{#1}{i}}%
+ \def\btxandlong##1{\protect\foreignlanguage{#1}{i}}%
+ \def\btxandcomma##1{}%
+ \def\btxinlong##1{\protect\foreignlanguage{#1}{dins}}%
+ \def\btxinshort##1{\protect\foreignlanguage{#1}{dins}}%
+ \def\btxinseriesshort##1{\protect\foreignlanguage{#1}{dins}}%
+ \def\btxofserieslong##1{\protect\foreignlanguage{#1}{de}}%
+ \def\btxinserieslong##1{\protect\foreignlanguage{#1}{dins}}%
+ \def\btxeditorshort##1{\protect\foreignlanguage{#1}{ed##1{}}}%
+ \def\btxeditorlong##1{\protect\foreignlanguage{#1}{editor}}%
+ \def\btxeditorsshort##1{\protect\foreignlanguage{#1}{eds##1{}}}%
+ \def\btxeditorslong##1{\protect\foreignlanguage{#1}{editors}}%
+ \def\btxvolumeshort##1{\protect\foreignlanguage{#1}{vol##1{}}}%
+ \def\btxvolumelong##1{\protect\foreignlanguage{#1}{volum}}%
+ \def\btxnumbershort##1{\protect\foreignlanguage{#1}{n}}%
+ \def\btxnumberlong##1{\protect\foreignlanguage{#1}{n\'umero}}%
+ \def\btxeditionshort##1{\protect\foreignlanguage{#1}{ed##1{}}}%
+ \def\btxeditionlong##1{\protect\foreignlanguage{#1}{edici{\'o}}}%
+ \def\btxeditionnumshort##1##2{\btxnumeralshort{##1}~\btxeditionshort{##2}}%
+ \def\btxeditionnumlong##1##2{\btxnumerallong{##1}~\btxeditionlong{##2}}%
+ \def\btxchaptershort##1{\protect\foreignlanguage{#1}{cap##1{}}}%
+ \def\btxchapterlong##1{\protect\foreignlanguage{#1}{cap{\'\i}tol}}%
+ \def\btxpageshort##1{\protect\foreignlanguage{#1}{p##1{}}}%
+ \def\btxpagelong##1{\protect\foreignlanguage{#1}{p\`agina}}%
+ \def\btxpagesshort##1{\protect\foreignlanguage{#1}{ps##1{}}}%
+ \def\btxpageslong##1{\protect\foreignlanguage{#1}{p\`agines}}%
+ \def\btxmastthesis##1{\protect\foreignlanguage{#1}{Tesina de Llicenciatura}}%
+ \def\btxphdthesis##1{\protect\foreignlanguage{#1}{Tesi de Doctorat}}%
+ \def\btxtechrepshort##1{\protect\foreignlanguage{#1}{Rep. t\`ecnic}}%
+ \def\btxtechreplong##1{\protect\foreignlanguage{#1}{Report t\`ecnic}}%
+ \def\btxmonjanlong##1{\protect\foreignlanguage{#1}{gener}}%
+ \def\btxmonfeblong##1{\protect\foreignlanguage{#1}{febrer}}%
+ \def\btxmonmarlong##1{\protect\foreignlanguage{#1}{mar\c{c}}}%
+ \def\btxmonaprlong##1{\protect\foreignlanguage{#1}{abril}}%
+ \def\btxmonmaylong##1{\protect\foreignlanguage{#1}{maig}}%
+ \def\btxmonjunlong##1{\protect\foreignlanguage{#1}{juny}}%
+ \def\btxmonjullong##1{\protect\foreignlanguage{#1}{juliol}}%
+ \def\btxmonauglong##1{\protect\foreignlanguage{#1}{agost}}%
+ \def\btxmonseplong##1{\protect\foreignlanguage{#1}{setembre}}%
+ \def\btxmonoctlong##1{\protect\foreignlanguage{#1}{octubre}}%
+ \def\btxmonnovlong##1{\protect\foreignlanguage{#1}{novembre}}%
+ \def\btxmondeclong##1{\protect\foreignlanguage{#1}{desembre}}%
+ \def\btxmonjanshort##1{\protect\foreignlanguage{#1}{gen##1{}}}%
+ \def\btxmonfebshort##1{\protect\foreignlanguage{#1}{feb##1{}}}%
+ \def\btxmonmarshort##1{\protect\foreignlanguage{#1}{mar\c{c}}}%
+ \def\btxmonaprshort##1{\protect\foreignlanguage{#1}{abr##1{}}}%
+ \def\btxmonmayshort##1{\protect\foreignlanguage{#1}{maig}}%
+ \def\btxmonjunshort##1{\protect\foreignlanguage{#1}{juny}}%
+ \def\btxmonjulshort##1{\protect\foreignlanguage{#1}{jul}}%
+ \def\btxmonaugshort##1{\protect\foreignlanguage{#1}{ago##1{}}}%
+ \def\btxmonsepshort##1{\protect\foreignlanguage{#1}{sep##1{}}}%
+ \def\btxmonoctshort##1{\protect\foreignlanguage{#1}{oct##1{}}}%
+ \def\btxmonnovshort##1{\protect\foreignlanguage{#1}{nov##1{}}}%
+ \def\btxmondecshort##1{\protect\foreignlanguage{#1}{dec##1{}}}%
+ \def\Btxinlong##1{\protect\foreignlanguage{#1}{Dins}}%
+ \def\Btxinshort##1{\protect\foreignlanguage{#1}{Dins}}%
+ \def\Btxeditorshort##1{\protect\foreignlanguage{#1}{Ed##1{}}}%
+ \def\Btxeditorlong##1{\protect\foreignlanguage{#1}{Editor}}%
+ \def\Btxeditorsshort##1{\protect\foreignlanguage{#1}{Ed##1{}}}%
+ \def\Btxeditorslong##1{\protect\foreignlanguage{#1}{Editors}}%
+ \def\Btxvolumeshort##1{\protect\foreignlanguage{#1}{Vol##1{}}}%
+ \def\Btxvolumelong##1{\protect\foreignlanguage{#1}{Volum}}%
+ \def\Btxnumbershort##1{\protect\foreignlanguage{#1}{N\'um}}%
+ \def\Btxnumberlong##1{\protect\foreignlanguage{#1}{N\'umero}}%
+ \def\Btxeditionshort##1{\protect\foreignlanguage{#1}{Ed##1{}}}%
+ \def\Btxeditionlong##1{\protect\foreignlanguage{#1}{Edici\'o}}%
+ \def\Btxeditionnumshort##1##2{\btxnumeralshort{##1}~\Btxeditionshort{##2}}%
+ \def\Btxeditionnumlong##1##2{\btxnumerallong{##1}~\Btxeditionlong{##2}}%
+ \def\Btxchaptershort##1{\protect\foreignlanguage{#1}{Cap##1{}}}%
+ \def\Btxchapterlong##1{\protect\foreignlanguage{#1}{Cap\'\itol}}%
+ \def\Btxpageshort##1{\protect\foreignlanguage{#1}{P##1{}}}%
+ \def\Btxpagelong##1{\protect\foreignlanguage{#1}{P\`agina}}%
+ \def\Btxpagesshort##1{\protect\foreignlanguage{#1}{P##1{}}}%
+ \def\Btxpageslong##1{\protect\foreignlanguage{#1}{P\`agines}}%
+ \def\Btxtechrepshort##1{\protect\foreignlanguage{#1}{Rep. t\`ecnic}}%
+ \def\Btxtechreplong##1{\protect\foreignlanguage{#1}{Report t\`ecnic}}%
+ \def\btxurldatecomment##1{\protect\foreignlanguage{#1}{, visitada el ##1}}%
+ \def\btxfnamespaceshort{\,}%
+ \def\btxfnamespacelong{ }%
+ \def\btxnumeralshort##1{\btxnumeralfallback{#1}{##1}}%
+ \def\btxnumerallong##1{\btxnumeralfallback{#1}{##1}}%
+% \end{macrocode}
+% Define how to print month and year in numeric format, e.\,g. MM/YYYY.
+% \begin{macrocode}
+ \def\btxprintmonthyearnum##1##2{##1/##2}%
+ \def\btxkeywordlanguage##1{{\protect\selectlanguage{#1}##1}}%
+ \ifbbbblanguagenames
+ \def\btxlanguagenameamerican{\protect\foreignlanguage{#1}{angl\`es}}%
+ \def\btxlanguagenameaustrian{\protect\foreignlanguage{#1}{alem\`any}}%
+ \def\btxlanguagenamebrazil{\protect\foreignlanguage{#1}{portugu\`es}}%
+ \def\btxlanguagenamebrazilian{\protect\foreignlanguage{#1}{portugu\`es}}%
+ \def\btxlanguagenamebritish{\protect\foreignlanguage{#1}{angl\'es}}%
+ \def\btxlanguagenamebulgarian{\protect\foreignlanguage{#1}{b\'ulgar}}%
+ \def\btxlanguagenamecanadian{\protect\foreignlanguage{#1}{angl\`es}}%
+ \def\btxlanguagenamecanadien{\protect\foreignlanguage{#1}{franc\`es}}%
+ \def\btxlanguagenamecatalan{\protect\foreignlanguage{#1}{catal\`a}}%
+ \def\btxlanguagenamecroatian{\protect\foreignlanguage{#1}{croat}}%
+ \def\btxlanguagenameczech{\protect\foreignlanguage{#1}{txec}}%
+ \def\btxlanguagenamedanish{\protect\foreignlanguage{#1}{dan\`es}}%
+ \def\btxlanguagenamedutch{\protect\foreignlanguage{#1}{neerland\`es}}%
+ \def\btxlanguagenameenglish{\protect\foreignlanguage{#1}{angl\`es}}%
+ \def\btxlanguagenameesperanto{\protect\foreignlanguage{#1}{esperanto}}%
+ \def\btxlanguagenamefinnish{\protect\foreignlanguage{#1}{finland\`es}}%
+ \def\btxlanguagenamefrancais{\protect\foreignlanguage{#1}{franc\`es}}%
+ \def\btxlanguagenamefrench{\protect\foreignlanguage{#1}{franc\`es}}%
+ \def\btxlanguagenamefrenchb{\protect\foreignlanguage{#1}{franc\`es}}%
+ \def\btxlanguagenamegerman{\protect\foreignlanguage{#1}{alem\`any}}%
+ \def\btxlanguagenamegermanb{\protect\foreignlanguage{#1}{alem\`any}}%
+ \def\btxlanguagenamegreek{\protect\foreignlanguage{#1}{grec}}%
+ \def\btxlanguagenamehebrew{\protect\foreignlanguage{#1}{hebreu}}%
+ \def\btxlanguagenamehungarian{\protect\foreignlanguage{#1}{hongar\`es}}%
+ \def\btxlanguagenameicelandic{\protect\foreignlanguage{#1}{island\`es}}%
+ \def\btxlanguagenameirish{\protect\foreignlanguage{#1}{irland\`es}}%
+ \def\btxlanguagenameitalian{\protect\foreignlanguage{#1}{itali\`a}}%
+ \def\btxlanguagenamelatin{\protect\foreignlanguage{#1}{llat\'\i}}%
+ \def\btxlanguagenamenaustrian{\protect\foreignlanguage{#1}{alem\`any}}%
+ \def\btxlanguagenamengerman{\protect\foreignlanguage{#1}{alem\`any}}%
+ \def\btxlanguagenamenorsk{\protect\foreignlanguage{#1}{noruec}}%
+ \def\btxlanguagenamenynorsk{\protect\foreignlanguage{#1}{noruec}}%
+ \def\btxlanguagenamepolish{\protect\foreignlanguage{#1}{polon\`es}}%
+ \def\btxlanguagenameportuges{\protect\foreignlanguage{#1}{portugu\`es}}%
+ \def\btxlanguagenameportuguese{\protect\foreignlanguage{#1}{portugu\`es}}%
+ \def\btxlanguagenamerussian{\protect\foreignlanguage{#1}{rus}}%
+ \def\btxlanguagenamescottish{\protect\foreignlanguage{#1}{escoc\`es}}%
+ \def\btxlanguagenameserbian{\protect\foreignlanguage{#1}{serbi}}%
+ \def\btxlanguagenamespanish{\protect\foreignlanguage{#1}{espa\~nol}}%
+ \def\btxlanguagenameswedish{\protect\foreignlanguage{#1}{suec}}%
+ \def\btxlanguagenameturkish{\protect\foreignlanguage{#1}{turc}}%
+ \def\btxlanguagenameUKenglish{\protect\foreignlanguage{#1}{angl\`es}}%
+ \def\btxlanguagenameUSenglish{\protect\foreignlanguage{#1}{angl\`es}}%
+ \fi
+}
+% \end{macrocode}
+% \end{macro}
+% Append the definitions to the language-calling commands.
+% \begin{macrocode}
+\AtBeginDocument{%
+ \ifbbbbfixlanguage
+ \else
+ \bbbbaddto{catalan}{bibscatalan}
+ \fi
+% \end{macrocode}
+% Switch on the change of case in titles for all Afrikaans dialects by
+% appending \cs{btxifchangecaseoff} to \cs{extras}\meta{language}.
+% \begin{macrocode}
+ \bbbbaddto{catalan}{btxifchangecaseoff}
+}
+%</catalan>
+% \end{macrocode}
+%
+% \subsubsection{Croatian}
+% \changes{1.30}{2010/01/06}{Added Croatian language}%
+% \begin{macrocode}
+%<*croatian>
+% \end{macrocode}
+%
+% The language definition for Croatian was provided by
+% Vedran Mileti\'c (vmiletic@inf.uniri.hr),
+% Ivan Kokan (ivan.kokan@gmail.com), and
+% Ivica Naki\'c (nakic@math.hr).
+%
+% \begin{macro}{\bibscroatian}
+% \begin{macrocode}
+\newcommand\bibscroatian[1][croatian]{%
+ \def\biblanguagename{#1}%
+ \def\btxetalshort##1{\protect\foreignlanguage{#1}{i~ost##1{}}}%
+ \def\btxetallong##1{\protect\foreignlanguage{#1}{i~ostali}}%
+ \def\btxandshort##1{\protect\foreignlanguage{#1}{i}}%
+ \def\btxandlong##1{\protect\foreignlanguage{#1}{i}}%
+ \def\btxandcomma##1{}%
+ \def\btxinlong##1{\protect\foreignlanguage{#1}{u}}%
+ \def\btxinshort##1{\protect\foreignlanguage{#1}{u}}%
+ \def\btxofseriesshort##1{\protect\foreignlanguage{#1}{iz}}%
+ \def\btxinseriesshort##1{\protect\foreignlanguage{#1}{u}}%
+ \def\btxofserieslong##1{\protect\foreignlanguage{#1}{iz}}%
+ \def\btxinserieslong##1{\protect\foreignlanguage{#1}{u}}%
+ \def\btxeditorshort##1{\protect\foreignlanguage{#1}{ur##1{}}}%
+ \def\btxeditorlong##1{\protect\foreignlanguage{#1}{urednik}}%
+ \def\btxeditorsshort##1{\protect\foreignlanguage{#1}{ur##1{}}}%
+ \def\btxeditorslong##1{\protect\foreignlanguage{#1}{urednici}}%
+ \def\btxvolumeshort##1{\protect\foreignlanguage{#1}{sv##1{}}}%
+ \def\btxvolumelong##1{\protect\foreignlanguage{#1}{svezak}}%
+ \def\btxnumbershort##1{\protect\foreignlanguage{#1}{br##1{}}}%
+ \def\btxnumberlong##1{\protect\foreignlanguage{#1}{broj}}%
+ \def\btxeditionshort##1{\protect\foreignlanguage{#1}{izd##1{}}}%
+ \def\btxeditionlong##1{\protect\foreignlanguage{#1}{izdanje}}%
+ \def\btxeditionnumshort##1##2{\btxnumeralshort{##1}~\btxeditionshort{##2}}%
+ \def\btxeditionnumlong##1##2{\btxnumerallong{##1}~\btxeditionlong{##2}}%
+ \def\btxchaptershort##1{\protect\foreignlanguage{#1}{pogl##1{}}}%
+ \def\btxchapterlong##1{\protect\foreignlanguage{#1}{poglavlje}}%
+ \def\btxpageshort##1{\protect\foreignlanguage{#1}{str##1{}}}%
+ \def\btxpagelong##1{\protect\foreignlanguage{#1}{stranica}}%
+ \def\btxpagesshort##1{\protect\foreignlanguage{#1}{str##1{}}}%
+ \def\btxpageslong##1{\protect\foreignlanguage{#1}{stranice}}%
+ \def\btxmastthesis##1{\protect\foreignlanguage{#1}{Magistarski rad}}%
+ \def\btxphdthesis##1{\protect\foreignlanguage{#1}{Disertacija}}%
+ \def\btxtechrepshort##1{\protect\foreignlanguage{#1}{Tehn.\ izvj##1{}}}%
+ \def\btxtechreplong##1{\protect\foreignlanguage{#1}{%
+ Tehni\v{c}ki izvje\v{s}taj}}%
+ \def\btxmonjanlong##1{\protect\foreignlanguage{#1}{sije\v{c}anj}}%
+ \def\btxmonfeblong##1{\protect\foreignlanguage{#1}{velja\v{c}a}}%
+ \def\btxmonmarlong##1{\protect\foreignlanguage{#1}{o\v{z}ujak}}%
+ \def\btxmonaprlong##1{\protect\foreignlanguage{#1}{travanj}}%
+ \def\btxmonmaylong##1{\protect\foreignlanguage{#1}{svibanj}}%
+ \def\btxmonjunlong##1{\protect\foreignlanguage{#1}{lipanj}}%
+ \def\btxmonjullong##1{\protect\foreignlanguage{#1}{srpanj}}%
+ \def\btxmonauglong##1{\protect\foreignlanguage{#1}{kolovoz}}%
+ \def\btxmonseplong##1{\protect\foreignlanguage{#1}{rujan}}%
+ \def\btxmonoctlong##1{\protect\foreignlanguage{#1}{listopad}}%
+ \def\btxmonnovlong##1{\protect\foreignlanguage{#1}{studeni}}%
+ \def\btxmondeclong##1{\protect\foreignlanguage{#1}{prosinac}}%
+ \def\btxmonjanshort##1{\protect\foreignlanguage{#1}{sij##1{}}}%
+ \def\btxmonfebshort##1{\protect\foreignlanguage{#1}{velj##1{}}}%
+ \def\btxmonmarshort##1{\protect\foreignlanguage{#1}{o\v{z}u##1{}}}%
+ \def\btxmonaprshort##1{\protect\foreignlanguage{#1}{tra##1{}}}%
+ \def\btxmonmayshort##1{\protect\foreignlanguage{#1}{svi##1{}}}%
+ \def\btxmonjunshort##1{\protect\foreignlanguage{#1}{lip##1{}}}%
+ \def\btxmonjulshort##1{\protect\foreignlanguage{#1}{srp##1{}}}%
+ \def\btxmonaugshort##1{\protect\foreignlanguage{#1}{kol##1{}}}%
+ \def\btxmonsepshort##1{\protect\foreignlanguage{#1}{ruj##1{}}}%
+ \def\btxmonoctshort##1{\protect\foreignlanguage{#1}{lis##1{}}}%
+ \def\btxmonnovshort##1{\protect\foreignlanguage{#1}{stu##1{}}}%
+ \def\btxmondecshort##1{\protect\foreignlanguage{#1}{pro##1{}}}%
+ \def\Btxinlong##1{\protect\foreignlanguage{#1}{U}}%
+ \def\Btxinshort##1{\protect\foreignlanguage{#1}{U}}%
+ \def\Btxeditorshort##1{\protect\foreignlanguage{#1}{Ur##1{}}}%
+ \def\Btxeditorlong##1{\protect\foreignlanguage{#1}{Urednik}}%
+ \def\Btxeditorsshort##1{\protect\foreignlanguage{#1}{Ur##1{}}}%
+ \def\Btxeditorslong##1{\protect\foreignlanguage{#1}{Urednici}}%
+ \def\Btxvolumeshort##1{\protect\foreignlanguage{#1}{Sv##1{}}}%
+ \def\Btxvolumelong##1{\protect\foreignlanguage{#1}{Svezak}}%
+ \def\Btxnumbershort##1{\protect\foreignlanguage{#1}{Br##1{}}}%
+ \def\Btxnumberlong##1{\protect\foreignlanguage{#1}{Broj}}%
+ \def\Btxeditionshort##1{\protect\foreignlanguage{#1}{Izd##1{}}}%
+ \def\Btxeditionlong##1{\protect\foreignlanguage{#1}{Izdanje}}%
+ \def\Btxeditionnumshort##1##2{\btxnumeralshort{##1}~\Btxeditionshort{##2}}%
+ \def\Btxeditionnumlong##1##2{\btxnumerallong{##1}~\Btxeditionlong{##2}}%
+ \def\Btxchaptershort##1{\protect\foreignlanguage{#1}{Pogl##1{}}}%
+ \def\Btxchapterlong##1{\protect\foreignlanguage{#1}{Poglavlje}}%
+ \def\Btxpageshort##1{\protect\foreignlanguage{#1}{Str##1{}}}%
+ \def\Btxpagelong##1{\protect\foreignlanguage{#1}{Stranica}}%
+ \def\Btxpagesshort##1{\protect\foreignlanguage{#1}{Str##1{}}}%
+ \def\Btxpageslong##1{\protect\foreignlanguage{#1}{Stranice}}%
+ \def\Btxtechrepshort##1{\protect\foreignlanguage{#1}{Tehn.\ izvj##1{}}}%
+ \def\Btxtechreplong##1{\protect\foreignlanguage{#1}{%
+ Tehni\v{c}ki izvje\v{s}taj}}%
+ \def\btxurldatecomment##1{\protect\foreignlanguage{#1}{, posje\'{c}eno ##1}}%
+ \def\btxfnamespaceshort{\ }%
+ \def\btxfnamespacelong{ }%
+ \def\btxnumeralshort##1{\btxnumeraldot{#1}{##1}}%
+ \def\btxnumerallong##1{\btxnumeraldot{#1}{##1}}%
+% \end{macrocode}
+% Define how to print month and year in numeric format, e.\,g. MM/YYYY.
+% \begin{macrocode}
+ \def\btxprintmonthyearnum##1##2{##1/##2}%
+ \def\btxkeywordlanguage##1{{\protect\selectlanguage{#1}##1}}%
+ \ifbbbblanguagenames
+ \def\btxlanguagenameamerican{\protect\foreignlanguage{#1}{engleski}}%
+ \def\btxlanguagenameaustrian{\protect\foreignlanguage{#1}{njema\v{c}ki}}%
+ \def\btxlanguagenamebrazil{\protect\foreignlanguage{#1}{portugalski}}%
+ \def\btxlanguagenamebrazilian{\protect\foreignlanguage{#1}{portugalski}}%
+ \def\btxlanguagenamebritish{\protect\foreignlanguage{#1}{engleski}}%
+ \def\btxlanguagenamebulgarian{\protect\foreignlanguage{#1}{bugarski}}%
+ \def\btxlanguagenamecanadian{\protect\foreignlanguage{#1}{engleski}}%
+ \def\btxlanguagenamecanadien{\protect\foreignlanguage{#1}{francuski}}%
+ \def\btxlanguagenamecatalan{\protect\foreignlanguage{#1}{katalonski}}%
+ \def\btxlanguagenamecroatian{\protect\foreignlanguage{#1}{hrvatski}}%
+ \def\btxlanguagenameczech{\protect\foreignlanguage{#1}{\v{c}e\v{s}ki}}%
+ \def\btxlanguagenamedanish{\protect\foreignlanguage{#1}{danski}}%
+ \def\btxlanguagenamedutch{\protect\foreignlanguage{#1}{nizozemski}}%
+ \def\btxlanguagenameenglish{\protect\foreignlanguage{#1}{engleski}}%
+ \def\btxlanguagenameesperanto{\protect\foreignlanguage{#1}{esperanto}}%
+ \def\btxlanguagenamefinnish{\protect\foreignlanguage{#1}{finski}}%
+ \def\btxlanguagenamefrancais{\protect\foreignlanguage{#1}{francuski}}%
+ \def\btxlanguagenamefrench{\protect\foreignlanguage{#1}{francuski}}%
+ \def\btxlanguagenamefrenchb{\protect\foreignlanguage{#1}{francuski}}%
+ \def\btxlanguagenamegerman{\protect\foreignlanguage{#1}{njema\v{c}ki}}%
+ \def\btxlanguagenamegermanb{\protect\foreignlanguage{#1}{njema\v{c}ki}}%
+ \def\btxlanguagenamegreek{\protect\foreignlanguage{#1}{gr\v{c}ki}}%
+ \def\btxlanguagenamehebrew{\protect\foreignlanguage{#1}{hebrejski}}%
+ \def\btxlanguagenamehungarian{\protect\foreignlanguage{#1}{ma\dj{}arski}}%
+ \def\btxlanguagenameicelandic{\protect\foreignlanguage{#1}{islandski}}%
+ \def\btxlanguagenameirish{\protect\foreignlanguage{#1}{irski}}%
+ \def\btxlanguagenameitalian{\protect\foreignlanguage{#1}{talijanski}}%
+ \def\btxlanguagenamelatin{\protect\foreignlanguage{#1}{latinski}}%
+ \def\btxlanguagenamenaustrian{\protect\foreignlanguage{#1}{njema\v{c}ki}}%
+ \def\btxlanguagenamengerman{\protect\foreignlanguage{#1}{njema\v{c}ki}}%
+ \def\btxlanguagenamenorsk{\protect\foreignlanguage{#1}{norve\v{s}ki}}%
+ \def\btxlanguagenamenynorsk{\protect\foreignlanguage{#1}{novonorve\v{s}ki}}%
+ \def\btxlanguagenamepolish{\protect\foreignlanguage{#1}{poljski}}%
+ \def\btxlanguagenameportuges{\protect\foreignlanguage{#1}{portugalski}}%
+ \def\btxlanguagenameportuguese{\protect\foreignlanguage{#1}{portugalski}}%
+ \def\btxlanguagenamerussian{\protect\foreignlanguage{#1}{ruski}}%
+ \def\btxlanguagenamescottish{\protect\foreignlanguage{#1}{\v{s}kotski}}%
+ \def\btxlanguagenameserbian{\protect\foreignlanguage{#1}{srpski}}%
+ \def\btxlanguagenamespanish{\protect\foreignlanguage{#1}{\v{s}panjolski}}%
+ \def\btxlanguagenameswedish{\protect\foreignlanguage{#1}{\v{s}vedski}}%
+ \def\btxlanguagenameturkish{\protect\foreignlanguage{#1}{turski}}%
+ \def\btxlanguagenameUKenglish{\protect\foreignlanguage{#1}{engleski}}%
+ \def\btxlanguagenameUSenglish{\protect\foreignlanguage{#1}{engleski}}%
+ \fi
+}
+% \end{macrocode}
+% \end{macro}
+% Append the definitions to the language-calling commands.
+% \begin{macrocode}
+\AtBeginDocument{%
+ \ifbbbbfixlanguage
+ \else
+ \bbbbaddto{croatian}{bibscroatian}
+ \fi
+% \end{macrocode}
+% Switch on the change of case in titles for all Afrikaans dialects by
+% appending \cs{btxifchangecaseoff} to \cs{extras}\meta{language}.
+% \begin{macrocode}
+ \bbbbaddto{croatian}{btxifchangecaseoff}
+}
+%</croatian>
+% \end{macrocode}
+%
+% \section{\BibTeX\ style files}
+% \changes{0.40}{2003/09/26}{Moved the \texttt{bst} files into the
+% global \texttt{dtx} file}%
+%
+% \subsection{``Normal'' \BibTeX\ style files}
+%
+% \subsubsection{Generic code}
+%
+% Because most parts of the \BibTeX\ style files are equal for all
+% styles, they are generated from the same source code.
+% \begin{macrocode}
+%<*bststd>
+% \end{macrocode}
+% Declare the data fields that are handled by the \BibTeX\ styles.
+% \begin{macrocode}
+ENTRY
+ { address
+ annote
+ annotelanguage
+ author
+ booktitle
+ chapter
+ edition
+ editor
+ howpublished
+ institution
+ isbn
+ issn
+ journal
+ key
+ language
+ month
+ note
+ number
+ organization
+ pages
+ publisher
+ school
+ series
+ title
+ type
+ url
+ urldate
+ volume
+ year
+ }
+ {}
+%</bststd>
+%<bststd&!bstalpha> { label }
+%<bststd&bstalpha> { label extra.label sort.label }
+%<*bststd>
+
+% \end{macrocode}
+% Declare integer variables.
+% \begin{macrocode}
+INTEGERS
+ { output.state
+ before.all
+ mid.sentence
+ after.sentence
+ after.block
+ before.title
+ }
+
+% \end{macrocode}
+% Declare string variables.
+% \begin{macrocode}
+STRINGS
+ { s
+ t
+ language.state
+ change.temp
+ isbn.command
+ }
+
+% \end{macrocode}
+% Declare the constants that define at which position within a
+% citation we are when processing it.
+% \begin{macrocode}
+FUNCTION {init.state.consts}
+{ #0 'before.all :=
+ #1 'mid.sentence :=
+ #2 'after.sentence :=
+ #3 'after.block :=
+ #4 'before.title :=
+ "nostate" 'language.state :=
+}
+
+% \end{macrocode}
+% Logical function |not|.
+%
+% Syntax: \meta{int1} |not| $\longrightarrow$ \meta{int2}.
+%
+% Returns |1| if \meta{arg1} != |0|, |0| otherwise.
+% \begin{macrocode}
+FUNCTION {not}
+{ { #0 }
+ { #1 }
+ if$
+}
+
+% \end{macrocode}
+% Logical function |and|.
+% Syntax: \meta{arg1} \meta{arg1} |and|.
+% Returns |1| if \meta{arg1} == |true| and \meta{arg2} == |true|, |0|
+% otherwise.
+% \begin{macrocode}
+FUNCTION {and}
+{ 'skip$
+ { pop$ #0 }
+ if$
+}
+
+% \end{macrocode}
+% Logical function |or|.
+% Syntax: \meta{arg1} \meta{arg1} |or|.
+% Returns |1| if \meta{arg1} == |true| or \meta{arg2} == |true|, |0|
+% otherwise.
+% \begin{macrocode}
+FUNCTION {or}
+{ { pop$ #1 }
+ 'skip$
+ if$
+}
+
+% \end{macrocode}
+% Function |language.change.case|.
+% Syntax: \meta{string1} \meta{string2} |language.change.case|
+% $\longrightarrow$ \meta{string3}
+% This function has the same syntax as |change.case$| but writes
+% \meta{string1} twice into \meta{string3}, first with changed case,
+% second with original case.
+% \begin{macrocode}
+FUNCTION {language.change.case}
+{
+ 'change.temp :=
+ 't :=
+ "\btxifchangecase {"
+ t change.temp change.case$ *
+ "}{" *
+ t *
+ "}" *
+}
+
+% \end{macrocode}
+% Generates output for the string \meta{string1}.
+% Syntax: \meta{string1} |output.nonnull| $\longrightarrow$ \meta{string2}
+% \begin{macrocode}
+FUNCTION {output.nonnull}
+{ 's :=
+ output.state mid.sentence =
+ { ", " * write$ }
+ { output.state after.block =
+ { add.period$ write$
+ newline$
+ "\newblock " write$
+ }
+ { output.state before.all =
+ 'write$
+ {
+ output.state before.title =
+ { "\btxauthorcolon\ " * write$ }
+ { add.period$ " " * write$ }
+ if$
+ }
+ if$
+ }
+ if$
+ mid.sentence 'output.state :=
+ }
+ if$
+ s
+}
+
+% \end{macrocode}
+% Generates output if the given string \meta{string1} is not empty.
+% Syntax: \meta{string1} |output.nonnull| $\longrightarrow$ \meta{string2}
+% \begin{macrocode}
+FUNCTION {output}
+{ duplicate$ empty$
+ 'pop$
+ 'output.nonnull
+ if$
+}
+
+% \end{macrocode}
+%
+% \begin{macrocode}
+FUNCTION {output.check}
+{ 't :=
+ duplicate$ empty$
+ { pop$ "empty " t * " in " * cite$ * warning$ }
+ 'output.nonnull
+ if$
+}
+
+% \end{macrocode}
+% Outputs a bibliography item.
+% \changes{1.17}{2005/11/05}{Change the language in alpha-numerical
+% bib items}%
+% \begin{macrocode}
+FUNCTION {output.bibitem}
+{ newline$
+% \end{macrocode}
+% \changes{0.40}{2003/09/26}{Switch to a fall-back language when
+% \texttt{language} field is missing}%
+% If no language is given, fall back to the language that has been
+% active at \cs{begin\{document\}} or to the given fall-back
+% language.
+% For \BibTeX, this language gets the name \texttt{nolanguage}.
+% \begin{macrocode}
+ language empty$
+ {
+ language.state "nolanguage" =
+ 'skip$
+ {
+ "empty language in " cite$ * warning$
+ "\expandafter\btxselectlanguage\expandafter {"
+ "\btxfallbacklanguage}" *
+ write$ newline$
+ }
+ if$
+ "nolanguage" 'language.state :=
+ }
+ {
+ language.state language =
+ 'skip$
+ {
+ "\btxselectlanguage {" language * "}" *
+ write$ newline$
+ }
+ if$
+ language 'language.state :=
+ }
+ if$
+%</bststd>
+%<bststd&!bstalpha> "\bibitem {" write$
+%<bststd&bstalpha> "\bibitem [{" label * "}]{" * write$
+%<*bststd>
+ cite$ write$
+ "}" write$
+ newline$
+ ""
+ before.all 'output.state :=
+}
+
+% \end{macrocode}
+% Output an ISBN or ISSN.
+%
+% Syntax: \meta{string1} \meta{string2} |output.isbn|
+%
+% Prints the ISBN or ISSN given by \meta{string1} and uses the \TeX\
+% macro given by \meta{string2} to determine if the text is printed or
+% not.
+% \meta{string2} normally is \cs{ifbtxprintISSN} or
+% \cs{ifbtxprintISSN}.
+% \begin{macrocode}
+FUNCTION {output.isbn}
+{
+ 'isbn.command :=
+ duplicate$
+ empty$
+ 'pop$
+ {
+ 's :=
+ output.state mid.sentence =
+ {
+ isbn.command * " {, " * write$
+ s "}" *
+ }
+ { output.state after.block =
+ {
+ add.period$
+ write$
+ newline$
+ "\newblock " write$
+ isbn.command " {" * s * ".}" *
+ }
+ { output.state before.all =
+ {
+ write$
+ isbn.command " {" * write$
+ s "}" *
+ }
+ {
+ output.state before.title =
+ {
+ "\btxauthorcolon\ " * write$
+ isbn.command " {" * write$
+ s "}" *
+ }
+ {
+ add.period$ " " * write$
+ isbn.command " {" * write$
+ s ".}" *
+ }
+ if$
+ }
+ if$
+ }
+ if$
+ mid.sentence 'output.state :=
+ }
+ if$
+ }
+ if$
+}
+
+% \end{macrocode}
+% Completes an entry.
+% \begin{macrocode}
+FUNCTION {fin.entry}
+{ add.period$
+ write$
+ newline$
+}
+
+% \end{macrocode}
+%
+% \begin{macrocode}
+FUNCTION {new.block}
+{ output.state before.all =
+ 'skip$
+ { after.block 'output.state := }
+ if$
+}
+
+% \end{macrocode}
+%
+% \begin{macrocode}
+FUNCTION {new.sentence}
+{ output.state after.block =
+ 'skip$
+ { output.state before.all =
+ 'skip$
+ { after.sentence 'output.state := }
+ if$
+ }
+ if$
+}
+
+% \end{macrocode}
+%
+% \begin{macrocode}
+FUNCTION {after.authors}
+{ output.state before.all =
+ 'skip$
+ { before.title 'output.state := }
+ if$
+}
+
+% \end{macrocode}
+%
+% \begin{macrocode}
+FUNCTION {new.block.checka}
+{ empty$
+ 'skip$
+ 'new.block
+ if$
+}
+
+% \end{macrocode}
+%
+% \begin{macrocode}
+FUNCTION {new.block.checkb}
+{ empty$
+ swap$ empty$
+ and
+ 'skip$
+ 'new.block
+ if$
+}
+
+% \end{macrocode}
+%
+% \begin{macrocode}
+FUNCTION {new.block.checkc}
+{ empty$
+ swap$ empty$
+ and
+ 'skip$
+ 'after.authors
+ if$
+}
+
+% \end{macrocode}
+%
+% \begin{macrocode}
+FUNCTION {new.sentence.checka}
+{ empty$
+ 'skip$
+ 'new.sentence
+ if$
+}
+
+% \end{macrocode}
+%
+% \begin{macrocode}
+FUNCTION {new.sentence.checkb}
+{ empty$
+ swap$ empty$
+ and
+ 'skip$
+ 'new.sentence
+ if$
+}
+
+% \end{macrocode}
+%
+% \begin{macrocode}
+FUNCTION {field.or.null}
+{ duplicate$ empty$
+ { pop$ "" }
+ 'skip$
+ if$
+}
+
+% \end{macrocode}
+% \changes{1.00}{2005/02/16}{Remove \texttt{emphasize} and
+% \texttt{smallcaps} from \BibTeX\ styles}%
+% \begin{macrocode}
+FUNCTION {namefont}
+{ duplicate$ empty$
+ { pop$ "" }
+ { "\btxnamefont {" swap$ * "}" * }
+ if$
+}
+
+% \end{macrocode}
+% \changes{1.12}{2005/06/19}{Add extra formatting of lastnames to
+% \BibTeX\ styles}%
+% \begin{macrocode}
+FUNCTION {lastnamefont}
+{ duplicate$ empty$
+ { pop$ "" }
+ { "\btxlastnamefont {" swap$ * "}" * }
+ if$
+}
+% \end{macrocode}
+% Set font for titles:
+% \begin{macrocode}
+FUNCTION {titlefont}
+{ duplicate$ empty$
+ { pop$ "" }
+ { "\btxtitlefont {" swap$ * "}" * }
+ if$
+}
+% \end{macrocode}
+% Set font for titles of articles in journals:
+% \begin{macrocode}
+FUNCTION {jtitlefont}
+{ duplicate$ empty$
+ { pop$ "" }
+ { "\btxjtitlefont {" swap$ * "}" * }
+ if$
+}
+% \end{macrocode}
+% Set font for the journal name:
+% \begin{macrocode}
+FUNCTION {journalfont}
+{ duplicate$ empty$
+ { pop$ "" }
+ { "\btxjournalfont {" swap$ * "}" * }
+ if$
+}
+% \end{macrocode}
+% Set font for the publisher name:
+% \begin{macrocode}
+FUNCTION {publisherfont}
+{ duplicate$ empty$
+ { pop$ "" }
+ { "\btxpublisherfont {" swap$ * "}" * }
+ if$
+}
+% \end{macrocode}
+%
+% \begin{macrocode}
+FUNCTION {volumefont}
+{ duplicate$ empty$
+ { pop$ "" }
+ { "\btxvolumefont {" swap$ * "}" * }
+ if$
+}
+
+% \end{macrocode}
+%
+% \begin{macrocode}
+FUNCTION {etalfont}
+{ duplicate$ empty$
+ { pop$ "" }
+ { "\btxetalfont {" swap$ * "}" * }
+ if$
+}
+
+% \end{macrocode}
+%
+% \begin{macrocode}
+INTEGERS { nameptr namesleft numnames }
+
+% \end{macrocode}
+%
+% \begin{macrocode}
+FUNCTION {format.names}
+{ 's :=
+ #1 'nameptr :=
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ { nameptr #1 >
+ {
+%</bststd>
+%<*bststd&!bstshort&!namevarb>
+ s nameptr "{ff{\btxfnamespacelong } }{vv~}" format.name$
+ s nameptr "{ll}" format.name$ lastnamefont *
+ s nameptr "{, jj}" format.name$ *
+ 't :=
+%</bststd&!bstshort&!namevarb>
+%<*bststd&bstshort&!namevarb>
+ s nameptr
+ "{f{.\btxfnamespaceshort }.~}{vv~}" format.name$
+ s nameptr "{ll}" format.name$ lastnamefont *
+ s nameptr "{,~jj}" format.name$ *
+ 't :=
+%</bststd&bstshort&!namevarb>
+%<*bststd&!bstshort&namevarb>
+ s nameptr "{ll}" format.name$ lastnamefont
+ s nameptr "{,~jj}{, ff{\btxfnamespacelong }}{~vv}" format.name$ *
+ 't :=
+%</bststd&!bstshort&namevarb>
+%<*bststd&bstshort&namevarb>
+ s nameptr "{ll}" format.name$ lastnamefont
+ s nameptr "{,~jj}{,~f{.\btxfnamespaceshort }.}{~vv}" format.name$ *
+ 't :=
+%</bststd&bstshort&namevarb>
+%<*bststd&bstthree>
+ namesleft #2 >
+ { " " "\btxetalshort {.}" etalfont * *
+ #1 'namesleft := }
+ {
+%</bststd&bstthree>
+%<*bststd>
+ namesleft #1 >
+ { ", " * t namefont * }
+ { numnames #2 >
+ { "\btxandcomma {}" * }
+ 'skip$
+ if$
+ s nameptr "{ff~}{vv~}{ll}{, jj}" format.name$ "others" =
+ { " " "\btxetalshort {.}" etalfont * * }
+%</bststd>
+%<bststd&!bstshort> { " \btxandlong {}\ " * t namefont * }
+%<bststd&bstshort> { " \btxandshort {.}\ " * t namefont * }
+%<*bststd&bstthree>
+ if$
+ }
+%</bststd&bstthree>
+%<*bststd>
+ if$
+ }
+ if$
+ }
+ {
+%</bststd>
+%<*bststd&!bstshort&!namevara>
+ s nameptr "{ll}" format.name$ lastnamefont
+ s nameptr "{,~jj}{, ff{\btxfnamespacelong }}{~vv}"
+ format.name$ * namefont
+%</bststd&!bstshort&!namevara>
+%<*bststd&bstshort&!namevara>
+ s nameptr "{ll}" format.name$ lastnamefont
+ s nameptr "{,~jj}{,~f{.\btxfnamespaceshort }.}{~vv}"
+ format.name$ * namefont
+%</bststd&bstshort&!namevara>
+%<*bststd&!bstshort&namevara>
+ s nameptr "{ff{\btxfnamespacelong } }{vv~}" format.name$
+ s nameptr "{ll}" format.name$ lastnamefont *
+ s nameptr "{,~jj}" format.name$ * namefont
+%</bststd&!bstshort&namevara>
+%<*bststd&bstshort&namevara>
+ s nameptr "{f{.\btxfnamespaceshort }.~}{vv~}" format.name$
+ s nameptr "{ll}" format.name$ lastnamefont *
+ s nameptr "{,~jj}" format.name$ * namefont
+%</bststd&bstshort&namevara>
+%<*bststd>
+ }
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+}
+
+% \end{macrocode}
+%
+% \begin{macrocode}
+FUNCTION {format.authors}
+{ author empty$
+ { "" }
+ { author format.names }
+ if$
+}
+
+% \end{macrocode}
+%
+% \begin{macrocode}
+FUNCTION {format.editors}
+{ editor empty$
+ { "" }
+ { editor format.names
+ editor num.names$ #1 >
+%</bststd>
+%<*bststd&!bstshort>
+ { "\ (\btxeditorslong {})" * }
+ { "\ (\btxeditorlong {})" * }
+%</bststd&!bstshort>
+%<*bststd&bstshort>
+ { "\ (\btxeditorsshort {.})" * }
+ { "\ (\btxeditorshort {.})" * }
+%</bststd&bstshort>
+%<*bststd>
+ if$
+ }
+ if$
+}
+% \end{macrocode}
+% Format the title:
+% \begin{macrocode}
+FUNCTION {format.title}
+{ title empty$
+ { "" }
+ { title "t" language.change.case titlefont }
+ if$
+}
+% \end{macrocode}
+% Format the title of a journal article:
+% \begin{macrocode}
+FUNCTION {format.jtitle}
+{ title empty$
+ { "" }
+ { title "t" language.change.case jtitlefont }
+ if$
+}
+% \end{macrocode}
+%
+% \begin{macrocode}
+FUNCTION {n.dashify}
+{ 't :=
+ ""
+ { t empty$ not }
+ { t #1 #1 substring$ "-" =
+ { t #1 #2 substring$ "--" = not
+ { "--" *
+ t #2 global.max$ substring$ 't :=
+ }
+ { { t #1 #1 substring$ "-" = }
+ { "-" *
+ t #2 global.max$ substring$ 't :=
+ }
+ while$
+ }
+ if$
+ }
+ { t #1 #1 substring$ *
+ t #2 global.max$ substring$ 't :=
+ }
+ if$
+ }
+ while$
+}
+
+% \end{macrocode}
+%
+% \begin{macrocode}
+FUNCTION {format.date}
+{ year empty$
+ { month empty$
+ { "" }
+ { "there's a month but no year in " cite$ * warning$
+ month
+ }
+ if$
+ }
+ { month empty$
+ 'year
+%</bststd>
+%<*bststd&!bstshort>
+ { "\btxprintmonthyear{.}{"
+ month * "}{" * year * "}{long}" *
+ }
+%</bststd&!bstshort>
+%<*bststd&bstshort>
+ { "\btxprintmonthyear{.}{"
+ month * "}{" * year * "}{short}" *
+ }
+%</bststd&bstshort>
+%<*bststd>
+ if$
+ }
+ if$
+}
+
+% \end{macrocode}
+%
+% \begin{macrocode}
+FUNCTION {format.btitle}
+{ title titlefont
+}
+
+% \end{macrocode}
+%
+% \begin{macrocode}
+FUNCTION {tie.or.space.connect}
+{ duplicate$ text.length$ #3 <
+ { "~" }
+ { "\ " }
+ if$
+ swap$ * *
+}
+
+% \end{macrocode}
+%
+% \begin{macrocode}
+FUNCTION {volume.tie.or.space.connect}
+{ duplicate$ text.length$ #3 <
+ { "~" }
+ { "\ " }
+ if$
+ swap$ volumefont * *
+}
+
+% \end{macrocode}
+%
+% \begin{macrocode}
+FUNCTION {either.or.check}
+{ empty$
+ 'pop$
+ { "can't use both " swap$ * " fields in " * cite$ * warning$ }
+ if$
+}
+
+% \end{macrocode}
+%
+% \begin{macrocode}
+FUNCTION {format.bvolume}
+{ volume empty$
+ { "" }
+ { output.state after.block =
+%</bststd>
+%<bststd&!bstshort> { "\Btxvolumelong {}" }
+%<bststd&!bstshort> { "\btxvolumelong {}" }
+%<bststd&bstshort> { "\Btxvolumeshort {.}" }
+%<bststd&bstshort> { "\btxvolumeshort {.}" }
+%<*bststd>
+ if$
+ volume volume.tie.or.space.connect
+ series empty$
+ 'skip$
+%</bststd>
+%<bststd&!bstshort> { " \btxofserieslong {}\ " * series titlefont * }
+%<bststd&bstshort> { " \btxofseriesshort {.}\ " * series titlefont * }
+%<*bststd>
+ if$
+ "volume and number" number either.or.check
+ }
+ if$
+}
+
+% \end{macrocode}
+%
+% \begin{macrocode}
+FUNCTION {format.number.series}
+{ volume empty$
+ { number empty$
+ { series field.or.null }
+ { output.state mid.sentence =
+%</bststd>
+%<bststd&!bstshort> { "\btxnumberlong {}" }
+%<bststd&!bstshort> { "\Btxnumberlong {}" }
+%<bststd&bstshort> { "\btxnumbershort {.}" }
+%<bststd&bstshort> { "\Btxnumbershort {.}" }
+%<*bststd>
+ if$
+ number tie.or.space.connect
+ series empty$
+ { "there's a number but no series in " cite$ * warning$ }
+%</bststd>
+%<bststd&!bstshort> { " \btxinserieslong {}\ " * series titlefont * }
+%<bststd&bstshort> { " \btxinseriesshort {.}\ " * series titlefont * }
+%<*bststd>
+ if$
+ }
+ if$
+ }
+ { "" }
+ if$
+}
+
+% \end{macrocode}
+%
+% \begin{macrocode}
+FUNCTION {format.edition}
+{ edition empty$
+ { "" }
+ {
+%</bststd>
+% \end{macrocode}
+% Handle the edition first to get the beginning of the sentence.
+% Afterwards, the text before the edition is put to the stack and
+% exchanged with the edition number itself.
+% \begin{macrocode}
+%<*bststd&!bstshort>
+ output.state mid.sentence =
+ { edition "l" change.case$ }
+ { edition "t" change.case$ }
+ if$
+ "\btxeditionnumlong {" swap$ *
+ "}{}" *
+%</bststd&!bstshort>
+%<*bststd&bstshort>
+ output.state mid.sentence =
+ { edition "l" change.case$ }
+ { edition "t" change.case$ }
+ if$
+ "\btxeditionnumshort {" swap$ *
+ "}{.}" *
+%</bststd&bstshort>
+%<*bststd>
+ }
+ if$
+}
+
+FUNCTION {format.isbn}
+{ isbn empty$
+ { "" }
+ { "\mbox{\btxISBN~\btxISBNfont {" isbn * "}}" * }
+ if$
+}
+
+% \end{macrocode}
+%
+% \begin{macrocode}
+FUNCTION {format.issn}
+{ issn empty$
+ { "" }
+ { "\mbox{\btxISSN~\btxISSNfont {" issn * "}}" * }
+ if$
+}
+% \end{macrocode}
+%
+% \begin{macrocode}
+FUNCTION {format.url}
+{ url empty$
+ { "" }
+ {
+ urldate empty$
+ { "{\latintext \btxurlfont{" url * "}}" * }
+ {
+ "{\latintext \btxurlfont{" url * "}}\empty " *
+ "\btxurldatecomment {\btxkeywordlanguage {\btxurldatefont{" *
+ urldate * "}}}" *
+ }
+ if$
+ }
+ if$
+}
+% \end{macrocode}
+% Format annotations:
+% \begin{macrocode}
+FUNCTION {write.annote}
+{ annote empty$
+ 'skip$
+ {
+ annotelanguage empty$
+ { "\btxkeywordlanguage {" }
+ { "{\selectlanguage {" annotelanguage * "}" * }
+ if$
+ "\btxannotation {" * annote * "}}" *
+ write$ newline$
+ }
+ if$
+}
+% \end{macrocode}
+%
+% \begin{macrocode}
+INTEGERS { multiresult }
+
+% \end{macrocode}
+%
+% \begin{macrocode}
+FUNCTION {multi.page.check}
+{ 't :=
+ #0 'multiresult :=
+ { multiresult not
+ t empty$ not
+ and
+ }
+ { t #1 #1 substring$
+ duplicate$ "-" =
+ swap$ duplicate$ "," =
+ swap$ "+" =
+ or or
+ { #1 'multiresult := }
+ { t #2 global.max$ substring$ 't := }
+ if$
+ }
+ while$
+ multiresult
+}
+
+% \end{macrocode}
+%
+% \begin{macrocode}
+FUNCTION {format.pages}
+{ pages empty$
+ { "" }
+ { pages multi.page.check
+%</bststd>
+%<*bststd&!bstshort>
+ { "\btxpageslong {}" pages n.dashify tie.or.space.connect }
+ { "\btxpagelong {}" pages tie.or.space.connect }
+%</bststd&!bstshort>
+%<*bststd&bstshort>
+ { "\btxpagesshort {.}" pages n.dashify tie.or.space.connect }
+ { "\btxpageshort {.}" pages tie.or.space.connect }
+%</bststd&bstshort>
+%<*bststd>
+ if$
+ }
+ if$
+}
+
+% \end{macrocode}
+%
+% \begin{macrocode}
+FUNCTION {format.vol.num.pages}
+{ volume field.or.null
+ number empty$
+ 'skip$
+ { "(" number * ")" * *
+ volume empty$
+ { "there's a number but no volume in " cite$ * warning$ }
+ 'skip$
+ if$
+ }
+ if$
+ pages empty$
+ 'skip$
+ { duplicate$ empty$
+ { pop$ format.pages }
+ { ":" * pages n.dashify * }
+ if$
+ }
+ if$
+}
+
+% \end{macrocode}
+%
+% \begin{macrocode}
+FUNCTION {format.chapter.pages}
+{ chapter empty$
+ 'format.pages
+ { type empty$
+%</bststd>
+%<bststd&!bstshort> { "\btxchapterlong {}" }
+%<bststd&bstshort> { "\btxchaptershort {.}" }
+%<*bststd>
+ { type "l" language.change.case }
+ if$
+ chapter tie.or.space.connect
+ pages empty$
+ 'skip$
+ { ", " * format.pages * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.in.ed.booktitle}
+{ booktitle empty$
+ { "" }
+ { editor empty$
+%</bststd>
+%<*bststd&!bstshort>
+ { "\Btxinlong {}\ " booktitle titlefont * }
+ { "\Btxinlong {}\ " format.editors * ": " * booktitle titlefont * }
+%</bststd&!bstshort>
+%<*bststd&bstshort>
+ { "\Btxinshort {.}\ " booktitle titlefont * }
+ { "\Btxinshort {.}\ " format.editors * ": " * booktitle titlefont * }
+%</bststd&bstshort>
+%<*bststd>
+ if$
+ }
+ if$
+}
+
+% \end{macrocode}
+%
+% \begin{macrocode}
+FUNCTION {empty.misc.check}
+{ author empty$ title empty$ howpublished empty$
+ month empty$ year empty$ note empty$
+ and and and and and
+ key empty$ not and
+ { "all relevant fields are empty in " cite$ * warning$ }
+ 'skip$
+ if$
+}
+
+% \end{macrocode}
+%
+% \begin{macrocode}
+FUNCTION {format.thesis.type}
+{ type empty$
+ 'skip$
+ { pop$
+ type "t" language.change.case
+ }
+ if$
+}
+
+% \end{macrocode}
+%
+% \begin{macrocode}
+FUNCTION {format.tr.number}
+{
+ number empty$
+ {
+ type empty$
+%</bststd>
+% \end{macrocode}
+% \changes{0.40}{2003/09/26}{For \texttt{babalpha.bst}, use
+% \cs{btxtechreplong}}%
+% \begin{macrocode}
+%<bststd&!bstshort> { "\btxtechreplong {}" }
+%<bststd&bstshort> { "\btxtechrepshort {.}" }
+%<*bststd>
+ { type "t" language.change.case }
+ if$
+ }
+ {
+ type empty$
+%</bststd>
+% \end{macrocode}
+% \changes{0.40}{2003/09/26}{For \texttt{babalpha.bst}, use
+% \cs{Btxtechreplong}}%
+% \begin{macrocode}
+%<bststd&!bstshort> { "\Btxtechreplong {}" }
+%<bststd&bstshort> { "\Btxtechrepshort {.}" }
+%<*bststd>
+ { type "t" language.change.case }
+ if$
+ number tie.or.space.connect
+ }
+ if$
+}
+
+% \end{macrocode}
+%
+% \begin{macrocode}
+FUNCTION {format.article.crossref}
+{ key empty$
+%</bststd>
+%<*bststd&!bstshort>
+ { journal empty$
+ { "need key or journal for " cite$ * " to crossref " * crossref *
+ warning$
+ ""
+ }
+ { "\Btxinlong {}\ " journal titlefont * }
+ if$
+ }
+ { "\Btxinlong {}\ " key titlefont * }
+%</bststd&!bstshort>
+%<*bststd&bstshort>
+ { journal empty$
+ { "need key or journal for " cite$ * " to crossref " * crossref *
+ warning$
+ ""
+ }
+ { "\Btxinshort {.}\ " journal titlefont * }
+ if$
+ }
+ { "\Btxinshort {.}\ " key titlefont * }
+%</bststd&bstshort>
+%<*bststd>
+ if$
+ " \cite{" * crossref * "}" *
+}
+
+% \end{macrocode}
+%
+% \begin{macrocode}
+FUNCTION {format.crossref.editor}
+{
+%</bststd>
+%<*bststd&!bstshort>
+ editor #1 "{ll}{,~jj}{, ff}{~vv}" format.name$ namefont
+%</bststd&!bstshort>
+%<*bststd&bstshort>
+ editor #1 "{ll}{,~jj}{,~f.}{~vv}" format.name$ namefont
+%</bststd&bstshort>
+%<*bststd>
+ editor num.names$ duplicate$
+ #2 >
+ { pop$ " " "\btxetalshort {.}" etalfont * * }
+ { #2 <
+ 'skip$
+ { editor #2 "{ff }{vv }{ll}{ jj}" format.name$ "others" =
+ { " " "\btxetalshort {.}" etalfont * * }
+%</bststd>
+%<*bststd&!bstshort>
+ { " \btxandlong {}\ " * editor #2 "{ff}{~vv}{~ll}{, jj}"
+%</bststd&!bstshort>
+%<*bststd&bstshort>
+ { " \btxandshort {.}\ " * editor #2 "{vv~}{ll}"
+%</bststd&bstshort>
+%<*bststd>
+ format.name$ namefont * }
+ if$
+ }
+ if$
+ }
+ if$
+}
+
+% \end{macrocode}
+%
+% \begin{macrocode}
+FUNCTION {format.book.crossref}
+{ volume empty$
+ { "empty volume in " cite$ * "'s crossref of " * crossref * warning$
+%</bststd>
+%<bststd&!bstshort> "\Btxinlong {}\ "
+%<bststd&bstshort> "\Btxinshort {.}\ "
+%<*bststd>
+ }
+%</bststd>
+%<*bststd&!bstshort>
+ { "\Btxvolumelong {}" volume volume.tie.or.space.connect
+ " \btxofserieslong {}\ " *
+%</bststd&!bstshort>
+%<*bststd&bstshort>
+ { "\Btxvolumeshort {.}" volume volume.tie.or.space.connect
+ " \btxofseriesshort {.}\ " *
+%</bststd&bstshort>
+%<*bststd>
+ }
+ if$
+ editor empty$
+ editor field.or.null author field.or.null =
+ or
+ { key empty$
+ { series empty$
+ { "need editor, key, or series for " cite$ * " to crossref " *
+ crossref * warning$
+ "" *
+ }
+ { series titlefont * }
+ if$
+ }
+ { key titlefont * }
+ if$
+ }
+ { format.crossref.editor * }
+ if$
+ " \cite{" * crossref * "}" *
+}
+
+% \end{macrocode}
+%
+% \begin{macrocode}
+FUNCTION {format.incoll.inproc.crossref}
+{ editor empty$
+ editor field.or.null author field.or.null =
+ or
+ { key empty$
+ { booktitle empty$
+ { "need editor, key, or booktitle for " cite$ * " to crossref " *
+ crossref * warning$
+ ""
+ }
+%</bststd>
+%<bststd&!bstshort> { "\Btxinlong {}\ " booktitle titlefont * }
+%<bststd&bstshort> { "\Btxinshort {.}\ " booktitle titlefont * }
+%<*bststd>
+ if$
+ }
+%</bststd>
+%<bststd&!bstshort> { "\Btxinlong {}\ " key titlefont * }
+%<bststd&bstshort> { "\Btxinshort {.}\ " key titlefont * }
+%<*bststd>
+ if$
+ }
+%</bststd>
+%<bststd&!bstshort> { "\Btxinlong {}\ " format.crossref.editor * }
+%<bststd&bstshort> { "\Btxinshort {.}\ " format.crossref.editor * }
+%<*bststd>
+ if$
+ " \cite{" * crossref * "}" *
+}
+
+% \end{macrocode}
+%
+% \begin{macrocode}
+FUNCTION {article}
+{ output.bibitem
+ format.authors "author" output.check
+ after.authors
+ format.jtitle "title" output.check
+ new.block
+ crossref missing$
+ { journal
+ title missing$
+ { titlefont }
+ { journalfont }
+ if$
+ "journal" output.check
+ format.vol.num.pages output
+ format.date "year" output.check
+ }
+ { format.article.crossref output.nonnull
+ format.pages output
+ }
+ if$
+ format.issn "\ifbtxprintISSN" output.isbn
+ new.block
+ format.url output
+ note output
+ fin.entry
+ write.annote
+}
+
+% \end{macrocode}
+%
+% \begin{macrocode}
+FUNCTION {book}
+{ output.bibitem
+ author empty$
+ { format.editors "author and editor" output.check }
+ { format.authors output.nonnull
+ crossref missing$
+ { "author and editor" editor either.or.check }
+ 'skip$
+ if$
+ }
+ if$
+ after.authors
+ format.btitle "title" output.check
+ crossref missing$
+ { format.bvolume output
+ new.block
+ format.number.series output
+ new.sentence
+ publisher "publisher" output.check publisherfont
+ address output
+ }
+ { new.block
+ format.book.crossref output.nonnull
+ }
+ if$
+ format.edition output
+ format.date "year" output.check
+ format.isbn "\ifbtxprintISBN" output.isbn
+ new.block
+ format.url output
+ note output
+ fin.entry
+ write.annote
+}
+
+% \end{macrocode}
+%
+% \begin{macrocode}
+FUNCTION {booklet}
+{ output.bibitem
+ format.authors output
+ after.authors
+ format.title "title" output.check
+ howpublished address new.block.checkb
+ howpublished output
+ address output
+ format.date output
+ new.block
+ format.url output
+ note output
+ fin.entry
+ write.annote
+}
+
+% \end{macrocode}
+%
+% \begin{macrocode}
+FUNCTION {inbook}
+{ output.bibitem
+ author empty$
+ { format.editors "author and editor" output.check }
+ { format.authors output.nonnull
+ crossref missing$
+ { "author and editor" editor either.or.check }
+ 'skip$
+ if$
+ }
+ if$
+ after.authors
+ format.btitle "title" output.check
+ crossref missing$
+ { format.bvolume output
+ format.chapter.pages "chapter and pages" output.check
+ new.block
+ format.number.series output
+ new.sentence
+ publisher "publisher" output.check publisherfont
+ address output
+ }
+ { format.chapter.pages "chapter and pages" output.check
+ new.block
+ format.book.crossref output.nonnull
+ }
+ if$
+ format.edition output
+ format.date "year" output.check
+ format.isbn "\ifbtxprintISBN" output.isbn
+ new.block
+ format.url output
+ note output
+ fin.entry
+ write.annote
+}
+
+% \end{macrocode}
+%
+% \begin{macrocode}
+FUNCTION {incollection}
+{ output.bibitem
+ format.authors "author" output.check
+ after.authors
+ format.title "title" output.check
+ new.block
+ crossref missing$
+ { format.in.ed.booktitle "booktitle" output.check
+ format.bvolume output
+ format.number.series output
+ format.chapter.pages output
+ new.sentence
+ publisher "publisher" output.check publisherfont
+ address output
+ format.edition output
+ format.date "year" output.check
+ }
+ { format.incoll.inproc.crossref output.nonnull
+ format.chapter.pages output
+ }
+ if$
+ format.isbn "\ifbtxprintISBN" output.isbn
+ new.block
+ format.url output
+ note output
+ fin.entry
+ write.annote
+}
+
+% \end{macrocode}
+%
+% \begin{macrocode}
+FUNCTION {inproceedings}
+{ output.bibitem
+ format.authors "author" output.check
+ after.authors
+ format.title "title" output.check
+ new.block
+ crossref missing$
+ { format.in.ed.booktitle "booktitle" output.check
+ format.bvolume output
+ format.number.series output
+ format.pages output
+ address empty$
+ { organization publisher new.sentence.checkb
+ organization output
+ publisher publisherfont output
+ format.date "year" output.check
+ }
+ { address output.nonnull
+ format.date "year" output.check
+ new.sentence
+ organization output
+ publisher publisherfont output
+ }
+ if$
+ }
+ { format.incoll.inproc.crossref output.nonnull
+ format.pages output
+ }
+ if$
+ format.isbn "\ifbtxprintISBN" output.isbn
+ new.block
+ format.url output
+ note output
+ fin.entry
+ write.annote
+}
+
+% \end{macrocode}
+%
+% \begin{macrocode}
+FUNCTION {conference} { inproceedings }
+
+% \end{macrocode}
+%
+% \begin{macrocode}
+FUNCTION {manual}
+{ output.bibitem
+ author empty$
+ { organization empty$
+ 'skip$
+ { organization output.nonnull
+ address output
+ }
+ if$
+ }
+ { format.authors output.nonnull }
+ if$
+ after.authors
+ format.btitle "title" output.check
+ author empty$
+ { organization empty$
+ { address new.block.checka
+ address output
+ }
+ 'skip$
+ if$
+ }
+ { organization address new.block.checkb
+ organization output
+ address output
+ }
+ if$
+ format.edition output
+ format.date output
+ format.isbn "\ifbtxprintISBN" output.isbn
+ new.block
+ format.url output
+ note output
+ fin.entry
+ write.annote
+}
+
+% \end{macrocode}
+%
+% \begin{macrocode}
+FUNCTION {mastersthesis}
+{ output.bibitem
+ format.authors "author" output.check
+ after.authors
+ format.title "title" output.check
+ new.block
+ "\btxmastthesis {}" format.thesis.type output.nonnull
+ school "school" output.check
+ address output
+ format.date "year" output.check
+ new.block
+ format.url output
+ note output
+ fin.entry
+ write.annote
+}
+
+% \end{macrocode}
+%
+% \begin{macrocode}
+FUNCTION {misc}
+{ output.bibitem
+ format.authors output
+ title howpublished new.block.checkc
+ format.title output
+ howpublished new.block.checka
+ howpublished output
+ format.date output
+ format.isbn "\ifbtxprintISBN" output.isbn
+ new.block
+ format.issn "\ifbtxprintISSN" output.isbn
+ new.block
+ format.url output
+ note output
+ fin.entry
+ write.annote
+ empty.misc.check
+}
+
+% \end{macrocode}
+%
+% \begin{macrocode}
+FUNCTION {phdthesis}
+{ output.bibitem
+ format.authors "author" output.check
+ after.authors
+ format.btitle "title" output.check
+ new.block
+ "\btxphdthesis {}" format.thesis.type output.nonnull
+ school "school" output.check
+ address output
+ format.date "year" output.check
+ format.isbn "\ifbtxprintISBN" output.isbn
+ new.block
+ format.url output
+ note output
+ fin.entry
+ write.annote
+}
+
+% \end{macrocode}
+%
+% \begin{macrocode}
+FUNCTION {proceedings}
+{ output.bibitem
+ editor empty$
+ { organization output }
+ { format.editors output.nonnull }
+ if$
+ after.authors
+ format.btitle "title" output.check
+ format.bvolume output
+ format.number.series output
+ address empty$
+ { editor empty$
+ { publisher new.sentence.checka }
+ { organization publisher new.sentence.checkb
+ organization output
+ }
+ if$
+ publisher publisherfont output
+ format.date "year" output.check
+ }
+ { address output.nonnull
+ format.date "year" output.check
+ new.sentence
+ editor empty$
+ 'skip$
+ { organization output }
+ if$
+ publisher publisherfont output
+ }
+ if$
+ format.isbn "\ifbtxprintISBN" output.isbn
+ new.block
+ format.url output
+ note output
+ fin.entry
+ write.annote
+}
+
+% \end{macrocode}
+%
+% \begin{macrocode}
+FUNCTION {techreport}
+{ output.bibitem
+ format.authors "author" output.check
+ after.authors
+ format.title "title" output.check
+ new.block
+ format.tr.number output.nonnull
+ institution "institution" output.check
+ address output
+ format.date "year" output.check
+ format.isbn "\ifbtxprintISBN" output.isbn
+ new.block
+ format.url output
+ note output
+ fin.entry
+ write.annote
+}
+
+% \end{macrocode}
+%
+% \begin{macrocode}
+FUNCTION {unpublished}
+{ output.bibitem
+ format.authors "author" output.check
+ after.authors
+ format.title "title" output.check
+ new.block
+ format.url output
+ note "note" output.check
+ format.date output
+ fin.entry
+ write.annote
+}
+
+% \end{macrocode}
+%
+% \begin{macrocode}
+FUNCTION {default.type} { misc }
+
+%</bststd>
+% \end{macrocode}
+% Months and journals:
+% \begin{macrocode}
+%<*bststd&!bstshort>
+MACRO {jan} {"1"}
+MACRO {feb} {"2"}
+MACRO {mar} {"3"}
+MACRO {apr} {"4"}
+MACRO {may} {"5"}
+MACRO {jun} {"6"}
+MACRO {jul} {"7"}
+MACRO {aug} {"8"}
+MACRO {sep} {"9"}
+MACRO {oct} {"10"}
+MACRO {nov} {"11"}
+MACRO {dec} {"12"}
+MACRO {acmcs} {"ACM Computing Surveys"}
+MACRO {acta} {"Acta Informatica"}
+MACRO {cacm} {"Communications of the ACM"}
+MACRO {ibmjrd} {"IBM Journal of Research and Development"}
+MACRO {ibmsj} {"IBM Systems Journal"}
+MACRO {ieeese} {"IEEE Transactions on Software Engineering"}
+MACRO {ieeetc} {"IEEE Transactions on Computers"}
+MACRO {ieeetcad}
+ {"IEEE Transactions on Computer-Aided Design of Integrated Circuits"}
+MACRO {ipl} {"Information Processing Letters"}
+MACRO {jacm} {"Journal of the ACM"}
+MACRO {jcss} {"Journal of Computer and System Sciences"}
+MACRO {scp} {"Science of Computer Programming"}
+MACRO {sicomp} {"SIAM Journal on Computing"}
+MACRO {tocs} {"ACM Transactions on Computer Systems"}
+MACRO {tods} {"ACM Transactions on Database Systems"}
+MACRO {tog} {"ACM Transactions on Graphics"}
+MACRO {toms} {"ACM Transactions on Mathematical Software"}
+MACRO {toois} {"ACM Transactions on Office Information Systems"}
+MACRO {toplas} {"ACM Transactions on Programming Languages and Systems"}
+MACRO {tcs} {"Theoretical Computer Science"}
+%</bststd&!bstshort>
+%<*bststd&bstshort>
+MACRO {jan} {"1"}
+MACRO {feb} {"2"}
+MACRO {mar} {"3"}
+MACRO {apr} {"4"}
+MACRO {may} {"5"}
+MACRO {jun} {"6"}
+MACRO {jul} {"7"}
+MACRO {aug} {"8"}
+MACRO {sep} {"9"}
+MACRO {oct} {"10"}
+MACRO {nov} {"11"}
+MACRO {dec} {"12"}
+MACRO {acmcs} {"ACM Comput.\ Surv.{}"}
+MACRO {acta} {"Acta Inf.{}"}
+MACRO {cacm} {"Commun. ACM"}
+MACRO {ibmjrd} {"IBM J.~Res.\ Dev.{}"}
+MACRO {ibmsj} {"IBM Syst.~J.{}"}
+MACRO {ieeese} {"IEEE Trans.\ Softw.\ Eng.{}"}
+MACRO {ieeetc} {"IEEE Trans.\ Comput.{}"}
+MACRO {ieeetcad}
+ {"IEEE Trans.\ Comput.-Aided Design Integrated Circuits"}
+MACRO {ipl} {"Inf.\ Process.\ Lett.{}"}
+MACRO {jacm} {"J.~ACM"}
+MACRO {jcss} {"J.~Comput.\ Syst.\ Sci.{}"}
+MACRO {scp} {"Sci.\ Comput.\ Programming"}
+MACRO {sicomp} {"SIAM J.~Comput.{}"}
+MACRO {tocs} {"ACM Trans.\ Comput.\ Syst.{}"}
+MACRO {tods} {"ACM Trans.\ Database Syst.{}"}
+MACRO {tog} {"ACM Trans.\ Gr.{}"}
+MACRO {toms} {"ACM Trans.\ Math.\ Softw.{}"}
+MACRO {toois} {"ACM Trans.\ Office Inf.\ Syst.{}"}
+MACRO {toplas} {"ACM Trans.\ Prog.\ Lang.\ Syst.{}"}
+MACRO {tcs} {"Theoretical Comput.\ Sci.{}"}
+%</bststd&bstshort>
+% \end{macrocode}
+% Action.
+% \begin{macrocode}
+%<*bststd>
+
+READ
+
+%</bststd>
+% \end{macrocode}
+%
+% \subsubsection{Sorted bibliographies}
+%
+% This code is only used for sorted bibliographies.
+% \changes{1.00}{2005/02/16}{Fix sorting of \BibTeX\ entries without
+% an author}%
+% \begin{macrocode}
+%<*bststd&!bstunsorted>
+FUNCTION {sortify}
+{ purify$
+ "l" change.case$
+}
+
+% \end{macrocode}
+%
+% \begin{macrocode}
+INTEGERS { len }
+
+% \end{macrocode}
+%
+% \begin{macrocode}
+FUNCTION {chop.word}
+{ 's :=
+ 'len :=
+ s #1 len substring$ =
+ { s len #1 + global.max$ substring$ }
+ 's
+ if$
+}
+
+%</bststd&!bstunsorted>
+%<*bststd&bstalpha>
+% \end{macrocode}
+%
+% \begin{macrocode}
+INTEGERS { et.al.char.used }
+
+% \end{macrocode}
+%
+% \begin{macrocode}
+FUNCTION {initialize.et.al.char.used}
+{ #0 'et.al.char.used :=
+}
+
+% \end{macrocode}
+%
+% \begin{macrocode}
+EXECUTE {initialize.et.al.char.used}
+
+% \end{macrocode}
+%
+% \begin{macrocode}
+FUNCTION {format.lab.names}
+{ 's :=
+ s num.names$ 'numnames :=
+ numnames #1 >
+ { numnames #4 >
+ { #3 'namesleft := }
+ { numnames 'namesleft := }
+ if$
+ #1 'nameptr :=
+ ""
+ { namesleft #0 > }
+ { nameptr numnames =
+ { s nameptr "{ff }{vv }{ll}{ jj}" format.name$ "others" =
+ { "{\etalchar{+}}" *
+ #1 'et.al.char.used :=
+ }
+ { s nameptr "{v{}}{l{}}" format.name$ * }
+ if$
+ }
+ { s nameptr "{v{}}{l{}}" format.name$ * }
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+ numnames #4 >
+ { "{\etalchar{+}}" *
+ #1 'et.al.char.used :=
+ }
+ 'skip$
+ if$
+ }
+ { s #1 "{v{}}{l{}}" format.name$
+ duplicate$ text.length$ #2 <
+ { pop$ s #1 "{ll}" format.name$ #3 text.prefix$ }
+ 'skip$
+ if$
+ }
+ if$
+}
+
+% \end{macrocode}
+%
+% \begin{macrocode}
+FUNCTION {author.key.label}
+{ author empty$
+ { key empty$
+ { cite$ #1 #3 substring$ }
+ { key #3 text.prefix$ }
+ if$
+ }
+ { author format.lab.names }
+ if$
+}
+
+% \end{macrocode}
+%
+% \begin{macrocode}
+FUNCTION {author.editor.key.label}
+{ author empty$
+ { editor empty$
+ { key empty$
+ { cite$ #1 #3 substring$ }
+ { key #3 text.prefix$ }
+ if$
+ }
+ { editor format.lab.names }
+ if$
+ }
+ { author format.lab.names }
+ if$
+}
+
+% \end{macrocode}
+%
+% \begin{macrocode}
+FUNCTION {author.key.organization.label}
+{ author empty$
+ { key empty$
+ { organization empty$
+ { cite$ #1 #3 substring$ }
+ { "The " #4 organization chop.word #3 text.prefix$ }
+ if$
+ }
+ { key #3 text.prefix$ }
+ if$
+ }
+ { author format.lab.names }
+ if$
+}
+
+% \end{macrocode}
+%
+% \begin{macrocode}
+FUNCTION {editor.key.organization.label}
+{ editor empty$
+ { key empty$
+ { organization empty$
+ { cite$ #1 #3 substring$ }
+ { "The " #4 organization chop.word #3 text.prefix$ }
+ if$
+ }
+ { key #3 text.prefix$ }
+ if$
+ }
+ { editor format.lab.names }
+ if$
+}
+
+% \end{macrocode}
+%
+% \begin{macrocode}
+FUNCTION {calc.label}
+{ type$ "book" =
+ type$ "inbook" =
+ or
+ 'author.editor.key.label
+ { type$ "proceedings" =
+ 'editor.key.organization.label
+ { type$ "manual" =
+ 'author.key.organization.label
+ 'author.key.label
+ if$
+ }
+ if$
+ }
+ if$
+ duplicate$
+ year field.or.null purify$ #-1 #2 substring$
+ *
+ 'label :=
+ year field.or.null purify$ #-1 #4 substring$
+ *
+ sortify 'sort.label :=
+}
+
+%</bststd&bstalpha>
+%<*bststd&!bstunsorted>
+% \end{macrocode}
+%
+% \begin{macrocode}
+FUNCTION {sort.format.names}
+{ 's :=
+ #1 'nameptr :=
+ ""
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ { nameptr #1 >
+ { " " * }
+ 'skip$
+ if$
+%</bststd&!bstunsorted>
+% \end{macrocode}
+% \changes{0.41}{2003/11/03}{Corrected \texttt{babunsrt.bst}}%
+% \begin{macrocode}
+%<*bststd&!bstshort&!bstunsorted>
+ s nameptr "{ll{ }}{ ff{ }}{vv{ } }{ jj{ }}" format.name$ 't :=
+%</bststd&!bstshort&!bstunsorted>
+%<*bststd&bstshort&!bstunsorted>
+ s nameptr "{ll{ }}{ f{ }}{vv{ } }{ jj{ }}" format.name$ 't :=
+%</bststd&bstshort&!bstunsorted>
+%<*bststd&!bstunsorted>
+ nameptr numnames = t "others" = and
+ { "et al" * }
+ { t sortify * }
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+}
+
+% \end{macrocode}
+%
+% \begin{macrocode}
+FUNCTION {sort.format.title}
+{ 't :=
+ "A " #2
+ "An " #3
+ "The " #4 t chop.word
+ chop.word
+ chop.word
+ sortify
+ #1 global.max$ substring$
+}
+
+% \end{macrocode}
+%
+% \begin{macrocode}
+FUNCTION {author.sort}
+{ author empty$
+ { key empty$
+ { "to sort, need author or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { author sort.format.names }
+ if$
+}
+
+% \end{macrocode}
+%
+% \begin{macrocode}
+FUNCTION {author.editor.sort}
+{ author empty$
+ { editor empty$
+ { key empty$
+ { "to sort, need author, editor, or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { editor sort.format.names }
+ if$
+ }
+ { author sort.format.names }
+ if$
+}
+
+% \end{macrocode}
+%
+% \begin{macrocode}
+FUNCTION {author.organization.sort}
+{ author empty$
+ { organization empty$
+ { key empty$
+ { "to sort, need author, organization, or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { "The " #4 organization chop.word sortify }
+ if$
+ }
+ { author sort.format.names }
+ if$
+}
+
+% \end{macrocode}
+%
+% \begin{macrocode}
+FUNCTION {editor.organization.sort}
+{ editor empty$
+ { organization empty$
+ { key empty$
+ { "to sort, need editor, organization, or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { "The " #4 organization chop.word sortify }
+ if$
+ }
+ { editor sort.format.names }
+ if$
+}
+
+% \end{macrocode}
+%
+% \begin{macrocode}
+FUNCTION {presort}
+{
+%</bststd&!bstunsorted>
+%<*bststd&bstalpha>
+ calc.label
+ sort.label
+ " "
+ *
+%</bststd&bstalpha>
+%<*bststd&!bstunsorted>
+ type$ "book" =
+ type$ "inbook" =
+ or
+ 'author.editor.sort
+ { type$ "proceedings" =
+ 'editor.organization.sort
+ { type$ "manual" =
+ 'author.organization.sort
+ 'author.sort
+ if$
+ }
+ if$
+ }
+ if$
+%</bststd&!bstunsorted>
+%<bststd&bstalpha> *
+%<*bststd&!bstunsorted>
+ " "
+ *
+ year field.or.null sortify
+ *
+ " "
+ *
+ title field.or.null
+ sort.format.title
+ *
+ #1 entry.max$ substring$
+ 'sort.key$ :=
+}
+
+% \end{macrocode}
+%
+% \begin{macrocode}
+ITERATE {presort}
+
+% \end{macrocode}
+%
+% \begin{macrocode}
+SORT
+
+%</bststd&!bstunsorted>
+%<*bststd&!bstalpha>
+% \end{macrocode}
+%
+% \begin{macrocode}
+STRINGS { longest.label }
+
+% \end{macrocode}
+%
+% \begin{macrocode}
+INTEGERS { number.label longest.label.width }
+
+% \end{macrocode}
+%
+% \begin{macrocode}
+FUNCTION {initialize.longest.label}
+{ "" 'longest.label :=
+ #1 'number.label :=
+ #0 'longest.label.width :=
+}
+
+% \end{macrocode}
+%
+% \begin{macrocode}
+FUNCTION {longest.label.pass}
+{ number.label int.to.str$ 'label :=
+ number.label #1 + 'number.label :=
+ label width$ longest.label.width >
+ { label 'longest.label :=
+ label width$ 'longest.label.width :=
+ }
+ 'skip$
+ if$
+}
+%</bststd&!bstalpha>
+%<*bststd&bstalpha>
+% \end{macrocode}
+%
+% \begin{macrocode}
+STRINGS { longest.label last.sort.label next.extra }
+
+% \end{macrocode}
+%
+% \begin{macrocode}
+INTEGERS { longest.label.width last.extra.num }
+
+% \end{macrocode}
+%
+% \begin{macrocode}
+FUNCTION {initialize.longest.label}
+{ "" 'longest.label :=
+ #0 int.to.chr$ 'last.sort.label :=
+ "" 'next.extra :=
+ #0 'longest.label.width :=
+ #0 'last.extra.num :=
+}
+
+% \end{macrocode}
+%
+% \begin{macrocode}
+FUNCTION {forward.pass}
+{ last.sort.label sort.label =
+ { last.extra.num #1 + 'last.extra.num :=
+ last.extra.num int.to.chr$ 'extra.label :=
+ }
+ { "a" chr.to.int$ 'last.extra.num :=
+ "" 'extra.label :=
+ sort.label 'last.sort.label :=
+ }
+ if$
+}
+
+% \end{macrocode}
+%
+% \begin{macrocode}
+FUNCTION {reverse.pass}
+{ next.extra "b" =
+ { "a" 'extra.label := }
+ 'skip$
+ if$
+ label extra.label * 'label :=
+ label width$ longest.label.width >
+ { label 'longest.label :=
+ label width$ 'longest.label.width :=
+ }
+ 'skip$
+ if$
+ extra.label 'next.extra :=
+}
+%</bststd&bstalpha>
+% \end{macrocode}
+%
+% \subsubsection{Generic code}
+%
+% \begin{macrocode}
+%<*bststd>
+
+EXECUTE {initialize.longest.label}
+
+%</bststd>
+%<bststd&!bstalpha>ITERATE {longest.label.pass}
+%<bststd&bstalpha>ITERATE {forward.pass}
+%<bststd&bstalpha>REVERSE {reverse.pass}
+%<*bststd>
+
+% \end{macrocode}
+%
+% \begin{macrocode}
+FUNCTION {begin.bib}
+{
+%</bststd>
+%<*bststd&bstalpha>
+ et.al.char.used
+ { "\newcommand{\etalchar}[1]{$^{#1}$}" write$ newline$ }
+ 'skip$
+ if$
+%</bststd&bstalpha>
+%<*bststd>
+ preamble$ empty$
+ 'skip$
+ { preamble$ write$ newline$ }
+ if$
+ "\begin{thebibliography}{" longest.label * "}" * write$ newline$
+ " \providebibliographyfont{name}{}%" write$ newline$
+ " \providebibliographyfont{lastname}{}%" write$ newline$
+ " \providebibliographyfont{title}{\emph}%" write$ newline$
+ " \providebibliographyfont{jtitle}{\btxtitlefont}%" write$ newline$
+ " \providebibliographyfont{etal}{\emph}%" write$ newline$
+ " \providebibliographyfont{journal}{}%" write$ newline$
+ " \providebibliographyfont{volume}{}%" write$ newline$
+ " \providebibliographyfont{ISBN}{\MakeUppercase}%" write$ newline$
+ " \providebibliographyfont{ISSN}{\MakeUppercase}%" write$ newline$
+ " \providebibliographyfont{url}{\url}%" write$ newline$
+ " \providebibliographyfont{numeral}{}%" write$ newline$
+ " \expandafter\btxselectlanguage\expandafter {\btxfallbacklanguage}"
+ write$ newline$
+}
+
+% \end{macrocode}
+%
+% \begin{macrocode}
+EXECUTE {begin.bib}
+
+% \end{macrocode}
+%
+% \begin{macrocode}
+EXECUTE {init.state.consts}
+
+% \end{macrocode}
+%
+% \begin{macrocode}
+ITERATE {call.type$}
+
+% \end{macrocode}
+%
+% \begin{macrocode}
+FUNCTION {end.bib}
+{ newline$
+ "\end{thebibliography}" write$ newline$
+}
+
+% \end{macrocode}
+%
+% \begin{macrocode}
+EXECUTE {end.bib}
+%</bststd>
+% \end{macrocode}
+%
+%
+% \subsection{AMS styles}
+%
+% The following \BibTeX\ styles are derived from the AMS \BibTeX-style-files
+% by the American Mathematical Society.
+% For example, see `amsplain.bst' for more documentation about the
+% original.
+% \begin{macrocode}
+%<*bstams>
+ENTRY
+ { address
+ annote
+ annotelanguage
+ author
+ booktitle
+ chapter
+ edition
+ editor
+ howpublished
+ institution
+ isbn
+ issn
+ journal
+ key
+ language
+ month
+ mrnumber
+ note
+ number
+ organization
+ pages
+ publisher
+ school
+ series
+ title
+ type
+ url
+ urldate
+ volume
+ year
+ }
+ {}
+ { label bysame }
+
+
+INTEGERS { output.state before.all mid.sentence }
+
+FUNCTION {init.state.consts}
+{ #0 'before.all :=
+ #1 'mid.sentence :=
+}
+
+STRINGS { s t language.state change.temp}
+
+FUNCTION {shows}
+{ duplicate$ ":::: `" swap$ * "'" * top$
+}
+
+FUNCTION {showstack}
+{"STACK================================================================"
+top$
+stack$
+"ENDSTACK============================================================="
+top$
+}
+
+FUNCTION {not}
+{ { #0 }
+ { #1 }
+ if$
+}
+
+FUNCTION {and}
+{ 'skip$
+ { pop$ #0 }
+ if$
+}
+
+FUNCTION {or}
+{ { pop$ #1 }
+ 'skip$
+ if$
+}
+
+FUNCTION {language.change.case}
+{
+ 'change.temp :=
+ 't :=
+ "\btxifchangecase {"
+ t change.temp change.case$ *
+ "}{" *
+ t *
+ "}" *
+}
+
+FUNCTION {field.or.null}
+{ duplicate$ empty$
+ { pop$ "" }
+ 'skip$
+ if$
+}
+
+% \end{macrocode}
+% \changes{1.00}{2005/02/16}{Remove \texttt{emphasize} and
+% \texttt{smallcaps} from \BibTeX\ styles}%
+% \begin{macrocode}
+FUNCTION {namefont}
+{ duplicate$ empty$
+ { pop$ "" }
+ { "\btxnamefont {" swap$ * "}" * }
+ if$
+}
+
+% \end{macrocode}
+% \changes{1.12}{2005/06/19}{Add extra formatting of lastnames to
+% \BibTeX\ styles}%
+% \begin{macrocode}
+FUNCTION {lastnamefont}
+{ duplicate$ empty$
+ { pop$ "" }
+ { "\btxlastnamefont {" swap$ * "}" * }
+ if$
+}
+
+FUNCTION {titlefont}
+{ duplicate$ empty$
+ { pop$ "" }
+ { "\btxtitlefont {" swap$ * "}" * }
+ if$
+}
+
+FUNCTION {jtitlefont}
+{ duplicate$ empty$
+ { pop$ "" }
+ { "\btxjtitlefont {" swap$ * "}" * }
+ if$
+}
+
+FUNCTION {journalfont}
+{ duplicate$ empty$
+ { pop$ "" }
+ { "\btxjournalfont {" swap$ * "}" * }
+ if$
+}
+
+FUNCTION {publisherfont}
+{ duplicate$ empty$
+ { pop$ "" }
+ { "\btxpublisherfont {" swap$ * "}" * }
+ if$
+}
+
+FUNCTION {volumefont}
+{ duplicate$ empty$
+ { pop$ "" }
+ { "\btxvolumefont {" swap$ * "}" * }
+ if$
+}
+
+FUNCTION {etalfont}
+{ duplicate$ empty$
+ { pop$ "" }
+ { "\btxetalfont {" swap$ * "}" * }
+ if$
+}
+
+% \end{macrocode}
+% \texttt{n.dashify} is used to make sure page ranges get the \TeX\ code
+% (two hyphens) for en-dashes.
+% \begin{macrocode}
+FUNCTION {n.dashify}
+{ 't :=
+ ""
+ { t empty$ not }
+ { t #1 #1 substring$ "-" =
+ { t #1 #2 substring$ "--" = not
+ { "--" *
+ t #2 global.max$ substring$ 't :=
+ }
+ { { t #1 #1 substring$ "-" = }
+ { "-" *
+ t #2 global.max$ substring$ 't :=
+ }
+ while$
+ }
+ if$
+ }
+ { t #1 #1 substring$ *
+ t #2 global.max$ substring$ 't :=
+ }
+ if$
+ }
+ while$
+}
+
+% \end{macrocode}
+% |tie.or.space.connect| connects two items with a |~| if the
+% second item is less than 3 letters long, otherwise it just puts an
+% ordinary space.
+% \begin{macrocode}
+FUNCTION {tie.or.space.connect}
+{ duplicate$ text.length$ #3 <
+ { "~" }
+ { "\ " }
+ if$
+ swap$ * *
+}
+
+FUNCTION {add.space.if.necessary}
+{ duplicate$ "" =
+ 'skip$
+ { "\ " * }
+ if$
+}
+
+% \end{macrocode}
+% |either.or.check| gives a warning if two mutually exclusive fields
+% were used in the database.
+% \begin{macrocode}
+FUNCTION {either.or.check}
+{ empty$
+ 'pop$
+ { "can't use both " swap$ * " fields in " * cite$ * warning$ }
+ if$
+}
+
+% \end{macrocode}
+% |output.nonnull| is called by output.
+% \begin{macrocode}
+FUNCTION {output.nonnull}
+% \end{macrocode}
+% remove the top item from the stack because it's in the way.
+% \begin{macrocode}
+{ 's :=
+ output.state mid.sentence =
+% \end{macrocode}
+% If we're in mid-sentence, add a comma to the new top item and write it
+% \begin{macrocode}
+ { ", " * write$ }
+% \end{macrocode}
+% Otherwise, if we're at the beginning of a bibitem,
+% \begin{macrocode}
+ { output.state before.all =
+% \end{macrocode}
+% just write out the top item from the stack;
+% \begin{macrocode}
+ 'write$
+% \end{macrocode}
+% and the last alternative is that we're at the end of the current
+% bibitem, so we add a period to the top stack item and write it out.
+% \begin{macrocode}
+ { add.period$ " " * write$ }
+ if$
+ mid.sentence 'output.state :=
+ }
+ if$
+% \end{macrocode}
+% Put the top item back on the stack that we removed earlier.
+% \begin{macrocode}
+ s
+}
+
+% \end{macrocode}
+% Output checks to see if the stack top is empty; if not, it
+% calls output.nonnull to write it out.
+% \begin{macrocode}
+FUNCTION {output}
+{ duplicate$ empty$
+ 'pop$
+ 'output.nonnull
+ if$
+}
+
+% \end{macrocode}
+% Standard warning message for a missing or empty field. For the user
+% we call any such field `missing' without respect to the distinction
+% made by Bib\TeX\ between missing and empty.
+% \begin{macrocode}
+FUNCTION {missing.warning}
+{ "missing " swap$ * " in " * cite$ * warning$ }
+
+% \end{macrocode}
+% |output.check| is like output except that it gives a warning on-screen
+% if the given field in the database entry is empty. t is the field
+% name.
+% \begin{macrocode}
+FUNCTION {output.check}
+{ 't :=
+ duplicate$ empty$
+ { pop$ t missing.warning }
+ 'output.nonnull
+ if$
+}
+
+FUNCTION {output.bibitem}
+{ newline$
+% \end{macrocode}
+% \changes{0.40}{2003/09/26}{Switch to a fall-back language when
+% \texttt{language} field is missing}%
+% If no language is given, fall back to the language that has been
+% active at \cs{begin\{document\}}.
+% For \BibTeX, this language gets the name \texttt{nolanguage}.
+% \begin{macrocode}
+ language empty$
+ { "empty language in " cite$ * warning$
+ language.state "nolanguage" =
+ 'skip$
+ {
+ "\expandafter\btxselectlanguage\expandafter {"
+ "\btxfallbacklanguage}" * write$
+ newline$
+ }
+ if$
+ "nolanguage" 'language.state :=
+ }
+ { language.state language =
+ 'skip$
+ { "\btxselectlanguage {" language * "}" * write$
+ newline$
+ }
+ if$
+ language 'language.state :=
+ }
+ if$
+ "\bibitem {" cite$ * "}" * write$
+ newline$
+% \end{macrocode}
+% This empty string is the first thing that will be written
+% the next time \verb|write$| is called. Done this way because each
+% item is saved on the stack until we find out what punctuation
+% should be added after it. Therefore we need an empty first item.
+% \begin{macrocode}
+ ""
+ before.all 'output.state :=
+}
+
+FUNCTION {output.nonempty.mrnumber}
+{ duplicate$ missing$
+ { pop$ "" }
+ 'skip$
+ if$
+ duplicate$ empty$
+ 'pop$
+ { " \MR{" swap$ * "}" * write$ }
+ if$
+}
+
+FUNCTION {fin.entry}
+{ add.period$
+ write$
+ mrnumber output.nonempty.mrnumber
+ newline$
+}
+
+% \end{macrocode}
+% Removed |new.block|, |new.block.checka|, |new.block.checkb|,
+% |new.sentence|, |new.sentence.checka|, and |new.sentence.checkb|
+% functions here, since they don't seem to be needed in the AMS style.
+% Also moved some real basic functions like `and' and 'or' earlier in
+% the file.
+% \begin{macrocode}
+INTEGERS { nameptr namesleft numnames }
+
+% \end{macrocode}
+% The extra section to write out a language field was added
+% for babamspl.bst. Not present in babplain.bst.
+% \begin{macrocode}
+FUNCTION {format.language}
+{ language empty$
+ { "" }
+ { "\btxprintamslanguage{\btxlanguagename {" language * "}}" * }
+ if$
+}
+
+% \end{macrocode}
+% This version of format.names puts names in the format
+% ``First von Last, Jr.''
+% (i.\,e., first name first, no abbreviating to initials).
+% \begin{macrocode}
+FUNCTION {format.names}
+{ 's :=
+ #1 'nameptr :=
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ {
+ s nameptr "{ff{\btxfnamespacelong }~}{vv~}" format.name$
+ s nameptr "{ll}" format.name$ lastnamefont *
+ s nameptr "{, jj}" format.name$ * 't :=
+ nameptr #1 >
+ { namesleft #1 >
+ { ", " * t namefont * }
+ { numnames #2 >
+ { "\btxandcomma {}" * }
+ 'skip$
+ if$
+ s nameptr "{ff~}{vv~}{ll}{, jj}" format.name$ "others" =
+ { " " * "\btxetalshort {.}" etalfont * }
+ { " \btxandlong {} " * t namefont * }
+ if$
+ }
+ if$
+ }
+ {
+ s nameptr "{ff{\btxfnamespacelong }~}{vv~}" format.name$
+ s nameptr "{ll}" format.name$ lastnamefont *
+ s nameptr "{, jj}" format.name$ * namefont
+ }
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+}
+
+FUNCTION {format.authors}
+{ author empty$
+ { "" }
+ { bysame "\bysame" =
+ {"\bysame"}
+ { author format.names }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.editors}
+{ editor empty$
+ { "" }
+ { editor format.names
+ editor num.names$ #1 >
+ { "\ (\btxeditorsshort {.})" * }
+ { "\ (\btxeditorshort {.})" * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.nonauthor.editors}
+{ editor empty$
+ { "" }
+ { editor format.names
+ editor num.names$ #1 >
+ { ", \btxeditorsshort {.}" * }
+ { ", \btxeditorshort {.}" * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.title}
+{ title empty$
+ { "" }
+ { title "t" language.change.case titlefont }
+ if$
+}
+
+FUNCTION {format.jtitle}
+{ title empty$
+ { "" }
+ { title "t" language.change.case jtitlefont }
+ if$
+}
+
+FUNCTION {format.journal.vol.year}
+{ journal empty$
+ { "journal name" missing.warning ""}
+ { journal journalfont }
+ if$
+ volume empty$
+ 'skip$
+ { " " * volume volumefont * }
+ if$
+ year empty$
+ { "year" missing.warning }
+ { " (" * year * ")" * }
+ if$
+}
+
+% \end{macrocode}
+% For formatting the issue number for a journal article.
+% \begin{macrocode}
+FUNCTION {format.number}
+{ number empty$
+ { "" }
+ { "\btxnumbershort {.}~" number * }
+ if$
+}
+
+% \end{macrocode}
+% For formatting miscellaneous dates
+% \begin{macrocode}
+FUNCTION {format.date}
+{ year empty$
+ { month empty$
+ { "" }
+ { "there's a month but no year in " cite$ * warning$
+ month
+ }
+ if$
+ }
+ { month empty$
+ 'year
+ { "\btxprintmonthyear{.}{"
+ month * "}{" * year * "}{long}" *
+ }
+ if$
+ }
+ if$
+}
+
+% \end{macrocode}
+% The volume, series and number information is sort of tricky.
+% This code handles it as follows:
+% If the series is present, and the volume, but not the number,
+% then we do "\emph{Book title}, Series Name, vol. 000"
+% If the series is present, and the number, but not the volume,
+% then we do "\emph{Book title}, Series Name, no. 000"
+% If the series is present, and both number and volume,
+% then we do "\emph{Book title}, vol. XX, Series Name, no. 000"
+% Finally, if the series is absent,
+% then we do "\emph{Book title}, vol. XX"
+% or "\emph{Book title}, no. 000"
+% and if both volume and number are present, give a warning message.
+% \begin{macrocode}
+FUNCTION {format.bookvolume.series.number}
+{ volume empty$
+ { "" % Push the empty string as a placeholder in case everything else
+ % is empty too.
+ series empty$
+ 'skip$
+ { pop$ series } % if series is not empty put in stack
+ if$
+ number empty$
+ 'skip$
+ { duplicate$ empty$ % if no preceding material,
+ 'skip$ % do nothing, otherwise
+ { ", " * } % add a comma and space to separate.
+ if$
+ "\btxnumbershort {.}" number tie.or.space.connect * % add the number information
+ }
+ if$
+ }
+% \end{macrocode}
+% If the volume is NOT EMPTY:
+% \begin{macrocode}
+ { "\btxvolumeshort {.}" volume tie.or.space.connect % vol. XX
+ number empty$
+ { series empty$
+ 'skip$
+ { series ", " * swap$ *} % Series Name, vol. XX
+ if$
+ }
+ { series empty$
+ { "can't use both volume and number if series info is missing"
+ warning$
+ "in BibTeX entry type `" type$ * "'" * top$
+ }
+ { ", " * series * ", \btxnumbershort {.}" * number tie.or.space.connect }
+ if$
+ }
+ if$
+ }
+ if$
+
+} % end of format.bookvolume.series.number
+
+% \end{macrocode}
+% |format.inproc.title.where.editors| is used by inproceedings entry types
+% No case changing or emphasizing for the title. We want initial
+% caps, roman.
+% We add parentheses around the address (place where conference
+% was held).
+% Likewise we add parentheses around the editors' names.
+% \begin{macrocode}
+FUNCTION {format.inproc.title.address.editors}
+{ booktitle empty$
+ { "" }
+ { booktitle
+ address empty$
+ 'skip$
+ { add.space.if.necessary "(" * address * ")" * }
+ if$
+ editor empty$
+ 'skip$
+ { add.space.if.necessary "(" * format.nonauthor.editors * ")" * }
+ if$
+ }
+ if$
+}
+
+% \end{macrocode}
+% |format.incoll.title.editors| is similar to |format.inproc...| but
+% omits the address. For collections that are not proceedings volumes.
+% \begin{macrocode}
+FUNCTION {format.incoll.title.editors}
+{ booktitle empty$
+ { "" }
+ { editor empty$
+ { booktitle }
+ { booktitle
+ add.space.if.necessary "(" * format.nonauthor.editors * ")" *
+ }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.edition}
+{ edition empty$
+ { "" }
+ {
+ output.state mid.sentence =
+ { edition "l" change.case$ }
+ { edition "t" change.case$ }
+ if$
+ "\btxeditionnumshort {" swap$ *
+ "}{.}" *
+ }
+ if$
+}
+
+FUNCTION {format.isbn}
+{ isbn empty$
+ { "" }
+ { "\mbox{\btxISBN~\btxISBNfont {" isbn * "}}" * }
+ if$
+}
+
+FUNCTION {format.issn}
+{ issn empty$
+ { "" }
+ { "\mbox{\btxISSN~\btxISSNfont {" issn * "}}" * }
+ if$
+}
+
+FUNCTION {format.url}
+{ url empty$
+ { "" }
+ {
+ urldate empty$
+ { "{\latintext \btxurlfont{" url * "}}" * }
+ {
+ "{\latintext \btxurlfont{" url * "}}\empty " *
+ "\btxurldatecomment {\btxkeywordlanguage {\btxurldatefont{" *
+ urldate * "}}}" *
+ }
+ if$
+ }
+ if$
+}
+% \end{macrocode}
+% Format annotations:
+% \begin{macrocode}
+FUNCTION {write.annote}
+{ annote empty$
+ 'skip$
+ {
+ annotelanguage empty$
+ { "\btxkeywordlanguage {" }
+ { "{\selectlanguage {" annotelanguage * "}" * }
+ if$
+ "\btxannotation {" * annote * "}}" *
+ write$ newline$
+ }
+ if$
+}
+
+INTEGERS { multiresult }
+
+FUNCTION {multi.page.check}
+{ 't :=
+ #0 'multiresult :=
+ { multiresult not
+ t empty$ not
+ and
+ }
+ { t #1 #1 substring$
+ duplicate$ "-" =
+ swap$ duplicate$ "," =
+ swap$ "+" =
+ or or
+ { #1 'multiresult := }
+ { t #2 global.max$ substring$ 't := }
+ if$
+ }
+ while$
+ multiresult
+}
+
+FUNCTION {format.pages}
+{ pages empty$
+ { "" }
+ { pages n.dashify }
+ if$
+}
+
+FUNCTION {format.book.pages}
+{ pages empty$
+ { "" }
+ { pages multi.page.check
+ { "\btxpagesshort {.}~" pages n.dashify * }
+ { "\btxpageshort {.}~" pages * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.chapter.pages}
+{ chapter empty$
+ 'format.book.pages
+ { type empty$
+ { "\btxchaptershort {.}~" }
+ { type "l" language.change.case " " * }
+ if$
+ chapter *
+ pages empty$
+ 'skip$
+ { ", " * format.book.pages * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {empty.misc.check}
+{ author empty$ title empty$ howpublished empty$
+ month empty$ year empty$ note empty$
+ and and and and and
+ key empty$ not and
+ { "all relevant fields are empty in " cite$ * warning$ }
+ 'skip$
+ if$
+}
+
+FUNCTION {format.thesis.type}
+{ type empty$
+ 'skip$
+ { pop$
+ type "t" language.change.case
+ }
+ if$
+}
+
+FUNCTION {format.tr.number}
+{ type empty$
+ { "\Btxtechrepshort {.}" }
+ 'type
+ if$
+ number empty$
+ { "t" language.change.case }
+ { number tie.or.space.connect }
+ if$
+}
+
+% \end{macrocode}
+% The |format.crossref| functions haven't been paid much attention
+% at the present time (June 1990) and could probably use some
+% work. MJD
+% \begin{macrocode}
+FUNCTION {format.article.crossref}
+{ key empty$
+ { journal empty$
+ { "need key or journal for " cite$ * " to crossref " * crossref *
+ warning$
+ ""
+ }
+ { "\btxinshort {} " journal journalfont * }
+ if$
+ }
+ { "\btxinshort {} " key * }
+ if$
+ " \cite{" * crossref * "}" *
+}
+
+FUNCTION {format.crossref.editor}
+{ editor #1 "{vv~}{ll}" format.name$
+ editor num.names$ duplicate$
+ #2 >
+ { pop$ " \btxetalshort {.}" * }
+ { #2 <
+ 'skip$
+ { editor #2 "{ff }{vv }{ll}{ jj}" format.name$ "others" =
+ { " \btxetalshort {.}" * }
+ { " \btxandlong {} " * editor #2 "{vv~}{ll}" format.name$ * }
+ if$
+ }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.book.crossref}
+{ volume empty$
+ { "empty volume in " cite$ * "'s crossref of " * crossref * warning$
+ "\btxinserieslong {} "
+ }
+ { "\btxvolumeshort {.}" volume tie.or.space.connect
+ " \btxofserieslong {} " *
+ }
+ if$
+ editor empty$
+ editor field.or.null author field.or.null =
+ or
+ { key empty$
+ { series empty$
+ { "need editor, key, or series for " cite$ * " to crossref " *
+ crossref * warning$
+ "" *
+ }
+ { series * }
+ if$
+ }
+ { key * }
+ if$
+ }
+ { format.crossref.editor * }
+ if$
+ " \cite{" * crossref * "}" *
+}
+
+FUNCTION {format.incoll.inproc.crossref}
+{ editor empty$
+ editor field.or.null author field.or.null =
+ or
+ { key empty$
+ { booktitle empty$
+ { "need editor, key, or booktitle for " cite$ * " to crossref " *
+ crossref * warning$
+ ""
+ }
+ { "\btxinlong {} " * booktitle titlefont * }
+ if$
+ }
+ { "\btxinlong {} " key * }
+ if$
+ }
+ { "\btxinlong {} " format.crossref.editor * }
+ if$
+ " \cite{" * crossref * "}" *
+}
+
+% \end{macrocode}
+% The main functions for each entry type.
+%
+% journal, vol and year are formatted together because they are
+% not separated by commas.
+% \begin{macrocode}
+FUNCTION {article}
+{ output.bibitem
+ format.authors "author" output.check
+ format.jtitle "title" output.check
+ crossref missing$
+ { format.journal.vol.year output
+ format.number output
+ format.pages "pages" output.check
+ }
+ { format.article.crossref output.nonnull
+ format.pages "pages" output.check
+ }
+ if$
+ format.issn output
+ format.url output
+ format.language *
+ note output
+ fin.entry
+ write.annote
+}
+
+FUNCTION {book}
+{ output.bibitem
+ author empty$
+ { format.editors "author and editor" output.check }
+ { format.authors output.nonnull
+ crossref missing$
+ { "author and editor" editor either.or.check }
+ 'skip$
+ if$
+ }
+ if$
+ format.title "title" output.check
+ format.edition output
+ crossref missing$
+ { format.bookvolume.series.number output
+ publisher "publisher" output.check publisherfont
+ address output
+ }
+ { format.book.crossref output.nonnull
+ }
+ if$
+ format.date "year" output.check
+ format.isbn output
+ format.url output
+ format.language *
+ note output
+ fin.entry
+ write.annote
+}
+
+FUNCTION {booklet}
+{ output.bibitem
+ format.authors output
+ format.title "title" output.check
+ howpublished output
+ address output
+ format.date output
+ format.url output
+ note output
+ fin.entry
+ write.annote
+}
+
+FUNCTION {inbook}
+{ output.bibitem
+ author empty$
+ { format.editors "author and editor" output.check }
+ { format.authors output.nonnull
+ crossref missing$
+ { "author and editor" editor either.or.check }
+ 'skip$
+ if$
+ }
+ if$
+ format.title "title" output.check
+ format.edition output
+ crossref missing$
+ { format.bookvolume.series.number output
+ format.chapter.pages "chapter and pages" output.check
+ publisher "publisher" output.check publisherfont
+ address output
+ }
+ { format.chapter.pages "chapter and pages" output.check
+ format.book.crossref output.nonnull
+ }
+ if$
+ format.date "year" output.check
+ format.isbn output
+ format.url output
+ format.language *
+ note output
+ fin.entry
+ write.annote
+}
+
+FUNCTION {incollection}
+{ output.bibitem
+ format.authors "author" output.check
+ format.title "title" output.check
+ crossref missing$
+ { format.incoll.title.editors "booktitle" output.check
+ format.bookvolume.series.number output
+ publisher "publisher" output.check publisherfont
+ address output
+ format.edition output
+ format.date "year" output.check
+ }
+ { format.incoll.inproc.crossref output.nonnull
+ }
+ if$
+ note output
+ format.book.pages output
+ format.isbn output
+ format.url output
+ format.language *
+ fin.entry
+ write.annote
+}
+
+FUNCTION {inproceedings}
+{ output.bibitem
+ format.authors "author" output.check
+ format.title "title" output.check
+ crossref missing$
+ { format.inproc.title.address.editors "booktitle" output.check
+ format.bookvolume.series.number output
+ organization output
+ publisher publisherfont output
+ format.date "year" output.check
+ }
+ { format.incoll.inproc.crossref output.nonnull
+ }
+ if$
+ note output
+ format.book.pages output
+ format.isbn output
+ format.url output
+ format.language *
+ fin.entry
+ write.annote
+}
+
+FUNCTION {conference} { inproceedings }
+
+FUNCTION {manual}
+{ output.bibitem
+ author empty$
+ { organization empty$
+ 'skip$
+ { organization output.nonnull
+ address output
+ }
+ if$
+ }
+ { format.authors output.nonnull }
+ if$
+ format.title "title" output.check
+ author empty$
+ { organization empty$
+ { address output }
+ 'skip$
+ if$
+ }
+ { organization output
+ address output
+ }
+ if$
+ format.edition output
+ format.date output
+ format.isbn output
+ format.url output
+ note output
+ fin.entry
+ write.annote
+}
+
+FUNCTION {mastersthesis}
+{ output.bibitem
+ format.authors "author" output.check
+ format.title "title" output.check
+ "\btxmastthesis {}" format.thesis.type output.nonnull
+ school "school" output.check
+ address output
+ format.date "year" output.check
+ format.url output
+ note output
+ format.book.pages output
+ fin.entry
+ write.annote
+}
+
+FUNCTION {misc}
+{ output.bibitem
+ format.authors output
+ format.title output
+ howpublished output
+ format.date output
+ format.isbn output
+ format.issn output
+ format.url output
+ note output
+ format.book.pages output
+ fin.entry
+ write.annote
+ empty.misc.check
+}
+
+FUNCTION {phdthesis}
+{ output.bibitem
+ format.authors "author" output.check
+ format.title "title" output.check
+ "\btxphdthesis {}" format.thesis.type output.nonnull
+ school "school" output.check
+ address output
+ format.date "year" output.check
+ format.isbn output
+ format.url output
+ note output
+ format.book.pages output
+ fin.entry
+ write.annote
+}
+
+FUNCTION {proceedings}
+{ output.bibitem
+ editor empty$
+ { organization output }
+ { format.editors output.nonnull }
+ if$
+ format.title "title" output.check
+ format.bookvolume.series.number output
+ address empty$
+ { editor empty$
+ 'skip$
+ { organization output }
+ if$
+ publisher publisherfont output
+ format.date "year" output.check
+ }
+ { address output.nonnull
+ editor empty$
+ 'skip$
+ { organization output }
+ if$
+ publisher publisherfont output
+ format.date "year" output.check
+ }
+ if$
+ format.isbn output
+ format.url output
+ note output
+ fin.entry
+ write.annote
+}
+
+FUNCTION {techreport}
+{ output.bibitem
+ format.authors "author" output.check
+ format.title "title" output.check
+ format.tr.number output.nonnull
+ institution "institution" output.check
+ address output
+ format.date "year" output.check
+ format.isbn output
+ format.url output
+ note output
+ fin.entry
+ write.annote
+}
+
+FUNCTION {unpublished}
+{ output.bibitem
+ format.authors "author" output.check
+ format.title "title" output.check
+ format.url output
+ note "note" output.check
+ format.date output
+ fin.entry
+ write.annote
+}
+
+FUNCTION {default.type} { misc }
+
+MACRO {jan} {"1"}
+MACRO {feb} {"2"}
+MACRO {mar} {"3"}
+MACRO {apr} {"4"}
+MACRO {may} {"5"}
+MACRO {jun} {"6"}
+MACRO {jul} {"7"}
+MACRO {aug} {"8"}
+MACRO {sep} {"9"}
+MACRO {oct} {"10"}
+MACRO {nov} {"11"}
+MACRO {dec} {"12"}
+
+READ
+
+FUNCTION {sortify}
+{ purify$
+ "l" language.change.case
+}
+
+INTEGERS { len }
+
+FUNCTION {chop.word}
+{ 's :=
+ 'len :=
+ s #1 len substring$ =
+ { s len #1 + global.max$ substring$ }
+ 's
+ if$
+}
+
+FUNCTION {sort.format.names}
+{ 's :=
+ #1 'nameptr :=
+ ""
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ { nameptr #1 >
+ { " " * }
+ 'skip$
+ if$
+ s nameptr "{vv{ } }{ll{ }}{ ff{ }}{ jj{ }}" format.name$ 't :=
+ nameptr numnames = t "others" = and
+ { "et al" * }
+ { t sortify * }
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+}
+
+FUNCTION {sort.format.title}
+{ 't :=
+ "A " #2
+ "An " #3
+ "The " #4 t chop.word
+ chop.word
+ chop.word
+ sortify
+ #1 global.max$ substring$
+}
+
+FUNCTION {author.sort}
+{ author empty$
+ { key empty$
+ { "to sort, need author or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { author sort.format.names }
+ if$
+}
+
+FUNCTION {author.editor.sort}
+{ author empty$
+ { editor empty$
+ { key empty$
+ { "to sort, need author, editor, or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { editor sort.format.names }
+ if$
+ }
+ { author sort.format.names }
+ if$
+}
+
+FUNCTION {author.organization.sort}
+{ author empty$
+ { organization empty$
+ { key empty$
+ { "to sort, need author, organization, or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { "The " #4 organization chop.word sortify }
+ if$
+ }
+ { author sort.format.names }
+ if$
+}
+
+FUNCTION {editor.organization.sort}
+{ editor empty$
+ { organization empty$
+ { key empty$
+ { "to sort, need editor, organization, or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { "The " #4 organization chop.word sortify }
+ if$
+ }
+ { editor sort.format.names }
+ if$
+}
+
+FUNCTION {presort}
+{ type$ "book" =
+ type$ "inbook" =
+ or
+ 'author.editor.sort
+ { type$ "proceedings" =
+ 'editor.organization.sort
+ { type$ "manual" =
+ 'author.organization.sort
+ 'author.sort
+ if$
+ }
+ if$
+ }
+ if$
+ " "
+ *
+ year field.or.null sortify
+ *
+ " "
+ *
+ title field.or.null
+ sort.format.title
+ *
+ #1 entry.max$ substring$
+ 'sort.key$ :=
+}
+
+ITERATE {presort}
+
+SORT
+
+STRINGS { longest.label prev.author this.author }
+
+INTEGERS { number.label longest.label.width }
+
+FUNCTION {initialize.longest.label}
+{ "" 'longest.label :=
+ #1 'number.label :=
+ #0 'longest.label.width :=
+ "abcxyz" 'prev.author :=
+ "" 'this.author :=
+}
+
+FUNCTION {longest.label.pass}
+{ number.label int.to.str$ 'label :=
+ number.label #1 + 'number.label :=
+ label width$ longest.label.width >
+ { label 'longest.label :=
+ label width$ 'longest.label.width :=
+ }
+ 'skip$
+ if$
+ author empty$
+ { editor empty$
+ { "" }
+ 'editor
+ if$
+ }
+ 'author
+ if$
+ 'this.author :=
+ this.author prev.author =
+ { "\bysame" 'bysame := }
+ { "" 'bysame :=
+ this.author "" =
+ { "abcxyz" }
+ 'this.author
+ if$
+ 'prev.author :=
+ }
+ if$
+}
+
+EXECUTE {initialize.longest.label}
+
+ITERATE {longest.label.pass}
+
+FUNCTION {write.lines}
+{ { duplicate$ "." = NOT }
+ { write$ newline$ }
+ while$
+ pop$
+}
+
+FUNCTION {begin.bib}
+{ preamble$ empty$
+ 'skip$
+ { preamble$ write$ newline$ }
+ if$
+ "\begin{thebibliography}{" longest.label * "}" * write$ newline$
+ " \providecommand{\bysame}{\leavevmode\hbox to3em{\hrulefill}\thinspace}"
+ write$ newline$
+ " \providecommand{\MR}{\relax\ifhmode\unskip\space\fi MR }"
+ write$ newline$
+ " % \MRhref is called by the amsart/book/proc definition of \MR."
+ write$ newline$
+ " \providecommand{\MRhref}[2]{%" write$ newline$
+ " \href{http://www.ams.org/mathscinet-getitem?mr=#1}{#2}"
+ write$ newline$
+ " }" write$ newline$
+ " \providecommand{\href}[2]{#2}" write$ newline$
+ " \providebibliographyfont{name}{}%" write$ newline$
+ " \providebibliographyfont{lastname}{}%" write$ newline$
+ " \providebibliographyfont{title}{\emph}%" write$ newline$
+ " \providebibliographyfont{jtitle}{\btxtitlefont}%" write$ newline$
+ " \providebibliographyfont{etal}{}%" write$ newline$
+ " \providebibliographyfont{journal}{}%" write$ newline$
+ " \providebibliographyfont{volume}{\textbf}%" write$ newline$
+ " \providebibliographyfont{ISBN}{\MakeUppercase}%" write$ newline$
+ " \providebibliographyfont{ISSN}{\MakeUppercase}%" write$ newline$
+ " \providebibliographyfont{url}{\url}%" write$ newline$
+ " \providebibliographyfont{numeral}{}%" write$ newline$
+ " \providecommand\btxprintamslanguage[1]{\ (#1)}" write$ newline$
+ " \expandafter\btxselectlanguage\expandafter {\btxfallbacklanguage}"
+ write$ newline$
+}
+
+EXECUTE {begin.bib}
+
+EXECUTE {init.state.consts}
+
+ITERATE {call.type$}
+
+FUNCTION {end.bib}
+{ newline$
+ "\end{thebibliography}" write$ newline$
+}
+
+EXECUTE {end.bib}
+%</bstams>
+% \end{macrocode}
+%
+% \Finale
+
diff --git a/biblio/bibtex/contrib/babelbib/babelbib.ins b/biblio/bibtex/contrib/babelbib/babelbib.ins
new file mode 100644
index 0000000000..a757a37e7d
--- /dev/null
+++ b/biblio/bibtex/contrib/babelbib/babelbib.ins
@@ -0,0 +1,69 @@
+\def\batchfile{babelbib.ins}
+\input docstrip.tex
+\preamble
+
+ babelbib package
+
+ Copyright 2003--2012 Harald Harders
+
+ This program can be redistributed and/or modified under the terms
+ of the LaTeX Project Public License Distributed from CTAN
+ archives in directory macros/latex/base/lppl.txt; either
+ version 1 of the License, or any later version.
+
+ harald.harders@gmx.de
+
+\endpreamble
+
+\askforoverwritefalse
+
+% Files
+%%%%%%%%%%%%%%%%%%%%%%
+\generate{%
+ \file{babelbib.sty}{\from{babelbib.dtx}{latex,package}}%
+ \file{afrikaans.bdf}{\from{babelbib.dtx}{latex,afrikaans}}%
+ \file{bahasa.bdf}{\from{babelbib.dtx}{latex,bahasa}}%
+ \file{catalan.bdf}{\from{babelbib.dtx}{latex,catalan}}%
+ \file{croatian.bdf}{\from{babelbib.dtx}{latex,croatian}}%
+ \file{czech.bdf}{\from{babelbib.dtx}{latex,czech}}%
+ \file{danish.bdf}{\from{babelbib.dtx}{latex,danish}}%
+ \file{dutch.bdf}{\from{babelbib.dtx}{latex,dutch}}%
+ \file{english.bdf}{\from{babelbib.dtx}{latex,english}}%
+ \file{esperanto.bdf}{\from{babelbib.dtx}{latex,esperanto}}%
+ \file{finnish.bdf}{\from{babelbib.dtx}{latex,finnish}}%
+ \file{french.bdf}{\from{babelbib.dtx}{latex,french}}%
+ \file{galician.bdf}{\from{babelbib.dtx}{latex,galician}}%
+ \file{german.bdf}{\from{babelbib.dtx}{latex,german}}%
+ \file{greek.bdf}{\from{babelbib.dtx}{latex,greek}}%
+ \file{italian.bdf}{\from{babelbib.dtx}{latex,italian}}%
+ \file{norsk.bdf}{\from{babelbib.dtx}{latex,norsk}}%
+ \file{portuguese.bdf}{\from{babelbib.dtx}{latex,portuguese}}%
+ \file{romanian.bdf}{\from{babelbib.dtx}{latex,romanian}}%
+ \file{russian.bdf}{\from{babelbib.dtx}{latex,russian}}%
+ \file{serbian.bdf}{\from{babelbib.dtx}{latex,serbian}}%
+ \file{spanish.bdf}{\from{babelbib.dtx}{latex,spanish}}%
+ \file{swedish.bdf}{\from{babelbib.dtx}{latex,swedish}}%
+ \usepostamble\empty
+ \file{babplain.bst}{\from{babelbib.dtx}{bst,bststd}}%
+ \file{babplain-fl.bst}{\from{babelbib.dtx}{bst,bststd,namevara}}%
+ \file{babplain-lf.bst}{\from{babelbib.dtx}{bst,bststd,namevarb}}%
+ \file{babplai3.bst}{\from{babelbib.dtx}{bst,bststd,bstthree}}%
+ \file{babplai3-fl.bst}{\from{babelbib.dtx}{bst,bststd,bstthree,namevara}}%
+ \file{babplai3-lf.bst}{\from{babelbib.dtx}{bst,bststd,bstthree,namevarb}}%
+ \file{bababbrv.bst}{\from{babelbib.dtx}{bst,bststd,bstshort}}%
+ \file{bababbrv-fl.bst}{\from{babelbib.dtx}{bst,bststd,bstshort,namevara}}%
+ \file{bababbrv-lf.bst}{\from{babelbib.dtx}{bst,bststd,bstshort,namevarb}}%
+ \file{bababbr3.bst}{\from{babelbib.dtx}{bst,bststd,bstshort,bstthree}}%
+ \file{bababbr3-fl.bst}{\from{babelbib.dtx}{bst,bststd,bstshort,bstthree,namevara}}%
+ \file{bababbr3-lf.bst}{\from{babelbib.dtx}{bst,bststd,bstshort,bstthree,namevarb}}%
+ \file{babunsrt.bst}{\from{babelbib.dtx}{bst,bststd,bstunsorted}}%
+ \file{babunsrt-fl.bst}{\from{babelbib.dtx}{bst,bststd,bstunsorted,namevara}}%
+ \file{babunsrt-lf.bst}{\from{babelbib.dtx}{bst,bststd,bstunsorted,namevarb}}%
+ \file{babalpha.bst}{\from{babelbib.dtx}{bst,bststd,bstsorted,bstalpha}}%
+ \file{babalpha-fl.bst}{\from{babelbib.dtx}{bst,bststd,bstsorted,bstalpha,namevara}}%
+ \file{babalpha-lf.bst}{\from{babelbib.dtx}{bst,bststd,bstsorted,bstalpha,namevarb}}%
+ \file{babamspl.bst}{\from{babelbib.dtx}{bst,bstams}}%
+}
+
+\Msg{* Ready}
+\endbatchfile
diff --git a/biblio/bibtex/contrib/babelbib/babelbib.pdf b/biblio/bibtex/contrib/babelbib/babelbib.pdf
new file mode 100644
index 0000000000..21c0e1a8c7
--- /dev/null
+++ b/biblio/bibtex/contrib/babelbib/babelbib.pdf
Binary files differ
diff --git a/biblio/bibtex/contrib/babelbib/babelbibtest.bib b/biblio/bibtex/contrib/babelbib/babelbibtest.bib
new file mode 100644
index 0000000000..4653c2a731
--- /dev/null
+++ b/biblio/bibtex/contrib/babelbib/babelbibtest.bib
@@ -0,0 +1,3921 @@
+@Misc{harders2005a,
+ author = {Harders, Harald},
+ title = {Homepage von Harald Harders},
+ month = jul,
+ year = 2004,
+ url = {http://www.harald-harders.de},
+ urldate = {2005-02-17},
+ language = {ngerman},
+ annote = {I do not know what I should exactly write here. Thus I
+ leave everything empty. This is written in \languagename.},
+}
+
+@Misc{harders2005b,
+ author = {Harders, Harald},
+ title = {Homepage of Harald Harders},
+ month = jul,
+ year = 2004,
+ url = {http://www.harald-harders.de/index_en.html},
+ urldate = {2005-02-17},
+ language = {english},
+ annote = {Das ist eine Anmerkung, die in deutsch gesetzt werden muss.
+ Sie wird auch in \languagename\ geschrieben.},
+ annotelanguage = {ngerman}
+}
+
+@Article{abinger1988a,
+ author = {Abinger, R. and Hammer, F. and Leopold, J. and others},
+ title = {Gro"sschaden an einem 300"=MW"=Dampfturbosatz},
+ journal = {Der Maschinenschaden},
+ year = 1988,
+ volume = 61,
+ number = 2,
+ pages = {58--60},
+ language = {ngerman},
+}
+
+
+@Article{aboav1997a,
+ author = {Aboav, D. A.},
+ title = {Foam and Polycrystal},
+ journal = {Materials characterization},
+ year = 1997,
+ volume = 39,
+ pages = {169--181},
+ issn = {1044-5803}
+}
+% language = {english},
+
+
+@Misc{akprueftechnik2000a,
+ key = {Protokoll},
+ title = {Protokoll des Arbeitskreistreffens "`Mechanische
+ Pr"uftechnik"' und "`Quantitative Gef"ugebeschreibung"' am
+ 29.\ und 30.\,03.~2000 an der TU Bergakademie Freiberg,
+ Institut f\"ur Metallkunde},
+ month = {04.\,04.},
+ year = 2000,
+ language = {ngerman}
+}
+
+@Book{altenpohl1994a,
+ author = {Altenpohl, D.},
+ title = {aluminium von innen},
+ publisher = {Aluminium"=Verlag},
+ year = 1994,
+ address = {D"usseldorf},
+ edition = 5,
+ language = {ngerman},
+ isbn = {3-87017-235-5}
+}
+
+@Book{aluminium1983a,
+ editor = {Aluminium-Zentrale},
+ title = {Aluminium-Taschenbuch},
+ publisher = {Aluminium-Verlag},
+ year = 1983,
+ address = {D"usseldorf},
+ edition = 14,
+ language = {ngerman},
+ isbn = {3-87017-169-3}
+}
+
+@Article{andrews1999a,
+ author = {Andrews, E. and Sanders, W. and Gibson, L. J.},
+ title = {Compressive and Tensile Behaviour of Aluminium Foams},
+ journal = {Materials Science and Engineering},
+ year = 1999,
+ volume = {A~270},
+ pages = {113--124},
+ language = {english}
+}
+
+@Article{andrews2001a,
+ author = {Andrews, E. W. and Gibson, L. J.},
+ title = {The Influence of Cracks, Notches and Holes on the Tensile
+ Strength of Cellular Solids},
+ journal = {Acta Materialia},
+ year = 2001,
+ volume = 49,
+ pages = {2975--2979},
+ language = {english}
+}
+
+@Article{andrews2001b,
+ author = {Andrews, E. W. and Gibson, L. J.},
+ title = {The Influence of Crack-Like Defects on the Tensile Strength
+ of an Open-Cell Aluminum Foam},
+ journal = {Scripta materialia},
+ year = 2001,
+ volume = 44,
+ pages = {1005--1010},
+ language = {english}
+}
+
+@Article{andrews2001c,
+ author = {Andrews, E. W. and Gioux, G. and Onck, P. R. and
+ Gibson, L. J.},
+ title = {Size effects in ductile cellular solids. Part~I:
+ experimental results},
+ journal = {International Journal of Mechanical Sciences},
+ year = 2001,
+ volume = 43,
+ pages = {701--713},
+ language = {english}
+}
+
+@Article{andrieux2000a,
+ author = {Andrieux, F. and Sun, D.-Z.},
+ title = {Entwicklung und Anwendung von Werkstoffmodellen zur
+ Beschreibung des Verformungs- und Versagensverhaltens von
+ Aluminiumsch"aumen},
+ journal = {Materialwissenschaft und Werkstofftechnik},
+ year = 2000,
+ volume = 31,
+ pages = {531--534},
+ language = {ngerman}
+}
+
+@InProceedings{arzt1999a,
+ author = {Arzt, M. and Brocks, W. and Mohr, R.},
+ title = {An implicit integration method for solving non-linear
+ problems in mechanics of structures under complex loading
+ histories},
+ booktitle = {Proceedings of the Ninth International Conference on
+ Computational Methods and Experimental Measurements --
+ CMEM 99},
+ pages = {371--380},
+ year = 1999,
+ editor = {Carlomagno, C. M. and Brebbia, C. A.},
+ volume = 2,
+ series = {Computational Engineering},
+ address = {Southhampton},
+ publisher = {WIT Press},
+ language = {english},
+ isbn = {1-85312-683-7}
+}
+
+@Book{ashby1980a,
+ author = {Ashby, M. F. and Jones, D. R. H.},
+ title = {Engineering Materials 1: An Introduction to their
+ Properties and Applications},
+ publisher = {Pergamon Press},
+ year = 1980,
+ address = {Oxford},
+ language = {english},
+ isbn = {0-08-026138-8}
+}
+
+@Article{ashby1983a,
+ author = {Ashby, M. F.},
+ title = {The mechanical properties of cellular solids},
+ journal = {Metallurgical Transactions},
+ year = 1983,
+ volume = {14~A},
+ pages = 1755,
+ language = {english}
+}
+
+@Book{ashby1986a,
+ author = {Ashby, M. F. and Jones, D. R. H.},
+ title = {Engineering Materials 2: An Introduction to
+ Microstructure, Processing and Design},
+ publisher = {Pergamon Press},
+ year = 1986,
+ address = {Oxford},
+ language = {english},
+ isbn = {0-08-032532-7}
+}
+
+@Book{ashby1992a,
+ author = {Ashby, M. F.},
+ title = {Materials Selection in Mechanical Design},
+ publisher = {Butterworth-Heinemann},
+ year = 1992,
+ address = {Oxford},
+ isbn = {0-7506-2727-1},
+ language = {english}
+}
+
+@Book{ashby1998a,
+ editor = {Ashby, M. F. and Evans, A. G. and Hutchinson, J. W. and
+ Fleck, N. A.},
+ title = {Metal Foams: a Design Guide},
+ publisher = {Cambridge Centre for Micromechanics},
+ year = 1998,
+ number = {Report Number CUED/C-MICROMECH/TR3},
+ language = {english}
+}
+
+@Book{ashcroft1988a,
+ author = {Ashcroft, N. W. and Mermin, N. D.},
+ title = {Solid State Physics},
+ publisher = {ITPS Thomson Learning},
+ year = 2000,
+ language = {english},
+ isbn = {0-03-083993-9}
+}
+
+@Book{askeland1996a,
+ author = {Askeland, D. R.},
+ title = {Materialwissenschaften},
+ publisher = {Spektrum Akademischer Verlag},
+ year = 1996,
+ address = {Heidelberg},
+ language = {ngerman},
+ isbn = {3-86025-357-3}
+}
+
+@InBook{astm399a,
+ editor = {Storer, R. A. and others},
+ title = {Metals Test Methods and Analytical Procedures},
+ chapter = {Standard Test Method for Plane-Strain Fracture Toughness
+ of Metallic Materials},
+ publisher = {American Society for Testing and Materials},
+ year = 1995,
+ volume = {03.01},
+ series = {1995 Annual Book of ASTM Standards},
+ address = {Philadelphia},
+ pages = {412--442},
+ language = {english},
+ isbn = {0-8031-2200-4}
+}
+
+@InBook{astm561a,
+ editor = {Storer, R. A. and others},
+ title = {Metals Test Methods and Analytical Procedures},
+ chapter = {Standard Practice for {$R$}-Curve Determination},
+ publisher = {American Society for Testing and Materials},
+ year = 1995,
+ volume = {03.01},
+ series = {1995 Annual Book of ASTM Standards},
+ address = {Philadelphia},
+ pages = {492--504},
+ language = {english},
+ isbn = {0-8031-2200-4}
+}
+
+@TechReport{aurenhammer1996a,
+ author = {Aurenhammer, F. and Klein, R.},
+ title = {Voronoi Diagrams, english, Nummer},
+ institution = {FernUniversit\"at Gesamthochschule in Hagen},
+ year = 1996,
+ number = 198,
+ month = 5,
+ language = {english}
+}
+
+@TechReport{aurenhammer1996b,
+ author = {Aurenhammer, F. and Klein, R.},
+ title = {Voronoi Diagrams, ngerman, Nummer},
+ institution = {FernUniversit\"at Gesamthochschule in Hagen},
+ year = 1996,
+ number = 198,
+ month = 5,
+ type = {Gross klein Gross klein},
+ language = {ngerman}
+}
+
+@TechReport{aurenhammer1996c,
+ author = {Aurenhammer, F. and Klein, R.},
+ title = {Voronoi Diagrams, english},
+ institution = {FernUniversit\"at Gesamthochschule in Hagen},
+ year = 1996,
+ month = may,
+ type = {Gross klein Gross klein},
+ language = {english}
+}
+
+@TechReport{aurenhammer1996d,
+ author = {Aurenhammer, F. and Klein, R.},
+ title = {Voronoi Diagrams, ngerman},
+ institution = {FernUniversit\"at Gesamthochschule in Hagen},
+ year = 1996,
+ month = 5,
+ type = {Gross klein Gross klein},
+ language = {ngerman}
+}
+
+@TechReport{aurenhammer1996e,
+ author = {Aurenhammer, F. and Klein, R.},
+ title = {Voronoi Diagrams, english},
+ institution = {FernUniversit\"at Gesamthochschule in Hagen},
+ year = 1996,
+ month = 5,
+ language = {english}
+}
+
+@TechReport{aurenhammer1996f,
+ author = {Aurenhammer, F. and Klein, R.},
+ title = {Voronoi Diagrams, ngerman},
+ institution = {FernUniversit\"at Gesamthochschule in Hagen},
+ year = 1996,
+ month = 5,
+ language = {ngerman}
+}
+
+@TechReport{aurenhammer1996g,
+ author = {Aurenhammer, F. and Klein, R.},
+ title = {Voronoi Diagrams, english, Nummer},
+ institution = {FernUniversit\"at Gesamthochschule in Hagen},
+ year = 1996,
+ month = 5,
+ number = 198,
+ language = {english}
+}
+
+@TechReport{aurenhammer1996h,
+ author = {Aurenhammer, F. and Klein, R.},
+ title = {Voronoi Diagrams, ngerman, Nummer},
+ institution = {FernUniversit\"at Gesamthochschule in Hagen},
+ year = 1996,
+ month = 5,
+ number = 198,
+ language = {ngerman}
+}
+
+@Manual{baeker1998a,
+ title = {Automatische Neuvernetzung mit ABAQUS/Standard -- Technik
+ und Anwendungen},
+ author = {B\"aker, M.},
+ organization = {Institut f\"ur Werkstoffe, Technische Universit\"at
+ Braunschweig},
+ address = {Braunschweig},
+ month = oct,
+ year = 1998,
+ language = {ngerman}
+}
+
+@Book{baeker2002a,
+ author = {B\"aker, M.},
+ title = {Numerische Methoden in der Materialwissenschaft},
+ publisher = {Fachbereich Maschinenbau der TU Braunschweig},
+ year = 2002,
+ volume = 8,
+ series = {Braunschweiger Schriften zum Maschinenbau},
+ language = {ngerman},
+ isbn = {3-936148-08-2}
+}
+
+@InCollection{baker1997a,
+ author = {Baker, A.-M. M. and Barry, C. M. F.},
+ title = {Effects of Composition, Processing, and Structure on
+ Properties of Engineering Plastics},
+ booktitle = {Materials Selection and Design},
+ pages = {434--456},
+ publisher = {ASM International},
+ year = 1997,
+ editor = {Dieter, G. E.},
+ volume = 20,
+ series = {ASM Handbook},
+ language = {english},
+ isbn = {0-87170-386-6}
+}
+
+@Article{banhart1994a,
+ author = {Banhart, J. and Baumeister, J. and Weber, M.},
+ title = {Metallschaum~-- ein Werkstoff mit Perspektiven},
+ journal = {Aluminium},
+ year = 1994,
+ volume = 70,
+ number = {3/4},
+ pages = {209--213},
+ language = {ngerman}
+}
+
+@Article{banhart1997a,
+ author = {Banhart, J. and Baumeister, J. and Weber, M.},
+ title = {Aluminium foams for transport industry},
+ journal = {Materials \&\ Design},
+ year = 1997,
+ volume = 18,
+ pages = 221,
+ language = {english}
+}
+
+@Article{banhart1997b,
+ author = {Banhart, J. and Baumeister, J.},
+ title = {Das Verformungsverhalten gesch"aumter Metalle},
+ journal = {Metall},
+ year = 1997,
+ volume = 51,
+ pages = {19--24},
+ note = {vgl.\ \cite{banhart1998a}},
+ language = {ngerman}
+}
+
+@Article{banhart1998a,
+ author = {Banhart, J. and Baumeister, J.},
+ title = {Deformation characteristics of metal foams},
+ journal = {Journal of Materials Science},
+ year = 1998,
+ volume = 33,
+ number = 6,
+ pages = {1431--1440},
+ note = {vgl.\ \cite{banhart1997b}},
+ language = {english}
+}
+
+@Article{banhart1999a,
+ author = {Banhart, J.},
+ title = {Foam Metal: The Recipe},
+ journal = {europhysics news},
+ year = 1999,
+ pages = {17--20},
+ month = {January/February},
+ language = {english}
+}
+
+@Article{banhart1999b,
+ author = {Banhart, J.},
+ title = {Offenporige Aluminiumsch"aume -- Eigenschaften und
+ Anwendungen},
+ journal = {ALUMINIUM},
+ year = 1999,
+ volume = 75,
+ number = 12,
+ language = {ngerman}
+}
+
+@Article{banhart1999c,
+ author = {Banhart, J. and Baumeister, J. and Melzer, A. and
+ Seeliger, W. and Weber, M.},
+ title = {Aluminiumschaum-Leichtbaustrukturen f\"ur den Fahrzeugbau},
+ journal = {Werkstoffe im Automobilbau},
+ year = {1998/1999},
+ language = {ngerman}
+}
+
+@Article{banhart1999d,
+ author = {Banhart, J. and Brinkers, W.},
+ title = {Fatige Behavior of Aluminum Foams},
+ journal = {Journal of Materials Science Letters},
+ year = 1999,
+ volume = 18,
+ pages = {617--619},
+ language = {english}
+}
+
+@Article{banhart2000a,
+ author = {Banhart, J.},
+ title = {Manufacturing Routes for Metallic Foams},
+ journal = {JOM},
+ year = 2000,
+ month = {December},
+ language = {english}
+}
+
+@Article{banhart2000b,
+ author = {Banhart, J.},
+ title = {Eigenschaften und Anwendungsgebiete offenporiger
+ metallischer Werkstoffe},
+ journal = {Materialwissenschaft und Werkstofftechnik},
+ year = 2000,
+ volume = 31,
+ pages = {501--504},
+ language = {ngerman}
+}
+
+@Article{banhart2001a,
+ author = {Banhart, J. and Bellmann, D. and Clemens, H.},
+ title = {Investigation of Metal Foam Formation by Microscopy and
+ Ultra Small-Angle Neutron Scattering},
+ journal = {Acta materialia},
+ year = 2001,
+ volume = 49,
+ pages = {3409--3420},
+ language = {english}
+}
+
+@Article{banhart2001b,
+ author = {Banhart, J. and Stanzick, H. and Helfen, L. and
+ Baumbach, T.},
+ title = {Metal form evolution studied by synchroton radioscopy},
+ journal = {Applied Physics Letters},
+ year = 2001,
+ volume = 78,
+ number = 8,
+ pages = {1152--1154},
+ language = {english}
+}
+
+@Article{bart-smith1998a,
+ author = {Bart-Smith, H. and Bastawros, A.-F. and Mumm,
+ D. R. and Evans, A. G. and Sypeck, D. J. and Wadley,
+ H. N. G.},
+ title = {Compressive Deformation and Yielding Mechanisms in
+ Cellular {Al} Alloys Determined Using X-Ray Tomography
+ and Surface Strain Mapping},
+ journal = {Acta Materialia},
+ year = 1998,
+ volume = 46,
+ number = 10,
+ pages = {3583--3592},
+ language = {english}
+}
+
+@InProceedings{bart-smith1998b,
+ author = {Bart-Smith, H. and Bastawros, A.-F. and Mumm, D. R. and
+ Evans, A. G. and Sypeck, D. J. and Wadley, H. N. G.},
+ title = {Compressive Deformation and Yielding Mechanisms in
+ Cellular {Al} Alloys Determined Using X-Ray Tomography and
+ Surface Strain Mapping},
+ booktitle = {Porous and Cellular Materials for Structural Applications},
+ pages = {71--81},
+ year = 1998,
+ editor = {Schwartz, D. S. and Shih, D. S. and Evans, A. G. and
+ Wadley, H. N. G.},
+ volume = 521,
+ series = {Symposium Proceedings},
+ address = {Warrendale, Pennsylvania},
+ month = {April},
+ publisher = {Materials Research Society},
+ language = {english}
+}
+
+@Article{bastawros2000a,
+ author = {Bastawros, A.-F. and Bart-Smith, H. and Evans, A. G.},
+ title = {Experimental Analysis of Deformation Mechanisms in a
+ Closed-Cell Aluminium Alloy Foam},
+ journal = {Journal of the Mechanics and Physics of Solids},
+ year = 2000,
+ volume = 48,
+ pages = {301--322},
+ language = {english}
+}
+
+@InProceedings{baumeister1997a,
+ author = {Baumeister, J.},
+ title = {"Uberblick: Verfahren zur Herstellung von
+ Metallsch"aumen},
+ booktitle = {Metallsch"aume (Beitr"age zum Symposium Metallsch"aume,
+ IFAM, Bremen, 06.~--~07. 03.~1997)},
+ pages = 3,
+ year = 1997,
+ address = {Bremen},
+ publisher = {Verlag MIT Bremen},
+ language = {ngerman}
+}
+
+@Article{beals1997a,
+ author = {Beals, J. T. and Thompson, M. S.},
+ title = {Density gradient effects on aluminium foam
+ compression behavior},
+ journal = {Journal of Materials Science},
+ year = 1997,
+ volume = 32,
+ pages = 3595,
+ language = {english}
+}
+
+@Book{becker1975a,
+ author = {Becker, E. and B"urger, W.},
+ title = {Kontinuumsmechanik},
+ publisher = {B.\,G.\ Teubner},
+ year = 1975,
+ volume = 20,
+ series = {Leitf"aden der angewandten Mathematik und Mechanik},
+ address = {Stuttgart},
+ language = {ngerman},
+ isbn = {3-519-02319-9}
+}
+
+@InProceedings{begley1971a,
+ author = {Begley, J. A. and Landes, J. D.},
+ title = {The {$J$} Integral as a Fracture Criterion},
+ booktitle = {Fracture Toughness. Proceedings of the 1971 National
+ Symposium on Fracture Mechanics},
+ pages = {1--20},
+ year = 1971,
+ volume = {Part~II},
+ address = {Philadelphia},
+ organization = {American Society for Testing and Materials},
+ language = {english}
+}
+
+@Book{begley1973a,
+ author = {Begley, J. A.},
+ title = {An estimation model for the application of the {$J$}
+ integral},
+ publisher = {Pa.\ \&\ Scientific papers},
+ year = 1973,
+ address = {Pittsburgh},
+ language = {english}
+}
+
+@Book{beiser1983a,
+ author = {Beiser, A.},
+ title = {Atome, Molek"ule, Festk"orper},
+ publisher = {Vieweg Verlag},
+ year = 1983,
+ address = {Braunschweig},
+ language = {ngerman},
+ isbn = {3-528-08459-6}
+}
+
+@Unpublished{bergmann1997a,
+ author = {Bergmann, D. and Galanulis, K.},
+ title = {Zum Einsatz der optischen Feldme"stechnik in der
+ Bruchmechanik},
+ year = 1997,
+ language = {ngerman}
+}
+
+@Book{bergmann2000a,
+ author = {Bergmann, W.},
+ title = {Werkstofftechnik, Teil 1: Grundlagen},
+ publisher = {Hanser},
+ year = 2000,
+ edition = 3,
+ language = {ngerman},
+ isbn = {3-446-21409-7}
+}
+
+@Unpublished{bergmanna,
+ author = {Bergmann, D.},
+ title = {3D Deformation Measurement in small Areas based on
+ Grating Method and Photogrammetry},
+ language = {english}
+}
+
+@Unpublished{bergmannb,
+ author = {Bergmann, D. and Reich, C. and Ritter, R.},
+ title = {Experimentelle Untersuchungen zum Vergleich mit
+ Modellrechnungen bei der Aufstellung von Kriterien der
+ Flie"sbruchmechanik},
+ language = {ngerman}
+}
+
+@Article{bernard2002a,
+ author = {Bernard, T. and Zoch, H.-W.},
+ title = {Aluminiumsch"aume -- Eigenschaften und Einsetzbarkeit},
+ journal = {H"arterreitechnische Mitteilungen (HTM)},
+ year = 2002,
+ volume = 57,
+ number = 5,
+ pages = {308--315},
+ language = {ngerman}
+}
+
+@Book{betten1993a,
+ author = {Betten, J.},
+ title = {Kontinuumsmechanik},
+ publisher = {Springer"=Verlag},
+ year = 1993,
+ address = {Berlin},
+ language = {ngerman},
+ isbn = {3-540-56646-5}
+}
+
+@Book{blumenauer1993a,
+ author = {Blumenauer, H. and Pusch, G.},
+ title = {Technische Bruchmechanik},
+ publisher = {Deutscher Verlag f\"ur Grundstoffindustrie},
+ year = 1993,
+ address = {Stuttgart},
+ language = {ngerman},
+ isbn = {3-342-00659-5}
+}
+
+@Article{boehm2000a,
+ author = {B"ohm, H. and Ismar, H. and Schmitt, J.},
+ title = {Flie"sfl"ache metallischer Sch"aume},
+ journal = {Materialwissenschaft und Werkstofftechnik},
+ year = 2000,
+ volume = 31,
+ pages = {21--23},
+ language = {ngerman}
+}
+
+@InProceedings{boellinghaus2000a,
+ author = {B"ollinghaus, T. and von Hagen, H. and Bleck, W.},
+ title = {Erm"udung von Sandwichverbunden aus
+ Aluminiumschaum mit Stahldeckblechen},
+ booktitle = {Metallsch"aume},
+ pages = {488--492},
+ year = 2000,
+ editor = {Degischer, H. P.},
+ publisher = {Wiley-VCH},
+ language = {ngerman}
+}
+
+@Article{boellinghaus2000b,
+ author = {B"ollinghaus, T. and von Hagen, H. and Bleck, W.},
+ title = {Erm"udung von Sandwichverbunden aus Aluminiumschaum mit
+ Stahldeckblechen},
+ journal = {Materialwissenschaft und Werkstofftechnik},
+ year = 2000,
+ volume = 31,
+ pages = {488--492},
+ language = {ngerman}
+}
+
+@Article{boellinghaus2000c,
+ author = {B\"ollinghaus, T. and von Hagen, H. and Bleck, W.},
+ title = {Laserstrahlschwei\ss{}en von sch\"aumbarem
+ Aluminiumhalbzeug},
+ journal = {UTF science},
+ year = 2000,
+ volume = {II},
+ pages = {23--26},
+ language = {ngerman}
+}
+
+@InProceedings{bramfitt1994a,
+ author = {Bramfitt, J. E. and Hess, R. L.},
+ title = {A Novel Heat Activated Recoverable Temporary Stent
+ (Hearts System)},
+ booktitle = {Proceedings of SMST-94},
+ pages = {435--442},
+ year = 1994,
+ address = {California},
+ language = {english}
+}
+
+@Article{braune2000a,
+ author = {Braune, R. and Otto, A.},
+ title = {Tailored Blanking mit Kernverbunden aus aufsch\"aumbarem
+ Aluminiumhalbzeug},
+ journal = {Materialwissenschaft und Werkstofftechnik},
+ year = 2000,
+ volume = 31,
+ pages = {562--565},
+ language = {ngerman}
+}
+
+@Book{bronstein1993a,
+ author = {Bron\v{s}tein, I. N. and Semendjaev, K. A. and Musiaol, G.
+ and M"uhlig, H.},
+ title = {Taschenbuch der Mathematik},
+ publisher = {Verlag Harri Deutsch},
+ year = 1993,
+ address = {Thun},
+ edition = 1,
+ language = {ngerman},
+ isbn = {3-8171-2001-X}
+}
+
+@Article{bross1998a,
+ author = {Bross, S. and Steck E.},
+ title = {Simulation of selforganised dislocation structures in
+ b.c.c. single crystals},
+ journal = {Computational Materials Science},
+ year = 1998,
+ volume = 13,
+ pages = {16--22},
+ language = {english}
+}
+
+@Article{buengener2000a,
+ author = {B\"ungener, N. and Sch\"one, A. and Fritsching, U.},
+ title = {Zum kontinuierlichen thermisch-chemischen Aufsch\"aumen
+ uns Ausbringen von Aluminium und Aluminiumlegierungen},
+ journal = {Materialwissenschaft und Werkstofftechnik},
+ year = 2000,
+ volume = 31,
+ pages = {535--537},
+ language = {ngerman}
+}
+
+@Book{buergel1998a,
+ author = {B"urgel, R.},
+ title = {Handbuch Hochtemperatur"=Werkstofftechnik},
+ publisher = {Vieweg Verlag},
+ year = 1998,
+ address = {Braunschweig},
+ language = {ngerman},
+ isbn = {3-528-03107-7}
+}
+
+@Book{callister2000a,
+ author = {Callister, W. D.},
+ title = {Materials Science and Engineering},
+ publisher = {Wiley \&\ Sons},
+ year = 2000,
+ edition = 5,
+ language = {english},
+ isbn = {0-471-32013-7}
+}
+
+@Book{chawla1993a,
+ author = {Chawla, K. K.},
+ title = {Ceramic Matrix Composites},
+ publisher = {Chapman \&\ Hall},
+ year = 1993,
+ address = {London},
+ edition = 1,
+ language = {english},
+ isbn = {0-412-36740-8}
+}
+
+@InCollection{clements1988a,
+ author = {Clements, L. L.},
+ title = {Polymer Science for Engineers},
+ booktitle = {Engineering Plastics},
+ pages = {48--62},
+ publisher = {ASM International},
+ year = 1988,
+ editor = {Epel, J. N.},
+ volume = 2,
+ series = {Engineered Materials Handbook},
+ language = {english},
+ isbn = {0-87170-279-7}
+}
+
+@InProceedings{cordes2000a,
+ author = {Cordes, M. and Bardenheier, R.},
+ title = {Hochgeschwindigkeitsversuche und Crashsimulation},
+ booktitle = {Vortr\"age der Tagung Werkstoffpr\"ufung 2000},
+ year = 2000,
+ address = {Bad Nauheim},
+ month = {Dezember},
+ organization = {Deutscher Verband f\"ur Materialforschung und -pr\"ufung},
+ language = {ngerman},
+ note = {Nicht im Tagungsband enthalten}
+}
+
+@Book{cottrell1956a,
+ author = {Cottrell, A. H.},
+ title = {Dislocations and plastic flow in crystals},
+ publisher = {Clarendon Press},
+ address = {Oxford},
+ year = 1965,
+ language = {english}
+}
+
+@Book{courtney1990a,
+ author = {Courtney, T. H.},
+ title = {Mechanical Behaviour of Materials},
+ publisher = {McGraw-Hill},
+ year = 1990,
+ address = {New York},
+ language = {english},
+ isbn = {0-07-013265-8}
+}
+
+@Article{davies1983a,
+ author = {Davies, G. J. and Zhen, Shu},
+ title = {Metallic foams: their production, properties and
+ applications},
+ journal = {Journal of Materials Science},
+ year = 1983,
+ volume = 18,
+ pages = {1899--1911},
+ language = {english}
+}
+
+@Book{davis1994a,
+ editor = {Davis, J. R.},
+ title = {Stainless Steels},
+ publisher = {ASM International},
+ year = 1994,
+ series = {ASM Specialty Handbook},
+ language = {english},
+ isbn = {0-87170-503-6}
+}
+
+@Article{daxner2000a,
+ author = {Daxner, T. and B\"ohm, H. J. and Ramerstorfer, F. G. and
+ Denzer, R. and Maier, M.},
+ title = {Simulation des elasto-plastischen Verhaltens von
+ Metallschaum mit Hilfe von 2D und 3D Einheits-Modellen},
+ journal = {Materialwissenschaft und Werkstofftechnik},
+ year = 2000,
+ volume = 31,
+ pages = {447--450},
+ language = {ngerman}
+}
+
+@Article{degischer1997a,
+ author = {Degischer, H. P.},
+ title = {Innovative light metals: metal matrix composites
+ and foamed aluminium},
+ journal = {Materials \& Design},
+ year = 1997,
+ volume = 18,
+ pages = 221,
+ language = {english}
+}
+
+@InProceedings{degischer1997b,
+ author = {Degischer, H. P. and Galovsky, U. and Gradinger,
+ R. and Kretz, R. and Simanc\'ik, F.},
+ title = {\"Uber mechanische Eigenschaften von
+ Aluminiumsch"aumen},
+ booktitle = {Metallsch"aume (Beitr"age zum Symposium Metallsch"aume,
+ IFAM, Bremen, 06.~--~07. 03.~1997},
+ pages = 79,
+ year = 1997,
+ editor = {Banhart, J.},
+ publisher = {Verlag MIT Bremen},
+ language = {ngerman}
+}
+
+@Article{deshpande2001a,
+ author = {Deshpande, V. S. and Ashby, M. F. and Fleck, N. A.},
+ title = {Foam Topology Bending Versus Stretching Dominated
+ Architectures},
+ journal = {Acter Materialia},
+ year = 2001,
+ volume = 49,
+ pages = {1035--1040},
+ language = {english}
+}
+
+@Article{deshpande2001b,
+ author = {Deshpande, V. S. and Fleck, N. A.},
+ title = {Multi-Axial Yield Behaviour of Polymer Foams},
+ journal = {Acter materialia},
+ year = 2001,
+ volume = 49,
+ pages = {1859--1866},
+ language = {english}
+}
+
+@Misc{dfgdaempfung2000a,
+ key = {Arbeitsbericht},
+ title = {Arbeitsbericht zum DFG-Vorhaben SI~408/5-1 \quotedblbase
+ Mechanische D\"ampfung metallischer
+ Sch\"aume\textquotedblleft\
+ im DFG-Schwerpunktprogramm SPP~1075},
+ year = 2000,
+ language = {ngerman}
+}
+
+@Book{dieter1986a,
+ author = {Dieter, G. E.},
+ title = {Mechanical Metallurgy},
+ publisher = {McGraw-Hill},
+ year = 1988,
+ address = {New York},
+ language = {english},
+ isbn = {0-07-100406-8}
+}
+
+@Book{dieter1988a,
+ author = {Dieter, G. E.},
+ title = {Mechanical Metallurgy},
+ publisher = {McGraw-Hill},
+ year = 1988,
+ address = {London},
+ language = {english},
+ isbn = {0-07-100406-8}
+}
+
+@Book{dieter1995a,
+ editor = {Dieter, G.},
+ title = {Mechanical Metallurgy},
+ publisher = {McGraw-Hill},
+ year = 1995,
+ language = {english}
+}
+
+@Book{domininghaus1998a,
+ author = {Domininghaus, H.},
+ title = {Die Kunststoffe und ihre Eigenschaften},
+ publisher = {Springer"=Verlag},
+ year = 1998,
+ address = {Berlin},
+ edition = 5,
+ language = {ngerman},
+ isbn = {3-540-62659-X}
+}
+
+@Book{domke1994a,
+ author = {Domke, W.},
+ title = {Werkstoffkunde und Werkstoffpr"ufung},
+ publisher = {Cornelsen Verlag},
+ year = 1994,
+ address = {Berlin},
+ edition = 10,
+ language = {ngerman},
+ isbn = {3-590-81220-6},
+}
+
+@Article{duarte2000a,
+ author = {Duarte, I. and Banhart, J.},
+ title = {A Study of Aluminium Foam Formation---Kinetics and
+ Microstructure},
+ journal = {Acta materialia},
+ year = 2000,
+ volume = 48,
+ pages = {2349--2362},
+ language = {english}
+}
+
+@Book{dubbel1990a,
+ editor = {Beitz, W. and Grote, K.-H.},
+ title = {Dubbel~-- Taschenbuch f\"ur den Maschinenbau},
+ publisher = {Springer"=Verlag},
+ year = 2001,
+ address = {Berlin},
+ edition = 20,
+ isbn = {3-540-67777-1},
+ language = {ngerman}
+}
+
+@Article{ehlers1999a,
+ author = {Ehlers, W. and Droste, A.},
+ title = {A Continuum Model for Highly Porous Aluminium Foam},
+ journal = {Technische Mechanik},
+ year = 1999,
+ volume = 19,
+ number = 4,
+ pages = {341--350},
+ language = {english}
+}
+
+@Book{ehrenstein1999a,
+ author = {Ehrenstein, G. W.},
+ title = {Polymer-Werkstoffe},
+ publisher = {Hanser Verlag},
+ year = 1999,
+ address = {M"unchen},
+ edition = 2,
+ language = {ngerman},
+ isbn = {3-446-21161-6}
+}
+
+@InProceedings{elmoutaouakkail2001a,
+ author = {Elmoutaouakkail, A. and Salvo, L. and Maire, E. and
+ Peix, G.},
+ title = {{2D} and {3D} characterisation of metal foams using
+ {X}-ray tomography},
+ booktitle = {Cellular Metals and Metal Foaming Technology},
+ pages = {245--250},
+ year = 2001,
+ editor = {Banhart, J. and Ashby, M. F. and Fleck, N. A.},
+ address = {Bremen},
+ publisher = {Verlag MIT Publishing},
+ language = {english},
+ isbn = {3-935538-11-1}
+}
+
+@Article{erbe1994a,
+ author = {Erbe, M. and Galanulis, K. and Ritter, R. and Steck, E.},
+ title = {Theoretical and Experimental Investigations of Fracture
+ by Finite Element and Grating Methods},
+ journal = {Engineering Fracture Mechanics},
+ year = 1994,
+ volume = 48,
+ number = 1,
+ pages = {103-118},
+ language = {english}
+}
+
+@Book{erhard1993a,
+ author = {Erhard, G.},
+ title = {Konstruieren mit Kunststoffen},
+ publisher = {Carl-Hanser-Verlag},
+ year = 1993,
+ address = {M"unchen},
+ language = {ngerman},
+ isbn = {3-446-17397-8}
+}
+
+@Article{fatima2001a,
+ author = {F\'atima Vaz, M. and Fortes, M. A.},
+ title = {Simulation of cell collapse in the compression of
+ non-uniform cellular solids},
+ journal = {Scripta Materialia},
+ year = 2001,
+ volume = 45,
+ pages = {375--382},
+ language = {english}
+}
+
+@InProceedings{fazekas2001a,
+ author = {Fazekas, A. and Dendievel, R. and Salvo, L. and
+ Br\'echet, Y.},
+ title = {Influence of microstructural dispersions on the effective
+ properties of cellular solids},
+ booktitle = {Cellular Metals and Metal Foaming Technology},
+ pages = {259--264},
+ year = 2001,
+ editor = {Banhart, J. and Ashby, M. F. and Fleck, N. A.},
+ address = {Bremen},
+ publisher = {Verlag MIT Publishing},
+ language = {english},
+ isbn = {3-935538-11-1}
+}
+
+@Article{feith2000a,
+ author = {Feith, G.},
+ title = {Schaumteile als Dauerkerne in Gu"steilen},
+ journal = {Materialwissenschaft und Werkstofftechnik},
+ year = 2000,
+ volume = 31,
+ pages = {407--408},
+ language = {ngerman}
+}
+
+@Book{feynman1989a,
+ author = {Feynman, R. P. and Leighton, R. B. and Sands, M.},
+ title = {The Feynman Lectures on Physics, Vol~I, II \&\ III},
+ publisher = {Pearson Higher Education},
+ year = 1989,
+ language = {english},
+ isbn = {0-201-50064-7}
+}
+
+@Article{foroughi2000a,
+ author = {Foroughi, B. and Kriszt, B. and Degischer, H. P.},
+ title = {Simulation des Verformungsverhaltens von por\"osen
+ Metallen},
+ journal = {Materialwissenschaft und Werkstofftechnik},
+ year = 2000,
+ volume = 31,
+ pages = {451--454},
+ language = {ngerman}
+}
+
+@InProceedings{foroughi2001a,
+ author = {Foroughi, B. and Kriszt, B. and Degischer, H. P.},
+ title = {Modelling of mechanical properties of inhomogeneous cellular
+ materials},
+ booktitle = {Cellular Metals and Metal Foaming Technology},
+ pages = {265--268},
+ year = 2001,
+ editor = {Banhart, J. and Ashby, M. F. and Fleck, N. A.},
+ address = {Bremen},
+ publisher = {Verlag MIT Publishing},
+ language = {english},
+ isbn = {3-935538-11-1}
+}
+
+@Book{frost1982a,
+ author = {Frost, H. J. and Ashby, M. F.},
+ title = {Deformation-Mechanism Maps},
+ publisher = {Pergamon Press},
+ year = 1982,
+ edition = 1,
+ language = {english},
+ isbn = {0-08-029338-7}
+}
+
+@Book{fujita1998a,
+ editor = {Fujita, F. E.},
+ title = {Physics of New Materials},
+ publisher = {Springer-Verlag},
+ year = 1998,
+ volume = 27,
+ series = {Springer Series in Materials Science},
+ address = {Berlin},
+ edition = 2,
+ language = {english},
+ isbn = {3-540-64143-2}
+}
+
+@InProceedings{galanulis1999a,
+ author = {Galanulis, K. and Hofmann, A.},
+ title = {Determination of Forming Limit Diagrams Using an Optical
+ Measurement System},
+ booktitle = {Sheet Metal 1999},
+ year = 1999,
+ editor = {Geiger, M. and Kals, H. J. J. and Shirvani, B. and
+ Singh, U. P.},
+ address = {Erlangen},
+ month = {September},
+ language = {english},
+ isbn = {3-87525-110-5}
+}
+
+@Article{galovsky2000a,
+ author = {Galovsky, U.},
+ title = {Bestimmung von Bruchz\"ahigkeitswerten bei
+ Schaumaluminium},
+ journal = {Materialwissenschaft und Werkstofftechnik},
+ year = 2000,
+ volume = 31,
+ pages = {578--580},
+ language = {ngerman}
+}
+
+@Article{gent1963a,
+ author = {Gent, A. N. and Thomas, A. G.},
+ title = {Mechanics of Foamed Elastic Materials},
+ journal = {Rubber Chemistry and Technology},
+ year = 1963,
+ volume = 36,
+ pages = {597--610},
+ language = {english}
+}
+
+@InProceedings{gent1963b,
+ author = {Gent, A. N. and Thomas, A. G.},
+ title = {Mechanics of Foamed Elastic Materials},
+ booktitle = {Proceedings of the 7th Annual Technical Conference of the
+ Cellular Plastics Division},
+ year = 1963,
+ address = {New York},
+ organization = {Society of the Plastics Industry},
+ language = {english}
+}
+
+@Article{gers2000a,
+ author = {Gers, H. and Brungs, D. and Nijhof, K. and Baumg\"artner, F.
+ and M\"aurer, H.-J.},
+ title = {Pulvermetallurgische Fertigung von Bauteilen aus
+ Aluminiumschaum},
+ journal = {Materialwissenschaft und Werkstofftechnik},
+ year = 2000,
+ volume = 31,
+ pages = {403--406},
+ language = {ngerman}
+}
+
+@InProceedings{giamei1997a,
+ author = {Giamei, A.},
+ title = {Aero-Engine and Naval Applications for Ultra-Lightweight
+ Metals},
+ booktitle = {Proceedings of the Fraunhofer USA Metal Foam Symposium},
+ pages = {63--78},
+ year = 1997,
+ address = {Bremen (Germany)},
+ publisher = {MIT-Verlag},
+ language = {english}
+}
+
+@Article{gibson1982a,
+ author = {Gibson, L. J. and Ashby, M. F.},
+ title = {The Mechanics of Three-Dimensional Cellular Materials},
+ journal = {Proceedings of the Royal Society of London},
+ year = 1982,
+ volume = {A~382},
+ pages = {43--59},
+ language = {english}
+}
+
+@Article{gibson1982b,
+ author = {Gibson, L. J. and Ashby, M. F. and Schajer, G. S. and
+ Robertson, C. I.},
+ title = {The mechanics of two-dimensional cellular materials},
+ journal = {Proceedings of the Royal Society of London},
+ year = 1982,
+ volume = {A~382},
+ pages = {25--42},
+ language = {english}
+}
+
+@Article{gibson1989a,
+ author = {Gibson, L. J.},
+ title = {Modelling the mechanical behaviour of cellular
+ materials},
+ journal = {Materials Science and Engineering},
+ year = 1989,
+ volume = {A~110},
+ pages = 1,
+ language = {english}
+}
+
+@Book{gibson1997a,
+ author = {Gibson, L. J. and Ashby, M. F.},
+ title = {Cellular solids},
+ publisher = {Cambridge University Press},
+ year = 1997,
+ edition = {2nd},
+ language = {english}
+}
+
+@Article{gioux2000a,
+ author = {Gioux, G. and McCormack, T. M. and Gibson, L. J.},
+ title = {Failure of aluminum foams under multiaxial loads},
+ journal = {International Journal of Mechanical Sciences},
+ year = 2000,
+ volume = 42,
+ pages = {1097--1117},
+ language = {english}
+}
+
+@InProceedings{golovin2000a,
+ author = {Golovin, I. S. and Sinning, H.-R.},
+ title = {Damping of Some Aluminium Foams at Low Amplitudes},
+ booktitle = {MS-2, Poland, 2-8 December 2000, Solid State Phenomena},
+ year = 2000,
+ language = {english}
+}
+
+@InProceedings{golovin2000b,
+ author = {Golovin, I. S. and Sinning, H.-R.},
+ title = {Low-amplitude Mechanical Damping of Some Aluminium Foams},
+ booktitle = {Materials Week},
+ year = 2000,
+ address = {Munich},
+ month = {October},
+ language = {english}
+}
+
+@InProceedings{golovin2000c,
+ author = {Golovin, I. S. and Sinning, H.-R. and G\"oken, J. and
+ Riehemann, W.},
+ title = {Amplitude Dependent Damping of Some Metallic Foams},
+ booktitle = {2nd Mechanical Spectroscopy School},
+ year = 2000,
+ address = {Krakow, Poland},
+ month = {December},
+ language = {english}
+}
+
+@Book{gottstein1998a,
+ author = {Gottstein, G.},
+ title = {Physikalische Grundlagen der Materialkunde},
+ publisher = {Springer"=Verlag},
+ year = 1998,
+ address = {Berlin},
+ language = {ngerman},
+ isbn = {3-540-62670-0}
+}
+
+@InCollection{greenhut1997a,
+ author = {Greenhug, V. A.},
+ title = {Effects of Composition, Processing, and Structure on
+ Properties of Ceramics and Glasses},
+ booktitle = {Materials Selection and Design},
+ pages = {416--433},
+ publisher = {ASM International},
+ year = 1997,
+ editor = {Dieter, G. E.},
+ volume = 20,
+ series = {ASM Handbook},
+ language = {english},
+ isbn = {0-87170-386-6}
+}
+
+@Article{grenestedt2000a,
+ author = {Grenestedt, J. L.},
+ title = {Influence of Cell Wall Wiggles on Stiffness of Cellular
+ Solids},
+ journal = {International Journal of Mechanical Sciences},
+ year = 2000,
+ volume = 42,
+ number = 7,
+ pages = {1327--1338},
+ language = {english},
+}
+
+@Article{grenestedt2000b,
+ author = {Grenestedt, J. L. and Bassinet, F.},
+ title = {Influence of Cell Wall Thickness Variations on Elastic
+ Stiffness of Closed-Cell Cellular Solids},
+ journal = {International Journal of Mechanical Sciences},
+ year = 2000,
+ volume = 42,
+ pages = {1327--1338},
+ language = {english}
+}
+
+@Book{gross2001a,
+ author = {Gross, D. and Seelig, T.},
+ title = {Bruchmechanik mit einer Einf"uhrung in die Mikromechanik},
+ publisher = {Springer"=Verlag},
+ address = {Berlin},
+ year = 2001,
+ edition = 3,
+ language = {ngerman},
+ isbn = {3-540-42203-X}
+}
+
+@Article{grote2000a,
+ author = {Grote, F. and Stemmler, M. and Kaesberg, S.},
+ title = {\"Ubertragung realer zellularer Strukturen auf
+ 3D-FEM-Modell -- Methoden und Potential},
+ journal = {Materialwissenschaft und Werkstofftechnik},
+ year = 2000,
+ volume = 31,
+ pages = {455--458},
+ language = {ngerman}
+}
+
+@Book{guy1970a,
+ author = {Guy, A. G.},
+ title = {Metallkunde f\"ur Ingenieure},
+ publisher = {Akademische Verlagsgesellschaft},
+ year = 1970,
+ volume = 7,
+ series = {Technisch-physikalische Sammlung},
+ address = {Frankfurt am Main},
+ language = {ngerman}
+}
+
+@Article{haag2003a,
+ author = {Haag, M. and Wanner, A. and Clemens, H. and Zhang, P. and
+ Kraft, O. and Arzt, E.},
+ title = {Creep of Aluminium-Based Closed-Cell Foams},
+ journal = {Acta Materialia},
+ year = 2003,
+ note = {Submitted to Acta Materialia},
+ language = {english}
+}
+
+@Article{haberling2000a,
+ author = {Haberling, C. and Haldenwanger, H.-G.},
+ title = {Leichtbau durch lokales Aussteifen von Strukturbauteilen
+ im PKW-Bau},
+ journal = {Materialwissenschaft und Werkstofftechnik},
+ year = 2000,
+ volume = 31,
+ pages = {505--510},
+ language = {ngerman}
+}
+
+@InProceedings{hagen1998a,
+ author = {von Hagen, H. and Bleck, W.},
+ title = {Compressive, Tensile and Shear Testing of Melt-Foamed
+ Aluminium},
+ booktitle = {Porous and Cellular Materials for Structural Applications},
+ pages = {59--64},
+ year = 1998,
+ editor = {Schwartz, D. S. and Shih, D. S. and Evans, A. G. and
+ Wadley, H. N. G.},
+ volume = 521,
+ series = {Symposium Proceedings},
+ address = {Warrendale, Pennsylvania},
+ month = {April},
+ publisher = {Materials Research Society},
+ language = {english}
+}
+
+@Article{hahn2000a,
+ author = {Hahn, M. and Otto, A.},
+ title = {Hochtemperatur-Umformung von zellularem Aluminium},
+ journal = {Materialwissenschaft und Werkstofftechnik},
+ year = 2000,
+ volume = 31,
+ pages = {432--435},
+ language = {ngerman}
+}
+
+@PhdThesis{harder1997a,
+ author = {Harder, J.},
+ title = {Simulation lokaler Flie"svorg"ange in Polykristallen},
+ school = {Mechanik"=Zentrum, TU Braunschweig},
+ year = 1997,
+ language = {ngerman},
+ isbn = {3-920395-27-1}
+}
+
+@Article{harder1999a,
+ author = {Harder, J.},
+ title = {A crystallographic model for the study of local deformation
+ processes in polycrystals},
+ journal = {International Journal of Plasticity},
+ year = 1999,
+ volume = 15,
+ pages = {605--624},
+ language = {english},
+ issn = {0749-6419}
+}
+
+@TechReport{harders1999a,
+ author = {Harders, Harald and Wei\ss{}, Susanne and Thielecke, Frank},
+ title = {Verwendung des datengest\"utzten Systemidentifizierungstools
+ RAPID zur fehlertoleranten Modellierung des
+ Luftdatensystems FADS},
+ institution = {Institut f\"ur Flugmechanik, Deutsches Zentrum f\"ur Luft-
+ und Raumfahrt e.\,V.},
+ year = 1999,
+ number = {Institutsbericht IB 111-1999/25},
+ address = {Braunschweig},
+ language = {ngerman}
+}
+
+@InProceedings{harders2000a,
+ author = {Harders, Harald and R\"osler, Joachim and Hupfer, Knut},
+ title = {Schwingfestigkeitsversuche an Aluminiumschaum},
+ booktitle = {Vortr\"age der Tagung Werkstoffpr\"ufung 2000},
+ pages = {241--246},
+ year = 2000,
+ address = {Bad Nauheim},
+ month = {Dezember},
+ organization = {Deutscher Verband f\"ur Materialforschung und -pr\"ufung},
+ language = {ngerman}
+}
+
+@InProceedings{harders2001a,
+ author = {Harders, Harald and R\"osler, Joachim and Hupfer, Knut and
+ Steck, Elmar},
+ title = {Experimental Studies and Simulations of the Fatigue
+ Behaviour of Metal Foams},
+ booktitle = {Cellular Metals and Metal Foaming Technology},
+ pages = {317--322},
+ year = 2001,
+ editor = {Banhart, J. and Ashby, M. F. and Fleck, N. A.},
+ address = {Bremen (Germany)},
+ publisher = {MIT-Verlag},
+ language = {english}
+}
+
+@Article{harte1999a,
+ author = {Harte, A.-M. and Fleck, N. A. and Ashby, M. F.},
+ title = {Fatigue failure of an open cell and a closed cell
+ aluminium alloy foam},
+ journal = {Acta Materialia},
+ year = 1999,
+ volume = 47,
+ number = 8,
+ pages = {2511--2524},
+ language = {english},
+ issn = {1359-6454}
+}
+
+@Article{herrmann1997a,
+ author = {Herrmann, K. P.},
+ title = {Ri"sausbreitungsvorg\"ange in thermomechanisch belasteten
+ Zweikomponentenmedien: Analysis und Experiment},
+ journal = {Zeitschrift f\"ur angewandte Mathematik und Mechanik (ZAMM)},
+ year = 1997,
+ volume = 77,
+ number = 3,
+ pages = {163--188},
+ language = {ngerman}
+}
+
+@Book{hill1950a,
+ author = {Hill, R.},
+ title = {The Mathematical Theory of Plasticity},
+ publisher = {Oxford University Press},
+ year = 1998,
+ address = {Oxford},
+ language = {english},
+ isbn = {0-19-850367-9}
+}
+
+@Article{hipke2000a,
+ author = {Hipke, T. and Wunderlich, T.},
+ title = {Chancen und Hemmnisse f\"ur den Metallschaumeinsatz},
+ journal = {Materialwissenschaft und Werkstofftechnik},
+ year = 2000,
+ volume = 31,
+ pages = {396--399},
+ language = {ngerman}
+}
+
+@Article{hoenscheidt2000a,
+ author = {H\"ohnscheidt, W.},
+ title = {Aluminium-Schaum-Strukturen bald serienreif f\"ur den Pkw},
+ journal = {VDI nachrichten},
+ year = 2000,
+ volume = 34,
+ pages = {18--19},
+ month = {August},
+ language = {ngerman}
+}
+
+@Book{holzapfel2000a,
+ author = {Holzapfel, G. A.},
+ title = {Nonlinear Solid Mechanics},
+ publisher = {John Wiley \&\ Sons},
+ year = 2000,
+ address = {Chichester},
+ language = {english},
+ isbn = {0-471-82319-8}
+}
+
+@Book{honeycombe2000a,
+ author = {Honeycombe, R. W. K.},
+ title = {Steels~-- Microstructure and Properties},
+ publisher = {Edward Arnold},
+ year = 2000,
+ address = {London},
+ language = {english},
+ isbn = {0-7131-2793-7}
+}
+
+@book{hornbogen1983a,
+ author = {Hornbogen, E.},
+ title = {Werkstoffe},
+ publisher = {Springer"=Verlag},
+ year = 1994,
+ address = {Berlin},
+ edition = 6,
+ language = {ngerman},
+ isbn = {3-540-57325-9}
+}
+
+@Book{hoser1996a,
+ author = {Ohser, J. and Lorz, U.},
+ title = {Quantitative Gef\"ugeanalyse: theoretische Grundlagen und
+ Anwendungen},
+ publisher = {TU Bergakademie Freiberg},
+ year = 1996,
+ volume = {B~276},
+ series = {Freiberger Forschungshefte},
+ address = {Freiberg},
+ edition = 2,
+ language = {ngerman},
+ isbn = {3-86012-025-5}
+}
+
+@InProceedings{huang1998a,
+ author = {Huang, J. S. and Lin, J. Y.},
+ title = {Modeling of Fatigue for Cellular Materials},
+ booktitle = {Porous and Cellular Materials for Structural Applications},
+ pages = {27--32},
+ year = 1998,
+ editor = {Schwartz, D. S. and Shih, D. S. and Evans, A. G. and
+ Wadley, H. N. G.},
+ volume = 521,
+ series = {Symposium Proceedings},
+ address = {Warrendale, Pennsylvania},
+ month = {April},
+ publisher = {Materials Research Society},
+ language = {english}
+}
+
+@Article{huebler1999a,
+ author = {H\"ubler, A. C. and Hahn, U. and Weidner, J. and
+ Schneider, J.},
+ title = {Krafteinleitung an Bauelementen aus Aluminiumschaum},
+ journal = {konstruktionspraxis},
+ year = 1999,
+ volume = 04,
+ language = {ngerman}
+}
+
+@Article{hunsche1986a,
+ author = {Hunsche, A. and Neumann, P.},
+ title = {Quantitative measurement of persistent slip band profiles
+ and crack initiation},
+ journal = {Acta metallurgica},
+ year = 1986,
+ volume = 34,
+ number = 2,
+ pages = {207--217},
+ language = {english}
+}
+
+@PhdThesis{hupfer2003a,
+ author = {Hupfer, K.},
+ title = {Einflu\ss\ der Mikrostruktur auf die
+ Festigkeitseigenschaften von Metallsch\"aumen},
+ school = {Braunschweiger Schriften zur Mechanik},
+ year = 2003,
+ type = {Dissertation},
+ address = {Braunschweig},
+ language = {ngerman}
+}
+
+@InProceedings{huschka1997a,
+ author = {Huschka, S. and Hicken, S. and Arendts, F.-J.},
+ title = {Modellierung der Spannungs-Stauchungskurven von
+ Aluminiumschaum unter Ber\"ucksichtigung der
+ Porengr"o"senverteilung},
+ booktitle = {Metallsch"aume (Beitr"age zum Symposium Metallsch"aume,
+ IFAM, Bremen 06.~--~07.{\,}03.~1997},
+ pages = 189,
+ year = 1997,
+ editor = {Banhart, J.},
+ publisher = {Verlag MIT Bremen},
+ language = {ngerman}
+}
+
+@PhdThesis{huschka1998a,
+ author = {Huschka, S.},
+ title = {Modellierung eines Materialgesetzes zur
+ Beschreibung der mechanischen Eigenschaften von
+ Aluminiumschaum},
+ school = {Universit\"at Stuttgart},
+ year = 1998,
+ type = {Dissertation},
+ address = {VDI-Verlag. Fortschrittberichte, Reihe 5, Nr. 525},
+ language = {ngerman}
+}
+
+@Article{hutchinson2000a,
+ author = {Hutchinson, J. W. and He, M. Y.},
+ title = {Buckling of cylindrical sandwich shells with metal foam
+ cores},
+ journal = {International journal of solids and structures},
+ year = 2000,
+ volume = 37,
+ number = {46--47},
+ pages = {6777-6794},
+ language = {english},
+ issn = {0020-7683}
+}
+
+@Article{ichitsubo2002a,
+ author = {Ichitsubo, T. and Tane, M. and Ogi, H. and Hirao, M. and
+ Ikeda, T. and Nakajima, H.},
+ title = {Anisotropic elastic constants of lotus-type porous copper:
+ measurements and micromechanics modeling},
+ journal = {Acta Materialia},
+ year = 2002,
+ volume = 50,
+ pages = {4105--5115},
+ language = {english}
+}
+
+@Manual{ifam2001a,
+ title = {Metal Foams},
+ organization = {Frauhofer Institut f\"ur Fertigungstechnik und
+ Angewandte Materialforschung (IFAM)},
+ address = {Bremen},
+ month = 01,
+ year = 2001,
+ language = {english}
+}
+
+@Manual{ifam2001b,
+ title = {FOAMINAL},
+ organization = {Frauhofer Institut f\"ur Fertigungstechnik und
+ Angewandte Materialforschung (IFAM)},
+ address = {Bremen},
+ month = 01,
+ year = 2001,
+ language = {english}
+}
+
+@Article{illerhaus2000a,
+ author = {Illerhaus, B. and Goebbels, J.},
+ title = {Dreidimensionale Charakterisierung von Metallschaumk\"orpern
+ mittels MikroComputertomographie},
+ journal = {Materialwissenschaft und Werkstofftechnik},
+ year = 2000,
+ volume = 31,
+ pages = {527--528},
+ language = {ngerman}
+}
+
+@Book{ilschner2002a,
+ author = {Ilschner, B. and Singer, R. F.},
+ title = {Werkstoffwissenschaften und Fertigungstechnik},
+ publisher = {Springer"=Verlag},
+ year = 2002,
+ address = {Berlin},
+ language = {ngerman},
+ isbn = {3-540-67451-9}
+}
+
+@Article{ishikawa2000a,
+ author = {Ishikawa, N. and Parks, D. M. and Socrate, S. and
+ Kurihara, M.},
+ title = {Micromechanical Modeling of Ferrite-Pearlite Steels Using
+ Finite Element Unit Cell Models},
+ journal = {ISIJ International},
+ year = 2000,
+ volume = 40,
+ number = 11,
+ pages = {1170--1179},
+ language = {english}
+}
+
+@Book{issler1995a,
+ author = {Issler, L. and Ruo"s, H. and H"afele, P.},
+ title = {Festigkeitslehre~-- Grundlagen},
+ publisher = {Springer"=Verlag},
+ year = 1997,
+ edition = 2,
+ address = {Berlin},
+ language = {ngerman},
+ isbn = {3-540-61998-4}
+}
+
+@InProceedings{jasiuniene2001a,
+ author = {Jansiunien\"e, E. and Goebbels, J. and Illerhaus, B. and
+ L\"owe, P. and Kottar, A.},
+ title = {{3D} investigation of strength tested metallic foams by
+ micro-tomography},
+ booktitle = {Cellular Metals and Metal Foaming Technology},
+ pages = {251--254},
+ year = 2001,
+ editor = {Banhart, J. and Ashby, M. F. and Fleck, N. A.},
+ address = {Bremen},
+ publisher = {Verlag MIT Publishing},
+ language = {english},
+ isbn = {3-935538-11-1}
+}
+
+@Book{jenkins1972a,
+ editor = {Jenkins, A. D.},
+ title = {Polymer Science},
+ publisher = {North-Holland Publishing Company},
+ year = 1972,
+ volume = 1,
+ address = {Amsterdam},
+ language = {english},
+ isbn = {0-7204-0246-8}
+}
+
+@Book{kaliszky1984a,
+ author = {Kaliszky, S.},
+ title = {Plastizit"atslehre},
+ publisher = {VDI"=Verlag},
+ year = 1984,
+ address = {D"usseldorf},
+ language = {ngerman},
+ isbn = {3-18-400447-3}
+}
+
+@Article{kathuria2001a,
+ author = {Kathuria, Y. P.},
+ title = {Laser Assisted Foaming of Aluminum},
+ journal = {Advanced Engineering Materials},
+ year = 2001,
+ volume = 3,
+ number = 9,
+ pages = {702--705},
+ language = {english}
+}
+
+@Book{kausch1983a,
+ editor = {Kausch, H.-H.},
+ title = {Crazing in Polymers, Vol.~1},
+ publisher = {Springer-Verlag},
+ year = 1983,
+ volume = {52/53},
+ series = {Advances in Polymer Science},
+ address = {Berlin},
+ language = {english},
+ isbn = {3-540-12571-X}
+}
+
+@Book{kausch1990a,
+ editor = {Kausch, H.-H.},
+ title = {Crazing in Polymers, Vol.~2},
+ publisher = {Springer-Verlag},
+ year = 1990,
+ volume = {91/92},
+ series = {Advances in Polymer Science},
+ language = {english},
+ isbn = {3-540-51306-X}
+}
+
+@Book{kittel1999a,
+ author = {Kittel, Ch.},
+ title = {Einf"uhrung in die Festk"orperphysik},
+ publisher = {R. Oldenbourg Verlag},
+ year = 1999,
+ address = {M"unchen},
+ edition = 12,
+ language = {ngerman},
+ isbn = {3-486-23843-4}
+}
+
+@Article{ko1965a,
+ author = {Ko, W. L.},
+ title = {Deformations of Foamed Elastomers},
+ journal = {Journal of CELLULAR PLASTICS},
+ year = 1965,
+ pages = {45--50},
+ month = {January},
+ language = {english}
+}
+
+@Article{kottar2000a,
+ author = {Kottar, A. and Degischer, H. P. and Kriszt, B.},
+ title = {R\"ontgen-Computertomographie zur Charakterisierung von
+ zellularem Aluminium und seiner Verformung},
+ journal = {Materialwissenschaft und Werkstofftechnik},
+ year = 2000,
+ volume = 31,
+ pages = {465--469},
+ language = {ngerman}
+}
+
+@InProceedings{kretz1999a,
+ author = {Kretz, R. and Hombergsmeier, E. and Eipper, K.},
+ title = {Manufacturing and testing of aluminium foam structural parts
+ for passenger cars demonstrated by example of a rear
+ intermediate panel},
+ booktitle = {Metal Foams and Porous Metal Structures},
+ pages = {23--38},
+ year = 1999,
+ editor = {Banhart, J. and Ashby, M. F. and Fleck, N. A.},
+ address = {Bremen},
+ publisher = {MIT-Verlag},
+ language = {english}
+}
+
+@Article{kretz2000a,
+ author = {Kretz, R. and Wolfsgruber, E.},
+ title = {Potential des Alulight Verfahrens zur Herstellung von
+ dreidimensionalen Net Shape Schaumaluminiumbauteilen},
+ journal = {Materialwissenschaft und Werkstofftechnik},
+ year = 2000,
+ volume = 31,
+ pages = {400--402},
+ language = {ngerman}
+}
+
+@TechReport{kriszt1997a,
+ author = {Kriszt, B. and Ashby, M. F.},
+ title = {Structure and Properties of Nickel Foams},
+ institution = {University of Cambridge},
+ year = 1997,
+ number = {CUED/C-MATS/TR240},
+ language = {english}
+}
+
+@Article{kriszt2000a,
+ author = {Kriszt, B. and Kraft, O. and Clemens, H.},
+ title = {Mikrostruktureigenschaften von Alporas Schaum in
+ Abh\"angigkeit von thermisch mechanischer Belastung},
+ journal = {Materialwissenschaft und Werkstofftechnik},
+ year = 2000,
+ volume = 31,
+ pages = {478--480},
+ language = {ngerman}
+}
+
+@Article{kumar1994a,
+ author = {Kumar, S. and Kurtz, S. K.},
+ title = {Simulation of Material Microstructure Using a 3D Voronoi
+ Tesselation: Calculation of Effective Thermal Expansion
+ Coefficient of Polycrystalline Materials},
+ journal = {Acta metallurgica et materialia},
+ year = 1994,
+ volume = 42,
+ number = 12,
+ pages = {3917--3927},
+ language = {english}
+}
+
+@Article{kunz2001a,
+ author = {Kunz, L. and Luk\'a\v{s}, P. and Weiss, B. and Melisova, D.},
+ title = {Effect of loading history on cyclic stress-strain response},
+ journal = {Materials Science and Engineering},
+ year = 2001,
+ volume = {A~314},
+ pages = {1--6},
+ language = {english}
+}
+
+@Book{landau1997a,
+ author = {Landau, L. D. and Lifschitz, E. M.},
+ title = {Lehrbuch der theoretischen Physik},
+ publisher = {Verlag Harri Deutsch},
+ year = 1997,
+ volume = {Bd.{\,}2: Klassische Feldtheorie},
+ edition = 12,
+ language = {ngerman},
+ isbn = {3-8171-1327-7}
+}
+
+@Article{lange1974a,
+ author = {Lange, G.},
+ title = {Vereinfachte Ermittlung der Flie"skurve metallischer
+ Werkstoffe im Zugversuch w"ahrend der Einschn"urung der
+ Proben},
+ journal = {Archiv f\"ur das Eisenh"uttenwesen},
+ year = 1974,
+ volume = 45,
+ number = 11,
+ pages = {809--812},
+ month = {November},
+ language = {ngerman}
+}
+
+@Book{lange1992a,
+ editor = {Lange, G.},
+ title = {Systematische Beurteilung technischer Schadensf"alle},
+ publisher = {Wiley-VCH},
+ year = 2001,
+ address = {Weinheim},
+ edition = 5,
+ language = {ngerman},
+ isbn = {3-527-30417-7}
+}
+
+@InProceedings{lankford1998a,
+ author = {Lankford, J., Jr. and Dannemann, K. A.},
+ title = {Strain Rate Effects in Porous Materials},
+ booktitle = {Porous and Cellular Materials for Structural Applications},
+ pages = {103--108},
+ year = 1998,
+ editor = {Schwartz, D. S. and Shih, D. S. and Evans, A. G. and
+ Wadley, H. N. G.},
+ volume = 521,
+ series = {Symposium Proceedings},
+ address = {Warrendale, Pennsylvania},
+ month = {April},
+ publisher = {Materials Research Society},
+ language = {english}
+}
+
+@Article{lederman1971a,
+ author = {Lederman, J. M.},
+ title = {The Prediction of the Tensile Properties of Flexible Foams},
+ journal = {Journal of Applied Polymer Science},
+ year = 1971,
+ volume = 15,
+ pages = {693--703},
+ language = {english}
+}
+
+@InCollection{lehman1991a,
+ author = {Lehman, R. L.},
+ title = {Overview of Ceramic Design and Process Engineering},
+ booktitle = {Ceramics and Glasses},
+ pages = {29--37},
+ publisher = {ASM International},
+ year = 1991,
+ editor = {Schneider, Samuel J.},
+ volume = 4,
+ series = {Engineered Materials Handbook},
+ language = {english},
+ isbn = {0-87170-282-7}
+}
+
+@Article{lehmhus2000a,
+ author = {Lehmhus, D. and Marschner, C. and Banhart, J.},
+ title = {Einflu\ss{} von W\"armebehandlungen auf Gef\"uge und
+ Festigkeitseigenschaften von Aluminiumsch\"aumen},
+ journal = {Materialwissenschaft und Werkstofftechnik},
+ year = 2000,
+ volume = 31,
+ pages = {474--477},
+ language = {ngerman}
+}
+
+@Article{lehmhus2002a,
+ author = {Lehmhus, D. and Banhart, J. and Rodriguez-Perez, M. A.},
+ title = {Adaptation of aluminium foam properties by means of
+ precipitation hardening},
+ journal = {Materials Science and Technology},
+ year = 2002,
+ volume = 18,
+ month = {May},
+ language = {english}
+}
+
+@InProceedings{leitlmeier2000a,
+ author = {Leitlmeier, D. and Flankl, H.},
+ title = {Vergleich der Herstellverfahren von Aluminiumschaum unter
+ dem Aspekt zuk"unftiger industrieller
+ Anwendungsm"oglichkeiten},
+ booktitle = {1.~Ranshofer Leichtmetalltage:
+ Vom Werkstoff zum Bauteilsystem},
+ pages = {155--167},
+ year = 2000,
+ editor = {Kaufmann, U. and Uggowitzer, P. J.},
+ month = {Mai},
+ language = {ngerman}
+}
+
+@InBook{lemaitre2001a,
+ editor = {Lemaitre, J.},
+ title = {Handbook of Materials Behavior Models},
+ chapter = {Damage mechanisms in amorphous glassy polymers: crazing},
+ publisher = {Harcourt Publishers},
+ year = 2001,
+ language = {english},
+ isbn = {0-12-443341-3}
+}
+
+@Article{loethman2000a,
+ author = {L\"othman, P. A. and Andersen, O. and Gr\"under, J. and
+ Landgraf, G.},
+ title = {Mechanische Eigenschaften metallischer Hohlkugelformk\"orper
+ und Charakterisierung ihrer Zellwandeigenschaften},
+ journal = {Materialwissenschaft und Werkstofftechnik},
+ year = 2000,
+ volume = 31,
+ pages = {529--530},
+ language = {ngerman}
+}
+
+@Article{lukas2002a,
+ author = {Luk\'{a}\v{s}, P. and Kunz, L.},
+ title = {Specific features of high-cycle and ultra-high-cycle
+ fatigue},
+ journal = {Fatigue and fracture of engineering materials and
+ structures},
+ year = 2002,
+ volume = 25,
+ number = 8,
+ pages = {747--753},
+ language = {english}
+}
+
+@Book{macherauch1990a,
+ author = {Macherauch, E.},
+ title = {Praktikum in Werkstoffkunde},
+ publisher = {Vieweg Verlagsgesellschaft},
+ year = 1990,
+ address = {Braunschweig},
+ edition = 9,
+ language = {ngerman},
+ isbn = {3-528-83306-8}
+}
+
+@Article{magnin2001a,
+ author = {Magnin, T. and Bosch, C. and Wolski, K. and Delafosse, D.},
+ title = {Cyclic plastic deformation behaviour of {Ni} single crystal
+ oriented for single slip as a function of hydrogen content},
+ journal = {Materials Science and Engineering},
+ year = 2001,
+ volume = {A\,314},
+ pages = {7--11},
+ language = {english}
+}
+
+@Article{maire2001a,
+ author = {Maire, E. and Buffi\`ere, J.-Y. and Salvo, L.},
+ title = {On the Application of X-ray Microtomography in the Field
+ of Materials Science},
+ journal = {Advanced Engineering Materials},
+ year = 2001,
+ volume = 3,
+ number = 8,
+ pages = {539--546},
+ language = {english}
+}
+
+@InProceedings{margevicius1998a,
+ author = {Margevicius, R. W. and Stanek, P. W. and Jacobson, L. A.},
+ title = {Effects of Thermomechanical Processing on the Resulting
+ Mechanical Properties of 6101 Aluminium Foam},
+ booktitle = {Porous and Cellular Materials for Structural Applications},
+ pages = {65--70},
+ year = 1998,
+ editor = {Schwartz, D. S. and Shih, D. S. and Evans, A. G. and
+ Wadley, H. N. G.},
+ volume = 521,
+ series = {Symposium Proceedings},
+ address = {Warrendale, Pennsylvania},
+ month = {April},
+ publisher = {Materials Research Society},
+ language = {english}
+}
+
+@Article{markaki2001a,
+ author = {Markaki, A. E. and Clyne, T. W.},
+ title = {The Effect of Cell Wall Microstructure on the Deformation and
+ Fracture of Aluminium-Based Foams},
+ journal = {Acta Materialia},
+ year = 2001,
+ volume = 49,
+ pages = {1677--1686},
+ language = {english}
+}
+
+@Article{maurer2000a,
+ author = {Maurer, M. and Lugscheider, E.},
+ title = {Erh\"ohung und Charakterisierung der Festigkeit von
+ Metallsch\"aumen f\"ur lasttragende Anwendungen durch
+ thermisch gespritzte Verbundstrukturen},
+ journal = {Materialwissenschaft und Werkstofftechnik},
+ year = 2000,
+ volume = 31,
+ pages = {523--526},
+ language = {ngerman}
+}
+
+@Article{mcclintock1968a,
+ author = {McClintock, F. A.},
+ title = {A Criterion for Ductile Fracture by the Growth of Holes},
+ journal = {Journal of Applied Mechanics},
+ year = 1968,
+ pages = {363--371},
+ month = {June},
+ language = {english}
+}
+
+@Book{mccrum1988a,
+ author = {McCrum, N. G. and Buckley, C. P. and Bucknall, C. B.},
+ title = {Principles of Polymer Engineering},
+ publisher = {Oxford University Press},
+ year = 1988,
+ language = {english},
+ isbn = {0-19-856152-0}
+}
+
+@Article{mccullough2000a,
+ author = {McCullough, K. Y. G. and Fleck, N. A. and Ashby, M. F.},
+ title = {The stress-life fatigue behaviour of aluminium alloy foams},
+ journal = {Fatigue \&\ fracture of engineering materials \&\
+ structures},
+ year = 2000,
+ volume = 23,
+ number = 3,
+ pages = {199--208},
+ language = {english},
+ issn = {0160-4112}
+}
+
+@Misc{mems1997a,
+ key = {mems},
+ title = {MEMS Material Database},
+ howpublished = {http://www.memsnet.org},
+ year = 1997,
+ language = {english}
+}
+
+@Article{menges1975a,
+ author = {Menges, G. and Knipschild, F.},
+ title = {Estimation of Mechanical Properties for Rigid Polyurethane
+ Foams},
+ journal = {Polymer Engineering and Science},
+ year = 1975,
+ volume = 15,
+ number = 8,
+ pages = {623--627},
+ month = {August},
+ language = {english}
+}
+
+@Misc{mepura1997a,
+ key = {MEPURA},
+ title = {MEPURA: "`Alulight"'},
+ howpublished = {Firmenschrift der MEPURA-Metallpulver GmbH},
+ month = {April},
+ year = 1997,
+ note = {Ranshofen, "Osterreich},
+ language = {ngerman}
+}
+
+@Book{merkel2000a,
+ author = {Merkel, M. and Thomas, K.-H.},
+ title = {Taschenbuch der Werkstoffe},
+ publisher = {Fachbuchverlag Leipzig},
+ year = 2000,
+ edition = 5,
+ language = {ngerman},
+ isbn = {3-446-21410-0}
+}
+
+@InCollection{miyayama1991a,
+ author = {Miyayama, M. and Koumoto, K. and Yanagida, H.},
+ title = {Engineering Properties of Single Oxides},
+ booktitle = {Ceramics and Glasses},
+ pages = {748--757},
+ publisher = {ASM International},
+ year = 1991,
+ editor = {Schneider, Samuel J.},
+ volume = 4,
+ series = {Engineered Materials Handbook},
+ language = {english},
+ isbn = {0-87170-282-7}
+}
+
+@Article{miyoshi2000a,
+ author = {Miyoshi, T. and Itoh, M. and Akiyama, S. and Kitahara, A.},
+ title = {{ALPORAS} Aluminium Foam: Production Process, Properties,
+ and Applications},
+ journal = {Advanced Engineering Materials},
+ year = 2000,
+ volume = 2,
+ number = 4,
+ pages = {179--183},
+ language = {english}
+}
+
+@Unpublished{moehrmann2001a,
+ author = {M\"ohrmann, C. and Jung, A. and Woldt, E.},
+ title = {The Packing Density of Randomly Packed Spheres and the
+ Structural Stability of Metallic Glasses},
+ note = {abgelehnt von Elsevier Science},
+ year = 2001,
+ language = {english}
+}
+
+@InCollection{moet1988a,
+ author = {Moet, A. and Aglan, H.},
+ title = {Fatigue Failure},
+ booktitle = {Engineering Plastics},
+ pages = {741--750},
+ publisher = {ASM International},
+ year = 1988,
+ editor = {Epel, J. N.},
+ volume = 2,
+ series = {Engineered Materials Handbook},
+ language = {english},
+ isbn = {0-87170-279-7}
+}
+
+@Article{mohr2000a,
+ author = {Mohr, U. and Bleck, W. and Scholz P.-F.},
+ title = {Metallic Foams Produced by Slipcasting},
+ journal = {Advanced Engineering Materials},
+ year = 2000,
+ volume = 4,
+ number = {1--2},
+ pages = {28--33},
+ language = {english}
+}
+
+@Article{mosler2000a,
+ author = {Mosler, U. and Heinzel, G. and Martin, U. and Oettel, H.},
+ title = {Mikrostruktur und Verformungsverhalten von
+ Aluminium-Sch\"aumen},
+ journal = {Materialwissenschaft und Werkstofftechnik},
+ year = 2000,
+ volume = 31,
+ pages = {519--522},
+ language = {ngerman}
+}
+
+@Unpublished{mosler2000b,
+ author = {Mosler, U.},
+ title = {Mikrostrukturuntersuchungen von AlSi\,7-Schaum},
+ note = {Vortrag beim Arbeitskreistreffen \emph{Quantitative
+ Gef\"ugebestimmung} des DFG-SPP~1075 am 29. und 30.{\,}03.~2000,
+ unver"offentlicht, Institut f\"ur Metallkunde,
+ TU~Bergakademie Freiberg},
+ year = 2000,
+ language = {ngerman}
+}
+
+@Article{mosler2001a,
+ author = {Mosler, U. and M\"uller, A.},
+ title = {Gef\"ugeinterpretation von Aluminium-Sch"aumen},
+ journal = {Praktische Metallographie (Sonderb"ande)},
+ year = 2001,
+ volume = 32,
+ pages = {279--284},
+ language = {ngerman}
+}
+
+@InProceedings{mosler2001b,
+ author = {Mosler, U. and M\"uller, A. and Baum, H. and Martin, U. and
+ Oettel, H.},
+ title = {Microstructure of the Foamable Precursor and Foamed Aluminium
+ Material},
+ booktitle = {Cellular Metals and Metal Foaming Technology},
+ pages = {233--238},
+ year = 2001,
+ editor = {Banhart, J. and Ashby, M. F. and Fleck, N. A.},
+ address = {Bremen},
+ publisher = {Verlag MIT Publishing},
+ language = {english},
+ isbn = {3-935538-11-1}
+}
+
+@Misc{mosler2001c,
+ author = {Mosler, U.},
+ title = {LiMi-Aufnahmen von AlSi\,7},
+ howpublished = {E-Mail an Knut Hupfer},
+ month = {August},
+ year = 2001,
+ language = {ngerman}
+}
+
+@Unpublished{moslera,
+ author = {Mosler, U. and M\"uller, A. and Baum, H. and Martin, U.
+ and Oettel, H.},
+ title = {Microstructure of the foamable precursor and foamed
+ aluminium material},
+ note = {TU Freiberg},
+ language = {english}
+}
+
+@Article{motz2000a,
+ author = {Motz, C. and Pippan, R.},
+ title = {Bruchz\"ahigkeit und Ri"sfortschritt in den Zellw\"anden
+ von Schaumaluminium},
+ journal = {Materialwissenschaft und Werkstofftechnik},
+ year = 2000,
+ volume = 31,
+ pages = {493--496},
+ language = {ngerman}
+}
+
+@Article{motz2001a,
+ author = {Motz, C. and Pippan, R.},
+ title = {Deformation Behaviour of Closed-Cell Aluminium Foams in
+ Tension},
+ journal = {Acta Materialia},
+ year = 2001,
+ volume = 49,
+ pages = {2463--2470},
+ language = {english}
+}
+
+@Article{motz2002a,
+ author = {Motz, C. and Pippan, R.},
+ title = {Fracture behaviour and fracture toughness of ductile
+ closed-cell metallic foams},
+ journal = {Acta Materialia},
+ year = 2002,
+ volume = 50,
+ pages = {2013--2033},
+ language = {english}
+}
+
+@PhdThesis{mueller1983a,
+ author = {M"uller, H.},
+ title = {Flie"sspannung von Zink in Abh"angigkeit von
+ Korngr"o"se,
+ Beanspruchungsrichtung und Verformungsgrad},
+ school = {Technische Universit\"at Braunschweig},
+ year = 1983,
+ type = {Dissertation},
+ language = {ngerman}
+}
+
+@Unpublished{muellera,
+ author = {M\"uller, A. and Mosler, U.},
+ title = {Gef\"ugeinterpretation von Aluminium-Sch\"aumen},
+ note = {Institut f\"ur Metallkunde, TU Bergakademie Freiberg.
+ Ist es vielleicht in Sonderb\"ande der Praktischen
+ Metallographie 32 (2001) 279},
+ language = {ngerman}
+}
+
+@Article{muench2000a,
+ author = {M\"unch, M. and Schlimmer, M.},
+ title = {Ermittlung mechanischer Kennwerte von Aluminiumsch\"aumen},
+ journal = {Materialwissenschaft und Werkstofftechnik},
+ year = 2000,
+ volume = 31,
+ pages = {544--546},
+ language = {ngerman}
+}
+
+@Book{munz1989a,
+ author = {Munz, D. and Fett, T.},
+ title = {Mechanisches Verhalten keramischer Werkstoffe},
+ publisher = {Springer"=Verlag},
+ year = 1989,
+ address = {Berlin},
+ language = {ngerman},
+ isbn = {3-540-51508-9}
+}
+
+@Book{nadgornyi1988a,
+ author = {Nadgornyi, E.},
+ title = {Dislocation dynamics and mechanical properties of crystals},
+ publisher = {Pergamon Press},
+ year = 1988,
+ volume = 31,
+ series = {Progress in materials science},
+ address = {Oxford},
+ edition = 1,
+ language = {english},
+ isbn = {0-08-036864-6}
+}
+
+@Book{nadgronyi1988a,
+ author = {Nadgornyi, E. M.},
+ title = {Dislocation dynamics and mechanical properties of crystals},
+ publisher = {Pergamon Press},
+ year = 1988,
+ volume = 31,
+ series = {Progress in materials science},
+ address = {Oxford},
+ language = {english},
+ isbn = {0-08-036864-6}
+}
+
+@Book{neuber1985a,
+ author = {Neuber, H.},
+ title = {Kerbspannungslehre},
+ publisher = {Springer"=Verlag},
+ year = 1985,
+ address = {Berlin},
+ edition = 3,
+ language = {ngerman},
+ isbn = {3-540-13558-8}
+}
+
+@InProceedings{neugebauer1998a,
+ author = {Neugebauer, R. and Hipke, Th.},
+ title = {Parameters of Construction for Applications of Metal Foams},
+ booktitle = {Porous and Cellular Materials for Structural Applications},
+ pages = {265--270},
+ year = 1998,
+ editor = {Schwartz, D. S. and Shih, D. S. and Evans, A. G. and
+ Wadley, H. N. G.},
+ volume = 521,
+ series = {Symposium Proceedings},
+ address = {Warrendale, Pennsylvania},
+ month = {April},
+ publisher = {Materials Research Society},
+ language = {english}
+}
+
+@InProceedings{neugebauer1998b,
+ author = {Neugebauer, R. and Br\"aunlich, H. and Wagner, U.},
+ title = {Lightweight Products with Metal Foam---Properties and
+ Methods of Processing},
+ booktitle = {Porous and Cellular Materials for Structural Applications},
+ pages = {271--278},
+ year = 1998,
+ editor = {Schwartz, D. S. and Shih, D. S. and Evans, A. G. and
+ Wadley, H. N. G.},
+ volume = 521,
+ series = {Symposium Proceedings},
+ address = {Warrendale, Pennsylvania},
+ month = {April},
+ publisher = {Materials Research Society},
+ language = {english}
+}
+
+@Article{neugebauer2000a,
+ author = {Neugebauer, R. and Wagner, U.},
+ title = {Strukturanalyse von Metallsch\"aumen},
+ journal = {Materialwissenschaft und Werkstofftechnik},
+ year = 2000,
+ volume = 31,
+ pages = {462--464},
+ language = {ngerman}
+}
+
+@Misc{newprocess2000a,
+ key = {AAA},
+ title = {Foam Metal Developed with New Process},
+ howpublished = {Japan Chemical Week},
+ month = {June 15},
+ year = 2000,
+ language = {english}
+}
+
+@InProceedings{olurin1999a,
+ author = {Olurin, O. B. and Fleck, N. A. and Ashby, M. F.},
+ title = {Fatigue of an aluminium alloy foam},
+ booktitle = {Metal Foams and Porous Metal Structures},
+ pages = {365--371},
+ year = 1999,
+ editor = {Banhart, J. and Ashby, M. F. and Fleck, N. A.},
+ publisher = {MIT Verlag},
+ language = {english}
+}
+
+@Article{olurin2001a,
+ author = {Olurin, O. B. and Fleck, N. A. and Ashby, M. F.},
+ title = {Tensile and Compressive Failure of Notched Cellular Foams},
+ journal = {Advanced Engineering Materials},
+ year = 2001,
+ volume = 3,
+ number = {1--2},
+ pages = {55--58},
+ language = {english}
+}
+
+@Article{olurin2002a,
+ author = {Olurin, O. B. and Arnold, M. and K\"orner, C. and
+ Singer, R. F.},
+ title = {The investigation of morphometric parameters of aluminium
+ foams using micro-computed tomography},
+ journal = {Materials Science and Engineering},
+ year = 2002,
+ volume = {A~328},
+ pages = {334--343},
+ language = {english}
+}
+
+@Article{onck2001a,
+ author = {Onck, P. R. and Andrews, E. W. and Gibson, L. J.},
+ title = {Size effects in ductile cellular solids. Part~I: modeling},
+ journal = {International Journal of Mechanical Sciences},
+ year = 2001,
+ volume = 43,
+ pages = {681--699},
+ language = {english}
+}
+
+
+@InCollection{ownby1991a,
+ author = {Ownby, P. D. and Stewart, R. W.},
+ title = {Engineering Properties of Diamond and Graphite},
+ booktitle = {Ceramics and Glasses},
+ pages = {821--834},
+ publisher = {ASM International},
+ year = 1991,
+ editor = {Schneider, Samuel J.},
+ volume = 4,
+ series = {Engineered Materials Handbook},
+ language = {english},
+ isbn = {0-87170-282-7}
+}
+
+
+@Book{podesta1996a,
+ author = {de Podesta, M.},
+ title = {Understanding the Properties of Matter},
+ publisher = {UCL Press},
+ year = 1996,
+ address = {London},
+ language = {english},
+ isbn = {1-85728-299-X}
+}
+
+
+@Article{poeppe1999a,
+ author = {P"oppe, C.},
+ title = {Der Beweis der Keplerschen Vermutung},
+ journal = {Spektrum der Wissenschaft},
+ year = 1999,
+ volume = 4,
+ language = {ngerman}
+}
+
+
+@Book{polmear1995a,
+ author = {Polmear, I. J.},
+ title = {Light Alloys},
+ publisher = {Arnold},
+ year = 1995,
+ series = {Metallurgy and Materials Science Series},
+ address = {London},
+ edition = 3,
+ language = {english},
+ isbn = {0-340-63207-0}
+}
+
+
+@Book{prager1961a,
+ author = {Prager, W.},
+ title = {Einf"uhrung in die Konitnuumsmechanik},
+ publisher = {Birkh"auser Verlag},
+ year = 1961,
+ volume = 20,
+ series = {Lehr- und Handb"ucher der Ingenieurwissenschaften},
+ address = {Basel},
+ language = {ngerman}
+}
+
+
+@Article{quelheillalt2002a,
+ author = {Queheillalt, D. T. and Sypeck, D. J. and Wadley, H. N. G.},
+ title = {Ultrasonic characterization of cellular metal structures},
+ journal = {Materials Science and Engineering},
+ year = 2002,
+ volume = {A~323},
+ pages = {138--147},
+ language = {english}
+}
+
+
+@Article{rabiei2000a,
+ author = {Rabiei, A. and Evans, A. G. and Hutchinson, J. W.},
+ title = {Heat Generation During the Fatigue of a Cellular {Al} Alloy},
+ journal = {Metallurgical and materials transactions},
+ year = 2000,
+ volume = 31,
+ number = 4,
+ pages = {1129--1136},
+ language = {english},
+ issn = {1073-5623}
+}
+
+
+@Book{radaj1995a,
+ author = {Radaj, D.},
+ title = {Erm"udungsfestigkeit},
+ publisher = {Springer"=Verlag},
+ year = 1995,
+ address = {Berlin},
+ language = {ngerman},
+ isbn = {3-540-58348-3}
+}
+
+
+@Article{rausch2000a,
+ author = {Rausch, G. and Hartwig, T. and Weber, M. and Schulz, O.},
+ title = {Herstellung und Eigenschaften von Titansch\"aumen},
+ journal = {Materialwissenschaft und Werkstofftechnik},
+ year = 2000,
+ volume = 31,
+ pages = {412--414},
+ language = {ngerman}
+}
+
+
+@Article{rausch2000b,
+ author = {Rausch, G. and Weber, M. and Kn\"uwer, M.},
+ title = {Neue Entwicklungen zur Herstellung von Stahlsch\"aumen},
+ journal = {Materialwissenschaft und Werkstofftechnik},
+ year = 2000,
+ volume = 31,
+ pages = {424--427},
+ language = {ngerman}
+}
+
+
+@Book{reckling1967a,
+ author = {Reckling, K.-A.},
+ title = {Plastizit"atstheorie und ihre Anwendung auf
+ Festigkeitsprobleme},
+ publisher = {Springer"=Verlag},
+ year = 1967,
+ address = {Berlin},
+ language = {ngerman}
+}
+
+
+@Book{reif1987a,
+ author = {Reif, F.},
+ title = {Statistische Physik und Theorie der W"arme},
+ publisher = {De Gruyter},
+ year = 1987,
+ edition = 3,
+ language = {ngerman},
+ isbn = {3-11-011383-X}
+}
+
+
+@InProceedings{renauld1998a,
+ author = {Renauld, M. L. and Giamei, A. F. and Thompson, M. S. and
+ Priluck, J.},
+ title = {The Effect of Parent Metal Properties on the Performance
+ of Lattice Block Material},
+ booktitle = {Porous and Cellular Materials for Structural Applications},
+ pages = {109--117},
+ year = 1998,
+ editor = {Schwartz, D. S. and Shih, D. S. and Evans, A. G. and
+ Wadley, H. N. G.},
+ volume = 521,
+ series = {Symposium Proceedings},
+ address = {Warrendale, Pennsylvania},
+ month = {April},
+ publisher = {Materials Research Society},
+ language = {english}
+}
+
+
+@Book{rhines1956a,
+ author = {Rhines, F. N.},
+ title = {Phase Diagrams in Metallurgy},
+ publisher = {McGraw-Hill Book Company},
+ year = 1956,
+ series = {Metallurgy and Metallurgical Engineering Series},
+ address = {New York},
+ language = {english}
+}
+
+
+@Article{rice1968a,
+ author = {Rice, J. R.},
+ title = {A Path Independent Integral and the Approximate Analysis
+ of Strain Concentration by Notches and Cracks},
+ journal = {Journal of Applied Mechanics},
+ year = 1968,
+ pages = {379--386},
+ month = {June},
+ language = {english}
+}
+
+
+@Book{riedel1990a,
+ author = {Riedel, E.},
+ title = {Allgemeine und Anorganische Chemie},
+ publisher = {Walter de Gruyter},
+ year = 1990,
+ address = {Berlin},
+ edition = 5,
+ language = {ngerman},
+ isbn = {3-11-012586-2}
+}
+
+
+@Article{rinebolt1951a,
+ author = {Rinebolt, J. A. and Harris, W. J., Jr.},
+ title = {Effect of Alloying Elements on Notch Toughness of
+ Pearlitic Steels},
+ journal = {Transactions of the American Society of Metals},
+ year = 1951,
+ volume = 43,
+ pages = {1175--1202},
+ language = {english}
+}
+
+
+@Article{roberts2001a,
+ author = {Roberts, A. P. and Garboczi, E. J.},
+ title = {Elastic Moduli of Model Random Three-Dimensional
+ Closed-Cell Cellular Solids},
+ journal = {Acta Materialia},
+ year = 2001,
+ volume = 49,
+ pages = {189--197},
+ language = {english}
+}
+
+
+@Article{roberts2002a,
+ author = {Roberts, A. P. and Garboczi, E. J.},
+ title = {Elastic properties of model random three-dimensional
+ open-cell solids},
+ journal = {Journal of the Mechanics and Physics of Solids},
+ year = 2002,
+ volume = 50,
+ pages = {35--55},
+ language = {english}
+}
+
+
+@Article{roesler1992a,
+ author = {R\"osler, J. and Joos, R. and Arzt, E.},
+ title = {Microstructure and Creep Properties of
+ Dispersion-Strengthened Aluminium Alloys},
+ journal = {Metallurgical Transactions A},
+ year = 1992,
+ volume = {23\,A},
+ pages = {1521--1539},
+ month = {May},
+ language = {english}
+}
+
+
+@Book{roesler2003a,
+ editor = {R{\"o}sler, J. and Harders, H. and B{\"a}ker, M.},
+ title = {Mechanisches Verhalten der Werkstoffe},
+ publisher = {Teubner-Verlag},
+ edition = 1,
+ year = 2003,
+ language = {ngerman}
+}
+
+
+@Book{ruge2001a,
+ author = {Ruge, J. and Wohlfahrt, H.},
+ title = {Technologie der Werkstoffe},
+ publisher = {Vieweg Verlag},
+ year = 2001,
+ address = {Braunschweig},
+ edition = 6,
+ language = {ngerman},
+ isbn = {3-528-53021-9}
+}
+
+
+@InProceedings{saenz1998a,
+ author = {Saenz, E. and Baranda, P. S. and Bonhomme, J.},
+ title = {Shear Properties on Aluminium Metal Foams Prepared by
+ the Melt Route},
+ booktitle = {Porous and Cellular Materials for Structural Applications},
+ pages = {83--89},
+ year = 1998,
+ editor = {Schwartz, D. S. and Shih, D. S. and Evans, A. G. and
+ Wadley, H. N. G.},
+ volume = 521,
+ series = {Symposium Proceedings},
+ address = {Warrendale, Pennsylvania},
+ month = {April},
+ publisher = {Materials Research Society},
+ language = {english}
+}
+
+
+@Book{salmang1982a,
+ author = {Salmang, H. and Scholze, H.},
+ title = {Keramik, Teil 1},
+ publisher = {Springer"=Verlag},
+ year = 1982,
+ address = {Berlin},
+ edition = 6,
+ language = {ngerman},
+ isbn = {3-540-10987-0}
+}
+
+
+@Book{salmang1983a,
+ author = {Salmang, H. and Scholze, H.},
+ title = {Keramik, Teil 2},
+ publisher = {Springer"=Verlag},
+ year = 1983,
+ address = {Berlin},
+ edition = 6,
+ language = {ngerman},
+ isbn = {3-540-12595-7}
+}
+
+
+@InProceedings{sanders1998a,
+ author = {Sanders, W. and Gibson, L. J.},
+ title = {Reduction in Young's Modulus of Aluminum Foams Due to
+ Cell Wall Curvature and Corrugation},
+ booktitle = {Porous and Cellular Material for Structural Applications},
+ pages = {53--57},
+ year = 1998,
+ volume = 521,
+ organization = {Materials Research Society},
+ language = {english}
+}
+
+
+@Article{santosa1998a,
+ author = {Santosa, S. and Wierzbicki, T.},
+ title = {On the modeling of crush behavior of a closed-cell
+ aluminium foam structure},
+ journal = {Journal of the Mechanics and Physics of Solids},
+ year = 1998,
+ volume = 46,
+ pages = 645,
+ language = {english}
+}
+
+
+@PhdThesis{sass1997a,
+ author = {Sa"s, V.},
+ title = {Untersuchung der Anisotropie im Kriechverhalten der
+ einkristallinen Nickelbasis"=Superlegierung CMSX"~4},
+ school = {TU Berlin},
+ year = 1997,
+ type = {Dissertation},
+ language = {ngerman},
+ isbn = {3-89574-236-8}
+}
+
+
+@Article{sassov2000a,
+ author = {Sassov, A. and Cronelis, E. and Van Dyck, D.},
+ title = {Non destructive 3-D Investigation of Metal Foam
+ Microstructure},
+ journal = {Materialwissenschaft und Werkstofftechnik},
+ year = 2000,
+ volume = 31,
+ pages = {571--573},
+ language = {english}
+}
+
+
+@PhdThesis{schacht2001a,
+ author = {Schacht, T.},
+ title = {Orientierungsabh"angige Rissbildung in duktilen Metallen},
+ school = {TU~Braunschweig},
+ year = {2001},
+ type = {Dissertation},
+ address = {Braunschweiger Schriften zur Mechanik, Nr.~42-2001,
+ Mechanik-Zentrum der TU Braunschweig},
+ language = {ngerman}
+}
+
+
+@Book{schatt1996a,
+ editor = {Schatt, W. and Worch, H.},
+ title = {Werkstoffwissenschaft},
+ publisher = {Deutscher Verlag f\"ur Grundstoffindustrie},
+ year = 1996,
+ address = {Stuttgart},
+ language = {ngerman},
+ isbn = {3-527-30956-X}
+}
+
+
+@Book{schimpke1977a,
+ author = {Schimpke, P. and Schropp, H. and K\"onig, R.},
+ title = {Technologie der Maschinenbaustoffe:
+ Werkstoffkunde, Werkstoffpr\"ufung, Werkstoffverarbeitung},
+ publisher = {Hirzel},
+ year = 1977,
+ address = {Stuttgart},
+ edition = 18,
+ language = {ngerman},
+ isbn = {3-7776-0312-0}
+}
+
+
+@Article{schlums1992a,
+ author = {Schlums, H. and Steck, E.},
+ title = {Description of Cyclic Deformation Processes With a
+ Stochastic Model for Inelastic Behaviour of Metals},
+ journal = {International Journal of Plasticity},
+ year = 1992,
+ volume = 8,
+ pages = {147--159},
+ language = {english}
+}
+
+
+@InProceedings{schneider1990a,
+ author = {Schneider, K.},
+ title = {Advanced Blading},
+ booktitle = {High Temperature Materials for Power Engineering 1990~--
+ Part~{II}},
+ pages = {935--954},
+ year = 1990,
+ editor = {Bauchelet, E. and others},
+ address = {Dordrecht},
+ publisher = {Kluwer Academic Publishers},
+ language = {english}
+}
+
+
+@Book{schott1997a,
+ editor = {Schott, G.},
+ title = {Werkstofferm"udung~-- Erm"udungsfestigkeit},
+ publisher = {Deutscher Verlag f\"ur Grundstoffindustrie},
+ year = 1997,
+ address = {Stuttgart},
+ edition = 4,
+ language = {ngerman},
+ isbn = {3-342-00511-4}
+}
+
+
+@Book{schultz1977a,
+ author = {Schultz, J. M.},
+ title = {Properties of solid polymeric materials~-- Part B},
+ publisher = {Academic Press},
+ year = 1977,
+ volume = 10,
+ series = {Treatise on materials science and technology},
+ address = {New York},
+ language = {english},
+ isbn = {0-12-341841-0}
+}
+
+
+@InProceedings{schultz1999a,
+ author = {Schultz, O. and Ligneris, A. des and Haider, O. and
+ Starke, P.},
+ title = {Fatigue behaviour, Strength and Failure of
+ Aluminium Foam},
+ booktitle = {Metal Foams and Porous Metal Structures},
+ pages = {379--386},
+ year = 1999,
+ editor = {Banhart, J. and Ashby, M. F. and Fleck, N. A.},
+ publisher = {MIT Verlag},
+ language = {english}
+}
+
+
+@Article{schultz2000a,
+ author = {Schultz, O. and Ligneris, A. des and Haider, O. and
+ Starke, P.},
+ title = {Fatigue behaviour, Strength and Failure of
+ Aluminium Foam},
+ journal = {Advanced Engineering Materials},
+ year = 2000,
+ volume = 2,
+ number = 4,
+ pages = {215--218},
+ language = {english}
+}
+
+
+@Article{schultz2000b,
+ author = {Schultz, O. and Schindler, R.},
+ title = {Aluminiumschaum: Dynamische Festigkeit und Anwendung im
+ Hubschrauber},
+ journal = {Materialwissenschaft und Werkstofftechnik},
+ year = 2000,
+ volume = 31,
+ pages = {511--514},
+ language = {ngerman}
+}
+
+
+@Book{schumann1962a,
+ author = {Schumann, H.},
+ title = {Metallographie},
+ publisher = {VEB Deutscher Verlag f\"ur Grundstoffindustrie},
+ year = 1962,
+ address = {Leipzig},
+ edition = 4,
+ language = {ngerman}
+}
+
+
+@Book{schwalbe1980a,
+ author = {Schwalbe, K.-H.},
+ title = {Bruchmechanik metallischer Werkstoffe},
+ publisher = {Carl Hanser Verlag},
+ address = {M"unchen},
+ year = 1980,
+ language = {ngerman},
+ isbn = {3-446-12983-9}
+}
+
+
+@Article{schwalbe2001a,
+ author = {Schwalbe, H.-J. and Baumg"artner, F. and Beichelt, Ch.},
+ title = {Investigations on the Failure Behaviour of Aluminium Foams},
+ journal = {ALUMINIUM},
+ year = 2001,
+ volume = {1/2},
+ pages = {87--92},
+ language = {english}
+}
+
+
+@InProceedings{seeliger1997a,
+ author = {Seeliger, H.-W.},
+ title = {Complex Shaped Aluminum Foam Sandwich Panels for
+ Automotive Applications},
+ booktitle = {Proceedings of the Fraunhofer USA Metal Foam Symposium},
+ pages = {79--89},
+ year = 1997,
+ address = {Bremen (Germany)},
+ publisher = {MIT-Verlag},
+ language = {english}
+}
+
+
+@Article{seitzberger2000a,
+ author = {Seitzberger, M. and Willminger, S.},
+ title = {Versagensmechanismen zur Kollapsanalyse axial gedr\"uckter
+ Aluminiumschaum-gef\"ullter Profile},
+ journal = {Materialwissenschaft und Werkstofftechnik},
+ year = 2000,
+ volume = 31,
+ pages = {459--461},
+ language = {ngerman}
+}
+
+
+@Article{shiozawa2002a,
+ author = {Shiozawa, K. and Lu, L.},
+ title = {Very high-cycle fatigue behaviour of shot-peened
+ high-carbon-chromium bearing steel},
+ journal = {Fatigue and fracture of engineering materials and
+ structures},
+ year = 2002,
+ volume = 25,
+ number = 8,
+ pages = {813--833},
+ language = {english}
+}
+
+
+@Article{silva1995a,
+ author = {Silva, M. J. and Hayes, W. C. and Gibson, L. J.},
+ title = {The effects of non-periodic microstructure on the elastic
+ properties of two-dimensional cellular solids},
+ journal = {International journal of mechanical sciences},
+ year = 1995,
+ volume = 37,
+ number = 11,
+ pages = {1161--1177},
+ language = {english}
+}
+
+
+@Article{silva1997a,
+ author = {Silva, M. J. and Gibson, L. J.},
+ title = {The effect of non-periodic microstructure and
+ defects on the compressive strength of
+ two-dimensional cellular solids},
+ journal = {International Journal of Mechanical Sciences},
+ year = 1997,
+ volume = 39,
+ pages = 549,
+ language = {english}
+}
+
+
+@InProceedings{simancik1998a,
+ author = {Siman\v{c}ik, F. and Kov\'a\v{c}ik, J. and Min\'arikov\'a, N.},
+ title = {Bending Properties of Foamed Aluminium Panels and
+ Sandwiches},
+ booktitle = {Porous and Cellular Materials for Structural Applications},
+ pages = {91--97},
+ year = 1998,
+ editor = {Schwartz, D. S. and Shih, D. S. and Evans, A. G. and
+ Wadley, H. N. G.},
+ volume = 521,
+ series = {Symposium Proceedings},
+ address = {Warrendale, Pennsylvania},
+ month = {April},
+ publisher = {Materials Research Society},
+ language = {english}
+}
+
+@Article{simone1998a,
+ author = {Simone, A. E. and Gibson, L. J.},
+ title = {Aluminium foams produced by liquid-state
+ processes},
+ journal = {Acta Materialia},
+ year = 1998,
+ volume = 46,
+ pages = 3109,
+ language = {english}
+}
+
+@Article{simone1998b,
+ author = {Simone, A. E. and Gibson, L. J.},
+ title = {Effects of solid distribution on the stiffness and
+ strength of metallic foams},
+ journal = {Acta Materialia},
+ year = 1998,
+ volume = 46,
+ pages = {2139--2150},
+ language = {english}
+}
+
+@Manual{stahlschluessel1992a,
+ title = {Stahlschl"ussel-Taschenbuch},
+ key = {Stahlschluessel},
+ organization = {Verlag Stahlschl"ussel Wegst GmbH},
+ address = {Marbach/N.},
+ year = 1992,
+ language = {ngerman},
+ isbn = {3-922599-08-7}
+}
+
+@Article{stanzick2000a,
+ author = {Stanzick, H. and Duarte, I. and Banhart, J.},
+ title = {Der Sch\"aumproze\ss{} von Aluminium},
+ journal = {Materialwissenschaft und Werkstofftechnik},
+ year = 2000,
+ volume = 31,
+ pages = {409--411},
+ language = {ngerman}
+}
+
+@Article{steck1989a,
+ author = {Steck, E.},
+ title = {A Stochastic Model for the Interaction of Plasticity and
+ Creep in Metals},
+ journal = {Nuclear Engineering and Design},
+ year = 1989,
+ volume = 114,
+ pages = {285--294},
+ language = {english}
+}
+
+@Article{steck1991a,
+ author = {Steck, E. and Kublik, F.},
+ title = {Application of Constitutive Models for the Prediction of
+ Multiaxial Inelastic Behaviour},
+ journal = {SMiRT 11 Transactions},
+ year = 1991,
+ volume = {L},
+ language = {english}
+}
+
+@InProceedings{steck1992a,
+ author = {Steck, E.},
+ title = {Stochastic Modelling of Cyclic Deformation Processes in
+ Metals},
+ booktitle = {Proceedings of the 13th Ris\o\ International Symposium on
+ Materials Science: Modelling of Plastic Deformation and
+ Its Engineering Applications},
+ pages = {439--444},
+ year = 1992,
+ editor = {Andersen, S. I. and Bilde-S\o{}rensen, J. B. and Hansen, N.
+ and Juul Jensen, D. and Leffers, T. and Lilholt, H. and
+ Lorentzen, T. and Pedersen, O. B. and Ralph, B.},
+ address = {Roskilde, Denmark},
+ organization = {Ris\o\ National Laboratory},
+ language = {english}
+}
+
+
+
+@Article{steck1995a,
+ author = {Steck, E.},
+ title = {Zur Ber\"ucksichtigung von Vorg\"angen im Mikrobereich
+ metallischer Werkstoffe bei der Entwicklung von
+ Stoffmodellen},
+ journal = {Zeitschrift f\"ur angewandte Mathematik und Mechanik (ZAMM)},
+ year = 1995,
+ volume = 75,
+ number = 5,
+ pages = {331--341},
+ language = {ngerman},
+ issn = {0946-8463}
+}
+
+@InProceedings{steck1995b,
+ author = {Steck, E.},
+ title = {Zur Ber\"ucksichtigung von Vorg\"angen im Mikrobereich
+ kristalliner Werkstoffe bei der Entwicklung von
+ Stoffmodellen},
+ booktitle = {Jahrbuch 1995},
+ pages = {115--130},
+ year = 1995,
+ organization = {Braunschweigische Wissenschaftliche Gesellschaft},
+ language = {ngerman}
+}
+
+@Article{steck1997a,
+ author = {Steck, E.},
+ title = {Zur Berechnung der Ri"sausbreitung in z\"ahen metallischen
+ Werkstoffen},
+ journal = {Abhandlungen der Braunschweigischen Wissenschaftlichen
+ Gesellschaft},
+ year = 1997,
+ volume = {XLVII},
+ pages = {211--229},
+ language = {ngerman}
+}
+
+@InCollection{stevens1991a,
+ author = {Stevens, R.},
+ title = {Engineering Properties of Zirconia},
+ booktitle = {Ceramics and Glasses},
+ pages = {775--786},
+ publisher = {ASM International},
+ year = 1991,
+ editor = {Schneider, Samuel J.},
+ volume = 4,
+ series = {Engineered Materials Handbook},
+ language = {english},
+ isbn = {0-87170-282-7}
+}
+
+@Article{stiebel2001a,
+ author = {Stiebel, C. and W\"urtz, T. and Janocha, H.},
+ title = {Leistungsverst\"arker f\"ur piezoelektrische Aktoren},
+ journal = {Elektronik},
+ year = 2001,
+ volume = 12,
+ pages = {82--88},
+ language = {ngerman}
+}
+
+@Book{stoyan1995a,
+ author = {Stoyan, D. and Kendall, W. S. and Mecke, J.},
+ title = {Stochastic Geometry and its Applications},
+ publisher = {John Wiley \&\ Sons},
+ year = 1995,
+ address = {Chichester},
+ edition = {2nd},
+ language = {english},
+ isbn = {0-471-95099-8}
+}
+
+
+@Article{stroehla2000a,
+ author = {Str\"ohla, S. and Winter, W. and Kuhn, G.},
+ title = {Numerische Ermittlung elastischer Eigenschaften von
+ Metallsch\"aumen mit Polyeder-Einheitszellen},
+ journal = {Materialwissenschaft und Werkstofftechnik},
+ year = 2000,
+ volume = 31,
+ pages = {444--446},
+ language = {ngerman}
+}
+
+@Book{stuewe1991a,
+ author = {Stwe, H.-P.},
+ title = {Einf\"uhrung in die Werkstoffkunde},
+ publisher = {B.I.-Wissenschaftsverlag},
+ year = 1991,
+ series = {B.I.-Hochschultaschenbuch},
+ volume = {467},
+ edition = 2,
+ address = {Mannheim, Wien, Z\"urich},
+ language = {ngerman}
+}
+
+@Article{sugimura1997a,
+ author = {Sugimura, Y. and Meyer, J. and He, M. Y. and
+ Bart-Smith, H. and Greenstedt, J. and Evans, A. G.},
+ title = {On the mechanical performance of closed cell {Al} alloy
+ foams},
+ journal = {Acta Materialia},
+ year = 1997,
+ volume = 45,
+ number = 12,
+ pages = {5245--5260},
+ language = {english}
+}
+
+@Article{sugimura1999a,
+ author = {Sugimura, Y. and Rabiei, A. and Evans, A. G. and
+ Harte, A. M. and Fleck, N. A.},
+ title = {Compression fatigue of a cellular {Al} alloy},
+ journal = {Materials Science \&\ Engineering},
+ year = 1999,
+ volume = {A~269},
+ pages = {38--48},
+ language = {english}
+}
+
+@Book{tabellenbuch1999a,
+ author = {Fischer, U. and Heinzler, M. and Kilgus, R. and N"aher, F.
+ and Paetzold, H. and R"ohrer, W. and Schilling, K. and
+ Stephan, A.},
+ title = {Tabellenbuch Metall},
+ publisher = {Verlag Europa-Lehrmittel},
+ year = 1999,
+ address = {Haan-Gruiten},
+ edition = 41,
+ language = {ngerman},
+ isbn = {3-8085-1721-2}
+}
+
+
+@Book{tada2000a,
+ author = {Tada,H. and Paris, P. and Irwin, G.},
+ title = {The Stress Analysis of Cracks Handbook},
+ publisher = {ASME},
+ year = 2000,
+ address = {New York},
+ language = {english},
+ isbn = {1-86058-304-0}
+}
+
+
+
+
+@Article{tanaka2002a,
+ author = {Tanaka, K. and Akiniwa, Y.},
+ title = {Fatigue crack propagation behaviour derived from S-N
+ data in very high cycle regime},
+ journal = {Fatigue and fracture of engineering materials and
+ structures},
+ year = 2002,
+ volume = 25,
+ number = 8,
+ pages = {775--784},
+ language = {english}
+}
+
+@Book{tenckhoff1980a,
+ author = {Tenckhoff, E.},
+ title = {Verformungsmechanismen, Textur und Anisotropie in
+ Zirkonium und Zircaloy},
+ publisher = {Gebr"uder Borntraeger, Berlin, Stuttgart},
+ year = 1980,
+ series = {Materialkundlich-Technische Reihe~5},
+ language = {ngerman}
+}
+
+@Article{torquato1998a,
+ author = {Torquato, S. and Gibiansky, L. V. and Silva, M. J. and
+ Gibson, L. J.},
+ title = {Effective Mechanical and Transport Properties of Cellular
+ Solids},
+ journal = {International Journal of Mechanical Sciences},
+ year = 1998,
+ volume = 40,
+ number = 1,
+ pages = {71--82},
+ language = {english}
+}
+
+@Article{triantafillou1989a,
+ author = {Triantafillou, T. C. and Zhang, J. and Shercliff,
+ T. L. and Gibson, L. J. and Ashby, M. F.},
+ title = {Failure surfaces for cellular materials under
+ multiaxial loads -- {II}.~Comparison of models with
+ experiment},
+ journal = {International Journal of Mechanical Sciences},
+ year = 1997,
+ volume = 39,
+ pages = 549,
+ language = {english}
+}
+
+@TechReport{vesper2000a,
+ author = {Vesper, M. and Steck, E.},
+ title = {Customizing ABAQUS Material Subroutines UMAT Incorporating
+ Constitutive Laws for FCC Polycrystalline Metals},
+ institution = {Institut f\"ur Allgemeine Mechanik und Festigkeitslehre,
+ Technische Universi\"at Braunschweig},
+ year = 2000,
+ type = {Technical Report},
+ address = {Braunschweig},
+ language = {english}
+}
+
+@InProceedings{wadley2001a,
+ author = {Wadley, H. N. G.},
+ title = {Cellular metals manufacturing: an overview of stochastic
+ and periodic concepts},
+ booktitle = {Cellular Metals and Metal Foaming Technology},
+ pages = {137--146},
+ year = 2001,
+ editor = {Banhart, J. and Ashby, M. F. and Fleck, N. A.},
+ address = {Bremen},
+ publisher = {Verlag MIT Publishing},
+ language = {english},
+ isbn = {3-935538-11-1}
+}
+
+@Article{wallach2001a,
+ author = {Wallach, J. C. and Gibson, L. J.},
+ title = {Mechanical behavior of a three-dimensional truss material},
+ journal = {International Journal of Solids and Structures},
+ year = 2001,
+ volume = 38,
+ pages = {7181--7196},
+ language = {english}
+}
+
+
+
+@Article{wallach2001b,
+ author = {Wallach, J. C. and Gibson, L. J.},
+ title = {Defect sensitivity of a {3D} truss material},
+ journal = {Scripta Materialia},
+ year = 2001,
+ volume = 45,
+ pages = {639--644},
+ language = {english}
+}
+
+@Article{wanner2000a,
+ author = {Wanner, A. and Kriszt, B.},
+ title = {Charakterisierung des linear-elastischen Verhaltens von
+ Metallsch\"aumen mittels Ultraschall-Phasenspektroskopie},
+ journal = {Materialwissenschaft und Werkstofftechnik},
+ year = 2000,
+ volume = 31,
+ pages = {481--483},
+ language = {ngerman}
+}
+
+@Article{weaire1994a,
+ author = {Weaire, D. and Fortes, M. A.},
+ title = {Stress and strain in liquid and solid foams},
+ journal = {Advances in Physics},
+ year = 1994,
+ volume = 43,
+ pages = 685,
+ language = {english}
+}
+
+
+@PhdThesis{weber1995a,
+ author = {Weber, M.},
+ title = {Herstellung von Metallsch\"aumen und Beschreibung der
+ Werkstoffeigenschaften},
+ school = {Technische Universit\"at Clausthal},
+ year = 1995,
+ type = {Dissertation},
+ language = {ngerman}
+}
+
+@InProceedings{weiss1999a,
+ author = {Wei\ss{}, S. and Thielecke, F. and Harders, H.},
+ title = {Ein neuer Ansatz zur Modellierung von Luftdatensystemen},
+ booktitle = {Deutscher Luft- und Raumfahrtkongre\ss{} 1999\,/\,DGLR
+ Jahrestagung 1999},
+ year = 1999,
+ address = {Berlin},
+ month = {27.\,--\,30.\,09.},
+ language = {ngerman}
+}
+
+@Book{wellinger1976a,
+ author = {Wellinger, K. and Dietmann, H.},
+ title = {Festigkeitsberechnung: Grundlagen und technische Anwendung},
+ publisher = {Alfred Kr"oner Verlag},
+ year = 1976,
+ address = {Stuttgart},
+ edition = 3,
+ language = {ngerman},
+ isbn = {3-520-90303-2}
+}
+
+@Article{westergaard1939a,
+ author = {Westergaard, H. M.},
+ title = {Bearing Pressures and Cracks},
+ journal = {Journal of Applied Mechanics},
+ year = 1939,
+ volume = 6,
+ pages = {49--53},
+ language = {english}
+}
+
+@MastersThesis{wieding1991a,
+ author = {Wieding, H., v.},
+ title = {Entwicklung eines Programmpaketes zur Berechnung der
+ ertragbaren Spannungen bzw.\ der Lebensdauer bei
+ mehrachsiger Betriebsbeanspruchung auf der Basis der
+ modifizierten Okaederschubspannungshypothese},
+ school = {Institut f\"ur Werkstoffe, TU Braunschweig},
+ year = 1991,
+ type = {Studienarbeit},
+ language = {ngerman}
+}
+
+@Unpublished{witzela,
+ author = {Witzel, W. and Drude, H. and Schwarze, R. and B\"uckle, R.
+ and Hagedorn, U. and Otremba, R.},
+ title = {Torsionspr\"ufung mit Laserextensometer zur Messung von
+ Dehnungsverteilungen},
+ language = {ngerman}
+}
+
+@Misc{www.copper.org,
+ key = {CopperPage},
+ title = {The Copper Page},
+ howpublished = {http://www.copper.org},
+ language = {english}
+}
+
+@Article{yamada2000a,
+ author = {Yamada, Y. and Shimojima, K. and Mabuchi, M. and
+ Nakamura, M. and Asahina, T. and Mukai, T. and
+ Kanahashi, H. and Higashi, K.},
+ title = {Compressive deformation behavior of {Al$_2$O$_3$} foam},
+ journal = {Materials Science and Engineering},
+ year = 2000,
+ volume = {A~277},
+ pages = {213--217},
+ language = {english}
+}
+
+@Article{yang2000a,
+ author = {Yang, C. C. and Nakae, H.},
+ title = {Foam Structure Effect on the Compression Behavior of
+ Foamed Aluminium Alloy},
+ journal = {ISIJ International},
+ year = 2000,
+ volume = 40,
+ number = 12,
+ pages = {1283--1286},
+ language = {english}
+}
+
+@Article{yu1998a,
+ author = {Yu, C.J. and Eifert, H. H. and Banhart, J. and
+ Baumeister, J.},
+ title = {Metal foaming by a powder metallurgy method: Production,
+ properties and applications},
+ journal = {Materials research innovations},
+ year = 1998,
+ volume = 2,
+ pages = {181--188},
+ language = {english}
+}
+
+@InProceedings{zettl1998a,
+ author = {Zettl, B. and Stanzl-Tschegg, S. and Gradinger, R.
+ and Degischer, H. P.},
+ title = {High Cycle Fatigue Properties of Aluminium Foams},
+ booktitle = {Porous and Cellular Materials for Structural Applications},
+ pages = {97--102},
+ year = 1998,
+ editor = {Schwartz, D. S. and Shih, D. S. and Evans, A. G. and
+ Wadley, H. N. G.},
+ volume = 521,
+ series = {Symposium Proceedings},
+ address = {Warrendale, Pennsylvania},
+ month = {April},
+ publisher = {Materials Research Society},
+ language = {english}
+}
+
+
+@InProceedings{zettl1999a,
+ author = {Zettl, B. and Stanzl-Tschegg, S.},
+ title = {Fatigue of Aluminium Foams at Ultrasonic
+ Frequencies},
+ booktitle = {Metal Foams and Porous Metal Structures},
+ pages = {373--378},
+ year = 1999,
+ editor = {Banhart, J. and Ashby, M. F. and Fleck, N. A.},
+ publisher = {MIT Verlag},
+ language = {english}
+}
+
+
+@InProceedings{zettl2000a,
+ author = {Zettl, B. and Stanzl-Tschegg, S.},
+ title = {Er\"udungssch\"aden in Aluminiumschaum},
+ booktitle = {Metallsch\"aume},
+ pages = {484--487},
+ year = 2000,
+ editor = {Degischer, H. P.},
+ publisher = {Wiley-VCH},
+ language = {ngerman}
+}
+
+@Article{zettl2000b,
+ author = {Zettl, B. and Stanzl-Tschegg, S.},
+ title = {Erm\"udungssch\"aden in Aluminiumschaum},
+ journal = {Materialwissenschaft und Werkstofftechnik},
+ year = 2000,
+ volume = 31,
+ pages = {484--487},
+ language = {ngerman}
+}
+
+@Book{zhang1989a,
+ author = {Zhang, J.},
+ title = {The Mechanics of Foams and Honeycombs},
+ publisher = {University of Cambridge},
+ year = 1989,
+ language = {english}
+}
+
+@Article{zhou2002a,
+ author = {Zhou, J. and Mercer, C. and Soboyejo, W. O.},
+ title = {An Investigation of the Mictrostructure and Strengh of
+ Open-Cell 6101 Aluminum Foams},
+ journal = {Metallurgical and Materials Transactions A},
+ year = 2002,
+ volume = {33A},
+ pages = {1413--1427},
+ month = {May},
+ language = {english}
+}
+
+@InCollection{ziegler1991a,
+ author = {Ziegler, G.},
+ title = {Engineering Properties of Carbon-Carbon and Ceramic-Matrix
+ Composites},
+ booktitle = {Ceramics and Glasses},
+ pages = {835--844},
+ publisher = {ASM International},
+ year = 1991,
+ editor = {Schneider, Samuel J.},
+ volume = 4,
+ series = {Engineered Materials Handbook},
+ language = {english},
+ isbn = {0-87170-282-7}
+}
+
+@PhdThesis{zorn2002a,
+ author = {Zorn, C.},
+ title = {Plastisch instabile Verformung aufgrund dynamischer
+ Reckalterung und korrelierten Versetzungsgleitens},
+ school = {Mechanik"=Zentrum, TU Braunschweig},
+ year = 2002,
+ type = {Dissertation},
+ language = {ngerman},
+ isbn = {3-920395-45-X}
+}
+
+@PhDThesis{ov-mori-sanchez2002,
+ author = {Mori-S{\'a}nchez, Paula},
+ title = {Densidad electr{\'o}nica y enlace qu{\'\i}mico.
+ {De} la mol{\'e}cula al cristal},
+ year = 2002,
+ month = {Febrero},
+ type = {Tesis Doctoral},
+ school = {Universidad de Oviedo},
+ language = {spanish},
+ url = {http://www.uniovi.es/~quimica.fisica/qcg/pms/tesis.html},
+ }
+
+@MastersThesis{ov-montes2002,
+ author = {Men{\'e}ndez Montes, Jos{\'e} Manuel},
+ title = {Sumas electrost{\'a}ticas en sistemas bidimensionales:
+ Fundamentos, algoritmos y aplicaciones},
+ year = 2002,
+ school = {Universidad de Oviedo},
+ type = {{S}eminario de {I}nvestigaci{\'o}n},
+ note = {Directores: A. Mart{\'\i}n Pend{\'a}s
+ M. A. Blanco y A. Costales Castro},
+ pages = 127,
+ language = {spanish},
+}
+
+@misc{ov-luana2002,
+ author = {Lua{\~n}a, V{\'\i}ctor},
+ booktitle = {Curso de Espectroscop\'{\i}a Molecular 2002},
+ title = {Curso de Espectroscop\'{\i}a Molecular 2002},
+ year = 2002,
+ abstract = {%
+ Conjunto de 166 transparencias en formato PDF creadas para impartir
+ la asignatura Espectroscop\'{\i}a Molecular correspondiente al
+ tercer a\~{n}o de la Licenciatura en Ciencias Qu\'{\i}micas. Estas
+ transparencias, junto con el resto del material docente desarrollado,
+ est\'{a}n disponibles en el servidor web de la Universidad de Oviedo.
+ },
+ url = {http://www.uniovi.es/~quimica.fisica/qcg/asignaturas.html},
+ language = {spanish},
+}
+
+@Book{ov-LG2002,
+ author = {Lua{\~n}a, V{\'\i}ctor
+ and Garc{\'\i}a Fern{\'a}ndez, V. M.
+ and Francisco, E.
+ and Recio, J. M.},
+ title = {Espectroscop\'{\i}a Molecular},
+ year = 2002,
+ publisher = {{S}ervicio de {P}ublicaciones, {U}niversidad de {O}viedo},
+ address = {Oviedo},
+ isbn = {84-8317-273-9},
+ pages = {269+x},
+ note = {269+x p\'{a}gs},
+ language = {spanish},
+}
+
+@Article{ov-PB86,
+ author = {Pueyo, L.
+ and Barandiar{\'a}n, Z.
+ and Fern{\'a}ndez Rodrigo, G.
+ and Fl{\'o}rez, M.
+ and Francisco, E.
+ and Lua{\~n}a, V.
+ and Recio, J. M.
+ and van der Maelen, F. J.
+ and Bermejo, M.
+ and Seijo, L.},
+ title = {Algunos problemas en el c\'{a}lculo de la estructura
+ electr\'{o}nica de iones de transici\'{o}n en redes
+ i\'{o}nicas},
+ journal = {Studia Chemica},
+ year = 1986,
+ volume = 11,
+ pages = {285--301},
+ note = {(Homenaje a Jos\'{e} Antonio Herr\'{a}ez)},
+ language = {spanish},
+}
+
+@Book{plateau1873a,
+ author = {Plateau, Joseph},
+ title = {Statique exp\'erimentale et th\'eorique des liquides},
+ publisher = {Gauthier-Villars},
+ year = 1873,
+ volume = 1,
+ address = {Paris},
+ language = {frenchb}
+}
+
+@Article{voronoi1908a,
+ author = {Vorono\"\i, G.},
+ title = {Nouvelles applications des param\`etres continus \`a la
+ th\'eorie des formes quadratiques},
+ journal = {Journal f\"ur die reine und angewandte Mathematik},
+ year = 1908,
+ volume = 134,
+ pages = {198--312},
+ language = {frenchb}
+}
+
+@InProceedings{BK_2003_GP,
+ author = {Bosk'akh, R'ania and Kazantz'h, D'hmhtra},
+ title = {Ex'aleiyh amfishmi'wn se ousiastikopoihm'ena ep'ijeta kai
+ epirr'hmata},
+ booktitle = {Praktik'a 6ou Diejno'uc Sunedr'iou Ellhnik'hc Glwssolog'iac},
+ year = 2003,
+ month = {Sept'embrioc},
+ organization = {Panepist'hmio thc Kr'hthc},
+ url = {http://www.philology.uoc.gr/conferences/6thICGL/},
+ language = {greek}
+}
+
+@Book{KM2005_GB,
+ editor = {Kla'irhc, Qr'hstoc and Mpampini'wthc, Ge'wrgioc},
+ title = {Grammatik'h thc N'eac Ellhnik'hc: Domoleitourgik'h --
+ Epikoinwniak'h},
+ publisher = {Ellhnik'a Gr'ammata},
+ year = 2005,
+ address = {Aj'hna},
+ language = {greek}
+
+}
+
+@Book{T1995_GB,
+ author = {Tsitsip'hc, L.},
+ title = {Eisagwg'h sthn anjrwpolog'ia thc gl'wssac: Gl'wssa,
+ ideolog'ia, dialogik'othta kai epit'elesh},
+ publisher = {\textlatin{Gutenberg}},
+ year = 1995,
+ address = {Aj'hna},
+ language = {greek}
+}
+
+
+@Article{T1986_GA,
+ author = {Jeofanopo'ulou-Konto'u, D'hmhtra},
+ title = {Ken'ec Kathgor'iec kai Klitik'a sth N'ea Ellhnik'h},
+ journal = {Glwssolog'ia},
+ year = {1986--1987},
+ number = {5--6},
+ language = {greek}
+}
+
+@PhdThesis{M1985_GPHD,
+ author = {Margar'ith, Mari'anna},
+ title = {Fwnologik'h An'alush tou Siatistino'u Idi'wmatoc},
+ school = {Aristot'eleio Panepist'hmio Jessalon'ikhc},
+ year = 1985,
+ language = {greek}
+}
+
+@MastersThesis{W1998_GMA,
+ author = {Wrai'opouloc, Jras'ubouloc},
+ title = {Eisagwg'h sth morfolog'ia thc \textlatin{Navajo}},
+ school = {Panepist'hmio Agr'afwn},
+ year = 1998,
+ language = {greek}
+}
+
+@TechReport{W1999_GTA,
+ author = {Wrai'opouloc, Jras'ubouloc},
+ title = {Eisagwg'h sth s'untaxh thc \textlatin{Navajo}},
+ institution = {Fantasiak'o Ereunhtik'o 'Idruma},
+ year = 1999,
+ language = {greek}
+}
+
+
+@Book{W2003num_GBED,
+ editor = {Wrai'opouloc, Jras'ubouloc},
+ title = {N'eec prosegg'iseic sth s'untaxh thc \textlatin{Navajo}},
+ publisher = {Indi'anika Gr'ammata},
+ year = 2003,
+ edition = 3,
+ address = {Aj'hna},
+ language = {greek}
+}
+
+@misc{K2005_GMMISC,
+ title = {Glwssik'ec Ask'hseic me b'ash to Ep'itomo Lexik'o Kriar'a},
+ year = 2005,
+ url = {http://www.komvos.edu.gr/dictionaries/dictonline/DictOnLineKri.htm},
+ language = {greek},
+}
+
+
+@Article{portuguese,
+ author = {Nobody, N.},
+ title = {Portuguese},
+ journal = {Any},
+ year = 2009,
+ month = jul,
+ language = {portuguese}
+}
+
+@Article{brazilian,
+ author = {Nobody, N.},
+ title = {Brazilian},
+ journal = {Any},
+ year = 2009,
+ month = jul,
+ language = {brazilian}
+}
+
diff --git a/biblio/bibtex/contrib/babelbib/babelbibtest.tex b/biblio/bibtex/contrib/babelbib/babelbibtest.tex
new file mode 100644
index 0000000000..7b4a97919e
--- /dev/null
+++ b/biblio/bibtex/contrib/babelbib/babelbibtest.tex
@@ -0,0 +1,115 @@
+%\documentclass[spanish,ngerman,frenchb,greek,portuguese,brazilian,romanian,swedish,serbian,english]{article}
+%\documentclass[spanish,ngerman,english,frenchb]{article}
+%\documentclass[spanish,frenchb,english,ngerman]{article}
+%\documentclass[frenchb,english,ngerman,spanish]{article}
+\documentclass[greek,brazilian,portuguese,frenchb,english,ngerman,romanian,spanish,czech]{article}
+\usepackage[latin1]{inputenc}
+\usepackage{url}
+\usepackage{babel}
+
+%% Load package with fixed language or flexible language:
+%\usepackage[annote,languagenames]{babelbib}[2003/04/21]
+\usepackage[annote,languagenames,datenumeric,fixlanguage]{babelbib}[2003/04/21]
+
+%% force a fall-back language other than the document's language
+\setbtxfallbacklanguage{ngerman}
+
+%% Switch off to print ISBNs and ISSNs:
+\btxprintISBN{false}
+\btxprintISSN{false}
+
+%% Auto format date strings in 'urldate'
+\IfFileExists{isodate.sty}{%
+ \usepackage[short]{isodate}
+ \setbibliographyfont{urldate}{\printdate}
+}{\typeout{Package isodate not available. Skipping that functionality}}
+
+%% Change font for some parts of the bibliography:
+%\setbibliographyfont{name}{\textsc}
+%\setbibliographyfont{lastname}{\textsc}
+%\setbibliographyfont{title}{\textbf}
+\setbibliographyfont{jtitle}{}
+%\setbibliographyfont{etal}{}
+%\setbibliographyfont{volume}{\textsc}
+\setbibliographyfont{journal}{\emph}
+\setbibliographyfont{numeral}{\textsuperscript}
+
+%% Change language for bibliography when option `fixlanguage' is chosen:
+%\selectbiblanguage{ngerman}
+
+%% Change or add keywords to specific languages:
+%\declarebtxcommands{english}{%
+% \def\btxphdthesis#1{\foreignlanguage{english}{Ph.D.\ thesis}}%
+%}
+%\declarebtxcommands{ngerman}{%
+% \def\btxphdthesis#1{\foreignlanguage{ngerman}{Doktorarbeit}}%
+%}
+\declarebtxcommands{english}{%
+ \def\btxfnamespaceshort{\,}%
+ \def\btxeditionnumerallong#1{%
+ \ifnumber{#1}{%
+ \ifcase#1 0\or first\or second\or third\or forth\or fifth\or
+ sixth\or seventh\or eighth\or nineth\or tenth\else
+ \btxeditionnumeralenglish{english}{#1}%
+ \fi}{#1}}%
+% \def\btxeditionnumerallong#1{\btxeditionnumeralenglish{english}{#1}}%
+ \def\btxurldatecomment#1{ [#1]}%
+}
+
+%% Use the next line to avoid the babamspl style to print out the
+%% language names:
+% \newcommand\btxprintamslanguage[1]{}
+
+%\newcommand\btxprintmonthyear[2]{\ifnumber{#1}{#1/#2}{#1\ #2}}
+\newcommand\btxprintmonthyearasdf[4]{%
+ \ifnumber{#2}{%
+ \ifcase #2 \or
+ \csname btxmonjan#4\endcsname{#1}\or
+ \btxmonfeblong{#1}\or \btxmonmarlong{#1}\or
+ \btxmonaprlong{#1}\or \btxmonmaylong{#1}\or \btxmonjunlong{#1}\or
+ \btxmonjullong{#1}\or \btxmonauglong{#1}\or \btxmonseplong{#1}\or
+ \btxmonoctlong{#1}\or \btxmonnovlong{#1}\or \btxmondeclong{#1}\fi
+ \ #3%
+ }{%
+ #2\ #3}%
+}
+
+\declarebtxcommands{english}{%
+ \def\btxprintmonthyearnum#1#2{#1-#2}%
+}
+
+\begin{document}
+If you change \verb|\usepackage[languagenames,fixlanguage]{babelbib}| to
+\verb|\usepackage[languagenames]{babelbib}|, the
+bibliography will change the language citation-dependent.
+Then, an error will appear at citation in a language that is not yet
+available.
+This is normal and can be avoided by helping me to add that language.
+
+You may change the \verb|\bibliographystyle| line to test all styles.
+
+There are most of the available commands to change anything in the
+source code, but commented out.
+Remove the \%\ in order to see the effects.
+
+\nocite*
+
+%% Choose one BibTeX style:
+%\bibliographystyle{plain}
+%\bibliographystyle{bababbrv}
+%\bibliographystyle{bababbrv-lf}
+%\bibliographystyle{bababbrv-fl}
+\bibliographystyle{babplain}
+%\bibliographystyle{babplain-lf}
+%\bibliographystyle{babplain-fl}
+%\bibliographystyle{babalpha}
+%\bibliographystyle{babunsrt}
+%\bibliographystyle{babamspl}
+
+\bibliography{babelbibtest}
+
+\ifnumber{3}{3/2009}{Mrz 2009}
+
+\ifnumber{Mrz}{3/2009}{Mrz 2009}
+
+\end{document}
diff --git a/biblio/bibtex/contrib/babelbib/getversion.tex b/biblio/bibtex/contrib/babelbib/getversion.tex
new file mode 100644
index 0000000000..1420a53f99
--- /dev/null
+++ b/biblio/bibtex/contrib/babelbib/getversion.tex
@@ -0,0 +1,8 @@
+\documentclass[english]{ltxdoc}
+\nofiles
+\usepackage{babel}
+\usepackage{babelbib}
+\GetFileInfo{babelbib.sty}
+\typeout{VERSION \fileversion}
+\begin{document}
+\end{document}
diff --git a/biblio/bibtex/contrib/babelbib/tugboat-babelbib.pdf b/biblio/bibtex/contrib/babelbib/tugboat-babelbib.pdf
new file mode 100644
index 0000000000..224cf440d8
--- /dev/null
+++ b/biblio/bibtex/contrib/babelbib/tugboat-babelbib.pdf
Binary files differ
diff --git a/biblio/bibtex/contrib/bath-bst/Makefile b/biblio/bibtex/contrib/bath-bst/Makefile
new file mode 100644
index 0000000000..63bb81e277
--- /dev/null
+++ b/biblio/bibtex/contrib/bath-bst/Makefile
@@ -0,0 +1,72 @@
+NAME = bath-bst
+BST1 = bath.bst
+BST2 = bathx.bst
+SHELL = bash
+PWD = $(shell pwd)
+TEMP := $(shell mktemp -d -t tmp.XXXXXXXXXX)
+TDIR = $(TEMP)/$(NAME)
+VERS = $(shell ltxfileinfo -v $(NAME).dtx)
+LOCAL = $(shell kpsewhich --var-value TEXMFLOCAL)
+UTREE = $(shell kpsewhich --var-value TEXMFHOME)
+
+.PHONY: source clean distclean inst install uninst uninstall zip ctan
+
+all: $(BST1) $(BST2) $(NAME)-v1.pdf $(NAME).pdf clean
+ @exit 0
+
+source: $(BST1) $(BST2) $(NAME).bib $(NAME)-v1.tex $(NAME)-v1.bib
+
+$(BST1) $(BST2) $(NAME).bib $(NAME)-v1.tex $(NAME)-v1.bib: $(NAME).dtx
+ luatex -interaction=batchmode $(NAME).dtx >/dev/null
+
+$(NAME).pdf: $(NAME).dtx $(BST2) $(NAME).bib
+ latexmk -silent -lualatex -synctex=1 -interaction=batchmode $(NAME).dtx >/dev/null
+ @echo "Compilation of main PDF complete."
+
+$(NAME)-v1.pdf: $(NAME)-v1.tex $(BST1) $(NAME)-v1.bib
+ latexmk -silent -lualatex -synctex=1 -interaction=batchmode $(NAME)-v1.tex >/dev/null
+ @echo "Compilation of test PDF complete."
+
+clean:
+ rm -f $(NAME){,-v1}.{aux,bbl,bcf,blg,doc,fdb_latexmk,fls,glo,gls,hd,idx,ilg,ind,listing,log,nav,out,run.xml,snm,synctex.gz,tcbtemp,toc,vrb}
+ rm -f $(NAME){,-v1}.markdown.in
+ rm -rf _markdown_$(NAME)
+
+distclean: clean
+ rm -f $(NAME).{pdf,bib,ins} $(BST1) $(BST2) $(NAME)-v1.{pdf,bib,tex}
+
+inst: all
+ mkdir -p $(UTREE)/{source,doc}/bibtex/$(NAME)
+ mkdir -p $(UTREE)/bibtex/bst/$(NAME)
+ cp $(NAME).dtx $(NAME).ins $(UTREE)/source/bibtex/$(NAME)
+ cp $(NAME).{bib,pdf} $(NAME)-v1.{pdf,bib,tex} $(UTREE)/doc/bibtex/$(NAME)
+ cp $(BST1) $(BST2) $(UTREE)/bibtex/bst/$(NAME)
+ mktexlsr
+
+uninst:
+ rm -r $(UTREE)/{source,doc}/bibtex/$(NAME)
+ rm -r $(UTREE)/bibtex/bst/$(NAME)
+ mktexlsr
+
+install: all
+ sudo mkdir -p $(LOCAL)/{source,doc}/bibtex/$(NAME)
+ sudo mkdir -p $(LOCAL)/bibtex/bst/$(NAME)
+ sudo cp $(NAME).dtx $(NAME).ins $(LOCAL)/source/bibtex/$(NAME)
+ sudo cp $(NAME).{bib,pdf} $(NAME)-v1.{pdf,bib,tex} $(LOCAL)/doc/bibtex/$(NAME)
+ sudo cp $(BST1) $(BST2) $(LOCAL)/bibtex/bst/$(NAME)
+ mktexlsr
+
+uninstall:
+ sudo rm -r $(LOCAL)/{source,doc}/bibtex/$(NAME)
+ sudo rm -r $(LOCAL)/bibtex/bst/$(NAME)
+ mktexlsr
+
+zip: all
+ mkdir $(TDIR)
+ cp $(NAME).{dtx,bib,pdf} $(NAME)-v1.{pdf,bib,tex} $(BST1) $(BST2) README.md Makefile $(TDIR)
+ cd $(TEMP); zip -Drq $(PWD)/$(NAME)-$(VERS).zip $(NAME)
+
+ctan: all
+ mkdir $(TDIR)
+ cp $(NAME).{dtx,pdf} $(NAME)-v1.pdf README.md Makefile $(TDIR)
+ cd $(TEMP); zip -Drq $(PWD)/$(NAME)-$(VERS).zip $(NAME)
diff --git a/biblio/bibtex/contrib/bath-bst/README.md b/biblio/bibtex/contrib/bath-bst/README.md
new file mode 100644
index 0000000000..cd073944a3
--- /dev/null
+++ b/biblio/bibtex/contrib/bath-bst/README.md
@@ -0,0 +1,111 @@
+# bath-bst: Harvard referencing style as recommended by the University of Bath Library
+
+This package provides a [BibTeX] style to format reference lists in the
+[Harvard style][bath-harvard] recommended by the University of Bath Library.
+It should be used in conjunction with [natbib] for citations.
+
+## Installation
+
+The files you need are included in the zip archive available from [GitHub].
+If you use the zip archive from [CTAN], you will need to run `luatex
+bath-bst.dtx` to generate them.
+
+You can use this style simply by copying the `bath.bst`/`bathx.bst` files into
+your working directory, that is, the directory holding the main `.tex` file for
+your document. If you want the style to be available for all your documents
+without having to copy it over each time, you can install it using the
+instructions below.
+
+### Managed way
+
+The latest stable release of bath-bst has been packaged for TeX Live and
+MiKTeX. If you are running TeX Live and have `tlmgr` installed, you can install
+the package simply by running `tlmgr install bath-bst`. If you are running
+MiKTeX, you can install the package by running `mpm --install=bath-bst`.
+Both `tlmgr` and `mpm` have GUI versions that you might find friendlier.
+
+### Automated way
+
+A makefile is provided which you can use with the Make utility on
+UNIX-like systems:
+
+ * Running `make source` generates the derived files
+ - `README.md`
+ - `bath.bst` and `bathx.bst`
+ - `bath-bst-v1.tex`
+ - `bath-bst.bib` and `bath-bst-v1.bib`
+ - `bath-bst.ins`
+ * Running `make` generates the above files and also `bath-bst.pdf` and
+ `bath-bst-v1.pdf`. Ensure you have (at least) the [luatexja], [adobemapping]
+ and [ipaex] packages installed first.
+ * Running `make inst` installs the files in the user's TeX tree.
+ You can undo this with `make uninst`.
+ * Running `make install` installs the files in the local TeX tree.
+ You can undo this with `make uninstall`.
+
+### Manual way
+
+You do not need to follow the first step if you downloaded the zip archive from
+[GitHub]. You do not need to follow the second step if you already have the PDF
+documentation.
+
+ 1. Run `luatex bath-bst.dtx` to generate the source files.
+
+ 2. Compile `bath-bst.dtx` with [LuaLaTeX] and BibTeX to generate the
+ documentation. You will need, among other things, the [luatexja],
+ [adobemapping] and [ipaex] packages installed; this is just for the
+ documentation, not for the BibTeX style itself. To generate the version 1
+ tests and documentation, compile `bath-bst-v1.tex` with LuaLaTeX and BibTeX.
+
+ 3. If you are using TeX Live, find your home TeX tree using the following
+ command at the command prompt/terminal:
+
+ ```
+ kpsewhich -var-value=TEXMFHOME
+ ```
+
+ If you are using MikTeX, consult the MikTeX manual entry for [integrating
+ local additions](http://docs.miktex.org/manual/localadditions.html). You
+ can use one of the roots (TeX trees) already defined – preferably one of
+ the User roots – or set up a new one.
+
+ 4. Move the files to your TeX tree as follows:
+ - `source/bibtex/bath-bst`:
+ `bath-bst.dtx`,
+ (`bath-bst.ins`)
+ - `bibtex/bst/bath-bst`:
+ `bath.bst`,
+ `bathx.bst`
+ - `doc/bibtex/bath-bst`:
+ `bath-bst.pdf`,
+ `bath-bst-v1.pdf`,
+ `README.md`
+
+ 5. You may then have to update your installation's file name database
+ before TeX and friends can see the files.
+
+[bath-harvard]: https://library.bath.ac.uk/referencing/harvard-bath
+[BibTeX]: http://ctan.org/pkg/bibtex
+[GitHub]: https://github.com/alex-ball/bathbib/releases
+[CTAN]: http://ctan.org/pkg/bath-bst
+[natbib]: http://www.ctan.org/pkg/natbib
+[LuaLaTeX]: http://ctan.org/pkg/lualatex-doc
+[luatexja]: http://ctan.org/pkg/luatexja
+[adobemapping]: http://ctan.org/pkg/adobemapping
+[ipaex]: http://ctan.org/pkg/ipaex
+
+## Licence
+
+Copyright 2016-2018 University of Bath.
+
+This work consists of the documented LaTeX file bath-bst.dtx and a Makefile.
+
+The text files contained in this work may be distributed and/or modified
+under the conditions of the [LaTeX Project Public License (LPPL)][lppl],
+either version 1.3c of this license or (at your option) any later
+version.
+
+This work is ‘maintained’ (as per LPPL maintenance status) by [Alex Ball][me].
+
+[lppl]: http://www.latex-project.org/lppl.txt "LaTeX Project Public License (LPPL)"
+[me]: https://github.com/alex-ball/bathbib "Alex Ball"
diff --git a/biblio/bibtex/contrib/bath-bst/bath-bst-v1.pdf b/biblio/bibtex/contrib/bath-bst/bath-bst-v1.pdf
new file mode 100644
index 0000000000..ce82e8fbfc
--- /dev/null
+++ b/biblio/bibtex/contrib/bath-bst/bath-bst-v1.pdf
Binary files differ
diff --git a/biblio/bibtex/contrib/bath-bst/bath-bst.dtx b/biblio/bibtex/contrib/bath-bst/bath-bst.dtx
new file mode 100644
index 0000000000..1c1560d008
--- /dev/null
+++ b/biblio/bibtex/contrib/bath-bst/bath-bst.dtx
@@ -0,0 +1,6094 @@
+% \iffalse meta-comment
+%<*internal>
+\iffalse
+%</internal>
+%<*bst1|bst2>
+%</bst1|bst2>
+%<*readme>
+# bath-bst: Harvard referencing style as recommended by the University of Bath Library
+%</readme>
+%<*internal>
+\fi
+\def\nameofplainTeX{plain}
+\ifx\fmtname\nameofplainTeX\else
+ \expandafter\begingroup
+\fi
+%</internal>
+%<*install>
+\input docstrip.tex
+\keepsilent
+\askforoverwritefalse
+
+\nopreamble\nopostamble
+
+\usedir{doc/bibtex/\jobname}
+\generate{
+ \file{README.md}{\from{\jobname.dtx}{readme}}
+ \file{\jobname.bib}{\from{\jobname.dtx}{bib}}
+}
+
+\preamble
+----------------------------------------------------------------
+bath-bst --- Harvard referencing style as recommended by the University of Bath Library
+Author: Alex Ball
+E-mail: a.j.ball@bath.ac.uk
+License: Released under the LaTeX Project Public License v1.3c or later
+See: http://www.latex-project.org/lppl.txt
+----------------------------------------------------------------
+
+\endpreamble
+\postamble
+
+Copyright (C) 2019 by University of Bath
+\endpostamble
+
+\usedir{bibtex/bst/\jobname}
+\generate{
+ \file{bath.bst}{\from{\jobname.dtx}{bst1}}
+ \file{bathx.bst}{\from{\jobname.dtx}{bst2}}
+}
+%</install>
+%<install>\endbatchfile
+%<*internal>
+\usedir{source/bibtex/\jobname}
+\generate{
+ \file{\jobname.ins}{\from{\jobname.dtx}{install}}
+}
+\usedir{doc/bibtex/\jobname}
+\generate{
+ \file{bath-bst-v1.tex}{\from{\jobname.dtx}{tex1}}
+}
+\nopreamble\nopostamble
+\generate{
+ \file{bath-bst.bib}{\from{\jobname.dtx}{bib}}
+ \file{bath-bst-v1.bib}{\from{\jobname.dtx}{bib1}}
+}
+\ifx\fmtname\nameofplainTeX
+ \expandafter\endbatchfile
+\else
+ \expandafter\endgroup
+\fi
+%</internal>
+%<tex1>\ProvidesFile{bath-bst-v1.tex}
+%<*driver>
+\ProvidesFile{bath-bst.dtx}
+%</driver>
+%<*driver|tex1>
+ [2019/07/10 v3.0 Harvard referencing style as recommended by the University of Bath Library]
+
+\documentclass[10pt,a4paper]{article}
+\usepackage[british]{babel}
+\usepackage[hmargin=3cm,vmargin=2.5cm]{geometry}
+\frenchspacing
+
+% For typesetting the CJK example
+
+\usepackage{iftex}
+\ifPDFTeX
+ \usepackage{CJKutf8}
+\else
+ \ifLuaTeX
+ \usepackage{luatexja-fontspec}
+ \setmainjfont{IPAexGothic}
+ \else
+ \ifXeTeX
+ \usepackage{ctex}
+ \fi
+ \fi
+\fi
+
+% For typesetting the examples
+
+\usepackage{xpatch,csquotes,xcolor,xparse,multicol,fancyvrb}
+\xdefinecolor{Green}{rgb}{0,.5,0}
+\xdefinecolor{Slate}{RGB}{80,86,94}
+\xdefinecolor{BathStone}{RGB}{213,211,185}
+\colorlet{ok}{Green}
+\colorlet{todo}{red}
+\colorlet{hacked}{orange}
+\colorlet{manual}{purple}
+\RecustomVerbatimEnvironment
+ {Verbatim}{Verbatim}
+ {commentchar=\%}
+
+\usepackage[tightLists=false]{markdown}
+\markdownSetup{rendererPrototypes={%
+ link = {\href{#3}{#1}}%
+}}
+
+\usepackage{fontawesome}[2015/07/07]
+\newcommand{\booksym}{\makebox[1em][c]{\faicon{book}}}
+\newcommand{\cogsym}{\makebox[1em][c]{\faicon{cog}}}
+\makeatletter
+\newcommand{\hangfrom}[1]{%
+ \setbox\@tempboxa\hbox{{#1}}%
+ \hangindent \wd\@tempboxa\noindent\box\@tempboxa}
+\makeatother
+\newenvironment{tips}{%
+ \begin{list}{\makebox[2em][c]{\faLightbulbO}}{%
+ \setlength{\leftmargin}{2em}
+ \setlength{\labelwidth}{2em}
+ \setlength{\labelsep}{0pt}}
+}{\end{list}}
+\newenvironment{info}{%
+ \begin{list}{\makebox[2em][c]{\faInfoCircle}}{%
+ \setlength{\leftmargin}{2em}
+ \setlength{\labelwidth}{2em}
+ \setlength{\labelsep}{0pt}}
+}{\end{list}}
+\newenvironment{hacks}{%
+ \begin{list}{\makebox[2em][c]{\faWrench}}{%
+ \setlength{\leftmargin}{2em}
+ \setlength{\labelwidth}{2em}
+ \setlength{\labelsep}{0pt}}
+}{\end{list}}
+
+\usepackage{tcolorbox}
+\tcbuselibrary{listings,breakable,skins,xparse}
+\colorlet{Option}{violet}
+\newcommand*{\key}[1]{\textcolor{Option}{\ttfamily #1}}
+\lstdefinelanguage{bafll}%
+ { alsoletter={.}
+ , morekeywords=[2]%
+ { add.period$
+ , call.type$
+ , change.case$
+ , chr.to.int$
+ , cite$
+ , duplicate$
+ , empty$
+ , format.name$
+ , global.max$
+ , if$
+ , int.to.chr$
+ , int.to.str$
+ , missing$
+ , newline$
+ , num.names$
+ , pop$
+ , preamble$
+ , purify$
+ , quote$
+ , skip$
+ , sort.key$
+ , stack$
+ , substring$
+ , swap$
+ , text.length$
+ , text.prefix$
+ , top$
+ , type$
+ , warning$
+ , while$
+ , width$
+ , write$
+ }
+ , morekeywords=[3]%
+ { ENTRY
+ , INTEGERS
+ , STRINGS
+ , MACRO
+ , FUNCTION
+ , READ
+ , EXECUTE
+ , ITERATE
+ , SORT
+ , REVERSE
+ }
+ , morekeywords=[1]{}
+ , otherkeywords=%
+ { +
+ , -
+ , >
+ , <
+ , =
+ , *
+ , :=
+ }
+ , sensitive=true
+ , morestring=[b]"
+ , morecomment=[l]\%
+ }[keywords,strings,comments]
+\lstloadlanguages{[LaTeX]TeX,bafll}
+\lstdefinestyle{dtxlatex}%
+ { columns=fullflexible
+ , basicstyle=\ttfamily
+ , language={[LaTeX]TeX}
+ , texcsstyle=*\color{red!75!black}
+ , commentstyle=\color{gray}\itshape
+ , moretexcs=
+ { citet
+ , citep
+ , defcitealias
+ , citepalias
+ , citetalias
+ , noop
+ , urlprefix
+ , urldateprefix
+ }
+ , moredelim=**[s][\color{violet}]{[}{]}
+ , moredelim=**[s][\color{blue!75!black}]{\{}{\}}
+ }
+\lstdefinestyle{dtxbst}%
+ { columns=fullflexible
+ , basicstyle=\ttfamily
+ , language=bafll
+ , keywordstyle=[1]\color{orange!75!black}
+ , keywordstyle=[2]\color{red!75!black}
+ , keywordstyle=[3]\color{green!50!black}
+ , commentstyle=\color{gray}\itshape
+ , stringstyle=\color{violet}
+ , mathescape=false
+ , showstringspaces=false
+ }
+\lstset{style=dtxlatex}
+\tcbset
+ { colframe = Slate
+ , colback = BathStone!25
+ , listing options =
+ { style = tcblatex
+ , style = dtxlatex
+ , basicstyle=\ttfamily\small
+ }
+ }
+\NewTColorBox{bibexbox}{D(){ok}d<>m}%
+ {bicolor
+ ,colframe = #1
+ ,colback = #1!5!white
+ ,colbacklower = white
+ ,fontlower = \footnotesize
+ ,before upper = {\hangfrom{\booksym\space}}
+ ,after upper = {\par\hangfrom{\cogsym\space}\bibentry{#3}.}
+ ,IfNoValueTF={#2}{}%
+ {overlay = {
+ \node[anchor=south east,text=teal] at (frame.south east) {#2};
+ }
+ }
+ }
+%</driver|tex1>
+%<*driver>
+% For typesetting the implementation
+\usepackage{doc}
+\makeatletter
+\newwrite\ydocwrite
+\def\ydocfname{\jobname.listing}
+\def\ydoc@catcodes{%
+ \let\do\@makeother
+ \dospecials
+ \catcode`\\=\active
+ \catcode`\^^M=\active
+ \catcode`\ =\active
+}
+\def\macrocode{%
+ \begingroup
+ \ydoc@catcodes
+ \macro@code
+}
+\def\endmacrocode{}
+\begingroup
+\endlinechar\m@ne
+\@firstofone{%
+\catcode`\|=0\relax
+\catcode`\(=1\relax
+\catcode`\)=2\relax
+\catcode`\*=14\relax
+\catcode`\{=12\relax
+\catcode`\}=12\relax
+\catcode`\ =12\relax
+\catcode`\%=12\relax
+\catcode`\\=\active
+\catcode`\^^M=\active
+\catcode`\ =\active
+}*
+|gdef|macro@code#1^^M% \end{macrocode}(*
+|endgroup|expandafter|macro@@code|expandafter(|ydoc@removeline#1|noexpand|lastlinemacro)*
+)*
+|gdef|ydoc@removeline#1^^M(|noexpand|firstlinemacro)*
+|gdef|ydoc@defspecialmacros(*
+|def^^M(|noexpand|newlinemacro)*
+|def (|noexpand|spacemacro)*
+|def\(|noexpand|bslashmacro)*
+)*
+|gdef|ydoc@defrevspecialmacros(*
+|def|newlinemacro(|noexpand^^M)*
+|def|spacemacro(|noexpand )*
+|def|bslashmacro(|noexpand\)*
+)*
+|endgroup
+\def\macro@@code#1{%
+ {\ydoc@defspecialmacros
+ \xdef\themacrocode{#1}}%
+ \PrintMacroCode
+ \end{macrocode}%
+}
+\def\PrintMacroCode{%
+ \begingroup
+ \let\firstlinemacro\empty
+ \let\lastlinemacro\empty
+ \def\newlinemacro{^^J}%
+ \let\bslashmacro\bslash
+ \let\spacemacro\space
+ \immediate\openout\ydocwrite=\ydocfname\relax
+ \immediate\write\ydocwrite{\themacrocode}%
+ \immediate\closeout\ydocwrite
+ \let\input\@input
+ \tcbinputlisting{enhanced,breakable,size=small,listing only,listing file=\ydocfname}%
+ \endgroup
+}
+\makeatother
+%</driver>
+%<*driver|tex1>
+
+% Documentation
+
+\usepackage{natbib}
+\newcommand*{\urlprefix}{Available from: }
+\newcommand*{\urldateprefix}{Accessed }
+
+\usepackage{bibentry}
+%<*driver>
+\bibliographystyle{bathx}
+%</driver>
+%<tex1>\bibliographystyle{bath}
+\nobibliography*
+
+\usepackage{readprov}
+\usepackage[british,cleanlook]{isodate}
+
+\usepackage[colorlinks,citecolor=black]{hyperref}
+\makeatletter
+\Urlmuskip=0mu plus 3mu\relax
+\mathchardef\UrlBigBreakPenalty=100\relax
+\mathchardef\UrlBreakPenalty=200\relax
+\def\UrlBigBreaks{\do\:\do\-}%
+\def\UrlBreaks{%
+ \do\.\do\@\do\/\do\\\do\!\do\_\do\|\do\;\do\>\do\]\do\)\do\}%
+ \do\,\do\?\do\'\do\+\do\=\do\#\do\$\do\&\do\*\do\^\do\"}%
+\let\do=\noexpand
+\makeatother
+
+\sloppy
+
+\title{bath-bst: Harvard referencing style as recommended by the University of Bath Library}
+\author{%
+ Maintainer: Alex Ball\thanks{%
+ To contact the maintainer about this package, please visit the repository
+ where the code is hosted: \url{https://github.com/alex-ball/bathbib}.%
+ }%
+}
+%<*driver>
+\date{Package \UseVersionOf{bath-bst.dtx} --\printdateTeX{\UseDateOf{bath-bst.dtx}}}
+%</driver>
+%<tex1>\date{Package \UseVersionOf{\jobname.tex} --\printdateTeX{\UseDateOf{\jobname.tex}}}
+
+\begin{document}
+\maketitle
+
+\section{Introduction}
+
+%</driver|tex1>
+%<*driver>
+\begin{markdown*}{hybrid=true}
+%</driver>
+%<*driver|readme>
+
+This package provides a [BibTeX] style to format reference lists in the
+[Harvard style][bath-harvard] recommended by the University of Bath Library.
+It should be used in conjunction with [natbib] for citations.
+
+## Installation
+
+The files you need are included in the zip archive available from [GitHub].
+If you use the zip archive from [CTAN], you will need to run `luatex
+bath-bst.dtx` to generate them.
+
+You can use this style simply by copying the `bath.bst`/`bathx.bst` files into
+your working directory, that is, the directory holding the main `.tex` file for
+your document. If you want the style to be available for all your documents
+without having to copy it over each time, you can install it using the
+instructions below.
+
+### Managed way
+
+The latest stable release of bath-bst has been packaged for TeX Live and
+MiKTeX. If you are running TeX Live and have `tlmgr` installed, you can install
+the package simply by running `tlmgr install bath-bst`. If you are running
+MiKTeX, you can install the package by running `mpm --install=bath-bst`.
+Both `tlmgr` and `mpm` have GUI versions that you might find friendlier.
+
+### Automated way
+
+A makefile is provided which you can use with the Make utility on
+UNIX-like systems:
+
+ * Running `make source` generates the derived files
+ - `README.md`
+ - `bath.bst` and `bathx.bst`
+ - `bath-bst-v1.tex`
+ - `bath-bst.bib` and `bath-bst-v1.bib`
+ - `bath-bst.ins`
+ * Running `make` generates the above files and also `bath-bst.pdf` and
+ `bath-bst-v1.pdf`. Ensure you have (at least) the [luatexja], [adobemapping]
+ and [ipaex] packages installed first.
+ * Running `make inst` installs the files in the user's TeX tree.
+ You can undo this with `make uninst`.
+ * Running `make install` installs the files in the local TeX tree.
+ You can undo this with `make uninstall`.
+
+### Manual way
+
+You do not need to follow the first step if you downloaded the zip archive from
+[GitHub]. You do not need to follow the second step if you already have the PDF
+documentation.
+
+ 1. Run `luatex bath-bst.dtx` to generate the source files.
+
+ 2. Compile `bath-bst.dtx` with [LuaLaTeX] and BibTeX to generate the
+ documentation. You will need, among other things, the [luatexja],
+ [adobemapping] and [ipaex] packages installed; this is just for the
+ documentation, not for the BibTeX style itself. To generate the version 1
+ tests and documentation, compile `bath-bst-v1.tex` with LuaLaTeX and BibTeX.
+
+ 3. If you are using TeX Live, find your home TeX tree using the following
+ command at the command prompt/terminal:
+
+ ```
+ kpsewhich -var-value=TEXMFHOME
+ ```
+
+ If you are using MikTeX, consult the MikTeX manual entry for [integrating
+ local additions](http://docs.miktex.org/manual/localadditions.html). You
+ can use one of the roots (TeX trees) already defined – preferably one of
+ the User roots – or set up a new one.
+
+ 4. Move the files to your TeX tree as follows:
+ - `source/bibtex/bath-bst`:
+ `bath-bst.dtx`,
+ (`bath-bst.ins`)
+ - `bibtex/bst/bath-bst`:
+ `bath.bst`,
+ `bathx.bst`
+ - `doc/bibtex/bath-bst`:
+ `bath-bst.pdf`,
+ `bath-bst-v1.pdf`,
+ `README.md`
+
+ 5. You may then have to update your installation's file name database
+ before TeX and friends can see the files.
+
+[bath-harvard]: https://library.bath.ac.uk/referencing/harvard-bath
+[BibTeX]: http://ctan.org/pkg/bibtex
+[GitHub]: https://github.com/alex-ball/bathbib/releases
+[CTAN]: http://ctan.org/pkg/bath-bst
+[natbib]: http://www.ctan.org/pkg/natbib
+[LuaLaTeX]: http://ctan.org/pkg/lualatex-doc
+[luatexja]: http://ctan.org/pkg/luatexja
+[adobemapping]: http://ctan.org/pkg/adobemapping
+[ipaex]: http://ctan.org/pkg/ipaex
+%</driver|readme>
+%<*driver>
+\end{markdown*}
+
+\section{Choosing which variant to use}
+%</driver>
+%<*driver|tex1>
+
+The data model offered by the standard Bib\TeX\ styles, and even the extended
+\textsf{natbib} variants, is not really rich enough to support the nuances of
+the Harvard (Bath) style. This means design decisions have to be made about
+whether to attempt some level of compatibility with other styles or craft
+something utterly unique.
+
+In the first version of \textsf{bath-bst}, the intention was to set things up
+so that, if the same \texttt{.bib} file was used with a different style, the features
+peculiar to the Harvard (Bath) style would be ignored and the remaining
+information would come out in a sensible arrangement. The recommendations of
+the style's documentation were to use the standard entry types as much as
+possible (though more semantic aliases were provided), and minimal new fields
+were introduced. For the more exotic (in Bib\TeX\ terms) demands of the style,
+extensive use was made of the (standard) \texttt{note} and (non-standard)
+\texttt{titleaddon} fields to place information properly. If you have written
+a \texttt{.bib} file according the principles in that first version, the \texttt{bath}
+style will still work as advertised for you.
+
+The second version introduced a new variant, \texttt{bathx} (`Bath extended'),
+which has a different aim. The idea with this one is that \texttt{.bib} files written
+for this style will be rendered just the same by the companion
+\textsf{biblatex-bath} style. Where possible, features from the latter have
+been emulated for Bib\TeX; otherwise, the `cheats' used in this style will
+also work under \textsf{biblatex}.
+
+Happily, it has been possible to do this while keeping most of the code in
+common. The main differences between two versions are as follows:
+
+\begin{itemize}
+\item
+ In \texttt{bath}, the \texttt{titleaddon} field is printed bare, while
+ in \texttt{bathx} it is wrapped in square brackets.
+\item
+ In \texttt{bathx} online items are marked with `[Online]' automatically,
+ while in \texttt{bath} you have to mark them thus yourself.
+\item
+ In \texttt{bathx} undated items are marked with `n.d.' automatically,
+ while in \texttt{bath} you have to give `n.d.' as the value of \texttt{year}
+ yourself.
+\end{itemize}
+
+One other change worth noting regards URL access dates. In version 1, the
+advice was to put them in \texttt{urldate}. With version 2 the advice is now
+to put them, perhaps counter-intuitively, in \texttt{urlyear}. The reason is that
+\textsf{biblatex} will complain if the value of \texttt{urldate} is in the wrong
+format, but will happily print the contents of \texttt{urlyear} literally. If
+you don't care about \textsf{biblatex} compatibility, you can continue to use
+\texttt{urldate}.
+
+%<*driver>
+\iffalse
+%</driver>
+%<*tex1>
+This document provides a suite of examples that demonstrate and test the
+bibliography format that was recommended for version 1.0 of the style.
+%</tex1>
+%<*driver>
+\fi
+%</driver>
+
+
+\section{Using the style}
+
+To use the style, add these lines to your preamble:
+
+%<*driver>
+\begin{tcblisting}{listing only}
+\usepackage{natbib}
+\newcommand*{\urlprefix}{Available from: }
+\newcommand*{\urldateprefix}{Accessed }
+\bibliographystyle{bathx}
+\end{tcblisting}
+\iffalse
+%</driver>
+%<*tex1>
+\begin{tcblisting}{listing only}
+\usepackage{natbib}
+\newcommand*{\urlprefix}{Available from: }
+\newcommand*{\urldateprefix}{Accessed }
+\bibliographystyle{bath}
+\end{tcblisting}
+%</tex1>
+%<*driver>
+\fi
+%</driver>
+
+Remember also to specify your \texttt{.bib} file at the end of the document:
+
+\begin{tcblisting}{listing only}
+\bibliography{file}
+\end{tcblisting}
+
+To make a citation in the text, use the key that corresponds to the entry in your \texttt{.bib} file:
+
+\begin{tcblisting}{}
+While collections can be supplemented by other means \citep{williams1997edd},
+the absence of an invisible collection amongst historians is noted by
+\citet[p.556]{stieg1981inh}. It may be, as \citet{burchard1965hhl} points out,
+that they have no assistants or are reluctant to delegate, or it may be
+down to economic factors \citep{adams2009tc1, adams2014tc2, gb.pa2014,
+adams2017tc3}\dots
+\end{tcblisting}
+
+Please refer to the documentation for \href{http://www.ctan.org/pkg/natbib}{\textsf{natbib}}
+for the full range of commands available for in-text citations. Be aware that the
+\textsf{natbib} option \texttt{sort} will sort citations in bibliography order,
+rather than the chronological order demanded by Harvard (Bath) -- so don't use it!
+
+\subsection{Migrating from version 2 to version 3}
+
+If you have previously used version 2 of the style, you may need to update your
+.bib file to accommodate the following changes in version 3:
+
+\begin{itemize}
+\item
+ Journal titles are now coerced to sentence case, so any capital letters you
+ want to keep need to be protected with braces.
+\item
+ Entries of type \texttt{unpublished} are now marked as unpublished. If you
+ have been using this for an item that should not be marked as unpublished
+ (e.g.~archive photographs, law reports), you can use \texttt{booklet} instead:
+ this is the other entry type (along with \texttt{misc}) that has a
+ \texttt{howpublished} field instead of a \texttt{publisher}.
+%<tex1> Other entry types may work as well; indeed, some examples below have been updated to use \texttt{manual} or \texttt{report} instead.
+\item
+ Some changes to the Harvard (Bath) style cannot be applied automatically
+ (e.g.~the update to how standards are referenced), so you may need to update
+ your .bib file accordingly.
+\end{itemize}
+
+
+\section{Examples}
+
+The examples below are shown in three parts.
+The first, marked with \faBook, shows an extract from the
+\href{https://library.bath.ac.uk/referencing/harvard-bath}{\emph{Referencing guide: Harvard Bath}} or
+\href{https://library.bath.ac.uk/images/referencing}{\emph{Referencing images}}.
+The second, marked with \faCog, shows the reference as formatted by Bib\TeX.
+The last shows how the reference was entered in the \texttt{.bib} file.
+The bottom right corner shows the source of the example: `RX' indicates the `Reference examples (A-Z)' section of the Guide; `RL' indicates the `Organise a reference list' section of the Guide; `RI' indicates \emph{Referencing images}.
+
+Some examples are highlighted in
+\tcbox[colframe=hacked,colback=hacked!5!white,nobeforeafter,size=fbox,tcbox raise base]{orange}.
+This indicates that some fields have been `abused' to achieve the right effect;
+in other words, they contain information that does not conform with their intended use.
+Some others make use of the \texttt{note} and \texttt{titleaddon} fields to achieve
+the right effect, where other styles might need the information placed differently.
+Particular care should be taken with such items when switching between different styles,
+though of course any item might need adjustment to take account of differing conventions.
+
+
+\subsection{Books and book chapters}
+
+\subsubsection*{Book with author(s)}
+
+\begin{bibexbox}<RX>{rang.etal2012rdp}
+ Rang, H.P., Dale, M.M., Ritter, J.M., Flower, R.J. and Henderson, G., 2012. \emph{Rang and Dale's pharmacology}. 7th ed. Edinburgh:\@ Elsevier Churchill Livingstone.
+ \tcblower
+\begin{Verbatim}
+%</driver|tex1>
+%<*driver|bib|tex1|bib1>
+@book{rang.etal2012rdp,
+ author = {Rang, H. P. and Dale, M. M. and Ritter, J. M. and Flower, R. J. and Henderson, G.},
+ year = {2012},
+ title = {Rang and {Dale's} Pharmacology},
+ edition = {7},
+ address = {Edinburgh},
+ publisher = {Elsevier Churchill Livingstone}}
+%</driver|bib|tex1|bib1>
+%<*driver|tex1>
+\end{Verbatim}
+\end{bibexbox}
+
+\begin{bibexbox}<RX>{ou1972em}
+ Open University, 1972. \emph{Electricity and magnetism}. Bletchley:\@ Open University Press.
+ \tcblower
+\begin{Verbatim}
+%</driver|tex1>
+%<*driver|bib|tex1|bib1>
+@book{ou1972em,
+ author = {{Open University}},
+ year = {1972},
+ title = {Electricity and Magnetism},
+ address = {Bletchley},
+ publisher = {Open University Press}}
+%</driver|bib|tex1|bib1>
+%<*driver|tex1>
+\end{Verbatim}
+\end{bibexbox}
+
+
+\subsubsection*{Book with editor(s) instead of author(s)}
+
+\begin{bibexbox}<RX>{rothman.etal2008me}
+ Rothman, K.J., Greenland, S. and Lash, T.L., eds, 2008. \emph{Modern epidemiology}. 3rd ed. Philadelphia, Pa.:\@ Lippincott Williams \& Wilkins.
+ \tcblower
+\begin{Verbatim}
+%</driver|tex1>
+%<*driver|bib|tex1|bib1>
+@book{rothman.etal2008me,
+ editor = {Kenneth J. Rothman and Sander Greenland and Timothy L. Lash},
+ year = {2008},
+ title = {Modern Epidemiology},
+ edition = {3},
+ address = {Philadelphia, Pa.},
+ publisher = {Lippincott Williams \& Wilkins}}
+%</driver|bib|tex1|bib1>
+%<*driver|tex1>
+\end{Verbatim}
+\end{bibexbox}
+
+
+\subsubsection*{Electronic book}
+
+\begin{bibexbox}<RX>{haynes2014crc}
+ Haynes, W.M., ed.\@, 2014. \emph{CRC handbook of chemistry and physics} [Online]. 94th ed. Boca Raton, Fla.:\@ CRC Press/Taylor and Francis. Available from:\@ \url{http://www.hbcpnetbase.com} [Accessed 16 June 2016].
+ \tcblower
+\begin{Verbatim}
+%</driver|tex1>
+%<*driver|bib>
+@book{haynes2014crc,
+ editor = {Haynes, W. M.},
+ year = {2014},
+ title = {{CRC} Handbook of Chemistry and Physics},
+ edition = {94},
+ address = {Boca Raton, Fla.},
+ publisher = {CRC Press/Taylor and Francis},
+ url = {http://www.hbcpnetbase.com},
+ urlyear = {16 June 2016}}
+%</driver|bib>
+%<*driver>
+\end{Verbatim}
+\iffalse
+%</driver>
+%<*tex1|bib1>
+@book{haynes2014crc,
+ editor = {Haynes, W. M.},
+ year = {2014},
+ title = {{CRC} Handbook of Chemistry and Physics},
+ titleaddon = {[Online]},
+ edition = {94},
+ address = {Boca Raton, Fla.},
+ publisher = {CRC Press/Taylor and Francis},
+ url = {http://www.hbcpnetbase.com},
+ urldate = {16 June 2016}}
+%</tex1|bib1>
+%<*driver|tex1>
+\end{Verbatim}
+%<*driver>
+\fi
+%</driver>
+\end{bibexbox}
+
+\begin{bibexbox}<RX>{hodds2016re}
+ Hodds, J., 2016. \emph{Referencing ebooks} [Kindle version 4.18]. Bath:\@ University of Bath.
+ \tcblower
+\begin{Verbatim}
+%</driver|tex1>
+%<*driver|bib>
+@book{hodds2016re,
+ author = {Hodds, J.},
+ year = {2016},
+ title = {Referencing ebooks},
+ titleaddon = {Kindle version 4.18},
+ address = {Bath},
+ publisher = {University of Bath}}
+%</driver|bib>
+%<*driver>
+\end{Verbatim}
+\iffalse
+%</driver>
+%<*tex1|bib1>
+@book{hodds2016re,
+ author = {Hodds, J.},
+ year = {2016},
+ title = {Referencing ebooks},
+ titleaddon = {[Kindle version 4.18]},
+ address = {Bath},
+ publisher = {University of Bath}}
+%</tex1|bib1>
+%<*driver|tex1>
+\end{Verbatim}
+%<*driver>
+\fi
+%</driver>
+\end{bibexbox}
+
+
+\subsubsection*{One chapter\slash paper from a collection (by different authors) in an edited book}
+
+\begin{bibexbox}<RL>{burchard1965hhl}
+ Burchard, J.E., 1965. How humanists use a library. In:\@ C.F.J. Overhage and J.R. Harman, eds. \emph{Intrex:\@ report on a planning conference and information transfer experiments}. Cambridge, Mass.:\@ MIT Press, pp.41--87.
+ \tcblower
+\begin{Verbatim}
+%</driver|tex1>
+%<*driver|bib|tex1|bib1>
+@incollection{burchard1965hhl,
+ author = {Burchard, J. E.},
+ year = {1965},
+ title = {How Humanists use a Library},
+ editor = {C. F. J. Overhage and J. R. Harman},
+ booktitle = {Intrex: report on a planning conference and information transfer experiments},
+ address = {Cambridge, Mass.},
+ publisher = {MIT Press},
+ pages = {41-87}}
+%</driver|bib|tex1|bib1>
+%<*driver|tex1>
+\end{Verbatim}
+\end{bibexbox}
+
+\begin{bibexbox}<RX>{reid1967ptp}
+ Reid, D.R., 1967. Physical testing of polymer films. In:\@ S.H. Pinner, ed. \emph{Modern packaging films}. London:\@ Butterworths, pp.143--183.
+ \tcblower
+\begin{Verbatim}
+%</driver|tex1>
+%<*driver|bib|tex1|bib1>
+@incollection{reid1967ptp,
+ author = {D. R. Reid},
+ year = {1967},
+ title = {Physical Testing of Polymer Films},
+ editor = {S. H. Pinner},
+ booktitle = {Modern Packaging Films},
+ address = {London},
+ publisher = {Butterworths},
+ pages = {143-183}}
+%</driver|bib|tex1|bib1>
+%<*driver|tex1>
+\end{Verbatim}
+\end{bibexbox}
+
+
+\subsection{Articles and periodicals}
+
+\subsubsection*{Journal article}
+
+\begin{bibexbox}<RL>{stieg1981cer}
+ Stieg, M.F., 1981a. Continuing education and the reference librarian in the academic and research library. \emph{Library journal}, 105(22), pp.2547--2551.
+ \tcblower
+\begin{Verbatim}
+%</driver|tex1>
+%<*driver|bib|tex1|bib1>
+@article{stieg1981cer,
+ author = {Stieg, M. F.},
+ year = {1981},
+ title = {Continuing Education and the Reference Librarian in the Academic and Research Library},
+ journal = {Library Journal},
+ volume = {105},
+ number ={22},
+ pages = {2547-2551}}
+%</driver|bib|tex1|bib1>
+%<*driver|tex1>
+\end{Verbatim}
+\end{bibexbox}
+
+\begin{bibexbox}<RL>{stieg1981inh}
+ Stieg, M.F., 1981b. The information needs of historians. \emph{College and research libraries}, 42(6), pp.549--560.
+ \tcblower
+\begin{Verbatim}
+%</driver|tex1>
+%<*driver|bib|tex1|bib1>
+@article{stieg1981inh,
+ author = {Stieg, M. F.},
+ year = {1981},
+ title = {The Information Needs of Historians},
+ journal = {College and Research Libraries},
+ volume = {42},
+ number ={6},
+ pages = {549-560}}
+%</driver|bib|tex1|bib1>
+%<*driver|tex1>
+\end{Verbatim}
+\end{bibexbox}
+
+\begin{bibexbox}<RX>{newman2010mcb}
+ Newman, R., 2010. Malaria control beyond 2010. \emph{Brit.\@ Med.\@ J.}, 341(7765), pp.157--208.
+ \tcblower
+\begin{Verbatim}
+%</driver|tex1>
+%<*driver|bib|tex1|bib1>
+@article{newman2010mcb,
+ author = {Newman, R.},
+ year = {2010},
+ title = {Malaria control beyond 2010},
+ journal = {{Brit.\@ Med.\@ J.}},
+ volume = {341},
+ number = {7765},
+ pages = {157-208}}
+%</driver|bib|tex1|bib1>
+%<*driver|tex1>
+\end{Verbatim}
+\end{bibexbox}
+
+
+\subsubsection*{Electronic journal article}
+
+\begin{bibexbox}<RX>{williams1997edd}
+ Williams, F., 1997. Electronic document delivery:\@ a trial in an academic library. \emph{Ariadne} [Online], 10. Available from:\@ \url{http://www.ariadne.ac.uk/issue10/edd/} [Accessed 5 December 1997].
+ \tcblower
+\begin{Verbatim}
+%</driver|tex1>
+%<*driver|bib>
+@article{williams1997edd,
+ author = {Williams, F.},
+ year = {1997},
+ title = {Electronic Document Delivery: a Trial in an Academic Library},
+ journal = {Ariadne},
+ volume = {10},
+ url = {http://www.ariadne.ac.uk/issue10/edd/},
+ urlyear = {5 December 1997}}
+%</driver|bib>
+%<*driver>
+\end{Verbatim}
+\iffalse
+%</driver>
+%<*tex1|bib1>
+@article{williams1997edd,
+ author = {Williams, F.},
+ year = {1997},
+ title = {Electronic Document Delivery: a Trial in an Academic Library},
+ journal = {Ariadne \textup{[Online]}},
+ volume = {10},
+ url = {http://www.ariadne.ac.uk/issue10/edd/},
+ urldate = {5 December 1997}}
+%</tex1|bib1>
+%<*driver|tex1>
+\end{Verbatim}
+%<*driver>
+\fi
+%</driver>
+\end{bibexbox}
+
+%<*driver>
+\iffalse
+%</driver>
+%<*tex1>
+\begin{hacks}
+\item With most styles, you would put `in press' or `preprint' as the
+ \texttt{year} for articles that have yet to be officially published, but for
+ this style you need to put it in \texttt{volume}. If you would rather lose
+ this information when switching to a different style than have it incorrectly
+ placed, you can use the \texttt{pubstate} field from \textsf{biblatex}
+ instead. Use the keyword \texttt{inpress} for `in press' and
+ \texttt{inpreparation} or \texttt{submitted} (whichever is more accurate) for
+ `preprint'.
+
+\begin{tcolorbox}%
+ [ colframe = Slate
+ , colback = white
+ , fontupper = \footnotesize
+ ]
+ \begin{Verbatim}
+ pubstate = {inpress},
+ \end{Verbatim}
+\end{tcolorbox}
+\end{hacks}
+
+%</tex1>
+%<*driver>
+\fi
+\begin{tips}
+\item
+If citing an article yet to be officially published, use the \texttt{pubstate}
+field (from \textsf{biblatex}) with the keyword \texttt{inpress} for `in press'
+and \texttt{inpreparation} or \texttt{submitted} (whichever is more accurate)
+for `preprint'.
+\end{tips}
+
+\begin{bibexbox}<RX>{liontou.etal2019dra}
+%</driver>
+%<tex1>\begin{bibexbox}(hacked)<RX>{liontou.etal2019dra}
+ Liontou, C., Kontopodis, E., Oikonomidis, N., Maniotis, C., Tassopoulos, A., Tsiafoutis, I., Lazaris, E. and Koutouzis, M., 2019. Distal radial access:\@ a review article. \emph{Cardiovascular revascularization medicine} [Online], in press. Available from: \url{https://www.sciencedirect.com/science/article/pii/S1553838919303367} [Accessed 19 June 2019].
+ \tcblower
+\begin{Verbatim}
+%</driver|tex1>
+%<*driver|bib>
+@article{liontou.etal2019dra,
+ author = {Liontou, C. and Kontopodis, E. and Oikonomidis, N. and Maniotis, C. and
+ Tassopoulos, A. and Tsiafoutis, I. and Lazaris, E. and Koutouzis, M.},
+ year = {2019},
+ title = {Distal Radial Access: a Review Article},
+ journal = {Cardiovascular Revascularization Medicine},
+ pubstate = {inpress},
+ url = {https://www.sciencedirect.com/science/article/pii/S1553838919303367},
+ urlyear = {19 June 2019}}
+%</driver|bib>
+%<*driver>
+\end{Verbatim}
+\iffalse
+%</driver>
+%<*tex1|bib1>
+@article{liontou.etal2019dra,
+ author = {Liontou, C. and Kontopodis, E. and Oikonomidis, N. and Maniotis, C. and
+ Tassopoulos, A. and Tsiafoutis, I. and Lazaris, E. and Koutouzis, M.},
+ year = {2019},
+ title = {Distal Radial Access: a Review Article},
+ journal = {Cardiovascular revascularization medicine \textup{[Online]}},
+ volume = {in press},
+ url = {https://www.sciencedirect.com/science/article/pii/S1553838919303367},
+ urldate = {19 June 2019}}
+%</tex1|bib1>
+%<*driver|tex1>
+\end{Verbatim}
+%<*driver>
+\fi
+%</driver>
+\end{bibexbox}
+
+
+\subsubsection*{Preprint in a digital repository}
+
+\begin{tips}
+\item
+The Harvard (Bath) style gives you a choice whether to treat preprints as
+pre-publication articles (above) or as grey literature (below). In the latter
+case, the \texttt{techreport} entry type is the best match semantically.
+\end{tips}
+
+\begin{bibexbox}<RX>{shah.corrick2016hsc}
+ Shah, I. and Corrick, I., 2016. \emph{How should central banks respond to non-neutral inflation expectations?} Bath:\@ University of Bath. \emph{OPUS} [Online]. Available from:\@ \url{http://opus.bath.ac.uk} [Accessed 4 May 2016].
+ \tcblower
+\begin{Verbatim}
+%</driver|tex1>
+%<*driver|bib>
+@techreport{shah.corrick2016hsc,
+ author = {Shah, I. and Corrick, I.},
+ year = {2016},
+ title = {How should central banks respond to non-neutral inflation expectations?},
+ address = {Bath},
+ institution = {University of Bath},
+ library = {OPUS},
+ url = {http://opus.bath.ac.uk},
+ urlyear = {4 May 2016}}
+%</driver|bib>
+%<*driver>
+\end{Verbatim}
+\iffalse
+%</driver>
+%<*tex1|bib1>
+@techreport{shah.corrick2016hsc,
+ author = {Shah, I. and Corrick, I.},
+ year = {2016},
+ title = {How should central banks respond to non-neutral inflation expectations?},
+ address = {Bath},
+ institution = {University of Bath},
+ note = {\emph{OPUS} [Online]},
+ url = {http://opus.bath.ac.uk},
+ urldate = {4 May 2016}}
+%</tex1|bib1>
+%<*driver|tex1>
+\end{Verbatim}
+%<*driver>
+\fi
+%</driver>
+\end{bibexbox}
+
+
+\subsubsection*{Newspaper article}
+
+\begin{hacks}\item Give the issue's day and month as the \texttt{volume}.\end{hacks}
+
+\begin{bibexbox}(hacked)<RX>{haurant2004bbh}
+ Haurant, S., 2004. Britain's borrowing hits £1 trillion. \emph{The Guardian}, 29 July, p.16c.
+ \tcblower
+\begin{Verbatim}
+%</driver|tex1>
+%<*driver|bib|tex1|bib1>
+@article{haurant2004bbh,
+ author = {Haurant, S.},
+ year = {2004},
+ title = {Britain's Borrowing Hits \pounds 1 Trillion},
+ journal = {The {Guardian}},
+ volume = {29 July},
+ pages = {16c}}
+%</driver|bib|tex1|bib1>
+%<*driver|tex1>
+\end{Verbatim}
+\end{bibexbox}
+
+\begin{bibexbox}(hacked)<RX>{independent1992pub}
+ The Independent, 1992. Picking up the bills. \emph{The Independent}, 4 June, p.28a.
+ \tcblower
+\begin{Verbatim}
+%</driver|tex1>
+%<*driver|bib|tex1|bib1>
+@article{independent1992pub,
+ author = {{The Independent}},
+ year = {1992},
+ title = {Picking Up the Bills},
+ journal = {The {Independent}},
+ volume = {4 June},
+ pages = {28a}}
+%</driver|bib|tex1|bib1>
+%<*driver|tex1>
+\end{Verbatim}
+\end{bibexbox}
+
+
+\subsection{Conference papers}
+
+\begin{info}\item
+As in the standard Bib\TeX\ styles, \texttt{conference} is a legacy (and highly deprecated) alias for \texttt{inproceedings}.
+\end{info}
+
+\subsubsection*{Conference paper (when proceedings have a named editor)}
+
+\begin{bibexbox}<RX>{crawford1965oim}
+ Crawford, G.I., 1965. Oxygen in metals. In:\@ J.M.A. Lenihan and S.J. Thompson, eds. \emph{Activation analysis:\@ proceedings of a NATO Advanced Study Institute}, 2--4 August 1964, Glasgow. London:\@ Academic Press, pp.113--118.
+ \tcblower
+\begin{Verbatim}
+%</driver|tex1>
+%<*driver|bib>
+@inproceedings{crawford1965oim,
+ author = {Crawford, G. I.},
+ year = {1965},
+ title = {Oxygen in Metals},
+ editor = {J. M. A. Lenihan and S. J. Thompson},
+ booktitle = {Activation Analysis: Proceedings of a {NATO} {Advanced} {Study} {Institute}},
+ eventyear = {2--4 August 1964},
+ venue = {Glasgow},
+ address = {London},
+ publisher = {Academic Press},
+ pages = {113-118}}
+%</driver|bib>
+%<*driver>
+\end{Verbatim}
+\iffalse
+%</driver>
+%<*tex1|bib1>
+@inproceedings{crawford1965oim,
+ author = {Crawford, G. I.},
+ year = {1965},
+ title = {Oxygen in Metals},
+ editor = {J. M. A. Lenihan and S. J. Thompson},
+ booktitle = {Activation Analysis: Proceedings of a {NATO} {Advanced} {Study} {Institute}},
+ venue = {2--4 August 1964, Glasgow},
+ address = {London},
+ publisher = {Academic Press},
+ pages = {113-118}}
+%</tex1|bib1>
+%<*driver|tex1>
+\end{Verbatim}
+%<*driver>
+\fi
+%</driver>
+\end{bibexbox}
+
+
+\subsubsection*{Conference paper (when proceedings have no named editor or are part of a major series)}
+
+\begin{bibexbox}<RX>{soper1972rbc}
+ Soper, D., 1972. Review of bracken control experiments with asulam. \emph{Proceedings of the 11th British Weed Control Conference}, 15--17 November 1972, Brighton. Brighton:\@ University of Sussex, pp.24--31.
+ \tcblower
+\begin{Verbatim}
+%</driver|tex1>
+%<*driver|bib>
+@inproceedings{soper1972rbc,
+ author = {Soper, D.},
+ year = {1972},
+ title = {Review of Bracken Control Experiments with Asulam},
+ booktitle = {Proceedings of the 11th {British} {Weed} {Control} {Conference}},
+ eventyear = {15--17 November 1972},
+ venue = {Brighton},
+ address = {Brighton},
+ publisher = {University of Sussex},
+ pages = {24-31}}
+%</driver|bib>
+%<*driver>
+\end{Verbatim}
+\iffalse
+%</driver>
+%<*tex1|bib1>
+@inproceedings{soper1972rbc,
+ author = {Soper, D.},
+ year = {1972},
+ title = {Review of Bracken Control Experiments with Asulam},
+ booktitle = {Proceedings of the 11th {British} {Weed} {Control} {Conference}},
+ venue = {15--17 November 1972, Brighton},
+ address = {Brighton},
+ publisher = {University of Sussex},
+ pages = {24-31}}
+%</tex1|bib1>
+%<*driver|tex1>
+\end{Verbatim}
+%<*driver>
+\fi
+%</driver>
+\end{bibexbox}
+
+
+\subsection{Grey literature}
+
+\subsubsection*{Thesis/dissertation}
+
+\begin{bibexbox}<RX>{burrell1973ist}
+ Burrell, J.G., 1973. \emph{The importance of school tours in education}. Thesis (M.A.). Queen's University, Belfast.
+ \tcblower
+\begin{Verbatim}
+%</driver|tex1>
+%<*driver|bib|tex1|bib1>
+@mastersthesis{burrell1973ist,
+ author = {Burrell, J. G.},
+ year = {1973},
+ title = {The Importance of School Tours in Education},
+ type = {Thesis ({M.A.})},
+ school = {Queen's University, Belfast}}
+%</driver|bib|tex1|bib1>
+%<*driver|tex1>
+\end{Verbatim}
+\end{bibexbox}
+
+\begin{info}\item Internally, \texttt{thesis} is an alias for \texttt{phdthesis}.\end{info}
+
+
+\subsubsection*{Report}
+
+\begin{bibexbox}<RX>{unesco1993gip}
+ UNESCO, 1993. \emph{General information programme and UNISIST}\@. (PGI-93/WS/22). Paris:\@ UNESCO.
+ \tcblower
+\begin{Verbatim}
+%</driver|tex1>
+%<*driver|bib|tex1|bib1>
+@techreport{unesco1993gip,
+ author = {{UNESCO}},
+ year = {1993},
+ title = {General Information Programme and {UNISIST}},
+ address = {Paris},
+ institution = {UNESCO},
+ number = {PGI-93/WS/22}}
+%</driver|bib|tex1|bib1>
+%<*driver|tex1>
+\end{Verbatim}
+\end{bibexbox}
+
+\begin{bibexbox}<RX>{bre2007dqb}
+ BRE, 2007. \emph{Designing quality buildings:\@ a BRE guide}. (Report 497). Bracknell:\@ BRE.
+ \tcblower
+\begin{Verbatim}
+%</driver|tex1>
+%<*driver|bib|tex1|bib1>
+@techreport{bre2007dqb,
+ author = {{BRE}},
+ year = {2007},
+ title = {Designing Quality Buildings: a {BRE} Guide},
+ address = {Bracknell},
+ institution = {BRE},
+ type = {Report},
+ number = {497}}
+%</driver|bib|tex1|bib1>
+%<*driver|tex1>
+\end{Verbatim}
+\end{bibexbox}
+
+\begin{info}\item Internally, \texttt{report} is an alias for \texttt{techreport}.\end{info}
+
+
+\subsubsection*{Standard}
+
+\begin{bibexbox}<RX>{bs5605:1990}
+ BSI, 1990. \emph{BS 5605:1990 Recommendations for citing and referencing
+ published material.} London: BSI.
+ \tcblower
+\begin{Verbatim}
+%</driver|tex1>
+%<*driver|bib>
+@standard{bs5605:1990,
+ author = {{BSI}},
+ year = {1990},
+ title = {{BS}~5605:1990 {Recommendations} for Citing and Referencing Published Material},
+ address = {London},
+ organization = {BSI}}
+%</driver|bib>
+%<*driver>
+\end{Verbatim}
+\iffalse
+%</driver>
+%<*tex1|bib1>
+@manual{bs5605:1990,
+ author = {{BSI}},
+ year = {1990},
+ title = {{BS}~5605:1990 {Recommendations} for Citing and Referencing Published Material},
+ address = {London},
+ organization = {BSI}}
+%</tex1|bib1>
+%<*driver|tex1>
+\end{Verbatim}
+%<*driver>
+\fi
+%</driver>
+\end{bibexbox}
+
+\begin{bibexbox}<RX>{astm.d1655}
+ ASTM, 2019. \emph{ASTM D1655 - 19 Standard specification for aviation
+ turbine fuels.} West Conshohocken, Pa.: ASTM.
+ \tcblower
+\begin{Verbatim}
+%</driver|tex1>
+%<*driver|bib>
+@standard{astm.d1655,
+ author = {{ASTM}},
+ year = {2019},
+ title = {{ASTM~D1655} - 19 {Standard} Specification for Aviation Turbine Fuels},
+ address = {West Conshohocken, Pa.},
+ organization = {ASTM}}
+%</driver|bib>
+%<*driver>
+\end{Verbatim}
+\iffalse
+%</driver>
+%<*tex1|bib1>
+@manual{astm.d1655,
+ author = {{ASTM}},
+ year = {2019},
+ title = {{ASTM~D1655} - 19 {Standard} Specification for Aviation Turbine Fuels},
+ address = {West Conshohocken, Pa.},
+ organization = {ASTM}}
+%</tex1|bib1>
+%<*driver|tex1>
+\end{Verbatim}
+%<*driver>
+\fi
+%</driver>
+\end{bibexbox}
+
+\begin{info}\item Internally, \texttt{standard} is an alias for \texttt{manual}.\end{info}
+
+
+\subsubsection*{Patent}
+
+\begin{bibexbox}<RX>{pm1981opa}
+ Phillipp Morris Inc., 1981. \emph{Optical perforating apparatus and system}. European patent application 0021165A1. 1981-01-07.
+ \tcblower
+\begin{Verbatim}
+%</driver|tex1>
+%<*driver|bib>
+@patent{pm1981opa,
+ author = {{Phillipp Morris Inc.}},
+ year = {1981},
+ title = {Optical perforating apparatus and system},
+ type = {European patent application},
+ number = {0021165A1. 1981-01-07}}
+%</driver|bib>
+%<*driver>
+\end{Verbatim}
+\iffalse
+%</driver>
+%<*tex1|bib1>
+@manual{pm1981opa,
+ author = {{Phillipp Morris Inc.}},
+ year = {1981},
+ title = {Optical perforating apparatus and system},
+ series = {European patent application},
+ number = {0021165A1. 1981-01-07}}
+%</tex1|bib1>
+%<*driver|tex1>
+\end{Verbatim}
+%<*driver>
+\fi
+%</driver>
+\end{bibexbox}
+
+\begin{info}\item Internally, \texttt{patent} is an alias for \texttt{manual}.\end{info}
+
+
+\subsubsection*{Unpublished written material and personal communications}
+
+\begin{bibexbox}<RX>{harris2013fgr}
+ Harris, G., 2013. \emph{Focus group recommendations:\@ internal task group
+ report}. Unpublished.
+ \tcblower
+\begin{Verbatim}
+%</driver|tex1>
+%<*driver|bib|tex1|bib1>
+@unpublished{harris2013fgr,
+ author = {Harris, G.},
+ year = {2013},
+ title = {Focus group recommendations: internal task group report}}
+%</driver|bib|tex1|bib1>
+%<*driver|tex1>
+\end{Verbatim}
+\end{bibexbox}
+
+\begin{bibexbox}<RX>{hadley2015bir}
+ Hadley, S., 2015. \emph{Biomechanics:\@ introductory reading, BM289:\@ sport
+ biomechanics}. University of Bath. Unpublished.
+ \tcblower
+\begin{Verbatim}
+%</driver|tex1>
+%<*driver|bib|tex1|bib1>
+@unpublished{hadley2015bir,
+ author = {Hadley, S.},
+ year = {2015},
+ title = {Biomechanics: introductory reading, {BM289}: sport biomechanics},
+ howpublished = {University of Bath}}
+%</driver|bib|tex1|bib1>
+%<*driver|tex1>
+\end{Verbatim}
+\end{bibexbox}
+
+\begin{bibexbox}<RX>{thomas2015wcr}
+ Thomas, D., 2015. Word count and referencing style. \emph{Frequently
+ asked questions discussion board:\@ PHYS 2011:\@ housing studies.}
+ University of Bath. Unpublished.
+ \tcblower
+\begin{Verbatim}
+%</driver|tex1>
+%<*driver|bib|tex1|bib1>
+@unpublished{thomas2015wcr,
+ author = {Thomas, D.},
+ year = {2015},
+ title = {Word count and referencing style},
+ booktitle = {Frequently asked questions discussion board: {PHYS} 2011: housing studies},
+ howpublished = {University of Bath}}
+%</driver|bib|tex1|bib1>
+%<*driver|tex1>
+\end{Verbatim}
+\end{bibexbox}
+
+
+\subsection{Audiovisual materials}
+
+\subsubsection*{Image}
+
+%<tex1>\begin{tips}\item You would normally class images as \texttt{misc} or \texttt{unpublished}, but those entry types have particular formatting quirks in this style that don't work for images. Use \texttt{manual} or \texttt{booklet} instead. You can use \texttt{online} (an alias for \texttt{manual}) for online images.\end{tips}
+
+\begin{bibexbox}<RI>{nasa2015nat}
+ NASA, 2015, \emph{NASA astronaut Tim Kopra on Dec.\@ 21 spacewalk} [Online]. Washington:\@ NASA. Available from:\@ \url{http://www.nasa.gov/image-feature/nasa-astronaut-tim-kopra-on-dec-21-spacewalk} [Accessed 7 January 2015].
+ \tcblower
+\begin{Verbatim}
+%</driver|tex1>
+%<*driver|bib>
+@image{nasa2015nat,
+ author = {{NASA}},
+ year = {2015},
+ title = {{NASA} Astronaut {Tim} {Kopra} on {Dec.\@} 21 Spacewalk},
+ address = {Washington},
+ publisher = {NASA},
+ url = {http://www.nasa.gov/image-feature/nasa-astronaut-tim-kopra-on-dec-21-spacewalk},
+ urlyear = {7 January 2015}}
+%</driver|bib>
+%<*driver>
+\end{Verbatim}
+\iffalse
+%</driver>
+%<*tex1|bib1>
+@manual{nasa2015nat,
+ author = {{NASA}},
+ year = {2015},
+ title = {{NASA} Astronaut {Tim} {Kopra} on {Dec.\@} 21 Spacewalk},
+ titleaddon = {[Online]},
+ address = {Washington},
+ organization = {NASA},
+ url = {http://www.nasa.gov/image-feature/nasa-astronaut-tim-kopra-on-dec-21-spacewalk},
+ urldate = {7 January 2015}}
+%</tex1|bib1>
+%<*driver|tex1>
+\end{Verbatim}
+%<*driver>
+\fi
+%</driver>
+\end{bibexbox}
+
+\begin{tips}\item You can use either the \texttt{publisher} or the \texttt{organization} field to
+record the source of the image.\end{tips}
+
+\begin{bibexbox}<RI>{iliff2006rcb}
+ Iliff, D., 2006. \emph{Royal Crescent in Bath, England - July 2006} [Online]. San Francisco:\@ Wikimedia Foundation. Available from:\@ \url{https://commons.wikimedia.org/wiki/File:Royal_Crescent_in_Bath,_England_-_July_2006.jpg} [Accessed 7 January 2016].
+ \tcblower
+\begin{Verbatim}
+%</driver|tex1>
+%<*driver|bib>
+@image{iliff2006rcb,
+ author = {D. Iliff},
+ year = {2006},
+ title = {{Royal} {Crescent} in {Bath,} {England} - {July} 2006},
+ address = {San Francisco},
+ organization = {Wikimedia Foundation},
+ url = {https://commons.wikimedia.org/wiki/File:Royal_Crescent_in_Bath,_England_-_July_2006.jpg},
+ urlyear = {7 January 2016}}
+%</driver|bib>
+%<*driver>
+\end{Verbatim}
+\iffalse
+%</driver>
+%<*tex1|bib1>
+@manual{iliff2006rcb,
+ author = {D. Iliff},
+ year = {2006},
+ title = {{Royal} {Crescent} in {Bath,} {England} - {July} 2006},
+ titleaddon = {[Online]},
+ address = {San Francisco},
+ organization = {Wikimedia Foundation},
+ url = {https://commons.wikimedia.org/wiki/File:Royal_Crescent_in_Bath,_England_-_July_2006.jpg},
+ urldate = {7 January 2016}}
+%</tex1|bib1>
+%<*driver|tex1>
+\end{Verbatim}
+%<*driver>
+\fi
+%</driver>
+\end{bibexbox}
+
+\begin{bibexbox}<RI>{anon1946peb}
+ Anon., 1946. \emph{Prototype electric bicycle displayed at the \enquote{Britain Can Make It} exhibition organised by the Council of Industrial Design and held at the Victoria and Albert Museum, London, 1946. Designed by B.~G. Bowden} [Photograph]. At:\@ London. Design Council Slide Collection.
+ \tcblower
+\begin{Verbatim}
+%</driver|tex1>
+%<*driver|bib>
+@image{anon1946peb,
+ author = {Anon.},
+ year = {1946},
+ title = {Prototype electric bicycle displayed at the \enquote{Britain Can Make It} exhibition
+ organised by the {Council} of {Industrial} {Design} and held at the {Victoria} and {Albert}
+ {Museum}, {London}, 1946. {Designed} by {B.~G.} {Bowden}},
+ titleaddon = {Photograph},
+ address = {London},
+ library = {Design Council Slide Collection}}
+%</driver|bib>
+%<*driver>
+\end{Verbatim}
+\iffalse
+%</driver>
+%<*tex1|bib1>
+@manual{anon1946peb,
+ author = {Anon.},
+ year = {1946},
+ title = {Prototype electric bicycle displayed at the \enquote{Britain Can Make It} exhibition
+ organised by the {Council} of {Industrial} {Design} and held at the {Victoria} and {Albert}
+ {Museum}, {London}, 1946. {Designed} by {B.~G.} {Bowden}},
+ titleaddon = {[Photograph]},
+ note = {At: London. Design Council Slide Collection}}
+%</tex1|bib1>
+%<*driver|tex1>
+\end{Verbatim}
+%<*driver>
+\fi
+%</driver>
+\end{bibexbox}
+
+%<*driver>
+\begin{tips}
+\item
+Use the \texttt{library} field to record the archive and register number.
+If you also wish to provide the name of the organisation that published the image,
+use the \texttt{publisher} field if the location you provide relates to the publisher,
+but the \texttt{organization} field if the location relates to the archive.
+\end{tips}
+%</driver>
+
+\subsubsection*{Map}
+
+\begin{bibexbox}<RX>{andrews.dury1773wilts}
+ Andrews, J. and Dury, A., 1773. \emph{Map of Wiltshire}, 1 inch to 2 miles. Devizes:\@ Wiltshire Record Society.
+ \tcblower
+\begin{Verbatim}
+%</driver|tex1>
+%<*driver|bib|tex1|bib1>
+@manual{andrews.dury1773wilts,
+ author = {Andrews, J. and Dury, A.},
+ year = {1773},
+ title = {Map of {Wiltshire}},
+ series = {1 inch to 2 miles},
+ address = {Devizes},
+ publisher = {Wiltshire Record Society}}
+%</driver|bib|tex1|bib1>
+%<*driver|tex1>
+\end{Verbatim}
+\end{bibexbox}
+
+\begin{tips}\item The \texttt{book} entry type would also work for this reference.\end{tips}
+
+
+\subsubsection*{Film, video or DVD}
+
+\begin{bibexbox}<RX>{macbeth1948}
+ \emph{Macbeth}, 1948. Film.\@ Directed by Orson Welles. USA:\@ Republic Pictures.
+ \tcblower
+\begin{Verbatim}
+%</driver|tex1>
+%<*driver|bib>
+@video{macbeth1948,
+ year = {1948},
+ title = {Macbeth},
+ type = {Film},
+ note = {Directed by Orson Welles},
+ address = {USA},
+ publisher = {Republic Pictures}}
+%</driver|bib>
+%<*driver>
+\end{Verbatim}
+\iffalse
+%</driver>
+%<*tex1|bib1>
+@booklet{macbeth1948,
+ year = {1948},
+ title = {Macbeth},
+ howpublished = {Film. Directed by Orson Welles},
+ address = {USA},
+ publisher = {Republic Pictures}}
+%</tex1|bib1>
+%<*driver|tex1>
+\end{Verbatim}
+%<*driver>
+\fi
+%</driver>
+\end{bibexbox}
+
+\begin{info}\item Internally, \texttt{movie} and \texttt{video} are aliases for \texttt{booklet}.\end{info}
+
+
+\subsubsection*{Streamed video (YouTube, TED Talks, etc.)}
+
+\begin{bibexbox}<RX>{moran2016sol}
+ Moran, C., 2016. \emph{Save our libraries} [Online]. Available from:\@ \url{https://www.youtube.com/watch?v=gKTfCz4JtVE&feature=youtu.be} [Accessed 29 April 2016].
+ \tcblower
+\begin{Verbatim}
+%</driver|tex1>
+%<*driver|bib>
+@video{moran2016sol,
+ author = {Moran, C.},
+ year = {2016},
+ title = {Save Our Libraries},
+ url = {https://www.youtube.com/watch?v=gKTfCz4JtVE&feature=youtu.be},
+ urlyear = {29 April 2016}}
+%</driver|bib>
+%<*driver>
+\end{Verbatim}
+\iffalse
+%</driver>
+%<*tex1|bib1>
+@manual{moran2016sol,
+ author = {Moran, C.},
+ year = {2016},
+ title = {Save Our Libraries},
+ titleaddon = {[Online]},
+ url = {https://www.youtube.com/watch?v=gKTfCz4JtVE&feature=youtu.be},
+ urldate = {29 April 2016}}
+%</tex1|bib1>
+%<*driver|tex1>
+\end{Verbatim}
+%<*driver>
+\fi
+%</driver>
+\end{bibexbox}
+
+\begin{bibexbox}<RI>{uob2015wie}
+ University of Bath, 2015. \emph{What is engineering?} [Online]. Available from:\@ \url{https://www.youtube.com/watch?v=NoyZarq-Zbo} [Accessed 12 January 2016].
+ \tcblower
+\begin{Verbatim}
+%</driver|tex1>
+%<*driver|bib>
+@video{uob2015wie,
+ author = {{University of Bath}},
+ year = {2015},
+ title = {What is Engineering?},
+ url = {https://www.youtube.com/watch?v=NoyZarq-Zbo},
+ urlyear = {12 January 2016}}
+%</driver|bib>
+%<*driver>
+\end{Verbatim}
+\iffalse
+%</driver>
+%<*tex1|bib1>
+@manual{uob2015wie,
+ author = {{University of Bath}},
+ year = {2015},
+ title = {What is Engineering?},
+ titleaddon = {[Online]},
+ url = {https://www.youtube.com/watch?v=NoyZarq-Zbo},
+ urldate = {12 January 2016}}
+%</tex1|bib1>
+%<*driver|tex1>
+\end{Verbatim}
+%<*driver>
+\fi
+%</driver>
+\end{bibexbox}
+
+\begin{bibexbox}<RI>{chakrabarti2016hac}
+ Chakrabarti, V., 2016. \emph{How architecture and city planning can combat social inequality} [Online]. Available from:\@ \url{https://www.curbed.com/2016/5/5/11593058/vishaan-chakrabarti-pau-curbed-appeal-podcast} [Accessed 28 March 2019].
+ \tcblower
+\begin{Verbatim}
+%</driver|tex1>
+%<*driver|bib>
+@audio{chakrabarti2016hac,
+ author = {Chakrabarti, V.},
+ year = {2016},
+ title = {How Architecture and City Planning Can Combat Social Inequality},
+ url = {https://www.curbed.com/2016/5/5/11593058/vishaan-chakrabarti-pau-curbed-appeal-podcast},
+ urlyear = {28 March 2019}}
+%</driver|bib>
+%<*driver>
+\end{Verbatim}
+\iffalse
+%</driver>
+%<*tex1|bib1>
+@manual{chakrabarti2016hac,
+ author = {Chakrabarti, V.},
+ year = {2016},
+ title = {How Architecture and City Planning Can Combat Social Inequality},
+ titleaddon = {[Online]},
+ url = {https://www.curbed.com/2016/5/5/11593058/vishaan-chakrabarti-pau-curbed-appeal-podcast},
+ urlyear = {28 March 2019}}
+%</tex1|bib1>
+%<*driver|tex1>
+\end{Verbatim}
+%<*driver>
+\fi
+%</driver>
+\end{bibexbox}
+
+
+\subsubsection*{Television or radio broadcast}
+
+\begin{bibexbox}<RX>{rsfo2006ep5}
+ \emph{Rick Stein's French odyssey:\@ Episode 5}, 2006. TV. BBC2, 23 August. 20.30 hrs.
+ \tcblower
+\begin{Verbatim}
+%</driver|tex1>
+%<*driver|bib>
+@video{rsfo2006ep5,
+ year = {2006},
+ title = {Rick {Stein's} {French} Odyssey: Episode 5},
+ type = {TV},
+ note = {BBC2, 23 August. 20.30 hrs}
+}
+%</driver|bib>
+%<*driver>
+\end{Verbatim}
+\iffalse
+%</driver>
+%<*tex1|bib1>
+@booklet{rsfo2006ep5,
+ year = {2006},
+ title = {Rick {Stein's} {French} Odyssey: Episode 5},
+ howpublished = {TV. BBC2, 23 August. 20.30 hrs}}
+%</tex1|bib1>
+%<*driver|tex1>
+\end{Verbatim}
+%<*driver>
+\fi
+%</driver>
+\end{bibexbox}
+
+\begin{bibexbox}<RX>{archers20060823}
+ \emph{The Archers}, 2006. Radio. BBC Radio 4, 23 August. 19.02 hrs.
+ \tcblower
+\begin{Verbatim}
+%</driver|tex1>
+%<*driver|bib>
+@audio{archers20060823,
+ year = {2006},
+ title = {The {Archers}},
+ type = {Radio},
+ note = {BBC Radio 4, 23 August. 19.02 hrs}}
+%</driver|bib>
+%<*driver>
+\end{Verbatim}
+\iffalse
+%</driver>
+%<*tex1|bib1>
+@booklet{archers20060823,
+ year = {2006},
+ title = {The {Archers}},
+ howpublished = {Radio. BBC Radio 4, 23 August. 19.02 hrs}}
+%</tex1|bib1>
+%<*driver|tex1>
+\end{Verbatim}
+%<*driver>
+\fi
+%</driver>
+\end{bibexbox}
+
+%<*driver>
+\begin{tips}\item Use \texttt{type} for the medium and \texttt{note} for the channel, date and time.\end{tips}
+%</driver>
+
+\begin{info}\item Internally, \texttt{audio} and \texttt{music} are aliases for \texttt{booklet}.\end{info}
+
+
+\subsubsection*{Music score}
+
+\begin{bibexbox}<RX>{beethoven1950symph1}
+ Beethoven, L. van, 1950. \emph{Symphony no.1 in C, Op.21}. Harmondsworth:\@ Penguin.
+ \tcblower
+\begin{Verbatim}
+%</driver|tex1>
+%<*driver|bib|tex1|bib1>
+@book{beethoven1950symph1,
+ author = {Ludwig van Beethoven},
+ year = {1950},
+ title = {Symphony no.1 in {C,} {Op.21}},
+ address = {Harmondsworth},
+ publisher = {Penguin}}
+%</driver|bib|tex1|bib1>
+%<*driver|tex1>
+\end{Verbatim}
+\end{bibexbox}
+
+
+\subsection{Digital media}
+
+\subsubsection*{Website\slash webpage}
+
+While it is normal when using Bib\TeX\ to use \texttt{misc} for websites,
+with this style you should use \texttt{online} (or \texttt{electronic} or \texttt{www}) instead.
+Internally these are all aliases for \texttt{manual}.
+
+\begin{bibexbox}<RX>{holland2002gci}
+ Holland, M., 2002. \emph{Guide to citing internet sources} [Online]. Poole:\@ Bournemouth University. Available from:\@ \url{http://www.bournemouth.ac.uk/library/using/guide_to_citing_internet_sourc.html} [Accessed 4 November 2002].
+ \tcblower
+\begin{Verbatim}
+%</driver|tex1>
+%<*driver|bib>
+@online{holland2002gci,
+ author = {Holland, M.},
+ year = {2002},
+ title = {Guide to Citing Internet Sources},
+ address = {Poole},
+ organization = {Bournemouth University},
+ url = {http://www.bournemouth.ac.uk/library/using/guide_to_citing_internet_sourc.html},
+ urlyear = {4 November 2002}}
+%</driver|bib>
+%<*driver>
+\end{Verbatim}
+\iffalse
+%</driver>
+%<*tex1|bib1>
+@manual{holland2002gci,
+ author = {Holland, M.},
+ year = {2002},
+ title = {Guide to Citing Internet Sources},
+ titleaddon = {[Online]},
+ address = {Poole},
+ organization = {Bournemouth University},
+ url = {http://www.bournemouth.ac.uk/library/using/guide_to_citing_internet_sourc.html},
+ urldate = {4 November 2002}}
+%</tex1|bib1>
+%<*driver|tex1>
+\end{Verbatim}
+%<*driver>
+\fi
+%</driver>
+\end{bibexbox}
+
+\subsubsection*{Email discussion lists (jiscmail\slash listserv etc.)}
+
+\begin{bibexbox}(hacked)<RX>{clark2004euk}
+ Clark, T., 5 July 2004. A European UK Libraries Plus? \emph{Lis-link} [Online]. Available from:\@ \url{lis-link@jiscmail.ac.uk} [Accessed 30 July 2004].
+ \tcblower
+\begin{Verbatim}
+%</driver|tex1>
+%<*driver|bib>
+@letter{clark2004euk,
+ author = {Clark, T.},
+ year = {5 July 2004},
+ title = {A {European} {UK} {Libraries} {Plus}?},
+ journal = {Lis-link},
+ url = {lis-link@jiscmail.ac.uk},
+ urlyear = {30 July 2004}}
+%</driver|bib>
+%<*driver>
+\end{Verbatim}
+\iffalse
+%</driver>
+%<*tex1|bib1>
+@article{clark2004euk,
+ author = {Clark, T.},
+ year = {5 July 2004},
+ title = {A {European} {UK} {Libraries} {Plus}?},
+ journal = {Lis-link \textup{[Online]}},
+ url = {lis-link@jiscmail.ac.uk},
+ urldate = {30 July 2004}}
+%</tex1|bib1>
+%<*driver|tex1>
+\end{Verbatim}
+%<*driver>
+\fi
+%</driver>
+\end{bibexbox}
+
+\begin{tips}
+\item Use the \texttt{journal} field to specify the mailing list.
+%<*driver>
+Internally, a \texttt{letter} entry with a \texttt{journal} field is treated
+like an \texttt{article} entry, while one without is treated like an
+\texttt{unpublished} entry.
+%</driver>
+\end{tips}
+
+\begin{hacks}
+\item You will need to put the full date in the \texttt{year} field;
+unfortunately this means you have to put in extra work to show only the year in citations:
+\end{hacks}
+
+\begin{tcblisting}{listing side text, lefthand width=.5\linewidth}
+\citetext{\citeauthor[2004]{clark2004euk}}
+\end{tcblisting}
+
+
+\subsubsection*{Database}
+
+\begin{bibexbox}<RX>{bvd2008bt}
+ Bureau van Dijk, 2008. \emph{BT Group plc company report}. \emph{FAME} [Online]. London:\@ Bureau van Dijk. Available from:\@ \url{http://www.portal.euromonitor.com} [Accessed 6 November 2014].
+ \tcblower
+\begin{Verbatim}
+%</driver|tex1>
+%<*driver|bib>
+@online{bvd2008bt,
+ author = {{Bureau van Dijk}},
+ year = {2008},
+ title = {{BT} {Group} PLC Company Report},
+ library = {FAME},
+ address = {London},
+ organization = {Bureau van Dijk},
+ url = {http://www.portal.euromonitor.com},
+ urlyear = {6 November 2014}}
+%</driver|bib>
+%<*driver>
+\end{Verbatim}
+\iffalse
+%</driver>
+%<*tex1|bib1>
+@manual{bvd2008bt,
+ author = {{Bureau van Dijk}},
+ year = {2008},
+ title = {{BT} {Group} PLC Company Report},
+ series = {\emph{FAME} [Online]},
+ address = {London},
+ organization = {Bureau van Dijk},
+ url = {http://www.portal.euromonitor.com},
+ urldate = {6 November 2014}}
+%</tex1|bib1>
+%<*driver|tex1>
+\end{Verbatim}
+%<*driver>
+\fi
+%</driver>
+\end{bibexbox}
+
+
+\subsubsection*{Dataset}
+
+\begin{bibexbox}<RX>{wilson2013rgc}
+ Wilson, D., 2013. \emph{Real geometry and connectedness via triangular description:\@ CAD example bank} [Online]. Bath:\@ University of Bath. Available from:\@ \url{https://doi.org/10.15125/BATH-00069} [Accessed 20 April 2016].
+ \tcblower
+\begin{Verbatim}
+%</driver|tex1>
+%<*driver|bib>
+@online{wilson2013rgc,
+ author = {Wilson, D.},
+ year = {2013},
+ title = {Real Geometry and Connectedness via Triangular Description: {CAD} Example Bank},
+ address = {Bath},
+ organization = {University of Bath},
+ doi = {10.15125/BATH-00069},
+ urlyear = {20 April 2016}}
+%</driver|bib>
+%<*driver>
+\end{Verbatim}
+\iffalse
+%</driver>
+%<*tex1|bib1>
+@manual{wilson2013rgc,
+ author = {Wilson, D.},
+ year = {2013},
+ title = {Real Geometry and Connectedness via Triangular Description: {CAD} Example Bank},
+ titleaddon = {[Online]},
+ address = {Bath},
+ organization = {University of Bath},
+ doi = {10.15125/BATH-00069},
+ urldate = {20 April 2016}}
+%</tex1|bib1>
+%<*driver|tex1>
+\end{Verbatim}
+%<*driver>
+\fi
+%</driver>
+\end{bibexbox}
+
+\begin{info}\item You can use \texttt{dataset} instead of \texttt{online} as an alias for \texttt{manual}.\end{info}
+
+
+\subsubsection*{Computer program}
+
+\begin{bibexbox}<RX>{screencasto}
+ @screencasto, n.d. \emph{Screencast-O-Matic} (v.2) [computer program]. Available from:\@ \url{https://screencast-o-matic.com/} [Accessed 16 May 2016].
+ \tcblower
+\begin{Verbatim}
+%</driver|tex1>
+%<*driver|bib>
+@software{screencasto,
+ author = {@screencasto},
+ title = {{Screencast-O-Matic}},
+ version = {2},
+ titleaddon = {computer program},
+ url = {https://screencast-o-matic.com/},
+ urlyear = {16 May 2016}}
+%</driver|bib>
+%<*driver>
+\end{Verbatim}
+\iffalse
+%</driver>
+%<*tex1|bib1>
+@manual{screencasto,
+ author = {@screencasto},
+ year = {n.d.},
+ title = {{Screencast-O-Matic}},
+ titleaddon = {(v.2) [computer program]},
+ url = {https://screencast-o-matic.com/},
+ urldate = {16 May 2016}}
+%</tex1|bib1>
+%<*driver|tex1>
+\end{Verbatim}
+%<*driver>
+\fi
+%</driver>
+\end{bibexbox}
+
+\begin{info}\item Internally, \texttt{software} is an alias for \texttt{manual}.\end{info}
+
+
+\subsection{Works in languages other than English}
+
+\subsubsection*{Work in translation}
+
+\begin{bibexbox}<RX>{aristotle2007ne}
+ Aristotle, 2007. \emph{Nicomachean ethics} (W.D. Ross, Trans.). South Dakota:\@ NuVisions.
+ \tcblower
+\begin{Verbatim}
+%</driver|tex1>
+%<*driver|bib>
+@book{aristotle2007ne,
+ author = {Aristotle},
+ year = {2007},
+ title = {Nicomachean Ethics},
+ translator = {W. D. Ross},
+ address = {South Dakota},
+ publisher = {NuVisions}}
+%</driver|bib>
+%<*driver>
+\end{Verbatim}
+\iffalse
+%</driver>
+%<*tex1|bib1>
+@book{aristotle2007ne,
+ author = {Aristotle},
+ year = {2007},
+ title = {Nicomachean Ethics},
+ titleaddon = {(W.D. Ross, Trans.)},
+ address = {South Dakota},
+ publisher = {NuVisions}}
+%</tex1|bib1>
+%<*driver|tex1>
+\end{Verbatim}
+%<*driver>
+\fi
+%</driver>
+\end{bibexbox}
+
+
+\subsubsection*{Work in the Roman alphabet}
+
+\begin{bibexbox}<RX>{esquivel2003cap}
+ Esquivel, L., 2003. \emph{Como agua para chocolate} [Like water for chocolate]. Barcelona:\@ Debolsillo.
+ \tcblower
+\begin{Verbatim}
+%</driver|tex1>
+%<*driver|bib>
+@book{esquivel2003cap,
+ author = {Esquivel, L.},
+ year = {2003},
+ title = {Como Agua para Chocolate},
+ titleaddon = {Like water for chocolate},
+ address = {Barcelona},
+ publisher = {Debolsillo}}
+%</driver|bib>
+%<*driver>
+\end{Verbatim}
+\iffalse
+%</driver>
+%<*tex1|bib1>
+@book{esquivel2003cap,
+ author = {Esquivel, L.},
+ year = {2003},
+ title = {Como Agua para Chocolate},
+ titleaddon = {[Like water for chocolate]},
+ address = {Barcelona},
+ publisher = {Debolsillo}}
+%</tex1|bib1>
+%<*driver|tex1>
+\end{Verbatim}
+%<*driver>
+\fi
+%</driver>
+\end{bibexbox}
+
+\begin{bibexbox}<RX>{thurfjell1975vhv}
+ Thurfjell, W., 1975. Vart har våran doktor tagit vägen? [Where has our doctor gone?]. \emph{Läkartidningen}, 72, p.789.
+ \tcblower
+\begin{Verbatim}
+%</driver|tex1>
+%<*driver|bib>
+@article{thurfjell1975vhv,
+ author = {Thurfjell, W.},
+ year = {1975},
+ title = {Vart har våran doktor tagit vägen?},
+ titleaddon = {Where has our doctor gone?},
+ journal = {Läkartidningen},
+ volume = {72},
+ pages = {789}}
+%</driver|bib>
+%<*driver>
+\end{Verbatim}
+\iffalse
+%</driver>
+%<*tex1|bib1>
+@article{thurfjell1975vhv,
+ author = {Thurfjell, W.},
+ year = {1975},
+ title = {Vart har våran doktor tagit vägen?},
+ titleaddon = {[Where has our doctor gone?]},
+ journal = {Läkartidningen},
+ volume = {72},
+ pages = {789}}
+%</tex1|bib1>
+%<*driver|tex1>
+\end{Verbatim}
+%<*driver>
+\fi
+%</driver>
+\end{bibexbox}
+
+
+\subsubsection*{Work in a non-Roman alphabet}
+
+\begin{tips}
+\item
+The following example tricks Bib\TeX\ into treating the original rendering of the author's name as the `von' part of a Roman-alphabet name. This requires the use of a command that simply gobbles its argument, which you have to define yourself:
+
+\begin{tcblisting}{listing only}
+\newcommand*{\noop}[1]{}
+\end{tcblisting}
+
+For the trick to work, the argument you give to \lstinline[style=dtxlatex]|\noop| must be lowercase, but otherwise it can be anything you like.
+\end{tips}
+
+\newcommand*{\noop}[1]{}
+\begin{bibexbox}(hacked)<RX>{hua1999qys1}
+ Hua, L. 華林甫, 1999. Qingdai yilai Sanxia diqu shuihan zaihai de chubu yanjiu 清代以來三峽地區水旱災害的初步硏 [A preliminary study of floods and droughts in the Three Gorges region since the Qing dynasty]. \emph{Zhongguo shehui kexue} 中國社會科學, 1, pp.168--79.
+ \tcblower
+\begin{Verbatim}
+%</driver|tex1>
+%<*driver|bib>
+@article{hua1999qys1,
+ author = {Linfu \noop{h}華林甫 Hua},
+ year = {1999},
+ title = {Qingdai yilai {Sanxia} diqu shuihan zaihai de chubu yanjiu
+ {清代以來三峽地區水旱災害的初步硏}},
+ titleaddon = {A preliminary study of floods and droughts in the {Three} {Gorges} region since
+ the {Qing} dynasty},
+ journal = {Zhongguo shehui kexue \textup{中國社會科學}},
+ volume = {1},
+ pages = {168-79}}
+%</driver|bib>
+%<*driver>
+\end{Verbatim}
+\iffalse
+%</driver>
+%<*tex1|bib1>
+@article{hua1999qys1,
+ author = {Linfu \noop{h}華林甫 Hua},
+ year = {1999},
+ title = {Qingdai yilai {Sanxia} diqu shuihan zaihai de chubu yanjiu
+ {清代以來三峽地區水旱災害的初步硏}},
+ titleaddon = {[A preliminary study of floods and droughts in the {Three} {Gorges} region since
+ the {Qing} dynasty]},
+ journal = {Zhongguo shehui kexue \textup{中國社會科學}},
+ volume = {1},
+ pages = {168-79}}
+%</tex1|bib1>
+%<*driver|tex1>
+\end{Verbatim}
+%<*driver>
+\fi
+%</driver>
+\end{bibexbox}
+
+\begin{tips}
+\item If the name is due to appear initial first (e.g.\ after `In:'), you can append the non-Roman characters to the author's surname; to do this, use inverted name order as you would for English double-barrelled names without hyphens, e.g.\ \texttt{Hua 華林甫, Linfu}.
+\end{tips}
+
+\begin{bibexbox}<RX>{hua1999qys2}
+ Hua, L., 1999. Qingdai yilai Sanxia diqu shuihan zaihai de chubu yanjiu [A preliminary study of floods and droughts in the Three Gorges region since the Qing dynasty]. \emph{Zhongguo shehui kexue}, 1, pp.168--79.
+ \tcblower
+\begin{Verbatim}
+%</driver|tex1>
+%<*driver|bib>
+@article{hua1999qys2,
+ author = {Hua, Linfu},
+ year = {1999},
+ title = {Qingdai yilai {Sanxia} diqu shuihan zaihai de chubu yanjiu},
+ titleaddon = {A preliminary study of floods and droughts in the {Three} {Gorges} region since
+ the {Qing} dynasty},
+ journal = {Zhongguo shehui kexue},
+ volume = {1},
+ pages = {168-79}}
+%</driver|bib>
+%<*driver>
+\end{Verbatim}
+\iffalse
+%</driver>
+%<*tex1|bib1>
+@article{hua1999qys2,
+ author = {Hua, Linfu},
+ year = {1999},
+ title = {Qingdai yilai {Sanxia} diqu shuihan zaihai de chubu yanjiu},
+ titleaddon = {[A preliminary study of floods and droughts in the {Three} {Gorges} region since
+ the {Qing} dynasty]},
+ journal = {Zhongguo shehui kexue},
+ volume = {1},
+ pages = {168-79}}
+%</tex1|bib1>
+%<*driver|tex1>
+\end{Verbatim}
+%<*driver>
+\fi
+%</driver>
+\end{bibexbox}
+
+\begin{bibexbox}<RX>{pamporov2006rvb}
+ Pamporov, A., 2006. \emph{Romskoto vsekidnevie v Balgariya} [Roma everyday life in Bulgaria]. Veliko Tarnovo: Faber.
+ \tcblower
+\begin{Verbatim}
+%</driver|tex1>
+%<*driver|bib>
+@book{pamporov2006rvb,
+ author = {Pamporov, A.},
+ year = {2006},
+ title = {Romskoto vsekidnevie v {Balgariya}},
+ titleaddon = {Roma everyday life in Bulgaria},
+ address = {Veliko Tarnovo},
+ publisher = {Faber}}
+%</driver|bib>
+%<*driver>
+\end{Verbatim}
+\iffalse
+%</driver>
+%<*tex1|bib1>
+@book{pamporov2006rvb,
+ author = {Pamporov, A.},
+ year = {2006},
+ title = {Romskoto vsekidnevie v {Balgariya}},
+ titleaddon = {[Roma everyday life in Bulgaria]},
+ address = {Veliko Tarnovo},
+ publisher = {Faber}}
+%</tex1|bib1>
+%<*driver|tex1>
+\end{Verbatim}
+%<*driver>
+\fi
+%</driver>
+\end{bibexbox}
+
+
+\subsection{Legal references: UK legislation and parliamentary reports}
+
+% UK Primary Legislation
+
+\subsubsection*{Act of Parliament (UK Statutes) before 1963}
+
+\begin{bibexbox}<RX>{gb.wa1735}
+ \emph{Witchcraft Act 1735} (9 Geo.2, c.5).
+ \tcblower
+\begin{Verbatim}
+%</driver|tex1>
+%<*driver|bib>
+@legislation{gb.wa1735,
+ title = {Witchcraft {Act}},
+ year = {1735},
+ series = {9 Geo.2},
+ chapter = {5}}
+%</driver|bib>
+%<*driver>
+\end{Verbatim}
+\iffalse
+%</driver>
+%<*tex1|bib1>
+@book{gb.wa1735,
+ key = {Witchcraft Act 1735},
+ title = {Witchcraft {Act} 1735},
+ titleaddon = {(9 Geo.2, c.5)}}
+%</tex1|bib1>
+%<*driver|tex1>
+\end{Verbatim}
+%<*driver>
+\fi
+%</driver>
+\end{bibexbox}
+
+
+\subsubsection*{Act of Parliament (UK Statutes) 1963 onwards}
+
+\begin{bibexbox}<RX>{gb.pa2014}
+ \emph{Pensions Act 2014}, c.19. London:\@ TSO.
+ \tcblower
+\begin{Verbatim}
+%</driver|tex1>
+%<*driver|bib>
+@legislation{gb.pa2014,
+ title = {Pensions {Act}},
+ year = {2014},
+ chapter = {19},
+ address = {London},
+ publisher = {TSO}}
+%</driver|bib>
+%<*driver>
+\end{Verbatim}
+\iffalse
+%</driver>
+%<*tex1|bib1>
+@book{gb.pa2014,
+ key = {Pensions Act 2014},
+ title = {Pensions {Act} 2014},
+ number = {c.19},
+ address = {London},
+ publisher = {TSO}}
+%</tex1|bib1>
+%<*driver|tex1>
+\end{Verbatim}
+%<*driver>
+\fi
+%</driver>
+\end{bibexbox}
+
+
+\subsubsection*{House of Commons/House of Lords bill}
+
+\begin{bibexbox}<RX>{gb.bill1987/88-66}
+ Great Britain.\@ Parliament.\@ House of Commons, 1988. \emph{Local government finance bill}. (Bills | 1987/88, 66). London:\@ HMSO.
+ \tcblower
+\begin{Verbatim}
+%</driver|tex1>
+%<*driver|bib>
+@legislation{gb.bill1987/88-66,
+ author = {{Great Britain. Parliament. House of Commons}},
+ year = {1988},
+ title = {Local Government Finance Bill},
+ address = {London},
+ publisher = {HMSO},
+ series = {{Bills | 1987/88}},
+ number = {66}}
+%</driver|bib>
+%<*driver>
+\end{Verbatim}
+\iffalse
+%</driver>
+%<*tex1|bib1>
+@techreport{gb.bill1987/88-66,
+ author = {{Great Britain. Parliament. House of Commons}},
+ year = {1988},
+ title = {Local Government Finance Bill},
+ address = {London},
+ publisher = {HMSO},
+ type = {{Bills |}},
+ number = {1987/88, 66}}
+%</tex1|bib1>
+%<*driver|tex1>
+\end{Verbatim}
+%<*driver>
+\fi
+%</driver>
+\end{bibexbox}
+
+
+% UK secondary legislation
+
+\subsubsection*{Statutory instrument}
+
+\begin{bibexbox}<RX>{gb.hmr2012}
+ \emph{The Human Medicines Regulations 2012} [Online], No.1916, United Kingdom:\@ HMSO. Available from:\@ \url{http://www.legislation.gov.uk/uksi/2012/1916/pdfs/uksi_20121916_en.pdf} [Accessed 17 April 2016].
+ \tcblower
+\begin{Verbatim}
+%</driver|tex1>
+%<*driver|bib>
+@legislation{gb.hmr2012,
+ entrysubtype = {secondary},
+ title = {The {Human} {Medicines} {Regulations}},
+ year = {2012},
+ number = {No.1916},
+ address = {United Kingdom},
+ publisher = {HMSO},
+ url = {http://www.legislation.gov.uk/uksi/2012/1916/pdfs/uksi_20121916_en.pdf},
+ urlyear = {17 April 2016}}
+%</driver|bib>
+%<*driver>
+\end{Verbatim}
+\iffalse
+%</driver>
+%<*tex1|bib1>
+@book{gb.hmr2012,
+ title = {The {Human} {Medicines} {Regulations} 2012},
+ titleaddon = {[Online]},
+ number = {No.1916},
+ address = {United Kingdom},
+ publisher = {HMSO},
+ url = {http://www.legislation.gov.uk/uksi/2012/1916/pdfs/uksi_20121916_en.pdf},
+ urldate = {17 April 2016}}
+%</tex1|bib1>
+%<*driver|tex1>
+\end{Verbatim}
+%<*driver>
+\fi
+%</driver>
+\end{bibexbox}
+
+%<*driver>
+\begin{tips}\item Use the \texttt{entrysubtype} `secondary' to put the number in the right place.\end{tips}
+%</driver>
+
+% Parliamentary reports
+
+\subsubsection*{House of Commons paper}
+
+Use this form for reports of House of Commons select committees.
+
+\begin{bibexbox}<RX>{gb.hc2003/04-30}
+ Great Britain.\@ Parliament.\@ House of Commons, 2004. \emph{National Savings investment deposits:\@ account 2002--2003}. (HC 2003/04, 30). London:\@ National Audit Office.
+ \tcblower
+\begin{Verbatim}
+%</driver|tex1>
+%<*driver|bib>
+@techreport{gb.hc2003/04-30,
+ author = {{Great Britain. Parliament. House of Commons}},
+ year = {2004},
+ title = {National {Savings} Investment Deposits: account 2002--2003},
+ address = {London},
+ publisher = {National Audit Office},
+ series = {HC 2003/04},
+ number = {30}}
+%</driver|bib>
+%<*driver>
+\end{Verbatim}
+\iffalse
+%</driver>
+%<*tex1|bib1>
+@techreport{gb.hc2003/04-30,
+ author = {{Great Britain. Parliament. House of Commons}},
+ year = {2004},
+ title = {National {Savings} Investment Deposits: account 2002--2003},
+ address = {London},
+ publisher = {National Audit Office},
+ type = {{HC}},
+ number = {2003/04, 30}}
+%</tex1|bib1>
+%<*driver|tex1>
+\end{Verbatim}
+%<*driver>
+\fi
+%</driver>
+\end{bibexbox}
+
+
+\subsubsection*{House of Lords paper}
+
+Use this form for reports of House of Lords select committees.
+
+\begin{bibexbox}<RX>{gb.hl1986/87-66}
+ Great Britain.\@ Parliament.\@ House of Lords, 1987. \emph{Social fund (maternity and funeral expenses) bill}. (HL 1986/87, (66)). London:\@ HMSO.
+ \tcblower
+\begin{Verbatim}
+%</driver|tex1>
+%<*driver|bib>
+@techreport{gb.hl1986/87-66,
+ author = {{Great Britain. Parliament. House of Lords}},
+ year = {1987},
+ title = {Social Fund (Maternity and Funeral Expenses) Bill},
+ address = {London},
+ publisher = {HMSO},
+ series = {HL 1986/87},
+ number = {66}}
+%</driver|bib>
+%<*driver>
+\end{Verbatim}
+\iffalse
+%</driver>
+%<*tex1|bib1>
+@techreport{gb.hl1986/87-66,
+ author = {{Great Britain. Parliament. House of Lords}},
+ year = {1987},
+ title = {Social Fund (Maternity and Funeral Expenses) Bill},
+ address = {London},
+ publisher = {HMSO},
+ type = {{HL}},
+ number = {1986/87, (66)}}
+%</tex1|bib1>
+%<*driver|tex1>
+\end{Verbatim}
+%<*driver>
+\fi
+%</driver>
+\end{bibexbox}
+
+%<*driver>
+\begin{hacks}
+\item For joint committees, you will have to hack this slightly, putting the session
+years in \texttt{series} and the HL and HC numbers in \texttt{number}.
+\end{hacks}
+%</driver>
+
+
+\subsubsection*{Command paper}
+
+\begin{bibexbox}<RX>{gb.cm6041}
+ Great Britain.\@ Ministry of Defence, 2004. \emph{Delivering security in a changing world:\@ defence white paper}. (Cm.\@ 6041). London:\@ TSO.
+ \tcblower
+\begin{Verbatim}
+%</driver|tex1>
+%<*driver|bib>
+@techreport{gb.cm6041,
+ author = {{Great Britain. Ministry of Defence}},
+ year = {2004},
+ title = {Delivering Security in a Changing World{:} Defence White Paper},
+ address = {London},
+ publisher = {TSO},
+ series = {Cm},
+ number = {6041}}
+%</driver|bib>
+%<*driver>
+\end{Verbatim}
+\iffalse
+%</driver>
+%<*tex1|bib1>
+@techreport{gb.cm6041,
+ author = {{Great Britain. Ministry of Defence}},
+ year = {2004},
+ title = {Delivering Security in a Changing World{:} Defence White Paper},
+ address = {London},
+ publisher = {TSO},
+ type = {{Cm.}},
+ number = {6041}}
+%</tex1|bib1>
+%<*driver|tex1>
+\end{Verbatim}
+%<*driver>
+\fi
+%</driver>
+\end{bibexbox}
+
+
+\subsection{Legal references: EU legislation and reports}
+
+% European legislation
+
+\subsubsection*{EU regulation or directive, decision, recommendation or opinion}
+
+\begin{bibexbox}<RX>{eu.dir1984/2003}
+ Council Regulation (EC) 1984/2003 of 8 April 2003 introducing a system for the statistical monitoring of trade in bluefin tuna, swordfish and big eye tuna within the Community [2003] \emph{OJ} L295.
+ \tcblower
+\begin{Verbatim}
+%</driver|tex1>
+%<*driver|bib>
+@legislation{eu.dir1984/2003,
+ title = {Council {Regulation} ({EC}) 1984/2003 of 8 {April} 2003 Introducing a System for
+ the Statistical Monitoring of Trade in Bluefin Tuna, Swordfish and Big Eye Tuna within
+ the {Community}},
+ year = {2003},
+ journal = {OJ},
+ series = {L},
+ volume = {295}}
+%</driver|bib>
+%<*driver>
+\end{Verbatim}
+\iffalse
+%</driver>
+%<*tex1|bib1>
+@misc{eu.dir1984/2003,
+ title = {Council {Regulation} ({EC}) 1984/2003 of 8 {April} 2003 Introducing a System for
+ the Statistical Monitoring of Trade in Bluefin Tuna, Swordfish and Big Eye Tuna within
+ the {Community}},
+ titleaddon = {[2003] \emph{OJ} L295}}
+%</tex1|bib1>
+%<*driver|tex1>
+\end{Verbatim}
+%<*driver>
+\fi
+%</driver>
+\end{bibexbox}
+
+\begin{hacks}
+\item Use \lstinline[style=dtxlatex]|\defcitealias| to provide a suitable citation string:
+\begin{tcblisting}{listing side text, lefthand width=.46\linewidth}
+\defcitealias{eu.dir1984/2003}{%
+ Council Regulation [EC] 1984/2003}
+\citepalias{eu.dir1984/2003}
+\end{tcblisting}
+\end{hacks}
+
+% European reports
+
+\subsubsection*{EU publication}
+
+\begin{bibexbox}<RX>{ec2015gra}
+ European Commission, 2015. \emph{General report on the activities of the European Union 2014}. Luxembourg:\@ Publications Office of the European Union.
+ \tcblower
+\begin{Verbatim}
+%</driver|tex1>
+%<*driver|bib>
+@techreport{ec2015gra,
+ author = {{European Commission}},
+ year = {2015},
+ title = {General Report on the Activities of the {European} {Union} 2014},
+ address = {Luxembourg},
+ publisher = {Publications Office of the European Union}}
+%</driver|bib>
+%<*driver>
+\end{Verbatim}
+\iffalse
+%</driver>
+%<*tex1|bib1>
+@techreport{ec2015gra,
+ author = {{European Commission}},
+ year = {2015},
+ title = {General Report on the Activities of the {European} {Union} 2014},
+ address = {Luxembourg},
+ publisher = {Publications Office of the European Union}}
+%</tex1|bib1>
+%<*driver|tex1>
+\end{Verbatim}
+%<*driver>
+\fi
+%</driver>
+\end{bibexbox}
+
+
+\subsection{Legal references: case reports}
+
+\subsubsection*{Legal case study}
+
+\begin{bibexbox}<RX>{seldon-v-c.w.j2012}
+ \emph{Seldon v.~Clarkson Wright \& Jakes}. [2012]. UKSC 16.
+ \tcblower
+\begin{Verbatim}
+%</driver|tex1>
+%<*driver|bib>
+@jurisdiction{seldon-v-c.w.j2012,
+ title = {Seldon v.~{Clarkson} {Wright} \& {Jakes}},
+ year = {2012},
+ journal = {UKSC},
+ pages = {16}}
+%</driver|bib>
+%<*driver>
+\end{Verbatim}
+\iffalse
+%</driver>
+%<*tex1|bib1>
+@report{seldon-v-c.w.j2012,
+ title = {Seldon v.~{Clarkson} {Wright} \& {Jakes}},
+ note = {[2012]. UKSC 16}}
+%</tex1|bib1>
+%<*driver|tex1>
+\end{Verbatim}
+%<*driver>
+\fi
+%</driver>
+\end{bibexbox}
+
+\begin{info}\item
+Generally speaking, the year should be in square brackets if it is essential to the citation
+(unless it is a Scottish case, in which case it is printed bare), and in parentheses if it is
+not.
+\end{info}
+%<*driver>
+
+\begin{tips}
+\item The style assumes the year is essential if and only if a volume number is
+\emph{not} provided; to override this, you can use the \key{year-essential} option:
+
+\begin{tcolorbox}%
+ [ colframe = Slate
+ , colback = white
+ , fontupper = \footnotesize
+ ]
+\begin{Verbatim}
+ options = {year-essential=true},
+\end{Verbatim}
+\end{tcolorbox}
+
+To use Scottish style for a case, you can either use the \key{scottish-style} option or
+the keyword \texttt{sc}.
+
+\begin{tcolorbox}%
+ [ colframe = Slate
+ , colback = white
+ , fontupper = \footnotesize
+ ]
+\begin{Verbatim}
+ options = {scottish-style},
+ keywords = {sc},
+\end{Verbatim}
+\end{tcolorbox}
+\end{tips}
+
+\begin{info}
+\item Please bear in mind that the \texttt{options} and \texttt{keywords}
+fields from \textsf{biblatex} have been emulated rather crudely. You can only
+supply one of each and the text must match exactly (so don't add spaces
+or anything like that).
+\end{info}
+
+\begin{hacks}\item
+This should cover most cases, but legal references tend to enforce their own conventions
+no matter what the rest of the reference list is doing,
+and it is out of scope for this style to cater for every variation.
+Therefore if you need a different format (e.g.\@ for an American case),
+you may prefer to format the reference more-or-less by hand:
+
+\begin{tcolorbox}%
+ [ colframe = Slate
+ , colback = white
+ , fontupper = \footnotesize
+ ]
+ \begin{Verbatim}
+ title = {Seldon v.~{Clarkson} {Wright} \& {Jakes}},
+ sortyear = {2012},
+ note = {[2012]. UKSC 16}
+ \end{Verbatim}
+\end{tcolorbox}
+\end{hacks}
+%</driver>
+
+
+\subsubsection*{Judgment of the European Court of Justice}
+
+\begin{bibexbox}<RX>{srl.etal-v-comm2005}
+ \emph{Alessandrini Srl and others v.~Commission} (C-295/03 P) [2005] ECR I--5700.
+ \tcblower
+\begin{Verbatim}
+%</driver|tex1>
+%<*driver|bib>
+@jurisdiction{srl.etal-v-comm2005,
+ title = {Alessandrini {Srl} and others v.~{Commission}},
+ number = {C-295/03 P},
+ year = {2005},
+ journal = {ECR},
+ volume = {I},
+ pages = {5700}}
+%</driver|bib>
+%<*driver>
+\end{Verbatim}
+\iffalse
+%</driver>
+%<*tex1|bib1>
+@report{srl.etal-v-comm2005,
+ title = {Alessandrini {Srl} and others v.~{Commission}},
+ titleaddon = {(C-295/03 P) [2005] ECR I--5700}}
+%</tex1|bib1>
+%<*driver|tex1>
+\end{Verbatim}
+%<*driver>
+\fi
+%</driver>
+\end{bibexbox}
+
+%<*driver>
+\begin{tips}
+\item
+Use the \texttt{number} field (or the non-standard \texttt{casenmuber} field)
+for the case number. For Commission Decisions, use the (non-standard)
+\texttt{casenumber} or (\textsf{biblatex-oscola}) \texttt{userb} field for the
+Commission case number, \texttt{number} for the formal decision number, and give
+`Commission' as the \texttt{institution}.
+\end{tips}
+%</driver>
+
+
+%</driver|tex1>
+%<tex1>\bibliography{bath-bst-v1}
+%<*driver>
+\bibliography{bath-bst}
+
+\section*{Licence}
+
+\begin{markdown*}{hybrid=true}
+%</driver>
+%<readme>
+%<readme>## Licence
+%<readme>
+%<*driver|readme>
+Copyright 2016-2018 University of Bath.
+
+This work consists of the documented LaTeX file bath-bst.dtx and a Makefile.
+
+The text files contained in this work may be distributed and/or modified
+under the conditions of the [LaTeX Project Public License (LPPL)][lppl],
+either version 1.3c of this license or (at your option) any later
+version.
+
+This work is ‘maintained’ (as per LPPL maintenance status) by [Alex Ball][me].
+
+[lppl]: http://www.latex-project.org/lppl.txt "LaTeX Project Public License (LPPL)"
+[me]: https://github.com/alex-ball/bathbib "Alex Ball"
+%</driver|readme>
+%<*driver>
+\end{markdown*}
+
+\newpage
+\lstset
+ { style=dtxbst
+ , aboveskip=0pt
+ , belowskip=0pt
+ , numbers=left
+ , numberstyle=\color{gray}\footnotesize\itshape
+ , firstnumber=last
+ , basicstyle=\ttfamily\footnotesize
+ , breaklines=true
+ }%
+\tcbset
+ { listing options =
+ { style = tcblatex
+ , style = dtxbst
+ , basicstyle=\ttfamily\footnotesize
+ }
+ }%
+\MakeShortVerb{\|}%
+\DocInput{\jobname.dtx}
+
+%</driver>
+%<*driver|tex1>
+\end{document}
+%</driver|tex1>
+%<*bib|bib1>
+@book{adams2009tc1,
+ author = {Adams, Gomez},
+ year = {2009},
+ title = {Test Citation One},
+ address = {London},
+ publisher = {Imperial College Bookstall}}
+@book{adams2014tc2,
+ author = {Adams, Gomez},
+ year = {2014},
+ title = {Test Citation Two},
+ address = {Oxford},
+ publisher = {Oxford University Press}}
+@book{adams2017tc3,
+ author = {Adams, Gomez},
+ year = {2017},
+ title = {Test Citation Three},
+ address = {Cambridge},
+ publisher = {Cambridge University Press}}
+%</bib|bib1>
+%<*bst1|bst2>
+% \fi
+%
+% \section{Implementation}
+%
+% The line numbers for the listings below match |bathx.bst|.
+% \setcounter{lstnumber}{16}
+%
+% \subsection{Data model}
+%
+% We begin by listing the entry fields that we will recognize. These are the
+% standard Bib\TeX\ ones plus |archive|, |doi|, |eid|, |eprint|, |entrysubtype|,
+% |eventyear|, |keywords|, |language|, |library|, |options|, |pubstate|,
+% |sortyear|, |titleaddon|, |translator|, |url|, |urldate|, |urlyear|, |userb|,
+% |venue|, and |version|, all of which have been backported from \textsf{natbib}
+% and \textsf{biblatex}. |casenumber| is specific to this style.
+%
+% \begin{macrocode}
+ENTRY
+ { address
+ archive
+ author
+ booktitle
+ casenumber
+ chapter
+ doi
+ edition
+ editor
+ eid
+ entrysubtype
+ eprint
+ eventyear
+ howpublished
+ institution
+ journal
+ key
+ keywords
+ language
+ library
+ month
+ note
+ number
+ options
+ organization
+ pages
+ publisher
+ pubstate
+ school
+ series
+ sortyear
+ title
+ titleaddon
+ translator
+ type
+ url
+ urldate
+ urlyear
+ userb
+ venue
+ version
+ volume
+ year
+ }
+ {}
+ { label extra.label sort.label short.list }
+% \end{macrocode}
+%
+% \subsection{Writing references out to a file}
+%
+% We define a set of integers for saving an output state. We will use them to
+% to implement the mechanism for stringing the elements of the reference
+% together. Whenever an element is printed, it is separated from any previous
+% previous text by a delimiter, and the delimiter chosen depends on the state.
+% We define five states which trigger increasingly strong delimiters.
+%
+% \begin{macrocode}
+INTEGERS { output.state before.all mid.clause mid.sentence after.sentence after.block }
+FUNCTION {init.state.consts}
+{ #0 'before.all :=
+ #1 'mid.clause :=
+ #2 'mid.sentence :=
+ #3 'after.sentence :=
+ #4 'after.block :=
+}
+% \end{macrocode}
+%
+% We also define two variables to store strings in.
+%
+% \begin{macrocode}
+STRINGS { s t }
+% \end{macrocode}
+%
+% The |output.nonnull| function removes an element from the stack, writes the
+% appropriate delimiter to the .bbl file depending on the state, then restores
+% the original element. Afterwards, the output state is set to |mid.sentence|.
+%
+% \begin{itemize}
+% \item |before.all| = nothing is written.
+% \item |mid.clause| = a space is written.
+% \item |mid.sentence| = a comma is written.
+% \item |after.sentence| = a period is written.
+% \item |after.block| = a period, line break and |\newblock| are written.
+% \end{itemize}
+%
+% \begin{macrocode}
+FUNCTION {output.nonnull}
+{ 's :=
+ output.state mid.sentence =
+ { ", " * write$ }
+ { output.state after.sentence =
+ { add.period$ " " * write$ }
+ { output.state before.all =
+ 'write$
+ { output.state mid.clause =
+ { " " * write$ }
+ { add.period$ write$
+ newline$
+ "\newblock " write$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+ mid.sentence 'output.state :=
+ }
+ if$
+ s
+}
+% \end{macrocode}
+%
+% The `after' output states persist if nothing is printed. The `mid.clause'
+% state shouldn't, so we provide a macro for reverting to `mid.sentence'.
+%
+% \begin{macrocode}
+FUNCTION {end.clause}
+{ output.state mid.clause =
+ { mid.sentence 'output.state := }
+ 'skip$
+ if$
+}
+% \end{macrocode}
+%
+% Before writing anything out, we need to make sure there is something to be
+% printed. We provide two functions for this: |output| is silent, while
+% |output.check| will write a warning to the log that the field is empty. The
+% latter consumes an additional string (at the top of the stack) for printing
+% in the warning message.
+%
+% \begin{macrocode}
+FUNCTION {output}
+{ duplicate$ empty$
+ { pop$ end.clause }
+ 'output.nonnull
+ if$
+}
+FUNCTION {output.check}
+{ 't :=
+ duplicate$ empty$
+ { pop$ "empty " t * " in " * cite$ * warning$
+ end.clause
+ }
+ 'output.nonnull
+ if$
+}
+% \end{macrocode}
+%
+% We provide some convenience functions for changing the state from
+% |mid.sentence|. The order of precedence is before.all, after.block,
+% after.sentence, mid.clause/mid.sentence.
+%
+% \begin{macrocode}
+FUNCTION {new.block}
+{ output.state before.all =
+ 'skip$
+ { after.block 'output.state := }
+ if$
+}
+FUNCTION {new.sentence}
+{ output.state after.block =
+ 'skip$
+ { output.state before.all =
+ 'skip$
+ { after.sentence 'output.state := }
+ if$
+ }
+ if$
+}
+FUNCTION {continue.clause}
+{ output.state after.sentence =
+ 'skip$
+ { output.state after.block =
+ 'skip$
+ { output.state before.all =
+ 'skip$
+ { mid.clause 'output.state := }
+ if$
+ }
+ if$
+ }
+ if$
+}
+% \end{macrocode}
+%
+% The |date.block| function is a handy alias.
+%
+% \begin{macrocode}
+FUNCTION {date.block}
+{ new.block
+}
+% \end{macrocode}
+%
+% The |bibinfo| functions consume two tokens: the value and name of a field
+% respectively. If the value is non-null, it is written out to the .bbl file in
+% the form |\bibinfo{field name}| |{field value}|. If the value is missing, the
+% tokens are replaced with an empty string; if the value is empty, it is put
+% back on the stack. The |check| version does this silently, while the |warn|
+% version issues warnings in the log file if the value is missing or empty.
+%
+% \begin{macrocode}
+FUNCTION {bibinfo.check}
+{ swap$
+ duplicate$ missing$
+ { pop$ pop$
+ ""
+ }
+ { duplicate$ empty$
+ { swap$ pop$
+ }
+ { swap$
+ "\bibinfo{" swap$ * "}{" * swap$ * "}" *
+ }
+ if$
+ }
+ if$
+}
+FUNCTION {bibinfo.warn}
+{ swap$
+ duplicate$ missing$
+ { swap$ "missing " swap$ * " in " * cite$ * warning$ pop$
+ ""
+ }
+ { duplicate$ empty$
+ { swap$ "empty " swap$ * " in " * cite$ * warning$
+ }
+ { swap$
+ "\bibinfo{" swap$ * "}{" * swap$ * "}" *
+ }
+ if$
+ }
+ if$
+}
+% \end{macrocode}
+%
+% At the end of the reference, |fin.entry| writes out a final period and line
+% break. We will handle the start of the reference a bit later.
+%
+% \begin{macrocode}
+FUNCTION {fin.entry}
+{ add.period$
+ write$
+ newline$
+}
+
+% \end{macrocode}
+%
+% \subsection{Convenience functions}
+%
+% We define some useful logical operations for use with |if$|.
+%
+% \begin{macrocode}
+FUNCTION {not}
+{ { #0 }
+ { #1 }
+ if$
+}
+FUNCTION {and}
+{ 'skip$
+ { pop$ #0 }
+ if$
+}
+FUNCTION {or}
+{ { pop$ #1 }
+ 'skip$
+ if$
+}
+% \end{macrocode}
+%
+% |new.block.checkb| consumes two tokens and starts a new block if at least one
+% is non-empty.
+%
+% \begin{macrocode}
+FUNCTION {new.block.checkb}
+{ empty$
+ swap$ empty$
+ and
+ 'skip$
+ 'new.block
+ if$
+}
+% \end{macrocode}
+%
+% |field.or.null| replaces an empty (null) field value with an empty string.
+%
+% \begin{macrocode}
+FUNCTION {field.or.null}
+{ duplicate$ empty$
+ { pop$ "" }
+ 'skip$
+ if$
+}
+% \end{macrocode}
+%
+% The \texttt{emphasize} function applies emphasis.
+%
+% \begin{macrocode}
+FUNCTION {emphasize}
+{ duplicate$ empty$
+ { pop$ "" }
+ { "\emph{" swap$ * "}" * }
+ if$
+}
+% \end{macrocode}
+%
+% The \texttt{tie.or.space.prefix} function prefixes a string with a non-breaking
+% space if it is up to three characters long, or a normal space otherwise.
+%
+% \begin{macrocode}
+FUNCTION {tie.or.space.prefix}
+{ duplicate$ text.length$ #3 <
+ { "~" }
+ { " " }
+ if$
+ swap$
+}
+% \end{macrocode}
+%
+% The \texttt{capitalize} function makes putting strings into sentence case a
+% little more robust.
+%
+% \begin{macrocode}
+FUNCTION {capitalize}
+{ "u" change.case$ "t" change.case$ }
+% \end{macrocode}
+%
+% The \texttt{space.word} function adds a space to either side of a string.
+%
+% \begin{macrocode}
+FUNCTION {space.word}
+{ " " swap$ * " " * }
+% \end{macrocode}
+%
+% |either.or.check| takes a string and a field, and if the field is not empty,
+% writes a warning to the log file.
+%
+% \begin{macrocode}
+FUNCTION {either.or.check}
+{ empty$
+ 'pop$
+ { "can't use both " swap$ * " fields in " * cite$ * warning$ }
+ if$
+}
+% \end{macrocode}
+%
+% |is.online| checks whether the entry should have `[Online]' in it somewhere.
+%
+% \begin{macrocode}
+FUNCTION {is.online}
+{ type$ "software" =
+ { #0 }
+ { url empty$
+ { type$ "online" =
+ { #1 }
+ { #0 }
+ if$
+ }
+ { #1 }
+ if$
+ }
+ if$
+}
+% \end{macrocode}
+%
+% \subsection{Bibliography strings}
+%
+% Instead of dropping literal English words into the text of references, we
+% will use these functions instead. This makes it easier to translate the style
+% into other languages.
+%
+% \begin{macrocode}
+FUNCTION {bbl.and}
+{ "and"}
+
+FUNCTION {bbl.etal}
+{ "et~al." }
+
+FUNCTION {bbl.editors}
+{ "eds" }
+
+FUNCTION {bbl.editor}
+{ "ed." }
+
+FUNCTION {bbl.edby}
+{ "edited by" }
+
+FUNCTION {bbl.translator}
+{ "Trans." }
+
+FUNCTION {bbl.edition}
+{ "ed." }
+
+FUNCTION {bbl.volume}
+{ "vol." }
+
+FUNCTION {bbl.of}
+{ "of" }
+
+FUNCTION {bbl.number}
+{ "no." }
+
+FUNCTION {bbl.nr}
+{ "no." }
+
+FUNCTION {bbl.in}
+{ "in" }
+
+FUNCTION {bbl.pages}
+{ "pp." }
+
+FUNCTION {bbl.page}
+{ "p." }
+
+FUNCTION {bbl.chapter}
+{ "chap." }
+
+FUNCTION {bbl.techrep}
+{ "Tech. Rep." }
+
+FUNCTION {bbl.mthesis}
+{ "Master's thesis" }
+
+FUNCTION {bbl.phdthesis}
+{ "Ph.D. thesis" }
+
+FUNCTION {bbl.first}
+{ "1st" }
+
+FUNCTION {bbl.second}
+{ "2nd" }
+
+FUNCTION {bbl.third}
+{ "3rd" }
+
+FUNCTION {bbl.fourth}
+{ "4th" }
+
+FUNCTION {bbl.fifth}
+{ "5th" }
+
+FUNCTION {bbl.st}
+{ "st" }
+
+FUNCTION {bbl.nd}
+{ "nd" }
+
+FUNCTION {bbl.rd}
+{ "rd" }
+
+FUNCTION {bbl.th}
+{ "th" }
+
+FUNCTION {bbl.commission}
+{ "Commission Decision" }
+
+FUNCTION {bbl.online}
+{ "[Online]" }
+
+FUNCTION {bbl.nodate}
+{ "n.d." }
+
+FUNCTION {bbl.inpreparation}
+{ "preprint" }
+
+FUNCTION {bbl.submitted}
+{ "preprint" }
+
+FUNCTION {bbl.inpress}
+{ "in press" }
+
+FUNCTION {bbl.unpublished}
+{ "Unpublished" }
+
+% \end{macrocode}
+%
+% These macros are codes that users can put in their \texttt{.bib} file instead of
+% literal strings.
+%
+% \begin{macrocode}
+MACRO {jan} {"January"}
+
+MACRO {feb} {"February"}
+
+MACRO {mar} {"March"}
+
+MACRO {apr} {"April"}
+
+MACRO {may} {"May"}
+
+MACRO {jun} {"June"}
+
+MACRO {jul} {"July"}
+
+MACRO {aug} {"August"}
+
+MACRO {sep} {"September"}
+
+MACRO {oct} {"October"}
+
+MACRO {nov} {"November"}
+
+MACRO {dec} {"December"}
+
+% \end{macrocode}
+%
+% This function allows us to convert cardinal numbers to English ordinals.
+%
+% \begin{macrocode}
+FUNCTION {eng.ord}
+{ duplicate$ "1" swap$ *
+ #-2 #1 substring$ "1" =
+ { bbl.th * }
+ { duplicate$ #-1 #1 substring$
+ duplicate$ "1" =
+ { pop$ bbl.st * }
+ { duplicate$ "2" =
+ { pop$ bbl.nd * }
+ { "3" =
+ { bbl.rd * }
+ { bbl.th * }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+}
+
+% \end{macrocode}
+%
+% \subsection{Name handling}
+%
+% |format.names| consumes two tokens (field, string field name) and returns a
+% list of names in the form `Surname, Suffix, Initials Prefix'. To help with this,
+% we define some additional integers and strings.
+%
+% \begin{macrocode}
+INTEGERS { nameptr namesleft numnames }
+STRINGS { bibinfo }
+FUNCTION {format.names}
+{ 'bibinfo :=
+ duplicate$ empty$
+ 'skip$
+ { 's :=
+ "" 't :=
+ #1 'nameptr :=
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ { s nameptr
+ "{ll}{, jj}{, f{.}.}{~vv}"
+ format.name$
+ bibinfo bibinfo.check
+ 't :=
+ nameptr #1 >
+ { namesleft #1 >
+ { ", " * t * }
+ { s nameptr "{ll}" format.name$ duplicate$ "others" =
+ { 't := }
+ { pop$ }
+ if$
+ t "others" =
+ { " " * bbl.etal *
+ }
+ { bbl.and
+ space.word * t *
+ }
+ if$
+ }
+ if$
+ }
+ 't
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+ }
+ if$
+}
+% \end{macrocode}
+%
+% |format.names.ed| consumes two tokens (field, string field name) and writes
+% out a list of names in the form `Initials Prefix Surname Suffix'.
+%
+% \begin{macrocode}
+FUNCTION {format.names.ed}
+{ 'bibinfo :=
+ duplicate$ empty$
+ 'skip$
+ { 's :=
+ "" 't :=
+ #1 'nameptr :=
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ { s nameptr
+ "{f{.}.~}{vv~}{ll}{ jj}"
+ format.name$
+ bibinfo bibinfo.check
+ 't :=
+ nameptr #1 >
+ { namesleft #1 >
+ { ", " * t * }
+ { s nameptr "{ll}" format.name$ duplicate$ "others" =
+ { 't := }
+ { pop$ }
+ if$
+ t "others" =
+ { " " * bbl.etal *
+ }
+ { bbl.and
+ space.word * t *
+ }
+ if$
+ }
+ if$
+ }
+ 't
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+ }
+ if$
+}
+% \end{macrocode}
+%
+% |format.authors| returns author names.
+%
+% \begin{macrocode}
+FUNCTION {format.authors}
+{ author "author" format.names
+}
+% \end{macrocode}
+%
+% |format.editors| returns editor names, and appends `ed.' or `eds' as
+% appropriate.
+%
+% \begin{macrocode}
+FUNCTION {get.bbl.editor}
+{ editor num.names$ #1 > 'bbl.editors 'bbl.editor if$ }
+FUNCTION {format.editors}
+{ editor "editor" format.names duplicate$ empty$ 'skip$
+ { "," *
+ " " *
+ get.bbl.editor
+ *
+ }
+ if$
+}
+% \end{macrocode}
+%
+% |format.translators| does likewise for translators, in the form
+% `(name, Trans.)'.
+%
+% \begin{macrocode}
+FUNCTION {format.translators}
+{ translator "translator" format.names.ed duplicate$ empty$ 'skip$
+ { "," *
+ " " *
+ bbl.translator *
+ "(" swap$ *
+ ")" *
+ }
+ if$
+}
+% \end{macrocode}
+%
+% |format.full.names| consumes one token (a name field) and, contrary to what
+% the name might suggest, returns a list of names in the form `Prefix Surname'.
+% It is called `full' because the list is not truncated.
+%
+% \begin{macrocode}
+FUNCTION {format.full.names}
+{'s :=
+ "" 't :=
+ #1 'nameptr :=
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ { s nameptr
+ "{vv~}{ll}" format.name$
+ 't :=
+ nameptr #1 >
+ { namesleft #1 >
+ { ", " * t * }
+ { s nameptr "{ll}" format.name$ duplicate$ "others" =
+ { 't := }
+ { pop$ }
+ if$
+ t "others" =
+ { " " * bbl.etal *
+ }
+ { bbl.and
+ space.word * t *
+ }
+ if$
+ }
+ if$
+ }
+ 't
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+}
+% \end{macrocode}
+%
+% |author.editor.key.full| returns the author part of an author--year citation.
+% In order of preference, it outputs the author surnames, editor surnames, the
+% |key| field, or the first three characters of the entry key. It is used in
+% |book| and |inbook| entry types.
+%
+% \begin{macrocode}
+FUNCTION {author.editor.key.full}
+{ author empty$
+ { editor empty$
+ { key empty$
+ { cite$ #1 #3 substring$ }
+ 'key
+ if$
+ }
+ { editor format.full.names }
+ if$
+ }
+ { author format.full.names }
+ if$
+}
+% \end{macrocode}
+%
+% |editor.key.full| does similar but skips the author names. It is used for the
+% |proceedings| entry type.
+%
+% \begin{macrocode}
+FUNCTION {editor.key.full}
+{ editor empty$
+ { key empty$
+ { cite$ #1 #3 substring$ }
+ 'key
+ if$
+ }
+ { editor format.full.names }
+ if$
+}
+% \end{macrocode}
+%
+% |author.key.full| does similar but skips the editor names. It is used for all
+% other entry types.
+%
+% \begin{macrocode}
+FUNCTION {author.key.full}
+{ author empty$
+ { key empty$
+ { cite$ #1 #3 substring$ }
+ 'key
+ if$
+ }
+ { author format.full.names }
+ if$
+}
+% \end{macrocode}
+%
+% |make.full.names| chooses between the above.
+%
+% \begin{macrocode}
+FUNCTION {make.full.names}
+{ type$ "book" =
+ type$ "inbook" =
+ or
+ 'author.editor.key.full
+ { type$ "proceedings" =
+ 'editor.key.full
+ 'author.key.full
+ if$
+ }
+ if$
+}
+% \end{macrocode}
+%
+% |output.bibitem| writes out the very start of the entry in the bibliography,
+% which looks like |\bibitem[{|author--year elements|}]{|entry key|}|. The
+% author--year part uses special \textsf{natbib} syntax: either `Author(Year)'
+% or `Truncated author list(Year)Full author list'. The |calc.label| function
+% below supplies the truncated author list, opening parenthesis and year; you
+% see here the closing parenthesis and conditional inclusion of the full list.
+% The function then starts a new line and puts the entry driver into the
+% |before.all| output state.
+%
+% \begin{macrocode}
+FUNCTION {output.bibitem}
+{ newline$
+ "\bibitem[{" write$
+ label write$
+ ")" make.full.names duplicate$ short.list =
+ { pop$ }
+ { * }
+ if$
+ "}]{" * write$
+ cite$ write$
+ "}" write$
+ newline$
+ ""
+ before.all 'output.state :=
+}
+% \end{macrocode}
+%
+% |format.key| takes a field (author or editor). If the field is empty, it
+% replaces it with the key field (if not non-null). Otherwise, replaces it with
+% an empty string. It is used as a last resort to stop an entry beginning with
+% the date.
+%
+% \begin{macrocode}
+FUNCTION {format.key}
+{ empty$
+ { key field.or.null }
+ { "" }
+ if$
+}
+% \end{macrocode}
+%
+% \subsection{Titles}
+%
+% |select.language| checks if the field before was written out, and if so,
+% wraps |{\selectlanguage{language}\dots}| around it.
+%
+% \begin{macrocode}
+FUNCTION {select.language}
+{ duplicate$ empty$
+ 'pop$
+ { language empty$
+ 'skip$
+ { "{\selectlanguage{" language * "}" * swap$ * "}" * }
+ if$
+ }
+ if$
+}
+% \end{macrocode}
+%
+% |format.title| returns the title and language fields, where the title
+% should be in the upright shape.
+%
+% \begin{macrocode}
+FUNCTION {format.title}
+{ title
+ duplicate$ empty$ 'skip$
+ { "t" change.case$ }
+ if$
+ "title" bibinfo.check
+ duplicate$ empty$
+ 'skip$
+ { select.language }
+ if$
+}
+% \end{macrocode}
+%
+% |format.btitle| returns the title and language fields, where the title
+% should be in the italic shape.
+%
+% \begin{macrocode}
+FUNCTION {format.btitle}
+{ title
+ duplicate$ empty$ 'skip$
+ { "t" change.case$ }
+ if$
+ "title" bibinfo.check
+ duplicate$ empty$ 'skip$
+ { emphasize
+ select.language
+ }
+ if$
+}
+% \end{macrocode}
+%
+% |format.titleaddon| returns the titleaddon field.
+%
+% \begin{macrocode}
+FUNCTION {format.titleaddon}
+{ titleaddon
+ duplicate$ empty$ 'skip$
+%<bst1> { "titleaddon" bibinfo.check }
+%<bst2> { "[" swap$ "titleaddon" bibinfo.check * "]" * }
+ if$
+}
+% \end{macrocode}
+%
+% |format.version| returns the version field.
+%
+% \begin{macrocode}
+FUNCTION {format.version}
+{ version
+ duplicate$ empty$ 'skip$
+ { "(v." swap$ *
+ "version" bibinfo.check
+ ")" *
+ }
+ if$
+}
+% \end{macrocode}
+%
+% |get.title.addenda| is a convenience for writing out the elements that
+% normally follow the title in |mid.clause| state.
+%
+% \begin{macrocode}
+FUNCTION {get.title.addenda}
+{ continue.clause
+ format.version output
+ continue.clause
+ format.titleaddon output
+ continue.clause
+%<*bst2>
+ library empty$
+ type$ "image" =
+ or
+ is.online
+ and
+ journal empty$
+ and
+ { bbl.online output }
+ 'skip$
+ if$
+ continue.clause
+%</bst2>
+ format.translators output
+}
+% \end{macrocode}
+%
+% |word.in| provides the `In:' before book titles.
+%
+% \begin{macrocode}
+FUNCTION {word.in}
+{ bbl.in capitalize
+ ":" *
+ " " * }
+% \end{macrocode}
+%
+% |format.booktitle| returns the booktitle field in italics.
+%
+% \begin{macrocode}
+FUNCTION {format.booktitle}
+{ booktitle
+ duplicate$ empty$ 'skip$
+ { "t" change.case$ }
+ if$
+ "booktitle" bibinfo.check
+ emphasize
+}
+% \end{macrocode}
+%
+% |format.in.ed.booktitle| returns the booktitle, prepended by `In: editors,
+% eds.'
+%
+% \begin{macrocode}
+FUNCTION {format.in.ed.booktitle}
+{ format.booktitle duplicate$ empty$ 'skip$
+ { editor "editor" format.names.ed duplicate$ empty$ 'pop$
+ { "," *
+ " " *
+ get.bbl.editor add.period$
+ " " *
+ * swap$
+ *
+ word.in swap$ *
+ }
+ if$
+ }
+ if$
+}
+% \end{macrocode}
+%
+% |legal.journal.shape| emphasizes the preceding string if it matches `OJ' but
+% otherwise does nothing.
+%
+% \begin{macrocode}
+FUNCTION {legal.journal.shape}
+{ duplicate$ "OJ" =
+ 'emphasize
+ 'skip$
+ if$
+}
+% \end{macrocode}
+%
+% \subsection{Dates}
+%
+% |nodate.check| looks at the most recent token. If it is empty, replaces it
+% with `n.d.' unless either |sortyear| or the |nonodate| option is present.
+%
+% \begin{macrocode}
+FUNCTION {nodate.check}
+{
+%<bst1> skip$
+%<*bst2>
+duplicate$ empty$
+ sortyear empty$
+ and
+ { options field.or.null "nonodate" =
+ 'skip$
+ { pop$ bbl.nodate }
+ if$
+ }
+ 'skip$
+ if$
+%</bst2>
+}
+% \end{macrocode}
+%
+% |format.date| returns the year and any disambiguation label.
+%
+% \begin{macrocode}
+FUNCTION {format.date}
+{ year "year" bibinfo.check nodate.check
+ extra.label *
+}
+% \end{macrocode}
+%
+% |format.jur.date| wraps the year and any disambiguation label in parentheses
+% if a volume number is provided or if |year-essential=false| has been given
+% as the |options|. If there is no volume number, or if |year-essential=true|
+% has been given as the |options|, then the year will be wrapped in square
+% brackets or, if |scottish-style| has been given as the |options| or |sc| as
+% the |keywords|, left bare. But if the journal is `OJ' or `ECR', the date is
+% wrapped in brackets regardless. Not complicated at all, really.
+%
+% \begin{macrocode}
+FUNCTION {format.date.brackets}
+{ format.date
+ "[" swap$ * "]" *
+}
+FUNCTION {format.date.parens}
+{ format.date
+ "(" swap$ * ")" *
+}
+FUNCTION {format.jur.date.essential}
+{ options field.or.null "scottish-style" =
+ keywords field.or.null "sc" =
+ or
+ 'format.date
+ 'format.date.brackets
+ if$
+}
+FUNCTION {format.jur.date}
+{ journal field.or.null 's :=
+ s "OJ" =
+ s "ECR" =
+ or
+ 'format.date.brackets
+ { options field.or.null "year-essential=false" =
+ 'format.date.parens
+ { volume empty$
+ 'format.jur.date.essential
+ { options field.or.null "year-essential=true" =
+ 'format.jur.date.essential
+ 'format.date.parens
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+}
+% \end{macrocode}
+%
+% |format.eu.date| wraps the year and any disambiguation label in square
+% brackets if (and only if) the journal title is `OJ' or `ECR'.
+%
+% \begin{macrocode}
+FUNCTION {format.eu.date}
+{ journal field.or.null 's :=
+ s "OJ" =
+ s "ECR" =
+ or
+ 'format.date.brackets
+ 'format.date
+ if$
+}
+% \end{macrocode}
+%
+% \subsection{Series, volumes, editions}
+%
+% |format.bvolume| returns the volume and series information (in italics),
+% with a comma between. A warning is given if |number| is also given.
+%
+% \begin{macrocode}
+FUNCTION {format.bvolume}
+{ volume empty$
+ { "" }
+ { bbl.volume volume tie.or.space.prefix
+ "volume" bibinfo.check * *
+ series "series" bibinfo.check
+ duplicate$ empty$ 'pop$
+ { emphasize ", " * swap$ * }
+ if$
+ "volume and number" number either.or.check
+ }
+ if$
+}
+% \end{macrocode}
+%
+% |format.number.series| returns an empty string if a volume has been specified.
+% Otherwise, it returns the series and the number separated by a space.
+%
+% \begin{macrocode}
+FUNCTION {format.number.series}
+{ volume empty$
+ { number empty$
+ { series field.or.null }
+ { series empty$
+ { number "number" bibinfo.check }
+ { series "series" bibinfo.check
+ number tie.or.space.prefix "number" bibinfo.check * *
+ }
+ if$
+ }
+ if$
+ }
+ { "" }
+ if$
+}
+% \end{macrocode}
+%
+% |is.num| converts a string to an integer and ensures it is in the range 0--9.
+%
+% \begin{macrocode}
+FUNCTION {is.num}
+{ chr.to.int$
+ duplicate$ "0" chr.to.int$ < not
+ swap$ "9" chr.to.int$ > not and
+}
+% \end{macrocode}
+%
+% |extract.num| takes a string. If it begins with an integer, it returns just
+% that integer. Otherwise it returns the whole string.
+%
+% \begin{macrocode}
+FUNCTION {extract.num}
+{ duplicate$ 't :=
+ "" 's :=
+ { t empty$ not }
+ { t #1 #1 substring$
+ t #2 global.max$ substring$ 't :=
+ duplicate$ is.num
+ { s swap$ * 's := }
+ { pop$ "" 't := }
+ if$
+ }
+ while$
+ s empty$
+ 'skip$
+ { pop$ s }
+ if$
+}
+% \end{macrocode}
+%
+% |convert.edition| should operate on the edition field. If the value begins
+% with a number (or is an English ordinal word from `first' to `fifth'), then it
+% returns the bibliography string version of the ordinal number (1st, 2nd,
+% 3rd\dots). Otherwise, returns the edition field verbatim.
+%
+% \begin{macrocode}
+FUNCTION {convert.edition}
+{ extract.num "l" change.case$ 's :=
+ s "first" = s "1" = or
+ { bbl.first 't := }
+ { s "second" = s "2" = or
+ { bbl.second 't := }
+ { s "third" = s "3" = or
+ { bbl.third 't := }
+ { s "fourth" = s "4" = or
+ { bbl.fourth 't := }
+ { s "fifth" = s "5" = or
+ { bbl.fifth 't := }
+ { s #1 #1 substring$ is.num
+ { s eng.ord 't := }
+ { edition 't := }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+ t
+}
+% \end{macrocode}
+%
+% |format.edition| returns the converted edition field and `ed.'
+%
+% \begin{macrocode}
+FUNCTION {format.edition}
+{ edition duplicate$ empty$ 'skip$
+ { convert.edition
+ output.state mid.sentence =
+ { "l" }
+ { "t" }
+ if$ change.case$
+ "edition" bibinfo.check
+ " " * bbl.edition *
+ }
+ if$
+}
+% \end{macrocode}
+%
+% If the type is provided, |format.thesis.type| deletes the preceding string
+% (the default value) and writes the type field with an initial capital.
+% Otherwise it does nothing.
+%
+% \begin{macrocode}
+FUNCTION {format.thesis.type}
+{ type duplicate$ empty$
+ 'pop$
+ { swap$ pop$
+ "t" change.case$ "type" bibinfo.check
+ }
+ if$
+}
+% \end{macrocode}
+%
+% If the type is provided, |format.booklet.type| simply writes the type field
+% with an initial capital. Otherwise it returns an empty string.
+%
+% \begin{macrocode}
+FUNCTION {format.booklet.type}
+{ type duplicate$ empty$
+ { pop$ "" }
+ { "type" bibinfo.check}
+ if$
+}
+% \end{macrocode}
+%
+% |format.tr.number| returns the series, type and number fields as one of
+% `(number)', `(type number)', `(series, number)', or `(series, type number)'.
+% If a series is given, a |continue.clause| is inserted to remove the preceeding
+% comma.
+%
+% If the series begins `HL\textvisiblespace', it is assumed to be a House of
+% Lords paper, thus the number acquires additional parentheses. If it equals
+% `C', `Cd', `Cmd', `Cmnd' or `Cm', it is followed by a dot rather than a comma
+% (implemented as |add.cmd.number|). To help with this, |format.legr.number|
+% consumes one token (the number) and returns the series and number as one
+% token.
+%
+% \begin{macrocode}
+FUNCTION {add.cmd.number}
+{ ". " swap$ "number" bibinfo.check *
+}
+FUNCTION {format.legr.number}
+{ series field.or.null 's :=
+ s "C" =
+ 'add.cmd.number
+ { s "Cd" =
+ 'add.cmd.number
+ { s "Cmd" =
+ 'add.cmd.number
+ { s "Cmnd" =
+ 'add.cmd.number
+ { s "Cm" =
+ 'add.cmd.number
+ { s #1 #3 substring$ 't :=
+ t "HL " =
+ { ", (" swap$
+ "number" bibinfo.check *
+ ")" *
+ }
+ { ", " swap$
+ "number" bibinfo.check *
+ }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+}
+FUNCTION {format.tr.number}
+{ series duplicate$ empty$
+ { pop$
+ type duplicate$ empty$
+ { pop$
+ number duplicate$ empty$
+ { pop$ ""
+ }
+ { "(" swap$
+ "number" bibinfo.check
+ * ")" *
+ }
+ if$
+ }
+ { "(" swap$
+ "t" change.case$ "type" bibinfo.check
+ *
+ number duplicate$ empty$
+ 'pop$
+ { tie.or.space.prefix
+ "number" bibinfo.check
+ * *
+ }
+ if$
+ ")" *
+ }
+ if$
+ }
+ { "(" swap$ *
+ type duplicate$ empty$
+ { pop$
+ number duplicate$ empty$
+ 'pop$
+ { format.legr.number * }
+ if$
+ }
+ { "t" change.case$ "type" bibinfo.check
+ *
+ number duplicate$ empty$
+ 'pop$
+ { tie.or.space.prefix
+ "number" bibinfo.check
+ * *
+ }
+ if$
+ }
+ if$
+ ")" *
+ continue.clause
+ }
+ if$
+}
+% \end{macrocode}
+%
+% |format.manual.number| returns the series, type and number fields as one of
+% `(number)', `(type number)', `(series number)', or `(series number, type)'.
+%
+% \begin{macrocode}
+FUNCTION {format.manual.number}
+{ series duplicate$ empty$
+ { pop$
+ type duplicate$ empty$
+ { pop$
+ number duplicate$ empty$
+ { pop$ ""
+ }
+ { "number" bibinfo.check
+ }
+ if$
+ }
+ { "t" change.case$ "type" bibinfo.check
+ number duplicate$ empty$
+ 'pop$
+ { tie.or.space.prefix
+ "number" bibinfo.check
+ * *
+ }
+ if$
+ }
+ if$
+ }
+ { number duplicate$ empty$
+ 'pop$
+ { tie.or.space.prefix
+ "number" bibinfo.check
+ * *
+ }
+ if$
+ type duplicate$ empty$
+ 'pop$
+ { ", " swap$ *
+ "t" change.case$ "type" bibinfo.check
+ *
+ }
+ if$
+ }
+ if$
+}
+% \end{macrocode}
+%
+% |format.chapter| prints out the chapter field in the form `c.1', for use with
+% UK primary legislation.
+%
+% \begin{macrocode}
+FUNCTION {format.chapter}
+{ chapter duplicate$ empty$
+ { pop$ "" }
+ { "chapter" bibinfo.check
+ "c." swap$ *
+ }
+ if$
+}
+% \end{macrocode}
+%
+% |format.series.number.chapter| prints out the series and chapter/number fields
+% in the form `(series, c.1)' or `(series, number)', for use with UK legislation.
+%
+% \begin{macrocode}
+FUNCTION {format.series.number.chapter}
+{ series duplicate$ empty$
+ { pop$ "(" }
+ { "series" bibinfo.check
+ "(" swap$ *
+ }
+ if$
+ type duplicate$ empty$
+ { pop$
+ number duplicate$ empty$
+ 'pop$
+ { "number" bibinfo.check
+ swap$ duplicate$ "(" =
+ { swap$ * }
+ { ", " * swap$ * }
+ if$
+ }
+ if$
+ chapter duplicate$ empty$
+ 'pop$
+ { "chapter" bibinfo.check
+ swap$ duplicate$ "(" =
+ { swap$ * }
+ { ", c." * swap$ * }
+ if$
+ }
+ if$
+ }
+ { "type" bibinfo.check
+ swap$ duplicate$ "(" =
+ { swap$ * }
+ { ", " * swap$ * }
+ if$
+ number duplicate$ empty$
+ { pop$
+ chapter duplicate$ empty$
+ 'pop$
+ { "chapter" bibinfo.check
+ " c." swap$ * *
+ }
+ if$
+ }
+ { "number" bibinfo.check
+ " " swap$ * *
+ chapter duplicate$ empty$
+ 'pop$
+ { "chapter" bibinfo.check
+ ", c." swap$ * *
+ }
+ if$
+ }
+ if$
+ }
+ if$
+ ")" *
+ duplicate$ "()" =
+ { pop$ "" }
+ 'skip$
+ if$
+}
+% \end{macrocode}
+%
+% |format.case.number| returns the number field, suppressing punctuation,
+% or inserts a period. In the case of EU Commission Decisions, the format is
+% `(userb) Commission Decision number`
+%
+% \begin{macrocode}
+FUNCTION {format.case.number}
+{ casenumber duplicate$ empty$
+ { pop$
+ number duplicate$ empty$
+ { pop$ "" }
+ { institution field.or.null "Commission" =
+ userb empty$ not
+ and
+ { userb "userb" bibinfo.check
+ "(" swap$ * ") " * bbl.commission * " " *
+ swap$ "number" bibinfo.check *
+ }
+ { "number" bibinfo.check
+ "(" swap$ * ")" *
+ }
+ if$
+ }
+ if$
+ }
+ { "casenumber" bibinfo.check
+ "(" swap$ * ")" *
+ institution field.or.null "Commission" =
+ number empty$ not
+ and
+ { " " * bbl.commission * " " *
+ number "number" bibinfo.check *
+ }
+ 'skip$
+ if$
+ }
+ if$
+}
+% \end{macrocode}
+%
+% |eu.case.check| checks if the case is in OJ or has a number, in which case
+% punctuation is suppressed.
+%
+% \begin{macrocode}
+FUNCTION {eu.case.check}
+{ journal field.or.null "OJ" =
+ number empty$ not
+ or
+ casenumber empty$ not
+ or
+ 'continue.clause
+ 'new.block
+ if$
+}
+% \end{macrocode}
+%
+% \subsection{Notes}
+%
+% |format.note| returns the note field, but changes the case of the first
+% letter according to the output state (unless protected by braces).
+%
+% \begin{macrocode}
+FUNCTION {format.note}
+{ note empty$
+ { "" }
+ { note #1 #1 substring$
+ duplicate$ "{" =
+ 'skip$
+ { output.state mid.sentence =
+ output.state mid.clause =
+ or
+ { "l" }
+ { "u" }
+ if$
+ change.case$
+ }
+ if$
+ note #2 global.max$ substring$ * "note" bibinfo.check
+ }
+ if$
+}
+% \end{macrocode}
+%
+% \subsection{Addresses and publishers}
+%
+% |format.org.or.pub| intercepts a publisher (or whatever) being written out as
+% bibinfo. If the write will succeed and an address has been specified, the
+% address is written out first, then a colon and space; then the original write
+% is allowed to proceed.
+%
+% \begin{macrocode}
+FUNCTION {format.org.or.pub}
+{ 't :=
+ ""
+ address empty$ t empty$ and
+ 'skip$
+ { address "address" bibinfo.check *
+ t empty$
+ 'skip$
+ { address empty$
+ 'skip$
+ { ": " * }
+ if$
+ t *
+ }
+ if$
+ }
+ if$
+}
+% \end{macrocode}
+%
+% The next three functions write out the address plus the publisher,
+% organization and institution respectively.
+%
+% \begin{macrocode}
+FUNCTION {format.publisher.address}
+{ publisher "publisher" bibinfo.warn format.org.or.pub
+}
+FUNCTION {format.organization.address}
+{ publisher empty$
+ { organization "organization" bibinfo.check format.org.or.pub }
+ { publisher "publisher" bibinfo.warn format.org.or.pub
+ organization duplicate$ empty$
+ 'pop$
+ { "organization" bibinfo.check ". " * swap$ * }
+ if$
+ }
+ if$
+}
+FUNCTION {format.institution.address}
+{ publisher empty$
+ { institution "institution" bibinfo.check format.org.or.pub }
+ { publisher "publisher" bibinfo.warn format.org.or.pub
+ institution duplicate$ empty$
+ 'pop$
+ { "institution" bibinfo.check ". " * swap$ * }
+ if$
+ }
+ if$
+}
+% \end{macrocode}
+%
+% We add a macro for printing the library (repository) holding an eprint.
+%
+% \begin{macrocode}
+FUNCTION {format.library}
+{ library "library" bibinfo.check
+ emphasize
+%<*bst2>
+ duplicate$ empty$ not
+ is.online
+ and
+ journal empty$
+ and
+ { " " * bbl.online * }
+ 'skip$
+ if$
+%</bst2>
+}
+% \end{macrocode}
+%
+% The library field is also used for where a physical image is kept.
+% As we have only one address field, it will attach to whichever is
+% present out of organization, publisher and library. In case there
+% is more than one, it will attach to |publisher| in preference to
+% |library| and |library| in preference to |organization|.
+%
+% \begin{macrocode}
+FUNCTION {format.img.library}
+{ library duplicate$ empty$
+ { pop$ "" }
+ { "library" bibinfo.check
+ "At: " swap$ *
+ }
+ if$
+}
+FUNCTION {format.img.library.address}
+{ address empty$ library empty$ and institution empty$ and
+ { "" }
+ { "At: "
+ address "address" bibinfo.check *
+ library duplicate$ empty$
+ { institution duplicate$ empty$
+ { pop$ "" }
+ { address empty$
+ 'skip$
+ { ". " swap$ }
+ if$
+ "institution" bibinfo.check * *
+ }
+ if$
+ }
+ { address empty$
+ 'skip$
+ { ". " swap$ }
+ if$
+ "library" bibinfo.check * *
+ }
+ if$
+ }
+ if$
+}
+FUNCTION {format.pub.org.lib.address}
+{ publisher duplicate$ empty$
+ { pop$
+ organization duplicate$ empty$
+ { pop$
+ format.img.library.address }
+ { "organization" bibinfo.check
+ library empty$
+ { format.org.or.pub }
+ { ". " *
+ format.img.library.address *
+ }
+ if$
+ }
+ if$
+ }
+ { "publisher" bibinfo.warn format.org.or.pub
+ library empty$
+ 'skip$
+ { ". " *
+ format.img.library *
+ }
+ if$
+ }
+ if$
+}
+
+% \end{macrocode}
+%
+% \subsection{Pinpointing}
+%
+% |multi.page.check| should operate on the pages field. If the value is a range,
+% that is, contains `-', `,' or `+', returns 1, otherwise returns 0.
+%
+% \begin{macrocode}
+INTEGERS { multiresult }
+FUNCTION {multi.page.check}
+{ 't :=
+ #0 'multiresult :=
+ { multiresult not
+ t empty$ not
+ and
+ }
+ { t #1 #1 substring$
+ duplicate$ "-" =
+ swap$ duplicate$ "," =
+ swap$ "+" =
+ or or
+ { #1 'multiresult := }
+ { t #2 global.max$ substring$ 't := }
+ if$
+ }
+ while$
+ multiresult
+}
+% \end{macrocode}
+%
+% |n.dashify| converts hyphens in page ranges into en dashes.
+%
+% \begin{macrocode}
+FUNCTION {n.dashify}
+{ 't :=
+ ""
+ { t empty$ not }
+ { t #1 #1 substring$ "-" =
+ { t #1 #2 substring$ "--" = not
+ { "--" *
+ t #2 global.max$ substring$ 't :=
+ }
+ { { t #1 #1 substring$ "-" = }
+ { "-" *
+ t #2 global.max$ substring$ 't :=
+ }
+ while$
+ }
+ if$
+ }
+ { t #1 #1 substring$ *
+ t #2 global.max$ substring$ 't :=
+ }
+ if$
+ }
+ while$
+}
+% \end{macrocode}
+%
+% |format.pages| returns the pages fields, prefixed by `p.' or `pp.' as
+% appropriate.
+%
+% \begin{macrocode}
+FUNCTION {format.pages}
+{ pages duplicate$ empty$ 'skip$
+ { duplicate$ multi.page.check
+ { bbl.pages swap$
+ n.dashify
+ }
+ { bbl.page swap$
+ }
+ if$
+ "pages" bibinfo.check
+ *
+ }
+ if$
+}
+% \end{macrocode}
+%
+% |format.journal.pages| does similar, but it looks at the preceding string and,
+% if both are non-empty, inserts a comma between it and the pages string.
+%
+% \begin{macrocode}
+FUNCTION {format.journal.pages}
+{ pages duplicate$ empty$ 'pop$
+ { swap$ duplicate$ empty$
+ { pop$ pop$ format.pages }
+ { ", " *
+ swap$
+ n.dashify
+ pages multi.page.check
+ 'bbl.pages
+ 'bbl.page
+ if$
+ swap$
+ "pages" bibinfo.check
+ * *
+ }
+ if$
+ }
+ if$
+}
+% \end{macrocode}
+%
+% |format.journal.eid| returns the EID, but it looks at the preceding string
+% and, if both are non-empty, inserts a comma between it and the EID string.
+% The EID is a code used by some online-only journals to identify an article
+% within a volume or issue instead of a page range (since the page numbering
+% resets for each article, not each volume\slash issue).
+%
+% \begin{macrocode}
+FUNCTION {format.journal.eid}
+{ eid "eid" bibinfo.check
+ duplicate$ empty$ 'pop$
+ { swap$ duplicate$ empty$ 'skip$
+ { ", " *
+ }
+ if$
+ swap$ *
+ }
+ if$
+}
+% \end{macrocode}
+%
+% |format.vol.num.pages| returns the journal pinpointing in the form
+% `volume(number), eid\slash pages'. It writes a warning to the log if |number|
+% is given instead of |volume|: if a journal does not organize itself into
+% volumes, treat every issue as its own volume! Since the Harvard (Bath) style
+% places publication state information in the volume position, the |pubstate|
+% field from \textsf{biblatex} is emulated here.
+%
+% \begin{macrocode}
+FUNCTION {format.vol.num.pages}
+{ pubstate field.or.null
+ duplicate$ "inpress" =
+ { pop$ bbl.inpress }
+ { duplicate$ "submitted" =
+ { pop$ bbl.submitted }
+ { duplicate$ "inpreparation" =
+ { pop$ bbl.inpreparation }
+ { pop$ "" }
+ if$
+ }
+ if$
+ }
+ if$
+ duplicate$ empty$
+ { pop$
+ volume field.or.null
+ duplicate$ empty$ 'skip$
+ { "volume" bibinfo.check
+ }
+ if$
+ number "number" bibinfo.check duplicate$ empty$ 'skip$
+ { swap$ duplicate$ empty$
+ { "there's a number but no volume in " cite$ * warning$ }
+ 'skip$
+ if$
+ swap$
+ "(" swap$ * ")" *
+ }
+ if$ *
+ eid empty$
+ { format.journal.pages }
+ { format.journal.eid }
+ if$
+ }
+ 'skip$
+ if$
+}
+% \end{macrocode}
+%
+% |format.chapter.pages| returns pinpointing information for books, in the
+% form `chap.\@ chapter, p.pages'.
+%
+% \begin{macrocode}
+FUNCTION {format.chapter.pages}
+{ chapter empty$
+ 'format.pages
+ { type empty$
+ { bbl.chapter }
+ { type "l" change.case$
+ "type" bibinfo.check
+ }
+ if$
+ chapter tie.or.space.prefix
+ "chapter" bibinfo.check
+ * *
+ pages empty$
+ 'skip$
+ { ", " * format.pages * }
+ if$
+ }
+ if$
+}
+% \end{macrocode}
+%
+% |format.journal.series.vol.pages| returns the journal title and pinpointing
+% in the form `volume journal pages', `journal volume-pages' or `journal
+% series\,volume/pages', depending on the journal.
+%
+% \begin{macrocode}
+FUNCTION {format.journal.series.vol.pages}
+{ journal field.or.null
+ duplicate$ "OJ" =
+ { "journal" bibinfo.check
+ emphasize
+ series empty$
+ volume empty$
+ and
+ pages empty$
+ and
+ 'skip$
+ { " " * }
+ if$
+ series "series" bibinfo.check
+ volume "volume" bibinfo.check *
+ duplicate$ empty$
+ 'skip$
+ { pages field.or.null duplicate$ empty$
+ 'skip$
+ { "/" swap$ *
+ }
+ if$ *
+ }
+ if$ *
+ }
+ { duplicate$ "ECR" =
+ { "journal" bibinfo.check
+ volume "volume" bibinfo.check
+ duplicate$ empty$
+ 'skip$
+ { " " swap$ * "--" * * }
+ if$
+ }
+ { "journal" bibinfo.check
+%<*bst2>
+ is.online
+ { " " * bbl.online * }
+ 'skip$
+ if$
+%</bst2>
+ volume "volume" bibinfo.check
+ duplicate$ empty$
+ 'pop$
+ { " " * swap$ * }
+ if$
+ pages empty$
+ eid empty$
+ and
+ 'skip$
+ { " " * }
+ if$
+ }
+ if$
+ }
+ if$
+ eid empty$
+ { pages "pages" bibinfo.check * }
+ { eid "eid" bibinfo.check * }
+ if$
+}
+% \end{macrocode}
+%
+% \subsection{URLs}
+%
+% |format.eprint| constructs a string |\eprint[archive]{eprint}|.
+%
+% \begin{macrocode}
+FUNCTION {format.eprint}
+{ eprint duplicate$ empty$
+ 'skip$
+ { "\eprint"
+ archive empty$
+ 'skip$
+ { "[" * archive * "]" * }
+ if$
+ "{" * swap$ * "}" *
+ }
+ if$
+}
+% \end{macrocode}
+%
+% |format.url| constructs a string |Available from: \url{url} [Accessed urldate]|.
+%
+% \begin{macrocode}
+FUNCTION {format.url}
+{ doi empty$
+ { url }
+ { "https://doi.org/" doi * }
+ if$
+ duplicate$ empty$
+ { pop$ "" }
+ { "\urlprefix\url{" swap$ * "}" * }
+ if$
+ urlyear empty$
+ { urldate empty$
+ 'skip$
+ { " [\urldateprefix{}" * urldate * "]" * }
+ if$
+ }
+ { " [\urldateprefix{}" * urlyear * "]" * }
+ if$
+}
+% \end{macrocode}
+%
+% \subsection{Cross referencing between entries}
+%
+% The following functions are used for entries that look like `Author, (Year).
+% Title. In: Author (Year).' In practice, they should never be used with Harvard
+% (Bath).
+%
+% \begin{macrocode}
+FUNCTION {format.article.crossref}
+{ word.in
+ " \cite{" * crossref * "}" *
+}
+FUNCTION {format.incoll.inproc.crossref}
+{ word.in
+ " \cite{" * crossref * "}" *
+}
+% \end{macrocode}
+%
+% |format.book.crossref| is a bit different as it is intended for cases where
+% the given book is volume X of a larger work: `Author, (Year). Title. Vol.\@
+% volume of Author (Year).' In the absence of a volume, writes a warning to the
+% log and behaves like the above.
+%
+% \begin{macrocode}
+FUNCTION {format.book.crossref}
+{ volume duplicate$ empty$
+ { "empty volume in " cite$ * "'s crossref of " * crossref * warning$
+ pop$ word.in
+ }
+ { bbl.volume
+ capitalize
+ swap$ tie.or.space.prefix "volume" bibinfo.check * * bbl.of space.word *
+ }
+ if$
+ " \cite{" * crossref * "}" *
+}
+
+% \end{macrocode}
+%
+% \subsection{Formatting drivers for specific entry types}
+%
+% These functions are called when an entry of the given type is being
+% formatted.
+%
+% \subsubsection{Article}
+%
+% \begin{macrocode}
+FUNCTION {article}
+{ output.bibitem
+ format.authors "author" output.check
+ author format.key output
+ format.date "year" output.check
+ date.block
+ format.title "title" output.check
+ get.title.addenda
+ new.block
+ crossref missing$
+ { journal "t" change.case$
+ "journal" bibinfo.check
+ emphasize
+ "journal" output.check
+%<*bst2>
+ is.online
+ { continue.clause
+ bbl.online output
+ }
+ 'skip$
+ if$
+%</bst2>
+ format.vol.num.pages output
+ }
+ { format.article.crossref output.nonnull
+ format.pages output
+ }
+ if$
+ new.block
+ format.note output
+ new.block
+ format.eprint output
+ format.url output
+ fin.entry
+}
+% \end{macrocode}
+%
+% \subsubsection{Book}
+%
+% \begin{macrocode}
+FUNCTION {book}
+{ output.bibitem
+ author empty$
+ { editor empty$
+ { format.btitle "title" output.check
+ format.date "year" output.check
+ year empty$ 'skip$ { date.block } if$
+ get.title.addenda
+ }
+ { format.editors "author and editor" output.check
+ editor format.key output
+ format.date "year" output.check
+ date.block
+ format.btitle "title" output.check
+ get.title.addenda
+ }
+ if$
+ }
+ { format.authors output.nonnull
+ crossref missing$
+ { "author and editor" editor either.or.check }
+ 'skip$
+ if$
+ format.date "year" output.check
+ date.block
+ format.btitle "title" output.check
+ get.title.addenda
+ }
+ if$
+ format.bvolume output
+ format.number.series output
+ new.block
+ format.edition output
+ crossref missing$
+ { new.sentence
+ format.publisher.address output
+ }
+ { new.block
+ format.book.crossref output.nonnull
+ }
+ if$
+ new.block
+ format.note output
+ new.block
+ format.eprint output
+ format.url output
+ fin.entry
+}
+% \end{macrocode}
+%
+% \subsubsection{Unpublished or self-published monograph}
+%
+% \begin{macrocode}
+FUNCTION {booklet}
+{ output.bibitem
+ author empty$
+ { format.btitle "title" output.check
+ format.date "year" output.check
+ year empty$ 'skip$ { date.block } if$
+ get.title.addenda
+ }
+ { format.authors output
+ author format.key output
+ format.date "year" output.check
+ date.block
+ format.btitle "title" output.check
+ get.title.addenda
+ }
+ if$
+ new.block
+ format.booklet.type output
+ new.block
+ howpublished "howpublished" bibinfo.check output
+ new.block
+ format.note output
+ publisher empty$ 'skip$
+ { new.block}
+ if$
+ format.publisher.address output
+ new.block
+ format.eprint output
+ format.url output
+ fin.entry
+}
+% \end{macrocode}
+%
+% \subsubsection{Work in book}
+%
+% \begin{macrocode}
+FUNCTION {inbook}
+{ output.bibitem
+ author empty$
+ { format.editors "author and editor" output.check
+ editor format.key output
+ }
+ { format.authors output.nonnull
+ crossref missing$
+ { "author and editor" editor either.or.check }
+ 'skip$
+ if$
+ }
+ if$
+ format.date "year" output.check
+ date.block
+ format.btitle "title" output.check
+ get.title.addenda
+ crossref missing$
+ { format.publisher.address output
+ format.bvolume output
+ format.chapter.pages "chapter and pages" output.check
+ new.block
+ format.number.series output
+ new.sentence
+ }
+ { format.chapter.pages "chapter and pages" output.check
+ new.block
+ format.book.crossref output.nonnull
+ }
+ if$
+ format.edition output
+ new.block
+ format.note output
+ new.block
+ format.eprint output
+ format.url output
+ fin.entry
+}
+% \end{macrocode}
+%
+% \subsubsection{Work in collection}
+%
+% \begin{macrocode}
+FUNCTION {incollection}
+{ output.bibitem
+ format.authors "author" output.check
+ author format.key output
+ format.date "year" output.check
+ date.block
+ format.title "title" output.check
+ get.title.addenda
+ new.block
+ crossref missing$
+ { format.in.ed.booktitle "booktitle" output.check
+ new.block
+ format.publisher.address output
+ format.bvolume output
+ format.number.series output
+ format.chapter.pages output
+ new.sentence
+ format.edition output
+ }
+ { format.incoll.inproc.crossref output.nonnull
+ format.chapter.pages output
+ }
+ if$
+ new.block
+ format.note output
+ new.block
+ format.eprint output
+ format.url output
+ fin.entry
+}
+% \end{macrocode}
+%
+% \subsubsection{Conference paper}
+%
+% \begin{macrocode}
+FUNCTION {inproceedings}
+{ output.bibitem
+ format.authors "author" output.check
+ author format.key output
+ format.date "year" output.check
+ date.block
+ format.title "title" output.check
+ get.title.addenda
+ new.block
+ crossref missing$
+ { format.in.ed.booktitle "booktitle" output.check
+ eventyear output
+ venue output
+ new.sentence
+ publisher empty$
+ { format.organization.address output }
+ { organization "organization" bibinfo.check output
+ format.publisher.address output
+ }
+ if$
+ format.bvolume output
+ format.number.series output
+ format.pages output
+ }
+ { format.incoll.inproc.crossref output.nonnull
+ format.pages output
+ }
+ if$
+ new.block
+ format.note output
+ new.block
+ format.eprint output
+ format.url output
+ fin.entry
+}
+FUNCTION {conference} { inproceedings }
+% \end{macrocode}
+%
+% \subsubsection{Legal case studies}
+%
+% \begin{macrocode}
+FUNCTION {jurisdiction}
+{ output.bibitem
+ author empty$
+ { format.btitle "title" output.check
+ continue.clause
+ format.case.number output
+ number empty$
+ casenumber empty$
+ and
+ 'new.sentence
+ 'continue.clause
+ if$
+ format.jur.date "year" output.check
+ year empty$ 'skip$ { eu.case.check } if$
+ get.title.addenda
+ }
+ { format.authors output
+ author format.key output
+ format.jur.date "year" output.check
+ date.block
+ continue.clause
+ format.btitle "title" output.check
+ get.title.addenda
+ }
+ if$
+ eu.case.check
+ format.note output
+ note empty$
+ 'eu.case.check
+ 'new.block
+ if$
+ crossref missing$
+ { continue.clause
+ format.journal.series.vol.pages output
+ }
+ { format.article.crossref output.nonnull
+ format.pages output
+ }
+ if$
+ new.block
+ format.eprint output
+ format.url output
+ fin.entry
+}
+% \end{macrocode}
+%
+% \subsubsection{Legislation}
+%
+% \begin{macrocode}
+FUNCTION {uklegislation}
+{ output.bibitem
+ author empty$
+ { format.btitle "title" output.check
+ continue.clause
+ format.date emphasize "year" output.check
+ get.title.addenda
+ }
+ { format.authors output
+ author format.key output
+ format.date "year" output.check
+ date.block
+ continue.clause
+ format.btitle "title" output.check
+ get.title.addenda
+ }
+ if$
+ entrysubtype field.or.null "secondary" =
+ { number "number" bibinfo.check output }
+ { series empty$ type empty$ and
+ { number empty$
+ { format.chapter output }
+ { continue.clause
+ format.series.number.chapter output
+ }
+ if$
+ }
+ { chapter empty$
+ { new.block }
+ { continue.clause }
+ if$
+ format.series.number.chapter output
+ }
+ if$
+ }
+ if$
+ note empty$
+ 'skip$
+ { new.block
+ format.note output
+ new.block
+ }
+ if$
+ publisher empty$ 'skip$
+ { entrysubtype field.or.null "secondary" =
+ 'skip$
+ { new.block }
+ if$
+ format.publisher.address output
+ }
+ if$
+ new.block
+ format.eprint output
+ format.url output
+ fin.entry
+}
+FUNCTION {eulegislation}
+{ output.bibitem
+ author empty$
+ { format.title "title" output.check
+ continue.clause
+ format.eu.date "year" output.check
+ get.title.addenda
+ }
+ { format.authors output
+ author format.key output
+ format.eu.date "year" output.check
+ date.block
+ continue.clause
+ format.title "title" output.check
+ get.title.addenda
+ }
+ if$
+ eu.case.check
+ format.note output
+ note empty$
+ 'eu.case.check
+ 'new.block
+ if$
+ crossref missing$
+ { continue.clause
+ format.journal.series.vol.pages output
+ }
+ { format.article.crossref output.nonnull
+ format.pages output
+ }
+ if$
+ new.block
+ format.eprint output
+ format.url output
+ fin.entry
+}
+FUNCTION {legislation}
+{ journal empty$
+ 'uklegislation
+ 'eulegislation
+ if$
+}
+% \end{macrocode}
+%
+% \subsubsection{Manual}
+%
+% \begin{macrocode}
+FUNCTION {manual}
+{ output.bibitem
+ author empty$
+ { format.btitle "title" output.check
+ format.date "year" output.check
+ year empty$ 'skip$ { date.block } if$
+ get.title.addenda
+ }
+ { format.authors output
+ author format.key output
+ format.date "year" output.check
+ date.block
+ format.btitle "title" output.check
+ get.title.addenda
+ }
+ if$
+ format.edition output
+ new.block
+ format.manual.number output
+ new.block
+ format.library output
+ organization address new.block.checkb
+ format.organization.address output
+ new.block
+ format.note output
+ new.block
+ format.eprint output
+ format.url output
+ fin.entry
+}
+% \end{macrocode}
+%
+% \subsubsection{Image}
+%
+% \begin{macrocode}
+FUNCTION {image}
+{ output.bibitem
+ author empty$
+ { format.btitle "title" output.check
+ format.date "year" output.check
+ year empty$ 'skip$ { date.block } if$
+ get.title.addenda
+ }
+ { format.authors output
+ author format.key output
+ format.date "year" output.check
+ date.block
+ format.btitle "title" output.check
+ get.title.addenda
+ }
+ if$
+ format.edition output
+ new.block
+ format.manual.number output
+ new.block
+ format.pub.org.lib.address output
+ new.block
+ format.note output
+ new.block
+ format.eprint output
+ format.url output
+ fin.entry
+}
+% \end{macrocode}
+%
+% \subsubsection{Master's thesis}
+%
+% \begin{macrocode}
+FUNCTION {mastersthesis}
+{ output.bibitem
+ format.authors "author" output.check
+ author format.key output
+ format.date "year" output.check
+ date.block
+ format.btitle "title" output.check
+ get.title.addenda
+ new.block
+ bbl.mthesis format.thesis.type output.nonnull
+ new.block
+ school "school" bibinfo.warn output
+ address "address" bibinfo.check output
+ new.block
+ format.note output
+ new.block
+ format.eprint output
+ format.url output
+ fin.entry
+}
+% \end{macrocode}
+%
+% \subsubsection{Miscellaneous}
+%
+% \begin{macrocode}
+FUNCTION {misc}
+{ output.bibitem
+ author empty$
+ { format.title "title" output.check
+ format.date "year" output.check
+ year empty$ 'skip$ { date.block } if$
+ get.title.addenda
+ }
+ { format.authors output
+ author format.key output
+ format.date "year" output.check
+ date.block
+ format.title "title" output.check
+ get.title.addenda
+ }
+ if$
+ new.block
+ howpublished "howpublished" bibinfo.check output
+ new.block
+ format.note output
+ new.block
+ format.eprint output
+ format.url output
+ fin.entry
+}
+% \end{macrocode}
+%
+% \subsubsection{Doctoral thesis}
+%
+% \begin{macrocode}
+FUNCTION {phdthesis}
+{ output.bibitem
+ format.authors "author" output.check
+ author format.key output
+ format.date "year" output.check
+ date.block
+ format.btitle "title" output.check
+ get.title.addenda
+ new.block
+ bbl.phdthesis format.thesis.type output.nonnull
+ new.block
+ school "school" bibinfo.warn output
+ address "address" bibinfo.check output
+ new.block
+ format.note output
+ new.block
+ format.eprint output
+ format.url output
+ fin.entry
+}
+% \end{macrocode}
+%
+% \subsubsection{Conference proceedings}
+%
+% \begin{macrocode}
+FUNCTION {proceedings}
+{ output.bibitem
+ editor empty$
+ { format.btitle "title" output.check
+ format.date "year" output.check
+ year empty$ 'skip$ { date.block } if$
+ get.title.addenda
+ }
+ { format.editors output
+ editor format.key output
+ format.date "year" output.check
+ date.block
+ format.btitle "title" output.check
+ get.title.addenda
+ }
+ if$
+ format.bvolume output
+ format.number.series output
+ new.sentence
+ publisher empty$
+ { format.organization.address output }
+ { organization "organization" bibinfo.check output
+ format.publisher.address output
+ }
+ if$
+ new.block
+ format.note output
+ new.block
+ format.eprint output
+ format.url output
+ fin.entry
+}
+% \end{macrocode}
+%
+% \subsubsection{Report}
+%
+% \begin{macrocode}
+FUNCTION {techreport}
+{ output.bibitem
+ author empty$
+ { format.btitle "title" output.check
+ format.date "year" output.check
+ year empty$ 'skip$ { date.block } if$
+ get.title.addenda
+ }
+ { format.authors output
+ author format.key output
+ format.date "year" output.check
+ date.block
+ format.btitle "title" output.check
+ get.title.addenda
+ }
+ if$
+ new.block
+ format.tr.number output
+ new.block
+ publisher empty$
+ { format.institution.address output }
+ { institution "institution" bibinfo.check output
+ format.publisher.address output
+ }
+ if$
+ new.block
+ format.library output
+ new.block
+ format.note output
+ new.block
+ format.eprint output
+ format.url output
+ fin.entry
+}
+% \end{macrocode}
+%
+% \subsubsection{Unpublished works}
+%
+% \begin{macrocode}
+FUNCTION {unpublished}
+{ output.bibitem
+ author empty$
+ { booktitle empty$ 'format.btitle 'format.title if$ "title" output.check
+ format.date "year" output.check
+ year empty$ 'skip$ { date.block } if$
+ get.title.addenda
+ }
+ { format.authors output
+ author format.key output
+ format.date "year" output.check
+ date.block
+ booktitle empty$ 'format.btitle 'format.title if$ "title" output.check
+ get.title.addenda
+ }
+ if$
+ new.block
+ format.in.ed.booktitle output
+ new.block
+ howpublished "howpublished" bibinfo.check output
+ new.block
+ bbl.unpublished output
+ new.block
+ format.note output
+ new.block
+ format.eprint output
+ format.url output
+ fin.entry
+}
+
+% \end{macrocode}
+%
+% \subsubsection{Aliases and fallbacks}
+%
+% Here are a list of aliases supported by this style.
+%
+% \begin{macrocode}
+FUNCTION {letter}
+{ journal empty$
+ 'unpublished
+ 'article
+ if$
+}
+FUNCTION {audio} { booklet }
+FUNCTION {movie} { booklet }
+FUNCTION {music} { booklet }
+FUNCTION {video} { booklet }
+FUNCTION {dataset} { manual }
+FUNCTION {electronic} { manual }
+FUNCTION {online} { manual }
+FUNCTION {patent} { manual }
+FUNCTION {software} { manual }
+FUNCTION {standard} { manual }
+FUNCTION {www} { manual }
+FUNCTION {thesis} { phdthesis }
+FUNCTION {report} { techreport }
+% \end{macrocode}
+%
+% The fallback driver is \texttt{misc}, as with most styles.
+%
+% \begin{macrocode}
+FUNCTION {default.type} { misc }
+
+% \end{macrocode}
+%
+% \subsection{Bibliography processing}
+%
+% We are now ready for Bib\TeX\ to read in the \texttt{.bib} file.
+%
+% \begin{macrocode}
+READ
+% \end{macrocode}
+%
+% These functions are used to generate a sort key for each entry in the \texttt{.bib}
+% file.
+%
+% |sortify| strips out \LaTeX\ commands, spaces and ASCII symbols, and converts
+% to lowercase.
+%
+% \begin{macrocode}
+FUNCTION {sortify}
+{ purify$
+ "l" change.case$
+}
+% \end{macrocode}
+%
+% |chop.word| takes a string \emph{s}, an integer \emph{len}, and a prefix
+% (stop) string. If the first \emph{len} characters of \emph{s} match the
+% prefix, those characters are stripped off \emph{s}.
+%
+% \begin{macrocode}
+INTEGERS { len }
+FUNCTION {chop.word}
+{ 's :=
+ 'len :=
+ s #1 len substring$ =
+ { s len #1 + global.max$ substring$ }
+ 's
+ if$
+}
+% \end{macrocode}
+%
+% |format.lab.names| is similar to |format.full.names|, the main difference
+% being that if there are more than 3 names in the list, the second and
+% subsequent names are replaced with `et al.'
+%
+% \begin{macrocode}
+FUNCTION {format.lab.names}
+{'s :=
+ "" 't :=
+ #1 'nameptr :=
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ { s nameptr
+ "{vv~}{ll}" format.name$
+ 't :=
+ nameptr #1 >
+ { nameptr #2 =
+ numnames #3 > and
+ { "others" 't :=
+ #1 'namesleft := }
+ 'skip$
+ if$
+ namesleft #1 >
+ { ", " * t * }
+ { s nameptr "{ll}" format.name$ duplicate$ "others" =
+ { 't := }
+ { pop$ }
+ if$
+ t "others" =
+ { " " * bbl.etal *
+ }
+ { bbl.and
+ space.word * t *
+ }
+ if$
+ }
+ if$
+ }
+ 't
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+}
+% \end{macrocode}
+%
+% |author.editor.key.label| is the analogue of |author.editor.key.full| but with
+% a truncated list of author\slash editor names.
+%
+% \begin{macrocode}
+FUNCTION {author.editor.key.label}
+{ author empty$
+ { editor empty$
+ { key empty$
+ { title empty$
+ { cite$ #1 #3 substring$ }
+ { title
+ type$ "book" =
+ { emphasize }
+ 'skip$
+ if$
+ }
+ if$
+ }
+ 'key
+ if$
+ }
+ { editor format.lab.names }
+ if$
+ }
+ { author format.lab.names }
+ if$
+}
+% \end{macrocode}
+%
+% |editor.key.label| is the analogue of |editor.key.full| but with
+% a truncated list of editor names.
+%
+% \begin{macrocode}
+FUNCTION {editor.key.label}
+{ editor empty$
+ { key empty$
+ { title empty$
+ { cite$ #1 #3 substring$ }
+ { title emphasize }
+ if$
+ }
+ 'key
+ if$
+ }
+ { editor format.lab.names }
+ if$
+}
+% \end{macrocode}
+%
+% |author.key.label| is the analogue of |author.key.full| but with
+% a truncated list of author names.
+%
+% \begin{macrocode}
+FUNCTION {author.key.label}
+{ author empty$
+ { key empty$
+ { title empty$
+ { cite$ #1 #3 substring$ }
+ { title
+ type$ "article" =
+ type$ "incollection" =
+ or
+ type$ "inproceedings" =
+ or
+ type$ "misc" =
+ or
+ 'skip$
+ { emphasize }
+ if$
+ }
+ if$
+ }
+ 'key
+ if$
+ }
+ { author format.lab.names }
+ if$
+}
+% \end{macrocode}
+%
+% |calc.short.authors| chooses between the above.
+%
+% \begin{macrocode}
+FUNCTION {calc.short.authors}
+{ type$ "book" =
+ type$ "inbook" =
+ or
+ 'author.editor.key.label
+ { type$ "proceedings" =
+ 'editor.key.label
+ 'author.key.label
+ if$
+ }
+ if$
+ 'short.list :=
+}
+% \end{macrocode}
+%
+% |calc.label| creates a string in the form `Truncated Author List(Year'. The
+% closing parenthesis is supplied by |output.bibitem| (see above), into which
+% this string is incorporated.
+%
+% \begin{macrocode}
+FUNCTION {calc.label}
+{ calc.short.authors
+ short.list
+ "("
+ *
+ year nodate.check duplicate$ empty$
+ { pop$ "" }
+ 'skip$
+ if$
+ *
+ 'label :=
+}
+% \end{macrocode}
+%
+% |sort.format.names| consumes one token (a field) and constructs a list of
+% names in the form `Surname Forename Prefix Suffix', with just spaces between
+% adjacent names and `zzzzz' used in place of `et al.'
+%
+% \begin{macrocode}
+FUNCTION {sort.format.names}
+{ 's :=
+ #1 'nameptr :=
+ ""
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ { s nameptr
+ "{ll{ }}{ f{ }}{ jj{ }}{ vv{}}"
+ format.name$ 't :=
+ nameptr #1 >
+ { " " *
+ namesleft #1 =
+ t "others" =
+ and
+ { "zzzzz" 't := }
+ 'skip$
+ if$
+ t sortify *
+ }
+ { t sortify * }
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+}
+% \end{macrocode}
+%
+% |sort.format.title| strips off initial articles from the preceding field
+% and normalizes what remains using |sortify| (see above).
+%
+% \begin{macrocode}
+FUNCTION {sort.format.title}
+{ 't :=
+ "A " #2
+ "An " #3
+ "The " #4 t chop.word
+ chop.word
+ chop.word
+ sortify
+ #1 global.max$ substring$
+}
+% \end{macrocode}
+%
+% |author.editor.sort| creates a string for use when sorting the entry in the
+% bibliography. In order of preference, the string is based on author, editor,
+% title or the |key| field.
+%
+% \begin{macrocode}
+FUNCTION {author.editor.sort}
+{ author empty$
+ { editor empty$
+ { title empty$
+ { key empty$
+ { "to sort, need author, editor, title, or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { title sort.format.title }
+ if$
+ }
+ { editor sort.format.names }
+ if$
+ }
+ { author sort.format.names }
+ if$
+}
+% \end{macrocode}
+%
+% |editor.sort| does similar but skips the author names.
+%
+% \begin{macrocode}
+FUNCTION {editor.sort}
+{ editor empty$
+ { title empty$
+ { key empty$
+ { "to sort, need editor, title, or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { title sort.format.title }
+ if$
+ }
+ { editor sort.format.names }
+ if$
+}
+% \end{macrocode}
+%
+% |author.sort| does similar but skips the editor names.
+%
+% \begin{macrocode}
+FUNCTION {author.sort}
+{ author empty$
+ { title empty$
+ { key empty$
+ { "to sort, need author, title, or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { title sort.format.title }
+ if$
+ }
+ { author sort.format.names }
+ if$
+}
+
+% \end{macrocode}
+%
+% |presort| constructs the |sort.label| from the |calc.label| and one of the
+% above three functions. It also constructs the |sort.key$| (used by SORT) from
+% the |sort.label| and the title.
+%
+% \begin{macrocode}
+FUNCTION {presort}
+{ calc.label
+ label sortify
+ " "
+ *
+ type$ "book" =
+ type$ "inbook" =
+ or
+ 'author.editor.sort
+ { type$ "proceedings" =
+ 'editor.sort
+ 'author.sort
+ if$
+ }
+ if$
+ #1 entry.max$ substring$
+ 'sort.label :=
+ sort.label
+ *
+ " "
+ *
+ title field.or.null
+ sort.format.title
+ *
+ #1 entry.max$ substring$
+ 'sort.key$ :=
+}
+
+% \end{macrocode}
+%
+% We now tell Bib\TeX\ to go through each entry in turn and apply the
+% \texttt{presort} function, then use the resultant sort keys to put the entries
+% in order.
+%
+% \begin{macrocode}
+ITERATE {presort}
+SORT
+% \end{macrocode}
+%
+% If there are any duplicate author--year combinations, these functions detect
+% them and disambiguate them by adding a letter to the year.
+%
+% \begin{macrocode}
+STRINGS { last.label next.extra }
+INTEGERS { last.extra.num last.extra.num.extended last.extra.num.blank number.label }
+FUNCTION {initialize.extra.label.stuff}
+{ #0 int.to.chr$ 'last.label :=
+ "" 'next.extra :=
+ #0 'last.extra.num :=
+ "a" chr.to.int$ #1 - 'last.extra.num.blank :=
+ last.extra.num.blank 'last.extra.num.extended :=
+ #0 'number.label :=
+}
+FUNCTION {forward.pass}
+{ last.label label =
+ { last.extra.num #1 + 'last.extra.num :=
+ last.extra.num "z" chr.to.int$ >
+ { "a" chr.to.int$ 'last.extra.num :=
+ last.extra.num.extended #1 + 'last.extra.num.extended :=
+ }
+ 'skip$
+ if$
+ last.extra.num.extended last.extra.num.blank >
+ { last.extra.num.extended int.to.chr$
+ last.extra.num int.to.chr$
+ * 'extra.label := }
+ { last.extra.num int.to.chr$ 'extra.label := }
+ if$
+ }
+ { "a" chr.to.int$ 'last.extra.num :=
+ "" 'extra.label :=
+ label 'last.label :=
+ }
+ if$
+ number.label #1 + 'number.label :=
+}
+FUNCTION {reverse.pass}
+{ next.extra "b" =
+ { "a" 'extra.label := }
+ 'skip$
+ if$
+ extra.label 'next.extra :=
+ extra.label
+ duplicate$ empty$
+ 'skip$
+ { "{\natexlab{" swap$ * "}}" * }
+ if$
+ 'extra.label :=
+ label extra.label * 'label :=
+}
+% \end{macrocode}
+%
+% Applying these functions is a bit more tricky, but once we have done that,
+% we re-sort the entries to make absolutely sure they in the right order,
+% this time wih the year between with |sort.label| and the title.
+%
+% \begin{macrocode}
+EXECUTE {initialize.extra.label.stuff}
+ITERATE {forward.pass}
+REVERSE {reverse.pass}
+FUNCTION {bib.sort.order}
+{ sort.label
+ " "
+ *
+ year field.or.null sortify
+ *
+ " "
+ *
+ title field.or.null
+ sort.format.title
+ *
+ #1 entry.max$ substring$
+ 'sort.key$ :=
+}
+ITERATE {bib.sort.order}
+SORT
+% \end{macrocode}
+%
+% We now write out the beginning of the bibliography to a .bbl file. This
+% includes opening a \LaTeX\ environment, \texttt{thebibliography}, and some
+% user-redefinable strings.
+%
+% \begin{macrocode}
+FUNCTION {begin.bib}
+{ preamble$ empty$
+ 'skip$
+ { preamble$ write$ newline$ }
+ if$
+ "\begin{thebibliography}{" number.label int.to.str$ * "}" *
+ write$ newline$
+ "\providecommand{\natexlab}[1]{#1}"
+ write$ newline$
+ "\providecommand{\url}[1]{\texttt{#1}}"
+ write$ newline$
+ "\providecommand{\urlprefix}{Available from: }"
+ write$ newline$
+ "\providecommand{\urldateprefix}{Accessed }"
+ write$ newline$
+ "\providecommand{\selectlanguage}[1]{\relax}"
+ write$ newline$
+ "\providecommand{\bibinfo}[2]{#2}"
+ write$ newline$
+ "\providecommand{\eprint}[2][]{\url{#2}}"
+ write$ newline$
+}
+EXECUTE {begin.bib}
+EXECUTE {init.state.consts}
+% \end{macrocode}
+%
+% We go through each entry in turn, in the right order, and write the
+% formatted text out to the file.
+%
+% \begin{macrocode}
+ITERATE {call.type$}
+% \end{macrocode}
+%
+% After the last entry, we close the \LaTeX\ environment and stop writing to the
+% .bbl file.
+%
+% \begin{macrocode}
+FUNCTION {end.bib}
+{ newline$
+ "\end{thebibliography}" write$ newline$
+}
+EXECUTE {end.bib}
+% \end{macrocode}
+% \iffalse
+%</bst1|bst2>
+% \fi
diff --git a/biblio/bibtex/contrib/bath-bst/bath-bst.pdf b/biblio/bibtex/contrib/bath-bst/bath-bst.pdf
new file mode 100644
index 0000000000..37b1b312d3
--- /dev/null
+++ b/biblio/bibtex/contrib/bath-bst/bath-bst.pdf
Binary files differ
diff --git a/biblio/bibtex/contrib/besjournals/README b/biblio/bibtex/contrib/besjournals/README
new file mode 100644
index 0000000000..3192c77925
--- /dev/null
+++ b/biblio/bibtex/contrib/besjournals/README
@@ -0,0 +1,51 @@
+This is the BibTeX style (.bst) file for the
+following journals by The British Ecological Society:
+
+Functional Ecology
+Journal of Animal Ecology
+Journal of Ecology
+Journal of Applied Ecology
+
+Simply include it in your .tex file with command
+
+ \bibliography{myreferences}
+ \bibliographystyle{besjournals}
+
+where 'myreferences' is actually the file
+'myreferences.bib', which should be your bibliographic
+databank in BibTeX format, of course!
+
+Please, be aware that this style was pro­duced in­de­pen­dently
+of the British Ecol. So­ci­ety, and has no for­mal ap­proval
+from the Society.
+
+--------------- if you feel like doing a hackers' job:
+I have included here also the file
+
+besjournals.dbj
+
+which is the one used originally to generate functional_ecol.bst
+but should serve for all 4 BES journals. If
+you spot any mistake in the .bst file, you'd better fixing
+it in the .dbj file, instead of trying to fix the .bst file.
+
+Then, make sure you have custom-bib installed and run:
+
+latex besjournals.dbj
+
+to produce besjournals.bst, and please, let me know!!!
+
+Cheers
+
+Og DeSouza <og.souza@ufv.br>
+http://www.isoptera.ufv.br
+
+PS: if you publish a paper using this bst file, please be
+kind to mention it in the acknowledgments, and send me a
+pdf of your paper for my records. It may improve the chances
+to get my next research grant!
+
+--------------- changelog
+2014-10-21 fixing typos in README file
+2014-10-21 eliminating the inclusion of URL’s for each reference
+2014-10-22 renaming README.txt to README to comply with CTAN standards
diff --git a/biblio/bibtex/contrib/besjournals/besjournals.bst b/biblio/bibtex/contrib/besjournals/besjournals.bst
new file mode 100644
index 0000000000..beec0045d5
--- /dev/null
+++ b/biblio/bibtex/contrib/besjournals/besjournals.bst
@@ -0,0 +1,1708 @@
+%%
+%% This is file `functional_ecol.bst',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% merlin.mbs (with options: `head,ay,nat,nm-rvvc,jnrlab,keyxyr,dt-beg,yr-par,yrp-x,note-yr,vol-bf,vnum-x,volp-com,num-xser,jnm-x,edpar,edby-par,edbyx,blk-tit,in-x,pp,ed,abr,xedn,amper,and-xcom,etal-xc,etal-it,nfss,,{}')
+%% physjour.mbs (with options: `ay,nat,nm-rvvc,jnrlab,keyxyr,dt-beg,yr-par,yrp-x,note-yr,vol-bf,vnum-x,volp-com,num-xser,jnm-x,edpar,edby-par,edbyx,blk-tit,in-x,pp,ed,abr,xedn,amper,and-xcom,etal-xc,etal-it,nfss,,{}')
+%% geojour.mbs (with options: `ay,nat,nm-rvvc,jnrlab,keyxyr,dt-beg,yr-par,yrp-x,note-yr,vol-bf,vnum-x,volp-com,num-xser,jnm-x,edpar,edby-par,edbyx,blk-tit,in-x,pp,ed,abr,xedn,amper,and-xcom,etal-xc,etal-it,nfss,,{}')
+%% photjour.mbs (with options: `ay,nat,nm-rvvc,jnrlab,keyxyr,dt-beg,yr-par,yrp-x,note-yr,vol-bf,vnum-x,volp-com,num-xser,jnm-x,edpar,edby-par,edbyx,blk-tit,in-x,pp,ed,abr,xedn,amper,and-xcom,etal-xc,etal-it,nfss,,{}')
+%% merlin.mbs (with options: `tail,ay,nat,nm-rvvc,jnrlab,keyxyr,dt-beg,yr-par,yrp-x,note-yr,vol-bf,vnum-x,volp-com,num-xser,jnm-x,edpar,edby-par,edbyx,blk-tit,in-x,pp,ed,abr,xedn,amper,and-xcom,etal-xc,etal-it,nfss,,{}')
+%% ----------------------------------------
+%% *** BibTeX style (bst) for Functional Ecology ***
+%% Created by Og DeSouza <og.souza@ufv.br>
+%% using custom-bib
+%% Copyright 1994-2011 Patrick W Daly
+ % ===============================================================
+ % IMPORTANT NOTICE:
+ % This bibliographic style (bst) file has been generated from one or
+ % more master bibliographic style (mbs) files, listed above.
+ %
+ % This generated file can be redistributed and/or modified under the terms
+ % of the LaTeX Project Public License Distributed from CTAN
+ % archives in directory macros/latex/base/lppl.txt; either
+ % version 1 of the License, or any later version.
+ % ===============================================================
+ % Name and version information of the main mbs file:
+ % \ProvidesFile{merlin.mbs}[2011/11/18 4.33 (PWD, AO, DPC)]
+ % For use with BibTeX version 0.99a or later
+ %-------------------------------------------------------------------
+ % This bibliography style file is intended for texts in ENGLISH
+ % This is an author-year citation style bibliography. As such, it is
+ % non-standard LaTeX, and requires a special package file to function properly.
+ % Such a package is natbib.sty by Patrick W. Daly
+ % The form of the \bibitem entries is
+ % \bibitem[Jones et al.(1990)]{key}...
+ % \bibitem[Jones et al.(1990)Jones, Baker, and Smith]{key}...
+ % The essential feature is that the label (the part in brackets) consists
+ % of the author names, as they should appear in the citation, with the year
+ % in parentheses following. There must be no space before the opening
+ % parenthesis!
+ % With natbib v5.3, a full list of authors may also follow the year.
+ % In natbib.sty, it is possible to define the type of enclosures that is
+ % really wanted (brackets or parentheses), but in either case, there must
+ % be parentheses in the label.
+ % The \cite command functions as follows:
+ % \citet{key} ==>> Jones et al. (1990)
+ % \citet*{key} ==>> Jones, Baker, and Smith (1990)
+ % \citep{key} ==>> (Jones et al., 1990)
+ % \citep*{key} ==>> (Jones, Baker, and Smith, 1990)
+ % \citep[chap. 2]{key} ==>> (Jones et al., 1990, chap. 2)
+ % \citep[e.g.][]{key} ==>> (e.g. Jones et al., 1990)
+ % \citep[e.g.][p. 32]{key} ==>> (e.g. Jones et al., 1990, p. 32)
+ % \citeauthor{key} ==>> Jones et al.
+ % \citeauthor*{key} ==>> Jones, Baker, and Smith
+ % \citeyear{key} ==>> 1990
+ %---------------------------------------------------------------------
+
+ENTRY
+ { address
+ author
+ booktitle
+ chapter
+ edition
+ editor
+ eid
+ howpublished
+ institution
+ journal
+ key
+ month
+ note
+ number
+ organization
+ pages
+ publisher
+ school
+ series
+ title
+ type
+ volume
+ year
+ }
+ {}
+ { label extra.label sort.label short.list }
+INTEGERS { output.state before.all mid.sentence after.sentence after.block }
+FUNCTION {init.state.consts}
+{ #0 'before.all :=
+ #1 'mid.sentence :=
+ #2 'after.sentence :=
+ #3 'after.block :=
+}
+STRINGS { s t}
+FUNCTION {output.nonnull}
+{ 's :=
+ output.state mid.sentence =
+ { ", " * write$ }
+ { output.state after.block =
+ { add.period$ write$
+ newline$
+ "\newblock " write$
+ }
+ { output.state before.all =
+ 'write$
+ { add.period$ " " * write$ }
+ if$
+ }
+ if$
+ mid.sentence 'output.state :=
+ }
+ if$
+ s
+}
+FUNCTION {output}
+{ duplicate$ empty$
+ 'pop$
+ 'output.nonnull
+ if$
+}
+FUNCTION {output.check}
+{ 't :=
+ duplicate$ empty$
+ { pop$ "empty " t * " in " * cite$ * warning$ }
+ 'output.nonnull
+ if$
+}
+FUNCTION {fin.entry}
+{ add.period$
+ write$
+ newline$
+}
+
+FUNCTION {new.block}
+{ output.state before.all =
+ 'skip$
+ { after.block 'output.state := }
+ if$
+}
+FUNCTION {new.sentence}
+{ output.state after.block =
+ 'skip$
+ { output.state before.all =
+ 'skip$
+ { after.sentence 'output.state := }
+ if$
+ }
+ if$
+}
+FUNCTION {add.blank}
+{ " " * before.all 'output.state :=
+}
+
+FUNCTION {date.block}
+{
+ add.blank
+}
+
+FUNCTION {not}
+{ { #0 }
+ { #1 }
+ if$
+}
+FUNCTION {and}
+{ 'skip$
+ { pop$ #0 }
+ if$
+}
+FUNCTION {or}
+{ { pop$ #1 }
+ 'skip$
+ if$
+}
+FUNCTION {new.block.checkb}
+{ empty$
+ swap$ empty$
+ and
+ 'skip$
+ 'new.block
+ if$
+}
+FUNCTION {field.or.null}
+{ duplicate$ empty$
+ { pop$ "" }
+ 'skip$
+ if$
+}
+FUNCTION {emphasize}
+{ duplicate$ empty$
+ { pop$ "" }
+ { "\emph{" swap$ * "}" * }
+ if$
+}
+FUNCTION {bolden}
+{ duplicate$ empty$
+ { pop$ "" }
+ { "\textbf{" swap$ * "}" * }
+ if$
+}
+FUNCTION {tie.or.space.prefix}
+{ duplicate$ text.length$ #3 <
+ { "~" }
+ { " " }
+ if$
+ swap$
+}
+
+FUNCTION {capitalize}
+{ "u" change.case$ "t" change.case$ }
+
+FUNCTION {space.word}
+{ " " swap$ * " " * }
+ % Here are the language-specific definitions for explicit words.
+ % Each function has a name bbl.xxx where xxx is the English word.
+ % The language selected here is ENGLISH
+FUNCTION {bbl.and}
+{ "and"}
+
+FUNCTION {bbl.etal}
+{ "et~al." }
+
+FUNCTION {bbl.editors}
+{ "eds." }
+
+FUNCTION {bbl.editor}
+{ "ed." }
+
+FUNCTION {bbl.edby}
+{ "edited by" }
+
+FUNCTION {bbl.edition}
+{ "edn." }
+
+FUNCTION {bbl.volume}
+{ "vol." }
+
+FUNCTION {bbl.of}
+{ "of" }
+
+FUNCTION {bbl.number}
+{ "no." }
+
+FUNCTION {bbl.nr}
+{ "no." }
+
+FUNCTION {bbl.in}
+{ "in" }
+
+FUNCTION {bbl.pages}
+{ "pp." }
+
+FUNCTION {bbl.page}
+{ "p." }
+
+FUNCTION {bbl.chapter}
+{ "chap." }
+
+FUNCTION {bbl.techrep}
+{ "Tech. Rep." }
+
+FUNCTION {bbl.mthesis}
+{ "Master's thesis" }
+
+FUNCTION {bbl.phdthesis}
+{ "Ph.D. thesis" }
+
+MACRO {jan} {"Jan."}
+
+MACRO {feb} {"Feb."}
+
+MACRO {mar} {"Mar."}
+
+MACRO {apr} {"Apr."}
+
+MACRO {may} {"May"}
+
+MACRO {jun} {"Jun."}
+
+MACRO {jul} {"Jul."}
+
+MACRO {aug} {"Aug."}
+
+MACRO {sep} {"Sep."}
+
+MACRO {oct} {"Oct."}
+
+MACRO {nov} {"Nov."}
+
+MACRO {dec} {"Dec."}
+
+ %-------------------------------------------------------------------
+ % Begin module:
+ % \ProvidesFile{physjour.mbs}[2002/01/14 2.2 (PWD)]
+MACRO {aa}{"Astronomy and Astrophysics"}
+MACRO {aasup}{"Astronomy and Astrophysics, Supplement Series"}
+MACRO {aj}{"Astronomical Journal"}
+MACRO {aph} {"Acta Physica"}
+MACRO {advp} {"Advances in Physics"}
+MACRO {ajp} {"American Journal of Physics"}
+MACRO {ajm} {"American Journal of Mathematics"}
+MACRO {amsci} {"American Scientist"}
+MACRO {anofd} {"Annals of Fluid Dynamics"}
+MACRO {am} {"Annals of Mathematics"}
+MACRO {ap} {"Annals of Physics"}
+MACRO {adp} {"Annalen der Physik"}
+MACRO {ao} {"Applied Optics"}
+MACRO {apl} {"Applied Physics Letters"}
+MACRO {app} {"Astroparticle Physics"}
+MACRO {apj} {"Astrophysical Journal"}
+MACRO {apjsup} {"Astrophysical Journal Supplement"}
+MACRO {apss} {"Astrophysics and Space Science"}
+MACRO {araa} {"Annual Review of Astronomy and Astrophysics"}
+MACRO {baas} {"Bulletin of the American Astronomical Society"}
+MACRO {baps} {"Bulletin of the American Physical Society"}
+MACRO {cmp} {"Communications in Mathematical Physics"}
+MACRO {cpam} {"Communications on Pure and Applied Mathematics"}
+MACRO {cppcf} {"Comments on Plasma Physics and Controlled Fusion"}
+MACRO {cpc} {"Computer Physics Communications"}
+MACRO {cqg} {"Classical and Quantum Gravity"}
+MACRO {cra} {"Comptes Rendus des S{\'e}ances de l'Acad{\'e}mie des Sciences A"}
+MACRO {fed} {"Fusion Engineering and Design"}
+MACRO {ft} {"Fusion Technology"}
+MACRO {grg} {"General Relativity and Gravitation"}
+MACRO {ieeens} {"IEEE Transactions on Nuclear Science"}
+MACRO {ieeeps} {"IEEE Transactions on Plasma Science"}
+MACRO {ijimw} {"International Journal of Infrared and Millimeter Waves"}
+MACRO {ip} {"Infrared Physics"}
+MACRO {irp} {"Infrared Physics"}
+MACRO {jap} {"Journal of Applied Physics"}
+MACRO {jasa} {"Journal of the Acoustical Society of America"}
+MACRO {jcp} {"Journal of Computational Physics"}
+MACRO {jetp} {"Soviet Physics--JETP"}
+MACRO {jfe} {"Journal of Fusion Energy"}
+MACRO {jfm} {"Journal of Fluid Mechanics"}
+MACRO {jmp} {"Journal of Mathematical Physics"}
+MACRO {jne} {"Journal of Nuclear Energy"}
+MACRO {jnec} {"Journal of Nuclear Energy, Part C: Plasma Physics, Accelerators, Thermonuclear Research"}
+MACRO {jnm} {"Journal of Nuclear Materials"}
+MACRO {jpc} {"Journal of Physical Chemistry"}
+MACRO {jpp} {"Journal of Plasma Physics"}
+MACRO {jpsj} {"Journal of the Physical Society of Japan"}
+MACRO {jsi} {"Journal of Scientific Instruments"}
+MACRO {jvst} {"Journal of Vacuum Science and Technology"}
+MACRO {nat} {"Nature"}
+MACRO {nature} {"Nature"}
+MACRO {nedf} {"Nuclear Engineering and Design/Fusion"}
+MACRO {nf} {"Nuclear Fusion"}
+MACRO {nim} {"Nuclear Instruments and Methods"}
+MACRO {nimpr} {"Nuclear Instruments and Methods in Physics Research"}
+MACRO {np} {"Nuclear Physics"}
+MACRO {npb} {"Nuclear Physics B"}
+MACRO {nt/f} {"Nuclear Technology/Fusion"}
+MACRO {npbpc} {"Nuclear Physics B (Proceedings Supplements)"}
+MACRO {inc} {"Il Nuovo Cimento"}
+MACRO {nc} {"Nuovo Cimento"}
+MACRO {pf} {"Physics of Fluids"}
+MACRO {pfa} {"Physics of Fluids A: Fluid Dynamics"}
+MACRO {pfb} {"Physics of Fluids B: Plasma Physics"}
+MACRO {pl} {"Physics Letters"}
+MACRO {pla} {"Physics Letters A"}
+MACRO {plb} {"Physics Letters B"}
+MACRO {prep} {"Physics Reports"}
+MACRO {pnas} {"Proceedings of the National Academy of Sciences of the USA"}
+MACRO {pp} {"Physics of Plasmas"}
+MACRO {ppcf} {"Plasma Physics and Controlled Fusion"}
+MACRO {phitrsl} {"Philosophical Transactions of the Royal Society of London"}
+MACRO {prl} {"Physical Review Letters"}
+MACRO {pr} {"Physical Review"}
+MACRO {physrev} {"Physical Review"}
+MACRO {pra} {"Physical Review A"}
+MACRO {prb} {"Physical Review B"}
+MACRO {prc} {"Physical Review C"}
+MACRO {prd} {"Physical Review D"}
+MACRO {pre} {"Physical Review E"}
+MACRO {ps} {"Physica Scripta"}
+MACRO {procrsl} {"Proceedings of the Royal Society of London"}
+MACRO {rmp} {"Reviews of Modern Physics"}
+MACRO {rsi} {"Review of Scientific Instruments"}
+MACRO {science} {"Science"}
+MACRO {sciam} {"Scientific American"}
+MACRO {sam} {"Studies in Applied Mathematics"}
+MACRO {sjpp} {"Soviet Journal of Plasma Physics"}
+MACRO {spd} {"Soviet Physics--Doklady"}
+MACRO {sptp} {"Soviet Physics--Technical Physics"}
+MACRO {spu} {"Soviet Physics--Uspeki"}
+MACRO {st} {"Sky and Telescope"}
+ % End module: physjour.mbs
+ %-------------------------------------------------------------------
+ % Begin module:
+ % \ProvidesFile{geojour.mbs}[2002/07/10 2.0h (PWD)]
+MACRO {aisr} {"Advances in Space Research"}
+MACRO {ag} {"Annales Geophysic\ae"}
+MACRO {anigeo} {"Annali di Geofisica"}
+MACRO {angl} {"Annals of Glaciology"}
+MACRO {andmet} {"Annalen der Meteorologie"}
+MACRO {andgeo} {"Annales de Geophysique"}
+MACRO {andphy} {"Annales de Physique"}
+MACRO {afmgb} {"Archiv f\^^b{u}r Meteorologie, Geophysik und Bioklimatologie"}
+MACRO {ass}{"Astrophysics and Space Science"}
+MACRO {atph} {"Atm\'osphera"}
+MACRO {aao} {"Atmosphere-Ocean"}
+MACRO {atenv} {"Atmospheric Environment"}
+MACRO {aujag} {"Australian Journal of Agricultural Research"}
+MACRO {aumet} {"Australian Meteorological Magazine"}
+MACRO {blmet} {"Boundary-Layer Meteorology"}
+MACRO {bams} {"Bulletin of the American Meteorological Society"}
+MACRO {cch} {"Climatic Change"}
+MACRO {cdyn} {"Climate Dynamics"}
+MACRO {cbul} {"Climatological Bulletin"}
+MACRO {cap} {"Contributions to Atmospheric Physics"}
+MACRO {dsr} {"Deep-Sea Research"}
+MACRO {dhz} {"Deutsche Hydrographische Zeitschrift"}
+MACRO {dao} {"Dynamics of Atmospheres and Oceans"}
+MACRO {eco} {"Ecology"}
+MACRO {empl}{"Earth, Moon and Planets"}
+MACRO {envres} {"Environmental Research"}
+MACRO {envst} {"Environmental Science and Technology"}
+MACRO {ecms} {"Estuarine and Coastal Marine Science"}
+MACRO {expa}{"Experimental Astronomy"}
+MACRO {geoint} {"Geofisica Internationale"}
+MACRO {geopub} {"Geofysiske Publikasjoner"}
+MACRO {geogeo} {"Geologiya i Geofizika"}
+MACRO {gafd} {"Geophysical and Astrophysical Fluid Dynamics"}
+MACRO {gfd} {"Geophysical Fluid Dynamics"}
+MACRO {geomag} {"Geophysical Magazine"}
+MACRO {georl} {"Geophysical Research Letters"}
+MACRO {grl} {"Geophysical Research Letters"}
+MACRO {ga} {"Geophysica"}
+MACRO {gs} {"Geophysics"}
+MACRO {ieeetap} {"IEEE Transactions on Antennas and Propagation"}
+MACRO {ijawp} {"International Journal of Air and Water Pollution"}
+MACRO {ijc} {"International Journal of Climatology"}
+MACRO {ijrs} {"International Journal of Remote Sensing"}
+MACRO {jam} {"Journal of Applied Meteorology"}
+MACRO {jaot} {"Journal of Atmospheric and Oceanic Technology"}
+MACRO {jatp} {"Journal of Atmospheric and Terrestrial Physics"}
+MACRO {jastp} {"Journal of Atmospheric and Solar-Terrestrial Physics"}
+MACRO {jce} {"Journal of Climate"}
+MACRO {jcam} {"Journal of Climate and Applied Meteorology"}
+MACRO {jcm} {"Journal of Climate Meteorology"}
+MACRO {jcy} {"journal of Climatology"}
+MACRO {jgr} {"Journal of Geophysical Research"}
+MACRO {jga} {"Journal of Glaciology"}
+MACRO {jh} {"Journal of Hydrology"}
+MACRO {jmr} {"Journal of Marine Research"}
+MACRO {jmrj} {"Journal of Meteorological Research, Japan"}
+MACRO {jm} {"Journal of Meteorology"}
+MACRO {jpo} {"Journal of Physical Oceanography"}
+MACRO {jra} {"Journal de Recherches Atmospheriques"}
+MACRO {jaes} {"Journal of the Aeronautical Sciences"}
+MACRO {japca} {"Journal of the Air Pollution Control Association"}
+MACRO {jas} {"Journal of the Atmospheric Sciences"}
+MACRO {jmts} {"Journal of the Marine Technology Society"}
+MACRO {jmsj} {"Journal of Meteorological Society of Japan"}
+MACRO {josj} {"Journal of the Oceanographical Society of Japan"}
+MACRO {jwm} {"Journal of Weather Modification"}
+MACRO {lao} {"Limnology and Oceanography"}
+MACRO {mwl} {"Mariners Weather Log"}
+MACRO {mau} {"Mausam"}
+MACRO {meteor} {"``Meteor'' Forschungsergebnisse"}
+MACRO {map} {"Meteorology and Atmospheric Physics"}
+MACRO {metmag} {"Meteorological Magazine"}
+MACRO {metmon} {"Meteorological Monographs"}
+MACRO {metrun} {"Meteorologische Rundschau"}
+MACRO {metzeit} {"Meteorologische Zeitschrift"}
+MACRO {metgid} {"Meteorologiya i Gidrologiya"}
+MACRO {mwr} {"Monthly Weather Review"}
+MACRO {nwd} {"National Weather Digest"}
+MACRO {nzjmfr} {"New Zealand Journal of Marine and Freshwater Research"}
+MACRO {npg} {"Nonlinear Processes in Geophysics"}
+MACRO {om} {"Oceanography and Meteorology"}
+MACRO {ocac} {"Oceanologica Acta"}
+MACRO {oceanus} {"Oceanus"}
+MACRO {paleoc} {"Paleoceanography"}
+MACRO {pce} {"Physics and Chemistry of the Earth"}
+MACRO {pmg} {"Papers in Meteorology and Geophysics"}
+MACRO {ppom} {"Papers in Physical Oceanography and Meteorology"}
+MACRO {physzeit} {"Physikalische Zeitschrift"}
+MACRO {pps} {"Planetary and Space Science"}
+MACRO {pss} {"Planetary and Space Science"}
+MACRO {pag} {"Pure and Applied Geophysics"}
+MACRO {qjrms} {"Quarterly Journal of the Royal Meteorological Society"}
+MACRO {quatres} {"Quaternary Research"}
+MACRO {rsci} {"Radio Science"}
+MACRO {rse} {"Remote Sensing of the Environment"}
+MACRO {rgeo} {"Reviews of Geophysics"}
+MACRO {rgsp} {"Reviews of Geophysics and Space Physics"}
+MACRO {rdgeo} {"Revista de Geofisica"}
+MACRO {revmeta} {"Revista Meteorologica"}
+MACRO {sgp}{"Surveys in Geophysics"}
+MACRO {sp} {"Solar Phys."}
+MACRO {ssr} {"Space Science Review"}
+MACRO {tellus} {"Tellus"}
+MACRO {tac} {"Theoretical and Applied Climatology"}
+MACRO {tagu} {"Transactions, American Geophysical Union (EOS)"}
+MACRO {wrr} {"Water Resources Research"}
+MACRO {weather} {"Weather"}
+MACRO {wafc} {"Weather and Forecasting"}
+MACRO {ww} {"Weatherwise"}
+MACRO {wmob} {"World Meteorological Organization Bulletin"}
+MACRO {zeitmet} {"Zeitschrift f\^^b{u}r Meteorologie"}
+ % End module: geojour.mbs
+ %-------------------------------------------------------------------
+ % Begin module:
+ % \ProvidesFile{photjour.mbs}[1999/02/24 2.0b (PWD)]
+
+MACRO {appopt} {"Applied Optics"}
+MACRO {bell} {"Bell Systems Technical Journal"}
+MACRO {ell} {"Electronics Letters"}
+MACRO {jasp} {"Journal of Applied Spectroscopy"}
+MACRO {jqe} {"IEEE Journal of Quantum Electronics"}
+MACRO {jlwt} {"Journal of Lightwave Technology"}
+MACRO {jmo} {"Journal of Modern Optics"}
+MACRO {josa} {"Journal of the Optical Society of America"}
+MACRO {josaa} {"Journal of the Optical Society of America~A"}
+MACRO {josab} {"Journal of the Optical Society of America~B"}
+MACRO {jdp} {"Journal de Physique"}
+MACRO {oc} {"Optics Communications"}
+MACRO {ol} {"Optics Letters"}
+MACRO {phtl} {"IEEE Photonics Technology Letters"}
+MACRO {pspie} {"Proceedings of the Society for Photo-Optical Instruments Engineers"}
+MACRO {sse} {"Solid-State Electronics"}
+MACRO {sjot} {"Soviet Journal of Optical Technology"}
+MACRO {sjqe} {"Soviet Journal of Quantum Electronics"}
+MACRO {sleb} {"Soviet Physics--Lebedev Institute Reports"}
+MACRO {stph} {"Soviet Physics--Technical Physics"}
+MACRO {stphl} {"Soviet Technical Physics Letters"}
+MACRO {vr} {"Vision Research"}
+MACRO {zph} {"Zeitschrift f\^^b{u}r Physik"}
+MACRO {zphb} {"Zeitschrift f\^^b{u}r Physik~B"}
+MACRO {zphd} {"Zeitschrift f\^^b{u}r Physik~D"}
+
+MACRO {CLEO} {"Conf. on Lasers and Electro-Optics"}
+MACRO {ASSL} {"Advanced Solid State Lasers"}
+MACRO {OSA} {"Optical Society of America"}
+ % End module: photjour.mbs
+%% Copyright 1994-2011 Patrick W Daly
+MACRO {acmcs} {"ACM Computing Surveys"}
+
+MACRO {acta} {"Acta Informatica"}
+
+MACRO {cacm} {"Communications of the ACM"}
+
+MACRO {ibmjrd} {"IBM Journal of Research and Development"}
+
+MACRO {ibmsj} {"IBM Systems Journal"}
+
+MACRO {ieeese} {"IEEE Transactions on Software Engineering"}
+
+MACRO {ieeetc} {"IEEE Transactions on Computers"}
+
+MACRO {ieeetcad}
+ {"IEEE Transactions on Computer-Aided Design of Integrated Circuits"}
+
+MACRO {ipl} {"Information Processing Letters"}
+
+MACRO {jacm} {"Journal of the ACM"}
+
+MACRO {jcss} {"Journal of Computer and System Sciences"}
+
+MACRO {scp} {"Science of Computer Programming"}
+
+MACRO {sicomp} {"SIAM Journal on Computing"}
+
+MACRO {tocs} {"ACM Transactions on Computer Systems"}
+
+MACRO {tods} {"ACM Transactions on Database Systems"}
+
+MACRO {tog} {"ACM Transactions on Graphics"}
+
+MACRO {toms} {"ACM Transactions on Mathematical Software"}
+
+MACRO {toois} {"ACM Transactions on Office Information Systems"}
+
+MACRO {toplas} {"ACM Transactions on Programming Languages and Systems"}
+
+MACRO {tcs} {"Theoretical Computer Science"}
+FUNCTION {bibinfo.check}
+{ swap$
+ duplicate$ missing$
+ {
+ pop$ pop$
+ ""
+ }
+ { duplicate$ empty$
+ {
+ swap$ pop$
+ }
+ { swap$
+ pop$
+ }
+ if$
+ }
+ if$
+}
+FUNCTION {bibinfo.warn}
+{ swap$
+ duplicate$ missing$
+ {
+ swap$ "missing " swap$ * " in " * cite$ * warning$ pop$
+ ""
+ }
+ { duplicate$ empty$
+ {
+ swap$ "empty " swap$ * " in " * cite$ * warning$
+ }
+ { swap$
+ pop$
+ }
+ if$
+ }
+ if$
+}
+INTEGERS { nameptr namesleft numnames }
+
+
+STRINGS { bibinfo}
+
+FUNCTION {format.names}
+{ 'bibinfo :=
+ duplicate$ empty$ 'skip$ {
+ 's :=
+ "" 't :=
+ #1 'nameptr :=
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ { s nameptr
+ "{vv~}{ll}{, jj}{, f{.}.}"
+ format.name$
+ bibinfo bibinfo.check
+ 't :=
+ nameptr #1 >
+ {
+ namesleft #1 >
+ { ", " * t * }
+ {
+ s nameptr "{ll}" format.name$ duplicate$ "others" =
+ { 't := }
+ { pop$ }
+ if$
+ t "others" =
+ {
+ " " * bbl.etal emphasize *
+ }
+ {
+ "\&"
+ space.word * t *
+ }
+ if$
+ }
+ if$
+ }
+ 't
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+ } if$
+}
+FUNCTION {format.names.ed}
+{
+ 'bibinfo :=
+ duplicate$ empty$ 'skip$ {
+ 's :=
+ "" 't :=
+ #1 'nameptr :=
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ { s nameptr
+ "{f{.}.~}{vv~}{ll}{ jj}"
+ format.name$
+ bibinfo bibinfo.check
+ 't :=
+ nameptr #1 >
+ {
+ namesleft #1 >
+ { ", " * t * }
+ {
+ s nameptr "{ll}" format.name$ duplicate$ "others" =
+ { 't := }
+ { pop$ }
+ if$
+ t "others" =
+ {
+
+ " " * bbl.etal emphasize *
+ }
+ {
+ "\&"
+ space.word * t *
+ }
+ if$
+ }
+ if$
+ }
+ 't
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+ } if$
+}
+FUNCTION {format.key}
+{ empty$
+ { key field.or.null }
+ { "" }
+ if$
+}
+
+FUNCTION {format.authors}
+{ author "author" format.names
+}
+FUNCTION {get.bbl.editor}
+{ editor num.names$ #1 > 'bbl.editors 'bbl.editor if$ }
+
+FUNCTION {format.editors}
+{ editor "editor" format.names duplicate$ empty$ 'skip$
+ {
+ " " *
+ get.bbl.editor
+ "(" swap$ * ")" *
+ *
+ }
+ if$
+}
+FUNCTION {format.note}
+{
+ note empty$
+ { "" }
+ { note #1 #1 substring$
+ duplicate$ "{" =
+ 'skip$
+ { output.state mid.sentence =
+ { "l" }
+ { "u" }
+ if$
+ change.case$
+ }
+ if$
+ note #2 global.max$ substring$ * "note" bibinfo.check
+ }
+ if$
+}
+
+FUNCTION {format.title}
+{ title
+ duplicate$ empty$ 'skip$
+ { "t" change.case$ }
+ if$
+ "title" bibinfo.check
+}
+FUNCTION {format.full.names}
+{'s :=
+ "" 't :=
+ #1 'nameptr :=
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ { s nameptr
+ "{vv~}{ll}{, jj}" format.name$
+ 't :=
+ nameptr #1 >
+ {
+ namesleft #1 >
+ { ", " * t * }
+ {
+ s nameptr "{ll}" format.name$ duplicate$ "others" =
+ { 't := }
+ { pop$ }
+ if$
+ t "others" =
+ {
+ " " * bbl.etal emphasize *
+ }
+ {
+ "\&"
+ space.word * t *
+ }
+ if$
+ }
+ if$
+ }
+ 't
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+}
+
+FUNCTION {author.editor.key.full}
+{ author empty$
+ { editor empty$
+ { key empty$
+ { cite$ #1 #3 substring$ }
+ 'key
+ if$
+ }
+ { editor format.full.names }
+ if$
+ }
+ { author format.full.names }
+ if$
+}
+
+FUNCTION {author.key.full}
+{ author empty$
+ { key empty$
+ { cite$ #1 #3 substring$ }
+ 'key
+ if$
+ }
+ { author format.full.names }
+ if$
+}
+
+FUNCTION {editor.key.full}
+{ editor empty$
+ { key empty$
+ { cite$ #1 #3 substring$ }
+ 'key
+ if$
+ }
+ { editor format.full.names }
+ if$
+}
+
+FUNCTION {make.full.names}
+{ type$ "book" =
+ type$ "inbook" =
+ or
+ 'author.editor.key.full
+ { type$ "proceedings" =
+ 'editor.key.full
+ 'author.key.full
+ if$
+ }
+ if$
+}
+
+FUNCTION {output.bibitem}
+{ newline$
+ "\bibitem[{" write$
+ label write$
+ ")" make.full.names duplicate$ short.list =
+ { pop$ }
+ { * }
+ if$
+ "}]{" * write$
+ cite$ write$
+ "}" write$
+ newline$
+ ""
+ before.all 'output.state :=
+}
+
+FUNCTION {n.dashify}
+{
+ 't :=
+ ""
+ { t empty$ not }
+ { t #1 #1 substring$ "-" =
+ { t #1 #2 substring$ "--" = not
+ { "--" *
+ t #2 global.max$ substring$ 't :=
+ }
+ { { t #1 #1 substring$ "-" = }
+ { "-" *
+ t #2 global.max$ substring$ 't :=
+ }
+ while$
+ }
+ if$
+ }
+ { t #1 #1 substring$ *
+ t #2 global.max$ substring$ 't :=
+ }
+ if$
+ }
+ while$
+}
+
+FUNCTION {word.in}
+{ "" }
+
+FUNCTION {format.date}
+{ year "year" bibinfo.check duplicate$ empty$
+ {
+ "empty year in " cite$ * "; set to ????" * warning$
+ pop$ "????"
+ }
+ 'skip$
+ if$
+ extra.label *
+ before.all 'output.state :=
+ " (" swap$ * ")" *
+}
+FUNCTION {format.btitle}
+{ title "title" bibinfo.check
+ duplicate$ empty$ 'skip$
+ {
+ emphasize
+ }
+ if$
+}
+FUNCTION {either.or.check}
+{ empty$
+ 'pop$
+ { "can't use both " swap$ * " fields in " * cite$ * warning$ }
+ if$
+}
+FUNCTION {format.bvolume}
+{ volume empty$
+ { "" }
+ { bbl.volume volume tie.or.space.prefix
+ "volume" bibinfo.check * *
+ series "series" bibinfo.check
+ duplicate$ empty$ 'pop$
+ { swap$ bbl.of space.word * swap$
+ emphasize * }
+ if$
+ "volume and number" number either.or.check
+ }
+ if$
+}
+FUNCTION {format.number.series}
+{ volume empty$
+ { number empty$
+ { series field.or.null }
+ { series empty$
+ { number "number" bibinfo.check }
+ { output.state mid.sentence =
+ { bbl.number }
+ { bbl.number capitalize }
+ if$
+ number tie.or.space.prefix "number" bibinfo.check * *
+ bbl.in space.word *
+ series "series" bibinfo.check *
+ }
+ if$
+ }
+ if$
+ }
+ { "" }
+ if$
+}
+
+FUNCTION {format.edition}
+{ edition duplicate$ empty$ 'skip$
+ {
+ output.state mid.sentence =
+ { "l" }
+ { "t" }
+ if$ change.case$
+ "edition" bibinfo.check
+ " " * bbl.edition *
+ }
+ if$
+}
+INTEGERS { multiresult }
+FUNCTION {multi.page.check}
+{ 't :=
+ #0 'multiresult :=
+ { multiresult not
+ t empty$ not
+ and
+ }
+ { t #1 #1 substring$
+ duplicate$ "-" =
+ swap$ duplicate$ "," =
+ swap$ "+" =
+ or or
+ { #1 'multiresult := }
+ { t #2 global.max$ substring$ 't := }
+ if$
+ }
+ while$
+ multiresult
+}
+FUNCTION {format.pages}
+{ pages duplicate$ empty$ 'skip$
+ { duplicate$ multi.page.check
+ {
+ bbl.pages swap$
+ n.dashify
+ }
+ {
+ bbl.page swap$
+ }
+ if$
+ tie.or.space.prefix
+ "pages" bibinfo.check
+ * *
+ }
+ if$
+}
+FUNCTION {format.journal.pages}
+{ pages duplicate$ empty$ 'pop$
+ { swap$ duplicate$ empty$
+ { pop$ pop$ format.pages }
+ {
+ ", " *
+ swap$
+ n.dashify
+ "pages" bibinfo.check
+ *
+ }
+ if$
+ }
+ if$
+}
+FUNCTION {format.journal.eid}
+{ eid "eid" bibinfo.check
+ duplicate$ empty$ 'pop$
+ { swap$ duplicate$ empty$ 'skip$
+ {
+ ", " *
+ }
+ if$
+ swap$ *
+ }
+ if$
+}
+FUNCTION {format.vol.num.pages}
+{ volume field.or.null
+ duplicate$ empty$ 'skip$
+ {
+ "volume" bibinfo.check
+ }
+ if$
+ bolden
+ eid empty$
+ { format.journal.pages }
+ { format.journal.eid }
+ if$
+}
+
+FUNCTION {format.chapter.pages}
+{ chapter empty$
+ 'format.pages
+ { type empty$
+ { bbl.chapter }
+ { type "l" change.case$
+ "type" bibinfo.check
+ }
+ if$
+ chapter tie.or.space.prefix
+ "chapter" bibinfo.check
+ * *
+ pages empty$
+ 'skip$
+ { ", " * format.pages * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.booktitle}
+{
+ booktitle "booktitle" bibinfo.check
+ emphasize
+}
+FUNCTION {format.in.ed.booktitle}
+{ format.booktitle duplicate$ empty$ 'skip$
+ {
+ editor "editor" format.names.ed duplicate$ empty$ 'pop$
+ {
+ get.bbl.editor
+ " " * swap$ *
+ "(" swap$ * ")" *
+ swap$
+ " " * swap$
+ * }
+ if$
+ word.in swap$ *
+ }
+ if$
+}
+FUNCTION {format.thesis.type}
+{ type duplicate$ empty$
+ 'pop$
+ { swap$ pop$
+ "t" change.case$ "type" bibinfo.check
+ }
+ if$
+}
+FUNCTION {format.tr.number}
+{ number "number" bibinfo.check
+ type duplicate$ empty$
+ { pop$ bbl.techrep }
+ 'skip$
+ if$
+ "type" bibinfo.check
+ swap$ duplicate$ empty$
+ { pop$ "t" change.case$ }
+ { tie.or.space.prefix * * }
+ if$
+}
+FUNCTION {format.article.crossref}
+{
+ word.in
+ " \cite{" * crossref * "}" *
+}
+FUNCTION {format.book.crossref}
+{ volume duplicate$ empty$
+ { "empty volume in " cite$ * "'s crossref of " * crossref * warning$
+ pop$ word.in
+ }
+ { bbl.volume
+ capitalize
+ swap$ tie.or.space.prefix "volume" bibinfo.check * * bbl.of space.word *
+ }
+ if$
+ " \cite{" * crossref * "}" *
+}
+FUNCTION {format.incoll.inproc.crossref}
+{
+ word.in
+ " \cite{" * crossref * "}" *
+}
+FUNCTION {format.org.or.pub}
+{ 't :=
+ ""
+ address empty$ t empty$ and
+ 'skip$
+ {
+ t empty$
+ { address "address" bibinfo.check *
+ }
+ { t *
+ address empty$
+ 'skip$
+ { ", " * address "address" bibinfo.check * }
+ if$
+ }
+ if$
+ }
+ if$
+}
+FUNCTION {format.publisher.address}
+{ publisher "publisher" bibinfo.warn format.org.or.pub
+}
+
+FUNCTION {format.organization.address}
+{ organization "organization" bibinfo.check format.org.or.pub
+}
+
+FUNCTION {article}
+{ output.bibitem
+ format.authors "author" output.check
+ author format.key output
+ format.date "year" output.check
+ date.block
+ format.title "title" output.check
+ new.sentence
+ crossref missing$
+ {
+ journal
+ "journal" bibinfo.check
+ emphasize
+ "journal" output.check
+ add.blank
+ format.vol.num.pages output
+ }
+ { format.article.crossref output.nonnull
+ format.pages output
+ }
+ if$
+ format.note output
+ fin.entry
+}
+FUNCTION {book}
+{ output.bibitem
+ author empty$
+ { format.editors "author and editor" output.check
+ editor format.key output
+ }
+ { format.authors output.nonnull
+ crossref missing$
+ { "author and editor" editor either.or.check }
+ 'skip$
+ if$
+ }
+ if$
+ format.date "year" output.check
+ date.block
+ format.btitle "title" output.check
+ crossref missing$
+ { format.bvolume output
+ new.sentence
+ format.number.series output
+ format.publisher.address output
+ }
+ {
+ new.sentence
+ format.book.crossref output.nonnull
+ }
+ if$
+ format.edition output
+ format.note output
+ fin.entry
+}
+FUNCTION {booklet}
+{ output.bibitem
+ format.authors output
+ author format.key output
+ format.date "year" output.check
+ date.block
+ format.title "title" output.check
+ new.sentence
+ howpublished "howpublished" bibinfo.check output
+ address "address" bibinfo.check output
+ format.note output
+ fin.entry
+}
+
+FUNCTION {inbook}
+{ output.bibitem
+ author empty$
+ { format.editors "author and editor" output.check
+ editor format.key output
+ }
+ { format.authors output.nonnull
+ crossref missing$
+ { "author and editor" editor either.or.check }
+ 'skip$
+ if$
+ }
+ if$
+ format.date "year" output.check
+ date.block
+ format.btitle "title" output.check
+ crossref missing$
+ {
+ format.bvolume output
+ format.chapter.pages "chapter and pages" output.check
+ new.sentence
+ format.number.series output
+ format.publisher.address output
+ }
+ {
+ format.chapter.pages "chapter and pages" output.check
+ new.sentence
+ format.book.crossref output.nonnull
+ }
+ if$
+ format.edition output
+ format.note output
+ fin.entry
+}
+
+FUNCTION {incollection}
+{ output.bibitem
+ format.authors "author" output.check
+ author format.key output
+ format.date "year" output.check
+ date.block
+ format.title "title" output.check
+ new.sentence
+ crossref missing$
+ { format.in.ed.booktitle "booktitle" output.check
+ format.bvolume output
+ format.number.series output
+ format.chapter.pages output
+ format.publisher.address output
+ format.edition output
+ }
+ { format.incoll.inproc.crossref output.nonnull
+ format.chapter.pages output
+ }
+ if$
+ format.note output
+ fin.entry
+}
+FUNCTION {inproceedings}
+{ output.bibitem
+ format.authors "author" output.check
+ author format.key output
+ format.date "year" output.check
+ date.block
+ format.title "title" output.check
+ new.sentence
+ crossref missing$
+ { format.in.ed.booktitle "booktitle" output.check
+ format.bvolume output
+ format.number.series output
+ format.pages output
+ publisher empty$
+ { format.organization.address output }
+ { organization "organization" bibinfo.check output
+ format.publisher.address output
+ }
+ if$
+ }
+ { format.incoll.inproc.crossref output.nonnull
+ format.pages output
+ }
+ if$
+ format.note output
+ fin.entry
+}
+FUNCTION {conference} { inproceedings }
+FUNCTION {manual}
+{ output.bibitem
+ format.authors output
+ author format.key output
+ format.date "year" output.check
+ date.block
+ format.btitle "title" output.check
+ new.sentence
+ organization "organization" bibinfo.check output
+ address "address" bibinfo.check output
+ format.edition output
+ format.note output
+ fin.entry
+}
+
+FUNCTION {mastersthesis}
+{ output.bibitem
+ format.authors "author" output.check
+ author format.key output
+ format.date "year" output.check
+ date.block
+ format.btitle
+ "title" output.check
+ new.sentence
+ bbl.mthesis format.thesis.type output.nonnull
+ school "school" bibinfo.warn output
+ address "address" bibinfo.check output
+ format.note output
+ fin.entry
+}
+
+FUNCTION {misc}
+{ output.bibitem
+ format.authors output
+ author format.key output
+ format.date "year" output.check
+ date.block
+ format.title output
+ new.sentence
+ howpublished "howpublished" bibinfo.check output
+ format.note output
+ fin.entry
+}
+FUNCTION {phdthesis}
+{ output.bibitem
+ format.authors "author" output.check
+ author format.key output
+ format.date "year" output.check
+ date.block
+ format.btitle
+ "title" output.check
+ new.sentence
+ bbl.phdthesis format.thesis.type output.nonnull
+ school "school" bibinfo.warn output
+ address "address" bibinfo.check output
+ format.note output
+ fin.entry
+}
+
+FUNCTION {proceedings}
+{ output.bibitem
+ format.editors output
+ editor format.key output
+ format.date "year" output.check
+ date.block
+ format.btitle "title" output.check
+ format.bvolume output
+ format.number.series output
+ publisher empty$
+ { format.organization.address output }
+ { organization "organization" bibinfo.check output
+ format.publisher.address output
+ }
+ if$
+ format.note output
+ fin.entry
+}
+
+FUNCTION {techreport}
+{ output.bibitem
+ format.authors "author" output.check
+ author format.key output
+ format.date "year" output.check
+ date.block
+ format.title
+ "title" output.check
+ new.sentence
+ format.tr.number output.nonnull
+ institution "institution" bibinfo.warn output
+ address "address" bibinfo.check output
+ format.note output
+ fin.entry
+}
+
+FUNCTION {unpublished}
+{ output.bibitem
+ format.authors "author" output.check
+ author format.key output
+ format.date "year" output.check
+ date.block
+ format.title "title" output.check
+ format.note "note" output.check
+ fin.entry
+}
+
+FUNCTION {default.type} { misc }
+READ
+FUNCTION {sortify}
+{ purify$
+ "l" change.case$
+}
+INTEGERS { len }
+FUNCTION {chop.word}
+{ 's :=
+ 'len :=
+ s #1 len substring$ =
+ { s len #1 + global.max$ substring$ }
+ 's
+ if$
+}
+FUNCTION {format.lab.names}
+{ 's :=
+ "" 't :=
+ s #1 "{vv~}{ll}{, jj}" format.name$
+ s num.names$ duplicate$
+ #2 >
+ { pop$
+ " " * bbl.etal emphasize *
+ }
+ { #2 <
+ 'skip$
+ { s #2 "{ff }{vv }{ll}{ jj}" format.name$ "others" =
+ {
+ " " * bbl.etal emphasize *
+ }
+ { " \& " * s #2 "{vv~}{ll}" format.name$
+ * }
+ if$
+ }
+ if$
+ }
+ if$
+}
+
+FUNCTION {author.key.label}
+{ author empty$
+ { key empty$
+ { cite$ #1 #3 substring$ }
+ 'key
+ if$
+ }
+ { author format.lab.names }
+ if$
+}
+
+FUNCTION {author.editor.key.label}
+{ author empty$
+ { editor empty$
+ { key empty$
+ { cite$ #1 #3 substring$ }
+ 'key
+ if$
+ }
+ { editor format.lab.names }
+ if$
+ }
+ { author format.lab.names }
+ if$
+}
+
+FUNCTION {editor.key.label}
+{ editor empty$
+ { key empty$
+ { cite$ #1 #3 substring$ }
+ 'key
+ if$
+ }
+ { editor format.lab.names }
+ if$
+}
+
+FUNCTION {calc.short.authors}
+{ type$ "book" =
+ type$ "inbook" =
+ or
+ 'author.editor.key.label
+ { type$ "proceedings" =
+ 'editor.key.label
+ 'author.key.label
+ if$
+ }
+ if$
+ 'short.list :=
+}
+
+FUNCTION {calc.label}
+{ calc.short.authors
+ short.list
+ "("
+ *
+ year duplicate$ empty$
+ short.list key field.or.null = or
+ { pop$ "" }
+ 'skip$
+ if$
+ *
+ 'label :=
+}
+
+FUNCTION {sort.format.names}
+{ 's :=
+ #1 'nameptr :=
+ ""
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ { s nameptr
+ "{vv{ } }{ll{ }}{ f{ }}{ jj{ }}"
+ format.name$ 't :=
+ nameptr #1 >
+ {
+ " " *
+ namesleft #1 = t "others" = and
+ { "zzzzz" 't := }
+ 'skip$
+ if$
+ t sortify *
+ }
+ { t sortify * }
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+}
+
+FUNCTION {sort.format.title}
+{ 't :=
+ "A " #2
+ "An " #3
+ "The " #4 t chop.word
+ chop.word
+ chop.word
+ sortify
+ #1 global.max$ substring$
+}
+FUNCTION {author.sort}
+{ author empty$
+ { key empty$
+ { "to sort, need author or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { author sort.format.names }
+ if$
+}
+FUNCTION {author.editor.sort}
+{ author empty$
+ { editor empty$
+ { key empty$
+ { "to sort, need author, editor, or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { editor sort.format.names }
+ if$
+ }
+ { author sort.format.names }
+ if$
+}
+FUNCTION {editor.sort}
+{ editor empty$
+ { key empty$
+ { "to sort, need editor or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { editor sort.format.names }
+ if$
+}
+FUNCTION {presort}
+{ calc.label
+ label sortify
+ " "
+ *
+ type$ "book" =
+ type$ "inbook" =
+ or
+ 'author.editor.sort
+ { type$ "proceedings" =
+ 'editor.sort
+ 'author.sort
+ if$
+ }
+ if$
+ #1 entry.max$ substring$
+ 'sort.label :=
+ sort.label
+ *
+ " "
+ *
+ title field.or.null
+ sort.format.title
+ *
+ #1 entry.max$ substring$
+ 'sort.key$ :=
+}
+
+ITERATE {presort}
+SORT
+STRINGS { last.label next.extra }
+INTEGERS { last.extra.num last.extra.num.extended last.extra.num.blank number.label }
+FUNCTION {initialize.extra.label.stuff}
+{ #0 int.to.chr$ 'last.label :=
+ "" 'next.extra :=
+ #0 'last.extra.num :=
+ "a" chr.to.int$ #1 - 'last.extra.num.blank :=
+ last.extra.num.blank 'last.extra.num.extended :=
+ #0 'number.label :=
+}
+FUNCTION {forward.pass}
+{ last.label label =
+ { last.extra.num #1 + 'last.extra.num :=
+ last.extra.num "z" chr.to.int$ >
+ { "a" chr.to.int$ 'last.extra.num :=
+ last.extra.num.extended #1 + 'last.extra.num.extended :=
+ }
+ 'skip$
+ if$
+ last.extra.num.extended last.extra.num.blank >
+ { last.extra.num.extended int.to.chr$
+ last.extra.num int.to.chr$
+ * 'extra.label := }
+ { last.extra.num int.to.chr$ 'extra.label := }
+ if$
+ }
+ { "a" chr.to.int$ 'last.extra.num :=
+ "" 'extra.label :=
+ label 'last.label :=
+ }
+ if$
+ number.label #1 + 'number.label :=
+}
+FUNCTION {reverse.pass}
+{ next.extra "b" =
+ { "a" 'extra.label := }
+ 'skip$
+ if$
+ extra.label 'next.extra :=
+ extra.label
+ duplicate$ empty$
+ 'skip$
+ { "{\natexlab{" swap$ * "}}" * }
+ if$
+ 'extra.label :=
+ label extra.label * 'label :=
+}
+EXECUTE {initialize.extra.label.stuff}
+ITERATE {forward.pass}
+REVERSE {reverse.pass}
+FUNCTION {bib.sort.order}
+{ sort.label
+ " "
+ *
+ year field.or.null sortify
+ *
+ " "
+ *
+ title field.or.null
+ sort.format.title
+ *
+ #1 entry.max$ substring$
+ 'sort.key$ :=
+}
+ITERATE {bib.sort.order}
+SORT
+FUNCTION {begin.bib}
+{ preamble$ empty$
+ 'skip$
+ { preamble$ write$ newline$ }
+ if$
+ "\begin{thebibliography}{" number.label int.to.str$ * "}" *
+ write$ newline$
+ "\providecommand{\natexlab}[1]{#1}"
+ write$ newline$
+}
+EXECUTE {begin.bib}
+EXECUTE {init.state.consts}
+ITERATE {call.type$}
+FUNCTION {end.bib}
+{ newline$
+ "\end{thebibliography}" write$ newline$
+}
+EXECUTE {end.bib}
+%% End of customized bst file
+%%
+%% End of file `functional_ecol.bst'.
diff --git a/biblio/bibtex/contrib/besjournals/besjournals.dbj b/biblio/bibtex/contrib/besjournals/besjournals.dbj
new file mode 100644
index 0000000000..2d9866342d
--- /dev/null
+++ b/biblio/bibtex/contrib/besjournals/besjournals.dbj
@@ -0,0 +1,661 @@
+%% Driver file to produce functional_ecol.bst from merlin.mbs
+%% Generated with makebst, version 4.1 (2003/09/08)
+%% Produced on 2008/03/18 at 16:04
+%%
+\input docstrip
+
+\preamble
+----------------------------------------
+*** BibTeX style (bst) for Functional Ecology ***
+Created by Og DeSouza <og.souza@ufv.br>
+using custom-bib
+\endpreamble
+
+\postamble
+End of customized bst file
+\endpostamble
+
+\keepsilent
+
+\askforoverwritefalse
+\def\MBopts{\from{merlin.mbs}{%
+%EXTERNAL FILES:
+%Name of language file: \cfile=.
+%Name of included files: \jfile=physjour,geojour,photjour,.mbs.
+ head,\MBopta}
+\from{physjour.mbs}{\MBopta}
+\from{geojour.mbs}{\MBopta}
+\from{photjour.mbs}{\MBopta}
+\from{merlin.mbs}{tail,\MBopta}}
+\def\MBopta{%
+%<<INTERNAL LANGUAGE SUPPORT (if no external language file)
+ %: (def) English words used explicitly
+% babel,%: Babel (words replaced by commands defined in babelbst.tex)
+%------\ans=*(==)-------
+%>>INTERNAL LANGUAGE SUPPORT (if no external language file)
+%<<STYLE OF CITATIONS:
+% %: (def) Numerical as in standard LaTeX
+ ay,%: Author-year with some non-standard interface
+% alph,%: Alpha style, Jon90 or JWB90 for single or multiple authors
+% alph,alf-1,%: Alpha style, Jon90 even for multiple authors
+% alph,alf-f,%: Alpha style, Jones90 (full name of first author)
+% cite,%: Cite key (special for listing contents of bib file)
+%------\ans=a(==ay)-------
+%>>STYLE OF CITATIONS:
+%<<HTML OUTPUT (if non author-year citations)
+% %: (def) Normal LaTeX output
+% html,%: Hypertext output, in HTML code, in paragraphs
+% html,htlist,%: Hypertext list with sequence numbers
+% html,htdes,%: Hypertext with keys for viewing databases
+%------\ans=*(==)-------
+%>>HTML OUTPUT (if non author-year citations)
+%<<AUTHOR--YEAR SUPPORT SYSTEM (if author-year citations)
+ nat,%: Natbib for use with natbib v5.3 or later
+% %: (def) Older Natbib without full authors citations
+% alk,%: Apalike for use with apalike.sty
+% har,%: Harvard system with harvard.sty
+% ast,%: Astronomy system with astron.sty
+% cay,%: Chicago system with chicago.sty
+% nmd,%: Named system with named.sty
+% cn,%: Author-date system with authordate1-4.sty
+%------\ans=*(==nat)-------
+%<<HARVARD EXTENSIONS INCLUDED (if Harvard support selected)
+% harnm,%: With Harvard extensions for LaTeX2e version of harvard.sty
+% %: (def) Older Harvard style, for LaTeX 2.09
+%------\ans=*(==harnm)-------
+%>>HARVARD EXTENSIONS INCLUDED (if Harvard support selected)
+%>>AUTHOR--YEAR SUPPORT SYSTEM (if author-year citations)
+%<<LANGUAGE FIELD
+ %: (def) No language field
+% lang,%: Add language field to switch hyphenation patterns temporarily
+%------\ans=*(==)-------
+%>>LANGUAGE FIELD
+%<<ANNOTATIONS:
+ %: (def) No annotations will be recognized
+% annote,%: Annotations in annote field or in .tex file of citekey name
+%------\ans=*(==)-------
+%>>ANNOTATIONS:
+%<<PRESENTATIONS:
+ %: (def) Do not add presentation type for conference talks
+% pres,%: Add presentation, speaker not highlighted
+% pres,pres-bf,%: Presentation, speaker bold face
+% pres,pres-it,%: Presentaion, speaker italic
+% pres,pres-sc,%: Presentaion, speaker in small caps
+%------\ans=*(==)-------
+%>>PRESENTATIONS:
+%<<ORDERING OF REFERENCES (if non-author/year and non-alph)
+% %: (def) Alphabetical by all authors
+% seq-no,%: Citation order (unsorted, like unsrt.bst)
+% seq-yr,%: Year ordered and then by authors
+% seq-yrr,%: Reverse year ordered and then by authors
+%------\ans=*(==)-------
+%>>ORDERING OF REFERENCES (if non-author/year and non-alph)
+%<<ORDERING OF REFERENCES (if author-year citations)
+ %: (def) Alphabetical by all authors
+% seq-lab,%: By label (Jones before Jones and James before Jones et al)
+% seq-key,%: By label and cite key instead of label and title, as above
+% seq-yr,%: Year ordered and then by authors (for publication lists)
+% seq-yrr,%: Reverse year ordered and then by authors (most recent first)
+% seq-no,%: Citation order (unsorted, only meaningful for numericals)
+%------\ans=*(==)-------
+%>>ORDERING OF REFERENCES (if author-year citations)
+%<<ORDER ON VON PART (if not citation order)
+ %: (def) Sort on von part (de la Maire before Defoe)
+% vonx,%: Sort without von part (de la Maire after Mahone)
+%------\ans=*(==)-------
+%>>ORDER ON VON PART (if not citation order)
+%<<AUTHOR NAMES:
+% ed-au,%: Full, surname last (John Frederick Smith)
+% nm-revf,%: Full, surname first (Smith, John Frederick)
+% nm-init,ed-au,%: Initials + surname (J. F. Smith)
+% nm-rev,%: Surname + initials (Smith, J. F.)
+% nm-rv,%: Surname + dotless initials (Smith J F)
+ nm-rvvc,%: Surname + comma + spaceless initials (Smith, J.F.)
+% nm-rvx,%: Surname + pure initials (Smith JF)
+% nm-rvcx,%: Surname + comma + pure initials (Smith, JF)
+% nm-rvv,%: Surname + spaceless initials (Smith J.F.)
+% nm-rev1,%: Only first name reversed, initials (AGU style: Smith, J. F., H. K. Jones)
+% nm-revv1,%: First name reversed, with full names (Smith, John Fred, Harry Kab Jones)
+%------\ans=w(==nm-rvvc)-------
+%>>AUTHOR NAMES:
+%<<EDITOR NAMES IN COLLECTIONS (if author names reversed)
+% ed-rev,%: Editor names reversed just like authors'
+%------\ans=r(==ed-rev)-------
+%<<POSITION OF JUNIOR (if author names reversed)
+% jnrlst,%: Junior comes last as Smith, John, Jr.
+% %: (def) Junior between as Smith, Jr., John
+%------\ans=*(==jnrlst)-------
+%>>POSITION OF JUNIOR (if author names reversed)
+%>>EDITOR NAMES IN COLLECTIONS (if author names reversed)
+%<<JUNIOR PART IN THE CITATION (if author-year citations)
+% %: (def) No `junior' part in the citations but in the ref listing
+ jnrlab,%: `Junior' in citations as well as in ref listing
+%------\ans=j(==jnrlab)-------
+%>>JUNIOR PART IN THE CITATION (if author-year citations)
+%<<PUNCTUATION BETWEEN AUTHOR NAMES:
+ %: (def) Author names separated by commas
+% aunm-semi,%: Names separated by semi-colon
+% aunm-sl,%: Names separated by slash /
+%------\ans=*(==)-------
+%>>PUNCTUATION BETWEEN AUTHOR NAMES:
+%<<ADJACENT REFERENCES WITH REPEATED NAMES:
+ %: (def) Author/editor names always present
+% nmdash,%: Repeated author/editor names replaced by dash
+% nmdash,nmd-2,%: Repeated author/editor names replaced by 2 dashes
+% nmdash,nmd-3,%: Repeated author/editor names replaced by 3 dashes
+%------\ans=*(==)-------
+%>>ADJACENT REFERENCES WITH REPEATED NAMES:
+%<<NUMBER OF AUTHORS IN BIBLIOGRAPHY:
+ %: (def) All authors included in listing
+% nmlm,%: Limited authors (et al replaces missing names)
+%------\ans=*(==)-------
+%>>NUMBER OF AUTHORS IN BIBLIOGRAPHY:
+%<<AUTHORS IN CITATIONS:
+ %: (def) One author et al for three or more authors
+% mcite,%: Some other truncation scheme
+%------\ans=*(==)-------
+%>>AUTHORS IN CITATIONS:
+%<<MAX AUTHORS BEFORE ET AL: (if regular cite not selected)
+% mct-1,%: One et al
+% mct-2,%: One, Two et al
+% mct-3,%: One, Two, Three et al
+% mct-4,%: One, Two, Three, Four et al
+% mct-5,%: One, Two, Three, Four, Five et al
+%------\ans=*(==mct-1)-------
+%>>MAX AUTHORS BEFORE ET AL: (if regular cite not selected)
+%<<MAX AUTHORS WITHOUT ET AL: (if regular cite not selected)
+% mct-x2,%: Two authors without truncating
+% mct-x3,%: Three authors without truncating
+% mct-x4,%: Four authors without truncating
+% mct-x5,%: Five authors without truncating
+%------\ans=*(==mct-x2)-------
+%>>MAX AUTHORS WITHOUT ET AL: (if regular cite not selected)
+%<<TYPEFACE FOR AUTHORS IN LIST OF REFERENCES:
+ %: (def) Normal font for author names
+% nmft,nmft-sc,%: Small caps authors (\sc)
+% nmft,nmft-it,%: Italic authors (\it or \em)
+% nmft,nmft-bf,%: Bold authors (\bf)
+% nmft,nmft-def,%: User defined author font (\bibnamefont)
+%------\ans=*(==)-------
+%>>TYPEFACE FOR AUTHORS IN LIST OF REFERENCES:
+%<<FONT FOR FIRST NAMES (if non-default font for authors)
+% %: (def) First names same font as surnames
+% fnm-rm,%: First names in normal font
+% fnm-def,%: First names in user defined font (\bibfnamefont)
+%------\ans=*(==)-------
+%<<EDITOR NAMES IN INCOLLECTION ETC:
+% %: (def) Editors incollection normal font
+% nmfted,%: Editors incollection like authors font
+%------\ans=*(==)-------
+%>>EDITOR NAMES IN INCOLLECTION ETC:
+%<<FONT FOR `AND' IN LIST:
+% %: (def) `And' in author font (JONES AND JAMES)
+% nmand-rm,%: `And' in normal font (JONES and JAMES)
+%------\ans=*(==)-------
+%>>FONT FOR `AND' IN LIST:
+%>>FONT FOR FIRST NAMES (if non-default font for authors)
+%<<FONT OF CITATION LABELS IN TEXT (if author-year citations)
+ %: (def) Cited authors plain as result of \cite command
+% lab,lab-it,%: Cited authors italic
+% lab,lab-sc,%: Cited authors small caps
+% lab,lab-bf,%: Cited authors bold
+% lab,lab-def,%: User defined citation font (\citenamefont)
+%------\ans=*(==)-------
+%<<FONT FOR `AND' IN CITATIONS (if non-default font for citation lables)
+% %: (def) Cited `and' in author font
+% and-rm,%: Cited `and' in normal font
+%------\ans=*(==)-------
+%>>FONT FOR `AND' IN CITATIONS (if non-default font for citation lables)
+%<<FONT OF EXTRA LABEL (The extra letter on the year)
+ %: (def) Extra label plain
+% xlab-it,%: Extra label italic
+%------\ans=*(==)-------
+%>>FONT OF EXTRA LABEL (The extra letter on the year)
+%>>FONT OF CITATION LABELS IN TEXT (if author-year citations)
+%<<LABEL WHEN AUTHORS MISSING (if author-year citations)
+ keyxyr,%: Year blank when KEY replaces missing author (for natbib 7.0)
+% %: (def) Year included when KEY replaces missing author
+%------\ans=*(==keyxyr)-------
+%>>LABEL WHEN AUTHORS MISSING (if author-year citations)
+%<<MISSING DATE (if author-year citations)
+ %: (def) Missing date set to ???? in label and text
+% blkyear,%: Missing date left blank
+%------\ans=*(==)-------
+%>>MISSING DATE (if author-year citations)
+%<<DATE POSITION:
+% %: (def) Date at end
+ dt-beg,%: Date after authors
+% dt-jnl,%: Date part of journal spec. (as 1994;45:34-40) else at end
+% dt-end,%: Date at very end after any notes
+%------\ans=b(==dt-beg)-------
+%>>DATE POSITION:
+%<<DATE FORMAT (if non author-year citations)
+% %: (def) Plain month and year without any brackets
+% yr-par,%: Date in parentheses as (May 1993)
+% yr-brk,%: Date in brackets as [May 1993]
+% yr-col,%: Date preceded by colon as `: May 1993'
+% yr-per,%: Date preceded by period as `. May 1993'
+% yr-com,%: Date preceded by comma as `, May 1993'
+% yr-blk,%: Date preceded by space only, as ` May 1993'
+%------\ans=*(==)-------
+%<<SUPPRESS MONTH:
+% %: (def) Date is month and year
+% xmth,%: Date is year only
+%------\ans=*(==)-------
+%>>SUPPRESS MONTH:
+%<<REVERSED DATE (if including month)
+% %: (def) Date as month year
+% dtrev,%: Date as year month
+%------\ans=*(==)-------
+%>>REVERSED DATE (if including month)
+%>>DATE FORMAT (if non author-year citations)
+%<<DATE FORMAT (if author-year citations)
+% %: (def) Year plain without any brackets
+ yr-par,%: Year in parentheses as (1993)
+% yr-brk,%: Year in brackets as [1993]
+% yr-col,%: Year preceded by colon as `: 1993'
+% yr-per,%: Year preceded by period as `. 1993'
+% yr-com,%: Date preceded by comma as `, 1993'
+% yr-blk,%: Year preceded by space only, as ` 1993'
+%------\ans=p(==yr-par)-------
+%<<INCLUDE MONTHS:
+ %: (def) Date is year only without the month
+% aymth,%: Include month in date
+%------\ans=*(==)-------
+%>>INCLUDE MONTHS:
+%<<REVERSED DATE (if including month)
+% %: (def) Date as month year
+% dtrev,%: Date as year month
+%------\ans=*(==)-------
+%>>REVERSED DATE (if including month)
+%>>DATE FORMAT (if author-year citations)
+%<<DATE PUNCTUATION (if date not at end)
+% %: (def) Date with standard block punctuation (comma or period)
+% yrp-col,%: Colon after date as 1994:
+% yrp-semi,%: Semi-colon after date as 1994;
+% yrp-per,%: Period after date even when blocks use commas
+ yrp-x,%: No punct. after date
+%------\ans=x(==yrp-x)-------
+%<<BLANK AFTER DATE:
+ %: (def) Space after date and punctuation
+% yrpp-xsp,%: No space after date as 1994:45
+%------\ans=*(==)-------
+%>>BLANK AFTER DATE:
+%>>DATE PUNCTUATION (if date not at end)
+%<<DATE FONT:
+ %: (def) Date in normal font
+% dtbf,%: Date in bold face
+%------\ans=*(==)-------
+%>>DATE FONT:
+%<<TRUNCATE YEAR (if author-year citations)
+ note-yr,%: Year text full as 1990--1993 or `in press'
+% %: (def) Year truncated to last 4 digits
+%------\ans=*(==note-yr)-------
+%>>TRUNCATE YEAR (if author-year citations)
+%<<TITLE OF ARTICLE:
+ %: (def) Title plain with no special font
+% tit-it,%: Title italic (\em)
+% tit-qq,qt-s,%: Title and punctuation in single quotes (`Title,' ..)
+% tit-qq,%: Title and punctuation in double quotes (``Title,'' ..)
+% tit-qq,qt-g,%: Title and punctuation in guillemets (<<Title,>> ..)
+% tit-qq,qt-s,qx,%: Title in single quotes (`Title', ..)
+% tit-qq,qx,%: Title in double quotes (``Title'', ..)
+% tit-qq,qt-g,qx,%: Title in guillemets (<<Title>>, ..)
+%------\ans=*(==)-------
+%>>TITLE OF ARTICLE:
+%<<COLLECTION/PROCEEDINGS TITLES (if quoted title)
+% bt-qq,%: Quote collection and proceedings titles too
+% %: (def) Collection and proceedings titles not in quotes
+%------\ans=*(==bt-qq)-------
+%>>COLLECTION/PROCEEDINGS TITLES (if quoted title)
+%<<CAPITALIZATION OF ARTICLE TITLE:
+ %: (def) Sentence style (capitalize first word and those in braces)
+% atit-u,%: Title style (just as in bib entry)
+%------\ans=*(==)-------
+%>>CAPITALIZATION OF ARTICLE TITLE:
+%<<ARTICLE TITLE PRESENT:
+ %: (def) Article title present in journals and proceedings
+% jtit-x,%: No article title
+%------\ans=*(==)-------
+%>>ARTICLE TITLE PRESENT:
+%<<JOURNAL NAMES:
+ %: (def) Periods in journal names are retained, as `Phys. Rev.'
+% jxper,%: Dotless journal names as `Phys Rev'
+%------\ans=*(==)-------
+%>>JOURNAL NAMES:
+%<<JOURNAL NAME FONT:
+ %: (def) Journal name italics
+% jttl-rm,%: Journal name normal font
+%------\ans=*(==)-------
+%>>JOURNAL NAME FONT:
+%<<THESIS TITLE:
+ %: (def) Thesis titles like books
+% thtit-a,%: Thesis title like article
+% thtit-x,%: No thesis title
+%------\ans=*(==)-------
+%>>THESIS TITLE:
+%<<TECHNICAL REPORT TITLE:
+ %: (def) Tech. report title like articles
+% trtit-b,%: Tech. report title like books
+%------\ans=*(==)-------
+%>>TECHNICAL REPORT TITLE:
+%<<TECHNICAL REPORT NUMBER:
+ %: (def) Tech. report and number plain as `Tech. Rep. 123'
+% trnum-it,%: Tech. report and number italic as `{\it Tech. Rep. 123'}
+%------\ans=*(==)-------
+%>>TECHNICAL REPORT NUMBER:
+%<<JOURNAL VOLUME:
+% %: (def) Volume plain as vol(num)
+% vol-it,%: Volume italic as {\em vol}(num)
+ vol-bf,%: Volume bold as {\bf vol}(num)
+% vol-2bf,%: Volume and number bold as {\bf vol(num)}
+%------\ans=b(==vol-bf)-------
+%>>JOURNAL VOLUME:
+%<<JOURNAL VOL AND NUMBER:
+% %: (def) Journal vol(num) as 34(2)
+% vnum-sp,%: Journal vol (num) as 34 (2)
+% vnum-cm,%: Journal vol, num as 34, 2
+% vnum-nr,%: Journal vol, no. num as 34, no. 2
+% vnum-h,%: Journal vol, \# number as 34, \#2
+% vnum-b,%: Journal vol number as 34 2
+ vnum-x,%: Journal vol, without number as 34
+%------\ans=x(==vnum-x)-------
+%>>JOURNAL VOL AND NUMBER:
+%<<VOLUME PUNCTUATION:
+% %: (def) Volume with colon as vol(num):ppp
+% volp-sp,%: Volume with colon and space as vol(num): ppp
+% volp-semi,%: Volume with semi-colon as vol(num); ppp
+ volp-com,%: Volume with comma as vol(num), ppp
+% volp-blk,%: Volume with blank as vol(num) ppp
+%------\ans=c(==volp-com)-------
+%>>VOLUME PUNCTUATION:
+%<<YEAR IN JOURNAL SPECIFICATION:
+ %: (def) Journal year like others as given by date position
+% jdt-v,%: Journal vol(year) as 34(1995)
+% jdt-vs,%: Journal vol (year) as 34 (1995)
+% jdt-p,%: Year with pages as 34(2), (1995) 1345--1387
+% jdt-pc,%: Year, comma, pages as 34(2), (1995), 1345--1387
+%------\ans=*(==)-------
+%>>YEAR IN JOURNAL SPECIFICATION:
+%<<PAGE NUMBERS:
+ %: (def) Start and stop page numbers given
+% jpg-1,%: Only start page number
+%------\ans=*(==)-------
+%>>PAGE NUMBERS:
+%<<LARGE PAGE NUMBERS:
+ %: (def) No separators for large page numbers
+% pgsep-c,%: Comma inserted over 9999 as 11,234
+% pgsep-s,%: Thin space inserted over 9999 as 11 234
+% pgsep-p,%: Period inserted over 9999 as 11.234
+%------\ans=*(==)-------
+%>>LARGE PAGE NUMBERS:
+%<<WORD `PAGE' IN ARTICLES:
+ %: (def) Article pages numbers only as 234-256
+% jwdpg,%: Include `page' in articles as pp. 234--256
+%------\ans=*(==)-------
+%>>WORD `PAGE' IN ARTICLES:
+%<<POSITION OF PAGES:
+ %: (def) Pages given mid text as is normal
+% pp-last,%: Pages at end but before any notes
+%------\ans=*(==)-------
+%>>POSITION OF PAGES:
+%<<WORD `VOLUME' IN ARTICLES:
+ %: (def) Article volume as number only as 21
+% jwdvol,%: Include `volume' in articles as vol. 21
+%------\ans=*(==)-------
+%>>WORD `VOLUME' IN ARTICLES:
+%<<NUMBER AND SERIES FOR COLLECTIONS:
+ num-xser,%: Allows number without series and suppresses word "number"
+% %: (def) Standard BibTeX as: "number 123 in Total Works"; error if number and no series
+%------\ans=*(==num-xser)-------
+%>>NUMBER AND SERIES FOR COLLECTIONS:
+%<<POSITION OF NUMBER AND SERIES:
+ %: (def) After chapter and pages as in standard BibTeX
+% numser,%: Just before publisher or organization
+%------\ans=*(==)-------
+%>>POSITION OF NUMBER AND SERIES:
+%<<VOLUME AND SERIES FOR BOOKS/COLLECTIONS:
+ %: (def) Vol. 23 of Series as in standard BibTeX
+% ser-vol,%: Series, vol. 23
+%------\ans=*(==)-------
+%>>VOLUME AND SERIES FOR BOOKS/COLLECTIONS:
+%<<POSITION OF VOLUME AND SERIES FOR INCOLLECTIONS:
+ %: (def) Series and volume after the editors
+% ser-ed,%: Series and volume after booktitle and before editors
+%------\ans=*(==)-------
+%>>POSITION OF VOLUME AND SERIES FOR INCOLLECTIONS:
+%<<JOURNAL NAME PUNCTUATION:
+% %: (def) Comma after journal name
+ jnm-x,%: Space after journal name
+%------\ans=x(==jnm-x)-------
+%>>JOURNAL NAME PUNCTUATION:
+%<<BOOK TITLE:
+ %: (def) Book title italic (\em)
+% btit-rm,bt-rm,%: Book title plain (no font command)
+%------\ans=*(==)-------
+%>>BOOK TITLE:
+%<<PAGES IN BOOKS:
+ %: (def) Pages in book plain as pp. 50-55
+% bkpg-par,%: Pages in book in parentheses as (pp. 50-55)
+% bkpg-x,%: Pages in book bare as 50-55
+%------\ans=*(==)-------
+%>>PAGES IN BOOKS:
+%<<TOTAL PAGES OF A BOOK:
+ %: (def) Total book pages not printed
+% pg-bk,%: For book: 345 pages or pp.
+% pg-bk,pg-pre,%: Total book pages before publisher
+%------\ans=*(==)-------
+%>>TOTAL PAGES OF A BOOK:
+%<<PUBLISHER ADDRESS:
+ %: (def) Publisher, address as Harcourt, New York
+% add-pub,%: Address: Publisher as New York: Harcourt
+%------\ans=*(==)-------
+%>>PUBLISHER ADDRESS:
+%<<PUBLISHER IN PARENTHESES:
+ %: (def) Publisher as normal block without parentheses
+% pub-par,%: Publisher in parentheses
+% pub-date,%: Publisher and date in parentheses (Oxford, 1994)
+% pub-date,pub-xc,%: Publisher and date in parentheses, no comma (Oxford 1994)
+% pub-date,pub-xpar,%: Publisher and date without parentheses Oxford, 1994
+% pub-date,pub-xpar,pub-xc,%: Publisher and date, no parentheses, no comma Oxford 1994
+%------\ans=*(==)-------
+%>>PUBLISHER IN PARENTHESES:
+%<<PUBLISHER POSITION:
+ %: (def) Publisher after chapter, pages
+% pre-pub,%: Publisher before chapter, pages
+% pre-edn,%: Publisher after edition
+%------\ans=*(==)-------
+%>>PUBLISHER POSITION:
+%<<ISBN NUMBER:
+% isbn,%: Include ISBN for books, booklets, etc.
+ %: (def) No ISBN
+%------\ans=x(==)-------
+%>>ISBN NUMBER:
+%<<ISSN NUMBER:
+% issn,%: Include ISSN for periodicals
+ %: (def) No ISSN
+%------\ans=x(==)-------
+%>>ISSN NUMBER:
+%<<DOI NUMBER:
+% doi,%: Include DOI as "doi: number"
+% agu-doi,doi,%: Insert DOI AGU style as part of page number
+ %: (def) No DOI
+%------\ans=x(==)-------
+%>>DOI NUMBER:
+%<<`EDITOR' AFTER NAMES (EDITED BOOKS WITHOUT AUTHORS):
+% %: (def) Word `editor' after name
+ edpar,%: `Name (editor),' in parentheses, after name, comma after
+% edpar,bkedcap,%: `Name (Editor),' as above, editor upper case
+% edparc,%: `Name, (editor)' in parentheses, after name, comma between
+% edparc,bkedcap,%: `Name, (Editor)' as above, editor upper case
+% edparxc,%: `Name (editor)' in parentheses, after name, no commas
+% edparxc,bkedcap,%: `Name (Editor)' as above, editor upper case
+%------\ans=a(==edpar)-------
+%>>`EDITOR' AFTER NAMES (EDITED BOOKS WITHOUT AUTHORS):
+%<<EDITOR IN COLLECTIONS:
+% %: (def) Same as for edited book (names before booktitle)
+% edby,%: In booktitle, edited by .. (where .. is names)
+% edby-par,%: In booktitle (edited by ..)
+% edby-parc,%: In booktitle, (edited by ..)
+% edby,edbyx,%: In booktitle, editor ..
+% edby,edbyw,%: In booktitle, (editor) ..
+ edby-par,edbyx,%: In booktitle (editor..)
+% edby-parc,edbyx,%: In booktitle, (editor..)
+% edby,edbyy,%: In booktitle, .., editor
+% edby-par,edbyy,%: In booktitle (.., editor)
+%------\ans=k(==edby-par,edbyx)-------
+%>>EDITOR IN COLLECTIONS:
+%<<CAPITALIZE `EDITOR' OR `EDITED BY' (if editor capitalizable)
+ %: (def) `(editor,..)' or `(edited by..)' in lower case
+% edcap,%: `(Editor,..)' or `(Edited by..)' in upper case
+%------\ans=*(==)-------
+%>>CAPITALIZE `EDITOR' OR `EDITED BY' (if editor capitalizable)
+%<<PUNCTUATION BETWEEN SECTIONS (BLOCKS):
+% %: (def) \newblock after blocks (periods or new lines with openbib option)
+% blk-com,%: Comma between blocks
+% blk-com,com-semi,%: Semi-colon between blocks
+% blk-com,com-blank,%: Blanks between blocks
+ blk-tit,%: Period after titles of articles, books, etc else commas
+% blk-tit,tit-col,%: Colon after titles of articles, books, etc else commas
+% blk-tita,%: Period after titles of articles else commas
+% blk-tita,tit-col,%: Colon after titles of articles else commas
+%------\ans=t(==blk-tit)-------
+%>>PUNCTUATION BETWEEN SECTIONS (BLOCKS):
+%<<PUNCTUATION BEFORE NOTES (if not using \newblock)
+ %: (def) Notes have regular punctuation like all other blocks
+% blknt,%: Notes preceded by period
+%------\ans=*(==)-------
+%>>PUNCTUATION BEFORE NOTES (if not using \newblock)
+%<<PUNCTUATION AFTER AUTHORS:
+ %: (def) Author block normal with regular block punctuation
+% au-col,%: Author block with colon
+%------\ans=*(==)-------
+%>>PUNCTUATION AFTER AUTHORS:
+%<<PUNCTUATION AFTER `IN':
+% %: (def) Space after `in' for incollection or inproceedings
+% in-col,%: Colon after `in' (as `In: ...')
+% in-it,%: Italic `in' and space
+% in-col,in-it,%: Italic `in' and colon
+ in-x,%: No word `in' for edited works
+%------\ans=x(==in-x)-------
+%>>PUNCTUATION AFTER `IN':
+%<<`IN' WITH JOURNAL NAMES (if using 'in' with collections)
+% %: (def) No `in' before journal name
+% injnl,%: Add `in' before journal name in style for incollection
+%------\ans=*(==)-------
+%>>`IN' WITH JOURNAL NAMES (if using 'in' with collections)
+%<<FINAL PUNCTUATION:
+ %: (def) Period at very end of the listed reference
+% fin-bare,%: No period at end
+%------\ans=*(==)-------
+%>>FINAL PUNCTUATION:
+%<<ABBREVIATE WORD `PAGES' (if not using external language file)
+% %: (def) `Page(s)' (no abbreviation)
+ pp,%: `Page' abbreviated as p. or pp.
+% ppx,%: `Page' omitted
+%------\ans=a(==pp)-------
+%<<ABBREVIATE WORD `EDITORS':
+% %: (def) `Editor(s)' (no abbreviation)
+ ed,%: `Editor' abbreviated as ed. or eds.
+%------\ans=a(==ed)-------
+%>>ABBREVIATE WORD `EDITORS':
+%<<OTHER ABBREVIATIONS:
+% %: (def) No abbreviations of volume, edition, chapter, etc
+ abr,%: Abbreviations of such words
+%------\ans=a(==abr)-------
+%>>OTHER ABBREVIATIONS:
+%<<ABBREVIATION FOR `EDITION' (if abbreviating words)
+ %: (def) `Edition' abbreviated as `edn'
+% ednx,%: `Edition' abbreviated as `ed'
+%------\ans=*(==)-------
+%<<MONTHS WITH DOTS:
+ %: (def) Months with dots as Jan.
+% mth-bare,%: Months without dots as Feb Mar
+%------\ans=*(==)-------
+%>>MONTHS WITH DOTS:
+%>>ABBREVIATION FOR `EDITION' (if abbreviating words)
+%<<EDITION NUMBERS:
+ xedn,%: Editions as in database saving much processing memory
+% %: (def) Write out editions as first, second, third, etc
+% ord,%: Numerical editions as 1st, 2nd, 3rd, etc
+%------\ans=*(==xedn)-------
+%>>EDITION NUMBERS:
+%>>ABBREVIATE WORD `PAGES' (if not using external language file)
+%Reading external language file \cfile=
+%<<STORED JOURNAL NAMES:
+ %: (def) Full journal names for prestored journals
+% jabr,%: Abbreviated journal names
+% jabr,jaa,%: Abbreviated with astronomy shorthands like ApJ and AJ
+%------\ans=*(==)-------
+%>>STORED JOURNAL NAMES:
+%<<AMPERSAND:
+% %: (def) Use word `and' in author lists
+ amper,%: Use ampersand in place of `and'
+% varand,%: Use \BIBand in place of `and'
+%------\ans=a(==amper)-------
+%>>AMPERSAND:
+%<<COMMA BEFORE `AND':
+% %: (def) Comma before `and' as `Tom, Dick, and Harry'
+ and-xcom,%: No comma before `and' as `Tom, Dick and Harry'
+% and-com,%: Comma even with 2 authors as `Tom, and Harry'
+%------\ans=n(==and-xcom)-------
+%>>COMMA BEFORE `AND':
+%<<COMMA BEFORE `AND' EVEN FOR COLLECTION EDITORS (if using comma before `and' with authors)
+% and-com-ed,%: Comma with 2 editors in collections
+% %: (def) Two editors without comma as `Tom and Harry'
+%------\ans=*(==and-com-ed)-------
+%>>COMMA BEFORE `AND' EVEN FOR COLLECTION EDITORS (if using comma before `and' with authors)
+%<<NO `AND' IN REFERENCE LIST:
+ %: (def) With `and' before last author in reference list
+% xand,%: No `and' as `Tom, Dick, Harry'
+%------\ans=*(==)-------
+%>>NO `AND' IN REFERENCE LIST:
+%<<COMMA BEFORE `ET AL':
+% %: (def) Comma before `et al' in reference list
+ etal-xc,%: No comma before `et al'
+%------\ans=x(==etal-xc)-------
+%>>COMMA BEFORE `ET AL':
+%<<FONT OF `ET AL':
+% %: (def) Plain et al
+ etal-it,%: Italic et al
+% etal-rm,%: Roman et al even when authors something else
+%------\ans=i(==etal-it)-------
+%>>FONT OF `ET AL':
+%<<ADDITIONAL REVTeX DATA FIELDS:
+ %: (def) No additional fields for REVTeX
+% revdata,eprint,url,url-blk,%: Include REVTeX data fields collaboration, eid, eprint, archive, numpages, url
+%------\ans=*(==)-------
+%<<E-PRINT DATA FIELD: (without REVTeX fields)
+ %: (def) Do not include eprint field
+% eprint,%: Include eprint and archive fields for electronic publications
+%------\ans=*(==)-------
+%>>E-PRINT DATA FIELD: (without REVTeX fields)
+%<<URL ADDRESS: (without REVTeX fields)
+ %: (def) No URL for electronic (Internet) documents
+% url,url-blk,%: Include URL as regular item block
+% url,url-nt,%: URL as note
+% url,url-nl,%: URL on new line after rest of reference
+%------\ans=u(==url,url-blk)-------
+%>>URL ADDRESS: (without REVTeX fields)
+%>>ADDITIONAL REVTeX DATA FIELDS:
+%<<REFERENCE COMPONENT TAGS:
+ %: (def) No reference component tags in the \bibitem entries
+% bibinfo,%: Reference component tags like \bibinfo in the content of \bibitem
+%------\ans=*(==)-------
+%>>REFERENCE COMPONENT TAGS:
+%<<EMPHASIS: (affects all so-called italics)
+ %: (def) Use emphasis ie, \em, allows font switching
+% em-it,%: Use true italics ie, \it, absolute italics
+% em-x,%: No italics at all
+% em-ul,%: Underlining in place of italics, best with ulem package
+%------\ans=*(==)-------
+%>>EMPHASIS: (affects all so-called italics)
+%<<COMPATIBILITY WITH PLAIN TEX:
+ nfss,%: Use LaTeX commands which may not work with Plain TeX
+% plntx,%: Use only Plain TeX commands for fonts and testing
+%------\ans=*(==nfss)-------
+%>>COMPATIBILITY WITH PLAIN TEX:
+,{%
+ }}
+\generate{\file{functional_ecol.bst}{\MBopts}}
+\endbatchfile
diff --git a/biblio/bibtex/contrib/bestpapers/Makefile b/biblio/bibtex/contrib/bestpapers/Makefile
new file mode 100644
index 0000000000..23f39b480d
--- /dev/null
+++ b/biblio/bibtex/contrib/bestpapers/Makefile
@@ -0,0 +1,35 @@
+PACKAGE = bestpapers
+
+TEX = bestpapers-guide.tex
+
+PDF = ${TEX:%.tex=%.pdf}
+
+all: ${PDF}
+
+%.pdf: %.tex bestpapers.bst tex.bib
+ pdflatex $*
+ - bibtex tex
+ - bibtex typography
+ pdflatex $*
+ pdflatex $*
+ while ( grep -q 'may have changed' $*.log) \
+ do pdflatex $<; done
+
+clean:
+ $(RM) *.log *.aux \
+ *.cfg *.glo *.idx *.toc \
+ *.ilg *.ind *.out *.lof \
+ *.lot *.bbl *.blg *.gls \
+ *.dvi *.ps *.thm *.tgz *.zip
+
+distclean: clean
+ $(RM) $(PDF)
+
+archive: all clean
+ cd ..; \
+ tar -czvf $(PACKAGE)/$(PACKAGE).tgz --exclude '*~' --exclude '*.tgz' --exclude '*.zip' --exclude CVS $(PACKAGE); \
+ cd $(PACKAGE)
+
+zip: all clean
+ cd ..; $(RM) $(PACKAGE).zip; \
+ zip -r $(PACKAGE).zip $(PACKAGE)/* -x '*~' -x '*.tgz' -x '*.zip' -x '*CVS*' \ No newline at end of file
diff --git a/biblio/bibtex/contrib/bestpapers/README b/biblio/bibtex/contrib/bestpapers/README
new file mode 100644
index 0000000000..683da6adcc
--- /dev/null
+++ b/biblio/bibtex/contrib/bestpapers/README
@@ -0,0 +1,16 @@
+ Bestpapers bibliography style
+ Boris Veytsman
+ Version 1.0
+
+Many people preparing their resumes find the requirement ``please list
+five (or six, or ten) papers authored by you''. The same requirement
+is often stated for reports prepared by professional teams. The
+creation of such lists may be a cumbersome task. Even more difficult
+is to support the lists over the time, when one adds new papers. The
+style bestpapers.bst is intended to make this task simpler. It is
+based on the idea that it is easier to score than to sort: we can
+assign a score to a paper, and then let the computer to select the
+papers with highest scores.
+
+This work was commissioned by Consumer Financial Protection Bureau,
+United States Treasury. This package is in the public domain
diff --git a/biblio/bibtex/contrib/bestpapers/bestpapers-export.bst b/biblio/bibtex/contrib/bestpapers/bestpapers-export.bst
new file mode 100644
index 0000000000..ce8097777e
--- /dev/null
+++ b/biblio/bibtex/contrib/bestpapers/bestpapers-export.bst
@@ -0,0 +1,535 @@
+%% besstpapers-export.bst
+%%
+%% This file is in the public domain, see
+%% https://creativecommons.org/publicdomain/zero/1.0/legalcode
+%%
+%%
+%% Based on export.bst
+%%
+%% EXPORT.BST COPYRIGHT STATEMENT
+%% [Not applicable here since the name is changed but preserved
+%% for completeness]
+%%
+%% This is file `export.bst',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% bibexport.dtx (with options: `export')
+%%
+%% (c) 2011/11/28 Nicolas Markey <markey at lsv dot ens-cachan dot fr>
+%%
+%% This work may be distributed and/or modified under the conditions of
+%% the LaTeX Project Public License, either version 1.3 of this license
+%% or (at your option) any later version. The latest version of this
+%% license is in
+%%
+%% http://www.latex-project.org/lppl.txt
+%%
+%% and version 1.3 or later is part of all distributions of LaTeX version
+%% 2005/12/01 or later.
+%%
+%% This work has the LPPL maintenance status `maintained'.
+%% The Current Maintainer of this work is Nicolas Markey.
+%%
+%% END EXPORT.BST COPYRIGHT STATEMENT
+%%
+%% \CharacterTable
+%% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z
+%% Lower-case \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z
+%% Digits \0\1\2\3\4\5\6\7\8\9
+%% Exclamation \! Double quote \" Hash (number) \#
+%% Dollar \$ Percent \% Ampersand \&
+%% Acute accent \' Left paren \( Right paren \)
+%% Asterisk \* Plus \+ Comma \,
+%% Minus \- Point \. Solidus \/
+%% Colon \: Semicolon \; Less than \<
+%% Equals \= Greater than \> Question mark \?
+%% Commercial at \@ Left bracket \[ Backslash \\
+%% Right bracket \] Circumflex \^ Underscore \_
+%% Grave accent \` Left brace \{ Vertical bar \|
+%% Right brace \} Tilde \~}
+%%
+FUNCTION{left.width}{#18}
+FUNCTION{right.width}{#55}
+FUNCTION{url.right.width}{#61}
+FUNCTION{left.short.width}{#10} %% for @preamble
+FUNCTION{right.long.width}{#63}
+FUNCTION{left.delim}{"{"}
+FUNCTION{right.delim}{"}"}
+ENTRY{
+ address
+ author
+ booktitle
+ chapter
+ edition
+ editor
+ howpublished
+ institution
+ journal
+ key
+ month
+ note
+ number
+ organization
+ pages
+ publisher
+ school
+ series
+ title
+ type
+ volume
+ year
+ abstract
+ doi
+ eid
+ isbn
+ issn
+ language
+ url
+ score
+ max.best.papers
+}{}{}
+FUNCTION{not}
+{
+ {#0}
+ {#1}
+ if$
+}
+FUNCTION{and}
+{
+ 'skip$
+ {pop$ #0}
+ if$
+}
+FUNCTION{or}
+{
+ {pop$ #1}
+ 'skip$
+ if$
+}
+
+INTEGERS{left.length right.length}
+STRINGS{ s t }
+STRINGS { final.max.best.papers }
+INTEGERS {num.seq printed.all }
+
+FUNCTION{space.complete}
+{
+ 'left.length :=
+ duplicate$ text.length$ left.length swap$ -
+ {duplicate$ #0 >}
+ {
+ swap$ " " * swap$ #1 -
+ }
+ while$
+ pop$
+}
+FUNCTION{split.string}
+{
+ 'right.length :=
+ duplicate$ right.length #1 + #1 substring$ "" =
+ {""}
+ {
+ 's :=
+ right.length
+ {duplicate$ duplicate$ s swap$ #1 substring$ " " = not and}
+ {#1 -}
+ while$
+ duplicate$ #2 <
+ {
+ pop$ " " s * ""
+ }
+ {
+ duplicate$ s swap$ #1 swap$ substring$
+ swap$
+ s swap$ global.max$ substring$
+ }
+ if$
+ }
+ if$
+}
+FUNCTION{split.url}
+{
+ 'right.length :=
+ duplicate$ right.length #1 + #1 substring$ "" =
+ {""}
+ {
+ 's :=
+ right.length
+ {duplicate$ duplicate$ s swap$ #1 substring$ "/" = not and}
+ {#1 -}
+ while$
+ duplicate$ #2 <
+ {
+ pop$ " " s * ""
+ }
+ {
+ duplicate$ s swap$ #1 swap$ substring$
+ swap$ #1 +
+ s swap$ global.max$ substring$
+ }
+ if$
+ }
+ if$
+}
+FUNCTION{split.name}
+{
+ 'right.length :=
+ duplicate$ right.length #1 + #1 substring$ "" =
+ {""}
+ {
+ 's :=
+ right.length
+ {duplicate$ duplicate$ s swap$ #5 substring$ " and " = not and}
+ {#1 -}
+ while$
+ duplicate$ #2 <
+ {
+ pop$ " " s * ""
+ }
+ {
+ #4 + duplicate$ s swap$ #1 swap$ substring$
+ swap$
+ s swap$ global.max$ substring$
+ }
+ if$
+ }
+ if$
+}
+FUNCTION{field.export}
+{
+ duplicate$ missing$
+ 'skip$
+ {
+ left.delim swap$ * right.delim *
+ swap$
+ " " swap$ * " = " * left.width space.complete
+ swap$ "," *
+ {duplicate$ "" = not}
+ {
+ right.width split.string 't :=
+ *
+ write$ newline$
+ "" left.width space.complete t
+ }
+ while$
+ }
+ if$
+ pop$ pop$
+}
+FUNCTION{abbrv.export}
+{
+ duplicate$ missing$
+ 'skip$
+ {
+ swap$
+ " " swap$ * " = " * left.width space.complete
+ swap$ "," *
+ {duplicate$ "" = not}
+ {
+ right.width split.string 't :=
+ *
+ write$ newline$
+ "" left.width space.complete t
+ }
+ while$
+ }
+ if$
+ pop$ pop$
+}
+FUNCTION{name.export}
+{
+ duplicate$ missing$
+ 'skip$
+ {
+ left.delim swap$ * right.delim *
+ swap$
+ " " swap$ * " = " * left.width space.complete
+ swap$ "," *
+ {duplicate$ "" = not}
+ {
+ right.width split.name 't :=
+ *
+ write$ newline$
+ "" left.width space.complete t
+ }
+ while$
+ }
+ if$
+ pop$ pop$
+}
+FUNCTION{url.export}
+{
+ duplicate$ missing$
+ 'skip$
+ {
+ left.delim swap$ * right.delim *
+ swap$
+ " " swap$ * " = " * left.width space.complete
+ swap$ "," *
+ {duplicate$ "" = not}
+ {
+ url.right.width split.url 't :=
+ *
+ write$ newline$
+ "" left.width space.complete t
+ }
+ while$
+ }
+ if$
+ pop$ pop$
+}
+MACRO{jan}{"export-jan"}
+MACRO{feb}{"export-feb"}
+MACRO{mar}{"export-mar"}
+MACRO{apr}{"export-apr"}
+MACRO{may}{"export-may"}
+MACRO{jun}{"export-jun"}
+MACRO{jul}{"export-jul"}
+MACRO{aug}{"export-aug"}
+MACRO{sep}{"export-sep"}
+MACRO{oct}{"export-oct"}
+MACRO{nov}{"export-nov"}
+MACRO{dec}{"export-dec"}
+MACRO{acmcs}{"export-acmcs"}
+MACRO{acta}{"export-acta"}
+MACRO{cacm}{"export-cacm"}
+MACRO{ibmjrd}{"export-ibmjrd"}
+MACRO{ibmsj}{"export-ibmsj"}
+MACRO{ieeese}{"export-ieeese"}
+MACRO{ieeetc}{"export-ieeetc"}
+MACRO{ieeetcad}{"export-ieeetcad"}
+MACRO{ipl}{"export-ipl"}
+MACRO{jacm}{"export-jacm"}
+MACRO{jcss}{"export-jcss"}
+MACRO{scp}{"export-scp"}
+MACRO{sicomp}{"export-sicomp"}
+MACRO{tocs}{"export-tocs"}
+MACRO{tods}{"export-tods"}
+MACRO{tog}{"export-tog"}
+MACRO{toms}{"export-toms"}
+MACRO{toois}{"export-poois"}
+MACRO{toplas}{"export-toplas"}
+MACRO{tcs}{"export-tcs"}
+INTEGERS{ intxt }
+FUNCTION{remove.exports.from.months}
+{
+ #0 'intxt :=
+ duplicate$ missing$
+ 'skip$
+ {'t :=
+ ""
+ {t #1 #1 substring$ "" = not}
+ {
+ t #1 #7 substring$ "export-" =
+ {intxt
+ {right.delim * #0 'intxt :=}
+ 'skip$
+ if$
+ duplicate$ "" =
+ 'skip$
+ {" # " *}
+ if$
+ t #8 #3 substring$ *
+ t #11 global.max$ substring$ 't :=}
+ {intxt
+ 'skip$
+ {duplicate$ "" =
+ {}
+ {" # " *}
+ if$
+ left.delim * #1 'intxt :=}
+ if$
+ t #1 #1 substring$ *
+ t #2 global.max$ substring$ 't :=}
+ if$
+ }
+ while$
+ intxt
+ {right.delim *}
+ 'skip$
+ if$
+ }
+ if$
+}
+FUNCTION{remove.export.from.journals}
+{
+ duplicate$ missing$
+ 'skip$
+ {
+ duplicate$ #1 #7 substring$ "export-" =
+ {#8 global.max$ substring$}
+ {left.delim swap$
+ right.delim * *}
+ if$
+ }
+ if$
+}
+FUNCTION{entry.export.standard}
+{
+ "address" address field.export
+ "author" author name.export
+ "booktitle" booktitle field.export
+ "chapter" chapter field.export
+ "crossref" crossref field.export
+ "edition" edition field.export
+ "editor" editor name.export
+ "howpublished" howpublished field.export
+ "institution" institution field.export
+ "journal" journal remove.export.from.journals abbrv.export
+ "key" key field.export
+ "month" month remove.exports.from.months abbrv.export
+ "note" note field.export
+ "number" number field.export
+ "organization" organization field.export
+ "pages" pages field.export
+ "publisher" publisher field.export
+ "school" school field.export
+ "series" series field.export
+ "type" type field.export
+ "title" title field.export
+ "volume" volume field.export
+ "year" year field.export
+}
+FUNCTION{entry.export.extra}
+{
+ "abstract" abstract field.export
+ "doi" doi field.export
+ "eid" eid field.export
+ "isbn" isbn field.export
+ "issn" issn field.export
+ "language" language field.export
+ "url" url url.export
+ "score" score field.export
+ "max.best.papers" max.best.papers field.export
+}
+FUNCTION{entry.export}
+{
+ entry.export.standard
+ entry.export.extra
+}
+FUNCTION{export}
+{
+ "@" type$ * "{" * cite$ * "," * write$ newline$
+ entry.export
+ "}" write$ newline$ newline$
+}
+FUNCTION{preamble}
+{
+preamble$ duplicate$ "" =
+ 'pop$
+ {
+ ",-------------------." write$ newline$
+ "| PREAMBLE |" write$ newline$
+ "`-------------------'" write$ newline$ newline$
+ "@preamble{ " swap$
+ quote$ swap$ * quote$ *
+ {duplicate$ "" = not}
+ {
+ right.long.width split.string 't :=
+ *
+ write$ newline$
+ "" left.short.width space.complete t
+ }
+ while$
+ "}" write$ newline$ newline$
+ pop$ pop$
+ }
+if$
+}
+FUNCTION{header}
+{
+final.max.best.papers "" =
+ {"5" 'final.max.best.papers :=}
+ 'skip$
+if$
+#0 'printed.all :=
+newline$
+}
+FUNCTION{entries.header}
+{
+preamble$ "" =
+ 'skip$
+ {
+ ",-------------------." write$ newline$
+ "| BIBTEX ENTRIES |" write$ newline$
+ "`-------------------'" write$ newline$ newline$
+ }
+if$
+}
+FUNCTION{article}{export}
+FUNCTION{book}{export}
+FUNCTION{booklet}{export}
+FUNCTION{conference}{export}
+FUNCTION{habthesis}{export}
+FUNCTION{inbook}{export}
+FUNCTION{incollection}{export}
+FUNCTION{inproceedings}{export}
+FUNCTION{journals}{export}
+FUNCTION{manual}{export}
+FUNCTION{mastersthesis}{export}
+FUNCTION{misc}{export}
+FUNCTION{phdthesis}{export}
+FUNCTION{proceedings}{export}
+FUNCTION{techreport}{export}
+FUNCTION{unpublished}{export}
+FUNCTION{setup}{export}
+
+FUNCTION {str.to.fix}
+{ "000000000" swap$ *
+ #-1 #10 substring$
+}
+
+FUNCTION {int.to.fix}
+{ "000000000" swap$ int.to.str$ *
+ #-1 #10 substring$
+}
+
+
+FUNCTION {presort}
+{ max.best.papers missing$
+ 'skip$
+ {max.best.papers 'final.max.best.papers :=}
+ if$
+ score missing$
+ {"0"}
+ {score}
+ if$
+ str.to.fix
+ 'sort.key$ :=
+}
+
+
+
+READ
+ITERATE {presort}
+SORT
+
+EXECUTE{header}
+EXECUTE{preamble}
+EXECUTE{entries.header}
+
+FUNCTION {print.entry}
+{ type$ "setup" =
+ 'call.type$
+ { printed.all
+ 'skip$
+ { num.seq #1 + 'num.seq :=
+ num.seq int.to.fix final.max.best.papers str.to.fix =
+ {#1 'printed.all :=}
+ 'skip$
+ if$
+ call.type$
+ }
+ if$}
+ if$
+}
+
+
+REVERSE {print.entry}
+
+
+%%
+%%
+%% End of file `export.bst'.
diff --git a/biblio/bibtex/contrib/bestpapers/bestpapers-guide.pdf b/biblio/bibtex/contrib/bestpapers/bestpapers-guide.pdf
new file mode 100644
index 0000000000..a7d09b4228
--- /dev/null
+++ b/biblio/bibtex/contrib/bestpapers/bestpapers-guide.pdf
Binary files differ
diff --git a/biblio/bibtex/contrib/bestpapers/bestpapers-guide.tex b/biblio/bibtex/contrib/bestpapers/bestpapers-guide.tex
new file mode 100644
index 0000000000..d46e690a0f
--- /dev/null
+++ b/biblio/bibtex/contrib/bestpapers/bestpapers-guide.tex
@@ -0,0 +1,158 @@
+\documentclass{article}
+\usepackage[numbers]{natbib}
+\usepackage{hyperref,alltt}
+\usepackage[resetlabels]{multibib}
+\newcommand{\BibTeX}{\textsc{Bib}\TeX}
+\newcites{tex}{Books and articles about \TeX}
+\newcites{typography}{Books and articles about typography}
+\begin{document}
+
+\title{User Guide for \texttt{bestpapers.bst} Bibliography Style}
+\author{Boris Veytsman\thanks{This work was commissioned by Consumer
+ Financial Protection Bureau, United States Treasury. This file
+ and the package are in the public domain}}
+\date{October 2014}
+\maketitle
+
+\section{Introduction}
+\label{sec:intro}
+
+
+
+Many people preparing their r\'esum\'es find the requirement ``please
+list five (or six, or ten) papers authored by you''. The same
+requirement is often stated for reports prepared by professional
+teams. The creation of such lists may be a cumbersome task. Even more
+difficult is to support the lists over the time, when one adds new
+papers. The style \texttt{bestpapers.bst} is intended to make this task
+simpler. It is based on the idea that it is easier to score than to
+sort: we can assign a score to a paper, and then let the computer to
+select the papers with highest scores.
+
+\section{Simple Usage}
+\label{sec:simple}
+
+The use of the package is simple. We assume that you keep all your
+publications in a \BibTeX\ file (or files). Then,
+\begin{enumerate}
+\item Add to each bibliographic entry in the file the field
+ \begin{alltt}
+ score = \itshape SCORE
+ \end{alltt}
+ where \texttt{\itshape SCORE} is an non-negative integer. The
+ higher the score is, the more you think about the paper. Since only
+ the relation between scores matter, you may limit yourself to scores
+ between, say, $0$ and $100$. An absent score is equivalent to
+ \texttt{score=0}.
+\item Add to the preamble of your r\'esum\'e
+\begin{verbatim}
+\usepackage[numbers]{natbib}
+\end{verbatim}
+ and to the document itself
+\begin{verbatim}
+\renewcommand{\refname}{My Best Works}
+\nocite{*}
+\bibliography{myworks}
+\bibliographystyle{bestpapers}
+\end{verbatim}
+\item You document will get the list of five~best works, sorted by
+ decreasing scores.
+\end{enumerate}
+
+
+\section{Customization}
+\label{sec:custom}
+
+
+Sometimes you need to change the number of best papers displayed.
+The package introduces a new entry type \verb|@SETUP| with the
+field \verb|max.best.papers|, for example,
+\begin{verbatim}
+@SETUP{setup,
+ max.best.papers = 6,
+}
+\end{verbatim}
+
+Normally the score of the papers is not printed. However, for debug
+purposes you can change this: just define the command
+\verb|\PrintScore|, for example
+\begin{verbatim}
+\newcommand{\PrintScore}[1]{Score: #1}
+\end{verbatim}
+
+\section{Bibexport}
+\label{sec:bibexport}
+
+Sometimes you need to extract your best works from \texttt{.bib} files
+rather than typeset the list of them. You can use for this the
+program \textsl{bibexport} (\url{http://www.ctan.org/pkg/bibexport}), a
+handy tool for the manipulation of \BibTeX\ databases. The package
+provides the style \texttt{bestpapers-export.bst} intended for this
+task.
+
+To extract the best works from the files \texttt{myworks.bib} and
+\texttt{ourworks.bib} into the file \texttt{result.bib},
+\begin{enumerate}
+\item Create the file \texttt{extract.aux} with the following content:
+\begin{verbatim}
+\citation{*}
+\bibdata{myworks,ourworks}
+\bibstyle{bestpapers-export}
+\end{verbatim}
+
+\item If necessary, add to any of these files \texttt{@SETUP} entry as
+ described in Section~\ref{sec:custom}.
+\item Run
+\begin{verbatim}
+bibexport -b bestpapers-export -o result.bib export.aux
+\end{verbatim}
+
+\end{enumerate}
+
+
+\section{Multiple Bibliographies}
+\label{sec:multiple}
+
+
+
+Sometimes you need to have collective report and provide several
+best papers for each person in the group. The package
+\texttt{multibib} allows you to do this:
+\begin{verbatim}
+\usepackage{multibib}
+\newcites{chico,harpo,groucho,zeppo}{Chico's Papers,%
+ Harpo's Papers,%
+ Groucho's Papers,%
+ Zeppo's Papers}
+...
+\nocitechico{*}
+\bibliographychico{chico.bib}
+\bibliographystylechico{bestpapers}
+
+\nociteharpo{*}
+\bibliographyharpo{harpo.bib}
+\bibliographystyleharpo{bestpapers}
+
+\nocitegroucho{*}
+\bibliographygroucho{groucho.bib}
+\bibliographystylegroucho{bestpapers}
+
+\nocitezeppo{*}
+\bibliographyzeppo{zeppo.bib}
+\bibliographystylezeppo{bestpapers}
+\end{verbatim}
+
+Note that you may want to use \texttt{resetlabels} option of the
+\texttt{multibib} package if you want all the lists to start from~1.
+
+An example of this usage is the source code of this file, which lists
+6~books about \TeX\ and 5~books about typography separately.
+
+\nocitetex{*}
+\nocitetypography{*}
+\bibliographytex{tex}
+\bibliographystyletex{bestpapers}
+\bibliographytypography{typography}
+\bibliographystyletypography{bestpapers}
+
+\end{document}
diff --git a/biblio/bibtex/contrib/bestpapers/bestpapers.bst b/biblio/bibtex/contrib/bestpapers/bestpapers.bst
new file mode 100644
index 0000000000..b4e49a1023
--- /dev/null
+++ b/biblio/bibtex/contrib/bestpapers/bestpapers.bst
@@ -0,0 +1,1280 @@
+%% File: `bestpapers.bst'
+%%
+%% Based on unsrtnat.bst
+%%
+%% This file is in the public domain, see
+%% https://creativecommons.org/publicdomain/zero/1.0/legalcode
+%%
+%% UNSRTNAT COPYRIGHT STATEMENT
+%% [Not applicable here since the name is changed but preserved
+%% for completeness]
+%% File: `unsrtnat.bst'
+%% A modification of `unsrt.bst' for use with natbib package
+%%
+%% Copyright 1993-2007 Patrick W Daly
+%% Max-Planck-Institut f\"ur Sonnensystemforschung
+%% Max-Planck-Str. 2
+%% D-37191 Katlenburg-Lindau
+%% Germany
+%% E-mail: daly@mps.mpg.de
+%%
+%% This program can be redistributed and/or modified under the terms
+%% of the LaTeX Project Public License Distributed from CTAN
+%% archives in directory macros/latex/base/lppl.txt; either
+%% version 1 of the License, or any later version.
+%%
+%% END UNSRTNAT COPYRIGHT STATEMENT
+ENTRY
+ { address
+ author
+ booktitle
+ chapter
+ doi
+ eid
+ edition
+ editor
+ howpublished
+ institution
+ isbn
+ issn
+ journal
+ key
+ max.best.papers
+ month
+ note
+ number
+ organization
+ pages
+ publisher
+ school
+ score
+ series
+ title
+ type
+ url
+ volume
+ year
+ }
+ {}
+ { label extra.label sort.label short.list }
+
+INTEGERS { output.state before.all mid.sentence after.sentence after.block }
+
+INTEGERS {num.seq printed.all }
+
+FUNCTION {init.state.consts}
+{ #0 'before.all :=
+ #1 'mid.sentence :=
+ #2 'after.sentence :=
+ #3 'after.block :=
+ #0 'num.seq :=
+ #0 'printed.all :=
+}
+
+STRINGS { s t final.max.best.papers}
+
+FUNCTION {output.nonnull}
+{ 's :=
+ output.state mid.sentence =
+ { ", " * write$ }
+ { output.state after.block =
+ { add.period$ write$
+ newline$
+ "\newblock " write$
+ }
+ { output.state before.all =
+ 'write$
+ { add.period$ " " * write$ }
+ if$
+ }
+ if$
+ mid.sentence 'output.state :=
+ }
+ if$
+ s
+}
+
+FUNCTION {output}
+{ duplicate$ empty$
+ 'pop$
+ 'output.nonnull
+ if$
+}
+
+FUNCTION {output.check}
+{ 't :=
+ duplicate$ empty$
+ { pop$ "empty " t * " in " * cite$ * warning$ }
+ 'output.nonnull
+ if$
+}
+
+FUNCTION {fin.entry}
+{ add.period$
+ write$
+ newline$
+}
+
+FUNCTION {new.block}
+{ output.state before.all =
+ 'skip$
+ { after.block 'output.state := }
+ if$
+}
+
+FUNCTION {new.sentence}
+{ output.state after.block =
+ 'skip$
+ { output.state before.all =
+ 'skip$
+ { after.sentence 'output.state := }
+ if$
+ }
+ if$
+}
+
+FUNCTION {not}
+{ { #0 }
+ { #1 }
+ if$
+}
+
+FUNCTION {and}
+{ 'skip$
+ { pop$ #0 }
+ if$
+}
+
+FUNCTION {or}
+{ { pop$ #1 }
+ 'skip$
+ if$
+}
+
+FUNCTION {new.block.checka}
+{ empty$
+ 'skip$
+ 'new.block
+ if$
+}
+
+FUNCTION {new.block.checkb}
+{ empty$
+ swap$ empty$
+ and
+ 'skip$
+ 'new.block
+ if$
+}
+
+FUNCTION {new.sentence.checka}
+{ empty$
+ 'skip$
+ 'new.sentence
+ if$
+}
+
+FUNCTION {new.sentence.checkb}
+{ empty$
+ swap$ empty$
+ and
+ 'skip$
+ 'new.sentence
+ if$
+}
+
+FUNCTION {field.or.null}
+{ duplicate$ empty$
+ { pop$ "" }
+ 'skip$
+ if$
+}
+
+FUNCTION {emphasize}
+{ duplicate$ empty$
+ { pop$ "" }
+ { "\emph{" swap$ * "}" * }
+ if$
+}
+
+INTEGERS { nameptr namesleft numnames }
+
+FUNCTION {format.names}
+{ 's :=
+ #1 'nameptr :=
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ { s nameptr "{ff~}{vv~}{ll}{, jj}" format.name$ 't :=
+ nameptr #1 >
+ { namesleft #1 >
+ { ", " * t * }
+ { numnames #2 >
+ { "," * }
+ 'skip$
+ if$
+ t "others" =
+ { " et~al." * }
+ { " and " * t * }
+ if$
+ }
+ if$
+ }
+ 't
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+}
+
+FUNCTION {format.key}
+{ empty$
+ { key field.or.null }
+ { "" }
+ if$
+}
+
+FUNCTION {format.authors}
+{ author empty$
+ { "" }
+ { author format.names }
+ if$
+}
+
+FUNCTION {format.editors}
+{ editor empty$
+ { "" }
+ { editor format.names
+ editor num.names$ #1 >
+ { ", editors" * }
+ { ", editor" * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.isbn}
+{ isbn empty$
+ { "" }
+ { new.block "ISBN " isbn * }
+ if$
+}
+
+FUNCTION {format.issn}
+{ issn empty$
+ { "" }
+ { new.block "ISSN " issn * }
+ if$
+}
+
+FUNCTION {format.url}
+{ url empty$
+ { "" }
+ { new.block "URL \url{" url * "}" * }
+ if$
+}
+
+FUNCTION {format.doi}
+{ doi empty$
+ { "" }
+ { new.block "\doi{" doi * "}" * }
+ if$
+}
+
+FUNCTION {format.title}
+{ title empty$
+ { "" }
+ { title "t" change.case$ }
+ if$
+}
+
+FUNCTION {format.full.names}
+{'s :=
+ #1 'nameptr :=
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ { s nameptr
+ "{vv~}{ll}" format.name$ 't :=
+ nameptr #1 >
+ {
+ namesleft #1 >
+ { ", " * t * }
+ {
+ numnames #2 >
+ { "," * }
+ 'skip$
+ if$
+ t "others" =
+ { " et~al." * }
+ { " and " * t * }
+ if$
+ }
+ if$
+ }
+ 't
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+}
+
+FUNCTION {author.editor.full}
+{ author empty$
+ { editor empty$
+ { "" }
+ { editor format.full.names }
+ if$
+ }
+ { author format.full.names }
+ if$
+}
+
+FUNCTION {author.full}
+{ author empty$
+ { "" }
+ { author format.full.names }
+ if$
+}
+
+FUNCTION {editor.full}
+{ editor empty$
+ { "" }
+ { editor format.full.names }
+ if$
+}
+
+FUNCTION {make.full.names}
+{ type$ "book" =
+ type$ "inbook" =
+ or
+ 'author.editor.full
+ { type$ "proceedings" =
+ 'editor.full
+ 'author.full
+ if$
+ }
+ if$
+}
+
+FUNCTION {output.bibitem}
+{ newline$
+ "\bibitem[" write$
+ label write$
+ ")" make.full.names duplicate$ short.list =
+ { pop$ }
+ { * }
+ if$
+ "]{" * write$
+ cite$ write$
+ "}" write$
+ newline$
+ ""
+ before.all 'output.state :=
+}
+
+FUNCTION {n.dashify}
+{ 't :=
+ ""
+ { t empty$ not }
+ { t #1 #1 substring$ "-" =
+ { t #1 #2 substring$ "--" = not
+ { "--" *
+ t #2 global.max$ substring$ 't :=
+ }
+ { { t #1 #1 substring$ "-" = }
+ { "-" *
+ t #2 global.max$ substring$ 't :=
+ }
+ while$
+ }
+ if$
+ }
+ { t #1 #1 substring$ *
+ t #2 global.max$ substring$ 't :=
+ }
+ if$
+ }
+ while$
+}
+
+FUNCTION {format.date}
+{ year duplicate$ empty$
+ { "empty year in " cite$ * warning$
+ pop$ "" }
+ 'skip$
+ if$
+ month empty$
+ 'skip$
+ { month
+ " " * swap$ *
+ }
+ if$
+ extra.label *
+}
+
+FUNCTION {format.btitle}
+{ title emphasize
+}
+
+FUNCTION {tie.or.space.connect}
+{ duplicate$ text.length$ #3 <
+ { "~" }
+ { " " }
+ if$
+ swap$ * *
+}
+
+FUNCTION {either.or.check}
+{ empty$
+ 'pop$
+ { "can't use both " swap$ * " fields in " * cite$ * warning$ }
+ if$
+}
+
+FUNCTION {format.bvolume}
+{ volume empty$
+ { "" }
+ { "volume" volume tie.or.space.connect
+ series empty$
+ 'skip$
+ { " of " * series emphasize * }
+ if$
+ "volume and number" number either.or.check
+ }
+ if$
+}
+
+FUNCTION {format.number.series}
+{ volume empty$
+ { number empty$
+ { series field.or.null }
+ { output.state mid.sentence =
+ { "number" }
+ { "Number" }
+ if$
+ number tie.or.space.connect
+ series empty$
+ { "there's a number but no series in " cite$ * warning$ }
+ { " in " * series * }
+ if$
+ }
+ if$
+ }
+ { "" }
+ if$
+}
+
+FUNCTION {format.edition}
+{ edition empty$
+ { "" }
+ { output.state mid.sentence =
+ { edition "l" change.case$ " edition" * }
+ { edition "t" change.case$ " edition" * }
+ if$
+ }
+ if$
+}
+
+INTEGERS { multiresult }
+
+FUNCTION {multi.page.check}
+{ 't :=
+ #0 'multiresult :=
+ { multiresult not
+ t empty$ not
+ and
+ }
+ { t #1 #1 substring$
+ duplicate$ "-" =
+ swap$ duplicate$ "," =
+ swap$ "+" =
+ or or
+ { #1 'multiresult := }
+ { t #2 global.max$ substring$ 't := }
+ if$
+ }
+ while$
+ multiresult
+}
+
+FUNCTION {format.pages}
+{ pages empty$
+ { "" }
+ { pages multi.page.check
+ { "pages" pages n.dashify tie.or.space.connect }
+ { "page" pages tie.or.space.connect }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.eid}
+{ eid empty$
+ { "" }
+ { "art." eid tie.or.space.connect }
+ if$
+}
+
+FUNCTION {format.vol.num.pages}
+{ volume field.or.null
+ number empty$
+ 'skip$
+ { "\penalty0 (" number * ")" * *
+ volume empty$
+ { "there's a number but no volume in " cite$ * warning$ }
+ 'skip$
+ if$
+ }
+ if$
+ pages empty$
+ 'skip$
+ { duplicate$ empty$
+ { pop$ format.pages }
+ { ":\penalty0 " * pages n.dashify * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.vol.num.eid}
+{ volume field.or.null
+ number empty$
+ 'skip$
+ { "\penalty0 (" number * ")" * *
+ volume empty$
+ { "there's a number but no volume in " cite$ * warning$ }
+ 'skip$
+ if$
+ }
+ if$
+ eid empty$
+ 'skip$
+ { duplicate$ empty$
+ { pop$ format.eid }
+ { ":\penalty0 " * eid * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.chapter.pages}
+{ chapter empty$
+ 'format.pages
+ { type empty$
+ { "chapter" }
+ { type "l" change.case$ }
+ if$
+ chapter tie.or.space.connect
+ pages empty$
+ 'skip$
+ { ", " * format.pages * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.in.ed.booktitle}
+{ booktitle empty$
+ { "" }
+ { editor empty$
+ { "In " booktitle emphasize * }
+ { "In " format.editors * ", " * booktitle emphasize * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {empty.misc.check}
+{ author empty$ title empty$ howpublished empty$
+ month empty$ year empty$ note empty$
+ and and and and and
+ key empty$ not and
+ { "all relevant fields are empty in " cite$ * warning$ }
+ 'skip$
+ if$
+}
+
+FUNCTION {format.thesis.type}
+{ type empty$
+ 'skip$
+ { pop$
+ type "t" change.case$
+ }
+ if$
+}
+
+FUNCTION {format.tr.number}
+{ type empty$
+ { "Technical Report" }
+ 'type
+ if$
+ number empty$
+ { "t" change.case$ }
+ { number tie.or.space.connect }
+ if$
+}
+
+FUNCTION {format.article.crossref}
+{ key empty$
+ { journal empty$
+ { "need key or journal for " cite$ * " to crossref " * crossref *
+ warning$
+ ""
+ }
+ { "In \emph{" journal * "}" * }
+ if$
+ }
+ { "In " }
+ if$
+ " \citet{" * crossref * "}" *
+}
+
+FUNCTION {format.book.crossref}
+{ volume empty$
+ { "empty volume in " cite$ * "'s crossref of " * crossref * warning$
+ "In "
+ }
+ { "Volume" volume tie.or.space.connect
+ " of " *
+ }
+ if$
+ editor empty$
+ editor field.or.null author field.or.null =
+ or
+ { key empty$
+ { series empty$
+ { "need editor, key, or series for " cite$ * " to crossref " *
+ crossref * warning$
+ "" *
+ }
+ { "\emph{" * series * "}" * }
+ if$
+ }
+ 'skip$
+ if$
+ }
+ 'skip$
+ if$
+ " \citet{" * crossref * "}" *
+}
+
+FUNCTION {format.incoll.inproc.crossref}
+{ editor empty$
+ editor field.or.null author field.or.null =
+ or
+ { key empty$
+ { booktitle empty$
+ { "need editor, key, or booktitle for " cite$ * " to crossref " *
+ crossref * warning$
+ ""
+ }
+ { "In \emph{" booktitle * "}" * }
+ if$
+ }
+ { "In " }
+ if$
+ }
+ { "In " }
+ if$
+ " \citet{" * crossref * "}" *
+}
+
+FUNCTION {article}
+{ output.bibitem
+ format.authors "author" output.check
+ author format.key output
+ new.block
+ format.title "title" output.check
+ new.block
+ crossref missing$
+ { journal emphasize "journal" output.check
+ eid empty$
+ { format.vol.num.pages output }
+ { format.vol.num.eid output }
+ if$
+ format.date "year" output.check
+ }
+ { format.article.crossref output.nonnull
+ eid empty$
+ { format.pages output }
+ { format.eid output }
+ if$
+ }
+ if$
+ format.issn output
+ format.doi output
+ format.url output
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {book}
+{ output.bibitem
+ author empty$
+ { format.editors "author and editor" output.check
+ editor format.key output
+ }
+ { format.authors output.nonnull
+ crossref missing$
+ { "author and editor" editor either.or.check }
+ 'skip$
+ if$
+ }
+ if$
+ new.block
+ format.btitle "title" output.check
+ crossref missing$
+ { format.bvolume output
+ new.block
+ format.number.series output
+ new.sentence
+ publisher "publisher" output.check
+ address output
+ }
+ { new.block
+ format.book.crossref output.nonnull
+ }
+ if$
+ format.edition output
+ format.date "year" output.check
+ format.isbn output
+ format.doi output
+ format.url output
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {booklet}
+{ output.bibitem
+ format.authors output
+ author format.key output
+ new.block
+ format.title "title" output.check
+ howpublished address new.block.checkb
+ howpublished output
+ address output
+ format.date output
+ format.isbn output
+ format.doi output
+ format.url output
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {inbook}
+{ output.bibitem
+ author empty$
+ { format.editors "author and editor" output.check
+ editor format.key output
+ }
+ { format.authors output.nonnull
+ crossref missing$
+ { "author and editor" editor either.or.check }
+ 'skip$
+ if$
+ }
+ if$
+ new.block
+ format.btitle "title" output.check
+ crossref missing$
+ { format.bvolume output
+ format.chapter.pages "chapter and pages" output.check
+ new.block
+ format.number.series output
+ new.sentence
+ publisher "publisher" output.check
+ address output
+ }
+ { format.chapter.pages "chapter and pages" output.check
+ new.block
+ format.book.crossref output.nonnull
+ }
+ if$
+ format.edition output
+ format.date "year" output.check
+ format.isbn output
+ format.doi output
+ format.url output
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {incollection}
+{ output.bibitem
+ format.authors "author" output.check
+ author format.key output
+ new.block
+ format.title "title" output.check
+ new.block
+ crossref missing$
+ { format.in.ed.booktitle "booktitle" output.check
+ format.bvolume output
+ format.number.series output
+ format.chapter.pages output
+ new.sentence
+ publisher "publisher" output.check
+ address output
+ format.edition output
+ format.date "year" output.check
+ }
+ { format.incoll.inproc.crossref output.nonnull
+ format.chapter.pages output
+ }
+ if$
+ format.isbn output
+ format.doi output
+ format.url output
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {inproceedings}
+{ output.bibitem
+ format.authors "author" output.check
+ author format.key output
+ new.block
+ format.title "title" output.check
+ new.block
+ crossref missing$
+ { format.in.ed.booktitle "booktitle" output.check
+ format.bvolume output
+ format.number.series output
+ format.pages output
+ address empty$
+ { organization publisher new.sentence.checkb
+ organization output
+ publisher output
+ format.date "year" output.check
+ }
+ { address output.nonnull
+ format.date "year" output.check
+ new.sentence
+ organization output
+ publisher output
+ }
+ if$
+ }
+ { format.incoll.inproc.crossref output.nonnull
+ format.pages output
+ }
+ if$
+ format.isbn output
+ format.doi output
+ format.url output
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {conference} { inproceedings }
+
+FUNCTION {manual}
+{ output.bibitem
+ format.authors output
+ author format.key output
+ new.block
+ format.btitle "title" output.check
+ organization address new.block.checkb
+ organization output
+ address output
+ format.edition output
+ format.date output
+ format.url output
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {mastersthesis}
+{ output.bibitem
+ format.authors "author" output.check
+ author format.key output
+ new.block
+ format.title "title" output.check
+ new.block
+ "Master's thesis" format.thesis.type output.nonnull
+ school "school" output.check
+ address output
+ format.date "year" output.check
+ format.url output
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {misc}
+{ output.bibitem
+ format.authors output
+ author format.key output
+ title howpublished new.block.checkb
+ format.title output
+ howpublished new.block.checka
+ howpublished output
+ format.date output
+ format.issn output
+ format.url output
+ new.block
+ note output
+ fin.entry
+ empty.misc.check
+}
+
+FUNCTION {phdthesis}
+{ output.bibitem
+ format.authors "author" output.check
+ author format.key output
+ new.block
+ format.btitle "title" output.check
+ new.block
+ "PhD thesis" format.thesis.type output.nonnull
+ school "school" output.check
+ address output
+ format.date "year" output.check
+ format.url output
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {proceedings}
+{ output.bibitem
+ format.editors output
+ editor format.key output
+ new.block
+ format.btitle "title" output.check
+ format.bvolume output
+ format.number.series output
+ address output
+ format.date "year" output.check
+ new.sentence
+ organization output
+ publisher output
+ format.isbn output
+ format.doi output
+ format.url output
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {techreport}
+{ output.bibitem
+ format.authors "author" output.check
+ author format.key output
+ new.block
+ format.title "title" output.check
+ new.block
+ format.tr.number output.nonnull
+ institution "institution" output.check
+ address output
+ format.date "year" output.check
+ format.url output
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {unpublished}
+{ output.bibitem
+ format.authors "author" output.check
+ author format.key output
+ new.block
+ format.title "title" output.check
+ new.block
+ note "note" output.check
+ format.date output
+ format.url output
+ fin.entry
+}
+
+FUNCTION {default.type} { misc }
+
+FUNCTION {setup} {}
+
+MACRO {jan} {"January"}
+
+MACRO {feb} {"February"}
+
+MACRO {mar} {"March"}
+
+MACRO {apr} {"April"}
+
+MACRO {may} {"May"}
+
+MACRO {jun} {"June"}
+
+MACRO {jul} {"July"}
+
+MACRO {aug} {"August"}
+
+MACRO {sep} {"September"}
+
+MACRO {oct} {"October"}
+
+MACRO {nov} {"November"}
+
+MACRO {dec} {"December"}
+
+
+
+MACRO {acmcs} {"ACM Computing Surveys"}
+
+MACRO {acta} {"Acta Informatica"}
+
+MACRO {cacm} {"Communications of the ACM"}
+
+MACRO {ibmjrd} {"IBM Journal of Research and Development"}
+
+MACRO {ibmsj} {"IBM Systems Journal"}
+
+MACRO {ieeese} {"IEEE Transactions on Software Engineering"}
+
+MACRO {ieeetc} {"IEEE Transactions on Computers"}
+
+MACRO {ieeetcad}
+ {"IEEE Transactions on Computer-Aided Design of Integrated Circuits"}
+
+MACRO {ipl} {"Information Processing Letters"}
+
+MACRO {jacm} {"Journal of the ACM"}
+
+MACRO {jcss} {"Journal of Computer and System Sciences"}
+
+MACRO {scp} {"Science of Computer Programming"}
+
+MACRO {sicomp} {"SIAM Journal on Computing"}
+
+MACRO {tocs} {"ACM Transactions on Computer Systems"}
+
+MACRO {tods} {"ACM Transactions on Database Systems"}
+
+MACRO {tog} {"ACM Transactions on Graphics"}
+
+MACRO {toms} {"ACM Transactions on Mathematical Software"}
+
+MACRO {toois} {"ACM Transactions on Office Information Systems"}
+
+MACRO {toplas} {"ACM Transactions on Programming Languages and Systems"}
+
+MACRO {tcs} {"Theoretical Computer Science"}
+
+
+READ
+
+FUNCTION {sortify}
+{ purify$
+ "l" change.case$
+}
+
+INTEGERS { len }
+
+FUNCTION {chop.word}
+{ 's :=
+ 'len :=
+ s #1 len substring$ =
+ { s len #1 + global.max$ substring$ }
+ 's
+ if$
+}
+
+FUNCTION {format.lab.names}
+{ 's :=
+ s #1 "{vv~}{ll}" format.name$
+ s num.names$ duplicate$
+ #2 >
+ { pop$ " et~al." * }
+ { #2 <
+ 'skip$
+ { s #2 "{ff }{vv }{ll}{ jj}" format.name$ "others" =
+ { " et~al." * }
+ { " and " * s #2 "{vv~}{ll}" format.name$ * }
+ if$
+ }
+ if$
+ }
+ if$
+}
+
+FUNCTION {author.key.label}
+{ author empty$
+ { key empty$
+ { cite$ #1 #3 substring$ }
+ 'key
+ if$
+ }
+ { author format.lab.names }
+ if$
+}
+
+FUNCTION {author.editor.key.label}
+{ author empty$
+ { editor empty$
+ { key empty$
+ { cite$ #1 #3 substring$ }
+ 'key
+ if$
+ }
+ { editor format.lab.names }
+ if$
+ }
+ { author format.lab.names }
+ if$
+}
+
+FUNCTION {author.key.organization.label}
+{ author empty$
+ { key empty$
+ { organization empty$
+ { cite$ #1 #3 substring$ }
+ { "The " #4 organization chop.word #3 text.prefix$ }
+ if$
+ }
+ 'key
+ if$
+ }
+ { author format.lab.names }
+ if$
+}
+
+FUNCTION {editor.key.organization.label}
+{ editor empty$
+ { key empty$
+ { organization empty$
+ { cite$ #1 #3 substring$ }
+ { "The " #4 organization chop.word #3 text.prefix$ }
+ if$
+ }
+ 'key
+ if$
+ }
+ { editor format.lab.names }
+ if$
+}
+
+FUNCTION {calc.short.authors}
+{ type$ "book" =
+ type$ "inbook" =
+ or
+ 'author.editor.key.label
+ { type$ "proceedings" =
+ 'editor.key.organization.label
+ { type$ "manual" =
+ 'author.key.organization.label
+ 'author.key.label
+ if$
+ }
+ if$
+ }
+ if$
+ 'short.list :=
+}
+
+FUNCTION {calc.label}
+{ calc.short.authors
+ short.list
+ "("
+ *
+ year duplicate$ empty$
+ short.list key field.or.null = or
+ { pop$ "" }
+ 'skip$
+ if$
+ *
+ 'label :=
+}
+
+INTEGERS { seq.num }
+
+FUNCTION {init.seq}
+{ #0 'seq.num :=}
+
+EXECUTE {init.seq}
+
+FUNCTION {int.to.fix}
+{ "000000000" swap$ int.to.str$ *
+ #-1 #10 substring$
+}
+
+FUNCTION {str.to.fix}
+{ "000000000" swap$ *
+ #-1 #10 substring$
+}
+
+
+FUNCTION {presort}
+{ calc.label
+ max.best.papers missing$
+ 'skip$
+ {max.best.papers 'final.max.best.papers :=}
+ if$
+ score missing$
+ {"0"}
+ {score}
+ if$
+ str.to.fix
+ 'sort.key$ :=
+}
+
+ITERATE {presort}
+
+SORT
+
+FUNCTION {begin.bib}
+{ preamble$ empty$
+ 'skip$
+ { preamble$ write$ newline$ }
+ if$
+ final.max.best.papers "" =
+ {"5" 'final.max.best.papers :=}
+ 'skip$
+ if$
+ "\begin{thebibliography}{" final.max.best.papers * "}" *
+ write$ newline$
+ "\providecommand{\natexlab}[1]{#1}"
+ write$ newline$
+ "\providecommand{\url}[1]{\texttt{#1}}"
+ write$ newline$
+ "\expandafter\ifx\csname urlstyle\endcsname\relax"
+ write$ newline$
+ " \providecommand{\doi}[1]{doi: #1}\else"
+ write$ newline$
+ " \providecommand{\doi}{doi: \begingroup \urlstyle{rm}\Url}\fi"
+ write$ newline$
+ " \providecommand{\PrintScore}[1]{}"
+ write$ newline$
+}
+
+EXECUTE {begin.bib}
+
+EXECUTE {init.state.consts}
+
+FUNCTION {print.entry}
+{ printed.all
+ 'skip$
+ { num.seq #1 + 'num.seq :=
+ num.seq int.to.fix final.max.best.papers str.to.fix =
+ {#1 'printed.all :=}
+ 'skip$
+ if$
+ call.type$
+ "\PrintScore{" sort.key$ * "}" * write$ newline$
+ }
+ if$
+}
+
+REVERSE {print.entry}
+
+FUNCTION {end.bib}
+{ newline$
+ "\end{thebibliography}" write$ newline$
+}
+
+EXECUTE {end.bib}
diff --git a/biblio/bibtex/contrib/bestpapers/tex.bib b/biblio/bibtex/contrib/bestpapers/tex.bib
new file mode 100644
index 0000000000..ab277df5ab
--- /dev/null
+++ b/biblio/bibtex/contrib/bestpapers/tex.bib
@@ -0,0 +1,108 @@
+@SETUP{setup,
+ score = 0,
+ max.best.papers = 6,
+}
+
+
+@BOOK{Lamport94,
+ author = {Leslie Lamport},
+ year = 1994,
+ title = {{\LaTeX}: a Document Preparation System},
+ edition = {Second},
+ publisher = {Addison-Wesley Publishing Company},
+ address = {Reading, MA},
+ note = {Illustrations by Duane Bibby},
+ score = 10,
+}
+
+@Manual{MI,
+ author = {P. Cheng and M. A. Harrison},
+ title = {Index Preparation and Processing},
+ year = 1988,
+ month = {October},
+ note = {\url{http://mirrors.ctan.org/indexing/makeindex/paper}},
+ score = 5,
+}
+
+
+@Misc{TeXFAQ,
+ author = {{UK \TeX{} Users Group}},
+ title = {{UK} List of {\TeX} Frequently Asked Questions},
+ year = 2008,
+ howpublished = {\url{http://www.tex.ac.uk/cgi-bin/texfaq2html}},
+ score = 4,
+}
+
+
+@manual{lshort,
+ author = {Tobias Oetiker and Hubert Partl and Irene Hyna and
+ Elisabeth Schlegl},
+ month = {April},
+ note = {\url{http://mirrors.ctan.org/info/lshort}},
+ title = {The Not So Short Introduction to \LaTeXe{}, Or
+ \LaTeXe{} in 174 Minutes},
+ year = {2011},
+ score = 5,
+}
+
+@Book{Mittelbach04:LaTeXCompanion,
+ author = {Frank Mittelbach and Michel Goossens and Johannes Braams
+ and David Carlisle and Chris Rowley},
+ title = {The \LaTeX{} Companion},
+ publisher = {Addison-Wesley Professional},
+ year = 2004,
+ series = {Addison-Wesley Series on Tools and Techniques
+ for Computer Typesetting},
+ address = {Boston},
+ score = 8,
+}
+
+
+@Book{Goossens97:LateXGraphicsCompanion,
+ author = {Michel Goossens and Sebastian Rahtz and Frank Mittelbach},
+ title = { The \LaTeX{} Graphics Companion:
+ Illustrating Documents With \TeX{} and {PostScript}},
+ chapter = {},
+ publisher = {Addison-Wesley},
+ year = 1997,
+ series = {Addison-Wesley Series on Tools and Techniques
+ for Computer Typesetting},
+ address = {Reading, MA},
+ score = 7,
+}
+
+@Book{Goossens99:LaTeXWebCompanion,
+ author = {Michael Goossens and Sebastian Rahtz and
+ Eitan M. Gurari and Ross Moore and Robert S. Sutor},
+ title = {The \LaTeX{} Web Companion:
+ Integrating \TeX{}, {HTML}, and {XML}},
+ publisher = {Addison Wesley Longman},
+ year = 1999,
+ series = {Addison-Wesley Series on Tools and Techniques
+ for Computer Typesetting},
+ address = {Reading, MA},
+ score = 7,
+}
+
+@Book{Knuth94:TheTeXbook,
+ author = {Knuth, Donald Ervin},
+ title = {The \TeX book},
+ publisher = {Addison-Wesley Publishing Company},
+ year = 1994,
+ series = {Computers \& Typesetting A},
+ address = {Reading, MA},
+ note = {Illustrations by Duane Bibby},
+ score = 20
+}
+
+
+@Manual{instr-l,
+ title = {Instructions for Preparation of Papers and
+ Monographs, {AMS\LaTeX}},
+ organization = {American Mathematical Society},
+ month = {August},
+ year = 2004,
+ note = {\url{http://mirrors.ctan.org/macros/latex/required/amslatex/classes/instr-l.pdf}},
+ score = 4,
+}
+
diff --git a/biblio/bibtex/contrib/bestpapers/typography.bib b/biblio/bibtex/contrib/bestpapers/typography.bib
new file mode 100644
index 0000000000..a96304cfdf
--- /dev/null
+++ b/biblio/bibtex/contrib/bestpapers/typography.bib
@@ -0,0 +1,214 @@
+@Book{Tufte03:PowerPoint,
+ author = {Edward R. Tufte},
+ title = {The Cognitive Style of {Power Point}},
+ publisher = {Graphics Press LLC},
+ year = 2003,
+ address = {Cheshire, CT},
+ score = 10
+}
+
+
+@Book{Gill:Typography,
+ author = {Eric Gill},
+ title = {An Essay on Typography. With a new
+ introduction by Cristopher Skelton},
+ publisher = {David R. Godine},
+ year = 2007,
+ address = {Boston},
+ score = 12
+}
+
+
+@Article{Brumberger03a,
+ author = {Brumberger, Eva R.},
+ title = {The Rhetoric of Typography: The Persona of Typeface and
+ Text},
+ journal = {Technical Communication},
+ year = 2003,
+ volume = 50,
+ number = 2,
+ pages = {206--223},
+ score = 12,
+ annote = {Practitioners typically agree that typefaces have
+personas, and they often suggest specific personas for specific
+typefaces, but these guidelines rely on craftlore rather than on
+empirical evidence. Research on typography has focused primarily on
+readability and legibility issues; there have been few studies
+investigating the personas of typefaces. There is a clear gap in the
+research. With the increased flexibility in design that comes with
+more sophisticated desktop publishing technology, with an ongoing
+shift from printed to electronic documents, and with a growing
+emphasis on visual communication, this gap is becoming increasingly
+important to the field of technical communication. The studies
+discussed here provide strong empirical support for the notion that
+readers ascribe personality attributes both to typefaces and to text
+passages. The data provide a foundation for investigation of the
+interactions between typeface and text persona.} }
+
+
+@Article{Brumberger03b,
+ author = {Brumberger, Eva R.},
+ title = {The Rhetoric of Typography: The Awareness and
+ Impact of Typeface Appropriateness},
+ journal = {Technical Communication},
+ year = 2003,
+ volume = 50,
+ number = 2,
+ pages = {224--231},
+ score = 8,
+ annote = {Technical communicators have an emerging body of research
+ in visual rhetoric on which to build our practice, but little of
+ that work has focused on the rhetorical role of typography. The
+ majority of studies focused on typography have examined instead its
+ role in readability and legibility. A handful of studies have
+ investigated typeface persona, exploring the notion that typefaces
+ carry with them a message distinct from that of the verbal text that
+ they represent, and an additional few have investigated the issue of
+ typeface suitability. The studies presented here extend this
+ discussion by investigating whether clashes in typeface and text
+ persona affect readers\u2019 perceptions of the text.} }
+
+
+
+@Article{Brumberger04,
+ author = {Brumberger, Eva},
+ title = {The Rhetoric of Typography: Effects on Reading
+ Time, Reading Comprehension, and Perceptions of
+ Ethos},
+ journal = {Technical Communication},
+ year = 2004,
+ volume = 51,
+ number = 1,
+ pages = {13--24},
+ score = 9,
+ annote = {Asserts that typography has not occupied a
+ significant role in discussions of visual rhetoric.
+ Extends those discussions by investigating whether
+ typeface persona shapes readers' interactions with a
+ document.}
+}
+
+@Book{Bartram04,
+ author = {Alan Bartram},
+ title = {Bauhaus, Modernism and the Illustrated Book},
+ publisher = {Yale University Press},
+ year = 2004,
+ address = {New Haven, CT},
+ score = 14,
+}
+
+@Book{Tschichold91:FormBook,
+ author = {Jan Tschichold},
+ editor = {Robert Bringhurst},
+ title = {The Form of the Book.
+ Essays on the Morality of Good Design},
+ publisher = {Hartley \& Marks},
+ year = 1991,
+ address = {Point Roberts, Washington},
+ score = 25
+}
+
+
+
+@book{bringhurst2004elements,
+ title={The Elements of Typographic Style},
+ author={Bringhurst, Robert},
+ isbn={9780881792065},
+ lccn={2004053913},
+ year={2004},
+ publisher={Hartley \& Marks, Publishers},
+ address = {Vancouver, BC, Canada},
+ score = 22,
+}
+
+
+@Book{Tschichold98:NewTypography,
+ author = {Jan Tschichold},
+ title = {The New Typography},
+ publisher = {University of California Press},
+ year = 1998,
+ address = {Berkeley and Los Angelos, CA},
+ score = 24,
+}
+
+@Article{Legge11,
+ author = {Gordon E. Legge and Charles A. Bigelow},
+ title = {Does Print Size Matter for Reading?
+ {A} Review of Findings
+ from Vision Science and Typography},
+ journal = {J. Vision},
+ year = 2011,
+ volume = {11(5)},
+ number = 8,
+ pages = {1--22},
+ score = 23,
+ annote = {The size and shape of printed symbols determine the
+legibility of text. In this paper, we focus on print size because of
+its crucial role in understanding reading performance and its
+significance in the history and contemporary practice of
+typography. We present evidence supporting the hypothesis that the
+distribution of print sizes in historical and contemporary
+publications falls within the psychophysically defined range of fluent
+print sizeVthe range over which text can be read at maximum speed. The
+fluent range extends over a factor of 10 in angular print size
+(x-height) from approximately 0.2- to 2-. Assuming a standard reading
+distance of 40 cm (16 inches), the corresponding physical x-heights
+are 1.4 mm (4 points) and 14 mm (40 points). We provide new data on
+the distributions of print sizes in published books and newspapers and
+in typefounders' specimens, and consider factors influencing these
+distributions. We discuss theoretical concepts from vision science
+concerning visual size coding that help inform our understanding of
+historical and modern typographical practices. While economic,
+social, technological, and artistic factors influence type design and
+selection, we conclude that properties of human visual processing play
+a dominant role in constraining the distribution of print sizes in
+common use. } }
+
+@Book{Spiekermann02,
+ author = {Erik Spiekermann and E. M. Ginger},
+ title = {Stop Stealing Sheep \& Find Out How Type Works},
+ publisher = {Adobe Press},
+ year = 2002,
+ address = {Berkeley, CA},
+ edition = {Second},
+ score = 16,
+ ISBN = {978-0201703399}
+}
+
+@InProceedings{Morris02,
+ author = {Morris, R. A. and Aquilante, K. and Yager, D. and
+ Bigelow, C.},
+ title = {Serifs Slow {RSVP} Reading At Very Small Sizes But Don't
+ Matter At Larger Sizes},
+ booktitle = {SID 2002, San Jose, CA: Digest of Technical Papers},
+ pages = {244--247},
+ year = 2002,
+ score = 19,
+ organization = {The Society for Information Display},
+ annote = {Morris, Aquilante, Yager and Bigelow (2002) did find an
+effect of serifs on reading speed, unlike Arditi and Cho. These
+investigators used specially designed versions of the Lucida typeface
+family (Bigelow and Holmes Inc., San Jose, CA), one with serifs and
+one without serifs. Although typical serif and sans-serif fonts differ
+in a variety of attributes, the specially designed Lucida fonts were
+almost identical, apart from the presence or absence of
+serifs. According to Morris et al: "the designers produced a seriffed
+and sans-serif pair whose underlying forms are identical in stem
+weights, character widths, character spacing and fitting, and
+modulation of thick to thin. The only difference is the presence or
+absence of serifs, and the slight increase of black area in the
+seriffed variant." The investigators used the rapid serial visual
+presentation (RSVP) method to measure reading speed for the two font
+variants. For a small print size of 12 min-arc (probably near the
+critical print size, Section 3.2), reading speed was about 20% faster
+for the sans-serif font, but there was no difference in reading speed
+at a larger print size of 48 min-arc} }
+
+@book{Jaspert:TypefacesEncyclopaedia,
+ title={The Encyclop\ae dia of Typefaces},
+ author={Jaspert, W. P. and Berry, W. T. and Johnson, A. F.},
+ year= 2009,
+ publisher={Cassell},
+ edition = {55th Anniversary},
+ address = {London}
+}
diff --git a/biblio/bibtex/contrib/bib-fr/CHANGELOG b/biblio/bibtex/contrib/bib-fr/CHANGELOG
new file mode 100644
index 0000000000..c86695a049
--- /dev/null
+++ b/biblio/bibtex/contrib/bib-fr/CHANGELOG
@@ -0,0 +1,21 @@
+v1.0 2002/08/01 First release
+v1.1 2002/11/24 month names should begin
+ with a lowercase letter
+v1.2 2003/05/25 you can now configure the
+ punctuation following
+ the authors
+v1.3 2003/07/09 no comma before fr.and ("et")
+ in author/editor lists.
+ "\string:" instead of ":" in
+ journal references.
+ fix a bug with fr.add.period
+v1.4 2004/03/06 no comma before fr.and ("et")
+ (easier method ;-))
+ "\string:" made configurable
+ fix several minor mistakes.
+ added apalike-fr.bst
+ ieeetr-fr.bst
+ siam-fr.bst
+ {abbrv,plain,unsrt}nat-fr.bst
+v1.5 2005/10/16 corrected a bug in *-nat-fr styles.
+ (thanks to Franois Druel).
diff --git a/biblio/bibtex/contrib/bib-fr/README b/biblio/bibtex/contrib/bib-fr/README
new file mode 100644
index 0000000000..d867e7255c
--- /dev/null
+++ b/biblio/bibtex/contrib/bib-fr/README
@@ -0,0 +1,10 @@
+v1.5 Sun Oct 16 16:32:32 CEST 2005
+
+These files are French translations of the classical
+BibTeX style files. The translations can easily be
+modified by simply redefining FUNCTIONs named fr.*,
+at the beginning (lines 50-150) of each file.
+If you modify anything, however, please change the
+name of the file.
+
+NM <markey@lsv.ens-cachan.fr>
diff --git a/biblio/bibtex/contrib/bib-fr/abbrv-fr.bst b/biblio/bibtex/contrib/bib-fr/abbrv-fr.bst
new file mode 100644
index 0000000000..119cf7c061
--- /dev/null
+++ b/biblio/bibtex/contrib/bib-fr/abbrv-fr.bst
@@ -0,0 +1,1234 @@
+%%
+%% Bib. style "abbrv-fr" (version francisee de abbrv.bst)
+%%
+%% NM, 2004/02/22
+%% markey@lsv.ens-cachan.fr
+%%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% Original Copyright (Oren Patashnik):
+%%
+ % This program may be distributed and/or modified under the
+ % conditions of the LaTeX Project Public License, either version 1.2
+ % of this license or (at your option) any later version.
+ % The latest version of this license is in
+ % http://www.latex-project.org/lppl.txt
+ % and version 1.2 or later is part of all distributions of LaTeX
+ % version 1999/12/01 or later.
+ %
+ % This program consists of the files abbrv.bst
+ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+
+ENTRY
+ { address
+ author
+ booktitle
+ chapter
+ edition
+ editor
+ howpublished
+ institution
+ journal
+ key
+ month
+ note
+ number
+ organization
+ pages
+ publisher
+ school
+ series
+ title
+ type
+ volume
+ year
+ }
+ {}
+ { label }
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%%
+%% C'est ici que je definis les "traductions". Normalement, y a
+%% que ca a changer pour franciser le style...
+%%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+FUNCTION{fr.and}{ %% le "et" entre les deux derniers auteurs
+" et "
+}
+
+FUNCTION{fr.editeur}{ %% ", \'editeur" au singulier, ou " (\'editeur)"...
+", \'ed."
+}
+
+FUNCTION{fr.editeurs}{ %% ", \'editeurs" au pluriel, ou " (\'editeurs)"...
+", \'eds"
+}
+
+FUNCTION{fr.et.al}{ %% " et~al."
+" \emph{et~al.}"
+}
+
+FUNCTION{fr.in}{ %% "Dans "
+"\emph{In} "
+}
+
+FUNCTION{fr.in.spc}{ %% " de " (ou " de la s\'erie ")
+" de "
+}
+
+FUNCTION{fr.of}{ %% " de "
+" de "
+}
+
+FUNCTION{fr.number}{ %% "num. "
+"num. "
+}
+
+FUNCTION{fr.number.maj}{ %% "Num. "
+"Num. "
+}
+
+FUNCTION{fr.volume}{ %% "volume"
+"vol."
+}
+
+FUNCTION{fr.volume.maj}{ %% "Volume"
+"Vol."
+}
+
+FUNCTION{fr.edition}{ %% " \'edn"
+" \'edn"
+}
+
+FUNCTION{fr.pages}{ %% "p."
+"p."
+}
+
+FUNCTION{fr.page}{ %% "p."
+"p."
+}
+
+FUNCTION{fr.chapter}{ %% "chap."
+"chap."
+}
+
+FUNCTION{fr.tech.rep}{ %% "Rap. Tech."
+"Rap. tech."
+}
+
+FUNCTION{fr.master}{ %% "M\'emoire de D.E.A."
+"M\'emoire de D.E.A."
+}
+
+FUNCTION{fr.phd}{ %% "Th\`ese de doctorat"
+"Th\`ese de doctorat"
+}
+
+FUNCTION{fr.auteurs.style}{
+ %% si on veut des small caps sur le LASTNAME de l'auteur
+ %% Cette fonction est utilisee dans la definition d'une
+ %% fonction LaTeX.
+"\scshape"
+}
+
+FUNCTION{fr.ponctuation.apres.auteurs}{ %% Comme son nom l'indique...
+" : "
+}
+
+FUNCTION{fr.deuxpoints}{ %% Pour eviter l'espace avant les ":".
+"\string:\penalty500\relax "
+}
+
+MACRO {jan} {"jan."}
+MACRO {feb} {"f\'ev."}
+MACRO {mar} {"mars"}
+MACRO {apr} {"avr."}
+MACRO {may} {"mai"}
+MACRO {jun} {"juin"}
+MACRO {jul} {"juil."}
+MACRO {aug} {"ao\^ut"}
+MACRO {sep} {"sept."}
+MACRO {oct} {"oct."}
+MACRO {nov} {"nov."}
+MACRO {dec} {"d\'ec."}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%%
+%% La suite, normalement, y a rien a changer...
+%%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+
+
+
+
+INTEGERS { output.state before.all mid.sentence after.sentence after.block after.authors }
+
+FUNCTION {init.state.consts}
+{ #0 'before.all :=
+ #1 'mid.sentence :=
+ #2 'after.sentence :=
+ #3 'after.block :=
+ #0 'after.authors :=
+}
+
+STRINGS { s t }
+
+FUNCTION{ fr.add.period }{
+after.authors
+ { fr.ponctuation.apres.auteurs empty$
+ { add.period$ }
+ { fr.ponctuation.apres.auteurs * #0 'after.authors := }
+ if$}
+ { add.period$ }
+if$
+}
+
+FUNCTION {output.nonnull}
+{ 's :=
+ output.state mid.sentence =
+ { ", " * write$ }
+ { output.state after.block =
+ { fr.add.period write$
+ newline$
+ "\newblock " write$
+ }
+ { output.state before.all =
+ 'write$
+ { add.period$ " " * write$ }
+ if$
+ }
+ if$
+ mid.sentence 'output.state :=
+ }
+ if$
+ s
+}
+
+FUNCTION {output}
+{ duplicate$ empty$
+ 'pop$
+ 'output.nonnull
+ if$
+}
+
+FUNCTION {output.check}
+{ 't :=
+ duplicate$ empty$
+ { pop$ "empty " t * " in " * cite$ * warning$ }
+ 'output.nonnull
+ if$
+}
+
+FUNCTION {output.bibitem}
+{ newline$
+ "\bibitem{" write$
+ cite$ write$
+ "}" write$
+ newline$
+ ""
+ before.all 'output.state :=
+}
+
+FUNCTION {fin.entry}
+{ add.period$
+ write$
+ newline$
+}
+
+FUNCTION {new.block}
+{ output.state before.all =
+ 'skip$
+ { after.block 'output.state := }
+ if$
+}
+
+FUNCTION {new.sentence}
+{ output.state after.block =
+ 'skip$
+ { output.state before.all =
+ 'skip$
+ { after.sentence 'output.state := }
+ if$
+ }
+ if$
+}
+
+FUNCTION {not}
+{ { #0 }
+ { #1 }
+ if$
+}
+
+FUNCTION {and}
+{ 'skip$
+ { pop$ #0 }
+ if$
+}
+
+FUNCTION {or}
+{ { pop$ #1 }
+ 'skip$
+ if$
+}
+
+FUNCTION {new.block.checka}
+{ empty$
+ 'skip$
+ 'new.block
+ if$
+}
+
+FUNCTION {new.block.checkb}
+{ empty$
+ swap$ empty$
+ and
+ 'skip$
+ 'new.block
+ if$
+}
+
+FUNCTION {new.sentence.checka}
+{ empty$
+ 'skip$
+ 'new.sentence
+ if$
+}
+
+FUNCTION {new.sentence.checkb}
+{ empty$
+ swap$ empty$
+ and
+ 'skip$
+ 'new.sentence
+ if$
+}
+
+FUNCTION {field.or.null}
+{ duplicate$ empty$
+ { pop$ "" }
+ 'skip$
+ if$
+}
+
+FUNCTION {emphasize}
+{ duplicate$ empty$
+ { pop$ "" }
+ { "{\em " swap$ * "}" * }
+ if$
+}
+
+INTEGERS { nameptr namesleft numnames }
+
+FUNCTION {format.names}
+{ 's :=
+ #1 'nameptr :=
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ { s nameptr "{f.~}{vv~}\bgroup\fonteauteurs\bgroup {ll}\egroup\egroup{{}}{, jj}" format.name$ 't :=
+ nameptr #1 >
+ { namesleft #1 >
+ { ", " * t * }
+ { %numnames #2 > namesleft #2 > and
+ % { "," * }
+ % 'skip$
+ %if$
+ t "\bgroup\fonteauteurs\bgroup others\egroup\egroup{}" =
+ { fr.et.al * }
+ { fr.and * t * }
+ if$
+ }
+ if$
+ }
+ 't
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+}
+
+FUNCTION {format.authors}
+{ author empty$
+ { "" }
+ { author format.names #1 'after.authors := }
+ if$
+}
+
+FUNCTION {format.editors}
+{ editor empty$
+ { "" }
+ { editor format.names
+ editor num.names$ #1 >
+ { fr.editeurs * }
+ { fr.editeur * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.title}
+{ title empty$
+ { "" }
+ { title "t" change.case$ }
+ if$
+}
+
+FUNCTION {n.dashify}
+{ 't :=
+ ""
+ { t empty$ not }
+ { t #1 #1 substring$ "-" =
+ { t #1 #2 substring$ "--" = not
+ { "--" *
+ t #2 global.max$ substring$ 't :=
+ }
+ { { t #1 #1 substring$ "-" = }
+ { "-" *
+ t #2 global.max$ substring$ 't :=
+ }
+ while$
+ }
+ if$
+ }
+ { t #1 #1 substring$ *
+ t #2 global.max$ substring$ 't :=
+ }
+ if$
+ }
+ while$
+}
+
+FUNCTION {format.date}
+{ year empty$
+ { month empty$
+ { "" }
+ { "there's a month but no year in " cite$ * warning$
+ month
+ }
+ if$
+ }
+ { month empty$
+ 'year
+ { month " " * year * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.btitle}
+{ title emphasize
+}
+
+FUNCTION {tie.or.space.connect}
+{ duplicate$ text.length$ #3 <
+ { "~" }
+ { " " }
+ if$
+ swap$ * *
+}
+
+FUNCTION {either.or.check}
+{ empty$
+ 'pop$
+ { "can't use both " swap$ * " fields in " * cite$ * warning$ }
+ if$
+}
+
+FUNCTION {format.bvolume}
+{ volume empty$
+ { "" }
+ { fr.volume volume tie.or.space.connect
+ series empty$
+ 'skip$
+ { fr.of * series emphasize * }
+ if$
+ "volume and number" number either.or.check
+ }
+ if$
+}
+
+FUNCTION {format.number.series}
+{ volume empty$
+ { number empty$
+ { series field.or.null }
+ { output.state mid.sentence =
+ { fr.number }
+ { fr.number.maj }
+ if$
+ number tie.or.space.connect
+ series empty$
+ { "there's a number but no series in " cite$ * warning$ }
+ { fr.in.spc * series * }
+ if$
+ }
+ if$
+ }
+ { "" }
+ if$
+}
+
+FUNCTION {format.edition}
+{ edition empty$
+ { "" }
+ { output.state mid.sentence =
+ { edition "l" change.case$ fr.edition * }
+ { edition "t" change.case$ fr.edition * }
+ if$
+ }
+ if$
+}
+
+INTEGERS { multiresult }
+
+FUNCTION {multi.page.check}
+{ 't :=
+ #0 'multiresult :=
+ { multiresult not
+ t empty$ not
+ and
+ }
+ { t #1 #1 substring$
+ duplicate$ "-" =
+ swap$ duplicate$ "," =
+ swap$ "+" =
+ or or
+ { #1 'multiresult := }
+ { t #2 global.max$ substring$ 't := }
+ if$
+ }
+ while$
+ multiresult
+}
+
+FUNCTION {format.pages}
+{ pages empty$
+ { "" }
+ { pages multi.page.check
+ { fr.pages pages n.dashify tie.or.space.connect }
+ { fr.page pages tie.or.space.connect }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.vol.num.pages}
+{ volume field.or.null
+ number empty$
+ 'skip$
+ { "(" number * ")" * *
+ volume empty$
+ { "there's a number but no volume in " cite$ * warning$ }
+ 'skip$
+ if$
+ }
+ if$
+ pages empty$
+ 'skip$
+ { duplicate$ empty$
+ { pop$ format.pages }
+ { fr.deuxpoints * pages n.dashify * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.chapter.pages}
+{ chapter empty$
+ 'format.pages
+ { type empty$
+ { fr.chapter }
+ { type "l" change.case$ }
+ if$
+ chapter tie.or.space.connect
+ pages empty$
+ 'skip$
+ { ", " * format.pages * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.in.ed.booktitle}
+{ booktitle empty$
+ { "" }
+ { editor empty$
+ { fr.in booktitle emphasize * }
+ { fr.in format.editors #1 'after.authors := fr.add.period " " * * booktitle emphasize * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {empty.misc.check}
+{ author empty$ title empty$ howpublished empty$
+ month empty$ year empty$ note empty$
+ and and and and and
+ key empty$ not and
+ { "all relevant fields are empty in " cite$ * warning$ }
+ 'skip$
+ if$
+}
+
+FUNCTION {format.thesis.type}
+{ type empty$
+ 'skip$
+ { pop$
+ type "t" change.case$
+ }
+ if$
+}
+
+FUNCTION {format.tr.number}
+{ type empty$
+ { fr.tech.rep }
+ 'type
+ if$
+ number empty$
+ { "t" change.case$ }
+ { number tie.or.space.connect }
+ if$
+}
+
+FUNCTION {format.article.crossref}
+{ key empty$
+ { journal empty$
+ { "need key or journal for " cite$ * " to crossref " * crossref *
+ warning$
+ ""
+ }
+ { fr.in "{\em " * journal * "\/}" * }
+ if$
+ }
+ { fr.in key * }
+ if$
+ " \cite{" * crossref * "}" *
+}
+
+FUNCTION {format.crossref.editor}
+{ editor #1 "{vv~}\bgroup\fonteauteurs\bgroup {ll}\egroup\egroup{{}}" format.name$
+ editor num.names$ duplicate$
+ #2 >
+ { pop$ fr.et.al * }
+ { #2 <
+ 'skip$
+ { editor #2 "{ff }{vv }{ll}{ jj}" format.name$ "others" =
+ { fr.et.al * }
+ { fr.and * editor #2 "{vv~}\bgroup\fonteauteurs\bgroup {ll}\egroup\egroup{{}}" format.name$ * }
+ if$
+ }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.book.crossref}
+{ volume empty$
+ { "empty volume in " cite$ * "'s crossref of " * crossref * warning$
+ fr.in
+ }
+ { fr.volume.maj volume tie.or.space.connect
+ fr.of *
+ }
+ if$
+ editor empty$
+ editor field.or.null author field.or.null =
+ or
+ { key empty$
+ { series empty$
+ { "need editor, key, or series for " cite$ * " to crossref " *
+ crossref * warning$
+ "" *
+ }
+ { "{\em " * series * "\/}" * }
+ if$
+ }
+ { key * }
+ if$
+ }
+ { format.crossref.editor * }
+ if$
+ " \cite{" * crossref * "}" *
+}
+
+FUNCTION {format.incoll.inproc.crossref}
+{ editor empty$
+ editor field.or.null author field.or.null =
+ or
+ { key empty$
+ { booktitle empty$
+ { "need editor, key, or booktitle for " cite$ * " to crossref " *
+ crossref * warning$
+ ""
+ }
+ { fr.in "{\em " * booktitle * "\/}" * }
+ if$
+ }
+ { fr.in key * }
+ if$
+ }
+ { fr.in format.crossref.editor * }
+ if$
+ " \cite{" * crossref * "}" *
+}
+
+FUNCTION {article}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.title "title" output.check
+ new.block
+ crossref missing$
+ { journal emphasize "journal" output.check
+ format.vol.num.pages output
+ format.date "year" output.check
+ }
+ { format.article.crossref output.nonnull
+ format.pages output
+ }
+ if$
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {book}
+{ output.bibitem
+ author empty$
+ { format.editors "author and editor" output.check }
+ { format.authors output.nonnull
+ crossref missing$
+ { "author and editor" editor either.or.check }
+ 'skip$
+ if$
+ }
+ if$
+ new.block
+ format.btitle "title" output.check
+ crossref missing$
+ { format.bvolume output
+ new.block
+ format.number.series output
+ new.sentence
+ publisher "publisher" output.check
+ address output
+ }
+ { new.block
+ format.book.crossref output.nonnull
+ }
+ if$
+ format.edition output
+ format.date "year" output.check
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {booklet}
+{ output.bibitem
+ format.authors output
+ new.block
+ format.title "title" output.check
+ howpublished address new.block.checkb
+ howpublished output
+ address output
+ format.date output
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {inbook}
+{ output.bibitem
+ author empty$
+ { format.editors "author and editor" output.check }
+ { format.authors output.nonnull
+ crossref missing$
+ { "author and editor" editor either.or.check }
+ 'skip$
+ if$
+ }
+ if$
+ new.block
+ format.btitle "title" output.check
+ crossref missing$
+ { format.bvolume output
+ format.chapter.pages "chapter and pages" output.check
+ new.block
+ format.number.series output
+ new.sentence
+ publisher "publisher" output.check
+ address output
+ }
+ { format.chapter.pages "chapter and pages" output.check
+ new.block
+ format.book.crossref output.nonnull
+ }
+ if$
+ format.edition output
+ format.date "year" output.check
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {incollection}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.title "title" output.check
+ new.block
+ crossref missing$
+ { format.in.ed.booktitle "booktitle" output.check
+ format.bvolume output
+ format.number.series output
+ format.chapter.pages output
+ new.sentence
+ publisher "publisher" output.check
+ address output
+ format.edition output
+ format.date "year" output.check
+ }
+ { format.incoll.inproc.crossref output.nonnull
+ format.chapter.pages output
+ }
+ if$
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {inproceedings}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.title "title" output.check
+ new.block
+ crossref missing$
+ { format.in.ed.booktitle "booktitle" output.check
+ format.bvolume output
+ format.number.series output
+ format.pages output
+ address empty$
+ { organization publisher new.sentence.checkb
+ organization output
+ publisher output
+ format.date "year" output.check
+ }
+ { address output.nonnull
+ format.date "year" output.check
+ new.sentence
+ organization output
+ publisher output
+ }
+ if$
+ }
+ { format.incoll.inproc.crossref output.nonnull
+ format.pages output
+ }
+ if$
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {conference} { inproceedings }
+
+FUNCTION {manual}
+{ output.bibitem
+ author empty$
+ { organization empty$
+ 'skip$
+ { organization output.nonnull
+ address output
+ }
+ if$
+ }
+ { format.authors output.nonnull }
+ if$
+ new.block
+ format.btitle "title" output.check
+ author empty$
+ { organization empty$
+ { address new.block.checka
+ address output
+ }
+ 'skip$
+ if$
+ }
+ { organization address new.block.checkb
+ organization output
+ address output
+ }
+ if$
+ format.edition output
+ format.date output
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {mastersthesis}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.title "title" output.check
+ new.block
+ fr.master format.thesis.type output.nonnull
+ school "school" output.check
+ address output
+ format.date "year" output.check
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {misc}
+{ output.bibitem
+ format.authors output
+ title howpublished new.block.checkb
+ format.title output
+ howpublished new.block.checka
+ howpublished output
+ format.date output
+ new.block
+ note output
+ fin.entry
+ empty.misc.check
+}
+
+FUNCTION {phdthesis}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.btitle "title" output.check
+ new.block
+ fr.phd format.thesis.type output.nonnull
+ school "school" output.check
+ address output
+ format.date "year" output.check
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {proceedings}
+{ output.bibitem
+ editor empty$
+ { organization output }
+ { format.editors output.nonnull }
+ if$
+ new.block
+ format.btitle "title" output.check
+ format.bvolume output
+ format.number.series output
+ address empty$
+ { editor empty$
+ { publisher new.sentence.checka }
+ { organization publisher new.sentence.checkb
+ organization output
+ }
+ if$
+ publisher output
+ format.date "year" output.check
+ }
+ { address output.nonnull
+ format.date "year" output.check
+ new.sentence
+ editor empty$
+ 'skip$
+ { organization output }
+ if$
+ publisher output
+ }
+ if$
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {techreport}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.title "title" output.check
+ new.block
+ format.tr.number output.nonnull
+ institution "institution" output.check
+ address output
+ format.date "year" output.check
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {unpublished}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.title "title" output.check
+ new.block
+ note "note" output.check
+ format.date output
+ fin.entry
+}
+
+FUNCTION {default.type} { misc }
+
+MACRO {acmcs} {"ACM Comput. Surv."}
+MACRO {acta} {"Acta Inf."}
+MACRO {cacm} {"Commun. ACM"}
+MACRO {ibmjrd} {"IBM J. Res. Dev."}
+MACRO {ibmsj} {"IBM Syst.~J."}
+MACRO {ieeese} {"IEEE Trans. Softw. Eng."}
+MACRO {ieeetc} {"IEEE Trans. Comput."}
+MACRO {ieeetcad}
+ {"IEEE Trans. Comput.-Aided Design Integrated Circuits"}
+MACRO {ipl} {"Inf. Process. Lett."}
+MACRO {jacm} {"J.~ACM"}
+MACRO {jcss} {"J.~Comput. Syst. Sci."}
+MACRO {scp} {"Sci. Comput. Programming"}
+MACRO {sicomp} {"SIAM J. Comput."}
+MACRO {tocs} {"ACM Trans. Comput. Syst."}
+MACRO {tods} {"ACM Trans. Database Syst."}
+MACRO {tog} {"ACM Trans. Gr."}
+MACRO {toms} {"ACM Trans. Math. Softw."}
+MACRO {toois} {"ACM Trans. Office Inf. Syst."}
+MACRO {toplas} {"ACM Trans. Prog. Lang. Syst."}
+MACRO {tcs} {"Theoretical Comput. Sci."}
+
+READ
+
+FUNCTION {sortify}
+{ purify$
+ "l" change.case$
+}
+
+INTEGERS { len }
+
+FUNCTION {chop.word}
+{ 's :=
+ 'len :=
+ s #1 len substring$ =
+ { s len #1 + global.max$ substring$ }
+ 's
+ if$
+}
+
+FUNCTION {sort.format.names}
+{ 's :=
+ #1 'nameptr :=
+ ""
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ { nameptr #1 >
+ { " " * }
+ 'skip$
+ if$
+ s nameptr "{vv{ } }{ll{ }}{ f{ }}{ jj{ }}" format.name$ 't :=
+ nameptr numnames = t "others" = and
+ { "et al" * }
+ { t sortify * }
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+}
+
+FUNCTION {sort.format.title}
+{ 't :=
+ "Le " #3
+ "La " #3
+ "Les " #4
+ "Un " #3
+ "Une " #4
+ "Des " #4
+ "A " #2
+ "An " #3
+ "The " #4 t chop.word
+ chop.word
+ chop.word
+ chop.word
+ chop.word
+ chop.word
+ chop.word
+ chop.word
+ chop.word
+ sortify
+ #1 global.max$ substring$
+}
+
+FUNCTION {author.sort}
+{ author empty$
+ { key empty$
+ { "to sort, need author or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { author sort.format.names }
+ if$
+}
+
+FUNCTION {author.editor.sort}
+{ author empty$
+ { editor empty$
+ { key empty$
+ { "to sort, need author, editor, or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { editor sort.format.names }
+ if$
+ }
+ { author sort.format.names }
+ if$
+}
+
+FUNCTION {author.organization.sort}
+{ author empty$
+ { organization empty$
+ { key empty$
+ { "to sort, need author, organization, or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { "Le " #3
+ "La " #3
+ "Les " #4
+ "The " #4 organization chop.word
+ chop.word
+ chop.word
+ chop.word
+ sortify }
+ if$
+ }
+ { author sort.format.names }
+ if$
+}
+
+FUNCTION {editor.organization.sort}
+{ editor empty$
+ { organization empty$
+ { key empty$
+ { "to sort, need editor, organization, or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { "Le " #3
+ "La " #3
+ "Les " #4
+ "The " #4 organization chop.word
+ chop.word
+ chop.word
+ chop.word
+ sortify }
+ if$
+ }
+ { editor sort.format.names }
+ if$
+}
+
+FUNCTION {presort}
+{ type$ "book" =
+ type$ "inbook" =
+ or
+ 'author.editor.sort
+ { type$ "proceedings" =
+ 'editor.organization.sort
+ { type$ "manual" =
+ 'author.organization.sort
+ 'author.sort
+ if$
+ }
+ if$
+ }
+ if$
+ " "
+ *
+ year field.or.null sortify
+ *
+ " "
+ *
+ title field.or.null
+ sort.format.title
+ *
+ #1 entry.max$ substring$
+ 'sort.key$ :=
+}
+
+ITERATE {presort}
+
+SORT
+
+STRINGS { longest.label }
+
+INTEGERS { number.label longest.label.width }
+
+FUNCTION {initialize.longest.label}
+{ "" 'longest.label :=
+ #1 'number.label :=
+ #0 'longest.label.width :=
+}
+
+FUNCTION {longest.label.pass}
+{ number.label int.to.str$ 'label :=
+ number.label #1 + 'number.label :=
+ label width$ longest.label.width >
+ { label 'longest.label :=
+ label width$ 'longest.label.width :=
+ }
+ 'skip$
+ if$
+}
+
+EXECUTE {initialize.longest.label}
+
+ITERATE {longest.label.pass}
+
+FUNCTION {begin.bib}
+{ preamble$ empty$
+ 'skip$
+ { preamble$ write$ newline$ }
+ if$
+ "\begin{thebibliography}{" longest.label * "}" * write$ newline$
+ "\expandafter\ifx\csname fonteauteurs\endcsname\relax"
+ write$ newline$
+ "\def\fonteauteurs{" fr.auteurs.style * "}\fi" * write$ newline$
+}
+
+EXECUTE {begin.bib}
+
+EXECUTE {init.state.consts}
+
+ITERATE {call.type$}
+
+FUNCTION {end.bib}
+{ newline$
+ "\end{thebibliography}" write$ newline$
+}
+
+EXECUTE {end.bib}
+
+
+%%
+%% Changelog :
+%% 1.0 -> 1.1 : les mois ne prennent pas de majuscule
+%% 1.1 -> 1.2 : le '.' qui suit la liste des auteurs peut etre
+%% change en autre chose (':' notamment).
+%%
diff --git a/biblio/bibtex/contrib/bib-fr/abbrvnat-fr.bst b/biblio/bibtex/contrib/bib-fr/abbrvnat-fr.bst
new file mode 100644
index 0000000000..9b949e01df
--- /dev/null
+++ b/biblio/bibtex/contrib/bib-fr/abbrvnat-fr.bst
@@ -0,0 +1,1506 @@
+%%
+%% Bib. style "abbrvnat-fr" (version francisee de abbrvnat.bst)
+%%
+%% NM, 2005/10/16
+%% markey@lsv.ens-cachan.fr
+%%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% Original Copyright (Patrick Daly):
+%%
+%% File: `abbrvnat.bst'
+%% A modification of `abbrv.bst' for use with natbib package
+%%
+%% Copyright 1993-1999 Patrick W Daly
+%% Max-Planck-Institut f\"ur Aeronomie
+%% Max-Planck-Str. 2
+%% D-37191 Katlenburg-Lindau
+%% Germany
+%% E-mail: daly@linmpi.mpg.de
+%%
+%% This program can be redistributed and/or modified under the terms
+%% of the LaTeX Project Public License Distributed from CTAN
+%% archives in directory macros/latex/base/lppl.txt; either
+%% version 1 of the License, or any later version.
+%%
+ % Version and source file information:
+ % \ProvidesFile{natbst.mbs}[1999/05/11 1.6 (PWD)]
+ %
+ % BibTeX `plainnat' family
+ % version 0.99b for BibTeX versions 0.99a or later,
+ % for LaTeX versions 2.09 and 2e.
+ %
+ % For use with the `natbib.sty' package; emulates the corresponding
+ % member of the `plain' family, but with author-year citations.
+ %
+ % With version 6.0 of `natbib.sty', it may also be used for numerical
+ % citations, while retaining the commands \citeauthor, \citefullauthor,
+ % and \citeyear to print the corresponding information.
+ %
+ % For version 7.0 of `natbib.sty', the KEY field replaces missing
+ % authors/editors, and the date is left blank in \bibitem.
+ %
+ % Includes fields ISBN and ISSN.
+ %
+ % Includes field URL for Internet addresses (best used with
+ % with the url.sty package of Donald Arseneau
+ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+ENTRY
+ { address
+ author
+ booktitle
+ chapter
+ edition
+ editor
+ howpublished
+ institution
+ isbn
+ issn
+ journal
+ key
+ month
+ note
+ number
+ organization
+ pages
+ publisher
+ school
+ series
+ title
+ type
+ url
+ volume
+ year
+ }
+ {}
+ { label extra.label sort.label short.list }
+
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%%
+%% C'est ici que je definis les "traductions". Normalement, y a
+%% que ca a changer pour franciser le style...
+%%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+FUNCTION{fr.and}{ %% le "et" entre les deux derniers auteurs
+" et "
+}
+
+FUNCTION{fr.editeur}{ %% ", \'editeur" au singulier, ou " (\'editeur)"...
+", \'ed."
+}
+
+FUNCTION{fr.editeurs}{ %% ", \'editeurs" au pluriel, ou " (\'editeurs)"...
+", \'eds"
+}
+
+FUNCTION{fr.et.al}{ %% " et~al."
+" \emph{et~al.}"
+}
+
+FUNCTION{fr.in}{ %% "Dans "
+"\emph{In} "
+}
+
+FUNCTION{fr.in.spc}{ %% " de " (ou " de la s\'erie ")
+" de "
+}
+
+FUNCTION{fr.of}{ %% " de "
+" de "
+}
+
+FUNCTION{fr.number}{ %% "num. "
+"num. "
+}
+
+FUNCTION{fr.number.maj}{ %% "Num. "
+"Num. "
+}
+
+FUNCTION{fr.volume}{ %% "volume"
+"vol."
+}
+
+FUNCTION{fr.volume.maj}{ %% "Volume"
+"Vol."
+}
+
+FUNCTION{fr.edition}{ %% " \'edn"
+" \'edn"
+}
+
+FUNCTION{fr.pages}{ %% "p."
+"p."
+}
+
+FUNCTION{fr.page}{ %% "p."
+"p."
+}
+
+FUNCTION{fr.chapter}{ %% "chap."
+"chap."
+}
+
+FUNCTION{fr.tech.rep}{ %% "Rap. Tech."
+"Rap. tech."
+}
+
+FUNCTION{fr.master}{ %% "M\'emoire de D.E.A."
+"M\'emoire de D.E.A."
+}
+
+FUNCTION{fr.phd}{ %% "Th\`ese de doctorat"
+"Th\`ese de doctorat"
+}
+
+FUNCTION{fr.auteurs.style}{
+ %% si on veut des small caps sur le LASTNAME de l'auteur
+ %% Cette fonction est utilisee dans la definition d'une
+ %% fonction LaTeX.
+"\scshape"
+}
+
+FUNCTION{fr.ponctuation.apres.auteurs}{ %% Comme son nom l'indique...
+" : "
+}
+
+FUNCTION{fr.deuxpoints}{ %% Pour eviter l'espace avant les ":".
+"\string:\penalty500\relax "
+}
+
+MACRO {jan} {"jan."}
+MACRO {feb} {"f\'ev."}
+MACRO {mar} {"mars"}
+MACRO {apr} {"avr."}
+MACRO {may} {"mai"}
+MACRO {jun} {"juin"}
+MACRO {jul} {"juil."}
+MACRO {aug} {"ao\^ut"}
+MACRO {sep} {"sept."}
+MACRO {oct} {"oct."}
+MACRO {nov} {"nov."}
+MACRO {dec} {"d\'ec."}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%%
+%% La suite, normalement, y a rien a changer...
+%%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+
+INTEGERS { output.state before.all mid.sentence after.sentence after.block after.authors }
+
+FUNCTION {init.state.consts}
+{ #0 'before.all :=
+ #1 'mid.sentence :=
+ #2 'after.sentence :=
+ #3 'after.block :=
+ #0 'after.authors :=
+}
+
+STRINGS { s t }
+
+FUNCTION{ fr.add.period }{
+after.authors
+ { fr.ponctuation.apres.auteurs empty$
+ { add.period$ }
+ { fr.ponctuation.apres.auteurs * #0 'after.authors := }
+ if$}
+ { add.period$ }
+if$
+}
+
+FUNCTION {output.nonnull}
+{ 's :=
+ output.state mid.sentence =
+ { ", " * write$ }
+ { output.state after.block =
+ { fr.add.period write$
+ newline$
+ "\newblock " write$
+ }
+ { output.state before.all =
+ 'write$
+ { add.period$ " " * write$ }
+ if$
+ }
+ if$
+ mid.sentence 'output.state :=
+ }
+ if$
+ s
+}
+
+FUNCTION {output}
+{ duplicate$ empty$
+ 'pop$
+ 'output.nonnull
+ if$
+}
+
+FUNCTION {output.check}
+{ 't :=
+ duplicate$ empty$
+ { pop$ "empty " t * " in " * cite$ * warning$ }
+ 'output.nonnull
+ if$
+}
+
+FUNCTION {fin.entry}
+{ add.period$
+ write$
+ newline$
+}
+
+FUNCTION {new.block}
+{ output.state before.all =
+ 'skip$
+ { after.block 'output.state := }
+ if$
+}
+
+FUNCTION {new.sentence}
+{ output.state after.block =
+ 'skip$
+ { output.state before.all =
+ 'skip$
+ { after.sentence 'output.state := }
+ if$
+ }
+ if$
+}
+
+FUNCTION {not}
+{ { #0 }
+ { #1 }
+ if$
+}
+
+FUNCTION {and}
+{ 'skip$
+ { pop$ #0 }
+ if$
+}
+
+FUNCTION {or}
+{ { pop$ #1 }
+ 'skip$
+ if$
+}
+
+FUNCTION {new.block.checka}
+{ empty$
+ 'skip$
+ 'new.block
+ if$
+}
+
+FUNCTION {new.block.checkb}
+{ empty$
+ swap$ empty$
+ and
+ 'skip$
+ 'new.block
+ if$
+}
+
+FUNCTION {new.sentence.checka}
+{ empty$
+ 'skip$
+ 'new.sentence
+ if$
+}
+
+FUNCTION {new.sentence.checkb}
+{ empty$
+ swap$ empty$
+ and
+ 'skip$
+ 'new.sentence
+ if$
+}
+
+FUNCTION {field.or.null}
+{ duplicate$ empty$
+ { pop$ "" }
+ 'skip$
+ if$
+}
+
+FUNCTION {emphasize}
+{ duplicate$ empty$
+ { pop$ "" }
+ { "{\em " swap$ * "}" * }
+ if$
+}
+
+INTEGERS { nameptr namesleft numnames }
+
+FUNCTION {format.names}
+{ 's :=
+ #1 'nameptr :=
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ { s nameptr "{f.~}{vv~}\bgroup\fonteauteurs\bgroup {ll}\egroup\egroup{{}}{, jj}" format.name$ 't :=
+ nameptr #1 >
+ { namesleft #1 >
+ { ", " * t * }
+ { %numnames #2 >
+ % { "," * }
+ % 'skip$
+ %if$
+ t "\bgroup\fonteauteurs\bgroup others\egroup\egroup{}" =
+ { fr.et.al * }
+ { fr.and * t * }
+ if$
+ }
+ if$
+ }
+ 't
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+}
+
+FUNCTION {format.key}
+{ empty$
+ { key field.or.null }
+ { "" }
+ if$
+}
+
+FUNCTION {format.authors}
+{ author empty$
+ { "" }
+ { author format.names #1 'after.authors := }
+ if$
+}
+
+FUNCTION {format.editors}
+{ editor empty$
+ { "" }
+ { editor format.names
+ editor num.names$ #1 >
+ { fr.editeurs * }
+ { fr.editeur * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.isbn}
+{ isbn empty$
+ { "" }
+ { new.block "ISBN " isbn * }
+ if$
+}
+
+FUNCTION {format.issn}
+{ issn empty$
+ { "" }
+ { new.block "ISSN " issn * }
+ if$
+}
+
+FUNCTION {format.url}
+{ url empty$
+ { "" }
+ { new.block "URL \url{" url * "}" * }
+ if$
+}
+
+FUNCTION {format.title}
+{ title empty$
+ { "" }
+ { title "t" change.case$ }
+ if$
+}
+
+FUNCTION {format.full.names}
+{%
+ % Ici, on laisse les noms en minuscules, on ne les mets pas en small caps.
+ %
+ 's :=
+ #1 'nameptr :=
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ { s nameptr
+ "{vv~}{ll}" format.name$ 't :=
+ nameptr #1 >
+ {
+ namesleft #1 >
+ { ", " * t * }
+ {
+ numnames #2 >
+ { "," * }
+ 'skip$
+ if$
+ t "\bgroup\fonteauteurs\bgroup others\egroup\egroup{}" =
+ { fr.et.al * }
+ { fr.and * t * }
+ if$
+ }
+ if$
+ }
+ 't
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+}
+
+FUNCTION {author.editor.full}
+{ author empty$
+ { editor empty$
+ { "" }
+ { editor format.full.names }
+ if$
+ }
+ { author format.full.names }
+ if$
+}
+
+FUNCTION {author.full}
+{ author empty$
+ { "" }
+ { author format.full.names }
+ if$
+}
+
+FUNCTION {editor.full}
+{ editor empty$
+ { "" }
+ { editor format.full.names }
+ if$
+}
+
+FUNCTION {make.full.names}
+{ type$ "book" =
+ type$ "inbook" =
+ or
+ 'author.editor.full
+ { type$ "proceedings" =
+ 'editor.full
+ 'author.full
+ if$
+ }
+ if$
+}
+
+FUNCTION {output.bibitem}
+{ newline$
+ "\bibitem[" write$
+ label write$
+ ")" make.full.names duplicate$ short.list =
+ { pop$ }
+ { * }
+ if$
+ "]{" * write$
+ cite$ write$
+ "}" write$
+ newline$
+ ""
+ before.all 'output.state :=
+}
+
+FUNCTION {n.dashify}
+{ 't :=
+ ""
+ { t empty$ not }
+ { t #1 #1 substring$ "-" =
+ { t #1 #2 substring$ "--" = not
+ { "--" *
+ t #2 global.max$ substring$ 't :=
+ }
+ { { t #1 #1 substring$ "-" = }
+ { "-" *
+ t #2 global.max$ substring$ 't :=
+ }
+ while$
+ }
+ if$
+ }
+ { t #1 #1 substring$ *
+ t #2 global.max$ substring$ 't :=
+ }
+ if$
+ }
+ while$
+}
+
+FUNCTION {format.date}
+{ year duplicate$ empty$
+ { "empty year in " cite$ * warning$
+ pop$ "" }
+ 'skip$
+ if$
+ month empty$
+ 'skip$
+ { month
+ " " * swap$ *
+ }
+ if$
+ extra.label *
+}
+
+FUNCTION {format.btitle}
+{ title emphasize
+}
+
+FUNCTION {tie.or.space.connect}
+{ duplicate$ text.length$ #3 <
+ { "~" }
+ { " " }
+ if$
+ swap$ * *
+}
+
+FUNCTION {either.or.check}
+{ empty$
+ 'pop$
+ { "can't use both " swap$ * " fields in " * cite$ * warning$ }
+ if$
+}
+
+FUNCTION {format.bvolume}
+{ volume empty$
+ { "" }
+ { fr.volume volume tie.or.space.connect
+ series empty$
+ 'skip$
+ { fr.of * series emphasize * }
+ if$
+ "volume and number" number either.or.check
+ }
+ if$
+}
+
+FUNCTION {format.number.series}
+{ volume empty$
+ { number empty$
+ { series field.or.null }
+ { output.state mid.sentence =
+ { fr.number }
+ { fr.number.maj }
+ if$
+ number tie.or.space.connect
+ series empty$
+ { "there's a number but no series in " cite$ * warning$ }
+ { fr.in.spc * series * }
+ if$
+ }
+ if$
+ }
+ { "" }
+ if$
+}
+
+FUNCTION {format.edition}
+{ edition empty$
+ { "" }
+ { output.state mid.sentence =
+ { edition "l" change.case$ fr.edition * }
+ { edition "t" change.case$ fr.edition * }
+ if$
+ }
+ if$
+}
+
+INTEGERS { multiresult }
+
+FUNCTION {multi.page.check}
+{ 't :=
+ #0 'multiresult :=
+ { multiresult not
+ t empty$ not
+ and
+ }
+ { t #1 #1 substring$
+ duplicate$ "-" =
+ swap$ duplicate$ "," =
+ swap$ "+" =
+ or or
+ { #1 'multiresult := }
+ { t #2 global.max$ substring$ 't := }
+ if$
+ }
+ while$
+ multiresult
+}
+
+FUNCTION {format.pages}
+{ pages empty$
+ { "" }
+ { pages multi.page.check
+ { fr.pages pages n.dashify tie.or.space.connect }
+ { fr.page pages tie.or.space.connect }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.vol.num.pages}
+{ volume field.or.null
+ number empty$
+ 'skip$
+ { "\penalty0 (" number * ")" * *
+ volume empty$
+ { "there's a number but no volume in " cite$ * warning$ }
+ 'skip$
+ if$
+ }
+ if$
+ pages empty$
+ 'skip$
+ { duplicate$ empty$
+ { pop$ format.pages }
+ { fr.deuxpoints * pages n.dashify * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.chapter.pages}
+{ chapter empty$
+ 'format.pages
+ { type empty$
+ { fr.chapter }
+ { type "l" change.case$ }
+ if$
+ chapter tie.or.space.connect
+ pages empty$
+ 'skip$
+ { ", " * format.pages * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.in.ed.booktitle}
+{ booktitle empty$
+ { "" }
+ { editor empty$
+ { fr.in booktitle emphasize * }
+ { fr.in format.editors #1 'after.authors := fr.add.period " " * * booktitle emphasize * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {empty.misc.check}
+{ author empty$ title empty$ howpublished empty$
+ month empty$ year empty$ note empty$
+ and and and and and
+ key empty$ not and
+ { "all relevant fields are empty in " cite$ * warning$ }
+ 'skip$
+ if$
+}
+
+FUNCTION {format.thesis.type}
+{ type empty$
+ 'skip$
+ { pop$
+ type "t" change.case$
+ }
+ if$
+}
+
+FUNCTION {format.tr.number}
+{ type empty$
+ { fr.tech.rep }
+ 'type
+ if$
+ number empty$
+ { "t" change.case$ }
+ { number tie.or.space.connect }
+ if$
+}
+
+FUNCTION {format.article.crossref}
+{ key empty$
+ { journal empty$
+ { "need key or journal for " cite$ * " to crossref " * crossref *
+ warning$
+ ""
+ }
+ { fr.in "{\em " * journal * "\/}" * }
+ if$
+ }
+ { fr.in key * }
+ if$
+ " \citep{" * crossref * "}" *
+}
+
+FUNCTION {format.book.crossref}
+{ volume empty$
+ { "empty volume in " cite$ * "'s crossref of " * crossref * warning$
+ fr.in
+ }
+ { fr.volume.maj volume tie.or.space.connect
+ fr.of *
+ }
+ if$
+ editor empty$
+ editor field.or.null author field.or.null =
+ or
+ { key empty$
+ { series empty$
+ { "need editor, key, or series for " cite$ * " to crossref " *
+ crossref * warning$
+ "" *
+ }
+ { "{\em " * series * "\/}" * }
+ if$
+ }
+ { key * }
+ if$
+ }
+ 'skip$
+ if$
+ ", \citet{" * crossref * "}" *
+}
+
+FUNCTION {format.incoll.inproc.crossref}
+{ editor empty$
+ editor field.or.null author field.or.null =
+ or
+ { key empty$
+ { booktitle empty$
+ { "need editor, key, or booktitle for " cite$ * " to crossref " *
+ crossref * warning$
+ ""
+ }
+ { fr.in "{\em " * booktitle * "\/}" * }
+ if$
+ }
+ { fr.in key * }
+ if$
+ }
+ { fr.in }
+ if$
+ " \citet{" * crossref * "}" *
+}
+
+FUNCTION {article}
+{ output.bibitem
+ format.authors "author" output.check
+ author format.key output
+ new.block
+ format.title "title" output.check
+ new.block
+ crossref missing$
+ { journal emphasize "journal" output.check
+ format.vol.num.pages output
+ format.date "year" output.check
+ }
+ { format.article.crossref output.nonnull
+ format.pages output
+ }
+ if$
+ format.issn output
+ format.url output
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {book}
+{ output.bibitem
+ author empty$
+ { format.editors "author and editor" output.check
+ editor format.key output
+ }
+ { format.authors output.nonnull
+ crossref missing$
+ { "author and editor" editor either.or.check }
+ 'skip$
+ if$
+ }
+ if$
+ new.block
+ format.btitle "title" output.check
+ crossref missing$
+ { format.bvolume output
+ new.block
+ format.number.series output
+ new.sentence
+ publisher "publisher" output.check
+ address output
+ }
+ { new.block
+ format.book.crossref output.nonnull
+ }
+ if$
+ format.edition output
+ format.date "year" output.check
+ format.isbn output
+ format.url output
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {booklet}
+{ output.bibitem
+ format.authors output
+ author format.key output
+ new.block
+ format.title "title" output.check
+ howpublished address new.block.checkb
+ howpublished output
+ address output
+ format.date output
+ format.isbn output
+ format.url output
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {inbook}
+{ output.bibitem
+ author empty$
+ { format.editors "author and editor" output.check
+ editor format.key output
+ }
+ { format.authors output.nonnull
+ crossref missing$
+ { "author and editor" editor either.or.check }
+ 'skip$
+ if$
+ }
+ if$
+ new.block
+ format.btitle "title" output.check
+ crossref missing$
+ { format.bvolume output
+ format.chapter.pages "chapter and pages" output.check
+ new.block
+ format.number.series output
+ new.sentence
+ publisher "publisher" output.check
+ address output
+ }
+ { format.chapter.pages "chapter and pages" output.check
+ new.block
+ format.book.crossref output.nonnull
+ }
+ if$
+ format.edition output
+ format.date "year" output.check
+ format.isbn output
+ format.url output
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {incollection}
+{ output.bibitem
+ format.authors "author" output.check
+ author format.key output
+ new.block
+ format.title "title" output.check
+ new.block
+ crossref missing$
+ { format.in.ed.booktitle "booktitle" output.check
+ format.bvolume output
+ format.number.series output
+ format.chapter.pages output
+ new.sentence
+ publisher "publisher" output.check
+ address output
+ format.edition output
+ format.date "year" output.check
+ }
+ { format.incoll.inproc.crossref output.nonnull
+ format.chapter.pages output
+ }
+ if$
+ format.isbn output
+ format.url output
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {inproceedings}
+{ output.bibitem
+ format.authors "author" output.check
+ author format.key output
+ new.block
+ format.title "title" output.check
+ new.block
+ crossref missing$
+ { format.in.ed.booktitle "booktitle" output.check
+ format.bvolume output
+ format.number.series output
+ format.pages output
+ address empty$
+ { organization publisher new.sentence.checkb
+ organization output
+ publisher output
+ format.date "year" output.check
+ }
+ { address output.nonnull
+ format.date "year" output.check
+ new.sentence
+ organization output
+ publisher output
+ }
+ if$
+ }
+ { format.incoll.inproc.crossref output.nonnull
+ format.pages output
+ }
+ if$
+ format.isbn output
+ format.url output
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {conference} { inproceedings }
+
+FUNCTION {manual}
+{ output.bibitem
+ format.authors output
+ author format.key output
+ new.block
+ format.btitle "title" output.check
+ organization address new.block.checkb
+ organization output
+ address output
+ format.edition output
+ format.date output
+ format.url output
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {mastersthesis}
+{ output.bibitem
+ format.authors "author" output.check
+ author format.key output
+ new.block
+ format.title "title" output.check
+ new.block
+ fr.master format.thesis.type output.nonnull
+ school "school" output.check
+ address output
+ format.date "year" output.check
+ format.url output
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {misc}
+{ output.bibitem
+ format.authors output
+ author format.key output
+ title howpublished new.block.checkb
+ format.title output
+ howpublished new.block.checka
+ howpublished output
+ format.date output
+ format.issn output
+ format.url output
+ new.block
+ note output
+ fin.entry
+ empty.misc.check
+}
+
+FUNCTION {phdthesis}
+{ output.bibitem
+ format.authors "author" output.check
+ author format.key output
+ new.block
+ format.btitle "title" output.check
+ new.block
+ fr.phd format.thesis.type output.nonnull
+ school "school" output.check
+ address output
+ format.date "year" output.check
+ format.url output
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {proceedings}
+{ output.bibitem
+ format.editors output
+ editor format.key output
+ new.block
+ format.btitle "title" output.check
+ format.bvolume output
+ format.number.series output
+ address output
+ format.date "year" output.check
+ new.sentence
+ organization output
+ publisher output
+ format.isbn output
+ format.url output
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {techreport}
+{ output.bibitem
+ format.authors "author" output.check
+ author format.key output
+ new.block
+ format.title "title" output.check
+ new.block
+ format.tr.number output.nonnull
+ institution "institution" output.check
+ address output
+ format.date "year" output.check
+ format.url output
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {unpublished}
+{ output.bibitem
+ format.authors "author" output.check
+ author format.key output
+ new.block
+ format.title "title" output.check
+ format.url output
+ new.block
+ note "note" output.check
+ format.date output
+ fin.entry
+}
+
+FUNCTION {default.type} { misc }
+
+
+MACRO {acmcs} {"ACM Comput. Surv."}
+MACRO {acta} {"Acta Inf."}
+MACRO {cacm} {"Commun. ACM"}
+MACRO {ibmjrd} {"IBM J. Res. Dev."}
+MACRO {ibmsj} {"IBM Syst.~J."}
+MACRO {ieeese} {"IEEE Trans. Softw. Eng."}
+MACRO {ieeetc} {"IEEE Trans. Comput."}
+MACRO {ieeetcad}
+ {"IEEE Trans. Comput.-Aided Design Integrated Circuits"}
+MACRO {ipl} {"Inf. Process. Lett."}
+MACRO {jacm} {"J.~ACM"}
+MACRO {jcss} {"J.~Comput. Syst. Sci."}
+MACRO {scp} {"Sci. Comput. Programming"}
+MACRO {sicomp} {"SIAM J. Comput."}
+MACRO {tocs} {"ACM Trans. Comput. Syst."}
+MACRO {tods} {"ACM Trans. Database Syst."}
+MACRO {tog} {"ACM Trans. Gr."}
+MACRO {toms} {"ACM Trans. Math. Softw."}
+MACRO {toois} {"ACM Trans. Office Inf. Syst."}
+MACRO {toplas} {"ACM Trans. Prog. Lang. Syst."}
+MACRO {tcs} {"Theoretical Comput. Sci."}
+
+
+READ
+
+FUNCTION {sortify}
+{ purify$
+ "l" change.case$
+}
+
+INTEGERS { len }
+
+FUNCTION {chop.word}
+{ 's :=
+ 'len :=
+ s #1 len substring$ =
+ { s len #1 + global.max$ substring$ }
+ 's
+ if$
+}
+
+FUNCTION {format.lab.names}
+%
+% Ici, on laisse les noms en minuscules, on ne les mets pas en small caps.
+%
+{ 's :=
+ s #1 "{vv~}{ll}" format.name$
+ s num.names$ duplicate$
+ #2 >
+ { pop$ fr.et.al * }
+ { #2 <
+ 'skip$
+ { s #2 "{ff }{vv }{ll}{ jj}" format.name$ "others" =
+ { fr.et.al * }
+ { fr.and * s #2 "{vv~}{ll}" format.name$ * }
+ if$
+ }
+ if$
+ }
+ if$
+}
+
+FUNCTION {author.key.label}
+{ author empty$
+ { key empty$
+ { cite$ #1 #3 substring$ }
+ 'key
+ if$
+ }
+ { author format.lab.names }
+ if$
+}
+
+FUNCTION {author.editor.key.label}
+{ author empty$
+ { editor empty$
+ { key empty$
+ { cite$ #1 #3 substring$ }
+ 'key
+ if$
+ }
+ { editor format.lab.names }
+ if$
+ }
+ { author format.lab.names }
+ if$
+}
+
+FUNCTION {author.key.organization.label}
+{ author empty$
+ { key empty$
+ { organization empty$
+ { cite$ #1 #3 substring$ }
+ { "Le " #3
+ "La " #3
+ "Les " #4
+ "The " #4 organization chop.word
+ chop.word
+ chop.word
+ chop.word
+ #3 text.prefix$ }
+ if$
+ }
+ 'key
+ if$
+ }
+ { author format.lab.names }
+ if$
+}
+
+FUNCTION {editor.key.organization.label}
+{ editor empty$
+ { key empty$
+ { organization empty$
+ { cite$ #1 #3 substring$ }
+ { "Le " #3
+ "La " #3
+ "Les " #4
+ "The " #4 organization chop.word
+ chop.word
+ chop.word
+ chop.word
+ #3 text.prefix$ }
+ if$
+ }
+ 'key
+ if$
+ }
+ { editor format.lab.names }
+ if$
+}
+
+FUNCTION {calc.short.authors}
+{ type$ "book" =
+ type$ "inbook" =
+ or
+ 'author.editor.key.label
+ { type$ "proceedings" =
+ 'editor.key.organization.label
+ { type$ "manual" =
+ 'author.key.organization.label
+ 'author.key.label
+ if$
+ }
+ if$
+ }
+ if$
+ 'short.list :=
+}
+
+FUNCTION {calc.label}
+{ calc.short.authors
+ short.list
+ "("
+ *
+ year duplicate$ empty$
+ short.list key field.or.null = or
+ { pop$ "" }
+ 'skip$
+ if$
+ *
+ 'label :=
+}
+
+FUNCTION {sort.format.names}
+{ 's :=
+ #1 'nameptr :=
+ ""
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ { nameptr #1 >
+ { " " * }
+ 'skip$
+ if$
+ s nameptr "{vv{ } }{ll{ }}{ ff{ }}{ jj{ }}" format.name$ 't :=
+ nameptr numnames = t "others" = and
+ { fr.et.al * } %% sera "purify"e ensuite...
+ { t sortify * }
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+}
+
+FUNCTION {sort.format.title}
+{ 't :=
+ "Un " #3
+ "Une " #4
+ "Des " #4
+ "Le " #3
+ "La " #3
+ "Les " #4
+ "A " #2
+ "An " #3
+ "The " #4 t chop.word
+ chop.word
+ chop.word
+ chop.word
+ chop.word
+ chop.word
+ chop.word
+ chop.word
+ chop.word
+ sortify
+ #1 global.max$ substring$
+}
+
+FUNCTION {author.sort}
+{ author empty$
+ { key empty$
+ { "to sort, need author or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { author sort.format.names }
+ if$
+}
+
+FUNCTION {author.editor.sort}
+{ author empty$
+ { editor empty$
+ { key empty$
+ { "to sort, need author, editor, or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { editor sort.format.names }
+ if$
+ }
+ { author sort.format.names }
+ if$
+}
+
+FUNCTION {author.organization.sort}
+{ author empty$
+ { organization empty$
+ { key empty$
+ { "to sort, need author, organization, or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { "Le " #3
+ "La " #3
+ "Les " #4
+ "The " #4 organization chop.word
+ chop.word
+ chop.word
+ chop.word}
+ if$
+ }
+ { author sort.format.names }
+ if$
+}
+
+FUNCTION {editor.organization.sort}
+{ editor empty$
+ { organization empty$
+ { key empty$
+ { "to sort, need editor, organization, or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { "Le " #3
+ "La " #3
+ "Les " #4
+ "The " #4 organization chop.word
+ chop.word
+ chop.word
+ chop.word}
+ if$
+ }
+ { editor sort.format.names }
+ if$
+}
+
+FUNCTION {presort}
+{ calc.label
+ label sortify
+ " "
+ *
+ type$ "book" =
+ type$ "inbook" =
+ or
+ 'author.editor.sort
+ { type$ "proceedings" =
+ 'editor.organization.sort
+ { type$ "manual" =
+ 'author.organization.sort
+ 'author.sort
+ if$
+ }
+ if$
+ }
+ if$
+ " "
+ *
+ year field.or.null sortify
+ *
+ " "
+ *
+ title field.or.null
+ sort.format.title
+ *
+ #1 entry.max$ substring$
+ 'sort.label :=
+ sort.label *
+ #1 entry.max$ substring$
+ 'sort.key$ :=
+}
+
+ITERATE {presort}
+
+SORT
+
+STRINGS { longest.label last.label next.extra }
+
+INTEGERS { longest.label.width last.extra.num number.label }
+
+FUNCTION {initialize.longest.label}
+{ "" 'longest.label :=
+ #0 int.to.chr$ 'last.label :=
+ "" 'next.extra :=
+ #0 'longest.label.width :=
+ #0 'last.extra.num :=
+ #0 'number.label :=
+}
+
+FUNCTION {forward.pass}
+{ last.label label =
+ { last.extra.num #1 + 'last.extra.num :=
+ last.extra.num int.to.chr$ 'extra.label :=
+ }
+ { "a" chr.to.int$ 'last.extra.num :=
+ "" 'extra.label :=
+ label 'last.label :=
+ }
+ if$
+ number.label #1 + 'number.label :=
+}
+
+FUNCTION {reverse.pass}
+{ next.extra "b" =
+ { "a" 'extra.label := }
+ 'skip$
+ if$
+ extra.label 'next.extra :=
+ extra.label
+ duplicate$ empty$
+ 'skip$
+ { "{\natexlab{" swap$ * "}}" * }
+ if$
+ 'extra.label :=
+ label extra.label * 'label :=
+}
+
+EXECUTE {initialize.longest.label}
+
+ITERATE {forward.pass}
+
+REVERSE {reverse.pass}
+
+FUNCTION {bib.sort.order}
+{ sort.label 'sort.key$ :=
+}
+
+ITERATE {bib.sort.order}
+
+SORT
+
+FUNCTION {begin.bib}
+{ preamble$ empty$
+ 'skip$
+ { preamble$ write$ newline$ }
+ if$
+ "\begin{thebibliography}{" number.label int.to.str$ * "}" *
+ write$ newline$
+ "\expandafter\ifx\csname natexlab\endcsname\relax\def\natexlab#1{#1}\fi"
+ write$ newline$
+ "\expandafter\ifx\csname fonteauteurs\endcsname\relax"
+ write$ newline$
+ "\def\fonteauteurs{" fr.auteurs.style * "}\fi" * write$ newline$
+ "\expandafter\ifx\csname url\endcsname\relax" write$ newline$
+ " \def\url#1{{\tt #1}}% " write$ newline$
+ " \message{You should include the url package}\fi" write$ newline$
+}
+
+EXECUTE {begin.bib}
+
+EXECUTE {init.state.consts}
+
+ITERATE {call.type$}
+
+FUNCTION {end.bib}
+{ newline$
+ "\end{thebibliography}" write$ newline$
+}
+
+EXECUTE {end.bib}
diff --git a/biblio/bibtex/contrib/bib-fr/alpha-fr.bst b/biblio/bibtex/contrib/bib-fr/alpha-fr.bst
new file mode 100644
index 0000000000..3d4b6be5de
--- /dev/null
+++ b/biblio/bibtex/contrib/bib-fr/alpha-fr.bst
@@ -0,0 +1,1408 @@
+%%
+%% Bib. style "alpha-fr" (version francisee de alpha.bst)
+%%
+%% NM, 2004/02/22
+%% markey@lsv.ens-cachan.fr
+%%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ % Original Copyright (Oren Patashnik):
+ %
+ % This program may be distributed and/or modified under the
+ % conditions of the LaTeX Project Public License, either version 1.2
+ % of this license or (at your option) any later version.
+ % The latest version of this license is in
+ % http://www.latex-project.org/lppl.txt
+ % and version 1.2 or later is part of all distributions of LaTeX
+ % version 1999/12/01 or later.
+ %
+ % This program consists of the file alpha.bst
+ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+
+ENTRY
+ { address
+ author
+ booktitle
+ chapter
+ edition
+ editor
+ howpublished
+ institution
+ journal
+ key
+ month
+ note
+ number
+ organization
+ pages
+ publisher
+ school
+ series
+ title
+ type
+ volume
+ year
+ }
+ {}
+ { label extra.label sort.label }
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%%
+%% C'est ici que je definis les "traductions". Normalement, y a
+%% que ca a changer pour franciser le style...
+%%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+FUNCTION{fr.and}{ %% le "et" entre les deux derniers auteurs
+" et "
+}
+
+FUNCTION{fr.editeur}{ %% ", \'editeur" au singulier, ou " (\'editeur)"...
+", \'editeur"
+}
+
+FUNCTION{fr.editeurs}{ %% ", \'editeurs" au pluriel, ou " (\'editeurs)"...
+", \'editeurs"
+}
+
+FUNCTION{fr.et.al}{ %% " et~al."
+" \emph{et~al.}"
+}
+
+FUNCTION{fr.in}{ %% "Dans "
+"\emph{In} "
+}
+
+FUNCTION{fr.in.spc}{ %% " de " (ou " de la s\'erie ")
+" de "
+}
+
+FUNCTION{fr.of}{ %% " de "
+" de "
+}
+
+FUNCTION{fr.number}{ %% "num\'ero "
+"num\'ero "
+}
+
+FUNCTION{fr.number.maj}{ %% "Num\'ero "
+"Num\'ero "
+}
+
+FUNCTION{fr.volume}{ %% "volume"
+"volume"
+}
+
+FUNCTION{fr.volume.maj}{ %% "Volume"
+"Volume"
+}
+
+FUNCTION{fr.edition}{ %% " \'edition"
+" \'edition"
+}
+
+FUNCTION{fr.pages}{ %% "pages"
+"pages"
+}
+
+FUNCTION{fr.page}{ %% "page"
+"page"
+}
+
+FUNCTION{fr.chapter}{ %% "chapitre"
+"chapitre"
+}
+
+FUNCTION{fr.tech.rep}{ %% "Rapport Technique"
+"Rapport technique"
+}
+
+FUNCTION{fr.master}{ %% "M\'emoire de D.E.A."
+"M\'emoire de D.E.A."
+}
+
+FUNCTION{fr.phd}{ %% "Th\`ese de doctorat"
+"Th\`ese de doctorat"
+}
+
+FUNCTION{fr.auteurs.style}{
+ %% si on veut des small caps sur le LASTNAME de l'auteur
+ %% Cette fonction est utilisee dans la definition d'une
+ %% fonction LaTeX.
+"\scshape"
+}
+
+FUNCTION{fr.ponctuation.apres.auteurs}{ %% Comme son nom l'indique...
+" : "
+}
+
+FUNCTION{fr.deuxpoints}{ %% separateur num. journal/num. pages
+"\string:\penalty500\relax "
+}
+
+MACRO {jan} {"janvier"}
+MACRO {feb} {"f\'evrier"}
+MACRO {mar} {"mars"}
+MACRO {apr} {"avril"}
+MACRO {may} {"mai"}
+MACRO {jun} {"juin"}
+MACRO {jul} {"juillet"}
+MACRO {aug} {"ao\^ut"}
+MACRO {sep} {"septembre"}
+MACRO {oct} {"octobre"}
+MACRO {nov} {"novembre"}
+MACRO {dec} {"d\'ecembre"}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%%
+%% La suite, normalement, y a rien a changer...
+%%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+
+
+
+
+INTEGERS { output.state before.all mid.sentence after.sentence after.block after.authors }
+
+FUNCTION {init.state.consts}
+{ #0 'before.all :=
+ #1 'mid.sentence :=
+ #2 'after.sentence :=
+ #3 'after.block :=
+ #0 'after.authors :=
+}
+
+STRINGS { s t }
+
+FUNCTION{ fr.add.period }{
+after.authors
+ { fr.ponctuation.apres.auteurs empty$
+ { add.period$ }
+ { fr.ponctuation.apres.auteurs * #0 'after.authors := }
+ if$}
+ { add.period$ }
+if$
+}
+
+FUNCTION {output.nonnull}
+{ 's :=
+ output.state mid.sentence =
+ { ", " * write$ }
+ { output.state after.block =
+ { fr.add.period write$
+ newline$
+ "\newblock " write$
+ }
+ { output.state before.all =
+ 'write$
+ { add.period$ " " * write$ }
+ if$
+ }
+ if$
+ mid.sentence 'output.state :=
+ }
+ if$
+ s
+}
+
+FUNCTION {output}
+{ duplicate$ empty$
+ 'pop$
+ 'output.nonnull
+ if$
+}
+
+FUNCTION {output.check}
+{ 't :=
+ duplicate$ empty$
+ { pop$ "empty " t * " in " * cite$ * warning$ }
+ 'output.nonnull
+ if$
+}
+
+FUNCTION {output.bibitem}
+{ newline$
+ "\bibitem[" write$
+ label write$
+ "]{" write$
+ cite$ write$
+ "}" write$
+ newline$
+ ""
+ before.all 'output.state :=
+ #0 'after.authors :=
+}
+
+FUNCTION {fin.entry}
+{ add.period$
+ write$
+ newline$
+}
+
+FUNCTION {new.block}
+{ output.state before.all =
+ 'skip$
+ { after.block 'output.state := }
+ if$
+}
+
+FUNCTION {new.sentence}
+{ output.state after.block =
+ 'skip$
+ { output.state before.all =
+ 'skip$
+ { after.sentence 'output.state := }
+ if$
+ }
+ if$
+}
+
+FUNCTION {not}
+{ { #0 }
+ { #1 }
+ if$
+}
+
+FUNCTION {and}
+{ 'skip$
+ { pop$ #0 }
+ if$
+}
+
+FUNCTION {or}
+{ { pop$ #1 }
+ 'skip$
+ if$
+}
+
+FUNCTION {new.block.checka}
+{ empty$
+ 'skip$
+ 'new.block
+ if$
+}
+
+FUNCTION {new.block.checkb}
+{ empty$
+ swap$ empty$
+ and
+ 'skip$
+ 'new.block
+ if$
+}
+
+FUNCTION {new.sentence.checka}
+{ empty$
+ 'skip$
+ 'new.sentence
+ if$
+}
+
+FUNCTION {new.sentence.checkb}
+{ empty$
+ swap$ empty$
+ and
+ 'skip$
+ 'new.sentence
+ if$
+}
+
+FUNCTION {field.or.null}
+{ duplicate$ empty$
+ { pop$ "" }
+ 'skip$
+ if$
+}
+
+FUNCTION {emphasize}
+{ duplicate$ empty$
+ { pop$ "" }
+ { "{\em " swap$ * "}" * }
+ if$
+}
+
+INTEGERS { nameptr namesleft numnames }
+
+FUNCTION {format.names}
+{ 's :=
+ #1 'nameptr :=
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ { s nameptr "{ff~}{vv~}\bgroup\fonteauteurs\bgroup {ll}\egroup\egroup{{}}{, jj}" format.name$ 't :=
+ nameptr #1 >
+ { namesleft #1 >
+ { ", " * t * }
+ { %numnames #2 > namesleft #2 > and
+ % { "," * }
+ % 'skip$
+ %if$
+ t "\bgroup\fonteauteurs\bgroup others\egroup\egroup{}" =
+ { fr.et.al * }
+ { fr.and * t * }
+ if$
+ }
+ if$
+ }
+ 't
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+}
+
+FUNCTION {format.authors}
+{ author empty$
+ { "" }
+ { author format.names #1 'after.authors := }
+ if$
+}
+
+FUNCTION {format.editors}
+{ editor empty$
+ { "" }
+ { editor format.names
+ editor num.names$ #1 >
+ { fr.editeurs * }
+ { fr.editeur * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.title}
+{ title empty$
+ { "" }
+ { title "t" change.case$ }
+ if$
+}
+
+FUNCTION {n.dashify}
+{ 't :=
+ ""
+ { t empty$ not }
+ { t #1 #1 substring$ "-" =
+ { t #1 #2 substring$ "--" = not
+ { "--" *
+ t #2 global.max$ substring$ 't :=
+ }
+ { { t #1 #1 substring$ "-" = }
+ { "-" *
+ t #2 global.max$ substring$ 't :=
+ }
+ while$
+ }
+ if$
+ }
+ { t #1 #1 substring$ *
+ t #2 global.max$ substring$ 't :=
+ }
+ if$
+ }
+ while$
+}
+
+FUNCTION {format.date}
+{ year empty$
+ { month empty$
+ { "" }
+ { "there's a month but no year in " cite$ * warning$
+ month
+ }
+ if$
+ }
+ { month empty$
+ 'year
+ { month " " * year * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.btitle}
+{ title emphasize
+}
+
+FUNCTION {tie.or.space.connect}
+{ duplicate$ text.length$ #3 <
+ { "~" }
+ { " " }
+ if$
+ swap$ * *
+}
+
+FUNCTION {either.or.check}
+{ empty$
+ 'pop$
+ { "can't use both " swap$ * " fields in " * cite$ * warning$ }
+ if$
+}
+
+FUNCTION {format.bvolume}
+{ volume empty$
+ { "" }
+ { fr.volume volume tie.or.space.connect
+ series empty$
+ 'skip$
+ { fr.of * series emphasize * }
+ if$
+ "volume and number" number either.or.check
+ }
+ if$
+}
+
+FUNCTION {format.number.series}
+{ volume empty$
+ { number empty$
+ { series field.or.null }
+ { output.state mid.sentence =
+ { fr.number }
+ { fr.number.maj }
+ if$
+ number tie.or.space.connect
+ series empty$
+ { "there's a number but no series in " cite$ * warning$ }
+ { fr.in.spc * series * }
+ if$
+ }
+ if$
+ }
+ { "" }
+ if$
+}
+
+FUNCTION {format.edition}
+{ edition empty$
+ { "" }
+ { output.state mid.sentence =
+ { edition "l" change.case$ fr.edition * }
+ { edition "t" change.case$ fr.edition * }
+ if$
+ }
+ if$
+}
+
+INTEGERS { multiresult }
+
+FUNCTION {multi.page.check}
+{ 't :=
+ #0 'multiresult :=
+ { multiresult not
+ t empty$ not
+ and
+ }
+ { t #1 #1 substring$
+ duplicate$ "-" =
+ swap$ duplicate$ "," =
+ swap$ "+" =
+ or or
+ { #1 'multiresult := }
+ { t #2 global.max$ substring$ 't := }
+ if$
+ }
+ while$
+ multiresult
+}
+
+FUNCTION {format.pages}
+{ pages empty$
+ { "" }
+ { pages multi.page.check
+ { fr.pages pages n.dashify tie.or.space.connect }
+ { fr.page pages tie.or.space.connect }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.vol.num.pages}
+{ volume field.or.null
+ number empty$
+ 'skip$
+ { "(" number * ")" * *
+ volume empty$
+ { "there's a number but no volume in " cite$ * warning$ }
+ 'skip$
+ if$
+ }
+ if$
+ pages empty$
+ 'skip$
+ { duplicate$ empty$
+ { pop$ format.pages }
+ { fr.deuxpoints * pages n.dashify * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.chapter.pages}
+{ chapter empty$
+ 'format.pages
+ { type empty$
+ { fr.chapter }
+ { type "l" change.case$ }
+ if$
+ chapter tie.or.space.connect
+ pages empty$
+ 'skip$
+ { ", " * format.pages * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.in.ed.booktitle}
+{ booktitle empty$
+ { "" }
+ { editor empty$
+ { fr.in booktitle emphasize * }
+ { fr.in format.editors #1 'after.authors := fr.add.period " " * * booktitle emphasize * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {empty.misc.check}
+{ author empty$ title empty$ howpublished empty$
+ month empty$ year empty$ note empty$
+ and and and and and
+ key empty$ not and
+ { "all relevant fields are empty in " cite$ * warning$ }
+ 'skip$
+ if$
+}
+
+FUNCTION {format.thesis.type}
+{ type empty$
+ 'skip$
+ { pop$
+ type "t" change.case$
+ }
+ if$
+}
+
+FUNCTION {format.tr.number}
+{ type empty$
+ { fr.tech.rep }
+ 'type
+ if$
+ number empty$
+ { "t" change.case$ }
+ { number tie.or.space.connect }
+ if$
+}
+
+FUNCTION {format.article.crossref}
+{ key empty$
+ { journal empty$
+ { "need key or journal for " cite$ * " to crossref " * crossref *
+ warning$
+ ""
+ }
+ { fr.in "{\em " * journal * "\/}" * }
+ if$
+ }
+ { fr.in key * }
+ if$
+ " \cite{" * crossref * "}" *
+}
+
+FUNCTION {format.crossref.editor}
+{ editor #1 "{vv~}\bgroup\fonteauteurs\bgroup {ll}\egroup\egroup{{}}" format.name$
+ editor num.names$ duplicate$
+ #2 >
+ { pop$ fr.et.al * }
+ { #2 <
+ 'skip$
+ { editor #2 "{ff }{vv }{ll}{ jj}" format.name$ "others" =
+ { fr.et.al * }
+ { fr.and * editor #2 "{vv~}\bgroup\fonteauteurs\bgroup {ll}\egroup\egroup{{}}" format.name$ * }
+ if$
+ }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.book.crossref}
+{ volume empty$
+ { "empty volume in " cite$ * "'s crossref of " * crossref * warning$
+ fr.in
+ }
+ { fr.volume.maj volume tie.or.space.connect
+ fr.of *
+ }
+ if$
+ editor empty$
+ editor field.or.null author field.or.null =
+ or
+ { key empty$
+ { series empty$
+ { "need editor, key, or series for " cite$ * " to crossref " *
+ crossref * warning$
+ "" *
+ }
+ { "{\em " * series * "\/}" * }
+ if$
+ }
+ { key * }
+ if$
+ }
+ { format.crossref.editor * }
+ if$
+ " \cite{" * crossref * "}" *
+}
+
+FUNCTION {format.incoll.inproc.crossref}
+{ editor empty$
+ editor field.or.null author field.or.null =
+ or
+ { key empty$
+ { booktitle empty$
+ { "need editor, key, or booktitle for " cite$ * " to crossref " *
+ crossref * warning$
+ ""
+ }
+ { fr.in "{\em " * booktitle * "\/}" * }
+ if$
+ }
+ { fr.in key * }
+ if$
+ }
+ { fr.in format.crossref.editor * }
+ if$
+ " \cite{" * crossref * "}" *
+}
+
+FUNCTION {article}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.title "title" output.check
+ new.block
+ crossref missing$
+ { journal emphasize "journal" output.check
+ format.vol.num.pages output
+ format.date "year" output.check
+ }
+ { format.article.crossref output.nonnull
+ format.pages output
+ }
+ if$
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {book}
+{ output.bibitem
+ author empty$
+ { format.editors "author and editor" output.check }
+ { format.authors output.nonnull
+ crossref missing$
+ { "author and editor" editor either.or.check }
+ 'skip$
+ if$
+ }
+ if$
+ new.block
+ format.btitle "title" output.check
+ crossref missing$
+ { format.bvolume output
+ new.block
+ format.number.series output
+ new.sentence
+ publisher "publisher" output.check
+ address output
+ }
+ { new.block
+ format.book.crossref output.nonnull
+ }
+ if$
+ format.edition output
+ format.date "year" output.check
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {booklet}
+{ output.bibitem
+ format.authors output
+ new.block
+ format.title "title" output.check
+ howpublished address new.block.checkb
+ howpublished output
+ address output
+ format.date output
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {inbook}
+{ output.bibitem
+ author empty$
+ { format.editors "author and editor" output.check }
+ { format.authors output.nonnull
+ crossref missing$
+ { "author and editor" editor either.or.check }
+ 'skip$
+ if$
+ }
+ if$
+ new.block
+ format.btitle "title" output.check
+ crossref missing$
+ { format.bvolume output
+ format.chapter.pages "chapter and pages" output.check
+ new.block
+ format.number.series output
+ new.sentence
+ publisher "publisher" output.check
+ address output
+ }
+ { format.chapter.pages "chapter and pages" output.check
+ new.block
+ format.book.crossref output.nonnull
+ }
+ if$
+ format.edition output
+ format.date "year" output.check
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {incollection}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.title "title" output.check
+ new.block
+ crossref missing$
+ { format.in.ed.booktitle "booktitle" output.check
+ format.bvolume output
+ format.number.series output
+ format.chapter.pages output
+ new.sentence
+ publisher "publisher" output.check
+ address output
+ format.edition output
+ format.date "year" output.check
+ }
+ { format.incoll.inproc.crossref output.nonnull
+ format.chapter.pages output
+ }
+ if$
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {inproceedings}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.title "title" output.check
+ new.block
+ crossref missing$
+ { format.in.ed.booktitle "booktitle" output.check
+ format.bvolume output
+ format.number.series output
+ format.pages output
+ address empty$
+ { organization publisher new.sentence.checkb
+ organization output
+ publisher output
+ format.date "year" output.check
+ }
+ { address output.nonnull
+ format.date "year" output.check
+ new.sentence
+ organization output
+ publisher output
+ }
+ if$
+ }
+ { format.incoll.inproc.crossref output.nonnull
+ format.pages output
+ }
+ if$
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {conference} { inproceedings }
+
+FUNCTION {manual}
+{ output.bibitem
+ author empty$
+ { organization empty$
+ 'skip$
+ { organization output.nonnull
+ address output
+ }
+ if$
+ }
+ { format.authors output.nonnull }
+ if$
+ new.block
+ format.btitle "title" output.check
+ author empty$
+ { organization empty$
+ { address new.block.checka
+ address output
+ }
+ 'skip$
+ if$
+ }
+ { organization address new.block.checkb
+ organization output
+ address output
+ }
+ if$
+ format.edition output
+ format.date output
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {mastersthesis}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.title "title" output.check
+ new.block
+ fr.master format.thesis.type output.nonnull
+ school "school" output.check
+ address output
+ format.date "year" output.check
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {misc}
+{ output.bibitem
+ format.authors output
+ title howpublished new.block.checkb
+ format.title output
+ howpublished new.block.checka
+ howpublished output
+ format.date output
+ new.block
+ note output
+ fin.entry
+ empty.misc.check
+}
+
+FUNCTION {phdthesis}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.btitle "title" output.check
+ new.block
+ fr.phd format.thesis.type output.nonnull
+ school "school" output.check
+ address output
+ format.date "year" output.check
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {proceedings}
+{ output.bibitem
+ editor empty$
+ { organization output }
+ { format.editors output.nonnull }
+ if$
+ new.block
+ format.btitle "title" output.check
+ format.bvolume output
+ format.number.series output
+ address empty$
+ { editor empty$
+ { publisher new.sentence.checka }
+ { organization publisher new.sentence.checkb
+ organization output
+ }
+ if$
+ publisher output
+ format.date "year" output.check
+ }
+ { address output.nonnull
+ format.date "year" output.check
+ new.sentence
+ editor empty$
+ 'skip$
+ { organization output }
+ if$
+ publisher output
+ }
+ if$
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {techreport}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.title "title" output.check
+ new.block
+ format.tr.number output.nonnull
+ institution "institution" output.check
+ address output
+ format.date "year" output.check
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {unpublished}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.title "title" output.check
+ new.block
+ note "note" output.check
+ format.date output
+ fin.entry
+}
+
+FUNCTION {default.type} { misc }
+
+MACRO {acmcs} {"ACM Computing Surveys"}
+MACRO {acta} {"Acta Informatica"}
+MACRO {cacm} {"Communications of the ACM"}
+MACRO {ibmjrd} {"IBM Journal of Research and Development"}
+MACRO {ibmsj} {"IBM Systems Journal"}
+MACRO {ieeese} {"IEEE Transactions on Software Engineering"}
+MACRO {ieeetc} {"IEEE Transactions on Computers"}
+MACRO {ieeetcad}
+ {"IEEE Transactions on Computer-Aided Design of Integrated Circuits"}
+MACRO {ipl} {"Information Processing Letters"}
+MACRO {jacm} {"Journal of the ACM"}
+MACRO {jcss} {"Journal of Computer and System Sciences"}
+MACRO {scp} {"Science of Computer Programming"}
+MACRO {sicomp} {"SIAM Journal on Computing"}
+MACRO {tocs} {"ACM Transactions on Computer Systems"}
+MACRO {tods} {"ACM Transactions on Database Systems"}
+MACRO {tog} {"ACM Transactions on Graphics"}
+MACRO {toms} {"ACM Transactions on Mathematical Software"}
+MACRO {toois} {"ACM Transactions on Office Information Systems"}
+MACRO {toplas} {"ACM Transactions on Programming Languages and Systems"}
+MACRO {tcs} {"Theoretical Computer Science"}
+
+READ
+
+FUNCTION {sortify}
+{ purify$
+ "l" change.case$
+}
+
+INTEGERS { len }
+
+FUNCTION {chop.word}
+{ 's :=
+ 'len :=
+ s #1 len substring$ =
+ { s len #1 + global.max$ substring$ }
+ 's
+ if$
+}
+
+INTEGERS { et.al.char.used }
+
+FUNCTION {initialize.et.al.char.used}
+{ #0 'et.al.char.used :=
+}
+
+EXECUTE {initialize.et.al.char.used}
+
+FUNCTION {format.lab.names}
+{ 's :=
+ s num.names$ 'numnames :=
+ numnames #1 >
+ { numnames #4 >
+ { #3 'namesleft := }
+ { numnames 'namesleft := }
+ if$
+ #1 'nameptr :=
+ ""
+ { namesleft #0 > }
+ { nameptr numnames =
+ { s nameptr "{ff }{vv }{ll}{ jj}" format.name$ "others" =
+ { "{\etalchar{+}}" *
+ #1 'et.al.char.used :=
+ }
+ { s nameptr "{v{}}{l{}}" format.name$ * }
+ if$
+ }
+ { s nameptr "{v{}}{l{}}" format.name$ * }
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+ numnames #4 >
+ { "{\etalchar{+}}" *
+ #1 'et.al.char.used :=
+ }
+ 'skip$
+ if$
+ }
+ { s #1 "{v{}}{l{}}" format.name$
+ duplicate$ text.length$ #2 <
+ { pop$ s #1 "{ll}" format.name$ #3 text.prefix$ }
+ 'skip$
+ if$
+ }
+ if$
+}
+
+FUNCTION {author.key.label}
+{ author empty$
+ { key empty$
+ { cite$ #1 #3 substring$ }
+ { key #3 text.prefix$ }
+ if$
+ }
+ { author format.lab.names }
+ if$
+}
+
+FUNCTION {author.editor.key.label}
+{ author empty$
+ { editor empty$
+ { key empty$
+ { cite$ #1 #3 substring$ }
+ { key #3 text.prefix$ }
+ if$
+ }
+ { editor format.lab.names }
+ if$
+ }
+ { author format.lab.names }
+ if$
+}
+
+FUNCTION {author.key.organization.label}
+{ author empty$
+ { key empty$
+ { organization empty$
+ { cite$ #1 #3 substring$ }
+ { "Le " #3
+ "La " #3
+ "Les " #4
+ "The " #4 organization chop.word
+ chop.word
+ chop.word
+ chop.word #3 text.prefix$ }
+ if$
+ }
+ { key #3 text.prefix$ }
+ if$
+ }
+ { author format.lab.names }
+ if$
+}
+
+FUNCTION {editor.key.organization.label}
+{ editor empty$
+ { key empty$
+ { organization empty$
+ { cite$ #1 #3 substring$ }
+ { "Le " #3
+ "La " #3
+ "Les " #4
+ "The " #4 organization chop.word
+ chop.word
+ chop.word
+ chop.word #3 text.prefix$ }
+ if$
+ }
+ { key #3 text.prefix$ }
+ if$
+ }
+ { editor format.lab.names }
+ if$
+}
+
+FUNCTION {calc.label}
+{ type$ "book" =
+ type$ "inbook" =
+ or
+ 'author.editor.key.label
+ { type$ "proceedings" =
+ 'editor.key.organization.label
+ { type$ "manual" =
+ 'author.key.organization.label
+ 'author.key.label
+ if$
+ }
+ if$
+ }
+ if$
+ duplicate$
+ year field.or.null purify$ #-1 #2 substring$
+ *
+ 'label :=
+ year field.or.null purify$ #-1 #4 substring$
+ *
+ sortify 'sort.label :=
+}
+
+FUNCTION {sort.format.names}
+{ 's :=
+ #1 'nameptr :=
+ ""
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ { nameptr #1 >
+ { " " * }
+ 'skip$
+ if$
+ s nameptr "{vv{ } }{ll{ }}{ ff{ }}{ jj{ }}" format.name$ 't :=
+ nameptr numnames = t "others" = and
+ { "et al" * }
+ { t sortify * }
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+}
+
+FUNCTION {sort.format.title}
+{ 't :=
+ "Le " #3
+ "La " #3
+ "Les " #4
+ "Un " #3
+ "Une " #4
+ "Des " #4
+ "A " #2
+ "An " #3
+ "The " #4 t chop.word
+ chop.word
+ chop.word
+ chop.word
+ chop.word
+ chop.word
+ chop.word
+ chop.word
+ chop.word
+ sortify
+ #1 global.max$ substring$
+}
+
+FUNCTION {author.sort}
+{ author empty$
+ { key empty$
+ { "to sort, need author or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { author sort.format.names }
+ if$
+}
+
+FUNCTION {author.editor.sort}
+{ author empty$
+ { editor empty$
+ { key empty$
+ { "to sort, need author, editor, or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { editor sort.format.names }
+ if$
+ }
+ { author sort.format.names }
+ if$
+}
+
+FUNCTION {author.organization.sort}
+{ author empty$
+ { organization empty$
+ { key empty$
+ { "to sort, need author, organization, or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { "Le " #3
+ "La " #3
+ "Les " #4
+ "The " #4 organization chop.word
+ chop.word
+ chop.word
+ chop.word
+ sortify }
+ if$
+ }
+ { author sort.format.names }
+ if$
+}
+
+FUNCTION {editor.organization.sort}
+{ editor empty$
+ { organization empty$
+ { key empty$
+ { "to sort, need editor, organization, or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { "Le " #3
+ "La " #3
+ "Les " #4
+ "The " #4 organization chop.word
+ chop.word
+ chop.word
+ chop.word
+ sortify }
+ if$
+ }
+ { editor sort.format.names }
+ if$
+}
+
+FUNCTION {presort}
+{ calc.label
+ sort.label
+ " "
+ *
+ type$ "book" =
+ type$ "inbook" =
+ or
+ 'author.editor.sort
+ { type$ "proceedings" =
+ 'editor.organization.sort
+ { type$ "manual" =
+ 'author.organization.sort
+ 'author.sort
+ if$
+ }
+ if$
+ }
+ if$
+ *
+ " "
+ *
+ year field.or.null sortify
+ *
+ " "
+ *
+ title field.or.null
+ sort.format.title
+ *
+ #1 entry.max$ substring$
+ 'sort.key$ :=
+}
+
+ITERATE {presort}
+
+SORT
+
+STRINGS { longest.label last.sort.label next.extra }
+
+INTEGERS { longest.label.width last.extra.num }
+
+FUNCTION {initialize.longest.label}
+{ "" 'longest.label :=
+ #0 int.to.chr$ 'last.sort.label :=
+ "" 'next.extra :=
+ #0 'longest.label.width :=
+ #0 'last.extra.num :=
+}
+
+FUNCTION {forward.pass}
+{ last.sort.label sort.label =
+ { last.extra.num #1 + 'last.extra.num :=
+ last.extra.num int.to.chr$ 'extra.label :=
+ }
+ { "a" chr.to.int$ 'last.extra.num :=
+ "" 'extra.label :=
+ sort.label 'last.sort.label :=
+ }
+ if$
+}
+
+
+FUNCTION {reverse.pass}
+{ next.extra "b" =
+ { "a" 'extra.label := }
+ 'skip$
+ if$
+ label extra.label * 'label :=
+ label width$ longest.label.width >
+ { label 'longest.label :=
+ label width$ 'longest.label.width :=
+ }
+ 'skip$
+ if$
+ extra.label 'next.extra :=
+}
+
+EXECUTE {initialize.longest.label}
+
+ITERATE {forward.pass}
+
+REVERSE {reverse.pass}
+
+FUNCTION {begin.bib}
+{ et.al.char.used
+ { "\newcommand{\etalchar}[1]{$^{#1}$}" write$ newline$ }
+ 'skip$
+ if$
+ preamble$ empty$
+ 'skip$
+ { preamble$ write$ newline$ }
+ if$
+ "\begin{thebibliography}{" longest.label * "}" * write$ newline$
+ "\expandafter\ifx\csname fonteauteurs\endcsname\relax"
+ write$ newline$
+ "\def\fonteauteurs{" fr.auteurs.style * "}\fi" * write$ newline$
+}
+
+EXECUTE {begin.bib}
+
+EXECUTE {init.state.consts}
+
+ITERATE {call.type$}
+
+FUNCTION {end.bib}
+{ newline$
+ "\end{thebibliography}" write$ newline$
+}
+
+EXECUTE {end.bib}
+
+
+%%
+%% Changelog :
+%% 1.0 -> 1.1 : les mois ne prennent pas de majuscule
+%% 1.1 -> 1.2 : le '.' qui suit la liste des auteurs peut etre
+%% change en autre chose (':' notamment).
+%%
diff --git a/biblio/bibtex/contrib/bib-fr/apalike-fr.bst b/biblio/bibtex/contrib/bib-fr/apalike-fr.bst
new file mode 100644
index 0000000000..d397ec8585
--- /dev/null
+++ b/biblio/bibtex/contrib/bib-fr/apalike-fr.bst
@@ -0,0 +1,1222 @@
+%%
+%% Bib. style "apalike-fr" (version francisee de apalike.bst)
+%%
+%% NM, 2004/02/22
+%% markey@lsv.ens-cachan.fr
+%%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% Original Copyright (Susan King, Oren Patashnik):
+%%
+% BibTeX `apalike' bibliography style (24-Jan-88 version)
+% Adapted from the `alpha' style, version 0.99a; for BibTeX version 0.99a.
+% Copyright (C) 1988, all rights reserved.
+% Copying of this file is allowed, provided that if you make any changes at all
+% you name it something other than `apalike.bst'.
+% This restriction helps ensure that all copies are identical.
+% Differences between this style and `alpha' are generally heralded by a `%'.
+% The file btxbst.doc has the documentation for alpha.bst.
+%
+% This style should be used with the `apalike' LaTeX style (apalike.sty).
+% \cite's come out like "(Jones, 1986)" in the text but there are no labels
+% in the bibliography, and something like "(1986)" comes out immediately
+% after the author. Author (and editor) names appear as last name, comma,
+% initials. A `year' field is required for every entry, and so is either
+% an author (or in some cases, an editor) field or a key field.
+%
+% Editorial note:
+% Many journals require a style like `apalike', but I strongly, strongly,
+% strongly recommend that you not use it if you have a choice---use something
+% like `plain' instead. Mary-Claire van Leunen (A Handbook for Scholars,
+% Knopf, 1979) argues convincingly that a style like `plain' encourages better
+% writing than one like `apalike'. Furthermore the strongest arguments for
+% using an author-date style like `apalike'---that it's "the most practical"
+% (The Chicago Manual of Style, University of Chicago Press, thirteenth
+% edition, 1982, pages 400--401)---fall flat on their face with the new
+% computer-typesetting technology. For instance page 401 anachronistically
+% states "The chief disadvantage of [a style like `plain'] is that additions
+% or deletions cannot be made after the manuscript is typed without changing
+% numbers in both text references and list." LaTeX sidesteps the disadvantage.
+%
+% History:
+% 15-sep-86 (SK,OP) Original version, by Susan King and Oren Patashnik.
+% 10-nov-86 (OP) Truncated the sort.key$ string to the correct length
+% in bib.sort.order to eliminate error message.
+% 24-jan-88 (OP) Updated for BibTeX version 0.99a, from alpha.bst 0.99a;
+% apalike now sorts by author, then year, then title;
+% THIS `apalike' VERSION DOES NOT WORK WITH BIBTEX 0.98i.
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+
+ENTRY
+ { address
+ author
+ booktitle
+ chapter
+ edition
+ editor
+ howpublished
+ institution
+ journal
+ key
+% month not used in apalike
+ note
+ number
+ organization
+ pages
+ publisher
+ school
+ series
+ title
+ type
+ volume
+ year
+ }
+ {}
+ { label extra.label sort.label }
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%%
+%% C'est ici que je definis les "traductions". Normalement, y a
+%% que ca a changer pour franciser le style...
+%%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+
+FUNCTION{fr.and}{ %% le "et" entre les deux derniers auteurs
+" et "
+}
+
+FUNCTION{fr.editeur}{ %% ", \'editeur" au singulier, ou " (\'editeur)"...
+", \'editeur"
+}
+
+FUNCTION{fr.editeurs}{ %% ", \'editeurs" au pluriel, ou " (\'editeurs)"...
+", \'editeurs"
+}
+
+FUNCTION{fr.et.al}{ %% " et~al."
+" \emph{et~al.}"
+}
+
+FUNCTION{fr.in}{ %% "Dans "
+"\emph{In} "
+}
+
+FUNCTION{fr.in.spc}{ %% " de " (ou " de la s\'erie ")
+" de "
+}
+
+FUNCTION{fr.of}{ %% " de "
+" de "
+}
+
+FUNCTION{fr.number}{ %% "num{\'e}ro "
+"num\'ero "
+}
+
+FUNCTION{fr.number.maj}{ %% "Num\'ero "
+"Num\'ero "
+}
+
+FUNCTION{fr.volume}{ %% "volume"
+"volume"
+}
+
+FUNCTION{fr.volume.maj}{ %% "Volume"
+"Volume"
+}
+
+FUNCTION{fr.edition}{ %% " \'edition"
+" \'edition"
+}
+
+FUNCTION{fr.pages}{ %% "pages"
+"pages"
+}
+
+FUNCTION{fr.page}{ %% "page"
+"page"
+}
+
+FUNCTION{fr.chapter}{ %% "chapitre"
+"chapitre"
+}
+
+FUNCTION{fr.tech.rep}{ %% "Rapport Technique"
+"Rapport technique"
+}
+
+FUNCTION{fr.master}{ %% "M\'emoire de D.E.A."
+"M\'emoire de D.E.A."
+}
+
+FUNCTION{fr.phd}{ %% "Th\`ese de doctorat"
+"Th\`ese de doctorat"
+}
+
+FUNCTION{fr.auteurs.style}{
+ %% si on veut des small caps sur le LASTNAME de l'auteur
+ %% Cette fonction est utilisee dans la definition d'une
+ %% fonction LaTeX.
+"\scshape"
+}
+
+FUNCTION{fr.ponctuation.apres.auteurs}{ %% Comme son nom l'indique...
+ %% Laisser vide pour un "."
+" : "
+}
+
+FUNCTION{fr.deuxpoints}{ %% Pour eviter l'espace avant les ":".
+"\string:\penalty500\relax "
+}
+
+MACRO {jan} {"janvier"}
+MACRO {feb} {"f\'evrier"}
+MACRO {mar} {"mars"}
+MACRO {apr} {"avril"}
+MACRO {may} {"mai"}
+MACRO {jun} {"juin"}
+MACRO {jul} {"juillet"}
+MACRO {aug} {"ao\^ut"}
+MACRO {sep} {"septembre"}
+MACRO {oct} {"octobre"}
+MACRO {nov} {"novembre"}
+MACRO {dec} {"d\'ecembre"}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%%
+%% La suite, normalement, y a rien a changer...
+%%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+
+INTEGERS { output.state before.all mid.sentence after.sentence after.block after.authors }
+
+FUNCTION {init.state.consts}
+{ #0 'before.all :=
+ #1 'mid.sentence :=
+ #2 'after.sentence :=
+ #3 'after.block :=
+ #0 'after.authors :=
+}
+
+STRINGS { s t }
+
+FUNCTION{ fr.add.period }{
+after.authors
+ { fr.ponctuation.apres.auteurs empty$
+ { add.period$ }
+ { fr.ponctuation.apres.auteurs * #0 'after.authors := }
+ if$}
+ { add.period$ }
+if$
+}
+
+FUNCTION {output.nonnull}
+{ 's :=
+ output.state mid.sentence =
+ { ", " * write$ }
+ { output.state after.block =
+ { fr.add.period write$
+ newline$
+ "\newblock " write$
+ }
+ { output.state before.all =
+ 'write$
+ { add.period$ " " * write$ }
+ if$
+ }
+ if$
+ mid.sentence 'output.state :=
+ }
+ if$
+ s
+}
+
+FUNCTION {output}
+{ duplicate$ empty$
+ 'pop$
+ 'output.nonnull
+ if$
+}
+
+FUNCTION {output.check}
+{ 't :=
+ duplicate$ empty$
+ { pop$ "empty " t * " in " * cite$ * warning$ }
+ 'output.nonnull
+ if$
+}
+
+% apalike needs this function because
+% the year has special punctuation;
+% apalike ignores the month
+FUNCTION {output.year.check}
+{ year empty$
+ { "empty year in " cite$ * warning$ }
+ { write$
+ " (" year * extra.label * ")" *
+ mid.sentence 'output.state :=
+ }
+ if$
+}
+
+FUNCTION {output.bibitem}
+{ newline$
+ "\bibitem[" write$
+ label write$
+ "]{" write$
+ cite$ write$
+ "}" write$
+ newline$
+ ""
+ before.all 'output.state :=
+}
+
+FUNCTION {fin.entry}
+{ add.period$
+ write$
+ newline$
+}
+
+FUNCTION {new.block}
+{ output.state before.all =
+ 'skip$
+ { after.block 'output.state := }
+ if$
+}
+
+FUNCTION {new.sentence}
+{ output.state after.block =
+ 'skip$
+ { output.state before.all =
+ 'skip$
+ { after.sentence 'output.state := }
+ if$
+ }
+ if$
+}
+
+FUNCTION {not}
+{ { #0 }
+ { #1 }
+ if$
+}
+
+FUNCTION {and}
+{ 'skip$
+ { pop$ #0 }
+ if$
+}
+
+FUNCTION {or}
+{ { pop$ #1 }
+ 'skip$
+ if$
+}
+
+FUNCTION {new.block.checkb}
+{ empty$
+ swap$ empty$
+ and
+ 'skip$
+ 'new.block
+ if$
+}
+
+FUNCTION {field.or.null}
+{ duplicate$ empty$
+ { pop$ "" }
+ 'skip$
+ if$
+}
+
+FUNCTION {emphasize}
+{ duplicate$ empty$
+ { pop$ "" }
+ { "{\em " swap$ * "}" * }
+ if$
+}
+
+INTEGERS { nameptr namesleft numnames }
+
+FUNCTION {format.names}
+{ 's :=
+ #1 'nameptr :=
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ { s nameptr "{vv~}\bgroup\fonteauteurs\bgroup {ll}\egroup\egroup{{}}{, jj}{, f.}" format.name$ 't := % last name first
+ nameptr #1 >
+ { namesleft #1 >
+ { ", " * t * }
+ { %numnames #2 > namesleft #2 > and
+ % { "," * }
+ % 'skip$
+ %if$
+ t "\bgroup\fonteauteurs\bgroup others\egroup\egroup{}" =
+ { fr.et.al * }
+ { fr.and * t * }
+ if$
+ }
+ if$
+ }
+ 't
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+}
+
+FUNCTION {format.authors}
+{ author empty$
+ { "" }
+ { author format.names }
+ if$
+}
+
+FUNCTION {format.key} % this function is just for apalike
+{ empty$
+ { key field.or.null }
+ { "" }
+ if$
+}
+
+FUNCTION {format.editors}
+{ editor empty$
+ { "" }
+ { editor format.names
+ editor num.names$ #1 >
+ { fr.editeurs * }
+ { fr.editeur * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.title}
+{ title empty$
+ { "" }
+ { title "t" change.case$ }
+ if$
+}
+
+FUNCTION {n.dashify}
+{ 't :=
+ ""
+ { t empty$ not }
+ { t #1 #1 substring$ "-" =
+ { t #1 #2 substring$ "--" = not
+ { "--" *
+ t #2 global.max$ substring$ 't :=
+ }
+ { { t #1 #1 substring$ "-" = }
+ { "-" *
+ t #2 global.max$ substring$ 't :=
+ }
+ while$
+ }
+ if$
+ }
+ { t #1 #1 substring$ *
+ t #2 global.max$ substring$ 't :=
+ }
+ if$
+ }
+ while$
+}
+
+FUNCTION {format.btitle}
+{ title emphasize
+}
+
+FUNCTION {tie.or.space.connect}
+{ duplicate$ text.length$ #3 <
+ { "~" }
+ { " " }
+ if$
+ swap$ * *
+}
+
+FUNCTION {either.or.check}
+{ empty$
+ 'pop$
+ { "can't use both " swap$ * " fields in " * cite$ * warning$ }
+ if$
+}
+
+FUNCTION {format.bvolume}
+{ volume empty$
+ { "" }
+ { fr.volume volume tie.or.space.connect
+ series empty$
+ 'skip$
+ { fr.of * series emphasize * }
+ if$
+ "volume and number" number either.or.check
+ }
+ if$
+}
+
+FUNCTION {format.number.series}
+{ volume empty$
+ { number empty$
+ { series field.or.null }
+ { output.state mid.sentence =
+ { fr.number }
+ { fr.number.maj }
+ if$
+ number tie.or.space.connect
+ series empty$
+ { "there's a number but no series in " cite$ * warning$ }
+ { fr.in.spc * series * }
+ if$
+ }
+ if$
+ }
+ { "" }
+ if$
+}
+
+FUNCTION {format.edition}
+{ edition empty$
+ { "" }
+ { output.state mid.sentence =
+ { edition "l" change.case$ fr.edition * }
+ { edition "t" change.case$ fr.edition * }
+ if$
+ }
+ if$
+}
+
+INTEGERS { multiresult }
+
+FUNCTION {multi.page.check}
+{ 't :=
+ #0 'multiresult :=
+ { multiresult not
+ t empty$ not
+ and
+ }
+ { t #1 #1 substring$
+ duplicate$ "-" =
+ swap$ duplicate$ "," =
+ swap$ "+" =
+ or or
+ { #1 'multiresult := }
+ { t #2 global.max$ substring$ 't := }
+ if$
+ }
+ while$
+ multiresult
+}
+
+FUNCTION {format.pages}
+{ pages empty$
+ { "" }
+ { pages multi.page.check
+ { fr.pages pages n.dashify tie.or.space.connect }
+ { fr.page pages tie.or.space.connect }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.vol.num.pages}
+{ volume field.or.null
+ number empty$
+ 'skip$
+ { "(" number * ")" * *
+ volume empty$
+ { "there's a number but no volume in " cite$ * warning$ }
+ 'skip$
+ if$
+ }
+ if$
+ pages empty$
+ 'skip$
+ { duplicate$ empty$
+ { pop$ format.pages }
+ { fr.deuxpoints * pages n.dashify * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.chapter.pages}
+{ chapter empty$
+ 'format.pages
+ { type empty$
+ { fr.chapter }
+ { type "l" change.case$ }
+ if$
+ chapter tie.or.space.connect
+ pages empty$
+ 'skip$
+ { ", " * format.pages * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.in.ed.booktitle}
+{ booktitle empty$
+ { "" }
+ { editor empty$
+ { fr.in booktitle emphasize * }
+ { fr.in format.editors #1 'after.authors := fr.add.period " " * * booktitle emphasize * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.thesis.type}
+{ type empty$
+ 'skip$
+ { pop$
+ type "t" change.case$
+ }
+ if$
+}
+
+FUNCTION {format.tr.number}
+{ type empty$
+ { fr.tech.rep }
+ 'type
+ if$
+ number empty$
+ { "t" change.case$ }
+ { number tie.or.space.connect }
+ if$
+}
+
+FUNCTION {format.article.crossref}
+{ fr.in % this is for apalike
+ " \cite{" * crossref * "}" *
+}
+
+FUNCTION {format.book.crossref}
+{ volume empty$
+ { "empty volume in " cite$ * "'s crossref of " * crossref * warning$
+ fr.in
+ }
+ { "Volume" volume tie.or.space.connect
+ fr.of *
+ }
+ if$
+ "\cite{" * crossref * "}" * % this is for apalike
+}
+
+FUNCTION {format.incoll.inproc.crossref}
+{ fr.in % this is for apalike
+ " \cite{" * crossref * "}" *
+}
+
+FUNCTION {article}
+{ output.bibitem
+ format.authors "author" output.check
+ author format.key output % special for
+ output.year.check % apalike
+ new.block
+ format.title "title" output.check
+ new.block
+ crossref missing$
+ { journal emphasize "journal" output.check
+ format.vol.num.pages output
+ }
+ { format.article.crossref output.nonnull
+ format.pages output
+ }
+ if$
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {book}
+{ output.bibitem
+ author empty$
+ { format.editors "author and editor" output.check
+ editor format.key output
+ }
+ { format.authors output.nonnull
+ crossref missing$
+ { "author and editor" editor either.or.check }
+ 'skip$
+ if$
+ }
+ if$
+ output.year.check % special for apalike
+ new.block
+ format.btitle "title" output.check
+ crossref missing$
+ { format.bvolume output
+ new.block
+ format.number.series output
+ new.sentence
+ publisher "publisher" output.check
+ address output
+ }
+ { new.block
+ format.book.crossref output.nonnull
+ }
+ if$
+ format.edition output
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {booklet}
+{ output.bibitem
+ format.authors output
+ author format.key output % special for
+ output.year.check % apalike
+ new.block
+ format.title "title" output.check
+ new.block
+ howpublished output
+ address output
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {inbook}
+{ output.bibitem
+ author empty$
+ { format.editors "author and editor" output.check
+ editor format.key output
+ }
+ { format.authors output.nonnull
+ crossref missing$
+ { "author and editor" editor either.or.check }
+ 'skip$
+ if$
+ }
+ if$
+ output.year.check % special for apalike
+ new.block
+ format.btitle "title" output.check
+ crossref missing$
+ { format.bvolume output
+ format.chapter.pages "chapter and pages" output.check
+ new.block
+ format.number.series output
+ new.sentence
+ publisher "publisher" output.check
+ address output
+ }
+ { format.chapter.pages "chapter and pages" output.check
+ new.block
+ format.book.crossref output.nonnull
+ }
+ if$
+ format.edition output
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {incollection}
+{ output.bibitem
+ format.authors "author" output.check
+ author format.key output % special for
+ output.year.check % apalike
+ new.block
+ format.title "title" output.check
+ new.block
+ crossref missing$
+ { format.in.ed.booktitle "booktitle" output.check
+ format.bvolume output
+ format.number.series output
+ format.chapter.pages output
+ new.sentence
+ publisher "publisher" output.check
+ address output
+ format.edition output
+ }
+ { format.incoll.inproc.crossref output.nonnull
+ format.chapter.pages output
+ }
+ if$
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {inproceedings}
+{ output.bibitem
+ format.authors "author" output.check
+ author format.key output % special for
+ output.year.check % apalike
+ new.block
+ format.title "title" output.check
+ new.block
+ crossref missing$
+ { format.in.ed.booktitle "booktitle" output.check
+ format.bvolume output
+ format.number.series output
+ format.pages output
+ address output % for apalike
+ new.sentence % there's no year
+ organization output % here so things
+ publisher output % are simpler
+ }
+ { format.incoll.inproc.crossref output.nonnull
+ format.pages output
+ }
+ if$
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {conference} { inproceedings }
+
+FUNCTION {manual}
+{ output.bibitem
+ format.authors output
+ author format.key output % special for
+ output.year.check % apalike
+ new.block
+ format.btitle "title" output.check
+ organization address new.block.checkb
+ organization output
+ address output
+ format.edition output
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {mastersthesis}
+{ output.bibitem
+ format.authors "author" output.check
+ author format.key output % special for
+ output.year.check % apalike
+ new.block
+ format.title "title" output.check
+ new.block
+ fr.master format.thesis.type output.nonnull
+ school "school" output.check
+ address output
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {misc}
+{ output.bibitem
+ format.authors output
+ author format.key output % special for
+ output.year.check % apalike
+ new.block
+ format.title output
+ new.block
+ howpublished output
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {phdthesis}
+{ output.bibitem
+ format.authors "author" output.check
+ author format.key output % special for
+ output.year.check % apalike
+ new.block
+ format.btitle "title" output.check
+ new.block
+ fr.phd format.thesis.type output.nonnull
+ school "school" output.check
+ address output
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {proceedings}
+{ output.bibitem
+ format.editors output
+ editor format.key output % special for
+ output.year.check % apalike
+ new.block
+ format.btitle "title" output.check
+ format.bvolume output
+ format.number.series output
+ address output % for apalike
+ new.sentence % we always output
+ organization output % a nonempty organization
+ publisher output % here
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {techreport}
+{ output.bibitem
+ format.authors "author" output.check
+ author format.key output % special for
+ output.year.check % apalike
+ new.block
+ format.title "title" output.check
+ new.block
+ format.tr.number output.nonnull
+ institution "institution" output.check
+ address output
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {unpublished}
+{ output.bibitem
+ format.authors "author" output.check
+ author format.key output % special for
+ output.year.check % apalike
+ new.block
+ format.title "title" output.check
+ new.block
+ note "note" output.check
+ fin.entry
+}
+
+FUNCTION {default.type} { misc }
+
+MACRO {acmcs} {"ACM Computing Surveys"}
+MACRO {acta} {"Acta Informatica"}
+MACRO {cacm} {"Communications of the ACM"}
+MACRO {ibmjrd} {"IBM Journal of Research and Development"}
+MACRO {ibmsj} {"IBM Systems Journal"}
+MACRO {ieeese} {"IEEE Transactions on Software Engineering"}
+MACRO {ieeetc} {"IEEE Transactions on Computers"}
+MACRO {ieeetcad}
+ {"IEEE Transactions on Computer-Aided Design of Integrated Circuits"}
+MACRO {ipl} {"Information Processing Letters"}
+MACRO {jacm} {"Journal of the ACM"}
+MACRO {jcss} {"Journal of Computer and System Sciences"}
+MACRO {scp} {"Science of Computer Programming"}
+MACRO {sicomp} {"SIAM Journal on Computing"}
+MACRO {tocs} {"ACM Transactions on Computer Systems"}
+MACRO {tods} {"ACM Transactions on Database Systems"}
+MACRO {tog} {"ACM Transactions on Graphics"}
+MACRO {toms} {"ACM Transactions on Mathematical Software"}
+MACRO {toois} {"ACM Transactions on Office Information Systems"}
+MACRO {toplas} {"ACM Transactions on Programming Languages and Systems"}
+MACRO {tcs} {"Theoretical Computer Science"}
+
+READ
+
+FUNCTION {sortify}
+{ purify$
+ "l" change.case$
+}
+
+INTEGERS { len }
+
+FUNCTION {chop.word}
+{ 's :=
+ 'len :=
+ s #1 len substring$ =
+ { s len #1 + global.max$ substring$ }
+ 's
+ if$
+}
+
+% There are three apalike cases: one person (Jones),
+% two (Jones and de~Bruijn), and more (Jones et~al.).
+% This function is much like format.crossref.editors.
+%
+FUNCTION {format.lab.names}
+%
+% Ici, on laisse les noms en minuscules, on ne les mets pas
+% en small caps.
+%
+{ 's :=
+ s #1 "{vv~}{ll}" format.name$
+ s num.names$ duplicate$
+ #2 >
+ { pop$ fr.et.al * }
+ { #2 <
+ 'skip$
+ { s #2 "{ff }{vv }{ll}{ jj}" format.name$ "others" =
+ { fr.et.al * }
+ { fr.and * s #2 "{vv~}{ll}" format.name$ * }
+ if$
+ }
+ if$
+ }
+ if$
+}
+
+FUNCTION {author.key.label}
+{ author empty$
+ { key empty$
+ { cite$ #1 #3 substring$ }
+ 'key % apalike uses the whole key
+ if$
+ }
+ { author format.lab.names }
+ if$
+}
+
+FUNCTION {author.editor.key.label}
+{ author empty$
+ { editor empty$
+ { key empty$
+ { cite$ #1 #3 substring$ }
+ 'key % apalike uses the whole key
+ if$
+ }
+ { editor format.lab.names }
+ if$
+ }
+ { author format.lab.names }
+ if$
+}
+
+FUNCTION {editor.key.label}
+{ editor empty$
+ { key empty$
+ { cite$ #1 #3 substring$ }
+ 'key % apalike uses the whole key, no organization
+ if$
+ }
+ { editor format.lab.names }
+ if$
+}
+
+FUNCTION {calc.label}
+{ type$ "book" =
+ type$ "inbook" =
+ or
+ 'author.editor.key.label
+ { type$ "proceedings" =
+ 'editor.key.label % apalike ignores organization
+ 'author.key.label % for labeling and sorting
+ if$
+ }
+ if$
+ ", " % these three lines are
+ * % for apalike, which
+ year field.or.null purify$ #-1 #4 substring$ % uses all four digits
+ *
+ 'label :=
+}
+
+FUNCTION {sort.format.names}
+{ 's :=
+ #1 'nameptr :=
+ ""
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ { nameptr #1 >
+ { " " * }
+ 'skip$
+ if$ % apalike uses initials
+ s nameptr "{vv{ } }{ll{ }}{ f{ }}{ jj{ }}" format.name$ 't := % <= here
+ nameptr numnames = t "others" = and
+ { fr.et.al * }
+ { t sortify * }
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+}
+
+FUNCTION {sort.format.title}
+{ 't :=
+ "Un " #3
+ "Une " #4
+ "Des " #4
+ "Le " #3
+ "La " #3
+ "Les " #4
+ "A " #2
+ "An " #3
+ "The " #4 t chop.word
+ chop.word
+ chop.word
+ chop.word
+ chop.word
+ chop.word
+ chop.word
+ chop.word
+ chop.word
+ sortify
+ #1 global.max$ substring$
+}
+
+FUNCTION {author.sort}
+{ author empty$
+ { key empty$
+ { "to sort, need author or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { author sort.format.names }
+ if$
+}
+
+FUNCTION {author.editor.sort}
+{ author empty$
+ { editor empty$
+ { key empty$
+ { "to sort, need author, editor, or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { editor sort.format.names }
+ if$
+ }
+ { author sort.format.names }
+ if$
+}
+
+FUNCTION {editor.sort}
+{ editor empty$
+ { key empty$
+ { "to sort, need editor or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { editor sort.format.names }
+ if$
+}
+
+% apalike uses two sorting passes; the first one sets the
+% labels so that the `a's, `b's, etc. can be computed;
+% the second pass puts the references in "correct" order.
+% The presort function is for the first pass. It computes
+% label, sort.label, and title, and then concatenates.
+FUNCTION {presort}
+{ calc.label
+ label sortify
+ " "
+ *
+ type$ "book" =
+ type$ "inbook" =
+ or
+ 'author.editor.sort
+ { type$ "proceedings" =
+ 'editor.sort
+ 'author.sort
+ if$
+ }
+ if$
+ #1 entry.max$ substring$ % for
+ 'sort.label := % apalike
+ sort.label % style
+ *
+ " "
+ *
+ title field.or.null
+ sort.format.title
+ *
+ #1 entry.max$ substring$
+ 'sort.key$ :=
+}
+
+ITERATE {presort}
+
+SORT % by label, sort.label, title---for final label calculation
+
+STRINGS { last.label next.extra } % apalike labels are only for the text;
+
+INTEGERS { last.extra.num } % there are none in the bibliography
+
+FUNCTION {initialize.extra.label.stuff} % and hence there is no `longest.label'
+{ #0 int.to.chr$ 'last.label :=
+ "" 'next.extra :=
+ #0 'last.extra.num :=
+}
+
+FUNCTION {forward.pass}
+{ last.label label =
+ { last.extra.num #1 + 'last.extra.num :=
+ last.extra.num int.to.chr$ 'extra.label :=
+ }
+ { "a" chr.to.int$ 'last.extra.num :=
+ "" 'extra.label :=
+ label 'last.label :=
+ }
+ if$
+}
+
+FUNCTION {reverse.pass}
+{ next.extra "b" =
+ { "a" 'extra.label := }
+ 'skip$
+ if$
+ label extra.label * 'label :=
+ extra.label 'next.extra :=
+}
+
+EXECUTE {initialize.extra.label.stuff}
+
+ITERATE {forward.pass}
+
+REVERSE {reverse.pass}
+
+% Now that the label is right we sort for real,
+% on sort.label then year then title. This is
+% for the second sorting pass.
+FUNCTION {bib.sort.order}
+{ sort.label
+ " "
+ *
+ year field.or.null sortify
+ *
+ " "
+ *
+ title field.or.null
+ sort.format.title
+ *
+ #1 entry.max$ substring$
+ 'sort.key$ :=
+}
+
+ITERATE {bib.sort.order}
+
+SORT % by sort.label, year, title---giving final bibliography order
+
+FUNCTION {begin.bib}
+{ preamble$ empty$
+ 'skip$
+ { preamble$ write$ newline$ }
+ if$
+ "\begin{thebibliography}{}" write$ newline$
+ "\expandafter\ifx\csname fonteauteurs\endcsname\relax"
+ write$ newline$
+ "\def\fonteauteurs{" fr.auteurs.style * "}\fi" * write$ newline$
+ "\expandafter\ifx\csname url\endcsname\relax" write$ newline$
+ " \def\url#1{{\tt #1}}% " write$ newline$
+ " \message{You should include the url package}\fi" write$ newline$
+}
+
+EXECUTE {begin.bib}
+
+EXECUTE {init.state.consts}
+
+ITERATE {call.type$}
+
+FUNCTION {end.bib}
+{ newline$
+ "\end{thebibliography}" write$ newline$
+}
+
+EXECUTE {end.bib}
diff --git a/biblio/bibtex/contrib/bib-fr/ieeetr-fr.bst b/biblio/bibtex/contrib/bib-fr/ieeetr-fr.bst
new file mode 100644
index 0000000000..db98d5fb29
--- /dev/null
+++ b/biblio/bibtex/contrib/bib-fr/ieeetr-fr.bst
@@ -0,0 +1,1082 @@
+%%
+%% Bib. style "ieeetr-fr" (version francisee de ieeetr.bst)
+%%
+%% NM, 2004/03/05
+%% markey@lsv.ens-cachan.fr
+%%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% Original Copyright (Oren Patashnik & Howard Trickey):
+%%
+ % IEEE Transactions bibliography style (29-Jan-88 version)
+ % numeric labels, order-of-reference, IEEE abbreviations,
+ % quotes around article titles, commas separate all fields
+ % except after book titles and before "notes". Otherwise,
+ % much like the "plain" family, from which this is adapted.
+ %
+ % History
+ % 9/30/85 (HWT) Original version, by Howard Trickey.
+ % 1/29/88 (OP&HWT) Updated for BibTeX version 0.99a, Oren Patashnik;
+ % THIS `ieeetr' VERSION DOES NOT WORK WITH BIBTEX 0.98i.
+ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+ENTRY
+ { address
+ author
+ booktitle
+ chapter
+ edition
+ editor
+ howpublished
+ institution
+ journal
+ key
+ month
+ note
+ number
+ organization
+ pages
+ publisher
+ school
+ series
+ title
+ type
+ volume
+ year
+ }
+ {}
+ { label }
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%%
+%% C'est ici que je definis les "traductions". Normalement, y a
+%% que ca a changer pour franciser le style...
+%%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+
+FUNCTION{fr.and}{ %% le "et" entre les deux derniers auteurs
+" et "
+}
+
+FUNCTION{fr.editeur}{ %% ", \'editeur" au singulier, ou " (\'editeur)"...
+", \'ed."
+}
+
+FUNCTION{fr.editeurs}{ %% ", \'editeurs" au pluriel, ou " (\'editeurs)"...
+", \'eds"
+}
+
+FUNCTION{fr.og}{ %% "ouvrez les guillemets"
+"\og " %% ATENTION : necessite babel
+}
+
+FUNCTION{fr.fg}{ %% "fermez les guillemets"
+"\fg{}" %% ATENTION : necessite babel
+}
+
+FUNCTION{fr.et.al}{ %% " et~al."
+" \emph{et~al.}"
+}
+
+FUNCTION{fr.in}{ %% "/In/ "
+"\emph{In} "
+}
+
+FUNCTION{fr.in.min}{ %% "/in/ "
+"\emph{in} "
+}
+
+FUNCTION{fr.in.spc}{ %% " de " (ou " de la s\'erie ")
+" de "
+}
+
+FUNCTION{fr.of}{ %% " de "
+" de "
+}
+
+FUNCTION{fr.number}{ %% "num{\'e}ro "
+"no.~"
+}
+
+FUNCTION{fr.number.maj}{ %% "Num\'ero "
+"No.~"
+}
+
+FUNCTION{fr.volume}{ %% "volume"
+"vol.~"
+}
+
+FUNCTION{fr.volume.maj}{ %% "Volume"
+"Vol.~"
+}
+
+FUNCTION{fr.edition}{ %% " \'edition"
+"~\'ed."
+}
+
+FUNCTION{fr.pages}{ %% "pages"
+"p.~"
+}
+
+FUNCTION{fr.page}{ %% "page"
+"p.~"
+}
+
+FUNCTION{fr.chapter}{ %% "chapitre"
+"chap.~"
+}
+
+FUNCTION{fr.tech.rep}{ %% "Rapport Technique"
+"Rap. tech."
+}
+
+FUNCTION{fr.master}{ %% "M\'emoire de D.E.A."
+"M\'em. D.E.A."
+}
+
+FUNCTION{fr.phd}{ %% "Th\`ese de doctorat"
+"Th\`ese doctorat"
+}
+
+FUNCTION{fr.auteurs.style}{
+ %% si on veut des small caps sur le LASTNAME de l'auteur
+ %% Cette fonction est utilisee dans la definition d'une
+ %% fonction LaTeX.
+"\scshape"
+}
+
+FUNCTION{fr.ponctuation.apres.auteurs}{ %% Comme son nom l'indique...
+ %% Laisser vide pour un "."
+" : "
+}
+
+FUNCTION{fr.deuxpoints}{ %% Pour eviter l'espace avant les ":".
+"\string:\penalty500\relax "
+}
+
+MACRO {jan} {"jan."}
+MACRO {feb} {"f\'ev."}
+MACRO {mar} {"mars"}
+MACRO {apr} {"avril"}
+MACRO {may} {"mai"}
+MACRO {jun} {"juin"}
+MACRO {jul} {"juil."}
+MACRO {aug} {"ao\^ut"}
+MACRO {sep} {"sept."}
+MACRO {oct} {"oct."}
+MACRO {nov} {"nov."}
+MACRO {dec} {"d\'ec."}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%%
+%% La suite, normalement, y a rien a changer...
+%%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+INTEGERS { output.state before.all mid.sentence after.quote after.sentence
+ after.quoted.block after.block after.authors}
+
+FUNCTION {init.state.consts}
+{ #0 'before.all :=
+ #1 'mid.sentence :=
+ #2 'after.quote :=
+ #3 'after.sentence :=
+ #4 'after.quoted.block :=
+ #5 'after.block :=
+ #0 'after.authors :=
+}
+
+STRINGS { s t }
+
+FUNCTION{ fr.add.period }{
+after.authors
+ { fr.ponctuation.apres.auteurs empty$
+ { add.period$ }
+ { fr.ponctuation.apres.auteurs * #0 'after.authors := }
+ if$}
+ { add.period$ }
+if$
+}
+
+FUNCTION {output.nonnull}
+{ 's :=
+ output.state mid.sentence =
+ { ", " * write$ }
+ { output.state after.quote =
+ { " " * write$ }
+ { output.state after.block =
+ { fr.add.period write$
+ newline$
+ "\newblock " write$
+ }
+ { output.state before.all =
+ 'write$
+ { output.state after.quoted.block =
+ { write$
+ newline$
+ "\newblock " write$
+ }
+ { fr.add.period " " * write$ }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+ mid.sentence 'output.state :=
+ }
+ if$
+ s
+}
+
+FUNCTION {output}
+{ duplicate$ empty$
+ 'pop$
+ 'output.nonnull
+ if$
+}
+
+FUNCTION {output.check}
+{ 't :=
+ duplicate$ empty$
+ { pop$ "empty " t * " in " * cite$ * warning$ }
+ 'output.nonnull
+ if$
+}
+
+FUNCTION {output.bibitem}
+{ newline$
+ "\bibitem{" write$
+ cite$ write$
+ "}" write$
+ newline$
+ ""
+ before.all 'output.state :=
+}
+
+FUNCTION {blank.sep}
+{ after.quote 'output.state :=
+}
+
+FUNCTION {fin.entry}
+{ output.state after.quoted.block =
+ 'skip$
+ 'add.period$
+ if$
+ write$
+ newline$
+}
+
+FUNCTION {new.block}
+{ output.state before.all =
+ 'skip$
+ { output.state after.quote =
+ { after.quoted.block 'output.state := }
+ { after.block 'output.state := }
+ if$
+ }
+ if$
+}
+
+FUNCTION {new.sentence}
+{ output.state after.block =
+ 'skip$
+ { output.state before.all =
+ 'skip$
+ { after.sentence 'output.state := }
+ if$
+ }
+ if$
+}
+
+FUNCTION {not}
+{ { #0 }
+ { #1 }
+ if$
+}
+
+FUNCTION {and}
+{ 'skip$
+ { pop$ #0 }
+ if$
+}
+
+FUNCTION {or}
+{ { pop$ #1 }
+ 'skip$
+ if$
+}
+
+FUNCTION {new.block.checka}
+{ empty$
+ 'skip$
+ 'new.block
+ if$
+}
+
+FUNCTION {new.block.checkb}
+{ empty$
+ swap$ empty$
+ and
+ 'skip$
+ 'new.block
+ if$
+}
+
+FUNCTION {new.sentence.checka}
+{ empty$
+ 'skip$
+ 'new.sentence
+ if$
+}
+
+FUNCTION {field.or.null}
+{ duplicate$ empty$
+ { pop$ "" }
+ 'skip$
+ if$
+}
+
+FUNCTION {emphasize}
+{ duplicate$ empty$
+ { pop$ "" }
+ { "{\em " swap$ * "}" * }
+ if$
+}
+
+INTEGERS { nameptr namesleft numnames }
+
+FUNCTION {format.names}
+{ 's :=
+ #1 'nameptr :=
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ { s nameptr "{f.~}{vv~}\bgroup\fonteauteurs\bgroup {ll}\egroup\egroup{{}}{, jj}" format.name$ 't :=
+ nameptr #1 >
+ { namesleft #1 >
+ { ", " * t * }
+ { %numnames #2 >
+ %{ "," * }
+ %'skip$
+ %if$
+ t "\bgroup\fonteauteurs\bgroup others\egroup\egroup{}" =
+ { fr.et.al * }
+ { fr.and * t * }
+ if$
+ }
+ if$
+ }
+ 't
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+}
+
+FUNCTION {format.authors}
+{ author empty$
+ { "" }
+ { author format.names }
+ if$
+}
+
+FUNCTION {format.editors}
+{ editor empty$
+ { "" }
+ { editor format.names
+ editor num.names$ #1 >
+ { fr.editeurs * }
+ { fr.editeur * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.title}
+{ title empty$
+ { "" }
+ { fr.og title "t" change.case$ * fr.fg * ", " * }
+ if$
+}
+
+FUNCTION {format.title.p}
+{ title empty$
+ { "" }
+ { fr.og title "t" change.case$ * fr.fg * ". " * }
+ if$
+}
+
+FUNCTION {n.dashify}
+{ 't :=
+ ""
+ { t empty$ not }
+ { t #1 #1 substring$ "-" =
+ { t #1 #2 substring$ "--" = not
+ { "--" *
+ t #2 global.max$ substring$ 't :=
+ }
+ { { t #1 #1 substring$ "-" = }
+ { "-" *
+ t #2 global.max$ substring$ 't :=
+ }
+ while$
+ }
+ if$
+ }
+ { t #1 #1 substring$ *
+ t #2 global.max$ substring$ 't :=
+ }
+ if$
+ }
+ while$
+}
+
+FUNCTION {format.date}
+{ year empty$
+ { month empty$
+ { "" }
+ { "there's a month but no year in " cite$ * warning$
+ month
+ }
+ if$
+ }
+ { month empty$
+ 'year
+ { month " " * year * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.btitle}
+{ title emphasize
+}
+
+FUNCTION {tie.or.space.connect}
+{ duplicate$ text.length$ #3 <
+ { "~" }
+ { " " }
+ if$
+ swap$ * *
+}
+
+FUNCTION {either.or.check}
+{ empty$
+ 'pop$
+ { "can't use both " swap$ * " fields in " * cite$ * warning$ }
+ if$
+}
+
+FUNCTION {format.bvolume}
+{ volume empty$
+ { "" }
+ { fr.volume volume *
+ series empty$
+ 'skip$
+ { fr.in.min * series emphasize * }
+ if$
+ "volume and number" number either.or.check
+ }
+ if$
+}
+
+FUNCTION {format.number.series}
+{ volume empty$
+ { number empty$
+ { series field.or.null }
+ { output.state mid.sentence =
+ { fr.number }
+ { fr.number.maj }
+ if$
+ number *
+ series empty$
+ { "there's a number but no series in " cite$ * warning$ }
+ { fr.in.spc * series * }
+ if$
+ }
+ if$
+ }
+ { "" }
+ if$
+}
+
+FUNCTION {format.edition}
+{ edition empty$
+ { "" }
+ { edition "l" change.case$ fr.edition * }
+ if$
+}
+
+INTEGERS { multiresult }
+
+FUNCTION {multi.page.check}
+{ 't :=
+ #0 'multiresult :=
+ { multiresult not
+ t empty$ not
+ and
+ }
+ { t #1 #1 substring$
+ duplicate$ "-" =
+ swap$ duplicate$ "," =
+ swap$ "+" =
+ or or
+ { #1 'multiresult := }
+ { t #2 global.max$ substring$ 't := }
+ if$
+ }
+ while$
+ multiresult
+}
+
+FUNCTION {format.pages}
+{ pages empty$
+ { "" }
+ { pages multi.page.check
+ { fr.pages pages n.dashify * }
+ { fr.page pages * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.volume}
+{ volume empty$
+ { "" }
+ { fr.volume volume * }
+ if$
+}
+
+FUNCTION {format.number}
+{ number empty$
+ { "" }
+ { fr.number number * }
+ if$
+}
+
+FUNCTION {format.chapter.pages}
+{ chapter empty$
+ 'format.pages
+ { type empty$
+ { fr.chapter chapter * }
+ { type "l" change.case$ chapter tie.or.space.connect }
+ if$
+ pages empty$
+ 'skip$
+ { ", " * format.pages * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.in.ed.booktitle}
+{ booktitle empty$
+ { "" }
+ { fr.in.min booktitle emphasize *
+ editor empty$
+ 'skip$
+ { " (" * format.editors * ")" * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.thesis.type}
+{ type empty$
+ 'skip$
+ { pop$
+ output.state after.block =
+ { type "t" change.case$ }
+ { type "l" change.case$ }
+ if$
+ }
+ if$
+}
+
+FUNCTION {empty.misc.check}
+{ author empty$ title empty$ howpublished empty$
+ month empty$ year empty$ note empty$
+ and and and and and
+ { "all relevant fields are empty in " cite$ * warning$ }
+ 'skip$
+ if$
+}
+
+FUNCTION {format.tr.number}
+{ type empty$
+ { fr.tech.rep }
+ 'type
+ if$
+ number empty$
+ { "l" change.case$ }
+ { number tie.or.space.connect }
+ if$
+}
+
+FUNCTION {format.addr.pub}
+{ publisher empty$
+ { "" }
+ { address empty$
+ { "" }
+ { address ": " * }
+ if$
+ publisher *
+ }
+ if$
+}
+
+FUNCTION {format.paddress}
+{ address empty$
+ { "" }
+ { "(" address * ")" * }
+ if$
+}
+
+FUNCTION {format.article.crossref}
+{ key empty$
+ { journal empty$
+ { "need key or journal for " cite$ * " to crossref " * crossref *
+ warning$
+ ""
+ }
+ { fr.in.min "{\em " * journal * "\/}" * }
+ if$
+ }
+ { fr.in.min key * }
+ if$
+ " \cite{" * crossref * "}" *
+}
+
+FUNCTION {format.crossref.editor}
+{ editor #1 "{vv~}\bgroup\fonteauteurs\bgroup {ll}\egroup\egroup{{}}" format.name$
+ editor num.names$ duplicate$
+ #2 >
+ { pop$ fr.et.al * }
+ { #2 <
+ 'skip$
+ { editor #2 "{ff }{vv }{ll}{ jj}" format.name$ "others" =
+ { fr.et.al * }
+ { fr.and * editor #2 "{vv~}\bgroup\fonteauteurs\bgroup {ll}\egroup\egroup{{}}" format.name$ * }
+ if$
+ }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.book.crossref}
+{ volume empty$
+ { "empty volume in " cite$ * "'s crossref of " * crossref * warning$
+ fr.in
+ }
+ { fr.volume volume *
+ fr.of *
+ }
+ if$
+ editor empty$
+ editor field.or.null author field.or.null =
+ or
+ { key empty$
+ { series empty$
+ { "need editor, key, or series for " cite$ * " to crossref " *
+ crossref * warning$
+ "" *
+ }
+ { "{\em " * series * "\/}" * }
+ if$
+ }
+ { key * }
+ if$
+ }
+ { format.crossref.editor * }
+ if$
+ " \cite{" * crossref * "}" *
+}
+
+FUNCTION {format.incoll.inproc.crossref}
+{ editor empty$
+ editor field.or.null author field.or.null =
+ or
+ { key empty$
+ { booktitle empty$
+ { "need editor, key, or booktitle for " cite$ * " to crossref " *
+ crossref * warning$
+ ""
+ }
+ { fr.in.min "{\em " * booktitle * "\/}" * }
+ if$
+ }
+ { fr.in.min key * }
+ if$
+ }
+ { fr.in.min format.crossref.editor * }
+ if$
+ " \cite{" * crossref * "}" *
+}
+
+FUNCTION {article}
+{ output.bibitem
+ format.authors "author" output.check
+ format.title "title" output.check
+ blank.sep
+ crossref missing$
+ { journal emphasize "journal" output.check
+ format.volume output
+ month empty$
+ { format.number output }
+ 'skip$
+ if$
+ format.pages output
+ format.date "year" output.check
+ }
+ { format.article.crossref output.nonnull
+ format.pages output
+ }
+ if$
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {book}
+{ output.bibitem
+ author empty$
+ { format.editors "author and editor" output.check }
+ { format.authors output.nonnull
+ crossref missing$
+ { "author and editor" editor either.or.check }
+ 'skip$
+ if$
+ }
+ if$
+ format.btitle "title" output.check
+ crossref missing$
+ { format.bvolume output
+ new.block
+ format.number.series output
+ format.addr.pub "publisher" output.check
+ }
+ { new.block
+ format.book.crossref output.nonnull
+ }
+ if$
+ format.edition output
+ format.date "year" output.check
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {booklet}
+{ output.bibitem
+ format.authors output
+ title empty$
+ { "empty title in " cite$ * warning$
+ howpublished new.sentence.checka
+ }
+ { howpublished empty$ not
+ address empty$ month empty$ year empty$ and and
+ or
+ { format.title.p output.nonnull }
+ { format.title output.nonnull }
+ if$
+ blank.sep
+ }
+ if$
+ howpublished output
+ address output
+ format.date output
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {inbook}
+{ output.bibitem
+ author empty$
+ { format.editors "author and editor" output.check }
+ { format.authors output.nonnull
+ crossref missing$
+ { "author and editor" editor either.or.check }
+ 'skip$
+ if$
+ }
+ if$
+ format.btitle "title" output.check
+ crossref missing$
+ { format.bvolume output
+ format.chapter.pages "chapter and pages" output.check
+ new.block
+ format.number.series output
+ format.addr.pub "publisher" output.check
+ }
+ { format.chapter.pages "chapter and pages" output.check
+ new.block
+ format.book.crossref output.nonnull
+ }
+ if$
+ format.edition output
+ format.date "year" output.check
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {incollection}
+{ output.bibitem
+ format.authors "author" output.check
+ format.title "title" output.check
+ blank.sep
+ crossref missing$
+ { format.in.ed.booktitle "booktitle" output.check
+ format.bvolume output
+ format.number.series output
+ format.chapter.pages output
+ format.addr.pub "publisher" output.check
+ format.edition output
+ format.date "year" output.check
+ }
+ { format.incoll.inproc.crossref output.nonnull
+ format.chapter.pages output
+ }
+ if$
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {inproceedings}
+{ output.bibitem
+ format.authors "author" output.check
+ format.title "title" output.check
+ blank.sep
+ crossref missing$
+ { format.in.ed.booktitle "booktitle" output.check
+ format.bvolume output
+ format.number.series output
+ format.paddress output
+ format.pages output
+ organization output
+ publisher output
+ format.date "year" output.check
+ }
+ { format.incoll.inproc.crossref output.nonnull
+ format.pages output
+ }
+ if$
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {conference} { inproceedings }
+
+FUNCTION {manual}
+{ output.bibitem
+ author empty$
+ { organization empty$
+ 'skip$
+ { organization output.nonnull
+ address output
+ }
+ if$
+ }
+ { format.authors output.nonnull }
+ if$
+ format.btitle "title" output.check
+ author empty$
+ { organization empty$
+ { address new.block.checka
+ address output
+ }
+ 'skip$
+ if$
+ }
+ { organization address new.block.checkb
+ organization output
+ address output
+ }
+ if$
+ format.edition output
+ format.date output
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {mastersthesis}
+{ output.bibitem
+ format.authors "author" output.check
+ format.title "title" output.check
+ blank.sep
+ fr.master format.thesis.type output.nonnull
+ school "school" output.check
+ address output
+ format.date "year" output.check
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {misc}
+{ output.bibitem
+ format.authors output
+ title empty$
+ { howpublished new.sentence.checka }
+ { howpublished empty$ not
+ month empty$ year empty$ and
+ or
+ { format.title.p output.nonnull }
+ { format.title output.nonnull }
+ if$
+ blank.sep
+ }
+ if$
+ howpublished output
+ format.date output
+ new.block
+ note output
+ fin.entry
+ empty.misc.check
+}
+
+FUNCTION {phdthesis}
+{ output.bibitem
+ format.authors "author" output.check
+ format.btitle "title" output.check
+ new.block
+ fr.phd format.thesis.type output.nonnull
+ school "school" output.check
+ address output
+ format.date "year" output.check
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {proceedings}
+{ output.bibitem
+ editor empty$
+ { organization output }
+ { format.editors output.nonnull }
+ if$
+ format.btitle "title" output.check
+ format.bvolume output
+ format.number.series output
+ format.paddress output
+ editor empty$
+ 'skip$
+ { organization output }
+ if$
+ publisher output
+ format.date "year" output.check
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {techreport}
+{ output.bibitem
+ format.authors "author" output.check
+ format.title "title" output.check
+ blank.sep
+ format.tr.number output.nonnull
+ institution "institution" output.check
+ address output
+ format.date "year" output.check
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {unpublished}
+{ output.bibitem
+ format.authors "author" output.check
+ format.title.p "title" output.check
+ blank.sep
+ note "note" output.check
+ format.date output
+ fin.entry
+}
+
+FUNCTION {default.type} { misc }
+
+MACRO {acmcs} {"ACM Computing Surveys"}
+MACRO {acta} {"Acta Informatica"}
+MACRO {cacm} {"Communications ACM"}
+MACRO {ibmjrd} {"IBM J. Research and Development"}
+MACRO {ibmsj} {"IBM Systems~J."}
+MACRO {ieeese} {"IEEE Trans. Software Engineering"}
+MACRO {ieeetc} {"IEEE Trans. Computers"}
+MACRO {ieeetcad}
+ {"IEEE Trans. Computer-Aided Design"}
+MACRO {ipl} {"Information Processing Letters"}
+MACRO {jacm} {"J.~ACM"}
+MACRO {jcss} {"J.~Computer and System Sciences"}
+MACRO {scp} {"Science of Computer Programming"}
+MACRO {sicomp} {"SIAM J. Computing"}
+MACRO {tocs} {"ACM Trans. Computer Systems"}
+MACRO {tods} {"ACM Trans. Database Systems"}
+MACRO {tog} {"ACM Trans. Graphics"}
+MACRO {toms} {"ACM Trans. Mathematical Software"}
+MACRO {toois} {"ACM Trans. Office Information Systems"}
+MACRO {toplas} {"ACM Trans. Programming Languages and Systems"}
+MACRO {tcs} {"Theoretical Computer Science"}
+
+READ
+
+STRINGS { longest.label }
+
+INTEGERS { number.label longest.label.width }
+
+FUNCTION {initialize.longest.label}
+{ "" 'longest.label :=
+ #1 'number.label :=
+ #0 'longest.label.width :=
+}
+
+FUNCTION {longest.label.pass}
+{ number.label int.to.str$ 'label :=
+ number.label #1 + 'number.label :=
+ label width$ longest.label.width >
+ { label 'longest.label :=
+ label width$ 'longest.label.width :=
+ }
+ 'skip$
+ if$
+}
+
+EXECUTE {initialize.longest.label}
+
+ITERATE {longest.label.pass}
+
+FUNCTION {begin.bib}
+{ preamble$ empty$
+ 'skip$
+ { preamble$ write$ newline$ }
+ if$
+ "\begin{thebibliography}{" longest.label * "}" * write$ newline$
+ "\expandafter\ifx\csname fonteauteurs\endcsname\relax"
+ write$ newline$
+ "\def\fonteauteurs{" fr.auteurs.style * "}\fi" * write$ newline$
+}
+
+EXECUTE {begin.bib}
+
+EXECUTE {init.state.consts}
+
+ITERATE {call.type$}
+
+FUNCTION {end.bib}
+{ newline$
+ "\end{thebibliography}" write$ newline$
+}
+
+EXECUTE {end.bib}
diff --git a/biblio/bibtex/contrib/bib-fr/plain-fr.bst b/biblio/bibtex/contrib/bib-fr/plain-fr.bst
new file mode 100644
index 0000000000..a47e102c03
--- /dev/null
+++ b/biblio/bibtex/contrib/bib-fr/plain-fr.bst
@@ -0,0 +1,1235 @@
+%%
+%% Bib. style "plain-fr" (version francisee de plain.bst)
+%%
+%% NM, 2004/02/22
+%% markey@lsv.ens-cachan.fr
+%%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% Original Copyright (Oren Patashnik):
+%%
+ % This program may be distributed and/or modified under the
+ % conditions of the LaTeX Project Public License, either version 1.2
+ % of this license or (at your option) any later version.
+ % The latest version of this license is in
+ % http://www.latex-project.org/lppl.txt
+ % and version 1.2 or later is part of all distributions of LaTeX
+ % version 1999/12/01 or later.
+ %
+ % This program consists of the files plain.bst
+ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+ENTRY
+ { address
+ author
+ booktitle
+ chapter
+ edition
+ editor
+ howpublished
+ institution
+ journal
+ key
+ month
+ note
+ number
+ organization
+ pages
+ publisher
+ school
+ series
+ title
+ type
+ volume
+ year
+ }
+ {}
+ { label }
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%%
+%% C'est ici que je definis les "traductions". Normalement, y a
+%% que ca a changer pour franciser le style...
+%%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+
+FUNCTION{fr.and}{ %% le "et" entre les deux derniers auteurs
+" et "
+}
+
+FUNCTION{fr.editeur}{ %% ", \'editeur" au singulier, ou " (\'editeur)"...
+", \'editeur"
+}
+
+FUNCTION{fr.editeurs}{ %% ", \'editeurs" au pluriel, ou " (\'editeurs)"...
+", \'editeurs"
+}
+
+FUNCTION{fr.et.al}{ %% " et~al."
+" \emph{et~al.}"
+}
+
+FUNCTION{fr.in}{ %% "Dans "
+"\emph{In} "
+}
+
+FUNCTION{fr.in.spc}{ %% " de " (ou " de la s\'erie ")
+" de "
+}
+
+FUNCTION{fr.of}{ %% " de "
+" de "
+}
+
+FUNCTION{fr.number}{ %% "num{\'e}ro "
+"num\'ero "
+}
+
+FUNCTION{fr.number.maj}{ %% "Num\'ero "
+"Num\'ero "
+}
+
+FUNCTION{fr.volume}{ %% "volume"
+"volume"
+}
+
+FUNCTION{fr.volume.maj}{ %% "Volume"
+"Volume"
+}
+
+FUNCTION{fr.edition}{ %% " \'edition"
+" \'edition"
+}
+
+FUNCTION{fr.pages}{ %% "pages"
+"pages"
+}
+
+FUNCTION{fr.page}{ %% "page"
+"page"
+}
+
+FUNCTION{fr.chapter}{ %% "chapitre"
+"chapitre"
+}
+
+FUNCTION{fr.tech.rep}{ %% "Rapport Technique"
+"Rapport technique"
+}
+
+FUNCTION{fr.master}{ %% "M\'emoire de D.E.A."
+"M\'emoire de D.E.A."
+}
+
+FUNCTION{fr.phd}{ %% "Th\`ese de doctorat"
+"Th\`ese de doctorat"
+}
+
+FUNCTION{fr.auteurs.style}{
+ %% si on veut des small caps sur le LASTNAME de l'auteur
+ %% Cette fonction est utilisee dans la definition d'une
+ %% fonction LaTeX.
+"\scshape"
+}
+
+FUNCTION{fr.ponctuation.apres.auteurs}{ %% Comme son nom l'indique...
+ %% Laisser vide pour un "."
+" : "
+}
+
+FUNCTION{fr.deuxpoints}{ %% Pour eviter l'espace avant les ":".
+"\string:\penalty500\relax "
+}
+
+MACRO {jan} {"janvier"}
+MACRO {feb} {"f\'evrier"}
+MACRO {mar} {"mars"}
+MACRO {apr} {"avril"}
+MACRO {may} {"mai"}
+MACRO {jun} {"juin"}
+MACRO {jul} {"juillet"}
+MACRO {aug} {"ao\^ut"}
+MACRO {sep} {"septembre"}
+MACRO {oct} {"octobre"}
+MACRO {nov} {"novembre"}
+MACRO {dec} {"d\'ecembre"}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%%
+%% La suite, normalement, y a rien a changer...
+%%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+
+
+
+
+INTEGERS { output.state before.all mid.sentence after.sentence after.block after.authors }
+
+FUNCTION {init.state.consts}
+{ #0 'before.all :=
+ #1 'mid.sentence :=
+ #2 'after.sentence :=
+ #3 'after.block :=
+ #0 'after.authors :=
+}
+
+STRINGS { s t }
+
+FUNCTION{ fr.add.period }{
+after.authors
+ { fr.ponctuation.apres.auteurs empty$
+ { add.period$ }
+ { fr.ponctuation.apres.auteurs * #0 'after.authors := }
+ if$}
+ { add.period$ }
+if$
+}
+
+FUNCTION {output.nonnull}
+{ 's :=
+ output.state mid.sentence =
+ { ", " * write$ }
+ { output.state after.block =
+ { fr.add.period write$
+ newline$
+ "\newblock " write$
+ }
+ { output.state before.all =
+ 'write$
+ { add.period$ " " * write$ }
+ if$
+ }
+ if$
+ mid.sentence 'output.state :=
+ }
+ if$
+ s
+}
+
+FUNCTION {output}
+{ duplicate$ empty$
+ 'pop$
+ 'output.nonnull
+ if$
+}
+
+FUNCTION {output.check}
+{ 't :=
+ duplicate$ empty$
+ { pop$ "empty " t * " in " * cite$ * warning$ }
+ 'output.nonnull
+ if$
+}
+
+FUNCTION {output.bibitem}
+{ newline$
+ "\bibitem{" write$
+ cite$ write$
+ "}" write$
+ newline$
+ ""
+ before.all 'output.state :=
+}
+
+FUNCTION {fin.entry}
+{ add.period$
+ write$
+ newline$
+}
+
+FUNCTION {new.block}
+{ output.state before.all =
+ 'skip$
+ { after.block 'output.state := }
+ if$
+}
+
+FUNCTION {new.sentence}
+{ output.state after.block =
+ 'skip$
+ { output.state before.all =
+ 'skip$
+ { after.sentence 'output.state := }
+ if$
+ }
+ if$
+}
+
+FUNCTION {not}
+{ { #0 }
+ { #1 }
+ if$
+}
+
+FUNCTION {and}
+{ 'skip$
+ { pop$ #0 }
+ if$
+}
+
+FUNCTION {or}
+{ { pop$ #1 }
+ 'skip$
+ if$
+}
+
+FUNCTION {new.block.checka}
+{ empty$
+ 'skip$
+ 'new.block
+ if$
+}
+
+FUNCTION {new.block.checkb}
+{ empty$
+ swap$ empty$
+ and
+ 'skip$
+ 'new.block
+ if$
+}
+
+FUNCTION {new.sentence.checka}
+{ empty$
+ 'skip$
+ 'new.sentence
+ if$
+}
+
+FUNCTION {new.sentence.checkb}
+{ empty$
+ swap$ empty$
+ and
+ 'skip$
+ 'new.sentence
+ if$
+}
+
+FUNCTION {field.or.null}
+{ duplicate$ empty$
+ { pop$ "" }
+ 'skip$
+ if$
+}
+
+FUNCTION {emphasize}
+{ duplicate$ empty$
+ { pop$ "" }
+ { "{\em " swap$ * "}" * }
+ if$
+}
+
+INTEGERS { nameptr namesleft numnames }
+
+FUNCTION {format.names}
+{ 's :=
+ #1 'nameptr :=
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ { s nameptr "{ff~}{vv~}\bgroup\fonteauteurs\bgroup {ll}\egroup\egroup{{}}{, jj}" format.name$ 't :=
+ nameptr #1 >
+ { namesleft #1 >
+ { ", " * t * }
+ { %numnames #2 > namesleft #2 > and
+ % { "," * }
+ % 'skip$
+ %if$
+ t "\bgroup\fonteauteurs\bgroup others\egroup\egroup{}" =
+ { fr.et.al * }
+ { fr.and * t * }
+ if$
+ }
+ if$
+ }
+ 't
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+}
+
+FUNCTION {format.authors}
+{ author empty$
+ { "" }
+ { author format.names #1 'after.authors := }
+ if$
+}
+
+FUNCTION {format.editors}
+{ editor empty$
+ { "" }
+ { editor format.names
+ editor num.names$ #1 >
+ { fr.editeurs * }
+ { fr.editeur * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.title}
+{ title empty$
+ { "" }
+ { title "t" change.case$ }
+ if$
+}
+
+FUNCTION {n.dashify}
+{ 't :=
+ ""
+ { t empty$ not }
+ { t #1 #1 substring$ "-" =
+ { t #1 #2 substring$ "--" = not
+ { "--" *
+ t #2 global.max$ substring$ 't :=
+ }
+ { { t #1 #1 substring$ "-" = }
+ { "-" *
+ t #2 global.max$ substring$ 't :=
+ }
+ while$
+ }
+ if$
+ }
+ { t #1 #1 substring$ *
+ t #2 global.max$ substring$ 't :=
+ }
+ if$
+ }
+ while$
+}
+
+FUNCTION {format.date}
+{ year empty$
+ { month empty$
+ { "" }
+ { "there's a month but no year in " cite$ * warning$
+ month
+ }
+ if$
+ }
+ { month empty$
+ 'year
+ { month " " * year * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.btitle}
+{ title emphasize
+}
+
+FUNCTION {tie.or.space.connect}
+{ duplicate$ text.length$ #3 <
+ { "~" }
+ { " " }
+ if$
+ swap$ * *
+}
+
+FUNCTION {either.or.check}
+{ empty$
+ 'pop$
+ { "can't use both " swap$ * " fields in " * cite$ * warning$ }
+ if$
+}
+
+FUNCTION {format.bvolume}
+{ volume empty$
+ { "" }
+ { fr.volume volume tie.or.space.connect
+ series empty$
+ 'skip$
+ { fr.of * series emphasize * }
+ if$
+ "volume and number" number either.or.check
+ }
+ if$
+}
+
+FUNCTION {format.number.series}
+{ volume empty$
+ { number empty$
+ { series field.or.null }
+ { output.state mid.sentence =
+ { fr.number }
+ { fr.number.maj }
+ if$
+ number tie.or.space.connect
+ series empty$
+ { "there's a number but no series in " cite$ * warning$ }
+ { fr.in.spc * series * }
+ if$
+ }
+ if$
+ }
+ { "" }
+ if$
+}
+
+FUNCTION {format.edition}
+{ edition empty$
+ { "" }
+ { output.state mid.sentence =
+ { edition "l" change.case$ fr.edition * }
+ { edition "t" change.case$ fr.edition * }
+ if$
+ }
+ if$
+}
+
+INTEGERS { multiresult }
+
+FUNCTION {multi.page.check}
+{ 't :=
+ #0 'multiresult :=
+ { multiresult not
+ t empty$ not
+ and
+ }
+ { t #1 #1 substring$
+ duplicate$ "-" =
+ swap$ duplicate$ "," =
+ swap$ "+" =
+ or or
+ { #1 'multiresult := }
+ { t #2 global.max$ substring$ 't := }
+ if$
+ }
+ while$
+ multiresult
+}
+
+FUNCTION {format.pages}
+{ pages empty$
+ { "" }
+ { pages multi.page.check
+ { fr.pages pages n.dashify tie.or.space.connect }
+ { fr.page pages tie.or.space.connect }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.vol.num.pages}
+{ volume field.or.null
+ number empty$
+ 'skip$
+ { "(" number * ")" * *
+ volume empty$
+ { "there's a number but no volume in " cite$ * warning$ }
+ 'skip$
+ if$
+ }
+ if$
+ pages empty$
+ 'skip$
+ { duplicate$ empty$
+ { pop$ format.pages }
+ { fr.deuxpoints * pages n.dashify * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.chapter.pages}
+{ chapter empty$
+ 'format.pages
+ { type empty$
+ { fr.chapter }
+ { type "l" change.case$ }
+ if$
+ chapter tie.or.space.connect
+ pages empty$
+ 'skip$
+ { ", " * format.pages * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.in.ed.booktitle}
+{ booktitle empty$
+ { "" }
+ { editor empty$
+ { fr.in booktitle emphasize * }
+ { fr.in format.editors #1 'after.authors := fr.add.period " " * * booktitle emphasize * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {empty.misc.check}
+{ author empty$ title empty$ howpublished empty$
+ month empty$ year empty$ note empty$
+ and and and and and
+ key empty$ not and
+ { "all relevant fields are empty in " cite$ * warning$ }
+ 'skip$
+ if$
+}
+
+FUNCTION {format.thesis.type}
+{ type empty$
+ 'skip$
+ { pop$
+ type "t" change.case$
+ }
+ if$
+}
+
+FUNCTION {format.tr.number}
+{ type empty$
+ { fr.tech.rep }
+ 'type
+ if$
+ number empty$
+ { "t" change.case$ }
+ { number tie.or.space.connect }
+ if$
+}
+
+FUNCTION {format.article.crossref}
+{ key empty$
+ { journal empty$
+ { "need key or journal for " cite$ * " to crossref " * crossref *
+ warning$
+ ""
+ }
+ { fr.in "{\em " * journal * "\/}" * }
+ if$
+ }
+ { fr.in key * }
+ if$
+ " \cite{" * crossref * "}" *
+}
+
+FUNCTION {format.crossref.editor}
+{ editor #1 "{vv~}\bgroup\fonteauteurs\bgroup {ll}\egroup\egroup{{}}" format.name$
+ editor num.names$ duplicate$
+ #2 >
+ { pop$ fr.et.al * }
+ { #2 <
+ 'skip$
+ { editor #2 "{ff }{vv }{ll}{ jj}" format.name$ "others" =
+ { fr.et.al * }
+ { fr.and * editor #2 "{vv~}\bgroup\fonteauteurs\bgroup {ll}\egroup\egroup{{}}" format.name$ * }
+ if$
+ }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.book.crossref}
+{ volume empty$
+ { "empty volume in " cite$ * "'s crossref of " * crossref * warning$
+ fr.in
+ }
+ { fr.volume.maj volume tie.or.space.connect
+ fr.of *
+ }
+ if$
+ editor empty$
+ editor field.or.null author field.or.null =
+ or
+ { key empty$
+ { series empty$
+ { "need editor, key, or series for " cite$ * " to crossref " *
+ crossref * warning$
+ "" *
+ }
+ { "{\em " * series * "\/}" * }
+ if$
+ }
+ { key * }
+ if$
+ }
+ { format.crossref.editor * }
+ if$
+ " \cite{" * crossref * "}" *
+}
+
+FUNCTION {format.incoll.inproc.crossref}
+{ editor empty$
+ editor field.or.null author field.or.null =
+ or
+ { key empty$
+ { booktitle empty$
+ { "need editor, key, or booktitle for " cite$ * " to crossref " *
+ crossref * warning$
+ ""
+ }
+ { fr.in "{\em " * booktitle * "\/}" * }
+ if$
+ }
+ { fr.in key * }
+ if$
+ }
+ { fr.in format.crossref.editor * }
+ if$
+ " \cite{" * crossref * "}" *
+}
+
+FUNCTION {article}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.title "title" output.check
+ new.block
+ crossref missing$
+ { journal emphasize "journal" output.check
+ format.vol.num.pages output
+ format.date "year" output.check
+ }
+ { format.article.crossref output.nonnull
+ format.pages output
+ }
+ if$
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {book}
+{ output.bibitem
+ author empty$
+ { format.editors "author and editor" output.check }
+ { format.authors output.nonnull
+ crossref missing$
+ { "author and editor" editor either.or.check }
+ 'skip$
+ if$
+ }
+ if$
+ new.block
+ format.btitle "title" output.check
+ crossref missing$
+ { format.bvolume output
+ new.block
+ format.number.series output
+ new.sentence
+ publisher "publisher" output.check
+ address output
+ }
+ { new.block
+ format.book.crossref output.nonnull
+ }
+ if$
+ format.edition output
+ format.date "year" output.check
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {booklet}
+{ output.bibitem
+ format.authors output
+ new.block
+ format.title "title" output.check
+ howpublished address new.block.checkb
+ howpublished output
+ address output
+ format.date output
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {inbook}
+{ output.bibitem
+ author empty$
+ { format.editors "author and editor" output.check }
+ { format.authors output.nonnull
+ crossref missing$
+ { "author and editor" editor either.or.check }
+ 'skip$
+ if$
+ }
+ if$
+ new.block
+ format.btitle "title" output.check
+ crossref missing$
+ { format.bvolume output
+ format.chapter.pages "chapter and pages" output.check
+ new.block
+ format.number.series output
+ new.sentence
+ publisher "publisher" output.check
+ address output
+ }
+ { format.chapter.pages "chapter and pages" output.check
+ new.block
+ format.book.crossref output.nonnull
+ }
+ if$
+ format.edition output
+ format.date "year" output.check
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {incollection}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.title "title" output.check
+ new.block
+ crossref missing$
+ { format.in.ed.booktitle "booktitle" output.check
+ format.bvolume output
+ format.number.series output
+ format.chapter.pages output
+ new.sentence
+ publisher "publisher" output.check
+ address output
+ format.edition output
+ format.date "year" output.check
+ }
+ { format.incoll.inproc.crossref output.nonnull
+ format.chapter.pages output
+ }
+ if$
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {inproceedings}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.title "title" output.check
+ new.block
+ crossref missing$
+ { format.in.ed.booktitle "booktitle" output.check
+ format.bvolume output
+ format.number.series output
+ format.pages output
+ address empty$
+ { organization publisher new.sentence.checkb
+ organization output
+ publisher output
+ format.date "year" output.check
+ }
+ { address output.nonnull
+ format.date "year" output.check
+ new.sentence
+ organization output
+ publisher output
+ }
+ if$
+ }
+ { format.incoll.inproc.crossref output.nonnull
+ format.pages output
+ }
+ if$
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {conference} { inproceedings }
+
+FUNCTION {manual}
+{ output.bibitem
+ author empty$
+ { organization empty$
+ 'skip$
+ { organization output.nonnull
+ address output
+ }
+ if$
+ }
+ { format.authors output.nonnull }
+ if$
+ new.block
+ format.btitle "title" output.check
+ author empty$
+ { organization empty$
+ { address new.block.checka
+ address output
+ }
+ 'skip$
+ if$
+ }
+ { organization address new.block.checkb
+ organization output
+ address output
+ }
+ if$
+ format.edition output
+ format.date output
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {mastersthesis}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.title "title" output.check
+ new.block
+ fr.master format.thesis.type output.nonnull
+ school "school" output.check
+ address output
+ format.date "year" output.check
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {misc}
+{ output.bibitem
+ format.authors output
+ title howpublished new.block.checkb
+ format.title output
+ howpublished new.block.checka
+ howpublished output
+ format.date output
+ new.block
+ note output
+ fin.entry
+ empty.misc.check
+}
+
+FUNCTION {phdthesis}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.btitle "title" output.check
+ new.block
+ fr.phd format.thesis.type output.nonnull
+ school "school" output.check
+ address output
+ format.date "year" output.check
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {proceedings}
+{ output.bibitem
+ editor empty$
+ { organization output }
+ { format.editors output.nonnull }
+ if$
+ new.block
+ format.btitle "title" output.check
+ format.bvolume output
+ format.number.series output
+ address empty$
+ { editor empty$
+ { publisher new.sentence.checka }
+ { organization publisher new.sentence.checkb
+ organization output
+ }
+ if$
+ publisher output
+ format.date "year" output.check
+ }
+ { address output.nonnull
+ format.date "year" output.check
+ new.sentence
+ editor empty$
+ 'skip$
+ { organization output }
+ if$
+ publisher output
+ }
+ if$
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {techreport}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.title "title" output.check
+ new.block
+ format.tr.number output.nonnull
+ institution "institution" output.check
+ address output
+ format.date "year" output.check
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {unpublished}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.title "title" output.check
+ new.block
+ note "note" output.check
+ format.date output
+ fin.entry
+}
+
+FUNCTION {default.type} { misc }
+
+MACRO {acmcs} {"ACM Computing Surveys"}
+MACRO {acta} {"Acta Informatica"}
+MACRO {cacm} {"Communications of the ACM"}
+MACRO {ibmjrd} {"IBM Journal of Research and Development"}
+MACRO {ibmsj} {"IBM Systems Journal"}
+MACRO {ieeese} {"IEEE Transactions on Software Engineering"}
+MACRO {ieeetc} {"IEEE Transactions on Computers"}
+MACRO {ieeetcad}
+ {"IEEE Transactions on Computer-Aided Design of Integrated Circuits"}
+MACRO {ipl} {"Information Processing Letters"}
+MACRO {jacm} {"Journal of the ACM"}
+MACRO {jcss} {"Journal of Computer and System Sciences"}
+MACRO {scp} {"Science of Computer Programming"}
+MACRO {sicomp} {"SIAM Journal on Computing"}
+MACRO {tocs} {"ACM Transactions on Computer Systems"}
+MACRO {tods} {"ACM Transactions on Database Systems"}
+MACRO {tog} {"ACM Transactions on Graphics"}
+MACRO {toms} {"ACM Transactions on Mathematical Software"}
+MACRO {toois} {"ACM Transactions on Office Information Systems"}
+MACRO {toplas} {"ACM Transactions on Programming Languages and Systems"}
+MACRO {tcs} {"Theoretical Computer Science"}
+
+READ
+
+FUNCTION {sortify}
+{ purify$
+ "l" change.case$
+}
+
+INTEGERS { len }
+
+FUNCTION {chop.word}
+{ 's :=
+ 'len :=
+ s #1 len substring$ =
+ { s len #1 + global.max$ substring$ }
+ 's
+ if$
+}
+
+FUNCTION {sort.format.names}
+{ 's :=
+ #1 'nameptr :=
+ ""
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ { nameptr #1 >
+ { " " * }
+ 'skip$
+ if$
+ s nameptr "{vv{ } }{ll{ }}{ ff{ }}{ jj{ }}" format.name$ 't :=
+ nameptr numnames = t "others" = and
+ { "et al" * }
+ { t sortify * }
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+}
+
+FUNCTION {sort.format.title}
+{ 't :=
+ "Le " #3
+ "La " #3
+ "Les " #4
+ "Un " #3
+ "Une " #4
+ "Des " #4
+ "A " #2
+ "An " #3
+ "The " #4 t chop.word
+ chop.word
+ chop.word
+ chop.word
+ chop.word
+ chop.word
+ chop.word
+ chop.word
+ chop.word
+ sortify
+ #1 global.max$ substring$
+}
+
+FUNCTION {author.sort}
+{ author empty$
+ { key empty$
+ { "to sort, need author or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { author sort.format.names }
+ if$
+}
+
+FUNCTION {author.editor.sort}
+{ author empty$
+ { editor empty$
+ { key empty$
+ { "to sort, need author, editor, or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { editor sort.format.names }
+ if$
+ }
+ { author sort.format.names }
+ if$
+}
+
+FUNCTION {author.organization.sort}
+{ author empty$
+ { organization empty$
+ { key empty$
+ { "to sort, need author, organization, or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { "Le " #3
+ "La " #3
+ "Les " #4
+ "The " #4 organization chop.word
+ chop.word
+ chop.word
+ chop.word
+ sortify }
+ if$
+ }
+ { author sort.format.names }
+ if$
+}
+
+FUNCTION {editor.organization.sort}
+{ editor empty$
+ { organization empty$
+ { key empty$
+ { "to sort, need editor, organization, or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { "Le " #3
+ "La " #3
+ "Les " #4
+ "The " #4 organization chop.word
+ chop.word
+ chop.word
+ chop.word
+ sortify }
+ if$
+ }
+ { editor sort.format.names }
+ if$
+}
+
+FUNCTION {presort}
+{ type$ "book" =
+ type$ "inbook" =
+ or
+ 'author.editor.sort
+ { type$ "proceedings" =
+ 'editor.organization.sort
+ { type$ "manual" =
+ 'author.organization.sort
+ 'author.sort
+ if$
+ }
+ if$
+ }
+ if$
+ " "
+ *
+ year field.or.null sortify
+ *
+ " "
+ *
+ title field.or.null
+ sort.format.title
+ *
+ #1 entry.max$ substring$
+ 'sort.key$ :=
+}
+
+ITERATE {presort}
+
+SORT
+
+STRINGS { longest.label }
+
+INTEGERS { number.label longest.label.width }
+
+FUNCTION {initialize.longest.label}
+{ "" 'longest.label :=
+ #1 'number.label :=
+ #0 'longest.label.width :=
+}
+
+FUNCTION {longest.label.pass}
+{ number.label int.to.str$ 'label :=
+ number.label #1 + 'number.label :=
+ label width$ longest.label.width >
+ { label 'longest.label :=
+ label width$ 'longest.label.width :=
+ }
+ 'skip$
+ if$
+}
+
+EXECUTE {initialize.longest.label}
+
+ITERATE {longest.label.pass}
+
+FUNCTION {begin.bib}
+{ preamble$ empty$
+ 'skip$
+ { preamble$ write$ newline$ }
+ if$
+ "\begin{thebibliography}{" longest.label * "}" * write$ newline$
+ "\expandafter\ifx\csname fonteauteurs\endcsname\relax"
+ write$ newline$
+ "\def\fonteauteurs{" fr.auteurs.style * "}\fi" * write$ newline$
+}
+
+EXECUTE {begin.bib}
+
+EXECUTE {init.state.consts}
+
+ITERATE {call.type$}
+
+FUNCTION {end.bib}
+{ newline$
+ "\end{thebibliography}" write$ newline$
+}
+
+EXECUTE {end.bib}
+
+
+%%
+%% Changelog :
+%% 1.0 -> 1.1 : les mois ne prennent pas de majuscule
+%% 1.1 -> 1.2 : le '.' qui suit la liste des auteurs peut etre
+%% change en autre chose (':' notamment).
+%%
diff --git a/biblio/bibtex/contrib/bib-fr/plainnat-fr.bst b/biblio/bibtex/contrib/bib-fr/plainnat-fr.bst
new file mode 100644
index 0000000000..76e37074af
--- /dev/null
+++ b/biblio/bibtex/contrib/bib-fr/plainnat-fr.bst
@@ -0,0 +1,1503 @@
+%%
+%% Bib. style "plainnat-fr" (version francisee de plainnat.bst)
+%%
+%% NM, 2005/10/16
+%% markey@lsv.ens-cachan.fr
+%%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% Original Copyright (Patrick Daly):
+%%
+%% Copyright 1993-1999 Patrick W Daly
+%% Max-Planck-Institut f\"ur Aeronomie
+%% Max-Planck-Str. 2
+%% D-37191 Katlenburg-Lindau
+%% Germany
+%% E-mail: daly@linmpi.mpg.de
+%%
+%% This program can be redistributed and/or modified under the terms
+%% of the LaTeX Project Public License Distributed from CTAN
+%% archives in directory macros/latex/base/lppl.txt; either
+%% version 1 of the License, or any later version.
+%%
+ % Version and source file information:
+ % \ProvidesFile{natbst.mbs}[1999/05/11 1.6 (PWD)]
+ %
+ % BibTeX `plainnat' family
+ % version 0.99b for BibTeX versions 0.99a or later,
+ % for LaTeX versions 2.09 and 2e.
+ %
+ % For use with the `natbib.sty' package; emulates the corresponding
+ % member of the `plain' family, but with author-year citations.
+ %
+ % With version 6.0 of `natbib.sty', it may also be used for numerical
+ % citations, while retaining the commands \citeauthor, \citefullauthor,
+ % and \citeyear to print the corresponding information.
+ %
+ % For version 7.0 of `natbib.sty', the KEY field replaces missing
+ % authors/editors, and the date is left blank in \bibitem.
+ %
+ % Includes fields ISBN and ISSN.
+ %
+ % Includes field URL for Internet addresses (best used with
+ % with the url.sty package of Donald Arseneau
+ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+
+ENTRY
+ { address
+ author
+ booktitle
+ chapter
+ edition
+ editor
+ howpublished
+ institution
+ isbn
+ issn
+ journal
+ key
+ month
+ note
+ number
+ organization
+ pages
+ publisher
+ school
+ series
+ title
+ type
+ url
+ volume
+ year
+ }
+ {}
+ { label extra.label sort.label short.list }
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%%
+%% C'est ici que je definis les "traductions". Normalement, y a que ca a changer
+%% pour franciser le style...
+%%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+FUNCTION{fr.and}{ %% le "et" entre les deux derniers auteurs
+" et "
+}
+
+FUNCTION{fr.editeur}{ %% ", {\'e}diteur" au singulier, ou " ({\'e}diteur)"...
+", {\'e}diteur"
+}
+
+FUNCTION{fr.editeurs}{ %% ", {\'e}diteurs" au pluriel, ou " ({\'e}diteurs)"...
+", {\'e}diteurs"
+}
+
+FUNCTION{fr.et.al}{ %% " et~al."
+" \emph{et~al.}"
+}
+
+FUNCTION{fr.in}{ %% "Dans "
+"\emph{In} "
+}
+
+FUNCTION{fr.in.spc}{ %% " dans "
+" \emph{in} "
+}
+
+FUNCTION{fr.of}{ %% " de "
+" de "
+}
+
+FUNCTION{fr.number}{ %% "num{\'e}ro "
+"num{\'e}ro "
+}
+
+FUNCTION{fr.number.maj}{ %% "Num{\'e}ro "
+"Num{\'e}ro "
+}
+
+FUNCTION{fr.volume}{ %% "volume"
+"volume"
+}
+
+FUNCTION{fr.volume.maj}{ %% "Volume"
+"Volume"
+}
+
+FUNCTION{fr.edition}{ %% " {\'e}dition"
+" {\'e}dition"
+}
+
+FUNCTION{fr.pages}{ %% "pages"
+"pages"
+}
+
+FUNCTION{fr.page}{ %% "page"
+"page"
+}
+
+FUNCTION{fr.chapter}{ %% "chapitre"
+"chapitre"
+}
+
+FUNCTION{fr.tech.rep}{ %% "Rapport Technique"
+"Rapport technique"
+}
+
+FUNCTION{fr.master}{ %% "M{\'e}moire de D.E.A."
+"M{\'e}moire de D.E.A."
+}
+
+FUNCTION{fr.phd}{ %% "Th{\`e}se de doctorat"
+"Th{\`e}se de doctorat"
+}
+
+FUNCTION{fr.auteurs.style}{
+ %% si on veut des small caps sur le LASTNAME de l'auteur
+ %% Cette fonction est utilisee dans la definition d'une
+ %% fonction LaTeX.
+"\scshape"
+}
+
+FUNCTION{fr.ponctuation.apres.auteurs}{ %% Comme son nom l'indique...
+" : "
+}
+
+FUNCTION{fr.deuxpoints}{ %% Pour eviter l'espace avant les ":".
+"\string:\penalty500\relax "
+}
+
+MACRO {jan} {"janvier"}
+MACRO {feb} {"f\'evrier"}
+MACRO {mar} {"mars"}
+MACRO {apr} {"avril"}
+MACRO {may} {"mai"}
+MACRO {jun} {"juin"}
+MACRO {jul} {"juillet"}
+MACRO {aug} {"ao\^ut"}
+MACRO {sep} {"septembre"}
+MACRO {oct} {"octobre"}
+MACRO {nov} {"novembre"}
+MACRO {dec} {"d\'ecembre"}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%%
+%% La suite, normalement, y a rien a changer...
+%%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+INTEGERS { output.state before.all mid.sentence after.sentence after.block after.authors }
+
+FUNCTION {init.state.consts}
+{ #0 'before.all :=
+ #1 'mid.sentence :=
+ #2 'after.sentence :=
+ #3 'after.block :=
+ #0 'after.authors :=
+}
+
+STRINGS { s t }
+
+FUNCTION{ fr.add.period }{
+after.authors
+ { fr.ponctuation.apres.auteurs empty$
+ { add.period$ }
+ { fr.ponctuation.apres.auteurs * #0 'after.authors := }
+ if$}
+ { add.period$ }
+if$
+}
+
+FUNCTION {output.nonnull}
+{ 's :=
+ output.state mid.sentence =
+ { ", " * write$ }
+ { output.state after.block =
+ { fr.add.period write$
+ newline$
+ "\newblock " write$
+ }
+ { output.state before.all =
+ 'write$
+ { add.period$ " " * write$ }
+ if$
+ }
+ if$
+ mid.sentence 'output.state :=
+ }
+ if$
+ s
+}
+
+FUNCTION {output}
+{ duplicate$ empty$
+ 'pop$
+ 'output.nonnull
+ if$
+}
+
+FUNCTION {output.check}
+{ 't :=
+ duplicate$ empty$
+ { pop$ "empty " t * " in " * cite$ * warning$ }
+ 'output.nonnull
+ if$
+}
+
+FUNCTION {fin.entry}
+{ add.period$
+ write$
+ newline$
+}
+
+FUNCTION {new.block}
+{ output.state before.all =
+ 'skip$
+ { after.block 'output.state := }
+ if$
+}
+
+FUNCTION {new.sentence}
+{ output.state after.block =
+ 'skip$
+ { output.state before.all =
+ 'skip$
+ { after.sentence 'output.state := }
+ if$
+ }
+ if$
+}
+
+FUNCTION {not}
+{ { #0 }
+ { #1 }
+ if$
+}
+
+FUNCTION {and}
+{ 'skip$
+ { pop$ #0 }
+ if$
+}
+
+FUNCTION {or}
+{ { pop$ #1 }
+ 'skip$
+ if$
+}
+
+FUNCTION {new.block.checka}
+{ empty$
+ 'skip$
+ 'new.block
+ if$
+}
+
+FUNCTION {new.block.checkb}
+{ empty$
+ swap$ empty$
+ and
+ 'skip$
+ 'new.block
+ if$
+}
+
+FUNCTION {new.sentence.checka}
+{ empty$
+ 'skip$
+ 'new.sentence
+ if$
+}
+
+FUNCTION {new.sentence.checkb}
+{ empty$
+ swap$ empty$
+ and
+ 'skip$
+ 'new.sentence
+ if$
+}
+
+FUNCTION {field.or.null}
+{ duplicate$ empty$
+ { pop$ "" }
+ 'skip$
+ if$
+}
+
+FUNCTION {emphasize}
+{ duplicate$ empty$
+ { pop$ "" }
+ { "{\em " swap$ * "}" * }
+ if$
+}
+
+INTEGERS { nameptr namesleft numnames }
+
+FUNCTION {format.names}
+{ 's :=
+ #1 'nameptr :=
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ { s nameptr "{ff~}{vv~}\bgroup\fonteauteurs\bgroup {ll}\egroup\egroup{{}}{, jj}" format.name$ 't :=
+ nameptr #1 >
+ { namesleft #1 >
+ { ", " * t * }
+ { %numnames #2 >
+ % { "," * }
+ % 'skip$
+ %if$
+ t "\bgroup\fonteauteurs\bgroup others\egroup\egroup{}" =
+ { fr.et.al * }
+ { fr.and * t * }
+ if$
+ }
+ if$
+ }
+ 't
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+}
+
+FUNCTION {format.key}
+{ empty$
+ { key field.or.null }
+ { "" }
+ if$
+}
+
+FUNCTION {format.authors}
+{ author empty$
+ { "" }
+ { author format.names #1 'after.authors := }
+ if$
+}
+
+FUNCTION {format.editors}
+{ editor empty$
+ { "" }
+ { editor format.names
+ editor num.names$ #1 >
+ { fr.editeurs * }
+ { fr.editeur * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.isbn}
+{ isbn empty$
+ { "" }
+ { new.block "ISBN " isbn * }
+ if$
+}
+
+FUNCTION {format.issn}
+{ issn empty$
+ { "" }
+ { new.block "ISSN " issn * }
+ if$
+}
+
+FUNCTION {format.url}
+{ url empty$
+ { "" }
+ { new.block "URL \url{" url * "}" * }
+ if$
+}
+
+FUNCTION {format.title}
+{ title empty$
+ { "" }
+ { title "t" change.case$ }
+ if$
+}
+
+FUNCTION {format.full.names}
+{%
+ % Ici, on laisse les noms en minuscules, on ne les mets pas en small caps.
+ %
+ 's :=
+ #1 'nameptr :=
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ { s nameptr
+ "{vv~}{ll}" format.name$ 't :=
+ nameptr #1 >
+ {
+ namesleft #1 >
+ { ", " * t * }
+ {
+ numnames #2 >
+ { "," * }
+ 'skip$
+ if$
+ t "\bgroup\fonteauteurs\bgroup others\egroup\egroup{}" =
+ { fr.et.al * }
+ { fr.and * t * }
+ if$
+ }
+ if$
+ }
+ 't
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+}
+
+FUNCTION {author.editor.full}
+{ author empty$
+ { editor empty$
+ { "" }
+ { editor format.full.names }
+ if$
+ }
+ { author format.full.names }
+ if$
+}
+
+FUNCTION {author.full}
+{ author empty$
+ { "" }
+ { author format.full.names }
+ if$
+}
+
+FUNCTION {editor.full}
+{ editor empty$
+ { "" }
+ { editor format.full.names }
+ if$
+}
+
+FUNCTION {make.full.names}
+{ type$ "book" =
+ type$ "inbook" =
+ or
+ 'author.editor.full
+ { type$ "proceedings" =
+ 'editor.full
+ 'author.full
+ if$
+ }
+ if$
+}
+
+FUNCTION {output.bibitem}
+{ newline$
+ "\bibitem[" write$
+ label write$
+ ")" make.full.names duplicate$ short.list =
+ { pop$ }
+ { * }
+ if$
+ "]{" * write$
+ cite$ write$
+ "}" write$
+ newline$
+ ""
+ before.all 'output.state :=
+}
+
+FUNCTION {n.dashify}
+{ 't :=
+ ""
+ { t empty$ not }
+ { t #1 #1 substring$ "-" =
+ { t #1 #2 substring$ "--" = not
+ { "--" *
+ t #2 global.max$ substring$ 't :=
+ }
+ { { t #1 #1 substring$ "-" = }
+ { "-" *
+ t #2 global.max$ substring$ 't :=
+ }
+ while$
+ }
+ if$
+ }
+ { t #1 #1 substring$ *
+ t #2 global.max$ substring$ 't :=
+ }
+ if$
+ }
+ while$
+}
+
+FUNCTION {format.date}
+{ year duplicate$ empty$
+ { "empty year in " cite$ * warning$
+ pop$ "" }
+ 'skip$
+ if$
+ month empty$
+ 'skip$
+ { month
+ " " * swap$ *
+ }
+ if$
+ extra.label *
+}
+
+FUNCTION {format.btitle}
+{ title emphasize
+}
+
+FUNCTION {tie.or.space.connect}
+{ duplicate$ text.length$ #3 <
+ { "~" }
+ { " " }
+ if$
+ swap$ * *
+}
+
+FUNCTION {either.or.check}
+{ empty$
+ 'pop$
+ { "can't use both " swap$ * " fields in " * cite$ * warning$ }
+ if$
+}
+
+FUNCTION {format.bvolume}
+{ volume empty$
+ { "" }
+ { fr.volume volume tie.or.space.connect
+ series empty$
+ 'skip$
+ { fr.of * series emphasize * }
+ if$
+ "volume and number" number either.or.check
+ }
+ if$
+}
+
+FUNCTION {format.number.series}
+{ volume empty$
+ { number empty$
+ { series field.or.null }
+ { output.state mid.sentence =
+ { fr.number }
+ { fr.number.maj }
+ if$
+ number tie.or.space.connect
+ series empty$
+ { "there's a number but no series in " cite$ * warning$ }
+ { fr.in.spc * series * }
+ if$
+ }
+ if$
+ }
+ { "" }
+ if$
+}
+
+FUNCTION {format.edition}
+{ edition empty$
+ { "" }
+ { output.state mid.sentence =
+ { edition "l" change.case$ fr.edition * }
+ { edition "t" change.case$ fr.edition * }
+ if$
+ }
+ if$
+}
+
+INTEGERS { multiresult }
+
+FUNCTION {multi.page.check}
+{ 't :=
+ #0 'multiresult :=
+ { multiresult not
+ t empty$ not
+ and
+ }
+ { t #1 #1 substring$
+ duplicate$ "-" =
+ swap$ duplicate$ "," =
+ swap$ "+" =
+ or or
+ { #1 'multiresult := }
+ { t #2 global.max$ substring$ 't := }
+ if$
+ }
+ while$
+ multiresult
+}
+
+FUNCTION {format.pages}
+{ pages empty$
+ { "" }
+ { pages multi.page.check
+ { fr.pages pages n.dashify tie.or.space.connect }
+ { fr.page pages tie.or.space.connect }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.vol.num.pages}
+{ volume field.or.null
+ number empty$
+ 'skip$
+ { "\penalty0 (" number * ")" * *
+ volume empty$
+ { "there's a number but no volume in " cite$ * warning$ }
+ 'skip$
+ if$
+ }
+ if$
+ pages empty$
+ 'skip$
+ { duplicate$ empty$
+ { pop$ format.pages }
+ { fr.deuxpoints * pages n.dashify * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.chapter.pages}
+{ chapter empty$
+ 'format.pages
+ { type empty$
+ { fr.chapter }
+ { type "l" change.case$ }
+ if$
+ chapter tie.or.space.connect
+ pages empty$
+ 'skip$
+ { ", " * format.pages * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.in.ed.booktitle}
+{ booktitle empty$
+ { "" }
+ { editor empty$
+ { fr.in booktitle emphasize * }
+ { fr.in format.editors #1 'after.authors := fr.add.period " " * * booktitle emphasize * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {empty.misc.check}
+{ author empty$ title empty$ howpublished empty$
+ month empty$ year empty$ note empty$
+ and and and and and
+ key empty$ not and
+ { "all relevant fields are empty in " cite$ * warning$ }
+ 'skip$
+ if$
+}
+
+FUNCTION {format.thesis.type}
+{ type empty$
+ 'skip$
+ { pop$
+ type "t" change.case$
+ }
+ if$
+}
+
+FUNCTION {format.tr.number}
+{ type empty$
+ { fr.tech.rep }
+ 'type
+ if$
+ number empty$
+ { "t" change.case$ }
+ { number tie.or.space.connect }
+ if$
+}
+
+FUNCTION {format.article.crossref}
+{ key empty$
+ { journal empty$
+ { "need key or journal for " cite$ * " to crossref " * crossref *
+ warning$
+ ""
+ }
+ { fr.in "{\em " * journal * "\/}" * }
+ if$
+ }
+ { fr.in key * }
+ if$
+ " \citep{" * crossref * "}" *
+}
+
+FUNCTION {format.book.crossref}
+{ volume empty$
+ { "empty volume in " cite$ * "'s crossref of " * crossref * warning$
+ fr.in
+ }
+ { fr.volume.maj volume tie.or.space.connect
+ fr.of *
+ }
+ if$
+ editor empty$
+ editor field.or.null author field.or.null =
+ or
+ { key empty$
+ { series empty$
+ { "need editor, key, or series for " cite$ * " to crossref " *
+ crossref * warning$
+ "" *
+ }
+ { "{\em " * series * "\/}" * }
+ if$
+ }
+ { key * }
+ if$
+ }
+ 'skip$
+ if$
+ ", \citet{" * crossref * "}" *
+}
+
+FUNCTION {format.incoll.inproc.crossref}
+{ editor empty$
+ editor field.or.null author field.or.null =
+ or
+ { key empty$
+ { booktitle empty$
+ { "need editor, key, or booktitle for " cite$ * " to crossref " *
+ crossref * warning$
+ ""
+ }
+ { fr.in "{\em " * booktitle * "\/}" * }
+ if$
+ }
+ { fr.in key * }
+ if$
+ }
+ { fr.in }
+ if$
+ " \citet{" * crossref * "}" *
+}
+
+FUNCTION {article}
+{ output.bibitem
+ format.authors "author" output.check
+ author format.key output
+ new.block
+ format.title "title" output.check
+ new.block
+ crossref missing$
+ { journal emphasize "journal" output.check
+ format.vol.num.pages output
+ format.date "year" output.check
+ }
+ { format.article.crossref output.nonnull
+ format.pages output
+ }
+ if$
+ format.issn output
+ format.url output
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {book}
+{ output.bibitem
+ author empty$
+ { format.editors "author and editor" output.check
+ editor format.key output
+ }
+ { format.authors output.nonnull
+ crossref missing$
+ { "author and editor" editor either.or.check }
+ 'skip$
+ if$
+ }
+ if$
+ new.block
+ format.btitle "title" output.check
+ crossref missing$
+ { format.bvolume output
+ new.block
+ format.number.series output
+ new.sentence
+ publisher "publisher" output.check
+ address output
+ }
+ { new.block
+ format.book.crossref output.nonnull
+ }
+ if$
+ format.edition output
+ format.date "year" output.check
+ format.isbn output
+ format.url output
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {booklet}
+{ output.bibitem
+ format.authors output
+ author format.key output
+ new.block
+ format.title "title" output.check
+ howpublished address new.block.checkb
+ howpublished output
+ address output
+ format.date output
+ format.isbn output
+ format.url output
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {inbook}
+{ output.bibitem
+ author empty$
+ { format.editors "author and editor" output.check
+ editor format.key output
+ }
+ { format.authors output.nonnull
+ crossref missing$
+ { "author and editor" editor either.or.check }
+ 'skip$
+ if$
+ }
+ if$
+ new.block
+ format.btitle "title" output.check
+ crossref missing$
+ { format.bvolume output
+ format.chapter.pages "chapter and pages" output.check
+ new.block
+ format.number.series output
+ new.sentence
+ publisher "publisher" output.check
+ address output
+ }
+ { format.chapter.pages "chapter and pages" output.check
+ new.block
+ format.book.crossref output.nonnull
+ }
+ if$
+ format.edition output
+ format.date "year" output.check
+ format.isbn output
+ format.url output
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {incollection}
+{ output.bibitem
+ format.authors "author" output.check
+ author format.key output
+ new.block
+ format.title "title" output.check
+ new.block
+ crossref missing$
+ { format.in.ed.booktitle "booktitle" output.check
+ format.bvolume output
+ format.number.series output
+ format.chapter.pages output
+ new.sentence
+ publisher "publisher" output.check
+ address output
+ format.edition output
+ format.date "year" output.check
+ }
+ { format.incoll.inproc.crossref output.nonnull
+ format.chapter.pages output
+ }
+ if$
+ format.isbn output
+ format.url output
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {inproceedings}
+{ output.bibitem
+ format.authors "author" output.check
+ author format.key output
+ new.block
+ format.title "title" output.check
+ new.block
+ crossref missing$
+ { format.in.ed.booktitle "booktitle" output.check
+ format.bvolume output
+ format.number.series output
+ format.pages output
+ address empty$
+ { organization publisher new.sentence.checkb
+ organization output
+ publisher output
+ format.date "year" output.check
+ }
+ { address output.nonnull
+ format.date "year" output.check
+ new.sentence
+ organization output
+ publisher output
+ }
+ if$
+ }
+ { format.incoll.inproc.crossref output.nonnull
+ format.pages output
+ }
+ if$
+ format.isbn output
+ format.url output
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {conference} { inproceedings }
+
+FUNCTION {manual}
+{ output.bibitem
+ format.authors output
+ author format.key output
+ new.block
+ format.btitle "title" output.check
+ organization address new.block.checkb
+ organization output
+ address output
+ format.edition output
+ format.date output
+ format.url output
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {mastersthesis}
+{ output.bibitem
+ format.authors "author" output.check
+ author format.key output
+ new.block
+ format.title "title" output.check
+ new.block
+ fr.master format.thesis.type output.nonnull
+ school "school" output.check
+ address output
+ format.date "year" output.check
+ format.url output
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {misc}
+{ output.bibitem
+ format.authors output
+ author format.key output
+ title howpublished new.block.checkb
+ format.title output
+ howpublished new.block.checka
+ howpublished output
+ format.date output
+ format.issn output
+ format.url output
+ new.block
+ note output
+ fin.entry
+ empty.misc.check
+}
+
+FUNCTION {phdthesis}
+{ output.bibitem
+ format.authors "author" output.check
+ author format.key output
+ new.block
+ format.btitle "title" output.check
+ new.block
+ fr.phd format.thesis.type output.nonnull
+ school "school" output.check
+ address output
+ format.date "year" output.check
+ format.url output
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {proceedings}
+{ output.bibitem
+ format.editors output
+ editor format.key output
+ new.block
+ format.btitle "title" output.check
+ format.bvolume output
+ format.number.series output
+ address output
+ format.date "year" output.check
+ new.sentence
+ organization output
+ publisher output
+ format.isbn output
+ format.url output
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {techreport}
+{ output.bibitem
+ format.authors "author" output.check
+ author format.key output
+ new.block
+ format.title "title" output.check
+ new.block
+ format.tr.number output.nonnull
+ institution "institution" output.check
+ address output
+ format.date "year" output.check
+ format.url output
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {unpublished}
+{ output.bibitem
+ format.authors "author" output.check
+ author format.key output
+ new.block
+ format.title "title" output.check
+ format.url output
+ new.block
+ note "note" output.check
+ format.date output
+ fin.entry
+}
+
+FUNCTION {default.type} { misc }
+
+MACRO {acmcs} {"ACM Computing Surveys"}
+MACRO {acta} {"Acta Informatica"}
+MACRO {cacm} {"Communications of the ACM"}
+MACRO {ibmjrd} {"IBM Journal of Research and Development"}
+MACRO {ibmsj} {"IBM Systems Journal"}
+MACRO {ieeese} {"IEEE Transactions on Software Engineering"}
+MACRO {ieeetc} {"IEEE Transactions on Computers"}
+MACRO {ieeetcad} {"IEEE Transactions on Computer-Aided Design of Integrated Circuits"}
+MACRO {ipl} {"Information Processing Letters"}
+MACRO {jacm} {"Journal of the ACM"}
+MACRO {jcss} {"Journal of Computer and System Sciences"}
+MACRO {scp} {"Science of Computer Programming"}
+MACRO {sicomp} {"SIAM Journal on Computing"}
+MACRO {tocs} {"ACM Transactions on Computer Systems"}
+MACRO {tods} {"ACM Transactions on Database Systems"}
+MACRO {tog} {"ACM Transactions on Graphics"}
+MACRO {toms} {"ACM Transactions on Mathematical Software"}
+MACRO {toois} {"ACM Transactions on Office Information Systems"}
+MACRO {toplas} {"ACM Transactions on Programming Languages and Systems"}
+MACRO {tcs} {"Theoretical Computer Science"}
+
+
+READ
+
+FUNCTION {sortify}
+{ purify$
+ "l" change.case$
+}
+
+INTEGERS { len }
+
+FUNCTION {chop.word}
+{ 's :=
+ 'len :=
+ s #1 len substring$ =
+ { s len #1 + global.max$ substring$ }
+ 's
+ if$
+}
+
+FUNCTION {format.lab.names}
+%
+% Ici, on laisse les noms en minuscules, on ne les mets pas
+% en small caps.
+%
+{ 's :=
+ s #1 "{vv~}{ll}" format.name$
+ s num.names$ duplicate$
+ #2 >
+ { pop$ fr.et.al * }
+ { #2 <
+ 'skip$
+ { s #2 "{ff }{vv }{ll}{ jj}" format.name$ "others" =
+ { fr.et.al * }
+ { fr.and * s #2 "{vv~}{ll}" format.name$ * }
+ if$
+ }
+ if$
+ }
+ if$
+}
+
+FUNCTION {author.key.label}
+{ author empty$
+ { key empty$
+ { cite$ #1 #3 substring$ }
+ 'key
+ if$
+ }
+ { author format.lab.names }
+ if$
+}
+
+FUNCTION {author.editor.key.label}
+{ author empty$
+ { editor empty$
+ { key empty$
+ { cite$ #1 #3 substring$ }
+ 'key
+ if$
+ }
+ { editor format.lab.names }
+ if$
+ }
+ { author format.lab.names }
+ if$
+}
+
+FUNCTION {author.key.organization.label}
+{ author empty$
+ { key empty$
+ { organization empty$
+ { cite$ #1 #3 substring$ }
+ { "Le " #3
+ "La " #3
+ "Les " #4
+ "The " #4 organization chop.word
+ chop.word
+ chop.word
+ chop.word
+ #3 text.prefix$ }
+ if$
+ }
+ 'key
+ if$
+ }
+ { author format.lab.names }
+ if$
+}
+
+FUNCTION {editor.key.organization.label}
+{ editor empty$
+ { key empty$
+ { organization empty$
+ { cite$ #1 #3 substring$ }
+ { "Le " #3
+ "La " #3
+ "Les " #4
+ "The " #4 organization chop.word
+ chop.word
+ chop.word
+ chop.word
+ #3 text.prefix$ }
+ if$
+ }
+ 'key
+ if$
+ }
+ { editor format.lab.names }
+ if$
+}
+
+FUNCTION {calc.short.authors}
+{ type$ "book" =
+ type$ "inbook" =
+ or
+ 'author.editor.key.label
+ { type$ "proceedings" =
+ 'editor.key.organization.label
+ { type$ "manual" =
+ 'author.key.organization.label
+ 'author.key.label
+ if$
+ }
+ if$
+ }
+ if$
+ 'short.list :=
+}
+
+FUNCTION {calc.label}
+{ calc.short.authors
+ short.list
+ "("
+ *
+ year duplicate$ empty$
+ short.list key field.or.null = or
+ { pop$ "" }
+ 'skip$
+ if$
+ *
+ 'label :=
+}
+
+FUNCTION {sort.format.names}
+{ 's :=
+ #1 'nameptr :=
+ ""
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ { nameptr #1 >
+ { " " * }
+ 'skip$
+ if$
+ s nameptr "{vv{ } }{ll{ }}{ ff{ }}{ jj{ }}" format.name$ 't :=
+ nameptr numnames = t "others" = and
+ { fr.et.al * } %% sera "purify"e ensuite...
+ { t sortify * }
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+}
+
+FUNCTION {sort.format.title}
+{ 't :=
+ "Un " #3
+ "Une " #4
+ "Des " #4
+ "Le " #3
+ "La " #3
+ "Les " #4
+ "A " #2
+ "An " #3
+ "The " #4 t chop.word
+ chop.word
+ chop.word
+ chop.word
+ chop.word
+ chop.word
+ chop.word
+ chop.word
+ chop.word
+ sortify
+ #1 global.max$ substring$
+}
+
+FUNCTION {author.sort}
+{ author empty$
+ { key empty$
+ { "to sort, need author or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { author sort.format.names }
+ if$
+}
+
+FUNCTION {author.editor.sort}
+{ author empty$
+ { editor empty$
+ { key empty$
+ { "to sort, need author, editor, or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { editor sort.format.names }
+ if$
+ }
+ { author sort.format.names }
+ if$
+}
+
+FUNCTION {author.organization.sort}
+{ author empty$
+ { organization empty$
+ { key empty$
+ { "to sort, need author, organization, or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { "Le " #3
+ "La " #3
+ "Les " #4
+ "The " #4 organization chop.word
+ chop.word
+ chop.word
+ chop.word
+ sortify }
+ if$
+ }
+ { author sort.format.names }
+ if$
+}
+
+FUNCTION {editor.organization.sort}
+{ editor empty$
+ { organization empty$
+ { key empty$
+ { "to sort, need editor, organization, or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { "Le " #3
+ "La " #3
+ "Les " #4
+ "The " #4 organization chop.word
+ chop.word
+ chop.word
+ chop.word
+ sortify }
+ if$
+ }
+ { editor sort.format.names }
+ if$
+}
+
+FUNCTION {presort}
+{ calc.label
+ label sortify
+ " "
+ *
+ type$ "book" =
+ type$ "inbook" =
+ or
+ 'author.editor.sort
+ { type$ "proceedings" =
+ 'editor.organization.sort
+ { type$ "manual" =
+ 'author.organization.sort
+ 'author.sort
+ if$
+ }
+ if$
+ }
+ if$
+ " "
+ *
+ year field.or.null sortify
+ *
+ " "
+ *
+ title field.or.null
+ sort.format.title
+ *
+ #1 entry.max$ substring$
+ 'sort.label :=
+ sort.label *
+ #1 entry.max$ substring$
+ 'sort.key$ :=
+}
+
+ITERATE {presort}
+
+SORT
+
+STRINGS { longest.label last.label next.extra }
+
+INTEGERS { longest.label.width last.extra.num number.label }
+
+FUNCTION {initialize.longest.label}
+{ "" 'longest.label :=
+ #0 int.to.chr$ 'last.label :=
+ "" 'next.extra :=
+ #0 'longest.label.width :=
+ #0 'last.extra.num :=
+ #0 'number.label :=
+}
+
+FUNCTION {forward.pass}
+{ last.label label =
+ { last.extra.num #1 + 'last.extra.num :=
+ last.extra.num int.to.chr$ 'extra.label :=
+ }
+ { "a" chr.to.int$ 'last.extra.num :=
+ "" 'extra.label :=
+ label 'last.label :=
+ }
+ if$
+ number.label #1 + 'number.label :=
+}
+
+FUNCTION {reverse.pass}
+{ next.extra "b" =
+ { "a" 'extra.label := }
+ 'skip$
+ if$
+ extra.label 'next.extra :=
+ extra.label
+ duplicate$ empty$
+ 'skip$
+ { "{\natexlab{" swap$ * "}}" * }
+ if$
+ 'extra.label :=
+ label extra.label * 'label :=
+}
+
+EXECUTE {initialize.longest.label}
+
+ITERATE {forward.pass}
+
+REVERSE {reverse.pass}
+
+FUNCTION {bib.sort.order}
+{ sort.label 'sort.key$ :=
+}
+
+ITERATE {bib.sort.order}
+
+SORT
+
+FUNCTION {begin.bib}
+{ preamble$ empty$
+ 'skip$
+ { preamble$ write$ newline$ }
+ if$
+ "\begin{thebibliography}{" number.label int.to.str$ * "}" *
+ write$ newline$
+ "\expandafter\ifx\csname natexlab\endcsname\relax\def\natexlab#1{#1}\fi"
+ write$ newline$
+ "\expandafter\ifx\csname fonteauteurs\endcsname\relax"
+ write$ newline$
+ "\def\fonteauteurs{" fr.auteurs.style * "}\fi" * write$ newline$
+ "\expandafter\ifx\csname url\endcsname\relax" write$ newline$
+ " \def\url#1{{\tt #1}}% " write$ newline$
+ " \message{You should include the url package}\fi" write$ newline$
+}
+
+EXECUTE {begin.bib}
+
+EXECUTE {init.state.consts}
+
+ITERATE {call.type$}
+
+FUNCTION {end.bib}
+{ newline$
+ "\end{thebibliography}" write$ newline$
+}
+
+EXECUTE {end.bib}
diff --git a/biblio/bibtex/contrib/bib-fr/siam-fr.bst b/biblio/bibtex/contrib/bib-fr/siam-fr.bst
new file mode 100644
index 0000000000..d972db1b3a
--- /dev/null
+++ b/biblio/bibtex/contrib/bib-fr/siam-fr.bst
@@ -0,0 +1,1154 @@
+%%
+%% Bib. style "siam-fr" (version francisee de siam.bst)
+%%
+%% NM, 2004/03/05
+%% markey@lsv.ens-cachan.fr
+%%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% Original Copyright (Oren Patashnik & Howard Trickey):
+%%
+ % SIAM bibliography style (29-Jan-88 version)
+ % numeric labels, alphabetic order, Mathematical Reviews abbreviations,
+ % names in \sc, titles in italics, book titles mixed upper-lower and article
+ % titles lowercase, commas separate all fields except before "notes".
+ %
+ % History
+ % 1/30/86 (HWT) Original version, by Howard Trickey.
+ % 6/15/87 (HWT) Fix format.editors---Martin Costabel.
+ % 1/29/88 (OP&HWT) Updated for BibTeX version 0.99a, Oren Patashnik;
+ % THIS `siam' VERSION DOES NOT WORK WITH BIBTEX 0.98i.
+ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+ENTRY
+ { address
+ author
+ booktitle
+ chapter
+ edition
+ editor
+ howpublished
+ institution
+ journal
+ key
+ month
+ note
+ number
+ organization
+ pages
+ publisher
+ school
+ series
+ title
+ type
+ volume
+ year
+ }
+ {}
+ { label }
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%%
+%% C'est ici que je definis les "traductions". Normalement, y a
+%% que ca a changer pour franciser le style...
+%%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+
+FUNCTION{fr.and}{ %% le "et" entre les deux derniers auteurs
+" et "
+}
+
+FUNCTION{fr.editeur}{ %% ", \'editeur" au singulier, ou " (\'editeur)"...
+", \'ed."
+}
+
+FUNCTION{fr.editeurs}{ %% ", \'editeurs" au pluriel, ou " (\'editeurs)"...
+", \'eds."
+}
+
+FUNCTION{fr.et.al}{ %% " et~al."
+" \emph{et~al.}"
+}
+
+FUNCTION{fr.in}{ %% "Dans "
+"\emph{In} "
+}
+
+FUNCTION{fr.in.min}{ %% "Dans "
+"\emph{in} "
+}
+
+FUNCTION{fr.in.spc}{ %% " de " (ou " de la s\'erie ")
+" de "
+}
+
+FUNCTION{fr.of}{ %% " de "
+" de "
+}
+
+FUNCTION{fr.number}{ %% "num{\'e}ro "
+"no~"
+}
+
+FUNCTION{fr.number.maj}{ %% "Num\'ero "
+"No~"
+}
+
+FUNCTION{fr.volume}{ %% "volume"
+"vol.~"
+}
+
+FUNCTION{fr.volume.maj}{ %% "Volume"
+"Vol.~"
+}
+
+FUNCTION{fr.edition}{ %% " \'edition"
+"~\'ed."
+}
+
+FUNCTION{fr.pages}{ %% "pages"
+"p.~"
+}
+
+FUNCTION{fr.page}{ %% "page"
+"p~"
+}
+
+FUNCTION{fr.chapter}{ %% "chapitre"
+"chap.~"
+}
+
+FUNCTION{fr.tech.rep}{ %% "Rapport Technique"
+"Rap. tech."
+}
+
+FUNCTION{fr.master}{ %% "M\'emoire de D.E.A."
+"M\'em. D.E.A."
+}
+
+FUNCTION{fr.phd}{ %% "Th\`ese de doctorat"
+"Th\`ese doctorat"
+}
+
+FUNCTION{fr.auteurs.style}{
+ %% si on veut des small caps sur le LASTNAME de l'auteur
+ %% Cette fonction est utilisee dans la definition d'une
+ %% fonction LaTeX.
+"\scshape"
+}
+
+FUNCTION{fr.ponctuation.apres.auteurs}{ %% Comme son nom l'indique...
+ %% Laisser vide pour un "."
+" : "
+}
+
+MACRO {jan} {"jan."}
+MACRO {feb} {"f\'ev."}
+MACRO {mar} {"mars"}
+MACRO {apr} {"avril"}
+MACRO {may} {"mai"}
+MACRO {jun} {"juin"}
+MACRO {jul} {"juil."}
+MACRO {aug} {"ao\^ut"}
+MACRO {sep} {"sept."}
+MACRO {oct} {"oct."}
+MACRO {nov} {"nov."}
+MACRO {dec} {"d\'ec."}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%%
+%% La suite, normalement, y a rien a changer...
+%%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+
+INTEGERS { output.state before.all mid.sentence after.block after.authors }
+
+FUNCTION {init.state.consts}
+{ #0 'before.all :=
+ #1 'mid.sentence :=
+ #2 'after.block :=
+ #0 'after.authors :=
+}
+
+STRINGS { s t }
+
+FUNCTION{ fr.add.period }{
+after.authors
+ { fr.ponctuation.apres.auteurs empty$
+ { add.period$ }
+ { fr.ponctuation.apres.auteurs * #0 'after.authors := }
+ if$}
+ { add.period$ }
+if$
+}
+
+FUNCTION {output.nonnull}
+{ 's :=
+ output.state mid.sentence =
+ { ", " * write$ }
+ { output.state after.block =
+ { fr.add.period write$
+ newline$
+ "\newblock " write$
+ }
+ 'write$
+ if$
+ mid.sentence 'output.state :=
+ }
+ if$
+ s
+}
+
+FUNCTION {output}
+{ duplicate$ empty$
+ 'pop$
+ 'output.nonnull
+ if$
+}
+
+FUNCTION {output.check}
+{ 't :=
+ duplicate$ empty$
+ { pop$ "empty " t * " in " * cite$ * warning$ }
+ 'output.nonnull
+ if$
+}
+
+FUNCTION {output.bibitem}
+{ newline$
+ "\bibitem{" write$
+ cite$ write$
+ "}" write$
+ newline$
+ ""
+ before.all 'output.state :=
+}
+
+FUNCTION {fin.entry}
+{ add.period$
+ write$
+ newline$
+}
+
+FUNCTION {new.block}
+{ output.state before.all =
+ 'skip$
+ { after.block 'output.state := }
+ if$
+}
+
+FUNCTION {not}
+{ { #0 }
+ { #1 }
+ if$
+}
+
+FUNCTION {and}
+{ 'skip$
+ { pop$ #0 }
+ if$
+}
+
+FUNCTION {or}
+{ { pop$ #1 }
+ 'skip$
+ if$
+}
+
+FUNCTION {new.block.checka}
+{ empty$
+ 'skip$
+ 'new.block
+ if$
+}
+
+FUNCTION {field.or.null}
+{ duplicate$ empty$
+ { pop$ "" }
+ 'skip$
+ if$
+}
+
+FUNCTION {emphasize}
+{ duplicate$ empty$
+ { pop$ "" }
+ { "{\em " swap$ * "}" * }
+ if$
+}
+
+FUNCTION {scapify}
+{ duplicate$ empty$
+ { pop$ "" }
+ { "{\fonteauteurs{" swap$ * "}}" * }
+ if$
+}
+
+INTEGERS { nameptr namesleft numnames }
+
+FUNCTION {format.names}
+{ 's :=
+ #1 'nameptr :=
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ { s nameptr "{f.~}{vv~}{ll}{, jj}" format.name$ 't :=
+ %% Le passage en small-caps est fait plus loin, sur tout le nom.
+ %% (c'est le comportement du siam.bst original)
+ nameptr #1 >
+ { namesleft #1 >
+ { ", " * t * }
+ { %numnames #2 >
+ %{ "," * }
+ %'skip$
+ %if$
+ t "others" =
+ { fr.et.al * }
+ { fr.and * t * }
+ if$
+ }
+ if$
+ }
+ 't
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+}
+
+STRINGS { last.authors }
+
+FUNCTION {init.last.authors}
+{ "" 'last.authors :=
+}
+
+FUNCTION {format.authors}
+{ author empty$
+ { "" 'last.authors :=
+ ""
+ }
+ { author last.authors =
+ { "\leavevmode\vrule height 2pt depth -1.6pt width 23pt" }
+ { author format.names scapify }
+ if$
+ author 'last.authors :=
+ }
+ if$
+}
+
+FUNCTION {format.organization}
+{ organization empty$
+ { "" 'last.authors :=
+ ""
+ }
+ { organization last.authors =
+ { "\leavevmode\vrule height 2pt depth -1.6pt width 23pt" }
+ { organization scapify }
+ if$
+ organization 'last.authors :=
+ }
+ if$
+}
+
+FUNCTION {format.editors}
+{ editor empty$
+ { "" 'last.authors :=
+ ""
+ }
+ { editor last.authors =
+ { "\leavevmode\vrule height 2pt depth -1.6pt width 23pt" }
+ { editor format.names scapify }
+ if$
+ editor num.names$ #1 >
+ { fr.editeurs * }
+ { fr.editeur * }
+ if$
+ editor 'last.authors :=
+ }
+ if$
+}
+
+FUNCTION {format.ineditors}
+{ editor empty$
+ { "" }
+ { editor format.names
+ editor num.names$ #1 >
+ { fr.editeurs * }
+ { fr.editeur * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.title}
+{ title empty$
+ { "" }
+ { title "t" change.case$ emphasize }
+ if$
+}
+
+FUNCTION {n.dashify}
+{ 't :=
+ ""
+ { t empty$ not }
+ { t #1 #1 substring$ "-" =
+ { t #1 #2 substring$ "--" = not
+ { "--" *
+ t #2 global.max$ substring$ 't :=
+ }
+ { { t #1 #1 substring$ "-" = }
+ { "-" *
+ t #2 global.max$ substring$ 't :=
+ }
+ while$
+ }
+ if$
+ }
+ { t #1 #1 substring$ *
+ t #2 global.max$ substring$ 't :=
+ }
+ if$
+ }
+ while$
+}
+
+FUNCTION {format.date}
+{ year empty$
+ { month empty$
+ { "" }
+ { "there's a month but no year in " cite$ * warning$
+ month
+ }
+ if$
+ }
+ { month empty$
+ 'year
+ { month " " * year * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.btitle}
+{ title emphasize
+}
+
+FUNCTION {tie.or.space.connect}
+{ duplicate$ text.length$ #3 <
+ { "~" }
+ { " " }
+ if$
+ swap$ * *
+}
+
+FUNCTION {either.or.check}
+{ empty$
+ 'pop$
+ { "can't use both " swap$ * " fields in " * cite$ * warning$ }
+ if$
+}
+
+FUNCTION {format.bvolume}
+{ volume empty$
+ { "" }
+ { fr.volume volume *
+ series empty$
+ 'skip$
+ { fr.of * series * }
+ if$
+ "volume and number" number either.or.check
+ }
+ if$
+}
+
+FUNCTION {format.number.series}
+{ volume empty$
+ { number empty$
+ { series field.or.null }
+ { fr.number number *
+ series empty$
+ { "there's a number but no series in " cite$ * warning$ }
+ { fr.in.min * series * }
+ if$
+ }
+ if$
+ }
+ { "" }
+ if$
+}
+
+FUNCTION {format.edition}
+{ edition empty$
+ { "" }
+ { edition "l" change.case$ fr.edition * }
+ if$
+}
+
+INTEGERS { multiresult }
+
+FUNCTION {multi.page.check}
+{ 't :=
+ #0 'multiresult :=
+ { multiresult not
+ t empty$ not
+ and
+ }
+ { t #1 #1 substring$
+ duplicate$ "-" =
+ swap$ duplicate$ "," =
+ swap$ "+" =
+ or or
+ { #1 'multiresult := }
+ { t #2 global.max$ substring$ 't := }
+ if$
+ }
+ while$
+ multiresult
+}
+
+FUNCTION {format.pages}
+{ pages empty$
+ { "" }
+ { pages multi.page.check
+ { fr.pages pages n.dashify * }
+ { fr.page pages * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.vol.year}
+{ volume field.or.null
+ year empty$
+ { "empty year in " cite$ * warning$ }
+ { " (" year * ")" * * }
+ if$
+}
+
+FUNCTION {format.chapter.pages}
+{ chapter empty$
+ 'format.pages
+ { type empty$
+ { fr.chapter chapter * }
+ { type "l" change.case$ chapter tie.or.space.connect }
+ if$
+ pages empty$
+ 'skip$
+ { ", " * format.pages * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.in.ed.booktitle}
+{ booktitle empty$
+ { "" }
+ { editor empty$
+ { fr.in.min booktitle * }
+ { fr.in.min booktitle * ", " * format.ineditors * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {empty.misc.check}
+{ author empty$ title empty$ howpublished empty$
+ month empty$ year empty$ note empty$
+ and and and and and
+ key empty$ not and
+ { "all relevant fields are empty in " cite$ * warning$ }
+ 'skip$
+ if$
+}
+
+FUNCTION {format.thesis.type}
+{ type empty$
+ 'skip$
+ { pop$
+ type "l" change.case$
+ }
+ if$
+}
+
+FUNCTION {format.tr.number}
+{ type empty$
+ { fr.tech.rep }
+ 'type
+ if$
+ number empty$
+ { "l" change.case$ }
+ { number tie.or.space.connect }
+ if$
+}
+
+FUNCTION {format.article.crossref}
+{ key empty$
+ { journal empty$
+ { "need key or journal for " cite$ * " to crossref " * crossref *
+ warning$
+ ""
+ }
+ { fr.in.min journal * }
+ if$
+ }
+ { fr.in.min key * }
+ if$
+ " \cite{" * crossref * "}" *
+}
+
+FUNCTION {format.crossref.editor}
+{ editor #1 "{vv~}\bgroup\fonteauteurs\bgroup{ll}\egroup\egroup{{}}" format.name$
+ editor num.names$ duplicate$
+ #2 >
+ { pop$ fr.et.al * }
+ { #2 <
+ 'skip$
+ { editor #2 "{ff }{vv }{ll}{ jj}" format.name$ "others" =
+ { fr.et.al * }
+ { fr.and * editor #2 "{vv~}\bgroup\fonteauteurs\bgroup{ll}\egroup\egroup{{}}" format.name$ * }
+ if$
+ }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.book.crossref}
+{ volume empty$
+ { "empty volume in " cite$ * "'s crossref of " * crossref * warning$
+ fr.in.min
+ }
+ { fr.volume volume *
+ fr.of *
+ }
+ if$
+ editor empty$
+ editor field.or.null author field.or.null =
+ or
+ { key empty$
+ { series empty$
+ { "need editor, key, or series for " cite$ * " to crossref " *
+ crossref * warning$
+ "" *
+ }
+ { series * }
+ if$
+ }
+ { key * }
+ if$
+ }
+ { format.crossref.editor * }
+ if$
+ " \cite{" * crossref * "}" *
+}
+
+FUNCTION {format.incoll.inproc.crossref}
+{ editor empty$
+ editor field.or.null author field.or.null =
+ or
+ { key empty$
+ { booktitle empty$
+ { "need editor, key, or booktitle for " cite$ * " to crossref " *
+ crossref * warning$
+ ""
+ }
+ { fr.in.min booktitle * }
+ if$
+ }
+ { fr.in.min key * }
+ if$
+ }
+ { fr.in.min format.crossref.editor * }
+ if$
+ " \cite{" * crossref * "}" *
+}
+
+FUNCTION {article}
+{ output.bibitem
+ format.authors "author" output.check
+ format.title "title" output.check
+ crossref missing$
+ { journal "journal" output.check
+ format.vol.year output
+ }
+ { format.article.crossref output.nonnull }
+ if$
+ format.pages output
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {book}
+{ output.bibitem
+ author empty$
+ { format.editors "author and editor" output.check }
+ { format.authors output.nonnull
+ crossref missing$
+ { "author and editor" editor either.or.check }
+ 'skip$
+ if$
+ }
+ if$
+ format.btitle "title" output.check
+ crossref missing$
+ { format.bvolume output
+ format.number.series output
+ publisher "publisher" output.check
+ address output
+ }
+ { format.book.crossref output.nonnull }
+ if$
+ format.edition output
+ format.date "year" output.check
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {booklet}
+{ output.bibitem
+ format.authors output
+ format.title "title" output.check
+ howpublished new.block.checka
+ howpublished output
+ address output
+ format.date output
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {inbook}
+{ output.bibitem
+ author empty$
+ { format.editors "author and editor" output.check }
+ { format.authors output.nonnull
+ crossref missing$
+ { "author and editor" editor either.or.check }
+ 'skip$
+ if$
+ }
+ if$
+ format.btitle "title" output.check
+ crossref missing$
+ { format.bvolume output
+ format.number.series output
+ publisher "publisher" output.check
+ address output
+ }
+ { format.book.crossref output.nonnull }
+ if$
+ format.edition output
+ format.date "year" output.check
+ format.chapter.pages "chapter and pages" output.check
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {incollection}
+{ output.bibitem
+ format.authors "author" output.check
+ format.title "title" output.check
+ crossref missing$
+ { format.in.ed.booktitle "booktitle" output.check
+ format.bvolume output
+ format.number.series output
+ publisher "publisher" output.check
+ address output
+ format.edition output
+ format.date "year" output.check
+ }
+ { format.incoll.inproc.crossref output.nonnull }
+ if$
+ format.chapter.pages output
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {inproceedings}
+{ output.bibitem
+ format.authors "author" output.check
+ format.title "title" output.check
+ crossref missing$
+ { format.in.ed.booktitle "booktitle" output.check
+ format.bvolume output
+ format.number.series output
+ address empty$
+ { organization output
+ publisher output
+ format.date "year" output.check
+ }
+ { address output.nonnull
+ format.date "year" output.check
+ organization output
+ publisher output
+ }
+ if$
+ }
+ { format.incoll.inproc.crossref output.nonnull }
+ if$
+ format.pages output
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {conference} { inproceedings }
+
+FUNCTION {manual}
+{ output.bibitem
+ author empty$
+ { format.organization output }
+ { format.authors output.nonnull }
+ if$
+ format.btitle "title" output.check
+ author empty$
+ 'skip$
+ { organization output }
+ if$
+ address output
+ format.edition output
+ format.date output
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {mastersthesis}
+{ output.bibitem
+ format.authors "author" output.check
+ format.title "title" output.check
+ fr.master format.thesis.type output.nonnull
+ school "school" output.check
+ address output
+ format.date "year" output.check
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {misc}
+{ output.bibitem
+ format.authors output
+ format.title output
+ howpublished new.block.checka
+ howpublished output
+ format.date output
+ new.block
+ note output
+ fin.entry
+ empty.misc.check
+}
+
+FUNCTION {phdthesis}
+{ output.bibitem
+ format.authors "author" output.check
+ format.btitle "title" output.check
+ fr.phd format.thesis.type output.nonnull
+ school "school" output.check
+ address output
+ format.date "year" output.check
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {proceedings}
+{ output.bibitem
+ editor empty$
+ { format.organization output }
+ { format.editors output.nonnull }
+ if$
+ format.btitle "title" output.check
+ format.bvolume output
+ format.number.series output
+ address empty$
+ { editor empty$
+ 'skip$
+ { organization output }
+ if$
+ publisher output
+ format.date "year" output.check
+ }
+ { address output.nonnull
+ format.date "year" output.check
+ editor empty$
+ 'skip$
+ { organization output }
+ if$
+ publisher output
+ }
+ if$
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {techreport}
+{ output.bibitem
+ format.authors "author" output.check
+ format.title "title" output.check
+ format.tr.number output.nonnull
+ institution "institution" output.check
+ address output
+ format.date "year" output.check
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {unpublished}
+{ output.bibitem
+ format.authors "author" output.check
+ format.title "title" output.check
+ new.block
+ note "note" output.check
+ format.date output
+ fin.entry
+}
+
+FUNCTION {default.type} { misc }
+
+MACRO {acmcs} {"ACM Comput. Surveys"}
+MACRO {acta} {"Acta Inf."}
+MACRO {cacm} {"Comm. ACM"}
+MACRO {ibmjrd} {"IBM J. Res. Dev."}
+MACRO {ibmsj} {"IBM Syst.~J."}
+MACRO {ieeese} {"IEEE Trans. Softw. Eng."}
+MACRO {ieeetc} {"IEEE Trans. Comput."}
+MACRO {ieeetcad}
+ {"IEEE Trans. Comput.-Aided Design Integrated Circuits"}
+MACRO {ipl} {"Inf. Process. Lett."}
+MACRO {jacm} {"J.~Assoc. Comput. Mach."}
+MACRO {jcss} {"J.~Comput. System Sci."}
+MACRO {scp} {"Sci. Comput. Programming"}
+MACRO {sicomp} {"SIAM J. Comput."}
+MACRO {tocs} {"ACM Trans. Comput. Syst."}
+MACRO {tods} {"ACM Trans. Database Syst."}
+MACRO {tog} {"ACM Trans. Gr."}
+MACRO {toms} {"ACM Trans. Math. Softw."}
+MACRO {toois} {"ACM Trans. Office Inf. Syst."}
+MACRO {toplas} {"ACM Trans. Prog. Lang. Syst."}
+MACRO {tcs} {"Theoretical Comput. Sci."}
+
+READ
+
+FUNCTION {sortify}
+{ purify$
+ "l" change.case$
+}
+
+INTEGERS { len }
+
+FUNCTION {chop.word}
+{ 's :=
+ 'len :=
+ s #1 len substring$ =
+ { s len #1 + global.max$ substring$ }
+ 's
+ if$
+}
+
+FUNCTION {sort.format.names}
+{ 's :=
+ #1 'nameptr :=
+ ""
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ { nameptr #1 >
+ { " " * }
+ 'skip$
+ if$
+ s nameptr "{vv{ } }{ll{ }}{ f{ }}{ jj{ }}" format.name$ 't :=
+ nameptr numnames = t "others" = and
+ { fr.et.al sortify * }
+ { t sortify * }
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+}
+
+FUNCTION {sort.format.title}
+{ 't :=
+ "A " #2
+ "An " #3
+ "Un " #3
+ "Une " #4
+ "Des " #4
+ "Le " #3
+ "La " #3
+ "Les " #4
+ "The " #4 t chop.word
+ chop.word
+ chop.word
+ chop.word
+ chop.word
+ chop.word
+ chop.word
+ chop.word
+ chop.word
+ sortify
+ #1 global.max$ substring$
+}
+
+FUNCTION {author.sort}
+{ author empty$
+ { key empty$
+ { "to sort, need author or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { author sort.format.names }
+ if$
+}
+
+FUNCTION {author.editor.sort}
+{ author empty$
+ { editor empty$
+ { key empty$
+ { "to sort, need author, editor, or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { editor sort.format.names }
+ if$
+ }
+ { author sort.format.names }
+ if$
+}
+
+FUNCTION {author.organization.sort}
+{ author empty$
+ { organization empty$
+ { key empty$
+ { "to sort, need author, organization, or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { "Le " #3 "La " #3 "Les " #4
+ "The " #4 organization chop.word
+ chop.word chop.word chop.word sortify }
+ if$
+ }
+ { author sort.format.names }
+ if$
+}
+
+FUNCTION {editor.organization.sort}
+{ editor empty$
+ { organization empty$
+ { key empty$
+ { "to sort, need editor, organization, or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { "Le " #3 "La " #3 "Les " #4
+ "The " #4 organization chop.word
+ chop.word chop.word chop.word sortify }
+ if$
+ }
+ { editor sort.format.names }
+ if$
+}
+
+FUNCTION {presort}
+{ type$ "book" =
+ type$ "inbook" =
+ or
+ 'author.editor.sort
+ { type$ "proceedings" =
+ 'editor.organization.sort
+ { type$ "manual" =
+ 'author.organization.sort
+ 'author.sort
+ if$
+ }
+ if$
+ }
+ if$
+ " "
+ *
+ year field.or.null sortify
+ *
+ " "
+ *
+ title field.or.null
+ sort.format.title
+ *
+ #1 entry.max$ substring$
+ 'sort.key$ :=
+}
+
+ITERATE {presort}
+
+SORT
+
+STRINGS { longest.label }
+
+INTEGERS { number.label longest.label.width }
+
+FUNCTION {initialize.longest.label}
+{ "" 'longest.label :=
+ #1 'number.label :=
+ #0 'longest.label.width :=
+}
+
+FUNCTION {longest.label.pass}
+{ number.label int.to.str$ 'label :=
+ number.label #1 + 'number.label :=
+ label width$ longest.label.width >
+ { label 'longest.label :=
+ label width$ 'longest.label.width :=
+ }
+ 'skip$
+ if$
+}
+
+EXECUTE {initialize.longest.label}
+
+ITERATE {longest.label.pass}
+
+FUNCTION {begin.bib}
+{ preamble$ empty$
+ 'skip$
+ { preamble$ write$ newline$ }
+ if$
+ "\begin{thebibliography}{" longest.label * "}" * write$ newline$
+ "\expandafter\ifx\csname fonteauteurs\endcsname\relax"
+ write$ newline$
+ "\def\fonteauteurs{" fr.auteurs.style * "}\fi" * write$ newline$
+}
+
+EXECUTE {begin.bib}
+
+EXECUTE {init.state.consts}
+
+EXECUTE {init.last.authors}
+
+ITERATE {call.type$}
+
+FUNCTION {end.bib}
+{ newline$
+ "\end{thebibliography}" write$ newline$
+}
+
+EXECUTE {end.bib}
diff --git a/biblio/bibtex/contrib/bib-fr/unsrt-fr.bst b/biblio/bibtex/contrib/bib-fr/unsrt-fr.bst
new file mode 100644
index 0000000000..79a9c15f71
--- /dev/null
+++ b/biblio/bibtex/contrib/bib-fr/unsrt-fr.bst
@@ -0,0 +1,1062 @@
+%%
+%% Bib. style "unsrt-fr" (version francisee de unsrt.bst)
+%%
+%% NM, 2004/02/22
+%% markey@lsv.ens-cachan.fr
+%%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% Original Copyright (Oren Patashnik):
+%%
+ % This program may be distributed and/or modified under the
+ % conditions of the LaTeX Project Public License, either version 1.2
+ % of this license or (at your option) any later version.
+ % The latest version of this license is in
+ % http://www.latex-project.org/lppl.txt
+ % and version 1.2 or later is part of all distributions of LaTeX
+ % version 1999/12/01 or later.
+ %
+ % This program consists of the files unsrt.bst
+ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+ENTRY
+ { address
+ author
+ booktitle
+ chapter
+ edition
+ editor
+ howpublished
+ institution
+ journal
+ key
+ month
+ note
+ number
+ organization
+ pages
+ publisher
+ school
+ series
+ title
+ type
+ volume
+ year
+ }
+ {}
+ { label }
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%%
+%% C'est ici que je definis les "traductions". Normalement, y a que ca a changer
+%% pour franciser le style...
+%%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+FUNCTION{fr.and}{ %% le "et" entre les deux derniers auteurs
+" et "
+}
+
+FUNCTION{fr.editeur}{ %% ", \'editeur" au singulier, ou " (\'editeur)"...
+", \'editeur"
+}
+
+FUNCTION{fr.editeurs}{ %% ", \'editeurs" au pluriel, ou " (\'editeurs)"...
+", \'editeurs"
+}
+
+FUNCTION{fr.et.al}{ %% " et~al."
+" \emph{et~al.}"
+}
+
+FUNCTION{fr.in}{ %% "In "
+"\emph{In} "
+}
+
+FUNCTION{fr.in.spc}{ %% " de " (ou " de la s\'erie ")
+" de "
+}
+
+FUNCTION{fr.of}{ %% " de "
+" de "
+}
+
+FUNCTION{fr.number}{ %% "num\'ero "
+"num\'ero "
+}
+
+FUNCTION{fr.number.maj}{ %% "Num\'ero "
+"Num\'ero "
+}
+
+FUNCTION{fr.volume}{ %% "volume"
+"volume"
+}
+
+FUNCTION{fr.volume.maj}{ %% "Volume"
+"Volume"
+}
+
+FUNCTION{fr.edition}{ %% " \'edition"
+" \'edition"
+}
+
+FUNCTION{fr.pages}{ %% "pages"
+"pages"
+}
+
+FUNCTION{fr.page}{ %% "page"
+"page"
+}
+
+FUNCTION{fr.chapter}{ %% "chapitre"
+"chapitre"
+}
+
+FUNCTION{fr.tech.rep}{ %% "Rapport Technique"
+"Rapport technique"
+}
+
+FUNCTION{fr.master}{ %% "M\'emoire de D.E.A."
+"M\'emoire de D.E.A."
+}
+
+FUNCTION{fr.phd}{ %% "Th\`ese de doctorat"
+"Th\`ese de doctorat"
+}
+
+FUNCTION{fr.auteurs.style}{
+ %% si on veut des small caps sur le LASTNAME de l'auteur
+ %% Cette fonction est utilisee dans la definition d'une
+ %% fonction LaTeX.
+"\scshape"
+}
+
+FUNCTION{fr.ponctuation.apres.auteurs}{ %% Comme son nom l'indique...
+" : "
+}
+
+FUNCTION{fr.deuxpoints}{ %% Pour eviter l'espace avant les ":".
+"\string:\penalty500\relax "
+}
+
+MACRO {jan} {"janvier"}
+MACRO {feb} {"f\'evrier"}
+MACRO {mar} {"mars"}
+MACRO {apr} {"avril"}
+MACRO {may} {"mai"}
+MACRO {jun} {"juin"}
+MACRO {jul} {"juillet"}
+MACRO {aug} {"ao\^ut"}
+MACRO {sep} {"septembre"}
+MACRO {oct} {"octobre"}
+MACRO {nov} {"novembre"}
+MACRO {dec} {"d\'ecembre"}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%%
+%% La suite, normalement, y a rien a changer...
+%%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+
+
+
+
+INTEGERS { output.state before.all mid.sentence after.sentence after.block after.authors }
+
+FUNCTION {init.state.consts}
+{ #0 'before.all :=
+ #1 'mid.sentence :=
+ #2 'after.sentence :=
+ #3 'after.block :=
+ #0 'after.authors :=
+}
+
+STRINGS { s t }
+
+FUNCTION{ fr.add.period }{
+after.authors
+ { fr.ponctuation.apres.auteurs empty$
+ { add.period$ }
+ { fr.ponctuation.apres.auteurs * #0 'after.authors := }
+ if$}
+ { add.period$ }
+if$
+}
+
+FUNCTION {output.nonnull}
+{ 's :=
+ output.state mid.sentence =
+ { ", " * write$ }
+ { output.state after.block =
+ { fr.add.period write$
+ newline$
+ "\newblock " write$
+ }
+ { output.state before.all =
+ 'write$
+ { add.period$ " " * write$ }
+ if$
+ }
+ if$
+ mid.sentence 'output.state :=
+ }
+ if$
+ s
+}
+
+FUNCTION {output}
+{ duplicate$ empty$
+ 'pop$
+ 'output.nonnull
+ if$
+}
+
+FUNCTION {output.check}
+{ 't :=
+ duplicate$ empty$
+ { pop$ "empty " t * " in " * cite$ * warning$ }
+ 'output.nonnull
+ if$
+}
+
+FUNCTION {output.bibitem}
+{ newline$
+ "\bibitem{" write$
+ cite$ write$
+ "}" write$
+ newline$
+ ""
+ before.all 'output.state :=
+}
+
+FUNCTION {fin.entry}
+{ add.period$
+ write$
+ newline$
+}
+
+FUNCTION {new.block}
+{ output.state before.all =
+ 'skip$
+ { after.block 'output.state := }
+ if$
+}
+
+FUNCTION {new.sentence}
+{ output.state after.block =
+ 'skip$
+ { output.state before.all =
+ 'skip$
+ { after.sentence 'output.state := }
+ if$
+ }
+ if$
+}
+
+FUNCTION {not}
+{ { #0 }
+ { #1 }
+ if$
+}
+
+FUNCTION {and}
+{ 'skip$
+ { pop$ #0 }
+ if$
+}
+
+FUNCTION {or}
+{ { pop$ #1 }
+ 'skip$
+ if$
+}
+
+FUNCTION {new.block.checka}
+{ empty$
+ 'skip$
+ 'new.block
+ if$
+}
+
+FUNCTION {new.block.checkb}
+{ empty$
+ swap$ empty$
+ and
+ 'skip$
+ 'new.block
+ if$
+}
+
+FUNCTION {new.sentence.checka}
+{ empty$
+ 'skip$
+ 'new.sentence
+ if$
+}
+
+FUNCTION {new.sentence.checkb}
+{ empty$
+ swap$ empty$
+ and
+ 'skip$
+ 'new.sentence
+ if$
+}
+
+FUNCTION {field.or.null}
+{ duplicate$ empty$
+ { pop$ "" }
+ 'skip$
+ if$
+}
+
+FUNCTION {emphasize}
+{ duplicate$ empty$
+ { pop$ "" }
+ { "{\em " swap$ * "}" * }
+ if$
+}
+
+INTEGERS { nameptr namesleft numnames }
+
+FUNCTION {format.names}
+{ 's :=
+ #1 'nameptr :=
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ { s nameptr "{ff~}{vv~}\bgroup\fonteauteurs\bgroup {ll}\egroup\egroup{{}}{, jj}" format.name$ 't :=
+ nameptr #1 >
+ { namesleft #1 >
+ { ", " * t * }
+ { %numnames #2 > namesleft #2 > and
+ % { "," * }
+ % 'skip$
+ %if$
+ t "\bgroup\fonteauteurs\bgroup others\egroup\egroup{}" =
+ { fr.et.al * }
+ { fr.and * t * }
+ if$
+ }
+ if$
+ }
+ 't
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+}
+
+FUNCTION {format.authors}
+{ author empty$
+ { "" }
+ { author format.names #1 'after.authors := }
+ if$
+}
+
+FUNCTION {format.editors}
+{ editor empty$
+ { "" }
+ { editor format.names
+ editor num.names$ #1 >
+ { fr.editeurs * }
+ { fr.editeur * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.title}
+{ title empty$
+ { "" }
+ { title "t" change.case$ }
+ if$
+}
+
+FUNCTION {n.dashify}
+{ 't :=
+ ""
+ { t empty$ not }
+ { t #1 #1 substring$ "-" =
+ { t #1 #2 substring$ "--" = not
+ { "--" *
+ t #2 global.max$ substring$ 't :=
+ }
+ { { t #1 #1 substring$ "-" = }
+ { "-" *
+ t #2 global.max$ substring$ 't :=
+ }
+ while$
+ }
+ if$
+ }
+ { t #1 #1 substring$ *
+ t #2 global.max$ substring$ 't :=
+ }
+ if$
+ }
+ while$
+}
+
+FUNCTION {format.date}
+{ year empty$
+ { month empty$
+ { "" }
+ { "there's a month but no year in " cite$ * warning$
+ month
+ }
+ if$
+ }
+ { month empty$
+ 'year
+ { month " " * year * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.btitle}
+{ title emphasize
+}
+
+FUNCTION {tie.or.space.connect}
+{ duplicate$ text.length$ #3 <
+ { "~" }
+ { " " }
+ if$
+ swap$ * *
+}
+
+FUNCTION {either.or.check}
+{ empty$
+ 'pop$
+ { "can't use both " swap$ * " fields in " * cite$ * warning$ }
+ if$
+}
+
+FUNCTION {format.bvolume}
+{ volume empty$
+ { "" }
+ { fr.volume volume tie.or.space.connect
+ series empty$
+ 'skip$
+ { fr.of * series emphasize * }
+ if$
+ "volume and number" number either.or.check
+ }
+ if$
+}
+
+FUNCTION {format.number.series}
+{ volume empty$
+ { number empty$
+ { series field.or.null }
+ { output.state mid.sentence =
+ { fr.number }
+ { fr.number.maj }
+ if$
+ number tie.or.space.connect
+ series empty$
+ { "there's a number but no series in " cite$ * warning$ }
+ { fr.in.spc * series * }
+ if$
+ }
+ if$
+ }
+ { "" }
+ if$
+}
+
+FUNCTION {format.edition}
+{ edition empty$
+ { "" }
+ { output.state mid.sentence =
+ { edition "l" change.case$ fr.edition * }
+ { edition "t" change.case$ fr.edition * }
+ if$
+ }
+ if$
+}
+
+INTEGERS { multiresult }
+
+FUNCTION {multi.page.check}
+{ 't :=
+ #0 'multiresult :=
+ { multiresult not
+ t empty$ not
+ and
+ }
+ { t #1 #1 substring$
+ duplicate$ "-" =
+ swap$ duplicate$ "," =
+ swap$ "+" =
+ or or
+ { #1 'multiresult := }
+ { t #2 global.max$ substring$ 't := }
+ if$
+ }
+ while$
+ multiresult
+}
+
+FUNCTION {format.pages}
+{ pages empty$
+ { "" }
+ { pages multi.page.check
+ { fr.pages pages n.dashify tie.or.space.connect }
+ { fr.page pages tie.or.space.connect }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.vol.num.pages}
+{ volume field.or.null
+ number empty$
+ 'skip$
+ { "(" number * ")" * *
+ volume empty$
+ { "there's a number but no volume in " cite$ * warning$ }
+ 'skip$
+ if$
+ }
+ if$
+ pages empty$
+ 'skip$
+ { duplicate$ empty$
+ { pop$ format.pages }
+ { fr.deuxpoints * pages n.dashify * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.chapter.pages}
+{ chapter empty$
+ 'format.pages
+ { type empty$
+ { fr.chapter }
+ { type "l" change.case$ }
+ if$
+ chapter tie.or.space.connect
+ pages empty$
+ 'skip$
+ { ", " * format.pages * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.in.ed.booktitle}
+{ booktitle empty$
+ { "" }
+ { editor empty$
+ { fr.in booktitle emphasize * }
+ { fr.in format.editors #1 'after.authors := fr.add.period " " * * booktitle emphasize * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {empty.misc.check}
+{ author empty$ title empty$ howpublished empty$
+ month empty$ year empty$ note empty$
+ and and and and and
+ { "all relevant fields are empty in " cite$ * warning$ }
+ 'skip$
+ if$
+}
+
+FUNCTION {format.thesis.type}
+{ type empty$
+ 'skip$
+ { pop$
+ type "t" change.case$
+ }
+ if$
+}
+
+FUNCTION {format.tr.number}
+{ type empty$
+ { fr.tech.rep }
+ 'type
+ if$
+ number empty$
+ { "t" change.case$ }
+ { number tie.or.space.connect }
+ if$
+}
+
+FUNCTION {format.article.crossref}
+{ key empty$
+ { journal empty$
+ { "need key or journal for " cite$ * " to crossref " * crossref *
+ warning$
+ ""
+ }
+ { fr.in "{\em " * journal * "\/}" * }
+ if$
+ }
+ { fr.in key * }
+ if$
+ " \cite{" * crossref * "}" *
+}
+
+FUNCTION {format.crossref.editor}
+{ editor #1 "{vv~}\bgroup\fonteauteurs\bgroup {ll}\egroup\egroup{{}}" format.name$
+ editor num.names$ duplicate$
+ #2 >
+ { pop$ fr.et.al * }
+ { #2 <
+ 'skip$
+ { editor #2 "{ff }{vv }{ll}{ jj}" format.name$ "others" =
+ { fr.et.al * }
+ { fr.and * editor #2 "{vv~}\bgroup\fonteauteurs\bgroup {ll}\egroup\egroup{{}}" format.name$ * }
+ if$
+ }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.book.crossref}
+{ volume empty$
+ { "empty volume in " cite$ * "'s crossref of " * crossref * warning$
+ fr.in
+ }
+ { fr.volume.maj volume tie.or.space.connect
+ fr.of *
+ }
+ if$
+ editor empty$
+ editor field.or.null author field.or.null =
+ or
+ { key empty$
+ { series empty$
+ { "need editor, key, or series for " cite$ * " to crossref " *
+ crossref * warning$
+ "" *
+ }
+ { "{\em " * series * "\/}" * }
+ if$
+ }
+ { key * }
+ if$
+ }
+ { format.crossref.editor * }
+ if$
+ " \cite{" * crossref * "}" *
+}
+
+FUNCTION {format.incoll.inproc.crossref}
+{ editor empty$
+ editor field.or.null author field.or.null =
+ or
+ { key empty$
+ { booktitle empty$
+ { "need editor, key, or booktitle for " cite$ * " to crossref " *
+ crossref * warning$
+ ""
+ }
+ { fr.in "{\em " * booktitle * "\/}" * }
+ if$
+ }
+ { fr.in key * }
+ if$
+ }
+ { fr.in format.crossref.editor * }
+ if$
+ " \cite{" * crossref * "}" *
+}
+
+FUNCTION {article}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.title "title" output.check
+ new.block
+ crossref missing$
+ { journal emphasize "journal" output.check
+ format.vol.num.pages output
+ format.date "year" output.check
+ }
+ { format.article.crossref output.nonnull
+ format.pages output
+ }
+ if$
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {book}
+{ output.bibitem
+ author empty$
+ { format.editors "author and editor" output.check }
+ { format.authors output.nonnull
+ crossref missing$
+ { "author and editor" editor either.or.check }
+ 'skip$
+ if$
+ }
+ if$
+ new.block
+ format.btitle "title" output.check
+ crossref missing$
+ { format.bvolume output
+ new.block
+ format.number.series output
+ new.sentence
+ publisher "publisher" output.check
+ address output
+ }
+ { new.block
+ format.book.crossref output.nonnull
+ }
+ if$
+ format.edition output
+ format.date "year" output.check
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {booklet}
+{ output.bibitem
+ format.authors output
+ new.block
+ format.title "title" output.check
+ howpublished address new.block.checkb
+ howpublished output
+ address output
+ format.date output
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {inbook}
+{ output.bibitem
+ author empty$
+ { format.editors "author and editor" output.check }
+ { format.authors output.nonnull
+ crossref missing$
+ { "author and editor" editor either.or.check }
+ 'skip$
+ if$
+ }
+ if$
+ new.block
+ format.btitle "title" output.check
+ crossref missing$
+ { format.bvolume output
+ format.chapter.pages "chapter and pages" output.check
+ new.block
+ format.number.series output
+ new.sentence
+ publisher "publisher" output.check
+ address output
+ }
+ { format.chapter.pages "chapter and pages" output.check
+ new.block
+ format.book.crossref output.nonnull
+ }
+ if$
+ format.edition output
+ format.date "year" output.check
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {incollection}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.title "title" output.check
+ new.block
+ crossref missing$
+ { format.in.ed.booktitle "booktitle" output.check
+ format.bvolume output
+ format.number.series output
+ format.chapter.pages output
+ new.sentence
+ publisher "publisher" output.check
+ address output
+ format.edition output
+ format.date "year" output.check
+ }
+ { format.incoll.inproc.crossref output.nonnull
+ format.chapter.pages output
+ }
+ if$
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {inproceedings}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.title "title" output.check
+ new.block
+ crossref missing$
+ { format.in.ed.booktitle "booktitle" output.check
+ format.bvolume output
+ format.number.series output
+ format.pages output
+ address empty$
+ { organization publisher new.sentence.checkb
+ organization output
+ publisher output
+ format.date "year" output.check
+ }
+ { address output.nonnull
+ format.date "year" output.check
+ new.sentence
+ organization output
+ publisher output
+ }
+ if$
+ }
+ { format.incoll.inproc.crossref output.nonnull
+ format.pages output
+ }
+ if$
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {conference} { inproceedings }
+
+FUNCTION {manual}
+{ output.bibitem
+ author empty$
+ { organization empty$
+ 'skip$
+ { organization output.nonnull
+ address output
+ }
+ if$
+ }
+ { format.authors output.nonnull }
+ if$
+ new.block
+ format.btitle "title" output.check
+ author empty$
+ { organization empty$
+ { address new.block.checka
+ address output
+ }
+ 'skip$
+ if$
+ }
+ { organization address new.block.checkb
+ organization output
+ address output
+ }
+ if$
+ format.edition output
+ format.date output
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {mastersthesis}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.title "title" output.check
+ new.block
+ fr.master format.thesis.type output.nonnull
+ school "school" output.check
+ address output
+ format.date "year" output.check
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {misc}
+{ output.bibitem
+ format.authors output
+ title howpublished new.block.checkb
+ format.title output
+ howpublished new.block.checka
+ howpublished output
+ format.date output
+ new.block
+ note output
+ fin.entry
+ empty.misc.check
+}
+
+FUNCTION {phdthesis}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.btitle "title" output.check
+ new.block
+ fr.phd format.thesis.type output.nonnull
+ school "school" output.check
+ address output
+ format.date "year" output.check
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {proceedings}
+{ output.bibitem
+ editor empty$
+ { organization output }
+ { format.editors output.nonnull }
+ if$
+ new.block
+ format.btitle "title" output.check
+ format.bvolume output
+ format.number.series output
+ address empty$
+ { editor empty$
+ { publisher new.sentence.checka }
+ { organization publisher new.sentence.checkb
+ organization output
+ }
+ if$
+ publisher output
+ format.date "year" output.check
+ }
+ { address output.nonnull
+ format.date "year" output.check
+ new.sentence
+ editor empty$
+ 'skip$
+ { organization output }
+ if$
+ publisher output
+ }
+ if$
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {techreport}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.title "title" output.check
+ new.block
+ format.tr.number output.nonnull
+ institution "institution" output.check
+ address output
+ format.date "year" output.check
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {unpublished}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.title "title" output.check
+ new.block
+ note "note" output.check
+ format.date output
+ fin.entry
+}
+
+FUNCTION {default.type} { misc }
+
+MACRO {acmcs} {"ACM Computing Surveys"}
+MACRO {acta} {"Acta Informatica"}
+MACRO {cacm} {"Communications of the ACM"}
+MACRO {ibmjrd} {"IBM Journal of Research and Development"}
+MACRO {ibmsj} {"IBM Systems Journal"}
+MACRO {ieeese} {"IEEE Transactions on Software Engineering"}
+MACRO {ieeetc} {"IEEE Transactions on Computers"}
+MACRO {ieeetcad}
+ {"IEEE Transactions on Computer-Aided Design of Integrated Circuits"}
+MACRO {ipl} {"Information Processing Letters"}
+MACRO {jacm} {"Journal of the ACM"}
+MACRO {jcss} {"Journal of Computer and System Sciences"}
+MACRO {scp} {"Science of Computer Programming"}
+MACRO {sicomp} {"SIAM Journal on Computing"}
+MACRO {tocs} {"ACM Transactions on Computer Systems"}
+MACRO {tods} {"ACM Transactions on Database Systems"}
+MACRO {tog} {"ACM Transactions on Graphics"}
+MACRO {toms} {"ACM Transactions on Mathematical Software"}
+MACRO {toois} {"ACM Transactions on Office Information Systems"}
+MACRO {toplas} {"ACM Transactions on Programming Languages and Systems"}
+MACRO {tcs} {"Theoretical Computer Science"}
+
+READ
+
+STRINGS { longest.label }
+
+INTEGERS { number.label longest.label.width }
+
+FUNCTION {initialize.longest.label}
+{ "" 'longest.label :=
+ #1 'number.label :=
+ #0 'longest.label.width :=
+}
+
+FUNCTION {longest.label.pass}
+{ number.label int.to.str$ 'label :=
+ number.label #1 + 'number.label :=
+ label width$ longest.label.width >
+ { label 'longest.label :=
+ label width$ 'longest.label.width :=
+ }
+ 'skip$
+ if$
+}
+
+EXECUTE {initialize.longest.label}
+
+ITERATE {longest.label.pass}
+
+FUNCTION {begin.bib}
+{ preamble$ empty$
+ 'skip$
+ { preamble$ write$ newline$ }
+ if$
+ "\begin{thebibliography}{" longest.label * "}" * write$ newline$
+ "\expandafter\ifx\csname fonteauteurs\endcsname\relax"
+ write$ newline$
+ "\def\fonteauteurs{" fr.auteurs.style * "}\fi" * write$ newline$
+ "\makeatother" write$ newline$
+}
+
+EXECUTE {begin.bib}
+
+EXECUTE {init.state.consts}
+
+ITERATE {call.type$}
+
+FUNCTION {end.bib}
+{ newline$
+ "\end{thebibliography}" write$ newline$
+}
+
+EXECUTE {end.bib}
+
+
+%%
+%% Changelog :
+%% 1.0 -> 1.1 : les mois ne prennent pas de majuscule
+%% 1.1 -> 1.2 : le '.' qui suit la liste des auteurs peut etre
+%% change en autre chose (':' notamment).
+%%
diff --git a/biblio/bibtex/contrib/bib-fr/unsrtnat-fr.bst b/biblio/bibtex/contrib/bib-fr/unsrtnat-fr.bst
new file mode 100644
index 0000000000..ca0a8e65f8
--- /dev/null
+++ b/biblio/bibtex/contrib/bib-fr/unsrtnat-fr.bst
@@ -0,0 +1,1495 @@
+%%
+%% Bib. style "unsrtnat-fr" (version francisee de unsrtnat.bst)
+%%
+%% NM, 2005/10/16
+%% markey@lsv.ens-cachan.fr
+%%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% Original Copyright (Patrick Daly):
+%%
+%% Copyright 1993-1999 Patrick W Daly
+%% Max-Planck-Institut f\"ur Aeronomie
+%% Max-Planck-Str. 2
+%% D-37191 Katlenburg-Lindau
+%% Germany
+%% E-mail: daly@linmpi.mpg.de
+%%
+%% This program can be redistributed and/or modified under the terms
+%% of the LaTeX Project Public License Distributed from CTAN
+%% archives in directory macros/latex/base/lppl.txt; either
+%% version 1 of the License, or any later version.
+%%
+ % Version and source file information:
+ % \ProvidesFile{natbst.mbs}[1999/05/11 1.6 (PWD)]
+ %
+ % BibTeX `plainnat' family
+ % version 0.99b for BibTeX versions 0.99a or later,
+ % for LaTeX versions 2.09 and 2e.
+ %
+ % For use with the `natbib.sty' package; emulates the corresponding
+ % member of the `plain' family, but with author-year citations.
+ %
+ % With version 6.0 of `natbib.sty', it may also be used for numerical
+ % citations, while retaining the commands \citeauthor, \citefullauthor,
+ % and \citeyear to print the corresponding information.
+ %
+ % For version 7.0 of `natbib.sty', the KEY field replaces missing
+ % authors/editors, and the date is left blank in \bibitem.
+ %
+ % Includes fields ISBN and ISSN.
+ %
+ % Includes field URL for Internet addresses (best used with
+ % with the url.sty package of Donald Arseneau
+ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+
+ENTRY
+ { address
+ author
+ booktitle
+ chapter
+ edition
+ editor
+ howpublished
+ institution
+ isbn
+ issn
+ journal
+ key
+ month
+ note
+ number
+ organization
+ pages
+ publisher
+ school
+ series
+ title
+ type
+ url
+ volume
+ year
+ }
+ {}
+ { label extra.label sort.label short.list }
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%%
+%% C'est ici que je definis les "traductions". Normalement, y a que ca a changer
+%% pour franciser le style...
+%%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+FUNCTION{fr.and}{ %% le "et" entre les deux derniers auteurs
+" et "
+}
+
+FUNCTION{fr.editeur}{ %% ", {\'e}diteur" au singulier, ou " ({\'e}diteur)"...
+", {\'e}diteur"
+}
+
+FUNCTION{fr.editeurs}{ %% ", {\'e}diteurs" au pluriel, ou " ({\'e}diteurs)"...
+", {\'e}diteurs"
+}
+
+FUNCTION{fr.et.al}{ %% " et~al."
+" \emph{et~al.}"
+}
+
+FUNCTION{fr.in}{ %% "Dans "
+"\emph{In} "
+}
+
+FUNCTION{fr.in.spc}{ %% " dans "
+" \emph{in} "
+}
+
+FUNCTION{fr.of}{ %% " de "
+" de "
+}
+
+FUNCTION{fr.number}{ %% "num{\'e}ro "
+"num{\'e}ro "
+}
+
+FUNCTION{fr.number.maj}{ %% "Num{\'e}ro "
+"Num{\'e}ro "
+}
+
+FUNCTION{fr.volume}{ %% "volume"
+"volume"
+}
+
+FUNCTION{fr.volume.maj}{ %% "Volume"
+"Volume"
+}
+
+FUNCTION{fr.edition}{ %% " {\'e}dition"
+" {\'e}dition"
+}
+
+FUNCTION{fr.pages}{ %% "pages"
+"pages"
+}
+
+FUNCTION{fr.page}{ %% "page"
+"page"
+}
+
+FUNCTION{fr.chapter}{ %% "chapitre"
+"chapitre"
+}
+
+FUNCTION{fr.tech.rep}{ %% "Rapport Technique"
+"Rapport technique"
+}
+
+FUNCTION{fr.master}{ %% "M{\'e}moire de D.E.A."
+"M{\'e}moire de D.E.A."
+}
+
+FUNCTION{fr.phd}{ %% "Th{\`e}se de doctorat"
+"Th{\`e}se de doctorat"
+}
+
+FUNCTION{fr.auteurs.style}{
+ %% si on veut des small caps sur le LASTNAME de l'auteur
+ %% Cette fonction est utilisee dans la definition d'une
+ %% fonction LaTeX.
+"\scshape"
+}
+
+FUNCTION{fr.ponctuation.apres.auteurs}{ %% Comme son nom l'indique...
+" : "
+}
+
+FUNCTION{fr.deuxpoints}{ %% Pour eviter l'espace avant les ":".
+"\string:\penalty500\relax "
+}
+
+MACRO {jan} {"janvier"}
+MACRO {feb} {"f\'evrier"}
+MACRO {mar} {"mars"}
+MACRO {apr} {"avril"}
+MACRO {may} {"mai"}
+MACRO {jun} {"juin"}
+MACRO {jul} {"juillet"}
+MACRO {aug} {"ao\^ut"}
+MACRO {sep} {"septembre"}
+MACRO {oct} {"octobre"}
+MACRO {nov} {"novembre"}
+MACRO {dec} {"d\'ecembre"}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%%
+%% La suite, normalement, y a rien a changer...
+%%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+INTEGERS { output.state before.all mid.sentence after.sentence after.block after.authors }
+
+FUNCTION {init.state.consts}
+{ #0 'before.all :=
+ #1 'mid.sentence :=
+ #2 'after.sentence :=
+ #3 'after.block :=
+ #0 'after.authors :=
+}
+
+STRINGS { s t }
+
+FUNCTION{ fr.add.period }{
+after.authors
+ { fr.ponctuation.apres.auteurs empty$
+ { add.period$ }
+ { fr.ponctuation.apres.auteurs * #0 'after.authors := }
+ if$}
+ { add.period$ }
+if$
+}
+
+FUNCTION {output.nonnull}
+{ 's :=
+ output.state mid.sentence =
+ { ", " * write$ }
+ { output.state after.block =
+ { fr.add.period write$
+ newline$
+ "\newblock " write$
+ }
+ { output.state before.all =
+ 'write$
+ { add.period$ " " * write$ }
+ if$
+ }
+ if$
+ mid.sentence 'output.state :=
+ }
+ if$
+ s
+}
+
+FUNCTION {output}
+{ duplicate$ empty$
+ 'pop$
+ 'output.nonnull
+ if$
+}
+
+FUNCTION {output.check}
+{ 't :=
+ duplicate$ empty$
+ { pop$ "empty " t * " in " * cite$ * warning$ }
+ 'output.nonnull
+ if$
+}
+
+FUNCTION {fin.entry}
+{ add.period$
+ write$
+ newline$
+}
+
+FUNCTION {new.block}
+{ output.state before.all =
+ 'skip$
+ { after.block 'output.state := }
+ if$
+}
+
+FUNCTION {new.sentence}
+{ output.state after.block =
+ 'skip$
+ { output.state before.all =
+ 'skip$
+ { after.sentence 'output.state := }
+ if$
+ }
+ if$
+}
+
+FUNCTION {not}
+{ { #0 }
+ { #1 }
+ if$
+}
+
+FUNCTION {and}
+{ 'skip$
+ { pop$ #0 }
+ if$
+}
+
+FUNCTION {or}
+{ { pop$ #1 }
+ 'skip$
+ if$
+}
+
+FUNCTION {new.block.checka}
+{ empty$
+ 'skip$
+ 'new.block
+ if$
+}
+
+FUNCTION {new.block.checkb}
+{ empty$
+ swap$ empty$
+ and
+ 'skip$
+ 'new.block
+ if$
+}
+
+FUNCTION {new.sentence.checka}
+{ empty$
+ 'skip$
+ 'new.sentence
+ if$
+}
+
+FUNCTION {new.sentence.checkb}
+{ empty$
+ swap$ empty$
+ and
+ 'skip$
+ 'new.sentence
+ if$
+}
+
+FUNCTION {field.or.null}
+{ duplicate$ empty$
+ { pop$ "" }
+ 'skip$
+ if$
+}
+
+FUNCTION {emphasize}
+{ duplicate$ empty$
+ { pop$ "" }
+ { "{\em " swap$ * "}" * }
+ if$
+}
+
+INTEGERS { nameptr namesleft numnames }
+
+FUNCTION {format.names}
+{ 's :=
+ #1 'nameptr :=
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ { s nameptr "{ff~}{vv~}\bgroup\fonteauteurs\bgroup {ll}\egroup\egroup{{}}{, jj}" format.name$ 't :=
+ nameptr #1 >
+ { namesleft #1 >
+ { ", " * t * }
+ { %numnames #2 >
+ % { "," * }
+ % 'skip$
+ %if$
+ t "\bgroup\fonteauteurs\bgroup others\egroup\egroup{}" =
+ { fr.et.al * }
+ { fr.and * t * }
+ if$
+ }
+ if$
+ }
+ 't
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+}
+
+FUNCTION {format.key}
+{ empty$
+ { key field.or.null }
+ { "" }
+ if$
+}
+
+FUNCTION {format.authors}
+{ author empty$
+ { "" }
+ { author format.names #1 'after.authors := }
+ if$
+}
+
+FUNCTION {format.editors}
+{ editor empty$
+ { "" }
+ { editor format.names
+ editor num.names$ #1 >
+ { fr.editeurs * }
+ { fr.editeur * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.isbn}
+{ isbn empty$
+ { "" }
+ { new.block "ISBN " isbn * }
+ if$
+}
+
+FUNCTION {format.issn}
+{ issn empty$
+ { "" }
+ { new.block "ISSN " issn * }
+ if$
+}
+
+FUNCTION {format.url}
+{ url empty$
+ { "" }
+ { new.block "URL \url{" url * "}" * }
+ if$
+}
+
+FUNCTION {format.title}
+{ title empty$
+ { "" }
+ { title "t" change.case$ }
+ if$
+}
+
+FUNCTION {format.full.names}
+{%
+ % Ici, on laisse les noms en minuscules, on ne les mets pas en small caps.
+ %
+ 's :=
+ #1 'nameptr :=
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ { s nameptr
+ "{vv~}{ll}" format.name$ 't :=
+ nameptr #1 >
+ {
+ namesleft #1 >
+ { ", " * t * }
+ {
+ numnames #2 >
+ { "," * }
+ 'skip$
+ if$
+ t "\bgroup\fonteauteurs\bgroup others\egroup\egroup{}" =
+ { fr.et.al * }
+ { fr.and * t * }
+ if$
+ }
+ if$
+ }
+ 't
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+}
+
+FUNCTION {author.editor.full}
+{ author empty$
+ { editor empty$
+ { "" }
+ { editor format.full.names }
+ if$
+ }
+ { author format.full.names }
+ if$
+}
+
+FUNCTION {author.full}
+{ author empty$
+ { "" }
+ { author format.full.names }
+ if$
+}
+
+FUNCTION {editor.full}
+{ editor empty$
+ { "" }
+ { editor format.full.names }
+ if$
+}
+
+FUNCTION {make.full.names}
+{ type$ "book" =
+ type$ "inbook" =
+ or
+ 'author.editor.full
+ { type$ "proceedings" =
+ 'editor.full
+ 'author.full
+ if$
+ }
+ if$
+}
+
+FUNCTION {output.bibitem}
+{ newline$
+ "\bibitem[" write$
+ label write$
+ ")" make.full.names duplicate$ short.list =
+ { pop$ }
+ { * }
+ if$
+ "]{" * write$
+ cite$ write$
+ "}" write$
+ newline$
+ ""
+ before.all 'output.state :=
+}
+
+FUNCTION {n.dashify}
+{ 't :=
+ ""
+ { t empty$ not }
+ { t #1 #1 substring$ "-" =
+ { t #1 #2 substring$ "--" = not
+ { "--" *
+ t #2 global.max$ substring$ 't :=
+ }
+ { { t #1 #1 substring$ "-" = }
+ { "-" *
+ t #2 global.max$ substring$ 't :=
+ }
+ while$
+ }
+ if$
+ }
+ { t #1 #1 substring$ *
+ t #2 global.max$ substring$ 't :=
+ }
+ if$
+ }
+ while$
+}
+
+FUNCTION {format.date}
+{ year duplicate$ empty$
+ { "empty year in " cite$ * warning$
+ pop$ "" }
+ 'skip$
+ if$
+ month empty$
+ 'skip$
+ { month
+ " " * swap$ *
+ }
+ if$
+ extra.label *
+}
+
+FUNCTION {format.btitle}
+{ title emphasize
+}
+
+FUNCTION {tie.or.space.connect}
+{ duplicate$ text.length$ #3 <
+ { "~" }
+ { " " }
+ if$
+ swap$ * *
+}
+
+FUNCTION {either.or.check}
+{ empty$
+ 'pop$
+ { "can't use both " swap$ * " fields in " * cite$ * warning$ }
+ if$
+}
+
+FUNCTION {format.bvolume}
+{ volume empty$
+ { "" }
+ { fr.volume volume tie.or.space.connect
+ series empty$
+ 'skip$
+ { fr.of * series emphasize * }
+ if$
+ "volume and number" number either.or.check
+ }
+ if$
+}
+
+FUNCTION {format.number.series}
+{ volume empty$
+ { number empty$
+ { series field.or.null }
+ { output.state mid.sentence =
+ { fr.number }
+ { fr.number.maj }
+ if$
+ number tie.or.space.connect
+ series empty$
+ { "there's a number but no series in " cite$ * warning$ }
+ { fr.in.spc * series * }
+ if$
+ }
+ if$
+ }
+ { "" }
+ if$
+}
+
+FUNCTION {format.edition}
+{ edition empty$
+ { "" }
+ { output.state mid.sentence =
+ { edition "l" change.case$ fr.edition * }
+ { edition "t" change.case$ fr.edition * }
+ if$
+ }
+ if$
+}
+
+INTEGERS { multiresult }
+
+FUNCTION {multi.page.check}
+{ 't :=
+ #0 'multiresult :=
+ { multiresult not
+ t empty$ not
+ and
+ }
+ { t #1 #1 substring$
+ duplicate$ "-" =
+ swap$ duplicate$ "," =
+ swap$ "+" =
+ or or
+ { #1 'multiresult := }
+ { t #2 global.max$ substring$ 't := }
+ if$
+ }
+ while$
+ multiresult
+}
+
+FUNCTION {format.pages}
+{ pages empty$
+ { "" }
+ { pages multi.page.check
+ { fr.pages pages n.dashify tie.or.space.connect }
+ { fr.page pages tie.or.space.connect }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.vol.num.pages}
+{ volume field.or.null
+ number empty$
+ 'skip$
+ { "\penalty0 (" number * ")" * *
+ volume empty$
+ { "there's a number but no volume in " cite$ * warning$ }
+ 'skip$
+ if$
+ }
+ if$
+ pages empty$
+ 'skip$
+ { duplicate$ empty$
+ { pop$ format.pages }
+ { fr.deuxpoints * pages n.dashify * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.chapter.pages}
+{ chapter empty$
+ 'format.pages
+ { type empty$
+ { fr.chapter }
+ { type "l" change.case$ }
+ if$
+ chapter tie.or.space.connect
+ pages empty$
+ 'skip$
+ { ", " * format.pages * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.in.ed.booktitle}
+{ booktitle empty$
+ { "" }
+ { editor empty$
+ { fr.in booktitle emphasize * }
+ { fr.in format.editors #1 'after.authors := fr.add.period " " * * booktitle emphasize * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {empty.misc.check}
+{ author empty$ title empty$ howpublished empty$
+ month empty$ year empty$ note empty$
+ and and and and and
+ key empty$ not and
+ { "all relevant fields are empty in " cite$ * warning$ }
+ 'skip$
+ if$
+}
+
+FUNCTION {format.thesis.type}
+{ type empty$
+ 'skip$
+ { pop$
+ type "t" change.case$
+ }
+ if$
+}
+
+FUNCTION {format.tr.number}
+{ type empty$
+ { fr.tech.rep }
+ 'type
+ if$
+ number empty$
+ { "t" change.case$ }
+ { number tie.or.space.connect }
+ if$
+}
+
+FUNCTION {format.article.crossref}
+{ key empty$
+ { journal empty$
+ { "need key or journal for " cite$ * " to crossref " * crossref *
+ warning$
+ ""
+ }
+ { fr.in "{\em " * journal * "\/}" * }
+ if$
+ }
+ { fr.in key * }
+ if$
+ " \citep{" * crossref * "}" *
+}
+
+FUNCTION {format.book.crossref}
+{ volume empty$
+ { "empty volume in " cite$ * "'s crossref of " * crossref * warning$
+ fr.in
+ }
+ { fr.volume.maj volume tie.or.space.connect
+ fr.of *
+ }
+ if$
+ editor empty$
+ editor field.or.null author field.or.null =
+ or
+ { key empty$
+ { series empty$
+ { "need editor, key, or series for " cite$ * " to crossref " *
+ crossref * warning$
+ "" *
+ }
+ { "{\em " * series * "\/}" * }
+ if$
+ }
+ { key * }
+ if$
+ }
+ 'skip$
+ if$
+ ", \citet{" * crossref * "}" *
+}
+
+FUNCTION {format.incoll.inproc.crossref}
+{ editor empty$
+ editor field.or.null author field.or.null =
+ or
+ { key empty$
+ { booktitle empty$
+ { "need editor, key, or booktitle for " cite$ * " to crossref " *
+ crossref * warning$
+ ""
+ }
+ { fr.in "{\em " * booktitle * "\/}" * }
+ if$
+ }
+ { fr.in key * }
+ if$
+ }
+ { fr.in }
+ if$
+ " \citet{" * crossref * "}" *
+}
+
+FUNCTION {article}
+{ output.bibitem
+ format.authors "author" output.check
+ author format.key output
+ new.block
+ format.title "title" output.check
+ new.block
+ crossref missing$
+ { journal emphasize "journal" output.check
+ format.vol.num.pages output
+ format.date "year" output.check
+ }
+ { format.article.crossref output.nonnull
+ format.pages output
+ }
+ if$
+ format.issn output
+ format.url output
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {book}
+{ output.bibitem
+ author empty$
+ { format.editors "author and editor" output.check
+ editor format.key output
+ }
+ { format.authors output.nonnull
+ crossref missing$
+ { "author and editor" editor either.or.check }
+ 'skip$
+ if$
+ }
+ if$
+ new.block
+ format.btitle "title" output.check
+ crossref missing$
+ { format.bvolume output
+ new.block
+ format.number.series output
+ new.sentence
+ publisher "publisher" output.check
+ address output
+ }
+ { new.block
+ format.book.crossref output.nonnull
+ }
+ if$
+ format.edition output
+ format.date "year" output.check
+ format.isbn output
+ format.url output
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {booklet}
+{ output.bibitem
+ format.authors output
+ author format.key output
+ new.block
+ format.title "title" output.check
+ howpublished address new.block.checkb
+ howpublished output
+ address output
+ format.date output
+ format.isbn output
+ format.url output
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {inbook}
+{ output.bibitem
+ author empty$
+ { format.editors "author and editor" output.check
+ editor format.key output
+ }
+ { format.authors output.nonnull
+ crossref missing$
+ { "author and editor" editor either.or.check }
+ 'skip$
+ if$
+ }
+ if$
+ new.block
+ format.btitle "title" output.check
+ crossref missing$
+ { format.bvolume output
+ format.chapter.pages "chapter and pages" output.check
+ new.block
+ format.number.series output
+ new.sentence
+ publisher "publisher" output.check
+ address output
+ }
+ { format.chapter.pages "chapter and pages" output.check
+ new.block
+ format.book.crossref output.nonnull
+ }
+ if$
+ format.edition output
+ format.date "year" output.check
+ format.isbn output
+ format.url output
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {incollection}
+{ output.bibitem
+ format.authors "author" output.check
+ author format.key output
+ new.block
+ format.title "title" output.check
+ new.block
+ crossref missing$
+ { format.in.ed.booktitle "booktitle" output.check
+ format.bvolume output
+ format.number.series output
+ format.chapter.pages output
+ new.sentence
+ publisher "publisher" output.check
+ address output
+ format.edition output
+ format.date "year" output.check
+ }
+ { format.incoll.inproc.crossref output.nonnull
+ format.chapter.pages output
+ }
+ if$
+ format.isbn output
+ format.url output
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {inproceedings}
+{ output.bibitem
+ format.authors "author" output.check
+ author format.key output
+ new.block
+ format.title "title" output.check
+ new.block
+ crossref missing$
+ { format.in.ed.booktitle "booktitle" output.check
+ format.bvolume output
+ format.number.series output
+ format.pages output
+ address empty$
+ { organization publisher new.sentence.checkb
+ organization output
+ publisher output
+ format.date "year" output.check
+ }
+ { address output.nonnull
+ format.date "year" output.check
+ new.sentence
+ organization output
+ publisher output
+ }
+ if$
+ }
+ { format.incoll.inproc.crossref output.nonnull
+ format.pages output
+ }
+ if$
+ format.isbn output
+ format.url output
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {conference} { inproceedings }
+
+FUNCTION {manual}
+{ output.bibitem
+ format.authors output
+ author format.key output
+ new.block
+ format.btitle "title" output.check
+ organization address new.block.checkb
+ organization output
+ address output
+ format.edition output
+ format.date output
+ format.url output
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {mastersthesis}
+{ output.bibitem
+ format.authors "author" output.check
+ author format.key output
+ new.block
+ format.title "title" output.check
+ new.block
+ fr.master format.thesis.type output.nonnull
+ school "school" output.check
+ address output
+ format.date "year" output.check
+ format.url output
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {misc}
+{ output.bibitem
+ format.authors output
+ author format.key output
+ title howpublished new.block.checkb
+ format.title output
+ howpublished new.block.checka
+ howpublished output
+ format.date output
+ format.issn output
+ format.url output
+ new.block
+ note output
+ fin.entry
+ empty.misc.check
+}
+
+FUNCTION {phdthesis}
+{ output.bibitem
+ format.authors "author" output.check
+ author format.key output
+ new.block
+ format.btitle "title" output.check
+ new.block
+ fr.phd format.thesis.type output.nonnull
+ school "school" output.check
+ address output
+ format.date "year" output.check
+ format.url output
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {proceedings}
+{ output.bibitem
+ format.editors output
+ editor format.key output
+ new.block
+ format.btitle "title" output.check
+ format.bvolume output
+ format.number.series output
+ address output
+ format.date "year" output.check
+ new.sentence
+ organization output
+ publisher output
+ format.isbn output
+ format.url output
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {techreport}
+{ output.bibitem
+ format.authors "author" output.check
+ author format.key output
+ new.block
+ format.title "title" output.check
+ new.block
+ format.tr.number output.nonnull
+ institution "institution" output.check
+ address output
+ format.date "year" output.check
+ format.url output
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {unpublished}
+{ output.bibitem
+ format.authors "author" output.check
+ author format.key output
+ new.block
+ format.title "title" output.check
+ format.url output
+ new.block
+ note "note" output.check
+ format.date output
+ fin.entry
+}
+
+FUNCTION {default.type} { misc }
+
+MACRO {acmcs} {"ACM Computing Surveys"}
+MACRO {acta} {"Acta Informatica"}
+MACRO {cacm} {"Communications of the ACM"}
+MACRO {ibmjrd} {"IBM Journal of Research and Development"}
+MACRO {ibmsj} {"IBM Systems Journal"}
+MACRO {ieeese} {"IEEE Transactions on Software Engineering"}
+MACRO {ieeetc} {"IEEE Transactions on Computers"}
+MACRO {ieeetcad} {"IEEE Transactions on Computer-Aided Design of Integrated Circuits"}
+MACRO {ipl} {"Information Processing Letters"}
+MACRO {jacm} {"Journal of the ACM"}
+MACRO {jcss} {"Journal of Computer and System Sciences"}
+MACRO {scp} {"Science of Computer Programming"}
+MACRO {sicomp} {"SIAM Journal on Computing"}
+MACRO {tocs} {"ACM Transactions on Computer Systems"}
+MACRO {tods} {"ACM Transactions on Database Systems"}
+MACRO {tog} {"ACM Transactions on Graphics"}
+MACRO {toms} {"ACM Transactions on Mathematical Software"}
+MACRO {toois} {"ACM Transactions on Office Information Systems"}
+MACRO {toplas} {"ACM Transactions on Programming Languages and Systems"}
+MACRO {tcs} {"Theoretical Computer Science"}
+
+
+READ
+
+FUNCTION {sortify}
+{ purify$
+ "l" change.case$
+}
+
+INTEGERS { len }
+
+FUNCTION {chop.word}
+{ 's :=
+ 'len :=
+ s #1 len substring$ =
+ { s len #1 + global.max$ substring$ }
+ 's
+ if$
+}
+
+FUNCTION {format.lab.names}
+%
+% Ici, on laisse les noms en minuscules, on ne les mets pas
+% en small caps.
+%
+{ 's :=
+ s #1 "{vv~}{ll}" format.name$
+ s num.names$ duplicate$
+ #2 >
+ { pop$ fr.et.al * }
+ { #2 <
+ 'skip$
+ { s #2 "{ff }{vv }{ll}{ jj}" format.name$ "others" =
+ { fr.et.al * }
+ { fr.and * s #2 "{vv~}{ll}" format.name$ * }
+ if$
+ }
+ if$
+ }
+ if$
+}
+
+FUNCTION {author.key.label}
+{ author empty$
+ { key empty$
+ { cite$ #1 #3 substring$ }
+ 'key
+ if$
+ }
+ { author format.lab.names }
+ if$
+}
+
+FUNCTION {author.editor.key.label}
+{ author empty$
+ { editor empty$
+ { key empty$
+ { cite$ #1 #3 substring$ }
+ 'key
+ if$
+ }
+ { editor format.lab.names }
+ if$
+ }
+ { author format.lab.names }
+ if$
+}
+
+FUNCTION {author.key.organization.label}
+{ author empty$
+ { key empty$
+ { organization empty$
+ { cite$ #1 #3 substring$ }
+ { "Le " #3
+ "La " #3
+ "Les " #4
+ "The " #4 organization chop.word
+ chop.word
+ chop.word
+ chop.word
+ #3 text.prefix$ }
+ if$
+ }
+ 'key
+ if$
+ }
+ { author format.lab.names }
+ if$
+}
+
+FUNCTION {editor.key.organization.label}
+{ editor empty$
+ { key empty$
+ { organization empty$
+ { cite$ #1 #3 substring$ }
+ { "Le " #3
+ "La " #3
+ "Les " #4
+ "The " #4 organization chop.word
+ chop.word
+ chop.word
+ chop.word
+ #3 text.prefix$ }
+ if$
+ }
+ 'key
+ if$
+ }
+ { editor format.lab.names }
+ if$
+}
+
+FUNCTION {calc.short.authors}
+{ type$ "book" =
+ type$ "inbook" =
+ or
+ 'author.editor.key.label
+ { type$ "proceedings" =
+ 'editor.key.organization.label
+ { type$ "manual" =
+ 'author.key.organization.label
+ 'author.key.label
+ if$
+ }
+ if$
+ }
+ if$
+ 'short.list :=
+}
+
+FUNCTION {calc.label}
+{ calc.short.authors
+ short.list
+ "("
+ *
+ year duplicate$ empty$
+ short.list key field.or.null = or
+ { pop$ "" }
+ 'skip$
+ if$
+ *
+ 'label :=
+}
+
+FUNCTION {sort.format.names}
+{ 's :=
+ #1 'nameptr :=
+ ""
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ { nameptr #1 >
+ { " " * }
+ 'skip$
+ if$
+ s nameptr "{vv{ } }{ll{ }}{ ff{ }}{ jj{ }}" format.name$ 't :=
+ nameptr numnames = t "others" = and
+ { fr.et.al * } %% sera "purify"e ensuite...
+ { t sortify * }
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+}
+
+FUNCTION {sort.format.title}
+{ 't :=
+ "Un " #3
+ "Une " #4
+ "Des " #4
+ "Le " #3
+ "La " #3
+ "Les " #4
+ "A " #2
+ "An " #3
+ "The " #4 t chop.word
+ chop.word
+ chop.word
+ chop.word
+ chop.word
+ chop.word
+ chop.word
+ chop.word
+ chop.word
+ sortify
+ #1 global.max$ substring$
+}
+
+FUNCTION {author.sort}
+{ author empty$
+ { key empty$
+ { "to sort, need author or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { author sort.format.names }
+ if$
+}
+
+FUNCTION {author.editor.sort}
+{ author empty$
+ { editor empty$
+ { key empty$
+ { "to sort, need author, editor, or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { editor sort.format.names }
+ if$
+ }
+ { author sort.format.names }
+ if$
+}
+
+FUNCTION {author.organization.sort}
+{ author empty$
+ { organization empty$
+ { key empty$
+ { "to sort, need author, organization, or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { "Le " #3
+ "La " #3
+ "Les " #4
+ "The " #4 organization chop.word
+ chop.word
+ chop.word
+ chop.word
+ sortify }
+ if$
+ }
+ { author sort.format.names }
+ if$
+}
+
+FUNCTION {editor.organization.sort}
+{ editor empty$
+ { organization empty$
+ { key empty$
+ { "to sort, need editor, organization, or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { "Le " #3
+ "La " #3
+ "Les " #4
+ "The " #4 organization chop.word
+ chop.word
+ chop.word
+ chop.word
+ sortify }
+ if$
+ }
+ { editor sort.format.names }
+ if$
+}
+
+INTEGERS { seq.num }
+
+FUNCTION {init.seq}
+{ #0 'seq.num :=}
+
+EXECUTE {init.seq}
+
+FUNCTION {int.to.fix}
+{
+ "000000000" swap$ int.to.str$ *
+ #-1 #10 substring$
+}
+
+
+FUNCTION {presort}
+{ calc.label
+ label sortify
+ " "
+ *
+ seq.num #1 + 'seq.num :=
+ seq.num int.to.fix
+ 'sort.label :=
+ sort.label *
+ #1 entry.max$ substring$
+ 'sort.key$ :=
+}
+
+ITERATE {presort}
+
+SORT
+
+STRINGS { longest.label last.label next.extra }
+
+INTEGERS { longest.label.width last.extra.num number.label }
+
+FUNCTION {initialize.longest.label}
+{ "" 'longest.label :=
+ #0 int.to.chr$ 'last.label :=
+ "" 'next.extra :=
+ #0 'longest.label.width :=
+ #0 'last.extra.num :=
+ #0 'number.label :=
+}
+
+FUNCTION {forward.pass}
+{ last.label label =
+ { last.extra.num #1 + 'last.extra.num :=
+ last.extra.num int.to.chr$ 'extra.label :=
+ }
+ { "a" chr.to.int$ 'last.extra.num :=
+ "" 'extra.label :=
+ label 'last.label :=
+ }
+ if$
+ number.label #1 + 'number.label :=
+}
+
+FUNCTION {reverse.pass}
+{ next.extra "b" =
+ { "a" 'extra.label := }
+ 'skip$
+ if$
+ extra.label 'next.extra :=
+ extra.label
+ duplicate$ empty$
+ 'skip$
+ { "{\natexlab{" swap$ * "}}" * }
+ if$
+ 'extra.label :=
+ label extra.label * 'label :=
+}
+
+EXECUTE {initialize.longest.label}
+
+ITERATE {forward.pass}
+
+REVERSE {reverse.pass}
+
+FUNCTION {bib.sort.order}
+{ sort.label 'sort.key$ :=
+}
+
+ITERATE {bib.sort.order}
+
+SORT
+
+FUNCTION {begin.bib}
+{ preamble$ empty$
+ 'skip$
+ { preamble$ write$ newline$ }
+ if$
+ "\begin{thebibliography}{" number.label int.to.str$ * "}" *
+ write$ newline$
+ "\expandafter\ifx\csname natexlab\endcsname\relax\def\natexlab#1{#1}\fi"
+ write$ newline$
+ "\expandafter\ifx\csname fonteauteurs\endcsname\relax"
+ write$ newline$
+ "\def\fonteauteurs{" fr.auteurs.style * "}\fi" * write$ newline$
+ "\expandafter\ifx\csname url\endcsname\relax" write$ newline$
+ " \def\url#1{{\tt #1}}% " write$ newline$
+ " \message{You should include the url package}\fi" write$ newline$
+}
+
+EXECUTE {begin.bib}
+
+EXECUTE {init.state.consts}
+
+ITERATE {call.type$}
+
+FUNCTION {end.bib}
+{ newline$
+ "\end{thebibliography}" write$ newline$
+}
+
+EXECUTE {end.bib}
diff --git a/biblio/bibtex/contrib/bibhtml/LICENCE b/biblio/bibtex/contrib/bibhtml/LICENCE
new file mode 100644
index 0000000000..3912109b5c
--- /dev/null
+++ b/biblio/bibtex/contrib/bibhtml/LICENCE
@@ -0,0 +1,340 @@
+ GNU GENERAL PUBLIC LICENSE
+ Version 2, June 1991
+
+ Copyright (C) 1989, 1991 Free Software Foundation, Inc.
+ 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+ Preamble
+
+ The licenses for most software are designed to take away your
+freedom to share and change it. By contrast, the GNU General Public
+License is intended to guarantee your freedom to share and change free
+software--to make sure the software is free for all its users. This
+General Public License applies to most of the Free Software
+Foundation's software and to any other program whose authors commit to
+using it. (Some other Free Software Foundation software is covered by
+the GNU Library General Public License instead.) You can apply it to
+your programs, too.
+
+ When we speak of free software, we are referring to freedom, not
+price. Our General Public Licenses are designed to make sure that you
+have the freedom to distribute copies of free software (and charge for
+this service if you wish), that you receive source code or can get it
+if you want it, that you can change the software or use pieces of it
+in new free programs; and that you know you can do these things.
+
+ To protect your rights, we need to make restrictions that forbid
+anyone to deny you these rights or to ask you to surrender the rights.
+These restrictions translate to certain responsibilities for you if you
+distribute copies of the software, or if you modify it.
+
+ For example, if you distribute copies of such a program, whether
+gratis or for a fee, you must give the recipients all the rights that
+you have. You must make sure that they, too, receive or can get the
+source code. And you must show them these terms so they know their
+rights.
+
+ We protect your rights with two steps: (1) copyright the software, and
+(2) offer you this license which gives you legal permission to copy,
+distribute and/or modify the software.
+
+ Also, for each author's protection and ours, we want to make certain
+that everyone understands that there is no warranty for this free
+software. If the software is modified by someone else and passed on, we
+want its recipients to know that what they have is not the original, so
+that any problems introduced by others will not reflect on the original
+authors' reputations.
+
+ Finally, any free program is threatened constantly by software
+patents. We wish to avoid the danger that redistributors of a free
+program will individually obtain patent licenses, in effect making the
+program proprietary. To prevent this, we have made it clear that any
+patent must be licensed for everyone's free use or not licensed at all.
+
+ The precise terms and conditions for copying, distribution and
+modification follow.
+
+ GNU GENERAL PUBLIC LICENSE
+ TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
+
+ 0. This License applies to any program or other work which contains
+a notice placed by the copyright holder saying it may be distributed
+under the terms of this General Public License. The "Program", below,
+refers to any such program or work, and a "work based on the Program"
+means either the Program or any derivative work under copyright law:
+that is to say, a work containing the Program or a portion of it,
+either verbatim or with modifications and/or translated into another
+language. (Hereinafter, translation is included without limitation in
+the term "modification".) Each licensee is addressed as "you".
+
+Activities other than copying, distribution and modification are not
+covered by this License; they are outside its scope. The act of
+running the Program is not restricted, and the output from the Program
+is covered only if its contents constitute a work based on the
+Program (independent of having been made by running the Program).
+Whether that is true depends on what the Program does.
+
+ 1. You may copy and distribute verbatim copies of the Program's
+source code as you receive it, in any medium, provided that you
+conspicuously and appropriately publish on each copy an appropriate
+copyright notice and disclaimer of warranty; keep intact all the
+notices that refer to this License and to the absence of any warranty;
+and give any other recipients of the Program a copy of this License
+along with the Program.
+
+You may charge a fee for the physical act of transferring a copy, and
+you may at your option offer warranty protection in exchange for a fee.
+
+ 2. You may modify your copy or copies of the Program or any portion
+of it, thus forming a work based on the Program, and copy and
+distribute such modifications or work under the terms of Section 1
+above, provided that you also meet all of these conditions:
+
+ a) You must cause the modified files to carry prominent notices
+ stating that you changed the files and the date of any change.
+
+ b) You must cause any work that you distribute or publish, that in
+ whole or in part contains or is derived from the Program or any
+ part thereof, to be licensed as a whole at no charge to all third
+ parties under the terms of this License.
+
+ c) If the modified program normally reads commands interactively
+ when run, you must cause it, when started running for such
+ interactive use in the most ordinary way, to print or display an
+ announcement including an appropriate copyright notice and a
+ notice that there is no warranty (or else, saying that you provide
+ a warranty) and that users may redistribute the program under
+ these conditions, and telling the user how to view a copy of this
+ License. (Exception: if the Program itself is interactive but
+ does not normally print such an announcement, your work based on
+ the Program is not required to print an announcement.)
+
+These requirements apply to the modified work as a whole. If
+identifiable sections of that work are not derived from the Program,
+and can be reasonably considered independent and separate works in
+themselves, then this License, and its terms, do not apply to those
+sections when you distribute them as separate works. But when you
+distribute the same sections as part of a whole which is a work based
+on the Program, the distribution of the whole must be on the terms of
+this License, whose permissions for other licensees extend to the
+entire whole, and thus to each and every part regardless of who wrote it.
+
+Thus, it is not the intent of this section to claim rights or contest
+your rights to work written entirely by you; rather, the intent is to
+exercise the right to control the distribution of derivative or
+collective works based on the Program.
+
+In addition, mere aggregation of another work not based on the Program
+with the Program (or with a work based on the Program) on a volume of
+a storage or distribution medium does not bring the other work under
+the scope of this License.
+
+ 3. You may copy and distribute the Program (or a work based on it,
+under Section 2) in object code or executable form under the terms of
+Sections 1 and 2 above provided that you also do one of the following:
+
+ a) Accompany it with the complete corresponding machine-readable
+ source code, which must be distributed under the terms of Sections
+ 1 and 2 above on a medium customarily used for software interchange; or,
+
+ b) Accompany it with a written offer, valid for at least three
+ years, to give any third party, for a charge no more than your
+ cost of physically performing source distribution, a complete
+ machine-readable copy of the corresponding source code, to be
+ distributed under the terms of Sections 1 and 2 above on a medium
+ customarily used for software interchange; or,
+
+ c) Accompany it with the information you received as to the offer
+ to distribute corresponding source code. (This alternative is
+ allowed only for noncommercial distribution and only if you
+ received the program in object code or executable form with such
+ an offer, in accord with Subsection b above.)
+
+The source code for a work means the preferred form of the work for
+making modifications to it. For an executable work, complete source
+code means all the source code for all modules it contains, plus any
+associated interface definition files, plus the scripts used to
+control compilation and installation of the executable. However, as a
+special exception, the source code distributed need not include
+anything that is normally distributed (in either source or binary
+form) with the major components (compiler, kernel, and so on) of the
+operating system on which the executable runs, unless that component
+itself accompanies the executable.
+
+If distribution of executable or object code is made by offering
+access to copy from a designated place, then offering equivalent
+access to copy the source code from the same place counts as
+distribution of the source code, even though third parties are not
+compelled to copy the source along with the object code.
+
+ 4. You may not copy, modify, sublicense, or distribute the Program
+except as expressly provided under this License. Any attempt
+otherwise to copy, modify, sublicense or distribute the Program is
+void, and will automatically terminate your rights under this License.
+However, parties who have received copies, or rights, from you under
+this License will not have their licenses terminated so long as such
+parties remain in full compliance.
+
+ 5. You are not required to accept this License, since you have not
+signed it. However, nothing else grants you permission to modify or
+distribute the Program or its derivative works. These actions are
+prohibited by law if you do not accept this License. Therefore, by
+modifying or distributing the Program (or any work based on the
+Program), you indicate your acceptance of this License to do so, and
+all its terms and conditions for copying, distributing or modifying
+the Program or works based on it.
+
+ 6. Each time you redistribute the Program (or any work based on the
+Program), the recipient automatically receives a license from the
+original licensor to copy, distribute or modify the Program subject to
+these terms and conditions. You may not impose any further
+restrictions on the recipients' exercise of the rights granted herein.
+You are not responsible for enforcing compliance by third parties to
+this License.
+
+ 7. If, as a consequence of a court judgment or allegation of patent
+infringement or for any other reason (not limited to patent issues),
+conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License. If you cannot
+distribute so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you
+may not distribute the Program at all. For example, if a patent
+license would not permit royalty-free redistribution of the Program by
+all those who receive copies directly or indirectly through you, then
+the only way you could satisfy both it and this License would be to
+refrain entirely from distribution of the Program.
+
+If any portion of this section is held invalid or unenforceable under
+any particular circumstance, the balance of the section is intended to
+apply and the section as a whole is intended to apply in other
+circumstances.
+
+It is not the purpose of this section to induce you to infringe any
+patents or other property right claims or to contest validity of any
+such claims; this section has the sole purpose of protecting the
+integrity of the free software distribution system, which is
+implemented by public license practices. Many people have made
+generous contributions to the wide range of software distributed
+through that system in reliance on consistent application of that
+system; it is up to the author/donor to decide if he or she is willing
+to distribute software through any other system and a licensee cannot
+impose that choice.
+
+This section is intended to make thoroughly clear what is believed to
+be a consequence of the rest of this License.
+
+ 8. If the distribution and/or use of the Program is restricted in
+certain countries either by patents or by copyrighted interfaces, the
+original copyright holder who places the Program under this License
+may add an explicit geographical distribution limitation excluding
+those countries, so that distribution is permitted only in or among
+countries not thus excluded. In such case, this License incorporates
+the limitation as if written in the body of this License.
+
+ 9. The Free Software Foundation may publish revised and/or new versions
+of the General Public License from time to time. Such new versions will
+be similar in spirit to the present version, but may differ in detail to
+address new problems or concerns.
+
+Each version is given a distinguishing version number. If the Program
+specifies a version number of this License which applies to it and "any
+later version", you have the option of following the terms and conditions
+either of that version or of any later version published by the Free
+Software Foundation. If the Program does not specify a version number of
+this License, you may choose any version ever published by the Free Software
+Foundation.
+
+ 10. If you wish to incorporate parts of the Program into other free
+programs whose distribution conditions are different, write to the author
+to ask for permission. For software which is copyrighted by the Free
+Software Foundation, write to the Free Software Foundation; we sometimes
+make exceptions for this. Our decision will be guided by the two goals
+of preserving the free status of all derivatives of our free software and
+of promoting the sharing and reuse of software generally.
+
+ NO WARRANTY
+
+ 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
+FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
+OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
+PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
+OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
+TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
+PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
+REPAIR OR CORRECTION.
+
+ 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
+WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
+REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
+INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
+OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
+TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
+YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
+PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
+POSSIBILITY OF SUCH DAMAGES.
+
+ END OF TERMS AND CONDITIONS
+
+ How to Apply These Terms to Your New Programs
+
+ If you develop a new program, and you want it to be of the greatest
+possible use to the public, the best way to achieve this is to make it
+free software which everyone can redistribute and change under these terms.
+
+ To do so, attach the following notices to the program. It is safest
+to attach them to the start of each source file to most effectively
+convey the exclusion of warranty; and each file should have at least
+the "copyright" line and a pointer to where the full notice is found.
+
+ <one line to give the program's name and a brief idea of what it does.>
+ Copyright (C) <year> <name of author>
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+
+
+Also add information on how to contact you by electronic and paper mail.
+
+If the program is interactive, make it output a short notice like this
+when it starts in an interactive mode:
+
+ Gnomovision version 69, Copyright (C) year name of author
+ Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
+ This is free software, and you are welcome to redistribute it
+ under certain conditions; type `show c' for details.
+
+The hypothetical commands `show w' and `show c' should show the appropriate
+parts of the General Public License. Of course, the commands you use may
+be called something other than `show w' and `show c'; they could even be
+mouse-clicks or menu items--whatever suits your program.
+
+You should also get your employer (if you work as a programmer) or your
+school, if any, to sign a "copyright disclaimer" for the program, if
+necessary. Here is a sample; alter the names:
+
+ Yoyodyne, Inc., hereby disclaims all copyright interest in the program
+ `Gnomovision' (which makes passes at compilers) written by James Hacker.
+
+ <signature of Ty Coon>, 1 April 1989
+ Ty Coon, President of Vice
+
+This General Public License does not permit incorporating your program into
+proprietary programs. If your program is a subroutine library, you may
+consider it more useful to permit linking proprietary applications with the
+library. If this is what you want to do, use the GNU Library General
+Public License instead of this License.
diff --git a/biblio/bibtex/contrib/bibhtml/README b/biblio/bibtex/contrib/bibhtml/README
new file mode 100644
index 0000000000..ff0f77f9a9
--- /dev/null
+++ b/biblio/bibtex/contrib/bibhtml/README
@@ -0,0 +1,18 @@
+Bibhtml consists of a set of BibTeX style files, which allow you to
+use BibTeX to produce bibliographies in HTML. These are modelled
+closely on the standard BibTeX style files, paired so that
+plainhtml.bst is derived from plain.bst.
+
+To accompany them, this package includes a pair of XSLT scripts which
+illustrate how you might integrate these generated bibliographies into
+an XML/HTML workflow.
+
+The long-term URL for this package is http://purl.org/nxg/dist/bibhtml
+
+The code is available at <https://bitbucket.org/nxg/bibhtml>,
+where you can find an issues list.
+
+This distribution contains bibhtml version 2.0.2, released 2013 September 8.
+
+
+Norman Gray, http://nxg.me.uk
diff --git a/biblio/bibtex/contrib/bibhtml/abbrvhtml.bst b/biblio/bibtex/contrib/bibhtml/abbrvhtml.bst
new file mode 100644
index 0000000000..e434775bd8
--- /dev/null
+++ b/biblio/bibtex/contrib/bibhtml/abbrvhtml.bst
@@ -0,0 +1,1402 @@
+%% abbrvhtml.bst
+%%
+%% Part of bibhtml, version 2.0.2, released 2013 September 8
+%% Hg node 7076ce83a035.
+%% See <http://purl.org/nxg/dist/bibhtml>
+%%
+%% Copyright 1999, 2005, 2006, 2009, Norman Gray <norman@astro.gla.ac.uk>
+%%
+%% This is a modification of a modification!
+%%
+%%% Modification of BibTeX style file /usr/local/texlive/2008/texmf-dist/bibtex/bst/base/abbrv.bst
+%%% ... by urlbst, version 0.6-4 (marked with "% urlbst")
+%%% See <http://purl.org/nxg/dist/urlbst>
+%%% Added webpage entry type, and url and lastchecked fields.
+%%% Added eprint support.
+%%% Added DOI support.
+%%% Added PUBMED support.
+%%% Added hyperref support.
+%%% Original headers follow...
+
+% BibTeX standard bibliography style `abbrv'
+ % version 0.99a for BibTeX versions 0.99a or later, LaTeX version 2.09.
+ % Copyright (C) 1985, all rights reserved.
+ % Copying of this file is authorized only if either
+ % (1) you make absolutely no changes to your copy, including name, or
+ % (2) if you do make changes, you name it something other than
+ % btxbst.doc, plain.bst, unsrt.bst, alpha.bst, and abbrv.bst.
+ % This restriction helps ensure that all standard styles are identical.
+ % The file btxbst.doc has the documentation for this style.
+
+ENTRY
+ { address
+ author
+ booktitle
+ chapter
+ edition
+ editor
+ howpublished
+ institution
+ journal
+ key
+ month
+ note
+ number
+ organization
+ pages
+ publisher
+ school
+ series
+ title
+ type
+ volume
+ year
+ eprint % urlbst
+ doi % urlbst
+ pubmed % urlbst
+ url % urlbst
+ lastchecked % urlbst
+ }
+ {}
+ { label }
+
+INTEGERS { output.state before.all mid.sentence after.sentence after.block doiform }
+
+STRINGS { urlintro eprinturl eprintprefix doiprefix doiurl pubmedprefix pubmedurl openinlinelink closeinlinelink } % urlbst...
+INTEGERS { inlinelinks makeinlinelink addeprints adddoiresolver addpubmedresolver }
+% Following constants may be adjusted by hand, if desired
+FUNCTION {init.urlbst.variables}
+{
+ "Available from: " 'urlintro := % prefix before URL
+ "http://arxiv.org/abs/" 'eprinturl := % prefix to make URL from eprint ref
+ "arXiv:" 'eprintprefix := % text prefix printed before eprint ref
+ "http://dx.doi.org/" 'doiurl := % prefix to make URL from DOI
+ "doi:" 'doiprefix := % text prefix printed before DOI ref
+ "http://www.ncbi.nlm.nih.gov/pubmed/" 'pubmedurl := % prefix to make URL from PUBMED
+ "PMID:" 'pubmedprefix := % text prefix printed before PUBMED ref
+ #1 'addeprints := % 0=no eprints; 1=include eprints
+ #1 'adddoiresolver := % 0=no DOI resolver; 1=include it
+ #1 'addpubmedresolver := % 0=no PUBMED resolver; 1=include it
+ #1 'inlinelinks := % 0=URLs explicit; 1=URLs attached to titles
+ #1 'doiform := % 0=simple, but can produce invalid HTML; 1=needs post-processing
+ % the following are internal state variables, not config constants
+ #0 'makeinlinelink := % state variable managed by possibly.setup.inlinelink
+ "" 'openinlinelink := % ditto
+ "" 'closeinlinelink := % ditto
+}
+INTEGERS {
+ bracket.state
+ outside.brackets
+ open.brackets
+ within.brackets
+ close.brackets
+ close.first.block
+}
+% ...urlbst to here
+FUNCTION {init.state.consts}
+{ #0 'outside.brackets := % urlbst
+ #1 'open.brackets :=
+ #2 'within.brackets :=
+ #3 'close.brackets :=
+
+ #0 'before.all :=
+ #1 'mid.sentence :=
+ #2 'after.sentence :=
+ #3 'after.block :=
+ #0 'close.first.block :=
+}
+
+STRINGS { s t }
+
+% urlbst
+FUNCTION {output.nonnull.original}
+{ 's :=
+ output.state mid.sentence =
+ { ", " * write$ }
+ { output.state after.block =
+ { add.period$ write$
+ % close the <dt> after the end of the first block
+ close.first.block
+ { "</a></dt>" write$ newline$ "<dd>" write$
+ #0 'close.first.block := }
+ { newline$ }
+ if$
+ }
+ { output.state before.all =
+ 'write$
+ { add.period$ " " * write$ }
+ if$
+ }
+ if$
+ mid.sentence 'output.state :=
+ }
+ if$
+ s
+}
+
+% urlbst...
+% The following three functions are for handling inlinelink. They wrap
+% a block of text which is potentially output with write$ by multiple
+% other functions, so we don't know the content a priori.
+% They communicate between each other using the variables makeinlinelink
+% (which is true if a link should be made), and closeinlinelink (which holds
+% the string which should close any current link. They can be called
+% at any time, but start.inlinelink will be a no-op unless something has
+% previously set makeinlinelink true, and the two ...end.inlinelink functions
+% will only do their stuff if start.inlinelink has previously set
+% closeinlinelink to be non-empty.
+FUNCTION {possibly.setup.inlinelink}
+{ makeinlinelink
+ { "<a href=" quote$ * url * quote$ * ">" * 'openinlinelink :=
+ "</a>" 'closeinlinelink :=
+ #0 'makeinlinelink := }
+ 'skip$
+ if$ % makeinlinelink
+}
+FUNCTION {add.inlinelink}
+{ openinlinelink empty$
+ 'skip$
+ { openinlinelink swap$ * closeinlinelink *
+ "" 'openinlinelink :=
+ }
+ if$
+}
+FUNCTION {output.nonnull}
+{ % Save the thing we've been asked to output
+ 's :=
+ % If the bracket-state is close.brackets, then add a close-bracket to
+ % what is currently at the top of the stack, and set bracket.state
+ % to outside.brackets
+ bracket.state close.brackets =
+ { "]" *
+ outside.brackets 'bracket.state :=
+ }
+ 'skip$
+ if$
+ bracket.state outside.brackets =
+ { % We're outside all brackets -- this is the normal situation.
+ % Write out what's currently at the top of the stack, using the
+ % original output.nonnull function.
+ s
+ add.inlinelink
+ output.nonnull.original % invoke the original output.nonnull
+ }
+ { % Still in brackets. Add open-bracket or (continuation) comma, add the
+ % new text (in s) to the top of the stack, and move to the close-brackets
+ % state, ready for next time (unless inbrackets resets it). If we come
+ % into this branch, then output.state is carefully undisturbed.
+ bracket.state open.brackets =
+ { " [" * }
+ { ", " * } % bracket.state will be within.brackets
+ if$
+ s *
+ close.brackets 'bracket.state :=
+ }
+ if$
+}
+
+% Call this function just before adding something which should be presented in
+% brackets. bracket.state is handled specially within output.nonnull.
+FUNCTION {inbrackets}
+{ bracket.state close.brackets =
+ { within.brackets 'bracket.state := } % reset the state: not open nor closed
+ { open.brackets 'bracket.state := }
+ if$
+}
+
+FUNCTION {format.lastchecked}
+{ lastchecked empty$
+ { "" }
+ { inbrackets "cited " lastchecked * }
+ if$
+}
+% ...urlbst to here
+
+FUNCTION {output}
+{ duplicate$ empty$
+ 'pop$
+ 'output.nonnull
+ if$
+}
+
+FUNCTION {output.check}
+{ 't :=
+ duplicate$ empty$
+ { pop$ "empty " t * " in " * cite$ * warning$ }
+ 'output.nonnull
+ if$
+}
+
+FUNCTION {output.bibitem.original}
+{ newline$
+ "<dt><a name='" write$
+ cite$ write$
+ "'>[" cite$ * "] " * write$
+ % the <dt> is closed within output.nonnull, as long as close.first.block is true
+ #1 'close.first.block :=
+ newline$
+ ""
+ before.all 'output.state :=
+}
+
+FUNCTION {fin.entry.original}
+{ add.period$ "</dd>" *
+ write$
+ newline$
+}
+
+FUNCTION {new.block}
+{ output.state before.all =
+ 'skip$
+ { after.block 'output.state := }
+ if$
+}
+
+FUNCTION {new.sentence}
+{ output.state after.block =
+ 'skip$
+ { output.state before.all =
+ 'skip$
+ { after.sentence 'output.state := }
+ if$
+ }
+ if$
+}
+
+FUNCTION {not}
+{ { #0 }
+ { #1 }
+ if$
+}
+
+FUNCTION {and}
+{ 'skip$
+ { pop$ #0 }
+ if$
+}
+
+FUNCTION {or}
+{ { pop$ #1 }
+ 'skip$
+ if$
+}
+
+FUNCTION {new.block.checka}
+{ empty$
+ 'skip$
+ 'new.block
+ if$
+}
+
+FUNCTION {new.block.checkb}
+{ empty$
+ swap$ empty$
+ and
+ 'skip$
+ 'new.block
+ if$
+}
+
+FUNCTION {new.sentence.checka}
+{ empty$
+ 'skip$
+ 'new.sentence
+ if$
+}
+
+FUNCTION {new.sentence.checkb}
+{ empty$
+ swap$ empty$
+ and
+ 'skip$
+ 'new.sentence
+ if$
+}
+
+FUNCTION {field.or.null}
+{ duplicate$ empty$
+ { pop$ "" }
+ 'skip$
+ if$
+}
+
+FUNCTION {emphasize}
+{ duplicate$ empty$
+ { pop$ "" }
+ { "<em>" swap$ * "</em>" * }
+ if$
+}
+
+INTEGERS { nameptr namesleft numnames }
+
+FUNCTION {format.names}
+{ 's :=
+ #1 'nameptr :=
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ { s nameptr "{f.~}{vv~}{ll}{, jj}" format.name$ 't :=
+ nameptr #1 >
+ { namesleft #1 >
+ { ", " * t * }
+ { numnames #2 >
+ { "," * }
+ 'skip$
+ if$
+ t "others" =
+ { " et~al." * }
+ { " and " * t * }
+ if$
+ }
+ if$
+ }
+ 't
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+}
+
+FUNCTION {format.authors}
+{ author empty$
+ { "" }
+ { author format.names }
+ if$
+}
+
+FUNCTION {format.editors}
+{ editor empty$
+ { "" }
+ { editor format.names
+ editor num.names$ #1 >
+ { ", editors" * }
+ { ", editor" * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.title}
+{ title empty$
+ { "" }
+ { title "t" change.case$ }
+ if$
+}
+
+FUNCTION {n.dashify}
+{ 't :=
+ ""
+ { t empty$ not }
+ { t #1 #1 substring$ "-" =
+ { t #1 #2 substring$ "--" = not
+ { "--" *
+ t #2 global.max$ substring$ 't :=
+ }
+ { { t #1 #1 substring$ "-" = }
+ { "-" *
+ t #2 global.max$ substring$ 't :=
+ }
+ while$
+ }
+ if$
+ }
+ { t #1 #1 substring$ *
+ t #2 global.max$ substring$ 't :=
+ }
+ if$
+ }
+ while$
+}
+
+FUNCTION {format.date}
+{ year empty$
+ { month empty$
+ { "" }
+ { "there's a month but no year in " cite$ * warning$
+ month
+ }
+ if$
+ }
+ { month empty$
+ 'year
+ { month " " * year * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.btitle}
+{ title emphasize
+}
+
+FUNCTION {tie.or.space.connect}
+{ duplicate$ text.length$ #3 <
+ { "~" }
+ { " " }
+ if$
+ swap$ * *
+}
+
+FUNCTION {either.or.check}
+{ empty$
+ 'pop$
+ { "can't use both " swap$ * " fields in " * cite$ * warning$ }
+ if$
+}
+
+FUNCTION {format.bvolume}
+{ volume empty$
+ { "" }
+ { "volume" volume tie.or.space.connect
+ series empty$
+ 'skip$
+ { " of " * series emphasize * }
+ if$
+ "volume and number" number either.or.check
+ }
+ if$
+}
+
+FUNCTION {format.number.series}
+{ volume empty$
+ { number empty$
+ { series field.or.null }
+ { output.state mid.sentence =
+ { "number" }
+ { "Number" }
+ if$
+ number tie.or.space.connect
+ series empty$
+ { "there's a number but no series in " cite$ * warning$ }
+ { " in " * series * }
+ if$
+ }
+ if$
+ }
+ { "" }
+ if$
+}
+
+FUNCTION {format.edition}
+{ edition empty$
+ { "" }
+ { output.state mid.sentence =
+ { edition "l" change.case$ " edition" * }
+ { edition "t" change.case$ " edition" * }
+ if$
+ }
+ if$
+}
+
+INTEGERS { multiresult }
+
+FUNCTION {multi.page.check}
+{ 't :=
+ #0 'multiresult :=
+ { multiresult not
+ t empty$ not
+ and
+ }
+ { t #1 #1 substring$
+ duplicate$ "-" =
+ swap$ duplicate$ "," =
+ swap$ "+" =
+ or or
+ { #1 'multiresult := }
+ { t #2 global.max$ substring$ 't := }
+ if$
+ }
+ while$
+ multiresult
+}
+
+FUNCTION {format.pages}
+{ pages empty$
+ { "" }
+ { pages multi.page.check
+ { "pages" pages n.dashify tie.or.space.connect }
+ { "page" pages tie.or.space.connect }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.vol.num.pages}
+{ volume field.or.null
+ number empty$
+ 'skip$
+ { "(" number * ")" * *
+ volume empty$
+ { "there's a number but no volume in " cite$ * warning$ }
+ 'skip$
+ if$
+ }
+ if$
+ pages empty$
+ 'skip$
+ { duplicate$ empty$
+ { pop$ format.pages }
+ { ":" * pages n.dashify * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.chapter.pages}
+{ chapter empty$
+ 'format.pages
+ { type empty$
+ { "chapter" }
+ { type "l" change.case$ }
+ if$
+ chapter tie.or.space.connect
+ pages empty$
+ 'skip$
+ { ", " * format.pages * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.in.ed.booktitle}
+{ booktitle empty$
+ { "" }
+ { editor empty$
+ { "In " booktitle emphasize * }
+ { "In " format.editors * ", " * booktitle emphasize * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {empty.misc.check}
+{ author empty$ title empty$ howpublished empty$
+ month empty$ year empty$ note empty$
+ and and and and and
+ key empty$ not and
+ { "all relevant fields are empty in " cite$ * warning$ }
+ 'skip$
+ if$
+}
+
+FUNCTION {format.thesis.type}
+{ type empty$
+ 'skip$
+ { pop$
+ type "t" change.case$
+ }
+ if$
+}
+
+FUNCTION {format.tr.number}
+{ type empty$
+ { "Technical Report" }
+ 'type
+ if$
+ number empty$
+ { "t" change.case$ }
+ { number tie.or.space.connect }
+ if$
+}
+
+FUNCTION {format.article.crossref}
+{ key empty$
+ { journal empty$
+ { "need key or journal for " cite$ * " to crossref " * crossref *
+ warning$
+ ""
+ }
+ { "In <em>" journal * "</em>" * }
+ if$
+ }
+ { "In " key * }
+ if$
+ " <span class='cite'>" * crossref * "</span>" *
+}
+
+FUNCTION {format.crossref.editor}
+{ editor #1 "{vv~}{ll}" format.name$
+ editor num.names$ duplicate$
+ #2 >
+ { pop$ " et~al." * }
+ { #2 <
+ 'skip$
+ { editor #2 "{ff }{vv }{ll}{ jj}" format.name$ "others" =
+ { " et~al." * }
+ { " and " * editor #2 "{vv~}{ll}" format.name$ * }
+ if$
+ }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.book.crossref}
+{ volume empty$
+ { "empty volume in " cite$ * "'s crossref of " * crossref * warning$
+ "In "
+ }
+ { "Volume" volume tie.or.space.connect
+ " of " *
+ }
+ if$
+ editor empty$
+ editor field.or.null author field.or.null =
+ or
+ { key empty$
+ { series empty$
+ { "need editor, key, or series for " cite$ * " to crossref " *
+ crossref * warning$
+ "" *
+ }
+ { "<em>" * series * "</em>" * }
+ if$
+ }
+ { key * }
+ if$
+ }
+ { format.crossref.editor * }
+ if$
+ " <span class='cite'>" * crossref * "</span>" *
+}
+
+FUNCTION {format.incoll.inproc.crossref}
+{ editor empty$
+ editor field.or.null author field.or.null =
+ or
+ { key empty$
+ { booktitle empty$
+ { "need editor, key, or booktitle for " cite$ * " to crossref " *
+ crossref * warning$
+ ""
+ }
+ { "In <em>" booktitle * "</em>" * }
+ if$
+ }
+ { "In " key * }
+ if$
+ }
+ { "In " format.crossref.editor * }
+ if$
+ " <span class='cite'>" * crossref * "</span>" *
+}
+
+% urlbst...
+% Functions for making hypertext links.
+FUNCTION {make.href}
+{
+ "<a href='" swap$ * "'><code>" * swap$ * "</code></a>" *
+}
+
+% If inlinelinks is true, then format.url should be a no-op, since it's
+% (a) redundant, and (b) could end up as a link-within-a-link.
+FUNCTION {format.url}
+{ inlinelinks #1 = url empty$ or
+ { "" }
+ { urlintro "<code>" * url * "</code>" * }
+ if$
+}
+
+FUNCTION {format.eprint}
+{ eprint empty$
+ { "" }
+ { eprintprefix eprint * eprinturl eprint * make.href }
+ if$
+}
+
+FUNCTION {format.doi}
+{ doi empty$
+ { "" }
+ { doiform #0 =
+ { doiprefix doi * doiurl doi * make.href }
+ { "DOI:{" doi * "}" * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.pubmed}
+{ pubmed empty$
+ { "" }
+ { pubmedprefix pubmed * pubmedurl pubmed * make.href }
+ if$
+}
+
+% Output a URL. We can't use the more normal idiom (something like
+% `format.url output'), because the `inbrackets' within
+% format.lastchecked applies to everything between calls to `output',
+% so that `format.url format.lastchecked * output' ends up with both
+% the URL and the lastchecked in brackets.
+FUNCTION {output.url}
+{ url empty$
+ 'skip$
+ { new.block
+ format.url output
+ format.lastchecked output
+ }
+ if$
+}
+
+FUNCTION {output.web.refs}
+{
+ new.block
+ output.url
+ addeprints eprint empty$ not and
+ { format.eprint output.nonnull }
+ 'skip$
+ if$
+ adddoiresolver doi empty$ not and
+ { format.doi output.nonnull }
+ 'skip$
+ if$
+ addpubmedresolver pubmed empty$ not and
+ { format.pubmed output.nonnull }
+ 'skip$
+ if$
+}
+
+% Wrapper for output.bibitem.original.
+% If the URL field is not empty, set makeinlinelink to be true,
+% so that an inline link will be started at the next opportunity
+FUNCTION {output.bibitem}
+{ outside.brackets 'bracket.state :=
+ output.bibitem.original
+ inlinelinks url empty$ not and
+ { #1 'makeinlinelink := }
+ { #0 'makeinlinelink := }
+ if$
+}
+
+% Wrapper for fin.entry.original
+FUNCTION {fin.entry}
+{ output.web.refs % urlbst
+ makeinlinelink % ooops, it appears we didn't have a title for inlinelink
+ { possibly.setup.inlinelink % add some artificial link text here, as a fallback
+ "[link]" output.nonnull }
+ 'skip$
+ if$
+ bracket.state close.brackets = % urlbst
+ { "]" * }
+ 'skip$
+ if$
+ fin.entry.original
+}
+
+% Webpage entry type.
+% Title and url fields required;
+% author, note, year, month, and lastchecked fields optional
+% See references
+% ISO 690-2 http://www.nlc-bnc.ca/iso/tc46sc9/standard/690-2e.htm
+% http://www.classroom.net/classroom/CitingNetResources.html
+% http://neal.ctstateu.edu/history/cite.html
+% http://www.cas.usf.edu/english/walker/mla.html
+% for citation formats for web pages.
+FUNCTION {webpage}
+{ output.bibitem
+ author empty$
+ { editor empty$
+ 'skip$ % author and editor both optional
+ { format.editors output.nonnull }
+ if$
+ }
+ { editor empty$
+ { format.authors output.nonnull }
+ { "can't use both author and editor fields in " cite$ * warning$ }
+ if$
+ }
+ if$
+ new.block
+ title empty$ 'skip$ 'possibly.setup.inlinelink if$
+ format.title "title" output.check
+ inbrackets "online" output
+ new.block
+ year empty$
+ 'skip$
+ { format.date "year" output.check }
+ if$
+ % We don't need to output the URL details ('lastchecked' and 'url'),
+ % because fin.entry does that for us, using output.web.refs. The only
+ % reason we would want to put them here is if we were to decide that
+ % they should go in front of the rather miscellaneous information in 'note'.
+ new.block
+ note output
+ fin.entry
+}
+% ...urlbst to here
+
+
+FUNCTION {article}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ title empty$ 'skip$ 'possibly.setup.inlinelink if$ % urlbst
+ format.title "title" output.check
+ new.block
+ crossref missing$
+ { journal emphasize "journal" output.check
+ possibly.setup.inlinelink format.vol.num.pages output% urlbst
+ format.date "year" output.check
+ }
+ { format.article.crossref output.nonnull
+ format.pages output
+ }
+ if$
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {book}
+{ output.bibitem
+ author empty$
+ { format.editors "author and editor" output.check }
+ { format.authors output.nonnull
+ crossref missing$
+ { "author and editor" editor either.or.check }
+ 'skip$
+ if$
+ }
+ if$
+ new.block
+ title empty$ 'skip$ 'possibly.setup.inlinelink if$ % urlbst
+ format.btitle "title" output.check
+ crossref missing$
+ { format.bvolume output
+ new.block
+ format.number.series output
+ new.sentence
+ publisher "publisher" output.check
+ address output
+ }
+ { new.block
+ format.book.crossref output.nonnull
+ }
+ if$
+ format.edition output
+ format.date "year" output.check
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {booklet}
+{ output.bibitem
+ format.authors output
+ new.block
+ title empty$ 'skip$ 'possibly.setup.inlinelink if$ % urlbst
+ format.title "title" output.check
+ howpublished address new.block.checkb
+ howpublished output
+ address output
+ format.date output
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {inbook}
+{ output.bibitem
+ author empty$
+ { format.editors "author and editor" output.check }
+ { format.authors output.nonnull
+ crossref missing$
+ { "author and editor" editor either.or.check }
+ 'skip$
+ if$
+ }
+ if$
+ new.block
+ title empty$ 'skip$ 'possibly.setup.inlinelink if$ % urlbst
+ format.btitle "title" output.check
+ crossref missing$
+ { format.bvolume output
+ format.chapter.pages "chapter and pages" output.check
+ new.block
+ format.number.series output
+ new.sentence
+ publisher "publisher" output.check
+ address output
+ }
+ { format.chapter.pages "chapter and pages" output.check
+ new.block
+ format.book.crossref output.nonnull
+ }
+ if$
+ format.edition output
+ format.date "year" output.check
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {incollection}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ title empty$ 'skip$ 'possibly.setup.inlinelink if$ % urlbst
+ format.title "title" output.check
+ new.block
+ crossref missing$
+ { format.in.ed.booktitle "booktitle" output.check
+ format.bvolume output
+ format.number.series output
+ format.chapter.pages output
+ new.sentence
+ publisher "publisher" output.check
+ address output
+ format.edition output
+ format.date "year" output.check
+ }
+ { format.incoll.inproc.crossref output.nonnull
+ format.chapter.pages output
+ }
+ if$
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {inproceedings}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ title empty$ 'skip$ 'possibly.setup.inlinelink if$ % urlbst
+ format.title "title" output.check
+ new.block
+ crossref missing$
+ { format.in.ed.booktitle "booktitle" output.check
+ format.bvolume output
+ format.number.series output
+ format.pages output
+ address empty$
+ { organization publisher new.sentence.checkb
+ organization output
+ publisher output
+ format.date "year" output.check
+ }
+ { address output.nonnull
+ format.date "year" output.check
+ new.sentence
+ organization output
+ publisher output
+ }
+ if$
+ }
+ { format.incoll.inproc.crossref output.nonnull
+ format.pages output
+ }
+ if$
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {conference} { inproceedings }
+
+FUNCTION {manual}
+{ output.bibitem
+ author empty$
+ { organization empty$
+ 'skip$
+ { organization output.nonnull
+ address output
+ }
+ if$
+ }
+ { format.authors output.nonnull }
+ if$
+ new.block
+ title empty$ 'skip$ 'possibly.setup.inlinelink if$ % urlbst
+ format.btitle "title" output.check
+ author empty$
+ { organization empty$
+ { address new.block.checka
+ address output
+ }
+ 'skip$
+ if$
+ }
+ { organization address new.block.checkb
+ organization output
+ address output
+ }
+ if$
+ format.edition output
+ format.date output
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {mastersthesis}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ title empty$ 'skip$ 'possibly.setup.inlinelink if$ % urlbst
+ format.title "title" output.check
+ new.block
+ "Master's thesis" format.thesis.type output.nonnull
+ school "school" output.check
+ address output
+ format.date "year" output.check
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {misc}
+{ output.bibitem
+ format.authors output
+ title howpublished new.block.checkb
+ title empty$ 'skip$ 'possibly.setup.inlinelink if$ % urlbst
+ format.title output
+ howpublished new.block.checka
+ howpublished output
+ format.date output
+ new.block
+ note output
+ fin.entry
+ empty.misc.check
+}
+
+FUNCTION {phdthesis}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ title empty$ 'skip$ 'possibly.setup.inlinelink if$ % urlbst
+ format.btitle "title" output.check
+ new.block
+ "PhD thesis" format.thesis.type output.nonnull
+ school "school" output.check
+ address output
+ format.date "year" output.check
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {proceedings}
+{ output.bibitem
+ editor empty$
+ { organization output }
+ { format.editors output.nonnull }
+ if$
+ new.block
+ title empty$ 'skip$ 'possibly.setup.inlinelink if$ % urlbst
+ format.btitle "title" output.check
+ format.bvolume output
+ format.number.series output
+ address empty$
+ { editor empty$
+ { publisher new.sentence.checka }
+ { organization publisher new.sentence.checkb
+ organization output
+ }
+ if$
+ publisher output
+ format.date "year" output.check
+ }
+ { address output.nonnull
+ format.date "year" output.check
+ new.sentence
+ editor empty$
+ 'skip$
+ { organization output }
+ if$
+ publisher output
+ }
+ if$
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {techreport}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ title empty$ 'skip$ 'possibly.setup.inlinelink if$ % urlbst
+ format.title "title" output.check
+ new.block
+ format.tr.number output.nonnull
+ institution "institution" output.check
+ address output
+ format.date "year" output.check
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {unpublished}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ title empty$ 'skip$ 'possibly.setup.inlinelink if$ % urlbst
+ format.title "title" output.check
+ new.block
+ note "note" output.check
+ format.date output
+ fin.entry
+}
+
+FUNCTION {default.type} { misc }
+
+MACRO {jan} {"Jan."}
+
+MACRO {feb} {"Feb."}
+
+MACRO {mar} {"Mar."}
+
+MACRO {apr} {"Apr."}
+
+MACRO {may} {"May"}
+
+MACRO {jun} {"June"}
+
+MACRO {jul} {"July"}
+
+MACRO {aug} {"Aug."}
+
+MACRO {sep} {"Sept."}
+
+MACRO {oct} {"Oct."}
+
+MACRO {nov} {"Nov."}
+
+MACRO {dec} {"Dec."}
+
+MACRO {acmcs} {"ACM Comput. Surv."}
+
+MACRO {acta} {"Acta Inf."}
+
+MACRO {cacm} {"Commun. ACM"}
+
+MACRO {ibmjrd} {"IBM J. Res. Dev."}
+
+MACRO {ibmsj} {"IBM Syst.~J."}
+
+MACRO {ieeese} {"IEEE Trans. Softw. Eng."}
+
+MACRO {ieeetc} {"IEEE Trans. Comput."}
+
+MACRO {ieeetcad}
+ {"IEEE Trans. Comput.-Aided Design Integrated Circuits"}
+
+MACRO {ipl} {"Inf. Process. Lett."}
+
+MACRO {jacm} {"J.~ACM"}
+
+MACRO {jcss} {"J.~Comput. Syst. Sci."}
+
+MACRO {scp} {"Sci. Comput. Programming"}
+
+MACRO {sicomp} {"SIAM J. Comput."}
+
+MACRO {tocs} {"ACM Trans. Comput. Syst."}
+
+MACRO {tods} {"ACM Trans. Database Syst."}
+
+MACRO {tog} {"ACM Trans. Gr."}
+
+MACRO {toms} {"ACM Trans. Math. Softw."}
+
+MACRO {toois} {"ACM Trans. Office Inf. Syst."}
+
+MACRO {toplas} {"ACM Trans. Prog. Lang. Syst."}
+
+MACRO {tcs} {"Theoretical Comput. Sci."}
+
+READ
+
+FUNCTION {sortify}
+{ purify$
+ "l" change.case$
+}
+
+INTEGERS { len }
+
+FUNCTION {chop.word}
+{ 's :=
+ 'len :=
+ s #1 len substring$ =
+ { s len #1 + global.max$ substring$ }
+ 's
+ if$
+}
+
+FUNCTION {sort.format.names}
+{ 's :=
+ #1 'nameptr :=
+ ""
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ { nameptr #1 >
+ { " " * }
+ 'skip$
+ if$
+ s nameptr "{vv{ } }{ll{ }}{ f{ }}{ jj{ }}" format.name$ 't :=
+ nameptr numnames = t "others" = and
+ { "et al" * }
+ { t sortify * }
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+}
+
+FUNCTION {sort.format.title}
+{ 't :=
+ "A " #2
+ "An " #3
+ "The " #4 t chop.word
+ chop.word
+ chop.word
+ sortify
+ #1 global.max$ substring$
+}
+
+FUNCTION {author.sort}
+{ author empty$
+ { key empty$
+ { "to sort, need author or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { author sort.format.names }
+ if$
+}
+
+FUNCTION {author.editor.sort}
+{ author empty$
+ { editor empty$
+ { key empty$
+ { "to sort, need author, editor, or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { editor sort.format.names }
+ if$
+ }
+ { author sort.format.names }
+ if$
+}
+
+FUNCTION {author.organization.sort}
+{ author empty$
+ { organization empty$
+ { key empty$
+ { "to sort, need author, organization, or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { "The " #4 organization chop.word sortify }
+ if$
+ }
+ { author sort.format.names }
+ if$
+}
+
+FUNCTION {editor.organization.sort}
+{ editor empty$
+ { organization empty$
+ { key empty$
+ { "to sort, need editor, organization, or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { "The " #4 organization chop.word sortify }
+ if$
+ }
+ { editor sort.format.names }
+ if$
+}
+
+FUNCTION {presort}
+{ type$ "book" =
+ type$ "inbook" =
+ or
+ 'author.editor.sort
+ { type$ "proceedings" =
+ 'editor.organization.sort
+ { type$ "manual" =
+ 'author.organization.sort
+ 'author.sort
+ if$
+ }
+ if$
+ }
+ if$
+ " "
+ *
+ year field.or.null sortify
+ *
+ " "
+ *
+ title field.or.null
+ sort.format.title
+ *
+ #1 entry.max$ substring$
+ 'sort.key$ :=
+}
+
+ITERATE {presort}
+
+SORT
+
+STRINGS { longest.label }
+
+INTEGERS { number.label longest.label.width }
+
+FUNCTION {initialize.longest.label}
+{ "" 'longest.label :=
+ #1 'number.label :=
+ #0 'longest.label.width :=
+}
+
+FUNCTION {longest.label.pass}
+{ number.label int.to.str$ 'label :=
+ number.label #1 + 'number.label :=
+ label width$ longest.label.width >
+ { label 'longest.label :=
+ label width$ 'longest.label.width :=
+ }
+ 'skip$
+ if$
+}
+
+EXECUTE {initialize.longest.label}
+
+ITERATE {longest.label.pass}
+
+FUNCTION {begin.bib}
+{ preamble$ empty$
+ 'skip$
+ { preamble$ write$ newline$ }
+ if$
+ "<dl>" write$ newline$
+}
+
+EXECUTE {begin.bib}
+
+EXECUTE {init.urlbst.variables}
+EXECUTE {init.state.consts}
+
+ITERATE {call.type$}
+
+FUNCTION {end.bib}
+{ newline$
+ "</dl>" write$ newline$
+}
+
+EXECUTE {end.bib}
diff --git a/biblio/bibtex/contrib/bibhtml/alphahtml.bst b/biblio/bibtex/contrib/bibhtml/alphahtml.bst
new file mode 100644
index 0000000000..dab6362bbd
--- /dev/null
+++ b/biblio/bibtex/contrib/bibhtml/alphahtml.bst
@@ -0,0 +1,1565 @@
+%% alphahtml.bst
+%%
+%% Part of bibhtml, version 2.0.2, released 2013 September 8
+%% Hg node 7076ce83a035.
+%% See <http://purl.org/nxg/dist/bibhtml>
+%%
+%% Copyright 1999, 2005, 2006, 2009, Norman Gray <norman@astro.gla.ac.uk>
+%%
+%% This is a modification of a modification!
+%%
+%%% Modification of BibTeX style file /usr/local/texlive/2008/texmf-dist/bibtex/bst/base/alpha.bst
+%%% ... by urlbst, version 0.6-4 (marked with "% urlbst")
+%%% See <http://purl.org/nxg/dist/urlbst>
+%%% Added webpage entry type, and url and lastchecked fields.
+%%% Added eprint support.
+%%% Added DOI support.
+%%% Added PUBMED support.
+%%% Added hyperref support.
+%%% Original headers follow...
+
+% BibTeX standard bibliography style `alpha'
+ % version 0.99a for BibTeX versions 0.99a or later, LaTeX version 2.09.
+ % Copyright (C) 1985, all rights reserved.
+ % Copying of this file is authorized only if either
+ % (1) you make absolutely no changes to your copy, including name, or
+ % (2) if you do make changes, you name it something other than
+ % btxbst.doc, plain.bst, unsrt.bst, alpha.bst, and abbrv.bst.
+ % This restriction helps ensure that all standard styles are identical.
+ % The file btxbst.doc has the documentation for this style.
+
+ENTRY
+ { address
+ author
+ booktitle
+ chapter
+ edition
+ editor
+ howpublished
+ institution
+ journal
+ key
+ month
+ note
+ number
+ organization
+ pages
+ publisher
+ school
+ series
+ title
+ type
+ volume
+ year
+ eprint % urlbst
+ doi % urlbst
+ pubmed % urlbst
+ url % urlbst
+ lastchecked % urlbst
+ }
+ {}
+ { label extra.label sort.label }
+
+INTEGERS { output.state before.all mid.sentence after.sentence after.block doiform }
+
+STRINGS { urlintro eprinturl eprintprefix doiprefix doiurl pubmedprefix pubmedurl openinlinelink closeinlinelink } % urlbst...
+INTEGERS { inlinelinks makeinlinelink addeprints adddoiresolver addpubmedresolver }
+% Following constants may be adjusted by hand, if desired
+FUNCTION {init.urlbst.variables}
+{
+ "Available from: " 'urlintro := % prefix before URL
+ "http://arxiv.org/abs/" 'eprinturl := % prefix to make URL from eprint ref
+ "arXiv:" 'eprintprefix := % text prefix printed before eprint ref
+ "http://dx.doi.org/" 'doiurl := % prefix to make URL from DOI
+ "doi:" 'doiprefix := % text prefix printed before DOI ref
+ "http://www.ncbi.nlm.nih.gov/pubmed/" 'pubmedurl := % prefix to make URL from PUBMED
+ "PMID:" 'pubmedprefix := % text prefix printed before PUBMED ref
+ #1 'addeprints := % 0=no eprints; 1=include eprints
+ #1 'adddoiresolver := % 0=no DOI resolver; 1=include it
+ #1 'addpubmedresolver := % 0=no PUBMED resolver; 1=include it
+ #1 'inlinelinks := % 0=URLs explicit; 1=URLs attached to titles
+ #1 'doiform := % 0=simple, but can produce invalid HTML; 1=needs post-processing
+ % the following are internal state variables, not config constants
+ #0 'makeinlinelink := % state variable managed by possibly.setup.inlinelink
+ "" 'openinlinelink := % ditto
+ "" 'closeinlinelink := % ditto
+}
+INTEGERS {
+ bracket.state
+ outside.brackets
+ open.brackets
+ within.brackets
+ close.brackets
+ close.first.block
+}
+% ...urlbst to here
+FUNCTION {init.state.consts}
+{ #0 'outside.brackets := % urlbst
+ #1 'open.brackets :=
+ #2 'within.brackets :=
+ #3 'close.brackets :=
+
+ #0 'before.all :=
+ #1 'mid.sentence :=
+ #2 'after.sentence :=
+ #3 'after.block :=
+ #0 'close.first.block :=
+}
+
+STRINGS { s t }
+
+% urlbst
+FUNCTION {output.nonnull.original}
+{ 's :=
+ output.state mid.sentence =
+ { ", " * write$ }
+ { output.state after.block =
+ { add.period$ write$
+ % close the <dt> after the end of the first block
+ close.first.block
+ { "</a></dt>" write$ newline$ "<dd>" write$
+ #0 'close.first.block := }
+ { newline$ }
+ if$
+ }
+ { output.state before.all =
+ 'write$
+ { add.period$ " " * write$ }
+ if$
+ }
+ if$
+ mid.sentence 'output.state :=
+ }
+ if$
+ s
+}
+
+% urlbst...
+% The following three functions are for handling inlinelink. They wrap
+% a block of text which is potentially output with write$ by multiple
+% other functions, so we don't know the content a priori.
+% They communicate between each other using the variables makeinlinelink
+% (which is true if a link should be made), and closeinlinelink (which holds
+% the string which should close any current link. They can be called
+% at any time, but start.inlinelink will be a no-op unless something has
+% previously set makeinlinelink true, and the two ...end.inlinelink functions
+% will only do their stuff if start.inlinelink has previously set
+% closeinlinelink to be non-empty.
+FUNCTION {possibly.setup.inlinelink}
+{ makeinlinelink
+ { "<a href=" quote$ * url * quote$ * ">" * 'openinlinelink :=
+ "</a>" 'closeinlinelink :=
+ #0 'makeinlinelink := }
+ 'skip$
+ if$ % makeinlinelink
+}
+FUNCTION {add.inlinelink}
+{ openinlinelink empty$
+ 'skip$
+ { openinlinelink swap$ * closeinlinelink *
+ "" 'openinlinelink :=
+ }
+ if$
+}
+FUNCTION {output.nonnull}
+{ % Save the thing we've been asked to output
+ 's :=
+ % If the bracket-state is close.brackets, then add a close-bracket to
+ % what is currently at the top of the stack, and set bracket.state
+ % to outside.brackets
+ bracket.state close.brackets =
+ { "]" *
+ outside.brackets 'bracket.state :=
+ }
+ 'skip$
+ if$
+ bracket.state outside.brackets =
+ { % We're outside all brackets -- this is the normal situation.
+ % Write out what's currently at the top of the stack, using the
+ % original output.nonnull function.
+ s
+ add.inlinelink
+ output.nonnull.original % invoke the original output.nonnull
+ }
+ { % Still in brackets. Add open-bracket or (continuation) comma, add the
+ % new text (in s) to the top of the stack, and move to the close-brackets
+ % state, ready for next time (unless inbrackets resets it). If we come
+ % into this branch, then output.state is carefully undisturbed.
+ bracket.state open.brackets =
+ { " [" * }
+ { ", " * } % bracket.state will be within.brackets
+ if$
+ s *
+ close.brackets 'bracket.state :=
+ }
+ if$
+}
+
+% Call this function just before adding something which should be presented in
+% brackets. bracket.state is handled specially within output.nonnull.
+FUNCTION {inbrackets}
+{ bracket.state close.brackets =
+ { within.brackets 'bracket.state := } % reset the state: not open nor closed
+ { open.brackets 'bracket.state := }
+ if$
+}
+
+FUNCTION {format.lastchecked}
+{ lastchecked empty$
+ { "" }
+ { inbrackets "cited " lastchecked * }
+ if$
+}
+% ...urlbst to here
+
+FUNCTION {output}
+{ duplicate$ empty$
+ 'pop$
+ 'output.nonnull
+ if$
+}
+
+FUNCTION {output.check}
+{ 't :=
+ duplicate$ empty$
+ { pop$ "empty " t * " in " * cite$ * warning$ }
+ 'output.nonnull
+ if$
+}
+
+FUNCTION {output.bibitem.original}
+{ newline$
+ "<dt><a name='" write$
+ cite$ write$
+ "'>[" cite$ * "] " * write$
+ % the <dt> is closed within output.nonnull, as long as close.first.block is true
+ #1 'close.first.block :=
+ newline$
+ ""
+ before.all 'output.state :=
+}
+
+FUNCTION {fin.entry.original}
+{ add.period$ "</dd>" *
+ write$
+ newline$
+}
+
+FUNCTION {new.block}
+{ output.state before.all =
+ 'skip$
+ { after.block 'output.state := }
+ if$
+}
+
+FUNCTION {new.sentence}
+{ output.state after.block =
+ 'skip$
+ { output.state before.all =
+ 'skip$
+ { after.sentence 'output.state := }
+ if$
+ }
+ if$
+}
+
+FUNCTION {not}
+{ { #0 }
+ { #1 }
+ if$
+}
+
+FUNCTION {and}
+{ 'skip$
+ { pop$ #0 }
+ if$
+}
+
+FUNCTION {or}
+{ { pop$ #1 }
+ 'skip$
+ if$
+}
+
+FUNCTION {new.block.checka}
+{ empty$
+ 'skip$
+ 'new.block
+ if$
+}
+
+FUNCTION {new.block.checkb}
+{ empty$
+ swap$ empty$
+ and
+ 'skip$
+ 'new.block
+ if$
+}
+
+FUNCTION {new.sentence.checka}
+{ empty$
+ 'skip$
+ 'new.sentence
+ if$
+}
+
+FUNCTION {new.sentence.checkb}
+{ empty$
+ swap$ empty$
+ and
+ 'skip$
+ 'new.sentence
+ if$
+}
+
+FUNCTION {field.or.null}
+{ duplicate$ empty$
+ { pop$ "" }
+ 'skip$
+ if$
+}
+
+FUNCTION {emphasize}
+{ duplicate$ empty$
+ { pop$ "" }
+ { "<em>" swap$ * "</em>" * }
+ if$
+}
+
+INTEGERS { nameptr namesleft numnames }
+
+FUNCTION {format.names}
+{ 's :=
+ #1 'nameptr :=
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ { s nameptr "{ff~}{vv~}{ll}{, jj}" format.name$ 't :=
+ nameptr #1 >
+ { namesleft #1 >
+ { ", " * t * }
+ { numnames #2 >
+ { "," * }
+ 'skip$
+ if$
+ t "others" =
+ { " et~al." * }
+ { " and " * t * }
+ if$
+ }
+ if$
+ }
+ 't
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+}
+
+FUNCTION {format.authors}
+{ author empty$
+ { "" }
+ { author format.names }
+ if$
+}
+
+FUNCTION {format.editors}
+{ editor empty$
+ { "" }
+ { editor format.names
+ editor num.names$ #1 >
+ { ", editors" * }
+ { ", editor" * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.title}
+{ title empty$
+ { "" }
+ { title "t" change.case$ }
+ if$
+}
+
+FUNCTION {n.dashify}
+{ 't :=
+ ""
+ { t empty$ not }
+ { t #1 #1 substring$ "-" =
+ { t #1 #2 substring$ "--" = not
+ { "--" *
+ t #2 global.max$ substring$ 't :=
+ }
+ { { t #1 #1 substring$ "-" = }
+ { "-" *
+ t #2 global.max$ substring$ 't :=
+ }
+ while$
+ }
+ if$
+ }
+ { t #1 #1 substring$ *
+ t #2 global.max$ substring$ 't :=
+ }
+ if$
+ }
+ while$
+}
+
+FUNCTION {format.date}
+{ year empty$
+ { month empty$
+ { "" }
+ { "there's a month but no year in " cite$ * warning$
+ month
+ }
+ if$
+ }
+ { month empty$
+ 'year
+ { month " " * year * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.btitle}
+{ title emphasize
+}
+
+FUNCTION {tie.or.space.connect}
+{ duplicate$ text.length$ #3 <
+ { "~" }
+ { " " }
+ if$
+ swap$ * *
+}
+
+FUNCTION {either.or.check}
+{ empty$
+ 'pop$
+ { "can't use both " swap$ * " fields in " * cite$ * warning$ }
+ if$
+}
+
+FUNCTION {format.bvolume}
+{ volume empty$
+ { "" }
+ { "volume" volume tie.or.space.connect
+ series empty$
+ 'skip$
+ { " of " * series emphasize * }
+ if$
+ "volume and number" number either.or.check
+ }
+ if$
+}
+
+FUNCTION {format.number.series}
+{ volume empty$
+ { number empty$
+ { series field.or.null }
+ { output.state mid.sentence =
+ { "number" }
+ { "Number" }
+ if$
+ number tie.or.space.connect
+ series empty$
+ { "there's a number but no series in " cite$ * warning$ }
+ { " in " * series * }
+ if$
+ }
+ if$
+ }
+ { "" }
+ if$
+}
+
+FUNCTION {format.edition}
+{ edition empty$
+ { "" }
+ { output.state mid.sentence =
+ { edition "l" change.case$ " edition" * }
+ { edition "t" change.case$ " edition" * }
+ if$
+ }
+ if$
+}
+
+INTEGERS { multiresult }
+
+FUNCTION {multi.page.check}
+{ 't :=
+ #0 'multiresult :=
+ { multiresult not
+ t empty$ not
+ and
+ }
+ { t #1 #1 substring$
+ duplicate$ "-" =
+ swap$ duplicate$ "," =
+ swap$ "+" =
+ or or
+ { #1 'multiresult := }
+ { t #2 global.max$ substring$ 't := }
+ if$
+ }
+ while$
+ multiresult
+}
+
+FUNCTION {format.pages}
+{ pages empty$
+ { "" }
+ { pages multi.page.check
+ { "pages" pages n.dashify tie.or.space.connect }
+ { "page" pages tie.or.space.connect }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.vol.num.pages}
+{ volume field.or.null
+ number empty$
+ 'skip$
+ { "(" number * ")" * *
+ volume empty$
+ { "there's a number but no volume in " cite$ * warning$ }
+ 'skip$
+ if$
+ }
+ if$
+ pages empty$
+ 'skip$
+ { duplicate$ empty$
+ { pop$ format.pages }
+ { ":" * pages n.dashify * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.chapter.pages}
+{ chapter empty$
+ 'format.pages
+ { type empty$
+ { "chapter" }
+ { type "l" change.case$ }
+ if$
+ chapter tie.or.space.connect
+ pages empty$
+ 'skip$
+ { ", " * format.pages * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.in.ed.booktitle}
+{ booktitle empty$
+ { "" }
+ { editor empty$
+ { "In " booktitle emphasize * }
+ { "In " format.editors * ", " * booktitle emphasize * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {empty.misc.check}
+{ author empty$ title empty$ howpublished empty$
+ month empty$ year empty$ note empty$
+ and and and and and
+ key empty$ not and
+ { "all relevant fields are empty in " cite$ * warning$ }
+ 'skip$
+ if$
+}
+
+FUNCTION {format.thesis.type}
+{ type empty$
+ 'skip$
+ { pop$
+ type "t" change.case$
+ }
+ if$
+}
+
+FUNCTION {format.tr.number}
+{ type empty$
+ { "Technical Report" }
+ 'type
+ if$
+ number empty$
+ { "t" change.case$ }
+ { number tie.or.space.connect }
+ if$
+}
+
+FUNCTION {format.article.crossref}
+{ key empty$
+ { journal empty$
+ { "need key or journal for " cite$ * " to crossref " * crossref *
+ warning$
+ ""
+ }
+ { "In {\em " journal * "\/}" * }
+ if$
+ }
+ { "In " key * }
+ if$
+ " <span class='cite'>" * crossref * "</span>" *
+}
+
+FUNCTION {format.crossref.editor}
+{ editor #1 "{vv~}{ll}" format.name$
+ editor num.names$ duplicate$
+ #2 >
+ { pop$ " et~al." * }
+ { #2 <
+ 'skip$
+ { editor #2 "{ff }{vv }{ll}{ jj}" format.name$ "others" =
+ { " et~al." * }
+ { " and " * editor #2 "{vv~}{ll}" format.name$ * }
+ if$
+ }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.book.crossref}
+{ volume empty$
+ { "empty volume in " cite$ * "'s crossref of " * crossref * warning$
+ "In "
+ }
+ { "Volume" volume tie.or.space.connect
+ " of " *
+ }
+ if$
+ editor empty$
+ editor field.or.null author field.or.null =
+ or
+ { key empty$
+ { series empty$
+ { "need editor, key, or series for " cite$ * " to crossref " *
+ crossref * warning$
+ "" *
+ }
+ { "<em>" * series * "</em>" * }
+ if$
+ }
+ { key * }
+ if$
+ }
+ { format.crossref.editor * }
+ if$
+ " <span class='cite'>" * crossref * "</span>" *
+}
+
+FUNCTION {format.incoll.inproc.crossref}
+{ editor empty$
+ editor field.or.null author field.or.null =
+ or
+ { key empty$
+ { booktitle empty$
+ { "need editor, key, or booktitle for " cite$ * " to crossref " *
+ crossref * warning$
+ ""
+ }
+ { "In <em>" booktitle * "</em>" * }
+ if$
+ }
+ { "In " key * }
+ if$
+ }
+ { "In " format.crossref.editor * }
+ if$
+ " <span class='cite'>" * crossref * "</span>" *
+}
+
+% urlbst...
+% Functions for making hypertext links.
+FUNCTION {make.href}
+{
+ "<a href='" swap$ * "'><code>" * swap$ * "</code></a>" *
+}
+
+% If inlinelinks is true, then format.url should be a no-op, since it's
+% (a) redundant, and (b) could end up as a link-within-a-link.
+FUNCTION {format.url}
+{ inlinelinks #1 = url empty$ or
+ { "" }
+ { urlintro "<code>" * url * "</code>" * }
+ if$
+}
+
+FUNCTION {format.eprint}
+{ eprint empty$
+ { "" }
+ { eprintprefix eprint * eprinturl eprint * make.href }
+ if$
+}
+
+FUNCTION {format.doi}
+{ doi empty$
+ { "" }
+ { doiform #0 =
+ { doiprefix doi * doiurl doi * make.href }
+ { "DOI:{" doi * "}" * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.pubmed}
+{ pubmed empty$
+ { "" }
+ { pubmedprefix pubmed * pubmedurl pubmed * make.href }
+ if$
+}
+
+% Output a URL. We can't use the more normal idiom (something like
+% `format.url output'), because the `inbrackets' within
+% format.lastchecked applies to everything between calls to `output',
+% so that `format.url format.lastchecked * output' ends up with both
+% the URL and the lastchecked in brackets.
+FUNCTION {output.url}
+{ url empty$
+ 'skip$
+ { new.block
+ format.url output
+ format.lastchecked output
+ }
+ if$
+}
+
+FUNCTION {output.web.refs}
+{
+ new.block
+ output.url
+ addeprints eprint empty$ not and
+ { format.eprint output.nonnull }
+ 'skip$
+ if$
+ adddoiresolver doi empty$ not and
+ { format.doi output.nonnull }
+ 'skip$
+ if$
+ addpubmedresolver pubmed empty$ not and
+ { format.pubmed output.nonnull }
+ 'skip$
+ if$
+}
+
+% Wrapper for output.bibitem.original.
+% If the URL field is not empty, set makeinlinelink to be true,
+% so that an inline link will be started at the next opportunity
+FUNCTION {output.bibitem}
+{ outside.brackets 'bracket.state :=
+ output.bibitem.original
+ inlinelinks url empty$ not and
+ { #1 'makeinlinelink := }
+ { #0 'makeinlinelink := }
+ if$
+}
+
+% Wrapper for fin.entry.original
+FUNCTION {fin.entry}
+{ output.web.refs % urlbst
+ makeinlinelink % ooops, it appears we didn't have a title for inlinelink
+ { possibly.setup.inlinelink % add some artificial link text here, as a fallback
+ "[link]" output.nonnull }
+ 'skip$
+ if$
+ bracket.state close.brackets = % urlbst
+ { "]" * }
+ 'skip$
+ if$
+ fin.entry.original
+}
+
+% Webpage entry type.
+% Title and url fields required;
+% author, note, year, month, and lastchecked fields optional
+% See references
+% ISO 690-2 http://www.nlc-bnc.ca/iso/tc46sc9/standard/690-2e.htm
+% http://www.classroom.net/classroom/CitingNetResources.html
+% http://neal.ctstateu.edu/history/cite.html
+% http://www.cas.usf.edu/english/walker/mla.html
+% for citation formats for web pages.
+FUNCTION {webpage}
+{ output.bibitem
+ author empty$
+ { editor empty$
+ 'skip$ % author and editor both optional
+ { format.editors output.nonnull }
+ if$
+ }
+ { editor empty$
+ { format.authors output.nonnull }
+ { "can't use both author and editor fields in " cite$ * warning$ }
+ if$
+ }
+ if$
+ new.block
+ title empty$ 'skip$ 'possibly.setup.inlinelink if$
+ format.title "title" output.check
+ inbrackets "online" output
+ new.block
+ year empty$
+ 'skip$
+ { format.date "year" output.check }
+ if$
+ % We don't need to output the URL details ('lastchecked' and 'url'),
+ % because fin.entry does that for us, using output.web.refs. The only
+ % reason we would want to put them here is if we were to decide that
+ % they should go in front of the rather miscellaneous information in 'note'.
+ new.block
+ note output
+ fin.entry
+}
+% ...urlbst to here
+
+
+FUNCTION {article}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ title empty$ 'skip$ 'possibly.setup.inlinelink if$ % urlbst
+ format.title "title" output.check
+ new.block
+ crossref missing$
+ { journal emphasize "journal" output.check
+ possibly.setup.inlinelink format.vol.num.pages output% urlbst
+ format.date "year" output.check
+ }
+ { format.article.crossref output.nonnull
+ format.pages output
+ }
+ if$
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {book}
+{ output.bibitem
+ author empty$
+ { format.editors "author and editor" output.check }
+ { format.authors output.nonnull
+ crossref missing$
+ { "author and editor" editor either.or.check }
+ 'skip$
+ if$
+ }
+ if$
+ new.block
+ title empty$ 'skip$ 'possibly.setup.inlinelink if$ % urlbst
+ format.btitle "title" output.check
+ crossref missing$
+ { format.bvolume output
+ new.block
+ format.number.series output
+ new.sentence
+ publisher "publisher" output.check
+ address output
+ }
+ { new.block
+ format.book.crossref output.nonnull
+ }
+ if$
+ format.edition output
+ format.date "year" output.check
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {booklet}
+{ output.bibitem
+ format.authors output
+ new.block
+ title empty$ 'skip$ 'possibly.setup.inlinelink if$ % urlbst
+ format.title "title" output.check
+ howpublished address new.block.checkb
+ howpublished output
+ address output
+ format.date output
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {inbook}
+{ output.bibitem
+ author empty$
+ { format.editors "author and editor" output.check }
+ { format.authors output.nonnull
+ crossref missing$
+ { "author and editor" editor either.or.check }
+ 'skip$
+ if$
+ }
+ if$
+ new.block
+ title empty$ 'skip$ 'possibly.setup.inlinelink if$ % urlbst
+ format.btitle "title" output.check
+ crossref missing$
+ { format.bvolume output
+ format.chapter.pages "chapter and pages" output.check
+ new.block
+ format.number.series output
+ new.sentence
+ publisher "publisher" output.check
+ address output
+ }
+ { format.chapter.pages "chapter and pages" output.check
+ new.block
+ format.book.crossref output.nonnull
+ }
+ if$
+ format.edition output
+ format.date "year" output.check
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {incollection}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ title empty$ 'skip$ 'possibly.setup.inlinelink if$ % urlbst
+ format.title "title" output.check
+ new.block
+ crossref missing$
+ { format.in.ed.booktitle "booktitle" output.check
+ format.bvolume output
+ format.number.series output
+ format.chapter.pages output
+ new.sentence
+ publisher "publisher" output.check
+ address output
+ format.edition output
+ format.date "year" output.check
+ }
+ { format.incoll.inproc.crossref output.nonnull
+ format.chapter.pages output
+ }
+ if$
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {inproceedings}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ title empty$ 'skip$ 'possibly.setup.inlinelink if$ % urlbst
+ format.title "title" output.check
+ new.block
+ crossref missing$
+ { format.in.ed.booktitle "booktitle" output.check
+ format.bvolume output
+ format.number.series output
+ format.pages output
+ address empty$
+ { organization publisher new.sentence.checkb
+ organization output
+ publisher output
+ format.date "year" output.check
+ }
+ { address output.nonnull
+ format.date "year" output.check
+ new.sentence
+ organization output
+ publisher output
+ }
+ if$
+ }
+ { format.incoll.inproc.crossref output.nonnull
+ format.pages output
+ }
+ if$
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {conference} { inproceedings }
+
+FUNCTION {manual}
+{ output.bibitem
+ author empty$
+ { organization empty$
+ 'skip$
+ { organization output.nonnull
+ address output
+ }
+ if$
+ }
+ { format.authors output.nonnull }
+ if$
+ new.block
+ title empty$ 'skip$ 'possibly.setup.inlinelink if$ % urlbst
+ format.btitle "title" output.check
+ author empty$
+ { organization empty$
+ { address new.block.checka
+ address output
+ }
+ 'skip$
+ if$
+ }
+ { organization address new.block.checkb
+ organization output
+ address output
+ }
+ if$
+ format.edition output
+ format.date output
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {mastersthesis}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ title empty$ 'skip$ 'possibly.setup.inlinelink if$ % urlbst
+ format.title "title" output.check
+ new.block
+ "Master's thesis" format.thesis.type output.nonnull
+ school "school" output.check
+ address output
+ format.date "year" output.check
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {misc}
+{ output.bibitem
+ format.authors output
+ title howpublished new.block.checkb
+ title empty$ 'skip$ 'possibly.setup.inlinelink if$ % urlbst
+ format.title output
+ howpublished new.block.checka
+ howpublished output
+ format.date output
+ new.block
+ note output
+ fin.entry
+ empty.misc.check
+}
+
+FUNCTION {phdthesis}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ title empty$ 'skip$ 'possibly.setup.inlinelink if$ % urlbst
+ format.btitle "title" output.check
+ new.block
+ "PhD thesis" format.thesis.type output.nonnull
+ school "school" output.check
+ address output
+ format.date "year" output.check
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {proceedings}
+{ output.bibitem
+ editor empty$
+ { organization output }
+ { format.editors output.nonnull }
+ if$
+ new.block
+ title empty$ 'skip$ 'possibly.setup.inlinelink if$ % urlbst
+ format.btitle "title" output.check
+ format.bvolume output
+ format.number.series output
+ address empty$
+ { editor empty$
+ { publisher new.sentence.checka }
+ { organization publisher new.sentence.checkb
+ organization output
+ }
+ if$
+ publisher output
+ format.date "year" output.check
+ }
+ { address output.nonnull
+ format.date "year" output.check
+ new.sentence
+ editor empty$
+ 'skip$
+ { organization output }
+ if$
+ publisher output
+ }
+ if$
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {techreport}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ title empty$ 'skip$ 'possibly.setup.inlinelink if$ % urlbst
+ format.title "title" output.check
+ new.block
+ format.tr.number output.nonnull
+ institution "institution" output.check
+ address output
+ format.date "year" output.check
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {unpublished}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ title empty$ 'skip$ 'possibly.setup.inlinelink if$ % urlbst
+ format.title "title" output.check
+ new.block
+ note "note" output.check
+ format.date output
+ fin.entry
+}
+
+FUNCTION {default.type} { misc }
+
+MACRO {jan} {"January"}
+
+MACRO {feb} {"February"}
+
+MACRO {mar} {"March"}
+
+MACRO {apr} {"April"}
+
+MACRO {may} {"May"}
+
+MACRO {jun} {"June"}
+
+MACRO {jul} {"July"}
+
+MACRO {aug} {"August"}
+
+MACRO {sep} {"September"}
+
+MACRO {oct} {"October"}
+
+MACRO {nov} {"November"}
+
+MACRO {dec} {"December"}
+
+MACRO {acmcs} {"ACM Computing Surveys"}
+
+MACRO {acta} {"Acta Informatica"}
+
+MACRO {cacm} {"Communications of the ACM"}
+
+MACRO {ibmjrd} {"IBM Journal of Research and Development"}
+
+MACRO {ibmsj} {"IBM Systems Journal"}
+
+MACRO {ieeese} {"IEEE Transactions on Software Engineering"}
+
+MACRO {ieeetc} {"IEEE Transactions on Computers"}
+
+MACRO {ieeetcad}
+ {"IEEE Transactions on Computer-Aided Design of Integrated Circuits"}
+
+MACRO {ipl} {"Information Processing Letters"}
+
+MACRO {jacm} {"Journal of the ACM"}
+
+MACRO {jcss} {"Journal of Computer and System Sciences"}
+
+MACRO {scp} {"Science of Computer Programming"}
+
+MACRO {sicomp} {"SIAM Journal on Computing"}
+
+MACRO {tocs} {"ACM Transactions on Computer Systems"}
+
+MACRO {tods} {"ACM Transactions on Database Systems"}
+
+MACRO {tog} {"ACM Transactions on Graphics"}
+
+MACRO {toms} {"ACM Transactions on Mathematical Software"}
+
+MACRO {toois} {"ACM Transactions on Office Information Systems"}
+
+MACRO {toplas} {"ACM Transactions on Programming Languages and Systems"}
+
+MACRO {tcs} {"Theoretical Computer Science"}
+
+READ
+
+FUNCTION {sortify}
+{ purify$
+ "l" change.case$
+}
+
+INTEGERS { len }
+
+FUNCTION {chop.word}
+{ 's :=
+ 'len :=
+ s #1 len substring$ =
+ { s len #1 + global.max$ substring$ }
+ 's
+ if$
+}
+
+INTEGERS { et.al.char.used }
+
+FUNCTION {initialize.et.al.char.used}
+{ #0 'et.al.char.used :=
+}
+
+EXECUTE {initialize.et.al.char.used}
+
+FUNCTION {format.lab.names}
+{ 's :=
+ s num.names$ 'numnames :=
+ numnames #1 >
+ { numnames #4 >
+ { #3 'namesleft := }
+ { numnames 'namesleft := }
+ if$
+ #1 'nameptr :=
+ ""
+ { namesleft #0 > }
+ { nameptr numnames =
+ { s nameptr "{ff }{vv }{ll}{ jj}" format.name$ "others" =
+ { "{\etalchar{+}}" *
+ #1 'et.al.char.used :=
+ }
+ { s nameptr "{v{}}{l{}}" format.name$ * }
+ if$
+ }
+ { s nameptr "{v{}}{l{}}" format.name$ * }
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+ numnames #4 >
+ { "{\etalchar{+}}" *
+ #1 'et.al.char.used :=
+ }
+ 'skip$
+ if$
+ }
+ { s #1 "{v{}}{l{}}" format.name$
+ duplicate$ text.length$ #2 <
+ { pop$ s #1 "{ll}" format.name$ #3 text.prefix$ }
+ 'skip$
+ if$
+ }
+ if$
+}
+
+FUNCTION {author.key.label}
+{ author empty$
+ { key empty$
+ { cite$ #1 #3 substring$ }
+ { key #3 text.prefix$ }
+ if$
+ }
+ { author format.lab.names }
+ if$
+}
+
+FUNCTION {author.editor.key.label}
+{ author empty$
+ { editor empty$
+ { key empty$
+ { cite$ #1 #3 substring$ }
+ { key #3 text.prefix$ }
+ if$
+ }
+ { editor format.lab.names }
+ if$
+ }
+ { author format.lab.names }
+ if$
+}
+
+FUNCTION {author.key.organization.label}
+{ author empty$
+ { key empty$
+ { organization empty$
+ { cite$ #1 #3 substring$ }
+ { "The " #4 organization chop.word #3 text.prefix$ }
+ if$
+ }
+ { key #3 text.prefix$ }
+ if$
+ }
+ { author format.lab.names }
+ if$
+}
+
+FUNCTION {editor.key.organization.label}
+{ editor empty$
+ { key empty$
+ { organization empty$
+ { cite$ #1 #3 substring$ }
+ { "The " #4 organization chop.word #3 text.prefix$ }
+ if$
+ }
+ { key #3 text.prefix$ }
+ if$
+ }
+ { editor format.lab.names }
+ if$
+}
+
+FUNCTION {calc.label}
+{ type$ "book" =
+ type$ "inbook" =
+ or
+ 'author.editor.key.label
+ { type$ "proceedings" =
+ 'editor.key.organization.label
+ { type$ "manual" =
+ 'author.key.organization.label
+ 'author.key.label
+ if$
+ }
+ if$
+ }
+ if$
+ duplicate$
+ year field.or.null purify$ #-1 #2 substring$
+ *
+ 'label :=
+ year field.or.null purify$ #-1 #4 substring$
+ *
+ sortify 'sort.label :=
+}
+
+FUNCTION {sort.format.names}
+{ 's :=
+ #1 'nameptr :=
+ ""
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ { nameptr #1 >
+ { " " * }
+ 'skip$
+ if$
+ s nameptr "{vv{ } }{ll{ }}{ ff{ }}{ jj{ }}" format.name$ 't :=
+ nameptr numnames = t "others" = and
+ { "et al" * }
+ { t sortify * }
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+}
+
+FUNCTION {sort.format.title}
+{ 't :=
+ "A " #2
+ "An " #3
+ "The " #4 t chop.word
+ chop.word
+ chop.word
+ sortify
+ #1 global.max$ substring$
+}
+
+FUNCTION {author.sort}
+{ author empty$
+ { key empty$
+ { "to sort, need author or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { author sort.format.names }
+ if$
+}
+
+FUNCTION {author.editor.sort}
+{ author empty$
+ { editor empty$
+ { key empty$
+ { "to sort, need author, editor, or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { editor sort.format.names }
+ if$
+ }
+ { author sort.format.names }
+ if$
+}
+
+FUNCTION {author.organization.sort}
+{ author empty$
+ { organization empty$
+ { key empty$
+ { "to sort, need author, organization, or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { "The " #4 organization chop.word sortify }
+ if$
+ }
+ { author sort.format.names }
+ if$
+}
+
+FUNCTION {editor.organization.sort}
+{ editor empty$
+ { organization empty$
+ { key empty$
+ { "to sort, need editor, organization, or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { "The " #4 organization chop.word sortify }
+ if$
+ }
+ { editor sort.format.names }
+ if$
+}
+
+FUNCTION {presort}
+{ calc.label
+ sort.label %EDIT2
+ " "
+ *
+ type$ "book" =
+ type$ "inbook" =
+ or
+ 'author.editor.sort
+ { type$ "proceedings" =
+ 'editor.organization.sort
+ { type$ "manual" =
+ 'author.organization.sort
+ 'author.sort
+ if$
+ }
+ if$
+ }
+ if$
+ *
+ " "
+ *
+ year field.or.null sortify
+ *
+ " "
+ *
+ title field.or.null
+ sort.format.title
+ *
+ #1 entry.max$ substring$
+ 'sort.key$ :=
+}
+
+ITERATE {presort}
+
+SORT
+
+STRINGS { longest.label last.sort.label next.extra }
+
+INTEGERS { longest.label.width last.extra.num }
+
+FUNCTION {initialize.longest.label}
+{ "" 'longest.label :=
+ #0 int.to.chr$ 'last.sort.label :=
+ "" 'next.extra :=
+ #0 'longest.label.width :=
+ #0 'last.extra.num :=
+}
+
+FUNCTION {forward.pass}
+{ last.sort.label sort.label =
+ { last.extra.num #1 + 'last.extra.num :=
+ last.extra.num int.to.chr$ 'extra.label :=
+ }
+ { "a" chr.to.int$ 'last.extra.num :=
+ "" 'extra.label :=
+ sort.label 'last.sort.label :=
+ }
+ if$
+}
+
+FUNCTION {reverse.pass}
+{ next.extra "b" =
+ { "a" 'extra.label := }
+ 'skip$
+ if$
+ label extra.label * 'label :=
+ label width$ longest.label.width >
+ { label 'longest.label :=
+ label width$ 'longest.label.width :=
+ }
+ 'skip$
+ if$
+ extra.label 'next.extra :=
+}
+
+EXECUTE {initialize.longest.label}
+
+ITERATE {forward.pass}
+
+REVERSE {reverse.pass}
+
+%%% XXX The macro \etalchar is generated in function format.lab.names.
+%%% I have no idea what format.lab.names does,
+%%% and it doesn't seem to do anything in my test cases.
+%%% However the \etalchar definition messes up the HTML output,
+%%% so I'll simply skip that for now...
+FUNCTION {begin.bib}
+{ %et.al.char.used
+ % { "\newcommand{\etalchar}[1]{$^{#1}$}" write$ newline$ }
+ % 'skip$
+ %if$
+ preamble$ empty$
+ 'skip$
+ { preamble$ write$ newline$ }
+ if$
+ "<dl>" write$ newline$
+}
+
+EXECUTE {begin.bib}
+
+EXECUTE {init.urlbst.variables}
+EXECUTE {init.state.consts}
+
+ITERATE {call.type$}
+
+FUNCTION {end.bib}
+{ newline$
+ "</dl>" write$ newline$
+}
+
+EXECUTE {end.bib}
diff --git a/biblio/bibtex/contrib/bibhtml/alphahtmldate.bst b/biblio/bibtex/contrib/bibhtml/alphahtmldate.bst
new file mode 100644
index 0000000000..21597aeffb
--- /dev/null
+++ b/biblio/bibtex/contrib/bibhtml/alphahtmldate.bst
@@ -0,0 +1,1362 @@
+%%
+%% DO NOT EDIT
+%%
+%% This is alphahtmldate.bst, edited from alphahtml.bst by alphahtmldate.sed
+%%
+%% alphahtml.bst
+%%
+%% Part of bibhtml, version 2.0.2, released 2013 September 8
+%% Hg node 7076ce83a035.
+%% See <http://purl.org/nxg/dist/bibhtml>
+%%
+%% Copyright 1999, 2005, 2006, 2009, Norman Gray <norman@astro.gla.ac.uk>
+%%
+%% This is a modification of a modification!
+%%
+%%% Modification of BibTeX style file /usr/local/texlive/2008/texmf-dist/bibtex/bst/base/alpha.bst
+%%% ... by urlbst, version 0.6-4 (marked with "% urlbst")
+%%% See <http://purl.org/nxg/dist/urlbst>
+%%% Added webpage entry type, and url and lastchecked fields.
+%%% Added eprint support.
+%%% Added DOI support.
+%%% Added PUBMED support.
+%%% Added hyperref support.
+%%% Original headers follow...
+ENTRY
+{ address
+author
+booktitle
+chapter
+edition
+editor
+howpublished
+institution
+journal
+key
+month
+note
+number
+organization
+pages
+publisher
+school
+series
+title
+type
+volume
+year
+eprint % urlbst
+doi % urlbst
+pubmed % urlbst
+url % urlbst
+lastchecked % urlbst
+}
+{}
+{ label extra.label sort.label }
+INTEGERS { output.state before.all mid.sentence after.sentence after.block doiform }
+STRINGS { urlintro eprinturl eprintprefix doiprefix doiurl pubmedprefix pubmedurl openinlinelink closeinlinelink } % urlbst...
+INTEGERS { inlinelinks makeinlinelink addeprints adddoiresolver addpubmedresolver }
+FUNCTION {init.urlbst.variables}
+{
+"Available from: " 'urlintro := % prefix before URL
+"http://arxiv.org/abs/" 'eprinturl := % prefix to make URL from eprint ref
+"arXiv:" 'eprintprefix := % text prefix printed before eprint ref
+"http://dx.doi.org/" 'doiurl := % prefix to make URL from DOI
+"doi:" 'doiprefix := % text prefix printed before DOI ref
+"http://www.ncbi.nlm.nih.gov/pubmed/" 'pubmedurl := % prefix to make URL from PUBMED
+"PMID:" 'pubmedprefix := % text prefix printed before PUBMED ref
+#1 'addeprints := % 0=no eprints; 1=include eprints
+#1 'adddoiresolver := % 0=no DOI resolver; 1=include it
+#1 'addpubmedresolver := % 0=no PUBMED resolver; 1=include it
+#1 'inlinelinks := % 0=URLs explicit; 1=URLs attached to titles
+#1 'doiform := % 0=simple, but can produce invalid HTML; 1=needs post-processing
+#0 'makeinlinelink := % state variable managed by possibly.setup.inlinelink
+"" 'openinlinelink := % ditto
+"" 'closeinlinelink := % ditto
+}
+INTEGERS {
+bracket.state
+outside.brackets
+open.brackets
+within.brackets
+close.brackets
+close.first.block
+}
+FUNCTION {init.state.consts}
+{ #0 'outside.brackets := % urlbst
+#1 'open.brackets :=
+#2 'within.brackets :=
+#3 'close.brackets :=
+#0 'before.all :=
+#1 'mid.sentence :=
+#2 'after.sentence :=
+#3 'after.block :=
+#0 'close.first.block :=
+}
+STRINGS { s t }
+FUNCTION {output.nonnull.original}
+{ 's :=
+output.state mid.sentence =
+{ ", " * write$ }
+{ output.state after.block =
+{ add.period$ write$
+close.first.block
+{ "</a></dt>" write$ newline$ "<dd>" write$
+#0 'close.first.block := }
+{ newline$ }
+if$
+}
+{ output.state before.all =
+'write$
+{ add.period$ " " * write$ }
+if$
+}
+if$
+mid.sentence 'output.state :=
+}
+if$
+s
+}
+FUNCTION {possibly.setup.inlinelink}
+{ makeinlinelink
+{ "<a href=" quote$ * url * quote$ * ">" * 'openinlinelink :=
+"</a>" 'closeinlinelink :=
+#0 'makeinlinelink := }
+'skip$
+if$ % makeinlinelink
+}
+FUNCTION {add.inlinelink}
+{ openinlinelink empty$
+'skip$
+{ openinlinelink swap$ * closeinlinelink *
+"" 'openinlinelink :=
+}
+if$
+}
+FUNCTION {output.nonnull}
+{ % Save the thing we've been asked to output
+'s :=
+bracket.state close.brackets =
+{ "]" *
+outside.brackets 'bracket.state :=
+}
+'skip$
+if$
+bracket.state outside.brackets =
+{ % We're outside all brackets -- this is the normal situation.
+s
+add.inlinelink
+output.nonnull.original % invoke the original output.nonnull
+}
+{ % Still in brackets. Add open-bracket or (continuation) comma, add the
+bracket.state open.brackets =
+{ " [" * }
+{ ", " * } % bracket.state will be within.brackets
+if$
+s *
+close.brackets 'bracket.state :=
+}
+if$
+}
+FUNCTION {inbrackets}
+{ bracket.state close.brackets =
+{ within.brackets 'bracket.state := } % reset the state: not open nor closed
+{ open.brackets 'bracket.state := }
+if$
+}
+FUNCTION {format.lastchecked}
+{ lastchecked empty$
+{ "" }
+{ inbrackets "cited " lastchecked * }
+if$
+}
+FUNCTION {output}
+{ duplicate$ empty$
+'pop$
+'output.nonnull
+if$
+}
+FUNCTION {output.check}
+{ 't :=
+duplicate$ empty$
+{ pop$ "empty " t * " in " * cite$ * warning$ }
+'output.nonnull
+if$
+}
+FUNCTION {output.bibitem.original}
+{ newline$
+"<dt><a name='" write$
+cite$ write$
+"'>[" cite$ * "] " * write$
+#1 'close.first.block :=
+newline$
+""
+before.all 'output.state :=
+}
+FUNCTION {fin.entry.original}
+{ add.period$ "</dd>" *
+write$
+newline$
+}
+FUNCTION {new.block}
+{ output.state before.all =
+'skip$
+{ after.block 'output.state := }
+if$
+}
+FUNCTION {new.sentence}
+{ output.state after.block =
+'skip$
+{ output.state before.all =
+'skip$
+{ after.sentence 'output.state := }
+if$
+}
+if$
+}
+FUNCTION {not}
+{ { #0 }
+{ #1 }
+if$
+}
+FUNCTION {and}
+{ 'skip$
+{ pop$ #0 }
+if$
+}
+FUNCTION {or}
+{ { pop$ #1 }
+'skip$
+if$
+}
+FUNCTION {new.block.checka}
+{ empty$
+'skip$
+'new.block
+if$
+}
+FUNCTION {new.block.checkb}
+{ empty$
+swap$ empty$
+and
+'skip$
+'new.block
+if$
+}
+FUNCTION {new.sentence.checka}
+{ empty$
+'skip$
+'new.sentence
+if$
+}
+FUNCTION {new.sentence.checkb}
+{ empty$
+swap$ empty$
+and
+'skip$
+'new.sentence
+if$
+}
+FUNCTION {field.or.null}
+{ duplicate$ empty$
+{ pop$ "" }
+'skip$
+if$
+}
+FUNCTION {emphasize}
+{ duplicate$ empty$
+{ pop$ "" }
+{ "<em>" swap$ * "</em>" * }
+if$
+}
+INTEGERS { nameptr namesleft numnames }
+FUNCTION {format.names}
+{ 's :=
+#1 'nameptr :=
+s num.names$ 'numnames :=
+numnames 'namesleft :=
+{ namesleft #0 > }
+{ s nameptr "{ff~}{vv~}{ll}{, jj}" format.name$ 't :=
+nameptr #1 >
+{ namesleft #1 >
+{ ", " * t * }
+{ numnames #2 >
+{ "," * }
+'skip$
+if$
+t "others" =
+{ " et~al." * }
+{ " and " * t * }
+if$
+}
+if$
+}
+'t
+if$
+nameptr #1 + 'nameptr :=
+namesleft #1 - 'namesleft :=
+}
+while$
+}
+FUNCTION {format.authors}
+{ author empty$
+{ "" }
+{ author format.names }
+if$
+}
+FUNCTION {format.editors}
+{ editor empty$
+{ "" }
+{ editor format.names
+editor num.names$ #1 >
+{ ", editors" * }
+{ ", editor" * }
+if$
+}
+if$
+}
+FUNCTION {format.title}
+{ title empty$
+{ "" }
+{ title "t" change.case$ }
+if$
+}
+FUNCTION {n.dashify}
+{ 't :=
+""
+{ t empty$ not }
+{ t #1 #1 substring$ "-" =
+{ t #1 #2 substring$ "--" = not
+{ "--" *
+t #2 global.max$ substring$ 't :=
+}
+{ { t #1 #1 substring$ "-" = }
+{ "-" *
+t #2 global.max$ substring$ 't :=
+}
+while$
+}
+if$
+}
+{ t #1 #1 substring$ *
+t #2 global.max$ substring$ 't :=
+}
+if$
+}
+while$
+}
+FUNCTION {format.date}
+{ year empty$
+{ month empty$
+{ "" }
+{ "there's a month but no year in " cite$ * warning$
+month
+}
+if$
+}
+{ month empty$
+'year
+{ month " " * year * }
+if$
+}
+if$
+}
+FUNCTION {format.btitle}
+{ title emphasize
+}
+FUNCTION {tie.or.space.connect}
+{ duplicate$ text.length$ #3 <
+{ "~" }
+{ " " }
+if$
+swap$ * *
+}
+FUNCTION {either.or.check}
+{ empty$
+'pop$
+{ "can't use both " swap$ * " fields in " * cite$ * warning$ }
+if$
+}
+FUNCTION {format.bvolume}
+{ volume empty$
+{ "" }
+{ "volume" volume tie.or.space.connect
+series empty$
+'skip$
+{ " of " * series emphasize * }
+if$
+"volume and number" number either.or.check
+}
+if$
+}
+FUNCTION {format.number.series}
+{ volume empty$
+{ number empty$
+{ series field.or.null }
+{ output.state mid.sentence =
+{ "number" }
+{ "Number" }
+if$
+number tie.or.space.connect
+series empty$
+{ "there's a number but no series in " cite$ * warning$ }
+{ " in " * series * }
+if$
+}
+if$
+}
+{ "" }
+if$
+}
+FUNCTION {format.edition}
+{ edition empty$
+{ "" }
+{ output.state mid.sentence =
+{ edition "l" change.case$ " edition" * }
+{ edition "t" change.case$ " edition" * }
+if$
+}
+if$
+}
+INTEGERS { multiresult }
+FUNCTION {multi.page.check}
+{ 't :=
+#0 'multiresult :=
+{ multiresult not
+t empty$ not
+and
+}
+{ t #1 #1 substring$
+duplicate$ "-" =
+swap$ duplicate$ "," =
+swap$ "+" =
+or or
+{ #1 'multiresult := }
+{ t #2 global.max$ substring$ 't := }
+if$
+}
+while$
+multiresult
+}
+FUNCTION {format.pages}
+{ pages empty$
+{ "" }
+{ pages multi.page.check
+{ "pages" pages n.dashify tie.or.space.connect }
+{ "page" pages tie.or.space.connect }
+if$
+}
+if$
+}
+FUNCTION {format.vol.num.pages}
+{ volume field.or.null
+number empty$
+'skip$
+{ "(" number * ")" * *
+volume empty$
+{ "there's a number but no volume in " cite$ * warning$ }
+'skip$
+if$
+}
+if$
+pages empty$
+'skip$
+{ duplicate$ empty$
+{ pop$ format.pages }
+{ ":" * pages n.dashify * }
+if$
+}
+if$
+}
+FUNCTION {format.chapter.pages}
+{ chapter empty$
+'format.pages
+{ type empty$
+{ "chapter" }
+{ type "l" change.case$ }
+if$
+chapter tie.or.space.connect
+pages empty$
+'skip$
+{ ", " * format.pages * }
+if$
+}
+if$
+}
+FUNCTION {format.in.ed.booktitle}
+{ booktitle empty$
+{ "" }
+{ editor empty$
+{ "In " booktitle emphasize * }
+{ "In " format.editors * ", " * booktitle emphasize * }
+if$
+}
+if$
+}
+FUNCTION {empty.misc.check}
+{ author empty$ title empty$ howpublished empty$
+month empty$ year empty$ note empty$
+and and and and and
+key empty$ not and
+{ "all relevant fields are empty in " cite$ * warning$ }
+'skip$
+if$
+}
+FUNCTION {format.thesis.type}
+{ type empty$
+'skip$
+{ pop$
+type "t" change.case$
+}
+if$
+}
+FUNCTION {format.tr.number}
+{ type empty$
+{ "Technical Report" }
+'type
+if$
+number empty$
+{ "t" change.case$ }
+{ number tie.or.space.connect }
+if$
+}
+FUNCTION {format.article.crossref}
+{ key empty$
+{ journal empty$
+{ "need key or journal for " cite$ * " to crossref " * crossref *
+warning$
+""
+}
+{ "In {\em " journal * "\/}" * }
+if$
+}
+{ "In " key * }
+if$
+" <span class='cite'>" * crossref * "</span>" *
+}
+FUNCTION {format.crossref.editor}
+{ editor #1 "{vv~}{ll}" format.name$
+editor num.names$ duplicate$
+#2 >
+{ pop$ " et~al." * }
+{ #2 <
+'skip$
+{ editor #2 "{ff }{vv }{ll}{ jj}" format.name$ "others" =
+{ " et~al." * }
+{ " and " * editor #2 "{vv~}{ll}" format.name$ * }
+if$
+}
+if$
+}
+if$
+}
+FUNCTION {format.book.crossref}
+{ volume empty$
+{ "empty volume in " cite$ * "'s crossref of " * crossref * warning$
+"In "
+}
+{ "Volume" volume tie.or.space.connect
+" of " *
+}
+if$
+editor empty$
+editor field.or.null author field.or.null =
+or
+{ key empty$
+{ series empty$
+{ "need editor, key, or series for " cite$ * " to crossref " *
+crossref * warning$
+"" *
+}
+{ "<em>" * series * "</em>" * }
+if$
+}
+{ key * }
+if$
+}
+{ format.crossref.editor * }
+if$
+" <span class='cite'>" * crossref * "</span>" *
+}
+FUNCTION {format.incoll.inproc.crossref}
+{ editor empty$
+editor field.or.null author field.or.null =
+or
+{ key empty$
+{ booktitle empty$
+{ "need editor, key, or booktitle for " cite$ * " to crossref " *
+crossref * warning$
+""
+}
+{ "In <em>" booktitle * "</em>" * }
+if$
+}
+{ "In " key * }
+if$
+}
+{ "In " format.crossref.editor * }
+if$
+" <span class='cite'>" * crossref * "</span>" *
+}
+FUNCTION {make.href}
+{
+"<a href='" swap$ * "'><code>" * swap$ * "</code></a>" *
+}
+FUNCTION {format.url}
+{ inlinelinks #1 = url empty$ or
+{ "" }
+{ urlintro "<code>" * url * "</code>" * }
+if$
+}
+FUNCTION {format.eprint}
+{ eprint empty$
+{ "" }
+{ eprintprefix eprint * eprinturl eprint * make.href }
+if$
+}
+FUNCTION {format.doi}
+{ doi empty$
+{ "" }
+{ doiform #0 =
+{ doiprefix doi * doiurl doi * make.href }
+{ "DOI:{" doi * "}" * }
+if$
+}
+if$
+}
+FUNCTION {format.pubmed}
+{ pubmed empty$
+{ "" }
+{ pubmedprefix pubmed * pubmedurl pubmed * make.href }
+if$
+}
+FUNCTION {output.url}
+{ url empty$
+'skip$
+{ new.block
+format.url output
+format.lastchecked output
+}
+if$
+}
+FUNCTION {output.web.refs}
+{
+new.block
+output.url
+addeprints eprint empty$ not and
+{ format.eprint output.nonnull }
+'skip$
+if$
+adddoiresolver doi empty$ not and
+{ format.doi output.nonnull }
+'skip$
+if$
+addpubmedresolver pubmed empty$ not and
+{ format.pubmed output.nonnull }
+'skip$
+if$
+}
+FUNCTION {output.bibitem}
+{ outside.brackets 'bracket.state :=
+output.bibitem.original
+inlinelinks url empty$ not and
+{ #1 'makeinlinelink := }
+{ #0 'makeinlinelink := }
+if$
+}
+FUNCTION {fin.entry}
+{ output.web.refs % urlbst
+makeinlinelink % ooops, it appears we didn't have a title for inlinelink
+{ possibly.setup.inlinelink % add some artificial link text here, as a fallback
+"[link]" output.nonnull }
+'skip$
+if$
+bracket.state close.brackets = % urlbst
+{ "]" * }
+'skip$
+if$
+fin.entry.original
+}
+FUNCTION {webpage}
+{ output.bibitem
+author empty$
+{ editor empty$
+'skip$ % author and editor both optional
+{ format.editors output.nonnull }
+if$
+}
+{ editor empty$
+{ format.authors output.nonnull }
+{ "can't use both author and editor fields in " cite$ * warning$ }
+if$
+}
+if$
+new.block
+title empty$ 'skip$ 'possibly.setup.inlinelink if$
+format.title "title" output.check
+inbrackets "online" output
+new.block
+year empty$
+'skip$
+{ format.date "year" output.check }
+if$
+new.block
+note output
+fin.entry
+}
+FUNCTION {article}
+{ output.bibitem
+format.authors "author" output.check
+new.block
+title empty$ 'skip$ 'possibly.setup.inlinelink if$ % urlbst
+format.title "title" output.check
+new.block
+crossref missing$
+{ journal emphasize "journal" output.check
+possibly.setup.inlinelink format.vol.num.pages output% urlbst
+format.date "year" output.check
+}
+{ format.article.crossref output.nonnull
+format.pages output
+}
+if$
+new.block
+note output
+fin.entry
+}
+FUNCTION {book}
+{ output.bibitem
+author empty$
+{ format.editors "author and editor" output.check }
+{ format.authors output.nonnull
+crossref missing$
+{ "author and editor" editor either.or.check }
+'skip$
+if$
+}
+if$
+new.block
+title empty$ 'skip$ 'possibly.setup.inlinelink if$ % urlbst
+format.btitle "title" output.check
+crossref missing$
+{ format.bvolume output
+new.block
+format.number.series output
+new.sentence
+publisher "publisher" output.check
+address output
+}
+{ new.block
+format.book.crossref output.nonnull
+}
+if$
+format.edition output
+format.date "year" output.check
+new.block
+note output
+fin.entry
+}
+FUNCTION {booklet}
+{ output.bibitem
+format.authors output
+new.block
+title empty$ 'skip$ 'possibly.setup.inlinelink if$ % urlbst
+format.title "title" output.check
+howpublished address new.block.checkb
+howpublished output
+address output
+format.date output
+new.block
+note output
+fin.entry
+}
+FUNCTION {inbook}
+{ output.bibitem
+author empty$
+{ format.editors "author and editor" output.check }
+{ format.authors output.nonnull
+crossref missing$
+{ "author and editor" editor either.or.check }
+'skip$
+if$
+}
+if$
+new.block
+title empty$ 'skip$ 'possibly.setup.inlinelink if$ % urlbst
+format.btitle "title" output.check
+crossref missing$
+{ format.bvolume output
+format.chapter.pages "chapter and pages" output.check
+new.block
+format.number.series output
+new.sentence
+publisher "publisher" output.check
+address output
+}
+{ format.chapter.pages "chapter and pages" output.check
+new.block
+format.book.crossref output.nonnull
+}
+if$
+format.edition output
+format.date "year" output.check
+new.block
+note output
+fin.entry
+}
+FUNCTION {incollection}
+{ output.bibitem
+format.authors "author" output.check
+new.block
+title empty$ 'skip$ 'possibly.setup.inlinelink if$ % urlbst
+format.title "title" output.check
+new.block
+crossref missing$
+{ format.in.ed.booktitle "booktitle" output.check
+format.bvolume output
+format.number.series output
+format.chapter.pages output
+new.sentence
+publisher "publisher" output.check
+address output
+format.edition output
+format.date "year" output.check
+}
+{ format.incoll.inproc.crossref output.nonnull
+format.chapter.pages output
+}
+if$
+new.block
+note output
+fin.entry
+}
+FUNCTION {inproceedings}
+{ output.bibitem
+format.authors "author" output.check
+new.block
+title empty$ 'skip$ 'possibly.setup.inlinelink if$ % urlbst
+format.title "title" output.check
+new.block
+crossref missing$
+{ format.in.ed.booktitle "booktitle" output.check
+format.bvolume output
+format.number.series output
+format.pages output
+address empty$
+{ organization publisher new.sentence.checkb
+organization output
+publisher output
+format.date "year" output.check
+}
+{ address output.nonnull
+format.date "year" output.check
+new.sentence
+organization output
+publisher output
+}
+if$
+}
+{ format.incoll.inproc.crossref output.nonnull
+format.pages output
+}
+if$
+new.block
+note output
+fin.entry
+}
+FUNCTION {conference} { inproceedings }
+FUNCTION {manual}
+{ output.bibitem
+author empty$
+{ organization empty$
+'skip$
+{ organization output.nonnull
+address output
+}
+if$
+}
+{ format.authors output.nonnull }
+if$
+new.block
+title empty$ 'skip$ 'possibly.setup.inlinelink if$ % urlbst
+format.btitle "title" output.check
+author empty$
+{ organization empty$
+{ address new.block.checka
+address output
+}
+'skip$
+if$
+}
+{ organization address new.block.checkb
+organization output
+address output
+}
+if$
+format.edition output
+format.date output
+new.block
+note output
+fin.entry
+}
+FUNCTION {mastersthesis}
+{ output.bibitem
+format.authors "author" output.check
+new.block
+title empty$ 'skip$ 'possibly.setup.inlinelink if$ % urlbst
+format.title "title" output.check
+new.block
+"Master's thesis" format.thesis.type output.nonnull
+school "school" output.check
+address output
+format.date "year" output.check
+new.block
+note output
+fin.entry
+}
+FUNCTION {misc}
+{ output.bibitem
+format.authors output
+title howpublished new.block.checkb
+title empty$ 'skip$ 'possibly.setup.inlinelink if$ % urlbst
+format.title output
+howpublished new.block.checka
+howpublished output
+format.date output
+new.block
+note output
+fin.entry
+empty.misc.check
+}
+FUNCTION {phdthesis}
+{ output.bibitem
+format.authors "author" output.check
+new.block
+title empty$ 'skip$ 'possibly.setup.inlinelink if$ % urlbst
+format.btitle "title" output.check
+new.block
+"PhD thesis" format.thesis.type output.nonnull
+school "school" output.check
+address output
+format.date "year" output.check
+new.block
+note output
+fin.entry
+}
+FUNCTION {proceedings}
+{ output.bibitem
+editor empty$
+{ organization output }
+{ format.editors output.nonnull }
+if$
+new.block
+title empty$ 'skip$ 'possibly.setup.inlinelink if$ % urlbst
+format.btitle "title" output.check
+format.bvolume output
+format.number.series output
+address empty$
+{ editor empty$
+{ publisher new.sentence.checka }
+{ organization publisher new.sentence.checkb
+organization output
+}
+if$
+publisher output
+format.date "year" output.check
+}
+{ address output.nonnull
+format.date "year" output.check
+new.sentence
+editor empty$
+'skip$
+{ organization output }
+if$
+publisher output
+}
+if$
+new.block
+note output
+fin.entry
+}
+FUNCTION {techreport}
+{ output.bibitem
+format.authors "author" output.check
+new.block
+title empty$ 'skip$ 'possibly.setup.inlinelink if$ % urlbst
+format.title "title" output.check
+new.block
+format.tr.number output.nonnull
+institution "institution" output.check
+address output
+format.date "year" output.check
+new.block
+note output
+fin.entry
+}
+FUNCTION {unpublished}
+{ output.bibitem
+format.authors "author" output.check
+new.block
+title empty$ 'skip$ 'possibly.setup.inlinelink if$ % urlbst
+format.title "title" output.check
+new.block
+note "note" output.check
+format.date output
+fin.entry
+}
+FUNCTION {default.type} { misc }
+MACRO {jan} {"January"}
+MACRO {feb} {"February"}
+MACRO {mar} {"March"}
+MACRO {apr} {"April"}
+MACRO {may} {"May"}
+MACRO {jun} {"June"}
+MACRO {jul} {"July"}
+MACRO {aug} {"August"}
+MACRO {sep} {"September"}
+MACRO {oct} {"October"}
+MACRO {nov} {"November"}
+MACRO {dec} {"December"}
+MACRO {acmcs} {"ACM Computing Surveys"}
+MACRO {acta} {"Acta Informatica"}
+MACRO {cacm} {"Communications of the ACM"}
+MACRO {ibmjrd} {"IBM Journal of Research and Development"}
+MACRO {ibmsj} {"IBM Systems Journal"}
+MACRO {ieeese} {"IEEE Transactions on Software Engineering"}
+MACRO {ieeetc} {"IEEE Transactions on Computers"}
+MACRO {ieeetcad}
+{"IEEE Transactions on Computer-Aided Design of Integrated Circuits"}
+MACRO {ipl} {"Information Processing Letters"}
+MACRO {jacm} {"Journal of the ACM"}
+MACRO {jcss} {"Journal of Computer and System Sciences"}
+MACRO {scp} {"Science of Computer Programming"}
+MACRO {sicomp} {"SIAM Journal on Computing"}
+MACRO {tocs} {"ACM Transactions on Computer Systems"}
+MACRO {tods} {"ACM Transactions on Database Systems"}
+MACRO {tog} {"ACM Transactions on Graphics"}
+MACRO {toms} {"ACM Transactions on Mathematical Software"}
+MACRO {toois} {"ACM Transactions on Office Information Systems"}
+MACRO {toplas} {"ACM Transactions on Programming Languages and Systems"}
+MACRO {tcs} {"Theoretical Computer Science"}
+READ
+FUNCTION {sortify}
+{ purify$
+"l" change.case$
+}
+INTEGERS { len }
+FUNCTION {chop.word}
+{ 's :=
+'len :=
+s #1 len substring$ =
+{ s len #1 + global.max$ substring$ }
+'s
+if$
+}
+INTEGERS { et.al.char.used }
+FUNCTION {initialize.et.al.char.used}
+{ #0 'et.al.char.used :=
+}
+EXECUTE {initialize.et.al.char.used}
+FUNCTION {format.lab.names}
+{ 's :=
+s num.names$ 'numnames :=
+numnames #1 >
+{ numnames #4 >
+{ #3 'namesleft := }
+{ numnames 'namesleft := }
+if$
+#1 'nameptr :=
+""
+{ namesleft #0 > }
+{ nameptr numnames =
+{ s nameptr "{ff }{vv }{ll}{ jj}" format.name$ "others" =
+{ "{\etalchar{+}}" *
+#1 'et.al.char.used :=
+}
+{ s nameptr "{v{}}{l{}}" format.name$ * }
+if$
+}
+{ s nameptr "{v{}}{l{}}" format.name$ * }
+if$
+nameptr #1 + 'nameptr :=
+namesleft #1 - 'namesleft :=
+}
+while$
+numnames #4 >
+{ "{\etalchar{+}}" *
+#1 'et.al.char.used :=
+}
+'skip$
+if$
+}
+{ s #1 "{v{}}{l{}}" format.name$
+duplicate$ text.length$ #2 <
+{ pop$ s #1 "{ll}" format.name$ #3 text.prefix$ }
+'skip$
+if$
+}
+if$
+}
+FUNCTION {author.key.label}
+{ author empty$
+{ key empty$
+{ cite$ #1 #3 substring$ }
+{ key #3 text.prefix$ }
+if$
+}
+{ author format.lab.names }
+if$
+}
+FUNCTION {author.editor.key.label}
+{ author empty$
+{ editor empty$
+{ key empty$
+{ cite$ #1 #3 substring$ }
+{ key #3 text.prefix$ }
+if$
+}
+{ editor format.lab.names }
+if$
+}
+{ author format.lab.names }
+if$
+}
+FUNCTION {author.key.organization.label}
+{ author empty$
+{ key empty$
+{ organization empty$
+{ cite$ #1 #3 substring$ }
+{ "The " #4 organization chop.word #3 text.prefix$ }
+if$
+}
+{ key #3 text.prefix$ }
+if$
+}
+{ author format.lab.names }
+if$
+}
+FUNCTION {editor.key.organization.label}
+{ editor empty$
+{ key empty$
+{ organization empty$
+{ cite$ #1 #3 substring$ }
+{ "The " #4 organization chop.word #3 text.prefix$ }
+if$
+}
+{ key #3 text.prefix$ }
+if$
+}
+{ editor format.lab.names }
+if$
+}
+FUNCTION {calc.label}
+{ type$ "book" =
+type$ "inbook" =
+or
+'author.editor.key.label
+{ type$ "proceedings" =
+'editor.key.organization.label
+{ type$ "manual" =
+'author.key.organization.label
+'author.key.label
+if$
+}
+if$
+}
+if$
+duplicate$
+year field.or.null purify$ #-1 #2 substring$
+*
+'label :=
+year field.or.null purify$ #-1 #4 substring$
+*
+sortify 'sort.label :=
+}
+FUNCTION {sort.format.names}
+{ 's :=
+#1 'nameptr :=
+""
+s num.names$ 'numnames :=
+numnames 'namesleft :=
+{ namesleft #0 > }
+{ nameptr #1 >
+{ " " * }
+'skip$
+if$
+s nameptr "{vv{ } }{ll{ }}{ ff{ }}{ jj{ }}" format.name$ 't :=
+nameptr numnames = t "others" = and
+{ "et al" * }
+{ t sortify * }
+if$
+nameptr #1 + 'nameptr :=
+namesleft #1 - 'namesleft :=
+}
+while$
+}
+FUNCTION {sort.format.title}
+{ 't :=
+"A " #2
+"An " #3
+"The " #4 t chop.word
+chop.word
+chop.word
+sortify
+#1 global.max$ substring$
+}
+FUNCTION {author.sort}
+{ author empty$
+{ key empty$
+{ "to sort, need author or key in " cite$ * warning$
+""
+}
+{ key sortify }
+if$
+}
+{ author sort.format.names }
+if$
+}
+FUNCTION {author.editor.sort}
+{ author empty$
+{ editor empty$
+{ key empty$
+{ "to sort, need author, editor, or key in " cite$ * warning$
+""
+}
+{ key sortify }
+if$
+}
+{ editor sort.format.names }
+if$
+}
+{ author sort.format.names }
+if$
+}
+FUNCTION {author.organization.sort}
+{ author empty$
+{ organization empty$
+{ key empty$
+{ "to sort, need author, organization, or key in " cite$ * warning$
+""
+}
+{ key sortify }
+if$
+}
+{ "The " #4 organization chop.word sortify }
+if$
+}
+{ author sort.format.names }
+if$
+}
+FUNCTION {editor.organization.sort}
+{ editor empty$
+{ organization empty$
+{ key empty$
+{ "to sort, need editor, organization, or key in " cite$ * warning$
+""
+}
+{ key sortify }
+if$
+}
+{ "The " #4 organization chop.word sortify }
+if$
+}
+{ editor sort.format.names }
+if$
+}
+FUNCTION {presort}
+{ calc.label
+ year field.or.null sortify
+ " "
+ *
+ sort.label
+ *
+" "
+*
+type$ "book" =
+type$ "inbook" =
+or
+'author.editor.sort
+{ type$ "proceedings" =
+'editor.organization.sort
+{ type$ "manual" =
+'author.organization.sort
+'author.sort
+if$
+}
+if$
+}
+if$
+*
+" "
+*
+year field.or.null sortify
+*
+" "
+*
+title field.or.null
+sort.format.title
+*
+#1 entry.max$ substring$
+'sort.key$ :=
+}
+ITERATE {presort}
+SORT
+STRINGS { longest.label last.sort.label next.extra }
+INTEGERS { longest.label.width last.extra.num }
+FUNCTION {initialize.longest.label}
+{ "" 'longest.label :=
+#0 int.to.chr$ 'last.sort.label :=
+"" 'next.extra :=
+#0 'longest.label.width :=
+#0 'last.extra.num :=
+}
+FUNCTION {forward.pass}
+{ last.sort.label sort.label =
+{ last.extra.num #1 + 'last.extra.num :=
+last.extra.num int.to.chr$ 'extra.label :=
+}
+{ "a" chr.to.int$ 'last.extra.num :=
+"" 'extra.label :=
+sort.label 'last.sort.label :=
+}
+if$
+}
+FUNCTION {reverse.pass}
+{ next.extra "b" =
+{ "a" 'extra.label := }
+'skip$
+if$
+label extra.label * 'label :=
+label width$ longest.label.width >
+{ label 'longest.label :=
+label width$ 'longest.label.width :=
+}
+'skip$
+if$
+extra.label 'next.extra :=
+}
+EXECUTE {initialize.longest.label}
+ITERATE {forward.pass}
+REVERSE {reverse.pass}
+%%% XXX The macro \etalchar is generated in function format.lab.names.
+%%% I have no idea what format.lab.names does,
+%%% and it doesn't seem to do anything in my test cases.
+%%% However the \etalchar definition messes up the HTML output,
+%%% so I'll simply skip that for now...
+FUNCTION {begin.bib}
+{ %et.al.char.used
+preamble$ empty$
+'skip$
+{ preamble$ write$ newline$ }
+if$
+"<dl>" write$ newline$
+}
+EXECUTE {begin.bib}
+EXECUTE {init.urlbst.variables}
+EXECUTE {init.state.consts}
+ITERATE {call.type$}
+FUNCTION {end.bib}
+{ newline$
+"</dl>" write$ newline$
+}
+EXECUTE {end.bib}
diff --git a/biblio/bibtex/contrib/bibhtml/alphahtmldater.bst b/biblio/bibtex/contrib/bibhtml/alphahtmldater.bst
new file mode 100644
index 0000000000..75d0a9feb3
--- /dev/null
+++ b/biblio/bibtex/contrib/bibhtml/alphahtmldater.bst
@@ -0,0 +1,1362 @@
+%%
+%% DO NOT EDIT
+%%
+%% This is alphahtmldater.bst, edited from alphahtml.bst by alphahtmldater.sed
+%%
+%% alphahtml.bst
+%%
+%% Part of bibhtml, version 2.0.2, released 2013 September 8
+%% Hg node 7076ce83a035.
+%% See <http://purl.org/nxg/dist/bibhtml>
+%%
+%% Copyright 1999, 2005, 2006, 2009, Norman Gray <norman@astro.gla.ac.uk>
+%%
+%% This is a modification of a modification!
+%%
+%%% Modification of BibTeX style file /usr/local/texlive/2008/texmf-dist/bibtex/bst/base/alpha.bst
+%%% ... by urlbst, version 0.6-4 (marked with "% urlbst")
+%%% See <http://purl.org/nxg/dist/urlbst>
+%%% Added webpage entry type, and url and lastchecked fields.
+%%% Added eprint support.
+%%% Added DOI support.
+%%% Added PUBMED support.
+%%% Added hyperref support.
+%%% Original headers follow...
+ENTRY
+{ address
+author
+booktitle
+chapter
+edition
+editor
+howpublished
+institution
+journal
+key
+month
+note
+number
+organization
+pages
+publisher
+school
+series
+title
+type
+volume
+year
+eprint % urlbst
+doi % urlbst
+pubmed % urlbst
+url % urlbst
+lastchecked % urlbst
+}
+{}
+{ label extra.label sort.label }
+INTEGERS { output.state before.all mid.sentence after.sentence after.block doiform }
+STRINGS { urlintro eprinturl eprintprefix doiprefix doiurl pubmedprefix pubmedurl openinlinelink closeinlinelink } % urlbst...
+INTEGERS { inlinelinks makeinlinelink addeprints adddoiresolver addpubmedresolver }
+FUNCTION {init.urlbst.variables}
+{
+"Available from: " 'urlintro := % prefix before URL
+"http://arxiv.org/abs/" 'eprinturl := % prefix to make URL from eprint ref
+"arXiv:" 'eprintprefix := % text prefix printed before eprint ref
+"http://dx.doi.org/" 'doiurl := % prefix to make URL from DOI
+"doi:" 'doiprefix := % text prefix printed before DOI ref
+"http://www.ncbi.nlm.nih.gov/pubmed/" 'pubmedurl := % prefix to make URL from PUBMED
+"PMID:" 'pubmedprefix := % text prefix printed before PUBMED ref
+#1 'addeprints := % 0=no eprints; 1=include eprints
+#1 'adddoiresolver := % 0=no DOI resolver; 1=include it
+#1 'addpubmedresolver := % 0=no PUBMED resolver; 1=include it
+#1 'inlinelinks := % 0=URLs explicit; 1=URLs attached to titles
+#1 'doiform := % 0=simple, but can produce invalid HTML; 1=needs post-processing
+#0 'makeinlinelink := % state variable managed by possibly.setup.inlinelink
+"" 'openinlinelink := % ditto
+"" 'closeinlinelink := % ditto
+}
+INTEGERS {
+bracket.state
+outside.brackets
+open.brackets
+within.brackets
+close.brackets
+close.first.block
+}
+FUNCTION {init.state.consts}
+{ #0 'outside.brackets := % urlbst
+#1 'open.brackets :=
+#2 'within.brackets :=
+#3 'close.brackets :=
+#0 'before.all :=
+#1 'mid.sentence :=
+#2 'after.sentence :=
+#3 'after.block :=
+#0 'close.first.block :=
+}
+STRINGS { s t }
+FUNCTION {output.nonnull.original}
+{ 's :=
+output.state mid.sentence =
+{ ", " * write$ }
+{ output.state after.block =
+{ add.period$ write$
+close.first.block
+{ "</a></dt>" write$ newline$ "<dd>" write$
+#0 'close.first.block := }
+{ newline$ }
+if$
+}
+{ output.state before.all =
+'write$
+{ add.period$ " " * write$ }
+if$
+}
+if$
+mid.sentence 'output.state :=
+}
+if$
+s
+}
+FUNCTION {possibly.setup.inlinelink}
+{ makeinlinelink
+{ "<a href=" quote$ * url * quote$ * ">" * 'openinlinelink :=
+"</a>" 'closeinlinelink :=
+#0 'makeinlinelink := }
+'skip$
+if$ % makeinlinelink
+}
+FUNCTION {add.inlinelink}
+{ openinlinelink empty$
+'skip$
+{ openinlinelink swap$ * closeinlinelink *
+"" 'openinlinelink :=
+}
+if$
+}
+FUNCTION {output.nonnull}
+{ % Save the thing we've been asked to output
+'s :=
+bracket.state close.brackets =
+{ "]" *
+outside.brackets 'bracket.state :=
+}
+'skip$
+if$
+bracket.state outside.brackets =
+{ % We're outside all brackets -- this is the normal situation.
+s
+add.inlinelink
+output.nonnull.original % invoke the original output.nonnull
+}
+{ % Still in brackets. Add open-bracket or (continuation) comma, add the
+bracket.state open.brackets =
+{ " [" * }
+{ ", " * } % bracket.state will be within.brackets
+if$
+s *
+close.brackets 'bracket.state :=
+}
+if$
+}
+FUNCTION {inbrackets}
+{ bracket.state close.brackets =
+{ within.brackets 'bracket.state := } % reset the state: not open nor closed
+{ open.brackets 'bracket.state := }
+if$
+}
+FUNCTION {format.lastchecked}
+{ lastchecked empty$
+{ "" }
+{ inbrackets "cited " lastchecked * }
+if$
+}
+FUNCTION {output}
+{ duplicate$ empty$
+'pop$
+'output.nonnull
+if$
+}
+FUNCTION {output.check}
+{ 't :=
+duplicate$ empty$
+{ pop$ "empty " t * " in " * cite$ * warning$ }
+'output.nonnull
+if$
+}
+FUNCTION {output.bibitem.original}
+{ newline$
+"<dt><a name='" write$
+cite$ write$
+"'>[" cite$ * "] " * write$
+#1 'close.first.block :=
+newline$
+""
+before.all 'output.state :=
+}
+FUNCTION {fin.entry.original}
+{ add.period$ "</dd>" *
+write$
+newline$
+}
+FUNCTION {new.block}
+{ output.state before.all =
+'skip$
+{ after.block 'output.state := }
+if$
+}
+FUNCTION {new.sentence}
+{ output.state after.block =
+'skip$
+{ output.state before.all =
+'skip$
+{ after.sentence 'output.state := }
+if$
+}
+if$
+}
+FUNCTION {not}
+{ { #0 }
+{ #1 }
+if$
+}
+FUNCTION {and}
+{ 'skip$
+{ pop$ #0 }
+if$
+}
+FUNCTION {or}
+{ { pop$ #1 }
+'skip$
+if$
+}
+FUNCTION {new.block.checka}
+{ empty$
+'skip$
+'new.block
+if$
+}
+FUNCTION {new.block.checkb}
+{ empty$
+swap$ empty$
+and
+'skip$
+'new.block
+if$
+}
+FUNCTION {new.sentence.checka}
+{ empty$
+'skip$
+'new.sentence
+if$
+}
+FUNCTION {new.sentence.checkb}
+{ empty$
+swap$ empty$
+and
+'skip$
+'new.sentence
+if$
+}
+FUNCTION {field.or.null}
+{ duplicate$ empty$
+{ pop$ "" }
+'skip$
+if$
+}
+FUNCTION {emphasize}
+{ duplicate$ empty$
+{ pop$ "" }
+{ "<em>" swap$ * "</em>" * }
+if$
+}
+INTEGERS { nameptr namesleft numnames }
+FUNCTION {format.names}
+{ 's :=
+#1 'nameptr :=
+s num.names$ 'numnames :=
+numnames 'namesleft :=
+{ namesleft #0 > }
+{ s nameptr "{ff~}{vv~}{ll}{, jj}" format.name$ 't :=
+nameptr #1 >
+{ namesleft #1 >
+{ ", " * t * }
+{ numnames #2 >
+{ "," * }
+'skip$
+if$
+t "others" =
+{ " et~al." * }
+{ " and " * t * }
+if$
+}
+if$
+}
+'t
+if$
+nameptr #1 + 'nameptr :=
+namesleft #1 - 'namesleft :=
+}
+while$
+}
+FUNCTION {format.authors}
+{ author empty$
+{ "" }
+{ author format.names }
+if$
+}
+FUNCTION {format.editors}
+{ editor empty$
+{ "" }
+{ editor format.names
+editor num.names$ #1 >
+{ ", editors" * }
+{ ", editor" * }
+if$
+}
+if$
+}
+FUNCTION {format.title}
+{ title empty$
+{ "" }
+{ title "t" change.case$ }
+if$
+}
+FUNCTION {n.dashify}
+{ 't :=
+""
+{ t empty$ not }
+{ t #1 #1 substring$ "-" =
+{ t #1 #2 substring$ "--" = not
+{ "--" *
+t #2 global.max$ substring$ 't :=
+}
+{ { t #1 #1 substring$ "-" = }
+{ "-" *
+t #2 global.max$ substring$ 't :=
+}
+while$
+}
+if$
+}
+{ t #1 #1 substring$ *
+t #2 global.max$ substring$ 't :=
+}
+if$
+}
+while$
+}
+FUNCTION {format.date}
+{ year empty$
+{ month empty$
+{ "" }
+{ "there's a month but no year in " cite$ * warning$
+month
+}
+if$
+}
+{ month empty$
+'year
+{ month " " * year * }
+if$
+}
+if$
+}
+FUNCTION {format.btitle}
+{ title emphasize
+}
+FUNCTION {tie.or.space.connect}
+{ duplicate$ text.length$ #3 <
+{ "~" }
+{ " " }
+if$
+swap$ * *
+}
+FUNCTION {either.or.check}
+{ empty$
+'pop$
+{ "can't use both " swap$ * " fields in " * cite$ * warning$ }
+if$
+}
+FUNCTION {format.bvolume}
+{ volume empty$
+{ "" }
+{ "volume" volume tie.or.space.connect
+series empty$
+'skip$
+{ " of " * series emphasize * }
+if$
+"volume and number" number either.or.check
+}
+if$
+}
+FUNCTION {format.number.series}
+{ volume empty$
+{ number empty$
+{ series field.or.null }
+{ output.state mid.sentence =
+{ "number" }
+{ "Number" }
+if$
+number tie.or.space.connect
+series empty$
+{ "there's a number but no series in " cite$ * warning$ }
+{ " in " * series * }
+if$
+}
+if$
+}
+{ "" }
+if$
+}
+FUNCTION {format.edition}
+{ edition empty$
+{ "" }
+{ output.state mid.sentence =
+{ edition "l" change.case$ " edition" * }
+{ edition "t" change.case$ " edition" * }
+if$
+}
+if$
+}
+INTEGERS { multiresult }
+FUNCTION {multi.page.check}
+{ 't :=
+#0 'multiresult :=
+{ multiresult not
+t empty$ not
+and
+}
+{ t #1 #1 substring$
+duplicate$ "-" =
+swap$ duplicate$ "," =
+swap$ "+" =
+or or
+{ #1 'multiresult := }
+{ t #2 global.max$ substring$ 't := }
+if$
+}
+while$
+multiresult
+}
+FUNCTION {format.pages}
+{ pages empty$
+{ "" }
+{ pages multi.page.check
+{ "pages" pages n.dashify tie.or.space.connect }
+{ "page" pages tie.or.space.connect }
+if$
+}
+if$
+}
+FUNCTION {format.vol.num.pages}
+{ volume field.or.null
+number empty$
+'skip$
+{ "(" number * ")" * *
+volume empty$
+{ "there's a number but no volume in " cite$ * warning$ }
+'skip$
+if$
+}
+if$
+pages empty$
+'skip$
+{ duplicate$ empty$
+{ pop$ format.pages }
+{ ":" * pages n.dashify * }
+if$
+}
+if$
+}
+FUNCTION {format.chapter.pages}
+{ chapter empty$
+'format.pages
+{ type empty$
+{ "chapter" }
+{ type "l" change.case$ }
+if$
+chapter tie.or.space.connect
+pages empty$
+'skip$
+{ ", " * format.pages * }
+if$
+}
+if$
+}
+FUNCTION {format.in.ed.booktitle}
+{ booktitle empty$
+{ "" }
+{ editor empty$
+{ "In " booktitle emphasize * }
+{ "In " format.editors * ", " * booktitle emphasize * }
+if$
+}
+if$
+}
+FUNCTION {empty.misc.check}
+{ author empty$ title empty$ howpublished empty$
+month empty$ year empty$ note empty$
+and and and and and
+key empty$ not and
+{ "all relevant fields are empty in " cite$ * warning$ }
+'skip$
+if$
+}
+FUNCTION {format.thesis.type}
+{ type empty$
+'skip$
+{ pop$
+type "t" change.case$
+}
+if$
+}
+FUNCTION {format.tr.number}
+{ type empty$
+{ "Technical Report" }
+'type
+if$
+number empty$
+{ "t" change.case$ }
+{ number tie.or.space.connect }
+if$
+}
+FUNCTION {format.article.crossref}
+{ key empty$
+{ journal empty$
+{ "need key or journal for " cite$ * " to crossref " * crossref *
+warning$
+""
+}
+{ "In {\em " journal * "\/}" * }
+if$
+}
+{ "In " key * }
+if$
+" <span class='cite'>" * crossref * "</span>" *
+}
+FUNCTION {format.crossref.editor}
+{ editor #1 "{vv~}{ll}" format.name$
+editor num.names$ duplicate$
+#2 >
+{ pop$ " et~al." * }
+{ #2 <
+'skip$
+{ editor #2 "{ff }{vv }{ll}{ jj}" format.name$ "others" =
+{ " et~al." * }
+{ " and " * editor #2 "{vv~}{ll}" format.name$ * }
+if$
+}
+if$
+}
+if$
+}
+FUNCTION {format.book.crossref}
+{ volume empty$
+{ "empty volume in " cite$ * "'s crossref of " * crossref * warning$
+"In "
+}
+{ "Volume" volume tie.or.space.connect
+" of " *
+}
+if$
+editor empty$
+editor field.or.null author field.or.null =
+or
+{ key empty$
+{ series empty$
+{ "need editor, key, or series for " cite$ * " to crossref " *
+crossref * warning$
+"" *
+}
+{ "<em>" * series * "</em>" * }
+if$
+}
+{ key * }
+if$
+}
+{ format.crossref.editor * }
+if$
+" <span class='cite'>" * crossref * "</span>" *
+}
+FUNCTION {format.incoll.inproc.crossref}
+{ editor empty$
+editor field.or.null author field.or.null =
+or
+{ key empty$
+{ booktitle empty$
+{ "need editor, key, or booktitle for " cite$ * " to crossref " *
+crossref * warning$
+""
+}
+{ "In <em>" booktitle * "</em>" * }
+if$
+}
+{ "In " key * }
+if$
+}
+{ "In " format.crossref.editor * }
+if$
+" <span class='cite'>" * crossref * "</span>" *
+}
+FUNCTION {make.href}
+{
+"<a href='" swap$ * "'><code>" * swap$ * "</code></a>" *
+}
+FUNCTION {format.url}
+{ inlinelinks #1 = url empty$ or
+{ "" }
+{ urlintro "<code>" * url * "</code>" * }
+if$
+}
+FUNCTION {format.eprint}
+{ eprint empty$
+{ "" }
+{ eprintprefix eprint * eprinturl eprint * make.href }
+if$
+}
+FUNCTION {format.doi}
+{ doi empty$
+{ "" }
+{ doiform #0 =
+{ doiprefix doi * doiurl doi * make.href }
+{ "DOI:{" doi * "}" * }
+if$
+}
+if$
+}
+FUNCTION {format.pubmed}
+{ pubmed empty$
+{ "" }
+{ pubmedprefix pubmed * pubmedurl pubmed * make.href }
+if$
+}
+FUNCTION {output.url}
+{ url empty$
+'skip$
+{ new.block
+format.url output
+format.lastchecked output
+}
+if$
+}
+FUNCTION {output.web.refs}
+{
+new.block
+output.url
+addeprints eprint empty$ not and
+{ format.eprint output.nonnull }
+'skip$
+if$
+adddoiresolver doi empty$ not and
+{ format.doi output.nonnull }
+'skip$
+if$
+addpubmedresolver pubmed empty$ not and
+{ format.pubmed output.nonnull }
+'skip$
+if$
+}
+FUNCTION {output.bibitem}
+{ outside.brackets 'bracket.state :=
+output.bibitem.original
+inlinelinks url empty$ not and
+{ #1 'makeinlinelink := }
+{ #0 'makeinlinelink := }
+if$
+}
+FUNCTION {fin.entry}
+{ output.web.refs % urlbst
+makeinlinelink % ooops, it appears we didn't have a title for inlinelink
+{ possibly.setup.inlinelink % add some artificial link text here, as a fallback
+"[link]" output.nonnull }
+'skip$
+if$
+bracket.state close.brackets = % urlbst
+{ "]" * }
+'skip$
+if$
+fin.entry.original
+}
+FUNCTION {webpage}
+{ output.bibitem
+author empty$
+{ editor empty$
+'skip$ % author and editor both optional
+{ format.editors output.nonnull }
+if$
+}
+{ editor empty$
+{ format.authors output.nonnull }
+{ "can't use both author and editor fields in " cite$ * warning$ }
+if$
+}
+if$
+new.block
+title empty$ 'skip$ 'possibly.setup.inlinelink if$
+format.title "title" output.check
+inbrackets "online" output
+new.block
+year empty$
+'skip$
+{ format.date "year" output.check }
+if$
+new.block
+note output
+fin.entry
+}
+FUNCTION {article}
+{ output.bibitem
+format.authors "author" output.check
+new.block
+title empty$ 'skip$ 'possibly.setup.inlinelink if$ % urlbst
+format.title "title" output.check
+new.block
+crossref missing$
+{ journal emphasize "journal" output.check
+possibly.setup.inlinelink format.vol.num.pages output% urlbst
+format.date "year" output.check
+}
+{ format.article.crossref output.nonnull
+format.pages output
+}
+if$
+new.block
+note output
+fin.entry
+}
+FUNCTION {book}
+{ output.bibitem
+author empty$
+{ format.editors "author and editor" output.check }
+{ format.authors output.nonnull
+crossref missing$
+{ "author and editor" editor either.or.check }
+'skip$
+if$
+}
+if$
+new.block
+title empty$ 'skip$ 'possibly.setup.inlinelink if$ % urlbst
+format.btitle "title" output.check
+crossref missing$
+{ format.bvolume output
+new.block
+format.number.series output
+new.sentence
+publisher "publisher" output.check
+address output
+}
+{ new.block
+format.book.crossref output.nonnull
+}
+if$
+format.edition output
+format.date "year" output.check
+new.block
+note output
+fin.entry
+}
+FUNCTION {booklet}
+{ output.bibitem
+format.authors output
+new.block
+title empty$ 'skip$ 'possibly.setup.inlinelink if$ % urlbst
+format.title "title" output.check
+howpublished address new.block.checkb
+howpublished output
+address output
+format.date output
+new.block
+note output
+fin.entry
+}
+FUNCTION {inbook}
+{ output.bibitem
+author empty$
+{ format.editors "author and editor" output.check }
+{ format.authors output.nonnull
+crossref missing$
+{ "author and editor" editor either.or.check }
+'skip$
+if$
+}
+if$
+new.block
+title empty$ 'skip$ 'possibly.setup.inlinelink if$ % urlbst
+format.btitle "title" output.check
+crossref missing$
+{ format.bvolume output
+format.chapter.pages "chapter and pages" output.check
+new.block
+format.number.series output
+new.sentence
+publisher "publisher" output.check
+address output
+}
+{ format.chapter.pages "chapter and pages" output.check
+new.block
+format.book.crossref output.nonnull
+}
+if$
+format.edition output
+format.date "year" output.check
+new.block
+note output
+fin.entry
+}
+FUNCTION {incollection}
+{ output.bibitem
+format.authors "author" output.check
+new.block
+title empty$ 'skip$ 'possibly.setup.inlinelink if$ % urlbst
+format.title "title" output.check
+new.block
+crossref missing$
+{ format.in.ed.booktitle "booktitle" output.check
+format.bvolume output
+format.number.series output
+format.chapter.pages output
+new.sentence
+publisher "publisher" output.check
+address output
+format.edition output
+format.date "year" output.check
+}
+{ format.incoll.inproc.crossref output.nonnull
+format.chapter.pages output
+}
+if$
+new.block
+note output
+fin.entry
+}
+FUNCTION {inproceedings}
+{ output.bibitem
+format.authors "author" output.check
+new.block
+title empty$ 'skip$ 'possibly.setup.inlinelink if$ % urlbst
+format.title "title" output.check
+new.block
+crossref missing$
+{ format.in.ed.booktitle "booktitle" output.check
+format.bvolume output
+format.number.series output
+format.pages output
+address empty$
+{ organization publisher new.sentence.checkb
+organization output
+publisher output
+format.date "year" output.check
+}
+{ address output.nonnull
+format.date "year" output.check
+new.sentence
+organization output
+publisher output
+}
+if$
+}
+{ format.incoll.inproc.crossref output.nonnull
+format.pages output
+}
+if$
+new.block
+note output
+fin.entry
+}
+FUNCTION {conference} { inproceedings }
+FUNCTION {manual}
+{ output.bibitem
+author empty$
+{ organization empty$
+'skip$
+{ organization output.nonnull
+address output
+}
+if$
+}
+{ format.authors output.nonnull }
+if$
+new.block
+title empty$ 'skip$ 'possibly.setup.inlinelink if$ % urlbst
+format.btitle "title" output.check
+author empty$
+{ organization empty$
+{ address new.block.checka
+address output
+}
+'skip$
+if$
+}
+{ organization address new.block.checkb
+organization output
+address output
+}
+if$
+format.edition output
+format.date output
+new.block
+note output
+fin.entry
+}
+FUNCTION {mastersthesis}
+{ output.bibitem
+format.authors "author" output.check
+new.block
+title empty$ 'skip$ 'possibly.setup.inlinelink if$ % urlbst
+format.title "title" output.check
+new.block
+"Master's thesis" format.thesis.type output.nonnull
+school "school" output.check
+address output
+format.date "year" output.check
+new.block
+note output
+fin.entry
+}
+FUNCTION {misc}
+{ output.bibitem
+format.authors output
+title howpublished new.block.checkb
+title empty$ 'skip$ 'possibly.setup.inlinelink if$ % urlbst
+format.title output
+howpublished new.block.checka
+howpublished output
+format.date output
+new.block
+note output
+fin.entry
+empty.misc.check
+}
+FUNCTION {phdthesis}
+{ output.bibitem
+format.authors "author" output.check
+new.block
+title empty$ 'skip$ 'possibly.setup.inlinelink if$ % urlbst
+format.btitle "title" output.check
+new.block
+"PhD thesis" format.thesis.type output.nonnull
+school "school" output.check
+address output
+format.date "year" output.check
+new.block
+note output
+fin.entry
+}
+FUNCTION {proceedings}
+{ output.bibitem
+editor empty$
+{ organization output }
+{ format.editors output.nonnull }
+if$
+new.block
+title empty$ 'skip$ 'possibly.setup.inlinelink if$ % urlbst
+format.btitle "title" output.check
+format.bvolume output
+format.number.series output
+address empty$
+{ editor empty$
+{ publisher new.sentence.checka }
+{ organization publisher new.sentence.checkb
+organization output
+}
+if$
+publisher output
+format.date "year" output.check
+}
+{ address output.nonnull
+format.date "year" output.check
+new.sentence
+editor empty$
+'skip$
+{ organization output }
+if$
+publisher output
+}
+if$
+new.block
+note output
+fin.entry
+}
+FUNCTION {techreport}
+{ output.bibitem
+format.authors "author" output.check
+new.block
+title empty$ 'skip$ 'possibly.setup.inlinelink if$ % urlbst
+format.title "title" output.check
+new.block
+format.tr.number output.nonnull
+institution "institution" output.check
+address output
+format.date "year" output.check
+new.block
+note output
+fin.entry
+}
+FUNCTION {unpublished}
+{ output.bibitem
+format.authors "author" output.check
+new.block
+title empty$ 'skip$ 'possibly.setup.inlinelink if$ % urlbst
+format.title "title" output.check
+new.block
+note "note" output.check
+format.date output
+fin.entry
+}
+FUNCTION {default.type} { misc }
+MACRO {jan} {"January"}
+MACRO {feb} {"February"}
+MACRO {mar} {"March"}
+MACRO {apr} {"April"}
+MACRO {may} {"May"}
+MACRO {jun} {"June"}
+MACRO {jul} {"July"}
+MACRO {aug} {"August"}
+MACRO {sep} {"September"}
+MACRO {oct} {"October"}
+MACRO {nov} {"November"}
+MACRO {dec} {"December"}
+MACRO {acmcs} {"ACM Computing Surveys"}
+MACRO {acta} {"Acta Informatica"}
+MACRO {cacm} {"Communications of the ACM"}
+MACRO {ibmjrd} {"IBM Journal of Research and Development"}
+MACRO {ibmsj} {"IBM Systems Journal"}
+MACRO {ieeese} {"IEEE Transactions on Software Engineering"}
+MACRO {ieeetc} {"IEEE Transactions on Computers"}
+MACRO {ieeetcad}
+{"IEEE Transactions on Computer-Aided Design of Integrated Circuits"}
+MACRO {ipl} {"Information Processing Letters"}
+MACRO {jacm} {"Journal of the ACM"}
+MACRO {jcss} {"Journal of Computer and System Sciences"}
+MACRO {scp} {"Science of Computer Programming"}
+MACRO {sicomp} {"SIAM Journal on Computing"}
+MACRO {tocs} {"ACM Transactions on Computer Systems"}
+MACRO {tods} {"ACM Transactions on Database Systems"}
+MACRO {tog} {"ACM Transactions on Graphics"}
+MACRO {toms} {"ACM Transactions on Mathematical Software"}
+MACRO {toois} {"ACM Transactions on Office Information Systems"}
+MACRO {toplas} {"ACM Transactions on Programming Languages and Systems"}
+MACRO {tcs} {"Theoretical Computer Science"}
+READ
+FUNCTION {sortify}
+{ purify$
+"l" change.case$
+}
+INTEGERS { len }
+FUNCTION {chop.word}
+{ 's :=
+'len :=
+s #1 len substring$ =
+{ s len #1 + global.max$ substring$ }
+'s
+if$
+}
+INTEGERS { et.al.char.used }
+FUNCTION {initialize.et.al.char.used}
+{ #0 'et.al.char.used :=
+}
+EXECUTE {initialize.et.al.char.used}
+FUNCTION {format.lab.names}
+{ 's :=
+s num.names$ 'numnames :=
+numnames #1 >
+{ numnames #4 >
+{ #3 'namesleft := }
+{ numnames 'namesleft := }
+if$
+#1 'nameptr :=
+""
+{ namesleft #0 > }
+{ nameptr numnames =
+{ s nameptr "{ff }{vv }{ll}{ jj}" format.name$ "others" =
+{ "{\etalchar{+}}" *
+#1 'et.al.char.used :=
+}
+{ s nameptr "{v{}}{l{}}" format.name$ * }
+if$
+}
+{ s nameptr "{v{}}{l{}}" format.name$ * }
+if$
+nameptr #1 + 'nameptr :=
+namesleft #1 - 'namesleft :=
+}
+while$
+numnames #4 >
+{ "{\etalchar{+}}" *
+#1 'et.al.char.used :=
+}
+'skip$
+if$
+}
+{ s #1 "{v{}}{l{}}" format.name$
+duplicate$ text.length$ #2 <
+{ pop$ s #1 "{ll}" format.name$ #3 text.prefix$ }
+'skip$
+if$
+}
+if$
+}
+FUNCTION {author.key.label}
+{ author empty$
+{ key empty$
+{ cite$ #1 #3 substring$ }
+{ key #3 text.prefix$ }
+if$
+}
+{ author format.lab.names }
+if$
+}
+FUNCTION {author.editor.key.label}
+{ author empty$
+{ editor empty$
+{ key empty$
+{ cite$ #1 #3 substring$ }
+{ key #3 text.prefix$ }
+if$
+}
+{ editor format.lab.names }
+if$
+}
+{ author format.lab.names }
+if$
+}
+FUNCTION {author.key.organization.label}
+{ author empty$
+{ key empty$
+{ organization empty$
+{ cite$ #1 #3 substring$ }
+{ "The " #4 organization chop.word #3 text.prefix$ }
+if$
+}
+{ key #3 text.prefix$ }
+if$
+}
+{ author format.lab.names }
+if$
+}
+FUNCTION {editor.key.organization.label}
+{ editor empty$
+{ key empty$
+{ organization empty$
+{ cite$ #1 #3 substring$ }
+{ "The " #4 organization chop.word #3 text.prefix$ }
+if$
+}
+{ key #3 text.prefix$ }
+if$
+}
+{ editor format.lab.names }
+if$
+}
+FUNCTION {calc.label}
+{ type$ "book" =
+type$ "inbook" =
+or
+'author.editor.key.label
+{ type$ "proceedings" =
+'editor.key.organization.label
+{ type$ "manual" =
+'author.key.organization.label
+'author.key.label
+if$
+}
+if$
+}
+if$
+duplicate$
+year field.or.null purify$ #-1 #2 substring$
+*
+'label :=
+year field.or.null purify$ #-1 #4 substring$
+*
+sortify 'sort.label :=
+}
+FUNCTION {sort.format.names}
+{ 's :=
+#1 'nameptr :=
+""
+s num.names$ 'numnames :=
+numnames 'namesleft :=
+{ namesleft #0 > }
+{ nameptr #1 >
+{ " " * }
+'skip$
+if$
+s nameptr "{vv{ } }{ll{ }}{ ff{ }}{ jj{ }}" format.name$ 't :=
+nameptr numnames = t "others" = and
+{ "et al" * }
+{ t sortify * }
+if$
+nameptr #1 + 'nameptr :=
+namesleft #1 - 'namesleft :=
+}
+while$
+}
+FUNCTION {sort.format.title}
+{ 't :=
+"A " #2
+"An " #3
+"The " #4 t chop.word
+chop.word
+chop.word
+sortify
+#1 global.max$ substring$
+}
+FUNCTION {author.sort}
+{ author empty$
+{ key empty$
+{ "to sort, need author or key in " cite$ * warning$
+""
+}
+{ key sortify }
+if$
+}
+{ author sort.format.names }
+if$
+}
+FUNCTION {author.editor.sort}
+{ author empty$
+{ editor empty$
+{ key empty$
+{ "to sort, need author, editor, or key in " cite$ * warning$
+""
+}
+{ key sortify }
+if$
+}
+{ editor sort.format.names }
+if$
+}
+{ author sort.format.names }
+if$
+}
+FUNCTION {author.organization.sort}
+{ author empty$
+{ organization empty$
+{ key empty$
+{ "to sort, need author, organization, or key in " cite$ * warning$
+""
+}
+{ key sortify }
+if$
+}
+{ "The " #4 organization chop.word sortify }
+if$
+}
+{ author sort.format.names }
+if$
+}
+FUNCTION {editor.organization.sort}
+{ editor empty$
+{ organization empty$
+{ key empty$
+{ "to sort, need editor, organization, or key in " cite$ * warning$
+""
+}
+{ key sortify }
+if$
+}
+{ "The " #4 organization chop.word sortify }
+if$
+}
+{ editor sort.format.names }
+if$
+}
+FUNCTION {presort}
+{ calc.label
+ year field.or.null sortify
+ " "
+ *
+ sort.label
+ *
+" "
+*
+type$ "book" =
+type$ "inbook" =
+or
+'author.editor.sort
+{ type$ "proceedings" =
+'editor.organization.sort
+{ type$ "manual" =
+'author.organization.sort
+'author.sort
+if$
+}
+if$
+}
+if$
+*
+" "
+*
+year field.or.null sortify
+*
+" "
+*
+title field.or.null
+sort.format.title
+*
+#1 entry.max$ substring$
+'sort.key$ :=
+}
+ITERATE {presort}
+SORT
+STRINGS { longest.label last.sort.label next.extra }
+INTEGERS { longest.label.width last.extra.num }
+FUNCTION {initialize.longest.label}
+{ "" 'longest.label :=
+#0 int.to.chr$ 'last.sort.label :=
+"" 'next.extra :=
+#0 'longest.label.width :=
+#0 'last.extra.num :=
+}
+FUNCTION {forward.pass}
+{ last.sort.label sort.label =
+{ last.extra.num #1 + 'last.extra.num :=
+last.extra.num int.to.chr$ 'extra.label :=
+}
+{ "a" chr.to.int$ 'last.extra.num :=
+"" 'extra.label :=
+sort.label 'last.sort.label :=
+}
+if$
+}
+FUNCTION {reverse.pass}
+{ next.extra "b" =
+{ "a" 'extra.label := }
+'skip$
+if$
+label extra.label * 'label :=
+label width$ longest.label.width >
+{ label 'longest.label :=
+label width$ 'longest.label.width :=
+}
+'skip$
+if$
+extra.label 'next.extra :=
+}
+EXECUTE {initialize.longest.label}
+ITERATE {forward.pass}
+REVERSE {reverse.pass}
+%%% XXX The macro \etalchar is generated in function format.lab.names.
+%%% I have no idea what format.lab.names does,
+%%% and it doesn't seem to do anything in my test cases.
+%%% However the \etalchar definition messes up the HTML output,
+%%% so I'll simply skip that for now...
+FUNCTION {begin.bib}
+{ %et.al.char.used
+preamble$ empty$
+'skip$
+{ preamble$ write$ newline$ }
+if$
+"<dl>" write$ newline$
+}
+EXECUTE {begin.bib}
+EXECUTE {init.urlbst.variables}
+EXECUTE {init.state.consts}
+REVERSE {call.type$}
+FUNCTION {end.bib}
+{ newline$
+"</dl>" write$ newline$
+}
+EXECUTE {end.bib}
diff --git a/biblio/bibtex/contrib/bibhtml/bibhtml b/biblio/bibtex/contrib/bibhtml/bibhtml
new file mode 100755
index 0000000000..7088249658
--- /dev/null
+++ b/biblio/bibtex/contrib/bibhtml/bibhtml
@@ -0,0 +1,464 @@
+#! /usr/bin/env perl
+## 'perl -w' is good, but the PERL on the previous line is substituted,
+## by default, by '/usr/bin/env perl', and that doesn't always cope well
+## with multiple arguments, so leave the option off.
+#
+# This software is copyright, 1999, 2005, Norman Gray.
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 2
+# of the License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+#
+# Author: Norman Gray, norman@astro.gla.ac.uk.
+# Department of Physics and Astronomy, University of Glasgow, UK
+#
+# See the file LICENCE for a copy of the GPL.
+# You can also find an online copy at http://www.gnu.org/copyleft/gpl.html .
+#
+# $Id$
+#
+# See <http://www.astro.gla.ac.uk/users/norman/distrib/bibhtml.html>
+# for documentation.
+
+use strict;
+
+my $version = 'Bibhtml, version 2.0.2, Norman Gray <norman@astro.gla.ac.uk>, 2013 September 8';
+
+
+# configuration...
+my $rootname = 'bibliography';
+my $bibdata = ''; # default bibdata is ./bib.bib
+my $bibstyle = ''; # default, below, is plainhtml
+my $bibconfig = 'bibhtml.config'; # configuration file
+
+my $html3 = 0;
+my $citeall = 0;
+my $verbose = 1;
+my $mergebib = 0;
+my $strippis = 0; # if true, then strip PIs from output
+
+# configuration variables
+my $endash;
+my $nbsp;
+
+my $bibfilename; # the name of the .bib file
+my $bblfilename; # the name of the generated .bbl file
+my $auxfilename; # the .aux file we generate here
+
+# control flags
+my $phase;
+my $foundslot; # true when we're in the gap between
+ # <?bibhtml start...end?>
+
+# set to 1 to switch on debugging, set > 1 to exit after option parsing
+my $debug = 0;
+
+# normalise progname - part after last slash
+$0 =~ /([^\/]*)$/;
+my $progname = $1;
+
+if ($#ARGV < $[) {
+ print "Usage: $progname filename ...\n[$version]\n";
+ exit 1;
+}
+
+# get directory of first arg (this is where we'll search for bibhtml.config)
+$ARGV[0] =~ /[^\/:]*$/;
+my $defdir = $`;
+#print "defdir $defdir\n";
+
+
+#------
+
+# if -c is present in the argument list, then undefine $bibconfig,
+# and so don't read it automatically at the beginning
+for (@ARGV) { if (/^-c/) { undef ($bibconfig); last; }}
+if (defined ($bibconfig) && (-r $bibconfig)) {
+ readconfig ($bibconfig);
+}
+
+# Option processing
+while ($_ = $ARGV[0], /^[-+]/)
+{
+ # print "ARGV[0]=$_\n";
+ if (/^([-+])3/ ) { $html3= ($1 eq '+') }
+ if (/^-v/) { $verbose = 1 }
+ if (/^-q/) { $verbose = 0 }
+ if (/^-a/) { $citeall = 1 }
+ if (/^-V/) { print STDERR $version, "\n"; exit }
+ if (/^--version/) { print STDERR $version, "\n"; exit }
+ if (/^--merge/) { $mergebib = 1 }
+ if (/^--strip/) { $strippis = 1 }
+ if (/^--help/) { printhelp(); exit }
+
+ shift;
+ last if ($#ARGV < $[);
+ if (/^-r/) { $rootname = $ARGV[0]; shift }
+ if (/^-b/) { $bibdata = $ARGV[0]; shift }
+ if (/^-s/) { $bibstyle = $ARGV[0]; shift }
+ if (/^-c/) { my $bibconfig = $ARGV[0];
+ shift;
+ readconfig ($bibconfig); }
+ last if ($#ARGV < $[);
+}
+
+
+if ($debug)
+{
+ # debugging arglist...
+ print STDERR "rootname $rootname, bibdata $bibdata\n";
+ if ($html3) { print STDERR "html3\n"; }
+ if ($verbose) { print STDERR "verbose\n"; }
+ if ($citeall) { print STDERR "citeall\n"; }
+ print STDERR "ARGV @ARGV\n";
+ exit if ($debug > 1);
+}
+
+if ($mergebib) {
+ # usage is bibhtml file.bbl file.html - do nothing other than
+ # merge a bbl file into an html file
+ if ($#ARGV < 1) {
+ print "Usage: $progname --merge file.bbl file.html\n";
+ exit;
+ }
+
+ $phase = +1;
+ $bblfilename = $ARGV[0];
+ $bibfilename = $ARGV[1];
+ # Insist that both files have the correct extension
+ # This route will mostly be called by scripts, so this check is
+ # both useful and easily satisfied
+ ($bblfilename =~ /\.bbl$/) && ($bibfilename =~ /\.html$/)
+ || do {
+ print STDERR "Usage: $progname --merge file.bbl file.html\n\tfile extensions required!\n";
+ exit;
+ };
+}
+else
+{
+ if ($#ARGV < $[)
+ {
+ print "Usage: $progname filename ...\n";
+ exit;
+ }
+
+ # If the command name is bibhtml, then do everything.
+ # If it isn't, then use the name of the (first) argument to work out which
+ # phase to perform. If it's a .bbl file, then merge it with the .html
+ # file, if not, then create the .aux file ready for BibTeX to be
+ # invoked manually.
+ if ($progname eq 'bibhtml')
+ {
+ $phase = 0;
+ }
+ else
+ {
+ if ($ARGV[0] =~ /(.*)\.bbl$/)
+ {
+ $rootname = $1;
+ $phase = +1;
+ }
+ else
+ {
+ $phase = -1;
+ }
+ }
+}
+
+if ($debug)
+{
+ print STDERR "rootname $rootname\nbibdata $bibdata\nphase $phase, html3 $html3\n";
+#exit;
+}
+
+
+my @date = localtime(time);
+my @mname = ("January", "February", "March", "April", "May", "June",
+ "July", "August", "September", "October", "November", "December");
+
+$bblfilename = "$rootname.bbl" unless (defined ($bblfilename));
+$bibfilename = "$rootname.html" unless (defined ($bibfilename));
+$auxfilename = "$rootname.aux" unless (defined ($auxfilename));
+
+print "bibfilename=$bibfilename\nbibdata=$bibdata\n" if $verbose;
+
+########################################
+#
+# Start the scanning phase
+
+if ($phase <= 0) # -1 or 0
+{
+ print "Creating $auxfilename...\n" if ($verbose);
+
+ open (OUT, ">$auxfilename") || die "can't open $auxfilename to write\n";
+ print OUT "\\relax\n"; # not really necessary, but...
+
+ if ($citeall)
+ {
+ print "Citing all...\n" if ($verbose);
+ print OUT "\\citation{*}\n";
+ }
+ else
+ {
+ foreach my $fn (@ARGV)
+ {
+ my $t; # temporary string
+ print "scanning $fn...\n" if ($verbose);
+
+ open (IN, "$fn") || die "can't open $fn to read\n";
+
+ while (<IN>)
+ {
+ # Match possibly multiple times on one line
+ # Note bibfilename must be present, even if this is the
+ # bibliography itself.
+ foreach my $m (/$bibfilename#([^\"]+)/g) {
+ print OUT "\\citation{$m}\n";
+ }
+ if (($t) = /<\?bibhtml\s+bibdata\s+([\w,]*)/) {
+ # accumulate bibdata
+ if ($bibdata eq '') {
+ $bibdata = $t;
+ } else {
+ $bibdata .= ',' . $t;
+ }
+ print "bibdata=$bibdata\n" if $verbose;
+ }
+ if (($t) = /<\?bibhtml\s+bibstyle\s+(\w*)/) {
+ # do not override any value specified on the command line
+ $bibstyle = $t if $bibstyle eq '';
+ print "bibstyle=$bibstyle\n" if $verbose;
+ }
+ }
+
+ close (IN);
+ }
+ }
+
+ $bibdata = 'bib' if ($bibdata eq '');
+ $bibstyle = 'plainhtml' if ($bibstyle eq '');
+
+ print OUT "\\bibstyle{$bibstyle}\n";
+ print OUT "\\bibdata{$bibdata}\n";
+
+ close (OUT);
+}
+
+########################################
+#
+# Call BibTeX
+
+if ($phase == 0)
+{
+ print "Calling BibTeX...\n" if ($verbose);
+
+ system ("bibtex $rootname")==0 || die "can't bibtex $auxfilename\n";
+}
+
+########################################
+#
+# Substitution phase
+
+if ($phase >= 0 && -r "$bblfilename") # $phase +1 or 0
+{
+ print "Merging $bblfilename into $bibfilename...\n" if ($verbose);
+
+ # now merge the new bbl file with the old bibfilename, between the
+ # pattern /<?\s*bibhtml start/ and 'end'
+
+
+ if ($debug)
+ {
+ open (ORIG, "$bibfilename")||die "can't open $bibfilename to read";
+ }
+ else
+ {
+ rename ($bibfilename, "$bibfilename.old")||die "can't rename $bibfilename";
+ open (OUT, ">$bibfilename") ||die "can't open $bibfilename to write";
+ select (OUT);
+ open (ORIG, "$bibfilename.old")||die "can't open $bibfilename.old to read";
+ }
+ open (BBL, "$bblfilename") ||die "can't open $bblfilename to read";
+
+
+ $foundslot = 0; # copy the old to the new up to pattern
+
+ FINDSLOT: while (<ORIG>)
+ {
+ if (/<\?bibhtml\s+today/ || /<!--\s*bibhtml:today/)
+ {
+ print unless $strippis;
+ # gobble a line containing the old date
+ <ORIG>;
+ print "$date[3] $mname[$date[4]] 19$date[5]\n";
+ }
+ elsif (/<\?bibhtml\s+start/ || /<!--\s*bibhtml:start/)
+ {
+ print unless $strippis;
+ $foundslot = 1;
+ print STDERR "Found start\n" if $debug;
+ last FINDSLOT;
+ }
+ elsif (/<\?bibhtml\s+insert/)
+ {
+ # don't print this line
+ $foundslot = 2;
+ print STDERR "Found insertion point\n" if $debug;
+ last FINDSLOT;
+ } else {
+ if ($strippis)
+ {
+ print unless /<\?bibhtml/;
+ } else {
+ print;
+ }
+ }
+ }
+
+ $foundslot || die "couldn't find the insertion point";
+
+ if ($html3)
+ {
+ $nbsp='&nbsp;';
+ $endash='&endash;';
+ }
+ else
+ {
+ $nbsp=' ';
+ $endash='-';
+ }
+
+ while (<BBL>)
+ {
+ # If a line ends with a %, then remove the %\n. write$ does
+ # a decent job of line breaking, but if it can't break a line
+ # at space, it puts in a %, which is OK in TeX, but messes
+ # up HTML.
+ if (/%$/) {
+ chop; chop;
+ $_ .= <BBL>;
+ }
+
+ # Spot hrefs in the current line: if we find any, emit them and
+ # remove them from $_, so they're escaped as appropriate for URLs,
+ # which is different from the escaping required for text, below.
+ # We lose in principle, if there are any characters which need
+ # escaped before the href, but the output of bibtex is pretty
+ # consistent, and doesn't produce these in fact.
+ my $href;
+ if (($href) = /(.*href[^>]*)/) {
+ $href =~ s/\&/\&amp;/g;
+ $href =~ s/\~/%7e/g;
+ print "$href\n";
+ s{.*href[^>]*}{};
+ }
+ s/\&/\&amp;/g;
+ s/\~/$nbsp/g ;
+ s/[\{\}]//g ;
+ s/--/$endash/g ;
+ print;
+ }
+
+ if ($foundslot > 1)
+ {
+ # we found <?bibhtml insert?> -- there is no end marker to be found
+ $foundslot = 0;
+ } else {
+ # we found <?bibhtml start?> -- look for the end marker
+ $foundslot = 0;
+
+ # now discard lines of the input file until we find one which
+ # matches <?bibhtml end?>
+ SKIPGAP: while (<ORIG>)
+ {
+ if (/<\?bibhtml\s+end/ || /--\s*bibhtml:end/)
+ {
+ print unless $strippis;
+ $foundslot = 1;
+ print STDERR "Found end\n" if $debug;
+ last SKIPGAP;
+ }
+ }
+
+ $foundslot || warn "couldn't find end marker";
+ }
+
+ # now copy the remainder of the file to OUT
+ while (<ORIG>)
+ {
+ if (/<\?bibhtml\s+today/ || /--\s*bibhtml:today/)
+ {
+ print unless $strippis;
+ # gobble a line
+ <ORIG>;
+ print "$date[3] $mname[$date[4]] 19$date[5]\n";
+ } else {
+ if ($strippis)
+ {
+ print unless /<\?bibhtml/;
+ } else {
+ print;
+ }
+ }
+ }
+
+ close (ORIG);
+ close (BBL);
+ close (OUT) if (!$debug);
+}
+
+
+sub readconfig {
+ my $bibconfig = shift;
+ if (-r $bibconfig)
+ {
+ print STDERR "reading config $bibconfig\n";
+ open (CONF, $bibconfig);
+ $_ = <CONF>;
+ chop;
+ my @newargs = split (/ +/);
+ close (CONF);
+ unshift (@ARGV, @newargs);
+ print STDERR "readconfig: ARGV[0]=($ARGV[0]), ARGV=@ARGV\n" if ($debug);
+ }
+ else
+ {
+ print STDERR "no config file $bibconfig\n";
+ }
+}
+
+sub printhelp {
+ print STDOUT <<\_EOD;
+This is bibhtml version 2.0.2, 2013 September 8.
+
+Usage:
+ % bibhtml [options...] filename...
+ % bibhtml --merge file.bbl file.html
+
+Options:
+ -3 Opposite of +3 -- do not use these entities
+ +3 Use HTML3 entities (ie, &nbsp and &enspace) as appropriate
+ -a Produce citations for the entire BibTeX database
+ (as if \nocite{*} had been included in a LaTeX file)
+ -b bibdata Specify the name of the BibTeX database file.
+ -c configfile Specify a configuration file
+ --merge Merge mode: merge a bbl file into an html file
+ --help Print this help and exit
+ -q Be quiet -- opposite of -v
+ -r rootname Set the root file name: default is 'bibliography'
+ -s bibstyle Name of the bibliography style file.
+ --strip Strip the processing instructions out of the file
+ -v Be verbose (default)
+ -V, --version Show the version number and exit
+_EOD
+}
diff --git a/biblio/bibtex/contrib/bibhtml/bibhtml-extract-aux.xslt b/biblio/bibtex/contrib/bibhtml/bibhtml-extract-aux.xslt
new file mode 100644
index 0000000000..f0ce737f1e
--- /dev/null
+++ b/biblio/bibtex/contrib/bibhtml/bibhtml-extract-aux.xslt
@@ -0,0 +1,99 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ ! bibhtml-extract-aux.xslt
+ !
+ ! Part of bibhtml, version 2.0.2, released 2013 September 8
+ ! Hg Node 7076ce83a035.
+ ! See <http://purl.org/nxg/dist/bibhtml>
+ !
+ ! This sample script processes an XML file which contains elements like
+ ! <span class='cite'>citation</span>, extracting each of the `citation'
+ ! strings and emitting a .aux file which, once a \bibdata line has been
+ ! appended, is suitable for processing with BibTeX. Adapt or extend as
+ ! appropriate.
+ !-->
+<stylesheet xmlns="http://www.w3.org/1999/XSL/Transform"
+ version="1.0"
+ exclude-result-prefixes="h"
+ xmlns:h="http://www.w3.org/1999/xhtml">
+
+ <output method="xml"
+ version="1.0"
+ doctype-public="-//W3C//DTD XHTML 1.0 Strict//EN"
+ doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"
+ omit-xml-declaration="yes"/>
+
+ <template match="/">
+ <text>\relax
+</text>
+ <apply-templates select="//h:span[@class='cite']"/>
+ <apply-templates select='//processing-instruction("bibliography")'/>
+ <!--
+ <call-template name="make-tex-command">
+ <with-param name="command">bibstyle</with-param>
+ <with-param name="content">plainhtml</with-param>
+ </call-template>
+ -->
+ </template>
+
+ <template match="h:span[@class='cite']">
+ <!--
+ <h:a>
+ <attribute name='href'>
+ <text>#</text>
+ <copy-of select='.'/>
+ </attribute>
+ <copy-of select='.'/>
+ </h:a>
+ -->
+ <call-template name="make-tex-command">
+ <with-param name="command">citation</with-param>
+ <with-param name="content">
+ <copy-of select="."/>
+ </with-param>
+ </call-template>
+ </template>
+
+ <template match='processing-instruction("bibliography")'>
+ <choose>
+ <when test='string-length(.) = 0'>
+ <text>% No bibliography file specified!
+</text>
+ </when>
+ <when test='contains(.," ")'>
+ <call-template name='make-tex-command'>
+ <with-param name='command'>bibdata</with-param>
+ <with-param name='content'>
+ <value-of select='substring-before(.," ")'/>
+ </with-param>
+ </call-template>
+ <call-template name='make-tex-command'>
+ <with-param name='command'>bibstyle</with-param>
+ <with-param name='content'>
+ <value-of select='substring-after(.," ")'/>
+ </with-param>
+ </call-template>
+ </when>
+ <otherwise>
+ <call-template name='make-tex-command'>
+ <with-param name='command'>bibdata</with-param>
+ <with-param name='content'>
+ <value-of select='normalize-space(.)'/>
+ </with-param>
+ </call-template>
+ </otherwise>
+ </choose>
+ </template>
+
+ <template name="make-tex-command">
+ <param name="command"/>
+ <param name="content"/>
+ <text>\</text>
+ <value-of select="$command"/>
+ <text>{</text>
+ <value-of select="$content"/>
+ <text>}
+</text>
+ </template>
+
+</stylesheet>
diff --git a/biblio/bibtex/contrib/bibhtml/bibhtml-insert-bib.xslt b/biblio/bibtex/contrib/bibhtml/bibhtml-insert-bib.xslt
new file mode 100644
index 0000000000..0fd46ff6bd
--- /dev/null
+++ b/biblio/bibtex/contrib/bibhtml/bibhtml-insert-bib.xslt
@@ -0,0 +1,51 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ ! bibhtml-extract-aux.xslt
+ !
+ ! Part of bibhtml, version 2.0.2, released 2013 September 8
+ ! Hg node 7076ce83a035.
+ ! See <http://purl.org/nxg/dist/bibhtml>
+ !
+ ! This sample script processes an XML file which contains elements like
+ ! <span class='cite'>citation</span>, extracting each of the `citation'
+ ! strings and emitting a .aux file which, once a \bibdata line has been
+ ! appended, is suitable for processing with BibTeX. Adapt or extend as
+ ! appropriate.
+ !-->
+<x:stylesheet xmlns:x="http://www.w3.org/1999/XSL/Transform"
+ version="1.0"
+ xmlns="http://www.w3.org/1999/xhtml"
+ exclude-result-prefixes="h"
+ xmlns:h="http://www.w3.org/1999/xhtml">
+
+ <x:output method="xml"
+ version="1.0"
+ doctype-public="-//W3C//DTD XHTML 1.0 Strict//EN"
+ doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"
+ omit-xml-declaration="yes"/>
+
+ <x:param name='bibfile-name'>bibliography</x:param>
+
+
+ <!-- identity transform -->
+ <x:template match="*">
+ <x:copy>
+ <x:copy-of select="@*"/>
+ <x:apply-templates/>
+ </x:copy>
+ </x:template>
+
+ <x:template match="h:span[@class='cite']">
+ <a>
+ <x:attribute name='href'>
+ <x:text>#</x:text>
+ <x:copy-of select='.'/>
+ </x:attribute>
+ <x:apply-templates/>
+ </a>
+ </x:template>
+
+ <x:template match='processing-instruction("bibliography")'>
+ <x:copy-of select='document(concat($bibfile-name,".bbl"))'/>
+ </x:template>
+</x:stylesheet>
diff --git a/biblio/bibtex/contrib/bibhtml/bibhtml.html b/biblio/bibtex/contrib/bibhtml/bibhtml.html
new file mode 100644
index 0000000000..0b97184ca8
--- /dev/null
+++ b/biblio/bibtex/contrib/bibhtml/bibhtml.html
@@ -0,0 +1,580 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
+ <title>Bibhtml documentation</title>
+ <meta name="keywords" content="bibhtml, bibtex, HTML" />
+ <link href="http://nxg.me.uk" rev="author" />
+ <link type="text/css" rel="stylesheet" href="style.css" />
+ </head>
+
+<body>
+
+<h1>Bibhtml</h1>
+
+<div class="abstract">
+<p><em>Bibhtml</em> consists of a set of BibTeX style files, which
+allow you to use BibTeX to produce bibliographies in HTML. These are
+modelled closely on the standard BibTeX style files.</p>
+
+<p>To accompany them, this package includes a pair of XSLT scripts
+which illustrate how you might integrate these generated
+bibliographies into an XML/HTML workflow.</p>
+
+<p>The long-term URL for this package is <code>http://purl.org/nxg/dist/bibhtml</code></p>
+
+<p>This documentation describes
+bibhtml version 2.0.2, released 2013 September 8.</p>
+</div>
+
+<h3>Contents</h3>
+<ul>
+<li><a href="#bst-files">BibTeX style files</a></li>
+<li><a href="#xslt">XSLT scripts</a></li>
+<li><a href="#postprocess">Postprocessing HTML bibliographies</a></li>
+<li><a href="#install">Installation</a></li>
+<li><a href="#usage">The <em>bibhtml</em> script</a></li>
+<li><a href="#example">Example</a></li>
+<li><a href="#refs">References</a></li>
+<li><a href="#dist">Distribution, licence and source code</a></li>
+</ul>
+
+<p><em>Bibhtml</em> consists of a set of BibTeX style files, which
+allow you to use BibTeX to produce bibliographies in HTML. These are
+modelled closely on the standard BibTeX style files. For sample output,
+see <a href="#refs">the reference section below</a>.</p>
+
+<p>To accompany them, this package includes a pair of XSLT scripts
+which illustrate how you might integrate these generated
+bibliographies into an XML/HTML workflow.</p>
+
+<p>The output of these style files is usable as-is, but it benefits
+from some post-processing, to remove TeX-isms. There’s a <em>sed</em>
+script in the distribution which does exactly that, called
+<code>detex.sed</code>. If you want to make a version of that in some
+other regexp-supporting language, let me know and I can include it in
+the distribution.</p>
+
+<p>As well,
+the package includes a Perl script which orchestrates the various steps
+required to manage such a bibliography for one or more HTML files.
+The references in the text are linked directly to the corresponding
+bibliography entry, and if a URL is defined in the entry within the
+BibTeX database file, then the generated bibliography entry is linked
+to this.</p>
+
+<p>The BibTeX style files are
+<code>abbrvhtml.bst</code>,
+<code>alphahtml.bst</code>,
+<code>plainhtml.bst</code> and
+<code>unsrthtml.bst</code>.
+As well, there are
+<code>.bst</code> files which produce their output in date order. To
+use them, you should generate an <code>.aux</code> file by some
+appropriate means, and include the line
+<code>\bibstyle{plainhtml}</code>. Run BibTeX, and the result is a
+<code>.bbl</code> file, in broadly the same style as the corresponding
+traditional BibTeX one, but formatted
+using HTML rather than LaTeX. This might form a useful component of a
+XSLT-based workflow. For further details, see the discussion of the
+style files <a href="#bst-files">below</a>.</p>
+
+<p>There is also a Perl script, <em>bibhtml</em>, which can orchestrate generating and using
+this <code>.aux</code> file. This script isn’t really maintained any
+more, but it is still distributed, and documented <a href="#usage">below</a>.</p>
+
+<p><em>Bibhtml</em> works with a standard BibTeX database – it is
+intended to be compatible with a database used in the standard way
+with LaTeX. The <a href="#bst-files">BibTeX style files</a>
+distributed with this package define an additional
+<code>url</code> field: if this is present, then the generated entry
+will contain a link to this URL. They also define an
+<code>eprint</code> field – if you do not use the LANL preprint
+archive, this will be of no interest to you.</p>
+
+<h2><a name="bst-files" id="bst-files">BibTeX style files</a></h2>
+
+<p>The package includes several BibTeX style files. As well as the
+ones directly derived from the standard styles, there are also
+<code>plainhtmldate.bst</code>,
+<code>plainhtmldater.bst</code>,
+<code>alphahtmldate.bst</code> and
+<code>alphahtmldater.bst</code> styles,
+which are derived from the standard
+<code>plain.bst</code> and <code>alpha.bst</code> styles,
+which sort the
+output by date and reverse date, rather than by author.</p>
+
+<p>In version 2 of the <em>bibhtml</em> package, the
+<code>*html.bst</code> files are derived from the traditional files
+using the <a href="http://purl.org/nxg/dist/urlbst">urlbst</a>
+package, and then minimally adjusted so as to produce HTML rather than
+LaTeX.</p>
+
+<p>Since they are derived via the <em>urlbst</em> package, these style
+files support an additional entry type, <code>@webpage</code>, and two
+additional fields on all entry types, <code>url</code> and
+<code>lastchecked</code>, which give the URL associated with the
+reference, and the date at which the URL was last verified to be still
+present.</p>
+
+<p>The distributed <code>.bst</code> files have two configurable
+parameters, which you might want to adjust for your installation:</p>
+
+<p>The variable <code>'xxxmirror</code> gives the host name of the arXiv mirror which will be used
+when generating links to eprints. The default setting in the
+<code>.bst</code> files is:</p>
+<pre>
+"xxx.arxiv.org" 'xxxmirror :=
+</pre>
+
+<p>By default, the style files generate link targets in the
+bibliography with the same name as the citation key. Thus a BibTeX
+entry with key <code>surname99</code>, say, would appear in the
+generated HTML <code>.bbl</code> file wrapped in <code>&lt;a
+name="surname99"&gt;...&lt;/a&gt;</code>. If this is inconvenient,
+perhaps because it conflicts with other links within the file,
+then you can adjust the <code>'hrefprefix</code> variable within the
+style file, to specify a prefix which should appear in the link key.
+Thus setting</p>
+<pre>
+"ref:" 'hrefprefix :=
+</pre>
+<p>in the <code>.bst</code> file would produce links like <code>&lt;a
+name="ref:surname99"&gt;...&lt;/a&gt;</code> in the <code>.bbl</code>
+file.</p>
+
+<h2><a name="xslt" id="xslt">XSLT scripts</a></h2>
+
+<p>The distribution includes a pair of sample XSLT scripts:</p>
+<ul>
+<li><code>bibhtml-extract-aux.xslt</code> shows how you might use XSLT to
+extract citations from a source file into an <code>.aux</code>
+file, for processing into a <code>.bbl</code> file;</li>
+<li><code>bibhtml-insert-bib.xslt</code> shows how you might use XSLT
+to insert the resulting <code>.bbl</code> file into the original
+file.</li>
+</ul>
+
+<p>The scripts assume that a source file is in XHTML, and has
+citations marked up as</p>
+<pre>
+&lt;span class='cite'&gt;ref99&lt;/span&gt;
+</pre>
+<p>and that the bibliography is indicated with</p>
+<pre>
+&lt;?bibliography <em>bibdata</em> <em>bibstyle</em>?&gt;
+</pre>
+<p>A suitable workflow, taking as an example the source file for the
+page you are reading, is:</p>
+<pre>
+% xsltproc bibhtml-extract-aux.xslt bibhtml.html &gt;bibhtml.aux
+% bibtex bibhtml
+This is BibTeX, Version 0.99c (Web2C 7.5.7)
+The top-level auxiliary file: bibhtml.aux
+The style file: unsrthtml.bst
+Database file #1: bibrefs.bib
+% sed -f detex.sed bibhtml.bbl &gt;bibhtml.bbl.tmp
+% mv bibhtml.bbl.tmp bibhtml.bbl
+% xsltproc --stringparam bibfile-name bibhtml \
+ bibhtml-insert-bib.xslt bibhtml.html &gt;bibhtml-new.html
+</pre>
+
+<p>The <code>bibhtml.xslt</code> script, when run over a source file,
+generates a <code>.aux</code> suitable for processing with BibTeX.
+The resulting <code>.bbl</code> file, possibly after
+<a href="#postprocessing">post-processing</a>, can be included in the
+source XHTML with an XSLT script which includes something like:</p>
+<pre>
+&lt;xsl:template select="processing-instruction('bibliography')"&gt;
+ &lt;xsl:copy-of select="document('mybib.bbl')"/&gt;
+&lt;/xsl:template&gt;
+</pre>
+
+<h2><a name="postprocess" id="postprocess">Postprocessing HTML bibliographies</a></h2>
+
+<p>The output of the BibTeX styles is designed so that it is generally
+reasonably usable without any post-processing. However it is not
+ideal, since there are occasionaly TeX-isms such as backslash-escaped
+characters and the like, depending on what is in the source
+<code>.bib</code> file. Also, without post-processing any DOIs in
+the source file aren’t formed into links.</p>
+
+<p>The distribution includes a <code>sed</code> file,
+<code>detex.sed</code>, which can do appropriate post-processing.
+Thus the normal workflow is:</p>
+<pre>
+% bibtex mydoc
+% sed -f detex.sed mydoc.bbl &gt;mydoc.bbl.tmp
+% mv mydoc.bbl.tmp mydoc.bbl
+</pre>
+<p>Since it uses <code>sed</code>, this is fairly obviously
+unix-specific, but if anyone would like to contribute a script with
+similar functionality (it’s just a few moderately tortuous regular
+expressions), I’d be delighted to include it in the distribution.</p>
+
+<h2><a name="install" id="install">Installation</a></h2>
+
+<p>The <code>.bst</code> files have to be installed
+<a href="http://www.tex.ac.uk/cgi-bin/texfaq2html?label=inst-wlcf">‘somewhere where LaTeX can find them’</a>. If you give the command
+<code>kpsepath bst</code> you can see the list of directories that
+BibTeX searches for <code>.bst</code> files – on my system, I’d put
+them into <code>/usr/local/texlive/texmf-local/bibtex/bst</code>,
+which is a directory for system-wide local additions.</p>
+
+<p>If you wish, you may change the distributed BibTeX style files (see
+<a href="#bst-files">above</a>) to the extent of changing the
+‘eprint’ mirror site from the master <code>xxx.arxiv.org</code> to a
+more local mirror. If you don’t use the LANL preprint archive, this
+will be of no interest to you.</p>
+
+<h2><a name="usage" id="usage">The <em>bibhtml</em> script</a></h2>
+
+<p>As noted above, <strong>this script should still work and is distributed on
+that basis, but it’s no longer maintained, and won’t be further developed.</strong>
+The XSLT-based mechanism described above is probably more robust;
+also, the interface described in this section is not the same as the interface
+of the <a href="#xslt">XSLT scripts</a> section above.</p>
+
+<h3>The BibTeX database</h3>
+
+<p>TeX features such as <code>~</code> and <code>--</code> are translated to
+corresponding HTML entities (controlled with the <code>+3</code>
+switch, see below), but other TeX constructions will make their way
+into the generated HTML, and look a little odd. I might try to deal
+with these in future versions. </p>
+
+<h3>Preparing the text</h3>
+
+<p>You prepare your text simply by including links to the bibliography file
+(the default is <code>bibliography.html</code>), followed by a fragment
+composed of the BibTeX citation key. Thus, you might cite [grendel89]
+with</p>
+<pre>&lt;a href="bibliography.html#grendel89"&gt;(Grendel, 1989)&lt;/a&gt;</pre>
+<p>(of course, the link text can be anything you like). That’s all there is to
+it. When you run <em>bibhtml</em>, it generates an
+<code>.aux</code> file which makes BibTeX produce references for exactly those
+keys which appear in this way. </p>
+
+<h3><a name="pis" id="pis">Preparing the bibliography file – processing
+instructions supported</a></h3>
+
+<p>The bibliography file is an ordinary HTML document (which may
+itself have citations within it), distinguished only by having two
+processing instructions within it.
+<em>Bibhtml</em> replaces everything between
+<code>&lt;?bibhtml start ?&gt;</code>
+and
+<code>&lt;?bibhtml end ?&gt;</code>
+(which should be on lines by themselves) with the formatted
+bibliography. It leaves those instructions in place, naturally, so once
+this file is set up, you shouldn’t have to touch it again. Older
+versions of bibhtml used the magic comments <code>&lt;-- bibhtml start
+--&gt;</code> and <code>&lt;-- bibhtml end --&gt;</code>: these are
+still supported, but are deprecated and may disappear in a future version.</p>
+
+<p>Alternatively, you may include the processing instruction
+<code>&lt;?bibhtml insert?&gt;</code>. This acts broadly like the
+<code>start</code> and <code>end</code> processing instructions,
+except that the line is completely replaced by the inserted
+bibliography. This is useful if the file being processed is a
+generated file (perhaps the output of a separate XML tool-chain, for
+example), which will not therefore have to be rescanned in future.</p>
+
+<p>You can specify the bibliography database and style file either on
+the command line (see <a href="#options">below</a>) or using the
+<code>&lt;?bibhtml bibdata </code><em>bibfile</em><code>?&gt;</code>
+and <code>&lt;?bibhtml bibstyle</code><em>stylefile</em><code>?&gt;</code> instructions. The
+value of ‘bibdata’ is cumulative, and appends to any value specified
+on the command line. A value of ‘bibstyle’ specified on the command
+line, in contrast, overrides any value in the file.</p>
+
+<p>As a special case, <em>bibhtml</em> also replaces the line <em>after</em> a
+comment <code>&lt;?bibhtml today ?&gt;</code> with today’s date.</p>
+
+<p>Summary of processing instructions:</p>
+
+<dl>
+<dt><code>&lt;?bibhtml start?&gt;</code> and <code>&lt;?bibhtml
+stop?&gt;</code></dt>
+<dd>Bracket the bibliography – any text between these PIs is replaced
+when <em>bibhtml</em> is next run.</dd>
+
+<dt><code>&lt;?bibhtml insert?&gt;</code></dt>
+<dd>This PI is replaced by the bibliography when <em>bibhtml</em> is
+next run. This PI is always removed, irrespective of the presence or
+absence of the <code>--strip</code> option.</dd>
+
+<dt><code>&lt;?bibhtml bibdata </code><em>bibfile</em><code>?&gt;</code></dt>
+<dd>Specify the bibliography database to be used. This is the
+analogue of a
+<code>\bibliography{</code><em>bibfile</em><code>}</code> command in a
+LaTeX file; see also the <code>-b</code> command-line option.</dd>
+
+<dt><code>&lt;?bibhtml bibstyle </code><em>stylefile</em><code>?&gt;</code></dt>
+<dd>Specify the bibliography style to be used. This is the analogue
+of <code>\bibliographystyle{</code><em>stylefile</em><code>}</code>
+command in a LaTex file; see also the <code>-s</code> command-line option.</dd>
+
+<dt><code>&lt;?bibhtml today?&gt;</code></dt>
+<dd>Replace the <em>following</em> line by today’s date.</dd>
+</dl>
+
+<h3><a name="options" id="options">Supported options</a></h3>
+
+<p><em>Usage</em></p>
+<pre>
+% bibhtml [options...] filename...
+% bibhtml --merge file.bbl file.html
+</pre>
+
+<p>The <code>filename</code> argument is the name of a file to be scanned.</p>
+
+<p><em>Bibhtml</em> takes a list of HTML files as argument (though see
+<a href="#two-pass">below</a> for a two-pass variant). It creates an
+<code>.aux</code> file, runs BibTeX, and merges the resulting
+<code>.bbl</code> file (if it exists) into <code>bibliography.html</code>, or
+whatever has been specified as the bibliography file name. </p>
+
+<p>There are several options:</p>
+<dl>
+<dt>-3, +3</dt>
+<dd>Set this to +3 if you want <code>~</code> translated to
+<code>&amp;nbsp;</code>, and <code>--</code> to
+<code>&amp;enspace;</code>. Or set it to -3 (the default) if you
+don’t.</dd>
+
+<dt>-a</dt>
+<dd>If this option is set, <em>bibhtml</em> won’t bother scanning any
+files at all, and will generate references for all the entries in your
+database. This is equivalent to <code>\nocite{*}</code> in LaTeX.</dd>
+
+<dt>-b bibdata</dt>
+<dd>The name of your BibTeX database file, as it would be specified in a
+<code>\bibliography{}</code> command in LaTeX. Unless <em>you</em> happen to
+keep all your references in a file called <code>bib.bib</code>, you’ll
+probably want to change this. Or you can use the <code>&lt;?bibhtml
+bibdata xxx?&gt;</code> <a href="#pis">processing instruction</a>.</dd>
+
+<dt>-c configfile</dt>
+<dd>Specifies a configuration file which contains a single line of
+options, which are inserted in the command line at that point.</dd>
+
+<dt><a name="merge" id="merge">--merge</a></dt>
+<dd>In this special case, <em>bibhtml</em> takes two arguments, a
+<code>.bbl</code> file and an <code>.html</code> file,
+merges the first into the second, and nothing else. It’s
+intended to be used when you have generated a
+<code>.bbl</code> file by a separate run of BibTeX, and simply
+wish to merge the results into your bibliography file. As
+such, it will most likely be useful as part of a script, or
+other post-processing system.</dd>
+
+<dt>-r rootname</dt>
+<dd>Specify this and you’ll create <code>rootname.html</code>,
+<code>rootname.aux</code> and so on. Why not just stick with the default
+‘bibliography’...? </dd>
+
+<dt><a name="opt-s" id="opt-s">-s bibstyle</a></dt>
+<dd>The name of the BibTeX bibliography style you want to use, as it
+would be specified for the <code>\bibstyle</code> command in
+LaTeX. If you want to have a different layout for your HTML
+bibliographies, please don’t change the file plainhtml.bst
+distributed with bibhtml. Instead, make a <em>copy</em> of
+plainhtml.bst under a different name, edit it as much as you
+like, and use this option of bibhtml to use the modified
+version instead of the default. Or you can use the <code>&lt;?bibhtml
+bibstyle xxx?&gt;</code> <a href="#pis">processing instruction</a>.</dd>
+
+<dt><a name="strip" id="strip">--strip</a></dt>
+<dd>If this option is set, then strip all processing-instruction lines
+from the output file. This means that the resulting file cannot be
+processed again by <em>bibhtml</em>, and so is appropriate when the
+file is the output of a separate tool-chain.</dd>
+
+<dt>-V, --version</dt>
+<dd>Bibhtml prints the version information and exits.</dd>
+
+<dt>-v, -q</dt>
+<dd>Do you want the program to be verbose or quiet? The default is -v,
+verbose.</dd>
+
+</dl>
+
+<p>The defaults for the various parameters are unlikely to be helpful,
+so you’re likely to want to set one or more of them every time you run
+the program. It is for this reason, and because you’re likely to want
+the same set of options every time you create the bibliography for a
+set of files in a directory, that you can put a collection of options
+in a configuration file. This can be specified on the command line
+with the option <code>-c configfilename</code>. If this option
+is not given, then <em>bibhtml</em> looks for a file named
+<code>bibhtml.config</code>. For example, the configuration
+file might contain:</p>
+
+<pre>
+-b mybib +3 -r refs
+</pre>
+
+<h3><a name="two-pass" id="two-pass">Two-pass bibhtml</a></h3>
+
+<p>You might sometimes have a need to invoke the
+two phases separately. If you make a symbolic link to the program via
+<code>ln -s bibhtml bibhtml2</code>, then you can generate an
+aux-file alone by giving the command <code>bibhtml2 *.html</code>,
+say; and you can merge a bbl-file into the bibliography file with the
+command <code>bibhtml2 bibliography.bbl</code>. The command line option
+<code>--merge</code> <a href="#merge">above</a> may be more suitable
+if you are calling this code from a script, as it requires you to
+specify both the <code>.bbl</code> and the <code>.html</code> file it
+is being merged with, (and so it is more robust, and more flexible).</p>
+
+<p>On Unix, this works because the program is able to
+detect the name it was invoked under. This may be more difficult on other
+platforms. If so, please get in touch, with suggestions. </p>
+
+<h2><a name="example" id="example">Example</a></h2>
+
+<p>There are multiple sources of advice for how to cite electronic
+documents. The most formal are an ISO standard <a href="#url:iso690">url:iso690</a>, and the American Psychological
+Association’s guidance in Sect. 6.31 of <a href="#apastyle">apastyle</a>. As well, there are older but still
+useful discussions in <a href="#walker06">walker06</a> and
+<a href="#emory95">emory95</a>.</p>
+
+<h2><a name="refs" id="refs">References</a></h2>
+
+<dl xmlns="">
+
+<dt><a name="url:iso690" id="url:iso690">[url:iso690]
+International Standards Organisation.</a></dt>
+<dd><a href="http://en.wikipedia.org/wiki/ISO_690">ISO 690-2</a> [online,
+ cited 9 August 2009].</dd>
+
+<dt><a name="apastyle" id="apastyle">[apastyle]
+American Psychological Association.</a></dt>
+<dd><a href="http://www.apastyle.org/manual/index.aspx"><em>Publication Manual
+ of the American Psychological Association</em></a>, 6th edition, 2009 [cited
+ 9 August 2009].</dd>
+
+<dt><a name="walker06" id="walker06">[walker06]
+Janice R. Walker and Todd Taylor.</a></dt>
+<dd><a href="http://cup.columbia.edu/book/978-0-231-13210-7/the-columbia-guide-to-online-style"><em>The
+ Columbia Guide to Online Style</em></a>.
+Columbia University Press, 2nd edition, 2006 [cited 9 August 2009].</dd>
+
+<dt><a name="emory95" id="emory95">[emory95]
+Goizueta Business Library.</a></dt>
+<dd><a href="http://business.library.emory.edu/eresources/citing.html">Citation
+ formats</a> [online, cited 9 August 2009].</dd>
+
+</dl>
+
+<p>See also the documentation for the <a href="http://purl.org/nxg/dist/urlbst"><code>urlbst</code>
+package</a>, which generates BibTeX style files for ordinary LaTeX
+output (which also supports a <code>@webpage</code> entry type, and
+<code>url</code> and <code>lastchecked</code> fields), and which
+contains a similar list of references concerned with citing online
+sources.</p>
+
+<h2><a name="dist" id="dist">Distribution</a></h2>
+
+<h3><a name="get" id="get">Obtaining <em>bibhtml</em></a></h3>
+
+<p>Bibhtml is available on CTAN at
+<a href="http://www.ctan.org/tex-archive/biblio/bibtex/contrib/bibhtml/"><code>biblio/bibtex/contrib/bibhtml/</code></a>,
+and at
+<a href="http://purl.org/nxg/dist/bibhtml"><code>http://purl.org/nxg/dist/bibhtml</code></a>.</p>
+
+<p>Download the distribution:
+<a href="bibhtml-2.0.2.tar.gz">bibhtml-2.0.2.tar.gz</a> or
+<a href="bibhtml-2.0.2.zip">bibhtml-2.0.2.zip</a>.</p>
+
+<p>Do <a href="mailto:norman@astro.gla.ac.uk">let me know</a> if
+you use this stuff. I’d be grateful for any bug reports,
+and bug fixes, and also for any comments on the clarity or
+otherwise of this documentation.</p>
+
+<p>The project source code is
+<a href="http://bitbucket.org/nxg/bibhtml/">hosted at bitbucket.org</a>.
+You can check out the source code from there, and you are welcome to
+add issues to the bugparade.</p>
+
+<h3><a name="licence" id="licence">Licence</a></h3>
+
+<p>This software is copyright, 1999, 2005, 2006, 2009, 2013 Norman Gray.
+It is released under the terms of the GNU General Public Licence.
+See the copyright declaration at the top of file <code>bibhtml</code>,
+and the file <code>LICENCE</code> for the licence conditions.
+You can find an online copy of the GPL at
+<code><a href="http://www.gnu.org/copyleft/gpl.html">http://www.gnu.org/copyleft/gpl.html</a></code>.</p>
+
+<p>If this licence is a problem for you,
+get in touch and we can work something out.</p>
+
+<h3><a name="changes" id="changes">Changes</a></h3>
+
+<dl>
+<dt>2.0.2, 2013 September 8</dt>
+<dd>Minor bugfixes: XSLT namespace fixes, and DOI formatting.</dd>
+
+<dt>2.0.1, 2009 November 2</dt>
+<dd>The *date.bst and *dater.bst styles now work again.</dd>
+
+<dt>2.0, 2009 August 9</dt>
+<dd>First real release of v2.0, after mild use elsewhere.</dd>
+
+<dt>2.0b1, 2009 August 9</dt>
+<dd>Substantial rewrite, taking the style files from the urlbst
+package (thus there are more styles than before), adding more XSLT
+scripts, and de-emphasising the Perl script. The code is now
+<a href="http://bitbucket.org/nxg/bibhtml/">hosted at bitbucket.org</a>.</dd>
+
+<dt>1.3, 2006 October 31</dt>
+<dd><ul>
+<li>Add <code>hrefprefix</code> parameterisation to style files.</li>
+<li><code>xxx.arxiv.org</code> is now the default e-prints host.</li>
+<li>Some improvements to documentation.</li>
+</ul>
+</dd>
+
+<dt>1.2, 2005 September 19</dt>
+<dd><ul>
+<li>Changes to <code>.bst</code> style files, adding
+<code>@webpage</code> entry type, and <code>lastchecked</code> field
+to all entry types.</li>
+<li>Updates to documentation, fixing broken links to online references
+discussing how to cite online sources.</li>
+<li>No reports of breakage from beta releases below.</li>
+</ul>
+</dd>
+
+<dt>1.2b2, 2005 August 30</dt>
+<dd><ul>
+<li>Bugfix – correctly escape characters in .bbl hrefs</li>
+<li>Portability fix – use <code>/usr/bin/env perl</code> at the top of the
+script, rather than <code>/usr/bin/perl</code>; this should be more
+portable.</li>
+</ul>
+</dd>
+
+<dt>1.2b1, 2005 August 19</dt>
+<dd><ul>
+<li>Use processing instructions such as
+<code>&lt;?bibhtml start?&gt;</code>, rather than magic comments (the
+old behaviour is still temporarily supported).</li>
+<li>Add a new directive – <code>&lt;?bibhtml insert?&gt;</code>
+inserts the bibliography in-place.</li>
+<li>Debugging output is now written to stderr rather than stdout.</li>
+<li>Add <code>--help</code> and <code>--strip</code> options.</li>
+<li>Documentation improvements.</li>
+<li>Bugfix – URLs are now properly escaped in the bibliography.</li>
+</ul>
+</dd>
+</dl>
+
+<div class="signature">
+<a href="http://nxg.me.uk">Norman</a><br />
+2013 September 8
+</div>
+
+</body>
+</html>
diff --git a/biblio/bibtex/contrib/bibhtml/bibrefs.bib b/biblio/bibtex/contrib/bibhtml/bibrefs.bib
new file mode 100644
index 0000000000..76fef8e5c5
--- /dev/null
+++ b/biblio/bibtex/contrib/bibhtml/bibrefs.bib
@@ -0,0 +1,221 @@
+% Webpage with lastchecked and date
+@webpage{url:weapas,
+ url = {http://www.beadsland.com/weapas/},
+ title = {Web Extension to {American Psychological Association} Style ({WEAPAS}) (Rev.2.0)},
+ author = {B Land},
+ year = 2001,
+ month = jul,
+ lastchecked = {16 June 2008}
+}
+
+
+
+@Manual{apastyle,
+ title = {Publication Manual of the American Psychological
+ Association},
+ organization = {{American Psychological Association}},
+ edition = {6th},
+ year = 2009,
+ lastchecked = {9 August 2009},
+ url = {http://www.apastyle.org/manual/index.aspx}
+}
+
+@webpage{url:iso690,
+ author = {{International Standards Organisation}},
+ title = {{ISO 690-2}},
+ url = {http://en.wikipedia.org/wiki/ISO_690},
+ lastchecked = {9 August 2009}
+}
+
+% This one appears to be dead
+@Webpage{gone:classroom96,
+ title = {Citing Internet Addresses: how students should
+ reference online sources in their bibliographies},
+ year = 1996,
+ month = mar,
+ key = {Classroom},
+ url = "http://www.classroom.net/classroom/CitingNetResources.html"
+}
+
+@Webpage{emory95,
+ author = {{Goizueta Business Library}},
+ title = "Citation Formats",
+ date = {1997},
+ lastchecked = {9 August 2009},
+ url = {http://business.library.emory.edu/eresources/citing.html}
+}
+
+@Book{walker06,
+ author = {Janice R. Walker and Todd Taylor},
+ title = {The Columbia Guide to Online Style},
+ publisher = {Columbia University Press},
+ year = 2006,
+ edition = {2nd},
+ isbn = {978-0-231-13211-4},
+ url = {http://cup.columbia.edu/book/978-0-231-13210-7/the-columbia-guide-to-online-style},
+ lastchecked = {9 August 2009}
+}
+
+% this one appears to be dead
+@Webpage{walker-orig,
+ title = {{MLA}-Style Citations of Electronic Sources},
+ author = {Janice R. Walker},
+ url = {http://www.cas.usf.edu/english/walker/mla.html},
+ year = 1995,
+ lastchecked = {23 October 2002},
+ note = {Updated and superceded by \cite{walker}}
+}
+
+@Webpage{texfaq,
+ url = {http://www.tex.ac.uk/cgi-bin/texfaq2html?label=citeURL},
+ title = {{UK \TeX\ FAQ: URLs in BibTeX bibliographies}},
+ key = {UK TeX FAQ},
+ editor = {Robin Fairbairns},
+ year = 2002,
+ lastchecked = {16 June 2008}
+}
+
+
+
+@Webpage{url:daly,
+ url = {http://www.tex.ac.uk/tex-archive/macros/latex/contrib/custom-bib/},
+ title = {Index of custom-bib},
+ author = {Patrick W Daly},
+ year = 2003,
+ lastchecked = {4 June 2003}
+}
+
+% Following are test entries
+
+% Article with URL and lastchecked
+@article{test:towell,
+ title = {Presence in Text-Based Networked Virtual
+ Environments or `{MUDs}'},
+ author = {John Towell and Elizabeth Towell},
+ journal = {Presence},
+ volume = 6,
+ number = 5,
+ pages = {590-595},
+ year = 1997,
+ url = {http://www-unix.mcs.anl.gov/~towell/presence.html},
+ lastchecked = {13 February 2002}
+}
+
+% Book with URL, lastchecked, and note.
+@Book{test:raymond99,
+ author = {Eric S Raymond},
+ title = {The Cathedral and the Bazaar},
+ publisher = {O'Reilly},
+ year = 1999,
+ url = {http://www.tuxedo.org},
+ isbn = {1-56592-724-9},
+ lastchecked = {1 April 2002},
+ note = {The seminal book on the commercialisation of open-source}
+}
+
+% Plain book, no URLs at all
+@book{test:laurillard93,
+ author = {Diana Laurillard},
+ title = {Rethinking University Teaching},
+ publisher = {Routledge},
+ year = 1993
+}
+
+% Webpage with lastchecked but no date
+@webpage{test:iso690,
+ author = {{International Standards Organisation}},
+ title = {{ISO 690-2}},
+ url = {http://www.nlc-bnc.ca/iso/tc46sc9/standard/690-2e.htm},
+ lastchecked = {20 August 2001}
+}
+
+% Webpage with date but no lastchecked
+@Webpage{test:classroom96,
+ title = {Citing Internet Addresses: how students should
+ reference online sources in their bibliographies},
+ year = 1996,
+ month = mar,
+ key = {Classroom},
+ url = "http://www.classroom.net/classroom/CitingNetResources.html"
+}
+
+% Webpage with neither date nor lastchecked
+@Webpage{test:emory95,
+ author = "libsf@web.cc.emory.edu",
+ title = "Citation Formats",
+ url = "http://www.emory.edu/WHSCL/citation.formats.html"
+}
+
+% The same, but with no title either
+@Webpage{test:emory95x,
+ author = "libsf@web.cc.emory.edu",
+ url = "http://www.emory.edu/WHSCL/citation.formats.html"
+}
+
+% Article with eprint number
+@techreport{test:simkin,
+ author = {Mikhail Simkin and V. P. Roychowdhury},
+ title = {Read before you cite!},
+ year = 2002,
+ institution = {UCLA},
+ eprint = {cond-mat/0212043}
+}
+
+% Article with a DOI
+% an underscore
+@article{test:gray00c,
+ author = "Norman Gray",
+ title = "Automatic Reduction of Elliptic Integrals using
+ {Carlson's} Relations",
+ journal = {Mathematics of Computation},
+ volume = 71,
+ pages = {311-318},
+ year = 2002,
+ doi = {10.1090/S0025-5718-01-01333-3}
+}
+
+% Article with a PUBMED reference
+
+
+@Article{test:giffin03,
+ author = {M J Giffin and J C Stroud and D L Bates and von Koenig, K D and J Hardin and L Chen},
+ title = {Structure of {NFAT1} Bound as a Dimer to the {HIV-1 LTR} kappa {B} element},
+ journal = {Nature Structural Biology},
+ year = {2003},
+ volume = {10},
+ number = {10},
+ pages = {800-6},
+ month = oct,
+ pubmed = {12949493}
+}
+
+@ARTICLE{test:nastydoi,
+ author = {Zemla, Adam and Venclovas, Ceslovas and Moult, John and
+ Fidelis, Krzysztof},
+ title = {{P}rocessing and analysis of {CASP}3 protein structure predictions},
+ journal = {Proteins: Structure, Function, and Genetics},
+ year = {1999},
+ volume = {37},
+ pages = {22--29},
+ number = {S3},
+ month = jan,
+ comment = {Description of GDT measure.},
+ doi = {10.1002/(SICI)1097-0134(1999)37:3+<22::AID-PROT5>3.0.CO;2-W},
+ keywords = {CASP},
+ timestamp = {2007-03-13}
+}
+
+% Example from Jason Eisner, by mail (nothing special about the entry,
+% but he seemed to be having formatting problems with unsrturl and proceedings
+% entries.
+@InProceedings{test:eisner-sample,
+ author = {Damianos Karakos and Sanjeev Khudanpur and Jason
+ Eisner and Carey~E. Priebe},
+ title = {Iterative denoising using {J}ensen-{R}eny\'{\i}
+ divergences with an application to unsupervised
+ document categorization},
+ booktitle = {Proceedings of ICASSP},
+ year = 2007,
+ url = {http://cs.jhu.edu/~jason/papers/#icassp07}
+}
+
diff --git a/biblio/bibtex/contrib/bibhtml/detex.sed b/biblio/bibtex/contrib/bibhtml/detex.sed
new file mode 100644
index 0000000000..72395862fb
--- /dev/null
+++ b/biblio/bibtex/contrib/bibhtml/detex.sed
@@ -0,0 +1,57 @@
+# Edit TeXisms in the .bbl output, to make it HTML-ready
+# From bibhtml release 2.0.2, of 2013 September 8.
+# Hg node 7076ce83a035.
+# See http://purl.org/nxg/dist/bibhtml
+
+# Remove %\n line-breaks added by BibTeX
+/% *$/{
+ :a
+ N
+ s/% *\n//
+ t a
+}
+
+# Escape ampersands
+s,&,&amp;,g
+
+# Process DOI:{...} lines, escaping '<' characters in DOIs and rearranging into a <a> element
+# (the substitutions below probably rely on the "DOI:" being at the beginning of a line).
+# First, turn DOI:{X} into DOI:{X|X}
+/^ *DOI/s,DOI:{\([^}]*\)},DOI:{\1|\1},
+# Escape the two DOIs differently...
+# ...first do URL escaping
+# ...then do HTML/XML escaping
+/^ *DOI:/{
+ :bx
+ s,\([^<|]*\)<\([^|]*\)|,\1%3C\2|,
+ t bx
+ :cx
+ s,\([^<}]*\)<\([^}]*\)},\1\&lt;\2},
+ t cx
+}
+# ...and then turn the result into a <a> element
+/^ *DOI:{/s,DOI:{\([^|]*\)|\([^}]*\)},doi:<a href='http://dx.doi.org/\1'><code>\2</code></a>,
+
+# Get rid of TeX braces (I hope there aren't any of these in DOIs or other URLs)
+s/[{}]//g
+
+# Replace '~' ties with spaces, as lont as they aren't URL ".../~user"
+s,\([^/]\)~,\1 ,g
+# ...and '\ ' with plain space
+s,\\ , ,g
+
+# accented characters
+s,\\'a,á,g
+s,\\'e,é,g
+s,\\`e,è,g
+s,\\^o,ô,g
+s+\\,c+ç+g
+s,\\ss,ß,g
+s,\\"a,ä,g
+s,\\"o,ö,g
+s,\\"u,ü,g
+# We could include the following substitution, but I'm nervous of that,
+# because I'm not positive that "--" can't legitimately appear in DOIs
+# (the above substitutions are also in principle illegitimate for the same reason,
+# but they seem safely unlikely).
+#s,--,–,
diff --git a/biblio/bibtex/contrib/bibhtml/plainhtml.bst b/biblio/bibtex/contrib/bibhtml/plainhtml.bst
new file mode 100644
index 0000000000..c97d043591
--- /dev/null
+++ b/biblio/bibtex/contrib/bibhtml/plainhtml.bst
@@ -0,0 +1,1431 @@
+%% plainhtml.bst
+%%
+%% Part of bibhtml, version 2.0.2, released 2013 September 8
+%% Hg node 7076ce83a035.
+%% See <http://purl.org/nxg/dist/bibhtml>
+%%
+%% Copyright 1999, 2005, 2006, 2009, Norman Gray <norman@astro.gla.ac.uk>
+%%
+%% This is a modification of a modification!
+%%
+%%% Modification of BibTeX style file /usr/local/texlive/2008/texmf-dist/bibtex/bst/base/plain.bst
+%%% ... by urlbst, version 0.6-4 (marked with "% urlbst")
+%%% See <http://purl.org/nxg/dist/urlbst>
+%%% Added webpage entry type, and url and lastchecked fields.
+%%% Added eprint support.
+%%% Added DOI support.
+%%% Added PUBMED support.
+%%% Added hyperref support.
+%%% Original headers follow...
+
+% BibTeX standard bibliography style `plain'
+ % version 0.99a for BibTeX versions 0.99a or later, LaTeX version 2.09.
+ % Copyright (C) 1985, all rights reserved.
+ % Copying of this file is authorized only if either
+ % (1) you make absolutely no changes to your copy, including name, or
+ % (2) if you do make changes, you name it something other than
+ % btxbst.doc, plain.bst, unsrt.bst, alpha.bst, and abbrv.bst.
+ % This restriction helps ensure that all standard styles are identical.
+ % The file btxbst.doc has the documentation for this style.
+
+ENTRY
+ { address
+ author
+ booktitle
+ chapter
+ edition
+ editor
+ howpublished
+ institution
+ journal
+ key
+ month
+ note
+ number
+ organization
+ pages
+ publisher
+ school
+ series
+ title
+ type
+ volume
+ year
+ eprint % urlbst
+ doi % urlbst
+ pubmed % urlbst
+ url % urlbst
+ lastchecked % urlbst
+ }
+ {}
+ { label }
+
+INTEGERS { output.state before.all mid.sentence after.sentence after.block doiform }
+
+STRINGS { urlintro eprinturl eprintprefix doiprefix doiurl pubmedprefix pubmedurl openinlinelink closeinlinelink } % urlbst...
+INTEGERS { inlinelinks makeinlinelink addeprints adddoiresolver addpubmedresolver }
+% Following constants may be adjusted by hand, if desired
+FUNCTION {init.urlbst.variables}
+{
+ "Available from: " 'urlintro := % prefix before URL
+ "http://arxiv.org/abs/" 'eprinturl := % prefix to make URL from eprint ref
+ "arXiv:" 'eprintprefix := % text prefix printed before eprint ref
+ "http://dx.doi.org/" 'doiurl := % prefix to make URL from DOI
+ "doi:" 'doiprefix := % text prefix printed before DOI ref
+ "http://www.ncbi.nlm.nih.gov/pubmed/" 'pubmedurl := % prefix to make URL from PUBMED
+ "PMID:" 'pubmedprefix := % text prefix printed before PUBMED ref
+ #1 'addeprints := % 0=no eprints; 1=include eprints
+ #1 'adddoiresolver := % 0=no DOI resolver; 1=include it
+ #1 'addpubmedresolver := % 0=no PUBMED resolver; 1=include it
+ #1 'inlinelinks := % 0=URLs explicit; 1=URLs attached to titles
+ #1 'doiform := % 0=simple, but can produce invalid HTML; 1=needs post-processing
+ % the following are internal state variables, not config constants
+ #0 'makeinlinelink := % state variable managed by possibly.setup.inlinelink
+ "" 'openinlinelink := % ditto
+ "" 'closeinlinelink := % ditto
+}
+INTEGERS {
+ bracket.state
+ outside.brackets
+ open.brackets
+ within.brackets
+ close.brackets
+ close.first.block
+}
+% ...urlbst to here
+FUNCTION {init.state.consts}
+{ #0 'outside.brackets := % urlbst
+ #1 'open.brackets :=
+ #2 'within.brackets :=
+ #3 'close.brackets :=
+
+ #0 'before.all :=
+ #1 'mid.sentence :=
+ #2 'after.sentence :=
+ #3 'after.block :=
+ #0 'close.first.block :=
+}
+
+STRINGS { s t }
+
+% urlbst
+FUNCTION {output.nonnull.original}
+{ 's :=
+ output.state mid.sentence =
+ { ", " * write$ }
+ { output.state after.block =
+ { add.period$ write$
+ % close the <dt> after the end of the first block
+ close.first.block
+ { "</a></dt>" write$ newline$ "<dd>" write$
+ #0 'close.first.block := }
+ { newline$ }
+ if$
+ %"\newblock " write$
+ }
+ { output.state before.all =
+ 'write$
+ { add.period$ " " * write$ }
+ if$
+ }
+ if$
+ mid.sentence 'output.state :=
+ }
+ if$
+ s
+}
+
+% urlbst...
+% The following three functions are for handling inlinelink. They wrap
+% a block of text which is potentially output with write$ by multiple
+% other functions, so we don't know the content a priori.
+% They communicate between each other using the variables makeinlinelink
+% (which is true if a link should be made), and closeinlinelink (which holds
+% the string which should close any current link. They can be called
+% at any time, but start.inlinelink will be a no-op unless something has
+% previously set makeinlinelink true, and the two ...end.inlinelink functions
+% will only do their stuff if start.inlinelink has previously set
+% closeinlinelink to be non-empty.
+FUNCTION {possibly.setup.inlinelink}
+{ makeinlinelink
+ { "<a href=" quote$ * url * quote$ * ">" * 'openinlinelink :=
+ "</a>" 'closeinlinelink :=
+ #0 'makeinlinelink := }
+ 'skip$
+ if$ % makeinlinelink
+}
+FUNCTION {add.inlinelink}
+{ openinlinelink empty$
+ 'skip$
+ { openinlinelink swap$ * closeinlinelink *
+ "" 'openinlinelink :=
+ }
+ if$
+}
+FUNCTION {output.nonnull}
+{ % Save the thing we've been asked to output
+ 's :=
+ % If the bracket-state is close.brackets, then add a close-bracket to
+ % what is currently at the top of the stack, and set bracket.state
+ % to outside.brackets
+ bracket.state close.brackets =
+ { "]" *
+ outside.brackets 'bracket.state :=
+ }
+ 'skip$
+ if$
+ bracket.state outside.brackets =
+ { % We're outside all brackets -- this is the normal situation.
+ % Write out what's currently at the top of the stack, using the
+ % original output.nonnull function.
+ s
+ add.inlinelink
+ output.nonnull.original % invoke the original output.nonnull
+ }
+ { % Still in brackets. Add open-bracket or (continuation) comma, add the
+ % new text (in s) to the top of the stack, and move to the close-brackets
+ % state, ready for next time (unless inbrackets resets it). If we come
+ % into this branch, then output.state is carefully undisturbed.
+ bracket.state open.brackets =
+ { " [" * }
+ { ", " * } % bracket.state will be within.brackets
+ if$
+ s *
+ close.brackets 'bracket.state :=
+ }
+ if$
+}
+
+% Call this function just before adding something which should be presented in
+% brackets. bracket.state is handled specially within output.nonnull.
+FUNCTION {inbrackets}
+{ bracket.state close.brackets =
+ { within.brackets 'bracket.state := } % reset the state: not open nor closed
+ { open.brackets 'bracket.state := }
+ if$
+}
+
+FUNCTION {format.lastchecked}
+{ lastchecked empty$
+ { "" }
+ { inbrackets "cited " lastchecked * }
+ if$
+}
+% ...urlbst to here
+
+FUNCTION {output}
+{ duplicate$ empty$
+ 'pop$
+ 'output.nonnull
+ if$
+}
+
+FUNCTION {output.check}
+{ 't :=
+ duplicate$ empty$
+ { pop$ "empty " t * " in " * cite$ * warning$ }
+ 'output.nonnull
+ if$
+}
+
+FUNCTION {output.bibitem.original}
+{ newline$
+ "<dt><a name='" write$
+ cite$ write$
+ "'>[" cite$ * "] " * write$
+ % the <dt> is closed within output.nonnull, as long as close.first.block is true
+ #1 'close.first.block :=
+ newline$
+ ""
+ before.all 'output.state :=
+}
+
+FUNCTION {fin.entry.original}
+{ add.period$ "</dd>" *
+ write$
+ newline$
+}
+
+FUNCTION {new.block}
+{ output.state before.all =
+ 'skip$
+ { after.block 'output.state := }
+ if$
+}
+
+FUNCTION {new.sentence}
+{ output.state after.block =
+ 'skip$
+ { output.state before.all =
+ 'skip$
+ { after.sentence 'output.state := }
+ if$
+ }
+ if$
+}
+
+FUNCTION {not}
+{ { #0 }
+ { #1 }
+ if$
+}
+
+FUNCTION {and}
+{ 'skip$
+ { pop$ #0 }
+ if$
+}
+
+FUNCTION {or}
+{ { pop$ #1 }
+ 'skip$
+ if$
+}
+
+FUNCTION {new.block.checka}
+{ empty$
+ 'skip$
+ 'new.block
+ if$
+}
+
+FUNCTION {new.block.checkb}
+{ empty$
+ swap$ empty$
+ and
+ 'skip$
+ 'new.block
+ if$
+}
+
+FUNCTION {new.sentence.checka}
+{ empty$
+ 'skip$
+ 'new.sentence
+ if$
+}
+
+FUNCTION {new.sentence.checkb}
+{ empty$
+ swap$ empty$
+ and
+ 'skip$
+ 'new.sentence
+ if$
+}
+
+FUNCTION {field.or.null}
+{ duplicate$ empty$
+ { pop$ "" }
+ 'skip$
+ if$
+}
+
+FUNCTION {emphasize}
+{ duplicate$ empty$
+ { pop$ "" }
+ { "<em>" swap$ * "</em>" * }
+ if$
+}
+
+INTEGERS { nameptr namesleft numnames }
+
+FUNCTION {format.names}
+{ 's :=
+ #1 'nameptr :=
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ { s nameptr "{ff~}{vv~}{ll}{, jj}" format.name$ 't :=
+ nameptr #1 >
+ { namesleft #1 >
+ { ", " * t * }
+ { numnames #2 >
+ { "," * }
+ 'skip$
+ if$
+ t "others" =
+ { " et~al." * }
+ { " and " * t * }
+ if$
+ }
+ if$
+ }
+ 't
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+}
+
+FUNCTION {format.authors}
+{ author empty$
+ { "" }
+ { author format.names }
+ if$
+}
+
+FUNCTION {format.editors}
+{ editor empty$
+ { "" }
+ { editor format.names
+ editor num.names$ #1 >
+ { ", editors" * }
+ { ", editor" * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.title}
+{ title empty$
+ { "" }
+ { title "t" change.case$ }
+ if$
+}
+
+FUNCTION {n.dashify}
+{ 't :=
+ ""
+ { t empty$ not }
+ { t #1 #1 substring$ "-" =
+ { t #1 #2 substring$ "--" = not
+ { "--" *
+ t #2 global.max$ substring$ 't :=
+ }
+ { { t #1 #1 substring$ "-" = }
+ { "-" *
+ t #2 global.max$ substring$ 't :=
+ }
+ while$
+ }
+ if$
+ }
+ { t #1 #1 substring$ *
+ t #2 global.max$ substring$ 't :=
+ }
+ if$
+ }
+ while$
+}
+
+FUNCTION {format.date}
+{ year empty$
+ { month empty$
+ { "" }
+ { "there's a month but no year in " cite$ * warning$
+ month
+ }
+ if$
+ }
+ { month empty$
+ 'year
+ { month " " * year * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.btitle}
+{ title emphasize
+}
+
+FUNCTION {tie.or.space.connect}
+{ duplicate$ text.length$ #3 <
+ { "~" }
+ { " " }
+ if$
+ swap$ * *
+}
+
+FUNCTION {either.or.check}
+{ empty$
+ 'pop$
+ { "can't use both " swap$ * " fields in " * cite$ * warning$ }
+ if$
+}
+
+FUNCTION {format.bvolume}
+{ volume empty$
+ { "" }
+ { "volume" volume tie.or.space.connect
+ series empty$
+ 'skip$
+ { " of " * series emphasize * }
+ if$
+ "volume and number" number either.or.check
+ }
+ if$
+}
+
+FUNCTION {format.number.series}
+{ volume empty$
+ { number empty$
+ { series field.or.null }
+ { output.state mid.sentence =
+ { "number" }
+ { "Number" }
+ if$
+ number tie.or.space.connect
+ series empty$
+ { "there's a number but no series in " cite$ * warning$ }
+ { " in " * series * }
+ if$
+ }
+ if$
+ }
+ { "" }
+ if$
+}
+
+FUNCTION {format.edition}
+{ edition empty$
+ { "" }
+ { output.state mid.sentence =
+ { edition "l" change.case$ " edition" * }
+ { edition "t" change.case$ " edition" * }
+ if$
+ }
+ if$
+}
+
+INTEGERS { multiresult }
+
+FUNCTION {multi.page.check}
+{ 't :=
+ #0 'multiresult :=
+ { multiresult not
+ t empty$ not
+ and
+ }
+ { t #1 #1 substring$
+ duplicate$ "-" =
+ swap$ duplicate$ "," =
+ swap$ "+" =
+ or or
+ { #1 'multiresult := }
+ { t #2 global.max$ substring$ 't := }
+ if$
+ }
+ while$
+ multiresult
+}
+
+FUNCTION {format.pages}
+{ pages empty$
+ { "" }
+ { pages multi.page.check
+ { "pages" pages n.dashify tie.or.space.connect }
+ { "page" pages tie.or.space.connect }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.vol.num.pages}
+{ volume field.or.null
+ number empty$
+ 'skip$
+ { "(" number * ")" * *
+ volume empty$
+ { "there's a number but no volume in " cite$ * warning$ }
+ 'skip$
+ if$
+ }
+ if$
+ pages empty$
+ 'skip$
+ { duplicate$ empty$
+ { pop$ format.pages }
+ { ":" * pages n.dashify * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.chapter.pages}
+{ chapter empty$
+ 'format.pages
+ { type empty$
+ { "chapter" }
+ { type "l" change.case$ }
+ if$
+ chapter tie.or.space.connect
+ pages empty$
+ 'skip$
+ { ", " * format.pages * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.in.ed.booktitle}
+{ booktitle empty$
+ { "" }
+ { editor empty$
+ { "In " booktitle emphasize * }
+ { "In " format.editors * ", " * booktitle emphasize * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {empty.misc.check}
+{ author empty$ title empty$ howpublished empty$
+ month empty$ year empty$ note empty$
+ and and and and and
+ key empty$ not and
+ { "all relevant fields are empty in " cite$ * warning$ }
+ 'skip$
+ if$
+}
+
+FUNCTION {format.thesis.type}
+{ type empty$
+ 'skip$
+ { pop$
+ type "t" change.case$
+ }
+ if$
+}
+
+FUNCTION {format.tr.number}
+{ type empty$
+ { "Technical Report" }
+ 'type
+ if$
+ number empty$
+ { "t" change.case$ }
+ { number tie.or.space.connect }
+ if$
+}
+
+FUNCTION {format.article.crossref}
+{ key empty$
+ { journal empty$
+ { "need key or journal for " cite$ * " to crossref " * crossref *
+ warning$
+ ""
+ }
+ { "In <em>" journal * "</em>" * }
+ if$
+ }
+ { "In " key * }
+ if$
+ " <span class='cite'>" * crossref * "</span>" *
+}
+
+FUNCTION {format.crossref.editor}
+{ editor #1 "{vv~}{ll}" format.name$
+ editor num.names$ duplicate$
+ #2 >
+ { pop$ " et~al." * }
+ { #2 <
+ 'skip$
+ { editor #2 "{ff }{vv }{ll}{ jj}" format.name$ "others" =
+ { " et~al." * }
+ { " and " * editor #2 "{vv~}{ll}" format.name$ * }
+ if$
+ }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.book.crossref}
+{ volume empty$
+ { "empty volume in " cite$ * "'s crossref of " * crossref * warning$
+ "In "
+ }
+ { "Volume" volume tie.or.space.connect
+ " of " *
+ }
+ if$
+ editor empty$
+ editor field.or.null author field.or.null =
+ or
+ { key empty$
+ { series empty$
+ { "need editor, key, or series for " cite$ * " to crossref " *
+ crossref * warning$
+ "" *
+ }
+ { "<em>" * series * "</em>" * }
+ if$
+ }
+ { key * }
+ if$
+ }
+ { format.crossref.editor * }
+ if$
+ " <span class='cite'>" * crossref * "</span>" *
+}
+
+FUNCTION {format.incoll.inproc.crossref}
+{ editor empty$
+ editor field.or.null author field.or.null =
+ or
+ { key empty$
+ { booktitle empty$
+ { "need editor, key, or booktitle for " cite$ * " to crossref " *
+ crossref * warning$
+ ""
+ }
+ { "In <em>" booktitle * "</em>" * }
+ if$
+ }
+ { "In " key * }
+ if$
+ }
+ { "In " format.crossref.editor * }
+ if$
+ " <span class='cite'>" * crossref * "</span>" *
+}
+
+% urlbst...
+% Functions for making hypertext links.
+FUNCTION {make.href}
+{
+ "<a href='" swap$ * "'><code>" * swap$ * "</code></a>" *
+}
+
+% If inlinelinks is true, then format.url should be a no-op, since it's
+% (a) redundant, and (b) could end up as a link-within-a-link.
+FUNCTION {format.url}
+{ inlinelinks #1 = url empty$ or
+ { "" }
+ { urlintro "<code>" * url * "</code>" * }
+ if$
+}
+
+FUNCTION {format.eprint}
+{ eprint empty$
+ { "" }
+ { eprintprefix eprint * eprinturl eprint * make.href }
+ if$
+}
+
+FUNCTION {format.doi}
+{ doi empty$
+ { "" }
+ { doiform #0 =
+ { doiprefix doi * doiurl doi * make.href }
+ { "DOI:{" doi * "}" * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.pubmed}
+{ pubmed empty$
+ { "" }
+ { pubmedprefix pubmed * pubmedurl pubmed * make.href }
+ if$
+}
+
+% Output a URL. We can't use the more normal idiom (something like
+% `format.url output'), because the `inbrackets' within
+% format.lastchecked applies to everything between calls to `output',
+% so that `format.url format.lastchecked * output' ends up with both
+% the URL and the lastchecked in brackets.
+FUNCTION {output.url}
+{ url empty$
+ 'skip$
+ { new.block
+ format.url output
+ format.lastchecked output
+ }
+ if$
+}
+
+FUNCTION {output.web.refs}
+{
+ new.block
+ output.url
+ addeprints eprint empty$ not and
+ { format.eprint output.nonnull }
+ 'skip$
+ if$
+ adddoiresolver doi empty$ not and
+ { format.doi output.nonnull }
+ 'skip$
+ if$
+ addpubmedresolver pubmed empty$ not and
+ { format.pubmed output.nonnull }
+ 'skip$
+ if$
+}
+
+% Wrapper for output.bibitem.original.
+% If the URL field is not empty, set makeinlinelink to be true,
+% so that an inline link will be started at the next opportunity
+FUNCTION {output.bibitem}
+{ outside.brackets 'bracket.state :=
+ output.bibitem.original
+ inlinelinks url empty$ not and
+ { #1 'makeinlinelink := }
+ { #0 'makeinlinelink := }
+ if$
+}
+
+% Wrapper for fin.entry.original
+FUNCTION {fin.entry}
+{ output.web.refs % urlbst
+ makeinlinelink % ooops, it appears we didn't have a title for inlinelink
+ { possibly.setup.inlinelink % add some artificial link text here, as a fallback
+ "[link]" output.nonnull }
+ 'skip$
+ if$
+ bracket.state close.brackets = % urlbst
+ { "]" * }
+ 'skip$
+ if$
+ fin.entry.original
+}
+
+% Webpage entry type.
+% Title and url fields required;
+% author, note, year, month, and lastchecked fields optional
+% See references
+% ISO 690-2 http://www.nlc-bnc.ca/iso/tc46sc9/standard/690-2e.htm
+% http://www.classroom.net/classroom/CitingNetResources.html
+% http://neal.ctstateu.edu/history/cite.html
+% http://www.cas.usf.edu/english/walker/mla.html
+% for citation formats for web pages.
+FUNCTION {webpage}
+{ output.bibitem
+ author empty$
+ { editor empty$
+ 'skip$ % author and editor both optional
+ { format.editors output.nonnull }
+ if$
+ }
+ { editor empty$
+ { format.authors output.nonnull }
+ { "can't use both author and editor fields in " cite$ * warning$ }
+ if$
+ }
+ if$
+ new.block
+ title empty$ 'skip$ 'possibly.setup.inlinelink if$
+ format.title "title" output.check
+ inbrackets "online" output
+ new.block
+ year empty$
+ 'skip$
+ { format.date "year" output.check }
+ if$
+ % We don't need to output the URL details ('lastchecked' and 'url'),
+ % because fin.entry does that for us, using output.web.refs. The only
+ % reason we would want to put them here is if we were to decide that
+ % they should go in front of the rather miscellaneous information in 'note'.
+ new.block
+ note output
+ fin.entry
+}
+% ...urlbst to here
+
+
+FUNCTION {article}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ title empty$ 'skip$ 'possibly.setup.inlinelink if$ % urlbst
+ format.title "title" output.check
+ new.block
+ crossref missing$
+ { journal emphasize "journal" output.check
+ possibly.setup.inlinelink format.vol.num.pages output% urlbst
+ format.date "year" output.check
+ }
+ { format.article.crossref output.nonnull
+ format.pages output
+ }
+ if$
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {book}
+{ output.bibitem
+ author empty$
+ { format.editors "author and editor" output.check }
+ { format.authors output.nonnull
+ crossref missing$
+ { "author and editor" editor either.or.check }
+ 'skip$
+ if$
+ }
+ if$
+ new.block
+ title empty$ 'skip$ 'possibly.setup.inlinelink if$ % urlbst
+ format.btitle "title" output.check
+ crossref missing$
+ { format.bvolume output
+ new.block
+ format.number.series output
+ new.sentence
+ publisher "publisher" output.check
+ address output
+ }
+ { new.block
+ format.book.crossref output.nonnull
+ }
+ if$
+ format.edition output
+ format.date "year" output.check
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {booklet}
+{ output.bibitem
+ format.authors output
+ new.block
+ title empty$ 'skip$ 'possibly.setup.inlinelink if$ % urlbst
+ format.title "title" output.check
+ howpublished address new.block.checkb
+ howpublished output
+ address output
+ format.date output
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {inbook}
+{ output.bibitem
+ author empty$
+ { format.editors "author and editor" output.check }
+ { format.authors output.nonnull
+ crossref missing$
+ { "author and editor" editor either.or.check }
+ 'skip$
+ if$
+ }
+ if$
+ new.block
+ title empty$ 'skip$ 'possibly.setup.inlinelink if$ % urlbst
+ format.btitle "title" output.check
+ crossref missing$
+ { format.bvolume output
+ format.chapter.pages "chapter and pages" output.check
+ new.block
+ format.number.series output
+ new.sentence
+ publisher "publisher" output.check
+ address output
+ }
+ { format.chapter.pages "chapter and pages" output.check
+ new.block
+ format.book.crossref output.nonnull
+ }
+ if$
+ format.edition output
+ format.date "year" output.check
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {incollection}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ title empty$ 'skip$ 'possibly.setup.inlinelink if$ % urlbst
+ format.title "title" output.check
+ new.block
+ crossref missing$
+ { format.in.ed.booktitle "booktitle" output.check
+ format.bvolume output
+ format.number.series output
+ format.chapter.pages output
+ new.sentence
+ publisher "publisher" output.check
+ address output
+ format.edition output
+ format.date "year" output.check
+ }
+ { format.incoll.inproc.crossref output.nonnull
+ format.chapter.pages output
+ }
+ if$
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {inproceedings}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ title empty$ 'skip$ 'possibly.setup.inlinelink if$ % urlbst
+ format.title "title" output.check
+ new.block
+ crossref missing$
+ { format.in.ed.booktitle "booktitle" output.check
+ format.bvolume output
+ format.number.series output
+ format.pages output
+ address empty$
+ { organization publisher new.sentence.checkb
+ organization output
+ publisher output
+ format.date "year" output.check
+ }
+ { address output.nonnull
+ format.date "year" output.check
+ new.sentence
+ organization output
+ publisher output
+ }
+ if$
+ }
+ { format.incoll.inproc.crossref output.nonnull
+ format.pages output
+ }
+ if$
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {conference} { inproceedings }
+
+FUNCTION {manual}
+{ output.bibitem
+ author empty$
+ { organization empty$
+ 'skip$
+ { organization output.nonnull
+ address output
+ }
+ if$
+ }
+ { format.authors output.nonnull }
+ if$
+ new.block
+ title empty$ 'skip$ 'possibly.setup.inlinelink if$ % urlbst
+ format.btitle "title" output.check
+ author empty$
+ { organization empty$
+ { address new.block.checka
+ address output
+ }
+ 'skip$
+ if$
+ }
+ { organization address new.block.checkb
+ organization output
+ address output
+ }
+ if$
+ format.edition output
+ format.date output
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {mastersthesis}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ title empty$ 'skip$ 'possibly.setup.inlinelink if$ % urlbst
+ format.title "title" output.check
+ new.block
+ "Master's thesis" format.thesis.type output.nonnull
+ school "school" output.check
+ address output
+ format.date "year" output.check
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {misc}
+{ output.bibitem
+ format.authors output
+ title howpublished new.block.checkb
+ title empty$ 'skip$ 'possibly.setup.inlinelink if$ % urlbst
+ format.title output
+ howpublished new.block.checka
+ howpublished output
+ format.date output
+ new.block
+ note output
+ fin.entry
+ empty.misc.check
+}
+
+FUNCTION {phdthesis}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ title empty$ 'skip$ 'possibly.setup.inlinelink if$ % urlbst
+ format.btitle "title" output.check
+ new.block
+ "PhD thesis" format.thesis.type output.nonnull
+ school "school" output.check
+ address output
+ format.date "year" output.check
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {proceedings}
+{ output.bibitem
+ editor empty$
+ { organization output }
+ { format.editors output.nonnull }
+ if$
+ new.block
+ title empty$ 'skip$ 'possibly.setup.inlinelink if$ % urlbst
+ format.btitle "title" output.check
+ format.bvolume output
+ format.number.series output
+ address empty$
+ { editor empty$
+ { publisher new.sentence.checka }
+ { organization publisher new.sentence.checkb
+ organization output
+ }
+ if$
+ publisher output
+ format.date "year" output.check
+ }
+ { address output.nonnull
+ format.date "year" output.check
+ new.sentence
+ editor empty$
+ 'skip$
+ { organization output }
+ if$
+ publisher output
+ }
+ if$
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {techreport}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ title empty$ 'skip$ 'possibly.setup.inlinelink if$ % urlbst
+ format.title "title" output.check
+ new.block
+ format.tr.number output.nonnull
+ institution "institution" output.check
+ address output
+ format.date "year" output.check
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {unpublished}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ title empty$ 'skip$ 'possibly.setup.inlinelink if$ % urlbst
+ format.title "title" output.check
+ new.block
+ note "note" output.check
+ format.date output
+ fin.entry
+}
+
+FUNCTION {default.type} { misc }
+
+MACRO {jan} {"January"}
+
+MACRO {feb} {"February"}
+
+MACRO {mar} {"March"}
+
+MACRO {apr} {"April"}
+
+MACRO {may} {"May"}
+
+MACRO {jun} {"June"}
+
+MACRO {jul} {"July"}
+
+MACRO {aug} {"August"}
+
+MACRO {sep} {"September"}
+
+MACRO {oct} {"October"}
+
+MACRO {nov} {"November"}
+
+MACRO {dec} {"December"}
+
+MACRO {acmcs} {"ACM Computing Surveys"}
+
+MACRO {acta} {"Acta Informatica"}
+
+MACRO {cacm} {"Communications of the ACM"}
+
+MACRO {ibmjrd} {"IBM Journal of Research and Development"}
+
+MACRO {ibmsj} {"IBM Systems Journal"}
+
+MACRO {ieeese} {"IEEE Transactions on Software Engineering"}
+
+MACRO {ieeetc} {"IEEE Transactions on Computers"}
+
+MACRO {ieeetcad}
+ {"IEEE Transactions on Computer-Aided Design of Integrated Circuits"}
+
+MACRO {ipl} {"Information Processing Letters"}
+
+MACRO {jacm} {"Journal of the ACM"}
+
+MACRO {jcss} {"Journal of Computer and System Sciences"}
+
+MACRO {scp} {"Science of Computer Programming"}
+
+MACRO {sicomp} {"SIAM Journal on Computing"}
+
+MACRO {tocs} {"ACM Transactions on Computer Systems"}
+
+MACRO {tods} {"ACM Transactions on Database Systems"}
+
+MACRO {tog} {"ACM Transactions on Graphics"}
+
+MACRO {toms} {"ACM Transactions on Mathematical Software"}
+
+MACRO {toois} {"ACM Transactions on Office Information Systems"}
+
+MACRO {toplas} {"ACM Transactions on Programming Languages and Systems"}
+
+MACRO {tcs} {"Theoretical Computer Science"}
+
+READ
+
+FUNCTION {sortify}
+{ purify$
+ "l" change.case$
+}
+
+INTEGERS { len }
+
+FUNCTION {chop.word}
+{ 's :=
+ 'len :=
+ s #1 len substring$ =
+ { s len #1 + global.max$ substring$ }
+ 's
+ if$
+}
+
+FUNCTION {sort.format.names}
+{ 's :=
+ #1 'nameptr :=
+ ""
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ { nameptr #1 >
+ { " " * }
+ 'skip$
+ if$
+ s nameptr "{vv{ } }{ll{ }}{ ff{ }}{ jj{ }}" format.name$ 't :=
+ nameptr numnames = t "others" = and
+ { "et al" * }
+ { t sortify * }
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+}
+
+FUNCTION {sort.format.title}
+{ 't :=
+ "A " #2
+ "An " #3
+ "The " #4 t chop.word
+ chop.word
+ chop.word
+ sortify
+ #1 global.max$ substring$
+}
+
+FUNCTION {author.sort}
+{ author empty$
+ { key empty$
+ { "to sort, need author or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { author sort.format.names }
+ if$
+}
+
+FUNCTION {author.editor.sort}
+{ author empty$
+ { editor empty$
+ { key empty$
+ { "to sort, need author, editor, or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { editor sort.format.names }
+ if$
+ }
+ { author sort.format.names }
+ if$
+}
+
+FUNCTION {author.organization.sort}
+{ author empty$
+ { organization empty$
+ { key empty$
+ { "to sort, need author, organization, or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { "The " #4 organization chop.word sortify }
+ if$
+ }
+ { author sort.format.names }
+ if$
+}
+
+FUNCTION {editor.organization.sort}
+{ editor empty$
+ { organization empty$
+ { key empty$
+ { "to sort, need editor, organization, or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { "The " #4 organization chop.word sortify }
+ if$
+ }
+ { editor sort.format.names }
+ if$
+}
+
+FUNCTION {presort.by.author}
+{ type$ "book" =
+ type$ "inbook" =
+ or
+ 'author.editor.sort
+ { type$ "proceedings" =
+ 'editor.organization.sort
+ { type$ "manual" =
+ 'author.organization.sort
+ 'author.sort
+ if$
+ }
+ if$
+ }
+ if$
+ " "
+ *
+ year field.or.null sortify
+ *
+ " "
+ *
+ title field.or.null
+ sort.format.title
+ *
+ #1 entry.max$ substring$
+ 'sort.key$ :=
+}
+
+FUNCTION {presort.by.year}
+{ year field.or.null sortify
+ " "
+ *
+ type$ "book" =
+ type$ "inbook" =
+ or
+ 'author.editor.sort
+ { type$ "proceedings" =
+ 'editor.organization.sort
+ { type$ "manual" =
+ 'author.organization.sort
+ 'author.sort
+ if$
+ }
+ if$
+ }
+ if$
+ *
+ " "
+ *
+ title field.or.null
+ sort.format.title
+ *
+ #1 entry.max$ substring$
+ 'sort.key$ :=
+}
+
+ITERATE {presort.by.author}
+
+SORT
+
+STRINGS { longest.label }
+
+INTEGERS { number.label longest.label.width }
+
+FUNCTION {initialize.longest.label}
+{ "" 'longest.label :=
+ #1 'number.label :=
+ #0 'longest.label.width :=
+}
+
+FUNCTION {longest.label.pass}
+{ number.label int.to.str$ 'label :=
+ number.label #1 + 'number.label :=
+ label width$ longest.label.width >
+ { label 'longest.label :=
+ label width$ 'longest.label.width :=
+ }
+ 'skip$
+ if$
+}
+
+EXECUTE {initialize.longest.label}
+
+ITERATE {longest.label.pass}
+
+FUNCTION {begin.bib}
+{ preamble$ empty$
+ 'skip$
+ { preamble$ write$ newline$ }
+ if$
+ "<dl>" write$ newline$
+}
+
+EXECUTE {begin.bib}
+
+EXECUTE {init.urlbst.variables}
+EXECUTE {init.state.consts}
+
+ITERATE {call.type$}
+
+FUNCTION {end.bib}
+{ newline$
+ "</dl>" write$ newline$
+}
+
+EXECUTE {end.bib}
diff --git a/biblio/bibtex/contrib/bibhtml/plainhtmldate.bst b/biblio/bibtex/contrib/bibhtml/plainhtmldate.bst
new file mode 100644
index 0000000000..55087db870
--- /dev/null
+++ b/biblio/bibtex/contrib/bibhtml/plainhtmldate.bst
@@ -0,0 +1,1236 @@
+%%
+%% DO NOT EDIT
+%%
+%% This is plainhtmldate.bst, edited from plainhtml.bst by plainhtmldate.sed
+%%
+%% plainhtml.bst
+%%
+%% Part of bibhtml, version 2.0.2, released 2013 September 8
+%% Hg node 7076ce83a035.
+%% See <http://purl.org/nxg/dist/bibhtml>
+%%
+%% Copyright 1999, 2005, 2006, 2009, Norman Gray <norman@astro.gla.ac.uk>
+%%
+%% This is a modification of a modification!
+%%
+%%% Modification of BibTeX style file /usr/local/texlive/2008/texmf-dist/bibtex/bst/base/plain.bst
+%%% ... by urlbst, version 0.6-4 (marked with "% urlbst")
+%%% See <http://purl.org/nxg/dist/urlbst>
+%%% Added webpage entry type, and url and lastchecked fields.
+%%% Added eprint support.
+%%% Added DOI support.
+%%% Added PUBMED support.
+%%% Added hyperref support.
+%%% Original headers follow...
+ENTRY
+{ address
+author
+booktitle
+chapter
+edition
+editor
+howpublished
+institution
+journal
+key
+month
+note
+number
+organization
+pages
+publisher
+school
+series
+title
+type
+volume
+year
+eprint % urlbst
+doi % urlbst
+pubmed % urlbst
+url % urlbst
+lastchecked % urlbst
+}
+{}
+{ label }
+INTEGERS { output.state before.all mid.sentence after.sentence after.block doiform }
+STRINGS { urlintro eprinturl eprintprefix doiprefix doiurl pubmedprefix pubmedurl openinlinelink closeinlinelink } % urlbst...
+INTEGERS { inlinelinks makeinlinelink addeprints adddoiresolver addpubmedresolver }
+FUNCTION {init.urlbst.variables}
+{
+"Available from: " 'urlintro := % prefix before URL
+"http://arxiv.org/abs/" 'eprinturl := % prefix to make URL from eprint ref
+"arXiv:" 'eprintprefix := % text prefix printed before eprint ref
+"http://dx.doi.org/" 'doiurl := % prefix to make URL from DOI
+"doi:" 'doiprefix := % text prefix printed before DOI ref
+"http://www.ncbi.nlm.nih.gov/pubmed/" 'pubmedurl := % prefix to make URL from PUBMED
+"PMID:" 'pubmedprefix := % text prefix printed before PUBMED ref
+#1 'addeprints := % 0=no eprints; 1=include eprints
+#1 'adddoiresolver := % 0=no DOI resolver; 1=include it
+#1 'addpubmedresolver := % 0=no PUBMED resolver; 1=include it
+#1 'inlinelinks := % 0=URLs explicit; 1=URLs attached to titles
+#1 'doiform := % 0=simple, but can produce invalid HTML; 1=needs post-processing
+#0 'makeinlinelink := % state variable managed by possibly.setup.inlinelink
+"" 'openinlinelink := % ditto
+"" 'closeinlinelink := % ditto
+}
+INTEGERS {
+bracket.state
+outside.brackets
+open.brackets
+within.brackets
+close.brackets
+close.first.block
+}
+FUNCTION {init.state.consts}
+{ #0 'outside.brackets := % urlbst
+#1 'open.brackets :=
+#2 'within.brackets :=
+#3 'close.brackets :=
+#0 'before.all :=
+#1 'mid.sentence :=
+#2 'after.sentence :=
+#3 'after.block :=
+#0 'close.first.block :=
+}
+STRINGS { s t }
+FUNCTION {output.nonnull.original}
+{ 's :=
+output.state mid.sentence =
+{ ", " * write$ }
+{ output.state after.block =
+{ add.period$ write$
+close.first.block
+{ "</a></dt>" write$ newline$ "<dd>" write$
+#0 'close.first.block := }
+{ newline$ }
+if$
+}
+{ output.state before.all =
+'write$
+{ add.period$ " " * write$ }
+if$
+}
+if$
+mid.sentence 'output.state :=
+}
+if$
+s
+}
+FUNCTION {possibly.setup.inlinelink}
+{ makeinlinelink
+{ "<a href=" quote$ * url * quote$ * ">" * 'openinlinelink :=
+"</a>" 'closeinlinelink :=
+#0 'makeinlinelink := }
+'skip$
+if$ % makeinlinelink
+}
+FUNCTION {add.inlinelink}
+{ openinlinelink empty$
+'skip$
+{ openinlinelink swap$ * closeinlinelink *
+"" 'openinlinelink :=
+}
+if$
+}
+FUNCTION {output.nonnull}
+{ % Save the thing we've been asked to output
+'s :=
+bracket.state close.brackets =
+{ "]" *
+outside.brackets 'bracket.state :=
+}
+'skip$
+if$
+bracket.state outside.brackets =
+{ % We're outside all brackets -- this is the normal situation.
+s
+add.inlinelink
+output.nonnull.original % invoke the original output.nonnull
+}
+{ % Still in brackets. Add open-bracket or (continuation) comma, add the
+bracket.state open.brackets =
+{ " [" * }
+{ ", " * } % bracket.state will be within.brackets
+if$
+s *
+close.brackets 'bracket.state :=
+}
+if$
+}
+FUNCTION {inbrackets}
+{ bracket.state close.brackets =
+{ within.brackets 'bracket.state := } % reset the state: not open nor closed
+{ open.brackets 'bracket.state := }
+if$
+}
+FUNCTION {format.lastchecked}
+{ lastchecked empty$
+{ "" }
+{ inbrackets "cited " lastchecked * }
+if$
+}
+FUNCTION {output}
+{ duplicate$ empty$
+'pop$
+'output.nonnull
+if$
+}
+FUNCTION {output.check}
+{ 't :=
+duplicate$ empty$
+{ pop$ "empty " t * " in " * cite$ * warning$ }
+'output.nonnull
+if$
+}
+FUNCTION {output.bibitem.original}
+{ newline$
+"<dt><a name='" write$
+cite$ write$
+"'>[" cite$ * "] " * write$
+#1 'close.first.block :=
+newline$
+""
+before.all 'output.state :=
+}
+FUNCTION {fin.entry.original}
+{ add.period$ "</dd>" *
+write$
+newline$
+}
+FUNCTION {new.block}
+{ output.state before.all =
+'skip$
+{ after.block 'output.state := }
+if$
+}
+FUNCTION {new.sentence}
+{ output.state after.block =
+'skip$
+{ output.state before.all =
+'skip$
+{ after.sentence 'output.state := }
+if$
+}
+if$
+}
+FUNCTION {not}
+{ { #0 }
+{ #1 }
+if$
+}
+FUNCTION {and}
+{ 'skip$
+{ pop$ #0 }
+if$
+}
+FUNCTION {or}
+{ { pop$ #1 }
+'skip$
+if$
+}
+FUNCTION {new.block.checka}
+{ empty$
+'skip$
+'new.block
+if$
+}
+FUNCTION {new.block.checkb}
+{ empty$
+swap$ empty$
+and
+'skip$
+'new.block
+if$
+}
+FUNCTION {new.sentence.checka}
+{ empty$
+'skip$
+'new.sentence
+if$
+}
+FUNCTION {new.sentence.checkb}
+{ empty$
+swap$ empty$
+and
+'skip$
+'new.sentence
+if$
+}
+FUNCTION {field.or.null}
+{ duplicate$ empty$
+{ pop$ "" }
+'skip$
+if$
+}
+FUNCTION {emphasize}
+{ duplicate$ empty$
+{ pop$ "" }
+{ "<em>" swap$ * "</em>" * }
+if$
+}
+INTEGERS { nameptr namesleft numnames }
+FUNCTION {format.names}
+{ 's :=
+#1 'nameptr :=
+s num.names$ 'numnames :=
+numnames 'namesleft :=
+{ namesleft #0 > }
+{ s nameptr "{ff~}{vv~}{ll}{, jj}" format.name$ 't :=
+nameptr #1 >
+{ namesleft #1 >
+{ ", " * t * }
+{ numnames #2 >
+{ "," * }
+'skip$
+if$
+t "others" =
+{ " et~al." * }
+{ " and " * t * }
+if$
+}
+if$
+}
+'t
+if$
+nameptr #1 + 'nameptr :=
+namesleft #1 - 'namesleft :=
+}
+while$
+}
+FUNCTION {format.authors}
+{ author empty$
+{ "" }
+{ author format.names }
+if$
+}
+FUNCTION {format.editors}
+{ editor empty$
+{ "" }
+{ editor format.names
+editor num.names$ #1 >
+{ ", editors" * }
+{ ", editor" * }
+if$
+}
+if$
+}
+FUNCTION {format.title}
+{ title empty$
+{ "" }
+{ title "t" change.case$ }
+if$
+}
+FUNCTION {n.dashify}
+{ 't :=
+""
+{ t empty$ not }
+{ t #1 #1 substring$ "-" =
+{ t #1 #2 substring$ "--" = not
+{ "--" *
+t #2 global.max$ substring$ 't :=
+}
+{ { t #1 #1 substring$ "-" = }
+{ "-" *
+t #2 global.max$ substring$ 't :=
+}
+while$
+}
+if$
+}
+{ t #1 #1 substring$ *
+t #2 global.max$ substring$ 't :=
+}
+if$
+}
+while$
+}
+FUNCTION {format.date}
+{ year empty$
+{ month empty$
+{ "" }
+{ "there's a month but no year in " cite$ * warning$
+month
+}
+if$
+}
+{ month empty$
+'year
+{ month " " * year * }
+if$
+}
+if$
+}
+FUNCTION {format.btitle}
+{ title emphasize
+}
+FUNCTION {tie.or.space.connect}
+{ duplicate$ text.length$ #3 <
+{ "~" }
+{ " " }
+if$
+swap$ * *
+}
+FUNCTION {either.or.check}
+{ empty$
+'pop$
+{ "can't use both " swap$ * " fields in " * cite$ * warning$ }
+if$
+}
+FUNCTION {format.bvolume}
+{ volume empty$
+{ "" }
+{ "volume" volume tie.or.space.connect
+series empty$
+'skip$
+{ " of " * series emphasize * }
+if$
+"volume and number" number either.or.check
+}
+if$
+}
+FUNCTION {format.number.series}
+{ volume empty$
+{ number empty$
+{ series field.or.null }
+{ output.state mid.sentence =
+{ "number" }
+{ "Number" }
+if$
+number tie.or.space.connect
+series empty$
+{ "there's a number but no series in " cite$ * warning$ }
+{ " in " * series * }
+if$
+}
+if$
+}
+{ "" }
+if$
+}
+FUNCTION {format.edition}
+{ edition empty$
+{ "" }
+{ output.state mid.sentence =
+{ edition "l" change.case$ " edition" * }
+{ edition "t" change.case$ " edition" * }
+if$
+}
+if$
+}
+INTEGERS { multiresult }
+FUNCTION {multi.page.check}
+{ 't :=
+#0 'multiresult :=
+{ multiresult not
+t empty$ not
+and
+}
+{ t #1 #1 substring$
+duplicate$ "-" =
+swap$ duplicate$ "," =
+swap$ "+" =
+or or
+{ #1 'multiresult := }
+{ t #2 global.max$ substring$ 't := }
+if$
+}
+while$
+multiresult
+}
+FUNCTION {format.pages}
+{ pages empty$
+{ "" }
+{ pages multi.page.check
+{ "pages" pages n.dashify tie.or.space.connect }
+{ "page" pages tie.or.space.connect }
+if$
+}
+if$
+}
+FUNCTION {format.vol.num.pages}
+{ volume field.or.null
+number empty$
+'skip$
+{ "(" number * ")" * *
+volume empty$
+{ "there's a number but no volume in " cite$ * warning$ }
+'skip$
+if$
+}
+if$
+pages empty$
+'skip$
+{ duplicate$ empty$
+{ pop$ format.pages }
+{ ":" * pages n.dashify * }
+if$
+}
+if$
+}
+FUNCTION {format.chapter.pages}
+{ chapter empty$
+'format.pages
+{ type empty$
+{ "chapter" }
+{ type "l" change.case$ }
+if$
+chapter tie.or.space.connect
+pages empty$
+'skip$
+{ ", " * format.pages * }
+if$
+}
+if$
+}
+FUNCTION {format.in.ed.booktitle}
+{ booktitle empty$
+{ "" }
+{ editor empty$
+{ "In " booktitle emphasize * }
+{ "In " format.editors * ", " * booktitle emphasize * }
+if$
+}
+if$
+}
+FUNCTION {empty.misc.check}
+{ author empty$ title empty$ howpublished empty$
+month empty$ year empty$ note empty$
+and and and and and
+key empty$ not and
+{ "all relevant fields are empty in " cite$ * warning$ }
+'skip$
+if$
+}
+FUNCTION {format.thesis.type}
+{ type empty$
+'skip$
+{ pop$
+type "t" change.case$
+}
+if$
+}
+FUNCTION {format.tr.number}
+{ type empty$
+{ "Technical Report" }
+'type
+if$
+number empty$
+{ "t" change.case$ }
+{ number tie.or.space.connect }
+if$
+}
+FUNCTION {format.article.crossref}
+{ key empty$
+{ journal empty$
+{ "need key or journal for " cite$ * " to crossref " * crossref *
+warning$
+""
+}
+{ "In <em>" journal * "</em>" * }
+if$
+}
+{ "In " key * }
+if$
+" <span class='cite'>" * crossref * "</span>" *
+}
+FUNCTION {format.crossref.editor}
+{ editor #1 "{vv~}{ll}" format.name$
+editor num.names$ duplicate$
+#2 >
+{ pop$ " et~al." * }
+{ #2 <
+'skip$
+{ editor #2 "{ff }{vv }{ll}{ jj}" format.name$ "others" =
+{ " et~al." * }
+{ " and " * editor #2 "{vv~}{ll}" format.name$ * }
+if$
+}
+if$
+}
+if$
+}
+FUNCTION {format.book.crossref}
+{ volume empty$
+{ "empty volume in " cite$ * "'s crossref of " * crossref * warning$
+"In "
+}
+{ "Volume" volume tie.or.space.connect
+" of " *
+}
+if$
+editor empty$
+editor field.or.null author field.or.null =
+or
+{ key empty$
+{ series empty$
+{ "need editor, key, or series for " cite$ * " to crossref " *
+crossref * warning$
+"" *
+}
+{ "<em>" * series * "</em>" * }
+if$
+}
+{ key * }
+if$
+}
+{ format.crossref.editor * }
+if$
+" <span class='cite'>" * crossref * "</span>" *
+}
+FUNCTION {format.incoll.inproc.crossref}
+{ editor empty$
+editor field.or.null author field.or.null =
+or
+{ key empty$
+{ booktitle empty$
+{ "need editor, key, or booktitle for " cite$ * " to crossref " *
+crossref * warning$
+""
+}
+{ "In <em>" booktitle * "</em>" * }
+if$
+}
+{ "In " key * }
+if$
+}
+{ "In " format.crossref.editor * }
+if$
+" <span class='cite'>" * crossref * "</span>" *
+}
+FUNCTION {make.href}
+{
+"<a href='" swap$ * "'><code>" * swap$ * "</code></a>" *
+}
+FUNCTION {format.url}
+{ inlinelinks #1 = url empty$ or
+{ "" }
+{ urlintro "<code>" * url * "</code>" * }
+if$
+}
+FUNCTION {format.eprint}
+{ eprint empty$
+{ "" }
+{ eprintprefix eprint * eprinturl eprint * make.href }
+if$
+}
+FUNCTION {format.doi}
+{ doi empty$
+{ "" }
+{ doiform #0 =
+{ doiprefix doi * doiurl doi * make.href }
+{ "DOI:{" doi * "}" * }
+if$
+}
+if$
+}
+FUNCTION {format.pubmed}
+{ pubmed empty$
+{ "" }
+{ pubmedprefix pubmed * pubmedurl pubmed * make.href }
+if$
+}
+FUNCTION {output.url}
+{ url empty$
+'skip$
+{ new.block
+format.url output
+format.lastchecked output
+}
+if$
+}
+FUNCTION {output.web.refs}
+{
+new.block
+output.url
+addeprints eprint empty$ not and
+{ format.eprint output.nonnull }
+'skip$
+if$
+adddoiresolver doi empty$ not and
+{ format.doi output.nonnull }
+'skip$
+if$
+addpubmedresolver pubmed empty$ not and
+{ format.pubmed output.nonnull }
+'skip$
+if$
+}
+FUNCTION {output.bibitem}
+{ outside.brackets 'bracket.state :=
+output.bibitem.original
+inlinelinks url empty$ not and
+{ #1 'makeinlinelink := }
+{ #0 'makeinlinelink := }
+if$
+}
+FUNCTION {fin.entry}
+{ output.web.refs % urlbst
+makeinlinelink % ooops, it appears we didn't have a title for inlinelink
+{ possibly.setup.inlinelink % add some artificial link text here, as a fallback
+"[link]" output.nonnull }
+'skip$
+if$
+bracket.state close.brackets = % urlbst
+{ "]" * }
+'skip$
+if$
+fin.entry.original
+}
+FUNCTION {webpage}
+{ output.bibitem
+author empty$
+{ editor empty$
+'skip$ % author and editor both optional
+{ format.editors output.nonnull }
+if$
+}
+{ editor empty$
+{ format.authors output.nonnull }
+{ "can't use both author and editor fields in " cite$ * warning$ }
+if$
+}
+if$
+new.block
+title empty$ 'skip$ 'possibly.setup.inlinelink if$
+format.title "title" output.check
+inbrackets "online" output
+new.block
+year empty$
+'skip$
+{ format.date "year" output.check }
+if$
+new.block
+note output
+fin.entry
+}
+FUNCTION {article}
+{ output.bibitem
+format.authors "author" output.check
+new.block
+title empty$ 'skip$ 'possibly.setup.inlinelink if$ % urlbst
+format.title "title" output.check
+new.block
+crossref missing$
+{ journal emphasize "journal" output.check
+possibly.setup.inlinelink format.vol.num.pages output% urlbst
+format.date "year" output.check
+}
+{ format.article.crossref output.nonnull
+format.pages output
+}
+if$
+new.block
+note output
+fin.entry
+}
+FUNCTION {book}
+{ output.bibitem
+author empty$
+{ format.editors "author and editor" output.check }
+{ format.authors output.nonnull
+crossref missing$
+{ "author and editor" editor either.or.check }
+'skip$
+if$
+}
+if$
+new.block
+title empty$ 'skip$ 'possibly.setup.inlinelink if$ % urlbst
+format.btitle "title" output.check
+crossref missing$
+{ format.bvolume output
+new.block
+format.number.series output
+new.sentence
+publisher "publisher" output.check
+address output
+}
+{ new.block
+format.book.crossref output.nonnull
+}
+if$
+format.edition output
+format.date "year" output.check
+new.block
+note output
+fin.entry
+}
+FUNCTION {booklet}
+{ output.bibitem
+format.authors output
+new.block
+title empty$ 'skip$ 'possibly.setup.inlinelink if$ % urlbst
+format.title "title" output.check
+howpublished address new.block.checkb
+howpublished output
+address output
+format.date output
+new.block
+note output
+fin.entry
+}
+FUNCTION {inbook}
+{ output.bibitem
+author empty$
+{ format.editors "author and editor" output.check }
+{ format.authors output.nonnull
+crossref missing$
+{ "author and editor" editor either.or.check }
+'skip$
+if$
+}
+if$
+new.block
+title empty$ 'skip$ 'possibly.setup.inlinelink if$ % urlbst
+format.btitle "title" output.check
+crossref missing$
+{ format.bvolume output
+format.chapter.pages "chapter and pages" output.check
+new.block
+format.number.series output
+new.sentence
+publisher "publisher" output.check
+address output
+}
+{ format.chapter.pages "chapter and pages" output.check
+new.block
+format.book.crossref output.nonnull
+}
+if$
+format.edition output
+format.date "year" output.check
+new.block
+note output
+fin.entry
+}
+FUNCTION {incollection}
+{ output.bibitem
+format.authors "author" output.check
+new.block
+title empty$ 'skip$ 'possibly.setup.inlinelink if$ % urlbst
+format.title "title" output.check
+new.block
+crossref missing$
+{ format.in.ed.booktitle "booktitle" output.check
+format.bvolume output
+format.number.series output
+format.chapter.pages output
+new.sentence
+publisher "publisher" output.check
+address output
+format.edition output
+format.date "year" output.check
+}
+{ format.incoll.inproc.crossref output.nonnull
+format.chapter.pages output
+}
+if$
+new.block
+note output
+fin.entry
+}
+FUNCTION {inproceedings}
+{ output.bibitem
+format.authors "author" output.check
+new.block
+title empty$ 'skip$ 'possibly.setup.inlinelink if$ % urlbst
+format.title "title" output.check
+new.block
+crossref missing$
+{ format.in.ed.booktitle "booktitle" output.check
+format.bvolume output
+format.number.series output
+format.pages output
+address empty$
+{ organization publisher new.sentence.checkb
+organization output
+publisher output
+format.date "year" output.check
+}
+{ address output.nonnull
+format.date "year" output.check
+new.sentence
+organization output
+publisher output
+}
+if$
+}
+{ format.incoll.inproc.crossref output.nonnull
+format.pages output
+}
+if$
+new.block
+note output
+fin.entry
+}
+FUNCTION {conference} { inproceedings }
+FUNCTION {manual}
+{ output.bibitem
+author empty$
+{ organization empty$
+'skip$
+{ organization output.nonnull
+address output
+}
+if$
+}
+{ format.authors output.nonnull }
+if$
+new.block
+title empty$ 'skip$ 'possibly.setup.inlinelink if$ % urlbst
+format.btitle "title" output.check
+author empty$
+{ organization empty$
+{ address new.block.checka
+address output
+}
+'skip$
+if$
+}
+{ organization address new.block.checkb
+organization output
+address output
+}
+if$
+format.edition output
+format.date output
+new.block
+note output
+fin.entry
+}
+FUNCTION {mastersthesis}
+{ output.bibitem
+format.authors "author" output.check
+new.block
+title empty$ 'skip$ 'possibly.setup.inlinelink if$ % urlbst
+format.title "title" output.check
+new.block
+"Master's thesis" format.thesis.type output.nonnull
+school "school" output.check
+address output
+format.date "year" output.check
+new.block
+note output
+fin.entry
+}
+FUNCTION {misc}
+{ output.bibitem
+format.authors output
+title howpublished new.block.checkb
+title empty$ 'skip$ 'possibly.setup.inlinelink if$ % urlbst
+format.title output
+howpublished new.block.checka
+howpublished output
+format.date output
+new.block
+note output
+fin.entry
+empty.misc.check
+}
+FUNCTION {phdthesis}
+{ output.bibitem
+format.authors "author" output.check
+new.block
+title empty$ 'skip$ 'possibly.setup.inlinelink if$ % urlbst
+format.btitle "title" output.check
+new.block
+"PhD thesis" format.thesis.type output.nonnull
+school "school" output.check
+address output
+format.date "year" output.check
+new.block
+note output
+fin.entry
+}
+FUNCTION {proceedings}
+{ output.bibitem
+editor empty$
+{ organization output }
+{ format.editors output.nonnull }
+if$
+new.block
+title empty$ 'skip$ 'possibly.setup.inlinelink if$ % urlbst
+format.btitle "title" output.check
+format.bvolume output
+format.number.series output
+address empty$
+{ editor empty$
+{ publisher new.sentence.checka }
+{ organization publisher new.sentence.checkb
+organization output
+}
+if$
+publisher output
+format.date "year" output.check
+}
+{ address output.nonnull
+format.date "year" output.check
+new.sentence
+editor empty$
+'skip$
+{ organization output }
+if$
+publisher output
+}
+if$
+new.block
+note output
+fin.entry
+}
+FUNCTION {techreport}
+{ output.bibitem
+format.authors "author" output.check
+new.block
+title empty$ 'skip$ 'possibly.setup.inlinelink if$ % urlbst
+format.title "title" output.check
+new.block
+format.tr.number output.nonnull
+institution "institution" output.check
+address output
+format.date "year" output.check
+new.block
+note output
+fin.entry
+}
+FUNCTION {unpublished}
+{ output.bibitem
+format.authors "author" output.check
+new.block
+title empty$ 'skip$ 'possibly.setup.inlinelink if$ % urlbst
+format.title "title" output.check
+new.block
+note "note" output.check
+format.date output
+fin.entry
+}
+FUNCTION {default.type} { misc }
+MACRO {jan} {"January"}
+MACRO {feb} {"February"}
+MACRO {mar} {"March"}
+MACRO {apr} {"April"}
+MACRO {may} {"May"}
+MACRO {jun} {"June"}
+MACRO {jul} {"July"}
+MACRO {aug} {"August"}
+MACRO {sep} {"September"}
+MACRO {oct} {"October"}
+MACRO {nov} {"November"}
+MACRO {dec} {"December"}
+MACRO {acmcs} {"ACM Computing Surveys"}
+MACRO {acta} {"Acta Informatica"}
+MACRO {cacm} {"Communications of the ACM"}
+MACRO {ibmjrd} {"IBM Journal of Research and Development"}
+MACRO {ibmsj} {"IBM Systems Journal"}
+MACRO {ieeese} {"IEEE Transactions on Software Engineering"}
+MACRO {ieeetc} {"IEEE Transactions on Computers"}
+MACRO {ieeetcad}
+{"IEEE Transactions on Computer-Aided Design of Integrated Circuits"}
+MACRO {ipl} {"Information Processing Letters"}
+MACRO {jacm} {"Journal of the ACM"}
+MACRO {jcss} {"Journal of Computer and System Sciences"}
+MACRO {scp} {"Science of Computer Programming"}
+MACRO {sicomp} {"SIAM Journal on Computing"}
+MACRO {tocs} {"ACM Transactions on Computer Systems"}
+MACRO {tods} {"ACM Transactions on Database Systems"}
+MACRO {tog} {"ACM Transactions on Graphics"}
+MACRO {toms} {"ACM Transactions on Mathematical Software"}
+MACRO {toois} {"ACM Transactions on Office Information Systems"}
+MACRO {toplas} {"ACM Transactions on Programming Languages and Systems"}
+MACRO {tcs} {"Theoretical Computer Science"}
+READ
+FUNCTION {sortify}
+{ purify$
+"l" change.case$
+}
+INTEGERS { len }
+FUNCTION {chop.word}
+{ 's :=
+'len :=
+s #1 len substring$ =
+{ s len #1 + global.max$ substring$ }
+'s
+if$
+}
+FUNCTION {sort.format.names}
+{ 's :=
+#1 'nameptr :=
+""
+s num.names$ 'numnames :=
+numnames 'namesleft :=
+{ namesleft #0 > }
+{ nameptr #1 >
+{ " " * }
+'skip$
+if$
+s nameptr "{vv{ } }{ll{ }}{ ff{ }}{ jj{ }}" format.name$ 't :=
+nameptr numnames = t "others" = and
+{ "et al" * }
+{ t sortify * }
+if$
+nameptr #1 + 'nameptr :=
+namesleft #1 - 'namesleft :=
+}
+while$
+}
+FUNCTION {sort.format.title}
+{ 't :=
+"A " #2
+"An " #3
+"The " #4 t chop.word
+chop.word
+chop.word
+sortify
+#1 global.max$ substring$
+}
+FUNCTION {author.sort}
+{ author empty$
+{ key empty$
+{ "to sort, need author or key in " cite$ * warning$
+""
+}
+{ key sortify }
+if$
+}
+{ author sort.format.names }
+if$
+}
+FUNCTION {author.editor.sort}
+{ author empty$
+{ editor empty$
+{ key empty$
+{ "to sort, need author, editor, or key in " cite$ * warning$
+""
+}
+{ key sortify }
+if$
+}
+{ editor sort.format.names }
+if$
+}
+{ author sort.format.names }
+if$
+}
+FUNCTION {author.organization.sort}
+{ author empty$
+{ organization empty$
+{ key empty$
+{ "to sort, need author, organization, or key in " cite$ * warning$
+""
+}
+{ key sortify }
+if$
+}
+{ "The " #4 organization chop.word sortify }
+if$
+}
+{ author sort.format.names }
+if$
+}
+FUNCTION {editor.organization.sort}
+{ editor empty$
+{ organization empty$
+{ key empty$
+{ "to sort, need editor, organization, or key in " cite$ * warning$
+""
+}
+{ key sortify }
+if$
+}
+{ "The " #4 organization chop.word sortify }
+if$
+}
+{ editor sort.format.names }
+if$
+}
+FUNCTION {presort.by.author}
+{ type$ "book" =
+type$ "inbook" =
+or
+'author.editor.sort
+{ type$ "proceedings" =
+'editor.organization.sort
+{ type$ "manual" =
+'author.organization.sort
+'author.sort
+if$
+}
+if$
+}
+if$
+" "
+*
+year field.or.null sortify
+*
+" "
+*
+title field.or.null
+sort.format.title
+*
+#1 entry.max$ substring$
+'sort.key$ :=
+}
+FUNCTION {presort.by.year}
+{ year field.or.null sortify
+" "
+*
+type$ "book" =
+type$ "inbook" =
+or
+'author.editor.sort
+{ type$ "proceedings" =
+'editor.organization.sort
+{ type$ "manual" =
+'author.organization.sort
+'author.sort
+if$
+}
+if$
+}
+if$
+*
+" "
+*
+title field.or.null
+sort.format.title
+*
+#1 entry.max$ substring$
+'sort.key$ :=
+}
+ITERATE {presort.by.year}
+SORT
+STRINGS { longest.label }
+INTEGERS { number.label longest.label.width }
+FUNCTION {initialize.longest.label}
+{ "" 'longest.label :=
+#1 'number.label :=
+#0 'longest.label.width :=
+}
+FUNCTION {longest.label.pass}
+{ number.label int.to.str$ 'label :=
+number.label #1 + 'number.label :=
+label width$ longest.label.width >
+{ label 'longest.label :=
+label width$ 'longest.label.width :=
+}
+'skip$
+if$
+}
+EXECUTE {initialize.longest.label}
+ITERATE {longest.label.pass}
+FUNCTION {begin.bib}
+{ preamble$ empty$
+'skip$
+{ preamble$ write$ newline$ }
+if$
+"<dl>" write$ newline$
+}
+EXECUTE {begin.bib}
+EXECUTE {init.urlbst.variables}
+EXECUTE {init.state.consts}
+ITERATE {call.type$}
+FUNCTION {end.bib}
+{ newline$
+"</dl>" write$ newline$
+}
+EXECUTE {end.bib}
diff --git a/biblio/bibtex/contrib/bibhtml/plainhtmldater.bst b/biblio/bibtex/contrib/bibhtml/plainhtmldater.bst
new file mode 100644
index 0000000000..d3b969ac61
--- /dev/null
+++ b/biblio/bibtex/contrib/bibhtml/plainhtmldater.bst
@@ -0,0 +1,1236 @@
+%%
+%% DO NOT EDIT
+%%
+%% This is plainhtmldater.bst, edited from plainhtml.bst by plainhtmldater.sed
+%%
+%% plainhtml.bst
+%%
+%% Part of bibhtml, version 2.0.2, released 2013 September 8
+%% Hg node 7076ce83a035.
+%% See <http://purl.org/nxg/dist/bibhtml>
+%%
+%% Copyright 1999, 2005, 2006, 2009, Norman Gray <norman@astro.gla.ac.uk>
+%%
+%% This is a modification of a modification!
+%%
+%%% Modification of BibTeX style file /usr/local/texlive/2008/texmf-dist/bibtex/bst/base/plain.bst
+%%% ... by urlbst, version 0.6-4 (marked with "% urlbst")
+%%% See <http://purl.org/nxg/dist/urlbst>
+%%% Added webpage entry type, and url and lastchecked fields.
+%%% Added eprint support.
+%%% Added DOI support.
+%%% Added PUBMED support.
+%%% Added hyperref support.
+%%% Original headers follow...
+ENTRY
+{ address
+author
+booktitle
+chapter
+edition
+editor
+howpublished
+institution
+journal
+key
+month
+note
+number
+organization
+pages
+publisher
+school
+series
+title
+type
+volume
+year
+eprint % urlbst
+doi % urlbst
+pubmed % urlbst
+url % urlbst
+lastchecked % urlbst
+}
+{}
+{ label }
+INTEGERS { output.state before.all mid.sentence after.sentence after.block doiform }
+STRINGS { urlintro eprinturl eprintprefix doiprefix doiurl pubmedprefix pubmedurl openinlinelink closeinlinelink } % urlbst...
+INTEGERS { inlinelinks makeinlinelink addeprints adddoiresolver addpubmedresolver }
+FUNCTION {init.urlbst.variables}
+{
+"Available from: " 'urlintro := % prefix before URL
+"http://arxiv.org/abs/" 'eprinturl := % prefix to make URL from eprint ref
+"arXiv:" 'eprintprefix := % text prefix printed before eprint ref
+"http://dx.doi.org/" 'doiurl := % prefix to make URL from DOI
+"doi:" 'doiprefix := % text prefix printed before DOI ref
+"http://www.ncbi.nlm.nih.gov/pubmed/" 'pubmedurl := % prefix to make URL from PUBMED
+"PMID:" 'pubmedprefix := % text prefix printed before PUBMED ref
+#1 'addeprints := % 0=no eprints; 1=include eprints
+#1 'adddoiresolver := % 0=no DOI resolver; 1=include it
+#1 'addpubmedresolver := % 0=no PUBMED resolver; 1=include it
+#1 'inlinelinks := % 0=URLs explicit; 1=URLs attached to titles
+#1 'doiform := % 0=simple, but can produce invalid HTML; 1=needs post-processing
+#0 'makeinlinelink := % state variable managed by possibly.setup.inlinelink
+"" 'openinlinelink := % ditto
+"" 'closeinlinelink := % ditto
+}
+INTEGERS {
+bracket.state
+outside.brackets
+open.brackets
+within.brackets
+close.brackets
+close.first.block
+}
+FUNCTION {init.state.consts}
+{ #0 'outside.brackets := % urlbst
+#1 'open.brackets :=
+#2 'within.brackets :=
+#3 'close.brackets :=
+#0 'before.all :=
+#1 'mid.sentence :=
+#2 'after.sentence :=
+#3 'after.block :=
+#0 'close.first.block :=
+}
+STRINGS { s t }
+FUNCTION {output.nonnull.original}
+{ 's :=
+output.state mid.sentence =
+{ ", " * write$ }
+{ output.state after.block =
+{ add.period$ write$
+close.first.block
+{ "</a></dt>" write$ newline$ "<dd>" write$
+#0 'close.first.block := }
+{ newline$ }
+if$
+}
+{ output.state before.all =
+'write$
+{ add.period$ " " * write$ }
+if$
+}
+if$
+mid.sentence 'output.state :=
+}
+if$
+s
+}
+FUNCTION {possibly.setup.inlinelink}
+{ makeinlinelink
+{ "<a href=" quote$ * url * quote$ * ">" * 'openinlinelink :=
+"</a>" 'closeinlinelink :=
+#0 'makeinlinelink := }
+'skip$
+if$ % makeinlinelink
+}
+FUNCTION {add.inlinelink}
+{ openinlinelink empty$
+'skip$
+{ openinlinelink swap$ * closeinlinelink *
+"" 'openinlinelink :=
+}
+if$
+}
+FUNCTION {output.nonnull}
+{ % Save the thing we've been asked to output
+'s :=
+bracket.state close.brackets =
+{ "]" *
+outside.brackets 'bracket.state :=
+}
+'skip$
+if$
+bracket.state outside.brackets =
+{ % We're outside all brackets -- this is the normal situation.
+s
+add.inlinelink
+output.nonnull.original % invoke the original output.nonnull
+}
+{ % Still in brackets. Add open-bracket or (continuation) comma, add the
+bracket.state open.brackets =
+{ " [" * }
+{ ", " * } % bracket.state will be within.brackets
+if$
+s *
+close.brackets 'bracket.state :=
+}
+if$
+}
+FUNCTION {inbrackets}
+{ bracket.state close.brackets =
+{ within.brackets 'bracket.state := } % reset the state: not open nor closed
+{ open.brackets 'bracket.state := }
+if$
+}
+FUNCTION {format.lastchecked}
+{ lastchecked empty$
+{ "" }
+{ inbrackets "cited " lastchecked * }
+if$
+}
+FUNCTION {output}
+{ duplicate$ empty$
+'pop$
+'output.nonnull
+if$
+}
+FUNCTION {output.check}
+{ 't :=
+duplicate$ empty$
+{ pop$ "empty " t * " in " * cite$ * warning$ }
+'output.nonnull
+if$
+}
+FUNCTION {output.bibitem.original}
+{ newline$
+"<dt><a name='" write$
+cite$ write$
+"'>[" cite$ * "] " * write$
+#1 'close.first.block :=
+newline$
+""
+before.all 'output.state :=
+}
+FUNCTION {fin.entry.original}
+{ add.period$ "</dd>" *
+write$
+newline$
+}
+FUNCTION {new.block}
+{ output.state before.all =
+'skip$
+{ after.block 'output.state := }
+if$
+}
+FUNCTION {new.sentence}
+{ output.state after.block =
+'skip$
+{ output.state before.all =
+'skip$
+{ after.sentence 'output.state := }
+if$
+}
+if$
+}
+FUNCTION {not}
+{ { #0 }
+{ #1 }
+if$
+}
+FUNCTION {and}
+{ 'skip$
+{ pop$ #0 }
+if$
+}
+FUNCTION {or}
+{ { pop$ #1 }
+'skip$
+if$
+}
+FUNCTION {new.block.checka}
+{ empty$
+'skip$
+'new.block
+if$
+}
+FUNCTION {new.block.checkb}
+{ empty$
+swap$ empty$
+and
+'skip$
+'new.block
+if$
+}
+FUNCTION {new.sentence.checka}
+{ empty$
+'skip$
+'new.sentence
+if$
+}
+FUNCTION {new.sentence.checkb}
+{ empty$
+swap$ empty$
+and
+'skip$
+'new.sentence
+if$
+}
+FUNCTION {field.or.null}
+{ duplicate$ empty$
+{ pop$ "" }
+'skip$
+if$
+}
+FUNCTION {emphasize}
+{ duplicate$ empty$
+{ pop$ "" }
+{ "<em>" swap$ * "</em>" * }
+if$
+}
+INTEGERS { nameptr namesleft numnames }
+FUNCTION {format.names}
+{ 's :=
+#1 'nameptr :=
+s num.names$ 'numnames :=
+numnames 'namesleft :=
+{ namesleft #0 > }
+{ s nameptr "{ff~}{vv~}{ll}{, jj}" format.name$ 't :=
+nameptr #1 >
+{ namesleft #1 >
+{ ", " * t * }
+{ numnames #2 >
+{ "," * }
+'skip$
+if$
+t "others" =
+{ " et~al." * }
+{ " and " * t * }
+if$
+}
+if$
+}
+'t
+if$
+nameptr #1 + 'nameptr :=
+namesleft #1 - 'namesleft :=
+}
+while$
+}
+FUNCTION {format.authors}
+{ author empty$
+{ "" }
+{ author format.names }
+if$
+}
+FUNCTION {format.editors}
+{ editor empty$
+{ "" }
+{ editor format.names
+editor num.names$ #1 >
+{ ", editors" * }
+{ ", editor" * }
+if$
+}
+if$
+}
+FUNCTION {format.title}
+{ title empty$
+{ "" }
+{ title "t" change.case$ }
+if$
+}
+FUNCTION {n.dashify}
+{ 't :=
+""
+{ t empty$ not }
+{ t #1 #1 substring$ "-" =
+{ t #1 #2 substring$ "--" = not
+{ "--" *
+t #2 global.max$ substring$ 't :=
+}
+{ { t #1 #1 substring$ "-" = }
+{ "-" *
+t #2 global.max$ substring$ 't :=
+}
+while$
+}
+if$
+}
+{ t #1 #1 substring$ *
+t #2 global.max$ substring$ 't :=
+}
+if$
+}
+while$
+}
+FUNCTION {format.date}
+{ year empty$
+{ month empty$
+{ "" }
+{ "there's a month but no year in " cite$ * warning$
+month
+}
+if$
+}
+{ month empty$
+'year
+{ month " " * year * }
+if$
+}
+if$
+}
+FUNCTION {format.btitle}
+{ title emphasize
+}
+FUNCTION {tie.or.space.connect}
+{ duplicate$ text.length$ #3 <
+{ "~" }
+{ " " }
+if$
+swap$ * *
+}
+FUNCTION {either.or.check}
+{ empty$
+'pop$
+{ "can't use both " swap$ * " fields in " * cite$ * warning$ }
+if$
+}
+FUNCTION {format.bvolume}
+{ volume empty$
+{ "" }
+{ "volume" volume tie.or.space.connect
+series empty$
+'skip$
+{ " of " * series emphasize * }
+if$
+"volume and number" number either.or.check
+}
+if$
+}
+FUNCTION {format.number.series}
+{ volume empty$
+{ number empty$
+{ series field.or.null }
+{ output.state mid.sentence =
+{ "number" }
+{ "Number" }
+if$
+number tie.or.space.connect
+series empty$
+{ "there's a number but no series in " cite$ * warning$ }
+{ " in " * series * }
+if$
+}
+if$
+}
+{ "" }
+if$
+}
+FUNCTION {format.edition}
+{ edition empty$
+{ "" }
+{ output.state mid.sentence =
+{ edition "l" change.case$ " edition" * }
+{ edition "t" change.case$ " edition" * }
+if$
+}
+if$
+}
+INTEGERS { multiresult }
+FUNCTION {multi.page.check}
+{ 't :=
+#0 'multiresult :=
+{ multiresult not
+t empty$ not
+and
+}
+{ t #1 #1 substring$
+duplicate$ "-" =
+swap$ duplicate$ "," =
+swap$ "+" =
+or or
+{ #1 'multiresult := }
+{ t #2 global.max$ substring$ 't := }
+if$
+}
+while$
+multiresult
+}
+FUNCTION {format.pages}
+{ pages empty$
+{ "" }
+{ pages multi.page.check
+{ "pages" pages n.dashify tie.or.space.connect }
+{ "page" pages tie.or.space.connect }
+if$
+}
+if$
+}
+FUNCTION {format.vol.num.pages}
+{ volume field.or.null
+number empty$
+'skip$
+{ "(" number * ")" * *
+volume empty$
+{ "there's a number but no volume in " cite$ * warning$ }
+'skip$
+if$
+}
+if$
+pages empty$
+'skip$
+{ duplicate$ empty$
+{ pop$ format.pages }
+{ ":" * pages n.dashify * }
+if$
+}
+if$
+}
+FUNCTION {format.chapter.pages}
+{ chapter empty$
+'format.pages
+{ type empty$
+{ "chapter" }
+{ type "l" change.case$ }
+if$
+chapter tie.or.space.connect
+pages empty$
+'skip$
+{ ", " * format.pages * }
+if$
+}
+if$
+}
+FUNCTION {format.in.ed.booktitle}
+{ booktitle empty$
+{ "" }
+{ editor empty$
+{ "In " booktitle emphasize * }
+{ "In " format.editors * ", " * booktitle emphasize * }
+if$
+}
+if$
+}
+FUNCTION {empty.misc.check}
+{ author empty$ title empty$ howpublished empty$
+month empty$ year empty$ note empty$
+and and and and and
+key empty$ not and
+{ "all relevant fields are empty in " cite$ * warning$ }
+'skip$
+if$
+}
+FUNCTION {format.thesis.type}
+{ type empty$
+'skip$
+{ pop$
+type "t" change.case$
+}
+if$
+}
+FUNCTION {format.tr.number}
+{ type empty$
+{ "Technical Report" }
+'type
+if$
+number empty$
+{ "t" change.case$ }
+{ number tie.or.space.connect }
+if$
+}
+FUNCTION {format.article.crossref}
+{ key empty$
+{ journal empty$
+{ "need key or journal for " cite$ * " to crossref " * crossref *
+warning$
+""
+}
+{ "In <em>" journal * "</em>" * }
+if$
+}
+{ "In " key * }
+if$
+" <span class='cite'>" * crossref * "</span>" *
+}
+FUNCTION {format.crossref.editor}
+{ editor #1 "{vv~}{ll}" format.name$
+editor num.names$ duplicate$
+#2 >
+{ pop$ " et~al." * }
+{ #2 <
+'skip$
+{ editor #2 "{ff }{vv }{ll}{ jj}" format.name$ "others" =
+{ " et~al." * }
+{ " and " * editor #2 "{vv~}{ll}" format.name$ * }
+if$
+}
+if$
+}
+if$
+}
+FUNCTION {format.book.crossref}
+{ volume empty$
+{ "empty volume in " cite$ * "'s crossref of " * crossref * warning$
+"In "
+}
+{ "Volume" volume tie.or.space.connect
+" of " *
+}
+if$
+editor empty$
+editor field.or.null author field.or.null =
+or
+{ key empty$
+{ series empty$
+{ "need editor, key, or series for " cite$ * " to crossref " *
+crossref * warning$
+"" *
+}
+{ "<em>" * series * "</em>" * }
+if$
+}
+{ key * }
+if$
+}
+{ format.crossref.editor * }
+if$
+" <span class='cite'>" * crossref * "</span>" *
+}
+FUNCTION {format.incoll.inproc.crossref}
+{ editor empty$
+editor field.or.null author field.or.null =
+or
+{ key empty$
+{ booktitle empty$
+{ "need editor, key, or booktitle for " cite$ * " to crossref " *
+crossref * warning$
+""
+}
+{ "In <em>" booktitle * "</em>" * }
+if$
+}
+{ "In " key * }
+if$
+}
+{ "In " format.crossref.editor * }
+if$
+" <span class='cite'>" * crossref * "</span>" *
+}
+FUNCTION {make.href}
+{
+"<a href='" swap$ * "'><code>" * swap$ * "</code></a>" *
+}
+FUNCTION {format.url}
+{ inlinelinks #1 = url empty$ or
+{ "" }
+{ urlintro "<code>" * url * "</code>" * }
+if$
+}
+FUNCTION {format.eprint}
+{ eprint empty$
+{ "" }
+{ eprintprefix eprint * eprinturl eprint * make.href }
+if$
+}
+FUNCTION {format.doi}
+{ doi empty$
+{ "" }
+{ doiform #0 =
+{ doiprefix doi * doiurl doi * make.href }
+{ "DOI:{" doi * "}" * }
+if$
+}
+if$
+}
+FUNCTION {format.pubmed}
+{ pubmed empty$
+{ "" }
+{ pubmedprefix pubmed * pubmedurl pubmed * make.href }
+if$
+}
+FUNCTION {output.url}
+{ url empty$
+'skip$
+{ new.block
+format.url output
+format.lastchecked output
+}
+if$
+}
+FUNCTION {output.web.refs}
+{
+new.block
+output.url
+addeprints eprint empty$ not and
+{ format.eprint output.nonnull }
+'skip$
+if$
+adddoiresolver doi empty$ not and
+{ format.doi output.nonnull }
+'skip$
+if$
+addpubmedresolver pubmed empty$ not and
+{ format.pubmed output.nonnull }
+'skip$
+if$
+}
+FUNCTION {output.bibitem}
+{ outside.brackets 'bracket.state :=
+output.bibitem.original
+inlinelinks url empty$ not and
+{ #1 'makeinlinelink := }
+{ #0 'makeinlinelink := }
+if$
+}
+FUNCTION {fin.entry}
+{ output.web.refs % urlbst
+makeinlinelink % ooops, it appears we didn't have a title for inlinelink
+{ possibly.setup.inlinelink % add some artificial link text here, as a fallback
+"[link]" output.nonnull }
+'skip$
+if$
+bracket.state close.brackets = % urlbst
+{ "]" * }
+'skip$
+if$
+fin.entry.original
+}
+FUNCTION {webpage}
+{ output.bibitem
+author empty$
+{ editor empty$
+'skip$ % author and editor both optional
+{ format.editors output.nonnull }
+if$
+}
+{ editor empty$
+{ format.authors output.nonnull }
+{ "can't use both author and editor fields in " cite$ * warning$ }
+if$
+}
+if$
+new.block
+title empty$ 'skip$ 'possibly.setup.inlinelink if$
+format.title "title" output.check
+inbrackets "online" output
+new.block
+year empty$
+'skip$
+{ format.date "year" output.check }
+if$
+new.block
+note output
+fin.entry
+}
+FUNCTION {article}
+{ output.bibitem
+format.authors "author" output.check
+new.block
+title empty$ 'skip$ 'possibly.setup.inlinelink if$ % urlbst
+format.title "title" output.check
+new.block
+crossref missing$
+{ journal emphasize "journal" output.check
+possibly.setup.inlinelink format.vol.num.pages output% urlbst
+format.date "year" output.check
+}
+{ format.article.crossref output.nonnull
+format.pages output
+}
+if$
+new.block
+note output
+fin.entry
+}
+FUNCTION {book}
+{ output.bibitem
+author empty$
+{ format.editors "author and editor" output.check }
+{ format.authors output.nonnull
+crossref missing$
+{ "author and editor" editor either.or.check }
+'skip$
+if$
+}
+if$
+new.block
+title empty$ 'skip$ 'possibly.setup.inlinelink if$ % urlbst
+format.btitle "title" output.check
+crossref missing$
+{ format.bvolume output
+new.block
+format.number.series output
+new.sentence
+publisher "publisher" output.check
+address output
+}
+{ new.block
+format.book.crossref output.nonnull
+}
+if$
+format.edition output
+format.date "year" output.check
+new.block
+note output
+fin.entry
+}
+FUNCTION {booklet}
+{ output.bibitem
+format.authors output
+new.block
+title empty$ 'skip$ 'possibly.setup.inlinelink if$ % urlbst
+format.title "title" output.check
+howpublished address new.block.checkb
+howpublished output
+address output
+format.date output
+new.block
+note output
+fin.entry
+}
+FUNCTION {inbook}
+{ output.bibitem
+author empty$
+{ format.editors "author and editor" output.check }
+{ format.authors output.nonnull
+crossref missing$
+{ "author and editor" editor either.or.check }
+'skip$
+if$
+}
+if$
+new.block
+title empty$ 'skip$ 'possibly.setup.inlinelink if$ % urlbst
+format.btitle "title" output.check
+crossref missing$
+{ format.bvolume output
+format.chapter.pages "chapter and pages" output.check
+new.block
+format.number.series output
+new.sentence
+publisher "publisher" output.check
+address output
+}
+{ format.chapter.pages "chapter and pages" output.check
+new.block
+format.book.crossref output.nonnull
+}
+if$
+format.edition output
+format.date "year" output.check
+new.block
+note output
+fin.entry
+}
+FUNCTION {incollection}
+{ output.bibitem
+format.authors "author" output.check
+new.block
+title empty$ 'skip$ 'possibly.setup.inlinelink if$ % urlbst
+format.title "title" output.check
+new.block
+crossref missing$
+{ format.in.ed.booktitle "booktitle" output.check
+format.bvolume output
+format.number.series output
+format.chapter.pages output
+new.sentence
+publisher "publisher" output.check
+address output
+format.edition output
+format.date "year" output.check
+}
+{ format.incoll.inproc.crossref output.nonnull
+format.chapter.pages output
+}
+if$
+new.block
+note output
+fin.entry
+}
+FUNCTION {inproceedings}
+{ output.bibitem
+format.authors "author" output.check
+new.block
+title empty$ 'skip$ 'possibly.setup.inlinelink if$ % urlbst
+format.title "title" output.check
+new.block
+crossref missing$
+{ format.in.ed.booktitle "booktitle" output.check
+format.bvolume output
+format.number.series output
+format.pages output
+address empty$
+{ organization publisher new.sentence.checkb
+organization output
+publisher output
+format.date "year" output.check
+}
+{ address output.nonnull
+format.date "year" output.check
+new.sentence
+organization output
+publisher output
+}
+if$
+}
+{ format.incoll.inproc.crossref output.nonnull
+format.pages output
+}
+if$
+new.block
+note output
+fin.entry
+}
+FUNCTION {conference} { inproceedings }
+FUNCTION {manual}
+{ output.bibitem
+author empty$
+{ organization empty$
+'skip$
+{ organization output.nonnull
+address output
+}
+if$
+}
+{ format.authors output.nonnull }
+if$
+new.block
+title empty$ 'skip$ 'possibly.setup.inlinelink if$ % urlbst
+format.btitle "title" output.check
+author empty$
+{ organization empty$
+{ address new.block.checka
+address output
+}
+'skip$
+if$
+}
+{ organization address new.block.checkb
+organization output
+address output
+}
+if$
+format.edition output
+format.date output
+new.block
+note output
+fin.entry
+}
+FUNCTION {mastersthesis}
+{ output.bibitem
+format.authors "author" output.check
+new.block
+title empty$ 'skip$ 'possibly.setup.inlinelink if$ % urlbst
+format.title "title" output.check
+new.block
+"Master's thesis" format.thesis.type output.nonnull
+school "school" output.check
+address output
+format.date "year" output.check
+new.block
+note output
+fin.entry
+}
+FUNCTION {misc}
+{ output.bibitem
+format.authors output
+title howpublished new.block.checkb
+title empty$ 'skip$ 'possibly.setup.inlinelink if$ % urlbst
+format.title output
+howpublished new.block.checka
+howpublished output
+format.date output
+new.block
+note output
+fin.entry
+empty.misc.check
+}
+FUNCTION {phdthesis}
+{ output.bibitem
+format.authors "author" output.check
+new.block
+title empty$ 'skip$ 'possibly.setup.inlinelink if$ % urlbst
+format.btitle "title" output.check
+new.block
+"PhD thesis" format.thesis.type output.nonnull
+school "school" output.check
+address output
+format.date "year" output.check
+new.block
+note output
+fin.entry
+}
+FUNCTION {proceedings}
+{ output.bibitem
+editor empty$
+{ organization output }
+{ format.editors output.nonnull }
+if$
+new.block
+title empty$ 'skip$ 'possibly.setup.inlinelink if$ % urlbst
+format.btitle "title" output.check
+format.bvolume output
+format.number.series output
+address empty$
+{ editor empty$
+{ publisher new.sentence.checka }
+{ organization publisher new.sentence.checkb
+organization output
+}
+if$
+publisher output
+format.date "year" output.check
+}
+{ address output.nonnull
+format.date "year" output.check
+new.sentence
+editor empty$
+'skip$
+{ organization output }
+if$
+publisher output
+}
+if$
+new.block
+note output
+fin.entry
+}
+FUNCTION {techreport}
+{ output.bibitem
+format.authors "author" output.check
+new.block
+title empty$ 'skip$ 'possibly.setup.inlinelink if$ % urlbst
+format.title "title" output.check
+new.block
+format.tr.number output.nonnull
+institution "institution" output.check
+address output
+format.date "year" output.check
+new.block
+note output
+fin.entry
+}
+FUNCTION {unpublished}
+{ output.bibitem
+format.authors "author" output.check
+new.block
+title empty$ 'skip$ 'possibly.setup.inlinelink if$ % urlbst
+format.title "title" output.check
+new.block
+note "note" output.check
+format.date output
+fin.entry
+}
+FUNCTION {default.type} { misc }
+MACRO {jan} {"January"}
+MACRO {feb} {"February"}
+MACRO {mar} {"March"}
+MACRO {apr} {"April"}
+MACRO {may} {"May"}
+MACRO {jun} {"June"}
+MACRO {jul} {"July"}
+MACRO {aug} {"August"}
+MACRO {sep} {"September"}
+MACRO {oct} {"October"}
+MACRO {nov} {"November"}
+MACRO {dec} {"December"}
+MACRO {acmcs} {"ACM Computing Surveys"}
+MACRO {acta} {"Acta Informatica"}
+MACRO {cacm} {"Communications of the ACM"}
+MACRO {ibmjrd} {"IBM Journal of Research and Development"}
+MACRO {ibmsj} {"IBM Systems Journal"}
+MACRO {ieeese} {"IEEE Transactions on Software Engineering"}
+MACRO {ieeetc} {"IEEE Transactions on Computers"}
+MACRO {ieeetcad}
+{"IEEE Transactions on Computer-Aided Design of Integrated Circuits"}
+MACRO {ipl} {"Information Processing Letters"}
+MACRO {jacm} {"Journal of the ACM"}
+MACRO {jcss} {"Journal of Computer and System Sciences"}
+MACRO {scp} {"Science of Computer Programming"}
+MACRO {sicomp} {"SIAM Journal on Computing"}
+MACRO {tocs} {"ACM Transactions on Computer Systems"}
+MACRO {tods} {"ACM Transactions on Database Systems"}
+MACRO {tog} {"ACM Transactions on Graphics"}
+MACRO {toms} {"ACM Transactions on Mathematical Software"}
+MACRO {toois} {"ACM Transactions on Office Information Systems"}
+MACRO {toplas} {"ACM Transactions on Programming Languages and Systems"}
+MACRO {tcs} {"Theoretical Computer Science"}
+READ
+FUNCTION {sortify}
+{ purify$
+"l" change.case$
+}
+INTEGERS { len }
+FUNCTION {chop.word}
+{ 's :=
+'len :=
+s #1 len substring$ =
+{ s len #1 + global.max$ substring$ }
+'s
+if$
+}
+FUNCTION {sort.format.names}
+{ 's :=
+#1 'nameptr :=
+""
+s num.names$ 'numnames :=
+numnames 'namesleft :=
+{ namesleft #0 > }
+{ nameptr #1 >
+{ " " * }
+'skip$
+if$
+s nameptr "{vv{ } }{ll{ }}{ ff{ }}{ jj{ }}" format.name$ 't :=
+nameptr numnames = t "others" = and
+{ "et al" * }
+{ t sortify * }
+if$
+nameptr #1 + 'nameptr :=
+namesleft #1 - 'namesleft :=
+}
+while$
+}
+FUNCTION {sort.format.title}
+{ 't :=
+"A " #2
+"An " #3
+"The " #4 t chop.word
+chop.word
+chop.word
+sortify
+#1 global.max$ substring$
+}
+FUNCTION {author.sort}
+{ author empty$
+{ key empty$
+{ "to sort, need author or key in " cite$ * warning$
+""
+}
+{ key sortify }
+if$
+}
+{ author sort.format.names }
+if$
+}
+FUNCTION {author.editor.sort}
+{ author empty$
+{ editor empty$
+{ key empty$
+{ "to sort, need author, editor, or key in " cite$ * warning$
+""
+}
+{ key sortify }
+if$
+}
+{ editor sort.format.names }
+if$
+}
+{ author sort.format.names }
+if$
+}
+FUNCTION {author.organization.sort}
+{ author empty$
+{ organization empty$
+{ key empty$
+{ "to sort, need author, organization, or key in " cite$ * warning$
+""
+}
+{ key sortify }
+if$
+}
+{ "The " #4 organization chop.word sortify }
+if$
+}
+{ author sort.format.names }
+if$
+}
+FUNCTION {editor.organization.sort}
+{ editor empty$
+{ organization empty$
+{ key empty$
+{ "to sort, need editor, organization, or key in " cite$ * warning$
+""
+}
+{ key sortify }
+if$
+}
+{ "The " #4 organization chop.word sortify }
+if$
+}
+{ editor sort.format.names }
+if$
+}
+FUNCTION {presort.by.author}
+{ type$ "book" =
+type$ "inbook" =
+or
+'author.editor.sort
+{ type$ "proceedings" =
+'editor.organization.sort
+{ type$ "manual" =
+'author.organization.sort
+'author.sort
+if$
+}
+if$
+}
+if$
+" "
+*
+year field.or.null sortify
+*
+" "
+*
+title field.or.null
+sort.format.title
+*
+#1 entry.max$ substring$
+'sort.key$ :=
+}
+FUNCTION {presort.by.year}
+{ year field.or.null sortify
+" "
+*
+type$ "book" =
+type$ "inbook" =
+or
+'author.editor.sort
+{ type$ "proceedings" =
+'editor.organization.sort
+{ type$ "manual" =
+'author.organization.sort
+'author.sort
+if$
+}
+if$
+}
+if$
+*
+" "
+*
+title field.or.null
+sort.format.title
+*
+#1 entry.max$ substring$
+'sort.key$ :=
+}
+ITERATE {presort.by.year}
+SORT
+STRINGS { longest.label }
+INTEGERS { number.label longest.label.width }
+FUNCTION {initialize.longest.label}
+{ "" 'longest.label :=
+#1 'number.label :=
+#0 'longest.label.width :=
+}
+FUNCTION {longest.label.pass}
+{ number.label int.to.str$ 'label :=
+number.label #1 + 'number.label :=
+label width$ longest.label.width >
+{ label 'longest.label :=
+label width$ 'longest.label.width :=
+}
+'skip$
+if$
+}
+EXECUTE {initialize.longest.label}
+ITERATE {longest.label.pass}
+FUNCTION {begin.bib}
+{ preamble$ empty$
+'skip$
+{ preamble$ write$ newline$ }
+if$
+"<dl>" write$ newline$
+}
+EXECUTE {begin.bib}
+EXECUTE {init.urlbst.variables}
+EXECUTE {init.state.consts}
+REVERSE {call.type$}
+FUNCTION {end.bib}
+{ newline$
+"</dl>" write$ newline$
+}
+EXECUTE {end.bib}
diff --git a/biblio/bibtex/contrib/bibhtml/style.css b/biblio/bibtex/contrib/bibhtml/style.css
new file mode 100644
index 0000000000..946d11a6a5
--- /dev/null
+++ b/biblio/bibtex/contrib/bibhtml/style.css
@@ -0,0 +1,260 @@
+body {
+ color: #333;
+ background: white;
+ margin-left: +30%;
+ width: 50%; /* body is 50% of screen width */
+ padding: 0.5em; /* this will make a difference if I decide to
+ have the background a different colour */
+ /* I can't decide on font: Optima's always nice, but Gill looks
+ agreeably intense. Helvetica's a decent fallback. */
+ font-family: "Helvetica Neue", Helvetica, "Gill Sans", gill, sans-serif;
+ /* font-family: Optima, "Gill Sans", gill, Helvetica, sans-serif; */
+ /* font-family: "Gill Sans", gill, Helvetica, sans-serif; */
+ /* I seem to have used 11pt at some point in the past, but this
+ is far too big -- did I ever have a reason for that, or is it
+ just due to browser changes? */
+ font-size: 10pt;
+ line-height: 150%;
+}
+
+/* adapt to wider screens */
+@media screen and (min-width: 700pt) {
+ body {
+ margin-left: 210pt;
+ width: 350pt;
+ }
+}
+
+/* The following appears not to work in Safari or Chrome
+ -- don't know why, yet.
+@media print {
+ @page :right {
+ size: auto;
+ body {
+ margin-top: 2cm;
+ margin-bottom: 3cm;
+ margin-left: 10%;
+ width: 60%;
+ margin-right: 30%;
+ color: #d33;
+ }
+ }
+ @page :left {
+ size: auto;
+ body {
+ margin-top: 2cm;
+ margin-bottom: 3cm;
+ margin-left: 30%;
+ width: 60%;
+ margin-right: 10%;
+ color: #33d;
+ }
+ }
+}
+*/
+
+div.topsidebar {
+ float: right;
+ width: 50%; /* ...of the body width (ie, 50% x 50% of screen) */
+ font-size: smaller;
+ margin-left: 1em;
+ padding-left: 1em;
+ border-left: solid thin #AAA;
+}
+
+/* On wider screens, move the sidebar out to the right hand side */
+/* This uses CSS3 media queries: http://www.w3.org/TR/css3-mediaqueries/ */
+@media screen and (min-width: 700pt) and (max-width: 850pt) {
+ body {
+ margin-left: 210pt;
+ width: 350pt; /* 50% of 700pt */
+ margin-right: auto;
+ }
+ div.topsidebar {
+ position: absolute;
+ /* I feel this size should be 595pt (350 + 210 + 0.05*700),
+ but that's clearly not right -- I don't think I understand what the -5%
+ in the h1 spec below is actually 5% of! */
+ left: 570pt;
+ width: auto;
+ margin-left: 0pt;
+ padding-left: 0pt;
+ border: none;
+ }
+}
+/* On still-wider screens, expand the left-margin, keeping the sidebar attached to the right-hand edge.
+ When the screen is 850pt wide (expanding from the @media case above),
+ the left margin will be 210pt, the width 350pt, and the right margin therefore 290pt.*/
+@media screen and (min-width: 850pt) {
+ body {
+ margin-right: 290pt; /* 290 = 850-(210+350) */
+ width: 350pt;
+ margin-left: auto; /* ...takes up the slack */
+ }
+ div.topsidebar {
+ position: absolute;
+ width: 290pt; /* same 290pt as above */
+ left: auto;
+ right: 0%;
+ padding-left: 0pt;
+ border: none;
+ }
+}
+
+
+code, pre {
+ font-family: Monaco, fixed;
+ font-size: 9pt;
+}
+
+a { text-decoration: none; }
+a:link { color: #66C; }
+a:visited { color: #669; }
+a[href]:hover { background: #EEE; }
+
+div.abstract {
+ font-style: oblique;
+ text-align: left;
+}
+div.abstract em { font-style: normal; }
+div.abstract code {
+ font-style: normal;
+ font-size: 80%;
+}
+
+h1, h2, h3, h4, h5, h6 {
+ color: #822;
+ font-weight: 100; /* few fonts have ultra-light weights */
+ line-height: 100%; /* no need to spread out titles */
+}
+h1 {
+ margin-left: -40%;
+ margin-right: -5%;
+ padding: 0.5em;
+ border: solid thin #666;
+ text-align: right;
+}
+h2 {
+ margin-left: -40%;
+ margin-right: -5%;
+ padding: 0.2em;
+ border-top: solid thin #666;
+ clear: both;
+}
+
+h2.appendices {
+ margin-top: 10ex;
+ border-top: double medium #666;
+}
+h3 {
+ margin-left: -30%;
+ float: left;
+ width: 25%;
+ display: block;
+ text-align: right;
+ vertical-align: bottom;
+ padding-top: 0pt;
+ padding-right: 0.5em;
+ margin-top: 0pt;
+ line-height: 120%;
+}
+
+/*
+h4 {
+ color: #C66;
+}
+*/
+
+pre, table { background: #dde; }
+
+pre {
+ padding: 1em;
+ line-height: 130%;
+}
+
+table {
+ font-size: smaller;
+}
+td {
+ padding: 0.5ex;
+}
+
+Q:before { content: "“"; }
+Q:after { content: "”"; }
+
+img.smallimage {
+ float: right;
+ margin: 24pt;
+ margin-right: -30%;
+}
+
+div.signature {
+ margin-left: -40%;
+ margin-right: -5%;
+ margin-top: 4ex;
+ text-align: right;
+ border: solid thin #666;
+ padding: 0.3em;
+ clear: both;
+}
+
+/* ============================================================
+ * Some other curiosities of my one-time formatting for web pages
+ */
+.doc-history {
+ font-size: xx-small;
+ background: #eee;
+ line-height: 100%;
+}
+
+div.subtoc, div.subsubtoc { display: none; }
+
+/* ============================================================
+ * Special formatting for ToC
+ */
+
+/*
+ If there's significant amount of text in front of the first subsection,
+ then the following are good to put in the per-document stylesheet:
+ width: 25%;
+ float: right;
+*/
+div#toc {
+ color: #888;
+ padding: 0;
+ font-size: smaller;
+ text-align: right;
+}
+div#toc a:link { color: #888; }
+div#toc > ul {
+ padding: 0pt;
+ margin: 0pt;
+ list-style: none;
+}
+div#toc li {
+ padding: 0pt;
+ display: inline-block;
+}
+div#toc li:before {
+ content: "§ ";
+ margin-left: 1em;
+}
+/* the following elements aren't currently generated by structure.lx */
+div#toc li ul {
+ padding-left: 1em;
+ margin-left: 0;
+ font-style: italic;
+ display: inline;
+}
+div#toc li ul:before {
+ content: "( ";
+}
+div#toc li ul:after {
+ content: " ) ";
+}
+div#toc li li {
+ padding-left: 0pt;
+}
+div#toc li li:after {
+ content: "; ";
+}
diff --git a/biblio/bibtex/contrib/bibhtml/unsrthtml.bst b/biblio/bibtex/contrib/bibhtml/unsrthtml.bst
new file mode 100644
index 0000000000..a1c7a210a3
--- /dev/null
+++ b/biblio/bibtex/contrib/bibhtml/unsrthtml.bst
@@ -0,0 +1,1256 @@
+%% unsrthtml.bst
+%%
+%% Part of bibhtml, version 2.0.2, released 2013 September 8
+%% Hg node 7076ce83a035.
+%% See <http://purl.org/nxg/dist/bibhtml>
+%%
+%% Copyright 1999, 2005, 2006, 2009, Norman Gray <norman@astro.gla.ac.uk>
+%%
+%% This is a modification of a modification!
+%%
+%%% Modification of BibTeX style file /usr/local/texlive/2008/texmf-dist/bibtex/bst/base/unsrt.bst
+%%% ... by urlbst, version 0.6-4 (marked with "% urlbst")
+%%% See <http://purl.org/nxg/dist/urlbst>
+%%% Added webpage entry type, and url and lastchecked fields.
+%%% Added eprint support.
+%%% Added DOI support.
+%%% Added PUBMED support.
+%%% Added hyperref support.
+%%% Original headers follow...
+
+% BibTeX standard bibliography style `unsrt'
+ % version 0.99a for BibTeX versions 0.99a or later, LaTeX version 2.09.
+ % Copyright (C) 1985, all rights reserved.
+ % Copying of this file is authorized only if either
+ % (1) you make absolutely no changes to your copy, including name, or
+ % (2) if you do make changes, you name it something other than
+ % btxbst.doc, plain.bst, unsrt.bst, alpha.bst, and abbrv.bst.
+ % This restriction helps ensure that all standard styles are identical.
+ % The file btxbst.doc has the documentation for this style.
+
+ENTRY
+ { address
+ author
+ booktitle
+ chapter
+ edition
+ editor
+ howpublished
+ institution
+ journal
+ key
+ month
+ note
+ number
+ organization
+ pages
+ publisher
+ school
+ series
+ title
+ type
+ volume
+ year
+ eprint % urlbst
+ doi % urlbst
+ pubmed % urlbst
+ url % urlbst
+ lastchecked % urlbst
+ }
+ {}
+ { label }
+
+INTEGERS { output.state before.all mid.sentence after.sentence after.block doiform }
+
+STRINGS { urlintro eprinturl eprintprefix doiprefix doiurl pubmedprefix pubmedurl openinlinelink closeinlinelink } % urlbst...
+INTEGERS { inlinelinks makeinlinelink addeprints adddoiresolver addpubmedresolver }
+% Following constants may be adjusted by hand, if desired
+FUNCTION {init.urlbst.variables}
+{
+ "Available from: " 'urlintro := % prefix before URL
+ "http://arxiv.org/abs/" 'eprinturl := % prefix to make URL from eprint ref
+ "arXiv:" 'eprintprefix := % text prefix printed before eprint ref
+ "http://dx.doi.org/" 'doiurl := % prefix to make URL from DOI
+ "doi:" 'doiprefix := % text prefix printed before DOI ref
+ "http://www.ncbi.nlm.nih.gov/pubmed/" 'pubmedurl := % prefix to make URL from PUBMED
+ "PMID:" 'pubmedprefix := % text prefix printed before PUBMED ref
+ #1 'addeprints := % 0=no eprints; 1=include eprints
+ #1 'adddoiresolver := % 0=no DOI resolver; 1=include it
+ #1 'addpubmedresolver := % 0=no PUBMED resolver; 1=include it
+ #1 'inlinelinks := % 0=URLs explicit; 1=URLs attached to titles
+ #1 'doiform := % 0=simple, but can produce invalid HTML; 1=needs post-processing
+ % the following are internal state variables, not config constants
+ #0 'makeinlinelink := % state variable managed by possibly.setup.inlinelink
+ "" 'openinlinelink := % ditto
+ "" 'closeinlinelink := % ditto
+}
+INTEGERS {
+ bracket.state
+ outside.brackets
+ open.brackets
+ within.brackets
+ close.brackets
+ close.first.block
+}
+% ...urlbst to here
+FUNCTION {init.state.consts}
+{ #0 'outside.brackets := % urlbst
+ #1 'open.brackets :=
+ #2 'within.brackets :=
+ #3 'close.brackets :=
+
+ #0 'before.all :=
+ #1 'mid.sentence :=
+ #2 'after.sentence :=
+ #3 'after.block :=
+ #0 'close.first.block :=
+}
+
+STRINGS { s t }
+
+% urlbst
+FUNCTION {output.nonnull.original}
+{ 's :=
+ output.state mid.sentence =
+ { ", " * write$ }
+ { output.state after.block =
+ { add.period$ write$
+ % close the <dt> after the end of the first block
+ close.first.block
+ { "</a></dt>" write$ newline$ "<dd>" write$
+ #0 'close.first.block := }
+ { newline$ }
+ if$
+ }
+ { output.state before.all =
+ 'write$
+ { add.period$ " " * write$ }
+ if$
+ }
+ if$
+ mid.sentence 'output.state :=
+ }
+ if$
+ s
+}
+
+% urlbst...
+% The following three functions are for handling inlinelink. They wrap
+% a block of text which is potentially output with write$ by multiple
+% other functions, so we don't know the content a priori.
+% They communicate between each other using the variables makeinlinelink
+% (which is true if a link should be made), and closeinlinelink (which holds
+% the string which should close any current link. They can be called
+% at any time, but start.inlinelink will be a no-op unless something has
+% previously set makeinlinelink true, and the two ...end.inlinelink functions
+% will only do their stuff if start.inlinelink has previously set
+% closeinlinelink to be non-empty.
+FUNCTION {possibly.setup.inlinelink}
+{ makeinlinelink
+ { "<a href=" quote$ * url * quote$ * ">" * 'openinlinelink :=
+ "</a>" 'closeinlinelink :=
+ #0 'makeinlinelink := }
+ 'skip$
+ if$ % makeinlinelink
+}
+FUNCTION {add.inlinelink}
+{ openinlinelink empty$
+ 'skip$
+ { openinlinelink swap$ * closeinlinelink *
+ "" 'openinlinelink :=
+ }
+ if$
+}
+FUNCTION {output.nonnull}
+{ % Save the thing we've been asked to output
+ 's :=
+ % If the bracket-state is close.brackets, then add a close-bracket to
+ % what is currently at the top of the stack, and set bracket.state
+ % to outside.brackets
+ bracket.state close.brackets =
+ { "]" *
+ outside.brackets 'bracket.state :=
+ }
+ 'skip$
+ if$
+ bracket.state outside.brackets =
+ { % We're outside all brackets -- this is the normal situation.
+ % Write out what's currently at the top of the stack, using the
+ % original output.nonnull function.
+ s
+ add.inlinelink
+ output.nonnull.original % invoke the original output.nonnull
+ }
+ { % Still in brackets. Add open-bracket or (continuation) comma, add the
+ % new text (in s) to the top of the stack, and move to the close-brackets
+ % state, ready for next time (unless inbrackets resets it). If we come
+ % into this branch, then output.state is carefully undisturbed.
+ bracket.state open.brackets =
+ { " [" * }
+ { ", " * } % bracket.state will be within.brackets
+ if$
+ s *
+ close.brackets 'bracket.state :=
+ }
+ if$
+}
+
+% Call this function just before adding something which should be presented in
+% brackets. bracket.state is handled specially within output.nonnull.
+FUNCTION {inbrackets}
+{ bracket.state close.brackets =
+ { within.brackets 'bracket.state := } % reset the state: not open nor closed
+ { open.brackets 'bracket.state := }
+ if$
+}
+
+FUNCTION {format.lastchecked}
+{ lastchecked empty$
+ { "" }
+ { inbrackets "cited " lastchecked * }
+ if$
+}
+% ...urlbst to here
+
+FUNCTION {output}
+{ duplicate$ empty$
+ 'pop$
+ 'output.nonnull
+ if$
+}
+
+FUNCTION {output.check}
+{ 't :=
+ duplicate$ empty$
+ { pop$ "empty " t * " in " * cite$ * warning$ }
+ 'output.nonnull
+ if$
+}
+
+FUNCTION {output.bibitem.original}
+{ newline$
+ "<dt><a name='" write$
+ cite$ write$
+ "'>[" cite$ * "] " * write$
+ % the <dt> is closed within output.nonnull, as long as close.first.block is true
+ #1 'close.first.block :=
+ newline$
+ ""
+ before.all 'output.state :=
+}
+
+FUNCTION {fin.entry.original}
+{ add.period$ "</dd>" *
+ write$
+ newline$
+}
+
+FUNCTION {new.block}
+{ output.state before.all =
+ 'skip$
+ { after.block 'output.state := }
+ if$
+}
+
+FUNCTION {new.sentence}
+{ output.state after.block =
+ 'skip$
+ { output.state before.all =
+ 'skip$
+ { after.sentence 'output.state := }
+ if$
+ }
+ if$
+}
+
+FUNCTION {not}
+{ { #0 }
+ { #1 }
+ if$
+}
+
+FUNCTION {and}
+{ 'skip$
+ { pop$ #0 }
+ if$
+}
+
+FUNCTION {or}
+{ { pop$ #1 }
+ 'skip$
+ if$
+}
+
+FUNCTION {new.block.checka}
+{ empty$
+ 'skip$
+ 'new.block
+ if$
+}
+
+FUNCTION {new.block.checkb}
+{ empty$
+ swap$ empty$
+ and
+ 'skip$
+ 'new.block
+ if$
+}
+
+FUNCTION {new.sentence.checka}
+{ empty$
+ 'skip$
+ 'new.sentence
+ if$
+}
+
+FUNCTION {new.sentence.checkb}
+{ empty$
+ swap$ empty$
+ and
+ 'skip$
+ 'new.sentence
+ if$
+}
+
+FUNCTION {field.or.null}
+{ duplicate$ empty$
+ { pop$ "" }
+ 'skip$
+ if$
+}
+
+FUNCTION {emphasize}
+{ duplicate$ empty$
+ { pop$ "" }
+ { "<em>" swap$ * "</em>" * }
+ if$
+}
+
+INTEGERS { nameptr namesleft numnames }
+
+FUNCTION {format.names}
+{ 's :=
+ #1 'nameptr :=
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ { s nameptr "{ff~}{vv~}{ll}{, jj}" format.name$ 't :=
+ nameptr #1 >
+ { namesleft #1 >
+ { ", " * t * }
+ { numnames #2 >
+ { "," * }
+ 'skip$
+ if$
+ t "others" =
+ { " et~al." * }
+ { " and " * t * }
+ if$
+ }
+ if$
+ }
+ 't
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+}
+
+FUNCTION {format.authors}
+{ author empty$
+ { "" }
+ { author format.names }
+ if$
+}
+
+FUNCTION {format.editors}
+{ editor empty$
+ { "" }
+ { editor format.names
+ editor num.names$ #1 >
+ { ", editors" * }
+ { ", editor" * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.title}
+{ title empty$
+ { "" }
+ { title "t" change.case$ }
+ if$
+}
+
+FUNCTION {n.dashify}
+{ 't :=
+ ""
+ { t empty$ not }
+ { t #1 #1 substring$ "-" =
+ { t #1 #2 substring$ "--" = not
+ { "--" *
+ t #2 global.max$ substring$ 't :=
+ }
+ { { t #1 #1 substring$ "-" = }
+ { "-" *
+ t #2 global.max$ substring$ 't :=
+ }
+ while$
+ }
+ if$
+ }
+ { t #1 #1 substring$ *
+ t #2 global.max$ substring$ 't :=
+ }
+ if$
+ }
+ while$
+}
+
+FUNCTION {format.date}
+{ year empty$
+ { month empty$
+ { "" }
+ { "there's a month but no year in " cite$ * warning$
+ month
+ }
+ if$
+ }
+ { month empty$
+ 'year
+ { month " " * year * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.btitle}
+{ title emphasize
+}
+
+FUNCTION {tie.or.space.connect}
+{ duplicate$ text.length$ #3 <
+ { "~" }
+ { " " }
+ if$
+ swap$ * *
+}
+
+FUNCTION {either.or.check}
+{ empty$
+ 'pop$
+ { "can't use both " swap$ * " fields in " * cite$ * warning$ }
+ if$
+}
+
+FUNCTION {format.bvolume}
+{ volume empty$
+ { "" }
+ { "volume" volume tie.or.space.connect
+ series empty$
+ 'skip$
+ { " of " * series emphasize * }
+ if$
+ "volume and number" number either.or.check
+ }
+ if$
+}
+
+FUNCTION {format.number.series}
+{ volume empty$
+ { number empty$
+ { series field.or.null }
+ { output.state mid.sentence =
+ { "number" }
+ { "Number" }
+ if$
+ number tie.or.space.connect
+ series empty$
+ { "there's a number but no series in " cite$ * warning$ }
+ { " in " * series * }
+ if$
+ }
+ if$
+ }
+ { "" }
+ if$
+}
+
+FUNCTION {format.edition}
+{ edition empty$
+ { "" }
+ { output.state mid.sentence =
+ { edition "l" change.case$ " edition" * }
+ { edition "t" change.case$ " edition" * }
+ if$
+ }
+ if$
+}
+
+INTEGERS { multiresult }
+
+FUNCTION {multi.page.check}
+{ 't :=
+ #0 'multiresult :=
+ { multiresult not
+ t empty$ not
+ and
+ }
+ { t #1 #1 substring$
+ duplicate$ "-" =
+ swap$ duplicate$ "," =
+ swap$ "+" =
+ or or
+ { #1 'multiresult := }
+ { t #2 global.max$ substring$ 't := }
+ if$
+ }
+ while$
+ multiresult
+}
+
+FUNCTION {format.pages}
+{ pages empty$
+ { "" }
+ { pages multi.page.check
+ { "pages" pages n.dashify tie.or.space.connect }
+ { "page" pages tie.or.space.connect }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.vol.num.pages}
+{ volume field.or.null
+ number empty$
+ 'skip$
+ { "(" number * ")" * *
+ volume empty$
+ { "there's a number but no volume in " cite$ * warning$ }
+ 'skip$
+ if$
+ }
+ if$
+ pages empty$
+ 'skip$
+ { duplicate$ empty$
+ { pop$ format.pages }
+ { ":" * pages n.dashify * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.chapter.pages}
+{ chapter empty$
+ 'format.pages
+ { type empty$
+ { "chapter" }
+ { type "l" change.case$ }
+ if$
+ chapter tie.or.space.connect
+ pages empty$
+ 'skip$
+ { ", " * format.pages * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.in.ed.booktitle}
+{ booktitle empty$
+ { "" }
+ { editor empty$
+ { "In " booktitle emphasize * }
+ { "In " format.editors * ", " * booktitle emphasize * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {empty.misc.check}
+{ author empty$ title empty$ howpublished empty$
+ month empty$ year empty$ note empty$
+ and and and and and
+ { "all relevant fields are empty in " cite$ * warning$ }
+ 'skip$
+ if$
+}
+
+FUNCTION {format.thesis.type}
+{ type empty$
+ 'skip$
+ { pop$
+ type "t" change.case$
+ }
+ if$
+}
+
+FUNCTION {format.tr.number}
+{ type empty$
+ { "Technical Report" }
+ 'type
+ if$
+ number empty$
+ { "t" change.case$ }
+ { number tie.or.space.connect }
+ if$
+}
+
+FUNCTION {format.article.crossref}
+{ key empty$
+ { journal empty$
+ { "need key or journal for " cite$ * " to crossref " * crossref *
+ warning$
+ ""
+ }
+ { "In <em>" journal * "</em>" * }
+ if$
+ }
+ { "In " key * }
+ if$
+ " <span class='cite'>" * crossref * "</span>" *
+}
+
+FUNCTION {format.crossref.editor}
+{ editor #1 "{vv~}{ll}" format.name$
+ editor num.names$ duplicate$
+ #2 >
+ { pop$ " et~al." * }
+ { #2 <
+ 'skip$
+ { editor #2 "{ff }{vv }{ll}{ jj}" format.name$ "others" =
+ { " et~al." * }
+ { " and " * editor #2 "{vv~}{ll}" format.name$ * }
+ if$
+ }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.book.crossref}
+{ volume empty$
+ { "empty volume in " cite$ * "'s crossref of " * crossref * warning$
+ "In "
+ }
+ { "Volume" volume tie.or.space.connect
+ " of " *
+ }
+ if$
+ editor empty$
+ editor field.or.null author field.or.null =
+ or
+ { key empty$
+ { series empty$
+ { "need editor, key, or series for " cite$ * " to crossref " *
+ crossref * warning$
+ "" *
+ }
+ { "<em>" * series * "</em>" * }
+ if$
+ }
+ { key * }
+ if$
+ }
+ { format.crossref.editor * }
+ if$
+ " <span class='cite'>" * crossref * "</span>" *
+}
+
+FUNCTION {format.incoll.inproc.crossref}
+{ editor empty$
+ editor field.or.null author field.or.null =
+ or
+ { key empty$
+ { booktitle empty$
+ { "need editor, key, or booktitle for " cite$ * " to crossref " *
+ crossref * warning$
+ ""
+ }
+ { "In <em>" booktitle * "</em>" * }
+ if$
+ }
+ { "In " key * }
+ if$
+ }
+ { "In " format.crossref.editor * }
+ if$
+ " <span class='cite'>" * crossref * "</span>" *
+}
+
+% urlbst...
+% Functions for making hypertext links.
+FUNCTION {make.href}
+{
+ "<a href='" swap$ * "'><code>" * swap$ * "</code></a>" *
+}
+
+% If inlinelinks is true, then format.url should be a no-op, since it's
+% (a) redundant, and (b) could end up as a link-within-a-link.
+FUNCTION {format.url}
+{ inlinelinks #1 = url empty$ or
+ { "" }
+ { urlintro "<code>" * url * "</code>" * }
+ if$
+}
+
+FUNCTION {format.eprint}
+{ eprint empty$
+ { "" }
+ { eprintprefix eprint * eprinturl eprint * make.href }
+ if$
+}
+
+FUNCTION {format.doi}
+{ doi empty$
+ { "" }
+ { doiform #0 =
+ { doiprefix doi * doiurl doi * make.href }
+ { "DOI:{" doi * "}" * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.pubmed}
+{ pubmed empty$
+ { "" }
+ { pubmedprefix pubmed * pubmedurl pubmed * make.href }
+ if$
+}
+
+% Output a URL. We can't use the more normal idiom (something like
+% `format.url output'), because the `inbrackets' within
+% format.lastchecked applies to everything between calls to `output',
+% so that `format.url format.lastchecked * output' ends up with both
+% the URL and the lastchecked in brackets.
+FUNCTION {output.url}
+{ url empty$
+ 'skip$
+ { new.block
+ format.url output
+ format.lastchecked output
+ }
+ if$
+}
+
+FUNCTION {output.web.refs}
+{
+ new.block
+ output.url
+ addeprints eprint empty$ not and
+ { format.eprint output.nonnull }
+ 'skip$
+ if$
+ adddoiresolver doi empty$ not and
+ { format.doi output.nonnull }
+ 'skip$
+ if$
+ addpubmedresolver pubmed empty$ not and
+ { format.pubmed output.nonnull }
+ 'skip$
+ if$
+}
+
+% Wrapper for output.bibitem.original.
+% If the URL field is not empty, set makeinlinelink to be true,
+% so that an inline link will be started at the next opportunity
+FUNCTION {output.bibitem}
+{ outside.brackets 'bracket.state :=
+ output.bibitem.original
+ inlinelinks url empty$ not and
+ { #1 'makeinlinelink := }
+ { #0 'makeinlinelink := }
+ if$
+}
+
+% Wrapper for fin.entry.original
+FUNCTION {fin.entry}
+{ output.web.refs % urlbst
+ makeinlinelink % ooops, it appears we didn't have a title for inlinelink
+ { possibly.setup.inlinelink % add some artificial link text here, as a fallback
+ "[link]" output.nonnull }
+ 'skip$
+ if$
+ bracket.state close.brackets = % urlbst
+ { "]" * }
+ 'skip$
+ if$
+ fin.entry.original
+}
+
+% Webpage entry type.
+% Title and url fields required;
+% author, note, year, month, and lastchecked fields optional
+% See references
+% ISO 690-2 http://www.nlc-bnc.ca/iso/tc46sc9/standard/690-2e.htm
+% http://www.classroom.net/classroom/CitingNetResources.html
+% http://neal.ctstateu.edu/history/cite.html
+% http://www.cas.usf.edu/english/walker/mla.html
+% for citation formats for web pages.
+FUNCTION {webpage}
+{ output.bibitem
+ author empty$
+ { editor empty$
+ 'skip$ % author and editor both optional
+ { format.editors output.nonnull }
+ if$
+ }
+ { editor empty$
+ { format.authors output.nonnull }
+ { "can't use both author and editor fields in " cite$ * warning$ }
+ if$
+ }
+ if$
+ new.block
+ title empty$ 'skip$ 'possibly.setup.inlinelink if$
+ format.title "title" output.check
+ inbrackets "online" output
+ new.block
+ year empty$
+ 'skip$
+ { format.date "year" output.check }
+ if$
+ % We don't need to output the URL details ('lastchecked' and 'url'),
+ % because fin.entry does that for us, using output.web.refs. The only
+ % reason we would want to put them here is if we were to decide that
+ % they should go in front of the rather miscellaneous information in 'note'.
+ new.block
+ note output
+ fin.entry
+}
+% ...urlbst to here
+
+
+FUNCTION {article}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ title empty$ 'skip$ 'possibly.setup.inlinelink if$ % urlbst
+ format.title "title" output.check
+ new.block
+ crossref missing$
+ { journal emphasize "journal" output.check
+ possibly.setup.inlinelink format.vol.num.pages output% urlbst
+ format.date "year" output.check
+ }
+ { format.article.crossref output.nonnull
+ format.pages output
+ }
+ if$
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {book}
+{ output.bibitem
+ author empty$
+ { format.editors "author and editor" output.check }
+ { format.authors output.nonnull
+ crossref missing$
+ { "author and editor" editor either.or.check }
+ 'skip$
+ if$
+ }
+ if$
+ new.block
+ title empty$ 'skip$ 'possibly.setup.inlinelink if$ % urlbst
+ format.btitle "title" output.check
+ crossref missing$
+ { format.bvolume output
+ new.block
+ format.number.series output
+ new.sentence
+ publisher "publisher" output.check
+ address output
+ }
+ { new.block
+ format.book.crossref output.nonnull
+ }
+ if$
+ format.edition output
+ format.date "year" output.check
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {booklet}
+{ output.bibitem
+ format.authors output
+ new.block
+ title empty$ 'skip$ 'possibly.setup.inlinelink if$ % urlbst
+ format.title "title" output.check
+ howpublished address new.block.checkb
+ howpublished output
+ address output
+ format.date output
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {inbook}
+{ output.bibitem
+ author empty$
+ { format.editors "author and editor" output.check }
+ { format.authors output.nonnull
+ crossref missing$
+ { "author and editor" editor either.or.check }
+ 'skip$
+ if$
+ }
+ if$
+ new.block
+ title empty$ 'skip$ 'possibly.setup.inlinelink if$ % urlbst
+ format.btitle "title" output.check
+ crossref missing$
+ { format.bvolume output
+ format.chapter.pages "chapter and pages" output.check
+ new.block
+ format.number.series output
+ new.sentence
+ publisher "publisher" output.check
+ address output
+ }
+ { format.chapter.pages "chapter and pages" output.check
+ new.block
+ format.book.crossref output.nonnull
+ }
+ if$
+ format.edition output
+ format.date "year" output.check
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {incollection}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ title empty$ 'skip$ 'possibly.setup.inlinelink if$ % urlbst
+ format.title "title" output.check
+ new.block
+ crossref missing$
+ { format.in.ed.booktitle "booktitle" output.check
+ format.bvolume output
+ format.number.series output
+ format.chapter.pages output
+ new.sentence
+ publisher "publisher" output.check
+ address output
+ format.edition output
+ format.date "year" output.check
+ }
+ { format.incoll.inproc.crossref output.nonnull
+ format.chapter.pages output
+ }
+ if$
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {inproceedings}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ title empty$ 'skip$ 'possibly.setup.inlinelink if$ % urlbst
+ format.title "title" output.check
+ new.block
+ crossref missing$
+ { format.in.ed.booktitle "booktitle" output.check
+ format.bvolume output
+ format.number.series output
+ format.pages output
+ address empty$
+ { organization publisher new.sentence.checkb
+ organization output
+ publisher output
+ format.date "year" output.check
+ }
+ { address output.nonnull
+ format.date "year" output.check
+ new.sentence
+ organization output
+ publisher output
+ }
+ if$
+ }
+ { format.incoll.inproc.crossref output.nonnull
+ format.pages output
+ }
+ if$
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {conference} { inproceedings }
+
+FUNCTION {manual}
+{ output.bibitem
+ author empty$
+ { organization empty$
+ 'skip$
+ { organization output.nonnull
+ address output
+ }
+ if$
+ }
+ { format.authors output.nonnull }
+ if$
+ new.block
+ title empty$ 'skip$ 'possibly.setup.inlinelink if$ % urlbst
+ format.btitle "title" output.check
+ author empty$
+ { organization empty$
+ { address new.block.checka
+ address output
+ }
+ 'skip$
+ if$
+ }
+ { organization address new.block.checkb
+ organization output
+ address output
+ }
+ if$
+ format.edition output
+ format.date output
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {mastersthesis}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ title empty$ 'skip$ 'possibly.setup.inlinelink if$ % urlbst
+ format.title "title" output.check
+ new.block
+ "Master's thesis" format.thesis.type output.nonnull
+ school "school" output.check
+ address output
+ format.date "year" output.check
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {misc}
+{ output.bibitem
+ format.authors output
+ title howpublished new.block.checkb
+ title empty$ 'skip$ 'possibly.setup.inlinelink if$ % urlbst
+ format.title output
+ howpublished new.block.checka
+ howpublished output
+ format.date output
+ new.block
+ note output
+ fin.entry
+ empty.misc.check
+}
+
+FUNCTION {phdthesis}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ title empty$ 'skip$ 'possibly.setup.inlinelink if$ % urlbst
+ format.btitle "title" output.check
+ new.block
+ "PhD thesis" format.thesis.type output.nonnull
+ school "school" output.check
+ address output
+ format.date "year" output.check
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {proceedings}
+{ output.bibitem
+ editor empty$
+ { organization output }
+ { format.editors output.nonnull }
+ if$
+ new.block
+ title empty$ 'skip$ 'possibly.setup.inlinelink if$ % urlbst
+ format.btitle "title" output.check
+ format.bvolume output
+ format.number.series output
+ address empty$
+ { editor empty$
+ { publisher new.sentence.checka }
+ { organization publisher new.sentence.checkb
+ organization output
+ }
+ if$
+ publisher output
+ format.date "year" output.check
+ }
+ { address output.nonnull
+ format.date "year" output.check
+ new.sentence
+ editor empty$
+ 'skip$
+ { organization output }
+ if$
+ publisher output
+ }
+ if$
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {techreport}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ title empty$ 'skip$ 'possibly.setup.inlinelink if$ % urlbst
+ format.title "title" output.check
+ new.block
+ format.tr.number output.nonnull
+ institution "institution" output.check
+ address output
+ format.date "year" output.check
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {unpublished}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ title empty$ 'skip$ 'possibly.setup.inlinelink if$ % urlbst
+ format.title "title" output.check
+ new.block
+ note "note" output.check
+ format.date output
+ fin.entry
+}
+
+FUNCTION {default.type} { misc }
+
+MACRO {jan} {"January"}
+
+MACRO {feb} {"February"}
+
+MACRO {mar} {"March"}
+
+MACRO {apr} {"April"}
+
+MACRO {may} {"May"}
+
+MACRO {jun} {"June"}
+
+MACRO {jul} {"July"}
+
+MACRO {aug} {"August"}
+
+MACRO {sep} {"September"}
+
+MACRO {oct} {"October"}
+
+MACRO {nov} {"November"}
+
+MACRO {dec} {"December"}
+
+MACRO {acmcs} {"ACM Computing Surveys"}
+
+MACRO {acta} {"Acta Informatica"}
+
+MACRO {cacm} {"Communications of the ACM"}
+
+MACRO {ibmjrd} {"IBM Journal of Research and Development"}
+
+MACRO {ibmsj} {"IBM Systems Journal"}
+
+MACRO {ieeese} {"IEEE Transactions on Software Engineering"}
+
+MACRO {ieeetc} {"IEEE Transactions on Computers"}
+
+MACRO {ieeetcad}
+ {"IEEE Transactions on Computer-Aided Design of Integrated Circuits"}
+
+MACRO {ipl} {"Information Processing Letters"}
+
+MACRO {jacm} {"Journal of the ACM"}
+
+MACRO {jcss} {"Journal of Computer and System Sciences"}
+
+MACRO {scp} {"Science of Computer Programming"}
+
+MACRO {sicomp} {"SIAM Journal on Computing"}
+
+MACRO {tocs} {"ACM Transactions on Computer Systems"}
+
+MACRO {tods} {"ACM Transactions on Database Systems"}
+
+MACRO {tog} {"ACM Transactions on Graphics"}
+
+MACRO {toms} {"ACM Transactions on Mathematical Software"}
+
+MACRO {toois} {"ACM Transactions on Office Information Systems"}
+
+MACRO {toplas} {"ACM Transactions on Programming Languages and Systems"}
+
+MACRO {tcs} {"Theoretical Computer Science"}
+
+READ
+
+STRINGS { longest.label }
+
+INTEGERS { number.label longest.label.width }
+
+FUNCTION {initialize.longest.label}
+{ "" 'longest.label :=
+ #1 'number.label :=
+ #0 'longest.label.width :=
+}
+
+FUNCTION {longest.label.pass}
+{ number.label int.to.str$ 'label :=
+ number.label #1 + 'number.label :=
+ label width$ longest.label.width >
+ { label 'longest.label :=
+ label width$ 'longest.label.width :=
+ }
+ 'skip$
+ if$
+}
+
+EXECUTE {initialize.longest.label}
+
+ITERATE {longest.label.pass}
+
+FUNCTION {begin.bib}
+{ preamble$ empty$
+ 'skip$
+ { preamble$ write$ newline$ }
+ if$
+ "<dl>" write$ newline$
+}
+
+EXECUTE {begin.bib}
+
+EXECUTE {init.urlbst.variables}
+EXECUTE {init.state.consts}
+
+ITERATE {call.type$}
+
+FUNCTION {end.bib}
+{ newline$
+ "</dl>" write$ newline$
+}
+
+EXECUTE {end.bib}
diff --git a/biblio/bibtex/contrib/bids b/biblio/bibtex/contrib/bids
new file mode 120000
index 0000000000..5e111b63a3
--- /dev/null
+++ b/biblio/bibtex/contrib/bids
@@ -0,0 +1 @@
+../utils/bids \ No newline at end of file
diff --git a/biblio/bibtex/contrib/biolett-bst/README.txt b/biblio/bibtex/contrib/biolett-bst/README.txt
new file mode 100644
index 0000000000..a4174b329b
--- /dev/null
+++ b/biblio/bibtex/contrib/biolett-bst/README.txt
@@ -0,0 +1,33 @@
+This is the BibTeX style (.bst) file for the
+journal "Biology Letters" from the Royal Society.
+
+Simply include it in your .tex file with command
+
+ \bibliography{myreferences}
+ \bibliographystyle{biolett}
+
+where 'myreferences' is actually the file
+'myreferences.bib', which should be your bibliographic
+databank in BibTeX format, of course!
+
+Please, be aware that this style was pro­duced in­de­pen­dently
+of the Royal So­ci­ety, and has no for­mal ap­proval
+from the Society.
+
+If you spot any mistake in the .bst file, you'd better fixing
+it in the .dbj file, instead of trying to fix the .bst file.
+In such case, I can send you my original biolett.dbj file
+to speed up your work. Just drop me an email!
+
+Cheers
+
+Og DeSouza <og.souza@ufv.br>
+http://www.isoptera.ufv.br
+
+PS: if you publish a paper using this bst file, please be
+kind to mention it in the acknowledgments, and send me a
+pdf of your paper for my records. It may improve the chances
+to get my next research grant!
+
+--------------- changelog
+2016-10-05 first version
diff --git a/biblio/bibtex/contrib/biolett-bst/biolett.bst b/biblio/bibtex/contrib/biolett-bst/biolett.bst
new file mode 100644
index 0000000000..a465b569b2
--- /dev/null
+++ b/biblio/bibtex/contrib/biolett-bst/biolett.bst
@@ -0,0 +1,1282 @@
+%%
+%% This is file `biolett.bst',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% merlin.mbs (with options: `seq-no,nm-rvx,ed-rev,nmlm,x10,x0,m10,m0,mcite,mct-1,mct-x2,dt-beg,yr-per,xmth,yrp-x,vol-bf,vnum-cm,volp-com,num-xser,jnm-x,add-pub,doi,edpar,in-col,pp,ed,abr,ednx,xedn,jabr,and-xcom,xand,etal-xc,etal-it,nfss,')
+%% ----------------------------------------
+%% *** BibTeX style for the journal Biology Letters ***
+%% This is an independent production without formal
+%% approval from the Royal Society, the publisher of
+%% Biol. Lett.
+%%
+%% Created by Og DeSouza <og.souza@ufv.br>
+%% using custom-bib
+%%
+%% This file was originally produced running <latex biolett.dbj>
+%% and then modified manually by changing line 482
+%% from "\doi{" doi * "}" *
+%% to "(\doi{" doi * "})" *
+%% in order to comply with Biol. Lett. format for doi numbers.
+%%
+%% Copyright 1994-2011 Patrick W Daly
+ % ===============================================================
+ % IMPORTANT NOTICE:
+ % This bibliographic style (bst) file has been generated from one or
+ % more master bibliographic style (mbs) files, listed above.
+ %
+ % This generated file can be redistributed and/or modified under the terms
+ % of the LaTeX Project Public License Distributed from CTAN
+ % archives in directory macros/latex/base/lppl.txt; either
+ % version 1 of the License, or any later version.
+ % ===============================================================
+ % Name and version information of the main mbs file:
+ % \ProvidesFile{merlin.mbs}[2011/11/18 4.33 (PWD, AO, DPC)]
+ % For use with BibTeX version 0.99a or later
+ %-------------------------------------------------------------------
+ % This bibliography style file is intended for texts in ENGLISH
+ % This is a numerical citation style, and as such is standard LaTeX.
+ % It requires no extra package to interface to the main text.
+ % The form of the \bibitem entries is
+ % \bibitem{key}...
+ % Usage of \cite is as follows:
+ % \cite{key} ==>> [#]
+ % \cite[chap. 2]{key} ==>> [#, chap. 2]
+ % where # is a number determined by the ordering in the reference list.
+ % The order in the reference list is that by which the works were originally
+ % cited in the text, or that in the database.
+ %---------------------------------------------------------------------
+
+ENTRY
+ { address
+ author
+ booktitle
+ chapter
+ doi
+ edition
+ editor
+ eid
+ howpublished
+ institution
+ journal
+ key
+ month
+ note
+ number
+ organization
+ pages
+ publisher
+ school
+ series
+ title
+ type
+ volume
+ year
+ }
+ {}
+ { label }
+INTEGERS { output.state before.all mid.sentence after.sentence after.block }
+FUNCTION {init.state.consts}
+{ #0 'before.all :=
+ #1 'mid.sentence :=
+ #2 'after.sentence :=
+ #3 'after.block :=
+}
+STRINGS { s t}
+FUNCTION {output.nonnull}
+{ 's :=
+ output.state mid.sentence =
+ { ", " * write$ }
+ { output.state after.block =
+ { add.period$ write$
+ newline$
+ "\newblock " write$
+ }
+ { output.state before.all =
+ 'write$
+ { add.period$ " " * write$ }
+ if$
+ }
+ if$
+ mid.sentence 'output.state :=
+ }
+ if$
+ s
+}
+FUNCTION {output}
+{ duplicate$ empty$
+ 'pop$
+ 'output.nonnull
+ if$
+}
+FUNCTION {output.check}
+{ 't :=
+ duplicate$ empty$
+ { pop$ "empty " t * " in " * cite$ * warning$ }
+ 'output.nonnull
+ if$
+}
+FUNCTION {fin.entry}
+{ add.period$
+ write$
+ newline$
+}
+
+FUNCTION {new.block}
+{ output.state before.all =
+ 'skip$
+ { after.block 'output.state := }
+ if$
+}
+FUNCTION {new.sentence}
+{ output.state after.block =
+ 'skip$
+ { output.state before.all =
+ 'skip$
+ { after.sentence 'output.state := }
+ if$
+ }
+ if$
+}
+FUNCTION {add.blank}
+{ " " * before.all 'output.state :=
+}
+
+FUNCTION {date.block}
+{
+ add.blank
+}
+
+FUNCTION {not}
+{ { #0 }
+ { #1 }
+ if$
+}
+FUNCTION {and}
+{ 'skip$
+ { pop$ #0 }
+ if$
+}
+FUNCTION {or}
+{ { pop$ #1 }
+ 'skip$
+ if$
+}
+STRINGS {z}
+
+FUNCTION {remove.dots}
+{ 'z :=
+ ""
+ { z empty$ not }
+ { z #1 #2 substring$
+ duplicate$ "\." =
+ { z #3 global.max$ substring$ 'z := * }
+ { pop$
+ z #1 #1 substring$
+ z #2 global.max$ substring$ 'z :=
+ duplicate$ "." = 'pop$
+ { * }
+ if$
+ }
+ if$
+ }
+ while$
+}
+FUNCTION {new.block.checka}
+{ empty$
+ 'skip$
+ 'new.block
+ if$
+}
+FUNCTION {new.block.checkb}
+{ empty$
+ swap$ empty$
+ and
+ 'skip$
+ 'new.block
+ if$
+}
+FUNCTION {new.sentence.checka}
+{ empty$
+ 'skip$
+ 'new.sentence
+ if$
+}
+FUNCTION {new.sentence.checkb}
+{ empty$
+ swap$ empty$
+ and
+ 'skip$
+ 'new.sentence
+ if$
+}
+FUNCTION {field.or.null}
+{ duplicate$ empty$
+ { pop$ "" }
+ 'skip$
+ if$
+}
+FUNCTION {emphasize}
+{ duplicate$ empty$
+ { pop$ "" }
+ { "\emph{" swap$ * "}" * }
+ if$
+}
+FUNCTION {bolden}
+{ duplicate$ empty$
+ { pop$ "" }
+ { "\textbf{" swap$ * "}" * }
+ if$
+}
+FUNCTION {tie.or.space.prefix}
+{ duplicate$ text.length$ #3 <
+ { "~" }
+ { " " }
+ if$
+ swap$
+}
+
+FUNCTION {capitalize}
+{ "u" change.case$ "t" change.case$ }
+
+FUNCTION {space.word}
+{ " " swap$ * " " * }
+ % Here are the language-specific definitions for explicit words.
+ % Each function has a name bbl.xxx where xxx is the English word.
+ % The language selected here is ENGLISH
+FUNCTION {bbl.and}
+{ "and"}
+
+FUNCTION {bbl.etal}
+{ "et~al." }
+
+FUNCTION {bbl.editors}
+{ "eds." }
+
+FUNCTION {bbl.editor}
+{ "ed." }
+
+FUNCTION {bbl.edby}
+{ "edited by" }
+
+FUNCTION {bbl.edition}
+{ "ed." }
+
+FUNCTION {bbl.volume}
+{ "vol." }
+
+FUNCTION {bbl.of}
+{ "of" }
+
+FUNCTION {bbl.number}
+{ "no." }
+
+FUNCTION {bbl.nr}
+{ "no." }
+
+FUNCTION {bbl.in}
+{ "in" }
+
+FUNCTION {bbl.pages}
+{ "pp." }
+
+FUNCTION {bbl.page}
+{ "p." }
+
+FUNCTION {bbl.chapter}
+{ "chap." }
+
+FUNCTION {bbl.techrep}
+{ "Tech. Rep." }
+
+FUNCTION {bbl.mthesis}
+{ "Master's thesis" }
+
+FUNCTION {bbl.phdthesis}
+{ "Ph.D. thesis" }
+
+MACRO {jan} {"Jan."}
+
+MACRO {feb} {"Feb."}
+
+MACRO {mar} {"Mar."}
+
+MACRO {apr} {"Apr."}
+
+MACRO {may} {"May"}
+
+MACRO {jun} {"Jun."}
+
+MACRO {jul} {"Jul."}
+
+MACRO {aug} {"Aug."}
+
+MACRO {sep} {"Sep."}
+
+MACRO {oct} {"Oct."}
+
+MACRO {nov} {"Nov."}
+
+MACRO {dec} {"Dec."}
+
+MACRO {acmcs} {"ACM Comput. Surv."}
+
+MACRO {acta} {"Acta Inf."}
+
+MACRO {cacm} {"Commun. ACM"}
+
+MACRO {ibmjrd} {"IBM J. Res. Dev."}
+
+MACRO {ibmsj} {"IBM Syst.~J."}
+
+MACRO {ieeese} {"IEEE Trans. Software Eng."}
+
+MACRO {ieeetc} {"IEEE Trans. Comput."}
+
+MACRO {ieeetcad}
+ {"IEEE Trans. Comput. Aid. Des."}
+
+MACRO {ipl} {"Inf. Process. Lett."}
+
+MACRO {jacm} {"J.~ACM"}
+
+MACRO {jcss} {"J.~Comput. Syst. Sci."}
+
+MACRO {scp} {"Sci. Comput. Program."}
+
+MACRO {sicomp} {"SIAM J. Comput."}
+
+MACRO {tocs} {"ACM Trans. Comput. Syst."}
+
+MACRO {tods} {"ACM Trans. Database Syst."}
+
+MACRO {tog} {"ACM Trans. Graphic."}
+
+MACRO {toms} {"ACM Trans. Math. Software"}
+
+MACRO {toois} {"ACM Trans. Office Inf. Syst."}
+
+MACRO {toplas} {"ACM Trans. Progr. Lang. Syst."}
+
+MACRO {tcs} {"Theor. Comput. Sci."}
+
+FUNCTION {bibinfo.check}
+{ swap$
+ duplicate$ missing$
+ {
+ pop$ pop$
+ ""
+ }
+ { duplicate$ empty$
+ {
+ swap$ pop$
+ }
+ { swap$
+ pop$
+ }
+ if$
+ }
+ if$
+}
+FUNCTION {bibinfo.warn}
+{ swap$
+ duplicate$ missing$
+ {
+ swap$ "missing " swap$ * " in " * cite$ * warning$ pop$
+ ""
+ }
+ { duplicate$ empty$
+ {
+ swap$ "empty " swap$ * " in " * cite$ * warning$
+ }
+ { swap$
+ pop$
+ }
+ if$
+ }
+ if$
+}
+INTEGERS { nameptr namesleft numnames }
+
+
+STRINGS { bibinfo}
+
+FUNCTION {format.names}
+{ 'bibinfo :=
+ duplicate$ empty$ 'skip$ {
+ 's :=
+ "" 't :=
+ #1 'nameptr :=
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ { s nameptr
+ "{vv~}{ll}{ jj}{ f{}}"
+ format.name$
+ remove.dots
+ bibinfo bibinfo.check
+ 't :=
+ nameptr #1 >
+ {
+ nameptr #0
+ #10 +
+ #1 + =
+ numnames #0
+ #10 +
+ > and
+ { "others" 't :=
+ #1 'namesleft := }
+ 'skip$
+ if$
+ namesleft #1 >
+ { ", " * t * }
+ {
+ s nameptr "{ll}" format.name$ duplicate$ "others" =
+ { 't := }
+ { pop$ }
+ if$
+ "," *
+ t "others" =
+ {
+ " " * bbl.etal emphasize *
+ }
+ { " " * t * }
+ if$
+ }
+ if$
+ }
+ 't
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+ } if$
+}
+FUNCTION {format.names.ed}
+{
+ format.names
+}
+FUNCTION {format.authors}
+{ author "author" format.names
+}
+FUNCTION {get.bbl.editor}
+{ editor num.names$ #1 > 'bbl.editors 'bbl.editor if$ }
+
+FUNCTION {format.editors}
+{ editor "editor" format.names duplicate$ empty$ 'skip$
+ {
+ " " *
+ get.bbl.editor
+ "(" swap$ * ")" *
+ *
+ }
+ if$
+}
+FUNCTION {format.doi}
+{ doi empty$
+ { "" }
+ {
+ new.block
+ "(\doi{" doi * "})" *
+ }
+ if$
+}
+FUNCTION {format.note}
+{
+ note empty$
+ { "" }
+ { note #1 #1 substring$
+ duplicate$ "{" =
+ 'skip$
+ { output.state mid.sentence =
+ { "l" }
+ { "u" }
+ if$
+ change.case$
+ }
+ if$
+ note #2 global.max$ substring$ * "note" bibinfo.check
+ }
+ if$
+}
+
+FUNCTION {format.title}
+{ title
+ duplicate$ empty$ 'skip$
+ { "t" change.case$ }
+ if$
+ "title" bibinfo.check
+}
+FUNCTION {output.bibitem}
+{ newline$
+ "\bibitem{" write$
+ cite$ write$
+ "}" write$
+ newline$
+ ""
+ before.all 'output.state :=
+}
+
+FUNCTION {n.dashify}
+{
+ 't :=
+ ""
+ { t empty$ not }
+ { t #1 #1 substring$ "-" =
+ { t #1 #2 substring$ "--" = not
+ { "--" *
+ t #2 global.max$ substring$ 't :=
+ }
+ { { t #1 #1 substring$ "-" = }
+ { "-" *
+ t #2 global.max$ substring$ 't :=
+ }
+ while$
+ }
+ if$
+ }
+ { t #1 #1 substring$ *
+ t #2 global.max$ substring$ 't :=
+ }
+ if$
+ }
+ while$
+}
+
+FUNCTION {word.in}
+{ bbl.in capitalize
+ ":" *
+ " " * }
+
+FUNCTION {format.date}
+{
+ ""
+ duplicate$ empty$
+ year "year" bibinfo.check duplicate$ empty$
+ { swap$ 'skip$
+ { "there's a month but no year in " cite$ * warning$ }
+ if$
+ *
+ }
+ { swap$ 'skip$
+ {
+ swap$
+ " " * swap$
+ }
+ if$
+ *
+ }
+ if$
+ duplicate$ empty$
+ 'skip$
+ {
+ before.all 'output.state :=
+ after.sentence 'output.state :=
+ }
+ if$
+}
+FUNCTION {format.btitle}
+{ title "title" bibinfo.check
+ duplicate$ empty$ 'skip$
+ {
+ emphasize
+ }
+ if$
+}
+FUNCTION {either.or.check}
+{ empty$
+ 'pop$
+ { "can't use both " swap$ * " fields in " * cite$ * warning$ }
+ if$
+}
+FUNCTION {format.bvolume}
+{ volume empty$
+ { "" }
+ { bbl.volume volume tie.or.space.prefix
+ "volume" bibinfo.check * *
+ series "series" bibinfo.check
+ duplicate$ empty$ 'pop$
+ { swap$ bbl.of space.word * swap$
+ emphasize * }
+ if$
+ "volume and number" number either.or.check
+ }
+ if$
+}
+FUNCTION {format.number.series}
+{ volume empty$
+ { number empty$
+ { series field.or.null }
+ { series empty$
+ { number "number" bibinfo.check }
+ { output.state mid.sentence =
+ { bbl.number }
+ { bbl.number capitalize }
+ if$
+ number tie.or.space.prefix "number" bibinfo.check * *
+ bbl.in space.word *
+ series "series" bibinfo.check *
+ }
+ if$
+ }
+ if$
+ }
+ { "" }
+ if$
+}
+
+FUNCTION {format.edition}
+{ edition duplicate$ empty$ 'skip$
+ {
+ output.state mid.sentence =
+ { "l" }
+ { "t" }
+ if$ change.case$
+ "edition" bibinfo.check
+ " " * bbl.edition *
+ }
+ if$
+}
+INTEGERS { multiresult }
+FUNCTION {multi.page.check}
+{ 't :=
+ #0 'multiresult :=
+ { multiresult not
+ t empty$ not
+ and
+ }
+ { t #1 #1 substring$
+ duplicate$ "-" =
+ swap$ duplicate$ "," =
+ swap$ "+" =
+ or or
+ { #1 'multiresult := }
+ { t #2 global.max$ substring$ 't := }
+ if$
+ }
+ while$
+ multiresult
+}
+FUNCTION {format.pages}
+{ pages duplicate$ empty$ 'skip$
+ { duplicate$ multi.page.check
+ {
+ bbl.pages swap$
+ n.dashify
+ }
+ {
+ bbl.page swap$
+ }
+ if$
+ tie.or.space.prefix
+ "pages" bibinfo.check
+ * *
+ }
+ if$
+}
+FUNCTION {format.journal.pages}
+{ pages duplicate$ empty$ 'pop$
+ { swap$ duplicate$ empty$
+ { pop$ pop$ format.pages }
+ {
+ ", " *
+ swap$
+ n.dashify
+ "pages" bibinfo.check
+ *
+ }
+ if$
+ }
+ if$
+}
+FUNCTION {format.journal.eid}
+{ eid "eid" bibinfo.check
+ duplicate$ empty$ 'pop$
+ { swap$ duplicate$ empty$ 'skip$
+ {
+ ", " *
+ }
+ if$
+ swap$ *
+ }
+ if$
+}
+FUNCTION {format.vol.num.pages}
+{ volume field.or.null
+ duplicate$ empty$ 'skip$
+ {
+ "volume" bibinfo.check
+ }
+ if$
+ bolden
+ number "number" bibinfo.check duplicate$ empty$ 'skip$
+ {
+ swap$ duplicate$ empty$
+ { "there's a number but no volume in " cite$ * warning$ }
+ 'skip$
+ if$
+ swap$
+ ", " swap$ *
+ }
+ if$ *
+ eid empty$
+ { format.journal.pages }
+ { format.journal.eid }
+ if$
+}
+
+FUNCTION {format.chapter.pages}
+{ chapter empty$
+ 'format.pages
+ { type empty$
+ { bbl.chapter }
+ { type "l" change.case$
+ "type" bibinfo.check
+ }
+ if$
+ chapter tie.or.space.prefix
+ "chapter" bibinfo.check
+ * *
+ pages empty$
+ 'skip$
+ { ", " * format.pages * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.booktitle}
+{
+ booktitle "booktitle" bibinfo.check
+ emphasize
+}
+FUNCTION {format.in.ed.booktitle}
+{ format.booktitle duplicate$ empty$ 'skip$
+ {
+ editor "editor" format.names.ed duplicate$ empty$ 'pop$
+ {
+ " " *
+ get.bbl.editor
+ "(" swap$ * "), " *
+ * swap$
+ * }
+ if$
+ word.in swap$ *
+ }
+ if$
+}
+FUNCTION {empty.misc.check}
+{ author empty$ title empty$ howpublished empty$
+ month empty$ year empty$ note empty$
+ and and and and and
+ { "all relevant fields are empty in " cite$ * warning$ }
+ 'skip$
+ if$
+}
+FUNCTION {format.thesis.type}
+{ type duplicate$ empty$
+ 'pop$
+ { swap$ pop$
+ "t" change.case$ "type" bibinfo.check
+ }
+ if$
+}
+FUNCTION {format.tr.number}
+{ number "number" bibinfo.check
+ type duplicate$ empty$
+ { pop$ bbl.techrep }
+ 'skip$
+ if$
+ "type" bibinfo.check
+ swap$ duplicate$ empty$
+ { pop$ "t" change.case$ }
+ { tie.or.space.prefix * * }
+ if$
+}
+FUNCTION {format.article.crossref}
+{
+ key duplicate$ empty$
+ { pop$
+ journal duplicate$ empty$
+ { "need key or journal for " cite$ * " to crossref " * crossref * warning$ }
+ { "journal" bibinfo.check emphasize word.in swap$ * }
+ if$
+ }
+ { word.in swap$ * " " *}
+ if$
+ " \cite{" * crossref * "}" *
+}
+FUNCTION {format.crossref.editor}
+{ editor #1 "{vv~}{ll}" format.name$
+ "editor" bibinfo.check
+ editor num.names$ duplicate$
+ #2 >
+ { pop$
+ "editor" bibinfo.check
+ " " * bbl.etal
+ emphasize
+ *
+ }
+ { #2 <
+ 'skip$
+ { editor #2 "{ff }{vv }{ll}{ jj}" format.name$ "others" =
+ {
+ "editor" bibinfo.check
+ " " * bbl.etal
+ emphasize
+ *
+ }
+ {
+ bbl.and space.word
+ * editor #2 "{vv~}{ll}" format.name$
+ "editor" bibinfo.check
+ *
+ }
+ if$
+ }
+ if$
+ }
+ if$
+}
+FUNCTION {format.book.crossref}
+{ volume duplicate$ empty$
+ { "empty volume in " cite$ * "'s crossref of " * crossref * warning$
+ pop$ word.in
+ }
+ { bbl.volume
+ capitalize
+ swap$ tie.or.space.prefix "volume" bibinfo.check * * bbl.of space.word *
+ }
+ if$
+ editor empty$
+ editor field.or.null author field.or.null =
+ or
+ { key empty$
+ { series empty$
+ { "need editor, key, or series for " cite$ * " to crossref " *
+ crossref * warning$
+ "" *
+ }
+ { series emphasize * }
+ if$
+ }
+ { key * }
+ if$
+ }
+ { format.crossref.editor * }
+ if$
+ " \cite{" * crossref * "}" *
+}
+FUNCTION {format.incoll.inproc.crossref}
+{
+ editor empty$
+ editor field.or.null author field.or.null =
+ or
+ { key empty$
+ { format.booktitle duplicate$ empty$
+ { "need editor, key, or booktitle for " cite$ * " to crossref " *
+ crossref * warning$
+ }
+ { word.in swap$ * }
+ if$
+ }
+ { word.in key * " " *}
+ if$
+ }
+ { word.in format.crossref.editor * " " *}
+ if$
+ " \cite{" * crossref * "}" *
+}
+FUNCTION {format.org.or.pub}
+{ 't :=
+ ""
+ address empty$ t empty$ and
+ 'skip$
+ {
+ address "address" bibinfo.check *
+ t empty$
+ 'skip$
+ { address empty$
+ 'skip$
+ { ": " * }
+ if$
+ t *
+ }
+ if$
+ }
+ if$
+}
+FUNCTION {format.publisher.address}
+{ publisher "publisher" bibinfo.warn format.org.or.pub
+}
+
+FUNCTION {format.organization.address}
+{ organization "organization" bibinfo.check format.org.or.pub
+}
+
+FUNCTION {article}
+{ output.bibitem
+ format.authors "author" output.check
+ format.date "year" output.check
+ date.block
+ format.title "title" output.check
+ new.block
+ crossref missing$
+ {
+ journal
+ "journal" bibinfo.check
+ emphasize
+ "journal" output.check
+ add.blank
+ format.vol.num.pages output
+ }
+ { format.article.crossref output.nonnull
+ format.pages output
+ }
+ if$
+ format.doi output
+ new.block
+ format.note output
+ fin.entry
+}
+FUNCTION {book}
+{ output.bibitem
+ author empty$
+ { format.editors "author and editor" output.check
+ }
+ { format.authors output.nonnull
+ crossref missing$
+ { "author and editor" editor either.or.check }
+ 'skip$
+ if$
+ }
+ if$
+ format.date "year" output.check
+ date.block
+ format.btitle "title" output.check
+ crossref missing$
+ { format.bvolume output
+ new.block
+ format.number.series output
+ new.sentence
+ format.publisher.address output
+ }
+ {
+ new.block
+ format.book.crossref output.nonnull
+ }
+ if$
+ format.edition output
+ format.doi output
+ new.block
+ format.note output
+ fin.entry
+}
+FUNCTION {booklet}
+{ output.bibitem
+ format.authors output
+ format.date output
+ date.block
+ format.title "title" output.check
+ new.block
+ howpublished "howpublished" bibinfo.check output
+ address "address" bibinfo.check output
+ format.doi output
+ new.block
+ format.note output
+ fin.entry
+}
+
+FUNCTION {inbook}
+{ output.bibitem
+ author empty$
+ { format.editors "author and editor" output.check
+ }
+ { format.authors output.nonnull
+ crossref missing$
+ { "author and editor" editor either.or.check }
+ 'skip$
+ if$
+ }
+ if$
+ format.date "year" output.check
+ date.block
+ format.btitle "title" output.check
+ crossref missing$
+ {
+ format.bvolume output
+ format.chapter.pages "chapter and pages" output.check
+ new.block
+ format.number.series output
+ new.sentence
+ format.publisher.address output
+ }
+ {
+ format.chapter.pages "chapter and pages" output.check
+ new.block
+ format.book.crossref output.nonnull
+ }
+ if$
+ format.edition output
+ format.doi output
+ new.block
+ format.note output
+ fin.entry
+}
+
+FUNCTION {incollection}
+{ output.bibitem
+ format.authors "author" output.check
+ format.date "year" output.check
+ date.block
+ format.title "title" output.check
+ new.block
+ crossref missing$
+ { format.in.ed.booktitle "booktitle" output.check
+ format.bvolume output
+ format.number.series output
+ format.chapter.pages output
+ new.sentence
+ format.publisher.address output
+ format.edition output
+ }
+ { format.incoll.inproc.crossref output.nonnull
+ format.chapter.pages output
+ }
+ if$
+ format.doi output
+ new.block
+ format.note output
+ fin.entry
+}
+FUNCTION {inproceedings}
+{ output.bibitem
+ format.authors "author" output.check
+ format.date "year" output.check
+ date.block
+ format.title "title" output.check
+ new.block
+ crossref missing$
+ { format.in.ed.booktitle "booktitle" output.check
+ format.bvolume output
+ format.number.series output
+ format.pages output
+ new.sentence
+ publisher empty$
+ { format.organization.address output }
+ { organization "organization" bibinfo.check output
+ format.publisher.address output
+ }
+ if$
+ }
+ { format.incoll.inproc.crossref output.nonnull
+ format.pages output
+ }
+ if$
+ format.doi output
+ new.block
+ format.note output
+ fin.entry
+}
+FUNCTION {conference} { inproceedings }
+FUNCTION {manual}
+{ output.bibitem
+ author empty$
+ { organization "organization" bibinfo.check
+ duplicate$ empty$ 'pop$
+ { output
+ address "address" bibinfo.check output
+ }
+ if$
+ }
+ { format.authors output.nonnull }
+ if$
+ format.date output
+ date.block
+ format.btitle "title" output.check
+ author empty$
+ { organization empty$
+ {
+ address new.block.checka
+ address "address" bibinfo.check output
+ }
+ 'skip$
+ if$
+ }
+ {
+ organization address new.block.checkb
+ organization "organization" bibinfo.check output
+ address "address" bibinfo.check output
+ }
+ if$
+ format.edition output
+ format.doi output
+ new.block
+ format.note output
+ fin.entry
+}
+
+FUNCTION {mastersthesis}
+{ output.bibitem
+ format.authors "author" output.check
+ format.date "year" output.check
+ date.block
+ format.btitle
+ "title" output.check
+ new.block
+ bbl.mthesis format.thesis.type output.nonnull
+ school "school" bibinfo.warn output
+ address "address" bibinfo.check output
+ format.doi output
+ new.block
+ format.note output
+ fin.entry
+}
+
+FUNCTION {misc}
+{ output.bibitem
+ format.authors output
+ format.date output
+ title howpublished new.block.checkb
+ format.title output
+ howpublished new.block.checka
+ howpublished "howpublished" bibinfo.check output
+ format.doi output
+ new.block
+ format.note output
+ fin.entry
+ empty.misc.check
+}
+FUNCTION {phdthesis}
+{ output.bibitem
+ format.authors "author" output.check
+ format.date "year" output.check
+ date.block
+ format.btitle
+ "title" output.check
+ new.block
+ bbl.phdthesis format.thesis.type output.nonnull
+ school "school" bibinfo.warn output
+ address "address" bibinfo.check output
+ format.doi output
+ new.block
+ format.note output
+ fin.entry
+}
+
+FUNCTION {proceedings}
+{ output.bibitem
+ editor empty$
+ { organization "organization" bibinfo.check output
+ }
+ { format.editors output.nonnull }
+ if$
+ format.date "year" output.check
+ date.block
+ format.btitle "title" output.check
+ format.bvolume output
+ format.number.series output
+ editor empty$
+ { publisher empty$
+ 'skip$
+ {
+ new.sentence
+ format.publisher.address output
+ }
+ if$
+ }
+ { publisher empty$
+ {
+ new.sentence
+ format.organization.address output }
+ {
+ new.sentence
+ organization "organization" bibinfo.check output
+ format.publisher.address output
+ }
+ if$
+ }
+ if$
+ format.doi output
+ new.block
+ format.note output
+ fin.entry
+}
+
+FUNCTION {techreport}
+{ output.bibitem
+ format.authors "author" output.check
+ format.date "year" output.check
+ date.block
+ format.title
+ "title" output.check
+ new.block
+ format.tr.number output.nonnull
+ institution "institution" bibinfo.warn output
+ address "address" bibinfo.check output
+ format.doi output
+ new.block
+ format.note output
+ fin.entry
+}
+
+FUNCTION {unpublished}
+{ output.bibitem
+ format.authors "author" output.check
+ format.date output
+ date.block
+ format.title "title" output.check
+ format.doi output
+ new.block
+ format.note "note" output.check
+ fin.entry
+}
+
+FUNCTION {default.type} { misc }
+READ
+STRINGS { longest.label }
+INTEGERS { number.label longest.label.width }
+FUNCTION {initialize.longest.label}
+{ "" 'longest.label :=
+ #1 'number.label :=
+ #0 'longest.label.width :=
+}
+FUNCTION {longest.label.pass}
+{ number.label int.to.str$ 'label :=
+ number.label #1 + 'number.label :=
+ label width$ longest.label.width >
+ { label 'longest.label :=
+ label width$ 'longest.label.width :=
+ }
+ 'skip$
+ if$
+}
+EXECUTE {initialize.longest.label}
+ITERATE {longest.label.pass}
+FUNCTION {begin.bib}
+{ preamble$ empty$
+ 'skip$
+ { preamble$ write$ newline$ }
+ if$
+ "\begin{thebibliography}{" longest.label * "}" *
+ write$ newline$
+ "\expandafter\ifx\csname urlstyle\endcsname\relax"
+ write$ newline$
+ " \providecommand{\doi}[1]{doi:\discretionary{}{}{}#1}\else"
+ write$ newline$
+ " \providecommand{\doi}{doi:\discretionary{}{}{}\begingroup \urlstyle{rm}\Url}\fi"
+ write$ newline$
+}
+EXECUTE {begin.bib}
+EXECUTE {init.state.consts}
+ITERATE {call.type$}
+FUNCTION {end.bib}
+{ newline$
+ "\end{thebibliography}" write$ newline$
+}
+EXECUTE {end.bib}
+%% End of customized bst file
+%%
+%% End of file `biolett.bst'.
diff --git a/biblio/bibtex/contrib/bookdb/README b/biblio/bibtex/contrib/bookdb/README
new file mode 100644
index 0000000000..27553557cb
--- /dev/null
+++ b/biblio/bibtex/contrib/bookdb/README
@@ -0,0 +1,41 @@
+ The bookdb BibTeX package provides an extended book entry for
+use in catalogueing a home library.
+
+ The extensions include fields for:
+binding, category, collator, condition, copy, illustrations, introduction,
+location, pages, size, value, volumes
+
+
+Changes in version 0.1 (2015/06/01)
+o First public release
+
+Changes in version 0.2 (2015/06/04)
+o Added two fields: foreword and preface
+
+---------------------------------------------------------------
+ Author: Peter Wilson (Herries Press)
+
+ This work may be distributed and/or modified under the
+ conditions of the Latex Project Public License, either
+ version 1.3 of this license or (at your option) any
+ later version.
+ The latest version of the license is in
+ http://www.latex-project.org/lppl.txt
+ and version 1.3 or later is part of all distributions of
+ LaTeX version 2003/06/01 or later.
+
+ This work has the LPPL maintenance status "author-maintained".
+
+ This work and distribution consists of the files:
+ README (this file)
+ bookdb.bst
+ bookdb.tex
+ and the derived file
+ bookdb.pdf
+
+---------------------------------------------------------------
+
+2015/06/01
+Peter Wilson
+herries dot press at earthlink dot net
+
diff --git a/biblio/bibtex/contrib/bookdb/bookdb.bst b/biblio/bibtex/contrib/bookdb/bookdb.bst
new file mode 100644
index 0000000000..d76b6ae654
--- /dev/null
+++ b/biblio/bibtex/contrib/bookdb/bookdb.bst
@@ -0,0 +1,1759 @@
+%% This is file `bookdb.bst' version 0.2,
+%% as modified by Peter Wilson (herries.press@earthlink.net) in June 2015 from
+%% `bookdb.bst' generated with the docstrip utility.
+%%
+%% It is intended for use in catalogueing a home library.
+%%
+%% The original source files were:
+%%
+%% merlin.mbs (with options: `ay,nat,ed-au,keyxyr,dt-end,yr-com,note-yr,tit-it,atit-u,num-xser,pg-bk,pub-date,isbn,edparxc,pp,ed,xedn,nfss,')
+%% ----------------------------------------
+%%
+%% Copyright 1994-2011 Patrick W Daly
+ % ===============================================================
+ % IMPORTANT NOTICE:
+ % This bibliographic style (bst) file has been generated from one or
+ % more master bibliographic style (mbs) files, listed above.
+ %
+ % This generated file can be redistributed and/or modified under the terms
+ % of the LaTeX Project Public License Distributed from CTAN
+ % archives in directory macros/latex/base/lppl.txt; either
+ % version 1 of the License, or any later version.
+ %
+ % The originally generated file was modified by Peter Wilson in 2015
+ % to better suit his purposes.
+ % ===============================================================
+ % Name and version information of the main mbs file:
+ % \ProvidesFile{merlin.mbs}[2011/11/18 4.33 (PWD, AO, DPC)]
+ % For use with BibTeX version 0.99a or later
+ %-------------------------------------------------------------------
+ % This bibliography style file is intended for texts in ENGLISH
+ % This is an author-year citation style bibliography. As such, it is
+ % non-standard LaTeX, and requires a special package file to function properly.
+ % Such a package is natbib.sty by Patrick W. Daly
+ % The form of the \bibitem entries is
+ % \bibitem[Jones et al.(1990)]{key}...
+ % \bibitem[Jones et al.(1990)Jones, Baker, and Smith]{key}...
+ % The essential feature is that the label (the part in brackets) consists
+ % of the author names, as they should appear in the citation, with the year
+ % in parentheses following. There must be no space before the opening
+ % parenthesis!
+ % With natbib v5.3, a full list of authors may also follow the year.
+ % In natbib.sty, it is possible to define the type of enclosures that is
+ % really wanted (brackets or parentheses), but in either case, there must
+ % be parentheses in the label.
+ % The \cite command functions as follows:
+ % \citet{key} ==>> Jones et al. (1990)
+ % \citet*{key} ==>> Jones, Baker, and Smith (1990)
+ % \citep{key} ==>> (Jones et al., 1990)
+ % \citep*{key} ==>> (Jones, Baker, and Smith, 1990)
+ % \citep[chap. 2]{key} ==>> (Jones et al., 1990, chap. 2)
+ % \citep[e.g.][]{key} ==>> (e.g. Jones et al., 1990)
+ % \citep[e.g.][p. 32]{key} ==>> (e.g. Jones et al., 1990, p. 32)
+ % \citeauthor{key} ==>> Jones et al.
+ % \citeauthor*{key} ==>> Jones, Baker, and Smith
+ % \citeyear{key} ==>> 1990
+ %---------------------------------------------------------------------
+ %
+ % PW added entries for: binding, category, collator, condition, copy,
+ % foreword, illustrations, introduction,
+ % location, preface,translator, size, value,
+ % volumes,
+
+ENTRY
+ { address
+ author
+ binding
+ booktitle
+ category
+ chapter
+ collator
+ condition
+ copy
+ edition
+ editor
+ eid
+ foreword
+ howpublished
+ illustrations
+ institution
+ introduction
+ isbn
+ journal
+ key
+ location
+ month
+ normal
+ note
+ number
+ organization
+ pages
+ preface
+ publisher
+ school
+ series
+ size
+ title
+ translator
+ type
+ value
+ volume
+ volumes
+ year
+ }
+ {}
+ { label extra.label sort.label short.list }
+INTEGERS { output.state before.all mid.sentence after.sentence after.block }
+FUNCTION {init.state.consts}
+{ #0 'before.all :=
+ #1 'mid.sentence :=
+ #2 'after.sentence :=
+ #3 'after.block :=
+}
+STRINGS { s t}
+FUNCTION {output.nonnull}
+{ 's :=
+ output.state mid.sentence =
+ { ", " * write$ }
+ { output.state after.block =
+ { add.period$ write$
+ newline$
+ "\newblock " write$
+ }
+ { output.state before.all =
+ 'write$
+ { add.period$ " " * write$ }
+ if$
+ }
+ if$
+ mid.sentence 'output.state :=
+ }
+ if$
+ s
+}
+FUNCTION {output}
+{ duplicate$ empty$
+ 'pop$
+ 'output.nonnull
+ if$
+}
+FUNCTION {output.check}
+{ 't :=
+ duplicate$ empty$
+ { pop$ "empty " t * " in " * cite$ * warning$ }
+ 'output.nonnull
+ if$
+}
+FUNCTION {fin.entry}
+{ add.period$
+ write$
+ newline$
+}
+
+FUNCTION {new.block}
+{ output.state before.all =
+ 'skip$
+ { after.block 'output.state := }
+ if$
+}
+FUNCTION {new.sentence}
+{ output.state after.block =
+ 'skip$
+ { output.state before.all =
+ 'skip$
+ { after.sentence 'output.state := }
+ if$
+ }
+ if$
+}
+FUNCTION {add.blank}
+{ " " * before.all 'output.state :=
+}
+
+FUNCTION {date.block}
+{
+ new.block
+}
+
+FUNCTION {not}
+{ { #0 }
+ { #1 }
+ if$
+}
+FUNCTION {and}
+{ 'skip$
+ { pop$ #0 }
+ if$
+}
+FUNCTION {or}
+{ { pop$ #1 }
+ 'skip$
+ if$
+}
+FUNCTION {new.block.checkb}
+{ empty$
+ swap$ empty$
+ and
+ 'skip$
+ 'new.block
+ if$
+}
+FUNCTION {field.or.null}
+{ duplicate$ empty$
+ { pop$ "" }
+ 'skip$
+ if$
+}
+FUNCTION {emphasize}
+{ duplicate$ empty$
+ { pop$ "" }
+ { "\emph{" swap$ * "}" * }
+ if$
+}
+
+%% PW added this for a bold font
+FUNCTION {bold}
+{ duplicate$ empty$
+ { pop$ "" }
+ { "\textbf{" swap$ * "}" * }
+ if$
+}
+%% and this
+FUNCTION {boldcat}
+{ duplicate$ empty$
+ { pop$ "" }
+ { "Category: \textbf{" swap$ * "}" * }
+ if$
+}
+FUNCTION {boldval}
+{ duplicate$ empty$
+ { pop$ "" }
+ { "Value: \textbf{" swap$ * "}" * }
+ if$
+}
+
+FUNCTION {tie.or.space.prefix}
+{ duplicate$ text.length$ #3 <
+ { "~" }
+ { " " }
+ if$
+ swap$
+}
+
+FUNCTION {capitalize}
+{ "u" change.case$ "t" change.case$ }
+
+FUNCTION {space.word}
+{ " " swap$ * " " * }
+ % Here are the language-specific definitions for explicit words.
+ % Each function has a name bbl.xxx where xxx is the English word.
+ % The language selected here is ENGLISH
+FUNCTION {bbl.and}
+{ "and"}
+
+FUNCTION {bbl.etal}
+{ "et~al." }
+
+FUNCTION {bbl.editors}
+{ "eds." }
+
+FUNCTION {bbl.editor}
+{ "ed." }
+
+FUNCTION {bbl.edby}
+{ "edited by" }
+
+FUNCTION {bbl.edition}
+{ "edition" }
+
+FUNCTION {bbl.volume}
+{ "volume" }
+
+FUNCTION {bbl.of}
+{ "of" }
+
+FUNCTION {bbl.number}
+{ "number" }
+
+FUNCTION {bbl.nr}
+{ "no." }
+
+FUNCTION {bbl.in}
+{ "in" }
+
+FUNCTION {bbl.pages}
+{ "pp." }
+
+FUNCTION {bbl.page}
+{ "p." }
+
+FUNCTION {bbl.chapter}
+{ "chapter" }
+
+FUNCTION {bbl.collator}
+{ "collator" }
+
+FUNCTION {bbl.collators}
+{ "collators" }
+
+FUNCTION {bbl.techrep}
+{ "Technical Report" }
+
+FUNCTION {bbl.mthesis}
+{ "Master's thesis" }
+
+FUNCTION {bbl.phdthesis}
+{ "Ph.D. thesis" }
+
+FUNCTION {bbl.translator}
+{ "translator" }
+
+FUNCTION {bbl.translators}
+{ "translators" }
+
+FUNCTION {bbl.foreword}
+{ "foreword by " }
+
+FUNCTION {bbl.introduction}
+{ "introduction by " }
+
+FUNCTION {bbl.preface}
+{ "preface by " }
+
+MACRO {jan} {"January"}
+
+MACRO {feb} {"February"}
+
+MACRO {mar} {"March"}
+
+MACRO {apr} {"April"}
+
+MACRO {may} {"May"}
+
+MACRO {jun} {"June"}
+
+MACRO {jul} {"July"}
+
+MACRO {aug} {"August"}
+
+MACRO {sep} {"September"}
+
+MACRO {oct} {"October"}
+
+MACRO {nov} {"November"}
+
+MACRO {dec} {"December"}
+
+MACRO {acmcs} {"ACM Computing Surveys"}
+
+MACRO {acta} {"Acta Informatica"}
+
+MACRO {cacm} {"Communications of the ACM"}
+
+MACRO {ibmjrd} {"IBM Journal of Research and Development"}
+
+MACRO {ibmsj} {"IBM Systems Journal"}
+
+MACRO {ieeese} {"IEEE Transactions on Software Engineering"}
+
+MACRO {ieeetc} {"IEEE Transactions on Computers"}
+
+MACRO {ieeetcad}
+ {"IEEE Transactions on Computer-Aided Design of Integrated Circuits"}
+
+MACRO {ipl} {"Information Processing Letters"}
+
+MACRO {jacm} {"Journal of the ACM"}
+
+MACRO {jcss} {"Journal of Computer and System Sciences"}
+
+MACRO {scp} {"Science of Computer Programming"}
+
+MACRO {sicomp} {"SIAM Journal on Computing"}
+
+MACRO {tocs} {"ACM Transactions on Computer Systems"}
+
+MACRO {tods} {"ACM Transactions on Database Systems"}
+
+MACRO {tog} {"ACM Transactions on Graphics"}
+
+MACRO {toms} {"ACM Transactions on Mathematical Software"}
+
+MACRO {toois} {"ACM Transactions on Office Information Systems"}
+
+MACRO {toplas} {"ACM Transactions on Programming Languages and Systems"}
+
+MACRO {tcs} {"Theoretical Computer Science"}
+
+%% Publishers
+
+% MACRO {CUP} {"Cambridge University Press"}
+
+% MACRO {OUP} {"Oxford University Press"}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+FUNCTION {bibinfo.check}
+{ swap$
+ duplicate$ missing$
+ {
+ pop$ pop$
+ ""
+ }
+ { duplicate$ empty$
+ {
+ swap$ pop$
+ }
+ { swap$
+ pop$
+ }
+ if$
+ }
+ if$
+}
+FUNCTION {bibinfo.warn}
+{ swap$
+ duplicate$ missing$
+ {
+ swap$ "missing " swap$ * " in " * cite$ * warning$ pop$
+ ""
+ }
+ { duplicate$ empty$
+ {
+ swap$ "empty " swap$ * " in " * cite$ * warning$
+ }
+ { swap$
+ pop$
+ }
+ if$
+ }
+ if$
+}
+INTEGERS { nameptr namesleft numnames }
+
+
+STRINGS { bibinfo}
+
+FUNCTION {format.names}
+{ 'bibinfo :=
+ duplicate$ empty$ 'skip$ {
+ 's :=
+ "" 't :=
+ #1 'nameptr :=
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ { s nameptr
+ "{ff~}{vv~}{ll}{, jj}"
+ format.name$
+ bibinfo bibinfo.check
+ 't :=
+ nameptr #1 >
+ {
+ namesleft #1 >
+ { ", " * t * }
+ {
+ s nameptr "{ll}" format.name$ duplicate$ "others" =
+ { 't := }
+ { pop$ }
+ if$
+ numnames #2 >
+ { "," * }
+ 'skip$
+ if$
+ t "others" =
+ {
+ " " * bbl.etal *
+ }
+ {
+ bbl.and
+ space.word * t *
+ }
+ if$
+ }
+ if$
+ }
+ 't
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+ } if$
+}
+FUNCTION {format.names.ed}
+{
+ format.names
+}
+FUNCTION {format.key}
+{ empty$
+ { key field.or.null }
+ { "" }
+ if$
+}
+
+FUNCTION {format.authors}
+{ author "author" format.names
+}
+FUNCTION {get.bbl.editor}
+{ editor num.names$ #1 > 'bbl.editors 'bbl.editor if$ }
+
+FUNCTION {format.editors}
+{ editor "editor" format.names duplicate$ empty$ 'skip$
+ {
+ " " *
+ get.bbl.editor
+ "(" swap$ * ")" *
+ *
+ }
+ if$
+}
+
+% PW added collator names
+FUNCTION {get.bbl.collator}
+{ collator num.names$ #1 > 'bbl.collators 'bbl.collator if$ }
+
+FUNCTION {format.collator}
+{ collator "collator" format.names duplicate$ empty$ 'skip$
+ {
+ " " *
+ get.bbl.collator
+ "(" swap$ * ")" *
+ *
+ }
+ if$
+}
+
+% PW added translator names
+FUNCTION {get.bbl.translator}
+{ translator num.names$ #1 > 'bbl.translators 'bbl.translator if$ }
+FUNCTION {format.translator}
+{ translator "translator" format.names duplicate$ empty$ 'skip$
+ {
+ " " *
+ get.bbl.translator
+ "(" swap$ * ")" *
+ *
+ }
+ if$
+}
+
+% PW added foreword names
+FUNCTION {get.bbl.foreword}
+{foreword 'bbl.foreword }
+FUNCTION {format.foreword}
+{ foreword "foreword" format.names duplicate$ empty$ 'skip$
+ {
+ "" *
+ bbl.foreword
+ swap$ *
+ }
+ if$
+}
+
+% PW added introduction names
+FUNCTION {get.bbl.introduction}
+{introduction 'bbl.introduction }
+FUNCTION {format.introduction}
+{ introduction "introduction" format.names duplicate$ empty$ 'skip$
+ {
+ "" *
+ bbl.introduction
+ swap$ *
+ }
+ if$
+}
+
+% PW added preface names
+FUNCTION {get.bbl.preface}
+{preface 'bbl.preface }
+FUNCTION {format.preface}
+{ preface "preface" format.names duplicate$ empty$ 'skip$
+ {
+ "" *
+ bbl.preface
+ swap$ *
+ }
+ if$
+}
+
+
+FUNCTION {format.book.pages}
+{ pages "pages" bibinfo.check
+ duplicate$ empty$ 'skip$
+ { " " * bbl.pages * }
+ if$
+}
+FUNCTION {format.isbn}
+{ isbn "isbn" bibinfo.check
+ duplicate$ empty$ 'skip$
+ {
+ new.block
+ "ISBN " swap$ *
+ }
+ if$
+}
+
+FUNCTION {format.note}
+{
+ note empty$
+ { "" }
+ { note #1 #1 substring$
+ duplicate$ "{" =
+ 'skip$
+ { output.state mid.sentence =
+ { "l" }
+ { "u" }
+ if$
+ change.case$
+ }
+ if$
+ note #2 global.max$ substring$ * "note" bibinfo.check
+ }
+ if$
+}
+
+FUNCTION {format.title}
+{ title
+ "title" bibinfo.check
+ duplicate$ empty$ 'skip$
+ {
+ emphasize
+ }
+ if$
+}
+FUNCTION {format.full.names}
+{'s :=
+ "" 't :=
+ #1 'nameptr :=
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ { s nameptr
+ "{vv~}{ll}" format.name$
+ 't :=
+ nameptr #1 >
+ {
+ namesleft #1 >
+ { ", " * t * }
+ {
+ s nameptr "{ll}" format.name$ duplicate$ "others" =
+ { 't := }
+ { pop$ }
+ if$
+ t "others" =
+ {
+ " " * bbl.etal *
+ }
+ {
+ numnames #2 >
+ { "," * }
+ 'skip$
+ if$
+ bbl.and
+ space.word * t *
+ }
+ if$
+ }
+ if$
+ }
+ 't
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+}
+
+FUNCTION {author.editor.key.full}
+{ author empty$
+ { editor empty$
+ { key empty$
+ { cite$ #1 #3 substring$ }
+ 'key
+ if$
+ }
+ { editor format.full.names }
+ if$
+ }
+ { author format.full.names }
+ if$
+}
+
+FUNCTION {author.key.full}
+{ author empty$
+ { key empty$
+ { cite$ #1 #3 substring$ }
+ 'key
+ if$
+ }
+ { author format.full.names }
+ if$
+}
+
+FUNCTION {editor.key.full}
+{ editor empty$
+ { key empty$
+ { cite$ #1 #3 substring$ }
+ 'key
+ if$
+ }
+ { editor format.full.names }
+ if$
+}
+
+FUNCTION {make.full.names}
+{ type$ "book" =
+ type$ "inbook" =
+ or
+ 'author.editor.key.full
+ { type$ "proceedings" =
+ 'editor.key.full
+ 'author.key.full
+ if$
+ }
+ if$
+}
+
+FUNCTION {output.bibitem}
+{ newline$
+ "\bibitem[{" write$
+ label write$
+ ")" make.full.names duplicate$ short.list =
+ { pop$ }
+ { * }
+ if$
+ "}]{" * write$
+ cite$ write$
+ "}" write$
+ newline$
+ ""
+ before.all 'output.state :=
+}
+
+FUNCTION {n.dashify}
+{
+ 't :=
+ ""
+ { t empty$ not }
+ { t #1 #1 substring$ "-" =
+ { t #1 #2 substring$ "--" = not
+ { "--" *
+ t #2 global.max$ substring$ 't :=
+ }
+ { { t #1 #1 substring$ "-" = }
+ { "-" *
+ t #2 global.max$ substring$ 't :=
+ }
+ while$
+ }
+ if$
+ }
+ { t #1 #1 substring$ *
+ t #2 global.max$ substring$ 't :=
+ }
+ if$
+ }
+ while$
+}
+
+FUNCTION {word.in}
+{ bbl.in capitalize
+ " " * }
+
+FUNCTION {format.date}
+{ year "year" bibinfo.check duplicate$ empty$
+ {
+ "empty year in " cite$ * "; set to ????" * warning$
+ pop$ "????"
+ }
+ 'skip$
+ if$
+ extra.label *
+ before.all 'output.state :=
+ ", " swap$ *
+}
+FUNCTION {format.btitle}
+{ title "title" bibinfo.check
+ duplicate$ empty$ 'skip$
+ {
+ emphasize
+ }
+ if$
+}
+FUNCTION {either.or.check}
+{ empty$
+ 'pop$
+ { "can't use both " swap$ * " fields in " * cite$ * warning$ }
+ if$
+}
+FUNCTION {format.bvolume}
+{ volume empty$
+ { "" }
+ { bbl.volume volume tie.or.space.prefix
+ "volume" bibinfo.check * *
+ series "series" bibinfo.check
+ duplicate$ empty$ 'pop$
+ { swap$ bbl.of space.word * swap$
+ emphasize * }
+ if$
+ "volume and number" number either.or.check
+ }
+ if$
+}
+FUNCTION {format.number.series}
+{ volume empty$
+ { number empty$
+ { series field.or.null }
+ { series empty$
+ { number "number" bibinfo.check }
+ { output.state mid.sentence =
+ { bbl.number }
+ { bbl.number capitalize }
+ if$
+ number tie.or.space.prefix "number" bibinfo.check * *
+ bbl.in space.word *
+ series "series" bibinfo.check *
+ }
+ if$
+ }
+ if$
+ }
+ { "" }
+ if$
+}
+
+FUNCTION {format.edition}
+{ edition duplicate$ empty$ 'skip$
+ {
+ output.state mid.sentence =
+ { "l" }
+ { "t" }
+ if$ change.case$
+ "edition" bibinfo.check
+ " " * bbl.edition *
+ }
+ if$
+}
+INTEGERS { multiresult }
+FUNCTION {multi.page.check}
+{ 't :=
+ #0 'multiresult :=
+ { multiresult not
+ t empty$ not
+ and
+ }
+ { t #1 #1 substring$
+ duplicate$ "-" =
+ swap$ duplicate$ "," =
+ swap$ "+" =
+ or or
+ { #1 'multiresult := }
+ { t #2 global.max$ substring$ 't := }
+ if$
+ }
+ while$
+ multiresult
+}
+FUNCTION {format.pages}
+{ pages duplicate$ empty$ 'skip$
+ { duplicate$ multi.page.check
+ {
+ bbl.pages swap$
+ n.dashify
+ }
+ {
+ bbl.page swap$
+ }
+ if$
+ tie.or.space.prefix
+ "pages" bibinfo.check
+ * *
+ }
+ if$
+}
+FUNCTION {format.journal.pages}
+{ pages duplicate$ empty$ 'pop$
+ { swap$ duplicate$ empty$
+ { pop$ pop$ format.pages }
+ {
+ ":" *
+ swap$
+ n.dashify
+ "pages" bibinfo.check
+ *
+ }
+ if$
+ }
+ if$
+}
+FUNCTION {format.journal.eid}
+{ eid "eid" bibinfo.check
+ duplicate$ empty$ 'pop$
+ { swap$ duplicate$ empty$ 'skip$
+ {
+ ":" *
+ }
+ if$
+ swap$ *
+ }
+ if$
+}
+FUNCTION {format.vol.num.pages}
+{ volume field.or.null
+ duplicate$ empty$ 'skip$
+ {
+ "volume" bibinfo.check
+ }
+ if$
+ number "number" bibinfo.check duplicate$ empty$ 'skip$
+ {
+ swap$ duplicate$ empty$
+ { "there's a number but no volume in " cite$ * warning$ }
+ 'skip$
+ if$
+ swap$
+ "(" swap$ * ")" *
+ }
+ if$ *
+ eid empty$
+ { format.journal.pages }
+ { format.journal.eid }
+ if$
+}
+
+FUNCTION {format.chapter.pages}
+{ chapter empty$
+ 'format.pages
+ { type empty$
+ { bbl.chapter }
+ { type "l" change.case$
+ "type" bibinfo.check
+ }
+ if$
+ chapter tie.or.space.prefix
+ "chapter" bibinfo.check
+ * *
+ pages empty$
+ 'skip$
+ { ", " * format.pages * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.booktitle}
+{
+ booktitle "booktitle" bibinfo.check
+ emphasize
+}
+FUNCTION {format.in.ed.booktitle}
+{ format.booktitle duplicate$ empty$ 'skip$
+ {
+ editor "editor" format.names.ed duplicate$ empty$ 'pop$
+ {
+ " " *
+ get.bbl.editor
+ "(" swap$ * ") " *
+ * swap$
+ * }
+ if$
+ word.in swap$ *
+ }
+ if$
+}
+FUNCTION {format.thesis.type}
+{ type duplicate$ empty$
+ 'pop$
+ { swap$ pop$
+ "t" change.case$ "type" bibinfo.check
+ }
+ if$
+}
+FUNCTION {format.tr.number}
+{ number "number" bibinfo.check
+ type duplicate$ empty$
+ { pop$ bbl.techrep }
+ 'skip$
+ if$
+ "type" bibinfo.check
+ swap$ duplicate$ empty$
+ { pop$ "t" change.case$ }
+ { tie.or.space.prefix * * }
+ if$
+}
+FUNCTION {format.article.crossref}
+{
+ word.in
+ " \cite{" * crossref * "}" *
+}
+FUNCTION {format.book.crossref}
+{ volume duplicate$ empty$
+ { "empty volume in " cite$ * "'s crossref of " * crossref * warning$
+ pop$ word.in
+ }
+ { bbl.volume
+ capitalize
+ swap$ tie.or.space.prefix "volume" bibinfo.check * * bbl.of space.word *
+ }
+ if$
+ " \cite{" * crossref * "}" *
+}
+FUNCTION {format.incoll.inproc.crossref}
+{
+ word.in
+ " \cite{" * crossref * "}" *
+}
+FUNCTION {format.org.or.pub}
+{ 't :=
+ ""
+ add.blank "(" *
+ t empty$
+ { address "address" bibinfo.check *
+ }
+ { t *
+ address empty$
+ 'skip$
+ { ", " * address "address" bibinfo.check * }
+ if$
+ }
+ if$
+ year duplicate$ empty$
+ { "empty year in " cite$ * "; set to ????" * warning$
+ pop$ "????" }
+ { "year" bibinfo.check extra.label * }
+ if$
+ t empty$ address empty$ and
+ { * }
+ { ", " swap$ * * }
+ if$
+ ")" *
+}
+FUNCTION {format.publisher.address}
+{ publisher "publisher" bibinfo.warn format.org.or.pub
+}
+
+FUNCTION {format.organization.address}
+{ organization "organization" bibinfo.check format.org.or.pub
+}
+
+ %----------------------------------------------------------------
+ % PW formatting added entry types
+
+FUNCTION {format.binding}
+{ binding "binding" bibinfo.check
+ duplicate$ empty$ 'skip$
+ {
+ new.block
+ "Binding: " swap$ *
+ }
+ if$
+}
+
+FUNCTION {format.category}
+{ category "category" bibinfo.check
+ duplicate$ empty$ 'skip$
+ {
+ new.block
+ boldcat
+ }
+ if$
+}
+
+
+FUNCTION {format.condition}
+{ condition "condition" bibinfo.check
+ duplicate$ empty$ 'skip$
+ { new.block
+ "Condition: " swap$ *
+ }
+ if$
+}
+
+FUNCTION {format.copy}
+{ copy "copy" bibinfo.check
+ duplicate$ empty$ 'skip$
+ {
+ new.block
+ "Copy: " swap$ *
+ }
+ if$
+}
+
+FUNCTION {format.illustrations}
+{ illustrations "illustrations" bibinfo.check
+ duplicate$ empty$ 'skip$
+ {
+ new.block
+ "Illustrations: " swap$ *
+ }
+ if$
+}
+
+FUNCTION {format.location}
+{ location "location" bibinfo.check
+ duplicate$ empty$ 'skip$
+ {
+ new.block
+ "Location: " swap$ *
+ }
+ if$
+}
+
+FUNCTION {format.size}
+{ size "size" bibinfo.check
+ duplicate$ empty$ 'skip$
+ {
+ new.block
+ "Size: " swap$ *
+ }
+ if$
+}
+
+FUNCTION {format.value}
+{ value "value" bibinfo.check
+ duplicate$ empty$ 'skip$
+ {
+ new.block
+ boldval
+ }
+ if$
+}
+
+FUNCTION {format.volumes}
+{ volumes "volumes" bibinfo.check
+ duplicate$ empty$ 'skip$
+ {
+ new.block
+ "Volumes: " swap$ *
+ }
+ if$
+}
+
+ %-----------------------------------------------------------------
+
+FUNCTION {article}
+{ output.bibitem
+ format.authors "author" output.check
+ author format.key output
+ new.block
+ format.title "title" output.check
+ new.block
+ crossref missing$
+ {
+ journal
+ "journal" bibinfo.check
+ emphasize
+ "journal" output.check
+ format.vol.num.pages output
+ }
+ { format.article.crossref output.nonnull
+ format.pages output
+ }
+ if$
+ new.block
+ format.note output
+ new.block
+ format.date "year" output.check
+ fin.entry
+}
+
+% ---------------------------------------------------------
+% PW extended the book entry
+
+FUNCTION {book}
+{ output.bibitem
+ author empty$
+ { format.editors "author and editor" output.check
+ editor format.key output
+ add.blank
+ }
+ { format.authors output.nonnull
+ crossref missing$
+ { "author and editor" editor either.or.check }
+ 'skip$
+ if$
+ }
+ if$
+ new.block
+ format.btitle "title" output.check
+ format.editors output
+ format.collator output
+ format.translator output
+ format.foreword output
+ format.preface output
+ format.introduction output
+ crossref missing$
+ { format.bvolume output
+ new.block
+ format.number.series output
+ new.sentence
+ format.publisher.address output
+ }
+ {
+ new.block
+ format.book.crossref output.nonnull
+ }
+ if$
+ format.book.pages output
+ format.edition output
+ format.isbn output
+ format.volumes output
+ format.illustrations output
+ format.binding output
+ format.size output
+ new.block
+ format.note output
+ new.block
+ format.condition output
+ format.copy output
+ format.location output
+ format.category output
+ format.value output
+ fin.entry
+}
+
+% --------------------------------------------------------
+
+FUNCTION {booklet}
+{ output.bibitem
+ format.authors output
+ author format.key output
+ new.block
+ format.title "title" output.check
+ new.block
+ howpublished "howpublished" bibinfo.check output
+ address "address" bibinfo.check output
+ format.isbn output
+ format.book.pages output
+ new.block
+ format.note output
+ new.block
+ format.date "year" output.check
+ fin.entry
+}
+
+FUNCTION {inbook}
+{ output.bibitem
+ author empty$
+ { format.editors "author and editor" output.check
+ editor format.key output
+ }
+ { format.authors output.nonnull
+ crossref missing$
+ { "author and editor" editor either.or.check }
+ 'skip$
+ if$
+ }
+ if$
+ new.block
+ format.btitle "title" output.check
+ crossref missing$
+ {
+ format.bvolume output
+ format.chapter.pages "chapter and pages" output.check
+ new.block
+ format.number.series output
+ new.sentence
+ format.publisher.address output
+ }
+ {
+ format.chapter.pages "chapter and pages" output.check
+ new.block
+ format.book.crossref output.nonnull
+ }
+ if$
+ format.edition output
+ crossref missing$
+ { format.isbn output }
+ 'skip$
+ if$
+ new.block
+ format.note output
+ fin.entry
+}
+
+FUNCTION {incollection}
+{ output.bibitem
+ format.authors "author" output.check
+ author format.key output
+ new.block
+ format.title "title" output.check
+ new.block
+ crossref missing$
+ { format.in.ed.booktitle "booktitle" output.check
+ format.bvolume output
+ format.number.series output
+ format.chapter.pages output
+ new.sentence
+ format.publisher.address output
+ format.edition output
+ format.isbn output
+ }
+ { format.incoll.inproc.crossref output.nonnull
+ format.chapter.pages output
+ }
+ if$
+ new.block
+ format.note output
+ fin.entry
+}
+FUNCTION {inproceedings}
+{ output.bibitem
+ format.authors "author" output.check
+ author format.key output
+ new.block
+ format.title "title" output.check
+ new.block
+ crossref missing$
+ { format.in.ed.booktitle "booktitle" output.check
+ format.bvolume output
+ format.number.series output
+ format.pages output
+ new.sentence
+ publisher empty$
+ { format.organization.address output }
+ { organization "organization" bibinfo.check output
+ format.publisher.address output
+ }
+ if$
+ format.isbn output
+ }
+ { format.incoll.inproc.crossref output.nonnull
+ format.pages output
+ }
+ if$
+ new.block
+ format.note output
+ fin.entry
+}
+FUNCTION {conference} { inproceedings }
+FUNCTION {manual}
+{ output.bibitem
+ format.authors output
+ author format.key output
+ new.block
+ format.btitle "title" output.check
+ organization address new.block.checkb
+ organization "organization" bibinfo.check output
+ address "address" bibinfo.check output
+ format.edition output
+ new.block
+ format.note output
+ new.block
+ format.date "year" output.check
+ fin.entry
+}
+
+FUNCTION {mastersthesis}
+{ output.bibitem
+ format.authors "author" output.check
+ author format.key output
+ new.block
+ format.btitle
+ "title" output.check
+ new.block
+ bbl.mthesis format.thesis.type output.nonnull
+ school "school" bibinfo.warn output
+ address "address" bibinfo.check output
+ new.block
+ format.note output
+ new.block
+ format.date "year" output.check
+ fin.entry
+}
+
+FUNCTION {misc}
+{ output.bibitem
+ format.authors output
+ author format.key output
+ new.block
+ format.title output
+ new.block
+ howpublished "howpublished" bibinfo.check output
+ new.block
+ format.note output
+ new.block
+ format.date "year" output.check
+ fin.entry
+}
+
+FUNCTION {heading}
+{ output.bibitem
+ format.authors output
+ author format.key output
+ new.block
+ format.note output
+ fin.entry
+}
+
+
+
+FUNCTION {phdthesis}
+{ output.bibitem
+ format.authors "author" output.check
+ author format.key output
+ new.block
+ format.btitle
+ "title" output.check
+ new.block
+ bbl.phdthesis format.thesis.type output.nonnull
+ school "school" bibinfo.warn output
+ address "address" bibinfo.check output
+ new.block
+ format.note output
+ new.block
+ format.date "year" output.check
+ fin.entry
+}
+
+FUNCTION {proceedings}
+{ output.bibitem
+ format.editors output
+ editor format.key output
+ new.block
+ format.btitle "title" output.check
+ format.bvolume output
+ format.number.series output
+ new.sentence
+ publisher empty$
+ { format.organization.address output }
+ { organization "organization" bibinfo.check output
+ format.publisher.address output
+ }
+ if$
+ format.isbn output
+ new.block
+ format.note output
+ fin.entry
+}
+
+FUNCTION {techreport}
+{ output.bibitem
+ format.authors "author" output.check
+ author format.key output
+ new.block
+ format.title
+ "title" output.check
+ new.block
+ format.tr.number output.nonnull
+ institution "institution" bibinfo.warn output
+ address "address" bibinfo.check output
+ new.block
+ format.note output
+ new.block
+ format.date "year" output.check
+ fin.entry
+}
+
+FUNCTION {unpublished}
+{ output.bibitem
+ format.authors "author" output.check
+ author format.key output
+ new.block
+ format.title "title" output.check
+ new.block
+ format.note "note" output.check
+ new.block
+ format.date output
+ fin.entry
+}
+
+FUNCTION {default.type} { misc }
+READ
+FUNCTION {sortify}
+{ purify$
+ "l" change.case$
+}
+INTEGERS { len }
+FUNCTION {chop.word}
+{ 's :=
+ 'len :=
+ s #1 len substring$ =
+ { s len #1 + global.max$ substring$ }
+ 's
+ if$
+}
+FUNCTION {format.lab.names}
+{ 's :=
+ "" 't :=
+ s #1 "{vv~}{ll}" format.name$
+ s num.names$ duplicate$
+ #2 >
+ { pop$
+ " " * bbl.etal *
+ }
+ { #2 <
+ 'skip$
+ { s #2 "{ff }{vv }{ll}{ jj}" format.name$ "others" =
+ {
+ " " * bbl.etal *
+ }
+ { bbl.and space.word * s #2 "{vv~}{ll}" format.name$
+ * }
+ if$
+ }
+ if$
+ }
+ if$
+}
+
+FUNCTION {author.key.label}
+{ author empty$
+ { key empty$
+ { cite$ #1 #3 substring$ }
+ 'key
+ if$
+ }
+ { author format.lab.names }
+ if$
+}
+
+FUNCTION {author.editor.key.label}
+{ author empty$
+ { editor empty$
+ { key empty$
+ { cite$ #1 #3 substring$ }
+ 'key
+ if$
+ }
+ { editor format.lab.names }
+ if$
+ }
+ { author format.lab.names }
+ if$
+}
+
+FUNCTION {editor.key.label}
+{ editor empty$
+ { key empty$
+ { cite$ #1 #3 substring$ }
+ 'key
+ if$
+ }
+ { editor format.lab.names }
+ if$
+}
+
+FUNCTION {calc.short.authors}
+{ type$ "book" =
+ type$ "inbook" =
+ or
+ 'author.editor.key.label
+ { type$ "proceedings" =
+ 'editor.key.label
+ 'author.key.label
+ if$
+ }
+ if$
+ 'short.list :=
+}
+
+FUNCTION {calc.label}
+{ calc.short.authors
+ short.list
+ "("
+ *
+ year duplicate$ empty$
+ short.list key field.or.null = or
+ { pop$ "" }
+ 'skip$
+ if$
+ *
+ 'label :=
+}
+
+FUNCTION {sort.format.names}
+{ 's :=
+ #1 'nameptr :=
+ ""
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ { s nameptr
+ "{vv{ } }{ll{ }}{ ff{ }}{ jj{ }}"
+ format.name$ 't :=
+ nameptr #1 >
+ {
+ " " *
+ namesleft #1 = t "others" = and
+ { "zzzzz" 't := }
+ 'skip$
+ if$
+ t sortify *
+ }
+ { t sortify * }
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+}
+
+FUNCTION {sort.format.title}
+{ 't :=
+ "A " #2
+ "An " #3
+ "The " #4 t chop.word
+ chop.word
+ chop.word
+ sortify
+ #1 global.max$ substring$
+}
+FUNCTION {author.sort}
+{ author empty$
+ { key empty$
+ { "to sort, need author or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { author sort.format.names }
+ if$
+}
+FUNCTION {author.editor.sort}
+{ author empty$
+ { editor empty$
+ { key empty$
+ { "to sort, need author, editor, or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { editor sort.format.names }
+ if$
+ }
+ { author sort.format.names }
+ if$
+}
+FUNCTION {editor.sort}
+{ editor empty$
+ { key empty$
+ { "to sort, need editor or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { editor sort.format.names }
+ if$
+}
+FUNCTION {presort}
+{ calc.label
+ label sortify
+ " "
+ *
+ type$ "book" =
+ type$ "inbook" =
+ or
+ 'author.editor.sort
+ { type$ "proceedings" =
+ 'editor.sort
+ 'author.sort
+ if$
+ }
+ if$
+ #1 entry.max$ substring$
+ 'sort.label :=
+ sort.label
+ *
+ " "
+ *
+ title field.or.null
+ sort.format.title
+ *
+ #1 entry.max$ substring$
+ 'sort.key$ :=
+}
+
+ITERATE {presort}
+SORT
+STRINGS { last.label next.extra }
+INTEGERS { last.extra.num last.extra.num.extended last.extra.num.blank number.label }
+FUNCTION {initialize.extra.label.stuff}
+{ #0 int.to.chr$ 'last.label :=
+ "" 'next.extra :=
+ #0 'last.extra.num :=
+ "a" chr.to.int$ #1 - 'last.extra.num.blank :=
+ last.extra.num.blank 'last.extra.num.extended :=
+ #0 'number.label :=
+}
+FUNCTION {forward.pass}
+{ last.label label =
+ { last.extra.num #1 + 'last.extra.num :=
+ last.extra.num "z" chr.to.int$ >
+ { "a" chr.to.int$ 'last.extra.num :=
+ last.extra.num.extended #1 + 'last.extra.num.extended :=
+ }
+ 'skip$
+ if$
+ last.extra.num.extended last.extra.num.blank >
+ { last.extra.num.extended int.to.chr$
+ last.extra.num int.to.chr$
+ * 'extra.label := }
+ { last.extra.num int.to.chr$ 'extra.label := }
+ if$
+ }
+ { "a" chr.to.int$ 'last.extra.num :=
+ "" 'extra.label :=
+ label 'last.label :=
+ }
+ if$
+ number.label #1 + 'number.label :=
+}
+FUNCTION {reverse.pass}
+{ next.extra "b" =
+ { "a" 'extra.label := }
+ 'skip$
+ if$
+ extra.label 'next.extra :=
+ extra.label
+ duplicate$ empty$
+ 'skip$
+ { "{\natexlab{" swap$ * "}}" * }
+ if$
+ 'extra.label :=
+ label extra.label * 'label :=
+}
+EXECUTE {initialize.extra.label.stuff}
+ITERATE {forward.pass}
+REVERSE {reverse.pass}
+FUNCTION {bib.sort.order}
+{ sort.label
+ " "
+ *
+ year field.or.null sortify
+ *
+ " "
+ *
+ title field.or.null
+ sort.format.title
+ *
+ #1 entry.max$ substring$
+ 'sort.key$ :=
+}
+ITERATE {bib.sort.order}
+SORT
+FUNCTION {begin.bib}
+{ preamble$ empty$
+ 'skip$
+ { preamble$ write$ newline$ }
+ if$
+ "\begin{thebibliography}{" number.label int.to.str$ * "}" *
+ write$ newline$
+ "\providecommand{\natexlab}[1]{#1}"
+ write$ newline$
+}
+EXECUTE {begin.bib}
+EXECUTE {init.state.consts}
+ITERATE {call.type$}
+FUNCTION {end.bib}
+{ newline$
+ "\end{thebibliography}" write$ newline$
+}
+EXECUTE {end.bib}
+%% End of customized bst file
+%%
+%% End of file `bookdb.bst'.
diff --git a/biblio/bibtex/contrib/bookdb/bookdb.pdf b/biblio/bibtex/contrib/bookdb/bookdb.pdf
new file mode 100644
index 0000000000..7d24865f8a
--- /dev/null
+++ b/biblio/bibtex/contrib/bookdb/bookdb.pdf
Binary files differ
diff --git a/biblio/bibtex/contrib/bookdb/bookdb.tex b/biblio/bibtex/contrib/bookdb/bookdb.tex
new file mode 100644
index 0000000000..1775619aa6
--- /dev/null
+++ b/biblio/bibtex/contrib/bookdb/bookdb.tex
@@ -0,0 +1,530 @@
+% bookdb.tex User manual for the bookdb.bst package
+\begin{filecontents}{bookdb.bib}
+
+@misc{DALY,
+ author = {Patrick W. Daly},
+ title = {Customizing Bibliograhic Style Files},
+ note = "\url{http://mirror.ctan.org/macros/latex/contrib/custom-bib/makebst.pdf}",
+ month = aug,
+ year = 2003
+}
+
+@misc{NATBIB,
+ author = {Patrick W. Daly},
+ title = {Natural Sciences Citations and References},
+ note = "\url{http://mirror.ctan.org/macros/latex/contrib/natbib/natbib.pdf}",
+ month = sep,
+ year = 2010
+}
+
+@misc{LEHMAN,
+ author = {Philipp Lehman},
+ title = {The biblatex package},
+ note = "\url{http://mirror.ctan.org/macros/latex/contrib/biblatex/doc/biblatex.pdf}",
+ month = jul,
+ year = 2009
+}
+
+@misc{MARKEY,
+ author = {Nicolas Markey},
+ title = {Tame the BeaST},
+ note = "\url{http://mirror.ctan.org/info/bibtex/tamethebeast/ttb_en.pdf}",
+ month = oct,
+ year = 2009
+}
+
+@misc{PATASHNIK,
+ author = {Oren Patashnik},
+ title = {Designing BibTeX Styles},
+ note = "\url{http://mirror.ctan.org/biblio/bibtex/base/btxhak.pdf}",
+ month = feb,
+ year = 1988
+}
+
+\end{filecontents}
+
+\documentclass{article}
+\fontencoding{T1}
+\usepackage{booktabs}
+%\usepackage{natbib}
+
+\bibliographystyle{plain}
+\usepackage{url}
+\usepackage{alltt}
+\usepackage{lmodern}
+\usepackage{comment}
+
+\addtolength{\topmargin}{-1in}
+\addtolength{\textheight}{2in}
+\addtolength{\oddsidemargin}{-0.75in}
+\addtolength{\textwidth}{1.5in}
+\addtolength{\evensidemargin}{-0.75in}
+
+\newenvironment{ttdesc}[1]
+ {\begin{list}{}%
+ {\renewcommand{\makelabel}[1]{\texttt{##1:}\hfil}%
+ \settowidth{\labelwidth}{\makelabel{#1}}%
+ \setlength{\leftmargin}{\labelwidth}%
+ \addtolength{\leftmargin}{\labelsep}}}%
+ {\end{list}}
+
+\newcommand{\BibTeX}{\texttt{BibTeX}}
+\newcommand{\file}[1]{\texttt{#1}}
+\newcommand{\field}[1]{\texttt{#1}}
+\newcommand{\pack}[1]{\texttt{#1}}
+
+\title{\texttt{bookdb.bst} --- A Personal Book Catalogue}
+\author{Peter Wilson}
+\date{4 June 2015}
+
+\begin{document}
+\maketitle
+
+\section{Introduction}
+
+For many years I have been collecting books. They are located in five rooms, as well as
+two bookcases in my printing and binding workshop. But recently I found that I was buying
+books that I already had. I decided that the best way to save money was to catalogue all
+the books that I owned and where they were kept.
+
+I searched on the web for free database programs that would be appropriate. There were only
+a few that would run under Linux, which is the operating system I am most comfortable with.
+Of those, some I could not install, and the one that I could I couldn't get to work
+for me.
+
+I contacted several booksellers that I
+dealt with and asked them what they used for catalogueing their stock. They all replied
+but most used proprietry and expensive software that included things like preparing
+invoices that were
+irrelevant as far as I was concerned. The two responses that grabbed my attention were
+`use a card index' (but I needed space for books, not card indexes) and `try Bibtex',
+which immediately appealed as I had used it for many years; why I hadn't thought of it myself
+I'll never know.
+
+\section{Usage}
+
+The standard \BibTeX\ enries did not meet my needs so I looked at
+\pack{biblatex}~\cite{LEHMAN}
+but its entries also didn't match my requirements so I decided to tweak \BibTeX.
+To that end I used Patrick Daly's \texttt{makebst} program~\cite{DALY}
+for generating a \file{*.bst}
+file that went someway towards meeting my needs. This required some hand-coded additions
+later; I read the articles by Oren Patashnik~\cite{PATASHNIK}, the creator of \BibTeX,
+and Nicolas Markey~\cite{MARKEY} which helped me on my way.
+In the end I had a \BibTeX\ file called \file{bookdb.bst} that included all the
+regular entries but a greatly expanded \texttt{book} entry, as follows:
+
+\vspace{0.5\baselineskip}
+\noindent \begin{tabular}{lp{0.9\textwidth}} \toprule
+\texttt{book} & A book with a publisher \\
+ & \textit{Required:} \texttt{author} or {editor}, \texttt{title, publisher, year} \\
+ & \textit{Optional:} \texttt{volume} or \texttt{number, series, address, edition,
+ month, note, collator, foreword, preface, introduction, volumes, pages, illustrations,
+ binding, size, condition, copy, location, category, value} \\ \bottomrule
+\end{tabular}
+\vspace{0.2\baselineskip}
+
+And also I created a new entry called \texttt{heading}, as follows:
+
+\vspace{0.5\baselineskip}
+\noindent \begin{tabular}{lp{0.87\textwidth}} \toprule
+\texttt{heading} & A heading in the bibliography \\
+ & \textit{Required:} \texttt{key} \\
+ & \textit{Optional:} \texttt{note} \\ \bottomrule
+\end{tabular}
+\vspace{0.5\baselineskip}
+
+The additional fields in the \texttt{book} entry are:
+\begin{ttdesc}{condition}
+\item[binding] Information about the book's binding. Output as: \\
+ Binding: `binding.'
+\item[category] The general theme of the book. Output as: \\
+ Category: `\textbf{category.}'
+\item[collator] The name(s) of those who collated the book contents. Output as: \\
+ `collator' (collator(s))
+\item[condition] The book's condition. Output as: \\
+ Condition: `condition.'
+\item[copy] For a limited edition, the particular copy. Output as: \\
+ Copy: `copy.'
+\item[foreword] The name(s) of the author(s) of the Foreword, if not written by the
+ author(s) of the main text. Output as: \\
+ foreword by `foreword'
+\item[illustrations] \mbox{} \\ Information about the number and kind of any illustrations and
+ possibly who created them. Output as: \\
+ Illustrations: `illustrations.'
+\item[introduction] \mbox{} \\ The name(s) of the author(s) of the book's Introduction, if not
+ written by the author(s) of the main text. Output as: \\
+ introduction by `introduction'
+\item[location] Where the book is located. Output as: \\
+ Location: `location.'
+\item[pages] The total number of pages. Output as: \\
+ `pages' pp.,
+\item[preface] The name(s) of the author(s) of the Preface, if not written by the
+ author(s) of the main text. Output as: \\
+ preface by `preface'
+\item[size] The book's physical dimensions. Output as: \\
+ Size: `size.'
+\item[value] The book's value. Output as: \\
+ Value: `\textbf{value}.'
+\item[volumes] The number of volumes. Output as: \\
+ Volumes: `volumes.'
+\end{ttdesc}
+
+I use the \texttt{heading} entry for putting a heading or division marker into
+a bibliography. The \field{key} is required so that the \texttt{heading} is sorted
+into the correct position in the bibliography (normally sorting is based on the author
+or editor). The contents of the \field{note}
+form the printed heading. For instance if you wanted a heading before each alphabetical
+group of authors you could do something like:
+\begin{verbatim}
+@heading{A1,
+ key = {A1},
+ note = {\ahead{AAAAAAAA...}}
+}
+@heading{B1,
+ key ={B1},
+ note = {\ahead{BBBBBBBB...}}
+}
+etc
+\end{verbatim}
+where \verb!\ahead! might be defined as:
+\begin{verbatim}
+\providecommand{\ahead}[1]{%
+ \textbf{\large #1}}
+\end{verbatim}
+
+To help clarify matters Figure~\ref{fig:data} shows a possible entry in a
+\file{*.bib} file. The output after processing in a document using
+\file{bookdb.bst} is illustrated in Figure~\ref{fig:result}.
+
+%\noindent
+\begin{figure}
+\centering
+\begin{minipage}{0.75\columnwidth}
+\rule{0.75\columnwidth}{0.4pt}
+\begin{verbatim}
+@book{ABOOK,
+ author = {A. N. Author and A. Nother},
+ title = {A Book Entry},
+ editor = {Smith and Jones},
+ collator = {Jane and Tim},
+ translator = {Jo and Mary},
+ foreword = {Alpha},
+ preface = {Zoe},
+ introduction = {Bloggs and Friend},
+ volume = 7,
+ publisher = {Herries Press},
+ year = 2020,
+ pages = {xii + 278 + vi},
+ edition = {Third},
+ isbn = {0-201-36299-8},
+ volumes = 9,
+ illustrations = {11 wood engravings},
+ binding = {full red leather},
+ size = {11 by 17 inches},
+ note = {This is a note},
+ condition = {Hot off the press},
+ copy = {23 of 125},
+ location = {my study},
+ category = {private press},
+ value = {\$270}
+}
+\end{verbatim}
+\rule{0.75\columnwidth}{0.4pt}
+\end{minipage}
+\caption{An example entry for \texttt{bookdb} processing} \label{fig:data}
+\end{figure}
+
+\begin{figure}
+\rule{\textwidth}{0.4pt} \par
+\hangindent=1.5em\hangafter=1
+\noindent A. N. Author and A. Nother. \textit{A Book Entry}, Smith and Jones (eds.),
+ Jane and Tim (collators), Jo and Mary (translators), foreword by Alpha,
+ preface by Zoe, introduction by
+ Bloggs and Friend, volume 7 (Herries Press, 2020), xii + 278 + vi pp.,
+ third edition. ISBN 0-201-36299-8. Volumes: 9. Illustrations: 11 wood
+ engravings. Binding: full red leather.
+ Size: 11 by 17 inches. This is a note. Condition: Hot off the press.
+ Copy: 23 of 125. Location: my study. Category: \textbf{private press}.
+ Value: \textbf{\$270}. \par
+\noindent\rule{\textwidth}{0.4pt}
+\caption{The example's output} \label{fig:result}
+\end{figure}
+
+\clearpage
+
+As an example this is a file that I use for printing a catalogue of my books,
+where the book details are in file \file{mybooks.bib}. Note that using
+\pack{bookdb} requires the use of the \pack{natbib} package ~\cite{NATBIB}.
+\begin{verbatim}
+% books.tex a catalogue of my books
+\documentclass[11pt,a4paper]{memoir}
+\usepackage[T1]{fontenc}
+\usepackage{natbib}
+\pagestyle{empty}
+\begin{document}
+\nocite{*}
+\bibliographystyle{bookdb}
+\bibliography{mybooks}
+\end{document}
+\end{verbatim}
+
+
+\begin{comment}
+\section{Implementation}
+
+As I said earlier I had to extend the \file{bookdb.bst} file produced by
+the \texttt{makebst} program. I didn't really know how it all worked but after
+much trial and many errors I got something that on the whole met my needs. My
+basic process was to copy elements of the original \file{bst}, change some names,
+and see what was produced.
+
+First of all I added the new \texttt{book} fields to the \file{bookdb.bst} \texttt{ENTRY}
+command as:
+\begin{verbatim}
+ENTRY
+ { ...
+ binding
+ category
+ collator
+ condition
+ copy
+ illustrations
+ introduction
+ location
+ pages
+ size
+ translator
+ value
+ volumes
+ }
+\end{verbatim}
+
+The next thing was to add the new entries in the correct order to the function that output
+the \texttt{book} bibliography entries, together with how they should be formatted. This
+was the final result after much try it, \BibTeX\ it, change it, and repeat
+(the original code is in
+a typewriter font and my additions are in an italic font).
+
+\begin{alltt}
+{\ttfamily
+FUNCTION \{book\}
+\{ output.bibitem
+ author empty$
+ \{ format.editors "author and editor"
+ output.check
+ editor format.key output
+ add.blank
+ \}
+ \{ format.authors output.nonnull
+ crossref missing$
+ \{ "author and editor" editor
+ either.or.check \}
+ 'skip$
+ if$
+ \}
+ if$
+ new.block
+ format.btitle "title" output.check }{\itshape
+ format.editors output
+ format.collator output
+ format.translator output
+ format.introduction output }{\ttfamily
+ crossref missing$
+ \{ format.bvolume output
+ new.block
+ format.number.series output
+ new.sentence
+ format.publisher.address output
+ \}
+ \{
+ new.block
+ format.book.crossref output.nonnull
+ \}
+ if$
+ format.book.pages output
+ format.edition output
+ format.isbn output }{\itshape
+ format.volumes output
+ format.illustrations output
+ format.binding output
+ format.size output }{\ttfamily
+ new.block
+ format.note output }{\itshape
+ format.condition output
+ format.copy output
+ format.location output
+ format.category output
+ format.value output }{\ttfamily
+ fin.entry
+\} }
+\end{alltt}
+
+Effectively `all' I had left to do was to specify the formatting of my new fields.
+I used three basic forms:
+\begin{enumerate}
+\item Some introductory text, like `introduction by' or `Illustrations:', followed by
+ the field data.
+\item Like the first form but with the field data in a bold font.
+\item Name(s) forming the field data followed by what their contribution was
+ in parentheses.
+\end{enumerate}
+
+As an example of the first form here is the code for \field{binding}:
+
+\begin{verbatim}
+FUNCTION {format.binding}
+{ binding "binding" bibinfo.check
+ duplicate$ empty$ 'skip$
+ {
+ new.block
+ "Binding: " swap$ *
+ }
+ if$
+}
+\end{verbatim}
+
+Life was a little more complicated for the second form. This is the code for the
+\field{value} field which requires two functions, the first dealing with the
+bolding and the second with the output.
+
+\begin{verbatim}
+FUNCTION {boldval}
+{ duplicate$ empty$
+ { pop$ "" }
+ { "Value: \textbf{" swap$ * "}" * }
+ if$
+}
+FUNCTION {format.value}
+{ value "value" bibinfo.check
+ duplicate$ empty$ 'skip$
+ {
+ new.block
+ boldval
+ }
+ if$
+}
+\end{verbatim}
+
+The third form required several functions, as in the code for \field{collator}, where if there
+is a single collator this is output as `Name (collator)' but if the are multiple collators
+the output is `Name1 and Name2 ... (collators)'.
+
+\begin{verbatim}
+FUNCTION {bbl.collator}
+{ "collator" }
+FUNCTION {bbl.collators}
+{ "collators" }
+FUNCTION {get.bbl.collator}
+{ collator num.names$ #1 >
+ 'bbl.collators 'bbl.collator
+ if$
+}
+FUNCTION {format.collator}
+{ collator "collator" format.names
+ duplicate$ empty$ 'skip$
+ { " " *
+ get.bbl.collator
+ "(" swap$ * ")" *
+ }
+ if$
+}
+\end{verbatim}
+
+\end{comment}
+
+%\clearpage
+
+\section{My book database}
+
+The \file{*.bib} for my book catalogue looks somewhat like this:
+\begin{verbatim}
+%%% mybooks.bib 2015/04/22
+
+%%% for formating headings
+@preamble{ "\providecommand{\ahead}[1]{%
+ \textbf{\large #1}}" }
+
+%%% publishers
+@string{CUP =
+ "Cambridge University Press"}
+% etc
+%%% categories
+@string{science =
+ "science, mathematics, computers"}
+% etc
+
+@heading{A1,
+ key = {A},
+ note = {\ahead{AAAAAAAAAAA....}
+}
+
+@book{A1KEY,
+author = {First A. Author},
+% etc
+}
+
+@book{A2KEY,
+author = {Second A. Author},
+% etc
+}
+
+% etc
+\end{verbatim}
+
+I used the \BibTeX\ \verb!@preamble! command to provide a definition of the \verb!\ahead!
+macro. This, if required, can be overridden by an existing definition in the
+document used to print the bibliography.
+
+I added various \verb!@string! commands to provide shorthands for many of the
+fields in the \file{.bib} file, such as publisher, location, category, that
+would have the same value. This meant that I could have a shortened field entry
+that looked like:
+\begin{verbatim}
+publisher = CUP,
+\end{verbatim}
+instead of:
+\begin{verbatim}
+publisher = {Cambridge University Press},
+\end{verbatim}
+
+\section{Infelicities}
+
+
+ \BibTeX\ uses a stack-based language which I find hard to understand.
+%Many years ago I wrote an interpreter for a stack-based language whose name
+%I have forgotten but even so I was unable to use the language itself. I think
+%that it is a little like crosswords. I like doing `cryptic' crosswords but
+%I find that with some setters I can follow their clues easily but with
+%others I haven't a clue.
+
+ My basic approach was to take an existing \file{*.bst} file, try and see what it did,
+then copy and modify what seemed relevant to my needs.
+
+ I did have a couple of infelicities that I did not manage to resolve.
+
+ The first was that no matter what I tried I could not stop the \texttt{heading}
+from outputting its \field{key}, so it should be made as short and unobtrusive as possible.
+
+ The second was that I couldn't stop the warning message issued by \BibTeX\ if both
+an \field{author} and \field{editor} were supplied although the output was printed
+including both.
+
+ In spite of these, if you are a collector then you may want to consider tweaking a
+\file{*.bst} file to meet your particular needs.
+
+
+\bibliography{bookdb}
+
+\end{document}
+
+
+
+
+
+
+
+
+
+
+
diff --git a/biblio/bibtex/contrib/catalan/README b/biblio/bibtex/contrib/catalan/README
new file mode 100644
index 0000000000..6394e6a163
--- /dev/null
+++ b/biblio/bibtex/contrib/catalan/README
@@ -0,0 +1,40 @@
+This is the catalanbib package, version 1.0 of January 05.
+(Catalan bibliographic styles for use with bibtex).
+
+This package can be redistributed and/or modified under the terms
+of the LaTeX Project Public License Distributed from CTAN
+archives in directory macros/latex/base/lppl.txt; either
+version 1 of the License, or any later version.
+
+CONTENTS:
+
+Bibliographic styles:
+ caauda0.bst
+ caauda1.bst
+ caauda2.bst
+ caauda3.bst
+ caabbrv.bst
+ caalpha.bst
+ caplain.bst
+ caunsrt.bst
+Examples:
+ caauda0.tex
+ caauda1.tex
+ caauda2.tex
+ caauda3.tex
+ caabbrv.tex
+ caalpha.tex
+ caplain.tex
+ caunsrt.tex
+ exemples.bib
+Documentation:
+ catalanbib.{tex,pdf}
+
+_________________________________________
+Robert Fuster (rfuster@imm.upv.es)
+
+Institut de Matemtica Multidisciplinar
+Universitat Politcnica de Valncia
+Cam de Vera, 14
+46022 Valncia (Spain)
+_________________________________________ \ No newline at end of file
diff --git a/biblio/bibtex/contrib/catalan/bibtex/bst/caabbrv.bst b/biblio/bibtex/contrib/catalan/bibtex/bst/caabbrv.bst
new file mode 100644
index 0000000000..a876fbdcdf
--- /dev/null
+++ b/biblio/bibtex/contrib/catalan/bibtex/bst/caabbrv.bst
@@ -0,0 +1,1381 @@
+%%
+%% This is file `caabbrv.bst',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% merlin.mbs (with options: `head,exlang,nm-init,catalan,mab,nom,jabr,and-xcom,nfss,{}')
+%% catalan.mbs (with options: `exlang,nm-init,catalan,mab,nom,jabr,and-xcom,nfss,{}')
+%% merlin.mbs (with options: `tail,exlang,nm-init,catalan,mab,nom,jabr,and-xcom,nfss,{}')
+%% ----------------------------------------
+%% *** ca(talan)abbrv BibTeX style, by Robert Fuster 19/05/1998 ***
+%% *** modified 18/11/2004 ***
+%% Changes: 18/11/04: added date as optional field in unpublished
+%% (as in standard abbrv style)
+%% 18/11/04: now the title field in mastersthesis is not emphasized
+%% (as in standard abbrv style)
+%%
+ %-------------------------------------------------------------------
+ % The original source file contains the following version information:
+ % \ProvidesFile{merlin.mbs}[1996/12/16 3.82 (PWD)]
+ %
+ % NOTICE:
+ % This file may be used for non-profit purposes.
+ % It may not be distributed in exchange for money,
+ % other than distribution costs.
+ %
+ % The author provides it `as is' and does not guarantee it in any way.
+ %
+ % Copyright (C) 1994, 1995, 1996 Patrick W. Daly
+ %-------------------------------------------------------------------
+ % For use with BibTeX version 0.99a or later
+ %-------------------------------------------------------------------
+ % This bibliography style file is intended for texts in
+ % CATALAN
+ % This is a numerical citation style, and as such is standard LaTeX.
+ % It requires no extra package to interface to the main text.
+ % The form of the \bibitem entries is
+ % \bibitem{key}...
+ % Usage of \cite is as follows:
+ % \cite{key} ==>> [#]
+ % \cite[chap. 2]{key} ==>> [#, chap. 2]
+ % where # is a number determined by the ordering in the reference list.
+ % The order in the reference list is alphabetical by authors.
+ %---------------------------------------------------------------------
+
+ENTRY
+ { address
+ author
+ booktitle
+ chapter
+ edition
+ editor
+ howpublished
+ institution
+ journal
+ key
+ month
+ note
+ number
+ organization
+ pages
+ publisher
+ school
+ series
+ title
+ type
+ volume
+ year
+ }
+ {}
+ { label }
+
+INTEGERS { output.state before.all mid.sentence after.sentence after.block }
+
+FUNCTION {init.state.consts}
+{ #0 'before.all :=
+ #1 'mid.sentence :=
+ #2 'after.sentence :=
+ #3 'after.block :=
+}
+
+STRINGS { s t }
+
+FUNCTION {output.nonnull}
+{ 's :=
+ output.state mid.sentence =
+ { ", " * write$ }
+ { output.state after.block =
+ { add.period$ write$
+ newline$
+ "\newblock " write$
+ }
+ { output.state before.all =
+ 'write$
+ { add.period$ " " * write$ }
+ if$
+ }
+ if$
+ mid.sentence 'output.state :=
+ }
+ if$
+ s
+}
+
+FUNCTION {output}
+{ duplicate$ empty$
+ 'pop$
+ 'output.nonnull
+ if$
+}
+
+FUNCTION {output.check}
+{ 't :=
+ duplicate$ empty$
+ { pop$ "empty " t * " in " * cite$ * warning$ }
+ 'output.nonnull
+ if$
+}
+
+FUNCTION {fin.entry}
+{ add.period$
+ write$
+ newline$
+}
+
+FUNCTION {new.block}
+{ output.state before.all =
+ 'skip$
+ { after.block 'output.state := }
+ if$
+}
+
+FUNCTION {new.sentence}
+{ output.state after.block =
+ 'skip$
+ { output.state before.all =
+ 'skip$
+ { after.sentence 'output.state := }
+ if$
+ }
+ if$
+}
+
+FUNCTION {add.blank}
+{ " " * before.all 'output.state :=
+}
+
+FUNCTION {date.block}
+{
+ new.block
+}
+
+FUNCTION {not}
+{ { #0 }
+ { #1 }
+ if$
+}
+
+FUNCTION {and}
+{ 'skip$
+ { pop$ #0 }
+ if$
+}
+
+FUNCTION {or}
+{ { pop$ #1 }
+ 'skip$
+ if$
+}
+
+FUNCTION {non.stop}
+{ duplicate$
+ "}" * add.period$
+ #-1 #1 substring$ "." =
+}
+
+FUNCTION {new.block.checka}
+{ empty$
+ 'skip$
+ 'new.block
+ if$
+}
+
+FUNCTION {new.block.checkb}
+{ empty$
+ swap$ empty$
+ and
+ 'skip$
+ 'new.block
+ if$
+}
+
+FUNCTION {new.sentence.checka}
+{ empty$
+ 'skip$
+ 'new.sentence
+ if$
+}
+
+FUNCTION {new.sentence.checkb}
+{ empty$
+ swap$ empty$
+ and
+ 'skip$
+ 'new.sentence
+ if$
+}
+
+FUNCTION {field.or.null}
+{ duplicate$ empty$
+ { pop$ "" }
+ 'skip$
+ if$
+}
+
+FUNCTION {emphasize}
+{ duplicate$ empty$
+ { pop$ "" }
+ { "\emph{" swap$ * "}" * }
+ if$
+}
+
+FUNCTION {capitalize}
+{ "u" change.case$ "t" change.case$ }
+
+FUNCTION {space.word}
+{ " " swap$ * " " * }
+
+ % Here are the language-specific definitions for explicit words.
+ % Each function has a name bbl.xxx where xxx is the English word.
+ %-------------------------------------------------------------------
+ % The original source file contains the following version information:
+ % \ProvidesFile{catalan.mbs}[1998/05/17 2.0 (PWD/RF)]
+ % Copyright (C) 1994, 1995 Patrick W. Daly
+ % Copyright (C) 1997, 1998 Robert Fuster
+
+ %-------------------------------------------------------------------
+
+ % The language selected here is CATALAN
+FUNCTION {bbl.and}
+{ "i"}
+
+FUNCTION {bbl.editors}
+{ "editors" }
+
+FUNCTION {bbl.editor}
+{ "editor" }
+
+FUNCTION {bbl.edby}
+{ "editat per" }
+
+FUNCTION {bbl.edition}
+{ "edici\'o" }
+
+FUNCTION {bbl.volume}
+{ "volum" }
+
+FUNCTION {bbl.of}
+{ "de" }
+
+FUNCTION {bbl.number}
+{ "n\'umero" }
+
+FUNCTION {bbl.nr}
+{ "n." }
+
+FUNCTION {bbl.in}
+{ "dins" }
+
+FUNCTION {bbl.pages}
+{ "p\`agines" }
+
+FUNCTION {bbl.page}
+{ "p\`agina" }
+
+FUNCTION {bbl.chapter}
+{ "cap\'{\i}tol" }
+
+FUNCTION {bbl.techrep}
+{ "Report t{\`e}cnic" }
+
+FUNCTION {bbl.mthesis}
+{ "Projecte F. de Carrera o Tesina de L." }
+
+FUNCTION {bbl.phdthesis}
+{ "Tesi Doctoral" }
+
+FUNCTION {bbl.first}
+{ "primera" }
+
+FUNCTION {bbl.second}
+{ "segona" }
+
+FUNCTION {bbl.third}
+{ "tercera" }
+
+FUNCTION {bbl.fourth}
+{ "quarta" }
+
+FUNCTION {bbl.fifth}
+{ "cinquena" }
+
+FUNCTION {bbl.th}
+{ "a" }
+
+MACRO {jan} {"gen."}
+
+MACRO {feb} {"feb."}
+
+MACRO {mar} {"mar\c{c}"}
+
+MACRO {apr} {"abr."}
+
+MACRO {may} {"maig"}
+
+MACRO {jun} {"juny"}
+
+MACRO {jul} {"jul."}
+
+MACRO {aug} {"ag."}
+
+MACRO {sep} {"set."}
+
+MACRO {oct} {"oct."}
+
+MACRO {nov} {"nov."}
+
+MACRO {dec} {"des."}
+
+ % End of language definition file
+
+MACRO {acmcs} {"ACM Comput. Surv."}
+
+MACRO {acta} {"Acta Inf."}
+
+MACRO {cacm} {"Commun. ACM"}
+
+MACRO {ibmjrd} {"IBM J. Res. Dev."}
+
+MACRO {ibmsj} {"IBM Syst.~J."}
+
+MACRO {ieeese} {"IEEE Trans. Softw. Eng."}
+
+MACRO {ieeetc} {"IEEE Trans. Comput."}
+
+MACRO {ieeetcad}
+ {"IEEE Trans. Comput.-Aided Design Integrated Circuits"}
+
+MACRO {ipl} {"Inf. Process. Lett."}
+
+MACRO {jacm} {"J.~ACM"}
+
+MACRO {jcss} {"J.~Comput. Syst. Sci."}
+
+MACRO {scp} {"Sci. Comput. Programming"}
+
+MACRO {sicomp} {"SIAM J. Comput."}
+
+MACRO {tocs} {"ACM Trans. Comput. Syst."}
+
+MACRO {tods} {"ACM Trans. Database Syst."}
+
+MACRO {tog} {"ACM Trans. Gr."}
+
+MACRO {toms} {"ACM Trans. Math. Softw."}
+
+MACRO {toois} {"ACM Trans. Office Inf. Syst."}
+
+MACRO {toplas} {"ACM Trans. Prog. Lang. Syst."}
+
+MACRO {tcs} {"Theoretical Comput. Sci."}
+
+INTEGERS { nameptr namesleft numnames }
+
+FUNCTION {format.names}
+{ 's :=
+ #1 'nameptr :=
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ { s nameptr
+ "{f.~}{vv~}{ll}{, jj}" format.name$ 't :=
+ nameptr #1 >
+ {
+ namesleft #1 >
+ { ", " * t * }
+ {
+ t "others" =
+ { " et~al." * }
+ { bbl.and space.word * t * }
+ if$
+ }
+ if$
+ }
+ 't
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+}
+
+FUNCTION {format.names.ed}
+{ 's :=
+ #1 'nameptr :=
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ { s nameptr
+ "{f.~}{vv~}{ll}{, jj}"
+ format.name$ 't :=
+ nameptr #1 >
+ {
+ namesleft #1 >
+ { ", " * t * }
+ {
+ t "others" =
+ { " et~al." * }
+ { bbl.and space.word * t * }
+ if$
+ }
+ if$
+ }
+ 't
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+}
+
+FUNCTION {format.authors}
+{ author empty$
+ { "" }
+ {
+ author format.names
+ }
+ if$
+}
+
+FUNCTION {format.editors}
+{ editor empty$
+ { "" }
+ {
+ editor format.names
+ editor num.names$ #1 >
+ { ", " * bbl.editors * }
+ { ", " * bbl.editor * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.in.editors}
+{ editor empty$
+ { "" }
+ { editor format.names.ed
+ editor num.names$ #1 >
+ { ", " * bbl.editors * }
+ { ", " * bbl.editor * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.title}
+{ title empty$
+ { "" }
+ { title "t" change.case$
+ }
+ if$
+}
+
+FUNCTION {output.bibitem}
+{ newline$
+ "\bibitem{" write$
+ cite$ write$
+ "}" write$
+ newline$
+ ""
+ before.all 'output.state :=
+}
+
+FUNCTION {n.dashify}
+{ 't :=
+ ""
+ { t empty$ not }
+ { t #1 #1 substring$ "-" =
+ { t #1 #2 substring$ "--" = not
+ { "--" *
+ t #2 global.max$ substring$ 't :=
+ }
+ { { t #1 #1 substring$ "-" = }
+ { "-" *
+ t #2 global.max$ substring$ 't :=
+ }
+ while$
+ }
+ if$
+ }
+ { t #1 #1 substring$ *
+ t #2 global.max$ substring$ 't :=
+ }
+ if$
+ }
+ while$
+}
+
+FUNCTION {word.in}
+{ bbl.in capitalize
+ " " * }
+
+FUNCTION {format.date}
+{ year empty$
+ { month empty$
+ { "" }
+ { "there's a month but no year in " cite$ * warning$
+ month
+ }
+ if$
+ }
+ { month empty$
+ 'year
+ { month " " * year * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.btitle}
+{ title emphasize
+}
+
+FUNCTION {tie.or.space.connect}
+{ duplicate$ text.length$ #3 <
+ { "~" }
+ { " " }
+ if$
+ swap$ * *
+}
+
+FUNCTION {either.or.check}
+{ empty$
+ 'pop$
+ { "can't use both " swap$ * " fields in " * cite$ * warning$ }
+ if$
+}
+
+FUNCTION {format.bvolume}
+{ volume empty$
+ { "" }
+ { bbl.volume volume tie.or.space.connect
+ series empty$
+ 'skip$
+ { bbl.of space.word * series emphasize * }
+ if$
+ "volume and number" number either.or.check
+ }
+ if$
+}
+
+FUNCTION {format.number.series}
+{ volume empty$
+ { number empty$
+ { series field.or.null }
+ { output.state mid.sentence =
+ { bbl.number }
+ { bbl.number capitalize }
+ if$
+ number tie.or.space.connect
+ series empty$
+ { "there's a number but no series in " cite$ * warning$ }
+ { bbl.in space.word * series * }
+ if$
+ }
+ if$
+ }
+ { "" }
+ if$
+}
+
+FUNCTION {is.num}
+{ chr.to.int$
+ duplicate$ "0" chr.to.int$ < not
+ swap$ "9" chr.to.int$ > not and
+}
+
+FUNCTION {extract.num}
+{ duplicate$ 't :=
+ "" 's :=
+ { t empty$ not }
+ { t #1 #1 substring$
+ t #2 global.max$ substring$ 't :=
+ duplicate$ is.num
+ { s swap$ * 's := }
+ { pop$ "" 't := }
+ if$
+ }
+ while$
+ s empty$
+ 'skip$
+ { pop$ s }
+ if$
+}
+
+FUNCTION {convert.edition}
+{ edition extract.num "l" change.case$ 's :=
+ s "first" = s "1" = or
+ { bbl.first 't := }
+ { s "second" = s "2" = or
+ { bbl.second 't := }
+ { s "third" = s "3" = or
+ { bbl.third 't := }
+ { s "fourth" = s "4" = or
+ { bbl.fourth 't := }
+ { s "fifth" = s "5" = or
+ { bbl.fifth 't := }
+ { s #1 #1 substring$ is.num
+ { s bbl.th * 't := }
+ { edition 't := }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+ t
+}
+
+FUNCTION {format.edition}
+{ edition empty$
+ { "" }
+ { output.state mid.sentence =
+ { convert.edition "l" change.case$ " " * bbl.edition * }
+ { convert.edition "t" change.case$ " " * bbl.edition * }
+ if$
+ }
+ if$
+}
+
+INTEGERS { multiresult }
+
+FUNCTION {multi.page.check}
+{ 't :=
+ #0 'multiresult :=
+ { multiresult not
+ t empty$ not
+ and
+ }
+ { t #1 #1 substring$
+ duplicate$ "-" =
+ swap$ duplicate$ "," =
+ swap$ "+" =
+ or or
+ { #1 'multiresult := }
+ { t #2 global.max$ substring$ 't := }
+ if$
+ }
+ while$
+ multiresult
+}
+
+FUNCTION {format.pages}
+{ pages empty$
+ { "" }
+ { pages multi.page.check
+ { bbl.pages pages n.dashify tie.or.space.connect }
+ { bbl.page pages tie.or.space.connect }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.journal.pages}
+{
+ pages empty$
+ 'skip$
+ { duplicate$ empty$
+ { pop$ format.pages }
+ { ":" * pages n.dashify * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.vol.num.pages}
+{ volume field.or.null
+ number empty$
+ 'skip$
+ {
+ "(" number * ")" * *
+ volume empty$
+ { "there's a number but no volume in " cite$ * warning$ }
+ 'skip$
+ if$
+ }
+ if$
+ format.journal.pages
+}
+
+FUNCTION {format.chapter.pages}
+{ chapter empty$
+ 'format.pages
+ { type empty$
+ { bbl.chapter }
+ { type "l" change.case$ }
+ if$
+ chapter tie.or.space.connect
+ pages empty$
+ 'skip$
+ { ", " * format.pages * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.in.ed.booktitle}
+{ booktitle empty$
+ { "" }
+ { editor empty$
+ { word.in booktitle emphasize * }
+ { word.in format.in.editors * ", " *
+ booktitle emphasize * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {empty.misc.check}
+{ author empty$ title empty$ howpublished empty$
+ month empty$ year empty$ note empty$
+ and and and and and
+ key empty$ not and
+ { "all relevant fields are empty in " cite$ * warning$ }
+ 'skip$
+ if$
+}
+
+FUNCTION {format.thesis.type}
+{ type empty$
+ 'skip$
+ { pop$
+ type "t" change.case$
+ }
+ if$
+}
+
+FUNCTION {format.tr.number}
+{ type empty$
+ { bbl.techrep }
+ 'type
+ if$
+ number empty$
+ { "t" change.case$ }
+ { number tie.or.space.connect }
+ if$
+}
+
+FUNCTION {format.article.crossref}
+{
+ key empty$
+ { journal empty$
+ { "need key or journal for " cite$ * " to crossref " * crossref *
+ warning$
+ ""
+ }
+ { word.in journal emphasize * }
+ if$
+ }
+ { word.in key * " " *}
+ if$
+ " \cite{" * crossref * "}" *
+}
+
+FUNCTION {format.crossref.editor}
+{ editor #1 "{vv~}{ll}" format.name$
+ editor num.names$ duplicate$
+ #2 >
+ { pop$ " et~al." * }
+ { #2 <
+ 'skip$
+ { editor #2 "{ff }{vv }{ll}{ jj}" format.name$ "others" =
+ { " et~al." * }
+ { bbl.and space.word * editor #2 "{vv~}{ll}" format.name$ * }
+ if$
+ }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.book.crossref}
+{ volume empty$
+ { "empty volume in " cite$ * "'s crossref of " * crossref * warning$
+ word.in
+ }
+ { bbl.volume capitalize
+ volume tie.or.space.connect
+ bbl.of space.word *
+ }
+ if$
+ editor empty$
+ editor field.or.null author field.or.null =
+ or
+ { key empty$
+ { series empty$
+ { "need editor, key, or series for " cite$ * " to crossref " *
+ crossref * warning$
+ "" *
+ }
+ { series emphasize * }
+ if$
+ }
+ { key * }
+ if$
+ }
+ { format.crossref.editor * }
+ if$
+ " \cite{" * crossref * "}" *
+}
+
+FUNCTION {format.incoll.inproc.crossref}
+{
+ editor empty$
+ editor field.or.null author field.or.null =
+ or
+ { key empty$
+ { booktitle empty$
+ { "need editor, key, or booktitle for " cite$ * " to crossref " *
+ crossref * warning$
+ ""
+ }
+ { word.in booktitle emphasize * }
+ if$
+ }
+ { word.in key * " " *}
+ if$
+ }
+ { word.in format.crossref.editor * " " *}
+ if$
+ " \cite{" * crossref * "}" *
+}
+
+FUNCTION {format.publisher}
+{ publisher empty$
+ { "empty publisher in " cite$ * warning$ }
+ 'skip$
+ if$
+ ""
+ address empty$ publisher empty$ and
+ 'skip$
+ {
+ publisher empty$
+ { address empty$
+ 'skip$
+ { address * }
+ if$
+ }
+ { publisher *
+ address empty$
+ 'skip$
+ { ", " * address * }
+ if$
+ }
+ if$
+ }
+ if$
+ output
+}
+
+FUNCTION {article}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.title "title" output.check
+ new.block
+ crossref missing$
+ { journal
+ emphasize
+ "journal" output.check
+ format.vol.num.pages output
+ format.date "year" output.check
+ }
+ { format.article.crossref output.nonnull
+ format.pages output
+ }
+ if$
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {book}
+{ output.bibitem
+ author empty$
+ { format.editors "author and editor" output.check
+ }
+ { format.authors output.nonnull
+ crossref missing$
+ { "author and editor" editor either.or.check }
+ 'skip$
+ if$
+ }
+ if$
+ new.block
+ format.btitle "title" output.check
+ crossref missing$
+ { format.bvolume output
+ new.block
+ format.number.series output
+ new.sentence
+ format.publisher
+ }
+ {
+ new.block
+ format.book.crossref output.nonnull
+ }
+ if$
+ format.edition output
+ format.date "year" output.check
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {booklet}
+{ output.bibitem
+ format.authors output
+ new.block
+ format.title "title" output.check
+ new.block
+ howpublished output
+ address output
+ format.date output
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {inbook}
+{ output.bibitem
+ author empty$
+ { format.editors "author and editor" output.check
+ }
+ { format.authors output.nonnull
+ crossref missing$
+ { "author and editor" editor either.or.check }
+ 'skip$
+ if$
+ }
+ if$
+ new.block
+ format.btitle "title" output.check
+ crossref missing$
+ {
+ format.bvolume output
+ format.chapter.pages "chapter and pages" output.check
+ new.block
+ format.number.series output
+ new.sentence
+ format.publisher
+ }
+ {
+ format.chapter.pages "chapter and pages" output.check
+ new.block
+ format.book.crossref output.nonnull
+ }
+ if$
+ format.edition output
+ format.date "year" output.check
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {incollection}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.title "title" output.check
+ new.block
+ crossref missing$
+ { format.in.ed.booktitle "booktitle" output.check
+ format.bvolume output
+ format.number.series output
+ format.chapter.pages output
+ new.sentence
+ format.publisher
+ format.edition output
+ format.date "year" output.check
+ }
+ { format.incoll.inproc.crossref output.nonnull
+ format.chapter.pages output
+ }
+ if$
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {inproceedings}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.title "title" output.check
+ new.block
+ crossref missing$
+ { format.in.ed.booktitle "booktitle" output.check
+ format.bvolume output
+ format.number.series output
+ format.pages output
+ new.sentence
+ publisher empty$
+ { organization output
+ address output
+ }
+ { organization output
+ format.publisher
+ }
+ if$
+ format.date "year" output.check
+ }
+ { format.incoll.inproc.crossref output.nonnull
+ format.pages output
+ }
+ if$
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {conference} { inproceedings }
+
+FUNCTION {manual}
+{ output.bibitem
+ author empty$
+ { organization empty$
+ 'skip$
+ { organization output.nonnull
+ address output
+ }
+ if$
+ }
+ { format.authors output.nonnull }
+ if$
+ new.block
+ format.btitle "title" output.check
+ author empty$
+ { organization empty$
+ {
+ address new.block.checka
+ address output
+ }
+ 'skip$
+ if$
+ }
+ {
+ organization address new.block.checkb
+ organization output
+ address output
+ }
+ if$
+ format.edition output
+ format.date output
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {mastersthesis}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.title "title" output.check
+ new.block
+ bbl.mthesis format.thesis.type output.nonnull
+ school "school" output.check
+ address output
+ format.date "year" output.check
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {misc}
+{ output.bibitem
+ format.authors output
+ title howpublished new.block.checkb
+ format.title output
+ howpublished new.block.checka
+ howpublished output
+ format.date output
+ new.block
+ note output
+ fin.entry
+ empty.misc.check
+}
+
+FUNCTION {phdthesis}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.btitle "title" output.check
+ new.block
+ bbl.phdthesis format.thesis.type output.nonnull
+ school "school" output.check
+ address output
+ format.date "year" output.check
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {proceedings}
+{ output.bibitem
+ editor empty$
+ { organization output }
+ { format.editors output.nonnull }
+ if$
+ new.block
+ format.btitle "title" output.check
+ format.bvolume output
+ format.number.series output
+ address empty$
+ { editor empty$
+ { publisher new.sentence.checka }
+ { organization publisher new.sentence.checkb
+ organization output
+ }
+ if$
+ publisher output
+ format.date "year" output.check
+ }
+ { address output.nonnull
+ format.date "year" output.check
+ new.sentence
+ editor empty$
+ 'skip$
+ { organization output }
+ if$
+ publisher output
+ }
+ if$
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {techreport}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.title "title" output.check
+ new.block
+ format.tr.number output.nonnull
+ institution "institution" output.check
+ address output
+ format.date "year" output.check
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {unpublished}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.title "title" output.check
+ new.block
+ note "note" output.check
+ format.date output
+ fin.entry
+}
+
+FUNCTION {default.type} { misc }
+
+READ
+
+FUNCTION {sortify}
+{ purify$
+ "l" change.case$
+}
+
+INTEGERS { len }
+
+FUNCTION {chop.word}
+{ 's :=
+ 'len :=
+ s #1 len substring$ =
+ { s len #1 + global.max$ substring$ }
+ 's
+ if$
+}
+
+FUNCTION {sort.format.names}
+{ 's :=
+ #1 'nameptr :=
+ ""
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ { s nameptr
+ "{vv{ } }{ll{ }}{ f{ }}{ jj{ }}"
+ format.name$ 't :=
+ nameptr #1 >
+ {
+ " " *
+ namesleft #1 = t "others" = and
+ { "aaaaa" * }
+ { t sortify * }
+ if$
+ }
+ { t sortify * }
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+}
+
+FUNCTION {sort.format.title}
+{ 't :=
+ "A " #2
+ "An " #3
+ "The " #4 t chop.word
+ chop.word
+ chop.word
+ sortify
+ #1 global.max$ substring$
+}
+
+FUNCTION {author.sort}
+{ author empty$
+ { key empty$
+ { "to sort, need author or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { author sort.format.names }
+ if$
+}
+
+FUNCTION {author.editor.sort}
+{ author empty$
+ { editor empty$
+ { key empty$
+ { "to sort, need author, editor, or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { editor sort.format.names }
+ if$
+ }
+ { author sort.format.names }
+ if$
+}
+
+FUNCTION {author.organization.sort}
+{ author empty$
+ { organization empty$
+ { key empty$
+ { "to sort, need author, organization, or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { "The " #4 organization chop.word sortify }
+ if$
+ }
+ { author sort.format.names }
+ if$
+}
+
+FUNCTION {editor.organization.sort}
+{ editor empty$
+ { organization empty$
+ { key empty$
+ { "to sort, need editor, organization, or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { "The " #4 organization chop.word sortify }
+ if$
+ }
+ { editor sort.format.names }
+ if$
+}
+
+FUNCTION {presort}
+{ type$ "book" =
+ type$ "inbook" =
+ or
+ 'author.editor.sort
+ { type$ "proceedings" =
+ 'editor.organization.sort
+ { type$ "manual" =
+ 'author.organization.sort
+ 'author.sort
+ if$
+ }
+ if$
+ }
+ if$
+ " "
+ *
+ year field.or.null sortify
+ *
+ " "
+ *
+ title field.or.null
+ sort.format.title
+ *
+ #1 entry.max$ substring$
+ 'sort.key$ :=
+}
+
+ITERATE {presort}
+
+SORT
+
+STRINGS { longest.label }
+
+INTEGERS { number.label longest.label.width }
+
+FUNCTION {initialize.longest.label}
+{ "" 'longest.label :=
+ #1 'number.label :=
+ #0 'longest.label.width :=
+}
+
+FUNCTION {longest.label.pass}
+{ number.label int.to.str$ 'label :=
+ number.label #1 + 'number.label :=
+ label width$ longest.label.width >
+ { label 'longest.label :=
+ label width$ 'longest.label.width :=
+ }
+ 'skip$
+ if$
+}
+
+EXECUTE {initialize.longest.label}
+
+ITERATE {longest.label.pass}
+
+FUNCTION {begin.bib}
+{ preamble$ empty$
+ 'skip$
+ { preamble$ write$ newline$ }
+ if$
+ "\begin{thebibliography}{" longest.label * "}" *
+ write$ newline$
+}
+
+EXECUTE {begin.bib}
+
+EXECUTE {init.state.consts}
+
+ITERATE {call.type$}
+
+FUNCTION {end.bib}
+{ newline$
+ "\end{thebibliography}" write$ newline$
+}
+
+EXECUTE {end.bib}
+%% End of customized bst file
+%%
+%% End of file `caabbrv.bst'. \ No newline at end of file
diff --git a/biblio/bibtex/contrib/catalan/bibtex/bst/caalpha.bst b/biblio/bibtex/contrib/catalan/bibtex/bst/caalpha.bst
new file mode 100644
index 0000000000..2ae1036419
--- /dev/null
+++ b/biblio/bibtex/contrib/catalan/bibtex/bst/caalpha.bst
@@ -0,0 +1,1539 @@
+%%
+%% This is file `caalpha.bst',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% merlin.mbs (with options: `head,exlang,alph,catalan,nom,and-xcom,nfss,{}')
+%% catalan.mbs (with options: `exlang,alph,catalan,nom,and-xcom,nfss,{}')
+%% merlin.mbs (with options: `tail,exlang,alph,catalan,nom,and-xcom,nfss,{}')
+%% ----------------------------------------
+%% *** ca(talan)alpha BibTeX style, by Robert Fuster 18/05/1998 ***
+%% *** modified 18/11/2004 ***
+%% Changes: 18/11/04: added date as optional field in unpublished
+%% (as in standard alpha style)
+%% 18/11/04: now the title field in mastersthesis is not emphasized
+%% (as in standard alpha style)
+%%
+ %-------------------------------------------------------------------
+ % The original source file contains the following version information:
+ % \ProvidesFile{merlin.mbs}[1996/12/16 3.82 (PWD)]
+ %
+ % NOTICE:
+ % This file may be used for non-profit purposes.
+ % It may not be distributed in exchange for money,
+ % other than distribution costs.
+ %
+ % The author provides it `as is' and does not guarantee it in any way.
+ %
+ % Copyright (C) 1994, 1995, 1996 Patrick W. Daly
+ %-------------------------------------------------------------------
+ % For use with BibTeX version 0.99a or later
+ %-------------------------------------------------------------------
+ % This bibliography style file is intended for texts in
+ % CATALAN
+ % This is a labelled citation style similar to the standard alpha.bst,
+ % where labels are of the form Dal90 or DBK89.
+ % It requires no extra package to interface to the main text.
+ % The form of the \bibitem entries is
+ % \bibitem[label]{key}...
+ % Usage of \cite is as follows:
+ % \cite{key} ==>> [label]
+ % \cite[chap. 2]{key} ==>> [label, chap. 2]
+ % The order in the reference list is by label.
+ %---------------------------------------------------------------------
+
+ENTRY
+ { address
+ author
+ booktitle
+ chapter
+ edition
+ editor
+ howpublished
+ institution
+ journal
+ key
+ month
+ note
+ number
+ organization
+ pages
+ publisher
+ school
+ series
+ title
+ type
+ volume
+ year
+ }
+ {}
+ { label extra.label sort.label }
+
+INTEGERS { output.state before.all mid.sentence after.sentence after.block }
+
+FUNCTION {init.state.consts}
+{ #0 'before.all :=
+ #1 'mid.sentence :=
+ #2 'after.sentence :=
+ #3 'after.block :=
+}
+
+STRINGS { s t }
+
+FUNCTION {output.nonnull}
+{ 's :=
+ output.state mid.sentence =
+ { ", " * write$ }
+ { output.state after.block =
+ { add.period$ write$
+ newline$
+ "\newblock " write$
+ }
+ { output.state before.all =
+ 'write$
+ { add.period$ " " * write$ }
+ if$
+ }
+ if$
+ mid.sentence 'output.state :=
+ }
+ if$
+ s
+}
+
+FUNCTION {output}
+{ duplicate$ empty$
+ 'pop$
+ 'output.nonnull
+ if$
+}
+
+FUNCTION {output.check}
+{ 't :=
+ duplicate$ empty$
+ { pop$ "empty " t * " in " * cite$ * warning$ }
+ 'output.nonnull
+ if$
+}
+
+FUNCTION {fin.entry}
+{ add.period$
+ write$
+ newline$
+}
+
+FUNCTION {new.block}
+{ output.state before.all =
+ 'skip$
+ { after.block 'output.state := }
+ if$
+}
+
+FUNCTION {new.sentence}
+{ output.state after.block =
+ 'skip$
+ { output.state before.all =
+ 'skip$
+ { after.sentence 'output.state := }
+ if$
+ }
+ if$
+}
+
+FUNCTION {add.blank}
+{ " " * before.all 'output.state :=
+}
+
+FUNCTION {date.block}
+{
+ new.block
+}
+
+FUNCTION {not}
+{ { #0 }
+ { #1 }
+ if$
+}
+
+FUNCTION {and}
+{ 'skip$
+ { pop$ #0 }
+ if$
+}
+
+FUNCTION {or}
+{ { pop$ #1 }
+ 'skip$
+ if$
+}
+
+FUNCTION {non.stop}
+{ duplicate$
+ "}" * add.period$
+ #-1 #1 substring$ "." =
+}
+
+FUNCTION {new.block.checka}
+{ empty$
+ 'skip$
+ 'new.block
+ if$
+}
+
+FUNCTION {new.block.checkb}
+{ empty$
+ swap$ empty$
+ and
+ 'skip$
+ 'new.block
+ if$
+}
+
+FUNCTION {new.sentence.checka}
+{ empty$
+ 'skip$
+ 'new.sentence
+ if$
+}
+
+FUNCTION {new.sentence.checkb}
+{ empty$
+ swap$ empty$
+ and
+ 'skip$
+ 'new.sentence
+ if$
+}
+
+FUNCTION {field.or.null}
+{ duplicate$ empty$
+ { pop$ "" }
+ 'skip$
+ if$
+}
+
+FUNCTION {emphasize}
+{ duplicate$ empty$
+ { pop$ "" }
+ { "\emph{" swap$ * "}" * }
+ if$
+}
+
+FUNCTION {capitalize}
+{ "u" change.case$ "t" change.case$ }
+
+FUNCTION {space.word}
+{ " " swap$ * " " * }
+
+ % Here are the language-specific definitions for explicit words.
+ % Each function has a name bbl.xxx where xxx is the English word.
+ %-------------------------------------------------------------------
+ % The original source file contains the following version information:
+ % \ProvidesFile{catalan.mbs}[1998/05/17 2.0 (PWD/RF)]
+ % Copyright (C) 1994, 1995 Patrick W. Daly
+ % Copyright (C) 1997, 1998 Robert Fuster
+
+ %-------------------------------------------------------------------
+
+ % The language selected here is CATALAN
+FUNCTION {bbl.and}
+{ "i"}
+
+FUNCTION {bbl.editors}
+{ "editors" }
+
+FUNCTION {bbl.editor}
+{ "editor" }
+
+FUNCTION {bbl.edby}
+{ "editat per" }
+
+FUNCTION {bbl.edition}
+{ "edici\'o" }
+
+FUNCTION {bbl.volume}
+{ "volum" }
+
+FUNCTION {bbl.of}
+{ "de" }
+
+FUNCTION {bbl.number}
+{ "n\'umero" }
+
+FUNCTION {bbl.nr}
+{ "n." }
+
+FUNCTION {bbl.in}
+{ "dins" }
+
+FUNCTION {bbl.pages}
+{ "p\`agines" }
+
+FUNCTION {bbl.page}
+{ "p\`agina" }
+
+FUNCTION {bbl.chapter}
+{ "cap\'{\i}tol" }
+
+FUNCTION {bbl.techrep}
+{ "Report t{\`e}cnic" }
+
+FUNCTION {bbl.mthesis}
+{ "Projecte F. de Carrera o Tesina de L." }
+
+FUNCTION {bbl.phdthesis}
+{ "Tesi Doctoral" }
+
+FUNCTION {bbl.first}
+{ "primera" }
+
+FUNCTION {bbl.second}
+{ "segona" }
+
+FUNCTION {bbl.third}
+{ "tercera" }
+
+FUNCTION {bbl.fourth}
+{ "quarta" }
+
+FUNCTION {bbl.fifth}
+{ "cinquena" }
+
+FUNCTION {bbl.th}
+{ "a" }
+
+MACRO {jan} {"gener"}
+
+MACRO {feb} {"febrer"}
+
+MACRO {mar} {"mar\c{c}"}
+
+MACRO {apr} {"abril"}
+
+MACRO {may} {"maig"}
+
+MACRO {jun} {"juny"}
+
+MACRO {jul} {"juliol"}
+
+MACRO {aug} {"agost"}
+
+MACRO {sep} {"setembre"}
+
+MACRO {oct} {"octubre"}
+
+MACRO {nov} {"novembre"}
+
+MACRO {dec} {"desembre"}
+
+ % End of language definition file
+
+MACRO {acmcs} {"ACM Computing Surveys"}
+
+MACRO {acta} {"Acta Informatica"}
+
+MACRO {cacm} {"Communications of the ACM"}
+
+MACRO {ibmjrd} {"IBM Journal of Research and Development"}
+
+MACRO {ibmsj} {"IBM Systems Journal"}
+
+MACRO {ieeese} {"IEEE Transactions on Software Engineering"}
+
+MACRO {ieeetc} {"IEEE Transactions on Computers"}
+
+MACRO {ieeetcad}
+ {"IEEE Transactions on Computer-Aided Design of Integrated Circuits"}
+
+MACRO {ipl} {"Information Processing Letters"}
+
+MACRO {jacm} {"Journal of the ACM"}
+
+MACRO {jcss} {"Journal of Computer and System Sciences"}
+
+MACRO {scp} {"Science of Computer Programming"}
+
+MACRO {sicomp} {"SIAM Journal on Computing"}
+
+MACRO {tocs} {"ACM Transactions on Computer Systems"}
+
+MACRO {tods} {"ACM Transactions on Database Systems"}
+
+MACRO {tog} {"ACM Transactions on Graphics"}
+
+MACRO {toms} {"ACM Transactions on Mathematical Software"}
+
+MACRO {toois} {"ACM Transactions on Office Information Systems"}
+
+MACRO {toplas} {"ACM Transactions on Programming Languages and Systems"}
+
+MACRO {tcs} {"Theoretical Computer Science"}
+
+INTEGERS { nameptr namesleft numnames }
+
+FUNCTION {format.names}
+{ 's :=
+ #1 'nameptr :=
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ { s nameptr
+ "{ff~}{vv~}{ll}{, jj}" format.name$ 't :=
+ nameptr #1 >
+ {
+ namesleft #1 >
+ { ", " * t * }
+ {
+ t "others" =
+ { " et~al." * }
+ { bbl.and space.word * t * }
+ if$
+ }
+ if$
+ }
+ 't
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+}
+
+FUNCTION {format.names.ed}
+{ 's :=
+ #1 'nameptr :=
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ { s nameptr
+ "{ff~}{vv~}{ll}{, jj}"
+ format.name$ 't :=
+ nameptr #1 >
+ {
+ namesleft #1 >
+ { ", " * t * }
+ {
+ t "others" =
+ { " et~al." * }
+ { bbl.and space.word * t * }
+ if$
+ }
+ if$
+ }
+ 't
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+}
+
+FUNCTION {format.authors}
+{ author empty$
+ { "" }
+ {
+ author format.names
+ }
+ if$
+}
+
+FUNCTION {format.editors}
+{ editor empty$
+ { "" }
+ {
+ editor format.names
+ editor num.names$ #1 >
+ { ", " * bbl.editors * }
+ { ", " * bbl.editor * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.in.editors}
+{ editor empty$
+ { "" }
+ { editor format.names.ed
+ editor num.names$ #1 >
+ { ", " * bbl.editors * }
+ { ", " * bbl.editor * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.title}
+{ title empty$
+ { "" }
+ { title "t" change.case$
+ }
+ if$
+}
+
+FUNCTION {output.bibitem}
+{ newline$
+ "\bibitem[" label * "]{" * write$
+ cite$ write$
+ "}" write$
+ newline$
+ ""
+ before.all 'output.state :=
+}
+
+FUNCTION {n.dashify}
+{ 't :=
+ ""
+ { t empty$ not }
+ { t #1 #1 substring$ "-" =
+ { t #1 #2 substring$ "--" = not
+ { "--" *
+ t #2 global.max$ substring$ 't :=
+ }
+ { { t #1 #1 substring$ "-" = }
+ { "-" *
+ t #2 global.max$ substring$ 't :=
+ }
+ while$
+ }
+ if$
+ }
+ { t #1 #1 substring$ *
+ t #2 global.max$ substring$ 't :=
+ }
+ if$
+ }
+ while$
+}
+
+FUNCTION {word.in}
+{ bbl.in capitalize
+ " " * }
+
+FUNCTION {format.date}
+{ year empty$
+ { month empty$
+ { "" }
+ { "there's a month but no year in " cite$ * warning$
+ month
+ }
+ if$
+ }
+ { month empty$
+ 'year
+ { month " " * year * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.btitle}
+{ title emphasize
+}
+
+FUNCTION {tie.or.space.connect}
+{ duplicate$ text.length$ #3 <
+ { "~" }
+ { " " }
+ if$
+ swap$ * *
+}
+
+FUNCTION {either.or.check}
+{ empty$
+ 'pop$
+ { "can't use both " swap$ * " fields in " * cite$ * warning$ }
+ if$
+}
+
+FUNCTION {format.bvolume}
+{ volume empty$
+ { "" }
+ { bbl.volume volume tie.or.space.connect
+ series empty$
+ 'skip$
+ { bbl.of space.word * series emphasize * }
+ if$
+ "volume and number" number either.or.check
+ }
+ if$
+}
+
+FUNCTION {format.number.series}
+{ volume empty$
+ { number empty$
+ { series field.or.null }
+ { output.state mid.sentence =
+ { bbl.number }
+ { bbl.number capitalize }
+ if$
+ number tie.or.space.connect
+ series empty$
+ { "there's a number but no series in " cite$ * warning$ }
+ { bbl.in space.word * series * }
+ if$
+ }
+ if$
+ }
+ { "" }
+ if$
+}
+
+FUNCTION {is.num}
+{ chr.to.int$
+ duplicate$ "0" chr.to.int$ < not
+ swap$ "9" chr.to.int$ > not and
+}
+
+FUNCTION {extract.num}
+{ duplicate$ 't :=
+ "" 's :=
+ { t empty$ not }
+ { t #1 #1 substring$
+ t #2 global.max$ substring$ 't :=
+ duplicate$ is.num
+ { s swap$ * 's := }
+ { pop$ "" 't := }
+ if$
+ }
+ while$
+ s empty$
+ 'skip$
+ { pop$ s }
+ if$
+}
+
+FUNCTION {convert.edition}
+{ edition extract.num "l" change.case$ 's :=
+ s "first" = s "1" = or
+ { bbl.first 't := }
+ { s "second" = s "2" = or
+ { bbl.second 't := }
+ { s "third" = s "3" = or
+ { bbl.third 't := }
+ { s "fourth" = s "4" = or
+ { bbl.fourth 't := }
+ { s "fifth" = s "5" = or
+ { bbl.fifth 't := }
+ { s #1 #1 substring$ is.num
+ { s bbl.th * 't := }
+ { edition 't := }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+ t
+}
+
+FUNCTION {format.edition}
+{ edition empty$
+ { "" }
+ { output.state mid.sentence =
+ { convert.edition "l" change.case$ " " * bbl.edition * }
+ { convert.edition "t" change.case$ " " * bbl.edition * }
+ if$
+ }
+ if$
+}
+
+INTEGERS { multiresult }
+
+FUNCTION {multi.page.check}
+{ 't :=
+ #0 'multiresult :=
+ { multiresult not
+ t empty$ not
+ and
+ }
+ { t #1 #1 substring$
+ duplicate$ "-" =
+ swap$ duplicate$ "," =
+ swap$ "+" =
+ or or
+ { #1 'multiresult := }
+ { t #2 global.max$ substring$ 't := }
+ if$
+ }
+ while$
+ multiresult
+}
+
+FUNCTION {format.pages}
+{ pages empty$
+ { "" }
+ { pages multi.page.check
+ { bbl.pages pages n.dashify tie.or.space.connect }
+ { bbl.page pages tie.or.space.connect }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.journal.pages}
+{
+ pages empty$
+ 'skip$
+ { duplicate$ empty$
+ { pop$ format.pages }
+ { ":" * pages n.dashify * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.vol.num.pages}
+{ volume field.or.null
+ number empty$
+ 'skip$
+ {
+ "(" number * ")" * *
+ volume empty$
+ { "there's a number but no volume in " cite$ * warning$ }
+ 'skip$
+ if$
+ }
+ if$
+ format.journal.pages
+}
+
+FUNCTION {format.chapter.pages}
+{ chapter empty$
+ 'format.pages
+ { type empty$
+ { bbl.chapter }
+ { type "l" change.case$ }
+ if$
+ chapter tie.or.space.connect
+ pages empty$
+ 'skip$
+ { ", " * format.pages * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.in.ed.booktitle}
+{ booktitle empty$
+ { "" }
+ { editor empty$
+ { word.in booktitle emphasize * }
+ { word.in format.in.editors * ", " *
+ booktitle emphasize * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {empty.misc.check}
+{ author empty$ title empty$ howpublished empty$
+ month empty$ year empty$ note empty$
+ and and and and and
+ key empty$ not and
+ { "all relevant fields are empty in " cite$ * warning$ }
+ 'skip$
+ if$
+}
+
+FUNCTION {format.thesis.type}
+{ type empty$
+ 'skip$
+ { pop$
+ type "t" change.case$
+ }
+ if$
+}
+
+FUNCTION {format.tr.number}
+{ type empty$
+ { bbl.techrep }
+ 'type
+ if$
+ number empty$
+ { "t" change.case$ }
+ { number tie.or.space.connect }
+ if$
+}
+
+FUNCTION {format.article.crossref}
+{
+ key empty$
+ { journal empty$
+ { "need key or journal for " cite$ * " to crossref " * crossref *
+ warning$
+ ""
+ }
+ { word.in journal emphasize * }
+ if$
+ }
+ { word.in key * " " *}
+ if$
+ " \cite{" * crossref * "}" *
+}
+
+FUNCTION {format.crossref.editor}
+{ editor #1 "{vv~}{ll}" format.name$
+ editor num.names$ duplicate$
+ #2 >
+ { pop$ " et~al." * }
+ { #2 <
+ 'skip$
+ { editor #2 "{ff }{vv }{ll}{ jj}" format.name$ "others" =
+ { " et~al." * }
+ { bbl.and space.word * editor #2 "{vv~}{ll}" format.name$ * }
+ if$
+ }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.book.crossref}
+{ volume empty$
+ { "empty volume in " cite$ * "'s crossref of " * crossref * warning$
+ word.in
+ }
+ { bbl.volume capitalize
+ volume tie.or.space.connect
+ bbl.of space.word *
+ }
+ if$
+ editor empty$
+ editor field.or.null author field.or.null =
+ or
+ { key empty$
+ { series empty$
+ { "need editor, key, or series for " cite$ * " to crossref " *
+ crossref * warning$
+ "" *
+ }
+ { series emphasize * }
+ if$
+ }
+ { key * }
+ if$
+ }
+ { format.crossref.editor * }
+ if$
+ " \cite{" * crossref * "}" *
+}
+
+FUNCTION {format.incoll.inproc.crossref}
+{
+ editor empty$
+ editor field.or.null author field.or.null =
+ or
+ { key empty$
+ { booktitle empty$
+ { "need editor, key, or booktitle for " cite$ * " to crossref " *
+ crossref * warning$
+ ""
+ }
+ { word.in booktitle emphasize * }
+ if$
+ }
+ { word.in key * " " *}
+ if$
+ }
+ { word.in format.crossref.editor * " " *}
+ if$
+ " \cite{" * crossref * "}" *
+}
+
+FUNCTION {format.publisher}
+{ publisher empty$
+ { "empty publisher in " cite$ * warning$ }
+ 'skip$
+ if$
+ ""
+ address empty$ publisher empty$ and
+ 'skip$
+ {
+ publisher empty$
+ { address empty$
+ 'skip$
+ { address * }
+ if$
+ }
+ { publisher *
+ address empty$
+ 'skip$
+ { ", " * address * }
+ if$
+ }
+ if$
+ }
+ if$
+ output
+}
+
+FUNCTION {article}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.title "title" output.check
+ new.block
+ crossref missing$
+ { journal
+ emphasize
+ "journal" output.check
+ format.vol.num.pages output
+ format.date "year" output.check
+ }
+ { format.article.crossref output.nonnull
+ format.pages output
+ }
+ if$
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {book}
+{ output.bibitem
+ author empty$
+ { format.editors "author and editor" output.check
+ }
+ { format.authors output.nonnull
+ crossref missing$
+ { "author and editor" editor either.or.check }
+ 'skip$
+ if$
+ }
+ if$
+ new.block
+ format.btitle "title" output.check
+ crossref missing$
+ { format.bvolume output
+ new.block
+ format.number.series output
+ new.sentence
+ format.publisher
+ }
+ {
+ new.block
+ format.book.crossref output.nonnull
+ }
+ if$
+ format.edition output
+ format.date "year" output.check
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {booklet}
+{ output.bibitem
+ format.authors output
+ new.block
+ format.title "title" output.check
+ new.block
+ howpublished output
+ address output
+ format.date output
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {inbook}
+{ output.bibitem
+ author empty$
+ { format.editors "author and editor" output.check
+ }
+ { format.authors output.nonnull
+ crossref missing$
+ { "author and editor" editor either.or.check }
+ 'skip$
+ if$
+ }
+ if$
+ new.block
+ format.btitle "title" output.check
+ crossref missing$
+ {
+ format.bvolume output
+ format.chapter.pages "chapter and pages" output.check
+ new.block
+ format.number.series output
+ new.sentence
+ format.publisher
+ }
+ {
+ format.chapter.pages "chapter and pages" output.check
+ new.block
+ format.book.crossref output.nonnull
+ }
+ if$
+ format.edition output
+ format.date "year" output.check
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {incollection}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.title "title" output.check
+ new.block
+ crossref missing$
+ { format.in.ed.booktitle "booktitle" output.check
+ format.bvolume output
+ format.number.series output
+ format.chapter.pages output
+ new.sentence
+ format.publisher
+ format.edition output
+ format.date "year" output.check
+ }
+ { format.incoll.inproc.crossref output.nonnull
+ format.chapter.pages output
+ }
+ if$
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {inproceedings}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.title "title" output.check
+ new.block
+ crossref missing$
+ { format.in.ed.booktitle "booktitle" output.check
+ format.bvolume output
+ format.number.series output
+ format.pages output
+ new.sentence
+ publisher empty$
+ { organization output
+ address output
+ }
+ { organization output
+ format.publisher
+ }
+ if$
+ format.date "year" output.check
+ }
+ { format.incoll.inproc.crossref output.nonnull
+ format.pages output
+ }
+ if$
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {conference} { inproceedings }
+
+FUNCTION {manual}
+{ output.bibitem
+ author empty$
+ { organization empty$
+ 'skip$
+ { organization output.nonnull
+ address output
+ }
+ if$
+ }
+ { format.authors output.nonnull }
+ if$
+ new.block
+ format.btitle "title" output.check
+ author empty$
+ { organization empty$
+ {
+ address new.block.checka
+ address output
+ }
+ 'skip$
+ if$
+ }
+ {
+ organization address new.block.checkb
+ organization output
+ address output
+ }
+ if$
+ format.edition output
+ format.date output
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {mastersthesis}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.title "title" output.check
+ new.block
+ bbl.mthesis format.thesis.type output.nonnull
+ school "school" output.check
+ address output
+ format.date "year" output.check
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {misc}
+{ output.bibitem
+ format.authors output
+ title howpublished new.block.checkb
+ format.title output
+ howpublished new.block.checka
+ howpublished output
+ format.date output
+ new.block
+ note output
+ fin.entry
+ empty.misc.check
+}
+
+FUNCTION {phdthesis}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.btitle "title" output.check
+ new.block
+ bbl.phdthesis format.thesis.type output.nonnull
+ school "school" output.check
+ address output
+ format.date "year" output.check
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {proceedings}
+{ output.bibitem
+ editor empty$
+ { organization output }
+ { format.editors output.nonnull }
+ if$
+ new.block
+ format.btitle "title" output.check
+ format.bvolume output
+ format.number.series output
+ address empty$
+ { editor empty$
+ { publisher new.sentence.checka }
+ { organization publisher new.sentence.checkb
+ organization output
+ }
+ if$
+ publisher output
+ format.date "year" output.check
+ }
+ { address output.nonnull
+ format.date "year" output.check
+ new.sentence
+ editor empty$
+ 'skip$
+ { organization output }
+ if$
+ publisher output
+ }
+ if$
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {techreport}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.title "title" output.check
+ new.block
+ format.tr.number output.nonnull
+ institution "institution" output.check
+ address output
+ format.date "year" output.check
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {unpublished}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.title "title" output.check
+ new.block
+ note "note" output.check
+ format.date output
+ fin.entry
+}
+
+FUNCTION {default.type} { misc }
+
+READ
+
+FUNCTION {sortify}
+{ purify$
+ "l" change.case$
+}
+
+INTEGERS { len }
+
+FUNCTION {chop.word}
+{ 's :=
+ 'len :=
+ s #1 len substring$ =
+ { s len #1 + global.max$ substring$ }
+ 's
+ if$
+}
+
+INTEGERS { et.al.char.used }
+
+FUNCTION {initialize.et.al.char.used}
+{ #0 'et.al.char.used :=
+}
+
+EXECUTE {initialize.et.al.char.used}
+
+FUNCTION {format.lab.names}
+{ 's :=
+ s num.names$ 'numnames :=
+ numnames #1 >
+ { numnames #4 >
+ { #3 'namesleft := }
+ { numnames 'namesleft := }
+ if$
+ #1 'nameptr :=
+ ""
+ { namesleft #0 > }
+ { nameptr numnames =
+ { s nameptr "{ff }{vv }{ll}{ jj}" format.name$ "others" =
+ { "{\etalchar{+}}" *
+ #1 'et.al.char.used :=
+ }
+ { s nameptr "{v{}}{l{}}" format.name$ * }
+ if$
+ }
+ { s nameptr "{v{}}{l{}}" format.name$ * }
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+ numnames #4 >
+ { "{\etalchar{+}}" *
+ #1 'et.al.char.used :=
+ }
+ 'skip$
+ if$
+ }
+ { s #1 "{v{}}{l{}}" format.name$
+ duplicate$ text.length$ #2 <
+ { pop$ s #1 "{ll}" format.name$ #3 text.prefix$ }
+ 'skip$
+ if$
+ }
+ if$
+}
+
+FUNCTION {author.key.label}
+{ author empty$
+ { key empty$
+ { cite$ #1 #3 substring$ }
+ { key #3 text.prefix$ }
+ if$
+ }
+ { author format.lab.names }
+ if$
+}
+
+FUNCTION {author.editor.key.label}
+{ author empty$
+ { editor empty$
+ { key empty$
+ { cite$ #1 #3 substring$ }
+ { key #3 text.prefix$ }
+ if$
+ }
+ { editor format.lab.names }
+ if$
+ }
+ { author format.lab.names }
+ if$
+}
+
+FUNCTION {author.key.organization.label}
+{ author empty$
+ { key empty$
+ { organization empty$
+ { cite$ #1 #3 substring$ }
+ { "The " #4 organization chop.word #3 text.prefix$ }
+ if$
+ }
+ { key #3 text.prefix$ }
+ if$
+ }
+ { author format.lab.names }
+ if$
+}
+
+FUNCTION {editor.key.organization.label}
+{ editor empty$
+ { key empty$
+ { organization empty$
+ { cite$ #1 #3 substring$ }
+ { "The " #4 organization chop.word #3 text.prefix$ }
+ if$
+ }
+ { key #3 text.prefix$ }
+ if$
+ }
+ { editor format.lab.names }
+ if$
+}
+
+FUNCTION {calc.label}
+{ type$ "book" =
+ type$ "inbook" =
+ or
+ 'author.editor.key.label
+ { type$ "proceedings" =
+ 'editor.key.organization.label
+ { type$ "manual" =
+ 'author.key.organization.label
+ 'author.key.label
+ if$
+ }
+ if$
+ }
+ if$
+ duplicate$
+ year field.or.null purify$ #-1 #2 substring$
+ *
+ 'label :=
+ year field.or.null purify$ #-1 #4 substring$
+ *
+ sortify 'sort.label :=
+}
+
+FUNCTION {sort.format.names}
+{ 's :=
+ #1 'nameptr :=
+ ""
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ { s nameptr
+ "{vv{ } }{ll{ }}{ ff{ }}{ jj{ }}"
+ format.name$ 't :=
+ nameptr #1 >
+ {
+ " " *
+ namesleft #1 = t "others" = and
+ { "aaaaa" * }
+ { t sortify * }
+ if$
+ }
+ { t sortify * }
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+}
+
+FUNCTION {sort.format.title}
+{ 't :=
+ "A " #2
+ "An " #3
+ "The " #4 t chop.word
+ chop.word
+ chop.word
+ sortify
+ #1 global.max$ substring$
+}
+
+FUNCTION {author.sort}
+{ author empty$
+ { key empty$
+ { "to sort, need author or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { author sort.format.names }
+ if$
+}
+
+FUNCTION {author.editor.sort}
+{ author empty$
+ { editor empty$
+ { key empty$
+ { "to sort, need author, editor, or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { editor sort.format.names }
+ if$
+ }
+ { author sort.format.names }
+ if$
+}
+
+FUNCTION {author.organization.sort}
+{ author empty$
+ { organization empty$
+ { key empty$
+ { "to sort, need author, organization, or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { "The " #4 organization chop.word sortify }
+ if$
+ }
+ { author sort.format.names }
+ if$
+}
+
+FUNCTION {editor.organization.sort}
+{ editor empty$
+ { organization empty$
+ { key empty$
+ { "to sort, need editor, organization, or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { "The " #4 organization chop.word sortify }
+ if$
+ }
+ { editor sort.format.names }
+ if$
+}
+
+FUNCTION {presort}
+{ calc.label
+ sort.label
+ " "
+ *
+ type$ "book" =
+ type$ "inbook" =
+ or
+ 'author.editor.sort
+ { type$ "proceedings" =
+ 'editor.organization.sort
+ { type$ "manual" =
+ 'author.organization.sort
+ 'author.sort
+ if$
+ }
+ if$
+ }
+ if$
+ *
+ " "
+ *
+ year field.or.null sortify
+ *
+ " "
+ *
+ title field.or.null
+ sort.format.title
+ *
+ #1 entry.max$ substring$
+ 'sort.key$ :=
+}
+
+ITERATE {presort}
+
+SORT
+
+STRINGS { longest.label last.sort.label next.extra }
+
+INTEGERS { longest.label.width last.extra.num }
+
+FUNCTION {initialize.longest.label}
+{ "" 'longest.label :=
+ #0 int.to.chr$ 'last.sort.label :=
+ "" 'next.extra :=
+ #0 'longest.label.width :=
+ #0 'last.extra.num :=
+}
+
+FUNCTION {forward.pass}
+{ last.sort.label sort.label =
+ { last.extra.num #1 + 'last.extra.num :=
+ last.extra.num int.to.chr$ 'extra.label :=
+ }
+ { "a" chr.to.int$ 'last.extra.num :=
+ "" 'extra.label :=
+ sort.label 'last.sort.label :=
+ }
+ if$
+}
+
+FUNCTION {reverse.pass}
+{ next.extra "b" =
+ { "a" 'extra.label := }
+ 'skip$
+ if$
+ label extra.label * 'label :=
+ label width$ longest.label.width >
+ { label 'longest.label :=
+ label width$ 'longest.label.width :=
+ }
+ 'skip$
+ if$
+ extra.label 'next.extra :=
+}
+
+EXECUTE {initialize.longest.label}
+
+ITERATE {forward.pass}
+
+REVERSE {reverse.pass}
+
+FUNCTION {begin.bib}
+{ et.al.char.used
+ { "\newcommand{\etalchar}[1]{$^{#1}$}" write$ newline$ }
+ 'skip$
+ if$
+ preamble$ empty$
+ 'skip$
+ { preamble$ write$ newline$ }
+ if$
+ "\begin{thebibliography}{" longest.label * "}" *
+ write$ newline$
+}
+
+EXECUTE {begin.bib}
+
+EXECUTE {init.state.consts}
+
+ITERATE {call.type$}
+
+FUNCTION {end.bib}
+{ newline$
+ "\end{thebibliography}" write$ newline$
+}
+
+EXECUTE {end.bib}
+%% End of customized bst file
+%%
+%% End of file `caalpha.bst'. \ No newline at end of file
diff --git a/biblio/bibtex/contrib/catalan/bibtex/bst/caauda0.bst b/biblio/bibtex/contrib/catalan/bibtex/bst/caauda0.bst
new file mode 100644
index 0000000000..f2922b749d
--- /dev/null
+++ b/biblio/bibtex/contrib/catalan/bibtex/bst/caauda0.bst
@@ -0,0 +1,2020 @@
+%%
+%% This is file `caauda0.bst',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% merlin.mbs (with options: `head,exlang,ay,nat,lang,vonx,nm-revf,aunm-semi,nmdash,nmlm,x3,m1,nmft,nmft-sc,fnm-rm,nmfted,nmand-rm,lab,lab-sc,and-rm,xlab-it,keyxyr,dt-beg,xmth,yr-par,yrp-col,note-yr,tit-qq,qt-g,qx,volp-sp,jwdpg,jwdvol,ser-vol,isbn,issn,doi,edparxc,edby-par,edbyy,catalan,ps,ed,nom,and-xcom,xand,etal-it,eprint,url,url-nt,nfss,,{}')
+%% catalan.mbs (with options: `exlang,ay,nat,lang,vonx,nm-revf,aunm-semi,nmdash,nmlm,x3,m1,nmft,nmft-sc,fnm-rm,nmfted,nmand-rm,lab,lab-sc,and-rm,xlab-it,keyxyr,dt-beg,xmth,yr-par,yrp-col,note-yr,tit-qq,qt-g,qx,volp-sp,jwdpg,jwdvol,ser-vol,isbn,issn,doi,edparxc,edby-par,edbyy,catalan,ps,ed,nom,and-xcom,xand,etal-it,eprint,url,url-nt,nfss,,{}')
+%% physjour.mbs (with options: `exlang,ay,nat,lang,vonx,nm-revf,aunm-semi,nmdash,nmlm,x3,m1,nmft,nmft-sc,fnm-rm,nmfted,nmand-rm,lab,lab-sc,and-rm,xlab-it,keyxyr,dt-beg,xmth,yr-par,yrp-col,note-yr,tit-qq,qt-g,qx,volp-sp,jwdpg,jwdvol,ser-vol,isbn,issn,doi,edparxc,edby-par,edbyy,catalan,ps,ed,nom,and-xcom,xand,etal-it,eprint,url,url-nt,nfss,,{}')
+%% geojour.mbs (with options: `exlang,ay,nat,lang,vonx,nm-revf,aunm-semi,nmdash,nmlm,x3,m1,nmft,nmft-sc,fnm-rm,nmfted,nmand-rm,lab,lab-sc,and-rm,xlab-it,keyxyr,dt-beg,xmth,yr-par,yrp-col,note-yr,tit-qq,qt-g,qx,volp-sp,jwdpg,jwdvol,ser-vol,isbn,issn,doi,edparxc,edby-par,edbyy,catalan,ps,ed,nom,and-xcom,xand,etal-it,eprint,url,url-nt,nfss,,{}')
+%% photjour.mbs (with options: `exlang,ay,nat,lang,vonx,nm-revf,aunm-semi,nmdash,nmlm,x3,m1,nmft,nmft-sc,fnm-rm,nmfted,nmand-rm,lab,lab-sc,and-rm,xlab-it,keyxyr,dt-beg,xmth,yr-par,yrp-col,note-yr,tit-qq,qt-g,qx,volp-sp,jwdpg,jwdvol,ser-vol,isbn,issn,doi,edparxc,edby-par,edbyy,catalan,ps,ed,nom,and-xcom,xand,etal-it,eprint,url,url-nt,nfss,,{}')
+%% merlin.mbs (with options: `tail,exlang,ay,nat,lang,vonx,nm-revf,aunm-semi,nmdash,nmlm,x3,m1,nmft,nmft-sc,fnm-rm,nmfted,nmand-rm,lab,lab-sc,and-rm,xlab-it,keyxyr,dt-beg,xmth,yr-par,yrp-col,note-yr,tit-qq,qt-g,qx,volp-sp,jwdpg,jwdvol,ser-vol,isbn,issn,doi,edparxc,edby-par,edbyy,catalan,ps,ed,nom,and-xcom,xand,etal-it,eprint,url,url-nt,nfss,,{}')
+%% ----------------------------------------
+%% *** catalan author-date BibTeX style (by Robert Fuster using makebst, 19/11/04) ***
+%% *** this BibTeX style requires the natbib LaTeX style***
+%% *** year follows author(s) ***
+%%
+%% Copyright 1994-2004 Patrick W Daly
+ % ===============================================================
+ % IMPORTANT NOTICE:
+ % This bibliographic style (bst) file has been generated from one or
+ % more master bibliographic style (mbs) files, listed above.
+ %
+ % This generated file can be redistributed and/or modified under the terms
+ % of the LaTeX Project Public License Distributed from CTAN
+ % archives in directory macros/latex/base/lppl.txt; either
+ % version 1 of the License, or any later version.
+ % ===============================================================
+ % Name and version information of the main mbs file:
+ % \ProvidesFile{merlin.mbs}[2004/02/09 4.13 (PWD, AO, DPC)]
+ % For use with BibTeX version 0.99a or later
+ %-------------------------------------------------------------------
+ % This bibliography style file is intended for texts in
+ % CATALAN
+ % This is an author-year citation style bibliography. As such, it is
+ % non-standard LaTeX, and requires a special package file to function properly.
+ % Such a package is natbib.sty by Patrick W. Daly
+ % The form of the \bibitem entries is
+ % \bibitem[Jones et al.(1990)]{key}...
+ % \bibitem[Jones et al.(1990)Jones, Baker, and Smith]{key}...
+ % The essential feature is that the label (the part in brackets) consists
+ % of the author names, as they should appear in the citation, with the year
+ % in parentheses following. There must be no space before the opening
+ % parenthesis!
+ % With natbib v5.3, a full list of authors may also follow the year.
+ % In natbib.sty, it is possible to define the type of enclosures that is
+ % really wanted (brackets or parentheses), but in either case, there must
+ % be parentheses in the label.
+ % The \cite command functions as follows:
+ % \citet{key} ==>> Jones et al. (1990)
+ % \citet*{key} ==>> Jones, Baker, and Smith (1990)
+ % \citep{key} ==>> (Jones et al., 1990)
+ % \citep*{key} ==>> (Jones, Baker, and Smith, 1990)
+ % \citep[chap. 2]{key} ==>> (Jones et al., 1990, chap. 2)
+ % \citep[e.g.][]{key} ==>> (e.g. Jones et al., 1990)
+ % \citep[e.g.][p. 32]{key} ==>> (e.g. Jones et al., p. 32)
+ % \citeauthor{key} ==>> Jones et al.
+ % \citeauthor*{key} ==>> Jones, Baker, and Smith
+ % \citeyear{key} ==>> 1990
+ %---------------------------------------------------------------------
+
+ENTRY
+ { address
+ archive
+ author
+ booktitle
+ chapter
+ doi
+ edition
+ editor
+ eid
+ eprint
+ howpublished
+ institution
+ isbn
+ issn
+ journal
+ key
+ language
+ month
+ note
+ number
+ organization
+ pages
+ publisher
+ school
+ series
+ title
+ type
+ url
+ volume
+ year
+ }
+ {}
+ { label extra.label sort.label short.list }
+INTEGERS { output.state before.all mid.sentence after.sentence after.block }
+FUNCTION {init.state.consts}
+{ #0 'before.all :=
+ #1 'mid.sentence :=
+ #2 'after.sentence :=
+ #3 'after.block :=
+}
+STRINGS { s t}
+FUNCTION {output.nonnull}
+{ 's :=
+ output.state mid.sentence =
+ { ", " * write$ }
+ { output.state after.block =
+ { add.period$ write$
+ newline$
+ "\newblock " write$
+ }
+ { output.state before.all =
+ 'write$
+ { add.period$ " " * write$ }
+ if$
+ }
+ if$
+ mid.sentence 'output.state :=
+ }
+ if$
+ s
+}
+FUNCTION {output}
+{ duplicate$ empty$
+ 'pop$
+ 'output.nonnull
+ if$
+}
+FUNCTION {output.check}
+{ 't :=
+ duplicate$ empty$
+ { pop$ "empty " t * " in " * cite$ * warning$ }
+ 'output.nonnull
+ if$
+}
+FUNCTION {fin.entry}
+{ add.period$
+ write$
+ newline$
+}
+
+FUNCTION {new.block}
+{ output.state before.all =
+ 'skip$
+ { after.block 'output.state := }
+ if$
+}
+FUNCTION {new.sentence}
+{ output.state after.block =
+ 'skip$
+ { output.state before.all =
+ 'skip$
+ { after.sentence 'output.state := }
+ if$
+ }
+ if$
+}
+FUNCTION {add.blank}
+{ " " * before.all 'output.state :=
+}
+
+FUNCTION {date.block}
+{
+ ":" *
+ add.blank
+}
+
+FUNCTION {not}
+{ { #0 }
+ { #1 }
+ if$
+}
+FUNCTION {and}
+{ 'skip$
+ { pop$ #0 }
+ if$
+}
+FUNCTION {or}
+{ { pop$ #1 }
+ 'skip$
+ if$
+}
+FUNCTION {non.stop}
+{ duplicate$
+ "}" * add.period$
+ #-1 #1 substring$ "." =
+}
+
+FUNCTION {new.block.checkb}
+{ empty$
+ swap$ empty$
+ and
+ 'skip$
+ 'new.block
+ if$
+}
+FUNCTION {field.or.null}
+{ duplicate$ empty$
+ { pop$ "" }
+ 'skip$
+ if$
+}
+FUNCTION {emphasize}
+{ duplicate$ empty$
+ { pop$ "" }
+ { "\emph{" swap$ * "}" * }
+ if$
+}
+FUNCTION {scaps}
+{ duplicate$ empty$
+ { pop$ "" }
+ { "\textsc{" swap$ * "}" * }
+ if$
+}
+FUNCTION {bib.name.font}
+{ scaps }
+FUNCTION {bib.fname.font}
+{ skip$ }
+FUNCTION {cite.name.font}
+{ scaps }
+FUNCTION {tie.or.space.prefix}
+{ duplicate$ text.length$ #3 <
+ { "~" }
+ { " " }
+ if$
+ swap$
+}
+
+FUNCTION {capitalize}
+{ "u" change.case$ "t" change.case$ }
+
+FUNCTION {space.word}
+{ " " swap$ * " " * }
+ % Here are the language-specific definitions for explicit words.
+ % Each function has a name bbl.xxx where xxx is the English word.
+ %-------------------------------------------------------------------
+ % Begin module: catalan.mbs
+ % \ProvidesFile{catalan.mbs}[2003/11/06 4.2 (PWD)]
+
+ % The language selected here is CATALAN
+FUNCTION {bbl.and}
+{ "i"}
+
+FUNCTION {bbl.etal}
+{ "et~al." }
+
+FUNCTION {bbl.editors}
+{ "eds." }
+
+FUNCTION {bbl.editor}
+{ "ed." }
+
+FUNCTION {bbl.edby}
+{ "editat per" }
+
+FUNCTION {bbl.edition}
+{ "edici\'o" }
+
+FUNCTION {bbl.volume}
+{ "volum" }
+
+FUNCTION {bbl.of}
+{ "de" }
+
+FUNCTION {bbl.number}
+{ "n\'umero" }
+
+FUNCTION {bbl.nr}
+{ "n." }
+
+FUNCTION {bbl.in}
+{ "dins" }
+
+FUNCTION {bbl.pages}
+{ "ps." }
+
+FUNCTION {bbl.page}
+{ "p." }
+
+FUNCTION {bbl.chapter}
+{ "cap\'{\i}tol" }
+
+FUNCTION {bbl.techrep}
+{ "Report t{\`e}cnic" }
+
+FUNCTION {bbl.mthesis}
+{ "Projecte F. de Carrera o Tesina de L." }
+
+FUNCTION {bbl.phdthesis}
+{ "Tesi Doctoral" }
+
+FUNCTION {bbl.first}
+{ "primera" }
+
+FUNCTION {bbl.second}
+{ "segona" }
+
+FUNCTION {bbl.third}
+{ "tercera" }
+
+FUNCTION {bbl.fourth}
+{ "quarta" }
+
+FUNCTION {bbl.fifth}
+{ "cinquena" }
+
+FUNCTION {bbl.th}
+{ "a" }
+
+MACRO {jan} {"gener"}
+
+MACRO {feb} {"febrer"}
+
+MACRO {mar} {"mar\c{c}"}
+
+MACRO {apr} {"abril"}
+
+MACRO {may} {"maig"}
+
+MACRO {jun} {"juny"}
+
+MACRO {jul} {"juliol"}
+
+MACRO {aug} {"agost"}
+
+MACRO {sep} {"setembre"}
+
+MACRO {oct} {"octubre"}
+
+MACRO {nov} {"novembre"}
+
+MACRO {dec} {"desembre"}
+
+ % End module: catalan.mbs
+ % \end{macrocode}
+ %-------------------------------------------------------------------
+ % Begin module:
+ % \ProvidesFile{physjour.mbs}[2002/01/14 2.2 (PWD)]
+MACRO {aa}{"Astronomy and Astrophysics"}
+MACRO {aasup}{"Astronomy and Astrophysics, Supplement Series"}
+MACRO {aj}{"Astronomical Journal"}
+MACRO {aph} {"Acta Physica"}
+MACRO {advp} {"Advances in Physics"}
+MACRO {ajp} {"American Journal of Physics"}
+MACRO {ajm} {"American Journal of Mathematics"}
+MACRO {amsci} {"American Scientist"}
+MACRO {anofd} {"Annals of Fluid Dynamics"}
+MACRO {am} {"Annals of Mathematics"}
+MACRO {ap} {"Annals of Physics"}
+MACRO {adp} {"Annalen der Physik"}
+MACRO {ao} {"Applied Optics"}
+MACRO {apl} {"Applied Physics Letters"}
+MACRO {app} {"Astroparticle Physics"}
+MACRO {apj} {"Astrophysical Journal"}
+MACRO {apjsup} {"Astrophysical Journal Supplement"}
+MACRO {apss} {"Astrophysics and Space Science"}
+MACRO {araa} {"Annual Review of Astronomy and Astrophysics"}
+MACRO {baas} {"Bulletin of the American Astronomical Society"}
+MACRO {baps} {"Bulletin of the American Physical Society"}
+MACRO {cmp} {"Communications in Mathematical Physics"}
+MACRO {cpam} {"Communications on Pure and Applied Mathematics"}
+MACRO {cppcf} {"Comments on Plasma Physics and Controlled Fusion"}
+MACRO {cpc} {"Computer Physics Communications"}
+MACRO {cqg} {"Classical and Quantum Gravity"}
+MACRO {cra} {"Comptes Rendus des S{\'e}ances de l'Acad{\'e}mie des Sciences A"}
+MACRO {fed} {"Fusion Engineering and Design"}
+MACRO {ft} {"Fusion Technology"}
+MACRO {grg} {"General Relativity and Gravitation"}
+MACRO {ieeens} {"IEEE Transactions on Nuclear Science"}
+MACRO {ieeeps} {"IEEE Transactions on Plasma Science"}
+MACRO {ijimw} {"International Journal of Infrared and Millimeter Waves"}
+MACRO {ip} {"Infrared Physics"}
+MACRO {irp} {"Infrared Physics"}
+MACRO {jap} {"Journal of Applied Physics"}
+MACRO {jasa} {"Journal of the Acoustical Society of America"}
+MACRO {jcp} {"Journal of Computational Physics"}
+MACRO {jetp} {"Soviet Physics--JETP"}
+MACRO {jfe} {"Journal of Fusion Energy"}
+MACRO {jfm} {"Journal of Fluid Mechanics"}
+MACRO {jmp} {"Journal of Mathematical Physics"}
+MACRO {jne} {"Journal of Nuclear Energy"}
+MACRO {jnec} {"Journal of Nuclear Energy, Part C: Plasma Physics, Accelerators, Thermonuclear Research"}
+MACRO {jnm} {"Journal of Nuclear Materials"}
+MACRO {jpc} {"Journal of Physical Chemistry"}
+MACRO {jpp} {"Journal of Plasma Physics"}
+MACRO {jpsj} {"Journal of the Physical Society of Japan"}
+MACRO {jsi} {"Journal of Scientific Instruments"}
+MACRO {jvst} {"Journal of Vacuum Science and Technology"}
+MACRO {nat} {"Nature"}
+MACRO {nature} {"Nature"}
+MACRO {nedf} {"Nuclear Engineering and Design/Fusion"}
+MACRO {nf} {"Nuclear Fusion"}
+MACRO {nim} {"Nuclear Instruments and Methods"}
+MACRO {nimpr} {"Nuclear Instruments and Methods in Physics Research"}
+MACRO {np} {"Nuclear Physics"}
+MACRO {npb} {"Nuclear Physics B"}
+MACRO {nt/f} {"Nuclear Technology/Fusion"}
+MACRO {npbpc} {"Nuclear Physics B (Proceedings Supplements)"}
+MACRO {inc} {"Il Nuovo Cimento"}
+MACRO {nc} {"Nuovo Cimento"}
+MACRO {pf} {"Physics of Fluids"}
+MACRO {pfa} {"Physics of Fluids A: Fluid Dynamics"}
+MACRO {pfb} {"Physics of Fluids B: Plasma Physics"}
+MACRO {pl} {"Physics Letters"}
+MACRO {pla} {"Physics Letters A"}
+MACRO {plb} {"Physics Letters B"}
+MACRO {prep} {"Physics Reports"}
+MACRO {pnas} {"Proceedings of the National Academy of Sciences of the USA"}
+MACRO {pp} {"Physics of Plasmas"}
+MACRO {ppcf} {"Plasma Physics and Controlled Fusion"}
+MACRO {phitrsl} {"Philosophical Transactions of the Royal Society of London"}
+MACRO {prl} {"Physical Review Letters"}
+MACRO {pr} {"Physical Review"}
+MACRO {physrev} {"Physical Review"}
+MACRO {pra} {"Physical Review A"}
+MACRO {prb} {"Physical Review B"}
+MACRO {prc} {"Physical Review C"}
+MACRO {prd} {"Physical Review D"}
+MACRO {pre} {"Physical Review E"}
+MACRO {ps} {"Physica Scripta"}
+MACRO {procrsl} {"Proceedings of the Royal Society of London"}
+MACRO {rmp} {"Reviews of Modern Physics"}
+MACRO {rsi} {"Review of Scientific Instruments"}
+MACRO {science} {"Science"}
+MACRO {sciam} {"Scientific American"}
+MACRO {sam} {"Studies in Applied Mathematics"}
+MACRO {sjpp} {"Soviet Journal of Plasma Physics"}
+MACRO {spd} {"Soviet Physics--Doklady"}
+MACRO {sptp} {"Soviet Physics--Technical Physics"}
+MACRO {spu} {"Soviet Physics--Uspeki"}
+MACRO {st} {"Sky and Telescope"}
+ % End module: physjour.mbs
+ %-------------------------------------------------------------------
+ % Begin module:
+ % \ProvidesFile{geojour.mbs}[2002/07/10 2.0h (PWD)]
+MACRO {aisr} {"Advances in Space Research"}
+MACRO {ag} {"Annales Geophysic\ae"}
+MACRO {anigeo} {"Annali di Geofisica"}
+MACRO {angl} {"Annals of Glaciology"}
+MACRO {andmet} {"Annalen der Meteorologie"}
+MACRO {andgeo} {"Annales de Geophysique"}
+MACRO {andphy} {"Annales de Physique"}
+MACRO {afmgb} {"Archiv f\^^b{u}r Meteorologie, Geophysik und Bioklimatologie"}
+MACRO {ass}{"Astrophysics and Space Science"}
+MACRO {atph} {"Atm\'osphera"}
+MACRO {aao} {"Atmosphere-Ocean"}
+MACRO {atenv} {"Atmospheric Environment"}
+MACRO {aujag} {"Australian Journal of Agricultural Research"}
+MACRO {aumet} {"Australian Meteorological Magazine"}
+MACRO {blmet} {"Boundary-Layer Meteorology"}
+MACRO {bams} {"Bulletin of the American Meteorological Society"}
+MACRO {cch} {"Climatic Change"}
+MACRO {cdyn} {"Climate Dynamics"}
+MACRO {cbul} {"Climatological Bulletin"}
+MACRO {cap} {"Contributions to Atmospheric Physics"}
+MACRO {dsr} {"Deep-Sea Research"}
+MACRO {dhz} {"Deutsche Hydrographische Zeitschrift"}
+MACRO {dao} {"Dynamics of Atmospheres and Oceans"}
+MACRO {eco} {"Ecology"}
+MACRO {empl}{"Earth, Moon and Planets"}
+MACRO {envres} {"Environmental Research"}
+MACRO {envst} {"Environmental Science and Technology"}
+MACRO {ecms} {"Estuarine and Coastal Marine Science"}
+MACRO {expa}{"Experimental Astronomy"}
+MACRO {geoint} {"Geofisica Internationale"}
+MACRO {geopub} {"Geofysiske Publikasjoner"}
+MACRO {geogeo} {"Geologiya i Geofizika"}
+MACRO {gafd} {"Geophysical and Astrophysical Fluid Dynamics"}
+MACRO {gfd} {"Geophysical Fluid Dynamics"}
+MACRO {geomag} {"Geophysical Magazine"}
+MACRO {georl} {"Geophysical Research Letters"}
+MACRO {grl} {"Geophysical Research Letters"}
+MACRO {ga} {"Geophysica"}
+MACRO {gs} {"Geophysics"}
+MACRO {ieeetap} {"IEEE Transactions on Antennas and Propagation"}
+MACRO {ijawp} {"International Journal of Air and Water Pollution"}
+MACRO {ijc} {"International Journal of Climatology"}
+MACRO {ijrs} {"International Journal of Remote Sensing"}
+MACRO {jam} {"Journal of Applied Meteorology"}
+MACRO {jaot} {"Journal of Atmospheric and Oceanic Technology"}
+MACRO {jatp} {"Journal of Atmospheric and Terrestrial Physics"}
+MACRO {jastp} {"Journal of Atmospheric and Solar-Terrestrial Physics"}
+MACRO {jce} {"Journal of Climate"}
+MACRO {jcam} {"Journal of Climate and Applied Meteorology"}
+MACRO {jcm} {"Journal of Climate Meteorology"}
+MACRO {jcy} {"journal of Climatology"}
+MACRO {jgr} {"Journal of Geophysical Research"}
+MACRO {jga} {"Journal of Glaciology"}
+MACRO {jh} {"Journal of Hydrology"}
+MACRO {jmr} {"Journal of Marine Research"}
+MACRO {jmrj} {"Journal of Meteorological Research, Japan"}
+MACRO {jm} {"Journal of Meteorology"}
+MACRO {jpo} {"Journal of Physical Oceanography"}
+MACRO {jra} {"Journal de Recherches Atmospheriques"}
+MACRO {jaes} {"Journal of the Aeronautical Sciences"}
+MACRO {japca} {"Journal of the Air Pollution Control Association"}
+MACRO {jas} {"Journal of the Atmospheric Sciences"}
+MACRO {jmts} {"Journal of the Marine Technology Society"}
+MACRO {jmsj} {"Journal of Meteorological Society of Japan"}
+MACRO {josj} {"Journal of the Oceanographical Society of Japan"}
+MACRO {jwm} {"Journal of Weather Modification"}
+MACRO {lao} {"Limnology and Oceanography"}
+MACRO {mwl} {"Mariners Weather Log"}
+MACRO {mau} {"Mausam"}
+MACRO {meteor} {"``Meteor'' Forschungsergebnisse"}
+MACRO {map} {"Meteorology and Atmospheric Physics"}
+MACRO {metmag} {"Meteorological Magazine"}
+MACRO {metmon} {"Meteorological Monographs"}
+MACRO {metrun} {"Meteorologische Rundschau"}
+MACRO {metzeit} {"Meteorologische Zeitschrift"}
+MACRO {metgid} {"Meteorologiya i Gidrologiya"}
+MACRO {mwr} {"Monthly Weather Review"}
+MACRO {nwd} {"National Weather Digest"}
+MACRO {nzjmfr} {"New Zealand Journal of Marine and Freshwater Research"}
+MACRO {npg} {"Nonlinear Processes in Geophysics"}
+MACRO {om} {"Oceanography and Meteorology"}
+MACRO {ocac} {"Oceanologica Acta"}
+MACRO {oceanus} {"Oceanus"}
+MACRO {paleoc} {"Paleoceanography"}
+MACRO {pce} {"Physics and Chemistry of the Earth"}
+MACRO {pmg} {"Papers in Meteorology and Geophysics"}
+MACRO {ppom} {"Papers in Physical Oceanography and Meteorology"}
+MACRO {physzeit} {"Physikalische Zeitschrift"}
+MACRO {pps} {"Planetary and Space Science"}
+MACRO {pss} {"Planetary and Space Science"}
+MACRO {pag} {"Pure and Applied Geophysics"}
+MACRO {qjrms} {"Quarterly Journal of the Royal Meteorological Society"}
+MACRO {quatres} {"Quaternary Research"}
+MACRO {rsci} {"Radio Science"}
+MACRO {rse} {"Remote Sensing of the Environment"}
+MACRO {rgeo} {"Reviews of Geophysics"}
+MACRO {rgsp} {"Reviews of Geophysics and Space Physics"}
+MACRO {rdgeo} {"Revista de Geofisica"}
+MACRO {revmeta} {"Revista Meteorologica"}
+MACRO {sgp}{"Surveys in Geophysics"}
+MACRO {sp} {"Solar Phys."}
+MACRO {ssr} {"Space Science Review"}
+MACRO {tellus} {"Tellus"}
+MACRO {tac} {"Theoretical and Applied Climatology"}
+MACRO {tagu} {"Transactions, American Geophysical Union (EOS)"}
+MACRO {wrr} {"Water Resources Research"}
+MACRO {weather} {"Weather"}
+MACRO {wafc} {"Weather and Forecasting"}
+MACRO {ww} {"Weatherwise"}
+MACRO {wmob} {"World Meteorological Organization Bulletin"}
+MACRO {zeitmet} {"Zeitschrift f\^^b{u}r Meteorologie"}
+ % End module: geojour.mbs
+ %-------------------------------------------------------------------
+ % Begin module:
+ % \ProvidesFile{photjour.mbs}[1999/02/24 2.0b (PWD)]
+
+MACRO {appopt} {"Applied Optics"}
+MACRO {bell} {"Bell Systems Technical Journal"}
+MACRO {ell} {"Electronics Letters"}
+MACRO {jasp} {"Journal of Applied Spectroscopy"}
+MACRO {jqe} {"IEEE Journal of Quantum Electronics"}
+MACRO {jlwt} {"Journal of Lightwave Technology"}
+MACRO {jmo} {"Journal of Modern Optics"}
+MACRO {josa} {"Journal of the Optical Society of America"}
+MACRO {josaa} {"Journal of the Optical Society of America~A"}
+MACRO {josab} {"Journal of the Optical Society of America~B"}
+MACRO {jdp} {"Journal de Physique"}
+MACRO {oc} {"Optics Communications"}
+MACRO {ol} {"Optics Letters"}
+MACRO {phtl} {"IEEE Photonics Technology Letters"}
+MACRO {pspie} {"Proceedings of the Society for Photo-Optical Instruments Engineers"}
+MACRO {sse} {"Solid-State Electronics"}
+MACRO {sjot} {"Soviet Journal of Optical Technology"}
+MACRO {sjqe} {"Soviet Journal of Quantum Electronics"}
+MACRO {sleb} {"Soviet Physics--Lebedev Institute Reports"}
+MACRO {stph} {"Soviet Physics--Technical Physics"}
+MACRO {stphl} {"Soviet Technical Physics Letters"}
+MACRO {vr} {"Vision Research"}
+MACRO {zph} {"Zeitschrift f\^^b{u}r Physik"}
+MACRO {zphb} {"Zeitschrift f\^^b{u}r Physik~B"}
+MACRO {zphd} {"Zeitschrift f\^^b{u}r Physik~D"}
+
+MACRO {CLEO} {"Conf. on Lasers and Electro-Optics"}
+MACRO {ASSL} {"Advanced Solid State Lasers"}
+MACRO {OSA} {"Optical Society of America"}
+ % End module: photjour.mbs
+%% Copyright 1994-2004 Patrick W Daly
+MACRO {acmcs} {"ACM Computing Surveys"}
+
+MACRO {acta} {"Acta Informatica"}
+
+MACRO {cacm} {"Communications of the ACM"}
+
+MACRO {ibmjrd} {"IBM Journal of Research and Development"}
+
+MACRO {ibmsj} {"IBM Systems Journal"}
+
+MACRO {ieeese} {"IEEE Transactions on Software Engineering"}
+
+MACRO {ieeetc} {"IEEE Transactions on Computers"}
+
+MACRO {ieeetcad}
+ {"IEEE Transactions on Computer-Aided Design of Integrated Circuits"}
+
+MACRO {ipl} {"Information Processing Letters"}
+
+MACRO {jacm} {"Journal of the ACM"}
+
+MACRO {jcss} {"Journal of Computer and System Sciences"}
+
+MACRO {scp} {"Science of Computer Programming"}
+
+MACRO {sicomp} {"SIAM Journal on Computing"}
+
+MACRO {tocs} {"ACM Transactions on Computer Systems"}
+
+MACRO {tods} {"ACM Transactions on Database Systems"}
+
+MACRO {tog} {"ACM Transactions on Graphics"}
+
+MACRO {toms} {"ACM Transactions on Mathematical Software"}
+
+MACRO {toois} {"ACM Transactions on Office Information Systems"}
+
+MACRO {toplas} {"ACM Transactions on Programming Languages and Systems"}
+
+MACRO {tcs} {"Theoretical Computer Science"}
+FUNCTION {bibinfo.check}
+{ swap$
+ duplicate$ missing$
+ {
+ pop$ pop$
+ ""
+ }
+ { duplicate$ empty$
+ {
+ swap$ pop$
+ }
+ { swap$
+ pop$
+ }
+ if$
+ }
+ if$
+}
+FUNCTION {bibinfo.warn}
+{ swap$
+ duplicate$ missing$
+ {
+ swap$ "missing " swap$ * " in " * cite$ * warning$ pop$
+ ""
+ }
+ { duplicate$ empty$
+ {
+ swap$ "empty " swap$ * " in " * cite$ * warning$
+ }
+ { swap$
+ pop$
+ }
+ if$
+ }
+ if$
+}
+FUNCTION {format.eprint}
+{ eprint duplicate$ empty$
+ 'skip$
+ { "\eprint"
+ archive empty$
+ 'skip$
+ { "[" * archive * "]" * }
+ if$
+ "{" * swap$ * "}" *
+ }
+ if$
+}
+STRINGS { bibinfo}
+INTEGERS { nameptr namesleft numnames }
+
+FUNCTION {format.names}
+{ 'bibinfo :=
+ duplicate$ empty$ 'skip$ {
+ 's :=
+ "" 't :=
+ #1 'nameptr :=
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ { s nameptr
+ "{vv~}{ll}" format.name$ bib.name.font
+ s nameptr
+ "{jj, }{ff}"
+ format.name$ duplicate$ empty$ 'skip$
+ { bib.fname.font ", " swap$ * }
+ if$
+ *
+ bibinfo bibinfo.check
+ 't :=
+ nameptr #1 >
+ {
+ nameptr #1
+ #1 + =
+ numnames #3
+ > and
+ { "others" 't :=
+ #1 'namesleft := }
+ 'skip$
+ if$
+ namesleft #1 >
+ { "; " * t * }
+ {
+ ";" *
+ s nameptr "{ll}" format.name$ duplicate$ "others" =
+ { 't := }
+ { pop$ }
+ if$
+ t "others" =
+ {
+ " " * bbl.etal emphasize *
+ }
+ { " " * t * }
+ if$
+ }
+ if$
+ }
+ 't
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+ } if$
+}
+FUNCTION {format.names.ed}
+{
+ 'bibinfo :=
+ duplicate$ empty$ 'skip$ {
+ 's :=
+ "" 't :=
+ #1 'nameptr :=
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ { s nameptr
+ "{ff}" format.name$ duplicate$ empty$ 'skip$
+ { tie.or.space.prefix bib.fname.font swap$ * }
+ if$
+ s nameptr
+ "{vv~}{ll}" format.name$ bib.name.font *
+ s nameptr
+ "{jj}" format.name$ duplicate$ empty$ 'skip$
+ { bib.fname.font ", " swap$ * }
+ if$
+ *
+ bibinfo bibinfo.check
+ 't :=
+ nameptr #1 >
+ {
+ namesleft #1 >
+ { "; " * t * }
+ {
+ ";" *
+ s nameptr "{ll}" format.name$ duplicate$ "others" =
+ { 't := }
+ { pop$ }
+ if$
+ t "others" =
+ {
+
+ " " * bbl.etal emphasize *
+ }
+ { " " * t * }
+ if$
+ }
+ if$
+ }
+ 't
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+ } if$
+}
+FUNCTION {format.key}
+{ empty$
+ { key field.or.null }
+ { "" }
+ if$
+}
+
+FUNCTION {format.authors}
+{ author "author" format.names
+}
+FUNCTION {get.bbl.editor}
+{ editor num.names$ #1 > 'bbl.editors 'bbl.editor if$ }
+
+FUNCTION {format.editors}
+{ editor "editor" format.names duplicate$ empty$ 'skip$
+ {
+ " " *
+ get.bbl.editor
+ "(" swap$ * ")" *
+ *
+ }
+ if$
+}
+FUNCTION {format.isbn}
+{ isbn "isbn" bibinfo.check
+ duplicate$ empty$ 'skip$
+ {
+ new.block
+ "ISBN " swap$ *
+ }
+ if$
+}
+
+FUNCTION {format.issn}
+{ issn "issn" bibinfo.check
+ duplicate$ empty$ 'skip$
+ {
+ new.block
+ "ISSN " swap$ *
+ }
+ if$
+}
+
+FUNCTION {format.doi}
+{ doi "doi" bibinfo.check
+ duplicate$ empty$ 'skip$
+ {
+ new.block
+ "\doi{" swap$ * "}" *
+ }
+ if$
+}
+FUNCTION {select.language}
+{ duplicate$ empty$
+ 'pop$
+ { language empty$
+ 'skip$
+ { "{\selectlanguage{" language * "}" * swap$ * "}" * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.note}
+{
+ url empty$
+ 'skip$
+ { "\urlprefix\url{" url * "}" * output }
+ if$
+ note empty$
+ { "" }
+ { note #1 #1 substring$
+ duplicate$ "{" =
+ 'skip$
+ { output.state mid.sentence =
+ { "l" }
+ { "u" }
+ if$
+ change.case$
+ }
+ if$
+ note #2 global.max$ substring$ * "note" bibinfo.check
+ }
+ if$
+}
+
+FUNCTION {format.title}
+{ title
+ duplicate$ empty$ 'skip$
+ { "t" change.case$ }
+ if$
+ "title" bibinfo.check
+ duplicate$ empty$ 'skip$
+ {
+ "\enquote{" swap$ *
+ "}" *
+ select.language
+ }
+ if$
+}
+FUNCTION {format.full.names}
+{'s :=
+ "" 't :=
+ #1 'nameptr :=
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ { s nameptr
+ "{vv~}{ll}" format.name$
+ cite.name.font
+ 't :=
+ nameptr #1 >
+ {
+ nameptr #1
+ #1 + =
+ numnames #3
+ > and
+ { "others" 't :=
+ #1 'namesleft := }
+ 'skip$
+ if$
+ namesleft #1 >
+ { ", " * t * }
+ {
+ s nameptr "{ll}" format.name$ duplicate$ "others" =
+ { 't := }
+ { pop$ }
+ if$
+ t "others" =
+ {
+ " " * bbl.etal emphasize *
+ }
+ {
+ bbl.and
+ space.word * t *
+ }
+ if$
+ }
+ if$
+ }
+ 't
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+}
+
+FUNCTION {author.editor.key.full}
+{ author empty$
+ { editor empty$
+ { key empty$
+ { cite$ #1 #3 substring$ }
+ 'key
+ if$
+ }
+ { editor format.full.names }
+ if$
+ }
+ { author format.full.names }
+ if$
+}
+
+FUNCTION {author.key.full}
+{ author empty$
+ { key empty$
+ { cite$ #1 #3 substring$ }
+ 'key
+ if$
+ }
+ { author format.full.names }
+ if$
+}
+
+FUNCTION {editor.key.full}
+{ editor empty$
+ { key empty$
+ { cite$ #1 #3 substring$ }
+ 'key
+ if$
+ }
+ { editor format.full.names }
+ if$
+}
+
+FUNCTION {make.full.names}
+{ type$ "book" =
+ type$ "inbook" =
+ or
+ 'author.editor.key.full
+ { type$ "proceedings" =
+ 'editor.key.full
+ 'author.key.full
+ if$
+ }
+ if$
+}
+
+FUNCTION {output.bibitem}
+{ newline$
+ "\bibitem[{" write$
+ label write$
+ ")" make.full.names duplicate$ short.list =
+ { pop$ }
+ { * }
+ if$
+ "}]{" * write$
+ cite$ write$
+ "}" write$
+ newline$
+ ""
+ before.all 'output.state :=
+}
+
+FUNCTION {n.dashify}
+{
+ 't :=
+ ""
+ { t empty$ not }
+ { t #1 #1 substring$ "-" =
+ { t #1 #2 substring$ "--" = not
+ { "--" *
+ t #2 global.max$ substring$ 't :=
+ }
+ { { t #1 #1 substring$ "-" = }
+ { "-" *
+ t #2 global.max$ substring$ 't :=
+ }
+ while$
+ }
+ if$
+ }
+ { t #1 #1 substring$ *
+ t #2 global.max$ substring$ 't :=
+ }
+ if$
+ }
+ while$
+}
+
+FUNCTION {word.in}
+{ bbl.in capitalize
+ " " * }
+
+FUNCTION {format.date}
+{ year "year" bibinfo.check duplicate$ empty$
+ {
+ "empty year in " cite$ * "; set to ????" * warning$
+ pop$ "????"
+ }
+ 'skip$
+ if$
+ extra.label *
+ before.all 'output.state :=
+ " (" swap$ * ")" *
+}
+FUNCTION {format.btitle}
+{ title "title" bibinfo.check
+ duplicate$ empty$ 'skip$
+ {
+ emphasize
+ select.language
+ }
+ if$
+}
+FUNCTION {either.or.check}
+{ empty$
+ 'pop$
+ { "can't use both " swap$ * " fields in " * cite$ * warning$ }
+ if$
+}
+FUNCTION {format.bvolume}
+{ volume empty$
+ { "" }
+ { bbl.volume volume tie.or.space.prefix
+ "volume" bibinfo.check * *
+ series "series" bibinfo.check
+ duplicate$ empty$ 'pop$
+ { emphasize ", " * swap$ * }
+ if$
+ "volume and number" number either.or.check
+ }
+ if$
+}
+FUNCTION {format.number.series}
+{ volume empty$
+ { number empty$
+ { series field.or.null }
+ { output.state mid.sentence =
+ { bbl.number }
+ { bbl.number capitalize }
+ if$
+ number tie.or.space.prefix "number" bibinfo.check * *
+ series empty$
+ { "there's a number but no series in " cite$ * warning$ }
+ { bbl.in space.word *
+ series "series" bibinfo.check *
+ }
+ if$
+ }
+ if$
+ }
+ { "" }
+ if$
+}
+FUNCTION {is.num}
+{ chr.to.int$
+ duplicate$ "0" chr.to.int$ < not
+ swap$ "9" chr.to.int$ > not and
+}
+
+FUNCTION {extract.num}
+{ duplicate$ 't :=
+ "" 's :=
+ { t empty$ not }
+ { t #1 #1 substring$
+ t #2 global.max$ substring$ 't :=
+ duplicate$ is.num
+ { s swap$ * 's := }
+ { pop$ "" 't := }
+ if$
+ }
+ while$
+ s empty$
+ 'skip$
+ { pop$ s }
+ if$
+}
+
+FUNCTION {convert.edition}
+{ extract.num "l" change.case$ 's :=
+ s "first" = s "1" = or
+ { bbl.first 't := }
+ { s "second" = s "2" = or
+ { bbl.second 't := }
+ { s "third" = s "3" = or
+ { bbl.third 't := }
+ { s "fourth" = s "4" = or
+ { bbl.fourth 't := }
+ { s "fifth" = s "5" = or
+ { bbl.fifth 't := }
+ { s #1 #1 substring$ is.num
+ { s bbl.th * 't := }
+ { edition 't := }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+ t
+}
+
+FUNCTION {format.edition}
+{ edition duplicate$ empty$ 'skip$
+ {
+ convert.edition
+ output.state mid.sentence =
+ { "l" }
+ { "t" }
+ if$ change.case$
+ "edition" bibinfo.check
+ " " * bbl.edition *
+ }
+ if$
+}
+INTEGERS { multiresult }
+FUNCTION {multi.page.check}
+{ 't :=
+ #0 'multiresult :=
+ { multiresult not
+ t empty$ not
+ and
+ }
+ { t #1 #1 substring$
+ duplicate$ "-" =
+ swap$ duplicate$ "," =
+ swap$ "+" =
+ or or
+ { #1 'multiresult := }
+ { t #2 global.max$ substring$ 't := }
+ if$
+ }
+ while$
+ multiresult
+}
+FUNCTION {format.pages}
+{ pages duplicate$ empty$ 'skip$
+ { duplicate$ multi.page.check
+ {
+ bbl.pages swap$
+ n.dashify
+ }
+ {
+ bbl.page swap$
+ }
+ if$
+ tie.or.space.prefix
+ "pages" bibinfo.check
+ * *
+ }
+ if$
+}
+FUNCTION {format.journal.pages}
+{ pages duplicate$ empty$ 'pop$
+ { swap$ duplicate$ empty$
+ { pop$ pop$ format.pages }
+ {
+ ": " *
+ swap$
+ n.dashify
+ pages multi.page.check
+ 'bbl.pages
+ 'bbl.page
+ if$
+ swap$ tie.or.space.prefix
+ "pages" bibinfo.check
+ * *
+ *
+ }
+ if$
+ }
+ if$
+}
+FUNCTION {format.journal.eid}
+{ eid "eid" bibinfo.check
+ duplicate$ empty$ 'pop$
+ { swap$ duplicate$ empty$ 'skip$
+ {
+ ": " *
+ }
+ if$
+ swap$ *
+ }
+ if$
+}
+FUNCTION {format.vol.num.pages}
+{ volume field.or.null
+ duplicate$ empty$ 'skip$
+ {
+ bbl.volume swap$ tie.or.space.prefix
+ "volume" bibinfo.check
+ * *
+ }
+ if$
+ number "number" bibinfo.check duplicate$ empty$ 'skip$
+ {
+ swap$ duplicate$ empty$
+ { "there's a number but no volume in " cite$ * warning$ }
+ 'skip$
+ if$
+ swap$
+ "(" swap$ * ")" *
+ }
+ if$ *
+ eid empty$
+ { format.journal.pages }
+ { format.journal.eid }
+ if$
+}
+
+FUNCTION {format.chapter.pages}
+{ chapter empty$
+ 'format.pages
+ { type empty$
+ { bbl.chapter }
+ { type "l" change.case$
+ "type" bibinfo.check
+ }
+ if$
+ chapter tie.or.space.prefix
+ "chapter" bibinfo.check
+ * *
+ pages empty$
+ 'skip$
+ { ", " * format.pages * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.booktitle}
+{
+ booktitle "booktitle" bibinfo.check
+ emphasize
+}
+FUNCTION {format.in.ed.booktitle}
+{ format.booktitle duplicate$ empty$ 'skip$
+ {
+ editor "editor" format.names.ed duplicate$ empty$ 'pop$
+ {
+ get.bbl.editor
+ swap$ "," *
+ " " * swap$ *
+ "(" swap$ * ")" *
+ swap$
+ " " * swap$
+ * }
+ if$
+ word.in swap$ *
+ }
+ if$
+}
+FUNCTION {format.thesis.type}
+{ type duplicate$ empty$
+ 'pop$
+ { swap$ pop$
+ "t" change.case$ "type" bibinfo.check
+ }
+ if$
+}
+FUNCTION {format.tr.number}
+{ number "number" bibinfo.check
+ type duplicate$ empty$
+ { pop$ bbl.techrep }
+ 'skip$
+ if$
+ "type" bibinfo.check
+ swap$ duplicate$ empty$
+ { pop$ "t" change.case$ }
+ { tie.or.space.prefix * * }
+ if$
+}
+FUNCTION {format.article.crossref}
+{
+ word.in
+ " \cite{" * crossref * "}" *
+}
+FUNCTION {format.book.crossref}
+{ volume duplicate$ empty$
+ { "empty volume in " cite$ * "'s crossref of " * crossref * warning$
+ pop$ word.in
+ }
+ { bbl.volume
+ capitalize
+ swap$ tie.or.space.prefix "volume" bibinfo.check * * bbl.of space.word *
+ }
+ if$
+ " \cite{" * crossref * "}" *
+}
+FUNCTION {format.incoll.inproc.crossref}
+{
+ word.in
+ " \cite{" * crossref * "}" *
+}
+FUNCTION {format.org.or.pub}
+{ 't :=
+ ""
+ address empty$ t empty$ and
+ 'skip$
+ {
+ t empty$
+ { address "address" bibinfo.check *
+ }
+ { t *
+ address empty$
+ 'skip$
+ { ", " * address "address" bibinfo.check * }
+ if$
+ }
+ if$
+ }
+ if$
+}
+FUNCTION {format.publisher.address}
+{ publisher "publisher" bibinfo.warn format.org.or.pub
+}
+
+FUNCTION {format.organization.address}
+{ organization "organization" bibinfo.check format.org.or.pub
+}
+
+STRINGS {oldname}
+
+FUNCTION {name.or.dash}
+{ 's :=
+ oldname empty$
+ { s 'oldname := s }
+ { s oldname =
+ { "---" }
+ { s 'oldname := s }
+ if$
+ }
+ if$
+}
+
+FUNCTION {article}
+{ output.bibitem
+ format.authors "author" output.check
+ author format.key output
+ name.or.dash
+ format.date "year" output.check
+ date.block
+ format.title "title" output.check
+ new.block
+ crossref missing$
+ {
+ journal
+ "journal" bibinfo.check
+ emphasize
+ "journal" output.check
+ format.vol.num.pages output
+ }
+ { format.article.crossref output.nonnull
+ format.pages output
+ }
+ if$
+ format.issn output
+ format.doi output
+ new.block
+ format.note output
+ format.eprint output
+ fin.entry
+}
+FUNCTION {book}
+{ output.bibitem
+ author empty$
+ { format.editors "author and editor" output.check
+ editor format.key output
+ add.blank
+ name.or.dash
+ }
+ { format.authors output.nonnull
+ name.or.dash
+ crossref missing$
+ { "author and editor" editor either.or.check }
+ 'skip$
+ if$
+ }
+ if$
+ format.date "year" output.check
+ date.block
+ format.btitle "title" output.check
+ crossref missing$
+ { format.bvolume output
+ new.block
+ format.number.series output
+ new.sentence
+ format.publisher.address output
+ }
+ {
+ new.block
+ format.book.crossref output.nonnull
+ }
+ if$
+ format.edition output
+ format.isbn output
+ format.doi output
+ new.block
+ format.note output
+ format.eprint output
+ fin.entry
+}
+FUNCTION {booklet}
+{ output.bibitem
+ format.authors output
+ author format.key output
+ name.or.dash
+ format.date "year" output.check
+ date.block
+ format.title "title" output.check
+ new.block
+ howpublished "howpublished" bibinfo.check output
+ address "address" bibinfo.check output
+ format.isbn output
+ format.doi output
+ new.block
+ format.note output
+ format.eprint output
+ fin.entry
+}
+
+FUNCTION {inbook}
+{ output.bibitem
+ author empty$
+ { format.editors "author and editor" output.check
+ editor format.key output
+ name.or.dash
+ }
+ { format.authors output.nonnull
+ name.or.dash
+ crossref missing$
+ { "author and editor" editor either.or.check }
+ 'skip$
+ if$
+ }
+ if$
+ format.date "year" output.check
+ date.block
+ format.btitle "title" output.check
+ crossref missing$
+ {
+ format.bvolume output
+ format.chapter.pages "chapter and pages" output.check
+ new.block
+ format.number.series output
+ new.sentence
+ format.publisher.address output
+ }
+ {
+ format.chapter.pages "chapter and pages" output.check
+ new.block
+ format.book.crossref output.nonnull
+ }
+ if$
+ format.edition output
+ crossref missing$
+ { format.isbn output }
+ 'skip$
+ if$
+ format.doi output
+ new.block
+ format.note output
+ format.eprint output
+ fin.entry
+}
+
+FUNCTION {incollection}
+{ output.bibitem
+ format.authors "author" output.check
+ author format.key output
+ name.or.dash
+ format.date "year" output.check
+ date.block
+ format.title "title" output.check
+ new.block
+ crossref missing$
+ { format.in.ed.booktitle "booktitle" output.check
+ format.bvolume output
+ format.number.series output
+ format.chapter.pages output
+ new.sentence
+ format.publisher.address output
+ format.edition output
+ format.isbn output
+ }
+ { format.incoll.inproc.crossref output.nonnull
+ format.chapter.pages output
+ }
+ if$
+ format.doi output
+ new.block
+ format.note output
+ format.eprint output
+ fin.entry
+}
+FUNCTION {inproceedings}
+{ output.bibitem
+ format.authors "author" output.check
+ author format.key output
+ name.or.dash
+ format.date "year" output.check
+ date.block
+ format.title "title" output.check
+ new.block
+ crossref missing$
+ { format.in.ed.booktitle "booktitle" output.check
+ format.bvolume output
+ format.number.series output
+ format.pages output
+ new.sentence
+ publisher empty$
+ { format.organization.address output }
+ { organization "organization" bibinfo.check output
+ format.publisher.address output
+ }
+ if$
+ format.isbn output
+ format.issn output
+ }
+ { format.incoll.inproc.crossref output.nonnull
+ format.pages output
+ }
+ if$
+ format.doi output
+ new.block
+ format.note output
+ format.eprint output
+ fin.entry
+}
+FUNCTION {conference} { inproceedings }
+FUNCTION {manual}
+{ output.bibitem
+ format.authors output
+ author format.key output
+ name.or.dash
+ format.date "year" output.check
+ date.block
+ format.btitle "title" output.check
+ organization address new.block.checkb
+ organization "organization" bibinfo.check output
+ address "address" bibinfo.check output
+ format.edition output
+ format.doi output
+ new.block
+ format.note output
+ format.eprint output
+ fin.entry
+}
+
+FUNCTION {mastersthesis}
+{ output.bibitem
+ format.authors "author" output.check
+ author format.key output
+ name.or.dash
+ format.date "year" output.check
+ date.block
+ format.title
+ "title" output.check
+ new.block
+ bbl.mthesis format.thesis.type output.nonnull
+ school "school" bibinfo.warn output
+ address "address" bibinfo.check output
+ format.doi output
+ new.block
+ format.note output
+ format.eprint output
+ fin.entry
+}
+
+FUNCTION {misc}
+{ output.bibitem
+ format.authors output
+ author format.key output
+ name.or.dash
+ format.date "year" output.check
+ date.block
+ format.title output
+ new.block
+ howpublished "howpublished" bibinfo.check output
+ format.doi output
+ new.block
+ format.note output
+ format.eprint output
+ fin.entry
+}
+FUNCTION {phdthesis}
+{ output.bibitem
+ format.authors "author" output.check
+ author format.key output
+ name.or.dash
+ format.date "year" output.check
+ date.block
+ format.btitle
+ "title" output.check
+ new.block
+ bbl.phdthesis format.thesis.type output.nonnull
+ school "school" bibinfo.warn output
+ address "address" bibinfo.check output
+ format.doi output
+ new.block
+ format.note output
+ format.eprint output
+ fin.entry
+}
+
+FUNCTION {proceedings}
+{ output.bibitem
+ format.editors output
+ editor format.key output
+ name.or.dash
+ format.date "year" output.check
+ date.block
+ format.btitle "title" output.check
+ format.bvolume output
+ format.number.series output
+ new.sentence
+ publisher empty$
+ { format.organization.address output }
+ { organization "organization" bibinfo.check output
+ format.publisher.address output
+ }
+ if$
+ format.isbn output
+ format.issn output
+ format.doi output
+ new.block
+ format.note output
+ format.eprint output
+ fin.entry
+}
+
+FUNCTION {techreport}
+{ output.bibitem
+ format.authors "author" output.check
+ author format.key output
+ name.or.dash
+ format.date "year" output.check
+ date.block
+ format.title
+ "title" output.check
+ new.block
+ format.tr.number output.nonnull
+ institution "institution" bibinfo.warn output
+ address "address" bibinfo.check output
+ format.doi output
+ new.block
+ format.note output
+ format.eprint output
+ fin.entry
+}
+
+FUNCTION {unpublished}
+{ output.bibitem
+ format.authors "author" output.check
+ author format.key output
+ name.or.dash
+ format.date "year" output.check
+ date.block
+ format.title "title" output.check
+ format.doi output
+ new.block
+ format.note "note" output.check
+ format.eprint output
+ fin.entry
+}
+
+FUNCTION {default.type} { misc }
+READ
+FUNCTION {sortify}
+{ purify$
+ "l" change.case$
+}
+INTEGERS { len }
+FUNCTION {chop.word}
+{ 's :=
+ 'len :=
+ s #1 len substring$ =
+ { s len #1 + global.max$ substring$ }
+ 's
+ if$
+}
+FUNCTION {format.lab.names}
+{ 's :=
+ "" 't :=
+ s #1 "{vv~}{ll}" format.name$
+ cite.name.font
+ s num.names$ duplicate$
+ #2 >
+ { pop$
+ " " * bbl.etal emphasize *
+ }
+ { #2 <
+ 'skip$
+ { s #2 "{ff }{vv }{ll}{ jj}" format.name$ "others" =
+ {
+ " " * bbl.etal emphasize *
+ }
+ { bbl.and space.word * s #2 "{vv~}{ll}" format.name$
+ cite.name.font
+ * }
+ if$
+ }
+ if$
+ }
+ if$
+}
+
+FUNCTION {author.key.label}
+{ author empty$
+ { key empty$
+ { cite$ #1 #3 substring$ }
+ 'key
+ if$
+ }
+ { author format.lab.names }
+ if$
+}
+
+FUNCTION {author.editor.key.label}
+{ author empty$
+ { editor empty$
+ { key empty$
+ { cite$ #1 #3 substring$ }
+ 'key
+ if$
+ }
+ { editor format.lab.names }
+ if$
+ }
+ { author format.lab.names }
+ if$
+}
+
+FUNCTION {editor.key.label}
+{ editor empty$
+ { key empty$
+ { cite$ #1 #3 substring$ }
+ 'key
+ if$
+ }
+ { editor format.lab.names }
+ if$
+}
+
+FUNCTION {calc.short.authors}
+{ type$ "book" =
+ type$ "inbook" =
+ or
+ 'author.editor.key.label
+ { type$ "proceedings" =
+ 'editor.key.label
+ 'author.key.label
+ if$
+ }
+ if$
+ 'short.list :=
+}
+
+FUNCTION {calc.label}
+{ calc.short.authors
+ short.list
+ "("
+ *
+ year duplicate$ empty$
+ short.list key field.or.null = or
+ { pop$ "" }
+ 'skip$
+ if$
+ *
+ 'label :=
+}
+
+FUNCTION {sort.format.names}
+{ 's :=
+ #1 'nameptr :=
+ ""
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ { s nameptr
+ "{ll{ }}{ ff{ }}{ jj{ }}"
+ format.name$ 't :=
+ nameptr #1 >
+ {
+ nameptr #1
+ #1 + =
+ numnames #3
+ > and
+ { "others" 't :=
+ #1 'namesleft := }
+ 'skip$
+ if$
+ " " *
+ namesleft #1 = t "others" = and
+ { "zzzzz" * }
+ { t sortify * }
+ if$
+ }
+ { t sortify * }
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+}
+
+FUNCTION {sort.format.title}
+{ 't :=
+ "A " #2
+ "An " #3
+ "The " #4 t chop.word
+ chop.word
+ chop.word
+ sortify
+ #1 global.max$ substring$
+}
+FUNCTION {author.sort}
+{ author empty$
+ { key empty$
+ { "to sort, need author or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { author sort.format.names }
+ if$
+}
+FUNCTION {author.editor.sort}
+{ author empty$
+ { editor empty$
+ { key empty$
+ { "to sort, need author, editor, or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { editor sort.format.names }
+ if$
+ }
+ { author sort.format.names }
+ if$
+}
+FUNCTION {editor.sort}
+{ editor empty$
+ { key empty$
+ { "to sort, need editor or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { editor sort.format.names }
+ if$
+}
+FUNCTION {presort}
+{ calc.label
+ label sortify
+ " "
+ *
+ type$ "book" =
+ type$ "inbook" =
+ or
+ 'author.editor.sort
+ { type$ "proceedings" =
+ 'editor.sort
+ 'author.sort
+ if$
+ }
+ if$
+ #1 entry.max$ substring$
+ 'sort.label :=
+ sort.label
+ *
+ " "
+ *
+ title field.or.null
+ sort.format.title
+ *
+ #1 entry.max$ substring$
+ 'sort.key$ :=
+}
+
+ITERATE {presort}
+SORT
+STRINGS { last.label next.extra }
+INTEGERS { last.extra.num number.label }
+FUNCTION {initialize.extra.label.stuff}
+{ #0 int.to.chr$ 'last.label :=
+ "" 'next.extra :=
+ #0 'last.extra.num :=
+ #0 'number.label :=
+}
+FUNCTION {forward.pass}
+{ last.label label =
+ { last.extra.num #1 + 'last.extra.num :=
+ last.extra.num int.to.chr$ 'extra.label :=
+ }
+ { "a" chr.to.int$ 'last.extra.num :=
+ "" 'extra.label :=
+ label 'last.label :=
+ }
+ if$
+ number.label #1 + 'number.label :=
+}
+FUNCTION {reverse.pass}
+{ next.extra "b" =
+ { "a" 'extra.label := }
+ 'skip$
+ if$
+ extra.label 'next.extra :=
+ extra.label
+ emphasize
+ duplicate$ empty$
+ 'skip$
+ { "{\natexlab{" swap$ * "}}" * }
+ if$
+ 'extra.label :=
+ label extra.label * 'label :=
+}
+EXECUTE {initialize.extra.label.stuff}
+ITERATE {forward.pass}
+REVERSE {reverse.pass}
+FUNCTION {bib.sort.order}
+{ sort.label
+ " "
+ *
+ year field.or.null sortify
+ *
+ " "
+ *
+ title field.or.null
+ sort.format.title
+ *
+ #1 entry.max$ substring$
+ 'sort.key$ :=
+}
+ITERATE {bib.sort.order}
+SORT
+FUNCTION {begin.bib}
+{ preamble$ empty$
+ 'skip$
+ { preamble$ write$ newline$ }
+ if$
+ "\begin{thebibliography}{" number.label int.to.str$ * "}" *
+ write$ newline$
+ "\ProvideTextCommand{\guillemotleft}{OT1}{%"
+ write$ newline$
+ " \leavevmode\raise .27ex\hbox{$\scriptscriptstyle\ll$}}"
+ write$ newline$
+ "\ProvideTextCommand{\guillemotright}{OT1}{%"
+ write$ newline$
+ " \leavevmode\raise .27ex\hbox{$\scriptscriptstyle\gg$}}"
+ write$ newline$
+ "\newcommand{\enquote}[1]{\guillemotleft#1\guillemotright}"
+ write$ newline$
+ "\providecommand{\natexlab}[1]{#1}"
+ write$ newline$
+ "\providecommand{\url}[1]{\texttt{#1}}"
+ write$ newline$
+ "\providecommand{\urlprefix}{URL }"
+ write$ newline$
+ "\expandafter\ifx\csname urlstyle\endcsname\relax"
+ write$ newline$
+ " \providecommand{\doi}[1]{doi:\discretionary{}{}{}#1}\else"
+ write$ newline$
+ " \providecommand{\doi}{doi:\discretionary{}{}{}\begingroup \urlstyle{rm}\Url}\fi"
+ write$ newline$
+ "\providecommand{\selectlanguage}[1]{\relax}"
+ write$ newline$
+ "\providecommand{\eprint}[2][]{\url{#2}}"
+ write$ newline$
+}
+EXECUTE {begin.bib}
+EXECUTE {init.state.consts}
+ITERATE {call.type$}
+FUNCTION {end.bib}
+{ newline$
+ "\end{thebibliography}" write$ newline$
+}
+EXECUTE {end.bib}
+%% End of customized bst file
+%%
+%% End of file `caauda0.bst'. \ No newline at end of file
diff --git a/biblio/bibtex/contrib/catalan/bibtex/bst/caauda1.bst b/biblio/bibtex/contrib/catalan/bibtex/bst/caauda1.bst
new file mode 100644
index 0000000000..52d51c5a0c
--- /dev/null
+++ b/biblio/bibtex/contrib/catalan/bibtex/bst/caauda1.bst
@@ -0,0 +1,2023 @@
+%%
+%% This is file `caauda1.bst',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% merlin.mbs (with options: `head,exlang,ay,nat,lang,vonx,nm-revf,aunm-semi,nmdash,nmlm,x3,m1,nmft,nmft-sc,fnm-rm,nmfted,nmand-rm,lab,lab-sc,and-rm,xlab-it,keyxyr,blkyear,aymth,yrp-col,note-yr,tit-qq,qt-g,qx,volp-sp,jwdpg,jwdvol,ser-vol,isbn,issn,doi,edparxc,edby-par,edbyy,catalan,ps,ed,nom,and-xcom,xand,etal-it,eprint,url,url-nt,nfss,,{}')
+%% catalan.mbs (with options: `exlang,ay,nat,lang,vonx,nm-revf,aunm-semi,nmdash,nmlm,x3,m1,nmft,nmft-sc,fnm-rm,nmfted,nmand-rm,lab,lab-sc,and-rm,xlab-it,keyxyr,blkyear,aymth,yrp-col,note-yr,tit-qq,qt-g,qx,volp-sp,jwdpg,jwdvol,ser-vol,isbn,issn,doi,edparxc,edby-par,edbyy,catalan,ps,ed,nom,and-xcom,xand,etal-it,eprint,url,url-nt,nfss,,{}')
+%% physjour.mbs (with options: `exlang,ay,nat,lang,vonx,nm-revf,aunm-semi,nmdash,nmlm,x3,m1,nmft,nmft-sc,fnm-rm,nmfted,nmand-rm,lab,lab-sc,and-rm,xlab-it,keyxyr,blkyear,aymth,yrp-col,note-yr,tit-qq,qt-g,qx,volp-sp,jwdpg,jwdvol,ser-vol,isbn,issn,doi,edparxc,edby-par,edbyy,catalan,ps,ed,nom,and-xcom,xand,etal-it,eprint,url,url-nt,nfss,,{}')
+%% geojour.mbs (with options: `exlang,ay,nat,lang,vonx,nm-revf,aunm-semi,nmdash,nmlm,x3,m1,nmft,nmft-sc,fnm-rm,nmfted,nmand-rm,lab,lab-sc,and-rm,xlab-it,keyxyr,blkyear,aymth,yrp-col,note-yr,tit-qq,qt-g,qx,volp-sp,jwdpg,jwdvol,ser-vol,isbn,issn,doi,edparxc,edby-par,edbyy,catalan,ps,ed,nom,and-xcom,xand,etal-it,eprint,url,url-nt,nfss,,{}')
+%% photjour.mbs (with options: `exlang,ay,nat,lang,vonx,nm-revf,aunm-semi,nmdash,nmlm,x3,m1,nmft,nmft-sc,fnm-rm,nmfted,nmand-rm,lab,lab-sc,and-rm,xlab-it,keyxyr,blkyear,aymth,yrp-col,note-yr,tit-qq,qt-g,qx,volp-sp,jwdpg,jwdvol,ser-vol,isbn,issn,doi,edparxc,edby-par,edbyy,catalan,ps,ed,nom,and-xcom,xand,etal-it,eprint,url,url-nt,nfss,,{}')
+%% merlin.mbs (with options: `tail,exlang,ay,nat,lang,vonx,nm-revf,aunm-semi,nmdash,nmlm,x3,m1,nmft,nmft-sc,fnm-rm,nmfted,nmand-rm,lab,lab-sc,and-rm,xlab-it,keyxyr,blkyear,aymth,yrp-col,note-yr,tit-qq,qt-g,qx,volp-sp,jwdpg,jwdvol,ser-vol,isbn,issn,doi,edparxc,edby-par,edbyy,catalan,ps,ed,nom,and-xcom,xand,etal-it,eprint,url,url-nt,nfss,,{}')
+%% ----------------------------------------
+%% *** catalan author-date BibTeX style (by Robert Fuster using makebst, 19/11/04) ***
+%% *** this BibTeX style requires the natbib LaTeX style***
+%% *** date at end ***
+%%
+%% Copyright 1994-2004 Patrick W Daly
+ % ===============================================================
+ % IMPORTANT NOTICE:
+ % This bibliographic style (bst) file has been generated from one or
+ % more master bibliographic style (mbs) files, listed above.
+ %
+ % This generated file can be redistributed and/or modified under the terms
+ % of the LaTeX Project Public License Distributed from CTAN
+ % archives in directory macros/latex/base/lppl.txt; either
+ % version 1 of the License, or any later version.
+ % ===============================================================
+ % Name and version information of the main mbs file:
+ % \ProvidesFile{merlin.mbs}[2004/02/09 4.13 (PWD, AO, DPC)]
+ % For use with BibTeX version 0.99a or later
+ %-------------------------------------------------------------------
+ % This bibliography style file is intended for texts in
+ % CATALAN
+ % This is an author-year citation style bibliography. As such, it is
+ % non-standard LaTeX, and requires a special package file to function properly.
+ % Such a package is natbib.sty by Patrick W. Daly
+ % The form of the \bibitem entries is
+ % \bibitem[Jones et al.(1990)]{key}...
+ % \bibitem[Jones et al.(1990)Jones, Baker, and Smith]{key}...
+ % The essential feature is that the label (the part in brackets) consists
+ % of the author names, as they should appear in the citation, with the year
+ % in parentheses following. There must be no space before the opening
+ % parenthesis!
+ % With natbib v5.3, a full list of authors may also follow the year.
+ % In natbib.sty, it is possible to define the type of enclosures that is
+ % really wanted (brackets or parentheses), but in either case, there must
+ % be parentheses in the label.
+ % The \cite command functions as follows:
+ % \citet{key} ==>> Jones et al. (1990)
+ % \citet*{key} ==>> Jones, Baker, and Smith (1990)
+ % \citep{key} ==>> (Jones et al., 1990)
+ % \citep*{key} ==>> (Jones, Baker, and Smith, 1990)
+ % \citep[chap. 2]{key} ==>> (Jones et al., 1990, chap. 2)
+ % \citep[e.g.][]{key} ==>> (e.g. Jones et al., 1990)
+ % \citep[e.g.][p. 32]{key} ==>> (e.g. Jones et al., p. 32)
+ % \citeauthor{key} ==>> Jones et al.
+ % \citeauthor*{key} ==>> Jones, Baker, and Smith
+ % \citeyear{key} ==>> 1990
+ %---------------------------------------------------------------------
+
+ENTRY
+ { address
+ archive
+ author
+ booktitle
+ chapter
+ doi
+ edition
+ editor
+ eid
+ eprint
+ howpublished
+ institution
+ isbn
+ issn
+ journal
+ key
+ language
+ month
+ note
+ number
+ organization
+ pages
+ publisher
+ school
+ series
+ title
+ type
+ url
+ volume
+ year
+ }
+ {}
+ { label extra.label sort.label short.list }
+INTEGERS { output.state before.all mid.sentence after.sentence after.block }
+FUNCTION {init.state.consts}
+{ #0 'before.all :=
+ #1 'mid.sentence :=
+ #2 'after.sentence :=
+ #3 'after.block :=
+}
+STRINGS { s t}
+FUNCTION {output.nonnull}
+{ 's :=
+ output.state mid.sentence =
+ { ", " * write$ }
+ { output.state after.block =
+ { add.period$ write$
+ newline$
+ "\newblock " write$
+ }
+ { output.state before.all =
+ 'write$
+ { add.period$ " " * write$ }
+ if$
+ }
+ if$
+ mid.sentence 'output.state :=
+ }
+ if$
+ s
+}
+FUNCTION {output}
+{ duplicate$ empty$
+ 'pop$
+ 'output.nonnull
+ if$
+}
+FUNCTION {output.check}
+{ 't :=
+ duplicate$ empty$
+ { pop$ "empty " t * " in " * cite$ * warning$ }
+ 'output.nonnull
+ if$
+}
+FUNCTION {fin.entry}
+{ add.period$
+ write$
+ newline$
+}
+
+FUNCTION {new.block}
+{ output.state before.all =
+ 'skip$
+ { after.block 'output.state := }
+ if$
+}
+FUNCTION {new.sentence}
+{ output.state after.block =
+ 'skip$
+ { output.state before.all =
+ 'skip$
+ { after.sentence 'output.state := }
+ if$
+ }
+ if$
+}
+FUNCTION {add.blank}
+{ " " * before.all 'output.state :=
+}
+
+FUNCTION {date.block}
+{
+ ":" *
+ add.blank
+}
+
+FUNCTION {not}
+{ { #0 }
+ { #1 }
+ if$
+}
+FUNCTION {and}
+{ 'skip$
+ { pop$ #0 }
+ if$
+}
+FUNCTION {or}
+{ { pop$ #1 }
+ 'skip$
+ if$
+}
+FUNCTION {non.stop}
+{ duplicate$
+ "}" * add.period$
+ #-1 #1 substring$ "." =
+}
+
+FUNCTION {new.block.checkb}
+{ empty$
+ swap$ empty$
+ and
+ 'skip$
+ 'new.block
+ if$
+}
+FUNCTION {field.or.null}
+{ duplicate$ empty$
+ { pop$ "" }
+ 'skip$
+ if$
+}
+FUNCTION {emphasize}
+{ duplicate$ empty$
+ { pop$ "" }
+ { "\emph{" swap$ * "}" * }
+ if$
+}
+FUNCTION {scaps}
+{ duplicate$ empty$
+ { pop$ "" }
+ { "\textsc{" swap$ * "}" * }
+ if$
+}
+FUNCTION {bib.name.font}
+{ scaps }
+FUNCTION {bib.fname.font}
+{ skip$ }
+FUNCTION {cite.name.font}
+{ scaps }
+FUNCTION {tie.or.space.prefix}
+{ duplicate$ text.length$ #3 <
+ { "~" }
+ { " " }
+ if$
+ swap$
+}
+
+FUNCTION {capitalize}
+{ "u" change.case$ "t" change.case$ }
+
+FUNCTION {space.word}
+{ " " swap$ * " " * }
+ % Here are the language-specific definitions for explicit words.
+ % Each function has a name bbl.xxx where xxx is the English word.
+ %-------------------------------------------------------------------
+ % Begin module: catalan.mbs
+ % \ProvidesFile{catalan.mbs}[2003/11/06 4.2 (PWD)]
+
+ % The language selected here is CATALAN
+FUNCTION {bbl.and}
+{ "i"}
+
+FUNCTION {bbl.etal}
+{ "et~al." }
+
+FUNCTION {bbl.editors}
+{ "eds." }
+
+FUNCTION {bbl.editor}
+{ "ed." }
+
+FUNCTION {bbl.edby}
+{ "editat per" }
+
+FUNCTION {bbl.edition}
+{ "edici\'o" }
+
+FUNCTION {bbl.volume}
+{ "volum" }
+
+FUNCTION {bbl.of}
+{ "de" }
+
+FUNCTION {bbl.number}
+{ "n\'umero" }
+
+FUNCTION {bbl.nr}
+{ "n." }
+
+FUNCTION {bbl.in}
+{ "dins" }
+
+FUNCTION {bbl.pages}
+{ "ps." }
+
+FUNCTION {bbl.page}
+{ "p." }
+
+FUNCTION {bbl.chapter}
+{ "cap\'{\i}tol" }
+
+FUNCTION {bbl.techrep}
+{ "Report t{\`e}cnic" }
+
+FUNCTION {bbl.mthesis}
+{ "Projecte F. de Carrera o Tesina de L." }
+
+FUNCTION {bbl.phdthesis}
+{ "Tesi Doctoral" }
+
+FUNCTION {bbl.first}
+{ "primera" }
+
+FUNCTION {bbl.second}
+{ "segona" }
+
+FUNCTION {bbl.third}
+{ "tercera" }
+
+FUNCTION {bbl.fourth}
+{ "quarta" }
+
+FUNCTION {bbl.fifth}
+{ "cinquena" }
+
+FUNCTION {bbl.th}
+{ "a" }
+
+MACRO {jan} {"gener"}
+
+MACRO {feb} {"febrer"}
+
+MACRO {mar} {"mar\c{c}"}
+
+MACRO {apr} {"abril"}
+
+MACRO {may} {"maig"}
+
+MACRO {jun} {"juny"}
+
+MACRO {jul} {"juliol"}
+
+MACRO {aug} {"agost"}
+
+MACRO {sep} {"setembre"}
+
+MACRO {oct} {"octubre"}
+
+MACRO {nov} {"novembre"}
+
+MACRO {dec} {"desembre"}
+
+ % End module: catalan.mbs
+ % \end{macrocode}
+ %-------------------------------------------------------------------
+ % Begin module:
+ % \ProvidesFile{physjour.mbs}[2002/01/14 2.2 (PWD)]
+MACRO {aa}{"Astronomy and Astrophysics"}
+MACRO {aasup}{"Astronomy and Astrophysics, Supplement Series"}
+MACRO {aj}{"Astronomical Journal"}
+MACRO {aph} {"Acta Physica"}
+MACRO {advp} {"Advances in Physics"}
+MACRO {ajp} {"American Journal of Physics"}
+MACRO {ajm} {"American Journal of Mathematics"}
+MACRO {amsci} {"American Scientist"}
+MACRO {anofd} {"Annals of Fluid Dynamics"}
+MACRO {am} {"Annals of Mathematics"}
+MACRO {ap} {"Annals of Physics"}
+MACRO {adp} {"Annalen der Physik"}
+MACRO {ao} {"Applied Optics"}
+MACRO {apl} {"Applied Physics Letters"}
+MACRO {app} {"Astroparticle Physics"}
+MACRO {apj} {"Astrophysical Journal"}
+MACRO {apjsup} {"Astrophysical Journal Supplement"}
+MACRO {apss} {"Astrophysics and Space Science"}
+MACRO {araa} {"Annual Review of Astronomy and Astrophysics"}
+MACRO {baas} {"Bulletin of the American Astronomical Society"}
+MACRO {baps} {"Bulletin of the American Physical Society"}
+MACRO {cmp} {"Communications in Mathematical Physics"}
+MACRO {cpam} {"Communications on Pure and Applied Mathematics"}
+MACRO {cppcf} {"Comments on Plasma Physics and Controlled Fusion"}
+MACRO {cpc} {"Computer Physics Communications"}
+MACRO {cqg} {"Classical and Quantum Gravity"}
+MACRO {cra} {"Comptes Rendus des S{\'e}ances de l'Acad{\'e}mie des Sciences A"}
+MACRO {fed} {"Fusion Engineering and Design"}
+MACRO {ft} {"Fusion Technology"}
+MACRO {grg} {"General Relativity and Gravitation"}
+MACRO {ieeens} {"IEEE Transactions on Nuclear Science"}
+MACRO {ieeeps} {"IEEE Transactions on Plasma Science"}
+MACRO {ijimw} {"International Journal of Infrared and Millimeter Waves"}
+MACRO {ip} {"Infrared Physics"}
+MACRO {irp} {"Infrared Physics"}
+MACRO {jap} {"Journal of Applied Physics"}
+MACRO {jasa} {"Journal of the Acoustical Society of America"}
+MACRO {jcp} {"Journal of Computational Physics"}
+MACRO {jetp} {"Soviet Physics--JETP"}
+MACRO {jfe} {"Journal of Fusion Energy"}
+MACRO {jfm} {"Journal of Fluid Mechanics"}
+MACRO {jmp} {"Journal of Mathematical Physics"}
+MACRO {jne} {"Journal of Nuclear Energy"}
+MACRO {jnec} {"Journal of Nuclear Energy, Part C: Plasma Physics, Accelerators, Thermonuclear Research"}
+MACRO {jnm} {"Journal of Nuclear Materials"}
+MACRO {jpc} {"Journal of Physical Chemistry"}
+MACRO {jpp} {"Journal of Plasma Physics"}
+MACRO {jpsj} {"Journal of the Physical Society of Japan"}
+MACRO {jsi} {"Journal of Scientific Instruments"}
+MACRO {jvst} {"Journal of Vacuum Science and Technology"}
+MACRO {nat} {"Nature"}
+MACRO {nature} {"Nature"}
+MACRO {nedf} {"Nuclear Engineering and Design/Fusion"}
+MACRO {nf} {"Nuclear Fusion"}
+MACRO {nim} {"Nuclear Instruments and Methods"}
+MACRO {nimpr} {"Nuclear Instruments and Methods in Physics Research"}
+MACRO {np} {"Nuclear Physics"}
+MACRO {npb} {"Nuclear Physics B"}
+MACRO {nt/f} {"Nuclear Technology/Fusion"}
+MACRO {npbpc} {"Nuclear Physics B (Proceedings Supplements)"}
+MACRO {inc} {"Il Nuovo Cimento"}
+MACRO {nc} {"Nuovo Cimento"}
+MACRO {pf} {"Physics of Fluids"}
+MACRO {pfa} {"Physics of Fluids A: Fluid Dynamics"}
+MACRO {pfb} {"Physics of Fluids B: Plasma Physics"}
+MACRO {pl} {"Physics Letters"}
+MACRO {pla} {"Physics Letters A"}
+MACRO {plb} {"Physics Letters B"}
+MACRO {prep} {"Physics Reports"}
+MACRO {pnas} {"Proceedings of the National Academy of Sciences of the USA"}
+MACRO {pp} {"Physics of Plasmas"}
+MACRO {ppcf} {"Plasma Physics and Controlled Fusion"}
+MACRO {phitrsl} {"Philosophical Transactions of the Royal Society of London"}
+MACRO {prl} {"Physical Review Letters"}
+MACRO {pr} {"Physical Review"}
+MACRO {physrev} {"Physical Review"}
+MACRO {pra} {"Physical Review A"}
+MACRO {prb} {"Physical Review B"}
+MACRO {prc} {"Physical Review C"}
+MACRO {prd} {"Physical Review D"}
+MACRO {pre} {"Physical Review E"}
+MACRO {ps} {"Physica Scripta"}
+MACRO {procrsl} {"Proceedings of the Royal Society of London"}
+MACRO {rmp} {"Reviews of Modern Physics"}
+MACRO {rsi} {"Review of Scientific Instruments"}
+MACRO {science} {"Science"}
+MACRO {sciam} {"Scientific American"}
+MACRO {sam} {"Studies in Applied Mathematics"}
+MACRO {sjpp} {"Soviet Journal of Plasma Physics"}
+MACRO {spd} {"Soviet Physics--Doklady"}
+MACRO {sptp} {"Soviet Physics--Technical Physics"}
+MACRO {spu} {"Soviet Physics--Uspeki"}
+MACRO {st} {"Sky and Telescope"}
+ % End module: physjour.mbs
+ %-------------------------------------------------------------------
+ % Begin module:
+ % \ProvidesFile{geojour.mbs}[2002/07/10 2.0h (PWD)]
+MACRO {aisr} {"Advances in Space Research"}
+MACRO {ag} {"Annales Geophysic\ae"}
+MACRO {anigeo} {"Annali di Geofisica"}
+MACRO {angl} {"Annals of Glaciology"}
+MACRO {andmet} {"Annalen der Meteorologie"}
+MACRO {andgeo} {"Annales de Geophysique"}
+MACRO {andphy} {"Annales de Physique"}
+MACRO {afmgb} {"Archiv f\^^b{u}r Meteorologie, Geophysik und Bioklimatologie"}
+MACRO {ass}{"Astrophysics and Space Science"}
+MACRO {atph} {"Atm\'osphera"}
+MACRO {aao} {"Atmosphere-Ocean"}
+MACRO {atenv} {"Atmospheric Environment"}
+MACRO {aujag} {"Australian Journal of Agricultural Research"}
+MACRO {aumet} {"Australian Meteorological Magazine"}
+MACRO {blmet} {"Boundary-Layer Meteorology"}
+MACRO {bams} {"Bulletin of the American Meteorological Society"}
+MACRO {cch} {"Climatic Change"}
+MACRO {cdyn} {"Climate Dynamics"}
+MACRO {cbul} {"Climatological Bulletin"}
+MACRO {cap} {"Contributions to Atmospheric Physics"}
+MACRO {dsr} {"Deep-Sea Research"}
+MACRO {dhz} {"Deutsche Hydrographische Zeitschrift"}
+MACRO {dao} {"Dynamics of Atmospheres and Oceans"}
+MACRO {eco} {"Ecology"}
+MACRO {empl}{"Earth, Moon and Planets"}
+MACRO {envres} {"Environmental Research"}
+MACRO {envst} {"Environmental Science and Technology"}
+MACRO {ecms} {"Estuarine and Coastal Marine Science"}
+MACRO {expa}{"Experimental Astronomy"}
+MACRO {geoint} {"Geofisica Internationale"}
+MACRO {geopub} {"Geofysiske Publikasjoner"}
+MACRO {geogeo} {"Geologiya i Geofizika"}
+MACRO {gafd} {"Geophysical and Astrophysical Fluid Dynamics"}
+MACRO {gfd} {"Geophysical Fluid Dynamics"}
+MACRO {geomag} {"Geophysical Magazine"}
+MACRO {georl} {"Geophysical Research Letters"}
+MACRO {grl} {"Geophysical Research Letters"}
+MACRO {ga} {"Geophysica"}
+MACRO {gs} {"Geophysics"}
+MACRO {ieeetap} {"IEEE Transactions on Antennas and Propagation"}
+MACRO {ijawp} {"International Journal of Air and Water Pollution"}
+MACRO {ijc} {"International Journal of Climatology"}
+MACRO {ijrs} {"International Journal of Remote Sensing"}
+MACRO {jam} {"Journal of Applied Meteorology"}
+MACRO {jaot} {"Journal of Atmospheric and Oceanic Technology"}
+MACRO {jatp} {"Journal of Atmospheric and Terrestrial Physics"}
+MACRO {jastp} {"Journal of Atmospheric and Solar-Terrestrial Physics"}
+MACRO {jce} {"Journal of Climate"}
+MACRO {jcam} {"Journal of Climate and Applied Meteorology"}
+MACRO {jcm} {"Journal of Climate Meteorology"}
+MACRO {jcy} {"journal of Climatology"}
+MACRO {jgr} {"Journal of Geophysical Research"}
+MACRO {jga} {"Journal of Glaciology"}
+MACRO {jh} {"Journal of Hydrology"}
+MACRO {jmr} {"Journal of Marine Research"}
+MACRO {jmrj} {"Journal of Meteorological Research, Japan"}
+MACRO {jm} {"Journal of Meteorology"}
+MACRO {jpo} {"Journal of Physical Oceanography"}
+MACRO {jra} {"Journal de Recherches Atmospheriques"}
+MACRO {jaes} {"Journal of the Aeronautical Sciences"}
+MACRO {japca} {"Journal of the Air Pollution Control Association"}
+MACRO {jas} {"Journal of the Atmospheric Sciences"}
+MACRO {jmts} {"Journal of the Marine Technology Society"}
+MACRO {jmsj} {"Journal of Meteorological Society of Japan"}
+MACRO {josj} {"Journal of the Oceanographical Society of Japan"}
+MACRO {jwm} {"Journal of Weather Modification"}
+MACRO {lao} {"Limnology and Oceanography"}
+MACRO {mwl} {"Mariners Weather Log"}
+MACRO {mau} {"Mausam"}
+MACRO {meteor} {"``Meteor'' Forschungsergebnisse"}
+MACRO {map} {"Meteorology and Atmospheric Physics"}
+MACRO {metmag} {"Meteorological Magazine"}
+MACRO {metmon} {"Meteorological Monographs"}
+MACRO {metrun} {"Meteorologische Rundschau"}
+MACRO {metzeit} {"Meteorologische Zeitschrift"}
+MACRO {metgid} {"Meteorologiya i Gidrologiya"}
+MACRO {mwr} {"Monthly Weather Review"}
+MACRO {nwd} {"National Weather Digest"}
+MACRO {nzjmfr} {"New Zealand Journal of Marine and Freshwater Research"}
+MACRO {npg} {"Nonlinear Processes in Geophysics"}
+MACRO {om} {"Oceanography and Meteorology"}
+MACRO {ocac} {"Oceanologica Acta"}
+MACRO {oceanus} {"Oceanus"}
+MACRO {paleoc} {"Paleoceanography"}
+MACRO {pce} {"Physics and Chemistry of the Earth"}
+MACRO {pmg} {"Papers in Meteorology and Geophysics"}
+MACRO {ppom} {"Papers in Physical Oceanography and Meteorology"}
+MACRO {physzeit} {"Physikalische Zeitschrift"}
+MACRO {pps} {"Planetary and Space Science"}
+MACRO {pss} {"Planetary and Space Science"}
+MACRO {pag} {"Pure and Applied Geophysics"}
+MACRO {qjrms} {"Quarterly Journal of the Royal Meteorological Society"}
+MACRO {quatres} {"Quaternary Research"}
+MACRO {rsci} {"Radio Science"}
+MACRO {rse} {"Remote Sensing of the Environment"}
+MACRO {rgeo} {"Reviews of Geophysics"}
+MACRO {rgsp} {"Reviews of Geophysics and Space Physics"}
+MACRO {rdgeo} {"Revista de Geofisica"}
+MACRO {revmeta} {"Revista Meteorologica"}
+MACRO {sgp}{"Surveys in Geophysics"}
+MACRO {sp} {"Solar Phys."}
+MACRO {ssr} {"Space Science Review"}
+MACRO {tellus} {"Tellus"}
+MACRO {tac} {"Theoretical and Applied Climatology"}
+MACRO {tagu} {"Transactions, American Geophysical Union (EOS)"}
+MACRO {wrr} {"Water Resources Research"}
+MACRO {weather} {"Weather"}
+MACRO {wafc} {"Weather and Forecasting"}
+MACRO {ww} {"Weatherwise"}
+MACRO {wmob} {"World Meteorological Organization Bulletin"}
+MACRO {zeitmet} {"Zeitschrift f\^^b{u}r Meteorologie"}
+ % End module: geojour.mbs
+ %-------------------------------------------------------------------
+ % Begin module:
+ % \ProvidesFile{photjour.mbs}[1999/02/24 2.0b (PWD)]
+
+MACRO {appopt} {"Applied Optics"}
+MACRO {bell} {"Bell Systems Technical Journal"}
+MACRO {ell} {"Electronics Letters"}
+MACRO {jasp} {"Journal of Applied Spectroscopy"}
+MACRO {jqe} {"IEEE Journal of Quantum Electronics"}
+MACRO {jlwt} {"Journal of Lightwave Technology"}
+MACRO {jmo} {"Journal of Modern Optics"}
+MACRO {josa} {"Journal of the Optical Society of America"}
+MACRO {josaa} {"Journal of the Optical Society of America~A"}
+MACRO {josab} {"Journal of the Optical Society of America~B"}
+MACRO {jdp} {"Journal de Physique"}
+MACRO {oc} {"Optics Communications"}
+MACRO {ol} {"Optics Letters"}
+MACRO {phtl} {"IEEE Photonics Technology Letters"}
+MACRO {pspie} {"Proceedings of the Society for Photo-Optical Instruments Engineers"}
+MACRO {sse} {"Solid-State Electronics"}
+MACRO {sjot} {"Soviet Journal of Optical Technology"}
+MACRO {sjqe} {"Soviet Journal of Quantum Electronics"}
+MACRO {sleb} {"Soviet Physics--Lebedev Institute Reports"}
+MACRO {stph} {"Soviet Physics--Technical Physics"}
+MACRO {stphl} {"Soviet Technical Physics Letters"}
+MACRO {vr} {"Vision Research"}
+MACRO {zph} {"Zeitschrift f\^^b{u}r Physik"}
+MACRO {zphb} {"Zeitschrift f\^^b{u}r Physik~B"}
+MACRO {zphd} {"Zeitschrift f\^^b{u}r Physik~D"}
+
+MACRO {CLEO} {"Conf. on Lasers and Electro-Optics"}
+MACRO {ASSL} {"Advanced Solid State Lasers"}
+MACRO {OSA} {"Optical Society of America"}
+ % End module: photjour.mbs
+%% Copyright 1994-2004 Patrick W Daly
+MACRO {acmcs} {"ACM Computing Surveys"}
+
+MACRO {acta} {"Acta Informatica"}
+
+MACRO {cacm} {"Communications of the ACM"}
+
+MACRO {ibmjrd} {"IBM Journal of Research and Development"}
+
+MACRO {ibmsj} {"IBM Systems Journal"}
+
+MACRO {ieeese} {"IEEE Transactions on Software Engineering"}
+
+MACRO {ieeetc} {"IEEE Transactions on Computers"}
+
+MACRO {ieeetcad}
+ {"IEEE Transactions on Computer-Aided Design of Integrated Circuits"}
+
+MACRO {ipl} {"Information Processing Letters"}
+
+MACRO {jacm} {"Journal of the ACM"}
+
+MACRO {jcss} {"Journal of Computer and System Sciences"}
+
+MACRO {scp} {"Science of Computer Programming"}
+
+MACRO {sicomp} {"SIAM Journal on Computing"}
+
+MACRO {tocs} {"ACM Transactions on Computer Systems"}
+
+MACRO {tods} {"ACM Transactions on Database Systems"}
+
+MACRO {tog} {"ACM Transactions on Graphics"}
+
+MACRO {toms} {"ACM Transactions on Mathematical Software"}
+
+MACRO {toois} {"ACM Transactions on Office Information Systems"}
+
+MACRO {toplas} {"ACM Transactions on Programming Languages and Systems"}
+
+MACRO {tcs} {"Theoretical Computer Science"}
+FUNCTION {bibinfo.check}
+{ swap$
+ duplicate$ missing$
+ {
+ pop$ pop$
+ ""
+ }
+ { duplicate$ empty$
+ {
+ swap$ pop$
+ }
+ { swap$
+ pop$
+ }
+ if$
+ }
+ if$
+}
+FUNCTION {bibinfo.warn}
+{ swap$
+ duplicate$ missing$
+ {
+ swap$ "missing " swap$ * " in " * cite$ * warning$ pop$
+ ""
+ }
+ { duplicate$ empty$
+ {
+ swap$ "empty " swap$ * " in " * cite$ * warning$
+ }
+ { swap$
+ pop$
+ }
+ if$
+ }
+ if$
+}
+FUNCTION {format.eprint}
+{ eprint duplicate$ empty$
+ 'skip$
+ { "\eprint"
+ archive empty$
+ 'skip$
+ { "[" * archive * "]" * }
+ if$
+ "{" * swap$ * "}" *
+ }
+ if$
+}
+STRINGS { bibinfo}
+INTEGERS { nameptr namesleft numnames }
+
+FUNCTION {format.names}
+{ 'bibinfo :=
+ duplicate$ empty$ 'skip$ {
+ 's :=
+ "" 't :=
+ #1 'nameptr :=
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ { s nameptr
+ "{vv~}{ll}" format.name$ bib.name.font
+ s nameptr
+ "{jj, }{ff}"
+ format.name$ duplicate$ empty$ 'skip$
+ { bib.fname.font ", " swap$ * }
+ if$
+ *
+ bibinfo bibinfo.check
+ 't :=
+ nameptr #1 >
+ {
+ nameptr #1
+ #1 + =
+ numnames #3
+ > and
+ { "others" 't :=
+ #1 'namesleft := }
+ 'skip$
+ if$
+ namesleft #1 >
+ { "; " * t * }
+ {
+ ";" *
+ s nameptr "{ll}" format.name$ duplicate$ "others" =
+ { 't := }
+ { pop$ }
+ if$
+ t "others" =
+ {
+ " " * bbl.etal emphasize *
+ }
+ { " " * t * }
+ if$
+ }
+ if$
+ }
+ 't
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+ } if$
+}
+FUNCTION {format.names.ed}
+{
+ 'bibinfo :=
+ duplicate$ empty$ 'skip$ {
+ 's :=
+ "" 't :=
+ #1 'nameptr :=
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ { s nameptr
+ "{ff}" format.name$ duplicate$ empty$ 'skip$
+ { tie.or.space.prefix bib.fname.font swap$ * }
+ if$
+ s nameptr
+ "{vv~}{ll}" format.name$ bib.name.font *
+ s nameptr
+ "{jj}" format.name$ duplicate$ empty$ 'skip$
+ { bib.fname.font ", " swap$ * }
+ if$
+ *
+ bibinfo bibinfo.check
+ 't :=
+ nameptr #1 >
+ {
+ namesleft #1 >
+ { "; " * t * }
+ {
+ ";" *
+ s nameptr "{ll}" format.name$ duplicate$ "others" =
+ { 't := }
+ { pop$ }
+ if$
+ t "others" =
+ {
+
+ " " * bbl.etal emphasize *
+ }
+ { " " * t * }
+ if$
+ }
+ if$
+ }
+ 't
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+ } if$
+}
+FUNCTION {format.key}
+{ empty$
+ { key field.or.null }
+ { "" }
+ if$
+}
+
+FUNCTION {format.authors}
+{ author "author" format.names
+}
+FUNCTION {get.bbl.editor}
+{ editor num.names$ #1 > 'bbl.editors 'bbl.editor if$ }
+
+FUNCTION {format.editors}
+{ editor "editor" format.names duplicate$ empty$ 'skip$
+ {
+ " " *
+ get.bbl.editor
+ "(" swap$ * ")" *
+ *
+ }
+ if$
+}
+FUNCTION {format.isbn}
+{ isbn "isbn" bibinfo.check
+ duplicate$ empty$ 'skip$
+ {
+ new.block
+ "ISBN " swap$ *
+ }
+ if$
+}
+
+FUNCTION {format.issn}
+{ issn "issn" bibinfo.check
+ duplicate$ empty$ 'skip$
+ {
+ new.block
+ "ISSN " swap$ *
+ }
+ if$
+}
+
+FUNCTION {format.doi}
+{ doi "doi" bibinfo.check
+ duplicate$ empty$ 'skip$
+ {
+ new.block
+ "\doi{" swap$ * "}" *
+ }
+ if$
+}
+FUNCTION {select.language}
+{ duplicate$ empty$
+ 'pop$
+ { language empty$
+ 'skip$
+ { "{\selectlanguage{" language * "}" * swap$ * "}" * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.note}
+{
+ url empty$
+ 'skip$
+ { "\urlprefix\url{" url * "}" * output }
+ if$
+ note empty$
+ { "" }
+ { note #1 #1 substring$
+ duplicate$ "{" =
+ 'skip$
+ { output.state mid.sentence =
+ { "l" }
+ { "u" }
+ if$
+ change.case$
+ }
+ if$
+ note #2 global.max$ substring$ * "note" bibinfo.check
+ }
+ if$
+}
+
+FUNCTION {format.title}
+{ title
+ duplicate$ empty$ 'skip$
+ { "t" change.case$ }
+ if$
+ "title" bibinfo.check
+ duplicate$ empty$ 'skip$
+ {
+ "\enquote{" swap$ *
+ "}" *
+ select.language
+ }
+ if$
+}
+FUNCTION {format.full.names}
+{'s :=
+ "" 't :=
+ #1 'nameptr :=
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ { s nameptr
+ "{vv~}{ll}" format.name$
+ cite.name.font
+ 't :=
+ nameptr #1 >
+ {
+ nameptr #1
+ #1 + =
+ numnames #3
+ > and
+ { "others" 't :=
+ #1 'namesleft := }
+ 'skip$
+ if$
+ namesleft #1 >
+ { ", " * t * }
+ {
+ s nameptr "{ll}" format.name$ duplicate$ "others" =
+ { 't := }
+ { pop$ }
+ if$
+ t "others" =
+ {
+ " " * bbl.etal emphasize *
+ }
+ {
+ bbl.and
+ space.word * t *
+ }
+ if$
+ }
+ if$
+ }
+ 't
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+}
+
+FUNCTION {author.editor.key.full}
+{ author empty$
+ { editor empty$
+ { key empty$
+ { cite$ #1 #3 substring$ }
+ 'key
+ if$
+ }
+ { editor format.full.names }
+ if$
+ }
+ { author format.full.names }
+ if$
+}
+
+FUNCTION {author.key.full}
+{ author empty$
+ { key empty$
+ { cite$ #1 #3 substring$ }
+ 'key
+ if$
+ }
+ { author format.full.names }
+ if$
+}
+
+FUNCTION {editor.key.full}
+{ editor empty$
+ { key empty$
+ { cite$ #1 #3 substring$ }
+ 'key
+ if$
+ }
+ { editor format.full.names }
+ if$
+}
+
+FUNCTION {make.full.names}
+{ type$ "book" =
+ type$ "inbook" =
+ or
+ 'author.editor.key.full
+ { type$ "proceedings" =
+ 'editor.key.full
+ 'author.key.full
+ if$
+ }
+ if$
+}
+
+FUNCTION {output.bibitem}
+{ newline$
+ "\bibitem[{" write$
+ label write$
+ ")" make.full.names duplicate$ short.list =
+ { pop$ }
+ { * }
+ if$
+ "}]{" * write$
+ cite$ write$
+ "}" write$
+ newline$
+ ""
+ before.all 'output.state :=
+}
+
+FUNCTION {n.dashify}
+{
+ 't :=
+ ""
+ { t empty$ not }
+ { t #1 #1 substring$ "-" =
+ { t #1 #2 substring$ "--" = not
+ { "--" *
+ t #2 global.max$ substring$ 't :=
+ }
+ { { t #1 #1 substring$ "-" = }
+ { "-" *
+ t #2 global.max$ substring$ 't :=
+ }
+ while$
+ }
+ if$
+ }
+ { t #1 #1 substring$ *
+ t #2 global.max$ substring$ 't :=
+ }
+ if$
+ }
+ while$
+}
+
+FUNCTION {word.in}
+{ bbl.in capitalize
+ " " * }
+
+FUNCTION {format.date}
+{ year "year" bibinfo.check duplicate$ empty$
+ {
+ }
+ 'skip$
+ if$
+ month "month" bibinfo.check duplicate$ empty$
+ 'skip$
+ {
+ " " * swap$
+ }
+ if$
+ *
+ extra.label *
+}
+FUNCTION {format.btitle}
+{ title "title" bibinfo.check
+ duplicate$ empty$ 'skip$
+ {
+ emphasize
+ select.language
+ }
+ if$
+}
+FUNCTION {either.or.check}
+{ empty$
+ 'pop$
+ { "can't use both " swap$ * " fields in " * cite$ * warning$ }
+ if$
+}
+FUNCTION {format.bvolume}
+{ volume empty$
+ { "" }
+ { bbl.volume volume tie.or.space.prefix
+ "volume" bibinfo.check * *
+ series "series" bibinfo.check
+ duplicate$ empty$ 'pop$
+ { emphasize ", " * swap$ * }
+ if$
+ "volume and number" number either.or.check
+ }
+ if$
+}
+FUNCTION {format.number.series}
+{ volume empty$
+ { number empty$
+ { series field.or.null }
+ { output.state mid.sentence =
+ { bbl.number }
+ { bbl.number capitalize }
+ if$
+ number tie.or.space.prefix "number" bibinfo.check * *
+ series empty$
+ { "there's a number but no series in " cite$ * warning$ }
+ { bbl.in space.word *
+ series "series" bibinfo.check *
+ }
+ if$
+ }
+ if$
+ }
+ { "" }
+ if$
+}
+FUNCTION {is.num}
+{ chr.to.int$
+ duplicate$ "0" chr.to.int$ < not
+ swap$ "9" chr.to.int$ > not and
+}
+
+FUNCTION {extract.num}
+{ duplicate$ 't :=
+ "" 's :=
+ { t empty$ not }
+ { t #1 #1 substring$
+ t #2 global.max$ substring$ 't :=
+ duplicate$ is.num
+ { s swap$ * 's := }
+ { pop$ "" 't := }
+ if$
+ }
+ while$
+ s empty$
+ 'skip$
+ { pop$ s }
+ if$
+}
+
+FUNCTION {convert.edition}
+{ extract.num "l" change.case$ 's :=
+ s "first" = s "1" = or
+ { bbl.first 't := }
+ { s "second" = s "2" = or
+ { bbl.second 't := }
+ { s "third" = s "3" = or
+ { bbl.third 't := }
+ { s "fourth" = s "4" = or
+ { bbl.fourth 't := }
+ { s "fifth" = s "5" = or
+ { bbl.fifth 't := }
+ { s #1 #1 substring$ is.num
+ { s bbl.th * 't := }
+ { edition 't := }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+ t
+}
+
+FUNCTION {format.edition}
+{ edition duplicate$ empty$ 'skip$
+ {
+ convert.edition
+ output.state mid.sentence =
+ { "l" }
+ { "t" }
+ if$ change.case$
+ "edition" bibinfo.check
+ " " * bbl.edition *
+ }
+ if$
+}
+INTEGERS { multiresult }
+FUNCTION {multi.page.check}
+{ 't :=
+ #0 'multiresult :=
+ { multiresult not
+ t empty$ not
+ and
+ }
+ { t #1 #1 substring$
+ duplicate$ "-" =
+ swap$ duplicate$ "," =
+ swap$ "+" =
+ or or
+ { #1 'multiresult := }
+ { t #2 global.max$ substring$ 't := }
+ if$
+ }
+ while$
+ multiresult
+}
+FUNCTION {format.pages}
+{ pages duplicate$ empty$ 'skip$
+ { duplicate$ multi.page.check
+ {
+ bbl.pages swap$
+ n.dashify
+ }
+ {
+ bbl.page swap$
+ }
+ if$
+ tie.or.space.prefix
+ "pages" bibinfo.check
+ * *
+ }
+ if$
+}
+FUNCTION {format.journal.pages}
+{ pages duplicate$ empty$ 'pop$
+ { swap$ duplicate$ empty$
+ { pop$ pop$ format.pages }
+ {
+ ": " *
+ swap$
+ n.dashify
+ pages multi.page.check
+ 'bbl.pages
+ 'bbl.page
+ if$
+ swap$ tie.or.space.prefix
+ "pages" bibinfo.check
+ * *
+ *
+ }
+ if$
+ }
+ if$
+}
+FUNCTION {format.journal.eid}
+{ eid "eid" bibinfo.check
+ duplicate$ empty$ 'pop$
+ { swap$ duplicate$ empty$ 'skip$
+ {
+ ": " *
+ }
+ if$
+ swap$ *
+ }
+ if$
+}
+FUNCTION {format.vol.num.pages}
+{ volume field.or.null
+ duplicate$ empty$ 'skip$
+ {
+ bbl.volume swap$ tie.or.space.prefix
+ "volume" bibinfo.check
+ * *
+ }
+ if$
+ number "number" bibinfo.check duplicate$ empty$ 'skip$
+ {
+ swap$ duplicate$ empty$
+ { "there's a number but no volume in " cite$ * warning$ }
+ 'skip$
+ if$
+ swap$
+ "(" swap$ * ")" *
+ }
+ if$ *
+ eid empty$
+ { format.journal.pages }
+ { format.journal.eid }
+ if$
+}
+
+FUNCTION {format.chapter.pages}
+{ chapter empty$
+ 'format.pages
+ { type empty$
+ { bbl.chapter }
+ { type "l" change.case$
+ "type" bibinfo.check
+ }
+ if$
+ chapter tie.or.space.prefix
+ "chapter" bibinfo.check
+ * *
+ pages empty$
+ 'skip$
+ { ", " * format.pages * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.booktitle}
+{
+ booktitle "booktitle" bibinfo.check
+ emphasize
+}
+FUNCTION {format.in.ed.booktitle}
+{ format.booktitle duplicate$ empty$ 'skip$
+ {
+ editor "editor" format.names.ed duplicate$ empty$ 'pop$
+ {
+ get.bbl.editor
+ swap$ "," *
+ " " * swap$ *
+ "(" swap$ * ")" *
+ swap$
+ " " * swap$
+ * }
+ if$
+ word.in swap$ *
+ }
+ if$
+}
+FUNCTION {format.thesis.type}
+{ type duplicate$ empty$
+ 'pop$
+ { swap$ pop$
+ "t" change.case$ "type" bibinfo.check
+ }
+ if$
+}
+FUNCTION {format.tr.number}
+{ number "number" bibinfo.check
+ type duplicate$ empty$
+ { pop$ bbl.techrep }
+ 'skip$
+ if$
+ "type" bibinfo.check
+ swap$ duplicate$ empty$
+ { pop$ "t" change.case$ }
+ { tie.or.space.prefix * * }
+ if$
+}
+FUNCTION {format.article.crossref}
+{
+ word.in
+ " \cite{" * crossref * "}" *
+}
+FUNCTION {format.book.crossref}
+{ volume duplicate$ empty$
+ { "empty volume in " cite$ * "'s crossref of " * crossref * warning$
+ pop$ word.in
+ }
+ { bbl.volume
+ capitalize
+ swap$ tie.or.space.prefix "volume" bibinfo.check * * bbl.of space.word *
+ }
+ if$
+ " \cite{" * crossref * "}" *
+}
+FUNCTION {format.incoll.inproc.crossref}
+{
+ word.in
+ " \cite{" * crossref * "}" *
+}
+FUNCTION {format.org.or.pub}
+{ 't :=
+ ""
+ address empty$ t empty$ and
+ 'skip$
+ {
+ t empty$
+ { address "address" bibinfo.check *
+ }
+ { t *
+ address empty$
+ 'skip$
+ { ", " * address "address" bibinfo.check * }
+ if$
+ }
+ if$
+ }
+ if$
+}
+FUNCTION {format.publisher.address}
+{ publisher "publisher" bibinfo.warn format.org.or.pub
+}
+
+FUNCTION {format.organization.address}
+{ organization "organization" bibinfo.check format.org.or.pub
+}
+
+STRINGS {oldname}
+
+FUNCTION {name.or.dash}
+{ 's :=
+ oldname empty$
+ { s 'oldname := s }
+ { s oldname =
+ { "---" }
+ { s 'oldname := s }
+ if$
+ }
+ if$
+}
+
+FUNCTION {article}
+{ output.bibitem
+ format.authors "author" output.check
+ author format.key output
+ name.or.dash
+ new.block
+ format.title "title" output.check
+ new.block
+ crossref missing$
+ {
+ journal
+ "journal" bibinfo.check
+ emphasize
+ "journal" output.check
+ format.vol.num.pages output
+ format.date "year" output.check
+ }
+ { format.article.crossref output.nonnull
+ format.pages output
+ }
+ if$
+ format.issn output
+ format.doi output
+ new.block
+ format.note output
+ format.eprint output
+ fin.entry
+}
+FUNCTION {book}
+{ output.bibitem
+ author empty$
+ { format.editors "author and editor" output.check
+ editor format.key output
+ add.blank
+ name.or.dash
+ }
+ { format.authors output.nonnull
+ name.or.dash
+ crossref missing$
+ { "author and editor" editor either.or.check }
+ 'skip$
+ if$
+ }
+ if$
+ new.block
+ format.btitle "title" output.check
+ crossref missing$
+ { format.bvolume output
+ new.block
+ format.number.series output
+ new.sentence
+ format.publisher.address output
+ }
+ {
+ new.block
+ format.book.crossref output.nonnull
+ }
+ if$
+ format.edition output
+ format.date "year" output.check
+ format.isbn output
+ format.doi output
+ new.block
+ format.note output
+ format.eprint output
+ fin.entry
+}
+FUNCTION {booklet}
+{ output.bibitem
+ format.authors output
+ author format.key output
+ name.or.dash
+ new.block
+ format.title "title" output.check
+ new.block
+ howpublished "howpublished" bibinfo.check output
+ address "address" bibinfo.check output
+ format.date "year" output.check
+ format.isbn output
+ format.doi output
+ new.block
+ format.note output
+ format.eprint output
+ fin.entry
+}
+
+FUNCTION {inbook}
+{ output.bibitem
+ author empty$
+ { format.editors "author and editor" output.check
+ editor format.key output
+ name.or.dash
+ }
+ { format.authors output.nonnull
+ name.or.dash
+ crossref missing$
+ { "author and editor" editor either.or.check }
+ 'skip$
+ if$
+ }
+ if$
+ new.block
+ format.btitle "title" output.check
+ crossref missing$
+ {
+ format.bvolume output
+ format.chapter.pages "chapter and pages" output.check
+ new.block
+ format.number.series output
+ new.sentence
+ format.publisher.address output
+ }
+ {
+ format.chapter.pages "chapter and pages" output.check
+ new.block
+ format.book.crossref output.nonnull
+ }
+ if$
+ format.edition output
+ format.date "year" output.check
+ crossref missing$
+ { format.isbn output }
+ 'skip$
+ if$
+ format.doi output
+ new.block
+ format.note output
+ format.eprint output
+ fin.entry
+}
+
+FUNCTION {incollection}
+{ output.bibitem
+ format.authors "author" output.check
+ author format.key output
+ name.or.dash
+ new.block
+ format.title "title" output.check
+ new.block
+ crossref missing$
+ { format.in.ed.booktitle "booktitle" output.check
+ format.bvolume output
+ format.number.series output
+ format.chapter.pages output
+ new.sentence
+ format.publisher.address output
+ format.edition output
+ format.date "year" output.check
+ format.isbn output
+ }
+ { format.incoll.inproc.crossref output.nonnull
+ format.chapter.pages output
+ }
+ if$
+ format.doi output
+ new.block
+ format.note output
+ format.eprint output
+ fin.entry
+}
+FUNCTION {inproceedings}
+{ output.bibitem
+ format.authors "author" output.check
+ author format.key output
+ name.or.dash
+ new.block
+ format.title "title" output.check
+ new.block
+ crossref missing$
+ { format.in.ed.booktitle "booktitle" output.check
+ format.bvolume output
+ format.number.series output
+ format.pages output
+ new.sentence
+ publisher empty$
+ { format.organization.address output }
+ { organization "organization" bibinfo.check output
+ format.publisher.address output
+ }
+ if$
+ format.date "year" output.check
+ format.isbn output
+ format.issn output
+ }
+ { format.incoll.inproc.crossref output.nonnull
+ format.pages output
+ }
+ if$
+ format.doi output
+ new.block
+ format.note output
+ format.eprint output
+ fin.entry
+}
+FUNCTION {conference} { inproceedings }
+FUNCTION {manual}
+{ output.bibitem
+ format.authors output
+ author format.key output
+ name.or.dash
+ new.block
+ format.btitle "title" output.check
+ organization address new.block.checkb
+ organization "organization" bibinfo.check output
+ address "address" bibinfo.check output
+ format.edition output
+ format.date "year" output.check
+ format.doi output
+ new.block
+ format.note output
+ format.eprint output
+ fin.entry
+}
+
+FUNCTION {mastersthesis}
+{ output.bibitem
+ format.authors "author" output.check
+ author format.key output
+ name.or.dash
+ new.block
+ format.title
+ "title" output.check
+ new.block
+ bbl.mthesis format.thesis.type output.nonnull
+ school "school" bibinfo.warn output
+ address "address" bibinfo.check output
+ format.date "year" output.check
+ format.doi output
+ new.block
+ format.note output
+ format.eprint output
+ fin.entry
+}
+
+FUNCTION {misc}
+{ output.bibitem
+ format.authors output
+ author format.key output
+ name.or.dash
+ new.block
+ format.title output
+ new.block
+ howpublished "howpublished" bibinfo.check output
+ format.date "year" output.check
+ format.doi output
+ new.block
+ format.note output
+ format.eprint output
+ fin.entry
+}
+FUNCTION {phdthesis}
+{ output.bibitem
+ format.authors "author" output.check
+ author format.key output
+ name.or.dash
+ new.block
+ format.btitle
+ "title" output.check
+ new.block
+ bbl.phdthesis format.thesis.type output.nonnull
+ school "school" bibinfo.warn output
+ address "address" bibinfo.check output
+ format.date "year" output.check
+ format.doi output
+ new.block
+ format.note output
+ format.eprint output
+ fin.entry
+}
+
+FUNCTION {proceedings}
+{ output.bibitem
+ format.editors output
+ editor format.key output
+ name.or.dash
+ new.block
+ format.btitle "title" output.check
+ format.bvolume output
+ format.number.series output
+ new.sentence
+ publisher empty$
+ { format.organization.address output }
+ { organization "organization" bibinfo.check output
+ format.publisher.address output
+ }
+ if$
+ format.date "year" output.check
+ format.isbn output
+ format.issn output
+ format.doi output
+ new.block
+ format.note output
+ format.eprint output
+ fin.entry
+}
+
+FUNCTION {techreport}
+{ output.bibitem
+ format.authors "author" output.check
+ author format.key output
+ name.or.dash
+ new.block
+ format.title
+ "title" output.check
+ new.block
+ format.tr.number output.nonnull
+ institution "institution" bibinfo.warn output
+ address "address" bibinfo.check output
+ format.date "year" output.check
+ format.doi output
+ new.block
+ format.note output
+ format.eprint output
+ fin.entry
+}
+
+FUNCTION {unpublished}
+{ output.bibitem
+ format.authors "author" output.check
+ author format.key output
+ name.or.dash
+ new.block
+ format.title "title" output.check
+ format.date "year" output.check
+ format.doi output
+ new.block
+ format.note "note" output.check
+ format.eprint output
+ fin.entry
+}
+
+FUNCTION {default.type} { misc }
+READ
+FUNCTION {sortify}
+{ purify$
+ "l" change.case$
+}
+INTEGERS { len }
+FUNCTION {chop.word}
+{ 's :=
+ 'len :=
+ s #1 len substring$ =
+ { s len #1 + global.max$ substring$ }
+ 's
+ if$
+}
+FUNCTION {format.lab.names}
+{ 's :=
+ "" 't :=
+ s #1 "{vv~}{ll}" format.name$
+ cite.name.font
+ s num.names$ duplicate$
+ #2 >
+ { pop$
+ " " * bbl.etal emphasize *
+ }
+ { #2 <
+ 'skip$
+ { s #2 "{ff }{vv }{ll}{ jj}" format.name$ "others" =
+ {
+ " " * bbl.etal emphasize *
+ }
+ { bbl.and space.word * s #2 "{vv~}{ll}" format.name$
+ cite.name.font
+ * }
+ if$
+ }
+ if$
+ }
+ if$
+}
+
+FUNCTION {author.key.label}
+{ author empty$
+ { key empty$
+ { cite$ #1 #3 substring$ }
+ 'key
+ if$
+ }
+ { author format.lab.names }
+ if$
+}
+
+FUNCTION {author.editor.key.label}
+{ author empty$
+ { editor empty$
+ { key empty$
+ { cite$ #1 #3 substring$ }
+ 'key
+ if$
+ }
+ { editor format.lab.names }
+ if$
+ }
+ { author format.lab.names }
+ if$
+}
+
+FUNCTION {editor.key.label}
+{ editor empty$
+ { key empty$
+ { cite$ #1 #3 substring$ }
+ 'key
+ if$
+ }
+ { editor format.lab.names }
+ if$
+}
+
+FUNCTION {calc.short.authors}
+{ type$ "book" =
+ type$ "inbook" =
+ or
+ 'author.editor.key.label
+ { type$ "proceedings" =
+ 'editor.key.label
+ 'author.key.label
+ if$
+ }
+ if$
+ 'short.list :=
+}
+
+FUNCTION {calc.label}
+{ calc.short.authors
+ short.list
+ "("
+ *
+ year duplicate$ empty$
+ short.list key field.or.null = or
+ { pop$ "" }
+ 'skip$
+ if$
+ *
+ 'label :=
+}
+
+FUNCTION {sort.format.names}
+{ 's :=
+ #1 'nameptr :=
+ ""
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ { s nameptr
+ "{ll{ }}{ ff{ }}{ jj{ }}"
+ format.name$ 't :=
+ nameptr #1 >
+ {
+ nameptr #1
+ #1 + =
+ numnames #3
+ > and
+ { "others" 't :=
+ #1 'namesleft := }
+ 'skip$
+ if$
+ " " *
+ namesleft #1 = t "others" = and
+ { "zzzzz" * }
+ { t sortify * }
+ if$
+ }
+ { t sortify * }
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+}
+
+FUNCTION {sort.format.title}
+{ 't :=
+ "A " #2
+ "An " #3
+ "The " #4 t chop.word
+ chop.word
+ chop.word
+ sortify
+ #1 global.max$ substring$
+}
+FUNCTION {author.sort}
+{ author empty$
+ { key empty$
+ { "to sort, need author or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { author sort.format.names }
+ if$
+}
+FUNCTION {author.editor.sort}
+{ author empty$
+ { editor empty$
+ { key empty$
+ { "to sort, need author, editor, or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { editor sort.format.names }
+ if$
+ }
+ { author sort.format.names }
+ if$
+}
+FUNCTION {editor.sort}
+{ editor empty$
+ { key empty$
+ { "to sort, need editor or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { editor sort.format.names }
+ if$
+}
+FUNCTION {presort}
+{ calc.label
+ label sortify
+ " "
+ *
+ type$ "book" =
+ type$ "inbook" =
+ or
+ 'author.editor.sort
+ { type$ "proceedings" =
+ 'editor.sort
+ 'author.sort
+ if$
+ }
+ if$
+ #1 entry.max$ substring$
+ 'sort.label :=
+ sort.label
+ *
+ " "
+ *
+ title field.or.null
+ sort.format.title
+ *
+ #1 entry.max$ substring$
+ 'sort.key$ :=
+}
+
+ITERATE {presort}
+SORT
+STRINGS { last.label next.extra }
+INTEGERS { last.extra.num number.label }
+FUNCTION {initialize.extra.label.stuff}
+{ #0 int.to.chr$ 'last.label :=
+ "" 'next.extra :=
+ #0 'last.extra.num :=
+ #0 'number.label :=
+}
+FUNCTION {forward.pass}
+{ last.label label =
+ { last.extra.num #1 + 'last.extra.num :=
+ last.extra.num int.to.chr$ 'extra.label :=
+ }
+ { "a" chr.to.int$ 'last.extra.num :=
+ "" 'extra.label :=
+ label 'last.label :=
+ }
+ if$
+ number.label #1 + 'number.label :=
+}
+FUNCTION {reverse.pass}
+{ next.extra "b" =
+ { "a" 'extra.label := }
+ 'skip$
+ if$
+ extra.label 'next.extra :=
+ extra.label
+ emphasize
+ duplicate$ empty$
+ 'skip$
+ { "{\natexlab{" swap$ * "}}" * }
+ if$
+ 'extra.label :=
+ label extra.label * 'label :=
+}
+EXECUTE {initialize.extra.label.stuff}
+ITERATE {forward.pass}
+REVERSE {reverse.pass}
+FUNCTION {bib.sort.order}
+{ sort.label
+ " "
+ *
+ year field.or.null sortify
+ *
+ " "
+ *
+ title field.or.null
+ sort.format.title
+ *
+ #1 entry.max$ substring$
+ 'sort.key$ :=
+}
+ITERATE {bib.sort.order}
+SORT
+FUNCTION {begin.bib}
+{ preamble$ empty$
+ 'skip$
+ { preamble$ write$ newline$ }
+ if$
+ "\begin{thebibliography}{" number.label int.to.str$ * "}" *
+ write$ newline$
+ "\ProvideTextCommand{\guillemotleft}{OT1}{%"
+ write$ newline$
+ " \leavevmode\raise .27ex\hbox{$\scriptscriptstyle\ll$}}"
+ write$ newline$
+ "\ProvideTextCommand{\guillemotright}{OT1}{%"
+ write$ newline$
+ " \leavevmode\raise .27ex\hbox{$\scriptscriptstyle\gg$}}"
+ write$ newline$
+ "\newcommand{\enquote}[1]{\guillemotleft#1\guillemotright}"
+ write$ newline$
+ "\providecommand{\natexlab}[1]{#1}"
+ write$ newline$
+ "\providecommand{\url}[1]{\texttt{#1}}"
+ write$ newline$
+ "\providecommand{\urlprefix}{URL }"
+ write$ newline$
+ "\expandafter\ifx\csname urlstyle\endcsname\relax"
+ write$ newline$
+ " \providecommand{\doi}[1]{doi:\discretionary{}{}{}#1}\else"
+ write$ newline$
+ " \providecommand{\doi}{doi:\discretionary{}{}{}\begingroup \urlstyle{rm}\Url}\fi"
+ write$ newline$
+ "\providecommand{\selectlanguage}[1]{\relax}"
+ write$ newline$
+ "\providecommand{\eprint}[2][]{\url{#2}}"
+ write$ newline$
+}
+EXECUTE {begin.bib}
+EXECUTE {init.state.consts}
+ITERATE {call.type$}
+FUNCTION {end.bib}
+{ newline$
+ "\end{thebibliography}" write$ newline$
+}
+EXECUTE {end.bib}
+%% End of customized bst file
+%%
+%% End of file `caauda1.bst'. \ No newline at end of file
diff --git a/biblio/bibtex/contrib/catalan/bibtex/bst/caauda2.bst b/biblio/bibtex/contrib/catalan/bibtex/bst/caauda2.bst
new file mode 100644
index 0000000000..d51c8ea232
--- /dev/null
+++ b/biblio/bibtex/contrib/catalan/bibtex/bst/caauda2.bst
@@ -0,0 +1,2044 @@
+%%
+%% This is file `caauda2.bst',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% merlin.mbs (with options: `head,exlang,ay,nat,lang,vonx,nm-revf,aunm-semi,nmdash,nmlm,x3,m1,nmft,nmft-sc,fnm-rm,nmfted,nmand-rm,lab,lab-sc,and-rm,xlab-it,keyxyr,dt-beg,xmth,yr-par,yrp-col,note-yr,tit-qq,qt-g,qx,volp-sp,jwdpg,jwdvol,ser-vol,isbn,issn,doi,edparxc,edby-par,edbyy,catalan,ps,ed,nom,and-xcom,xand,etal-it,eprint,url,url-nt,nfss,,{}')
+%% catalan.mbs (with options: `exlang,ay,nat,lang,vonx,nm-revf,aunm-semi,nmdash,nmlm,x3,m1,nmft,nmft-sc,fnm-rm,nmfted,nmand-rm,lab,lab-sc,and-rm,xlab-it,keyxyr,dt-beg,xmth,yr-par,yrp-col,note-yr,tit-qq,qt-g,qx,volp-sp,jwdpg,jwdvol,ser-vol,isbn,issn,doi,edparxc,edby-par,edbyy,catalan,ps,ed,nom,and-xcom,xand,etal-it,eprint,url,url-nt,nfss,,{}')
+%% physjour.mbs (with options: `exlang,ay,nat,lang,vonx,nm-revf,aunm-semi,nmdash,nmlm,x3,m1,nmft,nmft-sc,fnm-rm,nmfted,nmand-rm,lab,lab-sc,and-rm,xlab-it,keyxyr,dt-beg,xmth,yr-par,yrp-col,note-yr,tit-qq,qt-g,qx,volp-sp,jwdpg,jwdvol,ser-vol,isbn,issn,doi,edparxc,edby-par,edbyy,catalan,ps,ed,nom,and-xcom,xand,etal-it,eprint,url,url-nt,nfss,,{}')
+%% geojour.mbs (with options: `exlang,ay,nat,lang,vonx,nm-revf,aunm-semi,nmdash,nmlm,x3,m1,nmft,nmft-sc,fnm-rm,nmfted,nmand-rm,lab,lab-sc,and-rm,xlab-it,keyxyr,dt-beg,xmth,yr-par,yrp-col,note-yr,tit-qq,qt-g,qx,volp-sp,jwdpg,jwdvol,ser-vol,isbn,issn,doi,edparxc,edby-par,edbyy,catalan,ps,ed,nom,and-xcom,xand,etal-it,eprint,url,url-nt,nfss,,{}')
+%% photjour.mbs (with options: `exlang,ay,nat,lang,vonx,nm-revf,aunm-semi,nmdash,nmlm,x3,m1,nmft,nmft-sc,fnm-rm,nmfted,nmand-rm,lab,lab-sc,and-rm,xlab-it,keyxyr,dt-beg,xmth,yr-par,yrp-col,note-yr,tit-qq,qt-g,qx,volp-sp,jwdpg,jwdvol,ser-vol,isbn,issn,doi,edparxc,edby-par,edbyy,catalan,ps,ed,nom,and-xcom,xand,etal-it,eprint,url,url-nt,nfss,,{}')
+%% merlin.mbs (with options: `tail,exlang,ay,nat,lang,vonx,nm-revf,aunm-semi,nmdash,nmlm,x3,m1,nmft,nmft-sc,fnm-rm,nmfted,nmand-rm,lab,lab-sc,and-rm,xlab-it,keyxyr,dt-beg,xmth,yr-par,yrp-col,note-yr,tit-qq,qt-g,qx,volp-sp,jwdpg,jwdvol,ser-vol,isbn,issn,doi,edparxc,edby-par,edbyy,catalan,ps,ed,nom,and-xcom,xand,etal-it,eprint,url,url-nt,nfss,,{}')
+%% ----------------------------------------
+%% *** catalan author-date BibTeX style (by Robert Fuster using makebst, 19/11/04) ***
+%% *** this BibTeX style requires the natbib LaTeX style***
+%% *** year follows author(s) ***
+%%
+%% Copyright 1994-2004 Patrick W Daly
+ % ===============================================================
+ % IMPORTANT NOTICE:
+ % This bibliographic style (bst) file has been generated from one or
+ % more master bibliographic style (mbs) files, listed above.
+ %
+ % This generated file can be redistributed and/or modified under the terms
+ % of the LaTeX Project Public License Distributed from CTAN
+ % archives in directory macros/latex/base/lppl.txt; either
+ % version 1 of the License, or any later version.
+ % ===============================================================
+ % Name and version information of the main mbs file:
+ % \ProvidesFile{merlin.mbs}[2004/02/09 4.13 (PWD, AO, DPC)]
+ % For use with BibTeX version 0.99a or later
+ %-------------------------------------------------------------------
+ % This bibliography style file is intended for texts in
+ % CATALAN
+ % This is an author-year citation style bibliography. As such, it is
+ % non-standard LaTeX, and requires a special package file to function properly.
+ % Such a package is natbib.sty by Patrick W. Daly
+ % The form of the \bibitem entries is
+ % \bibitem[Jones et al.(1990)]{key}...
+ % \bibitem[Jones et al.(1990)Jones, Baker, and Smith]{key}...
+ % The essential feature is that the label (the part in brackets) consists
+ % of the author names, as they should appear in the citation, with the year
+ % in parentheses following. There must be no space before the opening
+ % parenthesis!
+ % With natbib v5.3, a full list of authors may also follow the year.
+ % In natbib.sty, it is possible to define the type of enclosures that is
+ % really wanted (brackets or parentheses), but in either case, there must
+ % be parentheses in the label.
+ % The \cite command functions as follows:
+ % \citet{key} ==>> Jones et al. (1990)
+ % \citet*{key} ==>> Jones, Baker, and Smith (1990)
+ % \citep{key} ==>> (Jones et al., 1990)
+ % \citep*{key} ==>> (Jones, Baker, and Smith, 1990)
+ % \citep[chap. 2]{key} ==>> (Jones et al., 1990, chap. 2)
+ % \citep[e.g.][]{key} ==>> (e.g. Jones et al., 1990)
+ % \citep[e.g.][p. 32]{key} ==>> (e.g. Jones et al., p. 32)
+ % \citeauthor{key} ==>> Jones et al.
+ % \citeauthor*{key} ==>> Jones, Baker, and Smith
+ % \citeyear{key} ==>> 1990
+ %---------------------------------------------------------------------
+
+ENTRY
+ { address
+ annote
+ archive
+ author
+ booktitle
+ chapter
+ doi
+ edition
+ editor
+ eid
+ eprint
+ howpublished
+ institution
+ isbn
+ issn
+ journal
+ key
+ language
+ month
+ note
+ number
+ organization
+ pages
+ publisher
+ school
+ series
+ title
+ type
+ url
+ volume
+ year
+ }
+ {}
+ { label extra.label sort.label short.list }
+INTEGERS { output.state before.all mid.sentence after.sentence after.block }
+FUNCTION {init.state.consts}
+{ #0 'before.all :=
+ #1 'mid.sentence :=
+ #2 'after.sentence :=
+ #3 'after.block :=
+}
+STRINGS { s t}
+FUNCTION {output.nonnull}
+{ 's :=
+ output.state mid.sentence =
+ { ", " * write$ }
+ { output.state after.block =
+ { add.period$ write$
+ newline$
+ "\newblock " write$
+ }
+ { output.state before.all =
+ 'write$
+ { add.period$ " " * write$ }
+ if$
+ }
+ if$
+ mid.sentence 'output.state :=
+ }
+ if$
+ s
+}
+FUNCTION {output}
+{ duplicate$ empty$
+ 'pop$
+ 'output.nonnull
+ if$
+}
+FUNCTION {output.check}
+{ 't :=
+ duplicate$ empty$
+ { pop$ "empty " t * " in " * cite$ * warning$ }
+ 'output.nonnull
+ if$
+}
+FUNCTION {fin.entry}
+{ add.period$
+ write$
+ newline$
+}
+
+FUNCTION {new.block}
+{ output.state before.all =
+ 'skip$
+ { after.block 'output.state := }
+ if$
+}
+FUNCTION {new.sentence}
+{ output.state after.block =
+ 'skip$
+ { output.state before.all =
+ 'skip$
+ { after.sentence 'output.state := }
+ if$
+ }
+ if$
+}
+FUNCTION {add.blank}
+{ " " * before.all 'output.state :=
+}
+
+FUNCTION {date.block}
+{
+ ":" *
+ add.blank
+}
+
+FUNCTION {not}
+{ { #0 }
+ { #1 }
+ if$
+}
+FUNCTION {and}
+{ 'skip$
+ { pop$ #0 }
+ if$
+}
+FUNCTION {or}
+{ { pop$ #1 }
+ 'skip$
+ if$
+}
+FUNCTION {non.stop}
+{ duplicate$
+ "}" * add.period$
+ #-1 #1 substring$ "." =
+}
+
+FUNCTION {new.block.checkb}
+{ empty$
+ swap$ empty$
+ and
+ 'skip$
+ 'new.block
+ if$
+}
+FUNCTION {field.or.null}
+{ duplicate$ empty$
+ { pop$ "" }
+ 'skip$
+ if$
+}
+FUNCTION {emphasize}
+{ duplicate$ empty$
+ { pop$ "" }
+ { "\emph{" swap$ * "}" * }
+ if$
+}
+FUNCTION {scaps}
+{ duplicate$ empty$
+ { pop$ "" }
+ { "\textsc{" swap$ * "}" * }
+ if$
+}
+FUNCTION {bib.name.font}
+{ scaps }
+FUNCTION {bib.fname.font}
+{ skip$ }
+FUNCTION {cite.name.font}
+{ scaps }
+FUNCTION {tie.or.space.prefix}
+{ duplicate$ text.length$ #3 <
+ { "~" }
+ { " " }
+ if$
+ swap$
+}
+
+FUNCTION {capitalize}
+{ "u" change.case$ "t" change.case$ }
+
+FUNCTION {space.word}
+{ " " swap$ * " " * }
+ % Here are the language-specific definitions for explicit words.
+ % Each function has a name bbl.xxx where xxx is the English word.
+ %-------------------------------------------------------------------
+ % Begin module: catalan.mbs
+ % \ProvidesFile{catalan.mbs}[2003/11/06 4.2 (PWD)]
+
+ % The language selected here is CATALAN
+FUNCTION {bbl.and}
+{ "i"}
+
+FUNCTION {bbl.etal}
+{ "et~al." }
+
+FUNCTION {bbl.editors}
+{ "eds." }
+
+FUNCTION {bbl.editor}
+{ "ed." }
+
+FUNCTION {bbl.edby}
+{ "editat per" }
+
+FUNCTION {bbl.edition}
+{ "edici\'o" }
+
+FUNCTION {bbl.volume}
+{ "volum" }
+
+FUNCTION {bbl.of}
+{ "de" }
+
+FUNCTION {bbl.number}
+{ "n\'umero" }
+
+FUNCTION {bbl.nr}
+{ "n." }
+
+FUNCTION {bbl.in}
+{ "dins" }
+
+FUNCTION {bbl.pages}
+{ "ps." }
+
+FUNCTION {bbl.page}
+{ "p." }
+
+FUNCTION {bbl.chapter}
+{ "cap\'{\i}tol" }
+
+FUNCTION {bbl.techrep}
+{ "Report t{\`e}cnic" }
+
+FUNCTION {bbl.mthesis}
+{ "Projecte F. de Carrera o Tesina de L." }
+
+FUNCTION {bbl.phdthesis}
+{ "Tesi Doctoral" }
+
+FUNCTION {bbl.first}
+{ "primera" }
+
+FUNCTION {bbl.second}
+{ "segona" }
+
+FUNCTION {bbl.third}
+{ "tercera" }
+
+FUNCTION {bbl.fourth}
+{ "quarta" }
+
+FUNCTION {bbl.fifth}
+{ "cinquena" }
+
+FUNCTION {bbl.th}
+{ "a" }
+
+MACRO {jan} {"gener"}
+
+MACRO {feb} {"febrer"}
+
+MACRO {mar} {"mar\c{c}"}
+
+MACRO {apr} {"abril"}
+
+MACRO {may} {"maig"}
+
+MACRO {jun} {"juny"}
+
+MACRO {jul} {"juliol"}
+
+MACRO {aug} {"agost"}
+
+MACRO {sep} {"setembre"}
+
+MACRO {oct} {"octubre"}
+
+MACRO {nov} {"novembre"}
+
+MACRO {dec} {"desembre"}
+
+ % End module: catalan.mbs
+ % \end{macrocode}
+ %-------------------------------------------------------------------
+ % Begin module:
+ % \ProvidesFile{physjour.mbs}[2002/01/14 2.2 (PWD)]
+MACRO {aa}{"Astronomy and Astrophysics"}
+MACRO {aasup}{"Astronomy and Astrophysics, Supplement Series"}
+MACRO {aj}{"Astronomical Journal"}
+MACRO {aph} {"Acta Physica"}
+MACRO {advp} {"Advances in Physics"}
+MACRO {ajp} {"American Journal of Physics"}
+MACRO {ajm} {"American Journal of Mathematics"}
+MACRO {amsci} {"American Scientist"}
+MACRO {anofd} {"Annals of Fluid Dynamics"}
+MACRO {am} {"Annals of Mathematics"}
+MACRO {ap} {"Annals of Physics"}
+MACRO {adp} {"Annalen der Physik"}
+MACRO {ao} {"Applied Optics"}
+MACRO {apl} {"Applied Physics Letters"}
+MACRO {app} {"Astroparticle Physics"}
+MACRO {apj} {"Astrophysical Journal"}
+MACRO {apjsup} {"Astrophysical Journal Supplement"}
+MACRO {apss} {"Astrophysics and Space Science"}
+MACRO {araa} {"Annual Review of Astronomy and Astrophysics"}
+MACRO {baas} {"Bulletin of the American Astronomical Society"}
+MACRO {baps} {"Bulletin of the American Physical Society"}
+MACRO {cmp} {"Communications in Mathematical Physics"}
+MACRO {cpam} {"Communications on Pure and Applied Mathematics"}
+MACRO {cppcf} {"Comments on Plasma Physics and Controlled Fusion"}
+MACRO {cpc} {"Computer Physics Communications"}
+MACRO {cqg} {"Classical and Quantum Gravity"}
+MACRO {cra} {"Comptes Rendus des S{\'e}ances de l'Acad{\'e}mie des Sciences A"}
+MACRO {fed} {"Fusion Engineering and Design"}
+MACRO {ft} {"Fusion Technology"}
+MACRO {grg} {"General Relativity and Gravitation"}
+MACRO {ieeens} {"IEEE Transactions on Nuclear Science"}
+MACRO {ieeeps} {"IEEE Transactions on Plasma Science"}
+MACRO {ijimw} {"International Journal of Infrared and Millimeter Waves"}
+MACRO {ip} {"Infrared Physics"}
+MACRO {irp} {"Infrared Physics"}
+MACRO {jap} {"Journal of Applied Physics"}
+MACRO {jasa} {"Journal of the Acoustical Society of America"}
+MACRO {jcp} {"Journal of Computational Physics"}
+MACRO {jetp} {"Soviet Physics--JETP"}
+MACRO {jfe} {"Journal of Fusion Energy"}
+MACRO {jfm} {"Journal of Fluid Mechanics"}
+MACRO {jmp} {"Journal of Mathematical Physics"}
+MACRO {jne} {"Journal of Nuclear Energy"}
+MACRO {jnec} {"Journal of Nuclear Energy, Part C: Plasma Physics, Accelerators, Thermonuclear Research"}
+MACRO {jnm} {"Journal of Nuclear Materials"}
+MACRO {jpc} {"Journal of Physical Chemistry"}
+MACRO {jpp} {"Journal of Plasma Physics"}
+MACRO {jpsj} {"Journal of the Physical Society of Japan"}
+MACRO {jsi} {"Journal of Scientific Instruments"}
+MACRO {jvst} {"Journal of Vacuum Science and Technology"}
+MACRO {nat} {"Nature"}
+MACRO {nature} {"Nature"}
+MACRO {nedf} {"Nuclear Engineering and Design/Fusion"}
+MACRO {nf} {"Nuclear Fusion"}
+MACRO {nim} {"Nuclear Instruments and Methods"}
+MACRO {nimpr} {"Nuclear Instruments and Methods in Physics Research"}
+MACRO {np} {"Nuclear Physics"}
+MACRO {npb} {"Nuclear Physics B"}
+MACRO {nt/f} {"Nuclear Technology/Fusion"}
+MACRO {npbpc} {"Nuclear Physics B (Proceedings Supplements)"}
+MACRO {inc} {"Il Nuovo Cimento"}
+MACRO {nc} {"Nuovo Cimento"}
+MACRO {pf} {"Physics of Fluids"}
+MACRO {pfa} {"Physics of Fluids A: Fluid Dynamics"}
+MACRO {pfb} {"Physics of Fluids B: Plasma Physics"}
+MACRO {pl} {"Physics Letters"}
+MACRO {pla} {"Physics Letters A"}
+MACRO {plb} {"Physics Letters B"}
+MACRO {prep} {"Physics Reports"}
+MACRO {pnas} {"Proceedings of the National Academy of Sciences of the USA"}
+MACRO {pp} {"Physics of Plasmas"}
+MACRO {ppcf} {"Plasma Physics and Controlled Fusion"}
+MACRO {phitrsl} {"Philosophical Transactions of the Royal Society of London"}
+MACRO {prl} {"Physical Review Letters"}
+MACRO {pr} {"Physical Review"}
+MACRO {physrev} {"Physical Review"}
+MACRO {pra} {"Physical Review A"}
+MACRO {prb} {"Physical Review B"}
+MACRO {prc} {"Physical Review C"}
+MACRO {prd} {"Physical Review D"}
+MACRO {pre} {"Physical Review E"}
+MACRO {ps} {"Physica Scripta"}
+MACRO {procrsl} {"Proceedings of the Royal Society of London"}
+MACRO {rmp} {"Reviews of Modern Physics"}
+MACRO {rsi} {"Review of Scientific Instruments"}
+MACRO {science} {"Science"}
+MACRO {sciam} {"Scientific American"}
+MACRO {sam} {"Studies in Applied Mathematics"}
+MACRO {sjpp} {"Soviet Journal of Plasma Physics"}
+MACRO {spd} {"Soviet Physics--Doklady"}
+MACRO {sptp} {"Soviet Physics--Technical Physics"}
+MACRO {spu} {"Soviet Physics--Uspeki"}
+MACRO {st} {"Sky and Telescope"}
+ % End module: physjour.mbs
+ %-------------------------------------------------------------------
+ % Begin module:
+ % \ProvidesFile{geojour.mbs}[2002/07/10 2.0h (PWD)]
+MACRO {aisr} {"Advances in Space Research"}
+MACRO {ag} {"Annales Geophysic\ae"}
+MACRO {anigeo} {"Annali di Geofisica"}
+MACRO {angl} {"Annals of Glaciology"}
+MACRO {andmet} {"Annalen der Meteorologie"}
+MACRO {andgeo} {"Annales de Geophysique"}
+MACRO {andphy} {"Annales de Physique"}
+MACRO {afmgb} {"Archiv f\^^b{u}r Meteorologie, Geophysik und Bioklimatologie"}
+MACRO {ass}{"Astrophysics and Space Science"}
+MACRO {atph} {"Atm\'osphera"}
+MACRO {aao} {"Atmosphere-Ocean"}
+MACRO {atenv} {"Atmospheric Environment"}
+MACRO {aujag} {"Australian Journal of Agricultural Research"}
+MACRO {aumet} {"Australian Meteorological Magazine"}
+MACRO {blmet} {"Boundary-Layer Meteorology"}
+MACRO {bams} {"Bulletin of the American Meteorological Society"}
+MACRO {cch} {"Climatic Change"}
+MACRO {cdyn} {"Climate Dynamics"}
+MACRO {cbul} {"Climatological Bulletin"}
+MACRO {cap} {"Contributions to Atmospheric Physics"}
+MACRO {dsr} {"Deep-Sea Research"}
+MACRO {dhz} {"Deutsche Hydrographische Zeitschrift"}
+MACRO {dao} {"Dynamics of Atmospheres and Oceans"}
+MACRO {eco} {"Ecology"}
+MACRO {empl}{"Earth, Moon and Planets"}
+MACRO {envres} {"Environmental Research"}
+MACRO {envst} {"Environmental Science and Technology"}
+MACRO {ecms} {"Estuarine and Coastal Marine Science"}
+MACRO {expa}{"Experimental Astronomy"}
+MACRO {geoint} {"Geofisica Internationale"}
+MACRO {geopub} {"Geofysiske Publikasjoner"}
+MACRO {geogeo} {"Geologiya i Geofizika"}
+MACRO {gafd} {"Geophysical and Astrophysical Fluid Dynamics"}
+MACRO {gfd} {"Geophysical Fluid Dynamics"}
+MACRO {geomag} {"Geophysical Magazine"}
+MACRO {georl} {"Geophysical Research Letters"}
+MACRO {grl} {"Geophysical Research Letters"}
+MACRO {ga} {"Geophysica"}
+MACRO {gs} {"Geophysics"}
+MACRO {ieeetap} {"IEEE Transactions on Antennas and Propagation"}
+MACRO {ijawp} {"International Journal of Air and Water Pollution"}
+MACRO {ijc} {"International Journal of Climatology"}
+MACRO {ijrs} {"International Journal of Remote Sensing"}
+MACRO {jam} {"Journal of Applied Meteorology"}
+MACRO {jaot} {"Journal of Atmospheric and Oceanic Technology"}
+MACRO {jatp} {"Journal of Atmospheric and Terrestrial Physics"}
+MACRO {jastp} {"Journal of Atmospheric and Solar-Terrestrial Physics"}
+MACRO {jce} {"Journal of Climate"}
+MACRO {jcam} {"Journal of Climate and Applied Meteorology"}
+MACRO {jcm} {"Journal of Climate Meteorology"}
+MACRO {jcy} {"journal of Climatology"}
+MACRO {jgr} {"Journal of Geophysical Research"}
+MACRO {jga} {"Journal of Glaciology"}
+MACRO {jh} {"Journal of Hydrology"}
+MACRO {jmr} {"Journal of Marine Research"}
+MACRO {jmrj} {"Journal of Meteorological Research, Japan"}
+MACRO {jm} {"Journal of Meteorology"}
+MACRO {jpo} {"Journal of Physical Oceanography"}
+MACRO {jra} {"Journal de Recherches Atmospheriques"}
+MACRO {jaes} {"Journal of the Aeronautical Sciences"}
+MACRO {japca} {"Journal of the Air Pollution Control Association"}
+MACRO {jas} {"Journal of the Atmospheric Sciences"}
+MACRO {jmts} {"Journal of the Marine Technology Society"}
+MACRO {jmsj} {"Journal of Meteorological Society of Japan"}
+MACRO {josj} {"Journal of the Oceanographical Society of Japan"}
+MACRO {jwm} {"Journal of Weather Modification"}
+MACRO {lao} {"Limnology and Oceanography"}
+MACRO {mwl} {"Mariners Weather Log"}
+MACRO {mau} {"Mausam"}
+MACRO {meteor} {"``Meteor'' Forschungsergebnisse"}
+MACRO {map} {"Meteorology and Atmospheric Physics"}
+MACRO {metmag} {"Meteorological Magazine"}
+MACRO {metmon} {"Meteorological Monographs"}
+MACRO {metrun} {"Meteorologische Rundschau"}
+MACRO {metzeit} {"Meteorologische Zeitschrift"}
+MACRO {metgid} {"Meteorologiya i Gidrologiya"}
+MACRO {mwr} {"Monthly Weather Review"}
+MACRO {nwd} {"National Weather Digest"}
+MACRO {nzjmfr} {"New Zealand Journal of Marine and Freshwater Research"}
+MACRO {npg} {"Nonlinear Processes in Geophysics"}
+MACRO {om} {"Oceanography and Meteorology"}
+MACRO {ocac} {"Oceanologica Acta"}
+MACRO {oceanus} {"Oceanus"}
+MACRO {paleoc} {"Paleoceanography"}
+MACRO {pce} {"Physics and Chemistry of the Earth"}
+MACRO {pmg} {"Papers in Meteorology and Geophysics"}
+MACRO {ppom} {"Papers in Physical Oceanography and Meteorology"}
+MACRO {physzeit} {"Physikalische Zeitschrift"}
+MACRO {pps} {"Planetary and Space Science"}
+MACRO {pss} {"Planetary and Space Science"}
+MACRO {pag} {"Pure and Applied Geophysics"}
+MACRO {qjrms} {"Quarterly Journal of the Royal Meteorological Society"}
+MACRO {quatres} {"Quaternary Research"}
+MACRO {rsci} {"Radio Science"}
+MACRO {rse} {"Remote Sensing of the Environment"}
+MACRO {rgeo} {"Reviews of Geophysics"}
+MACRO {rgsp} {"Reviews of Geophysics and Space Physics"}
+MACRO {rdgeo} {"Revista de Geofisica"}
+MACRO {revmeta} {"Revista Meteorologica"}
+MACRO {sgp}{"Surveys in Geophysics"}
+MACRO {sp} {"Solar Phys."}
+MACRO {ssr} {"Space Science Review"}
+MACRO {tellus} {"Tellus"}
+MACRO {tac} {"Theoretical and Applied Climatology"}
+MACRO {tagu} {"Transactions, American Geophysical Union (EOS)"}
+MACRO {wrr} {"Water Resources Research"}
+MACRO {weather} {"Weather"}
+MACRO {wafc} {"Weather and Forecasting"}
+MACRO {ww} {"Weatherwise"}
+MACRO {wmob} {"World Meteorological Organization Bulletin"}
+MACRO {zeitmet} {"Zeitschrift f\^^b{u}r Meteorologie"}
+ % End module: geojour.mbs
+ %-------------------------------------------------------------------
+ % Begin module:
+ % \ProvidesFile{photjour.mbs}[1999/02/24 2.0b (PWD)]
+
+MACRO {appopt} {"Applied Optics"}
+MACRO {bell} {"Bell Systems Technical Journal"}
+MACRO {ell} {"Electronics Letters"}
+MACRO {jasp} {"Journal of Applied Spectroscopy"}
+MACRO {jqe} {"IEEE Journal of Quantum Electronics"}
+MACRO {jlwt} {"Journal of Lightwave Technology"}
+MACRO {jmo} {"Journal of Modern Optics"}
+MACRO {josa} {"Journal of the Optical Society of America"}
+MACRO {josaa} {"Journal of the Optical Society of America~A"}
+MACRO {josab} {"Journal of the Optical Society of America~B"}
+MACRO {jdp} {"Journal de Physique"}
+MACRO {oc} {"Optics Communications"}
+MACRO {ol} {"Optics Letters"}
+MACRO {phtl} {"IEEE Photonics Technology Letters"}
+MACRO {pspie} {"Proceedings of the Society for Photo-Optical Instruments Engineers"}
+MACRO {sse} {"Solid-State Electronics"}
+MACRO {sjot} {"Soviet Journal of Optical Technology"}
+MACRO {sjqe} {"Soviet Journal of Quantum Electronics"}
+MACRO {sleb} {"Soviet Physics--Lebedev Institute Reports"}
+MACRO {stph} {"Soviet Physics--Technical Physics"}
+MACRO {stphl} {"Soviet Technical Physics Letters"}
+MACRO {vr} {"Vision Research"}
+MACRO {zph} {"Zeitschrift f\^^b{u}r Physik"}
+MACRO {zphb} {"Zeitschrift f\^^b{u}r Physik~B"}
+MACRO {zphd} {"Zeitschrift f\^^b{u}r Physik~D"}
+
+MACRO {CLEO} {"Conf. on Lasers and Electro-Optics"}
+MACRO {ASSL} {"Advanced Solid State Lasers"}
+MACRO {OSA} {"Optical Society of America"}
+ % End module: photjour.mbs
+%% Copyright 1994-2004 Patrick W Daly
+MACRO {acmcs} {"ACM Computing Surveys"}
+
+MACRO {acta} {"Acta Informatica"}
+
+MACRO {cacm} {"Communications of the ACM"}
+
+MACRO {ibmjrd} {"IBM Journal of Research and Development"}
+
+MACRO {ibmsj} {"IBM Systems Journal"}
+
+MACRO {ieeese} {"IEEE Transactions on Software Engineering"}
+
+MACRO {ieeetc} {"IEEE Transactions on Computers"}
+
+MACRO {ieeetcad}
+ {"IEEE Transactions on Computer-Aided Design of Integrated Circuits"}
+
+MACRO {ipl} {"Information Processing Letters"}
+
+MACRO {jacm} {"Journal of the ACM"}
+
+MACRO {jcss} {"Journal of Computer and System Sciences"}
+
+MACRO {scp} {"Science of Computer Programming"}
+
+MACRO {sicomp} {"SIAM Journal on Computing"}
+
+MACRO {tocs} {"ACM Transactions on Computer Systems"}
+
+MACRO {tods} {"ACM Transactions on Database Systems"}
+
+MACRO {tog} {"ACM Transactions on Graphics"}
+
+MACRO {toms} {"ACM Transactions on Mathematical Software"}
+
+MACRO {toois} {"ACM Transactions on Office Information Systems"}
+
+MACRO {toplas} {"ACM Transactions on Programming Languages and Systems"}
+
+MACRO {tcs} {"Theoretical Computer Science"}
+FUNCTION {bibinfo.check}
+{ swap$
+ duplicate$ missing$
+ {
+ pop$ pop$
+ ""
+ }
+ { duplicate$ empty$
+ {
+ swap$ pop$
+ }
+ { swap$
+ pop$
+ }
+ if$
+ }
+ if$
+}
+FUNCTION {bibinfo.warn}
+{ swap$
+ duplicate$ missing$
+ {
+ swap$ "missing " swap$ * " in " * cite$ * warning$ pop$
+ ""
+ }
+ { duplicate$ empty$
+ {
+ swap$ "empty " swap$ * " in " * cite$ * warning$
+ }
+ { swap$
+ pop$
+ }
+ if$
+ }
+ if$
+}
+FUNCTION {format.annote}
+{ annote missing$
+ 'skip$
+ { "{\topsep 0pt\begin{trivlist}\item\BIBannoteformat" write$ newline$
+ annote write$ "." write$ newline$
+ "\end{trivlist}}" write$ newline$}
+ if$
+}
+FUNCTION {format.eprint}
+{ eprint duplicate$ empty$
+ 'skip$
+ { "\eprint"
+ archive empty$
+ 'skip$
+ { "[" * archive * "]" * }
+ if$
+ "{" * swap$ * "}" *
+ }
+ if$
+}
+STRINGS { bibinfo}
+INTEGERS { nameptr namesleft numnames }
+
+FUNCTION {format.names}
+{ 'bibinfo :=
+ duplicate$ empty$ 'skip$ {
+ 's :=
+ "" 't :=
+ #1 'nameptr :=
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ { s nameptr
+ "{vv~}{ll}" format.name$ bib.name.font
+ s nameptr
+ "{jj, }{ff}"
+ format.name$ duplicate$ empty$ 'skip$
+ { bib.fname.font ", " swap$ * }
+ if$
+ *
+ bibinfo bibinfo.check
+ 't :=
+ nameptr #1 >
+ {
+ nameptr #1
+ #1 + =
+ numnames #3
+ > and
+ { "others" 't :=
+ #1 'namesleft := }
+ 'skip$
+ if$
+ namesleft #1 >
+ { "; " * t * }
+ {
+ ";" *
+ s nameptr "{ll}" format.name$ duplicate$ "others" =
+ { 't := }
+ { pop$ }
+ if$
+ t "others" =
+ {
+ " " * bbl.etal emphasize *
+ }
+ { " " * t * }
+ if$
+ }
+ if$
+ }
+ 't
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+ } if$
+}
+FUNCTION {format.names.ed}
+{
+ 'bibinfo :=
+ duplicate$ empty$ 'skip$ {
+ 's :=
+ "" 't :=
+ #1 'nameptr :=
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ { s nameptr
+ "{ff}" format.name$ duplicate$ empty$ 'skip$
+ { tie.or.space.prefix bib.fname.font swap$ * }
+ if$
+ s nameptr
+ "{vv~}{ll}" format.name$ bib.name.font *
+ s nameptr
+ "{jj}" format.name$ duplicate$ empty$ 'skip$
+ { bib.fname.font ", " swap$ * }
+ if$
+ *
+ bibinfo bibinfo.check
+ 't :=
+ nameptr #1 >
+ {
+ namesleft #1 >
+ { "; " * t * }
+ {
+ ";" *
+ s nameptr "{ll}" format.name$ duplicate$ "others" =
+ { 't := }
+ { pop$ }
+ if$
+ t "others" =
+ {
+
+ " " * bbl.etal emphasize *
+ }
+ { " " * t * }
+ if$
+ }
+ if$
+ }
+ 't
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+ } if$
+}
+FUNCTION {format.key}
+{ empty$
+ { key field.or.null }
+ { "" }
+ if$
+}
+
+FUNCTION {format.authors}
+{ author "author" format.names
+}
+FUNCTION {get.bbl.editor}
+{ editor num.names$ #1 > 'bbl.editors 'bbl.editor if$ }
+
+FUNCTION {format.editors}
+{ editor "editor" format.names duplicate$ empty$ 'skip$
+ {
+ " " *
+ get.bbl.editor
+ "(" swap$ * ")" *
+ *
+ }
+ if$
+}
+FUNCTION {format.isbn}
+{ isbn "isbn" bibinfo.check
+ duplicate$ empty$ 'skip$
+ {
+ new.block
+ "ISBN " swap$ *
+ }
+ if$
+}
+
+FUNCTION {format.issn}
+{ issn "issn" bibinfo.check
+ duplicate$ empty$ 'skip$
+ {
+ new.block
+ "ISSN " swap$ *
+ }
+ if$
+}
+
+FUNCTION {format.doi}
+{ doi "doi" bibinfo.check
+ duplicate$ empty$ 'skip$
+ {
+ new.block
+ "\doi{" swap$ * "}" *
+ }
+ if$
+}
+FUNCTION {select.language}
+{ duplicate$ empty$
+ 'pop$
+ { language empty$
+ 'skip$
+ { "{\selectlanguage{" language * "}" * swap$ * "}" * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.note}
+{
+ url empty$
+ 'skip$
+ { "\urlprefix\url{" url * "}" * output }
+ if$
+ note empty$
+ { "" }
+ { note #1 #1 substring$
+ duplicate$ "{" =
+ 'skip$
+ { output.state mid.sentence =
+ { "l" }
+ { "u" }
+ if$
+ change.case$
+ }
+ if$
+ note #2 global.max$ substring$ * "note" bibinfo.check
+ }
+ if$
+}
+
+FUNCTION {format.title}
+{ title
+ duplicate$ empty$ 'skip$
+ { "t" change.case$ }
+ if$
+ "title" bibinfo.check
+ duplicate$ empty$ 'skip$
+ {
+ "\enquote{" swap$ *
+ "}" *
+ select.language
+ }
+ if$
+}
+FUNCTION {format.full.names}
+{'s :=
+ "" 't :=
+ #1 'nameptr :=
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ { s nameptr
+ "{vv~}{ll}" format.name$
+ cite.name.font
+ 't :=
+ nameptr #1 >
+ {
+ nameptr #1
+ #1 + =
+ numnames #3
+ > and
+ { "others" 't :=
+ #1 'namesleft := }
+ 'skip$
+ if$
+ namesleft #1 >
+ { ", " * t * }
+ {
+ s nameptr "{ll}" format.name$ duplicate$ "others" =
+ { 't := }
+ { pop$ }
+ if$
+ t "others" =
+ {
+ " " * bbl.etal emphasize *
+ }
+ {
+ bbl.and
+ space.word * t *
+ }
+ if$
+ }
+ if$
+ }
+ 't
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+}
+
+FUNCTION {author.editor.key.full}
+{ author empty$
+ { editor empty$
+ { key empty$
+ { cite$ #1 #3 substring$ }
+ 'key
+ if$
+ }
+ { editor format.full.names }
+ if$
+ }
+ { author format.full.names }
+ if$
+}
+
+FUNCTION {author.key.full}
+{ author empty$
+ { key empty$
+ { cite$ #1 #3 substring$ }
+ 'key
+ if$
+ }
+ { author format.full.names }
+ if$
+}
+
+FUNCTION {editor.key.full}
+{ editor empty$
+ { key empty$
+ { cite$ #1 #3 substring$ }
+ 'key
+ if$
+ }
+ { editor format.full.names }
+ if$
+}
+
+FUNCTION {make.full.names}
+{ type$ "book" =
+ type$ "inbook" =
+ or
+ 'author.editor.key.full
+ { type$ "proceedings" =
+ 'editor.key.full
+ 'author.key.full
+ if$
+ }
+ if$
+}
+
+FUNCTION {output.bibitem}
+{ newline$
+ "\bibitem[{" write$
+ label write$
+ ")" make.full.names duplicate$ short.list =
+ { pop$ }
+ { * }
+ if$
+ "}]{" * write$
+ cite$ write$
+ "}" write$
+ newline$
+ ""
+ before.all 'output.state :=
+}
+
+FUNCTION {n.dashify}
+{
+ 't :=
+ ""
+ { t empty$ not }
+ { t #1 #1 substring$ "-" =
+ { t #1 #2 substring$ "--" = not
+ { "--" *
+ t #2 global.max$ substring$ 't :=
+ }
+ { { t #1 #1 substring$ "-" = }
+ { "-" *
+ t #2 global.max$ substring$ 't :=
+ }
+ while$
+ }
+ if$
+ }
+ { t #1 #1 substring$ *
+ t #2 global.max$ substring$ 't :=
+ }
+ if$
+ }
+ while$
+}
+
+FUNCTION {word.in}
+{ bbl.in capitalize
+ " " * }
+
+FUNCTION {format.date}
+{ year "year" bibinfo.check duplicate$ empty$
+ {
+ "empty year in " cite$ * "; set to ????" * warning$
+ pop$ "????"
+ }
+ 'skip$
+ if$
+ extra.label *
+ before.all 'output.state :=
+ " (" swap$ * ")" *
+}
+FUNCTION {format.btitle}
+{ title "title" bibinfo.check
+ duplicate$ empty$ 'skip$
+ {
+ emphasize
+ select.language
+ }
+ if$
+}
+FUNCTION {either.or.check}
+{ empty$
+ 'pop$
+ { "can't use both " swap$ * " fields in " * cite$ * warning$ }
+ if$
+}
+FUNCTION {format.bvolume}
+{ volume empty$
+ { "" }
+ { bbl.volume volume tie.or.space.prefix
+ "volume" bibinfo.check * *
+ series "series" bibinfo.check
+ duplicate$ empty$ 'pop$
+ { emphasize ", " * swap$ * }
+ if$
+ "volume and number" number either.or.check
+ }
+ if$
+}
+FUNCTION {format.number.series}
+{ volume empty$
+ { number empty$
+ { series field.or.null }
+ { output.state mid.sentence =
+ { bbl.number }
+ { bbl.number capitalize }
+ if$
+ number tie.or.space.prefix "number" bibinfo.check * *
+ series empty$
+ { "there's a number but no series in " cite$ * warning$ }
+ { bbl.in space.word *
+ series "series" bibinfo.check *
+ }
+ if$
+ }
+ if$
+ }
+ { "" }
+ if$
+}
+FUNCTION {is.num}
+{ chr.to.int$
+ duplicate$ "0" chr.to.int$ < not
+ swap$ "9" chr.to.int$ > not and
+}
+
+FUNCTION {extract.num}
+{ duplicate$ 't :=
+ "" 's :=
+ { t empty$ not }
+ { t #1 #1 substring$
+ t #2 global.max$ substring$ 't :=
+ duplicate$ is.num
+ { s swap$ * 's := }
+ { pop$ "" 't := }
+ if$
+ }
+ while$
+ s empty$
+ 'skip$
+ { pop$ s }
+ if$
+}
+
+FUNCTION {convert.edition}
+{ extract.num "l" change.case$ 's :=
+ s "first" = s "1" = or
+ { bbl.first 't := }
+ { s "second" = s "2" = or
+ { bbl.second 't := }
+ { s "third" = s "3" = or
+ { bbl.third 't := }
+ { s "fourth" = s "4" = or
+ { bbl.fourth 't := }
+ { s "fifth" = s "5" = or
+ { bbl.fifth 't := }
+ { s #1 #1 substring$ is.num
+ { s bbl.th * 't := }
+ { edition 't := }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+ t
+}
+
+FUNCTION {format.edition}
+{ edition duplicate$ empty$ 'skip$
+ {
+ convert.edition
+ output.state mid.sentence =
+ { "l" }
+ { "t" }
+ if$ change.case$
+ "edition" bibinfo.check
+ " " * bbl.edition *
+ }
+ if$
+}
+INTEGERS { multiresult }
+FUNCTION {multi.page.check}
+{ 't :=
+ #0 'multiresult :=
+ { multiresult not
+ t empty$ not
+ and
+ }
+ { t #1 #1 substring$
+ duplicate$ "-" =
+ swap$ duplicate$ "," =
+ swap$ "+" =
+ or or
+ { #1 'multiresult := }
+ { t #2 global.max$ substring$ 't := }
+ if$
+ }
+ while$
+ multiresult
+}
+FUNCTION {format.pages}
+{ pages duplicate$ empty$ 'skip$
+ { duplicate$ multi.page.check
+ {
+ bbl.pages swap$
+ n.dashify
+ }
+ {
+ bbl.page swap$
+ }
+ if$
+ tie.or.space.prefix
+ "pages" bibinfo.check
+ * *
+ }
+ if$
+}
+FUNCTION {format.journal.pages}
+{ pages duplicate$ empty$ 'pop$
+ { swap$ duplicate$ empty$
+ { pop$ pop$ format.pages }
+ {
+ ": " *
+ swap$
+ n.dashify
+ pages multi.page.check
+ 'bbl.pages
+ 'bbl.page
+ if$
+ swap$ tie.or.space.prefix
+ "pages" bibinfo.check
+ * *
+ *
+ }
+ if$
+ }
+ if$
+}
+FUNCTION {format.journal.eid}
+{ eid "eid" bibinfo.check
+ duplicate$ empty$ 'pop$
+ { swap$ duplicate$ empty$ 'skip$
+ {
+ ": " *
+ }
+ if$
+ swap$ *
+ }
+ if$
+}
+FUNCTION {format.vol.num.pages}
+{ volume field.or.null
+ duplicate$ empty$ 'skip$
+ {
+ bbl.volume swap$ tie.or.space.prefix
+ "volume" bibinfo.check
+ * *
+ }
+ if$
+ number "number" bibinfo.check duplicate$ empty$ 'skip$
+ {
+ swap$ duplicate$ empty$
+ { "there's a number but no volume in " cite$ * warning$ }
+ 'skip$
+ if$
+ swap$
+ "(" swap$ * ")" *
+ }
+ if$ *
+ eid empty$
+ { format.journal.pages }
+ { format.journal.eid }
+ if$
+}
+
+FUNCTION {format.chapter.pages}
+{ chapter empty$
+ 'format.pages
+ { type empty$
+ { bbl.chapter }
+ { type "l" change.case$
+ "type" bibinfo.check
+ }
+ if$
+ chapter tie.or.space.prefix
+ "chapter" bibinfo.check
+ * *
+ pages empty$
+ 'skip$
+ { ", " * format.pages * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.booktitle}
+{
+ booktitle "booktitle" bibinfo.check
+ emphasize
+}
+FUNCTION {format.in.ed.booktitle}
+{ format.booktitle duplicate$ empty$ 'skip$
+ {
+ editor "editor" format.names.ed duplicate$ empty$ 'pop$
+ {
+ get.bbl.editor
+ swap$ "," *
+ " " * swap$ *
+ "(" swap$ * ")" *
+ swap$
+ " " * swap$
+ * }
+ if$
+ word.in swap$ *
+ }
+ if$
+}
+FUNCTION {format.thesis.type}
+{ type duplicate$ empty$
+ 'pop$
+ { swap$ pop$
+ "t" change.case$ "type" bibinfo.check
+ }
+ if$
+}
+FUNCTION {format.tr.number}
+{ number "number" bibinfo.check
+ type duplicate$ empty$
+ { pop$ bbl.techrep }
+ 'skip$
+ if$
+ "type" bibinfo.check
+ swap$ duplicate$ empty$
+ { pop$ "t" change.case$ }
+ { tie.or.space.prefix * * }
+ if$
+}
+FUNCTION {format.article.crossref}
+{
+ word.in
+ " \cite{" * crossref * "}" *
+}
+FUNCTION {format.book.crossref}
+{ volume duplicate$ empty$
+ { "empty volume in " cite$ * "'s crossref of " * crossref * warning$
+ pop$ word.in
+ }
+ { bbl.volume
+ capitalize
+ swap$ tie.or.space.prefix "volume" bibinfo.check * * bbl.of space.word *
+ }
+ if$
+ " \cite{" * crossref * "}" *
+}
+FUNCTION {format.incoll.inproc.crossref}
+{
+ word.in
+ " \cite{" * crossref * "}" *
+}
+FUNCTION {format.org.or.pub}
+{ 't :=
+ ""
+ address empty$ t empty$ and
+ 'skip$
+ {
+ t empty$
+ { address "address" bibinfo.check *
+ }
+ { t *
+ address empty$
+ 'skip$
+ { ", " * address "address" bibinfo.check * }
+ if$
+ }
+ if$
+ }
+ if$
+}
+FUNCTION {format.publisher.address}
+{ publisher "publisher" bibinfo.warn format.org.or.pub
+}
+
+FUNCTION {format.organization.address}
+{ organization "organization" bibinfo.check format.org.or.pub
+}
+
+STRINGS {oldname}
+
+FUNCTION {name.or.dash}
+{ 's :=
+ oldname empty$
+ { s 'oldname := s }
+ { s oldname =
+ { "---" }
+ { s 'oldname := s }
+ if$
+ }
+ if$
+}
+
+FUNCTION {article}
+{ output.bibitem
+ format.authors "author" output.check
+ author format.key output
+ name.or.dash
+ format.date "year" output.check
+ date.block
+ format.title "title" output.check
+ new.block
+ crossref missing$
+ {
+ journal
+ "journal" bibinfo.check
+ emphasize
+ "journal" output.check
+ format.vol.num.pages output
+ }
+ { format.article.crossref output.nonnull
+ format.pages output
+ }
+ if$
+ format.issn output
+ format.doi output
+ new.block
+ format.note output
+ format.eprint output
+ fin.entry
+ format.annote
+}
+FUNCTION {book}
+{ output.bibitem
+ author empty$
+ { format.editors "author and editor" output.check
+ editor format.key output
+ add.blank
+ name.or.dash
+ }
+ { format.authors output.nonnull
+ name.or.dash
+ crossref missing$
+ { "author and editor" editor either.or.check }
+ 'skip$
+ if$
+ }
+ if$
+ format.date "year" output.check
+ date.block
+ format.btitle "title" output.check
+ crossref missing$
+ { format.bvolume output
+ new.block
+ format.number.series output
+ new.sentence
+ format.publisher.address output
+ }
+ {
+ new.block
+ format.book.crossref output.nonnull
+ }
+ if$
+ format.edition output
+ format.isbn output
+ format.doi output
+ new.block
+ format.note output
+ format.eprint output
+ fin.entry
+ format.annote
+}
+FUNCTION {booklet}
+{ output.bibitem
+ format.authors output
+ author format.key output
+ name.or.dash
+ format.date "year" output.check
+ date.block
+ format.title "title" output.check
+ new.block
+ howpublished "howpublished" bibinfo.check output
+ address "address" bibinfo.check output
+ format.isbn output
+ format.doi output
+ new.block
+ format.note output
+ format.eprint output
+ fin.entry
+ format.annote
+}
+
+FUNCTION {inbook}
+{ output.bibitem
+ author empty$
+ { format.editors "author and editor" output.check
+ editor format.key output
+ name.or.dash
+ }
+ { format.authors output.nonnull
+ name.or.dash
+ crossref missing$
+ { "author and editor" editor either.or.check }
+ 'skip$
+ if$
+ }
+ if$
+ format.date "year" output.check
+ date.block
+ format.btitle "title" output.check
+ crossref missing$
+ {
+ format.bvolume output
+ format.chapter.pages "chapter and pages" output.check
+ new.block
+ format.number.series output
+ new.sentence
+ format.publisher.address output
+ }
+ {
+ format.chapter.pages "chapter and pages" output.check
+ new.block
+ format.book.crossref output.nonnull
+ }
+ if$
+ format.edition output
+ crossref missing$
+ { format.isbn output }
+ 'skip$
+ if$
+ format.doi output
+ new.block
+ format.note output
+ format.eprint output
+ fin.entry
+ format.annote
+}
+
+FUNCTION {incollection}
+{ output.bibitem
+ format.authors "author" output.check
+ author format.key output
+ name.or.dash
+ format.date "year" output.check
+ date.block
+ format.title "title" output.check
+ new.block
+ crossref missing$
+ { format.in.ed.booktitle "booktitle" output.check
+ format.bvolume output
+ format.number.series output
+ format.chapter.pages output
+ new.sentence
+ format.publisher.address output
+ format.edition output
+ format.isbn output
+ }
+ { format.incoll.inproc.crossref output.nonnull
+ format.chapter.pages output
+ }
+ if$
+ format.doi output
+ new.block
+ format.note output
+ format.eprint output
+ fin.entry
+ format.annote
+}
+FUNCTION {inproceedings}
+{ output.bibitem
+ format.authors "author" output.check
+ author format.key output
+ name.or.dash
+ format.date "year" output.check
+ date.block
+ format.title "title" output.check
+ new.block
+ crossref missing$
+ { format.in.ed.booktitle "booktitle" output.check
+ format.bvolume output
+ format.number.series output
+ format.pages output
+ new.sentence
+ publisher empty$
+ { format.organization.address output }
+ { organization "organization" bibinfo.check output
+ format.publisher.address output
+ }
+ if$
+ format.isbn output
+ format.issn output
+ }
+ { format.incoll.inproc.crossref output.nonnull
+ format.pages output
+ }
+ if$
+ format.doi output
+ new.block
+ format.note output
+ format.eprint output
+ fin.entry
+ format.annote
+}
+FUNCTION {conference} { inproceedings }
+FUNCTION {manual}
+{ output.bibitem
+ format.authors output
+ author format.key output
+ name.or.dash
+ format.date "year" output.check
+ date.block
+ format.btitle "title" output.check
+ organization address new.block.checkb
+ organization "organization" bibinfo.check output
+ address "address" bibinfo.check output
+ format.edition output
+ format.doi output
+ new.block
+ format.note output
+ format.eprint output
+ fin.entry
+ format.annote
+}
+
+FUNCTION {mastersthesis}
+{ output.bibitem
+ format.authors "author" output.check
+ author format.key output
+ name.or.dash
+ format.date "year" output.check
+ date.block
+ format.title
+ "title" output.check
+ new.block
+ bbl.mthesis format.thesis.type output.nonnull
+ school "school" bibinfo.warn output
+ address "address" bibinfo.check output
+ format.doi output
+ new.block
+ format.note output
+ format.eprint output
+ fin.entry
+ format.annote
+}
+
+FUNCTION {misc}
+{ output.bibitem
+ format.authors output
+ author format.key output
+ name.or.dash
+ format.date "year" output.check
+ date.block
+ format.title output
+ new.block
+ howpublished "howpublished" bibinfo.check output
+ format.doi output
+ new.block
+ format.note output
+ format.eprint output
+ fin.entry
+ format.annote
+}
+FUNCTION {phdthesis}
+{ output.bibitem
+ format.authors "author" output.check
+ author format.key output
+ name.or.dash
+ format.date "year" output.check
+ date.block
+ format.btitle
+ "title" output.check
+ new.block
+ bbl.phdthesis format.thesis.type output.nonnull
+ school "school" bibinfo.warn output
+ address "address" bibinfo.check output
+ format.doi output
+ new.block
+ format.note output
+ format.eprint output
+ fin.entry
+ format.annote
+}
+
+FUNCTION {proceedings}
+{ output.bibitem
+ format.editors output
+ editor format.key output
+ name.or.dash
+ format.date "year" output.check
+ date.block
+ format.btitle "title" output.check
+ format.bvolume output
+ format.number.series output
+ new.sentence
+ publisher empty$
+ { format.organization.address output }
+ { organization "organization" bibinfo.check output
+ format.publisher.address output
+ }
+ if$
+ format.isbn output
+ format.issn output
+ format.doi output
+ new.block
+ format.note output
+ format.eprint output
+ fin.entry
+ format.annote
+}
+
+FUNCTION {techreport}
+{ output.bibitem
+ format.authors "author" output.check
+ author format.key output
+ name.or.dash
+ format.date "year" output.check
+ date.block
+ format.title
+ "title" output.check
+ new.block
+ format.tr.number output.nonnull
+ institution "institution" bibinfo.warn output
+ address "address" bibinfo.check output
+ format.doi output
+ new.block
+ format.note output
+ format.eprint output
+ fin.entry
+ format.annote
+}
+
+FUNCTION {unpublished}
+{ output.bibitem
+ format.authors "author" output.check
+ author format.key output
+ name.or.dash
+ format.date "year" output.check
+ date.block
+ format.title "title" output.check
+ format.doi output
+ new.block
+ format.note "note" output.check
+ format.eprint output
+ fin.entry
+ format.annote
+}
+
+FUNCTION {default.type} { misc }
+READ
+FUNCTION {sortify}
+{ purify$
+ "l" change.case$
+}
+INTEGERS { len }
+FUNCTION {chop.word}
+{ 's :=
+ 'len :=
+ s #1 len substring$ =
+ { s len #1 + global.max$ substring$ }
+ 's
+ if$
+}
+FUNCTION {format.lab.names}
+{ 's :=
+ "" 't :=
+ s #1 "{vv~}{ll}" format.name$
+ cite.name.font
+ s num.names$ duplicate$
+ #2 >
+ { pop$
+ " " * bbl.etal emphasize *
+ }
+ { #2 <
+ 'skip$
+ { s #2 "{ff }{vv }{ll}{ jj}" format.name$ "others" =
+ {
+ " " * bbl.etal emphasize *
+ }
+ { bbl.and space.word * s #2 "{vv~}{ll}" format.name$
+ cite.name.font
+ * }
+ if$
+ }
+ if$
+ }
+ if$
+}
+
+FUNCTION {author.key.label}
+{ author empty$
+ { key empty$
+ { cite$ #1 #3 substring$ }
+ 'key
+ if$
+ }
+ { author format.lab.names }
+ if$
+}
+
+FUNCTION {author.editor.key.label}
+{ author empty$
+ { editor empty$
+ { key empty$
+ { cite$ #1 #3 substring$ }
+ 'key
+ if$
+ }
+ { editor format.lab.names }
+ if$
+ }
+ { author format.lab.names }
+ if$
+}
+
+FUNCTION {editor.key.label}
+{ editor empty$
+ { key empty$
+ { cite$ #1 #3 substring$ }
+ 'key
+ if$
+ }
+ { editor format.lab.names }
+ if$
+}
+
+FUNCTION {calc.short.authors}
+{ type$ "book" =
+ type$ "inbook" =
+ or
+ 'author.editor.key.label
+ { type$ "proceedings" =
+ 'editor.key.label
+ 'author.key.label
+ if$
+ }
+ if$
+ 'short.list :=
+}
+
+FUNCTION {calc.label}
+{ calc.short.authors
+ short.list
+ "("
+ *
+ year duplicate$ empty$
+ short.list key field.or.null = or
+ { pop$ "" }
+ 'skip$
+ if$
+ *
+ 'label :=
+}
+
+FUNCTION {sort.format.names}
+{ 's :=
+ #1 'nameptr :=
+ ""
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ { s nameptr
+ "{ll{ }}{ ff{ }}{ jj{ }}"
+ format.name$ 't :=
+ nameptr #1 >
+ {
+ nameptr #1
+ #1 + =
+ numnames #3
+ > and
+ { "others" 't :=
+ #1 'namesleft := }
+ 'skip$
+ if$
+ " " *
+ namesleft #1 = t "others" = and
+ { "zzzzz" * }
+ { t sortify * }
+ if$
+ }
+ { t sortify * }
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+}
+
+FUNCTION {sort.format.title}
+{ 't :=
+ "A " #2
+ "An " #3
+ "The " #4 t chop.word
+ chop.word
+ chop.word
+ sortify
+ #1 global.max$ substring$
+}
+FUNCTION {author.sort}
+{ author empty$
+ { key empty$
+ { "to sort, need author or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { author sort.format.names }
+ if$
+}
+FUNCTION {author.editor.sort}
+{ author empty$
+ { editor empty$
+ { key empty$
+ { "to sort, need author, editor, or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { editor sort.format.names }
+ if$
+ }
+ { author sort.format.names }
+ if$
+}
+FUNCTION {editor.sort}
+{ editor empty$
+ { key empty$
+ { "to sort, need editor or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { editor sort.format.names }
+ if$
+}
+FUNCTION {presort}
+{ calc.label
+ label sortify
+ " "
+ *
+ type$ "book" =
+ type$ "inbook" =
+ or
+ 'author.editor.sort
+ { type$ "proceedings" =
+ 'editor.sort
+ 'author.sort
+ if$
+ }
+ if$
+ #1 entry.max$ substring$
+ 'sort.label :=
+ sort.label
+ *
+ " "
+ *
+ title field.or.null
+ sort.format.title
+ *
+ #1 entry.max$ substring$
+ 'sort.key$ :=
+}
+
+ITERATE {presort}
+SORT
+STRINGS { last.label next.extra }
+INTEGERS { last.extra.num number.label }
+FUNCTION {initialize.extra.label.stuff}
+{ #0 int.to.chr$ 'last.label :=
+ "" 'next.extra :=
+ #0 'last.extra.num :=
+ #0 'number.label :=
+}
+FUNCTION {forward.pass}
+{ last.label label =
+ { last.extra.num #1 + 'last.extra.num :=
+ last.extra.num int.to.chr$ 'extra.label :=
+ }
+ { "a" chr.to.int$ 'last.extra.num :=
+ "" 'extra.label :=
+ label 'last.label :=
+ }
+ if$
+ number.label #1 + 'number.label :=
+}
+FUNCTION {reverse.pass}
+{ next.extra "b" =
+ { "a" 'extra.label := }
+ 'skip$
+ if$
+ extra.label 'next.extra :=
+ extra.label
+ emphasize
+ duplicate$ empty$
+ 'skip$
+ { "{\natexlab{" swap$ * "}}" * }
+ if$
+ 'extra.label :=
+ label extra.label * 'label :=
+}
+EXECUTE {initialize.extra.label.stuff}
+ITERATE {forward.pass}
+REVERSE {reverse.pass}
+FUNCTION {bib.sort.order}
+{ sort.label
+ " "
+ *
+ year field.or.null sortify
+ *
+ " "
+ *
+ title field.or.null
+ sort.format.title
+ *
+ #1 entry.max$ substring$
+ 'sort.key$ :=
+}
+ITERATE {bib.sort.order}
+SORT
+FUNCTION {begin.bib}
+{ preamble$ empty$
+ 'skip$
+ { preamble$ write$ newline$ }
+ if$
+ "\begin{thebibliography}{" number.label int.to.str$ * "}" *
+ write$ newline$
+ "\ProvideTextCommand{\guillemotleft}{OT1}{%"
+ write$ newline$
+ " \leavevmode\raise .27ex\hbox{$\scriptscriptstyle\ll$}}"
+ write$ newline$
+ "\ProvideTextCommand{\guillemotright}{OT1}{%"
+ write$ newline$
+ " \leavevmode\raise .27ex\hbox{$\scriptscriptstyle\gg$}}"
+ write$ newline$
+ "\newcommand{\enquote}[1]{\guillemotleft#1\guillemotright}"
+ write$ newline$
+ "\providecommand{\natexlab}[1]{#1}"
+ write$ newline$
+ "\providecommand{\url}[1]{\texttt{#1}}"
+ write$ newline$
+ "\providecommand{\urlprefix}{URL }"
+ write$ newline$
+ "\expandafter\ifx\csname urlstyle\endcsname\relax"
+ write$ newline$
+ " \providecommand{\doi}[1]{doi:\discretionary{}{}{}#1}\else"
+ write$ newline$
+ " \providecommand{\doi}{doi:\discretionary{}{}{}\begingroup \urlstyle{rm}\Url}\fi"
+ write$ newline$
+ "\providecommand{\selectlanguage}[1]{\relax}"
+ write$ newline$
+ "\providecommand{\eprint}[2][]{\url{#2}}"
+ write$ newline$
+ "\providecommand{\BIBannoteformat}{\small\itshape}"
+ write$ newline$
+}
+EXECUTE {begin.bib}
+EXECUTE {init.state.consts}
+ITERATE {call.type$}
+FUNCTION {end.bib}
+{ newline$
+ "\end{thebibliography}" write$ newline$
+}
+EXECUTE {end.bib}
+%% End of customized bst file
+%%
+%% End of file `caauda2.bst'. \ No newline at end of file
diff --git a/biblio/bibtex/contrib/catalan/bibtex/bst/caauda3.bst b/biblio/bibtex/contrib/catalan/bibtex/bst/caauda3.bst
new file mode 100644
index 0000000000..2076a63cb1
--- /dev/null
+++ b/biblio/bibtex/contrib/catalan/bibtex/bst/caauda3.bst
@@ -0,0 +1,2047 @@
+%%
+%% This is file `caauda3.bst',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% merlin.mbs (with options: `head,exlang,ay,nat,lang,vonx,nm-revf,aunm-semi,nmdash,nmlm,x3,m1,nmft,nmft-sc,fnm-rm,nmfted,nmand-rm,lab,lab-sc,and-rm,xlab-it,keyxyr,blkyear,aymth,yrp-col,note-yr,tit-qq,qt-g,qx,volp-sp,jwdpg,jwdvol,ser-vol,isbn,issn,doi,edparxc,edby-par,edbyy,catalan,ps,ed,nom,and-xcom,xand,etal-it,eprint,url,url-nt,nfss,,{}')
+%% catalan.mbs (with options: `exlang,ay,nat,lang,vonx,nm-revf,aunm-semi,nmdash,nmlm,x3,m1,nmft,nmft-sc,fnm-rm,nmfted,nmand-rm,lab,lab-sc,and-rm,xlab-it,keyxyr,blkyear,aymth,yrp-col,note-yr,tit-qq,qt-g,qx,volp-sp,jwdpg,jwdvol,ser-vol,isbn,issn,doi,edparxc,edby-par,edbyy,catalan,ps,ed,nom,and-xcom,xand,etal-it,eprint,url,url-nt,nfss,,{}')
+%% physjour.mbs (with options: `exlang,ay,nat,lang,vonx,nm-revf,aunm-semi,nmdash,nmlm,x3,m1,nmft,nmft-sc,fnm-rm,nmfted,nmand-rm,lab,lab-sc,and-rm,xlab-it,keyxyr,blkyear,aymth,yrp-col,note-yr,tit-qq,qt-g,qx,volp-sp,jwdpg,jwdvol,ser-vol,isbn,issn,doi,edparxc,edby-par,edbyy,catalan,ps,ed,nom,and-xcom,xand,etal-it,eprint,url,url-nt,nfss,,{}')
+%% geojour.mbs (with options: `exlang,ay,nat,lang,vonx,nm-revf,aunm-semi,nmdash,nmlm,x3,m1,nmft,nmft-sc,fnm-rm,nmfted,nmand-rm,lab,lab-sc,and-rm,xlab-it,keyxyr,blkyear,aymth,yrp-col,note-yr,tit-qq,qt-g,qx,volp-sp,jwdpg,jwdvol,ser-vol,isbn,issn,doi,edparxc,edby-par,edbyy,catalan,ps,ed,nom,and-xcom,xand,etal-it,eprint,url,url-nt,nfss,,{}')
+%% photjour.mbs (with options: `exlang,ay,nat,lang,vonx,nm-revf,aunm-semi,nmdash,nmlm,x3,m1,nmft,nmft-sc,fnm-rm,nmfted,nmand-rm,lab,lab-sc,and-rm,xlab-it,keyxyr,blkyear,aymth,yrp-col,note-yr,tit-qq,qt-g,qx,volp-sp,jwdpg,jwdvol,ser-vol,isbn,issn,doi,edparxc,edby-par,edbyy,catalan,ps,ed,nom,and-xcom,xand,etal-it,eprint,url,url-nt,nfss,,{}')
+%% merlin.mbs (with options: `tail,exlang,ay,nat,lang,vonx,nm-revf,aunm-semi,nmdash,nmlm,x3,m1,nmft,nmft-sc,fnm-rm,nmfted,nmand-rm,lab,lab-sc,and-rm,xlab-it,keyxyr,blkyear,aymth,yrp-col,note-yr,tit-qq,qt-g,qx,volp-sp,jwdpg,jwdvol,ser-vol,isbn,issn,doi,edparxc,edby-par,edbyy,catalan,ps,ed,nom,and-xcom,xand,etal-it,eprint,url,url-nt,nfss,,{}')
+%% ----------------------------------------
+%% *** catalan author-date BibTeX style (by Robert Fuster using makebst, 19/11/04) ***
+%% *** this BibTeX style requires the natbib LaTeX style***
+%% *** date at end ***
+%%
+%% Copyright 1994-2004 Patrick W Daly
+ % ===============================================================
+ % IMPORTANT NOTICE:
+ % This bibliographic style (bst) file has been generated from one or
+ % more master bibliographic style (mbs) files, listed above.
+ %
+ % This generated file can be redistributed and/or modified under the terms
+ % of the LaTeX Project Public License Distributed from CTAN
+ % archives in directory macros/latex/base/lppl.txt; either
+ % version 1 of the License, or any later version.
+ % ===============================================================
+ % Name and version information of the main mbs file:
+ % \ProvidesFile{merlin.mbs}[2004/02/09 4.13 (PWD, AO, DPC)]
+ % For use with BibTeX version 0.99a or later
+ %-------------------------------------------------------------------
+ % This bibliography style file is intended for texts in
+ % CATALAN
+ % This is an author-year citation style bibliography. As such, it is
+ % non-standard LaTeX, and requires a special package file to function properly.
+ % Such a package is natbib.sty by Patrick W. Daly
+ % The form of the \bibitem entries is
+ % \bibitem[Jones et al.(1990)]{key}...
+ % \bibitem[Jones et al.(1990)Jones, Baker, and Smith]{key}...
+ % The essential feature is that the label (the part in brackets) consists
+ % of the author names, as they should appear in the citation, with the year
+ % in parentheses following. There must be no space before the opening
+ % parenthesis!
+ % With natbib v5.3, a full list of authors may also follow the year.
+ % In natbib.sty, it is possible to define the type of enclosures that is
+ % really wanted (brackets or parentheses), but in either case, there must
+ % be parentheses in the label.
+ % The \cite command functions as follows:
+ % \citet{key} ==>> Jones et al. (1990)
+ % \citet*{key} ==>> Jones, Baker, and Smith (1990)
+ % \citep{key} ==>> (Jones et al., 1990)
+ % \citep*{key} ==>> (Jones, Baker, and Smith, 1990)
+ % \citep[chap. 2]{key} ==>> (Jones et al., 1990, chap. 2)
+ % \citep[e.g.][]{key} ==>> (e.g. Jones et al., 1990)
+ % \citep[e.g.][p. 32]{key} ==>> (e.g. Jones et al., p. 32)
+ % \citeauthor{key} ==>> Jones et al.
+ % \citeauthor*{key} ==>> Jones, Baker, and Smith
+ % \citeyear{key} ==>> 1990
+ %---------------------------------------------------------------------
+
+ENTRY
+ { address
+ annote
+ archive
+ author
+ booktitle
+ chapter
+ doi
+ edition
+ editor
+ eid
+ eprint
+ howpublished
+ institution
+ isbn
+ issn
+ journal
+ key
+ language
+ month
+ note
+ number
+ organization
+ pages
+ publisher
+ school
+ series
+ title
+ type
+ url
+ volume
+ year
+ }
+ {}
+ { label extra.label sort.label short.list }
+INTEGERS { output.state before.all mid.sentence after.sentence after.block }
+FUNCTION {init.state.consts}
+{ #0 'before.all :=
+ #1 'mid.sentence :=
+ #2 'after.sentence :=
+ #3 'after.block :=
+}
+STRINGS { s t}
+FUNCTION {output.nonnull}
+{ 's :=
+ output.state mid.sentence =
+ { ", " * write$ }
+ { output.state after.block =
+ { add.period$ write$
+ newline$
+ "\newblock " write$
+ }
+ { output.state before.all =
+ 'write$
+ { add.period$ " " * write$ }
+ if$
+ }
+ if$
+ mid.sentence 'output.state :=
+ }
+ if$
+ s
+}
+FUNCTION {output}
+{ duplicate$ empty$
+ 'pop$
+ 'output.nonnull
+ if$
+}
+FUNCTION {output.check}
+{ 't :=
+ duplicate$ empty$
+ { pop$ "empty " t * " in " * cite$ * warning$ }
+ 'output.nonnull
+ if$
+}
+FUNCTION {fin.entry}
+{ add.period$
+ write$
+ newline$
+}
+
+FUNCTION {new.block}
+{ output.state before.all =
+ 'skip$
+ { after.block 'output.state := }
+ if$
+}
+FUNCTION {new.sentence}
+{ output.state after.block =
+ 'skip$
+ { output.state before.all =
+ 'skip$
+ { after.sentence 'output.state := }
+ if$
+ }
+ if$
+}
+FUNCTION {add.blank}
+{ " " * before.all 'output.state :=
+}
+
+FUNCTION {date.block}
+{
+ ":" *
+ add.blank
+}
+
+FUNCTION {not}
+{ { #0 }
+ { #1 }
+ if$
+}
+FUNCTION {and}
+{ 'skip$
+ { pop$ #0 }
+ if$
+}
+FUNCTION {or}
+{ { pop$ #1 }
+ 'skip$
+ if$
+}
+FUNCTION {non.stop}
+{ duplicate$
+ "}" * add.period$
+ #-1 #1 substring$ "." =
+}
+
+FUNCTION {new.block.checkb}
+{ empty$
+ swap$ empty$
+ and
+ 'skip$
+ 'new.block
+ if$
+}
+FUNCTION {field.or.null}
+{ duplicate$ empty$
+ { pop$ "" }
+ 'skip$
+ if$
+}
+FUNCTION {emphasize}
+{ duplicate$ empty$
+ { pop$ "" }
+ { "\emph{" swap$ * "}" * }
+ if$
+}
+FUNCTION {scaps}
+{ duplicate$ empty$
+ { pop$ "" }
+ { "\textsc{" swap$ * "}" * }
+ if$
+}
+FUNCTION {bib.name.font}
+{ scaps }
+FUNCTION {bib.fname.font}
+{ skip$ }
+FUNCTION {cite.name.font}
+{ scaps }
+FUNCTION {tie.or.space.prefix}
+{ duplicate$ text.length$ #3 <
+ { "~" }
+ { " " }
+ if$
+ swap$
+}
+
+FUNCTION {capitalize}
+{ "u" change.case$ "t" change.case$ }
+
+FUNCTION {space.word}
+{ " " swap$ * " " * }
+ % Here are the language-specific definitions for explicit words.
+ % Each function has a name bbl.xxx where xxx is the English word.
+ %-------------------------------------------------------------------
+ % Begin module: catalan.mbs
+ % \ProvidesFile{catalan.mbs}[2003/11/06 4.2 (PWD)]
+
+ % The language selected here is CATALAN
+FUNCTION {bbl.and}
+{ "i"}
+
+FUNCTION {bbl.etal}
+{ "et~al." }
+
+FUNCTION {bbl.editors}
+{ "eds." }
+
+FUNCTION {bbl.editor}
+{ "ed." }
+
+FUNCTION {bbl.edby}
+{ "editat per" }
+
+FUNCTION {bbl.edition}
+{ "edici\'o" }
+
+FUNCTION {bbl.volume}
+{ "volum" }
+
+FUNCTION {bbl.of}
+{ "de" }
+
+FUNCTION {bbl.number}
+{ "n\'umero" }
+
+FUNCTION {bbl.nr}
+{ "n." }
+
+FUNCTION {bbl.in}
+{ "dins" }
+
+FUNCTION {bbl.pages}
+{ "ps." }
+
+FUNCTION {bbl.page}
+{ "p." }
+
+FUNCTION {bbl.chapter}
+{ "cap\'{\i}tol" }
+
+FUNCTION {bbl.techrep}
+{ "Report t{\`e}cnic" }
+
+FUNCTION {bbl.mthesis}
+{ "Projecte F. de Carrera o Tesina de L." }
+
+FUNCTION {bbl.phdthesis}
+{ "Tesi Doctoral" }
+
+FUNCTION {bbl.first}
+{ "primera" }
+
+FUNCTION {bbl.second}
+{ "segona" }
+
+FUNCTION {bbl.third}
+{ "tercera" }
+
+FUNCTION {bbl.fourth}
+{ "quarta" }
+
+FUNCTION {bbl.fifth}
+{ "cinquena" }
+
+FUNCTION {bbl.th}
+{ "a" }
+
+MACRO {jan} {"gener"}
+
+MACRO {feb} {"febrer"}
+
+MACRO {mar} {"mar\c{c}"}
+
+MACRO {apr} {"abril"}
+
+MACRO {may} {"maig"}
+
+MACRO {jun} {"juny"}
+
+MACRO {jul} {"juliol"}
+
+MACRO {aug} {"agost"}
+
+MACRO {sep} {"setembre"}
+
+MACRO {oct} {"octubre"}
+
+MACRO {nov} {"novembre"}
+
+MACRO {dec} {"desembre"}
+
+ % End module: catalan.mbs
+ % \end{macrocode}
+ %-------------------------------------------------------------------
+ % Begin module:
+ % \ProvidesFile{physjour.mbs}[2002/01/14 2.2 (PWD)]
+MACRO {aa}{"Astronomy and Astrophysics"}
+MACRO {aasup}{"Astronomy and Astrophysics, Supplement Series"}
+MACRO {aj}{"Astronomical Journal"}
+MACRO {aph} {"Acta Physica"}
+MACRO {advp} {"Advances in Physics"}
+MACRO {ajp} {"American Journal of Physics"}
+MACRO {ajm} {"American Journal of Mathematics"}
+MACRO {amsci} {"American Scientist"}
+MACRO {anofd} {"Annals of Fluid Dynamics"}
+MACRO {am} {"Annals of Mathematics"}
+MACRO {ap} {"Annals of Physics"}
+MACRO {adp} {"Annalen der Physik"}
+MACRO {ao} {"Applied Optics"}
+MACRO {apl} {"Applied Physics Letters"}
+MACRO {app} {"Astroparticle Physics"}
+MACRO {apj} {"Astrophysical Journal"}
+MACRO {apjsup} {"Astrophysical Journal Supplement"}
+MACRO {apss} {"Astrophysics and Space Science"}
+MACRO {araa} {"Annual Review of Astronomy and Astrophysics"}
+MACRO {baas} {"Bulletin of the American Astronomical Society"}
+MACRO {baps} {"Bulletin of the American Physical Society"}
+MACRO {cmp} {"Communications in Mathematical Physics"}
+MACRO {cpam} {"Communications on Pure and Applied Mathematics"}
+MACRO {cppcf} {"Comments on Plasma Physics and Controlled Fusion"}
+MACRO {cpc} {"Computer Physics Communications"}
+MACRO {cqg} {"Classical and Quantum Gravity"}
+MACRO {cra} {"Comptes Rendus des S{\'e}ances de l'Acad{\'e}mie des Sciences A"}
+MACRO {fed} {"Fusion Engineering and Design"}
+MACRO {ft} {"Fusion Technology"}
+MACRO {grg} {"General Relativity and Gravitation"}
+MACRO {ieeens} {"IEEE Transactions on Nuclear Science"}
+MACRO {ieeeps} {"IEEE Transactions on Plasma Science"}
+MACRO {ijimw} {"International Journal of Infrared and Millimeter Waves"}
+MACRO {ip} {"Infrared Physics"}
+MACRO {irp} {"Infrared Physics"}
+MACRO {jap} {"Journal of Applied Physics"}
+MACRO {jasa} {"Journal of the Acoustical Society of America"}
+MACRO {jcp} {"Journal of Computational Physics"}
+MACRO {jetp} {"Soviet Physics--JETP"}
+MACRO {jfe} {"Journal of Fusion Energy"}
+MACRO {jfm} {"Journal of Fluid Mechanics"}
+MACRO {jmp} {"Journal of Mathematical Physics"}
+MACRO {jne} {"Journal of Nuclear Energy"}
+MACRO {jnec} {"Journal of Nuclear Energy, Part C: Plasma Physics, Accelerators, Thermonuclear Research"}
+MACRO {jnm} {"Journal of Nuclear Materials"}
+MACRO {jpc} {"Journal of Physical Chemistry"}
+MACRO {jpp} {"Journal of Plasma Physics"}
+MACRO {jpsj} {"Journal of the Physical Society of Japan"}
+MACRO {jsi} {"Journal of Scientific Instruments"}
+MACRO {jvst} {"Journal of Vacuum Science and Technology"}
+MACRO {nat} {"Nature"}
+MACRO {nature} {"Nature"}
+MACRO {nedf} {"Nuclear Engineering and Design/Fusion"}
+MACRO {nf} {"Nuclear Fusion"}
+MACRO {nim} {"Nuclear Instruments and Methods"}
+MACRO {nimpr} {"Nuclear Instruments and Methods in Physics Research"}
+MACRO {np} {"Nuclear Physics"}
+MACRO {npb} {"Nuclear Physics B"}
+MACRO {nt/f} {"Nuclear Technology/Fusion"}
+MACRO {npbpc} {"Nuclear Physics B (Proceedings Supplements)"}
+MACRO {inc} {"Il Nuovo Cimento"}
+MACRO {nc} {"Nuovo Cimento"}
+MACRO {pf} {"Physics of Fluids"}
+MACRO {pfa} {"Physics of Fluids A: Fluid Dynamics"}
+MACRO {pfb} {"Physics of Fluids B: Plasma Physics"}
+MACRO {pl} {"Physics Letters"}
+MACRO {pla} {"Physics Letters A"}
+MACRO {plb} {"Physics Letters B"}
+MACRO {prep} {"Physics Reports"}
+MACRO {pnas} {"Proceedings of the National Academy of Sciences of the USA"}
+MACRO {pp} {"Physics of Plasmas"}
+MACRO {ppcf} {"Plasma Physics and Controlled Fusion"}
+MACRO {phitrsl} {"Philosophical Transactions of the Royal Society of London"}
+MACRO {prl} {"Physical Review Letters"}
+MACRO {pr} {"Physical Review"}
+MACRO {physrev} {"Physical Review"}
+MACRO {pra} {"Physical Review A"}
+MACRO {prb} {"Physical Review B"}
+MACRO {prc} {"Physical Review C"}
+MACRO {prd} {"Physical Review D"}
+MACRO {pre} {"Physical Review E"}
+MACRO {ps} {"Physica Scripta"}
+MACRO {procrsl} {"Proceedings of the Royal Society of London"}
+MACRO {rmp} {"Reviews of Modern Physics"}
+MACRO {rsi} {"Review of Scientific Instruments"}
+MACRO {science} {"Science"}
+MACRO {sciam} {"Scientific American"}
+MACRO {sam} {"Studies in Applied Mathematics"}
+MACRO {sjpp} {"Soviet Journal of Plasma Physics"}
+MACRO {spd} {"Soviet Physics--Doklady"}
+MACRO {sptp} {"Soviet Physics--Technical Physics"}
+MACRO {spu} {"Soviet Physics--Uspeki"}
+MACRO {st} {"Sky and Telescope"}
+ % End module: physjour.mbs
+ %-------------------------------------------------------------------
+ % Begin module:
+ % \ProvidesFile{geojour.mbs}[2002/07/10 2.0h (PWD)]
+MACRO {aisr} {"Advances in Space Research"}
+MACRO {ag} {"Annales Geophysic\ae"}
+MACRO {anigeo} {"Annali di Geofisica"}
+MACRO {angl} {"Annals of Glaciology"}
+MACRO {andmet} {"Annalen der Meteorologie"}
+MACRO {andgeo} {"Annales de Geophysique"}
+MACRO {andphy} {"Annales de Physique"}
+MACRO {afmgb} {"Archiv f\^^b{u}r Meteorologie, Geophysik und Bioklimatologie"}
+MACRO {ass}{"Astrophysics and Space Science"}
+MACRO {atph} {"Atm\'osphera"}
+MACRO {aao} {"Atmosphere-Ocean"}
+MACRO {atenv} {"Atmospheric Environment"}
+MACRO {aujag} {"Australian Journal of Agricultural Research"}
+MACRO {aumet} {"Australian Meteorological Magazine"}
+MACRO {blmet} {"Boundary-Layer Meteorology"}
+MACRO {bams} {"Bulletin of the American Meteorological Society"}
+MACRO {cch} {"Climatic Change"}
+MACRO {cdyn} {"Climate Dynamics"}
+MACRO {cbul} {"Climatological Bulletin"}
+MACRO {cap} {"Contributions to Atmospheric Physics"}
+MACRO {dsr} {"Deep-Sea Research"}
+MACRO {dhz} {"Deutsche Hydrographische Zeitschrift"}
+MACRO {dao} {"Dynamics of Atmospheres and Oceans"}
+MACRO {eco} {"Ecology"}
+MACRO {empl}{"Earth, Moon and Planets"}
+MACRO {envres} {"Environmental Research"}
+MACRO {envst} {"Environmental Science and Technology"}
+MACRO {ecms} {"Estuarine and Coastal Marine Science"}
+MACRO {expa}{"Experimental Astronomy"}
+MACRO {geoint} {"Geofisica Internationale"}
+MACRO {geopub} {"Geofysiske Publikasjoner"}
+MACRO {geogeo} {"Geologiya i Geofizika"}
+MACRO {gafd} {"Geophysical and Astrophysical Fluid Dynamics"}
+MACRO {gfd} {"Geophysical Fluid Dynamics"}
+MACRO {geomag} {"Geophysical Magazine"}
+MACRO {georl} {"Geophysical Research Letters"}
+MACRO {grl} {"Geophysical Research Letters"}
+MACRO {ga} {"Geophysica"}
+MACRO {gs} {"Geophysics"}
+MACRO {ieeetap} {"IEEE Transactions on Antennas and Propagation"}
+MACRO {ijawp} {"International Journal of Air and Water Pollution"}
+MACRO {ijc} {"International Journal of Climatology"}
+MACRO {ijrs} {"International Journal of Remote Sensing"}
+MACRO {jam} {"Journal of Applied Meteorology"}
+MACRO {jaot} {"Journal of Atmospheric and Oceanic Technology"}
+MACRO {jatp} {"Journal of Atmospheric and Terrestrial Physics"}
+MACRO {jastp} {"Journal of Atmospheric and Solar-Terrestrial Physics"}
+MACRO {jce} {"Journal of Climate"}
+MACRO {jcam} {"Journal of Climate and Applied Meteorology"}
+MACRO {jcm} {"Journal of Climate Meteorology"}
+MACRO {jcy} {"journal of Climatology"}
+MACRO {jgr} {"Journal of Geophysical Research"}
+MACRO {jga} {"Journal of Glaciology"}
+MACRO {jh} {"Journal of Hydrology"}
+MACRO {jmr} {"Journal of Marine Research"}
+MACRO {jmrj} {"Journal of Meteorological Research, Japan"}
+MACRO {jm} {"Journal of Meteorology"}
+MACRO {jpo} {"Journal of Physical Oceanography"}
+MACRO {jra} {"Journal de Recherches Atmospheriques"}
+MACRO {jaes} {"Journal of the Aeronautical Sciences"}
+MACRO {japca} {"Journal of the Air Pollution Control Association"}
+MACRO {jas} {"Journal of the Atmospheric Sciences"}
+MACRO {jmts} {"Journal of the Marine Technology Society"}
+MACRO {jmsj} {"Journal of Meteorological Society of Japan"}
+MACRO {josj} {"Journal of the Oceanographical Society of Japan"}
+MACRO {jwm} {"Journal of Weather Modification"}
+MACRO {lao} {"Limnology and Oceanography"}
+MACRO {mwl} {"Mariners Weather Log"}
+MACRO {mau} {"Mausam"}
+MACRO {meteor} {"``Meteor'' Forschungsergebnisse"}
+MACRO {map} {"Meteorology and Atmospheric Physics"}
+MACRO {metmag} {"Meteorological Magazine"}
+MACRO {metmon} {"Meteorological Monographs"}
+MACRO {metrun} {"Meteorologische Rundschau"}
+MACRO {metzeit} {"Meteorologische Zeitschrift"}
+MACRO {metgid} {"Meteorologiya i Gidrologiya"}
+MACRO {mwr} {"Monthly Weather Review"}
+MACRO {nwd} {"National Weather Digest"}
+MACRO {nzjmfr} {"New Zealand Journal of Marine and Freshwater Research"}
+MACRO {npg} {"Nonlinear Processes in Geophysics"}
+MACRO {om} {"Oceanography and Meteorology"}
+MACRO {ocac} {"Oceanologica Acta"}
+MACRO {oceanus} {"Oceanus"}
+MACRO {paleoc} {"Paleoceanography"}
+MACRO {pce} {"Physics and Chemistry of the Earth"}
+MACRO {pmg} {"Papers in Meteorology and Geophysics"}
+MACRO {ppom} {"Papers in Physical Oceanography and Meteorology"}
+MACRO {physzeit} {"Physikalische Zeitschrift"}
+MACRO {pps} {"Planetary and Space Science"}
+MACRO {pss} {"Planetary and Space Science"}
+MACRO {pag} {"Pure and Applied Geophysics"}
+MACRO {qjrms} {"Quarterly Journal of the Royal Meteorological Society"}
+MACRO {quatres} {"Quaternary Research"}
+MACRO {rsci} {"Radio Science"}
+MACRO {rse} {"Remote Sensing of the Environment"}
+MACRO {rgeo} {"Reviews of Geophysics"}
+MACRO {rgsp} {"Reviews of Geophysics and Space Physics"}
+MACRO {rdgeo} {"Revista de Geofisica"}
+MACRO {revmeta} {"Revista Meteorologica"}
+MACRO {sgp}{"Surveys in Geophysics"}
+MACRO {sp} {"Solar Phys."}
+MACRO {ssr} {"Space Science Review"}
+MACRO {tellus} {"Tellus"}
+MACRO {tac} {"Theoretical and Applied Climatology"}
+MACRO {tagu} {"Transactions, American Geophysical Union (EOS)"}
+MACRO {wrr} {"Water Resources Research"}
+MACRO {weather} {"Weather"}
+MACRO {wafc} {"Weather and Forecasting"}
+MACRO {ww} {"Weatherwise"}
+MACRO {wmob} {"World Meteorological Organization Bulletin"}
+MACRO {zeitmet} {"Zeitschrift f\^^b{u}r Meteorologie"}
+ % End module: geojour.mbs
+ %-------------------------------------------------------------------
+ % Begin module:
+ % \ProvidesFile{photjour.mbs}[1999/02/24 2.0b (PWD)]
+
+MACRO {appopt} {"Applied Optics"}
+MACRO {bell} {"Bell Systems Technical Journal"}
+MACRO {ell} {"Electronics Letters"}
+MACRO {jasp} {"Journal of Applied Spectroscopy"}
+MACRO {jqe} {"IEEE Journal of Quantum Electronics"}
+MACRO {jlwt} {"Journal of Lightwave Technology"}
+MACRO {jmo} {"Journal of Modern Optics"}
+MACRO {josa} {"Journal of the Optical Society of America"}
+MACRO {josaa} {"Journal of the Optical Society of America~A"}
+MACRO {josab} {"Journal of the Optical Society of America~B"}
+MACRO {jdp} {"Journal de Physique"}
+MACRO {oc} {"Optics Communications"}
+MACRO {ol} {"Optics Letters"}
+MACRO {phtl} {"IEEE Photonics Technology Letters"}
+MACRO {pspie} {"Proceedings of the Society for Photo-Optical Instruments Engineers"}
+MACRO {sse} {"Solid-State Electronics"}
+MACRO {sjot} {"Soviet Journal of Optical Technology"}
+MACRO {sjqe} {"Soviet Journal of Quantum Electronics"}
+MACRO {sleb} {"Soviet Physics--Lebedev Institute Reports"}
+MACRO {stph} {"Soviet Physics--Technical Physics"}
+MACRO {stphl} {"Soviet Technical Physics Letters"}
+MACRO {vr} {"Vision Research"}
+MACRO {zph} {"Zeitschrift f\^^b{u}r Physik"}
+MACRO {zphb} {"Zeitschrift f\^^b{u}r Physik~B"}
+MACRO {zphd} {"Zeitschrift f\^^b{u}r Physik~D"}
+
+MACRO {CLEO} {"Conf. on Lasers and Electro-Optics"}
+MACRO {ASSL} {"Advanced Solid State Lasers"}
+MACRO {OSA} {"Optical Society of America"}
+ % End module: photjour.mbs
+%% Copyright 1994-2004 Patrick W Daly
+MACRO {acmcs} {"ACM Computing Surveys"}
+
+MACRO {acta} {"Acta Informatica"}
+
+MACRO {cacm} {"Communications of the ACM"}
+
+MACRO {ibmjrd} {"IBM Journal of Research and Development"}
+
+MACRO {ibmsj} {"IBM Systems Journal"}
+
+MACRO {ieeese} {"IEEE Transactions on Software Engineering"}
+
+MACRO {ieeetc} {"IEEE Transactions on Computers"}
+
+MACRO {ieeetcad}
+ {"IEEE Transactions on Computer-Aided Design of Integrated Circuits"}
+
+MACRO {ipl} {"Information Processing Letters"}
+
+MACRO {jacm} {"Journal of the ACM"}
+
+MACRO {jcss} {"Journal of Computer and System Sciences"}
+
+MACRO {scp} {"Science of Computer Programming"}
+
+MACRO {sicomp} {"SIAM Journal on Computing"}
+
+MACRO {tocs} {"ACM Transactions on Computer Systems"}
+
+MACRO {tods} {"ACM Transactions on Database Systems"}
+
+MACRO {tog} {"ACM Transactions on Graphics"}
+
+MACRO {toms} {"ACM Transactions on Mathematical Software"}
+
+MACRO {toois} {"ACM Transactions on Office Information Systems"}
+
+MACRO {toplas} {"ACM Transactions on Programming Languages and Systems"}
+
+MACRO {tcs} {"Theoretical Computer Science"}
+FUNCTION {bibinfo.check}
+{ swap$
+ duplicate$ missing$
+ {
+ pop$ pop$
+ ""
+ }
+ { duplicate$ empty$
+ {
+ swap$ pop$
+ }
+ { swap$
+ pop$
+ }
+ if$
+ }
+ if$
+}
+FUNCTION {bibinfo.warn}
+{ swap$
+ duplicate$ missing$
+ {
+ swap$ "missing " swap$ * " in " * cite$ * warning$ pop$
+ ""
+ }
+ { duplicate$ empty$
+ {
+ swap$ "empty " swap$ * " in " * cite$ * warning$
+ }
+ { swap$
+ pop$
+ }
+ if$
+ }
+ if$
+}
+FUNCTION {format.annote}
+{ annote missing$
+ 'skip$
+ { "{\topsep 0pt\begin{trivlist}\item\BIBannoteformat" write$ newline$
+ annote write$ "." write$ newline$
+ "\end{trivlist}}" write$ newline$}
+ if$
+}
+FUNCTION {format.eprint}
+{ eprint duplicate$ empty$
+ 'skip$
+ { "\eprint"
+ archive empty$
+ 'skip$
+ { "[" * archive * "]" * }
+ if$
+ "{" * swap$ * "}" *
+ }
+ if$
+}
+STRINGS { bibinfo}
+INTEGERS { nameptr namesleft numnames }
+
+FUNCTION {format.names}
+{ 'bibinfo :=
+ duplicate$ empty$ 'skip$ {
+ 's :=
+ "" 't :=
+ #1 'nameptr :=
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ { s nameptr
+ "{vv~}{ll}" format.name$ bib.name.font
+ s nameptr
+ "{jj, }{ff}"
+ format.name$ duplicate$ empty$ 'skip$
+ { bib.fname.font ", " swap$ * }
+ if$
+ *
+ bibinfo bibinfo.check
+ 't :=
+ nameptr #1 >
+ {
+ nameptr #1
+ #1 + =
+ numnames #3
+ > and
+ { "others" 't :=
+ #1 'namesleft := }
+ 'skip$
+ if$
+ namesleft #1 >
+ { "; " * t * }
+ {
+ ";" *
+ s nameptr "{ll}" format.name$ duplicate$ "others" =
+ { 't := }
+ { pop$ }
+ if$
+ t "others" =
+ {
+ " " * bbl.etal emphasize *
+ }
+ { " " * t * }
+ if$
+ }
+ if$
+ }
+ 't
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+ } if$
+}
+FUNCTION {format.names.ed}
+{
+ 'bibinfo :=
+ duplicate$ empty$ 'skip$ {
+ 's :=
+ "" 't :=
+ #1 'nameptr :=
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ { s nameptr
+ "{ff}" format.name$ duplicate$ empty$ 'skip$
+ { tie.or.space.prefix bib.fname.font swap$ * }
+ if$
+ s nameptr
+ "{vv~}{ll}" format.name$ bib.name.font *
+ s nameptr
+ "{jj}" format.name$ duplicate$ empty$ 'skip$
+ { bib.fname.font ", " swap$ * }
+ if$
+ *
+ bibinfo bibinfo.check
+ 't :=
+ nameptr #1 >
+ {
+ namesleft #1 >
+ { "; " * t * }
+ {
+ ";" *
+ s nameptr "{ll}" format.name$ duplicate$ "others" =
+ { 't := }
+ { pop$ }
+ if$
+ t "others" =
+ {
+
+ " " * bbl.etal emphasize *
+ }
+ { " " * t * }
+ if$
+ }
+ if$
+ }
+ 't
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+ } if$
+}
+FUNCTION {format.key}
+{ empty$
+ { key field.or.null }
+ { "" }
+ if$
+}
+
+FUNCTION {format.authors}
+{ author "author" format.names
+}
+FUNCTION {get.bbl.editor}
+{ editor num.names$ #1 > 'bbl.editors 'bbl.editor if$ }
+
+FUNCTION {format.editors}
+{ editor "editor" format.names duplicate$ empty$ 'skip$
+ {
+ " " *
+ get.bbl.editor
+ "(" swap$ * ")" *
+ *
+ }
+ if$
+}
+FUNCTION {format.isbn}
+{ isbn "isbn" bibinfo.check
+ duplicate$ empty$ 'skip$
+ {
+ new.block
+ "ISBN " swap$ *
+ }
+ if$
+}
+
+FUNCTION {format.issn}
+{ issn "issn" bibinfo.check
+ duplicate$ empty$ 'skip$
+ {
+ new.block
+ "ISSN " swap$ *
+ }
+ if$
+}
+
+FUNCTION {format.doi}
+{ doi "doi" bibinfo.check
+ duplicate$ empty$ 'skip$
+ {
+ new.block
+ "\doi{" swap$ * "}" *
+ }
+ if$
+}
+FUNCTION {select.language}
+{ duplicate$ empty$
+ 'pop$
+ { language empty$
+ 'skip$
+ { "{\selectlanguage{" language * "}" * swap$ * "}" * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.note}
+{
+ url empty$
+ 'skip$
+ { "\urlprefix\url{" url * "}" * output }
+ if$
+ note empty$
+ { "" }
+ { note #1 #1 substring$
+ duplicate$ "{" =
+ 'skip$
+ { output.state mid.sentence =
+ { "l" }
+ { "u" }
+ if$
+ change.case$
+ }
+ if$
+ note #2 global.max$ substring$ * "note" bibinfo.check
+ }
+ if$
+}
+
+FUNCTION {format.title}
+{ title
+ duplicate$ empty$ 'skip$
+ { "t" change.case$ }
+ if$
+ "title" bibinfo.check
+ duplicate$ empty$ 'skip$
+ {
+ "\enquote{" swap$ *
+ "}" *
+ select.language
+ }
+ if$
+}
+FUNCTION {format.full.names}
+{'s :=
+ "" 't :=
+ #1 'nameptr :=
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ { s nameptr
+ "{vv~}{ll}" format.name$
+ cite.name.font
+ 't :=
+ nameptr #1 >
+ {
+ nameptr #1
+ #1 + =
+ numnames #3
+ > and
+ { "others" 't :=
+ #1 'namesleft := }
+ 'skip$
+ if$
+ namesleft #1 >
+ { ", " * t * }
+ {
+ s nameptr "{ll}" format.name$ duplicate$ "others" =
+ { 't := }
+ { pop$ }
+ if$
+ t "others" =
+ {
+ " " * bbl.etal emphasize *
+ }
+ {
+ bbl.and
+ space.word * t *
+ }
+ if$
+ }
+ if$
+ }
+ 't
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+}
+
+FUNCTION {author.editor.key.full}
+{ author empty$
+ { editor empty$
+ { key empty$
+ { cite$ #1 #3 substring$ }
+ 'key
+ if$
+ }
+ { editor format.full.names }
+ if$
+ }
+ { author format.full.names }
+ if$
+}
+
+FUNCTION {author.key.full}
+{ author empty$
+ { key empty$
+ { cite$ #1 #3 substring$ }
+ 'key
+ if$
+ }
+ { author format.full.names }
+ if$
+}
+
+FUNCTION {editor.key.full}
+{ editor empty$
+ { key empty$
+ { cite$ #1 #3 substring$ }
+ 'key
+ if$
+ }
+ { editor format.full.names }
+ if$
+}
+
+FUNCTION {make.full.names}
+{ type$ "book" =
+ type$ "inbook" =
+ or
+ 'author.editor.key.full
+ { type$ "proceedings" =
+ 'editor.key.full
+ 'author.key.full
+ if$
+ }
+ if$
+}
+
+FUNCTION {output.bibitem}
+{ newline$
+ "\bibitem[{" write$
+ label write$
+ ")" make.full.names duplicate$ short.list =
+ { pop$ }
+ { * }
+ if$
+ "}]{" * write$
+ cite$ write$
+ "}" write$
+ newline$
+ ""
+ before.all 'output.state :=
+}
+
+FUNCTION {n.dashify}
+{
+ 't :=
+ ""
+ { t empty$ not }
+ { t #1 #1 substring$ "-" =
+ { t #1 #2 substring$ "--" = not
+ { "--" *
+ t #2 global.max$ substring$ 't :=
+ }
+ { { t #1 #1 substring$ "-" = }
+ { "-" *
+ t #2 global.max$ substring$ 't :=
+ }
+ while$
+ }
+ if$
+ }
+ { t #1 #1 substring$ *
+ t #2 global.max$ substring$ 't :=
+ }
+ if$
+ }
+ while$
+}
+
+FUNCTION {word.in}
+{ bbl.in capitalize
+ " " * }
+
+FUNCTION {format.date}
+{ year "year" bibinfo.check duplicate$ empty$
+ {
+ }
+ 'skip$
+ if$
+ month "month" bibinfo.check duplicate$ empty$
+ 'skip$
+ {
+ " " * swap$
+ }
+ if$
+ *
+ extra.label *
+}
+FUNCTION {format.btitle}
+{ title "title" bibinfo.check
+ duplicate$ empty$ 'skip$
+ {
+ emphasize
+ select.language
+ }
+ if$
+}
+FUNCTION {either.or.check}
+{ empty$
+ 'pop$
+ { "can't use both " swap$ * " fields in " * cite$ * warning$ }
+ if$
+}
+FUNCTION {format.bvolume}
+{ volume empty$
+ { "" }
+ { bbl.volume volume tie.or.space.prefix
+ "volume" bibinfo.check * *
+ series "series" bibinfo.check
+ duplicate$ empty$ 'pop$
+ { emphasize ", " * swap$ * }
+ if$
+ "volume and number" number either.or.check
+ }
+ if$
+}
+FUNCTION {format.number.series}
+{ volume empty$
+ { number empty$
+ { series field.or.null }
+ { output.state mid.sentence =
+ { bbl.number }
+ { bbl.number capitalize }
+ if$
+ number tie.or.space.prefix "number" bibinfo.check * *
+ series empty$
+ { "there's a number but no series in " cite$ * warning$ }
+ { bbl.in space.word *
+ series "series" bibinfo.check *
+ }
+ if$
+ }
+ if$
+ }
+ { "" }
+ if$
+}
+FUNCTION {is.num}
+{ chr.to.int$
+ duplicate$ "0" chr.to.int$ < not
+ swap$ "9" chr.to.int$ > not and
+}
+
+FUNCTION {extract.num}
+{ duplicate$ 't :=
+ "" 's :=
+ { t empty$ not }
+ { t #1 #1 substring$
+ t #2 global.max$ substring$ 't :=
+ duplicate$ is.num
+ { s swap$ * 's := }
+ { pop$ "" 't := }
+ if$
+ }
+ while$
+ s empty$
+ 'skip$
+ { pop$ s }
+ if$
+}
+
+FUNCTION {convert.edition}
+{ extract.num "l" change.case$ 's :=
+ s "first" = s "1" = or
+ { bbl.first 't := }
+ { s "second" = s "2" = or
+ { bbl.second 't := }
+ { s "third" = s "3" = or
+ { bbl.third 't := }
+ { s "fourth" = s "4" = or
+ { bbl.fourth 't := }
+ { s "fifth" = s "5" = or
+ { bbl.fifth 't := }
+ { s #1 #1 substring$ is.num
+ { s bbl.th * 't := }
+ { edition 't := }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+ t
+}
+
+FUNCTION {format.edition}
+{ edition duplicate$ empty$ 'skip$
+ {
+ convert.edition
+ output.state mid.sentence =
+ { "l" }
+ { "t" }
+ if$ change.case$
+ "edition" bibinfo.check
+ " " * bbl.edition *
+ }
+ if$
+}
+INTEGERS { multiresult }
+FUNCTION {multi.page.check}
+{ 't :=
+ #0 'multiresult :=
+ { multiresult not
+ t empty$ not
+ and
+ }
+ { t #1 #1 substring$
+ duplicate$ "-" =
+ swap$ duplicate$ "," =
+ swap$ "+" =
+ or or
+ { #1 'multiresult := }
+ { t #2 global.max$ substring$ 't := }
+ if$
+ }
+ while$
+ multiresult
+}
+FUNCTION {format.pages}
+{ pages duplicate$ empty$ 'skip$
+ { duplicate$ multi.page.check
+ {
+ bbl.pages swap$
+ n.dashify
+ }
+ {
+ bbl.page swap$
+ }
+ if$
+ tie.or.space.prefix
+ "pages" bibinfo.check
+ * *
+ }
+ if$
+}
+FUNCTION {format.journal.pages}
+{ pages duplicate$ empty$ 'pop$
+ { swap$ duplicate$ empty$
+ { pop$ pop$ format.pages }
+ {
+ ": " *
+ swap$
+ n.dashify
+ pages multi.page.check
+ 'bbl.pages
+ 'bbl.page
+ if$
+ swap$ tie.or.space.prefix
+ "pages" bibinfo.check
+ * *
+ *
+ }
+ if$
+ }
+ if$
+}
+FUNCTION {format.journal.eid}
+{ eid "eid" bibinfo.check
+ duplicate$ empty$ 'pop$
+ { swap$ duplicate$ empty$ 'skip$
+ {
+ ": " *
+ }
+ if$
+ swap$ *
+ }
+ if$
+}
+FUNCTION {format.vol.num.pages}
+{ volume field.or.null
+ duplicate$ empty$ 'skip$
+ {
+ bbl.volume swap$ tie.or.space.prefix
+ "volume" bibinfo.check
+ * *
+ }
+ if$
+ number "number" bibinfo.check duplicate$ empty$ 'skip$
+ {
+ swap$ duplicate$ empty$
+ { "there's a number but no volume in " cite$ * warning$ }
+ 'skip$
+ if$
+ swap$
+ "(" swap$ * ")" *
+ }
+ if$ *
+ eid empty$
+ { format.journal.pages }
+ { format.journal.eid }
+ if$
+}
+
+FUNCTION {format.chapter.pages}
+{ chapter empty$
+ 'format.pages
+ { type empty$
+ { bbl.chapter }
+ { type "l" change.case$
+ "type" bibinfo.check
+ }
+ if$
+ chapter tie.or.space.prefix
+ "chapter" bibinfo.check
+ * *
+ pages empty$
+ 'skip$
+ { ", " * format.pages * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.booktitle}
+{
+ booktitle "booktitle" bibinfo.check
+ emphasize
+}
+FUNCTION {format.in.ed.booktitle}
+{ format.booktitle duplicate$ empty$ 'skip$
+ {
+ editor "editor" format.names.ed duplicate$ empty$ 'pop$
+ {
+ get.bbl.editor
+ swap$ "," *
+ " " * swap$ *
+ "(" swap$ * ")" *
+ swap$
+ " " * swap$
+ * }
+ if$
+ word.in swap$ *
+ }
+ if$
+}
+FUNCTION {format.thesis.type}
+{ type duplicate$ empty$
+ 'pop$
+ { swap$ pop$
+ "t" change.case$ "type" bibinfo.check
+ }
+ if$
+}
+FUNCTION {format.tr.number}
+{ number "number" bibinfo.check
+ type duplicate$ empty$
+ { pop$ bbl.techrep }
+ 'skip$
+ if$
+ "type" bibinfo.check
+ swap$ duplicate$ empty$
+ { pop$ "t" change.case$ }
+ { tie.or.space.prefix * * }
+ if$
+}
+FUNCTION {format.article.crossref}
+{
+ word.in
+ " \cite{" * crossref * "}" *
+}
+FUNCTION {format.book.crossref}
+{ volume duplicate$ empty$
+ { "empty volume in " cite$ * "'s crossref of " * crossref * warning$
+ pop$ word.in
+ }
+ { bbl.volume
+ capitalize
+ swap$ tie.or.space.prefix "volume" bibinfo.check * * bbl.of space.word *
+ }
+ if$
+ " \cite{" * crossref * "}" *
+}
+FUNCTION {format.incoll.inproc.crossref}
+{
+ word.in
+ " \cite{" * crossref * "}" *
+}
+FUNCTION {format.org.or.pub}
+{ 't :=
+ ""
+ address empty$ t empty$ and
+ 'skip$
+ {
+ t empty$
+ { address "address" bibinfo.check *
+ }
+ { t *
+ address empty$
+ 'skip$
+ { ", " * address "address" bibinfo.check * }
+ if$
+ }
+ if$
+ }
+ if$
+}
+FUNCTION {format.publisher.address}
+{ publisher "publisher" bibinfo.warn format.org.or.pub
+}
+
+FUNCTION {format.organization.address}
+{ organization "organization" bibinfo.check format.org.or.pub
+}
+
+STRINGS {oldname}
+
+FUNCTION {name.or.dash}
+{ 's :=
+ oldname empty$
+ { s 'oldname := s }
+ { s oldname =
+ { "---" }
+ { s 'oldname := s }
+ if$
+ }
+ if$
+}
+
+FUNCTION {article}
+{ output.bibitem
+ format.authors "author" output.check
+ author format.key output
+ name.or.dash
+ new.block
+ format.title "title" output.check
+ new.block
+ crossref missing$
+ {
+ journal
+ "journal" bibinfo.check
+ emphasize
+ "journal" output.check
+ format.vol.num.pages output
+ format.date "year" output.check
+ }
+ { format.article.crossref output.nonnull
+ format.pages output
+ }
+ if$
+ format.issn output
+ format.doi output
+ new.block
+ format.note output
+ format.eprint output
+ fin.entry
+ format.annote
+}
+FUNCTION {book}
+{ output.bibitem
+ author empty$
+ { format.editors "author and editor" output.check
+ editor format.key output
+ add.blank
+ name.or.dash
+ }
+ { format.authors output.nonnull
+ name.or.dash
+ crossref missing$
+ { "author and editor" editor either.or.check }
+ 'skip$
+ if$
+ }
+ if$
+ new.block
+ format.btitle "title" output.check
+ crossref missing$
+ { format.bvolume output
+ new.block
+ format.number.series output
+ new.sentence
+ format.publisher.address output
+ }
+ {
+ new.block
+ format.book.crossref output.nonnull
+ }
+ if$
+ format.edition output
+ format.date "year" output.check
+ format.isbn output
+ format.doi output
+ new.block
+ format.note output
+ format.eprint output
+ fin.entry
+ format.annote
+}
+FUNCTION {booklet}
+{ output.bibitem
+ format.authors output
+ author format.key output
+ name.or.dash
+ new.block
+ format.title "title" output.check
+ new.block
+ howpublished "howpublished" bibinfo.check output
+ address "address" bibinfo.check output
+ format.date "year" output.check
+ format.isbn output
+ format.doi output
+ new.block
+ format.note output
+ format.eprint output
+ fin.entry
+ format.annote
+}
+
+FUNCTION {inbook}
+{ output.bibitem
+ author empty$
+ { format.editors "author and editor" output.check
+ editor format.key output
+ name.or.dash
+ }
+ { format.authors output.nonnull
+ name.or.dash
+ crossref missing$
+ { "author and editor" editor either.or.check }
+ 'skip$
+ if$
+ }
+ if$
+ new.block
+ format.btitle "title" output.check
+ crossref missing$
+ {
+ format.bvolume output
+ format.chapter.pages "chapter and pages" output.check
+ new.block
+ format.number.series output
+ new.sentence
+ format.publisher.address output
+ }
+ {
+ format.chapter.pages "chapter and pages" output.check
+ new.block
+ format.book.crossref output.nonnull
+ }
+ if$
+ format.edition output
+ format.date "year" output.check
+ crossref missing$
+ { format.isbn output }
+ 'skip$
+ if$
+ format.doi output
+ new.block
+ format.note output
+ format.eprint output
+ fin.entry
+ format.annote
+}
+
+FUNCTION {incollection}
+{ output.bibitem
+ format.authors "author" output.check
+ author format.key output
+ name.or.dash
+ new.block
+ format.title "title" output.check
+ new.block
+ crossref missing$
+ { format.in.ed.booktitle "booktitle" output.check
+ format.bvolume output
+ format.number.series output
+ format.chapter.pages output
+ new.sentence
+ format.publisher.address output
+ format.edition output
+ format.date "year" output.check
+ format.isbn output
+ }
+ { format.incoll.inproc.crossref output.nonnull
+ format.chapter.pages output
+ }
+ if$
+ format.doi output
+ new.block
+ format.note output
+ format.eprint output
+ fin.entry
+ format.annote
+}
+FUNCTION {inproceedings}
+{ output.bibitem
+ format.authors "author" output.check
+ author format.key output
+ name.or.dash
+ new.block
+ format.title "title" output.check
+ new.block
+ crossref missing$
+ { format.in.ed.booktitle "booktitle" output.check
+ format.bvolume output
+ format.number.series output
+ format.pages output
+ new.sentence
+ publisher empty$
+ { format.organization.address output }
+ { organization "organization" bibinfo.check output
+ format.publisher.address output
+ }
+ if$
+ format.date "year" output.check
+ format.isbn output
+ format.issn output
+ }
+ { format.incoll.inproc.crossref output.nonnull
+ format.pages output
+ }
+ if$
+ format.doi output
+ new.block
+ format.note output
+ format.eprint output
+ fin.entry
+ format.annote
+}
+FUNCTION {conference} { inproceedings }
+FUNCTION {manual}
+{ output.bibitem
+ format.authors output
+ author format.key output
+ name.or.dash
+ new.block
+ format.btitle "title" output.check
+ organization address new.block.checkb
+ organization "organization" bibinfo.check output
+ address "address" bibinfo.check output
+ format.edition output
+ format.date "year" output.check
+ format.doi output
+ new.block
+ format.note output
+ format.eprint output
+ fin.entry
+ format.annote
+}
+
+FUNCTION {mastersthesis}
+{ output.bibitem
+ format.authors "author" output.check
+ author format.key output
+ name.or.dash
+ new.block
+ format.title
+ "title" output.check
+ new.block
+ bbl.mthesis format.thesis.type output.nonnull
+ school "school" bibinfo.warn output
+ address "address" bibinfo.check output
+ format.date "year" output.check
+ format.doi output
+ new.block
+ format.note output
+ format.eprint output
+ fin.entry
+ format.annote
+}
+
+FUNCTION {misc}
+{ output.bibitem
+ format.authors output
+ author format.key output
+ name.or.dash
+ new.block
+ format.title output
+ new.block
+ howpublished "howpublished" bibinfo.check output
+ format.date "year" output.check
+ format.doi output
+ new.block
+ format.note output
+ format.eprint output
+ fin.entry
+ format.annote
+}
+FUNCTION {phdthesis}
+{ output.bibitem
+ format.authors "author" output.check
+ author format.key output
+ name.or.dash
+ new.block
+ format.btitle
+ "title" output.check
+ new.block
+ bbl.phdthesis format.thesis.type output.nonnull
+ school "school" bibinfo.warn output
+ address "address" bibinfo.check output
+ format.date "year" output.check
+ format.doi output
+ new.block
+ format.note output
+ format.eprint output
+ fin.entry
+ format.annote
+}
+
+FUNCTION {proceedings}
+{ output.bibitem
+ format.editors output
+ editor format.key output
+ name.or.dash
+ new.block
+ format.btitle "title" output.check
+ format.bvolume output
+ format.number.series output
+ new.sentence
+ publisher empty$
+ { format.organization.address output }
+ { organization "organization" bibinfo.check output
+ format.publisher.address output
+ }
+ if$
+ format.date "year" output.check
+ format.isbn output
+ format.issn output
+ format.doi output
+ new.block
+ format.note output
+ format.eprint output
+ fin.entry
+ format.annote
+}
+
+FUNCTION {techreport}
+{ output.bibitem
+ format.authors "author" output.check
+ author format.key output
+ name.or.dash
+ new.block
+ format.title
+ "title" output.check
+ new.block
+ format.tr.number output.nonnull
+ institution "institution" bibinfo.warn output
+ address "address" bibinfo.check output
+ format.date "year" output.check
+ format.doi output
+ new.block
+ format.note output
+ format.eprint output
+ fin.entry
+ format.annote
+}
+
+FUNCTION {unpublished}
+{ output.bibitem
+ format.authors "author" output.check
+ author format.key output
+ name.or.dash
+ new.block
+ format.title "title" output.check
+ format.date "year" output.check
+ format.doi output
+ new.block
+ format.note "note" output.check
+ format.eprint output
+ fin.entry
+ format.annote
+}
+
+FUNCTION {default.type} { misc }
+READ
+FUNCTION {sortify}
+{ purify$
+ "l" change.case$
+}
+INTEGERS { len }
+FUNCTION {chop.word}
+{ 's :=
+ 'len :=
+ s #1 len substring$ =
+ { s len #1 + global.max$ substring$ }
+ 's
+ if$
+}
+FUNCTION {format.lab.names}
+{ 's :=
+ "" 't :=
+ s #1 "{vv~}{ll}" format.name$
+ cite.name.font
+ s num.names$ duplicate$
+ #2 >
+ { pop$
+ " " * bbl.etal emphasize *
+ }
+ { #2 <
+ 'skip$
+ { s #2 "{ff }{vv }{ll}{ jj}" format.name$ "others" =
+ {
+ " " * bbl.etal emphasize *
+ }
+ { bbl.and space.word * s #2 "{vv~}{ll}" format.name$
+ cite.name.font
+ * }
+ if$
+ }
+ if$
+ }
+ if$
+}
+
+FUNCTION {author.key.label}
+{ author empty$
+ { key empty$
+ { cite$ #1 #3 substring$ }
+ 'key
+ if$
+ }
+ { author format.lab.names }
+ if$
+}
+
+FUNCTION {author.editor.key.label}
+{ author empty$
+ { editor empty$
+ { key empty$
+ { cite$ #1 #3 substring$ }
+ 'key
+ if$
+ }
+ { editor format.lab.names }
+ if$
+ }
+ { author format.lab.names }
+ if$
+}
+
+FUNCTION {editor.key.label}
+{ editor empty$
+ { key empty$
+ { cite$ #1 #3 substring$ }
+ 'key
+ if$
+ }
+ { editor format.lab.names }
+ if$
+}
+
+FUNCTION {calc.short.authors}
+{ type$ "book" =
+ type$ "inbook" =
+ or
+ 'author.editor.key.label
+ { type$ "proceedings" =
+ 'editor.key.label
+ 'author.key.label
+ if$
+ }
+ if$
+ 'short.list :=
+}
+
+FUNCTION {calc.label}
+{ calc.short.authors
+ short.list
+ "("
+ *
+ year duplicate$ empty$
+ short.list key field.or.null = or
+ { pop$ "" }
+ 'skip$
+ if$
+ *
+ 'label :=
+}
+
+FUNCTION {sort.format.names}
+{ 's :=
+ #1 'nameptr :=
+ ""
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ { s nameptr
+ "{ll{ }}{ ff{ }}{ jj{ }}"
+ format.name$ 't :=
+ nameptr #1 >
+ {
+ nameptr #1
+ #1 + =
+ numnames #3
+ > and
+ { "others" 't :=
+ #1 'namesleft := }
+ 'skip$
+ if$
+ " " *
+ namesleft #1 = t "others" = and
+ { "zzzzz" * }
+ { t sortify * }
+ if$
+ }
+ { t sortify * }
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+}
+
+FUNCTION {sort.format.title}
+{ 't :=
+ "A " #2
+ "An " #3
+ "The " #4 t chop.word
+ chop.word
+ chop.word
+ sortify
+ #1 global.max$ substring$
+}
+FUNCTION {author.sort}
+{ author empty$
+ { key empty$
+ { "to sort, need author or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { author sort.format.names }
+ if$
+}
+FUNCTION {author.editor.sort}
+{ author empty$
+ { editor empty$
+ { key empty$
+ { "to sort, need author, editor, or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { editor sort.format.names }
+ if$
+ }
+ { author sort.format.names }
+ if$
+}
+FUNCTION {editor.sort}
+{ editor empty$
+ { key empty$
+ { "to sort, need editor or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { editor sort.format.names }
+ if$
+}
+FUNCTION {presort}
+{ calc.label
+ label sortify
+ " "
+ *
+ type$ "book" =
+ type$ "inbook" =
+ or
+ 'author.editor.sort
+ { type$ "proceedings" =
+ 'editor.sort
+ 'author.sort
+ if$
+ }
+ if$
+ #1 entry.max$ substring$
+ 'sort.label :=
+ sort.label
+ *
+ " "
+ *
+ title field.or.null
+ sort.format.title
+ *
+ #1 entry.max$ substring$
+ 'sort.key$ :=
+}
+
+ITERATE {presort}
+SORT
+STRINGS { last.label next.extra }
+INTEGERS { last.extra.num number.label }
+FUNCTION {initialize.extra.label.stuff}
+{ #0 int.to.chr$ 'last.label :=
+ "" 'next.extra :=
+ #0 'last.extra.num :=
+ #0 'number.label :=
+}
+FUNCTION {forward.pass}
+{ last.label label =
+ { last.extra.num #1 + 'last.extra.num :=
+ last.extra.num int.to.chr$ 'extra.label :=
+ }
+ { "a" chr.to.int$ 'last.extra.num :=
+ "" 'extra.label :=
+ label 'last.label :=
+ }
+ if$
+ number.label #1 + 'number.label :=
+}
+FUNCTION {reverse.pass}
+{ next.extra "b" =
+ { "a" 'extra.label := }
+ 'skip$
+ if$
+ extra.label 'next.extra :=
+ extra.label
+ emphasize
+ duplicate$ empty$
+ 'skip$
+ { "{\natexlab{" swap$ * "}}" * }
+ if$
+ 'extra.label :=
+ label extra.label * 'label :=
+}
+EXECUTE {initialize.extra.label.stuff}
+ITERATE {forward.pass}
+REVERSE {reverse.pass}
+FUNCTION {bib.sort.order}
+{ sort.label
+ " "
+ *
+ year field.or.null sortify
+ *
+ " "
+ *
+ title field.or.null
+ sort.format.title
+ *
+ #1 entry.max$ substring$
+ 'sort.key$ :=
+}
+ITERATE {bib.sort.order}
+SORT
+FUNCTION {begin.bib}
+{ preamble$ empty$
+ 'skip$
+ { preamble$ write$ newline$ }
+ if$
+ "\begin{thebibliography}{" number.label int.to.str$ * "}" *
+ write$ newline$
+ "\ProvideTextCommand{\guillemotleft}{OT1}{%"
+ write$ newline$
+ " \leavevmode\raise .27ex\hbox{$\scriptscriptstyle\ll$}}"
+ write$ newline$
+ "\ProvideTextCommand{\guillemotright}{OT1}{%"
+ write$ newline$
+ " \leavevmode\raise .27ex\hbox{$\scriptscriptstyle\gg$}}"
+ write$ newline$
+ "\newcommand{\enquote}[1]{\guillemotleft#1\guillemotright}"
+ write$ newline$
+ "\providecommand{\natexlab}[1]{#1}"
+ write$ newline$
+ "\providecommand{\url}[1]{\texttt{#1}}"
+ write$ newline$
+ "\providecommand{\urlprefix}{URL }"
+ write$ newline$
+ "\expandafter\ifx\csname urlstyle\endcsname\relax"
+ write$ newline$
+ " \providecommand{\doi}[1]{doi:\discretionary{}{}{}#1}\else"
+ write$ newline$
+ " \providecommand{\doi}{doi:\discretionary{}{}{}\begingroup \urlstyle{rm}\Url}\fi"
+ write$ newline$
+ "\providecommand{\selectlanguage}[1]{\relax}"
+ write$ newline$
+ "\providecommand{\eprint}[2][]{\url{#2}}"
+ write$ newline$
+ "\providecommand{\BIBannoteformat}{\small\itshape}"
+ write$ newline$
+}
+EXECUTE {begin.bib}
+EXECUTE {init.state.consts}
+ITERATE {call.type$}
+FUNCTION {end.bib}
+{ newline$
+ "\end{thebibliography}" write$ newline$
+}
+EXECUTE {end.bib}
+%% End of customized bst file
+%%
+%% End of file `caauda3.bst'. \ No newline at end of file
diff --git a/biblio/bibtex/contrib/catalan/bibtex/bst/caplain.bst b/biblio/bibtex/contrib/catalan/bibtex/bst/caplain.bst
new file mode 100644
index 0000000000..b5e04ea7fd
--- /dev/null
+++ b/biblio/bibtex/contrib/catalan/bibtex/bst/caplain.bst
@@ -0,0 +1,1381 @@
+%%
+%% This is file `caplain.bst',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% merlin.mbs (with options: `head,exlang,catalan,nom,and-xcom,{}')
+%% catalan.mbs (with options: `exlang,catalan,nom,and-xcom,{}')
+%% merlin.mbs (with options: `tail,exlang,catalan,nom,and-xcom,{}')
+%% ----------------------------------------
+%% *** ca(talan)plain BibTeX style, by Robert Fuster 18/05/1998 ***
+%% *** modified 18/11/2004 ***
+%% Changes: 18/11/04: added date as optional field in unpublished
+%% (as in standard plain style)
+%% 18/11/04: now the title field in mastersthesis is not emphasized
+%% (as in standard plain style)
+%%
+ %-------------------------------------------------------------------
+ % The original source file contains the following version information:
+ % \ProvidesFile{merlin.mbs}[1996/12/16 3.82 (PWD)]
+ %
+ % NOTICE:
+ % This file may be used for non-profit purposes.
+ % It may not be distributed in exchange for money,
+ % other than distribution costs.
+ %
+ % The author provides it `as is' and does not guarantee it in any way.
+ %
+ % Copyright (C) 1994, 1995, 1996 Patrick W. Daly
+ %-------------------------------------------------------------------
+ % For use with BibTeX version 0.99a or later
+ %-------------------------------------------------------------------
+ % This bibliography style file is intended for texts in
+ % CATALAN
+ % This is a numerical citation style, and as such is standard LaTeX.
+ % It requires no extra package to interface to the main text.
+ % The form of the \bibitem entries is
+ % \bibitem{key}...
+ % Usage of \cite is as follows:
+ % \cite{key} ==>> [#]
+ % \cite[chap. 2]{key} ==>> [#, chap. 2]
+ % where # is a number determined by the ordering in the reference list.
+ % The order in the reference list is alphabetical by authors.
+ %---------------------------------------------------------------------
+
+ENTRY
+ { address
+ author
+ booktitle
+ chapter
+ edition
+ editor
+ howpublished
+ institution
+ journal
+ key
+ month
+ note
+ number
+ organization
+ pages
+ publisher
+ school
+ series
+ title
+ type
+ volume
+ year
+ }
+ {}
+ { label }
+
+INTEGERS { output.state before.all mid.sentence after.sentence after.block }
+
+FUNCTION {init.state.consts}
+{ #0 'before.all :=
+ #1 'mid.sentence :=
+ #2 'after.sentence :=
+ #3 'after.block :=
+}
+
+STRINGS { s t }
+
+FUNCTION {output.nonnull}
+{ 's :=
+ output.state mid.sentence =
+ { ", " * write$ }
+ { output.state after.block =
+ { add.period$ write$
+ newline$
+ "\newblock " write$
+ }
+ { output.state before.all =
+ 'write$
+ { add.period$ " " * write$ }
+ if$
+ }
+ if$
+ mid.sentence 'output.state :=
+ }
+ if$
+ s
+}
+
+FUNCTION {output}
+{ duplicate$ empty$
+ 'pop$
+ 'output.nonnull
+ if$
+}
+
+FUNCTION {output.check}
+{ 't :=
+ duplicate$ empty$
+ { pop$ "empty " t * " in " * cite$ * warning$ }
+ 'output.nonnull
+ if$
+}
+
+FUNCTION {fin.entry}
+{ add.period$
+ write$
+ newline$
+}
+
+FUNCTION {new.block}
+{ output.state before.all =
+ 'skip$
+ { after.block 'output.state := }
+ if$
+}
+
+FUNCTION {new.sentence}
+{ output.state after.block =
+ 'skip$
+ { output.state before.all =
+ 'skip$
+ { after.sentence 'output.state := }
+ if$
+ }
+ if$
+}
+
+FUNCTION {add.blank}
+{ " " * before.all 'output.state :=
+}
+
+FUNCTION {date.block}
+{
+ new.block
+}
+
+FUNCTION {not}
+{ { #0 }
+ { #1 }
+ if$
+}
+
+FUNCTION {and}
+{ 'skip$
+ { pop$ #0 }
+ if$
+}
+
+FUNCTION {or}
+{ { pop$ #1 }
+ 'skip$
+ if$
+}
+
+FUNCTION {non.stop}
+{ duplicate$
+ "}" * add.period$
+ #-1 #1 substring$ "." =
+}
+
+FUNCTION {new.block.checka}
+{ empty$
+ 'skip$
+ 'new.block
+ if$
+}
+
+FUNCTION {new.block.checkb}
+{ empty$
+ swap$ empty$
+ and
+ 'skip$
+ 'new.block
+ if$
+}
+
+FUNCTION {new.sentence.checka}
+{ empty$
+ 'skip$
+ 'new.sentence
+ if$
+}
+
+FUNCTION {new.sentence.checkb}
+{ empty$
+ swap$ empty$
+ and
+ 'skip$
+ 'new.sentence
+ if$
+}
+
+FUNCTION {field.or.null}
+{ duplicate$ empty$
+ { pop$ "" }
+ 'skip$
+ if$
+}
+
+FUNCTION {emphasize}
+{ duplicate$ empty$
+ { pop$ "" }
+ { "{\em " swap$ * "\/}" * }
+ if$
+}
+
+FUNCTION {capitalize}
+{ "u" change.case$ "t" change.case$ }
+
+FUNCTION {space.word}
+{ " " swap$ * " " * }
+
+ % Here are the language-specific definitions for explicit words.
+ % Each function has a name bbl.xxx where xxx is the English word.
+ %-------------------------------------------------------------------
+ % The original source file contains the following version information:
+ % \ProvidesFile{catalan.mbs}[1998/05/17 2.0 (PWD/RF)]
+ % Copyright (C) 1994, 1995 Patrick W. Daly
+ % Copyright (C) 1997, 1998 Robert Fuster
+
+ %-------------------------------------------------------------------
+
+ % The language selected here is CATALAN
+FUNCTION {bbl.and}
+{ "i"}
+
+FUNCTION {bbl.editors}
+{ "editors" }
+
+FUNCTION {bbl.editor}
+{ "editor" }
+
+FUNCTION {bbl.edby}
+{ "editat per" }
+
+FUNCTION {bbl.edition}
+{ "edici\'o" }
+
+FUNCTION {bbl.volume}
+{ "volum" }
+
+FUNCTION {bbl.of}
+{ "de" }
+
+FUNCTION {bbl.number}
+{ "n\'umero" }
+
+FUNCTION {bbl.nr}
+{ "n." }
+
+FUNCTION {bbl.in}
+{ "dins" }
+
+FUNCTION {bbl.pages}
+{ "p\`agines" }
+
+FUNCTION {bbl.page}
+{ "p\`agina" }
+
+FUNCTION {bbl.chapter}
+{ "cap\'{\i}tol" }
+
+FUNCTION {bbl.techrep}
+{ "Report t{\`e}cnic" }
+
+FUNCTION {bbl.mthesis}
+{ "Projecte F. de Carrera o Tesina de L." }
+
+FUNCTION {bbl.phdthesis}
+{ "Tesi Doctoral" }
+
+FUNCTION {bbl.first}
+{ "primera" }
+
+FUNCTION {bbl.second}
+{ "segona" }
+
+FUNCTION {bbl.third}
+{ "tercera" }
+
+FUNCTION {bbl.fourth}
+{ "quarta" }
+
+FUNCTION {bbl.fifth}
+{ "cinquena" }
+
+FUNCTION {bbl.th}
+{ "a" }
+
+MACRO {jan} {"gener"}
+
+MACRO {feb} {"febrer"}
+
+MACRO {mar} {"mar\c{c}"}
+
+MACRO {apr} {"abril"}
+
+MACRO {may} {"maig"}
+
+MACRO {jun} {"juny"}
+
+MACRO {jul} {"juliol"}
+
+MACRO {aug} {"agost"}
+
+MACRO {sep} {"setembre"}
+
+MACRO {oct} {"octubre"}
+
+MACRO {nov} {"novembre"}
+
+MACRO {dec} {"desembre"}
+
+ % End of language definition file
+
+MACRO {acmcs} {"ACM Computing Surveys"}
+
+MACRO {acta} {"Acta Informatica"}
+
+MACRO {cacm} {"Communications of the ACM"}
+
+MACRO {ibmjrd} {"IBM Journal of Research and Development"}
+
+MACRO {ibmsj} {"IBM Systems Journal"}
+
+MACRO {ieeese} {"IEEE Transactions on Software Engineering"}
+
+MACRO {ieeetc} {"IEEE Transactions on Computers"}
+
+MACRO {ieeetcad}
+ {"IEEE Transactions on Computer-Aided Design of Integrated Circuits"}
+
+MACRO {ipl} {"Information Processing Letters"}
+
+MACRO {jacm} {"Journal of the ACM"}
+
+MACRO {jcss} {"Journal of Computer and System Sciences"}
+
+MACRO {scp} {"Science of Computer Programming"}
+
+MACRO {sicomp} {"SIAM Journal on Computing"}
+
+MACRO {tocs} {"ACM Transactions on Computer Systems"}
+
+MACRO {tods} {"ACM Transactions on Database Systems"}
+
+MACRO {tog} {"ACM Transactions on Graphics"}
+
+MACRO {toms} {"ACM Transactions on Mathematical Software"}
+
+MACRO {toois} {"ACM Transactions on Office Information Systems"}
+
+MACRO {toplas} {"ACM Transactions on Programming Languages and Systems"}
+
+MACRO {tcs} {"Theoretical Computer Science"}
+
+INTEGERS { nameptr namesleft numnames }
+
+FUNCTION {format.names}
+{ 's :=
+ #1 'nameptr :=
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ { s nameptr
+ "{ff~}{vv~}{ll}{, jj}" format.name$ 't :=
+ nameptr #1 >
+ {
+ namesleft #1 >
+ { ", " * t * }
+ {
+ t "others" =
+ { " et~al." * }
+ { bbl.and space.word * t * }
+ if$
+ }
+ if$
+ }
+ 't
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+}
+
+FUNCTION {format.names.ed}
+{ 's :=
+ #1 'nameptr :=
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ { s nameptr
+ "{ff~}{vv~}{ll}{, jj}"
+ format.name$ 't :=
+ nameptr #1 >
+ {
+ namesleft #1 >
+ { ", " * t * }
+ {
+ t "others" =
+ { " et~al." * }
+ { bbl.and space.word * t * }
+ if$
+ }
+ if$
+ }
+ 't
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+}
+
+FUNCTION {format.authors}
+{ author empty$
+ { "" }
+ {
+ author format.names
+ }
+ if$
+}
+
+FUNCTION {format.editors}
+{ editor empty$
+ { "" }
+ {
+ editor format.names
+ editor num.names$ #1 >
+ { ", " * bbl.editors * }
+ { ", " * bbl.editor * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.in.editors}
+{ editor empty$
+ { "" }
+ { editor format.names.ed
+ editor num.names$ #1 >
+ { ", " * bbl.editors * }
+ { ", " * bbl.editor * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.title}
+{ title empty$
+ { "" }
+ { title "t" change.case$
+ }
+ if$
+}
+
+FUNCTION {output.bibitem}
+{ newline$
+ "\bibitem{" write$
+ cite$ write$
+ "}" write$
+ newline$
+ ""
+ before.all 'output.state :=
+}
+
+FUNCTION {n.dashify}
+{ 't :=
+ ""
+ { t empty$ not }
+ { t #1 #1 substring$ "-" =
+ { t #1 #2 substring$ "--" = not
+ { "--" *
+ t #2 global.max$ substring$ 't :=
+ }
+ { { t #1 #1 substring$ "-" = }
+ { "-" *
+ t #2 global.max$ substring$ 't :=
+ }
+ while$
+ }
+ if$
+ }
+ { t #1 #1 substring$ *
+ t #2 global.max$ substring$ 't :=
+ }
+ if$
+ }
+ while$
+}
+
+FUNCTION {word.in}
+{ bbl.in capitalize
+ " " * }
+
+FUNCTION {format.date}
+{ year empty$
+ { month empty$
+ { "" }
+ { "there's a month but no year in " cite$ * warning$
+ month
+ }
+ if$
+ }
+ { month empty$
+ 'year
+ { month " " * year * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.btitle}
+{ title emphasize
+}
+
+FUNCTION {tie.or.space.connect}
+{ duplicate$ text.length$ #3 <
+ { "~" }
+ { " " }
+ if$
+ swap$ * *
+}
+
+FUNCTION {either.or.check}
+{ empty$
+ 'pop$
+ { "can't use both " swap$ * " fields in " * cite$ * warning$ }
+ if$
+}
+
+FUNCTION {format.bvolume}
+{ volume empty$
+ { "" }
+ { bbl.volume volume tie.or.space.connect
+ series empty$
+ 'skip$
+ { bbl.of space.word * series emphasize * }
+ if$
+ "volume and number" number either.or.check
+ }
+ if$
+}
+
+FUNCTION {format.number.series}
+{ volume empty$
+ { number empty$
+ { series field.or.null }
+ { output.state mid.sentence =
+ { bbl.number }
+ { bbl.number capitalize }
+ if$
+ number tie.or.space.connect
+ series empty$
+ { "there's a number but no series in " cite$ * warning$ }
+ { bbl.in space.word * series * }
+ if$
+ }
+ if$
+ }
+ { "" }
+ if$
+}
+
+FUNCTION {is.num}
+{ chr.to.int$
+ duplicate$ "0" chr.to.int$ < not
+ swap$ "9" chr.to.int$ > not and
+}
+
+FUNCTION {extract.num}
+{ duplicate$ 't :=
+ "" 's :=
+ { t empty$ not }
+ { t #1 #1 substring$
+ t #2 global.max$ substring$ 't :=
+ duplicate$ is.num
+ { s swap$ * 's := }
+ { pop$ "" 't := }
+ if$
+ }
+ while$
+ s empty$
+ 'skip$
+ { pop$ s }
+ if$
+}
+
+FUNCTION {convert.edition}
+{ edition extract.num "l" change.case$ 's :=
+ s "first" = s "1" = or
+ { bbl.first 't := }
+ { s "second" = s "2" = or
+ { bbl.second 't := }
+ { s "third" = s "3" = or
+ { bbl.third 't := }
+ { s "fourth" = s "4" = or
+ { bbl.fourth 't := }
+ { s "fifth" = s "5" = or
+ { bbl.fifth 't := }
+ { s #1 #1 substring$ is.num
+ { s bbl.th * 't := }
+ { edition 't := }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+ t
+}
+
+FUNCTION {format.edition}
+{ edition empty$
+ { "" }
+ { output.state mid.sentence =
+ { convert.edition "l" change.case$ " " * bbl.edition * }
+ { convert.edition "t" change.case$ " " * bbl.edition * }
+ if$
+ }
+ if$
+}
+
+INTEGERS { multiresult }
+
+FUNCTION {multi.page.check}
+{ 't :=
+ #0 'multiresult :=
+ { multiresult not
+ t empty$ not
+ and
+ }
+ { t #1 #1 substring$
+ duplicate$ "-" =
+ swap$ duplicate$ "," =
+ swap$ "+" =
+ or or
+ { #1 'multiresult := }
+ { t #2 global.max$ substring$ 't := }
+ if$
+ }
+ while$
+ multiresult
+}
+
+FUNCTION {format.pages}
+{ pages empty$
+ { "" }
+ { pages multi.page.check
+ { bbl.pages pages n.dashify tie.or.space.connect }
+ { bbl.page pages tie.or.space.connect }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.journal.pages}
+{
+ pages empty$
+ 'skip$
+ { duplicate$ empty$
+ { pop$ format.pages }
+ { ":" * pages n.dashify * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.vol.num.pages}
+{ volume field.or.null
+ number empty$
+ 'skip$
+ {
+ "(" number * ")" * *
+ volume empty$
+ { "there's a number but no volume in " cite$ * warning$ }
+ 'skip$
+ if$
+ }
+ if$
+ format.journal.pages
+}
+
+FUNCTION {format.chapter.pages}
+{ chapter empty$
+ 'format.pages
+ { type empty$
+ { bbl.chapter }
+ { type "l" change.case$ }
+ if$
+ chapter tie.or.space.connect
+ pages empty$
+ 'skip$
+ { ", " * format.pages * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.in.ed.booktitle}
+{ booktitle empty$
+ { "" }
+ { editor empty$
+ { word.in booktitle emphasize * }
+ { word.in format.in.editors * ", " *
+ booktitle emphasize * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {empty.misc.check}
+{ author empty$ title empty$ howpublished empty$
+ month empty$ year empty$ note empty$
+ and and and and and
+ key empty$ not and
+ { "all relevant fields are empty in " cite$ * warning$ }
+ 'skip$
+ if$
+}
+
+FUNCTION {format.thesis.type}
+{ type empty$
+ 'skip$
+ { pop$
+ type "t" change.case$
+ }
+ if$
+}
+
+FUNCTION {format.tr.number}
+{ type empty$
+ { bbl.techrep }
+ 'type
+ if$
+ number empty$
+ { "t" change.case$ }
+ { number tie.or.space.connect }
+ if$
+}
+
+FUNCTION {format.article.crossref}
+{
+ key empty$
+ { journal empty$
+ { "need key or journal for " cite$ * " to crossref " * crossref *
+ warning$
+ ""
+ }
+ { word.in journal emphasize * }
+ if$
+ }
+ { word.in key * " " *}
+ if$
+ " \cite{" * crossref * "}" *
+}
+
+FUNCTION {format.crossref.editor}
+{ editor #1 "{vv~}{ll}" format.name$
+ editor num.names$ duplicate$
+ #2 >
+ { pop$ " et~al." * }
+ { #2 <
+ 'skip$
+ { editor #2 "{ff }{vv }{ll}{ jj}" format.name$ "others" =
+ { " et~al." * }
+ { bbl.and space.word * editor #2 "{vv~}{ll}" format.name$ * }
+ if$
+ }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.book.crossref}
+{ volume empty$
+ { "empty volume in " cite$ * "'s crossref of " * crossref * warning$
+ word.in
+ }
+ { bbl.volume capitalize
+ volume tie.or.space.connect
+ bbl.of space.word *
+ }
+ if$
+ editor empty$
+ editor field.or.null author field.or.null =
+ or
+ { key empty$
+ { series empty$
+ { "need editor, key, or series for " cite$ * " to crossref " *
+ crossref * warning$
+ "" *
+ }
+ { series emphasize * }
+ if$
+ }
+ { key * }
+ if$
+ }
+ { format.crossref.editor * }
+ if$
+ " \cite{" * crossref * "}" *
+}
+
+FUNCTION {format.incoll.inproc.crossref}
+{
+ editor empty$
+ editor field.or.null author field.or.null =
+ or
+ { key empty$
+ { booktitle empty$
+ { "need editor, key, or booktitle for " cite$ * " to crossref " *
+ crossref * warning$
+ ""
+ }
+ { word.in booktitle emphasize * }
+ if$
+ }
+ { word.in key * " " *}
+ if$
+ }
+ { word.in format.crossref.editor * " " *}
+ if$
+ " \cite{" * crossref * "}" *
+}
+
+FUNCTION {format.publisher}
+{ publisher empty$
+ { "empty publisher in " cite$ * warning$ }
+ 'skip$
+ if$
+ ""
+ address empty$ publisher empty$ and
+ 'skip$
+ {
+ publisher empty$
+ { address empty$
+ 'skip$
+ { address * }
+ if$
+ }
+ { publisher *
+ address empty$
+ 'skip$
+ { ", " * address * }
+ if$
+ }
+ if$
+ }
+ if$
+ output
+}
+
+FUNCTION {article}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.title "title" output.check
+ new.block
+ crossref missing$
+ { journal
+ emphasize
+ "journal" output.check
+ format.vol.num.pages output
+ format.date "year" output.check
+ }
+ { format.article.crossref output.nonnull
+ format.pages output
+ }
+ if$
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {book}
+{ output.bibitem
+ author empty$
+ { format.editors "author and editor" output.check
+ }
+ { format.authors output.nonnull
+ crossref missing$
+ { "author and editor" editor either.or.check }
+ 'skip$
+ if$
+ }
+ if$
+ new.block
+ format.btitle "title" output.check
+ crossref missing$
+ { format.bvolume output
+ new.block
+ format.number.series output
+ new.sentence
+ format.publisher
+ }
+ {
+ new.block
+ format.book.crossref output.nonnull
+ }
+ if$
+ format.edition output
+ format.date "year" output.check
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {booklet}
+{ output.bibitem
+ format.authors output
+ new.block
+ format.title "title" output.check
+ new.block
+ howpublished output
+ address output
+ format.date output
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {inbook}
+{ output.bibitem
+ author empty$
+ { format.editors "author and editor" output.check
+ }
+ { format.authors output.nonnull
+ crossref missing$
+ { "author and editor" editor either.or.check }
+ 'skip$
+ if$
+ }
+ if$
+ new.block
+ format.btitle "title" output.check
+ crossref missing$
+ {
+ format.bvolume output
+ format.chapter.pages "chapter and pages" output.check
+ new.block
+ format.number.series output
+ new.sentence
+ format.publisher
+ }
+ {
+ format.chapter.pages "chapter and pages" output.check
+ new.block
+ format.book.crossref output.nonnull
+ }
+ if$
+ format.edition output
+ format.date "year" output.check
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {incollection}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.title "title" output.check
+ new.block
+ crossref missing$
+ { format.in.ed.booktitle "booktitle" output.check
+ format.bvolume output
+ format.number.series output
+ format.chapter.pages output
+ new.sentence
+ format.publisher
+ format.edition output
+ format.date "year" output.check
+ }
+ { format.incoll.inproc.crossref output.nonnull
+ format.chapter.pages output
+ }
+ if$
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {inproceedings}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.title "title" output.check
+ new.block
+ crossref missing$
+ { format.in.ed.booktitle "booktitle" output.check
+ format.bvolume output
+ format.number.series output
+ format.pages output
+ new.sentence
+ publisher empty$
+ { organization output
+ address output
+ }
+ { organization output
+ format.publisher
+ }
+ if$
+ format.date "year" output.check
+ }
+ { format.incoll.inproc.crossref output.nonnull
+ format.pages output
+ }
+ if$
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {conference} { inproceedings }
+
+FUNCTION {manual}
+{ output.bibitem
+ author empty$
+ { organization empty$
+ 'skip$
+ { organization output.nonnull
+ address output
+ }
+ if$
+ }
+ { format.authors output.nonnull }
+ if$
+ new.block
+ format.btitle "title" output.check
+ author empty$
+ { organization empty$
+ {
+ address new.block.checka
+ address output
+ }
+ 'skip$
+ if$
+ }
+ {
+ organization address new.block.checkb
+ organization output
+ address output
+ }
+ if$
+ format.edition output
+ format.date output
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {mastersthesis}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.title "title" output.check
+ new.block
+ bbl.mthesis format.thesis.type output.nonnull
+ school "school" output.check
+ address output
+ format.date "year" output.check
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {misc}
+{ output.bibitem
+ format.authors output
+ title howpublished new.block.checkb
+ format.title output
+ howpublished new.block.checka
+ howpublished output
+ format.date output
+ new.block
+ note output
+ fin.entry
+ empty.misc.check
+}
+
+FUNCTION {phdthesis}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.btitle "title" output.check
+ new.block
+ bbl.phdthesis format.thesis.type output.nonnull
+ school "school" output.check
+ address output
+ format.date "year" output.check
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {proceedings}
+{ output.bibitem
+ editor empty$
+ { organization output }
+ { format.editors output.nonnull }
+ if$
+ new.block
+ format.btitle "title" output.check
+ format.bvolume output
+ format.number.series output
+ address empty$
+ { editor empty$
+ { publisher new.sentence.checka }
+ { organization publisher new.sentence.checkb
+ organization output
+ }
+ if$
+ publisher output
+ format.date "year" output.check
+ }
+ { address output.nonnull
+ format.date "year" output.check
+ new.sentence
+ editor empty$
+ 'skip$
+ { organization output }
+ if$
+ publisher output
+ }
+ if$
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {techreport}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.title "title" output.check
+ new.block
+ format.tr.number output.nonnull
+ institution "institution" output.check
+ address output
+ format.date "year" output.check
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {unpublished}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.title "title" output.check
+ new.block
+ note "note" output.check
+ format.date output
+ fin.entry
+}
+
+FUNCTION {default.type} { misc }
+
+READ
+
+FUNCTION {sortify}
+{ purify$
+ "l" change.case$
+}
+
+INTEGERS { len }
+
+FUNCTION {chop.word}
+{ 's :=
+ 'len :=
+ s #1 len substring$ =
+ { s len #1 + global.max$ substring$ }
+ 's
+ if$
+}
+
+FUNCTION {sort.format.names}
+{ 's :=
+ #1 'nameptr :=
+ ""
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ { s nameptr
+ "{vv{ } }{ll{ }}{ ff{ }}{ jj{ }}"
+ format.name$ 't :=
+ nameptr #1 >
+ {
+ " " *
+ namesleft #1 = t "others" = and
+ { "aaaaa" * }
+ { t sortify * }
+ if$
+ }
+ { t sortify * }
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+}
+
+FUNCTION {sort.format.title}
+{ 't :=
+ "A " #2
+ "An " #3
+ "The " #4 t chop.word
+ chop.word
+ chop.word
+ sortify
+ #1 global.max$ substring$
+}
+
+FUNCTION {author.sort}
+{ author empty$
+ { key empty$
+ { "to sort, need author or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { author sort.format.names }
+ if$
+}
+
+FUNCTION {author.editor.sort}
+{ author empty$
+ { editor empty$
+ { key empty$
+ { "to sort, need author, editor, or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { editor sort.format.names }
+ if$
+ }
+ { author sort.format.names }
+ if$
+}
+
+FUNCTION {author.organization.sort}
+{ author empty$
+ { organization empty$
+ { key empty$
+ { "to sort, need author, organization, or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { "The " #4 organization chop.word sortify }
+ if$
+ }
+ { author sort.format.names }
+ if$
+}
+
+FUNCTION {editor.organization.sort}
+{ editor empty$
+ { organization empty$
+ { key empty$
+ { "to sort, need editor, organization, or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { "The " #4 organization chop.word sortify }
+ if$
+ }
+ { editor sort.format.names }
+ if$
+}
+
+FUNCTION {presort}
+{ type$ "book" =
+ type$ "inbook" =
+ or
+ 'author.editor.sort
+ { type$ "proceedings" =
+ 'editor.organization.sort
+ { type$ "manual" =
+ 'author.organization.sort
+ 'author.sort
+ if$
+ }
+ if$
+ }
+ if$
+ " "
+ *
+ year field.or.null sortify
+ *
+ " "
+ *
+ title field.or.null
+ sort.format.title
+ *
+ #1 entry.max$ substring$
+ 'sort.key$ :=
+}
+
+ITERATE {presort}
+
+SORT
+
+STRINGS { longest.label }
+
+INTEGERS { number.label longest.label.width }
+
+FUNCTION {initialize.longest.label}
+{ "" 'longest.label :=
+ #1 'number.label :=
+ #0 'longest.label.width :=
+}
+
+FUNCTION {longest.label.pass}
+{ number.label int.to.str$ 'label :=
+ number.label #1 + 'number.label :=
+ label width$ longest.label.width >
+ { label 'longest.label :=
+ label width$ 'longest.label.width :=
+ }
+ 'skip$
+ if$
+}
+
+EXECUTE {initialize.longest.label}
+
+ITERATE {longest.label.pass}
+
+FUNCTION {begin.bib}
+{ preamble$ empty$
+ 'skip$
+ { preamble$ write$ newline$ }
+ if$
+ "\begin{thebibliography}{" longest.label * "}" *
+ write$ newline$
+}
+
+EXECUTE {begin.bib}
+
+EXECUTE {init.state.consts}
+
+ITERATE {call.type$}
+
+FUNCTION {end.bib}
+{ newline$
+ "\end{thebibliography}" write$ newline$
+}
+
+EXECUTE {end.bib}
+%% End of customized bst file
+%%
+%% End of file `caplain.bst'.
diff --git a/biblio/bibtex/contrib/catalan/bibtex/bst/caunsrt.bst b/biblio/bibtex/contrib/catalan/bibtex/bst/caunsrt.bst
new file mode 100644
index 0000000000..a083dac7d5
--- /dev/null
+++ b/biblio/bibtex/contrib/catalan/bibtex/bst/caunsrt.bst
@@ -0,0 +1,1232 @@
+%%
+%% This is file `caunsrt.bst',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% merlin.mbs (with options: `head,exlang,seq-no,catalan,nom,and-xcom,nfss,{}')
+%% catalan.mbs (with options: `exlang,seq-no,catalan,nom,and-xcom,nfss,{}')
+%% merlin.mbs (with options: `tail,exlang,seq-no,catalan,nom,and-xcom,nfss,{}')
+%% ----------------------------------------
+%% *** ca(talan)unsrt BibTeX style, by Robert Fuster 18/05/1998 ***
+%% *** modified 18/11/2004 ***
+%% Changes: 18/11/04: added date as optional field in unpublished
+%% (as in standard unsrt style)
+%% 18/11/04: now the title field in mastersthesis is not emphasized
+%% (as in standard unsrt style)
+%%
+ %-------------------------------------------------------------------
+ % The original source file contains the following version information:
+ % \ProvidesFile{merlin.mbs}[1996/12/16 3.82 (PWD)]
+ %
+ % NOTICE:
+ % This file may be used for non-profit purposes.
+ % It may not be distributed in exchange for money,
+ % other than distribution costs.
+ %
+ % The author provides it `as is' and does not guarantee it in any way.
+ %
+ % Copyright (C) 1994, 1995, 1996 Patrick W. Daly
+ %-------------------------------------------------------------------
+ % For use with BibTeX version 0.99a or later
+ %-------------------------------------------------------------------
+ % This bibliography style file is intended for texts in
+ % CATALAN
+ % This is a numerical citation style, and as such is standard LaTeX.
+ % It requires no extra package to interface to the main text.
+ % The form of the \bibitem entries is
+ % \bibitem{key}...
+ % Usage of \cite is as follows:
+ % \cite{key} ==>> [#]
+ % \cite[chap. 2]{key} ==>> [#, chap. 2]
+ % where # is a number determined by the ordering in the reference list.
+ % The order in the reference list is that by which the works were originally
+ % cited in the text, or that in the database.
+ %---------------------------------------------------------------------
+
+ENTRY
+ { address
+ author
+ booktitle
+ chapter
+ edition
+ editor
+ howpublished
+ institution
+ journal
+ key
+ month
+ note
+ number
+ organization
+ pages
+ publisher
+ school
+ series
+ title
+ type
+ volume
+ year
+ }
+ {}
+ { label }
+
+INTEGERS { output.state before.all mid.sentence after.sentence after.block }
+
+FUNCTION {init.state.consts}
+{ #0 'before.all :=
+ #1 'mid.sentence :=
+ #2 'after.sentence :=
+ #3 'after.block :=
+}
+
+STRINGS { s t }
+
+FUNCTION {output.nonnull}
+{ 's :=
+ output.state mid.sentence =
+ { ", " * write$ }
+ { output.state after.block =
+ { add.period$ write$
+ newline$
+ "\newblock " write$
+ }
+ { output.state before.all =
+ 'write$
+ { add.period$ " " * write$ }
+ if$
+ }
+ if$
+ mid.sentence 'output.state :=
+ }
+ if$
+ s
+}
+
+FUNCTION {output}
+{ duplicate$ empty$
+ 'pop$
+ 'output.nonnull
+ if$
+}
+
+FUNCTION {output.check}
+{ 't :=
+ duplicate$ empty$
+ { pop$ "empty " t * " in " * cite$ * warning$ }
+ 'output.nonnull
+ if$
+}
+
+FUNCTION {fin.entry}
+{ add.period$
+ write$
+ newline$
+}
+
+FUNCTION {new.block}
+{ output.state before.all =
+ 'skip$
+ { after.block 'output.state := }
+ if$
+}
+
+FUNCTION {new.sentence}
+{ output.state after.block =
+ 'skip$
+ { output.state before.all =
+ 'skip$
+ { after.sentence 'output.state := }
+ if$
+ }
+ if$
+}
+
+FUNCTION {add.blank}
+{ " " * before.all 'output.state :=
+}
+
+FUNCTION {date.block}
+{
+ new.block
+}
+
+FUNCTION {not}
+{ { #0 }
+ { #1 }
+ if$
+}
+
+FUNCTION {and}
+{ 'skip$
+ { pop$ #0 }
+ if$
+}
+
+FUNCTION {or}
+{ { pop$ #1 }
+ 'skip$
+ if$
+}
+
+FUNCTION {non.stop}
+{ duplicate$
+ "}" * add.period$
+ #-1 #1 substring$ "." =
+}
+
+FUNCTION {new.block.checka}
+{ empty$
+ 'skip$
+ 'new.block
+ if$
+}
+
+FUNCTION {new.block.checkb}
+{ empty$
+ swap$ empty$
+ and
+ 'skip$
+ 'new.block
+ if$
+}
+
+FUNCTION {new.sentence.checka}
+{ empty$
+ 'skip$
+ 'new.sentence
+ if$
+}
+
+FUNCTION {new.sentence.checkb}
+{ empty$
+ swap$ empty$
+ and
+ 'skip$
+ 'new.sentence
+ if$
+}
+
+FUNCTION {field.or.null}
+{ duplicate$ empty$
+ { pop$ "" }
+ 'skip$
+ if$
+}
+
+FUNCTION {emphasize}
+{ duplicate$ empty$
+ { pop$ "" }
+ { "\emph{" swap$ * "}" * }
+ if$
+}
+
+FUNCTION {capitalize}
+{ "u" change.case$ "t" change.case$ }
+
+FUNCTION {space.word}
+{ " " swap$ * " " * }
+
+ % Here are the language-specific definitions for explicit words.
+ % Each function has a name bbl.xxx where xxx is the English word.
+ %-------------------------------------------------------------------
+ % The original source file contains the following version information:
+ % \ProvidesFile{catalan.mbs}[1998/05/17 2.0 (PWD/RF)]
+ % Copyright (C) 1994, 1995 Patrick W. Daly
+ % Copyright (C) 1997, 1998 Robert Fuster
+
+ %-------------------------------------------------------------------
+
+ % The language selected here is CATALAN
+FUNCTION {bbl.and}
+{ "i"}
+
+FUNCTION {bbl.editors}
+{ "editors" }
+
+FUNCTION {bbl.editor}
+{ "editor" }
+
+FUNCTION {bbl.edby}
+{ "editat per" }
+
+FUNCTION {bbl.edition}
+{ "edici\'o" }
+
+FUNCTION {bbl.volume}
+{ "volum" }
+
+FUNCTION {bbl.of}
+{ "de" }
+
+FUNCTION {bbl.number}
+{ "n\'umero" }
+
+FUNCTION {bbl.nr}
+{ "n." }
+
+FUNCTION {bbl.in}
+{ "dins" }
+
+FUNCTION {bbl.pages}
+{ "p\`agines" }
+
+FUNCTION {bbl.page}
+{ "p\`agina" }
+
+FUNCTION {bbl.chapter}
+{ "cap\'{\i}tol" }
+
+FUNCTION {bbl.techrep}
+{ "Report t{\`e}cnic" }
+
+FUNCTION {bbl.mthesis}
+{ "Projecte F. de Carrera o Tesina de L." }
+
+FUNCTION {bbl.phdthesis}
+{ "Tesi Doctoral" }
+
+FUNCTION {bbl.first}
+{ "primera" }
+
+FUNCTION {bbl.second}
+{ "segona" }
+
+FUNCTION {bbl.third}
+{ "tercera" }
+
+FUNCTION {bbl.fourth}
+{ "quarta" }
+
+FUNCTION {bbl.fifth}
+{ "cinquena" }
+
+FUNCTION {bbl.th}
+{ "a" }
+
+MACRO {jan} {"gener"}
+
+MACRO {feb} {"febrer"}
+
+MACRO {mar} {"mar\c{c}"}
+
+MACRO {apr} {"abril"}
+
+MACRO {may} {"maig"}
+
+MACRO {jun} {"juny"}
+
+MACRO {jul} {"juliol"}
+
+MACRO {aug} {"agost"}
+
+MACRO {sep} {"setembre"}
+
+MACRO {oct} {"octubre"}
+
+MACRO {nov} {"novembre"}
+
+MACRO {dec} {"desembre"}
+
+ % End of language definition file
+
+MACRO {acmcs} {"ACM Computing Surveys"}
+
+MACRO {acta} {"Acta Informatica"}
+
+MACRO {cacm} {"Communications of the ACM"}
+
+MACRO {ibmjrd} {"IBM Journal of Research and Development"}
+
+MACRO {ibmsj} {"IBM Systems Journal"}
+
+MACRO {ieeese} {"IEEE Transactions on Software Engineering"}
+
+MACRO {ieeetc} {"IEEE Transactions on Computers"}
+
+MACRO {ieeetcad}
+ {"IEEE Transactions on Computer-Aided Design of Integrated Circuits"}
+
+MACRO {ipl} {"Information Processing Letters"}
+
+MACRO {jacm} {"Journal of the ACM"}
+
+MACRO {jcss} {"Journal of Computer and System Sciences"}
+
+MACRO {scp} {"Science of Computer Programming"}
+
+MACRO {sicomp} {"SIAM Journal on Computing"}
+
+MACRO {tocs} {"ACM Transactions on Computer Systems"}
+
+MACRO {tods} {"ACM Transactions on Database Systems"}
+
+MACRO {tog} {"ACM Transactions on Graphics"}
+
+MACRO {toms} {"ACM Transactions on Mathematical Software"}
+
+MACRO {toois} {"ACM Transactions on Office Information Systems"}
+
+MACRO {toplas} {"ACM Transactions on Programming Languages and Systems"}
+
+MACRO {tcs} {"Theoretical Computer Science"}
+
+INTEGERS { nameptr namesleft numnames }
+
+FUNCTION {format.names}
+{ 's :=
+ #1 'nameptr :=
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ { s nameptr
+ "{ff~}{vv~}{ll}{, jj}" format.name$ 't :=
+ nameptr #1 >
+ {
+ namesleft #1 >
+ { ", " * t * }
+ {
+ t "others" =
+ { " et~al." * }
+ { bbl.and space.word * t * }
+ if$
+ }
+ if$
+ }
+ 't
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+}
+
+FUNCTION {format.names.ed}
+{ 's :=
+ #1 'nameptr :=
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ { s nameptr
+ "{ff~}{vv~}{ll}{, jj}"
+ format.name$ 't :=
+ nameptr #1 >
+ {
+ namesleft #1 >
+ { ", " * t * }
+ {
+ t "others" =
+ { " et~al." * }
+ { bbl.and space.word * t * }
+ if$
+ }
+ if$
+ }
+ 't
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+}
+
+FUNCTION {format.authors}
+{ author empty$
+ { "" }
+ {
+ author format.names
+ }
+ if$
+}
+
+FUNCTION {format.editors}
+{ editor empty$
+ { "" }
+ {
+ editor format.names
+ editor num.names$ #1 >
+ { ", " * bbl.editors * }
+ { ", " * bbl.editor * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.in.editors}
+{ editor empty$
+ { "" }
+ { editor format.names.ed
+ editor num.names$ #1 >
+ { ", " * bbl.editors * }
+ { ", " * bbl.editor * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.title}
+{ title empty$
+ { "" }
+ { title "t" change.case$
+ }
+ if$
+}
+
+FUNCTION {output.bibitem}
+{ newline$
+ "\bibitem{" write$
+ cite$ write$
+ "}" write$
+ newline$
+ ""
+ before.all 'output.state :=
+}
+
+FUNCTION {n.dashify}
+{ 't :=
+ ""
+ { t empty$ not }
+ { t #1 #1 substring$ "-" =
+ { t #1 #2 substring$ "--" = not
+ { "--" *
+ t #2 global.max$ substring$ 't :=
+ }
+ { { t #1 #1 substring$ "-" = }
+ { "-" *
+ t #2 global.max$ substring$ 't :=
+ }
+ while$
+ }
+ if$
+ }
+ { t #1 #1 substring$ *
+ t #2 global.max$ substring$ 't :=
+ }
+ if$
+ }
+ while$
+}
+
+FUNCTION {word.in}
+{ bbl.in capitalize
+ " " * }
+
+FUNCTION {format.date}
+{ year empty$
+ { month empty$
+ { "" }
+ { "there's a month but no year in " cite$ * warning$
+ month
+ }
+ if$
+ }
+ { month empty$
+ 'year
+ { month " " * year * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.btitle}
+{ title emphasize
+}
+
+FUNCTION {tie.or.space.connect}
+{ duplicate$ text.length$ #3 <
+ { "~" }
+ { " " }
+ if$
+ swap$ * *
+}
+
+FUNCTION {either.or.check}
+{ empty$
+ 'pop$
+ { "can't use both " swap$ * " fields in " * cite$ * warning$ }
+ if$
+}
+
+FUNCTION {format.bvolume}
+{ volume empty$
+ { "" }
+ { bbl.volume volume tie.or.space.connect
+ series empty$
+ 'skip$
+ { bbl.of space.word * series emphasize * }
+ if$
+ "volume and number" number either.or.check
+ }
+ if$
+}
+
+FUNCTION {format.number.series}
+{ volume empty$
+ { number empty$
+ { series field.or.null }
+ { output.state mid.sentence =
+ { bbl.number }
+ { bbl.number capitalize }
+ if$
+ number tie.or.space.connect
+ series empty$
+ { "there's a number but no series in " cite$ * warning$ }
+ { bbl.in space.word * series * }
+ if$
+ }
+ if$
+ }
+ { "" }
+ if$
+}
+
+FUNCTION {is.num}
+{ chr.to.int$
+ duplicate$ "0" chr.to.int$ < not
+ swap$ "9" chr.to.int$ > not and
+}
+
+FUNCTION {extract.num}
+{ duplicate$ 't :=
+ "" 's :=
+ { t empty$ not }
+ { t #1 #1 substring$
+ t #2 global.max$ substring$ 't :=
+ duplicate$ is.num
+ { s swap$ * 's := }
+ { pop$ "" 't := }
+ if$
+ }
+ while$
+ s empty$
+ 'skip$
+ { pop$ s }
+ if$
+}
+
+FUNCTION {convert.edition}
+{ edition extract.num "l" change.case$ 's :=
+ s "first" = s "1" = or
+ { bbl.first 't := }
+ { s "second" = s "2" = or
+ { bbl.second 't := }
+ { s "third" = s "3" = or
+ { bbl.third 't := }
+ { s "fourth" = s "4" = or
+ { bbl.fourth 't := }
+ { s "fifth" = s "5" = or
+ { bbl.fifth 't := }
+ { s #1 #1 substring$ is.num
+ { s bbl.th * 't := }
+ { edition 't := }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+ t
+}
+
+FUNCTION {format.edition}
+{ edition empty$
+ { "" }
+ { output.state mid.sentence =
+ { convert.edition "l" change.case$ " " * bbl.edition * }
+ { convert.edition "t" change.case$ " " * bbl.edition * }
+ if$
+ }
+ if$
+}
+
+INTEGERS { multiresult }
+
+FUNCTION {multi.page.check}
+{ 't :=
+ #0 'multiresult :=
+ { multiresult not
+ t empty$ not
+ and
+ }
+ { t #1 #1 substring$
+ duplicate$ "-" =
+ swap$ duplicate$ "," =
+ swap$ "+" =
+ or or
+ { #1 'multiresult := }
+ { t #2 global.max$ substring$ 't := }
+ if$
+ }
+ while$
+ multiresult
+}
+
+FUNCTION {format.pages}
+{ pages empty$
+ { "" }
+ { pages multi.page.check
+ { bbl.pages pages n.dashify tie.or.space.connect }
+ { bbl.page pages tie.or.space.connect }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.journal.pages}
+{
+ pages empty$
+ 'skip$
+ { duplicate$ empty$
+ { pop$ format.pages }
+ { ":" * pages n.dashify * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.vol.num.pages}
+{ volume field.or.null
+ number empty$
+ 'skip$
+ {
+ "(" number * ")" * *
+ volume empty$
+ { "there's a number but no volume in " cite$ * warning$ }
+ 'skip$
+ if$
+ }
+ if$
+ format.journal.pages
+}
+
+FUNCTION {format.chapter.pages}
+{ chapter empty$
+ 'format.pages
+ { type empty$
+ { bbl.chapter }
+ { type "l" change.case$ }
+ if$
+ chapter tie.or.space.connect
+ pages empty$
+ 'skip$
+ { ", " * format.pages * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.in.ed.booktitle}
+{ booktitle empty$
+ { "" }
+ { editor empty$
+ { word.in booktitle emphasize * }
+ { word.in format.in.editors * ", " *
+ booktitle emphasize * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {empty.misc.check}
+{ author empty$ title empty$ howpublished empty$
+ month empty$ year empty$ note empty$
+ and and and and and
+ { "all relevant fields are empty in " cite$ * warning$ }
+ 'skip$
+ if$
+}
+
+FUNCTION {format.thesis.type}
+{ type empty$
+ 'skip$
+ { pop$
+ type "t" change.case$
+ }
+ if$
+}
+
+FUNCTION {format.tr.number}
+{ type empty$
+ { bbl.techrep }
+ 'type
+ if$
+ number empty$
+ { "t" change.case$ }
+ { number tie.or.space.connect }
+ if$
+}
+
+FUNCTION {format.article.crossref}
+{
+ key empty$
+ { journal empty$
+ { "need key or journal for " cite$ * " to crossref " * crossref *
+ warning$
+ ""
+ }
+ { word.in journal emphasize * }
+ if$
+ }
+ { word.in key * " " *}
+ if$
+ " \cite{" * crossref * "}" *
+}
+
+FUNCTION {format.crossref.editor}
+{ editor #1 "{vv~}{ll}" format.name$
+ editor num.names$ duplicate$
+ #2 >
+ { pop$ " et~al." * }
+ { #2 <
+ 'skip$
+ { editor #2 "{ff }{vv }{ll}{ jj}" format.name$ "others" =
+ { " et~al." * }
+ { bbl.and space.word * editor #2 "{vv~}{ll}" format.name$ * }
+ if$
+ }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.book.crossref}
+{ volume empty$
+ { "empty volume in " cite$ * "'s crossref of " * crossref * warning$
+ word.in
+ }
+ { bbl.volume capitalize
+ volume tie.or.space.connect
+ bbl.of space.word *
+ }
+ if$
+ editor empty$
+ editor field.or.null author field.or.null =
+ or
+ { key empty$
+ { series empty$
+ { "need editor, key, or series for " cite$ * " to crossref " *
+ crossref * warning$
+ "" *
+ }
+ { series emphasize * }
+ if$
+ }
+ { key * }
+ if$
+ }
+ { format.crossref.editor * }
+ if$
+ " \cite{" * crossref * "}" *
+}
+
+FUNCTION {format.incoll.inproc.crossref}
+{
+ editor empty$
+ editor field.or.null author field.or.null =
+ or
+ { key empty$
+ { booktitle empty$
+ { "need editor, key, or booktitle for " cite$ * " to crossref " *
+ crossref * warning$
+ ""
+ }
+ { word.in booktitle emphasize * }
+ if$
+ }
+ { word.in key * " " *}
+ if$
+ }
+ { word.in format.crossref.editor * " " *}
+ if$
+ " \cite{" * crossref * "}" *
+}
+
+FUNCTION {format.publisher}
+{ publisher empty$
+ { "empty publisher in " cite$ * warning$ }
+ 'skip$
+ if$
+ ""
+ address empty$ publisher empty$ and
+ 'skip$
+ {
+ publisher empty$
+ { address empty$
+ 'skip$
+ { address * }
+ if$
+ }
+ { publisher *
+ address empty$
+ 'skip$
+ { ", " * address * }
+ if$
+ }
+ if$
+ }
+ if$
+ output
+}
+
+FUNCTION {article}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.title "title" output.check
+ new.block
+ crossref missing$
+ { journal
+ emphasize
+ "journal" output.check
+ format.vol.num.pages output
+ format.date "year" output.check
+ }
+ { format.article.crossref output.nonnull
+ format.pages output
+ }
+ if$
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {book}
+{ output.bibitem
+ author empty$
+ { format.editors "author and editor" output.check
+ }
+ { format.authors output.nonnull
+ crossref missing$
+ { "author and editor" editor either.or.check }
+ 'skip$
+ if$
+ }
+ if$
+ new.block
+ format.btitle "title" output.check
+ crossref missing$
+ { format.bvolume output
+ new.block
+ format.number.series output
+ new.sentence
+ format.publisher
+ }
+ {
+ new.block
+ format.book.crossref output.nonnull
+ }
+ if$
+ format.edition output
+ format.date "year" output.check
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {booklet}
+{ output.bibitem
+ format.authors output
+ new.block
+ format.title "title" output.check
+ new.block
+ howpublished output
+ address output
+ format.date output
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {inbook}
+{ output.bibitem
+ author empty$
+ { format.editors "author and editor" output.check
+ }
+ { format.authors output.nonnull
+ crossref missing$
+ { "author and editor" editor either.or.check }
+ 'skip$
+ if$
+ }
+ if$
+ new.block
+ format.btitle "title" output.check
+ crossref missing$
+ {
+ format.bvolume output
+ format.chapter.pages "chapter and pages" output.check
+ new.block
+ format.number.series output
+ new.sentence
+ format.publisher
+ }
+ {
+ format.chapter.pages "chapter and pages" output.check
+ new.block
+ format.book.crossref output.nonnull
+ }
+ if$
+ format.edition output
+ format.date "year" output.check
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {incollection}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.title "title" output.check
+ new.block
+ crossref missing$
+ { format.in.ed.booktitle "booktitle" output.check
+ format.bvolume output
+ format.number.series output
+ format.chapter.pages output
+ new.sentence
+ format.publisher
+ format.edition output
+ format.date "year" output.check
+ }
+ { format.incoll.inproc.crossref output.nonnull
+ format.chapter.pages output
+ }
+ if$
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {inproceedings}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.title "title" output.check
+ new.block
+ crossref missing$
+ { format.in.ed.booktitle "booktitle" output.check
+ format.bvolume output
+ format.number.series output
+ format.pages output
+ new.sentence
+ publisher empty$
+ { organization output
+ address output
+ }
+ { organization output
+ format.publisher
+ }
+ if$
+ format.date "year" output.check
+ }
+ { format.incoll.inproc.crossref output.nonnull
+ format.pages output
+ }
+ if$
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {conference} { inproceedings }
+
+FUNCTION {manual}
+{ output.bibitem
+ author empty$
+ { organization empty$
+ 'skip$
+ { organization output.nonnull
+ address output
+ }
+ if$
+ }
+ { format.authors output.nonnull }
+ if$
+ new.block
+ format.btitle "title" output.check
+ author empty$
+ { organization empty$
+ {
+ address new.block.checka
+ address output
+ }
+ 'skip$
+ if$
+ }
+ {
+ organization address new.block.checkb
+ organization output
+ address output
+ }
+ if$
+ format.edition output
+ format.date output
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {mastersthesis}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.title "title" output.check
+ new.block
+ bbl.mthesis format.thesis.type output.nonnull
+ school "school" output.check
+ address output
+ format.date "year" output.check
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {misc}
+{ output.bibitem
+ format.authors output
+ title howpublished new.block.checkb
+ format.title output
+ howpublished new.block.checka
+ howpublished output
+ format.date output
+ new.block
+ note output
+ fin.entry
+ empty.misc.check
+}
+
+FUNCTION {phdthesis}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.btitle "title" output.check
+ new.block
+ bbl.phdthesis format.thesis.type output.nonnull
+ school "school" output.check
+ address output
+ format.date "year" output.check
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {proceedings}
+{ output.bibitem
+ editor empty$
+ { organization output }
+ { format.editors output.nonnull }
+ if$
+ new.block
+ format.btitle "title" output.check
+ format.bvolume output
+ format.number.series output
+ address empty$
+ { editor empty$
+ { publisher new.sentence.checka }
+ { organization publisher new.sentence.checkb
+ organization output
+ }
+ if$
+ publisher output
+ format.date "year" output.check
+ }
+ { address output.nonnull
+ format.date "year" output.check
+ new.sentence
+ editor empty$
+ 'skip$
+ { organization output }
+ if$
+ publisher output
+ }
+ if$
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {techreport}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.title "title" output.check
+ new.block
+ format.tr.number output.nonnull
+ institution "institution" output.check
+ address output
+ format.date "year" output.check
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {unpublished}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.title "title" output.check
+ new.block
+ note "note" output.check
+ format.date output
+ fin.entry
+}
+
+FUNCTION {default.type} { misc }
+
+READ
+
+STRINGS { longest.label }
+
+INTEGERS { number.label longest.label.width }
+
+FUNCTION {initialize.longest.label}
+{ "" 'longest.label :=
+ #1 'number.label :=
+ #0 'longest.label.width :=
+}
+
+FUNCTION {longest.label.pass}
+{ number.label int.to.str$ 'label :=
+ number.label #1 + 'number.label :=
+ label width$ longest.label.width >
+ { label 'longest.label :=
+ label width$ 'longest.label.width :=
+ }
+ 'skip$
+ if$
+}
+
+EXECUTE {initialize.longest.label}
+
+ITERATE {longest.label.pass}
+
+FUNCTION {begin.bib}
+{ preamble$ empty$
+ 'skip$
+ { preamble$ write$ newline$ }
+ if$
+ "\begin{thebibliography}{" longest.label * "}" *
+ write$ newline$
+}
+
+EXECUTE {begin.bib}
+
+EXECUTE {init.state.consts}
+
+ITERATE {call.type$}
+
+FUNCTION {end.bib}
+{ newline$
+ "\end{thebibliography}" write$ newline$
+}
+
+EXECUTE {end.bib}
+%% End of customized bst file
+%%
+%% End of file `caunsrt.bst'. \ No newline at end of file
diff --git a/biblio/bibtex/contrib/catalan/catalanbib.pdf b/biblio/bibtex/contrib/catalan/catalanbib.pdf
new file mode 100644
index 0000000000..c474924ff4
--- /dev/null
+++ b/biblio/bibtex/contrib/catalan/catalanbib.pdf
Binary files differ
diff --git a/biblio/bibtex/contrib/catalan/doc/bibtex/catalan/catalanbib.tex b/biblio/bibtex/contrib/catalan/doc/bibtex/catalan/catalanbib.tex
new file mode 100644
index 0000000000..10f266bc87
--- /dev/null
+++ b/biblio/bibtex/contrib/catalan/doc/bibtex/catalan/catalanbib.tex
@@ -0,0 +1,248 @@
+\documentclass[a4paper]{article}
+\usepackage[T1]{fontenc}
+\usepackage[latin1]{inputenc}
+\usepackage[english,catalan]{babel}
+\usepackage{natbib}
+\usepackage{url}
+\newcommand{\BibTeX}{\textsc{Bib}\TeX}
+\bibpunct{(}{)}{;}{a}{:}{,}
+\begin{document}
+
+\title{Estils bibliogr\`afics en catal\`a}
+\author{Robert Fuster\thanks{ce: \texttt{rfuster@imm.upv.es},
+ \texttt{rfuster@mat.upv.es}}\\\small
+Institut de Matemtica Multidisciplinar\\\small
+Universitat Politcnica de Valncia\\\small
+Cam de Vera, 14\\\small
+46022 -- Valncia (Spain)}
+\maketitle
+{\selectlanguage{english}
+\begin{abstract}
+The \texttt{catalanbib} package includes
+several Catalan bibliografic styles for \BibTeX:
+the standard ones ---adapted to the
+Catalan typographical conventions--- (\texttt{caplain.bst},
+\texttt{caunsrt.bst}, \texttt{caabbrev.bst}, and
+\texttt{caalpha.bst}), and some \emph{author-date} styles
+---following the bibliographic norms
+from \citet{manualdestil}.
+
+These author-date styles require the \texttt{natbib}
+package \citep{natbib}.
+\end{abstract}
+}
+\begin{abstract}
+El paquet \texttt{catalanbib} cont diversos estils bibliogrfics
+per fer servir el \BibTeX{} en catal:
+els estils estndard ---adaptats a les convencions
+tipogrfiques catalanes---
+(\texttt{caplain.bst},
+\texttt{caunsrt.bst}, \texttt{caabbrev.bst} i
+\texttt{caalpha.bst}) i alguns estils autor-data
+---seguint les normes bibliogrfiques de
+\citet{manualdestil}.
+
+Aquests estils autor-data requereixen el paquet
+\texttt{natbib}
+\citep{natbib}.
+\end{abstract}
+\tableofcontents
+\section{Els estils estndard}
+Els quatre estils bibliogrfics \texttt{caplain.bst},
+\texttt{caunsrt.bst}, \texttt{caabbrev.bst} i
+\texttt{caalpha.bst} es corresponen respectivament amb els
+estils estndard \texttt{plain.bst},
+\texttt{unsrt.bst}, \texttt{abbrev.bst} i
+\texttt{alpha.bst}.
+Aquests estils no requereixen cap paquet addicional i es fan
+servir de la manera habitual. Com ara, incloent al fitxer font
+\begin{verbatim}
+\nocite{*}
+\bibliography{exemples}
+\bibliographystyle{caplain}
+\end{verbatim}
+compondrem totes les referncies bibliogrfiques emmagatzemades
+a la base de dades \verb+exemples.bib+ en l'estil \verb+caplain+.
+Vegeu-ne exemples d'aquests estils als documents
+\texttt{caplain.tex},
+\texttt{caunsrt.tex}, \texttt{caabbrev.tex} i
+\texttt{caalpha.tex}.
+\section{Estils autor-data}
+En general, resulta molt ms recomanable l'estil de
+citacions autor-data front als estils numrics o
+alfabtics, pel fet que les referncies sn molt ms
+explcites.
+
+Amb el \LaTeX{} i el \BibTeX{} podem fer servir diversos
+paquets i estils bibliogrfics per tal de compondre
+els nostres documents amb l'estil de citaci autor-data.
+Entre totes aquestes opcions la ms flexible, perqu
+permet personalitzar l'estil de les referncies
+bibliogrfiques tant com es vulga, s la que ens
+proporcionen el paquet \verb+natbib+ \citep{natbib}
+i el programa \verb+makebst+ \citep{makebst}.
+
+El \verb+makebst+ s un programa interactiu en \TeX{}
+per a definir estils bibliogrfics (s a dir,
+fitxers \verb+.bst+).
+Tots els estils
+bibliogrfics inclosos en el paquet \verb+catalanbib+
+han estat creats fent servir aquest programa.\footnote{Tot i que en
+algun cas els estils han estat editats posteriorment per tal d'introduir-hi
+alguna modificaci.}
+En qualsevol cas, aquest programa noms us pot ser
+til si esteu interessats a crear els vostres propis
+estils bibliogrfics.
+
+El paquet \verb+natbib+ s una reimplementaci de la
+marca \verb+\cite+ que permet tant la citaci numrica
+com la del tipus autor-data. Aquest paquet s compatible amb
+els estils estndard i amb els ms populars entre els
+estils autor-data, com ara \verb+apalike+ o \verb+chicago+.
+A ms de la marca \verb+\cite+ el paquet \verb+natbib+ defineix
+diverses marques per a controlar l'estil de les citacions, entre les quals
+destaquem les segents:\footnote{Ac noms descrivim parcialment
+algunes de les caracterstiques del paquet \texttt{natbib}. }
+\begin{description}
+\item[\texttt{\textbackslash citet\{\textit{<clau>}\}},] per a citacions \emph{textuals}, com ara, "<... segons es diu en \citet{manualdestil}...">.
+\item[\texttt{\textbackslash citep\{\textit{<clau>}\}},] per a citacions entre parntesis,
+com ara, "<Aquesta qesti ja ha estat discutida \citep{manualdestil}.">.
+\item[\texttt{\textbackslash citeauthor\{\textit{<clau>}\}},
+\texttt{\textbackslash citeyear\{\textit{<clau>}\}},]
+per a citar nicament el nom desl autors o la data de publicaci.
+\end{description}
+
+Els estils bibliogrfics \verb+caauda0+, \verb+caauda1+,
+\verb+caauda2+ i \verb+caauda3+, que componen la llista de
+referncies bibliogrfiques
+en el format adequat per al sistema de citaci autor-data,
+requereixen el paquet \verb+natbib+.\footnote{Els estils estndard (\texttt{caplain}, etc) tamb sn compatibles amb el \texttt{natbib}.}
+Aix, per a compondre
+una llista de referncies en l'estil \verb+caauda0+
+escriurem quelcom paregut a a:
+\begin{verbatim}
+\usepackage{natbib}
+...
+\nocite{*}
+\bibliography{exemples}
+\bibliographystyle{caauda0}
+\end{verbatim}
+Els fitxers \verb+caauda0.tex+, \verb+caauda1.tex+,
+\verb+caauda2.tex+ i \verb+caauda3.tex+ mostren exemples
+dels quatre estils.
+
+Aquests estils segueixen aproximadament les recomanacions de \citet{manualdestil} i \citet{lacreu}. Les principals diferncies entre ells
+sn les segents:
+\begin{itemize}
+\item El format i la posici de la data. En els estils \verb+caauda0+ i
+ \verb+caauda2+
+ la data es redueix a l'any, entre parntesis,
+ i se situa immediatament darrere
+ dels autors, la qual cosa facilita la recerca de les citacions. En els
+ altres dos estils, la data inclou el mes i l'any i es compon en la
+ mateixa posici dels estils estndard.
+\item Els estils \verb+caauda2+ i \verb+caauda3+
+ reconeixen el camp \verb+annote+, per a compondre bibliografies
+ anotades.
+
+ Per defecte les anotacions es componen amb els tipus del cos
+ \verb+\small+ i en cursiva. Si voleu modificar aquest comportament
+ definiu (amb la marca \verb+\newcommand+) la comanda
+ \verb+\BIBannoteformat+.
+ Per exemple,
+\begin{verbatim}
+ \newcommand{\BIBannoteformat}{%
+ \small\slshape\textbf{Comentari: }}
+\end{verbatim}
+ compondr les anotacions en lletra \verb+\small+ oblqua i
+ amb el rtol \verb+Comentari:+ en \verb+\small+ oblqua negreta.
+\end{itemize}
+
+A ms dels camps habituals, aquests quatre estils
+n'admeten alguns altres com a opcionals:
+\begin{itemize}
+\item \verb+DOI+ (\emph{Digital Object Identifier}) per a compondre els
+nmeros de serie normalitzats d'alguns objectes
+digitals. Aquest camp s opcional en tots els registres.
+\item
+\verb+ISBN+ (\emph{International Standard Book Number}),
+per a compondre els nmeros de serie normalitzats dels llibres.
+Aquest camp s opcional en els registres dels tipus
+\verb+book+, \verb+booklet+, \verb+inbook+,
+\verb+incollection+, \verb+inproceedings+ i
+\verb+proceedings+.
+\item \verb+ISSN+(\emph{International Standard Serial Number}),
+per a compondre els nmeros de serie normalitzats de les
+publicacions peridiques.
+Aquest camp s opcional en els registres dels tipus
+\verb+article+, \verb+inproceedings+ i \verb+proceedings+.
+\item \verb+language+, per a declarar la llengua
+en qu est compost el document corresponent.
+Aquest camp s opcional en
+tots els registres i noms afecta la composici
+dels ttols. El seu s nicament t efecte si s'ha
+fet servir el sistema \verb+babel+ i el contingut
+d'aquest camp s'ha declarat com una de les llenges
+del document, per no es produeix cap error en cas
+contrari.
+\item \verb+url+ (\emph{Universal Resource Locator}), per a indicar
+la localitzaci d'un document electrnic. Aquest camp s opcional
+en tots els registres. El seu contingut es compon
+amb la marca \verb+\url+, que per defecte s idntica a \verb+\texttt+,
+la qual cosa sol produir problemes, perqu
+amb el tipus de lletra mecanogrfica no es trenca la ratlla. s molt
+recomanable que carregueu el paquet \verb+url+, que defineix la comanda
+\verb+\url+ permetent el tall en els signes de puntuaci (coma ara, \verb+/+)
+per tal d'evitar lnies massa buides o desbordades pel marge dret
+(\emph{Overfull hlines}).
+\end{itemize}
+% Bibliografia creada originalment amb el bibtex
+%\bibliographystyle{caauda2}
+%\bibliography{catalanbib}
+% Bibliografia explcita per facilitar la compilaci sense l'estil caauda2
+\begin{thebibliography}{4}
+\ProvideTextCommand{\guillemotleft}{OT1}{%
+ \leavevmode\raise .27ex\hbox{$\scriptscriptstyle\ll$}}
+\ProvideTextCommand{\guillemotright}{OT1}{%
+ \leavevmode\raise .27ex\hbox{$\scriptscriptstyle\gg$}}
+\newcommand{\enquote}[1]{\guillemotleft#1\guillemotright}
+\providecommand{\natexlab}[1]{#1}
+\providecommand{\url}[1]{\texttt{#1}}
+\providecommand{\urlprefix}{URL }
+\expandafter\ifx\csname urlstyle\endcsname\relax
+ \providecommand{\doi}[1]{doi:\discretionary{}{}{}#1}\else
+ \providecommand{\doi}{doi:\discretionary{}{}{}\begingroup
+ \urlstyle{rm}\Url}\fi
+\providecommand{\selectlanguage}[1]{\relax}
+\providecommand{\eprint}[2][]{\url{#2}}
+\providecommand{\BIBannoteformat}{\small\itshape}
+
+\bibitem[{\textsc{Daly}(1999)}]{makebst}
+\textsc{Daly}, Patrick~W. (1999): {\selectlanguage{english}\emph{Costumizing
+ Bibliographic Style Files}}.
+\newblock \urlprefix\url{<CTAN>/macros/latex/contrib/supported/custom-bib/}.
+{\topsep 0pt\begin{trivlist}\item\BIBannoteformat
+Descripci{\'o} del programa {\texttt{makebst}} versi{\'o} 4.0--beta1.
+\end{trivlist}}
+
+\bibitem[{\textsc{Daly}(2000)}]{natbib}
+--- (2000): {\selectlanguage{english}\emph{Natural Sciences Citations and
+ References}}.
+\newblock \urlprefix\url{<CTAN>/macros/latex/contrib/supported/natbib/}.
+{\topsep 0pt\begin{trivlist}\item\BIBannoteformat
+Descripci{\'o} del paquet {\texttt{natbib}} versi{\'o} 7.0a.
+\end{trivlist}}
+
+\bibitem[{\textsc{Lacreu}(1995)}]{lacreu}
+\textsc{Lacreu}, Josep (1995): {\selectlanguage{catalan}\emph{Criteris
+ Ling\"u\'\i{}stics}}.
+\newblock Generalitat Valenciana, Val\`encia.
+
+\bibitem[{\textsc{Mestres} \emph{et~al.}(2000)}]{manualdestil}
+\textsc{Mestres}, Josep~M.; \emph{et~al.} (2000): \emph{Manual d'estil. La
+ redacci\'o i l'edici\'o de textos}.
+\newblock Eumo, Universitat de Barcelona, Universitat Pompeu Fabra i
+ Associaci\'o de mestres {R}osa {S}ensat, Barcelona, segona edici\'o.
+
+\end{thebibliography}
+\end{document} \ No newline at end of file
diff --git a/biblio/bibtex/contrib/catalan/doc/bibtex/catalan/exemples/caabbrv.tex b/biblio/bibtex/contrib/catalan/doc/bibtex/catalan/exemples/caabbrv.tex
new file mode 100644
index 0000000000..f156149983
--- /dev/null
+++ b/biblio/bibtex/contrib/catalan/doc/bibtex/catalan/exemples/caabbrv.tex
@@ -0,0 +1,19 @@
+\documentclass{article}
+\usepackage[latin1]{inputenc}
+\usepackage[spanish,english,italian,catalan]{babel}
+\title{Exemple de l'estil bibliogrfic \textsf{caabbrv}}
+\author{Robert Fuster}
+\date{15 de desembre de 2004}
+\begin{document}
+\maketitle
+Aquest s un exemple de l'estil bibliogrfic \textsf{caabbrv}.
+
+Entre altres documents la bibliografia inclou dues entrades del mateix autor
+(\cite{lamport2,biblamport}), el document electrnic~\cite{hyperlatex}
+i algun llibre de text, com ara~\cite{rbjcjmau}. Diversos documents
+\cite{biblamport, btxdoc,lamport2,vafus,jcccrf,liang} fan referncia al \TeX, al
+\LaTeX{} i al \textsc{Bib}\TeX.
+\nocite{*}
+\bibliographystyle{caabbrv}
+\bibliography{exemples}
+\end{document}
diff --git a/biblio/bibtex/contrib/catalan/doc/bibtex/catalan/exemples/caalpha.tex b/biblio/bibtex/contrib/catalan/doc/bibtex/catalan/exemples/caalpha.tex
new file mode 100644
index 0000000000..93e10f6b65
--- /dev/null
+++ b/biblio/bibtex/contrib/catalan/doc/bibtex/catalan/exemples/caalpha.tex
@@ -0,0 +1,19 @@
+\documentclass{article}
+\usepackage[latin1]{inputenc}
+\usepackage[spanish,english,italian,catalan]{babel}
+\title{Exemple de l'estil bibliogrfic \textsf{caalpha}}
+\author{Robert Fuster}
+\date{15 de desembre de 2004}
+\begin{document}
+\maketitle
+Aquest s un exemple de l'estil bibliogrfic \textsf{caalpha}.
+
+Entre altres documents la bibliografia inclou dues entrades del mateix autor
+(\cite{lamport2,biblamport}), el document electrnic~\cite{hyperlatex}
+i algun llibre de text, com ara~\cite{rbjcjmau}. Diversos documents
+\cite{biblamport, btxdoc,lamport2,vafus,jcccrf,liang} fan referncia al \TeX, al
+\LaTeX{} i al \textsc{Bib}\TeX.
+\nocite{*}
+\bibliographystyle{caalpha}
+\bibliography{exemples}
+\end{document}
diff --git a/biblio/bibtex/contrib/catalan/doc/bibtex/catalan/exemples/caauda0.tex b/biblio/bibtex/contrib/catalan/doc/bibtex/catalan/exemples/caauda0.tex
new file mode 100644
index 0000000000..19b7a91748
--- /dev/null
+++ b/biblio/bibtex/contrib/catalan/doc/bibtex/catalan/exemples/caauda0.tex
@@ -0,0 +1,21 @@
+\documentclass{article}
+\usepackage[latin1]{inputenc}
+\usepackage[spanish,english,italian,catalan]{babel}
+\usepackage{natbib}
+\usepackage{url}
+\title{Exemple de l'estil bibliogrfic \textsf{caauda0}}
+\author{Robert Fuster}
+\date{15 de desembre de 2004}
+\begin{document}
+\maketitle
+Aquest s un exemple de l'estil bibliogrfic del tipus autor-data \textsf{caauda0}.
+
+Entre altres documents la bibliografia inclou dues entrades del mateix autor
+\citep{lamport2,biblamport}, el document electrnic~\citet{hyperlatex}
+i algun llibre de text, com ara~\citet{rbjcjmau}. Diversos documents
+\citep{biblamport, btxdoc,lamport2,vafus,jcccrf,liang} fan referncia al \TeX, al
+\LaTeX{} i al \textsc{Bib}\TeX.
+\nocite{*}
+\bibliographystyle{caauda0}
+\bibliography{exemples}
+\end{document}
diff --git a/biblio/bibtex/contrib/catalan/doc/bibtex/catalan/exemples/caauda1.tex b/biblio/bibtex/contrib/catalan/doc/bibtex/catalan/exemples/caauda1.tex
new file mode 100644
index 0000000000..a2d9932849
--- /dev/null
+++ b/biblio/bibtex/contrib/catalan/doc/bibtex/catalan/exemples/caauda1.tex
@@ -0,0 +1,21 @@
+\documentclass{article}
+\usepackage[latin1]{inputenc}
+\usepackage[spanish,english,italian,catalan]{babel}
+\usepackage{natbib}
+\usepackage{url}
+\title{Exemple de l'estil bibliogrfic \textsf{caauda1}}
+\author{Robert Fuster}
+\date{15 de desembre de 2004}
+\begin{document}
+\maketitle
+Aquest s un exemple de l'estil bibliogrfic del tipus autor-data \textsf{caauda1}.
+
+Entre altres documents la bibliografia inclou dues entrades del mateix autor
+\citep{lamport2,biblamport}, el document electrnic~\citet{hyperlatex}
+i algun llibre de text, com ara~\citet{rbjcjmau}. Diversos documents
+\citep{biblamport, btxdoc,lamport2,vafus,jcccrf,liang} fan referncia al \TeX, al
+\LaTeX{} i al \textsc{Bib}\TeX.
+\nocite{*}
+\bibliographystyle{caauda1}
+\bibliography{exemples}
+\end{document}
diff --git a/biblio/bibtex/contrib/catalan/doc/bibtex/catalan/exemples/caauda2.tex b/biblio/bibtex/contrib/catalan/doc/bibtex/catalan/exemples/caauda2.tex
new file mode 100644
index 0000000000..e5e62cbdeb
--- /dev/null
+++ b/biblio/bibtex/contrib/catalan/doc/bibtex/catalan/exemples/caauda2.tex
@@ -0,0 +1,21 @@
+\documentclass{article}
+\usepackage[latin1]{inputenc}
+\usepackage[spanish,english,italian,catalan]{babel}
+\usepackage{natbib}
+\usepackage{url}
+\title{Exemple de l'estil bibliogrfic \textsf{caauda2}}
+\author{Robert Fuster}
+\date{15 de desembre de 2004}
+\begin{document}
+\maketitle
+Aquest s un exemple de l'estil bibliogrfic del tipus autor-data \textsf{caauda2}.
+
+Entre altres documents la bibliografia inclou dues entrades del mateix autor
+\citep{lamport2,biblamport}, el document electrnic~\citet{hyperlatex}
+i algun llibre de text, com ara~\citet{rbjcjmau}. Diversos documents
+\citep{biblamport, btxdoc,lamport2,vafus,jcccrf,liang} fan referncia al \TeX, al
+\LaTeX{} i al \textsc{Bib}\TeX.
+\nocite{*}
+\bibliographystyle{caauda2}
+\bibliography{exemples}
+\end{document}
diff --git a/biblio/bibtex/contrib/catalan/doc/bibtex/catalan/exemples/caauda3.tex b/biblio/bibtex/contrib/catalan/doc/bibtex/catalan/exemples/caauda3.tex
new file mode 100644
index 0000000000..f0ecb142ec
--- /dev/null
+++ b/biblio/bibtex/contrib/catalan/doc/bibtex/catalan/exemples/caauda3.tex
@@ -0,0 +1,24 @@
+\documentclass{article}
+\usepackage[latin1]{inputenc}
+\usepackage[spanish,english,italian,catalan]{babel}
+\usepackage{natbib}
+\usepackage{url}
+\bibpunct{(}{)}{;}{a}{:}{,} % Puntuacio en les citacions (veure natbib)
+\newcommand{\BIBannoteformat}{% Format de les anotacions
+ \small\slshape\textbf{Comentari: }}
+\title{Exemple de l'estil bibliogrfic \textsf{caauda3}}
+\author{Robert Fuster}
+\date{15 de desembre de 2004}
+\begin{document}
+\maketitle
+Aquest s un exemple de l'estil bibliogrfic del tipus autor-data \textsf{caauda3}.
+
+Entre altres documents la bibliografia inclou dues entrades del mateix autor
+\citep{lamport2,biblamport}, el document electrnic~\citet{hyperlatex}
+i algun llibre de text, com ara~\citet{rbjcjmau}. Diversos documents
+\citep{biblamport, btxdoc,lamport2,vafus,jcccrf,liang} fan referncia al \TeX, al
+\LaTeX{} i al \textsc{Bib}\TeX.
+\nocite{*}
+\bibliographystyle{caauda3}
+\bibliography{exemples}
+\end{document}
diff --git a/biblio/bibtex/contrib/catalan/doc/bibtex/catalan/exemples/caplain.tex b/biblio/bibtex/contrib/catalan/doc/bibtex/catalan/exemples/caplain.tex
new file mode 100644
index 0000000000..2bee8f3333
--- /dev/null
+++ b/biblio/bibtex/contrib/catalan/doc/bibtex/catalan/exemples/caplain.tex
@@ -0,0 +1,19 @@
+\documentclass{article}
+\usepackage[latin1]{inputenc}
+\usepackage[spanish,english,italian,catalan]{babel}
+\title{Exemple de l'estil bibliogrfic \textsf{caplain}}
+\author{Robert Fuster}
+\date{15 de desembre de 2004}
+\begin{document}
+\maketitle
+Aquest s un exemple de l'estil bibliogrfic \textsf{caplain}.
+
+Entre altres documents la bibliografia inclou dues entrades del mateix autor
+(\cite{lamport2,biblamport}), el document electrnic~\cite{hyperlatex}
+i algun llibre de text, com ara~\cite{rbjcjmau}. Diversos documents
+\cite{biblamport, btxdoc,lamport2,vafus,jcccrf,liang} fan referncia al \TeX, al
+\LaTeX{} i al \textsc{Bib}\TeX.
+\nocite{*}
+\bibliographystyle{caplain}
+\bibliography{exemples}
+\end{document}
diff --git a/biblio/bibtex/contrib/catalan/doc/bibtex/catalan/exemples/caunsrt.tex b/biblio/bibtex/contrib/catalan/doc/bibtex/catalan/exemples/caunsrt.tex
new file mode 100644
index 0000000000..f9d1804854
--- /dev/null
+++ b/biblio/bibtex/contrib/catalan/doc/bibtex/catalan/exemples/caunsrt.tex
@@ -0,0 +1,19 @@
+\documentclass{article}
+\usepackage[latin1]{inputenc}
+\usepackage[spanish,english,italian,catalan]{babel}
+\title{Exemple de l'estil bibliogrfic \textsf{caunsrt}}
+\author{Robert Fuster}
+\date{15 de desembre de 2004}
+\begin{document}
+\maketitle
+Aquest s un exemple de l'estil bibliogrfic \textsf{caunsrt}.
+
+Entre altres documents la bibliografia inclou dues entrades del mateix autor
+(\cite{lamport2,biblamport}), el document electrnic~\cite{hyperlatex}
+i algun llibre de text, com ara~\cite{rbjcjmau}. Diversos documents
+\cite{biblamport, btxdoc,lamport2,vafus,jcccrf,liang} fan referncia al \TeX, al
+\LaTeX{} i al \textsc{Bib}\TeX.
+\nocite{*}
+\bibliographystyle{caunsrt}
+\bibliography{exemples}
+\end{document}
diff --git a/biblio/bibtex/contrib/catalan/doc/bibtex/catalan/exemples/exemples.bib b/biblio/bibtex/contrib/catalan/doc/bibtex/catalan/exemples/exemples.bib
new file mode 100644
index 0000000000..18c2a216d3
--- /dev/null
+++ b/biblio/bibtex/contrib/catalan/doc/bibtex/catalan/exemples/exemples.bib
@@ -0,0 +1,204 @@
+FITXER 'EXEMPLES.BIB': EXEMPLE DE BASE DE DADES PER AL BibTeX
+ Robert Fuster, 23 de maig de 1998, 12 de novembre 2004, 15 de desembre 2004
+
+@STRING{upv = "Universitat Polit{\`e}cnica de Val{\`e}ncia"}
+
+@ARTICLE{vafus,
+ author = "Valiente Feruglio, Gabriel and Robert Fuster",
+ title = "Typesetting {C}atalan Texts with {\TeX}",
+ language = "english",
+ journal = "TUGBoat",
+ year = 1993,
+ volume = 14,
+ number = 3,
+ pages = "252--259",
+ month = sep,
+ annote = "Descripci{\'o} dels patrons de tall de paraula,
+ proposta de tractament de l'ela geminada i altres
+ q{\"u}estions relacionades amb l'{\'u}s del {\TeX}
+ en llengua catalana"}
+
+@BOOK{rbjcjmau,
+ author = "Rafael Bru and Joan Josep Climent and Josep Mas
+ and Ana Urbano",
+ title = "{\'A}lgebra {L}ineal",
+ language = "spanish",
+ publisher = "Servicio de Publicaciones de la " # upv,
+ year = 1993,
+ address = "Val{\`e}ncia",
+ isbn = "8477216304",
+ note = "Ref.: SPUPV, 712, 713",
+ annote = "Apunts d'{\`A}lgebra Lineal, enfocats
+ des d'un punt de vista matricial"}
+
+@BOOK{jinvdma,
+ editor = "Robert Fuster",
+ title = "Jornades d'Investigaci{\'o} i de foment
+ de la multidisciplinarietat",
+ language = "catalan",
+ publisher = "Servicio de Publicaciones de la " # upv,
+ year = 2000,
+ address = "Val{\`e}ncia",
+ note = "Ref.: SPUPV, 2275",
+ isbn = "847721896X"}
+
+@BOOKLET{jcccrf,
+ author = "Climent i Coloma, Joan Josep and Cristina Corral
+ and Robert Fuster",
+ title = "Introducci{\'o}n a la Preparaci{\'o}n de Textos
+ con {\LaTeX}",
+ language = "spanish",
+ address = "Departament de Matem{\`a}tica Aplicada, " # upv,
+ month = nov,
+ year = 1990,
+ howpublished = "Publicaci{\'o}n informal de libre
+ distribuci{\'o}n",
+ annote = "Breu introducci{\'o} al {\LaTeX} (versi{\'o} 2.08)"}
+
+@INBOOK{biblamport,
+ title = "Using {\textsc{Bib}\TeX}",
+ language = "english",
+ chapter = "4.3.1",
+ pages = "70--71",
+ type = "subsection",
+ annote = "Descripci{\'o} bastant completa de l'{\'u}s del
+ {\textsc{Bib}\TeX}",
+ crossref = "lamport2"}
+
+@BOOK{lamport2,
+ author = "Leslie Lamport",
+ title = "{\LaTeX} {A} Document Preparation System",
+ language = "english",
+ publisher = "Addison-Wesley",
+ year = "1994",
+ address = "Reading, Massachusetts",
+ edition = "Second",
+ isbn = "0201529831",
+ annote = "El manual oficial del {\LaTeX}. Aquesta segona
+ edici{\'o} en descriu la versi{\'o} {\LaTeXe}. Text d'obligada
+ lectura"}
+
+@INCOLLECTION{multiplexat,
+ author = "Esteban, Ramon and Reglero, Victor",
+ title = "Multiplexat especial de senyals",
+ language = "catalan",
+ crossref = "jinvdma",
+ pages = "103--109"}
+
+@INPROCEEDINGS{goluboverton,
+ author = "G. H. Golub and M. L. Overton",
+ title = "Convergence of a Two-Stage {R}ichardson Iterative
+ Procedure for Solving Systems of Linear Equations",
+ language = "english",
+ pages = "128--139",
+ crossref = "numanalprocNBC"}
+
+@MANUAL{hyperlatex,
+ title = "The Hiperlatex Manual",
+ language = "english",
+ author = "Otfried Cheong",
+ organization = "Institute of Information and Computing Sciences.
+ Utrecht University",
+ address = "Utrecht, the Netherlands ",
+ month = 12 # nov,
+ year = 2004,
+ url = "http://hyperlatex.sourceforge.net/html/hyperlatex.html"}
+
+@MASTERSTHESIS{siurana,
+ author = "Siurana Huete, Leonardo",
+ title = "Algoritmos {S}ist{\'o}licos para la resoluci{\'o}n de
+ {S}istemas de {E}cuaciones {L}ineales mediante
+ {M}{\'e}todos {I}terativos",
+ language = "spanish",
+ school = "Facultat d'Inform{\`a}tica, " # upv,
+ year = 1991,
+ address = "Val{\`e}ncia",
+ type = "Proyecto final de carrera",
+ month = jul}
+
+@MISC{ctan,
+ key = "CTAN",
+ title = "The Comprehensive {\TeX} Archive Network ({CTAN})",
+ language = "english",
+ url = {FTP: //ftp.dante.de/tex-archive},
+ annote = "{CTAN} {\'e}s una xarxa d'arxius on s'hi poden trobar
+ gaireb{\'e} tots els programes, utilitats, paquets...
+ relacionats amb el {\TeX}"}}
+
+@PHDTHESIS{liang,
+ author = "Frank Mark Liang",
+ title = "Word Hy-phen-a-tion by Com-pu-ter",
+ language = "english",
+ school = "Stanford University",
+ year = 1983,
+ address = "Stanford, California",
+ month = jun,
+ note = "Also avalable as Stanford University, Department of
+ Computer Science Report No. STAN-CS-83-977",
+ }
+
+@PROCEEDINGS{numanalprocNBC,
+ title = "Numerical Analisys (Proceedings of the Ninth Biennal
+ Conference), Dundee, Scotland, 1981",
+ language = "english",
+ year = 1982,
+ editor = "G. A. Watson",
+ number = 912,
+ series = "Lecture notes in Mathematics",
+ address = "New York",
+ publisher = "Springer Verlag"}
+
+@TECHREPORT{ccamjm,
+ author = "Cristina Corral and {\'A}ngeles Mart{\'\i}nez and
+ Josep Mas",
+ title = "Inplementaci{\'o}n de {P}recondicionadores {P}olinomiales
+ {P}aralelos en un {M}ultiprocesador con memoria
+ distribuida con {T}opolog{\'\i}a de {M}alla",
+ language = "spanish",
+ institution = "Departament de Matem{\`a}tica Aplicada, " # upv,
+ year = 1994,
+ number = 7,
+ address = "Val{\`e}ncia",
+ type = "Notes de recerca",
+ month = sep}
+
+@UNPUBLISHED{btxdoc,
+ author = "Oren Patashnik",
+ title = "{\textsc{Bib}\TeX}ing",
+ language = "english",
+ note = "Computer file included in the {\textsc{Bib}\TeX}
+ distribution",
+ month = "8~" # feb,
+ year = 1988,
+ annote = "Documentaci{\'o} per a tots els usuaris
+ del {\textsc{Bib}\TeX}. Descriu tots els registres i camps
+ i explica totes les q{\"u}estions de sintaxi"}
+
+ @ARTICLE{prodi,
+ author = "Romano Prodi",
+ title = "L'industria dopo l'euro",
+ language = "italian",
+ journal = "Rivista di economia e politica industriale",
+ year = 2002,
+ volume = 4,
+ pages = "252--259",
+ month = oct # "--" # dec,
+ note = "Publicaci{\'o} electr{\`o}nica",
+ issn = "00197416",
+ doi = "10.1430/8105",
+ annote = "Descripci{\'o} de l'escenari competitiu de
+ la ind{\'u}stria europea. En particular, analitza
+ les seues relacions amb els {EUA}, la {Xina} i
+ els pa{\"i}sos mediterranis"}
+
+@BOOK{pefu,
+ author = "Pedroche i Snchez, Francesc and Fullana i Alfonso, Mrius Josep",
+ title = "Fonaments d'lgebra lineal amb aplicacions i prctiques d'ordinador",
+ language = "catalan",
+ publisher = "Servei de Publicacions de la " # upv,
+ year = 1998,
+ address = "Val{\`e}ncia",
+ note = "Ref.: SPUPV, 98.3510",
+ isbn = "8477216037",
+ annote = "Un primer curs d'{\`A}lgebra Lineal, enfocat des d'un
+ punt de vista matricial. Inclou algorismes en {M}atlab"} \ No newline at end of file
diff --git a/biblio/bibtex/contrib/chem-journal/jcc.bst b/biblio/bibtex/contrib/chem-journal/jcc.bst
new file mode 100644
index 0000000000..3a7a60c2e4
--- /dev/null
+++ b/biblio/bibtex/contrib/chem-journal/jcc.bst
@@ -0,0 +1,997 @@
+% BibTeX bibliography style `jcc2005' for J. Comp. Chem.
+% 03 May 05 A. Cervellino
+% no output of 'title' for 'article', 'book', 'inbook', 'incollection'
+% no output of 'note' except in 'unpublished'
+% initials after the name, semicolons to separate authors,
+% etc. usw.
+%
+% for BibTeX versions 0.99a or later, LaTeX2e.
+% Copyright under Latex Project Public License (LPPL)
+% Copying of this file is authorized only if either
+% (1) you make absolutely no changes to your copy, including name, or
+% (2) if you do make changes, you name it something other than
+% btxbst.doc, plain.bst, unsrt.bst, alpha.bst, and abbrv.bst.
+% This restriction helps ensure that all standard styles are identical.
+%
+
+ENTRY
+ { address
+ author
+ booktitle
+ chapter
+ edition
+ editor
+ howpublished
+ institution
+ journal
+ key
+ month
+ note
+ number
+ organization
+ pages
+ publisher
+ school
+ series
+ title
+ type
+ volume
+ year
+ }
+ {}
+ { label }
+
+INTEGERS { output.state before.all mid.sentence after.sentence after.block after.item author.or.editor }
+
+FUNCTION {init.state.consts}
+{ #0 'before.all :=
+ #1 'mid.sentence :=
+ #2 'after.sentence :=
+ #3 'after.block :=
+ #4 'after.item :=
+}
+
+FUNCTION {add.semicolon}
+{ duplicate$
+ #-1 #1 substring$ "}" =
+ { #-2 #1024 substring$ ";} " * }
+ { "; " * }
+ if$
+}
+
+STRINGS { s t }
+
+FUNCTION {output.nonnull}
+{ 's :=
+ output.state mid.sentence =
+ { ", " * write$ }
+ { output.state after.block =
+ { add.semicolon write$
+ newline$
+ "\newblock " write$
+ }
+ { output.state before.all =
+ 'write$
+ { output.state after.item =
+ { " " * write$ }
+ { add.period$ " " * write$ }
+ if$
+ }
+ if$
+ }
+ if$
+ mid.sentence 'output.state :=
+ }
+ if$
+ s
+}
+
+FUNCTION {output}
+{ duplicate$ empty$
+ 'pop$
+ 'output.nonnull
+ if$
+}
+
+FUNCTION {output.check}
+{ 't :=
+ duplicate$ empty$
+ { pop$ "empty " t * " in " * cite$ * warning$ }
+ 'output.nonnull
+ if$
+}
+
+FUNCTION {output.bibitem}
+{ newline$
+ "\bibitem{" write$
+ cite$ write$
+ "}" write$
+ newline$
+ ""
+ before.all 'output.state :=
+}
+
+FUNCTION {fin.entry}
+{ add.period$
+ write$
+ newline$
+}
+
+FUNCTION {new.block}
+{ output.state before.all =
+ 'skip$
+ { after.block 'output.state := }
+ if$
+}
+
+FUNCTION {new.sentence}
+{ output.state after.block =
+ 'skip$
+ { output.state before.all =
+ 'skip$
+ { after.sentence 'output.state := }
+ if$
+ }
+ if$
+}
+
+FUNCTION {new.item}
+{ duplicate$ empty$
+ { skip$ }
+ { output.state mid.sentence =
+ { after.item 'output.state := }
+ { skip$ }
+ if$
+ }
+ if$
+}
+
+FUNCTION {not}
+{ { #0 }
+ { #1 }
+ if$
+}
+
+FUNCTION {and}
+{ 'skip$
+ { pop$ #0 }
+ if$
+}
+
+FUNCTION {or}
+{ { pop$ #1 }
+ 'skip$
+ if$
+}
+
+FUNCTION {new.block.checka}
+{ empty$
+ 'skip$
+ 'new.block
+ if$
+}
+
+FUNCTION {new.block.checkb}
+{ empty$
+ swap$ empty$
+ and
+ 'skip$
+ 'new.block
+ if$
+}
+
+FUNCTION {new.sentence.checka}
+{ empty$
+ 'skip$
+ 'new.sentence
+ if$
+}
+
+FUNCTION {new.sentence.checkb}
+{ empty$
+ swap$ empty$
+ and
+ 'skip$
+ 'new.sentence
+ if$
+}
+
+FUNCTION {new.item.checka}
+{ empty$
+ 'skip$
+ 'new.item
+ if$
+}
+
+FUNCTION {field.or.null}
+{ duplicate$ empty$
+ { pop$ "" }
+ 'skip$
+ if$
+}
+
+FUNCTION {emphasize}
+{ duplicate$ empty$
+ { pop$ "" }
+ { "{\em " swap$ * "}" * }
+ if$
+}
+
+FUNCTION {boldface}
+{ duplicate$ empty$
+ { pop$ "" }
+ { "{\bf " swap$ * "}" * }
+ if$
+}
+
+FUNCTION {paren}
+{ duplicate$ empty$
+ { pop$ "" }
+ { "(" swap$ * ")" * }
+ if$
+}
+
+FUNCTION {comma}
+{ duplicate$ empty$
+ { pop$ "" }
+ { swap$ * "," * }
+ if$
+}
+
+INTEGERS { nameptr namesleft numnames }
+
+FUNCTION {format.names}
+{ 's :=
+ #1 'nameptr :=
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ { s nameptr "{vv~}{ll,~}{jj,~}{f.}" format.name$ 't :=
+ nameptr #1 >
+ { namesleft #1 >
+ { "; " * t * }
+ { numnames #2 >
+ { "" * }
+ 'skip$
+ if$
+ t "others" =
+ { " et~al." * }
+ { " and " * t * }
+ if$
+ }
+ if$
+ }
+ 't
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+}
+
+FUNCTION {format.authors}
+{ author empty$
+ { "" }
+ { #1 'author.or.editor :=
+ author format.names }
+ if$
+}
+
+FUNCTION {format.editors}
+{ editor empty$
+ { "" }
+ { #2 'author.or.editor :=
+ editor format.names
+ editor num.names$ #1 >
+ { ", Eds." * }
+ { ", Ed." * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.title}
+{ title empty$
+ { "" }
+ { title "t" change.case$ }
+ if$
+}
+
+FUNCTION {n.dashify}
+{ 't :=
+ ""
+ { t empty$ not }
+ { t #1 #1 substring$ "-" =
+ { t #1 #2 substring$ "--" = not
+ { "--" *
+ t #2 global.max$ substring$ 't :=
+ }
+ { { t #1 #1 substring$ "-" = }
+ { "-" *
+ t #2 global.max$ substring$ 't :=
+ }
+ while$
+ }
+ if$
+ }
+ { t #1 #1 substring$ *
+ t #2 global.max$ substring$ 't :=
+ }
+ if$
+ }
+ while$
+}
+
+FUNCTION {format.date}
+{ year empty$
+ { month empty$
+ { "" }
+ { "there's a month but no year in " cite$ * warning$
+ month
+ }
+ if$
+ }
+ { month empty$
+ { year }
+ { month " " * year paren }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.bdate}
+{ year empty$
+ { "there's no year in " cite$ * warning$ }
+ 'year
+ if$
+}
+
+FUNCTION {format.btitle}
+{ title emphasize
+}
+
+FUNCTION {tie.or.space.connect}
+{ duplicate$ text.length$ #3 <
+ { "~" }
+ { " " }
+ if$
+ swap$ * *
+}
+
+FUNCTION {either.or.check}
+{ empty$
+ 'pop$
+ { "can't use both " swap$ * " fields in " * cite$ * warning$ }
+ if$
+}
+
+FUNCTION {format.bvolume}
+{ volume empty$
+ { "" }
+ { "Vol. " volume tie.or.space.connect
+ series empty$
+ 'skip$
+ { " of " * series emphasize * }
+ if$
+ "volume and number" number either.or.check
+ }
+ if$
+}
+
+FUNCTION {format.number.series}
+{ volume empty$
+ { number empty$
+ { series field.or.null }
+ { output.state mid.sentence =
+ { "number" }
+ { "Number" }
+ if$
+ number tie.or.space.connect
+ series empty$
+ { "there's a number but no series in " cite$ * warning$ }
+ { " in " * series * }
+ if$
+ }
+ if$
+ }
+ { "" }
+ if$
+}
+
+FUNCTION {format.edition}
+{ edition empty$
+ { "" }
+ { output.state mid.sentence =
+ { edition "l" change.case$ " ed." * }
+ { edition "t" change.case$ " ed." * }
+ if$
+ }
+ if$
+}
+
+INTEGERS { multiresult }
+
+FUNCTION {multi.page.check}
+{ 't :=
+ #0 'multiresult :=
+ { multiresult not
+ t empty$ not
+ and
+ }
+ { t #1 #1 substring$
+ duplicate$ "-" =
+ swap$ duplicate$ "," =
+ swap$ "+" =
+ or or
+ { #1 'multiresult := }
+ { t #2 global.max$ substring$ 't := }
+ if$
+ }
+ while$
+ multiresult
+}
+
+FUNCTION {format.pages}
+{ pages empty$
+ { "" }
+ { pages multi.page.check
+ { "pages" pages n.dashify tie.or.space.connect }
+ { "page" pages tie.or.space.connect }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.vol.num.pages}
+{ volume boldface field.or.null
+ number empty$
+ 'skip$
+ { "(" number * ")" * *
+ volume empty$
+ { "there's a number but no volume in " cite$ * warning$ }
+ 'skip$
+ if$
+ }
+ if$
+ pages empty$
+ 'skip$
+ { duplicate$ empty$
+ { pop$ format.pages }
+ { ", " * pages n.dashify * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.chapter.pages}
+{ chapter empty$
+ 'format.pages
+ { type empty$
+ { "chapter" }
+ { type "l" change.case$ }
+ if$
+ chapter tie.or.space.connect
+ pages empty$
+ 'skip$
+ { ", " * format.pages * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.in.ed.booktitle}
+{ booktitle empty$
+ { "" }
+ { editor empty$
+ { "In " booktitle emphasize * }
+ { "In " format.editors * ", " * booktitle emphasize * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.in.booktitle.ed}
+{ booktitle empty$
+ { "" }
+ { editor empty$
+ { "In " booktitle emphasize * }
+ { "In " booktitle emphasize * ", " * format.editors * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.pub.address}
+{ publisher empty$
+ { "" }
+ { address empty$
+ { publisher }
+ { publisher ", " * address *}
+ if$
+ }
+ if$
+}
+
+FUNCTION {empty.misc.check}
+{ author empty$ title empty$ howpublished empty$
+ month empty$ year empty$ note empty$
+ and and and and and
+ { "all relevant fields are empty in " cite$ * warning$ }
+ 'skip$
+ if$
+}
+
+FUNCTION {format.thesis.type}
+{ type empty$
+ 'skip$
+ { pop$
+ type "t" change.case$
+ }
+ if$
+}
+
+FUNCTION {format.tr.number}
+{ type empty$
+ { "Technical Report" }
+ 'type
+ if$
+ number empty$
+ { "t" change.case$ }
+ { number tie.or.space.connect }
+ if$
+}
+
+FUNCTION {format.article.crossref}
+{ key empty$
+ { journal empty$
+ { "need key or journal for " cite$ * " to crossref " * crossref *
+ warning$
+ ""
+ }
+ { "In {\em " journal * "\/}" * }
+ if$
+ }
+ { "In " key * }
+ if$
+ " \cite{" * crossref * "}" *
+}
+
+FUNCTION {format.crossref.editor}
+{ editor #1 "{vv~}{ll}" format.name$
+ editor num.names$ duplicate$
+ #2 >
+ { pop$ " et~al." * }
+ { #2 <
+ 'skip$
+ { editor #2 "{ff }{vv }{ll}{ jj}" format.name$ "others" =
+ { " et~al." * }
+ { " and " * editor #2 "{vv~}{ll}" format.name$ * }
+ if$
+ }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.book.crossref}
+{ volume empty$
+ { "empty volume in " cite$ * "'s crossref of " * crossref * warning$
+ "In "
+ }
+ { "Volume" volume tie.or.space.connect
+ " of " *
+ }
+ if$
+ editor empty$
+ editor field.or.null author field.or.null =
+ or
+ { key empty$
+ { series empty$
+ { "need editor, key, or series for " cite$ * " to crossref " *
+ crossref * warning$
+ "" *
+ }
+ { "{\em " * series * "\/}" * }
+ if$
+ }
+ { key * }
+ if$
+ }
+ { format.crossref.editor * }
+ if$
+ " \cite{" * crossref * "}" *
+}
+
+FUNCTION {format.incoll.inproc.crossref}
+{ editor empty$
+ editor field.or.null author field.or.null =
+ or
+ { key empty$
+ { booktitle empty$
+ { "need editor, key, or booktitle for " cite$ * " to crossref " *
+ crossref * warning$
+ ""
+ }
+ { "In {\em " booktitle * "\/}" * }
+ if$
+ }
+ { "In " key * }
+ if$
+ }
+ { "In " format.crossref.editor * }
+ if$
+ " \cite{" * crossref * "}" *
+}
+
+FUNCTION {article}
+{ output.bibitem
+ format.authors "author" output.check
+ crossref missing$
+ { journal emphasize "journal" output.check
+ format.date "year" output.check
+ format.vol.num.pages output new.item
+ }
+ { format.article.crossref output.nonnull
+ format.pages output
+ }
+ if$
+ fin.entry
+}
+
+FUNCTION {book}
+{ output.bibitem
+ author empty$
+ { format.editors "author and editor" output.check }
+ { format.authors output.nonnull
+ crossref missing$
+ { "author and editor" editor either.or.check }
+ 'skip$
+ if$
+ }
+ if$
+ format.btitle "title" output.check
+ crossref missing$
+ { format.bvolume output
+ format.number.series output
+ format.pub.address "publisher" output.check
+ }
+ { format.book.crossref output.nonnull }
+ if$
+ format.edition output
+ format.bdate "year" output.check
+ new.block
+ fin.entry
+}
+
+FUNCTION {booklet}
+{ output.bibitem
+ format.authors output new.item
+ format.title "title" output.check
+ howpublished address new.block.checkb
+ howpublished output
+ address output
+ format.date output
+ new.block
+ fin.entry
+}
+
+FUNCTION {inbook}
+{ output.bibitem
+ author empty$
+ { format.editors "author and editor" output.check }
+ { format.authors output.nonnull }
+ if$
+ format.in.booktitle.ed "title" output.check
+ crossref missing$
+ { format.pub.address "publisher" output.check
+ format.bdate "year" output.check
+ new.block
+ format.bvolume output
+ new.block
+ format.chapter.pages "chapter and pages" output.check
+ new.block
+ format.number.series output
+ }
+ { format.chapter.pages "chapter and pages" output.check
+ new.block
+ format.book.crossref output.nonnull
+ }
+ if$
+ format.edition output
+ new.block
+ fin.entry
+}
+
+FUNCTION {incollection}
+{ output.bibitem
+ format.authors "author" output.check new.item
+ crossref missing$
+ { format.in.booktitle.ed "booktitle" output.check
+ format.bvolume output
+ format.number.series output
+ new.block
+ format.pub.address "publisher" output.check
+ format.edition output
+ format.bdate "year" output.check
+ new.block
+ format.chapter.pages output
+ }
+ { format.incoll.inproc.crossref output.nonnull
+ format.chapter.pages output
+ }
+ if$
+ new.block
+ fin.entry
+}
+
+FUNCTION {inproceedings}
+{ output.bibitem
+ format.authors "author" output.check new.item
+ crossref missing$
+ { format.in.ed.booktitle "booktitle" output.check
+ format.bvolume output
+ format.number.series output
+ format.pages output
+ address empty$
+ { organization publisher new.sentence.checkb
+ organization output
+ publisher output
+ format.bdate "year" output.check
+ }
+ { address output.nonnull
+ format.bdate "year" output.check
+ new.sentence
+ organization output
+ publisher output
+ }
+ if$
+ }
+ { format.incoll.inproc.crossref output.nonnull
+ format.pages output
+ }
+ if$
+ new.block
+ fin.entry
+}
+
+FUNCTION {conference} { inproceedings }
+
+FUNCTION {manual}
+{ output.bibitem
+ format.title "title" output.check new.sentence
+ author empty$
+ { organization empty$
+ 'skip$
+ { organization output.nonnull
+ address output
+ }
+ if$
+ }
+ { format.authors output.nonnull new.item }
+ if$
+ author empty$
+ { organization empty$
+ { address new.block.checka
+ address output
+ }
+ 'skip$
+ if$
+ }
+ { organization address new.block.checkb
+ organization output
+ address output
+ }
+ if$
+ format.edition output
+ format.date output
+ new.block
+ fin.entry
+}
+
+FUNCTION {mastersthesis}
+{ output.bibitem
+ format.authors "author" output.check new.item
+ format.title "title" output.check new.item
+ "Master's thesis" format.thesis.type output.nonnull
+ school "school" output.check
+ address output
+ format.date "year" output.check
+ new.block
+ fin.entry
+}
+
+FUNCTION {misc}
+{ output.bibitem
+ format.authors output
+ format.title output
+ howpublished new.item.checka
+ howpublished output
+ format.bdate output
+ new.block
+ fin.entry
+ empty.misc.check
+}
+
+FUNCTION {phdthesis}
+{ output.bibitem
+ format.authors "author" output.check new.item
+ format.btitle "title" output.check new.item
+ "PhD thesis" format.thesis.type output.nonnull
+ school "school" output.check
+ address output
+ format.date "year" output.check
+ new.block
+ fin.entry
+}
+
+FUNCTION {proceedings}
+{ output.bibitem
+ editor empty$
+ { organization output }
+ { format.editors output.nonnull new.item }
+ if$
+ new.block
+ format.btitle "title" output.check
+ format.bvolume output
+ format.number.series output
+ address empty$
+ { editor empty$
+ { publisher new.sentence.checka }
+ { organization publisher new.sentence.checkb
+ organization output
+ }
+ if$
+ publisher output
+ format.date "year" output.check
+ }
+ { address output.nonnull
+ format.date "year" output.check
+ new.sentence
+ editor empty$
+ 'skip$
+ { organization output }
+ if$
+ publisher output
+ }
+ if$
+ new.block
+ fin.entry
+}
+
+FUNCTION {techreport}
+{ output.bibitem
+ format.authors "author" output.check new.item
+ format.title "title" output.check new.item
+ format.tr.number output.nonnull
+ institution "institution" output.check
+ address output
+ format.date "year" output.check
+ new.block
+ fin.entry
+}
+
+FUNCTION {unpublished}
+{ output.bibitem
+ format.authors "author" output.check new.item
+% format.title "title" output.check new.item
+ note "note" output.check
+ format.date output
+ fin.entry
+}
+
+FUNCTION {default.type} { misc }
+
+MACRO {jan} {"January"}
+
+MACRO {feb} {"February"}
+
+MACRO {mar} {"March"}
+
+MACRO {apr} {"April"}
+
+MACRO {may} {"May"}
+
+MACRO {jun} {"June"}
+
+MACRO {jul} {"July"}
+
+MACRO {aug} {"August"}
+
+MACRO {sep} {"September"}
+
+MACRO {oct} {"October"}
+
+MACRO {nov} {"November"}
+
+MACRO {dec} {"December"}
+
+MACRO {bbrc} {"Biochem. Biophys. Res. Commun."}
+
+MACRO {jacs} {"J. Amer. Chem. Soc."}
+
+MACRO {jbc} {"J. Biol. Chem."}
+
+MACRO {pnas} {"Proc. Natl. Acad. Sci."}
+
+MACRO {jmb} {"J. Mol. Biol."}
+
+MACRO {embo} {"EMBO J."}
+
+MACRO {tibs} {"Trends Biochem. Sci."}
+
+MACRO {protsfg} {"Proteins: Struct. Func. Gen."}
+
+MACRO {ieeetcad}
+ {"IEEE Transactions on Computer-Aided Design of Integrated Circuits"}
+
+MACRO {ipl} {"Information Processing Letters"}
+
+MACRO {jacm} {"Journal of the ACM"}
+
+MACRO {jcss} {"Journal of Computer and System Sciences"}
+
+MACRO {scp} {"Science of Computer Programming"}
+
+MACRO {sicomp} {"SIAM Journal on Computing"}
+
+MACRO {tocs} {"ACM Transactions on Computer Systems"}
+
+MACRO {tods} {"ACM Transactions on Database Systems"}
+
+MACRO {tog} {"ACM Transactions on Graphics"}
+
+MACRO {toms} {"ACM Transactions on Mathematical Software"}
+
+MACRO {toois} {"ACM Transactions on Office Information Systems"}
+
+MACRO {toplas} {"ACM Transactions on Programming Languages and Systems"}
+
+MACRO {tcs} {"Theoretical Computer Science"}
+
+READ
+
+STRINGS { longest.label }
+
+INTEGERS { number.label longest.label.width }
+
+FUNCTION {initialize.longest.label}
+{ "" 'longest.label :=
+ #1 'number.label :=
+ #0 'longest.label.width :=
+}
+
+FUNCTION {longest.label.pass}
+{ number.label int.to.str$ 'label :=
+ number.label #1 + 'number.label :=
+ label width$ longest.label.width >
+ { label 'longest.label :=
+ label width$ 'longest.label.width :=
+ }
+ 'skip$
+ if$
+}
+
+EXECUTE {initialize.longest.label}
+
+ITERATE {longest.label.pass}
+
+FUNCTION {begin.bib}
+{ preamble$ empty$
+ 'skip$
+ { preamble$ write$ newline$ }
+ if$
+ "\begin{thebibliography}{" longest.label * "}" * write$ newline$
+}
+
+EXECUTE {begin.bib}
+
+EXECUTE {init.state.consts}
+
+ITERATE {call.type$}
+
+FUNCTION {end.bib}
+{ newline$
+ "\end{thebibliography}" write$ newline$
+}
+
+EXECUTE {end.bib}
diff --git a/biblio/bibtex/contrib/chem-journal/jpc.bst b/biblio/bibtex/contrib/chem-journal/jpc.bst
new file mode 100644
index 0000000000..66f83d5a89
--- /dev/null
+++ b/biblio/bibtex/contrib/chem-journal/jpc.bst
@@ -0,0 +1,990 @@
+% BibTeX bibliography style `jpc' for J. Phys. Chem.
+% 8/9/93 Joerg-R. Hill
+% no output of 'title' for 'article', 'book', 'inbook', 'incollection'
+% no output of 'note' except in 'unpublished'
+%
+% version 0.99a for BibTeX versions 0.99a or later, LaTeX version 2.09.
+% Copyright (C) 1985, all rights reserved.
+% Copying of this file is authorized only if either
+% (1) you make absolutely no changes to your copy, including name, or
+% (2) if you do make changes, you name it something other than
+% btxbst.doc, plain.bst, unsrt.bst, alpha.bst, and abbrv.bst.
+% This restriction helps ensure that all standard styles are identical.
+% The file btxbst.doc has the documentation for this style.
+%
+% Fixed article, book references 11/10/92---CLF
+
+ENTRY
+ { address
+ author
+ booktitle
+ chapter
+ edition
+ editor
+ howpublished
+ institution
+ journal
+ key
+ month
+ note
+ number
+ organization
+ pages
+ publisher
+ school
+ series
+ title
+ type
+ volume
+ year
+ }
+ {}
+ { label }
+
+INTEGERS { output.state before.all mid.sentence after.sentence after.block after.item author.or.editor }
+
+FUNCTION {init.state.consts}
+{ #0 'before.all :=
+ #1 'mid.sentence :=
+ #2 'after.sentence :=
+ #3 'after.block :=
+ #4 'after.item :=
+}
+
+FUNCTION {add.semicolon}
+{ duplicate$
+ #-1 #1 substring$ "}" =
+ { #-2 #1024 substring$ ";} " * }
+ { "; " * }
+ if$
+}
+
+STRINGS { s t }
+
+FUNCTION {output.nonnull}
+{ 's :=
+ output.state mid.sentence =
+ { ", " * write$ }
+ { output.state after.block =
+ { add.semicolon write$
+ newline$
+ "\newblock " write$
+ }
+ { output.state before.all =
+ 'write$
+ { output.state after.item =
+ { " " * write$ }
+ { add.period$ " " * write$ }
+ if$
+ }
+ if$
+ }
+ if$
+ mid.sentence 'output.state :=
+ }
+ if$
+ s
+}
+
+FUNCTION {output}
+{ duplicate$ empty$
+ 'pop$
+ 'output.nonnull
+ if$
+}
+
+FUNCTION {output.check}
+{ 't :=
+ duplicate$ empty$
+ { pop$ "empty " t * " in " * cite$ * warning$ }
+ 'output.nonnull
+ if$
+}
+
+FUNCTION {output.bibitem}
+{ newline$
+ "\bibitem{" write$
+ cite$ write$
+ "}" write$
+ newline$
+ ""
+ before.all 'output.state :=
+}
+
+FUNCTION {fin.entry}
+{ add.period$
+ write$
+ newline$
+}
+
+FUNCTION {new.block}
+{ output.state before.all =
+ 'skip$
+ { after.block 'output.state := }
+ if$
+}
+
+FUNCTION {new.sentence}
+{ output.state after.block =
+ 'skip$
+ { output.state before.all =
+ 'skip$
+ { after.sentence 'output.state := }
+ if$
+ }
+ if$
+}
+
+FUNCTION {new.item}
+{ duplicate$ empty$
+ { skip$ }
+ { output.state mid.sentence =
+ { after.item 'output.state := }
+ { skip$ }
+ if$
+ }
+ if$
+}
+
+FUNCTION {not}
+{ { #0 }
+ { #1 }
+ if$
+}
+
+FUNCTION {and}
+{ 'skip$
+ { pop$ #0 }
+ if$
+}
+
+FUNCTION {or}
+{ { pop$ #1 }
+ 'skip$
+ if$
+}
+
+FUNCTION {new.block.checka}
+{ empty$
+ 'skip$
+ 'new.block
+ if$
+}
+
+FUNCTION {new.block.checkb}
+{ empty$
+ swap$ empty$
+ and
+ 'skip$
+ 'new.block
+ if$
+}
+
+FUNCTION {new.sentence.checka}
+{ empty$
+ 'skip$
+ 'new.sentence
+ if$
+}
+
+FUNCTION {new.sentence.checkb}
+{ empty$
+ swap$ empty$
+ and
+ 'skip$
+ 'new.sentence
+ if$
+}
+
+FUNCTION {new.item.checka}
+{ empty$
+ 'skip$
+ 'new.item
+ if$
+}
+
+FUNCTION {field.or.null}
+{ duplicate$ empty$
+ { pop$ "" }
+ 'skip$
+ if$
+}
+
+FUNCTION {emphasize}
+{ duplicate$ empty$
+ { pop$ "" }
+ { "{\em " swap$ * "}" * }
+ if$
+}
+
+FUNCTION {boldface}
+{ duplicate$ empty$
+ { pop$ "" }
+ { "{\bf " swap$ * "}" * }
+ if$
+}
+
+INTEGERS { nameptr namesleft numnames }
+
+FUNCTION {format.names}
+{ 's :=
+ #1 'nameptr :=
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ { s nameptr "{vv~}{ll}{, jj}{, f}." format.name$ 't :=
+ nameptr #1 >
+ { namesleft #1 >
+ { author.or.editor #1 =
+ { "; " * t * }
+ { ", " * t * }
+ if$
+ }
+ { t "others" =
+ { " et~al." * }
+ { author.or.editor #1 =
+ { "; " * t * }
+ { ", " * t * }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ 't
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+}
+
+FUNCTION {format.authors}
+{ author empty$
+ { "" }
+ { #1 'author.or.editor :=
+ author format.names }
+ if$
+}
+
+FUNCTION {format.editors}
+{ editor empty$
+ { "" }
+ { #2 'author.or.editor :=
+ editor format.names
+ editor num.names$ #1 >
+ { ", Eds." * }
+ { ", Ed." * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.title}
+{ title empty$
+ { "" }
+ { title "t" change.case$ }
+ if$
+}
+
+FUNCTION {n.dashify}
+{ 't :=
+ ""
+ { t empty$ not }
+ { t #1 #1 substring$ "-" =
+ { t #1 #2 substring$ "--" = not
+ { "--" *
+ t #2 global.max$ substring$ 't :=
+ }
+ { { t #1 #1 substring$ "-" = }
+ { "-" *
+ t #2 global.max$ substring$ 't :=
+ }
+ while$
+ }
+ if$
+ }
+ { t #1 #1 substring$ *
+ t #2 global.max$ substring$ 't :=
+ }
+ if$
+ }
+ while$
+}
+
+FUNCTION {format.date}
+{ year empty$
+ { month empty$
+ { "" }
+ { "there's a month but no year in " cite$ * warning$
+ month
+ }
+ if$
+ }
+ { month empty$
+ { year boldface }
+ { month " " * year boldface }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.bdate}
+{ year empty$
+ { "there's no year in " cite$ * warning$ }
+ 'year
+ if$
+}
+
+FUNCTION {format.btitle}
+{ title emphasize
+}
+
+FUNCTION {tie.or.space.connect}
+{ duplicate$ text.length$ #3 <
+ { "~" }
+ { " " }
+ if$
+ swap$ * *
+}
+
+FUNCTION {either.or.check}
+{ empty$
+ 'pop$
+ { "can't use both " swap$ * " fields in " * cite$ * warning$ }
+ if$
+}
+
+FUNCTION {format.bvolume}
+{ volume empty$
+ { "" }
+ { "Vol. " volume tie.or.space.connect
+ series empty$
+ 'skip$
+ { " of " * series emphasize * }
+ if$
+ "volume and number" number either.or.check
+ }
+ if$
+}
+
+FUNCTION {format.number.series}
+{ volume empty$
+ { number empty$
+ { series field.or.null }
+ { output.state mid.sentence =
+ { "number" }
+ { "Number" }
+ if$
+ number tie.or.space.connect
+ series empty$
+ { "there's a number but no series in " cite$ * warning$ }
+ { " in " * series * }
+ if$
+ }
+ if$
+ }
+ { "" }
+ if$
+}
+
+FUNCTION {format.edition}
+{ edition empty$
+ { "" }
+ { output.state mid.sentence =
+ { edition "l" change.case$ " ed." * }
+ { edition "t" change.case$ " ed." * }
+ if$
+ }
+ if$
+}
+
+INTEGERS { multiresult }
+
+FUNCTION {multi.page.check}
+{ 't :=
+ #0 'multiresult :=
+ { multiresult not
+ t empty$ not
+ and
+ }
+ { t #1 #1 substring$
+ duplicate$ "-" =
+ swap$ duplicate$ "," =
+ swap$ "+" =
+ or or
+ { #1 'multiresult := }
+ { t #2 global.max$ substring$ 't := }
+ if$
+ }
+ while$
+ multiresult
+}
+
+FUNCTION {format.pages}
+{ pages empty$
+ { "" }
+ { pages multi.page.check
+ { "pages" pages n.dashify tie.or.space.connect }
+ { "page" pages tie.or.space.connect }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.vol.num.pages}
+{ volume emphasize field.or.null
+ number empty$
+ 'skip$
+ { "(" number * ")" * *
+ volume empty$
+ { "there's a number but no volume in " cite$ * warning$ }
+ 'skip$
+ if$
+ }
+ if$
+ pages empty$
+ 'skip$
+ { duplicate$ empty$
+ { pop$ format.pages }
+ { ", " * pages n.dashify * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.chapter.pages}
+{ chapter empty$
+ 'format.pages
+ { type empty$
+ { "chapter" }
+ { type "l" change.case$ }
+ if$
+ chapter tie.or.space.connect
+ pages empty$
+ 'skip$
+ { ", " * format.pages * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.in.ed.booktitle}
+{ booktitle empty$
+ { "" }
+ { editor empty$
+ { "In " booktitle emphasize * }
+ { "In " format.editors * ", " * booktitle emphasize * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.in.booktitle.ed}
+{ booktitle empty$
+ { "" }
+ { editor empty$
+ { "In " booktitle emphasize * }
+ { "In " booktitle emphasize * "; " * format.editors * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.pub.address}
+{ publisher empty$
+ { "" }
+ { address empty$
+ { publisher }
+ { publisher ": " * address *}
+ if$
+ }
+ if$
+}
+
+FUNCTION {empty.misc.check}
+{ author empty$ title empty$ howpublished empty$
+ month empty$ year empty$ note empty$
+ and and and and and
+ { "all relevant fields are empty in " cite$ * warning$ }
+ 'skip$
+ if$
+}
+
+FUNCTION {format.thesis.type}
+{ type empty$
+ 'skip$
+ { pop$
+ type "t" change.case$
+ }
+ if$
+}
+
+FUNCTION {format.tr.number}
+{ type empty$
+ { "Technical Report" }
+ 'type
+ if$
+ number empty$
+ { "t" change.case$ }
+ { number tie.or.space.connect }
+ if$
+}
+
+FUNCTION {format.article.crossref}
+{ key empty$
+ { journal empty$
+ { "need key or journal for " cite$ * " to crossref " * crossref *
+ warning$
+ ""
+ }
+ { "In {\em " journal * "\/}" * }
+ if$
+ }
+ { "In " key * }
+ if$
+ " \cite{" * crossref * "}" *
+}
+
+FUNCTION {format.crossref.editor}
+{ editor #1 "{vv~}{ll}" format.name$
+ editor num.names$ duplicate$
+ #2 >
+ { pop$ " et~al." * }
+ { #2 <
+ 'skip$
+ { editor #2 "{ff }{vv }{ll}{ jj}" format.name$ "others" =
+ { " et~al." * }
+ { " and " * editor #2 "{vv~}{ll}" format.name$ * }
+ if$
+ }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.book.crossref}
+{ volume empty$
+ { "empty volume in " cite$ * "'s crossref of " * crossref * warning$
+ "In "
+ }
+ { "Volume" volume tie.or.space.connect
+ " of " *
+ }
+ if$
+ editor empty$
+ editor field.or.null author field.or.null =
+ or
+ { key empty$
+ { series empty$
+ { "need editor, key, or series for " cite$ * " to crossref " *
+ crossref * warning$
+ "" *
+ }
+ { "{\em " * series * "\/}" * }
+ if$
+ }
+ { key * }
+ if$
+ }
+ { format.crossref.editor * }
+ if$
+ " \cite{" * crossref * "}" *
+}
+
+FUNCTION {format.incoll.inproc.crossref}
+{ editor empty$
+ editor field.or.null author field.or.null =
+ or
+ { key empty$
+ { booktitle empty$
+ { "need editor, key, or booktitle for " cite$ * " to crossref " *
+ crossref * warning$
+ ""
+ }
+ { "In {\em " booktitle * "\/}" * }
+ if$
+ }
+ { "In " key * }
+ if$
+ }
+ { "In " format.crossref.editor * }
+ if$
+ " \cite{" * crossref * "}" *
+}
+
+FUNCTION {article}
+{ output.bibitem
+ format.authors "author" output.check new.item
+ crossref missing$
+ { journal emphasize "journal" output.check new.item
+ format.date "year" output.check
+ format.vol.num.pages output
+ }
+ { format.article.crossref output.nonnull
+ format.pages output
+ }
+ if$
+ fin.entry
+}
+
+FUNCTION {book}
+{ output.bibitem
+ author empty$
+ { format.editors "author and editor" output.check new.item }
+ { format.authors output.nonnull new.item
+ crossref missing$
+ { "author and editor" editor either.or.check }
+ 'skip$
+ if$
+ }
+ if$
+ format.btitle "title" output.check
+ crossref missing$
+ { format.bvolume output
+ format.number.series output
+ new.block
+ format.pub.address "publisher" output.check
+ }
+ { format.book.crossref output.nonnull }
+ if$
+ format.edition output
+ format.bdate "year" output.check
+ new.block
+ fin.entry
+}
+
+FUNCTION {booklet}
+{ output.bibitem
+ format.authors output new.item
+ format.title "title" output.check
+ howpublished address new.block.checkb
+ howpublished output
+ address output
+ format.date output
+ new.block
+ fin.entry
+}
+
+FUNCTION {inbook}
+{ output.bibitem
+ author empty$
+ { format.editors "author and editor" output.check new.item }
+ { format.authors output.nonnull new.item }
+ if$
+ format.in.booktitle.ed "title" output.check
+ new.block
+ crossref missing$
+ { format.pub.address "publisher" output.check
+ format.bdate "year" output.check
+ new.block
+ format.bvolume output
+ new.block
+ format.chapter.pages "chapter and pages" output.check
+ new.block
+ format.number.series output
+ }
+ { format.chapter.pages "chapter and pages" output.check
+ new.block
+ format.book.crossref output.nonnull
+ }
+ if$
+ format.edition output
+ new.block
+ fin.entry
+}
+
+FUNCTION {incollection}
+{ output.bibitem
+ format.authors "author" output.check new.item
+ crossref missing$
+ { format.in.booktitle.ed "booktitle" output.check
+ format.bvolume output
+ format.number.series output
+ new.block
+ format.pub.address "publisher" output.check
+ format.edition output
+ format.bdate "year" output.check
+ new.block
+ format.chapter.pages output
+ }
+ { format.incoll.inproc.crossref output.nonnull
+ format.chapter.pages output
+ }
+ if$
+ new.block
+ fin.entry
+}
+
+FUNCTION {inproceedings}
+{ output.bibitem
+ format.authors "author" output.check new.item
+ crossref missing$
+ { format.in.ed.booktitle "booktitle" output.check
+ format.bvolume output
+ format.number.series output
+ format.pages output
+ address empty$
+ { organization publisher new.sentence.checkb
+ organization output
+ publisher output
+ format.bdate "year" output.check
+ }
+ { address output.nonnull
+ format.bdate "year" output.check
+ new.sentence
+ organization output
+ publisher output
+ }
+ if$
+ }
+ { format.incoll.inproc.crossref output.nonnull
+ format.pages output
+ }
+ if$
+ new.block
+ fin.entry
+}
+
+FUNCTION {conference} { inproceedings }
+
+FUNCTION {manual}
+{ output.bibitem
+ format.title "title" output.check new.sentence
+ author empty$
+ { organization empty$
+ 'skip$
+ { organization output.nonnull
+ address output
+ }
+ if$
+ }
+ { format.authors output.nonnull new.item }
+ if$
+ author empty$
+ { organization empty$
+ { address new.block.checka
+ address output
+ }
+ 'skip$
+ if$
+ }
+ { organization address new.block.checkb
+ organization output
+ address output
+ }
+ if$
+ format.edition output
+ format.date output
+ new.block
+ fin.entry
+}
+
+FUNCTION {mastersthesis}
+{ output.bibitem
+ format.authors "author" output.check new.item
+ format.title "title" output.check new.item
+ "Master's thesis" format.thesis.type output.nonnull
+ school "school" output.check
+ address output
+ format.date "year" output.check
+ new.block
+ fin.entry
+}
+
+FUNCTION {misc}
+{ output.bibitem
+ format.title output
+ new.sentence
+ format.authors output new.item
+ howpublished new.item.checka
+ howpublished output
+ format.date output
+ new.block
+ fin.entry
+ empty.misc.check
+}
+
+FUNCTION {phdthesis}
+{ output.bibitem
+ format.authors "author" output.check new.item
+ format.btitle "title" output.check new.item
+ "PhD thesis" format.thesis.type output.nonnull
+ school "school" output.check
+ address output
+ format.date "year" output.check
+ new.block
+ fin.entry
+}
+
+FUNCTION {proceedings}
+{ output.bibitem
+ editor empty$
+ { organization output }
+ { format.editors output.nonnull new.item }
+ if$
+ new.block
+ format.btitle "title" output.check
+ format.bvolume output
+ format.number.series output
+ address empty$
+ { editor empty$
+ { publisher new.sentence.checka }
+ { organization publisher new.sentence.checkb
+ organization output
+ }
+ if$
+ publisher output
+ format.date "year" output.check
+ }
+ { address output.nonnull
+ format.date "year" output.check
+ new.sentence
+ editor empty$
+ 'skip$
+ { organization output }
+ if$
+ publisher output
+ }
+ if$
+ new.block
+ fin.entry
+}
+
+FUNCTION {techreport}
+{ output.bibitem
+ format.authors "author" output.check new.item
+ format.title "title" output.check new.item
+ format.tr.number output.nonnull
+ institution "institution" output.check
+ address output
+ format.date "year" output.check
+ new.block
+ fin.entry
+}
+
+FUNCTION {unpublished}
+{ output.bibitem
+ format.authors "author" output.check new.item
+% format.title "title" output.check new.item
+ note "note" output.check
+ format.date output
+ fin.entry
+}
+
+FUNCTION {default.type} { misc }
+
+MACRO {jan} {"January"}
+
+MACRO {feb} {"February"}
+
+MACRO {mar} {"March"}
+
+MACRO {apr} {"April"}
+
+MACRO {may} {"May"}
+
+MACRO {jun} {"June"}
+
+MACRO {jul} {"July"}
+
+MACRO {aug} {"August"}
+
+MACRO {sep} {"September"}
+
+MACRO {oct} {"October"}
+
+MACRO {nov} {"November"}
+
+MACRO {dec} {"December"}
+
+MACRO {bbrc} {"Biochem. Biophys. Res. Commun."}
+
+MACRO {jacs} {"J. Amer. Chem. Soc."}
+
+MACRO {jbc} {"J. Biol. Chem."}
+
+MACRO {pnas} {"Proc. Natl. Acad. Sci."}
+
+MACRO {jmb} {"J. Mol. Biol."}
+
+MACRO {embo} {"EMBO J."}
+
+MACRO {tibs} {"Trends Biochem. Sci."}
+
+MACRO {protsfg} {"Proteins: Struct. Func. Gen."}
+
+MACRO {ieeetcad}
+ {"IEEE Transactions on Computer-Aided Design of Integrated Circuits"}
+
+MACRO {ipl} {"Information Processing Letters"}
+
+MACRO {jacm} {"Journal of the ACM"}
+
+MACRO {jcss} {"Journal of Computer and System Sciences"}
+
+MACRO {scp} {"Science of Computer Programming"}
+
+MACRO {sicomp} {"SIAM Journal on Computing"}
+
+MACRO {tocs} {"ACM Transactions on Computer Systems"}
+
+MACRO {tods} {"ACM Transactions on Database Systems"}
+
+MACRO {tog} {"ACM Transactions on Graphics"}
+
+MACRO {toms} {"ACM Transactions on Mathematical Software"}
+
+MACRO {toois} {"ACM Transactions on Office Information Systems"}
+
+MACRO {toplas} {"ACM Transactions on Programming Languages and Systems"}
+
+MACRO {tcs} {"Theoretical Computer Science"}
+
+READ
+
+STRINGS { longest.label }
+
+INTEGERS { number.label longest.label.width }
+
+FUNCTION {initialize.longest.label}
+{ "" 'longest.label :=
+ #1 'number.label :=
+ #0 'longest.label.width :=
+}
+
+FUNCTION {longest.label.pass}
+{ number.label int.to.str$ 'label :=
+ number.label #1 + 'number.label :=
+ label width$ longest.label.width >
+ { label 'longest.label :=
+ label width$ 'longest.label.width :=
+ }
+ 'skip$
+ if$
+}
+
+EXECUTE {initialize.longest.label}
+
+ITERATE {longest.label.pass}
+
+FUNCTION {begin.bib}
+{ preamble$ empty$
+ 'skip$
+ { preamble$ write$ newline$ }
+ if$
+ "\begin{thebibliography}{" longest.label * "}" * write$ newline$
+}
+
+EXECUTE {begin.bib}
+
+EXECUTE {init.state.consts}
+
+ITERATE {call.type$}
+
+FUNCTION {end.bib}
+{ newline$
+ "\end{thebibliography}" write$ newline$
+}
+
+EXECUTE {end.bib}
diff --git a/biblio/bibtex/contrib/chem-journal/pccp.bst b/biblio/bibtex/contrib/chem-journal/pccp.bst
new file mode 100644
index 0000000000..9c73cdbf53
--- /dev/null
+++ b/biblio/bibtex/contrib/chem-journal/pccp.bst
@@ -0,0 +1,989 @@
+% BibTeX bibliography style `pccp' for Phys. Chem. Chem. Phys.
+% 5/5/00 Joerg-R. Hill
+% no output of 'title' for 'article', 'book', 'inbook', 'incollection'
+% no output of 'note' except in 'unpublished'
+%
+% version 0.99a for BibTeX versions 0.99a or later, LaTeX version 2.09.
+% Copyright (C) 1985, all rights reserved.
+% Copying of this file is authorized only if either
+% (1) you make absolutely no changes to your copy, including name, or
+% (2) if you do make changes, you name it something other than
+% btxbst.doc, plain.bst, unsrt.bst, alpha.bst, and abbrv.bst.
+% This restriction helps ensure that all standard styles are identical.
+% The file btxbst.doc has the documentation for this style.
+%
+% Fixed article, book references 11/10/92---CLF
+
+ENTRY
+ { address
+ author
+ booktitle
+ chapter
+ edition
+ editor
+ howpublished
+ institution
+ journal
+ key
+ month
+ note
+ number
+ organization
+ pages
+ publisher
+ school
+ series
+ title
+ type
+ volume
+ year
+ }
+ {}
+ { label }
+
+INTEGERS { output.state before.all mid.sentence after.sentence after.block after.item author.or.editor }
+
+FUNCTION {init.state.consts}
+{ #0 'before.all :=
+ #1 'mid.sentence :=
+ #2 'after.sentence :=
+ #3 'after.block :=
+ #4 'after.item :=
+}
+
+FUNCTION {add.semicolon}
+{ duplicate$
+ #-1 #1 substring$ "}" =
+ { #-2 #1024 substring$ ";} " * }
+ { "; " * }
+ if$
+}
+
+STRINGS { s t }
+
+FUNCTION {output.nonnull}
+{ 's :=
+ output.state mid.sentence =
+ { ", " * write$ }
+ { output.state after.block =
+ { add.semicolon write$
+ newline$
+ "\newblock " write$
+ }
+ { output.state before.all =
+ 'write$
+ { output.state after.item =
+ { " " * write$ }
+ { add.period$ " " * write$ }
+ if$
+ }
+ if$
+ }
+ if$
+ mid.sentence 'output.state :=
+ }
+ if$
+ s
+}
+
+FUNCTION {output}
+{ duplicate$ empty$
+ 'pop$
+ 'output.nonnull
+ if$
+}
+
+FUNCTION {output.check}
+{ 't :=
+ duplicate$ empty$
+ { pop$ "empty " t * " in " * cite$ * warning$ }
+ 'output.nonnull
+ if$
+}
+
+FUNCTION {output.bibitem}
+{ newline$
+ "\bibitem{" write$
+ cite$ write$
+ "}" write$
+ newline$
+ ""
+ before.all 'output.state :=
+}
+
+FUNCTION {fin.entry}
+{ add.period$
+ write$
+ newline$
+}
+
+FUNCTION {new.block}
+{ output.state before.all =
+ 'skip$
+ { after.block 'output.state := }
+ if$
+}
+
+FUNCTION {new.sentence}
+{ output.state after.block =
+ 'skip$
+ { output.state before.all =
+ 'skip$
+ { after.sentence 'output.state := }
+ if$
+ }
+ if$
+}
+
+FUNCTION {new.item}
+{ duplicate$ empty$
+ { skip$ }
+ { output.state mid.sentence =
+ { after.item 'output.state := }
+ { skip$ }
+ if$
+ }
+ if$
+}
+
+FUNCTION {not}
+{ { #0 }
+ { #1 }
+ if$
+}
+
+FUNCTION {and}
+{ 'skip$
+ { pop$ #0 }
+ if$
+}
+
+FUNCTION {or}
+{ { pop$ #1 }
+ 'skip$
+ if$
+}
+
+FUNCTION {new.block.checka}
+{ empty$
+ 'skip$
+ 'new.block
+ if$
+}
+
+FUNCTION {new.block.checkb}
+{ empty$
+ swap$ empty$
+ and
+ 'skip$
+ 'new.block
+ if$
+}
+
+FUNCTION {new.sentence.checka}
+{ empty$
+ 'skip$
+ 'new.sentence
+ if$
+}
+
+FUNCTION {new.sentence.checkb}
+{ empty$
+ swap$ empty$
+ and
+ 'skip$
+ 'new.sentence
+ if$
+}
+
+FUNCTION {new.item.checka}
+{ empty$
+ 'skip$
+ 'new.item
+ if$
+}
+
+FUNCTION {field.or.null}
+{ duplicate$ empty$
+ { pop$ "" }
+ 'skip$
+ if$
+}
+
+FUNCTION {emphasize}
+{ duplicate$ empty$
+ { pop$ "" }
+ { "{\em " swap$ * "}" * }
+ if$
+}
+
+FUNCTION {boldface}
+{ duplicate$ empty$
+ { pop$ "" }
+ { "{\bf " swap$ * "}" * }
+ if$
+}
+
+FUNCTION {paren}
+{ duplicate$ empty$
+ { pop$ "" }
+ { "(" swap$ * ")" * }
+ if$
+}
+
+INTEGERS { nameptr namesleft numnames }
+
+FUNCTION {format.names}
+{ 's :=
+ #1 'nameptr :=
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ { s nameptr "{f.~}{vv~}{ll}{, jj}" format.name$ 't :=
+ nameptr #1 >
+ { namesleft #1 >
+ { ", " * t * }
+ { numnames #2 >
+ { "," * }
+ 'skip$
+ if$
+ t "others" =
+ { " et~al." * }
+ { " and " * t * }
+ if$
+ }
+ if$
+ }
+ 't
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+}
+
+FUNCTION {format.authors}
+{ author empty$
+ { "" }
+ { #1 'author.or.editor :=
+ author format.names }
+ if$
+}
+
+FUNCTION {format.editors}
+{ editor empty$
+ { "" }
+ { #2 'author.or.editor :=
+ editor num.names$ #1 >
+ { "ed. " * }
+ { "ed. " * }
+ if$
+ editor format.names
+ }
+ if$
+}
+
+FUNCTION {format.title}
+{ title empty$
+ { "" }
+ { title "t" change.case$ }
+ if$
+}
+
+FUNCTION {n.dashify}
+{ 't :=
+ ""
+ { t empty$ not }
+ { t #1 #1 substring$ "-" =
+ { t #1 #2 substring$ "--" = not
+ { "--" *
+ t #2 global.max$ substring$ 't :=
+ }
+ { { t #1 #1 substring$ "-" = }
+ { "-" *
+ t #2 global.max$ substring$ 't :=
+ }
+ while$
+ }
+ if$
+ }
+ { t #1 #1 substring$ *
+ t #2 global.max$ substring$ 't :=
+ }
+ if$
+ }
+ while$
+}
+
+FUNCTION {format.date}
+{ year empty$
+ { month empty$
+ { "" }
+ { "there's a month but no year in " cite$ * warning$
+ month
+ }
+ if$
+ }
+ { month empty$
+ { year }
+ { month " " * year }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.bdate}
+{ year empty$
+ { "there's no year in " cite$ * warning$ }
+ 'year
+ if$
+}
+
+FUNCTION {format.btitle}
+{ title emphasize
+}
+
+FUNCTION {tie.or.space.connect}
+{ duplicate$ text.length$ #3 <
+ { "~" }
+ { " " }
+ if$
+ swap$ * *
+}
+
+FUNCTION {either.or.check}
+{ empty$
+ 'pop$
+ { "can't use both " swap$ * " fields in " * cite$ * warning$ }
+ if$
+}
+
+FUNCTION {format.bvolume}
+{ volume empty$
+ { "" }
+ { "Vol. " volume tie.or.space.connect
+ series empty$
+ 'skip$
+ { " of " * series emphasize * }
+ if$
+ "volume and number" number either.or.check
+ }
+ if$
+}
+
+FUNCTION {format.number.series}
+{ volume empty$
+ { number empty$
+ { series field.or.null }
+ { output.state mid.sentence =
+ { "number" }
+ { "Number" }
+ if$
+ number tie.or.space.connect
+ series empty$
+ { "there's a number but no series in " cite$ * warning$ }
+ { " in " * series * }
+ if$
+ }
+ if$
+ }
+ { "" }
+ if$
+}
+
+FUNCTION {format.edition}
+{ edition empty$
+ { "" }
+ { output.state mid.sentence =
+ { edition "l" change.case$ " ed." * }
+ { edition "t" change.case$ " ed." * }
+ if$
+ }
+ if$
+}
+
+INTEGERS { multiresult }
+
+FUNCTION {multi.page.check}
+{ 't :=
+ #0 'multiresult :=
+ { multiresult not
+ t empty$ not
+ and
+ }
+ { t #1 #1 substring$
+ duplicate$ "-" =
+ swap$ duplicate$ "," =
+ swap$ "+" =
+ or or
+ { #1 'multiresult := }
+ { t #2 global.max$ substring$ 't := }
+ if$
+ }
+ while$
+ multiresult
+}
+
+FUNCTION {format.pages}
+{ pages empty$
+ { "" }
+ { pages multi.page.check
+ { "pp." pages n.dashify tie.or.space.connect }
+ { "p." pages tie.or.space.connect }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.vol.num.pages}
+{ volume boldface field.or.null
+ number empty$
+ 'skip$
+ { "(" number * ")" * *
+ volume empty$
+ { "there's a number but no volume in " cite$ * warning$ }
+ 'skip$
+ if$
+ }
+ if$
+ pages empty$
+ 'skip$
+ { duplicate$ empty$
+ { pop$ format.pages }
+ { ", " * pages n.dashify * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.chapter.pages}
+{ chapter empty$
+ 'format.pages
+ { type empty$
+ { "chapter" }
+ { type "l" change.case$ }
+ if$
+ chapter tie.or.space.connect
+ pages empty$
+ 'skip$
+ { ", " * format.pages * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.in.ed.booktitle}
+{ booktitle empty$
+ { "" }
+ { editor empty$
+ { "In " booktitle emphasize * }
+ { "In " format.editors * ", " * booktitle emphasize * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.in.booktitle.ed}
+{ booktitle empty$
+ { "" }
+ { editor empty$
+ { "in " booktitle emphasize * }
+ { "in " booktitle emphasize * ", " * format.editors * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.pub.address}
+{ publisher empty$
+ { "" }
+ { address empty$
+ { publisher }
+ { publisher ", " * address *}
+ if$
+ }
+ if$
+}
+
+FUNCTION {empty.misc.check}
+{ author empty$ title empty$ howpublished empty$
+ month empty$ year empty$ note empty$
+ and and and and and
+ { "all relevant fields are empty in " cite$ * warning$ }
+ 'skip$
+ if$
+}
+
+FUNCTION {format.thesis.type}
+{ type empty$
+ 'skip$
+ { pop$
+ type "t" change.case$
+ }
+ if$
+}
+
+FUNCTION {format.tr.number}
+{ type empty$
+ { "Technical Report" }
+ 'type
+ if$
+ number empty$
+ { "t" change.case$ }
+ { number tie.or.space.connect }
+ if$
+}
+
+FUNCTION {format.article.crossref}
+{ key empty$
+ { journal empty$
+ { "need key or journal for " cite$ * " to crossref " * crossref *
+ warning$
+ ""
+ }
+ { "In {\em " journal * "\/}" * }
+ if$
+ }
+ { "In " key * }
+ if$
+ " \cite{" * crossref * "}" *
+}
+
+FUNCTION {format.crossref.editor}
+{ editor #1 "{vv~}{ll}" format.name$
+ editor num.names$ duplicate$
+ #2 >
+ { pop$ " et~al." * }
+ { #2 <
+ 'skip$
+ { editor #2 "{ff }{vv }{ll}{ jj}" format.name$ "others" =
+ { " et~al." * }
+ { " and " * editor #2 "{vv~}{ll}" format.name$ * }
+ if$
+ }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.book.crossref}
+{ volume empty$
+ { "empty volume in " cite$ * "'s crossref of " * crossref * warning$
+ "In "
+ }
+ { "Volume" volume tie.or.space.connect
+ " of " *
+ }
+ if$
+ editor empty$
+ editor field.or.null author field.or.null =
+ or
+ { key empty$
+ { series empty$
+ { "need editor, key, or series for " cite$ * " to crossref " *
+ crossref * warning$
+ "" *
+ }
+ { "{\em " * series * "\/}" * }
+ if$
+ }
+ { key * }
+ if$
+ }
+ { format.crossref.editor * }
+ if$
+ " \cite{" * crossref * "}" *
+}
+
+FUNCTION {format.incoll.inproc.crossref}
+{ editor empty$
+ editor field.or.null author field.or.null =
+ or
+ { key empty$
+ { booktitle empty$
+ { "need editor, key, or booktitle for " cite$ * " to crossref " *
+ crossref * warning$
+ ""
+ }
+ { "In {\em " booktitle * "\/}" * }
+ if$
+ }
+ { "In " key * }
+ if$
+ }
+ { "In " format.crossref.editor * }
+ if$
+ " \cite{" * crossref * "}" *
+}
+
+FUNCTION {article}
+{ output.bibitem
+ format.authors "author" output.check
+ crossref missing$
+ { journal emphasize "journal" output.check
+ format.date "year" output.check
+ format.vol.num.pages output
+ }
+ { format.article.crossref output.nonnull
+ format.pages output
+ }
+ if$
+ fin.entry
+}
+
+FUNCTION {book}
+{ output.bibitem
+ author empty$
+ { format.editors "author and editor" output.check }
+ { format.authors output.nonnull
+ crossref missing$
+ { "author and editor" editor either.or.check }
+ 'skip$
+ if$
+ }
+ if$
+ format.btitle "title" output.check
+ crossref missing$
+ { format.bvolume output
+ format.number.series output
+ format.pub.address "publisher" output.check
+ }
+ { format.book.crossref output.nonnull }
+ if$
+ format.edition output
+ format.bdate "year" output.check
+ new.block
+ fin.entry
+}
+
+FUNCTION {booklet}
+{ output.bibitem
+ format.authors output new.item
+ format.title "title" output.check
+ howpublished address new.block.checkb
+ howpublished output
+ address output
+ format.date output
+ new.block
+ fin.entry
+}
+
+FUNCTION {inbook}
+{ output.bibitem
+ author empty$
+ { format.editors "author and editor" output.check }
+ { format.authors output.nonnull }
+ if$
+ format.in.booktitle.ed "title" output.check
+ crossref missing$
+ { format.pub.address "publisher" output.check
+ format.bdate "year" output.check
+ new.block
+ format.bvolume output
+ format.chapter.pages "chapter and pages" output.check
+ new.block
+ format.number.series output
+ }
+ { format.chapter.pages "chapter and pages" output.check
+ new.block
+ format.book.crossref output.nonnull
+ }
+ if$
+ format.edition output
+ new.block
+ fin.entry
+}
+
+FUNCTION {incollection}
+{ output.bibitem
+ format.authors "author" output.check new.item
+ crossref missing$
+ { format.in.booktitle.ed "booktitle" output.check
+ format.bvolume output
+ format.number.series output
+ new.block
+ format.pub.address "publisher" output.check
+ format.edition output
+ format.bdate "year" output.check
+ new.block
+ format.chapter.pages output
+ }
+ { format.incoll.inproc.crossref output.nonnull
+ format.chapter.pages output
+ }
+ if$
+ new.block
+ fin.entry
+}
+
+FUNCTION {inproceedings}
+{ output.bibitem
+ format.authors "author" output.check new.item
+ crossref missing$
+ { format.in.ed.booktitle "booktitle" output.check
+ format.bvolume output
+ format.number.series output
+ format.pages output
+ address empty$
+ { organization publisher new.sentence.checkb
+ organization output
+ publisher output
+ format.bdate "year" output.check
+ }
+ { address output.nonnull
+ format.bdate "year" output.check
+ new.sentence
+ organization output
+ publisher output
+ }
+ if$
+ }
+ { format.incoll.inproc.crossref output.nonnull
+ format.pages output
+ }
+ if$
+ new.block
+ fin.entry
+}
+
+FUNCTION {conference} { inproceedings }
+
+FUNCTION {manual}
+{ output.bibitem
+ format.title "title" output.check new.sentence
+ author empty$
+ { organization empty$
+ 'skip$
+ { organization output.nonnull
+ address output
+ }
+ if$
+ }
+ { format.authors output.nonnull new.item }
+ if$
+ author empty$
+ { organization empty$
+ { address new.block.checka
+ address output
+ }
+ 'skip$
+ if$
+ }
+ { organization address new.block.checkb
+ organization output
+ address output
+ }
+ if$
+ format.edition output
+ format.date output
+ new.block
+ fin.entry
+}
+
+FUNCTION {mastersthesis}
+{ output.bibitem
+ format.authors "author" output.check
+ format.title "title" output.check new.item
+ "Master's thesis" format.thesis.type output.nonnull
+ school "school" output.check
+ address output
+ format.date "year" output.check
+ new.block
+ fin.entry
+}
+
+FUNCTION {misc}
+{ output.bibitem
+ format.authors output
+ format.title output
+ howpublished new.item.checka
+ howpublished output
+ format.bdate output
+ new.block
+ fin.entry
+ empty.misc.check
+}
+
+FUNCTION {phdthesis}
+{ output.bibitem
+ format.authors "author" output.check new.item
+ format.btitle "title" output.check new.item
+ "PhD thesis" format.thesis.type output.nonnull
+ school "school" output.check
+ address output
+ format.date "year" output.check
+ new.block
+ fin.entry
+}
+
+FUNCTION {proceedings}
+{ output.bibitem
+ editor empty$
+ { organization output }
+ { format.editors output.nonnull new.item }
+ if$
+ new.block
+ format.btitle "title" output.check
+ format.bvolume output
+ format.number.series output
+ address empty$
+ { editor empty$
+ { publisher new.sentence.checka }
+ { organization publisher new.sentence.checkb
+ organization output
+ }
+ if$
+ publisher output
+ format.date "year" output.check
+ }
+ { address output.nonnull
+ format.date "year" output.check
+ new.sentence
+ editor empty$
+ 'skip$
+ { organization output }
+ if$
+ publisher output
+ }
+ if$
+ new.block
+ fin.entry
+}
+
+FUNCTION {techreport}
+{ output.bibitem
+ format.authors "author" output.check new.item
+ format.title "title" output.check new.item
+ format.tr.number output.nonnull
+ institution "institution" output.check
+ address output
+ format.date "year" output.check
+ new.block
+ fin.entry
+}
+
+FUNCTION {unpublished}
+{ output.bibitem
+ format.authors "author" output.check
+% format.title "title" output.check new.item
+ note "note" output.check
+ format.date output
+ fin.entry
+}
+
+FUNCTION {default.type} { misc }
+
+MACRO {jan} {"January"}
+
+MACRO {feb} {"February"}
+
+MACRO {mar} {"March"}
+
+MACRO {apr} {"April"}
+
+MACRO {may} {"May"}
+
+MACRO {jun} {"June"}
+
+MACRO {jul} {"July"}
+
+MACRO {aug} {"August"}
+
+MACRO {sep} {"September"}
+
+MACRO {oct} {"October"}
+
+MACRO {nov} {"November"}
+
+MACRO {dec} {"December"}
+
+MACRO {bbrc} {"Biochem. Biophys. Res. Commun."}
+
+MACRO {jacs} {"J. Amer. Chem. Soc."}
+
+MACRO {jbc} {"J. Biol. Chem."}
+
+MACRO {pnas} {"Proc. Natl. Acad. Sci."}
+
+MACRO {jmb} {"J. Mol. Biol."}
+
+MACRO {embo} {"EMBO J."}
+
+MACRO {tibs} {"Trends Biochem. Sci."}
+
+MACRO {protsfg} {"Proteins: Struct. Func. Gen."}
+
+MACRO {ieeetcad}
+ {"IEEE Transactions on Computer-Aided Design of Integrated Circuits"}
+
+MACRO {ipl} {"Information Processing Letters"}
+
+MACRO {jacm} {"Journal of the ACM"}
+
+MACRO {jcss} {"Journal of Computer and System Sciences"}
+
+MACRO {scp} {"Science of Computer Programming"}
+
+MACRO {sicomp} {"SIAM Journal on Computing"}
+
+MACRO {tocs} {"ACM Transactions on Computer Systems"}
+
+MACRO {tods} {"ACM Transactions on Database Systems"}
+
+MACRO {tog} {"ACM Transactions on Graphics"}
+
+MACRO {toms} {"ACM Transactions on Mathematical Software"}
+
+MACRO {toois} {"ACM Transactions on Office Information Systems"}
+
+MACRO {toplas} {"ACM Transactions on Programming Languages and Systems"}
+
+MACRO {tcs} {"Theoretical Computer Science"}
+
+READ
+
+STRINGS { longest.label }
+
+INTEGERS { number.label longest.label.width }
+
+FUNCTION {initialize.longest.label}
+{ "" 'longest.label :=
+ #1 'number.label :=
+ #0 'longest.label.width :=
+}
+
+FUNCTION {longest.label.pass}
+{ number.label int.to.str$ 'label :=
+ number.label #1 + 'number.label :=
+ label width$ longest.label.width >
+ { label 'longest.label :=
+ label width$ 'longest.label.width :=
+ }
+ 'skip$
+ if$
+}
+
+EXECUTE {initialize.longest.label}
+
+ITERATE {longest.label.pass}
+
+FUNCTION {begin.bib}
+{ preamble$ empty$
+ 'skip$
+ { preamble$ write$ newline$ }
+ if$
+ "\begin{thebibliography}{" longest.label * "}" * write$ newline$
+}
+
+EXECUTE {begin.bib}
+
+EXECUTE {init.state.consts}
+
+ITERATE {call.type$}
+
+FUNCTION {end.bib}
+{ newline$
+ "\end{thebibliography}" write$ newline$
+}
+
+EXECUTE {end.bib}
diff --git a/biblio/bibtex/contrib/chem-journal/revcompchem.bst b/biblio/bibtex/contrib/chem-journal/revcompchem.bst
new file mode 100644
index 0000000000..e3f7c5be88
--- /dev/null
+++ b/biblio/bibtex/contrib/chem-journal/revcompchem.bst
@@ -0,0 +1,993 @@
+% BibTeX bibliography style `revcompchem' for Reviews in Computational Chemistry
+% 4/28/98 Joerg-R. Hill
+%
+% version 0.99a for BibTeX versions 0.99a or later, LaTeX version 2.09.
+% Copyright (C) 1985, all rights reserved.
+% Copying of this file is authorized only if either
+% (1) you make absolutely no changes to your copy, including name, or
+% (2) if you do make changes, you name it something other than
+% btxbst.doc, plain.bst, unsrt.bst, alpha.bst, and abbrv.bst.
+% This restriction helps ensure that all standard styles are identical.
+% The file btxbst.doc has the documentation for this style.
+%
+% Fixed article, book references 11/10/92---CLF
+
+ENTRY
+ { address
+ author
+ booktitle
+ chapter
+ edition
+ editor
+ howpublished
+ institution
+ journal
+ key
+ month
+ note
+ number
+ organization
+ pages
+ publisher
+ school
+ series
+ title
+ type
+ volume
+ year
+ }
+ {}
+ { label }
+
+INTEGERS { output.state before.all mid.sentence after.sentence after.block after.item author.or.editor }
+
+FUNCTION {init.state.consts}
+{ #0 'before.all :=
+ #1 'mid.sentence :=
+ #2 'after.sentence :=
+ #3 'after.block :=
+ #4 'after.item :=
+}
+
+FUNCTION {add.semicolon}
+{ duplicate$
+ #-1 #1 substring$ "}" =
+ { #-2 #1024 substring$ ";} " * }
+ { "; " * }
+ if$
+}
+
+STRINGS { s t }
+
+FUNCTION {output.nonnull}
+{ 's :=
+ output.state mid.sentence =
+ { ", " * write$ }
+ { output.state after.block =
+ { add.semicolon write$
+ newline$
+ "\newblock " write$
+ }
+ { output.state before.all =
+ 'write$
+ { output.state after.item =
+ { " " * write$ }
+ { add.period$ " " * write$ }
+ if$
+ }
+ if$
+ }
+ if$
+ mid.sentence 'output.state :=
+ }
+ if$
+ s
+}
+
+FUNCTION {output}
+{ duplicate$ empty$
+ 'pop$
+ 'output.nonnull
+ if$
+}
+
+FUNCTION {output.check}
+{ 't :=
+ duplicate$ empty$
+ { pop$ "empty " t * " in " * cite$ * warning$ }
+ 'output.nonnull
+ if$
+}
+
+FUNCTION {output.bibitem}
+{ newline$
+ "\bibitem{" write$
+ cite$ write$
+ "}" write$
+ newline$
+ ""
+ before.all 'output.state :=
+}
+
+FUNCTION {fin.entry}
+{ add.period$
+ write$
+ newline$
+}
+
+FUNCTION {new.block}
+{ output.state before.all =
+ 'skip$
+ { after.block 'output.state := }
+ if$
+}
+
+FUNCTION {new.sentence}
+{ output.state after.block =
+ 'skip$
+ { output.state before.all =
+ 'skip$
+ { after.sentence 'output.state := }
+ if$
+ }
+ if$
+}
+
+FUNCTION {new.item}
+{ duplicate$ empty$
+ { skip$ }
+ { output.state mid.sentence =
+ { after.item 'output.state := }
+ { skip$ }
+ if$
+ }
+ if$
+}
+
+FUNCTION {not}
+{ { #0 }
+ { #1 }
+ if$
+}
+
+FUNCTION {and}
+{ 'skip$
+ { pop$ #0 }
+ if$
+}
+
+FUNCTION {or}
+{ { pop$ #1 }
+ 'skip$
+ if$
+}
+
+FUNCTION {new.block.checka}
+{ empty$
+ 'skip$
+ 'new.block
+ if$
+}
+
+FUNCTION {new.block.checkb}
+{ empty$
+ swap$ empty$
+ and
+ 'skip$
+ 'new.block
+ if$
+}
+
+FUNCTION {new.sentence.checka}
+{ empty$
+ 'skip$
+ 'new.sentence
+ if$
+}
+
+FUNCTION {new.sentence.checkb}
+{ empty$
+ swap$ empty$
+ and
+ 'skip$
+ 'new.sentence
+ if$
+}
+
+FUNCTION {new.item.checka}
+{ empty$
+ 'skip$
+ 'new.item
+ if$
+}
+
+FUNCTION {field.or.null}
+{ duplicate$ empty$
+ { pop$ "" }
+ 'skip$
+ if$
+}
+
+FUNCTION {emphasize}
+{ duplicate$ empty$
+ { pop$ "" }
+ { "{\em " swap$ * "}" * }
+ if$
+}
+
+FUNCTION {boldface}
+{ duplicate$ empty$
+ { pop$ "" }
+ { "{\bf " swap$ * "}" * }
+ if$
+}
+
+FUNCTION {paren}
+{ duplicate$ empty$
+ { pop$ "" }
+ { "(" swap$ * ")" * }
+ if$
+}
+
+INTEGERS { nameptr namesleft numnames }
+
+FUNCTION {format.names}
+{ 's :=
+ #1 'nameptr :=
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ { s nameptr "{f.~}{vv~}{ll}{, jj}" format.name$ 't :=
+ nameptr #1 >
+ { namesleft #1 >
+ { ", " * t * }
+ { numnames #2 >
+ { "," * }
+ 'skip$
+ if$
+ t "others" =
+ { " et~al." * }
+ { " and " * t * }
+ if$
+ }
+ if$
+ }
+ 't
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+}
+
+FUNCTION {format.authors}
+{ author empty$
+ { "" }
+ { #1 'author.or.editor :=
+ author format.names }
+ if$
+}
+
+FUNCTION {format.editors}
+{ editor empty$
+ { "" }
+ { #2 'author.or.editor :=
+ editor format.names
+ editor num.names$ #1 >
+ { ", Eds." * }
+ { ", Ed." * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.title}
+{ title empty$
+ { "" }
+ { title "t" change.case$ }
+ if$
+}
+
+FUNCTION {n.dashify}
+{ 't :=
+ ""
+ { t empty$ not }
+ { t #1 #1 substring$ "-" =
+ { t #1 #2 substring$ "--" = not
+ { "--" *
+ t #2 global.max$ substring$ 't :=
+ }
+ { { t #1 #1 substring$ "-" = }
+ { "-" *
+ t #2 global.max$ substring$ 't :=
+ }
+ while$
+ }
+ if$
+ }
+ { t #1 #1 substring$ *
+ t #2 global.max$ substring$ 't :=
+ }
+ if$
+ }
+ while$
+}
+
+FUNCTION {format.date}
+{ year empty$
+ { month empty$
+ { "" }
+ { "there's a month but no year in " cite$ * warning$
+ month
+ }
+ if$
+ }
+ { month empty$
+ { year paren }
+ { month " " * year paren }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.bdate}
+{ year empty$
+ { "there's no year in " cite$ * warning$ }
+ 'year
+ if$
+}
+
+FUNCTION {format.btitle}
+{ title emphasize
+}
+
+FUNCTION {tie.or.space.connect}
+{ duplicate$ text.length$ #3 <
+ { "~" }
+ { " " }
+ if$
+ swap$ * *
+}
+
+FUNCTION {either.or.check}
+{ empty$
+ 'pop$
+ { "can't use both " swap$ * " fields in " * cite$ * warning$ }
+ if$
+}
+
+FUNCTION {format.bvolume}
+{ volume empty$
+ { "" }
+ { "Vol. " volume tie.or.space.connect
+ series empty$
+ 'skip$
+ { " of " * series emphasize * }
+ if$
+ "volume and number" number either.or.check
+ }
+ if$
+}
+
+FUNCTION {format.number.series}
+{ volume empty$
+ { number empty$
+ { series field.or.null }
+ { output.state mid.sentence =
+ { "number" }
+ { "Number" }
+ if$
+ number tie.or.space.connect
+ series empty$
+ { "there's a number but no series in " cite$ * warning$ }
+ { " in " * series * }
+ if$
+ }
+ if$
+ }
+ { "" }
+ if$
+}
+
+FUNCTION {format.edition}
+{ edition empty$
+ { "" }
+ { output.state mid.sentence =
+ { edition "l" change.case$ " ed." * }
+ { edition "t" change.case$ " ed." * }
+ if$
+ }
+ if$
+}
+
+INTEGERS { multiresult }
+
+FUNCTION {multi.page.check}
+{ 't :=
+ #0 'multiresult :=
+ { multiresult not
+ t empty$ not
+ and
+ }
+ { t #1 #1 substring$
+ duplicate$ "-" =
+ swap$ duplicate$ "," =
+ swap$ "+" =
+ or or
+ { #1 'multiresult := }
+ { t #2 global.max$ substring$ 't := }
+ if$
+ }
+ while$
+ multiresult
+}
+
+FUNCTION {format.pages}
+{ pages empty$
+ { "" }
+ { pages multi.page.check
+ { "pages" pages n.dashify tie.or.space.connect }
+ { "page" pages tie.or.space.connect }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.vol.num.pages}
+{ volume boldface field.or.null
+ number empty$
+ 'skip$
+ { "(" number * ")" * *
+ volume empty$
+ { "there's a number but no volume in " cite$ * warning$ }
+ 'skip$
+ if$
+ }
+ if$
+ pages empty$
+ 'skip$
+ { duplicate$ empty$
+ { pop$ format.pages }
+ { ", " * pages n.dashify * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.chapter.pages}
+{ chapter empty$
+ 'format.pages
+ { type empty$
+ { "chapter" }
+ { type "l" change.case$ }
+ if$
+ chapter tie.or.space.connect
+ pages empty$
+ 'skip$
+ { ", " * format.pages * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.in.ed.booktitle}
+{ booktitle empty$
+ { "" }
+ { editor empty$
+ { "in " booktitle emphasize * }
+ { "in " format.editors * ", " * booktitle emphasize * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.in.booktitle.ed}
+{ booktitle empty$
+ { "" }
+ { editor empty$
+ { "in " booktitle emphasize * }
+ { "in " booktitle emphasize * ", " * format.editors * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.pub.address}
+{ publisher empty$
+ { "" }
+ { address empty$
+ { publisher }
+ { publisher ", " * address *}
+ if$
+ }
+ if$
+}
+
+FUNCTION {empty.misc.check}
+{ author empty$ title empty$ howpublished empty$
+ month empty$ year empty$ note empty$
+ and and and and and
+ { "all relevant fields are empty in " cite$ * warning$ }
+ 'skip$
+ if$
+}
+
+FUNCTION {format.thesis.type}
+{ type empty$
+ 'skip$
+ { pop$
+ type "t" change.case$
+ }
+ if$
+}
+
+FUNCTION {format.tr.number}
+{ type empty$
+ { "Technical Report" }
+ 'type
+ if$
+ number empty$
+ { "t" change.case$ }
+ { number tie.or.space.connect }
+ if$
+}
+
+FUNCTION {format.article.crossref}
+{ key empty$
+ { journal empty$
+ { "need key or journal for " cite$ * " to crossref " * crossref *
+ warning$
+ ""
+ }
+ { "In {\em " journal * "\/}" * }
+ if$
+ }
+ { "In " key * }
+ if$
+ " \cite{" * crossref * "}" *
+}
+
+FUNCTION {format.crossref.editor}
+{ editor #1 "{vv~}{ll}" format.name$
+ editor num.names$ duplicate$
+ #2 >
+ { pop$ " et~al." * }
+ { #2 <
+ 'skip$
+ { editor #2 "{ff }{vv }{ll}{ jj}" format.name$ "others" =
+ { " et~al." * }
+ { " and " * editor #2 "{vv~}{ll}" format.name$ * }
+ if$
+ }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.book.crossref}
+{ volume empty$
+ { "empty volume in " cite$ * "'s crossref of " * crossref * warning$
+ "In "
+ }
+ { "Volume" volume tie.or.space.connect
+ " of " *
+ }
+ if$
+ editor empty$
+ editor field.or.null author field.or.null =
+ or
+ { key empty$
+ { series empty$
+ { "need editor, key, or series for " cite$ * " to crossref " *
+ crossref * warning$
+ "" *
+ }
+ { "{\em " * series * "\/}" * }
+ if$
+ }
+ { key * }
+ if$
+ }
+ { format.crossref.editor * }
+ if$
+ " \cite{" * crossref * "}" *
+}
+
+FUNCTION {format.incoll.inproc.crossref}
+{ editor empty$
+ editor field.or.null author field.or.null =
+ or
+ { key empty$
+ { booktitle empty$
+ { "need editor, key, or booktitle for " cite$ * " to crossref " *
+ crossref * warning$
+ ""
+ }
+ { "in {\em " booktitle * "\/}" * }
+ if$
+ }
+ { "in " key * }
+ if$
+ }
+ { "in " format.crossref.editor * }
+ if$
+ " \cite{" * crossref * "}" *
+}
+
+FUNCTION {article}
+{ output.bibitem
+ format.authors "author" output.check
+ crossref missing$
+ { journal emphasize "journal" output.check
+ format.vol.num.pages output new.item
+ format.date "year" output.check new.sentence
+ format.title "title" output.check
+ }
+ { format.article.crossref output.nonnull
+ format.pages output
+ }
+ if$
+ fin.entry
+}
+
+FUNCTION {book}
+{ output.bibitem
+ author empty$
+ { format.editors "author and editor" output.check }
+ { format.authors output.nonnull
+ crossref missing$
+ { "author and editor" editor either.or.check }
+ 'skip$
+ if$
+ }
+ if$
+ format.btitle "title" output.check
+ crossref missing$
+ { format.bvolume output
+ format.number.series output
+ format.pub.address "publisher" output.check
+ }
+ { format.book.crossref output.nonnull }
+ if$
+ format.edition output
+ format.bdate "year" output.check
+ new.block
+ fin.entry
+}
+
+FUNCTION {booklet}
+{ output.bibitem
+ format.authors output new.item
+ format.title "title" output.check
+ howpublished address new.block.checkb
+ howpublished output
+ address output
+ format.date output
+ new.block
+ fin.entry
+}
+
+FUNCTION {inbook}
+{ output.bibitem
+ author empty$
+ { format.editors "author and editor" output.check }
+ { format.authors output.nonnull }
+ if$
+ format.in.booktitle.ed "booktitle" output.check
+ crossref missing$
+ { format.pub.address "publisher" output.check
+ format.bdate "year" output.check
+ new.block
+ format.bvolume output
+ new.block
+ format.chapter.pages "chapter and pages" output.check
+ new.block
+ format.number.series output
+ }
+ { format.chapter.pages "chapter and pages" output.check
+ new.block
+ format.book.crossref output.nonnull
+ }
+ if$
+ format.edition output
+ title empty$
+ { "need title for " cite$ * warning$ }
+ { format.title output }
+ if$
+ new.block
+ fin.entry
+}
+
+FUNCTION {incollection}
+{ output.bibitem
+ format.authors "author" output.check new.item
+ crossref missing$
+ { format.in.booktitle.ed "booktitle" output.check
+ format.bvolume output
+ format.number.series output
+ new.block
+ format.pub.address "publisher" output.check
+ format.edition output
+ format.bdate "year" output.check
+ new.block
+ format.chapter.pages output
+ }
+ { format.incoll.inproc.crossref output.nonnull
+ format.chapter.pages output
+ }
+ if$
+ new.block
+ fin.entry
+}
+
+FUNCTION {inproceedings}
+{ output.bibitem
+ format.authors "author" output.check new.item
+ crossref missing$
+ { format.in.ed.booktitle "booktitle" output.check
+ format.bvolume output
+ format.number.series output
+ format.pages output
+ address empty$
+ { organization publisher new.sentence.checkb
+ organization output
+ publisher output
+ format.bdate "year" output.check
+ }
+ { address output.nonnull
+ format.bdate "year" output.check
+ new.sentence
+ organization output
+ publisher output
+ }
+ if$
+ }
+ { format.incoll.inproc.crossref output.nonnull
+ format.pages output
+ }
+ if$
+ new.block
+ fin.entry
+}
+
+FUNCTION {conference} { inproceedings }
+
+FUNCTION {manual}
+{ output.bibitem
+ format.title "title" output.check new.sentence
+ author empty$
+ { organization empty$
+ 'skip$
+ { organization output.nonnull
+ address output
+ }
+ if$
+ }
+ { format.authors output.nonnull new.item }
+ if$
+ author empty$
+ { organization empty$
+ { address new.block.checka
+ address output
+ }
+ 'skip$
+ if$
+ }
+ { organization address new.block.checkb
+ organization output
+ address output
+ }
+ if$
+ format.edition output
+ format.date output
+ new.block
+ fin.entry
+}
+
+FUNCTION {mastersthesis}
+{ output.bibitem
+ format.authors "author" output.check new.item
+ format.title "title" output.check new.item
+ "Master's thesis" format.thesis.type output.nonnull
+ school "school" output.check
+ address output
+ format.date "year" output.check
+ new.block
+ fin.entry
+}
+
+FUNCTION {misc}
+{ output.bibitem
+ format.authors output
+ format.title output
+ howpublished new.item.checka
+ howpublished output
+ format.bdate output
+ new.block
+ fin.entry
+ empty.misc.check
+}
+
+FUNCTION {phdthesis}
+{ output.bibitem
+ format.authors "author" output.check new.item
+ format.btitle "title" output.check new.item
+ "PhD thesis" format.thesis.type output.nonnull
+ school "school" output.check
+ address output
+ format.date "year" output.check
+ new.block
+ fin.entry
+}
+
+FUNCTION {proceedings}
+{ output.bibitem
+ editor empty$
+ { organization output }
+ { format.editors output.nonnull new.item }
+ if$
+ new.block
+ format.btitle "title" output.check
+ format.bvolume output
+ format.number.series output
+ address empty$
+ { editor empty$
+ { publisher new.sentence.checka }
+ { organization publisher new.sentence.checkb
+ organization output
+ }
+ if$
+ publisher output
+ format.date "year" output.check
+ }
+ { address output.nonnull
+ format.date "year" output.check
+ new.sentence
+ editor empty$
+ 'skip$
+ { organization output }
+ if$
+ publisher output
+ }
+ if$
+ new.block
+ fin.entry
+}
+
+FUNCTION {techreport}
+{ output.bibitem
+ format.authors "author" output.check new.item
+ format.title "title" output.check new.item
+ format.tr.number output.nonnull
+ institution "institution" output.check
+ address output
+ format.date "year" output.check
+ new.block
+ fin.entry
+}
+
+FUNCTION {unpublished}
+{ output.bibitem
+ format.authors "author" output.check new.item
+% format.title "title" output.check new.item
+ note "note" output.check
+ format.date output
+ fin.entry
+}
+
+FUNCTION {default.type} { misc }
+
+MACRO {jan} {"January"}
+
+MACRO {feb} {"February"}
+
+MACRO {mar} {"March"}
+
+MACRO {apr} {"April"}
+
+MACRO {may} {"May"}
+
+MACRO {jun} {"June"}
+
+MACRO {jul} {"July"}
+
+MACRO {aug} {"August"}
+
+MACRO {sep} {"September"}
+
+MACRO {oct} {"October"}
+
+MACRO {nov} {"November"}
+
+MACRO {dec} {"December"}
+
+MACRO {bbrc} {"Biochem. Biophys. Res. Commun."}
+
+MACRO {jacs} {"J. Amer. Chem. Soc."}
+
+MACRO {jbc} {"J. Biol. Chem."}
+
+MACRO {pnas} {"Proc. Natl. Acad. Sci."}
+
+MACRO {jmb} {"J. Mol. Biol."}
+
+MACRO {embo} {"EMBO J."}
+
+MACRO {tibs} {"Trends Biochem. Sci."}
+
+MACRO {protsfg} {"Proteins: Struct. Func. Gen."}
+
+MACRO {ieeetcad}
+ {"IEEE Transactions on Computer-Aided Design of Integrated Circuits"}
+
+MACRO {ipl} {"Information Processing Letters"}
+
+MACRO {jacm} {"Journal of the ACM"}
+
+MACRO {jcss} {"Journal of Computer and System Sciences"}
+
+MACRO {scp} {"Science of Computer Programming"}
+
+MACRO {sicomp} {"SIAM Journal on Computing"}
+
+MACRO {tocs} {"ACM Transactions on Computer Systems"}
+
+MACRO {tods} {"ACM Transactions on Database Systems"}
+
+MACRO {tog} {"ACM Transactions on Graphics"}
+
+MACRO {toms} {"ACM Transactions on Mathematical Software"}
+
+MACRO {toois} {"ACM Transactions on Office Information Systems"}
+
+MACRO {toplas} {"ACM Transactions on Programming Languages and Systems"}
+
+MACRO {tcs} {"Theoretical Computer Science"}
+
+READ
+
+STRINGS { longest.label }
+
+INTEGERS { number.label longest.label.width }
+
+FUNCTION {initialize.longest.label}
+{ "" 'longest.label :=
+ #1 'number.label :=
+ #0 'longest.label.width :=
+}
+
+FUNCTION {longest.label.pass}
+{ number.label int.to.str$ 'label :=
+ number.label #1 + 'number.label :=
+ label width$ longest.label.width >
+ { label 'longest.label :=
+ label width$ 'longest.label.width :=
+ }
+ 'skip$
+ if$
+}
+
+EXECUTE {initialize.longest.label}
+
+ITERATE {longest.label.pass}
+
+FUNCTION {begin.bib}
+{ preamble$ empty$
+ 'skip$
+ { preamble$ write$ newline$ }
+ if$
+ "\begin{thebibliography}{" longest.label * "}" * write$ newline$
+}
+
+EXECUTE {begin.bib}
+
+EXECUTE {init.state.consts}
+
+ITERATE {call.type$}
+
+FUNCTION {end.bib}
+{ newline$
+ "\end{thebibliography}" write$ newline$
+}
+
+EXECUTE {end.bib}
diff --git a/biblio/bibtex/contrib/chembst/README b/biblio/bibtex/contrib/chembst/README
new file mode 100644
index 0000000000..08b55a8d36
--- /dev/null
+++ b/biblio/bibtex/contrib/chembst/README
@@ -0,0 +1,11 @@
+The chembst package is a collection of advanced BibTeX style files suitable for
+publications in chemistry journals. Currently, style files for journals
+published by the American Chemical Society, Wiley-VCH and The Royal Society of
+Chemistry are available. The style file support advanced features like
+automatic formatting of errata or creating an appropriate entry for
+publications in Angewandte Chemie where both English and German should be cited
+simultaneously.
+
+This material is subject to the LaTeX Project Public License. See
+http://www.ctan.org/tex-archive/help/Catalogue/licenses.lppl.html for the
+details of that license. \ No newline at end of file
diff --git a/biblio/bibtex/contrib/chembst/chembst.dtx b/biblio/bibtex/contrib/chembst/chembst.dtx
new file mode 100644
index 0000000000..ed9e1dfd02
--- /dev/null
+++ b/biblio/bibtex/contrib/chembst/chembst.dtx
@@ -0,0 +1,3110 @@
+% \iffalse
+%
+%% File: chembst.dtx Copyright (C) 2008 Stephan Schenk
+%% $Id: chembst.dtx,v 1.12 2008/09/17 19:07:16 schenk Exp $
+%%
+%% Stephan Schenk (mail@schenk-stephan.de)
+%%
+%% This program may be distributed and/or modified under the
+%% conditions of the LaTeX Project Public License, either version 1.3
+%% of this license or (at your option) any later version.
+%% The latest version of this license is in
+%% http://www.latex-project.org/lppl.txt
+%%
+%% *****
+%%
+% This package consists of the files chembst.dtx and chembst.ins
+%
+% To typeset this documentation use
+%
+% pdflatex chembst.dtx
+% makeindex -s gind.ist chembst.idx
+% makeindex -s gglo.ist -o chembst.gls chembst.glo
+% pdflatex chembst.dtx
+%
+%
+% The following journals can be selected:
+% - ChemCommun
+% - ChemEurJ
+% - InorgChem
+% - JAmChemSoc
+%
+% The following additional selection rules exist:
+% - cv
+% Create a style file for a curriculum vitae.
+% - namesone
+% Truncate list of names to one and append et al.
+% Works only if more names than specified by *name options are present.
+% - tennames
+% If a list contains more than ten names it is truncated.
+% See names* options
+% - fifteennames
+% Same as tennames but with 16 names.
+%
+%
+%
+%<*driver>
+\ProvidesFile{chembst.dtx}
+ [2008/09/17 0.2.5 BibTeX style files for chemistry journals]
+\documentclass{ltxdoc}
+\GetFileInfo{chembst.dtx}
+\CodelineIndex
+\RecordChanges
+%\OnlyDescription
+\begin{document}
+ \DocInput{\filename}
+\end{document}
+%</driver>
+% \fi
+%
+% \CheckSum{175}
+%
+% \CharacterTable
+% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z
+% Lower-case \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z
+% Digits \0\1\2\3\4\5\6\7\8\9
+% Exclamation \! Double quote \" Hash (number) \#
+% Dollar \$ Percent \% Ampersand \&
+% Acute accent \' Left paren \( Right paren \)
+% Asterisk \* Plus \+ Comma \,
+% Minus \- Point \. Solidus \/
+% Colon \: Semicolon \; Less than \<
+% Equals \= Greater than \> Question mark \?
+% Commercial at \@ Left bracket \[ Backslash \\
+% Right bracket \] Circumflex \^ Underscore \_
+% Grave accent \` Left brace \{ Vertical bar \|
+% Right brace \} Tilde \~}
+%
+% ^^A Cheat on doc.sty since this BibTeX commands do not start with '\'
+% \renewcommand*{\bslash}{}
+% ^^A Suppress index entries for \DescribeMacro{}
+% \makeatletter\let\SpecialUsageIndex=\@gobble\makeatother
+%
+% ^^A For some reason I don't understand right now the counter has to be
+% ^^A set to 0. doc.dtx states that this is the default anyway.
+% \setcounter{StandardModuleDepth}{0}
+%
+% \changes{0.2.5}{2008/09/17}{Minor documentation updates}
+% \changes{0.2.4}{2008/03/18}{Removed number of pages from papers with EID in
+% all styles except 'cv'.}
+% \changes{0.2.3}{2008/01/17}{Fixed some minor issues with ACS styles.}
+% \changes{0.2.2}{2007/09/13}{JAmChemSoc now requires truncation of author list
+% after more than 15 names only.}
+% \changes{0.2.2}{2007/09/13}{Added InorgChem.bst}
+% \changes{0.2.0}{2006/07/27}{Renamed european.bst to ChemEurJ.bst}
+% \changes{0.2.0}{2006/07/27}{Renamed american.bst to JAmChemSoc.bst}
+% \changes{0.2.0}{2006/07/27}{Added support for Chem. Commun.}
+% \changes{0.1.2}{2006/05/03}{Added support for a curriculum vitae}
+% \changes{0.1.2}{2006/05/03}{Removed unused function add.blank}
+% \changes{0.1.0}{2006/02/23}{Initial revision}
+% \title{\BibTeX\ Style Files for Chemistry Journals\thanks{This file
+% describes version \fileversion\ and has been last revised \filedate.}}
+% \author{Stephan Schenk\\mail (at) schenk-stephan.de}
+% \maketitle
+%
+% \setcounter{tocdepth}{2}
+% \tableofcontents
+%
+% \section{Introduction}
+%
+% This collection of bibtex style files started with a version intended for
+% \emph{Chem.\ Eur.~J.} The base version of it was created using the
+% marvelous |makebst| program by Patrick W.~Daly. Soon afterwards, a version for
+% \emph{J.~Am.\ Chem.\ Soc.}\ was available, too. With changes to both files
+% becoming more and more complex, everything was merged into a single
+% |chembst.dtx| file to avoid maintaining several versions of the code. Using
+% the |docstrip| utility, the different style files can now easily be generated
+% by running |latex chembst.ins|.
+% Currently, the following journals are supported:
+% \begin{itemize}
+% \item \emph{Chem.\ Commun.}\ (|ChemCommun.bst|)
+% \item \emph{Inorg.\ Chem.}\ (|InorgChem.bst|), which can be used for
+% most of the journals published by the American Chemical Society
+% \item \emph{J.~Am.\ Chem.\ Soc.}\ (|JAmChemSoc.bst|)
+% \item \emph{Chem.\ Eur.~J.}\ (|ChemEurJ.bst|), which can be used for most of
+% the journals published by Wiley
+% \end{itemize}
+% Additionally, the following styles are also supported:
+% \begin{itemize}
+% \item \emph{Curriculum vitae} (|cv.bst|), a style similar to \emph{Chem.\
+% Eur.~J.} that includes the title of an article
+% \end{itemize}
+%
+%
+%
+% \section{Some notes}
+%
+% \subsection{crossref entries}
+% \label{o::crossref}
+%
+% The crossref feature is described in detail in the |btxdoc.dvi| \BibTeX\
+% documentation. Using crossref is a way to inherit information from a parent
+% entry. As an example consider a database containing a @book entry for citing
+% the whole book and a @inbook entry for citing some pages from that book.
+% Naturally, the only difference between both entries is that @inbook contains
+% a |pages| field. All the other information is stored redundantly.
+%
+% Using the crossref feature the @inbook entry can be as simple as
+% \begin{verbatim}
+% @inbook{inbook_key,
+% crossref = {book_key},
+% pages = {1-5},
+% }
+% \end{verbatim}
+% All the other fields (author, publisher, year etc.) are inherited from the
+% parent entry with the key |book_key|.
+%
+% If you do not cite the whole book in your document, i.\,e.\ the document does
+% not contain |\cite{book_key}|, the following will happen. If |book_key| is
+% not cross-referenced more than once\footnote{%
+% You can change that number by passing the argument |-min-crossrefs=number|
+% to bibtex.}
+% everything will look perfectly like a ``normal'' @inbook entry. However, if
+% |book_key| is cross-referenced more than once, the entry corresponding to the
+% whole book will be added automatically to the bibliography and the @inbook
+% entry will be formatted as A. Author in |\cite{book_key}|,
+% pages 1-5.\footnote{%
+% In fact \cs{bibliographycite} is used. See section~\ref{o::customization}
+% for details.}
+% If your document does contain |\cite{book_key}| you will always get the
+% crossref format.
+%
+% This applies to entries of type @inbook, @incollection and @inproceedings.
+%
+%
+%
+% \subsection{JAmChemSoc.bst}
+%
+% The Journal of the American Chemical Society (ACS) now requires
+% that for citations with more than 10 authors the list of authors is
+% abbreviated by giving only the first author followed by \emph{et al.} The
+% style file |JAmChemSoc.bst| automatically takes care of that. However, ACS
+% also
+% requires that for those citations the full list of authors should be given as
+% Supporting Information. The style |JAmChemSoc_all.bst| can be used for this
+% purpose, since it does not abbreviate the list of authors.
+%
+%
+%
+% \subsection{Customization}
+% \label{o::customization}
+%
+% Defaults for several commands used in the |thebibliography| environment are
+% defined at the beginning of the |.bbl| file. To override the default settings
+% define the command before using the \mbox{\cs{bibliography}} command.
+%
+%
+% \DescribeMacro{\url}
+% The \cs{url} command is used to display urls. By default this only selects a
+% typewriter font. However, it is strongly recommened, that you use the package
+% |url.sty| which defines \cs{url} in a more sophisticated way. Due to some
+% problems with multiline urls (spurious '\%' in formatted url) you should use
+% some reasonable new version (3.2 works fine) of |url.sty|.
+%
+%
+% \DescribeMacro{\urlprefix}
+% Every \cs{url} is prefixed by \cs{urlprefix}. By default \cs{urlprefix} does
+% nothing. This command is useful if you have to prepend every url with some
+% text. For \emph{Angew.\ Chem.}, i.\,e., every url must be preceded by ``to be
+% found under''. This can easily be achieved by giving
+% \begin{verbatim}
+% \newcommand{\urlprefix}{to be found under }
+% \end{verbatim}
+%
+%
+% \DescribeMacro{\foreignlanguage}
+% This command is used to temporary switch the language for the title of books
+% etc. By default this does nothing but if you load |babel.sty| then the
+% language will be changed.
+%
+%
+% \DescribeMacro{\bibliographycite}
+% This command is used for formatting crossref entries. It defaults to
+% \cs{cite}. However, if you use |overcite.sty| you may not want superscripted
+% citations in your bibliography. Then you can define \cs{bibliographycite} the
+% following way
+% \begin{verbatim}
+% \newcommand{\bibliographycite}[1]{[\citen{#1}]}}
+% \end{verbatim}
+%
+%
+% \DescribeMacro{\bbl*}
+% Inside the |.bbl| file no text is hard coded and instead the appropriate
+% \cs{bbl*} command is used. The text ``erratum'', i.\,e., is produced by
+% \cs{bblerratum}. Thus one can easily change all the words in the bibliography
+% by defining the appropriate commands.
+% \begin{verbatim}
+% \newcommand{\bblerratum}{\emph{errat.}}
+% \end{verbatim}
+% for instance will give ``\emph{errat.}''. By redefining all necessary commands
+% you can also change the language to some other language than the default
+% english.
+%
+%
+%
+% \section{Description of important entry types}
+%
+% The entry types discussed in this section are those which are most commonly
+% used in writing articles in chemistry. The types listed here refer to entries
+% in the database (i.\,e.\ |*.bib|).
+%
+%
+%
+% \subsection{@article}
+%
+% This entry type is designed for an article in a journal.
+% The entry type has been augmented with several additional fields. Other style
+% files will simply ignore these fields. The following fields are recognized:
+%
+% \begin{description}
+% \item[author] The names of all authors
+% \item[journal] The name of the journal the article was published in
+% \item[year] The year the article has been published
+% \item[volume] The volume this article has been published in
+% \item[pages] The page numbers of the article
+% \item[eid] The electronic identifier of an article. Some journals, i.\,e.\
+% \emph{J.~Chem.\ Phys.} no longer have page numbers associated to an
+% article but only use the EID. If an EID is present |pages| will be
+% ignored.
+% \item[numpages] The number of pages of an article. This will only be used
+% together with an EID.
+% \item[germanpages] When citing articles from \emph{Angew.\ Chem.} one
+% should always give both the german and the english version. If this
+% field is present the style file assumes that this is a citation of
+% \emph{Angew.\ Chem.\ Int.\ Ed.} and automatically appends the correct
+% citation for \emph{Angew.\ Chem.} The year is always the same for
+% both versions and the german volume is easily calculated by adding 73
+% to the english volume. The page range of the german version is taken
+% from the |germanpages| field.
+% \item[erratumyear, erratumvolume, erratumpages, erratumeid,
+% erratumnumpages] If any of these fields is non-empty the information
+% will be used to append a correctly formatted citation of the erratum
+% to the regular citation.
+% \item[note] A free format text that will be appended at the very end of a
+% citation.
+% \end{description}
+%
+%
+%
+% \subsection{@book}
+%
+% This entry type is designed for citing a whole book. If you want to cite only
+% some chapters or pages of a book use @inbook or @incollection (see below).
+% The following fields are recognized:
+%
+% \begin{description}
+% \item[author, editor] The names of all authors or editors. You can only use
+% one of author or editor, but not both.
+% \item[title] The title of the book
+% \item[language] The language of the title
+% \item[edition] The edition of the book
+% \item[volume] The volume of the book
+% \item[series] The series the book is part of
+% \item[publisher] The publisher of the book
+% \item[address] The publisher's address
+% \item[year] The year the book was published in
+% \item[note] A free format text that will be appended at the very end of the
+% citation.
+% \end{description}
+%
+%
+%
+% \subsection{@inbook}
+%
+% This entry type is designed for citing chapters or pages of a book. The final
+% format of the citation is the same as for @book except that the cited
+% chapter(s) and/or pages are appended. For the crossref feature see
+% section~\ref{o::crossref}. The same fields as for @book plus
+% the following are recognized:
+%
+% \begin{description}
+% \item[chapter] The cited chapters
+% \item[pages] The cited pages
+% \end{description}
+%
+%
+%
+% \subsection{@incollection}
+%
+% This entry is also designed for citing chapters or pages of a book and thus
+% very similar to @inbook. However, there is one difference: the present entry
+% is designed for chapter(s) written by some authors in a book edited by
+% others. The final citation looks similar to A. Author, in book title, edited
+% by E. Editor. The crossref feature is discussed in section~\ref{o::crossref}.
+% The same fields as for @inbook (except |title|) plus the following are
+% recognized.
+%
+% \begin{description}
+% \item[booktitle] The name of the book
+% \end{description}
+%
+%
+%
+% \subsection{@masterthesis and @phdthesis}
+%
+% These entries are designed for citing a master's thesis or a PhD thesis. Both
+% entries are very similar. The only difference is the thesis' name. The
+% following fields are recognized:
+%
+% \begin{description}
+% \item[author] The author of the thesis
+% \item[school] The school or university where this thesis work was carried
+% out.
+% \item[address] The school's address
+% \item[year] The year the thesis was finished in.
+% \item[note] A free format text that will be appended at the very end of the
+% citation.
+% \item[url] An url where the thesis can be found.
+% \end{description}
+%
+%
+%
+% \subsection{@program}
+%
+% This entry is designed for citing a program. This is a new entry type which
+% is not contained in the standard \BibTeX\ styles. It allows greater
+% flexibility compared to the @misc entry. The following fields are recognized:
+%
+% \begin{description}
+% \item[author] The program's authors
+% \item[title] The program name
+% \item[description] A short description of the program
+% \item[version] The version/release of the program
+% \item[year] The year the program was published in.
+% \item[publisher] The publisher of the program
+% \item[address] The publisher's address
+% \item[note] A free format text that will be appended at the very end of the
+% citation.
+% \item[url] An url where the program can be found.
+% \end{description}
+%
+%
+% \subsection{@misc}
+%
+% This entry is designed for everything that does not fit into one of the other
+% entry categories. This is for instance useful to cite websites. The following
+% fields are recognized:
+%
+% \begin{description}
+% \item[author] The author of the cited work
+% \item[title] The title of the cited work
+% \item[howpublished] A free format text describing how this work has been
+% published. This is usually empty.
+% \item[year] The year the cited work was published in.
+% \item[note] A free format text that will be appended at the very end of the
+% citation.
+% \item[url] An url where the cited work can be found.
+% \end{description}
+%
+%
+%
+% \subsection{@unpublished}
+%
+% This entry is designed for unpublished results. The following fields are
+% recognized:
+%
+% \begin{description}
+% \item[author] The author(s) of the unpublished work
+% \item[title] The title of the unpublished work
+% \item[year] The year the unpublished work was carried out.
+% \item[note] A free format text explaining what kind of unpublished work
+% this is (i.\,e.\ ``unpublished results'').
+% \item[url] An url where this work can be found.
+% \end{description}
+%
+%
+% \StopEventually{}
+%
+%
+%
+% \section{The implementation}
+%
+% Write the journal this style file is intended for to the file header.
+% \begin{macrocode}
+%% This file is intended for use with:
+%<ChemCommun>%% Chem. Commun.
+%<ChemEurJ>%% Chem.-Eur. J.
+%<InorgChem>%% Inorg. Chem.
+%<JAmChemSoc>%% J. Am. Chem. Soc.
+%<cv>%% a curriculum vitae
+%%
+% \end{macrocode}
+%
+%
+%
+% \subsection{Setup}
+%
+% \begin{macro}{ENTRY}
+% Define all the fields an entry can contain.
+% \begin{macrocode}
+ENTRY
+ {
+ address
+ author
+ booktitle
+ chapter
+ collaboration
+ description
+ edition
+ editor
+ eid
+ erratumeid
+ erratumgermanpages
+ erratumnumpages
+ erratumpages
+ erratumvolume
+ erratumyear
+ germanpages
+ howpublished
+ institution
+ journal
+ key
+ language
+ month
+ note
+ number
+ numpages
+ organization
+ pages
+ publisher
+ school
+ series
+ title
+ type
+ url
+ version
+ volume
+ year
+ }
+ {}
+ { label }
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{INTEGERS}
+% \changes{0.1.2}{2006/05/03}{Removed unused variables, added new.sentence}
+% Define all integer variables.
+% \begin{macrocode}
+INTEGERS {
+ before.all
+ i
+ j
+ longest.label.width
+ mid.sentence
+ multiresult
+ nameptr
+ namesleft
+ new.sentence
+ number.label
+ numnames
+ o
+ output.state
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{STRINGS}
+% Define all string variables.
+% \begin{macrocode}
+STRINGS {
+ bibinfo
+ delimiter
+ longest.label
+ s
+ t
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{bbl.*}
+% Define all the functions for the \LaTeX\ code which returns the words used.
+% \begin{macrocode}
+FUNCTION {bbl.and} { "\bbland{}" }
+FUNCTION {bbl.chap} { "\bblchap{}" }
+FUNCTION {bbl.chapter} { "\bblchapter{}" }
+FUNCTION {bbl.edition} { "\bbledn{}" }
+FUNCTION {bbl.editor} { "\bbled{}" }
+FUNCTION {bbl.editors} { "\bbleds{}" }
+FUNCTION {bbl.eidp} { "\bbleidp{}" }
+FUNCTION {bbl.eidpp} { "\bbleidpp{}" }
+FUNCTION {bbl.erratum} { "\bblerratum{}" }
+FUNCTION {bbl.etal} { "\bbletal{}" }
+FUNCTION {bbl.fifth} { "\bblfiftho{}" }
+FUNCTION {bbl.first} { "\bblfirsto{}" }
+FUNCTION {bbl.fourth} { "\bblfourtho{}" }
+FUNCTION {bbl.in} { "\bblin{}" }
+FUNCTION {bbl.mthesis} { "\bblmthesis{}" }
+FUNCTION {bbl.nd} { "\bblnd{}" }
+FUNCTION {bbl.nr} { "\bblno{}" }
+FUNCTION {bbl.number} { "\bblno{}" }
+FUNCTION {bbl.of} { "\bblof{}" }
+FUNCTION {bbl.page}{ "\bblp{}" }
+FUNCTION {bbl.pages} { "\bblpp{}" }
+FUNCTION {bbl.phdthesis} { "\bblphdthesis{}" }
+FUNCTION {bbl.rd} { "\bblrd{}" }
+FUNCTION {bbl.second} { "\bblsecondo{}" }
+FUNCTION {bbl.st} { "\bblst{}" }
+FUNCTION {bbl.techrep} { "\bbltechrep{}" }
+FUNCTION {bbl.th} { "\bblth{}" }
+FUNCTION {bbl.third} { "\bblthirdo{}" }
+FUNCTION {bbl.volume} { "\bblvol{}" }
+MACRO {jan} {"\bbljan{}"}
+MACRO {feb} {"\bblfeb{}"}
+MACRO {mar} {"\bblmar{}"}
+MACRO {apr} {"\bblapr{}"}
+MACRO {may} {"\bblmay{}"}
+MACRO {jun} {"\bbljun{}"}
+MACRO {jul} {"\bbljul{}"}
+MACRO {aug} {"\bblaug{}"}
+MACRO {sep} {"\bblsep{}"}
+MACRO {oct} {"\bbloct{}"}
+MACRO {nov} {"\bblnov{}"}
+MACRO {dec} {"\bbldec{}"}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{delimiter.*}
+% Define some delimiters used to separate different parts of a citation.
+% \begin{macrocode}
+FUNCTION {delimiter.blank} { " " }
+FUNCTION {delimiter.colon} { ": " }
+FUNCTION {delimiter.comma} { ", " }
+FUNCTION {delimiter.semicolon} { "; " }
+FUNCTION {delimiter.default}
+{
+%<ChemCommun|ChemEurJ|cv> delimiter.comma
+%<JAmChemSoc|InorgChem> delimiter.semicolon
+}
+% \end{macrocode}
+% \end{macro}
+%
+%
+%
+% \subsection{Output related functions}
+%
+% \begin{macro}{output.bibitem}
+% Write \cs{bibitem} and setup new citation.
+% \begin{macrocode}
+FUNCTION {output.bibitem}
+{
+ newline$
+ "\bibitem{" write$
+ cite$ write$
+ "}" write$
+ newline$
+ ""
+ before.all 'output.state :=
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{output.internal}
+% \changes{0.1.2}{2006/05/3}{Removed dead code (variable never got specific
+% value)}
+% This function is finally called by all the other output functions. It first
+% pops the delimiter from the stack. If the (now)
+% top string is non-empty the function appends the delimiter to
+% the (top-1) string and writes it. The old top string is pushed back on the
+% stack at the very end thus leaving it untouched.
+% \begin{macrocode}
+FUNCTION {output.internal}
+{
+ 'delimiter :=
+% \end{macrocode}
+% write only if top string is non-empty
+% \begin{macrocode}
+ duplicate$ empty$
+ 'pop$
+ {
+% \end{macrocode}
+% backup top string
+% \begin{macrocode}
+ 's :=
+ output.state mid.sentence =
+ {
+ delimiter *
+ write$
+ }
+ {
+ output.state before.all =
+ 'write$
+ { add.period$ " " * write$ }
+ if$
+ mid.sentence 'output.state :=
+ }
+ if$
+ s
+ }
+ if$
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{output.check.internal}
+% The function first pops the delimiter from the stack. If the (now) top string
+% is empty it issues a warning, otherwise it calls |output.internal| for
+% writing.
+% \begin{macrocode}
+FUNCTION {output.check.internal}
+{
+ 'delimiter :=
+ 't :=
+ duplicate$ empty$
+ { pop$ "empty " t * " in " * cite$ * warning$ }
+ { delimiter output.internal }
+ if$
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{output}
+% \begin{macro}{output.blank}
+% \begin{macro}{output.comma}
+% \begin{macro}{output.semicolon}
+% These functions just push the appropriate delimiter on the stack and then
+% call |output.internal|.
+% \begin{macrocode}
+FUNCTION {output} { delimiter.default output.internal }
+FUNCTION {output.blank} { delimiter.blank output.internal }
+FUNCTION {output.comma} { delimiter.comma output.internal }
+FUNCTION {output.semicolon} { delimiter.semicolon output.internal }
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{output.check}
+% \begin{macro}{output.check.blank}
+% \begin{macro}{output.check.comma}
+% \begin{macro}{output.check.semicolon}
+% These functions just push the appropriate delimiter and then call
+% |output.check.internal|.
+% \begin{macrocode}
+FUNCTION {output.check} { delimiter.default output.check.internal }
+FUNCTION {output.check.blank} { delimiter.blank output.check.internal }
+FUNCTION {output.check.comma} { delimiter.comma output.check.internal }
+FUNCTION {output.check.semicolon} { delimiter.semicolon output.check.internal }
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+%
+%
+%
+% \subsection{Operators}
+%
+% \begin{macro}{not}
+% Define a logical |not|.
+% \begin{macrocode}
+FUNCTION {not}
+{
+ { #0 }
+ { #1 }
+ if$
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{and}
+% Define a logical |and|.
+% \begin{macrocode}
+FUNCTION {and}
+{
+ 'skip$
+ { pop$ #0 }
+ if$
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{or}
+% Define a logical |or|.
+% \begin{macrocode}
+FUNCTION {or}
+{
+ { pop$ #1 }
+ 'skip$
+ if$
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{multiply}
+% Define a function for multiplying two integers.
+% \begin{macrocode}
+FUNCTION {multiply}
+{
+% \end{macrocode}
+% |i| is the multiplicator and will be used as a counter
+% \begin{macrocode}
+ 'i :=
+% \end{macrocode}
+% |j| is the value to multiplicate by i, thus will be added i times
+% to itself
+% \begin{macrocode}
+ 'j :=
+ #0
+ j #0 =
+% \end{macrocode}
+% if |j==0|, nothing has to be done since the product will always be 0;
+% |i==0| will be handled gracefully by while loop below
+% \begin{macrocode}
+ 'skip$
+ {
+% \end{macrocode}
+% now add |j| |i| times to the 0 on the stack
+% \begin{macrocode}
+ { i }
+ {
+ j +
+ i #1 - 'i :=
+ }
+ while$
+ }
+ if$
+}
+% \end{macrocode}
+% \end{macro}
+%
+%
+%
+% \subsection{Small helper functions}
+%
+% \begin{macro}{bibinfo.check}
+% This function checks whether the top value is a missing field. If so it
+% replaces the top value by an empty string, otherwise the top value is left
+% unchanged.
+% \begin{macrocode}
+FUNCTION {bibinfo.check}
+{
+ duplicate$ missing$
+ { pop$ "" }
+ 'skip$
+ if$
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{bibinfo.warn}
+% This functions first checks whether a field is empty. If so it issues a
+% warning. The topmost value is a description of the current field. If the
+% field is missing, |bibinfo.warn| pushes an empty string, otherwise the value
+% is left unchanged. The behaviour is very similar to |bibinfo.check|.
+% \begin{macrocode}
+FUNCTION {bibinfo.warn}
+{
+ swap$
+ duplicate$ missing$
+ {
+ swap$ "missing " swap$ * " in " * cite$ * warning$ pop$
+ ""
+ }
+ { duplicate$ empty$
+ {
+ swap$ "empty " swap$ * " in " * cite$ * warning$
+ }
+ { swap$
+ pop$
+ }
+ if$
+ }
+ if$
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{bolden}
+% This function returns the \LaTeX\ code for boldening the top string.
+% \begin{macrocode}
+FUNCTION {bolden}
+{
+ duplicate$ empty$
+ { pop$ "" }
+ { "\textbf{" swap$ * "}" * }
+ if$
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{capitalize}
+% This function capitalizes the first letter of a word.
+% \begin{macrocode}
+FUNCTION {capitalize}
+{
+ "\capitalize" swap$ *
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{cat.internal}
+% This function catenates two strings using the delimiter on top of the stack.
+% The second string is at (top-1) position, the first at (top-2). If any of
+% both strings is empty the function just returns the other string without any
+% delimiter.
+% \begin{macrocode}
+FUNCTION {cat.internal}
+{
+ 'delimiter :=
+ duplicate$ empty$
+ 'pop$
+ {
+ swap$
+ duplicate$ empty$
+ 'skip$
+ { delimiter * }
+ if$
+ swap$
+ *
+ }
+ if$
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{cat.blank}
+% \begin{macro}{cat.colon}
+% \begin{macro}{cat.comma}
+% \begin{macro}{cat.default}
+% \begin{macro}{cat.semicolon}
+% These functions just push the appropriate delimiter and call |cat.internal|.
+% \begin{macrocode}
+FUNCTION {cat.blank} { delimiter.blank cat.internal }
+FUNCTION {cat.colon} { delimiter.colon cat.internal }
+FUNCTION {cat.comma} { delimiter.comma cat.internal }
+FUNCTION {cat.default} { delimiter.default cat.internal }
+FUNCTION {cat.semicolon} { delimiter.semicolon cat.internal }
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{eng.ord}
+% This function formats an english ordinal by appending the appropriate string.
+% \begin{macrocode}
+FUNCTION {eng.ord}
+{
+ duplicate$ "1" swap$ *
+ #-2 #1 substring$ "1" =
+ { bbl.th * }
+ { duplicate$ #-1 #1 substring$
+ duplicate$ "1" =
+ { pop$ bbl.st * }
+ { duplicate$ "2" =
+ { pop$ bbl.nd * }
+ { "3" =
+ { bbl.rd * }
+ { bbl.th * }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{is.num}
+% This function checks whether the top character is a number.
+% \begin{macrocode}
+FUNCTION {is.num}
+{
+ chr.to.int$
+ duplicate$ "0" chr.to.int$ < not
+ swap$ "9" chr.to.int$ > not and
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{extract.num}
+% This function extracts a number (as string) from the top string.
+% \begin{macrocode}
+FUNCTION {extract.num}
+{
+ duplicate$ 't :=
+ "" 's :=
+ { t empty$ not }
+ {
+ t #1 #1 substring$
+ t #2 global.max$ substring$ 't :=
+ duplicate$ is.num
+ { s swap$ * 's := }
+ { pop$ "" 't := }
+ if$
+ }
+ while$
+ s empty$
+ 'skip$
+ { pop$ s }
+ if$
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{convert.edition}
+% This functions converts the |edition| field into the appropriate ordinal.
+% \begin{macrocode}
+FUNCTION {convert.edition}
+{
+ extract.num "l" change.case$ 's :=
+ s "first" = s "1" = or
+ { bbl.first 't := }
+ { s "second" = s "2" = or
+ { bbl.second 't := }
+ { s "third" = s "3" = or
+ { bbl.third 't := }
+ { s "fourth" = s "4" = or
+ { bbl.fourth 't := }
+ { s "fifth" = s "5" = or
+ { bbl.fifth 't := }
+ { s #1 #1 substring$ is.num
+ { s eng.ord 't := }
+ { edition 't := }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+ t
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{either.or.check}
+% This function checks whether mutually exclusive fields are present at the
+% same time.
+% \begin{macrocode}
+FUNCTION {either.or.check}
+{
+ empty$
+ 'pop$
+ { "can't use both " swap$ * " fields in " * cite$ * warning$ }
+ if$
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{emphasize}
+% This function returns the \LaTeX\ code for emphasizing the top string.
+% \begin{macrocode}
+FUNCTION {emphasize}
+{
+ duplicate$ empty$
+ { pop$ "" }
+ { "\emph{" swap$ * "}" * }
+ if$
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{fin.entry}
+% This function finalizes a citation. It appends a dot and writes the last
+% text chunk.
+% \begin{macrocode}
+FUNCTION {fin.entry}
+{
+ add.period$
+ write$ newline$
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{format.names}
+% \changes{0.2.2}{2007/09/13}{Added fifteennames option}
+% This function formats a list of names.
+% \begin{macrocode}
+FUNCTION {format.names}
+{
+% bibinfo is the description of the names, i.e. author, editor
+ 'bibinfo :=
+ duplicate$ empty$
+ 'skip$
+ {
+% \end{macrocode}
+% |s| is the full list of names
+% \begin{macrocode}
+ 's :=
+% \end{macrocode}
+% |t| is the formatted name
+% \begin{macrocode}
+ "" 't :=
+% \end{macrocode}
+% |nameptr| is the index of the current name\\
+% |numnames| is the total number of names\\
+% |namesleft| is the number of names yet to format
+% \begin{macrocode}
+ #1 'nameptr :=
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ {
+ s nameptr
+%<ChemCommun|ChemEurJ|cv> "{f.~}{vv~}{ll}{, jj}"
+%<JAmChemSoc|InorgChem> "{vv~}{ll}{, f.}{, jj}"
+ format.name$
+ bibinfo.check
+ 't :=
+ nameptr #1 >
+ {
+% \end{macrocode}
+% The following code chunk checks whether the list of names should be
+% abbreviated by et al.
+% \begin{macrocode}
+ numnames #0
+%<tennames> #10 +
+%<fifteennames> #15 +
+ >
+% \end{macrocode}
+% If no appropriate |docstrip| option is given, the next expression will
+% always be false (|nameptr| is always $>1$, see above). Thus the check is
+% effectively disabled.
+% \begin{macrocode}
+ nameptr #0
+%<namesone> #2 +
+ =
+ and
+ {
+% \end{macrocode}
+% list of names should be truncated, set formatted name to ``others''
+% \begin{macrocode}
+ "others" 't :=
+ #1 'namesleft :=
+ }
+ 'skip$
+ if$
+ delimiter.default *
+ namesleft #1 >
+ { t * }
+ {
+% \end{macrocode}
+% check whether current name is ``others'', if so set formatted name
+% to ``others''
+% \begin{macrocode}
+ s nameptr "{ll}" format.name$
+ duplicate$ "others" =
+ { 't := }
+ { pop$ }
+ if$
+% \end{macrocode}
+% check whether formatted name is ``others'', if so print et al.
+% \begin{macrocode}
+ t "others" =
+ { bbl.etal * }
+ { t * }
+ if$
+ }
+ if$
+ }
+% \end{macrocode}
+% this is the first name
+% \begin{macrocode}
+ 't
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+ }
+ if$
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{get.bbl.editor}
+% Return ``editors'' if |editor| contains more than one name, ``editor''
+% otherwise.
+% \begin{macrocode}
+FUNCTION {get.bbl.editor}
+{
+ editor num.names$ #1 >
+ 'bbl.editors
+ 'bbl.editor
+ if$
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{get.bbl.erratum}
+% Return the formatted string for ``erratum''.
+% \begin{macrocode}
+FUNCTION {get.bbl.erratum}
+{
+ bbl.erratum
+ ":" *
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{multi.page.check}
+% Check whether the top string is only a single page or a range of pages.
+% \begin{macrocode}
+FUNCTION {multi.page.check}
+{
+ 't :=
+ #0 'multiresult :=
+ {
+ multiresult not
+ t empty$ not and
+ }
+ { t #1 #1 substring$
+ duplicate$ "-" =
+ swap$ duplicate$ "," =
+ swap$ "+" =
+ or or
+ { #1 'multiresult := }
+ { t #2 global.max$ substring$ 't := }
+ if$
+ }
+ while$
+ multiresult
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{get.bbl.page}
+% Return a formatted prefix for pages.
+% \begin{macrocode}
+FUNCTION {get.bbl.page}
+{
+ duplicate$ multi.page.check
+ { bbl.pages }
+ { bbl.page }
+ if$
+%<ChemCommun|ChemEurJ|cv> "." *
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{n.dashify}
+% Replace a single ``|-|'' in a range of pages by ``|--|''.
+% \begin{macrocode}
+FUNCTION {n.dashify}
+{
+ 't :=
+ ""
+ { t empty$ not }
+ {
+ t #1 #1 substring$ "-" =
+ {
+ t #1 #2 substring$ "--" = not
+ {
+ "--" *
+ t #2 global.max$ substring$ 't :=
+ }
+ {
+% \end{macrocode}
+% there is more than one '|-|', therefore append all of them to the string
+% on the stack
+% \begin{macrocode}
+ { t #1 #1 substring$ "-" = }
+ {
+ "-" *
+ t #2 global.max$ substring$ 't :=
+ }
+ while$
+ }
+ if$
+ }
+ {
+% \end{macrocode}
+% the current char is not '|-|', therefore just append it
+% \begin{macrocode}
+ t #1 #1 substring$ *
+ t #2 global.max$ substring$ 't :=
+ }
+ if$
+ }
+ while$
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{select.language}
+% \changes{0.1.3}{2006/07/27}{leave empty string on stack (replace pop\$ by
+% skip\$)}
+% Return \LaTeX\ code for changing the language for the string
+% on top of the stack.
+% \begin{macrocode}
+FUNCTION {select.language}
+{
+ duplicate$ empty$
+ 'skip$
+ {
+ language empty$
+ 'skip$
+ { "\foreignlanguage{" language * "}{" * swap$ * "}" * }
+ if$
+ }
+ if$
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{space.word}
+% This function puts spaces around a word.
+% \begin{macrocode}
+FUNCTION {space.word}
+{
+ " " swap$ * " " *
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{str.to.int.warn}
+% Print a warning if top string is not a representation of a valid integer
+% (used by |str.to.int|).
+% \begin{macrocode}
+FUNCTION {str.to.int.warn}
+{
+ "str.to.int: '" swap$ * "' is not a valid integer" * warning$
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{str.to.int}
+% This function converts a string into an integer. A warning is issued if the
+% string is not a valid representation of an integer.
+% \begin{macrocode}
+FUNCTION {str.to.int}
+{
+ duplicate$ empty$
+ {
+ str.to.int.warn
+ #0
+ }
+ {
+% \end{macrocode}
+% assign the original string to |t| for parsing |t| from the end
+% \begin{macrocode}
+ duplicate$ 't :=
+% \end{macrocode}
+% check for sign
+% \begin{macrocode}
+ t #1 #1 substring$ "-" =
+ {
+% \end{macrocode}
+% be sure that ``|-|'' is followed by at least one more character
+% \begin{macrocode}
+ t #2 global.max$ substring$ 't :=
+ t empty$
+ {
+ duplicate$ str.to.int.warn
+ #0
+ }
+ { #-1 }
+ if$
+ }
+ { #1 }
+ if$
+% \end{macrocode}
+% the top stack position contains now $-1$ or $1$ depending on sign\\
+% |o| stores the offset for position inside the number
+% \begin{macrocode}
+ #1 'o :=
+% \end{macrocode}
+% push starting value on stack
+% \begin{macrocode}
+ #0
+ { t empty$ not}
+ {
+% \end{macrocode}
+% get last character
+% \begin{macrocode}
+ t #-1 #1 substring$
+ duplicate$ is.num
+ {
+% \end{macrocode}
+% character is in range [0--9], now multiply by offset and add to value already
+% on stack
+% \begin{macrocode}
+ chr.to.int$ #48 -
+ o multiply
+ +
+% \end{macrocode}
+% remove last character from string, increment offset |o|
+% \begin{macrocode}
+ t #-2 global.max$ substring$ 't :=
+ o #10 multiply 'o :=
+ }
+ {
+% \end{macrocode}
+% the last character was not a digit, therefore
+% pop last character and sum
+% \begin{macrocode}
+ pop$ pop$
+% \end{macrocode}
+% swap sign and original string, duplicate string, print warning
+% \begin{macrocode}
+ swap$ duplicate$ str.to.int.warn
+% \end{macrocode}
+% swap original string and sign, push 0
+% \begin{macrocode}
+ swap$ #0
+% \end{macrocode}
+% break |while| loop
+% \begin{macrocode}
+ "" 't :=
+ }
+ if$
+ }
+ while$
+% \end{macrocode}
+% stack holds value and sign, multiply combines them
+% \begin{macrocode}
+ multiply
+% \end{macrocode}
+% pop copy of original string
+% \begin{macrocode}
+ swap$ pop$
+ }
+ if$
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{tie.or.space.prefix}
+% This function prepends a string with either a space or a ``|~|'' depending on
+% the length of the string.
+% \begin{macrocode}
+FUNCTION {tie.or.space.prefix}
+{
+ duplicate$ text.length$ #3 <
+ { "~" }
+ { " " }
+ if$
+ swap$
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{word.in}
+% This function returns the word ``in'' followed by a space.
+% \begin{macrocode}
+FUNCTION {word.in}
+{
+ bbl.in delimiter.blank *
+}
+% \end{macrocode}
+% \end{macro}
+%
+%
+%
+% \subsection{Field formatting functions}
+%
+% \begin{macro}{format.year.internal}
+% This function applies all necessary formatting for a year on the stack.
+% \begin{macrocode}
+FUNCTION {format.year.internal}
+{
+%<ChemEurJ|cv> bolden
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{format.volume.internal}
+% This function applies all necessary formating for a volume on the stack.
+% \begin{macrocode}
+FUNCTION {format.volume.internal}
+{
+ duplicate$ empty$
+ 'skip$
+ {
+ bbl.volume
+ swap$
+ tie.or.space.prefix
+% \end{macrocode}
+% stack (top-down): volume, tie/space, bbl.volume
+% \begin{macrocode}
+ * *
+ }
+ if$
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{format.authors}
+% This function formats the list of authors. If a |collaboration| field is
+% present its contents is printed and the list of authors is appended in
+% parentheses.
+% \begin{macrocode}
+FUNCTION {format.authors}
+{
+ author "author" format.names
+ duplicate$ empty$
+ 'skip$
+ {
+ collaboration bibinfo.check
+ duplicate$ empty$
+ 'skip$
+ { " (" * swap$ * ")" * }
+ if$
+ *
+ }
+ if$
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{format.booktitle}
+% This function formats the title of a book and switches to an optional foreign
+% language for this title.
+% \begin{macrocode}
+FUNCTION {format.booktitle}
+{
+ booktitle bibinfo.check
+ emphasize
+ select.language
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{format.chapter}
+% \changes{0.1.1}{2006/02/28}{added capitalize to bbl.chapter for JACS}
+% This function formats a chapter. If a |type| field is present its contents is
+% used as a prefix. If it is absent then the default (return value
+% of |bbl.chapter|) will be % used.
+% \begin{macrocode}
+FUNCTION {format.chapter}
+{
+ chapter bibinfo.check
+ duplicate$ empty$
+ 'skip$
+ {
+ type bibinfo.check
+ duplicate$ empty$
+ { pop$ bbl.chapter }
+ { "l" change.case$ }
+ if$
+%<JAmChemSoc|InorgChem> capitalize
+ swap$
+% \end{macrocode}
+% stack (top-down): chapter, type/bbl.chapter
+% \begin{macrocode}
+ tie.or.space.prefix
+ * *
+ }
+ if$
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{format.date}
+% This function formats the date of a citation. All currently supported styles
+% only use the year. It is pushed onto the stack and |format.year.internal| is
+% called to format it.
+% \begin{macrocode}
+FUNCTION {format.date}
+{
+ year bibinfo.check
+ format.year.internal
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{format.edition}
+% This function formats the edition. It is converted into the appropriate
+% english ordinal and the return value of |bbl.edition| will be appended.
+% \begin{macrocode}
+FUNCTION {format.edition}
+{
+ edition bibinfo.check
+ duplicate$ empty$
+ 'skip$
+ {
+ convert.edition
+ output.state mid.sentence =
+ { "l" }
+ { "t" }
+ if$ change.case$
+ " " * bbl.edition *
+%<ChemCommun|ChemEurJ|cv> emphasize
+ }
+ if$
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{format.editors}
+% \changes{0.2.3}{2008/01/17}{ACS does not print 'Eds.' if there are no
+% authors.}
+% This function formats the list of editors.
+% \begin{macrocode}
+FUNCTION {format.editors}
+{
+ editor "editor" format.names
+ duplicate$ empty$
+ 'skip$
+ {
+%<JAmChemSoc|InorgChem> author empty$
+%<JAmChemSoc|InorgChem> 'skip$
+%<JAmChemSoc|InorgChem> {
+%<JAmChemSoc|InorgChem> "," *
+ " " *
+ get.bbl.editor
+ capitalize
+%<ChemCommun|ChemEurJ|cv> "(" swap$ * ")" *
+ *
+%<JAmChemSoc|InorgChem> }
+%<JAmChemSoc|InorgChem> if$
+ }
+ if$
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{format.in.booktitle}
+% This function formats a booktitle an prepends it with ``in''.
+% \begin{macrocode}
+FUNCTION {format.in.booktitle}
+{
+ format.booktitle
+ duplicate$ empty$
+ 'skip$
+ {
+ word.in
+%<JAmChemSoc|InorgChem> capitalize
+ swap$ *
+ }
+ if$
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{format.note}
+% This function formats the |note| field of a citation. Since this is a free
+% format field is content is used unchanged.
+% \begin{macrocode}
+FUNCTION {format.note}
+{
+ note bibinfo.check
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{format.number.series}
+% This function formats number and series if the |volume| field is empty.
+% \begin{macrocode}
+FUNCTION {format.number.series}
+{
+ volume bibinfo.check
+ duplicate$ empty$
+ {
+ number empty$
+ { series bibinfo.check }
+ {
+ series empty$
+ { number bibinfo.check }
+ {
+ output.state mid.sentence =
+ { bbl.number }
+ { bbl.number capitalize }
+ if$
+ number bibinfo.check tie.or.space.prefix * *
+ word.in *
+ series bibinfo.check *
+ }
+ if$
+ }
+ if$
+ }
+ 'skip$
+ if$
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{format.org.or.pub}
+% This function formats an organization or publisher (on the stack) and its
+% address.
+% \begin{macrocode}
+FUNCTION {format.org.or.pub}
+{
+ 't :=
+ address empty$ t empty$ and
+ { "" }
+ {
+ t
+ address bibinfo.check
+ duplicate$ empty$
+ 'pop$
+ {
+%<ChemCommun|ChemEurJ|cv> cat.comma
+%<JAmChemSoc|InorgChem> cat.colon
+ }
+ if$
+ }
+ if$
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{format.organization.address}
+% This function formats an organization and its address. It pushes
+% the organization onto the stack and calls |format.org.or.pub|.
+% \begin{macrocode}
+FUNCTION {format.organization.address}
+{
+ organization bibinfo.check
+ format.org.or.pub
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{format.pages}
+% This function formats a list of pages. The list is prepended with
+% |bbl.page(s)|.
+% \begin{macrocode}
+FUNCTION {format.pages}
+{
+ pages bibinfo.check
+ duplicate$ empty$
+ 'skip$
+ {
+ n.dashify
+ get.bbl.page
+% \end{macrocode}
+% stack top-down: pages prefix, pages
+% \begin{macrocode}
+ swap$
+ tie.or.space.prefix *
+ *
+ }
+ if$
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{format.publisher.address}
+% This function formats a publisher and its address. It pushes
+% the publisher onto the stack and calls |format.org.or.pub|.
+% \begin{macrocode}
+FUNCTION {format.publisher.address}
+{
+ publisher "publisher" bibinfo.warn
+ format.org.or.pub
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{format.thesis.type}
+% This function formats the type of a thesis.
+% \begin{macrocode}
+FUNCTION {format.thesis.type}
+{
+ type
+ duplicate$ empty$
+ 'pop$
+ {
+ swap$ pop$
+ "t" change.case$ bibinfo.check
+ }
+ if$
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{format.title}
+% This function formats a title. It also switches the language temporarily.
+% \begin{macrocode}
+FUNCTION {format.title}
+{
+ title bibinfo.check
+ duplicate$ empty$
+ 'skip$
+ {
+ emphasize
+ select.language
+ }
+ if$
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{format.tr.number}
+% This function formats the number of a technical report.
+% \begin{macrocode}
+FUNCTION {format.tr.number}
+{
+ number bibinfo.check
+ type
+ duplicate$ empty$
+ { pop$ bbl.techrep }
+ 'skip$
+ if$
+ bibinfo.check
+ swap$
+ duplicate$ empty$
+ { pop$ "t" change.case$ }
+ { tie.or.space.prefix * * }
+ if$
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{format.url}
+% \changes{0.2.3}{2008/01/17}{Put URL into a new sentence.}
+% This function formats an url. Each url is prefixed with \cs{urlprefix}. See
+% section \ref{o::customization} for more information.
+% \begin{macrocode}
+FUNCTION {format.url}
+{
+ url bibinfo.check
+ duplicate$ empty$
+ 'skip$
+ {
+ "\urlprefix\url{" swap$ * "}" *
+ new.sentence 'output.state :=
+ }
+ if$
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{format.volume}
+% This function formats the |volume| field. It merely pushes the field's value
+% onto the stack and calls |format.volume.internal| to format it.
+% \begin{macrocode}
+FUNCTION {format.volume}
+{
+ volume bibinfo.check
+ format.volume.internal
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{format.volume.and.series}
+% This function will format the |volume| and |series|, but only if \emph{both}
+% of them are not empty. Otherwise and empty string is returned.
+% \begin{macrocode}
+FUNCTION {format.volume.and.series}
+{
+ volume empty$ series empty$ or
+ { "" }
+ {
+ volume format.volume.internal
+% \end{macrocode}
+% prepend "of"
+% \begin{macrocode}
+ swap$ bbl.of space.word * swap$
+ emphasize
+ *
+ "volume and number" number either.or.check
+ }
+ if$
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{format.volume.noseries}
+% This function formats the volume. If the |series| field is non-empty an empty
+% string is returned.
+% \begin{macrocode}
+FUNCTION {format.volume.noseries}
+{
+ series empty$
+ {
+ volume bibinfo.check
+ format.volume.internal
+%<ChemCommun|ChemEurJ|cv> emphasize
+ }
+ { "" }
+ if$
+}
+% \end{macrocode}
+% \end{macro}
+%
+%
+%
+% \subsection{Functions related to cross-referenced entries}
+%
+% \begin{macro}{bibliography.cite}
+% This function returns the string for citing the document the |crossref|
+% field points to.
+% \begin{macrocode}
+FUNCTION {bibliography.cite}
+{
+ "\bibliographycite{" swap$ * "}" *
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{format.crossref}
+% This function formats the cross-reference.
+% \begin{macrocode}
+FUNCTION {format.crossref}
+{
+ bbl.in " " *
+%<JAmChemSoc|InorgChem> capitalize
+ crossref bibliography.cite *
+}
+% \end{macrocode}
+% \end{macro}
+%
+%
+%
+% \subsection{@article related funtions}
+%
+% \begin{macro}{format.article.cat.journal.year}
+% \changes{0.2.0}{2006/07/27}{NEW}
+% This function catenates the journal name and the year. It is used when
+% formatting an erratum and/or articles in \emph{Angew.~Chem.}
+% \begin{macrocode}
+FUNCTION {format.article.cat.journal.year}
+{
+%<ChemCommun> cat.comma
+%<ChemEurJ|cv|JAmChemSoc|InorgChem> cat.blank
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{format.article.year.internal}
+% This function provides all formatting required for an article which is not
+% already done in |format.date.internal|.
+% \begin{macrocode}
+FUNCTION {format.article.year.internal}
+{
+%<JAmChemSoc|InorgChem> bolden
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{format.article.volume.internal}
+% This function applies all necessary formatting to the volume an article is
+% published in.
+% \begin{macrocode}
+FUNCTION {format.article.volume.internal}
+{
+%<ChemCommun> bolden
+%<ChemEurJ|cv|JAmChemSoc|InorgChem> emphasize
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{format.article.germanpages.volume.internal}
+% This function is used while formatting citations of \emph{Angew.\ Chem.\
+% Int.\ Ed.} It calculates the volume of the german edition from the volume of
+% the english one (on the stack).
+% \begin{macrocode}
+FUNCTION {format.article.germanpages.volume.internal}
+{
+ duplicate$ empty$
+ 'skip$
+ {
+ str.to.int
+ duplicate$ #1 <
+ {
+ pop$
+ "volume in " cite$ * " is not a positive integer value" * warning$
+ ""
+ }
+ {
+% \end{macrocode}
+% vol.~1 of the english edition corresponds to vol.~74 of the german one
+% \begin{macrocode}
+ #73 +
+ int.to.str$
+ format.article.volume.internal
+ }
+ if$
+ }
+ if$
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{format.article.germanpages.pages.internal}
+% This function applies all necessary formatting to pages of \emph{Angew.\
+% Chem.}, the german edition of \emph{Angew.\ Chem.\ Engl.\ Ed.}
+% \begin{macrocode}
+FUNCTION {format.article.germanpages.pages.internal}
+{
+ n.dashify
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{format.article.date}
+% This function formats the date of an article.
+% \begin{macrocode}
+FUNCTION {format.article.date}
+{
+ format.date
+ format.article.year.internal
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{format.article.numpages}
+% This function formats the number of pages of an article. The number of pages
+% (|numpages| field) is only used in conjunction with an EID. The number of
+% pages is assumed to be already on the stack.
+% \begin{macrocode}
+FUNCTION {format.article.numpages}
+{
+ duplicate$ empty$
+ 'skip$
+ {
+ duplicate$ "1" =
+ { "~" * bbl.eidp * }
+ { "~" * bbl.eidpp * }
+ if$
+ "(" swap$ * ")" *
+ }
+ if$
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{format.article.eid}
+% \changes{0.2.4}{2008/03/18}{Include number of pages only for style 'cv'}
+% This function formats the EID of an article.
+% \begin{macrocode}
+FUNCTION {format.article.eid}
+{
+ eid bibinfo.check
+ duplicate$ empty$
+ 'pop$
+ {
+ cat.comma
+%<cv> numpages bibinfo.check
+%<cv> format.article.numpages
+%<cv> cat.blank
+ }
+ if$
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{format.article.journal}
+% This function formats the journal an article was published in.
+% \begin{macrocode}
+FUNCTION {format.article.journal}
+{
+ journal bibinfo.check
+ duplicate$ empty$
+ 'skip$
+ { emphasize }
+ if$
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{format.article.germanpages.journalname}
+% This function formats \emph{Angew.\ Chem.} as the name of the german version
+% of \emph{Angew.\ Chem.\ Int.\ Ed.}
+% \begin{macrocode}
+FUNCTION {format.article.germanpages.journalname}
+{
+ "Angew.\ Chem."
+ emphasize
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{format.article.erratum.germanpages.pages}
+% This function is used for an erratum in \emph{Angew.\ Chem.\ Int.\ Ed.} It
+% formats the pages of the german version.
+% \begin{macrocode}
+FUNCTION {format.article.erratum.germanpages.pages}
+{
+ erratumgermanpages bibinfo.check
+ format.article.germanpages.pages.internal
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{format.article.erratum.year}
+% This function formats the year an erratum was published.
+% \begin{macrocode}
+FUNCTION {format.article.erratum.year}
+{
+ erratumyear bibinfo.check
+ format.year.internal
+ format.article.year.internal
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{format.article.erratum.germanpages.volume}
+% This function is used for an erratum in \emph{Angew.\ Chem.\ Int.\ Ed.} It
+% formats the erratum's volume in the german version.
+% \begin{macrocode}
+FUNCTION {format.article.erratum.germanpages.volume}
+{
+ erratumvolume "erratumvolume" bibinfo.warn
+ format.article.germanpages.volume.internal
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{format.article.erratum.germanpages}
+% \changes{0.2.0}{2006/07/27}{Use format.article.cat.journal.year}
+% This function formats the german version of an erratum published in
+% \emph{Angew.\ Chem.\ Int.\ Ed.}
+% \begin{macrocode}
+FUNCTION {format.article.erratum.germanpages}
+{
+ erratumgermanpages empty$
+ { "" }
+ {
+ format.article.germanpages.journalname
+ format.article.erratum.year format.article.cat.journal.year
+ format.article.erratum.germanpages.volume cat.comma
+ format.article.erratum.germanpages.pages cat.comma
+ }
+ if$
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{format.article.erratum.journal}
+% This function formats the journal of an erratum. Normally this is the same
+% journal the original article was published in.
+% \begin{macrocode}
+FUNCTION {format.article.erratum.journal} { format.article.journal }
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{format.article.erratum.pages}
+% This function formats the pages of an erratum.
+% \begin{macrocode}
+FUNCTION {format.article.erratum.pages}
+{
+ erratumpages bibinfo.check
+ n.dashify
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{format.article.erratum.eid}
+% This function formats the EID of an erratum.
+% \begin{macrocode}
+FUNCTION {format.article.erratum.eid}
+{
+ erratumeid bibinfo.check
+ erratumnumpages bibinfo.check format.article.numpages *
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{format.article.erratum.volume}
+% This function formats the volume of an erratum.
+% \begin{macrocode}
+FUNCTION {format.article.erratum.volume}
+{
+ erratumvolume bibinfo.check
+ format.article.volume.internal
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{format.article.erratum}
+% \changes{0.2.0}{2006/07/27}{Use format.article.cat.journal.year}
+% This function formats an erratum of an article.
+% The erratum will be formatted if one of |erratumyear|, |erratumvolume|,
+% |erratumpages| or |erratumeid| is present.
+% \begin{macrocode}
+FUNCTION {format.article.erratum}
+{
+ erratumyear bibinfo.check empty$
+ erratumvolume bibinfo.check empty$ and
+ erratumpages bibinfo.check empty$ and
+ erratumeid bibinfo.check empty$ and
+ { "" }
+ {
+% \end{macrocode}
+% An erratum was detected.
+% Since at least one field is present, ``erratum:'' can already be printed.
+% \begin{macrocode}
+ get.bbl.erratum
+ format.article.erratum.journal cat.blank
+ format.article.erratum.year format.article.cat.journal.year
+ format.article.erratum.volume cat.comma
+ erratumeid empty$
+ { format.article.erratum.pages }
+ { format.article.erratum.eid }
+ if$
+ cat.comma
+ format.article.erratum.germanpages cat.semicolon
+ }
+ if$
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{format.article.germanpages.pages}
+% This function formats the pages of the german version of an article in
+% \emph{Angew.\ Chem.\ Int.\ Ed.}
+% \begin{macrocode}
+FUNCTION {format.article.germanpages.pages}
+{
+ germanpages bibinfo.check
+ format.article.germanpages.pages.internal
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{format.article.germanpages.volume}
+% This function formats the volume of the german version of an article in
+% \emph{Angew.\ Chem.\ Int.\ Ed.} It pushes the volume of the english version
+% onto the stack and calls |format.article.germanpages.volume.internal| which
+% automatically calculates and formats the german volume.
+% \begin{macrocode}
+FUNCTION {format.article.germanpages.volume}
+{
+ volume "volume" bibinfo.warn
+ format.article.germanpages.volume.internal
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{format.article.germanpages.year}
+% This function formats the year of the german version of an article in
+% \emph{Angew.\ Chem.\ Int.\ Ed.} This is always the same as the english
+% version.
+% \begin{macrocode}
+FUNCTION {format.article.germanpages.year} { format.article.date }
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{format.article.germanpages}
+% \changes{0.2.0}{2006/07/27}{Use format.article.cat.journal.year}
+% This function formats the german version of an article in \emph{Angew.\
+% Chem.\ Int.\ Ed.}
+% \begin{macrocode}
+FUNCTION {format.article.germanpages}
+{
+ germanpages empty$
+ { "" }
+ {
+ format.article.germanpages.journalname
+ format.article.germanpages.year format.article.cat.journal.year
+ format.article.germanpages.volume cat.comma
+ format.article.germanpages.pages cat.comma
+ }
+ if$
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{format.article.pages}
+% This function formats the pages of an article.
+% \begin{macrocode}
+FUNCTION {format.article.pages}
+{
+% \end{macrocode}
+% The stack contains whatever is the text directly preceding pages.
+% \begin{macrocode}
+ pages
+ duplicate$ empty$
+ 'pop$
+ {
+% \end{macrocode}
+% Check whether preceding string is empty.
+% \begin{macrocode}
+ swap$
+ duplicate$ empty$
+% \end{macrocode}
+% If the preceding string is empty, pop it and the pages from stack and call
+% |format.pages|. This means that |pages| is the only text so far (except
+% bibitem).
+% \begin{macrocode}
+ { pop$ pop$ format.pages }
+% \end{macrocode}
+% The preceding string is not empty. Therefore format the pages and append
+% them.
+% \begin{macrocode}
+ {
+ swap$
+ n.dashify
+ cat.comma
+ }
+ if$
+ }
+ if$
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{format.article.title}
+% \changes{0.1.2}{2006/05/3}{NEW}
+% This function formats the title of an article.
+% \begin{macrocode}
+FUNCTION {format.article.title}
+{
+ title bibinfo.check
+ duplicate$ empty$
+ 'skip$
+ {
+ new.sentence 'output.state :=
+ }
+ if$
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{format.article.volume.and.number}
+% This function formats the volume an article was published in. Optionally it
+% appends the issue to the volume.
+% \begin{macrocode}
+FUNCTION {format.article.volume.and.number}
+{
+ volume bibinfo.check
+ duplicate$ empty$
+ 'skip$
+ { bibinfo.check }
+ if$
+ format.article.volume.internal
+%<*number>
+ number bibinfo.check
+ duplicate$ empty$
+ 'skip$
+ {
+ swap$
+ duplicate$ empty$
+ { "there's a number but no volume in " cite$ * warning$ }
+ 'skip$
+ if$
+ swap$
+ "(" swap$ * ")" *
+ }
+ if$
+ *
+%</number>
+}
+% \end{macrocode}
+% \end{macro}
+%
+%
+%
+% \subsection{@book related functions}
+%
+% \begin{macro}{format.book.authors}
+% This function formats the authors of a book. If no authors were given, the
+% editors are used instead.
+% \begin{macrocode}
+FUNCTION {format.book.authors}
+{
+ author empty$
+ { format.editors }
+ {
+ format.authors
+ "author and editor" editor either.or.check
+ }
+ if$
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{format.book.editors}
+% This function formats the editors of a book. If the book has no authors then
+% the editors were already given as a substitute for the authors. In this case,
+% nothing is printed, since the editors should not be given twice.
+% \begin{macrocode}
+FUNCTION {format.book.editors}
+{
+ author empty$
+ { "" }
+ { format.editors }
+ if$
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{format.book.volume.internal}
+% This function formats the volume of a book.
+% \begin{macrocode}
+FUNCTION {format.book.volume.internal}
+{
+ volume bibinfo.check
+ duplicate$ empty$
+ 'skip$
+ {
+ tie.or.space.prefix *
+ bbl.volume swap$ *
+ }
+ if$
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{format.book.volume.and.series}
+% This function formats the volume of a book and the series it is part of. For
+% this function to produce any non-empty output both |volume| and |series| must
+% be non-empty. To format the volume without a series the
+% |format.book.volume.noseries| function is used (see below).
+% \begin{macrocode}
+FUNCTION {format.book.volume.and.series}
+{
+ series bibinfo.check
+ duplicate$ empty$
+ 'skip$
+ {
+%<ChemCommun|ChemEurJ|cv> emphasize
+% \end{macrocode}
+% Now the formatted series is on the stack.
+% \begin{macrocode}
+ format.book.volume.internal
+%<ChemCommun|ChemEurJ|cv> bbl.of space.word *
+% \end{macrocode}
+% stack top-down: formatted volume; formatted series
+% \begin{macrocode}
+%<ChemCommun|ChemEurJ|cv> swap$ *
+%<JAmChemSoc|InorgChem> cat.comma
+ }
+ if$
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{format.book.volume.noseries}
+% This function formats the volume of a book if the |series| field is empty.
+% \begin{macrocode}
+FUNCTION {format.book.volume.noseries}
+{
+ series empty$ not
+ { "" }
+ {
+ format.book.volume.internal
+%<ChemCommun|ChemEurJ|cv> emphasize
+ }
+ if$
+}
+% \end{macrocode}
+% \end{macro}
+%
+%
+%
+% \subsection{@misc related functions}
+%
+% \begin{macro}{misc.empty.check}
+% This function checks whether fields of an |@misc| entry are empty and issues
+% a warning.
+% \begin{macrocode}
+FUNCTION {misc.empty.check}
+{
+ author empty$ title empty$ howpublished empty$
+ month empty$ year empty$ note empty$ url empty$
+ and and and and and and
+ { "all relevant fields are empty in " cite$ * warning$ }
+ 'skip$
+ if$
+}
+% \end{macrocode}
+% \end{macro}
+%
+%
+%
+% \subsection{@program related functions}
+%
+% \begin{macro}{format.program.description}
+% This function formats the description of a program. It also temporarily
+% switches the language.
+% \begin{macrocode}
+FUNCTION {format.program.description}
+{
+ description bibinfo.check
+ duplicate$ empty$
+ 'skip$
+ { select.language }
+ if$
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{format.program.publisher.address}
+% This function formats the publisher of a program and its address.
+% \begin{macrocode}
+FUNCTION {format.program.publisher.address}
+{
+ publisher bibinfo.check
+ format.org.or.pub
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{format.program.title}
+% This function formats the title of a program.
+% \begin{macrocode}
+FUNCTION {format.program.title}
+{
+ title "title" bibinfo.warn
+ duplicate$ empty$
+ 'skip$
+ {
+ "t" change.case$
+ " " swap$ *
+ capitalize
+ emphasize
+ }
+ if$
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{format.program.version}
+% This function formats the version of a program.
+% \begin{macrocode}
+FUNCTION {format.program.version}
+{
+ version
+}
+% \end{macrocode}
+% \end{macro}
+%
+%
+% \subsection{Entry types}
+%
+% \begin{macro}{article}
+% \mbox{}
+% \begin{macrocode}
+FUNCTION {article}
+{
+ output.bibitem
+ format.authors "author"
+%<ChemCommun|ChemEurJ|cv> output.check
+%<JAmChemSoc|InorgChem> output.check.blank
+%<cv> format.article.title "title" output.check
+%<cv> new.sentence 'output.state :=
+ format.article.journal "journal"
+%<ChemCommun|ChemEurJ|cv> output.check
+%<JAmChemSoc|InorgChem> output.check.blank
+ format.article.date "year"
+% \end{macrocode}
+% If you change the way journal name and publication year are catenated, do not
+% forget to change |format.article.cat.journal.year|.
+% \begin{macrocode}
+%<ChemCommun> output.check
+%<ChemEurJ|cv|JAmChemSoc|InorgChem> output.check.blank
+ format.article.volume.and.number output.comma
+ eid empty$
+ { format.article.pages }
+ { format.article.eid }
+ if$
+ format.article.germanpages output.semicolon
+ format.article.erratum output.semicolon
+ format.note output
+ fin.entry
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{book}
+% \mbox{}
+% \begin{macrocode}
+FUNCTION {book}
+{
+ output.bibitem
+ format.book.authors "author and editor" output.check
+ format.title "title"
+%<ChemCommun|ChemEurJ|cv> output.check.comma
+%<JAmChemSoc|InorgChem> output.check.blank
+ format.edition
+%<ChemCommun|ChemEurJ|cv> output.blank
+%<JAmChemSoc|InorgChem> output.comma
+%<JAmChemSoc|InorgChem> format.book.editors output.semicolon
+ format.book.volume.and.series output
+%<ChemCommun|ChemEurJ|cv> format.book.volume.noseries output
+%<ChemCommun|ChemEurJ|cv> format.book.editors output.comma
+ format.publisher.address output
+ format.date "year" output.check.comma
+%<JAmChemSoc|InorgChem> format.volume.noseries output.semicolon
+ format.note output
+ fin.entry
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{booklet}
+% \mbox{}
+% \begin{macrocode}
+FUNCTION {booklet}
+{
+ output.bibitem
+ format.authors output
+ format.title "title" output.check
+ howpublished bibinfo.check output
+ address bibinfo.check output
+ format.date output
+ format.note output
+ fin.entry
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{inbook}
+% \mbox{}
+% \begin{macrocode}
+FUNCTION {inbook}
+{
+ output.bibitem
+ format.book.authors "author and editor" output.check
+ crossref missing$
+ {
+ format.title "title"
+%<ChemCommun|ChemEurJ|cv> output.check.comma
+%<JAmChemSoc|InorgChem> output.check.blank
+ format.edition
+%<ChemCommun|ChemEurJ|cv> output.blank
+%<JAmChemSoc|InorgChem> output.comma
+%<JAmChemSoc|InorgChem> format.book.editors output.semicolon
+ format.book.volume.and.series output
+%<ChemCommun|ChemEurJ|cv> format.book.volume.noseries output
+%<ChemCommun|ChemEurJ|cv> format.book.editors output.comma
+ format.publisher.address output
+ format.date "year" output.check.comma
+% \end{macrocode}
+% The \emph{J.~Am.\ Chem.\ Soc.} requires ``; volume, chapter, pages''.
+% To handle empty entries gracefully we cat them together and write the entire
+% string afterwards.
+% \begin{macrocode}
+%<JAmChemSoc|InorgChem> format.volume.noseries
+%<ChemCommun|ChemEurJ|cv> ""
+ }
+ {
+ format.crossref output.blank
+% \end{macrocode}
+% Push an empty string since there will not be a volume.
+% \begin{macrocode}
+ ""
+ }
+ if$
+ format.chapter cat.comma
+ format.pages cat.comma
+ output
+ format.note output
+ fin.entry
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{incollection}
+% \changes{0.2.1}{2007/02/28}{Added title for style cv}
+% \mbox{}
+% \begin{macrocode}
+FUNCTION {incollection}
+{
+ output.bibitem
+ format.authors "author" output.check
+%<cv> format.title "title" output.check
+ crossref missing$
+ {
+ format.in.booktitle "booktitle" output.check.blank
+ format.edition
+%<ChemCommun|ChemEurJ|cv> output.blank
+%<JAmChemSoc|InorgChem> output.comma
+%<JAmChemSoc|InorgChem> format.book.editors output.semicolon
+ format.book.volume.and.series output
+%<ChemCommun|ChemEurJ|cv> format.book.volume.noseries output
+%<ChemCommun|ChemEurJ|cv> format.book.editors output.comma
+ format.publisher.address output
+ format.date "year" output.check.comma
+% \end{macrocode}
+% The \emph{J.~Am.\ Chem.\ Soc.} requires ``; volume, chapter, pages''.
+% To handle empty entries gracefully we cat them together and write the entire
+% string afterwards.
+% \begin{macrocode}
+%<JAmChemSoc|InorgChem> format.volume.noseries
+%<ChemCommun|ChemEurJ|cv> ""
+ }
+ {
+ format.crossref output.blank
+% \end{macrocode}
+% Push an empty string since there will not be a volume.
+% \begin{macrocode}
+ ""
+ }
+ if$
+ format.chapter cat.comma
+ format.pages cat.comma
+ output
+ format.note output
+ fin.entry
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{inproceedings}
+% \changes{0.2.1}{2007/02/27}{Added title for style cv}
+% \changes{0.2.1}{2007/02/28}{Fixed formating of volume and series}
+% \mbox{}
+% \begin{macrocode}
+FUNCTION {inproceedings}
+{
+ output.bibitem
+ format.authors "author" output.check
+%<cv> format.title "title" output.check
+ crossref missing$
+ {
+ format.in.booktitle "booktitle" output.check.blank
+ publisher empty$
+ { format.organization.address output }
+ {
+ organization bibinfo.check output
+ format.publisher.address output
+ }
+ if$
+ format.book.volume.and.series output
+ }
+ { format.crossref output.blank }
+ if$
+ format.pages "pages" output.check
+ format.note output
+ format.url output
+ fin.entry
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{manual}
+% \mbox{}
+% \begin{macrocode}
+FUNCTION {manual}
+{
+ output.bibitem
+ author empty$
+ {
+ organization bibinfo.check
+ duplicate$ empty$
+ 'pop$
+ {
+ output
+ address bibinfo.check output
+ }
+ if$
+ }
+ { format.authors output }
+ if$
+ format.title "title" output.check
+ author empty$
+ {
+ organization empty$
+ { address bibinfo.check output }
+ 'skip$
+ if$
+ }
+ {
+ organization bibinfo.check output
+ address bibinfo.check output
+ }
+ if$
+ format.edition output
+ format.date output
+ format.note output
+ format.url output
+ fin.entry
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{mastersthesis}
+% \mbox{}
+% \begin{macrocode}
+FUNCTION {mastersthesis}
+{
+ output.bibitem
+ format.authors "author" output.check
+ bbl.mthesis format.thesis.type output
+ school "school" bibinfo.warn output
+ address bibinfo.check output
+ format.date "year" output.check
+ format.note output
+ format.url output
+ fin.entry
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{misc}
+% \mbox{}
+% \begin{macrocode}
+FUNCTION {misc}
+{
+ output.bibitem
+ format.authors output
+ format.title output
+ howpublished bibinfo.check output
+ format.date output
+ format.note output
+ format.url output
+ fin.entry
+ misc.empty.check
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{phdthesis}
+% \changes{0.2.1}{2007/02/27}{Added title for style cv}
+% \mbox{}
+% \begin{macrocode}
+FUNCTION {phdthesis}
+{
+ output.bibitem
+ format.authors "author" output.check
+%<cv> format.title "title" output.check
+ bbl.phdthesis format.thesis.type output
+ school "school" bibinfo.warn output
+ address bibinfo.check output
+ format.date "year" output.check
+ format.note output
+ format.url output
+ fin.entry
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{proceedings}
+% \mbox{}
+% \begin{macrocode}
+FUNCTION {proceedings}
+{
+ output.bibitem
+ editor empty$
+ { organization bibinfo.check output }
+ { format.editors output }
+ if$
+ format.title "title" output.check
+ format.volume output
+ format.number.series output
+ editor empty$
+ {
+ publisher empty$
+ 'skip$
+ { format.publisher.address output }
+ if$
+ }
+ {
+ publisher empty$
+ { format.organization.address output }
+ {
+ organization bibinfo.check output
+ format.publisher.address output
+ }
+ if$
+ }
+ if$
+%<ChemCommun|ChemEurJ|cv> format.date "year" output.check
+ format.note output
+ format.url output
+ fin.entry
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{program}
+% \changes{0.2.3}{2008/01/17}{ACS does not like a delimiter after last author
+% name}
+% \mbox{}
+% \begin{macrocode}
+FUNCTION {program}
+{
+ output.bibitem
+ format.authors output
+ format.program.title "title"
+%<ChemCommun|ChemEurJ|cv> output.check
+%<JAmChemSoc|InorgChem> output.check.blank
+ format.program.description output.comma
+ format.program.version output
+%<ChemCommun|ChemEurJ|cv> format.date output
+ format.program.publisher.address output
+%<JAmChemSoc|InorgChem> format.date output.comma
+ format.note output
+ format.url output
+ fin.entry
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{techreport}
+% \mbox{}
+% \begin{macrocode}
+FUNCTION {techreport}
+{
+ output.bibitem
+ format.authors "author" output.check
+ format.title
+ "title" output.check
+ format.tr.number output
+ institution "institution" bibinfo.warn output
+ address bibinfo.check output
+ format.date "year" output.check
+ format.note output
+ format.url output
+ fin.entry
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{unpublished}
+% \mbox{}
+% \begin{macrocode}
+FUNCTION {unpublished}
+{
+ output.bibitem
+ format.authors "author" output.check
+ format.title "title" output
+ format.date output
+ format.note "note" output.check
+ format.url output
+ fin.entry
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{conference}
+% |conference| is an alias for |inproceedings|.
+% \begin{macrocode}
+FUNCTION {conference} { inproceedings }
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{default.type}
+% The default type is |misc|.
+% \begin{macrocode}
+FUNCTION {default.type} { misc }
+% \end{macrocode}
+% \end{macro}
+%
+%
+%
+% \subsection{Main program}
+%
+% \begin{macro}{begin.bib}
+% This function starts the bibliography by opening the |thebibliography|
+% environment.
+% \begin{macrocode}
+FUNCTION {begin.bib}
+{
+ "\begin{thebibliography}{" longest.label * "}" * write$ newline$
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{end.bib}
+% This function ends the bibliography by closing the |thebibliography|
+% environment.
+% \begin{macrocode}
+FUNCTION {end.bib}
+{
+ newline$
+ "\end{thebibliography}" write$ newline$
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{initialize.longest.label}
+% This function sets up the variables for the longest label.
+% \begin{macrocode}
+FUNCTION {initialize.longest.label}
+{
+ "" 'longest.label :=
+ #1 'number.label :=
+ #0 'longest.label.width :=
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{init.consts}
+% \changes{0.1.2}{2006/05/03}{Added new.sentence initialization}
+% This function sets up some constant used while formatting the bibliography.
+% \begin{macrocode}
+FUNCTION {init.consts}
+{
+ #0 'before.all :=
+ #1 'mid.sentence :=
+ #2 'new.sentence :=
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{longest.label.pass}
+% This function is used to determine the length of the longest label.
+% It checks whether the current label is longer than the current longest label.
+% If so, it updates |longest.label.width|.
+% \begin{macrocode}
+FUNCTION {longest.label.pass}
+{
+ number.label int.to.str$ 'label :=
+ number.label #1 + 'number.label :=
+ label width$ longest.label.width >
+ {
+ label 'longest.label :=
+ label width$ 'longest.label.width :=
+ }
+ 'skip$
+ if$
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{write.babel.misc}
+% This function writes the default definitions of some commands used in
+% formatting a citation.
+% \begin{macrocode}
+FUNCTION {write.babel.misc}
+{
+ "\providecommand{\bbland}{and}" write$ newline$
+ "\providecommand{\bblchap}{chap.}" write$ newline$
+ "\providecommand{\bblchapter}{chapter}" write$ newline$
+ "\providecommand{\bbletal}{et~al.}" write$ newline$
+ "\providecommand{\bbleditors}{editors}" write$ newline$
+ "\providecommand{\bbleds}{eds.}" write$ newline$
+ "\providecommand{\bbleditor}{editor}" write$ newline$
+ "\providecommand{\bbled}{ed.}" write$ newline$
+ "\providecommand{\bbledition}{edition}" write$ newline$
+ "\providecommand{\bbledn}{ed.}" write$ newline$
+ "\providecommand{\bbleidp}{page}" write$ newline$
+ "\providecommand{\bbleidpp}{pages}" write$ newline$
+ "\providecommand{\bblerratum}{erratum}" write$ newline$
+ "\providecommand{\bblin}{in}" write$ newline$
+ "\providecommand{\bblmthesis}{Master's thesis}" write$ newline$
+ "\providecommand{\bblno}{no.}" write$ newline$
+ "\providecommand{\bblnumber}{number}" write$ newline$
+ "\providecommand{\bblof}{of}" write$ newline$
+ "\providecommand{\bblpage}{page}" write$ newline$
+ "\providecommand{\bblpages}{pages}" write$ newline$
+ "\providecommand{\bblp}{p}" write$ newline$
+ "\providecommand{\bblphdthesis}{Ph.D. thesis}" write$ newline$
+ "\providecommand{\bblpp}{pp}" write$ newline$
+ "\providecommand{\bbltechrep}{Tech. Rep.}" write$ newline$
+ "\providecommand{\bbltechreport}{Technical Report}" write$ newline$
+ "\providecommand{\bblvolume}{volume}" write$ newline$
+ "\providecommand{\bblvol}{Vol.}" write$ newline$
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{write.babel.months}
+% This function writes the default names of the months.
+% \begin{macrocode}
+FUNCTION {write.babel.months}
+{
+ "\providecommand{\bbljan}{January}" write$ newline$
+ "\providecommand{\bblfeb}{February}" write$ newline$
+ "\providecommand{\bblmar}{March}" write$ newline$
+ "\providecommand{\bblapr}{April}" write$ newline$
+ "\providecommand{\bblmay}{May}" write$ newline$
+ "\providecommand{\bbljun}{June}" write$ newline$
+ "\providecommand{\bbljul}{July}" write$ newline$
+ "\providecommand{\bblaug}{August}" write$ newline$
+ "\providecommand{\bblsep}{September}" write$ newline$
+ "\providecommand{\bbloct}{October}" write$ newline$
+ "\providecommand{\bblnov}{November}" write$ newline$
+ "\providecommand{\bbldec}{December}" write$ newline$
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{write.babel.ordinals}
+% This function writes the default names of the ordinals.
+% \begin{macrocode}
+FUNCTION {write.babel.ordinals}
+{
+ "\providecommand{\bblfirst}{First}" write$ newline$
+ "\providecommand{\bblfirsto}{1st}" write$ newline$
+ "\providecommand{\bblsecond}{Second}" write$ newline$
+ "\providecommand{\bblsecondo}{2nd}" write$ newline$
+ "\providecommand{\bblthird}{Third}" write$ newline$
+ "\providecommand{\bblthirdo}{3rd}" write$ newline$
+ "\providecommand{\bblfourth}{Fourth}" write$ newline$
+ "\providecommand{\bblfourtho}{4th}" write$ newline$
+ "\providecommand{\bblfifth}{Fifth}" write$ newline$
+ "\providecommand{\bblfiftho}{5th}" write$ newline$
+ "\providecommand{\bblst}{st}" write$ newline$
+ "\providecommand{\bblnd}{nd}" write$ newline$
+ "\providecommand{\bblrd}{rd}" write$ newline$
+ "\providecommand{\bblth}{th}" write$ newline$
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{write.babel}
+% This function writes the default of all words used for formatting a citation.
+% \begin{macrocode}
+FUNCTION {write.babel}
+{
+ write.babel.misc
+ write.babel.months
+ write.babel.ordinals
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{write.commands}
+% \changes{0.2.1}{2007/02/28}{Replaced newcommand by providecommand for
+% capitalize}
+% This function writes the commands used in a citation.
+% \begin{macrocode}
+FUNCTION {write.commands}
+{
+ "\providecommand{\url}[1]{\texttt{#1}}" write$ newline$
+ "\providecommand{\urlprefix}{}" write$ newline$
+ "\providecommand{\foreignlanguage}[2]{#2}" write$ newline$
+ "\providecommand{\Capitalize}[1]{\uppercase{#1}}" write$ newline$
+ "\providecommand{\capitalize}[1]{\expandafter\Capitalize#1}" write$ newline$
+ "\providecommand{\bibliographycite}[1]{\cite{#1}}" write$ newline$
+ write.babel
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{write.header}
+% This function writes the header of the |.bbl| file. It does not, however,
+% start the |thebibliography| environment. The contents of |@preamble| is
+% always written first.
+% \begin{macrocode}
+FUNCTION {write.header}
+{
+ preamble$ empty$
+ 'skip$
+ { preamble$ write$ newline$ }
+ if$
+ write.commands
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{main}
+% Read all required entries from the database. The entries are in citation
+% order.
+% \begin{macrocode}
+READ
+% \end{macrocode}
+% Determine the length of the longest label.
+% \begin{macrocode}
+EXECUTE {initialize.longest.label}
+ITERATE {longest.label.pass}
+% \end{macrocode}
+% Write the header to the file and open the |thebibliography| environment.
+% \begin{macrocode}
+EXECUTE {init.consts}
+EXECUTE {write.header}
+EXECUTE {begin.bib}
+% \end{macrocode}
+% Format all entries
+% \begin{macrocode}
+ITERATE {call.type$}
+% \end{macrocode}
+% Close the |thebibliography| environment.
+% \begin{macrocode}
+EXECUTE {end.bib}
+% \end{macrocode}
+% \end{macro}
+%
+%
+%
+% \Finale
+% \PrintChanges
+% \setcounter{IndexColumns}{2}
+% \PrintIndex
diff --git a/biblio/bibtex/contrib/chembst/chembst.ins b/biblio/bibtex/contrib/chembst/chembst.ins
new file mode 100644
index 0000000000..d76eb3c6c1
--- /dev/null
+++ b/biblio/bibtex/contrib/chembst/chembst.ins
@@ -0,0 +1,70 @@
+%%
+%% File: chembst.ins Copyright (C) 2005-2006 Stephan Schenk
+%%
+%% Stephan Schenk,
+%% e-mail: mail@schenk-stephan.de
+%%
+%% This program may be distributed and/or modified under the
+%% conditions of the LaTeX Project Public License, either version 1.3
+%% of this license or (at your option) any later version.
+%% The latest version of this license is in
+%% http://www.latex-project.org/lppl.txt
+%%
+%% This program consists of the files chembst.dtx and chembst.ins
+%%
+
+\input docstrip
+
+\keepsilent
+\askforoverwritefalse
+
+\preamble
+
+*****
+
+IMPORTANT NOTICE:
+
+For the copyright see below.
+
+Any modified versions of this file must be renamed
+with new filenames distinct from \outFileName.
+For distribution of the original source see the terms
+for copying and modification in the file \inFileName.
+
+This generated file may be distributed as long as the
+original source files, as listed above, are part of the
+same distribution. (The sources need not necessarily be
+in the same archive or directory.)
+
+*****
+
+The preliminary version of this bibliographic style file has been created
+using the `makebst' program. The original header included:
+
+Copyright 1994-2005 Patrick W Daly
+===============================================================
+IMPORTANT NOTICE:
+This bibliographic style (bst) file has been generated from one or
+more master bibliographic style (mbs) files, listed above [merlin.mbs].
+
+This generated file can be redistributed and/or modified under the terms
+of the LaTeX Project Public License Distributed from CTAN
+archives in directory macros/latex/base/lppl.txt; either
+version 1 of the License, or any later version.
+===============================================================
+
+*****
+
+\endpreamble
+
+\nopostamble
+
+\generate{
+ \file{ChemCommun.bst}{\from{chembst.dtx}{ChemCommun}}
+ \file{ChemEurJ.bst}{\from{chembst.dtx}{ChemEurJ}}
+ \file{InorgChem.bst}{\from{chembst.dtx}{InorgChem}}
+ \file{JAmChemSoc.bst}{\from{chembst.dtx}{JAmChemSoc,fifteennames,namesone}}
+ \file{JAmChemSoc_all.bst}{\from{chembst.dtx}{JAmChemSoc}}
+ \file{cv.bst}{\from{chembst.dtx}{cv}}
+}
+\endbatchfile
diff --git a/biblio/bibtex/contrib/chembst/chembst.pdf b/biblio/bibtex/contrib/chembst/chembst.pdf
new file mode 100644
index 0000000000..e3381f1566
--- /dev/null
+++ b/biblio/bibtex/contrib/chembst/chembst.pdf
Binary files differ
diff --git a/biblio/bibtex/contrib/chicago-annote/README b/biblio/bibtex/contrib/chicago-annote/README
new file mode 100644
index 0000000000..b4be68673e
--- /dev/null
+++ b/biblio/bibtex/contrib/chicago-annote/README
@@ -0,0 +1,2 @@
+Revision of chicagoa annotated bibliography style to use semi-standard
+`annote' field instead of non-standard `annotation' field. \ No newline at end of file
diff --git a/biblio/bibtex/contrib/chicago-annote/chicago-annote.bst b/biblio/bibtex/contrib/chicago-annote/chicago-annote.bst
new file mode 100644
index 0000000000..90cf31d519
--- /dev/null
+++ b/biblio/bibtex/contrib/chicago-annote/chicago-annote.bst
@@ -0,0 +1,1689 @@
+%%% ====================================================================
+%%% @BibTeX-style-file{
+%%% author = "Aarre Laakso",
+%%% version = "1",
+%%% date = "30 January 2009",
+%%% time = "10:24:38 199",
+%%% filename = "chicago-annote.bst",
+%%% email = "aarre@pair.com",
+%%% codetable = "ISO/ASCII",
+%%% keywords = "annotate annotation",
+%%% supported = "yes",
+%%% abstract = "A BibTeX bibliography style that follows the
+%%% `B' reference style of the 13th Edition of
+%%% the Chicago Manual of Style. Supports annotated
+%%% bibliographies through the BibTeX field
+%%% `annote'. A detailed feature list is given
+%%% below.",
+%%% }
+%%% ====================================================================
+%
+% "Chicago" BibTeX style, chicago-annote.bst - Chicago style with annotations
+% =====================================================================
+%
+% Copyright 2009 Aarre Laakso <aarre@pair.com>
+%
+% This work may be distributed and/or modified under the
+% conditions of the LaTeX Project Public License, either version 1.3
+% of this license or (at your option) any later version.
+% The latest version of this license is in
+% http://www.latex-project.org/lppl.txt
+% and version 1.3 or later is part of all distributions of LaTeX
+% version 2005/12/01 or later.
+%
+% This work has the LPPL maintenance status `maintained'.
+%
+% The Current Maintainer of this work is Aarre Laakso.
+%
+% This work consists of the file chicago-annote.bst.
+%
+% BibTeX `chicago-annote' style file for BibTeX version 0.99c, LaTeX version 2.09
+% Place it in a file called chicago-annote.bst in the BibTeX search path.
+% You need to include chicago.sty as a \documentstyle option.
+% (Placing it in the same directory as the LaTeX document should also work.)
+% The "chicago" and "chicagoa" styles were originall based on newapa.bst (American Psych. Assoc.)
+% found at ymir.claremont.edu. Annotation support added 07/09/92 by Glenn Paulley.
+% Modifications are loosely based on Chicago Manual of Style. Changed to use
+% semi-standard `annote' field instead of non-standard `annotation' field by
+% Aarre Laakso on 30 January 2009 and renamed to `chicago-annote' instead of
+% `chicagoa' in order to avoid confusion with the origina.
+%
+% Citation format: (author-last-name year)
+% (author-last-name and author-last-name year)
+% (author-last-name, author-last-name, and author-last-name year)
+% (author-last-name et al. year)
+% (author-last-name)
+% author-last-name (year)
+% (author-last-name and author-last-name)
+% (author-last-name et al.)
+% (year) or (year,year)
+% year or year,year
+%
+% Reference list ordering: alphabetical by author or whatever passes
+% for author in the absence of one.
+%
+% This BibTeX style has support for abbreviated author lists and for
+% year-only citations. This is done by having the citations
+% actually look like
+%
+% \citeauthoryear{full-author-info}{abbrev-author-info}{year}
+%
+% The LaTeX style has to have the following (or similar)
+%
+% \let\@internalcite\cite
+% \def\fullcite{\def\citeauthoryear##1##2##3{##1, ##3}\@internalcite}
+% \def\fullciteA{\def\citeauthoryear##1##2##3{##1}\@internalcite}
+% \def\shortcite{\def\citeauthoryear##1##2##3{##2, ##3}\@internalcite}
+% \def\shortciteA{\def\citeauthoryear##1##2##3{##2}\@internalcite}
+% \def\citeyear{\def\citeauthoryear##1##2##3{##3}\@internalcite}
+%
+% These TeX macro definitions are found in chicago.sty. Additional
+% commands to manipulate different components of a citation can be defined
+% so that, for example, you can list author's names without parentheses
+% if using a citation as a noun or object in a sentence.
+%
+% This file was originally copied from chicagoa.bst on CTAN
+%
+% Features of chicago-annote.bst:
+% =======================
+%
+% - supports an "annote" field for annotated bibliographies.
+% - full names used in citations, but abbreviated citations are available
+% (see above)
+% - if an entry has a "month", then the month and year are also printed
+% as part of that bibitem.
+% - all conjunctions use "and" instead of "\&"
+% - major modification from Chicago Manual of Style (13th ed.) is that
+% only the first author in a reference appears last name first-
+% additional authors appear as J. Q. Public.
+% - pages are listed as "pp. xx-xx" in all entry types except
+% article entries.
+% - book, inbook, and manual use "location: publisher" (or organization)
+% for address and publisher. All other types list publishers separately.
+% - "pp." are used to identify page numbers for all entry types except
+% articles.
+% - organization is used as a citation label if neither author nor editor
+% is present (for manuals).
+% - "et al." is used for long author and editor lists, or when "others"
+% is used.
+%
+% Modifications and bug fixes from newapa.bst:
+% ===========================================
+%
+% - added month, year to bib entries if month is present
+% - fixed bug with In proceedings, added necessary comma after title
+% - all conjunctions changed to "and" from "\&"
+% - fixed bug with author labels in my.full.label: "et al." now is
+% generated when "others" is an author name
+% - major modification from Chicago Manual of Style (13th ed.) is that
+% only the first author in a reference appears last name first-
+% additional authors appear as J. Q. Public.
+% - pages are listed as "pp. xx-xx" in all entry types except
+% article entries. Unnecessary (IMHO) "()" around page numbers
+% were removed, and page numbers now don't end with a period.
+% - created chicago.sty for use with this bibstyle (required).
+% - fixed bugs in FUNCTION {format.vol.num.pages} for missing volume,
+% number, and /or pages. Renamed to format.jour.vol.
+% - fixed bug in formatting booktitles: additional period an error if
+% book has a volume.
+% - fixed bug: editors usually given redundant period before next clause
+% (format.editors.dot) removed.
+% - added label support for organizations, if both author and editor
+% are missing (from alpha.bst). If organization is too long, then
+% the key field is used for abbreviated citations.
+% - In proceedings or books of several volumes, no comma was written
+% between the "Volume x" and the page numbers (this was intentional
+% in newapa.bst). Fixed.
+% - Some journals may not have volumes/numbers, only month/year (eg.
+% IEEE Computer). Fixed bug in article style that assumed volume/number
+% was always present.
+%
+% Original documentation for newapa.sty:
+% =====================================
+%
+% This version was made by modifying the master file made by
+% Oren Patashnik (PATASHNIK@SCORE.STANFORD.EDU), and the 'named' BibTeX
+% style of Peter F. Patel-Schneider.
+%
+% Copyright (C) 1985, all rights reserved.
+% Copying of this file is authorized only if either
+% (1) you make absolutely no changes to your copy, including name, or
+% (2) if you do make changes, you name it something other than 'newapa.bst'.
+% There are undoubtably bugs in this style. If you make bug fixes,
+% improvements, etc. please let me know. My e-mail address is:
+% spencer@cgrg.ohio.state.edu or 71160.3141@compuserve.com
+%
+% This style was made from 'plain.bst', 'named.bst', and 'apalike.bst',
+% with lots of tweaking to make it look like APA style, along with tips
+% from Young Ryu and Brian Reiser's modifications of 'apalike.bst'.
+
+ENTRY
+ { address
+ annote
+ author
+ booktitle
+ chapter
+ edition
+ editor
+ howpublished
+ institution
+ journal
+ key
+ month
+ note
+ number
+ organization
+ pages
+ publisher
+ school
+ series
+ title
+ type
+ volume
+ year
+ }
+ {}
+ { label.year extra.label sort.year sort.label }
+
+INTEGERS { output.state before.all mid.sentence after.sentence after.block }
+
+FUNCTION {init.state.consts}
+{ #0 'before.all :=
+ #1 'mid.sentence :=
+ #2 'after.sentence :=
+ #3 'after.block :=
+}
+
+STRINGS { s t u }
+
+FUNCTION {output.nonnull}
+{ 's :=
+ output.state mid.sentence =
+ { ", " * write$ }
+ { output.state after.block =
+ { add.period$ write$
+ newline$
+ "\newblock " write$
+ }
+ { output.state before.all =
+ 'write$
+ { add.period$ " " * write$ }
+ if$
+ }
+ if$
+ mid.sentence 'output.state :=
+ }
+ if$
+ s
+}
+
+% Use a colon to separate output. Used only for address/publisher
+% combination in book/inbook types, address/institution for manuals,
+% and organization:publisher for proceedings (inproceedings).
+%
+FUNCTION {output.nonnull.colon}
+{ 's :=
+ output.state mid.sentence =
+ { ": " * write$ }
+ { output.state after.block =
+ { add.period$ write$
+ newline$
+ "\newblock " write$
+ }
+ { output.state before.all =
+ 'write$
+ { add.period$ " " * write$ }
+ if$
+ }
+ if$
+ mid.sentence 'output.state :=
+ }
+ if$
+ s
+}
+
+FUNCTION {output}
+{ duplicate$ empty$
+ 'pop$
+ 'output.nonnull
+ if$
+}
+
+FUNCTION {output.colon}
+{ duplicate$ empty$
+ 'pop$
+ 'output.nonnull.colon
+ if$
+}
+
+FUNCTION {output.check}
+{ 't :=
+ duplicate$ empty$
+ { pop$ "empty " t * " in " * cite$ * warning$ }
+ 'output.nonnull
+ if$
+}
+
+FUNCTION {output.check.colon}
+{ 't :=
+ duplicate$ empty$
+ { pop$ "empty " t * " in " * cite$ * warning$ }
+ 'output.nonnull.colon
+ if$
+}
+
+FUNCTION {output.year.check}
+{ year empty$
+ { "empty year in " cite$ * warning$ }
+ { write$
+ " (" year * extra.label *
+ month empty$
+ { ")" * }
+ { ", " * month * ")" * }
+ if$
+ mid.sentence 'output.state :=
+ }
+ if$
+}
+
+
+FUNCTION {fin.entry}
+{ add.period$
+ write$
+ newline$
+}
+
+FUNCTION {new.block}
+{ output.state before.all =
+ 'skip$
+ { after.block 'output.state := }
+ if$
+}
+
+FUNCTION {new.sentence}
+{ output.state after.block =
+ 'skip$
+ { output.state before.all =
+ 'skip$
+ { after.sentence 'output.state := }
+ if$
+ }
+ if$
+}
+
+FUNCTION {not}
+{ { #0 }
+ { #1 }
+ if$
+}
+
+FUNCTION {and}
+{ 'skip$
+ { pop$ #0 }
+ if$
+}
+
+FUNCTION {or}
+{ { pop$ #1 }
+ 'skip$
+ if$
+}
+
+FUNCTION {new.block.checka}
+{ empty$
+ 'skip$
+ 'new.block
+ if$
+}
+
+FUNCTION {new.block.checkb}
+{ empty$
+ swap$ empty$
+ and
+ 'skip$
+ 'new.block
+ if$
+}
+
+FUNCTION {new.sentence.checka}
+{ empty$
+ 'skip$
+ 'new.sentence
+ if$
+}
+
+FUNCTION {new.sentence.checkb}
+{ empty$
+ swap$ empty$
+ and
+ 'skip$
+ 'new.sentence
+ if$
+}
+
+FUNCTION {field.or.null}
+{ duplicate$ empty$
+ { pop$ "" }
+ 'skip$
+ if$
+}
+
+%
+% Emphasize the top string on the stack.
+%
+FUNCTION {emphasize}
+{ duplicate$ empty$
+ { pop$ "" }
+ { "{\em " swap$ * "}" * }
+ if$
+}
+
+%
+% Emphasize the top string on the stack, but add a trailing space.
+%
+FUNCTION {emphasize.space}
+{ duplicate$ empty$
+ { pop$ "" }
+ { "{\em " swap$ * "\/}" * }
+ if$
+}
+
+INTEGERS { nameptr namesleft numnames }
+%
+% Format bibliographical entries with the first author last name first,
+% and subsequent authors with initials followed by last name.
+% All names are formatted in this routine.
+%
+FUNCTION {format.names}
+{ 's :=
+ #1 'nameptr := % nameptr = 1;
+ s num.names$ 'numnames := % numnames = num.name$(s);
+ numnames 'namesleft :=
+ { namesleft #0 > }
+
+ { nameptr #1 =
+ {s nameptr "{vv~}{ll}{, jj}{, f.}" format.name$ 't := }
+ {s nameptr "{f.~}{vv~}{ll}{, jj}" format.name$ 't := }
+ if$
+ nameptr #1 >
+ { namesleft #1 >
+ { ", " * t * }
+ { numnames #2 >
+ { "," * }
+ 'skip$
+ if$
+ t "others" =
+ { " et~al." * }
+ { " and " * t * } % from Chicago Manual of Style
+ if$
+ }
+ if$
+ }
+ 't
+ if$
+ nameptr #1 + 'nameptr := % nameptr += 1;
+ namesleft #1 - 'namesleft := % namesleft =- 1;
+ }
+ while$
+}
+
+FUNCTION {my.full.label}
+{ 's :=
+ #1 'nameptr := % nameptr = 1;
+ s num.names$ 'numnames := % numnames = num.name$(s);
+ numnames 'namesleft :=
+ { namesleft #0 > }
+
+ { s nameptr "{vv~}{ll}" format.name$ 't := % get the next name
+ nameptr #1 >
+ { namesleft #1 >
+ { ", " * t * }
+ { numnames #2 >
+ { "," * }
+ 'skip$
+ if$
+ t "others" =
+ { " et~al." * }
+ { " and " * t * } % from Chicago Manual of Style
+ if$
+ }
+ if$
+ }
+ 't
+ if$
+ nameptr #1 + 'nameptr := % nameptr += 1;
+ namesleft #1 - 'namesleft := % namesleft =- 1;
+ }
+ while$
+
+}
+
+FUNCTION {format.names.fml}
+%
+% Format names in "familiar" format, with first initial followed by
+% last name. Like format.names, ALL names are formatted.
+%
+{ 's :=
+ #1 'nameptr := % nameptr = 1;
+ s num.names$ 'numnames := % numnames = num.name$(s);
+ numnames 'namesleft :=
+ { namesleft #0 > }
+
+ { s nameptr "{f.~}{vv~}{ll}{, jj}" format.name$ 't :=
+
+ nameptr #1 >
+ { namesleft #1 >
+ { ", " * t * }
+ { numnames #2 >
+ { "," * }
+ 'skip$
+ if$
+ t "others" =
+ { " et~al." * }
+ { " and " * t * }
+% { " \& " * t * }
+ if$
+ }
+ if$
+ }
+ 't
+ if$
+ nameptr #1 + 'nameptr := % nameptr += 1;
+ namesleft #1 - 'namesleft := % namesleft =- 1;
+ }
+ while$
+}
+
+FUNCTION {format.annote}
+{ annote empty$
+ { "" }
+ { " \begin{quotation}\noindent "
+ annote
+ * " \end{quotation} " *
+ }
+ if$
+}
+
+FUNCTION {format.authors}
+{ author empty$
+ { "" }
+ { author format.names }
+ if$
+}
+
+FUNCTION {format.key}
+{ empty$
+ { key field.or.null }
+ { "" }
+ if$
+}
+
+%
+% Format editor names for use in the "in" types: inbook, incollection,
+% inproceedings: first initial, then last names. When editors are the
+% LABEL for an entry, then format.editor is used which lists editors
+% by last name first.
+%
+FUNCTION {format.editors.fml}
+{ editor empty$
+ { "" }
+ { editor format.names.fml
+ editor num.names$ #1 >
+ { " (Eds.)" * }
+ { " (Ed.)" * }
+ if$
+ }
+ if$
+}
+
+%
+% Format editor names for use in labels, last names first.
+%
+FUNCTION {format.editors}
+{ editor empty$
+ { "" }
+ { editor format.names
+ editor num.names$ #1 >
+ { " (Eds.)" * }
+ { " (Ed.)" * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.title}
+{ title empty$
+ { "" }
+ { title "t" change.case$ }
+ if$
+}
+
+% Note that the APA style requres case changes
+% in article titles. The following does not
+% change cases. If you perfer it, uncomment the
+% following and comment out the above.
+
+%FUNCTION {format.title}
+%{ title empty$
+% { "" }
+% { title }
+% if$
+%}
+
+FUNCTION {n.dashify}
+{ 't :=
+ ""
+ { t empty$ not }
+ { t #1 #1 substring$ "-" =
+ { t #1 #2 substring$ "--" = not
+ { "--" *
+ t #2 global.max$ substring$ 't :=
+ }
+ { { t #1 #1 substring$ "-" = }
+ { "-" *
+ t #2 global.max$ substring$ 't :=
+ }
+ while$
+ }
+ if$
+ }
+ { t #1 #1 substring$ *
+ t #2 global.max$ substring$ 't :=
+ }
+ if$
+ }
+ while$
+}
+
+FUNCTION {format.btitle}
+{ edition empty$
+ { title emphasize }
+ { title empty$
+ { title emphasize }
+ { volume empty$ % gnp - check for volume, then don't need period
+ { "{\em " title * "\/} (" * edition * " ed.)" * "." * }
+ { "{\em " title * "\/} (" * edition * " ed.)" * }
+ if$
+ }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.emphasize.booktitle}
+{ edition empty$
+ { booktitle emphasize }
+ { booktitle empty$
+ { booktitle emphasize }
+ { volume empty$ % gnp - extra period an error if book has a volume
+ { "{\em " booktitle * "\/} (" * edition * " ed.)" * "." *}
+ { "{\em " booktitle * "\/} (" * edition * " ed.)" * }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+
+
+FUNCTION {tie.or.space.connect}
+{ duplicate$ text.length$ #3 <
+ { "~" }
+ { " " }
+ if$
+ swap$ * *
+}
+
+FUNCTION {either.or.check}
+{ empty$
+ 'pop$
+ { "can't use both " swap$ * " fields in " * cite$ * warning$ }
+ if$
+}
+
+FUNCTION {format.bvolume}
+{ volume empty$
+ { "" }
+ { "Volume" volume tie.or.space.connect % gnp - changed to mixed case
+ series empty$
+ 'skip$
+ { " of " * series emphasize * }
+ if$
+ "volume and number" number either.or.check
+ }
+ if$
+}
+
+FUNCTION {format.number.series}
+{ volume empty$
+ { number empty$
+ { series field.or.null }
+ { output.state mid.sentence =
+ { "Number" } % gnp - changed to mixed case always
+ { "Number" }
+ if$
+ number tie.or.space.connect
+ series empty$
+ { "there's a number but no series in " cite$ * warning$ }
+ { " in " * series * }
+ if$
+ }
+ if$
+ }
+ { "" }
+ if$
+}
+
+INTEGERS { multiresult }
+
+FUNCTION {multi.page.check}
+{ 't :=
+ #0 'multiresult :=
+ { multiresult not
+ t empty$ not
+ and
+ }
+ { t #1 #1 substring$
+ duplicate$ "-" =
+ swap$ duplicate$ "," =
+ swap$ "+" =
+ or or
+ { #1 'multiresult := }
+ { t #2 global.max$ substring$ 't := }
+ if$
+ }
+ while$
+ multiresult
+}
+
+FUNCTION {format.pages}
+{ pages empty$
+ { "" }
+ { pages multi.page.check
+ { "pp.\ " pages n.dashify tie.or.space.connect } % gnp - removed ()
+ { "pp.\ " pages tie.or.space.connect }
+ if$
+ }
+ if$
+}
+
+% By Young (and Spencer)
+% GNP - fixed bugs with missing volume, number, and/or pages
+%
+% Format journal, volume, number, pages for article types.
+%
+FUNCTION {format.jour.vol}
+{ journal empty$
+ { "no journal in " cite$ * warning$
+ "" }
+ { journal emphasize.space }
+ if$
+ number empty$
+ { volume empty$
+ { "no number and no volume in " cite$ * warning$
+ "" * }
+ { "~{\em " * Volume * "}" * }
+ if$
+ }
+ { volume empty$
+ {"no volume for " cite$ * warning$
+ "~(" * number * ")" * }
+ { "~" *
+ volume emphasize.space
+ "(" * number * ")" * * }
+ if$
+ }
+ if$
+ pages empty$
+ {"page numbers missing in " cite$ * warning$
+ "" * } % gnp - place a null string on the stack for output
+ { duplicate$ empty$
+ { pop$ format.pages }
+ { ", " * pages n.dashify * } % gnp - removed pp. for articles
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.chapter.pages}
+{ chapter empty$
+ 'format.pages
+ { type empty$
+ { "Chapter" } % gnp - changed to mixed case
+ { type "t" change.case$ }
+ if$
+ chapter tie.or.space.connect
+ pages empty$
+ {"page numbers missing in " cite$ * warning$} % gnp - added check
+ { ", " * format.pages * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.in.ed.booktitle}
+{ booktitle empty$
+ { "" }
+ { editor empty$
+ { "In " format.emphasize.booktitle * }
+ { "In " format.editors.fml * ", " * format.emphasize.booktitle * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.thesis.type}
+{ type empty$
+ 'skip$
+ { pop$
+ type "t" change.case$
+ }
+ if$
+}
+
+FUNCTION {format.tr.number}
+{ type empty$
+ { "Technical Report" }
+ 'type
+ if$
+ number empty$
+ { "t" change.case$ }
+ { number tie.or.space.connect }
+ if$
+}
+
+FUNCTION {format.article.crossref}
+{ "See"
+ "\citeN{" * crossref * "}" *
+}
+
+FUNCTION {format.crossref.editor}
+{ editor #1 "{vv~}{ll}" format.name$
+ editor num.names$ duplicate$
+ #2 >
+ { pop$ " et~al." * }
+ { #2 <
+ 'skip$
+ { editor #2 "{ff }{vv }{ll}{ jj}" format.name$ "others" =
+ { " et~al." * }
+ { " and " * editor #2 "{vv~}{ll}" format.name$ * }
+ if$
+ }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.book.crossref}
+{ volume empty$
+ { "empty volume in " cite$ * "'s crossref of " * crossref * warning$
+ "In "
+ }
+ { "Volume" volume tie.or.space.connect % gnp - changed to mixed case
+ " of " *
+ }
+ if$
+ editor empty$
+ editor field.or.null author field.or.null =
+ or
+ { key empty$
+ { series empty$
+ { "need editor, key, or series for " cite$ * " to crossref " *
+ crossref * warning$
+ "" *
+ }
+ { "{\em " * series * "\/}" * }
+ if$
+ }
+ { key * }
+ if$
+ }
+ { format.crossref.editor * }
+ if$
+ " \citeN{" * crossref * "}" *
+}
+
+FUNCTION {format.incoll.inproc.crossref}
+{ "See"
+ " \citeN{" * crossref * "}" *
+}
+
+% format.lab.names:
+%
+% determines "short" names for the abbreviated author information.
+% "Long" labels are created in calc.label, using the routine my.full.label
+% to format author and editor fields.
+%
+% There are 4 cases for labels. (n=3 in the example)
+% a) one author Foo
+% b) one to n Foo, Bar and Baz
+% c) use of "and others" Foo, Bar et al.
+% d) more than n Foo et al.
+%
+FUNCTION {format.lab.names}
+{ 's :=
+ s num.names$ 'numnames :=
+ numnames #2 > % change number to number of others allowed before
+ % forcing "et al".
+ { s #1 "{vv~}{ll}" format.name$ " et~al." * }
+ {
+ numnames #1 - 'namesleft :=
+ #2 'nameptr :=
+ s #1 "{vv~}{ll}" format.name$
+ { namesleft #0 > }
+ { nameptr numnames =
+ { s nameptr "{ff }{vv }{ll}{ jj}" format.name$ "others" =
+ { " et~al." * }
+ { " and " * s nameptr "{vv~}{ll}" format.name$ * }
+ if$
+ }
+ { ", " * s nameptr "{vv~}{ll}" format.name$ * }
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+ }
+ if$
+}
+
+FUNCTION {author.key.label}
+{ author empty$
+ { key empty$
+ { "no key, author in " cite$ * warning$
+ cite$ #1 #3 substring$ }
+ 'key
+ if$
+ }
+ { author format.lab.names }
+ if$
+}
+
+FUNCTION {editor.key.label}
+{ editor empty$
+ { key empty$
+ { "no key, editor in " cite$ * warning$
+ cite$ #1 #3 substring$ }
+ 'key
+ if$
+ }
+ { editor format.lab.names }
+ if$
+}
+
+FUNCTION {author.key.organization.label}
+%
+% added - gnp. Provide label formatting by organization if author is null.
+%
+{ author empty$
+ { organization empty$
+ { key empty$
+ { "no key, author or organization in " cite$ * warning$
+ cite$ #1 #3 substring$ }
+ 'key
+ if$
+ }
+ { organization }
+ if$
+ }
+ { author format.lab.names }
+ if$
+}
+
+FUNCTION {editor.key.organization.label}
+%
+% added - gnp. Provide label formatting by organization if editor is null.
+%
+{ editor empty$
+ { organization empty$
+ { key empty$
+ { "no key, editor or organization in " cite$ * warning$
+ cite$ #1 #3 substring$ }
+ 'key
+ if$
+ }
+ { organization }
+ if$
+ }
+ { editor format.lab.names }
+ if$
+}
+
+FUNCTION {author.editor.key.label}
+{ author empty$
+ { editor empty$
+ { key empty$
+ { "no key, author, or editor in " cite$ * warning$
+ cite$ #1 #3 substring$ }
+ 'key
+ if$
+ }
+ { editor format.lab.names }
+ if$
+ }
+ { author format.lab.names }
+ if$
+}
+
+FUNCTION {calc.label}
+%
+% Changed - GNP. See also author.organization.sort, editor.organization.sort
+% Form label for BibTeX entry. The classification of which fields are used
+% for which type of entry (book, inbook, etc.) are taken from alpha.bst.
+% The change here from newapa is to also include organization as a
+% citation label if author or editor is missing.
+%
+{ type$ "book" =
+ type$ "inbook" =
+ or
+ 'author.editor.key.label
+ { type$ "proceedings" =
+ 'editor.key.organization.label
+ { type$ "manual" =
+ 'author.key.organization.label
+ 'author.key.label
+ if$
+ }
+ if$
+ }
+ if$
+
+ author empty$ % generate the full label citation information.
+ { editor empty$
+ { organization empty$
+ { "no author, editor, or organization in " cite$ * warning$
+ "??" }
+ { organization }
+ if$
+ }
+ { editor my.full.label }
+ if$
+ }
+ { author my.full.label }
+ if$
+
+% leave label on the stack, to be popped when required.
+
+ "}{" * swap$ * "}{" *
+% year field.or.null purify$ #-1 #4 substring$ *
+%
+% save the year for sort processing afterwards (adding a, b, c, etc.)
+%
+ year field.or.null purify$ #-1 #4 substring$
+ 'label.year :=
+}
+
+FUNCTION {output.bibitem}
+{ newline$
+
+ "\bibitem[\protect\citeauthoryear{" write$
+ calc.label write$
+ sort.year write$
+ "}]{" write$
+
+ cite$ write$
+ "}" write$
+ newline$
+ ""
+ before.all 'output.state :=
+}
+
+FUNCTION {article}
+{ output.bibitem
+ format.authors
+ "author" output.check
+ author format.key output % added
+ output.year.check % added
+ new.block
+ format.title
+ "title" output.check
+ new.block
+ crossref missing$
+ { format.jour.vol output
+ }
+ { format.article.crossref output.nonnull
+ format.pages output
+ }
+ if$
+ new.block
+ note output
+ fin.entry
+ format.annote write$
+ newline$
+}
+
+FUNCTION {book}
+{ output.bibitem
+ author empty$
+ { format.editors
+ "author and editor" output.check }
+ { format.authors
+ output.nonnull
+ crossref missing$
+ { "author and editor" editor either.or.check }
+ 'skip$
+ if$
+ }
+ if$
+ output.year.check % added
+ new.block
+ format.btitle
+ "title" output.check
+ crossref missing$
+ { format.bvolume output
+ new.block
+ format.number.series output
+ new.sentence
+ address output
+ publisher "publisher" output.check.colon
+ }
+ { new.block
+ format.book.crossref output.nonnull
+ }
+ if$
+ new.block
+ note output
+ fin.entry
+ format.annote write$
+ newline$
+}
+
+FUNCTION {booklet}
+{ output.bibitem
+ format.authors output
+ author format.key output % added
+ output.year.check % added
+ new.block
+ format.title
+ "title" output.check
+ new.block
+ howpublished output
+ address output
+ new.block
+ note output
+ fin.entry
+ format.annote write$
+}
+
+FUNCTION {inbook}
+{ output.bibitem
+ author empty$
+ { format.editors
+ "author and editor" output.check
+ }
+ { format.authors output.nonnull
+ crossref missing$
+ { "author and editor" editor either.or.check }
+ 'skip$
+ if$
+ }
+ if$
+ output.year.check % added
+ new.block
+ format.btitle
+ "title" output.check
+ crossref missing$
+ { format.bvolume output
+ format.chapter.pages
+ "chapter and pages" output.check
+ new.block
+ format.number.series output
+ new.sentence
+ address output
+ publisher
+ "publisher" output.check.colon
+ }
+ { format.chapter.pages "chapter and pages" output.check
+ new.block
+ format.book.crossref output.nonnull
+ }
+ if$
+ new.block
+ note output
+ fin.entry
+ format.annote write$
+}
+
+FUNCTION {incollection}
+{ output.bibitem
+ format.authors
+ "author" output.check
+ author format.key output % added
+ output.year.check % added
+ new.block
+ format.title
+ "title" output.check
+ new.block
+ crossref missing$
+ { format.in.ed.booktitle
+ "booktitle" output.check
+ format.bvolume output
+ format.number.series output
+ format.chapter.pages output % gnp - was special.output.nonnull
+% left out comma before page numbers
+ new.sentence
+ address output
+ publisher "publisher" output.check.colon
+ }
+ { format.incoll.inproc.crossref
+ output.nonnull
+ format.chapter.pages output
+ }
+ if$
+ new.block
+ note output
+ fin.entry
+ format.annote write$
+}
+
+FUNCTION {inproceedings}
+{ output.bibitem
+ format.authors
+ "author" output.check
+ author format.key output % added
+ output.year.check % added
+ new.block
+ format.title
+ "title" output.check
+ new.block
+ crossref missing$
+ { format.in.ed.booktitle
+ "booktitle" output.check
+ format.bvolume output
+ format.number.series output
+ address output
+ format.pages output
+ new.sentence
+ organization output
+ publisher output.colon
+ }
+ { format.incoll.inproc.crossref output.nonnull
+ format.pages output
+ }
+ if$
+ new.block
+ note output
+ fin.entry
+ format.annote write$
+}
+
+FUNCTION {conference} { inproceedings }
+
+FUNCTION {manual}
+{ output.bibitem
+ author empty$
+ { editor empty$
+ { organization "organization" output.check
+ organization format.key output } % if all else fails, use key
+ { format.editors "author and editor" output.check }
+ if$
+ }
+ { format.authors output.nonnull }
+ if$
+ output.year.check % added
+ new.block
+ format.btitle
+ "title" output.check
+ organization address new.block.checkb
+% Reversed the order of "address" and "organization", added the ":".
+ address output
+ organization "organization" output.check.colon
+% address output
+% ":" output
+% organization output
+ new.block
+ note output
+ fin.entry
+ format.annote write$
+}
+
+FUNCTION {mastersthesis}
+{ output.bibitem
+ format.authors
+ "author" output.check
+ author format.key output % added
+ output.year.check % added
+ new.block
+ format.title
+ "title" output.check
+ new.block
+ "Master's thesis" format.thesis.type output.nonnull
+ school "school" output.check
+ address output
+ new.block
+ note output
+ fin.entry
+ format.annote write$
+}
+
+FUNCTION {misc}
+{ output.bibitem
+ format.authors output
+ author format.key output % added
+ output.year.check % added
+ title howpublished new.block.checkb
+ format.title output
+ new.block
+ howpublished output
+ new.block
+ note output
+ fin.entry
+ format.annote write$
+}
+
+FUNCTION {phdthesis}
+{ output.bibitem
+ format.authors
+ "author" output.check
+ author format.key output % added
+ output.year.check % added
+ new.block
+ format.btitle
+ "title" output.check
+ new.block
+ "Ph.\ D. thesis" format.thesis.type output.nonnull
+ school "school" output.check
+ address output
+ new.block
+ note output
+ fin.entry
+ format.annote write$
+}
+
+FUNCTION {proceedings}
+{ output.bibitem
+ editor empty$
+ { organization output
+ organization format.key output } % gnp - changed from author format.key
+ { format.editors output.nonnull }
+ if$
+% author format.key output % gnp - removed (should be either
+% editor or organization
+ output.year.check % added (newapa)
+ new.block
+ format.btitle
+ "title" output.check
+ format.bvolume output
+ format.number.series output
+ address output
+ new.sentence
+ organization output
+ publisher output.colon
+ new.block
+ note output
+ fin.entry
+ format.annote write$
+}
+
+FUNCTION {techreport}
+{ output.bibitem
+ format.authors
+ "author" output.check
+ author format.key output % added
+ output.year.check % added
+ new.block
+ format.title
+ "title" output.check
+ new.block
+ format.tr.number output.nonnull
+ institution
+ "institution" output.check
+ address output
+ new.block
+ note output
+ fin.entry
+ format.annote write$
+}
+
+FUNCTION {unpublished}
+{ output.bibitem
+ format.authors
+ "author" output.check
+ author format.key output % added
+ output.year.check % added
+ new.block
+ format.title
+ "title" output.check
+ new.block
+ note "note" output.check
+ fin.entry
+ format.annote write$
+}
+
+FUNCTION {default.type} { misc }
+
+MACRO {jan} {"January"}
+
+MACRO {feb} {"February"}
+
+MACRO {mar} {"March"}
+
+MACRO {apr} {"April"}
+
+MACRO {may} {"May"}
+
+MACRO {jun} {"June"}
+
+MACRO {jul} {"July"}
+
+MACRO {aug} {"August"}
+
+MACRO {sep} {"September"}
+
+MACRO {oct} {"October"}
+
+MACRO {nov} {"November"}
+
+MACRO {dec} {"December"}
+
+MACRO {acmcs} {"ACM Computing Surveys"}
+
+MACRO {acta} {"Acta Informatica"}
+
+MACRO {ai} {"Artificial Intelligence"}
+
+MACRO {cacm} {"Communications of the ACM"}
+
+MACRO {ibmjrd} {"IBM Journal of Research and Development"}
+
+MACRO {ibmsj} {"IBM Systems Journal"}
+
+MACRO {ieeese} {"IEEE Transactions on Software Engineering"}
+
+MACRO {ieeetc} {"IEEE Transactions on Computers"}
+
+MACRO {ieeetcad}
+ {"IEEE Transactions on Computer-Aided Design of Integrated Circuits"}
+
+MACRO {ipl} {"Information Processing Letters"}
+
+MACRO {jacm} {"Journal of the ACM"}
+
+MACRO {jcss} {"Journal of Computer and System Sciences"}
+
+MACRO {scp} {"Science of Computer Programming"}
+
+MACRO {sicomp} {"SIAM Journal on Computing"}
+
+MACRO {tocs} {"ACM Transactions on Computer Systems"}
+
+MACRO {tods} {"ACM Transactions on Database Systems"}
+
+MACRO {tog} {"ACM Transactions on Graphics"}
+
+MACRO {toms} {"ACM Transactions on Mathematical Software"}
+
+MACRO {toois} {"ACM Transactions on Office Information Systems"}
+
+MACRO {toplas} {"ACM Transactions on Programming Languages and Systems"}
+
+MACRO {tcs} {"Theoretical Computer Science"}
+
+READ
+
+FUNCTION {sortify}
+{ purify$
+ "l" change.case$
+}
+
+INTEGERS { len }
+
+FUNCTION {chop.word}
+{ 's :=
+ 'len :=
+ s #1 len substring$ =
+ { s len #1 + global.max$ substring$ }
+ 's
+ if$
+}
+
+
+
+FUNCTION {sort.format.names}
+{ 's :=
+ #1 'nameptr :=
+ ""
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ { nameptr #1 >
+ { " " * }
+ 'skip$
+ if$
+ s nameptr "{vv{ } }{ll{ }}{ f{ }}{ jj{ }}" format.name$ 't :=
+ nameptr numnames = t "others" = and
+ { " et~al" * }
+ { t sortify * }
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+}
+
+FUNCTION {sort.format.title}
+{ 't :=
+ "A " #2
+ "An " #3
+ "The " #4 t chop.word
+ chop.word
+ chop.word
+ sortify
+ #1 global.max$ substring$
+}
+
+FUNCTION {author.sort}
+{ author empty$
+ { key empty$
+ { "to sort, need author or key in " cite$ * warning$
+ "" }
+ { key sortify }
+ if$
+ }
+ { author sort.format.names }
+ if$
+}
+
+FUNCTION {editor.sort}
+{ editor empty$
+ { key empty$
+ { "to sort, need editor or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { editor sort.format.names }
+ if$
+}
+
+FUNCTION {author.editor.sort}
+{ author empty$
+ { "missing author in " cite$ * warning$
+ editor empty$
+ { key empty$
+ { "to sort, need author, editor, or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { editor sort.format.names }
+ if$
+ }
+ { author sort.format.names }
+ if$
+}
+
+FUNCTION {author.organization.sort}
+%
+% added - GNP. Stack author or organization for sorting (from alpha.bst).
+% Unlike alpha.bst, we need entire names, not abbreviations
+%
+{ author empty$
+ { organization empty$
+ { key empty$
+ { "to sort, need author, organization, or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { organization sortify }
+ if$
+ }
+ { author sort.format.names }
+ if$
+}
+
+FUNCTION {editor.organization.sort}
+%
+% added - GNP. Stack editor or organization for sorting (from alpha.bst).
+% Unlike alpha.bst, we need entire names, not abbreviations
+%
+{ editor empty$
+ { organization empty$
+ { key empty$
+ { "to sort, need editor, organization, or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { organization sortify }
+ if$
+ }
+ { editor sort.format.names }
+ if$
+}
+
+FUNCTION {presort}
+%
+% Presort creates the bibentry's label via a call to calc.label, and then
+% sorts the entries based on entry type. Chicago.bst adds support for
+% including organizations as the sort key; the following is stolen from
+% alpha.bst.
+%
+{ calc.label sortify % recalculate bibitem label
+ year field.or.null purify$ #-1 #4 substring$ * % add year
+ " "
+ *
+ type$ "book" =
+ type$ "inbook" =
+ or
+ 'author.editor.sort
+ { type$ "proceedings" =
+ 'editor.organization.sort
+ { type$ "manual" =
+ 'author.organization.sort
+ 'author.sort
+ if$
+ }
+ if$
+ }
+ if$
+ #1 entry.max$ substring$ % added for newapa
+ 'sort.label := % added for newapa
+ sort.label % added for newapa
+ *
+ " "
+ *
+ title field.or.null
+ sort.format.title
+ *
+ #1 entry.max$ substring$
+ 'sort.key$ :=
+}
+
+ITERATE {presort}
+
+SORT % by label, year, author/editor, title
+
+STRINGS { last.label next.extra }
+
+INTEGERS { last.extra.num }
+
+FUNCTION {initialize.extra.label.stuff}
+{ #0 int.to.chr$ 'last.label :=
+ "" 'next.extra :=
+ #0 'last.extra.num :=
+}
+
+FUNCTION {forward.pass}
+%
+% Pass through all entries, comparing current entry to last one.
+% Need to concatenate year to the stack (done by calc.label) to determine
+% if two entries are the same (see presort)
+%
+{ last.label
+ calc.label year field.or.null purify$ #-1 #4 substring$ * % add year
+ #1 entry.max$ substring$ = % are they equal?
+ { last.extra.num #1 + 'last.extra.num :=
+ last.extra.num int.to.chr$ 'extra.label :=
+ }
+ { "a" chr.to.int$ 'last.extra.num :=
+ "" 'extra.label :=
+ calc.label year field.or.null purify$ #-1 #4 substring$ * % add year
+ #1 entry.max$ substring$ 'last.label := % assign to last.label
+ }
+ if$
+}
+
+FUNCTION {reverse.pass}
+{ next.extra "b" =
+ { "a" 'extra.label := }
+ 'skip$
+ if$
+ label.year extra.label * 'sort.year :=
+ extra.label 'next.extra :=
+}
+
+EXECUTE {initialize.extra.label.stuff}
+
+ITERATE {forward.pass}
+
+REVERSE {reverse.pass}
+
+FUNCTION {bib.sort.order}
+{ sort.label
+ " "
+ *
+ year field.or.null sortify
+ *
+ " "
+ *
+ title field.or.null
+ sort.format.title
+ *
+ #1 entry.max$ substring$
+ 'sort.key$ :=
+}
+
+ITERATE {bib.sort.order}
+
+SORT % by sort.label, year, title --- giving final bib. order.
+
+FUNCTION {begin.bib}
+
+{ preamble$ empty$
+ 'skip$
+ { preamble$ write$ newline$ }
+ if$
+ "\begin{thebibliography}{}" write$ newline$
+}
+
+
+EXECUTE {begin.bib}
+
+EXECUTE {init.state.consts}
+
+ITERATE {call.type$}
+
+FUNCTION {end.bib}
+{ newline$
+ "\end{thebibliography}" write$ newline$
+}
+
+EXECUTE {end.bib}
+
+
diff --git a/biblio/bibtex/contrib/chicago/chicago.bst b/biblio/bibtex/contrib/chicago/chicago.bst
new file mode 100644
index 0000000000..925f9a2e0e
--- /dev/null
+++ b/biblio/bibtex/contrib/chicago/chicago.bst
@@ -0,0 +1,1653 @@
+%%% ====================================================================
+%%% @BibTeX-style-file{
+%%% author = "Glenn Paulley",
+%%% version = "4",
+%%% date = "28 August 1992",
+%%% time = "10:23:39 199",
+%%% filename = "chicago.bst",
+%%% address = "Data Structuring Group
+%%% Department of Computer Science
+%%% University of Waterloo
+%%% Waterloo, Ontario, Canada
+%%% N2L 3G1",
+%%% telephone = "(519) 885-1211",
+%%% FAX = "(519) 885-1208",
+%%% checksum = "26323 1654 5143 37417",
+%%% email = "gnpaulle@bluebox.uwaterloo.ca",
+%%% codetable = "ISO/ASCII",
+%%% keywords = "",
+%%% supported = "yes",
+%%% abstract = "A BibTeX bibliography style that follows the
+%%% `B' reference style of the 13th Edition of
+%%% the Chicago Manual of Style. A detailed
+%%% feature list is given below.",
+%%% docstring = "The checksum field above contains a CRC-16
+%%% checksum as the first value, followed by the
+%%% equivalent of the standard UNIX wc (word
+%%% count) utility output of lines, words, and
+%%% characters. This is produced by Robert
+%%% Solovay's checksum utility.",
+%%% }
+%%% ====================================================================
+%
+% "Chicago" BibTeX style, chicago.bst
+% ===================================
+%
+% BibTeX `chicago' style file for BibTeX version 0.99c, LaTeX version 2.09
+% Place it in a file called chicago.bst in the BibTeX search path.
+% You need to include chicago.sty as a \documentstyle option.
+% (Placing it in the same directory as the LaTeX document should also work.)
+% This "chicago" style is based on newapa.bst (American Psych. Assoc.)
+% found at ymir.claremont.edu.
+%
+% Citation format: (author-last-name year)
+% (author-last-name and author-last-name year)
+% (author-last-name, author-last-name, and author-last-name year)
+% (author-last-name et al. year)
+% (author-last-name)
+% author-last-name (year)
+% (author-last-name and author-last-name)
+% (author-last-name et al.)
+% (year) or (year,year)
+% year or year,year
+%
+% Reference list ordering: alphabetical by author or whatever passes
+% for author in the absence of one.
+%
+% This BibTeX style has support for abbreviated author lists and for
+% year-only citations. This is done by having the citations
+% actually look like
+%
+% \citeauthoryear{full-author-info}{abbrev-author-info}{year}
+%
+% The LaTeX style has to have the following (or similar)
+%
+% \let\@internalcite\cite
+% \def\fullcite{\def\citeauthoryear##1##2##3{##1, ##3}\@internalcite}
+% \def\fullciteA{\def\citeauthoryear##1##2##3{##1}\@internalcite}
+% \def\shortcite{\def\citeauthoryear##1##2##3{##2, ##3}\@internalcite}
+% \def\shortciteA{\def\citeauthoryear##1##2##3{##2}\@internalcite}
+% \def\citeyear{\def\citeauthoryear##1##2##3{##3}\@internalcite}
+%
+% These TeX macro definitions are found in chicago.sty. Additional
+% commands to manipulate different components of a citation can be defined
+% so that, for example, you can list author's names without parentheses
+% if using a citation as a noun or object in a sentence.
+%
+% This file was originally copied from newapa.bst at ymir.claremont.edu.
+%
+% Features of chicago.bst:
+% =======================
+%
+% - full names used in citations, but abbreviated citations are available
+% (see above)
+% - if an entry has a "month", then the month and year are also printed
+% as part of that bibitem.
+% - all conjunctions use "and" instead of "\&"
+% - major modification from Chicago Manual of Style (13th ed.) is that
+% only the first author in a reference appears last name first-
+% additional authors appear as J. Q. Public.
+% - pages are listed as "pp. xx-xx" in all entry types except
+% article entries.
+% - book, inbook, and manual use "location: publisher" (or organization)
+% for address and publisher. All other types list publishers separately.
+% - "pp." are used to identify page numbers for all entry types except
+% articles.
+% - organization is used as a citation label if neither author nor editor
+% is present (for manuals).
+% - "et al." is used for long author and editor lists, or when "others"
+% is used.
+%
+% Modifications and bug fixes from newapa.bst:
+% ===========================================
+%
+% - added month, year to bib entries if month is present
+% - fixed bug with In proceedings, added necessary comma after title
+% - all conjunctions changed to "and" from "\&"
+% - fixed bug with author labels in my.full.label: "et al." now is
+% generated when "others" is an author name
+% - major modification from Chicago Manual of Style (13th ed.) is that
+% only the first author in a reference appears last name first-
+% additional authors appear as J. Q. Public.
+% - pages are listed as "pp. xx-xx" in all entry types except
+% article entries. Unnecessary (IMHO) "()" around page numbers
+% were removed, and page numbers now don't end with a period.
+% - created chicago.sty for use with this bibstyle (required).
+% - fixed bugs in FUNCTION {format.vol.num.pages} for missing volume,
+% number, and /or pages. Renamed to format.jour.vol.
+% - fixed bug in formatting booktitles: additional period an error if
+% book has a volume.
+% - fixed bug: editors usually given redundant period before next clause
+% (format.editors.dot) removed.
+% - added label support for organizations, if both author and editor
+% are missing (from alpha.bst). If organization is too long, then
+% the key field is used for abbreviated citations.
+% - In proceedings or books of several volumes, no comma was written
+% between the "Volume x" and the page numbers (this was intentional
+% in newapa.bst). Fixed.
+% - Some journals may not have volumes/numbers, only month/year (eg.
+% IEEE Computer). Fixed bug in article style that assumed volume/number
+% was always present.
+%
+% Original documentation for newapa.sty:
+% =====================================
+%
+% This version was made by modifying the master file made by
+% Oren Patashnik (PATASHNIK@SCORE.STANFORD.EDU), and the 'named' BibTeX
+% style of Peter F. Patel-Schneider.
+%
+% Copyright (C) 1985, all rights reserved.
+% Copying of this file is authorized only if either
+% (1) you make absolutely no changes to your copy, including name, or
+% (2) if you do make changes, you name it something other than 'newapa.bst'.
+% There are undoubtably bugs in this style. If you make bug fixes,
+% improvements, etc. please let me know. My e-mail address is:
+% spencer@cgrg.ohio.state.edu or 71160.3141@compuserve.com
+%
+% This style was made from 'plain.bst', 'named.bst', and 'apalike.bst',
+% with lots of tweaking to make it look like APA style, along with tips
+% from Young Ryu and Brian Reiser's modifications of 'apalike.bst'.
+
+ENTRY
+ { address
+ author
+ booktitle
+ chapter
+ edition
+ editor
+ howpublished
+ institution
+ journal
+ key
+ month
+ note
+ number
+ organization
+ pages
+ publisher
+ school
+ series
+ title
+ type
+ volume
+ year
+ }
+ {}
+ { label.year extra.label sort.year sort.label }
+
+INTEGERS { output.state before.all mid.sentence after.sentence after.block }
+
+FUNCTION {init.state.consts}
+{ #0 'before.all :=
+ #1 'mid.sentence :=
+ #2 'after.sentence :=
+ #3 'after.block :=
+}
+
+STRINGS { s t u }
+
+FUNCTION {output.nonnull}
+{ 's :=
+ output.state mid.sentence =
+ { ", " * write$ }
+ { output.state after.block =
+ { add.period$ write$
+ newline$
+ "\newblock " write$
+ }
+ { output.state before.all =
+ 'write$
+ { add.period$ " " * write$ }
+ if$
+ }
+ if$
+ mid.sentence 'output.state :=
+ }
+ if$
+ s
+}
+
+% Use a colon to separate output. Used only for address/publisher
+% combination in book/inbook types, address/institution for manuals,
+% and organization:publisher for proceedings (inproceedings).
+%
+FUNCTION {output.nonnull.colon}
+{ 's :=
+ output.state mid.sentence =
+ { ": " * write$ }
+ { output.state after.block =
+ { add.period$ write$
+ newline$
+ "\newblock " write$
+ }
+ { output.state before.all =
+ 'write$
+ { add.period$ " " * write$ }
+ if$
+ }
+ if$
+ mid.sentence 'output.state :=
+ }
+ if$
+ s
+}
+
+FUNCTION {output}
+{ duplicate$ empty$
+ 'pop$
+ 'output.nonnull
+ if$
+}
+
+FUNCTION {output.colon}
+{ duplicate$ empty$
+ 'pop$
+ 'output.nonnull.colon
+ if$
+}
+
+FUNCTION {output.check}
+{ 't :=
+ duplicate$ empty$
+ { pop$ "empty " t * " in " * cite$ * warning$ }
+ 'output.nonnull
+ if$
+}
+
+FUNCTION {output.check.colon}
+{ 't :=
+ duplicate$ empty$
+ { pop$ "empty " t * " in " * cite$ * warning$ }
+ 'output.nonnull.colon
+ if$
+}
+
+FUNCTION {output.year.check}
+{ year empty$
+ { "empty year in " cite$ * warning$ }
+ { write$
+ " (" year * extra.label *
+ month empty$
+ { ")" * }
+ { ", " * month * ")" * }
+ if$
+ mid.sentence 'output.state :=
+ }
+ if$
+}
+
+
+FUNCTION {fin.entry}
+{ add.period$
+ write$
+ newline$
+}
+
+FUNCTION {new.block}
+{ output.state before.all =
+ 'skip$
+ { after.block 'output.state := }
+ if$
+}
+
+FUNCTION {new.sentence}
+{ output.state after.block =
+ 'skip$
+ { output.state before.all =
+ 'skip$
+ { after.sentence 'output.state := }
+ if$
+ }
+ if$
+}
+
+FUNCTION {not}
+{ { #0 }
+ { #1 }
+ if$
+}
+
+FUNCTION {and}
+{ 'skip$
+ { pop$ #0 }
+ if$
+}
+
+FUNCTION {or}
+{ { pop$ #1 }
+ 'skip$
+ if$
+}
+
+FUNCTION {new.block.checka}
+{ empty$
+ 'skip$
+ 'new.block
+ if$
+}
+
+FUNCTION {new.block.checkb}
+{ empty$
+ swap$ empty$
+ and
+ 'skip$
+ 'new.block
+ if$
+}
+
+FUNCTION {new.sentence.checka}
+{ empty$
+ 'skip$
+ 'new.sentence
+ if$
+}
+
+FUNCTION {new.sentence.checkb}
+{ empty$
+ swap$ empty$
+ and
+ 'skip$
+ 'new.sentence
+ if$
+}
+
+FUNCTION {field.or.null}
+{ duplicate$ empty$
+ { pop$ "" }
+ 'skip$
+ if$
+}
+
+%
+% Emphasize the top string on the stack.
+%
+FUNCTION {emphasize}
+{ duplicate$ empty$
+ { pop$ "" }
+ { "{\em " swap$ * "}" * }
+ if$
+}
+
+%
+% Emphasize the top string on the stack, but add a trailing space.
+%
+FUNCTION {emphasize.space}
+{ duplicate$ empty$
+ { pop$ "" }
+ { "{\em " swap$ * "\/}" * }
+ if$
+}
+
+INTEGERS { nameptr namesleft numnames }
+%
+% Format bibliographical entries with the first author last name first,
+% and subsequent authors with initials followed by last name.
+% All names are formatted in this routine.
+%
+FUNCTION {format.names}
+{ 's :=
+ #1 'nameptr := % nameptr = 1;
+ s num.names$ 'numnames := % numnames = num.name$(s);
+ numnames 'namesleft :=
+ { namesleft #0 > }
+
+ { nameptr #1 =
+ {s nameptr "{vv~}{ll}{, jj}{, f.}" format.name$ 't := }
+ {s nameptr "{f.~}{vv~}{ll}{, jj}" format.name$ 't := }
+ if$
+ nameptr #1 >
+ { namesleft #1 >
+ { ", " * t * }
+ { numnames #2 >
+ { "," * }
+ 'skip$
+ if$
+ t "others" =
+ { " et~al." * }
+ { " and " * t * } % from Chicago Manual of Style
+ if$
+ }
+ if$
+ }
+ 't
+ if$
+ nameptr #1 + 'nameptr := % nameptr += 1;
+ namesleft #1 - 'namesleft := % namesleft =- 1;
+ }
+ while$
+}
+
+FUNCTION {my.full.label}
+{ 's :=
+ #1 'nameptr := % nameptr = 1;
+ s num.names$ 'numnames := % numnames = num.name$(s);
+ numnames 'namesleft :=
+ { namesleft #0 > }
+
+ { s nameptr "{vv~}{ll}" format.name$ 't := % get the next name
+ nameptr #1 >
+ { namesleft #1 >
+ { ", " * t * }
+ { numnames #2 >
+ { "," * }
+ 'skip$
+ if$
+ t "others" =
+ { " et~al." * }
+ { " and " * t * } % from Chicago Manual of Style
+ if$
+ }
+ if$
+ }
+ 't
+ if$
+ nameptr #1 + 'nameptr := % nameptr += 1;
+ namesleft #1 - 'namesleft := % namesleft =- 1;
+ }
+ while$
+
+}
+
+FUNCTION {format.names.fml}
+%
+% Format names in "familiar" format, with first initial followed by
+% last name. Like format.names, ALL names are formatted.
+%
+{ 's :=
+ #1 'nameptr := % nameptr = 1;
+ s num.names$ 'numnames := % numnames = num.name$(s);
+ numnames 'namesleft :=
+ { namesleft #0 > }
+
+ { s nameptr "{f.~}{vv~}{ll}{, jj}" format.name$ 't :=
+
+ nameptr #1 >
+ { namesleft #1 >
+ { ", " * t * }
+ { numnames #2 >
+ { "," * }
+ 'skip$
+ if$
+ t "others" =
+ { " et~al." * }
+ { " and " * t * }
+% { " \& " * t * }
+ if$
+ }
+ if$
+ }
+ 't
+ if$
+ nameptr #1 + 'nameptr := % nameptr += 1;
+ namesleft #1 - 'namesleft := % namesleft =- 1;
+ }
+ while$
+}
+
+FUNCTION {format.authors}
+{ author empty$
+ { "" }
+ { author format.names }
+ if$
+}
+
+FUNCTION {format.key}
+{ empty$
+ { key field.or.null }
+ { "" }
+ if$
+}
+
+%
+% Format editor names for use in the "in" types: inbook, incollection,
+% inproceedings: first initial, then last names. When editors are the
+% LABEL for an entry, then format.editor is used which lists editors
+% by last name first.
+%
+FUNCTION {format.editors.fml}
+{ editor empty$
+ { "" }
+ { editor format.names.fml
+ editor num.names$ #1 >
+ { " (Eds.)" * }
+ { " (Ed.)" * }
+ if$
+ }
+ if$
+}
+
+%
+% Format editor names for use in labels, last names first.
+%
+FUNCTION {format.editors}
+{ editor empty$
+ { "" }
+ { editor format.names
+ editor num.names$ #1 >
+ { " (Eds.)" * }
+ { " (Ed.)" * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.title}
+{ title empty$
+ { "" }
+ { title "t" change.case$ }
+ if$
+}
+
+% Note that the APA style requres case changes
+% in article titles. The following does not
+% change cases. If you perfer it, uncomment the
+% following and comment out the above.
+
+%FUNCTION {format.title}
+%{ title empty$
+% { "" }
+% { title }
+% if$
+%}
+
+FUNCTION {n.dashify}
+{ 't :=
+ ""
+ { t empty$ not }
+ { t #1 #1 substring$ "-" =
+ { t #1 #2 substring$ "--" = not
+ { "--" *
+ t #2 global.max$ substring$ 't :=
+ }
+ { { t #1 #1 substring$ "-" = }
+ { "-" *
+ t #2 global.max$ substring$ 't :=
+ }
+ while$
+ }
+ if$
+ }
+ { t #1 #1 substring$ *
+ t #2 global.max$ substring$ 't :=
+ }
+ if$
+ }
+ while$
+}
+
+FUNCTION {format.btitle}
+{ edition empty$
+ { title emphasize }
+ { title empty$
+ { title emphasize }
+ { volume empty$ % gnp - check for volume, then don't need period
+ { "{\em " title * "\/} (" * edition * " ed.)" * "." * }
+ { "{\em " title * "\/} (" * edition * " ed.)" * }
+ if$
+ }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.emphasize.booktitle}
+{ edition empty$
+ { booktitle emphasize }
+ { booktitle empty$
+ { booktitle emphasize }
+ { volume empty$ % gnp - extra period an error if book has a volume
+ { "{\em " booktitle * "\/} (" * edition * " ed.)" * "." *}
+ { "{\em " booktitle * "\/} (" * edition * " ed.)" * }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+
+
+FUNCTION {tie.or.space.connect}
+{ duplicate$ text.length$ #3 <
+ { "~" }
+ { " " }
+ if$
+ swap$ * *
+}
+
+FUNCTION {either.or.check}
+{ empty$
+ 'pop$
+ { "can't use both " swap$ * " fields in " * cite$ * warning$ }
+ if$
+}
+
+FUNCTION {format.bvolume}
+{ volume empty$
+ { "" }
+ { "Volume" volume tie.or.space.connect % gnp - changed to mixed case
+ series empty$
+ 'skip$
+ { " of " * series emphasize * }
+ if$
+ "volume and number" number either.or.check
+ }
+ if$
+}
+
+FUNCTION {format.number.series}
+{ volume empty$
+ { number empty$
+ { series field.or.null }
+ { output.state mid.sentence =
+ { "Number" } % gnp - changed to mixed case always
+ { "Number" }
+ if$
+ number tie.or.space.connect
+ series empty$
+ { "there's a number but no series in " cite$ * warning$ }
+ { " in " * series * }
+ if$
+ }
+ if$
+ }
+ { "" }
+ if$
+}
+
+INTEGERS { multiresult }
+
+FUNCTION {multi.page.check}
+{ 't :=
+ #0 'multiresult :=
+ { multiresult not
+ t empty$ not
+ and
+ }
+ { t #1 #1 substring$
+ duplicate$ "-" =
+ swap$ duplicate$ "," =
+ swap$ "+" =
+ or or
+ { #1 'multiresult := }
+ { t #2 global.max$ substring$ 't := }
+ if$
+ }
+ while$
+ multiresult
+}
+
+FUNCTION {format.pages}
+{ pages empty$
+ { "" }
+ { pages multi.page.check
+ { "pp.\ " pages n.dashify tie.or.space.connect } % gnp - removed ()
+ { "pp.\ " pages tie.or.space.connect }
+ if$
+ }
+ if$
+}
+
+% By Young (and Spencer)
+% GNP - fixed bugs with missing volume, number, and/or pages
+%
+% Format journal, volume, number, pages for article types.
+%
+FUNCTION {format.jour.vol}
+{ journal empty$
+ { "no journal in " cite$ * warning$
+ "" }
+ { journal emphasize.space }
+ if$
+ number empty$
+ { volume empty$
+ { "no number and no volume in " cite$ * warning$
+ "" * }
+ { "~{\em " * Volume * "}" * }
+ if$
+ }
+ { volume empty$
+ {"no volume for " cite$ * warning$
+ "~(" * number * ")" * }
+ { "~" *
+ volume emphasize.space
+ "(" * number * ")" * * }
+ if$
+ }
+ if$
+ pages empty$
+ {"page numbers missing in " cite$ * warning$
+ "" * } % gnp - place a null string on the stack for output
+ { duplicate$ empty$
+ { pop$ format.pages }
+ { ", " * pages n.dashify * } % gnp - removed pp. for articles
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.chapter.pages}
+{ chapter empty$
+ 'format.pages
+ { type empty$
+ { "Chapter" } % gnp - changed to mixed case
+ { type "t" change.case$ }
+ if$
+ chapter tie.or.space.connect
+ pages empty$
+ {"page numbers missing in " cite$ * warning$} % gnp - added check
+ { ", " * format.pages * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.in.ed.booktitle}
+{ booktitle empty$
+ { "" }
+ { editor empty$
+ { "In " format.emphasize.booktitle * }
+ { "In " format.editors.fml * ", " * format.emphasize.booktitle * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.thesis.type}
+{ type empty$
+ 'skip$
+ { pop$
+ type "t" change.case$
+ }
+ if$
+}
+
+FUNCTION {format.tr.number}
+{ type empty$
+ { "Technical Report" }
+ 'type
+ if$
+ number empty$
+ { "t" change.case$ }
+ { number tie.or.space.connect }
+ if$
+}
+
+FUNCTION {format.article.crossref}
+{ "See"
+ "\citeN{" * crossref * "}" *
+}
+
+FUNCTION {format.crossref.editor}
+{ editor #1 "{vv~}{ll}" format.name$
+ editor num.names$ duplicate$
+ #2 >
+ { pop$ " et~al." * }
+ { #2 <
+ 'skip$
+ { editor #2 "{ff }{vv }{ll}{ jj}" format.name$ "others" =
+ { " et~al." * }
+ { " and " * editor #2 "{vv~}{ll}" format.name$ * }
+ if$
+ }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.book.crossref}
+{ volume empty$
+ { "empty volume in " cite$ * "'s crossref of " * crossref * warning$
+ "In "
+ }
+ { "Volume" volume tie.or.space.connect % gnp - changed to mixed case
+ " of " *
+ }
+ if$
+ editor empty$
+ editor field.or.null author field.or.null =
+ or
+ { key empty$
+ { series empty$
+ { "need editor, key, or series for " cite$ * " to crossref " *
+ crossref * warning$
+ "" *
+ }
+ { "{\em " * series * "\/}" * }
+ if$
+ }
+ { key * }
+ if$
+ }
+ { format.crossref.editor * }
+ if$
+ " \citeN{" * crossref * "}" *
+}
+
+FUNCTION {format.incoll.inproc.crossref}
+{ "See"
+ " \citeN{" * crossref * "}" *
+}
+
+% format.lab.names:
+%
+% determines "short" names for the abbreviated author information.
+% "Long" labels are created in calc.label, using the routine my.full.label
+% to format author and editor fields.
+%
+% There are 4 cases for labels. (n=3 in the example)
+% a) one author Foo
+% b) one to n Foo, Bar and Baz
+% c) use of "and others" Foo, Bar et al.
+% d) more than n Foo et al.
+%
+FUNCTION {format.lab.names}
+{ 's :=
+ s num.names$ 'numnames :=
+ numnames #2 > % change number to number of others allowed before
+ % forcing "et al".
+ { s #1 "{vv~}{ll}" format.name$ " et~al." * }
+ {
+ numnames #1 - 'namesleft :=
+ #2 'nameptr :=
+ s #1 "{vv~}{ll}" format.name$
+ { namesleft #0 > }
+ { nameptr numnames =
+ { s nameptr "{ff }{vv }{ll}{ jj}" format.name$ "others" =
+ { " et~al." * }
+ { " and " * s nameptr "{vv~}{ll}" format.name$ * }
+ if$
+ }
+ { ", " * s nameptr "{vv~}{ll}" format.name$ * }
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+ }
+ if$
+}
+
+FUNCTION {author.key.label}
+{ author empty$
+ { key empty$
+ { "no key, author in " cite$ * warning$
+ cite$ #1 #3 substring$ }
+ 'key
+ if$
+ }
+ { author format.lab.names }
+ if$
+}
+
+FUNCTION {editor.key.label}
+{ editor empty$
+ { key empty$
+ { "no key, editor in " cite$ * warning$
+ cite$ #1 #3 substring$ }
+ 'key
+ if$
+ }
+ { editor format.lab.names }
+ if$
+}
+
+FUNCTION {author.key.organization.label}
+%
+% added - gnp. Provide label formatting by organization if author is null.
+%
+{ author empty$
+ { organization empty$
+ { key empty$
+ { "no key, author or organization in " cite$ * warning$
+ cite$ #1 #3 substring$ }
+ 'key
+ if$
+ }
+ { organization }
+ if$
+ }
+ { author format.lab.names }
+ if$
+}
+
+FUNCTION {editor.key.organization.label}
+%
+% added - gnp. Provide label formatting by organization if editor is null.
+%
+{ editor empty$
+ { organization empty$
+ { key empty$
+ { "no key, editor or organization in " cite$ * warning$
+ cite$ #1 #3 substring$ }
+ 'key
+ if$
+ }
+ { organization }
+ if$
+ }
+ { editor format.lab.names }
+ if$
+}
+
+FUNCTION {author.editor.key.label}
+{ author empty$
+ { editor empty$
+ { key empty$
+ { "no key, author, or editor in " cite$ * warning$
+ cite$ #1 #3 substring$ }
+ 'key
+ if$
+ }
+ { editor format.lab.names }
+ if$
+ }
+ { author format.lab.names }
+ if$
+}
+
+FUNCTION {calc.label}
+%
+% Changed - GNP. See also author.organization.sort, editor.organization.sort
+% Form label for BibTeX entry. The classification of which fields are used
+% for which type of entry (book, inbook, etc.) are taken from alpha.bst.
+% The change here from newapa is to also include organization as a
+% citation label if author or editor is missing.
+%
+{ type$ "book" =
+ type$ "inbook" =
+ or
+ 'author.editor.key.label
+ { type$ "proceedings" =
+ 'editor.key.organization.label
+ { type$ "manual" =
+ 'author.key.organization.label
+ 'author.key.label
+ if$
+ }
+ if$
+ }
+ if$
+
+ author empty$ % generate the full label citation information.
+ { editor empty$
+ { organization empty$
+ { "no author, editor, or organization in " cite$ * warning$
+ "??" }
+ { organization }
+ if$
+ }
+ { editor my.full.label }
+ if$
+ }
+ { author my.full.label }
+ if$
+
+% leave label on the stack, to be popped when required.
+
+ "}{" * swap$ * "}{" *
+% year field.or.null purify$ #-1 #4 substring$ *
+%
+% save the year for sort processing afterwards (adding a, b, c, etc.)
+%
+ year field.or.null purify$ #-1 #4 substring$
+ 'label.year :=
+}
+
+FUNCTION {output.bibitem}
+{ newline$
+
+ "\bibitem[\protect\citeauthoryear{" write$
+ calc.label write$
+ sort.year write$
+ "}]{" write$
+
+ cite$ write$
+ "}" write$
+ newline$
+ ""
+ before.all 'output.state :=
+}
+
+FUNCTION {article}
+{ output.bibitem
+ format.authors
+ "author" output.check
+ author format.key output % added
+ output.year.check % added
+ new.block
+ format.title
+ "title" output.check
+ new.block
+ crossref missing$
+ { format.jour.vol output
+ }
+ { format.article.crossref output.nonnull
+ format.pages output
+ }
+ if$
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {book}
+{ output.bibitem
+ author empty$
+ { format.editors
+ "author and editor" output.check }
+ { format.authors
+ output.nonnull
+ crossref missing$
+ { "author and editor" editor either.or.check }
+ 'skip$
+ if$
+ }
+ if$
+ output.year.check % added
+ new.block
+ format.btitle
+ "title" output.check
+ crossref missing$
+ { format.bvolume output
+ new.block
+ format.number.series output
+ new.sentence
+ address output
+ publisher "publisher" output.check.colon
+ }
+ { new.block
+ format.book.crossref output.nonnull
+ }
+ if$
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {booklet}
+{ output.bibitem
+ format.authors output
+ author format.key output % added
+ output.year.check % added
+ new.block
+ format.title
+ "title" output.check
+ new.block
+ howpublished output
+ address output
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {inbook}
+{ output.bibitem
+ author empty$
+ { format.editors
+ "author and editor" output.check
+ }
+ { format.authors output.nonnull
+ crossref missing$
+ { "author and editor" editor either.or.check }
+ 'skip$
+ if$
+ }
+ if$
+ output.year.check % added
+ new.block
+ format.btitle
+ "title" output.check
+ crossref missing$
+ { format.bvolume output
+ format.chapter.pages
+ "chapter and pages" output.check
+ new.block
+ format.number.series output
+ new.sentence
+ address output
+ publisher
+ "publisher" output.check.colon
+ }
+ { format.chapter.pages "chapter and pages" output.check
+ new.block
+ format.book.crossref output.nonnull
+ }
+ if$
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {incollection}
+{ output.bibitem
+ format.authors
+ "author" output.check
+ author format.key output % added
+ output.year.check % added
+ new.block
+ format.title
+ "title" output.check
+ new.block
+ crossref missing$
+ { format.in.ed.booktitle
+ "booktitle" output.check
+ format.bvolume output
+ format.number.series output
+ format.chapter.pages output % gnp - was special.output.nonnull
+% left out comma before page numbers
+ new.sentence
+ address output
+ publisher "publisher" output.check.colon
+ }
+ { format.incoll.inproc.crossref
+ output.nonnull
+ format.chapter.pages output
+ }
+ if$
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {inproceedings}
+{ output.bibitem
+ format.authors
+ "author" output.check
+ author format.key output % added
+ output.year.check % added
+ new.block
+ format.title
+ "title" output.check
+ new.block
+ crossref missing$
+ { format.in.ed.booktitle
+ "booktitle" output.check
+ format.bvolume output
+ format.number.series output
+ address output
+ format.pages output
+ new.sentence
+ organization output
+ publisher output.colon
+ }
+ { format.incoll.inproc.crossref output.nonnull
+ format.pages output
+ }
+ if$
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {conference} { inproceedings }
+
+FUNCTION {manual}
+{ output.bibitem
+ author empty$
+ { editor empty$
+ { organization "organization" output.check
+ organization format.key output } % if all else fails, use key
+ { format.editors "author and editor" output.check }
+ if$
+ }
+ { format.authors output.nonnull }
+ if$
+ output.year.check % added
+ new.block
+ format.btitle
+ "title" output.check
+ organization address new.block.checkb
+% Reversed the order of "address" and "organization", added the ":".
+ address output
+ organization "organization" output.check.colon
+% address output
+% ":" output
+% organization output
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {mastersthesis}
+{ output.bibitem
+ format.authors
+ "author" output.check
+ author format.key output % added
+ output.year.check % added
+ new.block
+ format.title
+ "title" output.check
+ new.block
+ "Master's thesis" format.thesis.type output.nonnull
+ school "school" output.check
+ address output
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {misc}
+{ output.bibitem
+ format.authors output
+ author format.key output % added
+ output.year.check % added
+ title howpublished new.block.checkb
+ format.title output
+ new.block
+ howpublished output
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {phdthesis}
+{ output.bibitem
+ format.authors
+ "author" output.check
+ author format.key output % added
+ output.year.check % added
+ new.block
+ format.btitle
+ "title" output.check
+ new.block
+ "Ph.\ D. thesis" format.thesis.type output.nonnull
+ school "school" output.check
+ address output
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {proceedings}
+{ output.bibitem
+ editor empty$
+ { organization output
+ organization format.key output } % gnp - changed from author format.key
+ { format.editors output.nonnull }
+ if$
+% author format.key output % gnp - removed (should be either
+% editor or organization
+ output.year.check % added (newapa)
+ new.block
+ format.btitle
+ "title" output.check
+ format.bvolume output
+ format.number.series output
+ address output
+ new.sentence
+ organization output
+ publisher output.colon
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {techreport}
+{ output.bibitem
+ format.authors
+ "author" output.check
+ author format.key output % added
+ output.year.check % added
+ new.block
+ format.title
+ "title" output.check
+ new.block
+ format.tr.number output.nonnull
+ institution
+ "institution" output.check
+ address output
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {unpublished}
+{ output.bibitem
+ format.authors
+ "author" output.check
+ author format.key output % added
+ output.year.check % added
+ new.block
+ format.title
+ "title" output.check
+ new.block
+ note "note" output.check
+ fin.entry
+}
+
+FUNCTION {default.type} { misc }
+
+MACRO {jan} {"January"}
+
+MACRO {feb} {"February"}
+
+MACRO {mar} {"March"}
+
+MACRO {apr} {"April"}
+
+MACRO {may} {"May"}
+
+MACRO {jun} {"June"}
+
+MACRO {jul} {"July"}
+
+MACRO {aug} {"August"}
+
+MACRO {sep} {"September"}
+
+MACRO {oct} {"October"}
+
+MACRO {nov} {"November"}
+
+MACRO {dec} {"December"}
+
+MACRO {acmcs} {"ACM Computing Surveys"}
+
+MACRO {acta} {"Acta Informatica"}
+
+MACRO {ai} {"Artificial Intelligence"}
+
+MACRO {cacm} {"Communications of the ACM"}
+
+MACRO {ibmjrd} {"IBM Journal of Research and Development"}
+
+MACRO {ibmsj} {"IBM Systems Journal"}
+
+MACRO {ieeese} {"IEEE Transactions on Software Engineering"}
+
+MACRO {ieeetc} {"IEEE Transactions on Computers"}
+
+MACRO {ieeetcad}
+ {"IEEE Transactions on Computer-Aided Design of Integrated Circuits"}
+
+MACRO {ipl} {"Information Processing Letters"}
+
+MACRO {jacm} {"Journal of the ACM"}
+
+MACRO {jcss} {"Journal of Computer and System Sciences"}
+
+MACRO {scp} {"Science of Computer Programming"}
+
+MACRO {sicomp} {"SIAM Journal on Computing"}
+
+MACRO {tocs} {"ACM Transactions on Computer Systems"}
+
+MACRO {tods} {"ACM Transactions on Database Systems"}
+
+MACRO {tog} {"ACM Transactions on Graphics"}
+
+MACRO {toms} {"ACM Transactions on Mathematical Software"}
+
+MACRO {toois} {"ACM Transactions on Office Information Systems"}
+
+MACRO {toplas} {"ACM Transactions on Programming Languages and Systems"}
+
+MACRO {tcs} {"Theoretical Computer Science"}
+
+READ
+
+FUNCTION {sortify}
+{ purify$
+ "l" change.case$
+}
+
+INTEGERS { len }
+
+FUNCTION {chop.word}
+{ 's :=
+ 'len :=
+ s #1 len substring$ =
+ { s len #1 + global.max$ substring$ }
+ 's
+ if$
+}
+
+
+
+FUNCTION {sort.format.names}
+{ 's :=
+ #1 'nameptr :=
+ ""
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ { nameptr #1 >
+ { " " * }
+ 'skip$
+ if$
+ s nameptr "{vv{ } }{ll{ }}{ f{ }}{ jj{ }}" format.name$ 't :=
+ nameptr numnames = t "others" = and
+ { " et~al" * }
+ { t sortify * }
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+}
+
+FUNCTION {sort.format.title}
+{ 't :=
+ "A " #2
+ "An " #3
+ "The " #4 t chop.word
+ chop.word
+ chop.word
+ sortify
+ #1 global.max$ substring$
+}
+
+FUNCTION {author.sort}
+{ author empty$
+ { key empty$
+ { "to sort, need author or key in " cite$ * warning$
+ "" }
+ { key sortify }
+ if$
+ }
+ { author sort.format.names }
+ if$
+}
+
+FUNCTION {editor.sort}
+{ editor empty$
+ { key empty$
+ { "to sort, need editor or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { editor sort.format.names }
+ if$
+}
+
+FUNCTION {author.editor.sort}
+{ author empty$
+ { "missing author in " cite$ * warning$
+ editor empty$
+ { key empty$
+ { "to sort, need author, editor, or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { editor sort.format.names }
+ if$
+ }
+ { author sort.format.names }
+ if$
+}
+
+FUNCTION {author.organization.sort}
+%
+% added - GNP. Stack author or organization for sorting (from alpha.bst).
+% Unlike alpha.bst, we need entire names, not abbreviations
+%
+{ author empty$
+ { organization empty$
+ { key empty$
+ { "to sort, need author, organization, or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { organization sortify }
+ if$
+ }
+ { author sort.format.names }
+ if$
+}
+
+FUNCTION {editor.organization.sort}
+%
+% added - GNP. Stack editor or organization for sorting (from alpha.bst).
+% Unlike alpha.bst, we need entire names, not abbreviations
+%
+{ editor empty$
+ { organization empty$
+ { key empty$
+ { "to sort, need editor, organization, or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { organization sortify }
+ if$
+ }
+ { editor sort.format.names }
+ if$
+}
+
+FUNCTION {presort}
+%
+% Presort creates the bibentry's label via a call to calc.label, and then
+% sorts the entries based on entry type. Chicago.bst adds support for
+% including organizations as the sort key; the following is stolen from
+% alpha.bst.
+%
+{ calc.label sortify % recalculate bibitem label
+ year field.or.null purify$ #-1 #4 substring$ * % add year
+ " "
+ *
+ type$ "book" =
+ type$ "inbook" =
+ or
+ 'author.editor.sort
+ { type$ "proceedings" =
+ 'editor.organization.sort
+ { type$ "manual" =
+ 'author.organization.sort
+ 'author.sort
+ if$
+ }
+ if$
+ }
+ if$
+ #1 entry.max$ substring$ % added for newapa
+ 'sort.label := % added for newapa
+ sort.label % added for newapa
+ *
+ " "
+ *
+ title field.or.null
+ sort.format.title
+ *
+ #1 entry.max$ substring$
+ 'sort.key$ :=
+}
+
+ITERATE {presort}
+
+SORT % by label, year, author/editor, title
+
+STRINGS { last.label next.extra }
+
+INTEGERS { last.extra.num }
+
+FUNCTION {initialize.extra.label.stuff}
+{ #0 int.to.chr$ 'last.label :=
+ "" 'next.extra :=
+ #0 'last.extra.num :=
+}
+
+FUNCTION {forward.pass}
+%
+% Pass through all entries, comparing current entry to last one.
+% Need to concatenate year to the stack (done by calc.label) to determine
+% if two entries are the same (see presort)
+%
+{ last.label
+ calc.label year field.or.null purify$ #-1 #4 substring$ * % add year
+ #1 entry.max$ substring$ = % are they equal?
+ { last.extra.num #1 + 'last.extra.num :=
+ last.extra.num int.to.chr$ 'extra.label :=
+ }
+ { "a" chr.to.int$ 'last.extra.num :=
+ "" 'extra.label :=
+ calc.label year field.or.null purify$ #-1 #4 substring$ * % add year
+ #1 entry.max$ substring$ 'last.label := % assign to last.label
+ }
+ if$
+}
+
+FUNCTION {reverse.pass}
+{ next.extra "b" =
+ { "a" 'extra.label := }
+ 'skip$
+ if$
+ label.year extra.label * 'sort.year :=
+ extra.label 'next.extra :=
+}
+
+EXECUTE {initialize.extra.label.stuff}
+
+ITERATE {forward.pass}
+
+REVERSE {reverse.pass}
+
+FUNCTION {bib.sort.order}
+{ sort.label
+ " "
+ *
+ year field.or.null sortify
+ *
+ " "
+ *
+ title field.or.null
+ sort.format.title
+ *
+ #1 entry.max$ substring$
+ 'sort.key$ :=
+}
+
+ITERATE {bib.sort.order}
+
+SORT % by sort.label, year, title --- giving final bib. order.
+
+FUNCTION {begin.bib}
+
+{ preamble$ empty$
+ 'skip$
+ { preamble$ write$ newline$ }
+ if$
+ "\begin{thebibliography}{}" write$ newline$
+}
+
+
+EXECUTE {begin.bib}
+
+EXECUTE {init.state.consts}
+
+ITERATE {call.type$}
+
+FUNCTION {end.bib}
+{ newline$
+ "\end{thebibliography}" write$ newline$
+}
+
+EXECUTE {end.bib}
+
diff --git a/biblio/bibtex/contrib/chicago/chicago.sty b/biblio/bibtex/contrib/chicago/chicago.sty
new file mode 100644
index 0000000000..db39103502
--- /dev/null
+++ b/biblio/bibtex/contrib/chicago/chicago.sty
@@ -0,0 +1,264 @@
+% -*- LaTeX -*-
+%%% ====================================================================
+%%% @LaTeX-style-file{
+%%% author = "Glenn Paulley",
+%%% version = "4",
+%%% date = "31 August 1992",
+%%% time = "09:42:44 199",
+%%% filename = "chicago.sty",
+%%% address = "Data Structuring Group
+%%% Department of Computer Science
+%%% University of Waterloo
+%%% Waterloo, Ontario, Canada
+%%% N2L 3G1",
+%%% telephone = "(519) 885-1211",
+%%% FAX = "(519) 885-1208",
+%%% checksum = "44674 264 1050 10394",
+%%% email = "gnpaulle@bluebox.uwaterloo.ca",
+%%% codetable = "ISO/ASCII",
+%%% keywords = "",
+%%% supported = "yes",
+%%% abstract = "Contains the LaTeX style command definitions
+%%% for the Chicago BibTeX styles chicago.bst and
+%%% chicagoa.bst. For details, see below.",
+%%% docstring = "The checksum field above contains a CRC-16
+%%% checksum as the first value, followed by the
+%%% equivalent of the standard UNIX wc (word
+%%% count) utility output of lines, words, and
+%%% characters. This is produced by Robert
+%%% Solovay's checksum utility.",
+%%% }
+%%% ====================================================================
+%
+% chicago.sty: Style file for use with bibtex style chicago.bst, for
+% bibliographies formatted according to the 13th Edition of the Chicago
+% Manual of Style.
+%
+% 'newapa.bst' was made from 'plain.bst', 'named.bst', and 'apalike.bst',
+% with lots of tweaking to make it look like APA style, along with tips
+% from Young Ryu and Brian Reiser's modifications of 'apalike.bst'.
+% newapa.sty formed the basis of this style, chicago.sty. Author-date
+% references in newapa.bst formed the basis for chicago.bst. Chicagoa.bst
+% supports annotations.
+%
+% Version 4 (August, 1992):
+% - fixed chicago.bst and chicagoa.bst to handle long author lists in
+% sorting
+% - fixed chicago.bst and chicagoa.bst so that missing page numbers in
+% ``article'' entries are handled correctly
+% - modified chicago.sty to format entries with 2nd and subsequent lines
+% indented.
+%
+% Citation format: (author-last-name year)
+% (author-last-name and author-last-name year)
+% (author-last-name et al. year)
+% (author-last-name)
+% author-last-name
+% author-last-name (year)
+% (author-last-name and author-last-name)
+% (author-last-name et al.)
+% (year) or (year,year)
+% year or year,year
+%
+% Reference list ordering: alphabetical by author or whatever passes
+% for author in the absence of one.
+%
+% This BibTeX style has support for abbreviated author lists and for
+% year-only citations. This is done by having the citations
+% actually look like
+%
+% \citeauthoryear{full-author-info}{abbrev-author-info}{year}
+%
+% The LaTeX style has to have the following (or similar)
+%
+% \let\@internalcite\cite
+% \def\fullcite{\def\citeauthoryear##1##2##3{##1, ##3}\@internalcite}
+% \def\fullciteA{\def\citeauthoryear##1##2##3{##1}\@internalcite}
+% \def\shortcite{\def\citeauthoryear##1##2##3{##2, ##3}\@internalcite}
+% \def\shortciteA{\def\citeauthoryear##1##2##3{##2}\@internalcite}
+% \def\citeyear{\def\citeauthoryear##1##2##3{##3}\@internalcite}
+%
+% -------------------------------------------------------------------------
+% This file implements citations for the ``chicago'' bibliography style.
+% Place it in a file called chicago.sty in the TeX search path.
+%(Placing it in the same directory as the LaTeX document should also work.)
+%
+% This file is a modification of the ``newapa'' LaTeX style,
+% originally adapted by Steven Spencer from the ``apalike'' LaTeX style.
+% It was originally modified by Stephen N. Spencer, with further
+% modifications by Young U. Ryu.
+%
+% The ``chicago'' BibTeX bibliography style creates citations with labels:
+% \citeauthoryear{author-info}{abbrev. author-info}{year}
+%
+% These labels are processed by the following LaTeX commands:
+%
+% \cite{key}
+% which produces citations with full author list and year.
+% eg. (Brown 1978; Jarke, Turner, Stohl, et al. 1985)
+% \citeNP{key}
+% which produces citations with full author list and year, but without
+% enclosing parentheses:
+% eg. Brown 1978; Jarke, Turner and Stohl 1985
+% \citeA{key}
+% which produces citations with only the full author list.
+% eg. (Brown; Jarke, Turner and Stohl)
+% \citeANP{key}
+% which produces citations with only the full author list, without
+% parentheses eg. Brown; Jarke, Turner and Stohl
+% \citeN{key}
+% which produces citations with the full author list and year, but
+% can be used as nouns in a sentence; no parentheses appear around
+% the author names, but only around the year.
+% eg. Shneiderman (1978) states that......
+% \citeN should only be used for a single citation.
+% \shortcite{key}
+% which produces citations with abbreviated author list and year.
+% \shortciteNP{key}
+% which produces citations with abbreviated author list and year.
+% \shortciteA{key}
+% which produces only the abbreviated author list.
+% \shortciteANP{key}
+% which produces only the abbreviated author list.
+% \shortciteN{key}
+% which produces the abbreviated author list and year, with only the
+% year in parentheses. Use with only one citation.
+% \citeyear{key}
+% which produces the year information only, within parentheses.
+% \citeyearNP{key}
+% which produces the year information only.
+%
+% Abbreviated author lists use the ``et al.'' construct.
+%
+% `NP' means `no parentheses'.
+%
+% This LaTeX style file must be used with the ``chicago'' or ``chicagoa''
+% (annotated chicago style) BibTeX styles.
+%
+\typeout{Using Chicago Manual of Style bibliography: 31 August 1992}
+%
+% -------------------------------------------------------------------------
+%
+% Citation macros.
+%
+\let\@internalcite\cite
+%
+\def\cite{\def\@citeseppen{-1000}%
+ \def\@cite##1##2{(##1\if@tempswa , ##2\fi)}%
+ \def\citeauthoryear##1##2##3{##1 ##3}\@internalcite}
+\def\citeNP{\def\@citeseppen{-1000}%
+ \def\@cite##1##2{##1\if@tempswa , ##2\fi}%
+ \def\citeauthoryear##1##2##3{##1 ##3}\@internalcite}
+\def\citeN{\def\@citeseppen{-1000}%
+ \def\@cite##1##2{##1\if@tempswa , ##2)\else{)}\fi}%
+ \def\citeauthoryear##1##2##3{##1 (##3}\@citedata}
+\def\citeA{\def\@citeseppen{-1000}%
+ \def\@cite##1##2{(##1\if@tempswa , ##2\fi)}%
+ \def\citeauthoryear##1##2##3{##1}\@internalcite}
+\def\citeANP{\def\@citeseppen{-1000}%
+ \def\@cite##1##2{##1\if@tempswa , ##2\fi}%
+ \def\citeauthoryear##1##2##3{##1}\@internalcite}
+%
+\def\shortcite{\def\@citeseppen{-1000}%
+ \def\@cite##1##2{(##1\if@tempswa , ##2\fi)}%
+ \def\citeauthoryear##1##2##3{##2 ##3}\@internalcite}
+\def\shortciteNP{\def\@citeseppen{-1000}%
+ \def\@cite##1##2{##1\if@tempswa , ##2\fi}%
+ \def\citeauthoryear##1##2##3{##2 ##3}\@internalcite}
+\def\shortciteN{\def\@citeseppen{-1000}%
+ \def\@cite##1##2{##1\if@tempswa , ##2)\else{)}\fi}%
+ \def\citeauthoryear##1##2##3{##2 (##3}\@citedata}
+\def\shortciteA{\def\@citeseppen{-1000}%
+ \def\@cite##1##2{(##1\if@tempswa , ##2\fi)}%
+ \def\citeauthoryear##1##2##3{##2}\@internalcite}
+\def\shortciteANP{\def\@citeseppen{-1000}%
+ \def\@cite##1##2{##1\if@tempswa , ##2\fi}%
+ \def\citeauthoryear##1##2##3{##2}\@internalcite}
+%
+\def\citeyear{\def\@citeseppen{-1000}%
+ \def\@cite##1##2{(##1\if@tempswa , ##2\fi)}%
+ \def\citeauthoryear##1##2##3{##3}\@citedata}
+\def\citeyearNP{\def\@citeseppen{-1000}%
+ \def\@cite##1##2{##1\if@tempswa , ##2\fi}%
+ \def\citeauthoryear##1##2##3{##3}\@citedata}
+
+%
+% \@citedata and \@citedatax:
+%
+% Place commas in-between citations in the same \citeyear, \citeyearNP,
+% \citeN, or \shortciteN command.
+% Use something like \citeN{ref1,ref2,ref3} and \citeN{ref4} for a list.
+%
+\def\@citedata{%
+ \@ifnextchar [{\@tempswatrue\@citedatax}%
+ {\@tempswafalse\@citedatax[]}%
+}
+
+\def\@citedatax[#1]#2{%
+\if@filesw\immediate\write\@auxout{\string\citation{#2}}\fi%
+ \def\@citea{}\@cite{\@for\@citeb:=#2\do%
+ {\@citea\def\@citea{, }\@ifundefined% by Young
+ {b@\@citeb}{{\bf ?}%
+ \@warning{Citation `\@citeb' on page \thepage \space undefined}}%
+{\csname b@\@citeb\endcsname}}}{#1}}%
+
+% don't box citations, separate with ; and a space
+% also, make the penalty between citations negative: a good place to break.
+%
+\def\@citex[#1]#2{%
+\if@filesw\immediate\write\@auxout{\string\citation{#2}}\fi%
+ \def\@citea{}\@cite{\@for\@citeb:=#2\do%
+ {\@citea\def\@citea{; }\@ifundefined% by Young
+ {b@\@citeb}{{\bf ?}%
+ \@warning{Citation `\@citeb' on page \thepage \space undefined}}%
+{\csname b@\@citeb\endcsname}}}{#1}}%
+
+% (from apalike.sty)
+% No labels in the bibliography.
+%
+\def\@biblabel#1{}
+
+% (from apalike.sty)
+% Set length of hanging indentation for bibliography entries.
+%
+\newlength{\bibhang}
+\setlength{\bibhang}{2em}
+
+% Indent second and subsequent lines of bibliographic entries. Stolen
+% from openbib.sty: \newblock is set to {}.
+
+\newdimen\bibindent
+\bibindent=1.5em
+\@ifundefined{refname}%
+ {\@ifundefined{chapter}%
+ {\newcommand{\refname}{References}}%
+ {\newcommand{\refname}{Bibliography}}%
+ }%
+ {}%
+\@ifundefined{chapter}%
+ {\def\thebibliography#1{\section*{\refname\@mkboth
+ {\uppercase{\refname}}{\uppercase{\refname}}}\list
+ {[\arabic{enumi}]}{\settowidth\labelwidth{[#1]}
+ \leftmargin\labelwidth
+ \advance\leftmargin\labelsep
+ \advance\leftmargin\bibindent
+ \itemindent -\bibindent
+ \listparindent \itemindent
+ \parsep \z@
+ \usecounter{enumi}}
+ \def\newblock{}
+ \sloppy
+ \sfcode`\.=1000\relax}}
+ {\def\thebibliography#1{\chapter*{\refname\@mkboth
+ {\uppercase{\refname}}{\uppercase{\refname}}}\list
+ {[\arabic{enumi}]}{\settowidth\labelwidth{[#1]}
+ \leftmargin\labelwidth
+ \advance\leftmargin\labelsep
+ \advance\leftmargin\bibindent
+ \itemindent -\bibindent
+ \listparindent \itemindent
+ \parsep \z@
+ \usecounter{enumi}}
+ \def\newblock{}
+ \sloppy
+ \sfcode`\.=1000\relax}}
diff --git a/biblio/bibtex/contrib/custom-bib b/biblio/bibtex/contrib/custom-bib
new file mode 120000
index 0000000000..09b3fac172
--- /dev/null
+++ b/biblio/bibtex/contrib/custom-bib
@@ -0,0 +1 @@
+../../../macros/latex/contrib/custom-bib \ No newline at end of file
diff --git a/biblio/bibtex/contrib/directory/README b/biblio/bibtex/contrib/directory/README
new file mode 100644
index 0000000000..1497e9c80c
--- /dev/null
+++ b/biblio/bibtex/contrib/directory/README
@@ -0,0 +1,32 @@
+This is the 'directory 1.20' distribution.
+
+'directory' is a macro package for LaTeX and BibTeX that facilitates
+the construction, the maintenance and the exploitation of an address
+book like database.
+
+Files included:
+
+ README
+ address-html.bst
+ address-ldif.bst
+ address-vcard.bst
+ address.bst
+ birthday.bst
+ business.bib
+ directory.pdf
+ directory.ps
+ directory.sty
+ directory.tex
+ email-html.bst
+ email.bst
+ family.bib
+ letter.bst
+ phone.bst
+
+To rebuild the user's guide (directory.ps or directory.pdf), you must
+run LaTeX, run BibTeX and then run LaTeX twice on the file
+'directory.tex'.
+
+Enjoy!
+
+Christophe Geuzaine <geuz@geuz.org>
diff --git a/biblio/bibtex/contrib/directory/address-html.bst b/biblio/bibtex/contrib/directory/address-html.bst
new file mode 100644
index 0000000000..9f34152717
--- /dev/null
+++ b/biblio/bibtex/contrib/directory/address-html.bst
@@ -0,0 +1,870 @@
+%% address-html.bst
+%% Copyright 1998-2003 Christophe Geuzaine <geuz@geuz.org>
+%
+% $Id: address-html.bst,v 1.8 2004/02/07 23:41:45 geuzaine Exp $
+%
+% This program can be redistributed and/or modified under the terms
+% of the LaTeX Project Public License distributed from CTAN
+% archives in directory macros/latex/base/lppl.txt; either
+% version 1 of the License, or (at your option) any later version.
+%
+% BibTeX bibliography style `address-html.bst'
+% 'directory' database: all fields
+%
+% This is definitively a hack...
+%
+% The parts you may want to customize are labeled with "CUSTOM"
+%
+
+INTEGERS { nameptr namesleft numnames numaux len }
+STRINGS { s t u v }
+
+% ------------------------------------------------------------
+% E N T R I E S
+% ------------------------------------------------------------
+
+ENTRY
+ { name
+ nickname
+ birthday
+ birthyear
+ address % if empty, use street, city, ...
+ street
+ city
+ state
+ zip
+ country
+ phone
+ cellular
+ fax
+ email
+ url
+ account
+ p.address % if empty, use p.street, p.city, ...
+ p.street
+ p.city
+ p.state
+ p.zip
+ p.country
+ p.phone
+ p.cellular
+ p.fax
+ p.email
+ p.url
+ p.account
+ r.address % if empty, use r.street, r.city, ...
+ r.street
+ r.city
+ r.state
+ r.zip
+ r.country
+ r.phone
+ r.cellular
+ r.fax
+ r.email
+ r.url
+ r.account
+ w.title
+ w.name
+ w.address % if empty, use w.street, w.city, ...
+ w.street
+ w.city
+ w.state
+ w.zip
+ w.country
+ w.phone
+ w.cellular
+ w.fax
+ w.email
+ w.url
+ w.account
+ note
+ }
+ {}
+ { birthday.str
+ private.str
+ residence.str
+ work.str
+ note.str
+ and.str
+ nickname.str
+ address.str
+ phone.str
+ cellular.str
+ fax.str
+ email.str
+ url.str
+ account.str
+ title.str
+ name.str
+ }
+
+
+% ------------------------------------------------------------
+% G E N E R A L
+% ------------------------------------------------------------
+
+FUNCTION {init.strings}
+{
+
+% CUSOTM this is the 'html' equivalent for the \dirXXX customization
+% commands
+
+ "<dt>&nbsp;&nbsp;&nbsp;&nbsp;<em>birthday</em></dt>" 'birthday.str :=
+ "<dt>&nbsp;&nbsp;&nbsp;&nbsp;<em>home</em></dt>" 'private.str :=
+ "<dt>&nbsp;&nbsp;&nbsp;&nbsp;<em>residence</em></dt>" 'residence.str :=
+ "<dt>&nbsp;&nbsp;&nbsp;&nbsp;<em>workplace</em></dt>" 'work.str :=
+ "<dt>&nbsp;&nbsp;&nbsp;&nbsp;<em>note</em></dt>" 'note.str :=
+
+ " and " 'and.str :=
+ " aka " 'nickname.str :=
+ "" 'address.str :=
+ "Tel: " 'phone.str :=
+ "Mobile: " 'cellular.str :=
+ "Fax: " 'fax.str :=
+ "" 'email.str :=
+ "" 'url.str :=
+ "Account: " 'account.str :=
+ "" 'title.str :=
+ "" 'name.str :=
+}
+
+FUNCTION {output.nonnull}
+{ 's :=
+ write$
+ newline$
+ "<dd> " write$
+ s
+}
+
+FUNCTION {output}
+{ duplicate$ empty$
+ 'pop$
+ 'output.nonnull
+ if$
+}
+
+FUNCTION {not}
+{ { #0 }
+ { #1 }
+ if$
+}
+
+FUNCTION {and}
+{ 'skip$
+ { pop$ #0 }
+ if$
+}
+
+FUNCTION {or}
+{ { pop$ #1 }
+ 'skip$
+ if$
+}
+
+FUNCTION {chop.word}
+{ 's :=
+ 'len :=
+ s #1 len substring$ =
+ { s len #1 + global.max$ substring$ }
+ 's
+ if$
+}
+
+FUNCTION {emailize}
+{ duplicate$ empty$
+ { pop$ "" }
+ { "<A HREF=" quote$ * "mailto:" * swap$ * quote$ * " >" * swap$ * "</A>" * }
+ if$
+}
+
+FUNCTION {urlize}
+{ duplicate$ empty$
+ { pop$ "" }
+ { "<A HREF=" quote$ * swap$ * quote$ * " >" * swap$ * "</A>" * }
+ if$
+}
+
+FUNCTION {ttize}
+{ duplicate$ empty$
+ { pop$ "" }
+ { "<tt>" swap$ * "</tt>" * }
+ if$
+}
+
+% ------------------------------------------------------------
+% S O R T I N G F U N C T I O N S
+% ------------------------------------------------------------
+
+FUNCTION {sortify}
+{ purify$
+ "l" change.case$
+}
+
+FUNCTION {sort.names}
+{ 's :=
+ #1 'nameptr :=
+ ""
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ { nameptr #1 >
+ { " " * }
+ 'skip$
+ if$
+ s nameptr "{vv{ } }{ll{ }}{ ff{ }}{ jj{ }}" format.name$ 't :=
+ nameptr numnames = t "others" = and
+ { "et al" * }
+ { t sortify * }
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+}
+
+
+FUNCTION {sort.raw.names}
+{ 't :=
+ "A " #2 "L'" #2
+ "An " #3 "Au " #3 "Le " #3 "La " #3
+ "The " #4 "Les " #4 "Aux " #4
+ t
+ chop.word chop.word
+ chop.word chop.word chop.word chop.word
+ chop.word chop.word chop.word
+ sortify
+ #1 global.max$ substring$
+}
+
+FUNCTION {name.sort}
+{ name empty$
+ { " Name field missing in entry '" cite$ * "'" * warning$ "" }
+ { name sort.names }
+ if$
+}
+
+FUNCTION {raw.name.sort}
+{ name empty$
+ { " Name field missing in entry '" cite$ * "'" * warning$ "" }
+ { name sort.raw.names }
+ if$
+}
+
+FUNCTION {presort}
+{ type$ "company" =
+ type$ "place" =
+ or
+ { raw.name.sort }
+ { name.sort }
+ if$
+ " "
+ *
+ #1 entry.max$ substring$
+ 'sort.key$ :=
+}
+
+% ------------------------------------------------------------
+% P R E - A N D P O S T - H E A D E R S
+% ------------------------------------------------------------
+
+FUNCTION {begin.bib}
+{ "<HTML>" write$
+ newline$
+ "<TITLE>Address Book</TITLE>" write$
+ newline$
+}
+
+FUNCTION {end.bib}
+{ newline$
+ "<p><hr><center><font size=-1>This address book was generated by <A HREF= " write$
+ quote$ "http://www.geuz.org/directory/" * quote$ * write$
+ " >directory</A></center></HTML>" write$
+ newline$
+}
+
+% ------------------------------------------------------------
+% F O R M A T S
+% ------------------------------------------------------------
+
+FUNCTION {format.names}
+{ 's :=
+ #1 'nameptr :=
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ {
+% CUSTOM uncomment one of the following lines to have the behaviour on the right
+ s nameptr "{ff{ } }{vv{ } }{ll{ }}{, jj{ }}" format.name$ 't := % Christophe de Geuzaine, jr
+% s nameptr "{f.{ } }{vv{ } }{ll{ }}{, jj{ }}" format.name$ 't := % C. de Geuzaine, jr
+% s nameptr "{vv{ } }{ll{ }}{ f.{ }}{, jj{ }}" format.name$ 't := % de Geuzaine C., jr
+% s nameptr "{vv{ } }{ll{ }}{, ff{ }}{, jj{ }}" format.name$ 't := % de Geuzaine, Christophe, jr
+
+ nameptr #1 >
+ { namesleft #1 >
+ { ", " * t * }
+ { and.str * t * }
+ if$
+ }
+ 't
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+}
+
+
+FUNCTION {format.dates}
+{
+ 's :=
+ #1 'nameptr :=
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+
+ birthyear empty$
+ { #0 'numaux := }
+ { birthyear num.names$ 'numaux :=
+ numnames numaux =
+ { }
+ { " birthdays and birthyears don't match in entry '" cite$ * "'" * warning$ }
+ if$
+ }
+ if$
+
+% CUSTOM
+
+ { namesleft #0 > }
+ { s nameptr "{ff}" format.name$ 't :=
+ s nameptr "{ll}" format.name$ 'u :=
+
+ nameptr #1 >
+ { namesleft #1 >
+ { ", " * t * "/" * u * }
+ { and.str * t * "/" * u * }
+ if$
+ }
+ { t "/" * u * }
+ if$
+
+ numaux #0 > not
+ { }
+ { birthyear nameptr "{ll}" format.name$ 'v :=
+ "/" * v * }
+ if$
+
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ numaux #1 - 'numaux :=
+ }
+ while$
+}
+
+FUNCTION {format.years}
+{
+ 's :=
+ #1 'nameptr :=
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+
+ { namesleft #0 > }
+ { s nameptr "{ll}" format.name$ 't :=
+ nameptr #1 >
+ { namesleft #1 >
+ { ", " * t * }
+ { and.str * t * }
+ if$
+ }
+ t
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+}
+
+FUNCTION {format.name}
+{ name empty$
+ { "" }
+ { name format.names }
+ if$
+}
+
+FUNCTION {format.nickname}
+{ nickname empty$
+ { "" }
+ { nickname.str nickname format.names * }
+ if$
+}
+
+FUNCTION {format.birthday.flag}
+{ birthyear empty$ not
+ birthday empty$ not
+ or
+ { birthday.str }
+ { "" }
+ if$
+}
+
+FUNCTION {format.birthday}
+{ birthday empty$
+ {
+ birthyear empty$
+ { "" }
+ { birthyear format.years }
+ if$
+ }
+ { birthday format.dates }
+ if$
+}
+
+FUNCTION {format.address}
+{ address empty$
+ {
+ street empty$ city empty$ state empty$ zip empty$ country empty$
+ and and and and
+ { "" }
+ { address.str
+ street empty$ { "" * } { street " " * * } if$
+ city empty$ { "" * } { city " " * * } if$
+ state empty$ { "" * } { state " " * * } if$
+ zip empty$ { "" * } { zip " " * * } if$
+ country empty$ { "" * } { country * } if$
+ }
+ if$
+ }
+ { address.str address * }
+ if$
+}
+
+FUNCTION {format.account}
+{ account empty$
+ { "" }
+ { account.str account ttize * }
+ if$
+}
+
+FUNCTION {format.phone}
+{ phone empty$
+ { "" }
+ { phone.str phone * }
+ if$
+}
+
+FUNCTION {format.cellular}
+{ cellular empty$
+ { "" }
+ { cellular.str cellular * }
+ if$
+}
+
+FUNCTION {format.fax}
+{ fax empty$
+ { "" }
+ { fax.str fax * }
+ if$
+}
+
+FUNCTION {format.email}
+{ email empty$
+ { "" }
+ { email.str email email emailize * }
+ if$
+}
+
+FUNCTION {format.url}
+{ url empty$
+ { "" }
+ { url.str url url urlize * }
+ if$
+}
+
+
+FUNCTION {format.p.flag}
+{ p.address empty$ not
+ p.street empty$ not
+ p.city empty$ not
+ p.state empty$ not
+ p.zip empty$ not
+ p.country empty$ not
+ p.phone empty$ not
+ p.cellular empty$ not
+ p.fax empty$ not
+ p.email empty$ not
+ p.url empty$ not
+ p.account empty$ not
+ or or or or or or or or or or or
+ { private.str }
+ { "" }
+ if$
+}
+
+FUNCTION {format.p.address}
+{ p.address empty$
+ {
+ p.street empty$ p.city empty$ p.state empty$ p.zip empty$ p.country empty$
+ and and and and
+ { "" }
+ { address.str
+ p.street empty$ { "" * } { p.street " " * * } if$
+ p.city empty$ { "" * } { p.city " " * * } if$
+ p.state empty$ { "" * } { p.state " " * * } if$
+ p.zip empty$ { "" * } { p.zip " " * * } if$
+ p.country empty$ { "" * } { p.country * } if$
+ }
+ if$
+ }
+ { address.str p.address * }
+ if$
+}
+
+FUNCTION {format.p.phone}
+{ p.phone empty$
+ { "" }
+ { phone.str p.phone * }
+ if$
+}
+
+FUNCTION {format.p.cellular}
+{ p.cellular empty$
+ { "" }
+ { cellular.str p.cellular * }
+ if$
+}
+
+FUNCTION {format.p.fax}
+{ p.fax empty$
+ { "" }
+ { fax.str p.fax * }
+ if$
+}
+
+FUNCTION {format.p.email}
+{ p.email empty$
+ { "" }
+ { email.str p.email p.email emailize * }
+ if$
+}
+
+FUNCTION {format.p.url}
+{ p.url empty$
+ { "" }
+ { url.str p.url p.url urlize * }
+ if$
+}
+
+FUNCTION {format.p.account}
+{ p.account empty$
+ { "" }
+ { account.str p.account ttize * }
+ if$
+}
+
+FUNCTION {format.r.flag}
+{ r.address empty$ not
+ r.street empty$ not
+ r.city empty$ not
+ r.state empty$ not
+ r.zip empty$ not
+ r.country empty$ not
+ r.phone empty$ not
+ r.cellular empty$ not
+ r.fax empty$ not
+ r.email empty$ not
+ r.url empty$ not
+ r.account empty$ not
+ or or or or or or or or or or or
+ { residence.str }
+ { "" }
+ if$
+}
+
+FUNCTION {format.r.address}
+{ r.address empty$
+ {
+ r.street empty$ r.city empty$ r.state empty$ r.zip empty$ r.country empty$
+ and and and and
+ { "" }
+ { address.str
+ r.street empty$ { "" * } { r.street " " * * } if$
+ r.city empty$ { "" * } { r.city " " * * } if$
+ r.state empty$ { "" * } { r.state " " * * } if$
+ r.zip empty$ { "" * } { r.zip " " * * } if$
+ r.country empty$ { "" * } { r.country * } if$
+ }
+ if$
+ }
+ { address.str r.address * }
+ if$
+}
+
+FUNCTION {format.r.phone}
+{ r.phone empty$
+ { "" }
+ { phone.str r.phone * }
+ if$
+}
+
+FUNCTION {format.r.cellular}
+{ r.cellular empty$
+ { "" }
+ { cellular.str r.cellular * }
+ if$
+}
+
+FUNCTION {format.r.fax}
+{ r.fax empty$
+ { "" }
+ { fax.str r.fax * }
+ if$
+}
+
+FUNCTION {format.r.email}
+{ r.email empty$
+ { "" }
+ { email.str r.email r.email emailize * }
+ if$
+}
+
+FUNCTION {format.r.url}
+{ r.url empty$
+ { "" }
+ { url.str r.url r.url urlize * }
+ if$
+}
+
+FUNCTION {format.r.account}
+{ r.account empty$
+ { "" }
+ { account.str r.account ttize * }
+ if$
+}
+
+FUNCTION {format.w.flag}
+{ w.title empty$ not
+ w.name empty$ not
+ w.address empty$ not
+ w.street empty$ not
+ w.city empty$ not
+ w.state empty$ not
+ w.zip empty$ not
+ w.country empty$ not
+ w.phone empty$ not
+ w.cellular empty$ not
+ w.fax empty$ not
+ w.email empty$ not
+ w.url empty$ not
+ w.account empty$ not
+ or or or or or or or or or or or or or
+ { work.str }
+ { "" }
+ if$
+}
+
+FUNCTION {format.w.title}
+{ w.title empty$
+ { "" }
+ { title.str w.title * }
+ if$
+}
+
+FUNCTION {format.w.name}
+{ w.name empty$
+ { "" }
+ { name.str w.name * }
+ if$
+}
+
+FUNCTION {format.w.address}
+{ w.address empty$
+ {
+ w.street empty$ w.city empty$ w.state empty$ w.zip empty$ w.country empty$
+ and and and and
+ { "" }
+ { address.str
+ w.street empty$ { "" * } { w.street " " * * } if$
+ w.city empty$ { "" * } { w.city " " * * } if$
+ w.state empty$ { "" * } { w.state " " * * } if$
+ w.zip empty$ { "" * } { w.zip " " * * } if$
+ w.country empty$ { "" * } { w.country * } if$
+ }
+ if$
+ }
+ { address.str w.address * }
+ if$
+}
+
+FUNCTION {format.w.phone}
+{ w.phone empty$
+ { "" }
+ { phone.str w.phone * }
+ if$
+}
+
+FUNCTION {format.w.cellular}
+{ w.cellular empty$
+ { "" }
+ { cellular.str w.cellular * }
+ if$
+}
+
+FUNCTION {format.w.fax}
+{ w.fax empty$
+ { "" }
+ { fax.str w.fax * }
+ if$
+}
+
+FUNCTION {format.w.email}
+{ w.email empty$
+ { "" }
+ { email.str w.email w.email emailize * }
+ if$
+}
+
+FUNCTION {format.w.url}
+{ w.url empty$
+ { "" }
+ { url.str w.url w.url urlize * }
+ if$
+}
+
+FUNCTION {format.w.account}
+{ w.account empty$
+ { "" }
+ { account.str w.account ttize * }
+ if$
+}
+
+FUNCTION {format.note.flag}
+{ note empty$
+ { "" }
+ { note.str }
+ if$
+}
+
+FUNCTION {format.note}
+{ note empty$
+ { "" }
+ { note }
+ if$
+}
+
+
+% ------------------------------------------------------------
+% P E R S O N E N T R Y
+% ------------------------------------------------------------
+
+FUNCTION { person }
+{
+ init.strings
+ newline$
+ "<p><dt><b>" write$
+ format.name write$
+ "</b></dt>" write$
+
+ format.nickname write$
+
+ ""
+ format.birthday.flag output
+ format.birthday output
+
+ format.p.flag output
+ format.p.address output
+ format.p.phone output
+ format.p.cellular output
+ format.p.fax output
+ format.p.email output
+ format.p.url output
+ format.p.account output
+
+ format.r.flag output
+ format.r.address output
+ format.r.phone output
+ format.r.cellular output
+ format.r.fax output
+ format.r.email output
+ format.r.url output
+ format.r.account output
+
+ format.w.flag output
+ format.w.title output
+ format.w.name output
+ format.w.address output
+ format.w.phone output
+ format.w.cellular output
+ format.w.fax output
+ format.w.email output
+ format.w.url output
+ format.w.account output
+
+ format.note.flag output
+ format.note output
+
+ write$
+ newline$
+}
+
+% ------------------------------------------------------------
+% C O M P A N Y E N T R Y
+% ------------------------------------------------------------
+
+
+FUNCTION { company }
+{
+ init.strings
+ newline$
+ "<p><dt><b>" write$
+ name write$
+ "</b></dt><dd>" write$
+
+ ""
+ format.address output
+ format.phone output
+ format.cellular output
+ format.fax output
+ format.email output
+ format.url output
+ format.account output
+ format.note.flag output
+ format.note output
+
+ write$
+ newline$
+}
+
+% ------------------------------------------------------------
+% P L A C E E N T R Y
+% ------------------------------------------------------------
+
+FUNCTION { place }
+{
+ init.strings
+ newline$
+ "<p><dt><b>" write$
+ name write$
+ "</b></dt><dd>" write$
+
+ ""
+ format.address output
+ format.phone output
+ format.cellular output
+ format.fax output
+ format.note.flag output
+ format.note output
+
+ write$
+ newline$
+}
+
+% ------------------------------------------------------------
+% M A I N
+% ------------------------------------------------------------
+
+READ
+ITERATE {presort}
+SORT
+EXECUTE {begin.bib}
+ITERATE {call.type$}
+EXECUTE {end.bib}
+
diff --git a/biblio/bibtex/contrib/directory/address-ldif.bst b/biblio/bibtex/contrib/directory/address-ldif.bst
new file mode 100644
index 0000000000..5d69f62df6
--- /dev/null
+++ b/biblio/bibtex/contrib/directory/address-ldif.bst
@@ -0,0 +1,679 @@
+%% address-ldif.bst
+%% Copyright 2003 Christophe Geuzaine <geuz@geuz.org>
+%
+% $Id: address-ldif.bst,v 1.7 2003/09/16 07:18:07 geuzaine Exp $
+%
+% This program can be redistributed and/or modified under the terms
+% of the LaTeX Project Public License distributed from CTAN
+% archives in directory macros/latex/base/lppl.txt; either
+% version 1 of the License, or (at your option) any later version.
+%
+% BibTeX bibliography style `address-ldif.bst'
+% 'directory' database: all fields
+%
+% This is definitively a hack... To get a working ldif file if the bib
+% file contains special characters (ISO Latin 1, etc.) you must
+% convert the output bbl file to UTF8. You can do it e.g. with the
+% following C code (found on the web, don't know who wrote it):
+%
+% /* Read Latin-1 (ISO-8859-1) characters from stdin, convert them
+% to UTF-8, and write the converted characters to stdout.
+% UTF-8 is defined by RFC 2044.
+% */
+% #include <errno.h>
+% #include <stdio.h>
+%
+% int
+% main (int argc, char** argv)
+% {
+% register int c;
+% while ((c = getchar()) != EOF) {
+% if ((c & 0x80) == 0) {
+% putchar (c);
+% } else {
+% putchar (0xC0 | (0x03 & (c >> 6)));
+% putchar (0x80 | (0x3F & c));
+% }
+% }
+% if ( ! feof (stdin)) {
+% errno = ferror (stdin);
+% perror (argv[0]);
+% }
+% return 0;
+% }
+%
+
+INTEGERS { nameptr namesleft numnames numaux len }
+STRINGS { s t u v }
+
+% ------------------------------------------------------------
+% E N T R I E S
+% ------------------------------------------------------------
+
+ENTRY
+ { name
+ nickname
+ birthday
+ birthyear
+ address % if empty, use street, city, ...
+ street
+ city
+ state
+ zip
+ country
+ phone
+ cellular
+ fax
+ email
+ url
+ account
+ p.address % if empty, use p.street, p.city, ...
+ p.street
+ p.city
+ p.state
+ p.zip
+ p.country
+ p.phone
+ p.cellular
+ p.fax
+ p.email
+ p.url
+ p.account
+ r.address % if empty, use r.street, r.city, ...
+ r.street
+ r.city
+ r.state
+ r.zip
+ r.country
+ r.phone
+ r.cellular
+ r.fax
+ r.email
+ r.url
+ r.account
+ w.title
+ w.name
+ w.address % if empty, use w.street, w.city, ...
+ w.street
+ w.city
+ w.state
+ w.zip
+ w.country
+ w.phone
+ w.cellular
+ w.fax
+ w.email
+ w.url
+ w.account
+ note
+ }
+ {}
+ {
+ }
+
+% ------------------------------------------------------------
+% G E N E R A L
+% ------------------------------------------------------------
+
+FUNCTION {output}
+{ 's :=
+ s empty$
+ {}
+ { s write$
+ newline$
+ }
+ if$
+}
+
+FUNCTION {not}
+{ { #0 }
+ { #1 }
+ if$
+}
+
+FUNCTION {and}
+{ 'skip$
+ { pop$ #0 }
+ if$
+}
+
+FUNCTION {or}
+{ { pop$ #1 }
+ 'skip$
+ if$
+}
+
+% ------------------------------------------------------------
+% P R E - A N D P O S T - H E A D E R S
+% ------------------------------------------------------------
+
+FUNCTION {begin.bib}
+{
+}
+
+FUNCTION {end.bib}
+{
+}
+
+% ------------------------------------------------------------
+% G E N E R A L F O R M A T T I N G F U N C T I O N S
+% ------------------------------------------------------------
+
+FUNCTION {format.names}
+{ 's :=
+ #1 'nameptr :=
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ {
+ s nameptr "{ff{ } }{vv{ } }{ll{ }}{, jj{ }}" format.name$ 't :=
+ nameptr #1 >
+ { namesleft #1 >
+ { ", " * t * }
+ { " and " * t * }
+ if$
+ }
+ 't
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+}
+
+FUNCTION {format.first.names}
+{ 's :=
+ #1 'nameptr :=
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ {
+ s nameptr "{ff{ }}" format.name$ 't :=
+ nameptr #1 >
+ { namesleft #1 >
+ { ", " * t * }
+ { " and " * t * }
+ if$
+ }
+ 't
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+}
+
+FUNCTION {format.last.names}
+{ 's :=
+ #1 'nameptr :=
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ {
+ s nameptr "{vv{ } }{ll{ }}{, jj{ }}" format.name$ 't :=
+ nameptr #1 >
+ { namesleft #1 >
+ { ", " * t * }
+ { " and " * t * }
+ if$
+ }
+ 't
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+}
+
+FUNCTION {format.dates}
+{
+ 's :=
+ #1 'nameptr :=
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+
+ birthyear empty$
+ { #0 'numaux := }
+ { birthyear num.names$ 'numaux :=
+ numnames numaux =
+ { }
+ { " birthdays and birthyears don't match in entry '" cite$ * "'" * warning$ }
+ if$
+ }
+ if$
+
+ { namesleft #0 > }
+ { s nameptr "{ff}" format.name$ 't :=
+ s nameptr "{ll}" format.name$ 'u :=
+
+ numaux #0 > not
+ { }
+ { birthyear nameptr "{ll}" format.name$ 'v :=
+ v * "-" * }
+ if$
+
+ nameptr #1 >
+ { ";" * u * "-" * t * }
+ { u "-" * t * }
+ if$
+
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ numaux #1 - 'numaux :=
+ }
+ while$
+}
+
+% ------------------------------------------------------------
+% V C A R D F I E L D F O R M A T S
+% ------------------------------------------------------------
+
+FUNCTION {format.name}
+{ name empty$
+ { "" }
+ { "cn: " name format.names * }
+ if$
+}
+
+FUNCTION {format.first.name}
+{ name empty$
+ { "" }
+ { "givenName: " name format.first.names * }
+ if$
+}
+
+FUNCTION {format.last.name}
+{ name empty$
+ { "" }
+ { "sn: " name format.last.names * }
+ if$
+}
+
+FUNCTION {format.simple.name}
+{ name empty$
+ { "" }
+ { "cn: " name * }
+ if$
+}
+
+FUNCTION {format.simple.last.name}
+{ name empty$
+ { "" }
+ { "sn: " name * }
+ if$
+}
+
+FUNCTION {format.nickname}
+{ nickname empty$
+ { "" }
+ { "xmozillanickname: " nickname * }
+ if$
+}
+
+FUNCTION {format.birthday}
+{ birthday empty$
+ {
+ birthyear empty$
+ { "" }
+ { "custom1: birthyear=" birthyear * }
+ if$
+ }
+ { "custom1: birthday=" birthday format.dates * }
+ if$
+}
+
+FUNCTION {format.address}
+{ address empty$
+ {
+ % ugly, but we need a new line after each field
+ street empty$ { skip$ } { "postalAddress: " street * output } if$
+ city empty$ { skip$ } { "l: " city * output } if$
+ state empty$ { skip$ } { "st: " state * output } if$
+ zip empty$ { skip$ } { "postalCode: " zip * output } if$
+ country empty$ { skip$ } { "c: " country * output } if$
+ ""
+ }
+ { "postalAddress: " address * }
+ if$
+}
+
+FUNCTION {format.account}
+{ account empty$
+ { "" }
+ { "custom2: account=" account * }
+ if$
+}
+
+FUNCTION {format.phone}
+{ phone empty$
+ { "" }
+ { "telephoneNumber: " phone * }
+ if$
+}
+
+FUNCTION {format.cellular}
+{ cellular empty$
+ { "" }
+ { "mobile: " cellular * }
+ if$
+}
+
+FUNCTION {format.fax}
+{ fax empty$
+ { "" }
+ { "facsimileTelephoneNumber: " fax * }
+ if$
+}
+
+FUNCTION {format.email}
+{ email empty$
+ { "" }
+ { "mail: " email * }
+ if$
+}
+
+FUNCTION {format.url}
+{ url empty$
+ { "" }
+ { "workurl: " url * }
+ if$
+}
+
+FUNCTION {format.p.address}
+{ p.address empty$
+ {
+ % ugly, but we need a new line after each field
+ p.street empty$ { skip$ } { "homePostalAddress: " p.street * output } if$
+ p.city empty$ { skip$ } { "mozillaHomeLocalityName: " p.city * output } if$
+ p.state empty$ { skip$ } { "mozillaHomeState: " p.state * output } if$
+ p.zip empty$ { skip$ } { "mozillaHomePostalCode: " p.zip * output } if$
+ p.country empty$ { skip$ } { "mozillaHomeCountryName: " p.country * output } if$
+ ""
+ }
+ { "homePostalAddress: " p.address * }
+ if$
+}
+
+FUNCTION {format.p.phone}
+{ p.phone empty$
+ { "" }
+ { "homePhone: " p.phone * }
+ if$
+}
+
+FUNCTION {format.p.cellular}
+{ p.cellular empty$
+ { "" }
+ { "mobile: " p.cellular * }
+ if$
+}
+
+FUNCTION {format.p.fax}
+{ p.fax empty$
+ { "" }
+ { "facsimileTelephoneNumber: " p.fax * }
+ if$
+}
+
+FUNCTION {format.p.email}
+{ p.email empty$
+ { "" }
+ { "mail: " p.email * }
+ if$
+}
+
+FUNCTION {format.p.url}
+{ p.url empty$
+ { "" }
+ { "homeurl: " p.url * }
+ if$
+}
+
+FUNCTION {format.p.account}
+{ p.account empty$
+ { "" }
+ { "custom2: account=" p.account * }
+ if$
+}
+
+FUNCTION {format.r.address}
+{ r.address empty$
+ {
+ % ugly, but we need a new line after each field
+ r.street empty$ { skip$ } { "homePostalAddress: " r.street * output } if$
+ r.city empty$ { skip$ } { "mozillaHomeLocalityName: " r.city * output } if$
+ r.state empty$ { skip$ } { "mozillaHomeState: " r.state * output } if$
+ r.zip empty$ { skip$ } { "mozillaHomePostalCode: " r.zip * output } if$
+ r.country empty$ { skip$ } { "mozillaHomeCountryName: " r.country * output } if$
+ ""
+ }
+ { "homePostalAddress: " r.address * }
+ if$
+}
+
+FUNCTION {format.r.phone}
+{ r.phone empty$
+ { "" }
+ { "homePhone: " r.phone * }
+ if$
+}
+
+FUNCTION {format.r.cellular}
+{ r.cellular empty$
+ { "" }
+ { "mobile: " r.cellular * }
+ if$
+}
+
+FUNCTION {format.r.fax}
+{ r.fax empty$
+ { "" }
+ { "facsimileTelephoneNumber: " r.fax * }
+ if$
+}
+
+FUNCTION {format.r.email}
+{ r.email empty$
+ { "" }
+ { "mail: " r.email * }
+ if$
+}
+
+FUNCTION {format.r.url}
+{ r.url empty$
+ { "" }
+ { "homeurl: " r.url * }
+ if$
+}
+
+FUNCTION {format.r.account}
+{ r.account empty$
+ { "" }
+ { "custom2: account=" r.account * }
+ if$
+}
+
+FUNCTION {format.w.title}
+{ w.title empty$
+ { "" }
+ { "title: " w.title * }
+ if$
+}
+
+FUNCTION {format.w.name}
+{ w.name empty$
+ { "" }
+ { "o: " w.name * }
+ if$
+}
+
+FUNCTION {format.w.address}
+{ w.address empty$
+ {
+ % ugly, but we need a new line after each field
+ w.street empty$ { skip$ } { "postalAddress: " w.street * output } if$
+ w.city empty$ { skip$ } { "l: " w.city * output } if$
+ w.state empty$ { skip$ } { "st: " w.state * output } if$
+ w.zip empty$ { skip$ } { "postalCode: " w.zip * output } if$
+ w.country empty$ { skip$ } { "c: " w.country * output } if$
+ ""
+ }
+ { "postalAddress: " w.address * }
+ if$
+}
+
+FUNCTION {format.w.phone}
+{ w.phone empty$
+ { "" }
+ { "telephoneNumber: " w.phone * }
+ if$
+}
+
+FUNCTION {format.w.cellular}
+{ w.cellular empty$
+ { "" }
+ { "mobile: " w.cellular * }
+ if$
+}
+
+FUNCTION {format.w.fax}
+{ w.fax empty$
+ { "" }
+ { "facsimileTelephoneNumber: " w.fax * }
+ if$
+}
+
+FUNCTION {format.w.email}
+{ w.email empty$
+ { "" }
+ { "mail: " w.email * }
+ if$
+}
+
+FUNCTION {format.w.url}
+{ w.url empty$
+ { "" }
+ { "workurl: " w.url * }
+ if$
+}
+
+FUNCTION {format.w.account}
+{ w.account empty$
+ { "" }
+ { "custom2: account=" w.account * }
+ if$
+}
+
+FUNCTION {format.note}
+{ note empty$
+ { "" }
+ { "description: " note * }
+ if$
+}
+
+% ------------------------------------------------------------
+% P E R S O N E N T R Y
+% ------------------------------------------------------------
+
+FUNCTION { person }
+{
+ "objectclass: top" output
+ "objectclass: person" output
+ "objectclass: organizationalPerson" output
+ "objectclass: inetOrgPerson" output
+ "objectclass: mozillaAbPersonObsolete" output
+
+ format.first.name output
+ format.last.name output
+ format.name output
+ format.nickname output
+ format.birthday output
+
+ format.p.address output
+ format.p.phone output
+ format.p.cellular output
+ format.p.fax output
+ format.p.email output
+ format.p.url output
+ format.p.account output
+
+ format.r.address output
+ format.r.phone output
+ format.r.cellular output
+ format.r.fax output
+ format.r.email output
+ format.r.url output
+ format.r.account output
+
+ format.w.title output
+ format.w.name output
+ format.w.address output
+ format.w.phone output
+ format.w.cellular output
+ format.w.fax output
+ format.w.email output
+ format.w.url output
+ format.w.account output
+
+ format.note output
+
+ newline$
+}
+
+% ------------------------------------------------------------
+% C O M P A N Y E N T R Y
+% ------------------------------------------------------------
+
+FUNCTION { company }
+{
+ "objectclass: top" output
+ "objectclass: person" output
+ "objectclass: organizationalPerson" output
+ "objectclass: inetOrgPerson" output
+ "objectclass: mozillaAbPersonObsolete" output
+
+ format.simple.last.name output
+ format.simple.name output
+ format.address output
+ format.phone output
+ format.cellular output
+ format.fax output
+ format.email output
+ format.url output
+ format.account output
+ format.note output
+
+ newline$
+}
+
+% ------------------------------------------------------------
+% P L A C E E N T R Y
+% ------------------------------------------------------------
+
+FUNCTION { place }
+{
+ "objectclass: top" output
+ "objectclass: person" output
+ "objectclass: organizationalPerson" output
+ "objectclass: inetOrgPerson" output
+ "objectclass: mozillaAbPersonObsolete" output
+
+ format.simple.last.name output
+ format.simple.name output
+ format.address output
+ format.phone output
+ format.cellular output
+ format.fax output
+ format.note output
+
+ newline$
+}
+
+% ------------------------------------------------------------
+% M A I N
+% ------------------------------------------------------------
+
+READ
+EXECUTE {begin.bib}
+ITERATE {call.type$}
+EXECUTE {end.bib}
diff --git a/biblio/bibtex/contrib/directory/address-vcard.bst b/biblio/bibtex/contrib/directory/address-vcard.bst
new file mode 100644
index 0000000000..394330b141
--- /dev/null
+++ b/biblio/bibtex/contrib/directory/address-vcard.bst
@@ -0,0 +1,612 @@
+%% address-vcard.bst
+%% Copyright 2003-2004 Christophe Geuzaine <geuz@geuz.org>
+%
+% $Id: address-vcard.bst,v 1.9 2004/01/10 06:45:16 geuzaine Exp $
+%
+% This program can be redistributed and/or modified under the terms
+% of the LaTeX Project Public License distributed from CTAN
+% archives in directory macros/latex/base/lppl.txt; either
+% version 1 of the License, or (at your option) any later version.
+%
+% BibTeX bibliography style `address-vcard.bst'
+% 'directory' database: all fields
+%
+% This is definitively a hack... It assumes the character encoding to
+% be ISO Latin 1. Multi-name entries are not treated entirely
+% correctly due to limitations in the vCard spec.
+%
+% Also, bibtex splits lines automatically in the output file, which
+% can cause alignment problems (and apparently encoding problems with
+% Apple's address book application). You can e.g. fix bibtex's output
+% with awk:
+%
+% awk "!/^ /{ buf[i++] = $0; }
+% /^ /{ buf[i-1] = buf[i-1] substr($0,2,length($0)-1) }
+% END{ for(j=0;j<i;j++) print buf[j] }" file.bbl
+
+INTEGERS { nameptr namesleft numnames numaux len }
+STRINGS { s t u v }
+
+% ------------------------------------------------------------
+% E N T R I E S
+% ------------------------------------------------------------
+
+ENTRY
+ { name
+ nickname
+ birthday
+ birthyear
+ address % if empty, use street, city, ...
+ street
+ city
+ state
+ zip
+ country
+ phone
+ cellular
+ fax
+ email
+ url
+ account
+ p.address % if empty, use p.street, p.city, ...
+ p.street
+ p.city
+ p.state
+ p.zip
+ p.country
+ p.phone
+ p.cellular
+ p.fax
+ p.email
+ p.url
+ p.account
+ r.address % if empty, use r.street, r.city, ...
+ r.street
+ r.city
+ r.state
+ r.zip
+ r.country
+ r.phone
+ r.cellular
+ r.fax
+ r.email
+ r.url
+ r.account
+ w.title
+ w.name
+ w.address % if empty, use w.street, w.city, ...
+ w.street
+ w.city
+ w.state
+ w.zip
+ w.country
+ w.phone
+ w.cellular
+ w.fax
+ w.email
+ w.url
+ w.account
+ note
+ }
+ {}
+ {
+ }
+
+% ------------------------------------------------------------
+% G E N E R A L
+% ------------------------------------------------------------
+
+FUNCTION {output}
+{ 's :=
+ s empty$
+ {}
+ { s write$
+ newline$
+ }
+ if$
+}
+
+FUNCTION {not}
+{ { #0 }
+ { #1 }
+ if$
+}
+
+FUNCTION {and}
+{ 'skip$
+ { pop$ #0 }
+ if$
+}
+
+FUNCTION {or}
+{ { pop$ #1 }
+ 'skip$
+ if$
+}
+
+% ------------------------------------------------------------
+% P R E - A N D P O S T - H E A D E R S
+% ------------------------------------------------------------
+
+FUNCTION {begin.bib}
+{
+}
+
+FUNCTION {end.bib}
+{
+}
+
+% ------------------------------------------------------------
+% G E N E R A L F O R M A T T I N G F U N C T I O N S
+% ------------------------------------------------------------
+
+FUNCTION {format.names}
+{ 's :=
+ #1 'nameptr :=
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ {
+ % "Clinton; Bill (with Hillary Rodham, Chelsee and Christophe Geuzaine)"
+ nameptr #1 >
+ { s nameptr "{ff }{vv }{ll}{\, jj}" format.name$ 't := }
+ { s nameptr "{vv{ } }{ll{ }}{;ff{ }}{\, jj{ }}" format.name$ 't := }
+ if$
+ nameptr #1 >
+ {
+ nameptr #2 =
+ { " (with " * t * }
+ {
+ namesleft #1 >
+ { ", " * t * }
+ { " and " * t * }
+ if$
+ }
+ if$
+ namesleft #1 =
+ { ")" * }
+ { }
+ if$
+ }
+ 't
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+}
+
+FUNCTION {format.dates}
+{
+ 's :=
+ #1 'nameptr :=
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+
+ birthyear empty$
+ { #0 'numaux := }
+ { birthyear num.names$ 'numaux :=
+ numnames numaux =
+ { }
+ { " birthdays and birthyears don't match in entry '" cite$ * "'" * warning$ }
+ if$
+ }
+ if$
+
+ { namesleft #0 > }
+ { s nameptr "{ff}" format.name$ 't :=
+ s nameptr "{ll}" format.name$ 'u :=
+
+ numaux #0 > not
+ { }
+ { birthyear nameptr "{ll}" format.name$ 'v :=
+ v * "-" * }
+ if$
+
+ nameptr #1 >
+ { ";" * u * "-" * t * }
+ { u "-" * t * }
+ if$
+
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ numaux #1 - 'numaux :=
+ }
+ while$
+}
+
+% ------------------------------------------------------------
+% V C A R D F I E L D F O R M A T S
+% ------------------------------------------------------------
+
+FUNCTION {format.name}
+{ name empty$
+ { "" }
+ { "N;charset=iso-8859-1:" name format.names * }
+ if$
+}
+
+FUNCTION {format.simple.name}
+{ name empty$
+ { "" }
+ { "N;charset=iso-8859-1:" name ";" * * }
+ if$
+}
+
+FUNCTION {format.nickname}
+{ nickname empty$
+ { "" }
+ { "NICKNAME;charset=iso-8859-1:" nickname * }
+ if$
+}
+
+FUNCTION {format.birthday}
+{ birthday empty$
+ {
+ birthyear empty$
+ { "" }
+ { "BDAY;value=date:" birthyear * }
+ if$
+ }
+ { "BDAY;value=date:" birthday format.dates * }
+ if$
+}
+
+FUNCTION {format.address}
+{ address empty$
+ {
+ street empty$ city empty$ state empty$ zip empty$ country empty$
+ and and and and
+ { "" }
+ { "ADR;type=WORK;charset=iso-8859-1:;;"
+ street empty$ { "" } { street } if$ * ";" *
+ city empty$ { "" } { city } if$ * ";" *
+ state empty$ { "" } { state } if$ * ";" *
+ zip empty$ { "" } { zip } if$ * ";" *
+ country empty$ { "" } { country } if$ *
+ }
+ if$
+ }
+ { "ADR;type=WORK;charset=iso-8859-1:;;" address * ";;;;" * }
+ if$
+}
+
+FUNCTION {format.account}
+{ account empty$
+ { "" }
+ { "ACCOUNT:" account * }
+ if$
+}
+
+FUNCTION {format.phone}
+{ phone empty$
+ { "" }
+ { "TEL;type=WORK:" phone * }
+ if$
+}
+
+FUNCTION {format.cellular}
+{ cellular empty$
+ { "" }
+ { "TEL;type=CELL:" cellular * }
+ if$
+}
+
+FUNCTION {format.fax}
+{ fax empty$
+ { "" }
+ { "TEL;type=FAX:" fax * }
+ if$
+}
+
+FUNCTION {format.email}
+{ email empty$
+ { "" }
+ { "EMAIL:" email * }
+ if$
+}
+
+FUNCTION {format.url}
+{ url empty$
+ { "" }
+ { "URL:" url * }
+ if$
+}
+
+FUNCTION {format.p.address}
+{ p.address empty$
+ {
+ p.street empty$ p.city empty$ p.state empty$ p.zip empty$ p.country empty$
+ and and and and
+ { "" }
+ { "ADR;type=HOME;charset=iso-8859-1:;;"
+ p.street empty$ { "" } { p.street } if$ * ";" *
+ p.city empty$ { "" } { p.city } if$ * ";" *
+ p.state empty$ { "" } { p.state } if$ * ";" *
+ p.zip empty$ { "" } { p.zip } if$ * ";" *
+ p.country empty$ { "" } { p.country } if$ *
+ }
+ if$
+ }
+ { "ADR;type=HOME;charset=iso-8859-1:;;" p.address * ";;;;" * }
+ if$
+}
+
+FUNCTION {format.p.phone}
+{ p.phone empty$
+ { "" }
+ { "TEL;type=HOME:" p.phone * }
+ if$
+}
+
+FUNCTION {format.p.cellular}
+{ p.cellular empty$
+ { "" }
+ { "TEL;type=CELL:" p.cellular * }
+ if$
+}
+
+FUNCTION {format.p.fax}
+{ p.fax empty$
+ { "" }
+ { "TEL;type=FAX;type=HOME:" p.fax * }
+ if$
+}
+
+FUNCTION {format.p.email}
+{ p.email empty$
+ { "" }
+ { "EMAIL;type=HOME:" p.email * }
+ if$
+}
+
+FUNCTION {format.p.url}
+{ p.url empty$
+ { "" }
+ { "URL;type=HOME:" p.url * }
+ if$
+}
+
+FUNCTION {format.p.account}
+{ p.account empty$
+ { "" }
+ { "ACCOUNT;type=HOME:" p.account * }
+ if$
+}
+
+FUNCTION {format.r.address}
+{ r.address empty$
+ {
+ r.street empty$ r.city empty$ r.state empty$ r.zip empty$ r.country empty$
+ and and and and
+ { "" }
+ { "ADR;type=HOME;charset=iso-8859-1:;;"
+ r.street empty$ { "" } { r.street } if$ * ";" *
+ r.city empty$ { "" } { r.city } if$ * ";" *
+ r.state empty$ { "" } { r.state } if$ * ";" *
+ r.zip empty$ { "" } { r.zip } if$ * ";" *
+ r.country empty$ { "" } { r.country } if$ *
+ }
+ if$
+ }
+ { "ADR;type=HOME;charset=iso-8859-1:;;" r.address * ";;;;" * }
+ if$
+}
+
+FUNCTION {format.r.phone}
+{ r.phone empty$
+ { "" }
+ { "TEL;type=HOME:" r.phone * }
+ if$
+}
+
+FUNCTION {format.r.cellular}
+{ r.cellular empty$
+ { "" }
+ { "TEL;type=CELL:" r.cellular * }
+ if$
+}
+
+FUNCTION {format.r.fax}
+{ r.fax empty$
+ { "" }
+ { "TEL;type=FAX;type=HOME:" r.fax * }
+ if$
+}
+
+FUNCTION {format.r.email}
+{ r.email empty$
+ { "" }
+ { "EMAIL;type=HOME:" r.email * }
+ if$
+}
+
+FUNCTION {format.r.url}
+{ r.url empty$
+ { "" }
+ { "URL;type=HOME:" r.url * }
+ if$
+}
+
+FUNCTION {format.r.account}
+{ r.account empty$
+ { "" }
+ { "ACCOUNT;type=HOME:" r.account * }
+ if$
+}
+
+FUNCTION {format.w.title}
+{ w.title empty$
+ { "" }
+ { "TITLE;charset=iso-8859-1:" w.title * }
+ if$
+}
+
+FUNCTION {format.w.name}
+{ w.name empty$
+ { "" }
+ { "ORG;charset=iso-8859-1:" w.name * }
+ if$
+}
+
+FUNCTION {format.w.address}
+{ w.address empty$
+ {
+ w.street empty$ w.city empty$ w.state empty$ w.zip empty$ w.country empty$
+ and and and and
+ { "" }
+ { "ADR;type=WORK;charset=iso-8859-1:;;"
+ w.street empty$ { "" } { w.street } if$ * ";" *
+ w.city empty$ { "" } { w.city } if$ * ";" *
+ w.state empty$ { "" } { w.state } if$ * ";" *
+ w.zip empty$ { "" } { w.zip } if$ * ";" *
+ w.country empty$ { "" } { w.country } if$ *
+ }
+ if$
+ }
+ { "ADR;type=WORK;charset=iso-8859-1:;;" w.address * ";;;;" * }
+ if$
+}
+
+FUNCTION {format.w.phone}
+{ w.phone empty$
+ { "" }
+ { "TEL;type=WORK:" w.phone * }
+ if$
+}
+
+FUNCTION {format.w.cellular}
+{ w.cellular empty$
+ { "" }
+ { "TEL;type=CELL:" w.cellular * }
+ if$
+}
+
+FUNCTION {format.w.fax}
+{ w.fax empty$
+ { "" }
+ { "TEL;type=FAX;type=WORK:" w.fax * }
+ if$
+}
+
+FUNCTION {format.w.email}
+{ w.email empty$
+ { "" }
+ { "EMAIL;type=WORK:" w.email * }
+ if$
+}
+
+FUNCTION {format.w.url}
+{ w.url empty$
+ { "" }
+ { "URL;type=WORK:" w.url * }
+ if$
+}
+
+FUNCTION {format.w.account}
+{ w.account empty$
+ { "" }
+ { "ACCOUNT;type=WORK:" w.account * }
+ if$
+}
+
+FUNCTION {format.note}
+{ note empty$
+ { "" }
+ { "NOTE;charset=iso-8859-1:" note * }
+ if$
+}
+
+% ------------------------------------------------------------
+% P E R S O N E N T R Y
+% ------------------------------------------------------------
+
+FUNCTION { person }
+{
+ "BEGIN:VCARD" output
+ "VERSION:3.0" output
+
+ format.name output
+ format.nickname output
+ format.birthday output
+
+ format.p.address output
+ format.p.phone output
+ format.p.cellular output
+ format.p.fax output
+ format.p.email output
+ format.p.url output
+ format.p.account output
+
+ format.r.address output
+ format.r.phone output
+ format.r.cellular output
+ format.r.fax output
+ format.r.email output
+ format.r.url output
+ format.r.account output
+
+ format.w.title output
+ format.w.name output
+ format.w.address output
+ format.w.phone output
+ format.w.cellular output
+ format.w.fax output
+ format.w.email output
+ format.w.url output
+ format.w.account output
+
+ format.note output
+
+ "END:VCARD" output
+}
+
+% ------------------------------------------------------------
+% C O M P A N Y E N T R Y
+% ------------------------------------------------------------
+
+FUNCTION { company }
+{
+ "BEGIN:VCARD" output
+ "VERSION:3.0" output
+
+ format.simple.name output
+ format.address output
+ format.phone output
+ format.cellular output
+ format.fax output
+ format.email output
+ format.url output
+ format.account output
+ format.note output
+
+ "END:VCARD" output
+}
+
+% ------------------------------------------------------------
+% P L A C E E N T R Y
+% ------------------------------------------------------------
+
+FUNCTION { place }
+{
+ "BEGIN:VCARD" output
+ "VERSION:3.0" output
+
+ format.simple.name output
+ format.address output
+ format.phone output
+ format.cellular output
+ format.fax output
+ format.note output
+
+ "END:VCARD" output
+}
+
+% ------------------------------------------------------------
+% M A I N
+% ------------------------------------------------------------
+
+READ
+EXECUTE {begin.bib}
+ITERATE {call.type$}
+EXECUTE {end.bib}
diff --git a/biblio/bibtex/contrib/directory/address.bst b/biblio/bibtex/contrib/directory/address.bst
new file mode 100644
index 0000000000..4a7cface0d
--- /dev/null
+++ b/biblio/bibtex/contrib/directory/address.bst
@@ -0,0 +1,852 @@
+%% address.bst
+%% Copyright 1998-2003 Christophe Geuzaine <geuz@geuz.org>
+%
+% $Id: address.bst,v 1.7 2003/09/16 07:18:07 geuzaine Exp $
+%
+% This program can be redistributed and/or modified under the terms
+% of the LaTeX Project Public License distributed from CTAN
+% archives in directory macros/latex/base/lppl.txt; either
+% version 1 of the License, or (at your option) any later version.
+%
+% BibTeX bibliography style `address.bst'
+% 'directory' database: all fields
+%
+% The parts you may want to customize are labeled with "CUSTOM"
+%
+
+INTEGERS { nameptr namesleft numnames numaux len }
+STRINGS { s t u v }
+
+% ------------------------------------------------------------
+% E N T R I E S
+% ------------------------------------------------------------
+
+ENTRY
+ { name
+ nickname
+ birthday
+ birthyear
+ address % if empty, use street, city, ...
+ street
+ city
+ state
+ zip
+ country
+ phone
+ cellular
+ fax
+ email
+ url
+ account
+ p.address % if empty, use p.street, p.city, ...
+ p.street
+ p.city
+ p.state
+ p.zip
+ p.country
+ p.phone
+ p.cellular
+ p.fax
+ p.email
+ p.url
+ p.account
+ r.address % if empty, use r.street, r.city, ...
+ r.street
+ r.city
+ r.state
+ r.zip
+ r.country
+ r.phone
+ r.cellular
+ r.fax
+ r.email
+ r.url
+ r.account
+ w.title
+ w.name
+ w.address % if empty, use w.street, w.city, ...
+ w.street
+ w.city
+ w.state
+ w.zip
+ w.country
+ w.phone
+ w.cellular
+ w.fax
+ w.email
+ w.url
+ w.account
+ note
+ }
+ {}
+ { label
+ letter
+ }
+
+% ------------------------------------------------------------
+% G E N E R A L
+% ------------------------------------------------------------
+
+FUNCTION {output}
+{ 's :=
+ s empty$
+ {}
+ { s write$
+ newline$
+ "\dirblock" write$
+ newline$
+ }
+ if$
+}
+
+FUNCTION {output.flag}
+{ 's :=
+ s empty$
+ {}
+ { s write$
+ newline$
+ }
+ if$
+}
+
+
+FUNCTION {not}
+{ { #0 }
+ { #1 }
+ if$
+}
+
+FUNCTION {and}
+{ 'skip$
+ { pop$ #0 }
+ if$
+}
+
+FUNCTION {or}
+{ { pop$ #1 }
+ 'skip$
+ if$
+}
+
+FUNCTION {chop.word}
+{ 's :=
+ 'len :=
+ s #1 len substring$ =
+ { s len #1 + global.max$ substring$ }
+ 's
+ if$
+}
+
+% ------------------------------------------------------------
+% S O R T I N G F U N C T I O N S
+% ------------------------------------------------------------
+
+FUNCTION {sortify}
+{ purify$
+ "l" change.case$
+}
+
+FUNCTION {sort.names}
+{ 's :=
+ #1 'nameptr :=
+ ""
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ { nameptr #1 >
+ { " " * }
+ 'skip$
+ if$
+ s nameptr "{vv{ } }{ll{ }}{ ff{ }}{ jj{ }}" format.name$ 't :=
+ nameptr numnames = t "others" = and
+ { "et al" * }
+ { t sortify * }
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+}
+
+
+FUNCTION {sort.raw.names}
+{ 't :=
+ "A " #2 "L'" #2
+ "An " #3 "Au " #3 "Le " #3 "La " #3
+ "The " #4 "Les " #4 "Aux " #4
+ t
+ chop.word chop.word
+ chop.word chop.word chop.word chop.word
+ chop.word chop.word chop.word
+ sortify
+ #1 global.max$ substring$
+}
+
+FUNCTION {name.sort}
+{ name empty$
+ { " Name field missing in entry '" cite$ * "'" * warning$ "" }
+ { name sort.names }
+ if$
+}
+
+FUNCTION {raw.name.sort}
+{ name empty$
+ { " Name field missing in entry '" cite$ * "'" * warning$ "" }
+ { name sort.raw.names }
+ if$
+}
+
+FUNCTION {presort}
+{ type$ "company" =
+ type$ "place" =
+ or
+ { raw.name.sort }
+ { name.sort }
+ if$
+ " "
+ *
+ #1 entry.max$ substring$
+ 'sort.key$ :=
+}
+
+FUNCTION {format.first.letter}
+{ type$ "company" =
+ type$ "place" =
+ or
+ { raw.name.sort }
+ { name.sort }
+ if$
+ #1 #1 substring$
+}
+
+% ------------------------------------------------------------
+% P R E - A N D P O S T - H E A D E R S
+% ------------------------------------------------------------
+
+FUNCTION {begin.bib}
+{ "\begin{theaddressbook}" write$
+ newline$
+}
+
+FUNCTION {end.bib}
+{ newline$
+ "\end{theaddressbook}" write$
+ newline$
+}
+
+% ------------------------------------------------------------
+% F O R M A T S
+% ------------------------------------------------------------
+
+FUNCTION {format.names}
+{ 's :=
+ #1 'nameptr :=
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ {
+% CUSTOM uncomment one of the following lines to have the behaviour on the right
+ s nameptr "{ff }{vv }{ll}{, jj}" format.name$ 't := % Christophe de Geuzaine, jr
+% s nameptr "{f. }{vv }{ll}{, jj}" format.name$ 't := % C. de Geuzaine, jr
+% s nameptr "{vv }{ll}{ f.}{, jj}" format.name$ 't := % de Geuzaine C., jr
+% s nameptr "{vv }{ll}{, ff}{, jj}" format.name$ 't := % de Geuzaine, Christophe, jr
+
+ nameptr #1 >
+ { namesleft #1 >
+ { ", " * t * }
+ { " {\dirandf} " * t * }
+ if$
+ }
+ 't
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+}
+
+
+FUNCTION {format.dates}
+{
+ 's :=
+ #1 'nameptr :=
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+
+ birthyear empty$
+ { #0 'numaux := }
+ { birthyear num.names$ 'numaux :=
+ numnames numaux =
+ { }
+ { " birthdays and birthyears don't match in entry '" cite$ * "'" * warning$ }
+ if$
+ }
+ if$
+
+% CUSTOM you shoudn't change this, but rather redefine the command \Dirbirthday.
+
+ { namesleft #0 > }
+ { s nameptr "{ff}" format.name$ 't :=
+ s nameptr "{ll}" format.name$ 'u :=
+
+ nameptr #1 >
+ { namesleft #1 >
+ { ", \dirbira{" * t * "}{" * u * "}" * }
+ { " {\dirandf} \dirbira{" * t * "}{" * u * "}" * }
+ if$
+ }
+ { "\dirbira{" t * "}{" * u * "}" * }
+ if$
+
+ numaux #0 > not
+ { }
+ { birthyear nameptr "{ll}" format.name$ 'v :=
+ "\dirbiya{" * v * "}" * }
+ if$
+
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ numaux #1 - 'numaux :=
+ }
+ while$
+}
+
+FUNCTION {format.years}
+{
+ 's :=
+ #1 'nameptr :=
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+
+ { namesleft #0 > }
+ { s nameptr "{ll}" format.name$ 't :=
+ nameptr #1 >
+ { namesleft #1 >
+ { ", \dirbyra{" * t * "}" * }
+ { " {\dirandf} \dirbyra{" * t * "}" * }
+ if$
+ }
+ { "\dirbyra{" t * "}" * }
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+}
+
+FUNCTION {format.name}
+{ name empty$
+ { "" }
+ { name format.names }
+ if$
+}
+
+FUNCTION {format.nickname}
+{ nickname empty$
+ { "" }
+ { newline$
+ "\dirnica{" nickname format.names "}" * * }
+ if$
+}
+
+FUNCTION {format.birthday.flag}
+{ birthyear empty$ not
+ birthday empty$ not
+ or
+ { "\dirbirf" }
+ { "" }
+ if$
+}
+
+FUNCTION {format.birthday}
+{ birthday empty$
+ {
+ birthyear empty$
+ { "" }
+ { birthyear format.years }
+ if$
+ }
+ { birthday format.dates }
+ if$
+}
+
+FUNCTION {format.address}
+{ address empty$
+ {
+ street empty$ city empty$ state empty$ zip empty$ country empty$
+ and and and and
+ { "" }
+ { "\diradda{"
+ street empty$ { "" * } { street "\dirblock " * * } if$
+ city empty$ { "" * } { city " " * * } if$
+ state empty$ { "" * } { state " " * * } if$
+ zip empty$ { "" * } { zip " " * * } if$
+ country empty$ { "" * } { country * } if$
+ "}" *
+ }
+ if$
+ }
+ { "\diradda{" address "}" * * }
+ if$
+}
+
+FUNCTION {format.account}
+{ account empty$
+ { "" }
+ { "\diracca{" account "}" * * }
+ if$
+}
+
+FUNCTION {format.phone}
+{ phone empty$
+ { "" }
+ { "\dirphoa{" phone "}" * * }
+ if$
+}
+
+FUNCTION {format.cellular}
+{ cellular empty$
+ { "" }
+ { "\dircela{" cellular "}" * * }
+ if$
+}
+
+FUNCTION {format.fax}
+{ fax empty$
+ { "" }
+ { "\dirfaxa{" fax "}" * * }
+ if$
+}
+
+FUNCTION {format.email}
+{ email empty$
+ { "" }
+ { "\diremaa{" email "}" * * }
+ if$
+}
+
+FUNCTION {format.url}
+{ url empty$
+ { "" }
+ { "\dirurla{" url "}" * * }
+ if$
+}
+
+
+FUNCTION {format.p.flag}
+{ p.address empty$ not
+ p.street empty$ not
+ p.city empty$ not
+ p.state empty$ not
+ p.zip empty$ not
+ p.country empty$ not
+ p.phone empty$ not
+ p.cellular empty$ not
+ p.fax empty$ not
+ p.email empty$ not
+ p.url empty$ not
+ p.account empty$ not
+ or or or or or or or or or or or
+ { "\dirprif" }
+ { "" }
+ if$
+}
+
+FUNCTION {format.p.address}
+{ p.address empty$
+ {
+ p.street empty$ p.city empty$ p.state empty$ p.zip empty$ p.country empty$
+ and and and and
+ { "" }
+ { "\dirpadda{"
+ p.street empty$ { "" * } { p.street "\dirblock " * * } if$
+ p.city empty$ { "" * } { p.city " " * * } if$
+ p.state empty$ { "" * } { p.state " " * * } if$
+ p.zip empty$ { "" * } { p.zip " " * * } if$
+ p.country empty$ { "" * } { p.country * } if$
+ "}" *
+ }
+ if$
+ }
+ { "\dirpadda{" p.address "}" * * }
+ if$
+}
+
+FUNCTION {format.p.phone}
+{ p.phone empty$
+ { "" }
+ { "\dirpphoa{" p.phone "}" * * }
+ if$
+}
+
+FUNCTION {format.p.cellular}
+{ p.cellular empty$
+ { "" }
+ { "\dirpcela{" p.cellular "}" * * }
+ if$
+}
+
+FUNCTION {format.p.fax}
+{ p.fax empty$
+ { "" }
+ { "\dirpfaxa{" p.fax "}" * * }
+ if$
+}
+
+FUNCTION {format.p.email}
+{ p.email empty$
+ { "" }
+ { "\dirpemaa{" p.email "}" * * }
+ if$
+}
+
+FUNCTION {format.p.url}
+{ p.url empty$
+ { "" }
+ { "\dirpurla{" p.url "}" * * }
+ if$
+}
+
+FUNCTION {format.p.account}
+{ p.account empty$
+ { "" }
+ { "\dirpacca{" p.account "}" * * }
+ if$
+}
+
+FUNCTION {format.r.flag}
+{ r.address empty$ not
+ r.street empty$ not
+ r.city empty$ not
+ r.state empty$ not
+ r.zip empty$ not
+ r.country empty$ not
+ r.phone empty$ not
+ r.cellular empty$ not
+ r.fax empty$ not
+ r.email empty$ not
+ r.url empty$ not
+ r.account empty$ not
+ or or or or or or or or or or or
+ { "\dirresf" }
+ { "" }
+ if$
+}
+
+FUNCTION {format.r.address}
+{ r.address empty$
+ {
+ r.street empty$ r.city empty$ r.state empty$ r.zip empty$ r.country empty$
+ and and and and
+ { "" }
+ { "\dirpadda{"
+ r.street empty$ { "" * } { r.street "\dirblock " * * } if$
+ r.city empty$ { "" * } { r.city " " * * } if$
+ r.state empty$ { "" * } { r.state " " * * } if$
+ r.zip empty$ { "" * } { r.zip " " * * } if$
+ r.country empty$ { "" * } { r.country * } if$
+ "}" *
+ }
+ if$
+ }
+ { "\dirradda{" r.address "}" * * }
+ if$
+}
+
+FUNCTION {format.r.phone}
+{ r.phone empty$
+ { "" }
+ { "\dirrphoa{" r.phone "}" * * }
+ if$
+}
+
+FUNCTION {format.r.cellular}
+{ r.cellular empty$
+ { "" }
+ { "\dirrcela{" r.cellular "}" * * }
+ if$
+}
+
+FUNCTION {format.r.fax}
+{ r.fax empty$
+ { "" }
+ { "\dirrfaxa{" r.fax "}" * * }
+ if$
+}
+
+FUNCTION {format.r.email}
+{ r.email empty$
+ { "" }
+ { "\dirremaa{" r.email "}" * * }
+ if$
+}
+
+FUNCTION {format.r.url}
+{ r.url empty$
+ { "" }
+ { "\dirrurla{" r.url "}" * * }
+ if$
+}
+
+FUNCTION {format.r.account}
+{ r.account empty$
+ { "" }
+ { "\dirracca{" r.account "}" * * }
+ if$
+}
+
+FUNCTION {format.w.flag}
+{ w.title empty$ not
+ w.name empty$ not
+ w.address empty$ not
+ w.street empty$ not
+ w.city empty$ not
+ w.state empty$ not
+ w.zip empty$ not
+ w.country empty$ not
+ w.phone empty$ not
+ w.cellular empty$ not
+ w.fax empty$ not
+ w.email empty$ not
+ w.url empty$ not
+ w.account empty$ not
+ or or or or or or or or or or or or or
+ { "\dirworf" }
+ { "" }
+ if$
+}
+
+FUNCTION {format.w.title}
+{ w.title empty$
+ { "" }
+ { "\dirtita{" w.title "}" * * }
+ if$
+}
+
+FUNCTION {format.w.name}
+{ w.name empty$
+ { "" }
+ { "\dirnama{" w.name "}" * * }
+ if$
+}
+
+FUNCTION {format.w.address}
+{ w.address empty$
+ {
+ w.street empty$ w.city empty$ w.state empty$ w.zip empty$ w.country empty$
+ and and and and
+ { "" }
+ { "\dirpadda{"
+ w.street empty$ { "" * } { w.street "\dirblock " * * } if$
+ w.city empty$ { "" * } { w.city " " * * } if$
+ w.state empty$ { "" * } { w.state " " * * } if$
+ w.zip empty$ { "" * } { w.zip " " * * } if$
+ w.country empty$ { "" * } { w.country * } if$
+ "}" *
+ }
+ if$
+ }
+ { "\dirwadda{" w.address "}" * * }
+ if$
+}
+
+FUNCTION {format.w.phone}
+{ w.phone empty$
+ { "" }
+ { "\dirwphoa{" w.phone "}" * * }
+ if$
+}
+
+FUNCTION {format.w.cellular}
+{ w.cellular empty$
+ { "" }
+ { "\dirwcela{" w.cellular "}" * * }
+ if$
+}
+
+FUNCTION {format.w.fax}
+{ w.fax empty$
+ { "" }
+ { "\dirwfaxa{" w.fax "}" * * }
+ if$
+}
+
+FUNCTION {format.w.email}
+{ w.email empty$
+ { "" }
+ { "\dirwemaa{" w.email "}" * * }
+ if$
+}
+
+FUNCTION {format.w.url}
+{ w.url empty$
+ { "" }
+ { "\dirwurla{" w.url "}" * * }
+ if$
+}
+
+FUNCTION {format.w.account}
+{ w.account empty$
+ { "" }
+ { "\dirwacca{" w.account "}" * * }
+ if$
+}
+
+FUNCTION {format.note.flag}
+{ note empty$
+ { "" }
+ { "\dirnotf" }
+ if$
+}
+
+FUNCTION {format.note}
+{ note empty$
+ { "" }
+ { "\dirnota{" note "}" * * }
+ if$
+}
+
+
+% ------------------------------------------------------------
+% P E R S O N E N T R Y
+% ------------------------------------------------------------
+
+FUNCTION { person }
+{
+ newline$
+
+ "\dircheck{" write$
+ format.first.letter write$
+ "}" write$
+ newline$
+
+ "\diritem[" write$
+ format.name write$
+ "]{" write$
+ "d." cite$ * write$
+ "}\dirgroup" write$
+ format.nickname write$
+ newline$
+ "\dirblock" write$
+ newline$
+
+ format.birthday.flag output.flag
+ format.birthday output
+
+ format.p.flag output.flag
+ format.p.address output
+ format.p.phone output
+ format.p.cellular output
+ format.p.fax output
+ format.p.email output
+ format.p.url output
+ format.p.account output
+
+ format.r.flag output.flag
+ format.r.address output
+ format.r.phone output
+ format.r.cellular output
+ format.r.fax output
+ format.r.email output
+ format.r.url output
+ format.r.account output
+
+ format.w.flag output.flag
+ format.w.title output
+ format.w.name output
+ format.w.address output
+ format.w.phone output
+ format.w.cellular output
+ format.w.fax output
+ format.w.email output
+ format.w.url output
+ format.w.account output
+
+ format.note.flag output.flag
+ format.note output
+
+ "\direndgroup" write$
+ newline$
+}
+
+% ------------------------------------------------------------
+% C O M P A N Y E N T R Y
+% ------------------------------------------------------------
+
+
+FUNCTION { company }
+{
+ newline$
+
+ "\dircheck{" write$
+ format.first.letter write$
+ "}" write$
+ newline$
+
+ "\diritem[" write$
+ name write$
+ "]{" write$
+ "d." cite$ * write$
+ "}\dirgroup" write$
+ newline$
+ "\dirblock" write$
+ newline$
+
+ format.address output
+ format.phone output
+ format.cellular output
+ format.fax output
+ format.email output
+ format.url output
+ format.account output
+ format.note.flag output.flag
+ format.note output
+
+ "\direndgroup" write$
+ newline$
+}
+
+% ------------------------------------------------------------
+% P L A C E E N T R Y
+% ------------------------------------------------------------
+
+FUNCTION { place }
+{
+ newline$
+
+ "\dircheck{" write$
+ format.first.letter write$
+ "}" write$
+ newline$
+
+ "\diritem[" write$
+ name write$
+ "]{" write$
+ "d." cite$ * write$
+ "}\dirgroup" write$
+ newline$
+ "\dirblock" write$
+ newline$
+
+ format.address output
+ format.phone output
+ format.cellular output
+ format.fax output
+ format.note.flag output.flag
+ format.note output
+
+ "\direndgroup" write$
+ newline$
+}
+
+% ------------------------------------------------------------
+% M A I N
+% ------------------------------------------------------------
+
+READ
+ITERATE {presort}
+SORT
+EXECUTE {begin.bib}
+ITERATE {call.type$}
+EXECUTE {end.bib}
+
diff --git a/biblio/bibtex/contrib/directory/birthday.bst b/biblio/bibtex/contrib/directory/birthday.bst
new file mode 100644
index 0000000000..69f0b9eefc
--- /dev/null
+++ b/biblio/bibtex/contrib/directory/birthday.bst
@@ -0,0 +1,299 @@
+%% birthday.bst
+%% Copyright 1998-2003 Christophe Geuzaine <geuz@geuz.org>
+%
+% $Id: birthday.bst,v 1.6 2003/09/14 09:47:49 geuzaine Exp $
+%
+% This program can be redistributed and/or modified under the terms
+% of the LaTeX Project Public License distributed from CTAN
+% archives in directory macros/latex/base/lppl.txt; either
+% version 1 of the License, or (at your option) any later version.
+%
+% BibTeX bibliography style `birthday.bst'
+% 'directory' database: only birthday field
+%
+% The parts you may want to customize are labeled with "CUSTOM"
+%
+
+INTEGERS { nameptr namesleft numnames numaux len }
+STRINGS { s t u v }
+
+% ------------------------------------------------------------
+% E N T R I E S
+% ------------------------------------------------------------
+
+ENTRY
+ { name
+ birthday
+ birthyear
+ }
+ {}
+ {}
+
+% ------------------------------------------------------------
+% G E N E R A L
+% ------------------------------------------------------------
+
+FUNCTION {output}
+{ 's :=
+ s empty$
+ {}
+ { s write$
+ newline$
+ "\dirblock" write$
+ newline$
+ }
+ if$
+}
+
+FUNCTION {not}
+{ { #0 }
+ { #1 }
+ if$
+}
+
+FUNCTION {or}
+{ { pop$ #1 }
+ 'skip$
+ if$
+}
+
+% ------------------------------------------------------------
+% S O R T I N G F U N C T I O N S
+% ------------------------------------------------------------
+
+FUNCTION {sortify}
+{ purify$
+ "l" change.case$
+}
+
+FUNCTION {sort.day}
+{
+ 's :=
+ #1 'nameptr :=
+ ""
+ s num.names$ 'numnames :=
+ skip$
+ s nameptr "{ll{}}{ff{}}" format.name$ 't :=
+ t sortify *
+ #1 global.max$ substring$
+}
+
+
+FUNCTION {birthday.sort}
+{ type$ "person" =
+ { birthday empty$
+ { "" }
+ { birthday sort.day }
+ if$ }
+ { "" }
+ if$
+}
+
+FUNCTION {presort}
+{ birthday.sort
+ " "
+ *
+ #1 entry.max$ substring$
+ 'sort.key$ :=
+}
+
+% ------------------------------------------------------------
+% P R E - A N D P O S T - H E A D E R S
+% ------------------------------------------------------------
+
+FUNCTION {begin.bib}
+{ "\begin{thephonebook}" write$
+ newline$
+}
+
+FUNCTION {end.bib}
+{ newline$
+ "\end{thephonebook}" write$
+ newline$
+}
+
+% ------------------------------------------------------------
+% F O R M A T S
+% ------------------------------------------------------------
+
+FUNCTION {format.names}
+{ 's :=
+ #1 'nameptr :=
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ {
+% CUSTOM uncomment one of the following lines to have the behaviour on the right
+ s nameptr "{ff }{vv }{ll}{, jj}" format.name$ 't := % Christophe de Geuzaine, jr
+% s nameptr "{f. }{vv }{ll}{, jj}" format.name$ 't := % C. de Geuzaine, jr
+% s nameptr "{vv }{ll}{ f.}{, jj}" format.name$ 't := % de Geuzaine C., jr
+% s nameptr "{vv }{ll}{, ff}{, jj}" format.name$ 't := % de Geuzaine, Christophe, jr
+
+ nameptr #1 >
+ { namesleft #1 >
+ { ", " * t * }
+ { " {\dirandf} " * t * }
+ if$
+ }
+ 't
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+}
+
+
+FUNCTION {format.dates}
+{
+ 's :=
+ #1 'nameptr :=
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+
+ birthyear empty$
+ { #0 'numaux := }
+ { birthyear num.names$ 'numaux :=
+ numnames numaux =
+ { }
+ { " birthdays and birthyears don't match in entry '" cite$ * "'" * warning$ }
+ if$
+ }
+ if$
+
+% CUSTOM you shoudn't change this, but rather redefine the command \Dirbirthday.
+
+ { namesleft #0 > }
+ { s nameptr "{ff}" format.name$ 't :=
+ s nameptr "{ll}" format.name$ 'u :=
+
+ nameptr #1 >
+ { namesleft #1 >
+ { ", \dirbira{" * t * "}{" * u * "}" * }
+ { " {\dirandf} \dirbira{" * t * "}{" * u * "}" * }
+ if$
+ }
+ { "\dirbira{" t * "}{" * u * "}" * }
+ if$
+
+ numaux #0 > not
+ { }
+ { birthyear nameptr "{ll}" format.name$ 'v :=
+ "\dirbiya{" * v * "}" * }
+ if$
+
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ numaux #1 - 'numaux :=
+ }
+ while$
+}
+
+FUNCTION {format.years}
+{
+ 's :=
+ #1 'nameptr :=
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+
+ { namesleft #0 > }
+ { s nameptr "{ll}" format.name$ 't :=
+ nameptr #1 >
+ { namesleft #1 >
+ { ", \dirbyra{" * t * "}" * }
+ { " {\dirandf} \dirbyra{" * t * "}" * }
+ if$
+ }
+ { "\dirbyra{" t * "}" * }
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+}
+
+FUNCTION {format.name}
+{ name empty$
+ { "" }
+ { name format.names }
+ if$
+}
+
+FUNCTION {format.birthday.flag}
+{ birthyear empty$ not
+ birthday empty$ not
+ or
+ { "\dirbirf " }
+ { "" }
+ if$
+}
+
+FUNCTION {format.birthday}
+{ birthday empty$
+ {
+ birthyear empty$
+ { "" }
+ { birthyear format.years }
+ if$
+ }
+ { birthday format.dates }
+ if$
+}
+
+% ------------------------------------------------------------
+% P E R S O N E N T R Y
+% ------------------------------------------------------------
+
+
+FUNCTION { person }
+{
+ birthday empty$ not
+ { newline$
+
+ "\diritem[" write$
+ format.birthday.flag write$
+ format.birthday write$
+ "]{" write$
+ "d." cite$ * write$
+ "}\dirgroup" write$
+ newline$
+ "\dirblock" write$
+ newline$
+
+ format.name output
+
+ "\direndgroup" write$
+ newline$
+ }
+ { }
+ if$
+}
+
+% ------------------------------------------------------------
+% C O M P A N Y E N T R Y
+% ------------------------------------------------------------
+
+FUNCTION { company }
+{
+}
+
+% ------------------------------------------------------------
+% P L A C E E N T R Y
+% ------------------------------------------------------------
+
+FUNCTION { place }
+{
+}
+
+
+% ------------------------------------------------------------
+% M A I N
+% ------------------------------------------------------------
+
+READ
+ITERATE {presort}
+SORT
+EXECUTE {begin.bib}
+ITERATE {call.type$}
+EXECUTE {end.bib}
+
diff --git a/biblio/bibtex/contrib/directory/business.bib b/biblio/bibtex/contrib/directory/business.bib
new file mode 100644
index 0000000000..7d7b679768
--- /dev/null
+++ b/biblio/bibtex/contrib/directory/business.bib
@@ -0,0 +1,36 @@
+## business.bib
+## Copyright 1998 Christophe Geuzaine
+#
+# $Id: business.bib,v 1.4 2003/09/15 05:40:31 geuzaine Exp $
+#
+# This program can be redistributed and/or modified under the terms
+# of the LaTeX Project Public License distributed from CTAN
+# archives in directory macros/latex/base/lppl.txt; either
+# version 1 of the License, or (at your option) any later version.
+#
+# 'directory' package: sample bib file
+#
+
+@Company{microknud,
+ name = "Microknud Corp.",
+ phone = "+01-(0)2-465.83.99",
+ fax = "005.79.00",
+ street = "Haight Street 513",
+ city = "Novosibirsk",
+ zip = "80214",
+ country = "Gnuland",
+ url = "http://microknu.com/ass/bill.html",
+}
+
+@Company{knudsoft,
+ name = "The Knudsoft Company",
+ email = "knud@knudsoft.com",
+ url = "http://knudsoft.com/hole/gates.htm",
+}
+
+@Place{knudsoft:rs.2,
+ name = "Knudsoft (RS.2 Computer Room)",
+ phone = "+01-(0)2-434.23.23",
+}
+
+
diff --git a/biblio/bibtex/contrib/directory/directory.pdf b/biblio/bibtex/contrib/directory/directory.pdf
new file mode 100644
index 0000000000..d9a6af0e3f
--- /dev/null
+++ b/biblio/bibtex/contrib/directory/directory.pdf
Binary files differ
diff --git a/biblio/bibtex/contrib/directory/directory.sty b/biblio/bibtex/contrib/directory/directory.sty
new file mode 100644
index 0000000000..fbcb34e933
--- /dev/null
+++ b/biblio/bibtex/contrib/directory/directory.sty
@@ -0,0 +1,436 @@
+%% directory.sty
+%% Copyright 1998-2004 Christophe Geuzaine <geuz@geuz.org>
+%
+% $Id: directory.sty,v 1.10 2004/02/11 16:17:29 geuzaine Exp $
+%
+% This program can be redistributed and/or modified under the terms
+% of the LaTeX Project Public License distributed from CTAN
+% archives in directory macros/latex/base/lppl.txt; either
+% version 1 of the License, or (at your option) any later version.
+%
+% LaTeX style file `directory.sty'
+%
+% For use in conjunction with 'address.bst', 'phone.bst',
+% 'email.bst', 'birthday.bst', 'letter.bst'
+%
+\newif\if@break\@breakfalse
+\newif\if@german\@germanfalse
+\newif\if@french\@frenchfalse
+\newif\if@longdates\@longdatesfalse
+%
+\DeclareOption{split}{
+ \typeout{^^JWarning: the `split' option is obsolete! Redefine `Dirheader' instead.^^J}
+}
+\DeclareOption{break}{\@breaktrue}
+\DeclareOption{german}{\@germantrue}
+\DeclareOption{french}{\@frenchtrue}
+\DeclareOption{longdates}{\@longdatestrue}
+%
+\ProcessOptions*
+%
+\RequirePackage{url}
+%
+% ------------------------------------------------------------
+% N E W D I M E N S I O N S
+% ------------------------------------------------------------
+%
+\newlength{\dirindent} \setlength{\dirindent} {3em}
+\newlength{\dirsep} \setlength{\dirsep} {3ex}
+\newlength{\dirparindent} \setlength{\dirparindent} {0em}
+\newlength{\dirtablewidth} \setlength{\dirtablewidth}{0.5\textwidth}
+%
+% ------------------------------------------------------------
+% C U S T O M I Z A T I O N C O M M A N D S
+% ------------------------------------------------------------
+%
+\if@german
+%
+% German localization
+%
+ \newcommand{\dirsymbol} {}
+ \newcommand{\dirbirthday} {$\star$~}
+ \newcommand{\dirnote} {$\triangleright$~}
+ \newcommand{\dirnickname} {}
+ \newcommand{\diraddress} {}
+ \newcommand{\dirand} {\normalfont{und}}
+ \newcommand{\dirprivate} {\emph{p}~}
+ \newcommand{\dirresidence} {\emph{z}~} % 'Zweiter Wohnsitz'
+ \newcommand{\dirwork} {\emph{b}~} % 'Beruf'
+ \newcommand{\dirphone} {Tel.~}
+ \newcommand{\dircellular} {Mobil~}
+ \newcommand{\dirfax} {Fax~}
+ \newcommand{\diremail} {}
+ \newcommand{\dirurl} {}
+ \newcommand{\diraccount} {}
+ \newcommand{\dirtitle} {}
+ \newcommand{\dirname} {}
+ \if@longdates
+ \newcommand{\Dirbirthday}[2] {{\number#1}.~{\ifcase #2\or Januar\or Februar\or%
+ M\"arz\or April\or Mai\or Juni\or Juli\or%
+ August\or September\or Oktober\or November\or%
+ Dezember\fi}}
+ \newcommand{\Dirbirthyear}[1] {~{#1}}
+ \else
+ \newcommand{\Dirbirthday}[2] {{\number#1}.{\number#2}.}
+ \newcommand{\Dirbirthyear}[1] {{#1}}
+ \fi
+ \newcommand{\DirbirthyearAlone}[1]{{#1}}
+ \newcommand{\Dirnickname}[1] {(alias \emph{#1})}
+\else
+\if@french
+%
+% French localization
+%
+ \newcommand{\dirsymbol} {}
+ \newcommand{\dirbirthday} {$\star$~}
+ \newcommand{\dirnote} {$\triangleright$~}
+ \newcommand{\dirnickname} {}
+ \newcommand{\diraddress} {}
+ \newcommand{\dirand} {\normalfont{et}}
+ \newcommand{\dirprivate} {\emph{p}~}
+ \newcommand{\dirresidence} {\emph{r}~}
+ \newcommand{\dirwork} {\emph{b}~} % 'bureau'
+ \newcommand{\dirphone} {t\'el: }
+ \newcommand{\dircellular} {gsm: }
+ \newcommand{\dirfax} {fax: }
+ \newcommand{\diremail} {}
+ \newcommand{\dirurl} {}
+ \newcommand{\diraccount} {cpte: }
+ \newcommand{\dirtitle} {}
+ \newcommand{\dirname} {}
+ \if@longdates
+ \newcommand{\Dirbirthday}[2] {{\ifnum #1=1 1er\else\number#1\fi}~%
+ {\ifcase #2\or janvier\or f\'evrier\or mars\or%
+ avril\or mai\or juin\or juillet\or ao\^ut\or%
+ septembre\or octobre\or novembre\or d\'ecembre\fi}}
+ \newcommand{\Dirbirthyear}[1] {~{#1}}
+ \else
+ \newcommand{\Dirbirthday}[2] {{\number#1}/{\number#2}}
+ \newcommand{\Dirbirthyear}[1] {/{#1}}
+ \fi
+ \newcommand{\DirbirthyearAlone}[1]{{#1}}
+ \newcommand{\Dirnickname}[1] {(dit \emph{#1})}
+\else
+%
+% Default localization (English)
+%
+ \newcommand{\dirsymbol} {}
+ \newcommand{\dirbirthday} {$\star$~}
+ \newcommand{\dirnote} {$\triangleright$~}
+ \newcommand{\dirnickname} {}
+ \newcommand{\diraddress} {}
+ \newcommand{\dirand} {\normalfont{and}}
+ \newcommand{\dirprivate} {\emph{p}~}
+ \newcommand{\dirresidence} {\emph{r}~}
+ \newcommand{\dirwork} {\emph{w}~}
+ \newcommand{\dirphone} {tel: }
+ \newcommand{\dircellular} {mobile: }
+ \newcommand{\dirfax} {fax: }
+ \newcommand{\diremail} {}
+ \newcommand{\dirurl} {}
+ \newcommand{\diraccount} {acc: }
+ \newcommand{\dirtitle} {}
+ \newcommand{\dirname} {}
+ \if@longdates
+ \newcommand{\Dirbirthday}[2] {{\ifcase #2\or January\or February\or March\or%
+ April\or May\or June\or July\or August\or%
+ September\or October\or November\or December\fi}%
+ {\space\ifnum #1=1 1st\else\number#1\fi}}
+ \newcommand{\Dirbirthyear}[1] {, {#1}}
+ \else
+ \newcommand{\Dirbirthday}[2] {{\number#2}/{\number#1}}
+ \newcommand{\Dirbirthyear}[1] {/{#1}}
+ \fi
+ \newcommand{\DirbirthyearAlone}[1]{{#1}}
+ \newcommand{\Dirnickname}[1] {(aka \emph{#1})}
+\fi
+\fi
+
+\newcommand{\dirpaddress} {\diraddress}
+\newcommand{\dirraddress} {\diraddress}
+\newcommand{\dirwaddress} {\diraddress}
+\newcommand{\dirpphone} {\dirphone}
+\newcommand{\dirrphone} {\dirphone}
+\newcommand{\dirwphone} {\dirphone}
+\newcommand{\dirpcellular} {\dircellular}
+\newcommand{\dirrcellular} {\dircellular}
+\newcommand{\dirwcellular} {\dircellular}
+\newcommand{\dirpfax} {\dirfax}
+\newcommand{\dirrfax} {\dirfax}
+\newcommand{\dirwfax} {\dirfax}
+\newcommand{\dirpemail} {\diremail}
+\newcommand{\dirremail} {\diremail}
+\newcommand{\dirwemail} {\diremail}
+\newcommand{\dirpurl} {\dirurl}
+\newcommand{\dirrurl} {\dirurl}
+\newcommand{\dirwurl} {\dirurl}
+\newcommand{\dirpaccount} {\diraccount}
+\newcommand{\dirraccount} {\diraccount}
+\newcommand{\dirwaccount} {\diraccount}
+\newcommand{\Dirlabel}[1] {\textbf{#1}}
+%\newcommand{\Dirheader}[1]{\newpage\markboth{\MakeUppercase{#1}}{\MakeUppercase{#1}}}
+\newcommand{\Dirheader}[1] {}
+\newcommand{\Diraddress}[1] {{#1}}
+\newcommand{\Dirpaddress}[1] {\Diraddress{#1}}
+\newcommand{\Dirraddress}[1] {\Diraddress{#1}}
+\newcommand{\Dirwaddress}[1] {\Diraddress{#1}}
+\newcommand{\Dirphone}[1] {{#1}}
+\newcommand{\Dirpphone}[1] {\Dirphone{#1}}
+\newcommand{\Dirrphone}[1] {\Dirphone{#1}}
+\newcommand{\Dirwphone}[1] {\Dirphone{#1}}
+\newcommand{\Dircellular}[1] {{#1}}
+\newcommand{\Dirpcellular}[1] {\Dircellular{#1}}
+\newcommand{\Dirrcellular}[1] {\Dircellular{#1}}
+\newcommand{\Dirwcellular}[1] {\Dircellular{#1}}
+\newcommand{\Dirfax}[1] {{#1}}
+\newcommand{\Dirpfax}[1] {\Dirfax{#1}}
+\newcommand{\Dirrfax}[1] {\Dirfax{#1}}
+\newcommand{\Dirwfax}[1] {\Dirfax{#1}}
+\newcommand{\Diremail}[1] {\url{#1}}
+\newcommand{\Dirpemail}[1] {\Diremail{#1}}
+\newcommand{\Dirremail}[1] {\Diremail{#1}}
+\newcommand{\Dirwemail}[1] {\Diremail{#1}}
+\newcommand{\Dirurl}[1] {\url{#1}}
+\newcommand{\Dirpurl}[1] {\Dirurl{#1}}
+\newcommand{\Dirrurl}[1] {\Dirurl{#1}}
+\newcommand{\Dirwurl}[1] {\Dirurl{#1}}
+\newcommand{\Diraccount}[1] {\url{#1}}
+\newcommand{\Dirpaccount}[1] {\Diraccount{#1}}
+\newcommand{\Dirraccount}[1] {\Diraccount{#1}}
+\newcommand{\Dirwaccount}[1] {\Diraccount{#1}}
+\newcommand{\Dirtitle}[1] {{#1}}
+\newcommand{\Dirname}[1] {{#1}}
+\newcommand{\Dirnote}[1] {{#1}}
+%
+% ------------------------------------------------------------
+% D I R E C T O R Y
+% ------------------------------------------------------------
+%
+\def\dirbegin{\string\begin{tabular}{@{}p{\dirtablewidth}@{}}}
+\def\dirnext{\string\\}
+\def\dirbreak{\dirnext} %% this will be redefined for phonebooks and addressbooks
+\def\dirend{\string\end{tabular}}
+%
+% \diritem
+%
+\def\diritem{\@ifnextchar[\@diritem\@ldiritem}
+\def\@diritem[#1]#2{%
+ \item\hspace{-\dirindent}\@dirlabel{#1}%
+ \if@filesw
+ {\let\protect\noexpand%
+ \immediate
+ \write\@auxout{\string\bibcite{#2}{#1}}}
+ \fi
+ \ignorespaces}
+\def\@ldiritem#1#2{%
+ \if@filesw
+ {\let\protect\noexpand%
+ \immediate
+ \write\@auxout{\string\bibcite{#2}{#1}}}
+ \fi
+ \ignorespaces}
+%
+% \directory
+%
+\newcommand*\directory[2][bbl]{%
+ \if@filesw
+ \immediate\write\@auxout{\string\bibdata{#2}}%
+ \fi
+ \@input@{\jobname.#1}}
+%
+% \directorystyle
+%
+\def\directorystyle#1{%
+ \ifx\@begindocumenthook\@undefined\else
+ \expandafter\AtBeginDocument
+ \fi
+ {\if@filesw
+ \immediate\write\@auxout{\string\bibstyle{#1}}%
+ \fi}}
+%
+% \@dirlabel
+%
+\def\@dirlabel#1{\Dirlabel{#1}}
+%
+% \dir
+%
+\def\dir{\@ifnextchar [{\@tempswatrue\@directorycitex}%
+ {\@tempswafalse\@directorycitex[]}}
+\def\@directorycitex[#1]#2{%
+ \let\@citea\@empty
+ \@directorycite{\@for\@citeb:=#2\do
+ {\@citea\def\@citea{,\penalty\@m\ }%
+ \edef\@citeb{\expandafter\@firstofone\@citeb}%
+ \if@filesw\immediate\write\@auxout{\string\citation{\@citeb}}\fi
+ \@ifundefined{b@d.\@citeb}{\mbox{\reset@font\bfseries ?}%
+ \G@refundefinedtrue\@latex@warning
+ {Directory citation `#2' on page \thepage \space undefined}}%
+% {\hbox{\csname b@d.\@citeb\endcsname}}}}{#1}}
+ {{\let\nobreakspace\space\csname b@d.\@citeb\endcsname}}}}{#1}}
+%
+% \pdir
+%
+\def\pdir{\@ifnextchar [{\@tempswatrue\@pdirectorycitex}%
+ {\@tempswafalse\@pdirectorycitex[]}}
+\def\@pdirectorycitex[#1]#2{%
+ \let\@citea\@empty
+ \@directorycite{\@for\@citeb:=#2\do
+ {\@citea\def\@citea{,\penalty\@m\ }%
+ \edef\@citeb{\expandafter\@firstofone\@citeb}%
+ \if@filesw\immediate\write\@auxout{\string\citation{\@citeb}}\fi
+ \@ifundefined{b@p.\@citeb}{\mbox{\reset@font\bfseries ?}%
+ \G@refundefinedtrue\@latex@warning
+ {Private part of directory citation `#2' on page \thepage \space undefined%
+ (probably other directory style than 'letter.bst')}}%
+ {\hbox{\csname b@p.\@citeb\endcsname}}}}{#1}}
+%
+% \rdir
+%
+\def\rdir{\@ifnextchar [{\@tempswatrue\@rdirectorycitex}%
+ {\@tempswafalse\@rdirectorycitex[]}}
+\def\@rdirectorycitex[#1]#2{%
+ \let\@citea\@empty
+ \@directorycite{\@for\@citeb:=#2\do
+ {\@citea\def\@citea{,\penalty\@m\ }%
+ \edef\@citeb{\expandafter\@firstofone\@citeb}%
+ \if@filesw\immediate\write\@auxout{\string\citation{\@citeb}}\fi
+ \@ifundefined{b@r.\@citeb}{\mbox{\reset@font\bfseries ?}%
+ \G@refundefinedtrue\@latex@warning
+ {Residence part of directory citation `#2' on page \thepage \space undefined%
+ (probably other directory style than 'letter.bst')}}%
+ {\hbox{\csname b@r.\@citeb\endcsname}}}}{#1}}
+%
+% \wdir
+%
+\def\wdir{\@ifnextchar [{\@tempswatrue\@wdirectorycitex}%
+ {\@tempswafalse\@wdirectorycitex[]}}
+\def\@wdirectorycitex[#1]#2{%
+ \let\@citea\@empty
+ \@directorycite{\@for\@citeb:=#2\do
+ {\@citea\def\@citea{,\penalty\@m\ }%
+ \edef\@citeb{\expandafter\@firstofone\@citeb}%
+ \if@filesw\immediate\write\@auxout{\string\citation{\@citeb}}\fi
+ \@ifundefined{b@w.\@citeb}{\mbox{\reset@font\bfseries ?}%
+ \G@refundefinedtrue\@latex@warning
+ {Work part of directory citation `#2' on page \thepage \space undefined%
+ (probably other directory style than 'letter.bst')}}%
+ {\hbox{\csname b@w.\@citeb\endcsname}}}}{#1}}
+%
+% \nodir
+%
+\def\nodir#1{\@bsphack
+ \@for\@citeb:=#1\do{%
+ \edef\@citeb{\expandafter\@firstofone\@citeb}%
+ \if@filesw\immediate\write\@auxout{\string\citation{\@citeb}}\fi
+ \@ifundefined{b@\@citeb}{\G@refundefinedtrue
+ \@latex@warning{Citation `\@citeb' undefined}}{}}%
+ \@esphack}
+\expandafter\let\csname b@*\endcsname\@empty
+%
+% \@directorycite
+%
+\def\@directorycite#1#2{\Dirlabel{#1}\dirsymbol}
+%
+% ------------------------------------------------------------
+% T H E P H O N E B O O K
+% ------------------------------------------------------------
+%
+\def\thephonebook{
+ \list{}{\partopsep 2ex
+ \parsep 0pt
+ \labelsep 0ex
+ \listparindent\dirparindent
+ \labelwidth\dirindent
+ \leftmargin\dirindent
+ \itemsep\dirsep}
+ \def\dirblock{\space}
+ \def\dirgroup{\space}
+ \def\direndgroup{}
+ \def\dirbreak{\relax\noparindent}
+ \def\dirbirf{\dirbirthday}
+ \def\dirprif{\dirprivate}
+ \def\dirresf{\dirresidence}
+ \def\dirworf{\dirwork}
+ \def\dirnotf{\dirnote}
+}
+\def\endthephonebook{\endlist}
+%
+% ------------------------------------------------------------
+% T H E A D D R E S S B O O K
+% ------------------------------------------------------------
+%
+\def\theaddressbook{
+ \list{}{\partopsep 2ex
+ \parsep 0pt
+ \labelsep 0ex
+ \listparindent\dirparindent
+ \labelwidth\dirindent
+ \leftmargin\dirindent
+ \itemsep\dirsep}
+ \if@break
+ \def\dirblock{\par}
+ \def\dirbreak{\par\noindent}
+ \def\dirgroup{}
+ \def\direndgroup{}
+ \else
+ \def\dirblock{\par\nopagebreak}
+ \def\dirbreak{\par\nopagebreak\noindent}
+ \def\dirgroup{\begingroup\samepage}
+ \def\direndgroup{\endgroup}
+ \fi
+ \def\dirbirf{\leavevmode\llap\dirbirthday}
+ \def\dirprif{\leavevmode\llap\dirprivate}
+ \def\dirresf{\leavevmode\llap\dirresidence}
+ \def\dirworf{\leavevmode\llap\dirwork}
+ \def\dirnotf{\leavevmode\llap\dirnote}
+}
+\def\endtheaddressbook{\endlist}
+%
+% ------------------------------------------------------------
+% sectionning according to first letter in field
+% ------------------------------------------------------------
+%
+\def\dirlastletter{-}
+\def\dircheck#1{\if#1\dirlastletter\else\def\dirlastletter{#1}\Dirheader{#1}\fi}
+%
+% ------------------------------------------------------------
+% define remaining bbl file commands
+% ------------------------------------------------------------
+%
+\def\dirandf{\dirand}
+\def\dirnica#1{\dirnickname\Dirnickname{#1}}
+\def\dirbira#1#2{\Dirbirthday{#1}{#2}}
+\def\dirbiya#1{\Dirbirthyear{#1}}
+\def\dirbyra#1{\DirbirthyearAlone{#1}}
+\def\dirnota#1{\Dirnote{#1}}
+\def\diradda#1{\diraddress\Diraddress{#1}}
+ \def\dirpadda#1{\dirpaddress\Dirpaddress{#1}}
+ \def\dirradda#1{\dirraddress\Dirraddress{#1}}
+ \def\dirwadda#1{\dirwaddress\Dirwaddress{#1}}
+\def\dirphoa#1{\dirphone\Dirphone{#1}}
+ \def\dirpphoa#1{\dirpphone\Dirpphone{#1}}
+ \def\dirrphoa#1{\dirrphone\Dirrphone{#1}}
+ \def\dirwphoa#1{\dirwphone\Dirwphone{#1}}
+\def\dircela#1{\dircellular\Dircellular{#1}}
+ \def\dirpcela#1{\dirpcellular\Dirpcellular{#1}}
+ \def\dirrcela#1{\dirrcellular\Dirrcellular{#1}}
+ \def\dirwcela#1{\dirwcellular\Dirwcellular{#1}}
+\def\dirfaxa#1{\dirfax\Dirfax{#1}}
+ \def\dirpfaxa#1{\dirpfax\Dirpfax{#1}}
+ \def\dirrfaxa#1{\dirrfax\Dirrfax{#1}}
+ \def\dirwfaxa#1{\dirwfax\Dirwfax{#1}}
+\def\diremaa#1{\diremail\Diremail{#1}}
+ \def\dirpemaa#1{\dirpemail\Dirpemail{#1}}
+ \def\dirremaa#1{\dirremail\Dirremail{#1}}
+ \def\dirwemaa#1{\dirwemail\Dirwemail{#1}}
+\def\dirurla#1{\dirurl\Dirurl{#1}}
+ \def\dirpurla#1{\dirpurl\Dirpurl{#1}}
+ \def\dirrurla#1{\dirrurl\Dirrurl{#1}}
+ \def\dirwurla#1{\dirwurl\Dirwurl{#1}}
+\def\diracca#1{\diraccount\Diraccount{#1}}
+ \def\dirpacca#1{\dirpaccount\Dirpaccount{#1}}
+ \def\dirracca#1{\dirraccount\Dirraccount{#1}}
+ \def\dirwacca#1{\dirwaccount\Dirwaccount{#1}}
+\def\dirtita#1{\dirtitle\Dirtitle{#1}}
+\def\dirnama#1{\dirname\Dirname{#1}}
+%
diff --git a/biblio/bibtex/contrib/directory/directory.tex b/biblio/bibtex/contrib/directory/directory.tex
new file mode 100644
index 0000000000..287b18b027
--- /dev/null
+++ b/biblio/bibtex/contrib/directory/directory.tex
@@ -0,0 +1,773 @@
+%% directory.tex
+%% Copyright 1998-2004 Christophe Geuzaine <geuz@geuz.org>
+%
+% $Id: directory.tex,v 1.32 2004/09/22 21:05:18 geuzaine Exp $
+%
+% This program can be redistributed and/or modified under the terms
+% of the LaTeX Project Public License distributed from CTAN
+% archives in directory macros/latex/base/lppl.txt; either
+% version 1 of the License, or (at your option) any later version.
+%
+% 'directory' user's guide and example file
+%
+% The parts you may want to customize are labeled with "CUSTOM:". The lines
+% beginning with "%%tth:" are used by TTH (a LaTeX to HTML translator).
+
+\documentclass[10pt]{article}
+
+\usepackage[break,longdates]{directory}
+
+% CUSTOM: uncomment one of the following:
+% \directorystyle{email}
+% \directorystyle{phone}
+% \directorystyle{birthday}
+% \directorystyle{letter}
+% \directorystyle{address-html}
+% \directorystyle{email-html}
+% \directorystyle{address-vcard}
+% \directorystyle{address-ldif}
+\directorystyle{address}
+
+% CUSTOM: here is how I customize the directory for this user's guide:
+\renewcommand{\dirsymbol}{\raisebox{1ex}{\tiny{[see \S\ref{sec:output}]}}}
+\renewcommand{\Dirlabel}[1]{{#1}}
+\renewcommand{\Dirheader}[1]{\item\hspace{-\dirindent}\textbf{\MakeUppercase{#1}}}
+
+\ifx\pdfoutput\undefined\else
+ \usepackage[colorlinks=true,urlcolor=blue]{hyperref}
+ \newcommand\MyURL{\begingroup\Url}
+ \renewcommand{\Diremail}[1]{\href{mailto:#1}{\MyURL{#1}}}
+ \renewcommand{\Dirurl}[1]{\href{#1}{\MyURL{#1}}}
+\fi
+\def\baselinestretch{0.98}
+
+\newcommand{\BibTeX}{\textsc{Bib}\TeX}
+\newcommand{\Quote}[1]{`{#1}'}
+\newcommand{\DbleQuote}[1]{``{#1}''}
+\newcommand{\Download}{\footnote{\texttt{directory} is available at
+ \url{http://www.geuz.org/directory/} or through the CTAN in the
+ \url{biblio/bibtex/contrib/directory/} subdirectory. \texttt{directory}
+ is distributed under the \LaTeX\ Project Public License (LPPL) since
+ version 1.11.}}
+
+%%tth: \def\Quote#1{'{#1}'}
+%%tth: \def\DbleQuote#1{''{#1}''}
+%%tth: \def\Download{\footnote{\texttt{directory} is distributed under the
+%%tth: \LaTeX\ Project Public License (LPPL) since version 1.11.}}
+%%tth: \def\LaTeX{LaTeX}
+%%tth: \def\BibTeX{BibTeX}
+
+\pagestyle{headings}
+
+\begin{document}
+
+\title{\texttt{directory}: address books with \LaTeX\ and \BibTeX}
+
+% CUSTOM: try e.g. \author{\wdir{c.geuzaine}} with \directorystyle{letter}
+\author{\dir{c.geuzaine}}
+
+%%tth: \special{html:<H3 align=center>Christophe Geuzaine</H3>}
+
+\date{Version 1.20, 22 September 2004}
+
+\maketitle
+
+%%tth: \section*{Download}
+%%tth: The current distribution of \texttt{directory} is
+%%tth: \href{http://www.geuz.org/directory/src/directory-1.20.tgz}{directory-1.20.tgz}.
+%%tth: This distribution contains both a
+%%tth: \href{http://www.geuz.org/directory/directory.ps}{PostScript}
+%%tth: and a \href{http://www.geuz.org/directory/directory.pdf}{PDF}
+%%tth: version of the documentation. The separate files are also available
+%%tth: through the \href{http://www.ctan.org/}{CTAN} sites in the
+%%tth: \href{http://www.ctan.org/tex-archive/biblio/bibtex/contrib/directory/}
+%%tth: {biblio/bibtex/contrib/directory/} subdirectory. Older versions are
+%%tth: still available \href{http://www.geuz.org/directory/src/}{here}.
+%%tth: Any questions, comments or suggestions? Send me an
+%%tth: \href{mailto:geuz@geuz.org}{e-mail}.
+
+\tableofcontents
+
+\section{Introduction}
+
+\texttt{directory}\Download\ is a macro package for \LaTeX\ and \BibTeX\ that
+facilitates the construction, the maintenance and the exploitation of an
+address book like database. It consists of five \BibTeX\ style files
+(\texttt{address.bst}, \texttt{phone.bst}, \texttt{email.bst},
+\texttt{birthday.bst} and \texttt{letter.bst}) designed to be used in
+conjunction with the \LaTeX\ style file \texttt{directory.sty}. Depending on
+the bibliographical style used, the package has two main applications:
+
+\begin{enumerate}
+\item
+the construction of a list of information (address, phone number, etc.)
+about selected persons, companies or places;
+\item
+the inclusion of a selected piece of information concerning a person, a
+place or a company at a desired location in a document.
+\end{enumerate}
+
+In the first case, \texttt{directory} behaves just like standard
+bibliographical styles: while standard bibliographical styles handle data
+concerning books, articles, proceedings, etc., \texttt{directory} handles
+data relative to people, companies or places. For example, the name in the
+title of this guide refers to the corresponding entry in the directory
+listed in section~\ref{sec:output}. The first four \BibTeX\ files provide
+several ways to handle this data.
+
+In the second case, the package enables bits of the database to be put in your
+document. It can for example be used to put the address of your correspondent
+in the address field of a letter.
+
+\sloppypar
+Four special \BibTeX\ style files (\texttt{address-html.bst},
+\texttt{email-html.bst}, \texttt{address-vcard.bst} and
+\texttt{address-ldif.bst}) are also provided for an easy generation of HTML,
+vCard and LDIF versions of your directories.
+
+\section{General description}
+
+\subsection{Package inclusion and options}
+
+The package is included by the usual \verb'\usepackage{directory}' command
+at the top of the document. Four options are available:
+\begin{description}
+\item[\textmd{\texttt{break}:}] allows the directory fields to be broken
+ across pages;
+\item[\textmd{\texttt{german}:}] creates directories in German;
+\item[\textmd{\texttt{french}:}] creates directories in French;
+\item[\textmd{\texttt{longdates}:}] prints birthday dates using month names
+ instead of numbers.
+\end{description}
+The old (before version 1.10) formatting options are now handled by the same
+command mechanism as all other customization options (see
+section~\ref{sec:custom}).
+
+The directory is produced by the
+\verb'\directory['\emph{extension}\verb']{'\emph{filename}\verb'}' command,
+where \emph{filename} stands for the name of the \texttt{bib} file (without
+the \texttt{bib} extension) and where the optional argument \emph{extension}
+gives, if necessary, the extension of the file output by \BibTeX\ (see
+section~\ref{sec:usingboth}). As usual, multiple \texttt{bib} files can be
+included, a comma separating the different file names.
+
+\subsection{Making a citation}
+
+An entry is cited in the text by a \verb'\dir{'\emph{key}\verb'}',
+\verb'\pdir{'\emph{key}\verb'}', \verb'\rdir{'\emph{key}\verb'}' or
+\verb'\wdir{'\emph{key}\verb'}' command, equivalent to the standard
+\verb'\cite{'\emph{key}\verb'}' command, where \emph{key} is used in the same
+way as ever (referring to an entry in a \texttt{bib} file).
+The differences between the four citation commands will be explained in the next
+section.
+A \verb'\nodir{'\emph{key}\verb'}' command exists and acts exactly like
+\verb'\nocite{'\emph{key}\verb'}' for standard bibliographies.
+
+\subsection{The \texttt{bst} styles}
+
+The style of the directory is chosen by a \verb'\directorystyle{'\emph{style}\verb'}'
+command, where \emph{style} is one of the following:
+\begin{description}
+\item[\textmd{\texttt{address}:}]
+full listing in the directory of all fields corresponding to the
+\emph{key} entry. The \verb'\dir{'\emph{key}\verb'}' command also prints the
+\texttt{name} field of the entry in the document;
+\item[\textmd{\texttt{phone}:}]
+only the phone, cellular and fax fields corresponding to the cited entry are
+displayed in the directory. The \verb'\dir{'\emph{key}\verb'}' command acts in
+the same way as with the \texttt{address} style, except that the names are
+abbreviated;
+\item[\textmd{\texttt{email}:}]
+only e-mail addresses are displayed in the directory. The
+\verb'\dir{'\emph{key}\verb'}' command acts in the same way as with the
+\texttt{address} style;
+\item[\textmd{\texttt{birthday}:}]
+only the birthdays are displayed, sorting the entries in chronological
+order. The \verb'\dir{'\emph{key}\verb'}' command acts in the same way as with
+the \texttt{address} style;
+\item[\textmd{\texttt{letter}:}]
+acts in a slightly different way than the four preceding styles. No directory
+is produced with the \verb|\directory| command. The
+\verb'\dir{'\emph{key}\verb'}' command results in the \texttt{name} field of
+the \emph{key} entry to be printed in the document. The
+\verb'\pdir{'\emph{key}\verb'}' (respectively \verb'\rdir{'\emph{key}\verb'}'
+or \verb'\wdir{'\emph{key}\verb'}') command prints the name and the private
+(respectively residence or work) address in the document in a tabulated way.
+\end{description}
+
+
+\subsection{The \texttt{bib} file fields}
+
+\texttt{directory} defines three entry types: \verb'@person{}',
+\verb'@company{}' and \verb'@place{}'. In all these types, \texttt{name} is
+the only mandatory field, since it serves as a key for sorting the entries.
+Here are all the available fields that can be defined for each entry:
+
+\begin{verbatim}
+@person{key,
+ name = "Full name(s), in standard BibTeX format",
+ nickname = "Nickname(s)",
+ birthday = "Birthday date(s), in numeric 'day month' format",
+ birthyear = "Birth year(s)",
+
+ p.street = "Street of private residence",
+ p.city = "City of private residence",
+ p.zip = "ZIP code of private residence",
+ p.state = "State of private residence",
+ p.country = "Country of private residence",
+ p.phone = "Private phone number",
+ p.cellular = "Private mobile phone number",
+ p.fax = "Private fax number",
+ p.email = "Private e-mail address",
+ p.url = "Private home page",
+ p.account = "Private bank account",
+
+ r.street = "Street of alternative residence",
+ r.city = "City of alternative residence",
+ r.zip = "ZIP code of alternative residence",
+ r.state = "State of alternative residence",
+ r.country = "Country of alternative residence",
+ r.phone = "Alternative phone number",
+ r.cellular = "Alternative mobile phone number",
+ r.fax = "Alternative fax number",
+ r.email = "Alternative e-mail address",
+ r.url = "Alternative home page",
+ r.account = "Alternative bank account",
+
+ w.name = "Work organization name",
+ w.title = "Job title",
+ w.street = "Street of work organization",
+ w.city = "City of work organization",
+ w.zip = "ZIP code of work organization",
+ w.state = "State of work organization",
+ w.country = "Country of work organization",
+ w.phone = "Work phone number",
+ w.cellular = "Work mobile phone number",
+ w.fax = "Work fax number",
+ w.email = "Work e-mail address",
+ w.url = "Work home page",
+ w.account = "Work bank account",
+
+ note = "Additional notes about the person",
+}
+\end{verbatim}
+
+\begin{verbatim}
+@company{key,
+ name = "Company name",
+ street = "Company street",
+ city = "Company city",
+ zip = "Company ZIP code",
+ state = "Company state",
+ country = "Company country",
+ phone = "Company phone number",
+ cellular = "Company mobile phone number",
+ fax = "Company fax number",
+ email = "Company e-mail address",
+ url = "Company home page",
+ account = "Company bank account",
+ note = "Additional notes about the company",
+}
+\end{verbatim}
+
+\begin{verbatim}
+@place{key,
+ name = "Place name",
+ street = "Place street",
+ city = "Place city",
+ zip = "Place ZIP code",
+ state = "Place state",
+ country = "Place country",
+ phone = "Place phone number",
+ cellular = "Place mobile phone number",
+ fax = "Place fax number",
+ note = "Additional notes about the place",
+}
+\end{verbatim}
+
+Multiple names, nicknames or birthday dates should be be separated with
+``\texttt{and}''. For backward compatibility, or if an unconventional
+address formatting is needed, the \texttt{street}, \texttt{city},
+\texttt{state}, \texttt{zip} and \texttt{country} fields (and their
+\texttt{p.}, \texttt{r.} and \texttt{w.} equivalents) can be replaced by
+generic \texttt{address}, \texttt{p.address}, \texttt{r.address} or
+\texttt{w.address} fields. As soon as an \texttt{address} field is defined,
+any \texttt{street}, \texttt{city}, \texttt{state}, \texttt{zip} or
+\texttt{country} field definition is ignored, and the formatting in the
+\texttt{address} field is kept as is.
+
+\section{Customization}
+\label{sec:custom}
+
+\subsection{Dimensions}
+
+Three new dimensions defining the indentation of the fields (\verb'\dirindent'
+and \verb'\dirparindent') and the amount of space between two entries
+(\verb'\dirsep') have been introduced. The default values are:
+\begin{quote}
+\begin{verbatim}
+\setlength{\dirindent}{3em}
+\setlength{\dirparindent}{0em}
+\setlength{\dirsep}{3ex}
+\end{verbatim}
+\end{quote}
+
+If you want to explicitly introduce a new paragraph in a field, you
+should use the \verb'\dirbreak' command.
+
+A fourth dimension (\verb'\dirtablewidth') sets the width of the table used
+to display fields in when the \texttt{letter} style is selected. The default
+value is:
+\begin{quote}
+\begin{verbatim}
+\setlength{\dirtablewidth}{0.5\textwidth}
+\end{verbatim}
+\end{quote}
+
+
+\subsection{Flags and formats}
+\label{sec:flagsformats}
+
+Each field of a directory is easily customizable by redefining one of the
+commands summarized in table~\ref{tab:commands} at the end of this user's
+guide (page~\pageref{tab:commands}).
+
+For example, to produce nicely formatted address booklets, you could
+redefine the \verb'\Dirheader' command as
+\begin{quote}
+\begin{verbatim}
+\pagestyle{headings}
+\renewcommand{\Dirheader}[1]
+ {\newpage\markboth{\MakeUppercase{#1}}{\MakeUppercase{#1}}}
+\end{verbatim}
+\end{quote}
+(which will split the directory across pages, with the first letter used in
+the sorting algorithm in the header of each page) or
+\begin{quote}
+\begin{verbatim}
+\renewcommand{\Dirheader}[1]
+ {\item\hspace{-\dirindent}\textbf{\MakeUppercase{#1}}}
+\end{verbatim}
+\end{quote}
+(which will produce inline headings).
+
+When a field type appears multiple times in an entry, the default settings
+assume the same formatting for each one. For example, there are three
+instances of a \texttt{phone} type field in a full \texttt{person} entry,
+i.e.\ \texttt{p.phone}, \texttt{r.phone} and \texttt{w.phone}, and the
+\verb'\dirphone' and \verb'\Dirphone' customization commands apply to these
+three instances in the same way.
+
+To particularize the formatting of one of these instances, you can use
+special versions of the customization commands, constructed by inserting
+\texttt{p}, \texttt{r} or \texttt{w} after the \verb'\dir' or \verb'\Dir'
+prefix of the original commands. For example, to customize only the
+\texttt{phone} field in the work part, you should use \verb'\dirwphone' and
+\verb'\Dirwphone'.
+
+To change the formatting of names, you have to edit the \BibTeX\ style
+files. For example, the default name format ``Christophe von Geuzaine, Jr.''
+can be changed into ``von Geuzaine C., Jr.'' in your address books by replacing the line
+\begin{quote}
+\begin{verbatim}
+s nameptr "{ff }{vv }{ll}{, jj}" format.name$ 't :=
+\end{verbatim}
+\end{quote}
+in the file \texttt{address.bst} by the line
+\begin{quote}
+\begin{verbatim}
+s nameptr "{vv }{ll}{ f.}{, jj}" format.name$ 't :=
+\end{verbatim}
+\end{quote}
+
+
+\section{Using both \texttt{directory} and \texttt{bibliography}}
+\label{sec:usingboth}
+
+Since \BibTeX\ always produces an output file of the form
+\Quote{\emph{filename}\texttt{.bbl}}, it is necessary---in order to use \emph{both}
+directory and bibliography entries---, after generating the \texttt{bbl} file
+corresponding to the directory, to rename it with a new extension (for example
+\texttt{dir}), and to give this new extension as an optional argument to the
+\verb'\directory' command. The normal procedure can then be followed during the
+rest of the bibliography processing. Remember that changing the directory
+(adding an entry or suppressing one) forces you to restart from the beginning.
+
+\section{Generating directories with hypertext links}
+
+You can use the \texttt{hyperref} package along with \texttt{directory}. For
+example, adding the following lines in the preamble of your document and
+using \texttt{pdflatex} will produce a PDF version of your directory, with
+working links for the \verb'email' and \verb'url' fields.
+
+\begin{quote}
+\begin{verbatim}
+\ifx\pdfoutput\undefined\else
+ \usepackage{hyperref}
+ \newcommand\MyURL{\begingroup\Url}
+ \renewcommand{\Diremail}[1]{\href{mailto:#1}{\MyURL{#1}}}
+ \renewcommand{\Dirurl}[1]{\href{#1}{\MyURL{#1}}}
+\fi
+\end{verbatim}
+\end{quote}
+
+\section{Generating HTML, vCard or LDIF directories}
+
+Four special \BibTeX\ style files (\texttt{address-html},
+\texttt{email-html}, \texttt{address-vcard} and \texttt{address-ldif}) allow
+the easy generation of HTML, vCard and LDIF versions of your directories:
+
+\begin{description}
+\item[\textmd{\texttt{address-html}:}]
+full listing in the HTML directory of all fields corresponding to the
+\emph{key} entry. The output formatting is similar to that produced by \LaTeX\
+with the \texttt{address} style;
+\item[\textmd{\texttt{email-html}:}]
+only e-mail addresses are displayed in the HTML directory;
+\item[\textmd{\texttt{address-vcard}:}]
+full listing in the vCard directory of all fields corresponding to the
+\emph{key} entry.
+\item[\textmd{\texttt{address-ldif}:}]
+full listing in the LDIF directory of all fields corresponding to the
+\emph{key} entry.
+\end{description}
+
+Since \BibTeX\ directly outputs a \texttt{bbl} file in HTML, vCard or LDIF
+format, no additional program is needed to make the HTML/vCard/LDIF
+conversion. The \texttt{bbl} file directly contains the HTML/vCard/LDIF
+code, ready to be included in a HTML document or to be imported in a
+vCard/LDIF-aware application (Apple Address Book, Microsoft Outlook, Mozilla
+Mail, etc.).
+
+This method presents nevertheless a little drawback: after \BibTeX'ing your
+\LaTeX\ file, running \LaTeX\ on the same file (even with another
+\verb|\directorystyle|) will produce errors, since the \texttt{bbl} file is
+not understandable by \LaTeX. You have to either delete the \texttt{bbl}
+file or to override the error messages (and to change the
+\verb|\directorystyle|) before any subsequent successful \LaTeX\ run.
+
+The handling of special characters in the HTML/vCard/LDIF directories is
+also somewhat problematic: any special \LaTeX\ character sequence is output
+the way it is in the \texttt{bib} file. This implies for example that
+\verb|{\'e}| is printed in the HTML document as \verb|{\'e}|, and not as
+\verb|&eacute;|. The vCard style assumes an ISO Latin 1 encoding of the
+directory. If a special encoding is used in the \texttt{bib} file, the LDIF
+output will need to be converted to UTF8. See the comments in the \BibTeX\
+style files for more information.
+
+\section{Example}
+\label{sec:example}
+
+Despite the option described in section~\ref{sec:usingboth}, one of the most
+interesting way of using \texttt{directory} is to build a separate address
+book, including several \texttt{bib} files referring to several categories of
+people, companies or places, as in the example shown in this document:
+\begin{quote}
+\verb|\nodir{*}| \\
+\verb|\directory{family,business}|
+\end{quote}
+
+A second interesting way of using \texttt{directory} is to use it in your faxes
+or letters. Using the standard \LaTeX\ class \texttt{letter.cls} with the
+directory style \texttt{letter}, you may for example begin a letter by the
+following command (\verb'\wdir' must be \texttt{protect}'ed since the argument
+of the \texttt{letter} environment is a moving argument):
+\begin{quote}
+\verb'\begin{letter}{\protect\wdir{c.geuzaine}}'
+\end{quote}
+
+Take a look at the example \texttt{tex} and \texttt{bib}
+files (\texttt{directory.tex}, \texttt{family.bib} and
+\texttt{business.bib}) and try the options out. The source files are
+commented and easy to customize. I would be very happy to get your suggestions
+to improve this package.
+
+\subsection{Source file}
+
+Here are four \texttt{bib} entries (taken from \texttt{family.bib} and
+\texttt{business.bib}):
+
+\begin{verbatim}
+@Person{c.geuzaine,
+ name = "Christophe Geuzaine",
+ birthday = "06 02",
+ birthyear = "1973",
+ p.email = "geuz@geuz.org",
+ p.url = "http://www.geuz.org",
+ w.title = "Postdoctoral Scholar",
+ w.name = "Caltech, Applied and Computational Mathematics",
+ w.url = "http://www.acm.caltech.edu",
+ w.street = "1200 E California Blvd",
+ w.city = "Pasadena",
+ w.state = "CA",
+ w.zip = 91125,
+ w.country = "USA",
+ w.phone = "1 626 395 4552",
+}
+
+@Person{d.d.knu,
+ name = "Knudson, Daffy Duck and Bunny, Bugs and Mr. Pluto",
+ nickname = "gnat and gnu and pluto",
+ birthday = "10 02 and 05 11 and 01 01",
+ p.phone = "+01-(0)2-765.43.21",
+ p.cellular = "+01-(0)5-555.55.55",
+ p.account = "010-1234567-05",
+ r.street = "Haight Street 512",
+ r.zip = 80214,
+ r.city = "Novosibirsk",
+ r.country = "Gnuland",
+ r.phone = "+01-(0)2-876.54.32",
+ w.name = "University of Novosibirsk,
+ Department of Octopus Parthenogenesis",
+}
+
+@Company{knudsoft,
+ name = "The Knudsoft Company",
+ email = "knud@knudsoft.com",
+ url = "http://knudsoft.com/hole/gates.htm",
+}
+
+@Place{knudsoft:rs.2,
+ name = "Knudsoft (RS.2 Computer Room)",
+ phone = "+01-(0)2-434.23.23",
+}
+\end{verbatim}
+
+\subsection{Output}
+\label{sec:output}
+
+The output resulting from the \verb'\directory{family,business}' command is
+shown below (all entries are listed, thanks to the \verb'\nodir{*}' command):
+
+% CUSTOM: try e.g. citing just some of the entries
+\nodir{*}
+
+% CUSTOM: this has the same effect as \directory[bbl]{family,business}
+\directory{family,business}
+
+%%tth: \par directory generated with \href{directory-address.html}{address-html.bst},
+%%tth: \href{directory-email.html}{email-html.bst},
+%%tth: \href{directory-address.vcf}{address-vcard.bst} and
+%%tth: \href{directory-address.ldif}{address-ldif.bst}.
+
+\section{Contributors}
+
+Many thanks to Bernd Schandl, Robert Walker Sumner, Thomas Ruedas and
+J\"urgen G\"obel for their suggestions and corrections.
+
+\section{Versions}
+
+\begin{description}
+\item[0.95] (Jan 8, 1998)
+First distributed version.
+\item[0.96] (Jan 9, 1998)
+New documentation. Introduction of customization commands. New alignment
+mechanism in the \texttt{addressbook} and \texttt{phonebook} environments.
+\item[0.97] (Jan 26, 1998)
+Entries \texttt{ccp} and \texttt{p.ccp} changed to \texttt{account} and
+\texttt{p.account}.
+\item[0.98] (Feb 9, 1998)
+New style \texttt{letter.bst}. New commands \verb|\pdir|, \verb|\rdir| and
+\verb|\wdir| to produce in-text addresses when used with the
+\texttt{letter.bst} style. New internal key generation.
+\item[0.99] (Feb 12, 1998)
+Name change of old customization flags (\verb'\'\emph{name}\verb'flag' becomes
+\verb'\dir'\emph{name}). New flags introduced: \verb|\dirnickname|, \verb|\dirphone|,
+\verb|\dirfax|, \verb|\diremail|, \verb|\dirurl|, \verb|\diraccount| and
+\verb|\dirand|.
+\item[1.00] (Mar 26, 1998)
+New HTML styles (\texttt{address-html.bst} and \texttt{email-html.bst}).
+\item[1.01] (Oct 26, 1998)
+Minor corrections.
+\item[1.10] (May 6, 1999)
+Major rewriting of \texttt{bst} files (suppression of direct \LaTeX\
+formatting). Definition of new customization commands. New package global
+options to split directories across pages and allow page breaks inside
+directory fields. The \texttt{url.sty} package is now required.
+\item[1.11] (May 7, 1999)
+Introduction of \verb'\dirparindent'.
+\item[1.12] (May 11, 1999)
+Formatting commands can be particularized to each subfield by adding
+\texttt{p}, \texttt{r} or \texttt{w} after the \verb'\dir' or \verb'\Dir'
+prefix of the original customization command. Many simplifications and small
+corrections in the page breaking mechanism and in the list environments.
+\item[1.13] (Jun 21, 1999)
+Fixed bug for long entries without blank spaces (e.g.\ in \texttt{url}
+fields).
+\item[1.14] (Jun 21, 2000)
+More flexible definition of \verb|\Dirheader|.
+\item[1.15] (Aug 28, 2000)
+Added fields for cellular phones (suggested by Stefano Ferrari). Added
+section explaining how to use \texttt{hyperref} to generate PDF documents
+with hyperlinks. Updated web site address.
+\item[1.16] (Feb 5, 2002)
+Added \verb'\dirtablewidth' to set the width of the fields when the
+\texttt{letter} style is selected. Suppressed the \texttt{split} option
+(redefining the \verb'\Dirheader' command makes it possible to achieve the
+same result: see section~\ref{sec:flagsformats}).
+\item[1.17] (Dec 15, 2002)
+Revised documentation.
+\item[1.18] (Sep 13, 2003)
+Added vCard and LDIF support.
+\item[1.19] (Sep 15, 2003)
+Split \texttt{address} into \texttt{street}, \texttt{city}, \texttt{state},
+\texttt{zip} and \texttt{country}.
+\item[1.20] (Sep 22, 2004)
+Fixed small vcard export bug when using the old \texttt{address} fields;
+new \texttt{german}, \texttt{french} and \texttt{longdates} options.
+\end{description}
+
+
+\begin{table}[p]
+\caption{Summary of customization commands\label{tab:commands}}
+\begin{center}\small
+\begin{tabular}{@{}l@{\hspace{5pt}}c@{\hspace{5pt}}p{3.8cm}l@{}}
+\hline
+Command & Arg. & Explanation & Default \\
+\hline
+
+\verb'\dirsymbol' & 0 &
+\raggedright In-text symbol produced after a directory citation &
+\verb*'' \\
+
+\verb'\dirand' & 0 &
+\DbleQuote{anding} string &
+\verb*'\normalfont{and}' \\
+
+\verb'\dirbirthday' & 0 &
+Birthday field flag &
+\verb*'$\star$~' \\
+
+\verb'\dirprivate' & 0 &
+Private field flag &
+\verb*'\emph{p}~' \\
+
+\verb'\dirresidence' & 0 &
+Residence field flag &
+\verb*'\emph{r}~' \\
+
+\verb'\dirwork' & 0 &
+Work field flag &
+\verb*'\emph{w}~' \\
+
+\verb'\dirnote' & 0 &
+Note field flag &
+\verb*'$\triangleright$~' \\
+
+\verb'\dirnickname' & 0 &
+Nickname field flag &
+\verb*'' \\
+
+\verb'\diraddress' & 0 &
+Address fields flag &
+\verb*'' \\
+
+\verb'\dirphone'$^*$ & 0 &
+Phone fields flag &
+\verb*'tel: ' \\
+
+\verb'\dircellular'$^*$ & 0 &
+Cellular phone fields flag &
+\verb*'mobile: ' \\
+
+\verb'\dirfax'$^*$ & 0 &
+Fax fields flag &
+\verb*'fax: ' \\
+
+\verb'\diremail'$^*$ & 0 &
+E-mail fields flag &
+\verb*'' \\
+
+\verb'\dirurl'$^*$ & 0 &
+Url fields flag &
+\verb*'' \\
+
+\verb'\diraccount'$^*$ & 0 &
+Account fields flag &
+\verb*'acc: ' \\
+
+\verb'\dirtitle' & 0 &
+Title field flag &
+\verb*'' \\
+
+\verb'\dirname' & 0 &
+Name field flag &
+\verb*'' \\
+
+\verb'\Dirlabel' & 1 &
+Label format &
+\verb*'{\textbf{#1}}' \\
+
+\verb'\Dirheader' & 1 &
+Command issued for each new starting letter in the directory (the arg.\ is
+the first letter used in the sorting algorithm) &
+\verb*'{}' \\
+
+\verb'\Dirbirthday' & 2 &
+\raggedright Birthday format (the first arg.\ is the day, the second
+is the month) &
+\verb*'{\number#2}/{\number#1}' \\
+
+\verb'\Dirbirthyear' & 1 &
+\raggedright Birth year format when a \texttt{birthday} field exists &
+\verb*'/{#1}' \\
+
+\verb'\DirbirthyearAlone' & 1 &
+\raggedright Birth year format when no \texttt{birthday} field exists &
+\verb*'{#1}' \\
+
+\verb'\Dirnickname' & 1 &
+Nickname format &
+\verb*'(aka \emph{#1})' \\
+
+\verb'\Diraddress'$^*$ & 1 &
+Address format &
+\verb*'{#1}' \\
+
+\verb'\Dirphone'$^*$ & 1 &
+Phone format &
+\verb*'{#1}' \\
+
+\verb'\Dircellular'$^*$ & 1 &
+Cellular phone format &
+\verb*'{#1}' \\
+
+\verb'\Dirfax'$^*$ & 1 &
+Fax format &
+\verb*'{#1}' \\
+
+\verb'\Diremail'$^*$ & 1 &
+E-mail format &
+\verb*'\url{#1}' \\
+
+\verb'\Dirurl'$^*$ & 1 &
+Url format &
+\verb*'\url{#1}' \\
+
+\verb'\Diraccount'$^*$ & 1 &
+Account format &
+\verb*'\url{#1}' \\
+
+\verb'\Dirtitle' & 1 &
+Title format &
+\verb*'{#1}' \\
+
+\verb'\Dirname' & 1 &
+Name format &
+\verb*'{#1}' \\
+
+\verb'\Dirnote' & 1 &
+Note format &
+\verb*'{#1}' \\
+
+\hline
+\end{tabular}
+\end{center}
+\vspace{-5pt}\small
+$^*$\,The commands marked with an asterisk also exist
+in three other versions, controlling independently the private, residence and
+work parts (e.g.\ \verb'\dirphone' can be particularized to \verb'\dirpphone',
+\verb'\dirrphone' and \verb'\dirwphone').
+\end{table}
+
+\end{document}
diff --git a/biblio/bibtex/contrib/directory/email-html.bst b/biblio/bibtex/contrib/directory/email-html.bst
new file mode 100644
index 0000000000..f81551b860
--- /dev/null
+++ b/biblio/bibtex/contrib/directory/email-html.bst
@@ -0,0 +1,359 @@
+%% email-html.bst
+%% Copyright 1998-2003 Christophe Geuzaine <geuz@geuz.org>
+%
+% $Id: email-html.bst,v 1.7 2004/02/07 23:41:45 geuzaine Exp $
+%
+% This program can be redistributed and/or modified under the terms
+% of the LaTeX Project Public License distributed from CTAN
+% archives in directory macros/latex/base/lppl.txt; either
+% version 1 of the License, or (at your option) any later version.
+%
+% BibTeX bibliography style `addr-htm.bst'
+% 'directory' database: all fields
+%
+% This is definitively a hack...
+%
+% The parts you may want to customize are labeled with "CUSTOM"
+%
+
+INTEGERS { nameptr namesleft numnames numaux len }
+STRINGS { s t u v }
+
+% ------------------------------------------------------------
+% E N T R I E S
+% ------------------------------------------------------------
+
+ENTRY
+ { name
+ email
+ p.email
+ r.email
+ w.email
+ }
+ {}
+ { private.str
+ residence.str
+ work.str
+ and.str
+ }
+
+
+% ------------------------------------------------------------
+% G E N E R A L
+% ------------------------------------------------------------
+
+FUNCTION {init.strings}
+{
+% CUSOTM this is the 'html' equivalent for the \dirXXX customization
+% commands
+
+ "&nbsp;<em>priv.</em>" 'private.str :=
+ "&nbsp;<em>temp.</em>" 'residence.str :=
+ "&nbsp;<em>prof.</em>" 'work.str :=
+ " and " 'and.str :=
+}
+
+FUNCTION {output.nonnull}
+{ 's :=
+ write$
+ newline$
+ s
+}
+
+FUNCTION {output}
+{ duplicate$ empty$
+ 'pop$
+ 'output.nonnull
+ if$
+}
+
+FUNCTION {not}
+{ { #0 }
+ { #1 }
+ if$
+}
+
+FUNCTION {and}
+{ 'skip$
+ { pop$ #0 }
+ if$
+}
+
+FUNCTION {or}
+{ { pop$ #1 }
+ 'skip$
+ if$
+}
+
+FUNCTION {chop.word}
+{ 's :=
+ 'len :=
+ s #1 len substring$ =
+ { s len #1 + global.max$ substring$ }
+ 's
+ if$
+}
+
+FUNCTION {emailize}
+{ duplicate$ empty$
+ { pop$ "" }
+ { "<A HREF=" quote$ * "mailto:" * swap$ * quote$ * " >" * swap$ * "</A>" * }
+ if$
+}
+
+% ------------------------------------------------------------
+% S O R T I N G F U N C T I O N S
+% ------------------------------------------------------------
+
+FUNCTION {sortify}
+{ purify$
+ "l" change.case$
+}
+
+FUNCTION {sort.names}
+{ 's :=
+ #1 'nameptr :=
+ ""
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ { nameptr #1 >
+ { " " * }
+ 'skip$
+ if$
+ s nameptr "{vv{ } }{ll{ }}{ ff{ }}{ jj{ }}" format.name$ 't :=
+ nameptr numnames = t "others" = and
+ { "et al" * }
+ { t sortify * }
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+}
+
+
+FUNCTION {sort.raw.names}
+{ 't :=
+ "A " #2 "L'" #2
+ "An " #3 "Au " #3 "Le " #3 "La " #3
+ "The " #4 "Les " #4 "Aux " #4
+ t
+ chop.word chop.word
+ chop.word chop.word chop.word chop.word
+ chop.word chop.word chop.word
+ sortify
+ #1 global.max$ substring$
+}
+
+FUNCTION {name.sort}
+{ name empty$
+ { " Name field missing in entry '" cite$ * "'" * warning$ "" }
+ { name sort.names }
+ if$
+}
+
+FUNCTION {raw.name.sort}
+{ name empty$
+ { " Name field missing in entry '" cite$ * "'" * warning$ "" }
+ { name sort.raw.names }
+ if$
+}
+
+FUNCTION {presort}
+{ type$ "company" =
+ type$ "place" =
+ or
+ { raw.name.sort }
+ { name.sort }
+ if$
+ " "
+ *
+ #1 entry.max$ substring$
+ 'sort.key$ :=
+}
+
+% ------------------------------------------------------------
+% P R E - A N D P O S T - H E A D E R S
+% ------------------------------------------------------------
+
+FUNCTION {begin.bib}
+{ "<HTML>" write$
+ newline$
+ "<TITLE>E-mail directory</TITLE>" write$
+ newline$
+}
+
+FUNCTION {end.bib}
+{ newline$
+ "<p><hr><center><font size=-1>This e-mail directory was generated by <A HREF= " write$
+ quote$ "http://www.geuz.org/directory/" * quote$ * write$
+ " >directory</A></center></HTML>" write$
+ newline$
+}
+
+% ------------------------------------------------------------
+% F O R M A T S
+% ------------------------------------------------------------
+
+FUNCTION {format.names}
+{ 's :=
+ #1 'nameptr :=
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ {
+% CUSTOM uncomment one of the following lines to have the behaviour on the right
+% s nameptr "{ff{ } }{vv{ } }{ll{ }}{, jj{ }}" format.name$ 't := % Christophe de Geuzaine, jr
+% s nameptr "{f.{ } }{vv{ } }{ll{ }}{, jj{ }}" format.name$ 't := % C. de Geuzaine, jr
+% s nameptr "{vv{ } }{ll{ }}{ f.{ }}{, jj{ }}" format.name$ 't := % de Geuzaine C., jr
+ s nameptr "{vv{ } }{ll{ }}{, ff{ }}{, jj{ }}" format.name$ 't := % de Geuzaine, Christophe, jr
+
+ nameptr #1 >
+ { namesleft #1 >
+ { ", " * t * }
+ { and.str * t * }
+ if$
+ }
+ 't
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+}
+
+FUNCTION {format.name}
+{ name empty$
+ { "" }
+ { name format.names }
+ if$
+}
+
+FUNCTION {format.email}
+{ email empty$
+ { "" }
+ { email email emailize }
+ if$
+}
+
+FUNCTION {format.p.flag}
+{ p.email empty$ not
+ { private.str }
+ { "" }
+ if$
+}
+
+FUNCTION {format.p.email}
+{ p.email empty$
+ { "" }
+ { p.email p.email emailize }
+ if$
+}
+
+FUNCTION {format.r.flag}
+{ r.email empty$ not
+ { residence.str }
+ { "" }
+ if$
+}
+
+FUNCTION {format.r.email}
+{ r.email empty$
+ { "" }
+ { r.email r.email emailize }
+ if$
+}
+
+FUNCTION {format.w.flag}
+{ w.email empty$ not
+ { work.str }
+ { "" }
+ if$
+}
+
+FUNCTION {format.w.email}
+{ w.email empty$
+ { "" }
+ { w.email w.email emailize }
+ if$
+}
+
+
+% ------------------------------------------------------------
+% P E R S O N E N T R Y
+% ------------------------------------------------------------
+
+FUNCTION { person }
+{
+ p.email empty$ not
+ r.email empty$ not
+ w.email empty$ not
+ or or
+ { init.strings
+
+ newline$
+ "<br><b>" write$
+ format.name write$
+ "</b>" write$
+
+ ""
+ format.p.flag output
+ format.p.email output
+ format.r.flag output
+ format.r.email output
+ format.w.flag output
+ format.w.email output
+
+ write$
+ newline$
+ }
+ { }
+ if$
+}
+
+% ------------------------------------------------------------
+% C O M P A N Y E N T R Y
+% ------------------------------------------------------------
+
+
+FUNCTION { company }
+{
+ email empty$ not
+ { init.strings
+
+ newline$
+ "<br><b>" write$
+ name write$
+ "</b>" write$
+
+ ""
+ format.email output
+
+ write$
+ newline$
+ }
+ { }
+ if$
+
+}
+
+% ------------------------------------------------------------
+% P L A C E E N T R Y
+% ------------------------------------------------------------
+
+FUNCTION { place }
+{
+}
+
+% ------------------------------------------------------------
+% M A I N
+% ------------------------------------------------------------
+
+READ
+ITERATE {presort}
+SORT
+EXECUTE {begin.bib}
+ITERATE {call.type$}
+EXECUTE {end.bib}
+
diff --git a/biblio/bibtex/contrib/directory/email.bst b/biblio/bibtex/contrib/directory/email.bst
new file mode 100644
index 0000000000..bb88854fa8
--- /dev/null
+++ b/biblio/bibtex/contrib/directory/email.bst
@@ -0,0 +1,366 @@
+%% email.bst
+%% Copyright 1998-2003 Christophe Geuzaine <geuz@geuz.org>
+%
+% $Id: email.bst,v 1.6 2003/09/14 09:47:49 geuzaine Exp $
+%
+% This program can be redistributed and/or modified under the terms
+% of the LaTeX Project Public License distributed from CTAN
+% archives in directory macros/latex/base/lppl.txt; either
+% version 1 of the License, or (at your option) any later version.
+%
+% BibTeX bibliography style `email.bst'
+% 'directory' database: only email field
+%
+% The parts you may want to customize are labeled with "CUSTOM"
+%
+
+INTEGERS { nameptr namesleft numnames numaux len }
+STRINGS { s t u v }
+
+% ------------------------------------------------------------
+% E N T R I E S
+% ------------------------------------------------------------
+
+ENTRY
+ { name
+ email
+ p.email
+ r.email
+ w.email
+ }
+ {}
+ {}
+
+% ------------------------------------------------------------
+% G E N E R A L
+% ------------------------------------------------------------
+
+FUNCTION {output}
+{ 's :=
+ s empty$
+ {}
+ { s write$
+ newline$
+ "\dirblock" write$
+ newline$
+ }
+ if$
+}
+
+FUNCTION {output.flag}
+{ 's :=
+ s empty$
+ {}
+ { s write$
+ newline$
+ }
+ if$
+}
+
+FUNCTION {not}
+{ { #0 }
+ { #1 }
+ if$
+}
+
+FUNCTION {and}
+{ 'skip$
+ { pop$ #0 }
+ if$
+}
+
+FUNCTION {or}
+{ { pop$ #1 }
+ 'skip$
+ if$
+}
+
+FUNCTION {chop.word}
+{ 's :=
+ 'len :=
+ s #1 len substring$ =
+ { s len #1 + global.max$ substring$ }
+ 's
+ if$
+}
+
+
+% ------------------------------------------------------------
+% S O R T I N G F U N C T I O N S
+% ------------------------------------------------------------
+
+FUNCTION {sortify}
+{ purify$
+ "l" change.case$
+}
+
+FUNCTION {sort.names}
+{ 's :=
+ #1 'nameptr :=
+ ""
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ { nameptr #1 >
+ { " " * }
+ 'skip$
+ if$
+ s nameptr "{vv{ } }{ll{ }}{ ff{ }}{ jj{ }}" format.name$ 't :=
+ nameptr numnames = t "others" = and
+ { "et al" * }
+ { t sortify * }
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+}
+
+
+FUNCTION {sort.raw.names}
+{ 't :=
+ "A " #2 "L'" #2
+ "An " #3 "Au " #3 "Le " #3 "La " #3
+ "The " #4 "Les " #4 "Aux " #4
+ t
+ chop.word chop.word
+ chop.word chop.word chop.word chop.word
+ chop.word chop.word chop.word
+ sortify
+ #1 global.max$ substring$
+}
+
+FUNCTION {name.sort}
+{ name empty$
+ { " Name field missing in entry '" cite$ * "'" * warning$ "" }
+ { name sort.names }
+ if$
+}
+
+FUNCTION {raw.name.sort}
+{ name empty$
+ { " Name field missing in entry '" cite$ * "'" * warning$ "" }
+ { name sort.raw.names }
+ if$
+}
+
+FUNCTION {presort}
+{ type$ "company" =
+ type$ "place" =
+ or
+ { raw.name.sort }
+ { name.sort }
+ if$
+ " "
+ *
+ #1 entry.max$ substring$
+ 'sort.key$ :=
+}
+
+FUNCTION {format.first.letter}
+{ type$ "company" =
+ type$ "place" =
+ or
+ { raw.name.sort }
+ { name.sort }
+ if$
+ #1 #1 substring$
+}
+
+
+% ------------------------------------------------------------
+% P R E - A N D P O S T - H E A D E R S
+% ------------------------------------------------------------
+
+FUNCTION {begin.bib}
+{ "\begin{thephonebook}" write$
+ newline$
+}
+
+FUNCTION {end.bib}
+{ newline$
+ "\end{thephonebook}" write$
+ newline$
+}
+
+% ------------------------------------------------------------
+% F O R M A T S
+% ------------------------------------------------------------
+
+FUNCTION {format.names}
+{ 's :=
+ #1 'nameptr :=
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ {
+% CUSTOM uncomment one of the following lines to have the behaviour on the right
+ s nameptr "{ff }{vv }{ll}{, jj}" format.name$ 't := % Christophe de Geuzaine, jr
+% s nameptr "{f. }{vv }{ll}{, jj}" format.name$ 't := % C. de Geuzaine, jr
+% s nameptr "{vv }{ll}{ f.}{, jj}" format.name$ 't := % de Geuzaine C., jr
+% s nameptr "{vv }{ll}{, ff}{, jj}" format.name$ 't := % de Geuzaine, Christophe, jr
+
+ nameptr #1 >
+ { namesleft #1 >
+ { ", " * t * }
+ { " {\dirandf} " * t * }
+ if$
+ }
+ 't
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+}
+
+FUNCTION {format.name}
+{ name empty$
+ { "" }
+ { name format.names }
+ if$
+}
+
+FUNCTION {format.email}
+{ email empty$
+ { "" }
+ { "\diremaa{" email "}" * * }
+ if$
+}
+
+FUNCTION {format.p.flag}
+{ p.email empty$ not
+ { "\dirprif " }
+ { "" }
+ if$
+}
+
+FUNCTION {format.p.email}
+{ p.email empty$
+ { "" }
+ { "\dirpemaa{" p.email "}" * * }
+ if$
+}
+
+FUNCTION {format.r.flag}
+{ r.email empty$ not
+ { "\dirresf " }
+ { "" }
+ if$
+}
+
+FUNCTION {format.r.email}
+{ r.email empty$
+ { "" }
+ { "\dirremaa{" r.email "}" * * }
+ if$
+}
+
+FUNCTION {format.w.flag}
+{ w.email empty$ not
+ { "\dirworf " }
+ { "" }
+ if$
+}
+
+FUNCTION {format.w.email}
+{ w.email empty$
+ { "" }
+ { "\dirwemaa{" w.email "}" * * }
+ if$
+}
+
+% ------------------------------------------------------------
+% P E R S O N E N T R Y
+% ------------------------------------------------------------
+
+FUNCTION { person }
+{
+ p.email empty$ not
+ r.email empty$ not
+ w.email empty$ not
+ or or
+ { newline$
+
+ "\dircheck{" write$
+ format.first.letter write$
+ "}" write$
+ newline$
+
+ "\diritem[" write$
+ format.name write$
+ "]{" write$
+ "d." cite$ * write$
+ "}\dirgroup" write$
+ newline$
+ "\dirblock" write$
+ newline$
+
+ format.p.flag output.flag
+ format.p.email output
+
+ format.r.flag output.flag
+ format.r.email output
+
+ format.w.flag output.flag
+ format.w.email output
+
+ "\direndgroup" write$
+ newline$
+ }
+ { }
+ if$
+}
+
+% ------------------------------------------------------------
+% C O M P A N Y E N T R Y
+% ------------------------------------------------------------
+
+
+FUNCTION { company }
+{
+ email empty$ not
+ { newline$
+
+ "\dircheck{" write$
+ format.first.letter write$
+ "}" write$
+ newline$
+
+ "\diritem[" write$
+ name write$
+ "]{" write$
+ "d." cite$ * write$
+ "}\dirgroup" write$
+ newline$
+ "\dirblock" write$
+ newline$
+
+ format.email output
+
+ "\direndgroup" write$
+ newline$
+ }
+ { }
+ if$
+}
+
+% ------------------------------------------------------------
+% P L A C E E N T R Y
+% ------------------------------------------------------------
+
+
+FUNCTION { place }
+{
+}
+
+% ------------------------------------------------------------
+% M A I N
+% ------------------------------------------------------------
+
+READ
+ITERATE {presort}
+SORT
+EXECUTE {begin.bib}
+ITERATE {call.type$}
+EXECUTE {end.bib}
diff --git a/biblio/bibtex/contrib/directory/family.bib b/biblio/bibtex/contrib/directory/family.bib
new file mode 100644
index 0000000000..7704f9bdac
--- /dev/null
+++ b/biblio/bibtex/contrib/directory/family.bib
@@ -0,0 +1,72 @@
+## family.bib
+## Copyright 1998-2003 Christophe Geuzaine
+#
+# $Id: family.bib,v 1.8 2003/09/15 05:40:31 geuzaine Exp $
+#
+# This program can be redistributed and/or modified under the terms
+# of the LaTeX Project Public License distributed from CTAN
+# archives in directory macros/latex/base/lppl.txt; either
+# version 1 of the License, or (at your option) any later version.
+#
+# 'directory' package: sample bib file
+#
+# important notes:
+# * 'birthday' field format: "day month"
+# * For married couples, be aware that an entry of the form 'Hillary and
+# Bill Clinton' will produce silly alphabetical sorting, since BibTeX
+# thinks Hillary is a last name. A better (but not perfect, and a little
+# bit macho) way to proceed is to introduce 'Bill Clinton and Hillary'.
+# The best way is of course to introduce 'Bill Clinton and Hillary Rodham'.
+# (An even better way is to introduce 'Clinton, William Jefferson
+# Blythe III and Rodham, Hillary' and put 'Bill' in the nickname field.)
+
+@Person{c.geuzaine,
+ name = "Christophe Geuzaine",
+ birthday = "06 02",
+ birthyear = "1973",
+ p.email = "geuz@geuz.org",
+ p.url = "http://www.geuz.org",
+ w.title = "Postdoctoral Scholar",
+ w.name = "Caltech, Applied and Computational Mathematics",
+ w.url = "http://www.acm.caltech.edu",
+ w.street = "1200 E California Blvd",
+ w.city = "Pasadena",
+ w.state = "CA",
+ w.zip = 91125,
+ w.country = "USA",
+ w.phone = "1 626 395 4552",
+}
+
+@Person{d.e.knu,
+ name = "Knudson, Donald Ernest",
+ birthday = "29 01",
+ p.phone = "+01-(0)2-234.56.78",
+ p.email = "duck@novosi.uni.gnu",
+ note = "1952 Permafrost Press Award winner",
+}
+
+@Person{d.d.knu,
+ name = "Knudson, Daffy Duck and Bunny, Bugs and Mr. Pluto",
+ nickname = "gnat and gnu and pluto",
+ birthday = "10 02 and 05 11 and 01 01",
+ p.phone = "+01-(0)2-765.43.21",
+ p.cellular = "+01-(0)5-555.55.55",
+ p.account = "010-1234567-05",
+ r.street = "Haight Street 512",
+ r.zip = 80214,
+ r.city = "Novosibirsk",
+ r.country = "Gnuland",
+ r.phone = "+01-(0)2-876.54.32",
+ w.name = "University of Novosibirsk,
+ Department of Octopus Parthenogenesis",
+}
+
+@Person{b.b.knu,
+ name = "Bip B. Knudson",
+ nickname = "road runner",
+ birthday = "27 02",
+ p.email = "bip_bip@free.prov.gnu",
+ p.address = "Somewhere close to a falling rock",
+}
+
+
diff --git a/biblio/bibtex/contrib/directory/letter.bst b/biblio/bibtex/contrib/directory/letter.bst
new file mode 100644
index 0000000000..b0b79725cf
--- /dev/null
+++ b/biblio/bibtex/contrib/directory/letter.bst
@@ -0,0 +1,359 @@
+%% letter.bst
+%% Copyright 1998-2003 Christophe Geuzaine <geuz@geuz.org>
+%
+% $Id: letter.bst,v 1.7 2003/09/15 05:40:31 geuzaine Exp $
+%
+% This program can be redistributed and/or modified under the terms
+% of the LaTeX Project Public License distributed from CTAN
+% archives in directory macros/latex/base/lppl.txt; either
+% version 1 of the License, or (at your option) any later version.
+%
+% BibTeX bibliography style `letter.bst'
+% 'directory' database: all fields
+%
+% The parts you may want to customize are labeled with "CUSTOM"
+%
+
+INTEGERS { nameptr namesleft numnames numaux len }
+STRINGS { s t u v }
+
+% ------------------------------------------------------------
+% E N T R I E S
+% ------------------------------------------------------------
+
+ENTRY
+ { name
+ address
+ street
+ city
+ state
+ zip
+ country
+ p.address
+ p.street
+ p.city
+ p.state
+ p.zip
+ p.country
+ r.address
+ r.street
+ r.city
+ r.state
+ r.zip
+ r.country
+ w.title
+ w.name
+ w.address
+ w.street
+ w.city
+ w.state
+ w.zip
+ w.country
+ }
+ {}
+ {}
+
+% ------------------------------------------------------------
+% G E N E R A L
+% ------------------------------------------------------------
+
+FUNCTION {not}
+{ { #0 }
+ { #1 }
+ if$
+}
+
+FUNCTION {and}
+{ 'skip$
+ { pop$ #0 }
+ if$
+}
+
+FUNCTION {or}
+{ { pop$ #1 }
+ 'skip$
+ if$
+}
+
+% ------------------------------------------------------------
+% F O R M A T S
+% ------------------------------------------------------------
+
+FUNCTION {format.names}
+{ 's :=
+ #1 'nameptr :=
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ {
+% CUSTOM uncomment one of the following lines to have the behaviour on the right
+ s nameptr "{ff }{vv }{ll}{, jj}" format.name$ 't := % Christophe de Geuzaine, jr
+% s nameptr "{f. }{vv }{ll}{, jj}" format.name$ 't := % C. de Geuzaine, jr
+% s nameptr "{vv }{ll}{ f.}{, jj}" format.name$ 't := % de Geuzaine C., jr
+% s nameptr "{vv }{ll}{, ff}{, jj}" format.name$ 't := % de Geuzaine, Christophe, jr
+
+ nameptr #1 >
+ { namesleft #1 >
+ { ", " * t * }
+ { " {\dirandf} " * t * }
+ if$
+ }
+ 't
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+}
+
+FUNCTION {format.name}
+{ name empty$
+ { "" }
+ { name format.names }
+ if$
+}
+
+FUNCTION {format.address}
+{ address empty$
+ {
+ street empty$ city empty$ state empty$ zip empty$ country empty$
+ and and and and
+ { "" }
+ { " \dirnext "
+ street empty$ { "" * } { street " \dirnext " * * } if$
+ city empty$ { "" * } { city " " * * } if$
+ state empty$ { "" * } { state " " * * } if$
+ zip empty$ { "" * } { zip " " * * } if$
+ country empty$ { "" * } { country * } if$
+ }
+ if$
+ }
+ { " \dirnext " address * }
+ if$
+}
+
+FUNCTION {format.p.address}
+{ p.address empty$
+ {
+ p.street empty$ p.city empty$ p.state empty$ p.zip empty$ p.country empty$
+ and and and and
+ { "" }
+ { " \dirnext "
+ p.street empty$ { "" * } { p.street " \dirnext " * * } if$
+ p.city empty$ { "" * } { p.city " " * * } if$
+ p.state empty$ { "" * } { p.state " " * * } if$
+ p.zip empty$ { "" * } { p.zip " " * * } if$
+ p.country empty$ { "" * } { p.country * } if$
+ }
+ if$
+ }
+ { " \dirnext " p.address * }
+ if$
+}
+
+FUNCTION {format.r.address}
+{ r.address empty$
+ {
+ r.street empty$ r.city empty$ r.state empty$ r.zip empty$ r.country empty$
+ and and and and
+ { "" }
+ { " \dirnext "
+ r.street empty$ { "" * } { r.street " \dirnext " * * } if$
+ r.city empty$ { "" * } { r.city " " * * } if$
+ r.state empty$ { "" * } { r.state " " * * } if$
+ r.zip empty$ { "" * } { r.zip " " * * } if$
+ r.country empty$ { "" * } { r.country * } if$
+ }
+ if$
+ }
+ { " \dirnext " r.address * }
+ if$
+}
+
+FUNCTION {format.w.title}
+{ w.title empty$
+ { "" }
+ { " \dirnext " w.title * }
+ if$
+}
+
+FUNCTION {format.w.name}
+{ w.name empty$
+ { "" }
+ { " \dirnext " w.name * }
+ if$
+}
+
+FUNCTION {format.w.address}
+{ w.address empty$
+ {
+ w.street empty$ w.city empty$ w.state empty$ w.zip empty$ w.country empty$
+ and and and and
+ { "" }
+ { " \dirnext "
+ w.street empty$ { "" * } { w.street " \dirnext " * * } if$
+ w.city empty$ { "" * } { w.city " " * * } if$
+ w.state empty$ { "" * } { w.state " " * * } if$
+ w.zip empty$ { "" * } { w.zip " " * * } if$
+ w.country empty$ { "" * } { w.country * } if$
+ }
+ if$
+ }
+ { " \dirnext " w.address * }
+ if$
+}
+
+% ------------------------------------------------------------
+% P E R S O N E N T R Y
+% ------------------------------------------------------------
+
+FUNCTION { person }
+{
+ "\diritem{" write$
+ format.name write$
+ "}{" write$
+ "d." cite$ * write$
+ "}" write$
+
+ newline$
+
+ "\diritem{" write$
+ "\dirbegin " write$
+ format.name write$
+ format.p.address write$
+ "\dirend " write$
+ "}{" write$
+ "p." cite$ * write$
+ "}" write$
+
+ newline$
+
+ "\diritem{" write$
+ "\dirbegin " write$
+ format.name write$
+ format.r.address write$
+ "\dirend " write$
+ "}{" write$
+ "r." cite$ * write$
+ "}" write$
+
+ newline$
+
+ "\diritem{" write$
+ "\dirbegin " write$
+ format.name write$
+ format.w.title write$
+ format.w.name write$
+ format.w.address write$
+ "\dirend " write$
+ "}{" write$
+ "w." cite$ * write$
+ "}" write$
+
+ newline$
+}
+
+% ------------------------------------------------------------
+% C O M P A N Y E N T R Y
+% ------------------------------------------------------------
+
+
+FUNCTION { company }
+{
+ "\diritem{" write$
+ name write$
+ "}{" write$
+ "d." cite$ * write$
+ "}" write$
+
+ newline$
+
+ "\diritem{" write$
+ "\dirbegin " write$
+ name write$
+ format.address write$
+ "\dirend " write$
+ "}{" write$
+ "p." cite$ * write$
+ "}" write$
+
+ newline$
+
+ "\diritem{" write$
+ "\dirbegin " write$
+ name write$
+ format.address write$
+ "\dirend " write$
+ "}{" write$
+ "r." cite$ * write$
+ "}" write$
+
+ newline$
+
+ "\diritem{" write$
+ "\dirbegin " write$
+ name write$
+ format.address write$
+ "\dirend " write$
+ "}{" write$
+ "w." cite$ * write$
+ "}" write$
+
+ newline$
+}
+
+% ------------------------------------------------------------
+% P L A C E E N T R Y
+% ------------------------------------------------------------
+
+FUNCTION { place }
+{
+ "\diritem{" write$
+ name write$
+ "}{" write$
+ "d." cite$ * write$
+ "}" write$
+
+ newline$
+
+ "\diritem{" write$
+ "\dirbegin " write$
+ name write$
+ format.address write$
+ "\dirend " write$
+ "}{" write$
+ "p." cite$ * write$
+ "}" write$
+
+ newline$
+
+ "\diritem{" write$
+ "\dirbegin " write$
+ name write$
+ format.address write$
+ "\dirend " write$
+ "}{" write$
+ "r." cite$ * write$
+ "}" write$
+
+ newline$
+
+ "\diritem{" write$
+ "\dirbegin " write$
+ name write$
+ format.address write$
+ "\dirend " write$
+ "}{" write$
+ "w." cite$ * write$
+ "}" write$
+
+ newline$
+}
+
+% ------------------------------------------------------------
+% M A I N
+% ------------------------------------------------------------
+
+READ
+ITERATE {call.type$}
+
diff --git a/biblio/bibtex/contrib/directory/phone.bst b/biblio/bibtex/contrib/directory/phone.bst
new file mode 100644
index 0000000000..81150d2117
--- /dev/null
+++ b/biblio/bibtex/contrib/directory/phone.bst
@@ -0,0 +1,485 @@
+%% phone.bst
+%% Copyright 1998-2003 Christophe Geuzaine <geuz@geuz.org>
+%
+% $Id: phone.bst,v 1.6 2003/09/14 09:47:49 geuzaine Exp $
+%
+% This program can be redistributed and/or modified under the terms
+% of the LaTeX Project Public License distributed from CTAN
+% archives in directory macros/latex/base/lppl.txt; either
+% version 1 of the License, or (at your option) any later version.
+%
+% BibTeX bibliography style `phone.bst'
+% 'directory' database: only phone and fax fields
+%
+% The parts you may want to customize are labeled with "CUSTOM"
+%
+
+INTEGERS { nameptr namesleft numnames numaux len }
+STRINGS { s t u v }
+
+% ------------------------------------------------------------
+% E N T R I E S
+% ------------------------------------------------------------
+
+ENTRY
+ { name
+ phone
+ cellular
+ fax
+ p.phone
+ p.cellular
+ p.fax
+ r.phone
+ r.cellular
+ r.fax
+ w.phone
+ w.cellular
+ w.fax
+ }
+ {}
+ {}
+
+% ------------------------------------------------------------
+% G E N E R A L
+% ------------------------------------------------------------
+
+FUNCTION {output}
+{ 's :=
+ s empty$
+ {}
+ { s write$
+ newline$
+ "\dirblock" write$
+ newline$
+ }
+ if$
+}
+
+FUNCTION {output.flag}
+{ 's :=
+ s empty$
+ {}
+ { s write$
+ newline$
+ }
+ if$
+}
+
+FUNCTION {not}
+{ { #0 }
+ { #1 }
+ if$
+}
+
+FUNCTION {and}
+{ 'skip$
+ { pop$ #0 }
+ if$
+}
+
+FUNCTION {or}
+{ { pop$ #1 }
+ 'skip$
+ if$
+}
+
+FUNCTION {chop.word}
+{ 's :=
+ 'len :=
+ s #1 len substring$ =
+ { s len #1 + global.max$ substring$ }
+ 's
+ if$
+}
+
+
+% ------------------------------------------------------------
+% S O R T I N G F U N C T I O N S
+% ------------------------------------------------------------
+
+FUNCTION {sortify}
+{ purify$
+ "l" change.case$
+}
+
+FUNCTION {sort.names}
+{ 's :=
+ #1 'nameptr :=
+ ""
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ { nameptr #1 >
+ { " " * }
+ 'skip$
+ if$
+ s nameptr "{vv{ } }{ll{ }}{ ff{ }}{ jj{ }}" format.name$ 't :=
+ nameptr numnames = t "others" = and
+ { "et al" * }
+ { t sortify * }
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+}
+
+
+FUNCTION {sort.raw.names}
+{ 't :=
+ "A " #2 "L'" #2
+ "An " #3 "Au " #3 "Le " #3 "La " #3
+ "The " #4 "Les " #4 "Aux " #4
+ t
+ chop.word chop.word
+ chop.word chop.word chop.word chop.word
+ chop.word chop.word chop.word
+ sortify
+ #1 global.max$ substring$
+}
+
+FUNCTION {name.sort}
+{ name empty$
+ { " Name field missing in entry '" cite$ * "'" * warning$ "" }
+ { name sort.names }
+ if$
+}
+
+FUNCTION {raw.name.sort}
+{ name empty$
+ { " Name field missing in entry '" cite$ * "'" * warning$ "" }
+ { name sort.raw.names }
+ if$
+}
+
+FUNCTION {presort}
+{ type$ "company" =
+ type$ "place" =
+ or
+ { raw.name.sort }
+ { name.sort }
+ if$
+ " "
+ *
+ #1 entry.max$ substring$
+ 'sort.key$ :=
+}
+
+FUNCTION {format.first.letter}
+{ type$ "company" =
+ type$ "place" =
+ or
+ { raw.name.sort }
+ { name.sort }
+ if$
+ #1 #1 substring$
+}
+
+
+% ------------------------------------------------------------
+% P R E - A N D P O S T - H E A D E R S
+% ------------------------------------------------------------
+
+FUNCTION {begin.bib}
+{ "\begin{thephonebook}" write$
+ newline$
+}
+
+FUNCTION {end.bib}
+{ newline$
+ "\end{thephonebook}" write$
+ newline$
+}
+
+% ------------------------------------------------------------
+% F O R M A T S
+% ------------------------------------------------------------
+
+FUNCTION {format.names}
+{ 's :=
+ #1 'nameptr :=
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ {
+% CUSTOM uncomment one of the following lines to have the behaviour on the right
+% s nameptr "{ff }{vv }{ll}{, jj}" format.name$ 't := % Christophe de Geuzaine, jr
+% s nameptr "{f. }{vv }{ll}{, jj}" format.name$ 't := % C. de Geuzaine, jr
+ s nameptr "{vv }{ll}{ f.}{, jj}" format.name$ 't := % de Geuzaine C., jr
+% s nameptr "{vv }{ll}{, ff}{, jj}" format.name$ 't := % de Geuzaine, Christophe, jr
+
+ nameptr #1 >
+ { namesleft #1 >
+ { ", " * t * }
+ { " {\dirandf} " * t * }
+ if$
+ }
+ 't
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+}
+
+FUNCTION {format.name}
+{ name empty$
+ { "" }
+ { name format.names }
+ if$
+}
+
+FUNCTION {format.phone}
+{ phone empty$
+ { "" }
+ { "\dirphoa{" phone "}" * * }
+ if$
+}
+
+FUNCTION {format.cellular}
+{ cellular empty$
+ { "" }
+ { "\dircela{" cellular "}" * * }
+ if$
+}
+
+FUNCTION {format.fax}
+{ fax empty$
+ { "" }
+ { "\dirfaxa{" fax "}" * * }
+ if$
+}
+
+FUNCTION {format.p.flag}
+{ p.phone empty$ not
+ p.cellular empty$ not
+ p.fax empty$ not
+ or or
+ { "\dirprif " }
+ { "" }
+ if$
+}
+
+FUNCTION {format.p.phone}
+{ p.phone empty$
+ { "" }
+ { "\dirpphoa{" p.phone "}" * * }
+ if$
+}
+
+FUNCTION {format.p.cellular}
+{ p.cellular empty$
+ { "" }
+ { "\dirpcela{" p.cellular "}" * * }
+ if$
+}
+
+FUNCTION {format.p.fax}
+{ p.fax empty$
+ { "" }
+ { "\dirpfaxa{" p.fax "}" * * }
+ if$
+}
+
+FUNCTION {format.r.flag}
+{ r.phone empty$ not
+ r.cellular empty$ not
+ r.fax empty$ not
+ or or
+ { "\dirresf " }
+ { "" }
+ if$
+}
+
+FUNCTION {format.r.phone}
+{ r.phone empty$
+ { "" }
+ { "\dirrphoa{" r.phone "}" * * }
+ if$
+}
+
+FUNCTION {format.r.cellular}
+{ r.cellular empty$
+ { "" }
+ { "\dirrcela{" r.cellular "}" * * }
+ if$
+}
+
+FUNCTION {format.r.fax}
+{ r.fax empty$
+ { "" }
+ { "\dirrfaxa{" r.fax "}" * * }
+ if$
+}
+
+FUNCTION {format.w.flag}
+{ w.phone empty$ not
+ w.cellular empty$ not
+ w.fax empty$ not
+ or or
+ { "\dirworf " }
+ { "" }
+ if$
+}
+
+FUNCTION {format.w.phone}
+{ w.phone empty$
+ { "" }
+ { "\dirwphoa{" w.phone "}" * * }
+ if$
+}
+
+FUNCTION {format.w.cellular}
+{ w.cellular empty$
+ { "" }
+ { "\dirwcela{" w.cellular "}" * * }
+ if$
+}
+
+FUNCTION {format.w.fax}
+{ w.fax empty$
+ { "" }
+ { "\dirwfaxa{" w.fax "}" * * }
+ if$
+}
+
+% ------------------------------------------------------------
+% P E R S O N E N T R Y
+% ------------------------------------------------------------
+
+FUNCTION { person }
+{
+ p.phone empty$ not
+ p.cellular empty$ not
+ p.fax empty$ not
+ r.phone empty$ not
+ r.cellular empty$ not
+ r.fax empty$ not
+ w.phone empty$ not
+ w.cellular empty$ not
+ w.fax empty$ not
+ or or or or or or or or
+ { newline$
+
+ "\dircheck{" write$
+ format.first.letter write$
+ "}" write$
+ newline$
+
+ "\diritem[" write$
+ format.name write$
+ "]{" write$
+ "d." cite$ * write$
+ "}\dirgroup" write$
+ newline$
+ "\dirblock" write$
+ newline$
+
+ format.p.flag output.flag
+ format.p.phone output
+ format.p.cellular output
+ format.p.fax output
+
+ format.r.flag output.flag
+ format.r.phone output
+ format.r.cellular output
+ format.r.fax output
+
+ format.w.flag output.flag
+ format.w.phone output
+ format.w.cellular output
+ format.w.fax output
+
+ "\direndgroup" write$
+ newline$
+ }
+ { }
+ if$
+}
+
+% ------------------------------------------------------------
+% C O M P A N Y E N T R Y
+% ------------------------------------------------------------
+
+FUNCTION { company }
+{
+ phone empty$ not
+ cellular empty$ not
+ fax empty$ not
+ or or
+ { newline$
+
+ "\dircheck{" write$
+ format.first.letter write$
+ "}" write$
+ newline$
+
+ "\diritem[" write$
+ name write$
+ "]{" write$
+ "d." cite$ * write$
+ "}\dirgroup" write$
+ newline$
+ "\dirblock" write$
+ newline$
+
+ format.phone output
+ format.cellular output
+ format.fax output
+
+ "\direndgroup" write$
+ newline$
+ }
+ { }
+ if$
+}
+
+% ------------------------------------------------------------
+% P L A C E E N T R Y
+% ------------------------------------------------------------
+
+FUNCTION { place }
+{
+ phone empty$ not
+ cellular empty$ not
+ fax empty$ not
+ or or
+ { newline$
+
+ "\dircheck{" write$
+ format.first.letter write$
+ "}" write$
+ newline$
+
+ "\diritem[" write$
+ name write$
+ "]{" write$
+ "d." cite$ * write$
+ "}\dirgroup" write$
+ newline$
+ "\dirblock" write$
+ newline$
+
+ format.phone output
+ format.cellular output
+ format.fax output
+
+ "\direndgroup" write$
+ newline$
+ }
+ { }
+ if$
+}
+
+
+% ------------------------------------------------------------
+% M A I N
+% ------------------------------------------------------------
+
+READ
+ITERATE {presort}
+SORT
+EXECUTE {begin.bib}
+ITERATE {call.type$}
+EXECUTE {end.bib}
+
diff --git a/biblio/bibtex/contrib/dk-bib/88591-dk.csf b/biblio/bibtex/contrib/dk-bib/88591-dk.csf
new file mode 100644
index 0000000000..6355c5421e
--- /dev/null
+++ b/biblio/bibtex/contrib/dk-bib/88591-dk.csf
@@ -0,0 +1,106 @@
+%%% 88591-dk.csf --- Danish latin-1 sorting order file for bibtex8
+
+%% Copyright (C) 2005 Arne Jorgensen
+
+%% Author: Arne Jorgensen <arne.jorgensen@tug.dk>
+%% Version: $Id: 88591-dk.csf 71 2005-08-05 22:44:05Z arne $
+
+%% This file is free software; you can redistribute it and/or modify
+%% it under the terms of the GNU General Public License as published
+%% by the Free Software Foundation; either version 2 of the License,
+%% or (at your option) any later version.
+
+%% This file is distributed in the hope that it will be useful, but
+%% WITHOUT ANY WARRANTY; without even the implied warranty of
+%% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+%% General Public License for more details.
+
+%% You should have received a copy of the GNU General Public License
+%% along with this file; if not, write to the Free Software
+%% Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%% 02110-1301, USA.
+
+%%% Commentary:
+
+%%% Code:
+
+%%% Character Set:
+
+\lowupcase{
+ % \`{a} \`{A}
+ % \'{a} \'{A}
+ % \^{a} \^{A}
+ % \~{a} \~{A}
+ % \"{a} \"{A}
+ % \ring{a} \ring{A}
+ % \ae \AE
+ % \c{c} \c{C}
+ % \`{e} \`{E}
+ % \'{e} \'{E}
+ % \^{e} \^{E}
+ % \"{e} \"{E}
+ % \`{\i} \`{I}
+ % \'{\i} \'{I}
+ % \^{\i} \^{I}
+ % \"{\i} \"{I}
+ % eth ETH
+ % \~{n} \~{N}
+ % \`{o} \`{O}
+ % \'{o} \'{O}
+ % \^{o} \^{O}
+ % \~{o} \~{O}
+ % \"{o} \"{O}
+ % \o \O
+ % \`{u} \`{U}
+ % \'{u} \'{U}
+ % \^{u} \^{U}
+ % \"{u} \"{U}
+ % \'{y} \'{Y}
+ % thorn THORN
+}
+
+%%% Sorting Order:
+
+%% Notice that / (THORN / thorn) will be sorted as T / t and not
+%% as Th / th as it should be. You are probably better off be putting
+%% \TH / \th into your .bib file.
+
+\order{
+ 0-9 % 0-9
+ A a % A \'{A} \`{A} \^{A} \~{A} a \'{a} \`{a} \^{a} \~{a}
+ B b % B b
+ C c % C \c{C} c \c{c}
+ D d % D ETH d eth
+ E e % E \'{E} \`{E} \"{E} \^{E} e \'{e} \`{e} \"{e} \^{e}
+ F f % F f
+ G g % G g
+ H h % H h
+ I i % I \'{I} \'{I} \"{I} \^{I} i \'{\i} \`{\i} \"{\i} \^{\i}
+ J j % J j
+ K k % K k
+ L l % L l
+ M m % M m
+ N n % N \~{N} n \~{n}
+ O o % O \'{O} \`{O} \^{O} \~{O} o \'{o} \`{o} \^{o} \~{o}
+ P p % P p
+ Q q % Q q
+ R r % R r
+ S s % S s
+ T t % T THORN t thorn
+ U u % U \'{U} \`{U} \^{U} u \'{u} \`{u} \^{u}
+ V v % V v
+ W w % W w
+ X x % X x
+ Y y % Y \"{U} \'{Y} y \"{u} \'{y} \"{y}
+ Z z % Z z
+ % \AE \"{A} \ae \"{a}
+ % \O \"{O} \o \"{o}
+ % \ring{A} \ring{a}
+}
+
+%% Local Variables:
+%% coding: iso-8859-1
+%% comment-start: "%% "
+%% End:
+
+%%% 88591-dk.csf ends here
diff --git a/biblio/bibtex/contrib/dk-bib/COPYRIGHT b/biblio/bibtex/contrib/dk-bib/COPYRIGHT
new file mode 100644
index 0000000000..8be8530c9a
--- /dev/null
+++ b/biblio/bibtex/contrib/dk-bib/COPYRIGHT
@@ -0,0 +1,362 @@
+The files
+
+ dk-abbrv.bst
+ dk-alpha.bst
+ dk-apali.bst
+ dk-plain.bst
+ dk-unsrt.bst
+ dk-apali.sty
+
+are licensed under the normal licensing of bst-files which says
+
+ % Copying of this file is authorized only if either
+ % (1) you make absolutely no changes to your copy, including name, or
+ % (2) if you do make changes, you name it something other than
+ % btxbst.doc, plain.bst, unsrt.bst, alpha.bst, and abbrv.bst.
+ % This restriction helps ensure that all standard styles are identical.
+
+
+All other files in dk-bib is released under the GNU General Public License.
+
+
+
+ GNU GENERAL PUBLIC LICENSE
+ Version 2, June 1991
+
+ Copyright (C) 1989, 1991 Free Software Foundation, Inc.
+ 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+ Preamble
+
+ The licenses for most software are designed to take away your
+freedom to share and change it. By contrast, the GNU General Public
+License is intended to guarantee your freedom to share and change free
+software--to make sure the software is free for all its users. This
+General Public License applies to most of the Free Software
+Foundation's software and to any other program whose authors commit to
+using it. (Some other Free Software Foundation software is covered by
+the GNU Library General Public License instead.) You can apply it to
+your programs, too.
+
+ When we speak of free software, we are referring to freedom, not
+price. Our General Public Licenses are designed to make sure that you
+have the freedom to distribute copies of free software (and charge for
+this service if you wish), that you receive source code or can get it
+if you want it, that you can change the software or use pieces of it
+in new free programs; and that you know you can do these things.
+
+ To protect your rights, we need to make restrictions that forbid
+anyone to deny you these rights or to ask you to surrender the rights.
+These restrictions translate to certain responsibilities for you if you
+distribute copies of the software, or if you modify it.
+
+ For example, if you distribute copies of such a program, whether
+gratis or for a fee, you must give the recipients all the rights that
+you have. You must make sure that they, too, receive or can get the
+source code. And you must show them these terms so they know their
+rights.
+
+ We protect your rights with two steps: (1) copyright the software, and
+(2) offer you this license which gives you legal permission to copy,
+distribute and/or modify the software.
+
+ Also, for each author's protection and ours, we want to make certain
+that everyone understands that there is no warranty for this free
+software. If the software is modified by someone else and passed on, we
+want its recipients to know that what they have is not the original, so
+that any problems introduced by others will not reflect on the original
+authors' reputations.
+
+ Finally, any free program is threatened constantly by software
+patents. We wish to avoid the danger that redistributors of a free
+program will individually obtain patent licenses, in effect making the
+program proprietary. To prevent this, we have made it clear that any
+patent must be licensed for everyone's free use or not licensed at all.
+
+ The precise terms and conditions for copying, distribution and
+modification follow.
+
+ GNU GENERAL PUBLIC LICENSE
+ TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
+
+ 0. This License applies to any program or other work which contains
+a notice placed by the copyright holder saying it may be distributed
+under the terms of this General Public License. The "Program", below,
+refers to any such program or work, and a "work based on the Program"
+means either the Program or any derivative work under copyright law:
+that is to say, a work containing the Program or a portion of it,
+either verbatim or with modifications and/or translated into another
+language. (Hereinafter, translation is included without limitation in
+the term "modification".) Each licensee is addressed as "you".
+
+Activities other than copying, distribution and modification are not
+covered by this License; they are outside its scope. The act of
+running the Program is not restricted, and the output from the Program
+is covered only if its contents constitute a work based on the
+Program (independent of having been made by running the Program).
+Whether that is true depends on what the Program does.
+
+ 1. You may copy and distribute verbatim copies of the Program's
+source code as you receive it, in any medium, provided that you
+conspicuously and appropriately publish on each copy an appropriate
+copyright notice and disclaimer of warranty; keep intact all the
+notices that refer to this License and to the absence of any warranty;
+and give any other recipients of the Program a copy of this License
+along with the Program.
+
+You may charge a fee for the physical act of transferring a copy, and
+you may at your option offer warranty protection in exchange for a fee.
+
+ 2. You may modify your copy or copies of the Program or any portion
+of it, thus forming a work based on the Program, and copy and
+distribute such modifications or work under the terms of Section 1
+above, provided that you also meet all of these conditions:
+
+ a) You must cause the modified files to carry prominent notices
+ stating that you changed the files and the date of any change.
+
+ b) You must cause any work that you distribute or publish, that in
+ whole or in part contains or is derived from the Program or any
+ part thereof, to be licensed as a whole at no charge to all third
+ parties under the terms of this License.
+
+ c) If the modified program normally reads commands interactively
+ when run, you must cause it, when started running for such
+ interactive use in the most ordinary way, to print or display an
+ announcement including an appropriate copyright notice and a
+ notice that there is no warranty (or else, saying that you provide
+ a warranty) and that users may redistribute the program under
+ these conditions, and telling the user how to view a copy of this
+ License. (Exception: if the Program itself is interactive but
+ does not normally print such an announcement, your work based on
+ the Program is not required to print an announcement.)
+
+These requirements apply to the modified work as a whole. If
+identifiable sections of that work are not derived from the Program,
+and can be reasonably considered independent and separate works in
+themselves, then this License, and its terms, do not apply to those
+sections when you distribute them as separate works. But when you
+distribute the same sections as part of a whole which is a work based
+on the Program, the distribution of the whole must be on the terms of
+this License, whose permissions for other licensees extend to the
+entire whole, and thus to each and every part regardless of who wrote it.
+
+Thus, it is not the intent of this section to claim rights or contest
+your rights to work written entirely by you; rather, the intent is to
+exercise the right to control the distribution of derivative or
+collective works based on the Program.
+
+In addition, mere aggregation of another work not based on the Program
+with the Program (or with a work based on the Program) on a volume of
+a storage or distribution medium does not bring the other work under
+the scope of this License.
+
+ 3. You may copy and distribute the Program (or a work based on it,
+under Section 2) in object code or executable form under the terms of
+Sections 1 and 2 above provided that you also do one of the following:
+
+ a) Accompany it with the complete corresponding machine-readable
+ source code, which must be distributed under the terms of Sections
+ 1 and 2 above on a medium customarily used for software interchange; or,
+
+ b) Accompany it with a written offer, valid for at least three
+ years, to give any third party, for a charge no more than your
+ cost of physically performing source distribution, a complete
+ machine-readable copy of the corresponding source code, to be
+ distributed under the terms of Sections 1 and 2 above on a medium
+ customarily used for software interchange; or,
+
+ c) Accompany it with the information you received as to the offer
+ to distribute corresponding source code. (This alternative is
+ allowed only for noncommercial distribution and only if you
+ received the program in object code or executable form with such
+ an offer, in accord with Subsection b above.)
+
+The source code for a work means the preferred form of the work for
+making modifications to it. For an executable work, complete source
+code means all the source code for all modules it contains, plus any
+associated interface definition files, plus the scripts used to
+control compilation and installation of the executable. However, as a
+special exception, the source code distributed need not include
+anything that is normally distributed (in either source or binary
+form) with the major components (compiler, kernel, and so on) of the
+operating system on which the executable runs, unless that component
+itself accompanies the executable.
+
+If distribution of executable or object code is made by offering
+access to copy from a designated place, then offering equivalent
+access to copy the source code from the same place counts as
+distribution of the source code, even though third parties are not
+compelled to copy the source along with the object code.
+
+ 4. You may not copy, modify, sublicense, or distribute the Program
+except as expressly provided under this License. Any attempt
+otherwise to copy, modify, sublicense or distribute the Program is
+void, and will automatically terminate your rights under this License.
+However, parties who have received copies, or rights, from you under
+this License will not have their licenses terminated so long as such
+parties remain in full compliance.
+
+ 5. You are not required to accept this License, since you have not
+signed it. However, nothing else grants you permission to modify or
+distribute the Program or its derivative works. These actions are
+prohibited by law if you do not accept this License. Therefore, by
+modifying or distributing the Program (or any work based on the
+Program), you indicate your acceptance of this License to do so, and
+all its terms and conditions for copying, distributing or modifying
+the Program or works based on it.
+
+ 6. Each time you redistribute the Program (or any work based on the
+Program), the recipient automatically receives a license from the
+original licensor to copy, distribute or modify the Program subject to
+these terms and conditions. You may not impose any further
+restrictions on the recipients' exercise of the rights granted herein.
+You are not responsible for enforcing compliance by third parties to
+this License.
+
+ 7. If, as a consequence of a court judgment or allegation of patent
+infringement or for any other reason (not limited to patent issues),
+conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License. If you cannot
+distribute so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you
+may not distribute the Program at all. For example, if a patent
+license would not permit royalty-free redistribution of the Program by
+all those who receive copies directly or indirectly through you, then
+the only way you could satisfy both it and this License would be to
+refrain entirely from distribution of the Program.
+
+If any portion of this section is held invalid or unenforceable under
+any particular circumstance, the balance of the section is intended to
+apply and the section as a whole is intended to apply in other
+circumstances.
+
+It is not the purpose of this section to induce you to infringe any
+patents or other property right claims or to contest validity of any
+such claims; this section has the sole purpose of protecting the
+integrity of the free software distribution system, which is
+implemented by public license practices. Many people have made
+generous contributions to the wide range of software distributed
+through that system in reliance on consistent application of that
+system; it is up to the author/donor to decide if he or she is willing
+to distribute software through any other system and a licensee cannot
+impose that choice.
+
+This section is intended to make thoroughly clear what is believed to
+be a consequence of the rest of this License.
+
+ 8. If the distribution and/or use of the Program is restricted in
+certain countries either by patents or by copyrighted interfaces, the
+original copyright holder who places the Program under this License
+may add an explicit geographical distribution limitation excluding
+those countries, so that distribution is permitted only in or among
+countries not thus excluded. In such case, this License incorporates
+the limitation as if written in the body of this License.
+
+ 9. The Free Software Foundation may publish revised and/or new versions
+of the General Public License from time to time. Such new versions will
+be similar in spirit to the present version, but may differ in detail to
+address new problems or concerns.
+
+Each version is given a distinguishing version number. If the Program
+specifies a version number of this License which applies to it and "any
+later version", you have the option of following the terms and conditions
+either of that version or of any later version published by the Free
+Software Foundation. If the Program does not specify a version number of
+this License, you may choose any version ever published by the Free Software
+Foundation.
+
+ 10. If you wish to incorporate parts of the Program into other free
+programs whose distribution conditions are different, write to the author
+to ask for permission. For software which is copyrighted by the Free
+Software Foundation, write to the Free Software Foundation; we sometimes
+make exceptions for this. Our decision will be guided by the two goals
+of preserving the free status of all derivatives of our free software and
+of promoting the sharing and reuse of software generally.
+
+ NO WARRANTY
+
+ 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
+FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
+OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
+PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
+OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
+TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
+PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
+REPAIR OR CORRECTION.
+
+ 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
+WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
+REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
+INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
+OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
+TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
+YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
+PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
+POSSIBILITY OF SUCH DAMAGES.
+
+ END OF TERMS AND CONDITIONS
+
+ How to Apply These Terms to Your New Programs
+
+ If you develop a new program, and you want it to be of the greatest
+possible use to the public, the best way to achieve this is to make it
+free software which everyone can redistribute and change under these terms.
+
+ To do so, attach the following notices to the program. It is safest
+to attach them to the start of each source file to most effectively
+convey the exclusion of warranty; and each file should have at least
+the "copyright" line and a pointer to where the full notice is found.
+
+ <one line to give the program's name and a brief idea of what it does.>
+ Copyright (C) <year> <name of author>
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+
+
+Also add information on how to contact you by electronic and paper mail.
+
+If the program is interactive, make it output a short notice like this
+when it starts in an interactive mode:
+
+ Gnomovision version 69, Copyright (C) year name of author
+ Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
+ This is free software, and you are welcome to redistribute it
+ under certain conditions; type `show c' for details.
+
+The hypothetical commands `show w' and `show c' should show the appropriate
+parts of the General Public License. Of course, the commands you use may
+be called something other than `show w' and `show c'; they could even be
+mouse-clicks or menu items--whatever suits your program.
+
+You should also get your employer (if you work as a programmer) or your
+school, if any, to sign a "copyright disclaimer" for the program, if
+necessary. Here is a sample; alter the names:
+
+ Yoyodyne, Inc., hereby disclaims all copyright interest in the program
+ `Gnomovision' (which makes passes at compilers) written by James Hacker.
+
+ <signature of Ty Coon>, 1 April 1989
+ Ty Coon, President of Vice
+
+This General Public License does not permit incorporating your program into
+proprietary programs. If your program is a subroutine library, you may
+consider it more useful to permit linking proprietary applications with the
+library. If this is what you want to do, use the GNU Library General
+Public License instead of this License.
diff --git a/biblio/bibtex/contrib/dk-bib/Makefile b/biblio/bibtex/contrib/dk-bib/Makefile
new file mode 100644
index 0000000000..0489f75f6f
--- /dev/null
+++ b/biblio/bibtex/contrib/dk-bib/Makefile
@@ -0,0 +1,71 @@
+### Makefile --- for building dk-bib
+
+# Copyright (C) 2004, 2005, 2006 Arne Jorgensen
+
+# Version: $Id: Makefile 89 2006-05-16 19:50:56Z arne $
+
+# This file is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or (at
+# your option) any later version.
+
+# This file is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this file; if not, write to the Free Software Foundation,
+# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+
+.PHONY: all doc install-texmfhome install-texmflocal install texlive clean
+
+all: dk-bib.pdf
+
+doc: dk-bib.ltx litteratur.bib dk-plain.bst dk-bib.sty
+ test ${LATEX} # checking wheter LATEX is set
+ ${LATEX} dk-bib.ltx
+ bibtex dk-bib
+ ${LATEX} dk-bib.ltx
+ ${LATEX} dk-bib.ltx
+
+dk-bib.pdf: dk-bib.ltx litteratur.bib dk-plain.bst dk-bib.sty
+ LATEX=pdflatex make doc
+
+dk-bib.dvi: dk-bib.ltx litteratur.bib dk-plain.bst dk-bib.sty
+ LATEX=latex make doc
+
+dk-bib.zip: README COPYRIGHT Makefile dk-bib.ltx dk-bib.pdf\
+ *.sty litteratur.bib *.bst *.csf
+ zip -z $@ $^ < README
+
+install: dk-bib.pdf
+ test ${INSTALLDIR} # checking whether INSTALLDIR is set
+ install -m 0755 -d ${INSTALLDIR}/tex/latex/dk-bib/
+ install -m 0755 -d ${INSTALLDIR}/doc/latex/dk-bib/
+ install -m 0755 -d ${INSTALLDIR}/bibtex/bst/dk-bib/
+ install -m 0755 -d ${INSTALLDIR}/bibtex/csf/dk-bib/
+ install -m 0644 dk-bib.sty ${INSTALLDIR}/tex/latex/dk-bib/
+ install -m 0644 dk-apali.sty ${INSTALLDIR}/tex/latex/dk-bib/
+ install -m 0644 dk-bib.pdf ${INSTALLDIR}/doc/latex/dk-bib/
+ install -m 0644 *.bst ${INSTALLDIR}/bibtex/bst/dk-bib/
+ install -m 0644 *.csf ${INSTALLDIR}/bibtex/csf/dk-bib/
+ (test -f ${INSTALLDIR}/ls-R && mktexlsr ${INSTALLDIR}) || true
+
+texlive:
+ INSTALLDIR=texlive/texmf-dist make install
+
+install-texmfhome:
+ test `kpsexpand '$$TEXMFHOME'` # checking whether TEXMFHOME is defined
+ INSTALLDIR=`kpsexpand '$$TEXMFHOME'` make install
+
+install-texmflocal:
+ test `kpsexpand '$$TEXMFLOCAL'` # checking whether TEXMFLOCAL is defined
+ INSTALLDIR=`kpsexpand '$$TEXMFLOCAL'` make install
+
+clean:
+ ${RM} dk-bib.aux dk-bib.log dk-bib.blg dk-bib.bbl dk-bib.out dk-bib.dvi\
+ dk-bib.pdf dk-bib.zip
+ ${RM} *~
+
+### Makefile ends here
diff --git a/biblio/bibtex/contrib/dk-bib/README b/biblio/bibtex/contrib/dk-bib/README
new file mode 100644
index 0000000000..049b5a80ed
--- /dev/null
+++ b/biblio/bibtex/contrib/dk-bib/README
@@ -0,0 +1,9 @@
+Dk-bib is a translation of the four standard BibTeX style files
+(abbrv, alpha, plain and unsrt) and the apalike style file into
+Danish.
+
+The files have been extended with URL, ISBN, ISSN, annote and printing
+fields which can be enabled through a LaTeX style file.
+
+Dk-bib also comes with a couple of Danish sorting order files for
+BibTeX8.
diff --git a/biblio/bibtex/contrib/dk-bib/cp850-dk.csf b/biblio/bibtex/contrib/dk-bib/cp850-dk.csf
new file mode 100644
index 0000000000..263786360b
--- /dev/null
+++ b/biblio/bibtex/contrib/dk-bib/cp850-dk.csf
@@ -0,0 +1,106 @@
+%%% cp850-dk.csf --- Danish CP 850 sorting order file for bibtex8
+
+%% Copyright (C) 2005 Arne Jorgensen
+
+%% Author: Arne Jorgensen <arne.jorgensen@tug.dk>
+%% Version: $Id: cp850-dk.csf 71 2005-08-05 22:44:05Z arne $
+
+%% This file is free software; you can redistribute it and/or modify
+%% it under the terms of the GNU General Public License as published
+%% by the Free Software Foundation; either version 2 of the License,
+%% or (at your option) any later version.
+
+%% This file is distributed in the hope that it will be useful, but
+%% WITHOUT ANY WARRANTY; without even the implied warranty of
+%% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+%% General Public License for more details.
+
+%% You should have received a copy of the GNU General Public License
+%% along with this file; if not, write to the Free Software
+%% Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%% 02110-1301, USA.
+
+%%% Commentary:
+
+%%% Code:
+
+%%% Character Set:
+
+\lowupcase{
+ % \`{a} \`{A}
+ % \'{a} \'{A}
+ % \^{a} \^{A}
+ % \~{a} \~{A}
+ % \"{a} \"{A}
+ % \ring{a} \ring{A}
+ % \ae \AE
+ % \c{c} \c{C}
+ % \`{e} \`{E}
+ % \'{e} \'{E}
+ % \^{e} \^{E}
+ % \"{e} \"{E}
+ % \`{\i} \`{I}
+ % \'{\i} \'{I}
+ % \^{\i} \^{I}
+ % \"{\i} \"{I}
+ % eth ETH
+ % \~{n} \~{N}
+ % \`{o} \`{O}
+ % \'{o} \'{O}
+ % \^{o} \^{O}
+ % \~{o} \~{O}
+ % \"{o} \"{O}
+ % \o \O
+ % \`{u} \`{U}
+ % \'{u} \'{U}
+ % \^{u} \^{U}
+ % \"{u} \"{U}
+ % \'{y} \'{Y}
+ % thorn THORN
+}
+
+%%% Sorting Order:
+
+%% Notice that / (THORN / thorn) will be sorted as T / t and not
+%% as Th / th as it should be. You are probably better off be putting
+%% \TH / \th into your .bib file.
+
+\order{
+ 0-9 % 0-9
+ A a % A \'{A} \`{A} \^{A} \~{A} a \'{a} \`{a} \^{a} \~{a}
+ B b % B b
+ C c % C \c{C} c \c{c}
+ D d % D ETH d eth
+ E e % E \'{E} \`{E} \"{E} \^{E} e \'{e} \`{e} \"{e} \^{e}
+ F f % F f
+ G g % G g
+ H h % H h
+ I i % I \'{I} \'{I} \"{I} \^{I} i \'{\i} \`{\i} \"{\i} \^{\i}
+ J j % J j
+ K k % K k
+ L l % L l
+ M m % M m
+ N n % N \~{N} n \~{n}
+ O o % O \'{O} \`{O} \^{O} \~{O} o \'{o} \`{o} \^{o} \~{o}
+ P p % P p
+ Q q % Q q
+ R r % R r
+ S s % S s
+ T t % T THORN t thorn
+ U u % U \'{U} \`{U} \^{U} u \'{u} \`{u} \^{u}
+ V v % V v
+ W w % W w
+ X x % X x
+ Y y % Y \"{U} \'{Y} y \"{u} \'{y} \"{y}
+ Z z % Z z
+ % \AE \"{A} \ae \"{a}
+ % \O \"{O} \o \"{o}
+ % \ring{A} \ring{a}
+}
+
+%% Local Variables:
+%% coding: cp850
+%% comment-start: "%% "
+%% End:
+
+%%% cp850-dk.csf ends here
diff --git a/biblio/bibtex/contrib/dk-bib/dk-abbrv.bst b/biblio/bibtex/contrib/dk-bib/dk-abbrv.bst
new file mode 100644
index 0000000000..17a5c410fd
--- /dev/null
+++ b/biblio/bibtex/contrib/dk-bib/dk-abbrv.bst
@@ -0,0 +1,1301 @@
+% BibTeX standard bibliography style `abbrv'
+ % version 0.99a for BibTeX versions 0.99a or later, LaTeX version 2.09.
+ % Copyright (C) 1985, all rights reserved.
+ % Copying of this file is authorized only if either
+ % (1) you make absolutely no changes to your copy, including name, or
+ % (2) if you do make changes, you name it something other than
+ % btxbst.doc, plain.bst, unsrt.bst, alpha.bst, and abbrv.bst.
+ % This restriction helps ensure that all standard styles are identical.
+ % The file btxbst.doc has the documentation for this style.
+
+% "Translated" into Norwegian by dag@ifi.uio.no, July 1997.
+% Now called `norabbrv'.
+% Added field "isbn" and "issn". dag@ifi.uio.no, April 2001.
+% Translated into Danish by arne.jorgensen@tug.dk, June 2001.
+% Now called `dk-abbrv'.
+% This is dk-bib, Version 0.6 ($Id: dk-abbrv.bst 92 2006-05-21 21:18:10Z arne $)
+
+ENTRY
+ { address
+ author
+ booktitle
+ chapter
+ edition
+ printing
+ editor
+ howpublished
+ institution
+ isbn
+ issn
+ url
+ annote
+ journal
+ key
+ month
+ note
+ number
+ organization
+ pages
+ publisher
+ school
+ series
+ title
+ type
+ volume
+ year
+ }
+ {}
+ { label }
+
+INTEGERS { output.state before.all mid.sentence after.sentence after.block }
+
+FUNCTION {init.state.consts}
+{ #0 'before.all :=
+ #1 'mid.sentence :=
+ #2 'after.sentence :=
+ #3 'after.block :=
+}
+
+STRINGS { s t }
+
+FUNCTION {output.nonnull}
+{ 's :=
+ output.state mid.sentence =
+ { ", " * write$ }
+ { output.state after.block =
+ { add.period$ write$
+ newline$
+ "\newblock " write$
+ }
+ { output.state before.all =
+ 'write$
+ { add.period$ " " * write$ }
+ if$
+ }
+ if$
+ mid.sentence 'output.state :=
+ }
+ if$
+ s
+}
+
+FUNCTION {output}
+{ duplicate$ empty$
+ 'pop$
+ 'output.nonnull
+ if$
+}
+
+FUNCTION {output.check}
+{ 't :=
+ duplicate$ empty$
+ { pop$ "empty " t * " in " * cite$ * warning$ }
+ 'output.nonnull
+ if$
+}
+
+FUNCTION {output.bibitem}
+{ newline$
+ "\bibitem{" write$
+ cite$ write$
+ "}" write$
+ newline$
+ ""
+ before.all 'output.state :=
+}
+
+FUNCTION {output.annote}
+{ annote empty$
+ 'skip$
+ { "\dkbibannote{" cite$ * "}{" * annote add.period$ * "}" *
+ write$ newline$ }
+ if$
+}
+
+FUNCTION {fin.entry}
+{ add.period$
+ write$
+ newline$
+ output.annote
+}
+
+FUNCTION {new.block}
+{ output.state before.all =
+ 'skip$
+ { after.block 'output.state := }
+ if$
+}
+
+FUNCTION {output.isbn.issn}
+{ isbn empty$
+ 'skip$
+ { new.block "\dkbibisbn{" isbn * "}" * output }
+ if$
+ issn empty$
+ 'skip$
+ { new.block "\dkbibissn{" issn * "}" * output }
+ if$
+}
+
+FUNCTION {output.url}
+{ url empty$
+ 'skip$
+ { new.block "\dkbiburl{" url * "}" * output }
+ if$
+}
+
+FUNCTION {new.sentence}
+{ output.state after.block =
+ 'skip$
+ { output.state before.all =
+ 'skip$
+ { after.sentence 'output.state := }
+ if$
+ }
+ if$
+}
+
+FUNCTION {not}
+{ { #0 }
+ { #1 }
+ if$
+}
+
+FUNCTION {and}
+{ 'skip$
+ { pop$ #0 }
+ if$
+}
+
+FUNCTION {or}
+{ { pop$ #1 }
+ 'skip$
+ if$
+}
+
+FUNCTION {new.block.checka}
+{ empty$
+ 'skip$
+ 'new.block
+ if$
+}
+
+FUNCTION {new.block.checkb}
+{ empty$
+ swap$ empty$
+ and
+ 'skip$
+ 'new.block
+ if$
+}
+
+FUNCTION {new.sentence.checka}
+{ empty$
+ 'skip$
+ 'new.sentence
+ if$
+}
+
+FUNCTION {new.sentence.checkb}
+{ empty$
+ swap$ empty$
+ and
+ 'skip$
+ 'new.sentence
+ if$
+}
+
+FUNCTION {field.or.null}
+{ duplicate$ empty$
+ { pop$ "" }
+ 'skip$
+ if$
+}
+
+FUNCTION {emphasize}
+{ duplicate$ empty$
+ { pop$ "" }
+ { "\emph{" swap$ * "}" * }
+ if$
+}
+
+INTEGERS { nameptr namesleft numnames }
+
+FUNCTION {format.names}
+{ 's :=
+ #1 'nameptr :=
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ { s nameptr "{f.~}{vv }{ll}{~jj}" format.name$ 't :=
+ nameptr #1 >
+ { namesleft #1 >
+ { ", " * t * }
+ { t "others" =
+ { " et~al." * }
+ { " og " * t * }
+ if$
+ }
+ if$
+ }
+ 't
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+}
+
+FUNCTION {format.authors}
+{ author empty$
+ { "" }
+ { author format.names }
+ if$
+}
+
+FUNCTION {format.editors}
+{ editor empty$
+ { "" }
+ { editor format.names
+ editor num.names$ #1 >
+ { ", redakt\o rer" * }
+ { ", redakt\o r" * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.title}
+{ title empty$
+ { "" }
+ { title "t" change.case$ }
+ if$
+}
+
+FUNCTION {n.dashify}
+{ 't :=
+ ""
+ { t empty$ not }
+ { t #1 #1 substring$ "-" =
+ { "\dkbibdash" *
+ t #2 global.max$ substring$ 't :=
+ { t #1 #1 substring$ "-" = }
+ { t #2 global.max$ substring$ 't := }
+ while$
+ t #1 #1 substring$ " " =
+ { "{}" * }
+ { " " * }
+ if$
+ }
+ { t #1 #1 substring$ *
+ t #2 global.max$ substring$ 't :=
+ }
+ if$
+ }
+ while$
+}
+
+FUNCTION {format.date}
+{ year empty$
+ { month empty$
+ { "" }
+ { "there's a month but no year in " cite$ * warning$
+ month
+ }
+ if$
+ }
+ { month empty$
+ 'year
+ { month " " * year * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.btitle}
+{ title emphasize
+}
+
+FUNCTION {tie.or.space.connect}
+{ duplicate$ text.length$ #3 <
+ { "~" }
+ { " " }
+ if$
+ swap$ * *
+}
+
+FUNCTION {either.or.check}
+{ empty$
+ 'pop$
+ { "can't use both " swap$ * " fields in " * cite$ * warning$ }
+ if$
+}
+
+FUNCTION {format.bvolume}
+{ volume empty$
+ { "" }
+ { "bind" volume tie.or.space.connect
+ series empty$
+ 'skip$
+ { " af " * series emphasize * }
+ if$
+ "volume and number" number either.or.check
+ }
+ if$
+}
+
+FUNCTION {format.number.series}
+{ volume empty$
+ { number empty$
+ { series field.or.null }
+ { output.state mid.sentence =
+ { "nr." }
+ { "Nr." }
+ if$
+ number tie.or.space.connect
+ series empty$
+ { "there's a number but no series in " cite$ * warning$ }
+ { " i " * series * }
+ if$
+ }
+ if$
+ }
+ { "" }
+ if$
+}
+
+FUNCTION {ordinal.translate.i}
+{ duplicate$ "l" change.case$ "first" =
+ {pop$ "1"}
+ {skip$}
+ if$
+ duplicate$ "l" change.case$ "second" =
+ {pop$ "2"}
+ {skip$}
+ if$
+ duplicate$ "l" change.case$ "third" =
+ {pop$ "3"}
+ {skip$}
+ if$
+ duplicate$ "l" change.case$ "fourth" =
+ {pop$ "4"}
+ {skip$}
+ if$
+ duplicate$ "l" change.case$ "fifth" =
+ {pop$ "5"}
+ {skip$}
+ if$
+}
+
+FUNCTION {ordinal.translate.ii}
+{ duplicate$ "l" change.case$ "sixth" =
+ {pop$ "6"}
+ {skip$}
+ if$
+ duplicate$ "l" change.case$ "seventh" =
+ {pop$ "7"}
+ {skip$}
+ if$
+ duplicate$ "l" change.case$ "eighth" =
+ {pop$ "8"}
+ {skip$}
+ if$
+ duplicate$ "l" change.case$ "ninth" =
+ {pop$ "9"}
+ {skip$}
+ if$
+ duplicate$ "l" change.case$ "tenth" =
+ {pop$ "10"}
+ {skip$}
+ if$
+}
+
+FUNCTION {ordinal.translate.iii}
+{ duplicate$ "l" change.case$ "eleventh" =
+ {pop$ "11"}
+ {skip$}
+ if$
+ duplicate$ "l" change.case$ "twelfth" =
+ {pop$ "12"}
+ {skip$}
+ if$
+ duplicate$ "l" change.case$ "thirteenth" =
+ {pop$ "13"}
+ {skip$}
+ if$
+ duplicate$ "l" change.case$ "fourteenth" =
+ {pop$ "14"}
+ {skip$}
+ if$
+ duplicate$ "l" change.case$ "fifteenth" =
+ {pop$ "15"}
+ {skip$}
+ if$
+}
+
+FUNCTION {ordinal.translate.iv}
+{ duplicate$ "l" change.case$ "sixteenth" =
+ {pop$ "16"}
+ {skip$}
+ if$
+ duplicate$ "l" change.case$ "seventeenth" =
+ {pop$ "17"}
+ {skip$}
+ if$
+ duplicate$ "l" change.case$ "eighteenth" =
+ {pop$ "18"}
+ {skip$}
+ if$
+ duplicate$ "l" change.case$ "nineteenth" =
+ {pop$ "19"}
+ {skip$}
+ if$
+ duplicate$ "l" change.case$ "twentieth" =
+ {pop$ "20"}
+ {skip$}
+ if$
+}
+
+FUNCTION {ordinal.translate}
+{ ordinal.translate.i
+ ordinal.translate.ii
+ ordinal.translate.iii
+ ordinal.translate.iv
+}
+
+FUNCTION {format.edition}
+{ edition empty$
+ printing empty$
+ +
+ #2
+ =
+ { "" }
+ { output.state mid.sentence =
+ { "\dkbibedition{" }
+ { "\dkbibEdition{" }
+ if$
+ edition empty$
+ { "" }
+ { edition ordinal.translate
+ duplicate$ "l" change.case$
+ duplicate$ "u" change.case$
+ =
+ { purify$ }
+ { output.state mid.sentence =
+ { skip$ }
+ { "u" change.case$
+ "t" change.case$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+ * "}{" *
+ printing empty$
+ { "" }
+ { printing ordinal.translate
+ duplicate$ "l" change.case$
+ duplicate$ "u" change.case$
+ =
+ { purify$ }
+ { skip$ }
+ if$
+ }
+ if$
+ * "}" *
+ }
+ if$
+}
+
+INTEGERS { multiresult }
+
+FUNCTION {multi.page.check}
+{ 't :=
+ #0 'multiresult :=
+ { multiresult not
+ t empty$ not
+ and
+ }
+ { t #1 #1 substring$
+ duplicate$ "-" =
+ swap$ duplicate$ "," =
+ swap$ "+" =
+ or or
+ { #1 'multiresult := }
+ { t #2 global.max$ substring$ 't := }
+ if$
+ }
+ while$
+ multiresult
+}
+
+FUNCTION {format.pages}
+{ pages empty$
+ { "" }
+ { pages multi.page.check
+ { "side" pages n.dashify tie.or.space.connect }
+ { "side" pages tie.or.space.connect }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.vol.num.pages}
+{ volume field.or.null
+ number empty$
+ 'skip$
+ { "(" number * ")" * *
+ volume empty$
+ { "there's a number but no volume in " cite$ * warning$ }
+ 'skip$
+ if$
+ }
+ if$
+ pages empty$
+ 'skip$
+ { duplicate$ empty$
+ { pop$ format.pages }
+ { ":" * pages n.dashify * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.chapter.pages}
+{ chapter empty$
+ 'format.pages
+ { type empty$
+ { "kapitel" }
+ { type "l" change.case$ }
+ if$
+ chapter tie.or.space.connect
+ pages empty$
+ 'skip$
+ { ", " * format.pages * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.in.ed.booktitle}
+{ booktitle empty$
+ { "" }
+ { editor empty$
+ { "I " booktitle emphasize * }
+ { "I " format.editors * ", " * booktitle emphasize * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {empty.misc.check}
+{ author empty$ title empty$ howpublished empty$
+ month empty$ year empty$ note empty$ isbn empty$ issn empty$
+ and and and and and and and
+ key empty$ not and
+ { "all relevant fields are empty in " cite$ * warning$ }
+ 'skip$
+ if$
+}
+
+FUNCTION {format.thesis.type}
+{ type empty$
+ 'skip$
+ { pop$
+ type "t" change.case$
+ }
+ if$
+}
+
+FUNCTION {format.tr.number}
+{ type empty$
+ { "Rapport" }
+ 'type
+ if$
+ number empty$
+ { "t" change.case$ }
+ { number tie.or.space.connect }
+ if$
+}
+
+FUNCTION {format.article.crossref}
+{ key empty$
+ { journal empty$
+ { "need key or journal for " cite$ * " to crossref " * crossref *
+ warning$
+ ""
+ }
+ { "I \emph{" journal * "}" * }
+ if$
+ }
+ { "I " key * }
+ if$
+ " \cite{" * crossref * "}" *
+}
+
+FUNCTION {format.crossref.editor}
+{ editor #1 "{vv }{ll}" format.name$
+ editor num.names$ duplicate$
+ #2 >
+ { pop$ " et~al." * }
+ { #2 <
+ 'skip$
+ { editor #2 "{ff~}{vv }{ll}{~jj}" format.name$ "others" =
+ { " et~al." * }
+ { " og " * editor #2 "{vv }{ll}" format.name$ * }
+ if$
+ }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.book.crossref}
+{ volume empty$
+ { "empty volume in " cite$ * "'s crossref of " * crossref * warning$
+ "In "
+ }
+ { "Bind" volume tie.or.space.connect
+ " af " *
+ }
+ if$
+ editor empty$
+ editor field.or.null author field.or.null =
+ or
+ { key empty$
+ { series empty$
+ { "need editor, key, or series for " cite$ * " to crossref " *
+ crossref * warning$
+ "" *
+ }
+ { "\emph{" * series * "}" * }
+ if$
+ }
+ { key * }
+ if$
+ }
+ { format.crossref.editor * }
+ if$
+ " \cite{" * crossref * "}" *
+}
+
+FUNCTION {format.incoll.inproc.crossref}
+{ editor empty$
+ editor field.or.null author field.or.null =
+ or
+ { key empty$
+ { booktitle empty$
+ { "need editor, key, or booktitle for " cite$ * " to crossref " *
+ crossref * warning$
+ ""
+ }
+ { "I \emph{" booktitle * "}" * }
+ if$
+ }
+ { "I " key * }
+ if$
+ }
+ { "I " format.crossref.editor * }
+ if$
+ " \cite{" * crossref * "}" *
+}
+
+FUNCTION {article}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.title "title" output.check
+ new.block
+ crossref missing$
+ { journal emphasize "journal" output.check
+ format.vol.num.pages output
+ format.date "year" output.check
+ }
+ { format.article.crossref output.nonnull
+ format.pages output
+ }
+ if$
+ new.block
+ note output
+ output.isbn.issn
+ output.url
+ fin.entry
+}
+
+FUNCTION {book}
+{ output.bibitem
+ author empty$
+ { format.editors "author and editor" output.check }
+ { format.authors output.nonnull
+ crossref missing$
+ { "author and editor" editor either.or.check }
+ 'skip$
+ if$
+ }
+ if$
+ new.block
+ format.btitle "title" output.check
+ crossref missing$
+ { format.bvolume output
+ new.block
+ format.number.series output
+ new.sentence
+ publisher "publisher" output.check
+ address output
+ }
+ { new.block
+ format.book.crossref output.nonnull
+ }
+ if$
+ format.edition output
+ format.date "year" output.check
+ new.block
+ note output
+ output.isbn.issn
+ output.url
+ fin.entry
+}
+
+FUNCTION {booklet}
+{ output.bibitem
+ format.authors output
+ new.block
+ format.title "title" output.check
+ howpublished address new.block.checkb
+ howpublished output
+ address output
+ format.date output
+ new.block
+ note output
+ output.isbn.issn
+ output.url
+ fin.entry
+}
+
+FUNCTION {inbook}
+{ output.bibitem
+ author empty$
+ { format.editors "author and editor" output.check }
+ { format.authors output.nonnull
+ crossref missing$
+ { "author and editor" editor either.or.check }
+ 'skip$
+ if$
+ }
+ if$
+ new.block
+ format.btitle "title" output.check
+ crossref missing$
+ { format.bvolume output
+ format.chapter.pages "chapter and pages" output.check
+ new.block
+ format.number.series output
+ new.sentence
+ publisher "publisher" output.check
+ address output
+ }
+ { format.chapter.pages "chapter and pages" output.check
+ new.block
+ format.book.crossref output.nonnull
+ }
+ if$
+ format.edition output
+ format.date "year" output.check
+ new.block
+ note output
+ output.isbn.issn
+ output.url
+ fin.entry
+}
+
+FUNCTION {incollection}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.title "title" output.check
+ new.block
+ crossref missing$
+ { format.in.ed.booktitle "booktitle" output.check
+ format.bvolume output
+ format.number.series output
+ format.chapter.pages output
+ new.sentence
+ publisher "publisher" output.check
+ address output
+ format.edition output
+ format.date "year" output.check
+ }
+ { format.incoll.inproc.crossref output.nonnull
+ format.chapter.pages output
+ }
+ if$
+ new.block
+ note output
+ output.isbn.issn
+ output.url
+ fin.entry
+}
+
+FUNCTION {inproceedings}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.title "title" output.check
+ new.block
+ crossref missing$
+ { format.in.ed.booktitle "booktitle" output.check
+ format.bvolume output
+ format.number.series output
+ format.pages output
+ address empty$
+ { organization publisher new.sentence.checkb
+ organization output
+ publisher output
+ format.date "year" output.check
+ }
+ { address output.nonnull
+ format.date "year" output.check
+ new.sentence
+ organization output
+ publisher output
+ }
+ if$
+ }
+ { format.incoll.inproc.crossref output.nonnull
+ format.pages output
+ }
+ if$
+ new.block
+ note output
+ output.isbn.issn
+ output.url
+ fin.entry
+}
+
+FUNCTION {conference} { inproceedings }
+
+FUNCTION {manual}
+{ output.bibitem
+ author empty$
+ { organization empty$
+ 'skip$
+ { organization output.nonnull
+ address output
+ }
+ if$
+ }
+ { format.authors output.nonnull }
+ if$
+ new.block
+ format.btitle "title" output.check
+ author empty$
+ { organization empty$
+ { address new.block.checka
+ address output
+ }
+ 'skip$
+ if$
+ }
+ { organization address new.block.checkb
+ organization output
+ address output
+ }
+ if$
+ format.edition output
+ format.date output
+ new.block
+ note output
+ output.isbn.issn
+ output.url
+ fin.entry
+}
+
+FUNCTION {mastersthesis}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.title "title" output.check
+ new.block
+ "Specialeafhandling" format.thesis.type output.nonnull
+ school "school" output.check
+ address output
+ format.date "year" output.check
+ new.block
+ note output
+ output.isbn.issn
+ output.url
+ fin.entry
+}
+
+FUNCTION {misc}
+{ output.bibitem
+ format.authors output
+ title howpublished new.block.checkb
+ format.title output
+ howpublished new.block.checka
+ howpublished output
+ format.date output
+ new.block
+ note output
+ output.isbn.issn
+ output.url
+ fin.entry
+ empty.misc.check
+}
+
+FUNCTION {phdthesis}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.btitle "title" output.check
+ new.block
+ "Ph.d.-afhandling" format.thesis.type output.nonnull
+ school "school" output.check
+ address output
+ format.date "year" output.check
+ new.block
+ note output
+ output.isbn.issn
+ output.url
+ fin.entry
+}
+
+FUNCTION {proceedings}
+{ output.bibitem
+ editor empty$
+ { organization output }
+ { format.editors output.nonnull }
+ if$
+ new.block
+ format.btitle "title" output.check
+ format.bvolume output
+ format.number.series output
+ address empty$
+ { editor empty$
+ { publisher new.sentence.checka }
+ { organization publisher new.sentence.checkb
+ organization output
+ }
+ if$
+ publisher output
+ format.date "year" output.check
+ }
+ { address output.nonnull
+ format.date "year" output.check
+ new.sentence
+ editor empty$
+ 'skip$
+ { organization output }
+ if$
+ publisher output
+ }
+ if$
+ new.block
+ note output
+ output.isbn.issn
+ output.url
+ fin.entry
+}
+
+FUNCTION {techreport}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.title "title" output.check
+ new.block
+ format.tr.number output.nonnull
+ institution "institution" output.check
+ address output
+ format.date "year" output.check
+ new.block
+ note output
+ output.isbn.issn
+ output.url
+ fin.entry
+}
+
+FUNCTION {unpublished}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.title "title" output.check
+ new.block
+ note "note" output.check
+ format.date output
+ output.isbn.issn
+ output.url
+ fin.entry
+}
+
+FUNCTION {default.type} { misc }
+
+MACRO {jan} {"jan."}
+
+MACRO {feb} {"feb."}
+
+MACRO {mar} {"mar."}
+
+MACRO {apr} {"apr."}
+
+MACRO {may} {"maj"}
+
+MACRO {jun} {"jun."}
+
+MACRO {jul} {"jul."}
+
+MACRO {aug} {"aug."}
+
+MACRO {sep} {"sep."}
+
+MACRO {oct} {"okt."}
+
+MACRO {nov} {"nov."}
+
+MACRO {dec} {"dec."}
+
+MACRO {acmcs} {"ACM Comput. Surv."}
+
+MACRO {acta} {"Acta Inf."}
+
+MACRO {cacm} {"Commun. ACM"}
+
+MACRO {ibmjrd} {"IBM J. Res. Dev."}
+
+MACRO {ibmsj} {"IBM Syst.~J."}
+
+MACRO {ieeese} {"IEEE Trans. Softw. Eng."}
+
+MACRO {ieeetc} {"IEEE Trans. Comput."}
+
+MACRO {ieeetcad}
+ {"IEEE Trans. Comput.-Aided Design Integrated Circuits"}
+
+MACRO {ipl} {"Inf. Process. Lett."}
+
+MACRO {jacm} {"J.~ACM"}
+
+MACRO {jcss} {"J.~Comput. Syst. Sci."}
+
+MACRO {scp} {"Sci. Comput. Programming"}
+
+MACRO {sicomp} {"SIAM J. Comput."}
+
+MACRO {tocs} {"ACM Trans. Comput. Syst."}
+
+MACRO {tods} {"ACM Trans. Database Syst."}
+
+MACRO {tog} {"ACM Trans. Gr."}
+
+MACRO {toms} {"ACM Trans. Math. Softw."}
+
+MACRO {toois} {"ACM Trans. Office Inf. Syst."}
+
+MACRO {toplas} {"ACM Trans. Prog. Lang. Syst."}
+
+MACRO {tcs} {"Theoretical Comput. Sci."}
+
+READ
+
+FUNCTION {sortify}
+{ purify$
+ "l" change.case$
+}
+
+INTEGERS { len }
+
+FUNCTION {chop.word}
+{ 's :=
+ 'len :=
+ s #1 len substring$ =
+ { s len #1 + global.max$ substring$ }
+ 's
+ if$
+}
+
+FUNCTION {sort.format.names}
+{ 's :=
+ #1 'nameptr :=
+ ""
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ { nameptr #1 >
+ { " " * }
+ 'skip$
+ if$
+ s nameptr "{ll{ }}{ f{ }}{ vv{ }}{ jj{ }}" format.name$ 't :=
+ nameptr numnames = t "others" = and
+ { "et al" * }
+ { t sortify * }
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+}
+
+FUNCTION {sort.format.title}
+{ 't :=
+ "A " #2
+ "An " #3
+ "The " #4 t chop.word
+ chop.word
+ chop.word
+ sortify
+ #1 global.max$ substring$
+}
+
+FUNCTION {author.sort}
+{ author empty$
+ { key empty$
+ { "to sort, need author or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { author sort.format.names }
+ if$
+}
+
+FUNCTION {author.editor.sort}
+{ author empty$
+ { editor empty$
+ { key empty$
+ { "to sort, need author, editor, or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { editor sort.format.names }
+ if$
+ }
+ { author sort.format.names }
+ if$
+}
+
+FUNCTION {author.organization.sort}
+{ author empty$
+ { organization empty$
+ { key empty$
+ { "to sort, need author, organization, or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { "The " #4 organization chop.word sortify }
+ if$
+ }
+ { author sort.format.names }
+ if$
+}
+
+FUNCTION {editor.organization.sort}
+{ editor empty$
+ { organization empty$
+ { key empty$
+ { "to sort, need editor, organization, or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { organization sortify }
+ if$
+ }
+ { editor sort.format.names }
+ if$
+}
+
+FUNCTION {presort}
+{ type$ "book" =
+ type$ "inbook" =
+ or
+ 'author.editor.sort
+ { type$ "proceedings" =
+ 'editor.organization.sort
+ { type$ "manual" =
+ 'author.organization.sort
+ 'author.sort
+ if$
+ }
+ if$
+ }
+ if$
+ " "
+ *
+ year field.or.null sortify
+ *
+ " "
+ *
+ title field.or.null
+ sort.format.title
+ *
+ #1 entry.max$ substring$
+ 'sort.key$ :=
+}
+
+ITERATE {presort}
+
+SORT
+
+STRINGS { longest.label }
+
+INTEGERS { number.label longest.label.width }
+
+FUNCTION {initialize.longest.label}
+{ "" 'longest.label :=
+ #1 'number.label :=
+ #0 'longest.label.width :=
+}
+
+FUNCTION {longest.label.pass}
+{ number.label int.to.str$ 'label :=
+ number.label #1 + 'number.label :=
+ label width$ longest.label.width >
+ { label 'longest.label :=
+ label width$ 'longest.label.width :=
+ }
+ 'skip$
+ if$
+}
+
+EXECUTE {initialize.longest.label}
+
+ITERATE {longest.label.pass}
+
+FUNCTION {begin.bib}
+{ preamble$ empty$
+ 'skip$
+ { preamble$ write$ newline$ }
+ if$
+ "\begin{thebibliography}{" longest.label * "}" * write$ newline$
+ "\makeatletter" write$ newline$
+ "\@tfor\dkbib@reserved@a:=0123456789\do{%" write$ newline$
+ " \expandafter\sfcode\expandafter`\dkbib@reserved@a=1007}" write$ newline$
+ "\providecommand{\dkbib@addperiod}{\ifnum\spacefactor=1007.\fi}" write$ newline$
+ "\providecommand{\dkbibedition}[2]{#1\dkbib@addperiod~udgave}" write$ newline$
+ "\providecommand{\dkbibEdition}[2]{#1\dkbib@addperiod~udgave}" write$ newline$
+ "\providecommand{\dkbibisbn}[1]{\unskip\@gobble}" write$ newline$
+ "\providecommand{\dkbibissn}[1]{\unskip\@gobble}" write$ newline$
+ "\providecommand{\dkbiburl}[1]{\unskip\@gobble}" write$ newline$
+ "\providecommand{\dkbibannote}[2]{\unskip}" write$ newline$
+ "\providecommand{\dkbibdash}{\hbox{-}\penalty\@m}" write$ newline$
+ "\makeatother" write$ newline$
+}
+
+EXECUTE {begin.bib}
+
+EXECUTE {init.state.consts}
+
+ITERATE {call.type$}
+
+FUNCTION {end.bib}
+{ newline$
+ "\end{thebibliography}" write$ newline$
+}
+
+EXECUTE {end.bib}
diff --git a/biblio/bibtex/contrib/dk-bib/dk-alpha.bst b/biblio/bibtex/contrib/dk-bib/dk-alpha.bst
new file mode 100644
index 0000000000..20ccee3b2a
--- /dev/null
+++ b/biblio/bibtex/contrib/dk-bib/dk-alpha.bst
@@ -0,0 +1,1455 @@
+% BibTeX standard bibliography style `alpha'
+ % version 0.99a for BibTeX versions 0.99a or later, LaTeX version 2.09.
+ % Copyright (C) 1985, all rights reserved.
+ % Copying of this file is authorized only if either
+ % (1) you make absolutely no changes to your copy, including name, or
+ % (2) if you do make changes, you name it something other than
+ % btxbst.doc, plain.bst, unsrt.bst, alpha.bst, and abbrv.bst.
+ % This restriction helps ensure that all standard styles are identical.
+ % The file btxbst.doc has the documentation for this style.
+
+% "Translated" into Norwegian by dag@ifi.uio.no, January 1997.
+% Now called `noralpha'.
+% Added field "isbn" and "issn". dag@ifi.uio.no, April 2001.
+% Translated into Danish by arne.jorgensen@tug.dk, June 2001.
+% Now called `dk-alpha'.
+% This is dk-bib, Version 0.6 ($Id: dk-alpha.bst 92 2006-05-21 21:18:10Z arne $)
+
+ENTRY
+ { address
+ author
+ booktitle
+ chapter
+ edition
+ printing
+ editor
+ howpublished
+ institution
+ isbn
+ issn
+ url
+ annote
+ journal
+ key
+ month
+ note
+ number
+ organization
+ pages
+ publisher
+ school
+ series
+ title
+ type
+ volume
+ year
+ }
+ {}
+ { label extra.label sort.label }
+
+INTEGERS { output.state before.all mid.sentence after.sentence after.block }
+
+FUNCTION {init.state.consts}
+{ #0 'before.all :=
+ #1 'mid.sentence :=
+ #2 'after.sentence :=
+ #3 'after.block :=
+}
+
+STRINGS { s t }
+
+FUNCTION {output.nonnull}
+{ 's :=
+ output.state mid.sentence =
+ { ", " * write$ }
+ { output.state after.block =
+ { add.period$ write$
+ newline$
+ "\newblock " write$
+ }
+ { output.state before.all =
+ 'write$
+ { add.period$ " " * write$ }
+ if$
+ }
+ if$
+ mid.sentence 'output.state :=
+ }
+ if$
+ s
+}
+
+FUNCTION {output}
+{ duplicate$ empty$
+ 'pop$
+ 'output.nonnull
+ if$
+}
+
+FUNCTION {output.check}
+{ 't :=
+ duplicate$ empty$
+ { pop$ "empty " t * " in " * cite$ * warning$ }
+ 'output.nonnull
+ if$
+}
+
+FUNCTION {output.bibitem}
+{ newline$
+ "\bibitem[" write$
+ label write$
+ "]{" write$
+ cite$ write$
+ "}" write$
+ newline$
+ ""
+ before.all 'output.state :=
+}
+
+FUNCTION {output.annote}
+{ annote empty$
+ 'skip$
+ { "\dkbibannote{" cite$ * "}{" * annote add.period$ * "}" *
+ write$ newline$ }
+ if$
+}
+
+FUNCTION {fin.entry}
+{ add.period$
+ write$
+ newline$
+ output.annote
+}
+
+FUNCTION {new.block}
+{ output.state before.all =
+ 'skip$
+ { after.block 'output.state := }
+ if$
+}
+
+FUNCTION {output.isbn.issn}
+{ isbn empty$
+ 'skip$
+ { new.block "\dkbibisbn{" isbn * "}" * output }
+ if$
+ issn empty$
+ 'skip$
+ { new.block "\dkbibissn{" issn * "}" * output }
+ if$
+}
+
+FUNCTION {output.url}
+{ url empty$
+ 'skip$
+ { new.block "\dkbiburl{" url * "}" * output }
+ if$
+}
+
+FUNCTION {new.sentence}
+{ output.state after.block =
+ 'skip$
+ { output.state before.all =
+ 'skip$
+ { after.sentence 'output.state := }
+ if$
+ }
+ if$
+}
+
+FUNCTION {not}
+{ { #0 }
+ { #1 }
+ if$
+}
+
+FUNCTION {and}
+{ 'skip$
+ { pop$ #0 }
+ if$
+}
+
+FUNCTION {or}
+{ { pop$ #1 }
+ 'skip$
+ if$
+}
+
+FUNCTION {new.block.checka}
+{ empty$
+ 'skip$
+ 'new.block
+ if$
+}
+
+FUNCTION {new.block.checkb}
+{ empty$
+ swap$ empty$
+ and
+ 'skip$
+ 'new.block
+ if$
+}
+
+FUNCTION {new.sentence.checka}
+{ empty$
+ 'skip$
+ 'new.sentence
+ if$
+}
+
+FUNCTION {new.sentence.checkb}
+{ empty$
+ swap$ empty$
+ and
+ 'skip$
+ 'new.sentence
+ if$
+}
+
+FUNCTION {field.or.null}
+{ duplicate$ empty$
+ { pop$ "" }
+ 'skip$
+ if$
+}
+
+FUNCTION {emphasize}
+{ duplicate$ empty$
+ { pop$ "" }
+ { "\emph{" swap$ * "}" * }
+ if$
+}
+
+INTEGERS { nameptr namesleft numnames }
+
+FUNCTION {format.names}
+{ 's :=
+ #1 'nameptr :=
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ { s nameptr "{ff~}{vv }{ll}{~jj}" format.name$ 't :=
+ nameptr #1 >
+ { namesleft #1 >
+ { ", " * t * }
+ { t "others" =
+ { " et~al." * }
+ { " og " * t * }
+ if$
+ }
+ if$
+ }
+ 't
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+}
+
+FUNCTION {format.authors}
+{ author empty$
+ { "" }
+ { author format.names }
+ if$
+}
+
+FUNCTION {format.editors}
+{ editor empty$
+ { "" }
+ { editor format.names
+ editor num.names$ #1 >
+ { ", redakt\o rer" * }
+ { ", redakt\o r" * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.title}
+{ title empty$
+ { "" }
+ { title "t" change.case$ }
+ if$
+}
+
+FUNCTION {n.dashify}
+{ 't :=
+ ""
+ { t empty$ not }
+ { t #1 #1 substring$ "-" =
+ { "\dkbibdash" *
+ t #2 global.max$ substring$ 't :=
+ { t #1 #1 substring$ "-" = }
+ { t #2 global.max$ substring$ 't := }
+ while$
+ t #1 #1 substring$ " " =
+ { "{}" * }
+ { " " * }
+ if$
+ }
+ { t #1 #1 substring$ *
+ t #2 global.max$ substring$ 't :=
+ }
+ if$
+ }
+ while$
+}
+
+FUNCTION {format.date}
+{ year empty$
+ { month empty$
+ { "" }
+ { "there's a month but no year in " cite$ * warning$
+ month
+ }
+ if$
+ }
+ { month empty$
+ 'year
+ { month " " * year * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.btitle}
+{ title emphasize
+}
+
+FUNCTION {tie.or.space.connect}
+{ duplicate$ text.length$ #3 <
+ { "~" }
+ { " " }
+ if$
+ swap$ * *
+}
+
+FUNCTION {either.or.check}
+{ empty$
+ 'pop$
+ { "can't use both " swap$ * " fields in " * cite$ * warning$ }
+ if$
+}
+
+FUNCTION {format.bvolume}
+{ volume empty$
+ { "" }
+ { "bind" volume tie.or.space.connect
+ series empty$
+ 'skip$
+ { " af " * series emphasize * }
+ if$
+ "volume and number" number either.or.check
+ }
+ if$
+}
+
+FUNCTION {format.number.series}
+{ volume empty$
+ { number empty$
+ { series field.or.null }
+ { output.state mid.sentence =
+ { "nr." }
+ { "Nr." }
+ if$
+ number tie.or.space.connect
+ series empty$
+ { "there's a number but no series in " cite$ * warning$ }
+ { " i " * series * }
+ if$
+ }
+ if$
+ }
+ { "" }
+ if$
+}
+
+FUNCTION {ordinal.translate.i}
+{ duplicate$ "l" change.case$ "first" =
+ {pop$ "1"}
+ {skip$}
+ if$
+ duplicate$ "l" change.case$ "second" =
+ {pop$ "2"}
+ {skip$}
+ if$
+ duplicate$ "l" change.case$ "third" =
+ {pop$ "3"}
+ {skip$}
+ if$
+ duplicate$ "l" change.case$ "fourth" =
+ {pop$ "4"}
+ {skip$}
+ if$
+ duplicate$ "l" change.case$ "fifth" =
+ {pop$ "5"}
+ {skip$}
+ if$
+}
+
+FUNCTION {ordinal.translate.ii}
+{ duplicate$ "l" change.case$ "sixth" =
+ {pop$ "6"}
+ {skip$}
+ if$
+ duplicate$ "l" change.case$ "seventh" =
+ {pop$ "7"}
+ {skip$}
+ if$
+ duplicate$ "l" change.case$ "eighth" =
+ {pop$ "8"}
+ {skip$}
+ if$
+ duplicate$ "l" change.case$ "ninth" =
+ {pop$ "9"}
+ {skip$}
+ if$
+ duplicate$ "l" change.case$ "tenth" =
+ {pop$ "10"}
+ {skip$}
+ if$
+}
+
+FUNCTION {ordinal.translate.iii}
+{ duplicate$ "l" change.case$ "eleventh" =
+ {pop$ "11"}
+ {skip$}
+ if$
+ duplicate$ "l" change.case$ "twelfth" =
+ {pop$ "12"}
+ {skip$}
+ if$
+ duplicate$ "l" change.case$ "thirteenth" =
+ {pop$ "13"}
+ {skip$}
+ if$
+ duplicate$ "l" change.case$ "fourteenth" =
+ {pop$ "14"}
+ {skip$}
+ if$
+ duplicate$ "l" change.case$ "fifteenth" =
+ {pop$ "15"}
+ {skip$}
+ if$
+}
+
+FUNCTION {ordinal.translate.iv}
+{ duplicate$ "l" change.case$ "sixteenth" =
+ {pop$ "16"}
+ {skip$}
+ if$
+ duplicate$ "l" change.case$ "seventeenth" =
+ {pop$ "17"}
+ {skip$}
+ if$
+ duplicate$ "l" change.case$ "eighteenth" =
+ {pop$ "18"}
+ {skip$}
+ if$
+ duplicate$ "l" change.case$ "nineteenth" =
+ {pop$ "19"}
+ {skip$}
+ if$
+ duplicate$ "l" change.case$ "twentieth" =
+ {pop$ "20"}
+ {skip$}
+ if$
+}
+
+FUNCTION {ordinal.translate}
+{ ordinal.translate.i
+ ordinal.translate.ii
+ ordinal.translate.iii
+ ordinal.translate.iv
+}
+
+FUNCTION {format.edition}
+{ edition empty$
+ printing empty$
+ +
+ #2
+ =
+ { "" }
+ { output.state mid.sentence =
+ { "\dkbibedition{" }
+ { "\dkbibEdition{" }
+ if$
+ edition empty$
+ { "" }
+ { edition ordinal.translate
+ duplicate$ "l" change.case$
+ duplicate$ "u" change.case$
+ =
+ { purify$ }
+ { output.state mid.sentence =
+ { skip$ }
+ { "u" change.case$
+ "t" change.case$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+ * "}{" *
+ printing empty$
+ { "" }
+ { printing ordinal.translate
+ duplicate$ "l" change.case$
+ duplicate$ "u" change.case$
+ =
+ { purify$ }
+ { skip$ }
+ if$
+ }
+ if$
+ * "}" *
+ }
+ if$
+}
+
+INTEGERS { multiresult }
+
+FUNCTION {multi.page.check}
+{ 't :=
+ #0 'multiresult :=
+ { multiresult not
+ t empty$ not
+ and
+ }
+ { t #1 #1 substring$
+ duplicate$ "-" =
+ swap$ duplicate$ "," =
+ swap$ "+" =
+ or or
+ { #1 'multiresult := }
+ { t #2 global.max$ substring$ 't := }
+ if$
+ }
+ while$
+ multiresult
+}
+
+FUNCTION {format.pages}
+{ pages empty$
+ { "" }
+ { pages multi.page.check
+ { "side" pages n.dashify tie.or.space.connect }
+ { "side" pages tie.or.space.connect }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.vol.num.pages}
+{ volume field.or.null
+ number empty$
+ 'skip$
+ { "(" number * ")" * *
+ volume empty$
+ { "there's a number but no volume in " cite$ * warning$ }
+ 'skip$
+ if$
+ }
+ if$
+ pages empty$
+ 'skip$
+ { duplicate$ empty$
+ { pop$ format.pages }
+ { ":" * pages n.dashify * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.chapter.pages}
+{ chapter empty$
+ 'format.pages
+ { type empty$
+ { "kapitel" }
+ { type "l" change.case$ }
+ if$
+ chapter tie.or.space.connect
+ pages empty$
+ 'skip$
+ { ", " * format.pages * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.in.ed.booktitle}
+{ booktitle empty$
+ { "" }
+ { editor empty$
+ { "I " booktitle emphasize * }
+ { "I " format.editors * ", " * booktitle emphasize * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {empty.misc.check}
+{ author empty$ title empty$ howpublished empty$
+ month empty$ year empty$ note empty$ isbn empty$ issn empty$
+ and and and and and and and
+ key empty$ not and
+ { "all relevant fields are empty in " cite$ * warning$ }
+ 'skip$
+ if$
+}
+
+FUNCTION {format.thesis.type}
+{ type empty$
+ 'skip$
+ { pop$
+ type "t" change.case$
+ }
+ if$
+}
+
+FUNCTION {format.tr.number}
+{ type empty$
+ { "Rapport" }
+ 'type
+ if$
+ number empty$
+ { "t" change.case$ }
+ { number tie.or.space.connect }
+ if$
+}
+
+FUNCTION {format.article.crossref}
+{ key empty$
+ { journal empty$
+ { "need key or journal for " cite$ * " to crossref " * crossref *
+ warning$
+ ""
+ }
+ { "I \emph{" journal * "}" * }
+ if$
+ }
+ { "I " key * }
+ if$
+ " \cite{" * crossref * "}" *
+}
+
+FUNCTION {format.crossref.editor}
+{ editor #1 "{vv }{ll}" format.name$
+ editor num.names$ duplicate$
+ #2 >
+ { pop$ " et~al." * }
+ { #2 <
+ 'skip$
+ { editor #2 "{ff~}{vv }{ll}{~jj}" format.name$ "others" =
+ { " et~al." * }
+ { " og " * editor #2 "{vv }{ll}" format.name$ * }
+ if$
+ }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.book.crossref}
+{ volume empty$
+ { "empty volume in " cite$ * "'s crossref of " * crossref * warning$
+ "I "
+ }
+ { "Bind" volume tie.or.space.connect
+ " af " *
+ }
+ if$
+ editor empty$
+ editor field.or.null author field.or.null =
+ or
+ { key empty$
+ { series empty$
+ { "need editor, key, or series for " cite$ * " to crossref " *
+ crossref * warning$
+ "" *
+ }
+ { "\emph{" * series * "}" * }
+ if$
+ }
+ { key * }
+ if$
+ }
+ { format.crossref.editor * }
+ if$
+ " \cite{" * crossref * "}" *
+}
+
+FUNCTION {format.incoll.inproc.crossref}
+{ editor empty$
+ editor field.or.null author field.or.null =
+ or
+ { key empty$
+ { booktitle empty$
+ { "need editor, key, or booktitle for " cite$ * " to crossref " *
+ crossref * warning$
+ ""
+ }
+ { "I \emph{" booktitle * "}" * }
+ if$
+ }
+ { "I " key * }
+ if$
+ }
+ { "I " format.crossref.editor * }
+ if$
+ " \cite{" * crossref * "}" *
+}
+
+FUNCTION {article}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.title "title" output.check
+ new.block
+ crossref missing$
+ { journal emphasize "journal" output.check
+ format.vol.num.pages output
+ format.date "year" output.check
+ }
+ { format.article.crossref output.nonnull
+ format.pages output
+ }
+ if$
+ new.block
+ note output
+ output.isbn.issn
+ output.url
+ fin.entry
+}
+
+FUNCTION {book}
+{ output.bibitem
+ author empty$
+ { format.editors "author and editor" output.check }
+ { format.authors output.nonnull
+ crossref missing$
+ { "author and editor" editor either.or.check }
+ 'skip$
+ if$
+ }
+ if$
+ new.block
+ format.btitle "title" output.check
+ crossref missing$
+ { format.bvolume output
+ new.block
+ format.number.series output
+ new.sentence
+ publisher "publisher" output.check
+ address output
+ }
+ { new.block
+ format.book.crossref output.nonnull
+ }
+ if$
+ format.edition output
+ format.date "year" output.check
+ new.block
+ note output
+ output.isbn.issn
+ output.url
+ fin.entry
+}
+
+FUNCTION {booklet}
+{ output.bibitem
+ format.authors output
+ new.block
+ format.title "title" output.check
+ howpublished address new.block.checkb
+ howpublished output
+ address output
+ format.date output
+ new.block
+ note output
+ output.isbn.issn
+ output.url
+ fin.entry
+}
+
+FUNCTION {inbook}
+{ output.bibitem
+ author empty$
+ { format.editors "author and editor" output.check }
+ { format.authors output.nonnull
+ crossref missing$
+ { "author and editor" editor either.or.check }
+ 'skip$
+ if$
+ }
+ if$
+ new.block
+ format.btitle "title" output.check
+ crossref missing$
+ { format.bvolume output
+ format.chapter.pages "chapter and pages" output.check
+ new.block
+ format.number.series output
+ new.sentence
+ publisher "publisher" output.check
+ address output
+ }
+ { format.chapter.pages "chapter and pages" output.check
+ new.block
+ format.book.crossref output.nonnull
+ }
+ if$
+ format.edition output
+ format.date "year" output.check
+ new.block
+ note output
+ output.isbn.issn
+ output.url
+ fin.entry
+}
+
+FUNCTION {incollection}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.title "title" output.check
+ new.block
+ crossref missing$
+ { format.in.ed.booktitle "booktitle" output.check
+ format.bvolume output
+ format.number.series output
+ format.chapter.pages output
+ new.sentence
+ publisher "publisher" output.check
+ address output
+ format.edition output
+ format.date "year" output.check
+ }
+ { format.incoll.inproc.crossref output.nonnull
+ format.chapter.pages output
+ }
+ if$
+ new.block
+ note output
+ output.isbn.issn
+ output.url
+ fin.entry
+}
+
+FUNCTION {inproceedings}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.title "title" output.check
+ new.block
+ crossref missing$
+ { format.in.ed.booktitle "booktitle" output.check
+ format.bvolume output
+ format.number.series output
+ format.pages output
+ address empty$
+ { organization publisher new.sentence.checkb
+ organization output
+ publisher output
+ format.date "year" output.check
+ }
+ { address output.nonnull
+ format.date "year" output.check
+ new.sentence
+ organization output
+ publisher output
+ }
+ if$
+ }
+ { format.incoll.inproc.crossref output.nonnull
+ format.pages output
+ }
+ if$
+ new.block
+ note output
+ output.isbn.issn
+ output.url
+ fin.entry
+}
+
+FUNCTION {conference} { inproceedings }
+
+FUNCTION {manual}
+{ output.bibitem
+ author empty$
+ { organization empty$
+ 'skip$
+ { organization output.nonnull
+ address output
+ }
+ if$
+ }
+ { format.authors output.nonnull }
+ if$
+ new.block
+ format.btitle "title" output.check
+ author empty$
+ { organization empty$
+ { address new.block.checka
+ address output
+ }
+ 'skip$
+ if$
+ }
+ { organization address new.block.checkb
+ organization output
+ address output
+ }
+ if$
+ format.edition output
+ format.date output
+ new.block
+ note output
+ output.isbn.issn
+ output.url
+ fin.entry
+}
+
+FUNCTION {mastersthesis}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.title "title" output.check
+ new.block
+ "Specialeafhandling" format.thesis.type output.nonnull
+ school "school" output.check
+ address output
+ format.date "year" output.check
+ new.block
+ note output
+ output.isbn.issn
+ output.url
+ fin.entry
+}
+
+FUNCTION {misc}
+{ output.bibitem
+ format.authors output
+ title howpublished new.block.checkb
+ format.title output
+ howpublished new.block.checka
+ howpublished output
+ format.date output
+ new.block
+ note output
+ output.isbn.issn
+ output.url
+ fin.entry
+ empty.misc.check
+}
+
+FUNCTION {phdthesis}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.btitle "title" output.check
+ new.block
+ "Ph.d.-afhandling" format.thesis.type output.nonnull
+ school "school" output.check
+ address output
+ format.date "year" output.check
+ new.block
+ note output
+ output.isbn.issn
+ output.url
+ fin.entry
+}
+
+FUNCTION {proceedings}
+{ output.bibitem
+ editor empty$
+ { organization output }
+ { format.editors output.nonnull }
+ if$
+ new.block
+ format.btitle "title" output.check
+ format.bvolume output
+ format.number.series output
+ address empty$
+ { editor empty$
+ { publisher new.sentence.checka }
+ { organization publisher new.sentence.checkb
+ organization output
+ }
+ if$
+ publisher output
+ format.date "year" output.check
+ }
+ { address output.nonnull
+ format.date "year" output.check
+ new.sentence
+ editor empty$
+ 'skip$
+ { organization output }
+ if$
+ publisher output
+ }
+ if$
+ new.block
+ note output
+ output.isbn.issn
+ output.url
+ fin.entry
+}
+
+FUNCTION {techreport}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.title "title" output.check
+ new.block
+ format.tr.number output.nonnull
+ institution "institution" output.check
+ address output
+ format.date "year" output.check
+ new.block
+ note output
+ output.isbn.issn
+ output.url
+ fin.entry
+}
+
+FUNCTION {unpublished}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.title "title" output.check
+ new.block
+ note "note" output.check
+ format.date output
+ output.isbn.issn
+ output.url
+ fin.entry
+}
+
+FUNCTION {default.type} { misc }
+
+MACRO {jan} {"januar"}
+
+MACRO {feb} {"februar"}
+
+MACRO {mar} {"marts"}
+
+MACRO {apr} {"april"}
+
+MACRO {may} {"maj"}
+
+MACRO {jun} {"juni"}
+
+MACRO {jul} {"juli"}
+
+MACRO {aug} {"august"}
+
+MACRO {sep} {"september"}
+
+MACRO {oct} {"oktober"}
+
+MACRO {nov} {"november"}
+
+MACRO {dec} {"december"}
+
+MACRO {acmcs} {"ACM Computing Surveys"}
+
+MACRO {acta} {"Acta Informatica"}
+
+MACRO {cacm} {"Communications of the ACM"}
+
+MACRO {ibmjrd} {"IBM Journal of Research and Development"}
+
+MACRO {ibmsj} {"IBM Systems Journal"}
+
+MACRO {ieeese} {"IEEE Transactions on Software Engineering"}
+
+MACRO {ieeetc} {"IEEE Transactions on Computers"}
+
+MACRO {ieeetcad}
+ {"IEEE Transactions on Computer-Aided Design of Integrated Circuits"}
+
+MACRO {ipl} {"Information Processing Letters"}
+
+MACRO {jacm} {"Journal of the ACM"}
+
+MACRO {jcss} {"Journal of Computer and System Sciences"}
+
+MACRO {scp} {"Science of Computer Programming"}
+
+MACRO {sicomp} {"SIAM Journal on Computing"}
+
+MACRO {tocs} {"ACM Transactions on Computer Systems"}
+
+MACRO {tods} {"ACM Transactions on Database Systems"}
+
+MACRO {tog} {"ACM Transactions on Graphics"}
+
+MACRO {toms} {"ACM Transactions on Mathematical Software"}
+
+MACRO {toois} {"ACM Transactions on Office Information Systems"}
+
+MACRO {toplas} {"ACM Transactions on Programming Languages and Systems"}
+
+MACRO {tcs} {"Theoretical Computer Science"}
+
+READ
+
+FUNCTION {sortify}
+{ purify$
+ "l" change.case$
+}
+
+INTEGERS { len }
+
+FUNCTION {chop.word}
+{ 's :=
+ 'len :=
+ s #1 len substring$ =
+ { s len #1 + global.max$ substring$ }
+ 's
+ if$
+}
+
+INTEGERS { et.al.char.used }
+
+FUNCTION {initialize.et.al.char.used}
+{ #0 'et.al.char.used :=
+}
+
+EXECUTE {initialize.et.al.char.used}
+
+FUNCTION {format.lab.names}
+{ 's :=
+ s num.names$ 'numnames :=
+ numnames #1 >
+ { numnames #4 >
+ { #3 'namesleft := }
+ { numnames 'namesleft := }
+ if$
+ #1 'nameptr :=
+ ""
+ { namesleft #0 > }
+ { nameptr numnames =
+ { s nameptr "{ff }{vv }{ll}{ jj}" format.name$ "others" =
+ { "{\etalchar{+}}" *
+ #1 'et.al.char.used :=
+ }
+ { s nameptr "{v{}}{l{}}" format.name$ * }
+ if$
+ }
+ { s nameptr "{v{}}{l{}}" format.name$ * }
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+ numnames #4 >
+ { "{\etalchar{+}}" *
+ #1 'et.al.char.used :=
+ }
+ 'skip$
+ if$
+ }
+ { s #1 "{v{}}{l{}}" format.name$
+ duplicate$ text.length$ #2 <
+ { pop$ s #1 "{ll}" format.name$ #3 text.prefix$ }
+ 'skip$
+ if$
+ }
+ if$
+}
+
+FUNCTION {author.key.label}
+{ author empty$
+ { key empty$
+ { cite$ #1 #3 substring$ }
+ { key #3 text.prefix$ }
+ if$
+ }
+ { author format.lab.names }
+ if$
+}
+
+FUNCTION {author.editor.key.label}
+{ author empty$
+ { editor empty$
+ { key empty$
+ { cite$ #1 #3 substring$ }
+ { key #3 text.prefix$ }
+ if$
+ }
+ { editor format.lab.names }
+ if$
+ }
+ { author format.lab.names }
+ if$
+}
+
+FUNCTION {author.key.organization.label}
+{ author empty$
+ { key empty$
+ { organization empty$
+ { cite$ #1 #3 substring$ }
+ { "The " #4 organization chop.word #3 text.prefix$ }
+ if$
+ }
+ { key #3 text.prefix$ }
+ if$
+ }
+ { author format.lab.names }
+ if$
+}
+
+FUNCTION {editor.key.organization.label}
+{ editor empty$
+ { key empty$
+ { organization empty$
+ { cite$ #1 #3 substring$ }
+ { organization #3 text.prefix$ }
+ if$
+ }
+ { key #3 text.prefix$ }
+ if$
+ }
+ { editor format.lab.names }
+ if$
+}
+
+FUNCTION {calc.label}
+{ type$ "book" =
+ type$ "inbook" =
+ or
+ 'author.editor.key.label
+ { type$ "proceedings" =
+ 'editor.key.organization.label
+ { type$ "manual" =
+ 'author.key.organization.label
+ 'author.key.label
+ if$
+ }
+ if$
+ }
+ if$
+ duplicate$
+ year field.or.null purify$ #-1 #2 substring$
+ *
+ 'label :=
+ year field.or.null purify$ #-1 #4 substring$
+ *
+ sortify 'sort.label :=
+}
+
+FUNCTION {sort.format.names}
+{ 's :=
+ #1 'nameptr :=
+ ""
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ { nameptr #1 >
+ { " " * }
+ 'skip$
+ if$
+ s nameptr "{ll{ }}{ ff{ }}{ vv{ }}{ jj{ }}" format.name$ 't :=
+ nameptr numnames = t "others" = and
+ { "et al" * }
+ { t sortify * }
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+}
+
+FUNCTION {sort.format.title}
+{ sortify
+ #1 global.max$ substring$
+}
+
+FUNCTION {author.sort}
+{ author empty$
+ { key empty$
+ { "to sort, need author or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { author sort.format.names }
+ if$
+}
+
+FUNCTION {author.editor.sort}
+{ author empty$
+ { editor empty$
+ { key empty$
+ { "to sort, need author, editor, or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { editor sort.format.names }
+ if$
+ }
+ { author sort.format.names }
+ if$
+}
+
+FUNCTION {author.organization.sort}
+{ author empty$
+ { organization empty$
+ { key empty$
+ { "to sort, need author, organization, or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { "The " #4 organization chop.word sortify }
+ if$
+ }
+ { author sort.format.names }
+ if$
+}
+
+FUNCTION {editor.organization.sort}
+{ editor empty$
+ { organization empty$
+ { key empty$
+ { "to sort, need editor, organization, or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { "The " #4 organization chop.word sortify }
+ if$
+ }
+ { editor sort.format.names }
+ if$
+}
+
+FUNCTION {presort}
+{ calc.label
+ sort.label
+ " "
+ *
+ type$ "book" =
+ type$ "inbook" =
+ or
+ 'author.editor.sort
+ { type$ "proceedings" =
+ 'editor.organization.sort
+ { type$ "manual" =
+ 'author.organization.sort
+ 'author.sort
+ if$
+ }
+ if$
+ }
+ if$
+ *
+ " "
+ *
+ year field.or.null sortify
+ *
+ " "
+ *
+ title field.or.null
+ sort.format.title
+ *
+ #1 entry.max$ substring$
+ 'sort.key$ :=
+}
+
+ITERATE {presort}
+
+SORT
+
+STRINGS { longest.label last.sort.label next.extra }
+
+INTEGERS { longest.label.width last.extra.num }
+
+FUNCTION {initialize.longest.label}
+{ "" 'longest.label :=
+ #0 int.to.chr$ 'last.sort.label :=
+ "" 'next.extra :=
+ #0 'longest.label.width :=
+ #0 'last.extra.num :=
+}
+
+FUNCTION {forward.pass}
+{ last.sort.label sort.label =
+ { last.extra.num #1 + 'last.extra.num :=
+ last.extra.num int.to.chr$ 'extra.label :=
+ }
+ { "a" chr.to.int$ 'last.extra.num :=
+ "" 'extra.label :=
+ sort.label 'last.sort.label :=
+ }
+ if$
+}
+
+FUNCTION {reverse.pass}
+{ next.extra "b" =
+ { "a" 'extra.label := }
+ 'skip$
+ if$
+ label extra.label * 'label :=
+ label width$ longest.label.width >
+ { label 'longest.label :=
+ label width$ 'longest.label.width :=
+ }
+ 'skip$
+ if$
+ extra.label 'next.extra :=
+}
+
+EXECUTE {initialize.longest.label}
+
+ITERATE {forward.pass}
+
+REVERSE {reverse.pass}
+
+FUNCTION {begin.bib}
+{ et.al.char.used
+ { "\newcommand{\etalchar}[1]{$^{#1}$}" write$ newline$ }
+ 'skip$
+ if$
+ preamble$ empty$
+ 'skip$
+ { preamble$ write$ newline$ }
+ if$
+ "\begin{thebibliography}{" longest.label * "}" * write$ newline$
+ "\makeatletter" write$ newline$
+ "\@tfor\dkbib@reserved@a:=0123456789\do{%" write$ newline$
+ " \expandafter\sfcode\expandafter`\dkbib@reserved@a=1007}" write$ newline$
+ "\providecommand{\dkbib@addperiod}{\ifnum\spacefactor=1007.\fi}" write$ newline$
+ "\providecommand{\dkbibedition}[2]{#1\dkbib@addperiod~udgave}" write$ newline$
+ "\providecommand{\dkbibEdition}[2]{#1\dkbib@addperiod~udgave}" write$ newline$
+ "\providecommand{\dkbibisbn}[1]{\unskip\@gobble}" write$ newline$
+ "\providecommand{\dkbibissn}[1]{\unskip\@gobble}" write$ newline$
+ "\providecommand{\dkbiburl}[1]{\unskip\@gobble}" write$ newline$
+ "\providecommand{\dkbibannote}[2]{\unskip}" write$ newline$
+ "\providecommand{\dkbibdash}{\hbox{-}\penalty\@m}" write$ newline$
+ "\makeatother" write$ newline$
+}
+
+EXECUTE {begin.bib}
+
+EXECUTE {init.state.consts}
+
+ITERATE {call.type$}
+
+FUNCTION {end.bib}
+{ newline$
+ "\end{thebibliography}" write$ newline$
+}
+
+EXECUTE {end.bib}
diff --git a/biblio/bibtex/contrib/dk-bib/dk-apali.bst b/biblio/bibtex/contrib/dk-bib/dk-apali.bst
new file mode 100644
index 0000000000..c33983a99d
--- /dev/null
+++ b/biblio/bibtex/contrib/dk-bib/dk-apali.bst
@@ -0,0 +1,1295 @@
+% BibTeX `apalike' bibliography style (24-Jan-88 version)
+% Adapted from the `alpha' style, version 0.99a; for BibTeX version 0.99a.
+% Copyright (C) 1988, all rights reserved.
+% Copying of this file is allowed, provided that if you make any changes at all
+% you name it something other than `apalike.bst'.
+% This restriction helps ensure that all copies are identical.
+% Differences between this style and `alpha' are generally heralded by a `%'.
+% The file btxbst.doc has the documentation for alpha.bst.
+%
+% This style should be used with the `apalike' LaTeX style (apalike.sty).
+% \cite's come out like "(Jones, 1986)" in the text but there are no labels
+% in the bibliography, and something like "(1986)" comes out immediately
+% after the author. Author (and editor) names appear as last name, comma,
+% initials. A `year' field is required for every entry, and so is either
+% an author (or in some cases, an editor) field or a key field.
+%
+% Editorial note:
+% Many journals require a style like `apalike', but I strongly, strongly,
+% strongly recommend that you not use it if you have a choice---use something
+% like `plain' instead. Mary-Claire van Leunen (A Handbook for Scholars,
+% Knopf, 1979) argues convincingly that a style like `plain' encourages better
+% writing than one like `apalike'. Furthermore the strongest arguments for
+% using an author-date style like `apalike'---that it's "the most practical"
+% (The Chicago Manual of Style, University of Chicago Press, thirteenth
+% edition, 1982, pages 400--401)---fall flat on their face with the new
+% computer-typesetting technology. For instance page 401 anachronistically
+% states "The chief disadvantage of [a style like `plain'] is that additions
+% or deletions cannot be made after the manuscript is typed without changing
+% numbers in both text references and list." LaTeX sidesteps the disadvantage.
+%
+% History:
+% 15-sep-86 (SK,OP) Original version, by Susan King and Oren Patashnik.
+% 10-nov-86 (OP) Truncated the sort.key$ string to the correct length
+% in bib.sort.order to eliminate error message.
+% 24-jan-88 (OP) Updated for BibTeX version 0.99a, from alpha.bst 0.99a;
+% apalike now sorts by author, then year, then title;
+% THIS `apalike' VERSION DOES NOT WORK WITH BIBTEX 0.98i.
+% 20-jan-2005 (arne) Translated into Danish by arne.jorgensen@tug.dk.
+% Now called `dk-apali'.
+% This is dk-bib, Version 0.6 ($Id: dk-apali.bst 92 2006-05-21 21:18:10Z arne $)
+
+ENTRY
+ { address
+ author
+ booktitle
+ chapter
+ edition
+ printing
+ editor
+ howpublished
+ institution
+ isbn
+ issn
+ url
+ annote
+ journal
+ key
+% month not used in apalike
+ note
+ number
+ organization
+ pages
+ publisher
+ school
+ series
+ title
+ type
+ volume
+ year
+ }
+ {}
+ { label extra.label sort.label }
+
+INTEGERS { output.state before.all mid.sentence after.sentence after.block }
+
+FUNCTION {init.state.consts}
+{ #0 'before.all :=
+ #1 'mid.sentence :=
+ #2 'after.sentence :=
+ #3 'after.block :=
+}
+
+STRINGS { s t }
+
+FUNCTION {output.nonnull}
+{ 's :=
+ output.state mid.sentence =
+ { ", " * write$ }
+ { output.state after.block =
+ { add.period$ write$
+ newline$
+ "\newblock " write$
+ }
+ { output.state before.all =
+ 'write$
+ { add.period$ " " * write$ }
+ if$
+ }
+ if$
+ mid.sentence 'output.state :=
+ }
+ if$
+ s
+}
+
+FUNCTION {output}
+{ duplicate$ empty$
+ 'pop$
+ 'output.nonnull
+ if$
+}
+
+FUNCTION {output.check}
+{ 't :=
+ duplicate$ empty$
+ { pop$ "empty " t * " in " * cite$ * warning$ }
+ 'output.nonnull
+ if$
+}
+
+% apalike needs this function because
+% the year has special punctuation;
+% apalike ignores the month
+FUNCTION {output.year.check}
+{ year empty$
+ { "empty year in " cite$ * warning$ }
+ { write$
+ " (" year * extra.label * ")" *
+ mid.sentence 'output.state :=
+ }
+ if$
+}
+
+FUNCTION {output.bibitem}
+{ newline$
+ "\bibitem[" write$
+ label write$
+ "]{" write$
+ cite$ write$
+ "}" write$
+ newline$
+ ""
+ before.all 'output.state :=
+}
+
+FUNCTION {output.annote}
+{ annote empty$
+ 'skip$
+ { "\dkbibannote{" cite$ * "}{" * annote add.period$ * "}" *
+ write$ newline$ }
+ if$
+}
+
+FUNCTION {fin.entry}
+{ add.period$
+ write$
+ newline$
+ output.annote
+}
+
+FUNCTION {new.block}
+{ output.state before.all =
+ 'skip$
+ { after.block 'output.state := }
+ if$
+}
+
+FUNCTION {output.isbn.issn}
+{ isbn empty$
+ 'skip$
+ { new.block "\dkbibisbn{" isbn * "}" * output }
+ if$
+ issn empty$
+ 'skip$
+ { new.block "\dkbibissn{" issn * "}" * output }
+ if$
+}
+
+FUNCTION {output.url}
+{ url empty$
+ 'skip$
+ { new.block "\dkbiburl{" url * "}" * output }
+ if$
+}
+
+FUNCTION {new.sentence}
+{ output.state after.block =
+ 'skip$
+ { output.state before.all =
+ 'skip$
+ { after.sentence 'output.state := }
+ if$
+ }
+ if$
+}
+
+FUNCTION {not}
+{ { #0 }
+ { #1 }
+ if$
+}
+
+FUNCTION {and}
+{ 'skip$
+ { pop$ #0 }
+ if$
+}
+
+FUNCTION {or}
+{ { pop$ #1 }
+ 'skip$
+ if$
+}
+
+FUNCTION {new.block.checkb}
+{ empty$
+ swap$ empty$
+ and
+ 'skip$
+ 'new.block
+ if$
+}
+
+FUNCTION {field.or.null}
+{ duplicate$ empty$
+ { pop$ "" }
+ 'skip$
+ if$
+}
+
+FUNCTION {emphasize}
+{ duplicate$ empty$
+ { pop$ "" }
+ { "\emph{" swap$ * "}" * }
+ if$
+}
+
+INTEGERS { nameptr namesleft numnames }
+
+FUNCTION {format.names}
+{ 's :=
+ #1 'nameptr :=
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ { s nameptr "{vv~}{ll}{, jj}{, f.}" format.name$ 't := % last name first
+ nameptr #1 >
+ { namesleft #1 >
+ { ", " * t * }
+ { t "others" =
+ { " et~al." * }
+ { " og " * t * }
+ if$
+ }
+ if$
+ }
+ 't
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+}
+
+FUNCTION {format.authors}
+{ author empty$
+ { "" }
+ { author format.names }
+ if$
+}
+
+FUNCTION {format.key} % this function is just for apalike
+{ empty$
+ { key field.or.null }
+ { "" }
+ if$
+}
+
+FUNCTION {format.editors}
+{ editor empty$
+ { "" }
+ { editor format.names
+ editor num.names$ #1 >
+ { ", redakt\o rer" * }
+ { ", redakt\o r" * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.title}
+{ title empty$
+ { "" }
+ { title "t" change.case$ }
+ if$
+}
+
+FUNCTION {n.dashify}
+{ 't :=
+ ""
+ { t empty$ not }
+ { t #1 #1 substring$ "-" =
+ { "\dkbibdash" *
+ t #2 global.max$ substring$ 't :=
+ { t #1 #1 substring$ "-" = }
+ { t #2 global.max$ substring$ 't := }
+ while$
+ t #1 #1 substring$ " " =
+ { "{}" * }
+ { " " * }
+ if$
+ }
+ { t #1 #1 substring$ *
+ t #2 global.max$ substring$ 't :=
+ }
+ if$
+ }
+ while$
+}
+
+FUNCTION {format.btitle}
+{ title emphasize
+}
+
+FUNCTION {tie.or.space.connect}
+{ duplicate$ text.length$ #3 <
+ { "~" }
+ { " " }
+ if$
+ swap$ * *
+}
+
+FUNCTION {either.or.check}
+{ empty$
+ 'pop$
+ { "can't use both " swap$ * " fields in " * cite$ * warning$ }
+ if$
+}
+
+FUNCTION {format.bvolume}
+{ volume empty$
+ { "" }
+ { "bind" volume tie.or.space.connect
+ series empty$
+ 'skip$
+ { " af " * series emphasize * }
+ if$
+ "volume and number" number either.or.check
+ }
+ if$
+}
+
+FUNCTION {format.number.series}
+{ volume empty$
+ { number empty$
+ { series field.or.null }
+ { output.state mid.sentence =
+ { "nr." }
+ { "Nr." }
+ if$
+ number tie.or.space.connect
+ series empty$
+ { "there's a number but no series in " cite$ * warning$ }
+ { " i " * series * }
+ if$
+ }
+ if$
+ }
+ { "" }
+ if$
+}
+
+FUNCTION {ordinal.translate.i}
+{ duplicate$ "l" change.case$ "first" =
+ {pop$ "1"}
+ {skip$}
+ if$
+ duplicate$ "l" change.case$ "second" =
+ {pop$ "2"}
+ {skip$}
+ if$
+ duplicate$ "l" change.case$ "third" =
+ {pop$ "3"}
+ {skip$}
+ if$
+ duplicate$ "l" change.case$ "fourth" =
+ {pop$ "4"}
+ {skip$}
+ if$
+ duplicate$ "l" change.case$ "fifth" =
+ {pop$ "5"}
+ {skip$}
+ if$
+}
+
+FUNCTION {ordinal.translate.ii}
+{ duplicate$ "l" change.case$ "sixth" =
+ {pop$ "6"}
+ {skip$}
+ if$
+ duplicate$ "l" change.case$ "seventh" =
+ {pop$ "7"}
+ {skip$}
+ if$
+ duplicate$ "l" change.case$ "eighth" =
+ {pop$ "8"}
+ {skip$}
+ if$
+ duplicate$ "l" change.case$ "ninth" =
+ {pop$ "9"}
+ {skip$}
+ if$
+ duplicate$ "l" change.case$ "tenth" =
+ {pop$ "10"}
+ {skip$}
+ if$
+}
+
+FUNCTION {ordinal.translate.iii}
+{ duplicate$ "l" change.case$ "eleventh" =
+ {pop$ "11"}
+ {skip$}
+ if$
+ duplicate$ "l" change.case$ "twelfth" =
+ {pop$ "12"}
+ {skip$}
+ if$
+ duplicate$ "l" change.case$ "thirteenth" =
+ {pop$ "13"}
+ {skip$}
+ if$
+ duplicate$ "l" change.case$ "fourteenth" =
+ {pop$ "14"}
+ {skip$}
+ if$
+ duplicate$ "l" change.case$ "fifteenth" =
+ {pop$ "15"}
+ {skip$}
+ if$
+}
+
+FUNCTION {ordinal.translate.iv}
+{ duplicate$ "l" change.case$ "sixteenth" =
+ {pop$ "16"}
+ {skip$}
+ if$
+ duplicate$ "l" change.case$ "seventeenth" =
+ {pop$ "17"}
+ {skip$}
+ if$
+ duplicate$ "l" change.case$ "eighteenth" =
+ {pop$ "18"}
+ {skip$}
+ if$
+ duplicate$ "l" change.case$ "nineteenth" =
+ {pop$ "19"}
+ {skip$}
+ if$
+ duplicate$ "l" change.case$ "twentieth" =
+ {pop$ "20"}
+ {skip$}
+ if$
+}
+
+FUNCTION {ordinal.translate}
+{ ordinal.translate.i
+ ordinal.translate.ii
+ ordinal.translate.iii
+ ordinal.translate.iv
+}
+
+FUNCTION {format.edition}
+{ edition empty$
+ printing empty$
+ +
+ #2
+ =
+ { "" }
+ { output.state mid.sentence =
+ { "\dkbibedition{" }
+ { "\dkbibEdition{" }
+ if$
+ edition empty$
+ { "" }
+ { edition ordinal.translate
+ duplicate$ "l" change.case$
+ duplicate$ "u" change.case$
+ =
+ { purify$ }
+ { output.state mid.sentence =
+ { skip$ }
+ { "u" change.case$
+ "t" change.case$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+ * "}{" *
+ printing empty$
+ { "" }
+ { printing ordinal.translate
+ duplicate$ "l" change.case$
+ duplicate$ "u" change.case$
+ =
+ { purify$ }
+ { skip$ }
+ if$
+ }
+ if$
+ * "}" *
+ }
+ if$
+}
+
+INTEGERS { multiresult }
+
+FUNCTION {multi.page.check}
+{ 't :=
+ #0 'multiresult :=
+ { multiresult not
+ t empty$ not
+ and
+ }
+ { t #1 #1 substring$
+ duplicate$ "-" =
+ swap$ duplicate$ "," =
+ swap$ "+" =
+ or or
+ { #1 'multiresult := }
+ { t #2 global.max$ substring$ 't := }
+ if$
+ }
+ while$
+ multiresult
+}
+
+FUNCTION {format.pages}
+{ pages empty$
+ { "" }
+ { pages multi.page.check
+ { "side" pages n.dashify tie.or.space.connect }
+ { "side" pages tie.or.space.connect }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.vol.num.pages}
+{ volume field.or.null
+ number empty$
+ 'skip$
+ { "(" number * ")" * *
+ volume empty$
+ { "there's a number but no volume in " cite$ * warning$ }
+ 'skip$
+ if$
+ }
+ if$
+ pages empty$
+ 'skip$
+ { duplicate$ empty$
+ { pop$ format.pages }
+ { ":" * pages n.dashify * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.chapter.pages}
+{ chapter empty$
+ 'format.pages
+ { type empty$
+ { "kapitel" }
+ { type "l" change.case$ }
+ if$
+ chapter tie.or.space.connect
+ pages empty$
+ 'skip$
+ { ", " * format.pages * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.in.ed.booktitle}
+{ booktitle empty$
+ { "" }
+ { editor empty$
+ { "I " booktitle emphasize * }
+ { "I " format.editors * ", " * booktitle emphasize * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.thesis.type}
+{ type empty$
+ 'skip$
+ { pop$
+ type "t" change.case$
+ }
+ if$
+}
+
+FUNCTION {format.tr.number}
+{ type empty$
+ { "Rapport" }
+ 'type
+ if$
+ number empty$
+ { "t" change.case$ }
+ { number tie.or.space.connect }
+ if$
+}
+
+FUNCTION {format.article.crossref}
+{ "I" % this is for apalike
+ "~\cite{" * crossref * "}" *
+}
+
+FUNCTION {format.book.crossref}
+{ volume empty$
+ { "empty volume in " cite$ * "'s crossref of " * crossref * warning$
+ "I "
+ }
+ { "Bind" volume tie.or.space.connect
+ " af " *
+ }
+ if$
+ "\cite{" * crossref * "}" * % this is for apalike
+}
+
+FUNCTION {format.incoll.inproc.crossref}
+{ "I" % this is for apalike
+ "~\cite{" * crossref * "}" *
+}
+
+FUNCTION {article}
+{ output.bibitem
+ format.authors "author" output.check
+ author format.key output % special for
+ output.year.check % apalike
+ new.block
+ format.title "title" output.check
+ new.block
+ crossref missing$
+ { journal emphasize "journal" output.check
+ format.vol.num.pages output
+ }
+ { format.article.crossref output.nonnull
+ format.pages output
+ }
+ if$
+ new.block
+ note output
+ output.isbn.issn
+ output.url
+ fin.entry
+}
+
+FUNCTION {book}
+{ output.bibitem
+ author empty$
+ { format.editors "author and editor" output.check
+ editor format.key output
+ }
+ { format.authors output.nonnull
+ crossref missing$
+ { "author and editor" editor either.or.check }
+ 'skip$
+ if$
+ }
+ if$
+ output.year.check % special for apalike
+ new.block
+ format.btitle "title" output.check
+ crossref missing$
+ { format.bvolume output
+ new.block
+ format.number.series output
+ new.sentence
+ publisher "publisher" output.check
+ address output
+ }
+ { new.block
+ format.book.crossref output.nonnull
+ }
+ if$
+ format.edition output
+ new.block
+ note output
+ output.isbn.issn
+ output.url
+ fin.entry
+}
+
+FUNCTION {booklet}
+{ output.bibitem
+ format.authors output
+ author format.key output % special for
+ output.year.check % apalike
+ new.block
+ format.title "title" output.check
+ new.block
+ howpublished output
+ address output
+ new.block
+ note output
+ output.isbn.issn
+ output.url
+ fin.entry
+}
+
+FUNCTION {inbook}
+{ output.bibitem
+ author empty$
+ { format.editors "author and editor" output.check
+ editor format.key output
+ }
+ { format.authors output.nonnull
+ crossref missing$
+ { "author and editor" editor either.or.check }
+ 'skip$
+ if$
+ }
+ if$
+ output.year.check % special for apalike
+ new.block
+ format.btitle "title" output.check
+ crossref missing$
+ { format.bvolume output
+ format.chapter.pages "chapter and pages" output.check
+ new.block
+ format.number.series output
+ new.sentence
+ publisher "publisher" output.check
+ address output
+ }
+ { format.chapter.pages "chapter and pages" output.check
+ new.block
+ format.book.crossref output.nonnull
+ }
+ if$
+ format.edition output
+ new.block
+ note output
+ output.isbn.issn
+ output.url
+ fin.entry
+}
+
+FUNCTION {incollection}
+{ output.bibitem
+ format.authors "author" output.check
+ author format.key output % special for
+ output.year.check % apalike
+ new.block
+ format.title "title" output.check
+ new.block
+ crossref missing$
+ { format.in.ed.booktitle "booktitle" output.check
+ format.bvolume output
+ format.number.series output
+ format.chapter.pages output
+ new.sentence
+ publisher "publisher" output.check
+ address output
+ format.edition output
+ }
+ { format.incoll.inproc.crossref output.nonnull
+ format.chapter.pages output
+ }
+ if$
+ new.block
+ note output
+ output.isbn.issn
+ output.url
+ fin.entry
+}
+
+FUNCTION {inproceedings}
+{ output.bibitem
+ format.authors "author" output.check
+ author format.key output % special for
+ output.year.check % apalike
+ new.block
+ format.title "title" output.check
+ new.block
+ crossref missing$
+ { format.in.ed.booktitle "booktitle" output.check
+ format.bvolume output
+ format.number.series output
+ format.pages output
+ address output % for apalike
+ new.sentence % there's no year
+ organization output % here so things
+ publisher output % are simpler
+ }
+ { format.incoll.inproc.crossref output.nonnull
+ format.pages output
+ }
+ if$
+ new.block
+ note output
+ output.isbn.issn
+ output.url
+ fin.entry
+}
+
+FUNCTION {conference} { inproceedings }
+
+FUNCTION {manual}
+{ output.bibitem
+ format.authors output
+ author format.key output % special for
+ output.year.check % apalike
+ new.block
+ format.btitle "title" output.check
+ organization address new.block.checkb
+ organization output
+ address output
+ format.edition output
+ new.block
+ note output
+ output.isbn.issn
+ output.url
+ fin.entry
+}
+
+FUNCTION {mastersthesis}
+{ output.bibitem
+ format.authors "author" output.check
+ author format.key output % special for
+ output.year.check % apalike
+ new.block
+ format.title "title" output.check
+ new.block
+ "Specialeafhandling" format.thesis.type output.nonnull
+ school "school" output.check
+ address output
+ new.block
+ note output
+ output.isbn.issn
+ output.url
+ fin.entry
+}
+
+FUNCTION {misc}
+{ output.bibitem
+ format.authors output
+ author format.key output % special for
+ output.year.check % apalike
+ new.block
+ format.title output
+ new.block
+ howpublished output
+ new.block
+ note output
+ output.isbn.issn
+ output.url
+ fin.entry
+}
+
+FUNCTION {phdthesis}
+{ output.bibitem
+ format.authors "author" output.check
+ author format.key output % special for
+ output.year.check % apalike
+ new.block
+ format.btitle "title" output.check
+ new.block
+ "Ph.d.-afhandling" format.thesis.type output.nonnull
+ school "school" output.check
+ address output
+ new.block
+ note output
+ output.isbn.issn
+ output.url
+ fin.entry
+}
+
+FUNCTION {proceedings}
+{ output.bibitem
+ format.editors output
+ editor format.key output % special for
+ output.year.check % apalike
+ new.block
+ format.btitle "title" output.check
+ format.bvolume output
+ format.number.series output
+ address output % for apalike
+ new.sentence % we always output
+ organization output % a nonempty organization
+ publisher output % here
+ new.block
+ note output
+ output.isbn.issn
+ output.url
+ fin.entry
+}
+
+FUNCTION {techreport}
+{ output.bibitem
+ format.authors "author" output.check
+ author format.key output % special for
+ output.year.check % apalike
+ new.block
+ format.title "title" output.check
+ new.block
+ format.tr.number output.nonnull
+ institution "institution" output.check
+ address output
+ new.block
+ note output
+ output.isbn.issn
+ output.url
+ fin.entry
+}
+
+FUNCTION {unpublished}
+{ output.bibitem
+ format.authors "author" output.check
+ author format.key output % special for
+ output.year.check % apalike
+ new.block
+ format.title "title" output.check
+ new.block
+ note "note" output.check
+ output.isbn.issn
+ output.url
+ fin.entry
+}
+
+FUNCTION {default.type} { misc }
+
+MACRO {jan} {"januar"}
+
+MACRO {feb} {"februar"}
+
+MACRO {mar} {"marts"}
+
+MACRO {apr} {"april"}
+
+MACRO {may} {"maj"}
+
+MACRO {jun} {"juni"}
+
+MACRO {jul} {"juli"}
+
+MACRO {aug} {"august"}
+
+MACRO {sep} {"september"}
+
+MACRO {oct} {"oktober"}
+
+MACRO {nov} {"november"}
+
+MACRO {dec} {"december"}
+
+MACRO {acmcs} {"ACM Computing Surveys"}
+
+MACRO {acta} {"Acta Informatica"}
+
+MACRO {cacm} {"Communications of the ACM"}
+
+MACRO {ibmjrd} {"IBM Journal of Research and Development"}
+
+MACRO {ibmsj} {"IBM Systems Journal"}
+
+MACRO {ieeese} {"IEEE Transactions on Software Engineering"}
+
+MACRO {ieeetc} {"IEEE Transactions on Computers"}
+
+MACRO {ieeetcad}
+ {"IEEE Transactions on Computer-Aided Design of Integrated Circuits"}
+
+MACRO {ipl} {"Information Processing Letters"}
+
+MACRO {jacm} {"Journal of the ACM"}
+
+MACRO {jcss} {"Journal of Computer and System Sciences"}
+
+MACRO {scp} {"Science of Computer Programming"}
+
+MACRO {sicomp} {"SIAM Journal on Computing"}
+
+MACRO {tocs} {"ACM Transactions on Computer Systems"}
+
+MACRO {tods} {"ACM Transactions on Database Systems"}
+
+MACRO {tog} {"ACM Transactions on Graphics"}
+
+MACRO {toms} {"ACM Transactions on Mathematical Software"}
+
+MACRO {toois} {"ACM Transactions on Office Information Systems"}
+
+MACRO {toplas} {"ACM Transactions on Programming Languages and Systems"}
+
+MACRO {tcs} {"Theoretical Computer Science"}
+
+READ
+
+FUNCTION {sortify}
+{ purify$
+ "l" change.case$
+}
+
+INTEGERS { len }
+
+FUNCTION {chop.word}
+{ 's :=
+ 'len :=
+ s #1 len substring$ =
+ { s len #1 + global.max$ substring$ }
+ 's
+ if$
+}
+
+% There are three apalike cases: one person (Jones),
+% two (Jones and de~Bruijn), and more (Jones et~al.).
+% This function is much like format.crossref.editors.
+%
+FUNCTION {format.lab.names}
+{ 's :=
+ s #1 "{vv~}{ll}" format.name$
+ s num.names$ duplicate$
+ #2 >
+ { pop$ " et~al." * }
+ { #2 <
+ 'skip$
+ { s #2 "{ff }{vv }{ll}{ jj}" format.name$ "others" =
+ { " et~al." * }
+ { " og " * s #2 "{vv~}{ll}" format.name$ * }
+ if$
+ }
+ if$
+ }
+ if$
+}
+
+FUNCTION {author.key.label}
+{ author empty$
+ { key empty$
+ { cite$ #1 #3 substring$ }
+ 'key % apalike uses the whole key
+ if$
+ }
+ { author format.lab.names }
+ if$
+}
+
+FUNCTION {author.editor.key.label}
+{ author empty$
+ { editor empty$
+ { key empty$
+ { cite$ #1 #3 substring$ }
+ 'key % apalike uses the whole key
+ if$
+ }
+ { editor format.lab.names }
+ if$
+ }
+ { author format.lab.names }
+ if$
+}
+
+FUNCTION {editor.key.label}
+{ editor empty$
+ { key empty$
+ { cite$ #1 #3 substring$ }
+ 'key % apalike uses the whole key, no organization
+ if$
+ }
+ { editor format.lab.names }
+ if$
+}
+
+FUNCTION {calc.label}
+{ type$ "book" =
+ type$ "inbook" =
+ or
+ 'author.editor.key.label
+ { type$ "proceedings" =
+ 'editor.key.label % apalike ignores organization
+ 'author.key.label % for labeling and sorting
+ if$
+ }
+ if$
+ ", " % these three lines are
+ * % for apalike, which
+ year field.or.null purify$ #-1 #4 substring$ % uses all four digits
+ *
+ 'label :=
+}
+
+FUNCTION {sort.format.names}
+{ 's :=
+ #1 'nameptr :=
+ ""
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ { nameptr #1 >
+ { " " * }
+ 'skip$
+ if$ % apalike uses initials
+ s nameptr "{vv{ } }{ll{ }}{ f{ }}{ jj{ }}" format.name$ 't := % <= here
+ nameptr numnames = t "others" = and
+ { "et al" * }
+ { t sortify * }
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+}
+
+FUNCTION {sort.format.title}
+{ sortify
+ #1 global.max$ substring$
+}
+
+FUNCTION {author.sort}
+{ author empty$
+ { key empty$
+ { "to sort, need author or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { author sort.format.names }
+ if$
+}
+
+FUNCTION {author.editor.sort}
+{ author empty$
+ { editor empty$
+ { key empty$
+ { "to sort, need author, editor, or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { editor sort.format.names }
+ if$
+ }
+ { author sort.format.names }
+ if$
+}
+
+FUNCTION {editor.sort}
+{ editor empty$
+ { key empty$
+ { "to sort, need editor or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { editor sort.format.names }
+ if$
+}
+
+% apalike uses two sorting passes; the first one sets the
+% labels so that the `a's, `b's, etc. can be computed;
+% the second pass puts the references in "correct" order.
+% The presort function is for the first pass. It computes
+% label, sort.label, and title, and then concatenates.
+FUNCTION {presort}
+{ calc.label
+ label sortify
+ " "
+ *
+ type$ "book" =
+ type$ "inbook" =
+ or
+ 'author.editor.sort
+ { type$ "proceedings" =
+ 'editor.sort
+ 'author.sort
+ if$
+ }
+ if$
+ #1 entry.max$ substring$ % for
+ 'sort.label := % apalike
+ sort.label % style
+ *
+ " "
+ *
+ title field.or.null
+ sort.format.title
+ *
+ #1 entry.max$ substring$
+ 'sort.key$ :=
+}
+
+ITERATE {presort}
+
+SORT % by label, sort.label, title---for final label calculation
+
+STRINGS { last.label next.extra } % apalike labels are only for the text;
+
+INTEGERS { last.extra.num } % there are none in the bibliography
+
+FUNCTION {initialize.extra.label.stuff} % and hence there is no `longest.label'
+{ #0 int.to.chr$ 'last.label :=
+ "" 'next.extra :=
+ #0 'last.extra.num :=
+}
+
+FUNCTION {forward.pass}
+{ last.label label =
+ { last.extra.num #1 + 'last.extra.num :=
+ last.extra.num int.to.chr$ 'extra.label :=
+ }
+ { "a" chr.to.int$ 'last.extra.num :=
+ "" 'extra.label :=
+ label 'last.label :=
+ }
+ if$
+}
+
+FUNCTION {reverse.pass}
+{ next.extra "b" =
+ { "a" 'extra.label := }
+ 'skip$
+ if$
+ label extra.label * 'label :=
+ extra.label 'next.extra :=
+}
+
+EXECUTE {initialize.extra.label.stuff}
+
+ITERATE {forward.pass}
+
+REVERSE {reverse.pass}
+
+% Now that the label is right we sort for real,
+% on sort.label then year then title. This is
+% for the second sorting pass.
+FUNCTION {bib.sort.order}
+{ sort.label
+ " "
+ *
+ year field.or.null sortify
+ *
+ " "
+ *
+ title field.or.null
+ sort.format.title
+ *
+ #1 entry.max$ substring$
+ 'sort.key$ :=
+}
+
+ITERATE {bib.sort.order}
+
+SORT % by sort.label, year, title---giving final bibliography order
+
+FUNCTION {begin.bib}
+{ preamble$ empty$
+ 'skip$
+ { preamble$ write$ newline$ }
+ if$
+ "\begin{thebibliography}{}" write$ newline$ % no labels in apalike
+ "\makeatletter" write$ newline$
+ "\@tfor\dkbib@reserved@a:=0123456789\do{%" write$ newline$
+ " \expandafter\sfcode\expandafter`\dkbib@reserved@a=1007}" write$ newline$
+ "\providecommand{\dkbib@addperiod}{\ifnum\spacefactor=1007.\fi}" write$ newline$
+ "\providecommand{\dkbibedition}[2]{#1\dkbib@addperiod~udgave}" write$ newline$
+ "\providecommand{\dkbibEdition}[2]{#1\dkbib@addperiod~udgave}" write$ newline$
+ "\providecommand{\dkbibisbn}[1]{\unskip\@gobble}" write$ newline$
+ "\providecommand{\dkbibissn}[1]{\unskip\@gobble}" write$ newline$
+ "\providecommand{\dkbiburl}[1]{\unskip\@gobble}" write$ newline$
+ "\providecommand{\dkbibannote}[2]{\unskip}" write$ newline$
+ "\providecommand{\dkbibdash}{\hbox{-}\penalty\@m}" write$ newline$
+ "\makeatother" write$ newline$
+}
+
+EXECUTE {begin.bib}
+
+EXECUTE {init.state.consts}
+
+ITERATE {call.type$}
+
+FUNCTION {end.bib}
+{ newline$
+ "\end{thebibliography}" write$ newline$
+}
+
+EXECUTE {end.bib}
diff --git a/biblio/bibtex/contrib/dk-bib/dk-apali.sty b/biblio/bibtex/contrib/dk-bib/dk-apali.sty
new file mode 100644
index 0000000000..dfd4b5549c
--- /dev/null
+++ b/biblio/bibtex/contrib/dk-bib/dk-apali.sty
@@ -0,0 +1,37 @@
+% This file is based on BibTeX's original apalike.sty
+
+% This is dk-bib, Version 0.6 ($Id: dk-apali.sty 92 2006-05-21 21:18:10Z arne $)
+
+\def\@cite#1#2{(#1\if@tempswa , #2\fi)}
+\def\@biblabel#1{}
+
+\newlength{\bibhang}
+\setlength{\bibhang}{2em}
+
+% In case babel is not used we provide \refname and \bibname here
+\providecommand{\refname}{References}
+\providecommand{\bibname}{Bibliography}
+
+\@ifundefined{chapter}{\def\thebibliography#1{\section*{\refname\@mkboth
+ {\refname}{\refname}}\list
+ {\relax}{\setlength{\labelsep}{0em}
+ \setlength{\itemindent}{-\bibhang}
+ \setlength{\leftmargin}{\bibhang}}
+ \def\newblock{\hskip .11em plus .33em minus .07em}
+ \sloppy\clubpenalty4000\widowpenalty4000
+ \sfcode`\.=1000\relax}}%
+{\def\thebibliography#1{\chapter*{\bibname\@mkboth
+ {\MakeUppercase\bibname}{\MakeUppercase\bibname}}\list
+ {\relax}{\setlength{\labelsep}{0em}
+ \setlength{\itemindent}{-\bibhang}
+ \setlength{\leftmargin}{\bibhang}}
+ \def\newblock{\hskip .11em plus .33em minus .07em}
+ \sloppy\clubpenalty4000\widowpenalty4000
+ \sfcode`\.=1000\relax}}
+
+\def\@citex[#1]#2{\if@filesw\immediate\write\@auxout{\string\citation{#2}}\fi
+ \def\@citea{}\@cite{\@for\@citeb:=#2\do
+ {\@citea\def\@citea{; }\@ifundefined
+ {b@\@citeb}{{\bf ?}\@warning
+ {Citation `\@citeb' on page \thepage \space undefined}}%
+{\csname b@\@citeb\endcsname}}}{#1}}
diff --git a/biblio/bibtex/contrib/dk-bib/dk-bib.ltx b/biblio/bibtex/contrib/dk-bib/dk-bib.ltx
new file mode 100644
index 0000000000..4782345b22
--- /dev/null
+++ b/biblio/bibtex/contrib/dk-bib/dk-bib.ltx
@@ -0,0 +1,352 @@
+% Copyright (C) 2004, 2005, 2006 Arne Jørgensen
+
+% This file is free software; you can redistribute it and/or modify it
+% under the terms of the GNU General Public License as published by
+% the Free Software Foundation; either version 2 of the License, or
+% (at your option) any later version.
+
+% This file is distributed in the hope that it will be useful, but
+% WITHOUT ANY WARRANTY; without even the implied warranty of
+% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+% General Public License for more details.
+
+% You should have received a copy of the GNU General Public License
+% along with this file; if not, write to the Free Software Foundation,
+% Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+
+\documentclass[a4paper,pointednumbers,abstracton,bibtotoc]{scrartcl}
+\usepackage[T1]{fontenc}
+\usepackage[utf8]{inputenc}
+\usepackage[english,danish]{babel}
+\usepackage{lmodern}
+\usepackage[osf,sc]{mathpazo}
+\usepackage{booktabs}
+\usepackage[danish]{varioref}
+\usepackage[protrusion=true,expansion=true]{microtype}
+\usepackage{hyperref}
+
+% subversion date and revision
+\def\dkbib@svn $#1 #2 #3 #4-#5-#6 #7 #8 ${%
+ \def\dkbibrevision{#3}
+ \year =#4
+ \month =#5
+ \day =#6
+}
+\dkbib@svn $Id: dk-bib.ltx 90 2006-05-17 20:51:31Z arne $
+
+% this is how the LaTeX package can be called
+\usepackage[isbn=true,ordinals2word=true]{dk-bib}
+
+% if you want your own way of typesetting URL's, ISBN's, and ISSN's do
+\newcommand{\dkbiburl}[1]{\textsc{url} \url{#1}}
+\newcommand{\dkbibisbn}[1]{%
+ \textsc{isbn} \href{http://isbn.nu/#1}{#1}}
+
+\newcommand{\BibTeX}{\textsc{Bib}\TeX}
+\bibliographystyle{dk-plain}
+
+\setkomafont{title}{\rmfamily}
+\setkomafont{sectioning}{\rmfamily\bfseries}
+
+\title{Dk-bib -- danske varianter af \BibTeX s standardstilarter}
+\author{Arne Jørgensen\thanks{\href{mailto:arne.jorgensen@tug.dk}%
+ {\texttt{arne.jorgensen@tug.dk}}}}
+\makeatletter
+\hypersetup{pdfauthor={Arne J\o rgensen},
+ pdftitle={Dk-bib Manual, version \dkbib@version\ (r\dkbibrevision)},
+ pdfsubject={Danish variants of the standard BibTeX styles, version \dkbib@version},
+ pdfkeywords={dk-abbrv.bst dk-alpha.bst dk-apali.bst dk-plain.bst
+ dk-unsrt.bst dk-bib.sty 88591-dk.csf cp850-dk.csf mac-dk.csf
+ utf8-dk.csf BibTeX BibTeX8 LaTeX},
+ pdfstartview={FitH},
+}
+\makeatother
+
+\begin{document}
+\maketitle
+
+{\selectlanguage{english}{%
+\renewcommand{\abstractname}{Abstract in English}
+\begin{abstract}
+ Dk-bib is a translation of the four standard \BibTeX\ style files
+ (abbrv, alpha, plain and unsrt) and the apalike style file into
+ Danish. The files have been extended with \textsc{url},
+ \textsc{isbn}, \textsc{issn}, \texttt{annote} and \texttt{printing}
+ fields which can be enabled through a \LaTeX\ style file.
+
+ Dk-bib also comes with a couple of Danish sorting order files for
+ \BibTeX8.
+
+ This manual is in Danish.
+\end{abstract}
+}}
+\section{Introduktion}
+Dk-bib er en oversættelse til dansk af de fire
+\BibTeX-standardstilarter (abbrv, alpha, plain, unsrt), samt
+apalike-stilarten.
+
+Stilarterne er udvidet med \textsc{url}-, \textsc{isbn}-,
+\textsc{issn}-, \texttt{printing}- (oplag) og \texttt{annote}-felter
+der kan slås til ved hjælp af den medfølgende \LaTeX-pakke.
+
+Sammen med dk-bib leveres også en række danske sorteringsdefinitioner
+til \BibTeX8.
+
+Har du brug for en generel introduktion til \BibTeX\ kan kapitel~12
+og~13 i~\cite{Mittelbach:2004} anbefales.
+
+\section{Simpel brug}
+I sin simpleste form anvendes de ved blot at skrive
+\begin{verbatim}
+ \bibliographystyle{dk-plain}
+\end{verbatim}
+i stedet for
+\begin{verbatim}
+ \bibliographystyle{plain}
+\end{verbatim}
+i \LaTeX-dokumentet.
+
+Dette bevirker at der blandt andet skrives \emph{og} mellem
+forfatternavne i stedet for det engelske \emph{and} og at der skrives
+for eksempel \emph{2.~udgave} i stedet for \emph{second edition}.
+
+\subsection{Apalike-stilarten}
+Ønsker du at bruge oversættelsen af apalike-stilarten skal du forkorte
+en smule og blot skrive
+\begin{verbatim}
+ \bibliographystyle{dk-apali}
+\end{verbatim}
+
+Apalike.bst har brug for en anden udgave af \LaTeX's
+\verb|\cite|-kommando end den der som standard er defineret. Vi er
+derfor nødt til at fortælle \LaTeX\ at vi bruger apalike.
+
+Det kan du gøre ved at tilføje følgende i præamblen:
+\begin{verbatim}
+ \usepackage[apalike]{dk-bib}
+\end{verbatim}
+
+\section{ISBN-, ISSN- og URL-felter}
+Hvis \BibTeX-databasen indeholder \textsc{isbn}-, \textsc{issn}- eller
+\textsc{url}-felter og du ønsker at have disse med i din
+litteraturliste kan du gøre bruge at \LaTeX-pakken \texttt{dk-bib}.
+
+I præamblen af dit \LaTeX-dokument tilføjer du
+\begin{verbatim}
+ \usepackage[isbn,issn,url]{dk-bib}
+\end{verbatim}
+
+Hvis du er utilfreds med måden disse felter bliver sat på er det
+muligt at definere din egen måde. Det gør du ved i præamblen at
+definere en eller flere af kommandoerne \verb|\dkbibisbn|,
+\verb|\dkbibissn| og \verb|\dkbiburl|. De skal alle tage ét argument,
+henholdsvis \textsc{isbn}"-nummeret, \textsc{issn}"-nummeret og
+\textsc{url}'en.
+
+Følgende eksempel sætter ordet \textsc{isbn} med kapitæler og gør
+\textsc{isbn}-nummeret til et link (ved hjælp af hyperref-pakken):
+\begin{verbatim}
+ \newcommand{\dkbibisbn}[1]{%
+ \textsc{isbn} \href{http://isbn.nu/#1}{#1}}
+\end{verbatim}
+
+\section{"`Printing"'-feltet til oplagsnumre}
+Ønsker du at medtage hvilket oplag af en publikation du referer eller
+henviser til kan du gøre brug af \verb|printing|-feltet. I
+\verb|.bib|-filen tilføjes for eksempel nedenstående ved en
+publikation:
+\begin{verbatim}
+ printing = {1},
+\end{verbatim}
+
+Af hensyn til bagudkompatibiliteten medtages dette dog ikke i
+litteraturlisten før det aktiveres ved at tilføje \verb|printing| som
+tilvalg til \verb|dk-bib|-pakken:
+\begin{verbatim}
+ \usepackage[printing]{dk-bib}
+\end{verbatim}
+
+Bemærk at de danske \BibTeX-stilarter er de eneste der benytter
+\verb|printing|-feltet og at der tilsyneladende ikke er andre
+\BibTeX-stilarter der medtager oplagsinformation. Deler du dine
+\verb|.bib|-filer med andre \LaTeX-brugere kan du derfor ikke
+umiddelbart forvente at de vil kunne gøre brug af oplagsnummeret i
+dine \verb|.bib|-filer eller at du har glæde af oplagsnumre i deres.
+
+\section{Ordenstal i "`edition"'- og "`printing"'-felterne}
+Hvis du udveksler \BibTeX-databasefiler (\texttt{.bib}-filer) med
+andre \LaTeX-brugere vil du måske bemærke at der er tradition for at
+skrive udgavenummeret med ord og på engelsk, for eksempel
+
+\begin{verbatim}
+ edition = {second},
+\end{verbatim}
+
+De danske \BibTeX-stilarter oversætter disse (op til
+\makeatletter
+\@nameuse{dkbib@word\the\dkbib@maxordinaldepth}
+\makeatother
+udgave) til \emph{2.~udgave}. På samme vis oversættes oplagsnummeret.
+
+Ønsker du at der i din danske litteraturliste i stedet for for
+eksempel \emph{2.~udgave} står \emph{anden udgave} kan du bruge
+\LaTeX-pakken \texttt{dk-bib} således:
+
+\begin{verbatim}
+ \usepackage[ordinals2word]{dk-bib}
+\end{verbatim}
+
+Bemærk at udgave og oplag bliver omskrevet uanset om der i
+\BibTeX-databasen står \emph{second} som ovenfor eller for eksempel
+
+\begin{verbatim}
+ edition = {2},
+\end{verbatim}
+
+Som udgangspunkt omskrives i dette tilfælde alle udgave- og
+oplagsnumre op til og med
+\makeatletter
+\emph{\@nameuse{dkbib@word\the\dkbib@maxordinaldepth}}%
+\makeatother%
+, men du kan selv sætte en \emph{lavere}
+grænse med
+\begin{verbatim}
+ \usepackage[ordinals2word,ordinaldepth=10]{dk-bib}
+\end{verbatim}
+
+\section{"`Annote"'-feltet til kommentarer}
+Blandt \BibTeX's "`standardfelter"' finder vi \texttt{annote}-feltet
+der kan bruges til at fremstille en kommenteret litteraturliste.
+
+Ønsker du at få disse kommentarer med i din litteraturliste bruges
+\texttt{annote}-tilvalget til \texttt{dk-bib}-pakken:
+
+\begin{verbatim}
+ \usepackage[annote]{dk-bib}
+\end{verbatim}
+
+Kommentarerne bliver sat i en typografi der minder om dem der anvendes
+af \BibTeX-stilarterne annotate og annotation.
+
+Du kan bestemme en anden typografi ved at definere kommandoen
+\verb|\dkbibannote| i præamblen. Kommandoen skal tage to argumenter;
+nøglen i \BibTeX-databasen og selve kommentaren, for eksempel
+
+\begin{verbatim}
+ \newcommand{\dkbibannote}[2]{\textbf{#1:} #2}
+\end{verbatim}
+
+\section{"`Specialeafhandling"' og "`Ph.d.-afhandling"'}
+De danske \BibTeX-stilarter oversætter felterne \emph{Master's
+ thesis} og \emph{PhD thesis} til henholdsvis
+\emph{Specialeafhandling} og \emph{Ph.d.-afhandling}.
+
+Nogle uddannelsesinstitutioner bruger ikke begrebet
+\emph{specialeafhandling}, men for eksempel \emph{hovedopgave} eller
+slet og ret \emph{speciale}. Andre kan få ret ophidsede diskussioner
+ud af stavemåden af ph.d.
+
+Måden man løser dette på er (helt uafhængigt af dk-bib) at indsætte
+et \texttt{type}-felt i \BibTeX-databasen ved den pågældende
+afhandling, for eksempel
+\begin{verbatim}
+ type = {Hovedopgave},
+\end{verbatim}
+eller
+\begin{verbatim}
+ type = {{PhD}-afhandling},
+\end{verbatim}
+
+Sidstnævnte er i øvrigt ikke noget forsvar af eller undskyldning for
+at anvende en anden stavemåde end den af Dansk Sprognævn anbefalede,
+nemlig \emph{ph.d.} (og husk at det ved lov er bestemt at offentlige
+myndigheder skal følge sprognævnets anvisninger).
+
+\section{Dansk sortering med \BibTeX8}
+Da \BibTeX\ ikke er i stand til at sortere de andre bogstaver end A-Z
+og a-z korrekt kan vi på dansk med fordel anvende \BibTeX8.
+
+\BibTeX8 beskrives i \cite[afsnit~13.1.1]{Mittelbach:2004} og leveres som
+udgangspunkt med en sorteringdefinition der er tilpasset skandinaviske
+sprog og \textsc{iso} 8859-1-tegnsættet. Denne sortering tager dog kun
+højde for Æ, æ, Ø, ø, Å og å og sorterer derfor ikke accentuerede
+bogstaver med mere korrekt.
+
+\begin{table}
+ \centering
+ \begin{tabular}{ll}
+\toprule
+\emph{Sorteringsdefinition} & \emph{Tilvalg til {\ttfamily inputenc}-pakken}\\
+\midrule
+88591-dk & latin1, latin9, ansinew, cp1252\\
+cp850-dk & cp850\\
+mac-dk & applemac\\
+utf8-dk (eksperimentiel!) & utf8, utf8x\\
+\bottomrule
+\end{tabular}
+\caption{Sorteringsdefinitioner til \BibTeX8 og de tilsvarende tilvalg
+ til \texttt{inputenc}-pakken.}
+\label{tab:csf-inputenc}
+\end{table}
+
+Sammen med denne pakke leveres derfor også et antal
+sorteringsdefinitioner tilpasset dansk sortering og flere tegnsæt. Se
+sammenhængen mellem sorteringsdefinitioner og tilvalg til
+\texttt{inputenc}-pakken i tabel~\vref{tab:csf-inputenc}.
+
+Hvis din \BibTeX-database skal sorteres med \texttt{bibtex8} skal den
+skrives i samme tegnsæt som \LaTeX-dokumentet anvender og de danske
+bogstaver skal skrives direkte -- det vil sige skriv
+\verb|Svend Åge Madsen| og ikke \verb|Svend \AA{}ge Madsen|.
+
+På grund af måden både \BibTeX\ og \BibTeX8 er konstrueret på er der
+dog et par problemer der kun besværligt lader sig løse.
+
+BibTeX8 kan ikke sortere dobbelt-A under Å, så har du for eksempel en
+forfatter ved navn Ole Aagesen kan du sikre at han placeres korrekt i
+bibliografien ved at indskrive følgende i starten af
+\texttt{bib}-filen:
+\begin{verbatim}
+ @preamble{ "\providecommand{\Aa}[1]{Aa}" }
+\end{verbatim}
+og herefter skrive forfatteren ind i \texttt{bib}-filen som (antallet
+af \verb|{}| er vigtigt)
+\begin{verbatim}
+ author = {Ole {\Aa{Å}}gesen}
+\end{verbatim}
+
+Ligeledes kan \BibTeX8 heller ikke sortere det islandske \TH\ korrekt
+under Th. Løsningen er her at skrive (igen er antallet af \verb|{}|
+vigtigt)
+\begin{verbatim}
+ author = {\TH{}orvaldur Bjarnarson}
+\end{verbatim}
+
+Slutteligt vil jeg \emph{advare} mod at bruge sorteringsdefinitionen
+til \textsc{utf-8}-tegnsættet uden omhyggelig korrekturlæsning.
+Sorteringsdefinitionen benytter sig af en række ikke"-dokumenterede
+effekter ved \texttt{bibtex8} og på grund af
+\textsc{utf-8}-tegnsættets og \BibTeX8's opbygning kan der forekomme
+en række sammenfald mellem sjældent og hyppigere brugte bogstaver (for
+eksempel \L{} og \'{A}).
+
+\section{Fejl, forbedringer og tak}
+Finder du fejl i oversættelserne, \BibTeX-stilarterne, \LaTeX-pakken
+eller har du blot forslag til forbedring er du hjertelig velkommen til
+at sende dem via \href{mailto:arne.jorgensen@tug.dk}{e-post} eller på
+\url{https://arnested.dk/projects/dk-bib}.
+
+De danske \BibTeX-stilarter er oprindeligt oversat fra den norske
+oversættelse af de oprindelige stilarter. En stor tak til Dag Langmyhr
+for disse. En tak skal også lyde til Thomas Esser, Morten Høgholm,
+Mads Sørensen, Rasmus Villemoes, Thomas Widmann og min kære broder,
+Palle Jørgensen, for at bidrage med kommentarer og forslag.
+
+\bibliography{litteratur}
+
+\end{document}
+
+%%% Local Variables:
+%%% mode: latex
+%%% TeX-master: t
+%%% End:
diff --git a/biblio/bibtex/contrib/dk-bib/dk-bib.pdf b/biblio/bibtex/contrib/dk-bib/dk-bib.pdf
new file mode 100644
index 0000000000..8e0aa5bf17
--- /dev/null
+++ b/biblio/bibtex/contrib/dk-bib/dk-bib.pdf
Binary files differ
diff --git a/biblio/bibtex/contrib/dk-bib/dk-bib.sty b/biblio/bibtex/contrib/dk-bib/dk-bib.sty
new file mode 100644
index 0000000000..b5d61f468f
--- /dev/null
+++ b/biblio/bibtex/contrib/dk-bib/dk-bib.sty
@@ -0,0 +1,202 @@
+% Copyright (C) 2004, 2005, 2006 Arne Jorgensen
+
+% This file is free software; you can redistribute it and/or modify it
+% under the terms of the GNU General Public License as published by
+% the Free Software Foundation; either version 2 of the License, or
+% (at your option) any later version.
+
+% This file is distributed in the hope that it will be useful, but
+% WITHOUT ANY WARRANTY; without even the implied warranty of
+% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+% General Public License for more details.
+
+% You should have received a copy of the GNU General Public License
+% along with this file; if not, write to the Free Software Foundation,
+% Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+
+\NeedsTeXFormat{LaTeX2e}[1995/12/01]
+
+% subversion date and revision
+\def\dkbib@svn $#1 #2 #3 #4-#5-#6 #7 #8 ${%
+ \def\dkbib@sty@revision{#3}
+ \def\dkbib@sty@date{#4/#5/#6}
+}
+\dkbib@svn $Id: dk-bib.sty 92 2006-05-21 21:18:10Z arne $
+\def\dkbib@version{0.6}
+
+\ProvidesPackage{dk-bib}[\dkbib@sty@date\space v\dkbib@version\space(r\dkbib@sty@revision) Danish variants of the standard BibTeX styles]
+
+\RequirePackage{xkeyval}
+
+\newif\ifdkbib@url
+\dkbib@urlfalse
+\DeclareOptionX{url}[true]{%
+ \csname dkbib@url#1\endcsname}
+
+\newif\ifdkbib@isbn
+\dkbib@isbnfalse
+\DeclareOptionX{isbn}[true]{%
+ \csname dkbib@isbn#1\endcsname}
+
+\newif\ifdkbib@issn
+\dkbib@issnfalse
+\DeclareOptionX{issn}[true]{%
+ \csname dkbib@issn#1\endcsname}
+
+\newif\ifdkbib@annote
+\dkbib@annotefalse
+\DeclareOptionX{annote}[true]{%
+ \csname dkbib@annote#1\endcsname}
+
+\newif\ifdkbib@printing
+\dkbib@printingfalse
+\DeclareOptionX{printing}[true]{%
+ \csname dkbib@printing#1\endcsname}
+
+\newif\ifdkbib@apalike
+\dkbib@apalikefalse
+\DeclareOptionX{apalike}[true]{%
+ \csname dkbib@apalike#1\endcsname}
+
+\newif\ifdkbib@fixcitedash
+\dkbib@fixcitedashtrue
+\DeclareOptionX{fixcitedash}[true]{%
+ \csname dkbib@fixcitedash#1\endcsname}
+
+\newcount\dkbib@maxordinaldepth
+\dkbib@maxordinaldepth0
+\newcommand*\dkbib@DeclareOrdinalWord[2]{
+ \ifnum#1>\dkbib@maxordinaldepth
+ \dkbib@maxordinaldepth#1
+ \fi
+ \@namedef{dkbib@word#1}{#2}%
+}
+\dkbib@DeclareOrdinalWord{1}{f\o rste}
+\dkbib@DeclareOrdinalWord{2}{anden}
+\dkbib@DeclareOrdinalWord{3}{tredje}
+\dkbib@DeclareOrdinalWord{4}{fjerde}
+\dkbib@DeclareOrdinalWord{5}{femte}
+\dkbib@DeclareOrdinalWord{6}{sjette}
+\dkbib@DeclareOrdinalWord{7}{syvende}
+\dkbib@DeclareOrdinalWord{8}{ottende}
+\dkbib@DeclareOrdinalWord{9}{niende}
+\dkbib@DeclareOrdinalWord{10}{tiende}
+\dkbib@DeclareOrdinalWord{11}{elvte}
+\dkbib@DeclareOrdinalWord{12}{tolvte}
+\dkbib@DeclareOrdinalWord{13}{trettende}
+\dkbib@DeclareOrdinalWord{14}{fjortende}
+\dkbib@DeclareOrdinalWord{15}{femtende}
+\dkbib@DeclareOrdinalWord{16}{sekstende}
+\dkbib@DeclareOrdinalWord{17}{syttende}
+\dkbib@DeclareOrdinalWord{18}{attende}
+\dkbib@DeclareOrdinalWord{19}{nittende}
+\dkbib@DeclareOrdinalWord{20}{tyvende}
+
+\newcount\dkbib@ordinaldepth
+\dkbib@ordinaldepth\dkbib@maxordinaldepth
+\DeclareOptionX{ordinaldepth}{%
+ \dkbib@ordinaldepth#1}
+
+\ifnum\dkbib@ordinaldepth>\dkbib@maxordinaldepth
+ \PackageWarningNoLine{dk-bib}{Ordinal depth set to
+ \the\dkbib@ordinaldepth, but maximum is \the\dkbib@maxordinaldepth}
+\fi
+
+\newif\ifdkbib@ordinalstoword
+\dkbib@ordinalstowordfalse
+\DeclareOptionX{ordinals2word}[true]{%
+ \csname dkbib@ordinalstoword#1\endcsname}
+
+\ProcessOptionsX
+
+% Work around a wrong implementation of \MakeUppercase (according to
+% Morten H\o gholm who also provided this implementation)
+\DeclareRobustCommand\dkbib@MakeUppercase[1]{%
+ \begingroup
+ \def\i{I}\def\j{J}%
+ \def\dkbib@reserved@a##1##2{\let##1##2\dkbib@reserved@a}%
+ \expandafter\dkbib@reserved@a\@uclclist\dkbib@reserved@b{\dkbib@reserved@b\@gobble}%
+ \protected@edef\dkbib@reserved@a{\endgroup\uppercase{#1}}%
+ \dkbib@reserved@a
+}
+\protected@edef\dkbib@MakeUppercase#1{\dkbib@MakeUppercase{#1}}
+
+\AtBeginDocument{%
+ %%% fixcitedash
+ \@ifpackageloaded{cite}%
+ {\ifdkbib@fixcitedash%
+ \providecommand{\dkbibdash}{\hbox{-}\penalty\@m}%
+ \renewcommand{\citedash}{\dkbibdash}%
+ \fi}%
+ {\relax}%
+ %%% apalike
+ \ifdkbib@apalike%
+ \RequirePackage{dk-apali}%
+ \fi%
+ %%% url
+ \ifdkbib@url%
+ \RequirePackage{url}%
+ \providecommand{\dkbiburl}[1]{URL \url{#1}}%
+ \else%
+ \def\dkbiburl#1{\unskip\@gobble}%
+ \fi%
+ %%% isbn
+ \ifdkbib@isbn%
+ \providecommand{\dkbibisbn}[1]{ISBN #1}%
+ \else%
+ \def\dkbibisbn#1{\unskip\@gobble}%
+ \fi%
+ %%% issn
+ \ifdkbib@issn%
+ \providecommand{\dkbibissn}[1]{ISSN #1}%
+ \else%
+ \def\dkbibissn#1{\unskip\@gobble}%
+ \fi%
+ %%% annote
+ \ifdkbib@annote%
+ \providecommand{\dkbibannote}[2]{%
+ \begin{quotation}\noindent
+ \dkbib@MakeUppercase #2
+ \end{quotation}
+ }%
+ \else%
+ \def\dkbibannote#1#2{\unskip}%
+ \fi%
+ %%% edition/printing
+ \DeclareRobustCommand{\dkbibedition}[2]{%
+ \ifx\@empty#1\@empty\else%
+ \ifdkbib@ordinalstoword%
+ \@ifundefined{dkbib@word#1}%
+ {#1\dkbib@addperiod~udgave}%
+ {\ifnum#1>\dkbib@ordinaldepth
+ #1\dkbib@addperiod~udgave%
+ \else
+ \@nameuse{dkbib@word#1}~udgave%
+ \fi}%
+ \else
+ #1\dkbib@addperiod~udgave%
+ \fi
+ \ifdkbib@printing
+ \ifx\@empty#2\@empty\else, \fi
+ \fi
+ \fi
+ \ifdkbib@printing
+ \ifx\@empty#2\@empty\else
+ \ifdkbib@ordinalstoword%
+ \@ifundefined{dkbib@word#2}%
+ {#2\dkbib@addperiod~oplag}%
+ {\ifnum#2>\dkbib@ordinaldepth
+ #2\dkbib@addperiod~oplag%
+ \else
+ \@nameuse{dkbib@word#2}~oplag%
+ \fi}%
+ \else
+ #2\dkbib@addperiod~oplag%
+ \fi
+ \fi
+ \fi
+ }
+ \DeclareRobustCommand\dkbibEdition[2]{%
+ \protected@edef\reserved@a{\csname dkbibedition \endcsname{#1}{#2}}%
+ \expandafter\dkbib@MakeUppercase\reserved@a}
+}
diff --git a/biblio/bibtex/contrib/dk-bib/dk-plain.bst b/biblio/bibtex/contrib/dk-bib/dk-plain.bst
new file mode 100644
index 0000000000..f61bcc6179
--- /dev/null
+++ b/biblio/bibtex/contrib/dk-bib/dk-plain.bst
@@ -0,0 +1,1301 @@
+% BibTeX standard bibliography style `plain'
+ % version 0.99a for BibTeX versions 0.99a or later, LaTeX version 2.09.
+ % Copyright (C) 1985, all rights reserved.
+ % Copying of this file is authorized only if either
+ % (1) you make absolutely no changes to your copy, including name, or
+ % (2) if you do make changes, you name it something other than
+ % btxbst.doc, plain.bst, unsrt.bst, alpha.bst, and abbrv.bst.
+ % This restriction helps ensure that all standard styles are identical.
+ % The file btxbst.doc has the documentation for this style.
+
+% "Translated" into Norwegian by dag@ifi.uio.no, July 1997.
+% Now called `norplain'.
+% Added field "isbn" and "issn". dag@ifi.uio.no, April 2001.
+% Translated into Danish by arne.jorgensen@tug.dk, June 2001.
+% Now called `dk-plain'.
+% This is dk-bib, Version 0.6 ($Id: dk-plain.bst 92 2006-05-21 21:18:10Z arne $)
+
+ENTRY
+ { address
+ author
+ booktitle
+ chapter
+ edition
+ printing
+ editor
+ howpublished
+ institution
+ isbn
+ issn
+ url
+ annote
+ journal
+ key
+ month
+ note
+ number
+ organization
+ pages
+ publisher
+ school
+ series
+ title
+ type
+ volume
+ year
+ }
+ {}
+ { label }
+
+INTEGERS { output.state before.all mid.sentence after.sentence after.block }
+
+FUNCTION {init.state.consts}
+{ #0 'before.all :=
+ #1 'mid.sentence :=
+ #2 'after.sentence :=
+ #3 'after.block :=
+}
+
+STRINGS { s t }
+
+FUNCTION {output.nonnull}
+{ 's :=
+ output.state mid.sentence =
+ { ", " * write$ }
+ { output.state after.block =
+ { add.period$ write$
+ newline$
+ "\newblock " write$
+ }
+ { output.state before.all =
+ 'write$
+ { add.period$ " " * write$ }
+ if$
+ }
+ if$
+ mid.sentence 'output.state :=
+ }
+ if$
+ s
+}
+
+FUNCTION {output}
+{ duplicate$ empty$
+ 'pop$
+ 'output.nonnull
+ if$
+}
+
+FUNCTION {output.check}
+{ 't :=
+ duplicate$ empty$
+ { pop$ "empty " t * " in " * cite$ * warning$ }
+ 'output.nonnull
+ if$
+}
+
+FUNCTION {output.bibitem}
+{ newline$
+ "\bibitem{" write$
+ cite$ write$
+ "}" write$
+ newline$
+ ""
+ before.all 'output.state :=
+}
+
+FUNCTION {output.annote}
+{ annote empty$
+ 'skip$
+ { "\dkbibannote{" cite$ * "}{" * annote add.period$ * "}" *
+ write$ newline$ }
+ if$
+}
+
+FUNCTION {fin.entry}
+{ add.period$
+ write$
+ newline$
+ output.annote
+}
+
+FUNCTION {new.block}
+{ output.state before.all =
+ 'skip$
+ { after.block 'output.state := }
+ if$
+}
+
+FUNCTION {output.isbn.issn}
+{ isbn empty$
+ 'skip$
+ { new.block "\dkbibisbn{" isbn * "}" * output }
+ if$
+ issn empty$
+ 'skip$
+ { new.block "\dkbibissn{" issn * "}" * output }
+ if$
+}
+
+FUNCTION {output.url}
+{ url empty$
+ 'skip$
+ { new.block "\dkbiburl{" url * "}" * output }
+ if$
+}
+
+FUNCTION {new.sentence}
+{ output.state after.block =
+ 'skip$
+ { output.state before.all =
+ 'skip$
+ { after.sentence 'output.state := }
+ if$
+ }
+ if$
+}
+
+FUNCTION {not}
+{ { #0 }
+ { #1 }
+ if$
+}
+
+FUNCTION {and}
+{ 'skip$
+ { pop$ #0 }
+ if$
+}
+
+FUNCTION {or}
+{ { pop$ #1 }
+ 'skip$
+ if$
+}
+
+FUNCTION {new.block.checka}
+{ empty$
+ 'skip$
+ 'new.block
+ if$
+}
+
+FUNCTION {new.block.checkb}
+{ empty$
+ swap$ empty$
+ and
+ 'skip$
+ 'new.block
+ if$
+}
+
+FUNCTION {new.sentence.checka}
+{ empty$
+ 'skip$
+ 'new.sentence
+ if$
+}
+
+FUNCTION {new.sentence.checkb}
+{ empty$
+ swap$ empty$
+ and
+ 'skip$
+ 'new.sentence
+ if$
+}
+
+FUNCTION {field.or.null}
+{ duplicate$ empty$
+ { pop$ "" }
+ 'skip$
+ if$
+}
+
+FUNCTION {emphasize}
+{ duplicate$ empty$
+ { pop$ "" }
+ { "\emph{" swap$ * "}" * }
+ if$
+}
+
+INTEGERS { nameptr namesleft numnames }
+
+FUNCTION {format.names}
+{ 's :=
+ #1 'nameptr :=
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ { s nameptr "{ff~}{vv }{ll}{~jj}" format.name$ 't :=
+ nameptr #1 >
+ { namesleft #1 >
+ { ", " * t * }
+ { t "others" =
+ { " et~al." * }
+ { " og " * t * }
+ if$
+ }
+ if$
+ }
+ 't
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+}
+
+FUNCTION {format.authors}
+{ author empty$
+ { "" }
+ { author format.names }
+ if$
+}
+
+FUNCTION {format.editors}
+{ editor empty$
+ { "" }
+ { editor format.names
+ editor num.names$ #1 >
+ { ", redakt\o rer" * }
+ { ", redakt\o r" * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.title}
+{ title empty$
+ { "" }
+ { title "t" change.case$ }
+ if$
+}
+
+FUNCTION {n.dashify}
+{ 't :=
+ ""
+ { t empty$ not }
+ { t #1 #1 substring$ "-" =
+ { "\dkbibdash" *
+ t #2 global.max$ substring$ 't :=
+ { t #1 #1 substring$ "-" = }
+ { t #2 global.max$ substring$ 't := }
+ while$
+ t #1 #1 substring$ " " =
+ { "{}" * }
+ { " " * }
+ if$
+ }
+ { t #1 #1 substring$ *
+ t #2 global.max$ substring$ 't :=
+ }
+ if$
+ }
+ while$
+}
+
+FUNCTION {format.date}
+{ year empty$
+ { month empty$
+ { "" }
+ { "there's a month but no year in " cite$ * warning$
+ month
+ }
+ if$
+ }
+ { month empty$
+ 'year
+ { month " " * year * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.btitle}
+{ title emphasize
+}
+
+FUNCTION {tie.or.space.connect}
+{ duplicate$ text.length$ #3 <
+ { "~" }
+ { " " }
+ if$
+ swap$ * *
+}
+
+FUNCTION {either.or.check}
+{ empty$
+ 'pop$
+ { "can't use both " swap$ * " fields in " * cite$ * warning$ }
+ if$
+}
+
+FUNCTION {format.bvolume}
+{ volume empty$
+ { "" }
+ { "bind" volume tie.or.space.connect
+ series empty$
+ 'skip$
+ { " af " * series emphasize * }
+ if$
+ "volume and number" number either.or.check
+ }
+ if$
+}
+
+FUNCTION {format.number.series}
+{ volume empty$
+ { number empty$
+ { series field.or.null }
+ { output.state mid.sentence =
+ { "nr." }
+ { "Nr." }
+ if$
+ number tie.or.space.connect
+ series empty$
+ { "there's a number but no series in " cite$ * warning$ }
+ { " i " * series * }
+ if$
+ }
+ if$
+ }
+ { "" }
+ if$
+}
+
+FUNCTION {ordinal.translate.i}
+{ duplicate$ "l" change.case$ "first" =
+ {pop$ "1"}
+ {skip$}
+ if$
+ duplicate$ "l" change.case$ "second" =
+ {pop$ "2"}
+ {skip$}
+ if$
+ duplicate$ "l" change.case$ "third" =
+ {pop$ "3"}
+ {skip$}
+ if$
+ duplicate$ "l" change.case$ "fourth" =
+ {pop$ "4"}
+ {skip$}
+ if$
+ duplicate$ "l" change.case$ "fifth" =
+ {pop$ "5"}
+ {skip$}
+ if$
+}
+
+FUNCTION {ordinal.translate.ii}
+{ duplicate$ "l" change.case$ "sixth" =
+ {pop$ "6"}
+ {skip$}
+ if$
+ duplicate$ "l" change.case$ "seventh" =
+ {pop$ "7"}
+ {skip$}
+ if$
+ duplicate$ "l" change.case$ "eighth" =
+ {pop$ "8"}
+ {skip$}
+ if$
+ duplicate$ "l" change.case$ "ninth" =
+ {pop$ "9"}
+ {skip$}
+ if$
+ duplicate$ "l" change.case$ "tenth" =
+ {pop$ "10"}
+ {skip$}
+ if$
+}
+
+FUNCTION {ordinal.translate.iii}
+{ duplicate$ "l" change.case$ "eleventh" =
+ {pop$ "11"}
+ {skip$}
+ if$
+ duplicate$ "l" change.case$ "twelfth" =
+ {pop$ "12"}
+ {skip$}
+ if$
+ duplicate$ "l" change.case$ "thirteenth" =
+ {pop$ "13"}
+ {skip$}
+ if$
+ duplicate$ "l" change.case$ "fourteenth" =
+ {pop$ "14"}
+ {skip$}
+ if$
+ duplicate$ "l" change.case$ "fifteenth" =
+ {pop$ "15"}
+ {skip$}
+ if$
+}
+
+FUNCTION {ordinal.translate.iv}
+{ duplicate$ "l" change.case$ "sixteenth" =
+ {pop$ "16"}
+ {skip$}
+ if$
+ duplicate$ "l" change.case$ "seventeenth" =
+ {pop$ "17"}
+ {skip$}
+ if$
+ duplicate$ "l" change.case$ "eighteenth" =
+ {pop$ "18"}
+ {skip$}
+ if$
+ duplicate$ "l" change.case$ "nineteenth" =
+ {pop$ "19"}
+ {skip$}
+ if$
+ duplicate$ "l" change.case$ "twentieth" =
+ {pop$ "20"}
+ {skip$}
+ if$
+}
+
+FUNCTION {ordinal.translate}
+{ ordinal.translate.i
+ ordinal.translate.ii
+ ordinal.translate.iii
+ ordinal.translate.iv
+}
+
+FUNCTION {format.edition}
+{ edition empty$
+ printing empty$
+ +
+ #2
+ =
+ { "" }
+ { output.state mid.sentence =
+ { "\dkbibedition{" }
+ { "\dkbibEdition{" }
+ if$
+ edition empty$
+ { "" }
+ { edition ordinal.translate
+ duplicate$ "l" change.case$
+ duplicate$ "u" change.case$
+ =
+ { purify$ }
+ { output.state mid.sentence =
+ { skip$ }
+ { "u" change.case$
+ "t" change.case$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+ * "}{" *
+ printing empty$
+ { "" }
+ { printing ordinal.translate
+ duplicate$ "l" change.case$
+ duplicate$ "u" change.case$
+ =
+ { purify$ }
+ { skip$ }
+ if$
+ }
+ if$
+ * "}" *
+ }
+ if$
+}
+
+INTEGERS { multiresult }
+
+FUNCTION {multi.page.check}
+{ 't :=
+ #0 'multiresult :=
+ { multiresult not
+ t empty$ not
+ and
+ }
+ { t #1 #1 substring$
+ duplicate$ "-" =
+ swap$ duplicate$ "," =
+ swap$ "+" =
+ or or
+ { #1 'multiresult := }
+ { t #2 global.max$ substring$ 't := }
+ if$
+ }
+ while$
+ multiresult
+}
+
+FUNCTION {format.pages}
+{ pages empty$
+ { "" }
+ { pages multi.page.check
+ { "side" pages n.dashify tie.or.space.connect }
+ { "side" pages tie.or.space.connect }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.vol.num.pages}
+{ volume field.or.null
+ number empty$
+ 'skip$
+ { "(" number * ")" * *
+ volume empty$
+ { "there's a number but no volume in " cite$ * warning$ }
+ 'skip$
+ if$
+ }
+ if$
+ pages empty$
+ 'skip$
+ { duplicate$ empty$
+ { pop$ format.pages }
+ { ":" * pages n.dashify * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.chapter.pages}
+{ chapter empty$
+ 'format.pages
+ { type empty$
+ { "kapitel" }
+ { type "l" change.case$ }
+ if$
+ chapter tie.or.space.connect
+ pages empty$
+ 'skip$
+ { ", " * format.pages * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.in.ed.booktitle}
+{ booktitle empty$
+ { "" }
+ { editor empty$
+ { "I " booktitle emphasize * }
+ { "I " format.editors * ", " * booktitle emphasize * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {empty.misc.check}
+{ author empty$ title empty$ howpublished empty$
+ month empty$ year empty$ note empty$ isbn empty$ issn empty$
+ and and and and and and and
+ key empty$ not and
+ { "all relevant fields are empty in " cite$ * warning$ }
+ 'skip$
+ if$
+}
+
+FUNCTION {format.thesis.type}
+{ type empty$
+ 'skip$
+ { pop$
+ type "t" change.case$
+ }
+ if$
+}
+
+FUNCTION {format.tr.number}
+{ type empty$
+ { "Rapport" }
+ 'type
+ if$
+ number empty$
+ { "t" change.case$ }
+ { number tie.or.space.connect }
+ if$
+}
+
+FUNCTION {format.article.crossref}
+{ key empty$
+ { journal empty$
+ { "need key or journal for " cite$ * " to crossref " * crossref *
+ warning$
+ ""
+ }
+ { "I \emph{" journal * "}" * }
+ if$
+ }
+ { "I " key * }
+ if$
+ " \cite{" * crossref * "}" *
+}
+
+FUNCTION {format.crossref.editor}
+{ editor #1 "{vv }{ll}" format.name$
+ editor num.names$ duplicate$
+ #2 >
+ { pop$ " et~al." * }
+ { #2 <
+ 'skip$
+ { editor #2 "{ff~}{vv }{ll}{~jj}" format.name$ "others" =
+ { " et~al." * }
+ { " og " * editor #2 "{vv }{ll}" format.name$ * }
+ if$
+ }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.book.crossref}
+{ volume empty$
+ { "empty volume in " cite$ * "'s crossref of " * crossref * warning$
+ "I "
+ }
+ { "Bind" volume tie.or.space.connect
+ " af " *
+ }
+ if$
+ editor empty$
+ editor field.or.null author field.or.null =
+ or
+ { key empty$
+ { series empty$
+ { "need editor, key, or series for " cite$ * " to crossref " *
+ crossref * warning$
+ "" *
+ }
+ { "\emph{" * series * "}" * }
+ if$
+ }
+ { key * }
+ if$
+ }
+ { format.crossref.editor * }
+ if$
+ " \cite{" * crossref * "}" *
+}
+
+FUNCTION {format.incoll.inproc.crossref}
+{ editor empty$
+ editor field.or.null author field.or.null =
+ or
+ { key empty$
+ { booktitle empty$
+ { "need editor, key, or booktitle for " cite$ * " to crossref " *
+ crossref * warning$
+ ""
+ }
+ { "I \emph{" booktitle * "}" * }
+ if$
+ }
+ { "I " key * }
+ if$
+ }
+ { "I " format.crossref.editor * }
+ if$
+ " \cite{" * crossref * "}" *
+}
+
+FUNCTION {article}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.title "title" output.check
+ new.block
+ crossref missing$
+ { journal emphasize "journal" output.check
+ format.vol.num.pages output
+ format.date "year" output.check
+ }
+ { format.article.crossref output.nonnull
+ format.pages output
+ }
+ if$
+ new.block
+ note output
+ output.isbn.issn
+ output.url
+ fin.entry
+}
+
+FUNCTION {book}
+{ output.bibitem
+ author empty$
+ { format.editors "author and editor" output.check }
+ { format.authors output.nonnull
+ crossref missing$
+ { "author and editor" editor either.or.check }
+ 'skip$
+ if$
+ }
+ if$
+ new.block
+ format.btitle "title" output.check
+ crossref missing$
+ { format.bvolume output
+ new.block
+ format.number.series output
+ new.sentence
+ publisher "publisher" output.check
+ address output
+ }
+ { new.block
+ format.book.crossref output.nonnull
+ }
+ if$
+ format.edition output
+ format.date "year" output.check
+ new.block
+ note output
+ output.isbn.issn
+ output.url
+ fin.entry
+}
+
+FUNCTION {booklet}
+{ output.bibitem
+ format.authors output
+ new.block
+ format.title "title" output.check
+ howpublished address new.block.checkb
+ howpublished output
+ address output
+ format.date output
+ new.block
+ note output
+ output.isbn.issn
+ output.url
+ fin.entry
+}
+
+FUNCTION {inbook}
+{ output.bibitem
+ author empty$
+ { format.editors "author and editor" output.check }
+ { format.authors output.nonnull
+ crossref missing$
+ { "author and editor" editor either.or.check }
+ 'skip$
+ if$
+ }
+ if$
+ new.block
+ format.btitle "title" output.check
+ crossref missing$
+ { format.bvolume output
+ format.chapter.pages "chapter and pages" output.check
+ new.block
+ format.number.series output
+ new.sentence
+ publisher "publisher" output.check
+ address output
+ }
+ { format.chapter.pages "chapter and pages" output.check
+ new.block
+ format.book.crossref output.nonnull
+ }
+ if$
+ format.edition output
+ format.date "year" output.check
+ new.block
+ note output
+ output.isbn.issn
+ output.url
+ fin.entry
+}
+
+FUNCTION {incollection}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.title "title" output.check
+ new.block
+ crossref missing$
+ { format.in.ed.booktitle "booktitle" output.check
+ format.bvolume output
+ format.number.series output
+ format.chapter.pages output
+ new.sentence
+ publisher "publisher" output.check
+ address output
+ format.edition output
+ format.date "year" output.check
+ }
+ { format.incoll.inproc.crossref output.nonnull
+ format.chapter.pages output
+ }
+ if$
+ new.block
+ note output
+ output.isbn.issn
+ output.url
+ fin.entry
+}
+
+FUNCTION {inproceedings}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.title "title" output.check
+ new.block
+ crossref missing$
+ { format.in.ed.booktitle "booktitle" output.check
+ format.bvolume output
+ format.number.series output
+ format.pages output
+ address empty$
+ { organization publisher new.sentence.checkb
+ organization output
+ publisher output
+ format.date "year" output.check
+ }
+ { address output.nonnull
+ format.date "year" output.check
+ new.sentence
+ organization output
+ publisher output
+ }
+ if$
+ }
+ { format.incoll.inproc.crossref output.nonnull
+ format.pages output
+ }
+ if$
+ new.block
+ note output
+ output.isbn.issn
+ output.url
+ fin.entry
+}
+
+FUNCTION {conference} { inproceedings }
+
+FUNCTION {manual}
+{ output.bibitem
+ author empty$
+ { organization empty$
+ 'skip$
+ { organization output.nonnull
+ address output
+ }
+ if$
+ }
+ { format.authors output.nonnull }
+ if$
+ new.block
+ format.btitle "title" output.check
+ author empty$
+ { organization empty$
+ { address new.block.checka
+ address output
+ }
+ 'skip$
+ if$
+ }
+ { organization address new.block.checkb
+ organization output
+ address output
+ }
+ if$
+ format.edition output
+ format.date output
+ new.block
+ note output
+ output.isbn.issn
+ output.url
+ fin.entry
+}
+
+FUNCTION {mastersthesis}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.title "title" output.check
+ new.block
+ "Specialeafhandling" format.thesis.type output.nonnull
+ school "school" output.check
+ address output
+ format.date "year" output.check
+ new.block
+ note output
+ output.isbn.issn
+ output.url
+ fin.entry
+}
+
+FUNCTION {misc}
+{ output.bibitem
+ format.authors output
+ title howpublished new.block.checkb
+ format.title output
+ howpublished new.block.checka
+ howpublished output
+ format.date output
+ new.block
+ note output
+ output.isbn.issn
+ output.url
+ fin.entry
+ empty.misc.check
+}
+
+FUNCTION {phdthesis}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.btitle "title" output.check
+ new.block
+ "Ph.d.-afhandling" format.thesis.type output.nonnull
+ school "school" output.check
+ address output
+ format.date "year" output.check
+ new.block
+ note output
+ output.isbn.issn
+ output.url
+ fin.entry
+}
+
+FUNCTION {proceedings}
+{ output.bibitem
+ editor empty$
+ { organization output }
+ { format.editors output.nonnull }
+ if$
+ new.block
+ format.btitle "title" output.check
+ format.bvolume output
+ format.number.series output
+ address empty$
+ { editor empty$
+ { publisher new.sentence.checka }
+ { organization publisher new.sentence.checkb
+ organization output
+ }
+ if$
+ publisher output
+ format.date "year" output.check
+ }
+ { address output.nonnull
+ format.date "year" output.check
+ new.sentence
+ editor empty$
+ 'skip$
+ { organization output }
+ if$
+ publisher output
+ }
+ if$
+ new.block
+ note output
+ output.isbn.issn
+ output.url
+ fin.entry
+}
+
+FUNCTION {techreport}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.title "title" output.check
+ new.block
+ format.tr.number output.nonnull
+ institution "institution" output.check
+ address output
+ format.date "year" output.check
+ new.block
+ note output
+ output.isbn.issn
+ output.url
+ fin.entry
+}
+
+FUNCTION {unpublished}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.title "title" output.check
+ new.block
+ note "note" output.check
+ format.date output
+ output.isbn.issn
+ output.url
+ fin.entry
+}
+
+FUNCTION {default.type} { misc }
+
+MACRO {jan} {"januar"}
+
+MACRO {feb} {"februar"}
+
+MACRO {mar} {"marts"}
+
+MACRO {apr} {"april"}
+
+MACRO {may} {"maj"}
+
+MACRO {jun} {"juni"}
+
+MACRO {jul} {"juli"}
+
+MACRO {aug} {"august"}
+
+MACRO {sep} {"september"}
+
+MACRO {oct} {"oktober"}
+
+MACRO {nov} {"november"}
+
+MACRO {dec} {"december"}
+
+MACRO {acmcs} {"ACM Computing Surveys"}
+
+MACRO {acta} {"Acta Informatica"}
+
+MACRO {cacm} {"Communications of the ACM"}
+
+MACRO {ibmjrd} {"IBM Journal of Research and Development"}
+
+MACRO {ibmsj} {"IBM Systems Journal"}
+
+MACRO {ieeese} {"IEEE Transactions on Software Engineering"}
+
+MACRO {ieeetc} {"IEEE Transactions on Computers"}
+
+MACRO {ieeetcad}
+ {"IEEE Transactions on Computer-Aided Design of Integrated Circuits"}
+
+MACRO {ipl} {"Information Processing Letters"}
+
+MACRO {jacm} {"Journal of the ACM"}
+
+MACRO {jcss} {"Journal of Computer and System Sciences"}
+
+MACRO {scp} {"Science of Computer Programming"}
+
+MACRO {sicomp} {"SIAM Journal on Computing"}
+
+MACRO {tocs} {"ACM Transactions on Computer Systems"}
+
+MACRO {tods} {"ACM Transactions on Database Systems"}
+
+MACRO {tog} {"ACM Transactions on Graphics"}
+
+MACRO {toms} {"ACM Transactions on Mathematical Software"}
+
+MACRO {toois} {"ACM Transactions on Office Information Systems"}
+
+MACRO {toplas} {"ACM Transactions on Programming Languages and Systems"}
+
+MACRO {tcs} {"Theoretical Computer Science"}
+
+READ
+
+FUNCTION {sortify}
+{ purify$
+ "l" change.case$
+}
+
+INTEGERS { len }
+
+FUNCTION {chop.word}
+{ 's :=
+ 'len :=
+ s #1 len substring$ =
+ { s len #1 + global.max$ substring$ }
+ 's
+ if$
+}
+
+FUNCTION {sort.format.names}
+{ 's :=
+ #1 'nameptr :=
+ ""
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ { nameptr #1 >
+ { " " * }
+ 'skip$
+ if$
+ s nameptr "{ll{ }}{ ff{ }}{ vv{ }}{ jj{ }}" format.name$ 't :=
+ nameptr numnames = t "others" = and
+ { "et al" * }
+ { t sortify * }
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+}
+
+FUNCTION {sort.format.title}
+{ 't :=
+ "A " #2
+ "An " #3
+ "The " #4 t chop.word
+ chop.word
+ chop.word
+ sortify
+ #1 global.max$ substring$
+}
+
+FUNCTION {author.sort}
+{ author empty$
+ { key empty$
+ { "to sort, need author or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { author sort.format.names }
+ if$
+}
+
+FUNCTION {author.editor.sort}
+{ author empty$
+ { editor empty$
+ { key empty$
+ { "to sort, need author, editor, or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { editor sort.format.names }
+ if$
+ }
+ { author sort.format.names }
+ if$
+}
+
+FUNCTION {author.organization.sort}
+{ author empty$
+ { organization empty$
+ { key empty$
+ { "to sort, need author, organization, or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { "The " #4 organization chop.word sortify }
+ if$
+ }
+ { author sort.format.names }
+ if$
+}
+
+FUNCTION {editor.organization.sort}
+{ editor empty$
+ { organization empty$
+ { key empty$
+ { "to sort, need editor, organization, or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { "The " #4 organization chop.word sortify }
+ if$
+ }
+ { editor sort.format.names }
+ if$
+}
+
+FUNCTION {presort}
+{ type$ "book" =
+ type$ "inbook" =
+ or
+ 'author.editor.sort
+ { type$ "proceedings" =
+ 'editor.organization.sort
+ { type$ "manual" =
+ 'author.organization.sort
+ 'author.sort
+ if$
+ }
+ if$
+ }
+ if$
+ " "
+ *
+ year field.or.null sortify
+ *
+ " "
+ *
+ title field.or.null
+ sort.format.title
+ *
+ #1 entry.max$ substring$
+ 'sort.key$ :=
+}
+
+ITERATE {presort}
+
+SORT
+
+STRINGS { longest.label }
+
+INTEGERS { number.label longest.label.width }
+
+FUNCTION {initialize.longest.label}
+{ "" 'longest.label :=
+ #1 'number.label :=
+ #0 'longest.label.width :=
+}
+
+FUNCTION {longest.label.pass}
+{ number.label int.to.str$ 'label :=
+ number.label #1 + 'number.label :=
+ label width$ longest.label.width >
+ { label 'longest.label :=
+ label width$ 'longest.label.width :=
+ }
+ 'skip$
+ if$
+}
+
+EXECUTE {initialize.longest.label}
+
+ITERATE {longest.label.pass}
+
+FUNCTION {begin.bib}
+{ preamble$ empty$
+ 'skip$
+ { preamble$ write$ newline$ }
+ if$
+ "\begin{thebibliography}{" longest.label * "}" * write$ newline$
+ "\makeatletter" write$ newline$
+ "\@tfor\dkbib@reserved@a:=0123456789\do{%" write$ newline$
+ " \expandafter\sfcode\expandafter`\dkbib@reserved@a=1007}" write$ newline$
+ "\providecommand{\dkbib@addperiod}{\ifnum\spacefactor=1007.\fi}" write$ newline$
+ "\providecommand{\dkbibedition}[2]{#1\dkbib@addperiod~udgave}" write$ newline$
+ "\providecommand{\dkbibEdition}[2]{#1\dkbib@addperiod~udgave}" write$ newline$
+ "\providecommand{\dkbibisbn}[1]{\unskip\@gobble}" write$ newline$
+ "\providecommand{\dkbibissn}[1]{\unskip\@gobble}" write$ newline$
+ "\providecommand{\dkbiburl}[1]{\unskip\@gobble}" write$ newline$
+ "\providecommand{\dkbibannote}[2]{\unskip}" write$ newline$
+ "\providecommand{\dkbibdash}{\hbox{-}\penalty\@m}" write$ newline$
+ "\makeatother" write$ newline$
+}
+
+EXECUTE {begin.bib}
+
+EXECUTE {init.state.consts}
+
+ITERATE {call.type$}
+
+FUNCTION {end.bib}
+{ newline$
+ "\end{thebibliography}" write$ newline$
+}
+
+EXECUTE {end.bib}
diff --git a/biblio/bibtex/contrib/dk-bib/dk-unsrt.bst b/biblio/bibtex/contrib/dk-bib/dk-unsrt.bst
new file mode 100644
index 0000000000..eda2126210
--- /dev/null
+++ b/biblio/bibtex/contrib/dk-bib/dk-unsrt.bst
@@ -0,0 +1,1155 @@
+% BibTeX standard bibliography style `unsrt'
+ % version 0.99a for BibTeX versions 0.99a or later, LaTeX version 2.09.
+ % Copyright (C) 1985, all rights reserved.
+ % Copying of this file is authorized only if either
+ % (1) you make absolutely no changes to your copy, including name, or
+ % (2) if you do make changes, you name it something other than
+ % btxbst.doc, plain.bst, unsrt.bst, alpha.bst, and abbrv.bst.
+ % This restriction helps ensure that all standard styles are identical.
+ % The file btxbst.doc has the documentation for this style.
+
+% "Translated" into Norwegian by dag@ifi.uio.no, July 1997.
+% Now called `norunsrt'.
+% Added field "isbn" and "issn". dag@ifi.uio.no, April 2001.
+% Translated into Danish by arne.jorgensen@tug.dk, June 2001.
+% Now called `dk-unsrt'.
+% This is dk-bib, Version 0.6 ($Id: dk-unsrt.bst 92 2006-05-21 21:18:10Z arne $)
+
+ENTRY
+ { address
+ author
+ booktitle
+ chapter
+ edition
+ printing
+ editor
+ howpublished
+ institution
+ isbn
+ issn
+ url
+ annote
+ journal
+ key
+ month
+ note
+ number
+ organization
+ pages
+ publisher
+ school
+ series
+ title
+ type
+ volume
+ year
+ }
+ {}
+ { label }
+
+INTEGERS { output.state before.all mid.sentence after.sentence after.block }
+
+FUNCTION {init.state.consts}
+{ #0 'before.all :=
+ #1 'mid.sentence :=
+ #2 'after.sentence :=
+ #3 'after.block :=
+}
+
+STRINGS { s t }
+
+FUNCTION {output.nonnull}
+{ 's :=
+ output.state mid.sentence =
+ { ", " * write$ }
+ { output.state after.block =
+ { add.period$ write$
+ newline$
+ "\newblock " write$
+ }
+ { output.state before.all =
+ 'write$
+ { add.period$ " " * write$ }
+ if$
+ }
+ if$
+ mid.sentence 'output.state :=
+ }
+ if$
+ s
+}
+
+FUNCTION {output}
+{ duplicate$ empty$
+ 'pop$
+ 'output.nonnull
+ if$
+}
+
+FUNCTION {output.check}
+{ 't :=
+ duplicate$ empty$
+ { pop$ "empty " t * " in " * cite$ * warning$ }
+ 'output.nonnull
+ if$
+}
+
+FUNCTION {output.bibitem}
+{ newline$
+ "\bibitem{" write$
+ cite$ write$
+ "}" write$
+ newline$
+ ""
+ before.all 'output.state :=
+}
+
+FUNCTION {output.annote}
+{ annote empty$
+ 'skip$
+ { "\dkbibannote{" cite$ * "}{" * annote add.period$ * "}" *
+ write$ newline$ }
+ if$
+}
+
+FUNCTION {fin.entry}
+{ add.period$
+ write$
+ newline$
+ output.annote
+}
+
+FUNCTION {new.block}
+{ output.state before.all =
+ 'skip$
+ { after.block 'output.state := }
+ if$
+}
+
+FUNCTION {output.isbn.issn}
+{ isbn empty$
+ 'skip$
+ { new.block "\dkbibisbn{" isbn * "}" * output }
+ if$
+ issn empty$
+ 'skip$
+ { new.block "\dkbibissn{" issn * "}" * output }
+ if$
+}
+
+FUNCTION {output.url}
+{ url empty$
+ 'skip$
+ { new.block "\dkbiburl{" url * "}" * output }
+ if$
+}
+
+FUNCTION {new.sentence}
+{ output.state after.block =
+ 'skip$
+ { output.state before.all =
+ 'skip$
+ { after.sentence 'output.state := }
+ if$
+ }
+ if$
+}
+
+FUNCTION {not}
+{ { #0 }
+ { #1 }
+ if$
+}
+
+FUNCTION {and}
+{ 'skip$
+ { pop$ #0 }
+ if$
+}
+
+FUNCTION {or}
+{ { pop$ #1 }
+ 'skip$
+ if$
+}
+
+FUNCTION {new.block.checka}
+{ empty$
+ 'skip$
+ 'new.block
+ if$
+}
+
+FUNCTION {new.block.checkb}
+{ empty$
+ swap$ empty$
+ and
+ 'skip$
+ 'new.block
+ if$
+}
+
+FUNCTION {new.sentence.checka}
+{ empty$
+ 'skip$
+ 'new.sentence
+ if$
+}
+
+FUNCTION {new.sentence.checkb}
+{ empty$
+ swap$ empty$
+ and
+ 'skip$
+ 'new.sentence
+ if$
+}
+
+FUNCTION {field.or.null}
+{ duplicate$ empty$
+ { pop$ "" }
+ 'skip$
+ if$
+}
+
+FUNCTION {emphasize}
+{ duplicate$ empty$
+ { pop$ "" }
+ { "\emph{" swap$ * "}" * }
+ if$
+}
+
+INTEGERS { nameptr namesleft numnames }
+
+FUNCTION {format.names}
+{ 's :=
+ #1 'nameptr :=
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ { s nameptr "{ff~}{vv }{ll}{~jj}" format.name$ 't :=
+ nameptr #1 >
+ { namesleft #1 >
+ { ", " * t * }
+ { t "others" =
+ { " et~al." * }
+ { " og " * t * }
+ if$
+ }
+ if$
+ }
+ 't
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+}
+
+FUNCTION {format.authors}
+{ author empty$
+ { "" }
+ { author format.names }
+ if$
+}
+
+FUNCTION {format.editors}
+{ editor empty$
+ { "" }
+ { editor format.names
+ editor num.names$ #1 >
+ { ", redakt\o rer" * }
+ { ", redakt\o r" * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.title}
+{ title empty$
+ { "" }
+ { title "t" change.case$ }
+ if$
+}
+
+FUNCTION {n.dashify}
+{ 't :=
+ ""
+ { t empty$ not }
+ { t #1 #1 substring$ "-" =
+ { "\dkbibdash" *
+ t #2 global.max$ substring$ 't :=
+ { t #1 #1 substring$ "-" = }
+ { t #2 global.max$ substring$ 't := }
+ while$
+ t #1 #1 substring$ " " =
+ { "{}" * }
+ { " " * }
+ if$
+ }
+ { t #1 #1 substring$ *
+ t #2 global.max$ substring$ 't :=
+ }
+ if$
+ }
+ while$
+}
+
+FUNCTION {format.date}
+{ year empty$
+ { month empty$
+ { "" }
+ { "there's a month but no year in " cite$ * warning$
+ month
+ }
+ if$
+ }
+ { month empty$
+ 'year
+ { month " " * year * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.btitle}
+{ title emphasize
+}
+
+FUNCTION {tie.or.space.connect}
+{ duplicate$ text.length$ #3 <
+ { "~" }
+ { " " }
+ if$
+ swap$ * *
+}
+
+FUNCTION {either.or.check}
+{ empty$
+ 'pop$
+ { "can't use both " swap$ * " fields in " * cite$ * warning$ }
+ if$
+}
+
+FUNCTION {format.bvolume}
+{ volume empty$
+ { "" }
+ { "bind" volume tie.or.space.connect
+ series empty$
+ 'skip$
+ { " af " * series emphasize * }
+ if$
+ "volume and number" number either.or.check
+ }
+ if$
+}
+
+FUNCTION {format.number.series}
+{ volume empty$
+ { number empty$
+ { series field.or.null }
+ { output.state mid.sentence =
+ { "nr." }
+ { "Nr." }
+ if$
+ number tie.or.space.connect
+ series empty$
+ { "there's a number but no series in " cite$ * warning$ }
+ { " i " * series * }
+ if$
+ }
+ if$
+ }
+ { "" }
+ if$
+}
+
+FUNCTION {ordinal.translate.i}
+{ duplicate$ "l" change.case$ "first" =
+ {pop$ "1"}
+ {skip$}
+ if$
+ duplicate$ "l" change.case$ "second" =
+ {pop$ "2"}
+ {skip$}
+ if$
+ duplicate$ "l" change.case$ "third" =
+ {pop$ "3"}
+ {skip$}
+ if$
+ duplicate$ "l" change.case$ "fourth" =
+ {pop$ "4"}
+ {skip$}
+ if$
+ duplicate$ "l" change.case$ "fifth" =
+ {pop$ "5"}
+ {skip$}
+ if$
+}
+
+FUNCTION {ordinal.translate.ii}
+{ duplicate$ "l" change.case$ "sixth" =
+ {pop$ "6"}
+ {skip$}
+ if$
+ duplicate$ "l" change.case$ "seventh" =
+ {pop$ "7"}
+ {skip$}
+ if$
+ duplicate$ "l" change.case$ "eighth" =
+ {pop$ "8"}
+ {skip$}
+ if$
+ duplicate$ "l" change.case$ "ninth" =
+ {pop$ "9"}
+ {skip$}
+ if$
+ duplicate$ "l" change.case$ "tenth" =
+ {pop$ "10"}
+ {skip$}
+ if$
+}
+
+FUNCTION {ordinal.translate.iii}
+{ duplicate$ "l" change.case$ "eleventh" =
+ {pop$ "11"}
+ {skip$}
+ if$
+ duplicate$ "l" change.case$ "twelfth" =
+ {pop$ "12"}
+ {skip$}
+ if$
+ duplicate$ "l" change.case$ "thirteenth" =
+ {pop$ "13"}
+ {skip$}
+ if$
+ duplicate$ "l" change.case$ "fourteenth" =
+ {pop$ "14"}
+ {skip$}
+ if$
+ duplicate$ "l" change.case$ "fifteenth" =
+ {pop$ "15"}
+ {skip$}
+ if$
+}
+
+FUNCTION {ordinal.translate.iv}
+{ duplicate$ "l" change.case$ "sixteenth" =
+ {pop$ "16"}
+ {skip$}
+ if$
+ duplicate$ "l" change.case$ "seventeenth" =
+ {pop$ "17"}
+ {skip$}
+ if$
+ duplicate$ "l" change.case$ "eighteenth" =
+ {pop$ "18"}
+ {skip$}
+ if$
+ duplicate$ "l" change.case$ "nineteenth" =
+ {pop$ "19"}
+ {skip$}
+ if$
+ duplicate$ "l" change.case$ "twentieth" =
+ {pop$ "20"}
+ {skip$}
+ if$
+}
+
+FUNCTION {ordinal.translate}
+{ ordinal.translate.i
+ ordinal.translate.ii
+ ordinal.translate.iii
+ ordinal.translate.iv
+}
+
+FUNCTION {format.edition}
+{ edition empty$
+ printing empty$
+ +
+ #2
+ =
+ { "" }
+ { output.state mid.sentence =
+ { "\dkbibedition{" }
+ { "\dkbibEdition{" }
+ if$
+ edition empty$
+ { "" }
+ { edition ordinal.translate
+ duplicate$ "l" change.case$
+ duplicate$ "u" change.case$
+ =
+ { purify$ }
+ { output.state mid.sentence =
+ { skip$ }
+ { "u" change.case$
+ "t" change.case$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+ * "}{" *
+ printing empty$
+ { "" }
+ { printing ordinal.translate
+ duplicate$ "l" change.case$
+ duplicate$ "u" change.case$
+ =
+ { purify$ }
+ { skip$ }
+ if$
+ }
+ if$
+ * "}" *
+ }
+ if$
+}
+
+INTEGERS { multiresult }
+
+FUNCTION {multi.page.check}
+{ 't :=
+ #0 'multiresult :=
+ { multiresult not
+ t empty$ not
+ and
+ }
+ { t #1 #1 substring$
+ duplicate$ "-" =
+ swap$ duplicate$ "," =
+ swap$ "+" =
+ or or
+ { #1 'multiresult := }
+ { t #2 global.max$ substring$ 't := }
+ if$
+ }
+ while$
+ multiresult
+}
+
+FUNCTION {format.pages}
+{ pages empty$
+ { "" }
+ { pages multi.page.check
+ { "side" pages n.dashify tie.or.space.connect }
+ { "side" pages tie.or.space.connect }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.vol.num.pages}
+{ volume field.or.null
+ number empty$
+ 'skip$
+ { "(" number * ")" * *
+ volume empty$
+ { "there's a number but no volume in " cite$ * warning$ }
+ 'skip$
+ if$
+ }
+ if$
+ pages empty$
+ 'skip$
+ { duplicate$ empty$
+ { pop$ format.pages }
+ { ":" * pages n.dashify * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.chapter.pages}
+{ chapter empty$
+ 'format.pages
+ { type empty$
+ { "kapitel" }
+ { type "l" change.case$ }
+ if$
+ chapter tie.or.space.connect
+ pages empty$
+ 'skip$
+ { ", " * format.pages * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.in.ed.booktitle}
+{ booktitle empty$
+ { "" }
+ { editor empty$
+ { "I " booktitle emphasize * }
+ { "I " format.editors * ", " * booktitle emphasize * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {empty.misc.check}
+{ author empty$ title empty$ howpublished empty$
+ month empty$ year empty$ note empty$ isbn empty$ issn empty$
+ and and and and and and and
+ { "all relevant fields are empty in " cite$ * warning$ }
+ 'skip$
+ if$
+}
+
+FUNCTION {format.thesis.type}
+{ type empty$
+ 'skip$
+ { pop$
+ type "t" change.case$
+ }
+ if$
+}
+
+FUNCTION {format.tr.number}
+{ type empty$
+ { "Rapport" }
+ 'type
+ if$
+ number empty$
+ { "t" change.case$ }
+ { number tie.or.space.connect }
+ if$
+}
+
+FUNCTION {format.article.crossref}
+{ key empty$
+ { journal empty$
+ { "need key or journal for " cite$ * " to crossref " * crossref *
+ warning$
+ ""
+ }
+ { "I \emph{" journal * "}" * }
+ if$
+ }
+ { "I " key * }
+ if$
+ " \cite{" * crossref * "}" *
+}
+
+FUNCTION {format.crossref.editor}
+{ editor #1 "{vv }{ll}" format.name$
+ editor num.names$ duplicate$
+ #2 >
+ { pop$ " et~al." * }
+ { #2 <
+ 'skip$
+ { editor #2 "{ff~}{vv }{ll}{~jj}" format.name$ "others" =
+ { " et~al." * }
+ { " og " * editor #2 "{vv }{ll}" format.name$ * }
+ if$
+ }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.book.crossref}
+{ volume empty$
+ { "empty volume in " cite$ * "'s crossref of " * crossref * warning$
+ "I "
+ }
+ { "Bind" volume tie.or.space.connect
+ " af " *
+ }
+ if$
+ editor empty$
+ editor field.or.null author field.or.null =
+ or
+ { key empty$
+ { series empty$
+ { "need editor, key, or series for " cite$ * " to crossref " *
+ crossref * warning$
+ "" *
+ }
+ { "\emph{" * series * "}" * }
+ if$
+ }
+ { key * }
+ if$
+ }
+ { format.crossref.editor * }
+ if$
+ " \cite{" * crossref * "}" *
+}
+
+FUNCTION {format.incoll.inproc.crossref}
+{ editor empty$
+ editor field.or.null author field.or.null =
+ or
+ { key empty$
+ { booktitle empty$
+ { "need editor, key, or booktitle for " cite$ * " to crossref " *
+ crossref * warning$
+ ""
+ }
+ { "I \emph{" booktitle * "}" * }
+ if$
+ }
+ { "I " key * }
+ if$
+ }
+ { "I " format.crossref.editor * }
+ if$
+ " \cite{" * crossref * "}" *
+}
+
+FUNCTION {article}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.title "title" output.check
+ new.block
+ crossref missing$
+ { journal emphasize "journal" output.check
+ format.vol.num.pages output
+ format.date "year" output.check
+ }
+ { format.article.crossref output.nonnull
+ format.pages output
+ }
+ if$
+ new.block
+ note output
+ output.isbn.issn
+ output.url
+ fin.entry
+}
+
+FUNCTION {book}
+{ output.bibitem
+ author empty$
+ { format.editors "author and editor" output.check }
+ { format.authors output.nonnull
+ crossref missing$
+ { "author and editor" editor either.or.check }
+ 'skip$
+ if$
+ }
+ if$
+ new.block
+ format.btitle "title" output.check
+ crossref missing$
+ { format.bvolume output
+ new.block
+ format.number.series output
+ new.sentence
+ publisher "publisher" output.check
+ address output
+ }
+ { new.block
+ format.book.crossref output.nonnull
+ }
+ if$
+ format.edition output
+ format.date "year" output.check
+ new.block
+ note output
+ output.isbn.issn
+ output.url
+ fin.entry
+}
+
+FUNCTION {booklet}
+{ output.bibitem
+ format.authors output
+ new.block
+ format.title "title" output.check
+ howpublished address new.block.checkb
+ howpublished output
+ address output
+ format.date output
+ new.block
+ note output
+ output.isbn.issn
+ output.url
+ fin.entry
+}
+
+FUNCTION {inbook}
+{ output.bibitem
+ author empty$
+ { format.editors "author and editor" output.check }
+ { format.authors output.nonnull
+ crossref missing$
+ { "author and editor" editor either.or.check }
+ 'skip$
+ if$
+ }
+ if$
+ new.block
+ format.btitle "title" output.check
+ crossref missing$
+ { format.bvolume output
+ format.chapter.pages "chapter and pages" output.check
+ new.block
+ format.number.series output
+ new.sentence
+ publisher "publisher" output.check
+ address output
+ }
+ { format.chapter.pages "chapter and pages" output.check
+ new.block
+ format.book.crossref output.nonnull
+ }
+ if$
+ format.edition output
+ format.date "year" output.check
+ new.block
+ note output
+ output.isbn.issn
+ output.url
+ fin.entry
+}
+
+FUNCTION {incollection}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.title "title" output.check
+ new.block
+ crossref missing$
+ { format.in.ed.booktitle "booktitle" output.check
+ format.bvolume output
+ format.number.series output
+ format.chapter.pages output
+ new.sentence
+ publisher "publisher" output.check
+ address output
+ format.edition output
+ format.date "year" output.check
+ }
+ { format.incoll.inproc.crossref output.nonnull
+ format.chapter.pages output
+ }
+ if$
+ new.block
+ note output
+ output.isbn.issn
+ output.url
+ fin.entry
+}
+
+FUNCTION {inproceedings}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.title "title" output.check
+ new.block
+ crossref missing$
+ { format.in.ed.booktitle "booktitle" output.check
+ format.bvolume output
+ format.number.series output
+ format.pages output
+ address empty$
+ { organization publisher new.sentence.checkb
+ organization output
+ publisher output
+ format.date "year" output.check
+ }
+ { address output.nonnull
+ format.date "year" output.check
+ new.sentence
+ organization output
+ publisher output
+ }
+ if$
+ }
+ { format.incoll.inproc.crossref output.nonnull
+ format.pages output
+ }
+ if$
+ new.block
+ note output
+ output.isbn.issn
+ output.url
+ fin.entry
+}
+
+FUNCTION {conference} { inproceedings }
+
+FUNCTION {manual}
+{ output.bibitem
+ author empty$
+ { organization empty$
+ 'skip$
+ { organization output.nonnull
+ address output
+ }
+ if$
+ }
+ { format.authors output.nonnull }
+ if$
+ new.block
+ format.btitle "title" output.check
+ author empty$
+ { organization empty$
+ { address new.block.checka
+ address output
+ }
+ 'skip$
+ if$
+ }
+ { organization address new.block.checkb
+ organization output
+ address output
+ }
+ if$
+ format.edition output
+ format.date output
+ new.block
+ note output
+ output.isbn.issn
+ output.url
+ fin.entry
+}
+
+FUNCTION {mastersthesis}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.title "title" output.check
+ new.block
+ "Specialeafhandling" format.thesis.type output.nonnull
+ school "school" output.check
+ address output
+ format.date "year" output.check
+ new.block
+ note output
+ output.isbn.issn
+ output.url
+ fin.entry
+}
+
+FUNCTION {misc}
+{ output.bibitem
+ format.authors output
+ title howpublished new.block.checkb
+ format.title output
+ howpublished new.block.checka
+ howpublished output
+ format.date output
+ new.block
+ note output
+ output.isbn.issn
+ output.url
+ fin.entry
+ empty.misc.check
+}
+
+FUNCTION {phdthesis}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.btitle "title" output.check
+ new.block
+ "Ph.d.-afhandling" format.thesis.type output.nonnull
+ school "school" output.check
+ address output
+ format.date "year" output.check
+ new.block
+ note output
+ output.isbn.issn
+ output.url
+ fin.entry
+}
+
+FUNCTION {proceedings}
+{ output.bibitem
+ editor empty$
+ { organization output }
+ { format.editors output.nonnull }
+ if$
+ new.block
+ format.btitle "title" output.check
+ format.bvolume output
+ format.number.series output
+ address empty$
+ { editor empty$
+ { publisher new.sentence.checka }
+ { organization publisher new.sentence.checkb
+ organization output
+ }
+ if$
+ publisher output
+ format.date "year" output.check
+ }
+ { address output.nonnull
+ format.date "year" output.check
+ new.sentence
+ editor empty$
+ 'skip$
+ { organization output }
+ if$
+ publisher output
+ }
+ if$
+ new.block
+ note output
+ output.isbn.issn
+ output.url
+ fin.entry
+}
+
+FUNCTION {techreport}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.title "title" output.check
+ new.block
+ format.tr.number output.nonnull
+ institution "institution" output.check
+ address output
+ format.date "year" output.check
+ new.block
+ note output
+ output.isbn.issn
+ output.url
+ fin.entry
+}
+
+FUNCTION {unpublished}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.title "title" output.check
+ new.block
+ note "note" output.check
+ format.date output
+ output.isbn.issn
+ output.url
+ fin.entry
+}
+
+FUNCTION {default.type} { misc }
+
+MACRO {jan} {"januar"}
+
+MACRO {feb} {"februar"}
+
+MACRO {mar} {"marts"}
+
+MACRO {apr} {"april"}
+
+MACRO {may} {"maj"}
+
+MACRO {jun} {"juni"}
+
+MACRO {jul} {"juli"}
+
+MACRO {aug} {"august"}
+
+MACRO {sep} {"september"}
+
+MACRO {oct} {"oktober"}
+
+MACRO {nov} {"november"}
+
+MACRO {dec} {"december"}
+
+MACRO {acmcs} {"ACM Computing Surveys"}
+
+MACRO {acta} {"Acta Informatica"}
+
+MACRO {cacm} {"Communications of the ACM"}
+
+MACRO {ibmjrd} {"IBM Journal of Research and Development"}
+
+MACRO {ibmsj} {"IBM Systems Journal"}
+
+MACRO {ieeese} {"IEEE Transactions on Software Engineering"}
+
+MACRO {ieeetc} {"IEEE Transactions on Computers"}
+
+MACRO {ieeetcad}
+ {"IEEE Transactions on Computer-Aided Design of Integrated Circuits"}
+
+MACRO {ipl} {"Information Processing Letters"}
+
+MACRO {jacm} {"Journal of the ACM"}
+
+MACRO {jcss} {"Journal of Computer and System Sciences"}
+
+MACRO {scp} {"Science of Computer Programming"}
+
+MACRO {sicomp} {"SIAM Journal on Computing"}
+
+MACRO {tocs} {"ACM Transactions on Computer Systems"}
+
+MACRO {tods} {"ACM Transactions on Database Systems"}
+
+MACRO {tog} {"ACM Transactions on Graphics"}
+
+MACRO {toms} {"ACM Transactions on Mathematical Software"}
+
+MACRO {toois} {"ACM Transactions on Office Information Systems"}
+
+MACRO {toplas} {"ACM Transactions on Programming Languages and Systems"}
+
+MACRO {tcs} {"Theoretical Computer Science"}
+
+READ
+
+STRINGS { longest.label }
+
+INTEGERS { number.label longest.label.width }
+
+FUNCTION {initialize.longest.label}
+{ "" 'longest.label :=
+ #1 'number.label :=
+ #0 'longest.label.width :=
+}
+
+FUNCTION {longest.label.pass}
+{ number.label int.to.str$ 'label :=
+ number.label #1 + 'number.label :=
+ label width$ longest.label.width >
+ { label 'longest.label :=
+ label width$ 'longest.label.width :=
+ }
+ 'skip$
+ if$
+}
+
+EXECUTE {initialize.longest.label}
+
+ITERATE {longest.label.pass}
+
+FUNCTION {begin.bib}
+{ preamble$ empty$
+ 'skip$
+ { preamble$ write$ newline$ }
+ if$
+ "\begin{thebibliography}{" longest.label * "}" * write$ newline$
+ "\makeatletter" write$ newline$
+ "\@tfor\dkbib@reserved@a:=0123456789\do{%" write$ newline$
+ " \expandafter\sfcode\expandafter`\dkbib@reserved@a=1007}" write$ newline$
+ "\providecommand{\dkbib@addperiod}{\ifnum\spacefactor=1007.\fi}" write$ newline$
+ "\providecommand{\dkbibedition}[2]{#1\dkbib@addperiod~udgave}" write$ newline$
+ "\providecommand{\dkbibEdition}[2]{#1\dkbib@addperiod~udgave}" write$ newline$
+ "\providecommand{\dkbibisbn}[1]{\unskip\@gobble}" write$ newline$
+ "\providecommand{\dkbibissn}[1]{\unskip\@gobble}" write$ newline$
+ "\providecommand{\dkbiburl}[1]{\unskip\@gobble}" write$ newline$
+ "\providecommand{\dkbibannote}[2]{\unskip}" write$ newline$
+ "\providecommand{\dkbibdash}{\hbox{-}\penalty\@m}" write$ newline$
+ "\makeatother" write$ newline$
+}
+
+EXECUTE {begin.bib}
+
+EXECUTE {init.state.consts}
+
+ITERATE {call.type$}
+
+FUNCTION {end.bib}
+{ newline$
+ "\end{thebibliography}" write$ newline$
+}
+
+EXECUTE {end.bib}
diff --git a/biblio/bibtex/contrib/dk-bib/litteratur.bib b/biblio/bibtex/contrib/dk-bib/litteratur.bib
new file mode 100644
index 0000000000..848cf3a612
--- /dev/null
+++ b/biblio/bibtex/contrib/dk-bib/litteratur.bib
@@ -0,0 +1,10 @@
+@Book{Mittelbach:2004,
+ author = {Frank Mittelbach and Michel Goosens},
+ title = {The {\LaTeX} Companion},
+ publisher = {Addison-Wesley},
+ year = 2004,
+ edition = {second},
+ printing = {first},
+ isbn = {0-201-36299-6},
+ url = {http://www.awprofessional.com/titles/0201362996}
+}
diff --git a/biblio/bibtex/contrib/dk-bib/mac-dk.csf b/biblio/bibtex/contrib/dk-bib/mac-dk.csf
new file mode 100644
index 0000000000..653459365b
--- /dev/null
+++ b/biblio/bibtex/contrib/dk-bib/mac-dk.csf
@@ -0,0 +1,99 @@
+%%% mac-dk.csf --- Danish mac-roman sorting order file for bibtex8
+
+%% Copyright (C) 2005 Arne Jorgensen
+
+%% Author: Arne Jorgensen <arne.jorgensen@tug.dk>
+%% Version: $Id: mac-dk.csf 70 2005-08-03 11:13:09Z arne $
+
+%% This file is free software; you can redistribute it and/or modify
+%% it under the terms of the GNU General Public License as published
+%% by the Free Software Foundation; either version 2 of the License,
+%% or (at your option) any later version.
+
+%% This file is distributed in the hope that it will be useful, but
+%% WITHOUT ANY WARRANTY; without even the implied warranty of
+%% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+%% General Public License for more details.
+
+%% You should have received a copy of the GNU General Public License
+%% along with this file; if not, write to the Free Software
+%% Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%% 02110-1301, USA.
+
+%%% Commentary:
+
+%%% Code:
+
+%%% Character Set:
+
+\lowupcase{
+ % \`{a} \`{A}
+ % \'{a} \'{A}
+ % \^{a} \^{A}
+ % \~{a} \~{A}
+ % \"{a} \"{A}
+ % \ring{a} \ring{A}
+ % \ae \AE
+ % \c{c} \c{C}
+ % \`{e} \`{E}
+ % \'{e} \'{E}
+ % \^{e} \^{E}
+ % \"{e} \"{E}
+ % \`{\i} \`{I}
+ % \'{\i} \'{I}
+ % \^{\i} \^{I}
+ % \"{\i} \"{I}
+ % \~{n} \~{N}
+ % \`{o} \`{O}
+ % \'{o} \'{O}
+ % \^{o} \^{O}
+ % \~{o} \~{O}
+ % \"{o} \"{O}
+ % \o \O
+ % \`{u} \`{U}
+ % \'{u} \'{U}
+ % \^{u} \^{U}
+ % \"{u} \"{U}
+}
+
+%%% Sorting Order:
+
+\order{
+ 0-9 % 0-9
+ A a % A \'{A} \`{A} \^{A} \~{A} a \'{a} \`{a} \^{a} \~{a}
+ B b % B b
+ C c % C \c{C} c \c{c}
+ D d % D d
+ E e % E \'{E} \`{E} \"{E} \^{E} e \'{e} \`{e} \"{e} \^{e}
+ F f % F f
+ G g % G g
+ H h % H h
+ I i % I \'{I} \'{I} \"{I} \^{I} i \'{\i} \`{\i} \"{\i} \^{\i}
+ J j % J j
+ K k % K k
+ L l % L l
+ M m % M m
+ N n % N \~{N} n \~{n}
+ O o % O \'{O} \`{O} \^{O} \~{O} o \'{o} \`{o} \^{o} \~{o}
+ P p % P p
+ Q q % Q q
+ R r % R r
+ S s % S s
+ T t % T t
+ U u % U \'{U} \`{U} \^{U} u \'{u} \`{u} \^{u}
+ V v % V v
+ W w % W w
+ X x % X x
+ Y y % Y \"{U} y \"{u} \"{y}
+ Z z % Z z
+ % \AE \"{A} \ae \"{a}
+ % \O \"{O} \o \"{o}
+ % \ring{A} \ring{a}
+}
+
+%% Local Variables:
+%% coding: mac-roman
+%% comment-start: "%% "
+%% End:
+
+%%% mac-dk.csf ends here
diff --git a/biblio/bibtex/contrib/dk-bib/utf8-dk.csf b/biblio/bibtex/contrib/dk-bib/utf8-dk.csf
new file mode 100644
index 0000000000..590841f46f
--- /dev/null
+++ b/biblio/bibtex/contrib/dk-bib/utf8-dk.csf
@@ -0,0 +1,127 @@
+%%% utf8-dk.csf --- Danish UTF-8 sorting order file for bibtex8
+
+%% Copyright (C) 2005 Arne Jorgensen
+
+%% Author: Arne Jorgensen <arne.jorgensen@tug.dk>
+%% Version: $Id: utf8-dk.csf 71 2005-08-05 22:44:05Z arne $
+
+%% This file is free software; you can redistribute it and/or modify
+%% it under the terms of the GNU General Public License as published
+%% by the Free Software Foundation; either version 2 of the License,
+%% or (at your option) any later version.
+
+%% This file is distributed in the hope that it will be useful, but
+%% WITHOUT ANY WARRANTY; without even the implied warranty of
+%% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+%% General Public License for more details.
+
+%% You should have received a copy of the GNU General Public License
+%% along with this file; if not, write to the Free Software
+%% Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%% 02110-1301, USA.
+
+%%% Commentary:
+
+%% This is a VERY EXPERIMENTAL shot at making a sorting order file for
+%% the Danish language and the UTF-8 character set.
+
+%% Generally it should not be possible to fit a sorting of the UTF-8
+%% character set into bibtex8's scheme, but we try to use some hacks
+%% and unexplained behaviour to fit it in anyway.
+
+%% As we said VERY EXPERIMENTAL.
+
+%% Please report any experiences to the author.
+
+%%% Code:
+
+%%% Character Set:
+
+%% Whether this really works for UTF-8 is a big question. Please
+%% report expriences with it.
+
+\lowupcase{
+ ^^a0 ^^80 % \`{a} \`{A}
+ ^^a1 ^^81 % \'{a} \'{A}
+ ^^a2 ^^82 % \^{a} \^{A}
+ ^^a3 ^^83 % \~{a} \~{A}
+ ^^a4 ^^84 % \"{a} \"{A}
+ ^^a5 ^^85 % \ring{a} \ring{A}
+ ^^a6 ^^86 % \ae \AE
+ ^^a7 ^^87 % \c{c} \c{C}
+ ^^a8 ^^88 % \`{e} \`{E}
+ ^^a9 ^^89 % \'{e} \'{E}
+ ^^aa ^^8a % \^{e} \^{E}
+ ^^ab ^^8b % \"{e} \"{E}
+ ^^ac ^^8c % \`{\i} \`{I}
+ ^^ad ^^8d % \'{\i} \'{I}
+ ^^ae ^^8e % \^{\i} \^{I}
+ ^^af ^^8f % \"{\i} \"{I}
+ ^^b0 ^^90 % eth ETH
+ ^^b1 ^^91 % \~{n} \~{N}
+ ^^b2 ^^92 % \`{o} \`{O}
+ ^^b3 ^^93 % \'{o} \'{O}
+ ^^b4 ^^94 % \^{o} \^{O}
+ ^^b5 ^^95 % \~{o} \~{O}
+ ^^b6 ^^96 % \"{o} \"{O}
+ ^^b8 ^^98 % \o \O
+ ^^b9 ^^99 % \`{u} \`{U}
+ ^^ba ^^9a % \'{u} \'{U}
+ ^^bb ^^9b % \^{u} \^{U}
+ ^^bc ^^9c % \"{u} \"{U}
+ ^^bd ^^9d % \'{y} \'{Y}
+ ^^be ^^9e % thorn THORN
+}
+
+%%% Sorting Order:
+
+%% For sorting we rely on the fact that the most used and relevant
+%% parts of the special characters in Danish in UTF-8 is encoded as
+%% the two-byte combination of a ^^c3 and a second byte which is
+%% placed above value ^^7f and thus does not collide with the normal
+%% character ranges.
+
+%% So we leave out ^^c3 of the sorting order and there by ignoring
+%% it's presence (it shouldn't be ignored, but sorted last, but it
+%% actually IS ignored) and let the second byte decide the order of
+%% the character.
+
+\order{
+ 0-9 % 0-9
+ A ^^81 ^^80 ^^82 ^^83 a ^^a1 ^^a0 ^^a2 ^^a3 % A \'{A} \`{A} \^{A} \~{A} a \'{a} \`{a} \^{a} \~{a}
+ B b % B b
+ C ^^87 c ^^a7 % C \c{C} c \c{c}
+ D ^^90 d ^^b0 % D ETH d eth
+ E ^^89 ^^88 ^^8b ^^8a e ^^a9 ^^a8 ^^ab ^^aa % E \'{E} \`{E} \"{E} \^{E} e \'{e} \`{e} \"{e} \^{e}
+ F f % F f
+ G g % G g
+ H h % H h
+ I ^^8d ^^8c ^^8f ^^8e i ^^ad ^^ac ^^af ^^ae % I \'{I} \`{I} \"{I} \^{I} i \'{\i} \`{\i} \"{\i} \^{\i}
+ J j % J j
+ K k % K k
+ L l % L l
+ M m % M m
+ N ^^91 n ^^b1 % N \~{N} n \~{n}
+ O ^^93 ^^92 ^^94 ^^95 o ^^b3 ^^b2 ^^b4 ^^b5 % O \'{O} \`{O} \^{O} \~{O} o \'{o} \`{o} \^{o} \~{o}
+ P p % P p
+ Q q % Q q
+ R r % R r
+ S s % S s
+ T ^^9e t ^^be % T THORN t thorn
+ U ^^9a ^^99 ^^9b u ^^ba ^^b9 ^^bb % U \'{U} \`{U} \^{U} u \'{u} \`{u} \^{u}
+ V v % V v
+ W w % W w
+ X x % X x
+ Y ^^9c ^^9d y ^^bc ^^bd ^^bf % Y \"{U} \'{Y} y \"{u} \'{y} \"{y}
+ Z z % Z z
+ ^^86 ^^84 ^^a6 ^^a4 % \AE \"{A} \ae \"{a}
+ ^^98 ^^96 ^^b8 ^^b6 % \O \"{O} \o \"{o}
+ ^^85 ^^a5 % \ring{A} \ring{a}
+}
+
+%% Local Variables:
+%% coding: raw-text
+%% comment-start: "%% "
+%% End:
+
+%%% utf8-dk.csf ends here
diff --git a/biblio/bibtex/contrib/doc/README b/biblio/bibtex/contrib/doc/README
new file mode 100644
index 0000000000..fb4e7ea3ef
--- /dev/null
+++ b/biblio/bibtex/contrib/doc/README
@@ -0,0 +1,40 @@
+
+Here is a collection of BibTeX documentation.
+
+
+********************************* Files **********************************
+
+README - This file.
+
+btxdoc.pdf - The BibTeX user guide in PDF format.
+
+btxhak.pdf - The BibTeX style hacking guide in PDF format.
+
+btxFAQ.pdf - BibTeX Tips and FAQ in PDF format.
+
+***************************************************************************
+Legal Notice:
+This code is offered as-is without any warranty either expressed or
+implied; without even the implied warranty of MERCHANTABILITY or
+FITNESS FOR A PARTICULAR PURPOSE!
+User assumes all risk.
+In no event shall any contributor to this code be liable for any damages or
+losses, including, but not limited to, incidental, consequential, or any
+other damages, resulting from the use or misuse of any information
+contained here.
+
+All comments are the opinions of their respective authors.
+
+This work is distributed under the LaTeX Project Public License (LPPL)
+( http://www.latex-project.org/ ) version 1.3, and may be freely used,
+distributed and modified. A copy of the LPPL, version 1.3, is included
+in the base LaTeX documentation of all distributions of LaTeX released
+2003/12/01 or later.
+Retain all contribution notices and credits.
+** Modified files should be clearly indicated as such, including **
+** renaming them and changing author support contact information. **
+
+File list of work: btxdoc.pdf, btxhak.pdf, btxFAQ.pdf
+
+***************************************************************************
+
diff --git a/biblio/bibtex/contrib/doc/btxFAQ.pdf b/biblio/bibtex/contrib/doc/btxFAQ.pdf
new file mode 100644
index 0000000000..19cbd76add
--- /dev/null
+++ b/biblio/bibtex/contrib/doc/btxFAQ.pdf
Binary files differ
diff --git a/biblio/bibtex/contrib/doc/btxdoc.pdf b/biblio/bibtex/contrib/doc/btxdoc.pdf
new file mode 120000
index 0000000000..9d7bdb4345
--- /dev/null
+++ b/biblio/bibtex/contrib/doc/btxdoc.pdf
@@ -0,0 +1 @@
+../../base/btxdoc.pdf \ No newline at end of file
diff --git a/biblio/bibtex/contrib/doc/btxhak.pdf b/biblio/bibtex/contrib/doc/btxhak.pdf
new file mode 120000
index 0000000000..0d4d83fe68
--- /dev/null
+++ b/biblio/bibtex/contrib/doc/btxhak.pdf
@@ -0,0 +1 @@
+../../base/btxhak.pdf \ No newline at end of file
diff --git a/biblio/bibtex/contrib/econ-bst/CHANGES.md b/biblio/bibtex/contrib/econ-bst/CHANGES.md
new file mode 100644
index 0000000000..3704d1fe74
--- /dev/null
+++ b/biblio/bibtex/contrib/econ-bst/CHANGES.md
@@ -0,0 +1,284 @@
+<!--
+Author: Shiro Takeda
+First-written: <2008/11/18>
+Time-stamp: <2018-12-07 18:50:38 st>
+-->
+
+Changelogs for econ.bst
+==============================
+
+## Ver. 2.5
+
+* Changed the license of `econ.bst` to the LaTeX Project Public License.
+
+
+## Ver. 2.4
+
+* Added the function to implement certificated random author ordering propsed by
+ the following article.
+
+ Ray, Debraj ⓡ Arthur Robson (2018) "Certified Random: A New Order for
+ Coauthorship," American Economic Review, Vol. 108, No. 2, pp. 489–520, URL:
+ http://www.aeaweb.org/articles?id=10.1257/aer.20161492, DOI:
+ http://dx.doi.org/10.1257/aer.20161492.
+
+ For this, the following functions are added: `bst.use.nameorder`,
+ `bst.and.nameorder`, `bst.cite.and.nameorder`, `bst.and.others.nameorder`.
+
+ For the details, see the section "Certified random order" in econ-example.pdf.
+
+* Changed the default value of `bst.doi.pre`.
+
+
+## Ver. 2.3
+
+* Changed the default setting of `bst.hide.number`.
+
+* Modified the style for Ph.D. thesis (the title of Ph.D. thesis is treated as
+ book title).
+
+* Modified the style for editors to be similar to the style for authors. Now,
+ the setting of `bst.author.name` is applied to editors.
+
+
+## Ver. 2.2 (2017-08-19)
+
+* Slightly changed the definition of `format.url`, `bst.url.pre` and
+ `bst.url.post`.
+
+* Changed `\it` command to `\textit` command.
+
+* Added the function `bst.url.doi` which determines the way for displaying URL
+ and DOI fields when both fields exist. You can choose three values for
+ `bst.url.doi`.
+
+ + `#0` -> Both fields are displayed
+ + `#1` -> Only URL field is displayed
+ + `#2` -> Only DOI field is displayed
+
+
+## Ver. 2.1 (2013-07-09)
+
+* URL field: In the new econ.bst, URL field can be displayed. If you set
+ non-zero to `bst.show.url`, url field is displayed before note field (this is
+ the default behavior). If you set zero to `bst.show.url`, url field is
+ suppressed.
+
+* Added the new function `bst.url.pre` and `bst.url.post`. These functions
+ specify the strings before and after url field.
+
+* access field: Added the new function `bst.access.pre` and
+ `bst.access.post`. These functions specify the strings before and after access
+ field. Note that access field is specific to econ.bst and not inherent in the
+ standard bib file. The value of access field is used for accessed date for
+ URL. For example, suppose that there are the following two settings in the bib
+ file
+
+ url = {http://shirotakeda.org/en/tex/econ-bst.html},
+ access = {4th July, 2013}
+
+ In the default econ.bst, these settings generate the reference like
+
+ URL: http://shirotakeda.org/en/tex/econ-bst.html, accessed on 4th July, 2013.
+
+* Added the new function `bst.show.doi`. If you set non-zero to `bst.show.doi`,
+ DOI field is displayed before note field. If you set zero to `bst.show.doi`,
+ DOI field is suppressed (this is the default behavior). Note that DOI field is
+ not inherent in the standard bib file. See econ-sample.pdf for an example.
+
+* Added the new function `bst.doi.pre` and `bst.doi.post`. These functions
+ specify the strings before and after DOI field.
+
+* Added the new function `bst.post.note`. This function specifies the strings
+ after note field.
+
+* Added new type "online". This is the document type for web page. Note that
+ this is not inherent in the standard bib file and it does not work for other
+ bst files.
+
+
+## Ver. 2.0.1 (2011-12-05)
+
+* Fixed bugs for sorting entries. In version 2.0, entries of book and
+ incollection type are not sometimes sorted in alphabetical order.
+
+* The previous econ.bst always puts `period' before the content of note
+ field. The new econ.bst uses `comma' by default (but this depends on user
+ customization).
+
+* Added new function `bst.hide.title`. If you set non-zero to bst.hide.title,
+ title is not displayed.
+
+
+## Ver. 2.0 (2011-11-10)
+
+* Added \bysame abbreviation of alternative style.
+
+ Suppose that there are the following three entries:
+
+ Mazda, A., Subaru, B., and Honda, C., (2011) "ABC"
+ Mazda, A., Subaru, B., and Honda, C., (2011) "DEF"
+ Mazda, A., Subaru, B., and Toyota, D., (2011) "GHI"
+
+ When you set non-zero to `bst.use.bysame` in the previous econ.bst,
+ these entries are listed like
+
+ [List 1]
+ Mazda, A., Subaru, B., and Honda, C., (2011) "ABC"
+ ----, (2011) "DEF"
+ Mazda, A., Subaru, B., and Toyota, D., (2011) "GHI"
+
+ That is, the abbreviation of authors by \bysame is only applied to entries
+ with exactly the same name.
+
+ In the new econ.bst, you can choose an alternative abbreviation style like
+
+ [List 2]
+ Mazda, A., Subaru, B., Honda, C., (2011) "ABC"
+ ----, ----, and ----, (2011) "DEF"
+ ----, ----, and Toyota, D., (2011) "GHI"
+
+ In the new econ.bst, you can choose three values for `bst.use.bysame`.
+
+ + `#0`: Not use bysame command.
+ + `#1`: Use bysame command like List 1 (this is the default value).
+ + `#2`: Use bysame command like List 2.
+
+ For the details, see econ-sample.pdf.
+
+
+* Abolished `bst.year.backward` and added `bst.year.position`.
+ Now you can choose the position of year.
+
+ If set to #0, year is always placed right after "author".
+
+ If non-zero, year is placed at the end (before note field) except for aritcle
+ type entry.
+
+ In article type entry, the position of year changes according to the following
+ rule:
+
+ + `#1` -> year is placed at the end.
+ + `#2` -> year is placed after journal name in aritcle type entry.
+ + `#3` -> year is placed after volume in aritcle type entry.
+
+* Added `bst.year.na.pre` and `bst.year.na.post`. These functions are
+ `bst.year.pre` and `bst.year.post` for non-article type entry. In the new
+ econ.bst, `bst.year.pre` and `bst.year.post` are only applied to aritcle type
+ entry.
+
+* Added `bst.editor.btitle.order`.
+
+ This determines the order of editor and booktitle in incollection and
+ inproceedings entry.
+
+ If `#0`, editors - booktitle order (the default value).
+ If non-zero, booktitle - editors order.
+
+* Added `bst.address.position`.
+
+ You can choose the order of address and publisher by this function.
+
+ If `#0`, address -> publisher order (the default value).
+ If non-zero, publisher -> address order.
+
+
+## Ver. 1.3.2 (2011-04-05)
+
+* Fixed a bug in `bst.hide.number`.
+
+
+## Ver. 1.3.1 (2010-12-17)
+
+* Added the new function `bst.hide.number`. If you want to hide number filed,
+ set non-zero to this function.
+
+
+## Ver. 1.3 (2010-12-04)
+
+* Fixed a bug in period-comma handling.
+
+* Changed the rule for sorting entries.
+
+ In the previous rule, econ.bst use full author name for primary sorting
+ key. For example, suppose that there are references like
+
+ Hatoyama, Fukuda, Abe (2009) "apple"
+ Hatoyama, Aso, Fukuda, Abe (2007) "orange."
+ Hatoyama, Abe, Fukuda, Koizumi (2009) "grape."
+
+ In this case, econ.bst sorts references in the following order.
+
+ Hatoyama, Abe, Fukuda, Koizumi (2009) "grape."
+ Hatoyama, Aso, Fukuda, Abe (2007) "orange."
+ Hatoyama, Fukuda, Abe (2009) "apple."
+
+ In the new rule, econ.bst uses the abbreviated author name instead of the full
+ author name. That is, the econ.bst uses
+
+ Hatoyama et al. (2009) "apple."
+ Hatoyama et al. (2007) "orange."
+ Hatoyama et al. (2009) "grape."
+
+ for the sorting key. So three articles are sorted in the following order.
+
+ Hatoyama, Aso, Fukuda, Abe (2007) "orange."
+ Hatoyama, Fukuda, Abe (2009) "apple."
+ Hatoyama, Abe, Fukuda, Koizumi (2009) "grape."
+
+* Changed the rule for attaching alphabetical index to year.
+
+ In the previous rule, econ.bst does not attach alphabetical index to year in
+ the following two articles.
+
+ Hatoyama, Abe, Fukuda, Koizumi (2009) "grape."
+ Hatoyama, Fukuda, Abe (2009) "apple."
+
+ This means that two articles have the exactly same abbreated citation form
+ "Hatoyama et al.(2009)".
+
+ In the new rule, econ.bst attaches alphabetical index to the above two
+ articles like
+
+ Hatoyama, Fukuda, Abe (2009a) "apple."
+ Hatoyama, Abe, Fukuda, Koizumi (2009b) "grape."
+
+ So the abbreated citation form for two articles are distinguished like
+ Hatoyama et al.(2009a) and Hatoyama et al.(2009b).
+
+
+## Ver. 1.2 (2008-12-22)
+
+* When there are successive periods and commas (for example, ".,", "..", ",,"
+ etc.), the second one is removed. In the previous econ.bst, it is difficult
+ to use period and comma as delimiters at the same time because it often causes
+ problems such as successive commas and periods. The new econ.bst removes the
+ second period or comma if there are successive periods and commas.
+
+* Added new function `bst.and.others.num`. Author names in the citation part
+ are abbreviated by et al. if the number of authors is greater or equal to
+ bst.and.others.num.
+
+
+## Ver. 1.1 (2008-11-17)
+
+* Added new functions: `bst.sort.year`, `bst.and.others`, `bst.cite.and` and
+ `bst.cite.ands`.
+
+* Corrected typos.
+
+
+## Ver. 1.0 (2007-11-20)
+
+* The initial release.
+
+
+<!--
+--------------------
+Local Variables:
+mode: markdown
+fill-column: 80
+coding: utf-8-dos
+End:
+-->
+
diff --git a/biblio/bibtex/contrib/econ-bst/README.md b/biblio/bibtex/contrib/econ-bst/README.md
new file mode 100644
index 0000000000..c9a06fa57e
--- /dev/null
+++ b/biblio/bibtex/contrib/econ-bst/README.md
@@ -0,0 +1,43 @@
+<!--
+Filename: README.md
+Author: Shiro Takeda
+e-mail <shiro.takeda@gmail.com>
+First-written: <2017-07-30>
+Time-stamp: <2018-12-07 17:12:31 st>
+-->
+
+econ.bst
+==============================
+
+`econ.bst` is a BibTeX style file for economics. It provids the following
+features:
+
+* The author-year type citation (you need `natbib.sty` as well).
+* Reference style used in economics papers (`econ.bst` is not a BibTeX style for a specific journal).
+* Highly customizable. You can easily customize reference style as you wish.
+* You can use "certified random order" proposed by [Ray ⓡ Robson (2018), AER](http://dx.doi.org/10.1257/aer.20161492).
+
+
+## Explanation of files
+
+| File | Explanation |
+|:-----------------------------------------|:-------------------------------------------------------------|
+| `econ.bst` | This is the main bst file. |
+| `econ-example.tex` | This file explains how to use econ.bst. |
+| [`econ-example.pdf`](econ-example.pdf) | A PDF file created fom `econ-example.tex`. |
+| `econ-example.bib` | This is a bibliography database file. |
+| `customization` | This folder contains customized bst files. |
+| [`CHANGES.md`](CHANGES.md) | Changelog file. |
+| `README.md` | This file. |
+
+
+<!--
+--------------------
+Local Variables:
+mode: markdown
+fill-column: 80
+coding: utf-8-dos
+End:
+-->
+
+
diff --git a/biblio/bibtex/contrib/econ-bst/customization/README.md b/biblio/bibtex/contrib/econ-bst/customization/README.md
new file mode 100644
index 0000000000..aed7368f0e
--- /dev/null
+++ b/biblio/bibtex/contrib/econ-bst/customization/README.md
@@ -0,0 +1,41 @@
+<!--
+Author: Shiro Takeda
+e-mail <shiro.takeda@gmail.com>
+First-written: <2016-03-16>
+Time-stamp: <2018-11-09 11:54:42 st>
+-->
+
+Contents of this folder
+==============================
+
++ This folders includes bst files created by customizing econ.bst.
++ If you want to customize econ.bst, see these files.
+
+| bst file | Explanation |
+|:---------------------|:--------------------------------------------------------|
+| `econ.bst` | The default econ.bst file. |
+| `econ-a.bst` | A simple style. |
+| `econ-b.bst` | A style with much decoration. |
+| `econ-aer.bst` | A style like AER (American Economic Review). |
+| `econ-jet.bst` | A style like JET (Journal of Economic Theoriy). |
+| `econ-no-sort.bst` | This style lists entries in citation order. |
+| `econ-econometrica.bst` | A style like Econometrica. |
+| `econ-jie.bst` | A style like JIE (Journal of International Economics). |
+
+| PDF file | Explanation |
+|:---------------------|:--------------------------------------------------------|
+| `econ-default.pdf` | PDF file created from econ.bst file. |
+| `econ-numbers.pdf` | PDF file which use numerical citation mode. |
+
+Other PDF files are created from the corresponding bst files above.
+
+
+<!--
+--------------------
+Local Variables:
+mode: markdown
+fill-column: 90
+coding: utf-8-dos
+End:
+-->
+
diff --git a/biblio/bibtex/contrib/econ-bst/customization/cited-part.tex b/biblio/bibtex/contrib/econ-bst/customization/cited-part.tex
new file mode 100644
index 0000000000..1ff16c9b18
--- /dev/null
+++ b/biblio/bibtex/contrib/econ-bst/customization/cited-part.tex
@@ -0,0 +1,52 @@
+
+\noindent Cited entries: \vspace{1em} \\
+\noindent
+\citet{Ryza15:_advan_analy_spark_patter_learn_data_scale},
+\citet{yamazaki13:_japan},
+\citet{stakeda2013web},
+\citet{Takeda2012a},
+\citet{bergemann11:_ration},
+\citet{goldin:katz:2011},
+\citet{Takeda2011b},
+\citet{takeda2011c},
+\citet{takeda10:_cge_analy_welfar_effec_trade},
+\citet{2009yamasue502165},
+\citet{goldin:katz:2008},
+\citet{Biker-2007-unemployment},
+\citet{takeda06:_cge_analy_welfar_effec_trade},
+\citet{2007yamasue482353},
+\citet{Peri2007},
+\citet{BabikerRutherford-2005-EconomicEffectsof},
+\citet{ishikawa03:_green_gas_emiss_contr_open_econom},
+\citet{brooke03:_gams},
+\citet{DeGorter2002},
+\citet{Babiker2000525},
+\citet{goldin:katz:2000},
+\citet{rutherford00:_gtapin_gtap_eg},
+\citet{fujita99jp:_spatial_econom},
+\citet{Babiker-1999-KyotoProtocoland},
+\citet{Babiker-1999-JapaneseNuclearPower},
+\citet{Parry1997},
+\citet{borgers95:_note_implem_stron_domin},
+\citet{wong95:_inter_trade_goods_factor_mobil_},
+\citet{ishikawa94:_revis_stolp_samuel_rybcz_theor_produc_exter},
+\citet{brezis93:_leapf_inter_compet},
+\citet{krugman91:_geogr_trade},
+\citet{helpman91:_inter_trade_trade_polic},
+\citet{krugman91:_is_bilat_bad},
+\citet{wang89:_model_therm_hydrod_aspec_molten},
+\citet{lucas76:_econom_polic_evaluat},
+\citet{milne-thomson68:_theor_hydrod}. \\
+
+\vspace*{1em}
+\noindent
+\citet{10.1257/aer.20161492},
+\citet{RePEc:hka:wpaper:2018-037},
+\citet{vohra18:_maxim_farsig_stabl_set},
+\citet{NBERw25205}.
+
+% --------------------
+% Local Variables:
+% fill-column: 80
+% End:
+
diff --git a/biblio/bibtex/contrib/econ-bst/customization/econ-a.bst b/biblio/bibtex/contrib/econ-bst/customization/econ-a.bst
new file mode 100644
index 0000000000..bea9f43e8c
--- /dev/null
+++ b/biblio/bibtex/contrib/econ-bst/customization/econ-a.bst
@@ -0,0 +1,3541 @@
+%% econ.bst: BibTeX style file for papers in economics.
+%
+% Author: Shiro Takeda
+% Maintainer: Shiro Takeda
+% Copyright (C) 2001-2018 Shiro Takeda
+% First-written: <2007/07/28>
+% Time-stamp: <2018-12-07 18:49:52 st>
+% Version: 2.5
+% Keywords: TeX, BibTeX, bst
+% URL: https://github.com/ShiroTakeda/econ-bst
+
+% This work may be distributed and/or modified under the
+% conditions of the LaTeX Project Public License, either version 1.3
+% of this license or (at your option) any later version.
+% The latest version of this license is in
+% http://www.latex-project.org/lppl.txt
+% and version 1.3 or later is part of all distributions of LaTeX
+% version 2005/12/01 or later.
+%
+% This work has the LPPL maintenance status "maintained".
+%
+% The Current Maintainer of this work is Shiro Takeda.
+
+%% Main features of econ.bst.
+
+% "econ.bst" is a BibTeX style file for economics. It provids the following
+% features:
+
+% 1) The author-year type citation (you need "natbib.sty" as well).
+% 2) Reference style used in economics papers ("econ.bst" is not a BibTeX style
+% for a specific journal).
+% 3) Highly customizable. You can easily customize reference style as you wish.
+% 4) You can use "certified random order" proposed by Ray ⓡ Robson (2018)
+% (http://dx.doi.org/10.1257/aer.20161492).
+
+% Bug reports, requests and suggestions are welcome.
+
+% For changelogs, see CHANGES.txt file.
+
+% version number
+FUNCTION {econ.version} { "2.5" }
+
+% Debug mode. Non-zero makes debug mode on.
+FUNCTION {econ.debug}
+{ #0 } % Debug mode off (default).
+% { #1 } % Debug mode on.
+
+ENTRY
+ %%% Declaration of field
+ { access address author booktitle chapter doi edition editor howpublished
+ institution journal key month note number organization pages publisher
+ school series title type url volume year
+ % Fields specific to econ.bst
+ order absorder nameorder
+ }
+
+ % Definition of entry variable. The entry variable is a variable which has
+ % different values according to different entries.
+ %% Integer entry variable:
+ { order.cited }
+
+ %% String entry variable
+ { label cyear flabel alabel extra.label sort.label sort.label.abb
+ extra.label.bysame nameorder.temp }
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%%
+%% Functions for customization:
+%%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+% Use \bysame or not.
+%
+% If set to #0, \bysame is not used.
+% If set to #1, \bysame is used
+% If set to #2, \bysame is used (alternative abbreviation style).
+%
+% Note that integer number is expressed as # + integer in bst file.
+% \bysame is the function that abbreviates succession of the same authors' name by ---.
+%
+% See econ-sample.pdf for details.
+%
+FUNCTION {bst.use.bysame}
+{ #0 } % Not use \bysame
+% { #1 } % -> Use \bysame (default)
+% { #2 } % -> Use \bysame of alternative style.
+
+% The definition of \bysame command.
+%
+FUNCTION {bst.bysame.definition}
+{ "\hskip.3em \leavevmode\rule[.5ex]{3em}{.3pt}\hskip0.5em" } % (default)
+% { "\leavevmode\hbox to\leftmargin{\hrulefill\,\,}" } % If you set #2 to bst.use.bysame, use this.
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+% The order of fist and last name.
+%
+FUNCTION {bst.author.name}
+% { #0 } % (default)
+{ #1 }
+% { #2 }
+
+% Case of #0: First author -> last-first, other authors -> first-last.
+% Fujita, Masahisa, Paul R. Krugman, and Anthony J. Venables.
+
+% Case of #1: All authors -> last-first
+% Fujita, Masahisa, Krugman, Paul R., and Venables, Anthony J.
+
+% Case of #2: All authors -> first-last
+% Masahisa Fujita, Paul R. Krugman, and Anthony J. Venables.
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+% Abbreviate first name of authors (editors):
+%
+FUNCTION {bst.first.name.initial}
+% { #0 } % #0 -> full letters (default).
+{ #1 } % Non-zero -> initial letter only.
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+% Decapitalize of strings in title field.
+%
+FUNCTION {bst.title.lower.case}
+% { #0 } % If #0, not decapitalize title (default).
+{ #1 } % If non-#0, decapitalize title
+
+% Hide title filed.
+%
+FUNCTION {bst.hide.title}
+{ #0 } % #0 -> Title field is displayed (default)
+% { #1 } % Non-zer -> Title field is hidden
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+% Hide month.
+%
+FUNCTION {bst.hide.month}
+% { #0 } % #0 -> show month field (default).
+{ #1 } % non-#0 -> hide month field.
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+% Attach number index like plain.bst.
+%
+FUNCTION {bst.use.number.index}
+{ #0 } % Not use number index (default).
+% { #1 } % Non-#0 -> Use number index
+
+% The string before number index:
+%
+FUNCTION {bst.number.index.pre}
+{ "[" } % (default)
+
+% The string after number index. Adjustment is recommended.
+%
+FUNCTION {bst.number.index.post}
+{ "]\hskip1.0em " } % (default)
+
+% Maximum digit of number index:
+% If the number of reference items >= 100, set 3 to this function.
+% If the number of reference items < 100, set 2 to this function.
+% If the number of reference items < 10, set 1 to this function.
+%
+FUNCTION {bst.number.index.digit}
+{ "2" } % (default)
+% { "3" }
+
+% The functions below are used to adjust space and postion. If you use fonts
+% other than computer modern fonts, you had better make adjustments.
+%
+% Setting for bst.number.index.digit = 1:
+FUNCTION {bst.number.index.bibhang.one}
+{ "2.05em" } % (default)
+% Setting for bst.number.index.digit = 2:
+FUNCTION {bst.number.index.bibhang.ten}
+{ "2.55em" } % (default)
+% Setting for bst.number.index.digit = 3:
+FUNCTION {bst.number.index.bibhang.hund}
+{ "3.05em" } % (default).
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+% Position of "year":
+%
+% You can choose the position of year by this function.
+%
+% If set to #0, year is placed right after "author".
+% If set to non-zero, year is placed at the end (before note field) except for
+% aritcle type entry.
+%
+% In article type entry, the position of year changes according to the
+% following rule:
+%
+% #1 -> year is placed at the end.
+% #2 -> year is placed after journal name in aritcle type entry.
+% #3 -> year is placed after volume in aritcle type entry.
+%
+FUNCTION {bst.year.position}
+{ #0 } % (default).
+% { #1 } % Last place before note.
+% { #2 } % After journal name for aticle type entry.
+% { #3 } % After volume for aticle type entry.
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+% If 0, references are sorted by old documents -> recent documents. If
+% non-zero, reverse order.
+FUNCTION {bst.reverse.year}
+{ #0 } % Normal order (old -> recent) (default).
+% { #1 } % inverse order (recent -> old)
+
+% If non-zero, sort references by using year field as the primary key
+% (chronological sorting).
+FUNCTION {bst.sort.year}
+{ #0 } % Normal case: year is used as the sorting key next to author (default).
+% { #1 } % year is used as the primary sorting key.
+
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+% If non-zero, references are listed in citation order.
+%
+FUNCTION {bst.no.sort}
+{ #0 } % (default)
+% { #1 } % listed in citation order.
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+% Non-zero -> sort references by entry type (article, book, incollection etc.)
+%
+FUNCTION {bst.sort.entry.type}
+{ #0 } % #0 -> Normal (not sort references by entry type) (default).
+% { #1 } % Non-zero -> sort references by entry type.
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+% 0 -> use absorder field to sort items. Otherwise, ignore absorder field.
+%
+FUNCTION {bst.notuse.absorder.field}
+{ #0 } % #0 -> Use absorder (default).
+% { #1 } % Non-#0 -> Not use absorder.
+%
+% Order of priority to sort items
+%
+% absorder -> author -> year -> order -> month -> title
+%
+% wehre absorder and order fields are specific to econ.bst.
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+% 0 -> use order field to sort items. Otherwise, ignore order field.
+% Note: order field is specific to econ.bst.
+FUNCTION {bst.notuse.order.field}
+{ #0 } % #0 -> Use order field (default).
+% { #1 } % Non-#0 -> not use order field.
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%%% and
+
+%%% String used to separate author names in references.
+%
+% String replaced with _ in "Mr. A _ Mr. B "
+%
+FUNCTION {bst.and}
+{ ", " }
+% { " and " } % (default)
+
+%%% String used to separate author names in references (more than two authors).
+%
+% String replaced with _ in "Mr. A, Mr. B _ Mr. C"
+%
+FUNCTION {bst.ands}
+{ ", " }
+% { ", and " } % (default)
+
+%%% String used to separate author names in citation part.
+%
+% String replaced with _ in "Mr. A _ Mr. B "
+%
+FUNCTION {bst.cite.and}
+{ " and " } % (default)
+
+%%% String used to separate author names in citation part (more than two authors).
+%
+% String replaced with _ in "Mr. A, Mr. B _ Mr. C"
+%
+FUNCTION {bst.cite.ands}
+{ " and " } % (default)
+
+%%% If you want to use random author order for some bibliography entries, set
+% non-zero to this function.
+%
+FUNCTION {bst.use.nameorder}
+{ #1 } % Use random order (default)
+% { #0 } % Not use random order
+
+%%% String used to separate author names in references for the entry of random
+% author order.
+%
+FUNCTION {bst.and.nameorder}
+{ " \textcircled{r} " } % (default)
+
+%%% String used to separate author names in citation part for the entry of
+% random author order
+%
+FUNCTION {bst.cite.and.nameorder}
+{ " \textcircled{r} " } % (default)
+
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+% Author names in the citation part are abbreviated by et al. if the number of
+% authors is greater or equal to bst.and.others.num.
+FUNCTION {bst.and.others.num}
+{ #3 } % If the number of authors is greater or equal to three (default).
+% { #4 }
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+% Strings used when abbreviating multiple-authors in citation part.
+FUNCTION {bst.and.others}
+{ " et~al." } % (default)
+
+% Strings used when abbreviating multiple-authors in citation part for entries
+% with random author order.
+FUNCTION {bst.and.others.nameorder}
+{ " \textcircled{r}~al." } % (default)
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% author
+
+% The string before author:
+%
+FUNCTION {bst.author.pre}
+{ "" } % (default)
+
+% The string after author:
+%
+FUNCTION {bst.author.post}
+{ "." } % (default)
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% year
+
+% The string before year only for aritcle type entry.
+%
+FUNCTION {bst.year.pre}
+{ " " }
+% { " (" } % (default)
+
+% The string after year only for aritcle type entry.
+%
+FUNCTION {bst.year.post}
+{ ". " }
+% { ") " } % (default)
+
+% The string after year for non-article type entry (book, incollection etc)
+%
+FUNCTION {bst.year.na.pre}
+{ " " }
+% { " (" } % (default)
+
+% The string after year for non-article type entry (book, incollection etc)
+%
+FUNCTION {bst.year.na.post}
+{ ". " }
+% { ") " } % (default)
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% title (except for title in book)
+
+% The string before title:
+%
+FUNCTION {bst.title.pre}
+{ "" }
+% { "``" } % (default)
+
+% The string after title:
+%
+FUNCTION {bst.title.post}
+{ "." }
+% { ",''" } % (default)
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% tile for book:
+
+% The string before book title:
+%
+FUNCTION {bst.book.pre}
+{ " " }
+% { " \textit{" } % (default)
+
+% The string after book title:
+%
+FUNCTION {bst.book.post}
+{ "." }
+% { "}" } % (default)
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% booktitle
+
+% The string before booktitle:
+%
+FUNCTION {bst.btitle.pre}
+{ " " }
+% { " \textit{" } % (default)
+
+% The string after booktitle:
+%
+FUNCTION {bst.btitle.post}
+{ "" }
+% { "}" } % (default)
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% journal name
+
+% The string before journal name:
+%
+FUNCTION {bst.journal.pre}
+{ " " }
+% { " \textit{" } % (default)
+
+% The string after journal name:
+%
+FUNCTION {bst.journal.post}
+{ "" }
+% { "}" } % (default)
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% editor notation:
+
+% The string that indicates multiple editors:
+%
+FUNCTION {bst.editors}
+{ " eds. " } % (default)
+
+% The string that indicates single editor:
+%
+FUNCTION {bst.editor}
+{ " ed. " } % (default)
+
+% Order of editor and booktitle in incollection and inproceedings entries.
+%
+% If set to #0: editors -> booktitle order
+% If set to non-zero: booktitle -> editors order
+%
+FUNCTION {bst.editor.btitle.order}
+{ #0 } % (default)
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% edition
+
+% The string before edition:
+%
+FUNCTION {bst.edition.pre}
+{ ", " } % (default)
+
+% The string after edition:
+%
+FUNCTION {bst.edition.post}
+{ " edition" } % (default)
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% volume
+
+% The string before volume:
+%
+FUNCTION {bst.volume.pre}
+{ ", " }
+% { ", Vol. " } % (default)
+
+% The string after volume:
+%
+FUNCTION {bst.volume.post}
+{ "" } % (default)
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% number
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+% Hide number. If non-zero, number is suppressed.
+FUNCTION {bst.hide.number}
+{ #0 } % #0 -> show number field (default)
+% { #1 } % non-#0 -> Hide number field.
+
+% The string before number:
+%
+FUNCTION {bst.number.pre}
+{ " (" }
+% { ", No. " } % (default)
+
+% The string after number:
+%
+FUNCTION {bst.number.post}
+{ ")" }
+% { "" } % (default)
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% in
+
+% In
+%
+FUNCTION {bst.in}
+{ " In " }
+% { " in " } % (default)
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% page
+
+% The string before page (multiple pages):
+%
+FUNCTION {bst.pages.pre}
+{ ", " }
+% { ", pp." } % (default)
+
+% The string before page:
+%
+FUNCTION {bst.page.pre}
+{ ", p." } % (default)
+
+% The string after page (multiple pages):
+%
+FUNCTION {bst.pages.post}
+{ "" } % (default)
+
+% The string after page:
+%
+FUNCTION {bst.page.post}
+{ "" } % (default)
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% chapter
+
+% The string before chapter:
+%
+FUNCTION {bst.chapter.pre}
+{ ", Chap." } % (default)
+
+% The string after chapter:
+%
+FUNCTION {bst.chapter.post}
+{ "" } % (default)
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% month
+
+% The string before month:
+%
+FUNCTION {bst.month.pre}
+{ ", " } % (default)
+
+% The string after month:
+%
+FUNCTION {bst.month.post}
+{ "" } % (default)
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% address
+% The string before address:
+%
+FUNCTION {bst.address.pre}
+{ ", " } % (default)
+
+% The string after address:
+%
+FUNCTION {bst.address.post}
+{ "" } % (default)
+
+% You can choose the order of address and publisher by this function.
+%
+% If #0, address -> publisher order (the default value).
+% If non-zero, publisher -> address order.
+
+FUNCTION {bst.address.position}
+{ #0 } % Address is placed before publisher (default)
+% { #1 } % Address is placed after publisher
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% publisher
+
+% The string before publisher:
+%
+FUNCTION {bst.publisher.pre}
+{ ", " }
+% { ": " } % (default)
+
+% The string after publisher:
+%
+FUNCTION {bst.publisher.post}
+{ "" } % (default)
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% series
+
+% The string before series:
+%
+FUNCTION {bst.series.pre}
+{ ", " } % (default)
+
+% The string after series:
+%
+FUNCTION {bst.series.post}
+{ "" } % (default)
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% organization
+
+% The string before organization:
+%
+FUNCTION {bst.organization.pre}
+{ ", " } % (default)
+
+% The string after organization:
+%
+FUNCTION {bst.organization.post}
+{ "" } % (default)
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% school
+
+% The string before school:
+%
+FUNCTION {bst.school.pre}
+{ ", " } % (default)
+
+% The string after school:
+%
+FUNCTION {bst.school.post}
+{ "" } % (default)
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% institution
+
+% The string before institution:
+%
+FUNCTION {bst.institution.pre}
+{ ", " } % (default)
+
+% The string after institution:
+%
+FUNCTION {bst.institution.post}
+{ "" } % (default)
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% howpublished
+
+% The string before howpublished:
+%
+FUNCTION {bst.howpublished.pre}
+{ " " } % (default)
+
+% The string after howpublished:
+%
+FUNCTION {bst.howpublished.post}
+{ "" } % (default)
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% url
+
+% Show or Hide url. If non-zero, url is displayed. Otherwise, url is suppressed.
+FUNCTION {bst.show.url}
+% { #1 } % non-#0 -> Show url field (default)
+{ #0 } % #0 -> Not show url field.
+
+% The string before url:
+%
+FUNCTION {bst.url.pre}
+{ ", URL: \url{" } % (default)
+
+% The string after url:
+%
+FUNCTION {bst.url.post}
+{ "}" } % (default)
+
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% Access
+
+% This setting is valid only if there are "access" field in bib
+% files. The value of access field indicates accessed date for URL.
+
+% The string before access.
+FUNCTION {bst.access.pre}
+{ ", accessed on " } % (default)
+
+% The string after access.
+FUNCTION {bst.access.post}
+{ "" } % (default)
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% DOI (digital object identifier)
+
+% This setting is valid only if there are "doi" field in bib files.
+
+% Show or Hide DOI. If non-zero, DOI is displayed. Otherwise, DOI is suppressed.
+FUNCTION {bst.show.doi}
+% { #1 } % non-#0 -> Show DOI field (default)
+{ #0 } % #0 -> Not show DOI field.
+
+% The string before DOI:
+%
+FUNCTION {bst.doi.pre}
+{ ", DOI: \href{http://dx.doi.org/" doi * "}{" * } % (default)
+
+% The string after DOI:
+%
+FUNCTION {bst.doi.post}
+{ "}" } % (default)
+
+% How to show URL and DOI fields when both fields exist.
+%
+% #0 -> Both fields are displayed
+% #1 -> Only URL field is displayed
+% #2 -> Only DOI field is displayed
+%
+FUNCTION {bst.url.doi}
+% { #0 } % (default) -> Both fields are displayed
+{ #1 } % -> Only URL field is displayed
+% { #2 } % -> Only DOI field is displayed
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% Other functions:
+
+% The string before note.
+FUNCTION {bst.note.pre}
+{ ", " } % (default)
+
+% The string after note.
+FUNCTION {bst.note.post}
+{ "" } % (default)
+
+% The string that represents Technical report:
+%
+FUNCTION {bst.techrep}
+{ " Tech. Rep." } % (default)
+
+% The string that represents master thesis:
+%
+FUNCTION {bst.mthesis}
+{ " Master's thesis" } % (default)
+
+% The string that represents phd thesis:
+%
+FUNCTION {bst.phdthesis}
+{ " Ph.D. thesis" } % (default)
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%%
+%% Functions for customization end here:
+%%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+FUNCTION {bst.first}
+{ "1st" }
+
+FUNCTION {bst.second}
+{ "2nd" }
+
+FUNCTION {bst.third}
+{ "3rd" }
+
+FUNCTION {bst.fourth}
+{ "4th" }
+
+FUNCTION {bst.fifth}
+{ "5th" }
+
+FUNCTION {bst.st}
+{ "st" }
+
+FUNCTION {bst.nd}
+{ "nd" }
+
+FUNCTION {bst.rd}
+{ "rd" }
+
+FUNCTION {bst.th}
+{ "th" }
+
+%%%%% memo by Takeda
+
+% "a" 'b := indicates substituting string "a" for variable b.
+
+% Integer number #0, #1,...
+
+%%% Function definition:
+%
+% FUNCTION {name}
+% { 's :=
+%
+% }
+%
+% This is the definition of a function named "name". The function "name" is
+% used in the following way
+%
+% "foo" name
+% "foo" is an argument for the function "name".
+%
+% About the definition of a function with more than two arguments, see the
+% definition of "chop.word".
+
+%%% Declaration of variables:
+
+%% String global variables:
+STRINGS { s t tt }
+STRINGS { year.num }
+STRINGS { preone preten }
+STRINGS { last.sort.label next.extra prev.author prev.author.aer this.author }
+STRINGS { hang }
+STRINGS { item.type }
+STRINGS { tempa tempb }
+
+%% Integer global variables:
+INTEGERS { nameptr namesleft numnames name.num }
+INTEGERS { multiresult }
+INTEGERS { index }
+INTEGERS { len }
+INTEGERS { last.extra.num }
+INTEGERS { output.state before.all mid.sentence after.sentence after.block }
+INTEGERS { last.period.comma }
+INTEGERS { len1.aer len2.aer i.aer }
+
+%%% Definition of functions:
+FUNCTION {not}
+{ { #0 }
+ { #1 }
+ if$
+}
+
+FUNCTION {and}
+{ 'skip$
+ { pop$ #0 }
+ if$
+}
+
+FUNCTION {or}
+{ { pop$ #1 }
+ 'skip$
+ if$
+}
+
+%%% Initialize variables:
+FUNCTION {init.state.consts}
+{ #0 'before.all :=
+ #1 'mid.sentence :=
+ #2 'after.sentence :=
+ #3 'after.block :=
+}
+
+%%% Remove comma and add period:
+%
+%%%
+FUNCTION {add.period.x}
+{ duplicate$
+ #-1 #1 substring$ "," =
+ { #-2 global.max$ substring$ "." * }
+ { duplicate$
+ #-1 #2 substring$ ". " =
+ { #-3 global.max$ substring$ "." * }
+ { duplicate$
+ #-1 #2 substring$ ", " =
+ { #-3 global.max$ substring$ "." * }
+ { duplicate$
+ #-1 #2 substring$ ",'" =
+ { #-3 global.max$ substring$ ".'" * }
+ { duplicate$
+ #-1 #2 substring$ ".'" =
+ { #-3 global.max$ substring$ ".'" * }
+ { duplicate$
+ #-1 #2 substring$ ".~" =
+ { #-3 global.max$ substring$ ".~" * }
+ { duplicate$
+ #-1 #2 substring$ ",~" =
+ { #-3 global.max$ substring$ ".~" * }
+ { duplicate$
+ #-1 #3 substring$ ",''" =
+ { #-4 global.max$ substring$ ".''" * }
+ { duplicate$
+ #-1 #3 substring$ ".''" =
+ { #-4 global.max$ substring$ ".''" * }
+ { add.period$ }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+}
+
+FUNCTION {output.nonnull}
+{ 's :=
+ % mid.sentence
+ output.state mid.sentence =
+ { ", " * write$ }
+ % not mid.sentence
+ { output.state after.block =
+ % after.block
+ { add.period.x " " * write$ }
+ % before.all
+ { output.state before.all =
+ 'write$
+ { add.period.x " " * write$ }
+ if$
+ }
+ if$
+ % not mid.sentence, set to mid.sentence
+ mid.sentence 'output.state :=
+ }
+ if$
+ s
+}
+
+%%% If the last character is period or comma, set non-zero to
+%%% last.period.comma.
+FUNCTION {period.comma.p}
+{ duplicate$ 't :=
+ t #-1 #1 substring$ "." =
+ t #-1 #1 substring$ "," = or
+ t #-1 #1 substring$ ":" = or
+ t #-1 #2 substring$ ".'" = or
+ t #-1 #2 substring$ ",'" = or
+ t #-1 #3 substring$ ".''" = or
+ t #-1 #3 substring$ ",''" = or
+ t #-1 #2 substring$ ".~" = or
+ t #-1 #2 substring$ ",~" = or
+ { #1 'last.period.comma := }
+ { #0 'last.period.comma := }
+ if$
+}
+
+%%% remove unnecessary comma.
+FUNCTION {remove.pre.comma}
+{ 's :=
+ s empty$
+ { "" }
+ { s #1 #1 substring$ "," =
+ { s #2 global.max$ substring$ }
+ { s #1 #1 substring$ "." =
+ { s #2 global.max$ substring$ }
+ 's
+ if$
+ }
+ if$
+ }
+ if$
+}
+
+%%% output.nonnull.nocomma is the same as output.nonnull except that it does
+%%% not add commas even in mid.sentence.
+FUNCTION {output.nonnull.nocomma}
+{ 's :=
+ output.state mid.sentence =
+ % mid.sentence
+ { period.comma.p "" * write$ }
+
+ % not mid.sentence
+ { output.state after.block =
+ % after.block
+ { add.period.x " " * write$ }
+ % before.all
+ { output.state before.all =
+ 'write$
+ { add.period$ " " * write$ }
+ if$
+ }
+ if$
+ mid.sentence 'output.state :=
+ }
+ if$
+ last.period.comma #0 =
+ { s }
+ { s remove.pre.comma }
+ if$
+}
+
+% Not used in the current econ.bst.
+% FUNCTION {output}
+% { duplicate$ empty$
+% 'pop$
+% 'output.nonnull
+% if$
+% }
+
+FUNCTION {output.nocomma}
+{ duplicate$ empty$
+ 'pop$
+ 'output.nonnull.nocomma
+ if$
+}
+
+% Not used in the current econ.bst.
+% FUNCTION {output.check}
+% { 't :=
+% duplicate$ empty$
+% { pop$ "empty " t * " in " * cite$ * warning$ }
+% 'output.nonnull
+% if$
+% }
+
+FUNCTION {output.check.nocomma}
+{ 't :=
+ duplicate$ empty$
+ { pop$ "empty " t * " in " * cite$ * warning$ }
+ 'output.nonnull.nocomma
+ if$
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%%% Format in bbl file:
+
+% \harvarditem[Brezis et~al.]{Brezis, Krugman and
+% Tsiddon}{1993}{brezis93:_leapf_inter_compet}
+% Brezis, Elise~S., Paul~R. Krugman, and Daniel Tsiddon (1993) ``Leapfrogging in
+% International Competition: A Theory of Cycles in National Technological
+% Leadership.'', {\em American Economic Review.}, Vol.~83. No.~5. pp.
+% 1211--1219.
+
+% \harvarditem[abbreviated citation]{full citation}{year}{keyword} ...
+
+%%% Add period and newline.
+FUNCTION {fin.entry}
+{ add.period.x
+ write$
+ newline$
+}
+
+FUNCTION {new.block}
+{ output.state before.all =
+ 'skip$
+ { after.block 'output.state := }
+ if$
+}
+
+FUNCTION {new.sentence}
+{ output.state after.block =
+ 'skip$
+ { output.state before.all =
+ 'skip$
+ { after.sentence 'output.state := }
+ if$
+ }
+ if$
+}
+
+FUNCTION {new.block.check}
+{ empty$
+ 'skip$
+ 'new.block
+ if$
+}
+
+FUNCTION {field.or.null}
+{ duplicate$ empty$
+ { pop$ "" }
+ 'skip$
+ if$
+}
+
+%%% booktitle
+FUNCTION {format.btitle}
+{ booktitle empty$
+ { "" }
+ { bst.btitle.pre booktitle * bst.btitle.post * }
+ if$
+}
+
+%%% journal
+FUNCTION {format.journal}
+{ journal empty$
+ { "" }
+ { bst.journal.pre journal * bst.journal.post * }
+ if$
+}
+
+%%% title for book
+FUNCTION {format.book}
+{ title empty$
+ { "" }
+ { bst.book.pre title * bst.book.post * }
+ if$
+}
+
+FUNCTION {format.url}
+{ url empty$
+ { "" }
+ { type$ "online" = bst.show.url or
+ { bst.url.pre url * bst.url.post *
+ access empty$
+ { "" * }
+ { bst.access.pre * access * bst.access.post * }
+ if$
+ }
+ { "" }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.doi}
+{ doi empty$ bst.show.doi not or
+ { "" }
+ { bst.doi.pre doi * bst.doi.post * }
+ if$
+}
+
+FUNCTION {format.url.doi}
+{ url empty$
+ { format.doi }
+ { doi empty$
+ { format.url }
+ { bst.url.doi #0 =
+ { format.url output.nocomma
+ format.doi }
+ { bst.url.doi #1 =
+ { format.url }
+ { format.doi }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+}
+
+%%% and others
+FUNCTION {bst.and.others.output}
+{ nameorder.temp "random" =
+ bst.use.nameorder #0 = not and
+ { bst.and.others.nameorder }
+ { bst.and.others }
+ if$
+}
+
+%%% author and editor
+
+%%% name
+FUNCTION {format.names}
+{ 's :=
+ % insert 1 to nameptr.
+ #1 'nameptr :=
+ % Set the number of authors to numnames.
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ % Repeat if namesleft > 0
+ { namesleft #0 > }
+ { nameptr #1 =
+ % First author
+ { bst.author.name #0 =
+ bst.author.name #1 =
+ or
+ { bst.first.name.initial #0 =
+ { s nameptr "{vv~}{ll}{, ff}{, jj}" format.name$ 't := }
+ { s nameptr "{vv~}{ll}{, f.}{, jj}" format.name$ 't := }
+ if$
+ }
+ { bst.first.name.initial #0 =
+ { s nameptr "{ff~}{vv~}{ll}{, jj}" format.name$ 't := }
+ { s nameptr "{f.~}{vv~}{ll}{, jj}" format.name$ 't := }
+ if$
+ }
+ if$
+ }
+ % The second or later authors
+ { bst.author.name #0 =
+ bst.author.name #2 =
+ or
+ { bst.first.name.initial #0 =
+ { s nameptr "{ff~}{vv~}{ll}{, jj}" format.name$ 't := }
+ { s nameptr "{f.~}{vv~}{ll}{, jj}" format.name$ 't := }
+ if$
+ }
+ { bst.first.name.initial #0 =
+ { s nameptr "{vv~}{ll}{, ff}{, jj}" format.name$ 't := }
+ { s nameptr "{vv~}{ll}{, f.}{, jj}" format.name$ 't := }
+ if$
+ }
+ if$
+ }
+ if$
+
+ nameptr #1 >
+ % The second or later authors
+ { nameorder.temp "random" =
+ bst.use.nameorder #0 = not and
+ { bst.and.nameorder * t * }
+ { namesleft #1 >
+ % More than one authors left
+ { ", " * t * }
+ % Only one author left
+ { t "others" =
+ { bst.and.others.output * }
+ { numnames #2 =
+ % Entry with two authors
+ { bst.and * t * }
+ { bst.ands * t * }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ 't
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+}
+
+% remove successive periods (commas) from author
+FUNCTION {remove.ss.period.auth}
+{ 's :=
+ s format.names 'tempa :=
+ bst.author.post 'tempb :=
+ tempb #1 #1 substring$ "}" =
+ { tempa tempb * }
+ { tempa #-1 #1 substring$ tempb #1 #1 substring$ =
+ { tempa tempb #2 global.max$ substring$ * }
+ { tempa tempb * }
+ if$
+ }
+ if$
+}
+
+% <prev name list> <new name list> compare.names <modified name list>
+FUNCTION {compare.names.aer}
+{ 's :=
+ 'tempa :=
+
+% "current.author = " s * "\\" * write$ newline$
+% "prev.author = " tempa * "\\" * write$ newline$
+
+ tempa num.names$ 'len1.aer := % len1 = the number of previous authors
+ s num.names$ 'len2.aer := % len2 = the number of current authors
+
+% len1.aer := min(len1.aer,len2.aer)
+% len1 -> min{ the number of previous authors, the number of current authors }
+ len1.aer len2.aer >
+ { len2.aer 'len1.aer := }
+ { }
+ if$
+
+% start with an empty string, then while the components are the same
+% add "\bysame"
+ ""
+ #1 'i.aer :=
+
+ { i.aer len1.aer > not }
+ { tempa i.aer "{ff }{vv }{ll}{ jj}" format.name$
+ s i.aer "{ff }{vv }{ll}{ jj}" format.name$
+ =
+ { #1 i.aer <
+ { " and " * } % \bysame で省略する著者の前につく and
+ { }
+ if$
+ "\bysame{}" *
+ i.aer #1 + 'i.aer := }
+ { #-1 'len1.aer := }
+ if$
+ }
+ while$
+
+% add the rest of the second string
+ { i.aer len2.aer > not }
+ { #1 i.aer <
+ { " and " * }
+ { }
+ if$
+ s i.aer "{ff }{vv }{ll}{ jj}" format.name$ *
+ i.aer #1 + 'i.aer :=
+ }
+ while$
+}
+
+%%% author
+FUNCTION {format.authors}
+{ author empty$
+ { "" }
+ { bst.use.bysame #2 =
+ { prev.author.aer author compare.names.aer 's :=
+ author 'prev.author.aer := }
+ { author 's := }
+ if$
+ extra.label.bysame "bysame" =
+ { "\bysame " }
+ { bst.author.pre s remove.ss.period.auth * }
+ if$
+ }
+ if$
+}
+
+%%% editor
+FUNCTION {format.editors}
+{ editor empty$
+ { "" }
+ { bst.use.bysame #2 =
+ { prev.author.aer editor compare.names.aer 's :=
+ editor 'prev.author.aer := }
+ { editor 's := }
+ if$
+ extra.label.bysame "bysame" =
+ { "\bysame " }
+ { bst.author.pre s remove.ss.period.auth * }
+ if$
+ s num.names$ #1 >
+ { bst.editors * }
+ { bst.editor * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.authors.alt}
+{ author empty$
+ { "" }
+ { extra.label.bysame "bysame" =
+ {"\bysame "}
+ { bst.author.pre author remove.ss.period.auth * }
+ if$
+ }
+ if$
+}
+
+%%% editor
+FUNCTION {format.editors.alt}
+{ editor empty$
+ { "" }
+ { extra.label.bysame "bysame" =
+ { "\bysame " }
+ { bst.author.pre editor remove.ss.period.auth * }
+ if$
+ editor num.names$ #1 >
+ { bst.editors * }
+ { bst.editor * }
+ if$
+ }
+ if$
+}
+
+%%% format.in.ed.booktitle
+FUNCTION {format.editors.x}
+{ editor empty$
+ { "" }
+ { bst.editor.btitle.order #0 =
+ { "" }
+ { editor num.names$ #1 >
+ { bst.editors " by " * }
+ { bst.editor " by " * }
+ if$
+ }
+ if$
+ editor format.names *
+ bst.editor.btitle.order #0 =
+ { editor num.names$ #1 >
+ { bst.editors * }
+ { bst.editor * }
+ if$
+ }
+ { "" * }
+ if$
+ }
+ if$
+}
+
+%%% Remove commas in the cases like "?." and "?,".
+FUNCTION {remove.irrelevant.period.comma}
+{ 's :=
+ s empty$
+ { "" }
+ { s #-1 #3 substring$ "?,'" =
+ s #-1 #3 substring$ "?.'" = or
+ { s #-3 global.max$ substring$ "'" * }
+ { s #-1 #4 substring$ "?,''" =
+ s #-1 #4 substring$ "?.''" = or
+ { s #-4 global.max$ substring$ "''" * }
+ { s #-1 #2 substring$ "?," =
+ s #-1 #2 substring$ "?." = or
+ { s #-2 global.max$ substring$ "" * }
+ { s #-1 #3 substring$ "?,~" =
+ s #-1 #3 substring$ "?.~" = or
+ { s #-4 global.max$ substring$ "?~" * }
+ 's
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+}
+
+%%% title
+FUNCTION {format.title.sub}
+{ bst.title.lower.case #0 =
+ { bst.title.pre title * bst.title.post * }
+ { bst.title.pre title "t" change.case$ * bst.title.post * }
+ if$
+}
+
+%%% title
+FUNCTION {format.title}
+{ title empty$
+ bst.hide.title #0 = not or
+ { "" }
+ { format.title.sub remove.irrelevant.period.comma }
+ if$
+}
+
+%%% title for misc.
+FUNCTION {format.misc.title}
+{ title empty$
+ { "" }
+ { bst.title.pre title * bst.title.post * }
+ if$
+}
+
+% Convert "-" to "--" (for pages field)
+FUNCTION {n.dashify}
+{ 't :=
+ ""
+ %% while$
+ { t empty$ not }
+ { t #1 #1 substring$ "-" =
+ { t #1 #2 substring$ "--" = not
+ { "--" *
+ t #2 global.max$ substring$ 't :=
+ }
+ { { t #1 #1 substring$ "-" = }
+ { "-" *
+ t #2 global.max$ substring$ 't :=
+ }
+ while$
+ }
+ if$
+ }
+ { t #1 #1 substring$ *
+ t #2 global.max$ substring$ 't :=
+ }
+ if$
+ }
+ while$
+}
+
+%%% year
+FUNCTION {format.year}
+{ year empty$
+ { "there's no year in " cite$ * warning$
+ ", " }
+ { type$ "article" =
+ { bst.year.pre year * extra.label * bst.year.post * }
+ { bst.year.na.pre year * extra.label * bst.year.na.post * }
+ if$
+ }
+ if$
+}
+
+%%% page for book
+FUNCTION {format.book.pages}
+{ pages empty$
+ { "" }
+ { bst.pages.pre pages * bst.pages.post * }
+ if$
+}
+
+%%% Attach tie for the string with two or less characters.
+FUNCTION {tie.or.space.connect}
+{ duplicate$ text.length$ #3 <
+ { "~" }
+ { " " }
+ if$
+ swap$ * *
+}
+
+FUNCTION {either.or.check}
+{ empty$
+ 'pop$
+ { "can't use both " swap$ * " fields in " * cite$ * warning$ }
+ if$
+}
+
+%%% volume for book
+FUNCTION {format.bvolume}
+{ volume empty$
+ { "" }
+ { bst.volume.pre volume * bst.volume.post *
+ series empty$
+ 'skip$
+ %% If there is series field
+ { " of " * series * bst.series.post * }
+ if$
+% "volume and number" number either.or.check
+ }
+ if$
+}
+
+%%% series
+FUNCTION {output.series}
+{ series empty$
+ { "" }
+ { bst.series.pre series * bst.series.post * }
+ if$
+}
+
+%%% number and series
+FUNCTION {format.number.series}
+{ volume empty$
+ { number empty$
+ bst.hide.month #0 = not or
+ % number is empty
+ { series empty$
+ { "" }
+ % series is not empty.
+ { output.series }
+ if$
+ }
+ % number is not empty$
+ { series empty$
+ { bst.number.pre number * bst.number.post * }
+ % series is not empty.
+ { bst.in bst.series.pre * series * bst.series.post *
+ bst.number.pre * number * bst.number.post * }
+ if$
+ }
+ if$
+ }
+ { "" }
+ if$
+}
+
+%%% Number or not.
+FUNCTION {is.num}
+{ chr.to.int$
+ duplicate$ "0" chr.to.int$ < not
+ swap$ "9" chr.to.int$ > not and
+}
+
+FUNCTION {extract.num}
+{ duplicate$ 't :=
+ "" 's :=
+ { t empty$ not }
+ { t #1 #1 substring$
+ t #2 global.max$ substring$ 't :=
+ duplicate$ is.num
+ { s swap$ * 's := }
+ { pop$ "" 't := }
+ if$
+ }
+ while$
+ s empty$
+ 'skip$
+ { pop$ s }
+ if$
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% edition
+
+% Convert edition to 1st, 2nd, 3rd, 4th etc
+FUNCTION {eng.ord}
+{ duplicate$ "1" swap$ *
+ #-2 #1 substring$ "1" =
+ { bst.th * }
+ { duplicate$ #-1 #1 substring$
+ duplicate$ "1" =
+ { pop$ bst.st * }
+ { duplicate$ "2" =
+ { pop$ bst.nd * }
+ { "3" =
+ { bst.rd * }
+ { bst.th * }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+}
+
+% Convert first, second etc in edition field to 1st, 2nd (from jfm.bst)
+FUNCTION {convert.edition}
+{ edition extract.num "l" change.case$ 's :=
+ s "first" = s "1" = or
+ { bst.first }
+ { s "second" = s "2" = or
+ { bst.second }
+ { s "third" = s "3" = or
+ { bst.third }
+ { s "fourth" = s "4" = or
+ { bst.fourth }
+ { s "fifth" = s "5" = or
+ { bst.fifth }
+ { s #1 #1 substring$ is.num
+ { s eng.ord }
+ { edition }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+}
+
+%%% edition
+FUNCTION {format.edition}
+{ edition empty$
+ { "" }
+ { output.state mid.sentence =
+ { bst.edition.pre convert.edition "l" change.case$ * bst.edition.post * }
+ { bst.edition.pre convert.edition "t" change.case$ * bst.edition.post * }
+ if$
+ }
+ if$
+}
+
+%%% month
+FUNCTION {format.month}
+{ month empty$
+ bst.hide.month #0 = not or
+ { "" }
+ { bst.month.pre month * bst.month.post * }
+ if$
+}
+
+%%% year and month
+FUNCTION {format.date}
+{ format.month format.year *
+}
+
+%%% Is multiple pages like 1-100?
+FUNCTION { multi.page.check }
+{ 't :=
+ #0 'multiresult :=
+ { multiresult not
+ t empty$ not
+ and
+ }
+ { t #1 #1 substring$
+ duplicate$ "-" =
+ swap$ duplicate$ "," =
+ swap$ "+" =
+ or or
+ { #1 'multiresult := }
+ { t #2 global.max$ substring$ 't := }
+ if$
+ }
+ while$
+ multiresult
+}
+
+%%% pages
+FUNCTION {format.pages}
+{ pages empty$
+ { "" }
+ { pages multi.page.check
+ { bst.pages.pre pages n.dashify tie.or.space.connect * bst.pages.post }
+ { bst.page.pre pages tie.or.space.connect * bst.page.post }
+ if$
+ }
+ if$
+}
+
+%%% number
+FUNCTION {format.number}
+{ number empty$
+ bst.hide.number #0 = not or
+ { "" }
+ { bst.number.pre number * bst.number.post * }
+ if$
+}
+
+%%% volume
+FUNCTION {format.volume}
+{ volume empty$
+ 'skip$
+ { bst.volume.pre volume * bst.volume.post *
+ bst.year.position #3 =
+ { format.year * }
+ 'skip$
+ if$
+ }
+ if$
+}
+
+%%% number, page
+FUNCTION {format.number.pages}
+{ number empty$
+ { format.pages }
+ { format.number format.pages * }
+ if$
+}
+
+%%% volume, page
+FUNCTION {format.volume.pages}
+{ volume empty$
+ { format.pages }
+ { format.volume format.pages * }
+ if$
+}
+
+%%% volume, number, page
+FUNCTION {format.volume.number.pages}
+{ volume empty$
+ { number empty$
+ { format.pages }
+ { format.number format.pages * }
+ if$
+ }
+ { number empty$
+ { format.volume format.pages * }
+ { format.volume format.number * format.pages * }
+ if$
+ }
+ if$
+}
+
+% volume, number, page
+FUNCTION {format.vol.num.pages}
+{ volume empty$
+ %% volume is empty.
+ { number empty$
+ %% number is empty.
+ { pages empty$
+ % warning
+ { "there is no volume, number, and pages in " cite$ * warning$ "" }
+ { "" format.pages * }
+ if$
+ }
+ %% number is not empty.
+ % warning
+ { "there's a number but no volume in " cite$ * warning$
+ format.number.pages }
+ if$
+ }
+ %% volume is not empty.
+ { number empty$
+ %% number is empty.
+ { format.volume.pages }
+ %% number is not empty.
+ { format.volume.number.pages }
+ if$
+ }
+ if$
+}
+
+%%% chapter
+FUNCTION {format.chapter}
+{ chapter empty$
+ { "" }
+ { type empty$
+ { bst.chapter.pre chapter tie.or.space.connect * bst.chapter.post }
+ { ", " * type " " * chapter * }
+ if$
+ }
+ if$
+}
+
+%%% chapter, pages
+FUNCTION {format.chapter.pages}
+{ chapter empty$
+ { pages empty$
+ { "" }
+ { "" format.pages * }
+ if$
+ }
+ { pages empty$
+ { "" format.chapter * }
+ { "" format.chapter * format.pages * }
+ if$
+ }
+ if$
+}
+
+%%% editor and booktitle
+FUNCTION {format.in.ed.booktitle}
+{ booktitle empty$
+ { "" }
+ { editor empty$
+ { bst.in format.btitle * }
+ { bst.editor.btitle.order #0 =
+ { bst.in format.editors.x * " " * format.btitle * }
+ { bst.in format.btitle * " " * format.editors.x * }
+ if$
+ }
+ if$
+ }
+ if$
+}
+
+%%% howpublished
+FUNCTION {format.howpublished}
+{ howpublished empty$
+ { "" }
+ { bst.howpublished.pre howpublished * bst.howpublished.post * }
+ if$
+}
+
+%%% address
+FUNCTION {format.address}
+{ address empty$
+ { "" }
+ { bst.address.pre address * bst.address.post * }
+ if$
+}
+
+%%% publisher
+FUNCTION {format.publisher}
+{ publisher empty$
+ { "" }
+ { bst.publisher.pre publisher * bst.publisher.post * }
+ if$
+}
+
+%%% organization
+FUNCTION {format.organization}
+{ organization empty$
+ { "" }
+ { bst.organization.pre organization * bst.organization.post * }
+ if$
+}
+
+%% publisher and address
+FUNCTION {output.publisher.address}
+{ address empty$
+ { format.publisher "publisher" output.check.nocomma }
+ { bst.address.position #0 =
+ { format.address output.nocomma
+ format.publisher "publisher" output.check.nocomma }
+ { format.publisher "publisher" output.check.nocomma
+ format.address output.nocomma }
+ if$
+ }
+ if$
+}
+
+%% address, organization, publisher
+FUNCTION {output.address.organization.publisher}
+{ address empty$
+ %% address is empty
+ { organization empty$
+ %% organization is empty
+ { publisher empty$
+ 'skip$
+ { format.publisher "publisher" output.check.nocomma }
+ if$
+ }
+ %% organization is not empty
+ { publisher empty$
+ { format.organization "organization" output.check.nocomma }
+ { format.organization "organization" output.check.nocomma
+ format.publisher "publisher" output.check.nocomma }
+ if$
+ }
+ if$
+ }
+ %% address is not empty
+ { organization empty$
+ %% organization is empty
+ { publisher empty$
+ %% publisher is empty
+ { format.address output.nocomma }
+ %% publisher is not empty
+ { bst.address.position #0 =
+ { format.address output.nocomma
+ format.publisher "publisher" output.check.nocomma }
+ { format.publisher "publisher" output.check.nocomma
+ format.address output.nocomma }
+ if$
+ }
+ if$
+ }
+ %% organization is not empty
+ { publisher empty$
+ %% publisher is empty
+ { format.organization "organization" output.check.nocomma
+ format.address output.nocomma }
+ %% publisher is not empty
+ { format.organization "organization" output.check.nocomma
+ bst.address.position #0 =
+ { format.address output.nocomma
+ format.publisher "publisher" output.check.nocomma }
+ { format.publisher "publisher" output.check.nocomma
+ format.address output.nocomma }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+}
+
+%%% misc
+FUNCTION {empty.misc.check}
+{ author empty$ title empty$ howpublished empty$
+ month empty$ year empty$ note empty$
+ and and and and and
+ key empty$ not and
+ { "all relevant fields are empty in " cite$ * warning$ }
+ 'skip$
+ if$
+}
+
+FUNCTION {format.thesis.type}
+{ type empty$
+ 'skip$
+ { pop$ " " type * }
+ if$
+}
+
+FUNCTION {format.tr.number}
+{ type empty$
+ { "Technical Report" }
+ { " " type * }
+ if$
+ number empty$
+ { "t" change.case$ }
+ { number tie.or.space.connect }
+ if$
+}
+
+%%% phdthesis
+FUNCTION {format.phd}
+{ bst.phdthesis }
+
+%%% mastersthesis
+FUNCTION {format.mthesis}
+{ bst.mthesis }
+
+%%% school
+FUNCTION {format.school}
+{ school empty$
+ { "" }
+ { bst.school.pre school * bst.school.post * }
+ if$
+}
+
+%%% institution
+FUNCTION {format.institution}
+{ institution empty$
+ { "" }
+ { bst.institution.pre institution * bst.institution.post * }
+ if$
+}
+
+%%% remove first ? characters.
+FUNCTION {chop.word}
+{ 's :=
+ 'len :=
+ s #1 len substring$ =
+ { s len #1 + global.max$ substring$ }
+ 's
+ if$
+}
+
+FUNCTION {format.note}
+{ note empty$
+ { "" }
+ { bst.note.pre note * bst.note.post * }
+ if$
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% \havarditem
+
+FUNCTION {output.bibitem}
+{ newline$
+ "\harvarditem[" write$
+ alabel write$ % alabel <- abbreviated citation
+ "]{" write$
+ flabel write$ % flabel <- full citation
+ "}{" write$
+ cyear write$
+ % cyear = year
+ "}{" write$
+ cite$ write$ % cite$ -> pusch keyword
+ "}" write$
+ % If number index is on
+ bst.use.number.index #0 =
+ 'skip$
+ { index #1 + 'index :=
+ "" 'preone :=
+ "" 'preten :=
+ bst.number.index.digit "1" =
+ 'skip$
+ { bst.number.index.digit "2" =
+ { "\hskip0.5em" 'preone := }
+ { bst.number.index.digit "3" =
+ { "\hskip1em" 'preone :=
+ "\hskip0.5em" 'preten := }
+ 'skip$
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+ newline$
+ before.all 'output.state :=
+ ""
+ % number index
+ bst.use.number.index #0 =
+ 'skip$
+ { index #10 <
+ % Insert spaces according to digit of number index.
+ { preone }
+ { index #100 <
+ { preten }
+ { "" }
+ if$
+ }
+ if$
+ bst.number.index.pre * index int.to.str$ * bst.number.index.post * write$
+ }
+ if$
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% article
+
+FUNCTION {article}
+{ output.bibitem
+ format.authors "author" output.check.nocomma
+ bst.year.position #0 =
+ { format.year "year" output.check.nocomma }
+ 'skip$
+ if$
+ format.title "title" output.check.nocomma
+
+ format.journal "journal" output.check.nocomma
+ bst.year.position #2 =
+ { format.date output.nocomma }
+ 'skip$
+ if$
+ format.vol.num.pages output.nocomma
+
+ bst.year.position #1 =
+ { format.date output.nocomma }
+ 'skip$
+ if$
+
+ format.url.doi output.nocomma
+
+ format.note output.nocomma
+ fin.entry
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% book
+
+FUNCTION {book}
+{ output.bibitem
+ author empty$
+ { format.editors "author and editor" output.check.nocomma }
+ { format.authors output.nonnull.nocomma
+ "author and editor" editor either.or.check
+ }
+ if$
+ bst.year.position #0 =
+ { format.year "year" output.check.nocomma }
+ 'skip$
+ if$
+ format.book "title" output.check.nocomma
+
+ format.bvolume output.nocomma
+ format.number.series output.nocomma
+ output.publisher.address
+
+ format.edition output.nocomma
+ format.book.pages output.nocomma
+
+ bst.year.position #0 = not
+ { format.year "year" output.check.nocomma }
+ 'skip$
+ if$
+
+ format.url.doi output.nocomma
+
+ format.note output.nocomma
+ fin.entry
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% booklet
+
+FUNCTION {booklet}
+{ output.bibitem
+ format.authors output.nocomma
+ format.year output.nocomma
+ format.misc.title "title" output.check.nocomma
+ format.howpublished output.nocomma
+ format.address output.nocomma
+
+ format.url.doi output.nocomma
+
+ format.note output.nocomma
+ fin.entry
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% inbook
+
+FUNCTION {inbook}
+{ output.bibitem
+ author empty$
+ { format.editors "author and editor" output.check.nocomma }
+ { format.authors output.nonnull.nocomma
+ "author and editor" editor either.or.check
+ }
+ if$
+ bst.year.position #0 =
+ { format.year "year" output.check.nocomma }
+ 'skip$
+ if$
+% format.book remove.pre.comma "title" output.check.nocomma
+ format.book "title" output.check.nocomma
+ format.edition output.nocomma
+
+ format.bvolume output.nocomma
+ format.chapter.pages "chapter and pages" output.check.nocomma
+ format.number.series output.nocomma
+ output.publisher.address
+
+ bst.year.position #0 = not
+ { format.year "year" output.check.nocomma }
+ 'skip$
+ if$
+
+ format.url.doi output.nocomma
+
+ format.note output.nocomma
+ fin.entry
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% incollection
+
+FUNCTION {incollection}
+{ output.bibitem
+ format.authors "author" output.check.nocomma
+ bst.year.position #0 =
+ { format.year "year" output.check.nocomma }
+ 'skip$
+ if$
+ format.title "title" output.check.nocomma
+
+ format.in.ed.booktitle "booktitle" output.check.nocomma
+ format.bvolume output.nocomma
+ output.address.organization.publisher
+ format.edition output.nocomma
+ format.chapter.pages output.nocomma
+
+ bst.year.position #0 = not
+ { format.year "year" output.check.nocomma }
+ 'skip$
+ if$
+
+ format.url.doi output.nocomma
+
+ format.note output.nocomma
+ fin.entry
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% inproceedings
+
+FUNCTION {inproceedings}
+{ output.bibitem
+ format.authors "author" output.check.nocomma
+ bst.year.position #0 =
+ { format.year "year" output.check.nocomma }
+ 'skip$
+ if$
+ format.title "title" output.check.nocomma
+
+ format.in.ed.booktitle "booktitle" output.check.nocomma
+ format.bvolume output.nocomma
+ format.number.series output.nocomma
+ format.pages output.nocomma
+ output.address.organization.publisher
+
+ bst.year.position #0 = not
+ { format.date output.nocomma }
+ { format.month output.nocomma }
+ if$
+
+ format.url.doi output.nocomma
+
+ format.note output.nocomma
+ fin.entry
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% conference
+
+FUNCTION {conference}
+{ inproceedings }
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% manual
+FUNCTION {manual}
+{ output.bibitem
+ author empty$
+ { organization empty$
+ 'skip$
+ { organization output.nonnull.nocomma
+ address output.nocomma
+ }
+ if$
+ }
+ { format.authors output.nonnull.nocomma }
+ if$
+ bst.year.position #0 =
+ { format.year "year" output.check.nocomma }
+ 'skip$
+ if$
+ format.book "title" output.check.nocomma
+ author empty$
+ { organization empty$
+ { format.address new.block.check
+ format.address output.nocomma
+ }
+ 'skip$
+ if$
+ }
+ { output.address.organization.publisher }
+ if$
+ format.edition output.nocomma
+
+ bst.year.position #0 = not
+ { format.year "year" output.check.nocomma }
+ 'skip$
+ if$
+
+ format.url.doi output.nocomma
+
+ format.note output.nocomma
+ fin.entry
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% mastersthesis
+
+FUNCTION {mastersthesis}
+{ output.bibitem
+ format.authors "author" output.check.nocomma
+ bst.year.position #0 =
+ { format.year "year" output.check.nocomma }
+ 'skip$
+ if$
+ format.title "title" output.check.nocomma
+ format.mthesis format.thesis.type output.nonnull.nocomma
+ format.school "school" output.check.nocomma
+ format.address output.nocomma
+
+ bst.year.position #0 = not
+ { format.year "year" output.check.nocomma }
+ 'skip$
+ if$
+
+ format.url.doi output.nocomma
+
+ format.note output.nocomma
+ fin.entry
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% misc
+
+FUNCTION {misc}
+{ output.bibitem
+ format.authors "author" output.check.nocomma
+ bst.year.position #0 =
+ { format.year "year" output.check.nocomma }
+ 'skip$
+ if$
+ format.misc.title output.nocomma
+ format.howpublished output.nocomma
+
+ bst.year.position #0 = not
+ { format.date output.nocomma }
+ { format.month output.nocomma }
+ if$
+
+ format.url.doi output.nocomma
+
+ format.note output.nocomma
+ fin.entry
+ empty.misc.check
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% Online
+
+FUNCTION {online}
+{ output.bibitem
+ format.authors "author" output.check.nocomma
+ bst.year.position #0 =
+ { format.year "year" output.check.nocomma }
+ 'skip$
+ if$
+ format.misc.title output.nocomma
+ format.howpublished output.nocomma
+
+ bst.year.position #0 = not
+ { format.date output.nocomma }
+ { format.month output.nocomma }
+ if$
+
+ format.url.doi output.nocomma
+
+ format.note output.nocomma
+ fin.entry
+ empty.misc.check
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% phdthesis
+
+FUNCTION {phdthesis}
+{ output.bibitem
+ format.authors "author" output.check.nocomma
+ bst.year.position #0 =
+ { format.year "year" output.check.nocomma }
+ 'skip$
+ if$
+ format.book "title" output.check.nocomma
+ format.phd
+ format.thesis.type output.nonnull.nocomma
+ format.school "school" output.check.nocomma
+ address empty$
+ 'skip$
+ { format.address output.nocomma }
+ if$
+
+ bst.year.position #0 = not
+ { format.year "year" output.check.nocomma }
+ 'skip$
+ if$
+
+ format.url.doi output.nocomma
+
+ format.note output.nocomma
+ fin.entry
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% proceedings
+
+FUNCTION {proceedings}
+{ output.bibitem
+ editor empty$
+ { organization output.nocomma }
+ { format.editors output.nonnull.nocomma }
+ if$
+ bst.year.position #0 =
+ { format.year "year" output.check.nocomma }
+ 'skip$
+ if$
+ format.btitle remove.pre.comma "title" output.check.nocomma
+ format.bvolume output.nocomma
+ format.number.series output.nocomma
+ output.address.organization.publisher
+
+ bst.year.position #0 = not
+ { format.year "year" output.check.nocomma }
+ 'skip$
+ if$
+
+ format.url.doi output.nocomma
+
+ format.note output.nocomma
+ fin.entry
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% techreport
+
+FUNCTION {techreport}
+{ output.bibitem
+ format.authors "author" output.check.nocomma
+ bst.year.position #0 =
+ { format.year "year" output.check.nocomma }
+ 'skip$
+ if$
+ format.title "title" output.check.nocomma
+ format.tr.number output.nonnull.nocomma
+ format.institution "institution" output.check.nocomma
+ format.address output.nocomma
+
+ bst.year.position #0 = not
+ { format.year "year" output.check.nocomma }
+ 'skip$
+ if$
+
+ format.note output.nocomma
+ fin.entry
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% unpublished
+
+FUNCTION {unpublished}
+{ output.bibitem
+ format.authors "author" output.check.nocomma
+ bst.year.position #0 =
+ { format.year "year" output.check.nocomma }
+ 'skip$
+ if$
+ format.title "title" output.check.nocomma
+
+ bst.year.position #0 = not
+ { format.date remove.pre.comma output.nocomma }
+ { month empty$
+ 'skip$
+ { format.month remove.pre.comma output.nocomma }
+ if$
+ }
+ if$
+
+ format.url.doi output.nocomma
+
+ format.note "note" output.check.nocomma
+ fin.entry
+}
+
+FUNCTION {default.type}
+{ misc }
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% Alias for month names:
+
+MACRO {jan} {"January"}
+MACRO {feb} {"February"}
+MACRO {mar} {"March"}
+MACRO {apr} {"April"}
+MACRO {may} {"May"}
+MACRO {jun} {"June"}
+MACRO {jul} {"July"}
+MACRO {aug} {"August"}
+MACRO {sep} {"September"}
+MACRO {oct} {"October"}
+MACRO {nov} {"November"}
+MACRO {dec} {"December"}
+
+%%% Read entries:
+READ
+
+%%% Variable for remembering the order of citation.
+INTEGERS { order.num }
+FUNCTION {initialize.order.num}
+{
+ #1 'order.num :=
+}
+%%% Initialize a variables
+EXECUTE {initialize.order.num}
+
+%%% Variable for remembering the order of citation.
+FUNCTION {set.order.cited}
+{
+ order.num 'order.cited :=
+ #1 order.num + 'order.num :=
+}
+%%% Iterate for all entries:
+ITERATE {set.order.cited}
+
+%%% check the value of nameorder field.
+FUNCTION {set.nameorder}
+{ nameorder empty$
+ { "" 'nameorder.temp := }
+ { nameorder 'nameorder.temp := }
+ if$
+}
+%%% Iterate for all entries:
+ITERATE {set.nameorder}
+
+%%% Remove symbols and convert to lowercase.
+FUNCTION {sortify}
+{ purify$ "l" change.case$ }
+
+%%% names for sorting
+FUNCTION {sort.format.names}
+{ 's :=
+ #1 'nameptr :=
+ ""
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ { nameptr #1 >
+ { ", " * }
+ 'skip$
+ if$
+ s nameptr "{ll}{ f}{ j}" format.name$ 't :=
+ nameptr numnames = t "others" = and
+ { bst.and.others.output *}
+ { t sortify * }
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+}
+
+FUNCTION {sort.format.names.abb}
+{ 's :=
+ s num.names$ 'numnames :=
+ numnames bst.and.others.num <
+ { s sort.format.names }
+ { s #1 "{ll}{ f}{ j}" format.name$ " zz " * }
+ if$
+}
+
+%%% Label for full author name.
+FUNCTION {format.lab.names.full}
+{ 's :=
+ #1 'nameptr :=
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ { s nameptr "{vv~}{ll}" format.name$ 't :=
+ nameptr #1 >
+ { namesleft #1 >
+ { nameorder.temp "random" = bst.use.nameorder #0 = not and
+ { bst.and.nameorder * t * }
+ { ", " * t * }
+ if$
+ }
+ { t "others" =
+ { bst.and.others.output * }
+ { numnames #2 >
+ { nameorder.temp "random" = bst.use.nameorder #0 = not and
+ { bst.cite.and.nameorder * t * }
+ { bst.cite.ands * t * }
+ if$
+ }
+ { nameorder.temp "random" = bst.use.nameorder #0 = not and
+ { bst.cite.and.nameorder * t * }
+ { bst.cite.and * t * }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ 't
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+ numnames #1 > #1 #2 = and {", eds" *} {} if$
+ numnames #1 = #1 #2 = and {", ed" *} {} if$
+}
+
+%%% laberl for abbreviated author name.
+FUNCTION {format.lab.names.abb}
+{ 's :=
+ s num.names$ 'numnames :=
+ numnames bst.and.others.num <
+ % if the number of authors is less than bst.and.others.num, full name.
+ { s format.lab.names.full }
+ % if the number of authors is equal or more than bst.and.others.num, abbreviated name.
+ { s #1 "{ll}" format.name$ bst.and.others.output * }
+ if$
+}
+
+%%% abbreviated author
+FUNCTION {author.key.label.abb}
+{ author empty$
+ { key empty$
+ { cite$ #1 #3 substring$ }
+ { key #3 text.prefix$ }
+ if$
+ }
+ { author format.lab.names.abb }
+ if$
+}
+
+%%% full author
+FUNCTION {author.key.label.full}
+{ author empty$
+ { key empty$
+ { cite$ #1 #3 substring$ }
+ { key #3 text.prefix$ }
+ if$
+ }
+ { author format.lab.names.full }
+ if$
+}
+
+FUNCTION {format.names.full.wo.and}
+{ 's :=
+ #1 'nameptr :=
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ { s nameptr "{ll}{, ff}{, jj}" format.name$ 't :=
+ nameptr #1 >
+ { namesleft #1 >
+ { " " * t * }
+ { t "others" =
+ { " " * }
+ { numnames #2 >
+ { " " * t * }
+ { " " * t * }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ 't
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+}
+
+FUNCTION {author.key.full.wo.and}
+{ author empty$
+ { key empty$
+ { cite$ #1 #3 substring$ }
+ { key #3 text.prefix$ }
+ if$
+ }
+ { author format.names.full.wo.and }
+ if$
+}
+
+FUNCTION {author.editor.key.full.wo.and}
+{ author empty$
+ { editor empty$
+ { key empty$
+ { cite$ #1 #3 substring$ }
+ { key #3 text.prefix$ }
+ if$
+ }
+ { editor format.names.full.wo.and }
+ if$
+ }
+ { author format.names.full.wo.and }
+ if$
+}
+
+FUNCTION {editor.key.organization.key.full.wo.and}
+{ editor empty$
+ { key empty$
+ { organization empty$
+ { cite$ #1 #3 substring$ }
+ { "The " #4 organization chop.word #3 text.prefix$ }
+ if$
+ }
+ { key #3 text.prefix$ }
+ if$
+ }
+ { editor format.names.full.wo.and }
+ if$
+}
+
+FUNCTION {author.key.organization.key.full.wo.and}
+{ author empty$
+ { key empty$
+ { organization empty$
+ { cite$ #1 #3 substring$ }
+ { "The " #4 organization chop.word #3 text.prefix$ }
+ if$
+ }
+ { key #3 text.prefix$ }
+ if$
+ }
+ { author format.names.full.wo.and }
+ if$
+}
+
+%%% abbreviated author
+FUNCTION {author.editor.key.label.abb}
+{ author empty$
+ { editor empty$
+ { key empty$
+ { cite$ #1 #3 substring$ }
+ { key #3 text.prefix$ }
+ if$
+ }
+ { editor format.lab.names.abb }
+ if$
+ }
+ { author format.lab.names.abb }
+ if$
+}
+
+%%% full author
+FUNCTION {author.editor.key.label.full}
+{ author empty$
+ { editor empty$
+ { key empty$
+ { cite$ #1 #3 substring$ }
+ { key #3 text.prefix$ }
+ if$
+ }
+ { editor format.lab.names.full }
+ if$
+ }
+ { author format.lab.names.full }
+ if$
+}
+
+FUNCTION {author.key.organization.label.full}
+{ author empty$
+ { key empty$
+ { organization empty$
+ { cite$ #1 #3 substring$ }
+ { "The " #4 organization chop.word #3 text.prefix$ }
+ if$
+ }
+ { key #3 text.prefix$ }
+ if$
+ }
+ { author format.lab.names.full }
+ if$
+}
+
+FUNCTION {author.key.organization.label.abb}
+{ author empty$
+ { key empty$
+ { organization empty$
+ { cite$ #1 #3 substring$ }
+ { "The " #4 organization chop.word #3 text.prefix$ }
+ if$
+ }
+ { key #3 text.prefix$ }
+ if$
+ }
+ { author format.lab.names.abb }
+ if$
+}
+
+FUNCTION {editor.key.organization.label.full}
+{ editor empty$
+ { key empty$
+ { organization empty$
+ { cite$ #1 #3 substring$ }
+ { "The " #4 organization chop.word #3 text.prefix$ }
+ if$
+ }
+ { key #3 text.prefix$ }
+ if$
+ }
+ { editor format.lab.names.full }
+ if$
+}
+
+FUNCTION {editor.key.organization.label.abb}
+{ editor empty$
+ { key empty$
+ { organization empty$
+ { cite$ #1 #3 substring$ }
+ { "The " #4 organization chop.word #3 text.prefix$ }
+ if$
+ }
+ { key #3 text.prefix$ }
+ if$
+ }
+ { editor format.lab.names.abb }
+ if$
+}
+
+%%% Convert numbers: 0->9, 1->8, 2->7,..., 9->0
+FUNCTION {reverse.num}
+{ 's :=
+ s "1" =
+ { "8" 'year.num := }
+ { s "2" =
+ { "7" 'year.num := }
+ { s "3" =
+ { "6" 'year.num := }
+ { s "4" =
+ { "5" 'year.num := }
+ { s "5" =
+ { "4" 'year.num := }
+ { s "6" =
+ { "3" 'year.num := }
+ { s "7" =
+ { "2" 'year.num := }
+ { s "8" =
+ { "1" 'year.num := }
+ { s "9" =
+ { "0" 'year.num := }
+ { s "0" =
+ { "9" 'year.num := }
+ { "9" 'year.num := }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+ year.num
+}
+
+%%% Convert year (large number -> small number)
+FUNCTION {convert.year}
+{ 't :=
+ bst.reverse.year #0 =
+ { t 'tt := }
+ { t #1 #1 substring$ reverse.num
+ t #2 #1 substring$ reverse.num *
+ t #3 #1 substring$ reverse.num *
+ t #4 #1 substring$ reverse.num * 'tt := }
+ if$
+ tt
+}
+
+%%% cyear
+FUNCTION {calc.cyear}
+{ type$ "book" =
+ type$ "inbook" =
+ or
+ 'author.editor.key.full.wo.and
+ { type$ "proceedings" =
+ 'editor.key.organization.key.full.wo.and
+ { type$ "manual" =
+ 'author.key.organization.key.full.wo.and
+ 'author.key.full.wo.and
+ if$
+ }
+ if$
+ }
+ if$
+ duplicate$
+ year empty$
+ { "2199" 'cyear := }
+ { year 'cyear := }
+ if$
+ year empty$
+ { " " "2199" convert.year * field.or.null * }
+ { " " year convert.year * field.or.null * }
+ if$
+ sortify 'sort.label :=
+ % For debug
+ econ.debug #0 = not
+ { "sort.label = ``\texttt{" write$
+ sort.label write$
+ "}''\\" write$
+ newline$
+ }
+ 'skip$
+ if$
+ pop$
+}
+
+FUNCTION {calc.sort.label.abb}
+{ author empty$
+ { editor empty$
+ { "" }
+ { editor 's := }
+ if$
+ }
+ { author 's := }
+ if$
+ s sort.format.names.abb 't :=
+ year empty$
+ { t sortify " " * "2199" convert.year * 'sort.label.abb := }
+ { t sortify " " * year convert.year * 'sort.label.abb := }
+ if$
+ econ.debug #0 = not
+ { "sort.label.abb = ``\texttt{" write$
+ sort.label.abb write$
+ "}''\\" write$
+ newline$
+ }
+ 'skip$
+ if$
+}
+
+%%% flabel
+FUNCTION {calc.flabel}
+{ type$ "book" =
+ type$ "inbook" =
+ or
+ 'author.editor.key.label.full
+ { type$ "proceedings" =
+ 'editor.key.organization.label.full
+ { type$ "manual" =
+ 'author.key.organization.label.full
+ 'author.key.label.full
+ if$
+ }
+ if$
+ }
+ if$
+ 'flabel :=
+ % For debug
+ econ.debug #0 = not
+ { "flabel = ``\texttt{" write$
+ flabel write$
+ "}''\\" write$
+ newline$
+ }
+ 'skip$
+ if$
+}
+
+%%% alabel
+FUNCTION {calc.alabel}
+{ type$ "book" =
+ type$ "inbook" =
+ or
+ 'author.editor.key.label.abb
+ { type$ "proceedings" =
+ 'editor.key.organization.label.abb
+ { type$ "manual" =
+ 'author.key.organization.label.abb
+ 'author.key.label.abb
+ if$
+ }
+ if$
+ }
+ if$
+ 'alabel :=
+ % For debug
+ econ.debug #0 = not
+ { "alabel = ``\texttt{" write$
+ alabel write$
+ "}''\\" write$
+ newline$
+ }
+ 'skip$
+ if$
+}
+
+%%% title for sorting
+FUNCTION {sort.format.title}
+{ 't :=
+ "A " #2
+ "An " #3
+ "The " #4 t chop.word
+ chop.word
+ chop.word
+ sortify
+ #1 global.max$ substring$
+}
+
+%%% author for sorting
+FUNCTION {author.sort}
+{ author empty$
+ { key empty$
+ { "to sort, need author or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { author sort.format.names }
+ if$
+}
+
+%%% editor for sorting
+FUNCTION {author.editor.sort}
+{ author empty$
+ { editor empty$
+ { key empty$
+ { "to sort, need author, editor, or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { editor sort.format.names }
+ if$
+ }
+ { author sort.format.names }
+ if$
+}
+
+FUNCTION {author.organization.sort}
+{ author empty$
+ { organization empty$
+ { key empty$
+ { "to sort, need author, organization, or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { "The " #4 organization chop.word sortify }
+ if$
+ }
+ { author sort.format.names }
+ if$
+}
+
+FUNCTION {editor.organization.sort}
+{ editor empty$
+ { organization empty$
+ { key empty$
+ { "to sort, need editor, organization, or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { "The " #4 organization chop.word sortify }
+ if$
+ }
+ { editor sort.format.names }
+ if$
+}
+
+%%% 1,...,9 -> 001,...,009
+%%% 10,...,99 -> 010,...,099
+FUNCTION {add.zero.to.number}
+{ 's :=
+ s text.length$ #1 =
+ { "00" s * }
+ { s text.length$ #2 =
+ { "0" s * }
+ { s }
+ if$
+ }
+ if$
+}
+
+%% entry type
+FUNCTION {bst.sort.entry.type.order}
+{ 'item.type :=
+ item.type "article" =
+ { "01" }
+ { item.type "book" =
+ { "02" }
+ { item.type "booklet" =
+ { "03" }
+ { item.type "comment" =
+ { "04" }
+ { item.type "conference" =
+ { "05" }
+ { item.type "inbook" =
+ { "06" }
+ { item.type "incollection" =
+ { "07" }
+ { item.type "inproceedings" =
+ { "08" }
+ { item.type "manual" =
+ { "09" }
+ { item.type "masterthesis" =
+ { "10" }
+ { item.type "misc" =
+ { "11" }
+ { item.type "phdthesis" =
+ { "12" }
+ { item.type "proceedings" =
+ { "13" }
+ { item.type "techreport" =
+ { "14" }
+ { item.type "unpublished" =
+ { "15" }
+ { "16" }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+}
+
+%%% Create sort.key$: absorder -> author -> year -> order -> month -> title.
+FUNCTION {presort.one}
+{
+ bst.no.sort #0 = not
+ { order.cited int.to.str$ add.zero.to.number " " * }
+ { "" }
+ if$
+ bst.sort.year #0 = not
+ %% Use year field as the primary sorting key.
+ { year convert.year * }
+ 'skip$
+ if$
+ bst.sort.entry.type #0 = not
+ { type$ bst.sort.entry.type.order * " " * }
+ 'skip$
+ if$
+ absorder empty$
+ { "/// " * }
+ { bst.notuse.absorder.field #0 =
+ { absorder "999" =
+ { "zzz " * }
+ { absorder add.zero.to.number "000" =
+ { "/// " * }
+ { absorder add.zero.to.number * " " * }
+ if$
+ }
+ if$
+ }
+ { "/// " * }
+ if$
+ }
+ if$
+ " " *
+ sort.label.abb *
+ " " *
+ type$ "book" = type$ "inbook" = or
+ 'author.editor.sort
+ { type$ "proceedings" =
+ 'editor.organization.sort
+ { type$ "manual" =
+ 'author.organization.sort
+ 'author.sort
+ if$
+ }
+ if$
+ }
+ if$
+ * " " *
+ " "
+ order empty$
+ { "/// " * }
+ { bst.notuse.order.field #0 =
+ { order "999" =
+ { "zzz " * }
+ { order add.zero.to.number "000" =
+ { "/// " * }
+ { order add.zero.to.number * " " * }
+ if$
+ }
+ if$
+ }
+ { "/// " * }
+ if$
+ }
+ if$
+ month empty$
+ { * "/// " * }
+ { month "999" =
+ { * month add.zero.to.number * "zzz " * }
+ { month add.zero.to.number "000" =
+ { * month add.zero.to.number * "/// " * }
+ { * month add.zero.to.number * " " * }
+ if$
+ }
+ if$
+ }
+ if$
+ title field.or.null sort.format.title
+ *
+ #1 entry.max$ substring$
+ 'sort.key$ :=
+ % For debug
+ econ.debug #0 = not
+ { "``\texttt{" write$
+ sort.key$ write$
+ "}''\\" write$
+ newline$
+ }
+ 'skip$
+ if$
+}
+
+FUNCTION {presort.two}
+{
+ bst.no.sort #0 = not
+ { order.cited int.to.str$ add.zero.to.number " " * }
+ { "" }
+ if$
+ bst.sort.year #0 = not
+ %% Use year field as the primary sorting key.
+ { year convert.year * }
+ 'skip$
+ if$
+ bst.sort.entry.type #0 = not
+ { type$ bst.sort.entry.type.order * " " * }
+ 'skip$
+ if$
+ absorder empty$
+ { "/// " * }
+ { bst.notuse.absorder.field #0 =
+ { absorder "999" =
+ { "zzz " * }
+ { absorder add.zero.to.number "000" =
+ { "/// " * }
+ { absorder add.zero.to.number * " " * }
+ if$
+ }
+ if$
+ }
+ { "/// " * }
+ if$
+ }
+ if$
+ " " * sort.label * " "
+ order empty$
+ { "/// " * }
+ { bst.notuse.order.field #0 =
+ { order "999" =
+ { "zzz " * }
+ { order add.zero.to.number "000" =
+ { "/// " * }
+ { order add.zero.to.number * " " * }
+ if$
+ }
+ if$
+ }
+ { "/// " * }
+ if$
+ }
+ if$
+ month empty$
+ { * "/// " * }
+ { month "999" =
+ { * month add.zero.to.number * "zzz " * }
+ { month add.zero.to.number "000" =
+ { * month add.zero.to.number * "/// " * }
+ { * month add.zero.to.number * " " * }
+ if$
+ }
+ if$
+ }
+ if$
+ title field.or.null sort.format.title
+ *
+ #1 entry.max$ substring$
+ 'sort.key$ :=
+ % For debug
+ econ.debug #0 = not
+ { "``\texttt{" write$
+ sort.key$ write$
+ "}''\\" write$
+ newline$
+ }
+ 'skip$
+ if$
+}
+
+%%% Codes for debugging
+FUNCTION {calc.alabel.mess}
+{ econ.debug #0 = not
+ { "\textbf{Iteration of calc.alabel: alabel = }\\" write$
+ newline$ }
+ 'skip$
+ if$
+}
+FUNCTION {calc.flabel.mess}
+{ econ.debug #0 = not
+ { "\textbf{Iteration of calc.flabel: flabel = }\\" write$
+ newline$ }
+ 'skip$
+ if$
+}
+FUNCTION {presort.one.mess}
+{ econ.debug #0 = not
+ { "\textbf{Iteration of presort (1st time): \$sort.key = }\\" write$
+ newline$ }
+ 'skip$
+ if$
+}
+
+FUNCTION {presort.two.mess}
+{ econ.debug #0 = not
+ { "\textbf{Iteration of presort (2nd time): \$sort.key = }\\" write$
+ newline$ }
+ 'skip$
+ if$
+}
+
+FUNCTION {calc.cyear.mess}
+{ econ.debug #0 = not
+ { "\textbf{Iteration of calc.cyear: sort.label = }\\" write$
+ newline$ }
+ 'skip$
+ if$
+}
+
+FUNCTION {calc.sort.label.abb.mess}
+{ econ.debug #0 = not
+ { "\textbf{Iteration of calc.sort.label.abb: sort.label.abb = }\\" write$
+ newline$ }
+ 'skip$
+ if$
+}
+
+%%% alabel
+EXECUTE {calc.alabel.mess}
+ITERATE {calc.alabel}
+
+%%% flabel
+EXECUTE {calc.flabel.mess}
+ITERATE {calc.flabel}
+
+%%% cyear and sort.label
+EXECUTE {calc.cyear.mess}
+ITERATE {calc.cyear}
+
+%%%
+EXECUTE {calc.sort.label.abb.mess}
+ITERATE {calc.sort.label.abb}
+
+%%% Sorting by $sort.key (first time)
+%
+% Sorting is done in two times. This is the first time.
+%
+EXECUTE {presort.one.mess}
+ITERATE {presort.one}
+SORT
+
+FUNCTION {forward.pass}
+{ bst.use.bysame #0 = bst.use.bysame #2 = or
+ % Not use \bysame
+ { last.sort.label sort.label.abb =
+ { last.extra.num #1 + 'last.extra.num :=
+ last.extra.num int.to.chr$ 'extra.label :=
+ }
+ { "a" chr.to.int$ 'last.extra.num :=
+ "" 'extra.label :=
+ sort.label.abb 'last.sort.label :=
+ }
+ if$
+ }
+ % Use \bysame
+ { last.sort.label sort.label.abb =
+ { last.extra.num #1 + 'last.extra.num :=
+ last.extra.num int.to.chr$ 'extra.label :=
+ }
+ { "a" chr.to.int$ 'last.extra.num :=
+ "" 'extra.label :=
+ sort.label.abb 'last.sort.label :=
+ }
+ if$
+ author empty$
+ { editor empty$
+ { "" }
+ 'format.editors.alt
+ if$
+ }
+ 'format.authors.alt
+ if$
+ 'this.author :=
+ % format.names 'this.author :=
+ this.author prev.author =
+ { "bysame" 'extra.label.bysame := }
+ { this.author "" =
+ { "abcxyz" }
+ 'this.author
+ if$
+ 'prev.author :=
+ }
+ if$
+ }
+ if$
+}
+
+FUNCTION {reverse.pass}
+{ next.extra "b" =
+ { "a" 'extra.label := }
+ 'skip$
+ if$
+ extra.label empty$ not
+ { cyear extra.label * }
+ { cyear "" * }
+ if$
+ "" field.or.null *
+ 'cyear :=
+ extra.label 'next.extra :=
+}
+
+%%% \bysame
+ITERATE {forward.pass}
+
+REVERSE {reverse.pass}
+
+%%% Sorting by sort.key$ (second time)
+EXECUTE {presort.two.mess}
+ITERATE {presort.two}
+SORT
+
+FUNCTION {reset.prev.author}
+{ "xxyyzz" 'prev.author := }
+
+EXECUTE {reset.prev.author}
+
+FUNCTION {forward.pass.two}
+{ bst.use.bysame #1 =
+ { author empty$
+ { editor empty$
+ { "" }
+ 'format.editors.alt
+ if$
+ }
+ 'format.authors.alt
+ if$
+ 'this.author :=
+ this.author prev.author =
+ { "bysame" 'extra.label.bysame := }
+ { this.author "" =
+ { "abcxyz" }
+ 'this.author
+ if$
+ 'prev.author :=
+ }
+ if$
+ }
+ 'skip$
+ if$
+}
+
+ITERATE {forward.pass.two}
+
+FUNCTION{punctuation}
+{
+ "%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%" write$ newline$
+ "% This bbl file is created by econ.bst ver." econ.version * write$ newline$
+ "% The latest econ.bst is available at" write$ newline$
+ "% <https://github.com/ShiroTakeda/econ-bst>" write$ newline$ newline$
+}
+
+EXECUTE {punctuation}
+
+FUNCTION {begin.bib}
+{
+ preamble$ empty$
+ 'skip$
+ { preamble$ write$ newline$ }
+ if$
+ bst.use.bysame #0 =
+ % Not use \bysame.
+ 'skip$
+ % Use \bysame.
+ { "%%% Definition of \bysame" write$ newline$
+ "\ifx\undefined\bysame" write$ newline$
+ "\newcommand{\bysame}{" bst.bysame.definition * "}" *
+ write$ newline$
+ "\fi" write$ newline$ newline$ }
+ if$
+ %% When number index is attached to the beginning of each item.
+ bst.use.number.index #0 =
+ 'skip$
+ { bst.number.index.digit "1" =
+ % one digit.
+ { bst.number.index.bibhang.one }
+ { bst.number.index.digit "2" =
+ % two digits.
+ { bst.number.index.bibhang.ten }
+ % three or more digits.
+ { bst.number.index.bibhang.hund }
+ if$
+ }
+ if$
+ 'hang :=
+ "%%% Redefinition of \bibhang" write$ newline$
+ "\ifx\undefined\bibhang" write$ newline$
+ "\relax" write$ newline$
+ "\else" write$ newline$
+ "\setlength{\bibhang}{"
+ hang * "}" * write$ newline$
+ "\fi" write$ newline$ newline$
+ }
+ if$
+ "\begin{thebibliography}{xxx}" write$ newline$
+
+ %% Initialize the variable `index'.
+ #0 'index :=
+}
+
+FUNCTION {end.bib}
+{ newline$ "\end{thebibliography}" write$ newline$ }
+
+EXECUTE {begin.bib}
+
+EXECUTE {init.state.consts}
+
+ITERATE {call.type$}
+
+EXECUTE {end.bib}
+
+% --------------------
+% Local Variables:
+% fill-column: 78
+% mode: bst
+% End:
diff --git a/biblio/bibtex/contrib/econ-bst/customization/econ-a.pdf b/biblio/bibtex/contrib/econ-bst/customization/econ-a.pdf
new file mode 100644
index 0000000000..087a705082
--- /dev/null
+++ b/biblio/bibtex/contrib/econ-bst/customization/econ-a.pdf
Binary files differ
diff --git a/biblio/bibtex/contrib/econ-bst/customization/econ-a.tex b/biblio/bibtex/contrib/econ-bst/customization/econ-a.tex
new file mode 100644
index 0000000000..71051674e5
--- /dev/null
+++ b/biblio/bibtex/contrib/econ-bst/customization/econ-a.tex
@@ -0,0 +1,55 @@
+%#!pdflatex
+%#BIBTEX bibtex econ-a
+
+%############################## Main #################################
+\documentclass[10pt]{article}
+
+%% Use natbib.sty
+\usepackage{natbib}
+\usepackage{mathpazo}
+\usepackage{url}
+\usepackage{graphicx}
+\usepackage{color}
+\definecolor{MyBrown}{rgb}{0.3,0,0}
+\definecolor{MyBlue}{rgb}{0,0,0.3}
+\definecolor{MyRed}{rgb}{0.4,0,0.1}
+\definecolor{MyGreen}{rgb}{0,0.4,0}
+\usepackage[bookmarks=true,%
+bookmarksnumbered=true,%
+colorlinks=true,%
+linkcolor=MyBlue,%
+citecolor=MyRed,%
+filecolor=MyBlue,%
+urlcolor=MyGreen%
+]{hyperref}
+
+\setlength{\topmargin}{-20pt}
+\setlength{\textheight}{648pt}
+\setlength{\oddsidemargin}{15pt}
+\setlength{\textwidth}{440pt}
+
+%#####################################################################
+%######################### Document Starts ###########################
+%#####################################################################
+\begin{document}
+
+This document uses ``\verb|econ-a.bst|''.
+
+\vspace{1em}
+
+\input{cited-part}
+\nocite{*}
+
+%% bst file:
+\bibliographystyle{econ-a}
+\bibliography{../econ-example}
+
+\end{document}
+
+%#####################################################################
+%######################### Document Ends #############################
+%#####################################################################
+% --------------------
+% Local Variables:
+% fill-column: 80
+% End:
diff --git a/biblio/bibtex/contrib/econ-bst/customization/econ-aer.bst b/biblio/bibtex/contrib/econ-bst/customization/econ-aer.bst
new file mode 100644
index 0000000000..d570b82a67
--- /dev/null
+++ b/biblio/bibtex/contrib/econ-bst/customization/econ-aer.bst
@@ -0,0 +1,3538 @@
+%% econ.bst: BibTeX style file for papers in economics.
+%
+% Author: Shiro Takeda
+% Maintainer: Shiro Takeda
+% Copyright (C) 2001-2018 Shiro Takeda
+% First-written: <2007/07/28>
+% Time-stamp: <2018-12-07 18:49:31 st>
+% Version: 2.5
+% Keywords: TeX, BibTeX, bst
+% URL: https://github.com/ShiroTakeda/econ-bst
+
+% This work may be distributed and/or modified under the
+% conditions of the LaTeX Project Public License, either version 1.3
+% of this license or (at your option) any later version.
+% The latest version of this license is in
+% http://www.latex-project.org/lppl.txt
+% and version 1.3 or later is part of all distributions of LaTeX
+% version 2005/12/01 or later.
+%
+% This work has the LPPL maintenance status "maintained".
+%
+% The Current Maintainer of this work is Shiro Takeda.
+
+%% Main features of econ.bst.
+
+% "econ.bst" is a BibTeX style file for economics. It provids the following
+% features:
+
+% 1) The author-year type citation (you need "natbib.sty" as well).
+% 2) Reference style used in economics papers ("econ.bst" is not a BibTeX style
+% for a specific journal).
+% 3) Highly customizable. You can easily customize reference style as you wish.
+% 4) You can use "certified random order" proposed by Ray ⓡ Robson (2018)
+% (http://dx.doi.org/10.1257/aer.20161492).
+
+% Bug reports, requests and suggestions are welcome.
+
+% For changelogs, see CHANGES.txt file.
+
+% version number
+FUNCTION {econ.version} { "2.5" }
+
+% Debug mode. Non-zero makes debug mode on.
+FUNCTION {econ.debug}
+{ #0 } % Debug mode off (default).
+% { #1 } % Debug mode on.
+
+ENTRY
+ %%% Declaration of field
+ { access address author booktitle chapter doi edition editor howpublished
+ institution journal key month note number organization pages publisher
+ school series title type url volume year
+ % Fields specific to econ.bst
+ order absorder nameorder
+ }
+
+ % Definition of entry variable. The entry variable is a variable which has
+ % different values according to different entries.
+ %% Integer entry variable:
+ { order.cited }
+
+ %% String entry variable
+ { label cyear flabel alabel extra.label sort.label sort.label.abb
+ extra.label.bysame nameorder.temp }
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%%
+%% Functions for customization:
+%%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+% Use \bysame or not.
+%
+% If set to #0, \bysame is not used.
+% If set to #1, \bysame is used
+% If set to #2, \bysame is used (alternative abbreviation style).
+%
+% Note that integer number is expressed as # + integer in bst file.
+% \bysame is the function that abbreviates succession of the same authors' name by ---.
+%
+% See econ-sample.pdf for details.
+%
+FUNCTION {bst.use.bysame}
+{ #0 } % Not use \bysame
+% { #1 } % -> Use \bysame (default)
+% { #2 } % -> Use \bysame of alternative style.
+
+% The definition of \bysame command.
+%
+FUNCTION {bst.bysame.definition}
+{ "\hskip.3em \leavevmode\rule[.5ex]{3em}{.3pt}\hskip0.5em" } % (default)
+% { "\leavevmode\hbox to\leftmargin{\hrulefill\,\,}" } % If you set #2 to bst.use.bysame, use this.
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+% The order of fist and last name.
+%
+FUNCTION {bst.author.name}
+{ #0 } % (default)
+% { #1 }
+% { #2 }
+
+% Case of #0: First author -> last-first, other authors -> first-last.
+% Fujita, Masahisa, Paul R. Krugman, and Anthony J. Venables.
+
+% Case of #1: All authors -> last-first
+% Fujita, Masahisa, Krugman, Paul R., and Venables, Anthony J.
+
+% Case of #2: All authors -> first-last
+% Masahisa Fujita, Paul R. Krugman, and Anthony J. Venables.
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+% Abbreviate first name of authors (editors):
+%
+FUNCTION {bst.first.name.initial}
+{ #0 } % #0 -> full letters (default).
+% { #1 } % Non-zero -> initial letter only.
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+% Decapitalize of strings in title field.
+%
+FUNCTION {bst.title.lower.case}
+{ #0 } % If #0, not decapitalize title (default).
+% { #1 } % If non-#0, decapitalize title
+
+% Hide title filed.
+%
+FUNCTION {bst.hide.title}
+{ #0 } % #0 -> Title field is displayed (default)
+% { #1 } % Non-zer -> Title field is hidden
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+% Hide month.
+%
+FUNCTION {bst.hide.month}
+{ #0 } % #0 -> show month field (default).
+% { #1 } % non-#0 -> hide month field.
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+% Attach number index like plain.bst.
+%
+FUNCTION {bst.use.number.index}
+{ #0 } % Not use number index (default).
+% { #1 } % Non-#0 -> Use number index
+
+% The string before number index:
+%
+FUNCTION {bst.number.index.pre}
+{ "[" } % (default)
+
+% The string after number index. Adjustment is recommended.
+%
+FUNCTION {bst.number.index.post}
+{ "]\hskip1.0em " } % (default)
+
+% Maximum digit of number index:
+% If the number of reference items >= 100, set 3 to this function.
+% If the number of reference items < 100, set 2 to this function.
+% If the number of reference items < 10, set 1 to this function.
+%
+FUNCTION {bst.number.index.digit}
+{ "2" } % (default)
+% { "3" }
+
+% The functions below are used to adjust space and postion. If you use fonts
+% other than computer modern fonts, you had better make adjustments.
+%
+% Setting for bst.number.index.digit = 1:
+FUNCTION {bst.number.index.bibhang.one}
+{ "2.05em" } % (default)
+% Setting for bst.number.index.digit = 2:
+FUNCTION {bst.number.index.bibhang.ten}
+{ "2.55em" } % (default)
+% Setting for bst.number.index.digit = 3:
+FUNCTION {bst.number.index.bibhang.hund}
+{ "3.05em" } % (default).
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+% Position of "year":
+%
+% You can choose the position of year by this function.
+%
+% If set to #0, year is placed right after "author".
+% If set to non-zero, year is placed at the end (before note field) except for
+% aritcle type entry.
+%
+% In article type entry, the position of year changes according to the
+% following rule:
+%
+% #1 -> year is placed at the end.
+% #2 -> year is placed after journal name in aritcle type entry.
+% #3 -> year is placed after volume in aritcle type entry.
+%
+FUNCTION {bst.year.position}
+{ #0 } % (default).
+% { #1 } % Last place before note.
+% { #2 } % After journal name for aticle type entry.
+% { #3 } % After volume for aticle type entry.
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+% If 0, references are sorted by old documents -> recent documents. If
+% non-zero, reverse order.
+FUNCTION {bst.reverse.year}
+{ #0 } % Normal order (old -> recent) (default).
+% { #1 } % inverse order (recent -> old)
+
+% If non-zero, sort references by using year field as the primary key
+% (chronological sorting).
+FUNCTION {bst.sort.year}
+{ #0 } % Normal case: year is used as the sorting key next to author (default).
+% { #1 } % year is used as the primary sorting key.
+
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+% If non-zero, references are listed in citation order.
+%
+FUNCTION {bst.no.sort}
+{ #0 } % (default)
+% { #1 } % listed in citation order.
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+% Non-zero -> sort references by entry type (article, book, incollection etc.)
+%
+FUNCTION {bst.sort.entry.type}
+{ #0 } % #0 -> Normal (not sort references by entry type) (default).
+% { #1 } % Non-zero -> sort references by entry type.
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+% 0 -> use absorder field to sort items. Otherwise, ignore absorder field.
+%
+FUNCTION {bst.notuse.absorder.field}
+{ #0 } % #0 -> Use absorder (default).
+% { #1 } % Non-#0 -> Not use absorder.
+%
+% Order of priority to sort items
+%
+% absorder -> author -> year -> order -> month -> title
+%
+% wehre absorder and order fields are specific to econ.bst.
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+% 0 -> use order field to sort items. Otherwise, ignore order field.
+% Note: order field is specific to econ.bst.
+FUNCTION {bst.notuse.order.field}
+{ #0 } % #0 -> Use order field (default).
+% { #1 } % Non-#0 -> not use order field.
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%%% and
+
+%%% String used to separate author names in references.
+%
+% String replaced with _ in "Mr. A _ Mr. B "
+%
+FUNCTION {bst.and}
+{ ", and " }
+% { " and " } % (default)
+
+%%% String used to separate author names in references (more than two authors).
+%
+% String replaced with _ in "Mr. A, Mr. B _ Mr. C"
+%
+FUNCTION {bst.ands}
+{ ", and " } % (default)
+
+%%% String used to separate author names in citation part.
+%
+% String replaced with _ in "Mr. A _ Mr. B "
+%
+FUNCTION {bst.cite.and}
+{ " and " } % (default)
+
+%%% String used to separate author names in citation part (more than two authors).
+%
+% String replaced with _ in "Mr. A, Mr. B _ Mr. C"
+%
+FUNCTION {bst.cite.ands}
+{ " and " } % (default)
+
+%%% If you want to use random author order for some bibliography entries, set
+% non-zero to this function.
+%
+FUNCTION {bst.use.nameorder}
+{ #1 } % Use random order (default)
+% { #0 } % Not use random order
+
+%%% String used to separate author names in references for the entry of random
+% author order.
+%
+FUNCTION {bst.and.nameorder}
+{ " \textcircled{r} " } % (default)
+
+%%% String used to separate author names in citation part for the entry of
+% random author order
+%
+FUNCTION {bst.cite.and.nameorder}
+{ " \textcircled{r} " } % (default)
+
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+% Author names in the citation part are abbreviated by et al. if the number of
+% authors is greater or equal to bst.and.others.num.
+FUNCTION {bst.and.others.num}
+{ #3 } % If the number of authors is greater or equal to three (default).
+% { #4 }
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+% Strings used when abbreviating multiple-authors in citation part.
+FUNCTION {bst.and.others}
+{ " et~al." } % (default)
+
+% Strings used when abbreviating multiple-authors in citation part for entries
+% with random author order.
+FUNCTION {bst.and.others.nameorder}
+{ " \textcircled{r}~al." } % (default)
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% author
+
+% The string before author:
+%
+FUNCTION {bst.author.pre}
+{ "\textbf{" }
+% { "" } % (default)
+
+% The string after author:
+%
+FUNCTION {bst.author.post}
+{ ".}" }
+% { "" } % (default)
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% year
+
+% The string before year only for aritcle type entry.
+%
+FUNCTION {bst.year.pre}
+{ " " }
+% { " (" } % (default)
+
+% The string after year only for aritcle type entry.
+%
+FUNCTION {bst.year.post}
+{ ". " }
+% { ") " } % (default)
+
+% The string after year for non-article type entry (book, incollection etc)
+%
+FUNCTION {bst.year.na.pre}
+{ " " }
+% { " (" } % (default)
+
+% The string after year for non-article type entry (book, incollection etc)
+%
+FUNCTION {bst.year.na.post}
+{ ". " }
+% { ") " } % (default)
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% title (except for title in book)
+
+% The string before title:
+%
+FUNCTION {bst.title.pre}
+{ "``" } % (default)
+
+% The string after title:
+%
+FUNCTION {bst.title.post}
+{ ".''" }
+% { ",''" } % (default)
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% tile for book:
+
+% The string before book title:
+%
+FUNCTION {bst.book.pre}
+{ " \textit{" } % (default)
+
+% The string after book title:
+%
+FUNCTION {bst.book.post}
+{ "}." }
+% { "}" } % (default)
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% booktitle
+
+% The string before booktitle:
+%
+FUNCTION {bst.btitle.pre}
+{ " \textit{" } % (default)
+
+% The string after booktitle:
+%
+FUNCTION {bst.btitle.post}
+{ "}." }
+% { "}" } % (default)
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% journal name
+
+% The string before journal name:
+%
+FUNCTION {bst.journal.pre}
+{ " \textit{" } % (default)
+
+% The string after journal name:
+%
+FUNCTION {bst.journal.post}
+{ "}" } % (default)
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% editor notation:
+
+% The string that indicates multiple editors:
+%
+FUNCTION {bst.editors}
+{ " eds. " } % (default)
+
+% The string that indicates single editor:
+%
+FUNCTION {bst.editor}
+{ " ed. " } % (default)
+
+% Order of editor and booktitle in incollection and inproceedings entries.
+%
+% If set to #0: editors -> booktitle order
+% If set to non-zero: booktitle -> editors order
+%
+FUNCTION {bst.editor.btitle.order}
+{ #1 }
+% { #0 } % (default)
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% edition
+
+% The string before edition:
+%
+FUNCTION {bst.edition.pre}
+{ ", " } % (default)
+
+% The string after edition:
+%
+FUNCTION {bst.edition.post}
+{ " edition" } % (default)
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% volume
+
+% The string before volume:
+%
+FUNCTION {bst.volume.pre}
+{ ", " }
+% { ", Vol. " } % (default)
+
+% The string after volume:
+%
+FUNCTION {bst.volume.post}
+{ "" } % (default)
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% number
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+% Hide number. If non-zero, number is suppressed.
+FUNCTION {bst.hide.number}
+{ #0 } % #0 -> show number field (default)
+% { #1 } % non-#0 -> Hide number field.
+
+% The string before number:
+%
+FUNCTION {bst.number.pre}
+{ "(" }
+% { ", No. " } % (default)
+
+% The string after number:
+%
+FUNCTION {bst.number.post}
+{ "): " }
+% { "" } % (default)
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% in
+
+% In
+%
+FUNCTION {bst.in}
+{ " In " }
+% { " in " } % (default)
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% page
+
+% The string before page (multiple pages):
+%
+FUNCTION {bst.pages.pre}
+{ " " }
+% { ", pp." } % (default)
+
+% The string before page:
+%
+FUNCTION {bst.page.pre}
+{ ", p." } % (default)
+
+% The string after page (multiple pages):
+%
+FUNCTION {bst.pages.post}
+{ "" } % (default)
+
+% The string after page:
+%
+FUNCTION {bst.page.post}
+{ "" } % (default)
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% chapter
+
+% The string before chapter:
+%
+FUNCTION {bst.chapter.pre}
+{ ", Chap." } % (default)
+
+% The string after chapter:
+%
+FUNCTION {bst.chapter.post}
+{ "" } % (default)
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% month
+
+% The string before month:
+%
+FUNCTION {bst.month.pre}
+{ ", " } % (default)
+
+% The string after month:
+%
+FUNCTION {bst.month.post}
+{ "" } % (default)
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% address
+% The string before address:
+%
+FUNCTION {bst.address.pre}
+{ ", " } % (default)
+
+% The string after address:
+%
+FUNCTION {bst.address.post}
+{ "" } % (default)
+
+% You can choose the order of address and publisher by this function.
+%
+% If #0, address -> publisher order (the default value).
+% If non-zero, publisher -> address order.
+
+FUNCTION {bst.address.position}
+{ #0 } % Address is placed before publisher (default)
+% { #1 } % Address is placed after publisher
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% publisher
+
+% The string before publisher:
+%
+FUNCTION {bst.publisher.pre}
+{ ": " } % (default)
+
+% The string after publisher:
+%
+FUNCTION {bst.publisher.post}
+{ ", " }
+% { "" } % (default)
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% series
+
+% The string before series:
+%
+FUNCTION {bst.series.pre}
+{ ", " } % (default)
+
+% The string after series:
+%
+FUNCTION {bst.series.post}
+{ "" } % (default)
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% organization
+
+% The string before organization:
+%
+FUNCTION {bst.organization.pre}
+{ ", " } % (default)
+
+% The string after organization:
+%
+FUNCTION {bst.organization.post}
+{ "" } % (default)
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% school
+
+% The string before school:
+%
+FUNCTION {bst.school.pre}
+{ ", " } % (default)
+
+% The string after school:
+%
+FUNCTION {bst.school.post}
+{ "" } % (default)
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% institution
+
+% The string before institution:
+%
+FUNCTION {bst.institution.pre}
+{ ", " } % (default)
+
+% The string after institution:
+%
+FUNCTION {bst.institution.post}
+{ "" } % (default)
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% howpublished
+
+% The string before howpublished:
+%
+FUNCTION {bst.howpublished.pre}
+{ " " } % (default)
+
+% The string after howpublished:
+%
+FUNCTION {bst.howpublished.post}
+{ "" } % (default)
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% url
+
+% Show or Hide url. If non-zero, url is displayed. Otherwise, url is suppressed.
+FUNCTION {bst.show.url}
+{ #1 } % non-#0 -> Show url field (default)
+% { #0 } % #0 -> Not show url field.
+
+% The string before url:
+%
+FUNCTION {bst.url.pre}
+{ ", URL: \url{" } % (default)
+
+% The string after url:
+%
+FUNCTION {bst.url.post}
+{ "}" } % (default)
+
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% Access
+
+% This setting is valid only if there are "access" field in bib
+% files. The value of access field indicates accessed date for URL.
+
+% The string before access.
+FUNCTION {bst.access.pre}
+{ ", accessed on " } % (default)
+
+% The string after access.
+FUNCTION {bst.access.post}
+{ "" } % (default)
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% DOI (digital object identifier)
+
+% This setting is valid only if there are "doi" field in bib files.
+
+% Show or Hide DOI. If non-zero, DOI is displayed. Otherwise, DOI is suppressed.
+FUNCTION {bst.show.doi}
+{ #1 } % non-#0 -> Show DOI field (default)
+% { #0 } % #0 -> Not show DOI field.
+
+% The string before DOI:
+%
+FUNCTION {bst.doi.pre}
+{ ", DOI: \href{http://dx.doi.org/" doi * "}{" * } % (default)
+
+% The string after DOI:
+%
+FUNCTION {bst.doi.post}
+{ "}" } % (default)
+
+% How to show URL and DOI fields when both fields exist.
+%
+% #0 -> Both fields are displayed
+% #1 -> Only URL field is displayed
+% #2 -> Only DOI field is displayed
+%
+FUNCTION {bst.url.doi}
+% { #0 } % (default) -> Both fields are displayed
+% { #1 } % -> Only URL field is displayed
+{ #2 } % -> Only DOI field is displayed
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% Other functions:
+
+% The string before note.
+FUNCTION {bst.note.pre}
+{ ", " } % (default)
+
+% The string after note.
+FUNCTION {bst.note.post}
+{ "" } % (default)
+
+% The string that represents Technical report:
+%
+FUNCTION {bst.techrep}
+{ " Tech. Rep." } % (default)
+
+% The string that represents master thesis:
+%
+FUNCTION {bst.mthesis}
+{ " Master's thesis" } % (default)
+
+% The string that represents phd thesis:
+%
+FUNCTION {bst.phdthesis}
+{ " Ph.D. dissertation" } % (default)
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%%
+%% Functions for customization end here:
+%%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+FUNCTION {bst.first}
+{ "1st" }
+
+FUNCTION {bst.second}
+{ "2nd" }
+
+FUNCTION {bst.third}
+{ "3rd" }
+
+FUNCTION {bst.fourth}
+{ "4th" }
+
+FUNCTION {bst.fifth}
+{ "5th" }
+
+FUNCTION {bst.st}
+{ "st" }
+
+FUNCTION {bst.nd}
+{ "nd" }
+
+FUNCTION {bst.rd}
+{ "rd" }
+
+FUNCTION {bst.th}
+{ "th" }
+
+%%%%% memo by Takeda
+
+% "a" 'b := indicates substituting string "a" for variable b.
+
+% Integer number #0, #1,...
+
+%%% Function definition:
+%
+% FUNCTION {name}
+% { 's :=
+%
+% }
+%
+% This is the definition of a function named "name". The function "name" is
+% used in the following way
+%
+% "foo" name
+% "foo" is an argument for the function "name".
+%
+% About the definition of a function with more than two arguments, see the
+% definition of "chop.word".
+
+%%% Declaration of variables:
+
+%% String global variables:
+STRINGS { s t tt }
+STRINGS { year.num }
+STRINGS { preone preten }
+STRINGS { last.sort.label next.extra prev.author prev.author.aer this.author }
+STRINGS { hang }
+STRINGS { item.type }
+STRINGS { tempa tempb }
+
+%% Integer global variables:
+INTEGERS { nameptr namesleft numnames name.num }
+INTEGERS { multiresult }
+INTEGERS { index }
+INTEGERS { len }
+INTEGERS { last.extra.num }
+INTEGERS { output.state before.all mid.sentence after.sentence after.block }
+INTEGERS { last.period.comma }
+INTEGERS { len1.aer len2.aer i.aer }
+
+%%% Definition of functions:
+FUNCTION {not}
+{ { #0 }
+ { #1 }
+ if$
+}
+
+FUNCTION {and}
+{ 'skip$
+ { pop$ #0 }
+ if$
+}
+
+FUNCTION {or}
+{ { pop$ #1 }
+ 'skip$
+ if$
+}
+
+%%% Initialize variables:
+FUNCTION {init.state.consts}
+{ #0 'before.all :=
+ #1 'mid.sentence :=
+ #2 'after.sentence :=
+ #3 'after.block :=
+}
+
+%%% Remove comma and add period:
+%
+%%%
+FUNCTION {add.period.x}
+{ duplicate$
+ #-1 #1 substring$ "," =
+ { #-2 global.max$ substring$ "." * }
+ { duplicate$
+ #-1 #2 substring$ ". " =
+ { #-3 global.max$ substring$ "." * }
+ { duplicate$
+ #-1 #2 substring$ ", " =
+ { #-3 global.max$ substring$ "." * }
+ { duplicate$
+ #-1 #2 substring$ ",'" =
+ { #-3 global.max$ substring$ ".'" * }
+ { duplicate$
+ #-1 #2 substring$ ".'" =
+ { #-3 global.max$ substring$ ".'" * }
+ { duplicate$
+ #-1 #2 substring$ ".~" =
+ { #-3 global.max$ substring$ ".~" * }
+ { duplicate$
+ #-1 #2 substring$ ",~" =
+ { #-3 global.max$ substring$ ".~" * }
+ { duplicate$
+ #-1 #3 substring$ ",''" =
+ { #-4 global.max$ substring$ ".''" * }
+ { duplicate$
+ #-1 #3 substring$ ".''" =
+ { #-4 global.max$ substring$ ".''" * }
+ { add.period$ }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+}
+
+FUNCTION {output.nonnull}
+{ 's :=
+ % mid.sentence
+ output.state mid.sentence =
+ { ", " * write$ }
+ % not mid.sentence
+ { output.state after.block =
+ % after.block
+ { add.period.x " " * write$ }
+ % before.all
+ { output.state before.all =
+ 'write$
+ { add.period.x " " * write$ }
+ if$
+ }
+ if$
+ % not mid.sentence, set to mid.sentence
+ mid.sentence 'output.state :=
+ }
+ if$
+ s
+}
+
+%%% If the last character is period or comma, set non-zero to
+%%% last.period.comma.
+FUNCTION {period.comma.p}
+{ duplicate$ 't :=
+ t #-1 #1 substring$ "." =
+ t #-1 #1 substring$ "," = or
+ t #-1 #1 substring$ ":" = or
+ t #-1 #2 substring$ ".'" = or
+ t #-1 #2 substring$ ",'" = or
+ t #-1 #3 substring$ ".''" = or
+ t #-1 #3 substring$ ",''" = or
+ t #-1 #2 substring$ ".~" = or
+ t #-1 #2 substring$ ",~" = or
+ { #1 'last.period.comma := }
+ { #0 'last.period.comma := }
+ if$
+}
+
+%%% remove unnecessary comma.
+FUNCTION {remove.pre.comma}
+{ 's :=
+ s empty$
+ { "" }
+ { s #1 #1 substring$ "," =
+ { s #2 global.max$ substring$ }
+ { s #1 #1 substring$ "." =
+ { s #2 global.max$ substring$ }
+ 's
+ if$
+ }
+ if$
+ }
+ if$
+}
+
+%%% output.nonnull.nocomma is the same as output.nonnull except that it does
+%%% not add commas even in mid.sentence.
+FUNCTION {output.nonnull.nocomma}
+{ 's :=
+ output.state mid.sentence =
+ % mid.sentence
+ { period.comma.p "" * write$ }
+
+ % not mid.sentence
+ { output.state after.block =
+ % after.block
+ { add.period.x " " * write$ }
+ % before.all
+ { output.state before.all =
+ 'write$
+ { add.period$ " " * write$ }
+ if$
+ }
+ if$
+ mid.sentence 'output.state :=
+ }
+ if$
+ last.period.comma #0 =
+ { s }
+ { s remove.pre.comma }
+ if$
+}
+
+% Not used in the current econ.bst.
+% FUNCTION {output}
+% { duplicate$ empty$
+% 'pop$
+% 'output.nonnull
+% if$
+% }
+
+FUNCTION {output.nocomma}
+{ duplicate$ empty$
+ 'pop$
+ 'output.nonnull.nocomma
+ if$
+}
+
+% Not used in the current econ.bst.
+% FUNCTION {output.check}
+% { 't :=
+% duplicate$ empty$
+% { pop$ "empty " t * " in " * cite$ * warning$ }
+% 'output.nonnull
+% if$
+% }
+
+FUNCTION {output.check.nocomma}
+{ 't :=
+ duplicate$ empty$
+ { pop$ "empty " t * " in " * cite$ * warning$ }
+ 'output.nonnull.nocomma
+ if$
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%%% Format in bbl file:
+
+% \harvarditem[Brezis et~al.]{Brezis, Krugman and
+% Tsiddon}{1993}{brezis93:_leapf_inter_compet}
+% Brezis, Elise~S., Paul~R. Krugman, and Daniel Tsiddon (1993) ``Leapfrogging in
+% International Competition: A Theory of Cycles in National Technological
+% Leadership.'', {\em American Economic Review.}, Vol.~83. No.~5. pp.
+% 1211--1219.
+
+% \harvarditem[abbreviated citation]{full citation}{year}{keyword} ...
+
+%%% Add period and newline.
+FUNCTION {fin.entry}
+{ add.period.x
+ write$
+ newline$
+}
+
+FUNCTION {new.block}
+{ output.state before.all =
+ 'skip$
+ { after.block 'output.state := }
+ if$
+}
+
+FUNCTION {new.sentence}
+{ output.state after.block =
+ 'skip$
+ { output.state before.all =
+ 'skip$
+ { after.sentence 'output.state := }
+ if$
+ }
+ if$
+}
+
+FUNCTION {new.block.check}
+{ empty$
+ 'skip$
+ 'new.block
+ if$
+}
+
+FUNCTION {field.or.null}
+{ duplicate$ empty$
+ { pop$ "" }
+ 'skip$
+ if$
+}
+
+%%% booktitle
+FUNCTION {format.btitle}
+{ booktitle empty$
+ { "" }
+ { bst.btitle.pre booktitle * bst.btitle.post * }
+ if$
+}
+
+%%% journal
+FUNCTION {format.journal}
+{ journal empty$
+ { "" }
+ { bst.journal.pre journal * bst.journal.post * }
+ if$
+}
+
+%%% title for book
+FUNCTION {format.book}
+{ title empty$
+ { "" }
+ { bst.book.pre title * bst.book.post * }
+ if$
+}
+
+FUNCTION {format.url}
+{ url empty$
+ { "" }
+ { type$ "online" = bst.show.url or
+ { bst.url.pre url * bst.url.post *
+ access empty$
+ { "" * }
+ { bst.access.pre * access * bst.access.post * }
+ if$
+ }
+ { "" }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.doi}
+{ doi empty$ bst.show.doi not or
+ { "" }
+ { bst.doi.pre doi * bst.doi.post * }
+ if$
+}
+
+FUNCTION {format.url.doi}
+{ url empty$
+ { format.doi }
+ { doi empty$
+ { format.url }
+ { bst.url.doi #0 =
+ { format.url output.nocomma
+ format.doi }
+ { bst.url.doi #1 =
+ { format.url }
+ { format.doi }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+}
+
+%%% and others
+FUNCTION {bst.and.others.output}
+{ nameorder.temp "random" =
+ bst.use.nameorder #0 = not and
+ { bst.and.others.nameorder }
+ { bst.and.others }
+ if$
+}
+
+%%% author and editor
+
+%%% name
+FUNCTION {format.names}
+{ 's :=
+ % insert 1 to nameptr.
+ #1 'nameptr :=
+ % Set the number of authors to numnames.
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ % Repeat if namesleft > 0
+ { namesleft #0 > }
+ { nameptr #1 =
+ % First author
+ { bst.author.name #0 =
+ bst.author.name #1 =
+ or
+ { bst.first.name.initial #0 =
+ { s nameptr "{vv~}{ll}{, ff}{, jj}" format.name$ 't := }
+ { s nameptr "{vv~}{ll}{, f.}{, jj}" format.name$ 't := }
+ if$
+ }
+ { bst.first.name.initial #0 =
+ { s nameptr "{ff~}{vv~}{ll}{, jj}" format.name$ 't := }
+ { s nameptr "{f.~}{vv~}{ll}{, jj}" format.name$ 't := }
+ if$
+ }
+ if$
+ }
+ % The second or later authors
+ { bst.author.name #0 =
+ bst.author.name #2 =
+ or
+ { bst.first.name.initial #0 =
+ { s nameptr "{ff~}{vv~}{ll}{, jj}" format.name$ 't := }
+ { s nameptr "{f.~}{vv~}{ll}{, jj}" format.name$ 't := }
+ if$
+ }
+ { bst.first.name.initial #0 =
+ { s nameptr "{vv~}{ll}{, ff}{, jj}" format.name$ 't := }
+ { s nameptr "{vv~}{ll}{, f.}{, jj}" format.name$ 't := }
+ if$
+ }
+ if$
+ }
+ if$
+
+ nameptr #1 >
+ % The second or later authors
+ { nameorder.temp "random" =
+ bst.use.nameorder #0 = not and
+ { bst.and.nameorder * t * }
+ { namesleft #1 >
+ % More than one authors left
+ { ", " * t * }
+ % Only one author left
+ { t "others" =
+ { bst.and.others.output * }
+ { numnames #2 =
+ % Entry with two authors
+ { bst.and * t * }
+ { bst.ands * t * }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ 't
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+}
+
+% remove successive periods (commas) from author
+FUNCTION {remove.ss.period.auth}
+{ 's :=
+ s format.names 'tempa :=
+ bst.author.post 'tempb :=
+ tempb #1 #1 substring$ "}" =
+ { tempa tempb * }
+ { tempa #-1 #1 substring$ tempb #1 #1 substring$ =
+ { tempa tempb #2 global.max$ substring$ * }
+ { tempa tempb * }
+ if$
+ }
+ if$
+}
+
+% <prev name list> <new name list> compare.names <modified name list>
+FUNCTION {compare.names.aer}
+{ 's :=
+ 'tempa :=
+
+% "current.author = " s * "\\" * write$ newline$
+% "prev.author = " tempa * "\\" * write$ newline$
+
+ tempa num.names$ 'len1.aer := % len1 = the number of previous authors
+ s num.names$ 'len2.aer := % len2 = the number of current authors
+
+% len1.aer := min(len1.aer,len2.aer)
+% len1 -> min{ the number of previous authors, the number of current authors }
+ len1.aer len2.aer >
+ { len2.aer 'len1.aer := }
+ { }
+ if$
+
+% start with an empty string, then while the components are the same
+% add "\bysame"
+ ""
+ #1 'i.aer :=
+
+ { i.aer len1.aer > not }
+ { tempa i.aer "{ff }{vv }{ll}{ jj}" format.name$
+ s i.aer "{ff }{vv }{ll}{ jj}" format.name$
+ =
+ { #1 i.aer <
+ { " and " * } % \bysame で省略する著者の前につく and
+ { }
+ if$
+ "\bysame{}" *
+ i.aer #1 + 'i.aer := }
+ { #-1 'len1.aer := }
+ if$
+ }
+ while$
+
+% add the rest of the second string
+ { i.aer len2.aer > not }
+ { #1 i.aer <
+ { " and " * }
+ { }
+ if$
+ s i.aer "{ff }{vv }{ll}{ jj}" format.name$ *
+ i.aer #1 + 'i.aer :=
+ }
+ while$
+}
+
+%%% author
+FUNCTION {format.authors}
+{ author empty$
+ { "" }
+ { bst.use.bysame #2 =
+ { prev.author.aer author compare.names.aer 's :=
+ author 'prev.author.aer := }
+ { author 's := }
+ if$
+ extra.label.bysame "bysame" =
+ { "\bysame " }
+ { bst.author.pre s remove.ss.period.auth * }
+ if$
+ }
+ if$
+}
+
+%%% editor
+FUNCTION {format.editors}
+{ editor empty$
+ { "" }
+ { bst.use.bysame #2 =
+ { prev.author.aer editor compare.names.aer 's :=
+ editor 'prev.author.aer := }
+ { editor 's := }
+ if$
+ extra.label.bysame "bysame" =
+ { "\bysame " }
+ { bst.author.pre s remove.ss.period.auth * }
+ if$
+ s num.names$ #1 >
+ { bst.editors * }
+ { bst.editor * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.authors.alt}
+{ author empty$
+ { "" }
+ { extra.label.bysame "bysame" =
+ {"\bysame "}
+ { bst.author.pre author remove.ss.period.auth * }
+ if$
+ }
+ if$
+}
+
+%%% editor
+FUNCTION {format.editors.alt}
+{ editor empty$
+ { "" }
+ { extra.label.bysame "bysame" =
+ { "\bysame " }
+ { bst.author.pre editor remove.ss.period.auth * }
+ if$
+ editor num.names$ #1 >
+ { bst.editors * }
+ { bst.editor * }
+ if$
+ }
+ if$
+}
+
+%%% format.in.ed.booktitle
+FUNCTION {format.editors.x}
+{ editor empty$
+ { "" }
+ { bst.editor.btitle.order #0 =
+ { "" }
+ { editor num.names$ #1 >
+ { bst.editors " by " * }
+ { bst.editor " by " * }
+ if$
+ }
+ if$
+ editor format.names *
+ bst.editor.btitle.order #0 =
+ { editor num.names$ #1 >
+ { bst.editors * }
+ { bst.editor * }
+ if$
+ }
+ { "" * }
+ if$
+ }
+ if$
+}
+
+%%% Remove commas in the cases like "?." and "?,".
+FUNCTION {remove.irrelevant.period.comma}
+{ 's :=
+ s empty$
+ { "" }
+ { s #-1 #3 substring$ "?,'" =
+ s #-1 #3 substring$ "?.'" = or
+ { s #-3 global.max$ substring$ "'" * }
+ { s #-1 #4 substring$ "?,''" =
+ s #-1 #4 substring$ "?.''" = or
+ { s #-4 global.max$ substring$ "''" * }
+ { s #-1 #2 substring$ "?," =
+ s #-1 #2 substring$ "?." = or
+ { s #-2 global.max$ substring$ "" * }
+ { s #-1 #3 substring$ "?,~" =
+ s #-1 #3 substring$ "?.~" = or
+ { s #-4 global.max$ substring$ "?~" * }
+ 's
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+}
+
+%%% title
+FUNCTION {format.title.sub}
+{ bst.title.lower.case #0 =
+ { bst.title.pre title * bst.title.post * }
+ { bst.title.pre title "t" change.case$ * bst.title.post * }
+ if$
+}
+
+%%% title
+FUNCTION {format.title}
+{ title empty$
+ bst.hide.title #0 = not or
+ { "" }
+ { format.title.sub remove.irrelevant.period.comma }
+ if$
+}
+
+%%% title for misc.
+FUNCTION {format.misc.title}
+{ title empty$
+ { "" }
+ { bst.title.pre title * bst.title.post * }
+ if$
+}
+
+% Convert "-" to "--" (for pages field)
+FUNCTION {n.dashify}
+{ 't :=
+ ""
+ %% while$
+ { t empty$ not }
+ { t #1 #1 substring$ "-" =
+ { t #1 #2 substring$ "--" = not
+ { "--" *
+ t #2 global.max$ substring$ 't :=
+ }
+ { { t #1 #1 substring$ "-" = }
+ { "-" *
+ t #2 global.max$ substring$ 't :=
+ }
+ while$
+ }
+ if$
+ }
+ { t #1 #1 substring$ *
+ t #2 global.max$ substring$ 't :=
+ }
+ if$
+ }
+ while$
+}
+
+%%% year
+FUNCTION {format.year}
+{ year empty$
+ { "there's no year in " cite$ * warning$
+ ", " }
+ { type$ "article" =
+ { bst.year.pre year * extra.label * bst.year.post * }
+ { bst.year.na.pre year * extra.label * bst.year.na.post * }
+ if$
+ }
+ if$
+}
+
+%%% page for book
+FUNCTION {format.book.pages}
+{ pages empty$
+ { "" }
+ { bst.pages.pre pages * bst.pages.post * }
+ if$
+}
+
+%%% Attach tie for the string with two or less characters.
+FUNCTION {tie.or.space.connect}
+{ duplicate$ text.length$ #3 <
+ { "~" }
+ { " " }
+ if$
+ swap$ * *
+}
+
+FUNCTION {either.or.check}
+{ empty$
+ 'pop$
+ { "can't use both " swap$ * " fields in " * cite$ * warning$ }
+ if$
+}
+
+%%% volume for book
+FUNCTION {format.bvolume}
+{ volume empty$
+ { "" }
+ { bst.volume.pre volume * bst.volume.post *
+ series empty$
+ 'skip$
+ %% If there is series field
+ { " of " * series * bst.series.post * }
+ if$
+% "volume and number" number either.or.check
+ }
+ if$
+}
+
+%%% series
+FUNCTION {output.series}
+{ series empty$
+ { "" }
+ { bst.series.pre series * bst.series.post * }
+ if$
+}
+
+%%% number and series
+FUNCTION {format.number.series}
+{ volume empty$
+ { number empty$
+ bst.hide.month #0 = not or
+ % number is empty
+ { series empty$
+ { "" }
+ % series is not empty.
+ { output.series }
+ if$
+ }
+ % number is not empty$
+ { series empty$
+ { bst.number.pre number * bst.number.post * }
+ % series is not empty.
+ { bst.in bst.series.pre * series * bst.series.post *
+ bst.number.pre * number * bst.number.post * }
+ if$
+ }
+ if$
+ }
+ { "" }
+ if$
+}
+
+%%% Number or not.
+FUNCTION {is.num}
+{ chr.to.int$
+ duplicate$ "0" chr.to.int$ < not
+ swap$ "9" chr.to.int$ > not and
+}
+
+FUNCTION {extract.num}
+{ duplicate$ 't :=
+ "" 's :=
+ { t empty$ not }
+ { t #1 #1 substring$
+ t #2 global.max$ substring$ 't :=
+ duplicate$ is.num
+ { s swap$ * 's := }
+ { pop$ "" 't := }
+ if$
+ }
+ while$
+ s empty$
+ 'skip$
+ { pop$ s }
+ if$
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% edition
+
+% Convert edition to 1st, 2nd, 3rd, 4th etc
+FUNCTION {eng.ord}
+{ duplicate$ "1" swap$ *
+ #-2 #1 substring$ "1" =
+ { bst.th * }
+ { duplicate$ #-1 #1 substring$
+ duplicate$ "1" =
+ { pop$ bst.st * }
+ { duplicate$ "2" =
+ { pop$ bst.nd * }
+ { "3" =
+ { bst.rd * }
+ { bst.th * }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+}
+
+% Convert first, second etc in edition field to 1st, 2nd (from jfm.bst)
+FUNCTION {convert.edition}
+{ edition extract.num "l" change.case$ 's :=
+ s "first" = s "1" = or
+ { bst.first }
+ { s "second" = s "2" = or
+ { bst.second }
+ { s "third" = s "3" = or
+ { bst.third }
+ { s "fourth" = s "4" = or
+ { bst.fourth }
+ { s "fifth" = s "5" = or
+ { bst.fifth }
+ { s #1 #1 substring$ is.num
+ { s eng.ord }
+ { edition }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+}
+
+%%% edition
+FUNCTION {format.edition}
+{ edition empty$
+ { "" }
+ { output.state mid.sentence =
+ { bst.edition.pre convert.edition "l" change.case$ * bst.edition.post * }
+ { bst.edition.pre convert.edition "t" change.case$ * bst.edition.post * }
+ if$
+ }
+ if$
+}
+
+%%% month
+FUNCTION {format.month}
+{ month empty$
+ bst.hide.month #0 = not or
+ { "" }
+ { bst.month.pre month * bst.month.post * }
+ if$
+}
+
+%%% year and month
+FUNCTION {format.date}
+{ format.month format.year *
+}
+
+%%% Is multiple pages like 1-100?
+FUNCTION { multi.page.check }
+{ 't :=
+ #0 'multiresult :=
+ { multiresult not
+ t empty$ not
+ and
+ }
+ { t #1 #1 substring$
+ duplicate$ "-" =
+ swap$ duplicate$ "," =
+ swap$ "+" =
+ or or
+ { #1 'multiresult := }
+ { t #2 global.max$ substring$ 't := }
+ if$
+ }
+ while$
+ multiresult
+}
+
+%%% pages
+FUNCTION {format.pages}
+{ pages empty$
+ { "" }
+ { pages multi.page.check
+ { bst.pages.pre pages n.dashify tie.or.space.connect * bst.pages.post }
+ { bst.page.pre pages tie.or.space.connect * bst.page.post }
+ if$
+ }
+ if$
+}
+
+%%% number
+FUNCTION {format.number}
+{ number empty$
+ bst.hide.number #0 = not or
+ { "" }
+ { bst.number.pre number * bst.number.post * }
+ if$
+}
+
+%%% volume
+FUNCTION {format.volume}
+{ volume empty$
+ 'skip$
+ { bst.volume.pre volume * bst.volume.post *
+ bst.year.position #3 =
+ { format.year * }
+ 'skip$
+ if$
+ }
+ if$
+}
+
+%%% number, page
+FUNCTION {format.number.pages}
+{ number empty$
+ { format.pages }
+ { format.number format.pages * }
+ if$
+}
+
+%%% volume, page
+FUNCTION {format.volume.pages}
+{ volume empty$
+ { format.pages }
+ { format.volume format.pages * }
+ if$
+}
+
+%%% volume, number, page
+FUNCTION {format.volume.number.pages}
+{ volume empty$
+ { number empty$
+ { format.pages }
+ { format.number format.pages * }
+ if$
+ }
+ { number empty$
+ { format.volume format.pages * }
+ { format.volume format.number * format.pages * }
+ if$
+ }
+ if$
+}
+
+% volume, number, page
+FUNCTION {format.vol.num.pages}
+{ volume empty$
+ %% volume is empty.
+ { number empty$
+ %% number is empty.
+ { pages empty$
+ % warning
+ { "there is no volume, number, and pages in " cite$ * warning$ "" }
+ { "" format.pages * }
+ if$
+ }
+ %% number is not empty.
+ % warning
+ { "there's a number but no volume in " cite$ * warning$
+ format.number.pages }
+ if$
+ }
+ %% volume is not empty.
+ { number empty$
+ %% number is empty.
+ { format.volume.pages }
+ %% number is not empty.
+ { format.volume.number.pages }
+ if$
+ }
+ if$
+}
+
+%%% chapter
+FUNCTION {format.chapter}
+{ chapter empty$
+ { "" }
+ { type empty$
+ { bst.chapter.pre chapter tie.or.space.connect * bst.chapter.post }
+ { ", " * type " " * chapter * }
+ if$
+ }
+ if$
+}
+
+%%% chapter, pages
+FUNCTION {format.chapter.pages}
+{ chapter empty$
+ { pages empty$
+ { "" }
+ { "" format.pages * }
+ if$
+ }
+ { pages empty$
+ { "" format.chapter * }
+ { "" format.chapter * format.pages * }
+ if$
+ }
+ if$
+}
+
+%%% editor and booktitle
+FUNCTION {format.in.ed.booktitle}
+{ booktitle empty$
+ { "" }
+ { editor empty$
+ { bst.in format.btitle * }
+ { bst.editor.btitle.order #0 =
+ { bst.in format.editors.x * " " * format.btitle * }
+ { bst.in format.btitle * " " * format.editors.x * }
+ if$
+ }
+ if$
+ }
+ if$
+}
+
+%%% howpublished
+FUNCTION {format.howpublished}
+{ howpublished empty$
+ { "" }
+ { bst.howpublished.pre howpublished * bst.howpublished.post * }
+ if$
+}
+
+%%% address
+FUNCTION {format.address}
+{ address empty$
+ { "" }
+ { bst.address.pre address * bst.address.post * }
+ if$
+}
+
+%%% publisher
+FUNCTION {format.publisher}
+{ publisher empty$
+ { "" }
+ { bst.publisher.pre publisher * bst.publisher.post * }
+ if$
+}
+
+%%% organization
+FUNCTION {format.organization}
+{ organization empty$
+ { "" }
+ { bst.organization.pre organization * bst.organization.post * }
+ if$
+}
+
+%% publisher and address
+FUNCTION {output.publisher.address}
+{ address empty$
+ { format.publisher "publisher" output.check.nocomma }
+ { bst.address.position #0 =
+ { format.address output.nocomma
+ format.publisher "publisher" output.check.nocomma }
+ { format.publisher "publisher" output.check.nocomma
+ format.address output.nocomma }
+ if$
+ }
+ if$
+}
+
+%% address, organization, publisher
+FUNCTION {output.address.organization.publisher}
+{ address empty$
+ %% address is empty
+ { organization empty$
+ %% organization is empty
+ { publisher empty$
+ 'skip$
+ { format.publisher "publisher" output.check.nocomma }
+ if$
+ }
+ %% organization is not empty
+ { publisher empty$
+ { format.organization "organization" output.check.nocomma }
+ { format.organization "organization" output.check.nocomma
+ format.publisher "publisher" output.check.nocomma }
+ if$
+ }
+ if$
+ }
+ %% address is not empty
+ { organization empty$
+ %% organization is empty
+ { publisher empty$
+ %% publisher is empty
+ { format.address output.nocomma }
+ %% publisher is not empty
+ { bst.address.position #0 =
+ { format.address output.nocomma
+ format.publisher "publisher" output.check.nocomma }
+ { format.publisher "publisher" output.check.nocomma
+ format.address output.nocomma }
+ if$
+ }
+ if$
+ }
+ %% organization is not empty
+ { publisher empty$
+ %% publisher is empty
+ { format.organization "organization" output.check.nocomma
+ format.address output.nocomma }
+ %% publisher is not empty
+ { format.organization "organization" output.check.nocomma
+ bst.address.position #0 =
+ { format.address output.nocomma
+ format.publisher "publisher" output.check.nocomma }
+ { format.publisher "publisher" output.check.nocomma
+ format.address output.nocomma }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+}
+
+%%% misc
+FUNCTION {empty.misc.check}
+{ author empty$ title empty$ howpublished empty$
+ month empty$ year empty$ note empty$
+ and and and and and
+ key empty$ not and
+ { "all relevant fields are empty in " cite$ * warning$ }
+ 'skip$
+ if$
+}
+
+FUNCTION {format.thesis.type}
+{ type empty$
+ 'skip$
+ { pop$ " " type * }
+ if$
+}
+
+FUNCTION {format.tr.number}
+{ type empty$
+ { "Technical Report" }
+ { " " type * }
+ if$
+ number empty$
+ { "t" change.case$ }
+ { number tie.or.space.connect }
+ if$
+}
+
+%%% phdthesis
+FUNCTION {format.phd}
+{ bst.phdthesis }
+
+%%% mastersthesis
+FUNCTION {format.mthesis}
+{ bst.mthesis }
+
+%%% school
+FUNCTION {format.school}
+{ school empty$
+ { "" }
+ { bst.school.pre school * bst.school.post * }
+ if$
+}
+
+%%% institution
+FUNCTION {format.institution}
+{ institution empty$
+ { "" }
+ { bst.institution.pre institution * bst.institution.post * }
+ if$
+}
+
+%%% remove first ? characters.
+FUNCTION {chop.word}
+{ 's :=
+ 'len :=
+ s #1 len substring$ =
+ { s len #1 + global.max$ substring$ }
+ 's
+ if$
+}
+
+FUNCTION {format.note}
+{ note empty$
+ { "" }
+ { bst.note.pre note * bst.note.post * }
+ if$
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% \havarditem
+
+FUNCTION {output.bibitem}
+{ newline$
+ "\harvarditem[" write$
+ alabel write$ % alabel <- abbreviated citation
+ "]{" write$
+ flabel write$ % flabel <- full citation
+ "}{" write$
+ cyear write$
+ % cyear = year
+ "}{" write$
+ cite$ write$ % cite$ -> pusch keyword
+ "}" write$
+ % If number index is on
+ bst.use.number.index #0 =
+ 'skip$
+ { index #1 + 'index :=
+ "" 'preone :=
+ "" 'preten :=
+ bst.number.index.digit "1" =
+ 'skip$
+ { bst.number.index.digit "2" =
+ { "\hskip0.5em" 'preone := }
+ { bst.number.index.digit "3" =
+ { "\hskip1em" 'preone :=
+ "\hskip0.5em" 'preten := }
+ 'skip$
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+ newline$
+ before.all 'output.state :=
+ ""
+ % number index
+ bst.use.number.index #0 =
+ 'skip$
+ { index #10 <
+ % Insert spaces according to digit of number index.
+ { preone }
+ { index #100 <
+ { preten }
+ { "" }
+ if$
+ }
+ if$
+ bst.number.index.pre * index int.to.str$ * bst.number.index.post * write$
+ }
+ if$
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% article
+
+FUNCTION {article}
+{ output.bibitem
+ format.authors "author" output.check.nocomma
+ bst.year.position #0 =
+ { format.year "year" output.check.nocomma }
+ 'skip$
+ if$
+ format.title "title" output.check.nocomma
+
+ format.journal "journal" output.check.nocomma
+ bst.year.position #2 =
+ { format.date output.nocomma }
+ 'skip$
+ if$
+ format.vol.num.pages output.nocomma
+
+ bst.year.position #1 =
+ { format.date output.nocomma }
+ 'skip$
+ if$
+
+ format.url.doi output.nocomma
+
+ format.note output.nocomma
+ fin.entry
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% book
+
+FUNCTION {book}
+{ output.bibitem
+ author empty$
+ { format.editors "author and editor" output.check.nocomma }
+ { format.authors output.nonnull.nocomma
+ "author and editor" editor either.or.check
+ }
+ if$
+ bst.year.position #0 =
+ { format.year "year" output.check.nocomma }
+ 'skip$
+ if$
+ format.book "title" output.check.nocomma
+
+ format.bvolume output.nocomma
+ format.number.series output.nocomma
+ output.publisher.address
+
+ format.edition output.nocomma
+ format.book.pages output.nocomma
+
+ bst.year.position #0 = not
+ { format.year "year" output.check.nocomma }
+ 'skip$
+ if$
+
+ format.url.doi output.nocomma
+
+ format.note output.nocomma
+ fin.entry
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% booklet
+
+FUNCTION {booklet}
+{ output.bibitem
+ format.authors output.nocomma
+ format.year output.nocomma
+ format.misc.title "title" output.check.nocomma
+ format.howpublished output.nocomma
+ format.address output.nocomma
+
+ format.url.doi output.nocomma
+
+ format.note output.nocomma
+ fin.entry
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% inbook
+
+FUNCTION {inbook}
+{ output.bibitem
+ author empty$
+ { format.editors "author and editor" output.check.nocomma }
+ { format.authors output.nonnull.nocomma
+ "author and editor" editor either.or.check
+ }
+ if$
+ bst.year.position #0 =
+ { format.year "year" output.check.nocomma }
+ 'skip$
+ if$
+% format.book remove.pre.comma "title" output.check.nocomma
+ format.book "title" output.check.nocomma
+ format.edition output.nocomma
+
+ format.bvolume output.nocomma
+ format.chapter.pages "chapter and pages" output.check.nocomma
+ format.number.series output.nocomma
+ output.publisher.address
+
+ bst.year.position #0 = not
+ { format.year "year" output.check.nocomma }
+ 'skip$
+ if$
+
+ format.url.doi output.nocomma
+
+ format.note output.nocomma
+ fin.entry
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% incollection
+
+FUNCTION {incollection}
+{ output.bibitem
+ format.authors "author" output.check.nocomma
+ bst.year.position #0 =
+ { format.year "year" output.check.nocomma }
+ 'skip$
+ if$
+ format.title "title" output.check.nocomma
+
+ format.in.ed.booktitle "booktitle" output.check.nocomma
+ format.bvolume output.nocomma
+ output.address.organization.publisher
+ format.edition output.nocomma
+ format.chapter.pages output.nocomma
+
+ bst.year.position #0 = not
+ { format.year "year" output.check.nocomma }
+ 'skip$
+ if$
+
+ format.url.doi output.nocomma
+
+ format.note output.nocomma
+ fin.entry
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% inproceedings
+
+FUNCTION {inproceedings}
+{ output.bibitem
+ format.authors "author" output.check.nocomma
+ bst.year.position #0 =
+ { format.year "year" output.check.nocomma }
+ 'skip$
+ if$
+ format.title "title" output.check.nocomma
+
+ format.in.ed.booktitle "booktitle" output.check.nocomma
+ format.bvolume output.nocomma
+ format.number.series output.nocomma
+ format.pages output.nocomma
+ output.address.organization.publisher
+
+ bst.year.position #0 = not
+ { format.date output.nocomma }
+ { format.month output.nocomma }
+ if$
+
+ format.url.doi output.nocomma
+
+ format.note output.nocomma
+ fin.entry
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% conference
+
+FUNCTION {conference}
+{ inproceedings }
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% manual
+FUNCTION {manual}
+{ output.bibitem
+ author empty$
+ { organization empty$
+ 'skip$
+ { organization output.nonnull.nocomma
+ address output.nocomma
+ }
+ if$
+ }
+ { format.authors output.nonnull.nocomma }
+ if$
+ bst.year.position #0 =
+ { format.year "year" output.check.nocomma }
+ 'skip$
+ if$
+ format.book "title" output.check.nocomma
+ author empty$
+ { organization empty$
+ { format.address new.block.check
+ format.address output.nocomma
+ }
+ 'skip$
+ if$
+ }
+ { output.address.organization.publisher }
+ if$
+ format.edition output.nocomma
+
+ bst.year.position #0 = not
+ { format.year "year" output.check.nocomma }
+ 'skip$
+ if$
+
+ format.url.doi output.nocomma
+
+ format.note output.nocomma
+ fin.entry
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% mastersthesis
+
+FUNCTION {mastersthesis}
+{ output.bibitem
+ format.authors "author" output.check.nocomma
+ bst.year.position #0 =
+ { format.year "year" output.check.nocomma }
+ 'skip$
+ if$
+ format.title "title" output.check.nocomma
+ format.mthesis format.thesis.type output.nonnull.nocomma
+ format.school "school" output.check.nocomma
+ format.address output.nocomma
+
+ bst.year.position #0 = not
+ { format.year "year" output.check.nocomma }
+ 'skip$
+ if$
+
+ format.url.doi output.nocomma
+
+ format.note output.nocomma
+ fin.entry
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% misc
+
+FUNCTION {misc}
+{ output.bibitem
+ format.authors "author" output.check.nocomma
+ bst.year.position #0 =
+ { format.year "year" output.check.nocomma }
+ 'skip$
+ if$
+ format.misc.title output.nocomma
+ format.howpublished output.nocomma
+
+ bst.year.position #0 = not
+ { format.date output.nocomma }
+ { format.month output.nocomma }
+ if$
+
+ format.url.doi output.nocomma
+
+ format.note output.nocomma
+ fin.entry
+ empty.misc.check
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% Online
+
+FUNCTION {online}
+{ output.bibitem
+ format.authors "author" output.check.nocomma
+ bst.year.position #0 =
+ { format.year "year" output.check.nocomma }
+ 'skip$
+ if$
+ format.misc.title output.nocomma
+ format.howpublished output.nocomma
+
+ bst.year.position #0 = not
+ { format.date output.nocomma }
+ { format.month output.nocomma }
+ if$
+
+ format.url.doi output.nocomma
+
+ format.note output.nocomma
+ fin.entry
+ empty.misc.check
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% phdthesis
+
+FUNCTION {phdthesis}
+{ output.bibitem
+ format.authors "author" output.check.nocomma
+ bst.year.position #0 =
+ { format.year "year" output.check.nocomma }
+ 'skip$
+ if$
+ format.book "title" output.check.nocomma
+ format.phd
+ format.thesis.type output.nonnull.nocomma
+ format.school "school" output.check.nocomma
+ address empty$
+ 'skip$
+ { format.address output.nocomma }
+ if$
+
+ bst.year.position #0 = not
+ { format.year "year" output.check.nocomma }
+ 'skip$
+ if$
+
+ format.url.doi output.nocomma
+
+ format.note output.nocomma
+ fin.entry
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% proceedings
+
+FUNCTION {proceedings}
+{ output.bibitem
+ editor empty$
+ { organization output.nocomma }
+ { format.editors output.nonnull.nocomma }
+ if$
+ bst.year.position #0 =
+ { format.year "year" output.check.nocomma }
+ 'skip$
+ if$
+ format.btitle remove.pre.comma "title" output.check.nocomma
+ format.bvolume output.nocomma
+ format.number.series output.nocomma
+ output.address.organization.publisher
+
+ bst.year.position #0 = not
+ { format.year "year" output.check.nocomma }
+ 'skip$
+ if$
+
+ format.url.doi output.nocomma
+
+ format.note output.nocomma
+ fin.entry
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% techreport
+
+FUNCTION {techreport}
+{ output.bibitem
+ format.authors "author" output.check.nocomma
+ bst.year.position #0 =
+ { format.year "year" output.check.nocomma }
+ 'skip$
+ if$
+ format.title "title" output.check.nocomma
+ format.tr.number output.nonnull.nocomma
+ format.institution "institution" output.check.nocomma
+ format.address output.nocomma
+
+ bst.year.position #0 = not
+ { format.year "year" output.check.nocomma }
+ 'skip$
+ if$
+
+ format.note output.nocomma
+ fin.entry
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% unpublished
+
+FUNCTION {unpublished}
+{ output.bibitem
+ format.authors "author" output.check.nocomma
+ bst.year.position #0 =
+ { format.year "year" output.check.nocomma }
+ 'skip$
+ if$
+ format.title "title" output.check.nocomma
+
+ bst.year.position #0 = not
+ { format.date remove.pre.comma output.nocomma }
+ { month empty$
+ 'skip$
+ { format.month remove.pre.comma output.nocomma }
+ if$
+ }
+ if$
+
+ format.url.doi output.nocomma
+
+ format.note "note" output.check.nocomma
+ fin.entry
+}
+
+FUNCTION {default.type}
+{ misc }
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% Alias for month names:
+
+MACRO {jan} {"January"}
+MACRO {feb} {"February"}
+MACRO {mar} {"March"}
+MACRO {apr} {"April"}
+MACRO {may} {"May"}
+MACRO {jun} {"June"}
+MACRO {jul} {"July"}
+MACRO {aug} {"August"}
+MACRO {sep} {"September"}
+MACRO {oct} {"October"}
+MACRO {nov} {"November"}
+MACRO {dec} {"December"}
+
+%%% Read entries:
+READ
+
+%%% Variable for remembering the order of citation.
+INTEGERS { order.num }
+FUNCTION {initialize.order.num}
+{
+ #1 'order.num :=
+}
+%%% Initialize a variables
+EXECUTE {initialize.order.num}
+
+%%% Variable for remembering the order of citation.
+FUNCTION {set.order.cited}
+{
+ order.num 'order.cited :=
+ #1 order.num + 'order.num :=
+}
+%%% Iterate for all entries:
+ITERATE {set.order.cited}
+
+%%% check the value of nameorder field.
+FUNCTION {set.nameorder}
+{ nameorder empty$
+ { "" 'nameorder.temp := }
+ { nameorder 'nameorder.temp := }
+ if$
+}
+%%% Iterate for all entries:
+ITERATE {set.nameorder}
+
+%%% Remove symbols and convert to lowercase.
+FUNCTION {sortify}
+{ purify$ "l" change.case$ }
+
+%%% names for sorting
+FUNCTION {sort.format.names}
+{ 's :=
+ #1 'nameptr :=
+ ""
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ { nameptr #1 >
+ { ", " * }
+ 'skip$
+ if$
+ s nameptr "{ll}{ f}{ j}" format.name$ 't :=
+ nameptr numnames = t "others" = and
+ { bst.and.others.output *}
+ { t sortify * }
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+}
+
+FUNCTION {sort.format.names.abb}
+{ 's :=
+ s num.names$ 'numnames :=
+ numnames bst.and.others.num <
+ { s sort.format.names }
+ { s #1 "{ll}{ f}{ j}" format.name$ " zz " * }
+ if$
+}
+
+%%% Label for full author name.
+FUNCTION {format.lab.names.full}
+{ 's :=
+ #1 'nameptr :=
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ { s nameptr "{vv~}{ll}" format.name$ 't :=
+ nameptr #1 >
+ { namesleft #1 >
+ { nameorder.temp "random" = bst.use.nameorder #0 = not and
+ { bst.and.nameorder * t * }
+ { ", " * t * }
+ if$
+ }
+ { t "others" =
+ { bst.and.others.output * }
+ { numnames #2 >
+ { nameorder.temp "random" = bst.use.nameorder #0 = not and
+ { bst.cite.and.nameorder * t * }
+ { bst.cite.ands * t * }
+ if$
+ }
+ { nameorder.temp "random" = bst.use.nameorder #0 = not and
+ { bst.cite.and.nameorder * t * }
+ { bst.cite.and * t * }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ 't
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+ numnames #1 > #1 #2 = and {", eds" *} {} if$
+ numnames #1 = #1 #2 = and {", ed" *} {} if$
+}
+
+%%% laberl for abbreviated author name.
+FUNCTION {format.lab.names.abb}
+{ 's :=
+ s num.names$ 'numnames :=
+ numnames bst.and.others.num <
+ % if the number of authors is less than bst.and.others.num, full name.
+ { s format.lab.names.full }
+ % if the number of authors is equal or more than bst.and.others.num, abbreviated name.
+ { s #1 "{ll}" format.name$ bst.and.others.output * }
+ if$
+}
+
+%%% abbreviated author
+FUNCTION {author.key.label.abb}
+{ author empty$
+ { key empty$
+ { cite$ #1 #3 substring$ }
+ { key #3 text.prefix$ }
+ if$
+ }
+ { author format.lab.names.abb }
+ if$
+}
+
+%%% full author
+FUNCTION {author.key.label.full}
+{ author empty$
+ { key empty$
+ { cite$ #1 #3 substring$ }
+ { key #3 text.prefix$ }
+ if$
+ }
+ { author format.lab.names.full }
+ if$
+}
+
+FUNCTION {format.names.full.wo.and}
+{ 's :=
+ #1 'nameptr :=
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ { s nameptr "{ll}{, ff}{, jj}" format.name$ 't :=
+ nameptr #1 >
+ { namesleft #1 >
+ { " " * t * }
+ { t "others" =
+ { " " * }
+ { numnames #2 >
+ { " " * t * }
+ { " " * t * }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ 't
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+}
+
+FUNCTION {author.key.full.wo.and}
+{ author empty$
+ { key empty$
+ { cite$ #1 #3 substring$ }
+ { key #3 text.prefix$ }
+ if$
+ }
+ { author format.names.full.wo.and }
+ if$
+}
+
+FUNCTION {author.editor.key.full.wo.and}
+{ author empty$
+ { editor empty$
+ { key empty$
+ { cite$ #1 #3 substring$ }
+ { key #3 text.prefix$ }
+ if$
+ }
+ { editor format.names.full.wo.and }
+ if$
+ }
+ { author format.names.full.wo.and }
+ if$
+}
+
+FUNCTION {editor.key.organization.key.full.wo.and}
+{ editor empty$
+ { key empty$
+ { organization empty$
+ { cite$ #1 #3 substring$ }
+ { "The " #4 organization chop.word #3 text.prefix$ }
+ if$
+ }
+ { key #3 text.prefix$ }
+ if$
+ }
+ { editor format.names.full.wo.and }
+ if$
+}
+
+FUNCTION {author.key.organization.key.full.wo.and}
+{ author empty$
+ { key empty$
+ { organization empty$
+ { cite$ #1 #3 substring$ }
+ { "The " #4 organization chop.word #3 text.prefix$ }
+ if$
+ }
+ { key #3 text.prefix$ }
+ if$
+ }
+ { author format.names.full.wo.and }
+ if$
+}
+
+%%% abbreviated author
+FUNCTION {author.editor.key.label.abb}
+{ author empty$
+ { editor empty$
+ { key empty$
+ { cite$ #1 #3 substring$ }
+ { key #3 text.prefix$ }
+ if$
+ }
+ { editor format.lab.names.abb }
+ if$
+ }
+ { author format.lab.names.abb }
+ if$
+}
+
+%%% full author
+FUNCTION {author.editor.key.label.full}
+{ author empty$
+ { editor empty$
+ { key empty$
+ { cite$ #1 #3 substring$ }
+ { key #3 text.prefix$ }
+ if$
+ }
+ { editor format.lab.names.full }
+ if$
+ }
+ { author format.lab.names.full }
+ if$
+}
+
+FUNCTION {author.key.organization.label.full}
+{ author empty$
+ { key empty$
+ { organization empty$
+ { cite$ #1 #3 substring$ }
+ { "The " #4 organization chop.word #3 text.prefix$ }
+ if$
+ }
+ { key #3 text.prefix$ }
+ if$
+ }
+ { author format.lab.names.full }
+ if$
+}
+
+FUNCTION {author.key.organization.label.abb}
+{ author empty$
+ { key empty$
+ { organization empty$
+ { cite$ #1 #3 substring$ }
+ { "The " #4 organization chop.word #3 text.prefix$ }
+ if$
+ }
+ { key #3 text.prefix$ }
+ if$
+ }
+ { author format.lab.names.abb }
+ if$
+}
+
+FUNCTION {editor.key.organization.label.full}
+{ editor empty$
+ { key empty$
+ { organization empty$
+ { cite$ #1 #3 substring$ }
+ { "The " #4 organization chop.word #3 text.prefix$ }
+ if$
+ }
+ { key #3 text.prefix$ }
+ if$
+ }
+ { editor format.lab.names.full }
+ if$
+}
+
+FUNCTION {editor.key.organization.label.abb}
+{ editor empty$
+ { key empty$
+ { organization empty$
+ { cite$ #1 #3 substring$ }
+ { "The " #4 organization chop.word #3 text.prefix$ }
+ if$
+ }
+ { key #3 text.prefix$ }
+ if$
+ }
+ { editor format.lab.names.abb }
+ if$
+}
+
+%%% Convert numbers: 0->9, 1->8, 2->7,..., 9->0
+FUNCTION {reverse.num}
+{ 's :=
+ s "1" =
+ { "8" 'year.num := }
+ { s "2" =
+ { "7" 'year.num := }
+ { s "3" =
+ { "6" 'year.num := }
+ { s "4" =
+ { "5" 'year.num := }
+ { s "5" =
+ { "4" 'year.num := }
+ { s "6" =
+ { "3" 'year.num := }
+ { s "7" =
+ { "2" 'year.num := }
+ { s "8" =
+ { "1" 'year.num := }
+ { s "9" =
+ { "0" 'year.num := }
+ { s "0" =
+ { "9" 'year.num := }
+ { "9" 'year.num := }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+ year.num
+}
+
+%%% Convert year (large number -> small number)
+FUNCTION {convert.year}
+{ 't :=
+ bst.reverse.year #0 =
+ { t 'tt := }
+ { t #1 #1 substring$ reverse.num
+ t #2 #1 substring$ reverse.num *
+ t #3 #1 substring$ reverse.num *
+ t #4 #1 substring$ reverse.num * 'tt := }
+ if$
+ tt
+}
+
+%%% cyear
+FUNCTION {calc.cyear}
+{ type$ "book" =
+ type$ "inbook" =
+ or
+ 'author.editor.key.full.wo.and
+ { type$ "proceedings" =
+ 'editor.key.organization.key.full.wo.and
+ { type$ "manual" =
+ 'author.key.organization.key.full.wo.and
+ 'author.key.full.wo.and
+ if$
+ }
+ if$
+ }
+ if$
+ duplicate$
+ year empty$
+ { "2199" 'cyear := }
+ { year 'cyear := }
+ if$
+ year empty$
+ { " " "2199" convert.year * field.or.null * }
+ { " " year convert.year * field.or.null * }
+ if$
+ sortify 'sort.label :=
+ % For debug
+ econ.debug #0 = not
+ { "sort.label = ``\texttt{" write$
+ sort.label write$
+ "}''\\" write$
+ newline$
+ }
+ 'skip$
+ if$
+ pop$
+}
+
+FUNCTION {calc.sort.label.abb}
+{ author empty$
+ { editor empty$
+ { "" }
+ { editor 's := }
+ if$
+ }
+ { author 's := }
+ if$
+ s sort.format.names.abb 't :=
+ year empty$
+ { t sortify " " * "2199" convert.year * 'sort.label.abb := }
+ { t sortify " " * year convert.year * 'sort.label.abb := }
+ if$
+ econ.debug #0 = not
+ { "sort.label.abb = ``\texttt{" write$
+ sort.label.abb write$
+ "}''\\" write$
+ newline$
+ }
+ 'skip$
+ if$
+}
+
+%%% flabel
+FUNCTION {calc.flabel}
+{ type$ "book" =
+ type$ "inbook" =
+ or
+ 'author.editor.key.label.full
+ { type$ "proceedings" =
+ 'editor.key.organization.label.full
+ { type$ "manual" =
+ 'author.key.organization.label.full
+ 'author.key.label.full
+ if$
+ }
+ if$
+ }
+ if$
+ 'flabel :=
+ % For debug
+ econ.debug #0 = not
+ { "flabel = ``\texttt{" write$
+ flabel write$
+ "}''\\" write$
+ newline$
+ }
+ 'skip$
+ if$
+}
+
+%%% alabel
+FUNCTION {calc.alabel}
+{ type$ "book" =
+ type$ "inbook" =
+ or
+ 'author.editor.key.label.abb
+ { type$ "proceedings" =
+ 'editor.key.organization.label.abb
+ { type$ "manual" =
+ 'author.key.organization.label.abb
+ 'author.key.label.abb
+ if$
+ }
+ if$
+ }
+ if$
+ 'alabel :=
+ % For debug
+ econ.debug #0 = not
+ { "alabel = ``\texttt{" write$
+ alabel write$
+ "}''\\" write$
+ newline$
+ }
+ 'skip$
+ if$
+}
+
+%%% title for sorting
+FUNCTION {sort.format.title}
+{ 't :=
+ "A " #2
+ "An " #3
+ "The " #4 t chop.word
+ chop.word
+ chop.word
+ sortify
+ #1 global.max$ substring$
+}
+
+%%% author for sorting
+FUNCTION {author.sort}
+{ author empty$
+ { key empty$
+ { "to sort, need author or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { author sort.format.names }
+ if$
+}
+
+%%% editor for sorting
+FUNCTION {author.editor.sort}
+{ author empty$
+ { editor empty$
+ { key empty$
+ { "to sort, need author, editor, or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { editor sort.format.names }
+ if$
+ }
+ { author sort.format.names }
+ if$
+}
+
+FUNCTION {author.organization.sort}
+{ author empty$
+ { organization empty$
+ { key empty$
+ { "to sort, need author, organization, or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { "The " #4 organization chop.word sortify }
+ if$
+ }
+ { author sort.format.names }
+ if$
+}
+
+FUNCTION {editor.organization.sort}
+{ editor empty$
+ { organization empty$
+ { key empty$
+ { "to sort, need editor, organization, or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { "The " #4 organization chop.word sortify }
+ if$
+ }
+ { editor sort.format.names }
+ if$
+}
+
+%%% 1,...,9 -> 001,...,009
+%%% 10,...,99 -> 010,...,099
+FUNCTION {add.zero.to.number}
+{ 's :=
+ s text.length$ #1 =
+ { "00" s * }
+ { s text.length$ #2 =
+ { "0" s * }
+ { s }
+ if$
+ }
+ if$
+}
+
+%% entry type
+FUNCTION {bst.sort.entry.type.order}
+{ 'item.type :=
+ item.type "article" =
+ { "01" }
+ { item.type "book" =
+ { "02" }
+ { item.type "booklet" =
+ { "03" }
+ { item.type "comment" =
+ { "04" }
+ { item.type "conference" =
+ { "05" }
+ { item.type "inbook" =
+ { "06" }
+ { item.type "incollection" =
+ { "07" }
+ { item.type "inproceedings" =
+ { "08" }
+ { item.type "manual" =
+ { "09" }
+ { item.type "masterthesis" =
+ { "10" }
+ { item.type "misc" =
+ { "11" }
+ { item.type "phdthesis" =
+ { "12" }
+ { item.type "proceedings" =
+ { "13" }
+ { item.type "techreport" =
+ { "14" }
+ { item.type "unpublished" =
+ { "15" }
+ { "16" }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+}
+
+%%% Create sort.key$: absorder -> author -> year -> order -> month -> title.
+FUNCTION {presort.one}
+{
+ bst.no.sort #0 = not
+ { order.cited int.to.str$ add.zero.to.number " " * }
+ { "" }
+ if$
+ bst.sort.year #0 = not
+ %% Use year field as the primary sorting key.
+ { year convert.year * }
+ 'skip$
+ if$
+ bst.sort.entry.type #0 = not
+ { type$ bst.sort.entry.type.order * " " * }
+ 'skip$
+ if$
+ absorder empty$
+ { "/// " * }
+ { bst.notuse.absorder.field #0 =
+ { absorder "999" =
+ { "zzz " * }
+ { absorder add.zero.to.number "000" =
+ { "/// " * }
+ { absorder add.zero.to.number * " " * }
+ if$
+ }
+ if$
+ }
+ { "/// " * }
+ if$
+ }
+ if$
+ " " *
+ sort.label.abb *
+ " " *
+ type$ "book" = type$ "inbook" = or
+ 'author.editor.sort
+ { type$ "proceedings" =
+ 'editor.organization.sort
+ { type$ "manual" =
+ 'author.organization.sort
+ 'author.sort
+ if$
+ }
+ if$
+ }
+ if$
+ * " " *
+ " "
+ order empty$
+ { "/// " * }
+ { bst.notuse.order.field #0 =
+ { order "999" =
+ { "zzz " * }
+ { order add.zero.to.number "000" =
+ { "/// " * }
+ { order add.zero.to.number * " " * }
+ if$
+ }
+ if$
+ }
+ { "/// " * }
+ if$
+ }
+ if$
+ month empty$
+ { * "/// " * }
+ { month "999" =
+ { * month add.zero.to.number * "zzz " * }
+ { month add.zero.to.number "000" =
+ { * month add.zero.to.number * "/// " * }
+ { * month add.zero.to.number * " " * }
+ if$
+ }
+ if$
+ }
+ if$
+ title field.or.null sort.format.title
+ *
+ #1 entry.max$ substring$
+ 'sort.key$ :=
+ % For debug
+ econ.debug #0 = not
+ { "``\texttt{" write$
+ sort.key$ write$
+ "}''\\" write$
+ newline$
+ }
+ 'skip$
+ if$
+}
+
+FUNCTION {presort.two}
+{
+ bst.no.sort #0 = not
+ { order.cited int.to.str$ add.zero.to.number " " * }
+ { "" }
+ if$
+ bst.sort.year #0 = not
+ %% Use year field as the primary sorting key.
+ { year convert.year * }
+ 'skip$
+ if$
+ bst.sort.entry.type #0 = not
+ { type$ bst.sort.entry.type.order * " " * }
+ 'skip$
+ if$
+ absorder empty$
+ { "/// " * }
+ { bst.notuse.absorder.field #0 =
+ { absorder "999" =
+ { "zzz " * }
+ { absorder add.zero.to.number "000" =
+ { "/// " * }
+ { absorder add.zero.to.number * " " * }
+ if$
+ }
+ if$
+ }
+ { "/// " * }
+ if$
+ }
+ if$
+ " " * sort.label * " "
+ order empty$
+ { "/// " * }
+ { bst.notuse.order.field #0 =
+ { order "999" =
+ { "zzz " * }
+ { order add.zero.to.number "000" =
+ { "/// " * }
+ { order add.zero.to.number * " " * }
+ if$
+ }
+ if$
+ }
+ { "/// " * }
+ if$
+ }
+ if$
+ month empty$
+ { * "/// " * }
+ { month "999" =
+ { * month add.zero.to.number * "zzz " * }
+ { month add.zero.to.number "000" =
+ { * month add.zero.to.number * "/// " * }
+ { * month add.zero.to.number * " " * }
+ if$
+ }
+ if$
+ }
+ if$
+ title field.or.null sort.format.title
+ *
+ #1 entry.max$ substring$
+ 'sort.key$ :=
+ % For debug
+ econ.debug #0 = not
+ { "``\texttt{" write$
+ sort.key$ write$
+ "}''\\" write$
+ newline$
+ }
+ 'skip$
+ if$
+}
+
+%%% Codes for debugging
+FUNCTION {calc.alabel.mess}
+{ econ.debug #0 = not
+ { "\textbf{Iteration of calc.alabel: alabel = }\\" write$
+ newline$ }
+ 'skip$
+ if$
+}
+FUNCTION {calc.flabel.mess}
+{ econ.debug #0 = not
+ { "\textbf{Iteration of calc.flabel: flabel = }\\" write$
+ newline$ }
+ 'skip$
+ if$
+}
+FUNCTION {presort.one.mess}
+{ econ.debug #0 = not
+ { "\textbf{Iteration of presort (1st time): \$sort.key = }\\" write$
+ newline$ }
+ 'skip$
+ if$
+}
+
+FUNCTION {presort.two.mess}
+{ econ.debug #0 = not
+ { "\textbf{Iteration of presort (2nd time): \$sort.key = }\\" write$
+ newline$ }
+ 'skip$
+ if$
+}
+
+FUNCTION {calc.cyear.mess}
+{ econ.debug #0 = not
+ { "\textbf{Iteration of calc.cyear: sort.label = }\\" write$
+ newline$ }
+ 'skip$
+ if$
+}
+
+FUNCTION {calc.sort.label.abb.mess}
+{ econ.debug #0 = not
+ { "\textbf{Iteration of calc.sort.label.abb: sort.label.abb = }\\" write$
+ newline$ }
+ 'skip$
+ if$
+}
+
+%%% alabel
+EXECUTE {calc.alabel.mess}
+ITERATE {calc.alabel}
+
+%%% flabel
+EXECUTE {calc.flabel.mess}
+ITERATE {calc.flabel}
+
+%%% cyear and sort.label
+EXECUTE {calc.cyear.mess}
+ITERATE {calc.cyear}
+
+%%%
+EXECUTE {calc.sort.label.abb.mess}
+ITERATE {calc.sort.label.abb}
+
+%%% Sorting by $sort.key (first time)
+%
+% Sorting is done in two times. This is the first time.
+%
+EXECUTE {presort.one.mess}
+ITERATE {presort.one}
+SORT
+
+FUNCTION {forward.pass}
+{ bst.use.bysame #0 = bst.use.bysame #2 = or
+ % Not use \bysame
+ { last.sort.label sort.label.abb =
+ { last.extra.num #1 + 'last.extra.num :=
+ last.extra.num int.to.chr$ 'extra.label :=
+ }
+ { "a" chr.to.int$ 'last.extra.num :=
+ "" 'extra.label :=
+ sort.label.abb 'last.sort.label :=
+ }
+ if$
+ }
+ % Use \bysame
+ { last.sort.label sort.label.abb =
+ { last.extra.num #1 + 'last.extra.num :=
+ last.extra.num int.to.chr$ 'extra.label :=
+ }
+ { "a" chr.to.int$ 'last.extra.num :=
+ "" 'extra.label :=
+ sort.label.abb 'last.sort.label :=
+ }
+ if$
+ author empty$
+ { editor empty$
+ { "" }
+ 'format.editors.alt
+ if$
+ }
+ 'format.authors.alt
+ if$
+ 'this.author :=
+ % format.names 'this.author :=
+ this.author prev.author =
+ { "bysame" 'extra.label.bysame := }
+ { this.author "" =
+ { "abcxyz" }
+ 'this.author
+ if$
+ 'prev.author :=
+ }
+ if$
+ }
+ if$
+}
+
+FUNCTION {reverse.pass}
+{ next.extra "b" =
+ { "a" 'extra.label := }
+ 'skip$
+ if$
+ extra.label empty$ not
+ { cyear extra.label * }
+ { cyear "" * }
+ if$
+ "" field.or.null *
+ 'cyear :=
+ extra.label 'next.extra :=
+}
+
+%%% \bysame
+ITERATE {forward.pass}
+
+REVERSE {reverse.pass}
+
+%%% Sorting by sort.key$ (second time)
+EXECUTE {presort.two.mess}
+ITERATE {presort.two}
+SORT
+
+FUNCTION {reset.prev.author}
+{ "xxyyzz" 'prev.author := }
+
+EXECUTE {reset.prev.author}
+
+FUNCTION {forward.pass.two}
+{ bst.use.bysame #1 =
+ { author empty$
+ { editor empty$
+ { "" }
+ 'format.editors.alt
+ if$
+ }
+ 'format.authors.alt
+ if$
+ 'this.author :=
+ this.author prev.author =
+ { "bysame" 'extra.label.bysame := }
+ { this.author "" =
+ { "abcxyz" }
+ 'this.author
+ if$
+ 'prev.author :=
+ }
+ if$
+ }
+ 'skip$
+ if$
+}
+
+ITERATE {forward.pass.two}
+
+FUNCTION{punctuation}
+{
+ "%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%" write$ newline$
+ "% This bbl file is created by econ.bst ver." econ.version * write$ newline$
+ "% The latest econ.bst is available at" write$ newline$
+ "% <https://github.com/ShiroTakeda/econ-bst>" write$ newline$ newline$
+}
+
+EXECUTE {punctuation}
+
+FUNCTION {begin.bib}
+{
+ preamble$ empty$
+ 'skip$
+ { preamble$ write$ newline$ }
+ if$
+ bst.use.bysame #0 =
+ % Not use \bysame.
+ 'skip$
+ % Use \bysame.
+ { "%%% Definition of \bysame" write$ newline$
+ "\ifx\undefined\bysame" write$ newline$
+ "\newcommand{\bysame}{" bst.bysame.definition * "}" *
+ write$ newline$
+ "\fi" write$ newline$ newline$ }
+ if$
+ %% When number index is attached to the beginning of each item.
+ bst.use.number.index #0 =
+ 'skip$
+ { bst.number.index.digit "1" =
+ % one digit.
+ { bst.number.index.bibhang.one }
+ { bst.number.index.digit "2" =
+ % two digits.
+ { bst.number.index.bibhang.ten }
+ % three or more digits.
+ { bst.number.index.bibhang.hund }
+ if$
+ }
+ if$
+ 'hang :=
+ "%%% Redefinition of \bibhang" write$ newline$
+ "\ifx\undefined\bibhang" write$ newline$
+ "\relax" write$ newline$
+ "\else" write$ newline$
+ "\setlength{\bibhang}{"
+ hang * "}" * write$ newline$
+ "\fi" write$ newline$ newline$
+ }
+ if$
+ "\begin{thebibliography}{xxx}" write$ newline$
+
+ %% Initialize the variable `index'.
+ #0 'index :=
+}
+
+FUNCTION {end.bib}
+{ newline$ "\end{thebibliography}" write$ newline$ }
+
+EXECUTE {begin.bib}
+
+EXECUTE {init.state.consts}
+
+ITERATE {call.type$}
+
+EXECUTE {end.bib}
+
+% --------------------
+% Local Variables:
+% fill-column: 78
+% mode: bst
+% End:
diff --git a/biblio/bibtex/contrib/econ-bst/customization/econ-aer.pdf b/biblio/bibtex/contrib/econ-bst/customization/econ-aer.pdf
new file mode 100644
index 0000000000..6bd2af9835
--- /dev/null
+++ b/biblio/bibtex/contrib/econ-bst/customization/econ-aer.pdf
Binary files differ
diff --git a/biblio/bibtex/contrib/econ-bst/customization/econ-aer.tex b/biblio/bibtex/contrib/econ-bst/customization/econ-aer.tex
new file mode 100644
index 0000000000..00ba236e95
--- /dev/null
+++ b/biblio/bibtex/contrib/econ-bst/customization/econ-aer.tex
@@ -0,0 +1,55 @@
+%#!pdflatex
+%#BIBTEX bibtex econ-aer
+
+%############################## Main #################################
+\documentclass[10pt]{article}
+
+%% Use natbib.sty
+\usepackage{natbib}
+\usepackage{mathpazo}
+\usepackage{url}
+\usepackage{graphicx}
+\usepackage{color}
+\definecolor{MyBrown}{rgb}{0.3,0,0}
+\definecolor{MyBlue}{rgb}{0,0,0.3}
+\definecolor{MyRed}{rgb}{0.4,0,0.1}
+\definecolor{MyGreen}{rgb}{0,0.4,0}
+\usepackage[bookmarks=true,%
+bookmarksnumbered=true,%
+colorlinks=true,%
+linkcolor=MyBlue,%
+citecolor=MyRed,%
+filecolor=MyBlue,%
+urlcolor=MyGreen%
+]{hyperref}
+
+\setlength{\topmargin}{-20pt}
+\setlength{\textheight}{648pt}
+\setlength{\oddsidemargin}{15pt}
+\setlength{\textwidth}{440pt}
+
+%#####################################################################
+%######################### Document Starts ###########################
+%#####################################################################
+\begin{document}
+
+This document uses ``\verb|econ-aer.bst|''. The style like AER ({\itshape American Economic Review}).
+
+\vspace{1em}
+
+\input{cited-part}
+\nocite{*}
+
+%% bst file:
+\bibliographystyle{econ-aer}
+\bibliography{../econ-example}
+
+\end{document}
+
+%#####################################################################
+%######################### Document Ends #############################
+%#####################################################################
+% --------------------
+% Local Variables:
+% fill-column: 80
+% End:
diff --git a/biblio/bibtex/contrib/econ-bst/customization/econ-b.bst b/biblio/bibtex/contrib/econ-bst/customization/econ-b.bst
new file mode 100644
index 0000000000..bba236ac1d
--- /dev/null
+++ b/biblio/bibtex/contrib/econ-bst/customization/econ-b.bst
@@ -0,0 +1,3544 @@
+%% econ.bst: BibTeX style file for papers in economics.
+%
+% Author: Shiro Takeda
+% Maintainer: Shiro Takeda
+% Copyright (C) 2001-2018 Shiro Takeda
+% First-written: <2007/07/28>
+% Time-stamp: <2018-12-07 18:49:15 st>
+% Version: 2.5
+% Keywords: TeX, BibTeX, bst
+% URL: https://github.com/ShiroTakeda/econ-bst
+
+% This work may be distributed and/or modified under the
+% conditions of the LaTeX Project Public License, either version 1.3
+% of this license or (at your option) any later version.
+% The latest version of this license is in
+% http://www.latex-project.org/lppl.txt
+% and version 1.3 or later is part of all distributions of LaTeX
+% version 2005/12/01 or later.
+%
+% This work has the LPPL maintenance status "maintained".
+%
+% The Current Maintainer of this work is Shiro Takeda.
+
+%% Main features of econ.bst.
+
+% "econ.bst" is a BibTeX style file for economics. It provids the following
+% features:
+
+% 1) The author-year type citation (you need "natbib.sty" as well).
+% 2) Reference style used in economics papers ("econ.bst" is not a BibTeX style
+% for a specific journal).
+% 3) Highly customizable. You can easily customize reference style as you wish.
+% 4) You can use "certified random order" proposed by Ray ⓡ Robson (2018)
+% (http://dx.doi.org/10.1257/aer.20161492).
+
+% Bug reports, requests and suggestions are welcome.
+
+% For changelogs, see CHANGES.txt file.
+
+% version number
+FUNCTION {econ.version} { "2.5" }
+
+% Debug mode. Non-zero makes debug mode on.
+FUNCTION {econ.debug}
+{ #0 } % Debug mode off (default).
+% { #1 } % Debug mode on.
+
+ENTRY
+ %%% Declaration of field
+ { access address author booktitle chapter doi edition editor howpublished
+ institution journal key month note number organization pages publisher
+ school series title type url volume year
+ % Fields specific to econ.bst
+ order absorder nameorder
+ }
+
+ % Definition of entry variable. The entry variable is a variable which has
+ % different values according to different entries.
+ %% Integer entry variable:
+ { order.cited }
+
+ %% String entry variable
+ { label cyear flabel alabel extra.label sort.label sort.label.abb
+ extra.label.bysame nameorder.temp }
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%%
+%% Functions for customization:
+%%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+% Use \bysame or not.
+%
+% If set to #0, \bysame is not used.
+% If set to #1, \bysame is used
+% If set to #2, \bysame is used (alternative abbreviation style).
+%
+% Note that integer number is expressed as # + integer in bst file.
+% \bysame is the function that abbreviates succession of the same authors' name by ---.
+%
+% See econ-sample.pdf for details.
+%
+FUNCTION {bst.use.bysame}
+% { #0 } % Not use \bysame
+% { #1 } % -> Use \bysame (default)
+{ #2 } % -> Use \bysame of alternative style.
+
+% The definition of \bysame command.
+%
+FUNCTION {bst.bysame.definition}
+% { "\hskip.3em \leavevmode\rule[.5ex]{3em}{.3pt}\hskip0.5em" } % (default)
+{ "\leavevmode\hbox to\leftmargin{\hrulefill\,\,}" } % If you set #2 to bst.use.bysame, use this.
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+% The order of fist and last name.
+%
+FUNCTION {bst.author.name}
+{ #0 } % (default)
+% { #1 }
+% { #2 }
+
+% Case of #0: First author -> last-first, other authors -> first-last.
+% Fujita, Masahisa, Paul R. Krugman, and Anthony J. Venables.
+
+% Case of #1: All authors -> last-first
+% Fujita, Masahisa, Krugman, Paul R., and Venables, Anthony J.
+
+% Case of #2: All authors -> first-last
+% Masahisa Fujita, Paul R. Krugman, and Anthony J. Venables.
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+% Abbreviate first name of authors (editors):
+%
+FUNCTION {bst.first.name.initial}
+{ #0 } % #0 -> full letters (default).
+% { #1 } % Non-zero -> initial letter only.
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+% Decapitalize of strings in title field.
+%
+FUNCTION {bst.title.lower.case}
+{ #0 } % If #0, not decapitalize title (default).
+% { #1 } % If non-#0, decapitalize title
+
+% Hide title filed.
+%
+FUNCTION {bst.hide.title}
+{ #0 } % #0 -> Title field is displayed (default)
+% { #1 } % Non-zer -> Title field is hidden
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+% Hide month.
+%
+FUNCTION {bst.hide.month}
+{ #0 } % #0 -> show month field (default).
+% { #1 } % non-#0 -> hide month field.
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+% Attach number index like plain.bst.
+%
+FUNCTION {bst.use.number.index}
+% { #0 } % Not use number index (default).
+{ #1 } % Non-#0 -> Use number index
+
+% The string before number index:
+%
+FUNCTION {bst.number.index.pre}
+{ "[" } % (default)
+
+% The string after number index. Adjustment is recommended.
+%
+FUNCTION {bst.number.index.post}
+{ "]\hskip1.0em " } % (default)
+
+% Maximum digit of number index:
+% If the number of reference items >= 100, set 3 to this function.
+% If the number of reference items < 100, set 2 to this function.
+% If the number of reference items < 10, set 1 to this function.
+%
+FUNCTION {bst.number.index.digit}
+{ "2" } % (default)
+% { "3" }
+
+% The functions below are used to adjust space and postion. If you use fonts
+% other than computer modern fonts, you had better make adjustments.
+%
+% Setting for bst.number.index.digit = 1:
+FUNCTION {bst.number.index.bibhang.one}
+{ "2.19em" }
+% { "2.05em" } % (default)
+% Setting for bst.number.index.digit = 2:
+FUNCTION {bst.number.index.bibhang.ten}
+{ "2.69em" }
+% { "2.55em" } % (default)
+% Setting for bst.number.index.digit = 3:
+FUNCTION {bst.number.index.bibhang.hund}
+{ "3.19em" }
+% { "3.05em" } % (default).
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+% Position of "year":
+%
+% You can choose the position of year by this function.
+%
+% If set to #0, year is placed right after "author".
+% If set to non-zero, year is placed at the end (before note field) except for
+% aritcle type entry.
+%
+% In article type entry, the position of year changes according to the
+% following rule:
+%
+% #1 -> year is placed at the end.
+% #2 -> year is placed after journal name in aritcle type entry.
+% #3 -> year is placed after volume in aritcle type entry.
+%
+FUNCTION {bst.year.position}
+% { #0 } % (default).
+{ #1 } % Last place before note.
+% { #2 } % After journal name for aticle type entry.
+% { #3 } % After volume for aticle type entry.
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+% If 0, references are sorted by old documents -> recent documents. If
+% non-zero, reverse order.
+FUNCTION {bst.reverse.year}
+{ #0 } % Normal order (old -> recent) (default).
+% { #1 } % inverse order (recent -> old)
+
+% If non-zero, sort references by using year field as the primary key
+% (chronological sorting).
+FUNCTION {bst.sort.year}
+{ #0 } % Normal case: year is used as the sorting key next to author (default).
+% { #1 } % year is used as the primary sorting key.
+
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+% If non-zero, references are listed in citation order.
+%
+FUNCTION {bst.no.sort}
+{ #0 } % (default)
+% { #1 } % listed in citation order.
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+% Non-zero -> sort references by entry type (article, book, incollection etc.)
+%
+FUNCTION {bst.sort.entry.type}
+{ #0 } % #0 -> Normal (not sort references by entry type) (default).
+% { #1 } % Non-zero -> sort references by entry type.
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+% 0 -> use absorder field to sort items. Otherwise, ignore absorder field.
+%
+FUNCTION {bst.notuse.absorder.field}
+{ #0 } % #0 -> Use absorder (default).
+% { #1 } % Non-#0 -> Not use absorder.
+%
+% Order of priority to sort items
+%
+% absorder -> author -> year -> order -> month -> title
+%
+% wehre absorder and order fields are specific to econ.bst.
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+% 0 -> use order field to sort items. Otherwise, ignore order field.
+% Note: order field is specific to econ.bst.
+FUNCTION {bst.notuse.order.field}
+{ #0 } % #0 -> Use order field (default).
+% { #1 } % Non-#0 -> not use order field.
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%%% and
+
+%%% String used to separate author names in references.
+%
+% String replaced with _ in "Mr. A _ Mr. B "
+%
+FUNCTION {bst.and}
+{ " \& " }
+% { " and " } % (default)
+
+%%% String used to separate author names in references (more than two authors).
+%
+% String replaced with _ in "Mr. A, Mr. B _ Mr. C"
+%
+FUNCTION {bst.ands}
+{ ", \& " }
+% { ", and " } % (default)
+
+%%% String used to separate author names in citation part.
+%
+% String replaced with _ in "Mr. A _ Mr. B "
+%
+FUNCTION {bst.cite.and}
+{ " \& " }
+% { " and " } % (default)
+
+%%% String used to separate author names in citation part (more than two authors).
+%
+% String replaced with _ in "Mr. A, Mr. B _ Mr. C"
+%
+FUNCTION {bst.cite.ands}
+{ " and " } % (default)
+
+%%% If you want to use random author order for some bibliography entries, set
+% non-zero to this function.
+%
+FUNCTION {bst.use.nameorder}
+{ #1 } % Use random order (default)
+% { #0 } % Not use random order
+
+%%% String used to separate author names in references for the entry of random
+% author order.
+%
+FUNCTION {bst.and.nameorder}
+{ " \textcircled{r} " } % (default)
+
+%%% String used to separate author names in citation part for the entry of
+% random author order
+%
+FUNCTION {bst.cite.and.nameorder}
+{ " \textcircled{r} " } % (default)
+
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+% Author names in the citation part are abbreviated by et al. if the number of
+% authors is greater or equal to bst.and.others.num.
+FUNCTION {bst.and.others.num}
+% { #3 } % If the number of authors is greater or equal to three (default).
+{ #4 }
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+% Strings used when abbreviating multiple-authors in citation part.
+FUNCTION {bst.and.others}
+{ " et~al." } % (default)
+
+% Strings used when abbreviating multiple-authors in citation part for entries
+% with random author order.
+FUNCTION {bst.and.others.nameorder}
+{ " \textcircled{r}~al." } % (default)
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% author
+
+% The string before author:
+%
+FUNCTION {bst.author.pre}
+{ "\textsc{" }
+% { "" } % (default)
+
+% The string after author:
+%
+FUNCTION {bst.author.post}
+{ "}, " }
+% { "" } % (default)
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% year
+
+% The string before year only for aritcle type entry.
+%
+FUNCTION {bst.year.pre}
+{ ", \textit{" }
+% { " (" } % (default)
+
+% The string after year only for aritcle type entry.
+%
+FUNCTION {bst.year.post}
+{ "}" }
+% { ") " } % (default)
+
+% The string after year for non-article type entry (book, incollection etc)
+%
+FUNCTION {bst.year.na.pre}
+{ ", \textit{" }
+% { " (" } % (default)
+
+% The string after year for non-article type entry (book, incollection etc)
+%
+FUNCTION {bst.year.na.post}
+{ "}" }
+% { ") " } % (default)
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% title (except for title in book)
+
+% The string before title:
+%
+FUNCTION {bst.title.pre}
+{ "`" }
+% { "``" } % (default)
+
+% The string after title:
+%
+FUNCTION {bst.title.post}
+{ ".'" }
+% { ",''" } % (default)
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% tile for book:
+
+% The string before book title:
+%
+FUNCTION {bst.book.pre}
+{ " \textit{" } % (default)
+
+% The string after book title:
+%
+FUNCTION {bst.book.post}
+{ "}" } % (default)
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% booktitle
+
+% The string before booktitle:
+%
+FUNCTION {bst.btitle.pre}
+{ " \textit{" } % (default)
+
+% The string after booktitle:
+%
+FUNCTION {bst.btitle.post}
+{ "}" } % (default)
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% journal name
+
+% The string before journal name:
+%
+FUNCTION {bst.journal.pre}
+{ " \textit{" } % (default)
+
+% The string after journal name:
+%
+FUNCTION {bst.journal.post}
+{ "}" } % (default)
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% editor notation:
+
+% The string that indicates multiple editors:
+%
+FUNCTION {bst.editors}
+{ " (eds.) " }
+% { " eds. " } % (default)
+
+% The string that indicates single editor:
+%
+FUNCTION {bst.editor}
+{ " ed. " } % (default)
+
+% Order of editor and booktitle in incollection and inproceedings entries.
+%
+% If set to #0: editors -> booktitle order
+% If set to non-zero: booktitle -> editors order
+%
+FUNCTION {bst.editor.btitle.order}
+{ #0 } % (default)
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% edition
+
+% The string before edition:
+%
+FUNCTION {bst.edition.pre}
+{ ", " } % (default)
+
+% The string after edition:
+%
+FUNCTION {bst.edition.post}
+{ " edition" } % (default)
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% volume
+
+% The string before volume:
+%
+FUNCTION {bst.volume.pre}
+{ ", \textbf{" }
+% { ", Vol. " } % (default)
+
+% The string after volume:
+%
+FUNCTION {bst.volume.post}
+{ "}" }
+% { "" } % (default)
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% number
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+% Hide number. If non-zero, number is suppressed.
+FUNCTION {bst.hide.number}
+{ #0 } % #0 -> show number field (default)
+% { #1 } % non-#0 -> Hide number field.
+
+% The string before number:
+%
+FUNCTION {bst.number.pre}
+{ " (" }
+% { ", No. " } % (default)
+
+% The string after number:
+%
+FUNCTION {bst.number.post}
+{ ")" }
+% { "" } % (default)
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% in
+
+% In
+%
+FUNCTION {bst.in}
+{ " In " }
+% { " in " } % (default)
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% page
+
+% The string before page (multiple pages):
+%
+FUNCTION {bst.pages.pre}
+{ ", pp." } % (default)
+
+% The string before page:
+%
+FUNCTION {bst.page.pre}
+{ ", p." } % (default)
+
+% The string after page (multiple pages):
+%
+FUNCTION {bst.pages.post}
+{ "" } % (default)
+
+% The string after page:
+%
+FUNCTION {bst.page.post}
+{ "" } % (default)
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% chapter
+
+% The string before chapter:
+%
+FUNCTION {bst.chapter.pre}
+{ ", Chapter" }
+% { ", Chap." } % (default)
+
+% The string after chapter:
+%
+FUNCTION {bst.chapter.post}
+{ "" } % (default)
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% month
+
+% The string before month:
+%
+FUNCTION {bst.month.pre}
+{ ", " } % (default)
+
+% The string after month:
+%
+FUNCTION {bst.month.post}
+{ "" } % (default)
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% address
+% The string before address:
+%
+FUNCTION {bst.address.pre}
+{ ", " } % (default)
+
+% The string after address:
+%
+FUNCTION {bst.address.post}
+{ "" } % (default)
+
+% You can choose the order of address and publisher by this function.
+%
+% If #0, address -> publisher order (the default value).
+% If non-zero, publisher -> address order.
+
+FUNCTION {bst.address.position}
+{ #0 } % Address is placed before publisher (default)
+% { #1 } % Address is placed after publisher
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% publisher
+
+% The string before publisher:
+%
+FUNCTION {bst.publisher.pre}
+{ ": " } % (default)
+
+% The string after publisher:
+%
+FUNCTION {bst.publisher.post}
+{ "" } % (default)
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% series
+
+% The string before series:
+%
+FUNCTION {bst.series.pre}
+{ ", " } % (default)
+
+% The string after series:
+%
+FUNCTION {bst.series.post}
+{ "" } % (default)
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% organization
+
+% The string before organization:
+%
+FUNCTION {bst.organization.pre}
+{ ", " } % (default)
+
+% The string after organization:
+%
+FUNCTION {bst.organization.post}
+{ "" } % (default)
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% school
+
+% The string before school:
+%
+FUNCTION {bst.school.pre}
+{ ", " } % (default)
+
+% The string after school:
+%
+FUNCTION {bst.school.post}
+{ "" } % (default)
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% institution
+
+% The string before institution:
+%
+FUNCTION {bst.institution.pre}
+{ ", " } % (default)
+
+% The string after institution:
+%
+FUNCTION {bst.institution.post}
+{ "" } % (default)
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% howpublished
+
+% The string before howpublished:
+%
+FUNCTION {bst.howpublished.pre}
+{ " " } % (default)
+
+% The string after howpublished:
+%
+FUNCTION {bst.howpublished.post}
+{ "" } % (default)
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% url
+
+% Show or Hide url. If non-zero, url is displayed. Otherwise, url is suppressed.
+FUNCTION {bst.show.url}
+{ #1 } % non-#0 -> Show url field (default)
+% { #0 } % #0 -> Not show url field.
+
+% The string before url:
+%
+FUNCTION {bst.url.pre}
+{ ", URL: \url{" } % (default)
+
+% The string after url:
+%
+FUNCTION {bst.url.post}
+{ "}" } % (default)
+
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% Access
+
+% This setting is valid only if there are "access" field in bib
+% files. The value of access field indicates accessed date for URL.
+
+% The string before access.
+FUNCTION {bst.access.pre}
+% { ", accessed on " } % (default)
+{ " (accessed on " }
+
+% The string after access.
+FUNCTION {bst.access.post}
+% { "" } % (default)
+{ ")" }
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% DOI (digital object identifier)
+
+% This setting is valid only if there are "doi" field in bib files.
+
+% Show or Hide DOI. If non-zero, DOI is displayed. Otherwise, DOI is suppressed.
+FUNCTION {bst.show.doi}
+{ #1 } % non-#0 -> Show DOI field (default)
+% { #0 } % #0 -> Not show DOI field.
+
+% The string before DOI:
+%
+FUNCTION {bst.doi.pre}
+{ ", DOI: \href{http://dx.doi.org/" doi * "}{" * } % (default)
+
+% The string after DOI:
+%
+FUNCTION {bst.doi.post}
+{ "}" } % (default)
+
+% How to show URL and DOI fields when both fields exist.
+%
+% #0 -> Both fields are displayed
+% #1 -> Only URL field is displayed
+% #2 -> Only DOI field is displayed
+%
+FUNCTION {bst.url.doi}
+% { #0 } % (default) -> Both fields are displayed
+% { #1 } % -> Only URL field is displayed
+{ #2 } % -> Only DOI field is displayed
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% Other functions:
+
+% The string before note.
+FUNCTION {bst.note.pre}
+{ ", " } % (default)
+
+% The string after note.
+FUNCTION {bst.note.post}
+{ "" } % (default)
+
+% The string that represents Technical report:
+%
+FUNCTION {bst.techrep}
+{ " Tech. Rep." } % (default)
+
+% The string that represents master thesis:
+%
+FUNCTION {bst.mthesis}
+{ " Master's thesis" } % (default)
+
+% The string that represents phd thesis:
+%
+FUNCTION {bst.phdthesis}
+{ " Ph.D. dissertation" } % (default)
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%%
+%% Functions for customization end here:
+%%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+FUNCTION {bst.first}
+{ "1st" }
+
+FUNCTION {bst.second}
+{ "2nd" }
+
+FUNCTION {bst.third}
+{ "3rd" }
+
+FUNCTION {bst.fourth}
+{ "4th" }
+
+FUNCTION {bst.fifth}
+{ "5th" }
+
+FUNCTION {bst.st}
+{ "st" }
+
+FUNCTION {bst.nd}
+{ "nd" }
+
+FUNCTION {bst.rd}
+{ "rd" }
+
+FUNCTION {bst.th}
+{ "th" }
+
+%%%%% memo by Takeda
+
+% "a" 'b := indicates substituting string "a" for variable b.
+
+% Integer number #0, #1,...
+
+%%% Function definition:
+%
+% FUNCTION {name}
+% { 's :=
+%
+% }
+%
+% This is the definition of a function named "name". The function "name" is
+% used in the following way
+%
+% "foo" name
+% "foo" is an argument for the function "name".
+%
+% About the definition of a function with more than two arguments, see the
+% definition of "chop.word".
+
+%%% Declaration of variables:
+
+%% String global variables:
+STRINGS { s t tt }
+STRINGS { year.num }
+STRINGS { preone preten }
+STRINGS { last.sort.label next.extra prev.author prev.author.aer this.author }
+STRINGS { hang }
+STRINGS { item.type }
+STRINGS { tempa tempb }
+
+%% Integer global variables:
+INTEGERS { nameptr namesleft numnames name.num }
+INTEGERS { multiresult }
+INTEGERS { index }
+INTEGERS { len }
+INTEGERS { last.extra.num }
+INTEGERS { output.state before.all mid.sentence after.sentence after.block }
+INTEGERS { last.period.comma }
+INTEGERS { len1.aer len2.aer i.aer }
+
+%%% Definition of functions:
+FUNCTION {not}
+{ { #0 }
+ { #1 }
+ if$
+}
+
+FUNCTION {and}
+{ 'skip$
+ { pop$ #0 }
+ if$
+}
+
+FUNCTION {or}
+{ { pop$ #1 }
+ 'skip$
+ if$
+}
+
+%%% Initialize variables:
+FUNCTION {init.state.consts}
+{ #0 'before.all :=
+ #1 'mid.sentence :=
+ #2 'after.sentence :=
+ #3 'after.block :=
+}
+
+%%% Remove comma and add period:
+%
+%%%
+FUNCTION {add.period.x}
+{ duplicate$
+ #-1 #1 substring$ "," =
+ { #-2 global.max$ substring$ "." * }
+ { duplicate$
+ #-1 #2 substring$ ". " =
+ { #-3 global.max$ substring$ "." * }
+ { duplicate$
+ #-1 #2 substring$ ", " =
+ { #-3 global.max$ substring$ "." * }
+ { duplicate$
+ #-1 #2 substring$ ",'" =
+ { #-3 global.max$ substring$ ".'" * }
+ { duplicate$
+ #-1 #2 substring$ ".'" =
+ { #-3 global.max$ substring$ ".'" * }
+ { duplicate$
+ #-1 #2 substring$ ".~" =
+ { #-3 global.max$ substring$ ".~" * }
+ { duplicate$
+ #-1 #2 substring$ ",~" =
+ { #-3 global.max$ substring$ ".~" * }
+ { duplicate$
+ #-1 #3 substring$ ",''" =
+ { #-4 global.max$ substring$ ".''" * }
+ { duplicate$
+ #-1 #3 substring$ ".''" =
+ { #-4 global.max$ substring$ ".''" * }
+ { add.period$ }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+}
+
+FUNCTION {output.nonnull}
+{ 's :=
+ % mid.sentence
+ output.state mid.sentence =
+ { ", " * write$ }
+ % not mid.sentence
+ { output.state after.block =
+ % after.block
+ { add.period.x " " * write$ }
+ % before.all
+ { output.state before.all =
+ 'write$
+ { add.period.x " " * write$ }
+ if$
+ }
+ if$
+ % not mid.sentence, set to mid.sentence
+ mid.sentence 'output.state :=
+ }
+ if$
+ s
+}
+
+%%% If the last character is period or comma, set non-zero to
+%%% last.period.comma.
+FUNCTION {period.comma.p}
+{ duplicate$ 't :=
+ t #-1 #1 substring$ "." =
+ t #-1 #1 substring$ "," = or
+ t #-1 #1 substring$ ":" = or
+ t #-1 #2 substring$ ".'" = or
+ t #-1 #2 substring$ ",'" = or
+ t #-1 #3 substring$ ".''" = or
+ t #-1 #3 substring$ ",''" = or
+ t #-1 #2 substring$ ".~" = or
+ t #-1 #2 substring$ ",~" = or
+ { #1 'last.period.comma := }
+ { #0 'last.period.comma := }
+ if$
+}
+
+%%% remove unnecessary comma.
+FUNCTION {remove.pre.comma}
+{ 's :=
+ s empty$
+ { "" }
+ { s #1 #1 substring$ "," =
+ { s #2 global.max$ substring$ }
+ { s #1 #1 substring$ "." =
+ { s #2 global.max$ substring$ }
+ 's
+ if$
+ }
+ if$
+ }
+ if$
+}
+
+%%% output.nonnull.nocomma is the same as output.nonnull except that it does
+%%% not add commas even in mid.sentence.
+FUNCTION {output.nonnull.nocomma}
+{ 's :=
+ output.state mid.sentence =
+ % mid.sentence
+ { period.comma.p "" * write$ }
+
+ % not mid.sentence
+ { output.state after.block =
+ % after.block
+ { add.period.x " " * write$ }
+ % before.all
+ { output.state before.all =
+ 'write$
+ { add.period$ " " * write$ }
+ if$
+ }
+ if$
+ mid.sentence 'output.state :=
+ }
+ if$
+ last.period.comma #0 =
+ { s }
+ { s remove.pre.comma }
+ if$
+}
+
+% Not used in the current econ.bst.
+% FUNCTION {output}
+% { duplicate$ empty$
+% 'pop$
+% 'output.nonnull
+% if$
+% }
+
+FUNCTION {output.nocomma}
+{ duplicate$ empty$
+ 'pop$
+ 'output.nonnull.nocomma
+ if$
+}
+
+% Not used in the current econ.bst.
+% FUNCTION {output.check}
+% { 't :=
+% duplicate$ empty$
+% { pop$ "empty " t * " in " * cite$ * warning$ }
+% 'output.nonnull
+% if$
+% }
+
+FUNCTION {output.check.nocomma}
+{ 't :=
+ duplicate$ empty$
+ { pop$ "empty " t * " in " * cite$ * warning$ }
+ 'output.nonnull.nocomma
+ if$
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%%% Format in bbl file:
+
+% \harvarditem[Brezis et~al.]{Brezis, Krugman and
+% Tsiddon}{1993}{brezis93:_leapf_inter_compet}
+% Brezis, Elise~S., Paul~R. Krugman, and Daniel Tsiddon (1993) ``Leapfrogging in
+% International Competition: A Theory of Cycles in National Technological
+% Leadership.'', {\em American Economic Review.}, Vol.~83. No.~5. pp.
+% 1211--1219.
+
+% \harvarditem[abbreviated citation]{full citation}{year}{keyword} ...
+
+%%% Add period and newline.
+FUNCTION {fin.entry}
+{ add.period.x
+ write$
+ newline$
+}
+
+FUNCTION {new.block}
+{ output.state before.all =
+ 'skip$
+ { after.block 'output.state := }
+ if$
+}
+
+FUNCTION {new.sentence}
+{ output.state after.block =
+ 'skip$
+ { output.state before.all =
+ 'skip$
+ { after.sentence 'output.state := }
+ if$
+ }
+ if$
+}
+
+FUNCTION {new.block.check}
+{ empty$
+ 'skip$
+ 'new.block
+ if$
+}
+
+FUNCTION {field.or.null}
+{ duplicate$ empty$
+ { pop$ "" }
+ 'skip$
+ if$
+}
+
+%%% booktitle
+FUNCTION {format.btitle}
+{ booktitle empty$
+ { "" }
+ { bst.btitle.pre booktitle * bst.btitle.post * }
+ if$
+}
+
+%%% journal
+FUNCTION {format.journal}
+{ journal empty$
+ { "" }
+ { bst.journal.pre journal * bst.journal.post * }
+ if$
+}
+
+%%% title for book
+FUNCTION {format.book}
+{ title empty$
+ { "" }
+ { bst.book.pre title * bst.book.post * }
+ if$
+}
+
+FUNCTION {format.url}
+{ url empty$
+ { "" }
+ { type$ "online" = bst.show.url or
+ { bst.url.pre url * bst.url.post *
+ access empty$
+ { "" * }
+ { bst.access.pre * access * bst.access.post * }
+ if$
+ }
+ { "" }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.doi}
+{ doi empty$ bst.show.doi not or
+ { "" }
+ { bst.doi.pre doi * bst.doi.post * }
+ if$
+}
+
+FUNCTION {format.url.doi}
+{ url empty$
+ { format.doi }
+ { doi empty$
+ { format.url }
+ { bst.url.doi #0 =
+ { format.url output.nocomma
+ format.doi }
+ { bst.url.doi #1 =
+ { format.url }
+ { format.doi }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+}
+
+%%% and others
+FUNCTION {bst.and.others.output}
+{ nameorder.temp "random" =
+ bst.use.nameorder #0 = not and
+ { bst.and.others.nameorder }
+ { bst.and.others }
+ if$
+}
+
+%%% author and editor
+
+%%% name
+FUNCTION {format.names}
+{ 's :=
+ % insert 1 to nameptr.
+ #1 'nameptr :=
+ % Set the number of authors to numnames.
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ % Repeat if namesleft > 0
+ { namesleft #0 > }
+ { nameptr #1 =
+ % First author
+ { bst.author.name #0 =
+ bst.author.name #1 =
+ or
+ { bst.first.name.initial #0 =
+ { s nameptr "{vv~}{ll}{, ff}{, jj}" format.name$ 't := }
+ { s nameptr "{vv~}{ll}{, f.}{, jj}" format.name$ 't := }
+ if$
+ }
+ { bst.first.name.initial #0 =
+ { s nameptr "{ff~}{vv~}{ll}{, jj}" format.name$ 't := }
+ { s nameptr "{f.~}{vv~}{ll}{, jj}" format.name$ 't := }
+ if$
+ }
+ if$
+ }
+ % The second or later authors
+ { bst.author.name #0 =
+ bst.author.name #2 =
+ or
+ { bst.first.name.initial #0 =
+ { s nameptr "{ff~}{vv~}{ll}{, jj}" format.name$ 't := }
+ { s nameptr "{f.~}{vv~}{ll}{, jj}" format.name$ 't := }
+ if$
+ }
+ { bst.first.name.initial #0 =
+ { s nameptr "{vv~}{ll}{, ff}{, jj}" format.name$ 't := }
+ { s nameptr "{vv~}{ll}{, f.}{, jj}" format.name$ 't := }
+ if$
+ }
+ if$
+ }
+ if$
+
+ nameptr #1 >
+ % The second or later authors
+ { nameorder.temp "random" =
+ bst.use.nameorder #0 = not and
+ { bst.and.nameorder * t * }
+ { namesleft #1 >
+ % More than one authors left
+ { ", " * t * }
+ % Only one author left
+ { t "others" =
+ { bst.and.others.output * }
+ { numnames #2 =
+ % Entry with two authors
+ { bst.and * t * }
+ { bst.ands * t * }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ 't
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+}
+
+% remove successive periods (commas) from author
+FUNCTION {remove.ss.period.auth}
+{ 's :=
+ s format.names 'tempa :=
+ bst.author.post 'tempb :=
+ tempb #1 #1 substring$ "}" =
+ { tempa tempb * }
+ { tempa #-1 #1 substring$ tempb #1 #1 substring$ =
+ { tempa tempb #2 global.max$ substring$ * }
+ { tempa tempb * }
+ if$
+ }
+ if$
+}
+
+% <prev name list> <new name list> compare.names <modified name list>
+FUNCTION {compare.names.aer}
+{ 's :=
+ 'tempa :=
+
+% "current.author = " s * "\\" * write$ newline$
+% "prev.author = " tempa * "\\" * write$ newline$
+
+ tempa num.names$ 'len1.aer := % len1 = the number of previous authors
+ s num.names$ 'len2.aer := % len2 = the number of current authors
+
+% len1.aer := min(len1.aer,len2.aer)
+% len1 -> min{ the number of previous authors, the number of current authors }
+ len1.aer len2.aer >
+ { len2.aer 'len1.aer := }
+ { }
+ if$
+
+% start with an empty string, then while the components are the same
+% add "\bysame"
+ ""
+ #1 'i.aer :=
+
+ { i.aer len1.aer > not }
+ { tempa i.aer "{ff }{vv }{ll}{ jj}" format.name$
+ s i.aer "{ff }{vv }{ll}{ jj}" format.name$
+ =
+ { #1 i.aer <
+ { " and " * } % \bysame で省略する著者の前につく and
+ { }
+ if$
+ "\bysame{}" *
+ i.aer #1 + 'i.aer := }
+ { #-1 'len1.aer := }
+ if$
+ }
+ while$
+
+% add the rest of the second string
+ { i.aer len2.aer > not }
+ { #1 i.aer <
+ { " and " * }
+ { }
+ if$
+ s i.aer "{ff }{vv }{ll}{ jj}" format.name$ *
+ i.aer #1 + 'i.aer :=
+ }
+ while$
+}
+
+%%% author
+FUNCTION {format.authors}
+{ author empty$
+ { "" }
+ { bst.use.bysame #2 =
+ { prev.author.aer author compare.names.aer 's :=
+ author 'prev.author.aer := }
+ { author 's := }
+ if$
+ extra.label.bysame "bysame" =
+ { "\bysame " }
+ { bst.author.pre s remove.ss.period.auth * }
+ if$
+ }
+ if$
+}
+
+%%% editor
+FUNCTION {format.editors}
+{ editor empty$
+ { "" }
+ { bst.use.bysame #2 =
+ { prev.author.aer editor compare.names.aer 's :=
+ editor 'prev.author.aer := }
+ { editor 's := }
+ if$
+ extra.label.bysame "bysame" =
+ { "\bysame " }
+ { bst.author.pre s remove.ss.period.auth * }
+ if$
+ s num.names$ #1 >
+ { bst.editors * }
+ { bst.editor * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.authors.alt}
+{ author empty$
+ { "" }
+ { extra.label.bysame "bysame" =
+ {"\bysame "}
+ { bst.author.pre author remove.ss.period.auth * }
+ if$
+ }
+ if$
+}
+
+%%% editor
+FUNCTION {format.editors.alt}
+{ editor empty$
+ { "" }
+ { extra.label.bysame "bysame" =
+ { "\bysame " }
+ { bst.author.pre editor remove.ss.period.auth * }
+ if$
+ editor num.names$ #1 >
+ { bst.editors * }
+ { bst.editor * }
+ if$
+ }
+ if$
+}
+
+%%% format.in.ed.booktitle
+FUNCTION {format.editors.x}
+{ editor empty$
+ { "" }
+ { bst.editor.btitle.order #0 =
+ { "" }
+ { editor num.names$ #1 >
+ { bst.editors " by " * }
+ { bst.editor " by " * }
+ if$
+ }
+ if$
+ editor format.names *
+ bst.editor.btitle.order #0 =
+ { editor num.names$ #1 >
+ { bst.editors * }
+ { bst.editor * }
+ if$
+ }
+ { "" * }
+ if$
+ }
+ if$
+}
+
+%%% Remove commas in the cases like "?." and "?,".
+FUNCTION {remove.irrelevant.period.comma}
+{ 's :=
+ s empty$
+ { "" }
+ { s #-1 #3 substring$ "?,'" =
+ s #-1 #3 substring$ "?.'" = or
+ { s #-3 global.max$ substring$ "'" * }
+ { s #-1 #4 substring$ "?,''" =
+ s #-1 #4 substring$ "?.''" = or
+ { s #-4 global.max$ substring$ "''" * }
+ { s #-1 #2 substring$ "?," =
+ s #-1 #2 substring$ "?." = or
+ { s #-2 global.max$ substring$ "" * }
+ { s #-1 #3 substring$ "?,~" =
+ s #-1 #3 substring$ "?.~" = or
+ { s #-4 global.max$ substring$ "?~" * }
+ 's
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+}
+
+%%% title
+FUNCTION {format.title.sub}
+{ bst.title.lower.case #0 =
+ { bst.title.pre title * bst.title.post * }
+ { bst.title.pre title "t" change.case$ * bst.title.post * }
+ if$
+}
+
+%%% title
+FUNCTION {format.title}
+{ title empty$
+ bst.hide.title #0 = not or
+ { "" }
+ { format.title.sub remove.irrelevant.period.comma }
+ if$
+}
+
+%%% title for misc.
+FUNCTION {format.misc.title}
+{ title empty$
+ { "" }
+ { bst.title.pre title * bst.title.post * }
+ if$
+}
+
+% Convert "-" to "--" (for pages field)
+FUNCTION {n.dashify}
+{ 't :=
+ ""
+ %% while$
+ { t empty$ not }
+ { t #1 #1 substring$ "-" =
+ { t #1 #2 substring$ "--" = not
+ { "--" *
+ t #2 global.max$ substring$ 't :=
+ }
+ { { t #1 #1 substring$ "-" = }
+ { "-" *
+ t #2 global.max$ substring$ 't :=
+ }
+ while$
+ }
+ if$
+ }
+ { t #1 #1 substring$ *
+ t #2 global.max$ substring$ 't :=
+ }
+ if$
+ }
+ while$
+}
+
+%%% year
+FUNCTION {format.year}
+{ year empty$
+ { "there's no year in " cite$ * warning$
+ ", " }
+ { type$ "article" =
+ { bst.year.pre year * extra.label * bst.year.post * }
+ { bst.year.na.pre year * extra.label * bst.year.na.post * }
+ if$
+ }
+ if$
+}
+
+%%% page for book
+FUNCTION {format.book.pages}
+{ pages empty$
+ { "" }
+ { bst.pages.pre pages * bst.pages.post * }
+ if$
+}
+
+%%% Attach tie for the string with two or less characters.
+FUNCTION {tie.or.space.connect}
+{ duplicate$ text.length$ #3 <
+ { "~" }
+ { " " }
+ if$
+ swap$ * *
+}
+
+FUNCTION {either.or.check}
+{ empty$
+ 'pop$
+ { "can't use both " swap$ * " fields in " * cite$ * warning$ }
+ if$
+}
+
+%%% volume for book
+FUNCTION {format.bvolume}
+{ volume empty$
+ { "" }
+ { bst.volume.pre volume * bst.volume.post *
+ series empty$
+ 'skip$
+ %% If there is series field
+ { " of " * series * bst.series.post * }
+ if$
+% "volume and number" number either.or.check
+ }
+ if$
+}
+
+%%% series
+FUNCTION {output.series}
+{ series empty$
+ { "" }
+ { bst.series.pre series * bst.series.post * }
+ if$
+}
+
+%%% number and series
+FUNCTION {format.number.series}
+{ volume empty$
+ { number empty$
+ bst.hide.month #0 = not or
+ % number is empty
+ { series empty$
+ { "" }
+ % series is not empty.
+ { output.series }
+ if$
+ }
+ % number is not empty$
+ { series empty$
+ { bst.number.pre number * bst.number.post * }
+ % series is not empty.
+ { bst.in bst.series.pre * series * bst.series.post *
+ bst.number.pre * number * bst.number.post * }
+ if$
+ }
+ if$
+ }
+ { "" }
+ if$
+}
+
+%%% Number or not.
+FUNCTION {is.num}
+{ chr.to.int$
+ duplicate$ "0" chr.to.int$ < not
+ swap$ "9" chr.to.int$ > not and
+}
+
+FUNCTION {extract.num}
+{ duplicate$ 't :=
+ "" 's :=
+ { t empty$ not }
+ { t #1 #1 substring$
+ t #2 global.max$ substring$ 't :=
+ duplicate$ is.num
+ { s swap$ * 's := }
+ { pop$ "" 't := }
+ if$
+ }
+ while$
+ s empty$
+ 'skip$
+ { pop$ s }
+ if$
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% edition
+
+% Convert edition to 1st, 2nd, 3rd, 4th etc
+FUNCTION {eng.ord}
+{ duplicate$ "1" swap$ *
+ #-2 #1 substring$ "1" =
+ { bst.th * }
+ { duplicate$ #-1 #1 substring$
+ duplicate$ "1" =
+ { pop$ bst.st * }
+ { duplicate$ "2" =
+ { pop$ bst.nd * }
+ { "3" =
+ { bst.rd * }
+ { bst.th * }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+}
+
+% Convert first, second etc in edition field to 1st, 2nd (from jfm.bst)
+FUNCTION {convert.edition}
+{ edition extract.num "l" change.case$ 's :=
+ s "first" = s "1" = or
+ { bst.first }
+ { s "second" = s "2" = or
+ { bst.second }
+ { s "third" = s "3" = or
+ { bst.third }
+ { s "fourth" = s "4" = or
+ { bst.fourth }
+ { s "fifth" = s "5" = or
+ { bst.fifth }
+ { s #1 #1 substring$ is.num
+ { s eng.ord }
+ { edition }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+}
+
+%%% edition
+FUNCTION {format.edition}
+{ edition empty$
+ { "" }
+ { output.state mid.sentence =
+ { bst.edition.pre convert.edition "l" change.case$ * bst.edition.post * }
+ { bst.edition.pre convert.edition "t" change.case$ * bst.edition.post * }
+ if$
+ }
+ if$
+}
+
+%%% month
+FUNCTION {format.month}
+{ month empty$
+ bst.hide.month #0 = not or
+ { "" }
+ { bst.month.pre month * bst.month.post * }
+ if$
+}
+
+%%% year and month
+FUNCTION {format.date}
+{ format.month format.year *
+}
+
+%%% Is multiple pages like 1-100?
+FUNCTION { multi.page.check }
+{ 't :=
+ #0 'multiresult :=
+ { multiresult not
+ t empty$ not
+ and
+ }
+ { t #1 #1 substring$
+ duplicate$ "-" =
+ swap$ duplicate$ "," =
+ swap$ "+" =
+ or or
+ { #1 'multiresult := }
+ { t #2 global.max$ substring$ 't := }
+ if$
+ }
+ while$
+ multiresult
+}
+
+%%% pages
+FUNCTION {format.pages}
+{ pages empty$
+ { "" }
+ { pages multi.page.check
+ { bst.pages.pre pages n.dashify tie.or.space.connect * bst.pages.post }
+ { bst.page.pre pages tie.or.space.connect * bst.page.post }
+ if$
+ }
+ if$
+}
+
+%%% number
+FUNCTION {format.number}
+{ number empty$
+ bst.hide.number #0 = not or
+ { "" }
+ { bst.number.pre number * bst.number.post * }
+ if$
+}
+
+%%% volume
+FUNCTION {format.volume}
+{ volume empty$
+ 'skip$
+ { bst.volume.pre volume * bst.volume.post *
+ bst.year.position #3 =
+ { format.year * }
+ 'skip$
+ if$
+ }
+ if$
+}
+
+%%% number, page
+FUNCTION {format.number.pages}
+{ number empty$
+ { format.pages }
+ { format.number format.pages * }
+ if$
+}
+
+%%% volume, page
+FUNCTION {format.volume.pages}
+{ volume empty$
+ { format.pages }
+ { format.volume format.pages * }
+ if$
+}
+
+%%% volume, number, page
+FUNCTION {format.volume.number.pages}
+{ volume empty$
+ { number empty$
+ { format.pages }
+ { format.number format.pages * }
+ if$
+ }
+ { number empty$
+ { format.volume format.pages * }
+ { format.volume format.number * format.pages * }
+ if$
+ }
+ if$
+}
+
+% volume, number, page
+FUNCTION {format.vol.num.pages}
+{ volume empty$
+ %% volume is empty.
+ { number empty$
+ %% number is empty.
+ { pages empty$
+ % warning
+ { "there is no volume, number, and pages in " cite$ * warning$ "" }
+ { "" format.pages * }
+ if$
+ }
+ %% number is not empty.
+ % warning
+ { "there's a number but no volume in " cite$ * warning$
+ format.number.pages }
+ if$
+ }
+ %% volume is not empty.
+ { number empty$
+ %% number is empty.
+ { format.volume.pages }
+ %% number is not empty.
+ { format.volume.number.pages }
+ if$
+ }
+ if$
+}
+
+%%% chapter
+FUNCTION {format.chapter}
+{ chapter empty$
+ { "" }
+ { type empty$
+ { bst.chapter.pre chapter tie.or.space.connect * bst.chapter.post }
+ { ", " * type " " * chapter * }
+ if$
+ }
+ if$
+}
+
+%%% chapter, pages
+FUNCTION {format.chapter.pages}
+{ chapter empty$
+ { pages empty$
+ { "" }
+ { "" format.pages * }
+ if$
+ }
+ { pages empty$
+ { "" format.chapter * }
+ { "" format.chapter * format.pages * }
+ if$
+ }
+ if$
+}
+
+%%% editor and booktitle
+FUNCTION {format.in.ed.booktitle}
+{ booktitle empty$
+ { "" }
+ { editor empty$
+ { bst.in format.btitle * }
+ { bst.editor.btitle.order #0 =
+ { bst.in format.editors.x * " " * format.btitle * }
+ { bst.in format.btitle * " " * format.editors.x * }
+ if$
+ }
+ if$
+ }
+ if$
+}
+
+%%% howpublished
+FUNCTION {format.howpublished}
+{ howpublished empty$
+ { "" }
+ { bst.howpublished.pre howpublished * bst.howpublished.post * }
+ if$
+}
+
+%%% address
+FUNCTION {format.address}
+{ address empty$
+ { "" }
+ { bst.address.pre address * bst.address.post * }
+ if$
+}
+
+%%% publisher
+FUNCTION {format.publisher}
+{ publisher empty$
+ { "" }
+ { bst.publisher.pre publisher * bst.publisher.post * }
+ if$
+}
+
+%%% organization
+FUNCTION {format.organization}
+{ organization empty$
+ { "" }
+ { bst.organization.pre organization * bst.organization.post * }
+ if$
+}
+
+%% publisher and address
+FUNCTION {output.publisher.address}
+{ address empty$
+ { format.publisher "publisher" output.check.nocomma }
+ { bst.address.position #0 =
+ { format.address output.nocomma
+ format.publisher "publisher" output.check.nocomma }
+ { format.publisher "publisher" output.check.nocomma
+ format.address output.nocomma }
+ if$
+ }
+ if$
+}
+
+%% address, organization, publisher
+FUNCTION {output.address.organization.publisher}
+{ address empty$
+ %% address is empty
+ { organization empty$
+ %% organization is empty
+ { publisher empty$
+ 'skip$
+ { format.publisher "publisher" output.check.nocomma }
+ if$
+ }
+ %% organization is not empty
+ { publisher empty$
+ { format.organization "organization" output.check.nocomma }
+ { format.organization "organization" output.check.nocomma
+ format.publisher "publisher" output.check.nocomma }
+ if$
+ }
+ if$
+ }
+ %% address is not empty
+ { organization empty$
+ %% organization is empty
+ { publisher empty$
+ %% publisher is empty
+ { format.address output.nocomma }
+ %% publisher is not empty
+ { bst.address.position #0 =
+ { format.address output.nocomma
+ format.publisher "publisher" output.check.nocomma }
+ { format.publisher "publisher" output.check.nocomma
+ format.address output.nocomma }
+ if$
+ }
+ if$
+ }
+ %% organization is not empty
+ { publisher empty$
+ %% publisher is empty
+ { format.organization "organization" output.check.nocomma
+ format.address output.nocomma }
+ %% publisher is not empty
+ { format.organization "organization" output.check.nocomma
+ bst.address.position #0 =
+ { format.address output.nocomma
+ format.publisher "publisher" output.check.nocomma }
+ { format.publisher "publisher" output.check.nocomma
+ format.address output.nocomma }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+}
+
+%%% misc
+FUNCTION {empty.misc.check}
+{ author empty$ title empty$ howpublished empty$
+ month empty$ year empty$ note empty$
+ and and and and and
+ key empty$ not and
+ { "all relevant fields are empty in " cite$ * warning$ }
+ 'skip$
+ if$
+}
+
+FUNCTION {format.thesis.type}
+{ type empty$
+ 'skip$
+ { pop$ " " type * }
+ if$
+}
+
+FUNCTION {format.tr.number}
+{ type empty$
+ { "Technical Report" }
+ { " " type * }
+ if$
+ number empty$
+ { "t" change.case$ }
+ { number tie.or.space.connect }
+ if$
+}
+
+%%% phdthesis
+FUNCTION {format.phd}
+{ bst.phdthesis }
+
+%%% mastersthesis
+FUNCTION {format.mthesis}
+{ bst.mthesis }
+
+%%% school
+FUNCTION {format.school}
+{ school empty$
+ { "" }
+ { bst.school.pre school * bst.school.post * }
+ if$
+}
+
+%%% institution
+FUNCTION {format.institution}
+{ institution empty$
+ { "" }
+ { bst.institution.pre institution * bst.institution.post * }
+ if$
+}
+
+%%% remove first ? characters.
+FUNCTION {chop.word}
+{ 's :=
+ 'len :=
+ s #1 len substring$ =
+ { s len #1 + global.max$ substring$ }
+ 's
+ if$
+}
+
+FUNCTION {format.note}
+{ note empty$
+ { "" }
+ { bst.note.pre note * bst.note.post * }
+ if$
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% \havarditem
+
+FUNCTION {output.bibitem}
+{ newline$
+ "\harvarditem[" write$
+ alabel write$ % alabel <- abbreviated citation
+ "]{" write$
+ flabel write$ % flabel <- full citation
+ "}{" write$
+ cyear write$
+ % cyear = year
+ "}{" write$
+ cite$ write$ % cite$ -> pusch keyword
+ "}" write$
+ % If number index is on
+ bst.use.number.index #0 =
+ 'skip$
+ { index #1 + 'index :=
+ "" 'preone :=
+ "" 'preten :=
+ bst.number.index.digit "1" =
+ 'skip$
+ { bst.number.index.digit "2" =
+ { "\hskip0.5em" 'preone := }
+ { bst.number.index.digit "3" =
+ { "\hskip1em" 'preone :=
+ "\hskip0.5em" 'preten := }
+ 'skip$
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+ newline$
+ before.all 'output.state :=
+ ""
+ % number index
+ bst.use.number.index #0 =
+ 'skip$
+ { index #10 <
+ % Insert spaces according to digit of number index.
+ { preone }
+ { index #100 <
+ { preten }
+ { "" }
+ if$
+ }
+ if$
+ bst.number.index.pre * index int.to.str$ * bst.number.index.post * write$
+ }
+ if$
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% article
+
+FUNCTION {article}
+{ output.bibitem
+ format.authors "author" output.check.nocomma
+ bst.year.position #0 =
+ { format.year "year" output.check.nocomma }
+ 'skip$
+ if$
+ format.title "title" output.check.nocomma
+
+ format.journal "journal" output.check.nocomma
+ bst.year.position #2 =
+ { format.date output.nocomma }
+ 'skip$
+ if$
+ format.vol.num.pages output.nocomma
+
+ bst.year.position #1 =
+ { format.date output.nocomma }
+ 'skip$
+ if$
+
+ format.url.doi output.nocomma
+
+ format.note output.nocomma
+ fin.entry
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% book
+
+FUNCTION {book}
+{ output.bibitem
+ author empty$
+ { format.editors "author and editor" output.check.nocomma }
+ { format.authors output.nonnull.nocomma
+ "author and editor" editor either.or.check
+ }
+ if$
+ bst.year.position #0 =
+ { format.year "year" output.check.nocomma }
+ 'skip$
+ if$
+ format.book "title" output.check.nocomma
+
+ format.bvolume output.nocomma
+ format.number.series output.nocomma
+ output.publisher.address
+
+ format.edition output.nocomma
+ format.book.pages output.nocomma
+
+ bst.year.position #0 = not
+ { format.year "year" output.check.nocomma }
+ 'skip$
+ if$
+
+ format.url.doi output.nocomma
+
+ format.note output.nocomma
+ fin.entry
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% booklet
+
+FUNCTION {booklet}
+{ output.bibitem
+ format.authors output.nocomma
+ format.year output.nocomma
+ format.misc.title "title" output.check.nocomma
+ format.howpublished output.nocomma
+ format.address output.nocomma
+
+ format.url.doi output.nocomma
+
+ format.note output.nocomma
+ fin.entry
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% inbook
+
+FUNCTION {inbook}
+{ output.bibitem
+ author empty$
+ { format.editors "author and editor" output.check.nocomma }
+ { format.authors output.nonnull.nocomma
+ "author and editor" editor either.or.check
+ }
+ if$
+ bst.year.position #0 =
+ { format.year "year" output.check.nocomma }
+ 'skip$
+ if$
+% format.book remove.pre.comma "title" output.check.nocomma
+ format.book "title" output.check.nocomma
+ format.edition output.nocomma
+
+ format.bvolume output.nocomma
+ format.chapter.pages "chapter and pages" output.check.nocomma
+ format.number.series output.nocomma
+ output.publisher.address
+
+ bst.year.position #0 = not
+ { format.year "year" output.check.nocomma }
+ 'skip$
+ if$
+
+ format.url.doi output.nocomma
+
+ format.note output.nocomma
+ fin.entry
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% incollection
+
+FUNCTION {incollection}
+{ output.bibitem
+ format.authors "author" output.check.nocomma
+ bst.year.position #0 =
+ { format.year "year" output.check.nocomma }
+ 'skip$
+ if$
+ format.title "title" output.check.nocomma
+
+ format.in.ed.booktitle "booktitle" output.check.nocomma
+ format.bvolume output.nocomma
+ output.address.organization.publisher
+ format.edition output.nocomma
+ format.chapter.pages output.nocomma
+
+ bst.year.position #0 = not
+ { format.year "year" output.check.nocomma }
+ 'skip$
+ if$
+
+ format.url.doi output.nocomma
+
+ format.note output.nocomma
+ fin.entry
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% inproceedings
+
+FUNCTION {inproceedings}
+{ output.bibitem
+ format.authors "author" output.check.nocomma
+ bst.year.position #0 =
+ { format.year "year" output.check.nocomma }
+ 'skip$
+ if$
+ format.title "title" output.check.nocomma
+
+ format.in.ed.booktitle "booktitle" output.check.nocomma
+ format.bvolume output.nocomma
+ format.number.series output.nocomma
+ format.pages output.nocomma
+ output.address.organization.publisher
+
+ bst.year.position #0 = not
+ { format.date output.nocomma }
+ { format.month output.nocomma }
+ if$
+
+ format.url.doi output.nocomma
+
+ format.note output.nocomma
+ fin.entry
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% conference
+
+FUNCTION {conference}
+{ inproceedings }
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% manual
+FUNCTION {manual}
+{ output.bibitem
+ author empty$
+ { organization empty$
+ 'skip$
+ { organization output.nonnull.nocomma
+ address output.nocomma
+ }
+ if$
+ }
+ { format.authors output.nonnull.nocomma }
+ if$
+ bst.year.position #0 =
+ { format.year "year" output.check.nocomma }
+ 'skip$
+ if$
+ format.book "title" output.check.nocomma
+ author empty$
+ { organization empty$
+ { format.address new.block.check
+ format.address output.nocomma
+ }
+ 'skip$
+ if$
+ }
+ { output.address.organization.publisher }
+ if$
+ format.edition output.nocomma
+
+ bst.year.position #0 = not
+ { format.year "year" output.check.nocomma }
+ 'skip$
+ if$
+
+ format.url.doi output.nocomma
+
+ format.note output.nocomma
+ fin.entry
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% mastersthesis
+
+FUNCTION {mastersthesis}
+{ output.bibitem
+ format.authors "author" output.check.nocomma
+ bst.year.position #0 =
+ { format.year "year" output.check.nocomma }
+ 'skip$
+ if$
+ format.title "title" output.check.nocomma
+ format.mthesis format.thesis.type output.nonnull.nocomma
+ format.school "school" output.check.nocomma
+ format.address output.nocomma
+
+ bst.year.position #0 = not
+ { format.year "year" output.check.nocomma }
+ 'skip$
+ if$
+
+ format.url.doi output.nocomma
+
+ format.note output.nocomma
+ fin.entry
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% misc
+
+FUNCTION {misc}
+{ output.bibitem
+ format.authors "author" output.check.nocomma
+ bst.year.position #0 =
+ { format.year "year" output.check.nocomma }
+ 'skip$
+ if$
+ format.misc.title output.nocomma
+ format.howpublished output.nocomma
+
+ bst.year.position #0 = not
+ { format.date output.nocomma }
+ { format.month output.nocomma }
+ if$
+
+ format.url.doi output.nocomma
+
+ format.note output.nocomma
+ fin.entry
+ empty.misc.check
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% Online
+
+FUNCTION {online}
+{ output.bibitem
+ format.authors "author" output.check.nocomma
+ bst.year.position #0 =
+ { format.year "year" output.check.nocomma }
+ 'skip$
+ if$
+ format.misc.title output.nocomma
+ format.howpublished output.nocomma
+
+ bst.year.position #0 = not
+ { format.date output.nocomma }
+ { format.month output.nocomma }
+ if$
+
+ format.url.doi output.nocomma
+
+ format.note output.nocomma
+ fin.entry
+ empty.misc.check
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% phdthesis
+
+FUNCTION {phdthesis}
+{ output.bibitem
+ format.authors "author" output.check.nocomma
+ bst.year.position #0 =
+ { format.year "year" output.check.nocomma }
+ 'skip$
+ if$
+ format.book "title" output.check.nocomma
+ format.phd
+ format.thesis.type output.nonnull.nocomma
+ format.school "school" output.check.nocomma
+ address empty$
+ 'skip$
+ { format.address output.nocomma }
+ if$
+
+ bst.year.position #0 = not
+ { format.year "year" output.check.nocomma }
+ 'skip$
+ if$
+
+ format.url.doi output.nocomma
+
+ format.note output.nocomma
+ fin.entry
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% proceedings
+
+FUNCTION {proceedings}
+{ output.bibitem
+ editor empty$
+ { organization output.nocomma }
+ { format.editors output.nonnull.nocomma }
+ if$
+ bst.year.position #0 =
+ { format.year "year" output.check.nocomma }
+ 'skip$
+ if$
+ format.btitle remove.pre.comma "title" output.check.nocomma
+ format.bvolume output.nocomma
+ format.number.series output.nocomma
+ output.address.organization.publisher
+
+ bst.year.position #0 = not
+ { format.year "year" output.check.nocomma }
+ 'skip$
+ if$
+
+ format.url.doi output.nocomma
+
+ format.note output.nocomma
+ fin.entry
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% techreport
+
+FUNCTION {techreport}
+{ output.bibitem
+ format.authors "author" output.check.nocomma
+ bst.year.position #0 =
+ { format.year "year" output.check.nocomma }
+ 'skip$
+ if$
+ format.title "title" output.check.nocomma
+ format.tr.number output.nonnull.nocomma
+ format.institution "institution" output.check.nocomma
+ format.address output.nocomma
+
+ bst.year.position #0 = not
+ { format.year "year" output.check.nocomma }
+ 'skip$
+ if$
+
+ format.note output.nocomma
+ fin.entry
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% unpublished
+
+FUNCTION {unpublished}
+{ output.bibitem
+ format.authors "author" output.check.nocomma
+ bst.year.position #0 =
+ { format.year "year" output.check.nocomma }
+ 'skip$
+ if$
+ format.title "title" output.check.nocomma
+
+ bst.year.position #0 = not
+ { format.date remove.pre.comma output.nocomma }
+ { month empty$
+ 'skip$
+ { format.month remove.pre.comma output.nocomma }
+ if$
+ }
+ if$
+
+ format.url.doi output.nocomma
+
+ format.note "note" output.check.nocomma
+ fin.entry
+}
+
+FUNCTION {default.type}
+{ misc }
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% Alias for month names:
+
+MACRO {jan} {"January"}
+MACRO {feb} {"February"}
+MACRO {mar} {"March"}
+MACRO {apr} {"April"}
+MACRO {may} {"May"}
+MACRO {jun} {"June"}
+MACRO {jul} {"July"}
+MACRO {aug} {"August"}
+MACRO {sep} {"September"}
+MACRO {oct} {"October"}
+MACRO {nov} {"November"}
+MACRO {dec} {"December"}
+
+%%% Read entries:
+READ
+
+%%% Variable for remembering the order of citation.
+INTEGERS { order.num }
+FUNCTION {initialize.order.num}
+{
+ #1 'order.num :=
+}
+%%% Initialize a variables
+EXECUTE {initialize.order.num}
+
+%%% Variable for remembering the order of citation.
+FUNCTION {set.order.cited}
+{
+ order.num 'order.cited :=
+ #1 order.num + 'order.num :=
+}
+%%% Iterate for all entries:
+ITERATE {set.order.cited}
+
+%%% check the value of nameorder field.
+FUNCTION {set.nameorder}
+{ nameorder empty$
+ { "" 'nameorder.temp := }
+ { nameorder 'nameorder.temp := }
+ if$
+}
+%%% Iterate for all entries:
+ITERATE {set.nameorder}
+
+%%% Remove symbols and convert to lowercase.
+FUNCTION {sortify}
+{ purify$ "l" change.case$ }
+
+%%% names for sorting
+FUNCTION {sort.format.names}
+{ 's :=
+ #1 'nameptr :=
+ ""
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ { nameptr #1 >
+ { ", " * }
+ 'skip$
+ if$
+ s nameptr "{ll}{ f}{ j}" format.name$ 't :=
+ nameptr numnames = t "others" = and
+ { bst.and.others.output *}
+ { t sortify * }
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+}
+
+FUNCTION {sort.format.names.abb}
+{ 's :=
+ s num.names$ 'numnames :=
+ numnames bst.and.others.num <
+ { s sort.format.names }
+ { s #1 "{ll}{ f}{ j}" format.name$ " zz " * }
+ if$
+}
+
+%%% Label for full author name.
+FUNCTION {format.lab.names.full}
+{ 's :=
+ #1 'nameptr :=
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ { s nameptr "{vv~}{ll}" format.name$ 't :=
+ nameptr #1 >
+ { namesleft #1 >
+ { nameorder.temp "random" = bst.use.nameorder #0 = not and
+ { bst.and.nameorder * t * }
+ { ", " * t * }
+ if$
+ }
+ { t "others" =
+ { bst.and.others.output * }
+ { numnames #2 >
+ { nameorder.temp "random" = bst.use.nameorder #0 = not and
+ { bst.cite.and.nameorder * t * }
+ { bst.cite.ands * t * }
+ if$
+ }
+ { nameorder.temp "random" = bst.use.nameorder #0 = not and
+ { bst.cite.and.nameorder * t * }
+ { bst.cite.and * t * }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ 't
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+ numnames #1 > #1 #2 = and {", eds" *} {} if$
+ numnames #1 = #1 #2 = and {", ed" *} {} if$
+}
+
+%%% laberl for abbreviated author name.
+FUNCTION {format.lab.names.abb}
+{ 's :=
+ s num.names$ 'numnames :=
+ numnames bst.and.others.num <
+ % if the number of authors is less than bst.and.others.num, full name.
+ { s format.lab.names.full }
+ % if the number of authors is equal or more than bst.and.others.num, abbreviated name.
+ { s #1 "{ll}" format.name$ bst.and.others.output * }
+ if$
+}
+
+%%% abbreviated author
+FUNCTION {author.key.label.abb}
+{ author empty$
+ { key empty$
+ { cite$ #1 #3 substring$ }
+ { key #3 text.prefix$ }
+ if$
+ }
+ { author format.lab.names.abb }
+ if$
+}
+
+%%% full author
+FUNCTION {author.key.label.full}
+{ author empty$
+ { key empty$
+ { cite$ #1 #3 substring$ }
+ { key #3 text.prefix$ }
+ if$
+ }
+ { author format.lab.names.full }
+ if$
+}
+
+FUNCTION {format.names.full.wo.and}
+{ 's :=
+ #1 'nameptr :=
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ { s nameptr "{ll}{, ff}{, jj}" format.name$ 't :=
+ nameptr #1 >
+ { namesleft #1 >
+ { " " * t * }
+ { t "others" =
+ { " " * }
+ { numnames #2 >
+ { " " * t * }
+ { " " * t * }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ 't
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+}
+
+FUNCTION {author.key.full.wo.and}
+{ author empty$
+ { key empty$
+ { cite$ #1 #3 substring$ }
+ { key #3 text.prefix$ }
+ if$
+ }
+ { author format.names.full.wo.and }
+ if$
+}
+
+FUNCTION {author.editor.key.full.wo.and}
+{ author empty$
+ { editor empty$
+ { key empty$
+ { cite$ #1 #3 substring$ }
+ { key #3 text.prefix$ }
+ if$
+ }
+ { editor format.names.full.wo.and }
+ if$
+ }
+ { author format.names.full.wo.and }
+ if$
+}
+
+FUNCTION {editor.key.organization.key.full.wo.and}
+{ editor empty$
+ { key empty$
+ { organization empty$
+ { cite$ #1 #3 substring$ }
+ { "The " #4 organization chop.word #3 text.prefix$ }
+ if$
+ }
+ { key #3 text.prefix$ }
+ if$
+ }
+ { editor format.names.full.wo.and }
+ if$
+}
+
+FUNCTION {author.key.organization.key.full.wo.and}
+{ author empty$
+ { key empty$
+ { organization empty$
+ { cite$ #1 #3 substring$ }
+ { "The " #4 organization chop.word #3 text.prefix$ }
+ if$
+ }
+ { key #3 text.prefix$ }
+ if$
+ }
+ { author format.names.full.wo.and }
+ if$
+}
+
+%%% abbreviated author
+FUNCTION {author.editor.key.label.abb}
+{ author empty$
+ { editor empty$
+ { key empty$
+ { cite$ #1 #3 substring$ }
+ { key #3 text.prefix$ }
+ if$
+ }
+ { editor format.lab.names.abb }
+ if$
+ }
+ { author format.lab.names.abb }
+ if$
+}
+
+%%% full author
+FUNCTION {author.editor.key.label.full}
+{ author empty$
+ { editor empty$
+ { key empty$
+ { cite$ #1 #3 substring$ }
+ { key #3 text.prefix$ }
+ if$
+ }
+ { editor format.lab.names.full }
+ if$
+ }
+ { author format.lab.names.full }
+ if$
+}
+
+FUNCTION {author.key.organization.label.full}
+{ author empty$
+ { key empty$
+ { organization empty$
+ { cite$ #1 #3 substring$ }
+ { "The " #4 organization chop.word #3 text.prefix$ }
+ if$
+ }
+ { key #3 text.prefix$ }
+ if$
+ }
+ { author format.lab.names.full }
+ if$
+}
+
+FUNCTION {author.key.organization.label.abb}
+{ author empty$
+ { key empty$
+ { organization empty$
+ { cite$ #1 #3 substring$ }
+ { "The " #4 organization chop.word #3 text.prefix$ }
+ if$
+ }
+ { key #3 text.prefix$ }
+ if$
+ }
+ { author format.lab.names.abb }
+ if$
+}
+
+FUNCTION {editor.key.organization.label.full}
+{ editor empty$
+ { key empty$
+ { organization empty$
+ { cite$ #1 #3 substring$ }
+ { "The " #4 organization chop.word #3 text.prefix$ }
+ if$
+ }
+ { key #3 text.prefix$ }
+ if$
+ }
+ { editor format.lab.names.full }
+ if$
+}
+
+FUNCTION {editor.key.organization.label.abb}
+{ editor empty$
+ { key empty$
+ { organization empty$
+ { cite$ #1 #3 substring$ }
+ { "The " #4 organization chop.word #3 text.prefix$ }
+ if$
+ }
+ { key #3 text.prefix$ }
+ if$
+ }
+ { editor format.lab.names.abb }
+ if$
+}
+
+%%% Convert numbers: 0->9, 1->8, 2->7,..., 9->0
+FUNCTION {reverse.num}
+{ 's :=
+ s "1" =
+ { "8" 'year.num := }
+ { s "2" =
+ { "7" 'year.num := }
+ { s "3" =
+ { "6" 'year.num := }
+ { s "4" =
+ { "5" 'year.num := }
+ { s "5" =
+ { "4" 'year.num := }
+ { s "6" =
+ { "3" 'year.num := }
+ { s "7" =
+ { "2" 'year.num := }
+ { s "8" =
+ { "1" 'year.num := }
+ { s "9" =
+ { "0" 'year.num := }
+ { s "0" =
+ { "9" 'year.num := }
+ { "9" 'year.num := }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+ year.num
+}
+
+%%% Convert year (large number -> small number)
+FUNCTION {convert.year}
+{ 't :=
+ bst.reverse.year #0 =
+ { t 'tt := }
+ { t #1 #1 substring$ reverse.num
+ t #2 #1 substring$ reverse.num *
+ t #3 #1 substring$ reverse.num *
+ t #4 #1 substring$ reverse.num * 'tt := }
+ if$
+ tt
+}
+
+%%% cyear
+FUNCTION {calc.cyear}
+{ type$ "book" =
+ type$ "inbook" =
+ or
+ 'author.editor.key.full.wo.and
+ { type$ "proceedings" =
+ 'editor.key.organization.key.full.wo.and
+ { type$ "manual" =
+ 'author.key.organization.key.full.wo.and
+ 'author.key.full.wo.and
+ if$
+ }
+ if$
+ }
+ if$
+ duplicate$
+ year empty$
+ { "2199" 'cyear := }
+ { year 'cyear := }
+ if$
+ year empty$
+ { " " "2199" convert.year * field.or.null * }
+ { " " year convert.year * field.or.null * }
+ if$
+ sortify 'sort.label :=
+ % For debug
+ econ.debug #0 = not
+ { "sort.label = ``\texttt{" write$
+ sort.label write$
+ "}''\\" write$
+ newline$
+ }
+ 'skip$
+ if$
+ pop$
+}
+
+FUNCTION {calc.sort.label.abb}
+{ author empty$
+ { editor empty$
+ { "" }
+ { editor 's := }
+ if$
+ }
+ { author 's := }
+ if$
+ s sort.format.names.abb 't :=
+ year empty$
+ { t sortify " " * "2199" convert.year * 'sort.label.abb := }
+ { t sortify " " * year convert.year * 'sort.label.abb := }
+ if$
+ econ.debug #0 = not
+ { "sort.label.abb = ``\texttt{" write$
+ sort.label.abb write$
+ "}''\\" write$
+ newline$
+ }
+ 'skip$
+ if$
+}
+
+%%% flabel
+FUNCTION {calc.flabel}
+{ type$ "book" =
+ type$ "inbook" =
+ or
+ 'author.editor.key.label.full
+ { type$ "proceedings" =
+ 'editor.key.organization.label.full
+ { type$ "manual" =
+ 'author.key.organization.label.full
+ 'author.key.label.full
+ if$
+ }
+ if$
+ }
+ if$
+ 'flabel :=
+ % For debug
+ econ.debug #0 = not
+ { "flabel = ``\texttt{" write$
+ flabel write$
+ "}''\\" write$
+ newline$
+ }
+ 'skip$
+ if$
+}
+
+%%% alabel
+FUNCTION {calc.alabel}
+{ type$ "book" =
+ type$ "inbook" =
+ or
+ 'author.editor.key.label.abb
+ { type$ "proceedings" =
+ 'editor.key.organization.label.abb
+ { type$ "manual" =
+ 'author.key.organization.label.abb
+ 'author.key.label.abb
+ if$
+ }
+ if$
+ }
+ if$
+ 'alabel :=
+ % For debug
+ econ.debug #0 = not
+ { "alabel = ``\texttt{" write$
+ alabel write$
+ "}''\\" write$
+ newline$
+ }
+ 'skip$
+ if$
+}
+
+%%% title for sorting
+FUNCTION {sort.format.title}
+{ 't :=
+ "A " #2
+ "An " #3
+ "The " #4 t chop.word
+ chop.word
+ chop.word
+ sortify
+ #1 global.max$ substring$
+}
+
+%%% author for sorting
+FUNCTION {author.sort}
+{ author empty$
+ { key empty$
+ { "to sort, need author or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { author sort.format.names }
+ if$
+}
+
+%%% editor for sorting
+FUNCTION {author.editor.sort}
+{ author empty$
+ { editor empty$
+ { key empty$
+ { "to sort, need author, editor, or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { editor sort.format.names }
+ if$
+ }
+ { author sort.format.names }
+ if$
+}
+
+FUNCTION {author.organization.sort}
+{ author empty$
+ { organization empty$
+ { key empty$
+ { "to sort, need author, organization, or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { "The " #4 organization chop.word sortify }
+ if$
+ }
+ { author sort.format.names }
+ if$
+}
+
+FUNCTION {editor.organization.sort}
+{ editor empty$
+ { organization empty$
+ { key empty$
+ { "to sort, need editor, organization, or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { "The " #4 organization chop.word sortify }
+ if$
+ }
+ { editor sort.format.names }
+ if$
+}
+
+%%% 1,...,9 -> 001,...,009
+%%% 10,...,99 -> 010,...,099
+FUNCTION {add.zero.to.number}
+{ 's :=
+ s text.length$ #1 =
+ { "00" s * }
+ { s text.length$ #2 =
+ { "0" s * }
+ { s }
+ if$
+ }
+ if$
+}
+
+%% entry type
+FUNCTION {bst.sort.entry.type.order}
+{ 'item.type :=
+ item.type "article" =
+ { "01" }
+ { item.type "book" =
+ { "02" }
+ { item.type "booklet" =
+ { "03" }
+ { item.type "comment" =
+ { "04" }
+ { item.type "conference" =
+ { "05" }
+ { item.type "inbook" =
+ { "06" }
+ { item.type "incollection" =
+ { "07" }
+ { item.type "inproceedings" =
+ { "08" }
+ { item.type "manual" =
+ { "09" }
+ { item.type "masterthesis" =
+ { "10" }
+ { item.type "misc" =
+ { "11" }
+ { item.type "phdthesis" =
+ { "12" }
+ { item.type "proceedings" =
+ { "13" }
+ { item.type "techreport" =
+ { "14" }
+ { item.type "unpublished" =
+ { "15" }
+ { "16" }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+}
+
+%%% Create sort.key$: absorder -> author -> year -> order -> month -> title.
+FUNCTION {presort.one}
+{
+ bst.no.sort #0 = not
+ { order.cited int.to.str$ add.zero.to.number " " * }
+ { "" }
+ if$
+ bst.sort.year #0 = not
+ %% Use year field as the primary sorting key.
+ { year convert.year * }
+ 'skip$
+ if$
+ bst.sort.entry.type #0 = not
+ { type$ bst.sort.entry.type.order * " " * }
+ 'skip$
+ if$
+ absorder empty$
+ { "/// " * }
+ { bst.notuse.absorder.field #0 =
+ { absorder "999" =
+ { "zzz " * }
+ { absorder add.zero.to.number "000" =
+ { "/// " * }
+ { absorder add.zero.to.number * " " * }
+ if$
+ }
+ if$
+ }
+ { "/// " * }
+ if$
+ }
+ if$
+ " " *
+ sort.label.abb *
+ " " *
+ type$ "book" = type$ "inbook" = or
+ 'author.editor.sort
+ { type$ "proceedings" =
+ 'editor.organization.sort
+ { type$ "manual" =
+ 'author.organization.sort
+ 'author.sort
+ if$
+ }
+ if$
+ }
+ if$
+ * " " *
+ " "
+ order empty$
+ { "/// " * }
+ { bst.notuse.order.field #0 =
+ { order "999" =
+ { "zzz " * }
+ { order add.zero.to.number "000" =
+ { "/// " * }
+ { order add.zero.to.number * " " * }
+ if$
+ }
+ if$
+ }
+ { "/// " * }
+ if$
+ }
+ if$
+ month empty$
+ { * "/// " * }
+ { month "999" =
+ { * month add.zero.to.number * "zzz " * }
+ { month add.zero.to.number "000" =
+ { * month add.zero.to.number * "/// " * }
+ { * month add.zero.to.number * " " * }
+ if$
+ }
+ if$
+ }
+ if$
+ title field.or.null sort.format.title
+ *
+ #1 entry.max$ substring$
+ 'sort.key$ :=
+ % For debug
+ econ.debug #0 = not
+ { "``\texttt{" write$
+ sort.key$ write$
+ "}''\\" write$
+ newline$
+ }
+ 'skip$
+ if$
+}
+
+FUNCTION {presort.two}
+{
+ bst.no.sort #0 = not
+ { order.cited int.to.str$ add.zero.to.number " " * }
+ { "" }
+ if$
+ bst.sort.year #0 = not
+ %% Use year field as the primary sorting key.
+ { year convert.year * }
+ 'skip$
+ if$
+ bst.sort.entry.type #0 = not
+ { type$ bst.sort.entry.type.order * " " * }
+ 'skip$
+ if$
+ absorder empty$
+ { "/// " * }
+ { bst.notuse.absorder.field #0 =
+ { absorder "999" =
+ { "zzz " * }
+ { absorder add.zero.to.number "000" =
+ { "/// " * }
+ { absorder add.zero.to.number * " " * }
+ if$
+ }
+ if$
+ }
+ { "/// " * }
+ if$
+ }
+ if$
+ " " * sort.label * " "
+ order empty$
+ { "/// " * }
+ { bst.notuse.order.field #0 =
+ { order "999" =
+ { "zzz " * }
+ { order add.zero.to.number "000" =
+ { "/// " * }
+ { order add.zero.to.number * " " * }
+ if$
+ }
+ if$
+ }
+ { "/// " * }
+ if$
+ }
+ if$
+ month empty$
+ { * "/// " * }
+ { month "999" =
+ { * month add.zero.to.number * "zzz " * }
+ { month add.zero.to.number "000" =
+ { * month add.zero.to.number * "/// " * }
+ { * month add.zero.to.number * " " * }
+ if$
+ }
+ if$
+ }
+ if$
+ title field.or.null sort.format.title
+ *
+ #1 entry.max$ substring$
+ 'sort.key$ :=
+ % For debug
+ econ.debug #0 = not
+ { "``\texttt{" write$
+ sort.key$ write$
+ "}''\\" write$
+ newline$
+ }
+ 'skip$
+ if$
+}
+
+%%% Codes for debugging
+FUNCTION {calc.alabel.mess}
+{ econ.debug #0 = not
+ { "\textbf{Iteration of calc.alabel: alabel = }\\" write$
+ newline$ }
+ 'skip$
+ if$
+}
+FUNCTION {calc.flabel.mess}
+{ econ.debug #0 = not
+ { "\textbf{Iteration of calc.flabel: flabel = }\\" write$
+ newline$ }
+ 'skip$
+ if$
+}
+FUNCTION {presort.one.mess}
+{ econ.debug #0 = not
+ { "\textbf{Iteration of presort (1st time): \$sort.key = }\\" write$
+ newline$ }
+ 'skip$
+ if$
+}
+
+FUNCTION {presort.two.mess}
+{ econ.debug #0 = not
+ { "\textbf{Iteration of presort (2nd time): \$sort.key = }\\" write$
+ newline$ }
+ 'skip$
+ if$
+}
+
+FUNCTION {calc.cyear.mess}
+{ econ.debug #0 = not
+ { "\textbf{Iteration of calc.cyear: sort.label = }\\" write$
+ newline$ }
+ 'skip$
+ if$
+}
+
+FUNCTION {calc.sort.label.abb.mess}
+{ econ.debug #0 = not
+ { "\textbf{Iteration of calc.sort.label.abb: sort.label.abb = }\\" write$
+ newline$ }
+ 'skip$
+ if$
+}
+
+%%% alabel
+EXECUTE {calc.alabel.mess}
+ITERATE {calc.alabel}
+
+%%% flabel
+EXECUTE {calc.flabel.mess}
+ITERATE {calc.flabel}
+
+%%% cyear and sort.label
+EXECUTE {calc.cyear.mess}
+ITERATE {calc.cyear}
+
+%%%
+EXECUTE {calc.sort.label.abb.mess}
+ITERATE {calc.sort.label.abb}
+
+%%% Sorting by $sort.key (first time)
+%
+% Sorting is done in two times. This is the first time.
+%
+EXECUTE {presort.one.mess}
+ITERATE {presort.one}
+SORT
+
+FUNCTION {forward.pass}
+{ bst.use.bysame #0 = bst.use.bysame #2 = or
+ % Not use \bysame
+ { last.sort.label sort.label.abb =
+ { last.extra.num #1 + 'last.extra.num :=
+ last.extra.num int.to.chr$ 'extra.label :=
+ }
+ { "a" chr.to.int$ 'last.extra.num :=
+ "" 'extra.label :=
+ sort.label.abb 'last.sort.label :=
+ }
+ if$
+ }
+ % Use \bysame
+ { last.sort.label sort.label.abb =
+ { last.extra.num #1 + 'last.extra.num :=
+ last.extra.num int.to.chr$ 'extra.label :=
+ }
+ { "a" chr.to.int$ 'last.extra.num :=
+ "" 'extra.label :=
+ sort.label.abb 'last.sort.label :=
+ }
+ if$
+ author empty$
+ { editor empty$
+ { "" }
+ 'format.editors.alt
+ if$
+ }
+ 'format.authors.alt
+ if$
+ 'this.author :=
+ % format.names 'this.author :=
+ this.author prev.author =
+ { "bysame" 'extra.label.bysame := }
+ { this.author "" =
+ { "abcxyz" }
+ 'this.author
+ if$
+ 'prev.author :=
+ }
+ if$
+ }
+ if$
+}
+
+FUNCTION {reverse.pass}
+{ next.extra "b" =
+ { "a" 'extra.label := }
+ 'skip$
+ if$
+ extra.label empty$ not
+ { cyear extra.label * }
+ { cyear "" * }
+ if$
+ "" field.or.null *
+ 'cyear :=
+ extra.label 'next.extra :=
+}
+
+%%% \bysame
+ITERATE {forward.pass}
+
+REVERSE {reverse.pass}
+
+%%% Sorting by sort.key$ (second time)
+EXECUTE {presort.two.mess}
+ITERATE {presort.two}
+SORT
+
+FUNCTION {reset.prev.author}
+{ "xxyyzz" 'prev.author := }
+
+EXECUTE {reset.prev.author}
+
+FUNCTION {forward.pass.two}
+{ bst.use.bysame #1 =
+ { author empty$
+ { editor empty$
+ { "" }
+ 'format.editors.alt
+ if$
+ }
+ 'format.authors.alt
+ if$
+ 'this.author :=
+ this.author prev.author =
+ { "bysame" 'extra.label.bysame := }
+ { this.author "" =
+ { "abcxyz" }
+ 'this.author
+ if$
+ 'prev.author :=
+ }
+ if$
+ }
+ 'skip$
+ if$
+}
+
+ITERATE {forward.pass.two}
+
+FUNCTION{punctuation}
+{
+ "%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%" write$ newline$
+ "% This bbl file is created by econ.bst ver." econ.version * write$ newline$
+ "% The latest econ.bst is available at" write$ newline$
+ "% <https://github.com/ShiroTakeda/econ-bst>" write$ newline$ newline$
+}
+
+EXECUTE {punctuation}
+
+FUNCTION {begin.bib}
+{
+ preamble$ empty$
+ 'skip$
+ { preamble$ write$ newline$ }
+ if$
+ bst.use.bysame #0 =
+ % Not use \bysame.
+ 'skip$
+ % Use \bysame.
+ { "%%% Definition of \bysame" write$ newline$
+ "\ifx\undefined\bysame" write$ newline$
+ "\newcommand{\bysame}{" bst.bysame.definition * "}" *
+ write$ newline$
+ "\fi" write$ newline$ newline$ }
+ if$
+ %% When number index is attached to the beginning of each item.
+ bst.use.number.index #0 =
+ 'skip$
+ { bst.number.index.digit "1" =
+ % one digit.
+ { bst.number.index.bibhang.one }
+ { bst.number.index.digit "2" =
+ % two digits.
+ { bst.number.index.bibhang.ten }
+ % three or more digits.
+ { bst.number.index.bibhang.hund }
+ if$
+ }
+ if$
+ 'hang :=
+ "%%% Redefinition of \bibhang" write$ newline$
+ "\ifx\undefined\bibhang" write$ newline$
+ "\relax" write$ newline$
+ "\else" write$ newline$
+ "\setlength{\bibhang}{"
+ hang * "}" * write$ newline$
+ "\fi" write$ newline$ newline$
+ }
+ if$
+ "\begin{thebibliography}{xxx}" write$ newline$
+
+ %% Initialize the variable `index'.
+ #0 'index :=
+}
+
+FUNCTION {end.bib}
+{ newline$ "\end{thebibliography}" write$ newline$ }
+
+EXECUTE {begin.bib}
+
+EXECUTE {init.state.consts}
+
+ITERATE {call.type$}
+
+EXECUTE {end.bib}
+
+% --------------------
+% Local Variables:
+% fill-column: 78
+% mode: bst
+% End:
diff --git a/biblio/bibtex/contrib/econ-bst/customization/econ-b.pdf b/biblio/bibtex/contrib/econ-bst/customization/econ-b.pdf
new file mode 100644
index 0000000000..e0ebbf3139
--- /dev/null
+++ b/biblio/bibtex/contrib/econ-bst/customization/econ-b.pdf
Binary files differ
diff --git a/biblio/bibtex/contrib/econ-bst/customization/econ-b.tex b/biblio/bibtex/contrib/econ-bst/customization/econ-b.tex
new file mode 100644
index 0000000000..8023ef3ccd
--- /dev/null
+++ b/biblio/bibtex/contrib/econ-bst/customization/econ-b.tex
@@ -0,0 +1,55 @@
+%#!pdflatex
+%#BIBTEX bibtex econ-b
+
+%############################## Main #################################
+\documentclass[10pt]{article}
+
+%% Use natbib.sty
+\usepackage{natbib}
+\usepackage{mathpazo}
+\usepackage{url}
+\usepackage{graphicx}
+\usepackage{color}
+\definecolor{MyBrown}{rgb}{0.3,0,0}
+\definecolor{MyBlue}{rgb}{0,0,0.3}
+\definecolor{MyRed}{rgb}{0.4,0,0.1}
+\definecolor{MyGreen}{rgb}{0,0.4,0}
+\usepackage[bookmarks=true,%
+bookmarksnumbered=true,%
+colorlinks=true,%
+linkcolor=MyBlue,%
+citecolor=MyRed,%
+filecolor=MyBlue,%
+urlcolor=MyGreen%
+]{hyperref}
+
+\setlength{\topmargin}{-20pt}
+\setlength{\textheight}{648pt}
+\setlength{\oddsidemargin}{15pt}
+\setlength{\textwidth}{440pt}
+
+%#####################################################################
+%######################### Document Starts ###########################
+%#####################################################################
+\begin{document}
+
+This document uses ``\verb|econ-b.bst|''.
+
+\vspace{1em}
+
+\input{cited-part}
+\nocite{*}
+
+%% bst file:
+\bibliographystyle{econ-b}
+\bibliography{../econ-example}
+
+\end{document}
+
+%#####################################################################
+%######################### Document Ends #############################
+%#####################################################################
+% --------------------
+% Local Variables:
+% fill-column: 80
+% End:
diff --git a/biblio/bibtex/contrib/econ-bst/customization/econ-default.pdf b/biblio/bibtex/contrib/econ-bst/customization/econ-default.pdf
new file mode 100644
index 0000000000..9c740aad58
--- /dev/null
+++ b/biblio/bibtex/contrib/econ-bst/customization/econ-default.pdf
Binary files differ
diff --git a/biblio/bibtex/contrib/econ-bst/customization/econ-default.tex b/biblio/bibtex/contrib/econ-bst/customization/econ-default.tex
new file mode 100644
index 0000000000..43dbe40588
--- /dev/null
+++ b/biblio/bibtex/contrib/econ-bst/customization/econ-default.tex
@@ -0,0 +1,58 @@
+%#!pdflatex
+%#BIBTEX bibtex econ-default
+
+%############################## Main #################################
+\documentclass[10pt]{article}
+
+%% Use natbib.sty
+\usepackage[longnamesfirst]{natbib}
+\usepackage{mathpazo}
+\usepackage{url}
+\usepackage{graphicx}
+\usepackage{color}
+\definecolor{MyBrown}{rgb}{0.3,0,0}
+\definecolor{MyBlue}{rgb}{0,0,0.3}
+\definecolor{MyRed}{rgb}{0.4,0,0.1}
+\definecolor{MyGreen}{rgb}{0,0.4,0}
+\usepackage[bookmarks=true,%
+bookmarksnumbered=true,%
+colorlinks=true,%
+linkcolor=MyBlue,%
+citecolor=MyRed,%
+filecolor=MyBlue,%
+pagecolor=MyBlue,%
+urlcolor=MyGreen%
+]{hyperref}
+
+\setlength{\topmargin}{-20pt}
+\setlength{\textheight}{648pt}
+\setlength{\oddsidemargin}{15pt}
+\setlength{\textwidth}{440pt}
+
+%#####################################################################
+%######################### Document Starts ###########################
+%#####################################################################
+\begin{document}
+
+This document uses ``\verb|econ.bst|''.
+
+\vspace{1em}
+
+\input{cited-part}
+\nocite{*}
+
+%% bst file:
+\bibliographystyle{../econ}
+\bibliography{../econ-example}
+
+
+\end{document}
+
+
+%#####################################################################
+%######################### Document Ends #############################
+%#####################################################################
+% --------------------
+% Local Variables:
+% fill-column: 80
+% End:
diff --git a/biblio/bibtex/contrib/econ-bst/customization/econ-econometrica.bst b/biblio/bibtex/contrib/econ-bst/customization/econ-econometrica.bst
new file mode 100644
index 0000000000..89e5c51528
--- /dev/null
+++ b/biblio/bibtex/contrib/econ-bst/customization/econ-econometrica.bst
@@ -0,0 +1,3530 @@
+%% econ.bst: BibTeX style file for papers in economics.
+%
+% Author: Shiro Takeda
+% Maintainer: Shiro Takeda
+% Copyright (C) 2001-2018 Shiro Takeda
+% First-written: <2007/07/28>
+% Time-stamp: <2018-12-07 18:48:59 st>
+% Version: 2.4
+% Keywords: TeX, BibTeX, bst
+% URL: https://github.com/ShiroTakeda/econ-bst
+
+% This work may be distributed and/or modified under the
+% conditions of the LaTeX Project Public License, either version 1.3
+% of this license or (at your option) any later version.
+% The latest version of this license is in
+% http://www.latex-project.org/lppl.txt
+% and version 1.3 or later is part of all distributions of LaTeX
+% version 2005/12/01 or later.
+%
+% This work has the LPPL maintenance status "maintained".
+%
+% The Current Maintainer of this work is Shiro Takeda.
+
+%% Main features of econ.bst.
+
+% "econ.bst" is a BibTeX style file for economics. It provids the following
+% features:
+
+% 1) The author-year type citation (you need "natbib.sty" as well).
+% 2) Reference style used in economics papers ("econ.bst" is not a BibTeX style
+% for a specific journal).
+% 3) Highly customizable. You can easily customize reference style as you wish.
+% 4) You can use "certified random order" proposed by Ray ⓡ Robson (2018)
+% (http://dx.doi.org/10.1257/aer.20161492).
+
+% Bug reports, requests and suggestions are welcome.
+
+% For changelogs, see CHANGES.txt file.
+
+% version number
+FUNCTION {econ.version} { "2.5" }
+
+% Debug mode. Non-zero makes debug mode on.
+FUNCTION {econ.debug}
+{ #0 } % Debug mode off (default).
+% { #1 } % Debug mode on.
+
+ENTRY
+ %%% Declaration of field
+ { access address author booktitle chapter doi edition editor howpublished
+ institution journal key month note number organization pages publisher
+ school series title type url volume year
+ % Fields specific to econ.bst
+ order absorder nameorder
+ }
+
+ % Definition of entry variable. The entry variable is a variable which has
+ % different values according to different entries.
+ %% Integer entry variable:
+ { order.cited }
+
+ %% String entry variable
+ { label cyear flabel alabel extra.label sort.label sort.label.abb
+ extra.label.bysame nameorder.temp }
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%%
+%% Functions for customization:
+%%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+% Use \bysame or not.
+%
+% If set to #0, \bysame is not used.
+% If set to #1, \bysame is used
+% If set to #2, \bysame is used (alternative abbreviation style).
+%
+% Note that integer number is expressed as # + integer in bst file.
+% \bysame is the function that abbreviates succession of the same authors' name by ---.
+%
+% See econ-sample.pdf for details.
+%
+FUNCTION {bst.use.bysame}
+% { #0 } % Not use \bysame
+{ #1 } % -> Use \bysame (default)
+% { #2 } % -> Use \bysame of alternative style.
+
+% The definition of \bysame command.
+%
+FUNCTION {bst.bysame.definition}
+{ "\hskip.3em \leavevmode\rule[.5ex]{3em}{.3pt}\hskip0.5em" } % (default)
+% { "\leavevmode\hbox to\leftmargin{\hrulefill\,\,}" } % If you set #2 to bst.use.bysame, use this.
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+% The order of fist and last name.
+%
+FUNCTION {bst.author.name}
+{ #0 } % (default)
+% { #1 }
+% { #2 }
+
+% Case of #0: First author -> last-first, other authors -> first-last.
+% Fujita, Masahisa, Paul R. Krugman, and Anthony J. Venables.
+
+% Case of #1: All authors -> last-first
+% Fujita, Masahisa, Krugman, Paul R., and Venables, Anthony J.
+
+% Case of #2: All authors -> first-last
+% Masahisa Fujita, Paul R. Krugman, and Anthony J. Venables.
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+% Abbreviate first name of authors (editors):
+%
+FUNCTION {bst.first.name.initial}
+% { #0 } % #0 -> full letters (default).
+{ #1 } % Non-zero -> initial letter only.
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+% Decapitalize of strings in title field.
+%
+FUNCTION {bst.title.lower.case}
+{ #0 } % If #0, not decapitalize title (default).
+% { #1 } % If non-#0, decapitalize title
+
+% Hide title filed.
+%
+FUNCTION {bst.hide.title}
+{ #0 } % #0 -> Title field is displayed (default)
+% { #1 } % Non-zer -> Title field is hidden
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+% Hide month.
+%
+FUNCTION {bst.hide.month}
+{ #0 } % #0 -> show month field (default).
+% { #1 } % non-#0 -> hide month field.
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+% Attach number index like plain.bst.
+%
+FUNCTION {bst.use.number.index}
+{ #0 } % Not use number index (default).
+% { #1 } % Non-#0 -> Use number index
+
+% The string before number index:
+%
+FUNCTION {bst.number.index.pre}
+{ "[" } % (default)
+
+% The string after number index. Adjustment is recommended.
+%
+FUNCTION {bst.number.index.post}
+{ "]\hskip1.0em " } % (default)
+
+% Maximum digit of number index:
+% If the number of reference items >= 100, set 3 to this function.
+% If the number of reference items < 100, set 2 to this function.
+% If the number of reference items < 10, set 1 to this function.
+%
+FUNCTION {bst.number.index.digit}
+{ "2" } % (default)
+% { "3" }
+
+% The functions below are used to adjust space and postion. If you use fonts
+% other than computer modern fonts, you had better make adjustments.
+%
+% Setting for bst.number.index.digit = 1:
+FUNCTION {bst.number.index.bibhang.one}
+{ "2.05em" } % (default)
+% Setting for bst.number.index.digit = 2:
+FUNCTION {bst.number.index.bibhang.ten}
+{ "2.55em" } % (default)
+% Setting for bst.number.index.digit = 3:
+FUNCTION {bst.number.index.bibhang.hund}
+{ "3.05em" } % (default).
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+% Position of "year":
+%
+% You can choose the position of year by this function.
+%
+% If set to #0, year is placed right after "author".
+% If set to non-zero, year is placed at the end (before note field) except for
+% aritcle type entry.
+%
+% In article type entry, the position of year changes according to the
+% following rule:
+%
+% #1 -> year is placed at the end.
+% #2 -> year is placed after journal name in aritcle type entry.
+% #3 -> year is placed after volume in aritcle type entry.
+%
+FUNCTION {bst.year.position}
+{ #0 } % (default).
+% { #1 } % Last place before note.
+% { #2 } % After journal name for aticle type entry.
+% { #3 } % After volume for aticle type entry.
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+% If 0, references are sorted by old documents -> recent documents. If
+% non-zero, reverse order.
+FUNCTION {bst.reverse.year}
+{ #0 } % Normal order (old -> recent) (default).
+% { #1 } % inverse order (recent -> old)
+
+% If non-zero, sort references by using year field as the primary key
+% (chronological sorting).
+FUNCTION {bst.sort.year}
+{ #0 } % Normal case: year is used as the sorting key next to author (default).
+% { #1 } % year is used as the primary sorting key.
+
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+% If non-zero, references are listed in citation order.
+%
+FUNCTION {bst.no.sort}
+{ #0 } % (default)
+% { #1 } % listed in citation order.
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+% Non-zero -> sort references by entry type (article, book, incollection etc.)
+%
+FUNCTION {bst.sort.entry.type}
+{ #0 } % #0 -> Normal (not sort references by entry type) (default).
+% { #1 } % Non-zero -> sort references by entry type.
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+% 0 -> use absorder field to sort items. Otherwise, ignore absorder field.
+%
+FUNCTION {bst.notuse.absorder.field}
+{ #0 } % #0 -> Use absorder (default).
+% { #1 } % Non-#0 -> Not use absorder.
+%
+% Order of priority to sort items
+%
+% absorder -> author -> year -> order -> month -> title
+%
+% wehre absorder and order fields are specific to econ.bst.
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+% 0 -> use order field to sort items. Otherwise, ignore order field.
+% Note: order field is specific to econ.bst.
+FUNCTION {bst.notuse.order.field}
+{ #0 } % #0 -> Use order field (default).
+% { #1 } % Non-#0 -> not use order field.
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%%% and
+
+%%% String used to separate author names in references.
+%
+% String replaced with _ in "Mr. A _ Mr. B "
+%
+FUNCTION {bst.and}
+{ " and " } % (default)
+
+%%% String used to separate author names in references (more than two authors).
+%
+% String replaced with _ in "Mr. A, Mr. B _ Mr. C"
+%
+FUNCTION {bst.ands}
+{ ", and " } % (default)
+
+%%% String used to separate author names in citation part.
+%
+% String replaced with _ in "Mr. A _ Mr. B "
+%
+FUNCTION {bst.cite.and}
+{ " and " } % (default)
+
+%%% String used to separate author names in citation part (more than two authors).
+%
+% String replaced with _ in "Mr. A, Mr. B _ Mr. C"
+%
+FUNCTION {bst.cite.ands}
+{ " and " } % (default)
+
+%%% If you want to use random author order for some bibliography entries, set
+% non-zero to this function.
+%
+FUNCTION {bst.use.nameorder}
+{ #1 } % Use random order (default)
+% { #0 } % Not use random order
+
+%%% String used to separate author names in references for the entry of random
+% author order.
+%
+FUNCTION {bst.and.nameorder}
+{ " \textcircled{r} " } % (default)
+
+%%% String used to separate author names in citation part for the entry of
+% random author order
+%
+FUNCTION {bst.cite.and.nameorder}
+{ " \textcircled{r} " } % (default)
+
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+% Author names in the citation part are abbreviated by et al. if the number of
+% authors is greater or equal to bst.and.others.num.
+FUNCTION {bst.and.others.num}
+{ #3 } % If the number of authors is greater or equal to three (default).
+% { #4 }
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+% Strings used when abbreviating multiple-authors in citation part.
+FUNCTION {bst.and.others}
+{ " et~al." } % (default)
+
+% Strings used when abbreviating multiple-authors in citation part for entries
+% with random author order.
+FUNCTION {bst.and.others.nameorder}
+{ " \textcircled{r}~al." } % (default)
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% author
+
+% The string before author:
+%
+FUNCTION {bst.author.pre}
+{ "\textsc{" }
+% { "" } % (default)
+
+% The string after author:
+%
+FUNCTION {bst.author.post}
+{ "}" }
+% { "" } % (default)
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% year
+
+% The string before year only for aritcle type entry.
+%
+FUNCTION {bst.year.pre}
+{ " (" } % (default)
+
+% The string after year only for aritcle type entry.
+%
+FUNCTION {bst.year.post}
+{ "): " }
+% { ") " } % (default)
+
+% The string after year for non-article type entry (book, incollection etc)
+%
+FUNCTION {bst.year.na.pre}
+{ " (" } % (default)
+
+% The string after year for non-article type entry (book, incollection etc)
+%
+FUNCTION {bst.year.na.post}
+{ "): " }
+% { ") " } % (default)
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% title (except for title in book)
+
+% The string before title:
+%
+FUNCTION {bst.title.pre}
+{ "``" } % (default)
+
+% The string after title:
+%
+FUNCTION {bst.title.post}
+{ ",''" } % (default)
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% tile for book:
+
+% The string before book title:
+%
+FUNCTION {bst.book.pre}
+{ " \textit{" } % (default)
+
+% The string after book title:
+%
+FUNCTION {bst.book.post}
+{ "}" } % (default)
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% booktitle
+
+% The string before booktitle:
+%
+FUNCTION {bst.btitle.pre}
+{ " \textit{" } % (default)
+
+% The string after booktitle:
+%
+FUNCTION {bst.btitle.post}
+{ "}" } % (default)
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% journal name
+
+% The string before journal name:
+%
+FUNCTION {bst.journal.pre}
+{ " \textit{" } % (default)
+
+% The string after journal name:
+%
+FUNCTION {bst.journal.post}
+{ "}" } % (default)
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% editor notation:
+
+% The string that indicates multiple editors:
+%
+FUNCTION {bst.editors}
+{ " eds. " } % (default)
+
+% The string that indicates single editor:
+%
+FUNCTION {bst.editor}
+{ " ed. " } % (default)
+
+% Order of editor and booktitle in incollection and inproceedings entries.
+%
+% If set to #0: editors -> booktitle order
+% If set to non-zero: booktitle -> editors order
+%
+FUNCTION {bst.editor.btitle.order}
+{ #0 } % (default)
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% edition
+
+% The string before edition:
+%
+FUNCTION {bst.edition.pre}
+{ ", " } % (default)
+
+% The string after edition:
+%
+FUNCTION {bst.edition.post}
+{ " edition" } % (default)
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% volume
+
+% The string before volume:
+%
+FUNCTION {bst.volume.pre}
+{ ", " }
+% { ", Vol. " } % (default)
+
+% The string after volume:
+%
+FUNCTION {bst.volume.post}
+{ "" } % (default)
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% number
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+% Hide number. If non-zero, number is suppressed.
+FUNCTION {bst.hide.number}
+{ #0 } % #0 -> show number field (default)
+% { #1 } % non-#0 -> Hide number field.
+
+% The string before number:
+%
+FUNCTION {bst.number.pre}
+{ " (" }
+% { ", No. " } % (default)
+
+% The string after number:
+%
+FUNCTION {bst.number.post}
+{ ")" }
+% { "" } % (default)
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% in
+
+% In
+%
+FUNCTION {bst.in}
+{ " in " } % (default)
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% page
+
+% The string before page (multiple pages):
+%
+FUNCTION {bst.pages.pre}
+{ ", " }
+% { ", pp." } % (default)
+
+% The string before page:
+%
+FUNCTION {bst.page.pre}
+{ ", " }
+% { ", p." } % (default)
+
+% The string after page (multiple pages):
+%
+FUNCTION {bst.pages.post}
+{ "" } % (default)
+
+% The string after page:
+%
+FUNCTION {bst.page.post}
+{ "" } % (default)
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% chapter
+
+% The string before chapter:
+%
+FUNCTION {bst.chapter.pre}
+{ ", Chap." } % (default)
+
+% The string after chapter:
+%
+FUNCTION {bst.chapter.post}
+{ "" } % (default)
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% month
+
+% The string before month:
+%
+FUNCTION {bst.month.pre}
+{ ", " } % (default)
+
+% The string after month:
+%
+FUNCTION {bst.month.post}
+{ "" } % (default)
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% address
+% The string before address:
+%
+FUNCTION {bst.address.pre}
+{ ", " } % (default)
+
+% The string after address:
+%
+FUNCTION {bst.address.post}
+{ "" } % (default)
+
+% You can choose the order of address and publisher by this function.
+%
+% If #0, address -> publisher order (the default value).
+% If non-zero, publisher -> address order.
+
+FUNCTION {bst.address.position}
+{ #0 } % Address is placed before publisher (default)
+% { #1 } % Address is placed after publisher
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% publisher
+
+% The string before publisher:
+%
+FUNCTION {bst.publisher.pre}
+{ ": " } % (default)
+
+% The string after publisher:
+%
+FUNCTION {bst.publisher.post}
+{ "" } % (default)
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% series
+
+% The string before series:
+%
+FUNCTION {bst.series.pre}
+{ ", " } % (default)
+
+% The string after series:
+%
+FUNCTION {bst.series.post}
+{ "" } % (default)
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% organization
+
+% The string before organization:
+%
+FUNCTION {bst.organization.pre}
+{ ", " } % (default)
+
+% The string after organization:
+%
+FUNCTION {bst.organization.post}
+{ "" } % (default)
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% school
+
+% The string before school:
+%
+FUNCTION {bst.school.pre}
+{ ", " } % (default)
+
+% The string after school:
+%
+FUNCTION {bst.school.post}
+{ "" } % (default)
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% institution
+
+% The string before institution:
+%
+FUNCTION {bst.institution.pre}
+{ ", " } % (default)
+
+% The string after institution:
+%
+FUNCTION {bst.institution.post}
+{ "" } % (default)
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% howpublished
+
+% The string before howpublished:
+%
+FUNCTION {bst.howpublished.pre}
+{ " " } % (default)
+
+% The string after howpublished:
+%
+FUNCTION {bst.howpublished.post}
+{ "" } % (default)
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% url
+
+% Show or Hide url. If non-zero, url is displayed. Otherwise, url is suppressed.
+FUNCTION {bst.show.url}
+{ #1 } % non-#0 -> Show url field (default)
+% { #0 } % #0 -> Not show url field.
+
+% The string before url:
+%
+FUNCTION {bst.url.pre}
+{ ", URL: \url{" } % (default)
+
+% The string after url:
+%
+FUNCTION {bst.url.post}
+{ "}" } % (default)
+
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% Access
+
+% This setting is valid only if there are "access" field in bib
+% files. The value of access field indicates accessed date for URL.
+
+% The string before access.
+FUNCTION {bst.access.pre}
+{ ", accessed on " } % (default)
+
+% The string after access.
+FUNCTION {bst.access.post}
+{ "" } % (default)
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% DOI (digital object identifier)
+
+% This setting is valid only if there are "doi" field in bib files.
+
+% Show or Hide DOI. If non-zero, DOI is displayed. Otherwise, DOI is suppressed.
+FUNCTION {bst.show.doi}
+{ #1 } % non-#0 -> Show DOI field (default)
+% { #0 } % #0 -> Not show DOI field.
+
+% The string before DOI:
+%
+FUNCTION {bst.doi.pre}
+{ ", DOI: \href{http://dx.doi.org/" doi * "}{" * } % (default)
+
+% The string after DOI:
+%
+FUNCTION {bst.doi.post}
+{ "}" } % (default)
+
+% How to show URL and DOI fields when both fields exist.
+%
+% #0 -> Both fields are displayed
+% #1 -> Only URL field is displayed
+% #2 -> Only DOI field is displayed
+%
+FUNCTION {bst.url.doi}
+% { #0 } % (default) -> Both fields are displayed
+% { #1 } % -> Only URL field is displayed
+{ #2 } % -> Only DOI field is displayed
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% Other functions:
+
+% The string before note.
+FUNCTION {bst.note.pre}
+{ ", " } % (default)
+
+% The string after note.
+FUNCTION {bst.note.post}
+{ "" } % (default)
+
+% The string that represents Technical report:
+%
+FUNCTION {bst.techrep}
+{ " Tech. Rep." } % (default)
+
+% The string that represents master thesis:
+%
+FUNCTION {bst.mthesis}
+{ " Master's thesis" } % (default)
+
+% The string that represents phd thesis:
+%
+FUNCTION {bst.phdthesis}
+{ " Ph.D. dissertation" } % (default)
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%%
+%% Functions for customization end here:
+%%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+FUNCTION {bst.first}
+{ "1st" }
+
+FUNCTION {bst.second}
+{ "2nd" }
+
+FUNCTION {bst.third}
+{ "3rd" }
+
+FUNCTION {bst.fourth}
+{ "4th" }
+
+FUNCTION {bst.fifth}
+{ "5th" }
+
+FUNCTION {bst.st}
+{ "st" }
+
+FUNCTION {bst.nd}
+{ "nd" }
+
+FUNCTION {bst.rd}
+{ "rd" }
+
+FUNCTION {bst.th}
+{ "th" }
+
+%%%%% memo by Takeda
+
+% "a" 'b := indicates substituting string "a" for variable b.
+
+% Integer number #0, #1,...
+
+%%% Function definition:
+%
+% FUNCTION {name}
+% { 's :=
+%
+% }
+%
+% This is the definition of a function named "name". The function "name" is
+% used in the following way
+%
+% "foo" name
+% "foo" is an argument for the function "name".
+%
+% About the definition of a function with more than two arguments, see the
+% definition of "chop.word".
+
+%%% Declaration of variables:
+
+%% String global variables:
+STRINGS { s t tt }
+STRINGS { year.num }
+STRINGS { preone preten }
+STRINGS { last.sort.label next.extra prev.author prev.author.aer this.author }
+STRINGS { hang }
+STRINGS { item.type }
+STRINGS { tempa tempb }
+
+%% Integer global variables:
+INTEGERS { nameptr namesleft numnames name.num }
+INTEGERS { multiresult }
+INTEGERS { index }
+INTEGERS { len }
+INTEGERS { last.extra.num }
+INTEGERS { output.state before.all mid.sentence after.sentence after.block }
+INTEGERS { last.period.comma }
+INTEGERS { len1.aer len2.aer i.aer }
+
+%%% Definition of functions:
+FUNCTION {not}
+{ { #0 }
+ { #1 }
+ if$
+}
+
+FUNCTION {and}
+{ 'skip$
+ { pop$ #0 }
+ if$
+}
+
+FUNCTION {or}
+{ { pop$ #1 }
+ 'skip$
+ if$
+}
+
+%%% Initialize variables:
+FUNCTION {init.state.consts}
+{ #0 'before.all :=
+ #1 'mid.sentence :=
+ #2 'after.sentence :=
+ #3 'after.block :=
+}
+
+%%% Remove comma and add period:
+%
+%%%
+FUNCTION {add.period.x}
+{ duplicate$
+ #-1 #1 substring$ "," =
+ { #-2 global.max$ substring$ "." * }
+ { duplicate$
+ #-1 #2 substring$ ". " =
+ { #-3 global.max$ substring$ "." * }
+ { duplicate$
+ #-1 #2 substring$ ", " =
+ { #-3 global.max$ substring$ "." * }
+ { duplicate$
+ #-1 #2 substring$ ",'" =
+ { #-3 global.max$ substring$ ".'" * }
+ { duplicate$
+ #-1 #2 substring$ ".'" =
+ { #-3 global.max$ substring$ ".'" * }
+ { duplicate$
+ #-1 #2 substring$ ".~" =
+ { #-3 global.max$ substring$ ".~" * }
+ { duplicate$
+ #-1 #2 substring$ ",~" =
+ { #-3 global.max$ substring$ ".~" * }
+ { duplicate$
+ #-1 #3 substring$ ",''" =
+ { #-4 global.max$ substring$ ".''" * }
+ { duplicate$
+ #-1 #3 substring$ ".''" =
+ { #-4 global.max$ substring$ ".''" * }
+ { add.period$ }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+}
+
+FUNCTION {output.nonnull}
+{ 's :=
+ % mid.sentence
+ output.state mid.sentence =
+ { ", " * write$ }
+ % not mid.sentence
+ { output.state after.block =
+ % after.block
+ { add.period.x " " * write$ }
+ % before.all
+ { output.state before.all =
+ 'write$
+ { add.period.x " " * write$ }
+ if$
+ }
+ if$
+ % not mid.sentence, set to mid.sentence
+ mid.sentence 'output.state :=
+ }
+ if$
+ s
+}
+
+%%% If the last character is period or comma, set non-zero to
+%%% last.period.comma.
+FUNCTION {period.comma.p}
+{ duplicate$ 't :=
+ t #-1 #1 substring$ "." =
+ t #-1 #1 substring$ "," = or
+ t #-1 #1 substring$ ":" = or
+ t #-1 #2 substring$ ".'" = or
+ t #-1 #2 substring$ ",'" = or
+ t #-1 #3 substring$ ".''" = or
+ t #-1 #3 substring$ ",''" = or
+ t #-1 #2 substring$ ".~" = or
+ t #-1 #2 substring$ ",~" = or
+ { #1 'last.period.comma := }
+ { #0 'last.period.comma := }
+ if$
+}
+
+%%% remove unnecessary comma.
+FUNCTION {remove.pre.comma}
+{ 's :=
+ s empty$
+ { "" }
+ { s #1 #1 substring$ "," =
+ { s #2 global.max$ substring$ }
+ { s #1 #1 substring$ "." =
+ { s #2 global.max$ substring$ }
+ 's
+ if$
+ }
+ if$
+ }
+ if$
+}
+
+%%% output.nonnull.nocomma is the same as output.nonnull except that it does
+%%% not add commas even in mid.sentence.
+FUNCTION {output.nonnull.nocomma}
+{ 's :=
+ output.state mid.sentence =
+ % mid.sentence
+ { period.comma.p "" * write$ }
+
+ % not mid.sentence
+ { output.state after.block =
+ % after.block
+ { add.period.x " " * write$ }
+ % before.all
+ { output.state before.all =
+ 'write$
+ { add.period$ " " * write$ }
+ if$
+ }
+ if$
+ mid.sentence 'output.state :=
+ }
+ if$
+ last.period.comma #0 =
+ { s }
+ { s remove.pre.comma }
+ if$
+}
+
+% Not used in the current econ.bst.
+% FUNCTION {output}
+% { duplicate$ empty$
+% 'pop$
+% 'output.nonnull
+% if$
+% }
+
+FUNCTION {output.nocomma}
+{ duplicate$ empty$
+ 'pop$
+ 'output.nonnull.nocomma
+ if$
+}
+
+% Not used in the current econ.bst.
+% FUNCTION {output.check}
+% { 't :=
+% duplicate$ empty$
+% { pop$ "empty " t * " in " * cite$ * warning$ }
+% 'output.nonnull
+% if$
+% }
+
+FUNCTION {output.check.nocomma}
+{ 't :=
+ duplicate$ empty$
+ { pop$ "empty " t * " in " * cite$ * warning$ }
+ 'output.nonnull.nocomma
+ if$
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%%% Format in bbl file:
+
+% \harvarditem[Brezis et~al.]{Brezis, Krugman and
+% Tsiddon}{1993}{brezis93:_leapf_inter_compet}
+% Brezis, Elise~S., Paul~R. Krugman, and Daniel Tsiddon (1993) ``Leapfrogging in
+% International Competition: A Theory of Cycles in National Technological
+% Leadership.'', {\em American Economic Review.}, Vol.~83. No.~5. pp.
+% 1211--1219.
+
+% \harvarditem[abbreviated citation]{full citation}{year}{keyword} ...
+
+%%% Add period and newline.
+FUNCTION {fin.entry}
+{ add.period.x
+ write$
+ newline$
+}
+
+FUNCTION {new.block}
+{ output.state before.all =
+ 'skip$
+ { after.block 'output.state := }
+ if$
+}
+
+FUNCTION {new.sentence}
+{ output.state after.block =
+ 'skip$
+ { output.state before.all =
+ 'skip$
+ { after.sentence 'output.state := }
+ if$
+ }
+ if$
+}
+
+FUNCTION {new.block.check}
+{ empty$
+ 'skip$
+ 'new.block
+ if$
+}
+
+FUNCTION {field.or.null}
+{ duplicate$ empty$
+ { pop$ "" }
+ 'skip$
+ if$
+}
+
+%%% booktitle
+FUNCTION {format.btitle}
+{ booktitle empty$
+ { "" }
+ { bst.btitle.pre booktitle * bst.btitle.post * }
+ if$
+}
+
+%%% journal
+FUNCTION {format.journal}
+{ journal empty$
+ { "" }
+ { bst.journal.pre journal * bst.journal.post * }
+ if$
+}
+
+%%% title for book
+FUNCTION {format.book}
+{ title empty$
+ { "" }
+ { bst.book.pre title * bst.book.post * }
+ if$
+}
+
+FUNCTION {format.url}
+{ url empty$
+ { "" }
+ { type$ "online" = bst.show.url or
+ { bst.url.pre url * bst.url.post *
+ access empty$
+ { "" * }
+ { bst.access.pre * access * bst.access.post * }
+ if$
+ }
+ { "" }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.doi}
+{ doi empty$ bst.show.doi not or
+ { "" }
+ { bst.doi.pre doi * bst.doi.post * }
+ if$
+}
+
+FUNCTION {format.url.doi}
+{ url empty$
+ { format.doi }
+ { doi empty$
+ { format.url }
+ { bst.url.doi #0 =
+ { format.url output.nocomma
+ format.doi }
+ { bst.url.doi #1 =
+ { format.url }
+ { format.doi }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+}
+
+%%% and others
+FUNCTION {bst.and.others.output}
+{ nameorder.temp "random" =
+ bst.use.nameorder #0 = not and
+ { bst.and.others.nameorder }
+ { bst.and.others }
+ if$
+}
+
+%%% author and editor
+
+%%% name
+FUNCTION {format.names}
+{ 's :=
+ % insert 1 to nameptr.
+ #1 'nameptr :=
+ % Set the number of authors to numnames.
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ % Repeat if namesleft > 0
+ { namesleft #0 > }
+ { nameptr #1 =
+ % First author
+ { bst.author.name #0 =
+ bst.author.name #1 =
+ or
+ { bst.first.name.initial #0 =
+ { s nameptr "{vv~}{ll}{, ff}{, jj}" format.name$ 't := }
+ { s nameptr "{vv~}{ll}{, f.}{, jj}" format.name$ 't := }
+ if$
+ }
+ { bst.first.name.initial #0 =
+ { s nameptr "{ff~}{vv~}{ll}{, jj}" format.name$ 't := }
+ { s nameptr "{f.~}{vv~}{ll}{, jj}" format.name$ 't := }
+ if$
+ }
+ if$
+ }
+ % The second or later authors
+ { bst.author.name #0 =
+ bst.author.name #2 =
+ or
+ { bst.first.name.initial #0 =
+ { s nameptr "{ff~}{vv~}{ll}{, jj}" format.name$ 't := }
+ { s nameptr "{f.~}{vv~}{ll}{, jj}" format.name$ 't := }
+ if$
+ }
+ { bst.first.name.initial #0 =
+ { s nameptr "{vv~}{ll}{, ff}{, jj}" format.name$ 't := }
+ { s nameptr "{vv~}{ll}{, f.}{, jj}" format.name$ 't := }
+ if$
+ }
+ if$
+ }
+ if$
+
+ nameptr #1 >
+ % The second or later authors
+ { nameorder.temp "random" =
+ bst.use.nameorder #0 = not and
+ { bst.and.nameorder * t * }
+ { namesleft #1 >
+ % More than one authors left
+ { ", " * t * }
+ % Only one author left
+ { t "others" =
+ { bst.and.others.output * }
+ { numnames #2 =
+ % Entry with two authors
+ { bst.and * t * }
+ { bst.ands * t * }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ 't
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+}
+
+% remove successive periods (commas) from author
+FUNCTION {remove.ss.period.auth}
+{ 's :=
+ s format.names 'tempa :=
+ bst.author.post 'tempb :=
+ tempb #1 #1 substring$ "}" =
+ { tempa tempb * }
+ { tempa #-1 #1 substring$ tempb #1 #1 substring$ =
+ { tempa tempb #2 global.max$ substring$ * }
+ { tempa tempb * }
+ if$
+ }
+ if$
+}
+
+% <prev name list> <new name list> compare.names <modified name list>
+FUNCTION {compare.names.aer}
+{ 's :=
+ 'tempa :=
+
+% "current.author = " s * "\\" * write$ newline$
+% "prev.author = " tempa * "\\" * write$ newline$
+
+ tempa num.names$ 'len1.aer := % len1 = the number of previous authors
+ s num.names$ 'len2.aer := % len2 = the number of current authors
+
+% len1.aer := min(len1.aer,len2.aer)
+% len1 -> min{ the number of previous authors, the number of current authors }
+ len1.aer len2.aer >
+ { len2.aer 'len1.aer := }
+ { }
+ if$
+
+% start with an empty string, then while the components are the same
+% add "\bysame"
+ ""
+ #1 'i.aer :=
+
+ { i.aer len1.aer > not }
+ { tempa i.aer "{ff }{vv }{ll}{ jj}" format.name$
+ s i.aer "{ff }{vv }{ll}{ jj}" format.name$
+ =
+ { #1 i.aer <
+ { " and " * } % \bysame で省略する著者の前につく and
+ { }
+ if$
+ "\bysame{}" *
+ i.aer #1 + 'i.aer := }
+ { #-1 'len1.aer := }
+ if$
+ }
+ while$
+
+% add the rest of the second string
+ { i.aer len2.aer > not }
+ { #1 i.aer <
+ { " and " * }
+ { }
+ if$
+ s i.aer "{ff }{vv }{ll}{ jj}" format.name$ *
+ i.aer #1 + 'i.aer :=
+ }
+ while$
+}
+
+%%% author
+FUNCTION {format.authors}
+{ author empty$
+ { "" }
+ { bst.use.bysame #2 =
+ { prev.author.aer author compare.names.aer 's :=
+ author 'prev.author.aer := }
+ { author 's := }
+ if$
+ extra.label.bysame "bysame" =
+ { "\bysame " }
+ { bst.author.pre s remove.ss.period.auth * }
+ if$
+ }
+ if$
+}
+
+%%% editor
+FUNCTION {format.editors}
+{ editor empty$
+ { "" }
+ { bst.use.bysame #2 =
+ { prev.author.aer editor compare.names.aer 's :=
+ editor 'prev.author.aer := }
+ { editor 's := }
+ if$
+ extra.label.bysame "bysame" =
+ { "\bysame " }
+ { bst.author.pre s remove.ss.period.auth * }
+ if$
+ s num.names$ #1 >
+ { bst.editors * }
+ { bst.editor * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.authors.alt}
+{ author empty$
+ { "" }
+ { extra.label.bysame "bysame" =
+ {"\bysame "}
+ { bst.author.pre author remove.ss.period.auth * }
+ if$
+ }
+ if$
+}
+
+%%% editor
+FUNCTION {format.editors.alt}
+{ editor empty$
+ { "" }
+ { extra.label.bysame "bysame" =
+ { "\bysame " }
+ { bst.author.pre editor remove.ss.period.auth * }
+ if$
+ editor num.names$ #1 >
+ { bst.editors * }
+ { bst.editor * }
+ if$
+ }
+ if$
+}
+
+%%% format.in.ed.booktitle
+FUNCTION {format.editors.x}
+{ editor empty$
+ { "" }
+ { bst.editor.btitle.order #0 =
+ { "" }
+ { editor num.names$ #1 >
+ { bst.editors " by " * }
+ { bst.editor " by " * }
+ if$
+ }
+ if$
+ editor format.names *
+ bst.editor.btitle.order #0 =
+ { editor num.names$ #1 >
+ { bst.editors * }
+ { bst.editor * }
+ if$
+ }
+ { "" * }
+ if$
+ }
+ if$
+}
+
+%%% Remove commas in the cases like "?." and "?,".
+FUNCTION {remove.irrelevant.period.comma}
+{ 's :=
+ s empty$
+ { "" }
+ { s #-1 #3 substring$ "?,'" =
+ s #-1 #3 substring$ "?.'" = or
+ { s #-3 global.max$ substring$ "'" * }
+ { s #-1 #4 substring$ "?,''" =
+ s #-1 #4 substring$ "?.''" = or
+ { s #-4 global.max$ substring$ "''" * }
+ { s #-1 #2 substring$ "?," =
+ s #-1 #2 substring$ "?." = or
+ { s #-2 global.max$ substring$ "" * }
+ { s #-1 #3 substring$ "?,~" =
+ s #-1 #3 substring$ "?.~" = or
+ { s #-4 global.max$ substring$ "?~" * }
+ 's
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+}
+
+%%% title
+FUNCTION {format.title.sub}
+{ bst.title.lower.case #0 =
+ { bst.title.pre title * bst.title.post * }
+ { bst.title.pre title "t" change.case$ * bst.title.post * }
+ if$
+}
+
+%%% title
+FUNCTION {format.title}
+{ title empty$
+ bst.hide.title #0 = not or
+ { "" }
+ { format.title.sub remove.irrelevant.period.comma }
+ if$
+}
+
+%%% title for misc.
+FUNCTION {format.misc.title}
+{ title empty$
+ { "" }
+ { bst.title.pre title * bst.title.post * }
+ if$
+}
+
+% Convert "-" to "--" (for pages field)
+FUNCTION {n.dashify}
+{ 't :=
+ ""
+ %% while$
+ { t empty$ not }
+ { t #1 #1 substring$ "-" =
+ { t #1 #2 substring$ "--" = not
+ { "--" *
+ t #2 global.max$ substring$ 't :=
+ }
+ { { t #1 #1 substring$ "-" = }
+ { "-" *
+ t #2 global.max$ substring$ 't :=
+ }
+ while$
+ }
+ if$
+ }
+ { t #1 #1 substring$ *
+ t #2 global.max$ substring$ 't :=
+ }
+ if$
+ }
+ while$
+}
+
+%%% year
+FUNCTION {format.year}
+{ year empty$
+ { "there's no year in " cite$ * warning$
+ ", " }
+ { type$ "article" =
+ { bst.year.pre year * extra.label * bst.year.post * }
+ { bst.year.na.pre year * extra.label * bst.year.na.post * }
+ if$
+ }
+ if$
+}
+
+%%% page for book
+FUNCTION {format.book.pages}
+{ pages empty$
+ { "" }
+ { bst.pages.pre pages * bst.pages.post * }
+ if$
+}
+
+%%% Attach tie for the string with two or less characters.
+FUNCTION {tie.or.space.connect}
+{ duplicate$ text.length$ #3 <
+ { "~" }
+ { " " }
+ if$
+ swap$ * *
+}
+
+FUNCTION {either.or.check}
+{ empty$
+ 'pop$
+ { "can't use both " swap$ * " fields in " * cite$ * warning$ }
+ if$
+}
+
+%%% volume for book
+FUNCTION {format.bvolume}
+{ volume empty$
+ { "" }
+ { bst.volume.pre volume * bst.volume.post *
+ series empty$
+ 'skip$
+ %% If there is series field
+ { " of " * series * bst.series.post * }
+ if$
+% "volume and number" number either.or.check
+ }
+ if$
+}
+
+%%% series
+FUNCTION {output.series}
+{ series empty$
+ { "" }
+ { bst.series.pre series * bst.series.post * }
+ if$
+}
+
+%%% number and series
+FUNCTION {format.number.series}
+{ volume empty$
+ { number empty$
+ bst.hide.month #0 = not or
+ % number is empty
+ { series empty$
+ { "" }
+ % series is not empty.
+ { output.series }
+ if$
+ }
+ % number is not empty$
+ { series empty$
+ { bst.number.pre number * bst.number.post * }
+ % series is not empty.
+ { bst.in bst.series.pre * series * bst.series.post *
+ bst.number.pre * number * bst.number.post * }
+ if$
+ }
+ if$
+ }
+ { "" }
+ if$
+}
+
+%%% Number or not.
+FUNCTION {is.num}
+{ chr.to.int$
+ duplicate$ "0" chr.to.int$ < not
+ swap$ "9" chr.to.int$ > not and
+}
+
+FUNCTION {extract.num}
+{ duplicate$ 't :=
+ "" 's :=
+ { t empty$ not }
+ { t #1 #1 substring$
+ t #2 global.max$ substring$ 't :=
+ duplicate$ is.num
+ { s swap$ * 's := }
+ { pop$ "" 't := }
+ if$
+ }
+ while$
+ s empty$
+ 'skip$
+ { pop$ s }
+ if$
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% edition
+
+% Convert edition to 1st, 2nd, 3rd, 4th etc
+FUNCTION {eng.ord}
+{ duplicate$ "1" swap$ *
+ #-2 #1 substring$ "1" =
+ { bst.th * }
+ { duplicate$ #-1 #1 substring$
+ duplicate$ "1" =
+ { pop$ bst.st * }
+ { duplicate$ "2" =
+ { pop$ bst.nd * }
+ { "3" =
+ { bst.rd * }
+ { bst.th * }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+}
+
+% Convert first, second etc in edition field to 1st, 2nd (from jfm.bst)
+FUNCTION {convert.edition}
+{ edition extract.num "l" change.case$ 's :=
+ s "first" = s "1" = or
+ { bst.first }
+ { s "second" = s "2" = or
+ { bst.second }
+ { s "third" = s "3" = or
+ { bst.third }
+ { s "fourth" = s "4" = or
+ { bst.fourth }
+ { s "fifth" = s "5" = or
+ { bst.fifth }
+ { s #1 #1 substring$ is.num
+ { s eng.ord }
+ { edition }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+}
+
+%%% edition
+FUNCTION {format.edition}
+{ edition empty$
+ { "" }
+ { output.state mid.sentence =
+ { bst.edition.pre convert.edition "l" change.case$ * bst.edition.post * }
+ { bst.edition.pre convert.edition "t" change.case$ * bst.edition.post * }
+ if$
+ }
+ if$
+}
+
+%%% month
+FUNCTION {format.month}
+{ month empty$
+ bst.hide.month #0 = not or
+ { "" }
+ { bst.month.pre month * bst.month.post * }
+ if$
+}
+
+%%% year and month
+FUNCTION {format.date}
+{ format.month format.year *
+}
+
+%%% Is multiple pages like 1-100?
+FUNCTION { multi.page.check }
+{ 't :=
+ #0 'multiresult :=
+ { multiresult not
+ t empty$ not
+ and
+ }
+ { t #1 #1 substring$
+ duplicate$ "-" =
+ swap$ duplicate$ "," =
+ swap$ "+" =
+ or or
+ { #1 'multiresult := }
+ { t #2 global.max$ substring$ 't := }
+ if$
+ }
+ while$
+ multiresult
+}
+
+%%% pages
+FUNCTION {format.pages}
+{ pages empty$
+ { "" }
+ { pages multi.page.check
+ { bst.pages.pre pages n.dashify tie.or.space.connect * bst.pages.post }
+ { bst.page.pre pages tie.or.space.connect * bst.page.post }
+ if$
+ }
+ if$
+}
+
+%%% number
+FUNCTION {format.number}
+{ number empty$
+ bst.hide.number #0 = not or
+ { "" }
+ { bst.number.pre number * bst.number.post * }
+ if$
+}
+
+%%% volume
+FUNCTION {format.volume}
+{ volume empty$
+ 'skip$
+ { bst.volume.pre volume * bst.volume.post *
+ bst.year.position #3 =
+ { format.year * }
+ 'skip$
+ if$
+ }
+ if$
+}
+
+%%% number, page
+FUNCTION {format.number.pages}
+{ number empty$
+ { format.pages }
+ { format.number format.pages * }
+ if$
+}
+
+%%% volume, page
+FUNCTION {format.volume.pages}
+{ volume empty$
+ { format.pages }
+ { format.volume format.pages * }
+ if$
+}
+
+%%% volume, number, page
+FUNCTION {format.volume.number.pages}
+{ volume empty$
+ { number empty$
+ { format.pages }
+ { format.number format.pages * }
+ if$
+ }
+ { number empty$
+ { format.volume format.pages * }
+ { format.volume format.number * format.pages * }
+ if$
+ }
+ if$
+}
+
+% volume, number, page
+FUNCTION {format.vol.num.pages}
+{ volume empty$
+ %% volume is empty.
+ { number empty$
+ %% number is empty.
+ { pages empty$
+ % warning
+ { "there is no volume, number, and pages in " cite$ * warning$ "" }
+ { "" format.pages * }
+ if$
+ }
+ %% number is not empty.
+ % warning
+ { "there's a number but no volume in " cite$ * warning$
+ format.number.pages }
+ if$
+ }
+ %% volume is not empty.
+ { number empty$
+ %% number is empty.
+ { format.volume.pages }
+ %% number is not empty.
+ { format.volume.number.pages }
+ if$
+ }
+ if$
+}
+
+%%% chapter
+FUNCTION {format.chapter}
+{ chapter empty$
+ { "" }
+ { type empty$
+ { bst.chapter.pre chapter tie.or.space.connect * bst.chapter.post }
+ { ", " * type " " * chapter * }
+ if$
+ }
+ if$
+}
+
+%%% chapter, pages
+FUNCTION {format.chapter.pages}
+{ chapter empty$
+ { pages empty$
+ { "" }
+ { "" format.pages * }
+ if$
+ }
+ { pages empty$
+ { "" format.chapter * }
+ { "" format.chapter * format.pages * }
+ if$
+ }
+ if$
+}
+
+%%% editor and booktitle
+FUNCTION {format.in.ed.booktitle}
+{ booktitle empty$
+ { "" }
+ { editor empty$
+ { bst.in format.btitle * }
+ { bst.editor.btitle.order #0 =
+ { bst.in format.editors.x * " " * format.btitle * }
+ { bst.in format.btitle * " " * format.editors.x * }
+ if$
+ }
+ if$
+ }
+ if$
+}
+
+%%% howpublished
+FUNCTION {format.howpublished}
+{ howpublished empty$
+ { "" }
+ { bst.howpublished.pre howpublished * bst.howpublished.post * }
+ if$
+}
+
+%%% address
+FUNCTION {format.address}
+{ address empty$
+ { "" }
+ { bst.address.pre address * bst.address.post * }
+ if$
+}
+
+%%% publisher
+FUNCTION {format.publisher}
+{ publisher empty$
+ { "" }
+ { bst.publisher.pre publisher * bst.publisher.post * }
+ if$
+}
+
+%%% organization
+FUNCTION {format.organization}
+{ organization empty$
+ { "" }
+ { bst.organization.pre organization * bst.organization.post * }
+ if$
+}
+
+%% publisher and address
+FUNCTION {output.publisher.address}
+{ address empty$
+ { format.publisher "publisher" output.check.nocomma }
+ { bst.address.position #0 =
+ { format.address output.nocomma
+ format.publisher "publisher" output.check.nocomma }
+ { format.publisher "publisher" output.check.nocomma
+ format.address output.nocomma }
+ if$
+ }
+ if$
+}
+
+%% address, organization, publisher
+FUNCTION {output.address.organization.publisher}
+{ address empty$
+ %% address is empty
+ { organization empty$
+ %% organization is empty
+ { publisher empty$
+ 'skip$
+ { format.publisher "publisher" output.check.nocomma }
+ if$
+ }
+ %% organization is not empty
+ { publisher empty$
+ { format.organization "organization" output.check.nocomma }
+ { format.organization "organization" output.check.nocomma
+ format.publisher "publisher" output.check.nocomma }
+ if$
+ }
+ if$
+ }
+ %% address is not empty
+ { organization empty$
+ %% organization is empty
+ { publisher empty$
+ %% publisher is empty
+ { format.address output.nocomma }
+ %% publisher is not empty
+ { bst.address.position #0 =
+ { format.address output.nocomma
+ format.publisher "publisher" output.check.nocomma }
+ { format.publisher "publisher" output.check.nocomma
+ format.address output.nocomma }
+ if$
+ }
+ if$
+ }
+ %% organization is not empty
+ { publisher empty$
+ %% publisher is empty
+ { format.organization "organization" output.check.nocomma
+ format.address output.nocomma }
+ %% publisher is not empty
+ { format.organization "organization" output.check.nocomma
+ bst.address.position #0 =
+ { format.address output.nocomma
+ format.publisher "publisher" output.check.nocomma }
+ { format.publisher "publisher" output.check.nocomma
+ format.address output.nocomma }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+}
+
+%%% misc
+FUNCTION {empty.misc.check}
+{ author empty$ title empty$ howpublished empty$
+ month empty$ year empty$ note empty$
+ and and and and and
+ key empty$ not and
+ { "all relevant fields are empty in " cite$ * warning$ }
+ 'skip$
+ if$
+}
+
+FUNCTION {format.thesis.type}
+{ type empty$
+ 'skip$
+ { pop$ " " type * }
+ if$
+}
+
+FUNCTION {format.tr.number}
+{ type empty$
+ { "Technical Report" }
+ { " " type * }
+ if$
+ number empty$
+ { "t" change.case$ }
+ { number tie.or.space.connect }
+ if$
+}
+
+%%% phdthesis
+FUNCTION {format.phd}
+{ bst.phdthesis }
+
+%%% mastersthesis
+FUNCTION {format.mthesis}
+{ bst.mthesis }
+
+%%% school
+FUNCTION {format.school}
+{ school empty$
+ { "" }
+ { bst.school.pre school * bst.school.post * }
+ if$
+}
+
+%%% institution
+FUNCTION {format.institution}
+{ institution empty$
+ { "" }
+ { bst.institution.pre institution * bst.institution.post * }
+ if$
+}
+
+%%% remove first ? characters.
+FUNCTION {chop.word}
+{ 's :=
+ 'len :=
+ s #1 len substring$ =
+ { s len #1 + global.max$ substring$ }
+ 's
+ if$
+}
+
+FUNCTION {format.note}
+{ note empty$
+ { "" }
+ { bst.note.pre note * bst.note.post * }
+ if$
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% \havarditem
+
+FUNCTION {output.bibitem}
+{ newline$
+ "\harvarditem[" write$
+ alabel write$ % alabel <- abbreviated citation
+ "]{" write$
+ flabel write$ % flabel <- full citation
+ "}{" write$
+ cyear write$
+ % cyear = year
+ "}{" write$
+ cite$ write$ % cite$ -> pusch keyword
+ "}" write$
+ % If number index is on
+ bst.use.number.index #0 =
+ 'skip$
+ { index #1 + 'index :=
+ "" 'preone :=
+ "" 'preten :=
+ bst.number.index.digit "1" =
+ 'skip$
+ { bst.number.index.digit "2" =
+ { "\hskip0.5em" 'preone := }
+ { bst.number.index.digit "3" =
+ { "\hskip1em" 'preone :=
+ "\hskip0.5em" 'preten := }
+ 'skip$
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+ newline$
+ before.all 'output.state :=
+ ""
+ % number index
+ bst.use.number.index #0 =
+ 'skip$
+ { index #10 <
+ % Insert spaces according to digit of number index.
+ { preone }
+ { index #100 <
+ { preten }
+ { "" }
+ if$
+ }
+ if$
+ bst.number.index.pre * index int.to.str$ * bst.number.index.post * write$
+ }
+ if$
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% article
+
+FUNCTION {article}
+{ output.bibitem
+ format.authors "author" output.check.nocomma
+ bst.year.position #0 =
+ { format.year "year" output.check.nocomma }
+ 'skip$
+ if$
+ format.title "title" output.check.nocomma
+
+ format.journal "journal" output.check.nocomma
+ bst.year.position #2 =
+ { format.date output.nocomma }
+ 'skip$
+ if$
+ format.vol.num.pages output.nocomma
+
+ bst.year.position #1 =
+ { format.date output.nocomma }
+ 'skip$
+ if$
+
+ format.url.doi output.nocomma
+
+ format.note output.nocomma
+ fin.entry
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% book
+
+FUNCTION {book}
+{ output.bibitem
+ author empty$
+ { format.editors "author and editor" output.check.nocomma }
+ { format.authors output.nonnull.nocomma
+ "author and editor" editor either.or.check
+ }
+ if$
+ bst.year.position #0 =
+ { format.year "year" output.check.nocomma }
+ 'skip$
+ if$
+ format.book "title" output.check.nocomma
+
+ format.bvolume output.nocomma
+ format.number.series output.nocomma
+ output.publisher.address
+
+ format.edition output.nocomma
+ format.book.pages output.nocomma
+
+ bst.year.position #0 = not
+ { format.year "year" output.check.nocomma }
+ 'skip$
+ if$
+
+ format.url.doi output.nocomma
+
+ format.note output.nocomma
+ fin.entry
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% booklet
+
+FUNCTION {booklet}
+{ output.bibitem
+ format.authors output.nocomma
+ format.year output.nocomma
+ format.misc.title "title" output.check.nocomma
+ format.howpublished output.nocomma
+ format.address output.nocomma
+
+ format.url.doi output.nocomma
+
+ format.note output.nocomma
+ fin.entry
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% inbook
+
+FUNCTION {inbook}
+{ output.bibitem
+ author empty$
+ { format.editors "author and editor" output.check.nocomma }
+ { format.authors output.nonnull.nocomma
+ "author and editor" editor either.or.check
+ }
+ if$
+ bst.year.position #0 =
+ { format.year "year" output.check.nocomma }
+ 'skip$
+ if$
+% format.book remove.pre.comma "title" output.check.nocomma
+ format.book "title" output.check.nocomma
+ format.edition output.nocomma
+
+ format.bvolume output.nocomma
+ format.chapter.pages "chapter and pages" output.check.nocomma
+ format.number.series output.nocomma
+ output.publisher.address
+
+ bst.year.position #0 = not
+ { format.year "year" output.check.nocomma }
+ 'skip$
+ if$
+
+ format.url.doi output.nocomma
+
+ format.note output.nocomma
+ fin.entry
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% incollection
+
+FUNCTION {incollection}
+{ output.bibitem
+ format.authors "author" output.check.nocomma
+ bst.year.position #0 =
+ { format.year "year" output.check.nocomma }
+ 'skip$
+ if$
+ format.title "title" output.check.nocomma
+
+ format.in.ed.booktitle "booktitle" output.check.nocomma
+ format.bvolume output.nocomma
+ output.address.organization.publisher
+ format.edition output.nocomma
+ format.chapter.pages output.nocomma
+
+ bst.year.position #0 = not
+ { format.year "year" output.check.nocomma }
+ 'skip$
+ if$
+
+ format.url.doi output.nocomma
+
+ format.note output.nocomma
+ fin.entry
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% inproceedings
+
+FUNCTION {inproceedings}
+{ output.bibitem
+ format.authors "author" output.check.nocomma
+ bst.year.position #0 =
+ { format.year "year" output.check.nocomma }
+ 'skip$
+ if$
+ format.title "title" output.check.nocomma
+
+ format.in.ed.booktitle "booktitle" output.check.nocomma
+ format.bvolume output.nocomma
+ format.number.series output.nocomma
+ format.pages output.nocomma
+ output.address.organization.publisher
+
+ bst.year.position #0 = not
+ { format.date output.nocomma }
+ { format.month output.nocomma }
+ if$
+
+ format.url.doi output.nocomma
+
+ format.note output.nocomma
+ fin.entry
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% conference
+
+FUNCTION {conference}
+{ inproceedings }
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% manual
+FUNCTION {manual}
+{ output.bibitem
+ author empty$
+ { organization empty$
+ 'skip$
+ { organization output.nonnull.nocomma
+ address output.nocomma
+ }
+ if$
+ }
+ { format.authors output.nonnull.nocomma }
+ if$
+ bst.year.position #0 =
+ { format.year "year" output.check.nocomma }
+ 'skip$
+ if$
+ format.book "title" output.check.nocomma
+ author empty$
+ { organization empty$
+ { format.address new.block.check
+ format.address output.nocomma
+ }
+ 'skip$
+ if$
+ }
+ { output.address.organization.publisher }
+ if$
+ format.edition output.nocomma
+
+ bst.year.position #0 = not
+ { format.year "year" output.check.nocomma }
+ 'skip$
+ if$
+
+ format.url.doi output.nocomma
+
+ format.note output.nocomma
+ fin.entry
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% mastersthesis
+
+FUNCTION {mastersthesis}
+{ output.bibitem
+ format.authors "author" output.check.nocomma
+ bst.year.position #0 =
+ { format.year "year" output.check.nocomma }
+ 'skip$
+ if$
+ format.title "title" output.check.nocomma
+ format.mthesis format.thesis.type output.nonnull.nocomma
+ format.school "school" output.check.nocomma
+ format.address output.nocomma
+
+ bst.year.position #0 = not
+ { format.year "year" output.check.nocomma }
+ 'skip$
+ if$
+
+ format.url.doi output.nocomma
+
+ format.note output.nocomma
+ fin.entry
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% misc
+
+FUNCTION {misc}
+{ output.bibitem
+ format.authors "author" output.check.nocomma
+ bst.year.position #0 =
+ { format.year "year" output.check.nocomma }
+ 'skip$
+ if$
+ format.misc.title output.nocomma
+ format.howpublished output.nocomma
+
+ bst.year.position #0 = not
+ { format.date output.nocomma }
+ { format.month output.nocomma }
+ if$
+
+ format.url.doi output.nocomma
+
+ format.note output.nocomma
+ fin.entry
+ empty.misc.check
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% Online
+
+FUNCTION {online}
+{ output.bibitem
+ format.authors "author" output.check.nocomma
+ bst.year.position #0 =
+ { format.year "year" output.check.nocomma }
+ 'skip$
+ if$
+ format.misc.title output.nocomma
+ format.howpublished output.nocomma
+
+ bst.year.position #0 = not
+ { format.date output.nocomma }
+ { format.month output.nocomma }
+ if$
+
+ format.url.doi output.nocomma
+
+ format.note output.nocomma
+ fin.entry
+ empty.misc.check
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% phdthesis
+
+FUNCTION {phdthesis}
+{ output.bibitem
+ format.authors "author" output.check.nocomma
+ bst.year.position #0 =
+ { format.year "year" output.check.nocomma }
+ 'skip$
+ if$
+ format.book "title" output.check.nocomma
+ format.phd
+ format.thesis.type output.nonnull.nocomma
+ format.school "school" output.check.nocomma
+ address empty$
+ 'skip$
+ { format.address output.nocomma }
+ if$
+
+ bst.year.position #0 = not
+ { format.year "year" output.check.nocomma }
+ 'skip$
+ if$
+
+ format.url.doi output.nocomma
+
+ format.note output.nocomma
+ fin.entry
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% proceedings
+
+FUNCTION {proceedings}
+{ output.bibitem
+ editor empty$
+ { organization output.nocomma }
+ { format.editors output.nonnull.nocomma }
+ if$
+ bst.year.position #0 =
+ { format.year "year" output.check.nocomma }
+ 'skip$
+ if$
+ format.btitle remove.pre.comma "title" output.check.nocomma
+ format.bvolume output.nocomma
+ format.number.series output.nocomma
+ output.address.organization.publisher
+
+ bst.year.position #0 = not
+ { format.year "year" output.check.nocomma }
+ 'skip$
+ if$
+
+ format.url.doi output.nocomma
+
+ format.note output.nocomma
+ fin.entry
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% techreport
+
+FUNCTION {techreport}
+{ output.bibitem
+ format.authors "author" output.check.nocomma
+ bst.year.position #0 =
+ { format.year "year" output.check.nocomma }
+ 'skip$
+ if$
+ format.title "title" output.check.nocomma
+ format.tr.number output.nonnull.nocomma
+ format.institution "institution" output.check.nocomma
+ format.address output.nocomma
+
+ bst.year.position #0 = not
+ { format.year "year" output.check.nocomma }
+ 'skip$
+ if$
+
+ format.note output.nocomma
+ fin.entry
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% unpublished
+
+FUNCTION {unpublished}
+{ output.bibitem
+ format.authors "author" output.check.nocomma
+ bst.year.position #0 =
+ { format.year "year" output.check.nocomma }
+ 'skip$
+ if$
+ format.title "title" output.check.nocomma
+
+ bst.year.position #0 = not
+ { format.date remove.pre.comma output.nocomma }
+ { month empty$
+ 'skip$
+ { format.month remove.pre.comma output.nocomma }
+ if$
+ }
+ if$
+
+ format.url.doi output.nocomma
+
+ format.note "note" output.check.nocomma
+ fin.entry
+}
+
+FUNCTION {default.type}
+{ misc }
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% Alias for month names:
+
+MACRO {jan} {"January"}
+MACRO {feb} {"February"}
+MACRO {mar} {"March"}
+MACRO {apr} {"April"}
+MACRO {may} {"May"}
+MACRO {jun} {"June"}
+MACRO {jul} {"July"}
+MACRO {aug} {"August"}
+MACRO {sep} {"September"}
+MACRO {oct} {"October"}
+MACRO {nov} {"November"}
+MACRO {dec} {"December"}
+
+%%% Read entries:
+READ
+
+%%% Variable for remembering the order of citation.
+INTEGERS { order.num }
+FUNCTION {initialize.order.num}
+{
+ #1 'order.num :=
+}
+%%% Initialize a variables
+EXECUTE {initialize.order.num}
+
+%%% Variable for remembering the order of citation.
+FUNCTION {set.order.cited}
+{
+ order.num 'order.cited :=
+ #1 order.num + 'order.num :=
+}
+%%% Iterate for all entries:
+ITERATE {set.order.cited}
+
+%%% check the value of nameorder field.
+FUNCTION {set.nameorder}
+{ nameorder empty$
+ { "" 'nameorder.temp := }
+ { nameorder 'nameorder.temp := }
+ if$
+}
+%%% Iterate for all entries:
+ITERATE {set.nameorder}
+
+%%% Remove symbols and convert to lowercase.
+FUNCTION {sortify}
+{ purify$ "l" change.case$ }
+
+%%% names for sorting
+FUNCTION {sort.format.names}
+{ 's :=
+ #1 'nameptr :=
+ ""
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ { nameptr #1 >
+ { ", " * }
+ 'skip$
+ if$
+ s nameptr "{ll}{ f}{ j}" format.name$ 't :=
+ nameptr numnames = t "others" = and
+ { bst.and.others.output *}
+ { t sortify * }
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+}
+
+FUNCTION {sort.format.names.abb}
+{ 's :=
+ s num.names$ 'numnames :=
+ numnames bst.and.others.num <
+ { s sort.format.names }
+ { s #1 "{ll}{ f}{ j}" format.name$ " zz " * }
+ if$
+}
+
+%%% Label for full author name.
+FUNCTION {format.lab.names.full}
+{ 's :=
+ #1 'nameptr :=
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ { s nameptr "{vv~}{ll}" format.name$ 't :=
+ nameptr #1 >
+ { namesleft #1 >
+ { nameorder.temp "random" = bst.use.nameorder #0 = not and
+ { bst.and.nameorder * t * }
+ { ", " * t * }
+ if$
+ }
+ { t "others" =
+ { bst.and.others.output * }
+ { numnames #2 >
+ { nameorder.temp "random" = bst.use.nameorder #0 = not and
+ { bst.cite.and.nameorder * t * }
+ { bst.cite.ands * t * }
+ if$
+ }
+ { nameorder.temp "random" = bst.use.nameorder #0 = not and
+ { bst.cite.and.nameorder * t * }
+ { bst.cite.and * t * }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ 't
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+ numnames #1 > #1 #2 = and {", eds" *} {} if$
+ numnames #1 = #1 #2 = and {", ed" *} {} if$
+}
+
+%%% laberl for abbreviated author name.
+FUNCTION {format.lab.names.abb}
+{ 's :=
+ s num.names$ 'numnames :=
+ numnames bst.and.others.num <
+ % if the number of authors is less than bst.and.others.num, full name.
+ { s format.lab.names.full }
+ % if the number of authors is equal or more than bst.and.others.num, abbreviated name.
+ { s #1 "{ll}" format.name$ bst.and.others.output * }
+ if$
+}
+
+%%% abbreviated author
+FUNCTION {author.key.label.abb}
+{ author empty$
+ { key empty$
+ { cite$ #1 #3 substring$ }
+ { key #3 text.prefix$ }
+ if$
+ }
+ { author format.lab.names.abb }
+ if$
+}
+
+%%% full author
+FUNCTION {author.key.label.full}
+{ author empty$
+ { key empty$
+ { cite$ #1 #3 substring$ }
+ { key #3 text.prefix$ }
+ if$
+ }
+ { author format.lab.names.full }
+ if$
+}
+
+FUNCTION {format.names.full.wo.and}
+{ 's :=
+ #1 'nameptr :=
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ { s nameptr "{ll}{, ff}{, jj}" format.name$ 't :=
+ nameptr #1 >
+ { namesleft #1 >
+ { " " * t * }
+ { t "others" =
+ { " " * }
+ { numnames #2 >
+ { " " * t * }
+ { " " * t * }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ 't
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+}
+
+FUNCTION {author.key.full.wo.and}
+{ author empty$
+ { key empty$
+ { cite$ #1 #3 substring$ }
+ { key #3 text.prefix$ }
+ if$
+ }
+ { author format.names.full.wo.and }
+ if$
+}
+
+FUNCTION {author.editor.key.full.wo.and}
+{ author empty$
+ { editor empty$
+ { key empty$
+ { cite$ #1 #3 substring$ }
+ { key #3 text.prefix$ }
+ if$
+ }
+ { editor format.names.full.wo.and }
+ if$
+ }
+ { author format.names.full.wo.and }
+ if$
+}
+
+FUNCTION {editor.key.organization.key.full.wo.and}
+{ editor empty$
+ { key empty$
+ { organization empty$
+ { cite$ #1 #3 substring$ }
+ { "The " #4 organization chop.word #3 text.prefix$ }
+ if$
+ }
+ { key #3 text.prefix$ }
+ if$
+ }
+ { editor format.names.full.wo.and }
+ if$
+}
+
+FUNCTION {author.key.organization.key.full.wo.and}
+{ author empty$
+ { key empty$
+ { organization empty$
+ { cite$ #1 #3 substring$ }
+ { "The " #4 organization chop.word #3 text.prefix$ }
+ if$
+ }
+ { key #3 text.prefix$ }
+ if$
+ }
+ { author format.names.full.wo.and }
+ if$
+}
+
+%%% abbreviated author
+FUNCTION {author.editor.key.label.abb}
+{ author empty$
+ { editor empty$
+ { key empty$
+ { cite$ #1 #3 substring$ }
+ { key #3 text.prefix$ }
+ if$
+ }
+ { editor format.lab.names.abb }
+ if$
+ }
+ { author format.lab.names.abb }
+ if$
+}
+
+%%% full author
+FUNCTION {author.editor.key.label.full}
+{ author empty$
+ { editor empty$
+ { key empty$
+ { cite$ #1 #3 substring$ }
+ { key #3 text.prefix$ }
+ if$
+ }
+ { editor format.lab.names.full }
+ if$
+ }
+ { author format.lab.names.full }
+ if$
+}
+
+FUNCTION {author.key.organization.label.full}
+{ author empty$
+ { key empty$
+ { organization empty$
+ { cite$ #1 #3 substring$ }
+ { "The " #4 organization chop.word #3 text.prefix$ }
+ if$
+ }
+ { key #3 text.prefix$ }
+ if$
+ }
+ { author format.lab.names.full }
+ if$
+}
+
+FUNCTION {author.key.organization.label.abb}
+{ author empty$
+ { key empty$
+ { organization empty$
+ { cite$ #1 #3 substring$ }
+ { "The " #4 organization chop.word #3 text.prefix$ }
+ if$
+ }
+ { key #3 text.prefix$ }
+ if$
+ }
+ { author format.lab.names.abb }
+ if$
+}
+
+FUNCTION {editor.key.organization.label.full}
+{ editor empty$
+ { key empty$
+ { organization empty$
+ { cite$ #1 #3 substring$ }
+ { "The " #4 organization chop.word #3 text.prefix$ }
+ if$
+ }
+ { key #3 text.prefix$ }
+ if$
+ }
+ { editor format.lab.names.full }
+ if$
+}
+
+FUNCTION {editor.key.organization.label.abb}
+{ editor empty$
+ { key empty$
+ { organization empty$
+ { cite$ #1 #3 substring$ }
+ { "The " #4 organization chop.word #3 text.prefix$ }
+ if$
+ }
+ { key #3 text.prefix$ }
+ if$
+ }
+ { editor format.lab.names.abb }
+ if$
+}
+
+%%% Convert numbers: 0->9, 1->8, 2->7,..., 9->0
+FUNCTION {reverse.num}
+{ 's :=
+ s "1" =
+ { "8" 'year.num := }
+ { s "2" =
+ { "7" 'year.num := }
+ { s "3" =
+ { "6" 'year.num := }
+ { s "4" =
+ { "5" 'year.num := }
+ { s "5" =
+ { "4" 'year.num := }
+ { s "6" =
+ { "3" 'year.num := }
+ { s "7" =
+ { "2" 'year.num := }
+ { s "8" =
+ { "1" 'year.num := }
+ { s "9" =
+ { "0" 'year.num := }
+ { s "0" =
+ { "9" 'year.num := }
+ { "9" 'year.num := }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+ year.num
+}
+
+%%% Convert year (large number -> small number)
+FUNCTION {convert.year}
+{ 't :=
+ bst.reverse.year #0 =
+ { t 'tt := }
+ { t #1 #1 substring$ reverse.num
+ t #2 #1 substring$ reverse.num *
+ t #3 #1 substring$ reverse.num *
+ t #4 #1 substring$ reverse.num * 'tt := }
+ if$
+ tt
+}
+
+%%% cyear
+FUNCTION {calc.cyear}
+{ type$ "book" =
+ type$ "inbook" =
+ or
+ 'author.editor.key.full.wo.and
+ { type$ "proceedings" =
+ 'editor.key.organization.key.full.wo.and
+ { type$ "manual" =
+ 'author.key.organization.key.full.wo.and
+ 'author.key.full.wo.and
+ if$
+ }
+ if$
+ }
+ if$
+ duplicate$
+ year empty$
+ { "2199" 'cyear := }
+ { year 'cyear := }
+ if$
+ year empty$
+ { " " "2199" convert.year * field.or.null * }
+ { " " year convert.year * field.or.null * }
+ if$
+ sortify 'sort.label :=
+ % For debug
+ econ.debug #0 = not
+ { "sort.label = ``\texttt{" write$
+ sort.label write$
+ "}''\\" write$
+ newline$
+ }
+ 'skip$
+ if$
+ pop$
+}
+
+FUNCTION {calc.sort.label.abb}
+{ author empty$
+ { editor empty$
+ { "" }
+ { editor 's := }
+ if$
+ }
+ { author 's := }
+ if$
+ s sort.format.names.abb 't :=
+ year empty$
+ { t sortify " " * "2199" convert.year * 'sort.label.abb := }
+ { t sortify " " * year convert.year * 'sort.label.abb := }
+ if$
+ econ.debug #0 = not
+ { "sort.label.abb = ``\texttt{" write$
+ sort.label.abb write$
+ "}''\\" write$
+ newline$
+ }
+ 'skip$
+ if$
+}
+
+%%% flabel
+FUNCTION {calc.flabel}
+{ type$ "book" =
+ type$ "inbook" =
+ or
+ 'author.editor.key.label.full
+ { type$ "proceedings" =
+ 'editor.key.organization.label.full
+ { type$ "manual" =
+ 'author.key.organization.label.full
+ 'author.key.label.full
+ if$
+ }
+ if$
+ }
+ if$
+ 'flabel :=
+ % For debug
+ econ.debug #0 = not
+ { "flabel = ``\texttt{" write$
+ flabel write$
+ "}''\\" write$
+ newline$
+ }
+ 'skip$
+ if$
+}
+
+%%% alabel
+FUNCTION {calc.alabel}
+{ type$ "book" =
+ type$ "inbook" =
+ or
+ 'author.editor.key.label.abb
+ { type$ "proceedings" =
+ 'editor.key.organization.label.abb
+ { type$ "manual" =
+ 'author.key.organization.label.abb
+ 'author.key.label.abb
+ if$
+ }
+ if$
+ }
+ if$
+ 'alabel :=
+ % For debug
+ econ.debug #0 = not
+ { "alabel = ``\texttt{" write$
+ alabel write$
+ "}''\\" write$
+ newline$
+ }
+ 'skip$
+ if$
+}
+
+%%% title for sorting
+FUNCTION {sort.format.title}
+{ 't :=
+ "A " #2
+ "An " #3
+ "The " #4 t chop.word
+ chop.word
+ chop.word
+ sortify
+ #1 global.max$ substring$
+}
+
+%%% author for sorting
+FUNCTION {author.sort}
+{ author empty$
+ { key empty$
+ { "to sort, need author or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { author sort.format.names }
+ if$
+}
+
+%%% editor for sorting
+FUNCTION {author.editor.sort}
+{ author empty$
+ { editor empty$
+ { key empty$
+ { "to sort, need author, editor, or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { editor sort.format.names }
+ if$
+ }
+ { author sort.format.names }
+ if$
+}
+
+FUNCTION {author.organization.sort}
+{ author empty$
+ { organization empty$
+ { key empty$
+ { "to sort, need author, organization, or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { "The " #4 organization chop.word sortify }
+ if$
+ }
+ { author sort.format.names }
+ if$
+}
+
+FUNCTION {editor.organization.sort}
+{ editor empty$
+ { organization empty$
+ { key empty$
+ { "to sort, need editor, organization, or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { "The " #4 organization chop.word sortify }
+ if$
+ }
+ { editor sort.format.names }
+ if$
+}
+
+%%% 1,...,9 -> 001,...,009
+%%% 10,...,99 -> 010,...,099
+FUNCTION {add.zero.to.number}
+{ 's :=
+ s text.length$ #1 =
+ { "00" s * }
+ { s text.length$ #2 =
+ { "0" s * }
+ { s }
+ if$
+ }
+ if$
+}
+
+%% entry type
+FUNCTION {bst.sort.entry.type.order}
+{ 'item.type :=
+ item.type "article" =
+ { "01" }
+ { item.type "book" =
+ { "02" }
+ { item.type "booklet" =
+ { "03" }
+ { item.type "comment" =
+ { "04" }
+ { item.type "conference" =
+ { "05" }
+ { item.type "inbook" =
+ { "06" }
+ { item.type "incollection" =
+ { "07" }
+ { item.type "inproceedings" =
+ { "08" }
+ { item.type "manual" =
+ { "09" }
+ { item.type "masterthesis" =
+ { "10" }
+ { item.type "misc" =
+ { "11" }
+ { item.type "phdthesis" =
+ { "12" }
+ { item.type "proceedings" =
+ { "13" }
+ { item.type "techreport" =
+ { "14" }
+ { item.type "unpublished" =
+ { "15" }
+ { "16" }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+}
+
+%%% Create sort.key$: absorder -> author -> year -> order -> month -> title.
+FUNCTION {presort.one}
+{
+ bst.no.sort #0 = not
+ { order.cited int.to.str$ add.zero.to.number " " * }
+ { "" }
+ if$
+ bst.sort.year #0 = not
+ %% Use year field as the primary sorting key.
+ { year convert.year * }
+ 'skip$
+ if$
+ bst.sort.entry.type #0 = not
+ { type$ bst.sort.entry.type.order * " " * }
+ 'skip$
+ if$
+ absorder empty$
+ { "/// " * }
+ { bst.notuse.absorder.field #0 =
+ { absorder "999" =
+ { "zzz " * }
+ { absorder add.zero.to.number "000" =
+ { "/// " * }
+ { absorder add.zero.to.number * " " * }
+ if$
+ }
+ if$
+ }
+ { "/// " * }
+ if$
+ }
+ if$
+ " " *
+ sort.label.abb *
+ " " *
+ type$ "book" = type$ "inbook" = or
+ 'author.editor.sort
+ { type$ "proceedings" =
+ 'editor.organization.sort
+ { type$ "manual" =
+ 'author.organization.sort
+ 'author.sort
+ if$
+ }
+ if$
+ }
+ if$
+ * " " *
+ " "
+ order empty$
+ { "/// " * }
+ { bst.notuse.order.field #0 =
+ { order "999" =
+ { "zzz " * }
+ { order add.zero.to.number "000" =
+ { "/// " * }
+ { order add.zero.to.number * " " * }
+ if$
+ }
+ if$
+ }
+ { "/// " * }
+ if$
+ }
+ if$
+ month empty$
+ { * "/// " * }
+ { month "999" =
+ { * month add.zero.to.number * "zzz " * }
+ { month add.zero.to.number "000" =
+ { * month add.zero.to.number * "/// " * }
+ { * month add.zero.to.number * " " * }
+ if$
+ }
+ if$
+ }
+ if$
+ title field.or.null sort.format.title
+ *
+ #1 entry.max$ substring$
+ 'sort.key$ :=
+ % For debug
+ econ.debug #0 = not
+ { "``\texttt{" write$
+ sort.key$ write$
+ "}''\\" write$
+ newline$
+ }
+ 'skip$
+ if$
+}
+
+FUNCTION {presort.two}
+{
+ bst.no.sort #0 = not
+ { order.cited int.to.str$ add.zero.to.number " " * }
+ { "" }
+ if$
+ bst.sort.year #0 = not
+ %% Use year field as the primary sorting key.
+ { year convert.year * }
+ 'skip$
+ if$
+ bst.sort.entry.type #0 = not
+ { type$ bst.sort.entry.type.order * " " * }
+ 'skip$
+ if$
+ absorder empty$
+ { "/// " * }
+ { bst.notuse.absorder.field #0 =
+ { absorder "999" =
+ { "zzz " * }
+ { absorder add.zero.to.number "000" =
+ { "/// " * }
+ { absorder add.zero.to.number * " " * }
+ if$
+ }
+ if$
+ }
+ { "/// " * }
+ if$
+ }
+ if$
+ " " * sort.label * " "
+ order empty$
+ { "/// " * }
+ { bst.notuse.order.field #0 =
+ { order "999" =
+ { "zzz " * }
+ { order add.zero.to.number "000" =
+ { "/// " * }
+ { order add.zero.to.number * " " * }
+ if$
+ }
+ if$
+ }
+ { "/// " * }
+ if$
+ }
+ if$
+ month empty$
+ { * "/// " * }
+ { month "999" =
+ { * month add.zero.to.number * "zzz " * }
+ { month add.zero.to.number "000" =
+ { * month add.zero.to.number * "/// " * }
+ { * month add.zero.to.number * " " * }
+ if$
+ }
+ if$
+ }
+ if$
+ title field.or.null sort.format.title
+ *
+ #1 entry.max$ substring$
+ 'sort.key$ :=
+ % For debug
+ econ.debug #0 = not
+ { "``\texttt{" write$
+ sort.key$ write$
+ "}''\\" write$
+ newline$
+ }
+ 'skip$
+ if$
+}
+
+%%% Codes for debugging
+FUNCTION {calc.alabel.mess}
+{ econ.debug #0 = not
+ { "\textbf{Iteration of calc.alabel: alabel = }\\" write$
+ newline$ }
+ 'skip$
+ if$
+}
+FUNCTION {calc.flabel.mess}
+{ econ.debug #0 = not
+ { "\textbf{Iteration of calc.flabel: flabel = }\\" write$
+ newline$ }
+ 'skip$
+ if$
+}
+FUNCTION {presort.one.mess}
+{ econ.debug #0 = not
+ { "\textbf{Iteration of presort (1st time): \$sort.key = }\\" write$
+ newline$ }
+ 'skip$
+ if$
+}
+
+FUNCTION {presort.two.mess}
+{ econ.debug #0 = not
+ { "\textbf{Iteration of presort (2nd time): \$sort.key = }\\" write$
+ newline$ }
+ 'skip$
+ if$
+}
+
+FUNCTION {calc.cyear.mess}
+{ econ.debug #0 = not
+ { "\textbf{Iteration of calc.cyear: sort.label = }\\" write$
+ newline$ }
+ 'skip$
+ if$
+}
+
+FUNCTION {calc.sort.label.abb.mess}
+{ econ.debug #0 = not
+ { "\textbf{Iteration of calc.sort.label.abb: sort.label.abb = }\\" write$
+ newline$ }
+ 'skip$
+ if$
+}
+
+%%% alabel
+EXECUTE {calc.alabel.mess}
+ITERATE {calc.alabel}
+
+%%% flabel
+EXECUTE {calc.flabel.mess}
+ITERATE {calc.flabel}
+
+%%% cyear and sort.label
+EXECUTE {calc.cyear.mess}
+ITERATE {calc.cyear}
+
+%%%
+EXECUTE {calc.sort.label.abb.mess}
+ITERATE {calc.sort.label.abb}
+
+%%% Sorting by $sort.key (first time)
+%
+% Sorting is done in two times. This is the first time.
+%
+EXECUTE {presort.one.mess}
+ITERATE {presort.one}
+SORT
+
+FUNCTION {forward.pass}
+{ bst.use.bysame #0 = bst.use.bysame #2 = or
+ % Not use \bysame
+ { last.sort.label sort.label.abb =
+ { last.extra.num #1 + 'last.extra.num :=
+ last.extra.num int.to.chr$ 'extra.label :=
+ }
+ { "a" chr.to.int$ 'last.extra.num :=
+ "" 'extra.label :=
+ sort.label.abb 'last.sort.label :=
+ }
+ if$
+ }
+ % Use \bysame
+ { last.sort.label sort.label.abb =
+ { last.extra.num #1 + 'last.extra.num :=
+ last.extra.num int.to.chr$ 'extra.label :=
+ }
+ { "a" chr.to.int$ 'last.extra.num :=
+ "" 'extra.label :=
+ sort.label.abb 'last.sort.label :=
+ }
+ if$
+ author empty$
+ { editor empty$
+ { "" }
+ 'format.editors.alt
+ if$
+ }
+ 'format.authors.alt
+ if$
+ 'this.author :=
+ % format.names 'this.author :=
+ this.author prev.author =
+ { "bysame" 'extra.label.bysame := }
+ { this.author "" =
+ { "abcxyz" }
+ 'this.author
+ if$
+ 'prev.author :=
+ }
+ if$
+ }
+ if$
+}
+
+FUNCTION {reverse.pass}
+{ next.extra "b" =
+ { "a" 'extra.label := }
+ 'skip$
+ if$
+ extra.label empty$ not
+ { cyear extra.label * }
+ { cyear "" * }
+ if$
+ "" field.or.null *
+ 'cyear :=
+ extra.label 'next.extra :=
+}
+
+%%% \bysame
+ITERATE {forward.pass}
+
+REVERSE {reverse.pass}
+
+%%% Sorting by sort.key$ (second time)
+EXECUTE {presort.two.mess}
+ITERATE {presort.two}
+SORT
+
+FUNCTION {reset.prev.author}
+{ "xxyyzz" 'prev.author := }
+
+EXECUTE {reset.prev.author}
+
+FUNCTION {forward.pass.two}
+{ bst.use.bysame #1 =
+ { author empty$
+ { editor empty$
+ { "" }
+ 'format.editors.alt
+ if$
+ }
+ 'format.authors.alt
+ if$
+ 'this.author :=
+ this.author prev.author =
+ { "bysame" 'extra.label.bysame := }
+ { this.author "" =
+ { "abcxyz" }
+ 'this.author
+ if$
+ 'prev.author :=
+ }
+ if$
+ }
+ 'skip$
+ if$
+}
+
+ITERATE {forward.pass.two}
+
+FUNCTION{punctuation}
+{
+ "%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%" write$ newline$
+ "% This bbl file is created by econ.bst ver." econ.version * write$ newline$
+ "% The latest econ.bst is available at" write$ newline$
+ "% <https://github.com/ShiroTakeda/econ-bst>" write$ newline$ newline$
+}
+
+EXECUTE {punctuation}
+
+FUNCTION {begin.bib}
+{
+ preamble$ empty$
+ 'skip$
+ { preamble$ write$ newline$ }
+ if$
+ bst.use.bysame #0 =
+ % Not use \bysame.
+ 'skip$
+ % Use \bysame.
+ { "%%% Definition of \bysame" write$ newline$
+ "\ifx\undefined\bysame" write$ newline$
+ "\newcommand{\bysame}{" bst.bysame.definition * "}" *
+ write$ newline$
+ "\fi" write$ newline$ newline$ }
+ if$
+ %% When number index is attached to the beginning of each item.
+ bst.use.number.index #0 =
+ 'skip$
+ { bst.number.index.digit "1" =
+ % one digit.
+ { bst.number.index.bibhang.one }
+ { bst.number.index.digit "2" =
+ % two digits.
+ { bst.number.index.bibhang.ten }
+ % three or more digits.
+ { bst.number.index.bibhang.hund }
+ if$
+ }
+ if$
+ 'hang :=
+ "%%% Redefinition of \bibhang" write$ newline$
+ "\ifx\undefined\bibhang" write$ newline$
+ "\relax" write$ newline$
+ "\else" write$ newline$
+ "\setlength{\bibhang}{"
+ hang * "}" * write$ newline$
+ "\fi" write$ newline$ newline$
+ }
+ if$
+ "\begin{thebibliography}{xxx}" write$ newline$
+
+ %% Initialize the variable `index'.
+ #0 'index :=
+}
+
+FUNCTION {end.bib}
+{ newline$ "\end{thebibliography}" write$ newline$ }
+
+EXECUTE {begin.bib}
+
+EXECUTE {init.state.consts}
+
+ITERATE {call.type$}
+
+EXECUTE {end.bib}
+
+% --------------------
+% Local Variables:
+% fill-column: 78
+% mode: bst
+% End:
diff --git a/biblio/bibtex/contrib/econ-bst/customization/econ-econometrica.pdf b/biblio/bibtex/contrib/econ-bst/customization/econ-econometrica.pdf
new file mode 100644
index 0000000000..1f55afb51e
--- /dev/null
+++ b/biblio/bibtex/contrib/econ-bst/customization/econ-econometrica.pdf
Binary files differ
diff --git a/biblio/bibtex/contrib/econ-bst/customization/econ-econometrica.tex b/biblio/bibtex/contrib/econ-bst/customization/econ-econometrica.tex
new file mode 100644
index 0000000000..f4b1251bc7
--- /dev/null
+++ b/biblio/bibtex/contrib/econ-bst/customization/econ-econometrica.tex
@@ -0,0 +1,55 @@
+%#!pdflatex
+%#BIBTEX bibtex econ-econometrica
+
+%############################## Main #################################
+\documentclass[10pt]{article}
+
+%% Use natbib.sty
+\usepackage{natbib}
+\usepackage{mathpazo}
+\usepackage{url}
+\usepackage{graphicx}
+\usepackage{color}
+\definecolor{MyBrown}{rgb}{0.3,0,0}
+\definecolor{MyBlue}{rgb}{0,0,0.3}
+\definecolor{MyRed}{rgb}{0.4,0,0.1}
+\definecolor{MyGreen}{rgb}{0,0.4,0}
+\usepackage[bookmarks=true,%
+bookmarksnumbered=true,%
+colorlinks=true,%
+linkcolor=MyBlue,%
+citecolor=MyRed,%
+filecolor=MyBlue,%
+urlcolor=MyGreen%
+]{hyperref}
+
+\setlength{\topmargin}{-20pt}
+\setlength{\textheight}{648pt}
+\setlength{\oddsidemargin}{15pt}
+\setlength{\textwidth}{440pt}
+
+%#####################################################################
+%######################### Document Starts ###########################
+%#####################################################################
+\begin{document}
+
+This document uses ``\verb|econ-econometrica.bst|''. The style like ({\itshape Econometrica}).
+
+\vspace{1em}
+
+\input{cited-part}
+\nocite{*}
+
+%% bst file:
+\bibliographystyle{econ-econometrica}
+\bibliography{../econ-example}
+
+\end{document}
+
+%#####################################################################
+%######################### Document Ends #############################
+%#####################################################################
+% --------------------
+% Local Variables:
+% fill-column: 80
+% End:
diff --git a/biblio/bibtex/contrib/econ-bst/customization/econ-jet.bst b/biblio/bibtex/contrib/econ-bst/customization/econ-jet.bst
new file mode 100644
index 0000000000..7898a51f3a
--- /dev/null
+++ b/biblio/bibtex/contrib/econ-bst/customization/econ-jet.bst
@@ -0,0 +1,3545 @@
+n%% econ.bst: BibTeX style file for papers in economics.
+%
+% Author: Shiro Takeda
+% Maintainer: Shiro Takeda
+% Copyright (C) 2001-2018 Shiro Takeda
+% First-written: <2007/07/28>
+% Time-stamp: <2018-12-07 18:48:36 st>
+% Version: 2.5
+% Keywords: TeX, BibTeX, bst
+% URL: https://github.com/ShiroTakeda/econ-bst
+
+% This work may be distributed and/or modified under the
+% conditions of the LaTeX Project Public License, either version 1.3
+% of this license or (at your option) any later version.
+% The latest version of this license is in
+% http://www.latex-project.org/lppl.txt
+% and version 1.3 or later is part of all distributions of LaTeX
+% version 2005/12/01 or later.
+%
+% This work has the LPPL maintenance status "maintained".
+%
+% The Current Maintainer of this work is Shiro Takeda.
+
+%% Main features of econ.bst.
+
+% "econ.bst" is a BibTeX style file for economics. It provids the following
+% features:
+
+% 1) The author-year type citation (you need "natbib.sty" as well).
+% 2) Reference style used in economics papers ("econ.bst" is not a BibTeX style
+% for a specific journal).
+% 3) Highly customizable. You can easily customize reference style as you wish.
+% 4) You can use "certified random order" proposed by Ray ⓡ Robson (2018)
+% (http://dx.doi.org/10.1257/aer.20161492).
+
+% Bug reports, requests and suggestions are welcome.
+
+% For changelogs, see CHANGES.txt file.
+
+% version number
+FUNCTION {econ.version} { "2.5" }
+
+% Debug mode. Non-zero makes debug mode on.
+FUNCTION {econ.debug}
+{ #0 } % Debug mode off (default).
+% { #1 } % Debug mode on.
+
+ENTRY
+ %%% Declaration of field
+ { access address author booktitle chapter doi edition editor howpublished
+ institution journal key month note number organization pages publisher
+ school series title type url volume year
+ % Fields specific to econ.bst
+ order absorder nameorder
+ }
+
+ % Definition of entry variable. The entry variable is a variable which has
+ % different values according to different entries.
+ %% Integer entry variable:
+ { order.cited }
+
+ %% String entry variable
+ { label cyear flabel alabel extra.label sort.label sort.label.abb
+ extra.label.bysame nameorder.temp }
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%%
+%% Functions for customization:
+%%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+% Use \bysame or not.
+%
+% If set to #0, \bysame is not used.
+% If set to #1, \bysame is used
+% If set to #2, \bysame is used (alternative abbreviation style).
+%
+% Note that integer number is expressed as # + integer in bst file.
+% \bysame is the function that abbreviates succession of the same authors' name by ---.
+%
+% See econ-sample.pdf for details.
+%
+FUNCTION {bst.use.bysame}
+{ #0 } % Not use \bysame
+% { #1 } % -> Use \bysame (default)
+% { #2 } % -> Use \bysame of alternative style.
+
+% The definition of \bysame command.
+%
+FUNCTION {bst.bysame.definition}
+{ "\hskip.3em \leavevmode\rule[.5ex]{3em}{.3pt}\hskip0.5em" } % (default)
+% { "\leavevmode\hbox to\leftmargin{\hrulefill\,\,}" } % If you set #2 to bst.use.bysame, use this.
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+% The order of fist and last name.
+%
+FUNCTION {bst.author.name}
+% { #0 } % (default)
+% { #1 }
+{ #2 }
+
+% Case of #0: First author -> last-first, other authors -> first-last.
+% Fujita, Masahisa, Paul R. Krugman, and Anthony J. Venables.
+
+% Case of #1: All authors -> last-first
+% Fujita, Masahisa, Krugman, Paul R., and Venables, Anthony J.
+
+% Case of #2: All authors -> first-last
+% Masahisa Fujita, Paul R. Krugman, and Anthony J. Venables.
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+% Abbreviate first name of authors (editors):
+%
+FUNCTION {bst.first.name.initial}
+% { #0 } % #0 -> full letters (default).
+{ #1 } % Non-zero -> initial letter only.
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+% Decapitalize of strings in title field.
+%
+FUNCTION {bst.title.lower.case}
+% { #0 } % If #0, not decapitalize title (default).
+{ #1 } % If non-#0, decapitalize title
+
+% Hide title filed.
+%
+FUNCTION {bst.hide.title}
+{ #0 } % #0 -> Title field is displayed (default)
+% { #1 } % Non-zer -> Title field is hidden
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+% Hide month.
+%
+FUNCTION {bst.hide.month}
+{ #0 } % #0 -> show month field (default).
+% { #1 } % non-#0 -> hide month field.
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+% Attach number index like plain.bst.
+%
+FUNCTION {bst.use.number.index}
+{ #0 } % Not use number index (default).
+% { #1 } % Non-#0 -> Use number index
+
+% The string before number index:
+%
+FUNCTION {bst.number.index.pre}
+{ "[" } % (default)
+
+% The string after number index. Adjustment is recommended.
+%
+FUNCTION {bst.number.index.post}
+{ "]\hskip1.0em " } % (default)
+
+% Maximum digit of number index:
+% If the number of reference items >= 100, set 3 to this function.
+% If the number of reference items < 100, set 2 to this function.
+% If the number of reference items < 10, set 1 to this function.
+%
+FUNCTION {bst.number.index.digit}
+{ "2" } % (default)
+% { "3" }
+
+% The functions below are used to adjust space and postion. If you use fonts
+% other than computer modern fonts, you had better make adjustments.
+%
+% Setting for bst.number.index.digit = 1:
+FUNCTION {bst.number.index.bibhang.one}
+{ "2.05em" } % (default)
+% Setting for bst.number.index.digit = 2:
+FUNCTION {bst.number.index.bibhang.ten}
+{ "2.55em" } % (default)
+% Setting for bst.number.index.digit = 3:
+FUNCTION {bst.number.index.bibhang.hund}
+{ "3.05em" } % (default).
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+% Position of "year":
+%
+% You can choose the position of year by this function.
+%
+% If set to #0, year is placed right after "author".
+% If set to non-zero, year is placed at the end (before note field) except for
+% aritcle type entry.
+%
+% In article type entry, the position of year changes according to the
+% following rule:
+%
+% #1 -> year is placed at the end.
+% #2 -> year is placed after journal name in aritcle type entry.
+% #3 -> year is placed after volume in aritcle type entry.
+%
+FUNCTION {bst.year.position}
+% { #0 } % (default).
+% { #1 } % Last place before note.
+% { #2 } % After journal name for aticle type entry.
+{ #3 } % After volume for aticle type entry.
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+% If 0, references are sorted by old documents -> recent documents. If
+% non-zero, reverse order.
+FUNCTION {bst.reverse.year}
+{ #0 } % Normal order (old -> recent) (default).
+% { #1 } % inverse order (recent -> old)
+
+% If non-zero, sort references by using year field as the primary key
+% (chronological sorting).
+FUNCTION {bst.sort.year}
+{ #0 } % Normal case: year is used as the sorting key next to author (default).
+% { #1 } % year is used as the primary sorting key.
+
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+% If non-zero, references are listed in citation order.
+%
+FUNCTION {bst.no.sort}
+{ #0 } % (default)
+% { #1 } % listed in citation order.
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+% Non-zero -> sort references by entry type (article, book, incollection etc.)
+%
+FUNCTION {bst.sort.entry.type}
+{ #0 } % #0 -> Normal (not sort references by entry type) (default).
+% { #1 } % Non-zero -> sort references by entry type.
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+% 0 -> use absorder field to sort items. Otherwise, ignore absorder field.
+%
+FUNCTION {bst.notuse.absorder.field}
+{ #0 } % #0 -> Use absorder (default).
+% { #1 } % Non-#0 -> Not use absorder.
+%
+% Order of priority to sort items
+%
+% absorder -> author -> year -> order -> month -> title
+%
+% wehre absorder and order fields are specific to econ.bst.
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+% 0 -> use order field to sort items. Otherwise, ignore order field.
+% Note: order field is specific to econ.bst.
+FUNCTION {bst.notuse.order.field}
+{ #0 } % #0 -> Use order field (default).
+% { #1 } % Non-#0 -> not use order field.
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%%% and
+
+%%% String used to separate author names in references.
+%
+% String replaced with _ in "Mr. A _ Mr. B "
+%
+FUNCTION {bst.and}
+{ " and " } % (default)
+
+%%% String used to separate author names in references (more than two authors).
+%
+% String replaced with _ in "Mr. A, Mr. B _ Mr. C"
+%
+FUNCTION {bst.ands}
+{ ", and " } % (default)
+
+%%% String used to separate author names in citation part.
+%
+% String replaced with _ in "Mr. A _ Mr. B "
+%
+FUNCTION {bst.cite.and}
+{ " and " } % (default)
+
+%%% String used to separate author names in citation part (more than two authors).
+%
+% String replaced with _ in "Mr. A, Mr. B _ Mr. C"
+%
+FUNCTION {bst.cite.ands}
+{ " and " } % (default)
+
+%%% If you want to use random author order for some bibliography entries, set
+% non-zero to this function.
+%
+FUNCTION {bst.use.nameorder}
+{ #1 } % Use random order (default)
+% { #0 } % Not use random order
+
+%%% String used to separate author names in references for the entry of random
+% author order.
+%
+FUNCTION {bst.and.nameorder}
+{ " \textcircled{r} " } % (default)
+
+%%% String used to separate author names in citation part for the entry of
+% random author order
+%
+FUNCTION {bst.cite.and.nameorder}
+{ " \textcircled{r} " } % (default)
+
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+% Author names in the citation part are abbreviated by et al. if the number of
+% authors is greater or equal to bst.and.others.num.
+FUNCTION {bst.and.others.num}
+{ #3 } % If the number of authors is greater or equal to three (default).
+% { #4 }
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+% Strings used when abbreviating multiple-authors in citation part.
+FUNCTION {bst.and.others}
+{ " et~al." } % (default)
+
+% Strings used when abbreviating multiple-authors in citation part for entries
+% with random author order.
+FUNCTION {bst.and.others.nameorder}
+{ " \textcircled{r}~al." } % (default)
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% author
+
+% The string before author:
+%
+FUNCTION {bst.author.pre}
+{ "" } % (default)
+
+% The string after author:
+%
+FUNCTION {bst.author.post}
+{ ", " }
+% { "" } % (default)
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% year
+
+% The string before year only for aritcle type entry.
+%
+FUNCTION {bst.year.pre}
+{ " (" }
+% { " (" } % (default)
+
+% The string after year only for aritcle type entry.
+%
+FUNCTION {bst.year.post}
+{ ")" }
+% { ") " } % (default)
+
+% The string after year for non-article type entry (book, incollection etc)
+%
+FUNCTION {bst.year.na.pre}
+{ ", " }
+% { " (" } % (default)
+
+% The string after year for non-article type entry (book, incollection etc)
+%
+FUNCTION {bst.year.na.post}
+{ "" }
+% { ") " } % (default)
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% title (except for title in book)
+
+% The string before title:
+%
+FUNCTION {bst.title.pre}
+{ "" }
+% { "``" } % (default)
+
+% The string after title:
+%
+FUNCTION {bst.title.post}
+{ "," }
+% { ",''" } % (default)
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% tile for book:
+
+% The string before book title:
+%
+FUNCTION {bst.book.pre}
+{ "" }
+% { " \textit{" } % (default)
+
+% The string after book title:
+%
+FUNCTION {bst.book.post}
+{ "" }
+% { "}" } % (default)
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% booktitle
+
+% The string before booktitle:
+%
+FUNCTION {bst.btitle.pre}
+{ " " }
+% { " \textit{" } % (default)
+
+% The string after booktitle:
+%
+FUNCTION {bst.btitle.post}
+{ "" }
+% { "}" } % (default)
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% journal name
+
+% The string before journal name:
+%
+FUNCTION {bst.journal.pre}
+{ " " }
+% { " \textit{" } % (default)
+
+% The string after journal name:
+%
+FUNCTION {bst.journal.post}
+{ ", " }
+% { "}" } % (default)
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% editor notation:
+
+% The string that indicates multiple editors:
+%
+FUNCTION {bst.editors}
+{ " (Eds.), " }
+% { " eds. " } % (default)
+
+% The string that indicates single editor:
+%
+FUNCTION {bst.editor}
+{ " ed. " } % (default)
+
+% Order of editor and booktitle in incollection and inproceedings entries.
+%
+% If set to #0: editors -> booktitle order
+% If set to non-zero: booktitle -> editors order
+%
+FUNCTION {bst.editor.btitle.order}
+{ #0 } % (default)
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% edition
+
+% The string before edition:
+%
+FUNCTION {bst.edition.pre}
+{ ", " } % (default)
+
+% The string after edition:
+%
+FUNCTION {bst.edition.post}
+{ " edition" } % (default)
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% volume
+
+% The string before volume:
+%
+FUNCTION {bst.volume.pre}
+{ " " }
+% { ", Vol. " } % (default)
+
+% The string after volume:
+%
+FUNCTION {bst.volume.post}
+{ "" } % (default)
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% number
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+% Hide number. If non-zero, number is suppressed.
+FUNCTION {bst.hide.number}
+% { #0 } % #0 -> show number field (default)
+{ #1 } % non-#0 -> Hide number field.
+
+% The string before number:
+%
+FUNCTION {bst.number.pre}
+{ ", No. " } % (default)
+
+% The string after number:
+%
+FUNCTION {bst.number.post}
+{ "" } % (default)
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% in
+
+% In
+%
+FUNCTION {bst.in}
+{ " in: " }
+% { " in " } % (default)
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% page
+
+% The string before page (multiple pages):
+%
+FUNCTION {bst.pages.pre}
+{ " " }
+% { ", pp." } % (default)
+
+% The string before page:
+%
+FUNCTION {bst.page.pre}
+{ ", p." } % (default)
+
+% The string after page (multiple pages):
+%
+FUNCTION {bst.pages.post}
+{ "" } % (default)
+
+% The string after page:
+%
+FUNCTION {bst.page.post}
+{ "" } % (default)
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% chapter
+
+% The string before chapter:
+%
+FUNCTION {bst.chapter.pre}
+{ ", Chap." } % (default)
+
+% The string after chapter:
+%
+FUNCTION {bst.chapter.post}
+{ ", " }
+% { "" } % (default)
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% month
+
+% The string before month:
+%
+FUNCTION {bst.month.pre}
+{ ", " } % (default)
+
+% The string after month:
+%
+FUNCTION {bst.month.post}
+{ "" } % (default)
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% address
+% The string before address:
+%
+FUNCTION {bst.address.pre}
+{ ", " } % (default)
+
+% The string after address:
+%
+FUNCTION {bst.address.post}
+{ "," }
+% { "" } % (default)
+
+% You can choose the order of address and publisher by this function.
+%
+% If #0, address -> publisher order (the default value).
+% If non-zero, publisher -> address order.
+
+FUNCTION {bst.address.position}
+% { #0 } % Address is placed before publisher (default)
+{ #1 } % Address is placed after publisher
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% publisher
+
+% The string before publisher:
+%
+FUNCTION {bst.publisher.pre}
+{ ", " }
+% { ": " } % (default)
+
+% The string after publisher:
+%
+FUNCTION {bst.publisher.post}
+{ "," }
+% { "" } % (default)
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% series
+
+% The string before series:
+%
+FUNCTION {bst.series.pre}
+{ ", " } % (default)
+
+% The string after series:
+%
+FUNCTION {bst.series.post}
+{ "" } % (default)
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% organization
+
+% The string before organization:
+%
+FUNCTION {bst.organization.pre}
+{ ", " } % (default)
+
+% The string after organization:
+%
+FUNCTION {bst.organization.post}
+{ "" } % (default)
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% school
+
+% The string before school:
+%
+FUNCTION {bst.school.pre}
+{ ", " } % (default)
+
+% The string after school:
+%
+FUNCTION {bst.school.post}
+{ "" } % (default)
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% institution
+
+% The string before institution:
+%
+FUNCTION {bst.institution.pre}
+{ ", " } % (default)
+
+% The string after institution:
+%
+FUNCTION {bst.institution.post}
+{ "" } % (default)
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% howpublished
+
+% The string before howpublished:
+%
+FUNCTION {bst.howpublished.pre}
+{ " " } % (default)
+
+% The string after howpublished:
+%
+FUNCTION {bst.howpublished.post}
+{ "" } % (default)
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% url
+
+% Show or Hide url. If non-zero, url is displayed. Otherwise, url is suppressed.
+FUNCTION {bst.show.url}
+{ #1 } % non-#0 -> Show url field (default)
+% { #0 } % #0 -> Not show url field.
+
+% The string before url:
+%
+FUNCTION {bst.url.pre}
+{ ", URL: \url{" } % (default)
+
+% The string after url:
+%
+FUNCTION {bst.url.post}
+{ "}" } % (default)
+
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% Access
+
+% This setting is valid only if there are "access" field in bib
+% files. The value of access field indicates accessed date for URL.
+
+% The string before access.
+FUNCTION {bst.access.pre}
+{ ", accessed on " } % (default)
+
+% The string after access.
+FUNCTION {bst.access.post}
+{ "" } % (default)
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% DOI (digital object identifier)
+
+% This setting is valid only if there are "doi" field in bib files.
+
+% Show or Hide DOI. If non-zero, DOI is displayed. Otherwise, DOI is suppressed.
+FUNCTION {bst.show.doi}
+{ #1 } % non-#0 -> Show DOI field (default)
+% { #0 } % #0 -> Not show DOI field.
+
+% The string before DOI:
+%
+FUNCTION {bst.doi.pre}
+{ ", DOI: \href{http://dx.doi.org/" doi * "}{" * } % (default)
+
+% The string after DOI:
+%
+FUNCTION {bst.doi.post}
+{ "}" } % (default)
+
+FUNCTION {bst.doi.post.jp}
+{ "}" } % (default)
+
+% How to show URL and DOI fields when both fields exist.
+%
+% #0 -> Both fields are displayed
+% #1 -> Only URL field is displayed
+% #2 -> Only DOI field is displayed
+%
+FUNCTION {bst.url.doi}
+% { #0 } % (default) -> Both fields are displayed
+% { #1 } % -> Only URL field is displayed
+{ #2 } % -> Only DOI field is displayed
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% Other functions:
+
+% The string before note.
+FUNCTION {bst.note.pre}
+{ ", " } % (default)
+
+% The string after note.
+FUNCTION {bst.note.post}
+{ "" } % (default)
+
+% The string that represents Technical report:
+%
+FUNCTION {bst.techrep}
+{ " Tech. Rep." } % (default)
+
+% The string that represents master thesis:
+%
+FUNCTION {bst.mthesis}
+{ " Master's thesis" } % (default)
+
+% The string that represents phd thesis:
+%
+FUNCTION {bst.phdthesis}
+{ " Ph.D. dissertation" } % (default)
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%%
+%% Functions for customization end here:
+%%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+FUNCTION {bst.first}
+{ "1st" }
+
+FUNCTION {bst.second}
+{ "2nd" }
+
+FUNCTION {bst.third}
+{ "3rd" }
+
+FUNCTION {bst.fourth}
+{ "4th" }
+
+FUNCTION {bst.fifth}
+{ "5th" }
+
+FUNCTION {bst.st}
+{ "st" }
+
+FUNCTION {bst.nd}
+{ "nd" }
+
+FUNCTION {bst.rd}
+{ "rd" }
+
+FUNCTION {bst.th}
+{ "th" }
+
+%%%%% memo by Takeda
+
+% "a" 'b := indicates substituting string "a" for variable b.
+
+% Integer number #0, #1,...
+
+%%% Function definition:
+%
+% FUNCTION {name}
+% { 's :=
+%
+% }
+%
+% This is the definition of a function named "name". The function "name" is
+% used in the following way
+%
+% "foo" name
+% "foo" is an argument for the function "name".
+%
+% About the definition of a function with more than two arguments, see the
+% definition of "chop.word".
+
+%%% Declaration of variables:
+
+%% String global variables:
+STRINGS { s t tt }
+STRINGS { year.num }
+STRINGS { preone preten }
+STRINGS { last.sort.label next.extra prev.author prev.author.aer this.author }
+STRINGS { hang }
+STRINGS { item.type }
+STRINGS { tempa tempb }
+
+%% Integer global variables:
+INTEGERS { nameptr namesleft numnames name.num }
+INTEGERS { multiresult }
+INTEGERS { index }
+INTEGERS { len }
+INTEGERS { last.extra.num }
+INTEGERS { output.state before.all mid.sentence after.sentence after.block }
+INTEGERS { last.period.comma }
+INTEGERS { len1.aer len2.aer i.aer }
+
+%%% Definition of functions:
+FUNCTION {not}
+{ { #0 }
+ { #1 }
+ if$
+}
+
+FUNCTION {and}
+{ 'skip$
+ { pop$ #0 }
+ if$
+}
+
+FUNCTION {or}
+{ { pop$ #1 }
+ 'skip$
+ if$
+}
+
+%%% Initialize variables:
+FUNCTION {init.state.consts}
+{ #0 'before.all :=
+ #1 'mid.sentence :=
+ #2 'after.sentence :=
+ #3 'after.block :=
+}
+
+%%% Remove comma and add period:
+%
+%%%
+FUNCTION {add.period.x}
+{ duplicate$
+ #-1 #1 substring$ "," =
+ { #-2 global.max$ substring$ "." * }
+ { duplicate$
+ #-1 #2 substring$ ". " =
+ { #-3 global.max$ substring$ "." * }
+ { duplicate$
+ #-1 #2 substring$ ", " =
+ { #-3 global.max$ substring$ "." * }
+ { duplicate$
+ #-1 #2 substring$ ",'" =
+ { #-3 global.max$ substring$ ".'" * }
+ { duplicate$
+ #-1 #2 substring$ ".'" =
+ { #-3 global.max$ substring$ ".'" * }
+ { duplicate$
+ #-1 #2 substring$ ".~" =
+ { #-3 global.max$ substring$ ".~" * }
+ { duplicate$
+ #-1 #2 substring$ ",~" =
+ { #-3 global.max$ substring$ ".~" * }
+ { duplicate$
+ #-1 #3 substring$ ",''" =
+ { #-4 global.max$ substring$ ".''" * }
+ { duplicate$
+ #-1 #3 substring$ ".''" =
+ { #-4 global.max$ substring$ ".''" * }
+ { add.period$ }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+}
+
+FUNCTION {output.nonnull}
+{ 's :=
+ % mid.sentence
+ output.state mid.sentence =
+ { ", " * write$ }
+ % not mid.sentence
+ { output.state after.block =
+ % after.block
+ { add.period.x " " * write$ }
+ % before.all
+ { output.state before.all =
+ 'write$
+ { add.period.x " " * write$ }
+ if$
+ }
+ if$
+ % not mid.sentence, set to mid.sentence
+ mid.sentence 'output.state :=
+ }
+ if$
+ s
+}
+
+%%% If the last character is period or comma, set non-zero to
+%%% last.period.comma.
+FUNCTION {period.comma.p}
+{ duplicate$ 't :=
+ t #-1 #1 substring$ "." =
+ t #-1 #1 substring$ "," = or
+ t #-1 #1 substring$ ":" = or
+ t #-1 #2 substring$ ".'" = or
+ t #-1 #2 substring$ ",'" = or
+ t #-1 #3 substring$ ".''" = or
+ t #-1 #3 substring$ ",''" = or
+ t #-1 #2 substring$ ".~" = or
+ t #-1 #2 substring$ ",~" = or
+ { #1 'last.period.comma := }
+ { #0 'last.period.comma := }
+ if$
+}
+
+%%% remove unnecessary comma.
+FUNCTION {remove.pre.comma}
+{ 's :=
+ s empty$
+ { "" }
+ { s #1 #1 substring$ "," =
+ { s #2 global.max$ substring$ }
+ { s #1 #1 substring$ "." =
+ { s #2 global.max$ substring$ }
+ 's
+ if$
+ }
+ if$
+ }
+ if$
+}
+
+%%% output.nonnull.nocomma is the same as output.nonnull except that it does
+%%% not add commas even in mid.sentence.
+FUNCTION {output.nonnull.nocomma}
+{ 's :=
+ output.state mid.sentence =
+ % mid.sentence
+ { period.comma.p "" * write$ }
+
+ % not mid.sentence
+ { output.state after.block =
+ % after.block
+ { add.period.x " " * write$ }
+ % before.all
+ { output.state before.all =
+ 'write$
+ { add.period$ " " * write$ }
+ if$
+ }
+ if$
+ mid.sentence 'output.state :=
+ }
+ if$
+ last.period.comma #0 =
+ { s }
+ { s remove.pre.comma }
+ if$
+}
+
+% Not used in the current econ.bst.
+% FUNCTION {output}
+% { duplicate$ empty$
+% 'pop$
+% 'output.nonnull
+% if$
+% }
+
+FUNCTION {output.nocomma}
+{ duplicate$ empty$
+ 'pop$
+ 'output.nonnull.nocomma
+ if$
+}
+
+% Not used in the current econ.bst.
+% FUNCTION {output.check}
+% { 't :=
+% duplicate$ empty$
+% { pop$ "empty " t * " in " * cite$ * warning$ }
+% 'output.nonnull
+% if$
+% }
+
+FUNCTION {output.check.nocomma}
+{ 't :=
+ duplicate$ empty$
+ { pop$ "empty " t * " in " * cite$ * warning$ }
+ 'output.nonnull.nocomma
+ if$
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%%% Format in bbl file:
+
+% \harvarditem[Brezis et~al.]{Brezis, Krugman and
+% Tsiddon}{1993}{brezis93:_leapf_inter_compet}
+% Brezis, Elise~S., Paul~R. Krugman, and Daniel Tsiddon (1993) ``Leapfrogging in
+% International Competition: A Theory of Cycles in National Technological
+% Leadership.'', {\em American Economic Review.}, Vol.~83. No.~5. pp.
+% 1211--1219.
+
+% \harvarditem[abbreviated citation]{full citation}{year}{keyword} ...
+
+%%% Add period and newline.
+FUNCTION {fin.entry}
+{ add.period.x
+ write$
+ newline$
+}
+
+FUNCTION {new.block}
+{ output.state before.all =
+ 'skip$
+ { after.block 'output.state := }
+ if$
+}
+
+FUNCTION {new.sentence}
+{ output.state after.block =
+ 'skip$
+ { output.state before.all =
+ 'skip$
+ { after.sentence 'output.state := }
+ if$
+ }
+ if$
+}
+
+FUNCTION {new.block.check}
+{ empty$
+ 'skip$
+ 'new.block
+ if$
+}
+
+FUNCTION {field.or.null}
+{ duplicate$ empty$
+ { pop$ "" }
+ 'skip$
+ if$
+}
+
+%%% booktitle
+FUNCTION {format.btitle}
+{ booktitle empty$
+ { "" }
+ { bst.btitle.pre booktitle * bst.btitle.post * }
+ if$
+}
+
+%%% journal
+FUNCTION {format.journal}
+{ journal empty$
+ { "" }
+ { bst.journal.pre journal * bst.journal.post * }
+ if$
+}
+
+%%% title for book
+FUNCTION {format.book}
+{ title empty$
+ { "" }
+ { bst.book.pre title * bst.book.post * }
+ if$
+}
+
+FUNCTION {format.url}
+{ url empty$
+ { "" }
+ { type$ "online" = bst.show.url or
+ { bst.url.pre url * bst.url.post *
+ access empty$
+ { "" * }
+ { bst.access.pre * access * bst.access.post * }
+ if$
+ }
+ { "" }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.doi}
+{ doi empty$ bst.show.doi not or
+ { "" }
+ { bst.doi.pre doi * bst.doi.post * }
+ if$
+}
+
+FUNCTION {format.url.doi}
+{ url empty$
+ { format.doi }
+ { doi empty$
+ { format.url }
+ { bst.url.doi #0 =
+ { format.url output.nocomma
+ format.doi }
+ { bst.url.doi #1 =
+ { format.url }
+ { format.doi }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+}
+
+%%% and others
+FUNCTION {bst.and.others.output}
+{ nameorder.temp "random" =
+ bst.use.nameorder #0 = not and
+ { bst.and.others.nameorder }
+ { bst.and.others }
+ if$
+}
+
+%%% author and editor
+
+%%% name
+FUNCTION {format.names}
+{ 's :=
+ % insert 1 to nameptr.
+ #1 'nameptr :=
+ % Set the number of authors to numnames.
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ % Repeat if namesleft > 0
+ { namesleft #0 > }
+ { nameptr #1 =
+ % First author
+ { bst.author.name #0 =
+ bst.author.name #1 =
+ or
+ { bst.first.name.initial #0 =
+ { s nameptr "{vv~}{ll}{, ff}{, jj}" format.name$ 't := }
+ { s nameptr "{vv~}{ll}{, f.}{, jj}" format.name$ 't := }
+ if$
+ }
+ { bst.first.name.initial #0 =
+ { s nameptr "{ff~}{vv~}{ll}{, jj}" format.name$ 't := }
+ { s nameptr "{f.~}{vv~}{ll}{, jj}" format.name$ 't := }
+ if$
+ }
+ if$
+ }
+ % The second or later authors
+ { bst.author.name #0 =
+ bst.author.name #2 =
+ or
+ { bst.first.name.initial #0 =
+ { s nameptr "{ff~}{vv~}{ll}{, jj}" format.name$ 't := }
+ { s nameptr "{f.~}{vv~}{ll}{, jj}" format.name$ 't := }
+ if$
+ }
+ { bst.first.name.initial #0 =
+ { s nameptr "{vv~}{ll}{, ff}{, jj}" format.name$ 't := }
+ { s nameptr "{vv~}{ll}{, f.}{, jj}" format.name$ 't := }
+ if$
+ }
+ if$
+ }
+ if$
+
+ nameptr #1 >
+ % The second or later authors
+ { nameorder.temp "random" =
+ bst.use.nameorder #0 = not and
+ { bst.and.nameorder * t * }
+ { namesleft #1 >
+ % More than one authors left
+ { ", " * t * }
+ % Only one author left
+ { t "others" =
+ { bst.and.others.output * }
+ { numnames #2 =
+ % Entry with two authors
+ { bst.and * t * }
+ { bst.ands * t * }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ 't
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+}
+
+% remove successive periods (commas) from author
+FUNCTION {remove.ss.period.auth}
+{ 's :=
+ s format.names 'tempa :=
+ bst.author.post 'tempb :=
+ tempb #1 #1 substring$ "}" =
+ { tempa tempb * }
+ { tempa #-1 #1 substring$ tempb #1 #1 substring$ =
+ { tempa tempb #2 global.max$ substring$ * }
+ { tempa tempb * }
+ if$
+ }
+ if$
+}
+
+% <prev name list> <new name list> compare.names <modified name list>
+FUNCTION {compare.names.aer}
+{ 's :=
+ 'tempa :=
+
+% "current.author = " s * "\\" * write$ newline$
+% "prev.author = " tempa * "\\" * write$ newline$
+
+ tempa num.names$ 'len1.aer := % len1 = the number of previous authors
+ s num.names$ 'len2.aer := % len2 = the number of current authors
+
+% len1.aer := min(len1.aer,len2.aer)
+% len1 -> min{ the number of previous authors, the number of current authors }
+ len1.aer len2.aer >
+ { len2.aer 'len1.aer := }
+ { }
+ if$
+
+% start with an empty string, then while the components are the same
+% add "\bysame"
+ ""
+ #1 'i.aer :=
+
+ { i.aer len1.aer > not }
+ { tempa i.aer "{ff }{vv }{ll}{ jj}" format.name$
+ s i.aer "{ff }{vv }{ll}{ jj}" format.name$
+ =
+ { #1 i.aer <
+ { " and " * } % \bysame で省略する著者の前につく and
+ { }
+ if$
+ "\bysame{}" *
+ i.aer #1 + 'i.aer := }
+ { #-1 'len1.aer := }
+ if$
+ }
+ while$
+
+% add the rest of the second string
+ { i.aer len2.aer > not }
+ { #1 i.aer <
+ { " and " * }
+ { }
+ if$
+ s i.aer "{ff }{vv }{ll}{ jj}" format.name$ *
+ i.aer #1 + 'i.aer :=
+ }
+ while$
+}
+
+%%% author
+FUNCTION {format.authors}
+{ author empty$
+ { "" }
+ { bst.use.bysame #2 =
+ { prev.author.aer author compare.names.aer 's :=
+ author 'prev.author.aer := }
+ { author 's := }
+ if$
+ extra.label.bysame "bysame" =
+ { "\bysame " }
+ { bst.author.pre s remove.ss.period.auth * }
+ if$
+ }
+ if$
+}
+
+%%% editor
+FUNCTION {format.editors}
+{ editor empty$
+ { "" }
+ { bst.use.bysame #2 =
+ { prev.author.aer editor compare.names.aer 's :=
+ editor 'prev.author.aer := }
+ { editor 's := }
+ if$
+ extra.label.bysame "bysame" =
+ { "\bysame " }
+ { bst.author.pre s remove.ss.period.auth * }
+ if$
+ s num.names$ #1 >
+ { bst.editors * }
+ { bst.editor * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.authors.alt}
+{ author empty$
+ { "" }
+ { extra.label.bysame "bysame" =
+ {"\bysame "}
+ { bst.author.pre author remove.ss.period.auth * }
+ if$
+ }
+ if$
+}
+
+%%% editor
+FUNCTION {format.editors.alt}
+{ editor empty$
+ { "" }
+ { extra.label.bysame "bysame" =
+ { "\bysame " }
+ { bst.author.pre editor remove.ss.period.auth * }
+ if$
+ editor num.names$ #1 >
+ { bst.editors * }
+ { bst.editor * }
+ if$
+ }
+ if$
+}
+
+%%% format.in.ed.booktitle
+FUNCTION {format.editors.x}
+{ editor empty$
+ { "" }
+ { bst.editor.btitle.order #0 =
+ { "" }
+ { editor num.names$ #1 >
+ { bst.editors " by " * }
+ { bst.editor " by " * }
+ if$
+ }
+ if$
+ editor format.names *
+ bst.editor.btitle.order #0 =
+ { editor num.names$ #1 >
+ { bst.editors * }
+ { bst.editor * }
+ if$
+ }
+ { "" * }
+ if$
+ }
+ if$
+}
+
+%%% Remove commas in the cases like "?." and "?,".
+FUNCTION {remove.irrelevant.period.comma}
+{ 's :=
+ s empty$
+ { "" }
+ { s #-1 #3 substring$ "?,'" =
+ s #-1 #3 substring$ "?.'" = or
+ { s #-3 global.max$ substring$ "'" * }
+ { s #-1 #4 substring$ "?,''" =
+ s #-1 #4 substring$ "?.''" = or
+ { s #-4 global.max$ substring$ "''" * }
+ { s #-1 #2 substring$ "?," =
+ s #-1 #2 substring$ "?." = or
+ { s #-2 global.max$ substring$ "" * }
+ { s #-1 #3 substring$ "?,~" =
+ s #-1 #3 substring$ "?.~" = or
+ { s #-4 global.max$ substring$ "?~" * }
+ 's
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+}
+
+%%% title
+FUNCTION {format.title.sub}
+{ bst.title.lower.case #0 =
+ { bst.title.pre title * bst.title.post * }
+ { bst.title.pre title "t" change.case$ * bst.title.post * }
+ if$
+}
+
+%%% title
+FUNCTION {format.title}
+{ title empty$
+ bst.hide.title #0 = not or
+ { "" }
+ { format.title.sub remove.irrelevant.period.comma }
+ if$
+}
+
+%%% title for misc.
+FUNCTION {format.misc.title}
+{ title empty$
+ { "" }
+ { bst.title.pre title * bst.title.post * }
+ if$
+}
+
+% Convert "-" to "--" (for pages field)
+FUNCTION {n.dashify}
+{ 't :=
+ ""
+ %% while$
+ { t empty$ not }
+ { t #1 #1 substring$ "-" =
+ { t #1 #2 substring$ "--" = not
+ { "--" *
+ t #2 global.max$ substring$ 't :=
+ }
+ { { t #1 #1 substring$ "-" = }
+ { "-" *
+ t #2 global.max$ substring$ 't :=
+ }
+ while$
+ }
+ if$
+ }
+ { t #1 #1 substring$ *
+ t #2 global.max$ substring$ 't :=
+ }
+ if$
+ }
+ while$
+}
+
+%%% year
+FUNCTION {format.year}
+{ year empty$
+ { "there's no year in " cite$ * warning$
+ ", " }
+ { type$ "article" =
+ { bst.year.pre year * extra.label * bst.year.post * }
+ { bst.year.na.pre year * extra.label * bst.year.na.post * }
+ if$
+ }
+ if$
+}
+
+%%% page for book
+FUNCTION {format.book.pages}
+{ pages empty$
+ { "" }
+ { bst.pages.pre pages * bst.pages.post * }
+ if$
+}
+
+%%% Attach tie for the string with two or less characters.
+FUNCTION {tie.or.space.connect}
+{ duplicate$ text.length$ #3 <
+ { "~" }
+ { " " }
+ if$
+ swap$ * *
+}
+
+FUNCTION {either.or.check}
+{ empty$
+ 'pop$
+ { "can't use both " swap$ * " fields in " * cite$ * warning$ }
+ if$
+}
+
+%%% volume for book
+FUNCTION {format.bvolume}
+{ volume empty$
+ { "" }
+ { bst.volume.pre volume * bst.volume.post *
+ series empty$
+ 'skip$
+ %% If there is series field
+ { " of " * series * bst.series.post * }
+ if$
+% "volume and number" number either.or.check
+ }
+ if$
+}
+
+%%% series
+FUNCTION {output.series}
+{ series empty$
+ { "" }
+ { bst.series.pre series * bst.series.post * }
+ if$
+}
+
+%%% number and series
+FUNCTION {format.number.series}
+{ volume empty$
+ { number empty$
+ bst.hide.month #0 = not or
+ % number is empty
+ { series empty$
+ { "" }
+ % series is not empty.
+ { output.series }
+ if$
+ }
+ % number is not empty$
+ { series empty$
+ { bst.number.pre number * bst.number.post * }
+ % series is not empty.
+ { bst.in bst.series.pre * series * bst.series.post *
+ bst.number.pre * number * bst.number.post * }
+ if$
+ }
+ if$
+ }
+ { "" }
+ if$
+}
+
+%%% Number or not.
+FUNCTION {is.num}
+{ chr.to.int$
+ duplicate$ "0" chr.to.int$ < not
+ swap$ "9" chr.to.int$ > not and
+}
+
+FUNCTION {extract.num}
+{ duplicate$ 't :=
+ "" 's :=
+ { t empty$ not }
+ { t #1 #1 substring$
+ t #2 global.max$ substring$ 't :=
+ duplicate$ is.num
+ { s swap$ * 's := }
+ { pop$ "" 't := }
+ if$
+ }
+ while$
+ s empty$
+ 'skip$
+ { pop$ s }
+ if$
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% edition
+
+% Convert edition to 1st, 2nd, 3rd, 4th etc
+FUNCTION {eng.ord}
+{ duplicate$ "1" swap$ *
+ #-2 #1 substring$ "1" =
+ { bst.th * }
+ { duplicate$ #-1 #1 substring$
+ duplicate$ "1" =
+ { pop$ bst.st * }
+ { duplicate$ "2" =
+ { pop$ bst.nd * }
+ { "3" =
+ { bst.rd * }
+ { bst.th * }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+}
+
+% Convert first, second etc in edition field to 1st, 2nd (from jfm.bst)
+FUNCTION {convert.edition}
+{ edition extract.num "l" change.case$ 's :=
+ s "first" = s "1" = or
+ { bst.first }
+ { s "second" = s "2" = or
+ { bst.second }
+ { s "third" = s "3" = or
+ { bst.third }
+ { s "fourth" = s "4" = or
+ { bst.fourth }
+ { s "fifth" = s "5" = or
+ { bst.fifth }
+ { s #1 #1 substring$ is.num
+ { s eng.ord }
+ { edition }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+}
+
+%%% edition
+FUNCTION {format.edition}
+{ edition empty$
+ { "" }
+ { output.state mid.sentence =
+ { bst.edition.pre convert.edition "l" change.case$ * bst.edition.post * }
+ { bst.edition.pre convert.edition "t" change.case$ * bst.edition.post * }
+ if$
+ }
+ if$
+}
+
+%%% month
+FUNCTION {format.month}
+{ month empty$
+ bst.hide.month #0 = not or
+ { "" }
+ { bst.month.pre month * bst.month.post * }
+ if$
+}
+
+%%% year and month
+FUNCTION {format.date}
+{ format.month format.year *
+}
+
+%%% Is multiple pages like 1-100?
+FUNCTION { multi.page.check }
+{ 't :=
+ #0 'multiresult :=
+ { multiresult not
+ t empty$ not
+ and
+ }
+ { t #1 #1 substring$
+ duplicate$ "-" =
+ swap$ duplicate$ "," =
+ swap$ "+" =
+ or or
+ { #1 'multiresult := }
+ { t #2 global.max$ substring$ 't := }
+ if$
+ }
+ while$
+ multiresult
+}
+
+%%% pages
+FUNCTION {format.pages}
+{ pages empty$
+ { "" }
+ { pages multi.page.check
+ { bst.pages.pre pages n.dashify tie.or.space.connect * bst.pages.post }
+ { bst.page.pre pages tie.or.space.connect * bst.page.post }
+ if$
+ }
+ if$
+}
+
+%%% number
+FUNCTION {format.number}
+{ number empty$
+ bst.hide.number #0 = not or
+ { "" }
+ { bst.number.pre number * bst.number.post * }
+ if$
+}
+
+%%% volume
+FUNCTION {format.volume}
+{ volume empty$
+ 'skip$
+ { bst.volume.pre volume * bst.volume.post *
+ bst.year.position #3 =
+ { format.year * }
+ 'skip$
+ if$
+ }
+ if$
+}
+
+%%% number, page
+FUNCTION {format.number.pages}
+{ number empty$
+ { format.pages }
+ { format.number format.pages * }
+ if$
+}
+
+%%% volume, page
+FUNCTION {format.volume.pages}
+{ volume empty$
+ { format.pages }
+ { format.volume format.pages * }
+ if$
+}
+
+%%% volume, number, page
+FUNCTION {format.volume.number.pages}
+{ volume empty$
+ { number empty$
+ { format.pages }
+ { format.number format.pages * }
+ if$
+ }
+ { number empty$
+ { format.volume format.pages * }
+ { format.volume format.number * format.pages * }
+ if$
+ }
+ if$
+}
+
+% volume, number, page
+FUNCTION {format.vol.num.pages}
+{ volume empty$
+ %% volume is empty.
+ { number empty$
+ %% number is empty.
+ { pages empty$
+ % warning
+ { "there is no volume, number, and pages in " cite$ * warning$ "" }
+ { "" format.pages * }
+ if$
+ }
+ %% number is not empty.
+ % warning
+ { "there's a number but no volume in " cite$ * warning$
+ format.number.pages }
+ if$
+ }
+ %% volume is not empty.
+ { number empty$
+ %% number is empty.
+ { format.volume.pages }
+ %% number is not empty.
+ { format.volume.number.pages }
+ if$
+ }
+ if$
+}
+
+%%% chapter
+FUNCTION {format.chapter}
+{ chapter empty$
+ { "" }
+ { type empty$
+ { bst.chapter.pre chapter tie.or.space.connect * bst.chapter.post }
+ { ", " * type " " * chapter * }
+ if$
+ }
+ if$
+}
+
+%%% chapter, pages
+FUNCTION {format.chapter.pages}
+{ chapter empty$
+ { pages empty$
+ { "" }
+ { "" format.pages * }
+ if$
+ }
+ { pages empty$
+ { "" format.chapter * }
+ { "" format.chapter * format.pages * }
+ if$
+ }
+ if$
+}
+
+%%% editor and booktitle
+FUNCTION {format.in.ed.booktitle}
+{ booktitle empty$
+ { "" }
+ { editor empty$
+ { bst.in format.btitle * }
+ { bst.editor.btitle.order #0 =
+ { bst.in format.editors.x * " " * format.btitle * }
+ { bst.in format.btitle * " " * format.editors.x * }
+ if$
+ }
+ if$
+ }
+ if$
+}
+
+%%% howpublished
+FUNCTION {format.howpublished}
+{ howpublished empty$
+ { "" }
+ { bst.howpublished.pre howpublished * bst.howpublished.post * }
+ if$
+}
+
+%%% address
+FUNCTION {format.address}
+{ address empty$
+ { "" }
+ { bst.address.pre address * bst.address.post * }
+ if$
+}
+
+%%% publisher
+FUNCTION {format.publisher}
+{ publisher empty$
+ { "" }
+ { bst.publisher.pre publisher * bst.publisher.post * }
+ if$
+}
+
+%%% organization
+FUNCTION {format.organization}
+{ organization empty$
+ { "" }
+ { bst.organization.pre organization * bst.organization.post * }
+ if$
+}
+
+%% publisher and address
+FUNCTION {output.publisher.address}
+{ address empty$
+ { format.publisher "publisher" output.check.nocomma }
+ { bst.address.position #0 =
+ { format.address output.nocomma
+ format.publisher "publisher" output.check.nocomma }
+ { format.publisher "publisher" output.check.nocomma
+ format.address output.nocomma }
+ if$
+ }
+ if$
+}
+
+%% address, organization, publisher
+FUNCTION {output.address.organization.publisher}
+{ address empty$
+ %% address is empty
+ { organization empty$
+ %% organization is empty
+ { publisher empty$
+ 'skip$
+ { format.publisher "publisher" output.check.nocomma }
+ if$
+ }
+ %% organization is not empty
+ { publisher empty$
+ { format.organization "organization" output.check.nocomma }
+ { format.organization "organization" output.check.nocomma
+ format.publisher "publisher" output.check.nocomma }
+ if$
+ }
+ if$
+ }
+ %% address is not empty
+ { organization empty$
+ %% organization is empty
+ { publisher empty$
+ %% publisher is empty
+ { format.address output.nocomma }
+ %% publisher is not empty
+ { bst.address.position #0 =
+ { format.address output.nocomma
+ format.publisher "publisher" output.check.nocomma }
+ { format.publisher "publisher" output.check.nocomma
+ format.address output.nocomma }
+ if$
+ }
+ if$
+ }
+ %% organization is not empty
+ { publisher empty$
+ %% publisher is empty
+ { format.organization "organization" output.check.nocomma
+ format.address output.nocomma }
+ %% publisher is not empty
+ { format.organization "organization" output.check.nocomma
+ bst.address.position #0 =
+ { format.address output.nocomma
+ format.publisher "publisher" output.check.nocomma }
+ { format.publisher "publisher" output.check.nocomma
+ format.address output.nocomma }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+}
+
+%%% misc
+FUNCTION {empty.misc.check}
+{ author empty$ title empty$ howpublished empty$
+ month empty$ year empty$ note empty$
+ and and and and and
+ key empty$ not and
+ { "all relevant fields are empty in " cite$ * warning$ }
+ 'skip$
+ if$
+}
+
+FUNCTION {format.thesis.type}
+{ type empty$
+ 'skip$
+ { pop$ " " type * }
+ if$
+}
+
+FUNCTION {format.tr.number}
+{ type empty$
+ { "Technical Report" }
+ { " " type * }
+ if$
+ number empty$
+ { "t" change.case$ }
+ { number tie.or.space.connect }
+ if$
+}
+
+%%% phdthesis
+FUNCTION {format.phd}
+{ bst.phdthesis }
+
+%%% mastersthesis
+FUNCTION {format.mthesis}
+{ bst.mthesis }
+
+%%% school
+FUNCTION {format.school}
+{ school empty$
+ { "" }
+ { bst.school.pre school * bst.school.post * }
+ if$
+}
+
+%%% institution
+FUNCTION {format.institution}
+{ institution empty$
+ { "" }
+ { bst.institution.pre institution * bst.institution.post * }
+ if$
+}
+
+%%% remove first ? characters.
+FUNCTION {chop.word}
+{ 's :=
+ 'len :=
+ s #1 len substring$ =
+ { s len #1 + global.max$ substring$ }
+ 's
+ if$
+}
+
+FUNCTION {format.note}
+{ note empty$
+ { "" }
+ { bst.note.pre note * bst.note.post * }
+ if$
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% \havarditem
+
+FUNCTION {output.bibitem}
+{ newline$
+ "\harvarditem[" write$
+ alabel write$ % alabel <- abbreviated citation
+ "]{" write$
+ flabel write$ % flabel <- full citation
+ "}{" write$
+ cyear write$
+ % cyear = year
+ "}{" write$
+ cite$ write$ % cite$ -> pusch keyword
+ "}" write$
+ % If number index is on
+ bst.use.number.index #0 =
+ 'skip$
+ { index #1 + 'index :=
+ "" 'preone :=
+ "" 'preten :=
+ bst.number.index.digit "1" =
+ 'skip$
+ { bst.number.index.digit "2" =
+ { "\hskip0.5em" 'preone := }
+ { bst.number.index.digit "3" =
+ { "\hskip1em" 'preone :=
+ "\hskip0.5em" 'preten := }
+ 'skip$
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+ newline$
+ before.all 'output.state :=
+ ""
+ % number index
+ bst.use.number.index #0 =
+ 'skip$
+ { index #10 <
+ % Insert spaces according to digit of number index.
+ { preone }
+ { index #100 <
+ { preten }
+ { "" }
+ if$
+ }
+ if$
+ bst.number.index.pre * index int.to.str$ * bst.number.index.post * write$
+ }
+ if$
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% article
+
+FUNCTION {article}
+{ output.bibitem
+ format.authors "author" output.check.nocomma
+ bst.year.position #0 =
+ { format.year "year" output.check.nocomma }
+ 'skip$
+ if$
+ format.title "title" output.check.nocomma
+
+ format.journal "journal" output.check.nocomma
+ bst.year.position #2 =
+ { format.date output.nocomma }
+ 'skip$
+ if$
+ format.vol.num.pages output.nocomma
+
+ bst.year.position #1 =
+ { format.date output.nocomma }
+ 'skip$
+ if$
+
+ format.url.doi output.nocomma
+
+ format.note output.nocomma
+ fin.entry
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% book
+
+FUNCTION {book}
+{ output.bibitem
+ author empty$
+ { format.editors "author and editor" output.check.nocomma }
+ { format.authors output.nonnull.nocomma
+ "author and editor" editor either.or.check
+ }
+ if$
+ bst.year.position #0 =
+ { format.year "year" output.check.nocomma }
+ 'skip$
+ if$
+ format.book "title" output.check.nocomma
+
+ format.bvolume output.nocomma
+ format.number.series output.nocomma
+ output.publisher.address
+
+ format.edition output.nocomma
+ format.book.pages output.nocomma
+
+ bst.year.position #0 = not
+ { format.year "year" output.check.nocomma }
+ 'skip$
+ if$
+
+ format.url.doi output.nocomma
+
+ format.note output.nocomma
+ fin.entry
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% booklet
+
+FUNCTION {booklet}
+{ output.bibitem
+ format.authors output.nocomma
+ format.year output.nocomma
+ format.misc.title "title" output.check.nocomma
+ format.howpublished output.nocomma
+ format.address output.nocomma
+
+ format.url.doi output.nocomma
+
+ format.note output.nocomma
+ fin.entry
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% inbook
+
+FUNCTION {inbook}
+{ output.bibitem
+ author empty$
+ { format.editors "author and editor" output.check.nocomma }
+ { format.authors output.nonnull.nocomma
+ "author and editor" editor either.or.check
+ }
+ if$
+ bst.year.position #0 =
+ { format.year "year" output.check.nocomma }
+ 'skip$
+ if$
+% format.book remove.pre.comma "title" output.check.nocomma
+ format.book "title" output.check.nocomma
+ format.edition output.nocomma
+
+ format.bvolume output.nocomma
+ format.chapter.pages "chapter and pages" output.check.nocomma
+ format.number.series output.nocomma
+ output.publisher.address
+
+ bst.year.position #0 = not
+ { format.year "year" output.check.nocomma }
+ 'skip$
+ if$
+
+ format.url.doi output.nocomma
+
+ format.note output.nocomma
+ fin.entry
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% incollection
+
+FUNCTION {incollection}
+{ output.bibitem
+ format.authors "author" output.check.nocomma
+ bst.year.position #0 =
+ { format.year "year" output.check.nocomma }
+ 'skip$
+ if$
+ format.title "title" output.check.nocomma
+
+ format.in.ed.booktitle "booktitle" output.check.nocomma
+ format.bvolume output.nocomma
+ output.address.organization.publisher
+ format.edition output.nocomma
+ format.chapter.pages output.nocomma
+
+ bst.year.position #0 = not
+ { format.year "year" output.check.nocomma }
+ 'skip$
+ if$
+
+ format.url.doi output.nocomma
+
+ format.note output.nocomma
+ fin.entry
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% inproceedings
+
+FUNCTION {inproceedings}
+{ output.bibitem
+ format.authors "author" output.check.nocomma
+ bst.year.position #0 =
+ { format.year "year" output.check.nocomma }
+ 'skip$
+ if$
+ format.title "title" output.check.nocomma
+
+ format.in.ed.booktitle "booktitle" output.check.nocomma
+ format.bvolume output.nocomma
+ format.number.series output.nocomma
+ format.pages output.nocomma
+ output.address.organization.publisher
+
+ bst.year.position #0 = not
+ { format.date output.nocomma }
+ { format.month output.nocomma }
+ if$
+
+ format.url.doi output.nocomma
+
+ format.note output.nocomma
+ fin.entry
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% conference
+
+FUNCTION {conference}
+{ inproceedings }
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% manual
+FUNCTION {manual}
+{ output.bibitem
+ author empty$
+ { organization empty$
+ 'skip$
+ { organization output.nonnull.nocomma
+ address output.nocomma
+ }
+ if$
+ }
+ { format.authors output.nonnull.nocomma }
+ if$
+ bst.year.position #0 =
+ { format.year "year" output.check.nocomma }
+ 'skip$
+ if$
+ format.book "title" output.check.nocomma
+ author empty$
+ { organization empty$
+ { format.address new.block.check
+ format.address output.nocomma
+ }
+ 'skip$
+ if$
+ }
+ { output.address.organization.publisher }
+ if$
+ format.edition output.nocomma
+
+ bst.year.position #0 = not
+ { format.year "year" output.check.nocomma }
+ 'skip$
+ if$
+
+ format.url.doi output.nocomma
+
+ format.note output.nocomma
+ fin.entry
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% mastersthesis
+
+FUNCTION {mastersthesis}
+{ output.bibitem
+ format.authors "author" output.check.nocomma
+ bst.year.position #0 =
+ { format.year "year" output.check.nocomma }
+ 'skip$
+ if$
+ format.title "title" output.check.nocomma
+ format.mthesis format.thesis.type output.nonnull.nocomma
+ format.school "school" output.check.nocomma
+ format.address output.nocomma
+
+ bst.year.position #0 = not
+ { format.year "year" output.check.nocomma }
+ 'skip$
+ if$
+
+ format.url.doi output.nocomma
+
+ format.note output.nocomma
+ fin.entry
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% misc
+
+FUNCTION {misc}
+{ output.bibitem
+ format.authors "author" output.check.nocomma
+ bst.year.position #0 =
+ { format.year "year" output.check.nocomma }
+ 'skip$
+ if$
+ format.misc.title output.nocomma
+ format.howpublished output.nocomma
+
+ bst.year.position #0 = not
+ { format.date output.nocomma }
+ { format.month output.nocomma }
+ if$
+
+ format.url.doi output.nocomma
+
+ format.note output.nocomma
+ fin.entry
+ empty.misc.check
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% Online
+
+FUNCTION {online}
+{ output.bibitem
+ format.authors "author" output.check.nocomma
+ bst.year.position #0 =
+ { format.year "year" output.check.nocomma }
+ 'skip$
+ if$
+ format.misc.title output.nocomma
+ format.howpublished output.nocomma
+
+ bst.year.position #0 = not
+ { format.date output.nocomma }
+ { format.month output.nocomma }
+ if$
+
+ format.url.doi output.nocomma
+
+ format.note output.nocomma
+ fin.entry
+ empty.misc.check
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% phdthesis
+
+FUNCTION {phdthesis}
+{ output.bibitem
+ format.authors "author" output.check.nocomma
+ bst.year.position #0 =
+ { format.year "year" output.check.nocomma }
+ 'skip$
+ if$
+ format.book "title" output.check.nocomma
+ format.phd
+ format.thesis.type output.nonnull.nocomma
+ format.school "school" output.check.nocomma
+ address empty$
+ 'skip$
+ { format.address output.nocomma }
+ if$
+
+ bst.year.position #0 = not
+ { format.year "year" output.check.nocomma }
+ 'skip$
+ if$
+
+ format.url.doi output.nocomma
+
+ format.note output.nocomma
+ fin.entry
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% proceedings
+
+FUNCTION {proceedings}
+{ output.bibitem
+ editor empty$
+ { organization output.nocomma }
+ { format.editors output.nonnull.nocomma }
+ if$
+ bst.year.position #0 =
+ { format.year "year" output.check.nocomma }
+ 'skip$
+ if$
+ format.btitle remove.pre.comma "title" output.check.nocomma
+ format.bvolume output.nocomma
+ format.number.series output.nocomma
+ output.address.organization.publisher
+
+ bst.year.position #0 = not
+ { format.year "year" output.check.nocomma }
+ 'skip$
+ if$
+
+ format.url.doi output.nocomma
+
+ format.note output.nocomma
+ fin.entry
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% techreport
+
+FUNCTION {techreport}
+{ output.bibitem
+ format.authors "author" output.check.nocomma
+ bst.year.position #0 =
+ { format.year "year" output.check.nocomma }
+ 'skip$
+ if$
+ format.title "title" output.check.nocomma
+ format.tr.number output.nonnull.nocomma
+ format.institution "institution" output.check.nocomma
+ format.address output.nocomma
+
+ bst.year.position #0 = not
+ { format.year "year" output.check.nocomma }
+ 'skip$
+ if$
+
+ format.note output.nocomma
+ fin.entry
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% unpublished
+
+FUNCTION {unpublished}
+{ output.bibitem
+ format.authors "author" output.check.nocomma
+ bst.year.position #0 =
+ { format.year "year" output.check.nocomma }
+ 'skip$
+ if$
+ format.title "title" output.check.nocomma
+
+ bst.year.position #0 = not
+ { format.date remove.pre.comma output.nocomma }
+ { month empty$
+ 'skip$
+ { format.month remove.pre.comma output.nocomma }
+ if$
+ }
+ if$
+
+ format.url.doi output.nocomma
+
+ format.note "note" output.check.nocomma
+ fin.entry
+}
+
+FUNCTION {default.type}
+{ misc }
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% Alias for month names:
+
+MACRO {jan} {"January"}
+MACRO {feb} {"February"}
+MACRO {mar} {"March"}
+MACRO {apr} {"April"}
+MACRO {may} {"May"}
+MACRO {jun} {"June"}
+MACRO {jul} {"July"}
+MACRO {aug} {"August"}
+MACRO {sep} {"September"}
+MACRO {oct} {"October"}
+MACRO {nov} {"November"}
+MACRO {dec} {"December"}
+
+%%% Read entries:
+READ
+
+%%% Variable for remembering the order of citation.
+INTEGERS { order.num }
+FUNCTION {initialize.order.num}
+{
+ #1 'order.num :=
+}
+%%% Initialize a variables
+EXECUTE {initialize.order.num}
+
+%%% Variable for remembering the order of citation.
+FUNCTION {set.order.cited}
+{
+ order.num 'order.cited :=
+ #1 order.num + 'order.num :=
+}
+%%% Iterate for all entries:
+ITERATE {set.order.cited}
+
+%%% check the value of nameorder field.
+FUNCTION {set.nameorder}
+{ nameorder empty$
+ { "" 'nameorder.temp := }
+ { nameorder 'nameorder.temp := }
+ if$
+}
+%%% Iterate for all entries:
+ITERATE {set.nameorder}
+
+%%% Remove symbols and convert to lowercase.
+FUNCTION {sortify}
+{ purify$ "l" change.case$ }
+
+%%% names for sorting
+FUNCTION {sort.format.names}
+{ 's :=
+ #1 'nameptr :=
+ ""
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ { nameptr #1 >
+ { ", " * }
+ 'skip$
+ if$
+ s nameptr "{ll}{ f}{ j}" format.name$ 't :=
+ nameptr numnames = t "others" = and
+ { bst.and.others.output *}
+ { t sortify * }
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+}
+
+FUNCTION {sort.format.names.abb}
+{ 's :=
+ s num.names$ 'numnames :=
+ numnames bst.and.others.num <
+ { s sort.format.names }
+ { s #1 "{ll}{ f}{ j}" format.name$ " zz " * }
+ if$
+}
+
+%%% Label for full author name.
+FUNCTION {format.lab.names.full}
+{ 's :=
+ #1 'nameptr :=
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ { s nameptr "{vv~}{ll}" format.name$ 't :=
+ nameptr #1 >
+ { namesleft #1 >
+ { nameorder.temp "random" = bst.use.nameorder #0 = not and
+ { bst.and.nameorder * t * }
+ { ", " * t * }
+ if$
+ }
+ { t "others" =
+ { bst.and.others.output * }
+ { numnames #2 >
+ { nameorder.temp "random" = bst.use.nameorder #0 = not and
+ { bst.cite.and.nameorder * t * }
+ { bst.cite.ands * t * }
+ if$
+ }
+ { nameorder.temp "random" = bst.use.nameorder #0 = not and
+ { bst.cite.and.nameorder * t * }
+ { bst.cite.and * t * }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ 't
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+ numnames #1 > #1 #2 = and {", eds" *} {} if$
+ numnames #1 = #1 #2 = and {", ed" *} {} if$
+}
+
+%%% laberl for abbreviated author name.
+FUNCTION {format.lab.names.abb}
+{ 's :=
+ s num.names$ 'numnames :=
+ numnames bst.and.others.num <
+ % if the number of authors is less than bst.and.others.num, full name.
+ { s format.lab.names.full }
+ % if the number of authors is equal or more than bst.and.others.num, abbreviated name.
+ { s #1 "{ll}" format.name$ bst.and.others.output * }
+ if$
+}
+
+%%% abbreviated author
+FUNCTION {author.key.label.abb}
+{ author empty$
+ { key empty$
+ { cite$ #1 #3 substring$ }
+ { key #3 text.prefix$ }
+ if$
+ }
+ { author format.lab.names.abb }
+ if$
+}
+
+%%% full author
+FUNCTION {author.key.label.full}
+{ author empty$
+ { key empty$
+ { cite$ #1 #3 substring$ }
+ { key #3 text.prefix$ }
+ if$
+ }
+ { author format.lab.names.full }
+ if$
+}
+
+FUNCTION {format.names.full.wo.and}
+{ 's :=
+ #1 'nameptr :=
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ { s nameptr "{ll}{, ff}{, jj}" format.name$ 't :=
+ nameptr #1 >
+ { namesleft #1 >
+ { " " * t * }
+ { t "others" =
+ { " " * }
+ { numnames #2 >
+ { " " * t * }
+ { " " * t * }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ 't
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+}
+
+FUNCTION {author.key.full.wo.and}
+{ author empty$
+ { key empty$
+ { cite$ #1 #3 substring$ }
+ { key #3 text.prefix$ }
+ if$
+ }
+ { author format.names.full.wo.and }
+ if$
+}
+
+FUNCTION {author.editor.key.full.wo.and}
+{ author empty$
+ { editor empty$
+ { key empty$
+ { cite$ #1 #3 substring$ }
+ { key #3 text.prefix$ }
+ if$
+ }
+ { editor format.names.full.wo.and }
+ if$
+ }
+ { author format.names.full.wo.and }
+ if$
+}
+
+FUNCTION {editor.key.organization.key.full.wo.and}
+{ editor empty$
+ { key empty$
+ { organization empty$
+ { cite$ #1 #3 substring$ }
+ { "The " #4 organization chop.word #3 text.prefix$ }
+ if$
+ }
+ { key #3 text.prefix$ }
+ if$
+ }
+ { editor format.names.full.wo.and }
+ if$
+}
+
+FUNCTION {author.key.organization.key.full.wo.and}
+{ author empty$
+ { key empty$
+ { organization empty$
+ { cite$ #1 #3 substring$ }
+ { "The " #4 organization chop.word #3 text.prefix$ }
+ if$
+ }
+ { key #3 text.prefix$ }
+ if$
+ }
+ { author format.names.full.wo.and }
+ if$
+}
+
+%%% abbreviated author
+FUNCTION {author.editor.key.label.abb}
+{ author empty$
+ { editor empty$
+ { key empty$
+ { cite$ #1 #3 substring$ }
+ { key #3 text.prefix$ }
+ if$
+ }
+ { editor format.lab.names.abb }
+ if$
+ }
+ { author format.lab.names.abb }
+ if$
+}
+
+%%% full author
+FUNCTION {author.editor.key.label.full}
+{ author empty$
+ { editor empty$
+ { key empty$
+ { cite$ #1 #3 substring$ }
+ { key #3 text.prefix$ }
+ if$
+ }
+ { editor format.lab.names.full }
+ if$
+ }
+ { author format.lab.names.full }
+ if$
+}
+
+FUNCTION {author.key.organization.label.full}
+{ author empty$
+ { key empty$
+ { organization empty$
+ { cite$ #1 #3 substring$ }
+ { "The " #4 organization chop.word #3 text.prefix$ }
+ if$
+ }
+ { key #3 text.prefix$ }
+ if$
+ }
+ { author format.lab.names.full }
+ if$
+}
+
+FUNCTION {author.key.organization.label.abb}
+{ author empty$
+ { key empty$
+ { organization empty$
+ { cite$ #1 #3 substring$ }
+ { "The " #4 organization chop.word #3 text.prefix$ }
+ if$
+ }
+ { key #3 text.prefix$ }
+ if$
+ }
+ { author format.lab.names.abb }
+ if$
+}
+
+FUNCTION {editor.key.organization.label.full}
+{ editor empty$
+ { key empty$
+ { organization empty$
+ { cite$ #1 #3 substring$ }
+ { "The " #4 organization chop.word #3 text.prefix$ }
+ if$
+ }
+ { key #3 text.prefix$ }
+ if$
+ }
+ { editor format.lab.names.full }
+ if$
+}
+
+FUNCTION {editor.key.organization.label.abb}
+{ editor empty$
+ { key empty$
+ { organization empty$
+ { cite$ #1 #3 substring$ }
+ { "The " #4 organization chop.word #3 text.prefix$ }
+ if$
+ }
+ { key #3 text.prefix$ }
+ if$
+ }
+ { editor format.lab.names.abb }
+ if$
+}
+
+%%% Convert numbers: 0->9, 1->8, 2->7,..., 9->0
+FUNCTION {reverse.num}
+{ 's :=
+ s "1" =
+ { "8" 'year.num := }
+ { s "2" =
+ { "7" 'year.num := }
+ { s "3" =
+ { "6" 'year.num := }
+ { s "4" =
+ { "5" 'year.num := }
+ { s "5" =
+ { "4" 'year.num := }
+ { s "6" =
+ { "3" 'year.num := }
+ { s "7" =
+ { "2" 'year.num := }
+ { s "8" =
+ { "1" 'year.num := }
+ { s "9" =
+ { "0" 'year.num := }
+ { s "0" =
+ { "9" 'year.num := }
+ { "9" 'year.num := }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+ year.num
+}
+
+%%% Convert year (large number -> small number)
+FUNCTION {convert.year}
+{ 't :=
+ bst.reverse.year #0 =
+ { t 'tt := }
+ { t #1 #1 substring$ reverse.num
+ t #2 #1 substring$ reverse.num *
+ t #3 #1 substring$ reverse.num *
+ t #4 #1 substring$ reverse.num * 'tt := }
+ if$
+ tt
+}
+
+%%% cyear
+FUNCTION {calc.cyear}
+{ type$ "book" =
+ type$ "inbook" =
+ or
+ 'author.editor.key.full.wo.and
+ { type$ "proceedings" =
+ 'editor.key.organization.key.full.wo.and
+ { type$ "manual" =
+ 'author.key.organization.key.full.wo.and
+ 'author.key.full.wo.and
+ if$
+ }
+ if$
+ }
+ if$
+ duplicate$
+ year empty$
+ { "2199" 'cyear := }
+ { year 'cyear := }
+ if$
+ year empty$
+ { " " "2199" convert.year * field.or.null * }
+ { " " year convert.year * field.or.null * }
+ if$
+ sortify 'sort.label :=
+ % For debug
+ econ.debug #0 = not
+ { "sort.label = ``\texttt{" write$
+ sort.label write$
+ "}''\\" write$
+ newline$
+ }
+ 'skip$
+ if$
+ pop$
+}
+
+FUNCTION {calc.sort.label.abb}
+{ author empty$
+ { editor empty$
+ { "" }
+ { editor 's := }
+ if$
+ }
+ { author 's := }
+ if$
+ s sort.format.names.abb 't :=
+ year empty$
+ { t sortify " " * "2199" convert.year * 'sort.label.abb := }
+ { t sortify " " * year convert.year * 'sort.label.abb := }
+ if$
+ econ.debug #0 = not
+ { "sort.label.abb = ``\texttt{" write$
+ sort.label.abb write$
+ "}''\\" write$
+ newline$
+ }
+ 'skip$
+ if$
+}
+
+%%% flabel
+FUNCTION {calc.flabel}
+{ type$ "book" =
+ type$ "inbook" =
+ or
+ 'author.editor.key.label.full
+ { type$ "proceedings" =
+ 'editor.key.organization.label.full
+ { type$ "manual" =
+ 'author.key.organization.label.full
+ 'author.key.label.full
+ if$
+ }
+ if$
+ }
+ if$
+ 'flabel :=
+ % For debug
+ econ.debug #0 = not
+ { "flabel = ``\texttt{" write$
+ flabel write$
+ "}''\\" write$
+ newline$
+ }
+ 'skip$
+ if$
+}
+
+%%% alabel
+FUNCTION {calc.alabel}
+{ type$ "book" =
+ type$ "inbook" =
+ or
+ 'author.editor.key.label.abb
+ { type$ "proceedings" =
+ 'editor.key.organization.label.abb
+ { type$ "manual" =
+ 'author.key.organization.label.abb
+ 'author.key.label.abb
+ if$
+ }
+ if$
+ }
+ if$
+ 'alabel :=
+ % For debug
+ econ.debug #0 = not
+ { "alabel = ``\texttt{" write$
+ alabel write$
+ "}''\\" write$
+ newline$
+ }
+ 'skip$
+ if$
+}
+
+%%% title for sorting
+FUNCTION {sort.format.title}
+{ 't :=
+ "A " #2
+ "An " #3
+ "The " #4 t chop.word
+ chop.word
+ chop.word
+ sortify
+ #1 global.max$ substring$
+}
+
+%%% author for sorting
+FUNCTION {author.sort}
+{ author empty$
+ { key empty$
+ { "to sort, need author or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { author sort.format.names }
+ if$
+}
+
+%%% editor for sorting
+FUNCTION {author.editor.sort}
+{ author empty$
+ { editor empty$
+ { key empty$
+ { "to sort, need author, editor, or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { editor sort.format.names }
+ if$
+ }
+ { author sort.format.names }
+ if$
+}
+
+FUNCTION {author.organization.sort}
+{ author empty$
+ { organization empty$
+ { key empty$
+ { "to sort, need author, organization, or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { "The " #4 organization chop.word sortify }
+ if$
+ }
+ { author sort.format.names }
+ if$
+}
+
+FUNCTION {editor.organization.sort}
+{ editor empty$
+ { organization empty$
+ { key empty$
+ { "to sort, need editor, organization, or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { "The " #4 organization chop.word sortify }
+ if$
+ }
+ { editor sort.format.names }
+ if$
+}
+
+%%% 1,...,9 -> 001,...,009
+%%% 10,...,99 -> 010,...,099
+FUNCTION {add.zero.to.number}
+{ 's :=
+ s text.length$ #1 =
+ { "00" s * }
+ { s text.length$ #2 =
+ { "0" s * }
+ { s }
+ if$
+ }
+ if$
+}
+
+%% entry type
+FUNCTION {bst.sort.entry.type.order}
+{ 'item.type :=
+ item.type "article" =
+ { "01" }
+ { item.type "book" =
+ { "02" }
+ { item.type "booklet" =
+ { "03" }
+ { item.type "comment" =
+ { "04" }
+ { item.type "conference" =
+ { "05" }
+ { item.type "inbook" =
+ { "06" }
+ { item.type "incollection" =
+ { "07" }
+ { item.type "inproceedings" =
+ { "08" }
+ { item.type "manual" =
+ { "09" }
+ { item.type "masterthesis" =
+ { "10" }
+ { item.type "misc" =
+ { "11" }
+ { item.type "phdthesis" =
+ { "12" }
+ { item.type "proceedings" =
+ { "13" }
+ { item.type "techreport" =
+ { "14" }
+ { item.type "unpublished" =
+ { "15" }
+ { "16" }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+}
+
+%%% Create sort.key$: absorder -> author -> year -> order -> month -> title.
+FUNCTION {presort.one}
+{
+ bst.no.sort #0 = not
+ { order.cited int.to.str$ add.zero.to.number " " * }
+ { "" }
+ if$
+ bst.sort.year #0 = not
+ %% Use year field as the primary sorting key.
+ { year convert.year * }
+ 'skip$
+ if$
+ bst.sort.entry.type #0 = not
+ { type$ bst.sort.entry.type.order * " " * }
+ 'skip$
+ if$
+ absorder empty$
+ { "/// " * }
+ { bst.notuse.absorder.field #0 =
+ { absorder "999" =
+ { "zzz " * }
+ { absorder add.zero.to.number "000" =
+ { "/// " * }
+ { absorder add.zero.to.number * " " * }
+ if$
+ }
+ if$
+ }
+ { "/// " * }
+ if$
+ }
+ if$
+ " " *
+ sort.label.abb *
+ " " *
+ type$ "book" = type$ "inbook" = or
+ 'author.editor.sort
+ { type$ "proceedings" =
+ 'editor.organization.sort
+ { type$ "manual" =
+ 'author.organization.sort
+ 'author.sort
+ if$
+ }
+ if$
+ }
+ if$
+ * " " *
+ " "
+ order empty$
+ { "/// " * }
+ { bst.notuse.order.field #0 =
+ { order "999" =
+ { "zzz " * }
+ { order add.zero.to.number "000" =
+ { "/// " * }
+ { order add.zero.to.number * " " * }
+ if$
+ }
+ if$
+ }
+ { "/// " * }
+ if$
+ }
+ if$
+ month empty$
+ { * "/// " * }
+ { month "999" =
+ { * month add.zero.to.number * "zzz " * }
+ { month add.zero.to.number "000" =
+ { * month add.zero.to.number * "/// " * }
+ { * month add.zero.to.number * " " * }
+ if$
+ }
+ if$
+ }
+ if$
+ title field.or.null sort.format.title
+ *
+ #1 entry.max$ substring$
+ 'sort.key$ :=
+ % For debug
+ econ.debug #0 = not
+ { "``\texttt{" write$
+ sort.key$ write$
+ "}''\\" write$
+ newline$
+ }
+ 'skip$
+ if$
+}
+
+FUNCTION {presort.two}
+{
+ bst.no.sort #0 = not
+ { order.cited int.to.str$ add.zero.to.number " " * }
+ { "" }
+ if$
+ bst.sort.year #0 = not
+ %% Use year field as the primary sorting key.
+ { year convert.year * }
+ 'skip$
+ if$
+ bst.sort.entry.type #0 = not
+ { type$ bst.sort.entry.type.order * " " * }
+ 'skip$
+ if$
+ absorder empty$
+ { "/// " * }
+ { bst.notuse.absorder.field #0 =
+ { absorder "999" =
+ { "zzz " * }
+ { absorder add.zero.to.number "000" =
+ { "/// " * }
+ { absorder add.zero.to.number * " " * }
+ if$
+ }
+ if$
+ }
+ { "/// " * }
+ if$
+ }
+ if$
+ " " * sort.label * " "
+ order empty$
+ { "/// " * }
+ { bst.notuse.order.field #0 =
+ { order "999" =
+ { "zzz " * }
+ { order add.zero.to.number "000" =
+ { "/// " * }
+ { order add.zero.to.number * " " * }
+ if$
+ }
+ if$
+ }
+ { "/// " * }
+ if$
+ }
+ if$
+ month empty$
+ { * "/// " * }
+ { month "999" =
+ { * month add.zero.to.number * "zzz " * }
+ { month add.zero.to.number "000" =
+ { * month add.zero.to.number * "/// " * }
+ { * month add.zero.to.number * " " * }
+ if$
+ }
+ if$
+ }
+ if$
+ title field.or.null sort.format.title
+ *
+ #1 entry.max$ substring$
+ 'sort.key$ :=
+ % For debug
+ econ.debug #0 = not
+ { "``\texttt{" write$
+ sort.key$ write$
+ "}''\\" write$
+ newline$
+ }
+ 'skip$
+ if$
+}
+
+%%% Codes for debugging
+FUNCTION {calc.alabel.mess}
+{ econ.debug #0 = not
+ { "\textbf{Iteration of calc.alabel: alabel = }\\" write$
+ newline$ }
+ 'skip$
+ if$
+}
+FUNCTION {calc.flabel.mess}
+{ econ.debug #0 = not
+ { "\textbf{Iteration of calc.flabel: flabel = }\\" write$
+ newline$ }
+ 'skip$
+ if$
+}
+FUNCTION {presort.one.mess}
+{ econ.debug #0 = not
+ { "\textbf{Iteration of presort (1st time): \$sort.key = }\\" write$
+ newline$ }
+ 'skip$
+ if$
+}
+
+FUNCTION {presort.two.mess}
+{ econ.debug #0 = not
+ { "\textbf{Iteration of presort (2nd time): \$sort.key = }\\" write$
+ newline$ }
+ 'skip$
+ if$
+}
+
+FUNCTION {calc.cyear.mess}
+{ econ.debug #0 = not
+ { "\textbf{Iteration of calc.cyear: sort.label = }\\" write$
+ newline$ }
+ 'skip$
+ if$
+}
+
+FUNCTION {calc.sort.label.abb.mess}
+{ econ.debug #0 = not
+ { "\textbf{Iteration of calc.sort.label.abb: sort.label.abb = }\\" write$
+ newline$ }
+ 'skip$
+ if$
+}
+
+%%% alabel
+EXECUTE {calc.alabel.mess}
+ITERATE {calc.alabel}
+
+%%% flabel
+EXECUTE {calc.flabel.mess}
+ITERATE {calc.flabel}
+
+%%% cyear and sort.label
+EXECUTE {calc.cyear.mess}
+ITERATE {calc.cyear}
+
+%%%
+EXECUTE {calc.sort.label.abb.mess}
+ITERATE {calc.sort.label.abb}
+
+%%% Sorting by $sort.key (first time)
+%
+% Sorting is done in two times. This is the first time.
+%
+EXECUTE {presort.one.mess}
+ITERATE {presort.one}
+SORT
+
+FUNCTION {forward.pass}
+{ bst.use.bysame #0 = bst.use.bysame #2 = or
+ % Not use \bysame
+ { last.sort.label sort.label.abb =
+ { last.extra.num #1 + 'last.extra.num :=
+ last.extra.num int.to.chr$ 'extra.label :=
+ }
+ { "a" chr.to.int$ 'last.extra.num :=
+ "" 'extra.label :=
+ sort.label.abb 'last.sort.label :=
+ }
+ if$
+ }
+ % Use \bysame
+ { last.sort.label sort.label.abb =
+ { last.extra.num #1 + 'last.extra.num :=
+ last.extra.num int.to.chr$ 'extra.label :=
+ }
+ { "a" chr.to.int$ 'last.extra.num :=
+ "" 'extra.label :=
+ sort.label.abb 'last.sort.label :=
+ }
+ if$
+ author empty$
+ { editor empty$
+ { "" }
+ 'format.editors.alt
+ if$
+ }
+ 'format.authors.alt
+ if$
+ 'this.author :=
+ % format.names 'this.author :=
+ this.author prev.author =
+ { "bysame" 'extra.label.bysame := }
+ { this.author "" =
+ { "abcxyz" }
+ 'this.author
+ if$
+ 'prev.author :=
+ }
+ if$
+ }
+ if$
+}
+
+FUNCTION {reverse.pass}
+{ next.extra "b" =
+ { "a" 'extra.label := }
+ 'skip$
+ if$
+ extra.label empty$ not
+ { cyear extra.label * }
+ { cyear "" * }
+ if$
+ "" field.or.null *
+ 'cyear :=
+ extra.label 'next.extra :=
+}
+
+%%% \bysame
+ITERATE {forward.pass}
+
+REVERSE {reverse.pass}
+
+%%% Sorting by sort.key$ (second time)
+EXECUTE {presort.two.mess}
+ITERATE {presort.two}
+SORT
+
+FUNCTION {reset.prev.author}
+{ "xxyyzz" 'prev.author := }
+
+EXECUTE {reset.prev.author}
+
+FUNCTION {forward.pass.two}
+{ bst.use.bysame #1 =
+ { author empty$
+ { editor empty$
+ { "" }
+ 'format.editors.alt
+ if$
+ }
+ 'format.authors.alt
+ if$
+ 'this.author :=
+ this.author prev.author =
+ { "bysame" 'extra.label.bysame := }
+ { this.author "" =
+ { "abcxyz" }
+ 'this.author
+ if$
+ 'prev.author :=
+ }
+ if$
+ }
+ 'skip$
+ if$
+}
+
+ITERATE {forward.pass.two}
+
+FUNCTION{punctuation}
+{
+ "%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%" write$ newline$
+ "% This bbl file is created by econ.bst ver." econ.version * write$ newline$
+ "% The latest econ.bst is available at" write$ newline$
+ "% <https://github.com/ShiroTakeda/econ-bst>" write$ newline$ newline$
+}
+
+EXECUTE {punctuation}
+
+FUNCTION {begin.bib}
+{
+ preamble$ empty$
+ 'skip$
+ { preamble$ write$ newline$ }
+ if$
+ bst.use.bysame #0 =
+ % Not use \bysame.
+ 'skip$
+ % Use \bysame.
+ { "%%% Definition of \bysame" write$ newline$
+ "\ifx\undefined\bysame" write$ newline$
+ "\newcommand{\bysame}{" bst.bysame.definition * "}" *
+ write$ newline$
+ "\fi" write$ newline$ newline$ }
+ if$
+ %% When number index is attached to the beginning of each item.
+ bst.use.number.index #0 =
+ 'skip$
+ { bst.number.index.digit "1" =
+ % one digit.
+ { bst.number.index.bibhang.one }
+ { bst.number.index.digit "2" =
+ % two digits.
+ { bst.number.index.bibhang.ten }
+ % three or more digits.
+ { bst.number.index.bibhang.hund }
+ if$
+ }
+ if$
+ 'hang :=
+ "%%% Redefinition of \bibhang" write$ newline$
+ "\ifx\undefined\bibhang" write$ newline$
+ "\relax" write$ newline$
+ "\else" write$ newline$
+ "\setlength{\bibhang}{"
+ hang * "}" * write$ newline$
+ "\fi" write$ newline$ newline$
+ }
+ if$
+ "\begin{thebibliography}{xxx}" write$ newline$
+
+ %% Initialize the variable `index'.
+ #0 'index :=
+}
+
+FUNCTION {end.bib}
+{ newline$ "\end{thebibliography}" write$ newline$ }
+
+EXECUTE {begin.bib}
+
+EXECUTE {init.state.consts}
+
+ITERATE {call.type$}
+
+EXECUTE {end.bib}
+
+% --------------------
+% Local Variables:
+% fill-column: 78
+% mode: bst
+% End:
diff --git a/biblio/bibtex/contrib/econ-bst/customization/econ-jet.pdf b/biblio/bibtex/contrib/econ-bst/customization/econ-jet.pdf
new file mode 100644
index 0000000000..8458c1e3fd
--- /dev/null
+++ b/biblio/bibtex/contrib/econ-bst/customization/econ-jet.pdf
Binary files differ
diff --git a/biblio/bibtex/contrib/econ-bst/customization/econ-jet.tex b/biblio/bibtex/contrib/econ-bst/customization/econ-jet.tex
new file mode 100644
index 0000000000..d130e07be0
--- /dev/null
+++ b/biblio/bibtex/contrib/econ-bst/customization/econ-jet.tex
@@ -0,0 +1,66 @@
+%#!pdflatex
+%#BIBTEX bibtex econ-jet
+
+%############################## Main #################################
+\documentclass[10pt]{article}
+
+%% Use natbib.sty
+\usepackage[numbers]{natbib}
+\usepackage{mathpazo}
+\usepackage{url}
+\usepackage{graphicx}
+\usepackage{color}
+\definecolor{MyBrown}{rgb}{0.3,0,0}
+\definecolor{MyBlue}{rgb}{0,0,0.3}
+\definecolor{MyRed}{rgb}{0.4,0,0.1}
+\definecolor{MyGreen}{rgb}{0,0.4,0}
+\usepackage[bookmarks=true,%
+bookmarksnumbered=true,%
+colorlinks=true,%
+linkcolor=MyBlue,%
+citecolor=MyRed,%
+filecolor=MyBlue,%
+urlcolor=MyGreen%
+]{hyperref}
+
+\setlength{\topmargin}{-20pt}
+\setlength{\textheight}{648pt}
+\setlength{\oddsidemargin}{15pt}
+\setlength{\textwidth}{440pt}
+
+%#####################################################################
+%######################### Document Starts ###########################
+%#####################################################################
+\begin{document}
+
+This document uses ``\verb|econ-jet.bst|''. The style like JET ({\itshape Journal of
+Economic Theory}).
+
+\vspace{1em}
+
+\input{cited-part}
+\vspace*{1em}
+
+In the citation part above, we use
+\verb|\citet| command which creates the style like ``author name + number''. If we use \verb|\cite|
+command, we have the style only with number like the followings: \\
+\cite{Ryza15:_advan_analy_spark_patter_learn_data_scale},
+\cite{yamazaki13:_japan}, \cite{stakeda2013web}, \cite{Takeda2012a},
+\cite{bergemann11:_ration}, \cite{goldin:katz:2011}, \cite{Takeda2011b},
+\cite{takeda2011c}.
+
+\nocite{*}
+
+%% bst file:
+\bibliographystyle{econ-jet}
+\bibliography{../econ-example}
+
+\end{document}
+
+%#####################################################################
+%######################### Document Ends #############################
+%#####################################################################
+% --------------------
+% Local Variables:
+% fill-column: 80
+% End:
diff --git a/biblio/bibtex/contrib/econ-bst/customization/econ-jie.bst b/biblio/bibtex/contrib/econ-bst/customization/econ-jie.bst
new file mode 100644
index 0000000000..ee4ff74ecd
--- /dev/null
+++ b/biblio/bibtex/contrib/econ-bst/customization/econ-jie.bst
@@ -0,0 +1,3543 @@
+%% econ.bst: BibTeX style file for papers in economics.
+%
+% Author: Shiro Takeda
+% Maintainer: Shiro Takeda
+% Copyright (C) 2001-2018 Shiro Takeda
+% First-written: <2007/07/28>
+% Time-stamp: <2018-12-07 18:48:19 st>
+% Version: 2.5
+% Keywords: TeX, BibTeX, bst
+% URL: https://github.com/ShiroTakeda/econ-bst
+
+% This work may be distributed and/or modified under the
+% conditions of the LaTeX Project Public License, either version 1.3
+% of this license or (at your option) any later version.
+% The latest version of this license is in
+% http://www.latex-project.org/lppl.txt
+% and version 1.3 or later is part of all distributions of LaTeX
+% version 2005/12/01 or later.
+%
+% This work has the LPPL maintenance status "maintained".
+%
+% The Current Maintainer of this work is Shiro Takeda.
+
+%% Main features of econ.bst.
+
+% "econ.bst" is a BibTeX style file for economics. It provids the following
+% features:
+
+% 1) The author-year type citation (you need "natbib.sty" as well).
+% 2) Reference style used in economics papers ("econ.bst" is not a BibTeX style
+% for a specific journal).
+% 3) Highly customizable. You can easily customize reference style as you wish.
+% 4) You can use "certified random order" proposed by Ray ⓡ Robson (2018)
+% (http://dx.doi.org/10.1257/aer.20161492).
+
+% Bug reports, requests and suggestions are welcome.
+
+% For changelogs, see CHANGES.txt file.
+
+% version number
+FUNCTION {econ.version} { "2.5" }
+
+% Debug mode. Non-zero makes debug mode on.
+FUNCTION {econ.debug}
+{ #0 } % Debug mode off (default).
+% { #1 } % Debug mode on.
+
+ENTRY
+ %%% Declaration of field
+ { access address author booktitle chapter doi edition editor howpublished
+ institution journal key month note number organization pages publisher
+ school series title type url volume year
+ % Fields specific to econ.bst
+ order absorder nameorder
+ }
+
+ % Definition of entry variable. The entry variable is a variable which has
+ % different values according to different entries.
+ %% Integer entry variable:
+ { order.cited }
+
+ %% String entry variable
+ { label cyear flabel alabel extra.label sort.label sort.label.abb
+ extra.label.bysame nameorder.temp }
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%%
+%% Functions for customization:
+%%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+% Use \bysame or not.
+%
+% If set to #0, \bysame is not used.
+% If set to #1, \bysame is used
+% If set to #2, \bysame is used (alternative abbreviation style).
+%
+% Note that integer number is expressed as # + integer in bst file.
+% \bysame is the function that abbreviates succession of the same authors' name by ---.
+%
+% See econ-sample.pdf for details.
+%
+FUNCTION {bst.use.bysame}
+% { #0 } % Not use \bysame
+{ #1 } % -> Use \bysame (default)
+% { #2 } % -> Use \bysame of alternative style.
+
+% The definition of \bysame command.
+%
+FUNCTION {bst.bysame.definition}
+{ "\hskip.3em \leavevmode\rule[.5ex]{3em}{.3pt}\hskip0.5em" } % (default)
+% { "\leavevmode\hbox to\leftmargin{\hrulefill\,\,}" } % If you set #2 to bst.use.bysame, use this.
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+% The order of fist and last name.
+%
+FUNCTION {bst.author.name}
+% { #0 } % (default)
+{ #1 }
+% { #2 }
+
+% Case of #0: First author -> last-first, other authors -> first-last.
+% Fujita, Masahisa, Paul R. Krugman, and Anthony J. Venables.
+
+% Case of #1: All authors -> last-first
+% Fujita, Masahisa, Krugman, Paul R., and Venables, Anthony J.
+
+% Case of #2: All authors -> first-last
+% Masahisa Fujita, Paul R. Krugman, and Anthony J. Venables.
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+% Abbreviate first name of authors (editors):
+%
+FUNCTION {bst.first.name.initial}
+% { #0 } % #0 -> full letters (default).
+{ #1 } % Non-zero -> initial letter only.
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+% Decapitalize of strings in title field.
+%
+FUNCTION {bst.title.lower.case}
+% { #0 } % If #0, not decapitalize title (default).
+{ #1 } % If non-#0, decapitalize title
+
+% Hide title filed.
+%
+FUNCTION {bst.hide.title}
+{ #0 } % #0 -> Title field is displayed (default)
+% { #1 } % Non-zer -> Title field is hidden
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+% Hide month.
+%
+FUNCTION {bst.hide.month}
+{ #0 } % #0 -> show month field (default).
+% { #1 } % non-#0 -> hide month field.
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+% Attach number index like plain.bst.
+%
+FUNCTION {bst.use.number.index}
+{ #0 } % Not use number index (default).
+% { #1 } % Non-#0 -> Use number index
+
+% The string before number index:
+%
+FUNCTION {bst.number.index.pre}
+{ "[" } % (default)
+
+% The string after number index. Adjustment is recommended.
+%
+FUNCTION {bst.number.index.post}
+{ "]\hskip1.0em " } % (default)
+
+% Maximum digit of number index:
+% If the number of reference items >= 100, set 3 to this function.
+% If the number of reference items < 100, set 2 to this function.
+% If the number of reference items < 10, set 1 to this function.
+%
+FUNCTION {bst.number.index.digit}
+{ "2" } % (default)
+% { "3" }
+
+% The functions below are used to adjust space and postion. If you use fonts
+% other than computer modern fonts, you had better make adjustments.
+%
+% Setting for bst.number.index.digit = 1:
+FUNCTION {bst.number.index.bibhang.one}
+{ "2.05em" } % (default)
+% Setting for bst.number.index.digit = 2:
+FUNCTION {bst.number.index.bibhang.ten}
+{ "2.55em" } % (default)
+% Setting for bst.number.index.digit = 3:
+FUNCTION {bst.number.index.bibhang.hund}
+{ "3.05em" } % (default).
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+% Position of "year":
+%
+% You can choose the position of year by this function.
+%
+% If set to #0, year is placed right after "author".
+% If set to non-zero, year is placed at the end (before note field) except for
+% aritcle type entry.
+%
+% In article type entry, the position of year changes according to the
+% following rule:
+%
+% #1 -> year is placed at the end.
+% #2 -> year is placed after journal name in aritcle type entry.
+% #3 -> year is placed after volume in aritcle type entry.
+%
+FUNCTION {bst.year.position}
+{ #0 } % (default).
+% { #1 } % Last place before note.
+% { #2 } % After journal name for aticle type entry.
+% { #3 } % After volume for aticle type entry.
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+% If 0, references are sorted by old documents -> recent documents. If
+% non-zero, reverse order.
+FUNCTION {bst.reverse.year}
+{ #0 } % Normal order (old -> recent) (default).
+% { #1 } % inverse order (recent -> old)
+
+% If non-zero, sort references by using year field as the primary key
+% (chronological sorting).
+FUNCTION {bst.sort.year}
+{ #0 } % Normal case: year is used as the sorting key next to author (default).
+% { #1 } % year is used as the primary sorting key.
+
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+% If non-zero, references are listed in citation order.
+%
+FUNCTION {bst.no.sort}
+{ #0 } % (default)
+% { #1 } % listed in citation order.
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+% Non-zero -> sort references by entry type (article, book, incollection etc.)
+%
+FUNCTION {bst.sort.entry.type}
+{ #0 } % #0 -> Normal (not sort references by entry type) (default).
+% { #1 } % Non-zero -> sort references by entry type.
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+% 0 -> use absorder field to sort items. Otherwise, ignore absorder field.
+%
+FUNCTION {bst.notuse.absorder.field}
+{ #0 } % #0 -> Use absorder (default).
+% { #1 } % Non-#0 -> Not use absorder.
+%
+% Order of priority to sort items
+%
+% absorder -> author -> year -> order -> month -> title
+%
+% wehre absorder and order fields are specific to econ.bst.
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+% 0 -> use order field to sort items. Otherwise, ignore order field.
+% Note: order field is specific to econ.bst.
+FUNCTION {bst.notuse.order.field}
+{ #0 } % #0 -> Use order field (default).
+% { #1 } % Non-#0 -> not use order field.
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%%% and
+
+%%% String used to separate author names in references.
+%
+% String replaced with _ in "Mr. A _ Mr. B "
+%
+FUNCTION {bst.and}
+{ " " }
+% { " and " } % (default)
+
+%%% String used to separate author names in references (more than two authors).
+%
+% String replaced with _ in "Mr. A, Mr. B _ Mr. C"
+%
+FUNCTION {bst.ands}
+{ " " }
+% { ", and " } % (default)
+
+%%% String used to separate author names in citation part.
+%
+% String replaced with _ in "Mr. A _ Mr. B "
+%
+FUNCTION {bst.cite.and}
+{ " and " } % (default)
+
+%%% String used to separate author names in citation part (more than two authors).
+%
+% String replaced with _ in "Mr. A, Mr. B _ Mr. C"
+%
+FUNCTION {bst.cite.ands}
+{ " and " } % (default)
+
+%%% If you want to use random author order for some bibliography entries, set
+% non-zero to this function.
+%
+FUNCTION {bst.use.nameorder}
+{ #1 } % Use random order (default)
+% { #0 } % Not use random order
+
+%%% String used to separate author names in references for the entry of random
+% author order.
+%
+FUNCTION {bst.and.nameorder}
+{ " \textcircled{r} " } % (default)
+
+%%% String used to separate author names in citation part for the entry of
+% random author order
+%
+FUNCTION {bst.cite.and.nameorder}
+{ " \textcircled{r} " } % (default)
+
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+% Author names in the citation part are abbreviated by et al. if the number of
+% authors is greater or equal to bst.and.others.num.
+FUNCTION {bst.and.others.num}
+{ #3 } % If the number of authors is greater or equal to three (default).
+% { #4 }
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+% Strings used when abbreviating multiple-authors in citation part.
+FUNCTION {bst.and.others}
+{ " et~al." } % (default)
+
+% Strings used when abbreviating multiple-authors in citation part for entries
+% with random author order.
+FUNCTION {bst.and.others.nameorder}
+{ " \textcircled{r}~al." } % (default)
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% author
+
+% The string before author:
+%
+FUNCTION {bst.author.pre}
+{ "" } % (default)
+
+% The string after author:
+%
+FUNCTION {bst.author.post}
+{ "," }
+% { "" } % (default)
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% year
+
+% The string before year only for aritcle type entry.
+%
+FUNCTION {bst.year.pre}
+{ " " }
+% { " (" } % (default)
+
+% The string after year only for aritcle type entry.
+%
+FUNCTION {bst.year.post}
+{ ". " }
+% { ") " } % (default)
+
+% The string after year for non-article type entry (book, incollection etc)
+%
+FUNCTION {bst.year.na.pre}
+{ " " }
+% { " (" } % (default)
+
+% The string after year for non-article type entry (book, incollection etc)
+%
+FUNCTION {bst.year.na.post}
+{ ". " }
+% { ") " } % (default)
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% title (except for title in book)
+
+% The string before title:
+%
+FUNCTION {bst.title.pre}
+{ "" }
+% { "``" } % (default)
+
+% The string after title:
+%
+FUNCTION {bst.title.post}
+{ "." }
+% { ",''" } % (default)
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% tile for book:
+
+% The string before book title:
+%
+FUNCTION {bst.book.pre}
+{ " " }
+% { " \textit{" } % (default)
+
+% The string after book title:
+%
+FUNCTION {bst.book.post}
+{ "." }
+% { "}" } % (default)
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% booktitle
+
+% The string before booktitle:
+%
+FUNCTION {bst.btitle.pre}
+{ " " }
+% { " \textit{" } % (default)
+
+% The string after booktitle:
+%
+FUNCTION {bst.btitle.post}
+{ "." }
+% { "}" } % (default)
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% journal name
+
+% The string before journal name:
+%
+FUNCTION {bst.journal.pre}
+{ " " }
+% { " \textit{" } % (default)
+
+% The string after journal name:
+%
+FUNCTION {bst.journal.post}
+{ "" }
+% { "}" } % (default)
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% editor notation:
+
+% The string that indicates multiple editors:
+%
+FUNCTION {bst.editors}
+{ " (Eds.)," }
+% { " eds. " } % (default)
+
+% The string that indicates single editor:
+%
+FUNCTION {bst.editor}
+{ " ed. " } % (default)
+
+% Order of editor and booktitle in incollection and inproceedings entries.
+%
+% If set to #0: editors -> booktitle order
+% If set to non-zero: booktitle -> editors order
+%
+FUNCTION {bst.editor.btitle.order}
+{ #0 } % (default)
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% edition
+
+% The string before edition:
+%
+FUNCTION {bst.edition.pre}
+{ ", " } % (default)
+
+% The string after edition:
+%
+FUNCTION {bst.edition.post}
+{ " edition" } % (default)
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% volume
+
+% The string before volume:
+%
+FUNCTION {bst.volume.pre}
+{ " " }
+% { ", Vol. " } % (default)
+
+% The string after volume:
+%
+FUNCTION {bst.volume.post}
+{ "" } % (default)
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% number
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+% Hide number. If non-zero, number is suppressed.
+FUNCTION {bst.hide.number}
+{ #0 } % #0 -> show number field (default)
+% { #1 } % non-#0 -> Hide number field.
+
+% The string before number:
+%
+FUNCTION {bst.number.pre}
+{ " (" }
+% { ", No. " } % (default)
+
+% The string after number:
+%
+FUNCTION {bst.number.post}
+{ ")," }
+% { "" } % (default)
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% in
+
+% In
+%
+FUNCTION {bst.in}
+{ " In: " }
+% { " in " } % (default)
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% page
+
+% The string before page (multiple pages):
+%
+FUNCTION {bst.pages.pre}
+{ " " }
+% { ", pp." } % (default)
+
+% The string before page:
+%
+FUNCTION {bst.page.pre}
+{ ", p." } % (default)
+
+% The string after page (multiple pages):
+%
+FUNCTION {bst.pages.post}
+{ "" } % (default)
+
+% The string after page:
+%
+FUNCTION {bst.page.post}
+{ "" } % (default)
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% chapter
+
+% The string before chapter:
+%
+FUNCTION {bst.chapter.pre}
+{ ", Chap." } % (default)
+
+% The string after chapter:
+%
+FUNCTION {bst.chapter.post}
+{ "" } % (default)
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% month
+
+% The string before month:
+%
+FUNCTION {bst.month.pre}
+{ ", " } % (default)
+
+% The string after month:
+%
+FUNCTION {bst.month.post}
+{ "" } % (default)
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% address
+% The string before address:
+%
+FUNCTION {bst.address.pre}
+{ ", " } % (default)
+
+% The string after address:
+%
+FUNCTION {bst.address.post}
+{ "" } % (default)
+
+% You can choose the order of address and publisher by this function.
+%
+% If #0, address -> publisher order (the default value).
+% If non-zero, publisher -> address order.
+
+FUNCTION {bst.address.position}
+% { #0 } % Address is placed before publisher (default)
+{ #1 } % Address is placed after publisher
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% publisher
+
+% The string before publisher:
+%
+FUNCTION {bst.publisher.pre}
+{ ", " }
+% { ": " } % (default)
+
+% The string after publisher:
+%
+FUNCTION {bst.publisher.post}
+{ "" } % (default)
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% series
+
+% The string before series:
+%
+FUNCTION {bst.series.pre}
+{ ", " } % (default)
+
+% The string after series:
+%
+FUNCTION {bst.series.post}
+{ "" } % (default)
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% organization
+
+% The string before organization:
+%
+FUNCTION {bst.organization.pre}
+{ ", " } % (default)
+
+% The string after organization:
+%
+FUNCTION {bst.organization.post}
+{ "" } % (default)
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% school
+
+% The string before school:
+%
+FUNCTION {bst.school.pre}
+{ ", " } % (default)
+
+% The string after school:
+%
+FUNCTION {bst.school.post}
+{ "" } % (default)
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% institution
+
+% The string before institution:
+%
+FUNCTION {bst.institution.pre}
+{ ", " } % (default)
+
+% The string after institution:
+%
+FUNCTION {bst.institution.post}
+{ "" } % (default)
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% howpublished
+
+% The string before howpublished:
+%
+FUNCTION {bst.howpublished.pre}
+{ " " } % (default)
+
+% The string after howpublished:
+%
+FUNCTION {bst.howpublished.post}
+{ "" } % (default)
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% url
+
+% Show or Hide url. If non-zero, url is displayed. Otherwise, url is suppressed.
+FUNCTION {bst.show.url}
+{ #1 } % non-#0 -> Show url field (default)
+% { #0 } % #0 -> Not show url field.
+
+% The string before url:
+%
+FUNCTION {bst.url.pre}
+{ ", URL: \url{" } % (default)
+
+% The string after url:
+%
+FUNCTION {bst.url.post}
+{ "}" } % (default)
+
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% Access
+
+% This setting is valid only if there are "access" field in bib
+% files. The value of access field indicates accessed date for URL.
+
+% The string before access.
+FUNCTION {bst.access.pre}
+{ ", accessed on " } % (default)
+
+% The string after access.
+FUNCTION {bst.access.post}
+{ "" } % (default)
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% DOI (digital object identifier)
+
+% This setting is valid only if there are "doi" field in bib files.
+
+% Show or Hide DOI. If non-zero, DOI is displayed. Otherwise, DOI is suppressed.
+FUNCTION {bst.show.doi}
+{ #1 } % non-#0 -> Show DOI field (default)
+% { #0 } % #0 -> Not show DOI field.
+
+% The string before DOI:
+%
+FUNCTION {bst.doi.pre}
+{ ", DOI: \href{http://dx.doi.org/" doi * "}{" * } % (default)
+
+% The string after DOI:
+%
+FUNCTION {bst.doi.post}
+{ "}" } % (default)
+
+% How to show URL and DOI fields when both fields exist.
+%
+% #0 -> Both fields are displayed
+% #1 -> Only URL field is displayed
+% #2 -> Only DOI field is displayed
+%
+FUNCTION {bst.url.doi}
+% { #0 } % (default) -> Both fields are displayed
+% { #1 } % -> Only URL field is displayed
+{ #2 } % -> Only DOI field is displayed
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% Other functions:
+
+% The string before note.
+FUNCTION {bst.note.pre}
+{ ", " } % (default)
+
+% The string after note.
+FUNCTION {bst.note.post}
+{ "" } % (default)
+
+% The string that represents Technical report:
+%
+FUNCTION {bst.techrep}
+{ " Tech. Rep." } % (default)
+
+% The string that represents master thesis:
+%
+FUNCTION {bst.mthesis}
+{ " Master's thesis" } % (default)
+
+% The string that represents phd thesis:
+%
+FUNCTION {bst.phdthesis}
+{ " Ph.D. dissertation" } % (default)
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%%
+%% Functions for customization end here:
+%%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+FUNCTION {bst.first}
+{ "1st" }
+
+FUNCTION {bst.second}
+{ "2nd" }
+
+FUNCTION {bst.third}
+{ "3rd" }
+
+FUNCTION {bst.fourth}
+{ "4th" }
+
+FUNCTION {bst.fifth}
+{ "5th" }
+
+FUNCTION {bst.st}
+{ "st" }
+
+FUNCTION {bst.nd}
+{ "nd" }
+
+FUNCTION {bst.rd}
+{ "rd" }
+
+FUNCTION {bst.th}
+{ "th" }
+
+%%%%% memo by Takeda
+
+% "a" 'b := indicates substituting string "a" for variable b.
+
+% Integer number #0, #1,...
+
+%%% Function definition:
+%
+% FUNCTION {name}
+% { 's :=
+%
+% }
+%
+% This is the definition of a function named "name". The function "name" is
+% used in the following way
+%
+% "foo" name
+% "foo" is an argument for the function "name".
+%
+% About the definition of a function with more than two arguments, see the
+% definition of "chop.word".
+
+%%% Declaration of variables:
+
+%% String global variables:
+STRINGS { s t tt }
+STRINGS { year.num }
+STRINGS { preone preten }
+STRINGS { last.sort.label next.extra prev.author prev.author.aer this.author }
+STRINGS { hang }
+STRINGS { item.type }
+STRINGS { tempa tempb }
+
+%% Integer global variables:
+INTEGERS { nameptr namesleft numnames name.num }
+INTEGERS { multiresult }
+INTEGERS { index }
+INTEGERS { len }
+INTEGERS { last.extra.num }
+INTEGERS { output.state before.all mid.sentence after.sentence after.block }
+INTEGERS { last.period.comma }
+INTEGERS { len1.aer len2.aer i.aer }
+
+%%% Definition of functions:
+FUNCTION {not}
+{ { #0 }
+ { #1 }
+ if$
+}
+
+FUNCTION {and}
+{ 'skip$
+ { pop$ #0 }
+ if$
+}
+
+FUNCTION {or}
+{ { pop$ #1 }
+ 'skip$
+ if$
+}
+
+%%% Initialize variables:
+FUNCTION {init.state.consts}
+{ #0 'before.all :=
+ #1 'mid.sentence :=
+ #2 'after.sentence :=
+ #3 'after.block :=
+}
+
+%%% Remove comma and add period:
+%
+%%%
+FUNCTION {add.period.x}
+{ duplicate$
+ #-1 #1 substring$ "," =
+ { #-2 global.max$ substring$ "." * }
+ { duplicate$
+ #-1 #2 substring$ ". " =
+ { #-3 global.max$ substring$ "." * }
+ { duplicate$
+ #-1 #2 substring$ ", " =
+ { #-3 global.max$ substring$ "." * }
+ { duplicate$
+ #-1 #2 substring$ ",'" =
+ { #-3 global.max$ substring$ ".'" * }
+ { duplicate$
+ #-1 #2 substring$ ".'" =
+ { #-3 global.max$ substring$ ".'" * }
+ { duplicate$
+ #-1 #2 substring$ ".~" =
+ { #-3 global.max$ substring$ ".~" * }
+ { duplicate$
+ #-1 #2 substring$ ",~" =
+ { #-3 global.max$ substring$ ".~" * }
+ { duplicate$
+ #-1 #3 substring$ ",''" =
+ { #-4 global.max$ substring$ ".''" * }
+ { duplicate$
+ #-1 #3 substring$ ".''" =
+ { #-4 global.max$ substring$ ".''" * }
+ { add.period$ }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+}
+
+FUNCTION {output.nonnull}
+{ 's :=
+ % mid.sentence
+ output.state mid.sentence =
+ { ", " * write$ }
+ % not mid.sentence
+ { output.state after.block =
+ % after.block
+ { add.period.x " " * write$ }
+ % before.all
+ { output.state before.all =
+ 'write$
+ { add.period.x " " * write$ }
+ if$
+ }
+ if$
+ % not mid.sentence, set to mid.sentence
+ mid.sentence 'output.state :=
+ }
+ if$
+ s
+}
+
+%%% If the last character is period or comma, set non-zero to
+%%% last.period.comma.
+FUNCTION {period.comma.p}
+{ duplicate$ 't :=
+ t #-1 #1 substring$ "." =
+ t #-1 #1 substring$ "," = or
+ t #-1 #1 substring$ ":" = or
+ t #-1 #2 substring$ ".'" = or
+ t #-1 #2 substring$ ",'" = or
+ t #-1 #3 substring$ ".''" = or
+ t #-1 #3 substring$ ",''" = or
+ t #-1 #2 substring$ ".~" = or
+ t #-1 #2 substring$ ",~" = or
+ { #1 'last.period.comma := }
+ { #0 'last.period.comma := }
+ if$
+}
+
+%%% remove unnecessary comma.
+FUNCTION {remove.pre.comma}
+{ 's :=
+ s empty$
+ { "" }
+ { s #1 #1 substring$ "," =
+ { s #2 global.max$ substring$ }
+ { s #1 #1 substring$ "." =
+ { s #2 global.max$ substring$ }
+ 's
+ if$
+ }
+ if$
+ }
+ if$
+}
+
+%%% output.nonnull.nocomma is the same as output.nonnull except that it does
+%%% not add commas even in mid.sentence.
+FUNCTION {output.nonnull.nocomma}
+{ 's :=
+ output.state mid.sentence =
+ % mid.sentence
+ { period.comma.p "" * write$ }
+
+ % not mid.sentence
+ { output.state after.block =
+ % after.block
+ { add.period.x " " * write$ }
+ % before.all
+ { output.state before.all =
+ 'write$
+ { add.period$ " " * write$ }
+ if$
+ }
+ if$
+ mid.sentence 'output.state :=
+ }
+ if$
+ last.period.comma #0 =
+ { s }
+ { s remove.pre.comma }
+ if$
+}
+
+% Not used in the current econ.bst.
+% FUNCTION {output}
+% { duplicate$ empty$
+% 'pop$
+% 'output.nonnull
+% if$
+% }
+
+FUNCTION {output.nocomma}
+{ duplicate$ empty$
+ 'pop$
+ 'output.nonnull.nocomma
+ if$
+}
+
+% Not used in the current econ.bst.
+% FUNCTION {output.check}
+% { 't :=
+% duplicate$ empty$
+% { pop$ "empty " t * " in " * cite$ * warning$ }
+% 'output.nonnull
+% if$
+% }
+
+FUNCTION {output.check.nocomma}
+{ 't :=
+ duplicate$ empty$
+ { pop$ "empty " t * " in " * cite$ * warning$ }
+ 'output.nonnull.nocomma
+ if$
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%%% Format in bbl file:
+
+% \harvarditem[Brezis et~al.]{Brezis, Krugman and
+% Tsiddon}{1993}{brezis93:_leapf_inter_compet}
+% Brezis, Elise~S., Paul~R. Krugman, and Daniel Tsiddon (1993) ``Leapfrogging in
+% International Competition: A Theory of Cycles in National Technological
+% Leadership.'', {\em American Economic Review.}, Vol.~83. No.~5. pp.
+% 1211--1219.
+
+% \harvarditem[abbreviated citation]{full citation}{year}{keyword} ...
+
+%%% Add period and newline.
+FUNCTION {fin.entry}
+{ add.period.x
+ write$
+ newline$
+}
+
+FUNCTION {new.block}
+{ output.state before.all =
+ 'skip$
+ { after.block 'output.state := }
+ if$
+}
+
+FUNCTION {new.sentence}
+{ output.state after.block =
+ 'skip$
+ { output.state before.all =
+ 'skip$
+ { after.sentence 'output.state := }
+ if$
+ }
+ if$
+}
+
+FUNCTION {new.block.check}
+{ empty$
+ 'skip$
+ 'new.block
+ if$
+}
+
+FUNCTION {field.or.null}
+{ duplicate$ empty$
+ { pop$ "" }
+ 'skip$
+ if$
+}
+
+%%% booktitle
+FUNCTION {format.btitle}
+{ booktitle empty$
+ { "" }
+ { bst.btitle.pre booktitle * bst.btitle.post * }
+ if$
+}
+
+%%% journal
+FUNCTION {format.journal}
+{ journal empty$
+ { "" }
+ { bst.journal.pre journal * bst.journal.post * }
+ if$
+}
+
+%%% title for book
+FUNCTION {format.book}
+{ title empty$
+ { "" }
+ { bst.book.pre title * bst.book.post * }
+ if$
+}
+
+FUNCTION {format.url}
+{ url empty$
+ { "" }
+ { type$ "online" = bst.show.url or
+ { bst.url.pre url * bst.url.post *
+ access empty$
+ { "" * }
+ { bst.access.pre * access * bst.access.post * }
+ if$
+ }
+ { "" }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.doi}
+{ doi empty$ bst.show.doi not or
+ { "" }
+ { bst.doi.pre doi * bst.doi.post * }
+ if$
+}
+
+FUNCTION {format.url.doi}
+{ url empty$
+ { format.doi }
+ { doi empty$
+ { format.url }
+ { bst.url.doi #0 =
+ { format.url output.nocomma
+ format.doi }
+ { bst.url.doi #1 =
+ { format.url }
+ { format.doi }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+}
+
+%%% and others
+FUNCTION {bst.and.others.output}
+{ nameorder.temp "random" =
+ bst.use.nameorder #0 = not and
+ { bst.and.others.nameorder }
+ { bst.and.others }
+ if$
+}
+
+%%% author and editor
+
+%%% name
+FUNCTION {format.names}
+{ 's :=
+ % insert 1 to nameptr.
+ #1 'nameptr :=
+ % Set the number of authors to numnames.
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ % Repeat if namesleft > 0
+ { namesleft #0 > }
+ { nameptr #1 =
+ % First author
+ { bst.author.name #0 =
+ bst.author.name #1 =
+ or
+ { bst.first.name.initial #0 =
+ { s nameptr "{vv~}{ll}{, ff}{, jj}" format.name$ 't := }
+ { s nameptr "{vv~}{ll}{, f.}{, jj}" format.name$ 't := }
+ if$
+ }
+ { bst.first.name.initial #0 =
+ { s nameptr "{ff~}{vv~}{ll}{, jj}" format.name$ 't := }
+ { s nameptr "{f.~}{vv~}{ll}{, jj}" format.name$ 't := }
+ if$
+ }
+ if$
+ }
+ % The second or later authors
+ { bst.author.name #0 =
+ bst.author.name #2 =
+ or
+ { bst.first.name.initial #0 =
+ { s nameptr "{ff~}{vv~}{ll}{, jj}" format.name$ 't := }
+ { s nameptr "{f.~}{vv~}{ll}{, jj}" format.name$ 't := }
+ if$
+ }
+ { bst.first.name.initial #0 =
+ { s nameptr "{vv~}{ll}{, ff}{, jj}" format.name$ 't := }
+ { s nameptr "{vv~}{ll}{, f.}{, jj}" format.name$ 't := }
+ if$
+ }
+ if$
+ }
+ if$
+
+ nameptr #1 >
+ % The second or later authors
+ { nameorder.temp "random" =
+ bst.use.nameorder #0 = not and
+ { bst.and.nameorder * t * }
+ { namesleft #1 >
+ % More than one authors left
+ { ", " * t * }
+ % Only one author left
+ { t "others" =
+ { bst.and.others.output * }
+ { numnames #2 =
+ % Entry with two authors
+ { bst.and * t * }
+ { bst.ands * t * }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ 't
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+}
+
+% remove successive periods (commas) from author
+FUNCTION {remove.ss.period.auth}
+{ 's :=
+ s format.names 'tempa :=
+ bst.author.post 'tempb :=
+ tempb #1 #1 substring$ "}" =
+ { tempa tempb * }
+ { tempa #-1 #1 substring$ tempb #1 #1 substring$ =
+ { tempa tempb #2 global.max$ substring$ * }
+ { tempa tempb * }
+ if$
+ }
+ if$
+}
+
+% <prev name list> <new name list> compare.names <modified name list>
+FUNCTION {compare.names.aer}
+{ 's :=
+ 'tempa :=
+
+% "current.author = " s * "\\" * write$ newline$
+% "prev.author = " tempa * "\\" * write$ newline$
+
+ tempa num.names$ 'len1.aer := % len1 = the number of previous authors
+ s num.names$ 'len2.aer := % len2 = the number of current authors
+
+% len1.aer := min(len1.aer,len2.aer)
+% len1 -> min{ the number of previous authors, the number of current authors }
+ len1.aer len2.aer >
+ { len2.aer 'len1.aer := }
+ { }
+ if$
+
+% start with an empty string, then while the components are the same
+% add "\bysame"
+ ""
+ #1 'i.aer :=
+
+ { i.aer len1.aer > not }
+ { tempa i.aer "{ff }{vv }{ll}{ jj}" format.name$
+ s i.aer "{ff }{vv }{ll}{ jj}" format.name$
+ =
+ { #1 i.aer <
+ { " and " * } % \bysame で省略する著者の前につく and
+ { }
+ if$
+ "\bysame{}" *
+ i.aer #1 + 'i.aer := }
+ { #-1 'len1.aer := }
+ if$
+ }
+ while$
+
+% add the rest of the second string
+ { i.aer len2.aer > not }
+ { #1 i.aer <
+ { " and " * }
+ { }
+ if$
+ s i.aer "{ff }{vv }{ll}{ jj}" format.name$ *
+ i.aer #1 + 'i.aer :=
+ }
+ while$
+}
+
+%%% author
+FUNCTION {format.authors}
+{ author empty$
+ { "" }
+ { bst.use.bysame #2 =
+ { prev.author.aer author compare.names.aer 's :=
+ author 'prev.author.aer := }
+ { author 's := }
+ if$
+ extra.label.bysame "bysame" =
+ { "\bysame " }
+ { bst.author.pre s remove.ss.period.auth * }
+ if$
+ }
+ if$
+}
+
+%%% editor
+FUNCTION {format.editors}
+{ editor empty$
+ { "" }
+ { bst.use.bysame #2 =
+ { prev.author.aer editor compare.names.aer 's :=
+ editor 'prev.author.aer := }
+ { editor 's := }
+ if$
+ extra.label.bysame "bysame" =
+ { "\bysame " }
+ { bst.author.pre s remove.ss.period.auth * }
+ if$
+ s num.names$ #1 >
+ { bst.editors * }
+ { bst.editor * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.authors.alt}
+{ author empty$
+ { "" }
+ { extra.label.bysame "bysame" =
+ {"\bysame "}
+ { bst.author.pre author remove.ss.period.auth * }
+ if$
+ }
+ if$
+}
+
+%%% editor
+FUNCTION {format.editors.alt}
+{ editor empty$
+ { "" }
+ { extra.label.bysame "bysame" =
+ { "\bysame " }
+ { bst.author.pre editor remove.ss.period.auth * }
+ if$
+ editor num.names$ #1 >
+ { bst.editors * }
+ { bst.editor * }
+ if$
+ }
+ if$
+}
+
+%%% format.in.ed.booktitle
+FUNCTION {format.editors.x}
+{ editor empty$
+ { "" }
+ { bst.editor.btitle.order #0 =
+ { "" }
+ { editor num.names$ #1 >
+ { bst.editors " by " * }
+ { bst.editor " by " * }
+ if$
+ }
+ if$
+ editor format.names *
+ bst.editor.btitle.order #0 =
+ { editor num.names$ #1 >
+ { bst.editors * }
+ { bst.editor * }
+ if$
+ }
+ { "" * }
+ if$
+ }
+ if$
+}
+
+%%% Remove commas in the cases like "?." and "?,".
+FUNCTION {remove.irrelevant.period.comma}
+{ 's :=
+ s empty$
+ { "" }
+ { s #-1 #3 substring$ "?,'" =
+ s #-1 #3 substring$ "?.'" = or
+ { s #-3 global.max$ substring$ "'" * }
+ { s #-1 #4 substring$ "?,''" =
+ s #-1 #4 substring$ "?.''" = or
+ { s #-4 global.max$ substring$ "''" * }
+ { s #-1 #2 substring$ "?," =
+ s #-1 #2 substring$ "?." = or
+ { s #-2 global.max$ substring$ "" * }
+ { s #-1 #3 substring$ "?,~" =
+ s #-1 #3 substring$ "?.~" = or
+ { s #-4 global.max$ substring$ "?~" * }
+ 's
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+}
+
+%%% title
+FUNCTION {format.title.sub}
+{ bst.title.lower.case #0 =
+ { bst.title.pre title * bst.title.post * }
+ { bst.title.pre title "t" change.case$ * bst.title.post * }
+ if$
+}
+
+%%% title
+FUNCTION {format.title}
+{ title empty$
+ bst.hide.title #0 = not or
+ { "" }
+ { format.title.sub remove.irrelevant.period.comma }
+ if$
+}
+
+%%% title for misc.
+FUNCTION {format.misc.title}
+{ title empty$
+ { "" }
+ { bst.title.pre title * bst.title.post * }
+ if$
+}
+
+% Convert "-" to "--" (for pages field)
+FUNCTION {n.dashify}
+{ 't :=
+ ""
+ %% while$
+ { t empty$ not }
+ { t #1 #1 substring$ "-" =
+ { t #1 #2 substring$ "--" = not
+ { "--" *
+ t #2 global.max$ substring$ 't :=
+ }
+ { { t #1 #1 substring$ "-" = }
+ { "-" *
+ t #2 global.max$ substring$ 't :=
+ }
+ while$
+ }
+ if$
+ }
+ { t #1 #1 substring$ *
+ t #2 global.max$ substring$ 't :=
+ }
+ if$
+ }
+ while$
+}
+
+%%% year
+FUNCTION {format.year}
+{ year empty$
+ { "there's no year in " cite$ * warning$
+ ", " }
+ { type$ "article" =
+ { bst.year.pre year * extra.label * bst.year.post * }
+ { bst.year.na.pre year * extra.label * bst.year.na.post * }
+ if$
+ }
+ if$
+}
+
+%%% page for book
+FUNCTION {format.book.pages}
+{ pages empty$
+ { "" }
+ { bst.pages.pre pages * bst.pages.post * }
+ if$
+}
+
+%%% Attach tie for the string with two or less characters.
+FUNCTION {tie.or.space.connect}
+{ duplicate$ text.length$ #3 <
+ { "~" }
+ { " " }
+ if$
+ swap$ * *
+}
+
+FUNCTION {either.or.check}
+{ empty$
+ 'pop$
+ { "can't use both " swap$ * " fields in " * cite$ * warning$ }
+ if$
+}
+
+%%% volume for book
+FUNCTION {format.bvolume}
+{ volume empty$
+ { "" }
+ { bst.volume.pre volume * bst.volume.post *
+ series empty$
+ 'skip$
+ %% If there is series field
+ { " of " * series * bst.series.post * }
+ if$
+% "volume and number" number either.or.check
+ }
+ if$
+}
+
+%%% series
+FUNCTION {output.series}
+{ series empty$
+ { "" }
+ { bst.series.pre series * bst.series.post * }
+ if$
+}
+
+%%% number and series
+FUNCTION {format.number.series}
+{ volume empty$
+ { number empty$
+ bst.hide.month #0 = not or
+ % number is empty
+ { series empty$
+ { "" }
+ % series is not empty.
+ { output.series }
+ if$
+ }
+ % number is not empty$
+ { series empty$
+ { bst.number.pre number * bst.number.post * }
+ % series is not empty.
+ { bst.in bst.series.pre * series * bst.series.post *
+ bst.number.pre * number * bst.number.post * }
+ if$
+ }
+ if$
+ }
+ { "" }
+ if$
+}
+
+%%% Number or not.
+FUNCTION {is.num}
+{ chr.to.int$
+ duplicate$ "0" chr.to.int$ < not
+ swap$ "9" chr.to.int$ > not and
+}
+
+FUNCTION {extract.num}
+{ duplicate$ 't :=
+ "" 's :=
+ { t empty$ not }
+ { t #1 #1 substring$
+ t #2 global.max$ substring$ 't :=
+ duplicate$ is.num
+ { s swap$ * 's := }
+ { pop$ "" 't := }
+ if$
+ }
+ while$
+ s empty$
+ 'skip$
+ { pop$ s }
+ if$
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% edition
+
+% Convert edition to 1st, 2nd, 3rd, 4th etc
+FUNCTION {eng.ord}
+{ duplicate$ "1" swap$ *
+ #-2 #1 substring$ "1" =
+ { bst.th * }
+ { duplicate$ #-1 #1 substring$
+ duplicate$ "1" =
+ { pop$ bst.st * }
+ { duplicate$ "2" =
+ { pop$ bst.nd * }
+ { "3" =
+ { bst.rd * }
+ { bst.th * }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+}
+
+% Convert first, second etc in edition field to 1st, 2nd (from jfm.bst)
+FUNCTION {convert.edition}
+{ edition extract.num "l" change.case$ 's :=
+ s "first" = s "1" = or
+ { bst.first }
+ { s "second" = s "2" = or
+ { bst.second }
+ { s "third" = s "3" = or
+ { bst.third }
+ { s "fourth" = s "4" = or
+ { bst.fourth }
+ { s "fifth" = s "5" = or
+ { bst.fifth }
+ { s #1 #1 substring$ is.num
+ { s eng.ord }
+ { edition }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+}
+
+%%% edition
+FUNCTION {format.edition}
+{ edition empty$
+ { "" }
+ { output.state mid.sentence =
+ { bst.edition.pre convert.edition "l" change.case$ * bst.edition.post * }
+ { bst.edition.pre convert.edition "t" change.case$ * bst.edition.post * }
+ if$
+ }
+ if$
+}
+
+%%% month
+FUNCTION {format.month}
+{ month empty$
+ bst.hide.month #0 = not or
+ { "" }
+ { bst.month.pre month * bst.month.post * }
+ if$
+}
+
+%%% year and month
+FUNCTION {format.date}
+{ format.month format.year *
+}
+
+%%% Is multiple pages like 1-100?
+FUNCTION { multi.page.check }
+{ 't :=
+ #0 'multiresult :=
+ { multiresult not
+ t empty$ not
+ and
+ }
+ { t #1 #1 substring$
+ duplicate$ "-" =
+ swap$ duplicate$ "," =
+ swap$ "+" =
+ or or
+ { #1 'multiresult := }
+ { t #2 global.max$ substring$ 't := }
+ if$
+ }
+ while$
+ multiresult
+}
+
+%%% pages
+FUNCTION {format.pages}
+{ pages empty$
+ { "" }
+ { pages multi.page.check
+ { bst.pages.pre pages n.dashify tie.or.space.connect * bst.pages.post }
+ { bst.page.pre pages tie.or.space.connect * bst.page.post }
+ if$
+ }
+ if$
+}
+
+%%% number
+FUNCTION {format.number}
+{ number empty$
+ bst.hide.number #0 = not or
+ { "" }
+ { bst.number.pre number * bst.number.post * }
+ if$
+}
+
+%%% volume
+FUNCTION {format.volume}
+{ volume empty$
+ 'skip$
+ { bst.volume.pre volume * bst.volume.post *
+ bst.year.position #3 =
+ { format.year * }
+ 'skip$
+ if$
+ }
+ if$
+}
+
+%%% number, page
+FUNCTION {format.number.pages}
+{ number empty$
+ { format.pages }
+ { format.number format.pages * }
+ if$
+}
+
+%%% volume, page
+FUNCTION {format.volume.pages}
+{ volume empty$
+ { format.pages }
+ { format.volume format.pages * }
+ if$
+}
+
+%%% volume, number, page
+FUNCTION {format.volume.number.pages}
+{ volume empty$
+ { number empty$
+ { format.pages }
+ { format.number format.pages * }
+ if$
+ }
+ { number empty$
+ { format.volume format.pages * }
+ { format.volume format.number * format.pages * }
+ if$
+ }
+ if$
+}
+
+% volume, number, page
+FUNCTION {format.vol.num.pages}
+{ volume empty$
+ %% volume is empty.
+ { number empty$
+ %% number is empty.
+ { pages empty$
+ % warning
+ { "there is no volume, number, and pages in " cite$ * warning$ "" }
+ { "" format.pages * }
+ if$
+ }
+ %% number is not empty.
+ % warning
+ { "there's a number but no volume in " cite$ * warning$
+ format.number.pages }
+ if$
+ }
+ %% volume is not empty.
+ { number empty$
+ %% number is empty.
+ { format.volume.pages }
+ %% number is not empty.
+ { format.volume.number.pages }
+ if$
+ }
+ if$
+}
+
+%%% chapter
+FUNCTION {format.chapter}
+{ chapter empty$
+ { "" }
+ { type empty$
+ { bst.chapter.pre chapter tie.or.space.connect * bst.chapter.post }
+ { ", " * type " " * chapter * }
+ if$
+ }
+ if$
+}
+
+%%% chapter, pages
+FUNCTION {format.chapter.pages}
+{ chapter empty$
+ { pages empty$
+ { "" }
+ { "" format.pages * }
+ if$
+ }
+ { pages empty$
+ { "" format.chapter * }
+ { "" format.chapter * format.pages * }
+ if$
+ }
+ if$
+}
+
+%%% editor and booktitle
+FUNCTION {format.in.ed.booktitle}
+{ booktitle empty$
+ { "" }
+ { editor empty$
+ { bst.in format.btitle * }
+ { bst.editor.btitle.order #0 =
+ { bst.in format.editors.x * " " * format.btitle * }
+ { bst.in format.btitle * " " * format.editors.x * }
+ if$
+ }
+ if$
+ }
+ if$
+}
+
+%%% howpublished
+FUNCTION {format.howpublished}
+{ howpublished empty$
+ { "" }
+ { bst.howpublished.pre howpublished * bst.howpublished.post * }
+ if$
+}
+
+%%% address
+FUNCTION {format.address}
+{ address empty$
+ { "" }
+ { bst.address.pre address * bst.address.post * }
+ if$
+}
+
+%%% publisher
+FUNCTION {format.publisher}
+{ publisher empty$
+ { "" }
+ { bst.publisher.pre publisher * bst.publisher.post * }
+ if$
+}
+
+%%% organization
+FUNCTION {format.organization}
+{ organization empty$
+ { "" }
+ { bst.organization.pre organization * bst.organization.post * }
+ if$
+}
+
+%% publisher and address
+FUNCTION {output.publisher.address}
+{ address empty$
+ { format.publisher "publisher" output.check.nocomma }
+ { bst.address.position #0 =
+ { format.address output.nocomma
+ format.publisher "publisher" output.check.nocomma }
+ { format.publisher "publisher" output.check.nocomma
+ format.address output.nocomma }
+ if$
+ }
+ if$
+}
+
+%% address, organization, publisher
+FUNCTION {output.address.organization.publisher}
+{ address empty$
+ %% address is empty
+ { organization empty$
+ %% organization is empty
+ { publisher empty$
+ 'skip$
+ { format.publisher "publisher" output.check.nocomma }
+ if$
+ }
+ %% organization is not empty
+ { publisher empty$
+ { format.organization "organization" output.check.nocomma }
+ { format.organization "organization" output.check.nocomma
+ format.publisher "publisher" output.check.nocomma }
+ if$
+ }
+ if$
+ }
+ %% address is not empty
+ { organization empty$
+ %% organization is empty
+ { publisher empty$
+ %% publisher is empty
+ { format.address output.nocomma }
+ %% publisher is not empty
+ { bst.address.position #0 =
+ { format.address output.nocomma
+ format.publisher "publisher" output.check.nocomma }
+ { format.publisher "publisher" output.check.nocomma
+ format.address output.nocomma }
+ if$
+ }
+ if$
+ }
+ %% organization is not empty
+ { publisher empty$
+ %% publisher is empty
+ { format.organization "organization" output.check.nocomma
+ format.address output.nocomma }
+ %% publisher is not empty
+ { format.organization "organization" output.check.nocomma
+ bst.address.position #0 =
+ { format.address output.nocomma
+ format.publisher "publisher" output.check.nocomma }
+ { format.publisher "publisher" output.check.nocomma
+ format.address output.nocomma }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+}
+
+%%% misc
+FUNCTION {empty.misc.check}
+{ author empty$ title empty$ howpublished empty$
+ month empty$ year empty$ note empty$
+ and and and and and
+ key empty$ not and
+ { "all relevant fields are empty in " cite$ * warning$ }
+ 'skip$
+ if$
+}
+
+FUNCTION {format.thesis.type}
+{ type empty$
+ 'skip$
+ { pop$ " " type * }
+ if$
+}
+
+FUNCTION {format.tr.number}
+{ type empty$
+ { "Technical Report" }
+ { " " type * }
+ if$
+ number empty$
+ { "t" change.case$ }
+ { number tie.or.space.connect }
+ if$
+}
+
+%%% phdthesis
+FUNCTION {format.phd}
+{ bst.phdthesis }
+
+%%% mastersthesis
+FUNCTION {format.mthesis}
+{ bst.mthesis }
+
+%%% school
+FUNCTION {format.school}
+{ school empty$
+ { "" }
+ { bst.school.pre school * bst.school.post * }
+ if$
+}
+
+%%% institution
+FUNCTION {format.institution}
+{ institution empty$
+ { "" }
+ { bst.institution.pre institution * bst.institution.post * }
+ if$
+}
+
+%%% remove first ? characters.
+FUNCTION {chop.word}
+{ 's :=
+ 'len :=
+ s #1 len substring$ =
+ { s len #1 + global.max$ substring$ }
+ 's
+ if$
+}
+
+FUNCTION {format.note}
+{ note empty$
+ { "" }
+ { bst.note.pre note * bst.note.post * }
+ if$
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% \havarditem
+
+FUNCTION {output.bibitem}
+{ newline$
+ "\harvarditem[" write$
+ alabel write$ % alabel <- abbreviated citation
+ "]{" write$
+ flabel write$ % flabel <- full citation
+ "}{" write$
+ cyear write$
+ % cyear = year
+ "}{" write$
+ cite$ write$ % cite$ -> pusch keyword
+ "}" write$
+ % If number index is on
+ bst.use.number.index #0 =
+ 'skip$
+ { index #1 + 'index :=
+ "" 'preone :=
+ "" 'preten :=
+ bst.number.index.digit "1" =
+ 'skip$
+ { bst.number.index.digit "2" =
+ { "\hskip0.5em" 'preone := }
+ { bst.number.index.digit "3" =
+ { "\hskip1em" 'preone :=
+ "\hskip0.5em" 'preten := }
+ 'skip$
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+ newline$
+ before.all 'output.state :=
+ ""
+ % number index
+ bst.use.number.index #0 =
+ 'skip$
+ { index #10 <
+ % Insert spaces according to digit of number index.
+ { preone }
+ { index #100 <
+ { preten }
+ { "" }
+ if$
+ }
+ if$
+ bst.number.index.pre * index int.to.str$ * bst.number.index.post * write$
+ }
+ if$
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% article
+
+FUNCTION {article}
+{ output.bibitem
+ format.authors "author" output.check.nocomma
+ bst.year.position #0 =
+ { format.year "year" output.check.nocomma }
+ 'skip$
+ if$
+ format.title "title" output.check.nocomma
+
+ format.journal "journal" output.check.nocomma
+ bst.year.position #2 =
+ { format.date output.nocomma }
+ 'skip$
+ if$
+ format.vol.num.pages output.nocomma
+
+ bst.year.position #1 =
+ { format.date output.nocomma }
+ 'skip$
+ if$
+
+ format.url.doi output.nocomma
+
+ format.note output.nocomma
+ fin.entry
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% book
+
+FUNCTION {book}
+{ output.bibitem
+ author empty$
+ { format.editors "author and editor" output.check.nocomma }
+ { format.authors output.nonnull.nocomma
+ "author and editor" editor either.or.check
+ }
+ if$
+ bst.year.position #0 =
+ { format.year "year" output.check.nocomma }
+ 'skip$
+ if$
+ format.book "title" output.check.nocomma
+
+ format.bvolume output.nocomma
+ format.number.series output.nocomma
+ output.publisher.address
+
+ format.edition output.nocomma
+ format.book.pages output.nocomma
+
+ bst.year.position #0 = not
+ { format.year "year" output.check.nocomma }
+ 'skip$
+ if$
+
+ format.url.doi output.nocomma
+
+ format.note output.nocomma
+ fin.entry
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% booklet
+
+FUNCTION {booklet}
+{ output.bibitem
+ format.authors output.nocomma
+ format.year output.nocomma
+ format.misc.title "title" output.check.nocomma
+ format.howpublished output.nocomma
+ format.address output.nocomma
+
+ format.url.doi output.nocomma
+
+ format.note output.nocomma
+ fin.entry
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% inbook
+
+FUNCTION {inbook}
+{ output.bibitem
+ author empty$
+ { format.editors "author and editor" output.check.nocomma }
+ { format.authors output.nonnull.nocomma
+ "author and editor" editor either.or.check
+ }
+ if$
+ bst.year.position #0 =
+ { format.year "year" output.check.nocomma }
+ 'skip$
+ if$
+% format.book remove.pre.comma "title" output.check.nocomma
+ format.book "title" output.check.nocomma
+ format.edition output.nocomma
+
+ format.bvolume output.nocomma
+ format.chapter.pages "chapter and pages" output.check.nocomma
+ format.number.series output.nocomma
+ output.publisher.address
+
+ bst.year.position #0 = not
+ { format.year "year" output.check.nocomma }
+ 'skip$
+ if$
+
+ format.url.doi output.nocomma
+
+ format.note output.nocomma
+ fin.entry
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% incollection
+
+FUNCTION {incollection}
+{ output.bibitem
+ format.authors "author" output.check.nocomma
+ bst.year.position #0 =
+ { format.year "year" output.check.nocomma }
+ 'skip$
+ if$
+ format.title "title" output.check.nocomma
+
+ format.in.ed.booktitle "booktitle" output.check.nocomma
+ format.bvolume output.nocomma
+ output.address.organization.publisher
+ format.edition output.nocomma
+ format.chapter.pages output.nocomma
+
+ bst.year.position #0 = not
+ { format.year "year" output.check.nocomma }
+ 'skip$
+ if$
+
+ format.url.doi output.nocomma
+
+ format.note output.nocomma
+ fin.entry
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% inproceedings
+
+FUNCTION {inproceedings}
+{ output.bibitem
+ format.authors "author" output.check.nocomma
+ bst.year.position #0 =
+ { format.year "year" output.check.nocomma }
+ 'skip$
+ if$
+ format.title "title" output.check.nocomma
+
+ format.in.ed.booktitle "booktitle" output.check.nocomma
+ format.bvolume output.nocomma
+ format.number.series output.nocomma
+ format.pages output.nocomma
+ output.address.organization.publisher
+
+ bst.year.position #0 = not
+ { format.date output.nocomma }
+ { format.month output.nocomma }
+ if$
+
+ format.url.doi output.nocomma
+
+ format.note output.nocomma
+ fin.entry
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% conference
+
+FUNCTION {conference}
+{ inproceedings }
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% manual
+FUNCTION {manual}
+{ output.bibitem
+ author empty$
+ { organization empty$
+ 'skip$
+ { organization output.nonnull.nocomma
+ address output.nocomma
+ }
+ if$
+ }
+ { format.authors output.nonnull.nocomma }
+ if$
+ bst.year.position #0 =
+ { format.year "year" output.check.nocomma }
+ 'skip$
+ if$
+ format.book "title" output.check.nocomma
+ author empty$
+ { organization empty$
+ { format.address new.block.check
+ format.address output.nocomma
+ }
+ 'skip$
+ if$
+ }
+ { output.address.organization.publisher }
+ if$
+ format.edition output.nocomma
+
+ bst.year.position #0 = not
+ { format.year "year" output.check.nocomma }
+ 'skip$
+ if$
+
+ format.url.doi output.nocomma
+
+ format.note output.nocomma
+ fin.entry
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% mastersthesis
+
+FUNCTION {mastersthesis}
+{ output.bibitem
+ format.authors "author" output.check.nocomma
+ bst.year.position #0 =
+ { format.year "year" output.check.nocomma }
+ 'skip$
+ if$
+ format.title "title" output.check.nocomma
+ format.mthesis format.thesis.type output.nonnull.nocomma
+ format.school "school" output.check.nocomma
+ format.address output.nocomma
+
+ bst.year.position #0 = not
+ { format.year "year" output.check.nocomma }
+ 'skip$
+ if$
+
+ format.url.doi output.nocomma
+
+ format.note output.nocomma
+ fin.entry
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% misc
+
+FUNCTION {misc}
+{ output.bibitem
+ format.authors "author" output.check.nocomma
+ bst.year.position #0 =
+ { format.year "year" output.check.nocomma }
+ 'skip$
+ if$
+ format.misc.title output.nocomma
+ format.howpublished output.nocomma
+
+ bst.year.position #0 = not
+ { format.date output.nocomma }
+ { format.month output.nocomma }
+ if$
+
+ format.url.doi output.nocomma
+
+ format.note output.nocomma
+ fin.entry
+ empty.misc.check
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% Online
+
+FUNCTION {online}
+{ output.bibitem
+ format.authors "author" output.check.nocomma
+ bst.year.position #0 =
+ { format.year "year" output.check.nocomma }
+ 'skip$
+ if$
+ format.misc.title output.nocomma
+ format.howpublished output.nocomma
+
+ bst.year.position #0 = not
+ { format.date output.nocomma }
+ { format.month output.nocomma }
+ if$
+
+ format.url.doi output.nocomma
+
+ format.note output.nocomma
+ fin.entry
+ empty.misc.check
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% phdthesis
+
+FUNCTION {phdthesis}
+{ output.bibitem
+ format.authors "author" output.check.nocomma
+ bst.year.position #0 =
+ { format.year "year" output.check.nocomma }
+ 'skip$
+ if$
+ format.book "title" output.check.nocomma
+ format.phd
+ format.thesis.type output.nonnull.nocomma
+ format.school "school" output.check.nocomma
+ address empty$
+ 'skip$
+ { format.address output.nocomma }
+ if$
+
+ bst.year.position #0 = not
+ { format.year "year" output.check.nocomma }
+ 'skip$
+ if$
+
+ format.url.doi output.nocomma
+
+ format.note output.nocomma
+ fin.entry
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% proceedings
+
+FUNCTION {proceedings}
+{ output.bibitem
+ editor empty$
+ { organization output.nocomma }
+ { format.editors output.nonnull.nocomma }
+ if$
+ bst.year.position #0 =
+ { format.year "year" output.check.nocomma }
+ 'skip$
+ if$
+ format.btitle remove.pre.comma "title" output.check.nocomma
+ format.bvolume output.nocomma
+ format.number.series output.nocomma
+ output.address.organization.publisher
+
+ bst.year.position #0 = not
+ { format.year "year" output.check.nocomma }
+ 'skip$
+ if$
+
+ format.url.doi output.nocomma
+
+ format.note output.nocomma
+ fin.entry
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% techreport
+
+FUNCTION {techreport}
+{ output.bibitem
+ format.authors "author" output.check.nocomma
+ bst.year.position #0 =
+ { format.year "year" output.check.nocomma }
+ 'skip$
+ if$
+ format.title "title" output.check.nocomma
+ format.tr.number output.nonnull.nocomma
+ format.institution "institution" output.check.nocomma
+ format.address output.nocomma
+
+ bst.year.position #0 = not
+ { format.year "year" output.check.nocomma }
+ 'skip$
+ if$
+
+ format.note output.nocomma
+ fin.entry
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% unpublished
+
+FUNCTION {unpublished}
+{ output.bibitem
+ format.authors "author" output.check.nocomma
+ bst.year.position #0 =
+ { format.year "year" output.check.nocomma }
+ 'skip$
+ if$
+ format.title "title" output.check.nocomma
+
+ bst.year.position #0 = not
+ { format.date remove.pre.comma output.nocomma }
+ { month empty$
+ 'skip$
+ { format.month remove.pre.comma output.nocomma }
+ if$
+ }
+ if$
+
+ format.url.doi output.nocomma
+
+ format.note "note" output.check.nocomma
+ fin.entry
+}
+
+FUNCTION {default.type}
+{ misc }
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% Alias for month names:
+
+MACRO {jan} {"January"}
+MACRO {feb} {"February"}
+MACRO {mar} {"March"}
+MACRO {apr} {"April"}
+MACRO {may} {"May"}
+MACRO {jun} {"June"}
+MACRO {jul} {"July"}
+MACRO {aug} {"August"}
+MACRO {sep} {"September"}
+MACRO {oct} {"October"}
+MACRO {nov} {"November"}
+MACRO {dec} {"December"}
+
+%%% Read entries:
+READ
+
+%%% Variable for remembering the order of citation.
+INTEGERS { order.num }
+FUNCTION {initialize.order.num}
+{
+ #1 'order.num :=
+}
+%%% Initialize a variables
+EXECUTE {initialize.order.num}
+
+%%% Variable for remembering the order of citation.
+FUNCTION {set.order.cited}
+{
+ order.num 'order.cited :=
+ #1 order.num + 'order.num :=
+}
+%%% Iterate for all entries:
+ITERATE {set.order.cited}
+
+%%% check the value of nameorder field.
+FUNCTION {set.nameorder}
+{ nameorder empty$
+ { "" 'nameorder.temp := }
+ { nameorder 'nameorder.temp := }
+ if$
+}
+%%% Iterate for all entries:
+ITERATE {set.nameorder}
+
+%%% Remove symbols and convert to lowercase.
+FUNCTION {sortify}
+{ purify$ "l" change.case$ }
+
+%%% names for sorting
+FUNCTION {sort.format.names}
+{ 's :=
+ #1 'nameptr :=
+ ""
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ { nameptr #1 >
+ { ", " * }
+ 'skip$
+ if$
+ s nameptr "{ll}{ f}{ j}" format.name$ 't :=
+ nameptr numnames = t "others" = and
+ { bst.and.others.output *}
+ { t sortify * }
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+}
+
+FUNCTION {sort.format.names.abb}
+{ 's :=
+ s num.names$ 'numnames :=
+ numnames bst.and.others.num <
+ { s sort.format.names }
+ { s #1 "{ll}{ f}{ j}" format.name$ " zz " * }
+ if$
+}
+
+%%% Label for full author name.
+FUNCTION {format.lab.names.full}
+{ 's :=
+ #1 'nameptr :=
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ { s nameptr "{vv~}{ll}" format.name$ 't :=
+ nameptr #1 >
+ { namesleft #1 >
+ { nameorder.temp "random" = bst.use.nameorder #0 = not and
+ { bst.and.nameorder * t * }
+ { ", " * t * }
+ if$
+ }
+ { t "others" =
+ { bst.and.others.output * }
+ { numnames #2 >
+ { nameorder.temp "random" = bst.use.nameorder #0 = not and
+ { bst.cite.and.nameorder * t * }
+ { bst.cite.ands * t * }
+ if$
+ }
+ { nameorder.temp "random" = bst.use.nameorder #0 = not and
+ { bst.cite.and.nameorder * t * }
+ { bst.cite.and * t * }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ 't
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+ numnames #1 > #1 #2 = and {", eds" *} {} if$
+ numnames #1 = #1 #2 = and {", ed" *} {} if$
+}
+
+%%% laberl for abbreviated author name.
+FUNCTION {format.lab.names.abb}
+{ 's :=
+ s num.names$ 'numnames :=
+ numnames bst.and.others.num <
+ % if the number of authors is less than bst.and.others.num, full name.
+ { s format.lab.names.full }
+ % if the number of authors is equal or more than bst.and.others.num, abbreviated name.
+ { s #1 "{ll}" format.name$ bst.and.others.output * }
+ if$
+}
+
+%%% abbreviated author
+FUNCTION {author.key.label.abb}
+{ author empty$
+ { key empty$
+ { cite$ #1 #3 substring$ }
+ { key #3 text.prefix$ }
+ if$
+ }
+ { author format.lab.names.abb }
+ if$
+}
+
+%%% full author
+FUNCTION {author.key.label.full}
+{ author empty$
+ { key empty$
+ { cite$ #1 #3 substring$ }
+ { key #3 text.prefix$ }
+ if$
+ }
+ { author format.lab.names.full }
+ if$
+}
+
+FUNCTION {format.names.full.wo.and}
+{ 's :=
+ #1 'nameptr :=
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ { s nameptr "{ll}{, ff}{, jj}" format.name$ 't :=
+ nameptr #1 >
+ { namesleft #1 >
+ { " " * t * }
+ { t "others" =
+ { " " * }
+ { numnames #2 >
+ { " " * t * }
+ { " " * t * }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ 't
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+}
+
+FUNCTION {author.key.full.wo.and}
+{ author empty$
+ { key empty$
+ { cite$ #1 #3 substring$ }
+ { key #3 text.prefix$ }
+ if$
+ }
+ { author format.names.full.wo.and }
+ if$
+}
+
+FUNCTION {author.editor.key.full.wo.and}
+{ author empty$
+ { editor empty$
+ { key empty$
+ { cite$ #1 #3 substring$ }
+ { key #3 text.prefix$ }
+ if$
+ }
+ { editor format.names.full.wo.and }
+ if$
+ }
+ { author format.names.full.wo.and }
+ if$
+}
+
+FUNCTION {editor.key.organization.key.full.wo.and}
+{ editor empty$
+ { key empty$
+ { organization empty$
+ { cite$ #1 #3 substring$ }
+ { "The " #4 organization chop.word #3 text.prefix$ }
+ if$
+ }
+ { key #3 text.prefix$ }
+ if$
+ }
+ { editor format.names.full.wo.and }
+ if$
+}
+
+FUNCTION {author.key.organization.key.full.wo.and}
+{ author empty$
+ { key empty$
+ { organization empty$
+ { cite$ #1 #3 substring$ }
+ { "The " #4 organization chop.word #3 text.prefix$ }
+ if$
+ }
+ { key #3 text.prefix$ }
+ if$
+ }
+ { author format.names.full.wo.and }
+ if$
+}
+
+%%% abbreviated author
+FUNCTION {author.editor.key.label.abb}
+{ author empty$
+ { editor empty$
+ { key empty$
+ { cite$ #1 #3 substring$ }
+ { key #3 text.prefix$ }
+ if$
+ }
+ { editor format.lab.names.abb }
+ if$
+ }
+ { author format.lab.names.abb }
+ if$
+}
+
+%%% full author
+FUNCTION {author.editor.key.label.full}
+{ author empty$
+ { editor empty$
+ { key empty$
+ { cite$ #1 #3 substring$ }
+ { key #3 text.prefix$ }
+ if$
+ }
+ { editor format.lab.names.full }
+ if$
+ }
+ { author format.lab.names.full }
+ if$
+}
+
+FUNCTION {author.key.organization.label.full}
+{ author empty$
+ { key empty$
+ { organization empty$
+ { cite$ #1 #3 substring$ }
+ { "The " #4 organization chop.word #3 text.prefix$ }
+ if$
+ }
+ { key #3 text.prefix$ }
+ if$
+ }
+ { author format.lab.names.full }
+ if$
+}
+
+FUNCTION {author.key.organization.label.abb}
+{ author empty$
+ { key empty$
+ { organization empty$
+ { cite$ #1 #3 substring$ }
+ { "The " #4 organization chop.word #3 text.prefix$ }
+ if$
+ }
+ { key #3 text.prefix$ }
+ if$
+ }
+ { author format.lab.names.abb }
+ if$
+}
+
+FUNCTION {editor.key.organization.label.full}
+{ editor empty$
+ { key empty$
+ { organization empty$
+ { cite$ #1 #3 substring$ }
+ { "The " #4 organization chop.word #3 text.prefix$ }
+ if$
+ }
+ { key #3 text.prefix$ }
+ if$
+ }
+ { editor format.lab.names.full }
+ if$
+}
+
+FUNCTION {editor.key.organization.label.abb}
+{ editor empty$
+ { key empty$
+ { organization empty$
+ { cite$ #1 #3 substring$ }
+ { "The " #4 organization chop.word #3 text.prefix$ }
+ if$
+ }
+ { key #3 text.prefix$ }
+ if$
+ }
+ { editor format.lab.names.abb }
+ if$
+}
+
+%%% Convert numbers: 0->9, 1->8, 2->7,..., 9->0
+FUNCTION {reverse.num}
+{ 's :=
+ s "1" =
+ { "8" 'year.num := }
+ { s "2" =
+ { "7" 'year.num := }
+ { s "3" =
+ { "6" 'year.num := }
+ { s "4" =
+ { "5" 'year.num := }
+ { s "5" =
+ { "4" 'year.num := }
+ { s "6" =
+ { "3" 'year.num := }
+ { s "7" =
+ { "2" 'year.num := }
+ { s "8" =
+ { "1" 'year.num := }
+ { s "9" =
+ { "0" 'year.num := }
+ { s "0" =
+ { "9" 'year.num := }
+ { "9" 'year.num := }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+ year.num
+}
+
+%%% Convert year (large number -> small number)
+FUNCTION {convert.year}
+{ 't :=
+ bst.reverse.year #0 =
+ { t 'tt := }
+ { t #1 #1 substring$ reverse.num
+ t #2 #1 substring$ reverse.num *
+ t #3 #1 substring$ reverse.num *
+ t #4 #1 substring$ reverse.num * 'tt := }
+ if$
+ tt
+}
+
+%%% cyear
+FUNCTION {calc.cyear}
+{ type$ "book" =
+ type$ "inbook" =
+ or
+ 'author.editor.key.full.wo.and
+ { type$ "proceedings" =
+ 'editor.key.organization.key.full.wo.and
+ { type$ "manual" =
+ 'author.key.organization.key.full.wo.and
+ 'author.key.full.wo.and
+ if$
+ }
+ if$
+ }
+ if$
+ duplicate$
+ year empty$
+ { "2199" 'cyear := }
+ { year 'cyear := }
+ if$
+ year empty$
+ { " " "2199" convert.year * field.or.null * }
+ { " " year convert.year * field.or.null * }
+ if$
+ sortify 'sort.label :=
+ % For debug
+ econ.debug #0 = not
+ { "sort.label = ``\texttt{" write$
+ sort.label write$
+ "}''\\" write$
+ newline$
+ }
+ 'skip$
+ if$
+ pop$
+}
+
+FUNCTION {calc.sort.label.abb}
+{ author empty$
+ { editor empty$
+ { "" }
+ { editor 's := }
+ if$
+ }
+ { author 's := }
+ if$
+ s sort.format.names.abb 't :=
+ year empty$
+ { t sortify " " * "2199" convert.year * 'sort.label.abb := }
+ { t sortify " " * year convert.year * 'sort.label.abb := }
+ if$
+ econ.debug #0 = not
+ { "sort.label.abb = ``\texttt{" write$
+ sort.label.abb write$
+ "}''\\" write$
+ newline$
+ }
+ 'skip$
+ if$
+}
+
+%%% flabel
+FUNCTION {calc.flabel}
+{ type$ "book" =
+ type$ "inbook" =
+ or
+ 'author.editor.key.label.full
+ { type$ "proceedings" =
+ 'editor.key.organization.label.full
+ { type$ "manual" =
+ 'author.key.organization.label.full
+ 'author.key.label.full
+ if$
+ }
+ if$
+ }
+ if$
+ 'flabel :=
+ % For debug
+ econ.debug #0 = not
+ { "flabel = ``\texttt{" write$
+ flabel write$
+ "}''\\" write$
+ newline$
+ }
+ 'skip$
+ if$
+}
+
+%%% alabel
+FUNCTION {calc.alabel}
+{ type$ "book" =
+ type$ "inbook" =
+ or
+ 'author.editor.key.label.abb
+ { type$ "proceedings" =
+ 'editor.key.organization.label.abb
+ { type$ "manual" =
+ 'author.key.organization.label.abb
+ 'author.key.label.abb
+ if$
+ }
+ if$
+ }
+ if$
+ 'alabel :=
+ % For debug
+ econ.debug #0 = not
+ { "alabel = ``\texttt{" write$
+ alabel write$
+ "}''\\" write$
+ newline$
+ }
+ 'skip$
+ if$
+}
+
+%%% title for sorting
+FUNCTION {sort.format.title}
+{ 't :=
+ "A " #2
+ "An " #3
+ "The " #4 t chop.word
+ chop.word
+ chop.word
+ sortify
+ #1 global.max$ substring$
+}
+
+%%% author for sorting
+FUNCTION {author.sort}
+{ author empty$
+ { key empty$
+ { "to sort, need author or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { author sort.format.names }
+ if$
+}
+
+%%% editor for sorting
+FUNCTION {author.editor.sort}
+{ author empty$
+ { editor empty$
+ { key empty$
+ { "to sort, need author, editor, or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { editor sort.format.names }
+ if$
+ }
+ { author sort.format.names }
+ if$
+}
+
+FUNCTION {author.organization.sort}
+{ author empty$
+ { organization empty$
+ { key empty$
+ { "to sort, need author, organization, or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { "The " #4 organization chop.word sortify }
+ if$
+ }
+ { author sort.format.names }
+ if$
+}
+
+FUNCTION {editor.organization.sort}
+{ editor empty$
+ { organization empty$
+ { key empty$
+ { "to sort, need editor, organization, or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { "The " #4 organization chop.word sortify }
+ if$
+ }
+ { editor sort.format.names }
+ if$
+}
+
+%%% 1,...,9 -> 001,...,009
+%%% 10,...,99 -> 010,...,099
+FUNCTION {add.zero.to.number}
+{ 's :=
+ s text.length$ #1 =
+ { "00" s * }
+ { s text.length$ #2 =
+ { "0" s * }
+ { s }
+ if$
+ }
+ if$
+}
+
+%% entry type
+FUNCTION {bst.sort.entry.type.order}
+{ 'item.type :=
+ item.type "article" =
+ { "01" }
+ { item.type "book" =
+ { "02" }
+ { item.type "booklet" =
+ { "03" }
+ { item.type "comment" =
+ { "04" }
+ { item.type "conference" =
+ { "05" }
+ { item.type "inbook" =
+ { "06" }
+ { item.type "incollection" =
+ { "07" }
+ { item.type "inproceedings" =
+ { "08" }
+ { item.type "manual" =
+ { "09" }
+ { item.type "masterthesis" =
+ { "10" }
+ { item.type "misc" =
+ { "11" }
+ { item.type "phdthesis" =
+ { "12" }
+ { item.type "proceedings" =
+ { "13" }
+ { item.type "techreport" =
+ { "14" }
+ { item.type "unpublished" =
+ { "15" }
+ { "16" }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+}
+
+%%% Create sort.key$: absorder -> author -> year -> order -> month -> title.
+FUNCTION {presort.one}
+{
+ bst.no.sort #0 = not
+ { order.cited int.to.str$ add.zero.to.number " " * }
+ { "" }
+ if$
+ bst.sort.year #0 = not
+ %% Use year field as the primary sorting key.
+ { year convert.year * }
+ 'skip$
+ if$
+ bst.sort.entry.type #0 = not
+ { type$ bst.sort.entry.type.order * " " * }
+ 'skip$
+ if$
+ absorder empty$
+ { "/// " * }
+ { bst.notuse.absorder.field #0 =
+ { absorder "999" =
+ { "zzz " * }
+ { absorder add.zero.to.number "000" =
+ { "/// " * }
+ { absorder add.zero.to.number * " " * }
+ if$
+ }
+ if$
+ }
+ { "/// " * }
+ if$
+ }
+ if$
+ " " *
+ sort.label.abb *
+ " " *
+ type$ "book" = type$ "inbook" = or
+ 'author.editor.sort
+ { type$ "proceedings" =
+ 'editor.organization.sort
+ { type$ "manual" =
+ 'author.organization.sort
+ 'author.sort
+ if$
+ }
+ if$
+ }
+ if$
+ * " " *
+ " "
+ order empty$
+ { "/// " * }
+ { bst.notuse.order.field #0 =
+ { order "999" =
+ { "zzz " * }
+ { order add.zero.to.number "000" =
+ { "/// " * }
+ { order add.zero.to.number * " " * }
+ if$
+ }
+ if$
+ }
+ { "/// " * }
+ if$
+ }
+ if$
+ month empty$
+ { * "/// " * }
+ { month "999" =
+ { * month add.zero.to.number * "zzz " * }
+ { month add.zero.to.number "000" =
+ { * month add.zero.to.number * "/// " * }
+ { * month add.zero.to.number * " " * }
+ if$
+ }
+ if$
+ }
+ if$
+ title field.or.null sort.format.title
+ *
+ #1 entry.max$ substring$
+ 'sort.key$ :=
+ % For debug
+ econ.debug #0 = not
+ { "``\texttt{" write$
+ sort.key$ write$
+ "}''\\" write$
+ newline$
+ }
+ 'skip$
+ if$
+}
+
+FUNCTION {presort.two}
+{
+ bst.no.sort #0 = not
+ { order.cited int.to.str$ add.zero.to.number " " * }
+ { "" }
+ if$
+ bst.sort.year #0 = not
+ %% Use year field as the primary sorting key.
+ { year convert.year * }
+ 'skip$
+ if$
+ bst.sort.entry.type #0 = not
+ { type$ bst.sort.entry.type.order * " " * }
+ 'skip$
+ if$
+ absorder empty$
+ { "/// " * }
+ { bst.notuse.absorder.field #0 =
+ { absorder "999" =
+ { "zzz " * }
+ { absorder add.zero.to.number "000" =
+ { "/// " * }
+ { absorder add.zero.to.number * " " * }
+ if$
+ }
+ if$
+ }
+ { "/// " * }
+ if$
+ }
+ if$
+ " " * sort.label * " "
+ order empty$
+ { "/// " * }
+ { bst.notuse.order.field #0 =
+ { order "999" =
+ { "zzz " * }
+ { order add.zero.to.number "000" =
+ { "/// " * }
+ { order add.zero.to.number * " " * }
+ if$
+ }
+ if$
+ }
+ { "/// " * }
+ if$
+ }
+ if$
+ month empty$
+ { * "/// " * }
+ { month "999" =
+ { * month add.zero.to.number * "zzz " * }
+ { month add.zero.to.number "000" =
+ { * month add.zero.to.number * "/// " * }
+ { * month add.zero.to.number * " " * }
+ if$
+ }
+ if$
+ }
+ if$
+ title field.or.null sort.format.title
+ *
+ #1 entry.max$ substring$
+ 'sort.key$ :=
+ % For debug
+ econ.debug #0 = not
+ { "``\texttt{" write$
+ sort.key$ write$
+ "}''\\" write$
+ newline$
+ }
+ 'skip$
+ if$
+}
+
+%%% Codes for debugging
+FUNCTION {calc.alabel.mess}
+{ econ.debug #0 = not
+ { "\textbf{Iteration of calc.alabel: alabel = }\\" write$
+ newline$ }
+ 'skip$
+ if$
+}
+FUNCTION {calc.flabel.mess}
+{ econ.debug #0 = not
+ { "\textbf{Iteration of calc.flabel: flabel = }\\" write$
+ newline$ }
+ 'skip$
+ if$
+}
+FUNCTION {presort.one.mess}
+{ econ.debug #0 = not
+ { "\textbf{Iteration of presort (1st time): \$sort.key = }\\" write$
+ newline$ }
+ 'skip$
+ if$
+}
+
+FUNCTION {presort.two.mess}
+{ econ.debug #0 = not
+ { "\textbf{Iteration of presort (2nd time): \$sort.key = }\\" write$
+ newline$ }
+ 'skip$
+ if$
+}
+
+FUNCTION {calc.cyear.mess}
+{ econ.debug #0 = not
+ { "\textbf{Iteration of calc.cyear: sort.label = }\\" write$
+ newline$ }
+ 'skip$
+ if$
+}
+
+FUNCTION {calc.sort.label.abb.mess}
+{ econ.debug #0 = not
+ { "\textbf{Iteration of calc.sort.label.abb: sort.label.abb = }\\" write$
+ newline$ }
+ 'skip$
+ if$
+}
+
+%%% alabel
+EXECUTE {calc.alabel.mess}
+ITERATE {calc.alabel}
+
+%%% flabel
+EXECUTE {calc.flabel.mess}
+ITERATE {calc.flabel}
+
+%%% cyear and sort.label
+EXECUTE {calc.cyear.mess}
+ITERATE {calc.cyear}
+
+%%%
+EXECUTE {calc.sort.label.abb.mess}
+ITERATE {calc.sort.label.abb}
+
+%%% Sorting by $sort.key (first time)
+%
+% Sorting is done in two times. This is the first time.
+%
+EXECUTE {presort.one.mess}
+ITERATE {presort.one}
+SORT
+
+FUNCTION {forward.pass}
+{ bst.use.bysame #0 = bst.use.bysame #2 = or
+ % Not use \bysame
+ { last.sort.label sort.label.abb =
+ { last.extra.num #1 + 'last.extra.num :=
+ last.extra.num int.to.chr$ 'extra.label :=
+ }
+ { "a" chr.to.int$ 'last.extra.num :=
+ "" 'extra.label :=
+ sort.label.abb 'last.sort.label :=
+ }
+ if$
+ }
+ % Use \bysame
+ { last.sort.label sort.label.abb =
+ { last.extra.num #1 + 'last.extra.num :=
+ last.extra.num int.to.chr$ 'extra.label :=
+ }
+ { "a" chr.to.int$ 'last.extra.num :=
+ "" 'extra.label :=
+ sort.label.abb 'last.sort.label :=
+ }
+ if$
+ author empty$
+ { editor empty$
+ { "" }
+ 'format.editors.alt
+ if$
+ }
+ 'format.authors.alt
+ if$
+ 'this.author :=
+ % format.names 'this.author :=
+ this.author prev.author =
+ { "bysame" 'extra.label.bysame := }
+ { this.author "" =
+ { "abcxyz" }
+ 'this.author
+ if$
+ 'prev.author :=
+ }
+ if$
+ }
+ if$
+}
+
+FUNCTION {reverse.pass}
+{ next.extra "b" =
+ { "a" 'extra.label := }
+ 'skip$
+ if$
+ extra.label empty$ not
+ { cyear extra.label * }
+ { cyear "" * }
+ if$
+ "" field.or.null *
+ 'cyear :=
+ extra.label 'next.extra :=
+}
+
+%%% \bysame
+ITERATE {forward.pass}
+
+REVERSE {reverse.pass}
+
+%%% Sorting by sort.key$ (second time)
+EXECUTE {presort.two.mess}
+ITERATE {presort.two}
+SORT
+
+FUNCTION {reset.prev.author}
+{ "xxyyzz" 'prev.author := }
+
+EXECUTE {reset.prev.author}
+
+FUNCTION {forward.pass.two}
+{ bst.use.bysame #1 =
+ { author empty$
+ { editor empty$
+ { "" }
+ 'format.editors.alt
+ if$
+ }
+ 'format.authors.alt
+ if$
+ 'this.author :=
+ this.author prev.author =
+ { "bysame" 'extra.label.bysame := }
+ { this.author "" =
+ { "abcxyz" }
+ 'this.author
+ if$
+ 'prev.author :=
+ }
+ if$
+ }
+ 'skip$
+ if$
+}
+
+ITERATE {forward.pass.two}
+
+FUNCTION{punctuation}
+{
+ "%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%" write$ newline$
+ "% This bbl file is created by econ.bst ver." econ.version * write$ newline$
+ "% The latest econ.bst is available at" write$ newline$
+ "% <https://github.com/ShiroTakeda/econ-bst>" write$ newline$ newline$
+}
+
+EXECUTE {punctuation}
+
+FUNCTION {begin.bib}
+{
+ preamble$ empty$
+ 'skip$
+ { preamble$ write$ newline$ }
+ if$
+ bst.use.bysame #0 =
+ % Not use \bysame.
+ 'skip$
+ % Use \bysame.
+ { "%%% Definition of \bysame" write$ newline$
+ "\ifx\undefined\bysame" write$ newline$
+ "\newcommand{\bysame}{" bst.bysame.definition * "}" *
+ write$ newline$
+ "\fi" write$ newline$ newline$ }
+ if$
+ %% When number index is attached to the beginning of each item.
+ bst.use.number.index #0 =
+ 'skip$
+ { bst.number.index.digit "1" =
+ % one digit.
+ { bst.number.index.bibhang.one }
+ { bst.number.index.digit "2" =
+ % two digits.
+ { bst.number.index.bibhang.ten }
+ % three or more digits.
+ { bst.number.index.bibhang.hund }
+ if$
+ }
+ if$
+ 'hang :=
+ "%%% Redefinition of \bibhang" write$ newline$
+ "\ifx\undefined\bibhang" write$ newline$
+ "\relax" write$ newline$
+ "\else" write$ newline$
+ "\setlength{\bibhang}{"
+ hang * "}" * write$ newline$
+ "\fi" write$ newline$ newline$
+ }
+ if$
+ "\begin{thebibliography}{xxx}" write$ newline$
+
+ %% Initialize the variable `index'.
+ #0 'index :=
+}
+
+FUNCTION {end.bib}
+{ newline$ "\end{thebibliography}" write$ newline$ }
+
+EXECUTE {begin.bib}
+
+EXECUTE {init.state.consts}
+
+ITERATE {call.type$}
+
+EXECUTE {end.bib}
+
+% --------------------
+% Local Variables:
+% fill-column: 78
+% mode: bst
+% End:
diff --git a/biblio/bibtex/contrib/econ-bst/customization/econ-jie.pdf b/biblio/bibtex/contrib/econ-bst/customization/econ-jie.pdf
new file mode 100644
index 0000000000..900654b4fe
--- /dev/null
+++ b/biblio/bibtex/contrib/econ-bst/customization/econ-jie.pdf
Binary files differ
diff --git a/biblio/bibtex/contrib/econ-bst/customization/econ-jie.tex b/biblio/bibtex/contrib/econ-bst/customization/econ-jie.tex
new file mode 100644
index 0000000000..aa01c92619
--- /dev/null
+++ b/biblio/bibtex/contrib/econ-bst/customization/econ-jie.tex
@@ -0,0 +1,56 @@
+%#!pdflatex
+%#BIBTEX bibtex econ-jie
+
+%############################## Main #################################
+\documentclass[10pt]{article}
+
+%% Use natbib.sty
+\usepackage{natbib}
+\usepackage{mathpazo}
+\usepackage{url}
+\usepackage{graphicx}
+\usepackage{color}
+\definecolor{MyBrown}{rgb}{0.3,0,0}
+\definecolor{MyBlue}{rgb}{0,0,0.3}
+\definecolor{MyRed}{rgb}{0.4,0,0.1}
+\definecolor{MyGreen}{rgb}{0,0.4,0}
+\usepackage[bookmarks=true,%
+bookmarksnumbered=true,%
+colorlinks=true,%
+linkcolor=MyBlue,%
+citecolor=MyRed,%
+filecolor=MyBlue,%
+urlcolor=MyGreen%
+]{hyperref}
+
+\setlength{\topmargin}{-20pt}
+\setlength{\textheight}{648pt}
+\setlength{\oddsidemargin}{15pt}
+\setlength{\textwidth}{440pt}
+
+%#####################################################################
+%######################### Document Starts ###########################
+%#####################################################################
+\begin{document}
+
+This document uses ``\verb|econ-jie.bst|''. The style like ({\itshape Journal of
+International Economics}).
+
+\vspace{1em}
+
+\input{cited-part}
+\nocite{*}
+
+%% bst file:
+\bibliographystyle{econ-jie}
+\bibliography{../econ-example}
+
+\end{document}
+
+%#####################################################################
+%######################### Document Ends #############################
+%#####################################################################
+% --------------------
+% Local Variables:
+% fill-column: 80
+% End:
diff --git a/biblio/bibtex/contrib/econ-bst/customization/econ-no-sort.bst b/biblio/bibtex/contrib/econ-bst/customization/econ-no-sort.bst
new file mode 100644
index 0000000000..2e272ee2c3
--- /dev/null
+++ b/biblio/bibtex/contrib/econ-bst/customization/econ-no-sort.bst
@@ -0,0 +1,3521 @@
+%% econ.bst: BibTeX style file for papers in economics.
+%
+% Author: Shiro Takeda
+% Maintainer: Shiro Takeda
+% Copyright (C) 2001-2018 Shiro Takeda
+% First-written: <2007/07/28>
+% Time-stamp: <2018-12-07 18:48:07 st>
+% Version: 2.5
+% Keywords: TeX, BibTeX, bst
+% URL: https://github.com/ShiroTakeda/econ-bst
+
+% This work may be distributed and/or modified under the
+% conditions of the LaTeX Project Public License, either version 1.3
+% of this license or (at your option) any later version.
+% The latest version of this license is in
+% http://www.latex-project.org/lppl.txt
+% and version 1.3 or later is part of all distributions of LaTeX
+% version 2005/12/01 or later.
+%
+% This work has the LPPL maintenance status "maintained".
+%
+% The Current Maintainer of this work is Shiro Takeda.
+
+%% Main features of econ.bst.
+
+% "econ.bst" is a BibTeX style file for economics. It provids the following
+% features:
+
+% 1) The author-year type citation (you need "natbib.sty" as well).
+% 2) Reference style used in economics papers ("econ.bst" is not a BibTeX style
+% for a specific journal).
+% 3) Highly customizable. You can easily customize reference style as you wish.
+% 4) You can use "certified random order" proposed by Ray ⓡ Robson (2018)
+% (http://dx.doi.org/10.1257/aer.20161492).
+
+% Bug reports, requests and suggestions are welcome.
+
+% For changelogs, see CHANGES.txt file.
+
+% version number
+FUNCTION {econ.version} { "2.5" }
+
+% Debug mode. Non-zero makes debug mode on.
+FUNCTION {econ.debug}
+{ #0 } % Debug mode off (default).
+% { #1 } % Debug mode on.
+
+ENTRY
+ %%% Declaration of field
+ { access address author booktitle chapter doi edition editor howpublished
+ institution journal key month note number organization pages publisher
+ school series title type url volume year
+ % Fields specific to econ.bst
+ order absorder nameorder
+ }
+
+ % Definition of entry variable. The entry variable is a variable which has
+ % different values according to different entries.
+ %% Integer entry variable:
+ { order.cited }
+
+ %% String entry variable
+ { label cyear flabel alabel extra.label sort.label sort.label.abb
+ extra.label.bysame nameorder.temp }
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%%
+%% Functions for customization:
+%%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+% Use \bysame or not.
+%
+% If set to #0, \bysame is not used.
+% If set to #1, \bysame is used
+% If set to #2, \bysame is used (alternative abbreviation style).
+%
+% Note that integer number is expressed as # + integer in bst file.
+% \bysame is the function that abbreviates succession of the same authors' name by ---.
+%
+% See econ-sample.pdf for details.
+%
+FUNCTION {bst.use.bysame}
+% { #0 } % Not use \bysame
+{ #1 } % -> Use \bysame (default)
+% { #2 } % -> Use \bysame of alternative style.
+
+% The definition of \bysame command.
+%
+FUNCTION {bst.bysame.definition}
+{ "\hskip.3em \leavevmode\rule[.5ex]{3em}{.3pt}\hskip0.5em" } % (default)
+% { "\leavevmode\hbox to\leftmargin{\hrulefill\,\,}" } % If you set #2 to bst.use.bysame, use this.
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+% The order of fist and last name.
+%
+FUNCTION {bst.author.name}
+{ #0 } % (default)
+% { #1 }
+% { #2 }
+
+% Case of #0: First author -> last-first, other authors -> first-last.
+% Fujita, Masahisa, Paul R. Krugman, and Anthony J. Venables.
+
+% Case of #1: All authors -> last-first
+% Fujita, Masahisa, Krugman, Paul R., and Venables, Anthony J.
+
+% Case of #2: All authors -> first-last
+% Masahisa Fujita, Paul R. Krugman, and Anthony J. Venables.
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+% Abbreviate first name of authors (editors):
+%
+FUNCTION {bst.first.name.initial}
+{ #0 } % #0 -> full letters (default).
+% { #1 } % Non-zero -> initial letter only.
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+% Decapitalize of strings in title field.
+%
+FUNCTION {bst.title.lower.case}
+{ #0 } % If #0, not decapitalize title (default).
+% { #1 } % If non-#0, decapitalize title
+
+% Hide title filed.
+%
+FUNCTION {bst.hide.title}
+{ #0 } % #0 -> Title field is displayed (default)
+% { #1 } % Non-zer -> Title field is hidden
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+% Hide month.
+%
+FUNCTION {bst.hide.month}
+{ #0 } % #0 -> show month field (default).
+% { #1 } % non-#0 -> hide month field.
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+% Attach number index like plain.bst.
+%
+FUNCTION {bst.use.number.index}
+{ #0 } % Not use number index (default).
+% { #1 } % Non-#0 -> Use number index
+
+% The string before number index:
+%
+FUNCTION {bst.number.index.pre}
+{ "[" } % (default)
+
+% The string after number index. Adjustment is recommended.
+%
+FUNCTION {bst.number.index.post}
+{ "]\hskip1.0em " } % (default)
+
+% Maximum digit of number index:
+% If the number of reference items >= 100, set 3 to this function.
+% If the number of reference items < 100, set 2 to this function.
+% If the number of reference items < 10, set 1 to this function.
+%
+FUNCTION {bst.number.index.digit}
+{ "2" } % (default)
+% { "3" }
+
+% The functions below are used to adjust space and postion. If you use fonts
+% other than computer modern fonts, you had better make adjustments.
+%
+% Setting for bst.number.index.digit = 1:
+FUNCTION {bst.number.index.bibhang.one}
+{ "2.05em" } % (default)
+% Setting for bst.number.index.digit = 2:
+FUNCTION {bst.number.index.bibhang.ten}
+{ "2.55em" } % (default)
+% Setting for bst.number.index.digit = 3:
+FUNCTION {bst.number.index.bibhang.hund}
+{ "3.05em" } % (default).
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+% Position of "year":
+%
+% You can choose the position of year by this function.
+%
+% If set to #0, year is placed right after "author".
+% If set to non-zero, year is placed at the end (before note field) except for
+% aritcle type entry.
+%
+% In article type entry, the position of year changes according to the
+% following rule:
+%
+% #1 -> year is placed at the end.
+% #2 -> year is placed after journal name in aritcle type entry.
+% #3 -> year is placed after volume in aritcle type entry.
+%
+FUNCTION {bst.year.position}
+{ #0 } % (default).
+% { #1 } % Last place before note.
+% { #2 } % After journal name for aticle type entry.
+% { #3 } % After volume for aticle type entry.
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+% If 0, references are sorted by old documents -> recent documents. If
+% non-zero, reverse order.
+FUNCTION {bst.reverse.year}
+{ #0 } % Normal order (old -> recent) (default).
+% { #1 } % inverse order (recent -> old)
+
+% If non-zero, sort references by using year field as the primary key
+% (chronological sorting).
+FUNCTION {bst.sort.year}
+{ #0 } % Normal case: year is used as the sorting key next to author (default).
+% { #1 } % year is used as the primary sorting key.
+
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+% If non-zero, references are listed in citation order.
+%
+FUNCTION {bst.no.sort}
+% { #0 } % (default)
+{ #1 } % listed in citation order.
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+% Non-zero -> sort references by entry type (article, book, incollection etc.)
+%
+FUNCTION {bst.sort.entry.type}
+{ #0 } % #0 -> Normal (not sort references by entry type) (default).
+% { #1 } % Non-zero -> sort references by entry type.
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+% 0 -> use absorder field to sort items. Otherwise, ignore absorder field.
+%
+FUNCTION {bst.notuse.absorder.field}
+{ #0 } % #0 -> Use absorder (default).
+% { #1 } % Non-#0 -> Not use absorder.
+%
+% Order of priority to sort items
+%
+% absorder -> author -> year -> order -> month -> title
+%
+% wehre absorder and order fields are specific to econ.bst.
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+% 0 -> use order field to sort items. Otherwise, ignore order field.
+% Note: order field is specific to econ.bst.
+FUNCTION {bst.notuse.order.field}
+{ #0 } % #0 -> Use order field (default).
+% { #1 } % Non-#0 -> not use order field.
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%%% and
+
+%%% String used to separate author names in references.
+%
+% String replaced with _ in "Mr. A _ Mr. B "
+%
+FUNCTION {bst.and}
+{ " and " } % (default)
+
+%%% String used to separate author names in references (more than two authors).
+%
+% String replaced with _ in "Mr. A, Mr. B _ Mr. C"
+%
+FUNCTION {bst.ands}
+{ ", and " } % (default)
+
+%%% String used to separate author names in citation part.
+%
+% String replaced with _ in "Mr. A _ Mr. B "
+%
+FUNCTION {bst.cite.and}
+{ " and " } % (default)
+
+%%% String used to separate author names in citation part (more than two authors).
+%
+% String replaced with _ in "Mr. A, Mr. B _ Mr. C"
+%
+FUNCTION {bst.cite.ands}
+{ " and " } % (default)
+
+%%% If you want to use random author order for some bibliography entries, set
+% non-zero to this function.
+%
+FUNCTION {bst.use.nameorder}
+{ #1 } % Use random order (default)
+% { #0 } % Not use random order
+
+%%% String used to separate author names in references for the entry of random
+% author order.
+%
+FUNCTION {bst.and.nameorder}
+{ " \textcircled{r} " } % (default)
+
+%%% String used to separate author names in citation part for the entry of
+% random author order
+%
+FUNCTION {bst.cite.and.nameorder}
+{ " \textcircled{r} " } % (default)
+
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+% Author names in the citation part are abbreviated by et al. if the number of
+% authors is greater or equal to bst.and.others.num.
+FUNCTION {bst.and.others.num}
+{ #3 } % If the number of authors is greater or equal to three (default).
+% { #4 }
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+% Strings used when abbreviating multiple-authors in citation part.
+FUNCTION {bst.and.others}
+{ " et~al." } % (default)
+
+% Strings used when abbreviating multiple-authors in citation part for entries
+% with random author order.
+FUNCTION {bst.and.others.nameorder}
+{ " \textcircled{r}~al." } % (default)
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% author
+
+% The string before author:
+%
+FUNCTION {bst.author.pre}
+{ "" } % (default)
+
+% The string after author:
+%
+FUNCTION {bst.author.post}
+{ "" } % (default)
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% year
+
+% The string before year only for aritcle type entry.
+%
+FUNCTION {bst.year.pre}
+{ " (" } % (default)
+
+% The string after year only for aritcle type entry.
+%
+FUNCTION {bst.year.post}
+{ ") " } % (default)
+
+% The string after year for non-article type entry (book, incollection etc)
+%
+FUNCTION {bst.year.na.pre}
+{ " (" } % (default)
+
+% The string after year for non-article type entry (book, incollection etc)
+%
+FUNCTION {bst.year.na.post}
+{ ") " } % (default)
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% title (except for title in book)
+
+% The string before title:
+%
+FUNCTION {bst.title.pre}
+{ "``" } % (default)
+
+% The string after title:
+%
+FUNCTION {bst.title.post}
+{ ",''" } % (default)
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% tile for book:
+
+% The string before book title:
+%
+FUNCTION {bst.book.pre}
+{ " \textit{" } % (default)
+
+% The string after book title:
+%
+FUNCTION {bst.book.post}
+{ "}" } % (default)
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% booktitle
+
+% The string before booktitle:
+%
+FUNCTION {bst.btitle.pre}
+{ " \textit{" } % (default)
+
+% The string after booktitle:
+%
+FUNCTION {bst.btitle.post}
+{ "}" } % (default)
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% journal name
+
+% The string before journal name:
+%
+FUNCTION {bst.journal.pre}
+{ " \textit{" } % (default)
+
+% The string after journal name:
+%
+FUNCTION {bst.journal.post}
+{ "}" } % (default)
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% editor notation:
+
+% The string that indicates multiple editors:
+%
+FUNCTION {bst.editors}
+{ " eds. " } % (default)
+
+% The string that indicates single editor:
+%
+FUNCTION {bst.editor}
+{ " ed. " } % (default)
+
+% Order of editor and booktitle in incollection and inproceedings entries.
+%
+% If set to #0: editors -> booktitle order
+% If set to non-zero: booktitle -> editors order
+%
+FUNCTION {bst.editor.btitle.order}
+{ #0 } % (default)
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% edition
+
+% The string before edition:
+%
+FUNCTION {bst.edition.pre}
+{ ", " } % (default)
+
+% The string after edition:
+%
+FUNCTION {bst.edition.post}
+{ " edition" } % (default)
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% volume
+
+% The string before volume:
+%
+FUNCTION {bst.volume.pre}
+{ ", Vol. " } % (default)
+
+% The string after volume:
+%
+FUNCTION {bst.volume.post}
+{ "" } % (default)
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% number
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+% Hide number. If non-zero, number is suppressed.
+FUNCTION {bst.hide.number}
+% { #0 } % #0 -> show number field (default)
+{ #1 } % non-#0 -> Hide number field.
+
+% The string before number:
+%
+FUNCTION {bst.number.pre}
+{ ", No. " } % (default)
+
+% The string after number:
+%
+FUNCTION {bst.number.post}
+{ "" } % (default)
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% in
+
+% In
+%
+FUNCTION {bst.in}
+{ " in " } % (default)
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% page
+
+% The string before page (multiple pages):
+%
+FUNCTION {bst.pages.pre}
+{ ", pp." } % (default)
+
+% The string before page:
+%
+FUNCTION {bst.page.pre}
+{ ", p." } % (default)
+
+% The string after page (multiple pages):
+%
+FUNCTION {bst.pages.post}
+{ "" } % (default)
+
+% The string after page:
+%
+FUNCTION {bst.page.post}
+{ "" } % (default)
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% chapter
+
+% The string before chapter:
+%
+FUNCTION {bst.chapter.pre}
+{ ", Chap." } % (default)
+
+% The string after chapter:
+%
+FUNCTION {bst.chapter.post}
+{ "" } % (default)
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% month
+
+% The string before month:
+%
+FUNCTION {bst.month.pre}
+{ ", " } % (default)
+
+% The string after month:
+%
+FUNCTION {bst.month.post}
+{ "" } % (default)
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% address
+% The string before address:
+%
+FUNCTION {bst.address.pre}
+{ ", " } % (default)
+
+% The string after address:
+%
+FUNCTION {bst.address.post}
+{ "" } % (default)
+
+% You can choose the order of address and publisher by this function.
+%
+% If #0, address -> publisher order (the default value).
+% If non-zero, publisher -> address order.
+
+FUNCTION {bst.address.position}
+{ #0 } % Address is placed before publisher (default)
+% { #1 } % Address is placed after publisher
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% publisher
+
+% The string before publisher:
+%
+FUNCTION {bst.publisher.pre}
+{ ": " } % (default)
+
+% The string after publisher:
+%
+FUNCTION {bst.publisher.post}
+{ "" } % (default)
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% series
+
+% The string before series:
+%
+FUNCTION {bst.series.pre}
+{ ", " } % (default)
+
+% The string after series:
+%
+FUNCTION {bst.series.post}
+{ "" } % (default)
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% organization
+
+% The string before organization:
+%
+FUNCTION {bst.organization.pre}
+{ ", " } % (default)
+
+% The string after organization:
+%
+FUNCTION {bst.organization.post}
+{ "" } % (default)
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% school
+
+% The string before school:
+%
+FUNCTION {bst.school.pre}
+{ ", " } % (default)
+
+% The string after school:
+%
+FUNCTION {bst.school.post}
+{ "" } % (default)
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% institution
+
+% The string before institution:
+%
+FUNCTION {bst.institution.pre}
+{ ", " } % (default)
+
+% The string after institution:
+%
+FUNCTION {bst.institution.post}
+{ "" } % (default)
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% howpublished
+
+% The string before howpublished:
+%
+FUNCTION {bst.howpublished.pre}
+{ " " } % (default)
+
+% The string after howpublished:
+%
+FUNCTION {bst.howpublished.post}
+{ "" } % (default)
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% url
+
+% Show or Hide url. If non-zero, url is displayed. Otherwise, url is suppressed.
+FUNCTION {bst.show.url}
+{ #1 } % non-#0 -> Show url field (default)
+% { #0 } % #0 -> Not show url field.
+
+% The string before url:
+%
+FUNCTION {bst.url.pre}
+{ ", URL: \url{" } % (default)
+
+% The string after url:
+%
+FUNCTION {bst.url.post}
+{ "}" } % (default)
+
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% Access
+
+% This setting is valid only if there are "access" field in bib
+% files. The value of access field indicates accessed date for URL.
+
+% The string before access.
+FUNCTION {bst.access.pre}
+{ ", accessed on " } % (default)
+
+% The string after access.
+FUNCTION {bst.access.post}
+{ "" } % (default)
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% DOI (digital object identifier)
+
+% This setting is valid only if there are "doi" field in bib files.
+
+% Show or Hide DOI. If non-zero, DOI is displayed. Otherwise, DOI is suppressed.
+FUNCTION {bst.show.doi}
+{ #1 } % non-#0 -> Show DOI field (default)
+% { #0 } % #0 -> Not show DOI field.
+
+% The string before DOI:
+%
+FUNCTION {bst.doi.pre}
+{ ", DOI: \href{http://dx.doi.org/" doi * "}{" * } % (default)
+
+% The string after DOI:
+%
+FUNCTION {bst.doi.post}
+{ "}" } % (default)
+
+% How to show URL and DOI fields when both fields exist.
+%
+% #0 -> Both fields are displayed
+% #1 -> Only URL field is displayed
+% #2 -> Only DOI field is displayed
+%
+FUNCTION {bst.url.doi}
+{ #0 } % (default) -> Both fields are displayed
+% { #1 } % -> Only URL field is displayed
+% { #2 } % -> Only DOI field is displayed
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% Other functions:
+
+% The string before note.
+FUNCTION {bst.note.pre}
+{ ", " } % (default)
+
+% The string after note.
+FUNCTION {bst.note.post}
+{ "" } % (default)
+
+% The string that represents Technical report:
+%
+FUNCTION {bst.techrep}
+{ " Tech. Rep." } % (default)
+
+% The string that represents master thesis:
+%
+FUNCTION {bst.mthesis}
+{ " Master's thesis" } % (default)
+
+% The string that represents phd thesis:
+%
+FUNCTION {bst.phdthesis}
+{ " Ph.D. dissertation" } % (default)
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%%
+%% Functions for customization end here:
+%%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+FUNCTION {bst.first}
+{ "1st" }
+
+FUNCTION {bst.second}
+{ "2nd" }
+
+FUNCTION {bst.third}
+{ "3rd" }
+
+FUNCTION {bst.fourth}
+{ "4th" }
+
+FUNCTION {bst.fifth}
+{ "5th" }
+
+FUNCTION {bst.st}
+{ "st" }
+
+FUNCTION {bst.nd}
+{ "nd" }
+
+FUNCTION {bst.rd}
+{ "rd" }
+
+FUNCTION {bst.th}
+{ "th" }
+
+%%%%% memo by Takeda
+
+% "a" 'b := indicates substituting string "a" for variable b.
+
+% Integer number #0, #1,...
+
+%%% Function definition:
+%
+% FUNCTION {name}
+% { 's :=
+%
+% }
+%
+% This is the definition of a function named "name". The function "name" is
+% used in the following way
+%
+% "foo" name
+% "foo" is an argument for the function "name".
+%
+% About the definition of a function with more than two arguments, see the
+% definition of "chop.word".
+
+%%% Declaration of variables:
+
+%% String global variables:
+STRINGS { s t tt }
+STRINGS { year.num }
+STRINGS { preone preten }
+STRINGS { last.sort.label next.extra prev.author prev.author.aer this.author }
+STRINGS { hang }
+STRINGS { item.type }
+STRINGS { tempa tempb }
+
+%% Integer global variables:
+INTEGERS { nameptr namesleft numnames name.num }
+INTEGERS { multiresult }
+INTEGERS { index }
+INTEGERS { len }
+INTEGERS { last.extra.num }
+INTEGERS { output.state before.all mid.sentence after.sentence after.block }
+INTEGERS { last.period.comma }
+INTEGERS { len1.aer len2.aer i.aer }
+
+%%% Definition of functions:
+FUNCTION {not}
+{ { #0 }
+ { #1 }
+ if$
+}
+
+FUNCTION {and}
+{ 'skip$
+ { pop$ #0 }
+ if$
+}
+
+FUNCTION {or}
+{ { pop$ #1 }
+ 'skip$
+ if$
+}
+
+%%% Initialize variables:
+FUNCTION {init.state.consts}
+{ #0 'before.all :=
+ #1 'mid.sentence :=
+ #2 'after.sentence :=
+ #3 'after.block :=
+}
+
+%%% Remove comma and add period:
+%
+%%%
+FUNCTION {add.period.x}
+{ duplicate$
+ #-1 #1 substring$ "," =
+ { #-2 global.max$ substring$ "." * }
+ { duplicate$
+ #-1 #2 substring$ ". " =
+ { #-3 global.max$ substring$ "." * }
+ { duplicate$
+ #-1 #2 substring$ ", " =
+ { #-3 global.max$ substring$ "." * }
+ { duplicate$
+ #-1 #2 substring$ ",'" =
+ { #-3 global.max$ substring$ ".'" * }
+ { duplicate$
+ #-1 #2 substring$ ".'" =
+ { #-3 global.max$ substring$ ".'" * }
+ { duplicate$
+ #-1 #2 substring$ ".~" =
+ { #-3 global.max$ substring$ ".~" * }
+ { duplicate$
+ #-1 #2 substring$ ",~" =
+ { #-3 global.max$ substring$ ".~" * }
+ { duplicate$
+ #-1 #3 substring$ ",''" =
+ { #-4 global.max$ substring$ ".''" * }
+ { duplicate$
+ #-1 #3 substring$ ".''" =
+ { #-4 global.max$ substring$ ".''" * }
+ { add.period$ }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+}
+
+FUNCTION {output.nonnull}
+{ 's :=
+ % mid.sentence
+ output.state mid.sentence =
+ { ", " * write$ }
+ % not mid.sentence
+ { output.state after.block =
+ % after.block
+ { add.period.x " " * write$ }
+ % before.all
+ { output.state before.all =
+ 'write$
+ { add.period.x " " * write$ }
+ if$
+ }
+ if$
+ % not mid.sentence, set to mid.sentence
+ mid.sentence 'output.state :=
+ }
+ if$
+ s
+}
+
+%%% If the last character is period or comma, set non-zero to
+%%% last.period.comma.
+FUNCTION {period.comma.p}
+{ duplicate$ 't :=
+ t #-1 #1 substring$ "." =
+ t #-1 #1 substring$ "," = or
+ t #-1 #1 substring$ ":" = or
+ t #-1 #2 substring$ ".'" = or
+ t #-1 #2 substring$ ",'" = or
+ t #-1 #3 substring$ ".''" = or
+ t #-1 #3 substring$ ",''" = or
+ t #-1 #2 substring$ ".~" = or
+ t #-1 #2 substring$ ",~" = or
+ { #1 'last.period.comma := }
+ { #0 'last.period.comma := }
+ if$
+}
+
+%%% remove unnecessary comma.
+FUNCTION {remove.pre.comma}
+{ 's :=
+ s empty$
+ { "" }
+ { s #1 #1 substring$ "," =
+ { s #2 global.max$ substring$ }
+ { s #1 #1 substring$ "." =
+ { s #2 global.max$ substring$ }
+ 's
+ if$
+ }
+ if$
+ }
+ if$
+}
+
+%%% output.nonnull.nocomma is the same as output.nonnull except that it does
+%%% not add commas even in mid.sentence.
+FUNCTION {output.nonnull.nocomma}
+{ 's :=
+ output.state mid.sentence =
+ % mid.sentence
+ { period.comma.p "" * write$ }
+
+ % not mid.sentence
+ { output.state after.block =
+ % after.block
+ { add.period.x " " * write$ }
+ % before.all
+ { output.state before.all =
+ 'write$
+ { add.period$ " " * write$ }
+ if$
+ }
+ if$
+ mid.sentence 'output.state :=
+ }
+ if$
+ last.period.comma #0 =
+ { s }
+ { s remove.pre.comma }
+ if$
+}
+
+% Not used in the current econ.bst.
+% FUNCTION {output}
+% { duplicate$ empty$
+% 'pop$
+% 'output.nonnull
+% if$
+% }
+
+FUNCTION {output.nocomma}
+{ duplicate$ empty$
+ 'pop$
+ 'output.nonnull.nocomma
+ if$
+}
+
+% Not used in the current econ.bst.
+% FUNCTION {output.check}
+% { 't :=
+% duplicate$ empty$
+% { pop$ "empty " t * " in " * cite$ * warning$ }
+% 'output.nonnull
+% if$
+% }
+
+FUNCTION {output.check.nocomma}
+{ 't :=
+ duplicate$ empty$
+ { pop$ "empty " t * " in " * cite$ * warning$ }
+ 'output.nonnull.nocomma
+ if$
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%%% Format in bbl file:
+
+% \harvarditem[Brezis et~al.]{Brezis, Krugman and
+% Tsiddon}{1993}{brezis93:_leapf_inter_compet}
+% Brezis, Elise~S., Paul~R. Krugman, and Daniel Tsiddon (1993) ``Leapfrogging in
+% International Competition: A Theory of Cycles in National Technological
+% Leadership.'', {\em American Economic Review.}, Vol.~83. No.~5. pp.
+% 1211--1219.
+
+% \harvarditem[abbreviated citation]{full citation}{year}{keyword} ...
+
+%%% Add period and newline.
+FUNCTION {fin.entry}
+{ add.period.x
+ write$
+ newline$
+}
+
+FUNCTION {new.block}
+{ output.state before.all =
+ 'skip$
+ { after.block 'output.state := }
+ if$
+}
+
+FUNCTION {new.sentence}
+{ output.state after.block =
+ 'skip$
+ { output.state before.all =
+ 'skip$
+ { after.sentence 'output.state := }
+ if$
+ }
+ if$
+}
+
+FUNCTION {new.block.check}
+{ empty$
+ 'skip$
+ 'new.block
+ if$
+}
+
+FUNCTION {field.or.null}
+{ duplicate$ empty$
+ { pop$ "" }
+ 'skip$
+ if$
+}
+
+%%% booktitle
+FUNCTION {format.btitle}
+{ booktitle empty$
+ { "" }
+ { bst.btitle.pre booktitle * bst.btitle.post * }
+ if$
+}
+
+%%% journal
+FUNCTION {format.journal}
+{ journal empty$
+ { "" }
+ { bst.journal.pre journal * bst.journal.post * }
+ if$
+}
+
+%%% title for book
+FUNCTION {format.book}
+{ title empty$
+ { "" }
+ { bst.book.pre title * bst.book.post * }
+ if$
+}
+
+FUNCTION {format.url}
+{ url empty$
+ { "" }
+ { type$ "online" = bst.show.url or
+ { bst.url.pre url * bst.url.post *
+ access empty$
+ { "" * }
+ { bst.access.pre * access * bst.access.post * }
+ if$
+ }
+ { "" }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.doi}
+{ doi empty$ bst.show.doi not or
+ { "" }
+ { bst.doi.pre doi * bst.doi.post * }
+ if$
+}
+
+FUNCTION {format.url.doi}
+{ url empty$
+ { format.doi }
+ { doi empty$
+ { format.url }
+ { bst.url.doi #0 =
+ { format.url output.nocomma
+ format.doi }
+ { bst.url.doi #1 =
+ { format.url }
+ { format.doi }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+}
+
+%%% and others
+FUNCTION {bst.and.others.output}
+{ nameorder.temp "random" =
+ bst.use.nameorder #0 = not and
+ { bst.and.others.nameorder }
+ { bst.and.others }
+ if$
+}
+
+%%% author and editor
+
+%%% name
+FUNCTION {format.names}
+{ 's :=
+ % insert 1 to nameptr.
+ #1 'nameptr :=
+ % Set the number of authors to numnames.
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ % Repeat if namesleft > 0
+ { namesleft #0 > }
+ { nameptr #1 =
+ % First author
+ { bst.author.name #0 =
+ bst.author.name #1 =
+ or
+ { bst.first.name.initial #0 =
+ { s nameptr "{vv~}{ll}{, ff}{, jj}" format.name$ 't := }
+ { s nameptr "{vv~}{ll}{, f.}{, jj}" format.name$ 't := }
+ if$
+ }
+ { bst.first.name.initial #0 =
+ { s nameptr "{ff~}{vv~}{ll}{, jj}" format.name$ 't := }
+ { s nameptr "{f.~}{vv~}{ll}{, jj}" format.name$ 't := }
+ if$
+ }
+ if$
+ }
+ % The second or later authors
+ { bst.author.name #0 =
+ bst.author.name #2 =
+ or
+ { bst.first.name.initial #0 =
+ { s nameptr "{ff~}{vv~}{ll}{, jj}" format.name$ 't := }
+ { s nameptr "{f.~}{vv~}{ll}{, jj}" format.name$ 't := }
+ if$
+ }
+ { bst.first.name.initial #0 =
+ { s nameptr "{vv~}{ll}{, ff}{, jj}" format.name$ 't := }
+ { s nameptr "{vv~}{ll}{, f.}{, jj}" format.name$ 't := }
+ if$
+ }
+ if$
+ }
+ if$
+
+ nameptr #1 >
+ % The second or later authors
+ { nameorder.temp "random" =
+ bst.use.nameorder #0 = not and
+ { bst.and.nameorder * t * }
+ { namesleft #1 >
+ % More than one authors left
+ { ", " * t * }
+ % Only one author left
+ { t "others" =
+ { bst.and.others.output * }
+ { numnames #2 =
+ % Entry with two authors
+ { bst.and * t * }
+ { bst.ands * t * }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ 't
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+}
+
+% remove successive periods (commas) from author
+FUNCTION {remove.ss.period.auth}
+{ 's :=
+ s format.names 'tempa :=
+ bst.author.post 'tempb :=
+ tempb #1 #1 substring$ "}" =
+ { tempa tempb * }
+ { tempa #-1 #1 substring$ tempb #1 #1 substring$ =
+ { tempa tempb #2 global.max$ substring$ * }
+ { tempa tempb * }
+ if$
+ }
+ if$
+}
+
+% <prev name list> <new name list> compare.names <modified name list>
+FUNCTION {compare.names.aer}
+{ 's :=
+ 'tempa :=
+
+% "current.author = " s * "\\" * write$ newline$
+% "prev.author = " tempa * "\\" * write$ newline$
+
+ tempa num.names$ 'len1.aer := % len1 = the number of previous authors
+ s num.names$ 'len2.aer := % len2 = the number of current authors
+
+% len1.aer := min(len1.aer,len2.aer)
+% len1 -> min{ the number of previous authors, the number of current authors }
+ len1.aer len2.aer >
+ { len2.aer 'len1.aer := }
+ { }
+ if$
+
+% start with an empty string, then while the components are the same
+% add "\bysame"
+ ""
+ #1 'i.aer :=
+
+ { i.aer len1.aer > not }
+ { tempa i.aer "{ff }{vv }{ll}{ jj}" format.name$
+ s i.aer "{ff }{vv }{ll}{ jj}" format.name$
+ =
+ { #1 i.aer <
+ { " and " * } % \bysame で省略する著者の前につく and
+ { }
+ if$
+ "\bysame{}" *
+ i.aer #1 + 'i.aer := }
+ { #-1 'len1.aer := }
+ if$
+ }
+ while$
+
+% add the rest of the second string
+ { i.aer len2.aer > not }
+ { #1 i.aer <
+ { " and " * }
+ { }
+ if$
+ s i.aer "{ff }{vv }{ll}{ jj}" format.name$ *
+ i.aer #1 + 'i.aer :=
+ }
+ while$
+}
+
+%%% author
+FUNCTION {format.authors}
+{ author empty$
+ { "" }
+ { bst.use.bysame #2 =
+ { prev.author.aer author compare.names.aer 's :=
+ author 'prev.author.aer := }
+ { author 's := }
+ if$
+ extra.label.bysame "bysame" =
+ { "\bysame " }
+ { bst.author.pre s remove.ss.period.auth * }
+ if$
+ }
+ if$
+}
+
+%%% editor
+FUNCTION {format.editors}
+{ editor empty$
+ { "" }
+ { bst.use.bysame #2 =
+ { prev.author.aer editor compare.names.aer 's :=
+ editor 'prev.author.aer := }
+ { editor 's := }
+ if$
+ extra.label.bysame "bysame" =
+ { "\bysame " }
+ { bst.author.pre s remove.ss.period.auth * }
+ if$
+ s num.names$ #1 >
+ { bst.editors * }
+ { bst.editor * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.authors.alt}
+{ author empty$
+ { "" }
+ { extra.label.bysame "bysame" =
+ {"\bysame "}
+ { bst.author.pre author remove.ss.period.auth * }
+ if$
+ }
+ if$
+}
+
+%%% editor
+FUNCTION {format.editors.alt}
+{ editor empty$
+ { "" }
+ { extra.label.bysame "bysame" =
+ { "\bysame " }
+ { bst.author.pre editor remove.ss.period.auth * }
+ if$
+ editor num.names$ #1 >
+ { bst.editors * }
+ { bst.editor * }
+ if$
+ }
+ if$
+}
+
+%%% format.in.ed.booktitle
+FUNCTION {format.editors.x}
+{ editor empty$
+ { "" }
+ { bst.editor.btitle.order #0 =
+ { "" }
+ { editor num.names$ #1 >
+ { bst.editors " by " * }
+ { bst.editor " by " * }
+ if$
+ }
+ if$
+ editor format.names *
+ bst.editor.btitle.order #0 =
+ { editor num.names$ #1 >
+ { bst.editors * }
+ { bst.editor * }
+ if$
+ }
+ { "" * }
+ if$
+ }
+ if$
+}
+
+%%% Remove commas in the cases like "?." and "?,".
+FUNCTION {remove.irrelevant.period.comma}
+{ 's :=
+ s empty$
+ { "" }
+ { s #-1 #3 substring$ "?,'" =
+ s #-1 #3 substring$ "?.'" = or
+ { s #-3 global.max$ substring$ "'" * }
+ { s #-1 #4 substring$ "?,''" =
+ s #-1 #4 substring$ "?.''" = or
+ { s #-4 global.max$ substring$ "''" * }
+ { s #-1 #2 substring$ "?," =
+ s #-1 #2 substring$ "?." = or
+ { s #-2 global.max$ substring$ "" * }
+ { s #-1 #3 substring$ "?,~" =
+ s #-1 #3 substring$ "?.~" = or
+ { s #-4 global.max$ substring$ "?~" * }
+ 's
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+}
+
+%%% title
+FUNCTION {format.title.sub}
+{ bst.title.lower.case #0 =
+ { bst.title.pre title * bst.title.post * }
+ { bst.title.pre title "t" change.case$ * bst.title.post * }
+ if$
+}
+
+%%% title
+FUNCTION {format.title}
+{ title empty$
+ bst.hide.title #0 = not or
+ { "" }
+ { format.title.sub remove.irrelevant.period.comma }
+ if$
+}
+
+%%% title for misc.
+FUNCTION {format.misc.title}
+{ title empty$
+ { "" }
+ { bst.title.pre title * bst.title.post * }
+ if$
+}
+
+% Convert "-" to "--" (for pages field)
+FUNCTION {n.dashify}
+{ 't :=
+ ""
+ %% while$
+ { t empty$ not }
+ { t #1 #1 substring$ "-" =
+ { t #1 #2 substring$ "--" = not
+ { "--" *
+ t #2 global.max$ substring$ 't :=
+ }
+ { { t #1 #1 substring$ "-" = }
+ { "-" *
+ t #2 global.max$ substring$ 't :=
+ }
+ while$
+ }
+ if$
+ }
+ { t #1 #1 substring$ *
+ t #2 global.max$ substring$ 't :=
+ }
+ if$
+ }
+ while$
+}
+
+%%% year
+FUNCTION {format.year}
+{ year empty$
+ { "there's no year in " cite$ * warning$
+ ", " }
+ { type$ "article" =
+ { bst.year.pre year * extra.label * bst.year.post * }
+ { bst.year.na.pre year * extra.label * bst.year.na.post * }
+ if$
+ }
+ if$
+}
+
+%%% page for book
+FUNCTION {format.book.pages}
+{ pages empty$
+ { "" }
+ { bst.pages.pre pages * bst.pages.post * }
+ if$
+}
+
+%%% Attach tie for the string with two or less characters.
+FUNCTION {tie.or.space.connect}
+{ duplicate$ text.length$ #3 <
+ { "~" }
+ { " " }
+ if$
+ swap$ * *
+}
+
+FUNCTION {either.or.check}
+{ empty$
+ 'pop$
+ { "can't use both " swap$ * " fields in " * cite$ * warning$ }
+ if$
+}
+
+%%% volume for book
+FUNCTION {format.bvolume}
+{ volume empty$
+ { "" }
+ { bst.volume.pre volume * bst.volume.post *
+ series empty$
+ 'skip$
+ %% If there is series field
+ { " of " * series * bst.series.post * }
+ if$
+% "volume and number" number either.or.check
+ }
+ if$
+}
+
+%%% series
+FUNCTION {output.series}
+{ series empty$
+ { "" }
+ { bst.series.pre series * bst.series.post * }
+ if$
+}
+
+%%% number and series
+FUNCTION {format.number.series}
+{ volume empty$
+ { number empty$
+ bst.hide.month #0 = not or
+ % number is empty
+ { series empty$
+ { "" }
+ % series is not empty.
+ { output.series }
+ if$
+ }
+ % number is not empty$
+ { series empty$
+ { bst.number.pre number * bst.number.post * }
+ % series is not empty.
+ { bst.in bst.series.pre * series * bst.series.post *
+ bst.number.pre * number * bst.number.post * }
+ if$
+ }
+ if$
+ }
+ { "" }
+ if$
+}
+
+%%% Number or not.
+FUNCTION {is.num}
+{ chr.to.int$
+ duplicate$ "0" chr.to.int$ < not
+ swap$ "9" chr.to.int$ > not and
+}
+
+FUNCTION {extract.num}
+{ duplicate$ 't :=
+ "" 's :=
+ { t empty$ not }
+ { t #1 #1 substring$
+ t #2 global.max$ substring$ 't :=
+ duplicate$ is.num
+ { s swap$ * 's := }
+ { pop$ "" 't := }
+ if$
+ }
+ while$
+ s empty$
+ 'skip$
+ { pop$ s }
+ if$
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% edition
+
+% Convert edition to 1st, 2nd, 3rd, 4th etc
+FUNCTION {eng.ord}
+{ duplicate$ "1" swap$ *
+ #-2 #1 substring$ "1" =
+ { bst.th * }
+ { duplicate$ #-1 #1 substring$
+ duplicate$ "1" =
+ { pop$ bst.st * }
+ { duplicate$ "2" =
+ { pop$ bst.nd * }
+ { "3" =
+ { bst.rd * }
+ { bst.th * }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+}
+
+% Convert first, second etc in edition field to 1st, 2nd (from jfm.bst)
+FUNCTION {convert.edition}
+{ edition extract.num "l" change.case$ 's :=
+ s "first" = s "1" = or
+ { bst.first }
+ { s "second" = s "2" = or
+ { bst.second }
+ { s "third" = s "3" = or
+ { bst.third }
+ { s "fourth" = s "4" = or
+ { bst.fourth }
+ { s "fifth" = s "5" = or
+ { bst.fifth }
+ { s #1 #1 substring$ is.num
+ { s eng.ord }
+ { edition }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+}
+
+%%% edition
+FUNCTION {format.edition}
+{ edition empty$
+ { "" }
+ { output.state mid.sentence =
+ { bst.edition.pre convert.edition "l" change.case$ * bst.edition.post * }
+ { bst.edition.pre convert.edition "t" change.case$ * bst.edition.post * }
+ if$
+ }
+ if$
+}
+
+%%% month
+FUNCTION {format.month}
+{ month empty$
+ bst.hide.month #0 = not or
+ { "" }
+ { bst.month.pre month * bst.month.post * }
+ if$
+}
+
+%%% year and month
+FUNCTION {format.date}
+{ format.month format.year *
+}
+
+%%% Is multiple pages like 1-100?
+FUNCTION { multi.page.check }
+{ 't :=
+ #0 'multiresult :=
+ { multiresult not
+ t empty$ not
+ and
+ }
+ { t #1 #1 substring$
+ duplicate$ "-" =
+ swap$ duplicate$ "," =
+ swap$ "+" =
+ or or
+ { #1 'multiresult := }
+ { t #2 global.max$ substring$ 't := }
+ if$
+ }
+ while$
+ multiresult
+}
+
+%%% pages
+FUNCTION {format.pages}
+{ pages empty$
+ { "" }
+ { pages multi.page.check
+ { bst.pages.pre pages n.dashify tie.or.space.connect * bst.pages.post }
+ { bst.page.pre pages tie.or.space.connect * bst.page.post }
+ if$
+ }
+ if$
+}
+
+%%% number
+FUNCTION {format.number}
+{ number empty$
+ bst.hide.number #0 = not or
+ { "" }
+ { bst.number.pre number * bst.number.post * }
+ if$
+}
+
+%%% volume
+FUNCTION {format.volume}
+{ volume empty$
+ 'skip$
+ { bst.volume.pre volume * bst.volume.post *
+ bst.year.position #3 =
+ { format.year * }
+ 'skip$
+ if$
+ }
+ if$
+}
+
+%%% number, page
+FUNCTION {format.number.pages}
+{ number empty$
+ { format.pages }
+ { format.number format.pages * }
+ if$
+}
+
+%%% volume, page
+FUNCTION {format.volume.pages}
+{ volume empty$
+ { format.pages }
+ { format.volume format.pages * }
+ if$
+}
+
+%%% volume, number, page
+FUNCTION {format.volume.number.pages}
+{ volume empty$
+ { number empty$
+ { format.pages }
+ { format.number format.pages * }
+ if$
+ }
+ { number empty$
+ { format.volume format.pages * }
+ { format.volume format.number * format.pages * }
+ if$
+ }
+ if$
+}
+
+% volume, number, page
+FUNCTION {format.vol.num.pages}
+{ volume empty$
+ %% volume is empty.
+ { number empty$
+ %% number is empty.
+ { pages empty$
+ % warning
+ { "there is no volume, number, and pages in " cite$ * warning$ "" }
+ { "" format.pages * }
+ if$
+ }
+ %% number is not empty.
+ % warning
+ { "there's a number but no volume in " cite$ * warning$
+ format.number.pages }
+ if$
+ }
+ %% volume is not empty.
+ { number empty$
+ %% number is empty.
+ { format.volume.pages }
+ %% number is not empty.
+ { format.volume.number.pages }
+ if$
+ }
+ if$
+}
+
+%%% chapter
+FUNCTION {format.chapter}
+{ chapter empty$
+ { "" }
+ { type empty$
+ { bst.chapter.pre chapter tie.or.space.connect * bst.chapter.post }
+ { ", " * type " " * chapter * }
+ if$
+ }
+ if$
+}
+
+%%% chapter, pages
+FUNCTION {format.chapter.pages}
+{ chapter empty$
+ { pages empty$
+ { "" }
+ { "" format.pages * }
+ if$
+ }
+ { pages empty$
+ { "" format.chapter * }
+ { "" format.chapter * format.pages * }
+ if$
+ }
+ if$
+}
+
+%%% editor and booktitle
+FUNCTION {format.in.ed.booktitle}
+{ booktitle empty$
+ { "" }
+ { editor empty$
+ { bst.in format.btitle * }
+ { bst.editor.btitle.order #0 =
+ { bst.in format.editors.x * " " * format.btitle * }
+ { bst.in format.btitle * " " * format.editors.x * }
+ if$
+ }
+ if$
+ }
+ if$
+}
+
+%%% howpublished
+FUNCTION {format.howpublished}
+{ howpublished empty$
+ { "" }
+ { bst.howpublished.pre howpublished * bst.howpublished.post * }
+ if$
+}
+
+%%% address
+FUNCTION {format.address}
+{ address empty$
+ { "" }
+ { bst.address.pre address * bst.address.post * }
+ if$
+}
+
+%%% publisher
+FUNCTION {format.publisher}
+{ publisher empty$
+ { "" }
+ { bst.publisher.pre publisher * bst.publisher.post * }
+ if$
+}
+
+%%% organization
+FUNCTION {format.organization}
+{ organization empty$
+ { "" }
+ { bst.organization.pre organization * bst.organization.post * }
+ if$
+}
+
+%% publisher and address
+FUNCTION {output.publisher.address}
+{ address empty$
+ { format.publisher "publisher" output.check.nocomma }
+ { bst.address.position #0 =
+ { format.address output.nocomma
+ format.publisher "publisher" output.check.nocomma }
+ { format.publisher "publisher" output.check.nocomma
+ format.address output.nocomma }
+ if$
+ }
+ if$
+}
+
+%% address, organization, publisher
+FUNCTION {output.address.organization.publisher}
+{ address empty$
+ %% address is empty
+ { organization empty$
+ %% organization is empty
+ { publisher empty$
+ 'skip$
+ { format.publisher "publisher" output.check.nocomma }
+ if$
+ }
+ %% organization is not empty
+ { publisher empty$
+ { format.organization "organization" output.check.nocomma }
+ { format.organization "organization" output.check.nocomma
+ format.publisher "publisher" output.check.nocomma }
+ if$
+ }
+ if$
+ }
+ %% address is not empty
+ { organization empty$
+ %% organization is empty
+ { publisher empty$
+ %% publisher is empty
+ { format.address output.nocomma }
+ %% publisher is not empty
+ { bst.address.position #0 =
+ { format.address output.nocomma
+ format.publisher "publisher" output.check.nocomma }
+ { format.publisher "publisher" output.check.nocomma
+ format.address output.nocomma }
+ if$
+ }
+ if$
+ }
+ %% organization is not empty
+ { publisher empty$
+ %% publisher is empty
+ { format.organization "organization" output.check.nocomma
+ format.address output.nocomma }
+ %% publisher is not empty
+ { format.organization "organization" output.check.nocomma
+ bst.address.position #0 =
+ { format.address output.nocomma
+ format.publisher "publisher" output.check.nocomma }
+ { format.publisher "publisher" output.check.nocomma
+ format.address output.nocomma }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+}
+
+%%% misc
+FUNCTION {empty.misc.check}
+{ author empty$ title empty$ howpublished empty$
+ month empty$ year empty$ note empty$
+ and and and and and
+ key empty$ not and
+ { "all relevant fields are empty in " cite$ * warning$ }
+ 'skip$
+ if$
+}
+
+FUNCTION {format.thesis.type}
+{ type empty$
+ 'skip$
+ { pop$ " " type * }
+ if$
+}
+
+FUNCTION {format.tr.number}
+{ type empty$
+ { "Technical Report" }
+ { " " type * }
+ if$
+ number empty$
+ { "t" change.case$ }
+ { number tie.or.space.connect }
+ if$
+}
+
+%%% phdthesis
+FUNCTION {format.phd}
+{ bst.phdthesis }
+
+%%% mastersthesis
+FUNCTION {format.mthesis}
+{ bst.mthesis }
+
+%%% school
+FUNCTION {format.school}
+{ school empty$
+ { "" }
+ { bst.school.pre school * bst.school.post * }
+ if$
+}
+
+%%% institution
+FUNCTION {format.institution}
+{ institution empty$
+ { "" }
+ { bst.institution.pre institution * bst.institution.post * }
+ if$
+}
+
+%%% remove first ? characters.
+FUNCTION {chop.word}
+{ 's :=
+ 'len :=
+ s #1 len substring$ =
+ { s len #1 + global.max$ substring$ }
+ 's
+ if$
+}
+
+FUNCTION {format.note}
+{ note empty$
+ { "" }
+ { bst.note.pre note * bst.note.post * }
+ if$
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% \havarditem
+
+FUNCTION {output.bibitem}
+{ newline$
+ "\harvarditem[" write$
+ alabel write$ % alabel <- abbreviated citation
+ "]{" write$
+ flabel write$ % flabel <- full citation
+ "}{" write$
+ cyear write$
+ % cyear = year
+ "}{" write$
+ cite$ write$ % cite$ -> pusch keyword
+ "}" write$
+ % If number index is on
+ bst.use.number.index #0 =
+ 'skip$
+ { index #1 + 'index :=
+ "" 'preone :=
+ "" 'preten :=
+ bst.number.index.digit "1" =
+ 'skip$
+ { bst.number.index.digit "2" =
+ { "\hskip0.5em" 'preone := }
+ { bst.number.index.digit "3" =
+ { "\hskip1em" 'preone :=
+ "\hskip0.5em" 'preten := }
+ 'skip$
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+ newline$
+ before.all 'output.state :=
+ ""
+ % number index
+ bst.use.number.index #0 =
+ 'skip$
+ { index #10 <
+ % Insert spaces according to digit of number index.
+ { preone }
+ { index #100 <
+ { preten }
+ { "" }
+ if$
+ }
+ if$
+ bst.number.index.pre * index int.to.str$ * bst.number.index.post * write$
+ }
+ if$
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% article
+
+FUNCTION {article}
+{ output.bibitem
+ format.authors "author" output.check.nocomma
+ bst.year.position #0 =
+ { format.year "year" output.check.nocomma }
+ 'skip$
+ if$
+ format.title "title" output.check.nocomma
+
+ format.journal "journal" output.check.nocomma
+ bst.year.position #2 =
+ { format.date output.nocomma }
+ 'skip$
+ if$
+ format.vol.num.pages output.nocomma
+
+ bst.year.position #1 =
+ { format.date output.nocomma }
+ 'skip$
+ if$
+
+ format.url.doi output.nocomma
+
+ format.note output.nocomma
+ fin.entry
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% book
+
+FUNCTION {book}
+{ output.bibitem
+ author empty$
+ { format.editors "author and editor" output.check.nocomma }
+ { format.authors output.nonnull.nocomma
+ "author and editor" editor either.or.check
+ }
+ if$
+ bst.year.position #0 =
+ { format.year "year" output.check.nocomma }
+ 'skip$
+ if$
+ format.book "title" output.check.nocomma
+
+ format.bvolume output.nocomma
+ format.number.series output.nocomma
+ output.publisher.address
+
+ format.edition output.nocomma
+ format.book.pages output.nocomma
+
+ bst.year.position #0 = not
+ { format.year "year" output.check.nocomma }
+ 'skip$
+ if$
+
+ format.url.doi output.nocomma
+
+ format.note output.nocomma
+ fin.entry
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% booklet
+
+FUNCTION {booklet}
+{ output.bibitem
+ format.authors output.nocomma
+ format.year output.nocomma
+ format.misc.title "title" output.check.nocomma
+ format.howpublished output.nocomma
+ format.address output.nocomma
+
+ format.url.doi output.nocomma
+
+ format.note output.nocomma
+ fin.entry
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% inbook
+
+FUNCTION {inbook}
+{ output.bibitem
+ author empty$
+ { format.editors "author and editor" output.check.nocomma }
+ { format.authors output.nonnull.nocomma
+ "author and editor" editor either.or.check
+ }
+ if$
+ bst.year.position #0 =
+ { format.year "year" output.check.nocomma }
+ 'skip$
+ if$
+% format.book remove.pre.comma "title" output.check.nocomma
+ format.book "title" output.check.nocomma
+ format.edition output.nocomma
+
+ format.bvolume output.nocomma
+ format.chapter.pages "chapter and pages" output.check.nocomma
+ format.number.series output.nocomma
+ output.publisher.address
+
+ bst.year.position #0 = not
+ { format.year "year" output.check.nocomma }
+ 'skip$
+ if$
+
+ format.url.doi output.nocomma
+
+ format.note output.nocomma
+ fin.entry
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% incollection
+
+FUNCTION {incollection}
+{ output.bibitem
+ format.authors "author" output.check.nocomma
+ bst.year.position #0 =
+ { format.year "year" output.check.nocomma }
+ 'skip$
+ if$
+ format.title "title" output.check.nocomma
+
+ format.in.ed.booktitle "booktitle" output.check.nocomma
+ format.bvolume output.nocomma
+ output.address.organization.publisher
+ format.edition output.nocomma
+ format.chapter.pages output.nocomma
+
+ bst.year.position #0 = not
+ { format.year "year" output.check.nocomma }
+ 'skip$
+ if$
+
+ format.url.doi output.nocomma
+
+ format.note output.nocomma
+ fin.entry
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% inproceedings
+
+FUNCTION {inproceedings}
+{ output.bibitem
+ format.authors "author" output.check.nocomma
+ bst.year.position #0 =
+ { format.year "year" output.check.nocomma }
+ 'skip$
+ if$
+ format.title "title" output.check.nocomma
+
+ format.in.ed.booktitle "booktitle" output.check.nocomma
+ format.bvolume output.nocomma
+ format.number.series output.nocomma
+ format.pages output.nocomma
+ output.address.organization.publisher
+
+ bst.year.position #0 = not
+ { format.date output.nocomma }
+ { format.month output.nocomma }
+ if$
+
+ format.url.doi output.nocomma
+
+ format.note output.nocomma
+ fin.entry
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% conference
+
+FUNCTION {conference}
+{ inproceedings }
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% manual
+FUNCTION {manual}
+{ output.bibitem
+ author empty$
+ { organization empty$
+ 'skip$
+ { organization output.nonnull.nocomma
+ address output.nocomma
+ }
+ if$
+ }
+ { format.authors output.nonnull.nocomma }
+ if$
+ bst.year.position #0 =
+ { format.year "year" output.check.nocomma }
+ 'skip$
+ if$
+ format.book "title" output.check.nocomma
+ author empty$
+ { organization empty$
+ { format.address new.block.check
+ format.address output.nocomma
+ }
+ 'skip$
+ if$
+ }
+ { output.address.organization.publisher }
+ if$
+ format.edition output.nocomma
+
+ bst.year.position #0 = not
+ { format.year "year" output.check.nocomma }
+ 'skip$
+ if$
+
+ format.url.doi output.nocomma
+
+ format.note output.nocomma
+ fin.entry
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% mastersthesis
+
+FUNCTION {mastersthesis}
+{ output.bibitem
+ format.authors "author" output.check.nocomma
+ bst.year.position #0 =
+ { format.year "year" output.check.nocomma }
+ 'skip$
+ if$
+ format.title "title" output.check.nocomma
+ format.mthesis format.thesis.type output.nonnull.nocomma
+ format.school "school" output.check.nocomma
+ format.address output.nocomma
+
+ bst.year.position #0 = not
+ { format.year "year" output.check.nocomma }
+ 'skip$
+ if$
+
+ format.url.doi output.nocomma
+
+ format.note output.nocomma
+ fin.entry
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% misc
+
+FUNCTION {misc}
+{ output.bibitem
+ format.authors "author" output.check.nocomma
+ bst.year.position #0 =
+ { format.year "year" output.check.nocomma }
+ 'skip$
+ if$
+ format.misc.title output.nocomma
+ format.howpublished output.nocomma
+
+ bst.year.position #0 = not
+ { format.date output.nocomma }
+ { format.month output.nocomma }
+ if$
+
+ format.url.doi output.nocomma
+
+ format.note output.nocomma
+ fin.entry
+ empty.misc.check
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% Online
+
+FUNCTION {online}
+{ output.bibitem
+ format.authors "author" output.check.nocomma
+ bst.year.position #0 =
+ { format.year "year" output.check.nocomma }
+ 'skip$
+ if$
+ format.misc.title output.nocomma
+ format.howpublished output.nocomma
+
+ bst.year.position #0 = not
+ { format.date output.nocomma }
+ { format.month output.nocomma }
+ if$
+
+ format.url.doi output.nocomma
+
+ format.note output.nocomma
+ fin.entry
+ empty.misc.check
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% phdthesis
+
+FUNCTION {phdthesis}
+{ output.bibitem
+ format.authors "author" output.check.nocomma
+ bst.year.position #0 =
+ { format.year "year" output.check.nocomma }
+ 'skip$
+ if$
+ format.book "title" output.check.nocomma
+ format.phd
+ format.thesis.type output.nonnull.nocomma
+ format.school "school" output.check.nocomma
+ address empty$
+ 'skip$
+ { format.address output.nocomma }
+ if$
+
+ bst.year.position #0 = not
+ { format.year "year" output.check.nocomma }
+ 'skip$
+ if$
+
+ format.url.doi output.nocomma
+
+ format.note output.nocomma
+ fin.entry
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% proceedings
+
+FUNCTION {proceedings}
+{ output.bibitem
+ editor empty$
+ { organization output.nocomma }
+ { format.editors output.nonnull.nocomma }
+ if$
+ bst.year.position #0 =
+ { format.year "year" output.check.nocomma }
+ 'skip$
+ if$
+ format.btitle remove.pre.comma "title" output.check.nocomma
+ format.bvolume output.nocomma
+ format.number.series output.nocomma
+ output.address.organization.publisher
+
+ bst.year.position #0 = not
+ { format.year "year" output.check.nocomma }
+ 'skip$
+ if$
+
+ format.url.doi output.nocomma
+
+ format.note output.nocomma
+ fin.entry
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% techreport
+
+FUNCTION {techreport}
+{ output.bibitem
+ format.authors "author" output.check.nocomma
+ bst.year.position #0 =
+ { format.year "year" output.check.nocomma }
+ 'skip$
+ if$
+ format.title "title" output.check.nocomma
+ format.tr.number output.nonnull.nocomma
+ format.institution "institution" output.check.nocomma
+ format.address output.nocomma
+
+ bst.year.position #0 = not
+ { format.year "year" output.check.nocomma }
+ 'skip$
+ if$
+
+ format.note output.nocomma
+ fin.entry
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% unpublished
+
+FUNCTION {unpublished}
+{ output.bibitem
+ format.authors "author" output.check.nocomma
+ bst.year.position #0 =
+ { format.year "year" output.check.nocomma }
+ 'skip$
+ if$
+ format.title "title" output.check.nocomma
+
+ bst.year.position #0 = not
+ { format.date remove.pre.comma output.nocomma }
+ { month empty$
+ 'skip$
+ { format.month remove.pre.comma output.nocomma }
+ if$
+ }
+ if$
+
+ format.url.doi output.nocomma
+
+ format.note "note" output.check.nocomma
+ fin.entry
+}
+
+FUNCTION {default.type}
+{ misc }
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% Alias for month names:
+
+MACRO {jan} {"January"}
+MACRO {feb} {"February"}
+MACRO {mar} {"March"}
+MACRO {apr} {"April"}
+MACRO {may} {"May"}
+MACRO {jun} {"June"}
+MACRO {jul} {"July"}
+MACRO {aug} {"August"}
+MACRO {sep} {"September"}
+MACRO {oct} {"October"}
+MACRO {nov} {"November"}
+MACRO {dec} {"December"}
+
+%%% Read entries:
+READ
+
+%%% Variable for remembering the order of citation.
+INTEGERS { order.num }
+FUNCTION {initialize.order.num}
+{
+ #1 'order.num :=
+}
+%%% Initialize a variables
+EXECUTE {initialize.order.num}
+
+%%% Variable for remembering the order of citation.
+FUNCTION {set.order.cited}
+{
+ order.num 'order.cited :=
+ #1 order.num + 'order.num :=
+}
+%%% Iterate for all entries:
+ITERATE {set.order.cited}
+
+%%% check the value of nameorder field.
+FUNCTION {set.nameorder}
+{ nameorder empty$
+ { "" 'nameorder.temp := }
+ { nameorder 'nameorder.temp := }
+ if$
+}
+%%% Iterate for all entries:
+ITERATE {set.nameorder}
+
+%%% Remove symbols and convert to lowercase.
+FUNCTION {sortify}
+{ purify$ "l" change.case$ }
+
+%%% names for sorting
+FUNCTION {sort.format.names}
+{ 's :=
+ #1 'nameptr :=
+ ""
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ { nameptr #1 >
+ { ", " * }
+ 'skip$
+ if$
+ s nameptr "{ll}{ f}{ j}" format.name$ 't :=
+ nameptr numnames = t "others" = and
+ { bst.and.others.output *}
+ { t sortify * }
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+}
+
+FUNCTION {sort.format.names.abb}
+{ 's :=
+ s num.names$ 'numnames :=
+ numnames bst.and.others.num <
+ { s sort.format.names }
+ { s #1 "{ll}{ f}{ j}" format.name$ " zz " * }
+ if$
+}
+
+%%% Label for full author name.
+FUNCTION {format.lab.names.full}
+{ 's :=
+ #1 'nameptr :=
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ { s nameptr "{vv~}{ll}" format.name$ 't :=
+ nameptr #1 >
+ { namesleft #1 >
+ { nameorder.temp "random" = bst.use.nameorder #0 = not and
+ { bst.and.nameorder * t * }
+ { ", " * t * }
+ if$
+ }
+ { t "others" =
+ { bst.and.others.output * }
+ { numnames #2 >
+ { nameorder.temp "random" = bst.use.nameorder #0 = not and
+ { bst.cite.and.nameorder * t * }
+ { bst.cite.ands * t * }
+ if$
+ }
+ { nameorder.temp "random" = bst.use.nameorder #0 = not and
+ { bst.cite.and.nameorder * t * }
+ { bst.cite.and * t * }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ 't
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+ numnames #1 > #1 #2 = and {", eds" *} {} if$
+ numnames #1 = #1 #2 = and {", ed" *} {} if$
+}
+
+%%% laberl for abbreviated author name.
+FUNCTION {format.lab.names.abb}
+{ 's :=
+ s num.names$ 'numnames :=
+ numnames bst.and.others.num <
+ % if the number of authors is less than bst.and.others.num, full name.
+ { s format.lab.names.full }
+ % if the number of authors is equal or more than bst.and.others.num, abbreviated name.
+ { s #1 "{ll}" format.name$ bst.and.others.output * }
+ if$
+}
+
+%%% abbreviated author
+FUNCTION {author.key.label.abb}
+{ author empty$
+ { key empty$
+ { cite$ #1 #3 substring$ }
+ { key #3 text.prefix$ }
+ if$
+ }
+ { author format.lab.names.abb }
+ if$
+}
+
+%%% full author
+FUNCTION {author.key.label.full}
+{ author empty$
+ { key empty$
+ { cite$ #1 #3 substring$ }
+ { key #3 text.prefix$ }
+ if$
+ }
+ { author format.lab.names.full }
+ if$
+}
+
+FUNCTION {format.names.full.wo.and}
+{ 's :=
+ #1 'nameptr :=
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ { s nameptr "{ll}{, ff}{, jj}" format.name$ 't :=
+ nameptr #1 >
+ { namesleft #1 >
+ { " " * t * }
+ { t "others" =
+ { " " * }
+ { numnames #2 >
+ { " " * t * }
+ { " " * t * }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ 't
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+}
+
+FUNCTION {author.key.full.wo.and}
+{ author empty$
+ { key empty$
+ { cite$ #1 #3 substring$ }
+ { key #3 text.prefix$ }
+ if$
+ }
+ { author format.names.full.wo.and }
+ if$
+}
+
+FUNCTION {author.editor.key.full.wo.and}
+{ author empty$
+ { editor empty$
+ { key empty$
+ { cite$ #1 #3 substring$ }
+ { key #3 text.prefix$ }
+ if$
+ }
+ { editor format.names.full.wo.and }
+ if$
+ }
+ { author format.names.full.wo.and }
+ if$
+}
+
+FUNCTION {editor.key.organization.key.full.wo.and}
+{ editor empty$
+ { key empty$
+ { organization empty$
+ { cite$ #1 #3 substring$ }
+ { "The " #4 organization chop.word #3 text.prefix$ }
+ if$
+ }
+ { key #3 text.prefix$ }
+ if$
+ }
+ { editor format.names.full.wo.and }
+ if$
+}
+
+FUNCTION {author.key.organization.key.full.wo.and}
+{ author empty$
+ { key empty$
+ { organization empty$
+ { cite$ #1 #3 substring$ }
+ { "The " #4 organization chop.word #3 text.prefix$ }
+ if$
+ }
+ { key #3 text.prefix$ }
+ if$
+ }
+ { author format.names.full.wo.and }
+ if$
+}
+
+%%% abbreviated author
+FUNCTION {author.editor.key.label.abb}
+{ author empty$
+ { editor empty$
+ { key empty$
+ { cite$ #1 #3 substring$ }
+ { key #3 text.prefix$ }
+ if$
+ }
+ { editor format.lab.names.abb }
+ if$
+ }
+ { author format.lab.names.abb }
+ if$
+}
+
+%%% full author
+FUNCTION {author.editor.key.label.full}
+{ author empty$
+ { editor empty$
+ { key empty$
+ { cite$ #1 #3 substring$ }
+ { key #3 text.prefix$ }
+ if$
+ }
+ { editor format.lab.names.full }
+ if$
+ }
+ { author format.lab.names.full }
+ if$
+}
+
+FUNCTION {author.key.organization.label.full}
+{ author empty$
+ { key empty$
+ { organization empty$
+ { cite$ #1 #3 substring$ }
+ { "The " #4 organization chop.word #3 text.prefix$ }
+ if$
+ }
+ { key #3 text.prefix$ }
+ if$
+ }
+ { author format.lab.names.full }
+ if$
+}
+
+FUNCTION {author.key.organization.label.abb}
+{ author empty$
+ { key empty$
+ { organization empty$
+ { cite$ #1 #3 substring$ }
+ { "The " #4 organization chop.word #3 text.prefix$ }
+ if$
+ }
+ { key #3 text.prefix$ }
+ if$
+ }
+ { author format.lab.names.abb }
+ if$
+}
+
+FUNCTION {editor.key.organization.label.full}
+{ editor empty$
+ { key empty$
+ { organization empty$
+ { cite$ #1 #3 substring$ }
+ { "The " #4 organization chop.word #3 text.prefix$ }
+ if$
+ }
+ { key #3 text.prefix$ }
+ if$
+ }
+ { editor format.lab.names.full }
+ if$
+}
+
+FUNCTION {editor.key.organization.label.abb}
+{ editor empty$
+ { key empty$
+ { organization empty$
+ { cite$ #1 #3 substring$ }
+ { "The " #4 organization chop.word #3 text.prefix$ }
+ if$
+ }
+ { key #3 text.prefix$ }
+ if$
+ }
+ { editor format.lab.names.abb }
+ if$
+}
+
+%%% Convert numbers: 0->9, 1->8, 2->7,..., 9->0
+FUNCTION {reverse.num}
+{ 's :=
+ s "1" =
+ { "8" 'year.num := }
+ { s "2" =
+ { "7" 'year.num := }
+ { s "3" =
+ { "6" 'year.num := }
+ { s "4" =
+ { "5" 'year.num := }
+ { s "5" =
+ { "4" 'year.num := }
+ { s "6" =
+ { "3" 'year.num := }
+ { s "7" =
+ { "2" 'year.num := }
+ { s "8" =
+ { "1" 'year.num := }
+ { s "9" =
+ { "0" 'year.num := }
+ { s "0" =
+ { "9" 'year.num := }
+ { "9" 'year.num := }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+ year.num
+}
+
+%%% Convert year (large number -> small number)
+FUNCTION {convert.year}
+{ 't :=
+ bst.reverse.year #0 =
+ { t 'tt := }
+ { t #1 #1 substring$ reverse.num
+ t #2 #1 substring$ reverse.num *
+ t #3 #1 substring$ reverse.num *
+ t #4 #1 substring$ reverse.num * 'tt := }
+ if$
+ tt
+}
+
+%%% cyear
+FUNCTION {calc.cyear}
+{ type$ "book" =
+ type$ "inbook" =
+ or
+ 'author.editor.key.full.wo.and
+ { type$ "proceedings" =
+ 'editor.key.organization.key.full.wo.and
+ { type$ "manual" =
+ 'author.key.organization.key.full.wo.and
+ 'author.key.full.wo.and
+ if$
+ }
+ if$
+ }
+ if$
+ duplicate$
+ year empty$
+ { "2199" 'cyear := }
+ { year 'cyear := }
+ if$
+ year empty$
+ { " " "2199" convert.year * field.or.null * }
+ { " " year convert.year * field.or.null * }
+ if$
+ sortify 'sort.label :=
+ % For debug
+ econ.debug #0 = not
+ { "sort.label = ``\texttt{" write$
+ sort.label write$
+ "}''\\" write$
+ newline$
+ }
+ 'skip$
+ if$
+ pop$
+}
+
+FUNCTION {calc.sort.label.abb}
+{ author empty$
+ { editor empty$
+ { "" }
+ { editor 's := }
+ if$
+ }
+ { author 's := }
+ if$
+ s sort.format.names.abb 't :=
+ year empty$
+ { t sortify " " * "2199" convert.year * 'sort.label.abb := }
+ { t sortify " " * year convert.year * 'sort.label.abb := }
+ if$
+ econ.debug #0 = not
+ { "sort.label.abb = ``\texttt{" write$
+ sort.label.abb write$
+ "}''\\" write$
+ newline$
+ }
+ 'skip$
+ if$
+}
+
+%%% flabel
+FUNCTION {calc.flabel}
+{ type$ "book" =
+ type$ "inbook" =
+ or
+ 'author.editor.key.label.full
+ { type$ "proceedings" =
+ 'editor.key.organization.label.full
+ { type$ "manual" =
+ 'author.key.organization.label.full
+ 'author.key.label.full
+ if$
+ }
+ if$
+ }
+ if$
+ 'flabel :=
+ % For debug
+ econ.debug #0 = not
+ { "flabel = ``\texttt{" write$
+ flabel write$
+ "}''\\" write$
+ newline$
+ }
+ 'skip$
+ if$
+}
+
+%%% alabel
+FUNCTION {calc.alabel}
+{ type$ "book" =
+ type$ "inbook" =
+ or
+ 'author.editor.key.label.abb
+ { type$ "proceedings" =
+ 'editor.key.organization.label.abb
+ { type$ "manual" =
+ 'author.key.organization.label.abb
+ 'author.key.label.abb
+ if$
+ }
+ if$
+ }
+ if$
+ 'alabel :=
+ % For debug
+ econ.debug #0 = not
+ { "alabel = ``\texttt{" write$
+ alabel write$
+ "}''\\" write$
+ newline$
+ }
+ 'skip$
+ if$
+}
+
+%%% title for sorting
+FUNCTION {sort.format.title}
+{ 't :=
+ "A " #2
+ "An " #3
+ "The " #4 t chop.word
+ chop.word
+ chop.word
+ sortify
+ #1 global.max$ substring$
+}
+
+%%% author for sorting
+FUNCTION {author.sort}
+{ author empty$
+ { key empty$
+ { "to sort, need author or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { author sort.format.names }
+ if$
+}
+
+%%% editor for sorting
+FUNCTION {author.editor.sort}
+{ author empty$
+ { editor empty$
+ { key empty$
+ { "to sort, need author, editor, or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { editor sort.format.names }
+ if$
+ }
+ { author sort.format.names }
+ if$
+}
+
+FUNCTION {author.organization.sort}
+{ author empty$
+ { organization empty$
+ { key empty$
+ { "to sort, need author, organization, or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { "The " #4 organization chop.word sortify }
+ if$
+ }
+ { author sort.format.names }
+ if$
+}
+
+FUNCTION {editor.organization.sort}
+{ editor empty$
+ { organization empty$
+ { key empty$
+ { "to sort, need editor, organization, or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { "The " #4 organization chop.word sortify }
+ if$
+ }
+ { editor sort.format.names }
+ if$
+}
+
+%%% 1,...,9 -> 001,...,009
+%%% 10,...,99 -> 010,...,099
+FUNCTION {add.zero.to.number}
+{ 's :=
+ s text.length$ #1 =
+ { "00" s * }
+ { s text.length$ #2 =
+ { "0" s * }
+ { s }
+ if$
+ }
+ if$
+}
+
+%% entry type
+FUNCTION {bst.sort.entry.type.order}
+{ 'item.type :=
+ item.type "article" =
+ { "01" }
+ { item.type "book" =
+ { "02" }
+ { item.type "booklet" =
+ { "03" }
+ { item.type "comment" =
+ { "04" }
+ { item.type "conference" =
+ { "05" }
+ { item.type "inbook" =
+ { "06" }
+ { item.type "incollection" =
+ { "07" }
+ { item.type "inproceedings" =
+ { "08" }
+ { item.type "manual" =
+ { "09" }
+ { item.type "masterthesis" =
+ { "10" }
+ { item.type "misc" =
+ { "11" }
+ { item.type "phdthesis" =
+ { "12" }
+ { item.type "proceedings" =
+ { "13" }
+ { item.type "techreport" =
+ { "14" }
+ { item.type "unpublished" =
+ { "15" }
+ { "16" }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+}
+
+%%% Create sort.key$: absorder -> author -> year -> order -> month -> title.
+FUNCTION {presort.one}
+{
+ bst.no.sort #0 = not
+ { order.cited int.to.str$ add.zero.to.number " " * }
+ { "" }
+ if$
+ bst.sort.year #0 = not
+ %% Use year field as the primary sorting key.
+ { year convert.year * }
+ 'skip$
+ if$
+ bst.sort.entry.type #0 = not
+ { type$ bst.sort.entry.type.order * " " * }
+ 'skip$
+ if$
+ absorder empty$
+ { "/// " * }
+ { bst.notuse.absorder.field #0 =
+ { absorder "999" =
+ { "zzz " * }
+ { absorder add.zero.to.number "000" =
+ { "/// " * }
+ { absorder add.zero.to.number * " " * }
+ if$
+ }
+ if$
+ }
+ { "/// " * }
+ if$
+ }
+ if$
+ " " *
+ sort.label.abb *
+ " " *
+ type$ "book" = type$ "inbook" = or
+ 'author.editor.sort
+ { type$ "proceedings" =
+ 'editor.organization.sort
+ { type$ "manual" =
+ 'author.organization.sort
+ 'author.sort
+ if$
+ }
+ if$
+ }
+ if$
+ * " " *
+ " "
+ order empty$
+ { "/// " * }
+ { bst.notuse.order.field #0 =
+ { order "999" =
+ { "zzz " * }
+ { order add.zero.to.number "000" =
+ { "/// " * }
+ { order add.zero.to.number * " " * }
+ if$
+ }
+ if$
+ }
+ { "/// " * }
+ if$
+ }
+ if$
+ month empty$
+ { * "/// " * }
+ { month "999" =
+ { * month add.zero.to.number * "zzz " * }
+ { month add.zero.to.number "000" =
+ { * month add.zero.to.number * "/// " * }
+ { * month add.zero.to.number * " " * }
+ if$
+ }
+ if$
+ }
+ if$
+ title field.or.null sort.format.title
+ *
+ #1 entry.max$ substring$
+ 'sort.key$ :=
+ % For debug
+ econ.debug #0 = not
+ { "``\texttt{" write$
+ sort.key$ write$
+ "}''\\" write$
+ newline$
+ }
+ 'skip$
+ if$
+}
+
+FUNCTION {presort.two}
+{
+ bst.no.sort #0 = not
+ { order.cited int.to.str$ add.zero.to.number " " * }
+ { "" }
+ if$
+ bst.sort.year #0 = not
+ %% Use year field as the primary sorting key.
+ { year convert.year * }
+ 'skip$
+ if$
+ bst.sort.entry.type #0 = not
+ { type$ bst.sort.entry.type.order * " " * }
+ 'skip$
+ if$
+ absorder empty$
+ { "/// " * }
+ { bst.notuse.absorder.field #0 =
+ { absorder "999" =
+ { "zzz " * }
+ { absorder add.zero.to.number "000" =
+ { "/// " * }
+ { absorder add.zero.to.number * " " * }
+ if$
+ }
+ if$
+ }
+ { "/// " * }
+ if$
+ }
+ if$
+ " " * sort.label * " "
+ order empty$
+ { "/// " * }
+ { bst.notuse.order.field #0 =
+ { order "999" =
+ { "zzz " * }
+ { order add.zero.to.number "000" =
+ { "/// " * }
+ { order add.zero.to.number * " " * }
+ if$
+ }
+ if$
+ }
+ { "/// " * }
+ if$
+ }
+ if$
+ month empty$
+ { * "/// " * }
+ { month "999" =
+ { * month add.zero.to.number * "zzz " * }
+ { month add.zero.to.number "000" =
+ { * month add.zero.to.number * "/// " * }
+ { * month add.zero.to.number * " " * }
+ if$
+ }
+ if$
+ }
+ if$
+ title field.or.null sort.format.title
+ *
+ #1 entry.max$ substring$
+ 'sort.key$ :=
+ % For debug
+ econ.debug #0 = not
+ { "``\texttt{" write$
+ sort.key$ write$
+ "}''\\" write$
+ newline$
+ }
+ 'skip$
+ if$
+}
+
+%%% Codes for debugging
+FUNCTION {calc.alabel.mess}
+{ econ.debug #0 = not
+ { "\textbf{Iteration of calc.alabel: alabel = }\\" write$
+ newline$ }
+ 'skip$
+ if$
+}
+FUNCTION {calc.flabel.mess}
+{ econ.debug #0 = not
+ { "\textbf{Iteration of calc.flabel: flabel = }\\" write$
+ newline$ }
+ 'skip$
+ if$
+}
+FUNCTION {presort.one.mess}
+{ econ.debug #0 = not
+ { "\textbf{Iteration of presort (1st time): \$sort.key = }\\" write$
+ newline$ }
+ 'skip$
+ if$
+}
+
+FUNCTION {presort.two.mess}
+{ econ.debug #0 = not
+ { "\textbf{Iteration of presort (2nd time): \$sort.key = }\\" write$
+ newline$ }
+ 'skip$
+ if$
+}
+
+FUNCTION {calc.cyear.mess}
+{ econ.debug #0 = not
+ { "\textbf{Iteration of calc.cyear: sort.label = }\\" write$
+ newline$ }
+ 'skip$
+ if$
+}
+
+FUNCTION {calc.sort.label.abb.mess}
+{ econ.debug #0 = not
+ { "\textbf{Iteration of calc.sort.label.abb: sort.label.abb = }\\" write$
+ newline$ }
+ 'skip$
+ if$
+}
+
+%%% alabel
+EXECUTE {calc.alabel.mess}
+ITERATE {calc.alabel}
+
+%%% flabel
+EXECUTE {calc.flabel.mess}
+ITERATE {calc.flabel}
+
+%%% cyear and sort.label
+EXECUTE {calc.cyear.mess}
+ITERATE {calc.cyear}
+
+%%%
+EXECUTE {calc.sort.label.abb.mess}
+ITERATE {calc.sort.label.abb}
+
+%%% Sorting by $sort.key (first time)
+%
+% Sorting is done in two times. This is the first time.
+%
+EXECUTE {presort.one.mess}
+ITERATE {presort.one}
+SORT
+
+FUNCTION {forward.pass}
+{ bst.use.bysame #0 = bst.use.bysame #2 = or
+ % Not use \bysame
+ { last.sort.label sort.label.abb =
+ { last.extra.num #1 + 'last.extra.num :=
+ last.extra.num int.to.chr$ 'extra.label :=
+ }
+ { "a" chr.to.int$ 'last.extra.num :=
+ "" 'extra.label :=
+ sort.label.abb 'last.sort.label :=
+ }
+ if$
+ }
+ % Use \bysame
+ { last.sort.label sort.label.abb =
+ { last.extra.num #1 + 'last.extra.num :=
+ last.extra.num int.to.chr$ 'extra.label :=
+ }
+ { "a" chr.to.int$ 'last.extra.num :=
+ "" 'extra.label :=
+ sort.label.abb 'last.sort.label :=
+ }
+ if$
+ author empty$
+ { editor empty$
+ { "" }
+ 'format.editors.alt
+ if$
+ }
+ 'format.authors.alt
+ if$
+ 'this.author :=
+ % format.names 'this.author :=
+ this.author prev.author =
+ { "bysame" 'extra.label.bysame := }
+ { this.author "" =
+ { "abcxyz" }
+ 'this.author
+ if$
+ 'prev.author :=
+ }
+ if$
+ }
+ if$
+}
+
+FUNCTION {reverse.pass}
+{ next.extra "b" =
+ { "a" 'extra.label := }
+ 'skip$
+ if$
+ extra.label empty$ not
+ { cyear extra.label * }
+ { cyear "" * }
+ if$
+ "" field.or.null *
+ 'cyear :=
+ extra.label 'next.extra :=
+}
+
+%%% \bysame
+ITERATE {forward.pass}
+
+REVERSE {reverse.pass}
+
+%%% Sorting by sort.key$ (second time)
+EXECUTE {presort.two.mess}
+ITERATE {presort.two}
+SORT
+
+FUNCTION {reset.prev.author}
+{ "xxyyzz" 'prev.author := }
+
+EXECUTE {reset.prev.author}
+
+FUNCTION {forward.pass.two}
+{ bst.use.bysame #1 =
+ { author empty$
+ { editor empty$
+ { "" }
+ 'format.editors.alt
+ if$
+ }
+ 'format.authors.alt
+ if$
+ 'this.author :=
+ this.author prev.author =
+ { "bysame" 'extra.label.bysame := }
+ { this.author "" =
+ { "abcxyz" }
+ 'this.author
+ if$
+ 'prev.author :=
+ }
+ if$
+ }
+ 'skip$
+ if$
+}
+
+ITERATE {forward.pass.two}
+
+FUNCTION{punctuation}
+{
+ "%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%" write$ newline$
+ "% This bbl file is created by econ.bst ver." econ.version * write$ newline$
+ "% The latest econ.bst is available at" write$ newline$
+ "% <https://github.com/ShiroTakeda/econ-bst>" write$ newline$ newline$
+}
+
+EXECUTE {punctuation}
+
+FUNCTION {begin.bib}
+{
+ preamble$ empty$
+ 'skip$
+ { preamble$ write$ newline$ }
+ if$
+ bst.use.bysame #0 =
+ % Not use \bysame.
+ 'skip$
+ % Use \bysame.
+ { "%%% Definition of \bysame" write$ newline$
+ "\ifx\undefined\bysame" write$ newline$
+ "\newcommand{\bysame}{" bst.bysame.definition * "}" *
+ write$ newline$
+ "\fi" write$ newline$ newline$ }
+ if$
+ %% When number index is attached to the beginning of each item.
+ bst.use.number.index #0 =
+ 'skip$
+ { bst.number.index.digit "1" =
+ % one digit.
+ { bst.number.index.bibhang.one }
+ { bst.number.index.digit "2" =
+ % two digits.
+ { bst.number.index.bibhang.ten }
+ % three or more digits.
+ { bst.number.index.bibhang.hund }
+ if$
+ }
+ if$
+ 'hang :=
+ "%%% Redefinition of \bibhang" write$ newline$
+ "\ifx\undefined\bibhang" write$ newline$
+ "\relax" write$ newline$
+ "\else" write$ newline$
+ "\setlength{\bibhang}{"
+ hang * "}" * write$ newline$
+ "\fi" write$ newline$ newline$
+ }
+ if$
+ "\begin{thebibliography}{xxx}" write$ newline$
+
+ %% Initialize the variable `index'.
+ #0 'index :=
+}
+
+FUNCTION {end.bib}
+{ newline$ "\end{thebibliography}" write$ newline$ }
+
+EXECUTE {begin.bib}
+
+EXECUTE {init.state.consts}
+
+ITERATE {call.type$}
+
+EXECUTE {end.bib}
+
+% --------------------
+% Local Variables:
+% fill-column: 78
+% mode: bst
+% End:
diff --git a/biblio/bibtex/contrib/econ-bst/customization/econ-no-sort.pdf b/biblio/bibtex/contrib/econ-bst/customization/econ-no-sort.pdf
new file mode 100644
index 0000000000..b85f9c19ac
--- /dev/null
+++ b/biblio/bibtex/contrib/econ-bst/customization/econ-no-sort.pdf
Binary files differ
diff --git a/biblio/bibtex/contrib/econ-bst/customization/econ-no-sort.tex b/biblio/bibtex/contrib/econ-bst/customization/econ-no-sort.tex
new file mode 100644
index 0000000000..48134687aa
--- /dev/null
+++ b/biblio/bibtex/contrib/econ-bst/customization/econ-no-sort.tex
@@ -0,0 +1,58 @@
+%#!pdflatex
+%#BIBTEX bibtex econ-no-sort
+
+%############################## Main #################################
+\documentclass[10pt]{article}
+
+%% Use natbib.sty
+\usepackage{natbib}
+\usepackage{mathpazo}
+\usepackage{url}
+\usepackage{graphicx}
+\usepackage{color}
+\definecolor{MyBrown}{rgb}{0.3,0,0}
+\definecolor{MyBlue}{rgb}{0,0,0.3}
+\definecolor{MyRed}{rgb}{0.4,0,0.1}
+\definecolor{MyGreen}{rgb}{0,0.4,0}
+\usepackage[bookmarks=true,%
+bookmarksnumbered=true,%
+colorlinks=true,%
+linkcolor=MyBlue,%
+citecolor=MyRed,%
+filecolor=MyBlue,%
+urlcolor=MyGreen%
+]{hyperref}
+
+\setlength{\topmargin}{-20pt}
+\setlength{\textheight}{648pt}
+\setlength{\oddsidemargin}{15pt}
+\setlength{\textwidth}{440pt}
+
+%#####################################################################
+%######################### Document Starts ###########################
+%#####################################################################
+\begin{document}
+
+This document uses ``\verb|econ-no-sort.bst|''.
+
+\vspace{1em}
+Entries in bibliography are listed in citation order (not in
+alphabetical order).
+\vspace{1em}
+
+\input{cited-part}
+\nocite{*}
+
+%% bst file:
+\bibliographystyle{econ-no-sort}
+\bibliography{../econ-example}
+
+\end{document}
+
+%#####################################################################
+%######################### Document Ends #############################
+%#####################################################################
+% --------------------
+% Local Variables:
+% fill-column: 80
+% End:
diff --git a/biblio/bibtex/contrib/econ-bst/customization/econ-numbers.pdf b/biblio/bibtex/contrib/econ-bst/customization/econ-numbers.pdf
new file mode 100644
index 0000000000..e8c9e567df
--- /dev/null
+++ b/biblio/bibtex/contrib/econ-bst/customization/econ-numbers.pdf
Binary files differ
diff --git a/biblio/bibtex/contrib/econ-bst/customization/econ-numbers.tex b/biblio/bibtex/contrib/econ-bst/customization/econ-numbers.tex
new file mode 100644
index 0000000000..c071bf5e52
--- /dev/null
+++ b/biblio/bibtex/contrib/econ-bst/customization/econ-numbers.tex
@@ -0,0 +1,72 @@
+%#!pdflatex
+%#BIBTEX bibtex econ-numbers
+
+%############################## Main #################################
+\documentclass[10pt]{article}
+
+%% Use natbib.sty
+\usepackage[numbers]{natbib}
+\usepackage{mathpazo}
+\usepackage{url}
+\usepackage{graphicx}
+\usepackage{color}
+\definecolor{MyBrown}{rgb}{0.3,0,0}
+\definecolor{MyBlue}{rgb}{0,0,0.3}
+\definecolor{MyRed}{rgb}{0.4,0,0.1}
+\definecolor{MyGreen}{rgb}{0,0.4,0}
+\usepackage[bookmarks=true,%
+bookmarksnumbered=true,%
+colorlinks=true,%
+linkcolor=MyBlue,%
+citecolor=MyRed,%
+filecolor=MyBlue,%
+urlcolor=MyGreen%
+]{hyperref}
+
+\setlength{\topmargin}{-20pt}
+\setlength{\textheight}{648pt}
+\setlength{\oddsidemargin}{15pt}
+\setlength{\textwidth}{440pt}
+
+% Redefine \cicet command so that citet is equal to citep.
+\renewcommand{\citet}[1]{\citep{#1}}
+
+%#####################################################################
+%######################### Document Starts ###########################
+%#####################################################################
+\begin{document}
+
+In this document, we use numerical mode of \texttt{natbib.sty}. That is, we cite
+references by number index.
+\vspace*{1em}
+
+To use numerical mode of \texttt{natbib.sty}, we use the following setting.
+\begin{itemize}
+ \item Load \texttt{natbib.sty} with option ``\texttt{numbers}'' like \\
+ \verb|\usepackage[numbers]{natbib}|
+ \item Use ``\verb|econ-no-sort.bst|'' which means that entries in the reference
+ are listed in citation order (not alphabetical order).
+ \item Use \verb|\citep| command instead of \verb|\citet| command.\\ Note:
+ strictly speaking, we use \texttt{citet} command but redefine
+ \texttt{citet} command in the preample so that it is equal to
+ \texttt{citep}.
+\end{itemize}
+
+\vspace{1em}
+
+\input{cited-part}
+\nocite{*}
+
+%% bst file:
+\bibliographystyle{econ-no-sort}
+\bibliography{../econ-example}
+
+\end{document}
+
+%#####################################################################
+%######################### Document Ends #############################
+%#####################################################################
+% --------------------
+% Local Variables:
+% fill-column: 80
+% End:
diff --git a/biblio/bibtex/contrib/econ-bst/econ-example.bib b/biblio/bibtex/contrib/econ-bst/econ-example.bib
new file mode 100644
index 0000000000..4b65c99bf3
--- /dev/null
+++ b/biblio/bibtex/contrib/econ-bst/econ-example.bib
@@ -0,0 +1,537 @@
+%
+% Bibliography entries
+%
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%
+% Article
+@Article{brezis93:_leapf_inter_compet,
+ author = {Elise S. Brezis and Paul R. Krugman and Daniel Tsiddon},
+ title = {Leapfrogging in International Competition: A Theory of Cycles
+ in National Technological Leadership},
+ journal = {American Economic Review},
+ year = 1993,
+ volume = 83,
+ number = 5,
+ pages = {1211-1219},
+ month = {December},
+ url = {http://www.jstor.org/stable/2117557},
+}
+
+@Article{ishikawa94:_revis_stolp_samuel_rybcz_theor_produc_exter,
+ author = {Jota Ishikawa},
+ title = {Revisiting the {Stolper}-{Samuelson} and the {Rybczynski}
+ Theorems with Production Externalitities},
+ journal = {Canadian Journal of Economics},
+ year = 1994,
+ volume = 27,
+ pages = {101-111},
+ number = 1,
+ url = {http://www.jstor.org/stable/135804},
+}
+
+@article{Biker-2007-unemployment,
+ author = {Mustafa H. Babiker and Richard S. Eckaus},
+ title = {Unemployment Effects of Climate Policy},
+ journal = {Environmental Science and Policy},
+ year = 2007,
+ volume = 10,
+ number = {7-8},
+ pages = {600-609},
+ doi = {10.1016/j.envsci.2007.05.002},
+ timestamp = {2010.08.28}
+}
+
+@article{Takeda2012a,
+ author = {Takeda, Shiro and Tetsuya, Horie and Arimura, Toshi H.},
+ title = {A CGE Analysis of Border Adjustments under the Cap-and-Trade
+ System: A Case Study of the {Japanese} Economy},
+ journal = {Climate Change Economics},
+ volume = 3,
+ number = 1,
+ doi = {10.1142/S2010007812500030},
+ year = 2012,
+ url =
+ {http://www.worldscientific.com/doi/abs/10.1142/S2010007812500030},
+}
+
+@article{takeda06:_cge_analy_welfar_effec_trade,
+ author = {Shiro Takeda},
+ title = {The Double Dividend from Carbon Regulations in {Japan}},
+ journal = {Journal of the Japanese and International Economies},
+ year = 2007,
+ volume = 21,
+ number = 3,
+ pages = {336-364},
+ month = sep,
+ doi = {10.1016/j.jjie.2006.01.002},
+ absorder = 999
+}
+
+@Article{yamazaki13:_japan,
+ author = {Masato Yamazaki and Shiro Takeda},
+ title = {An assessment of nuclear power shutdown in {Japan} using the
+ computable general equilibrium model},
+ journal = {Journal of Integrated Disaster Risk Management},
+ year = 2013,
+ volume = 3,
+ number = 1,
+ doi = {10.5595/idrim.2013.0055}
+}
+
+@Article{takeda10:_cge_analy_welfar_effec_trade,
+ author = {Shiro Takeda},
+ title = {A {CGE} Analysis of the Welfare Effects of Trade Liberalization under Different
+ Market Structures},
+ journal = {International Review of Applied Economics},
+ year = 2010,
+ volume = 24,
+ number = 1,
+ absorder = 999,
+ pages = {75-93},
+ doi = {10.1080/02692170903424307},
+}
+
+@article{BabikerRutherford-2005-EconomicEffectsof,
+ author = {Mustafa H. Babiker and Thomas F. Rutherford},
+ title = {The Economic Effects of Border Measures in Subglobal Climate Agreements},
+ journal = {Energy Journal},
+ year = 2005,
+ volume = 26,
+ pages = {99-126},
+ number = 4
+}
+
+@article{2009yamasue502165,
+ author = {Eiji Yamasue and Ryota Minamino and Ichiro Daigo and Hideyuki
+ Okumura and Keiichi N Ishihara},
+ title = {Evaluation of total materials requirement for the recycling of
+ elements and materials (urban ore {TMR}) from end-of-life
+ electric home appliances},
+ journal = {Materials Transactions},
+ year = 2009,
+ volume = 50,
+ pages = {2165--2172},
+ number = 9,
+ issn = 13459678,
+ order = 3,
+ pdf = {2009yamasue502165.pdf},
+ publisher = {Japan Institute of Metals},
+ url = {http://ci.nii.ac.jp/naid/40016713752/}
+}
+
+@article{2007yamasue482353,
+ author = {Eiji Yamasue and Kenichi Nakajima and Ichiro Daigo and Seiji
+ Hashimoto and Hideyuki Okumura and Keiichi N. Ishihara},
+ title = {Evaluation of the Potential Amounts of Dissipated Rare Metals
+ from WEEE in {Japan}},
+ journal = {Materials transactions},
+ year = 2007,
+ volume = 48,
+ pages = {2353--2357},
+ number = 9,
+ issn = 13459678,
+ pdf = {2007yamasue482353.pdf},
+ publisher = {Japan Institute of Metals},
+ url = {http://ci.nii.ac.jp/naid/10019853407/}
+}
+
+@article{Babiker2000525,
+ author = {Mustafa H. Babiker and John M. Reilly and Henry D. Jacoby},
+ title = {The {Kyoto} Protocol and Developing Countries},
+ journal = {Energy Policy},
+ year = 2000,
+ volume = 28,
+ pages = {525--536},
+ number = 8,
+ doi = {10.1016/S0301-4215(00)00033-1},
+ issn = {0301-4215},
+ keywords = {Climate change}
+}
+
+@article{Parry1997,
+ author = {Parry, Ian W. H.},
+ doi = {10.2139/ssrn.293599},
+ journal = {Resource and Energy Economics},
+ pages = {5--6},
+ title = {{Environmental Taxes and Quotas in the Presence of Distorting
+ Taxes in Factor Markets}},
+ url = {http://linkinghub.elsevier.com/retrieve/pii/S0928765596000127},
+ year = {1997}
+}
+
+@Article{bergemann11:_ration,
+ author = {D. Bergemann and S. Morris and O. Tercieux},
+ title = {Rationalizable Implementation},
+ journal = {Journal of Economic Theory},
+ year = 2011,
+ volume = 146,
+ pages = {1253-1274}
+}
+
+@article{goldin:katz:2000,
+ author = {Claudia Goldin and Lawrence F. Katz},
+ title = {Education and Income in the Early Twentieth Century: Evidence from the Prairies},
+ journal = {Journal of Economic History},
+ year = {2000},
+ volume = {60},
+ number = {3},
+ pages = {782-818}
+}
+
+@article{10.1257/aer.20161492,
+ Author = {Ray, Debraj and Robson, Arthur},
+ Title = {Certified Random: A New Order for Coauthorship},
+ Journal = {American Economic Review},
+ Volume = {108},
+ Number = {2},
+ Year = {2018},
+ Month = {February},
+ Pages = {489-520},
+ DOI = {10.1257/aer.20161492},
+ URL = {http://www.aeaweb.org/articles?id=10.1257/aer.20161492},
+ nameorder = {random}
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%
+% Book
+@Book{krugman91:_geogr_trade,
+ author = {Paul R. Krugman},
+ title = {Geography and Trade},
+ publisher = {MIT Press},
+ year = 1991,
+ address = {Cambridge, MA}
+}
+
+@book{helpman91:_inter_trade_trade_polic,
+ editor = {Elhanan Helpman and Assaf Razin},
+ title = {International Trade and Trade Policy},
+ publisher = {MIT Press},
+ year = 1991,
+ address = {Cambridge, MA}
+}
+
+@Book{fujita99jp:_spatial_econom,
+ author = {Masahisa Fujita and Paul R. Krugman and Anthony J. Venables},
+ title = {The Spatial Economy},
+ publisher = {MIT Press},
+ address = {Cambridge, MA},
+ year = 1999,
+ jauthor = {o V},
+ jtitle = {Ԍoϊw},
+ jpublisher = {moϐV},
+ jyear = 2000
+}
+
+@Book{Ryza15:_advan_analy_spark_patter_learn_data_scale,
+ author = {Sandy Ryza and Uri Laserson and Sean Owen and Josh Wills},
+ title = {Advanced Analytics with Spark Patterns for Learning from Data at Scale},
+ publisher = {O'reilly \& Associates Inc},
+ year = 2015,
+}
+
+@book{goldin:katz:2008,
+ author = {Claudia Goldin and Lawrence F. Katz},
+ title = {The Race between Education and Technology},
+ publisher = {The Belknap Press of Harvard University Press},
+ address = {Cambridge, MA},
+ year = {2008}
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%
+% Incollection
+@InCollection{krugman91:_is_bilat_bad,
+ author = {Paul R. Krugman},
+ title = {Is Bilateralism Bad?},
+ booktitle = {International Trade and Trade Policy},
+ pages = {9-23},
+ publisher = {MIT Press},
+ year = 1991,
+ editor = {Elhanan Helpman and Assaf Razin},
+ address = {Cambridge, MA}
+}
+
+@incollection{lucas76:_econom_polic_evaluat,
+ author = {Lucas, Jr., Robert E.},
+ year = 1976,
+ title = {Econometric Policy Evaluation: A Critique},
+ booktitle = {The {Phillips} Curve and Labor Markets},
+ pages = {19-46},
+ editors = {Karl Brunner and Allan H. Meltzer},
+ volume = 1,
+ series = {Carnegie Rochester Conference Series on Public Policy},
+ publisher = {North-Holland},
+ address = {Amsterdam}
+}
+
+@incollection{DeGorter2002,
+ author = {{De Gorter}, Harry and Swinnen, Johan},
+ booktitle = {Handbook of Agricuultural Economics},
+ chapter = {36},
+ doi = {10.1016/S1574-0072(02)10023-5},
+ editor = {Gardner, B. and Rausser, G.},
+ isbn = {9780444510792},
+ issn = {15740072},
+ keywords = {Q18,collective action,commodity policy,developmental
+ paradox,instrument choice,lobbying,politician-voter,public
+ goods,rent-seeking,revealed preference,status quo bias,trade
+ bias},
+ pages = {1893--1943},
+ publisher = {Elsevier Science B.V.},
+ title = {Political Economy of Agricultural Policy},
+ url =
+ {http://www.sciencedirect.com/science/article/pii/S1574007202100235},
+ volume = {2},
+ year = {2002}
+}
+
+@InCollection{borgers95:_note_implem_stron_domin,
+ author = {T. Borgers},
+ title = {A Note on Implementation and Strong Dominance},
+ booktitle = {Social Choice, Welfare, and Ethics: Proceedings of the Eighth International
+ Symposium in Economic Theory and Econometrics},
+ publisher = {Cambridge University Press},
+ year = 1995,
+ editor = {William A. Barnett and Herve Moulin and Maurice Salles and Norman J. Schofield},
+ pages = {277-287}
+}
+
+@incollection{goldin:katz:2011,
+ author = {Claudia Goldin and Lawrence F. Katz},
+ title = {Mass Secondary Schooling and the State: The Role of State Compulsion in the High
+ School Movement},
+ booktitle = {Understanding Long-Run Economic Growth: Essays in Honor of Kenneth L. Sokoloff},
+ publisher = {University of Chicago Press},
+ address = {Chicago, IL},
+ year = {2011},
+ editor = {D. Costa and N. Lamoreaux},
+ chapter = {9},
+ pages = {275-310},
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%
+% Unpublished
+
+@unpublished{ishikawa03:_green_gas_emiss_contr_open_econom,
+ author = {Jota Ishikawa and Kazuharu Kiyono},
+ title = {Greenhouse-Gas Emission Controls in an Open Economy},
+ year = 2003,
+ month = nov,
+ note = {{COE-RES} Discussion Paper Series, Center of Excellence
+ Project, Graduate School of Economics and Institute of
+ Economics Research, Hitotsubashi University}
+}
+
+@unpublished{rutherford00:_gtapin_gtap_eg,
+ author = {Thomas F. Rutherford and Sergey V. Paltsev},
+ title = {{GTAPinGAMS} and {GTAP-EG}: Global Datasets for Economic
+ Research and Illustrative Models},
+ month = sep,
+ year = 2000,
+ url = {http://www.mpsge.org/gtap5/index.html},
+ access = {29th June, 2013},
+ note = {Working Paper, University of Colorad, Department of Economics}
+}
+
+@unpublished{Takeda2011b,
+ author = {Takeda, Shiro and Arimura, Toshi H. and Tamechika, Hanae and
+ Fischer, Carolyn and Fox, Alan K.},
+ title = {Output Based Allocation of Emissions Permits for Mitigating
+ the Leakage and Competitiveness Issues for {Japanese} Economy},
+ note = {RFF (Resources for the Future) Discussion Paper 11-40,
+ September 2011},
+ url =
+ {http://rff.org/Publications/Pages/PublicationDetails.aspx?PublicationID=21652},
+ year = 2011
+}
+
+@unpublished{takeda2011c,
+ author = {Takeda, Shiro and Arimura, Toshi H. and Sugino, Makoto},
+ title = {Labor Market Distortions and Welfare-Decreasing International
+ Emissions Trading},
+ url = {http://papers.ssrn.com/sol3/papers.cfm?abstract_id=1886200},
+ year = {2011},
+ access = {29/06/2013},
+}
+
+@unpublished{Babiker-1999-KyotoProtocoland,
+ author = {Mustafa H. Babiker and John M. Reilly and Henry D. Jacoby},
+ title = {The {Kyoto} Protocol and Developing Countries},
+ note = {MIT Joint Program on the Science and Policy of Global Change (Report No.56)},
+ month = {October},
+ year = 1999,
+ owner = {stakeda.lab},
+ timestamp = {2010.04.08}
+}
+
+@UNPUBLISHED{Babiker-1999-JapaneseNuclearPower,
+ author = {Mustafa H. Babiker and John M. Reilly and A. Denny Ellerman},
+ title = {{Japanese} Nuclear Power and the {Kyoto} Agreement},
+ note = {The MIT Joint Program on the Science and Policy of Global Change (Report No. 51)},
+ month = {August},
+ year = {1999},
+ owner = {stakeda.lab},
+ timestamp = {2010.03.26}
+}
+
+@UNPUBLISHED{RePEc:nbr:nberwo:4269,
+ title = {A Simple Theory of Multinational Corporations and Trade with a
+ Trade-Off Between Proximity and Concentration},
+ author = {Brainard, S. Lael},
+ year = {1993},
+ note = {NBER Working Paper No. 4269},
+ institution = {National Bureau of Economic Research, Inc},
+ type = {NBER Working Papers},
+ number = {4269},
+ abstract = {This paper develops a two-sector, two-country model, where
+ firms in a differentiated products sector choose between
+ exporting and multinational expansion as alternative modes of
+ foreign market penetration, based on a trade-off between
+ proximity and concentration advantages. The differentiated
+ sector is characterized by multi-stage production, with
+ increasing returns at the corporate level associated with some
+ activity such as R&D, scale economies at the plant level, and
+ a variable transport cost that rises with distance. A pure
+ multinational equilibrium, where two-way horizontal expansion
+ across borders completely supplants two-way trade in
+ differentiated products, is possible even in the absence of
+ factor proportion differences. It is more likely the greater
+ are transport costs relative to fixed plant costs, and the
+ greater are increasing returns at the corporate level relative
+ to the plant level. The model also establishes conditions for
+ a mixed equilibrium, in which national and multinational firms
+ coexist.},
+ url = {http://EconPapers.repec.org/RePEc:nbr:nberwo:4269}
+}
+
+@Unpublished{vohra18:_maxim_farsig_stabl_set,
+ author = {Rajiv Vohra and Debraj Ray},
+ title = {Maximality in The Farsighted Stable Set},
+ nameorder = {random},
+ year = 2018,
+ url =
+ {https://debrajray.com/wp-content/uploads/2018/01/RayVohraHistDep.pdf},
+ note = {September, 2018},
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%
+% inbook
+@InBook{wong95:_inter_trade_goods_factor_mobil_,
+ author = {{Kar-yiu} Wong},
+ title = {International Trade in Goods and Factor Mobility},
+ chapter = 2,
+ publisher = {MIT Press},
+ year = 1995,
+ address = {Cambridge, MA},
+ pages = {23-84}
+}
+
+@inbook{milne-thomson68:_theor_hydrod,
+ author = {Milne-Thomson, L. M.},
+ title = {Theoretical Hydrodynamics},
+ pages = 480,
+ publisher = {Ma{C}millan Press},
+ edition = {5th},
+ address = {London},
+ year = 1968
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%
+% inproceedings
+@inproceedings{wang89:_model_therm_hydrod_aspec_molten,
+ author = {Wang, S. K. and Blomquist, C. A. and Spencer, B. W.},
+ title = {Modeling of Thermal and Hydrodynamic Aspects of Molten
+ Jet/Water Interactions},
+ booktitle = {ANS Proc. 1989 National Heat Transfer Conference},
+ year = 1989,
+ pages = {225-232},
+ volume = 4,
+ address = {Philadelphia},
+ month = sep # "~6"
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%
+% Manual
+@Manual{brooke03:_gams,
+ author = {Anthony Brooke and David Kendrick and Alexander Meeraus and
+ Ramesh Raman},
+ title = {{GAMS}: A User's Guide},
+ year = 2003,
+ organization = {GAMS Development Corporation}
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%
+% techreport
+
+@techreport{Peri2007,
+ address = {Cambridge, MA},
+ author = {Peri, Giovanni},
+ doi = {10.3386/w12956},
+ institution = {National Bureau of Economic Research},
+ month = {mar},
+ title = {Immigrants' Complementarities and Native Wages: Evidence from
+ {California}},
+ url = {http://www.nber.org/papers/w12956.pdf},
+ year = {2007}
+}
+
+@TechReport{RePEc:hka:wpaper:2018-037,
+ author = {Piotr Dworczak and Scott Duke Kominers and Mohammad Akbarpour},
+ title = {Redistribution through Markets},
+ year = 2018,
+ month = Jun,
+ nameorder = {random},
+ institution = {Human Capital and Economic Opportunity Working Group},
+ type = {Working Papers},
+ url = {https://ideas.repec.org/p/hka/wpaper/2018-037.html},
+ number = {2018-037},
+ keywords = {optimal mechanism design; redistribution; Inequality; welfare
+ theorems},
+ doi = {},
+}
+
+@techreport{NBERw25205,
+ title = "Electoral Systems and Inequalities in Government
+ Interventions",
+ author = "Garance Genicot and Laurent Bouton and Micael Castanheira",
+ institution = "National Bureau of Economic Research",
+ type = "Working Paper",
+ series = "Working Paper Series",
+ number = "25205",
+ year = "2018",
+ month = "October",
+ doi = {10.3386/w25205},
+ URL = "http://www.nber.org/papers/w25205",
+ nameorder = {random}
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%
+% Online
+@online{stakeda2013web,
+ author = {Shiro Takeda},
+ year = {2013},
+ title = {econ.bst: {BibTeX} style file for economics},
+ url = {http://shirotakeda.org/en/tex/econ-bst.html},
+ access = {4th July, 2013}
+}
+
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%
+% Phdthesis
+@PhdThesis{takeda05:_econom_analy_envir_regul,
+ author = {Shiro Takeda},
+ title = {An Economic Analysis of Environmental Regulations},
+ school = {Hitotsubashi University},
+ year = 2005}
+
+% proceedings
+% techreport
+% mastersthesis
+% misc
+% booklet
+
+% --------------------
+% Local Variables:
+% mode: bibtex
+% fill-column: 80
+% code: utf-8-dos
+% End:
diff --git a/biblio/bibtex/contrib/econ-bst/econ-example.pdf b/biblio/bibtex/contrib/econ-bst/econ-example.pdf
new file mode 100644
index 0000000000..bfd58cac6b
--- /dev/null
+++ b/biblio/bibtex/contrib/econ-bst/econ-example.pdf
Binary files differ
diff --git a/biblio/bibtex/contrib/econ-bst/econ-example.tex b/biblio/bibtex/contrib/econ-bst/econ-example.tex
new file mode 100644
index 0000000000..237076ccc0
--- /dev/null
+++ b/biblio/bibtex/contrib/econ-bst/econ-example.tex
@@ -0,0 +1,851 @@
+%#!pdflatex
+%#BIBTEX bibtex econ-example
+% Filename: econ-example.tex
+% Author: Shiro Takeda
+% First-written: <2002/11/02>
+% Time-stamp: <2018-12-06 00:47:47 st>
+%
+% This document explains how to use econ.bst.
+
+%############################## Main #################################
+
+\documentclass[10pt]{article}
+
+%% Use natbib.sty.
+\usepackage{natbib}
+\usepackage{fancybox}
+\usepackage{mathpazo}
+\usepackage{url}
+\usepackage{graphicx}
+\usepackage{color}
+\definecolor{MyBrown}{rgb}{0.3,0,0}
+\definecolor{MyBlue}{rgb}{0,0,0.3}
+\definecolor{MyRed}{rgb}{0.4,0,0.1}
+\definecolor{MyGreen}{rgb}{0,0.4,0}
+\usepackage[bookmarks=true,bookmarksnumbered=true,colorlinks=true,linkcolor=MyBlue,citecolor=MyRed,filecolor=MyBlue,urlcolor=MyGreen]{hyperref}
+
+\setlength{\topmargin}{-15pt}
+\setlength{\textheight}{638pt}
+\setlength{\oddsidemargin}{25pt}
+\setlength{\textwidth}{420pt}
+
+\makeatletter
+
+\newenvironment{Frame}%
+{\setlength{\fboxsep}{15pt}
+\setlength{\mylength}{\linewidth}%
+\addtolength{\mylength}{-2\fboxsep}%
+\addtolength{\mylength}{-2\fboxrule}%
+\Sbox
+\minipage{\mylength}%
+\setlength{\abovedisplayskip}{0pt}%
+\setlength{\belowdisplayskip}{0pt}%
+}%
+{\endminipage\endSbox
+\[\fbox{\TheSbox}\]}
+
+\newcommand{\bysameline}{\hskip.3em \leavevmode\rule[.5ex]{3em}{.3pt}\hskip0.5em}
+
+%% Define \BibTeX command
+\def\BibTeX{{\rm B\kern-.05em{\sc i\kern-.025em b}\kern-.08em
+ T\kern-.1667em\lower.7ex\hbox{E}\kern-.125emX}}
+\makeatother
+
+%%% title, author, acknowledgement, and date
+\title{\texttt{econ.bst}:\\
+\BibTeX{} style for economics\\
+(for ver. 2.4)
+\thanks{\texttt{econ.bst} is available at
+\url{https://github.com/ShiroTakeda/econ-bst}}
+}
+
+\author{Shiro Takeda\thanks{email: {\ttfamily shiro.takeda@gmail.com}.}}
+\date{\today}
+
+%#####################################################################
+%######################### Document Starts ###########################
+%#####################################################################
+\begin{document}
+
+%%% Title
+\maketitle
+
+\newlength{\mylength}
+\setlength{\fboxsep}{15pt}
+\setlength{\mylength}{\linewidth}
+\addtolength{\mylength}{-2\fboxsep}
+\addtolength{\mylength}{-2\fboxrule}
+
+%%% Table of contents.
+\tableofcontents
+
+%########################## Text Starts ##############################
+
+\setlength{\baselineskip}{16pt}
+
+\section{Main features}
+
+``\texttt{econ.bst}'' is a \BibTeX{} style file. It provids the following
+features:
+\begin{Frame}
+ \begin{itemize}
+ \item The author-year type citation (you need ``\texttt{natbib.sty}'' as well).
+ \item Reference style used in economics papers.
+ \item Highly customizable. You can easily customize reference style as you
+ wish.
+ \item You can use ``\textit{certified random order}'' proposed by
+ \href{http://dx.doi.org/10.1257/aer.20161492}{\citet[][AER]{10.1257/aer.20161492}}.
+ \end{itemize}
+\end{Frame}
+
+\textbf{The third feature is the key characteristic of ``\texttt{econ.bst}''.}
+
+\section{How to use ``\texttt{econ.bst}''}
+
+\begin{itemize}
+ \item ``\texttt{econ.bst}'' requires ``\texttt{natbib.sty}''.
+ If ``\texttt{natbib.sty}'' is not installed in your \TeX{} system, you must
+ install it first.
+ \item Put ``\texttt{econ.bst}'' file somewhere under the directory (folder)
+ ``\texttt{/texmf/bibtex/bst}''. Or you can place ``\texttt{econ.bst}'' at
+ the same directory as the \TeX{} file you are editting.
+ \item You may need to change the character code of ``\texttt{econ.bst}''
+ according to your \TeX system.
+ \item See ``\texttt{econ-example.tex}'' for an example tex file.
+ \item For \BibTeX{} in general, see, for example,
+ \href{https://www.economics.utoronto.ca/osborne/latex/BIBTEX.HTM}{Using
+ BibTeX: a short guide} by Martin J. Osborne.
+\end{itemize}
+
+
+\subsection{Preparing a tex file}
+
+In the tex file you are editting, you first need to load \texttt{natbib}
+package.
+\begin{Frame}
+\begin{verbatim}
+\usepackage{natbib}
+\end{verbatim}
+\end{Frame}
+
+In the main text, you can cite bibliographic entries by \verb|\citet|
+command.
+
+For example, ``\verb|\citet{Takeda2011b}| is my paper'' generates the output like
+\begin{Frame}
+\citet{Takeda2011b} is my paper.
+\end{Frame}
+
+At the place where you want to add ``the reference part'', you have to set the
+bibliography style (\texttt{econ.bst}) and database (\texttt{econ-example.bib}) like
+\begin{Frame}
+\begin{verbatim}
+\bibliographystyle{econ}
+\bibliography{econ-example}
+\end{verbatim}
+\end{Frame}
+
+
+\section{Customization}
+
+``\texttt{econ.bst}'' defines many functions which have names like
+``\texttt{bst.xxx.yyy}''. You can easily customize the reference style by
+changing the contents of these functions.
+
+\subsection{Notes on customization}
+
+\begin{itemize}
+ \item Customization here is customization of the reference part. Style
+ in the citation part mainly depends on a style file for citation
+ (``\texttt{natbib.sty}'').
+ \item Except for some cases, customization here cannot change order
+ of fields (order of author, year, title etc.)
+ \item Functions with ``\texttt{.pre}'' define strings attached to the start
+ of the field and functions with ``\texttt{.post}'' define strings
+ attached to the end of field. For exmple,
+ ``\texttt{bst.author.pre}'' defines strings attached before author.
+ \item You can change order of entries (references). It will be
+ explained in Section \ref{sec:sort_rule}.
+ \item In a bst file, integer (e.g. 0, 1, 2) is represented as \verb|#0|, \verb|#1| , \verb|#2|.
+\end{itemize}
+
+\subsection{Examples of customization}
+
+\subsubsection{Change delimiter used to separate mutiple author names
+ from ``and'' to ``\&''.}
+
+For this, change the contents of ``\texttt{bst.and}'' and ``\texttt{bst.ands}''.
+\paragraph{Default definition:}
+\begin{Frame}
+\begin{verbatim}
+FUNCTION {bst.and}
+{ " and " }
+FUNCTION {bst.ands}
+{ ", and " }
+\end{verbatim}
+\end{Frame}
+
+\paragraph{New definition:}
+\begin{Frame}
+\begin{verbatim}
+FUNCTION {bst.and}
+{ " \& " }
+FUNCTION {bst.ands}
+{ " \& " }
+\end{verbatim}
+\end{Frame}
+
+Then, author names in reference part are displayed as follows:
+\begin{center}
+Fujita, Masahisa, Paul~R. Krugman, and Anthony~J. Venables \\
+ $\downarrow$ \\
+Fujita, Masahisa, Paul~R. Krugman \& Anthony~J. Venables
+\end{center}
+
+See ``\texttt{econ-b.bst}'' for an example.
+
+\subsubsection{Make author to small caps style}
+
+For this, change the contents of ``\texttt{bst.author.pre}'' and ``\texttt{bst.author.post}''.
+\paragraph{Default definition:}
+\begin{Frame}
+\begin{verbatim}
+FUNCTION {bst.author.pre}
+{ "" }
+FUNCTION {bst.author.post}
+{ "" }
+\end{verbatim}
+\end{Frame}
+
+\paragraph{New definition:}
+\begin{Frame}
+\begin{verbatim}
+FUNCTION {bst.author.pre}
+{ "\textsc{" }
+FUNCTION {bst.author.post}
+{ "}" }
+\end{verbatim}
+\end{Frame}
+
+Then, author names in reference part are changed as follows:
+\begin{center}
+Fujita, Masahisa, Paul~R. Krugman, and Anthony~J. Venables \\
+ $\downarrow$ \\
+\textsc{Fujita, Masahisa, Paul~R. Krugman, and Anthony~J. Venables}
+\end{center}
+
+See ``\texttt{econ-b.bst}'' for an example.
+
+\subsubsection{Change the style of volume and number}
+
+For this, change the contents of ``\texttt{bst.volume.pre}'',
+``\texttt{bst.volume.post}'', ``\texttt{bst.number.pre}'' and
+``\texttt{bst.number.post}''.
+
+\paragraph{Default definition:}
+\begin{Frame}
+\begin{verbatim}
+FUNCTION {bst.volume.pre}
+{ ", Vol. " }
+FUNCTION {bst.volume.post}
+{ "" }
+FUNCTION {bst.number.pre}
+{ ", No. " }
+FUNCTION {bst.number.post}
+{ "" }
+\end{verbatim}
+\end{Frame}
+
+\paragraph{New definition:}
+\begin{Frame}
+ \begin{verbatim}
+FUNCTION {bst.volume.pre}
+{ ", \textbf{" }
+FUNCTION {bst.volume.post}
+{ "}" }
+FUNCTION {bst.number.pre}
+{ " (" }
+FUNCTION {bst.number.post}
+{ ")" }
+\end{verbatim}
+\end{Frame}
+
+By this, the style of volume and number change from ``Vol. 5, No. 10''
+to ``\textbf{5} (10)''. See ``\texttt{econ-b.bst}'' for an example.
+
+
+\subsubsection{Abbreviation of author name}
+
+By default, when there are mutiple documents of the same author, author
+name except for the first document is abbreviated by \verb|\bysame|
+command (i.e. \bysameline).
+
+If you want to always show author name for all documents, change the
+content of ``\texttt{bst.use.bysame}'' as follows:
+\begin{Frame}
+\begin{verbatim}
+FUNCTION {bst.use.bysame}
+{ #0 }
+\end{verbatim}
+\end{Frame}
+
+In the default setting (`\texttt{bst.use.bysame}' is set to \#1), author names
+are abbreviated when they are exactly the same. For example, suppose that there
+are the following entries
+\begin{itemize}
+ \item Mazda, A., Subaru, B., and Honda, C., (2011) "ABC"
+ \item Mazda, A., Subaru, B., and Honda, C., (2011) "DEF"
+ \item Mazda, A., Subaru, B., and Toyota, D., (2011) "GHI"
+\end{itemize}
+\vspace*{1em}
+
+In the default setting, these entries are listed like
+\begin{Frame}
+\begin{itemize}
+ \item Mazda, A., Subaru, B., and Honda, C., (2011) "ABC"
+ \item \bysameline, (2011) "DEF"
+ \item Mazda, A., Subaru, B., and Toyota, D., (2011) "GHI"
+\end{itemize}
+\end{Frame}
+
+That is, the abbreviation of authors by `bysame' is only applied to
+entries with exactly the same authors.
+
+If you set \#2 to `bst.use.bysame' like
+\begin{Frame}
+\begin{verbatim}
+FUNCTION {bst.use.bysame}
+{ #2 }
+\end{verbatim}
+\end{Frame}
+you can choose alternative abbreviation style like
+\begin{Frame}
+\begin{itemize}
+ \item Mazda, A., Subaru, B., Honda, C., (2011) "ABC"
+ \item \bysameline, \bysameline, and \bysameline, (2011) "DEF"
+ \item \bysameline, \bysameline, and Toyota, D., (2011) "GHI"
+\end{itemize}
+\end{Frame}
+\vspace*{1em}
+
+See ``\texttt{econ-a.bst}'' and ``\texttt{econ-b.bst}'' for examples.
+
+
+\subsubsection{Order of first and last name in author field}
+
+``\texttt{bst.author.name}'' defines order of first and last name in author field.
+
+\paragraph{Default definition:}
+\begin{Frame}
+\begin{verbatim}
+FUNCTION {bst.author.name}
+{ #0 }
+\end{verbatim}
+\end{Frame}
+
+If you change \verb|#0| to \verb|#1| or \verb|#2|, you can customize
+order of first and family name. For example, suppose author field is
+defined as follows:
+\begin{verbatim}
+ author = {Masahisa Fujita and Paul R. Krugman and Anthony J. Venables}
+\end{verbatim}
+
+According to the content of ``\texttt{bst.author.name}'', expression of
+author changes as follows:
+\begin{Frame}
+\begin{itemize}
+ \item \verb|#0|: First author $\rightarrow$ last-first, other authors
+ $\rightarrow$ first-last.\\
+ $\rightarrow$ Fujita, Masahisa, Paul~R. Krugman, and
+ Anthony~J. Venables
+ \item \verb|#1|: All authos $\rightarrow$ last-first \\
+ $\rightarrow$ Fujita, Masahisa, Krugman, Paul~R., and Venables, Anthony~J.
+ \item \verb|#2|: All authors $\rightarrow$ first-last \\
+ $\rightarrow$ Masahisa Fujita, Paul~R. Krugman, and Anthony~J. Venables
+\end{itemize}
+\end{Frame}
+
+\subsubsection{First name in initial}
+
+By default, first name is displayed in full. If you change the content
+of ``\texttt{bst.first.name.initial}'' to non-zero, first name is displayed
+in initial. For example,
+\begin{center}
+Fujita, Masahisa, Paul~R. Krugman, and Anthony~J. Venables \\
+ $\downarrow$ \\
+Fujita, M., P.~R. Krugman, and A.~J. Venables
+\end{center}
+
+See ``\texttt{econ-a.bst}'' for an exmpale.
+
+\subsubsection{Decapitalize letters in title field}
+
+Suppose that the title field is defined as follows
+\begin{center}
+ \verb| title = {Econometric Policy Evaluation: A Critique}|
+\end{center}
+
+Then, title is displayed in reference as follows:
+\begin{center}
+ Econometric Policy Evaluation: A Critique
+\end{center}
+
+If you change the content of ``\texttt{bst.title.lower.case}'' to
+non-zero, letters except the first letter are decapitalized. That is,
+you get the following expression in reference:
+\begin{center}
+ Econometric policy evaluation: A critique
+\end{center}
+
+See ``\texttt{econ-a.bst}'' for an exmpale.
+
+
+\subsubsection{Number index before documents in reference}
+
+You can put the number index to each documents as in
+``\texttt{plain.bst}''. For this, change the content of
+``\texttt{bst.use.number.index}'' to non-zero.
+\begin{Frame}
+\begin{verbatim}
+FUNCTION {bst.use.number.index}
+ { #1 }
+\end{verbatim}
+\end{Frame}
+
+If you use fonts other than computer modern fonts, you had better adjust
+the contents of functions ``\texttt{bst.number.index.xxx.yyy}''.
+
+See ``\texttt{econ-b.bst}'' for an exmpale.
+
+
+\subsubsection{List old references first}
+
+By default, references written by the same author are listed in
+chronological order (old documents are listed first). If you change the
+contents of ``\texttt{bst.reverse.year}'' to non-zero, the order is
+reversed.
+\begin{Frame}
+\begin{verbatim}
+FUNCTION {bst.reverse.year}
+{ #1 }
+\end{verbatim}
+\end{Frame}
+
+\subsubsection{Change the position of year}
+
+By default, year is always displayed right after author name. You can
+change the place of year by setting other values to
+``\texttt{bst.year.position}''.
+\\
+
+If non-zero set to ``\texttt{bst.year.position}'', year is placed
+\begin{itemize}
+ \item at the end of line if there is no ``\texttt{note}'' field,
+ \item and before ``\texttt{note}'' field if there is.
+\end{itemize}
+for non-article type entry.
+
+With respect to aritcle type entry, the following rule is applied:
+\begin{Frame}
+\begin{enumerate}
+ \item \verb|#1|: $\rightarrow$ year is placed at the end (before note field).
+ \item \verb|#2|: $\rightarrow$ year is placed after journal name.
+ \item \verb|#3|: $\rightarrow$ year is placed after volume.
+\end{enumerate}
+\end{Frame}
+
+For example, reference style changes as follows:
+\begin{description}
+ \item[\#0: ] Mazda, A. and B. Subaru, 2007, ``ABC,'' \textit{Journal of Automobiles}, Vol. 1, pp. 1-10.
+ \item[\#1: ] Mazda, A. and B. Subaru, ``ABC,'' \textit{Journal of Automobiles}, Vol. 1, pp. 1-10, 2007.
+ \item[\#2: ] Mazda, A. and B. Subaru, ``ABC,'' \textit{Journal of Automobiles}, 2007, Vol. 1, pp. 1-10.
+ \item[\#3: ] Mazda, A. and B. Subaru, ``ABC,'' \textit{Journal of Automobiles}, Vol. 1, 2007, pp. 1-10.
+\end{description}
+
+See ``\texttt{econ-a.bst}'' and ``\texttt{econ-b.bst}'' for exmpales.
+
+
+\subsubsection{Order of editors and book title in incollection and inproceedings entry}
+
+By default, editor name comes before book title in incollection and
+inproceedings entry. You can reverse this order by
+setting non-zero to `bst.editor.btitle.order' like
+\begin{Frame}
+\begin{verbatim}
+FUNCTION {bst.editor.btitle.order}
+{ #1 }
+\end{verbatim}
+\end{Frame}
+
+
+\begin{Frame}
+Krugman, Paul~R. (1991) ``Is Bilateralism Bad?'' in Elhanan Helpman and Assaf
+ Razin eds. {\it International Trade and Trade Policy}, Cambridge, MA: MIT
+ Press, pp. 9--23.
+\begin{center}
+ $\downarrow$
+\end{center}
+Krugman, Paul~R. (1991) ``Is Bilateralism Bad?'' in {\it International Trade
+and Trade Policy} eds. by Elhanan Helpman and Assaf Razin, Cambridge, MA:
+MIT Press, pp. 9--23.
+\end{Frame}
+
+\subsubsection{Order of address and publisher}
+
+By default, publisher address is placed before publisher name. You can
+reverse this order by setting non-zero to `bst.address.position'.
+\begin{Frame}
+Krugman, Paul~R. (1991) ``Is Bilateralism Bad?'' in Elhanan Helpman and
+ Assaf Razin eds. {\it International Trade and Trade Policy},
+ Cambridge, MA, MIT Press, pp. 9--23.
+\begin{center}
+ $\downarrow$
+\end{center}
+Krugman, Paul~R. (1991) ``Is Bilateralism Bad?'' in Elhanan Helpman and Assaf
+ Razin eds. {\it International Trade and Trade Policy}, MIT Press,
+ Cambridge, MA, pp. 9--23.
+\end{Frame}
+
+\subsection{Customization of citation part}
+
+We have so far seen the customization of reference part. ``\texttt{econ.bst}''
+also can change the styles of citation part although it is highly limited.
+
+\subsubsection{The number of authors for ``\textit{et al.}'' in citation part}
+
+With \texttt{natbib.sty}, you can cite a paper by both full names and
+abbreviated names. For example, by using command `\verb|\citet|' and
+`\verb|\citet*|', you can generate the following two styles.
+\begin{itemize}
+ \item Citation by full names: \\
+ \verb|\citet*{Takeda2011b}| $\longrightarrow$ \citet*{Takeda2011b}
+ \item Citation by abbreviated names: \\
+ \verb|\citet{Takeda2011b}| $\longrightarrow$ \citet{Takeda2011b}
+\end{itemize}
+
+By the default, author names more than three are abbreviated. But you can change
+the number of authors to which abbreviation is applied. For example, if you set
+\verb|#4| to `\texttt{bst.and.others.num}`, abbreviation is applied only to the
+entry with more than four authors.
+\begin{Frame}
+\begin{verbatim}
+FUNCTION {bst.and.others.num}
+{ #4 }
+\end{verbatim}
+\end{Frame}
+
+\subsection{Customization of citation part by \texttt{natbib.sty}}
+
+The style of citation part is mainly controlled by \texttt{natbib.sty}. You can
+change the style of citation part by changing commands and options provided by
+\texttt{natbib.sty}.
+See the manual of \texttt{natbib.sty} for the details.
+\begin{itemize}
+ \item The manual of \texttt{natbib.sty}:
+ \href{http://ctan.math.utah.edu/ctan/tex-archive/macros/latex/contrib/natbib/natbib.pdf}{natbib.pdf}
+ \item The reference sheet of \texttt{natbib.sty}:
+ \href{http://mirror.las.iastate.edu/tex-archive/macros/latex/contrib/natbib/natnotes.pdf}{natnotex.pdf}
+\end{itemize}
+
+\subsubsection{Citation by number index}
+
+Here I show one customization of \texttt{natbib.sty} for citation style. With
+\texttt{natbib.sty}, we usually use ``author (year)'' citation format. However,
+we can use citation by numder index like [1], [2], [3]...
+
+To use this style, you first need to load \texttt{natbib} package with option
+``\texttt{numbers}''
+\begin{Frame}
+\begin{verbatim}
+\usepackage[numbers]{natbib}
+\end{verbatim}
+\end{Frame}
+
+In addition, you need to use \texttt{citep} command in the citation part like
+\begin{Frame}
+\begin{verbatim}
+\citep{Takeda2011b}
+\end{verbatim}
+\end{Frame}
+
+See ``\texttt{econ-numbers.tex}'' and ``\texttt{econ-numbers.pdf}'' for an example.
+
+\section{Certified random order}
+\label{sec:cro}
+
+\subsection{What is ``certified random order''?}
+
+The ordering of author names in joint publications in economics is typically
+alphabetical. However, alphabetical order has its shortcomings; in particular,
+it confers greater benefits on the first author.\footnote{See
+\citet{10.1257/aer.20161492} for the details.} This can happen for various
+reasons, including the use of the ``et al.'' convention, the bunching of
+bibliographic references for early-ordered names in reference lists, and the
+psychological focus on first authors.
+
+\citet{10.1257/aer.20161492} propose ``certified random order,'' in which names
+are separated by a symbol, \textcircled{r}, that certifies or signals that the
+author names are in random order. In particular, the symbol permits authors to
+``certify'' that a reverse name order is only due to randomization, and avoids
+the usual interpretation of name reversal in economics.
+
+``\texttt{econ.bst}'' can handle references to papers in random order. Examples
+of such papers in this document are \citet{10.1257/aer.20161492},
+\citet{RePEc:hka:wpaper:2018-037}, \citet{vohra18:_maxim_farsig_stabl_set},
+\citet{NBERw25205}.
+
+
+\subsection{How to cite papers in certified random order}
+
+To cite papers in certified random order with ``\texttt{econ.bst}'', you must
+flag those entries in the bib file. To achieve this, ``\texttt{econ.bst}''
+contains the field ``\texttt{nameorder}''. If the bibliographical entry uses
+random order, add the following information to that entry:
+\begin{verbatim}
+ nameorder = {random}
+\end{verbatim}
+
+For intance, the entry for \citet{10.1257/aer.20161492} is specified in
+\texttt{econ-example.bib} as follows:
+\begin{verbatim}
+@article{10.1257/aer.20161492,
+ Author = {Ray, Debraj and Robson, Arthur},
+ Title = {Certified Random: A New Order for Coauthorship},
+ Journal = {American Economic Review},
+ Volume = {108},
+ Number = {2},
+ Year = {2018},
+ Month = {February},
+ Pages = {489-520},
+ DOI = {10.1257/aer.20161492},
+ URL = {http://www.aeaweb.org/articles?id=10.1257/aer.20161492},
+ nameorder = {random}
+}
+\end{verbatim}
+
+\noindent \textbf{[Notes]} \\
+1. The field ``nameorder'' is currently unique to \texttt{econ.bst} and it
+is not a field used in bibliography databases (at least for now).
+
+\noindent 2. ``\texttt{econ.bst}'' does not itself randomize the order of
+names. It simply cites an existing reference in random order, as the authors
+intend it to be cited.
+\vspace*{1em}
+
+
+With the ``nameorder'' field in place, there is nothing else you need to change,
+and you can cite bibliographic entries as before. For example, the command
+\verb|\citet{10.1257/aer.20161492}| will generate the citation
+\citet{10.1257/aer.20161492} in the text, and the following entry in the
+references:
+
+\begin{quote}
+Ray, Debraj \textcircled{r} Arthur Robson (2018) ``Certified Random: A New Order
+for Coauthorship,'' \textit{American Economic Review}, Vol. 108, No. 2,
+pp. 489--520, URL: \url{http://www.aeaweb.org/articles?id=10.1257/aer.20161492},
+DOI: \href{http://dx.doi.org/10.1257/aer.20161492}{10.1257/aer.20161492}.
+\end{quote}
+
+Under the random order style, an entry with two authors is cited as already
+described: \citet{10.1257/aer.20161492}. On the other hand, an entry with more
+than two authors has two citation styles, depending on whether all names are
+cited in full, or the citation is abbreviated:
+\begin{itemize}
+ \item All-names citation $\longrightarrow$ \citet*{NBERw25205}
+ \item Abbreviated citation $\longrightarrow$ \citet{NBERw25205}
+\end{itemize}
+
+Note that in the abbreviated names style, \textcircled{r} is used instead of
+``et''. Think of \textcircled{r} as a conjunction just as ``and'' or ``but''. In
+verbal citations, it would be pronounced just as the letter ``r'' is pronounced.
+
+\subsection{Customization for certified random order}
+
+The behavior of random order is controlled by the following functions:
+`\texttt{bst.use.nameorder}', `\texttt{bst.and.nameorder}',
+`\texttt{bst.cite.and.nameorder}' and `\texttt{bst.and.others.nameorder}'.
+\vspace*{1em}
+
+Under the default setting of ``\texttt{econ.bst}'', random order is
+automatically used for bibliographic entries with `\texttt{nameorder}' field.
+However, if you set \verb|#0| to `\texttt{bst.use.nameorder}' as follows, the
+function of random order is not used.
+\begin{Frame}
+\begin{verbatim}
+FUNCTION {bst.use.nameorder}
+{ #0 } % Not use random order
+\end{verbatim}
+\end{Frame}
+
+Under the default setting, the symbol ``\textcircled{r}''
+(\verb|\textcircled{r}|) is used. But you can use another symbol. If you want
+to use an alternative symbol, you need to change settings for
+`\texttt{bst.and.nameorder}', `\texttt{bst.cite.and.nameorder}' and
+`\texttt{bst.and.others.nameorder}'.
+
+
+\section{Sorting rule}
+\label{sec:sort_rule}
+
+\noindent \textbf{[Note]} If you want to create an ordinary list of
+references, you need not read this part. The explanation below is
+for sorting references in a special way.
+
+\subsection{Basic sorting rule}
+
+The sorting of references is done according to values of fields defined
+in bib files. Basically, sorting is done according to the following
+order of priority:
+\begin{enumerate}
+ \item Type of entry (if ``\texttt{bst.sort.entry.type}'' has non-zero value)
+ \item Value of ``\texttt{year}'' field (if ``\texttt{bst.sort.year}'' has non-zero value)
+ \item Value of ``\texttt{absorder}'' field.
+ \item Value of ``\texttt{author}'' (or ``\texttt{editor}'') field.
+ \item Value of ``\texttt{year}'' field.
+ \item Value of ``\texttt{order}'' field.
+ \item Value of ``\texttt{month}'' field.
+ \item Value of ``\texttt{title}'' field.
+\end{enumerate}
+
+By default,
+\begin{itemize}
+ \item ``\texttt{bst.sort.entry.type}'' and ``\texttt{bst.sort.year}'' have
+ zero,
+ \item \textbf{''\texttt{absorder}''} and \textbf{''\texttt{order}''}
+ fields are not assigned values because they are fields specific
+ to ``\texttt{econ.bst}''.
+\end{itemize}
+Thus, references are sorted according to
+\begin{Frame}
+ \begin{center}
+ ``\texttt{author}'' $\rightarrow$ ``\texttt{year}'' $\rightarrow$
+ ``\texttt{month}'' $\rightarrow$ ``\texttt{title}''
+\end{center}
+\end{Frame}
+That is, ``\texttt{author}'' is used as the primary key, ``\texttt{year}'' as
+the secondary key, ``\texttt{month}'' as the third key and ``\texttt{title}'' as
+the fourth key.
+
+\subsection{No sorting}
+
+If you want to list references in citation order, set non-zero value to
+``\texttt{bst.no.sort}''.
+\begin{Frame}
+\begin{verbatim}
+FUNCTION {bst.no.sort}
+{ #1 }
+\end{verbatim}
+\end{Frame}
+
+Note that when you set non-zero value to ``\texttt{bst.no.sort}'', you had better not
+use \verb|\bysame|.
+
+\subsection{Sort references by type}
+
+If you want to gather references according to their types (article,
+book, incollection, unpublished etc.), set non-zero value to
+``\texttt{bst.sort.entry.type}''.
+\begin{Frame}
+\begin{verbatim}
+FUNCTION {bst.sort.entry.type}
+{ #1 }
+\end{verbatim}
+\end{Frame}
+
+Order of listing by entry type is determined by function
+``\texttt{bst.sort.entry.type.order}'' (by default, listed in alphabetical
+order, that is, article $\rightarrow$ book $\rightarrow$ booklet
+$\rightarrow$ comment $\rightarrow$ inbook $\rightarrow$ incollection
+$\rightarrow$ $\cdots$ $\rightarrow$ unpublished). See
+``\texttt{bst.sort.entry.type.order}'' in ``\texttt{econ.bst}''.
+
+\subsection{Use ``\texttt{year}'' as the primary sorting key}
+
+When you create CV or a list of your papers, you may want to sort
+references in chronological order. If all papers are written soley by
+yourself, references are sorted in chronological order by default.
+However, there are co-writers and if you are not the first author,
+references are not sorted in chronological order because the author name
+is used as the primary sorting key by default.
+If you want to sort references in chronological order even when
+there are co-writers, set non-zero to ``\texttt{bst.sort.year}''.
+\begin{Frame}
+\begin{verbatim}
+FUNCTION {bst.sort.year}
+{ #1 }
+\end{verbatim}
+\end{Frame}
+
+By default, old references are listed first. But if you set non-zero to
+``\texttt{bst.reverse.year}'', new references are listed first.
+
+\subsection{Sorting by ''\texttt{absorder}'' field}
+
+If ``\texttt{absorder}'' is defined in bib file,
+``\texttt{econ.bst}'' uses its content as the primary sorting key.
+You can set number 0--999 to ''\texttt{absorder}'' field.
+
+\begin{Frame}
+\begin{center}
+ no absorder or absorder = 0 $\rightarrow$ absorder = 1 $\rightarrow$ absorder = 2
+ $\rightarrow$ $\cdots$ $\rightarrow$ absorder = 999
+\end{center}
+\end{Frame}
+That is, reference with a small value of ``\texttt{absorder}'' is listed
+first. In this document (``\texttt{econ-example.bib}''), the reference
+with the key \citet{takeda10:_cge_analy_welfar_effec_trade} has 999 for
+``\texttt{absorder}'' field and thus listed in the last.
+
+
+\subsubsection{Ignore ''\texttt{absorder}'' field}
+
+If you set some values for ``\texttt{absorder}'' fields in bib file,
+but if you want to ignore them, set non-zero to
+``\texttt{bst.notuse.absorder.field}''.
+\begin{Frame}
+\begin{verbatim}
+FUNCTION {bst.notuse.absorder.field}
+{ #1 }
+\end{verbatim}
+\end{Frame}
+
+\section{Misc.}
+
+\begin{itemize}
+ \item Email: \verb|<shiro.takeda@gmail.com>|.
+ \item ``\texttt{econ.bst}'' is available at \url{https://github.com/ShiroTakeda/econ-bst}.
+\end{itemize}
+\vspace*{1em}
+
+\citet{borgers95:_note_implem_stron_domin},
+\citet{bergemann11:_ration},
+\citet{takeda2011c},
+\citet{Takeda2011b},
+\citet{Biker-2007-unemployment},
+\citet{Babiker-1999-JapaneseNuclearPower},
+\citet{Babiker-1999-KyotoProtocoland},
+\citet{Babiker2000525},
+\citet{BabikerRutherford-2005-EconomicEffectsof},
+\citet{goldin:katz:2011}, \citet{goldin:katz:2008}, \citet{goldin:katz:2000}.
+\citet{stakeda2013web}
+\vspace*{1em}
+
+\nocite{*}
+
+%%% BibTeX style.
+\bibliographystyle{econ}
+
+%% BibTeX database file.
+\addcontentsline{toc}{section}{References}
+\bibliography{econ-example}
+
+\end{document}
+
+%#####################################################################
+%######################### Document Ends #############################
+%#####################################################################
+% --------------------
+% Local Variables:
+% fill-column: 80
+% End:
+
diff --git a/biblio/bibtex/contrib/econ-bst/econ.bst b/biblio/bibtex/contrib/econ-bst/econ.bst
new file mode 100644
index 0000000000..802f4c9658
--- /dev/null
+++ b/biblio/bibtex/contrib/econ-bst/econ.bst
@@ -0,0 +1,3521 @@
+%% econ.bst: BibTeX style file for papers in economics.
+%
+% Author: Shiro Takeda
+% Maintainer: Shiro Takeda
+% Copyright (C) 2001-2018 Shiro Takeda
+% First-written: <2007/07/28>
+% Time-stamp: <2018-12-07 18:49:14 st>
+% Version: 2.5
+% Keywords: TeX, BibTeX, bst
+% URL: https://github.com/ShiroTakeda/econ-bst
+
+% This work may be distributed and/or modified under the
+% conditions of the LaTeX Project Public License, either version 1.3
+% of this license or (at your option) any later version.
+% The latest version of this license is in
+% http://www.latex-project.org/lppl.txt
+% and version 1.3 or later is part of all distributions of LaTeX
+% version 2005/12/01 or later.
+%
+% This work has the LPPL maintenance status "maintained".
+%
+% The Current Maintainer of this work is Shiro Takeda.
+
+%% Main features of econ.bst.
+
+% "econ.bst" is a BibTeX style file for economics. It provids the following
+% features:
+
+% 1) The author-year type citation (you need "natbib.sty" as well).
+% 2) Reference style used in economics papers ("econ.bst" is not a BibTeX style
+% for a specific journal).
+% 3) Highly customizable. You can easily customize reference style as you wish.
+% 4) You can use "certified random order" proposed by Ray ⓡ Robson (2018)
+% (http://dx.doi.org/10.1257/aer.20161492).
+
+% Bug reports, requests and suggestions are welcome.
+
+% For changelogs, see CHANGES.txt file.
+
+% version number
+FUNCTION {econ.version} { "2.5" }
+
+% Debug mode. Non-zero makes debug mode on.
+FUNCTION {econ.debug}
+{ #0 } % Debug mode off (default).
+% { #1 } % Debug mode on.
+
+ENTRY
+ %%% Declaration of field
+ { access address author booktitle chapter doi edition editor howpublished
+ institution journal key month note number organization pages publisher
+ school series title type url volume year
+ % Fields specific to econ.bst
+ order absorder nameorder
+ }
+
+ % Definition of entry variable. The entry variable is a variable which has
+ % different values according to different entries.
+ %% Integer entry variable:
+ { order.cited }
+
+ %% String entry variable
+ { label cyear flabel alabel extra.label sort.label sort.label.abb
+ extra.label.bysame nameorder.temp }
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%%
+%% Functions for customization:
+%%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+% Use \bysame or not.
+%
+% If set to #0, \bysame is not used.
+% If set to #1, \bysame is used
+% If set to #2, \bysame is used (alternative abbreviation style).
+%
+% Note that integer number is expressed as # + integer in bst file.
+% \bysame is the function that abbreviates succession of the same authors' name by ---.
+%
+% See econ-sample.pdf for details.
+%
+FUNCTION {bst.use.bysame}
+% { #0 } % Not use \bysame
+{ #1 } % -> Use \bysame (default)
+% { #2 } % -> Use \bysame of alternative style.
+
+% The definition of \bysame command.
+%
+FUNCTION {bst.bysame.definition}
+{ "\hskip.3em \leavevmode\rule[.5ex]{3em}{.3pt}\hskip0.5em" } % (default)
+% { "\leavevmode\hbox to\leftmargin{\hrulefill\,\,}" } % If you set #2 to bst.use.bysame, use this.
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+% The order of fist and last name.
+%
+FUNCTION {bst.author.name}
+{ #0 } % (default)
+% { #1 }
+% { #2 }
+
+% Case of #0: First author -> last-first, other authors -> first-last.
+% Fujita, Masahisa, Paul R. Krugman, and Anthony J. Venables.
+
+% Case of #1: All authors -> last-first
+% Fujita, Masahisa, Krugman, Paul R., and Venables, Anthony J.
+
+% Case of #2: All authors -> first-last
+% Masahisa Fujita, Paul R. Krugman, and Anthony J. Venables.
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+% Abbreviate first name of authors (editors):
+%
+FUNCTION {bst.first.name.initial}
+{ #0 } % #0 -> full letters (default).
+% { #1 } % Non-zero -> initial letter only.
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+% Decapitalize of strings in title field.
+%
+FUNCTION {bst.title.lower.case}
+{ #0 } % If #0, not decapitalize title (default).
+% { #1 } % If non-#0, decapitalize title
+
+% Hide title filed.
+%
+FUNCTION {bst.hide.title}
+{ #0 } % #0 -> Title field is displayed (default)
+% { #1 } % Non-zer -> Title field is hidden
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+% Hide month.
+%
+FUNCTION {bst.hide.month}
+{ #0 } % #0 -> show month field (default).
+% { #1 } % non-#0 -> hide month field.
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+% Attach number index like plain.bst.
+%
+FUNCTION {bst.use.number.index}
+{ #0 } % Not use number index (default).
+% { #1 } % Non-#0 -> Use number index
+
+% The string before number index:
+%
+FUNCTION {bst.number.index.pre}
+{ "[" } % (default)
+
+% The string after number index. Adjustment is recommended.
+%
+FUNCTION {bst.number.index.post}
+{ "]\hskip1.0em " } % (default)
+
+% Maximum digit of number index:
+% If the number of reference items >= 100, set 3 to this function.
+% If the number of reference items < 100, set 2 to this function.
+% If the number of reference items < 10, set 1 to this function.
+%
+FUNCTION {bst.number.index.digit}
+{ "2" } % (default)
+% { "3" }
+
+% The functions below are used to adjust space and postion. If you use fonts
+% other than computer modern fonts, you had better make adjustments.
+%
+% Setting for bst.number.index.digit = 1:
+FUNCTION {bst.number.index.bibhang.one}
+{ "2.05em" } % (default)
+% Setting for bst.number.index.digit = 2:
+FUNCTION {bst.number.index.bibhang.ten}
+{ "2.55em" } % (default)
+% Setting for bst.number.index.digit = 3:
+FUNCTION {bst.number.index.bibhang.hund}
+{ "3.05em" } % (default).
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+% Position of "year":
+%
+% You can choose the position of year by this function.
+%
+% If set to #0, year is placed right after "author".
+% If set to non-zero, year is placed at the end (before note field) except for
+% aritcle type entry.
+%
+% In article type entry, the position of year changes according to the
+% following rule:
+%
+% #1 -> year is placed at the end.
+% #2 -> year is placed after journal name in aritcle type entry.
+% #3 -> year is placed after volume in aritcle type entry.
+%
+FUNCTION {bst.year.position}
+{ #0 } % (default).
+% { #1 } % Last place before note.
+% { #2 } % After journal name for aticle type entry.
+% { #3 } % After volume for aticle type entry.
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+% If 0, references are sorted by old documents -> recent documents. If
+% non-zero, reverse order.
+FUNCTION {bst.reverse.year}
+{ #0 } % Normal order (old -> recent) (default).
+% { #1 } % inverse order (recent -> old)
+
+% If non-zero, sort references by using year field as the primary key
+% (chronological sorting).
+FUNCTION {bst.sort.year}
+{ #0 } % Normal case: year is used as the sorting key next to author (default).
+% { #1 } % year is used as the primary sorting key.
+
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+% If non-zero, references are listed in citation order.
+%
+FUNCTION {bst.no.sort}
+{ #0 } % (default)
+% { #1 } % listed in citation order.
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+% Non-zero -> sort references by entry type (article, book, incollection etc.)
+%
+FUNCTION {bst.sort.entry.type}
+{ #0 } % #0 -> Normal (not sort references by entry type) (default).
+% { #1 } % Non-zero -> sort references by entry type.
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+% 0 -> use absorder field to sort items. Otherwise, ignore absorder field.
+%
+FUNCTION {bst.notuse.absorder.field}
+{ #0 } % #0 -> Use absorder (default).
+% { #1 } % Non-#0 -> Not use absorder.
+%
+% Order of priority to sort items
+%
+% absorder -> author -> year -> order -> month -> title
+%
+% wehre absorder and order fields are specific to econ.bst.
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+% 0 -> use order field to sort items. Otherwise, ignore order field.
+% Note: order field is specific to econ.bst.
+FUNCTION {bst.notuse.order.field}
+{ #0 } % #0 -> Use order field (default).
+% { #1 } % Non-#0 -> not use order field.
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%%% and
+
+%%% String used to separate author names in references.
+%
+% String replaced with _ in "Mr. A _ Mr. B "
+%
+FUNCTION {bst.and}
+{ " and " } % (default)
+
+%%% String used to separate author names in references (more than two authors).
+%
+% String replaced with _ in "Mr. A, Mr. B _ Mr. C"
+%
+FUNCTION {bst.ands}
+{ ", and " } % (default)
+
+%%% String used to separate author names in citation part.
+%
+% String replaced with _ in "Mr. A _ Mr. B "
+%
+FUNCTION {bst.cite.and}
+{ " and " } % (default)
+
+%%% String used to separate author names in citation part (more than two authors).
+%
+% String replaced with _ in "Mr. A, Mr. B _ Mr. C"
+%
+FUNCTION {bst.cite.ands}
+{ " and " } % (default)
+
+%%% If you want to use random author order for some bibliography entries, set
+% non-zero to this function.
+%
+FUNCTION {bst.use.nameorder}
+{ #1 } % Use random order (default)
+% { #0 } % Not use random order
+
+%%% String used to separate author names in references for the entry of random
+% author order.
+%
+FUNCTION {bst.and.nameorder}
+{ " \textcircled{r} " } % (default)
+
+%%% String used to separate author names in citation part for the entry of
+% random author order
+%
+FUNCTION {bst.cite.and.nameorder}
+{ " \textcircled{r} " } % (default)
+
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+% Author names in the citation part are abbreviated by et al. if the number of
+% authors is greater or equal to bst.and.others.num.
+FUNCTION {bst.and.others.num}
+{ #3 } % If the number of authors is greater or equal to three (default).
+% { #4 }
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+% Strings used when abbreviating multiple-authors in citation part.
+FUNCTION {bst.and.others}
+{ " et~al." } % (default)
+
+% Strings used when abbreviating multiple-authors in citation part for entries
+% with random author order.
+FUNCTION {bst.and.others.nameorder}
+{ " \textcircled{r}~al." } % (default)
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% author
+
+% The string before author:
+%
+FUNCTION {bst.author.pre}
+{ "" } % (default)
+
+% The string after author:
+%
+FUNCTION {bst.author.post}
+{ "" } % (default)
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% year
+
+% The string before year only for aritcle type entry.
+%
+FUNCTION {bst.year.pre}
+{ " (" } % (default)
+
+% The string after year only for aritcle type entry.
+%
+FUNCTION {bst.year.post}
+{ ") " } % (default)
+
+% The string after year for non-article type entry (book, incollection etc)
+%
+FUNCTION {bst.year.na.pre}
+{ " (" } % (default)
+
+% The string after year for non-article type entry (book, incollection etc)
+%
+FUNCTION {bst.year.na.post}
+{ ") " } % (default)
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% title (except for title in book)
+
+% The string before title:
+%
+FUNCTION {bst.title.pre}
+{ "``" } % (default)
+
+% The string after title:
+%
+FUNCTION {bst.title.post}
+{ ",''" } % (default)
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% tile for book:
+
+% The string before book title:
+%
+FUNCTION {bst.book.pre}
+{ " \textit{" } % (default)
+
+% The string after book title:
+%
+FUNCTION {bst.book.post}
+{ "}" } % (default)
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% booktitle
+
+% The string before booktitle:
+%
+FUNCTION {bst.btitle.pre}
+{ " \textit{" } % (default)
+
+% The string after booktitle:
+%
+FUNCTION {bst.btitle.post}
+{ "}" } % (default)
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% journal name
+
+% The string before journal name:
+%
+FUNCTION {bst.journal.pre}
+{ " \textit{" } % (default)
+
+% The string after journal name:
+%
+FUNCTION {bst.journal.post}
+{ "}" } % (default)
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% editor notation:
+
+% The string that indicates multiple editors:
+%
+FUNCTION {bst.editors}
+{ " eds. " } % (default)
+
+% The string that indicates single editor:
+%
+FUNCTION {bst.editor}
+{ " ed. " } % (default)
+
+% Order of editor and booktitle in incollection and inproceedings entries.
+%
+% If set to #0: editors -> booktitle order
+% If set to non-zero: booktitle -> editors order
+%
+FUNCTION {bst.editor.btitle.order}
+{ #0 } % (default)
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% edition
+
+% The string before edition:
+%
+FUNCTION {bst.edition.pre}
+{ ", " } % (default)
+
+% The string after edition:
+%
+FUNCTION {bst.edition.post}
+{ " edition" } % (default)
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% volume
+
+% The string before volume:
+%
+FUNCTION {bst.volume.pre}
+{ ", Vol. " } % (default)
+
+% The string after volume:
+%
+FUNCTION {bst.volume.post}
+{ "" } % (default)
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% number
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+% Hide number. If non-zero, number is suppressed.
+FUNCTION {bst.hide.number}
+{ #0 } % #0 -> show number field (default)
+% { #1 } % non-#0 -> Hide number field.
+
+% The string before number:
+%
+FUNCTION {bst.number.pre}
+{ ", No. " } % (default)
+
+% The string after number:
+%
+FUNCTION {bst.number.post}
+{ "" } % (default)
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% in
+
+% In
+%
+FUNCTION {bst.in}
+{ " in " } % (default)
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% page
+
+% The string before page (multiple pages):
+%
+FUNCTION {bst.pages.pre}
+{ ", pp." } % (default)
+
+% The string before page:
+%
+FUNCTION {bst.page.pre}
+{ ", p." } % (default)
+
+% The string after page (multiple pages):
+%
+FUNCTION {bst.pages.post}
+{ "" } % (default)
+
+% The string after page:
+%
+FUNCTION {bst.page.post}
+{ "" } % (default)
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% chapter
+
+% The string before chapter:
+%
+FUNCTION {bst.chapter.pre}
+{ ", Chap." } % (default)
+
+% The string after chapter:
+%
+FUNCTION {bst.chapter.post}
+{ "" } % (default)
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% month
+
+% The string before month:
+%
+FUNCTION {bst.month.pre}
+{ ", " } % (default)
+
+% The string after month:
+%
+FUNCTION {bst.month.post}
+{ "" } % (default)
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% address
+% The string before address:
+%
+FUNCTION {bst.address.pre}
+{ ", " } % (default)
+
+% The string after address:
+%
+FUNCTION {bst.address.post}
+{ "" } % (default)
+
+% You can choose the order of address and publisher by this function.
+%
+% If #0, address -> publisher order (the default value).
+% If non-zero, publisher -> address order.
+
+FUNCTION {bst.address.position}
+{ #0 } % Address is placed before publisher (default)
+% { #1 } % Address is placed after publisher
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% publisher
+
+% The string before publisher:
+%
+FUNCTION {bst.publisher.pre}
+{ ": " } % (default)
+
+% The string after publisher:
+%
+FUNCTION {bst.publisher.post}
+{ "" } % (default)
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% series
+
+% The string before series:
+%
+FUNCTION {bst.series.pre}
+{ ", " } % (default)
+
+% The string after series:
+%
+FUNCTION {bst.series.post}
+{ "" } % (default)
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% organization
+
+% The string before organization:
+%
+FUNCTION {bst.organization.pre}
+{ ", " } % (default)
+
+% The string after organization:
+%
+FUNCTION {bst.organization.post}
+{ "" } % (default)
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% school
+
+% The string before school:
+%
+FUNCTION {bst.school.pre}
+{ ", " } % (default)
+
+% The string after school:
+%
+FUNCTION {bst.school.post}
+{ "" } % (default)
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% institution
+
+% The string before institution:
+%
+FUNCTION {bst.institution.pre}
+{ ", " } % (default)
+
+% The string after institution:
+%
+FUNCTION {bst.institution.post}
+{ "" } % (default)
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% howpublished
+
+% The string before howpublished:
+%
+FUNCTION {bst.howpublished.pre}
+{ " " } % (default)
+
+% The string after howpublished:
+%
+FUNCTION {bst.howpublished.post}
+{ "" } % (default)
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% url
+
+% Show or Hide url. If non-zero, url is displayed. Otherwise, url is suppressed.
+FUNCTION {bst.show.url}
+{ #1 } % non-#0 -> Show url field (default)
+% { #0 } % #0 -> Not show url field.
+
+% The string before url:
+%
+FUNCTION {bst.url.pre}
+{ ", URL: \url{" } % (default)
+
+% The string after url:
+%
+FUNCTION {bst.url.post}
+{ "}" } % (default)
+
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% Access
+
+% This setting is valid only if there are "access" field in bib
+% files. The value of access field indicates accessed date for URL.
+
+% The string before access.
+FUNCTION {bst.access.pre}
+{ ", accessed on " } % (default)
+
+% The string after access.
+FUNCTION {bst.access.post}
+{ "" } % (default)
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% DOI (digital object identifier)
+
+% This setting is valid only if there are "doi" field in bib files.
+
+% Show or Hide DOI. If non-zero, DOI is displayed. Otherwise, DOI is suppressed.
+FUNCTION {bst.show.doi}
+{ #1 } % non-#0 -> Show DOI field (default)
+% { #0 } % #0 -> Not show DOI field.
+
+% The string before DOI:
+%
+FUNCTION {bst.doi.pre}
+{ ", DOI: \href{http://dx.doi.org/" doi * "}{" * } % (default)
+
+% The string after DOI:
+%
+FUNCTION {bst.doi.post}
+{ "}" } % (default)
+
+% How to show URL and DOI fields when both fields exist.
+%
+% #0 -> Both fields are displayed
+% #1 -> Only URL field is displayed
+% #2 -> Only DOI field is displayed
+%
+FUNCTION {bst.url.doi}
+{ #0 } % (default) -> Both fields are displayed
+% { #1 } % -> Only URL field is displayed
+% { #2 } % -> Only DOI field is displayed
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% Other functions:
+
+% The string before note.
+FUNCTION {bst.note.pre}
+{ ", " } % (default)
+
+% The string after note.
+FUNCTION {bst.note.post}
+{ "" } % (default)
+
+% The string that represents Technical report:
+%
+FUNCTION {bst.techrep}
+{ " Tech. Rep." } % (default)
+
+% The string that represents master thesis:
+%
+FUNCTION {bst.mthesis}
+{ " Master's thesis" } % (default)
+
+% The string that represents phd thesis:
+%
+FUNCTION {bst.phdthesis}
+{ " Ph.D. dissertation" } % (default)
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%%
+%% Functions for customization end here:
+%%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+FUNCTION {bst.first}
+{ "1st" }
+
+FUNCTION {bst.second}
+{ "2nd" }
+
+FUNCTION {bst.third}
+{ "3rd" }
+
+FUNCTION {bst.fourth}
+{ "4th" }
+
+FUNCTION {bst.fifth}
+{ "5th" }
+
+FUNCTION {bst.st}
+{ "st" }
+
+FUNCTION {bst.nd}
+{ "nd" }
+
+FUNCTION {bst.rd}
+{ "rd" }
+
+FUNCTION {bst.th}
+{ "th" }
+
+%%%%% memo by Takeda
+
+% "a" 'b := indicates substituting string "a" for variable b.
+
+% Integer number #0, #1,...
+
+%%% Function definition:
+%
+% FUNCTION {name}
+% { 's :=
+%
+% }
+%
+% This is the definition of a function named "name". The function "name" is
+% used in the following way
+%
+% "foo" name
+% "foo" is an argument for the function "name".
+%
+% About the definition of a function with more than two arguments, see the
+% definition of "chop.word".
+
+%%% Declaration of variables:
+
+%% String global variables:
+STRINGS { s t tt }
+STRINGS { year.num }
+STRINGS { preone preten }
+STRINGS { last.sort.label next.extra prev.author prev.author.aer this.author }
+STRINGS { hang }
+STRINGS { item.type }
+STRINGS { tempa tempb }
+
+%% Integer global variables:
+INTEGERS { nameptr namesleft numnames name.num }
+INTEGERS { multiresult }
+INTEGERS { index }
+INTEGERS { len }
+INTEGERS { last.extra.num }
+INTEGERS { output.state before.all mid.sentence after.sentence after.block }
+INTEGERS { last.period.comma }
+INTEGERS { len1.aer len2.aer i.aer }
+
+%%% Definition of functions:
+FUNCTION {not}
+{ { #0 }
+ { #1 }
+ if$
+}
+
+FUNCTION {and}
+{ 'skip$
+ { pop$ #0 }
+ if$
+}
+
+FUNCTION {or}
+{ { pop$ #1 }
+ 'skip$
+ if$
+}
+
+%%% Initialize variables:
+FUNCTION {init.state.consts}
+{ #0 'before.all :=
+ #1 'mid.sentence :=
+ #2 'after.sentence :=
+ #3 'after.block :=
+}
+
+%%% Remove comma and add period:
+%
+%%%
+FUNCTION {add.period.x}
+{ duplicate$
+ #-1 #1 substring$ "," =
+ { #-2 global.max$ substring$ "." * }
+ { duplicate$
+ #-1 #2 substring$ ". " =
+ { #-3 global.max$ substring$ "." * }
+ { duplicate$
+ #-1 #2 substring$ ", " =
+ { #-3 global.max$ substring$ "." * }
+ { duplicate$
+ #-1 #2 substring$ ",'" =
+ { #-3 global.max$ substring$ ".'" * }
+ { duplicate$
+ #-1 #2 substring$ ".'" =
+ { #-3 global.max$ substring$ ".'" * }
+ { duplicate$
+ #-1 #2 substring$ ".~" =
+ { #-3 global.max$ substring$ ".~" * }
+ { duplicate$
+ #-1 #2 substring$ ",~" =
+ { #-3 global.max$ substring$ ".~" * }
+ { duplicate$
+ #-1 #3 substring$ ",''" =
+ { #-4 global.max$ substring$ ".''" * }
+ { duplicate$
+ #-1 #3 substring$ ".''" =
+ { #-4 global.max$ substring$ ".''" * }
+ { add.period$ }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+}
+
+FUNCTION {output.nonnull}
+{ 's :=
+ % mid.sentence
+ output.state mid.sentence =
+ { ", " * write$ }
+ % not mid.sentence
+ { output.state after.block =
+ % after.block
+ { add.period.x " " * write$ }
+ % before.all
+ { output.state before.all =
+ 'write$
+ { add.period.x " " * write$ }
+ if$
+ }
+ if$
+ % not mid.sentence, set to mid.sentence
+ mid.sentence 'output.state :=
+ }
+ if$
+ s
+}
+
+%%% If the last character is period or comma, set non-zero to
+%%% last.period.comma.
+FUNCTION {period.comma.p}
+{ duplicate$ 't :=
+ t #-1 #1 substring$ "." =
+ t #-1 #1 substring$ "," = or
+ t #-1 #1 substring$ ":" = or
+ t #-1 #2 substring$ ".'" = or
+ t #-1 #2 substring$ ",'" = or
+ t #-1 #3 substring$ ".''" = or
+ t #-1 #3 substring$ ",''" = or
+ t #-1 #2 substring$ ".~" = or
+ t #-1 #2 substring$ ",~" = or
+ { #1 'last.period.comma := }
+ { #0 'last.period.comma := }
+ if$
+}
+
+%%% remove unnecessary comma.
+FUNCTION {remove.pre.comma}
+{ 's :=
+ s empty$
+ { "" }
+ { s #1 #1 substring$ "," =
+ { s #2 global.max$ substring$ }
+ { s #1 #1 substring$ "." =
+ { s #2 global.max$ substring$ }
+ 's
+ if$
+ }
+ if$
+ }
+ if$
+}
+
+%%% output.nonnull.nocomma is the same as output.nonnull except that it does
+%%% not add commas even in mid.sentence.
+FUNCTION {output.nonnull.nocomma}
+{ 's :=
+ output.state mid.sentence =
+ % mid.sentence
+ { period.comma.p "" * write$ }
+
+ % not mid.sentence
+ { output.state after.block =
+ % after.block
+ { add.period.x " " * write$ }
+ % before.all
+ { output.state before.all =
+ 'write$
+ { add.period$ " " * write$ }
+ if$
+ }
+ if$
+ mid.sentence 'output.state :=
+ }
+ if$
+ last.period.comma #0 =
+ { s }
+ { s remove.pre.comma }
+ if$
+}
+
+% Not used in the current econ.bst.
+% FUNCTION {output}
+% { duplicate$ empty$
+% 'pop$
+% 'output.nonnull
+% if$
+% }
+
+FUNCTION {output.nocomma}
+{ duplicate$ empty$
+ 'pop$
+ 'output.nonnull.nocomma
+ if$
+}
+
+% Not used in the current econ.bst.
+% FUNCTION {output.check}
+% { 't :=
+% duplicate$ empty$
+% { pop$ "empty " t * " in " * cite$ * warning$ }
+% 'output.nonnull
+% if$
+% }
+
+FUNCTION {output.check.nocomma}
+{ 't :=
+ duplicate$ empty$
+ { pop$ "empty " t * " in " * cite$ * warning$ }
+ 'output.nonnull.nocomma
+ if$
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%%% Format in bbl file:
+
+% \harvarditem[Brezis et~al.]{Brezis, Krugman and
+% Tsiddon}{1993}{brezis93:_leapf_inter_compet}
+% Brezis, Elise~S., Paul~R. Krugman, and Daniel Tsiddon (1993) ``Leapfrogging in
+% International Competition: A Theory of Cycles in National Technological
+% Leadership.'', {\em American Economic Review.}, Vol.~83. No.~5. pp.
+% 1211--1219.
+
+% \harvarditem[abbreviated citation]{full citation}{year}{keyword} ...
+
+%%% Add period and newline.
+FUNCTION {fin.entry}
+{ add.period.x
+ write$
+ newline$
+}
+
+FUNCTION {new.block}
+{ output.state before.all =
+ 'skip$
+ { after.block 'output.state := }
+ if$
+}
+
+FUNCTION {new.sentence}
+{ output.state after.block =
+ 'skip$
+ { output.state before.all =
+ 'skip$
+ { after.sentence 'output.state := }
+ if$
+ }
+ if$
+}
+
+FUNCTION {new.block.check}
+{ empty$
+ 'skip$
+ 'new.block
+ if$
+}
+
+FUNCTION {field.or.null}
+{ duplicate$ empty$
+ { pop$ "" }
+ 'skip$
+ if$
+}
+
+%%% booktitle
+FUNCTION {format.btitle}
+{ booktitle empty$
+ { "" }
+ { bst.btitle.pre booktitle * bst.btitle.post * }
+ if$
+}
+
+%%% journal
+FUNCTION {format.journal}
+{ journal empty$
+ { "" }
+ { bst.journal.pre journal * bst.journal.post * }
+ if$
+}
+
+%%% title for book
+FUNCTION {format.book}
+{ title empty$
+ { "" }
+ { bst.book.pre title * bst.book.post * }
+ if$
+}
+
+FUNCTION {format.url}
+{ url empty$
+ { "" }
+ { type$ "online" = bst.show.url or
+ { bst.url.pre url * bst.url.post *
+ access empty$
+ { "" * }
+ { bst.access.pre * access * bst.access.post * }
+ if$
+ }
+ { "" }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.doi}
+{ doi empty$ bst.show.doi not or
+ { "" }
+ { bst.doi.pre doi * bst.doi.post * }
+ if$
+}
+
+FUNCTION {format.url.doi}
+{ url empty$
+ { format.doi }
+ { doi empty$
+ { format.url }
+ { bst.url.doi #0 =
+ { format.url output.nocomma
+ format.doi }
+ { bst.url.doi #1 =
+ { format.url }
+ { format.doi }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+}
+
+%%% and others
+FUNCTION {bst.and.others.output}
+{ nameorder.temp "random" =
+ bst.use.nameorder #0 = not and
+ { bst.and.others.nameorder }
+ { bst.and.others }
+ if$
+}
+
+%%% author and editor
+
+%%% name
+FUNCTION {format.names}
+{ 's :=
+ % insert 1 to nameptr.
+ #1 'nameptr :=
+ % Set the number of authors to numnames.
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ % Repeat if namesleft > 0
+ { namesleft #0 > }
+ { nameptr #1 =
+ % First author
+ { bst.author.name #0 =
+ bst.author.name #1 =
+ or
+ { bst.first.name.initial #0 =
+ { s nameptr "{vv~}{ll}{, ff}{, jj}" format.name$ 't := }
+ { s nameptr "{vv~}{ll}{, f.}{, jj}" format.name$ 't := }
+ if$
+ }
+ { bst.first.name.initial #0 =
+ { s nameptr "{ff~}{vv~}{ll}{, jj}" format.name$ 't := }
+ { s nameptr "{f.~}{vv~}{ll}{, jj}" format.name$ 't := }
+ if$
+ }
+ if$
+ }
+ % The second or later authors
+ { bst.author.name #0 =
+ bst.author.name #2 =
+ or
+ { bst.first.name.initial #0 =
+ { s nameptr "{ff~}{vv~}{ll}{, jj}" format.name$ 't := }
+ { s nameptr "{f.~}{vv~}{ll}{, jj}" format.name$ 't := }
+ if$
+ }
+ { bst.first.name.initial #0 =
+ { s nameptr "{vv~}{ll}{, ff}{, jj}" format.name$ 't := }
+ { s nameptr "{vv~}{ll}{, f.}{, jj}" format.name$ 't := }
+ if$
+ }
+ if$
+ }
+ if$
+
+ nameptr #1 >
+ % The second or later authors
+ { nameorder.temp "random" =
+ bst.use.nameorder #0 = not and
+ { bst.and.nameorder * t * }
+ { namesleft #1 >
+ % More than one authors left
+ { ", " * t * }
+ % Only one author left
+ { t "others" =
+ { bst.and.others.output * }
+ { numnames #2 =
+ % Entry with two authors
+ { bst.and * t * }
+ { bst.ands * t * }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ 't
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+}
+
+% remove successive periods (commas) from author
+FUNCTION {remove.ss.period.auth}
+{ 's :=
+ s format.names 'tempa :=
+ bst.author.post 'tempb :=
+ tempb #1 #1 substring$ "}" =
+ { tempa tempb * }
+ { tempa #-1 #1 substring$ tempb #1 #1 substring$ =
+ { tempa tempb #2 global.max$ substring$ * }
+ { tempa tempb * }
+ if$
+ }
+ if$
+}
+
+% <prev name list> <new name list> compare.names <modified name list>
+FUNCTION {compare.names.aer}
+{ 's :=
+ 'tempa :=
+
+% "current.author = " s * "\\" * write$ newline$
+% "prev.author = " tempa * "\\" * write$ newline$
+
+ tempa num.names$ 'len1.aer := % len1 = the number of previous authors
+ s num.names$ 'len2.aer := % len2 = the number of current authors
+
+% len1.aer := min(len1.aer,len2.aer)
+% len1 -> min{ the number of previous authors, the number of current authors }
+ len1.aer len2.aer >
+ { len2.aer 'len1.aer := }
+ { }
+ if$
+
+% start with an empty string, then while the components are the same
+% add "\bysame"
+ ""
+ #1 'i.aer :=
+
+ { i.aer len1.aer > not }
+ { tempa i.aer "{ff }{vv }{ll}{ jj}" format.name$
+ s i.aer "{ff }{vv }{ll}{ jj}" format.name$
+ =
+ { #1 i.aer <
+ { " and " * } % \bysame で省略する著者の前につく and
+ { }
+ if$
+ "\bysame{}" *
+ i.aer #1 + 'i.aer := }
+ { #-1 'len1.aer := }
+ if$
+ }
+ while$
+
+% add the rest of the second string
+ { i.aer len2.aer > not }
+ { #1 i.aer <
+ { " and " * }
+ { }
+ if$
+ s i.aer "{ff }{vv }{ll}{ jj}" format.name$ *
+ i.aer #1 + 'i.aer :=
+ }
+ while$
+}
+
+%%% author
+FUNCTION {format.authors}
+{ author empty$
+ { "" }
+ { bst.use.bysame #2 =
+ { prev.author.aer author compare.names.aer 's :=
+ author 'prev.author.aer := }
+ { author 's := }
+ if$
+ extra.label.bysame "bysame" =
+ { "\bysame " }
+ { bst.author.pre s remove.ss.period.auth * }
+ if$
+ }
+ if$
+}
+
+%%% editor
+FUNCTION {format.editors}
+{ editor empty$
+ { "" }
+ { bst.use.bysame #2 =
+ { prev.author.aer editor compare.names.aer 's :=
+ editor 'prev.author.aer := }
+ { editor 's := }
+ if$
+ extra.label.bysame "bysame" =
+ { "\bysame " }
+ { bst.author.pre s remove.ss.period.auth * }
+ if$
+ s num.names$ #1 >
+ { bst.editors * }
+ { bst.editor * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.authors.alt}
+{ author empty$
+ { "" }
+ { extra.label.bysame "bysame" =
+ {"\bysame "}
+ { bst.author.pre author remove.ss.period.auth * }
+ if$
+ }
+ if$
+}
+
+%%% editor
+FUNCTION {format.editors.alt}
+{ editor empty$
+ { "" }
+ { extra.label.bysame "bysame" =
+ { "\bysame " }
+ { bst.author.pre editor remove.ss.period.auth * }
+ if$
+ editor num.names$ #1 >
+ { bst.editors * }
+ { bst.editor * }
+ if$
+ }
+ if$
+}
+
+%%% format.in.ed.booktitle
+FUNCTION {format.editors.x}
+{ editor empty$
+ { "" }
+ { bst.editor.btitle.order #0 =
+ { "" }
+ { editor num.names$ #1 >
+ { bst.editors " by " * }
+ { bst.editor " by " * }
+ if$
+ }
+ if$
+ editor format.names *
+ bst.editor.btitle.order #0 =
+ { editor num.names$ #1 >
+ { bst.editors * }
+ { bst.editor * }
+ if$
+ }
+ { "" * }
+ if$
+ }
+ if$
+}
+
+%%% Remove commas in the cases like "?." and "?,".
+FUNCTION {remove.irrelevant.period.comma}
+{ 's :=
+ s empty$
+ { "" }
+ { s #-1 #3 substring$ "?,'" =
+ s #-1 #3 substring$ "?.'" = or
+ { s #-3 global.max$ substring$ "'" * }
+ { s #-1 #4 substring$ "?,''" =
+ s #-1 #4 substring$ "?.''" = or
+ { s #-4 global.max$ substring$ "''" * }
+ { s #-1 #2 substring$ "?," =
+ s #-1 #2 substring$ "?." = or
+ { s #-2 global.max$ substring$ "" * }
+ { s #-1 #3 substring$ "?,~" =
+ s #-1 #3 substring$ "?.~" = or
+ { s #-4 global.max$ substring$ "?~" * }
+ 's
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+}
+
+%%% title
+FUNCTION {format.title.sub}
+{ bst.title.lower.case #0 =
+ { bst.title.pre title * bst.title.post * }
+ { bst.title.pre title "t" change.case$ * bst.title.post * }
+ if$
+}
+
+%%% title
+FUNCTION {format.title}
+{ title empty$
+ bst.hide.title #0 = not or
+ { "" }
+ { format.title.sub remove.irrelevant.period.comma }
+ if$
+}
+
+%%% title for misc.
+FUNCTION {format.misc.title}
+{ title empty$
+ { "" }
+ { bst.title.pre title * bst.title.post * }
+ if$
+}
+
+% Convert "-" to "--" (for pages field)
+FUNCTION {n.dashify}
+{ 't :=
+ ""
+ %% while$
+ { t empty$ not }
+ { t #1 #1 substring$ "-" =
+ { t #1 #2 substring$ "--" = not
+ { "--" *
+ t #2 global.max$ substring$ 't :=
+ }
+ { { t #1 #1 substring$ "-" = }
+ { "-" *
+ t #2 global.max$ substring$ 't :=
+ }
+ while$
+ }
+ if$
+ }
+ { t #1 #1 substring$ *
+ t #2 global.max$ substring$ 't :=
+ }
+ if$
+ }
+ while$
+}
+
+%%% year
+FUNCTION {format.year}
+{ year empty$
+ { "there's no year in " cite$ * warning$
+ ", " }
+ { type$ "article" =
+ { bst.year.pre year * extra.label * bst.year.post * }
+ { bst.year.na.pre year * extra.label * bst.year.na.post * }
+ if$
+ }
+ if$
+}
+
+%%% page for book
+FUNCTION {format.book.pages}
+{ pages empty$
+ { "" }
+ { bst.pages.pre pages * bst.pages.post * }
+ if$
+}
+
+%%% Attach tie for the string with two or less characters.
+FUNCTION {tie.or.space.connect}
+{ duplicate$ text.length$ #3 <
+ { "~" }
+ { " " }
+ if$
+ swap$ * *
+}
+
+FUNCTION {either.or.check}
+{ empty$
+ 'pop$
+ { "can't use both " swap$ * " fields in " * cite$ * warning$ }
+ if$
+}
+
+%%% volume for book
+FUNCTION {format.bvolume}
+{ volume empty$
+ { "" }
+ { bst.volume.pre volume * bst.volume.post *
+ series empty$
+ 'skip$
+ %% If there is series field
+ { " of " * series * bst.series.post * }
+ if$
+% "volume and number" number either.or.check
+ }
+ if$
+}
+
+%%% series
+FUNCTION {output.series}
+{ series empty$
+ { "" }
+ { bst.series.pre series * bst.series.post * }
+ if$
+}
+
+%%% number and series
+FUNCTION {format.number.series}
+{ volume empty$
+ { number empty$
+ bst.hide.month #0 = not or
+ % number is empty
+ { series empty$
+ { "" }
+ % series is not empty.
+ { output.series }
+ if$
+ }
+ % number is not empty$
+ { series empty$
+ { bst.number.pre number * bst.number.post * }
+ % series is not empty.
+ { bst.in bst.series.pre * series * bst.series.post *
+ bst.number.pre * number * bst.number.post * }
+ if$
+ }
+ if$
+ }
+ { "" }
+ if$
+}
+
+%%% Number or not.
+FUNCTION {is.num}
+{ chr.to.int$
+ duplicate$ "0" chr.to.int$ < not
+ swap$ "9" chr.to.int$ > not and
+}
+
+FUNCTION {extract.num}
+{ duplicate$ 't :=
+ "" 's :=
+ { t empty$ not }
+ { t #1 #1 substring$
+ t #2 global.max$ substring$ 't :=
+ duplicate$ is.num
+ { s swap$ * 's := }
+ { pop$ "" 't := }
+ if$
+ }
+ while$
+ s empty$
+ 'skip$
+ { pop$ s }
+ if$
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% edition
+
+% Convert edition to 1st, 2nd, 3rd, 4th etc
+FUNCTION {eng.ord}
+{ duplicate$ "1" swap$ *
+ #-2 #1 substring$ "1" =
+ { bst.th * }
+ { duplicate$ #-1 #1 substring$
+ duplicate$ "1" =
+ { pop$ bst.st * }
+ { duplicate$ "2" =
+ { pop$ bst.nd * }
+ { "3" =
+ { bst.rd * }
+ { bst.th * }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+}
+
+% Convert first, second etc in edition field to 1st, 2nd (from jfm.bst)
+FUNCTION {convert.edition}
+{ edition extract.num "l" change.case$ 's :=
+ s "first" = s "1" = or
+ { bst.first }
+ { s "second" = s "2" = or
+ { bst.second }
+ { s "third" = s "3" = or
+ { bst.third }
+ { s "fourth" = s "4" = or
+ { bst.fourth }
+ { s "fifth" = s "5" = or
+ { bst.fifth }
+ { s #1 #1 substring$ is.num
+ { s eng.ord }
+ { edition }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+}
+
+%%% edition
+FUNCTION {format.edition}
+{ edition empty$
+ { "" }
+ { output.state mid.sentence =
+ { bst.edition.pre convert.edition "l" change.case$ * bst.edition.post * }
+ { bst.edition.pre convert.edition "t" change.case$ * bst.edition.post * }
+ if$
+ }
+ if$
+}
+
+%%% month
+FUNCTION {format.month}
+{ month empty$
+ bst.hide.month #0 = not or
+ { "" }
+ { bst.month.pre month * bst.month.post * }
+ if$
+}
+
+%%% year and month
+FUNCTION {format.date}
+{ format.month format.year *
+}
+
+%%% Is multiple pages like 1-100?
+FUNCTION { multi.page.check }
+{ 't :=
+ #0 'multiresult :=
+ { multiresult not
+ t empty$ not
+ and
+ }
+ { t #1 #1 substring$
+ duplicate$ "-" =
+ swap$ duplicate$ "," =
+ swap$ "+" =
+ or or
+ { #1 'multiresult := }
+ { t #2 global.max$ substring$ 't := }
+ if$
+ }
+ while$
+ multiresult
+}
+
+%%% pages
+FUNCTION {format.pages}
+{ pages empty$
+ { "" }
+ { pages multi.page.check
+ { bst.pages.pre pages n.dashify tie.or.space.connect * bst.pages.post }
+ { bst.page.pre pages tie.or.space.connect * bst.page.post }
+ if$
+ }
+ if$
+}
+
+%%% number
+FUNCTION {format.number}
+{ number empty$
+ bst.hide.number #0 = not or
+ { "" }
+ { bst.number.pre number * bst.number.post * }
+ if$
+}
+
+%%% volume
+FUNCTION {format.volume}
+{ volume empty$
+ 'skip$
+ { bst.volume.pre volume * bst.volume.post *
+ bst.year.position #3 =
+ { format.year * }
+ 'skip$
+ if$
+ }
+ if$
+}
+
+%%% number, page
+FUNCTION {format.number.pages}
+{ number empty$
+ { format.pages }
+ { format.number format.pages * }
+ if$
+}
+
+%%% volume, page
+FUNCTION {format.volume.pages}
+{ volume empty$
+ { format.pages }
+ { format.volume format.pages * }
+ if$
+}
+
+%%% volume, number, page
+FUNCTION {format.volume.number.pages}
+{ volume empty$
+ { number empty$
+ { format.pages }
+ { format.number format.pages * }
+ if$
+ }
+ { number empty$
+ { format.volume format.pages * }
+ { format.volume format.number * format.pages * }
+ if$
+ }
+ if$
+}
+
+% volume, number, page
+FUNCTION {format.vol.num.pages}
+{ volume empty$
+ %% volume is empty.
+ { number empty$
+ %% number is empty.
+ { pages empty$
+ % warning
+ { "there is no volume, number, and pages in " cite$ * warning$ "" }
+ { "" format.pages * }
+ if$
+ }
+ %% number is not empty.
+ % warning
+ { "there's a number but no volume in " cite$ * warning$
+ format.number.pages }
+ if$
+ }
+ %% volume is not empty.
+ { number empty$
+ %% number is empty.
+ { format.volume.pages }
+ %% number is not empty.
+ { format.volume.number.pages }
+ if$
+ }
+ if$
+}
+
+%%% chapter
+FUNCTION {format.chapter}
+{ chapter empty$
+ { "" }
+ { type empty$
+ { bst.chapter.pre chapter tie.or.space.connect * bst.chapter.post }
+ { ", " * type " " * chapter * }
+ if$
+ }
+ if$
+}
+
+%%% chapter, pages
+FUNCTION {format.chapter.pages}
+{ chapter empty$
+ { pages empty$
+ { "" }
+ { "" format.pages * }
+ if$
+ }
+ { pages empty$
+ { "" format.chapter * }
+ { "" format.chapter * format.pages * }
+ if$
+ }
+ if$
+}
+
+%%% editor and booktitle
+FUNCTION {format.in.ed.booktitle}
+{ booktitle empty$
+ { "" }
+ { editor empty$
+ { bst.in format.btitle * }
+ { bst.editor.btitle.order #0 =
+ { bst.in format.editors.x * " " * format.btitle * }
+ { bst.in format.btitle * " " * format.editors.x * }
+ if$
+ }
+ if$
+ }
+ if$
+}
+
+%%% howpublished
+FUNCTION {format.howpublished}
+{ howpublished empty$
+ { "" }
+ { bst.howpublished.pre howpublished * bst.howpublished.post * }
+ if$
+}
+
+%%% address
+FUNCTION {format.address}
+{ address empty$
+ { "" }
+ { bst.address.pre address * bst.address.post * }
+ if$
+}
+
+%%% publisher
+FUNCTION {format.publisher}
+{ publisher empty$
+ { "" }
+ { bst.publisher.pre publisher * bst.publisher.post * }
+ if$
+}
+
+%%% organization
+FUNCTION {format.organization}
+{ organization empty$
+ { "" }
+ { bst.organization.pre organization * bst.organization.post * }
+ if$
+}
+
+%% publisher and address
+FUNCTION {output.publisher.address}
+{ address empty$
+ { format.publisher "publisher" output.check.nocomma }
+ { bst.address.position #0 =
+ { format.address output.nocomma
+ format.publisher "publisher" output.check.nocomma }
+ { format.publisher "publisher" output.check.nocomma
+ format.address output.nocomma }
+ if$
+ }
+ if$
+}
+
+%% address, organization, publisher
+FUNCTION {output.address.organization.publisher}
+{ address empty$
+ %% address is empty
+ { organization empty$
+ %% organization is empty
+ { publisher empty$
+ 'skip$
+ { format.publisher "publisher" output.check.nocomma }
+ if$
+ }
+ %% organization is not empty
+ { publisher empty$
+ { format.organization "organization" output.check.nocomma }
+ { format.organization "organization" output.check.nocomma
+ format.publisher "publisher" output.check.nocomma }
+ if$
+ }
+ if$
+ }
+ %% address is not empty
+ { organization empty$
+ %% organization is empty
+ { publisher empty$
+ %% publisher is empty
+ { format.address output.nocomma }
+ %% publisher is not empty
+ { bst.address.position #0 =
+ { format.address output.nocomma
+ format.publisher "publisher" output.check.nocomma }
+ { format.publisher "publisher" output.check.nocomma
+ format.address output.nocomma }
+ if$
+ }
+ if$
+ }
+ %% organization is not empty
+ { publisher empty$
+ %% publisher is empty
+ { format.organization "organization" output.check.nocomma
+ format.address output.nocomma }
+ %% publisher is not empty
+ { format.organization "organization" output.check.nocomma
+ bst.address.position #0 =
+ { format.address output.nocomma
+ format.publisher "publisher" output.check.nocomma }
+ { format.publisher "publisher" output.check.nocomma
+ format.address output.nocomma }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+}
+
+%%% misc
+FUNCTION {empty.misc.check}
+{ author empty$ title empty$ howpublished empty$
+ month empty$ year empty$ note empty$
+ and and and and and
+ key empty$ not and
+ { "all relevant fields are empty in " cite$ * warning$ }
+ 'skip$
+ if$
+}
+
+FUNCTION {format.thesis.type}
+{ type empty$
+ 'skip$
+ { pop$ " " type * }
+ if$
+}
+
+FUNCTION {format.tr.number}
+{ type empty$
+ { "Technical Report" }
+ { " " type * }
+ if$
+ number empty$
+ { "t" change.case$ }
+ { number tie.or.space.connect }
+ if$
+}
+
+%%% phdthesis
+FUNCTION {format.phd}
+{ bst.phdthesis }
+
+%%% mastersthesis
+FUNCTION {format.mthesis}
+{ bst.mthesis }
+
+%%% school
+FUNCTION {format.school}
+{ school empty$
+ { "" }
+ { bst.school.pre school * bst.school.post * }
+ if$
+}
+
+%%% institution
+FUNCTION {format.institution}
+{ institution empty$
+ { "" }
+ { bst.institution.pre institution * bst.institution.post * }
+ if$
+}
+
+%%% remove first ? characters.
+FUNCTION {chop.word}
+{ 's :=
+ 'len :=
+ s #1 len substring$ =
+ { s len #1 + global.max$ substring$ }
+ 's
+ if$
+}
+
+FUNCTION {format.note}
+{ note empty$
+ { "" }
+ { bst.note.pre note * bst.note.post * }
+ if$
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% \havarditem
+
+FUNCTION {output.bibitem}
+{ newline$
+ "\harvarditem[" write$
+ alabel write$ % alabel <- abbreviated citation
+ "]{" write$
+ flabel write$ % flabel <- full citation
+ "}{" write$
+ cyear write$
+ % cyear = year
+ "}{" write$
+ cite$ write$ % cite$ -> pusch keyword
+ "}" write$
+ % If number index is on
+ bst.use.number.index #0 =
+ 'skip$
+ { index #1 + 'index :=
+ "" 'preone :=
+ "" 'preten :=
+ bst.number.index.digit "1" =
+ 'skip$
+ { bst.number.index.digit "2" =
+ { "\hskip0.5em" 'preone := }
+ { bst.number.index.digit "3" =
+ { "\hskip1em" 'preone :=
+ "\hskip0.5em" 'preten := }
+ 'skip$
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+ newline$
+ before.all 'output.state :=
+ ""
+ % number index
+ bst.use.number.index #0 =
+ 'skip$
+ { index #10 <
+ % Insert spaces according to digit of number index.
+ { preone }
+ { index #100 <
+ { preten }
+ { "" }
+ if$
+ }
+ if$
+ bst.number.index.pre * index int.to.str$ * bst.number.index.post * write$
+ }
+ if$
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% article
+
+FUNCTION {article}
+{ output.bibitem
+ format.authors "author" output.check.nocomma
+ bst.year.position #0 =
+ { format.year "year" output.check.nocomma }
+ 'skip$
+ if$
+ format.title "title" output.check.nocomma
+
+ format.journal "journal" output.check.nocomma
+ bst.year.position #2 =
+ { format.date output.nocomma }
+ 'skip$
+ if$
+ format.vol.num.pages output.nocomma
+
+ bst.year.position #1 =
+ { format.date output.nocomma }
+ 'skip$
+ if$
+
+ format.url.doi output.nocomma
+
+ format.note output.nocomma
+ fin.entry
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% book
+
+FUNCTION {book}
+{ output.bibitem
+ author empty$
+ { format.editors "author and editor" output.check.nocomma }
+ { format.authors output.nonnull.nocomma
+ "author and editor" editor either.or.check
+ }
+ if$
+ bst.year.position #0 =
+ { format.year "year" output.check.nocomma }
+ 'skip$
+ if$
+ format.book "title" output.check.nocomma
+
+ format.bvolume output.nocomma
+ format.number.series output.nocomma
+ output.publisher.address
+
+ format.edition output.nocomma
+ format.book.pages output.nocomma
+
+ bst.year.position #0 = not
+ { format.year "year" output.check.nocomma }
+ 'skip$
+ if$
+
+ format.url.doi output.nocomma
+
+ format.note output.nocomma
+ fin.entry
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% booklet
+
+FUNCTION {booklet}
+{ output.bibitem
+ format.authors output.nocomma
+ format.year output.nocomma
+ format.misc.title "title" output.check.nocomma
+ format.howpublished output.nocomma
+ format.address output.nocomma
+
+ format.url.doi output.nocomma
+
+ format.note output.nocomma
+ fin.entry
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% inbook
+
+FUNCTION {inbook}
+{ output.bibitem
+ author empty$
+ { format.editors "author and editor" output.check.nocomma }
+ { format.authors output.nonnull.nocomma
+ "author and editor" editor either.or.check
+ }
+ if$
+ bst.year.position #0 =
+ { format.year "year" output.check.nocomma }
+ 'skip$
+ if$
+% format.book remove.pre.comma "title" output.check.nocomma
+ format.book "title" output.check.nocomma
+ format.edition output.nocomma
+
+ format.bvolume output.nocomma
+ format.chapter.pages "chapter and pages" output.check.nocomma
+ format.number.series output.nocomma
+ output.publisher.address
+
+ bst.year.position #0 = not
+ { format.year "year" output.check.nocomma }
+ 'skip$
+ if$
+
+ format.url.doi output.nocomma
+
+ format.note output.nocomma
+ fin.entry
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% incollection
+
+FUNCTION {incollection}
+{ output.bibitem
+ format.authors "author" output.check.nocomma
+ bst.year.position #0 =
+ { format.year "year" output.check.nocomma }
+ 'skip$
+ if$
+ format.title "title" output.check.nocomma
+
+ format.in.ed.booktitle "booktitle" output.check.nocomma
+ format.bvolume output.nocomma
+ output.address.organization.publisher
+ format.edition output.nocomma
+ format.chapter.pages output.nocomma
+
+ bst.year.position #0 = not
+ { format.year "year" output.check.nocomma }
+ 'skip$
+ if$
+
+ format.url.doi output.nocomma
+
+ format.note output.nocomma
+ fin.entry
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% inproceedings
+
+FUNCTION {inproceedings}
+{ output.bibitem
+ format.authors "author" output.check.nocomma
+ bst.year.position #0 =
+ { format.year "year" output.check.nocomma }
+ 'skip$
+ if$
+ format.title "title" output.check.nocomma
+
+ format.in.ed.booktitle "booktitle" output.check.nocomma
+ format.bvolume output.nocomma
+ format.number.series output.nocomma
+ format.pages output.nocomma
+ output.address.organization.publisher
+
+ bst.year.position #0 = not
+ { format.date output.nocomma }
+ { format.month output.nocomma }
+ if$
+
+ format.url.doi output.nocomma
+
+ format.note output.nocomma
+ fin.entry
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% conference
+
+FUNCTION {conference}
+{ inproceedings }
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% manual
+FUNCTION {manual}
+{ output.bibitem
+ author empty$
+ { organization empty$
+ 'skip$
+ { organization output.nonnull.nocomma
+ address output.nocomma
+ }
+ if$
+ }
+ { format.authors output.nonnull.nocomma }
+ if$
+ bst.year.position #0 =
+ { format.year "year" output.check.nocomma }
+ 'skip$
+ if$
+ format.book "title" output.check.nocomma
+ author empty$
+ { organization empty$
+ { format.address new.block.check
+ format.address output.nocomma
+ }
+ 'skip$
+ if$
+ }
+ { output.address.organization.publisher }
+ if$
+ format.edition output.nocomma
+
+ bst.year.position #0 = not
+ { format.year "year" output.check.nocomma }
+ 'skip$
+ if$
+
+ format.url.doi output.nocomma
+
+ format.note output.nocomma
+ fin.entry
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% mastersthesis
+
+FUNCTION {mastersthesis}
+{ output.bibitem
+ format.authors "author" output.check.nocomma
+ bst.year.position #0 =
+ { format.year "year" output.check.nocomma }
+ 'skip$
+ if$
+ format.title "title" output.check.nocomma
+ format.mthesis format.thesis.type output.nonnull.nocomma
+ format.school "school" output.check.nocomma
+ format.address output.nocomma
+
+ bst.year.position #0 = not
+ { format.year "year" output.check.nocomma }
+ 'skip$
+ if$
+
+ format.url.doi output.nocomma
+
+ format.note output.nocomma
+ fin.entry
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% misc
+
+FUNCTION {misc}
+{ output.bibitem
+ format.authors "author" output.check.nocomma
+ bst.year.position #0 =
+ { format.year "year" output.check.nocomma }
+ 'skip$
+ if$
+ format.misc.title output.nocomma
+ format.howpublished output.nocomma
+
+ bst.year.position #0 = not
+ { format.date output.nocomma }
+ { format.month output.nocomma }
+ if$
+
+ format.url.doi output.nocomma
+
+ format.note output.nocomma
+ fin.entry
+ empty.misc.check
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% Online
+
+FUNCTION {online}
+{ output.bibitem
+ format.authors "author" output.check.nocomma
+ bst.year.position #0 =
+ { format.year "year" output.check.nocomma }
+ 'skip$
+ if$
+ format.misc.title output.nocomma
+ format.howpublished output.nocomma
+
+ bst.year.position #0 = not
+ { format.date output.nocomma }
+ { format.month output.nocomma }
+ if$
+
+ format.url.doi output.nocomma
+
+ format.note output.nocomma
+ fin.entry
+ empty.misc.check
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% phdthesis
+
+FUNCTION {phdthesis}
+{ output.bibitem
+ format.authors "author" output.check.nocomma
+ bst.year.position #0 =
+ { format.year "year" output.check.nocomma }
+ 'skip$
+ if$
+ format.book "title" output.check.nocomma
+ format.phd
+ format.thesis.type output.nonnull.nocomma
+ format.school "school" output.check.nocomma
+ address empty$
+ 'skip$
+ { format.address output.nocomma }
+ if$
+
+ bst.year.position #0 = not
+ { format.year "year" output.check.nocomma }
+ 'skip$
+ if$
+
+ format.url.doi output.nocomma
+
+ format.note output.nocomma
+ fin.entry
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% proceedings
+
+FUNCTION {proceedings}
+{ output.bibitem
+ editor empty$
+ { organization output.nocomma }
+ { format.editors output.nonnull.nocomma }
+ if$
+ bst.year.position #0 =
+ { format.year "year" output.check.nocomma }
+ 'skip$
+ if$
+ format.btitle remove.pre.comma "title" output.check.nocomma
+ format.bvolume output.nocomma
+ format.number.series output.nocomma
+ output.address.organization.publisher
+
+ bst.year.position #0 = not
+ { format.year "year" output.check.nocomma }
+ 'skip$
+ if$
+
+ format.url.doi output.nocomma
+
+ format.note output.nocomma
+ fin.entry
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% techreport
+
+FUNCTION {techreport}
+{ output.bibitem
+ format.authors "author" output.check.nocomma
+ bst.year.position #0 =
+ { format.year "year" output.check.nocomma }
+ 'skip$
+ if$
+ format.title "title" output.check.nocomma
+ format.tr.number output.nonnull.nocomma
+ format.institution "institution" output.check.nocomma
+ format.address output.nocomma
+
+ bst.year.position #0 = not
+ { format.year "year" output.check.nocomma }
+ 'skip$
+ if$
+
+ format.note output.nocomma
+ fin.entry
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% unpublished
+
+FUNCTION {unpublished}
+{ output.bibitem
+ format.authors "author" output.check.nocomma
+ bst.year.position #0 =
+ { format.year "year" output.check.nocomma }
+ 'skip$
+ if$
+ format.title "title" output.check.nocomma
+
+ bst.year.position #0 = not
+ { format.date remove.pre.comma output.nocomma }
+ { month empty$
+ 'skip$
+ { format.month remove.pre.comma output.nocomma }
+ if$
+ }
+ if$
+
+ format.url.doi output.nocomma
+
+ format.note "note" output.check.nocomma
+ fin.entry
+}
+
+FUNCTION {default.type}
+{ misc }
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% Alias for month names:
+
+MACRO {jan} {"January"}
+MACRO {feb} {"February"}
+MACRO {mar} {"March"}
+MACRO {apr} {"April"}
+MACRO {may} {"May"}
+MACRO {jun} {"June"}
+MACRO {jul} {"July"}
+MACRO {aug} {"August"}
+MACRO {sep} {"September"}
+MACRO {oct} {"October"}
+MACRO {nov} {"November"}
+MACRO {dec} {"December"}
+
+%%% Read entries:
+READ
+
+%%% Variable for remembering the order of citation.
+INTEGERS { order.num }
+FUNCTION {initialize.order.num}
+{
+ #1 'order.num :=
+}
+%%% Initialize a variables
+EXECUTE {initialize.order.num}
+
+%%% Variable for remembering the order of citation.
+FUNCTION {set.order.cited}
+{
+ order.num 'order.cited :=
+ #1 order.num + 'order.num :=
+}
+%%% Iterate for all entries:
+ITERATE {set.order.cited}
+
+%%% check the value of nameorder field.
+FUNCTION {set.nameorder}
+{ nameorder empty$
+ { "" 'nameorder.temp := }
+ { nameorder 'nameorder.temp := }
+ if$
+}
+%%% Iterate for all entries:
+ITERATE {set.nameorder}
+
+%%% Remove symbols and convert to lowercase.
+FUNCTION {sortify}
+{ purify$ "l" change.case$ }
+
+%%% names for sorting
+FUNCTION {sort.format.names}
+{ 's :=
+ #1 'nameptr :=
+ ""
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ { nameptr #1 >
+ { ", " * }
+ 'skip$
+ if$
+ s nameptr "{ll}{ f}{ j}" format.name$ 't :=
+ nameptr numnames = t "others" = and
+ { bst.and.others.output *}
+ { t sortify * }
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+}
+
+FUNCTION {sort.format.names.abb}
+{ 's :=
+ s num.names$ 'numnames :=
+ numnames bst.and.others.num <
+ { s sort.format.names }
+ { s #1 "{ll}{ f}{ j}" format.name$ " zz " * }
+ if$
+}
+
+%%% Label for full author name.
+FUNCTION {format.lab.names.full}
+{ 's :=
+ #1 'nameptr :=
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ { s nameptr "{vv~}{ll}" format.name$ 't :=
+ nameptr #1 >
+ { namesleft #1 >
+ { nameorder.temp "random" = bst.use.nameorder #0 = not and
+ { bst.and.nameorder * t * }
+ { ", " * t * }
+ if$
+ }
+ { t "others" =
+ { bst.and.others.output * }
+ { numnames #2 >
+ { nameorder.temp "random" = bst.use.nameorder #0 = not and
+ { bst.cite.and.nameorder * t * }
+ { bst.cite.ands * t * }
+ if$
+ }
+ { nameorder.temp "random" = bst.use.nameorder #0 = not and
+ { bst.cite.and.nameorder * t * }
+ { bst.cite.and * t * }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ 't
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+ numnames #1 > #1 #2 = and {", eds" *} {} if$
+ numnames #1 = #1 #2 = and {", ed" *} {} if$
+}
+
+%%% laberl for abbreviated author name.
+FUNCTION {format.lab.names.abb}
+{ 's :=
+ s num.names$ 'numnames :=
+ numnames bst.and.others.num <
+ % if the number of authors is less than bst.and.others.num, full name.
+ { s format.lab.names.full }
+ % if the number of authors is equal or more than bst.and.others.num, abbreviated name.
+ { s #1 "{ll}" format.name$ bst.and.others.output * }
+ if$
+}
+
+%%% abbreviated author
+FUNCTION {author.key.label.abb}
+{ author empty$
+ { key empty$
+ { cite$ #1 #3 substring$ }
+ { key #3 text.prefix$ }
+ if$
+ }
+ { author format.lab.names.abb }
+ if$
+}
+
+%%% full author
+FUNCTION {author.key.label.full}
+{ author empty$
+ { key empty$
+ { cite$ #1 #3 substring$ }
+ { key #3 text.prefix$ }
+ if$
+ }
+ { author format.lab.names.full }
+ if$
+}
+
+FUNCTION {format.names.full.wo.and}
+{ 's :=
+ #1 'nameptr :=
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ { s nameptr "{ll}{, ff}{, jj}" format.name$ 't :=
+ nameptr #1 >
+ { namesleft #1 >
+ { " " * t * }
+ { t "others" =
+ { " " * }
+ { numnames #2 >
+ { " " * t * }
+ { " " * t * }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ 't
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+}
+
+FUNCTION {author.key.full.wo.and}
+{ author empty$
+ { key empty$
+ { cite$ #1 #3 substring$ }
+ { key #3 text.prefix$ }
+ if$
+ }
+ { author format.names.full.wo.and }
+ if$
+}
+
+FUNCTION {author.editor.key.full.wo.and}
+{ author empty$
+ { editor empty$
+ { key empty$
+ { cite$ #1 #3 substring$ }
+ { key #3 text.prefix$ }
+ if$
+ }
+ { editor format.names.full.wo.and }
+ if$
+ }
+ { author format.names.full.wo.and }
+ if$
+}
+
+FUNCTION {editor.key.organization.key.full.wo.and}
+{ editor empty$
+ { key empty$
+ { organization empty$
+ { cite$ #1 #3 substring$ }
+ { "The " #4 organization chop.word #3 text.prefix$ }
+ if$
+ }
+ { key #3 text.prefix$ }
+ if$
+ }
+ { editor format.names.full.wo.and }
+ if$
+}
+
+FUNCTION {author.key.organization.key.full.wo.and}
+{ author empty$
+ { key empty$
+ { organization empty$
+ { cite$ #1 #3 substring$ }
+ { "The " #4 organization chop.word #3 text.prefix$ }
+ if$
+ }
+ { key #3 text.prefix$ }
+ if$
+ }
+ { author format.names.full.wo.and }
+ if$
+}
+
+%%% abbreviated author
+FUNCTION {author.editor.key.label.abb}
+{ author empty$
+ { editor empty$
+ { key empty$
+ { cite$ #1 #3 substring$ }
+ { key #3 text.prefix$ }
+ if$
+ }
+ { editor format.lab.names.abb }
+ if$
+ }
+ { author format.lab.names.abb }
+ if$
+}
+
+%%% full author
+FUNCTION {author.editor.key.label.full}
+{ author empty$
+ { editor empty$
+ { key empty$
+ { cite$ #1 #3 substring$ }
+ { key #3 text.prefix$ }
+ if$
+ }
+ { editor format.lab.names.full }
+ if$
+ }
+ { author format.lab.names.full }
+ if$
+}
+
+FUNCTION {author.key.organization.label.full}
+{ author empty$
+ { key empty$
+ { organization empty$
+ { cite$ #1 #3 substring$ }
+ { "The " #4 organization chop.word #3 text.prefix$ }
+ if$
+ }
+ { key #3 text.prefix$ }
+ if$
+ }
+ { author format.lab.names.full }
+ if$
+}
+
+FUNCTION {author.key.organization.label.abb}
+{ author empty$
+ { key empty$
+ { organization empty$
+ { cite$ #1 #3 substring$ }
+ { "The " #4 organization chop.word #3 text.prefix$ }
+ if$
+ }
+ { key #3 text.prefix$ }
+ if$
+ }
+ { author format.lab.names.abb }
+ if$
+}
+
+FUNCTION {editor.key.organization.label.full}
+{ editor empty$
+ { key empty$
+ { organization empty$
+ { cite$ #1 #3 substring$ }
+ { "The " #4 organization chop.word #3 text.prefix$ }
+ if$
+ }
+ { key #3 text.prefix$ }
+ if$
+ }
+ { editor format.lab.names.full }
+ if$
+}
+
+FUNCTION {editor.key.organization.label.abb}
+{ editor empty$
+ { key empty$
+ { organization empty$
+ { cite$ #1 #3 substring$ }
+ { "The " #4 organization chop.word #3 text.prefix$ }
+ if$
+ }
+ { key #3 text.prefix$ }
+ if$
+ }
+ { editor format.lab.names.abb }
+ if$
+}
+
+%%% Convert numbers: 0->9, 1->8, 2->7,..., 9->0
+FUNCTION {reverse.num}
+{ 's :=
+ s "1" =
+ { "8" 'year.num := }
+ { s "2" =
+ { "7" 'year.num := }
+ { s "3" =
+ { "6" 'year.num := }
+ { s "4" =
+ { "5" 'year.num := }
+ { s "5" =
+ { "4" 'year.num := }
+ { s "6" =
+ { "3" 'year.num := }
+ { s "7" =
+ { "2" 'year.num := }
+ { s "8" =
+ { "1" 'year.num := }
+ { s "9" =
+ { "0" 'year.num := }
+ { s "0" =
+ { "9" 'year.num := }
+ { "9" 'year.num := }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+ year.num
+}
+
+%%% Convert year (large number -> small number)
+FUNCTION {convert.year}
+{ 't :=
+ bst.reverse.year #0 =
+ { t 'tt := }
+ { t #1 #1 substring$ reverse.num
+ t #2 #1 substring$ reverse.num *
+ t #3 #1 substring$ reverse.num *
+ t #4 #1 substring$ reverse.num * 'tt := }
+ if$
+ tt
+}
+
+%%% cyear
+FUNCTION {calc.cyear}
+{ type$ "book" =
+ type$ "inbook" =
+ or
+ 'author.editor.key.full.wo.and
+ { type$ "proceedings" =
+ 'editor.key.organization.key.full.wo.and
+ { type$ "manual" =
+ 'author.key.organization.key.full.wo.and
+ 'author.key.full.wo.and
+ if$
+ }
+ if$
+ }
+ if$
+ duplicate$
+ year empty$
+ { "2199" 'cyear := }
+ { year 'cyear := }
+ if$
+ year empty$
+ { " " "2199" convert.year * field.or.null * }
+ { " " year convert.year * field.or.null * }
+ if$
+ sortify 'sort.label :=
+ % For debug
+ econ.debug #0 = not
+ { "sort.label = ``\texttt{" write$
+ sort.label write$
+ "}''\\" write$
+ newline$
+ }
+ 'skip$
+ if$
+ pop$
+}
+
+FUNCTION {calc.sort.label.abb}
+{ author empty$
+ { editor empty$
+ { "" }
+ { editor 's := }
+ if$
+ }
+ { author 's := }
+ if$
+ s sort.format.names.abb 't :=
+ year empty$
+ { t sortify " " * "2199" convert.year * 'sort.label.abb := }
+ { t sortify " " * year convert.year * 'sort.label.abb := }
+ if$
+ econ.debug #0 = not
+ { "sort.label.abb = ``\texttt{" write$
+ sort.label.abb write$
+ "}''\\" write$
+ newline$
+ }
+ 'skip$
+ if$
+}
+
+%%% flabel
+FUNCTION {calc.flabel}
+{ type$ "book" =
+ type$ "inbook" =
+ or
+ 'author.editor.key.label.full
+ { type$ "proceedings" =
+ 'editor.key.organization.label.full
+ { type$ "manual" =
+ 'author.key.organization.label.full
+ 'author.key.label.full
+ if$
+ }
+ if$
+ }
+ if$
+ 'flabel :=
+ % For debug
+ econ.debug #0 = not
+ { "flabel = ``\texttt{" write$
+ flabel write$
+ "}''\\" write$
+ newline$
+ }
+ 'skip$
+ if$
+}
+
+%%% alabel
+FUNCTION {calc.alabel}
+{ type$ "book" =
+ type$ "inbook" =
+ or
+ 'author.editor.key.label.abb
+ { type$ "proceedings" =
+ 'editor.key.organization.label.abb
+ { type$ "manual" =
+ 'author.key.organization.label.abb
+ 'author.key.label.abb
+ if$
+ }
+ if$
+ }
+ if$
+ 'alabel :=
+ % For debug
+ econ.debug #0 = not
+ { "alabel = ``\texttt{" write$
+ alabel write$
+ "}''\\" write$
+ newline$
+ }
+ 'skip$
+ if$
+}
+
+%%% title for sorting
+FUNCTION {sort.format.title}
+{ 't :=
+ "A " #2
+ "An " #3
+ "The " #4 t chop.word
+ chop.word
+ chop.word
+ sortify
+ #1 global.max$ substring$
+}
+
+%%% author for sorting
+FUNCTION {author.sort}
+{ author empty$
+ { key empty$
+ { "to sort, need author or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { author sort.format.names }
+ if$
+}
+
+%%% editor for sorting
+FUNCTION {author.editor.sort}
+{ author empty$
+ { editor empty$
+ { key empty$
+ { "to sort, need author, editor, or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { editor sort.format.names }
+ if$
+ }
+ { author sort.format.names }
+ if$
+}
+
+FUNCTION {author.organization.sort}
+{ author empty$
+ { organization empty$
+ { key empty$
+ { "to sort, need author, organization, or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { "The " #4 organization chop.word sortify }
+ if$
+ }
+ { author sort.format.names }
+ if$
+}
+
+FUNCTION {editor.organization.sort}
+{ editor empty$
+ { organization empty$
+ { key empty$
+ { "to sort, need editor, organization, or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { "The " #4 organization chop.word sortify }
+ if$
+ }
+ { editor sort.format.names }
+ if$
+}
+
+%%% 1,...,9 -> 001,...,009
+%%% 10,...,99 -> 010,...,099
+FUNCTION {add.zero.to.number}
+{ 's :=
+ s text.length$ #1 =
+ { "00" s * }
+ { s text.length$ #2 =
+ { "0" s * }
+ { s }
+ if$
+ }
+ if$
+}
+
+%% entry type
+FUNCTION {bst.sort.entry.type.order}
+{ 'item.type :=
+ item.type "article" =
+ { "01" }
+ { item.type "book" =
+ { "02" }
+ { item.type "booklet" =
+ { "03" }
+ { item.type "comment" =
+ { "04" }
+ { item.type "conference" =
+ { "05" }
+ { item.type "inbook" =
+ { "06" }
+ { item.type "incollection" =
+ { "07" }
+ { item.type "inproceedings" =
+ { "08" }
+ { item.type "manual" =
+ { "09" }
+ { item.type "masterthesis" =
+ { "10" }
+ { item.type "misc" =
+ { "11" }
+ { item.type "phdthesis" =
+ { "12" }
+ { item.type "proceedings" =
+ { "13" }
+ { item.type "techreport" =
+ { "14" }
+ { item.type "unpublished" =
+ { "15" }
+ { "16" }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+}
+
+%%% Create sort.key$: absorder -> author -> year -> order -> month -> title.
+FUNCTION {presort.one}
+{
+ bst.no.sort #0 = not
+ { order.cited int.to.str$ add.zero.to.number " " * }
+ { "" }
+ if$
+ bst.sort.year #0 = not
+ %% Use year field as the primary sorting key.
+ { year convert.year * }
+ 'skip$
+ if$
+ bst.sort.entry.type #0 = not
+ { type$ bst.sort.entry.type.order * " " * }
+ 'skip$
+ if$
+ absorder empty$
+ { "/// " * }
+ { bst.notuse.absorder.field #0 =
+ { absorder "999" =
+ { "zzz " * }
+ { absorder add.zero.to.number "000" =
+ { "/// " * }
+ { absorder add.zero.to.number * " " * }
+ if$
+ }
+ if$
+ }
+ { "/// " * }
+ if$
+ }
+ if$
+ " " *
+ sort.label.abb *
+ " " *
+ type$ "book" = type$ "inbook" = or
+ 'author.editor.sort
+ { type$ "proceedings" =
+ 'editor.organization.sort
+ { type$ "manual" =
+ 'author.organization.sort
+ 'author.sort
+ if$
+ }
+ if$
+ }
+ if$
+ * " " *
+ " "
+ order empty$
+ { "/// " * }
+ { bst.notuse.order.field #0 =
+ { order "999" =
+ { "zzz " * }
+ { order add.zero.to.number "000" =
+ { "/// " * }
+ { order add.zero.to.number * " " * }
+ if$
+ }
+ if$
+ }
+ { "/// " * }
+ if$
+ }
+ if$
+ month empty$
+ { * "/// " * }
+ { month "999" =
+ { * month add.zero.to.number * "zzz " * }
+ { month add.zero.to.number "000" =
+ { * month add.zero.to.number * "/// " * }
+ { * month add.zero.to.number * " " * }
+ if$
+ }
+ if$
+ }
+ if$
+ title field.or.null sort.format.title
+ *
+ #1 entry.max$ substring$
+ 'sort.key$ :=
+ % For debug
+ econ.debug #0 = not
+ { "``\texttt{" write$
+ sort.key$ write$
+ "}''\\" write$
+ newline$
+ }
+ 'skip$
+ if$
+}
+
+FUNCTION {presort.two}
+{
+ bst.no.sort #0 = not
+ { order.cited int.to.str$ add.zero.to.number " " * }
+ { "" }
+ if$
+ bst.sort.year #0 = not
+ %% Use year field as the primary sorting key.
+ { year convert.year * }
+ 'skip$
+ if$
+ bst.sort.entry.type #0 = not
+ { type$ bst.sort.entry.type.order * " " * }
+ 'skip$
+ if$
+ absorder empty$
+ { "/// " * }
+ { bst.notuse.absorder.field #0 =
+ { absorder "999" =
+ { "zzz " * }
+ { absorder add.zero.to.number "000" =
+ { "/// " * }
+ { absorder add.zero.to.number * " " * }
+ if$
+ }
+ if$
+ }
+ { "/// " * }
+ if$
+ }
+ if$
+ " " * sort.label * " "
+ order empty$
+ { "/// " * }
+ { bst.notuse.order.field #0 =
+ { order "999" =
+ { "zzz " * }
+ { order add.zero.to.number "000" =
+ { "/// " * }
+ { order add.zero.to.number * " " * }
+ if$
+ }
+ if$
+ }
+ { "/// " * }
+ if$
+ }
+ if$
+ month empty$
+ { * "/// " * }
+ { month "999" =
+ { * month add.zero.to.number * "zzz " * }
+ { month add.zero.to.number "000" =
+ { * month add.zero.to.number * "/// " * }
+ { * month add.zero.to.number * " " * }
+ if$
+ }
+ if$
+ }
+ if$
+ title field.or.null sort.format.title
+ *
+ #1 entry.max$ substring$
+ 'sort.key$ :=
+ % For debug
+ econ.debug #0 = not
+ { "``\texttt{" write$
+ sort.key$ write$
+ "}''\\" write$
+ newline$
+ }
+ 'skip$
+ if$
+}
+
+%%% Codes for debugging
+FUNCTION {calc.alabel.mess}
+{ econ.debug #0 = not
+ { "\textbf{Iteration of calc.alabel: alabel = }\\" write$
+ newline$ }
+ 'skip$
+ if$
+}
+FUNCTION {calc.flabel.mess}
+{ econ.debug #0 = not
+ { "\textbf{Iteration of calc.flabel: flabel = }\\" write$
+ newline$ }
+ 'skip$
+ if$
+}
+FUNCTION {presort.one.mess}
+{ econ.debug #0 = not
+ { "\textbf{Iteration of presort (1st time): \$sort.key = }\\" write$
+ newline$ }
+ 'skip$
+ if$
+}
+
+FUNCTION {presort.two.mess}
+{ econ.debug #0 = not
+ { "\textbf{Iteration of presort (2nd time): \$sort.key = }\\" write$
+ newline$ }
+ 'skip$
+ if$
+}
+
+FUNCTION {calc.cyear.mess}
+{ econ.debug #0 = not
+ { "\textbf{Iteration of calc.cyear: sort.label = }\\" write$
+ newline$ }
+ 'skip$
+ if$
+}
+
+FUNCTION {calc.sort.label.abb.mess}
+{ econ.debug #0 = not
+ { "\textbf{Iteration of calc.sort.label.abb: sort.label.abb = }\\" write$
+ newline$ }
+ 'skip$
+ if$
+}
+
+%%% alabel
+EXECUTE {calc.alabel.mess}
+ITERATE {calc.alabel}
+
+%%% flabel
+EXECUTE {calc.flabel.mess}
+ITERATE {calc.flabel}
+
+%%% cyear and sort.label
+EXECUTE {calc.cyear.mess}
+ITERATE {calc.cyear}
+
+%%%
+EXECUTE {calc.sort.label.abb.mess}
+ITERATE {calc.sort.label.abb}
+
+%%% Sorting by $sort.key (first time)
+%
+% Sorting is done in two times. This is the first time.
+%
+EXECUTE {presort.one.mess}
+ITERATE {presort.one}
+SORT
+
+FUNCTION {forward.pass}
+{ bst.use.bysame #0 = bst.use.bysame #2 = or
+ % Not use \bysame
+ { last.sort.label sort.label.abb =
+ { last.extra.num #1 + 'last.extra.num :=
+ last.extra.num int.to.chr$ 'extra.label :=
+ }
+ { "a" chr.to.int$ 'last.extra.num :=
+ "" 'extra.label :=
+ sort.label.abb 'last.sort.label :=
+ }
+ if$
+ }
+ % Use \bysame
+ { last.sort.label sort.label.abb =
+ { last.extra.num #1 + 'last.extra.num :=
+ last.extra.num int.to.chr$ 'extra.label :=
+ }
+ { "a" chr.to.int$ 'last.extra.num :=
+ "" 'extra.label :=
+ sort.label.abb 'last.sort.label :=
+ }
+ if$
+ author empty$
+ { editor empty$
+ { "" }
+ 'format.editors.alt
+ if$
+ }
+ 'format.authors.alt
+ if$
+ 'this.author :=
+ % format.names 'this.author :=
+ this.author prev.author =
+ { "bysame" 'extra.label.bysame := }
+ { this.author "" =
+ { "abcxyz" }
+ 'this.author
+ if$
+ 'prev.author :=
+ }
+ if$
+ }
+ if$
+}
+
+FUNCTION {reverse.pass}
+{ next.extra "b" =
+ { "a" 'extra.label := }
+ 'skip$
+ if$
+ extra.label empty$ not
+ { cyear extra.label * }
+ { cyear "" * }
+ if$
+ "" field.or.null *
+ 'cyear :=
+ extra.label 'next.extra :=
+}
+
+%%% \bysame
+ITERATE {forward.pass}
+
+REVERSE {reverse.pass}
+
+%%% Sorting by sort.key$ (second time)
+EXECUTE {presort.two.mess}
+ITERATE {presort.two}
+SORT
+
+FUNCTION {reset.prev.author}
+{ "xxyyzz" 'prev.author := }
+
+EXECUTE {reset.prev.author}
+
+FUNCTION {forward.pass.two}
+{ bst.use.bysame #1 =
+ { author empty$
+ { editor empty$
+ { "" }
+ 'format.editors.alt
+ if$
+ }
+ 'format.authors.alt
+ if$
+ 'this.author :=
+ this.author prev.author =
+ { "bysame" 'extra.label.bysame := }
+ { this.author "" =
+ { "abcxyz" }
+ 'this.author
+ if$
+ 'prev.author :=
+ }
+ if$
+ }
+ 'skip$
+ if$
+}
+
+ITERATE {forward.pass.two}
+
+FUNCTION{punctuation}
+{
+ "%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%" write$ newline$
+ "% This bbl file is created by econ.bst ver." econ.version * write$ newline$
+ "% The latest econ.bst is available at" write$ newline$
+ "% <https://github.com/ShiroTakeda/econ-bst>" write$ newline$ newline$
+}
+
+EXECUTE {punctuation}
+
+FUNCTION {begin.bib}
+{
+ preamble$ empty$
+ 'skip$
+ { preamble$ write$ newline$ }
+ if$
+ bst.use.bysame #0 =
+ % Not use \bysame.
+ 'skip$
+ % Use \bysame.
+ { "%%% Definition of \bysame" write$ newline$
+ "\ifx\undefined\bysame" write$ newline$
+ "\newcommand{\bysame}{" bst.bysame.definition * "}" *
+ write$ newline$
+ "\fi" write$ newline$ newline$ }
+ if$
+ %% When number index is attached to the beginning of each item.
+ bst.use.number.index #0 =
+ 'skip$
+ { bst.number.index.digit "1" =
+ % one digit.
+ { bst.number.index.bibhang.one }
+ { bst.number.index.digit "2" =
+ % two digits.
+ { bst.number.index.bibhang.ten }
+ % three or more digits.
+ { bst.number.index.bibhang.hund }
+ if$
+ }
+ if$
+ 'hang :=
+ "%%% Redefinition of \bibhang" write$ newline$
+ "\ifx\undefined\bibhang" write$ newline$
+ "\relax" write$ newline$
+ "\else" write$ newline$
+ "\setlength{\bibhang}{"
+ hang * "}" * write$ newline$
+ "\fi" write$ newline$ newline$
+ }
+ if$
+ "\begin{thebibliography}{xxx}" write$ newline$
+
+ %% Initialize the variable `index'.
+ #0 'index :=
+}
+
+FUNCTION {end.bib}
+{ newline$ "\end{thebibliography}" write$ newline$ }
+
+EXECUTE {begin.bib}
+
+EXECUTE {init.state.consts}
+
+ITERATE {call.type$}
+
+EXECUTE {end.bib}
+
+% --------------------
+% Local Variables:
+% fill-column: 78
+% mode: bst
+% End:
diff --git a/biblio/bibtex/contrib/economic/CHANGELOG b/biblio/bibtex/contrib/economic/CHANGELOG
new file mode 100644
index 0000000000..0e4214d6f5
--- /dev/null
+++ b/biblio/bibtex/contrib/economic/CHANGELOG
@@ -0,0 +1,53 @@
+2009-11-18
+- the LaTeX classes for the journals "Agricultural Economics" (agecon.cls),
+ "Applied Economics" (apecon.cls), "Economica" (ecca.cls),
+ "European Review of Agricultural Economics" (erae.cls),
+ "International Tax and Public Finance" (itaxpf.cls),
+ "Journal of Rural Studies" (jrurstud.cls), "Regional Studies" (regstud.cls),
+ and "World Development" (worlddev.cls) no longer load the "csquotes" package
+- the LaTeX classes for the journals "Agricultural Economics" (agecon.cls),
+ "American Journal of Agricultural Economics" (ajae.cls)
+ "Applied Economics" (apecon.cls),
+ "European Review of Agricultural Economics" (erae.cls),
+ "Journal of Rural Studies" (jrurstud.cls), and
+ "Regional Studies" (regstud.cls) no longer load the packages
+ "fontenc" and "inputenc" so that the user can decide, which encoding
+ (s)he uses
+- the LaTeX classes for the journals
+ "International Tax and Public Finance" (itaxpf.cls),
+ "Post-Communist Economies" (pocoec.cls), and
+ "World Development" (worlddev.cls) no longer load the "fontenc" package
+- minor improvements in the LaTeX class for the
+ "American Journal of Agricultural Economics" (ajae.cls)
+- added LaTeX class for the NJF seminar 425 and hopefully also for other
+ NJF seminars
+- the BibTeX style for the"European Review of Agricultural Economics"
+ (erae.bst) shows the DOIs now (if available)
+- added example for a LaTeX document (apecon.tex) and a corresponding
+ BibTeX data base (apecon.bib) that use the LaTeX class and the BibTeX style
+ for the journal "Applied Economics"
+- added LaTeX file (ier-bib-test.tex) and BibTeX data base (ier-ex.bib)
+ to check the BibTeX style for the International Economic Review (IER)
+- some example files load the packages "inputenc" and "fontenc" now, because
+ these packages are no longer loaded by the corresponding class files
+- the package includes the compiled PDF files of most example files now
+
+2009-01-08
+- added BibTeX style for the Journal of Applied Econometrics (JAE)
+- slightly improved LaTeX class for Post-Communist economies (pocoec.cls)
+- added slightly modified BibTeX style that can be used together
+ with the LaTeX package "csquotes"
+
+2008-12-29
+- added support for Agricultural Economics (AgEcon)
+- added support for Applied Economics (ApEcon)
+- added BibTeX style for the Journal of Political Economy (JPE)
+- added support for the Journal of Rural Studies (JRurStud)
+- added support for Post-Communist Economies (PoCoEc)
+- added support for Regional Studies (RegStud)
+- added support for the Tagungsband of the Austrian Association of Agricultural
+ Economists (Oesterreichische Gesellschaft fuer Agraroekonomie, OeGA)
+- added BibTeX style for "Reference Style X" of Taylor and Francis
+- added support for World Development (WorldDev)
+- this bundle is developed on Sourceforge.net now:
+ http://sourceforge.net/projects/economtex/
diff --git a/biblio/bibtex/contrib/economic/NEWS b/biblio/bibtex/contrib/economic/NEWS
new file mode 100644
index 0000000000..4b91584fc6
--- /dev/null
+++ b/biblio/bibtex/contrib/economic/NEWS
@@ -0,0 +1,21 @@
+2008-12-29 economtex -- Support for Economists using LaTeX and BibTeX
+
+The "economtex" project [1,2] aims at supporting economists who use LaTeX
+and/or BibTeX. Currently, this is done in two ways:
+First, the economtex project provides LaTeX classes/styles and BibTeX styles
+for manuscripts to be submitted to economics journals.
+Second, the economtex project provides a Wiki [3] for economists to share
+information on using LaTeX in their profession.
+
+The "economtex" project has released a largely enhanced version of its
+package of LaTeX classes and BibTeX styles today [4]. This is the first release
+on Sourceforge.net. Earlier versions of this package were already available as
+"economic bundle" on CTAN [5]. The development of this package has been moved
+to Sourceforge.net a few month ago and many new LaTeX classes and BibTeX styles
+have been added. The updated package will be available also on CTAN soon.
+
+[1] http://economtex.sourceforge.net/
+[2] http://sourceforge.net/projects/economtex/
+[3] http://economtex.wiki.sourceforge.net/
+[4] http://sourceforge.net/project/platformdownload.php?group_id=240001
+[5] http://www.ctan.org/tex-archive/biblio/bibtex/contrib/economic/
diff --git a/biblio/bibtex/contrib/economic/README b/biblio/bibtex/contrib/economic/README
new file mode 100644
index 0000000000..cd8d1e9bac
--- /dev/null
+++ b/biblio/bibtex/contrib/economic/README
@@ -0,0 +1,210 @@
+LaTeX and BibTeX Support for Submissions to Economics Journals
+
+
+CONTENTS
+
+As of today, following classes and styles are available:
+
+1) American Economic Review (AER)
+aer.bst: BibTeX style. It requires the style files aer.sty (in this bundle)
+ and harvard.sty (CTAN:macros/latex/contrib/harvard/)
+aertt.bst: This reproduces the incredibly crazy way the
+ AER asks for ``final'' manuscripts to look. It requires the
+ style files aertt.sty (in this bundle),
+ harvard.sty (CTAN:macros/latex/contrib/harvard/), and
+ ulem.sty (CTAN:macros/latex/contrib/misc/)
+aer.sty: LaTeX style for the AER
+aertt.sty: LaTeX style for ``final'' manuscripts submitted to the AER
+author: Peter Williams <peterw (at) archsci.arch.su.oz.au>
+aer-cje-ex.tex: example LaTeX file
+aer-cje-ex.bib: bibliography of the example file
+authors of aer-cje-ex.*: Randall M. Wigle <rwigle (at) wlu.ca>,
+ Nelson H. F. Beebe <beebe (at) alfred.math.utah.edu>, and
+ Arne Henningsen <arne (dot) henningsen (at) gmail (dot) com>
+aer-natbib-ex.tex: LaTeX file for testing aer.bst with the natbib package
+author of aer-natbib-ex.tex: Arne Henningsen <arne (dot) henningsen (at) gmail (dot) com>
+
+2) Agricultural Economics (AgEcon)
+agecon.cls: LaTeX class
+agecon.bst: BibTeX style
+author: Arne Henningsen <arne (dot) henningsen (at) gmail (dot) com>
+license: LPPL
+
+3) American Journal of Agricultural Economics (AJAE)
+ajae.bst: BibTeX style
+ajae.cls: LaTeX class
+ajae-ex.tex: example LaTeX file
+ajae-ex.bib: bibliography of the example file
+authors: Arne Henningsen <arne (dot) henningsen (at) gmail (dot) com>
+ and Karsten Heymann
+license: LPPL
+
+4) Applied Economics (ApEcon)
+apecon.cls: LaTeX class
+apecon.bst: BibTeX style
+author: Arne Henningsen <arne (dot) henningsen (at) gmail (dot) com>
+license: LPPL
+
+5) Canadian Journal of Economics (CJE)
+cje.bst: BibTeX style. It requires the style files cje.sty (in this bundle)
+ and harvard.sty (CTAN:macros/latex/contrib/harvard/)
+cje.sty: LaTeX style for the CJE
+author: Peter Williams <peterw (at) archsci.arch.su.oz.au>
+aer-cje-ex.tex: example LaTeX file
+aer-cje-ex.bib: bibliography of the example file
+authors of aer-cje-e.*: Randall M. Wigle <rwigle (at) wlu.ca>,
+ Nelson H. F. Beebe <beebe (at) alfred.math.utah.edu>, and
+ Arne Henningsen <arne (dot) henningsen (at) gmail (dot) com>
+
+6) Econometrica (ECTA)
+ecta.bst: BibTeX style. It requires the LaTeX style ``natbib'' (or ``chicago'')
+author: Sebastian Perez-Duarte <perez (at) ensae.fr>
+ OR
+econometrica.bst: BibTeX style. It requires the style file
+ harvard.sty (CTAN:macros/latex/contrib/harvard/)
+author: KC Border <kcb (at) hss.caltech.edu>
+ OR
+econometrica-fr.bst: BibTeX style. It requires the style file
+ harvard.sty (CTAN:macros/latex/contrib/harvard/)
+author: Guillaume Horny <horny (at) cournot.u-strasbg.fr>
+
+7) Economica (ECCA)
+ecca.bst: BibTeX style
+ecca.cls: LaTeX class
+ecca-ex.tex: example LaTeX file
+ecca-ex.bib: bibliography of the example file
+author: Arne Henningsen <arne (dot) henningsen (at) gmail (dot) com>
+license: LPPL
+
+8) European Review of Agricultural Economics (ERAE)
+erae.bst: BibTeX style
+erae.cls: LaTeX class
+erae-ex.tex: example LaTeX file
+erae-ex.bib: bibliography of the example file
+author: Arne Henningsen <arne (dot) henningsen (at) gmail (dot) com>
+license: LPPL
+
+9) International Economic Review (IER)
+ier.bst: BibTeX style
+author: Doug McKee <dmckee (at) ucla.edu>
+license: LPPL
+
+10) International Tax and Public Finance (ITAXPF)
+itaxpf.cls: LaTeX class
+itaxpf.bst: BibTeX style
+itaxpf-ex.tex: example LaTeX file
+itaxpf-ex.bib: bibliography of the example file
+itaxpf-ex-title.tex: example LaTeX file for a title page
+author: Arne Henningsen <arne (dot) henningsen (at) gmail (dot) com>
+license: LPPL
+
+11) Journal of Applied Econometrics (JAE)
+jae.bst: BibTeX Style
+author: unknown
+license: LPPL
+
+12) Journal of Political Economy (JPE)
+jpe.bst: BibTeX style
+author: Adam Seth Litwin <aslitwin (at) jhu (dot) edu>
+license: LPPL
+
+13) Journal of Rural Studies (JRurStud)
+jrurstud.cls: LaTeX class
+ (BibTeX style: "elsart-harv.bst", available at
+ http://www.elsevier.com/wps/find/authorsview.authors/elsart)
+author: Arne Henningsen <arne (dot) henningsen (at) gmail (dot) com>
+license: LPPL
+
+14) Journal of Statistical Software (JSS)
+jss2.bst: slightly modified BibTeX style that can be used together
+ with the LaTeX package "csquotes"
+
+15) Oesterreichische Gesellschaft fuer Agraroekonomie (OeGA)
+ (Austrian Association of Agricultural Economists)
+oegatb.cls: LaTeX class for short papers for publication in the "Tagungsband"
+oega.bst: BibTeX style
+oegatb-ex.tex: example file
+oegatb-ex.bib: bibliography of the example file
+oegatb-ex.png: figure included in the example file
+author: Arne Henningsen <arne (dot) henningsen (at) gmail (dot) com>
+license: LPPL
+
+16) Post-Communist Economies (PoCoEc or PCE)
+pocoec.cls: LaTeX class
+ (BibTeX style: tandfx.bst, in this package)
+author: Arne Henningsen <arne (dot) henningsen (at) gmail (dot) com>
+license: LPPL
+
+17) Regional Studies (RegStud)
+regstud.cls: LaTeX class
+regstud.bst: BibTeX style
+author: Arne Henningsen <arne (dot) henningsen (at) gmail (dot) com>
+license: LPPL
+
+18) Taylor and Francis Reference Style X
+tandfx.bst: BibTeX style for "Reference Style X" of Taylor and Francis
+
+19) World Development (WorldDev)
+worlddev.cls: LaTeX class
+worlddev.bst: BibTeX style
+author: Arne Henningsen <arne (dot) henningsen (at) gmail (dot) com>
+license: LPPL
+
+
+
+USAGE
+
+The usage of most classes and styles is explained inside these files.
+Example files are provided for a few classes and styles:
+aer-cje-ex.tex, aer-natbib-ex.tex, ajae-ex.tex, erae-ex.tex, ecca-ex.tex,
+itaxpf-ex.tex, itaxpf-ex-title.tex, oegatb-ex.tex.
+
+Most classes load the natbib package
+(see CTAN:macros/latex/contrib/natbib/)
+
+Other styles generally permit four forms of citation, which are illustrated
+below:
+ Citation Form Result
+\cite{wealth} (Smith 1776)
+\citename{wealth} Smith
+\citeyear{wealth} (1776)
+\citeasnoun{wealth} Smith (1776)
+
+Further information might be available at
+ http://economtex.wiki.sourceforge.net/
+
+
+
+BUG REPORTS
+
+Please report any bugs and problems at
+ http://sourceforge.net/projects/economtex/
+
+
+
+MAINTAINER
+
+Arne Henningsen
+Department of Agricultural Economics
+University of Kiel
+Olshausenstr. 40
+D-24098 Kiel (Germany)
+Tel: +49-431-880 4445
+Fax: +49-431-880 1397
+http://www.arne-henningsen.name/
+
+
+
+ACKNOWLEDGEMENT
+
+I would like to thank Randall M. Wigle for maintaining these files
+from 1993 to 2006 and all authors for preparing and publishing these files.
+
+
+
+AVAILABILITY
+
+These files are currently available from
+ CTAN:biblio/bibtex/contrib/economic/
+and
+ http://sourceforge.net/projects/economtex/
diff --git a/biblio/bibtex/contrib/economic/aer-cje-ex.bib b/biblio/bibtex/contrib/economic/aer-cje-ex.bib
new file mode 100644
index 0000000000..cec7e6d2cc
--- /dev/null
+++ b/biblio/bibtex/contrib/economic/aer-cje-ex.bib
@@ -0,0 +1,353 @@
+
+
+% Journals
+
+@STRING{AER="{A}merican {E}conomic {R}eview " }
+@STRING{CO2="{CO}2"}
+@STRING{JPE="Journal of Political Economy"}
+@STRING{CJE="Canadian Journal of Economics"}
+@STRING{QJE="Quarterly Journal of Economics"}
+
+% Authors
+@STRING{jwrw="John Whalley and Randall M. Wigle"}
+@STRING{self= "Randall M. Wigle"}
+@STRING{me=self}
+
+
+% Institutions
+
+@STRING{IIE="{I}nstitute for {I}nternational {E}conomics"}
+@STRING{UN="{U}nited {N}ations"}
+@STRING{FAO="{F}ood {a}nd {A}griculture {O}rganization {o}f {t}he {U}nited
+{N}ations"}
+@STRING{IBRD="{I}nternational {B}ank {f}or {R}econstruction {a}nd
+{D}evelopment"}
+@STRING{USDA="{U}nited {S}tates {D}epartment {o}f {A}griculture"}
+@STRING{OECD="{O}rganization {f}or {E}conomic {C}ooperation {a}nd
+{D}evelopment"}
+@STRING{GATT="{G}eneral {A}greement on {T}ariffs and {T}rade"}
+@STRING{StatCan="{Statistics Canada}"}
+% INTERNATIONAL TRADE BIBLIOGRAPHY
+
+@BOOK{ES,
+ author="Harold C. Eastman and Stefan Stykolt",
+ title="The Tariff and Competition in Canada",
+ place="Toronto", publisher="McMillan",year= 1967}
+@INCOLLECTION{markusenc1,
+ author="James R. Markusen",
+ title="Canadian Gains From Trade in the
+ Presence of Scale Economies and Imperfect Competition.",
+ editor="John Whalley and Roderick Hill", year=1985,
+ pages="113--156",booktitle="Canada-{U}nited {S}tates Free Trade",
+ address="Toronto",publisher="University of Toronto Press",
+ number=11, series="Research Volumes for the {M}c{D}onald
+ Commission"}
+@ARTICLE{melvintrans,
+ author="James R. Melvin",title="The regional economic
+ consequences of tariffs and domestic transportation costs.",
+ journal="Canadian Journal of Economics", volume="XVIII",
+ number="2", month="May",year=1985,pages="237--257"}
+@ARTICLE{porter,
+ author="Robert H. Porter", title="Tariff policies in a small
+ open spatial economy", journal="Canadian Journal of Economics",
+ volume="XVII",number=2,month="May",year=1984, pages="270--282"}
+@BOOK{trela-whalley,
+ author="Irene Trela and John Whalley",
+ title="Regional Aspects of Confederation", place="Toronto",
+ publisher="University of Toronto Press",
+ year=1986, volume=68, series="Mc{D}onald Commission Research
+ Volumes"}
+@BOOK{hill-whalley,
+ author="John Whalley and Roderick Hill",
+ title="Canada-United States Free Trade",
+ place="Toronto",publisher="University of Toronto Press",
+ year=1985, volume=11, series="Mc{D}onald Commission Research
+ Volumes"}
+@BOOK{ww,
+ author="Ronald J. Wonnacott and Paul Wonnacott",
+ title="Free Trade Between the United States and Canada: The
+ Potential Economic Effects",place="Cambridge Mass.",
+ publisher="The Harvard University Press", year=1967}
+@ARTICLE{waters,
+ title="Transport Costs and the Static Welfare Costs of
+ Tariffs", author="Waters {II}, W. G.", journal="American
+ Economic Review", Volume=64, Number=4, pages="730--732",
+ year=1974}
+@BOOK{cameron,
+ title="The Free Trade Papers", editor="Duncan Cameron",
+ place="Toronto", publisher="Lorimer Press", year=1986}
+@BOOK{m-m84,
+ title="The Theory of International Trade and Its Canadian
+ Applications", author="James R. Markusen and James R. Melvin",
+ year=1984,publisher="Butterworths",place="Toronto"}
+@MISC{focus,
+ title="{GATT} {F}ocus", author="{GATT}", note="Various issues" }
+@ARTICLE{jpe89,
+ author="James R. Markusen and Randall M. Wigle", journal="Journal
+ of Political Economy", year=1989, title="Nash Equilibrium
+ Tariffs for the {U}nited {S}tates and {C}anada: The roles of country
+ size, scale economies, and capital mobility",
+ volume=97,number=2}
+@BOOK{quest,
+ title="The {U}nited {S}tates and {C}anada: The quest for free
+ trade.",author="Paul Wonnacott", publisher="Institute for
+ International Economics",year=1987,month="March",
+ series="Policy Analyses in International Economics",
+ number=16,place="Washington {D.C.}"}
+@BOOK{CAFT,
+ editor="A. R. Riggs and Tom Velk",
+ title="Canadian--{A}merican Free Trade: Historical, Political
+ and Economic Dimensions", publisher="The Institute for
+ Research on Public Policy", year=1987,place="Halifax {N.S.}"}
+
+@ARTICLE{north-south,
+ title="Explaining the Volume of {N}orth-{S}outh Trade",
+ author="James R. Markusen and Randall M. Wigle",
+ journal="The Economic Journal", volume=100,
+ month="December", pages="1206--1215",year=1990}
+
+@INCOLLECTION{oecd-ibrd,
+ title="Terms of Trade Effects, Trade Liberalization and
+ Developing Countries",author=jwrw,year=1990,
+ booktitle="Agricultural Trade Liberalization:
+ Implications for Developing Countries",editor="K. Odin",
+ publisher="Organization for Economic Cooperation and Development",
+ place="Paris"}
+
+@INCOLLECTION{ag-wars,
+ author="Glenn W. Harrison and Lisa Rutstrom and Randall M. Wigle",
+ year=1989,title="The Costs of an Agricultural Trade
+ War",booktitle="Macroeconomic Consequences of Farm-Support Policies",
+ editor="Stoeckel, Andrew B. and David Vincent and Sandy Cuthbertson",
+ place="Durham, N.C.", publisher="Duke University Press",
+ pages="330--367"}
+
+@INCOLLECTION{qualifications,
+ author=me,title="The Received Wisdom of {C}anada-{U.S}. Free Trade:
+ Qualifications",editor="Riggs, Alvin R. and Tom Velk",
+ booktitle="Canadian-American Free Trade: Historical,
+ Political and Economic Dimensions",publisher="Institute for
+ Research on Public Policy",place="Halifax, N.S.",year=1987,
+ pages="105--114"}
+
+@INCOLLECTION{columbia-discussion,
+ author=me,year=1986,title="Summary of the Panel and Floor
+ Discussion",editor="T. N. Srinivasan and John Whalley",
+ booktitle="General Equilibrium Trade Policy Modelling",
+ publisher="M.I.T. Press",pages="323--354"}
+
+@ARTICLE{rock-hard,
+ author=me,year=1988, title="Between a Rock and a Hard Place: The
+ Economics of {C}anada-{U.S}. Free Trade",journal="Canadian Public
+ Policy",volume="XIV",number=1,month="March",pages="104--108"}
+
+@BOOK{hathaway,
+ author="Dale Hathaway", title="Agriculture in the {GATT}:
+ Rewriting the Rules", publisher=IIE, place="Washington, D.C.",
+ year=1985}
+
+@ARTICLE{trela-whalley-MFA,
+ author="Irene Trela and John Whalley", title="Global Effects of
+ Devloped Country Trade Restrictions on Textiles and Apparel",
+ journal="Economic Journal", volume="100", number="403",
+ year=1990, month="December", pages="1190--1205"}
+
+@PHDTHESIS{rwt,
+ author="Robert Waschik", title="International Trade with
+ Variable Factor Supply", year=1990, school="University of
+ {W}estern {O}ntario", place="London {O}ntario, {C}anada"}
+
+@BOOK{completing-ur,
+ title="Completing the {U}ruguay Round: A Results-Oriented
+ Approach to the GATT Negotiations", editor="Jeffrey J. Schott",
+ publisher="Institute for International Economics", year=1990,
+ place="Washington, D.C."}
+
+@UNPUBLISHED{rmd,
+ title="Transportation Costs in Regional Models of International
+ Trade: An Application to {C}anada-{U.S}. Trade", author=me,
+ year=1990, type="Wilfrid Laurier University Working Paper
+ \#90242", month="December"}
+
+@BOOK{FTA,
+ title="The Canada-U.S. Free Trade Agreement [{C}opy 10-12-87]",
+ author="{External Affairs Canada}",
+ year=1987,publisher="International Trade Communications Group",
+ place="Ottawa"}
+
+@BOOK{GATT,
+ author="{General Agreement on Tariffs and Trade}",
+ title="{GATT:} What it is, What it does",
+ place="Geneva", publisher="{ General Agreement on
+ Tariffs and Trade}", year=1990 }
+
+@BOOK{IIE-ur,
+ author="Gary C. Hufbauer and Jeffrey Schott",
+ title="Trading for growth: The Next Round of Trade Negotiations",
+ series="Analyses in International Economics", number=11,
+ place="Washington", publisher="Institute for International
+ Economics",year=1985}
+
+@ARTICLE{markusen-venables,
+ author="Anthony J. Venables and James R. Markusen",
+ title="Trade Policy with Increasing Returns and Imperfect
+ Competition: Contradictory Results from Competing Assumptions",
+ journal="Journal of International Economics",
+ year=1988,volume=24, pages="299--316"}
+
+@ARTICLE{harris-84,
+ author="Richard G. Harris", title="Applied General Equilibrium
+ Analysis of Small Open Economies with Scale Economies and
+ Imperfect Competition", journal=AER, volume=74,
+ pages="1016--1032",year=1984}
+% CGE References for Data Paper
+
+@BOOK{DS86,
+ author="Deardorff, Alan V. and Robert M. Stern",
+ title="The {M}ichigan Model of World Production and Trade: Theory
+ and Applications",
+ Address="Cambridge, Mass.", year=1986,
+ publisher="{M}{I}{T} Press"}
+
+@TECHREPORT{DS89,
+ author="Deardorff, Alan V. and Robert M. Stern",
+ title="A Computational Analysis of Alternative Scenarios for
+ Multilateral Trade Liberalization",
+ institution="Economic Council of {C}anada",
+ year=1989, type="Working Paper", number=363, month="August"}
+
+@BOOK{GAMS,
+ author="Brooke, Anthony and David Kendrick and Alexander
+ Meeraus",
+ title="{GAMS} A User's Guide",
+ publisher="The Scientific Press", address="Redwood City, CA",
+ year=1988}
+
+@ARTICLE{JMCB,
+ author="Dewald, William G. and Jerry G. Thursby and Richard G.
+ Anderson",
+ title="Replication in Empirical Economics: The {J}ournal of
+ {M}oney, {C}redit and {B}anking {P}roject",
+ journal="American Economic Review", year=1986, volume=76,
+ number=4, pages="587-603", month="Sept."}
+
+@TECHREPORT{ECDATA,
+ author=" Glenn Harrison and Thomas F. Rutherford and Ian Wooton",
+ title="An Empirical Database for A General Equilibrium Model of
+ the European Communities", year=1989, institution="University of
+ {W}estern {O}ntario", type="Working Paper", number="8901C" }
+
+@BOOK{PRCIO,
+ author="{East-West Institute}",
+ title="An Input-Output Table for China, 1980",
+ publisher="Pergammon Press", year=1986, address="Honolulu"}
+
+@TECHREPORT{UNtrade,
+ author="James K. Binkley and Thomas W. Hertel and Marinos Tsigas",
+ title="The {UN} Trade Data: Can it be Saved?",
+ type="Working Paper",
+ institution="Purdue University", month="August", year=1990}
+
+@BOOK{UNva,
+ author=UN ,
+ title="Industrial Statistics Yearbook, 1986",
+ publisher=UN , year=1987}
+
+@BOOK{FAOfish,
+ author=FAO,
+ title="yearbook of fishery statistics, 1986",
+ volume=63, year=1988, publisher=UN}
+
+@ARTICLE{comparisons,
+ author="Robert Summers and Alan Heston",
+ title="A new set of international comparisons of real product and
+ price level estimates for 130 countries 1950--1985",
+ journal="Review of Income and Wealth", year=1988,
+ pages="1--25",volume=34,number=1,month="March"}
+
+@BOOK{FAOwood,
+ author=FAO, title="Forest Products 1976--1987",
+ number=22, year=1989, place="Rome", publisher=UN}
+
+@BOOK{world-tables,
+ title="The World Tables, 1987",publisher=IBRD,
+ author=IBRD,place="Washington",year=1988}
+
+@BOOK{WDR-89,
+ title="World Development Report", author=IBRD,
+ year=1989, publisher="Oxford University Press", place="London"}
+
+@BOOK{USDA-pse,
+ title="Estimates of Producer and Consumer Subsidy Equivalents:
+ Government Intervention in Agriculture, 1982--1986", author=USDA,
+ year=1988, publisher=USDA, month="April", place="Washington D.C."}
+
+@BOOK{OECD-pse,
+ title="National policies and agricultural trade",author=OECD,
+ year=1987, publisher=OECD, place="Paris"}
+
+@BOOK{io-EC80,
+ title="National Accounts ESA: Input-Output Tables, 1980",
+ author="{e}urostat",year=1986,publisher="Offices {d}es publications
+ officielles des {C}ommunaut\'es europ\'eenes",
+ note="Cat.: CA-46-86-743-2A-C",place="Luxembourg"}
+
+@BOOK{io-CAN82,
+ title="System of National Accounts: The input-output structure
+ of the {C}anadian economy 1981--1984", author="{S}tatistics
+ {C}anada", place="Ottawa",year=1988,publisher="Supply and
+ Services {C}anada",number="Cat.: 15-201"}
+
+@BOOK{io-LDC,
+ title="Input-Output Tables for Developing Countries",volume="I",
+ author=UN,publisher=UN,year=1975,
+ note="Pages 57--82",place="New York"}
+
+@BOOK{io-JPN80,
+ author="{Statistics Bureau, Prime Minister's Office}",
+ title="Japan Statistical Yearbook, 1987",
+ publisher="Japan Statistical Association",year=1987,
+ note=" Pages 566--570, Table 16-13",place="Tokyo"}
+
+@article{io-USA82,
+ journal="Survey of Current Business", volume=68, number=4,
+ title="Annual Input-Output Accounts of the U.S. Economy, 1982",
+ author="{Bureau of Economic Analysis of the U.S. Department of
+ Commerce}", month="April",year=1988, note="Table 1, pages
+ 32--39", place="Washington"}
+
+@BOOK{tablas,
+ title="Tablas de insumo-producto an Am\'erica
+ Latina",author="{Economic Commission for Latin
+ America}",publisher=UN, year=1983,place="New York"}
+
+@MISC{io-OZ82,
+ author="unknown",title="Industry by Industry Flow Matrix
+ 1982--1983",howpublished="Photocopy",note="Table for Australia
+ --- Table~11 pages~62--64"}
+
+@BOOK{WDR-90,
+ title="World Development Report", author=IBRD,
+ year=1990, publisher="Oxford University Press", place="London"}
+
+@MISC{BCR,
+ title="Bank of {C}anada Review", author="{Bank of Canada}",
+ address="Ottawa",year="Various issues",
+ note="Monthly publication"}
+
+@BOOK{CAN-86,
+ title="Input Output Tables for Canada ???", author=StatCan,
+ year="1991 ?", publisher="Supply and Services Canada",note="See
+ Tables ??? and ???"}
+
+@ARTICLE{PWT5,
+ title="The {PENN} World Table (Mark~5): An EXPANDED SET OF
+ INTERNATIONAL COMPARISONS, 1950--1988", author="Robert Summers
+ and Alan Heston", journal=QJE,
+ year=1991,month="May",pages="327--368",number=2, volume="?"}
+
+@TECHREPORT{ussr72,
+ title="Input-Output Structure of the {S}oviet Economy: 1972",
+ author="Dimitri Gallik and Barry L. Kostinsky and Vladimir Treml",
+ institution="{U.S.} Department of Commerce: Bureau of the
+ Census", year=1983, type="Foreign Economic Report", number=18}
diff --git a/biblio/bibtex/contrib/economic/aer-cje-ex.tex b/biblio/bibtex/contrib/economic/aer-cje-ex.tex
new file mode 100644
index 0000000000..99e5a7551f
--- /dev/null
+++ b/biblio/bibtex/contrib/economic/aer-cje-ex.tex
@@ -0,0 +1,45 @@
+\documentclass{article}
+% -*-latex-*-
+% Document name: /usr/local/lib/tex/bibtex/xampl.ltx
+% Creator: Nelson H. F. Beebe [beebe@alfred.math.utah.edu]
+% Creation Date: Mon Jun 8 08:42:49 1992
+% Modified by Arne Henningsen [arne (dot) henningsen (at) gmail (dot) com]
+% on 2007/01/23 (LaTeX 2.09 -> LaTeX2e)
+
+%\def\mode{aertt}
+%\def\mode{aer}
+\def\mode{cje}
+
+\usepackage{hyperref}
+\usepackage{harvard}
+\usepackage{\mode}
+
+\author{A. U. Thor}
+
+\date{}
+
+\title{Bibliography Style: {\tt {\mode}}}
+
+\pagestyle{myheadings}
+
+\markboth{Bibliography Style: {\tt {\mode}}}{Bibliography Style: {\tt {\mode}}}
+
+\begin{document}
+
+ \bibliographystyle{\mode}
+
+ \maketitle
+
+The old \verb|\cite| gives \cite{ww} and \cite{ww,waters}
+
+\verb|\citeasnoun| gives \citeasnoun{ww}
+
+\verb|\citeyear| gives \citeyear{ww} and \citeyear{ww,waters}
+
+\verb|\citename| gives \citename{ww}
+
+ \nocite{*}
+
+ \bibliography{aer-cje-ex}
+
+\end{document}
diff --git a/biblio/bibtex/contrib/economic/aer-natbib-ex.tex b/biblio/bibtex/contrib/economic/aer-natbib-ex.tex
new file mode 100644
index 0000000000..ab4cdef1d5
--- /dev/null
+++ b/biblio/bibtex/contrib/economic/aer-natbib-ex.tex
@@ -0,0 +1,45 @@
+\documentclass{scrartcl}
+\usepackage[T1]{fontenc}
+\usepackage[latin1]{inputenc}
+\usepackage{lmodern}
+
+\usepackage{natbib}
+
+\usepackage{hyperref}
+\hypersetup{%
+ colorlinks = {true},
+ urlcolor = {blue},
+ linkcolor = {black},
+ citecolor = {black},
+ pdfauthor = {Arne Henningsen},
+ pdftitle = {Testing BibTeX style for the
+ American Economic Review (AER)},
+ pdfkeywords = {AER, BibTeX, LaTeX}
+}
+
+\title{Testing Bib\TeX{} style for the
+ ``American Economic Review'' (AER)}
+\author{Arne Henningsen}
+
+\begin{document}
+
+\maketitle
+
+\section{Citations}
+\subsection{Citations in Text}
+\citet{Black29} says A, \citet{Wold89} say B, \citet{Wold} say C,
+\citet{Wold4} say D, \citet{Wold5} say E., \citet{Brown65} says F,
+and the \citet{USDA65} says G.
+
+\subsection{Citations in Parenthesis}
+A equals B \citep{Black29}, B equals C \citep{Wold89}, C equals D \citep{Wold},
+D equals E \citep{Wold4}, E equals F \citep{Wold5}, F equals G \citep{Brown65},
+and G equals A \citep{USDA65}.
+Hence, A, B, C, D, E, F, and G are all equal
+\citep{Black29, Wold89, Wold, Wold4, Wold5, Brown65, USDA65}.
+
+\nocite{*}
+\bibliographystyle{aer}
+\bibliography{ajae-ex}
+
+\end{document}
diff --git a/biblio/bibtex/contrib/economic/aer.bst b/biblio/bibtex/contrib/economic/aer.bst
new file mode 100644
index 0000000000..c267db6d54
--- /dev/null
+++ b/biblio/bibtex/contrib/economic/aer.bst
@@ -0,0 +1,1221 @@
+% BibTeX bibliography style `aer' (American Economic Review)
+% this file is based on the `harvard' family of files
+ % version 0.99a for BibTeX versions 0.99a or later, LaTeX version 2.09.
+ % Copyright (C) 1991, all rights reserved.
+ % Copying of this file is authorized only if either
+ % (1) you make absolutely no changes to your copy, including name, or
+ % (2) if you do make changes, you name it something other than
+ % btxbst.doc, plain.bst, unsrt.bst, alpha.bst, abbrv.bst, agsm.bst,
+ % dcu.bst, cje.bst, aer.bst, or kluwer.bst.
+ % This restriction helps ensure that all standard styles are identical.
+
+% ACKNOWLEDGEMENT:
+% This document is a modified version of alpha.bst to which it owes much of
+% its functionality.
+
+% AUTHOR
+% Peter Williams, Key Centre for Design Quality, Sydney University
+% e-mail: peterw@archsci.arch.su.oz.au
+
+ENTRY
+ { address author booktitle chapter edition editor howpublished institution
+ journal key month note number organization pages publisher school
+ series title type volume year}
+ { field.used }
+ { label.touse extra.label sort.label list.year }
+
+
+FUNCTION {not}
+{ { #0 }
+ { #1 }
+ if$
+}
+
+FUNCTION {and}
+{ {}
+ { pop$ #0 }
+ if$
+}
+
+FUNCTION {or}
+{ { pop$ #1 }
+ {}
+ if$
+}
+
+INTEGERS {quoted italic bold plain attribute
+ space comma tiedcomma semicolon colon period block empty separator
+ prev.separator next.separator next.attribute}
+
+STRINGS { s temp f name.list first.name.format later.name.formats name.style}
+
+FUNCTION {init.state.consts}
+{
+ #100 'quoted :=
+ #200 'italic :=
+ #300 'bold :=
+ #400 'plain :=
+
+ #7 'space :=
+ #6 'comma :=
+% #5 'tiedcomma :=
+% #4 'semicolon :=
+ #3 'colon :=
+ #2 'period :=
+ #1 'block :=
+ #0 'empty :=
+}
+
+FUNCTION {output2}
+{
+% Wrap the attribute.
+ attribute bold = {"{\bf " swap$ * "}" *} {} if$
+ attribute italic = {"{\it " swap$ * "}" *} {} if$
+ attribute quoted = {"``" swap$ * "''" *} {} if$
+% Append additional separators
+ separator comma = {"," * space 'separator :=} {} if$
+% separator tiedcomma = {",~" * empty 'separator :=} {} if$
+ separator space = {" " *} {} if$
+ write$
+ separator block = {newline$ "\newblock " write$} {} if$
+% Update variables, and put the new string back on the stack
+ next.attribute 'attribute :=
+ next.separator 'separator :=
+ temp
+}
+
+% <string> <separator> <string> <attribute> <final separator> output <string>
+FUNCTION {output.nonnull}
+{ 'next.separator :=
+ 'next.attribute :=
+ 'temp :=
+ 'prev.separator :=
+% If the new separator is stronger than the previous one, use it.
+ prev.separator separator < {prev.separator 'separator :=} {} if$
+% Append most separators to the string.
+ separator block = {add.period$} {} if$
+ separator period = {add.period$ space 'separator :=} {} if$
+% separator semicolon = {";" * space 'separator :=} {} if$
+ separator colon = {":" * space 'separator :=} {} if$
+ separator comma = attribute quoted = and
+ {"," * space 'separator :=} {} if$
+ output2
+}
+
+FUNCTION {output}
+{ 'next.separator :=
+ 'next.attribute :=
+ duplicate$ empty$
+ {pop$ pop$}
+ {next.attribute next.separator output.nonnull}
+ if$
+}
+
+FUNCTION {output.check}
+{ 's :=
+ 'next.separator :=
+ 'next.attribute :=
+ duplicate$ empty$
+ {pop$ pop$ "empty " s * " in " * cite$ * warning$ }
+ {next.attribute next.separator output.nonnull}
+ if$
+}
+
+FUNCTION {item.check}
+{ 'temp :=
+ empty$
+ { "empty " temp * " in " * cite$ * warning$ }
+ {}
+ if$
+}
+
+FUNCTION {plain.space} { plain space }
+
+FUNCTION {plain.space.output} { plain.space output }
+
+FUNCTION {plain.comma} { plain comma }
+
+FUNCTION {fin.entry}
+{
+ block note plain.space.output
+ period "" plain empty output.nonnull pop$
+ newline$
+}
+
+FUNCTION {field.or.null}
+{ duplicate$ empty$
+ { pop$ "" }
+ {}
+ if$
+}
+
+FUNCTION {emphasize}
+{ duplicate$ empty$
+ { pop$ "" }
+ { "{\em " swap$ * "}" * }
+ if$
+}
+
+FUNCTION {quote}
+{ duplicate$ empty$
+ { pop$ "" }
+ { add.period$ "`" swap$ * "'" * }
+ if$
+}
+
+
+% <prev name list> <new name list> compare.names <modified name list>
+INTEGERS {len1 len2 i}
+FUNCTION {compare.names}
+{ 's :=
+ 'temp :=
+ temp num.names$ 'len1 :=
+ s num.names$ 'len2 :=
+% len1 := min(len1,len2)
+ len1 len2 > {len2 'len1 :=} {} if$
+% start with an empty string, then while the components are the same
+% add "\bysame"
+ ""
+ #1 'i :=
+ {i len1 > not}
+ { temp i "{ff }{vv }{ll}{ jj}" format.name$
+% duplicate$ i int.to.str$ * warning$
+ s i "{ff }{vv }{ll}{ jj}" format.name$
+% duplicate$ i int.to.str$ * warning$
+ =
+ { #1 i < {" and " *} {} if$
+ "\bysame{}" * i #1 + 'i :=}
+ {#-1 'len1 :=}
+ if$
+ }
+ while$
+% add the rest of the second string
+ {i len2 > not}
+ { #1 i < {" and " *} {} if$
+ s i "{ff }{vv }{ll}{ jj}" format.name$ *
+ i #1 + 'i :=
+ }
+ while$
+% duplicate$ warning$
+}
+
+INTEGERS { nameptr namesleft numnames }
+
+FUNCTION {format.names}
+{ 'name.list :=
+ 'name.style :=
+ 'later.name.formats :=
+ 's := % binary separator
+ 'first.name.format :=
+ #1 'nameptr :=
+ name.list num.names$ 'numnames :=
+% If we're to make this entry bold or something, prepend to the string of names
+ name.style "" = {} {"{" name.style *} if$
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ { name.list nameptr nameptr #1 = {first.name.format} {later.name.formats} if$
+ format.name$ 'temp :=
+ nameptr #1 >
+ { namesleft #1 >
+ { ", " * temp * }
+ { temp "others" =
+ { " et~al." * }
+ {nameptr #2 = % handle ", and" vs " and "
+ {s * temp *}
+ {", and " * temp * }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ 'temp
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+% If we're to make this entry bold or something, append to the string of names
+ name.style "" = {} {"}" * *} if$
+}
+
+FUNCTION {format.authors}
+{ 'temp :=
+ "{vv~}{ll}{, jj}{, ff}" " and " "{ff~}{vv~}{ll}{, jj}" "" temp
+ format.names
+}
+
+FUNCTION {format.editors}
+{ 'temp :=
+ "{vv~}{ll}{, jj}{, ff}" " and " "{ff~}{vv~}{ll}{, jj}" ""
+ temp format.names
+ editor num.names$ #1 >
+ { ", eds" * }
+ { ", ed." * }
+ if$
+}
+
+FUNCTION {format.editors.notkey}
+{ editor empty$
+ { "" }
+ { "{ff~}{vv~}{ll}{, jj}" " and " "{ff~}{vv~}{ll}{, jj}" ""
+ editor format.names
+ editor num.names$ #1 > {", eds."} {", ed."} if$
+ *
+ }
+ if$
+}
+
+FUNCTION {format.title}
+{ space title quoted comma }
+
+FUNCTION {n.dashify}
+{ 'temp :=
+ ""
+ { temp empty$ not }
+ { temp #1 #1 substring$ "-" =
+ { temp #1 #2 substring$ "--" = not
+ { "--" *
+ temp #2 global.max$ substring$ 'temp :=
+ }
+ { { temp #1 #1 substring$ "-" = }
+ { "-" *
+ temp #2 global.max$ substring$ 'temp :=
+ }
+ while$
+ }
+ if$
+ }
+ { temp #1 #1 substring$ *
+ temp #2 global.max$ substring$ 'temp :=
+ }
+ if$
+ }
+ while$
+}
+
+FUNCTION {format.btitle}
+{ title emphasize
+}
+
+FUNCTION {tie.or.space.connect}
+{ duplicate$ text.length$ #3 <
+ { "~" }
+ { " " }
+ if$
+ swap$ * *
+}
+
+FUNCTION {either.or.check}
+{ empty$
+ 'pop$
+ { "can't use both " swap$ * " fields in " * cite$ * warning$ }
+ if$
+}
+
+FUNCTION {format.bvolume}
+{ volume empty$
+ { "" }
+ { "Vol." volume tie.or.space.connect
+ series empty$
+ {}
+ { " of " * series emphasize * }
+ if$
+ "volume and number" number either.or.check
+ }
+ if$
+}
+
+FUNCTION {format.bvolume.output}
+ {comma format.bvolume plain.space.output}
+
+FUNCTION {mid.sentence.q}
+{
+ separator empty = separator block = separator period = or or not
+}
+
+FUNCTION {format.number.series}
+{ volume empty$
+ { number empty$
+ {series field.or.null}
+ { mid.sentence.q
+ { "number" }
+ { "Number" }
+ if$
+ number tie.or.space.connect
+ series empty$
+ { "there's a number but no series in " cite$ * warning$ }
+ { add.period$ " In " * series quote * }
+ if$
+ }
+ if$
+ }
+ { "" }
+ if$
+}
+
+FUNCTION {format.edition.output}
+{ edition empty$
+ { }
+ { comma edition
+ mid.sentence.q { "l" } { "t" } if$
+ change.case$ " ed." *
+ plain.space.output
+ }
+ if$
+}
+
+FUNCTION {format.publisher.address}
+{
+ address empty$
+ {comma publisher plain.comma output}
+ {publisher empty$
+ {}
+ {comma address plain colon output
+ colon publisher plain.comma output}
+ if$}
+ if$
+}
+
+INTEGERS { multiresult }
+
+FUNCTION {multi.page.check}
+{ 'temp :=
+ #0 'multiresult :=
+ { multiresult not
+ temp empty$ not
+ and
+ }
+ { temp #1 #1 substring$
+ duplicate$ "-" =
+ swap$ duplicate$ "," =
+ swap$ "+" =
+ or or
+ { #1 'multiresult := }
+ { temp #2 global.max$ substring$ 'temp := }
+ if$
+ }
+ while$
+ multiresult
+}
+
+FUNCTION {format.pages}
+{ pages empty$
+ { "" }
+ { pages multi.page.check
+ { "pp.~" pages n.dashify * }
+ { "p.~" pages * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {output.month.year}
+ {
+ space month plain.space.output
+ space year plain.comma "year" output.check
+ }
+
+FUNCTION {output.vol.num.pages}
+{ space volume italic space output
+ number empty$
+ {}
+ { space "(" number * ")" * plain.comma output.nonnull
+ volume empty$
+ { "there's a number but no volume in " cite$ * warning$ }
+ {}
+ if$
+ }
+ if$
+% "*** a" warning$
+ comma 'next.separator := % hack
+ pages empty$
+ {}
+ { number empty$ volume empty$ and
+ { comma format.pages plain.space.output }
+ { comma pages n.dashify plain.space.output }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.chapter.pages}
+{ chapter empty$
+ 'format.pages
+ { type empty$
+ { "chapter" }
+ { type "l" change.case$ }
+ if$
+ chapter tie.or.space.connect
+ pages empty$
+ {}
+ { ", " * format.pages * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {output.in.ed.booktitle}
+{ booktitle "booktitle" item.check
+ comma "in" plain.space output.nonnull
+ editor empty$
+ { space booktitle quoted space output.nonnull}
+ { space format.editors.notkey plain.space output.nonnull
+ comma booktitle italic comma output.nonnull
+ }
+ if$
+}
+
+FUNCTION {empty.misc.check}
+{ author empty$ title empty$ howpublished empty$
+ month empty$ year empty$ note empty$
+ and and and and and
+ key empty$ not and
+ { "all relevant fields are empty in " cite$ * warning$ }
+ {}
+ if$
+}
+
+FUNCTION {format.thesis.type}
+{ type empty$
+ {}
+ { pop$
+ type "t" change.case$
+ }
+ if$
+}
+
+FUNCTION {format.tr.number}
+{ type empty$
+ { "Technical Report" }
+ 'type
+ if$
+ number empty$
+ { }
+ { number tie.or.space.connect }
+ if$
+}
+
+FUNCTION {format.article.crossref}
+{ key empty$
+ { journal empty$
+ { "need key or journal for " cite$ * " to crossref " * crossref *
+ warning$
+ ""
+ }
+ { "in {\it " journal * "\/} \cite{" * crossref * "}" *}
+ if$
+ }
+ { add.period$ "In \citeasnoun{" crossref * "}" * }
+ if$
+
+}
+
+FUNCTION {format.book.crossref}
+{ volume empty$
+ { "empty volume in " cite$ * "'s crossref of " * crossref * warning$
+ "in "
+ }
+ { "Vol." volume tie.or.space.connect
+ " of " *
+ }
+ if$
+ editor empty$
+ editor field.or.null author field.or.null =
+ or
+ { key empty$
+ { series empty$
+ { "need editor, key, or series for " cite$ * " to crossref " *
+ crossref * warning$
+ "" *
+ }
+ { "{\it " * series * "\/} \cite{" * crossref * "}" *}
+ if$
+ }
+ { " \citeasnoun{" * crossref * "}" * }
+ if$
+ }
+ { " \citeasnoun{" * crossref * "}" * }
+ if$
+}
+
+FUNCTION {output.incoll.inproc.crossref}
+{ editor empty$
+ editor field.or.null author field.or.null =
+ or
+ { key empty$
+ { booktitle empty$
+ { "need editor, key, or booktitle for " cite$ * " to crossref " *
+ crossref * warning$
+ }
+ { period "In {\it " booktitle * "\/}" * " \cite{" * crossref * "}" * plain.space output.nonnull}
+ if$
+ }
+ { period "In \citeasnoun{" crossref * "}" * plain.space output.nonnull}
+ if$
+ }
+ { period "In \citeasnoun{" crossref * "}" * plain.space output.nonnull}
+ if$
+}
+
+INTEGERS { len }
+
+FUNCTION {chop.word}
+{ 's :=
+ 'len :=
+ s #1 len substring$ =
+ { s len #1 + global.max$ substring$ }
+ 's
+ if$
+}
+
+INTEGERS { author.field editor.field organization.field title.field key.field }
+
+FUNCTION {init.field.constants}
+{ #0 'author.field :=
+ #1 'editor.field :=
+ #2 'organization.field :=
+ #3 'title.field :=
+ #4 'key.field :=
+}
+
+FUNCTION {format.lab.names.abbr}
+{ 'name.list :=
+ name.list num.names$ 'numnames :=
+ numnames #1 >
+ { numnames #2 >
+ { name.list #1 "{vv~}{ll}" format.name$ " et al." * }
+ { name.list #2 "{ff }{vv }{ll}{ jj}" format.name$ "others" =
+ { name.list #1 "{vv~}{ll}" format.name$ " et al." * }
+ { name.list #1 "{vv~}{ll}" format.name$ " and " *
+ name.list #2 "{vv~}{ll}" format.name$ *
+ }
+ if$
+ }
+ if$
+ field.used editor.field = {", eds" *} {} if$
+ }
+ {
+ name.list #1 "{vv~}{ll}" format.name$
+ field.used editor.field = {", ed" *} {} if$
+ }
+ if$
+}
+
+FUNCTION {format.lab.names.full}
+{ 'name.list :=
+ #1 'nameptr :=
+ name.list num.names$ 'numnames :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ { name.list nameptr "{vv~}{ll}" format.name$ 'temp :=
+ nameptr #1 >
+ { namesleft #1 >
+ { ", " * temp * }
+ { temp "others" =
+ { " et~al." * }
+ { " and " * temp * }
+ if$
+ }
+ if$
+ }
+ 'temp
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+ numnames #1 > field.used editor.field = and {", eds" *} {} if$
+ numnames #1 = field.used editor.field = and {", ed" *} {} if$
+}
+
+STRINGS { prev.author }
+
+FUNCTION {make.list.label}
+{author.field field.used =
+ { prev.author author compare.names format.authors
+ author 'prev.author :=}
+ { editor.field field.used =
+ { prev.author editor compare.names format.editors
+ editor 'prev.author := }
+ { organization.field field.used =
+ { "The " #4 organization chop.word
+ duplicate$ prev.author = {pop$ "\bysame{}"}
+ {duplicate$ 'prev.author :=} if$}
+ { "foo" 'prev.author :=
+ title.field field.used =
+ { format.btitle }
+ { key.field field.used =
+ { key #3 text.prefix$ }
+ { "Internal error :001 on " cite$ * " label" * warning$ }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+}
+
+FUNCTION {make.full.label}
+{ author.field field.used =
+ { author format.lab.names.full }
+ { editor.field field.used =
+ { editor format.lab.names.full }
+ { organization.field field.used =
+ { "The " #4 organization chop.word #3 text.prefix$ }
+ { title.field field.used =
+ { format.btitle }
+ { key.field field.used =
+ { key #3 text.prefix$ }
+ { "Internal error :001 on " cite$ * " label" * warning$ }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+}
+
+FUNCTION {make.abbr.label}
+{ author.field field.used =
+ { author format.lab.names.abbr }
+ { editor.field field.used =
+ { editor format.lab.names.abbr }
+ { organization.field field.used =
+ { "The " #4 organization chop.word #3 text.prefix$ }
+ { title.field field.used =
+ { format.btitle }
+ { key.field field.used =
+ { key #3 text.prefix$ }
+ { "Internal error :001 on " cite$ * " label" * warning$ }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+}
+
+FUNCTION {output.bibitem}
+{ newline$
+ "\harvarditem[" write$
+ make.abbr.label write$
+ "]{" write$
+ make.full.label write$
+ "}{" write$
+ list.year write$
+ "}{" write$
+ cite$ write$
+ "}" write$
+ newline$
+ ""
+ empty 'separator :=
+ plain 'attribute :=
+% }
+%
+% FUNCTION {list.label.output}
+% {
+ space make.list.label bold comma output.nonnull
+ }
+
+FUNCTION {author.item.check} {author "author" item.check}
+
+FUNCTION {format.title.if.not.sortkey.check}
+{title.field field.used =
+ {}
+ { format.title "title" output.check }
+ if$}
+
+FUNCTION {article}
+{ output.bibitem
+ author.item.check
+ format.title.if.not.sortkey.check
+ crossref missing$
+ { space journal italic comma "journal" output.check
+ output.month.year
+ output.vol.num.pages
+ }
+ { space format.article.crossref plain.space output.nonnull
+ comma format.pages plain.space.output
+ }
+ if$
+ fin.entry
+}
+
+FUNCTION {book}
+{ output.bibitem
+ author empty$
+ { editor "author and editor" item.check }
+ { crossref missing$
+ { "author and editor" editor either.or.check }
+ {}
+ if$
+ }
+ if$
+ title.field field.used =
+ {}
+ { space title italic space "title" output.check }
+ if$
+ crossref missing$
+ {
+ space format.number.series plain.space.output
+ format.edition.output
+ format.bvolume.output
+ format.publisher.address
+ output.month.year
+ }
+ { space format.book.crossref plain.space output.nonnull
+ format.edition.output
+ }
+ if$
+ fin.entry
+}
+
+FUNCTION {booklet}
+{ output.bibitem
+ format.title.if.not.sortkey.check
+ space howpublished plain.space.output
+ space address plain.space.output
+ output.month.year
+ fin.entry
+}
+
+FUNCTION {inbook}
+{ output.bibitem
+ author empty$
+ { editor "author and editor" item.check }
+ { crossref missing$
+ { "author and editor" editor either.or.check }
+ {}
+ if$
+ }
+ if$
+ title.field field.used =
+ {}
+ { space title italic space "title" output.check }
+ if$
+ crossref missing$
+ { space format.number.series plain.space.output
+ format.edition.output
+ comma format.bvolume plain.comma output
+ format.publisher.address
+ output.month.year
+ }
+ { space format.book.crossref plain.space output.nonnull
+ format.edition.output
+ }
+ if$
+ format.chapter.pages "chapter and pages" output.check
+ fin.entry
+}
+
+FUNCTION {incollection}
+{ output.bibitem
+ format.title.if.not.sortkey.check
+ author.item.check
+ crossref missing$
+ { output.in.ed.booktitle
+ format.edition.output
+ format.bvolume.output
+ space format.number.series plain.space.output
+ format.publisher.address
+ output.month.year
+ }
+ { output.incoll.inproc.crossref }
+ if$
+ space format.chapter.pages plain.space.output
+ fin.entry
+}
+
+FUNCTION {inproceedings}
+{ output.bibitem
+ format.title.if.not.sortkey.check
+ author.item.check
+ crossref missing$
+ { output.in.ed.booktitle
+ format.bvolume.output
+ space format.number.series plain.space.output
+ address empty$
+ { space organization plain.space.output
+ space publisher plain.space.output
+ }
+ { space organization plain.space.output
+ space publisher plain.space.output
+ space address plain.space output.nonnull
+ }
+ if$
+ output.month.year
+ }
+ { output.incoll.inproc.crossref}
+ if$
+ space format.pages plain.space.output
+ fin.entry
+}
+
+FUNCTION {conference} { inproceedings }
+
+FUNCTION {manual}
+{ output.bibitem
+ title.field field.used =
+ {}
+ {author empty$ {comma}{space} if$ title italic space "title" output.check }
+ if$
+ organization.field field.used = organization empty$ or
+ {} {space organization plain.space output.nonnull} if$
+ format.edition.output
+ format.publisher.address
+ output.month.year
+ fin.entry
+}
+
+FUNCTION {mastersthesis}
+{ output.bibitem
+ author.item.check
+ format.title.if.not.sortkey.check
+ space "Master's thesis" format.thesis.type plain.space output.nonnull
+ comma school plain.space "school" output.check
+ comma address plain.space.output
+ output.month.year
+ fin.entry
+}
+
+FUNCTION {misc}
+{ output.bibitem
+ format.title.if.not.sortkey.check
+ space howpublished plain.space.output
+ output.month.year
+ fin.entry
+ empty.misc.check
+}
+
+FUNCTION {phdthesis}
+{ output.bibitem
+ author.item.check
+ title.field field.used =
+ {}
+ { space title quoted period "title" output.check }
+ if$
+ space "PhD dissertation" format.thesis.type plain.space output.nonnull
+ comma school plain.space "school" output.check
+ comma address plain.space.output
+ output.month.year
+ fin.entry
+}
+
+FUNCTION {proceedings}
+{ output.bibitem
+ title.field field.used =
+ {}
+ { space title italic space "title" output.check }
+ if$
+ format.bvolume.output
+ space format.number.series plain.space.output
+ address empty$
+ { editor empty$
+ {}
+ { space organization plain.space.output
+ }
+ if$
+ space publisher plain.space.output
+ }
+ { editor empty$
+ {}
+ { space organization plain.space.output }
+ if$
+ space publisher plain.space.output
+ space address plain.space output.nonnull
+ }
+ if$
+ output.month.year
+ fin.entry
+}
+
+FUNCTION {techreport}
+{ output.bibitem
+ author.item.check
+ format.title.if.not.sortkey.check
+ space format.tr.number plain.space output.nonnull
+ institution empty$
+ {}
+ { comma institution plain.space "institution" output.check }
+ if$
+ comma address plain.space.output
+ output.month.year
+ fin.entry
+}
+
+FUNCTION {unpublished}
+{ output.bibitem
+ author.item.check
+ format.title.if.not.sortkey.check
+ output.month.year
+ note "note" item.check
+ fin.entry
+}
+
+FUNCTION {default.type} { misc }
+
+MACRO {jan} {"January"}
+
+MACRO {feb} {"February"}
+
+MACRO {mar} {"March"}
+
+MACRO {apr} {"April"}
+
+MACRO {may} {"May"}
+
+MACRO {jun} {"June"}
+
+MACRO {jul} {"July"}
+
+MACRO {aug} {"August"}
+
+MACRO {sep} {"September"}
+
+MACRO {oct} {"October"}
+
+MACRO {nov} {"November"}
+
+MACRO {dec} {"December"}
+
+READ
+
+EXECUTE {init.field.constants}
+
+FUNCTION {sortify}
+{ purify$
+ "l" change.case$
+}
+
+FUNCTION {author.editor.key.label}
+{ author empty$
+ { editor empty$
+ { title empty$
+ { key.field 'field.used := }
+ { title.field 'field.used := }
+ if$
+ }
+ { editor.field 'field.used := }
+ if$
+ }
+ { author.field 'field.used := }
+ if$
+}
+
+FUNCTION {key.organization.label}
+ {organization empty$
+ { title empty$
+ { key.field 'field.used := }
+ { title.field 'field.used := }
+ if$
+ }
+ { organization.field 'field.used := }
+ if$}
+
+FUNCTION {author.key.organization.label}
+{ author empty$
+ { key.organization.label}
+ { author.field 'field.used := }
+ if$
+}
+
+FUNCTION {editor.key.organization.label}
+{ editor empty$
+ { key.organization.label}
+ { editor.field 'field.used := }
+ if$
+}
+
+FUNCTION {sort.format.title}
+{ 'temp :=
+ "A " #2
+ "An " #3
+ "The " #4 temp chop.word
+ chop.word
+ chop.word
+ sortify
+ #1 global.max$ substring$
+}
+
+FUNCTION {calc.label}
+{ type$ "book" =
+ type$ "inbook" =
+ or
+ 'author.editor.key.label
+ { type$ "proceedings" =
+ 'editor.key.organization.label
+ { type$ "manual" =
+ 'author.key.organization.label
+ 'author.editor.key.label % don't really use .editor.
+ if$
+ }
+ if$
+ }
+ if$
+ make.abbr.label
+ title.field field.used =
+ { sort.format.title }
+ { sortify }
+ if$
+ year field.or.null purify$ #-1 #4 substring$ sortify
+ *
+ 'sort.label :=
+}
+
+FUNCTION {first.presort}
+{ "abcxyz" 'prev.author :=
+ calc.label
+ sort.label
+ title.field field.used =
+ {}
+ { " "
+ *
+ make.list.label sortify
+ *
+ " "
+ *
+ title field.or.null
+ sort.format.title
+ *
+ }
+ if$
+ #1 entry.max$ substring$
+ 'sort.key$ :=
+}
+
+
+ITERATE {first.presort}
+
+SORT
+
+STRINGS { last.sort.label next.extra }
+
+INTEGERS { last.extra.num }
+
+FUNCTION {initialize.last.extra.num}
+{ #0 int.to.chr$ 'last.sort.label :=
+ "" 'next.extra :=
+ #0 'last.extra.num :=
+}
+
+FUNCTION {forward.pass}
+{ last.sort.label sort.label =
+ { last.extra.num #1 + 'last.extra.num :=
+ last.extra.num int.to.chr$ 'extra.label :=
+ }
+ { "a" chr.to.int$ 'last.extra.num :=
+ "" 'extra.label :=
+ sort.label 'last.sort.label :=
+ }
+ if$
+}
+
+FUNCTION {reverse.pass}
+{ next.extra "b" =
+ { "a" 'extra.label := }
+ {}
+ if$
+ year empty$
+ { "n.d." extra.label * 'list.year := }
+ { year extra.label * 'list.year := }
+ if$
+ extra.label 'next.extra :=
+}
+
+EXECUTE {initialize.last.extra.num}
+
+ITERATE {forward.pass}
+
+REVERSE {reverse.pass}
+
+FUNCTION {second.presort}
+{ "abcxyz" 'prev.author :=
+ make.list.label
+ title.field field.used =
+ { sort.format.title }
+ { sortify }
+ if$
+ " "
+ *
+ list.year field.or.null sortify
+ *
+ " "
+ *
+ title.field field.used =
+ {}
+ { title field.or.null
+ sort.format.title
+ *
+ }
+ if$
+ #1 entry.max$ substring$
+ 'sort.key$ :=
+}
+
+ITERATE {second.presort}
+
+SORT
+
+
+INTEGERS { number.label }
+
+FUNCTION {initialize.longest.label}
+{
+ #1 'number.label :=
+ "abcxyz" 'prev.author :=
+}
+
+FUNCTION {longest.label.pass}
+{
+ "" 'extra.label :=
+ author empty$ { editor empty$ {"foo"} {editor} if$}
+ {author}
+ if$
+ 'f :=
+% remember this entry to compare to the next one
+ author empty$ { editor empty$ {"abcxyz"} {editor} if$} {author} if$
+ 'prev.author :=
+}
+
+EXECUTE {initialize.longest.label}
+
+ITERATE {longest.label.pass}
+
+FUNCTION {begin.bib}
+{ preamble$ empty$
+ {}
+ { preamble$ write$ newline$ }
+ if$
+ "\ifx\undefined\bysame" write$ newline$
+ "\newcommand{\bysame}{\leavevmode\hbox to\leftmargin{\hrulefill\,\,}}"
+ write$ newline$
+ "\fi" write$ newline$
+ "\begin{thebibliography}{xx}" write$ newline$
+}
+
+EXECUTE {begin.bib}
+
+EXECUTE {init.state.consts}
+
+FUNCTION {init.call}
+ { "abcxyz" 'prev.author := }
+
+EXECUTE {init.call}
+
+ITERATE {call.type$}
+
+FUNCTION {end.bib}
+ {newline$ "\end{thebibliography}" write$ newline$ }
+
+EXECUTE {end.bib}
+
diff --git a/biblio/bibtex/contrib/economic/aer.sty b/biblio/bibtex/contrib/economic/aer.sty
new file mode 100644
index 0000000000..52cefdc2ec
--- /dev/null
+++ b/biblio/bibtex/contrib/economic/aer.sty
@@ -0,0 +1,20 @@
+\message{Document style option `aer.sty' (29 May 1993) for LaTeX 2.09.}
+\textwidth=28pc
+\textheight=46pc
+
+\def\bysame{\leavevmode\hbox to\leftmargin{\leaders\hrule height 3pt depth -2.5pt\hfill\,\,}}
+
+\def\thebibliography#1{\section*{\refname\@mkboth
+ {\uppercase{\refname}}{\uppercase{\refname}}}\list
+ {\@biblabel{\arabic{enumiv}}}{\labelwidth=12pt
+ \labelsep=0pt
+ \leftmargin\labelwidth
+ \advance\leftmargin\labelsep
+ \itemsep=0pt\parsep=0pt
+ \usecounter{enumiv}%
+ \let\p@enumiv\@empty
+ \def\theenumiv{\arabic{enumiv}}}%
+ \def\newblock{\hskip .11em plus.33em minus.07em}%
+ \sloppy\clubpenalty4000\widowpenalty4000
+ \raggedright
+ \sfcode`\.=1000\relax}
diff --git a/biblio/bibtex/contrib/economic/aertt.bst b/biblio/bibtex/contrib/economic/aertt.bst
new file mode 100644
index 0000000000..d1207adc30
--- /dev/null
+++ b/biblio/bibtex/contrib/economic/aertt.bst
@@ -0,0 +1,1221 @@
+% BibTeX bibliography style `aertt'
+% this file is based on the `harvard' family of files
+ % version 0.99a for BibTeX versions 0.99a or later, LaTeX version 2.09.
+ % Copyright (C) 1991, all rights reserved.
+ % Copying of this file is authorized only if either
+ % (1) you make absolutely no changes to your copy, including name, or
+ % (2) if you do make changes, you name it something other than
+ % btxbst.doc, plain.bst, unsrt.bst, alpha.bst, abbrv.bst, agsm.bst,
+ % dcu.bst, cje.bst, aer.bst, or kluwer.bst.
+ % This restriction helps ensure that all standard styles are identical.
+
+% ACKNOWLEDGEMENT:
+% This document is a modified version of alpha.bst to which it owes much of
+% its functionality.
+
+% AUTHOR
+% Peter Williams, Key Centre for Design Quality, Sydney University
+% e-mail: peterw@archsci.arch.su.oz.au
+
+ENTRY
+ { address author booktitle chapter edition editor howpublished institution
+ journal key month note number organization pages publisher school
+ series title type volume year}
+ { field.used }
+ { label.touse extra.label sort.label list.year }
+
+
+FUNCTION {not}
+{ { #0 }
+ { #1 }
+ if$
+}
+
+FUNCTION {and}
+{ {}
+ { pop$ #0 }
+ if$
+}
+
+FUNCTION {or}
+{ { pop$ #1 }
+ {}
+ if$
+}
+
+INTEGERS {quoted italic bold plain attribute
+ space comma tiedcomma semicolon colon period block empty separator
+ prev.separator next.separator next.attribute}
+
+STRINGS { s temp f name.list first.name.format later.name.formats name.style}
+
+FUNCTION {init.state.consts}
+{
+ #100 'quoted :=
+ #200 'italic :=
+ #300 'bold :=
+ #400 'plain :=
+
+ #7 'space :=
+ #6 'comma :=
+% #5 'tiedcomma :=
+% #4 'semicolon :=
+ #3 'colon :=
+ #2 'period :=
+ #1 'block :=
+ #0 'empty :=
+}
+
+FUNCTION {output2}
+{
+% Wrap the attribute.
+ attribute bold = {"{\bf " swap$ * "}" *} {} if$
+ attribute italic = {"\uline{" swap$ * "}" *} {} if$
+ attribute quoted = {"``" swap$ * "''" *} {} if$
+% Append additional separators
+ separator comma = {"," * space 'separator :=} {} if$
+% separator tiedcomma = {",~" * empty 'separator :=} {} if$
+ separator space = {" " *} {} if$
+ write$
+ separator block = {newline$ "\newblock " write$} {} if$
+% Update variables, and put the new string back on the stack
+ next.attribute 'attribute :=
+ next.separator 'separator :=
+ temp
+}
+
+% <string> <separator> <string> <attribute> <final separator> output <string>
+FUNCTION {output.nonnull}
+{ 'next.separator :=
+ 'next.attribute :=
+ 'temp :=
+ 'prev.separator :=
+% If the new separator is stronger than the previous one, use it.
+ prev.separator separator < {prev.separator 'separator :=} {} if$
+% Append most separators to the string.
+ separator block = {add.period$} {} if$
+ separator period = {add.period$ space 'separator :=} {} if$
+% separator semicolon = {";" * space 'separator :=} {} if$
+ separator colon = {":" * space 'separator :=} {} if$
+ separator comma = attribute quoted = and
+ {"," * space 'separator :=} {} if$
+ output2
+}
+
+FUNCTION {output}
+{ 'next.separator :=
+ 'next.attribute :=
+ duplicate$ empty$
+ {pop$ pop$}
+ {next.attribute next.separator output.nonnull}
+ if$
+}
+
+FUNCTION {output.check}
+{ 's :=
+ 'next.separator :=
+ 'next.attribute :=
+ duplicate$ empty$
+ {pop$ pop$ "empty " s * " in " * cite$ * warning$ }
+ {next.attribute next.separator output.nonnull}
+ if$
+}
+
+FUNCTION {item.check}
+{ 'temp :=
+ empty$
+ { "empty " temp * " in " * cite$ * warning$ }
+ {}
+ if$
+}
+
+FUNCTION {plain.space} { plain space }
+
+FUNCTION {plain.space.output} { plain.space output }
+
+FUNCTION {plain.comma} { plain comma }
+
+FUNCTION {fin.entry}
+{
+ block note plain.space.output
+ period "" plain empty output.nonnull pop$
+ newline$
+}
+
+FUNCTION {field.or.null}
+{ duplicate$ empty$
+ { pop$ "" }
+ {}
+ if$
+}
+
+FUNCTION {emphasize}
+{ duplicate$ empty$
+ { pop$ "" }
+ { "{\em " swap$ * "}" * }
+ if$
+}
+
+FUNCTION {quote}
+{ duplicate$ empty$
+ { pop$ "" }
+ { add.period$ "`" swap$ * "'" * }
+ if$
+}
+
+
+% <prev name list> <new name list> compare.names <modified name list>
+INTEGERS {len1 len2 i}
+FUNCTION {compare.names}
+{ 's :=
+ 'temp :=
+ temp num.names$ 'len1 :=
+ s num.names$ 'len2 :=
+% len1 := min(len1,len2)
+ len1 len2 > {len2 'len1 :=} {} if$
+% start with an empty string, then while the components are the same
+% add "\bysame"
+ ""
+ #1 'i :=
+ {i len1 > not}
+ { temp i "{ff }{vv }{ll}{ jj}" format.name$
+% duplicate$ i int.to.str$ * warning$
+ s i "{ff }{vv }{ll}{ jj}" format.name$
+% duplicate$ i int.to.str$ * warning$
+ =
+ { #1 i < {" and " *} {} if$
+ "\bysame{}" * i #1 + 'i :=}
+ {#-1 'len1 :=}
+ if$
+ }
+ while$
+% add the rest of the second string
+ {i len2 > not}
+ { #1 i < {" and " *} {} if$
+ s i "{ff }{vv }{ll}{ jj}" format.name$ *
+ i #1 + 'i :=
+ }
+ while$
+% duplicate$ warning$
+}
+
+INTEGERS { nameptr namesleft numnames }
+
+FUNCTION {format.names}
+{ 'name.list :=
+ 'name.style :=
+ 'later.name.formats :=
+ 's := % binary separator
+ 'first.name.format :=
+ #1 'nameptr :=
+ name.list num.names$ 'numnames :=
+% If we're to make this entry bold or something, prepend to the string of names
+ name.style "" = {} {"{" name.style *} if$
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ { name.list nameptr nameptr #1 = {first.name.format} {later.name.formats} if$
+ format.name$ 'temp :=
+ nameptr #1 >
+ { namesleft #1 >
+ { ", " * temp * }
+ { temp "others" =
+ { " et~al." * }
+ {nameptr #2 = % handle ", and" vs " and "
+ {s * temp *}
+ {", and " * temp * }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ 'temp
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+% If we're to make this entry bold or something, append to the string of names
+ name.style "" = {} {"}" * *} if$
+}
+
+FUNCTION {format.authors}
+{ 'temp :=
+ "{vv~}{ll}{, jj}{, ff}" " and " "{ff~}{vv~}{ll}{, jj}" "" temp
+ format.names
+}
+
+FUNCTION {format.editors}
+{ 'temp :=
+ "{vv~}{ll}{, jj}{, ff}" " and " "{ff~}{vv~}{ll}{, jj}" ""
+ temp format.names
+ editor num.names$ #1 >
+ { ", eds" * }
+ { ", ed." * }
+ if$
+}
+
+FUNCTION {format.editors.notkey}
+{ editor empty$
+ { "" }
+ { "{ff~}{vv~}{ll}{, jj}" " and " "{ff~}{vv~}{ll}{, jj}" ""
+ editor format.names
+ editor num.names$ #1 > {", eds."} {", ed."} if$
+ *
+ }
+ if$
+}
+
+FUNCTION {format.title}
+{ space title quoted comma }
+
+FUNCTION {n.dashify}
+{ 'temp :=
+ ""
+ { temp empty$ not }
+ { temp #1 #1 substring$ "-" =
+ { temp #1 #2 substring$ "--" = not
+ { "--" *
+ temp #2 global.max$ substring$ 'temp :=
+ }
+ { { temp #1 #1 substring$ "-" = }
+ { "-" *
+ temp #2 global.max$ substring$ 'temp :=
+ }
+ while$
+ }
+ if$
+ }
+ { temp #1 #1 substring$ *
+ temp #2 global.max$ substring$ 'temp :=
+ }
+ if$
+ }
+ while$
+}
+
+FUNCTION {format.btitle}
+{ title emphasize
+}
+
+FUNCTION {tie.or.space.connect}
+{ duplicate$ text.length$ #3 <
+ { "~" }
+ { " " }
+ if$
+ swap$ * *
+}
+
+FUNCTION {either.or.check}
+{ empty$
+ 'pop$
+ { "can't use both " swap$ * " fields in " * cite$ * warning$ }
+ if$
+}
+
+FUNCTION {format.bvolume}
+{ volume empty$
+ { "" }
+ { "Vol." volume tie.or.space.connect
+ series empty$
+ {}
+ { " of " * series emphasize * }
+ if$
+ "volume and number" number either.or.check
+ }
+ if$
+}
+
+FUNCTION {format.bvolume.output}
+ {comma format.bvolume plain.space.output}
+
+FUNCTION {mid.sentence.q}
+{
+ separator empty = separator block = separator period = or or not
+}
+
+FUNCTION {format.number.series}
+{ volume empty$
+ { number empty$
+ {series field.or.null}
+ { mid.sentence.q
+ { "number" }
+ { "Number" }
+ if$
+ number tie.or.space.connect
+ series empty$
+ { "there's a number but no series in " cite$ * warning$ }
+ { add.period$ " In " * series quote * }
+ if$
+ }
+ if$
+ }
+ { "" }
+ if$
+}
+
+FUNCTION {format.edition.output}
+{ edition empty$
+ { }
+ { comma edition
+ mid.sentence.q { "l" } { "t" } if$
+ change.case$ " ed." *
+ plain.space.output
+ }
+ if$
+}
+
+FUNCTION {format.publisher.address}
+{
+ address empty$
+ {comma publisher plain.comma output}
+ {publisher empty$
+ {}
+ {comma address plain colon output
+ colon publisher plain.comma output}
+ if$}
+ if$
+}
+
+INTEGERS { multiresult }
+
+FUNCTION {multi.page.check}
+{ 'temp :=
+ #0 'multiresult :=
+ { multiresult not
+ temp empty$ not
+ and
+ }
+ { temp #1 #1 substring$
+ duplicate$ "-" =
+ swap$ duplicate$ "," =
+ swap$ "+" =
+ or or
+ { #1 'multiresult := }
+ { temp #2 global.max$ substring$ 'temp := }
+ if$
+ }
+ while$
+ multiresult
+}
+
+FUNCTION {format.pages}
+{ pages empty$
+ { "" }
+ { pages multi.page.check
+ { "pp.~" pages n.dashify * }
+ { "p.~" pages * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {output.month.year}
+ {
+ space month plain.space.output
+ space year plain.comma "year" output.check
+ }
+
+FUNCTION {output.vol.num.pages}
+{ space volume italic space output
+ number empty$
+ {}
+ { space "(" number * ")" * plain.comma output.nonnull
+ volume empty$
+ { "there's a number but no volume in " cite$ * warning$ }
+ {}
+ if$
+ }
+ if$
+% "*** a" warning$
+ comma 'next.separator := % hack
+ pages empty$
+ {}
+ { number empty$ volume empty$ and
+ { comma format.pages plain.space.output }
+ { comma pages n.dashify plain.space.output }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.chapter.pages}
+{ chapter empty$
+ 'format.pages
+ { type empty$
+ { "chapter" }
+ { type "l" change.case$ }
+ if$
+ chapter tie.or.space.connect
+ pages empty$
+ {}
+ { ", " * format.pages * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {output.in.ed.booktitle}
+{ booktitle "booktitle" item.check
+ comma "in" plain.space output.nonnull
+ editor empty$
+ { space booktitle quoted space output.nonnull}
+ { space format.editors.notkey plain.space output.nonnull
+ comma booktitle italic comma output.nonnull
+ }
+ if$
+}
+
+FUNCTION {empty.misc.check}
+{ author empty$ title empty$ howpublished empty$
+ month empty$ year empty$ note empty$
+ and and and and and
+ key empty$ not and
+ { "all relevant fields are empty in " cite$ * warning$ }
+ {}
+ if$
+}
+
+FUNCTION {format.thesis.type}
+{ type empty$
+ {}
+ { pop$
+ type "t" change.case$
+ }
+ if$
+}
+
+FUNCTION {format.tr.number}
+{ type empty$
+ { "Technical Report" }
+ 'type
+ if$
+ number empty$
+ { }
+ { number tie.or.space.connect }
+ if$
+}
+
+FUNCTION {format.article.crossref}
+{ key empty$
+ { journal empty$
+ { "need key or journal for " cite$ * " to crossref " * crossref *
+ warning$
+ ""
+ }
+ { "in {\it " journal * "\/} \cite{" * crossref * "}" *}
+ if$
+ }
+ { add.period$ "In \citeasnoun{" crossref * "}" * }
+ if$
+
+}
+
+FUNCTION {format.book.crossref}
+{ volume empty$
+ { "empty volume in " cite$ * "'s crossref of " * crossref * warning$
+ "in "
+ }
+ { "Vol." volume tie.or.space.connect
+ " of " *
+ }
+ if$
+ editor empty$
+ editor field.or.null author field.or.null =
+ or
+ { key empty$
+ { series empty$
+ { "need editor, key, or series for " cite$ * " to crossref " *
+ crossref * warning$
+ "" *
+ }
+ { "{\it " * series * "\/} \cite{" * crossref * "}" *}
+ if$
+ }
+ { " \citeasnoun{" * crossref * "}" * }
+ if$
+ }
+ { " \citeasnoun{" * crossref * "}" * }
+ if$
+}
+
+FUNCTION {output.incoll.inproc.crossref}
+{ editor empty$
+ editor field.or.null author field.or.null =
+ or
+ { key empty$
+ { booktitle empty$
+ { "need editor, key, or booktitle for " cite$ * " to crossref " *
+ crossref * warning$
+ }
+ { period "In {\it " booktitle * "\/}" * " \cite{" * crossref * "}" * plain.space output.nonnull}
+ if$
+ }
+ { period "In \citeasnoun{" crossref * "}" * plain.space output.nonnull}
+ if$
+ }
+ { period "In \citeasnoun{" crossref * "}" * plain.space output.nonnull}
+ if$
+}
+
+INTEGERS { len }
+
+FUNCTION {chop.word}
+{ 's :=
+ 'len :=
+ s #1 len substring$ =
+ { s len #1 + global.max$ substring$ }
+ 's
+ if$
+}
+
+INTEGERS { author.field editor.field organization.field title.field key.field }
+
+FUNCTION {init.field.constants}
+{ #0 'author.field :=
+ #1 'editor.field :=
+ #2 'organization.field :=
+ #3 'title.field :=
+ #4 'key.field :=
+}
+
+FUNCTION {format.lab.names.abbr}
+{ 'name.list :=
+ name.list num.names$ 'numnames :=
+ numnames #1 >
+ { numnames #2 >
+ { name.list #1 "{vv~}{ll}" format.name$ " et al." * }
+ { name.list #2 "{ff }{vv }{ll}{ jj}" format.name$ "others" =
+ { name.list #1 "{vv~}{ll}" format.name$ " et al." * }
+ { name.list #1 "{vv~}{ll}" format.name$ " and " *
+ name.list #2 "{vv~}{ll}" format.name$ *
+ }
+ if$
+ }
+ if$
+ field.used editor.field = {", eds" *} {} if$
+ }
+ {
+ name.list #1 "{vv~}{ll}" format.name$
+ field.used editor.field = {", ed" *} {} if$
+ }
+ if$
+}
+
+FUNCTION {format.lab.names.full}
+{ 'name.list :=
+ #1 'nameptr :=
+ name.list num.names$ 'numnames :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ { name.list nameptr "{vv~}{ll}" format.name$ 'temp :=
+ nameptr #1 >
+ { namesleft #1 >
+ { ", " * temp * }
+ { temp "others" =
+ { " et~al." * }
+ { " and " * temp * }
+ if$
+ }
+ if$
+ }
+ 'temp
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+ numnames #1 > field.used editor.field = and {", eds" *} {} if$
+ numnames #1 = field.used editor.field = and {", ed" *} {} if$
+}
+
+STRINGS { prev.author }
+
+FUNCTION {make.list.label}
+{author.field field.used =
+ { prev.author author compare.names format.authors
+ author 'prev.author :=}
+ { editor.field field.used =
+ { prev.author editor compare.names format.editors
+ editor 'prev.author := }
+ { organization.field field.used =
+ { "The " #4 organization chop.word
+ duplicate$ prev.author = {pop$ "\bysame{}"}
+ {duplicate$ 'prev.author :=} if$}
+ { "foo" 'prev.author :=
+ title.field field.used =
+ { format.btitle }
+ { key.field field.used =
+ { key #3 text.prefix$ }
+ { "Internal error :001 on " cite$ * " label" * warning$ }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+}
+
+FUNCTION {make.full.label}
+{ author.field field.used =
+ { author format.lab.names.full }
+ { editor.field field.used =
+ { editor format.lab.names.full }
+ { organization.field field.used =
+ { "The " #4 organization chop.word #3 text.prefix$ }
+ { title.field field.used =
+ { format.btitle }
+ { key.field field.used =
+ { key #3 text.prefix$ }
+ { "Internal error :001 on " cite$ * " label" * warning$ }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+}
+
+FUNCTION {make.abbr.label}
+{ author.field field.used =
+ { author format.lab.names.abbr }
+ { editor.field field.used =
+ { editor format.lab.names.abbr }
+ { organization.field field.used =
+ { "The " #4 organization chop.word #3 text.prefix$ }
+ { title.field field.used =
+ { format.btitle }
+ { key.field field.used =
+ { key #3 text.prefix$ }
+ { "Internal error :001 on " cite$ * " label" * warning$ }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+}
+
+FUNCTION {output.bibitem}
+{ newline$
+ "\harvarditem[" write$
+ make.abbr.label write$
+ "]{" write$
+ make.full.label write$
+ "}{" write$
+ list.year write$
+ "}{" write$
+ cite$ write$
+ "}" write$
+ newline$
+ ""
+ empty 'separator :=
+ plain 'attribute :=
+% }
+%
+% FUNCTION {list.label.output}
+% {
+ space make.list.label plain comma output.nonnull
+ }
+
+FUNCTION {author.item.check} {author "author" item.check}
+
+FUNCTION {format.title.if.not.sortkey.check}
+{title.field field.used =
+ {}
+ { format.title "title" output.check }
+ if$}
+
+FUNCTION {article}
+{ output.bibitem
+ author.item.check
+ format.title.if.not.sortkey.check
+ crossref missing$
+ { space journal italic comma "journal" output.check
+ output.month.year
+ output.vol.num.pages
+ }
+ { space format.article.crossref plain.space output.nonnull
+ comma format.pages plain.space.output
+ }
+ if$
+ fin.entry
+}
+
+FUNCTION {book}
+{ output.bibitem
+ author empty$
+ { editor "author and editor" item.check }
+ { crossref missing$
+ { "author and editor" editor either.or.check }
+ {}
+ if$
+ }
+ if$
+ title.field field.used =
+ {}
+ { space title italic space "title" output.check }
+ if$
+ crossref missing$
+ {
+ space format.number.series plain.space.output
+ format.edition.output
+ format.bvolume.output
+ format.publisher.address
+ output.month.year
+ }
+ { space format.book.crossref plain.space output.nonnull
+ format.edition.output
+ }
+ if$
+ fin.entry
+}
+
+FUNCTION {booklet}
+{ output.bibitem
+ format.title.if.not.sortkey.check
+ space howpublished plain.space.output
+ space address plain.space.output
+ output.month.year
+ fin.entry
+}
+
+FUNCTION {inbook}
+{ output.bibitem
+ author empty$
+ { editor "author and editor" item.check }
+ { crossref missing$
+ { "author and editor" editor either.or.check }
+ {}
+ if$
+ }
+ if$
+ title.field field.used =
+ {}
+ { space title italic space "title" output.check }
+ if$
+ crossref missing$
+ { space format.number.series plain.space.output
+ format.edition.output
+ comma format.bvolume plain.comma output
+ format.publisher.address
+ output.month.year
+ }
+ { space format.book.crossref plain.space output.nonnull
+ format.edition.output
+ }
+ if$
+ format.chapter.pages "chapter and pages" output.check
+ fin.entry
+}
+
+FUNCTION {incollection}
+{ output.bibitem
+ format.title.if.not.sortkey.check
+ author.item.check
+ crossref missing$
+ { output.in.ed.booktitle
+ format.edition.output
+ format.bvolume.output
+ space format.number.series plain.space.output
+ format.publisher.address
+ output.month.year
+ }
+ { output.incoll.inproc.crossref }
+ if$
+ space format.chapter.pages plain.space.output
+ fin.entry
+}
+
+FUNCTION {inproceedings}
+{ output.bibitem
+ format.title.if.not.sortkey.check
+ author.item.check
+ crossref missing$
+ { output.in.ed.booktitle
+ format.bvolume.output
+ space format.number.series plain.space.output
+ address empty$
+ { space organization plain.space.output
+ space publisher plain.space.output
+ }
+ { space organization plain.space.output
+ space publisher plain.space.output
+ space address plain.space output.nonnull
+ }
+ if$
+ output.month.year
+ }
+ { output.incoll.inproc.crossref}
+ if$
+ space format.pages plain.space.output
+ fin.entry
+}
+
+FUNCTION {conference} { inproceedings }
+
+FUNCTION {manual}
+{ output.bibitem
+ title.field field.used =
+ {}
+ {author empty$ {comma}{space} if$ title italic space "title" output.check }
+ if$
+ organization.field field.used = organization empty$ or
+ {} {space organization plain.space output.nonnull} if$
+ format.edition.output
+ format.publisher.address
+ output.month.year
+ fin.entry
+}
+
+FUNCTION {mastersthesis}
+{ output.bibitem
+ author.item.check
+ format.title.if.not.sortkey.check
+ space "Master's thesis" format.thesis.type plain.space output.nonnull
+ comma school plain.space "school" output.check
+ comma address plain.space.output
+ output.month.year
+ fin.entry
+}
+
+FUNCTION {misc}
+{ output.bibitem
+ format.title.if.not.sortkey.check
+ space howpublished plain.space.output
+ output.month.year
+ fin.entry
+ empty.misc.check
+}
+
+FUNCTION {phdthesis}
+{ output.bibitem
+ author.item.check
+ title.field field.used =
+ {}
+ { space title quoted period "title" output.check }
+ if$
+ space "PhD dissertation" format.thesis.type plain.space output.nonnull
+ comma school plain.space "school" output.check
+ comma address plain.space.output
+ output.month.year
+ fin.entry
+}
+
+FUNCTION {proceedings}
+{ output.bibitem
+ title.field field.used =
+ {}
+ { space title italic space "title" output.check }
+ if$
+ format.bvolume.output
+ space format.number.series plain.space.output
+ address empty$
+ { editor empty$
+ {}
+ { space organization plain.space.output
+ }
+ if$
+ space publisher plain.space.output
+ }
+ { editor empty$
+ {}
+ { space organization plain.space.output }
+ if$
+ space publisher plain.space.output
+ space address plain.space output.nonnull
+ }
+ if$
+ output.month.year
+ fin.entry
+}
+
+FUNCTION {techreport}
+{ output.bibitem
+ author.item.check
+ format.title.if.not.sortkey.check
+ space format.tr.number plain.space output.nonnull
+ institution empty$
+ {}
+ { comma institution plain.space "institution" output.check }
+ if$
+ comma address plain.space.output
+ output.month.year
+ fin.entry
+}
+
+FUNCTION {unpublished}
+{ output.bibitem
+ author.item.check
+ format.title.if.not.sortkey.check
+ output.month.year
+ note "note" item.check
+ fin.entry
+}
+
+FUNCTION {default.type} { misc }
+
+MACRO {jan} {"January"}
+
+MACRO {feb} {"February"}
+
+MACRO {mar} {"March"}
+
+MACRO {apr} {"April"}
+
+MACRO {may} {"May"}
+
+MACRO {jun} {"June"}
+
+MACRO {jul} {"July"}
+
+MACRO {aug} {"August"}
+
+MACRO {sep} {"September"}
+
+MACRO {oct} {"October"}
+
+MACRO {nov} {"November"}
+
+MACRO {dec} {"December"}
+
+READ
+
+EXECUTE {init.field.constants}
+
+FUNCTION {sortify}
+{ purify$
+ "l" change.case$
+}
+
+FUNCTION {author.editor.key.label}
+{ author empty$
+ { editor empty$
+ { title empty$
+ { key.field 'field.used := }
+ { title.field 'field.used := }
+ if$
+ }
+ { editor.field 'field.used := }
+ if$
+ }
+ { author.field 'field.used := }
+ if$
+}
+
+FUNCTION {key.organization.label}
+ {organization empty$
+ { title empty$
+ { key.field 'field.used := }
+ { title.field 'field.used := }
+ if$
+ }
+ { organization.field 'field.used := }
+ if$}
+
+FUNCTION {author.key.organization.label}
+{ author empty$
+ { key.organization.label}
+ { author.field 'field.used := }
+ if$
+}
+
+FUNCTION {editor.key.organization.label}
+{ editor empty$
+ { key.organization.label}
+ { editor.field 'field.used := }
+ if$
+}
+
+FUNCTION {sort.format.title}
+{ 'temp :=
+ "A " #2
+ "An " #3
+ "The " #4 temp chop.word
+ chop.word
+ chop.word
+ sortify
+ #1 global.max$ substring$
+}
+
+FUNCTION {calc.label}
+{ type$ "book" =
+ type$ "inbook" =
+ or
+ 'author.editor.key.label
+ { type$ "proceedings" =
+ 'editor.key.organization.label
+ { type$ "manual" =
+ 'author.key.organization.label
+ 'author.editor.key.label % don't really use .editor.
+ if$
+ }
+ if$
+ }
+ if$
+ make.abbr.label
+ title.field field.used =
+ { sort.format.title }
+ { sortify }
+ if$
+ year field.or.null purify$ #-1 #4 substring$ sortify
+ *
+ 'sort.label :=
+}
+
+FUNCTION {first.presort}
+{ "abcxyz" 'prev.author :=
+ calc.label
+ sort.label
+ title.field field.used =
+ {}
+ { " "
+ *
+ make.list.label sortify
+ *
+ " "
+ *
+ title field.or.null
+ sort.format.title
+ *
+ }
+ if$
+ #1 entry.max$ substring$
+ 'sort.key$ :=
+}
+
+
+ITERATE {first.presort}
+
+SORT
+
+STRINGS { last.sort.label next.extra }
+
+INTEGERS { last.extra.num }
+
+FUNCTION {initialize.last.extra.num}
+{ #0 int.to.chr$ 'last.sort.label :=
+ "" 'next.extra :=
+ #0 'last.extra.num :=
+}
+
+FUNCTION {forward.pass}
+{ last.sort.label sort.label =
+ { last.extra.num #1 + 'last.extra.num :=
+ last.extra.num int.to.chr$ 'extra.label :=
+ }
+ { "a" chr.to.int$ 'last.extra.num :=
+ "" 'extra.label :=
+ sort.label 'last.sort.label :=
+ }
+ if$
+}
+
+FUNCTION {reverse.pass}
+{ next.extra "b" =
+ { "a" 'extra.label := }
+ {}
+ if$
+ year empty$
+ { "n.d." extra.label * 'list.year := }
+ { year extra.label * 'list.year := }
+ if$
+ extra.label 'next.extra :=
+}
+
+EXECUTE {initialize.last.extra.num}
+
+ITERATE {forward.pass}
+
+REVERSE {reverse.pass}
+
+FUNCTION {second.presort}
+{ "abcxyz" 'prev.author :=
+ make.list.label
+ title.field field.used =
+ { sort.format.title }
+ { sortify }
+ if$
+ " "
+ *
+ list.year field.or.null sortify
+ *
+ " "
+ *
+ title.field field.used =
+ {}
+ { title field.or.null
+ sort.format.title
+ *
+ }
+ if$
+ #1 entry.max$ substring$
+ 'sort.key$ :=
+}
+
+ITERATE {second.presort}
+
+SORT
+
+
+INTEGERS { number.label }
+
+FUNCTION {initialize.longest.label}
+{
+ #1 'number.label :=
+ "abcxyz" 'prev.author :=
+}
+
+FUNCTION {longest.label.pass}
+{
+ "" 'extra.label :=
+ author empty$ { editor empty$ {"foo"} {editor} if$}
+ {author}
+ if$
+ 'f :=
+% remember this entry to compare to the next one
+ author empty$ { editor empty$ {"abcxyz"} {editor} if$} {author} if$
+ 'prev.author :=
+}
+
+EXECUTE {initialize.longest.label}
+
+ITERATE {longest.label.pass}
+
+FUNCTION {begin.bib}
+{ preamble$ empty$
+ {}
+ { preamble$ write$ newline$ }
+ if$
+ "\ifx\undefined\bysame" write$ newline$
+ "\newcommand{\bysame}{\leavevmode\hbox to\leftmargin{\hrulefill\,\,}}"
+ write$ newline$
+ "\fi" write$ newline$
+ "\begin{thebibliography}{xx}" write$ newline$
+}
+
+EXECUTE {begin.bib}
+
+EXECUTE {init.state.consts}
+
+FUNCTION {init.call}
+ { "abcxyz" 'prev.author := }
+
+EXECUTE {init.call}
+
+ITERATE {call.type$}
+
+FUNCTION {end.bib}
+ {newline$ "\end{thebibliography}" write$ newline$ }
+
+EXECUTE {end.bib}
+
diff --git a/biblio/bibtex/contrib/economic/aertt.sty b/biblio/bibtex/contrib/economic/aertt.sty
new file mode 100644
index 0000000000..15630925c3
--- /dev/null
+++ b/biblio/bibtex/contrib/economic/aertt.sty
@@ -0,0 +1,23 @@
+\message{Document style option `aertt.sty' (29 May 1993) for LaTeX 2.09.}
+\textwidth=28pc
+\textheight=46pc
+
+\RequirePackage{ulem}
+
+\def\bysame{\leavevmode\uline{\hskip\leftmargin}\,\,}
+
+\def\thebibliography#1{\section*{\refname\@mkboth
+ {\uppercase{\refname}}{\uppercase{\refname}}}\list
+ {\@biblabel{\arabic{enumiv}}}{\labelwidth=12pt
+ \labelsep=0pt
+ \leftmargin\labelwidth
+ \advance\leftmargin\labelsep
+ \itemsep=0pt\parsep=0pt
+ \usecounter{enumiv}%
+ \let\p@enumiv\@empty
+ \def\theenumiv{\arabic{enumiv}}}%
+ \def\newblock{\hskip .11em plus.33em minus.07em}%
+ \sloppy\clubpenalty4000\widowpenalty4000
+ \raggedright
+ \sfcode`\.=1000\relax}
+
diff --git a/biblio/bibtex/contrib/economic/agecon.bst b/biblio/bibtex/contrib/economic/agecon.bst
new file mode 100644
index 0000000000..d03010268f
--- /dev/null
+++ b/biblio/bibtex/contrib/economic/agecon.bst
@@ -0,0 +1,1524 @@
+%%% journal "Agricultural Economics" (AgEcon)
+%%% bibliography style for use with LaTeX2e
+%%% version: 1.0 (04 January 2008)
+%%% license: LaTeX Project Public License (see below)
+%%% This file was created with makebst (see below) and modified
+%%% by Arne Henningsen.
+%%% Note: This is an unofficial style file that may not fully comply
+%%% with the AgEcon reference guidelines in every detail.
+%%% Please report any problems at
+%%% http://sourceforge.net/projects/economtex/
+%%% Further information is available at
+%%% http://economtex.wiki.sourceforge.net/
+%%%
+%%% This BibTeX style should be used with the corresponding
+%%% LaTeX class "agecon" (agecon.cls).
+%%% Otherwise, the following line has to be added to the LaTeX preamble:
+%%% \usepackage[authoryear]{natbib}
+%%%
+%%
+%%
+%% This is file `agecon.bst',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% merlin.mbs (with options: `ay,nat,nm-rev,ed-rev,jnrlst,keyxyr,dt-beg,yr-com,yrp-per,note-yr,jttl-rm,thtit-a,volp-com,num-xser,ser-vol,jnm-x,btit-rm,bt-rm,edpar,bkedcap,blk-tit,in-col,pp,ed,ord,jabr,and-com,and-com-ed,xand,nfss,')
+%% ----------------------------------------
+%% *** agecon ***
+%%
+%% Copyright 1994-2004 Patrick W Daly
+ % ===============================================================
+ % IMPORTANT NOTICE:
+ % This bibliographic style (bst) file has been generated from one or
+ % more master bibliographic style (mbs) files, listed above.
+ %
+ % This generated file can be redistributed and/or modified under the terms
+ % of the LaTeX Project Public License Distributed from CTAN
+ % archives in directory macros/latex/base/lppl.txt; either
+ % version 1 of the License, or any later version.
+ % ===============================================================
+ % Name and version information of the main mbs file:
+ % \ProvidesFile{merlin.mbs}[2004/02/09 4.13 (PWD, AO, DPC)]
+ % For use with BibTeX version 0.99a or later
+ %-------------------------------------------------------------------
+ % This bibliography style file is intended for texts in ENGLISH
+ % This is an author-year citation style bibliography. As such, it is
+ % non-standard LaTeX, and requires a special package file to function properly.
+ % Such a package is natbib.sty by Patrick W. Daly
+ % The form of the \bibitem entries is
+ % \bibitem[Jones et al.(1990)]{key}...
+ % \bibitem[Jones et al.(1990)Jones, Baker, and Smith]{key}...
+ % The essential feature is that the label (the part in brackets) consists
+ % of the author names, as they should appear in the citation, with the year
+ % in parentheses following. There must be no space before the opening
+ % parenthesis!
+ % With natbib v5.3, a full list of authors may also follow the year.
+ % In natbib.sty, it is possible to define the type of enclosures that is
+ % really wanted (brackets or parentheses), but in either case, there must
+ % be parentheses in the label.
+ % The \cite command functions as follows:
+ % \citet{key} ==>> Jones et al. (1990)
+ % \citet*{key} ==>> Jones, Baker, and Smith (1990)
+ % \citep{key} ==>> (Jones et al., 1990)
+ % \citep*{key} ==>> (Jones, Baker, and Smith, 1990)
+ % \citep[chap. 2]{key} ==>> (Jones et al., 1990, chap. 2)
+ % \citep[e.g.][]{key} ==>> (e.g. Jones et al., 1990)
+ % \citep[e.g.][p. 32]{key} ==>> (e.g. Jones et al., p. 32)
+ % \citeauthor{key} ==>> Jones et al.
+ % \citeauthor*{key} ==>> Jones, Baker, and Smith
+ % \citeyear{key} ==>> 1990
+ %---------------------------------------------------------------------
+
+ENTRY
+ { address
+ author
+ booktitle
+ chapter
+ edition
+ editor
+ eid
+ howpublished
+ institution
+ journal
+ key
+ month
+ note
+ number
+ organization
+ pages
+ publisher
+ school
+ series
+ title
+ type
+ volume
+ year
+ }
+ {}
+ { label extra.label sort.label short.list }
+INTEGERS { output.state before.all mid.sentence after.sentence after.block }
+FUNCTION {init.state.consts}
+{ #0 'before.all :=
+ #1 'mid.sentence :=
+ #2 'after.sentence :=
+ #3 'after.block :=
+}
+STRINGS { s t}
+FUNCTION {output.nonnull}
+{ 's :=
+ output.state mid.sentence =
+ { ", " * write$ }
+ { output.state after.block =
+ { add.period$ write$
+ newline$
+ "\newblock " write$
+ }
+ { output.state before.all =
+ 'write$
+ { add.period$ " " * write$ }
+ if$
+ }
+ if$
+ mid.sentence 'output.state :=
+ }
+ if$
+ s
+}
+FUNCTION {output}
+{ duplicate$ empty$
+ 'pop$
+ 'output.nonnull
+ if$
+}
+FUNCTION {output.check}
+{ 't :=
+ duplicate$ empty$
+ { pop$ "empty " t * " in " * cite$ * warning$ }
+ 'output.nonnull
+ if$
+}
+FUNCTION {fin.entry}
+{ add.period$
+ write$
+ newline$
+}
+
+FUNCTION {new.block}
+{ output.state before.all =
+ 'skip$
+ { after.block 'output.state := }
+ if$
+}
+FUNCTION {new.sentence}
+{ output.state after.block =
+ 'skip$
+ { output.state before.all =
+ 'skip$
+ { after.sentence 'output.state := }
+ if$
+ }
+ if$
+}
+FUNCTION {add.blank}
+{ " " * before.all 'output.state :=
+}
+
+FUNCTION {date.block}
+{
+ new.sentence
+}
+
+FUNCTION {not}
+{ { #0 }
+ { #1 }
+ if$
+}
+FUNCTION {and}
+{ 'skip$
+ { pop$ #0 }
+ if$
+}
+FUNCTION {or}
+{ { pop$ #1 }
+ 'skip$
+ if$
+}
+FUNCTION {new.block.checkb}
+{ empty$
+ swap$ empty$
+ and
+ 'skip$
+ 'new.block
+ if$
+}
+FUNCTION {field.or.null}
+{ duplicate$ empty$
+ { pop$ "" }
+ 'skip$
+ if$
+}
+FUNCTION {emphasize}
+{ duplicate$ empty$
+ { pop$ "" }
+ { "\emph{" swap$ * "}" * }
+ if$
+}
+FUNCTION {tie.or.space.prefix}
+{ duplicate$ text.length$ #3 <
+ { "~" }
+ { " " }
+ if$
+ swap$
+}
+
+FUNCTION {capitalize}
+{ "u" change.case$ "t" change.case$ }
+
+FUNCTION {space.word}
+{ " " swap$ * " " * }
+ % Here are the language-specific definitions for explicit words.
+ % Each function has a name bbl.xxx where xxx is the English word.
+ % The language selected here is ENGLISH
+FUNCTION {bbl.and}
+{ "and"}
+
+FUNCTION {bbl.etal}
+{ "et~al." }
+
+FUNCTION {bbl.editors}
+{ "eds." }
+
+FUNCTION {bbl.editor}
+{ "ed." }
+
+FUNCTION {bbl.edby}
+{ "edited by" }
+
+FUNCTION {bbl.edition}
+{ "edition" }
+
+FUNCTION {bbl.volume}
+{ "volume" }
+
+FUNCTION {bbl.of}
+{ "of" }
+
+FUNCTION {bbl.number}
+{ "number" }
+
+FUNCTION {bbl.nr}
+{ "no." }
+
+FUNCTION {bbl.in}
+{ "in" }
+
+FUNCTION {bbl.pages}
+{ "pp." }
+
+FUNCTION {bbl.page}
+{ "p." }
+
+FUNCTION {bbl.chapter}
+{ "chapter" }
+
+FUNCTION {bbl.techrep}
+{ "Technical Report" }
+
+FUNCTION {bbl.mthesis}
+{ "Master's thesis" }
+
+FUNCTION {bbl.phdthesis}
+{ "Ph.D. thesis" }
+
+FUNCTION {bbl.first}
+{ "1st" }
+
+FUNCTION {bbl.second}
+{ "2nd" }
+
+FUNCTION {bbl.third}
+{ "3rd" }
+
+FUNCTION {bbl.fourth}
+{ "4th" }
+
+FUNCTION {bbl.fifth}
+{ "5th" }
+
+FUNCTION {bbl.st}
+{ "st" }
+
+FUNCTION {bbl.nd}
+{ "nd" }
+
+FUNCTION {bbl.rd}
+{ "rd" }
+
+FUNCTION {bbl.th}
+{ "th" }
+
+MACRO {jan} {"January"}
+
+MACRO {feb} {"February"}
+
+MACRO {mar} {"March"}
+
+MACRO {apr} {"April"}
+
+MACRO {may} {"May"}
+
+MACRO {jun} {"June"}
+
+MACRO {jul} {"July"}
+
+MACRO {aug} {"August"}
+
+MACRO {sep} {"September"}
+
+MACRO {oct} {"October"}
+
+MACRO {nov} {"November"}
+
+MACRO {dec} {"December"}
+
+FUNCTION {eng.ord}
+{ duplicate$ "1" swap$ *
+ #-2 #1 substring$ "1" =
+ { bbl.th * }
+ { duplicate$ #-1 #1 substring$
+ duplicate$ "1" =
+ { pop$ bbl.st * }
+ { duplicate$ "2" =
+ { pop$ bbl.nd * }
+ { "3" =
+ { bbl.rd * }
+ { bbl.th * }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+}
+
+MACRO {acmcs} {"ACM Comput. Surv."}
+
+MACRO {acta} {"Acta Inf."}
+
+MACRO {cacm} {"Commun. ACM"}
+
+MACRO {ibmjrd} {"IBM J. Res. Dev."}
+
+MACRO {ibmsj} {"IBM Syst.~J."}
+
+MACRO {ieeese} {"IEEE Trans. Software Eng."}
+
+MACRO {ieeetc} {"IEEE Trans. Comput."}
+
+MACRO {ieeetcad}
+ {"IEEE Trans. Comput. Aid. Des."}
+
+MACRO {ipl} {"Inf. Process. Lett."}
+
+MACRO {jacm} {"J.~ACM"}
+
+MACRO {jcss} {"J.~Comput. Syst. Sci."}
+
+MACRO {scp} {"Sci. Comput. Program."}
+
+MACRO {sicomp} {"SIAM J. Comput."}
+
+MACRO {tocs} {"ACM Trans. Comput. Syst."}
+
+MACRO {tods} {"ACM Trans. Database Syst."}
+
+MACRO {tog} {"ACM Trans. Graphic."}
+
+MACRO {toms} {"ACM Trans. Math. Software"}
+
+MACRO {toois} {"ACM Trans. Office Inf. Syst."}
+
+MACRO {toplas} {"ACM Trans. Progr. Lang. Syst."}
+
+MACRO {tcs} {"Theor. Comput. Sci."}
+
+FUNCTION {bibinfo.check}
+{ swap$
+ duplicate$ missing$
+ {
+ pop$ pop$
+ ""
+ }
+ { duplicate$ empty$
+ {
+ swap$ pop$
+ }
+ { swap$
+ pop$
+ }
+ if$
+ }
+ if$
+}
+FUNCTION {bibinfo.warn}
+{ swap$
+ duplicate$ missing$
+ {
+ swap$ "missing " swap$ * " in " * cite$ * warning$ pop$
+ ""
+ }
+ { duplicate$ empty$
+ {
+ swap$ "empty " swap$ * " in " * cite$ * warning$
+ }
+ { swap$
+ pop$
+ }
+ if$
+ }
+ if$
+}
+STRINGS { bibinfo}
+INTEGERS { nameptr namesleft numnames }
+
+FUNCTION {format.names}
+{ 'bibinfo :=
+ duplicate$ empty$ 'skip$ {
+ 's :=
+ "" 't :=
+ #1 'nameptr :=
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ { s nameptr
+ "{vv~}{ll}{, f.}{, jj}"
+ format.name$
+ bibinfo bibinfo.check
+ 't :=
+ nameptr #1 >
+ {
+ namesleft #1 >
+ { ", " * t * }
+ {
+ "," *
+ s nameptr "{ll}" format.name$ duplicate$ "others" =
+ { 't := }
+ { pop$ }
+ if$
+ t "others" =
+ {
+ " " * bbl.etal *
+ }
+ { " " * t * }
+ if$
+ }
+ if$
+ }
+ 't
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+ } if$
+}
+FUNCTION {format.names.ed}
+{
+ format.names
+}
+FUNCTION {format.key}
+{ empty$
+ { key field.or.null }
+ { "" }
+ if$
+}
+
+FUNCTION {format.authors}
+{ author "author" format.names
+}
+FUNCTION {get.bbl.editor}
+{ editor num.names$ #1 > 'bbl.editors 'bbl.editor if$ }
+
+FUNCTION {format.editors}
+{ editor "editor" format.names duplicate$ empty$ 'skip$
+ {
+ " " *
+ get.bbl.editor
+ capitalize
+ "(" swap$ * ")" *
+ *
+ }
+ if$
+}
+FUNCTION {format.note}
+{
+ note empty$
+ { "" }
+ { note #1 #1 substring$
+ duplicate$ "{" =
+ 'skip$
+ { output.state mid.sentence =
+ { "l" }
+ { "u" }
+ if$
+ change.case$
+ }
+ if$
+ note #2 global.max$ substring$ * "note" bibinfo.check
+ }
+ if$
+}
+
+FUNCTION {format.title}
+{ title
+ duplicate$ empty$ 'skip$
+ { "t" change.case$ }
+ if$
+ "title" bibinfo.check
+}
+FUNCTION {format.full.names}
+{'s :=
+ "" 't :=
+ #1 'nameptr :=
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ { s nameptr
+ "{vv~}{ll}" format.name$
+ 't :=
+ nameptr #1 >
+ {
+ namesleft #1 >
+ { ", " * t * }
+ {
+ s nameptr "{ll}" format.name$ duplicate$ "others" =
+ { 't := }
+ { pop$ }
+ if$
+ t "others" =
+ {
+ " " * bbl.etal *
+ }
+ {
+ numnames #2 >
+ { "," * }
+ 'skip$
+ if$
+ bbl.and
+ space.word * t *
+ }
+ if$
+ }
+ if$
+ }
+ 't
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+}
+
+FUNCTION {author.editor.key.full}
+{ author empty$
+ { editor empty$
+ { key empty$
+ { cite$ #1 #3 substring$ }
+ 'key
+ if$
+ }
+ { editor format.full.names }
+ if$
+ }
+ { author format.full.names }
+ if$
+}
+
+FUNCTION {author.key.full}
+{ author empty$
+ { key empty$
+ { cite$ #1 #3 substring$ }
+ 'key
+ if$
+ }
+ { author format.full.names }
+ if$
+}
+
+FUNCTION {editor.key.full}
+{ editor empty$
+ { key empty$
+ { cite$ #1 #3 substring$ }
+ 'key
+ if$
+ }
+ { editor format.full.names }
+ if$
+}
+
+FUNCTION {make.full.names}
+{ type$ "book" =
+ type$ "inbook" =
+ or
+ 'author.editor.key.full
+ { type$ "proceedings" =
+ 'editor.key.full
+ 'author.key.full
+ if$
+ }
+ if$
+}
+
+FUNCTION {output.bibitem}
+{ newline$
+ "\bibitem[{" write$
+ label write$
+ ")" make.full.names duplicate$ short.list =
+ { pop$ }
+ { * }
+ if$
+ "}]{" * write$
+ cite$ write$
+ "}" write$
+ newline$
+ ""
+ before.all 'output.state :=
+}
+
+FUNCTION {n.dashify}
+{
+ 't :=
+ ""
+ { t empty$ not }
+ { t #1 #1 substring$ "-" =
+ { t #1 #2 substring$ "--" = not
+ { "--" *
+ t #2 global.max$ substring$ 't :=
+ }
+ { { t #1 #1 substring$ "-" = }
+ { "-" *
+ t #2 global.max$ substring$ 't :=
+ }
+ while$
+ }
+ if$
+ }
+ { t #1 #1 substring$ *
+ t #2 global.max$ substring$ 't :=
+ }
+ if$
+ }
+ while$
+}
+
+FUNCTION {word.in}
+{ bbl.in capitalize
+ ":" *
+ " " * }
+
+FUNCTION {format.date}
+{ year "year" bibinfo.check duplicate$ empty$
+ {
+ "empty year in " cite$ * "; set to ????" * warning$
+ pop$ "????"
+ }
+ 'skip$
+ if$
+ extra.label *
+ before.all 'output.state :=
+ ", " swap$ *
+}
+FUNCTION {format.btitle}
+{ title "title" bibinfo.check
+ duplicate$ empty$ 'skip$
+ {
+ }
+ if$
+}
+FUNCTION {either.or.check}
+{ empty$
+ 'pop$
+ { "can't use both " swap$ * " fields in " * cite$ * warning$ }
+ if$
+}
+FUNCTION {format.bvolume}
+{ volume empty$
+ { "" }
+ { bbl.volume volume tie.or.space.prefix
+ "volume" bibinfo.check * *
+ series "series" bibinfo.check
+ duplicate$ empty$ 'pop$
+ { emphasize ", " * swap$ * }
+ if$
+ "volume and number" number either.or.check
+ }
+ if$
+}
+FUNCTION {format.number.series}
+{ volume empty$
+ { number empty$
+ { series field.or.null }
+ { series empty$
+ { number "number" bibinfo.check }
+ { output.state mid.sentence =
+ { bbl.number }
+ { bbl.number capitalize }
+ if$
+ number tie.or.space.prefix "number" bibinfo.check * *
+ bbl.in space.word *
+ series "series" bibinfo.check *
+ }
+ if$
+ }
+ if$
+ }
+ { "" }
+ if$
+}
+FUNCTION {is.num}
+{ chr.to.int$
+ duplicate$ "0" chr.to.int$ < not
+ swap$ "9" chr.to.int$ > not and
+}
+
+FUNCTION {extract.num}
+{ duplicate$ 't :=
+ "" 's :=
+ { t empty$ not }
+ { t #1 #1 substring$
+ t #2 global.max$ substring$ 't :=
+ duplicate$ is.num
+ { s swap$ * 's := }
+ { pop$ "" 't := }
+ if$
+ }
+ while$
+ s empty$
+ 'skip$
+ { pop$ s }
+ if$
+}
+
+FUNCTION {convert.edition}
+{ extract.num "l" change.case$ 's :=
+ s "first" = s "1" = or
+ { bbl.first 't := }
+ { s "second" = s "2" = or
+ { bbl.second 't := }
+ { s "third" = s "3" = or
+ { bbl.third 't := }
+ { s "fourth" = s "4" = or
+ { bbl.fourth 't := }
+ { s "fifth" = s "5" = or
+ { bbl.fifth 't := }
+ { s #1 #1 substring$ is.num
+ { s eng.ord 't := }
+ { edition 't := }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+ t
+}
+
+FUNCTION {format.edition}
+{ edition duplicate$ empty$ 'skip$
+ {
+ convert.edition
+ output.state mid.sentence =
+ { "l" }
+ { "t" }
+ if$ change.case$
+ "edition" bibinfo.check
+ " " * bbl.edition *
+ }
+ if$
+}
+INTEGERS { multiresult }
+FUNCTION {multi.page.check}
+{ 't :=
+ #0 'multiresult :=
+ { multiresult not
+ t empty$ not
+ and
+ }
+ { t #1 #1 substring$
+ duplicate$ "-" =
+ swap$ duplicate$ "," =
+ swap$ "+" =
+ or or
+ { #1 'multiresult := }
+ { t #2 global.max$ substring$ 't := }
+ if$
+ }
+ while$
+ multiresult
+}
+FUNCTION {format.pages}
+{ pages duplicate$ empty$ 'skip$
+ { duplicate$ multi.page.check
+ {
+ bbl.pages swap$
+ n.dashify
+ }
+ {
+ bbl.page swap$
+ }
+ if$
+ tie.or.space.prefix
+ "pages" bibinfo.check
+ * *
+ }
+ if$
+}
+FUNCTION {format.journal.pages}
+{ pages duplicate$ empty$ 'pop$
+ { swap$ duplicate$ empty$
+ { pop$ pop$ format.pages }
+ {
+ ", " *
+ swap$
+ n.dashify
+ "pages" bibinfo.check
+ *
+ }
+ if$
+ }
+ if$
+}
+FUNCTION {format.journal.eid}
+{ eid "eid" bibinfo.check
+ duplicate$ empty$ 'pop$
+ { swap$ duplicate$ empty$ 'skip$
+ {
+ ", " *
+ }
+ if$
+ swap$ *
+ }
+ if$
+}
+FUNCTION {format.vol.num.pages}
+{ volume field.or.null
+ duplicate$ empty$ 'skip$
+ {
+ "volume" bibinfo.check
+ }
+ if$
+ number "number" bibinfo.check duplicate$ empty$ 'skip$
+ {
+ swap$ duplicate$ empty$
+ { "there's a number but no volume in " cite$ * warning$ }
+ 'skip$
+ if$
+ swap$
+ "(" swap$ * ")" *
+ }
+ if$ *
+ eid empty$
+ { format.journal.pages }
+ { format.journal.eid }
+ if$
+}
+
+FUNCTION {format.chapter.pages}
+{ chapter empty$
+ 'format.pages
+ { type empty$
+ { bbl.chapter }
+ { type "l" change.case$
+ "type" bibinfo.check
+ }
+ if$
+ chapter tie.or.space.prefix
+ "chapter" bibinfo.check
+ * *
+ pages empty$
+ 'skip$
+ { ", " * format.pages * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.booktitle}
+{
+ booktitle "booktitle" bibinfo.check
+}
+FUNCTION {format.in.ed.booktitle}
+{ format.booktitle duplicate$ empty$ 'skip$
+ {
+ editor "editor" format.names.ed duplicate$ empty$ 'pop$
+ {
+ " " *
+ get.bbl.editor
+ capitalize
+ "(" swap$ * "), " *
+ * swap$
+ * }
+ if$
+ word.in swap$ *
+ }
+ if$
+}
+FUNCTION {format.thesis.type}
+{ type duplicate$ empty$
+ 'pop$
+ { swap$ pop$
+ "t" change.case$ "type" bibinfo.check
+ }
+ if$
+}
+FUNCTION {format.tr.number}
+{ number "number" bibinfo.check
+ type duplicate$ empty$
+ { pop$ bbl.techrep }
+ 'skip$
+ if$
+ "type" bibinfo.check
+ swap$ duplicate$ empty$
+ { pop$ "t" change.case$ }
+ { tie.or.space.prefix * * }
+ if$
+}
+FUNCTION {format.article.crossref}
+{
+ word.in
+ " \cite{" * crossref * "}" *
+}
+FUNCTION {format.book.crossref}
+{ volume duplicate$ empty$
+ { "empty volume in " cite$ * "'s crossref of " * crossref * warning$
+ pop$ word.in
+ }
+ { bbl.volume
+ capitalize
+ swap$ tie.or.space.prefix "volume" bibinfo.check * * bbl.of space.word *
+ }
+ if$
+ " \cite{" * crossref * "}" *
+}
+FUNCTION {format.incoll.inproc.crossref}
+{
+ word.in
+ " \cite{" * crossref * "}" *
+}
+FUNCTION {format.org.or.pub}
+{ 't :=
+ ""
+ address empty$ t empty$ and
+ 'skip$
+ {
+ t empty$
+ { address "address" bibinfo.check *
+ }
+ { t *
+ address empty$
+ 'skip$
+ { ", " * address "address" bibinfo.check * }
+ if$
+ }
+ if$
+ }
+ if$
+}
+FUNCTION {format.publisher.address}
+{ publisher "publisher" bibinfo.warn format.org.or.pub
+}
+
+FUNCTION {format.organization.address}
+{ organization "organization" bibinfo.check format.org.or.pub
+}
+
+FUNCTION {article}
+{ output.bibitem
+ format.authors "author" output.check
+ author format.key output
+ format.date "year" output.check
+ date.block
+ format.title "title" output.check
+ new.sentence
+ crossref missing$
+ {
+ journal
+ "journal" bibinfo.check
+ "journal" output.check
+ add.blank
+ format.vol.num.pages output
+ }
+ { format.article.crossref output.nonnull
+ format.pages output
+ }
+ if$
+ format.note output
+ fin.entry
+}
+FUNCTION {book}
+{ output.bibitem
+ author empty$
+ { format.editors "author and editor" output.check
+ editor format.key output
+ }
+ { format.authors output.nonnull
+ crossref missing$
+ { "author and editor" editor either.or.check }
+ 'skip$
+ if$
+ }
+ if$
+ format.date "year" output.check
+ date.block
+ format.btitle "title" output.check
+ crossref missing$
+ { format.bvolume output
+ new.sentence
+ format.number.series output
+ format.publisher.address output
+ }
+ {
+ new.sentence
+ format.book.crossref output.nonnull
+ }
+ if$
+ format.edition output
+ format.note output
+ fin.entry
+}
+FUNCTION {booklet}
+{ output.bibitem
+ format.authors output
+ author format.key output
+ format.date "year" output.check
+ date.block
+ format.title "title" output.check
+ new.sentence
+ howpublished "howpublished" bibinfo.check output
+ address "address" bibinfo.check output
+ format.note output
+ fin.entry
+}
+
+FUNCTION {inbook}
+{ output.bibitem
+ author empty$
+ { format.editors "author and editor" output.check
+ editor format.key output
+ }
+ { format.authors output.nonnull
+ crossref missing$
+ { "author and editor" editor either.or.check }
+ 'skip$
+ if$
+ }
+ if$
+ format.date "year" output.check
+ date.block
+ format.btitle "title" output.check
+ crossref missing$
+ {
+ format.bvolume output
+ format.chapter.pages "chapter and pages" output.check
+ new.sentence
+ format.number.series output
+ format.publisher.address output
+ }
+ {
+ format.chapter.pages "chapter and pages" output.check
+ new.sentence
+ format.book.crossref output.nonnull
+ }
+ if$
+ format.edition output
+ format.note output
+ fin.entry
+}
+
+FUNCTION {incollection}
+{ output.bibitem
+ format.authors "author" output.check
+ author format.key output
+ format.date "year" output.check
+ date.block
+ format.title "title" output.check
+ new.sentence
+ crossref missing$
+ { format.in.ed.booktitle "booktitle" output.check
+ format.bvolume output
+ format.number.series output
+ format.chapter.pages output
+ format.publisher.address output
+ format.edition output
+ }
+ { format.incoll.inproc.crossref output.nonnull
+ format.chapter.pages output
+ }
+ if$
+ format.note output
+ fin.entry
+}
+FUNCTION {inproceedings}
+{ output.bibitem
+ format.authors "author" output.check
+ author format.key output
+ format.date "year" output.check
+ date.block
+ format.title "title" output.check
+ new.sentence
+ crossref missing$
+ { format.in.ed.booktitle "booktitle" output.check
+ format.bvolume output
+ format.number.series output
+ format.pages output
+ publisher empty$
+ { format.organization.address output }
+ { organization "organization" bibinfo.check output
+ format.publisher.address output
+ }
+ if$
+ }
+ { format.incoll.inproc.crossref output.nonnull
+ format.pages output
+ }
+ if$
+ format.note output
+ fin.entry
+}
+FUNCTION {conference} { inproceedings }
+FUNCTION {manual}
+{ output.bibitem
+ format.authors output
+ author format.key output
+ format.date "year" output.check
+ date.block
+ format.btitle "title" output.check
+ new.sentence
+ organization "organization" bibinfo.check output
+ address "address" bibinfo.check output
+ format.edition output
+ format.note output
+ fin.entry
+}
+
+FUNCTION {mastersthesis}
+{ output.bibitem
+ format.authors "author" output.check
+ author format.key output
+ format.date "year" output.check
+ date.block
+ format.title
+ "title" output.check
+ new.sentence
+ bbl.mthesis format.thesis.type output.nonnull
+ school "school" bibinfo.warn output
+ address "address" bibinfo.check output
+ format.note output
+ fin.entry
+}
+
+FUNCTION {misc}
+{ output.bibitem
+ format.authors output
+ author format.key output
+ format.date "year" output.check
+ date.block
+ format.title output
+ new.sentence
+ howpublished "howpublished" bibinfo.check output
+ format.note output
+ fin.entry
+}
+FUNCTION {phdthesis}
+{ output.bibitem
+ format.authors "author" output.check
+ author format.key output
+ format.date "year" output.check
+ date.block
+ format.title
+ "title" output.check
+ new.sentence
+ bbl.phdthesis format.thesis.type output.nonnull
+ school "school" bibinfo.warn output
+ address "address" bibinfo.check output
+ format.note output
+ fin.entry
+}
+
+FUNCTION {proceedings}
+{ output.bibitem
+ format.editors output
+ editor format.key output
+ format.date "year" output.check
+ date.block
+ format.btitle "title" output.check
+ format.bvolume output
+ format.number.series output
+ publisher empty$
+ { format.organization.address output }
+ { organization "organization" bibinfo.check output
+ format.publisher.address output
+ }
+ if$
+ format.note output
+ fin.entry
+}
+
+FUNCTION {techreport}
+{ output.bibitem
+ format.authors "author" output.check
+ author format.key output
+ format.date "year" output.check
+ date.block
+ format.title
+ "title" output.check
+ new.sentence
+ format.tr.number output.nonnull
+ institution "institution" bibinfo.warn output
+ address "address" bibinfo.check output
+ format.note output
+ fin.entry
+}
+
+FUNCTION {unpublished}
+{ output.bibitem
+ format.authors "author" output.check
+ author format.key output
+ format.date "year" output.check
+ date.block
+ format.title "title" output.check
+ format.note "note" output.check
+ fin.entry
+}
+
+FUNCTION {default.type} { misc }
+READ
+FUNCTION {sortify}
+{ purify$
+ "l" change.case$
+}
+INTEGERS { len }
+FUNCTION {chop.word}
+{ 's :=
+ 'len :=
+ s #1 len substring$ =
+ { s len #1 + global.max$ substring$ }
+ 's
+ if$
+}
+FUNCTION {format.lab.names}
+{ 's :=
+ "" 't :=
+ s #1 "{vv~}{ll}" format.name$
+ s num.names$ duplicate$
+ #2 >
+ { pop$
+ " " * bbl.etal *
+ }
+ { #2 <
+ 'skip$
+ { s #2 "{ff }{vv }{ll}{ jj}" format.name$ "others" =
+ {
+ " " * bbl.etal *
+ }
+ { bbl.and space.word * s #2 "{vv~}{ll}" format.name$
+ * }
+ if$
+ }
+ if$
+ }
+ if$
+}
+
+FUNCTION {author.key.label}
+{ author empty$
+ { key empty$
+ { cite$ #1 #3 substring$ }
+ 'key
+ if$
+ }
+ { author format.lab.names }
+ if$
+}
+
+FUNCTION {author.editor.key.label}
+{ author empty$
+ { editor empty$
+ { key empty$
+ { cite$ #1 #3 substring$ }
+ 'key
+ if$
+ }
+ { editor format.lab.names }
+ if$
+ }
+ { author format.lab.names }
+ if$
+}
+
+FUNCTION {editor.key.label}
+{ editor empty$
+ { key empty$
+ { cite$ #1 #3 substring$ }
+ 'key
+ if$
+ }
+ { editor format.lab.names }
+ if$
+}
+
+FUNCTION {calc.short.authors}
+{ type$ "book" =
+ type$ "inbook" =
+ or
+ 'author.editor.key.label
+ { type$ "proceedings" =
+ 'editor.key.label
+ 'author.key.label
+ if$
+ }
+ if$
+ 'short.list :=
+}
+
+FUNCTION {calc.label}
+{ calc.short.authors
+ short.list
+ "("
+ *
+ year duplicate$ empty$
+ short.list key field.or.null = or
+ { pop$ "" }
+ 'skip$
+ if$
+ *
+ 'label :=
+}
+
+FUNCTION {sort.format.names}
+{ 's :=
+ #1 'nameptr :=
+ ""
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ { s nameptr
+ "{vv{ } }{ll{ }}{ f{ }}{ jj{ }}"
+ format.name$ 't :=
+ nameptr #1 >
+ {
+ " " *
+ namesleft #1 = t "others" = and
+ { "zzzzz" * }
+ { t sortify * }
+ if$
+ }
+ { t sortify * }
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+}
+
+FUNCTION {sort.format.title}
+{ 't :=
+ "A " #2
+ "An " #3
+ "The " #4 t chop.word
+ chop.word
+ chop.word
+ sortify
+ #1 global.max$ substring$
+}
+FUNCTION {author.sort}
+{ author empty$
+ { key empty$
+ { "to sort, need author or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { author sort.format.names }
+ if$
+}
+FUNCTION {author.editor.sort}
+{ author empty$
+ { editor empty$
+ { key empty$
+ { "to sort, need author, editor, or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { editor sort.format.names }
+ if$
+ }
+ { author sort.format.names }
+ if$
+}
+FUNCTION {editor.sort}
+{ editor empty$
+ { key empty$
+ { "to sort, need editor or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { editor sort.format.names }
+ if$
+}
+FUNCTION {presort}
+{ calc.label
+ label sortify
+ " "
+ *
+ type$ "book" =
+ type$ "inbook" =
+ or
+ 'author.editor.sort
+ { type$ "proceedings" =
+ 'editor.sort
+ 'author.sort
+ if$
+ }
+ if$
+ #1 entry.max$ substring$
+ 'sort.label :=
+ sort.label
+ *
+ " "
+ *
+ title field.or.null
+ sort.format.title
+ *
+ #1 entry.max$ substring$
+ 'sort.key$ :=
+}
+
+ITERATE {presort}
+SORT
+STRINGS { last.label next.extra }
+INTEGERS { last.extra.num number.label }
+FUNCTION {initialize.extra.label.stuff}
+{ #0 int.to.chr$ 'last.label :=
+ "" 'next.extra :=
+ #0 'last.extra.num :=
+ #0 'number.label :=
+}
+FUNCTION {forward.pass}
+{ last.label label =
+ { last.extra.num #1 + 'last.extra.num :=
+ last.extra.num int.to.chr$ 'extra.label :=
+ }
+ { "a" chr.to.int$ 'last.extra.num :=
+ "" 'extra.label :=
+ label 'last.label :=
+ }
+ if$
+ number.label #1 + 'number.label :=
+}
+FUNCTION {reverse.pass}
+{ next.extra "b" =
+ { "a" 'extra.label := }
+ 'skip$
+ if$
+ extra.label 'next.extra :=
+ extra.label
+ duplicate$ empty$
+ 'skip$
+ { "{\natexlab{" swap$ * "}}" * }
+ if$
+ 'extra.label :=
+ label extra.label * 'label :=
+}
+EXECUTE {initialize.extra.label.stuff}
+ITERATE {forward.pass}
+REVERSE {reverse.pass}
+FUNCTION {bib.sort.order}
+{ sort.label
+ " "
+ *
+ year field.or.null sortify
+ *
+ " "
+ *
+ title field.or.null
+ sort.format.title
+ *
+ #1 entry.max$ substring$
+ 'sort.key$ :=
+}
+ITERATE {bib.sort.order}
+SORT
+FUNCTION {begin.bib}
+{ preamble$ empty$
+ 'skip$
+ { preamble$ write$ newline$ }
+ if$
+ "\begin{thebibliography}{" number.label int.to.str$ * "}" *
+ write$ newline$
+ "\providecommand{\natexlab}[1]{#1}"
+ write$ newline$
+}
+EXECUTE {begin.bib}
+EXECUTE {init.state.consts}
+ITERATE {call.type$}
+FUNCTION {end.bib}
+{ newline$
+ "\end{thebibliography}" write$ newline$
+}
+EXECUTE {end.bib}
+%% End of customized bst file
+%%
+%% End of file `agecon.bst'.
diff --git a/biblio/bibtex/contrib/economic/agecon.cls b/biblio/bibtex/contrib/economic/agecon.cls
new file mode 100644
index 0000000000..ebf525d51d
--- /dev/null
+++ b/biblio/bibtex/contrib/economic/agecon.cls
@@ -0,0 +1,207 @@
+%%% LaTeX class for manuscripts submitted to the
+%%% journal 'Agricultural Economics' (AgEcon)
+%%%
+%%% author: Arne Henningsen
+%%% version: 1.1 (18 November 2009)
+%%% license: LaTeX Project Public License
+%%%
+%%% Note: This is an unofficial style file that may not fully comply
+%%% with the AgEcon Formatting Instructions in every detail.
+%%% Please report any problems at
+%%% http://sourceforge.net/projects/economtex/
+%%% Further information is available at
+%%% http://economtex.wiki.sourceforge.net/
+%%%
+%%% This document class is based on the "scrartcl" class
+%%% from the KOMA script bundle.
+%%% Following additional packages are required:
+%%% amsmath, babel, caption, endfloat, geometry,
+%%% lmodern, natbib, setspace, titlesec, url
+%%%
+%%% The class provides following options:
+%%% noendfloat - do not move floats to the end of the paper
+%%% author - show name(s) of authors(s)
+%%% date - show date
+%%% letterpaper - use US letter paper format instead of A4
+%%%
+%%% The AgEcon journal requires that you use double quotes
+%%% you could do this with the ``csquotes'' package:
+%%% \usepackage{csquotes}
+%%% \MakeOuterQuote{<yourQuoteCharacter>}
+%%%
+%%% The corresponding BibTeX style file "agecon.bst" should be used
+%%% for the bibliography: \bibliographystyle{agecon}
+%%%
+%%% This document class provides 3 new commands:
+%%% \keywords can be use to show keywors below the abstract
+%%% \jelclass can be use to show JEL classifications below the abstract
+%%% \affiliation can be used to add affiliation information
+%%%
+
+
+\NeedsTeXFormat{LaTeX2e}
+\ProvidesClass{agecon}[2009/11/18 LaTeX class for the journal 'Agricultural Economics']
+
+\RequirePackage{ifthen}
+
+% option to NOT place floats at the end
+\newcounter{UseEndfloat}
+\setcounter{UseEndfloat}{1}
+\DeclareOption{noendfloat}{\setcounter{UseEndfloat}{0}}
+
+% option to show the authors' names
+\newcounter{ShowAuthor}
+\setcounter{ShowAuthor}{0}
+\DeclareOption{author}{\setcounter{ShowAuthor}{1}}
+
+% option to print the date
+\newcounter{ShowDate}
+\setcounter{ShowDate}{0}
+\DeclareOption{date}{\setcounter{ShowDate}{1}}
+
+% option use US letter format (instead of A4)
+\newcounter{UseLetterPaper}
+\setcounter{UseLetterPaper}{0}
+\DeclareOption{letterpaper}{\setcounter{UseLetterPaper}{1}}
+
+% pass any options on to the scrartcl class and load this class with some options
+\DeclareOption*{\PassOptionsToClass{\CurrentOption}{scrartcl}}
+\ProcessOptions\relax
+\LoadClass[12pt,english,pointednumbers,tablecaptionabove]{scrartcl}
+% pointednumbers = add final dot after ordinary section numbers
+% tablecaptionabove = use \captionabove for tables
+
+% use babel package and set language to english
+\RequirePackage[english]{babel}
+
+% page format, margins
+\RequirePackage{geometry}
+\ifthenelse{\equal{\theUseLetterPaper}{0}}{
+ \geometry{a4paper, tmargin=2.5cm, bmargin=2.8cm, lmargin=2.5cm,
+ rmargin=2.5cm, headheight=0cm, headsep=0cm, footskip=1.2cm }
+}{
+ \geometry{letterpaper, tmargin=2.5cm, bmargin=2.8cm, lmargin=2.5cm,
+ rmargin=2.5cm, headheight=0cm, headsep=0cm, footskip=1.2cm }
+}
+
+% double spacing
+\RequirePackage{setspace}
+\doublespacing
+
+% font of (subsub)section headers
+\setkomafont{section}{\bfseries}
+\setkomafont{subsection}{\normalfont\itshape}
+\setkomafont{subsubsection}{\normalfont\itshape}
+
+% spacing around (sub)section headers
+\RequirePackage{titlesec}
+\titlespacing*{\section}{0pt}{1em}{0.25em}
+\titlespacing*{\subsection}{0pt}{0.85em}{0.15em}
+
+% spacing around formulas
+\AtBeginDocument{
+\setlength{\abovedisplayshortskip}{6pt}
+\setlength{\belowdisplayshortskip}{6pt}
+\setlength{\abovedisplayskip}{6pt}
+\setlength{\belowdisplayskip}{6pt}
+\allowdisplaybreaks
+}
+
+% spacing around captions and floats
+\setlength{\abovecaptionskip}{6pt}
+\setlength{\belowcaptionskip}{3pt}
+\setlength{\floatsep}{0pt}
+\setlength{\textfloatsep}{20pt}
+\setlength{\intextsep}{5pt}
+
+% font: latin modern
+\RequirePackage{lmodern}
+
+% amsmath
+\RequirePackage[fleqn]{amsmath}
+% for compatibility with ajae.cls
+\newcommand{\veclatin}[1]{#1}
+\newcommand{\matlatin}[1]{#1}
+\newcommand{\vecgreek}[1]{#1}
+\newcommand{\matgreek}[1]{#1}
+
+% font for URLs
+\RequirePackage{url}
+\def\UrlFont{\rmfamily}
+
+% citations and bibliography
+\RequirePackage[authoryear]{natbib}
+\setlength{\bibsep}{0pt}
+
+% captions of figures and tables
+\usepackage{caption}
+\captionsetup{justification=raggedright,singlelinecheck=false,
+ labelfont=rm,textfont=rm}
+\captionsetup[table]{labelsep=newline}
+\captionsetup[figure]{labelsep=period}
+\addto\captionsenglish{%
+ \renewcommand{\figurename}{Fig.}%
+}
+
+% titlepage without author and date
+\newcommand{\affiliation}[1]{\newcommand{\@affiliation}{#1}}
+\renewcommand{\maketitle}{
+ \begin{center}
+ \begin{spacing}{1.5}
+ \LARGE{\textbf{\@title}}%
+ \end{spacing}
+ \ifthenelse{\equal{\theShowAuthor}{1}}{
+ \begin{large}
+ \textbf{\@author}\\
+ \end{large}
+ \ifthenelse{ \isundefined\@affiliation }{}{
+ \vspace*{3mm}
+ \begin{small}
+ \@affiliation\\
+ \end{small}
+ }
+ \vspace*{5mm}
+ }{}
+ \ifthenelse{\equal{\theShowDate}{1}}{
+ \@date\\
+ \vspace*{5mm}
+ }{}
+ \end{center}
+}
+
+% abstract, keywords, JEL classification
+\newcommand{\keywords}[1]{\newcommand{\@keywords}{#1}}
+\newcommand{\jelclass}[1]{\newcommand{\@jelclass}{#1}}
+\renewenvironment{abstract}{%
+\hrule
+\section*{Abstract}
+}{%
+\ifthenelse{ \isundefined\@jelclass }{}{
+\smallskip\\ \noindent
+\textit{JEL classification:} \@jelclass
+}
+\ifthenelse{ \isundefined\@keywords }{}{
+\smallskip\\ \noindent
+\textit{Key words:} \@keywords
+}
+\bigskip
+\hrule
+\clearpage
+}
+
+% avoid clubs and widows
+\clubpenalty=10000
+\widowpenalty=10000
+% \displaywidowpenalty=10000
+
+% increase stretchability of the spaces (avoid overful hboxes)
+\setlength{\emergencystretch}{3em}
+
+% move floats to the end of the paper
+\ifthenelse{\equal{\theUseEndfloat}{1}}{
+\RequirePackage[heads,tablesfirst,nomarkers,nolists]{endfloat}
+}{}
+
+% for compatibility with erae.cls
+\newcommand{\citetPage}[2]{\citeauthor{#2} (\citeyear{#2}, p.~#1)}
+\newcommand{\citepPage}[2]{\citetext{\citealp{#2}, p.~#1}}
diff --git a/biblio/bibtex/contrib/economic/ajae-ex.bib b/biblio/bibtex/contrib/economic/ajae-ex.bib
new file mode 100644
index 0000000000..fad9c86b06
--- /dev/null
+++ b/biblio/bibtex/contrib/economic/ajae-ex.bib
@@ -0,0 +1,386 @@
+This file was created with JabRef 2.0.1.
+Encoding: ISO8859_1
+
+@BOOK{Black29,
+ title = {Agricultural Reform in the United States},
+ publisher = {McGraw Hill Book Co},
+ year = {1929},
+ author = {John Donald Black},
+ address = {New York},
+ owner = {suapm095},
+}
+
+@MISC{Blakley74,
+ author = {L. Blakley},
+ title = {Domestic Food Costs},
+ howpublished = {Paper presented at AAEA annual meeting, College Station TX, 4--8
+ August},
+ year = {1974},
+ owner = {suapm095},
+}
+
+@MANUAL{Brown65,
+ title = {Increasing World Food Output: Problems and Prospects},
+ author = {L. R. Brown},
+ organization = {U.S. Department of Agriculture},
+ address = {Washington DC},
+ month = {April},
+ year = {1965},
+ note = {ESCS For. Agr. Econ. Rep. 25},
+ owner = {Arne},
+ timestamp = {2006.08.23},
+}
+
+@MISC{Bucholz62,
+ author = {H. E. Bucholz and G. G. Judge and V. I. West},
+ title = {A Summary of Estimated Behavior Relations for Agricultural Products
+ in the United States},
+ howpublished = {Dept. Agr. Econ, AERR-57, University of Illionois},
+ year = {1962},
+ owner = {suapm095},
+}
+
+@ARTICLE{Calcott00,
+ author = {P. Calcott and M. Walls},
+ title = {Can Downstream Waste Disposal Policies Encourage Upstream 'Design
+ for Environment'?},
+ journal = {American Economic Review: Papers and Proceedings},
+ year = {2000},
+ volume = {90},
+ pages = {233-237},
+ number = {2},
+ owner = {suapm095},
+}
+
+@ARTICLE{Ezekiel29,
+ author = {M. Ezekiel},
+ title = {A Statistical Examination of the Problem of Handling Annual Surpluses
+ of Nonperishable Farm Products},
+ journal = {Journal of Farm Economics},
+ year = {1929},
+ volume = {11},
+ pages = {193-226},
+ owner = {suapm095},
+}
+
+@TECHREPORT{Fishbourne74,
+ author = {N. Fishbourne and B. Geagh},
+ title = {Food Policies and Social Supply},
+ institution = {Dept. of Agr. Econ., University of California, Davis},
+ year = {1974},
+ type = {Working paper},
+ owner = {suapm095},
+}
+
+@MANUAL{Ghana61,
+ title = {Economic Survey, 1961},
+ author = {{Ghana, Republic of, Central Bureau of Statistics}},
+ organization = {Government Printing Department},
+ address = {Accra},
+ year = {1962},
+ owner = {Arne},
+ timestamp = {2006.08.23},
+}
+
+@BOOK{Goldberger64,
+ title = {Economic Theory},
+ publisher = {John Wiley and Sons},
+ year = {1964},
+ author = {A. S. Goldberger},
+ address = {New York},
+ owner = {suapm095},
+}
+
+@BOOK{Goldberger59,
+ title = {Impact of Multiplier and Dynamic Properties of the Klein-Goldberger
+ Model},
+ publisher = {Noth-Holland Publishing},
+ year = {1959},
+ author = {A. S. Goldberger},
+ address = {Amsterdam},
+ owner = {suapm095},
+}
+
+@BOOKLET{Heady55,
+ title = {Farm Size Adjustments in {Iowa} and Cost Economies in Crop Production
+ for Farms of Different Sizes},
+ author = {E. O. Heady and D. McKee and C. B. Haver},
+ howpublished = {Iowa State University Agr. Exp. Sta. Res. Bull. No. 428},
+ month = {May},
+ year = {1955},
+ owner = {Arne},
+ timestamp = {2006.08.23},
+}
+
+@TECHREPORT{Heady55a,
+ author = {E. O. Heady and D. McKee and C. B. Haver},
+ title = {Farm Size Adjustments},
+ institution = {Iowa State University},
+ year = {1955},
+ type = {Dept. Agr. Econ Bull.},
+ number = {428},
+ month = {May},
+ owner = {Arne},
+ timestamp = {2006.08.23},
+}
+
+@ARTICLE{Horan04,
+ author = {R. D. Horan and J. S. Shortle and D. G. Abler},
+ title = {The Coordination and Design of Point-Nonpoint Trading Programs and
+ Agri-Environmental Policies},
+ journal = {Agricultural and Resource Economics Review},
+ year = {2004},
+ volume = {33},
+ pages = {61-78},
+ owner = {suapm095},
+}
+
+@ARTICLE{Horan99,
+ author = {R. D. Horan and J. S. Shortle and D. G. Abler},
+ title = {Green Payments for Nonpoint Pollution Control},
+ journal = {American Journal of Agricultural Economics},
+ year = {1999},
+ volume = {81},
+ pages = {1210-1215},
+ owner = {suapm095},
+}
+
+@MASTERSTHESIS{Kuranchie71,
+ author = {P. A. Kuranchie},
+ title = {Cost and Returns to Selected Crops in {Ghana}},
+ school = {University of Ghana},
+ year = {1971},
+ owner = {suapm095},
+}
+
+@ARTICLE{Lambert,
+ author = {P. Lambert},
+ title = {Parameters of Social Disintegration},
+ journal = {Political Science Quarterly},
+ year = {Forthcoming},
+ pages = {in press},
+ owner = {suapm095},
+}
+
+@BOOK{Masters,
+ title = {Land Grant Colleges Tody},
+ publisher = {Macmillan Co},
+ year = {Forthcoming},
+ author = {H. E. Masters},
+ volume = {1},
+ address = {New York},
+ owner = {suapm095},
+}
+
+@UNPUBLISHED{Moore60,
+ author = {P. Moore},
+ title = {Academic Development},
+ note = {University of Notre Dame},
+ year = {1960},
+ owner = {suapm095},
+}
+
+@ARTICLE{Porter04,
+ author = {M. E. Porter and M. Sakakibara},
+ title = {Competition in {Japan}},
+ journal = {Journal of Economic Perspectives},
+ year = {2004},
+ volume = {18},
+ pages = {27-50},
+ number = {1},
+ owner = {suapm095},
+}
+
+@ARTICLE{Prufer64,
+ author = {O. Prufer},
+ title = {The Hopewell Cult},
+ journal = {Scientific American},
+ year = {1964},
+ pages = {90-102},
+ month = {December},
+ owner = {suapm095},
+}
+
+@INCOLLECTION{Sjaastad71,
+ author = {L. Sjaastad},
+ title = {Occupational Structure and Migration Patterns},
+ booktitle = {Labor Mobility and Population in Agriculture},
+ publisher = {Iowa State University Press},
+ year = {1971},
+ editor = {E. O. Heady},
+ pages = {8-27},
+ address = {Ames IA},
+ owner = {suapm095},
+}
+
+@ARTICLE{Swallow,
+ author = {S. K. Swallow and M. J. Mazotta},
+ title = {Assessing Public Priorities for Experiment Station Research: Contingent
+ Value and Public Preferences for Agricultural Research},
+ journal = {American Journal of Agricultural Economics},
+ year = {Forthcoming},
+ pages = {in press},
+ owner = {suapm095},
+}
+
+@ARTICLE{Swallow04,
+ author = {S. K. Swallow and M. J. Mazotta},
+ title = {Assessing Public Priorities for Experiment Station Research: Contingent
+ Value and Public Preferences for Agricultural Research},
+ journal = {American Journal of Agricultural Economics},
+ year = {2004},
+ volume = {86},
+ pages = {in press},
+ owner = {suapm095},
+}
+
+@BOOK{Timmer75,
+ title = {The Impact of Price},
+ publisher = {Ballinger Press},
+ year = {1975},
+ editor = {George Tolley},
+ author = {C. P. Timmer},
+ address = {Chicago},
+ owner = {suapm095},
+}
+
+@MANUAL{USBB63,
+ title = {The Budget of the {United} {States} Government for the Fiscal Year
+ Ending June 30, 1964},
+ author = {{U.S. Bureau of the Budget}},
+ address = {Washington DC},
+ year = {1963},
+ owner = {Arne},
+ timestamp = {2006.08.23},
+}
+
+@MANUAL{USCong66,
+ title = {A Unified National Program for Managing Flod Losses},
+ author = {{U.S. Congress, House of Representatives, Task Force on Federal Flood
+ Control}},
+ organization = {House Document 465, 89th Cong., 2nd sess., 10~August},
+ address = {Washington DC},
+ year = {1966},
+ owner = {Arne},
+ timestamp = {2006.08.23},
+}
+
+@MANUAL{USCong64,
+ title = {Conversion to the Metric System: Hearings on S1278},
+ author = {{U.S. Congress, Senate Commission on Commerce}},
+ organization = {88th Cong., 2nd sess., 9~January 1964, p.~58},
+ address = {Washington DC},
+ year = {1966},
+ owner = {Arne},
+ timestamp = {2006.08.23},
+}
+
+@MANUAL{USDA65,
+ title = {Changes in Agriculture in 26 Developing Nations, 1948--1963},
+ author = {{U.S. Department of Agriculture}},
+ address = {Washington DC},
+ month = {November},
+ year = {1965},
+ note = {ESCS For. Agr. Econ. Rep. 27},
+ owner = {Arne},
+ timestamp = {2006.08.23},
+}
+
+@MANUAL{USDC66,
+ title = {1964 {United} {States} Census of Agriculture, Preliminary Report},
+ author = {{U.S. Department of Commerce, Bureau of the Census}},
+ address = {Washington DC},
+ month = {April},
+ year = {1966},
+ owner = {Arne},
+ timestamp = {2006.08.23},
+}
+
+@MANUAL{UNFAO62,
+ title = {Agricultural Commodities, Projections for 1970},
+ author = {{United Nations, Food and Agriculture Organization}},
+ address = {Rome},
+ year = {1962},
+ owner = {Arne},
+ timestamp = {2006.08.23},
+}
+
+@MANUAL{UN64,
+ title = {Yearbook of National Accounts Statistics, 1963},
+ author = {{United Nations}},
+ address = {New York},
+ year = {1964},
+ owner = {Arne},
+ timestamp = {2006.08.23},
+}
+
+@PHDTHESIS{Wells64,
+ author = {J. C. Wells},
+ title = {An Appraisal of Agricultural Investments in the 1962-63 Nigerian
+ Development Program},
+ school = {University of Michigan},
+ year = {1964},
+ owner = {suapm095},
+}
+
+@BOOK{Wold89,
+ title = {Demand Analysis},
+ publisher = {Macmillan Co},
+ year = {1989},
+ author = {Herman Wold and Lars Jureen},
+ address = {New York},
+ edition = {3},
+ owner = {suapm095},
+}
+
+@BOOK{Wold,
+ title = {The Viability \ldots{}~~},
+ publisher = {Some Publisher},
+ year = {3003},
+ author = {Herman Wold and J. Smith and L. Jureen},
+ address = {Nowhere},
+ owner = {suapm095},
+}
+
+@BOOK{Wold4,
+ title = {The Vitality \ldots{}~~},
+ publisher = {Some Publisher},
+ year = {3004},
+ author = {Herman Wold and J. Smith and L. Jureen and John Fourth},
+ address = {Nowhere},
+ owner = {suapm095},
+}
+
+@BOOK{Wold5,
+ title = {The Volatility \ldots{}~~},
+ publisher = {Some Publisher},
+ year = {3005},
+ author = {Herman Wold and J. Smith and L. Jureen and John Fourth and Jim Fifth},
+ address = {Nowhere},
+ owner = {suapm095},
+}
+
+@ARTICLE{Yohe95,
+ author = {G. Yohe and J. Neumann and H. Ameden},
+ title = {Assessing the Economic Cost of Greenhouse-Induced Sea Level Rise:
+ Methods and Application in Support of a National Survey},
+ journal = {Journal of Environmental Economics and Management},
+ year = {1995},
+ volume = {29},
+ pages = {S-78-S-97},
+ number = {3, Part 2},
+ owner = {suapm095},
+}
+
+@BOOK{Harris75,
+ title = {The Good Earth of America},
+ publisher = {Prentice-Hall},
+ year = {1975},
+ editor = {C. L. Harris},
+ address = {Englewood Cliffs NJ},
+ owner = {suapm095},
+}
+
+@comment{jabref-meta: selector_journal:American Journal of Agricultura
+l Economics;}
+
diff --git a/biblio/bibtex/contrib/economic/ajae-ex.pdf b/biblio/bibtex/contrib/economic/ajae-ex.pdf
new file mode 100644
index 0000000000..c8cf7b1778
--- /dev/null
+++ b/biblio/bibtex/contrib/economic/ajae-ex.pdf
Binary files differ
diff --git a/biblio/bibtex/contrib/economic/ajae-ex.tex b/biblio/bibtex/contrib/economic/ajae-ex.tex
new file mode 100644
index 0000000000..64aa7b2d76
--- /dev/null
+++ b/biblio/bibtex/contrib/economic/ajae-ex.tex
@@ -0,0 +1,145 @@
+\documentclass{ajae}
+\usepackage[T1]{fontenc}
+\usepackage[latin1]{inputenc}
+
+\usepackage{hyperref}
+\hypersetup{%
+ colorlinks = {true},
+ urlcolor = {blue},
+ linkcolor = {black},
+ citecolor = {black},
+ pdfauthor = {Arne Henningsen},
+ pdftitle = {Testing LaTeX class and BibTeX style for the
+ American Journal of Agricultural Economics (AJAE)},
+ pdfkeywords = {AJAE, BibTeX, LaTeX}
+}
+
+\usepackage{multido}
+
+\title{Testing \LaTeX{} class and Bib\TeX{} style for the
+ ``American Journal of Agricultural Economics'' (AJAE)}
+\keywords{AJAE, BibTeX, LaTeX}
+\jelclass{A1, B2, C3}
+
+\begin{document}
+
+\maketitle
+
+\begin{abstract}
+\multido{}{15}{This is an abstract. }
+\end{abstract}
+
+\multido{}{7}{Do not indent the first paragraph. }
+
+\multido{}{7}{Do not use a heading for the first section. }
+
+Type all footnotes on a separate page following the article.%
+\footnote{
+\multido{}{5}{This is a footnote that looks like an endnote. }
+}
+Place each table and figure on a separate page at the end of the paper
+(see figure~\ref{fig:dummy} and table~\ref{tab:citations}).
+
+\begin{figure}[htbp]
+\fbox{\parbox{0.6 \textwidth}{\centering
+ \vspace{0.2 \textwidth}
+ This is not a figure.
+ \vspace{0.2 \textwidth}
+}}
+\caption{Dummy figure}
+\label{fig:dummy}
+\end{figure}
+
+\begin{figure}[htbp]
+\fbox{\parbox{0.6 \textwidth}{\centering
+ \vspace{0.2 \textwidth}
+ This is not a figure, too.
+ \vspace{0.2 \textwidth}
+}}
+\caption{Figure with \multido{}{40}{very } long title}
+\label{fig:long-title}
+\end{figure}
+
+
+\section{Manuscript Formatting}
+The manuscript formatting instructions are available at
+\url{http://ajae.aem.cornell.edu/formatting.htm}.
+A detailed reference guide is available at
+\url{http://ajae.aem.cornell.edu/documents/ReferenceGuideMarch2006.pdf}.
+All references used as examples in the reference guide are shown in this document
+to demonstrate that the AJAE Bib\TeX{} style complies with these guidelines.
+Please report any problems at
+\url{http://sourceforge.net/projects/economtex/}.
+
+
+\section{Citations}
+\subsection{Citations in Text}
+\citet{Black29} says A, \citet{Wold89} say B, \citet{Wold} say C,
+\citet{Wold4} say D, \citet{Wold5} say E., \citet{Brown65} says F,
+and the \citet{USDA65} says G.
+An overview is available in table~\ref{tab:citations}.
+
+\begin{table}[htbp]
+\caption{Citations}
+\label{tab:citations}
+\begin{tabular}{lc}
+\hline
+Author(s) & Statement\\
+\hline
+\citet{Black29} & A\\
+\citet{Wold89} & B\\
+\citet{Wold} & C\\
+\citet{Wold4} & D\\
+\citet{Wold5} & E\\
+\citet{Brown65} & F\\
+\citet{USDA65} & G \\
+\hline
+\end{tabular}
+\medskip \\
+Note: Do not use vertical lines in tables.
+\end{table}
+
+
+\subsection{Citations in Parenthesis}
+A equals B \citep{Black29}, B equals C \citep{Wold89}, C equals D \citep{Wold},
+D equals E \citep{Wold4}, E equals F \citep{Wold5}, F equals G \citep{Brown65},
+and G equals A \citep{USDA65}.
+Hence, A, B, C, D, E, F, and G are all equal
+\citep{Black29, Wold89, Wold, Wold4, Wold5, Brown65, USDA65}.
+
+%%% This is just to test the compatibility functions \citetPage and \citepPage
+% \subsection{Citations with Page Numbers}
+% \citetPage{123}{Black29} says A, \citetPage{234}{Wold89} say B,
+% \citetPage{345}{Wold} say C, and \citetPage{456}{Wold4} say D.
+% A equals B \citepPage{123}{Black29}, B equals C \citepPage{234}{Wold89},
+% C equals D \citepPage{345}{Wold}, and D equals A \citepPage{456}{Wold4}.
+
+
+\section{Equations}
+All displayed equations should be left-justified
+and numbered consecutively (on the left).
+Vectors and matrices should be in bold.
+\begin{equation}
+\veclatin{ y } = a + \matlatin{ X } \veclatin{ b }
+\end{equation}
+where $a$ is a scalar,
+$\veclatin{ y }$ and $\veclatin{ b }$ are vectors,
+and $\matlatin{ X }$ is a matrix.
+Of course, the same holds for Greek symbols.
+\begin{equation}
+\vecgreek{ \theta } = \alpha + \matgreek{ \Psi } \vecgreek{ \beta }
+\end{equation}
+where $\alpha$ is a scalar,
+$\vecgreek{ \theta }$ and $\vecgreek{ \beta }$ are vectors,
+and $\matgreek{ \Psi }$ is a matrix.
+
+\clearpage
+\listofendnotes
+
+\clearpage
+\nocite{*}
+
+\bibliographystyle{ajae}
+\bibliography{ajae-ex}
+
+\end{document}
diff --git a/biblio/bibtex/contrib/economic/ajae.bst b/biblio/bibtex/contrib/economic/ajae.bst
new file mode 100644
index 0000000000..e40d50e3c7
--- /dev/null
+++ b/biblio/bibtex/contrib/economic/ajae.bst
@@ -0,0 +1,1663 @@
+%%% American Journal of Agricultural Economics (AJAE)
+%%% bibliography style for use with LaTeX2e
+%%% version: 1.0 (20 August 2006)
+%%% license: LaTeX Project Public License (see below)
+%%% This file was created with makebst (see below) and modified
+%%% by Arne Henningsen and Karsten Heymann.
+%%% Note: This is an unofficial style file that may not fully comply
+%%% with the AJAE Reference Guide in every detail.
+%%% Please report any problems at
+%%% http://sourceforge.net/projects/economtex/
+%%% Further information is available at
+%%% http://economtex.wiki.sourceforge.net/
+%%%
+%%% It is recommended to use the document class "ajae"
+%%% or to add (at least) the following lines to the LaTeX preamble:
+%%% \usepackage[authoryear]{natbib}
+%%% \bibpunct{(}{)}{;}{a}{}{,}
+%%%
+%%
+%% This is file `ajae.bst',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% merlin.mbs (with options: `ay,nat,nm-rev1,jnrlst,nmdash,keyxyr,dt-beg,yr-per,yrp-per,yrpp-xsp,note-yr,tit-qq,atit-u,thtit-a,vnum-x,pp-last,num-xser,jnm-x,add-pub,pre-pub,blk-tit,pp,ed,abr,ednx,ord,and-com')
+%% ----------------------------------------
+%% *** AJAE ***
+%%
+%% Copyright 1994-2002 Patrick W Daly
+ % ===============================================================
+ % IMPORTANT NOTICE:
+ % This bibliographic style (bst) file has been generated from one or
+ % more master bibliographic style (mbs) files, listed above.
+ %
+ % This generated file can be redistributed and/or modified under the terms
+ % of the LaTeX Project Public License Distributed from CTAN
+ % archives in directory macros/latex/base/lppl.txt; either
+ % version 1 of the License, or any later version.
+ % ===============================================================
+ % Name and version information of the main mbs file:
+ % \ProvidesFile{merlin.mbs}[2002/10/21 4.05 (PWD, AO, DPC)]
+ % For use with BibTeX version 0.99a or later
+ %-------------------------------------------------------------------
+ % This bibliography style file is intended for texts in ENGLISH
+ % This is an author-year citation style bibliography. As such, it is
+ % non-standard LaTeX, and requires a special package file to function properly.
+ % Such a package is natbib.sty by Patrick W. Daly
+ % The form of the \bibitem entries is
+ % \bibitem[Jones et al.(1990)]{key}...
+ % \bibitem[Jones et al.(1990)Jones, Baker, and Smith]{key}...
+ % The essential feature is that the label (the part in brackets) consists
+ % of the author names, as they should appear in the citation, with the year
+ % in parentheses following. There must be no space before the opening
+ % parenthesis!
+ % With natbib v5.3, a full list of authors may also follow the year.
+ % In natbib.sty, it is possible to define the type of enclosures that is
+ % really wanted (brackets or parentheses), but in either case, there must
+ % be parentheses in the label.
+ % The \cite command functions as follows:
+ % \citet{key} ==>> Jones et al. (1990)
+ % \citet*{key} ==>> Jones, Baker, and Smith (1990)
+ % \citep{key} ==>> (Jones et al., 1990)
+ % \citep*{key} ==>> (Jones, Baker, and Smith, 1990)
+ % \citep[chap. 2]{key} ==>> (Jones et al., 1990, chap. 2)
+ % \citep[e.g.][]{key} ==>> (e.g. Jones et al., 1990)
+ % \citep[e.g.][p. 32]{key} ==>> (e.g. Jones et al., p. 32)
+ % \citeauthor{key} ==>> Jones et al.
+ % \citeauthor*{key} ==>> Jones, Baker, and Smith
+ % \citeyear{key} ==>> 1990
+ %---------------------------------------------------------------------
+
+ENTRY
+ { address
+ author
+ booktitle
+ chapter
+ edition
+ editor
+ howpublished
+ institution
+ journal
+ key
+ month
+ note
+ number
+ organization
+ pages
+ publisher
+ school
+ series
+ title
+ type
+ volume
+ year
+ }
+ {}
+ { label extra.label sort.label short.list }
+INTEGERS { output.state before.all mid.sentence after.sentence after.block }
+FUNCTION {init.state.consts}
+{ #0 'before.all :=
+ #1 'mid.sentence :=
+ #2 'after.sentence :=
+ #3 'after.block :=
+}
+STRINGS { s t}
+FUNCTION {output.nonnull}
+{ 's :=
+ output.state mid.sentence =
+ { ", " * write$ }
+ { output.state after.block =
+ { add.period$ write$
+ newline$
+ "\newblock " write$
+ }
+ { output.state before.all =
+ 'write$
+ { add.period$ " " * write$ }
+ if$
+ }
+ if$
+ mid.sentence 'output.state :=
+ }
+ if$
+ s
+}
+FUNCTION {output}
+{ duplicate$ empty$
+ 'pop$
+ 'output.nonnull
+ if$
+}
+FUNCTION {output.check}
+{ 't :=
+ duplicate$ empty$
+ { pop$ "empty " t * " in " * cite$ * warning$ }
+ 'output.nonnull
+ if$
+}
+FUNCTION {fin.entry}
+{ add.period$
+ write$
+ newline$
+}
+
+FUNCTION {new.block}
+{ output.state before.all =
+ 'skip$
+ { after.block 'output.state := }
+ if$
+}
+FUNCTION {new.sentence}
+{ output.state after.block =
+ 'skip$
+ { output.state before.all =
+ 'skip$
+ { after.sentence 'output.state := }
+ if$
+ }
+ if$
+}
+FUNCTION {add.blank}
+{ " " * before.all 'output.state :=
+}
+
+FUNCTION {no.blank.or.punct}
+{ "\hspace{0pt}" * before.all 'output.state :=
+}
+
+FUNCTION {date.block}
+{
+ new.sentence
+}
+
+FUNCTION {not}
+{ { #0 }
+ { #1 }
+ if$
+}
+FUNCTION {and}
+{ 'skip$
+ { pop$ #0 }
+ if$
+}
+FUNCTION {or}
+{ { pop$ #1 }
+ 'skip$
+ if$
+}
+FUNCTION {non.stop}
+{ duplicate$
+ "}" * add.period$
+ #-1 #1 substring$ "." =
+}
+
+FUNCTION {new.block.checkb}
+{ empty$
+ swap$ empty$
+ and
+ 'skip$
+ 'new.block
+ if$
+}
+FUNCTION {field.or.null}
+{ duplicate$ empty$
+ { pop$ "" }
+ 'skip$
+ if$
+}
+FUNCTION {emphasize}
+{ duplicate$ empty$
+ { pop$ "" }
+ { "{\em " swap$ * "\/}" * }
+ if$
+}
+FUNCTION {tie.or.space.prefix}
+{ duplicate$ text.length$ #3 <
+ { "~" }
+ { " " }
+ if$
+ swap$
+}
+
+FUNCTION {capitalize}
+{ "u" change.case$ "t" change.case$ }
+
+FUNCTION {space.word}
+{ " " swap$ * " " * }
+ % Here are the language-specific definitions for explicit words.
+ % Each function has a name bbl.xxx where xxx is the English word.
+ % The language selected here is ENGLISH
+FUNCTION {bbl.and}
+{ "and"}
+
+FUNCTION {bbl.etal}
+{ "et~al." }
+
+FUNCTION {bbl.editors}
+{ "eds." }
+
+FUNCTION {bbl.editor}
+{ "ed." }
+
+FUNCTION {bbl.edby}
+{ "edited by" }
+
+FUNCTION {bbl.edition}
+{ "ed." }
+
+FUNCTION {bbl.volume}
+{ "vol." }
+
+FUNCTION {bbl.of}
+{ "of" }
+
+FUNCTION {bbl.number}
+{ "no." }
+
+FUNCTION {bbl.nr}
+{ "no." }
+
+FUNCTION {bbl.in}
+{ "in" }
+
+FUNCTION {bbl.pages}
+{ "pp." }
+
+FUNCTION {bbl.page}
+{ "p." }
+
+FUNCTION {bbl.chapter}
+{ "chap." }
+
+FUNCTION {bbl.techrep}
+{ "Working paper" }
+
+FUNCTION {bbl.mthesis}
+{ "MS thesis" }
+
+FUNCTION {bbl.phdthesis}
+{ "PhD dissertation" }
+
+FUNCTION {bbl.first}
+{ "1st" }
+
+FUNCTION {bbl.second}
+{ "2nd" }
+
+FUNCTION {bbl.third}
+{ "3rd" }
+
+FUNCTION {bbl.fourth}
+{ "4th" }
+
+FUNCTION {bbl.fifth}
+{ "5th" }
+
+FUNCTION {bbl.st}
+{ "st" }
+
+FUNCTION {bbl.nd}
+{ "nd" }
+
+FUNCTION {bbl.rd}
+{ "rd" }
+
+FUNCTION {bbl.th}
+{ "th" }
+
+MACRO {jan} {"Jan."}
+
+MACRO {feb} {"Feb."}
+
+MACRO {mar} {"Mar."}
+
+MACRO {apr} {"Apr."}
+
+MACRO {may} {"May"}
+
+MACRO {jun} {"Jun."}
+
+MACRO {jul} {"Jul."}
+
+MACRO {aug} {"Aug."}
+
+MACRO {sep} {"Sep."}
+
+MACRO {oct} {"Oct."}
+
+MACRO {nov} {"Nov."}
+
+MACRO {dec} {"Dec."}
+
+FUNCTION {eng.ord}
+{ duplicate$ "1" swap$ *
+ #-2 #1 substring$ "1" =
+ { bbl.th * }
+ { duplicate$ #-1 #1 substring$
+ duplicate$ "1" =
+ { pop$ bbl.st * }
+ { duplicate$ "2" =
+ { pop$ bbl.nd * }
+ { "3" =
+ { bbl.rd * }
+ { bbl.th * }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+}
+
+MACRO {acmcs} {"ACM Computing Surveys"}
+
+MACRO {acta} {"Acta Informatica"}
+
+MACRO {cacm} {"Communications of the ACM"}
+
+MACRO {ibmjrd} {"IBM Journal of Research and Development"}
+
+MACRO {ibmsj} {"IBM Systems Journal"}
+
+MACRO {ieeese} {"IEEE Transactions on Software Engineering"}
+
+MACRO {ieeetc} {"IEEE Transactions on Computers"}
+
+MACRO {ieeetcad}
+ {"IEEE Transactions on Computer-Aided Design of Integrated Circuits"}
+
+MACRO {ipl} {"Information Processing Letters"}
+
+MACRO {jacm} {"Journal of the ACM"}
+
+MACRO {jcss} {"Journal of Computer and System Sciences"}
+
+MACRO {scp} {"Science of Computer Programming"}
+
+MACRO {sicomp} {"SIAM Journal on Computing"}
+
+MACRO {tocs} {"ACM Transactions on Computer Systems"}
+
+MACRO {tods} {"ACM Transactions on Database Systems"}
+
+MACRO {tog} {"ACM Transactions on Graphics"}
+
+MACRO {toms} {"ACM Transactions on Mathematical Software"}
+
+MACRO {toois} {"ACM Transactions on Office Information Systems"}
+
+MACRO {toplas} {"ACM Transactions on Programming Languages and Systems"}
+
+MACRO {tcs} {"Theoretical Computer Science"}
+FUNCTION {bibinfo.check}
+{ swap$
+ duplicate$ missing$
+ {
+ pop$ pop$
+ ""
+ }
+ { duplicate$ empty$
+ {
+ swap$ pop$
+ }
+ { swap$
+ pop$
+ }
+ if$
+ }
+ if$
+}
+FUNCTION {bibinfo.warn}
+{ swap$
+ duplicate$ missing$
+ {
+ swap$ "missing " swap$ * " in " * cite$ * warning$ pop$
+ ""
+ }
+ { duplicate$ empty$
+ {
+ swap$ "empty " swap$ * " in " * cite$ * warning$
+ }
+ { swap$
+ pop$
+ }
+ if$
+ }
+ if$
+}
+STRINGS { bibinfo}
+INTEGERS { nameptr namesleft numnames }
+
+FUNCTION {format.names}
+{ 'bibinfo :=
+ duplicate$ empty$ 'skip$ {
+ 's :=
+ "" 't :=
+ #1 'nameptr :=
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ { s nameptr
+ duplicate$ #1 >
+ { "{f{.}.~}{vv~}{ll}{, jj}" }
+ { "{vv~}{ll}{, f{.}.}{, jj}" }
+ if$
+ format.name$
+ bibinfo bibinfo.check
+ 't :=
+ nameptr #1 >
+ {
+ namesleft #1 >
+ { ", " * t * }
+ {
+ "," *
+ s nameptr "{ll}" format.name$ duplicate$ "others" =
+ { 't := }
+ { pop$ }
+ if$
+ t "others" =
+ {
+ " " * bbl.etal *
+ }
+ {
+ bbl.and
+ space.word * t *
+ }
+ if$
+ }
+ if$
+ }
+ 't
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+ } if$
+}
+FUNCTION {format.names.ed}
+{
+ 'bibinfo :=
+ duplicate$ empty$ 'skip$ {
+ 's :=
+ "" 't :=
+ #1 'nameptr :=
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ { s nameptr
+ "{f.~}{vv~}{ll}{, jj}"
+ format.name$
+ bibinfo bibinfo.check
+ 't :=
+ nameptr #1 >
+ {
+ namesleft #1 >
+ { ", " * t * }
+ {
+ numnames #2 >
+ { "," * }
+ 'skip$
+ if$
+ s nameptr "{ll}" format.name$ duplicate$ "others" =
+ { 't := }
+ { pop$ }
+ if$
+ t "others" =
+ {
+
+ " " * bbl.etal *
+ }
+ {
+ bbl.and
+ space.word * t *
+ }
+ if$
+ }
+ if$
+ }
+ 't
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+ } if$
+}
+FUNCTION {format.key}
+{ empty$
+ { key field.or.null }
+ { "" }
+ if$
+}
+
+FUNCTION {format.authors}
+{ author "author" format.names
+}
+FUNCTION {get.bbl.editor}
+{ editor num.names$ #1 > 'bbl.editors 'bbl.editor if$ }
+
+FUNCTION {format.editors}
+{ editor "editor" format.names duplicate$ empty$ 'skip$
+ {
+ "," *
+ " " *
+ get.bbl.editor
+ *
+ }
+ if$
+}
+FUNCTION {format.additional.editors}
+{ editor "editor" format.names.ed duplicate$ empty$ 'skip$
+ {
+ "," *
+ " " *
+ get.bbl.editor
+ *
+ }
+ if$
+}
+FUNCTION {format.note}
+{
+ note empty$
+ { "" }
+ { note #1 #1 substring$
+ note #2 global.max$ substring$ * "note" bibinfo.check
+ }
+ if$
+}
+
+FUNCTION {format.title}
+{ title
+ "title" bibinfo.check
+ duplicate$ empty$ 'skip$
+ {
+ "\bibenquote{" swap$ *
+ add.period$ "}" *
+ }
+ if$
+}
+FUNCTION {format.full.names}
+{'s :=
+ "" 't :=
+ #1 'nameptr :=
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ { s nameptr
+ "{vv~}{ll}" format.name$
+ 't :=
+ nameptr #1 >
+ {
+ namesleft #1 >
+ { ", " * t * }
+ {
+ s nameptr "{ll}" format.name$ duplicate$ "others" =
+ { 't := }
+ { pop$ }
+ if$
+ t "others" =
+ {
+ " " * bbl.etal *
+ }
+ {
+ numnames #2 >
+ { "," * }
+ 'skip$
+ if$
+ bbl.and
+ space.word * t *
+ }
+ if$
+ }
+ if$
+ }
+ 't
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+}
+
+FUNCTION {author.editor.key.full}
+{ author empty$
+ { editor empty$
+ { key empty$
+ { cite$ #1 #3 substring$ }
+ 'key
+ if$
+ }
+ { editor format.full.names }
+ if$
+ }
+ { author format.full.names }
+ if$
+}
+
+FUNCTION {author.key.full}
+{ author empty$
+ { key empty$
+ { cite$ #1 #3 substring$ }
+ 'key
+ if$
+ }
+ { author format.full.names }
+ if$
+}
+
+FUNCTION {editor.key.full}
+{ editor empty$
+ { key empty$
+ { cite$ #1 #3 substring$ }
+ 'key
+ if$
+ }
+ { editor format.full.names }
+ if$
+}
+
+FUNCTION {make.full.names}
+{ type$ "book" =
+ type$ "inbook" =
+ or
+ 'author.editor.key.full
+ { type$ "proceedings" =
+ 'editor.key.full
+ 'author.key.full
+ if$
+ }
+ if$
+}
+
+FUNCTION {output.bibitem}
+{ newline$
+ "\bibitem[{" write$
+ label write$
+ ")" make.full.names duplicate$ short.list =
+ { pop$ }
+ { * }
+ if$
+ "}]{" * write$
+ cite$ write$
+ "}" write$
+ newline$
+ ""
+ before.all 'output.state :=
+}
+
+FUNCTION {n.dashify}
+{
+ 't :=
+ ""
+ { t empty$ not }
+ { t #1 #1 substring$ "-" =
+ { t #1 #2 substring$ "--" = not
+ { "--" *
+ t #2 global.max$ substring$ 't :=
+ }
+ { { t #1 #1 substring$ "-" = }
+ { "-" *
+ t #2 global.max$ substring$ 't :=
+ }
+ while$
+ }
+ if$
+ }
+ { t #1 #1 substring$ *
+ t #2 global.max$ substring$ 't :=
+ }
+ if$
+ }
+ while$
+}
+
+FUNCTION {word.in}
+{ bbl.in capitalize
+ " " * }
+
+FUNCTION {format.date}
+{ year "year" bibinfo.check duplicate$ empty$
+ {
+ "empty year in " cite$ * "; set to ????" * warning$
+ pop$ "????"
+ }
+ 'skip$
+ if$
+ extra.label *
+ before.all 'output.state :=
+ after.sentence 'output.state :=
+}
+FUNCTION {format.btitle}
+{ title "title" bibinfo.check
+ duplicate$ empty$ 'skip$
+ {
+ emphasize
+ }
+ if$
+}
+FUNCTION {either.or.check}
+{ empty$
+ 'pop$
+ { "can't use both " swap$ * " fields in " * cite$ * warning$ }
+ if$
+}
+FUNCTION {format.bvolume}
+{ volume empty$
+ { "" }
+ { bbl.volume volume tie.or.space.prefix
+ "volume" bibinfo.check * *
+ series "series" bibinfo.check
+ duplicate$ empty$ 'pop$
+ { swap$ bbl.of space.word * swap$
+ emphasize * }
+ if$
+ "volume and number" number either.or.check
+ }
+ if$
+}
+FUNCTION {format.number.series}
+{ volume empty$
+ { number empty$
+ { series field.or.null }
+ { series empty$
+ { number "number" bibinfo.check }
+ { output.state mid.sentence =
+ { bbl.number }
+ { bbl.number capitalize }
+ if$
+ number tie.or.space.prefix "number" bibinfo.check * *
+ bbl.in space.word *
+ series "series" bibinfo.check *
+ }
+ if$
+ }
+ if$
+ }
+ { "" }
+ if$
+}
+FUNCTION {is.num}
+{ chr.to.int$
+ duplicate$ "0" chr.to.int$ < not
+ swap$ "9" chr.to.int$ > not and
+}
+
+FUNCTION {extract.num}
+{ duplicate$ 't :=
+ "" 's :=
+ { t empty$ not }
+ { t #1 #1 substring$
+ t #2 global.max$ substring$ 't :=
+ duplicate$ is.num
+ { s swap$ * 's := }
+ { pop$ "" 't := }
+ if$
+ }
+ while$
+ s empty$
+ 'skip$
+ { pop$ s }
+ if$
+}
+
+FUNCTION {convert.edition}
+{ extract.num "l" change.case$ 's :=
+ s "first" = s "1" = or
+ { bbl.first 't := }
+ { s "second" = s "2" = or
+ { bbl.second 't := }
+ { s "third" = s "3" = or
+ { bbl.third 't := }
+ { s "fourth" = s "4" = or
+ { bbl.fourth 't := }
+ { s "fifth" = s "5" = or
+ { bbl.fifth 't := }
+ { s #1 #1 substring$ is.num
+ { s eng.ord 't := }
+ { edition 't := }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+ t
+}
+
+FUNCTION {format.edition}
+{ edition duplicate$ empty$ 'skip$
+ {
+ convert.edition
+ output.state mid.sentence =
+ { "l" }
+ { "t" }
+ if$ change.case$
+ "edition" bibinfo.check
+ " " * bbl.edition *
+ }
+ if$
+}
+INTEGERS { multiresult }
+FUNCTION {multi.page.check}
+{ 't :=
+ #0 'multiresult :=
+ { multiresult not
+ t empty$ not
+ and
+ }
+ { t #1 #1 substring$
+ duplicate$ "-" =
+ swap$ duplicate$ "," =
+ swap$ "+" =
+ or or
+ { #1 'multiresult := }
+ { t #2 global.max$ substring$ 't := }
+ if$
+ }
+ while$
+ multiresult
+}
+FUNCTION {format.pages}
+{ pages duplicate$ empty$ 'skip$
+ { duplicate$ multi.page.check
+ {
+ bbl.pages swap$
+ n.dashify
+ }
+ {
+ bbl.page swap$
+ }
+ if$
+ tie.or.space.prefix
+ "pages" bibinfo.check
+ * *
+ }
+ if$
+}
+FUNCTION {format.journal.pages}
+{ pages duplicate$ empty$ 'pop$
+ { swap$ duplicate$ empty$
+ { pop$ pop$ format.pages }
+ {
+ volume empty$
+ {
+ }
+ { ":" *
+ }
+ if$
+ swap$
+ n.dashify
+ "pages" bibinfo.check
+ *
+ }
+ if$
+ }
+ if$
+}
+FUNCTION {format.vol.num.pages}
+{ volume field.or.null
+ duplicate$ empty$ 'skip$
+ {
+ "volume" bibinfo.check
+ }
+ if$
+ journal "Journal of Economic Perspectives" =
+ journal "American Economic Review: Papers and Proceedings" = +
+ journal "Journal of Environmental Economics and Management" = +
+ { number "number" bibinfo.check duplicate$ empty$ 'skip$
+ { "(" swap$ * ")" *
+ }
+ if$ *
+ }
+ 'skip$
+ if$
+}
+
+FUNCTION {format.chapter.pages}
+{ chapter empty$
+ { "" }
+ { type empty$
+ { bbl.chapter }
+ { type "l" change.case$
+ "type" bibinfo.check
+ }
+ if$
+ chapter tie.or.space.prefix
+ "chapter" bibinfo.check
+ * *
+ }
+ if$
+}
+
+FUNCTION {format.booktitle}
+{
+ booktitle "booktitle" bibinfo.check
+ emphasize
+}
+FUNCTION {format.in.ed.booktitle}
+{ format.booktitle duplicate$ empty$ 'skip$
+ {
+ editor "editor" format.names.ed duplicate$ empty$ 'pop$
+ {
+ "," *
+ " " *
+ get.bbl.editor
+ " " *
+ * swap$
+ * }
+ if$
+ word.in swap$ *
+ }
+ if$
+}
+FUNCTION {format.thesis.type}
+{ type duplicate$ empty$
+ 'pop$
+ { swap$ pop$
+ "t" change.case$ "type" bibinfo.check
+ }
+ if$
+}
+FUNCTION {format.tr.number}
+{ number "number" bibinfo.check
+ type duplicate$ empty$
+ { pop$ bbl.techrep }
+ 'skip$
+ if$
+ "type" bibinfo.check
+ swap$ duplicate$ empty$
+ { pop$ "t" change.case$ }
+ { " No." swap$ tie.or.space.prefix * * * }
+ if$
+}
+FUNCTION {format.article.crossref}
+{
+ word.in
+ " \cite{" * crossref * "}" *
+}
+FUNCTION {format.book.crossref}
+{ volume duplicate$ empty$
+ { "empty volume in " cite$ * "'s crossref of " * crossref * warning$
+ pop$ word.in
+ }
+ { bbl.volume
+ capitalize
+ swap$ tie.or.space.prefix "volume" bibinfo.check * * bbl.of space.word *
+ }
+ if$
+ " \cite{" * crossref * "}" *
+}
+FUNCTION {format.incoll.inproc.crossref}
+{
+ word.in
+ " \cite{" * crossref * "}" *
+}
+FUNCTION {format.org.or.pub}
+{ 't :=
+ ""
+ address empty$ t empty$ and
+ 'skip$
+ {
+ address "address" bibinfo.check *
+ t empty$
+ 'skip$
+ { address empty$
+ 'skip$
+ { ": " * }
+ if$
+ t *
+ }
+ if$
+ }
+ if$
+}
+FUNCTION {format.publisher.address}
+{ publisher "publisher" bibinfo.warn format.org.or.pub
+}
+
+FUNCTION {format.organization.address}
+{ organization "organization" bibinfo.check format.org.or.pub
+}
+
+STRINGS {oldname}
+
+FUNCTION {name.or.dash}
+{ 's :=
+ oldname empty$
+ { s 'oldname := s }
+ { s oldname =
+ { "---" }
+ { s 'oldname := s }
+ if$
+ }
+ if$
+}
+
+FUNCTION {article}
+{ output.bibitem
+ format.authors "author" output.check
+ author format.key output
+ name.or.dash
+ format.date "year" output.check
+ date.block
+ format.title "title" output.check
+ new.sentence
+ crossref missing$
+ {
+ journal
+ "journal" bibinfo.check
+ emphasize
+ "journal" output.check
+ volume empty$
+ { ", " *
+ month empty$
+ 'skip$
+ { month *
+ ", " *
+ }
+ if$
+ }
+ { add.blank
+ }
+ if$
+ format.vol.num.pages output
+ }
+ { format.article.crossref output.nonnull
+ }
+ if$
+ volume empty$
+ { pages "in press" =
+ 'skip$
+ {
+ "pp. " *
+ }
+ if$
+ }
+ 'skip$
+ if$
+ format.journal.pages
+ format.note output
+ fin.entry
+}
+FUNCTION {book}
+{ output.bibitem
+ author empty$
+ { format.editors "author and editor" output.check
+ editor format.key output
+ name.or.dash
+ }
+ { format.authors output.nonnull
+ name.or.dash
+ crossref missing$
+ { "author and editor" editor either.or.check }
+ 'skip$
+ if$
+ }
+ if$
+ format.date "year" output.check
+ date.block
+ format.btitle "title" output.check
+ format.edition output
+ author empty$
+ {
+ }
+ { format.additional.editors "editor" output.check
+ }
+ if$
+ crossref missing$
+ { format.bvolume output
+ new.sentence
+ format.number.series output
+ format.publisher.address output
+ }
+ {
+ new.sentence
+ format.book.crossref output.nonnull
+ }
+ if$
+ format.note output
+ fin.entry
+}
+FUNCTION {booklet}
+{ output.bibitem
+ format.authors output
+ author format.key output
+ name.or.dash
+ format.date "year" output.check
+ date.block
+ format.title "title" output.check
+ new.sentence
+ howpublished "howpublished" bibinfo.check output
+ address "address" bibinfo.check output
+ format.note output
+ month output
+ fin.entry
+}
+
+FUNCTION {inbook}
+{ output.bibitem
+ author empty$
+ { format.editors "author and editor" output.check
+ editor format.key output
+ name.or.dash
+ }
+ { format.authors output.nonnull
+ name.or.dash
+ crossref missing$
+ { "author and editor" editor either.or.check }
+ 'skip$
+ if$
+ }
+ if$
+ format.date "year" output.check
+ date.block
+ format.btitle "title" output.check
+ crossref missing$
+ {
+ format.publisher.address output
+ format.bvolume output
+ format.chapter.pages "chapter and pages" output.check
+ new.sentence
+ format.number.series output
+ }
+ {
+ format.chapter.pages "chapter and pages" output.check
+ new.sentence
+ format.book.crossref output.nonnull
+ }
+ if$
+ format.edition output
+ format.pages "pages" output.check
+ format.note output
+ fin.entry
+}
+
+FUNCTION {incollection}
+{ output.bibitem
+ format.authors "author" output.check
+ author format.key output
+ name.or.dash
+ format.date "year" output.check
+ date.block
+ format.title "title" output.check
+ new.sentence
+ crossref missing$
+ { format.in.ed.booktitle "booktitle" output.check
+ new.sentence
+ format.publisher.address output
+ format.bvolume output
+ format.number.series output
+ format.chapter.pages output
+ format.edition output
+ }
+ { format.incoll.inproc.crossref output.nonnull
+ format.chapter.pages output
+ }
+ if$
+ format.pages "pages" output.check
+ format.note output
+ fin.entry
+}
+FUNCTION {inproceedings}
+{ output.bibitem
+ format.authors "author" output.check
+ author format.key output
+ name.or.dash
+ format.date "year" output.check
+ date.block
+ format.title "title" output.check
+ new.sentence
+ crossref missing$
+ { format.in.ed.booktitle "booktitle" output.check
+ new.sentence
+ publisher empty$
+ { format.organization.address output }
+ { organization "organization" bibinfo.check output
+ format.publisher.address output
+ }
+ if$
+ format.bvolume output
+ format.number.series output
+ }
+ { format.incoll.inproc.crossref output.nonnull
+ }
+ if$
+ format.pages "pages" output.check
+ format.note output
+ fin.entry
+}
+FUNCTION {conference} { inproceedings }
+FUNCTION {manual}
+{ output.bibitem
+ format.authors output
+ author format.key output
+ name.or.dash
+ format.date "year" output.check
+ date.block
+ format.btitle "title" output.check
+ new.sentence
+ organization empty$
+ {
+ format.edition output
+ format.note output
+ address "address" bibinfo.check output
+ }
+ {
+ address "address" bibinfo.check duplicate$ " " =
+ { skip$ }
+ { ": " * }
+ if$
+ organization "organization" bibinfo.check * output
+ format.edition output
+ format.note output
+ }
+ if$
+ month output
+ fin.entry
+}
+
+FUNCTION {mastersthesis}
+{ output.bibitem
+ format.authors "author" output.check
+ author format.key output
+ name.or.dash
+ format.date "year" output.check
+ date.block
+ format.title
+ "title" output.check
+ new.sentence
+ bbl.mthesis format.thesis.type output.nonnull
+ school "school" bibinfo.warn output
+ address "address" bibinfo.check output
+ format.note output
+ fin.entry
+}
+
+FUNCTION {misc}
+{ output.bibitem
+ format.authors output
+ author format.key output
+ name.or.dash
+ format.date "year" output.check
+ date.block
+ format.title output
+ new.sentence
+ howpublished "howpublished" bibinfo.check output
+ format.note output
+ fin.entry
+}
+FUNCTION {phdthesis}
+{ output.bibitem
+ format.authors "author" output.check
+ author format.key output
+ name.or.dash
+ format.date "year" output.check
+ date.block
+ format.title
+ "title" output.check
+ new.sentence
+ bbl.phdthesis format.thesis.type output.nonnull
+ school "school" bibinfo.warn output
+ address "address" bibinfo.check output
+ format.note output
+ fin.entry
+}
+
+FUNCTION {proceedings}
+{ output.bibitem
+ format.editors output
+ editor format.key output
+ name.or.dash
+ format.date "year" output.check
+ date.block
+ format.btitle "title" output.check
+ format.bvolume output
+ format.number.series output
+ publisher empty$
+ { format.organization.address output }
+ { organization "organization" bibinfo.check output
+ format.publisher.address output
+ }
+ if$
+ format.note output
+ fin.entry
+}
+
+FUNCTION {techreport}
+{ output.bibitem
+ format.authors "author" output.check
+ author format.key output
+ name.or.dash
+ format.date "year" output.check
+ date.block
+ format.title
+ "title" output.check
+ new.sentence
+ format.tr.number output.nonnull
+ institution "institution" bibinfo.warn output
+ address "address" bibinfo.check output
+ month output
+ fin.entry
+}
+
+FUNCTION {unpublished}
+{ output.bibitem
+ format.authors "author" output.check
+ author format.key output
+ name.or.dash
+ format.date "year" output.check
+ date.block
+ format.title "title" output.check
+ " Unpublished" *
+ format.note "note" output.check
+ fin.entry
+}
+
+FUNCTION {default.type} { misc }
+READ
+FUNCTION {sortify}
+{ purify$
+ "l" change.case$
+}
+INTEGERS { len }
+FUNCTION {chop.word}
+{ 's :=
+ 'len :=
+ s #1 len substring$ =
+ { s len #1 + global.max$ substring$ }
+ 's
+ if$
+}
+FUNCTION {format.lab.names}
+{ 's := % s := Namensliste
+ "" 't := % t := ""
+ s #1 "{vv~}{ll}" format.name$ % formatiere 1. Namen
+ s num.names$ duplicate$ % bestimme # Namen
+ #3 > % mehr als 3 Namen?
+ { pop$
+ " " * bbl.etal * % dann: Ausgabe von et.al
+ }
+ { duplicate$ #3 = % sonst: 3 Namen?
+ { pop$
+ ", " *
+ s #2 "{vv~}{ll}" format.name$ * % gib 2. Namen aus
+
+ s #3 "{ff }{vv }{ll}{ jj}" format.name$ "others" = % Wenn Name#3 = "others"
+ { " " * bbl.etal * % dann et.al.
+ }
+ { ", " * bbl.and * " " * s #3 "{vv~}{ll}" format.name$ % sonst "and Autor#3"
+ * }
+ if$
+ }
+ { #2 < % sonst: Wenn weniger als 2 Namen
+ 'skip$ % dann nix, sonst:
+ { s #2 "{ff }{vv }{ll}{ jj}" format.name$ "others" = % Wenn Name#2 = "others"
+ {
+ " " * bbl.etal * % dann et.al.
+ }
+ { bbl.and space.word * s #2 "{vv~}{ll}" format.name$ % sonst "and Autor#2"
+ * }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+}
+
+FUNCTION {author.key.label}
+{ author empty$
+ { key empty$
+ { cite$ #1 #3 substring$ }
+ 'key
+ if$
+ }
+ { author format.lab.names }
+ if$
+}
+
+FUNCTION {author.editor.key.label}
+{ author empty$
+ { editor empty$
+ { key empty$
+ { cite$ #1 #3 substring$ }
+ 'key
+ if$
+ }
+ { editor format.lab.names }
+ if$
+ }
+ { author format.lab.names }
+ if$
+}
+
+FUNCTION {editor.key.label}
+{ editor empty$
+ { key empty$
+ { cite$ #1 #3 substring$ }
+ 'key
+ if$
+ }
+ { editor format.lab.names }
+ if$
+}
+
+FUNCTION {calc.short.authors}
+{ type$ "book" =
+ type$ "inbook" =
+ or
+ 'author.editor.key.label
+ { type$ "proceedings" =
+ 'editor.key.label
+ 'author.key.label
+ if$
+ }
+ if$
+ 'short.list :=
+}
+
+FUNCTION {calc.label}
+{ calc.short.authors
+ short.list
+ "("
+ *
+ year duplicate$ empty$
+ short.list key field.or.null = or
+ { pop$ "" }
+ 'skip$
+ if$
+ *
+ 'label :=
+}
+
+FUNCTION {sort.format.names}
+{ 's :=
+ #1 'nameptr :=
+ ""
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ { s nameptr
+ "{vv{ } }{ll{ }}{ f{ }}{ jj{ }}"
+ format.name$ 't :=
+ nameptr #1 >
+ {
+ " " *
+ namesleft #1 = t "others" = and
+ { "zzzzz" * }
+ { t sortify * }
+ if$
+ }
+ { t sortify * }
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+}
+
+FUNCTION {sort.format.title}
+{ 't :=
+ "A " #2
+ "An " #3
+ "The " #4 t chop.word
+ chop.word
+ chop.word
+ sortify
+ #1 global.max$ substring$
+}
+FUNCTION {author.sort}
+{ author empty$
+ { key empty$
+ { "to sort, need author or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { author sort.format.names }
+ if$
+}
+FUNCTION {author.editor.sort}
+{ author empty$
+ { editor empty$
+ { key empty$
+ { "to sort, need author, editor, or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { editor sort.format.names }
+ if$
+ }
+ { author sort.format.names }
+ if$
+}
+FUNCTION {editor.sort}
+{ editor empty$
+ { key empty$
+ { "to sort, need editor or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { editor sort.format.names }
+ if$
+}
+FUNCTION {presort}
+{ calc.label
+ label sortify
+ " "
+ *
+ type$ "book" =
+ type$ "inbook" =
+ or
+ 'author.editor.sort
+ { type$ "proceedings" =
+ 'editor.sort
+ 'author.sort
+ if$
+ }
+ if$
+ #1 entry.max$ substring$
+ 'sort.label :=
+ sort.label
+ *
+ " "
+ *
+ title field.or.null
+ sort.format.title
+ *
+ #1 entry.max$ substring$
+ 'sort.key$ :=
+}
+
+ITERATE {presort}
+SORT
+STRINGS { last.label next.extra }
+INTEGERS { last.extra.num number.label }
+FUNCTION {initialize.extra.label.stuff}
+{ #0 int.to.chr$ 'last.label :=
+ "" 'next.extra :=
+ #0 'last.extra.num :=
+ #0 'number.label :=
+}
+FUNCTION {forward.pass}
+{ last.label label =
+ { last.extra.num #1 + 'last.extra.num :=
+ last.extra.num int.to.chr$ 'extra.label :=
+ }
+ { "a" chr.to.int$ 'last.extra.num :=
+ "" 'extra.label :=
+ label 'last.label :=
+ }
+ if$
+ number.label #1 + 'number.label :=
+}
+FUNCTION {reverse.pass}
+{ next.extra "b" =
+ { "a" 'extra.label := }
+ 'skip$
+ if$
+ extra.label 'next.extra :=
+ extra.label
+ duplicate$ empty$
+ 'skip$
+ { "{\natexlab{" swap$ * "}}" * }
+ if$
+ 'extra.label :=
+ label extra.label * 'label :=
+}
+EXECUTE {initialize.extra.label.stuff}
+ITERATE {forward.pass}
+REVERSE {reverse.pass}
+FUNCTION {bib.sort.order}
+{ sort.label
+ " "
+ *
+ title field.or.null
+ sort.format.title
+ *
+ " "
+ *
+ year field.or.null sortify
+ *
+ #1 entry.max$ substring$
+ 'sort.key$ :=
+}
+ITERATE {bib.sort.order}
+SORT
+FUNCTION {begin.bib}
+{ preamble$ empty$
+ 'skip$
+ { preamble$ write$ newline$ }
+ if$
+ "\begin{thebibliography}{" number.label int.to.str$ * "}" *
+ write$ newline$
+ "\newcommand{\bibenquote}[1]{``#1''}"
+ write$ newline$
+ "\expandafter\ifx\csname natexlab\endcsname\relax\def\natexlab#1{#1}\fi"
+ write$ newline$
+}
+EXECUTE {begin.bib}
+EXECUTE {init.state.consts}
+ITERATE {call.type$}
+FUNCTION {end.bib}
+{ newline$
+ "\end{thebibliography}" write$ newline$
+}
+EXECUTE {end.bib}
+%% End of customized bst file
+%%
+%% End of file `ajae.bst'.
diff --git a/biblio/bibtex/contrib/economic/ajae.cls b/biblio/bibtex/contrib/economic/ajae.cls
new file mode 100644
index 0000000000..ec82528a2d
--- /dev/null
+++ b/biblio/bibtex/contrib/economic/ajae.cls
@@ -0,0 +1,308 @@
+%%% LaTeX class for manuscripts submitted to the
+%%% American Journal of Agricultural Economics (AJAE)
+%%%
+%%% author: Arne Henningsen
+%%% version: 1.7 (18 November 2009)
+%%% license: LaTeX Project Public License
+%%%
+%%% Note: This is an unofficial style file that may not fully comply
+%%% with the AJAE Formatting Instructions in every detail.
+%%% Please report any problems at
+%%% http://sourceforge.net/projects/economtex/
+%%% Further information is available at
+%%% http://economtex.wiki.sourceforge.net/
+%%%
+%%% This document class is based on the "scrartcl" class
+%%% from the KOMA script bundle.
+%%% Following additional packages are required:
+%%% amsmath, babel, bm, courier, endfloat, endnotes, geometry,
+%%% helvet, mathptmx, natbib, setspace, titlesec, url
+%%%
+%%% The class provides following options:
+%%% noendnotes - don't use endnotes (use footnotes)
+%%% noendfloat - don't move floats to the end of the paper
+%%% author - show name(s) of authors(s)
+%%% date - show date
+%%% preprint - print the 'preprint notice'
+%%% published - print a notice that the paper has been published
+%%%
+%%%
+%%% The corresponding BibTeX style file "ajae.bst" should be used
+%%% for the bibliography: \bibliographystyle{ajae}
+%%%
+%%% This document class provides following new commands:
+%%% \keywords can be use to show keywors below the abstract
+%%% \jelclass can be use to show JEL classifications below the abstract
+%%% \leadingfootnote can be used to add a leading unnumbered footnote
+%%% \affiliation can be used to add affiliation information
+%%% \veclatin should be used for latin symbols that denote vectors
+%%% \matlatin should be used for latin symbols that denote matrices
+%%% \vecgreek should be used for greek symbols that denote vectors
+%%% \matgreek should be used for greek symbols that denote matrices
+%%% \ajaeyear, \ajaeissue, \ajaenumber, and \ajaepages should be used
+%%% after the publication to specify the year, issue, number,
+%%% and pages, respectively.
+%%%
+%%% If you use footnotes, add following lines before the reference section:
+%%% \clearpage
+%%% \listofendnotes
+
+
+\NeedsTeXFormat{LaTeX2e}
+\ProvidesClass{ajae}[2009/11/18 LaTeX class for the American Journal of Agricultural Economics]
+
+\RequirePackage{ifthen}
+
+% option to use footnotes in place of endnotes
+\newif\if@UseEndnotes
+\@UseEndnotestrue
+\DeclareOption{noendnotes}{\@UseEndnotesfalse}
+
+% option to NOT place floats at the end
+\newif\if@UseEndfloat
+\@UseEndfloattrue
+\DeclareOption{noendfloat}{\@UseEndfloatfalse}
+
+% option to show the authors' names
+\newif\if@ShowAuthor
+\@ShowAuthorfalse
+\DeclareOption{author}{\@ShowAuthortrue}
+
+% option to print the date
+\newif\if@ShowDate
+\@ShowDatefalse
+\DeclareOption{date}{\@ShowDatetrue}
+
+% option to print the 'preprint notice'
+\newif\if@ShowPreprintNote
+\@ShowPreprintNotefalse
+\DeclareOption{preprint}{\@ShowPreprintNotetrue}
+
+% option to print the 'published notice'
+\newif\if@ShowPublishedNote
+\@ShowPublishedNotefalse
+\DeclareOption{published}{\@ShowPublishedNotetrue}
+
+% pass any options on to the scrartcl class and load this class with some options
+\DeclareOption*{\PassOptionsToClass{\CurrentOption}{scrartcl}}
+\ProcessOptions\relax
+\LoadClass[12pt,english,tablecaptionabove]{scrartcl}
+% tablecaptionabove = use \captionabove for tables
+
+% page format, margins
+\RequirePackage{geometry}
+\geometry{letterpaper, tmargin=1.0in, bmargin=1.1in, lmargin=1.25in,
+ rmargin=1.25in, headheight=0in, headsep=0in, footskip=0.5in }
+
+% double spacing
+\RequirePackage{setspace}
+\doublespacing
+
+% spacing around (sub)section headers
+\RequirePackage{titlesec}
+\titlespacing*{\section}{0pt}{1em}{0.25em}
+\titlespacing*{\subsection}{0pt}{0.85em}{0.15em}
+
+% spacing around formulas
+\AtBeginDocument{
+\setlength{\abovedisplayshortskip}{6pt}
+\setlength{\belowdisplayshortskip}{6pt}
+\setlength{\abovedisplayskip}{6pt}
+\setlength{\belowdisplayskip}{6pt}
+\allowdisplaybreaks
+}
+
+% spacing around captions and floats
+\setlength{\abovecaptionskip}{6pt}
+\setlength{\belowcaptionskip}{3pt}
+\setlength{\floatsep}{0pt}
+\setlength{\textfloatsep}{20pt}
+\setlength{\intextsep}{5pt}
+
+% font families: times/helvetica/courier
+\RequirePackage{mathptmx}
+\RequirePackage[scaled=.90]{helvet}
+\RequirePackage{courier}
+
+% font for section headers
+\setkomafont{section}{\normalfont\bfseries}
+
+% font for subsection headers
+\setkomafont{subsection}{\normalfont\itshape}
+
+% fonts for math
+\RequirePackage[leqno,fleqn]{amsmath}
+\RequirePackage{bm}
+% latin symbols for vectors and matrices
+\newcommand{\veclatin}[1]{\bm{#1}}
+\newcommand{\matlatin}[1]{\bm{#1}}
+% greek symbols for vectors and matrices
+\newcommand{\vecgreek}[1]{\pmb{#1}}
+\newcommand{\matgreek}[1]{\pmb{#1}}
+
+% font for URLs
+\RequirePackage{url}
+\def\UrlFont{\rmfamily}
+
+% citations and bibliography
+\RequirePackage[authoryear]{natbib}
+\bibpunct{(}{)}{;}{a}{}{,}
+\setlength{\bibsep}{0pt}
+
+% captions of figures and tables
+\setcapwidth[l]{\textwidth}
+\setcapindent{0pt}
+\setkomafont{captionlabel}{\normalfont\bfseries}
+\setkomafont{caption}{\normalfont\bfseries}
+\renewcommand{\captionformat}{.\ }
+
+% section and subsections are not numbered
+\setcounter{secnumdepth}{0}
+
+% leading unnumbered footnote
+\long\def\leadingfootnote#1{\begingroup%
+ \def\thefootnote{\fnsymbol{footnote}}\footnote[0]{#1}\endgroup}
+
+% titlepage without author and date
+\newcommand{\affiliation}[1]{\newcommand{\@affiliation}{#1}}
+\newcommand{\ajaeissue}[1]{\newcommand{\@ajaeissue}{#1}}
+\newcommand{\ajaenumber}[1]{\newcommand{\@ajaenumber}{#1}}
+\newcommand{\ajaeyear}[1]{\newcommand{\@ajaeyear}{#1}}
+\newcommand{\ajaepages}[1]{\newcommand{\@ajaepages}{#1}}
+\renewcommand{\maketitle}{
+ \begin{center}
+ \begin{LARGE}
+ \begin{spacing}{1.25}
+ \textbf{\@title}
+ \end{spacing}
+ \end{LARGE}
+ \vspace*{10mm}
+ \if@ShowAuthor
+ \begin{large}
+ \textbf{\@author}\\
+ \end{large}
+ \ifthenelse{ \isundefined\@affiliation }{}{
+ \vspace*{3mm}
+ \begin{small}
+ \@affiliation\\
+ \end{small}
+ }
+ \vspace*{5mm}
+ \fi
+ \if@ShowDate
+ \@date\\
+ \vspace*{5mm}
+ \fi
+ \if@ShowPreprintNote
+ \begin{small}
+ This is a preprint of an Article accepted for publication in
+ \textit{American Journal of Agricultural Economics}.
+ \copyright{} \the\year ,
+ American Agricultural Economics Association
+ \end{small}
+ \vspace*{5mm}
+ \fi
+ \if@ShowPublishedNote
+ \begin{small}
+ This is an electronic version of an Article published in\\
+ \textit{American Journal of Agricultural Economics}%
+ \ifthenelse{ \isundefined\@ajaeissue }{%
+ \ClassWarningNoLine{ajae}{No issue of the AJAE publication specified.
+ Please use the command \protect\ajaeissue}%
+ }{, \@ajaeissue{}}%
+ \ifthenelse{ \isundefined\@ajaenumber }{%
+ \ClassWarningNoLine{ajae}{No number of the AJAE publication specified.
+ Please use the command \protect\ajaenumber}%
+ }{(\@ajaenumber{})}%
+ \ifthenelse{ \isundefined\@ajaepages }{%
+ \ClassWarningNoLine{ajae}{No pages of the AJAE publication specified.
+ Please use the command \protect\ajaepages}%
+ }{, p.~\@ajaepages{}}.\\
+ \copyright{}%
+ \ifthenelse{ \isundefined\@ajaeyear }{%
+ \ClassWarningNoLine{ajae}{No year of the AJAE publication specified.
+ Please use the command \protect\ajaeyear}%
+ }{\@ajaeyear{}}
+ American Agricultural Economics Association.\\
+ The final version is available on
+ \url{http://www.blackwell-synergy.com/loi/AJAE}
+ \end{small}
+ \vspace*{5mm}
+ \fi
+ \end{center}
+}
+
+% abstract, keywords, JEL classification
+\newcommand{\keywords}[1]{\newcommand{\@keywords}{#1}}
+\newcommand{\jelclass}[1]{\newcommand{\@jelclass}{#1}}
+\renewenvironment{abstract}{%
+\begin{center}
+\begin{minipage}{0.9 \textwidth}
+\small
+\begin{center}
+\textbf{Abstract}
+\end{center}
+}{%
+\ifthenelse{ \isundefined\@keywords }{
+\ClassWarningNoLine{ajae}{No keywords specified.
+ Please use the command \protect\keywords}
+}{
+\smallskip\\ \noindent
+Key words: \@keywords
+}
+\ifthenelse{ \isundefined\@jelclass }{
+\ClassWarningNoLine{ajae}{No JEL classification specified.
+ Please use the command \protect\jelclass}
+}{
+\smallskip\\ \noindent
+JEL classification: \@jelclass
+}
+\end{minipage}
+\end{center}
+\vspace{\baselineskip}
+\@aftermylist
+}
+% command "\@aftermylist": do not indent the following paragraph
+\def\@aftermylist{%
+ \def\if@endpe\@doendpe\fi{\@endpetrue
+ \def\par{\if@endpe\@@par\else\@restorepar\everypar{}\par\@endpefalse\fi}%
+ \everypar{{\setbox\z@\lastbox}\everypar{}\@endpefalse}%
+ }%
+}
+% This code was originally posted by Donald Arseneau on comp.text.tex
+% I thank Ulrike Fischer for pointing this out to me.
+
+
+% use babel package and set language to english
+\RequirePackage[english]{babel}
+
+% avoid clubs and widows
+\clubpenalty=10000
+\widowpenalty=10000
+% \displaywidowpenalty=10000
+
+% increase stretchability of the spaces (avoid overful hboxes)
+\setlength{\emergencystretch}{3em}
+
+% use endnotes in place of footnotes
+\if@UseEndnotes
+\RequirePackage{endnotes}
+\let\footnote=\endnote
+\newcommand{\listofendnotes}{
+ \begingroup
+ \parindent 0pt
+ \parskip 2ex
+ \def\enotesize{\normalsize}
+ \theendnotes
+ \endgroup
+}
+\fi
+
+% move floats to the end of the paper
+\if@UseEndfloat
+\RequirePackage[tabhead,fighead,nomarkers,nolists]{endfloat}
+\fi
+
+% for compatibility with erae.cls
+\newcommand{\citetPage}[2]{\citeauthor{#2} (\citeyear{#2}, p.~#1)}
+\newcommand{\citepPage}[2]{\citetext{\citealp{#2}, p.~#1}}
diff --git a/biblio/bibtex/contrib/economic/apecon-ex.bib b/biblio/bibtex/contrib/economic/apecon-ex.bib
new file mode 100644
index 0000000000..3d1c989a1c
--- /dev/null
+++ b/biblio/bibtex/contrib/economic/apecon-ex.bib
@@ -0,0 +1,77 @@
+% This file was created with JabRef 2.5.
+% Encoding: UTF8
+
+@ARTICLE{brigham65,
+ author = {Brigham, Eugene F.},
+ title = {The Determinants of Residential Land Values},
+ journal = {Land Economics},
+ year = {1965},
+ volume = {41},
+ pages = {325-334},
+ url = {http://www.jstor.org/pss/3144665}
+}
+
+@ARTICLE{brown05,
+ author = {Steven P. Brown and Eli Jones},
+ title = {Introduction to the Special Issue: Advancing the Field of Selling
+ and Sales Management},
+ journal = {Journal of Personal Selling and Sales Management},
+ year = {2005},
+ volume = {25},
+ pages = {103-104},
+ number = {2}
+}
+
+@INCOLLECTION{phelpsbrown81,
+ author = {{Phelps Brown}, Henry},
+ title = {Labour Market Policy},
+ booktitle = {Changing Perceptions of Economic Policy},
+ publisher = {Methuen},
+ year = {1981},
+ editor = {Frances Cairncross},
+ pages = {68-113},
+ address = {London}
+}
+
+@ARTICLE{smith72a,
+ author = {Charles H. Smith and Roy A. Lanier and Martin E. Taylor},
+ title = {The Need for and Scope of the Audit of Management: A Survey of Attitudes},
+ journal = {Accounting Review},
+ year = {1972},
+ volume = {47},
+ pages = {270-283},
+ number = {2},
+ url = {http://www.jstor.org/stable/244750}
+}
+
+@ARTICLE{smith72b,
+ author = {Kenneth R. Smith and Marianne Miller and Fredrick L. Golladay},
+ title = {An Analysis of the Optimal Use of Inputs in the Production of Medical
+ Services},
+ journal = {Journal of Human Resources},
+ year = {1972},
+ volume = {7},
+ pages = {208-225},
+ number = {2},
+ url = {http://www.jstor.org/stable/145184}
+}
+
+@ARTICLE{smith72,
+ author = {Vernon L. Smith},
+ title = {A Theory and Test of Credit Rationing: Some Generalizations},
+ journal = {American Economic Review},
+ year = {1972},
+ volume = {62},
+ pages = {477-483},
+ number = {3},
+ url = {http://www.jstor.org/stable/1803400}
+}
+
+@comment{jabref-meta: selector_publisher:}
+
+@comment{jabref-meta: selector_author:}
+
+@comment{jabref-meta: selector_journal:}
+
+@comment{jabref-meta: selector_keywords:}
+
diff --git a/biblio/bibtex/contrib/economic/apecon-ex.pdf b/biblio/bibtex/contrib/economic/apecon-ex.pdf
new file mode 100644
index 0000000000..54aa1970e4
--- /dev/null
+++ b/biblio/bibtex/contrib/economic/apecon-ex.pdf
Binary files differ
diff --git a/biblio/bibtex/contrib/economic/apecon-ex.tex b/biblio/bibtex/contrib/economic/apecon-ex.tex
new file mode 100644
index 0000000000..cc5c4f6b95
--- /dev/null
+++ b/biblio/bibtex/contrib/economic/apecon-ex.tex
@@ -0,0 +1,161 @@
+\documentclass{apecon}
+\usepackage[T1]{fontenc}
+\usepackage[latin1]{inputenc}
+\usepackage{csquotes}
+\MakeInnerQuote{"}
+
+\usepackage{textcomp}
+\usepackage{multido}
+
+\usepackage{hyperref}
+\hypersetup{%
+ colorlinks = {true},
+ urlcolor = {blue},
+ linkcolor = {black},
+ citecolor = {black},
+ pdfauthor = {Arne Henningsen},
+ pdftitle = {Testing LaTeX class and BibTeX style for the
+ journal Applied Economics (ApEcon)},
+ pdfkeywords = {Applied Economics, BibTeX, LaTeX}
+}
+
+\usepackage{multido}
+
+\title{Testing \LaTeX{} class and Bib\TeX{} style for the
+ journal `Applied Economics' (ApEcon)}
+
+\author{Arne Henningsen$^1$ and His Coauthor$^2$}
+
+% affiliation(s) and full address(es) of the author(s)
+\affiliation{%
+$^1$Institute of Food and Resource Economics,
+University of Copenhagen,
+Rolighedsvej~25, 1958~Frederiksberg~C, Denmark\\
+$^2$\LaTeX{} University, Nostreet~123,
+00000~Nowhere City, Noland}
+
+% running title
+\rtitle{\LaTeX{} class and Bib\TeX{} style for `Applied Economics'}
+
+% corresponding author including full address
+\cauthor{Arne Henningsen, Institute of Food and Resource Economics,
+Rolighedsvej~25, 1958~Frederiksberg~C, Denmark}
+
+
+\begin{document}
+
+\maketitle
+
+\begin{abstract}
+\multido{}{15}{This is an abstract. }
+\end{abstract}
+
+\section{Introduction}
+\multido{}{7}{This is an introduction. }
+
+Footnotes should appear at the end of the page in which they are inserted.%
+\footnote{
+\multido{}{10}{This is a footnote. }
+}
+"Single quotation marks" can be conveniently inserted using
+the "csquotes" package:
+add the lines\\
+\verb!\usepackage{csquotes}!\\
+\verb!\MakeInnerQuote{"}!\\
+to the preamble of your \LaTeX{} file and use the inch symbol~(\verb!"!)
+for quotation marks.%
+\footnote{%
+Of course, you can also define another symbol in the command
+\texttt{\textbackslash{}MakeInnerQuote},
+e.g.\ the degree sign~($^{\circ}$).
+}
+Collect tables and figures at the end of the manuscript
+(see figure~\ref{fig:dummy} and table~\ref{tab:citations}).
+
+\begin{figure}[htbp]
+\fbox{\parbox{0.6 \textwidth}{\centering
+ \vspace{0.2 \textwidth}
+ This is not a figure.
+ \vspace{0.2 \textwidth}
+}}
+\caption{Dummy figure}
+\label{fig:dummy}
+\end{figure}
+
+\begin{figure}[htbp]
+\fbox{\parbox{0.6 \textwidth}{\centering
+ \vspace{0.2 \textwidth}
+ This is not a figure, too.
+ \vspace{0.2 \textwidth}
+}}
+\caption{Figure with \multido{}{40}{very } long title}
+\label{fig:long-title}
+\end{figure}
+
+\section{Manuscript Formatting}
+Instructions to authors including formatting guidelines are available at
+\url{http://www.tandf.co.uk/journals/journal.asp?issn=0003-6846&linktype=44}.
+All references used as examples in these guidelines are shown in this document
+to demonstrate that the Bib\TeX{} style of "Applied Economics" complies
+with these guidelines.
+Please report any problems at
+\url{http://sourceforge.net/projects/economtex/}.
+
+
+\section{Citations}
+\subsection{Citations in Text}
+\citet{smith72} says A, \citet{brown05} say B,
+\citet{smith72a} say C, and \citet{smith72b} say D.
+An overview is available in table~\ref{tab:citations}.
+
+\begin{table}[htbp]
+\caption{Citations}
+\label{tab:citations}
+\begin{tabular}{lc}
+\hline
+Author(s) & Statement\\
+\hline
+\citet{smith72} & A\\
+\citet{brown05} & B\\
+\citet{smith72a} & C\\
+\citet{smith72b} & D\\
+\hline
+\end{tabular}
+\end{table}
+
+
+\subsection{Citations in Parenthesis}
+A equals B \citep{smith72}, B equals C \citep{brown05},
+C equals D \citep{smith72a}, and D equals A \citep{smith72b}.
+Hence, A, B, C, and D are all equal
+\citep{smith72, brown05, smith72a, smith72b}.
+
+\subsection{Citations with Page Numbers}
+\citet[p.~123]{smith72} says A, \citet[p.~234]{brown05} say B,
+\citet[p.~345]{smith72a} say C, and \citet[p.~456]{smith72b} say D.
+A equals B \citep[p.~123]{smith72}, B equals C \citep[p.~234]{brown05},
+C equals D \citep[p.~345]{smith72a}, and D equals A \citep[p.~456]{smith72b}.
+
+
+\section{Equations}
+There are no instructions regarding equations.
+\begin{equation}
+y = a + X b
+\end{equation}
+where $a$ is a scalar,
+$y$ and $b$ are vectors,
+and $X$ is a matrix.
+Of course, you can also use Greek symbols.
+\begin{equation}
+\theta = \alpha + \Psi \beta
+\end{equation}
+where $\alpha$ is a scalar,
+$\theta$ and $\beta$ are vectors,
+and $\Psi$ is a matrix.
+
+\clearpage
+\nocite{*}
+
+\bibliography{apecon-ex}
+
+\end{document}
diff --git a/biblio/bibtex/contrib/economic/apecon.bst b/biblio/bibtex/contrib/economic/apecon.bst
new file mode 100644
index 0000000000..cb77f3663c
--- /dev/null
+++ b/biblio/bibtex/contrib/economic/apecon.bst
@@ -0,0 +1,1446 @@
+%%% journal "Applied Economics" (apecon)
+%%% bibliography style for use with LaTeX2e
+%%% version: 1.0 (14 April 2008)
+%%% license: LaTeX Project Public License (see below)
+%%% This file was created with makebst (see below) and modified
+%%% by Arne Henningsen.
+%%% Note: This is an unofficial style file that may not fully comply
+%%% with the reference guidelines of "Applied Economics" in every detail.
+%%% Please report any problems at
+%%% http://sourceforge.net/projects/economtex/
+%%% Further information is available at
+%%% http://economtex.wiki.sourceforge.net/
+%%%
+%%% This BibTeX style should be used with the corresponding
+%%% LaTeX class "apecon" (apecon.cls).
+%%% Otherwise, the following line has to be added to the LaTeX preamble:
+%%% \usepackage[authoryear]{natbib}
+%%%
+%%
+%% This is file `apecon.bst',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% merlin.mbs (with options: `ay,nat,nm-rev,jnrlst,keyxyr,dt-beg,yr-par,yrp-x,note-yr,vol-bf,vnum-x,volp-com,num-xser,pre-pub,edpar,bkedcap,edby,edbyw,edcap,blk-com,pp,ed,abr,xedn,and-xcom,etal-it,em-it,nfss,')
+%% ----------------------------------------
+%% *** BibTeX style for the journal 'Applied Economics' ***
+%%
+%% Copyright 1994-2004 Patrick W Daly
+ % ===============================================================
+ % IMPORTANT NOTICE:
+ % This bibliographic style (bst) file has been generated from one or
+ % more master bibliographic style (mbs) files, listed above.
+ %
+ % This generated file can be redistributed and/or modified under the terms
+ % of the LaTeX Project Public License Distributed from CTAN
+ % archives in directory macros/latex/base/lppl.txt; either
+ % version 1 of the License, or any later version.
+ % ===============================================================
+ % Name and version information of the main mbs file:
+ % \ProvidesFile{merlin.mbs}[2004/02/09 4.13 (PWD, AO, DPC)]
+ % For use with BibTeX version 0.99a or later
+ %-------------------------------------------------------------------
+ % This bibliography style file is intended for texts in ENGLISH
+ % This is an author-year citation style bibliography. As such, it is
+ % non-standard LaTeX, and requires a special package file to function properly.
+ % Such a package is natbib.sty by Patrick W. Daly
+ % The form of the \bibitem entries is
+ % \bibitem[Jones et al.(1990)]{key}...
+ % \bibitem[Jones et al.(1990)Jones, Baker, and Smith]{key}...
+ % The essential feature is that the label (the part in brackets) consists
+ % of the author names, as they should appear in the citation, with the year
+ % in parentheses following. There must be no space before the opening
+ % parenthesis!
+ % With natbib v5.3, a full list of authors may also follow the year.
+ % In natbib.sty, it is possible to define the type of enclosures that is
+ % really wanted (brackets or parentheses), but in either case, there must
+ % be parentheses in the label.
+ % The \cite command functions as follows:
+ % \citet{key} ==>> Jones et al. (1990)
+ % \citet*{key} ==>> Jones, Baker, and Smith (1990)
+ % \citep{key} ==>> (Jones et al., 1990)
+ % \citep*{key} ==>> (Jones, Baker, and Smith, 1990)
+ % \citep[chap. 2]{key} ==>> (Jones et al., 1990, chap. 2)
+ % \citep[e.g.][]{key} ==>> (e.g. Jones et al., 1990)
+ % \citep[e.g.][p. 32]{key} ==>> (e.g. Jones et al., p. 32)
+ % \citeauthor{key} ==>> Jones et al.
+ % \citeauthor*{key} ==>> Jones, Baker, and Smith
+ % \citeyear{key} ==>> 1990
+ %---------------------------------------------------------------------
+
+ENTRY
+ { address
+ author
+ booktitle
+ chapter
+ edition
+ editor
+ eid
+ howpublished
+ institution
+ journal
+ key
+ month
+ note
+ number
+ organization
+ pages
+ publisher
+ school
+ series
+ title
+ type
+ volume
+ year
+ }
+ {}
+ { label extra.label sort.label short.list }
+INTEGERS { output.state before.all mid.sentence after.sentence after.block }
+FUNCTION {init.state.consts}
+{ #0 'before.all :=
+ #1 'mid.sentence :=
+ #2 'after.sentence :=
+ #3 'after.block :=
+}
+STRINGS { s t}
+FUNCTION {output.nonnull}
+{ 's :=
+ output.state mid.sentence =
+ { ", " * write$ }
+ { output.state after.block =
+ { add.period$ write$
+ newline$
+ "\newblock " write$
+ }
+ { output.state before.all =
+ 'write$
+ { add.period$ " " * write$ }
+ if$
+ }
+ if$
+ mid.sentence 'output.state :=
+ }
+ if$
+ s
+}
+FUNCTION {output}
+{ duplicate$ empty$
+ 'pop$
+ 'output.nonnull
+ if$
+}
+FUNCTION {output.check}
+{ 't :=
+ duplicate$ empty$
+ { pop$ "empty " t * " in " * cite$ * warning$ }
+ 'output.nonnull
+ if$
+}
+FUNCTION {fin.entry}
+{ add.period$
+ write$
+ newline$
+}
+
+FUNCTION {new.block}
+{ output.state before.all =
+ 'skip$
+ { after.block 'output.state := }
+ if$
+}
+FUNCTION {new.sentence}
+{ output.state after.block =
+ 'skip$
+ { output.state before.all =
+ 'skip$
+ { after.sentence 'output.state := }
+ if$
+ }
+ if$
+}
+FUNCTION {add.blank}
+{ " " * before.all 'output.state :=
+}
+
+FUNCTION {date.block}
+{
+ add.blank
+}
+
+FUNCTION {not}
+{ { #0 }
+ { #1 }
+ if$
+}
+FUNCTION {and}
+{ 'skip$
+ { pop$ #0 }
+ if$
+}
+FUNCTION {or}
+{ { pop$ #1 }
+ 'skip$
+ if$
+}
+FUNCTION {new.block.checkb}
+{ empty$
+ swap$ empty$
+ and
+ 'skip$
+ 'new.block
+ if$
+}
+FUNCTION {field.or.null}
+{ duplicate$ empty$
+ { pop$ "" }
+ 'skip$
+ if$
+}
+FUNCTION {emphasize}
+{ duplicate$ empty$
+ { pop$ "" }
+ { "\textit{" swap$ * "}" * }
+ if$
+}
+FUNCTION {bolden}
+{ duplicate$ empty$
+ { pop$ "" }
+ { "\textbf{" swap$ * "}" * }
+ if$
+}
+FUNCTION {tie.or.space.prefix}
+{ duplicate$ text.length$ #3 <
+ { "~" }
+ { " " }
+ if$
+ swap$
+}
+
+FUNCTION {capitalize}
+{ "u" change.case$ "t" change.case$ }
+
+FUNCTION {space.word}
+{ " " swap$ * " " * }
+ % Here are the language-specific definitions for explicit words.
+ % Each function has a name bbl.xxx where xxx is the English word.
+ % The language selected here is ENGLISH
+FUNCTION {bbl.and}
+{ "and"}
+
+FUNCTION {bbl.etal}
+{ "et~al." }
+
+FUNCTION {bbl.editors}
+{ "eds." }
+
+FUNCTION {bbl.editor}
+{ "ed." }
+
+FUNCTION {bbl.edby}
+{ "edited by" }
+
+FUNCTION {bbl.edition}
+{ "edn." }
+
+FUNCTION {bbl.volume}
+{ "vol." }
+
+FUNCTION {bbl.of}
+{ "of" }
+
+FUNCTION {bbl.number}
+{ "no." }
+
+FUNCTION {bbl.nr}
+{ "no." }
+
+FUNCTION {bbl.in}
+{ "in" }
+
+FUNCTION {bbl.pages}
+{ "pp." }
+
+FUNCTION {bbl.page}
+{ "p." }
+
+FUNCTION {bbl.chapter}
+{ "chap." }
+
+FUNCTION {bbl.techrep}
+{ "Tech. Rep." }
+
+FUNCTION {bbl.mthesis}
+{ "Master's thesis" }
+
+FUNCTION {bbl.phdthesis}
+{ "Ph.D. thesis" }
+
+MACRO {jan} {"Jan."}
+
+MACRO {feb} {"Feb."}
+
+MACRO {mar} {"Mar."}
+
+MACRO {apr} {"Apr."}
+
+MACRO {may} {"May"}
+
+MACRO {jun} {"Jun."}
+
+MACRO {jul} {"Jul."}
+
+MACRO {aug} {"Aug."}
+
+MACRO {sep} {"Sep."}
+
+MACRO {oct} {"Oct."}
+
+MACRO {nov} {"Nov."}
+
+MACRO {dec} {"Dec."}
+
+MACRO {acmcs} {"ACM Computing Surveys"}
+
+MACRO {acta} {"Acta Informatica"}
+
+MACRO {cacm} {"Communications of the ACM"}
+
+MACRO {ibmjrd} {"IBM Journal of Research and Development"}
+
+MACRO {ibmsj} {"IBM Systems Journal"}
+
+MACRO {ieeese} {"IEEE Transactions on Software Engineering"}
+
+MACRO {ieeetc} {"IEEE Transactions on Computers"}
+
+MACRO {ieeetcad}
+ {"IEEE Transactions on Computer-Aided Design of Integrated Circuits"}
+
+MACRO {ipl} {"Information Processing Letters"}
+
+MACRO {jacm} {"Journal of the ACM"}
+
+MACRO {jcss} {"Journal of Computer and System Sciences"}
+
+MACRO {scp} {"Science of Computer Programming"}
+
+MACRO {sicomp} {"SIAM Journal on Computing"}
+
+MACRO {tocs} {"ACM Transactions on Computer Systems"}
+
+MACRO {tods} {"ACM Transactions on Database Systems"}
+
+MACRO {tog} {"ACM Transactions on Graphics"}
+
+MACRO {toms} {"ACM Transactions on Mathematical Software"}
+
+MACRO {toois} {"ACM Transactions on Office Information Systems"}
+
+MACRO {toplas} {"ACM Transactions on Programming Languages and Systems"}
+
+MACRO {tcs} {"Theoretical Computer Science"}
+FUNCTION {bibinfo.check}
+{ swap$
+ duplicate$ missing$
+ {
+ pop$ pop$
+ ""
+ }
+ { duplicate$ empty$
+ {
+ swap$ pop$
+ }
+ { swap$
+ pop$
+ }
+ if$
+ }
+ if$
+}
+FUNCTION {bibinfo.warn}
+{ swap$
+ duplicate$ missing$
+ {
+ swap$ "missing " swap$ * " in " * cite$ * warning$ pop$
+ ""
+ }
+ { duplicate$ empty$
+ {
+ swap$ "empty " swap$ * " in " * cite$ * warning$
+ }
+ { swap$
+ pop$
+ }
+ if$
+ }
+ if$
+}
+STRINGS { bibinfo}
+INTEGERS { nameptr namesleft numnames }
+
+FUNCTION {format.names}
+{ 'bibinfo :=
+ duplicate$ empty$ 'skip$ {
+ 's :=
+ "" 't :=
+ #1 'nameptr :=
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ { s nameptr
+ "{vv~}{ll}{, f.}{, jj}"
+ format.name$
+ bibinfo bibinfo.check
+ 't :=
+ nameptr #1 >
+ {
+ namesleft #1 >
+ { ", " * t * }
+ {
+ s nameptr "{ll}" format.name$ duplicate$ "others" =
+ { 't := }
+ { pop$ }
+ if$
+ t "others" =
+ {
+ " " * bbl.etal emphasize *
+ }
+ {
+ bbl.and
+ space.word * t *
+ }
+ if$
+ }
+ if$
+ }
+ 't
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+ } if$
+}
+FUNCTION {format.names.ed}
+{
+ 'bibinfo :=
+ duplicate$ empty$ 'skip$ {
+ 's :=
+ "" 't :=
+ #1 'nameptr :=
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ { s nameptr
+ "{f.~}{vv~}{ll}{, jj}"
+ format.name$
+ bibinfo bibinfo.check
+ 't :=
+ nameptr #1 >
+ {
+ namesleft #1 >
+ { ", " * t * }
+ {
+ s nameptr "{ll}" format.name$ duplicate$ "others" =
+ { 't := }
+ { pop$ }
+ if$
+ t "others" =
+ {
+
+ " " * bbl.etal emphasize *
+ }
+ {
+ bbl.and
+ space.word * t *
+ }
+ if$
+ }
+ if$
+ }
+ 't
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+ } if$
+}
+FUNCTION {format.key}
+{ empty$
+ { key field.or.null }
+ { "" }
+ if$
+}
+
+FUNCTION {format.authors}
+{ author "author" format.names
+}
+FUNCTION {get.bbl.editor}
+{ editor num.names$ #1 > 'bbl.editors 'bbl.editor if$ }
+
+FUNCTION {format.editors}
+{ editor "editor" format.names duplicate$ empty$ 'skip$
+ {
+ " " *
+ get.bbl.editor
+ capitalize
+ "(" swap$ * ")" *
+ *
+ }
+ if$
+}
+FUNCTION {format.note}
+{
+ note empty$
+ { "" }
+ { note #1 #1 substring$
+ duplicate$ "{" =
+ 'skip$
+ { output.state mid.sentence =
+ { "l" }
+ { "u" }
+ if$
+ change.case$
+ }
+ if$
+ note #2 global.max$ substring$ * "note" bibinfo.check
+ }
+ if$
+}
+
+FUNCTION {format.title}
+{ title
+ duplicate$ empty$ 'skip$
+ { "t" change.case$ }
+ if$
+ "title" bibinfo.check
+}
+FUNCTION {format.full.names}
+{'s :=
+ "" 't :=
+ #1 'nameptr :=
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ { s nameptr
+ "{vv~}{ll}" format.name$
+ 't :=
+ nameptr #1 >
+ {
+ namesleft #1 >
+ { ", " * t * }
+ {
+ s nameptr "{ll}" format.name$ duplicate$ "others" =
+ { 't := }
+ { pop$ }
+ if$
+ t "others" =
+ {
+ " " * bbl.etal emphasize *
+ }
+ {
+ bbl.and
+ space.word * t *
+ }
+ if$
+ }
+ if$
+ }
+ 't
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+}
+
+FUNCTION {author.editor.key.full}
+{ author empty$
+ { editor empty$
+ { key empty$
+ { cite$ #1 #3 substring$ }
+ 'key
+ if$
+ }
+ { editor format.full.names }
+ if$
+ }
+ { author format.full.names }
+ if$
+}
+
+FUNCTION {author.key.full}
+{ author empty$
+ { key empty$
+ { cite$ #1 #3 substring$ }
+ 'key
+ if$
+ }
+ { author format.full.names }
+ if$
+}
+
+FUNCTION {editor.key.full}
+{ editor empty$
+ { key empty$
+ { cite$ #1 #3 substring$ }
+ 'key
+ if$
+ }
+ { editor format.full.names }
+ if$
+}
+
+FUNCTION {make.full.names}
+{ type$ "book" =
+ type$ "inbook" =
+ or
+ 'author.editor.key.full
+ { type$ "proceedings" =
+ 'editor.key.full
+ 'author.key.full
+ if$
+ }
+ if$
+}
+
+FUNCTION {output.bibitem}
+{ newline$
+ "\bibitem[{" write$
+ label write$
+ ")" make.full.names duplicate$ short.list =
+ { pop$ }
+ { * }
+ if$
+ "}]{" * write$
+ cite$ write$
+ "}" write$
+ newline$
+ ""
+ before.all 'output.state :=
+}
+
+FUNCTION {n.dashify}
+{
+ 't :=
+ ""
+ { t empty$ not }
+ { t #1 #1 substring$ "-" =
+ { t #1 #2 substring$ "--" = not
+ { "--" *
+ t #2 global.max$ substring$ 't :=
+ }
+ { { t #1 #1 substring$ "-" = }
+ { "-" *
+ t #2 global.max$ substring$ 't :=
+ }
+ while$
+ }
+ if$
+ }
+ { t #1 #1 substring$ *
+ t #2 global.max$ substring$ 't :=
+ }
+ if$
+ }
+ while$
+}
+
+FUNCTION {word.in}
+{ bbl.in
+ " " * }
+
+FUNCTION {format.date}
+{ year "year" bibinfo.check duplicate$ empty$
+ {
+ "empty year in " cite$ * "; set to ????" * warning$
+ pop$ "????"
+ }
+ 'skip$
+ if$
+ extra.label *
+ before.all 'output.state :=
+ " (" swap$ * ")" *
+}
+FUNCTION {format.btitle}
+{ title "title" bibinfo.check
+ duplicate$ empty$ 'skip$
+ {
+ emphasize
+ }
+ if$
+}
+FUNCTION {either.or.check}
+{ empty$
+ 'pop$
+ { "can't use both " swap$ * " fields in " * cite$ * warning$ }
+ if$
+}
+FUNCTION {format.bvolume}
+{ volume empty$
+ { "" }
+ { bbl.volume volume tie.or.space.prefix
+ "volume" bibinfo.check * *
+ series "series" bibinfo.check
+ duplicate$ empty$ 'pop$
+ { swap$ bbl.of space.word * swap$
+ emphasize * }
+ if$
+ "volume and number" number either.or.check
+ }
+ if$
+}
+FUNCTION {format.number.series}
+{ volume empty$
+ { number empty$
+ { series field.or.null }
+ { series empty$
+ { number "number" bibinfo.check }
+ { output.state mid.sentence =
+ { bbl.number }
+ { bbl.number capitalize }
+ if$
+ number tie.or.space.prefix "number" bibinfo.check * *
+ bbl.in space.word *
+ series "series" bibinfo.check *
+ }
+ if$
+ }
+ if$
+ }
+ { "" }
+ if$
+}
+
+FUNCTION {format.edition}
+{ edition duplicate$ empty$ 'skip$
+ {
+ output.state mid.sentence =
+ { "l" }
+ { "t" }
+ if$ change.case$
+ "edition" bibinfo.check
+ " " * bbl.edition *
+ }
+ if$
+}
+INTEGERS { multiresult }
+FUNCTION {multi.page.check}
+{ 't :=
+ #0 'multiresult :=
+ { multiresult not
+ t empty$ not
+ and
+ }
+ { t #1 #1 substring$
+ duplicate$ "-" =
+ swap$ duplicate$ "," =
+ swap$ "+" =
+ or or
+ { #1 'multiresult := }
+ { t #2 global.max$ substring$ 't := }
+ if$
+ }
+ while$
+ multiresult
+}
+FUNCTION {format.pages}
+{ pages duplicate$ empty$ 'skip$
+ { duplicate$ multi.page.check
+ {
+ bbl.pages swap$
+ n.dashify
+ }
+ {
+ bbl.page swap$
+ }
+ if$
+ tie.or.space.prefix
+ "pages" bibinfo.check
+ * *
+ }
+ if$
+}
+FUNCTION {format.journal.pages}
+{ pages duplicate$ empty$ 'pop$
+ { swap$ duplicate$ empty$
+ { pop$ pop$ format.pages }
+ {
+ ", " *
+ swap$
+ n.dashify
+ "pages" bibinfo.check
+ *
+ }
+ if$
+ }
+ if$
+}
+FUNCTION {format.journal.eid}
+{ eid "eid" bibinfo.check
+ duplicate$ empty$ 'pop$
+ { swap$ duplicate$ empty$ 'skip$
+ {
+ ", " *
+ }
+ if$
+ swap$ *
+ }
+ if$
+}
+FUNCTION {format.vol.num.pages}
+{ volume field.or.null
+ duplicate$ empty$ 'skip$
+ {
+ "volume" bibinfo.check
+ }
+ if$
+ bolden
+ eid empty$
+ { format.journal.pages }
+ { format.journal.eid }
+ if$
+}
+
+FUNCTION {format.chapter.pages}
+{ chapter empty$
+ 'format.pages
+ { type empty$
+ { bbl.chapter }
+ { type "l" change.case$
+ "type" bibinfo.check
+ }
+ if$
+ chapter tie.or.space.prefix
+ "chapter" bibinfo.check
+ * *
+ pages empty$
+ 'skip$
+ { ", " * format.pages * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.booktitle}
+{
+ booktitle "booktitle" bibinfo.check
+ emphasize
+}
+FUNCTION {format.in.ed.booktitle}
+{ format.booktitle duplicate$ empty$ 'skip$
+ {
+ editor "editor" format.names.ed duplicate$ empty$ 'pop$
+ {
+ get.bbl.editor
+ capitalize
+ "(" swap$ * ")" *
+ " " * swap$ *
+ swap$
+ " " * swap$
+ * }
+ if$
+ word.in swap$ *
+ }
+ if$
+}
+FUNCTION {format.thesis.type}
+{ type duplicate$ empty$
+ 'pop$
+ { swap$ pop$
+ "t" change.case$ "type" bibinfo.check
+ }
+ if$
+}
+FUNCTION {format.tr.number}
+{ number "number" bibinfo.check
+ type duplicate$ empty$
+ { pop$ bbl.techrep }
+ 'skip$
+ if$
+ "type" bibinfo.check
+ swap$ duplicate$ empty$
+ { pop$ "t" change.case$ }
+ { tie.or.space.prefix * * }
+ if$
+}
+FUNCTION {format.article.crossref}
+{
+ word.in
+ " \cite{" * crossref * "}" *
+}
+FUNCTION {format.book.crossref}
+{ volume duplicate$ empty$
+ { "empty volume in " cite$ * "'s crossref of " * crossref * warning$
+ pop$ word.in
+ }
+ { bbl.volume
+ swap$ tie.or.space.prefix "volume" bibinfo.check * * bbl.of space.word *
+ }
+ if$
+ " \cite{" * crossref * "}" *
+}
+FUNCTION {format.incoll.inproc.crossref}
+{
+ word.in
+ " \cite{" * crossref * "}" *
+}
+FUNCTION {format.org.or.pub}
+{ 't :=
+ ""
+ address empty$ t empty$ and
+ 'skip$
+ {
+ t empty$
+ { address "address" bibinfo.check *
+ }
+ { t *
+ address empty$
+ 'skip$
+ { ", " * address "address" bibinfo.check * }
+ if$
+ }
+ if$
+ }
+ if$
+}
+FUNCTION {format.publisher.address}
+{ publisher "publisher" bibinfo.warn format.org.or.pub
+}
+
+FUNCTION {format.organization.address}
+{ organization "organization" bibinfo.check format.org.or.pub
+}
+
+FUNCTION {article}
+{ output.bibitem
+ format.authors "author" output.check
+ author format.key output
+ format.date "year" output.check
+ date.block
+ format.title "title" output.check
+ crossref missing$
+ {
+ journal
+ "journal" bibinfo.check
+ emphasize
+ "journal" output.check
+ format.vol.num.pages output
+ }
+ { format.article.crossref output.nonnull
+ format.pages output
+ }
+ if$
+ format.note output
+ fin.entry
+}
+FUNCTION {book}
+{ output.bibitem
+ author empty$
+ { format.editors "author and editor" output.check
+ editor format.key output
+ }
+ { format.authors output.nonnull
+ crossref missing$
+ { "author and editor" editor either.or.check }
+ 'skip$
+ if$
+ }
+ if$
+ format.date "year" output.check
+ date.block
+ format.btitle "title" output.check
+ crossref missing$
+ { format.bvolume output
+ format.number.series output
+ format.publisher.address output
+ }
+ {
+ format.book.crossref output.nonnull
+ }
+ if$
+ format.edition output
+ format.note output
+ fin.entry
+}
+FUNCTION {booklet}
+{ output.bibitem
+ format.authors output
+ author format.key output
+ format.date "year" output.check
+ date.block
+ format.title "title" output.check
+ howpublished "howpublished" bibinfo.check output
+ address "address" bibinfo.check output
+ format.note output
+ fin.entry
+}
+
+FUNCTION {inbook}
+{ output.bibitem
+ author empty$
+ { format.editors "author and editor" output.check
+ editor format.key output
+ }
+ { format.authors output.nonnull
+ crossref missing$
+ { "author and editor" editor either.or.check }
+ 'skip$
+ if$
+ }
+ if$
+ format.date "year" output.check
+ date.block
+ format.btitle "title" output.check
+ crossref missing$
+ {
+ format.publisher.address output
+ format.bvolume output
+ format.chapter.pages "chapter and pages" output.check
+ format.number.series output
+ }
+ {
+ format.chapter.pages "chapter and pages" output.check
+ format.book.crossref output.nonnull
+ }
+ if$
+ format.edition output
+ format.note output
+ fin.entry
+}
+
+FUNCTION {incollection}
+{ output.bibitem
+ format.authors "author" output.check
+ author format.key output
+ format.date "year" output.check
+ date.block
+ format.title "title" output.check
+ crossref missing$
+ { format.in.ed.booktitle "booktitle" output.check
+ format.publisher.address output
+ format.bvolume output
+ format.number.series output
+ format.chapter.pages output
+ format.edition output
+ }
+ { format.incoll.inproc.crossref output.nonnull
+ format.chapter.pages output
+ }
+ if$
+ format.note output
+ fin.entry
+}
+FUNCTION {inproceedings}
+{ output.bibitem
+ format.authors "author" output.check
+ author format.key output
+ format.date "year" output.check
+ date.block
+ format.title "title" output.check
+ crossref missing$
+ { format.in.ed.booktitle "booktitle" output.check
+ publisher empty$
+ { format.organization.address output }
+ { organization "organization" bibinfo.check output
+ format.publisher.address output
+ }
+ if$
+ format.bvolume output
+ format.number.series output
+ format.pages output
+ }
+ { format.incoll.inproc.crossref output.nonnull
+ format.pages output
+ }
+ if$
+ format.note output
+ fin.entry
+}
+FUNCTION {conference} { inproceedings }
+FUNCTION {manual}
+{ output.bibitem
+ format.authors output
+ author format.key output
+ format.date "year" output.check
+ date.block
+ format.btitle "title" output.check
+ organization "organization" bibinfo.check output
+ address "address" bibinfo.check output
+ format.edition output
+ format.note output
+ fin.entry
+}
+
+FUNCTION {mastersthesis}
+{ output.bibitem
+ format.authors "author" output.check
+ author format.key output
+ format.date "year" output.check
+ date.block
+ format.btitle
+ "title" output.check
+ bbl.mthesis format.thesis.type output.nonnull
+ school "school" bibinfo.warn output
+ address "address" bibinfo.check output
+ format.note output
+ fin.entry
+}
+
+FUNCTION {misc}
+{ output.bibitem
+ format.authors output
+ author format.key output
+ format.date "year" output.check
+ date.block
+ format.title output
+ howpublished "howpublished" bibinfo.check output
+ format.note output
+ fin.entry
+}
+FUNCTION {phdthesis}
+{ output.bibitem
+ format.authors "author" output.check
+ author format.key output
+ format.date "year" output.check
+ date.block
+ format.btitle
+ "title" output.check
+ bbl.phdthesis format.thesis.type output.nonnull
+ school "school" bibinfo.warn output
+ address "address" bibinfo.check output
+ format.note output
+ fin.entry
+}
+
+FUNCTION {proceedings}
+{ output.bibitem
+ format.editors output
+ editor format.key output
+ format.date "year" output.check
+ date.block
+ format.btitle "title" output.check
+ format.bvolume output
+ format.number.series output
+ publisher empty$
+ { format.organization.address output }
+ { organization "organization" bibinfo.check output
+ format.publisher.address output
+ }
+ if$
+ format.note output
+ fin.entry
+}
+
+FUNCTION {techreport}
+{ output.bibitem
+ format.authors "author" output.check
+ author format.key output
+ format.date "year" output.check
+ date.block
+ format.title
+ "title" output.check
+ format.tr.number output.nonnull
+ institution "institution" bibinfo.warn output
+ address "address" bibinfo.check output
+ format.note output
+ fin.entry
+}
+
+FUNCTION {unpublished}
+{ output.bibitem
+ format.authors "author" output.check
+ author format.key output
+ format.date "year" output.check
+ date.block
+ format.title "title" output.check
+ format.note "note" output.check
+ fin.entry
+}
+
+FUNCTION {default.type} { misc }
+READ
+FUNCTION {sortify}
+{ purify$
+ "l" change.case$
+}
+INTEGERS { len }
+FUNCTION {chop.word}
+{ 's :=
+ 'len :=
+ s #1 len substring$ =
+ { s len #1 + global.max$ substring$ }
+ 's
+ if$
+}
+FUNCTION {format.lab.names}
+{ 's :=
+ "" 't :=
+ s #1 "{vv~}{ll}" format.name$
+ s num.names$ duplicate$
+ #2 >
+ { pop$
+ " " * bbl.etal emphasize *
+ }
+ { #2 <
+ 'skip$
+ { s #2 "{ff }{vv }{ll}{ jj}" format.name$ "others" =
+ {
+ " " * bbl.etal emphasize *
+ }
+ { bbl.and space.word * s #2 "{vv~}{ll}" format.name$
+ * }
+ if$
+ }
+ if$
+ }
+ if$
+}
+
+FUNCTION {author.key.label}
+{ author empty$
+ { key empty$
+ { cite$ #1 #3 substring$ }
+ 'key
+ if$
+ }
+ { author format.lab.names }
+ if$
+}
+
+FUNCTION {author.editor.key.label}
+{ author empty$
+ { editor empty$
+ { key empty$
+ { cite$ #1 #3 substring$ }
+ 'key
+ if$
+ }
+ { editor format.lab.names }
+ if$
+ }
+ { author format.lab.names }
+ if$
+}
+
+FUNCTION {editor.key.label}
+{ editor empty$
+ { key empty$
+ { cite$ #1 #3 substring$ }
+ 'key
+ if$
+ }
+ { editor format.lab.names }
+ if$
+}
+
+FUNCTION {calc.short.authors}
+{ type$ "book" =
+ type$ "inbook" =
+ or
+ 'author.editor.key.label
+ { type$ "proceedings" =
+ 'editor.key.label
+ 'author.key.label
+ if$
+ }
+ if$
+ 'short.list :=
+}
+
+FUNCTION {calc.label}
+{ calc.short.authors
+ short.list
+ "("
+ *
+ year duplicate$ empty$
+ short.list key field.or.null = or
+ { pop$ "" }
+ 'skip$
+ if$
+ *
+ 'label :=
+}
+
+FUNCTION {sort.format.names}
+{ 's :=
+ #1 'nameptr :=
+ ""
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ { s nameptr
+ "{vv{ } }{ll{ }}{ f{ }}{ jj{ }}"
+ format.name$ 't :=
+ nameptr #1 >
+ {
+ " " *
+ namesleft #1 = t "others" = and
+ { "zzzzz" * }
+ { t sortify * }
+ if$
+ }
+ { t sortify * }
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+}
+
+FUNCTION {sort.format.title}
+{ 't :=
+ "A " #2
+ "An " #3
+ "The " #4 t chop.word
+ chop.word
+ chop.word
+ sortify
+ #1 global.max$ substring$
+}
+FUNCTION {author.sort}
+{ author empty$
+ { key empty$
+ { "to sort, need author or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { author sort.format.names }
+ if$
+}
+FUNCTION {author.editor.sort}
+{ author empty$
+ { editor empty$
+ { key empty$
+ { "to sort, need author, editor, or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { editor sort.format.names }
+ if$
+ }
+ { author sort.format.names }
+ if$
+}
+FUNCTION {editor.sort}
+{ editor empty$
+ { key empty$
+ { "to sort, need editor or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { editor sort.format.names }
+ if$
+}
+FUNCTION {presort}
+{ calc.label
+ label sortify
+ " "
+ *
+ type$ "book" =
+ type$ "inbook" =
+ or
+ 'author.editor.sort
+ { type$ "proceedings" =
+ 'editor.sort
+ 'author.sort
+ if$
+ }
+ if$
+ #1 entry.max$ substring$
+ 'sort.label :=
+ sort.label
+ *
+ " "
+ *
+ title field.or.null
+ sort.format.title
+ *
+ #1 entry.max$ substring$
+ 'sort.key$ :=
+}
+
+ITERATE {presort}
+SORT
+STRINGS { last.label next.extra }
+INTEGERS { last.extra.num number.label }
+FUNCTION {initialize.extra.label.stuff}
+{ #0 int.to.chr$ 'last.label :=
+ "" 'next.extra :=
+ #0 'last.extra.num :=
+ #0 'number.label :=
+}
+FUNCTION {forward.pass}
+{ last.label label =
+ { last.extra.num #1 + 'last.extra.num :=
+ last.extra.num int.to.chr$ 'extra.label :=
+ }
+ { "a" chr.to.int$ 'last.extra.num :=
+ "" 'extra.label :=
+ label 'last.label :=
+ }
+ if$
+ number.label #1 + 'number.label :=
+}
+FUNCTION {reverse.pass}
+{ next.extra "b" =
+ { "a" 'extra.label := }
+ 'skip$
+ if$
+ extra.label 'next.extra :=
+ extra.label
+ duplicate$ empty$
+ 'skip$
+ { "{\natexlab{" swap$ * "}}" * }
+ if$
+ 'extra.label :=
+ label extra.label * 'label :=
+}
+EXECUTE {initialize.extra.label.stuff}
+ITERATE {forward.pass}
+REVERSE {reverse.pass}
+FUNCTION {bib.sort.order}
+{ sort.label
+ " "
+ *
+ year field.or.null sortify
+ *
+ " "
+ *
+ title field.or.null
+ sort.format.title
+ *
+ #1 entry.max$ substring$
+ 'sort.key$ :=
+}
+ITERATE {bib.sort.order}
+SORT
+FUNCTION {begin.bib}
+{ preamble$ empty$
+ 'skip$
+ { preamble$ write$ newline$ }
+ if$
+ "\begin{thebibliography}{" number.label int.to.str$ * "}" *
+ write$ newline$
+ "\providecommand{\natexlab}[1]{#1}"
+ write$ newline$
+}
+EXECUTE {begin.bib}
+EXECUTE {init.state.consts}
+ITERATE {call.type$}
+FUNCTION {end.bib}
+{ newline$
+ "\end{thebibliography}" write$ newline$
+}
+EXECUTE {end.bib}
+%% End of customized bst file
+%%
+%% End of file `apecon.bst'.
diff --git a/biblio/bibtex/contrib/economic/apecon.cls b/biblio/bibtex/contrib/economic/apecon.cls
new file mode 100644
index 0000000000..240bc1ccc4
--- /dev/null
+++ b/biblio/bibtex/contrib/economic/apecon.cls
@@ -0,0 +1,196 @@
+%%% LaTeX class for manuscripts submitted to the
+%%% journal 'Applied Economics'
+%%%
+%%% author: Arne Henningsen
+%%% version: 1.1 (18 November 2009)
+%%% license: LaTeX Project Public License
+%%%
+%%% Note: This is an unofficial style file that may not fully comply
+%%% with the formatting instructions of 'Applied Economics' in every detail.
+%%% Please report any problems at
+%%% http://sourceforge.net/projects/economtex/
+%%% Further information is available at
+%%% http://economtex.wiki.sourceforge.net/
+%%%
+%%% This document class is based on the "scrartcl" class
+%%% from the KOMA script bundle.
+%%% Following additional packages are required:
+%%% amsmath, babel, endfloat, geometry, ifthen
+%%% lmodern, natbib, setspace, textcomp, url
+%%%
+%%% The class provides following option:
+%%% noendfloat - don't move floats to the end of the paper
+%%%
+%%% By default, the corresponding BibTeX style "apecon.bst" is used.
+%%%
+%%% This document class provides 4 new commands:
+%%% \affiliation specify affiliation(s) and full address(es) of the authors
+%%% \rtitle specify running title (max. 75 letters and spaces)
+%%% \cauthor specify corresponding author including contact details
+%%%
+
+
+\NeedsTeXFormat{LaTeX2e}
+\ProvidesClass{apecon}[2009/11/18 LaTeX class for the journal 'Applied Economics']
+
+% package for convenient if-then-else statements
+\RequirePackage{ifthen}
+
+% option to NOT place floats at the end
+\newif\if@useendfloat
+\@useendfloattrue
+\DeclareOption{noendfloat}{\@useendfloatfalse}
+
+% pass any options on to the scrartcl class and load this class with some options
+\DeclareOption*{\PassOptionsToClass{\CurrentOption}{scrartcl}}
+\ProcessOptions\relax
+\LoadClass[12pt,english,pointednumbers,tablecaptionabove]{scrartcl}
+% pointednumbers = add final dot after ordinary section numbers
+% tablecaptionabove = use \captionabove for tables
+
+% additional symbols
+\RequirePackage{textcomp}
+
+% page format, margins
+\RequirePackage{geometry}
+\geometry{a4paper, tmargin=2.5cm, bmargin=2.8cm, lmargin=4cm,
+ rmargin=2cm, headheight=0cm, headsep=0cm, footskip=1.2cm }
+
+% one half spacing
+\RequirePackage{setspace}
+\doublespacing
+
+% spacing around formulas
+\AtBeginDocument{
+\setlength{\abovedisplayshortskip}{6pt}
+\setlength{\belowdisplayshortskip}{6pt}
+\setlength{\abovedisplayskip}{6pt}
+\setlength{\belowdisplayskip}{6pt}
+\allowdisplaybreaks
+}
+
+% spacing around captions and floats
+\setlength{\abovecaptionskip}{6pt}
+\setlength{\belowcaptionskip}{3pt}
+\setlength{\floatsep}{0pt}
+\setlength{\textfloatsep}{20pt}
+\setlength{\intextsep}{5pt}
+
+% font family: latin modern
+\RequirePackage{lmodern}
+
+% section headers
+\setkomafont{section}{\sffamily\bfseries}
+\setkomafont{subsection}{\normalfont\sffamily\itshape}
+\setkomafont{subsubsection}{\normalfont\sffamily}
+\renewcommand{\thesection}{\Roman{section}}
+\setcounter{secnumdepth}{1}
+
+% amsmath
+\RequirePackage{amsmath}
+% for compatibility with ajae.cls
+\newcommand{\veclatin}[1]{#1}
+\newcommand{\matlatin}[1]{#1}
+\newcommand{\vecgreek}[1]{#1}
+\newcommand{\matgreek}[1]{#1}
+
+% font for URLs
+\RequirePackage{url}
+\def\UrlFont{\rmfamily}
+
+% citations and bibliography
+\RequirePackage[authoryear]{natbib}
+\setlength{\bibsep}{0pt}
+\bibliographystyle{apecon}
+
+% captions of figures and tables
+\setcapwidth[l]{\textwidth}
+\setcapindent{0pt}
+\setkomafont{captionlabel}{\normalsize\normalfont\bfseries}
+\setkomafont{caption}{\normalsize\normalfont\bfseries}
+\renewcommand{\captionformat}{.\ }
+
+% titlepage without author and date
+\newcommand{\affiliation}[1]{\newcommand{\@affiliation}{#1}}
+\newcommand{\address}[1]{\newcommand{\@address}{#1}}
+\newcommand{\rtitle}[1]{\newcommand{\@rtitle}{#1}}
+\newcommand{\cauthor}[1]{\newcommand{\@cauthor}{#1}}
+\renewcommand{\maketitle}{
+ \begin{center}
+ \begin{spacing}{1.5}
+ \LARGE{\textbf{\@title}}%
+ \end{spacing}
+ \ifthenelse{ \isundefined\@author }{
+ \ClassWarning{apecon}{No author(s) specified.
+ Please specify with command \protect\author}
+ }{
+ \begin{large}
+ \textbf{\@author}\\
+ \end{large}
+ \vspace*{3mm}
+ }
+ \begin{spacing}{1.1}
+ \ifthenelse{ \isundefined\@affiliation }{
+ \ClassWarning{apecon}{No affiliation(s) specified.
+ Please specify with command \protect\affiliation}
+ }{
+ \textit{\@affiliation}\\
+ }
+ \ifthenelse{ \isundefined\@address }{
+ }{
+ \textit{\@address}\\
+ }
+ \end{spacing}
+ \vspace*{5mm}
+ \end{center}
+ \ifthenelse{ \isundefined\@rtitle }{
+ \ClassWarningNoLine{apecon}{No running title is specified.
+ Please specify with command \protect\rtitle\space (max. 75 letters)}
+ }{
+ \textbf{Running title:}\\
+ \@rtitle\\
+ }
+}
+
+% abstract, keywords, JEL classification
+\renewenvironment{abstract}{%
+ \begin{spacing}{1.5}
+ \noindent
+ \textbf{Abstract}\\
+}{%
+ \smallskip\\ \noindent
+ \end{spacing}
+ \begin{spacing}{1.1}
+ \noindent
+ \textbf{Corresponding author:}
+ \ifthenelse{ \isundefined\@cauthor }{
+ ???
+ \ClassWarningNoLine{apecon}{No corresponding author
+ (including contact details) is specified.
+ Please specify with command \protect\cauthor}
+ }{
+ \\\@cauthor\\
+ }
+ \clearpage
+ \end{spacing}
+}
+
+% use babel package and set language to english
+\RequirePackage[english]{babel}
+
+% avoid clubs and widows
+\clubpenalty=10000
+\widowpenalty=10000
+% \displaywidowpenalty=10000
+
+% increase stretchability of the spaces (avoid overful hboxes)
+\setlength{\emergencystretch}{3em}
+
+% move floats to the end of the paper
+\if@useendfloat
+ \RequirePackage[noheads,nomarkers,tablesfirst,nolists]{endfloat}
+\fi
+
+% for compatibility with erae.cls
+\newcommand{\citetPage}[2]{\citeauthor{#2} (\citeyear{#2}, p.~#1)}
+\newcommand{\citepPage}[2]{\citetext{\citealp{#2}, p.~#1}}
diff --git a/biblio/bibtex/contrib/economic/cje.bst b/biblio/bibtex/contrib/economic/cje.bst
new file mode 100644
index 0000000000..632e4988d0
--- /dev/null
+++ b/biblio/bibtex/contrib/economic/cje.bst
@@ -0,0 +1,1192 @@
+% BibTeX bibliography style `cje' (Canadian Journal of Economics)
+% this file is based on the `harvard' family of files
+ % version 0.99a for BibTeX versions 0.99a or later, LaTeX version 2.09.
+ % Copyright (C) 1991, all rights reserved.
+ % Copying of this file is authorized only if either
+ % (1) you make absolutely no changes to your copy, including name, or
+ % (2) if you do make changes, you name it something other than
+ % btxbst.doc, plain.bst, unsrt.bst, alpha.bst, abbrv.bst, agsm.bst,
+ % dcu.bst, cje.bst, aer.bst, or kluwer.bst.
+ % This restriction helps ensure that all standard styles are identical.
+
+% ACKNOWLEDGEMENT:
+% This document is a modified version of alpha.bst to which it owes much of
+% its functionality.
+
+% AUTHOR
+% Peter Williams, Key Centre for Design Quality, Sydney University
+% e-mail: peterw@archsci.arch.su.oz.au
+
+ENTRY
+ { address author booktitle chapter edition editor howpublished institution
+ journal key month note number organization pages publisher school
+ series title type volume year}
+ { field.used }
+ { canonical.label extra.label sort.label list.year }
+
+
+INTEGERS {quoted italic bold plain attribute
+ space comma tiedcomma semicolon colon period block empty separator
+ prev.separator next.separator next.attribute}
+
+STRINGS { s temp f name.list first.name.format later.name.formats name.style}
+
+FUNCTION {init.state.consts}
+{
+ #100 'quoted :=
+ #200 'italic :=
+ #300 'bold :=
+ #400 'plain :=
+
+ #7 'space :=
+ #6 'comma :=
+% #5 'tiedcomma :=
+% #4 'semicolon :=
+% #3 'colon :=
+ #2 'period :=
+ #1 'block :=
+ #0 'empty :=
+}
+
+FUNCTION {output2}
+{
+% Wrap the attribute.
+ attribute bold = {"{\bf " swap$ * "}" *} {} if$
+ attribute italic = {"{\it " swap$ * "}" *} {} if$
+ attribute quoted = {"`" swap$ * "'" *} {} if$
+% Append additional separators
+ separator comma = {"," * space 'separator :=} {} if$
+% separator tiedcomma = {",~" * empty 'separator :=} {} if$
+ separator space = {" " *} {} if$
+ write$
+ separator block = {newline$ "\newblock " write$} {} if$
+% Update variables, and put the new string back on the stack
+ next.attribute 'attribute :=
+ next.separator 'separator :=
+ temp
+}
+
+% <string> <separator> <string> <attribute> <final separator> output <string>
+FUNCTION {output.nonnull}
+{ 'next.separator :=
+ 'next.attribute :=
+ 'temp :=
+ 'prev.separator :=
+% If the new separator is stronger than the previous one, use it.
+ prev.separator separator < {prev.separator 'separator :=} {} if$
+% Append most separators to the string.
+ separator block = {add.period$} {} if$
+ separator period = {add.period$ space 'separator :=} {} if$
+ separator comma = {"," * space 'separator :=} {} if$
+% separator semicolon = {";" * space 'separator :=} {} if$
+% separator colon = {":" * space 'separator :=} {} if$
+ output2
+}
+
+FUNCTION {output}
+{ 'next.separator :=
+ 'next.attribute :=
+ duplicate$ empty$
+ {pop$ pop$}
+ {next.attribute next.separator output.nonnull}
+ if$
+}
+
+FUNCTION {output.check}
+{ 's :=
+ 'next.separator :=
+ 'next.attribute :=
+ duplicate$ empty$
+ {pop$ pop$ "empty " s * " in " * cite$ * warning$ }
+ {next.attribute next.separator output.nonnull}
+ if$
+}
+
+FUNCTION {item.check}
+{ 'temp :=
+ empty$
+ { "empty " temp * " in " * cite$ * warning$ }
+ {}
+ if$
+}
+
+FUNCTION {plain.space} { plain space }
+
+FUNCTION {plain.space.output} { plain.space output }
+
+FUNCTION {fin.entry}
+{ block note plain.space.output
+
+ empty 'separator :=
+ empty "" plain empty output.nonnull pop$
+ newline$
+}
+
+FUNCTION {not}
+{ { #0 }
+ { #1 }
+ if$
+}
+
+FUNCTION {and}
+{ {}
+ { pop$ #0 }
+ if$
+}
+
+FUNCTION {or}
+{ { pop$ #1 }
+ {}
+ if$
+}
+
+FUNCTION {field.or.null}
+{ duplicate$ empty$
+ { pop$ "" }
+ {}
+ if$
+}
+
+FUNCTION {emphasize}
+{ duplicate$ empty$
+ { pop$ "" }
+ { "{\em " swap$ * "}" * }
+ if$
+}
+
+FUNCTION {quote}
+{ duplicate$ empty$
+ { pop$ "" }
+ { add.period$ "`" swap$ * "'" * }
+ if$
+}
+
+INTEGERS { nameptr namesleft numnames }
+
+FUNCTION {format.names}
+{ 'name.list :=
+ 'name.style :=
+ 'later.name.formats :=
+ 's := % binary separator
+ 'first.name.format :=
+ #1 'nameptr :=
+ name.list num.names$ 'numnames :=
+% If we're to make this entry bold or something, prepend to the string of names
+ name.style "" = {} {"{" name.style *} if$
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ { name.list nameptr nameptr #1 = {first.name.format} {later.name.formats} if$
+ format.name$ 'temp :=
+ nameptr #1 >
+ { namesleft #1 >
+ { ", " * temp * }
+ { temp "others" =
+ { " et~al." * }
+ {nameptr #2 = % handle ", and" vs " and "
+ {s * temp *}
+ {", and " * temp * }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ 'temp
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+% If we're to make this entry bold or something, append to the string of names
+ name.style "" = {} {"}" * *} if$
+}
+
+FUNCTION {format.authors}
+{ author empty$
+ { "" }
+ { extra.label "\bysame" =
+ {"\bysame"}
+ { "{vv~}{ll}{, jj}{, ff}" ", and " "{ff~}{vv~}{ll}{, jj}" "" author
+ format.names }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.editors}
+{ editor empty$
+ { "" }
+ { "{vv~}{ll}{, jj}{, ff}" ", and " "{ff~}{vv~}{ll}{, jj}" ""
+ editor format.names
+ editor num.names$ #1 >
+ { ", eds" * }
+ { ", ed." * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.editors.reverse}
+{ editor empty$
+ { "" }
+ { "ed. "
+ "{ff~}{vv~}{ll}{, jj}" " and " "{ff~}{vv~}{ll}{, jj}" ""
+ editor format.names
+ *
+ }
+ if$
+}
+
+FUNCTION {format.title}
+{ space
+ title empty$
+ { "" }
+ { title "t" change.case$}
+ if$
+ quoted period
+}
+
+FUNCTION {n.dashify}
+{ 'temp :=
+ ""
+ { temp empty$ not }
+ { temp #1 #1 substring$ "-" =
+ { temp #1 #2 substring$ "--" = not
+ { "--" *
+ temp #2 global.max$ substring$ 'temp :=
+ }
+ { { temp #1 #1 substring$ "-" = }
+ { "-" *
+ temp #2 global.max$ substring$ 'temp :=
+ }
+ while$
+ }
+ if$
+ }
+ { temp #1 #1 substring$ *
+ temp #2 global.max$ substring$ 'temp :=
+ }
+ if$
+ }
+ while$
+}
+
+FUNCTION {format.btitle}
+{ title emphasize
+}
+
+FUNCTION {tie.or.space.connect}
+{ duplicate$ text.length$ #3 <
+ { "~" }
+ { " " }
+ if$
+ swap$ * *
+}
+
+FUNCTION {either.or.check}
+{ empty$
+ 'pop$
+ { "can't use both " swap$ * " fields in " * cite$ * warning$ }
+ if$
+}
+
+FUNCTION {format.bvolume}
+{ volume empty$
+ { "" }
+ { "vol." volume tie.or.space.connect
+ series empty$
+ {}
+ { " of " * series emphasize * }
+ if$
+ "volume and number" number either.or.check
+ }
+ if$
+}
+
+FUNCTION {mid.sentence.q}
+{
+ separator empty = separator block = separator period = or or not
+}
+
+FUNCTION {format.number.series}
+{ volume empty$
+ { number empty$
+ {series field.or.null}
+ { mid.sentence.q
+ { "number" }
+ { "Number" }
+ if$
+ number tie.or.space.connect
+ series empty$
+ { "there's a number but no series in " cite$ * warning$ }
+ { add.period$ " In " * series quote * }
+ if$
+ }
+ if$
+ }
+ { "" }
+ if$
+}
+
+FUNCTION {format.edition}
+{ edition empty$
+ { "" }
+ { edition
+ mid.sentence.q { "l"} { "t"} if$
+ change.case$ " ed." *
+ }
+ if$
+}
+
+FUNCTION {format.publisher.address}
+{
+ publisher empty$ address empty$ and
+ {}
+ { space
+ address empty$ {"("} {"(" address *} if$
+ publisher empty$ address empty$ or {} {": " *} if$
+ publisher empty$ {} {publisher *} if$
+ ")" * plain.space output.nonnull
+ }
+ if$
+}
+
+INTEGERS { multiresult }
+
+FUNCTION {multi.page.check}
+{ 'temp :=
+ #0 'multiresult :=
+ { multiresult not
+ temp empty$ not
+ and
+ }
+ { temp #1 #1 substring$
+ duplicate$ "-" =
+ swap$ duplicate$ "," =
+ swap$ "+" =
+ or or
+ { #1 'multiresult := }
+ { temp #2 global.max$ substring$ 'temp := }
+ if$
+ }
+ while$
+ multiresult
+}
+
+FUNCTION {format.pages}
+{ pages empty$
+ { "" }
+ { pages multi.page.check
+ { "pp.~" pages n.dashify * }
+ { "p.~" pages * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {output.vol.num.pages}
+{ space
+ volume field.or.null
+ number empty$
+ {}
+ { "(" number * ")" * *
+ volume empty$
+ { "there's a number but no volume in " cite$ * warning$ }
+ {}
+ if$
+ }
+ if$
+ pages empty$
+ {}
+ { duplicate$ empty$
+ { pop$ format.pages }
+ { ",~" * pages n.dashify * }
+ if$
+ }
+ if$
+ plain.space.output
+}
+
+FUNCTION {format.chapter.pages}
+{ chapter empty$
+ 'format.pages
+ { type empty$
+ { "chapter" }
+ { type "l" change.case$ }
+ if$
+ chapter tie.or.space.connect
+ pages empty$
+ {}
+ { ", " * format.pages * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {output.in.ed.booktitle}
+{ booktitle empty$
+ { booktitle "booktitle" item.check }
+ { space "In" plain.space output.nonnull
+ editor empty$
+ { space booktitle quoted space output.nonnull}
+ { space booktitle italic comma output.nonnull
+ comma format.editors.reverse plain.space output.nonnull}
+ if$
+ }
+ if$
+}
+
+FUNCTION {empty.misc.check}
+{ author empty$ title empty$ howpublished empty$
+ month empty$ year empty$ note empty$
+ and and and and and
+ key empty$ not and
+ { "all relevant fields are empty in " cite$ * warning$ }
+ {}
+ if$
+}
+
+FUNCTION {format.thesis.type}
+{ type empty$
+ {}
+ { pop$
+ type "t" change.case$
+ }
+ if$
+}
+
+FUNCTION {format.tr.number}
+{ type empty$
+ { "Technical Report" }
+ 'type
+ if$
+ number empty$
+ { }
+ { number tie.or.space.connect }
+ if$
+}
+
+FUNCTION {format.article.crossref}
+{ key empty$
+ { journal empty$
+ { "need key or journal for " cite$ * " to crossref " * crossref *
+ warning$
+ ""
+ }
+ { "in {\it " journal * "\/} \cite{" * crossref * "}" *}
+ if$
+ }
+ { add.period$ "In \citeasnoun{" crossref * "}" * }
+ if$
+
+}
+
+FUNCTION {format.book.crossref}
+{ volume empty$
+ { "empty volume in " cite$ * "'s crossref of " * crossref * warning$
+ "in "
+ }
+ { "Vol." volume tie.or.space.connect
+ " of " *
+ }
+ if$
+ editor empty$
+ editor field.or.null author field.or.null =
+ or
+ { key empty$
+ { series empty$
+ { "need editor, key, or series for " cite$ * " to crossref " *
+ crossref * warning$
+ "" *
+ }
+ { "{\it " * series * "\/} \cite{" * crossref * "}" *}
+ if$
+ }
+ { " \citeasnoun{" * crossref * "}" * }
+ if$
+ }
+ { " \citeasnoun{" * crossref * "}" * }
+ if$
+}
+
+FUNCTION {output.incoll.inproc.crossref}
+{ editor empty$
+ editor field.or.null author field.or.null =
+ or
+ { key empty$
+ { booktitle empty$
+ { "need editor, key, or booktitle for " cite$ * " to crossref " *
+ crossref * warning$
+ }
+ { period "In {\it " booktitle * "\/}" * " \cite{" * crossref * "}" * plain.space output.nonnull}
+ if$
+ }
+ { period "In \citeasnoun{" crossref * "}" * plain.space output.nonnull}
+ if$
+ }
+ { period "In \citeasnoun{" crossref * "}" * plain.space output.nonnull}
+ if$
+}
+
+INTEGERS { len }
+
+FUNCTION {chop.word}
+{ 's :=
+ 'len :=
+ s #1 len substring$ =
+ { s len #1 + global.max$ substring$ }
+ 's
+ if$
+}
+
+INTEGERS { author.field editor.field organization.field title.field key.field }
+
+FUNCTION {init.field.constants}
+{ #0 'author.field :=
+ #1 'editor.field :=
+ #2 'organization.field :=
+ #3 'title.field :=
+ #4 'key.field :=
+}
+
+FUNCTION {format.lab.names.abbr}
+{ 'name.list :=
+ name.list num.names$ 'numnames :=
+ numnames #1 >
+ { numnames #2 >
+ { name.list #1 "{vv~}{ll}" format.name$ " et al." * }
+ { name.list #2 "{ff }{vv }{ll}{ jj}" format.name$ "others" =
+ { name.list #1 "{vv~}{ll}" format.name$ " et al." * }
+ { name.list #1 "{vv~}{ll}" format.name$ " and " *
+ name.list #2 "{vv~}{ll}" format.name$ *
+ }
+ if$
+ }
+ if$
+ field.used editor.field = {", eds" *} {} if$
+ }
+ {
+ name.list #1 "{vv~}{ll}" format.name$
+ field.used editor.field = {", ed" *} {} if$
+ }
+ if$
+}
+
+FUNCTION {format.lab.names.full}
+{ 'name.list :=
+ #1 'nameptr :=
+ name.list num.names$ 'numnames :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ { name.list nameptr "{vv~}{ll}" format.name$ 'temp :=
+ nameptr #1 >
+ { namesleft #1 >
+ { ", " * temp * }
+ { temp "others" =
+ { " et~al." * }
+ { " and " * temp * }
+ if$
+ }
+ if$
+ }
+ 'temp
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+ numnames #1 > field.used editor.field = and {", eds" *} {} if$
+ numnames #1 = field.used editor.field = and {", ed" *} {} if$
+}
+
+FUNCTION {make.list.label}
+{ author.field field.used =
+ { format.authors }
+ { editor.field field.used =
+ { format.editors }
+ { organization.field field.used =
+ { "The " #4 organization chop.word}
+ { title.field field.used =
+ { format.btitle }
+ { key.field field.used =
+ { key #3 text.prefix$ }
+ { "Internal error :001 on " cite$ * " label" * warning$ }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+}
+
+FUNCTION {make.full.label}
+{ author.field field.used =
+ { author format.lab.names.full }
+ { editor.field field.used =
+ { editor format.lab.names.full }
+ { organization.field field.used =
+ { "The " #4 organization chop.word #3 text.prefix$ }
+ { title.field field.used =
+ { format.btitle }
+ { key.field field.used =
+ { key #3 text.prefix$ }
+ { "Internal error :001 on " cite$ * " label" * warning$ }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+}
+
+FUNCTION {make.abbr.label}
+{ author.field field.used =
+ { author format.lab.names.abbr }
+ { editor.field field.used =
+ { editor format.lab.names.abbr }
+ { organization.field field.used =
+ { "The " #4 organization chop.word #3 text.prefix$ }
+ { title.field field.used =
+ { format.btitle }
+ { key.field field.used =
+ { key #3 text.prefix$ }
+ { "Internal error :001 on " cite$ * " label" * warning$ }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+}
+
+FUNCTION {output.bibitem}
+{ newline$
+ "\harvarditem[" write$
+ make.abbr.label write$
+ "]{" write$
+ make.full.label write$
+ "}{" write$
+ list.year write$
+ "}{" write$
+ cite$ write$
+ "}" write$
+ newline$
+ ""
+ empty 'separator :=
+ plain 'attribute :=
+
+
+% FUNCTION {list.label.output}
+
+space make.list.label plain.space output.nonnull
+ "n.d." list.year =
+ {}
+ { space "(" list.year * ")" * plain.space output.nonnull}
+ if$
+}
+
+FUNCTION {format.title.if.not.sortkey}
+{title.field field.used =
+ {}
+ { format.title output }
+ if$}
+
+FUNCTION {format.title.if.not.sortkey.check}
+{title.field field.used =
+ {}
+ { format.title "title" output.check }
+ if$}
+
+FUNCTION {article}
+{ output.bibitem
+ author "author" item.check
+ format.title.if.not.sortkey.check
+ crossref missing$
+ { space journal italic space "journal" output.check
+ pages empty$
+ {}
+ {output.vol.num.pages}
+ if$
+ }
+ { space format.article.crossref plain.space output.nonnull
+ comma format.pages plain.space.output
+ }
+ if$
+ fin.entry
+}
+
+FUNCTION {book}
+{ output.bibitem
+ author empty$
+ { editor "author and editor" item.check }
+ { crossref missing$
+ { "author and editor" editor either.or.check }
+ {}
+ if$
+ }
+ if$
+ title.field field.used =
+ {}
+ { space title italic space "title" output.check }
+ if$
+ crossref missing$
+ {
+ space format.number.series plain.space.output
+ comma format.edition plain.space.output
+ comma format.bvolume plain.space.output
+ format.publisher.address
+ }
+ { space format.book.crossref plain.space output.nonnull
+ comma format.edition plain.space.output
+ }
+ if$
+ fin.entry
+}
+
+FUNCTION {booklet}
+{ output.bibitem
+ format.title.if.not.sortkey.check
+ space howpublished plain.space.output
+ space address plain.space.output
+ fin.entry
+}
+
+FUNCTION {inbook}
+{ output.bibitem
+ author empty$
+ { editor "author and editor" item.check }
+ { crossref missing$
+ { "author and editor" editor either.or.check }
+ {}
+ if$
+ }
+ if$
+ title.field field.used =
+ {}
+ { space title italic space "title" output.check }
+ if$
+ crossref missing$
+ { space format.number.series plain.space.output
+ comma format.edition plain.space.output
+ comma format.bvolume plain comma output
+ format.publisher.address
+% space publisher plain.space "publisher" output.check
+% space address plain.space.output
+ }
+ { space format.book.crossref plain.space output.nonnull
+ comma format.edition plain.space.output
+ }
+ if$
+ format.chapter.pages "chapter and pages" output.check
+ fin.entry
+}
+
+FUNCTION {incollection}
+{ output.bibitem
+ format.title.if.not.sortkey.check
+ author "author" item.check
+ crossref missing$
+ { output.in.ed.booktitle
+ comma format.edition plain.space.output
+ comma format.bvolume plain.space.output
+ space format.number.series plain.space.output
+ format.publisher.address
+ }
+ { output.incoll.inproc.crossref }
+ if$
+ space format.chapter.pages plain.space.output
+ fin.entry
+}
+
+FUNCTION {inproceedings}
+{ output.bibitem
+ format.title.if.not.sortkey.check
+ author "author" item.check
+ crossref missing$
+ { output.in.ed.booktitle
+ comma format.bvolume plain.space.output
+ space format.number.series plain.space.output
+ address empty$
+ { space organization plain.space.output
+ space publisher plain.space.output
+ }
+ { space organization plain.space.output
+ space publisher plain.space.output
+ space address plain.space output.nonnull
+ }
+ if$
+ }
+ { output.incoll.inproc.crossref}
+ if$
+ space format.pages plain.space.output
+ fin.entry
+}
+
+FUNCTION {conference} { inproceedings }
+
+FUNCTION {manual}
+{ output.bibitem
+ title.field field.used =
+ {}
+ {author empty$ {comma}{space} if$
+ title italic space "title" output.check }
+ if$
+ organization.field field.used = organization empty$ or
+ {} {space organization plain.space output.nonnull} if$
+ comma format.edition plain.space.output
+ format.publisher.address
+ fin.entry
+}
+
+FUNCTION {mastersthesis}
+{ output.bibitem
+ author "author" item.check
+ format.title.if.not.sortkey.check space "Master's thesis" format.thesis.type plain.space output.nonnull
+ comma school plain.space "school" output.check
+ comma address plain.space.output
+ fin.entry
+}
+
+FUNCTION {misc}
+{ output.bibitem
+ format.title.if.not.sortkey
+ space howpublished plain.space.output
+ fin.entry
+ empty.misc.check
+}
+
+FUNCTION {phdthesis}
+{ output.bibitem
+ author "author" item.check
+ format.title.if.not.sortkey.check
+ space "PhD dissertation" format.thesis.type plain.space output.nonnull
+ comma school plain.space "school" output.check
+ comma address plain.space.output
+ fin.entry
+}
+
+FUNCTION {proceedings}
+{ output.bibitem
+ title.field field.used =
+ {}
+ { space title italic space "title" output.check }
+ if$
+ comma format.bvolume plain.space.output
+ space format.number.series plain.space.output
+ address empty$
+ { editor empty$
+ {}
+ { space organization plain.space.output
+ }
+ if$
+ space publisher plain.space.output
+ }
+ { editor empty$
+ {}
+ { space organization plain.space.output }
+ if$
+ space publisher plain.space.output
+ space address plain.space output.nonnull
+ }
+ if$
+ fin.entry
+}
+
+FUNCTION {techreport}
+{ output.bibitem
+ author "author" item.check
+ format.title.if.not.sortkey.check
+ space format.tr.number plain.space output.nonnull
+ institution empty$
+ {}
+ { comma institution plain.space "institution" output.check }
+ if$
+ comma address plain.space.output
+ comma month plain.space.output
+ fin.entry
+}
+
+FUNCTION {unpublished}
+{ output.bibitem
+ author "author" item.check
+ format.title.if.not.sortkey.check
+ note "note" item.check
+ fin.entry
+}
+
+FUNCTION {default.type} { misc }
+
+MACRO {jan} {"January"}
+
+MACRO {feb} {"February"}
+
+MACRO {mar} {"March"}
+
+MACRO {apr} {"April"}
+
+MACRO {may} {"May"}
+
+MACRO {jun} {"June"}
+
+MACRO {jul} {"July"}
+
+MACRO {aug} {"August"}
+
+MACRO {sep} {"September"}
+
+MACRO {oct} {"October"}
+
+MACRO {nov} {"November"}
+
+MACRO {dec} {"December"}
+
+READ
+
+EXECUTE {init.field.constants}
+
+FUNCTION {sortify}
+{ purify$
+ "l" change.case$
+}
+
+FUNCTION {author.key.label}
+{ author empty$
+ { title empty$
+ { key.field 'field.used := }
+ { title.field 'field.used := }
+ if$
+ }
+ { author.field 'field.used := }
+ if$
+}
+
+FUNCTION {author.editor.key.label}
+{ author empty$
+ { editor empty$
+ { title empty$
+ { key.field 'field.used := }
+ { title.field 'field.used := }
+ if$
+ }
+ { editor.field 'field.used := }
+ if$
+ }
+ { author.field 'field.used := }
+ if$
+}
+
+FUNCTION {author.key.organization.label}
+{ author empty$
+ { organization empty$
+ { title empty$
+ { key.field 'field.used := }
+ { title.field 'field.used := }
+ if$
+ }
+ { organization.field 'field.used := }
+ if$
+ }
+ { author.field 'field.used := }
+ if$
+}
+
+FUNCTION {editor.key.organization.label}
+{ editor empty$
+ { organization empty$
+ { title empty$
+ { key.field 'field.used := }
+ { title.field 'field.used := }
+ if$
+ }
+ { organization.field 'field.used := }
+ if$
+ }
+ { editor.field 'field.used := }
+ if$
+}
+
+FUNCTION {sort.format.title}
+{ 'temp :=
+ "A " #2
+ "An " #3
+ "The " #4 temp chop.word
+ chop.word
+ chop.word
+ sortify
+ #1 global.max$ substring$
+}
+
+FUNCTION {calc.label}
+{ type$ "book" =
+ type$ "inbook" =
+ or
+ 'author.editor.key.label
+ { type$ "proceedings" =
+ 'editor.key.organization.label
+ { type$ "manual" =
+ 'author.key.organization.label
+ 'author.key.label
+ if$
+ }
+ if$
+ }
+ if$
+ make.abbr.label
+ title.field field.used =
+ { sort.format.title }
+ { sortify }
+ if$
+ year field.or.null purify$ #-1 #4 substring$ sortify
+ *
+ 'sort.label :=
+}
+
+FUNCTION {first.presort}
+{ calc.label
+ sort.label
+ title.field field.used =
+ {}
+ { " "
+ *
+ make.list.label sortify
+ *
+ " "
+ *
+ title field.or.null
+ sort.format.title
+ *
+ }
+ if$
+ #1 entry.max$ substring$
+ 'sort.key$ :=
+}
+
+ITERATE {first.presort}
+
+SORT
+
+STRINGS { last.sort.label next.extra }
+
+INTEGERS { last.extra.num }
+
+FUNCTION {initialize.last.extra.num}
+{ #0 int.to.chr$ 'last.sort.label :=
+ "" 'next.extra :=
+ #0 'last.extra.num :=
+}
+
+FUNCTION {forward.pass}
+{ last.sort.label sort.label =
+ { last.extra.num #1 + 'last.extra.num :=
+ last.extra.num int.to.chr$ 'extra.label :=
+ }
+ { "a" chr.to.int$ 'last.extra.num :=
+ "" 'extra.label :=
+ sort.label 'last.sort.label :=
+ }
+ if$
+}
+
+FUNCTION {reverse.pass}
+{ next.extra "b" =
+ { "a" 'extra.label := }
+ {}
+ if$
+ year empty$
+ { "n.d." extra.label * 'list.year := }
+ { year extra.label * 'list.year := }
+ if$
+ extra.label 'next.extra :=
+}
+
+EXECUTE {initialize.last.extra.num}
+
+ITERATE {forward.pass}
+
+REVERSE {reverse.pass}
+
+FUNCTION {second.presort}
+{ make.list.label
+ title.field field.used =
+ { sort.format.title }
+ { sortify }
+ if$
+ " "
+ *
+ list.year field.or.null sortify
+ *
+ " "
+ *
+ title.field field.used =
+ {}
+ { title field.or.null
+ sort.format.title
+ *
+ }
+ if$
+ #1 entry.max$ substring$
+ 'sort.key$ :=
+}
+
+ITERATE {second.presort}
+
+SORT
+
+STRINGS { prev.author }
+
+INTEGERS { number.label }
+
+FUNCTION {initialize.longest.label}
+{
+ #1 'number.label :=
+ "abcxyz" 'prev.author :=
+}
+
+FUNCTION {longest.label.pass}
+{
+author empty$ { editor empty$ {"foo"} {editor} if$} {author} if$
+ prev.author =
+ { "\bysame" 'extra.label := }
+ { "" 'extra.label :=
+author empty$ { editor empty$ {"abcxyz"} {editor} if$} {author} if$
+ 'prev.author :=
+ }
+ if$
+}
+
+EXECUTE {initialize.longest.label}
+
+ITERATE {longest.label.pass}
+
+FUNCTION {begin.bib}
+{ preamble$ empty$
+ {}
+ { preamble$ write$ newline$ }
+ if$
+ "\ifx\undefined\bysame" write$ newline$
+ "\newcommand{\bysame}{\leavevmode\hbox to\leftmargin{\hrulefill\,\,}}"
+ write$ newline$
+ "\fi" write$ newline$
+ "\begin{thebibliography}{xx}" write$ newline$
+}
+
+EXECUTE {begin.bib}
+
+EXECUTE {init.state.consts}
+
+ITERATE {call.type$}
+
+FUNCTION {end.bib}
+ {newline$ "\end{thebibliography}" write$ newline$ }
+
+EXECUTE {end.bib}
+
diff --git a/biblio/bibtex/contrib/economic/cje.sty b/biblio/bibtex/contrib/economic/cje.sty
new file mode 100644
index 0000000000..356c9de5d9
--- /dev/null
+++ b/biblio/bibtex/contrib/economic/cje.sty
@@ -0,0 +1,21 @@
+\message{Document style option `cje.sty' (29 May 1993) for LaTeX 2.09.}
+\textwidth=28pc
+\textheight=46pc
+
+\def\bysame{\leavevmode\hbox to\leftmargin{\leaders\hrule height 3pt depth -2.5pt\hfill\,\,}}
+
+\def\thebibliography#1{\section*{\refname\@mkboth
+ {\uppercase{\refname}}{\uppercase{\refname}}}\list
+ {\@biblabel{\arabic{enumiv}}}{\labelwidth=12pt
+ \labelsep=0pt
+ \leftmargin\labelwidth
+ \advance\leftmargin\labelsep
+ \itemsep=0pt\parsep=0pt
+ \usecounter{enumiv}%
+ \let\p@enumiv\@empty
+ \def\theenumiv{\arabic{enumiv}}}%
+ \def\newblock{\hskip .11em plus.33em minus.07em}%
+ \sloppy\clubpenalty4000\widowpenalty4000
+ \raggedright
+ \sfcode`\.=1000\relax}
+
diff --git a/biblio/bibtex/contrib/economic/ecca-ex.bib b/biblio/bibtex/contrib/economic/ecca-ex.bib
new file mode 100644
index 0000000000..c1cb4b09b9
--- /dev/null
+++ b/biblio/bibtex/contrib/economic/ecca-ex.bib
@@ -0,0 +1,142 @@
+This file was created with JabRef 2.2.
+Encoding: ISO8859_1
+
+@INCOLLECTION{allen95,
+ author = {F. Allen and A. Winton},
+ title = {Corporate Financial Structure, Incentives and Optimal Contracting},
+ booktitle = {Handbooks in Operations Research and Management Science},
+ publisher = {Elsevier},
+ year = {1995},
+ editor = {R. A. Jarrow and V. Maksomivic and W. T. Ziemba},
+ volume = {9},
+ chapter = {Finance},
+ address = {New York}
+}
+
+@BOOK{atkinson92,
+ title = {Empirical Studies of Earnings Mobility},
+ publisher = {Harwood},
+ year = {1992},
+ author = {A. B. Atkinson and F. Bourguignon and C. Morrisson},
+ address = {New York}
+}
+
+@ARTICLE{bernanke88,
+ author = {B. Bernanke and A. Blinder},
+ title = {Credit, Money and Aggregate Demand},
+ journal = {American Economic Review, Papers and Proceedings},
+ year = {1988},
+ volume = {78},
+ pages = {435-9},
+ owner = {Arne},
+ timestamp = {2007.05.09}
+}
+
+@ARTICLE{bernanke95,
+ author = {B. Bernanke and M. Gertler},
+ title = {Inside the Black Box: The Credit Channel of Monetary Policy Transmission},
+ journal = {Journal of Economic Perspectives},
+ year = {1995},
+ volume = {9},
+ pages = {27-48},
+ number = {4},
+ owner = {Arne},
+ timestamp = {2007.05.09}
+}
+
+@ARTICLE{bernanke96,
+ author = {B. Bernanke and M. Gertler and S. Gilchrist},
+ title = {The Financial Accelerator and the Flight to Quality},
+ journal = {Review of Economics and Statistics},
+ year = {1996},
+ volume = {78},
+ pages = {1-152},
+ owner = {Arne},
+ timestamp = {2007.05.09}
+}
+
+@BOOK{brown00,
+ title = {My Favourite Brown Book},
+ publisher = {Brownpress},
+ year = {2000},
+ author = {Bobby Brown},
+ address = {Brownington},
+ owner = {Arne},
+ timestamp = {2007.05.09}
+}
+
+@INCOLLECTION{brown00a,
+ author = {Bobby Brown and Sally Smith},
+ title = {Econometric Analysis of the Banking Sector},
+ booktitle = {Quantitative Economic Analysis},
+ publisher = {Smith Publishing},
+ year = {2000},
+ editor = {Mary Miller},
+ pages = {12-34},
+ address = {Paris},
+ owner = {Arne},
+ timestamp = {2007.05.09}
+}
+
+@ARTICLE{jones99,
+ author = {John Jones},
+ title = {Estimation of Demand Elasticities},
+ journal = {My Favourite Journal},
+ year = {1999},
+ volume = {77},
+ pages = {77-99},
+ owner = {Arne},
+ timestamp = {2007.05.09}
+}
+
+@TECHREPORT{jones99a,
+ author = {John Jones},
+ title = {Estimation of Demand Curves},
+ institution = {Jones University},
+ year = {1999},
+ type = {Working Paper},
+ number = {234},
+ owner = {Arne},
+ timestamp = {2007.05.09}
+}
+
+@ARTICLE{jones98,
+ author = {John Jones and Sally Smith and Whitney White},
+ title = {Inefficiencies in the Banking Sector},
+ journal = {American Journal of Efficiency in Banking},
+ year = {1998},
+ volume = {58},
+ pages = {56-78},
+ owner = {Arne},
+ timestamp = {2007.05.09}
+}
+
+@ARTICLE{klein04,
+ author = {Susan Klein and Sally Smith and Whitney White},
+ title = {The {American} Tax System},
+ journal = {Journal of International Taxation},
+ year = {2004},
+ volume = {2},
+ pages = {134-156},
+ owner = {Arne},
+ timestamp = {2007.05.12}
+}
+
+@BOOK{klein06,
+ title = {{GDP} Growth in the {EU}},
+ publisher = {European Science Publishers},
+ year = {2006},
+ author = {Susan Klein and Whitney White},
+ address = {London},
+ owner = {Arne},
+ timestamp = {2007.05.12}
+}
+
+@comment{jabref-meta: selector_journal:}
+
+@comment{jabref-meta: selector_author:}
+
+@comment{jabref-meta: selector_keywords:}
+
+@comment{jabref-meta: selector_publisher:}
+
diff --git a/biblio/bibtex/contrib/economic/ecca-ex.pdf b/biblio/bibtex/contrib/economic/ecca-ex.pdf
new file mode 100644
index 0000000000..9ab786e16e
--- /dev/null
+++ b/biblio/bibtex/contrib/economic/ecca-ex.pdf
Binary files differ
diff --git a/biblio/bibtex/contrib/economic/ecca-ex.tex b/biblio/bibtex/contrib/economic/ecca-ex.tex
new file mode 100644
index 0000000000..a11af99e1b
--- /dev/null
+++ b/biblio/bibtex/contrib/economic/ecca-ex.tex
@@ -0,0 +1,183 @@
+\documentclass[endfloat]{ecca}
+\usepackage[T1]{fontenc}
+\usepackage[latin1]{inputenc}
+\usepackage{csquotes}
+\MakeInnerQuote{"}
+
+\usepackage{hyperref}
+\hypersetup{%
+ colorlinks = {true},
+ urlcolor = {blue},
+ linkcolor = {black},
+ citecolor = {black},
+ pdfauthor = {Arne Henningsen},
+ pdftitle = {Testing LaTeX class and BibTeX style for the
+ Journal Economica (ECCA)},
+ pdfkeywords = {Economica, BibTeX, LaTeX}
+}
+
+\usepackage{multido}
+
+\title{Testing \LaTeX{} class and Bib\TeX{} style for the
+ Journal ``Economica'' (ECCA)}
+\author{Arne Henningsen \and{} Jim Nobody}
+\keywords{Economica, BibTeX, LaTeX}
+\jelclass{A1, B2, C3}
+
+\begin{document}
+
+\maketitle
+
+\begin{abstract}
+\multido{}{15}{This is an abstract. }
+\end{abstract}
+
+\section*{Introduction}
+
+The first section header should not be numbered.
+Hence, use the starred \texttt{\textbackslash{}section} command
+for the header of this section,
+i.e.\ \texttt{\textbackslash{}section$^*$\{Introduction\}}.
+Type all (foot)notes at the end of the paper.%
+\footnote{
+\multido{}{5}{This is automatically done with the "endnote" package. }
+}
+Place (long) tables and figures at the end of the paper
+(see figure~\ref{fig:dummy} and table~\ref{tab:citations}).
+You can use the class option "\texttt{endfloat}" to move
+all float environments (figures and tables)
+to the end of the output file,
+i.e. use \texttt{\textbackslash{}documentclass[endfloat]\{ecca\}}.
+
+\begin{figure}[htbp]
+\centering
+\fbox{\parbox{0.6 \textwidth}{\centering
+ \vspace{0.2 \textwidth}
+ This is not a figure.
+ \vspace{0.2 \textwidth}
+}}
+\medskip\\
+Note: Do not forget to center your figures,
+i.e.\ use command \texttt{\textbackslash{}centering}.
+\caption{Dummy figure}
+\label{fig:dummy}
+\end{figure}
+
+\begin{figure}[htbp]
+\centering
+\fbox{\parbox{0.6 \textwidth}{\centering
+ \vspace{0.2 \textwidth}
+ This is not a figure, too.
+ \vspace{0.2 \textwidth}
+}}
+\caption{Figure with \multido{}{40}{very } long title}
+\label{fig:long-title}
+\end{figure}
+
+
+\section{Manuscript Formatting}
+The manuscript formatting instructions are available at
+\url{http://www.blackwellpublishing.com/ecca}.
+
+
+\section{Citations}
+\subsection{Citations in Text}
+
+\citeauthor{brown00} in a paper on \ldots
+
+\citet[p.~12]{brown00} has shown that \ldots
+
+A proof is given by \citet{jones98}.
+
+An overview is available in table~\ref{tab:citations}.
+
+\begin{table}[htbp]
+\centering
+\caption{Citations}
+\label{tab:citations}
+\begin{tabular}{lll}
+\hline
+Author(s) & Year & Citation\\
+\hline
+\citeauthor{brown00} & \citeyear{brown00} & \citet{brown00}\\
+\citeauthor{jones99} & \citeyear{jones99} & \citet{jones99}\\
+\citeauthor{jones99a} & \citeyear{jones99a} & \citet{jones99a}\\
+\citeauthor{brown00a} & \citeyear{brown00a} & \citet{brown00a}\\
+\citeauthor{jones98} & \citeyear{jones98} & \citet{jones98}\\
+\citeauthor{allen95} & \citeyear{allen95} & \citet{allen95}\\
+\citeauthor{atkinson92} & \citeyear{atkinson92} & \citet{atkinson92}\\
+\citeauthor{bernanke88} & \citeyear{bernanke88} & \citet{bernanke88}\\
+\citeauthor{bernanke95} & \citeyear{bernanke95} & \citet{bernanke95}\\
+\citeauthor{bernanke96} & \citeyear{bernanke96} & \citet{bernanke96}\\
+\hline
+\end{tabular}
+\medskip \\
+Notes: Do not use vertical lines in tables;
+do not forget to center your tables,
+i.e.\ use command \texttt{\textbackslash{}centering}.
+\end{table}
+
+
+\subsection{Citations in Parenthesis}
+
+This method has been criticised \citep{jones99a, jones99, brown00a}.
+
+
+\section{Equations}
+All displayed equations should be left-justified
+and --- where necessary --- numbered consecutively (on the left).
+\begin{equation}
+y = a + X b
+\end{equation}
+where $a$ is a scalar,
+$y$ and $b$ are vectors,
+and $X$ is a matrix.
+
+Now, we have an unnumbered equation
+\begin{equation*}
+\theta = \alpha + \Psi \beta
+\end{equation*}
+where $\alpha$ is a scalar,
+$\theta$ and $\beta$ are vectors,
+and $\Psi$ is a matrix.
+
+
+\section{Quotation Marks}
+The "Economica" requires single quotes.
+You can get pretty (typographically correct) quotation marks
+by adding the commands
+\verb!\usepackage{csquotes}!
+and
+\verb!\MakeInnerQuote{"}!
+in your preamble and use the \verb!"! sign for quation marks in your text.
+
+
+\section*{Acknowledgements}
+
+The Bib\TeX{} code to replace repeated author names by multiple dashes
+in the list of references has been kindly provided by
+Joseph A.\ Wright (\url{joseph.wright@morningstar2.co.uk}).
+
+
+\listofendnotes
+
+\appendix
+
+\section{Websites of the "Economica"}
+\begin{itemize}
+\item \url{http://www.blackwellpublishing.com/ecca}
+\item \url{http://darp.lse.ac.uk/Frankweb/Economica/EconomicaHome.htm}
+\end{itemize}
+
+\section{Proofs}
+\begin{equation*}
+14 = 2 \cdot 7 = 2 ( 3 + 4 ) = 2 \cdot 3 + 2 \cdot 4 = 6 + 8 = 14
+\end{equation*}
+
+
+\nocite{*}
+
+\bibliographystyle{ecca}
+\bibliography{ecca-ex}
+
+\end{document}
diff --git a/biblio/bibtex/contrib/economic/ecca.bst b/biblio/bibtex/contrib/economic/ecca.bst
new file mode 100644
index 0000000000..1b1404a7fd
--- /dev/null
+++ b/biblio/bibtex/contrib/economic/ecca.bst
@@ -0,0 +1,1655 @@
+%%% Journal "Economica" (ECCA)
+%%% bibliography style for use with LaTeX2e
+%%% version: 1.2 (15 May 2007)
+%%% license: LaTeX Project Public License (see below)
+%%% This file was created with makebst (see below) and modified
+%%% by Arne Henningsen.
+%%% The code to replace repeated author names by multiple dashes
+%%% has been kindly provided by
+%%% Joseph A. Wright <joseph.wright@morningstar2.co.uk>
+%%%
+%%% Note: This is an unofficial style file that may not fully comply
+%%% with the Guidelines of Economica in every detail.
+%%% Please report any problems at
+%%% http://sourceforge.net/projects/economtex/
+%%% Further information is available at
+%%% http://economtex.wiki.sourceforge.net/
+%%%
+%%% It is recommended to use the document class "ecca"
+%%%
+%%% Websites of the "Economica":
+%%% http://www.blackwellpublishing.com/ecca
+%%% http://darp.lse.ac.uk/Frankweb/Economica/EconomicaHome.htm
+%%
+%% This is file `ecca.bst',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% merlin.mbs (with options: `ay,nat,nm-rev,jnrlst,nmdash,nmft,nmft-sc,nmand-rm,keyxyr,blkyear,dt-beg,yr-par,yrp-per,yrpp-xsp,note-yr,trtit-b,vol-bf,vnum-sp,volp-com,num-xser,numser,ser-vol,add-pub,pre-pub,edpar,blk-tit,pp,ed,abr,ord,and-xcom,etal-it,em-it,nfss,')
+%% ----------------------------------------
+%% *** Journal Economica ***
+%%
+%% Copyright 1994-2004 Patrick W Daly
+ % ===============================================================
+ % IMPORTANT NOTICE:
+ % This bibliographic style (bst) file has been generated from one or
+ % more master bibliographic style (mbs) files, listed above.
+ %
+ % This generated file can be redistributed and/or modified under the terms
+ % of the LaTeX Project Public License Distributed from CTAN
+ % archives in directory macros/latex/base/lppl.txt; either
+ % version 1 of the License, or any later version.
+ % ===============================================================
+ % Name and version information of the main mbs file:
+ % \ProvidesFile{merlin.mbs}[2004/02/09 4.13 (PWD, AO, DPC)]
+ % For use with BibTeX version 0.99a or later
+ %-------------------------------------------------------------------
+ % This bibliography style file is intended for texts in ENGLISH
+ % This is an author-year citation style bibliography. As such, it is
+ % non-standard LaTeX, and requires a special package file to function properly.
+ % Such a package is natbib.sty by Patrick W. Daly
+ % The form of the \bibitem entries is
+ % \bibitem[Jones et al.(1990)]{key}...
+ % \bibitem[Jones et al.(1990)Jones, Baker, and Smith]{key}...
+ % The essential feature is that the label (the part in brackets) consists
+ % of the author names, as they should appear in the citation, with the year
+ % in parentheses following. There must be no space before the opening
+ % parenthesis!
+ % With natbib v5.3, a full list of authors may also follow the year.
+ % In natbib.sty, it is possible to define the type of enclosures that is
+ % really wanted (brackets or parentheses), but in either case, there must
+ % be parentheses in the label.
+ % The \cite command functions as follows:
+ % \citet{key} ==>> Jones et al. (1990)
+ % \citet*{key} ==>> Jones, Baker, and Smith (1990)
+ % \citep{key} ==>> (Jones et al., 1990)
+ % \citep*{key} ==>> (Jones, Baker, and Smith, 1990)
+ % \citep[chap. 2]{key} ==>> (Jones et al., 1990, chap. 2)
+ % \citep[e.g.][]{key} ==>> (e.g. Jones et al., 1990)
+ % \citep[e.g.][p. 32]{key} ==>> (e.g. Jones et al., p. 32)
+ % \citeauthor{key} ==>> Jones et al.
+ % \citeauthor*{key} ==>> Jones, Baker, and Smith
+ % \citeyear{key} ==>> 1990
+ %---------------------------------------------------------------------
+
+ENTRY
+ { address
+ author
+ booktitle
+ chapter
+ edition
+ editor
+ eid
+ howpublished
+ institution
+ journal
+ key
+ month
+ note
+ number
+ organization
+ pages
+ publisher
+ school
+ series
+ title
+ type
+ volume
+ year
+ }
+ {}
+ { label extra.label sort.label short.list }
+INTEGERS { output.state before.all mid.sentence after.sentence after.block }
+FUNCTION {init.state.consts}
+{ #0 'before.all :=
+ #1 'mid.sentence :=
+ #2 'after.sentence :=
+ #3 'after.block :=
+}
+STRINGS { s t}
+FUNCTION {output.nonnull}
+{ 's :=
+ output.state mid.sentence =
+ { ", " * write$ }
+ { output.state after.block =
+ { add.period$ write$
+ newline$
+ "\newblock " write$
+ }
+ { output.state before.all =
+ 'write$
+ { add.period$ " " * write$ }
+ if$
+ }
+ if$
+ mid.sentence 'output.state :=
+ }
+ if$
+ s
+}
+FUNCTION {output}
+{ duplicate$ empty$
+ 'pop$
+ 'output.nonnull
+ if$
+}
+FUNCTION {output.check}
+{ 't :=
+ duplicate$ empty$
+ { pop$ "empty " t * " in " * cite$ * warning$ }
+ 'output.nonnull
+ if$
+}
+FUNCTION {fin.entry}
+{ add.period$
+ write$
+ newline$
+}
+
+FUNCTION {new.block}
+{ output.state before.all =
+ 'skip$
+ { after.block 'output.state := }
+ if$
+}
+FUNCTION {new.sentence}
+{ output.state after.block =
+ 'skip$
+ { output.state before.all =
+ 'skip$
+ { after.sentence 'output.state := }
+ if$
+ }
+ if$
+}
+FUNCTION {add.blank}
+{ " " * before.all 'output.state :=
+}
+
+FUNCTION {no.blank.or.punct}
+{ "\hspace{0pt}" * before.all 'output.state :=
+}
+
+FUNCTION {date.block}
+{
+ new.sentence
+}
+
+FUNCTION {not}
+{ { #0 }
+ { #1 }
+ if$
+}
+FUNCTION {and}
+{ 'skip$
+ { pop$ #0 }
+ if$
+}
+FUNCTION {or}
+{ { pop$ #1 }
+ 'skip$
+ if$
+}
+FUNCTION {new.block.checkb}
+{ empty$
+ swap$ empty$
+ and
+ 'skip$
+ 'new.block
+ if$
+}
+FUNCTION {field.or.null}
+{ duplicate$ empty$
+ { pop$ "" }
+ 'skip$
+ if$
+}
+FUNCTION {emphasize}
+{ duplicate$ empty$
+ { pop$ "" }
+ { "\textit{" swap$ * "}" * }
+ if$
+}
+FUNCTION {bolden}
+{ duplicate$ empty$
+ { pop$ "" }
+ { "\textbf{" swap$ * "}" * }
+ if$
+}
+FUNCTION {scaps}
+{ duplicate$ empty$
+ { pop$ "" }
+ { "\textsc{" swap$ * "}" * }
+ if$
+}
+FUNCTION {bib.name.font}
+{ scaps }
+FUNCTION {bib.fname.font}
+{ bib.name.font }
+FUNCTION {tie.or.space.prefix}
+{ duplicate$ text.length$ #3 <
+ { "~" }
+ { " " }
+ if$
+ swap$
+}
+
+FUNCTION {capitalize}
+{ "u" change.case$ "t" change.case$ }
+
+FUNCTION {space.word}
+{ " " swap$ * " " * }
+ % Here are the language-specific definitions for explicit words.
+ % Each function has a name bbl.xxx where xxx is the English word.
+ % The language selected here is ENGLISH
+FUNCTION {bbl.and}
+{ "and"}
+
+FUNCTION {bbl.etal}
+{ "et~al." }
+
+FUNCTION {bbl.editors}
+{ "eds." }
+
+FUNCTION {bbl.editor}
+{ "ed." }
+
+FUNCTION {bbl.edby}
+{ "edited by" }
+
+FUNCTION {bbl.edition}
+{ "edn." }
+
+FUNCTION {bbl.volume}
+{ "vol." }
+
+FUNCTION {bbl.of}
+{ "of" }
+
+FUNCTION {bbl.number}
+{ "no." }
+
+FUNCTION {bbl.nr}
+{ "no." }
+
+FUNCTION {bbl.in}
+{ "in" }
+
+FUNCTION {bbl.pages}
+{ "pp." }
+
+FUNCTION {bbl.page}
+{ "p." }
+
+FUNCTION {bbl.chapter}
+{ "chap." }
+
+FUNCTION {bbl.techrep}
+{ "Tech. Rep." }
+
+FUNCTION {bbl.mthesis}
+{ "Master's thesis" }
+
+FUNCTION {bbl.phdthesis}
+{ "Ph.D. thesis" }
+
+FUNCTION {bbl.first}
+{ "1st" }
+
+FUNCTION {bbl.second}
+{ "2nd" }
+
+FUNCTION {bbl.third}
+{ "3rd" }
+
+FUNCTION {bbl.fourth}
+{ "4th" }
+
+FUNCTION {bbl.fifth}
+{ "5th" }
+
+FUNCTION {bbl.st}
+{ "st" }
+
+FUNCTION {bbl.nd}
+{ "nd" }
+
+FUNCTION {bbl.rd}
+{ "rd" }
+
+FUNCTION {bbl.th}
+{ "th" }
+
+MACRO {jan} {"Jan."}
+
+MACRO {feb} {"Feb."}
+
+MACRO {mar} {"Mar."}
+
+MACRO {apr} {"Apr."}
+
+MACRO {may} {"May"}
+
+MACRO {jun} {"Jun."}
+
+MACRO {jul} {"Jul."}
+
+MACRO {aug} {"Aug."}
+
+MACRO {sep} {"Sep."}
+
+MACRO {oct} {"Oct."}
+
+MACRO {nov} {"Nov."}
+
+MACRO {dec} {"Dec."}
+
+FUNCTION {eng.ord}
+{ duplicate$ "1" swap$ *
+ #-2 #1 substring$ "1" =
+ { bbl.th * }
+ { duplicate$ #-1 #1 substring$
+ duplicate$ "1" =
+ { pop$ bbl.st * }
+ { duplicate$ "2" =
+ { pop$ bbl.nd * }
+ { "3" =
+ { bbl.rd * }
+ { bbl.th * }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+}
+
+MACRO {acmcs} {"ACM Computing Surveys"}
+
+MACRO {acta} {"Acta Informatica"}
+
+MACRO {cacm} {"Communications of the ACM"}
+
+MACRO {ibmjrd} {"IBM Journal of Research and Development"}
+
+MACRO {ibmsj} {"IBM Systems Journal"}
+
+MACRO {ieeese} {"IEEE Transactions on Software Engineering"}
+
+MACRO {ieeetc} {"IEEE Transactions on Computers"}
+
+MACRO {ieeetcad}
+ {"IEEE Transactions on Computer-Aided Design of Integrated Circuits"}
+
+MACRO {ipl} {"Information Processing Letters"}
+
+MACRO {jacm} {"Journal of the ACM"}
+
+MACRO {jcss} {"Journal of Computer and System Sciences"}
+
+MACRO {scp} {"Science of Computer Programming"}
+
+MACRO {sicomp} {"SIAM Journal on Computing"}
+
+MACRO {tocs} {"ACM Transactions on Computer Systems"}
+
+MACRO {tods} {"ACM Transactions on Database Systems"}
+
+MACRO {tog} {"ACM Transactions on Graphics"}
+
+MACRO {toms} {"ACM Transactions on Mathematical Software"}
+
+MACRO {toois} {"ACM Transactions on Office Information Systems"}
+
+MACRO {toplas} {"ACM Transactions on Programming Languages and Systems"}
+
+MACRO {tcs} {"Theoretical Computer Science"}
+FUNCTION {bibinfo.check}
+{ swap$
+ duplicate$ missing$
+ {
+ pop$ pop$
+ ""
+ }
+ { duplicate$ empty$
+ {
+ swap$ pop$
+ }
+ { swap$
+ pop$
+ }
+ if$
+ }
+ if$
+}
+FUNCTION {bibinfo.warn}
+{ swap$
+ duplicate$ missing$
+ {
+ swap$ "missing " swap$ * " in " * cite$ * warning$ pop$
+ ""
+ }
+ { duplicate$ empty$
+ {
+ swap$ "empty " swap$ * " in " * cite$ * warning$
+ }
+ { swap$
+ pop$
+ }
+ if$
+ }
+ if$
+}
+STRINGS { bibinfo }
+INTEGERS { nameptr namesleft numnames lastmatch }
+
+STRINGS { oldnames namestring currentname exname exnametmp }
+INTEGERS { namecnt position }
+
+% This function builds up a list of names with no formatting.
+% The names are separtaed by semi-colons for easy unpicking
+FUNCTION {store.name}
+{ duplicate$
+ namestring swap$
+ ";" * *
+ 'namestring :=
+}
+
+FUNCTION {extract.name}
+{ #0 'namecnt :=
+ #0 'position :=
+ "" 'exnametmp :=
+ { oldnames text.length$ position >
+ nameptr namecnt > and }
+ { position #1 + 'position :=
+ oldnames position #1 substring$
+ duplicate$ ";" =
+ { pop$
+ namecnt #1 + 'namecnt :=
+ exnametmp 'exname :=
+ "" 'exnametmp := }
+ { exnametmp swap$ *
+ 'exnametmp := }
+ if$
+ }
+ while$
+ exname
+}
+
+FUNCTION {compare.name}
+{ duplicate$ 'currentname :=
+ nameptr #1 - lastmatch =
+ { extract.name currentname =
+ { pop$ "---"
+ nameptr 'lastmatch := }
+ 'skip$
+ if$
+ }
+ 'skip$
+ if$
+}
+
+FUNCTION {format.names}
+{ 'bibinfo :=
+ duplicate$ empty$ 'skip$ {
+ namestring 'oldnames := % Copy the stored names to the oldnames list
+ "" 'namestring := % and blank the current name string
+ 's :=
+ "" 't :=
+ #1 'nameptr :=
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ { s nameptr
+ "{vv~}{ll}{, f.}{, jj}"
+ format.name$
+ store.name
+ compare.name % Save the current name to our storage list
+ bib.name.font
+ bibinfo bibinfo.check
+ 't :=
+ nameptr #1 >
+ {
+ namesleft #1 >
+ { ", " * t * }
+ {
+ s nameptr "{ll}" format.name$ duplicate$ "others" =
+ { 't := }
+ { pop$ }
+ if$
+ t "others" =
+ {
+ " " * bbl.etal emphasize *
+ }
+ {
+ bbl.and
+ space.word * t *
+ }
+ if$
+ }
+ if$
+ }
+ 't
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+ #0 'lastmatch :=
+ }
+ if$
+}
+
+FUNCTION {format.names.ed}
+{
+ 'bibinfo :=
+ duplicate$ empty$ 'skip$ {
+ 's :=
+ "" 't :=
+ #1 'nameptr :=
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ { s nameptr
+ "{f.~}{vv~}{ll}{, jj}"
+ format.name$
+ bibinfo bibinfo.check
+ 't :=
+ nameptr #1 >
+ {
+ namesleft #1 >
+ { ", " * t * }
+ {
+ s nameptr "{ll}" format.name$ duplicate$ "others" =
+ { 't := }
+ { pop$ }
+ if$
+ t "others" =
+ {
+
+ " " * bbl.etal emphasize *
+ }
+ {
+ bbl.and
+ space.word * t *
+ }
+ if$
+ }
+ if$
+ }
+ 't
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+ } if$
+}
+FUNCTION {format.key}
+{ empty$
+ { key field.or.null }
+ { "" }
+ if$
+}
+
+FUNCTION {format.authors}
+{ author "author" format.names
+}
+FUNCTION {get.bbl.editor}
+{ editor num.names$ #1 > 'bbl.editors 'bbl.editor if$ }
+
+FUNCTION {format.editors}
+{ editor "editor" format.names duplicate$ empty$ 'skip$
+ {
+ " " *
+ get.bbl.editor
+ "(" swap$ * ")" *
+ *
+ }
+ if$
+}
+FUNCTION {format.note}
+{
+ note empty$
+ { "" }
+ { note #1 #1 substring$
+ duplicate$ "{" =
+ 'skip$
+ { output.state mid.sentence =
+ { "l" }
+ { "u" }
+ if$
+ change.case$
+ }
+ if$
+ note #2 global.max$ substring$ * "note" bibinfo.check
+ }
+ if$
+}
+
+FUNCTION {format.title}
+{ title
+ duplicate$ empty$ 'skip$
+ { "t" change.case$ }
+ if$
+ "title" bibinfo.check
+}
+FUNCTION {format.full.names}
+{'s :=
+ "" 't :=
+ #1 'nameptr :=
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ { s nameptr
+ "{vv~}{ll}" format.name$
+ 't :=
+ nameptr #1 >
+ {
+ namesleft #1 >
+ { ", " * t * }
+ {
+ s nameptr "{ll}" format.name$ duplicate$ "others" =
+ { 't := }
+ { pop$ }
+ if$
+ t "others" =
+ {
+ " " * bbl.etal emphasize *
+ }
+ {
+ bbl.and
+ space.word * t *
+ }
+ if$
+ }
+ if$
+ }
+ 't
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+}
+
+FUNCTION {author.editor.key.full}
+{ author empty$
+ { editor empty$
+ { key empty$
+ { cite$ #1 #3 substring$ }
+ 'key
+ if$
+ }
+ { editor format.full.names }
+ if$
+ }
+ { author format.full.names }
+ if$
+}
+
+FUNCTION {author.key.full}
+{ author empty$
+ { key empty$
+ { cite$ #1 #3 substring$ }
+ 'key
+ if$
+ }
+ { author format.full.names }
+ if$
+}
+
+FUNCTION {editor.key.full}
+{ editor empty$
+ { key empty$
+ { cite$ #1 #3 substring$ }
+ 'key
+ if$
+ }
+ { editor format.full.names }
+ if$
+}
+
+FUNCTION {make.full.names}
+{ type$ "book" =
+ type$ "inbook" =
+ or
+ 'author.editor.key.full
+ { type$ "proceedings" =
+ 'editor.key.full
+ 'author.key.full
+ if$
+ }
+ if$
+}
+
+FUNCTION {output.bibitem}
+{ newline$
+ "\bibitem[{" write$
+ label write$
+ ")" make.full.names duplicate$ short.list =
+ { pop$ }
+ { * }
+ if$
+ "}]{" * write$
+ cite$ write$
+ "}" write$
+ newline$
+ ""
+ before.all 'output.state :=
+}
+
+FUNCTION {n.dashify}
+{
+ 't :=
+ ""
+ { t empty$ not }
+ { t #1 #1 substring$ "-" =
+ { t #1 #2 substring$ "--" = not
+ { "--" *
+ t #2 global.max$ substring$ 't :=
+ }
+ { { t #1 #1 substring$ "-" = }
+ { "-" *
+ t #2 global.max$ substring$ 't :=
+ }
+ while$
+ }
+ if$
+ }
+ { t #1 #1 substring$ *
+ t #2 global.max$ substring$ 't :=
+ }
+ if$
+ }
+ while$
+}
+
+FUNCTION {word.in}
+{ bbl.in capitalize
+ " " * }
+
+FUNCTION {format.date}
+{ year "year" bibinfo.check duplicate$ empty$
+ {
+ }
+ 'skip$
+ if$
+ extra.label *
+ before.all 'output.state :=
+ " (" swap$ * ")" *
+}
+FUNCTION {format.btitle}
+{ title "title" bibinfo.check
+ duplicate$ empty$ 'skip$
+ {
+ emphasize
+ }
+ if$
+}
+FUNCTION {either.or.check}
+{ empty$
+ 'pop$
+ { "can't use both " swap$ * " fields in " * cite$ * warning$ }
+ if$
+}
+FUNCTION {format.bvolume}
+{ volume empty$
+ { "" }
+ { bbl.volume volume tie.or.space.prefix
+ "volume" bibinfo.check * *
+ series "series" bibinfo.check
+ duplicate$ empty$ 'pop$
+ { emphasize ", " * swap$ * }
+ if$
+ "volume and number" number either.or.check
+ }
+ if$
+}
+FUNCTION {format.number.series}
+{ volume empty$
+ { number empty$
+ { series field.or.null }
+ { series empty$
+ { number "number" bibinfo.check }
+ { output.state mid.sentence =
+ { bbl.number }
+ { bbl.number capitalize }
+ if$
+ number tie.or.space.prefix "number" bibinfo.check * *
+ bbl.in space.word *
+ series "series" bibinfo.check *
+ }
+ if$
+ }
+ if$
+ }
+ { "" }
+ if$
+}
+FUNCTION {is.num}
+{ chr.to.int$
+ duplicate$ "0" chr.to.int$ < not
+ swap$ "9" chr.to.int$ > not and
+}
+
+FUNCTION {extract.num}
+{ duplicate$ 't :=
+ "" 's :=
+ { t empty$ not }
+ { t #1 #1 substring$
+ t #2 global.max$ substring$ 't :=
+ duplicate$ is.num
+ { s swap$ * 's := }
+ { pop$ "" 't := }
+ if$
+ }
+ while$
+ s empty$
+ 'skip$
+ { pop$ s }
+ if$
+}
+
+FUNCTION {convert.edition}
+{ extract.num "l" change.case$ 's :=
+ s "first" = s "1" = or
+ { bbl.first 't := }
+ { s "second" = s "2" = or
+ { bbl.second 't := }
+ { s "third" = s "3" = or
+ { bbl.third 't := }
+ { s "fourth" = s "4" = or
+ { bbl.fourth 't := }
+ { s "fifth" = s "5" = or
+ { bbl.fifth 't := }
+ { s #1 #1 substring$ is.num
+ { s eng.ord 't := }
+ { edition 't := }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+ t
+}
+
+FUNCTION {format.edition}
+{ edition duplicate$ empty$ 'skip$
+ {
+ convert.edition
+ output.state mid.sentence =
+ { "l" }
+ { "t" }
+ if$ change.case$
+ "edition" bibinfo.check
+ " " * bbl.edition *
+ }
+ if$
+}
+INTEGERS { multiresult }
+FUNCTION {multi.page.check}
+{ 't :=
+ #0 'multiresult :=
+ { multiresult not
+ t empty$ not
+ and
+ }
+ { t #1 #1 substring$
+ duplicate$ "-" =
+ swap$ duplicate$ "," =
+ swap$ "+" =
+ or or
+ { #1 'multiresult := }
+ { t #2 global.max$ substring$ 't := }
+ if$
+ }
+ while$
+ multiresult
+}
+FUNCTION {format.pages}
+{ pages duplicate$ empty$ 'skip$
+ { duplicate$ multi.page.check
+ {
+ bbl.pages swap$
+ n.dashify
+ }
+ {
+ bbl.page swap$
+ }
+ if$
+ tie.or.space.prefix
+ "pages" bibinfo.check
+ * *
+ }
+ if$
+}
+FUNCTION {format.journal.pages}
+{ pages duplicate$ empty$ 'pop$
+ { swap$ duplicate$ empty$
+ { pop$ pop$ format.pages }
+ {
+ ", " *
+ swap$
+ n.dashify
+ "pages" bibinfo.check
+ *
+ }
+ if$
+ }
+ if$
+}
+FUNCTION {format.journal.eid}
+{ eid "eid" bibinfo.check
+ duplicate$ empty$ 'pop$
+ { swap$ duplicate$ empty$ 'skip$
+ {
+ ", " *
+ }
+ if$
+ swap$ *
+ }
+ if$
+}
+FUNCTION {format.vol.num.pages}
+{ volume field.or.null
+ duplicate$ empty$ 'skip$
+ {
+ "volume" bibinfo.check
+ }
+ if$
+ bolden
+ number "number" bibinfo.check duplicate$ empty$ 'skip$
+ {
+ swap$ duplicate$ empty$
+ { "there's a number but no volume in " cite$ * warning$ }
+ 'skip$
+ if$
+ swap$
+ "~(" swap$ * ")" *
+ }
+ if$ *
+ eid empty$
+ { format.journal.pages }
+ { format.journal.eid }
+ if$
+}
+
+FUNCTION {format.chapter.pages}
+{ chapter empty$
+ 'format.pages
+ { type empty$
+ { bbl.chapter }
+ { type "l" change.case$
+ "type" bibinfo.check
+ }
+ if$
+ chapter tie.or.space.prefix
+ "chapter" bibinfo.check
+ * *
+ pages empty$
+ 'skip$
+ { ", " * format.pages * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.chapter}
+{ chapter empty$
+ { "" }
+ { type empty$
+ { "" }
+ { type "l" change.case$
+ "type" bibinfo.check
+ }
+ if$
+ chapter tie.or.space.prefix
+ "chapter" bibinfo.check
+ emphasize
+ * *
+ }
+ if$
+}
+
+FUNCTION {format.booktitle}
+{
+ booktitle "booktitle" bibinfo.check
+ emphasize
+}
+FUNCTION {format.in.ed.booktitle}
+{ format.booktitle duplicate$ empty$ 'skip$
+ {
+ editor "editor" format.names.ed duplicate$ empty$ 'pop$
+ {
+ " " *
+ get.bbl.editor
+ "(" swap$ * "), " *
+ * swap$
+ * }
+ if$
+ word.in swap$ *
+ }
+ if$
+}
+FUNCTION {format.thesis.type}
+{ type duplicate$ empty$
+ 'pop$
+ { swap$ pop$
+ "t" change.case$ "type" bibinfo.check
+ }
+ if$
+}
+FUNCTION {format.tr.number}
+{ number "number" bibinfo.check
+ type duplicate$ empty$
+ { pop$ bbl.techrep }
+ 'skip$
+ if$
+ "type" bibinfo.check
+ swap$ duplicate$ empty$
+ { pop$ "t" change.case$ }
+ { tie.or.space.prefix * * }
+ if$
+}
+FUNCTION {format.article.crossref}
+{
+ word.in
+ " \cite{" * crossref * "}" *
+}
+FUNCTION {format.book.crossref}
+{ volume duplicate$ empty$
+ { "empty volume in " cite$ * "'s crossref of " * crossref * warning$
+ pop$ word.in
+ }
+ { bbl.volume
+ capitalize
+ swap$ tie.or.space.prefix "volume" bibinfo.check * * bbl.of space.word *
+ }
+ if$
+ " \cite{" * crossref * "}" *
+}
+FUNCTION {format.incoll.inproc.crossref}
+{
+ word.in
+ " \cite{" * crossref * "}" *
+}
+FUNCTION {format.org.or.pub}
+{ 't :=
+ ""
+ address empty$ t empty$ and
+ 'skip$
+ {
+ address "address" bibinfo.check *
+ t empty$
+ 'skip$
+ { address empty$
+ 'skip$
+ { ": " * }
+ if$
+ t *
+ }
+ if$
+ }
+ if$
+}
+FUNCTION {format.publisher.address}
+{ publisher "publisher" bibinfo.warn format.org.or.pub
+}
+
+FUNCTION {format.organization.address}
+{ organization "organization" bibinfo.check format.org.or.pub
+}
+
+FUNCTION {article}
+{ output.bibitem
+ format.authors "author" output.check
+ author format.key output
+ format.date "year" output.check
+ date.block
+ format.title "title" output.check
+ new.sentence
+ crossref missing$
+ {
+ journal
+ "journal" bibinfo.check
+ emphasize
+ "journal" output.check
+ format.vol.num.pages output
+ }
+ { format.article.crossref output.nonnull
+ format.pages output
+ }
+ if$
+ format.note output
+ fin.entry
+}
+FUNCTION {book}
+{ output.bibitem
+ author empty$
+ { format.editors "author and editor" output.check
+ editor format.key output
+ }
+ { format.authors output.nonnull
+ crossref missing$
+ { "author and editor" editor either.or.check }
+ 'skip$
+ if$
+ }
+ if$
+ format.date "year" output.check
+ date.block
+ format.btitle "title" output.check
+ crossref missing$
+ { format.bvolume output
+ new.sentence
+ format.number.series output
+ format.publisher.address output
+ }
+ {
+ new.sentence
+ format.book.crossref output.nonnull
+ }
+ if$
+ format.edition output
+ format.note output
+ fin.entry
+}
+FUNCTION {booklet}
+{ output.bibitem
+ format.authors output
+ author format.key output
+ format.date "year" output.check
+ date.block
+ format.title "title" output.check
+ new.sentence
+ howpublished "howpublished" bibinfo.check output
+ address "address" bibinfo.check output
+ format.note output
+ fin.entry
+}
+
+FUNCTION {inbook}
+{ output.bibitem
+ author empty$
+ { format.editors "author and editor" output.check
+ editor format.key output
+ }
+ { format.authors output.nonnull
+ crossref missing$
+ { "author and editor" editor either.or.check }
+ 'skip$
+ if$
+ }
+ if$
+ format.date "year" output.check
+ date.block
+ format.btitle "title" output.check
+ crossref missing$
+ {
+ format.number.series output
+ format.publisher.address output
+ format.bvolume output
+ format.chapter.pages "chapter and pages" output.check
+ new.sentence
+ }
+ {
+ format.chapter.pages "chapter and pages" output.check
+ new.sentence
+ format.book.crossref output.nonnull
+ }
+ if$
+ format.edition output
+ format.note output
+ fin.entry
+}
+
+FUNCTION {incollection}
+{ output.bibitem
+ format.authors "author" output.check
+ author format.key output
+ format.date "year" output.check
+ date.block
+ format.title "title" output.check
+ new.sentence
+ crossref missing$
+ { format.in.ed.booktitle "booktitle" output.check
+ format.number.series output
+ format.bvolume output
+ format.chapter output
+ format.edition output
+ format.publisher.address output
+ format.pages output
+ }
+ { format.incoll.inproc.crossref output.nonnull
+ format.chapter.pages output
+ }
+ if$
+ format.note output
+ fin.entry
+}
+FUNCTION {inproceedings}
+{ output.bibitem
+ format.authors "author" output.check
+ author format.key output
+ format.date "year" output.check
+ date.block
+ format.title "title" output.check
+ new.sentence
+ crossref missing$
+ { format.in.ed.booktitle "booktitle" output.check
+ format.number.series output
+ publisher empty$
+ { format.organization.address output }
+ { organization "organization" bibinfo.check output
+ format.publisher.address output
+ }
+ if$
+ format.bvolume output
+ format.pages output
+ }
+ { format.incoll.inproc.crossref output.nonnull
+ format.pages output
+ }
+ if$
+ format.note output
+ fin.entry
+}
+FUNCTION {conference} { inproceedings }
+FUNCTION {manual}
+{ output.bibitem
+ format.authors output
+ author format.key output
+ format.date "year" output.check
+ date.block
+ format.btitle "title" output.check
+ new.sentence
+ organization "organization" bibinfo.check output
+ address "address" bibinfo.check output
+ format.edition output
+ format.note output
+ fin.entry
+}
+
+FUNCTION {mastersthesis}
+{ output.bibitem
+ format.authors "author" output.check
+ author format.key output
+ format.date "year" output.check
+ date.block
+ format.btitle
+ "title" output.check
+ new.sentence
+ bbl.mthesis format.thesis.type output.nonnull
+ school "school" bibinfo.warn output
+ address "address" bibinfo.check output
+ format.note output
+ fin.entry
+}
+
+FUNCTION {misc}
+{ output.bibitem
+ format.authors output
+ author format.key output
+ format.date "year" output.check
+ date.block
+ format.title output
+ new.sentence
+ howpublished "howpublished" bibinfo.check output
+ format.note output
+ fin.entry
+}
+FUNCTION {phdthesis}
+{ output.bibitem
+ format.authors "author" output.check
+ author format.key output
+ format.date "year" output.check
+ date.block
+ format.btitle
+ "title" output.check
+ new.sentence
+ bbl.phdthesis format.thesis.type output.nonnull
+ school "school" bibinfo.warn output
+ address "address" bibinfo.check output
+ format.note output
+ fin.entry
+}
+
+FUNCTION {proceedings}
+{ output.bibitem
+ format.editors output
+ editor format.key output
+ format.date "year" output.check
+ date.block
+ format.btitle "title" output.check
+ format.bvolume output
+ format.number.series output
+ publisher empty$
+ { format.organization.address output }
+ { organization "organization" bibinfo.check output
+ format.publisher.address output
+ }
+ if$
+ format.note output
+ fin.entry
+}
+
+FUNCTION {techreport}
+{ output.bibitem
+ format.authors "author" output.check
+ author format.key output
+ format.date "year" output.check
+ date.block
+ format.btitle
+ "title" output.check
+ new.sentence
+ format.tr.number output.nonnull
+ institution "institution" bibinfo.warn output
+ address "address" bibinfo.check output
+ format.note output
+ fin.entry
+}
+
+FUNCTION {unpublished}
+{ output.bibitem
+ format.authors "author" output.check
+ author format.key output
+ format.date "year" output.check
+ date.block
+ format.title "title" output.check
+ format.note "note" output.check
+ fin.entry
+}
+
+FUNCTION {default.type} { misc }
+READ
+FUNCTION {sortify}
+{ purify$
+ "l" change.case$
+}
+INTEGERS { len }
+FUNCTION {chop.word}
+{ 's :=
+ 'len :=
+ s #1 len substring$ =
+ { s len #1 + global.max$ substring$ }
+ 's
+ if$
+}
+FUNCTION {format.lab.names}
+{ 's :=
+ "" 't :=
+ s #1 "{vv~}{ll}" format.name$
+ s num.names$ duplicate$
+ #2 >
+ { pop$
+ " " * bbl.etal emphasize *
+ }
+ { #2 <
+ 'skip$
+ { s #2 "{ff }{vv }{ll}{ jj}" format.name$ "others" =
+ {
+ " " * bbl.etal emphasize *
+ }
+ { bbl.and space.word * s #2 "{vv~}{ll}" format.name$
+ * }
+ if$
+ }
+ if$
+ }
+ if$
+}
+
+FUNCTION {author.key.label}
+{ author empty$
+ { key empty$
+ { cite$ #1 #3 substring$ }
+ 'key
+ if$
+ }
+ { author format.lab.names }
+ if$
+}
+
+FUNCTION {author.editor.key.label}
+{ author empty$
+ { editor empty$
+ { key empty$
+ { cite$ #1 #3 substring$ }
+ 'key
+ if$
+ }
+ { editor format.lab.names }
+ if$
+ }
+ { author format.lab.names }
+ if$
+}
+
+FUNCTION {editor.key.label}
+{ editor empty$
+ { key empty$
+ { cite$ #1 #3 substring$ }
+ 'key
+ if$
+ }
+ { editor format.lab.names }
+ if$
+}
+
+FUNCTION {calc.short.authors}
+{ type$ "book" =
+ type$ "inbook" =
+ or
+ 'author.editor.key.label
+ { type$ "proceedings" =
+ 'editor.key.label
+ 'author.key.label
+ if$
+ }
+ if$
+ 'short.list :=
+}
+
+FUNCTION {calc.label}
+{ calc.short.authors
+ short.list
+ "("
+ *
+ year duplicate$ empty$
+ short.list key field.or.null = or
+ { pop$ "" }
+ 'skip$
+ if$
+ *
+ 'label :=
+}
+
+FUNCTION {sort.format.names}
+{ 's :=
+ #1 'nameptr :=
+ ""
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ { s nameptr
+ "{vv{ } }{ll{ }}{ f{ }}{ jj{ }}"
+ format.name$ 't :=
+ nameptr #1 >
+ {
+ " " *
+ namesleft #1 = t "others" = and
+ { "zzzzz" * }
+ { t sortify * }
+ if$
+ }
+ { t sortify * }
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+}
+
+FUNCTION {sort.format.title}
+{ 't :=
+ "A " #2
+ "An " #3
+ "The " #4 t chop.word
+ chop.word
+ chop.word
+ sortify
+ #1 global.max$ substring$
+}
+FUNCTION {author.sort}
+{ author empty$
+ { key empty$
+ { "to sort, need author or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { author sort.format.names }
+ if$
+}
+FUNCTION {author.editor.sort}
+{ author empty$
+ { editor empty$
+ { key empty$
+ { "to sort, need author, editor, or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { editor sort.format.names }
+ if$
+ }
+ { author sort.format.names }
+ if$
+}
+FUNCTION {editor.sort}
+{ editor empty$
+ { key empty$
+ { "to sort, need editor or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { editor sort.format.names }
+ if$
+}
+FUNCTION {presort}
+{ calc.label
+ label sortify
+ " "
+ *
+ type$ "book" =
+ type$ "inbook" =
+ or
+ 'author.editor.sort
+ { type$ "proceedings" =
+ 'editor.sort
+ 'author.sort
+ if$
+ }
+ if$
+ #1 entry.max$ substring$
+ 'sort.label :=
+ sort.label
+ *
+ " "
+ *
+ title field.or.null
+ sort.format.title
+ *
+ #1 entry.max$ substring$
+ 'sort.key$ :=
+}
+
+ITERATE {presort}
+SORT
+STRINGS { last.label next.extra }
+INTEGERS { last.extra.num number.label }
+FUNCTION {initialize.extra.label.stuff}
+{ #0 int.to.chr$ 'last.label :=
+ "" 'next.extra :=
+ #0 'last.extra.num :=
+ #0 'number.label :=
+}
+FUNCTION {forward.pass}
+{ last.label label =
+ { last.extra.num #1 + 'last.extra.num :=
+ last.extra.num int.to.chr$ 'extra.label :=
+ }
+ { "a" chr.to.int$ 'last.extra.num :=
+ "" 'extra.label :=
+ label 'last.label :=
+ }
+ if$
+ number.label #1 + 'number.label :=
+}
+FUNCTION {reverse.pass}
+{ next.extra "b" =
+ { "a" 'extra.label := }
+ 'skip$
+ if$
+ extra.label 'next.extra :=
+ extra.label
+ duplicate$ empty$
+ 'skip$
+ { "{\natexlab{" swap$ * "}}" * }
+ if$
+ 'extra.label :=
+ label extra.label * 'label :=
+}
+EXECUTE {initialize.extra.label.stuff}
+ITERATE {forward.pass}
+REVERSE {reverse.pass}
+FUNCTION {bib.sort.order}
+{ sort.label
+ " "
+ *
+ year field.or.null sortify
+ *
+ " "
+ *
+ title field.or.null
+ sort.format.title
+ *
+ #1 entry.max$ substring$
+ 'sort.key$ :=
+}
+ITERATE {bib.sort.order}
+SORT
+FUNCTION {begin.bib}
+{ preamble$ empty$
+ 'skip$
+ { preamble$ write$ newline$ }
+ if$
+ "\begin{thebibliography}{" number.label int.to.str$ * "}" *
+ write$ newline$
+ "\providecommand{\natexlab}[1]{#1}"
+ write$ newline$
+}
+EXECUTE {begin.bib}
+EXECUTE {init.state.consts}
+ITERATE {call.type$}
+FUNCTION {end.bib}
+{ newline$
+ "\end{thebibliography}" write$ newline$
+}
+EXECUTE {end.bib}
+%% End of customized bst file
+%%
+%% End of file `ecca.bst'.
diff --git a/biblio/bibtex/contrib/economic/ecca.cls b/biblio/bibtex/contrib/economic/ecca.cls
new file mode 100644
index 0000000000..2b9bfa9a67
--- /dev/null
+++ b/biblio/bibtex/contrib/economic/ecca.cls
@@ -0,0 +1,252 @@
+%%% LaTeX class for manuscripts submitted to the
+%%% Journal "Economica" (ecca)
+%%%
+%%% author: Arne Henningsen
+%%% version: 1.1 (01 Feb 2009)
+%%% license: LaTeX Project Public License
+%%%
+%%% Note: This is an unofficial style file that may not fully comply
+%%% with the Formatting Instructions of the "Economica" in every detail.
+%%% Please report any problems at
+%%% http://sourceforge.net/projects/economtex/
+%%% Further information is available at
+%%% http://economtex.wiki.sourceforge.net/
+%%%
+%%% This document class is based on the "scrartcl" class
+%%% from the KOMA script bundle.
+%%% Following additional packages are required:
+%%% amsmath, babel, courier, endfloat, endnotes, geometry,
+%%% helvet, ifthen, mathptmx, natbib, setspace, url
+%%%
+%%% The corresponding BibTeX style file "ecca.bst" should be used
+%%% for the bibliography: \bibliographystyle{ecca}
+%%%
+%%% This document class provides 3 new commands:
+%%% \keywords can be used to show keywors below the abstract
+%%% \jelclass can be used to show JEL classifications below the abstract
+%%% \affiliation can be used spefify the affiliation(s) of the author(s)
+%%%
+%%% The Economica requires that you use single quotes
+%%% you could do this with the ``csquotes'' package:
+%%% \usepackage{csquotes}
+%%% \MakeInnerQuote{<yourQuoteCharacter>}
+%%%
+%%% If you use footnotes, add following line before the reference section:
+%%% \listofendnotes
+%%%
+%%% Websites of the "Economica":
+%%% http://www.blackwellpublishing.com/ecca
+%%% http://darp.lse.ac.uk/Frankweb/Economica/EconomicaHome.htm
+
+
+\NeedsTeXFormat{LaTeX2e}
+\ProvidesClass{ecca}[2009/02/01 LaTeX class for the Journal 'Economica']
+
+\RequirePackage{ifthen}
+
+% option to place floats at the end
+\newcounter{UseEndfloat}
+\setcounter{UseEndfloat}{0}
+\DeclareOption{endfloat}{\setcounter{UseEndfloat}{1}}
+
+% pass any options on to the scrartcl class and load this class with some options
+\DeclareOption*{\PassOptionsToClass{\CurrentOption}{scrartcl}}
+\ProcessOptions\relax
+\LoadClass[12pt,english,pointlessnumbers,tablecaptionabove,
+ noonelinecaption]{scrartcl}
+% pointlessnumbers = do not add final dot after ordinary section numbers
+% tablecaptionabove = use \captionabove for tables
+% noonelinecaption = do not treat one-line captions differently
+
+% use babel package and set language to english
+\RequirePackage[english]{babel}
+
+% page format, margins
+\RequirePackage{geometry}
+\geometry{a4paper, tmargin=2.5cm, bmargin=2.8cm, lmargin=2.5cm,
+ rmargin=2.5cm, headheight=0cm, headsep=0cm, footskip=1.2cm }
+
+% double spacing
+\RequirePackage{setspace}
+\doublespacing
+
+% spacing around formulas
+\AtBeginDocument{
+\setlength{\abovedisplayshortskip}{6pt}
+\setlength{\belowdisplayshortskip}{6pt}
+\setlength{\abovedisplayskip}{6pt}
+\setlength{\belowdisplayskip}{6pt}
+\allowdisplaybreaks
+}
+
+% spacing around captions and floats
+\setlength{\abovecaptionskip}{6pt}
+\setlength{\belowcaptionskip}{3pt}
+\setlength{\floatsep}{0pt}
+\setlength{\textfloatsep}{20pt}
+\setlength{\intextsep}{15pt}
+
+% font families: times/helvetica/courier
+\RequirePackage{mathptmx}
+\RequirePackage[scaled=0.90]{helvet}
+\RequirePackage{courier}
+
+% amsmath
+\RequirePackage[leqno,fleqn]{amsmath}
+% leqno = equations are numbered at the left of the page
+% for compatibility with ajae.cls
+\newcommand{\veclatin}[1]{#1}
+\newcommand{\matlatin}[1]{#1}
+\newcommand{\vecgreek}[1]{#1}
+\newcommand{\matgreek}[1]{#1}
+
+% font for URLs
+\RequirePackage{url}
+\def\UrlFont{\rmfamily}
+
+%% formatting section headers
+% numbered by Roman numerals
+\renewcommand{\thesection}{\Roman{section}.}
+% font
+\setkomafont{section}{\normalfont \scshape}
+% center section headers (copied from scrartcl.cls and modified thereafter)
+\renewcommand\section{\@startsection{section}{1}{\z@}%
+ {-2.0ex \@plus -1ex \@minus -.2ex}%
+ {0.5ex \@plus.2ex}%
+ {\setlength{\parfillskip}{\z@ \@plus 1fil}%
+ \raggedsection\normalfont\sectfont\nobreak\size@section\nobreak \centering }}
+% do not number section "Introduction"
+% \let\sectionOrig\section
+% \renewcommand{\section}[1]{
+% \ifthenelse{ \equal{ #1 }{ Introduction } }
+% {\sectionOrig*{#1}}
+% {\sectionOrig{#1}}
+% }
+
+%% formatting subsection headers
+% numbered alphabetically
+\renewcommand{\thesubsection}{(\alph{subsection})}
+% font
+\setkomafont{subsection}{\normalfont \itshape}
+
+% citations and bibliography
+\RequirePackage[authoryear]{natbib}
+\AtBeginDocument{\renewcommand{\refname}{REFERENCES}}
+\setlength{\bibsep}{0pt}
+
+%% use endnotes in place of footnotes
+\RequirePackage{endnotes}
+\renewcommand{\notesname}{NOTES}
+\let\footnote=\endnote
+\newcommand{\listofendnotes}{
+ \begingroup
+ \parindent 0pt
+ \parskip 0ex
+ \def\enotesize{\normalsize}
+ \theendnotes
+ \endgroup
+}
+% use normalsize numbers (copied from endnote.sty and modified thereafter)
+\def\enoteformat{\rightskip\z@ \leftskip\z@ \parindent=0em
+ \leavevmode\llap{\theenmark. }}
+
+%% modify section headers in the appendix
+% (copied from scrartcl.cls and modified thereafter)
+\renewcommand*\appendix{\par%
+ \setcounter{section}{0}%
+ \setcounter{subsection}{0}%
+ \renewcommand*\thesection{Appendix~\@Alph\c@section}%
+ \let\othersectionlevelsformat\othersectionlevelsformatAppendix
+ \@ifundefined{appendixmore}{}{\appendixmore}}
+\newcommand*{\othersectionlevelsformatAppendix}[1]{%
+ \ifthenelse{ \equal{ #1 }{ section } }
+ {\csname the#1\endcsname : \enskip}
+ {\csname the#1\endcsname\autodot\enskip}
+}
+
+
+% captions of figures and tables
+\setcapwidth[c]{\textwidth}
+\setcapindent*{0pt}
+\setkomafont{captionlabel}{\centering \scshape}
+\setkomafont{caption}{\centering \scshape}
+\renewcommand{\captionformat}{}
+
+% move floats to the end of the paper
+\ifthenelse{\equal{\theUseEndfloat}{1}}{
+ \RequirePackage[heads,nolists,tablesfirst]{endfloat}
+ \renewcommand{\figureplace}{%
+ \begin{center}
+ [\figurename~\thepostfig\ here]
+ \end{center}
+ }
+ \renewcommand{\tableplace}{%
+ \begin{center}
+ [\tablename~\theposttbl\ here]
+ \end{center}
+ }
+}{}
+
+% titlepage with title, author, affiliation and date
+\newcommand{\affiliation}[1]{\newcommand{\@affiliation}{#1}}
+\renewcommand{\and}{{\normalfont and}}
+\renewcommand{\maketitle}{
+ \begin{center}
+ \begin{Large}
+ \begin{spacing}{1.25}
+ \@title
+ \end{spacing}
+ \end{Large}
+ \vspace*{5mm}
+ By \textsc{\@author}\\
+ \ifthenelse{ \isundefined\@affiliation }{}{
+ \vspace*{3mm}
+ \textit{\@affiliation}\\
+ }
+ \vspace*{3mm}
+ \@date\\
+ \vspace*{3mm}
+ \end{center}
+}
+
+
+% abstract, keywords, JEL classification
+\newcommand{\keywords}[1]{\newcommand{\@keywords}{#1}}
+\newcommand{\jelclass}[1]{\newcommand{\@jelclass}{#1}}
+\renewenvironment{abstract}{%
+\begin{center}
+\begin{minipage}{0.94 \textwidth}
+\small
+}{%
+\ifthenelse{ \isundefined\@keywords }{
+\ClassWarningNoLine{ajae}{No keywords specified.
+ Please use the command \protect\keywords}
+}{
+
+\medskip \noindent
+Key words: \@keywords
+}
+\ifthenelse{ \isundefined\@jelclass }{
+\ClassWarningNoLine{ajae}{No JEL classification specified.
+ Please use the command \protect\jelclass}
+}{
+
+\medskip \noindent
+JEL classification: \@jelclass
+}
+\end{minipage}
+\end{center}%
+\noindent%
+}
+
+% avoid clubs and widows
+\clubpenalty=10000
+\widowpenalty=10000
+% \displaywidowpenalty=10000
+
+% increase stretchability of the spaces (avoid overful hboxes)
+\setlength{\emergencystretch}{3em}
+
+% for compatibility with erae.cls
+\newcommand{\citetPage}[2]{\citeauthor{#2} (\citeyear{#2}, p.~#1)}
+\newcommand{\citepPage}[2]{\citetext{\citealp{#2}, p.~#1}}
diff --git a/biblio/bibtex/contrib/economic/econometrica-fr.bst b/biblio/bibtex/contrib/economic/econometrica-fr.bst
new file mode 120000
index 0000000000..5a5db4ad0e
--- /dev/null
+++ b/biblio/bibtex/contrib/economic/econometrica-fr.bst
@@ -0,0 +1 @@
+../../../../obsolete/biblio/bibtex/contrib/economic/econometrica-fr.bst \ No newline at end of file
diff --git a/biblio/bibtex/contrib/economic/econometrica.bst b/biblio/bibtex/contrib/economic/econometrica.bst
new file mode 120000
index 0000000000..ae421ad862
--- /dev/null
+++ b/biblio/bibtex/contrib/economic/econometrica.bst
@@ -0,0 +1 @@
+../../../../obsolete/biblio/bibtex/contrib/economic/econometrica.bst \ No newline at end of file
diff --git a/biblio/bibtex/contrib/economic/ecta.bst b/biblio/bibtex/contrib/economic/ecta.bst
new file mode 100644
index 0000000000..b1a55208cb
--- /dev/null
+++ b/biblio/bibtex/contrib/economic/ecta.bst
@@ -0,0 +1,1503 @@
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%%% Econometrica bibliography style,
+%%%
+%%% for use with LaTeX2e and Natbib (or chicago), named style following the
+%%% recommendations of Fudenberg and Hodges (1997),
+%%% Econometrica Vol. 65, N. 4, pp. 965--975,
+%%% found at http://www.econometricsociety.org/manual/manual.html
+%%% for submission to Econometrica.
+%%%
+%%% by Sebastian Perez-Duarte, perez@ensae.fr (2000)
+%%%
+%%% Based on Makebst by Patrick Daly
+%%%
+%%%%%%%%%%%%%%%%%%%%%%%%%%% SUMMARY %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%%% Compared to the bst file econometrica.bst (by KC Border), the present
+%%% style file is closer to the canonical way of presenting the list of
+%%% references in Econometrica, a publication of the Econometric Society.
+%%%
+%%% The main differences are: the format of the address, the absence of number
+%%% in articles.
+%%%%%%%%%%%%%%%%%%%%%%%%%%%% LICENSE %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%%% This generated file can be redistributed and/or modified under the terms
+%%% of the LaTeX Project Public License Distributed from CTAN
+%%% archives in directory macros/latex/base/lppl.txt; either
+%%% version 1 of the License, or any later version.
+%%%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%% END %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% This is file `ecta.bst',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% merlin.mbs (with options: `ay,cay,nm-rev1,nmdash,nmft,nmft-sc,keyxyr,dt-beg,yr-par,yrp-col,note-yr,tit-qq,atit-u,thtit-a,vnum-x,volp-com,num-xser,bkpg-x,add-pub,pre-pub,edby,blk-com,ppx,ed,abr,ednx,xedn,nfss')
+%% ----------------------------------------
+%% *** Econometrica -- close ***
+%%
+%% Copyright 1994-2000 Patrick W Daly
+ % ===============================================================
+ % IMPORTANT NOTICE:
+ % This bibliographic style (bst) file has been generated from one or
+ % more master bibliographic style (mbs) files, listed above.
+ %
+ % This generated file can be redistributed and/or modified under the terms
+ % of the LaTeX Project Public License Distributed from CTAN
+ % archives in directory macros/latex/base/lppl.txt; either
+ % version 1 of the License, or any later version.
+ % ===============================================================
+ % Name and version information of the main mbs file:
+ % \ProvidesFile{merlin.mbs}[2000/05/04 4.01 (PWD, AO, DPC)]
+ % For use with BibTeX version 0.99a or later
+ %-------------------------------------------------------------------
+ % This bibliography style file is intended for texts in ENGLISH
+ % This is an author-year citation style bibliography. As such, it is
+ % non-standard LaTeX, and requires a special package file to function properly.
+ % Such a package is natbib.sty by Patrick W. Daly
+ % or: chicago.sty
+ % The form of the bibitem entries is
+ % \bibitem[\protect\citeauthoryear{Jones, Baker, and Smith}
+ % {Jones et al.}{1990}{key}...
+ %---------------------------------------------------------------------
+
+ENTRY
+ { address
+ author
+ booktitle
+ chapter
+ edition
+ editor
+ howpublished
+ institution
+ journal
+ key
+ month
+ note
+ number
+ organization
+ pages
+ publisher
+ school
+ series
+ title
+ type
+ volume
+ year
+ }
+ {}
+ { label extra.label sort.label short.list }
+INTEGERS { output.state before.all mid.sentence after.sentence after.block }
+FUNCTION {init.state.consts}
+{ #0 'before.all :=
+ #1 'mid.sentence :=
+ #2 'after.sentence :=
+ #3 'after.block :=
+}
+STRINGS { s t}
+FUNCTION {output.nonnull}
+{ 's :=
+ output.state mid.sentence =
+ { ", " * write$ }
+ { output.state after.block =
+ { add.period$ write$
+ newline$
+ "\newblock " write$
+ }
+ { output.state before.all =
+ 'write$
+ { add.period$ " " * write$ }
+ if$
+ }
+ if$
+ mid.sentence 'output.state :=
+ }
+ if$
+ s
+}
+FUNCTION {output}
+{ duplicate$ empty$
+ 'pop$
+ 'output.nonnull
+ if$
+}
+FUNCTION {output.check}
+{ 't :=
+ duplicate$ empty$
+ { pop$ "empty " t * " in " * cite$ * warning$ }
+ 'output.nonnull
+ if$
+}
+FUNCTION {fin.entry}
+{ add.period$
+ write$
+ newline$
+}
+
+FUNCTION {new.block}
+{ output.state before.all =
+ 'skip$
+ { after.block 'output.state := }
+ if$
+}
+FUNCTION {new.sentence}
+{ output.state after.block =
+ 'skip$
+ { output.state before.all =
+ 'skip$
+ { after.sentence 'output.state := }
+ if$
+ }
+ if$
+}
+FUNCTION {add.blank}
+{ " " * before.all 'output.state :=
+}
+
+FUNCTION {date.block}
+{
+ ":" *
+ add.blank
+}
+
+FUNCTION {not}
+{ { #0 }
+ { #1 }
+ if$
+}
+FUNCTION {and}
+{ 'skip$
+ { pop$ #0 }
+ if$
+}
+FUNCTION {or}
+{ { pop$ #1 }
+ 'skip$
+ if$
+}
+FUNCTION {non.stop}
+{ duplicate$
+ "}" * add.period$
+ #-1 #1 substring$ "." =
+}
+
+FUNCTION {new.block.checkb}
+{ empty$
+ swap$ empty$
+ and
+ 'skip$
+ 'new.block
+ if$
+}
+FUNCTION {field.or.null}
+{ duplicate$ empty$
+ { pop$ "" }
+ 'skip$
+ if$
+}
+FUNCTION {emphasize}
+{ duplicate$ empty$
+ { pop$ "" }
+ { "\emph{" swap$ * "}" * }
+ if$
+}
+FUNCTION {scaps}
+{ duplicate$ empty$
+ { pop$ "" }
+ { "\textsc{" swap$ * "}" * }
+ if$
+}
+FUNCTION {bib.name.font}
+{ scaps }
+FUNCTION {bib.fname.font}
+{ bib.name.font }
+FUNCTION {tie.or.space.prefix}
+{ duplicate$ text.length$ #3 <
+ { "~" }
+ { " " }
+ if$
+ swap$
+}
+
+FUNCTION {capitalize}
+{ "u" change.case$ "t" change.case$ }
+
+FUNCTION {space.word}
+{ " " swap$ * " " * }
+ % Here are the language-specific definitions for explicit words.
+ % Each function has a name bbl.xxx where xxx is the English word.
+ % The language selected here is ENGLISH
+FUNCTION {bbl.and}
+{ "and"}
+
+FUNCTION {bbl.etal}
+{ "et~al." }
+
+FUNCTION {bbl.editors}
+{ "eds." }
+
+FUNCTION {bbl.editor}
+{ "ed." }
+
+FUNCTION {bbl.edby}
+{ "ed. by" }
+
+FUNCTION {bbl.edition}
+{ "ed." }
+
+FUNCTION {bbl.volume}
+{ "vol." }
+
+FUNCTION {bbl.of}
+{ "of" }
+
+FUNCTION {bbl.number}
+{ "no." }
+
+FUNCTION {bbl.nr}
+{ "no." }
+
+FUNCTION {bbl.in}
+{ "in" }
+
+FUNCTION {bbl.pages}
+{ "" }
+
+FUNCTION {bbl.page}
+{ "" }
+
+FUNCTION {bbl.chapter}
+{ "chap." }
+
+FUNCTION {bbl.techrep}
+{ "Tech. Rep." }
+
+FUNCTION {bbl.mthesis}
+{ "Master's thesis" }
+
+FUNCTION {bbl.phdthesis}
+{ "Ph.D. thesis" }
+
+MACRO {jan} {"Jan."}
+
+MACRO {feb} {"Feb."}
+
+MACRO {mar} {"Mar."}
+
+MACRO {apr} {"Apr."}
+
+MACRO {may} {"May"}
+
+MACRO {jun} {"Jun."}
+
+MACRO {jul} {"Jul."}
+
+MACRO {aug} {"Aug."}
+
+MACRO {sep} {"Sep."}
+
+MACRO {oct} {"Oct."}
+
+MACRO {nov} {"Nov."}
+
+MACRO {dec} {"Dec."}
+
+MACRO {acmcs} {"ACM Computing Surveys"}
+
+MACRO {acta} {"Acta Informatica"}
+
+MACRO {cacm} {"Communications of the ACM"}
+
+MACRO {ibmjrd} {"IBM Journal of Research and Development"}
+
+MACRO {ibmsj} {"IBM Systems Journal"}
+
+MACRO {ieeese} {"IEEE Transactions on Software Engineering"}
+
+MACRO {ieeetc} {"IEEE Transactions on Computers"}
+
+MACRO {ieeetcad}
+ {"IEEE Transactions on Computer-Aided Design of Integrated Circuits"}
+
+MACRO {ipl} {"Information Processing Letters"}
+
+MACRO {jacm} {"Journal of the ACM"}
+
+MACRO {jcss} {"Journal of Computer and System Sciences"}
+
+MACRO {scp} {"Science of Computer Programming"}
+
+MACRO {sicomp} {"SIAM Journal on Computing"}
+
+MACRO {tocs} {"ACM Transactions on Computer Systems"}
+
+MACRO {tods} {"ACM Transactions on Database Systems"}
+
+MACRO {tog} {"ACM Transactions on Graphics"}
+
+MACRO {toms} {"ACM Transactions on Mathematical Software"}
+
+MACRO {toois} {"ACM Transactions on Office Information Systems"}
+
+MACRO {toplas} {"ACM Transactions on Programming Languages and Systems"}
+
+MACRO {tcs} {"Theoretical Computer Science"}
+FUNCTION {bibinfo.check}
+{ swap$
+ duplicate$ missing$
+ {
+ pop$ pop$
+ ""
+ }
+ { duplicate$ empty$
+ {
+ swap$ pop$
+ }
+ { swap$
+ pop$
+ }
+ if$
+ }
+ if$
+}
+FUNCTION {bibinfo.warn}
+{ swap$
+ duplicate$ missing$
+ {
+ swap$ "missing " swap$ * " in " * cite$ * warning$ pop$
+ ""
+ }
+ { duplicate$ empty$
+ {
+ swap$ "empty " swap$ * " in " * cite$ * warning$
+ }
+ { swap$
+ pop$
+ }
+ if$
+ }
+ if$
+}
+STRINGS { bibinfo}
+INTEGERS { nameptr namesleft numnames }
+
+FUNCTION {format.names}
+{ 'bibinfo :=
+ duplicate$ empty$ 'skip$ {
+ 's :=
+ "" 't :=
+ #1 'nameptr :=
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ { s nameptr
+ duplicate$ #1 >
+ { "{f.~}{vv~}{ll}{, jj}" }
+ { "{vv~}{ll}{, jj}{, f.}" }
+ if$
+ format.name$
+ bibinfo bibinfo.check
+ 't :=
+ nameptr #1 >
+ {
+ namesleft #1 >
+ { ", " * t * }
+ {
+ numnames #2 >
+ { "," * }
+ 'skip$
+ if$
+ s nameptr "{ll}" format.name$ duplicate$ "others" =
+ { 't := }
+ { pop$ }
+ if$
+ t "others" =
+ {
+ " " * bbl.etal *
+ bib.name.font
+ }
+ {
+ bbl.and
+ space.word * t *
+ }
+ if$
+ }
+ if$
+ }
+ 't
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+ t "others" =
+ 'skip$
+ { bib.name.font }
+ if$
+ } if$
+}
+FUNCTION {format.names.ed}
+{
+ 'bibinfo :=
+ duplicate$ empty$ 'skip$ {
+ 's :=
+ "" 't :=
+ #1 'nameptr :=
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ { s nameptr
+ "{f.~}{vv~}{ll}{, jj}"
+ format.name$
+ bibinfo bibinfo.check
+ 't :=
+ nameptr #1 >
+ {
+ namesleft #1 >
+ { ", " * t * }
+ {
+ numnames #2 >
+ { "," * }
+ 'skip$
+ if$
+ s nameptr "{ll}" format.name$ duplicate$ "others" =
+ { 't := }
+ { pop$ }
+ if$
+ t "others" =
+ {
+
+ " " * bbl.etal *
+ }
+ {
+ bbl.and
+ space.word * t *
+ }
+ if$
+ }
+ if$
+ }
+ 't
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+ } if$
+}
+FUNCTION {format.key}
+{ empty$
+ { key field.or.null }
+ { "" }
+ if$
+}
+
+FUNCTION {format.authors}
+{ author "author" format.names
+}
+FUNCTION {get.bbl.editor}
+{ editor num.names$ #1 > 'bbl.editors 'bbl.editor if$ }
+
+FUNCTION {format.editors}
+{ editor "editor" format.names duplicate$ empty$ 'skip$
+ {
+ "," *
+ " " *
+ get.bbl.editor
+ *
+ }
+ if$
+}
+FUNCTION {format.note}
+{
+ note empty$
+ { "" }
+ { note #1 #1 substring$
+ duplicate$ "{" =
+ 'skip$
+ { output.state mid.sentence =
+ { "l" }
+ { "u" }
+ if$
+ change.case$
+ }
+ if$
+ note #2 global.max$ substring$ * "note" bibinfo.check
+ }
+ if$
+}
+
+FUNCTION {format.title}
+{ title
+ "title" bibinfo.check
+ duplicate$ empty$ 'skip$
+ {
+ "\enquote{" swap$ *
+ non.stop
+ { ",} " * }
+ { "} " * }
+ if$
+ }
+ if$
+}
+FUNCTION {end.quote.title}
+{ title empty$
+ 'skip$
+ { before.all 'output.state := }
+ if$
+}
+FUNCTION {format.full.names}
+{'s :=
+ "" 't :=
+ #1 'nameptr :=
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ { s nameptr
+ "{vv~}{ll}" format.name$
+ 't :=
+ nameptr #1 >
+ {
+ namesleft #1 >
+ { ", " * t * }
+ {
+ s nameptr "{ll}" format.name$ duplicate$ "others" =
+ { 't := }
+ { pop$ }
+ if$
+ t "others" =
+ {
+ " " * bbl.etal *
+ }
+ {
+ numnames #2 >
+ { "," * }
+ 'skip$
+ if$
+ bbl.and
+ space.word * t *
+ }
+ if$
+ }
+ if$
+ }
+ 't
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+}
+
+FUNCTION {author.editor.key.full}
+{ author empty$
+ { editor empty$
+ { key empty$
+ { cite$ #1 #3 substring$ }
+ 'key
+ if$
+ }
+ { editor format.full.names }
+ if$
+ }
+ { author format.full.names }
+ if$
+}
+
+FUNCTION {author.key.full}
+{ author empty$
+ { key empty$
+ { cite$ #1 #3 substring$ }
+ 'key
+ if$
+ }
+ { author format.full.names }
+ if$
+}
+
+FUNCTION {editor.key.full}
+{ editor empty$
+ { key empty$
+ { cite$ #1 #3 substring$ }
+ 'key
+ if$
+ }
+ { editor format.full.names }
+ if$
+}
+
+FUNCTION {make.full.names}
+{ type$ "book" =
+ type$ "inbook" =
+ or
+ 'author.editor.key.full
+ { type$ "proceedings" =
+ 'editor.key.full
+ 'author.key.full
+ if$
+ }
+ if$
+}
+
+FUNCTION {output.bibitem}
+{ newline$
+ "\bibitem[" write$
+ "\protect\citeauthoryear{" make.full.names * "}{" * write$
+ label write$
+ "}{" year duplicate$ empty$
+ { pop$ "????" }
+ 'skip$
+ if$
+ * extra.label * "}]{" * write$
+ cite$ write$
+ "}" write$
+ newline$
+ ""
+ before.all 'output.state :=
+}
+
+FUNCTION {n.dashify}
+{
+ 't :=
+ ""
+ { t empty$ not }
+ { t #1 #1 substring$ "-" =
+ { t #1 #2 substring$ "--" = not
+ { "--" *
+ t #2 global.max$ substring$ 't :=
+ }
+ { { t #1 #1 substring$ "-" = }
+ { "-" *
+ t #2 global.max$ substring$ 't :=
+ }
+ while$
+ }
+ if$
+ }
+ { t #1 #1 substring$ *
+ t #2 global.max$ substring$ 't :=
+ }
+ if$
+ }
+ while$
+}
+
+FUNCTION {word.in}
+{ bbl.in
+ " " * }
+
+FUNCTION {format.date}
+{ year "year" bibinfo.check duplicate$ empty$
+ {
+ "empty year in " cite$ * "; set to ????" * warning$
+ pop$ "????"
+ }
+ 'skip$
+ if$
+ extra.label *
+ before.all 'output.state :=
+ " (" swap$ * ")" *
+}
+FUNCTION {format.btitle}
+{ title "title" bibinfo.check
+ duplicate$ empty$ 'skip$
+ {
+ emphasize
+ }
+ if$
+}
+FUNCTION {either.or.check}
+{ empty$
+ 'pop$
+ { "can't use both " swap$ * " fields in " * cite$ * warning$ }
+ if$
+}
+FUNCTION {format.bvolume}
+{ volume empty$
+ { "" }
+ { bbl.volume volume tie.or.space.prefix
+ "volume" bibinfo.check * *
+ series "series" bibinfo.check
+ duplicate$ empty$ 'pop$
+ { swap$ bbl.of space.word * swap$
+ emphasize * }
+ if$
+ "volume and number" number either.or.check
+ }
+ if$
+}
+FUNCTION {format.number.series}
+{ volume empty$
+ { number empty$
+ { series field.or.null }
+ { series empty$
+ { number "number" bibinfo.check }
+ { output.state mid.sentence =
+ { bbl.number }
+ { bbl.number capitalize }
+ if$
+ number tie.or.space.prefix "number" bibinfo.check * *
+ bbl.in space.word *
+ series "series" bibinfo.check *
+ }
+ if$
+ }
+ if$
+ }
+ { "" }
+ if$
+}
+
+FUNCTION {format.edition}
+{ edition duplicate$ empty$ 'skip$
+ {
+ output.state mid.sentence =
+ { "l" }
+ { "t" }
+ if$ change.case$
+ "edition" bibinfo.check
+ " " * bbl.edition *
+ }
+ if$
+}
+INTEGERS { multiresult }
+FUNCTION {multi.page.check}
+{ 't :=
+ #0 'multiresult :=
+ { multiresult not
+ t empty$ not
+ and
+ }
+ { t #1 #1 substring$
+ duplicate$ "-" =
+ swap$ duplicate$ "," =
+ swap$ "+" =
+ or or
+ { #1 'multiresult := }
+ { t #2 global.max$ substring$ 't := }
+ if$
+ }
+ while$
+ multiresult
+}
+FUNCTION {format.pages}
+{ pages duplicate$ empty$ 'skip$
+ { duplicate$ multi.page.check
+ {
+ n.dashify
+ }
+ {
+ }
+ if$
+ "pages" bibinfo.check
+ }
+ if$
+}
+FUNCTION {format.journal.pages}
+{ pages duplicate$ empty$ 'pop$
+ { swap$ duplicate$ empty$
+ { pop$ pop$ format.pages }
+ {
+ ", " *
+ swap$
+ n.dashify
+ "pages" bibinfo.check
+ *
+ }
+ if$
+ }
+ if$
+}
+FUNCTION {format.vol.num.pages}
+{ volume field.or.null
+ duplicate$ empty$ 'skip$
+ {
+ "volume" bibinfo.check
+ }
+ if$
+ format.journal.pages
+}
+
+FUNCTION {format.chapter.pages}
+{ chapter empty$
+ 'format.pages
+ { type empty$
+ { bbl.chapter }
+ { type "l" change.case$
+ "type" bibinfo.check
+ }
+ if$
+ chapter tie.or.space.prefix
+ "chapter" bibinfo.check
+ * *
+ pages empty$
+ 'skip$
+ { ", " * format.pages * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.booktitle}
+{
+ booktitle "booktitle" bibinfo.check
+ emphasize
+}
+FUNCTION {format.in.ed.booktitle}
+{ format.booktitle duplicate$ empty$ 'skip$
+ {
+ editor "editor" format.names.ed duplicate$ empty$ 'pop$
+ {
+ bbl.edby
+ " " * swap$ *
+ swap$
+ "," *
+ " " * swap$
+ * }
+ if$
+ word.in swap$ *
+ }
+ if$
+}
+FUNCTION {format.thesis.type}
+{ type duplicate$ empty$
+ 'pop$
+ { swap$ pop$
+ "t" change.case$ "type" bibinfo.check
+ }
+ if$
+}
+FUNCTION {format.tr.number}
+{ number "number" bibinfo.check
+ type duplicate$ empty$
+ { pop$ bbl.techrep }
+ 'skip$
+ if$
+ "type" bibinfo.check
+ swap$ duplicate$ empty$
+ { pop$ "t" change.case$ }
+ { tie.or.space.prefix * * }
+ if$
+}
+FUNCTION {format.article.crossref}
+{
+ word.in
+ " \cite{" * crossref * "}" *
+}
+FUNCTION {format.book.crossref}
+{ volume duplicate$ empty$
+ { "empty volume in " cite$ * "'s crossref of " * crossref * warning$
+ pop$ word.in
+ }
+ { bbl.volume
+ swap$ tie.or.space.prefix "volume" bibinfo.check * * bbl.of space.word *
+ }
+ if$
+ " \cite{" * crossref * "}" *
+}
+FUNCTION {format.incoll.inproc.crossref}
+{
+ word.in
+ " \cite{" * crossref * "}" *
+}
+FUNCTION {format.org.or.pub}
+{ 't :=
+ ""
+ address empty$ t empty$ and
+ 'skip$
+ {
+ address "address" bibinfo.check *
+ t empty$
+ 'skip$
+ { address empty$
+ 'skip$
+ { ": " * }
+ if$
+ t *
+ }
+ if$
+ }
+ if$
+}
+FUNCTION {format.publisher.address}
+{ publisher "publisher" bibinfo.warn format.org.or.pub
+}
+
+FUNCTION {format.organization.address}
+{ organization "organization" bibinfo.check format.org.or.pub
+}
+
+STRINGS {oldname}
+
+FUNCTION {name.or.dash}
+{ 's :=
+ oldname empty$
+ { s 'oldname := s }
+ { s oldname =
+% { "---" } old style
+ { "---\hspace{-.1pt}---\hspace{-.1pt}---" }
+%SPD 2000
+ { s 'oldname := s }
+ if$
+ }
+ if$
+}
+
+FUNCTION {article}
+{ output.bibitem
+ format.authors "author" output.check
+ author format.key output
+ name.or.dash
+ format.date "year" output.check
+ date.block
+ format.title "title" output.check
+ end.quote.title
+ crossref missing$
+ {
+ journal
+ "journal" bibinfo.check
+ emphasize
+ "journal" output.check
+ format.vol.num.pages output
+ }
+ { format.article.crossref output.nonnull
+ format.pages output
+ }
+ if$
+ format.note output
+ fin.entry
+}
+FUNCTION {book}
+{ output.bibitem
+ author empty$
+ { format.editors "author and editor" output.check
+ editor format.key output
+ name.or.dash
+ }
+ { format.authors output.nonnull
+ name.or.dash
+ crossref missing$
+ { "author and editor" editor either.or.check }
+ 'skip$
+ if$
+ }
+ if$
+ format.date "year" output.check
+ date.block
+ format.btitle "title" output.check
+ crossref missing$
+ { format.bvolume output
+ format.number.series output
+ format.publisher.address output
+ }
+ {
+ format.book.crossref output.nonnull
+ }
+ if$
+ format.edition output
+ format.note output
+ fin.entry
+}
+FUNCTION {booklet}
+{ output.bibitem
+ format.authors output
+ author format.key output
+ name.or.dash
+ format.date "year" output.check
+ date.block
+ format.title "title" output.check
+ end.quote.title
+ howpublished "howpublished" bibinfo.check output
+ address "address" bibinfo.check output
+ format.note output
+ fin.entry
+}
+
+FUNCTION {inbook}
+{ output.bibitem
+ author empty$
+ { format.editors "author and editor" output.check
+ editor format.key output
+ name.or.dash
+ }
+ { format.authors output.nonnull
+ name.or.dash
+ crossref missing$
+ { "author and editor" editor either.or.check }
+ 'skip$
+ if$
+ }
+ if$
+ format.date "year" output.check
+ date.block
+ format.btitle "title" output.check
+ crossref missing$
+ {
+ format.publisher.address output
+ format.bvolume output
+ format.chapter.pages "chapter and pages" output.check
+ format.number.series output
+ }
+ {
+ format.chapter.pages "chapter and pages" output.check
+ format.book.crossref output.nonnull
+ }
+ if$
+ format.edition output
+ format.note output
+ fin.entry
+}
+
+FUNCTION {incollection}
+{ output.bibitem
+ format.authors "author" output.check
+ author format.key output
+ name.or.dash
+ format.date "year" output.check
+ date.block
+ format.title "title" output.check
+ end.quote.title
+ crossref missing$
+ { format.in.ed.booktitle "booktitle" output.check
+ format.publisher.address output
+ format.bvolume output
+ format.number.series output
+ format.chapter.pages output
+ format.edition output
+ }
+ { format.incoll.inproc.crossref output.nonnull
+ format.chapter.pages output
+ }
+ if$
+ format.note output
+ fin.entry
+}
+FUNCTION {inproceedings}
+{ output.bibitem
+ format.authors "author" output.check
+ author format.key output
+ name.or.dash
+ format.date "year" output.check
+ date.block
+ format.title "title" output.check
+ end.quote.title
+ crossref missing$
+ { format.in.ed.booktitle "booktitle" output.check
+ publisher empty$
+ { format.organization.address output }
+ { organization "organization" bibinfo.check output
+ format.publisher.address output
+ }
+ if$
+ format.bvolume output
+ format.number.series output
+ format.pages output
+ }
+ { format.incoll.inproc.crossref output.nonnull
+ format.pages output
+ }
+ if$
+ format.note output
+ fin.entry
+}
+FUNCTION {conference} { inproceedings }
+FUNCTION {manual}
+{ output.bibitem
+ format.authors output
+ author format.key output
+ name.or.dash
+ format.date "year" output.check
+ date.block
+ format.btitle "title" output.check
+ organization "organization" bibinfo.check output
+ address "address" bibinfo.check output
+ format.edition output
+ format.note output
+ fin.entry
+}
+
+FUNCTION {mastersthesis}
+{ output.bibitem
+ format.authors "author" output.check
+ author format.key output
+ name.or.dash
+ format.date "year" output.check
+ date.block
+ format.title
+ "title" output.check
+ end.quote.title
+ bbl.mthesis format.thesis.type output.nonnull
+ school "school" bibinfo.warn output
+ address "address" bibinfo.check output
+ format.note output
+ fin.entry
+}
+
+FUNCTION {misc}
+{ output.bibitem
+ format.authors output
+ author format.key output
+ name.or.dash
+ format.date "year" output.check
+ date.block
+ format.title output
+ end.quote.title
+ howpublished "howpublished" bibinfo.check output
+ format.note output
+ fin.entry
+}
+FUNCTION {phdthesis}
+{ output.bibitem
+ format.authors "author" output.check
+ author format.key output
+ name.or.dash
+ format.date "year" output.check
+ date.block
+ format.title
+ "title" output.check
+ end.quote.title
+ bbl.phdthesis format.thesis.type output.nonnull
+ school "school" bibinfo.warn output
+ address "address" bibinfo.check output
+ format.note output
+ fin.entry
+}
+
+FUNCTION {proceedings}
+{ output.bibitem
+ format.editors output
+ editor format.key output
+ name.or.dash
+ format.date "year" output.check
+ date.block
+ format.btitle "title" output.check
+ format.bvolume output
+ format.number.series output
+ publisher empty$
+ { format.organization.address output }
+ { organization "organization" bibinfo.check output
+ format.publisher.address output
+ }
+ if$
+ format.note output
+ fin.entry
+}
+
+FUNCTION {techreport}
+{ output.bibitem
+ format.authors "author" output.check
+ author format.key output
+ name.or.dash
+ format.date "year" output.check
+ date.block
+ format.title
+ "title" output.check
+ end.quote.title
+ format.tr.number output.nonnull
+ institution "institution" bibinfo.warn output
+ address "address" bibinfo.check output
+ format.note output
+ fin.entry
+}
+
+FUNCTION {unpublished}
+{ output.bibitem
+ format.authors "author" output.check
+ author format.key output
+ name.or.dash
+ format.date "year" output.check
+ date.block
+ format.title "title" output.check
+ end.quote.title
+ format.note "note" output.check
+ fin.entry
+}
+
+FUNCTION {default.type} { misc }
+READ
+FUNCTION {sortify}
+{ purify$
+ "l" change.case$
+}
+INTEGERS { len }
+FUNCTION {chop.word}
+{ 's :=
+ 'len :=
+ s #1 len substring$ =
+ { s len #1 + global.max$ substring$ }
+ 's
+ if$
+}
+FUNCTION {format.lab.names}
+{ 's :=
+ "" 't :=
+ s #1 "{vv~}{ll}" format.name$
+ s num.names$ duplicate$
+ #2 >
+ { pop$
+ " " * bbl.etal *
+ }
+ { #2 <
+ 'skip$
+ { s #2 "{ff }{vv }{ll}{ jj}" format.name$ "others" =
+ {
+ " " * bbl.etal *
+ }
+ { bbl.and space.word * s #2 "{vv~}{ll}" format.name$
+ * }
+ if$
+ }
+ if$
+ }
+ if$
+}
+
+FUNCTION {author.key.label}
+{ author empty$
+ { key empty$
+ { cite$ #1 #3 substring$ }
+ 'key
+ if$
+ }
+ { author format.lab.names }
+ if$
+}
+
+FUNCTION {author.editor.key.label}
+{ author empty$
+ { editor empty$
+ { key empty$
+ { cite$ #1 #3 substring$ }
+ 'key
+ if$
+ }
+ { editor format.lab.names }
+ if$
+ }
+ { author format.lab.names }
+ if$
+}
+
+FUNCTION {editor.key.label}
+{ editor empty$
+ { key empty$
+ { cite$ #1 #3 substring$ }
+ 'key
+ if$
+ }
+ { editor format.lab.names }
+ if$
+}
+
+FUNCTION {calc.short.authors}
+{ type$ "book" =
+ type$ "inbook" =
+ or
+ 'author.editor.key.label
+ { type$ "proceedings" =
+ 'editor.key.label
+ 'author.key.label
+ if$
+ }
+ if$
+ 'short.list :=
+}
+
+FUNCTION {calc.label}
+{ calc.short.authors
+ short.list
+ ", "
+ *
+ year duplicate$ empty$
+ short.list key field.or.null = or
+ { pop$ "" }
+ 'skip$
+ if$
+ *
+ 'label :=
+}
+
+FUNCTION {calc.short.label}
+{ calc.short.authors short.list
+ 'label :=
+}
+FUNCTION {sort.format.names}
+{ 's :=
+ #1 'nameptr :=
+ ""
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ { s nameptr
+ "{vv{ } }{ll{ }}{ f{ }}{ jj{ }}"
+ format.name$ 't :=
+ nameptr #1 >
+ {
+ " " *
+ namesleft #1 = t "others" = and
+ { "zzzzz" * }
+ { t sortify * }
+ if$
+ }
+ { t sortify * }
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+}
+
+FUNCTION {sort.format.title}
+{ 't :=
+ "A " #2
+ "An " #3
+ "The " #4 t chop.word
+ chop.word
+ chop.word
+ sortify
+ #1 global.max$ substring$
+}
+FUNCTION {author.sort}
+{ author empty$
+ { key empty$
+ { "to sort, need author or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { author sort.format.names }
+ if$
+}
+FUNCTION {author.editor.sort}
+{ author empty$
+ { editor empty$
+ { key empty$
+ { "to sort, need author, editor, or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { editor sort.format.names }
+ if$
+ }
+ { author sort.format.names }
+ if$
+}
+FUNCTION {editor.sort}
+{ editor empty$
+ { key empty$
+ { "to sort, need editor or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { editor sort.format.names }
+ if$
+}
+FUNCTION {presort}
+{ calc.label
+ label sortify
+ " "
+ *
+ type$ "book" =
+ type$ "inbook" =
+ or
+ 'author.editor.sort
+ { type$ "proceedings" =
+ 'editor.sort
+ 'author.sort
+ if$
+ }
+ if$
+ #1 entry.max$ substring$
+ 'sort.label :=
+ sort.label
+ *
+ " "
+ *
+ title field.or.null
+ sort.format.title
+ *
+ #1 entry.max$ substring$
+ 'sort.key$ :=
+}
+
+ITERATE {presort}
+SORT
+STRINGS { last.label next.extra }
+INTEGERS { last.extra.num number.label }
+FUNCTION {initialize.extra.label.stuff}
+{ #0 int.to.chr$ 'last.label :=
+ "" 'next.extra :=
+ #0 'last.extra.num :=
+ #0 'number.label :=
+}
+FUNCTION {forward.pass}
+{ last.label label =
+ { last.extra.num #1 + 'last.extra.num :=
+ last.extra.num int.to.chr$ 'extra.label :=
+ }
+ { "a" chr.to.int$ 'last.extra.num :=
+ "" 'extra.label :=
+ label 'last.label :=
+ }
+ if$
+ number.label #1 + 'number.label :=
+}
+FUNCTION {reverse.pass}
+{ next.extra "b" =
+ { "a" 'extra.label := }
+ 'skip$
+ if$
+ extra.label 'next.extra :=
+ extra.label
+ duplicate$ empty$
+ 'skip$
+ { "{\natexlab{" swap$ * "}}" * }
+ if$
+ 'extra.label :=
+}
+EXECUTE {initialize.extra.label.stuff}
+ITERATE {forward.pass}
+REVERSE {reverse.pass}
+FUNCTION {bib.sort.order}
+{ sort.label
+ " "
+ *
+ year field.or.null sortify
+ *
+ " "
+ *
+ title field.or.null
+ sort.format.title
+ *
+ #1 entry.max$ substring$
+ 'sort.key$ :=
+ calc.short.label
+}
+ITERATE {bib.sort.order}
+SORT
+FUNCTION {begin.bib}
+{ preamble$ empty$
+ 'skip$
+ { preamble$ write$ newline$ }
+ if$
+ "\begin{thebibliography}{" number.label int.to.str$ * "}" *
+ write$ newline$
+ "\newcommand{\enquote}[1]{``#1''}"
+ write$ newline$
+ "\expandafter\ifx\csname natexlab\endcsname\relax\def\natexlab#1{#1}\fi"
+ write$ newline$
+}
+EXECUTE {begin.bib}
+EXECUTE {init.state.consts}
+ITERATE {call.type$}
+FUNCTION {end.bib}
+{ newline$
+ "\end{thebibliography}" write$ newline$
+}
+EXECUTE {end.bib}
+%% End of customized bst file
+%%
+%% End of file `econm.bst'.
diff --git a/biblio/bibtex/contrib/economic/erae-ex.bib b/biblio/bibtex/contrib/economic/erae-ex.bib
new file mode 100644
index 0000000000..5ac2aec695
--- /dev/null
+++ b/biblio/bibtex/contrib/economic/erae-ex.bib
@@ -0,0 +1,42 @@
+This file was created with JabRef 1.7.
+Encoding: ISO8859_1
+
+@ARTICLE{Monier98,
+ author = {S. Monier-Dilhan and H. Ossard},
+ title = {Producers' Loss due to Asymmetric Information: An Application to a Specific Case},
+ journal = {European Review of Agricultural Economics},
+ year = {1998},
+ volume = {25},
+ pages = {155-169},
+}
+
+@INCOLLECTION{Steenkamp97,
+ author = {J.-B. E. M. Steenkamp},
+ title = {Dynamics in Consumer Behaviour with Respect to Agricultural and Food Products},
+ booktitle = {Agricultural Marketing and Consumer Behaviour in a Changing World},
+ publisher = {Kluwer Academic Publishers},
+ year = {1997},
+ editor = {B. Wieringa and A. van Tilburg and K. Grunert and J.-B. E. M. Steenkamp and M. Wedel},
+ pages = {143-188},
+ address = {Dordrecht},
+}
+
+@INPROCEEDINGS{Zeller97,
+ author = {Manfred Zeller and Gertrud Schrieder and Joachim von Braun and Franz Heidhues},
+ title = {Rural Finance for Food Security for the Poor: Implications for Research and Policy},
+ year = {1997},
+ volume = {4},
+ series = {Food Policy Review},
+ address = {Washington DC},
+ organization = {International Food Policy Research Institute (IFPRI)},
+ publisher = {IFPRI},
+}
+
+@BOOK{Swinnen97,
+ title = {Political Economy of Agrarian Reform in Central and Eastern Europe},
+ publisher = {Ashgate},
+ year = {1997},
+ editor = {Johan F. M. Swinnen},
+ address = {Aldershot, UK},
+}
+
diff --git a/biblio/bibtex/contrib/economic/erae-ex.pdf b/biblio/bibtex/contrib/economic/erae-ex.pdf
new file mode 100644
index 0000000000..107accea81
--- /dev/null
+++ b/biblio/bibtex/contrib/economic/erae-ex.pdf
Binary files differ
diff --git a/biblio/bibtex/contrib/economic/erae-ex.tex b/biblio/bibtex/contrib/economic/erae-ex.tex
new file mode 100644
index 0000000000..d81102d680
--- /dev/null
+++ b/biblio/bibtex/contrib/economic/erae-ex.tex
@@ -0,0 +1,151 @@
+\documentclass{erae}
+\usepackage[T1]{fontenc}
+\usepackage[latin1]{inputenc}
+\usepackage{csquotes}
+\MakeInnerQuote{"}
+
+\usepackage{textcomp}
+\usepackage{multido}
+
+\usepackage{hyperref}
+\hypersetup{%
+ colorlinks = {true},
+ urlcolor = {blue},
+ linkcolor = {black},
+ citecolor = {black},
+ pdfauthor = {Arne Henningsen},
+ pdftitle = {Testing LaTeX class and BibTeX style for the
+ European Review of Agricultural Economics (AJAE)},
+ pdfkeywords = {ERAE, BibTeX, LaTeX}
+}
+
+\usepackage{multido}
+
+\title{Testing \LaTeX{} class and Bib\TeX{} style for the
+ `European Review of Agricultural Economics' (ERAE)}
+\keywords{ERAE, BibTeX, LaTeX}
+\jelclass{A1, B2, C3}
+
+\begin{document}
+
+\maketitle
+
+\begin{abstract}
+\multido{}{15}{This is an abstract. }
+\end{abstract}
+
+\section{Introduction}
+\multido{}{7}{This is an introduction. }
+
+Footnotes should appear at the end of the page in which they are inserted.%
+\footnote{
+\multido{}{10}{This is a footnote. }
+}
+"Single quotation marks" can be conveniently inserted using
+the "csquotes" package:
+add the lines\\
+\verb!\usepackage{csquotes}!\\
+\verb!\MakeInnerQuote{"}!\\
+to the preamble of your \LaTeX{} file and use the inch symbol~(\verb!"!)
+for quotation marks.%
+\footnote{%
+Of course, you can also define another symbol in the command
+\texttt{\textbackslash{}MakeInnerQuote},
+e.g.\ the degree sign~($^{\circ}$).
+}
+Collect tables and figures at the end of the manuscript
+(see figure~\ref{fig:dummy} and table~\ref{tab:citations}).
+
+\begin{figure}[htbp]
+\fbox{\parbox{0.6 \textwidth}{\centering
+ \vspace{0.2 \textwidth}
+ This is not a figure.
+ \vspace{0.2 \textwidth}
+}}
+\caption{Dummy figure}
+\label{fig:dummy}
+\end{figure}
+
+\begin{figure}[htbp]
+\fbox{\parbox{0.6 \textwidth}{\centering
+ \vspace{0.2 \textwidth}
+ This is not a figure, too.
+ \vspace{0.2 \textwidth}
+}}
+\caption{Figure with \multido{}{40}{very } long title}
+\label{fig:long-title}
+\end{figure}
+
+\section{Manuscript Formatting}
+Instructions to authors including formatting guidelines are available at
+\url{http://www.oxfordjournals.org/erae/for_authors/index.html}.
+All references used as examples in these guidelines are shown in this document
+to demonstrate that the ERAE Bib\TeX{} style complies with these guidelines.
+Please report any problems at
+\url{http://sourceforge.net/projects/economtex/}.
+
+
+\section{Citations}
+\subsection{Citations in Text}
+\citet{Monier98} say A, \citet{Steenkamp97} says B,
+\citet{Swinnen97} says C, and \citet{Zeller97} say D.
+An overview is available in table~\ref{tab:citations}.
+
+\begin{table}[htbp]
+\caption{Citations}
+\label{tab:citations}
+\begin{tabular}{lc}
+\hline
+Author(s) & Statement\\
+\hline
+\citet{Monier98} & A\\
+\citet{Steenkamp97} & B\\
+\citet{Swinnen97} & C\\
+\citet{Zeller97} & D\\
+\hline
+\end{tabular}
+\medskip \\
+Note: Avoid vertical lines.
+\end{table}
+
+
+\subsection{Citations in Parenthesis}
+A equals B \citep{Monier98}, B equals C \citep{Steenkamp97},
+C equals D \citep{Swinnen97}, and D equals A \citep{Zeller97}.
+Hence, A, B, C, and D are all equal
+\citep{Monier98, Steenkamp97, Swinnen97, Zeller97}.
+
+\subsection{Citations with Page Numbers}
+Citations with page numbers can be coveniently inserted using the commands
+\texttt{$\backslash$citetPage} and \texttt{$\backslash$citepPage}.
+
+\citetPage{123}{Monier98} say A, \citetPage{234}{Steenkamp97} says B,
+\citetPage{345}{Swinnen97} says C, and \citetPage{456}{Zeller97} say D.
+A equals B \citepPage{123}{Monier98}, B equals C \citepPage{234}{Steenkamp97},
+C equals D \citepPage{345}{Swinnen97}, and D equals A \citepPage{456}{Zeller97}.
+
+
+\section{Equations}
+All displayed equations should be centered
+and numbered consecutively (on the right).
+\begin{equation}
+y = a + X b
+\end{equation}
+where $a$ is a scalar,
+$y$ and $b$ are vectors,
+and $X$ is a matrix.
+Of course, you may also use Greek symbols.
+\begin{equation}
+\theta = \alpha + \Psi \beta
+\end{equation}
+where $\alpha$ is a scalar,
+$\theta$ and $\beta$ are vectors,
+and $\Psi$ is a matrix.
+
+\clearpage
+\nocite{*}
+
+\bibliographystyle{erae}
+\bibliography{erae-ex}
+
+\end{document}
diff --git a/biblio/bibtex/contrib/economic/erae.bst b/biblio/bibtex/contrib/economic/erae.bst
new file mode 100644
index 0000000000..8bfcab9960
--- /dev/null
+++ b/biblio/bibtex/contrib/economic/erae.bst
@@ -0,0 +1,1533 @@
+%%% European Review of Agricultural Economics (ERAE)
+%%% bibliography style for use with LaTeX2e
+%%% version: 1.1 (17 August 2009)
+%%% license: LaTeX Project Public License (see below)
+%%% This file was created with makebst (see below) and modified
+%%% by Arne Henningsen.
+%%% Note: This is an unofficial style file that may not fully comply
+%%% with the ERAE reference guidelines in every detail.
+%%% Please report any problems at
+%%% http://sourceforge.net/projects/economtex/
+%%% Further information is available at
+%%% http://economtex.wiki.sourceforge.net/
+%%%
+%%% The following line has to be added to the LaTeX preamble:
+%%% \usepackage[authoryear]{natbib}
+%%%
+%%
+%% This is file `erae.bst',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% merlin.mbs (with options: `ay,nat,vonx,nm-rev,ed-rev,jnrlst,keyxyr,dt-beg,yr-par,yrp-per,yrpp-xsp,note-yr,jttl-rm,trtit-b,vnum-x,volp-sp,pp-last,num-xser,numser,jnm-x,btit-rm,bt-rm,add-pub,pre-pub,doi,edpar,blk-tit,ppx,ed,abr,ednx,ord,and-xcom,em-x,')
+%% ----------------------------------------
+%% *** ERAE ***
+%%
+%% Copyright 1994-2005 Patrick W Daly
+ % ===============================================================
+ % IMPORTANT NOTICE:
+ % This bibliographic style (bst) file has been generated from one or
+ % more master bibliographic style (mbs) files, listed above.
+ %
+ % This generated file can be redistributed and/or modified under the terms
+ % of the LaTeX Project Public License Distributed from CTAN
+ % archives in directory macros/latex/base/lppl.txt; either
+ % version 1 of the License, or any later version.
+ % ===============================================================
+ % Name and version information of the main mbs file:
+ % \ProvidesFile{merlin.mbs}[2005/10/17 4.14 (PWD, AO, DPC)]
+ % For use with BibTeX version 0.99a or later
+ %-------------------------------------------------------------------
+ % This bibliography style file is intended for texts in ENGLISH
+ % This is an author-year citation style bibliography. As such, it is
+ % non-standard LaTeX, and requires a special package file to function properly.
+ % Such a package is natbib.sty by Patrick W. Daly
+ % The form of the \bibitem entries is
+ % \bibitem[Jones et al.(1990)]{key}...
+ % \bibitem[Jones et al.(1990)Jones, Baker, and Smith]{key}...
+ % The essential feature is that the label (the part in brackets) consists
+ % of the author names, as they should appear in the citation, with the year
+ % in parentheses following. There must be no space before the opening
+ % parenthesis!
+ % With natbib v5.3, a full list of authors may also follow the year.
+ % In natbib.sty, it is possible to define the type of enclosures that is
+ % really wanted (brackets or parentheses), but in either case, there must
+ % be parentheses in the label.
+ % The \cite command functions as follows:
+ % \citet{key} ==>> Jones et al. (1990)
+ % \citet*{key} ==>> Jones, Baker, and Smith (1990)
+ % \citep{key} ==>> (Jones et al., 1990)
+ % \citep*{key} ==>> (Jones, Baker, and Smith, 1990)
+ % \citep[chap. 2]{key} ==>> (Jones et al., 1990, chap. 2)
+ % \citep[e.g.][]{key} ==>> (e.g. Jones et al., 1990)
+ % \citep[e.g.][p. 32]{key} ==>> (e.g. Jones et al., p. 32)
+ % \citeauthor{key} ==>> Jones et al.
+ % \citeauthor*{key} ==>> Jones, Baker, and Smith
+ % \citeyear{key} ==>> 1990
+ %---------------------------------------------------------------------
+
+ENTRY
+ { address
+ author
+ booktitle
+ chapter
+ doi
+ edition
+ editor
+ eid
+ howpublished
+ institution
+ journal
+ key
+ month
+ note
+ number
+ organization
+ pages
+ publisher
+ school
+ series
+ title
+ type
+ volume
+ year
+ }
+ {}
+ { label extra.label sort.label short.list }
+INTEGERS { output.state before.all mid.sentence after.sentence after.block }
+FUNCTION {init.state.consts}
+{ #0 'before.all :=
+ #1 'mid.sentence :=
+ #2 'after.sentence :=
+ #3 'after.block :=
+}
+STRINGS { s t}
+FUNCTION {output.nonnull}
+{ 's :=
+ output.state mid.sentence =
+ { ", " * write$ }
+ { output.state after.block =
+ { add.period$ write$
+ newline$
+ "\newblock " write$
+ }
+ { output.state before.all =
+ 'write$
+ { add.period$ " " * write$ }
+ if$
+ }
+ if$
+ mid.sentence 'output.state :=
+ }
+ if$
+ s
+}
+FUNCTION {output}
+{ duplicate$ empty$
+ 'pop$
+ 'output.nonnull
+ if$
+}
+FUNCTION {output.check}
+{ 't :=
+ duplicate$ empty$
+ { pop$ "empty " t * " in " * cite$ * warning$ }
+ 'output.nonnull
+ if$
+}
+FUNCTION {fin.entry}
+{ add.period$
+ write$
+ newline$
+}
+
+FUNCTION {new.block}
+{ output.state before.all =
+ 'skip$
+ { after.block 'output.state := }
+ if$
+}
+FUNCTION {new.sentence}
+{ output.state after.block =
+ 'skip$
+ { output.state before.all =
+ 'skip$
+ { after.sentence 'output.state := }
+ if$
+ }
+ if$
+}
+FUNCTION {add.blank}
+{ " " * before.all 'output.state :=
+}
+
+FUNCTION {no.blank.or.punct}
+{ "\hspace{0pt}" * before.all 'output.state :=
+}
+
+FUNCTION {date.block}
+{
+ new.sentence
+}
+
+FUNCTION {not}
+{ { #0 }
+ { #1 }
+ if$
+}
+FUNCTION {and}
+{ 'skip$
+ { pop$ #0 }
+ if$
+}
+FUNCTION {or}
+{ { pop$ #1 }
+ 'skip$
+ if$
+}
+FUNCTION {new.block.checkb}
+{ empty$
+ swap$ empty$
+ and
+ 'skip$
+ 'new.block
+ if$
+}
+FUNCTION {field.or.null}
+{ duplicate$ empty$
+ { pop$ "" }
+ 'skip$
+ if$
+}
+FUNCTION {emphasize}
+{ duplicate$ empty$
+ { pop$ "" }
+ { "{\em " swap$ * "\/}" * }
+ if$
+}
+FUNCTION {tie.or.space.prefix}
+{ duplicate$ text.length$ #3 <
+ { "~" }
+ { " " }
+ if$
+ swap$
+}
+
+FUNCTION {capitalize}
+{ "u" change.case$ "t" change.case$ }
+
+FUNCTION {space.word}
+{ " " swap$ * " " * }
+ % Here are the language-specific definitions for explicit words.
+ % Each function has a name bbl.xxx where xxx is the English word.
+ % The language selected here is ENGLISH
+FUNCTION {bbl.and}
+{ "and"}
+
+FUNCTION {bbl.etal}
+{ "et~al." }
+
+FUNCTION {bbl.editors}
+{ "eds" }
+
+FUNCTION {bbl.editor}
+{ "ed." }
+
+FUNCTION {bbl.edby}
+{ "edited by" }
+
+FUNCTION {bbl.edition}
+{ "ed." }
+
+FUNCTION {bbl.volume}
+{ "vol." }
+
+FUNCTION {bbl.of}
+{ "of" }
+
+FUNCTION {bbl.number}
+{ "no." }
+
+FUNCTION {bbl.nr}
+{ "no." }
+
+FUNCTION {bbl.in}
+{ "in" }
+
+FUNCTION {bbl.pages}
+{ "" }
+
+FUNCTION {bbl.page}
+{ "" }
+
+FUNCTION {bbl.chapter}
+{ "chap." }
+
+FUNCTION {bbl.techrep}
+{ "Tech. Rep." }
+
+FUNCTION {bbl.mthesis}
+{ "Master's thesis" }
+
+FUNCTION {bbl.phdthesis}
+{ "Ph.D. thesis" }
+
+FUNCTION {bbl.first}
+{ "1st" }
+
+FUNCTION {bbl.second}
+{ "2nd" }
+
+FUNCTION {bbl.third}
+{ "3rd" }
+
+FUNCTION {bbl.fourth}
+{ "4th" }
+
+FUNCTION {bbl.fifth}
+{ "5th" }
+
+FUNCTION {bbl.st}
+{ "st" }
+
+FUNCTION {bbl.nd}
+{ "nd" }
+
+FUNCTION {bbl.rd}
+{ "rd" }
+
+FUNCTION {bbl.th}
+{ "th" }
+
+MACRO {jan} {"Jan."}
+
+MACRO {feb} {"Feb."}
+
+MACRO {mar} {"Mar."}
+
+MACRO {apr} {"Apr."}
+
+MACRO {may} {"May"}
+
+MACRO {jun} {"Jun."}
+
+MACRO {jul} {"Jul."}
+
+MACRO {aug} {"Aug."}
+
+MACRO {sep} {"Sep."}
+
+MACRO {oct} {"Oct."}
+
+MACRO {nov} {"Nov."}
+
+MACRO {dec} {"Dec."}
+
+FUNCTION {eng.ord}
+{ duplicate$ "1" swap$ *
+ #-2 #1 substring$ "1" =
+ { bbl.th * }
+ { duplicate$ #-1 #1 substring$
+ duplicate$ "1" =
+ { pop$ bbl.st * }
+ { duplicate$ "2" =
+ { pop$ bbl.nd * }
+ { "3" =
+ { bbl.rd * }
+ { bbl.th * }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+}
+
+MACRO {acmcs} {"ACM Computing Surveys"}
+
+MACRO {acta} {"Acta Informatica"}
+
+MACRO {cacm} {"Communications of the ACM"}
+
+MACRO {ibmjrd} {"IBM Journal of Research and Development"}
+
+MACRO {ibmsj} {"IBM Systems Journal"}
+
+MACRO {ieeese} {"IEEE Transactions on Software Engineering"}
+
+MACRO {ieeetc} {"IEEE Transactions on Computers"}
+
+MACRO {ieeetcad}
+ {"IEEE Transactions on Computer-Aided Design of Integrated Circuits"}
+
+MACRO {ipl} {"Information Processing Letters"}
+
+MACRO {jacm} {"Journal of the ACM"}
+
+MACRO {jcss} {"Journal of Computer and System Sciences"}
+
+MACRO {scp} {"Science of Computer Programming"}
+
+MACRO {sicomp} {"SIAM Journal on Computing"}
+
+MACRO {tocs} {"ACM Transactions on Computer Systems"}
+
+MACRO {tods} {"ACM Transactions on Database Systems"}
+
+MACRO {tog} {"ACM Transactions on Graphics"}
+
+MACRO {toms} {"ACM Transactions on Mathematical Software"}
+
+MACRO {toois} {"ACM Transactions on Office Information Systems"}
+
+MACRO {toplas} {"ACM Transactions on Programming Languages and Systems"}
+
+MACRO {tcs} {"Theoretical Computer Science"}
+FUNCTION {bibinfo.check}
+{ swap$
+ duplicate$ missing$
+ {
+ pop$ pop$
+ ""
+ }
+ { duplicate$ empty$
+ {
+ swap$ pop$
+ }
+ { swap$
+ pop$
+ }
+ if$
+ }
+ if$
+}
+FUNCTION {bibinfo.warn}
+{ swap$
+ duplicate$ missing$
+ {
+ swap$ "missing " swap$ * " in " * cite$ * warning$ pop$
+ ""
+ }
+ { duplicate$ empty$
+ {
+ swap$ "empty " swap$ * " in " * cite$ * warning$
+ }
+ { swap$
+ pop$
+ }
+ if$
+ }
+ if$
+}
+STRINGS { bibinfo}
+INTEGERS { nameptr namesleft numnames }
+
+FUNCTION {format.names}
+{ 'bibinfo :=
+ duplicate$ empty$ 'skip$ {
+ 's :=
+ "" 't :=
+ #1 'nameptr :=
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ { s nameptr
+ "{ll}{, f.}{, jj}{ vv}"
+ format.name$
+ bibinfo bibinfo.check
+ 't :=
+ nameptr #1 >
+ {
+ namesleft #1 >
+ { ", " * t * }
+ {
+ s nameptr "{ll}" format.name$ duplicate$ "others" =
+ { 't := }
+ { pop$ }
+ if$
+ t "others" =
+ {
+ " " * bbl.etal *
+ }
+ {
+ bbl.and
+ space.word * t *
+ }
+ if$
+ }
+ if$
+ }
+ 't
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+ } if$
+}
+FUNCTION {format.names.ed}
+{
+ format.names
+}
+FUNCTION {format.key}
+{ empty$
+ { key field.or.null }
+ { "" }
+ if$
+}
+
+FUNCTION {format.authors}
+{ author "author" format.names
+}
+FUNCTION {get.bbl.editor}
+{ editor num.names$ #1 > 'bbl.editors 'bbl.editor if$ }
+
+FUNCTION {format.editors}
+{ editor "editor" format.names duplicate$ empty$ 'skip$
+ {
+ " " *
+ get.bbl.editor
+ "(" swap$ * ")" *
+ *
+ }
+ if$
+}
+FUNCTION {format.doi}
+{ doi "doi" bibinfo.check
+ duplicate$ empty$ 'skip$
+ {
+ "\doi{" swap$ * "}" *
+ }
+ if$
+}
+FUNCTION {format.note}
+{
+ note empty$
+ { "" }
+ { note #1 #1 substring$
+ duplicate$ "{" =
+ 'skip$
+ { output.state mid.sentence =
+ { "l" }
+ { "u" }
+ if$
+ change.case$
+ }
+ if$
+ note #2 global.max$ substring$ * "note" bibinfo.check
+ }
+ if$
+}
+
+FUNCTION {format.title}
+{ title
+ duplicate$ empty$ 'skip$
+ { "t" change.case$ }
+ if$
+ "title" bibinfo.check
+}
+FUNCTION {format.full.names}
+{'s :=
+ "" 't :=
+ #1 'nameptr :=
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ { s nameptr
+ "{vv~}{ll}" format.name$
+ 't :=
+ nameptr #1 >
+ {
+ namesleft #1 >
+ { ", " * t * }
+ {
+ s nameptr "{ll}" format.name$ duplicate$ "others" =
+ { 't := }
+ { pop$ }
+ if$
+ t "others" =
+ {
+ " " * bbl.etal *
+ }
+ {
+ bbl.and
+ space.word * t *
+ }
+ if$
+ }
+ if$
+ }
+ 't
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+}
+
+FUNCTION {author.editor.key.full}
+{ author empty$
+ { editor empty$
+ { key empty$
+ { cite$ #1 #3 substring$ }
+ 'key
+ if$
+ }
+ { editor format.full.names }
+ if$
+ }
+ { author format.full.names }
+ if$
+}
+
+FUNCTION {author.key.full}
+{ author empty$
+ { key empty$
+ { cite$ #1 #3 substring$ }
+ 'key
+ if$
+ }
+ { author format.full.names }
+ if$
+}
+
+FUNCTION {editor.key.full}
+{ editor empty$
+ { key empty$
+ { cite$ #1 #3 substring$ }
+ 'key
+ if$
+ }
+ { editor format.full.names }
+ if$
+}
+
+FUNCTION {make.full.names}
+{ type$ "book" =
+ type$ "inbook" =
+ or
+ 'author.editor.key.full
+ { type$ "proceedings" =
+ 'editor.key.full
+ 'author.key.full
+ if$
+ }
+ if$
+}
+
+FUNCTION {output.bibitem}
+{ newline$
+ "\bibitem[{" write$
+ label write$
+ ")" make.full.names duplicate$ short.list =
+ { pop$ }
+ { * }
+ if$
+ "}]{" * write$
+ cite$ write$
+ "}" write$
+ newline$
+ ""
+ before.all 'output.state :=
+}
+
+FUNCTION {n.dashify}
+{
+ 't :=
+ ""
+ { t empty$ not }
+ { t #1 #1 substring$ "-" =
+ { t #1 #2 substring$ "--" = not
+ { "--" *
+ t #2 global.max$ substring$ 't :=
+ }
+ { { t #1 #1 substring$ "-" = }
+ { "-" *
+ t #2 global.max$ substring$ 't :=
+ }
+ while$
+ }
+ if$
+ }
+ { t #1 #1 substring$ *
+ t #2 global.max$ substring$ 't :=
+ }
+ if$
+ }
+ while$
+}
+
+FUNCTION {word.in}
+{ bbl.in capitalize
+ " " * }
+
+FUNCTION {format.date}
+{ year "year" bibinfo.check duplicate$ empty$
+ {
+ "empty year in " cite$ * "; set to ????" * warning$
+ pop$ "????"
+ }
+ 'skip$
+ if$
+ extra.label *
+ before.all 'output.state :=
+ " (" swap$ * ")" *
+}
+FUNCTION {format.btitle}
+{ title "title" bibinfo.check
+ duplicate$ empty$ 'skip$
+ {
+ emphasize
+ }
+ if$
+}
+FUNCTION {either.or.check}
+{ empty$
+ 'pop$
+ { "can't use both " swap$ * " fields in " * cite$ * warning$ }
+ if$
+}
+FUNCTION {format.bvolume}
+{ volume empty$
+ { "" }
+ { series "series" bibinfo.check
+ volume "volume" bibinfo.check
+ duplicate$ empty$ 'pop$
+ { swap$ "" space.word * swap$
+ emphasize * }
+ if$
+ "volume and number" number either.or.check
+ }
+ if$
+}
+FUNCTION {format.number.series}
+{ volume empty$
+ { number empty$
+ { series field.or.null }
+ { series empty$
+ { number "number" bibinfo.check }
+ { output.state mid.sentence =
+ { bbl.number }
+ { bbl.number capitalize }
+ if$
+ number tie.or.space.prefix "number" bibinfo.check * *
+ bbl.in space.word *
+ series "series" bibinfo.check *
+ }
+ if$
+ }
+ if$
+ }
+ { "" }
+ if$
+}
+FUNCTION {is.num}
+{ chr.to.int$
+ duplicate$ "0" chr.to.int$ < not
+ swap$ "9" chr.to.int$ > not and
+}
+
+FUNCTION {extract.num}
+{ duplicate$ 't :=
+ "" 's :=
+ { t empty$ not }
+ { t #1 #1 substring$
+ t #2 global.max$ substring$ 't :=
+ duplicate$ is.num
+ { s swap$ * 's := }
+ { pop$ "" 't := }
+ if$
+ }
+ while$
+ s empty$
+ 'skip$
+ { pop$ s }
+ if$
+}
+
+FUNCTION {convert.edition}
+{ extract.num "l" change.case$ 's :=
+ s "first" = s "1" = or
+ { bbl.first 't := }
+ { s "second" = s "2" = or
+ { bbl.second 't := }
+ { s "third" = s "3" = or
+ { bbl.third 't := }
+ { s "fourth" = s "4" = or
+ { bbl.fourth 't := }
+ { s "fifth" = s "5" = or
+ { bbl.fifth 't := }
+ { s #1 #1 substring$ is.num
+ { s eng.ord 't := }
+ { edition 't := }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+ t
+}
+
+FUNCTION {format.edition}
+{ edition duplicate$ empty$ 'skip$
+ {
+ convert.edition
+ output.state mid.sentence =
+ { "l" }
+ { "t" }
+ if$ change.case$
+ "edition" bibinfo.check
+ " " * bbl.edition *
+ }
+ if$
+}
+INTEGERS { multiresult }
+FUNCTION {multi.page.check}
+{ 't :=
+ #0 'multiresult :=
+ { multiresult not
+ t empty$ not
+ and
+ }
+ { t #1 #1 substring$
+ duplicate$ "-" =
+ swap$ duplicate$ "," =
+ swap$ "+" =
+ or or
+ { #1 'multiresult := }
+ { t #2 global.max$ substring$ 't := }
+ if$
+ }
+ while$
+ multiresult
+}
+FUNCTION {format.pages}
+{ pages duplicate$ empty$ 'skip$
+ { duplicate$ multi.page.check
+ {
+ n.dashify
+ }
+ {
+ }
+ if$
+ "pages" bibinfo.check
+ }
+ if$
+}
+FUNCTION {format.journal.pages}
+{ pages duplicate$ empty$ 'pop$
+ { swap$ duplicate$ empty$
+ { pop$ pop$ format.pages }
+ {
+ ": " *
+ swap$
+ n.dashify
+ "pages" bibinfo.check
+ *
+ }
+ if$
+ }
+ if$
+}
+FUNCTION {format.journal.eid}
+{ eid "eid" bibinfo.check
+ duplicate$ empty$ 'pop$
+ { swap$ duplicate$ empty$ 'skip$
+ {
+ ": " *
+ }
+ if$
+ swap$ *
+ }
+ if$
+}
+FUNCTION {format.vol.num.pages}
+{ volume field.or.null
+ duplicate$ empty$ 'skip$
+ {
+ "volume" bibinfo.check
+ }
+ if$
+}
+
+FUNCTION {format.chapter.pages}
+{ chapter empty$
+ { "" }
+ { type empty$
+ { bbl.chapter }
+ { type "l" change.case$
+ "type" bibinfo.check
+ }
+ if$
+ chapter tie.or.space.prefix
+ "chapter" bibinfo.check
+ * *
+ }
+ if$
+}
+
+FUNCTION {format.booktitle}
+{
+ booktitle "booktitle" bibinfo.check
+ emphasize
+}
+FUNCTION {format.in.ed.booktitle}
+{ format.booktitle duplicate$ empty$ 'skip$
+ {
+ editor "editor" format.names.ed duplicate$ empty$ 'pop$
+ {
+ " " *
+ get.bbl.editor
+ "(" swap$ * "), " *
+ * swap$
+ * }
+ if$
+ word.in swap$ *
+ }
+ if$
+}
+FUNCTION {format.thesis.type}
+{ type duplicate$ empty$
+ 'pop$
+ { swap$ pop$
+ "t" change.case$ "type" bibinfo.check
+ }
+ if$
+}
+FUNCTION {format.tr.number}
+{ number "number" bibinfo.check
+ type duplicate$ empty$
+ { pop$ bbl.techrep }
+ 'skip$
+ if$
+ "type" bibinfo.check
+ swap$ duplicate$ empty$
+ { pop$ "t" change.case$ }
+ { tie.or.space.prefix * * }
+ if$
+}
+FUNCTION {format.article.crossref}
+{
+ word.in
+ " \cite{" * crossref * "}" *
+}
+FUNCTION {format.book.crossref}
+{ volume duplicate$ empty$
+ { "empty volume in " cite$ * "'s crossref of " * crossref * warning$
+ pop$ word.in
+ }
+ { bbl.volume
+ capitalize
+ swap$ tie.or.space.prefix "volume" bibinfo.check * * bbl.of space.word *
+ }
+ if$
+ " \cite{" * crossref * "}" *
+}
+FUNCTION {format.incoll.inproc.crossref}
+{
+ word.in
+ " \cite{" * crossref * "}" *
+}
+FUNCTION {format.org.or.pub}
+{ 't :=
+ ""
+ address empty$ t empty$ and
+ 'skip$
+ {
+ address "address" bibinfo.check *
+ new.sentence
+ t empty$
+ 'skip$
+ { address empty$
+ 'skip$
+ { ": " * }
+ if$
+ t *
+ }
+ if$
+ }
+ if$
+}
+FUNCTION {format.publisher.address}
+{ publisher "publisher" bibinfo.warn format.org.or.pub
+}
+
+FUNCTION {format.organization.address}
+{ organization "organization" bibinfo.check format.org.or.pub
+}
+
+FUNCTION {article}
+{ output.bibitem
+ format.authors "author" output.check
+ author format.key output
+ format.date "year" output.check
+ date.block
+ format.title "title" output.check
+ new.sentence
+ crossref missing$
+ {
+ journal
+ "journal" bibinfo.check
+ emphasize
+ "journal" output.check
+ add.blank
+ format.vol.num.pages output
+ }
+ { format.article.crossref output.nonnull
+ }
+ if$
+ eid empty$
+ { format.journal.pages }
+ { format.journal.eid }
+ if$
+ format.doi output
+ format.note output
+ fin.entry
+}
+FUNCTION {book}
+{ output.bibitem
+ author empty$
+ { format.editors "author and editor" output.check
+ editor format.key output
+ }
+ { format.authors output.nonnull
+ crossref missing$
+ { "author and editor" editor either.or.check }
+ 'skip$
+ if$
+ }
+ if$
+ format.date "year" output.check
+ date.block
+ format.btitle "title" output.check
+ crossref missing$
+ { format.bvolume output
+ new.sentence
+ format.number.series output
+ format.publisher.address output
+ }
+ {
+ new.sentence
+ format.book.crossref output.nonnull
+ }
+ if$
+ format.edition output
+ format.doi output
+ format.note output
+ fin.entry
+}
+FUNCTION {booklet}
+{ output.bibitem
+ format.authors output
+ author format.key output
+ format.date "year" output.check
+ date.block
+ format.title "title" output.check
+ new.sentence
+ howpublished "howpublished" bibinfo.check output
+ address "address" bibinfo.check output
+ format.doi output
+ format.note output
+ fin.entry
+}
+
+FUNCTION {inbook}
+{ output.bibitem
+ author empty$
+ { format.editors "author and editor" output.check
+ editor format.key output
+ }
+ { format.authors output.nonnull
+ crossref missing$
+ { "author and editor" editor either.or.check }
+ 'skip$
+ if$
+ }
+ if$
+ format.date "year" output.check
+ date.block
+ format.btitle "title" output.check
+ crossref missing$
+ {
+ format.number.series output
+ format.publisher.address output
+ format.bvolume output
+ format.chapter.pages "chapter and pages" output.check
+ new.sentence
+ }
+ {
+ format.chapter.pages "chapter and pages" output.check
+ new.sentence
+ format.book.crossref output.nonnull
+ }
+ if$
+ format.edition output
+ format.pages "pages" output.check
+ format.doi output
+ format.note output
+ fin.entry
+}
+
+FUNCTION {incollection}
+{ output.bibitem
+ format.authors "author" output.check
+ author format.key output
+ format.date "year" output.check
+ date.block
+ format.title "title" output.check
+ new.sentence
+ crossref missing$
+ { format.in.ed.booktitle "booktitle" output.check
+ format.number.series output
+ format.publisher.address output
+ format.bvolume output
+ format.chapter.pages output
+ format.edition output
+ }
+ { format.incoll.inproc.crossref output.nonnull
+ format.chapter.pages output
+ }
+ if$
+ format.pages "pages" output.check
+ format.doi output
+ format.note output
+ fin.entry
+}
+FUNCTION {inproceedings}
+{ output.bibitem
+ format.authors "author" output.check
+ author format.key output
+ format.date "year" output.check
+ date.block
+ title "title" output.check
+ new.sentence
+ crossref missing$
+ { format.in.ed.booktitle "booktitle" output.check
+ format.number.series output
+ format.bvolume output
+ publisher empty$
+ { format.organization.address output }
+ { organization "organization" bibinfo.check output
+ format.publisher.address output
+ }
+ if$
+ }
+ { format.incoll.inproc.crossref output.nonnull
+ }
+ if$
+ format.pages "pages" output.check
+ format.doi output
+ format.note output
+ fin.entry
+}
+FUNCTION {conference} { inproceedings }
+FUNCTION {manual}
+{ output.bibitem
+ format.authors output
+ author format.key output
+ format.date "year" output.check
+ date.block
+ title "title" output.check
+ new.sentence
+ organization "organization" bibinfo.check output
+ address "address" bibinfo.check output
+ format.edition output
+ format.doi output
+ format.note output
+ fin.entry
+}
+
+FUNCTION {mastersthesis}
+{ output.bibitem
+ format.authors "author" output.check
+ author format.key output
+ format.date "year" output.check
+ date.block
+ title
+ "title" output.check
+ new.sentence
+ bbl.mthesis format.thesis.type output.nonnull
+ school "school" bibinfo.warn output
+ address "address" bibinfo.check output
+ format.doi output
+ format.note output
+ fin.entry
+}
+
+FUNCTION {misc}
+{ output.bibitem
+ format.authors output
+ author format.key output
+ format.date "year" output.check
+ date.block
+ format.title output
+ new.sentence
+ howpublished "howpublished" bibinfo.check output
+ format.doi output
+ format.note output
+ fin.entry
+}
+FUNCTION {phdthesis}
+{ output.bibitem
+ format.authors "author" output.check
+ author format.key output
+ format.date "year" output.check
+ date.block
+ title
+ "title" output.check
+ new.sentence
+ bbl.phdthesis format.thesis.type output.nonnull
+ school "school" bibinfo.warn output
+ address "address" bibinfo.check output
+ format.doi output
+ format.note output
+ fin.entry
+}
+
+FUNCTION {proceedings}
+{ output.bibitem
+ format.editors output
+ editor format.key output
+ format.date "year" output.check
+ date.block
+ title "title" output.check
+ format.bvolume output
+ format.number.series output
+ publisher empty$
+ { format.organization.address output }
+ { organization "organization" bibinfo.check output
+ format.publisher.address output
+ }
+ if$
+ format.doi output
+ format.note output
+ fin.entry
+}
+
+FUNCTION {techreport}
+{ output.bibitem
+ format.authors "author" output.check
+ author format.key output
+ format.date "year" output.check
+ date.block
+ title
+ "title" output.check
+ new.sentence
+ format.tr.number output.nonnull
+ institution "institution" bibinfo.warn output
+ address "address" bibinfo.check output
+ format.doi output
+ format.note output
+ fin.entry
+}
+
+FUNCTION {unpublished}
+{ output.bibitem
+ format.authors "author" output.check
+ author format.key output
+ format.date "year" output.check
+ date.block
+ format.title "title" output.check
+ format.doi output
+ format.note "note" output.check
+ fin.entry
+}
+
+FUNCTION {default.type} { misc }
+READ
+FUNCTION {sortify}
+{ purify$
+ "l" change.case$
+}
+INTEGERS { len }
+FUNCTION {chop.word}
+{ 's :=
+ 'len :=
+ s #1 len substring$ =
+ { s len #1 + global.max$ substring$ }
+ 's
+ if$
+}
+FUNCTION {format.lab.names}
+{ 's :=
+ "" 't :=
+ s #1 "{vv~}{ll}" format.name$
+ s num.names$ duplicate$
+ #2 >
+ { pop$
+ " " * bbl.etal *
+ }
+ { #2 <
+ 'skip$
+ { s #2 "{ff }{vv }{ll}{ jj}" format.name$ "others" =
+ {
+ " " * bbl.etal *
+ }
+ { bbl.and space.word * s #2 "{vv~}{ll}" format.name$
+ * }
+ if$
+ }
+ if$
+ }
+ if$
+}
+
+FUNCTION {author.key.label}
+{ author empty$
+ { key empty$
+ { cite$ #1 #3 substring$ }
+ 'key
+ if$
+ }
+ { author format.lab.names }
+ if$
+}
+
+FUNCTION {author.editor.key.label}
+{ author empty$
+ { editor empty$
+ { key empty$
+ { cite$ #1 #3 substring$ }
+ 'key
+ if$
+ }
+ { editor format.lab.names }
+ if$
+ }
+ { author format.lab.names }
+ if$
+}
+
+FUNCTION {editor.key.label}
+{ editor empty$
+ { key empty$
+ { cite$ #1 #3 substring$ }
+ 'key
+ if$
+ }
+ { editor format.lab.names }
+ if$
+}
+
+FUNCTION {calc.short.authors}
+{ type$ "book" =
+ type$ "inbook" =
+ or
+ 'author.editor.key.label
+ { type$ "proceedings" =
+ 'editor.key.label
+ 'author.key.label
+ if$
+ }
+ if$
+ 'short.list :=
+}
+
+FUNCTION {calc.label}
+{ calc.short.authors
+ short.list
+ "("
+ *
+ year duplicate$ empty$
+ short.list key field.or.null = or
+ { pop$ "" }
+ 'skip$
+ if$
+ *
+ 'label :=
+}
+
+FUNCTION {sort.format.names}
+{ 's :=
+ #1 'nameptr :=
+ ""
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ { s nameptr
+ "{ll{ }}{ f{ }}{ jj{ }}"
+ format.name$ 't :=
+ nameptr #1 >
+ {
+ " " *
+ namesleft #1 = t "others" = and
+ { "zzzzz" * }
+ { t sortify * }
+ if$
+ }
+ { t sortify * }
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+}
+
+FUNCTION {sort.format.title}
+{ 't :=
+ "A " #2
+ "An " #3
+ "The " #4 t chop.word
+ chop.word
+ chop.word
+ sortify
+ #1 global.max$ substring$
+}
+FUNCTION {author.sort}
+{ author empty$
+ { key empty$
+ { "to sort, need author or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { author sort.format.names }
+ if$
+}
+FUNCTION {author.editor.sort}
+{ author empty$
+ { editor empty$
+ { key empty$
+ { "to sort, need author, editor, or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { editor sort.format.names }
+ if$
+ }
+ { author sort.format.names }
+ if$
+}
+FUNCTION {editor.sort}
+{ editor empty$
+ { key empty$
+ { "to sort, need editor or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { editor sort.format.names }
+ if$
+}
+FUNCTION {presort}
+{ calc.label
+ label sortify
+ " "
+ *
+ type$ "book" =
+ type$ "inbook" =
+ or
+ 'author.editor.sort
+ { type$ "proceedings" =
+ 'editor.sort
+ 'author.sort
+ if$
+ }
+ if$
+ #1 entry.max$ substring$
+ 'sort.label :=
+ sort.label
+ *
+ " "
+ *
+ title field.or.null
+ sort.format.title
+ *
+ #1 entry.max$ substring$
+ 'sort.key$ :=
+}
+
+ITERATE {presort}
+SORT
+STRINGS { last.label next.extra }
+INTEGERS { last.extra.num number.label }
+FUNCTION {initialize.extra.label.stuff}
+{ #0 int.to.chr$ 'last.label :=
+ "" 'next.extra :=
+ #0 'last.extra.num :=
+ #0 'number.label :=
+}
+FUNCTION {forward.pass}
+{ last.label label =
+ { last.extra.num #1 + 'last.extra.num :=
+ last.extra.num int.to.chr$ 'extra.label :=
+ }
+ { "a" chr.to.int$ 'last.extra.num :=
+ "" 'extra.label :=
+ label 'last.label :=
+ }
+ if$
+ number.label #1 + 'number.label :=
+}
+FUNCTION {reverse.pass}
+{ next.extra "b" =
+ { "a" 'extra.label := }
+ 'skip$
+ if$
+ extra.label 'next.extra :=
+ extra.label
+ duplicate$ empty$
+ 'skip$
+ { "{\natexlab{" swap$ * "}}" * }
+ if$
+ 'extra.label :=
+ label extra.label * 'label :=
+}
+EXECUTE {initialize.extra.label.stuff}
+ITERATE {forward.pass}
+REVERSE {reverse.pass}
+FUNCTION {bib.sort.order}
+{ sort.label
+ " "
+ *
+ year field.or.null sortify
+ *
+ " "
+ *
+ title field.or.null
+ sort.format.title
+ *
+ #1 entry.max$ substring$
+ 'sort.key$ :=
+}
+ITERATE {bib.sort.order}
+SORT
+FUNCTION {begin.bib}
+{ preamble$ empty$
+ 'skip$
+ { preamble$ write$ newline$ }
+ if$
+ "\begin{thebibliography}{" number.label int.to.str$ * "}" *
+ write$ newline$
+ "\providecommand{\natexlab}[1]{#1}"
+ write$ newline$
+ "\expandafter\ifx\csname urlstyle\endcsname\relax"
+ write$ newline$
+ " \providecommand{\doi}[1]{doi:\discretionary{}{}{}#1}\else"
+ write$ newline$
+ " \providecommand{\doi}{doi:\discretionary{}{}{}\begingroup \urlstyle{rm}\Url}\fi"
+ write$ newline$
+}
+EXECUTE {begin.bib}
+EXECUTE {init.state.consts}
+ITERATE {call.type$}
+FUNCTION {end.bib}
+{ newline$
+ "\end{thebibliography}" write$ newline$
+}
+EXECUTE {end.bib}
+%% End of customized bst file
+%%
+%% End of file `erae.bst'.
diff --git a/biblio/bibtex/contrib/economic/erae.cls b/biblio/bibtex/contrib/economic/erae.cls
new file mode 100644
index 0000000000..f615442e3d
--- /dev/null
+++ b/biblio/bibtex/contrib/economic/erae.cls
@@ -0,0 +1,201 @@
+%%% LaTeX class for manuscripts submitted to the
+%%% European Review of Agricultural Economics (ERAE)
+%%%
+%%% author: Arne Henningsen
+%%% version: 1.3 (18 November 2009)
+%%% license: LaTeX Project Public License
+%%%
+%%% Note: This is an unofficial style file that may not fully comply
+%%% with the ERAE Formatting Instructions in every detail.
+%%% Please report any problems at
+%%% http://sourceforge.net/projects/economtex/
+%%% Further information is available at
+%%% http://economtex.wiki.sourceforge.net/
+%%%
+%%% This document class is based on the "scrartcl" class
+%%% from the KOMA script bundle.
+%%% Following additional packages are required:
+%%% amsmath, babel, courier, endfloat, geometry,
+%%% helvet, ifthen, mathptmx, natbib, setspace, titlesec, url
+%%%
+%%% The class provides following options:
+%%% noendfloat - don't move floats to the end of the paper
+%%% author - show name(s) of authors(s)
+%%% date - show date
+%%%
+%%% The ERAE requires that you use single quotes
+%%% you could do this with the ``csquotes'' package:
+%%% \usepackage{csquotes}
+%%% \MakeInnerQuote{<yourQuoteCharacter>}
+%%%
+%%% The corresponding BibTeX style file "erae.bst" should be used
+%%% for the bibliography: \bibliographystyle{erae}
+%%%
+%%% This document class provides 5 new commands:
+%%% \keywords can be use to show keywors below the abstract
+%%% \jelclass can be use to show JEL classifications below the abstract
+%%% \affiliation can be used to add affiliation information
+%%% \citetPage{page}{key} for citations like Author (Year: page)
+%%% \citepPage{page}{key} for citations like (Author, year: page)
+%%%
+
+
+\NeedsTeXFormat{LaTeX2e}
+\ProvidesClass{erae}[2009/11/18 LaTeX class for the European Review of Agricultural Economics]
+
+\RequirePackage{ifthen}
+
+% option to NOT place floats at the end
+\newcounter{UseEndfloat}
+\setcounter{UseEndfloat}{1}
+\DeclareOption{noendfloat}{\setcounter{UseEndfloat}{0}}
+
+% option to show the authors' names
+\newcounter{ShowAuthor}
+\setcounter{ShowAuthor}{0}
+\DeclareOption{author}{\setcounter{ShowAuthor}{1}}
+
+% option to print the date
+\newcounter{ShowDate}
+\setcounter{ShowDate}{0}
+\DeclareOption{date}{\setcounter{ShowDate}{1}}
+
+% pass any options on to the scrartcl class and load this class with some options
+\DeclareOption*{\PassOptionsToClass{\CurrentOption}{scrartcl}}
+\ProcessOptions\relax
+\LoadClass[12pt,english,pointednumbers,tablecaptionabove]{scrartcl}
+% pointednumbers = add final dot after ordinary section numbers
+% tablecaptionabove = use \captionabove for tables
+
+% page format, margins
+\RequirePackage{geometry}
+\geometry{a4paper, tmargin=2.5cm, bmargin=2.8cm, lmargin=2.5cm,
+ rmargin=2.5cm, headheight=0cm, headsep=0cm, footskip=1.2cm }
+
+% one half spacing
+\RequirePackage{setspace}
+\onehalfspacing
+
+% spacing around (sub)section headers
+\RequirePackage{titlesec}
+\titlespacing*{\section}{0pt}{1em}{0.25em}
+\titlespacing*{\subsection}{0pt}{0.85em}{0.15em}
+
+% spacing around formulas
+\AtBeginDocument{
+\setlength{\abovedisplayshortskip}{6pt}
+\setlength{\belowdisplayshortskip}{6pt}
+\setlength{\abovedisplayskip}{6pt}
+\setlength{\belowdisplayskip}{6pt}
+\allowdisplaybreaks
+}
+
+% spacing around captions and floats
+\setlength{\abovecaptionskip}{6pt}
+\setlength{\belowcaptionskip}{3pt}
+\setlength{\floatsep}{0pt}
+\setlength{\textfloatsep}{20pt}
+\setlength{\intextsep}{5pt}
+
+% font families: times/helvetica/courier
+\RequirePackage{mathptmx}
+\RequirePackage[scaled=.90]{helvet}
+\RequirePackage{courier}
+
+% amsmath
+\RequirePackage{amsmath}
+% for compatibility with ajae.cls
+\newcommand{\veclatin}[1]{#1}
+\newcommand{\matlatin}[1]{#1}
+\newcommand{\vecgreek}[1]{#1}
+\newcommand{\matgreek}[1]{#1}
+
+% font for URLs
+\RequirePackage{url}
+\def\UrlFont{\rmfamily}
+
+% citations and bibliography
+\RequirePackage[authoryear]{natbib}
+\setlength{\bibsep}{0pt}
+
+% captions of figures and tables
+\setcapwidth[l]{\textwidth}
+\setcapindent{0pt}
+\setkomafont{captionlabel}{\normalfont\bfseries}
+\renewcommand{\captionformat}{.\ }
+
+% titlepage without author and date
+\newcommand{\affiliation}[1]{\newcommand{\@affiliation}{#1}}
+\renewcommand{\maketitle}{
+ \begin{center}
+ \begin{spacing}{1.5}
+ \LARGE{\textbf{\@title}}%
+ \end{spacing}
+ \ifthenelse{\equal{\theShowAuthor}{1}}{
+ \begin{large}
+ \textbf{\@author}\\
+ \end{large}
+ \ifthenelse{ \isundefined\@affiliation }{}{
+ \vspace*{3mm}
+ \begin{small}
+ \@affiliation\\
+ \end{small}
+ }
+ \vspace*{5mm}
+ }{}
+ \ifthenelse{\equal{\theShowDate}{1}}{
+ \@date\\
+ \vspace*{5mm}
+ }{}
+ \end{center}
+}
+
+% abstract, keywords, JEL classification
+\newcommand{\keywords}[1]{\newcommand{\@keywords}{#1}}
+\newcommand{\jelclass}[1]{\newcommand{\@jelclass}{#1}}
+\renewenvironment{abstract}{%
+\begin{center}
+\begin{minipage}{0.9 \textwidth}
+\small
+\begin{center}
+\textbf{Abstract}
+\end{center}
+}{%
+\ifthenelse{ \isundefined\@keywords }{
+\ClassWarningNoLine{erae}{No keywords specified.
+ Please use the command \protect\keywords}
+}{
+\smallskip\\ \noindent
+Key words: \@keywords
+}
+\ifthenelse{ \isundefined\@jelclass }{
+\ClassWarningNoLine{erae}{No JEL classification specified.
+ Please use the command \protect\jelclass}
+}{
+\smallskip\\ \noindent
+JEL classification: \@jelclass
+}
+\end{minipage}
+\end{center}%
+\noindent%
+}
+
+% use babel package and set language to english
+\RequirePackage[english]{babel}
+
+% avoid clubs and widows
+\clubpenalty=10000
+\widowpenalty=10000
+% \displaywidowpenalty=10000
+
+% increase stretchability of the spaces (avoid overful hboxes)
+\setlength{\emergencystretch}{3em}
+
+% move floats to the end of the paper
+\ifthenelse{\equal{\theUseEndfloat}{1}}{
+\RequirePackage[heads,tablesfirst,nolists]{endfloat}
+}{}
+
+% cite page numbers after colon
+\newcommand{\citetPage}[2]{\citeauthor{#2} (\citeyear{#2}: #1)}
+\newcommand{\citepPage}[2]{\citetext{\citealp{#2}: #1}}
diff --git a/biblio/bibtex/contrib/economic/ier-bib-test.pdf b/biblio/bibtex/contrib/economic/ier-bib-test.pdf
new file mode 100644
index 0000000000..4684e487f1
--- /dev/null
+++ b/biblio/bibtex/contrib/economic/ier-bib-test.pdf
Binary files differ
diff --git a/biblio/bibtex/contrib/economic/ier-bib-test.tex b/biblio/bibtex/contrib/economic/ier-bib-test.tex
new file mode 100644
index 0000000000..f6be8afa3f
--- /dev/null
+++ b/biblio/bibtex/contrib/economic/ier-bib-test.tex
@@ -0,0 +1,26 @@
+\documentclass{article}
+\usepackage{url}
+\usepackage{natbib}
+
+\title{Testing the Bib\TeX{} style for the
+ \emph{International Economic Review} (IER)}
+
+\author{Arne Henningsen}
+
+\begin{document}
+\maketitle
+
+\textbf{Note:}
+Only the style of the list of references should be according
+to the guidelines of the \emph{International Economic Review}.%
+\footnote{%
+\url{http://www.econ.upenn.edu/Centers/iereview/submissionsguidelines.htm}
+}
+There is currently no \LaTeX{} class or template for the style
+of the paper itself.
+
+
+\nocite{*}
+\bibliographystyle{ier}
+\bibliography{ier-ex}
+\end{document}
diff --git a/biblio/bibtex/contrib/economic/ier-ex.bib b/biblio/bibtex/contrib/economic/ier-ex.bib
new file mode 100644
index 0000000000..77bad45c91
--- /dev/null
+++ b/biblio/bibtex/contrib/economic/ier-ex.bib
@@ -0,0 +1,115 @@
+% This file was created with JabRef 2.3.1.
+% Encoding: ISO8859_1
+
+@BOOK{arrow63,
+ title = {Social Choice and Individual Values},
+ publisher = {Wiley},
+ year = {1963},
+ author = {Arrow, K. J.},
+ address = {New York},
+ edition = {2nd},
+ owner = {suapm095},
+ timestamp = {2009.08.14}
+}
+
+@PHDTHESIS{chiang83,
+ author = {Chiang, S. C.},
+ title = {Imperfection Information and Quality Upgrading},
+ school = {Cornell University},
+ year = {1983},
+ owner = {suapm095},
+ timestamp = {2009.08.14}
+}
+
+@UNPUBLISHED{halvorsen86,
+ author = {Halvorsen, R. and T. Smith},
+ title = {A Test of the Theory of Exhaustible Resources},
+ note = {mimeo, University of Washington},
+ year = {1986},
+ owner = {suapm095},
+ timestamp = {2009.08.14}
+}
+
+@ARTICLE{kramer73,
+ author = {Kramer, G. H.},
+ title = {On a Class of Equilibrium Conditions for Majority Rule},
+ journal = {Econometrica},
+ year = {1973},
+ volume = {41},
+ pages = {285-297},
+ month = {March},
+ owner = {suapm095},
+ timestamp = {2009.08.14}
+}
+
+@BOOK{krantz71,
+ title = {Foundations of Measurement},
+ publisher = {Academic Press},
+ year = {1971},
+ author = {Krantz, H. D. and R. D. Luce and P. Suppes and A. Tversky},
+ address = {New York},
+ owner = {suapm095},
+ timestamp = {2009.08.14}
+}
+
+@INCOLLECTION{samuelson69,
+ author = {Samuelson, P. A.},
+ title = {Pure Theory of Public Expenditure and Taxation},
+ booktitle = {Public Economics},
+ publisher = {Macmillan},
+ year = {1969},
+ editor = {J. Margolis and H. Guitton},
+ pages = {98-123},
+ address = {New York},
+ owner = {suapm095},
+ timestamp = {2009.08.14}
+}
+
+@TECHREPORT{schworm77,
+ author = {Schworm, W. E.},
+ title = {User Cost of Capital},
+ institution = {Department of Economics, University of British Columbia},
+ year = {1977},
+ type = {Discussion Paper},
+ number = {77-22},
+ month = { July},
+ owner = {suapm095},
+ timestamp = {2009.08.14}
+}
+
+@INCOLLECTION{sonuelsam96,
+ author = {Sonuelsam, Chapter},
+ title = {Public Theory of Pure Taxation and Expenditure},
+ booktitle = {Economic Publics},
+ publisher = {Millanmac},
+ year = {1996},
+ editor = {J. Molgaris and H. Gonttui},
+ chapter = {77},
+ pages = {89-321},
+ address = {Old York},
+ owner = {suapm095},
+ timestamp = {2009.08.14}
+}
+
+@INCOLLECTION{sonuelsam96a,
+ author = {Sonuelsam, Series},
+ title = {Public Theory of Pure Taxation and Expenditure},
+ booktitle = {Economic Publics},
+ publisher = {Millanmac},
+ year = {1996},
+ editor = {J. Molgaris and H. Gonttui},
+ series = {Test Series},
+ pages = {89-321},
+ address = {Old York},
+ owner = {suapm095},
+ timestamp = {2009.08.14}
+}
+
+@comment{jabref-meta: selector_publisher:}
+
+@comment{jabref-meta: selector_author:}
+
+@comment{jabref-meta: selector_journal:}
+
+@comment{jabref-meta: selector_keywords:}
+
diff --git a/biblio/bibtex/contrib/economic/ier.bst b/biblio/bibtex/contrib/economic/ier.bst
new file mode 100644
index 0000000000..033174e4ec
--- /dev/null
+++ b/biblio/bibtex/contrib/economic/ier.bst
@@ -0,0 +1,1549 @@
+
+%% Built initially with Patrick Daly's custom-bib package and then
+%% modified by Doug McKee 12/2006. Email any comments or suggestions to
+%% Doug at dmckee@ucla.edu
+%%
+%% Jan 29, 2008: Fixed in response to the suggestions of Wladimir
+%% Ray who kindly pointed out that the names should be in small caps
+%% and repeated names should be replaced with dashes as in the
+%% Econometrica bibliography style.
+%%
+%%
+%% This is file `ier.bst',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% merlin.mbs (with options: `ay,nat,nm-rev1,jnrlst,keyxyr,yr-par,aymth,note-yr,tit-qq,qx,bt-qq,atit-u,vnum-x,volp-blk,pp-last,num-xser,bkpg-x,add-pub,pub-date,pre-edn,blk-com,ppx,ed,xedn,and-xcom,nfss,')
+%% ----------------------------------------
+%% *** International Economic Review ***
+%%
+%% Copyright 1994-2004 Patrick W Daly
+ % ===============================================================
+ % IMPORTANT NOTICE:
+ % This bibliographic style (bst) file has been generated from one or
+ % more master bibliographic style (mbs) files, listed above.
+ %
+ % This generated file can be redistributed and/or modified under the terms
+ % of the LaTeX Project Public License Distributed from CTAN
+ % archives in directory macros/latex/base/lppl.txt; either
+ % version 1 of the License, or any later version.
+ % ===============================================================
+ % Name and version information of the main mbs file:
+ % \ProvidesFile{merlin.mbs}[2004/02/09 4.13 (PWD, AO, DPC)]
+ % For use with BibTeX version 0.99a or later
+ %-------------------------------------------------------------------
+ % This bibliography style file is intended for texts in ENGLISH
+ % This is an author-year citation style bibliography. As such, it is
+ % non-standard LaTeX, and requires a special package file to function properly.
+ % Such a package is natbib.sty by Patrick W. Daly
+ % The form of the \bibitem entries is
+ % \bibitem[Jones et al.(1990)]{key}...
+ % \bibitem[Jones et al.(1990)Jones, Baker, and Smith]{key}...
+ % The essential feature is that the label (the part in brackets) consists
+ % of the author names, as they should appear in the citation, with the year
+ % in parentheses following. There must be no space before the opening
+ % parenthesis!
+ % With natbib v5.3, a full list of authors may also follow the year.
+ % In natbib.sty, it is possible to define the type of enclosures that is
+ % really wanted (brackets or parentheses), but in either case, there must
+ % be parentheses in the label.
+ % The \cite command functions as follows:
+ % \citet{key} ==>> Jones et al. (1990)
+ % \citet*{key} ==>> Jones, Baker, and Smith (1990)
+ % \citep{key} ==>> (Jones et al., 1990)
+ % \citep*{key} ==>> (Jones, Baker, and Smith, 1990)
+ % \citep[chap. 2]{key} ==>> (Jones et al., 1990, chap. 2)
+ % \citep[e.g.][]{key} ==>> (e.g. Jones et al., 1990)
+ % \citep[e.g.][p. 32]{key} ==>> (e.g. Jones et al., p. 32)
+ % \citeauthor{key} ==>> Jones et al.
+ % \citeauthor*{key} ==>> Jones, Baker, and Smith
+ % \citeyear{key} ==>> 1990
+ %---------------------------------------------------------------------
+
+ENTRY
+ { address
+ author
+ booktitle
+ chapter
+ edition
+ editor
+ eid
+ howpublished
+ institution
+ journal
+ key
+ month
+ note
+ number
+ organization
+ pages
+ publisher
+ school
+ series
+ title
+ type
+ volume
+ year
+ }
+ {}
+ { label extra.label sort.label short.list }
+INTEGERS { output.state before.all mid.sentence after.sentence after.block }
+FUNCTION {init.state.consts}
+{ #0 'before.all :=
+ #1 'mid.sentence :=
+ #2 'after.sentence :=
+ #3 'after.block :=
+}
+STRINGS { s t}
+FUNCTION {output.nonnull}
+{ 's :=
+ output.state mid.sentence =
+ { ", " * write$ }
+ { output.state after.block =
+ { add.period$ write$
+ newline$
+ "\newblock " write$
+ }
+ { output.state before.all =
+ 'write$
+ { add.period$ " " * write$ }
+ if$
+ }
+ if$
+ mid.sentence 'output.state :=
+ }
+ if$
+ s
+}
+FUNCTION {output}
+{ duplicate$ empty$
+ 'pop$
+ 'output.nonnull
+ if$
+}
+FUNCTION {output.check}
+{ 't :=
+ duplicate$ empty$
+ { pop$ "empty " t * " in " * cite$ * warning$ }
+ 'output.nonnull
+ if$
+}
+FUNCTION {fin.entry}
+{ add.period$
+ write$
+ newline$
+}
+
+FUNCTION {new.block}
+{ output.state before.all =
+ 'skip$
+ { after.block 'output.state := }
+ if$
+}
+FUNCTION {new.sentence}
+{ output.state after.block =
+ 'skip$
+ { output.state before.all =
+ 'skip$
+ { after.sentence 'output.state := }
+ if$
+ }
+ if$
+}
+FUNCTION {add.blank}
+{ " " * before.all 'output.state :=
+}
+
+FUNCTION {date.block}
+{
+ skip$
+}
+
+FUNCTION {not}
+{ { #0 }
+ { #1 }
+ if$
+}
+FUNCTION {and}
+{ 'skip$
+ { pop$ #0 }
+ if$
+}
+FUNCTION {or}
+{ { pop$ #1 }
+ 'skip$
+ if$
+}
+FUNCTION {non.stop}
+{ duplicate$
+ "}" * add.period$
+ #-1 #1 substring$ "." =
+}
+
+FUNCTION {new.block.checkb}
+{ empty$
+ swap$ empty$
+ and
+ 'skip$
+ 'new.block
+ if$
+}
+FUNCTION {field.or.null}
+{ duplicate$ empty$
+ { pop$ "" }
+ 'skip$
+ if$
+}
+FUNCTION {emphasize}
+{ duplicate$ empty$
+ { pop$ "" }
+ { "\emph{" swap$ * "}" * }
+ if$
+}
+FUNCTION {scaps}
+{ duplicate$ empty$
+ { pop$ "" }
+ { "\textsc{" swap$ * "}" * }
+ if$
+}
+FUNCTION {bib.name.font}
+{ scaps }
+FUNCTION {bib.fname.font}
+{ bib.name.font }
+FUNCTION {tie.or.space.prefix}
+{ duplicate$ text.length$ #3 <
+ { "~" }
+ { " " }
+ if$
+ swap$
+}
+
+FUNCTION {capitalize}
+{ "u" change.case$ "t" change.case$ }
+
+FUNCTION {space.word}
+{ " " swap$ * " " * }
+ % Here are the language-specific definitions for explicit words.
+ % Each function has a name bbl.xxx where xxx is the English word.
+ % The language selected here is ENGLISH
+FUNCTION {bbl.and}
+{ "and"}
+
+FUNCTION {bbl.etal}
+{ "et~al." }
+
+FUNCTION {bbl.editors}
+{ "eds." }
+
+FUNCTION {bbl.editor}
+{ "ed." }
+
+FUNCTION {bbl.edby}
+{ "edited by" }
+
+FUNCTION {bbl.edition}
+{ "edition" }
+
+FUNCTION {bbl.volume}
+{ "volume" }
+
+FUNCTION {bbl.of}
+{ "of" }
+
+FUNCTION {bbl.number}
+{ "number" }
+
+FUNCTION {bbl.nr}
+{ "no." }
+
+FUNCTION {bbl.in}
+{ "in" }
+
+FUNCTION {bbl.pages}
+{ "" }
+
+FUNCTION {bbl.page}
+{ "" }
+
+FUNCTION {bbl.chapter}
+{ "chapter" }
+
+FUNCTION {bbl.techrep}
+{ "{T}echnical {R}eport" }
+
+FUNCTION {bbl.mthesis}
+{ "Master's thesis" }
+
+FUNCTION {bbl.phdthesis}
+{ "Ph.D. thesis" }
+
+MACRO {jan} {"January"}
+
+MACRO {feb} {"February"}
+
+MACRO {mar} {"March"}
+
+MACRO {apr} {"April"}
+
+MACRO {may} {"May"}
+
+MACRO {jun} {"June"}
+
+MACRO {jul} {"July"}
+
+MACRO {aug} {"August"}
+
+MACRO {sep} {"September"}
+
+MACRO {oct} {"October"}
+
+MACRO {nov} {"November"}
+
+MACRO {dec} {"December"}
+
+MACRO {acmcs} {"ACM Computing Surveys"}
+
+MACRO {acta} {"Acta Informatica"}
+
+MACRO {cacm} {"Communications of the ACM"}
+
+MACRO {ibmjrd} {"IBM Journal of Research and Development"}
+
+MACRO {ibmsj} {"IBM Systems Journal"}
+
+MACRO {ieeese} {"IEEE Transactions on Software Engineering"}
+
+MACRO {ieeetc} {"IEEE Transactions on Computers"}
+
+MACRO {ieeetcad}
+ {"IEEE Transactions on Computer-Aided Design of Integrated Circuits"}
+
+MACRO {ipl} {"Information Processing Letters"}
+
+MACRO {jacm} {"Journal of the ACM"}
+
+MACRO {jcss} {"Journal of Computer and System Sciences"}
+
+MACRO {scp} {"Science of Computer Programming"}
+
+MACRO {sicomp} {"SIAM Journal on Computing"}
+
+MACRO {tocs} {"ACM Transactions on Computer Systems"}
+
+MACRO {tods} {"ACM Transactions on Database Systems"}
+
+MACRO {tog} {"ACM Transactions on Graphics"}
+
+MACRO {toms} {"ACM Transactions on Mathematical Software"}
+
+MACRO {toois} {"ACM Transactions on Office Information Systems"}
+
+MACRO {toplas} {"ACM Transactions on Programming Languages and Systems"}
+
+MACRO {tcs} {"Theoretical Computer Science"}
+FUNCTION {bibinfo.check}
+{ swap$
+ duplicate$ missing$
+ {
+ pop$ pop$
+ ""
+ }
+ { duplicate$ empty$
+ {
+ swap$ pop$
+ }
+ { swap$
+ pop$
+ }
+ if$
+ }
+ if$
+}
+FUNCTION {bibinfo.warn}
+{ swap$
+ duplicate$ missing$
+ {
+ swap$ "missing " swap$ * " in " * cite$ * warning$ pop$
+ ""
+ }
+ { duplicate$ empty$
+ {
+ swap$ "empty " swap$ * " in " * cite$ * warning$
+ }
+ { swap$
+ pop$
+ }
+ if$
+ }
+ if$
+}
+STRINGS { bibinfo}
+INTEGERS { nameptr namesleft numnames }
+
+FUNCTION {format.names}
+{ 'bibinfo :=
+ duplicate$ empty$ 'skip$ {
+ 's :=
+ "" 't :=
+ #1 'nameptr :=
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ { s nameptr
+ duplicate$ #1 >
+ { "{f.~}{vv~}{ll}{, jj}" }
+ { "{vv~}{ll}{, f.}{, jj}" }
+ if$
+ format.name$
+ bibinfo bibinfo.check
+ 't :=
+ nameptr #1 >
+ {
+ namesleft #1 >
+ { ", " * t * }
+ {
+ s nameptr "{ll}" format.name$ duplicate$ "others" =
+ { 't := }
+ { pop$ }
+ if$
+ t "others" =
+ {
+ " " * bbl.etal *
+ bib.name.font
+ }
+ {
+ bbl.and
+ space.word * t *
+ }
+ if$
+ }
+ if$
+ }
+ 't
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+ } if$
+ t "others" =
+ 'skip$
+ { bib.name.font }
+ if$
+}
+FUNCTION {format.names.ed}
+{
+ 'bibinfo :=
+ duplicate$ empty$ 'skip$ {
+ 's :=
+ "" 't :=
+ #1 'nameptr :=
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ { s nameptr
+ "{f.~}{vv~}{ll}{, jj}"
+ format.name$
+ bibinfo bibinfo.check
+ 't :=
+ nameptr #1 >
+ {
+ namesleft #1 >
+ { ", " * t * }
+ {
+ s nameptr "{ll}" format.name$ duplicate$ "others" =
+ { 't := }
+ { pop$ }
+ if$
+ t "others" =
+ {
+
+ " " * bbl.etal *
+ }
+ {
+ bbl.and
+ space.word * t *
+ }
+ if$
+ }
+ if$
+ }
+ 't
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+ } if$
+}
+FUNCTION {format.key}
+{ empty$
+ { key field.or.null }
+ { "" }
+ if$
+}
+
+FUNCTION {format.authors}
+{ author "author" format.names
+}
+FUNCTION {get.bbl.editor}
+{ editor num.names$ #1 > 'bbl.editors 'bbl.editor if$ }
+
+FUNCTION {format.editors}
+{ editor "editor" format.names duplicate$ empty$ 'skip$
+ {
+ "," *
+ " " *
+ get.bbl.editor
+ *
+ }
+ if$
+}
+FUNCTION {format.note}
+{
+ note empty$
+ { "" }
+ { note #1 #1 substring$
+ duplicate$ "{" =
+ 'skip$
+ { output.state mid.sentence =
+ { "l" }
+ { "u" }
+ if$
+ change.case$
+ }
+ if$
+ note #2 global.max$ substring$ * "note" bibinfo.check
+ }
+ if$
+}
+
+FUNCTION {format.title}
+{ title
+ "title" bibinfo.check
+ duplicate$ empty$ 'skip$
+ {
+ "\enquote{" swap$ *
+ ",} " *
+ }
+ if$
+}
+FUNCTION {end.quote.title}
+{ title empty$
+ 'skip$
+ { before.all 'output.state := }
+ if$
+}
+FUNCTION {end.quote.btitle}
+{ booktitle empty$
+ 'skip$
+ { before.all 'output.state := }
+ if$
+}
+FUNCTION {format.full.names}
+{'s :=
+ "" 't :=
+ #1 'nameptr :=
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ { s nameptr
+ "{vv~}{ll}" format.name$
+ 't :=
+ nameptr #1 >
+ {
+ namesleft #1 >
+ { ", " * t * }
+ {
+ s nameptr "{ll}" format.name$ duplicate$ "others" =
+ { 't := }
+ { pop$ }
+ if$
+ t "others" =
+ {
+ " " * bbl.etal *
+ }
+ {
+ bbl.and
+ space.word * t *
+ }
+ if$
+ }
+ if$
+ }
+ 't
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+}
+
+FUNCTION {author.editor.key.full}
+{ author empty$
+ { editor empty$
+ { key empty$
+ { cite$ #1 #3 substring$ }
+ 'key
+ if$
+ }
+ { editor format.full.names }
+ if$
+ }
+ { author format.full.names }
+ if$
+}
+
+FUNCTION {author.key.full}
+{ author empty$
+ { key empty$
+ { cite$ #1 #3 substring$ }
+ 'key
+ if$
+ }
+ { author format.full.names }
+ if$
+}
+
+FUNCTION {editor.key.full}
+{ editor empty$
+ { key empty$
+ { cite$ #1 #3 substring$ }
+ 'key
+ if$
+ }
+ { editor format.full.names }
+ if$
+}
+
+FUNCTION {make.full.names}
+{ type$ "book" =
+ type$ "inbook" =
+ or
+ 'author.editor.key.full
+ { type$ "proceedings" =
+ 'editor.key.full
+ 'author.key.full
+ if$
+ }
+ if$
+}
+
+FUNCTION {output.bibitem}
+{ newline$
+ "\bibitem[{" write$
+ label write$
+ ")" make.full.names duplicate$ short.list =
+ { pop$ }
+ { * }
+ if$
+ "}]{" * write$
+ cite$ write$
+ "}" write$
+ newline$
+ ""
+ before.all 'output.state :=
+}
+
+FUNCTION {n.dashify}
+{
+ 't :=
+ ""
+ { t empty$ not }
+ { t #1 #1 substring$ "-" =
+ { t #1 #2 substring$ "--" = not
+ { "--" *
+ t #2 global.max$ substring$ 't :=
+ }
+ { { t #1 #1 substring$ "-" = }
+ { "-" *
+ t #2 global.max$ substring$ 't :=
+ }
+ while$
+ }
+ if$
+ }
+ { t #1 #1 substring$ *
+ t #2 global.max$ substring$ 't :=
+ }
+ if$
+ }
+ while$
+}
+
+FUNCTION {word.in}
+{ bbl.in
+ " " * }
+
+FUNCTION {format.date}
+{ year "year" bibinfo.check duplicate$ empty$
+ {
+ "empty year in " cite$ * "; set to ????" * warning$
+ pop$ "????"
+ }
+ 'skip$
+ if$
+ month "month" bibinfo.check duplicate$ empty$
+ 'skip$
+ {
+ " " * swap$
+ }
+ if$
+ *
+ extra.label *
+ before.all 'output.state :=
+ " (" swap$ * ")" *
+}
+FUNCTION {format.tr.date}
+{ year "year" bibinfo.check duplicate$ empty$
+ {
+ "empty year in " cite$ * "; set to ????" * warning$
+ pop$ "????"
+ }
+ 'skip$
+ if$
+ month "month" bibinfo.check duplicate$ empty$
+ 'skip$
+ {
+ " " * swap$
+ }
+ if$
+ *
+ extra.label *
+ before.all 'output.state :=
+ ", " swap$ *
+}
+FUNCTION {format.unpub.date}
+{ year "year" bibinfo.check duplicate$ empty$
+ {
+ "empty year in " cite$ * "; set to ????" * warning$
+ pop$ "????"
+ }
+ 'skip$
+ if$
+ month "month" bibinfo.check duplicate$ empty$
+ 'skip$
+ {
+ " " * swap$
+ }
+ if$
+ *
+ extra.label *
+ before.all 'output.state :=
+ ", " swap$ *
+}
+FUNCTION {format.btitle}
+{ title "title" bibinfo.check
+ duplicate$ empty$ 'skip$
+ {
+ emphasize
+ }
+ if$
+}
+FUNCTION {either.or.check}
+{ empty$
+ 'pop$
+ { "can't use both " swap$ * " fields in " * cite$ * warning$ }
+ if$
+}
+FUNCTION {format.bvolume}
+{ volume empty$
+ { "" }
+ { bbl.volume volume tie.or.space.prefix
+ "volume" bibinfo.check * *
+ series "series" bibinfo.check
+ duplicate$ empty$ 'pop$
+ { swap$ bbl.of space.word * swap$
+ emphasize * }
+ if$
+ "volume and number" number either.or.check
+ }
+ if$
+}
+FUNCTION {format.number.series}
+{ volume empty$
+ { number empty$
+ { series field.or.null }
+ { series empty$
+ { number "number" bibinfo.check }
+ { output.state mid.sentence =
+ { bbl.number }
+ { bbl.number capitalize }
+ if$
+ number tie.or.space.prefix "number" bibinfo.check * *
+ bbl.in space.word *
+ series "series" bibinfo.check *
+ }
+ if$
+ }
+ if$
+ }
+ { "" }
+ if$
+}
+
+FUNCTION {format.edition}
+{ edition duplicate$ empty$ 'skip$
+ {
+ output.state mid.sentence =
+ { "l" }
+ { "t" }
+ if$ change.case$
+ "edition" bibinfo.check
+ " " * bbl.edition *
+ }
+ if$
+}
+INTEGERS { multiresult }
+FUNCTION {multi.page.check}
+{ 't :=
+ #0 'multiresult :=
+ { multiresult not
+ t empty$ not
+ and
+ }
+ { t #1 #1 substring$
+ duplicate$ "-" =
+ swap$ duplicate$ "," =
+ swap$ "+" =
+ or or
+ { #1 'multiresult := }
+ { t #2 global.max$ substring$ 't := }
+ if$
+ }
+ while$
+ multiresult
+}
+FUNCTION {format.pages}
+{ pages duplicate$ empty$ 'skip$
+ { duplicate$ multi.page.check
+ {
+ n.dashify
+ }
+ {
+ }
+ if$
+ "pages" bibinfo.check
+ }
+ if$
+}
+FUNCTION {format.journal.pages}
+{ pages duplicate$ empty$ 'pop$
+ { swap$ duplicate$ empty$
+ { pop$ pop$ format.pages }
+ {
+ ", " *
+ swap$
+ n.dashify
+ "pages" bibinfo.check
+ *
+ }
+ if$
+ }
+ if$
+}
+FUNCTION {format.journal.eid}
+{ eid "eid" bibinfo.check
+ duplicate$ empty$ 'pop$
+ { swap$ duplicate$ empty$ 'skip$
+ {
+ " " *
+ }
+ if$
+ swap$ *
+ }
+ if$
+}
+FUNCTION {format.vol.num.pages}
+{ volume field.or.null
+ duplicate$ empty$ 'skip$
+ {
+ "volume" bibinfo.check
+ }
+ if$
+}
+
+FUNCTION {format.chapter.pages}
+{ chapter empty$
+ { "" }
+ { type empty$
+ { bbl.chapter }
+ { type "l" change.case$
+ "type" bibinfo.check
+ }
+ if$
+ chapter tie.or.space.prefix
+ "chapter" bibinfo.check
+ * *
+ }
+ if$
+}
+
+FUNCTION {bt.enquote}
+{ duplicate$ empty$ 'skip$
+ { "\enquote{" swap$ *
+ "}, " *
+ }
+ if$
+}
+FUNCTION {format.booktitle}
+{
+ booktitle "booktitle" bibinfo.check
+ emphasize
+}
+FUNCTION {format.in.ed.booktitle}
+{ format.booktitle duplicate$ empty$ 'skip$
+ {
+ editor "editor" format.names.ed duplicate$ empty$ 'pop$
+ {
+ "," *
+ " " *
+ get.bbl.editor
+ ", " *
+ * swap$
+ * }
+ if$
+ word.in swap$ *
+ }
+ if$
+}
+FUNCTION {format.thesis.type}
+{ type duplicate$ empty$
+ 'pop$
+ { swap$ pop$
+ "t" change.case$ "type" bibinfo.check
+ }
+ if$
+}
+FUNCTION {format.tr.number}
+{ number "number" bibinfo.check
+ type duplicate$ empty$
+ { pop$ bbl.techrep }
+ 'skip$
+ if$
+ "type" bibinfo.check
+ swap$ duplicate$ empty$
+ { pop$ "t" change.case$ }
+ { tie.or.space.prefix * * }
+ if$
+}
+FUNCTION {format.article.crossref}
+{
+ word.in
+ " \cite{" * crossref * "}" *
+}
+FUNCTION {format.book.crossref}
+{ volume duplicate$ empty$
+ { "empty volume in " cite$ * "'s crossref of " * crossref * warning$
+ pop$ word.in
+ }
+ { bbl.volume
+ swap$ tie.or.space.prefix "volume" bibinfo.check * * bbl.of space.word *
+ }
+ if$
+ " \cite{" * crossref * "}" *
+}
+FUNCTION {format.incoll.inproc.crossref}
+{
+ word.in
+ " \cite{" * crossref * "}" *
+}
+FUNCTION {format.org.or.pub}
+{ 't :=
+ ""
+ add.blank "(" *
+ address "address" bibinfo.check *
+ t empty$
+ 'skip$
+ { address empty$
+ 'skip$
+ { ": " * }
+ if$
+ t *
+ }
+ if$
+ year duplicate$ empty$
+ { "empty year in " cite$ * "; set to ????" * warning$
+ pop$ "????" }
+ { "year" bibinfo.check extra.label * }
+ if$
+ t empty$ address empty$ and
+ { * }
+ { ", " swap$ * * }
+ if$
+ ")" *
+}
+FUNCTION {format.publisher.address}
+{ publisher "publisher" bibinfo.warn format.org.or.pub
+}
+
+FUNCTION {format.organization.address}
+{ organization "organization" bibinfo.check format.org.or.pub
+}
+
+STRINGS {oldname}
+
+FUNCTION {name.or.dash}
+{ 's :=
+ oldname empty$
+ { s 'oldname := s }
+ { s oldname =
+% { "---" } old style
+ { "---\hspace{-.1pt}---\hspace{-.1pt}---" }
+%SPD 2000
+ { s 'oldname := s }
+ if$
+ }
+ if$
+}
+
+FUNCTION {article}
+{ output.bibitem
+ format.authors "author" output.check
+ author format.key output
+ name.or.dash
+ format.title "title" output.check
+ end.quote.title
+ crossref missing$
+ {
+ journal
+ "journal" bibinfo.check
+ emphasize
+ "journal" output.check
+ format.vol.num.pages
+ " " swap$ *
+ before.all 'output.state :=
+ output
+ format.date "year" output.check
+ }
+ { format.article.crossref output.nonnull
+ }
+ if$
+ eid empty$
+ { format.journal.pages }
+ { format.journal.eid }
+ if$
+ format.note output
+ fin.entry
+}
+FUNCTION {book}
+{ output.bibitem
+ author empty$
+ { format.editors "author and editor" output.check
+ editor format.key output
+ name.or.dash
+ }
+ { format.authors output.nonnull
+ name.or.dash
+ crossref missing$
+ { "author and editor" editor either.or.check }
+ 'skip$
+ if$
+ }
+ if$
+ format.btitle "title" output.check
+ crossref missing$
+ { format.bvolume output
+ format.number.series output
+ format.edition output
+ format.publisher.address output
+ }
+ {
+ format.book.crossref output.nonnull
+ format.date "year" output.check
+ }
+ if$
+ format.note output
+ fin.entry
+}
+FUNCTION {booklet}
+{ output.bibitem
+ format.authors output
+ author format.key output
+ name.or.dash
+ format.title "title" output.check
+ end.quote.title
+ howpublished "howpublished" bibinfo.check output
+ address "address" bibinfo.check output
+ format.date "year" output.check
+ format.note output
+ fin.entry
+}
+
+FUNCTION {inbook}
+{ output.bibitem
+ author empty$
+ { format.editors "author and editor" output.check
+ editor format.key output
+ name.or.dash
+ }
+ { format.authors output.nonnull
+ name.or.dash
+ crossref missing$
+ { "author and editor" editor either.or.check }
+ 'skip$
+ if$
+ }
+ if$
+ format.btitle "title" output.check
+ crossref missing$
+ {
+ format.bvolume output
+ format.chapter.pages "chapter and pages" output.check
+ format.number.series output
+ format.edition output
+ format.publisher.address output
+ }
+ {
+ format.chapter.pages "chapter and pages" output.check
+ format.book.crossref output.nonnull
+ format.date "year" output.check
+ }
+ if$
+ format.pages "pages" output.check
+ format.note output
+ fin.entry
+}
+
+FUNCTION {incollection}
+{ output.bibitem
+ format.authors "author" output.check
+ author format.key output
+ name.or.dash
+ format.title "title" output.check
+ end.quote.title
+ crossref missing$
+ { format.in.ed.booktitle "booktitle" output.check
+ end.quote.btitle
+ format.bvolume output
+ format.number.series output
+ format.edition output
+ format.chapter.pages output
+ format.publisher.address output
+ }
+ { format.incoll.inproc.crossref output.nonnull
+ format.chapter.pages output
+ }
+ if$
+ format.pages "pages" output.check
+ format.note output
+ fin.entry
+}
+FUNCTION {inproceedings}
+{ output.bibitem
+ format.authors "author" output.check
+ author format.key output
+ name.or.dash
+ format.title "title" output.check
+ end.quote.title
+ crossref missing$
+ { format.in.ed.booktitle "booktitle" output.check
+ end.quote.btitle
+ format.bvolume output
+ format.number.series output
+ publisher empty$
+ { format.organization.address output }
+ { organization "organization" bibinfo.check output
+ format.publisher.address output
+ }
+ if$
+ }
+ { format.incoll.inproc.crossref output.nonnull
+ }
+ if$
+ format.pages "pages" output.check
+ format.note output
+ fin.entry
+}
+FUNCTION {conference} { inproceedings }
+FUNCTION {manual}
+{ output.bibitem
+ format.authors output
+ author format.key output
+ name.or.dash
+ format.btitle "title" output.check
+ organization "organization" bibinfo.check output
+ address "address" bibinfo.check output
+ format.edition output
+ format.date "year" output.check
+ format.note output
+ fin.entry
+}
+
+FUNCTION {mastersthesis}
+{ output.bibitem
+ format.authors "author" output.check
+ author format.key output
+ name.or.dash
+ format.btitle
+ "title" output.check
+ bbl.mthesis format.thesis.type output.nonnull
+ school "school" bibinfo.warn output
+ address "address" bibinfo.check output
+ format.date "year" output.check
+ format.note output
+ fin.entry
+}
+
+FUNCTION {misc}
+{ output.bibitem
+ format.authors output
+ author format.key output
+ name.or.dash
+ format.title output
+ end.quote.title
+ howpublished "howpublished" bibinfo.check output
+ format.date "year" output.check
+ format.note output
+ fin.entry
+}
+FUNCTION {phdthesis}
+{ output.bibitem
+ format.authors "author" output.check
+ author format.key output
+ name.or.dash
+ format.btitle
+ "title" output.check
+ bbl.phdthesis format.thesis.type output.nonnull
+ school "school" bibinfo.warn output
+ address "address" bibinfo.check output
+ format.date "year" output.check
+ format.note output
+ fin.entry
+}
+
+FUNCTION {proceedings}
+{ output.bibitem
+ format.editors output
+ editor format.key output
+ name.or.dash
+ format.btitle "title" output.check
+ format.bvolume output
+ format.number.series output
+ publisher empty$
+ { format.organization.address output }
+ { organization "organization" bibinfo.check output
+ format.publisher.address output
+ }
+ if$
+ format.note output
+ fin.entry
+}
+
+FUNCTION {techreport}
+{ output.bibitem
+ format.authors "author" output.check
+ author format.key output
+ name.or.dash
+ format.title
+ "title" output.check
+ end.quote.title
+ format.tr.number output.nonnull
+ institution "institution" bibinfo.warn output
+ address "address" bibinfo.check output
+ format.tr.date "year" output.check
+ format.note output
+ fin.entry
+}
+
+FUNCTION {unpublished}
+{ output.bibitem
+ format.authors "author" output.check
+ author format.key output
+ name.or.dash
+ format.title
+ "title" output.check
+ end.quote.title
+ note "note" output.check
+ institution field.or.null output
+ format.unpub.date "year" output.check
+ fin.entry
+}
+
+FUNCTION {default.type} { misc }
+READ
+FUNCTION {sortify}
+{ purify$
+ "l" change.case$
+}
+INTEGERS { len }
+FUNCTION {chop.word}
+{ 's :=
+ 'len :=
+ s #1 len substring$ =
+ { s len #1 + global.max$ substring$ }
+ 's
+ if$
+}
+FUNCTION {format.lab.names}
+{ 's :=
+ "" 't :=
+ s #1 "{vv~}{ll}" format.name$
+ s num.names$ duplicate$
+ #2 >
+ { pop$
+ " " * bbl.etal *
+ }
+ { #2 <
+ 'skip$
+ { s #2 "{ff }{vv }{ll}{ jj}" format.name$ "others" =
+ {
+ " " * bbl.etal *
+ }
+ { bbl.and space.word * s #2 "{vv~}{ll}" format.name$
+ * }
+ if$
+ }
+ if$
+ }
+ if$
+}
+
+FUNCTION {author.key.label}
+{ author empty$
+ { key empty$
+ { cite$ #1 #3 substring$ }
+ 'key
+ if$
+ }
+ { author format.lab.names }
+ if$
+}
+
+FUNCTION {author.editor.key.label}
+{ author empty$
+ { editor empty$
+ { key empty$
+ { cite$ #1 #3 substring$ }
+ 'key
+ if$
+ }
+ { editor format.lab.names }
+ if$
+ }
+ { author format.lab.names }
+ if$
+}
+
+FUNCTION {editor.key.label}
+{ editor empty$
+ { key empty$
+ { cite$ #1 #3 substring$ }
+ 'key
+ if$
+ }
+ { editor format.lab.names }
+ if$
+}
+
+FUNCTION {calc.short.authors}
+{ type$ "book" =
+ type$ "inbook" =
+ or
+ 'author.editor.key.label
+ { type$ "proceedings" =
+ 'editor.key.label
+ 'author.key.label
+ if$
+ }
+ if$
+ 'short.list :=
+}
+
+FUNCTION {calc.label}
+{ calc.short.authors
+ short.list
+ "("
+ *
+ year duplicate$ empty$
+ short.list key field.or.null = or
+ { pop$ "" }
+ 'skip$
+ if$
+ *
+ 'label :=
+}
+
+FUNCTION {sort.format.names}
+{ 's :=
+ #1 'nameptr :=
+ ""
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ { s nameptr
+ "{vv{ } }{ll{ }}{ f{ }}{ jj{ }}"
+ format.name$ 't :=
+ nameptr #1 >
+ {
+ " " *
+ namesleft #1 = t "others" = and
+ { "zzzzz" * }
+ { t sortify * }
+ if$
+ }
+ { t sortify * }
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+}
+
+FUNCTION {sort.format.title}
+{ 't :=
+ "A " #2
+ "An " #3
+ "The " #4 t chop.word
+ chop.word
+ chop.word
+ sortify
+ #1 global.max$ substring$
+}
+FUNCTION {author.sort}
+{ author empty$
+ { key empty$
+ { "to sort, need author or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { author sort.format.names }
+ if$
+}
+FUNCTION {author.editor.sort}
+{ author empty$
+ { editor empty$
+ { key empty$
+ { "to sort, need author, editor, or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { editor sort.format.names }
+ if$
+ }
+ { author sort.format.names }
+ if$
+}
+FUNCTION {editor.sort}
+{ editor empty$
+ { key empty$
+ { "to sort, need editor or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { editor sort.format.names }
+ if$
+}
+FUNCTION {presort}
+{ calc.label
+ label sortify
+ " "
+ *
+ type$ "book" =
+ type$ "inbook" =
+ or
+ 'author.editor.sort
+ { type$ "proceedings" =
+ 'editor.sort
+ 'author.sort
+ if$
+ }
+ if$
+ #1 entry.max$ substring$
+ 'sort.label :=
+ sort.label
+ *
+ " "
+ *
+ title field.or.null
+ sort.format.title
+ *
+ #1 entry.max$ substring$
+ 'sort.key$ :=
+}
+
+ITERATE {presort}
+SORT
+STRINGS { last.label next.extra }
+INTEGERS { last.extra.num number.label }
+FUNCTION {initialize.extra.label.stuff}
+{ #0 int.to.chr$ 'last.label :=
+ "" 'next.extra :=
+ #0 'last.extra.num :=
+ #0 'number.label :=
+}
+FUNCTION {forward.pass}
+{ last.label label =
+ { last.extra.num #1 + 'last.extra.num :=
+ last.extra.num int.to.chr$ 'extra.label :=
+ }
+ { "a" chr.to.int$ 'last.extra.num :=
+ "" 'extra.label :=
+ label 'last.label :=
+ }
+ if$
+ number.label #1 + 'number.label :=
+}
+FUNCTION {reverse.pass}
+{ next.extra "b" =
+ { "a" 'extra.label := }
+ 'skip$
+ if$
+ extra.label 'next.extra :=
+ extra.label
+ duplicate$ empty$
+ 'skip$
+ { "{\natexlab{" swap$ * "}}" * }
+ if$
+ 'extra.label :=
+ label extra.label * 'label :=
+}
+EXECUTE {initialize.extra.label.stuff}
+ITERATE {forward.pass}
+REVERSE {reverse.pass}
+FUNCTION {bib.sort.order}
+{ sort.label
+ " "
+ *
+ year field.or.null sortify
+ *
+ " "
+ *
+ title field.or.null
+ sort.format.title
+ *
+ #1 entry.max$ substring$
+ 'sort.key$ :=
+}
+ITERATE {bib.sort.order}
+SORT
+FUNCTION {begin.bib}
+{ preamble$ empty$
+ 'skip$
+ { preamble$ write$ newline$ }
+ if$
+ "\begin{thebibliography}{" number.label int.to.str$ * "}" *
+ write$ newline$
+ "\newcommand{\enquote}[1]{``#1''}"
+ write$ newline$
+ "\providecommand{\natexlab}[1]{#1}"
+ write$ newline$
+}
+EXECUTE {begin.bib}
+EXECUTE {init.state.consts}
+ITERATE {call.type$}
+FUNCTION {end.bib}
+{ newline$
+ "\end{thebibliography}" write$ newline$
+}
+EXECUTE {end.bib}
+%% End of customized bst file
+%%
+%% End of file `ier.bst'.
diff --git a/biblio/bibtex/contrib/economic/itaxpf-ex-title.pdf b/biblio/bibtex/contrib/economic/itaxpf-ex-title.pdf
new file mode 100644
index 0000000000..b2472faea9
--- /dev/null
+++ b/biblio/bibtex/contrib/economic/itaxpf-ex-title.pdf
Binary files differ
diff --git a/biblio/bibtex/contrib/economic/itaxpf-ex-title.tex b/biblio/bibtex/contrib/economic/itaxpf-ex-title.tex
new file mode 100644
index 0000000000..95b3a18ea5
--- /dev/null
+++ b/biblio/bibtex/contrib/economic/itaxpf-ex-title.tex
@@ -0,0 +1,45 @@
+\documentclass[titlepage]{itaxpf}
+\usepackage[T1]{fontenc}
+\usepackage[latin1]{inputenc}
+
+\usepackage{hyperref}
+\hypersetup{%
+ colorlinks = {true},
+ urlcolor = {blue},
+ linkcolor = {black},
+ citecolor = {black},
+ pdfauthor = {Arne Henningsen},
+ pdftitle = {Testing LaTeX class and BibTeX style for the
+ journal International Tax and Public Finance (ITAXPF)},
+ pdfkeywords = {International Tax and Public Finance, BibTeX, LaTeX}
+}
+
+\usepackage{multido}
+
+\title{Testing \LaTeX{} Class and Bib\TeX{} Style for the
+ Journal ``International Tax and Public Finance'' (ITAXPF)}
+
+\author{Arne Henningsen \and Jim Nobody}
+
+\affiliation{
+University~of~Kiel
+}
+
+\address{
+Corresponding Author:\\
+Arne Henningsen\\
+Department of Agricultural Economics\\
+University of Kiel\\
+24098 Kiel, Germany\\
+Phone: +49-431-880-4445\\
+Fax: +49-431-880-1397\\
+\url{arne (dot) henningsen (at) gmail (dot) com}
+}
+
+
+
+\begin{document}
+
+\maketitle
+
+\end{document}
diff --git a/biblio/bibtex/contrib/economic/itaxpf-ex.bib b/biblio/bibtex/contrib/economic/itaxpf-ex.bib
new file mode 100644
index 0000000000..90da9b992e
--- /dev/null
+++ b/biblio/bibtex/contrib/economic/itaxpf-ex.bib
@@ -0,0 +1,44 @@
+This file was created with JabRef 2.2.
+Encoding: ISO8859_1
+
+@ARTICLE{becker64,
+ author = {Gordon Becker and Morris DeGroot and Jacob Marschak},
+ title = {Measuring Utility by a Single-Response Sequential Method},
+ journal = {Behavioral Science},
+ year = {1964},
+ volume = {9},
+ pages = {226-232},
+ owner = {Arne},
+ timestamp = {2007.07.12}
+}
+
+@BOOK{schoemaker80,
+ title = {Experiments in Decisions Under Risk: The Expected Utility Hypothesis},
+ publisher = {Kluwer-Nijhoff Publishing},
+ year = {1980},
+ author = {Paul Schoemaker},
+ address = {Boston},
+ owner = {Arne},
+ timestamp = {2007.07.12}
+}
+
+@INCOLLECTION{smith86,
+ author = {V. Kerry Smith},
+ title = {A Conceptual Overview of the Foundations of Benefit-Cost Analysis},
+ booktitle = {Benefits Assessment: The State of the Art},
+ publisher = {D. Reidel Publishing Co},
+ year = {1986},
+ editor = {Judith Bentkover and Vincent Covello and Jeryl Mumpower},
+ address = {Dordrecht},
+ owner = {Arne},
+ timestamp = {2007.07.12}
+}
+
+@comment{jabref-meta: selector_journal:}
+
+@comment{jabref-meta: selector_author:}
+
+@comment{jabref-meta: selector_keywords:}
+
+@comment{jabref-meta: selector_publisher:}
+
diff --git a/biblio/bibtex/contrib/economic/itaxpf-ex.pdf b/biblio/bibtex/contrib/economic/itaxpf-ex.pdf
new file mode 100644
index 0000000000..bcaa1eeb18
--- /dev/null
+++ b/biblio/bibtex/contrib/economic/itaxpf-ex.pdf
Binary files differ
diff --git a/biblio/bibtex/contrib/economic/itaxpf-ex.tex b/biblio/bibtex/contrib/economic/itaxpf-ex.tex
new file mode 100644
index 0000000000..1235f7f5a2
--- /dev/null
+++ b/biblio/bibtex/contrib/economic/itaxpf-ex.tex
@@ -0,0 +1,113 @@
+\documentclass{itaxpf}
+\usepackage[T1]{fontenc}
+\usepackage[latin1]{inputenc}
+\usepackage{csquotes}
+\MakeOuterQuote{"}
+
+\usepackage{hyperref}
+\hypersetup{%
+ colorlinks = {true},
+ urlcolor = {blue},
+ linkcolor = {black},
+ citecolor = {black},
+ pdfauthor = {Arne Henningsen},
+ pdftitle = {Testing LaTeX class and BibTeX style for the
+ journal International Tax and Public Finance (ITAXPF)},
+ pdfkeywords = {International Tax and Public Finance, BibTeX, LaTeX}
+}
+
+\usepackage{multido}
+
+\title{Testing \LaTeX{} Class and Bib\TeX{} Style for the
+ Journal ``International Tax and Public Finance'' (ITAXPF)}
+
+\author{Arne Henningsen \and Jim Nobody}
+
+\affiliation{University~of~Kiel}
+
+\keywords{International Tax and Public Finance, BibTeX, LaTeX}
+
+\jelclass{A1, B2, C3}
+
+\begin{document}
+
+\maketitle
+
+\begin{abstract}
+\multido{}{15}{This is an abstract. }
+\end{abstract}
+
+
+\section{Introduction}
+
+\multido{}{15}{This is an introduction. }
+
+
+\section{Manuscript Formatting}
+
+The manuscript formatting instructions are available at
+\url{http://www.springerlink.com/link.asp?id=102915}.%
+\footnote{
+Footnotes are automatically converted to endnotes.
+}
+
+
+\section{Citations}
+
+\subsection{Citations in Text}
+
+\citeauthor{becker64} in a paper on \ldots
+\citet[p.~12]{schoemaker80} has shown that \ldots
+A proof is given by \citet{smith86}.
+
+An overview is available in table~\ref{tab:citations}.
+
+\begin{table}[htbp]
+\centering
+\caption{Citations}
+\label{tab:citations}
+\begin{tabular}{lll}
+\hline
+Author(s) & Year & Citation\\
+\hline
+\citeauthor{becker64} & \citeyear{becker64} & \citet{becker64}\\
+\citeauthor{schoemaker80} & \citeyear{schoemaker80} & \citet{schoemaker80}\\
+\citeauthor{smith86} & \citeyear{smith86} & \citet{smith86}\\
+\hline
+\end{tabular}
+\end{table}
+
+
+\subsection{Citations in Parenthesis}
+
+This method has been criticised \citep{becker64, schoemaker80, smith86}.
+$A$ is equal to $B$ \citep{becker64}.
+$B$ is equal to $C$ \citep{schoemaker80}.
+
+
+\subsection{List of References}
+
+Note: The Bib\TeX{} style \texttt{iptax.bst} does not follow exactly
+the "Sample References" in the "Instructions for Authors",
+but follows the lists of references in published articles
+(although the formatting slightly differs between articles).
+
+
+\section{Quotation Marks}
+The journal "International Tax and Public Finance" requires double quotes.
+You can get pretty (typographically correct) quotation marks
+by adding the commands
+\verb!\usepackage{csquotes}!
+and
+\verb!\MakeOuterQuote{"}!
+in your preamble and use the \verb!"! sign for quation marks in your text.
+
+
+\listofendnotes
+
+\nocite{*}
+
+\bibliographystyle{itaxpf}
+\bibliography{itaxpf-ex}
+
+\end{document}
diff --git a/biblio/bibtex/contrib/economic/itaxpf.bst b/biblio/bibtex/contrib/economic/itaxpf.bst
new file mode 100644
index 0000000000..8b979103e1
--- /dev/null
+++ b/biblio/bibtex/contrib/economic/itaxpf.bst
@@ -0,0 +1,1480 @@
+%%% Journal "International Tax and Public Finance" (ITAXPF)
+%%% bibliography style for use with LaTeX2e
+%%% version: 1.0 (12 July 2007)
+%%% license: LaTeX Project Public License (see below)
+%%% This file was created with makebst (see below) and modified
+%%% by Arne Henningsen.
+%%%
+%%% Note: This is an unofficial style file that may not
+%%% fully comply with the Guidelines of the journal
+%%% "International Tax and Public Finance" in every detail.
+%%% Please report any problems at
+%%% http://sourceforge.net/projects/economtex/
+%%% Further information is available at
+%%% http://economtex.wiki.sourceforge.net/
+%%%
+%%% It is recommended to use the document class "itaxpf"
+%%%
+%%% Websites of the journal
+%%% "International Tax and Public Finance":
+%%% http://www.springerlink.com/link.asp?id=102915
+%%
+%% This is file `itaxpf.bst',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% merlin.mbs (with options: `ay,nat,nm-rev,jnrlst,keyxyr,dt-beg,yr-par,yrp-per,note-yr,tit-qq,vol-it,volp-com,num-xser,ser-vol,bkpg-x,add-pub,edpar,bkedcap,blk-tit,ppx,ed,abr,xedn,and-com,and-com-ed,em-it,nfss,')
+%% ----------------------------------------
+%% *** International Tax and Public Finance ***
+%%
+%% Copyright 1994-2004 Patrick W Daly
+ % ===============================================================
+ % IMPORTANT NOTICE:
+ % This bibliographic style (bst) file has been generated from one or
+ % more master bibliographic style (mbs) files, listed above.
+ %
+ % This generated file can be redistributed and/or modified under the terms
+ % of the LaTeX Project Public License Distributed from CTAN
+ % archives in directory macros/latex/base/lppl.txt; either
+ % version 1 of the License, or any later version.
+ % ===============================================================
+ % Name and version information of the main mbs file:
+ % \ProvidesFile{merlin.mbs}[2004/02/09 4.13 (PWD, AO, DPC)]
+ % For use with BibTeX version 0.99a or later
+ %-------------------------------------------------------------------
+ % This bibliography style file is intended for texts in ENGLISH
+ % This is an author-year citation style bibliography. As such, it is
+ % non-standard LaTeX, and requires a special package file to function properly.
+ % Such a package is natbib.sty by Patrick W. Daly
+ % The form of the \bibitem entries is
+ % \bibitem[Jones et al.(1990)]{key}...
+ % \bibitem[Jones et al.(1990)Jones, Baker, and Smith]{key}...
+ % The essential feature is that the label (the part in brackets) consists
+ % of the author names, as they should appear in the citation, with the year
+ % in parentheses following. There must be no space before the opening
+ % parenthesis!
+ % With natbib v5.3, a full list of authors may also follow the year.
+ % In natbib.sty, it is possible to define the type of enclosures that is
+ % really wanted (brackets or parentheses), but in either case, there must
+ % be parentheses in the label.
+ % The \cite command functions as follows:
+ % \citet{key} ==>> Jones et al. (1990)
+ % \citet*{key} ==>> Jones, Baker, and Smith (1990)
+ % \citep{key} ==>> (Jones et al., 1990)
+ % \citep*{key} ==>> (Jones, Baker, and Smith, 1990)
+ % \citep[chap. 2]{key} ==>> (Jones et al., 1990, chap. 2)
+ % \citep[e.g.][]{key} ==>> (e.g. Jones et al., 1990)
+ % \citep[e.g.][p. 32]{key} ==>> (e.g. Jones et al., p. 32)
+ % \citeauthor{key} ==>> Jones et al.
+ % \citeauthor*{key} ==>> Jones, Baker, and Smith
+ % \citeyear{key} ==>> 1990
+ %---------------------------------------------------------------------
+
+ENTRY
+ { address
+ author
+ booktitle
+ chapter
+ edition
+ editor
+ eid
+ howpublished
+ institution
+ journal
+ key
+ month
+ note
+ number
+ organization
+ pages
+ publisher
+ school
+ series
+ title
+ type
+ volume
+ year
+ }
+ {}
+ { label extra.label sort.label short.list }
+INTEGERS { output.state before.all mid.sentence after.sentence after.block }
+FUNCTION {init.state.consts}
+{ #0 'before.all :=
+ #1 'mid.sentence :=
+ #2 'after.sentence :=
+ #3 'after.block :=
+}
+STRINGS { s t}
+FUNCTION {output.nonnull}
+{ 's :=
+ output.state mid.sentence =
+ { ", " * write$ }
+ { output.state after.block =
+ { add.period$ write$
+ newline$
+ "\newblock " write$
+ }
+ { output.state before.all =
+ 'write$
+ { add.period$ " " * write$ }
+ if$
+ }
+ if$
+ mid.sentence 'output.state :=
+ }
+ if$
+ s
+}
+FUNCTION {output}
+{ duplicate$ empty$
+ 'pop$
+ 'output.nonnull
+ if$
+}
+FUNCTION {output.check}
+{ 't :=
+ duplicate$ empty$
+ { pop$ "empty " t * " in " * cite$ * warning$ }
+ 'output.nonnull
+ if$
+}
+FUNCTION {fin.entry}
+{ add.period$
+ write$
+ newline$
+}
+
+FUNCTION {new.block}
+{ output.state before.all =
+ 'skip$
+ { after.block 'output.state := }
+ if$
+}
+FUNCTION {new.sentence}
+{ output.state after.block =
+ 'skip$
+ { output.state before.all =
+ 'skip$
+ { after.sentence 'output.state := }
+ if$
+ }
+ if$
+}
+FUNCTION {add.blank}
+{ " " * before.all 'output.state :=
+}
+
+FUNCTION {date.block}
+{
+ new.sentence
+}
+
+FUNCTION {not}
+{ { #0 }
+ { #1 }
+ if$
+}
+FUNCTION {and}
+{ 'skip$
+ { pop$ #0 }
+ if$
+}
+FUNCTION {or}
+{ { pop$ #1 }
+ 'skip$
+ if$
+}
+FUNCTION {non.stop}
+{ duplicate$
+ "}" * add.period$
+ #-1 #1 substring$ "." =
+}
+
+FUNCTION {new.block.checkb}
+{ empty$
+ swap$ empty$
+ and
+ 'skip$
+ 'new.block
+ if$
+}
+FUNCTION {field.or.null}
+{ duplicate$ empty$
+ { pop$ "" }
+ 'skip$
+ if$
+}
+FUNCTION {emphasize}
+{ duplicate$ empty$
+ { pop$ "" }
+ { "\textit{" swap$ * "}" * }
+ if$
+}
+FUNCTION {tie.or.space.prefix}
+{ duplicate$ text.length$ #3 <
+ { "~" }
+ { " " }
+ if$
+ swap$
+}
+
+FUNCTION {capitalize}
+{ "u" change.case$ "t" change.case$ }
+
+FUNCTION {space.word}
+{ " " swap$ * " " * }
+ % Here are the language-specific definitions for explicit words.
+ % Each function has a name bbl.xxx where xxx is the English word.
+ % The language selected here is ENGLISH
+FUNCTION {bbl.and}
+{ "and"}
+
+FUNCTION {bbl.etal}
+{ "et~al." }
+
+FUNCTION {bbl.editors}
+{ "eds." }
+
+FUNCTION {bbl.editor}
+{ "ed." }
+
+FUNCTION {bbl.edby}
+{ "edited by" }
+
+FUNCTION {bbl.edition}
+{ "edn." }
+
+FUNCTION {bbl.volume}
+{ "vol." }
+
+FUNCTION {bbl.of}
+{ "of" }
+
+FUNCTION {bbl.number}
+{ "no." }
+
+FUNCTION {bbl.nr}
+{ "no." }
+
+FUNCTION {bbl.in}
+{ "in" }
+
+FUNCTION {bbl.pages}
+{ "" }
+
+FUNCTION {bbl.page}
+{ "" }
+
+FUNCTION {bbl.chapter}
+{ "chap." }
+
+FUNCTION {bbl.techrep}
+{ "Tech. Rep." }
+
+FUNCTION {bbl.mthesis}
+{ "Master's thesis" }
+
+FUNCTION {bbl.phdthesis}
+{ "Ph.D. thesis" }
+
+MACRO {jan} {"Jan."}
+
+MACRO {feb} {"Feb."}
+
+MACRO {mar} {"Mar."}
+
+MACRO {apr} {"Apr."}
+
+MACRO {may} {"May"}
+
+MACRO {jun} {"Jun."}
+
+MACRO {jul} {"Jul."}
+
+MACRO {aug} {"Aug."}
+
+MACRO {sep} {"Sep."}
+
+MACRO {oct} {"Oct."}
+
+MACRO {nov} {"Nov."}
+
+MACRO {dec} {"Dec."}
+
+MACRO {acmcs} {"ACM Computing Surveys"}
+
+MACRO {acta} {"Acta Informatica"}
+
+MACRO {cacm} {"Communications of the ACM"}
+
+MACRO {ibmjrd} {"IBM Journal of Research and Development"}
+
+MACRO {ibmsj} {"IBM Systems Journal"}
+
+MACRO {ieeese} {"IEEE Transactions on Software Engineering"}
+
+MACRO {ieeetc} {"IEEE Transactions on Computers"}
+
+MACRO {ieeetcad}
+ {"IEEE Transactions on Computer-Aided Design of Integrated Circuits"}
+
+MACRO {ipl} {"Information Processing Letters"}
+
+MACRO {jacm} {"Journal of the ACM"}
+
+MACRO {jcss} {"Journal of Computer and System Sciences"}
+
+MACRO {scp} {"Science of Computer Programming"}
+
+MACRO {sicomp} {"SIAM Journal on Computing"}
+
+MACRO {tocs} {"ACM Transactions on Computer Systems"}
+
+MACRO {tods} {"ACM Transactions on Database Systems"}
+
+MACRO {tog} {"ACM Transactions on Graphics"}
+
+MACRO {toms} {"ACM Transactions on Mathematical Software"}
+
+MACRO {toois} {"ACM Transactions on Office Information Systems"}
+
+MACRO {toplas} {"ACM Transactions on Programming Languages and Systems"}
+
+MACRO {tcs} {"Theoretical Computer Science"}
+FUNCTION {bibinfo.check}
+{ swap$
+ duplicate$ missing$
+ {
+ pop$ pop$
+ ""
+ }
+ { duplicate$ empty$
+ {
+ swap$ pop$
+ }
+ { swap$
+ pop$
+ }
+ if$
+ }
+ if$
+}
+FUNCTION {bibinfo.warn}
+{ swap$
+ duplicate$ missing$
+ {
+ swap$ "missing " swap$ * " in " * cite$ * warning$ pop$
+ ""
+ }
+ { duplicate$ empty$
+ {
+ swap$ "empty " swap$ * " in " * cite$ * warning$
+ }
+ { swap$
+ pop$
+ }
+ if$
+ }
+ if$
+}
+STRINGS { bibinfo}
+INTEGERS { nameptr namesleft numnames }
+
+FUNCTION {format.names}
+{ 'bibinfo :=
+ duplicate$ empty$ 'skip$ {
+ 's :=
+ "" 't :=
+ #1 'nameptr :=
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ { s nameptr
+ "{vv~}{ll}{, f.}{, jj}"
+ format.name$
+ bibinfo bibinfo.check
+ 't :=
+ nameptr #1 >
+ {
+ namesleft #1 >
+ { ", " * t * }
+ {
+ "," *
+ s nameptr "{ll}" format.name$ duplicate$ "others" =
+ { 't := }
+ { pop$ }
+ if$
+ t "others" =
+ {
+ " " * bbl.etal *
+ }
+ {
+ bbl.and
+ space.word * t *
+ }
+ if$
+ }
+ if$
+ }
+ 't
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+ } if$
+}
+FUNCTION {format.names.ed}
+{
+ 'bibinfo :=
+ duplicate$ empty$ 'skip$ {
+ 's :=
+ "" 't :=
+ #1 'nameptr :=
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ { s nameptr
+ "{f.~}{vv~}{ll}{, jj}"
+ format.name$
+ bibinfo bibinfo.check
+ 't :=
+ nameptr #1 >
+ {
+ namesleft #1 >
+ { ", " * t * }
+ {
+ "," *
+ s nameptr "{ll}" format.name$ duplicate$ "others" =
+ { 't := }
+ { pop$ }
+ if$
+ t "others" =
+ {
+
+ " " * bbl.etal *
+ }
+ {
+ bbl.and
+ space.word * t *
+ }
+ if$
+ }
+ if$
+ }
+ 't
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+ } if$
+}
+FUNCTION {format.key}
+{ empty$
+ { key field.or.null }
+ { "" }
+ if$
+}
+
+FUNCTION {format.authors}
+{ author "author" format.names
+}
+FUNCTION {get.bbl.editor}
+{ editor num.names$ #1 > 'bbl.editors 'bbl.editor if$ }
+
+FUNCTION {format.editors}
+{ editor "editor" format.names duplicate$ empty$ 'skip$
+ {
+ " " *
+ get.bbl.editor
+ capitalize
+ "(" swap$ * ")" *
+ *
+ }
+ if$
+}
+FUNCTION {format.note}
+{
+ note empty$
+ { "" }
+ { note #1 #1 substring$
+ duplicate$ "{" =
+ 'skip$
+ { output.state mid.sentence =
+ { "l" }
+ { "u" }
+ if$
+ change.case$
+ }
+ if$
+ note #2 global.max$ substring$ * "note" bibinfo.check
+ }
+ if$
+}
+
+FUNCTION {format.title}
+{ title
+ duplicate$ empty$ 'skip$
+ { "t" change.case$ }
+ if$
+ "title" bibinfo.check
+ duplicate$ empty$ 'skip$
+ {
+ "\bibenquote{" swap$ *
+ add.period$ "}" *
+ }
+ if$
+}
+FUNCTION {format.full.names}
+{'s :=
+ "" 't :=
+ #1 'nameptr :=
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ { s nameptr
+ "{vv~}{ll}" format.name$
+ 't :=
+ nameptr #1 >
+ {
+ namesleft #1 >
+ { ", " * t * }
+ {
+ s nameptr "{ll}" format.name$ duplicate$ "others" =
+ { 't := }
+ { pop$ }
+ if$
+ t "others" =
+ {
+ " " * bbl.etal *
+ }
+ {
+ numnames #2 >
+ { "," * }
+ 'skip$
+ if$
+ bbl.and
+ space.word * t *
+ }
+ if$
+ }
+ if$
+ }
+ 't
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+}
+
+FUNCTION {author.editor.key.full}
+{ author empty$
+ { editor empty$
+ { key empty$
+ { cite$ #1 #3 substring$ }
+ 'key
+ if$
+ }
+ { editor format.full.names }
+ if$
+ }
+ { author format.full.names }
+ if$
+}
+
+FUNCTION {author.key.full}
+{ author empty$
+ { key empty$
+ { cite$ #1 #3 substring$ }
+ 'key
+ if$
+ }
+ { author format.full.names }
+ if$
+}
+
+FUNCTION {editor.key.full}
+{ editor empty$
+ { key empty$
+ { cite$ #1 #3 substring$ }
+ 'key
+ if$
+ }
+ { editor format.full.names }
+ if$
+}
+
+FUNCTION {make.full.names}
+{ type$ "book" =
+ type$ "inbook" =
+ or
+ 'author.editor.key.full
+ { type$ "proceedings" =
+ 'editor.key.full
+ 'author.key.full
+ if$
+ }
+ if$
+}
+
+FUNCTION {output.bibitem}
+{ newline$
+ "\bibitem[{" write$
+ label write$
+ ")" make.full.names duplicate$ short.list =
+ { pop$ }
+ { * }
+ if$
+ "}]{" * write$
+ cite$ write$
+ "}" write$
+ newline$
+ ""
+ before.all 'output.state :=
+}
+
+FUNCTION {n.dashify}
+{
+ 't :=
+ ""
+ { t empty$ not }
+ { t #1 #1 substring$ "-" =
+ { t #1 #2 substring$ "--" = not
+ { "--" *
+ t #2 global.max$ substring$ 't :=
+ }
+ { { t #1 #1 substring$ "-" = }
+ { "-" *
+ t #2 global.max$ substring$ 't :=
+ }
+ while$
+ }
+ if$
+ }
+ { t #1 #1 substring$ *
+ t #2 global.max$ substring$ 't :=
+ }
+ if$
+ }
+ while$
+}
+
+FUNCTION {word.in}
+{ bbl.in capitalize
+ " " * }
+
+FUNCTION {format.date}
+{ year "year" bibinfo.check duplicate$ empty$
+ {
+ "empty year in " cite$ * "; set to ????" * warning$
+ pop$ "????"
+ }
+ 'skip$
+ if$
+ extra.label *
+ before.all 'output.state :=
+ " (" swap$ * ")" *
+}
+FUNCTION {format.btitle}
+{ title "title" bibinfo.check
+ duplicate$ empty$ 'skip$
+ {
+ emphasize
+ }
+ if$
+}
+FUNCTION {either.or.check}
+{ empty$
+ 'pop$
+ { "can't use both " swap$ * " fields in " * cite$ * warning$ }
+ if$
+}
+FUNCTION {format.bvolume}
+{ volume empty$
+ { "" }
+ { bbl.volume volume tie.or.space.prefix
+ "volume" bibinfo.check * *
+ series "series" bibinfo.check
+ duplicate$ empty$ 'pop$
+ { emphasize ", " * swap$ * }
+ if$
+ "volume and number" number either.or.check
+ }
+ if$
+}
+FUNCTION {format.number.series}
+{ volume empty$
+ { number empty$
+ { series field.or.null }
+ { series empty$
+ { number "number" bibinfo.check }
+ { output.state mid.sentence =
+ { bbl.number }
+ { bbl.number capitalize }
+ if$
+ number tie.or.space.prefix "number" bibinfo.check * *
+ bbl.in space.word *
+ series "series" bibinfo.check *
+ }
+ if$
+ }
+ if$
+ }
+ { "" }
+ if$
+}
+
+FUNCTION {format.edition}
+{ edition duplicate$ empty$ 'skip$
+ {
+ output.state mid.sentence =
+ { "l" }
+ { "t" }
+ if$ change.case$
+ "edition" bibinfo.check
+ " " * bbl.edition *
+ }
+ if$
+}
+INTEGERS { multiresult }
+FUNCTION {multi.page.check}
+{ 't :=
+ #0 'multiresult :=
+ { multiresult not
+ t empty$ not
+ and
+ }
+ { t #1 #1 substring$
+ duplicate$ "-" =
+ swap$ duplicate$ "," =
+ swap$ "+" =
+ or or
+ { #1 'multiresult := }
+ { t #2 global.max$ substring$ 't := }
+ if$
+ }
+ while$
+ multiresult
+}
+FUNCTION {format.pages}
+{ pages duplicate$ empty$ 'skip$
+ { duplicate$ multi.page.check
+ {
+ n.dashify
+ }
+ {
+ }
+ if$
+ "pages" bibinfo.check
+ }
+ if$
+}
+FUNCTION {format.journal.pages}
+{ pages duplicate$ empty$ 'pop$
+ { swap$ duplicate$ empty$
+ { pop$ pop$ format.pages }
+ {
+ ", " *
+ swap$
+ n.dashify
+ "pages" bibinfo.check
+ *
+ }
+ if$
+ }
+ if$
+}
+FUNCTION {format.journal.eid}
+{ eid "eid" bibinfo.check
+ duplicate$ empty$ 'pop$
+ { swap$ duplicate$ empty$ 'skip$
+ {
+ ", " *
+ }
+ if$
+ swap$ *
+ }
+ if$
+}
+FUNCTION {format.vol.num.pages}
+{ volume field.or.null
+ duplicate$ empty$ 'skip$
+ {
+ "volume" bibinfo.check
+ }
+ if$
+ emphasize
+ number "number" bibinfo.check duplicate$ empty$ 'skip$
+ {
+ swap$ duplicate$ empty$
+ { "there's a number but no volume in " cite$ * warning$ }
+ 'skip$
+ if$
+ swap$
+ "(" swap$ * ")" *
+ }
+ if$ *
+ eid empty$
+ { format.journal.pages }
+ { format.journal.eid }
+ if$
+}
+
+FUNCTION {format.chapter.pages}
+{ chapter empty$
+ 'format.pages
+ { type empty$
+ { bbl.chapter }
+ { type "l" change.case$
+ "type" bibinfo.check
+ }
+ if$
+ chapter tie.or.space.prefix
+ "chapter" bibinfo.check
+ * *
+ pages empty$
+ 'skip$
+ { ", " * format.pages * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.booktitle}
+{
+ booktitle "booktitle" bibinfo.check
+ emphasize
+}
+FUNCTION {format.in.ed.booktitle}
+{ format.booktitle duplicate$ empty$ 'skip$
+ {
+ editor "editor" format.names.ed duplicate$ empty$ 'pop$
+ {
+ " " *
+ get.bbl.editor
+ capitalize
+ "(" swap$ * "), " *
+ * swap$
+ * }
+ if$
+ word.in swap$ *
+ }
+ if$
+}
+FUNCTION {format.thesis.type}
+{ type duplicate$ empty$
+ 'pop$
+ { swap$ pop$
+ "t" change.case$ "type" bibinfo.check
+ }
+ if$
+}
+FUNCTION {format.tr.number}
+{ number "number" bibinfo.check
+ type duplicate$ empty$
+ { pop$ bbl.techrep }
+ 'skip$
+ if$
+ "type" bibinfo.check
+ swap$ duplicate$ empty$
+ { pop$ "t" change.case$ }
+ { tie.or.space.prefix * * }
+ if$
+}
+FUNCTION {format.article.crossref}
+{
+ word.in
+ " \cite{" * crossref * "}" *
+}
+FUNCTION {format.book.crossref}
+{ volume duplicate$ empty$
+ { "empty volume in " cite$ * "'s crossref of " * crossref * warning$
+ pop$ word.in
+ }
+ { bbl.volume
+ capitalize
+ swap$ tie.or.space.prefix "volume" bibinfo.check * * bbl.of space.word *
+ }
+ if$
+ " \cite{" * crossref * "}" *
+}
+FUNCTION {format.incoll.inproc.crossref}
+{
+ word.in
+ " \cite{" * crossref * "}" *
+}
+FUNCTION {format.org.or.pub}
+{ 't :=
+ ""
+ address empty$ t empty$ and
+ 'skip$
+ {
+ address "address" bibinfo.check *
+ t empty$
+ 'skip$
+ { address empty$
+ 'skip$
+ { ": " * }
+ if$
+ t *
+ }
+ if$
+ }
+ if$
+}
+FUNCTION {format.publisher.address}
+{ publisher "publisher" bibinfo.warn format.org.or.pub
+}
+
+FUNCTION {format.organization.address}
+{ organization "organization" bibinfo.check format.org.or.pub
+}
+
+FUNCTION {article}
+{ output.bibitem
+ format.authors "author" output.check
+ author format.key output
+ format.date "year" output.check
+ date.block
+ format.title "title" output.check
+ new.sentence
+ crossref missing$
+ {
+ journal
+ "journal" bibinfo.check
+ emphasize
+ "journal" output.check
+ format.vol.num.pages output
+ }
+ { format.article.crossref output.nonnull
+ format.pages output
+ }
+ if$
+ format.note output
+ fin.entry
+}
+FUNCTION {book}
+{ output.bibitem
+ author empty$
+ { format.editors "author and editor" output.check
+ editor format.key output
+ }
+ { format.authors output.nonnull
+ crossref missing$
+ { "author and editor" editor either.or.check }
+ 'skip$
+ if$
+ }
+ if$
+ format.date "year" output.check
+ date.block
+ format.btitle "title" output.check
+ crossref missing$
+ { format.bvolume output
+ new.sentence
+ format.number.series output
+ format.publisher.address output
+ }
+ {
+ new.sentence
+ format.book.crossref output.nonnull
+ }
+ if$
+ format.edition output
+ format.note output
+ fin.entry
+}
+FUNCTION {booklet}
+{ output.bibitem
+ format.authors output
+ author format.key output
+ format.date "year" output.check
+ date.block
+ format.title "title" output.check
+ new.sentence
+ howpublished "howpublished" bibinfo.check output
+ address "address" bibinfo.check output
+ format.note output
+ fin.entry
+}
+
+FUNCTION {inbook}
+{ output.bibitem
+ author empty$
+ { format.editors "author and editor" output.check
+ editor format.key output
+ }
+ { format.authors output.nonnull
+ crossref missing$
+ { "author and editor" editor either.or.check }
+ 'skip$
+ if$
+ }
+ if$
+ format.date "year" output.check
+ date.block
+ format.btitle "title" output.check
+ crossref missing$
+ {
+ format.bvolume output
+ format.chapter.pages "chapter and pages" output.check
+ new.sentence
+ format.number.series output
+ format.publisher.address output
+ }
+ {
+ format.chapter.pages "chapter and pages" output.check
+ new.sentence
+ format.book.crossref output.nonnull
+ }
+ if$
+ format.edition output
+ format.note output
+ fin.entry
+}
+
+FUNCTION {incollection}
+{ output.bibitem
+ format.authors "author" output.check
+ author format.key output
+ format.date "year" output.check
+ date.block
+ format.title "title" output.check
+ new.sentence
+ crossref missing$
+ { format.in.ed.booktitle "booktitle" output.check
+ format.bvolume output
+ format.number.series output
+ format.chapter.pages output
+ format.publisher.address output
+ format.edition output
+ }
+ { format.incoll.inproc.crossref output.nonnull
+ format.chapter.pages output
+ }
+ if$
+ format.note output
+ fin.entry
+}
+FUNCTION {inproceedings}
+{ output.bibitem
+ format.authors "author" output.check
+ author format.key output
+ format.date "year" output.check
+ date.block
+ format.title "title" output.check
+ new.sentence
+ crossref missing$
+ { format.in.ed.booktitle "booktitle" output.check
+ format.bvolume output
+ format.number.series output
+ format.pages output
+ publisher empty$
+ { format.organization.address output }
+ { organization "organization" bibinfo.check output
+ format.publisher.address output
+ }
+ if$
+ }
+ { format.incoll.inproc.crossref output.nonnull
+ format.pages output
+ }
+ if$
+ format.note output
+ fin.entry
+}
+FUNCTION {conference} { inproceedings }
+FUNCTION {manual}
+{ output.bibitem
+ format.authors output
+ author format.key output
+ format.date "year" output.check
+ date.block
+ format.btitle "title" output.check
+ new.sentence
+ organization "organization" bibinfo.check output
+ address "address" bibinfo.check output
+ format.edition output
+ format.note output
+ fin.entry
+}
+
+FUNCTION {mastersthesis}
+{ output.bibitem
+ format.authors "author" output.check
+ author format.key output
+ format.date "year" output.check
+ date.block
+ format.btitle
+ "title" output.check
+ new.sentence
+ bbl.mthesis format.thesis.type output.nonnull
+ school "school" bibinfo.warn output
+ address "address" bibinfo.check output
+ format.note output
+ fin.entry
+}
+
+FUNCTION {misc}
+{ output.bibitem
+ format.authors output
+ author format.key output
+ format.date "year" output.check
+ date.block
+ format.title output
+ new.sentence
+ howpublished "howpublished" bibinfo.check output
+ format.note output
+ fin.entry
+}
+FUNCTION {phdthesis}
+{ output.bibitem
+ format.authors "author" output.check
+ author format.key output
+ format.date "year" output.check
+ date.block
+ format.btitle
+ "title" output.check
+ new.sentence
+ bbl.phdthesis format.thesis.type output.nonnull
+ school "school" bibinfo.warn output
+ address "address" bibinfo.check output
+ format.note output
+ fin.entry
+}
+
+FUNCTION {proceedings}
+{ output.bibitem
+ format.editors output
+ editor format.key output
+ format.date "year" output.check
+ date.block
+ format.btitle "title" output.check
+ format.bvolume output
+ format.number.series output
+ publisher empty$
+ { format.organization.address output }
+ { organization "organization" bibinfo.check output
+ format.publisher.address output
+ }
+ if$
+ format.note output
+ fin.entry
+}
+
+FUNCTION {techreport}
+{ output.bibitem
+ format.authors "author" output.check
+ author format.key output
+ format.date "year" output.check
+ date.block
+ format.title
+ "title" output.check
+ new.sentence
+ format.tr.number output.nonnull
+ institution "institution" bibinfo.warn output
+ address "address" bibinfo.check output
+ format.note output
+ fin.entry
+}
+
+FUNCTION {unpublished}
+{ output.bibitem
+ format.authors "author" output.check
+ author format.key output
+ format.date "year" output.check
+ date.block
+ format.title "title" output.check
+ format.note "note" output.check
+ fin.entry
+}
+
+FUNCTION {default.type} { misc }
+READ
+FUNCTION {sortify}
+{ purify$
+ "l" change.case$
+}
+INTEGERS { len }
+FUNCTION {chop.word}
+{ 's :=
+ 'len :=
+ s #1 len substring$ =
+ { s len #1 + global.max$ substring$ }
+ 's
+ if$
+}
+FUNCTION {format.lab.names}
+{ 's :=
+ "" 't :=
+ s #1 "{vv~}{ll}" format.name$
+ s num.names$ duplicate$
+ #2 >
+ { pop$
+ " " * bbl.etal *
+ }
+ { #2 <
+ 'skip$
+ { s #2 "{ff }{vv }{ll}{ jj}" format.name$ "others" =
+ {
+ " " * bbl.etal *
+ }
+ { bbl.and space.word * s #2 "{vv~}{ll}" format.name$
+ * }
+ if$
+ }
+ if$
+ }
+ if$
+}
+
+FUNCTION {author.key.label}
+{ author empty$
+ { key empty$
+ { cite$ #1 #3 substring$ }
+ 'key
+ if$
+ }
+ { author format.lab.names }
+ if$
+}
+
+FUNCTION {author.editor.key.label}
+{ author empty$
+ { editor empty$
+ { key empty$
+ { cite$ #1 #3 substring$ }
+ 'key
+ if$
+ }
+ { editor format.lab.names }
+ if$
+ }
+ { author format.lab.names }
+ if$
+}
+
+FUNCTION {editor.key.label}
+{ editor empty$
+ { key empty$
+ { cite$ #1 #3 substring$ }
+ 'key
+ if$
+ }
+ { editor format.lab.names }
+ if$
+}
+
+FUNCTION {calc.short.authors}
+{ type$ "book" =
+ type$ "inbook" =
+ or
+ 'author.editor.key.label
+ { type$ "proceedings" =
+ 'editor.key.label
+ 'author.key.label
+ if$
+ }
+ if$
+ 'short.list :=
+}
+
+FUNCTION {calc.label}
+{ calc.short.authors
+ short.list
+ "("
+ *
+ year duplicate$ empty$
+ short.list key field.or.null = or
+ { pop$ "" }
+ 'skip$
+ if$
+ *
+ 'label :=
+}
+
+FUNCTION {sort.format.names}
+{ 's :=
+ #1 'nameptr :=
+ ""
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ { s nameptr
+ "{vv{ } }{ll{ }}{ f{ }}{ jj{ }}"
+ format.name$ 't :=
+ nameptr #1 >
+ {
+ " " *
+ namesleft #1 = t "others" = and
+ { "zzzzz" * }
+ { t sortify * }
+ if$
+ }
+ { t sortify * }
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+}
+
+FUNCTION {sort.format.title}
+{ 't :=
+ "A " #2
+ "An " #3
+ "The " #4 t chop.word
+ chop.word
+ chop.word
+ sortify
+ #1 global.max$ substring$
+}
+FUNCTION {author.sort}
+{ author empty$
+ { key empty$
+ { "to sort, need author or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { author sort.format.names }
+ if$
+}
+FUNCTION {author.editor.sort}
+{ author empty$
+ { editor empty$
+ { key empty$
+ { "to sort, need author, editor, or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { editor sort.format.names }
+ if$
+ }
+ { author sort.format.names }
+ if$
+}
+FUNCTION {editor.sort}
+{ editor empty$
+ { key empty$
+ { "to sort, need editor or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { editor sort.format.names }
+ if$
+}
+FUNCTION {presort}
+{ calc.label
+ label sortify
+ " "
+ *
+ type$ "book" =
+ type$ "inbook" =
+ or
+ 'author.editor.sort
+ { type$ "proceedings" =
+ 'editor.sort
+ 'author.sort
+ if$
+ }
+ if$
+ #1 entry.max$ substring$
+ 'sort.label :=
+ sort.label
+ *
+ " "
+ *
+ title field.or.null
+ sort.format.title
+ *
+ #1 entry.max$ substring$
+ 'sort.key$ :=
+}
+
+ITERATE {presort}
+SORT
+STRINGS { last.label next.extra }
+INTEGERS { last.extra.num number.label }
+FUNCTION {initialize.extra.label.stuff}
+{ #0 int.to.chr$ 'last.label :=
+ "" 'next.extra :=
+ #0 'last.extra.num :=
+ #0 'number.label :=
+}
+FUNCTION {forward.pass}
+{ last.label label =
+ { last.extra.num #1 + 'last.extra.num :=
+ last.extra.num int.to.chr$ 'extra.label :=
+ }
+ { "a" chr.to.int$ 'last.extra.num :=
+ "" 'extra.label :=
+ label 'last.label :=
+ }
+ if$
+ number.label #1 + 'number.label :=
+}
+FUNCTION {reverse.pass}
+{ next.extra "b" =
+ { "a" 'extra.label := }
+ 'skip$
+ if$
+ extra.label 'next.extra :=
+ extra.label
+ duplicate$ empty$
+ 'skip$
+ { "{\natexlab{" swap$ * "}}" * }
+ if$
+ 'extra.label :=
+ label extra.label * 'label :=
+}
+EXECUTE {initialize.extra.label.stuff}
+ITERATE {forward.pass}
+REVERSE {reverse.pass}
+FUNCTION {bib.sort.order}
+{ sort.label
+ " "
+ *
+ year field.or.null sortify
+ *
+ " "
+ *
+ title field.or.null
+ sort.format.title
+ *
+ #1 entry.max$ substring$
+ 'sort.key$ :=
+}
+ITERATE {bib.sort.order}
+SORT
+FUNCTION {begin.bib}
+{ preamble$ empty$
+ 'skip$
+ { preamble$ write$ newline$ }
+ if$
+ "\begin{thebibliography}{" number.label int.to.str$ * "}" *
+ write$ newline$
+ "\newcommand{\bibenquote}[1]{``#1''}"
+ write$ newline$
+ "\providecommand{\natexlab}[1]{#1}"
+ write$ newline$
+}
+EXECUTE {begin.bib}
+EXECUTE {init.state.consts}
+ITERATE {call.type$}
+FUNCTION {end.bib}
+{ newline$
+ "\end{thebibliography}" write$ newline$
+}
+EXECUTE {end.bib}
+%% End of customized bst file
+%%
+%% End of file `itaxpf.bst'.
diff --git a/biblio/bibtex/contrib/economic/itaxpf.cls b/biblio/bibtex/contrib/economic/itaxpf.cls
new file mode 100644
index 0000000000..d75194e542
--- /dev/null
+++ b/biblio/bibtex/contrib/economic/itaxpf.cls
@@ -0,0 +1,232 @@
+%%% LaTeX class for manuscripts submitted to the
+%%% Journal "International Tax and Public Finance" (itaxpf)
+%%%
+%%% author: Arne Henningsen
+%%% version: 1.1 (18 November 2009)
+%%% license: LaTeX Project Public License
+%%%
+%%% Note: This is an unofficial style file that may not fully comply
+%%% with the Formatting Instructions of the journal
+%%% "International Tax and Public Finance" in every detail.
+%%% Please report any problems at
+%%% http://sourceforge.net/projects/economtex/
+%%% Further information is available at
+%%% http://economtex.wiki.sourceforge.net/
+%%%
+%%% This document class is based on the "scrartcl" class
+%%% from the KOMA script bundle.
+%%% Following additional packages are required:
+%%% amsmath, babel, endfloat, endnotes, geometry,
+%%% ifthen, lmodern, natbib, setspace, url
+%%%
+%%% The corresponding BibTeX style file "itaxpf.bst" should be used
+%%% for the bibliography: \bibliographystyle{itaxpf}
+%%%
+%%% This class provides 2 options:
+%%% titlepage = include a title page (with command "\maketitle")
+%%% noendfloat = do not move "floats" (tables and figures) to the end
+%%%
+%%% This document class provides 4 new commands:
+%%% \keywords can be used to show keywors below the abstract
+%%% \jelclass can be used to show JEL classifications below the abstract
+%%% \affiliation can be used spefify the affiliation(s) of the author(s)
+%%% (only shown if option "titlepage" is used)
+%%% \address can be used spefify the address of the corresponding author
+%%% (only shown if option "titlepage" is used)
+%%%
+%%% If you use footnotes, add following line before the reference section:
+%%% \listofendnotes
+%%%
+%%% Website of the journal "International Tax and Public Finance":
+%%% http://www.springerlink.com/link.asp?id=102915
+
+
+\NeedsTeXFormat{LaTeX2e}
+\ProvidesClass{itaxpf}[2009/11/18 LaTeX class for the Journal
+ 'International Tax and Public Finance']
+
+\RequirePackage{ifthen}
+
+% option to place floats not at the end
+\newcounter{UseEndfloat}
+\setcounter{UseEndfloat}{1}
+\DeclareOption{noendfloat}{\setcounter{UseEndfloat}{0}}
+
+% option to include a title page
+\newcounter{IncludeTitlePage}
+\setcounter{IncludeTitlePage}{0}
+\DeclareOption{titlepage}{\setcounter{IncludeTitlePage}{1}}
+
+% pass any options on to the scrartcl class and load this class with some options
+\DeclareOption*{\PassOptionsToClass{\CurrentOption}{scrartcl}}
+\ProcessOptions\relax
+\LoadClass[12pt,english,pointlessnumbers,tablecaptionabove,
+ noonelinecaption]{scrartcl}
+% pointlessnumbers = do not add final dot after ordinary section numbers
+% tablecaptionabove = use \captionabove for tables
+% noonelinecaption = do not treat one-line captions differently
+
+% use babel package and set language to english
+\RequirePackage[english]{babel}
+
+% page format, margins
+\RequirePackage{geometry}
+\geometry{letterpaper, tmargin=1.0in, bmargin=1.0in, lmargin=1.0in,
+ rmargin=1.0in, headheight=0in, headsep=0in, footskip=0.5in }
+
+% double spacing
+\RequirePackage{setspace}
+\doublespacing
+
+% spacing around formulas
+\AtBeginDocument{
+\setlength{\abovedisplayshortskip}{6pt}
+\setlength{\belowdisplayshortskip}{6pt}
+\setlength{\abovedisplayskip}{6pt}
+\setlength{\belowdisplayskip}{6pt}
+\allowdisplaybreaks
+}
+
+% spacing around captions and floats
+\setlength{\abovecaptionskip}{6pt}
+\setlength{\belowcaptionskip}{3pt}
+\setlength{\floatsep}{0pt}
+\setlength{\textfloatsep}{20pt}
+\setlength{\intextsep}{15pt}
+
+% font: latin modern
+\RequirePackage{lmodern}
+
+% amsmath
+\RequirePackage{amsmath}
+% leqno = equations are numbered at the left of the page
+% for compatibility with ajae.cls
+\newcommand{\veclatin}[1]{#1}
+\newcommand{\matlatin}[1]{#1}
+\newcommand{\vecgreek}[1]{#1}
+\newcommand{\matgreek}[1]{#1}
+
+% font for URLs
+\RequirePackage{url}
+\def\UrlFont{\rmfamily}
+
+%% formatting section headers
+\setkomafont{section}{\normalfont \large \bfseries}
+\setkomafont{subsection}{\normalfont}
+\setkomafont{subsection}{\normalfont \itshape}
+
+% citations and bibliography
+\RequirePackage[authoryear]{natbib}
+\AtBeginDocument{\renewcommand{\refname}{\clearpage References}}
+\setlength{\bibsep}{0pt}
+
+%% use endnotes in place of footnotes
+\RequirePackage{endnotes}
+\renewcommand{\notesname}{\clearpage Notes}
+\let\footnote=\endnote
+\newcommand{\listofendnotes}{
+ \begingroup
+ \parindent 0pt
+ \parskip 0ex
+ \def\enotesize{\normalsize}
+ \theendnotes
+ \endgroup
+}
+% use normalsize numbers (copied from endnote.sty and modified thereafter)
+\def\enoteformat{\rightskip\z@ \leftskip\z@ \parindent=0em
+ \leavevmode\llap{\theenmark. }}
+
+% captions of figures and tables
+\setcapwidth[c]{\textwidth}
+% \setcapindent*{0pt}
+\setkomafont{captionlabel}{\centering \bfseries}
+\setkomafont{caption}{\centering}
+\renewcommand{\captionformat}{~ }
+
+% move floats to the end of the paper
+\ifthenelse{\equal{\theUseEndfloat}{1}}{
+ \RequirePackage[heads,nolists,tablesfirst]{endfloat}
+ \renewcommand{\figureplace}{%
+ \begin{center}
+ [\figurename~\thepostfig\ here]
+ \end{center}
+ }
+ \renewcommand{\tableplace}{%
+ \begin{center}
+ [\tablename~\theposttbl\ here]
+ \end{center}
+ }
+}{}
+
+% titlepage with title, author, affiliation and date
+\newcommand{\affiliation}[1]{\newcommand{\@affiliation}{#1}}
+\newcommand{\address}[1]{\newcommand{\@address}{#1}}
+\renewcommand{\and}{$\cdot$ }
+\renewcommand{\maketitle}{
+ \ifthenelse{\equal{\theIncludeTitlePage}{1}}{
+ \thispagestyle{empty}
+ \vspace*{25mm}
+ }{}
+ \begin{center}
+ \begin{Large}
+ \begin{spacing}{1.25}
+ \textbf{\@title}
+ \end{spacing}
+ \end{Large}
+ \vspace*{5mm}
+ \ifthenelse{\equal{\theIncludeTitlePage}{1}}{
+ \vspace*{7mm}
+ \@author\\
+ \ifthenelse{ \isundefined\@affiliation }{}{
+ \vspace*{5mm}
+ \textit{\@affiliation}\\
+ }
+ \ifthenelse{ \isundefined\@address }{}{
+ \vspace*{10mm}
+ \begin{spacing}{1}
+ \@address\\
+ \end{spacing}
+ }
+ \vspace*{3mm}
+ }{}
+ \end{center}
+}
+
+
+% abstract, keywords, JEL classification
+\newcommand{\keywords}[1]{\newcommand{\@keywords}{#1}}
+\newcommand{\jelclass}[1]{\newcommand{\@jelclass}{#1}}
+\renewenvironment{abstract}{%
+\noindent
+\textbf{Abstract~}
+}{%
+\ifthenelse{ \isundefined\@keywords }{
+\ClassWarningNoLine{ajae}{No keywords specified.
+ Please use the command \protect\keywords}
+}{
+
+\medskip \noindent
+\textbf{Key words~} \@keywords
+}
+\ifthenelse{ \isundefined\@jelclass }{
+\ClassWarningNoLine{ajae}{No JEL classification specified.
+ Please use the command \protect\jelclass}
+}{
+
+\medskip \noindent
+\textbf{JEL classification~} \@jelclass
+}
+\clearpage
+}
+
+% avoid clubs and widows
+\clubpenalty=10000
+\widowpenalty=10000
+% \displaywidowpenalty=10000
+
+% increase stretchability of the spaces (avoid overful hboxes)
+\setlength{\emergencystretch}{3em}
+
+% for compatibility with erae.cls
+\newcommand{\citetPage}[2]{\citeauthor{#2} (\citeyear{#2}, p.~#1)}
+\newcommand{\citepPage}[2]{\citetext{\citealp{#2}, p.~#1}}
diff --git a/biblio/bibtex/contrib/economic/jae.bst b/biblio/bibtex/contrib/economic/jae.bst
new file mode 100644
index 0000000000..47316a55d9
--- /dev/null
+++ b/biblio/bibtex/contrib/economic/jae.bst
@@ -0,0 +1,1467 @@
+%%
+%% This is file `jae.bst',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% merlin.mbs (with options: `ay,nat,nm-rvx,ed-rev,jnrlst,keyxyr,dt-beg,yr-per,note-yr,vol-bf,vnum-x,volp-sp,pp-last,num-xser,jnm-x,bkpg-x,add-pub,isbn,issn,edparxc,ppx,ed,xedn,and-xcom,xand,url,url-nl,nfss')
+%% ----------------------------------------
+%% *** JAE BibTeX reference style ***
+%%
+%% Copyright 1994-2002 Patrick W Daly
+ % ===============================================================
+ % IMPORTANT NOTICE:
+ % This bibliographic style (bst) file has been generated from one or
+ % more master bibliographic style (mbs) files, listed above.
+ %
+ % This generated file can be redistributed and/or modified under the terms
+ % of the LaTeX Project Public License Distributed from CTAN
+ % archives in directory macros/latex/base/lppl.txt; either
+ % version 1 of the License, or any later version.
+ % ===============================================================
+ % Name and version information of the main mbs file:
+ % \ProvidesFile{merlin.mbs}[2002/10/21 4.05 (PWD, AO, DPC)]
+ % For use with BibTeX version 0.99a or later
+ %-------------------------------------------------------------------
+ % This bibliography style file is intended for texts in ENGLISH
+ % This is an author-year citation style bibliography. As such, it is
+ % non-standard LaTeX, and requires a special package file to function properly.
+ % Such a package is natbib.sty by Patrick W. Daly
+ % The form of the \bibitem entries is
+ % \bibitem[Jones et al.(1990)]{key}...
+ % \bibitem[Jones et al.(1990)Jones, Baker, and Smith]{key}...
+ % The essential feature is that the label (the part in brackets) consists
+ % of the author names, as they should appear in the citation, with the year
+ % in parentheses following. There must be no space before the opening
+ % parenthesis!
+ % With natbib v5.3, a full list of authors may also follow the year.
+ % In natbib.sty, it is possible to define the type of enclosures that is
+ % really wanted (brackets or parentheses), but in either case, there must
+ % be parentheses in the label.
+ % The \cite command functions as follows:
+ % \citet{key} ==>> Jones et al. (1990)
+ % \citet*{key} ==>> Jones, Baker, and Smith (1990)
+ % \citep{key} ==>> (Jones et al., 1990)
+ % \citep*{key} ==>> (Jones, Baker, and Smith, 1990)
+ % \citep[chap. 2]{key} ==>> (Jones et al., 1990, chap. 2)
+ % \citep[e.g.][]{key} ==>> (e.g. Jones et al., 1990)
+ % \citep[e.g.][p. 32]{key} ==>> (e.g. Jones et al., p. 32)
+ % \citeauthor{key} ==>> Jones et al.
+ % \citeauthor*{key} ==>> Jones, Baker, and Smith
+ % \citeyear{key} ==>> 1990
+ %---------------------------------------------------------------------
+
+ENTRY
+ { address
+ author
+ booktitle
+ chapter
+ edition
+ editor
+ howpublished
+ institution
+ isbn
+ issn
+ journal
+ key
+ month
+ note
+ number
+ organization
+ pages
+ publisher
+ school
+ series
+ title
+ type
+ url
+ volume
+ year
+ }
+ {}
+ { label extra.label sort.label short.list }
+INTEGERS { output.state before.all mid.sentence after.sentence after.block }
+FUNCTION {init.state.consts}
+{ #0 'before.all :=
+ #1 'mid.sentence :=
+ #2 'after.sentence :=
+ #3 'after.block :=
+}
+STRINGS { s t}
+FUNCTION {output.nonnull}
+{ 's :=
+ output.state mid.sentence =
+ { ", " * write$ }
+ { output.state after.block =
+ { add.period$ write$
+ newline$
+ "\newblock " write$
+ }
+ { output.state before.all =
+ 'write$
+ { add.period$ " " * write$ }
+ if$
+ }
+ if$
+ mid.sentence 'output.state :=
+ }
+ if$
+ s
+}
+FUNCTION {output}
+{ duplicate$ empty$
+ 'pop$
+ 'output.nonnull
+ if$
+}
+FUNCTION {output.check}
+{ 't :=
+ duplicate$ empty$
+ { pop$ "empty " t * " in " * cite$ * warning$ }
+ 'output.nonnull
+ if$
+}
+FUNCTION {fin.entry}
+{ add.period$
+ write$
+ newline$
+}
+
+FUNCTION {new.block}
+{ output.state before.all =
+ 'skip$
+ { after.block 'output.state := }
+ if$
+}
+FUNCTION {new.sentence}
+{ output.state after.block =
+ 'skip$
+ { output.state before.all =
+ 'skip$
+ { after.sentence 'output.state := }
+ if$
+ }
+ if$
+}
+FUNCTION {add.blank}
+{ " " * before.all 'output.state :=
+}
+
+FUNCTION {date.block}
+{
+ new.block
+}
+
+FUNCTION {not}
+{ { #0 }
+ { #1 }
+ if$
+}
+FUNCTION {and}
+{ 'skip$
+ { pop$ #0 }
+ if$
+}
+FUNCTION {or}
+{ { pop$ #1 }
+ 'skip$
+ if$
+}
+STRINGS {z}
+FUNCTION {remove.dots}
+{ 'z :=
+ ""
+ { z empty$ not }
+ { z #1 #1 substring$
+ z #2 global.max$ substring$ 'z :=
+ duplicate$ "." = 'pop$
+ { * }
+ if$
+ }
+ while$
+}
+FUNCTION {new.block.checkb}
+{ empty$
+ swap$ empty$
+ and
+ 'skip$
+ 'new.block
+ if$
+}
+FUNCTION {field.or.null}
+{ duplicate$ empty$
+ { pop$ "" }
+ 'skip$
+ if$
+}
+FUNCTION {emphasize}
+{ duplicate$ empty$
+ { pop$ "" }
+ { "\emph{" swap$ * "}" * }
+ if$
+}
+FUNCTION {bolden}
+{ duplicate$ empty$
+ { pop$ "" }
+ { "\textbf{" swap$ * "}" * }
+ if$
+}
+FUNCTION {tie.or.space.prefix}
+{ duplicate$ text.length$ #3 <
+ { "~" }
+ { " " }
+ if$
+ swap$
+}
+
+FUNCTION {capitalize}
+{ "u" change.case$ "t" change.case$ }
+
+FUNCTION {space.word}
+{ " " swap$ * " " * }
+ % Here are the language-specific definitions for explicit words.
+ % Each function has a name bbl.xxx where xxx is the English word.
+ % The language selected here is ENGLISH
+FUNCTION {bbl.and}
+{ "and"}
+
+FUNCTION {bbl.etal}
+{ "et~al." }
+
+FUNCTION {bbl.editors}
+{ "eds." }
+
+FUNCTION {bbl.editor}
+{ "ed." }
+
+FUNCTION {bbl.edby}
+{ "edited by" }
+
+FUNCTION {bbl.edition}
+{ "edition" }
+
+FUNCTION {bbl.volume}
+{ "volume" }
+
+FUNCTION {bbl.of}
+{ "of" }
+
+FUNCTION {bbl.number}
+{ "number" }
+
+FUNCTION {bbl.nr}
+{ "no." }
+
+FUNCTION {bbl.in}
+{ "in" }
+
+FUNCTION {bbl.pages}
+{ "" }
+
+FUNCTION {bbl.page}
+{ "" }
+
+FUNCTION {bbl.chapter}
+{ "chapter" }
+
+FUNCTION {bbl.techrep}
+{ "Technical Report" }
+
+FUNCTION {bbl.mthesis}
+{ "Master's thesis" }
+
+FUNCTION {bbl.phdthesis}
+{ "Ph.D. thesis" }
+
+MACRO {jan} {"January"}
+
+MACRO {feb} {"February"}
+
+MACRO {mar} {"March"}
+
+MACRO {apr} {"April"}
+
+MACRO {may} {"May"}
+
+MACRO {jun} {"June"}
+
+MACRO {jul} {"July"}
+
+MACRO {aug} {"August"}
+
+MACRO {sep} {"September"}
+
+MACRO {oct} {"October"}
+
+MACRO {nov} {"November"}
+
+MACRO {dec} {"December"}
+
+MACRO {acmcs} {"ACM Computing Surveys"}
+
+MACRO {acta} {"Acta Informatica"}
+
+MACRO {cacm} {"Communications of the ACM"}
+
+MACRO {ibmjrd} {"IBM Journal of Research and Development"}
+
+MACRO {ibmsj} {"IBM Systems Journal"}
+
+MACRO {ieeese} {"IEEE Transactions on Software Engineering"}
+
+MACRO {ieeetc} {"IEEE Transactions on Computers"}
+
+MACRO {ieeetcad}
+ {"IEEE Transactions on Computer-Aided Design of Integrated Circuits"}
+
+MACRO {ipl} {"Information Processing Letters"}
+
+MACRO {jacm} {"Journal of the ACM"}
+
+MACRO {jcss} {"Journal of Computer and System Sciences"}
+
+MACRO {scp} {"Science of Computer Programming"}
+
+MACRO {sicomp} {"SIAM Journal on Computing"}
+
+MACRO {tocs} {"ACM Transactions on Computer Systems"}
+
+MACRO {tods} {"ACM Transactions on Database Systems"}
+
+MACRO {tog} {"ACM Transactions on Graphics"}
+
+MACRO {toms} {"ACM Transactions on Mathematical Software"}
+
+MACRO {toois} {"ACM Transactions on Office Information Systems"}
+
+MACRO {toplas} {"ACM Transactions on Programming Languages and Systems"}
+
+MACRO {tcs} {"Theoretical Computer Science"}
+FUNCTION {bibinfo.check}
+{ swap$
+ duplicate$ missing$
+ {
+ pop$ pop$
+ ""
+ }
+ { duplicate$ empty$
+ {
+ swap$ pop$
+ }
+ { swap$
+ pop$
+ }
+ if$
+ }
+ if$
+}
+FUNCTION {bibinfo.warn}
+{ swap$
+ duplicate$ missing$
+ {
+ swap$ "missing " swap$ * " in " * cite$ * warning$ pop$
+ ""
+ }
+ { duplicate$ empty$
+ {
+ swap$ "empty " swap$ * " in " * cite$ * warning$
+ }
+ { swap$
+ pop$
+ }
+ if$
+ }
+ if$
+}
+FUNCTION {write.url}
+{ url empty$
+ { skip$ }
+ { "\newline\urlprefix\url{" url * "}" * write$ newline$ }
+ if$
+}
+
+STRINGS { bibinfo}
+INTEGERS { nameptr namesleft numnames }
+
+FUNCTION {format.names}
+{ 'bibinfo :=
+ duplicate$ empty$ 'skip$ {
+ 's :=
+ "" 't :=
+ #1 'nameptr :=
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ { s nameptr
+ "{vv~}{ll}{ f{}}{ jj}"
+ format.name$
+ remove.dots
+ bibinfo bibinfo.check
+ 't :=
+ nameptr #1 >
+ {
+ namesleft #1 >
+ { ", " * t * }
+ {
+ "," *
+ s nameptr "{ll}" format.name$ duplicate$ "others" =
+ { 't := }
+ { pop$ }
+ if$
+ t "others" =
+ {
+ " " * bbl.etal *
+ }
+ { " " * t * }
+ if$
+ }
+ if$
+ }
+ 't
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+ } if$
+}
+FUNCTION {format.names.ed}
+{
+ format.names
+}
+FUNCTION {format.key}
+{ empty$
+ { key field.or.null }
+ { "" }
+ if$
+}
+
+FUNCTION {format.authors}
+{ author "author" format.names
+}
+FUNCTION {get.bbl.editor}
+{ editor num.names$ #1 > 'bbl.editors 'bbl.editor if$ }
+
+FUNCTION {format.editors}
+{ editor "editor" format.names duplicate$ empty$ 'skip$
+ {
+ " " *
+ get.bbl.editor
+ "(" swap$ * ")" *
+ *
+ }
+ if$
+}
+FUNCTION {format.isbn}
+{ isbn "isbn" bibinfo.check
+ duplicate$ empty$ 'skip$
+ {
+ new.block
+ "ISBN " swap$ *
+ }
+ if$
+}
+
+FUNCTION {format.issn}
+{ issn "issn" bibinfo.check
+ duplicate$ empty$ 'skip$
+ {
+ new.block
+ "ISSN " swap$ *
+ }
+ if$
+}
+
+FUNCTION {format.note}
+{
+ note empty$
+ { "" }
+ { note #1 #1 substring$
+ duplicate$ "{" =
+ 'skip$
+ { output.state mid.sentence =
+ { "l" }
+ { "u" }
+ if$
+ change.case$
+ }
+ if$
+ note #2 global.max$ substring$ * "note" bibinfo.check
+ }
+ if$
+}
+
+FUNCTION {format.title}
+{ title
+ duplicate$ empty$ 'skip$
+ { "t" change.case$ }
+ if$
+ "title" bibinfo.check
+}
+FUNCTION {format.full.names}
+{'s :=
+ "" 't :=
+ #1 'nameptr :=
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ { s nameptr
+ "{vv~}{ll}" format.name$
+ 't :=
+ nameptr #1 >
+ {
+ namesleft #1 >
+ { ", " * t * }
+ {
+ s nameptr "{ll}" format.name$ duplicate$ "others" =
+ { 't := }
+ { pop$ }
+ if$
+ t "others" =
+ {
+ " " * bbl.etal *
+ }
+ {
+ bbl.and
+ space.word * t *
+ }
+ if$
+ }
+ if$
+ }
+ 't
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+}
+
+FUNCTION {author.editor.key.full}
+{ author empty$
+ { editor empty$
+ { key empty$
+ { cite$ #1 #3 substring$ }
+ 'key
+ if$
+ }
+ { editor format.full.names }
+ if$
+ }
+ { author format.full.names }
+ if$
+}
+
+FUNCTION {author.key.full}
+{ author empty$
+ { key empty$
+ { cite$ #1 #3 substring$ }
+ 'key
+ if$
+ }
+ { author format.full.names }
+ if$
+}
+
+FUNCTION {editor.key.full}
+{ editor empty$
+ { key empty$
+ { cite$ #1 #3 substring$ }
+ 'key
+ if$
+ }
+ { editor format.full.names }
+ if$
+}
+
+FUNCTION {make.full.names}
+{ type$ "book" =
+ type$ "inbook" =
+ or
+ 'author.editor.key.full
+ { type$ "proceedings" =
+ 'editor.key.full
+ 'author.key.full
+ if$
+ }
+ if$
+}
+
+FUNCTION {output.bibitem}
+{ newline$
+ "\bibitem[{" write$
+ label write$
+ ")" make.full.names duplicate$ short.list =
+ { pop$ }
+ { * }
+ if$
+ "}]{" * write$
+ cite$ write$
+ "}" write$
+ newline$
+ ""
+ before.all 'output.state :=
+}
+
+FUNCTION {n.dashify}
+{
+ 't :=
+ ""
+ { t empty$ not }
+ { t #1 #1 substring$ "-" =
+ { t #1 #2 substring$ "--" = not
+ { "--" *
+ t #2 global.max$ substring$ 't :=
+ }
+ { { t #1 #1 substring$ "-" = }
+ { "-" *
+ t #2 global.max$ substring$ 't :=
+ }
+ while$
+ }
+ if$
+ }
+ { t #1 #1 substring$ *
+ t #2 global.max$ substring$ 't :=
+ }
+ if$
+ }
+ while$
+}
+
+FUNCTION {word.in}
+{ bbl.in capitalize
+ " " * }
+
+FUNCTION {format.date}
+{ year "year" bibinfo.check duplicate$ empty$
+ {
+ "empty year in " cite$ * "; set to ????" * warning$
+ pop$ "????"
+ }
+ 'skip$
+ if$
+ extra.label *
+ before.all 'output.state :=
+ after.sentence 'output.state :=
+}
+FUNCTION {format.btitle}
+{ title "title" bibinfo.check
+ duplicate$ empty$ 'skip$
+ {
+ emphasize
+ }
+ if$
+}
+FUNCTION {either.or.check}
+{ empty$
+ 'pop$
+ { "can't use both " swap$ * " fields in " * cite$ * warning$ }
+ if$
+}
+FUNCTION {format.bvolume}
+{ volume empty$
+ { "" }
+ { bbl.volume volume tie.or.space.prefix
+ "volume" bibinfo.check * *
+ series "series" bibinfo.check
+ duplicate$ empty$ 'pop$
+ { swap$ bbl.of space.word * swap$
+ emphasize * }
+ if$
+ "volume and number" number either.or.check
+ }
+ if$
+}
+FUNCTION {format.number.series}
+{ volume empty$
+ { number empty$
+ { series field.or.null }
+ { series empty$
+ { number "number" bibinfo.check }
+ { output.state mid.sentence =
+ { bbl.number }
+ { bbl.number capitalize }
+ if$
+ number tie.or.space.prefix "number" bibinfo.check * *
+ bbl.in space.word *
+ series "series" bibinfo.check *
+ }
+ if$
+ }
+ if$
+ }
+ { "" }
+ if$
+}
+
+FUNCTION {format.edition}
+{ edition duplicate$ empty$ 'skip$
+ {
+ output.state mid.sentence =
+ { "l" }
+ { "t" }
+ if$ change.case$
+ "edition" bibinfo.check
+ " " * bbl.edition *
+ }
+ if$
+}
+INTEGERS { multiresult }
+FUNCTION {multi.page.check}
+{ 't :=
+ #0 'multiresult :=
+ { multiresult not
+ t empty$ not
+ and
+ }
+ { t #1 #1 substring$
+ duplicate$ "-" =
+ swap$ duplicate$ "," =
+ swap$ "+" =
+ or or
+ { #1 'multiresult := }
+ { t #2 global.max$ substring$ 't := }
+ if$
+ }
+ while$
+ multiresult
+}
+FUNCTION {format.pages}
+{ pages duplicate$ empty$ 'skip$
+ { duplicate$ multi.page.check
+ {
+ n.dashify
+ }
+ {
+ }
+ if$
+ "pages" bibinfo.check
+ }
+ if$
+}
+FUNCTION {format.journal.pages}
+{ pages duplicate$ empty$ 'pop$
+ { swap$ duplicate$ empty$
+ { pop$ pop$ format.pages }
+ {
+ ": " *
+ swap$
+ n.dashify
+ "pages" bibinfo.check
+ *
+ }
+ if$
+ }
+ if$
+}
+FUNCTION {format.vol.num.pages}
+{ volume field.or.null
+ duplicate$ empty$ 'skip$
+ {
+ "volume" bibinfo.check
+ }
+ if$
+ bolden
+}
+
+FUNCTION {format.chapter.pages}
+{ chapter empty$
+ { "" }
+ { type empty$
+ { bbl.chapter }
+ { type "l" change.case$
+ "type" bibinfo.check
+ }
+ if$
+ chapter tie.or.space.prefix
+ "chapter" bibinfo.check
+ * *
+ }
+ if$
+}
+
+FUNCTION {format.booktitle}
+{
+ booktitle "booktitle" bibinfo.check
+ emphasize
+}
+FUNCTION {format.in.ed.booktitle}
+{ format.booktitle duplicate$ empty$ 'skip$
+ {
+ editor "editor" format.names.ed duplicate$ empty$ 'pop$
+ {
+ " " *
+ get.bbl.editor
+ "(" swap$ * ") " *
+ * swap$
+ * }
+ if$
+ word.in swap$ *
+ }
+ if$
+}
+FUNCTION {format.thesis.type}
+{ type duplicate$ empty$
+ 'pop$
+ { swap$ pop$
+ "t" change.case$ "type" bibinfo.check
+ }
+ if$
+}
+FUNCTION {format.tr.number}
+{ number "number" bibinfo.check
+ type duplicate$ empty$
+ { pop$ bbl.techrep }
+ 'skip$
+ if$
+ "type" bibinfo.check
+ swap$ duplicate$ empty$
+ { pop$ "t" change.case$ }
+ { tie.or.space.prefix * * }
+ if$
+}
+FUNCTION {format.article.crossref}
+{
+ word.in
+ " \cite{" * crossref * "}" *
+}
+FUNCTION {format.book.crossref}
+{ volume duplicate$ empty$
+ { "empty volume in " cite$ * "'s crossref of " * crossref * warning$
+ pop$ word.in
+ }
+ { bbl.volume
+ capitalize
+ swap$ tie.or.space.prefix "volume" bibinfo.check * * bbl.of space.word *
+ }
+ if$
+ " \cite{" * crossref * "}" *
+}
+FUNCTION {format.incoll.inproc.crossref}
+{
+ word.in
+ " \cite{" * crossref * "}" *
+}
+FUNCTION {format.org.or.pub}
+{ 't :=
+ ""
+ address empty$ t empty$ and
+ 'skip$
+ {
+ address "address" bibinfo.check *
+ t empty$
+ 'skip$
+ { address empty$
+ 'skip$
+ { ": " * }
+ if$
+ t *
+ }
+ if$
+ }
+ if$
+}
+FUNCTION {format.publisher.address}
+{ publisher "publisher" bibinfo.warn format.org.or.pub
+}
+
+FUNCTION {format.organization.address}
+{ organization "organization" bibinfo.check format.org.or.pub
+}
+
+FUNCTION {article}
+{ output.bibitem
+ format.authors "author" output.check
+ author format.key output
+ format.date "year" output.check
+ date.block
+ format.title "title" output.check
+ new.block
+ crossref missing$
+ {
+ journal
+ "journal" bibinfo.check
+ emphasize
+ "journal" output.check
+ add.blank
+ format.vol.num.pages output
+ }
+ { format.article.crossref output.nonnull
+ }
+ if$
+ format.journal.pages
+ format.issn output
+ new.block
+ format.note output
+ fin.entry
+ write.url
+}
+FUNCTION {book}
+{ output.bibitem
+ author empty$
+ { format.editors "author and editor" output.check
+ editor format.key output
+ add.blank
+ }
+ { format.authors output.nonnull
+ crossref missing$
+ { "author and editor" editor either.or.check }
+ 'skip$
+ if$
+ }
+ if$
+ format.date "year" output.check
+ date.block
+ format.btitle "title" output.check
+ crossref missing$
+ { format.bvolume output
+ new.block
+ format.number.series output
+ new.sentence
+ format.publisher.address output
+ }
+ {
+ new.block
+ format.book.crossref output.nonnull
+ }
+ if$
+ format.edition output
+ format.isbn output
+ new.block
+ format.note output
+ fin.entry
+ write.url
+}
+FUNCTION {booklet}
+{ output.bibitem
+ format.authors output
+ author format.key output
+ format.date "year" output.check
+ date.block
+ format.title "title" output.check
+ new.block
+ howpublished "howpublished" bibinfo.check output
+ address "address" bibinfo.check output
+ format.isbn output
+ new.block
+ format.note output
+ fin.entry
+ write.url
+}
+
+FUNCTION {inbook}
+{ output.bibitem
+ author empty$
+ { format.editors "author and editor" output.check
+ editor format.key output
+ }
+ { format.authors output.nonnull
+ crossref missing$
+ { "author and editor" editor either.or.check }
+ 'skip$
+ if$
+ }
+ if$
+ format.date "year" output.check
+ date.block
+ format.btitle "title" output.check
+ crossref missing$
+ {
+ format.bvolume output
+ format.chapter.pages "chapter and pages" output.check
+ new.block
+ format.number.series output
+ new.sentence
+ format.publisher.address output
+ }
+ {
+ format.chapter.pages "chapter and pages" output.check
+ new.block
+ format.book.crossref output.nonnull
+ }
+ if$
+ format.edition output
+ crossref missing$
+ { format.isbn output }
+ 'skip$
+ if$
+ format.pages "pages" output.check
+ new.block
+ format.note output
+ fin.entry
+ write.url
+}
+
+FUNCTION {incollection}
+{ output.bibitem
+ format.authors "author" output.check
+ author format.key output
+ format.date "year" output.check
+ date.block
+ format.title "title" output.check
+ new.block
+ crossref missing$
+ { format.in.ed.booktitle "booktitle" output.check
+ format.bvolume output
+ format.number.series output
+ format.chapter.pages output
+ new.sentence
+ format.publisher.address output
+ format.edition output
+ format.isbn output
+ }
+ { format.incoll.inproc.crossref output.nonnull
+ format.chapter.pages output
+ }
+ if$
+ format.pages "pages" output.check
+ new.block
+ format.note output
+ fin.entry
+ write.url
+}
+FUNCTION {inproceedings}
+{ output.bibitem
+ format.authors "author" output.check
+ author format.key output
+ format.date "year" output.check
+ date.block
+ format.title "title" output.check
+ new.block
+ crossref missing$
+ { format.in.ed.booktitle "booktitle" output.check
+ format.bvolume output
+ format.number.series output
+ new.sentence
+ publisher empty$
+ { format.organization.address output }
+ { organization "organization" bibinfo.check output
+ format.publisher.address output
+ }
+ if$
+ format.isbn output
+ format.issn output
+ }
+ { format.incoll.inproc.crossref output.nonnull
+ }
+ if$
+ format.pages "pages" output.check
+ new.block
+ format.note output
+ fin.entry
+ write.url
+}
+FUNCTION {conference} { inproceedings }
+FUNCTION {manual}
+{ output.bibitem
+ format.authors output
+ author format.key output
+ format.date "year" output.check
+ date.block
+ format.btitle "title" output.check
+ organization address new.block.checkb
+ organization "organization" bibinfo.check output
+ address "address" bibinfo.check output
+ format.edition output
+ new.block
+ format.note output
+ fin.entry
+ write.url
+}
+
+FUNCTION {mastersthesis}
+{ output.bibitem
+ format.authors "author" output.check
+ author format.key output
+ format.date "year" output.check
+ date.block
+ format.btitle
+ "title" output.check
+ new.block
+ bbl.mthesis format.thesis.type output.nonnull
+ school "school" bibinfo.warn output
+ address "address" bibinfo.check output
+ new.block
+ format.note output
+ fin.entry
+ write.url
+}
+
+FUNCTION {misc}
+{ output.bibitem
+ format.authors output
+ author format.key output
+ format.date "year" output.check
+ date.block
+ format.title output
+ new.block
+ howpublished "howpublished" bibinfo.check output
+ new.block
+ format.note output
+ fin.entry
+ write.url
+}
+FUNCTION {phdthesis}
+{ output.bibitem
+ format.authors "author" output.check
+ author format.key output
+ format.date "year" output.check
+ date.block
+ format.btitle
+ "title" output.check
+ new.block
+ bbl.phdthesis format.thesis.type output.nonnull
+ school "school" bibinfo.warn output
+ address "address" bibinfo.check output
+ new.block
+ format.note output
+ fin.entry
+ write.url
+}
+
+FUNCTION {proceedings}
+{ output.bibitem
+ format.editors output
+ editor format.key output
+ format.date "year" output.check
+ date.block
+ format.btitle "title" output.check
+ format.bvolume output
+ format.number.series output
+ new.sentence
+ publisher empty$
+ { format.organization.address output }
+ { organization "organization" bibinfo.check output
+ format.publisher.address output
+ }
+ if$
+ format.isbn output
+ format.issn output
+ new.block
+ format.note output
+ fin.entry
+ write.url
+}
+
+FUNCTION {techreport}
+{ output.bibitem
+ format.authors "author" output.check
+ author format.key output
+ format.date "year" output.check
+ date.block
+ format.title
+ "title" output.check
+ new.block
+ format.tr.number output.nonnull
+ institution "institution" bibinfo.warn output
+ address "address" bibinfo.check output
+ new.block
+ format.note output
+ fin.entry
+ write.url
+}
+
+FUNCTION {unpublished}
+{ output.bibitem
+ format.authors "author" output.check
+ author format.key output
+ format.date "year" output.check
+ date.block
+ format.title "title" output.check
+ new.block
+ format.note "note" output.check
+ fin.entry
+ write.url
+}
+
+FUNCTION {default.type} { misc }
+READ
+FUNCTION {sortify}
+{ purify$
+ "l" change.case$
+}
+INTEGERS { len }
+FUNCTION {chop.word}
+{ 's :=
+ 'len :=
+ s #1 len substring$ =
+ { s len #1 + global.max$ substring$ }
+ 's
+ if$
+}
+FUNCTION {format.lab.names}
+{ 's :=
+ "" 't :=
+ s #1 "{vv~}{ll}" format.name$
+ s num.names$ duplicate$
+ #2 >
+ { pop$
+ " " * bbl.etal *
+ }
+ { #2 <
+ 'skip$
+ { s #2 "{ff }{vv }{ll}{ jj}" format.name$ "others" =
+ {
+ " " * bbl.etal *
+ }
+ { bbl.and space.word * s #2 "{vv~}{ll}" format.name$
+ * }
+ if$
+ }
+ if$
+ }
+ if$
+}
+
+FUNCTION {author.key.label}
+{ author empty$
+ { key empty$
+ { cite$ #1 #3 substring$ }
+ 'key
+ if$
+ }
+ { author format.lab.names }
+ if$
+}
+
+FUNCTION {author.editor.key.label}
+{ author empty$
+ { editor empty$
+ { key empty$
+ { cite$ #1 #3 substring$ }
+ 'key
+ if$
+ }
+ { editor format.lab.names }
+ if$
+ }
+ { author format.lab.names }
+ if$
+}
+
+FUNCTION {editor.key.label}
+{ editor empty$
+ { key empty$
+ { cite$ #1 #3 substring$ }
+ 'key
+ if$
+ }
+ { editor format.lab.names }
+ if$
+}
+
+FUNCTION {calc.short.authors}
+{ type$ "book" =
+ type$ "inbook" =
+ or
+ 'author.editor.key.label
+ { type$ "proceedings" =
+ 'editor.key.label
+ 'author.key.label
+ if$
+ }
+ if$
+ 'short.list :=
+}
+
+FUNCTION {calc.label}
+{ calc.short.authors
+ short.list
+ "("
+ *
+ year duplicate$ empty$
+ short.list key field.or.null = or
+ { pop$ "" }
+ 'skip$
+ if$
+ *
+ 'label :=
+}
+
+FUNCTION {sort.format.names}
+{ 's :=
+ #1 'nameptr :=
+ ""
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ { s nameptr
+ "{vv{ } }{ll{ }}{ f{ }}{ jj{ }}"
+ format.name$ 't :=
+ nameptr #1 >
+ {
+ " " *
+ namesleft #1 = t "others" = and
+ { "zzzzz" * }
+ { t sortify * }
+ if$
+ }
+ { t sortify * }
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+}
+
+FUNCTION {sort.format.title}
+{ 't :=
+ "A " #2
+ "An " #3
+ "The " #4 t chop.word
+ chop.word
+ chop.word
+ sortify
+ #1 global.max$ substring$
+}
+FUNCTION {author.sort}
+{ author empty$
+ { key empty$
+ { "to sort, need author or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { author sort.format.names }
+ if$
+}
+FUNCTION {author.editor.sort}
+{ author empty$
+ { editor empty$
+ { key empty$
+ { "to sort, need author, editor, or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { editor sort.format.names }
+ if$
+ }
+ { author sort.format.names }
+ if$
+}
+FUNCTION {editor.sort}
+{ editor empty$
+ { key empty$
+ { "to sort, need editor or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { editor sort.format.names }
+ if$
+}
+FUNCTION {presort}
+{ calc.label
+ label sortify
+ " "
+ *
+ type$ "book" =
+ type$ "inbook" =
+ or
+ 'author.editor.sort
+ { type$ "proceedings" =
+ 'editor.sort
+ 'author.sort
+ if$
+ }
+ if$
+ #1 entry.max$ substring$
+ 'sort.label :=
+ sort.label
+ *
+ " "
+ *
+ title field.or.null
+ sort.format.title
+ *
+ #1 entry.max$ substring$
+ 'sort.key$ :=
+}
+
+ITERATE {presort}
+SORT
+STRINGS { last.label next.extra }
+INTEGERS { last.extra.num number.label }
+FUNCTION {initialize.extra.label.stuff}
+{ #0 int.to.chr$ 'last.label :=
+ "" 'next.extra :=
+ #0 'last.extra.num :=
+ #0 'number.label :=
+}
+FUNCTION {forward.pass}
+{ last.label label =
+ { last.extra.num #1 + 'last.extra.num :=
+ last.extra.num int.to.chr$ 'extra.label :=
+ }
+ { "a" chr.to.int$ 'last.extra.num :=
+ "" 'extra.label :=
+ label 'last.label :=
+ }
+ if$
+ number.label #1 + 'number.label :=
+}
+FUNCTION {reverse.pass}
+{ next.extra "b" =
+ { "a" 'extra.label := }
+ 'skip$
+ if$
+ extra.label 'next.extra :=
+ extra.label
+ duplicate$ empty$
+ 'skip$
+ { "{\natexlab{" swap$ * "}}" * }
+ if$
+ 'extra.label :=
+ label extra.label * 'label :=
+}
+EXECUTE {initialize.extra.label.stuff}
+ITERATE {forward.pass}
+REVERSE {reverse.pass}
+FUNCTION {bib.sort.order}
+{ sort.label
+ " "
+ *
+ year field.or.null sortify
+ *
+ " "
+ *
+ title field.or.null
+ sort.format.title
+ *
+ #1 entry.max$ substring$
+ 'sort.key$ :=
+}
+ITERATE {bib.sort.order}
+SORT
+FUNCTION {begin.bib}
+{ preamble$ empty$
+ 'skip$
+ { preamble$ write$ newline$ }
+ if$
+ "\begin{thebibliography}{" number.label int.to.str$ * "}" *
+ write$ newline$
+ "\expandafter\ifx\csname natexlab\endcsname\relax\def\natexlab#1{#1}\fi"
+ write$ newline$
+ "\expandafter\ifx\csname url\endcsname\relax"
+ write$ newline$
+ " \def\url#1{\texttt{#1}}\fi"
+ write$ newline$
+ "\expandafter\ifx\csname urlprefix\endcsname\relax\def\urlprefix{URL }\fi"
+ write$ newline$
+}
+EXECUTE {begin.bib}
+EXECUTE {init.state.consts}
+ITERATE {call.type$}
+FUNCTION {end.bib}
+{ newline$
+ "\end{thebibliography}" write$ newline$
+}
+EXECUTE {end.bib}
+%% End of customized bst file
+%%
+%% End of file `jae.bst'.
diff --git a/biblio/bibtex/contrib/economic/jpe.bst b/biblio/bibtex/contrib/economic/jpe.bst
new file mode 100644
index 0000000000..36e97c2608
--- /dev/null
+++ b/biblio/bibtex/contrib/economic/jpe.bst
@@ -0,0 +1,1611 @@
+%%% Journal of Political Economy (JPE)
+%%% bibliography style for use with LaTeX2e
+%%% version: 1.0 (12 December 2008)
+%%% license: LaTeX Project Public License (see below)
+%%% This file was created with makebst (see below)
+%%% by Adam Seth Litwin <aslitwin (at) jhu (dot) edu>.
+%%% Note: This is an unofficial style file that may not fully comply
+%%% with the JPE reference guidelines in every detail.
+%%% Please report any problems at
+%%% http://sourceforge.net/projects/economtex/
+%%% Further information is available at
+%%% http://economtex.wiki.sourceforge.net/
+%%
+%% This is file `jpe.bst',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% merlin.mbs (with options: `ay,nat,pres,nm-revv1,jnrlst,nmdash,nmd-3,mcite,mct-1,mct-x3,keyxyr,dt-beg,yr-per,yrp-per,note-yr,tit-qq,atit-u,vnum-sp,pp-last,num-xser,ser-vol,ser-ed,jnm-x,bkpg-x,add-pub,edby,ppx,abr,ednx,xedn,jabr,etal-xc,url,url-blk,nfss,')
+%% ----------------------------------------
+%% *** a style as similar as possible to Journal of Political Economy ***
+%%
+%% Copyright 1994-2007 Patrick W Daly
+ % ===============================================================
+ % IMPORTANT NOTICE:
+ % This bibliographic style (bst) file has been generated from one or
+ % more master bibliographic style (mbs) files, listed above.
+ %
+ % This generated file can be redistributed and/or modified under the terms
+ % of the LaTeX Project Public License Distributed from CTAN
+ % archives in directory macros/latex/base/lppl.txt; either
+ % version 1 of the License, or any later version.
+ % ===============================================================
+ % Name and version information of the main mbs file:
+ % \ProvidesFile{merlin.mbs}[2007/04/24 4.20 (PWD, AO, DPC)]
+ % For use with BibTeX version 0.99a or later
+ %-------------------------------------------------------------------
+ % This bibliography style file is intended for texts in ENGLISH
+ % This is an author-year citation style bibliography. As such, it is
+ % non-standard LaTeX, and requires a special package file to function properly.
+ % Such a package is natbib.sty by Patrick W. Daly
+ % The form of the \bibitem entries is
+ % \bibitem[Jones et al.(1990)]{key}...
+ % \bibitem[Jones et al.(1990)Jones, Baker, and Smith]{key}...
+ % The essential feature is that the label (the part in brackets) consists
+ % of the author names, as they should appear in the citation, with the year
+ % in parentheses following. There must be no space before the opening
+ % parenthesis!
+ % With natbib v5.3, a full list of authors may also follow the year.
+ % In natbib.sty, it is possible to define the type of enclosures that is
+ % really wanted (brackets or parentheses), but in either case, there must
+ % be parentheses in the label.
+ % The \cite command functions as follows:
+ % \citet{key} ==>> Jones et al. (1990)
+ % \citet*{key} ==>> Jones, Baker, and Smith (1990)
+ % \citep{key} ==>> (Jones et al., 1990)
+ % \citep*{key} ==>> (Jones, Baker, and Smith, 1990)
+ % \citep[chap. 2]{key} ==>> (Jones et al., 1990, chap. 2)
+ % \citep[e.g.][]{key} ==>> (e.g. Jones et al., 1990)
+ % \citep[e.g.][p. 32]{key} ==>> (e.g. Jones et al., p. 32)
+ % \citeauthor{key} ==>> Jones et al.
+ % \citeauthor*{key} ==>> Jones, Baker, and Smith
+ % \citeyear{key} ==>> 1990
+ %---------------------------------------------------------------------
+
+ENTRY
+ { address
+ author
+ booktitle
+ chapter
+ edition
+ editor
+ eid
+ howpublished
+ institution
+ journal
+ key
+ month
+ note
+ number
+ organization
+ pages
+ publisher
+ school
+ series
+ title
+ type
+ url
+ volume
+ year
+ }
+ {}
+ { label extra.label sort.label short.list }
+INTEGERS { output.state before.all mid.sentence after.sentence after.block }
+FUNCTION {init.state.consts}
+{ #0 'before.all :=
+ #1 'mid.sentence :=
+ #2 'after.sentence :=
+ #3 'after.block :=
+}
+STRINGS { s t}
+FUNCTION {output.nonnull}
+{ 's :=
+ output.state mid.sentence =
+ { ", " * write$ }
+ { output.state after.block =
+ { add.period$ write$
+ newline$
+ "\newblock " write$
+ }
+ { output.state before.all =
+ 'write$
+ { add.period$ " " * write$ }
+ if$
+ }
+ if$
+ mid.sentence 'output.state :=
+ }
+ if$
+ s
+}
+FUNCTION {output}
+{ duplicate$ empty$
+ 'pop$
+ 'output.nonnull
+ if$
+}
+FUNCTION {output.check}
+{ 't :=
+ duplicate$ empty$
+ { pop$ "empty " t * " in " * cite$ * warning$ }
+ 'output.nonnull
+ if$
+}
+FUNCTION {fin.entry}
+{ add.period$
+ write$
+ newline$
+}
+
+FUNCTION {new.block}
+{ output.state before.all =
+ 'skip$
+ { after.block 'output.state := }
+ if$
+}
+FUNCTION {new.sentence}
+{ output.state after.block =
+ 'skip$
+ { output.state before.all =
+ 'skip$
+ { after.sentence 'output.state := }
+ if$
+ }
+ if$
+}
+FUNCTION {add.blank}
+{ " " * before.all 'output.state :=
+}
+
+FUNCTION {date.block}
+{
+ new.block
+}
+
+FUNCTION {not}
+{ { #0 }
+ { #1 }
+ if$
+}
+FUNCTION {and}
+{ 'skip$
+ { pop$ #0 }
+ if$
+}
+FUNCTION {or}
+{ { pop$ #1 }
+ 'skip$
+ if$
+}
+FUNCTION {non.stop}
+{ duplicate$
+ "}" * add.period$
+ #-1 #1 substring$ "." =
+}
+
+FUNCTION {new.block.checkb}
+{ empty$
+ swap$ empty$
+ and
+ 'skip$
+ 'new.block
+ if$
+}
+FUNCTION {field.or.null}
+{ duplicate$ empty$
+ { pop$ "" }
+ 'skip$
+ if$
+}
+FUNCTION {emphasize}
+{ duplicate$ empty$
+ { pop$ "" }
+ { "\emph{" swap$ * "}" * }
+ if$
+}
+FUNCTION {tie.or.space.prefix}
+{ duplicate$ text.length$ #3 <
+ { "~" }
+ { " " }
+ if$
+ swap$
+}
+
+FUNCTION {capitalize}
+{ "u" change.case$ "t" change.case$ }
+
+FUNCTION {space.word}
+{ " " swap$ * " " * }
+ % Here are the language-specific definitions for explicit words.
+ % Each function has a name bbl.xxx where xxx is the English word.
+ % The language selected here is ENGLISH
+FUNCTION {bbl.and}
+{ "and"}
+
+FUNCTION {bbl.etal}
+{ "et~al." }
+
+FUNCTION {bbl.editors}
+{ "editors" }
+
+FUNCTION {bbl.editor}
+{ "editor" }
+
+FUNCTION {bbl.edby}
+{ "edited by" }
+
+FUNCTION {bbl.edition}
+{ "ed." }
+
+FUNCTION {bbl.volume}
+{ "vol." }
+
+FUNCTION {bbl.of}
+{ "of" }
+
+FUNCTION {bbl.number}
+{ "no." }
+
+FUNCTION {bbl.nr}
+{ "no." }
+
+FUNCTION {bbl.in}
+{ "in" }
+
+FUNCTION {bbl.pages}
+{ "" }
+
+FUNCTION {bbl.page}
+{ "" }
+
+FUNCTION {bbl.chapter}
+{ "chap." }
+
+FUNCTION {bbl.techrep}
+{ "Tech. Rep." }
+
+FUNCTION {bbl.mthesis}
+{ "Master's thesis" }
+
+FUNCTION {bbl.phdthesis}
+{ "Ph.D. thesis" }
+
+MACRO {jan} {"Jan."}
+
+MACRO {feb} {"Feb."}
+
+MACRO {mar} {"Mar."}
+
+MACRO {apr} {"Apr."}
+
+MACRO {may} {"May"}
+
+MACRO {jun} {"Jun."}
+
+MACRO {jul} {"Jul."}
+
+MACRO {aug} {"Aug."}
+
+MACRO {sep} {"Sep."}
+
+MACRO {oct} {"Oct."}
+
+MACRO {nov} {"Nov."}
+
+MACRO {dec} {"Dec."}
+
+MACRO {acmcs} {"ACM Comput. Surv."}
+
+MACRO {acta} {"Acta Inf."}
+
+MACRO {cacm} {"Commun. ACM"}
+
+MACRO {ibmjrd} {"IBM J. Res. Dev."}
+
+MACRO {ibmsj} {"IBM Syst.~J."}
+
+MACRO {ieeese} {"IEEE Trans. Software Eng."}
+
+MACRO {ieeetc} {"IEEE Trans. Comput."}
+
+MACRO {ieeetcad}
+ {"IEEE Trans. Comput. Aid. Des."}
+
+MACRO {ipl} {"Inf. Process. Lett."}
+
+MACRO {jacm} {"J.~ACM"}
+
+MACRO {jcss} {"J.~Comput. Syst. Sci."}
+
+MACRO {scp} {"Sci. Comput. Program."}
+
+MACRO {sicomp} {"SIAM J. Comput."}
+
+MACRO {tocs} {"ACM Trans. Comput. Syst."}
+
+MACRO {tods} {"ACM Trans. Database Syst."}
+
+MACRO {tog} {"ACM Trans. Graphic."}
+
+MACRO {toms} {"ACM Trans. Math. Software"}
+
+MACRO {toois} {"ACM Trans. Office Inf. Syst."}
+
+MACRO {toplas} {"ACM Trans. Progr. Lang. Syst."}
+
+MACRO {tcs} {"Theor. Comput. Sci."}
+
+FUNCTION {bibinfo.check}
+{ swap$
+ duplicate$ missing$
+ {
+ pop$ pop$
+ ""
+ }
+ { duplicate$ empty$
+ {
+ swap$ pop$
+ }
+ { swap$
+ pop$
+ }
+ if$
+ }
+ if$
+}
+FUNCTION {bibinfo.warn}
+{ swap$
+ duplicate$ missing$
+ {
+ swap$ "missing " swap$ * " in " * cite$ * warning$ pop$
+ ""
+ }
+ { duplicate$ empty$
+ {
+ swap$ "empty " swap$ * " in " * cite$ * warning$
+ }
+ { swap$
+ pop$
+ }
+ if$
+ }
+ if$
+}
+FUNCTION {format.url}
+{ url empty$
+ { "" }
+ { "\urlprefix\url{" url * "}" * }
+ if$
+}
+
+INTEGERS { nameptr namesleft numnames }
+
+
+STRINGS { bibinfo}
+
+FUNCTION {format.names}
+{ 'bibinfo :=
+ duplicate$ empty$ 'skip$ {
+ 's :=
+ "" 't :=
+ #1 'nameptr :=
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ { s nameptr
+ duplicate$ #1 >
+ { "{ff~}{vv~}{ll}{, jj}" }
+ { "{vv~}{ll}{, ff}{, jj}" }
+ if$
+ format.name$
+ bibinfo bibinfo.check
+ 't :=
+ nameptr #1 >
+ {
+ namesleft #1 >
+ { ", " * t * }
+ {
+ s nameptr "{ll}" format.name$ duplicate$ "others" =
+ { 't := }
+ { pop$ }
+ if$
+ numnames #2 >
+ t "others" = not and
+ { "," * }
+ 'skip$
+ if$
+ t "others" =
+ {
+ " " * bbl.etal *
+ }
+ {
+ bbl.and
+ space.word * t *
+ }
+ if$
+ }
+ if$
+ }
+ 't
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+ } if$
+}
+FUNCTION {format.names.ed}
+{
+ 'bibinfo :=
+ duplicate$ empty$ 'skip$ {
+ 's :=
+ "" 't :=
+ #1 'nameptr :=
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ { s nameptr
+ "{ff~}{vv~}{ll}{, jj}"
+ format.name$
+ bibinfo bibinfo.check
+ 't :=
+ nameptr #1 >
+ {
+ namesleft #1 >
+ { ", " * t * }
+ {
+ s nameptr "{ll}" format.name$ duplicate$ "others" =
+ { 't := }
+ { pop$ }
+ if$
+ numnames #2 >
+ t "others" = not and
+ { "," * }
+ 'skip$
+ if$
+ t "others" =
+ {
+
+ " " * bbl.etal *
+ }
+ {
+ bbl.and
+ space.word * t *
+ }
+ if$
+ }
+ if$
+ }
+ 't
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+ } if$
+}
+FUNCTION {format.key}
+{ empty$
+ { key field.or.null }
+ { "" }
+ if$
+}
+
+FUNCTION {format.authors}
+{ author "author" format.names
+}
+FUNCTION {get.bbl.editor}
+{ editor num.names$ #1 > 'bbl.editors 'bbl.editor if$ }
+
+FUNCTION {format.editors}
+{ editor "editor" format.names duplicate$ empty$ 'skip$
+ {
+ "," *
+ " " *
+ get.bbl.editor
+ *
+ }
+ if$
+}
+FUNCTION {format.note}
+{
+ note empty$
+ { "" }
+ { note #1 #1 substring$
+ duplicate$ "{" =
+ 'skip$
+ { output.state mid.sentence =
+ { "l" }
+ { "u" }
+ if$
+ change.case$
+ }
+ if$
+ note #2 global.max$ substring$ * "note" bibinfo.check
+ }
+ if$
+}
+
+FUNCTION {format.title}
+{ title
+ "title" bibinfo.check
+ duplicate$ empty$ 'skip$
+ {
+ "\enquote{" swap$ *
+ add.period$ "}" *
+ }
+ if$
+}
+FUNCTION {format.full.names}
+{'s :=
+ "" 't :=
+ #1 'nameptr :=
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ { s nameptr
+ "{vv~}{ll}" format.name$
+ 't :=
+ nameptr #1 >
+ {
+ namesleft #1 >
+ { ", " * t * }
+ {
+ s nameptr "{ll}" format.name$ duplicate$ "others" =
+ { 't := }
+ { pop$ }
+ if$
+ t "others" =
+ {
+ " " * bbl.etal *
+ }
+ {
+ numnames #2 >
+ { "," * }
+ 'skip$
+ if$
+ bbl.and
+ space.word * t *
+ }
+ if$
+ }
+ if$
+ }
+ 't
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+}
+
+FUNCTION {author.editor.key.full}
+{ author empty$
+ { editor empty$
+ { key empty$
+ { cite$ #1 #3 substring$ }
+ 'key
+ if$
+ }
+ { editor format.full.names }
+ if$
+ }
+ { author format.full.names }
+ if$
+}
+
+FUNCTION {author.key.full}
+{ author empty$
+ { key empty$
+ { cite$ #1 #3 substring$ }
+ 'key
+ if$
+ }
+ { author format.full.names }
+ if$
+}
+
+FUNCTION {editor.key.full}
+{ editor empty$
+ { key empty$
+ { cite$ #1 #3 substring$ }
+ 'key
+ if$
+ }
+ { editor format.full.names }
+ if$
+}
+
+FUNCTION {make.full.names}
+{ type$ "book" =
+ type$ "inbook" =
+ or
+ 'author.editor.key.full
+ { type$ "proceedings" =
+ 'editor.key.full
+ 'author.key.full
+ if$
+ }
+ if$
+}
+
+FUNCTION {output.bibitem}
+{ newline$
+ "\bibitem[{" write$
+ label write$
+ ")" make.full.names duplicate$ short.list =
+ { pop$ }
+ { * }
+ if$
+ "}]{" * write$
+ cite$ write$
+ "}" write$
+ newline$
+ ""
+ before.all 'output.state :=
+}
+
+FUNCTION {n.dashify}
+{
+ 't :=
+ ""
+ { t empty$ not }
+ { t #1 #1 substring$ "-" =
+ { t #1 #2 substring$ "--" = not
+ { "--" *
+ t #2 global.max$ substring$ 't :=
+ }
+ { { t #1 #1 substring$ "-" = }
+ { "-" *
+ t #2 global.max$ substring$ 't :=
+ }
+ while$
+ }
+ if$
+ }
+ { t #1 #1 substring$ *
+ t #2 global.max$ substring$ 't :=
+ }
+ if$
+ }
+ while$
+}
+
+FUNCTION {word.in}
+{ bbl.in capitalize
+ " " * }
+
+FUNCTION {format.date}
+{ year "year" bibinfo.check duplicate$ empty$
+ {
+ "empty year in " cite$ * "; set to ????" * warning$
+ pop$ "????"
+ }
+ 'skip$
+ if$
+ extra.label *
+ before.all 'output.state :=
+ after.sentence 'output.state :=
+}
+FUNCTION {format.btitle}
+{ title "title" bibinfo.check
+ duplicate$ empty$ 'skip$
+ {
+ emphasize
+ }
+ if$
+}
+FUNCTION {either.or.check}
+{ empty$
+ 'pop$
+ { "can't use both " swap$ * " fields in " * cite$ * warning$ }
+ if$
+}
+FUNCTION {format.bvolume}
+{ volume empty$
+ { "" }
+ { bbl.volume volume tie.or.space.prefix
+ "volume" bibinfo.check * *
+ series "series" bibinfo.check
+ duplicate$ empty$ 'pop$
+ { emphasize ", " * swap$ * }
+ if$
+ "volume and number" number either.or.check
+ }
+ if$
+}
+FUNCTION {format.number.series}
+{ volume empty$
+ { number empty$
+ { series field.or.null }
+ { series empty$
+ { number "number" bibinfo.check }
+ { output.state mid.sentence =
+ { bbl.number }
+ { bbl.number capitalize }
+ if$
+ number tie.or.space.prefix "number" bibinfo.check * *
+ bbl.in space.word *
+ series "series" bibinfo.check *
+ }
+ if$
+ }
+ if$
+ }
+ { "" }
+ if$
+}
+
+FUNCTION {format.edition}
+{ edition duplicate$ empty$ 'skip$
+ {
+ output.state mid.sentence =
+ { "l" }
+ { "t" }
+ if$ change.case$
+ "edition" bibinfo.check
+ " " * bbl.edition *
+ }
+ if$
+}
+INTEGERS { multiresult }
+FUNCTION {multi.page.check}
+{ 't :=
+ #0 'multiresult :=
+ { multiresult not
+ t empty$ not
+ and
+ }
+ { t #1 #1 substring$
+ duplicate$ "-" =
+ swap$ duplicate$ "," =
+ swap$ "+" =
+ or or
+ { #1 'multiresult := }
+ { t #2 global.max$ substring$ 't := }
+ if$
+ }
+ while$
+ multiresult
+}
+FUNCTION {format.pages}
+{ pages duplicate$ empty$ 'skip$
+ { duplicate$ multi.page.check
+ {
+ n.dashify
+ }
+ {
+ }
+ if$
+ "pages" bibinfo.check
+ }
+ if$
+}
+FUNCTION {format.journal.pages}
+{ pages duplicate$ empty$ 'pop$
+ { swap$ duplicate$ empty$
+ { pop$ pop$ format.pages }
+ {
+ ":" *
+ swap$
+ n.dashify
+ "pages" bibinfo.check
+ *
+ }
+ if$
+ }
+ if$
+}
+FUNCTION {format.journal.eid}
+{ eid "eid" bibinfo.check
+ duplicate$ empty$ 'pop$
+ { swap$ duplicate$ empty$ 'skip$
+ {
+ ":" *
+ }
+ if$
+ swap$ *
+ }
+ if$
+}
+FUNCTION {format.vol.num.pages}
+{ volume field.or.null
+ duplicate$ empty$ 'skip$
+ {
+ "volume" bibinfo.check
+ }
+ if$
+ number "number" bibinfo.check duplicate$ empty$ 'skip$
+ {
+ swap$ duplicate$ empty$
+ { "there's a number but no volume in " cite$ * warning$ }
+ 'skip$
+ if$
+ swap$
+ "~(" swap$ * ")" *
+ }
+ if$ *
+}
+
+FUNCTION {format.chapter.pages}
+{ chapter empty$
+ { "" }
+ { type empty$
+ { bbl.chapter }
+ { type "l" change.case$
+ "type" bibinfo.check
+ }
+ if$
+ chapter tie.or.space.prefix
+ "chapter" bibinfo.check
+ * *
+ }
+ if$
+}
+
+FUNCTION {format.booktitle}
+{
+ booktitle "booktitle" bibinfo.check
+ emphasize
+}
+FUNCTION {format.in.ed.booktitle}
+{ format.booktitle duplicate$ empty$ 'skip$
+ {
+ format.bvolume duplicate$ empty$ 'pop$
+ { ", " swap$ * * }
+ if$
+ editor "editor" format.names.ed duplicate$ empty$ 'pop$
+ {
+ bbl.edby
+ " " * swap$ *
+ swap$
+ "," *
+ " " * swap$
+ * }
+ if$
+ word.in swap$ *
+ }
+ if$
+}
+FUNCTION {format.thesis.type}
+{ type duplicate$ empty$
+ 'pop$
+ { swap$ pop$
+ "t" change.case$ "type" bibinfo.check
+ }
+ if$
+}
+FUNCTION {format.tr.number}
+{ number "number" bibinfo.check
+ type duplicate$ empty$
+ { pop$ bbl.techrep }
+ 'skip$
+ if$
+ "type" bibinfo.check
+ swap$ duplicate$ empty$
+ { pop$ "t" change.case$ }
+ { tie.or.space.prefix * * }
+ if$
+}
+FUNCTION {format.article.crossref}
+{
+ word.in
+ " \cite{" * crossref * "}" *
+}
+FUNCTION {format.book.crossref}
+{ volume duplicate$ empty$
+ { "empty volume in " cite$ * "'s crossref of " * crossref * warning$
+ pop$ word.in
+ }
+ { bbl.volume
+ capitalize
+ swap$ tie.or.space.prefix "volume" bibinfo.check * * bbl.of space.word *
+ }
+ if$
+ " \cite{" * crossref * "}" *
+}
+FUNCTION {format.incoll.inproc.crossref}
+{
+ word.in
+ " \cite{" * crossref * "}" *
+}
+FUNCTION {format.org.or.pub}
+{ 't :=
+ ""
+ address empty$ t empty$ and
+ 'skip$
+ {
+ address "address" bibinfo.check *
+ t empty$
+ 'skip$
+ { address empty$
+ 'skip$
+ { ": " * }
+ if$
+ t *
+ }
+ if$
+ }
+ if$
+}
+FUNCTION {format.publisher.address}
+{ publisher "publisher" bibinfo.warn format.org.or.pub
+}
+
+FUNCTION {format.organization.address}
+{ organization "organization" bibinfo.check format.org.or.pub
+}
+
+STRINGS {oldname}
+
+FUNCTION {name.or.dash}
+{ 's :=
+ oldname empty$
+ { s 'oldname := s }
+ { s oldname =
+ { "---{}---{}---" }
+ { s 'oldname := s }
+ if$
+ }
+ if$
+}
+
+FUNCTION {article}
+{ output.bibitem
+ format.authors "author" output.check
+ author format.key output
+ name.or.dash
+ format.date "year" output.check
+ date.block
+ format.title "title" output.check
+ new.block
+ crossref missing$
+ {
+ journal
+ "journal" bibinfo.check
+ emphasize
+ "journal" output.check
+ add.blank
+ format.vol.num.pages output
+ }
+ { format.article.crossref output.nonnull
+ }
+ if$
+ eid empty$
+ { format.journal.pages }
+ { format.journal.eid }
+ if$
+ new.block
+ format.url output
+ new.block
+ format.note output
+ fin.entry
+}
+FUNCTION {book}
+{ output.bibitem
+ author empty$
+ { format.editors "author and editor" output.check
+ editor format.key output
+ name.or.dash
+ }
+ { format.authors output.nonnull
+ name.or.dash
+ crossref missing$
+ { "author and editor" editor either.or.check }
+ 'skip$
+ if$
+ }
+ if$
+ format.date "year" output.check
+ date.block
+ format.btitle "title" output.check
+ crossref missing$
+ { format.bvolume output
+ new.block
+ format.number.series output
+ new.sentence
+ format.publisher.address output
+ }
+ {
+ new.block
+ format.book.crossref output.nonnull
+ }
+ if$
+ format.edition output
+ new.block
+ format.url output
+ new.block
+ format.note output
+ fin.entry
+}
+FUNCTION {booklet}
+{ output.bibitem
+ format.authors output
+ author format.key output
+ name.or.dash
+ format.date "year" output.check
+ date.block
+ format.title "title" output.check
+ new.block
+ howpublished "howpublished" bibinfo.check output
+ address "address" bibinfo.check output
+ new.block
+ format.url output
+ new.block
+ format.note output
+ fin.entry
+}
+
+FUNCTION {inbook}
+{ output.bibitem
+ author empty$
+ { format.editors "author and editor" output.check
+ editor format.key output
+ name.or.dash
+ }
+ { format.authors output.nonnull
+ name.or.dash
+ crossref missing$
+ { "author and editor" editor either.or.check }
+ 'skip$
+ if$
+ }
+ if$
+ format.date "year" output.check
+ date.block
+ format.btitle "title" output.check
+ crossref missing$
+ {
+ format.bvolume output
+ format.chapter.pages "chapter and pages" output.check
+ new.block
+ format.number.series output
+ new.sentence
+ format.publisher.address output
+ }
+ {
+ format.chapter.pages "chapter and pages" output.check
+ new.block
+ format.book.crossref output.nonnull
+ }
+ if$
+ format.edition output
+ format.pages "pages" output.check
+ new.block
+ format.url output
+ new.block
+ format.note output
+ fin.entry
+}
+
+FUNCTION {incollection}
+{ output.bibitem
+ format.authors "author" output.check
+ author format.key output
+ name.or.dash
+ format.date "year" output.check
+ date.block
+ format.title "title" output.check
+ new.block
+ crossref missing$
+ { format.in.ed.booktitle "booktitle" output.check
+ format.number.series output
+ format.chapter.pages output
+ new.sentence
+ format.publisher.address output
+ format.edition output
+ }
+ { format.incoll.inproc.crossref output.nonnull
+ format.chapter.pages output
+ }
+ if$
+ format.pages "pages" output.check
+ new.block
+ format.url output
+ new.block
+ format.note output
+ fin.entry
+}
+FUNCTION {inproceedings}
+{ output.bibitem
+ format.authors "author" output.check
+ author format.key output
+ name.or.dash
+ format.date "year" output.check
+ date.block
+ format.title "title" output.check
+ new.block
+ crossref missing$
+ { format.in.ed.booktitle "booktitle" output.check
+ format.number.series output
+ new.sentence
+ publisher empty$
+ { format.organization.address output }
+ { organization "organization" bibinfo.check output
+ format.publisher.address output
+ }
+ if$
+ }
+ { format.incoll.inproc.crossref output.nonnull
+ }
+ if$
+ format.pages "pages" output.check
+ new.block
+ format.url output
+ new.block
+ format.note output
+ fin.entry
+}
+FUNCTION {conference} { inproceedings }
+FUNCTION {manual}
+{ output.bibitem
+ format.authors output
+ author format.key output
+ name.or.dash
+ format.date "year" output.check
+ date.block
+ format.btitle "title" output.check
+ organization address new.block.checkb
+ organization "organization" bibinfo.check output
+ address "address" bibinfo.check output
+ format.edition output
+ new.block
+ format.url output
+ new.block
+ format.note output
+ fin.entry
+}
+
+FUNCTION {mastersthesis}
+{ output.bibitem
+ format.authors "author" output.check
+ author format.key output
+ name.or.dash
+ format.date "year" output.check
+ date.block
+ format.btitle
+ "title" output.check
+ new.block
+ bbl.mthesis format.thesis.type output.nonnull
+ school "school" bibinfo.warn output
+ address "address" bibinfo.check output
+ new.block
+ format.url output
+ new.block
+ format.note output
+ fin.entry
+}
+
+FUNCTION {misc}
+{ output.bibitem
+ format.authors output
+ author format.key output
+ name.or.dash
+ format.date "year" output.check
+ date.block
+ format.title output
+ new.block
+ howpublished "howpublished" bibinfo.check output
+ new.block
+ format.url output
+ new.block
+ format.note output
+ fin.entry
+}
+FUNCTION {phdthesis}
+{ output.bibitem
+ format.authors "author" output.check
+ author format.key output
+ name.or.dash
+ format.date "year" output.check
+ date.block
+ format.btitle
+ "title" output.check
+ new.block
+ bbl.phdthesis format.thesis.type output.nonnull
+ school "school" bibinfo.warn output
+ address "address" bibinfo.check output
+ new.block
+ format.url output
+ new.block
+ format.note output
+ fin.entry
+}
+
+FUNCTION {presentation}
+{ output.bibitem
+ format.authors output
+ author format.key output
+ name.or.dash
+ new.block
+ format.title output
+ new.block
+ format.organization.address "organization and address" output.check
+ month "month" output.check
+ year "year" output.check
+ new.block
+ format.note output
+ new.sentence
+ type missing$ 'skip$
+ {"(" type capitalize * ")" * output}
+ if$
+ new.block
+ format.url output
+ fin.entry
+}
+
+FUNCTION {proceedings}
+{ output.bibitem
+ format.editors output
+ editor format.key output
+ name.or.dash
+ format.date "year" output.check
+ date.block
+ format.btitle "title" output.check
+ format.bvolume output
+ format.number.series output
+ new.sentence
+ publisher empty$
+ { format.organization.address output }
+ { organization "organization" bibinfo.check output
+ format.publisher.address output
+ }
+ if$
+ new.block
+ format.url output
+ new.block
+ format.note output
+ fin.entry
+}
+
+FUNCTION {techreport}
+{ output.bibitem
+ format.authors "author" output.check
+ author format.key output
+ name.or.dash
+ format.date "year" output.check
+ date.block
+ format.title
+ "title" output.check
+ new.block
+ format.tr.number output.nonnull
+ institution "institution" bibinfo.warn output
+ address "address" bibinfo.check output
+ new.block
+ format.url output
+ new.block
+ format.note output
+ fin.entry
+}
+
+FUNCTION {unpublished}
+{ output.bibitem
+ format.authors "author" output.check
+ author format.key output
+ name.or.dash
+ format.date "year" output.check
+ date.block
+ format.title "title" output.check
+ new.block
+ format.url output
+ new.block
+ format.note "note" output.check
+ fin.entry
+}
+
+FUNCTION {default.type} { misc }
+READ
+FUNCTION {sortify}
+{ purify$
+ "l" change.case$
+}
+INTEGERS { len }
+FUNCTION {chop.word}
+{ 's :=
+ 'len :=
+ s #1 len substring$ =
+ { s len #1 + global.max$ substring$ }
+ 's
+ if$
+}
+FUNCTION {format.lab.names}
+{'s :=
+ "" 't :=
+ #1 'nameptr :=
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ { s nameptr
+ "{vv~}{ll}" format.name$
+ 't :=
+ nameptr #1 >
+ {
+ nameptr #2 =
+ numnames #3 > and
+ { "others" 't :=
+ #1 'namesleft := }
+ 'skip$
+ if$
+ namesleft #1 >
+ { ", " * t * }
+ {
+ s nameptr "{ll}" format.name$ duplicate$ "others" =
+ { 't := }
+ { pop$ }
+ if$
+ t "others" =
+ {
+ " " * bbl.etal *
+ }
+ {
+ numnames #2 >
+ { "," * }
+ 'skip$
+ if$
+ bbl.and
+ space.word * t *
+ }
+ if$
+ }
+ if$
+ }
+ 't
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+}
+
+FUNCTION {author.key.label}
+{ author empty$
+ { key empty$
+ { cite$ #1 #3 substring$ }
+ 'key
+ if$
+ }
+ { author format.lab.names }
+ if$
+}
+
+FUNCTION {author.editor.key.label}
+{ author empty$
+ { editor empty$
+ { key empty$
+ { cite$ #1 #3 substring$ }
+ 'key
+ if$
+ }
+ { editor format.lab.names }
+ if$
+ }
+ { author format.lab.names }
+ if$
+}
+
+FUNCTION {editor.key.label}
+{ editor empty$
+ { key empty$
+ { cite$ #1 #3 substring$ }
+ 'key
+ if$
+ }
+ { editor format.lab.names }
+ if$
+}
+
+FUNCTION {calc.short.authors}
+{ type$ "book" =
+ type$ "inbook" =
+ or
+ 'author.editor.key.label
+ { type$ "proceedings" =
+ 'editor.key.label
+ 'author.key.label
+ if$
+ }
+ if$
+ 'short.list :=
+}
+
+FUNCTION {calc.label}
+{ calc.short.authors
+ short.list
+ "("
+ *
+ year duplicate$ empty$
+ short.list key field.or.null = or
+ { pop$ "" }
+ 'skip$
+ if$
+ *
+ 'label :=
+}
+
+FUNCTION {sort.format.names}
+{ 's :=
+ #1 'nameptr :=
+ ""
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ { s nameptr
+ "{vv{ } }{ll{ }}{ ff{ }}{ jj{ }}"
+ format.name$ 't :=
+ nameptr #1 >
+ {
+ " " *
+ namesleft #1 = t "others" = and
+ { "zzzzz" * }
+ { t sortify * }
+ if$
+ }
+ { t sortify * }
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+}
+
+FUNCTION {sort.format.title}
+{ 't :=
+ "A " #2
+ "An " #3
+ "The " #4 t chop.word
+ chop.word
+ chop.word
+ sortify
+ #1 global.max$ substring$
+}
+FUNCTION {author.sort}
+{ author empty$
+ { key empty$
+ { "to sort, need author or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { author sort.format.names }
+ if$
+}
+FUNCTION {author.editor.sort}
+{ author empty$
+ { editor empty$
+ { key empty$
+ { "to sort, need author, editor, or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { editor sort.format.names }
+ if$
+ }
+ { author sort.format.names }
+ if$
+}
+FUNCTION {editor.sort}
+{ editor empty$
+ { key empty$
+ { "to sort, need editor or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { editor sort.format.names }
+ if$
+}
+FUNCTION {presort}
+{ calc.label
+ label sortify
+ " "
+ *
+ type$ "book" =
+ type$ "inbook" =
+ or
+ 'author.editor.sort
+ { type$ "proceedings" =
+ 'editor.sort
+ 'author.sort
+ if$
+ }
+ if$
+ #1 entry.max$ substring$
+ 'sort.label :=
+ sort.label
+ *
+ " "
+ *
+ title field.or.null
+ sort.format.title
+ *
+ #1 entry.max$ substring$
+ 'sort.key$ :=
+}
+
+ITERATE {presort}
+SORT
+STRINGS { last.label next.extra }
+INTEGERS { last.extra.num number.label }
+FUNCTION {initialize.extra.label.stuff}
+{ #0 int.to.chr$ 'last.label :=
+ "" 'next.extra :=
+ #0 'last.extra.num :=
+ #0 'number.label :=
+}
+FUNCTION {forward.pass}
+{ last.label label =
+ { last.extra.num #1 + 'last.extra.num :=
+ last.extra.num int.to.chr$ 'extra.label :=
+ }
+ { "a" chr.to.int$ 'last.extra.num :=
+ "" 'extra.label :=
+ label 'last.label :=
+ }
+ if$
+ number.label #1 + 'number.label :=
+}
+FUNCTION {reverse.pass}
+{ next.extra "b" =
+ { "a" 'extra.label := }
+ 'skip$
+ if$
+ extra.label 'next.extra :=
+ extra.label
+ duplicate$ empty$
+ 'skip$
+ { "{\natexlab{" swap$ * "}}" * }
+ if$
+ 'extra.label :=
+ label extra.label * 'label :=
+}
+EXECUTE {initialize.extra.label.stuff}
+ITERATE {forward.pass}
+REVERSE {reverse.pass}
+FUNCTION {bib.sort.order}
+{ sort.label
+ " "
+ *
+ year field.or.null sortify
+ *
+ " "
+ *
+ title field.or.null
+ sort.format.title
+ *
+ #1 entry.max$ substring$
+ 'sort.key$ :=
+}
+ITERATE {bib.sort.order}
+SORT
+FUNCTION {begin.bib}
+{ preamble$ empty$
+ 'skip$
+ { preamble$ write$ newline$ }
+ if$
+ "\begin{thebibliography}{" number.label int.to.str$ * "}" *
+ write$ newline$
+ "\newcommand{\enquote}[1]{``#1''}"
+ write$ newline$
+ "\providecommand{\natexlab}[1]{#1}"
+ write$ newline$
+ "\providecommand{\url}[1]{\texttt{#1}}"
+ write$ newline$
+ "\providecommand{\urlprefix}{URL }"
+ write$ newline$
+}
+EXECUTE {begin.bib}
+EXECUTE {init.state.consts}
+ITERATE {call.type$}
+FUNCTION {end.bib}
+{ newline$
+ "\end{thebibliography}" write$ newline$
+}
+EXECUTE {end.bib}
+%% End of customized bst file
+%%
+%% End of file `jpe.bst'.
diff --git a/biblio/bibtex/contrib/economic/jrurstud.cls b/biblio/bibtex/contrib/economic/jrurstud.cls
new file mode 100644
index 0000000000..bcdd55efb5
--- /dev/null
+++ b/biblio/bibtex/contrib/economic/jrurstud.cls
@@ -0,0 +1,281 @@
+%%% LaTeX class for manuscripts submitted to the
+%%% Journal of Rural Studies (JRurStud)
+%%%
+%%% author: Arne Henningsen
+%%% version: 1.1 (18 November 2009)
+%%% license: LaTeX Project Public License
+%%%
+%%% Note: This is an unofficial style file that may not fully comply
+%%% with the JRurStud formatting instructions in every detail.
+%%% Please report any problems at
+%%% http://sourceforge.net/projects/economtex/
+%%% Further information is available at
+%%% http://economtex.wiki.sourceforge.net/
+%%%
+%%% This document class is based on the "scrartcl" class
+%%% from the KOMA script bundle.
+%%% Following additional packages are required:
+%%% amsmath, babel, endfloat, endnotes, geometry
+%%% ifthen, lmodern, natbib, setspace, stringstrings, textcomp, url
+%%%
+%%% The class provides the following options:
+%%% noendfloat - don't move floats to the end of the paper
+%%% noendnotes - don't use endnotes (use footnotes)
+%%% titlepage - create "first" title page with title, authors' names,
+%%% affiliations, and address of corresponding author
+%%% nosecondtitle - do not create "second" title page with (repeated) title
+%%%
+%%% This class selects the BibTeX style "elsart-harv.bst".
+%%% (see http://www.elsevier.com/wps/find/authorsview.authors/elsart)
+%%%
+%%% This class provides 4 new commands:
+%%% \affiliation specify affiliation(s) of the authors
+%%% \cauthormark mark the corresponding author (by an asterisk)
+%%% \cauthoraddress specify address of the corresponding author
+%%% \keywords specify some keywords (separated by semicolons)
+%%%
+%%% The Journal of Rural Studies requires that you use single quotes
+%%% you could do this with the ``csquotes'' package:
+%%% \usepackage{csquotes}
+%%% \MakeInnerQuote{<yourQuoteCharacter>}
+%%%
+%%% The manuscript submitted to JRurStud shouldn't include any figures.
+%%% If your paper contains any figures and you haven't removed/disabled
+%%% them in the LaTeX source, you can remove the pages showing these figures
+%%% from the PDF file. If you want to remove, say, pages 18 and 19 with
+%%% "pdftk" (PDF toolkit), you could execute
+%%% pdftk original.pdf cat 1-17 20-end output manuscript.pdf
+%%% While this needs some extra effort, it has the advantage (compared to
+%%% removing the figures in the LaTeX source) that references to figures
+%%% with \ref{} still work.
+%%%
+%%% Website of the "Journal of Rural Studies":
+%%% http://www.elsevier.com/locate/jrurstud/
+%%%
+
+\NeedsTeXFormat{LaTeX2e}
+\ProvidesClass{jrurstud}[2009/11/18 LaTeX class for the Journal of Rural Studies]
+
+% package for convenient if-then-else statements
+\RequirePackage{ifthen}
+
+% option to NOT place floats at the end
+\newif\if@useendfloat
+\@useendfloattrue
+\DeclareOption{noendfloat}{\@useendfloatfalse}
+
+% option to NOT use endnotes (but footnotes)
+\newif\if@useendnotes
+\@useendnotestrue
+\DeclareOption{noendnotes}{\@useendnotesfalse}
+
+% option to create a "first" title page
+\newif\if@maketitlepage
+\@maketitlepagefalse
+\DeclareOption{titlepage}{\@maketitlepagetrue}
+
+% option not to create a "second" title page
+\newif\if@makesecondtitle
+\@makesecondtitletrue
+\DeclareOption{nosecondtitle}{\@makesecondtitlefalse}
+
+% pass any options on to the scrartcl class and load this class with some options
+\DeclareOption*{\PassOptionsToClass{\CurrentOption}{scrartcl}}
+\ProcessOptions\relax
+\LoadClass[12pt,english,pointednumbers,tablecaptionabove]{scrartcl}
+% pointednumbers = add final dot after ordinary section numbers
+% tablecaptionabove = use \captionabove for tables
+
+% additional symbols
+\RequirePackage{textcomp}
+
+% page format, margins
+\RequirePackage{geometry}
+\geometry{a4paper, tmargin=2.5cm, bmargin=2.8cm, lmargin=2.8cm,
+ rmargin=2.8cm, headheight=0cm, headsep=0cm, footskip=1.2cm }
+
+% double spacing
+\RequirePackage{setspace}
+\doublespacing
+
+% spacing around formulas
+\AtBeginDocument{
+\setlength{\abovedisplayshortskip}{6pt}
+\setlength{\belowdisplayshortskip}{6pt}
+\setlength{\abovedisplayskip}{6pt}
+\setlength{\belowdisplayskip}{6pt}
+\allowdisplaybreaks
+}
+
+% spacing around captions and floats
+\setlength{\abovecaptionskip}{6pt}
+\setlength{\belowcaptionskip}{3pt}
+\setlength{\floatsep}{0pt}
+\setlength{\textfloatsep}{20pt}
+\setlength{\intextsep}{5pt}
+
+% font family: latin modern
+\RequirePackage{lmodern}
+
+% section headers
+\setkomafont{section}{\bfseries}
+\setkomafont{subsection}{\normalfont\itshape}
+\setkomafont{subsubsection}{\normalfont}
+
+% amsmath
+\RequirePackage{amsmath}
+% for compatibility with ajae.cls
+\newcommand{\veclatin}[1]{#1}
+\newcommand{\matlatin}[1]{#1}
+\newcommand{\vecgreek}[1]{#1}
+\newcommand{\matgreek}[1]{#1}
+
+% font for URLs
+\RequirePackage{url}
+\def\UrlFont{\rmfamily}
+
+% citations and bibliography
+\RequirePackage[authoryear]{natbib}
+\setlength{\bibsep}{0pt}
+\bibliographystyle{elsart-harv}
+
+% captions of figures and tables
+\setcapwidth[l]{\textwidth}
+\setcapindent{0pt}
+\setkomafont{captionlabel}{\normalsize\normalfont\bfseries}
+\setkomafont{caption}{\normalsize\normalfont\bfseries}
+\renewcommand{\captionformat}{.\ }
+
+% titlepage without author and date
+\newcommand{\affiliation}[1]{\newcommand{\@affiliation}{#1}}
+\newcommand{\cauthoraddress}[1]{\newcommand{\@cauthoraddress}{#1}}
+\newcommand{\cauthormark}{\textsuperscript{*}}
+\renewcommand{\maketitle}{
+ \if@maketitlepage
+ \thispagestyle{empty}
+ \vspace*{12mm}
+ \begin{center}
+ \begin{spacing}{1.5}
+ \LARGE{\textbf{\@title}}%
+ \end{spacing}
+ \ifthenelse{ \isundefined\@author }{
+ \ClassWarning{apecon}{No author(s) specified.
+ Please specify with command \protect\author}
+ }{
+ \begin{large}
+ \textbf{\@author}\\
+ \end{large}
+ \vspace*{3mm}
+ }
+ \begin{spacing}{1.1}
+ \ifthenelse{ \isundefined\@affiliation }{
+ \ClassWarning{apecon}{No affiliation(s) specified.
+ Please specify with command \protect\affiliation}
+ }{
+ \textit{\@affiliation}\\
+ }
+ \vspace*{2cm}
+ \textbf{\cauthormark{}~Corresponding author}.\\
+ \ifthenelse{ \isundefined\@cauthoraddress }{
+ \ClassWarningNoLine{jrurstud}{No address of the corresponding authors
+ is specified. Please specify with command \protect\cauthoraddress}
+ }{
+ \@cauthoraddress\\
+ }
+ \end{spacing}
+ \vspace*{5mm}
+ \end{center}
+ \clearpage
+ \fi
+ \if@makesecondtitle
+ \begin{center}
+ \begin{spacing}{1.5}
+ \LARGE{\textbf{\@title}}%
+ \end{spacing}
+ \end{center}
+ \fi
+}
+
+% abstract, keywords, JEL classification
+\newcommand{\keywords}[1]{\newcommand{\@keywords}{#1}}
+\newcommand{\jelclass}[1]{\newcommand{\@jelclass}{#1}}
+\renewenvironment{abstract}{%
+ \hrule
+ \vspace*{5mm}
+ \begin{spacing}{1.5}
+ \noindent
+ \textbf{Abstract}\\
+ \indent
+}{%
+ \ifthenelse{ \isundefined\@keywords }{
+ \ClassWarningNoLine{erae}{No keywords specified.
+ Please use the command \protect\keywords}
+ }{
+ \vspace*{5mm}\\ \noindent
+ \textit{Keywords:} \@keywords%
+ }
+ \vspace*{5mm}
+ \end{spacing}
+ \hrule
+ \clearpage
+}
+
+% use babel package and set language to english
+\RequirePackage[english]{babel}
+
+% avoid clubs and widows
+\clubpenalty=10000
+\widowpenalty=10000
+% \displaywidowpenalty=10000
+
+% increase stretchability of the spaces (avoid overful hboxes)
+\setlength{\emergencystretch}{3em}
+
+% move floats to the end of the paper
+\if@useendfloat
+ \RequirePackage[noheads,tablesfirst]{endfloat}
+ \AtBeginDelayedFloats{%
+ \pagestyle{empty}
+ }
+ \RequirePackage{stringstrings}
+ \renewcommand{\@makecaption}[2]{%
+ \testmatchingchar{#1}{1}{T}
+ \ifmatchingchar
+ \hfill \thetable\\
+ \vspace*{3cm}
+ \fi
+ }
+ \renewcommand*{\l@figure}[2]{%
+ \setlength\@tempdima{2.3em}%
+ \noindent\hspace*{1.5em}#1\hfil\newline
+ }
+ \let\l@table\l@figure
+\fi
+
+%% use endnotes in place of footnotes
+\if@useendnotes
+ \RequirePackage{endnotes}
+ \let\footnote=\endnote
+ \newcommand{\listofendnotes}{
+ \begingroup
+ \parindent 0pt
+ \parskip 0ex
+ \def\enotesize{\normalsize}
+ \theendnotes
+ \endgroup
+ }
+ % use normalsize numbers (copied from endnote.sty and modified thereafter)
+ \def\enoteformat{\rightskip\z@ \leftskip\z@ \parindent=0em
+ \leavevmode\llap{\theenmark. }}
+ \AtEndDocument{%
+ \IfFileExists{\jobname.ent}{%
+ \clearpage
+ \pagestyle{empty}
+ \listofendnotes
+ }{}
+ }
+\fi
+
+% for compatibility with erae.cls
+\newcommand{\citetPage}[2]{\citeauthor{#2} (\citeyear{#2}, p.~#1)}
+\newcommand{\citepPage}[2]{\citetext{\citealp{#2}, p.~#1}}
diff --git a/biblio/bibtex/contrib/economic/jss2.bst b/biblio/bibtex/contrib/economic/jss2.bst
new file mode 100644
index 0000000000..91a710f645
--- /dev/null
+++ b/biblio/bibtex/contrib/economic/jss2.bst
@@ -0,0 +1,1647 @@
+%%
+%% This is file `jss.bst',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% merlin.mbs (with options: `ay,nat,nm-rvx,keyxyr,dt-beg,yr-par,note-yr,tit-qq,bt-qq,atit-u,trnum-it,vol-bf,volp-com,num-xser,isbn,issn,edpar,pp,ed,xedn,xand,etal-it,revdata,eprint,url,url-blk,doi,nfss')
+%% ----------------------------------------
+%% *** Journal of Statistical Software ***
+%%
+%% Copyright 1994-2004 Patrick W Daly
+ % ===============================================================
+ % IMPORTANT NOTICE:
+ % This bibliographic style (bst) file has been generated from one or
+ % more master bibliographic style (mbs) files, listed above.
+ %
+ % This generated file can be redistributed and/or modified under the terms
+ % of the LaTeX Project Public License Distributed from CTAN
+ % archives in directory macros/latex/base/lppl.txt; either
+ % version 1 of the License, or any later version.
+ % ===============================================================
+ % Name and version information of the main mbs file:
+ % \ProvidesFile{merlin.mbs}[2004/02/09 4.13 (PWD, AO, DPC)]
+ % For use with BibTeX version 0.99a or later
+ %-------------------------------------------------------------------
+ % This bibliography style file is intended for texts in ENGLISH
+ % This is an author-year citation style bibliography. As such, it is
+ % non-standard LaTeX, and requires a special package file to function properly.
+ % Such a package is natbib.sty by Patrick W. Daly
+ % The form of the \bibitem entries is
+ % \bibitem[Jones et al.(1990)]{key}...
+ % \bibitem[Jones et al.(1990)Jones, Baker, and Smith]{key}...
+ % The essential feature is that the label (the part in brackets) consists
+ % of the author names, as they should appear in the citation, with the year
+ % in parentheses following. There must be no space before the opening
+ % parenthesis!
+ % With natbib v5.3, a full list of authors may also follow the year.
+ % In natbib.sty, it is possible to define the type of enclosures that is
+ % really wanted (brackets or parentheses), but in either case, there must
+ % be parentheses in the label.
+ % The \cite command functions as follows:
+ % \citet{key} ==>> Jones et al. (1990)
+ % \citet*{key} ==>> Jones, Baker, and Smith (1990)
+ % \citep{key} ==>> (Jones et al., 1990)
+ % \citep*{key} ==>> (Jones, Baker, and Smith, 1990)
+ % \citep[chap. 2]{key} ==>> (Jones et al., 1990, chap. 2)
+ % \citep[e.g.][]{key} ==>> (e.g. Jones et al., 1990)
+ % \citep[e.g.][p. 32]{key} ==>> (e.g. Jones et al., p. 32)
+ % \citeauthor{key} ==>> Jones et al.
+ % \citeauthor*{key} ==>> Jones, Baker, and Smith
+ % \citeyear{key} ==>> 1990
+ %---------------------------------------------------------------------
+
+ENTRY
+ { address
+ archive
+ author
+ booktitle
+ chapter
+ collaboration
+ doi
+ edition
+ editor
+ eid
+ eprint
+ howpublished
+ institution
+ isbn
+ issn
+ journal
+ key
+ month
+ note
+ number
+ numpages
+ organization
+ pages
+ publisher
+ school
+ series
+ title
+ type
+ url
+ volume
+ year
+ }
+ {}
+ { label extra.label sort.label short.list }
+INTEGERS { output.state before.all mid.sentence after.sentence after.block }
+FUNCTION {init.state.consts}
+{ #0 'before.all :=
+ #1 'mid.sentence :=
+ #2 'after.sentence :=
+ #3 'after.block :=
+}
+STRINGS { s t}
+FUNCTION {output.nonnull}
+{ 's :=
+ output.state mid.sentence =
+ { ", " * write$ }
+ { output.state after.block =
+ { add.period$ write$
+ newline$
+ "\newblock " write$
+ }
+ { output.state before.all =
+ 'write$
+ { add.period$ " " * write$ }
+ if$
+ }
+ if$
+ mid.sentence 'output.state :=
+ }
+ if$
+ s
+}
+FUNCTION {output}
+{ duplicate$ empty$
+ 'pop$
+ 'output.nonnull
+ if$
+}
+FUNCTION {output.check}
+{ 't :=
+ duplicate$ empty$
+ { pop$ "empty " t * " in " * cite$ * warning$ }
+ 'output.nonnull
+ if$
+}
+FUNCTION {fin.entry}
+{ add.period$
+ write$
+ newline$
+}
+
+FUNCTION {new.block}
+{ output.state before.all =
+ 'skip$
+ { after.block 'output.state := }
+ if$
+}
+FUNCTION {new.sentence}
+{ output.state after.block =
+ 'skip$
+ { output.state before.all =
+ 'skip$
+ { after.sentence 'output.state := }
+ if$
+ }
+ if$
+}
+FUNCTION {add.blank}
+{ " " * before.all 'output.state :=
+}
+
+FUNCTION {date.block}
+{
+ new.block
+}
+
+FUNCTION {not}
+{ { #0 }
+ { #1 }
+ if$
+}
+FUNCTION {and}
+{ 'skip$
+ { pop$ #0 }
+ if$
+}
+FUNCTION {or}
+{ { pop$ #1 }
+ 'skip$
+ if$
+}
+FUNCTION {non.stop}
+{ duplicate$
+ "}" * add.period$
+ #-1 #1 substring$ "." =
+}
+
+STRINGS {z}
+FUNCTION {remove.dots}
+{ 'z :=
+ ""
+ { z empty$ not }
+ { z #1 #1 substring$
+ z #2 global.max$ substring$ 'z :=
+ duplicate$ "." = 'pop$
+ { * }
+ if$
+ }
+ while$
+}
+FUNCTION {new.block.checkb}
+{ empty$
+ swap$ empty$
+ and
+ 'skip$
+ 'new.block
+ if$
+}
+FUNCTION {field.or.null}
+{ duplicate$ empty$
+ { pop$ "" }
+ 'skip$
+ if$
+}
+FUNCTION {emphasize}
+{ duplicate$ empty$
+ { pop$ "" }
+ { "\emph{" swap$ * "}" * }
+ if$
+}
+FUNCTION {bolden}
+{ duplicate$ empty$
+ { pop$ "" }
+ { "\textbf{" swap$ * "}" * }
+ if$
+}
+FUNCTION {tie.or.space.prefix}
+{ duplicate$ text.length$ #3 <
+ { "~" }
+ { " " }
+ if$
+ swap$
+}
+
+FUNCTION {capitalize}
+{ "u" change.case$ "t" change.case$ }
+
+FUNCTION {space.word}
+{ " " swap$ * " " * }
+ % Here are the language-specific definitions for explicit words.
+ % Each function has a name bbl.xxx where xxx is the English word.
+ % The language selected here is ENGLISH
+FUNCTION {bbl.and}
+{ "and"}
+
+FUNCTION {bbl.etal}
+{ "et~al." }
+
+FUNCTION {bbl.editors}
+{ "eds." }
+
+FUNCTION {bbl.editor}
+{ "ed." }
+
+FUNCTION {bbl.edby}
+{ "edited by" }
+
+FUNCTION {bbl.edition}
+{ "edition" }
+
+FUNCTION {bbl.volume}
+{ "volume" }
+
+FUNCTION {bbl.of}
+{ "of" }
+
+FUNCTION {bbl.number}
+{ "number" }
+
+FUNCTION {bbl.nr}
+{ "no." }
+
+FUNCTION {bbl.in}
+{ "in" }
+
+FUNCTION {bbl.pages}
+{ "pp." }
+
+FUNCTION {bbl.page}
+{ "p." }
+
+FUNCTION {bbl.eidpp}
+{ "pages" }
+
+FUNCTION {bbl.chapter}
+{ "chapter" }
+
+FUNCTION {bbl.techrep}
+{ "Technical Report" }
+
+FUNCTION {bbl.mthesis}
+{ "Master's thesis" }
+
+FUNCTION {bbl.phdthesis}
+{ "Ph.D. thesis" }
+
+MACRO {jan} {"January"}
+
+MACRO {feb} {"February"}
+
+MACRO {mar} {"March"}
+
+MACRO {apr} {"April"}
+
+MACRO {may} {"May"}
+
+MACRO {jun} {"June"}
+
+MACRO {jul} {"July"}
+
+MACRO {aug} {"August"}
+
+MACRO {sep} {"September"}
+
+MACRO {oct} {"October"}
+
+MACRO {nov} {"November"}
+
+MACRO {dec} {"December"}
+
+MACRO {acmcs} {"ACM Computing Surveys"}
+
+MACRO {acta} {"Acta Informatica"}
+
+MACRO {cacm} {"Communications of the ACM"}
+
+MACRO {ibmjrd} {"IBM Journal of Research and Development"}
+
+MACRO {ibmsj} {"IBM Systems Journal"}
+
+MACRO {ieeese} {"IEEE Transactions on Software Engineering"}
+
+MACRO {ieeetc} {"IEEE Transactions on Computers"}
+
+MACRO {ieeetcad}
+ {"IEEE Transactions on Computer-Aided Design of Integrated Circuits"}
+
+MACRO {ipl} {"Information Processing Letters"}
+
+MACRO {jacm} {"Journal of the ACM"}
+
+MACRO {jcss} {"Journal of Computer and System Sciences"}
+
+MACRO {scp} {"Science of Computer Programming"}
+
+MACRO {sicomp} {"SIAM Journal on Computing"}
+
+MACRO {tocs} {"ACM Transactions on Computer Systems"}
+
+MACRO {tods} {"ACM Transactions on Database Systems"}
+
+MACRO {tog} {"ACM Transactions on Graphics"}
+
+MACRO {toms} {"ACM Transactions on Mathematical Software"}
+
+MACRO {toois} {"ACM Transactions on Office Information Systems"}
+
+MACRO {toplas} {"ACM Transactions on Programming Languages and Systems"}
+
+MACRO {tcs} {"Theoretical Computer Science"}
+FUNCTION {bibinfo.check}
+{ swap$
+ duplicate$ missing$
+ {
+ pop$ pop$
+ ""
+ }
+ { duplicate$ empty$
+ {
+ swap$ pop$
+ }
+ { swap$
+ pop$
+ }
+ if$
+ }
+ if$
+}
+FUNCTION {bibinfo.warn}
+{ swap$
+ duplicate$ missing$
+ {
+ swap$ "missing " swap$ * " in " * cite$ * warning$ pop$
+ ""
+ }
+ { duplicate$ empty$
+ {
+ swap$ "empty " swap$ * " in " * cite$ * warning$
+ }
+ { swap$
+ pop$
+ }
+ if$
+ }
+ if$
+}
+FUNCTION {format.eprint}
+{ eprint duplicate$ empty$
+ 'skip$
+ { "\eprint"
+ archive empty$
+ 'skip$
+ { "[" * archive * "]" * }
+ if$
+ "{" * swap$ * "}" *
+ }
+ if$
+}
+FUNCTION {format.url}
+{ url empty$
+ { "" }
+ { "\urlprefix\url{" url * "}" * }
+ if$
+}
+
+STRINGS { bibinfo}
+INTEGERS { nameptr namesleft numnames }
+
+FUNCTION {format.names}
+{ 'bibinfo :=
+ duplicate$ empty$ 'skip$ {
+ 's :=
+ "" 't :=
+ #1 'nameptr :=
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ { s nameptr
+ "{vv~}{ll}{ jj}{ f{}}"
+ format.name$
+ remove.dots
+ bibinfo bibinfo.check
+ 't :=
+ nameptr #1 >
+ {
+ namesleft #1 >
+ { ", " * t * }
+ {
+ "," *
+ s nameptr "{ll}" format.name$ duplicate$ "others" =
+ { 't := }
+ { pop$ }
+ if$
+ t "others" =
+ {
+ " " * bbl.etal emphasize *
+ }
+ { " " * t * }
+ if$
+ }
+ if$
+ }
+ 't
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+ } if$
+}
+FUNCTION {format.names.ed}
+{
+ 'bibinfo :=
+ duplicate$ empty$ 'skip$ {
+ 's :=
+ "" 't :=
+ #1 'nameptr :=
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ { s nameptr
+ "{f{}~}{vv~}{ll}{ jj}"
+ format.name$
+ remove.dots
+ bibinfo bibinfo.check
+ 't :=
+ nameptr #1 >
+ {
+ namesleft #1 >
+ { ", " * t * }
+ {
+ "," *
+ s nameptr "{ll}" format.name$ duplicate$ "others" =
+ { 't := }
+ { pop$ }
+ if$
+ t "others" =
+ {
+
+ " " * bbl.etal emphasize *
+ }
+ { " " * t * }
+ if$
+ }
+ if$
+ }
+ 't
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+ } if$
+}
+FUNCTION {format.key}
+{ empty$
+ { key field.or.null }
+ { "" }
+ if$
+}
+
+FUNCTION {format.authors}
+{ author "author" format.names
+ duplicate$ empty$ 'skip$
+ { collaboration "collaboration" bibinfo.check
+ duplicate$ empty$ 'skip$
+ { " (" swap$ * ")" * }
+ if$
+ *
+ }
+ if$
+}
+FUNCTION {get.bbl.editor}
+{ editor num.names$ #1 > 'bbl.editors 'bbl.editor if$ }
+
+FUNCTION {format.editors}
+{ editor "editor" format.names duplicate$ empty$ 'skip$
+ {
+ " " *
+ get.bbl.editor
+ "(" swap$ * ")" *
+ *
+ }
+ if$
+}
+FUNCTION {format.isbn}
+{ isbn "isbn" bibinfo.check
+ duplicate$ empty$ 'skip$
+ {
+ new.block
+ "ISBN " swap$ *
+ }
+ if$
+}
+
+FUNCTION {format.issn}
+{ issn "issn" bibinfo.check
+ duplicate$ empty$ 'skip$
+ {
+ new.block
+ "ISSN " swap$ *
+ }
+ if$
+}
+
+FUNCTION {format.doi}
+{ doi "doi" bibinfo.check
+ duplicate$ empty$ 'skip$
+ {
+ new.block
+ "\doi{" swap$ * "}" *
+ }
+ if$
+}
+FUNCTION {format.note}
+{
+ note empty$
+ { "" }
+ { note #1 #1 substring$
+ duplicate$ "{" =
+ 'skip$
+ { output.state mid.sentence =
+ { "l" }
+ { "u" }
+ if$
+ change.case$
+ }
+ if$
+ note #2 global.max$ substring$ * "note" bibinfo.check
+ }
+ if$
+}
+
+FUNCTION {format.title}
+{ title
+ "title" bibinfo.check
+ duplicate$ empty$ 'skip$
+ {
+ "\bibenquote{" swap$ *
+ add.period$ "}" *
+ }
+ if$
+}
+FUNCTION {end.quote.btitle}
+{ booktitle empty$
+ 'skip$
+ { before.all 'output.state := }
+ if$
+}
+FUNCTION {format.full.names}
+{'s :=
+ "" 't :=
+ #1 'nameptr :=
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ { s nameptr
+ "{vv~}{ll}" format.name$
+ 't :=
+ nameptr #1 >
+ {
+ namesleft #1 >
+ { ", " * t * }
+ {
+ s nameptr "{ll}" format.name$ duplicate$ "others" =
+ { 't := }
+ { pop$ }
+ if$
+ t "others" =
+ {
+ " " * bbl.etal emphasize *
+ }
+ {
+ numnames #2 >
+ { "," * }
+ 'skip$
+ if$
+ bbl.and
+ space.word * t *
+ }
+ if$
+ }
+ if$
+ }
+ 't
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+}
+
+FUNCTION {author.editor.key.full}
+{ author empty$
+ { editor empty$
+ { key empty$
+ { cite$ #1 #3 substring$ }
+ 'key
+ if$
+ }
+ { editor format.full.names }
+ if$
+ }
+ { author format.full.names }
+ if$
+}
+
+FUNCTION {author.key.full}
+{ author empty$
+ { key empty$
+ { cite$ #1 #3 substring$ }
+ 'key
+ if$
+ }
+ { author format.full.names }
+ if$
+}
+
+FUNCTION {editor.key.full}
+{ editor empty$
+ { key empty$
+ { cite$ #1 #3 substring$ }
+ 'key
+ if$
+ }
+ { editor format.full.names }
+ if$
+}
+
+FUNCTION {make.full.names}
+{ type$ "book" =
+ type$ "inbook" =
+ or
+ 'author.editor.key.full
+ { type$ "proceedings" =
+ 'editor.key.full
+ 'author.key.full
+ if$
+ }
+ if$
+}
+
+FUNCTION {output.bibitem}
+{ newline$
+ "\bibitem[{" write$
+ label write$
+ ")" make.full.names duplicate$ short.list =
+ { pop$ }
+ { * }
+ if$
+ "}]{" * write$
+ cite$ write$
+ "}" write$
+ newline$
+ ""
+ before.all 'output.state :=
+}
+
+FUNCTION {n.dashify}
+{
+ 't :=
+ ""
+ { t empty$ not }
+ { t #1 #1 substring$ "-" =
+ { t #1 #2 substring$ "--" = not
+ { "--" *
+ t #2 global.max$ substring$ 't :=
+ }
+ { { t #1 #1 substring$ "-" = }
+ { "-" *
+ t #2 global.max$ substring$ 't :=
+ }
+ while$
+ }
+ if$
+ }
+ { t #1 #1 substring$ *
+ t #2 global.max$ substring$ 't :=
+ }
+ if$
+ }
+ while$
+}
+
+FUNCTION {word.in}
+{ bbl.in capitalize
+ " " * }
+
+FUNCTION {format.date}
+{ year "year" bibinfo.check duplicate$ empty$
+ {
+ "empty year in " cite$ * "; set to ????" * warning$
+ pop$ "????"
+ }
+ 'skip$
+ if$
+ extra.label *
+ before.all 'output.state :=
+ " (" swap$ * ")" *
+}
+FUNCTION {format.btitle}
+{ title "title" bibinfo.check
+ duplicate$ empty$ 'skip$
+ {
+ emphasize
+ }
+ if$
+}
+FUNCTION {either.or.check}
+{ empty$
+ 'pop$
+ { "can't use both " swap$ * " fields in " * cite$ * warning$ }
+ if$
+}
+FUNCTION {format.bvolume}
+{ volume empty$
+ { "" }
+ { bbl.volume volume tie.or.space.prefix
+ "volume" bibinfo.check * *
+ series "series" bibinfo.check
+ duplicate$ empty$ 'pop$
+ { swap$ bbl.of space.word * swap$
+ emphasize * }
+ if$
+ "volume and number" number either.or.check
+ }
+ if$
+}
+FUNCTION {format.number.series}
+{ volume empty$
+ { number empty$
+ { series field.or.null }
+ { series empty$
+ { number "number" bibinfo.check }
+ { output.state mid.sentence =
+ { bbl.number }
+ { bbl.number capitalize }
+ if$
+ number tie.or.space.prefix "number" bibinfo.check * *
+ bbl.in space.word *
+ series "series" bibinfo.check *
+ }
+ if$
+ }
+ if$
+ }
+ { "" }
+ if$
+}
+
+FUNCTION {format.edition}
+{ edition duplicate$ empty$ 'skip$
+ {
+ output.state mid.sentence =
+ { "l" }
+ { "t" }
+ if$ change.case$
+ "edition" bibinfo.check
+ " " * bbl.edition *
+ }
+ if$
+}
+INTEGERS { multiresult }
+FUNCTION {multi.page.check}
+{ 't :=
+ #0 'multiresult :=
+ { multiresult not
+ t empty$ not
+ and
+ }
+ { t #1 #1 substring$
+ duplicate$ "-" =
+ swap$ duplicate$ "," =
+ swap$ "+" =
+ or or
+ { #1 'multiresult := }
+ { t #2 global.max$ substring$ 't := }
+ if$
+ }
+ while$
+ multiresult
+}
+FUNCTION {format.pages}
+{ pages duplicate$ empty$ 'skip$
+ { duplicate$ multi.page.check
+ {
+ bbl.pages swap$
+ n.dashify
+ }
+ {
+ bbl.page swap$
+ }
+ if$
+ tie.or.space.prefix
+ "pages" bibinfo.check
+ * *
+ }
+ if$
+}
+FUNCTION {format.journal.pages}
+{ pages duplicate$ empty$ 'pop$
+ { swap$ duplicate$ empty$
+ { pop$ pop$ format.pages }
+ {
+ ", " *
+ swap$
+ n.dashify
+ "pages" bibinfo.check
+ *
+ }
+ if$
+ }
+ if$
+}
+FUNCTION {format.journal.eid}
+{ eid "eid" bibinfo.check
+ duplicate$ empty$ 'pop$
+ { swap$ duplicate$ empty$ 'skip$
+ {
+ ", " *
+ }
+ if$
+ swap$ *
+ numpages empty$ 'skip$
+ { bbl.eidpp numpages tie.or.space.prefix
+ "numpages" bibinfo.check * *
+ " (" swap$ * ")" * *
+ }
+ if$
+ }
+ if$
+}
+FUNCTION {format.vol.num.pages}
+{ volume field.or.null
+ duplicate$ empty$ 'skip$
+ {
+ "volume" bibinfo.check
+ }
+ if$
+ bolden
+ number "number" bibinfo.check duplicate$ empty$ 'skip$
+ {
+ swap$ duplicate$ empty$
+ { "there's a number but no volume in " cite$ * warning$ }
+ 'skip$
+ if$
+ swap$
+ "(" swap$ * ")" *
+ }
+ if$ *
+ eid empty$
+ { format.journal.pages }
+ { format.journal.eid }
+ if$
+}
+
+FUNCTION {format.chapter.pages}
+{ chapter empty$
+ 'format.pages
+ { type empty$
+ { bbl.chapter }
+ { type "l" change.case$
+ "type" bibinfo.check
+ }
+ if$
+ chapter tie.or.space.prefix
+ "chapter" bibinfo.check
+ * *
+ pages empty$
+ 'skip$
+ { ", " * format.pages * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {bt.enquote}
+{ duplicate$ empty$ 'skip$
+ { "\bibenquote{" swap$ *
+ non.stop
+ { ",} " * }
+ { "}, " * }
+ if$
+ }
+ if$
+}
+FUNCTION {format.booktitle}
+{
+ booktitle "booktitle" bibinfo.check
+ bt.enquote
+}
+FUNCTION {format.in.ed.booktitle}
+{ format.booktitle duplicate$ empty$ 'skip$
+ {
+ editor "editor" format.names.ed duplicate$ empty$ 'pop$
+ {
+ " " *
+ get.bbl.editor
+ "(" swap$ * "), " *
+ * swap$
+ * }
+ if$
+ word.in swap$ *
+ }
+ if$
+}
+FUNCTION {format.thesis.type}
+{ type duplicate$ empty$
+ 'pop$
+ { swap$ pop$
+ "t" change.case$ "type" bibinfo.check
+ }
+ if$
+}
+FUNCTION {format.tr.number}
+{ number "number" bibinfo.check
+ type duplicate$ empty$
+ { pop$ bbl.techrep }
+ 'skip$
+ if$
+ "type" bibinfo.check
+ swap$ duplicate$ empty$
+ { pop$ "t" change.case$ }
+ { tie.or.space.prefix * * }
+ if$
+}
+FUNCTION {format.article.crossref}
+{
+ word.in
+ " \cite{" * crossref * "}" *
+}
+FUNCTION {format.book.crossref}
+{ volume duplicate$ empty$
+ { "empty volume in " cite$ * "'s crossref of " * crossref * warning$
+ pop$ word.in
+ }
+ { bbl.volume
+ capitalize
+ swap$ tie.or.space.prefix "volume" bibinfo.check * * bbl.of space.word *
+ }
+ if$
+ " \cite{" * crossref * "}" *
+}
+FUNCTION {format.incoll.inproc.crossref}
+{
+ word.in
+ " \cite{" * crossref * "}" *
+}
+FUNCTION {format.org.or.pub}
+{ 't :=
+ ""
+ address empty$ t empty$ and
+ 'skip$
+ {
+ t empty$
+ { address "address" bibinfo.check *
+ }
+ { t *
+ address empty$
+ 'skip$
+ { ", " * address "address" bibinfo.check * }
+ if$
+ }
+ if$
+ }
+ if$
+}
+FUNCTION {format.publisher.address}
+{ publisher "publisher" bibinfo.warn format.org.or.pub
+}
+
+FUNCTION {format.organization.address}
+{ organization "organization" bibinfo.check format.org.or.pub
+}
+
+FUNCTION {article}
+{ output.bibitem
+ format.authors "author" output.check
+ author format.key output
+ format.date "year" output.check
+ date.block
+ format.title "title" output.check
+ new.block
+ crossref missing$
+ {
+ journal
+ "journal" bibinfo.check
+ emphasize
+ "journal" output.check
+ format.vol.num.pages output
+ }
+ { format.article.crossref output.nonnull
+ format.pages output
+ }
+ if$
+ format.issn output
+ format.doi output
+ new.block
+ format.note output
+ format.eprint output
+ format.url output
+ fin.entry
+}
+FUNCTION {book}
+{ output.bibitem
+ author empty$
+ { format.editors "author and editor" output.check
+ editor format.key output
+ }
+ { format.authors output.nonnull
+ crossref missing$
+ { "author and editor" editor either.or.check }
+ 'skip$
+ if$
+ }
+ if$
+ format.date "year" output.check
+ date.block
+ format.btitle "title" output.check
+ crossref missing$
+ { format.bvolume output
+ new.block
+ format.number.series output
+ new.sentence
+ format.publisher.address output
+ }
+ {
+ new.block
+ format.book.crossref output.nonnull
+ }
+ if$
+ format.edition output
+ format.isbn output
+ format.doi output
+ new.block
+ format.note output
+ format.eprint output
+ format.url output
+ fin.entry
+}
+FUNCTION {booklet}
+{ output.bibitem
+ format.authors output
+ author format.key output
+ format.date "year" output.check
+ date.block
+ format.title "title" output.check
+ new.block
+ howpublished "howpublished" bibinfo.check output
+ address "address" bibinfo.check output
+ format.isbn output
+ format.doi output
+ new.block
+ format.note output
+ format.eprint output
+ format.url output
+ fin.entry
+}
+
+FUNCTION {inbook}
+{ output.bibitem
+ author empty$
+ { format.editors "author and editor" output.check
+ editor format.key output
+ }
+ { format.authors output.nonnull
+ crossref missing$
+ { "author and editor" editor either.or.check }
+ 'skip$
+ if$
+ }
+ if$
+ format.date "year" output.check
+ date.block
+ format.btitle "title" output.check
+ crossref missing$
+ {
+ format.bvolume output
+ format.chapter.pages "chapter and pages" output.check
+ new.block
+ format.number.series output
+ new.sentence
+ format.publisher.address output
+ }
+ {
+ format.chapter.pages "chapter and pages" output.check
+ new.block
+ format.book.crossref output.nonnull
+ }
+ if$
+ format.edition output
+ crossref missing$
+ { format.isbn output }
+ 'skip$
+ if$
+ format.doi output
+ new.block
+ format.note output
+ format.eprint output
+ format.url output
+ fin.entry
+}
+
+FUNCTION {incollection}
+{ output.bibitem
+ format.authors "author" output.check
+ author format.key output
+ format.date "year" output.check
+ date.block
+ format.title "title" output.check
+ new.block
+ crossref missing$
+ { format.in.ed.booktitle "booktitle" output.check
+ end.quote.btitle
+ format.bvolume output
+ format.number.series output
+ format.chapter.pages output
+ new.sentence
+ format.publisher.address output
+ format.edition output
+ format.isbn output
+ }
+ { format.incoll.inproc.crossref output.nonnull
+ format.chapter.pages output
+ }
+ if$
+ format.doi output
+ new.block
+ format.note output
+ format.eprint output
+ format.url output
+ fin.entry
+}
+FUNCTION {inproceedings}
+{ output.bibitem
+ format.authors "author" output.check
+ author format.key output
+ format.date "year" output.check
+ date.block
+ format.title "title" output.check
+ new.block
+ crossref missing$
+ { format.in.ed.booktitle "booktitle" output.check
+ end.quote.btitle
+ format.bvolume output
+ format.number.series output
+ format.pages output
+ new.sentence
+ publisher empty$
+ { format.organization.address output }
+ { organization "organization" bibinfo.check output
+ format.publisher.address output
+ }
+ if$
+ format.isbn output
+ format.issn output
+ }
+ { format.incoll.inproc.crossref output.nonnull
+ format.pages output
+ }
+ if$
+ format.doi output
+ new.block
+ format.note output
+ format.eprint output
+ format.url output
+ fin.entry
+}
+FUNCTION {conference} { inproceedings }
+FUNCTION {manual}
+{ output.bibitem
+ format.authors output
+ author format.key output
+ format.date "year" output.check
+ date.block
+ format.btitle "title" output.check
+ organization address new.block.checkb
+ organization "organization" bibinfo.check output
+ address "address" bibinfo.check output
+ format.edition output
+ format.doi output
+ new.block
+ format.note output
+ format.eprint output
+ format.url output
+ fin.entry
+}
+
+FUNCTION {mastersthesis}
+{ output.bibitem
+ format.authors "author" output.check
+ author format.key output
+ format.date "year" output.check
+ date.block
+ format.btitle
+ "title" output.check
+ new.block
+ bbl.mthesis format.thesis.type output.nonnull
+ school "school" bibinfo.warn output
+ address "address" bibinfo.check output
+ format.doi output
+ new.block
+ format.note output
+ format.eprint output
+ format.url output
+ fin.entry
+}
+
+FUNCTION {misc}
+{ output.bibitem
+ format.authors output
+ author format.key output
+ format.date "year" output.check
+ date.block
+ format.title output
+ new.block
+ howpublished "howpublished" bibinfo.check output
+ format.doi output
+ new.block
+ format.note output
+ format.eprint output
+ format.url output
+ fin.entry
+}
+FUNCTION {phdthesis}
+{ output.bibitem
+ format.authors "author" output.check
+ author format.key output
+ format.date "year" output.check
+ date.block
+ format.btitle
+ "title" output.check
+ new.block
+ bbl.phdthesis format.thesis.type output.nonnull
+ school "school" bibinfo.warn output
+ address "address" bibinfo.check output
+ format.doi output
+ new.block
+ format.note output
+ format.eprint output
+ format.url output
+ fin.entry
+}
+
+FUNCTION {proceedings}
+{ output.bibitem
+ format.editors output
+ editor format.key output
+ format.date "year" output.check
+ date.block
+ format.btitle "title" output.check
+ format.bvolume output
+ format.number.series output
+ new.sentence
+ publisher empty$
+ { format.organization.address output }
+ { organization "organization" bibinfo.check output
+ format.publisher.address output
+ }
+ if$
+ format.isbn output
+ format.issn output
+ format.doi output
+ new.block
+ format.note output
+ format.eprint output
+ format.url output
+ fin.entry
+}
+
+FUNCTION {techreport}
+{ output.bibitem
+ format.authors "author" output.check
+ author format.key output
+ format.date "year" output.check
+ date.block
+ format.title
+ "title" output.check
+ new.block
+ format.tr.number emphasize output.nonnull
+ institution "institution" bibinfo.warn output
+ address "address" bibinfo.check output
+ format.doi output
+ new.block
+ format.note output
+ format.eprint output
+ format.url output
+ fin.entry
+}
+
+FUNCTION {unpublished}
+{ output.bibitem
+ format.authors "author" output.check
+ author format.key output
+ format.date "year" output.check
+ date.block
+ format.title "title" output.check
+ format.doi output
+ new.block
+ format.note "note" output.check
+ format.eprint output
+ format.url output
+ fin.entry
+}
+
+FUNCTION {default.type} { misc }
+READ
+FUNCTION {sortify}
+{ purify$
+ "l" change.case$
+}
+INTEGERS { len }
+FUNCTION {chop.word}
+{ 's :=
+ 'len :=
+ s #1 len substring$ =
+ { s len #1 + global.max$ substring$ }
+ 's
+ if$
+}
+FUNCTION {format.lab.names}
+{ 's :=
+ "" 't :=
+ s #1 "{vv~}{ll}" format.name$
+ s num.names$ duplicate$
+ #2 >
+ { pop$
+ " " * bbl.etal emphasize *
+ }
+ { #2 <
+ 'skip$
+ { s #2 "{ff }{vv }{ll}{ jj}" format.name$ "others" =
+ {
+ " " * bbl.etal emphasize *
+ }
+ { bbl.and space.word * s #2 "{vv~}{ll}" format.name$
+ * }
+ if$
+ }
+ if$
+ }
+ if$
+}
+
+FUNCTION {author.key.label}
+{ author empty$
+ { key empty$
+ { cite$ #1 #3 substring$ }
+ 'key
+ if$
+ }
+ { author format.lab.names }
+ if$
+}
+
+FUNCTION {author.editor.key.label}
+{ author empty$
+ { editor empty$
+ { key empty$
+ { cite$ #1 #3 substring$ }
+ 'key
+ if$
+ }
+ { editor format.lab.names }
+ if$
+ }
+ { author format.lab.names }
+ if$
+}
+
+FUNCTION {editor.key.label}
+{ editor empty$
+ { key empty$
+ { cite$ #1 #3 substring$ }
+ 'key
+ if$
+ }
+ { editor format.lab.names }
+ if$
+}
+
+FUNCTION {calc.short.authors}
+{ type$ "book" =
+ type$ "inbook" =
+ or
+ 'author.editor.key.label
+ { type$ "proceedings" =
+ 'editor.key.label
+ 'author.key.label
+ if$
+ }
+ if$
+ 'short.list :=
+}
+
+FUNCTION {calc.label}
+{ calc.short.authors
+ short.list
+ "("
+ *
+ year duplicate$ empty$
+ short.list key field.or.null = or
+ { pop$ "" }
+ 'skip$
+ if$
+ *
+ 'label :=
+}
+
+FUNCTION {sort.format.names}
+{ 's :=
+ #1 'nameptr :=
+ ""
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ { s nameptr
+ "{vv{ } }{ll{ }}{ f{ }}{ jj{ }}"
+ format.name$ 't :=
+ nameptr #1 >
+ {
+ " " *
+ namesleft #1 = t "others" = and
+ { "zzzzz" * }
+ { t sortify * }
+ if$
+ }
+ { t sortify * }
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+}
+
+FUNCTION {sort.format.title}
+{ 't :=
+ "A " #2
+ "An " #3
+ "The " #4 t chop.word
+ chop.word
+ chop.word
+ sortify
+ #1 global.max$ substring$
+}
+FUNCTION {author.sort}
+{ author empty$
+ { key empty$
+ { "to sort, need author or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { author sort.format.names }
+ if$
+}
+FUNCTION {author.editor.sort}
+{ author empty$
+ { editor empty$
+ { key empty$
+ { "to sort, need author, editor, or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { editor sort.format.names }
+ if$
+ }
+ { author sort.format.names }
+ if$
+}
+FUNCTION {editor.sort}
+{ editor empty$
+ { key empty$
+ { "to sort, need editor or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { editor sort.format.names }
+ if$
+}
+FUNCTION {presort}
+{ calc.label
+ label sortify
+ " "
+ *
+ type$ "book" =
+ type$ "inbook" =
+ or
+ 'author.editor.sort
+ { type$ "proceedings" =
+ 'editor.sort
+ 'author.sort
+ if$
+ }
+ if$
+ #1 entry.max$ substring$
+ 'sort.label :=
+ sort.label
+ *
+ " "
+ *
+ title field.or.null
+ sort.format.title
+ *
+ #1 entry.max$ substring$
+ 'sort.key$ :=
+}
+
+ITERATE {presort}
+SORT
+STRINGS { last.label next.extra }
+INTEGERS { last.extra.num number.label }
+FUNCTION {initialize.extra.label.stuff}
+{ #0 int.to.chr$ 'last.label :=
+ "" 'next.extra :=
+ #0 'last.extra.num :=
+ #0 'number.label :=
+}
+FUNCTION {forward.pass}
+{ last.label label =
+ { last.extra.num #1 + 'last.extra.num :=
+ last.extra.num int.to.chr$ 'extra.label :=
+ }
+ { "a" chr.to.int$ 'last.extra.num :=
+ "" 'extra.label :=
+ label 'last.label :=
+ }
+ if$
+ number.label #1 + 'number.label :=
+}
+FUNCTION {reverse.pass}
+{ next.extra "b" =
+ { "a" 'extra.label := }
+ 'skip$
+ if$
+ extra.label 'next.extra :=
+ extra.label
+ duplicate$ empty$
+ 'skip$
+ { "{\natexlab{" swap$ * "}}" * }
+ if$
+ 'extra.label :=
+ label extra.label * 'label :=
+}
+EXECUTE {initialize.extra.label.stuff}
+ITERATE {forward.pass}
+REVERSE {reverse.pass}
+FUNCTION {bib.sort.order}
+{ sort.label
+ " "
+ *
+ year field.or.null sortify
+ *
+ " "
+ *
+ title field.or.null
+ sort.format.title
+ *
+ #1 entry.max$ substring$
+ 'sort.key$ :=
+}
+ITERATE {bib.sort.order}
+SORT
+FUNCTION {begin.bib}
+{ preamble$ empty$
+ 'skip$
+ { preamble$ write$ newline$ }
+ if$
+ "\begin{thebibliography}{" number.label int.to.str$ * "}" *
+ write$ newline$
+ "\newcommand{\bibenquote}[1]{``#1''}"
+ write$ newline$
+ "\providecommand{\natexlab}[1]{#1}"
+ write$ newline$
+ "\providecommand{\url}[1]{\texttt{#1}}"
+ write$ newline$
+ "\providecommand{\urlprefix}{URL }"
+ write$ newline$
+ "\expandafter\ifx\csname urlstyle\endcsname\relax"
+ write$ newline$
+ " \providecommand{\doi}[1]{doi:\discretionary{}{}{}#1}\else"
+ write$ newline$
+ " \providecommand{\doi}{doi:\discretionary{}{}{}\begingroup \urlstyle{rm}\Url}\fi"
+ write$ newline$
+ "\providecommand{\eprint}[2][]{\url{#2}}"
+ write$ newline$
+}
+EXECUTE {begin.bib}
+EXECUTE {init.state.consts}
+ITERATE {call.type$}
+FUNCTION {end.bib}
+{ newline$
+ "\end{thebibliography}" write$ newline$
+}
+EXECUTE {end.bib}
+%% End of customized bst file
+%%
+%% End of file `jss.bst'.
diff --git a/biblio/bibtex/contrib/economic/njf.cls b/biblio/bibtex/contrib/economic/njf.cls
new file mode 100644
index 0000000000..eced17ed6f
--- /dev/null
+++ b/biblio/bibtex/contrib/economic/njf.cls
@@ -0,0 +1,148 @@
+%%% LaTeX class for the NJF seminar 425
+%%% "Economic System Research in Agriculture and Rural Development"
+%%% (29 September - 1 October 2009, Tartu, Estonia)
+%%% and hopefully also for other NJF seminars
+%%%
+%%% author: Arne Henningsen
+%%% version: 1.0 (18 August 2009)
+%%% license: LaTeX Project Public License
+%%%
+%%% Note: This is an unofficial style file that may not fully comply
+%%% with the NJF Formatting Instructions in every detail.
+%%% Please report any problems at
+%%% http://sourceforge.net/projects/economtex/
+%%% Further information is available at
+%%% http://economtex.wiki.sourceforge.net/
+%%%
+%%% This document class is based on the "scrartcl" class
+%%% from the KOMA script bundle.
+%%% Following additional packages are required:
+%%% amsmath, babel, courier, geometry,
+%%% helvet, ifthen, mathptmx, natbib, setspace, titlesec, url
+%%%
+%%% This document class provides 2 new commands:
+%%% \keywords can be use to show keywors below the abstract
+%%% \affiliation can be used to add affiliation information
+%%%
+
+
+\NeedsTeXFormat{LaTeX2e}
+\ProvidesClass{njf}[2009/08/18 LaTeX class for the NJF]
+
+\RequirePackage{ifthen}
+
+% pass any options on to the scrartcl class and load this class with some options
+\DeclareOption*{\PassOptionsToClass{\CurrentOption}{scrartcl}}
+\ProcessOptions\relax
+\LoadClass[12pt,english,halfparskip,tablecaptionabove]{scrartcl}
+% tablecaptionabove = use \captionabove for tables
+
+% page format, margins
+\RequirePackage{geometry}
+\geometry{a4paper, tmargin=2.5cm, bmargin=2.5cm, lmargin=2.5cm,
+ rmargin=2.5cm, headheight=0cm, headsep=0cm, footskip=1.2cm }
+
+% one half spacing
+\RequirePackage{setspace}
+\onehalfspacing
+
+% spacing between paragraphs
+\setlength{\parskip}{6pt}
+
+% spacing around (sub)section headers
+\RequirePackage{titlesec}
+\titlespacing*{\section}{0pt}{6pt}{0pt}
+\titlespacing*{\subsection}{0pt}{0pt}{0pt}
+
+% spacing around formulas
+\AtBeginDocument{
+\setlength{\abovedisplayshortskip}{6pt}
+\setlength{\belowdisplayshortskip}{6pt}
+\setlength{\abovedisplayskip}{6pt}
+\setlength{\belowdisplayskip}{6pt}
+\allowdisplaybreaks
+}
+
+% spacing around captions and floats
+\setlength{\abovecaptionskip}{6pt}
+\setlength{\belowcaptionskip}{3pt}
+\setlength{\floatsep}{0pt}
+\setlength{\textfloatsep}{20pt}
+\setlength{\intextsep}{12pt}
+
+% font families: times/helvetica/courier
+\RequirePackage{mathptmx}
+\RequirePackage[scaled=.90]{helvet}
+\RequirePackage{courier}
+
+% fonts of headings
+\setkomafont{section}{\rmfamily\bfseries\normalsize}
+\setkomafont{subsection}{\rmfamily\bfseries\normalsize}
+
+% amsmath
+\RequirePackage{amsmath}
+
+% for compatibility with ajae.cls
+\newcommand{\veclatin}[1]{#1}
+\newcommand{\matlatin}[1]{#1}
+\newcommand{\vecgreek}[1]{#1}
+\newcommand{\matgreek}[1]{#1}
+
+% font for URLs
+\RequirePackage{url}
+\def\UrlFont{\rmfamily}
+
+% citations and bibliography
+\RequirePackage[authoryear]{natbib}
+\setlength{\bibsep}{0pt}
+
+% captions of figures and tables
+\setcapwidth[l]{\textwidth}
+
+% titlepage
+\newcommand{\affiliation}[1]{\newcommand{\@affiliation}{#1}}
+\renewcommand{\maketitle}{
+ \begin{center}
+ \begin{spacing}{1.5}
+ \Large{\textbf{\@title}}%
+ \end{spacing}
+ \textbf{\@author}\\
+ \ifthenelse{ \isundefined\@affiliation }{
+ \ClassWarningNoLine{njf}{No affiliation(s) specified.
+ Please use the command \protect\affiliation}
+ }{
+ \vspace*{3mm}
+ \begin{small}
+ \@affiliation\\
+ \end{small}
+ }
+ \vspace*{5mm}
+ \end{center}
+}
+
+% abstract & keywords
+\newcommand{\keywords}[1]{\newcommand{\@keywords}{#1}}
+\renewenvironment{abstract}{%
+\section*{Abstract}
+}{%
+\ifthenelse{ \isundefined\@keywords }{
+\ClassWarningNoLine{njf}{No keywords specified.
+ Please use the command \protect\keywords}
+}{
+\smallskip\\ \noindent
+\textbf{Keywords:} \@keywords
+}
+\noindent%
+}
+
+% use babel package and set language to english
+\RequirePackage[english]{babel}
+
+% avoid clubs and widows
+\clubpenalty=10000
+\widowpenalty=10000
+% \displaywidowpenalty=10000
+
+% increase stretchability of the spaces (avoid overful hboxes)
+\setlength{\emergencystretch}{3em}
+
diff --git a/biblio/bibtex/contrib/economic/oega.bst b/biblio/bibtex/contrib/economic/oega.bst
new file mode 100644
index 0000000000..8202307f4d
--- /dev/null
+++ b/biblio/bibtex/contrib/economic/oega.bst
@@ -0,0 +1,1563 @@
+%%
+%% This is file `oega.bst',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% merlin.mbs (with options: `ay,nat,nm-rvvc,keyxyr,dt-beg,yr-par,yrp-per,note-yr,thtit-a,num-xser,ser-vol,jnm-x,add-pub,pre-edn,edparxc,in-col,pp,ed,abr,ednx,ord,and-xcom,etal-xc,em-it,nfss,')
+%% ----------------------------------------
+%% *** Oesterreichische Gesellschaft fuer Agraroekonomie (OeGA) ***
+%%
+%% Copyright 1994-2005 Patrick W Daly
+ % ===============================================================
+ % IMPORTANT NOTICE:
+ % This bibliographic style (bst) file has been generated from one or
+ % more master bibliographic style (mbs) files, listed above.
+ %
+ % This generated file can be redistributed and/or modified under the terms
+ % of the LaTeX Project Public License Distributed from CTAN
+ % archives in directory macros/latex/base/lppl.txt; either
+ % version 1 of the License, or any later version.
+ % ===============================================================
+ % Name and version information of the main mbs file:
+ % \ProvidesFile{merlin.mbs}[2005/10/17 4.14 (PWD, AO, DPC)]
+ % For use with BibTeX version 0.99a or later
+ %-------------------------------------------------------------------
+ % This bibliography style file is intended for texts in ENGLISH
+ % This is an author-year citation style bibliography. As such, it is
+ % non-standard LaTeX, and requires a special package file to function properly.
+ % Such a package is natbib.sty by Patrick W. Daly
+ % The form of the \bibitem entries is
+ % \bibitem[Jones et al.(1990)]{key}...
+ % \bibitem[Jones et al.(1990)Jones, Baker, and Smith]{key}...
+ % The essential feature is that the label (the part in brackets) consists
+ % of the author names, as they should appear in the citation, with the year
+ % in parentheses following. There must be no space before the opening
+ % parenthesis!
+ % With natbib v5.3, a full list of authors may also follow the year.
+ % In natbib.sty, it is possible to define the type of enclosures that is
+ % really wanted (brackets or parentheses), but in either case, there must
+ % be parentheses in the label.
+ % The \cite command functions as follows:
+ % \citet{key} ==>> Jones et al. (1990)
+ % \citet*{key} ==>> Jones, Baker, and Smith (1990)
+ % \citep{key} ==>> (Jones et al., 1990)
+ % \citep*{key} ==>> (Jones, Baker, and Smith, 1990)
+ % \citep[chap. 2]{key} ==>> (Jones et al., 1990, chap. 2)
+ % \citep[e.g.][]{key} ==>> (e.g. Jones et al., 1990)
+ % \citep[e.g.][p. 32]{key} ==>> (e.g. Jones et al., p. 32)
+ % \citeauthor{key} ==>> Jones et al.
+ % \citeauthor*{key} ==>> Jones, Baker, and Smith
+ % \citeyear{key} ==>> 1990
+ %---------------------------------------------------------------------
+
+ENTRY
+ { address
+ author
+ booktitle
+ chapter
+ edition
+ editor
+ eid
+ howpublished
+ institution
+ journal
+ key
+ month
+ note
+ number
+ organization
+ pages
+ publisher
+ school
+ series
+ title
+ type
+ volume
+ year
+ }
+ {}
+ { label extra.label sort.label short.list }
+INTEGERS { output.state before.all mid.sentence after.sentence after.block }
+FUNCTION {init.state.consts}
+{ #0 'before.all :=
+ #1 'mid.sentence :=
+ #2 'after.sentence :=
+ #3 'after.block :=
+}
+STRINGS { s t}
+FUNCTION {output.nonnull}
+{ 's :=
+ output.state mid.sentence =
+ { ", " * write$ }
+ { output.state after.block =
+ { add.period$ write$
+ newline$
+ "\newblock " write$
+ }
+ { output.state before.all =
+ 'write$
+ { add.period$ " " * write$ }
+ if$
+ }
+ if$
+ mid.sentence 'output.state :=
+ }
+ if$
+ s
+}
+FUNCTION {output}
+{ duplicate$ empty$
+ 'pop$
+ 'output.nonnull
+ if$
+}
+FUNCTION {output.check}
+{ 't :=
+ duplicate$ empty$
+ { pop$ "empty " t * " in " * cite$ * warning$ }
+ 'output.nonnull
+ if$
+}
+FUNCTION {fin.entry}
+{ add.period$
+ write$
+ newline$
+}
+
+FUNCTION {new.block}
+{ output.state before.all =
+ 'skip$
+ { after.block 'output.state := }
+ if$
+}
+FUNCTION {new.sentence}
+{ output.state after.block =
+ 'skip$
+ { output.state before.all =
+ 'skip$
+ { after.sentence 'output.state := }
+ if$
+ }
+ if$
+}
+FUNCTION {add.blank}
+{ " " * before.all 'output.state :=
+}
+
+FUNCTION {date.block}
+{
+ new.block
+}
+
+FUNCTION {not}
+{ { #0 }
+ { #1 }
+ if$
+}
+FUNCTION {and}
+{ 'skip$
+ { pop$ #0 }
+ if$
+}
+FUNCTION {or}
+{ { pop$ #1 }
+ 'skip$
+ if$
+}
+FUNCTION {new.block.checkb}
+{ empty$
+ swap$ empty$
+ and
+ 'skip$
+ 'new.block
+ if$
+}
+FUNCTION {field.or.null}
+{ duplicate$ empty$
+ { pop$ "" }
+ 'skip$
+ if$
+}
+FUNCTION {emphasize}
+{ duplicate$ empty$
+ { pop$ "" }
+ { "\textit{" swap$ * "}" * }
+ if$
+}
+FUNCTION {tie.or.space.prefix}
+{ duplicate$ text.length$ #3 <
+ { "~" }
+ { " " }
+ if$
+ swap$
+}
+
+FUNCTION {capitalize}
+{ "u" change.case$ "t" change.case$ }
+
+FUNCTION {space.word}
+{ " " swap$ * " " * }
+ % Here are the language-specific definitions for explicit words.
+ % Each function has a name bbl.xxx where xxx is the English word.
+ % The language selected here is ENGLISH
+FUNCTION {bbl.and}
+{ "and"}
+
+FUNCTION {bbl.etal}
+{ "et~al." }
+
+FUNCTION {bbl.editors}
+{ "eds." }
+
+FUNCTION {bbl.editor}
+{ "ed." }
+
+FUNCTION {bbl.edby}
+{ "edited by" }
+
+FUNCTION {bbl.edition}
+{ "ed." }
+
+FUNCTION {bbl.volume}
+{ "vol." }
+
+FUNCTION {bbl.of}
+{ "of" }
+
+FUNCTION {bbl.number}
+{ "no." }
+
+FUNCTION {bbl.nr}
+{ "no." }
+
+FUNCTION {bbl.in}
+{ "in" }
+
+FUNCTION {bbl.pages}
+{ "pp." }
+
+FUNCTION {bbl.page}
+{ "p." }
+
+FUNCTION {bbl.chapter}
+{ "chap." }
+
+FUNCTION {bbl.techrep}
+{ "Tech. Rep." }
+
+FUNCTION {bbl.mthesis}
+{ "Master's thesis" }
+
+FUNCTION {bbl.phdthesis}
+{ "Ph.D. thesis" }
+
+FUNCTION {bbl.first}
+{ "1st" }
+
+FUNCTION {bbl.second}
+{ "2nd" }
+
+FUNCTION {bbl.third}
+{ "3rd" }
+
+FUNCTION {bbl.fourth}
+{ "4th" }
+
+FUNCTION {bbl.fifth}
+{ "5th" }
+
+FUNCTION {bbl.st}
+{ "st" }
+
+FUNCTION {bbl.nd}
+{ "nd" }
+
+FUNCTION {bbl.rd}
+{ "rd" }
+
+FUNCTION {bbl.th}
+{ "th" }
+
+MACRO {jan} {"Jan."}
+
+MACRO {feb} {"Feb."}
+
+MACRO {mar} {"Mar."}
+
+MACRO {apr} {"Apr."}
+
+MACRO {may} {"May"}
+
+MACRO {jun} {"Jun."}
+
+MACRO {jul} {"Jul."}
+
+MACRO {aug} {"Aug."}
+
+MACRO {sep} {"Sep."}
+
+MACRO {oct} {"Oct."}
+
+MACRO {nov} {"Nov."}
+
+MACRO {dec} {"Dec."}
+
+FUNCTION {eng.ord}
+{ duplicate$ "1" swap$ *
+ #-2 #1 substring$ "1" =
+ { bbl.th * }
+ { duplicate$ #-1 #1 substring$
+ duplicate$ "1" =
+ { pop$ bbl.st * }
+ { duplicate$ "2" =
+ { pop$ bbl.nd * }
+ { "3" =
+ { bbl.rd * }
+ { bbl.th * }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+}
+
+MACRO {acmcs} {"ACM Computing Surveys"}
+
+MACRO {acta} {"Acta Informatica"}
+
+MACRO {cacm} {"Communications of the ACM"}
+
+MACRO {ibmjrd} {"IBM Journal of Research and Development"}
+
+MACRO {ibmsj} {"IBM Systems Journal"}
+
+MACRO {ieeese} {"IEEE Transactions on Software Engineering"}
+
+MACRO {ieeetc} {"IEEE Transactions on Computers"}
+
+MACRO {ieeetcad}
+ {"IEEE Transactions on Computer-Aided Design of Integrated Circuits"}
+
+MACRO {ipl} {"Information Processing Letters"}
+
+MACRO {jacm} {"Journal of the ACM"}
+
+MACRO {jcss} {"Journal of Computer and System Sciences"}
+
+MACRO {scp} {"Science of Computer Programming"}
+
+MACRO {sicomp} {"SIAM Journal on Computing"}
+
+MACRO {tocs} {"ACM Transactions on Computer Systems"}
+
+MACRO {tods} {"ACM Transactions on Database Systems"}
+
+MACRO {tog} {"ACM Transactions on Graphics"}
+
+MACRO {toms} {"ACM Transactions on Mathematical Software"}
+
+MACRO {toois} {"ACM Transactions on Office Information Systems"}
+
+MACRO {toplas} {"ACM Transactions on Programming Languages and Systems"}
+
+MACRO {tcs} {"Theoretical Computer Science"}
+FUNCTION {bibinfo.check}
+{ swap$
+ duplicate$ missing$
+ {
+ pop$ pop$
+ ""
+ }
+ { duplicate$ empty$
+ {
+ swap$ pop$
+ }
+ { swap$
+ pop$
+ }
+ if$
+ }
+ if$
+}
+FUNCTION {bibinfo.warn}
+{ swap$
+ duplicate$ missing$
+ {
+ swap$ "missing " swap$ * " in " * cite$ * warning$ pop$
+ ""
+ }
+ { duplicate$ empty$
+ {
+ swap$ "empty " swap$ * " in " * cite$ * warning$
+ }
+ { swap$
+ pop$
+ }
+ if$
+ }
+ if$
+}
+STRINGS { bibinfo}
+INTEGERS { nameptr namesleft numnames }
+
+FUNCTION {format.names}
+{ 'bibinfo :=
+ duplicate$ empty$ 'skip$ {
+ 's :=
+ "" 't :=
+ #1 'nameptr :=
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ { s nameptr
+ "{vv~}{ll}{, jj}{, f{.}.}"
+ format.name$
+ bibinfo bibinfo.check
+ 't :=
+ nameptr #1 >
+ {
+ namesleft #1 >
+ { ", " * t * }
+ {
+ s nameptr "{ll}" format.name$ duplicate$ "others" =
+ { 't := }
+ { pop$ }
+ if$
+ t "others" =
+ {
+ " " * bbl.etal *
+ }
+ {
+ bbl.and
+ space.word * t *
+ }
+ if$
+ }
+ if$
+ }
+ 't
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+ } if$
+}
+FUNCTION {format.names.ed}
+{
+ 'bibinfo :=
+ duplicate$ empty$ 'skip$ {
+ 's :=
+ "" 't :=
+ #1 'nameptr :=
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ { s nameptr
+ "{f{.}.~}{vv~}{ll}{ jj}"
+ format.name$
+ bibinfo bibinfo.check
+ 't :=
+ nameptr #1 >
+ {
+ namesleft #1 >
+ { ", " * t * }
+ {
+ s nameptr "{ll}" format.name$ duplicate$ "others" =
+ { 't := }
+ { pop$ }
+ if$
+ t "others" =
+ {
+
+ " " * bbl.etal *
+ }
+ {
+ bbl.and
+ space.word * t *
+ }
+ if$
+ }
+ if$
+ }
+ 't
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+ } if$
+}
+FUNCTION {format.key}
+{ empty$
+ { key field.or.null }
+ { "" }
+ if$
+}
+
+FUNCTION {format.authors}
+{ author "author" format.names
+}
+FUNCTION {get.bbl.editor}
+{ editor num.names$ #1 > 'bbl.editors 'bbl.editor if$ }
+
+FUNCTION {format.editors}
+{ editor "editor" format.names duplicate$ empty$ 'skip$
+ {
+ " " *
+ get.bbl.editor
+ "(" swap$ * ")" *
+ *
+ }
+ if$
+}
+FUNCTION {format.note}
+{
+ note empty$
+ { "" }
+ { note #1 #1 substring$
+ duplicate$ "{" =
+ 'skip$
+ { output.state mid.sentence =
+ { "l" }
+ { "u" }
+ if$
+ change.case$
+ }
+ if$
+ note #2 global.max$ substring$ * "note" bibinfo.check
+ }
+ if$
+}
+
+FUNCTION {format.title}
+{ title
+ duplicate$ empty$ 'skip$
+ { "t" change.case$ }
+ if$
+ "title" bibinfo.check
+}
+FUNCTION {format.full.names}
+{'s :=
+ "" 't :=
+ #1 'nameptr :=
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ { s nameptr
+ "{vv~}{ll}" format.name$
+ 't :=
+ nameptr #1 >
+ {
+ namesleft #1 >
+ { ", " * t * }
+ {
+ s nameptr "{ll}" format.name$ duplicate$ "others" =
+ { 't := }
+ { pop$ }
+ if$
+ t "others" =
+ {
+ " " * bbl.etal *
+ }
+ {
+ bbl.and
+ space.word * t *
+ }
+ if$
+ }
+ if$
+ }
+ 't
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+}
+
+FUNCTION {author.editor.key.full}
+{ author empty$
+ { editor empty$
+ { key empty$
+ { cite$ #1 #3 substring$ }
+ 'key
+ if$
+ }
+ { editor format.full.names }
+ if$
+ }
+ { author format.full.names }
+ if$
+}
+
+FUNCTION {author.key.full}
+{ author empty$
+ { key empty$
+ { cite$ #1 #3 substring$ }
+ 'key
+ if$
+ }
+ { author format.full.names }
+ if$
+}
+
+FUNCTION {editor.key.full}
+{ editor empty$
+ { key empty$
+ { cite$ #1 #3 substring$ }
+ 'key
+ if$
+ }
+ { editor format.full.names }
+ if$
+}
+
+FUNCTION {make.full.names}
+{ type$ "book" =
+ type$ "inbook" =
+ or
+ 'author.editor.key.full
+ { type$ "proceedings" =
+ 'editor.key.full
+ 'author.key.full
+ if$
+ }
+ if$
+}
+
+FUNCTION {output.bibitem}
+{ newline$
+ "\bibitem[{" write$
+ label write$
+ ")" make.full.names duplicate$ short.list =
+ { pop$ }
+ { * }
+ if$
+ "}]{" * write$
+ cite$ write$
+ "}" write$
+ newline$
+ ""
+ before.all 'output.state :=
+}
+
+FUNCTION {n.dashify}
+{
+ 't :=
+ ""
+ { t empty$ not }
+ { t #1 #1 substring$ "-" =
+ { t #1 #2 substring$ "--" = not
+ { "--" *
+ t #2 global.max$ substring$ 't :=
+ }
+ { { t #1 #1 substring$ "-" = }
+ { "-" *
+ t #2 global.max$ substring$ 't :=
+ }
+ while$
+ }
+ if$
+ }
+ { t #1 #1 substring$ *
+ t #2 global.max$ substring$ 't :=
+ }
+ if$
+ }
+ while$
+}
+
+FUNCTION {word.in}
+{ bbl.in capitalize
+ ":" *
+ " " * }
+
+FUNCTION {format.date}
+{ year "year" bibinfo.check duplicate$ empty$
+ {
+ "empty year in " cite$ * "; set to ????" * warning$
+ pop$ "????"
+ }
+ 'skip$
+ if$
+ extra.label *
+ before.all 'output.state :=
+ " (" swap$ * ")" *
+}
+FUNCTION {format.btitle}
+{ title "title" bibinfo.check
+ duplicate$ empty$ 'skip$
+ {
+ emphasize
+ }
+ if$
+}
+FUNCTION {either.or.check}
+{ empty$
+ 'pop$
+ { "can't use both " swap$ * " fields in " * cite$ * warning$ }
+ if$
+}
+FUNCTION {format.bvolume}
+{ volume empty$
+ { "" }
+ { bbl.volume volume tie.or.space.prefix
+ "volume" bibinfo.check * *
+ series "series" bibinfo.check
+ duplicate$ empty$ 'pop$
+ { emphasize ", " * swap$ * }
+ if$
+ "volume and number" number either.or.check
+ }
+ if$
+}
+FUNCTION {format.number.series}
+{ volume empty$
+ { number empty$
+ { series field.or.null }
+ { series empty$
+ { number "number" bibinfo.check }
+ { output.state mid.sentence =
+ { bbl.number }
+ { bbl.number capitalize }
+ if$
+ number tie.or.space.prefix "number" bibinfo.check * *
+ bbl.in space.word *
+ series "series" bibinfo.check *
+ }
+ if$
+ }
+ if$
+ }
+ { "" }
+ if$
+}
+FUNCTION {is.num}
+{ chr.to.int$
+ duplicate$ "0" chr.to.int$ < not
+ swap$ "9" chr.to.int$ > not and
+}
+
+FUNCTION {extract.num}
+{ duplicate$ 't :=
+ "" 's :=
+ { t empty$ not }
+ { t #1 #1 substring$
+ t #2 global.max$ substring$ 't :=
+ duplicate$ is.num
+ { s swap$ * 's := }
+ { pop$ "" 't := }
+ if$
+ }
+ while$
+ s empty$
+ 'skip$
+ { pop$ s }
+ if$
+}
+
+FUNCTION {convert.edition}
+{ extract.num "l" change.case$ 's :=
+ s "first" = s "1" = or
+ { bbl.first 't := }
+ { s "second" = s "2" = or
+ { bbl.second 't := }
+ { s "third" = s "3" = or
+ { bbl.third 't := }
+ { s "fourth" = s "4" = or
+ { bbl.fourth 't := }
+ { s "fifth" = s "5" = or
+ { bbl.fifth 't := }
+ { s #1 #1 substring$ is.num
+ { s eng.ord 't := }
+ { edition 't := }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+ t
+}
+
+FUNCTION {format.edition}
+{ edition duplicate$ empty$ 'skip$
+ {
+ convert.edition
+ output.state mid.sentence =
+ { "l" }
+ { "t" }
+ if$ change.case$
+ "edition" bibinfo.check
+ " " * bbl.edition *
+ }
+ if$
+}
+INTEGERS { multiresult }
+FUNCTION {multi.page.check}
+{ 't :=
+ #0 'multiresult :=
+ { multiresult not
+ t empty$ not
+ and
+ }
+ { t #1 #1 substring$
+ duplicate$ "-" =
+ swap$ duplicate$ "," =
+ swap$ "+" =
+ or or
+ { #1 'multiresult := }
+ { t #2 global.max$ substring$ 't := }
+ if$
+ }
+ while$
+ multiresult
+}
+FUNCTION {format.pages}
+{ pages duplicate$ empty$ 'skip$
+ { duplicate$ multi.page.check
+ {
+ bbl.pages swap$
+ n.dashify
+ }
+ {
+ bbl.page swap$
+ }
+ if$
+ tie.or.space.prefix
+ "pages" bibinfo.check
+ * *
+ }
+ if$
+}
+FUNCTION {format.journal.pages}
+{ pages duplicate$ empty$ 'pop$
+ { swap$ duplicate$ empty$
+ { pop$ pop$ format.pages }
+ {
+ ":" *
+ swap$
+ n.dashify
+ "pages" bibinfo.check
+ *
+ }
+ if$
+ }
+ if$
+}
+FUNCTION {format.journal.eid}
+{ eid "eid" bibinfo.check
+ duplicate$ empty$ 'pop$
+ { swap$ duplicate$ empty$ 'skip$
+ {
+ ":" *
+ }
+ if$
+ swap$ *
+ }
+ if$
+}
+FUNCTION {format.vol.num.pages}
+{ volume field.or.null
+ duplicate$ empty$ 'skip$
+ {
+ "volume" bibinfo.check
+ }
+ if$
+ number "number" bibinfo.check duplicate$ empty$ 'skip$
+ {
+ swap$ duplicate$ empty$
+ { "there's a number but no volume in " cite$ * warning$ }
+ 'skip$
+ if$
+ swap$
+ "(" swap$ * ")" *
+ }
+ if$ *
+ eid empty$
+ { format.journal.pages }
+ { format.journal.eid }
+ if$
+}
+
+FUNCTION {format.chapter.pages}
+{ chapter empty$
+ 'format.pages
+ { type empty$
+ { bbl.chapter }
+ { type "l" change.case$
+ "type" bibinfo.check
+ }
+ if$
+ chapter tie.or.space.prefix
+ "chapter" bibinfo.check
+ * *
+ pages empty$
+ 'skip$
+ { ", " * format.pages * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.booktitle}
+{
+ booktitle "booktitle" bibinfo.check
+ emphasize
+}
+FUNCTION {format.in.ed.booktitle}
+{ format.booktitle duplicate$ empty$ 'skip$
+ {
+ editor "editor" format.names.ed duplicate$ empty$ 'pop$
+ {
+ " " *
+ get.bbl.editor
+ "(" swap$ * ") " *
+ * swap$
+ * }
+ if$
+ word.in swap$ *
+ }
+ if$
+}
+FUNCTION {format.thesis.type}
+{ type duplicate$ empty$
+ 'pop$
+ { swap$ pop$
+ "t" change.case$ "type" bibinfo.check
+ }
+ if$
+}
+FUNCTION {format.tr.number}
+{ number "number" bibinfo.check
+ type duplicate$ empty$
+ { pop$ bbl.techrep }
+ 'skip$
+ if$
+ "type" bibinfo.check
+ swap$ duplicate$ empty$
+ { pop$ "t" change.case$ }
+ { tie.or.space.prefix * * }
+ if$
+}
+FUNCTION {format.article.crossref}
+{
+ word.in
+ " \cite{" * crossref * "}" *
+}
+FUNCTION {format.book.crossref}
+{ volume duplicate$ empty$
+ { "empty volume in " cite$ * "'s crossref of " * crossref * warning$
+ pop$ word.in
+ }
+ { bbl.volume
+ capitalize
+ swap$ tie.or.space.prefix "volume" bibinfo.check * * bbl.of space.word *
+ }
+ if$
+ " \cite{" * crossref * "}" *
+}
+FUNCTION {format.incoll.inproc.crossref}
+{
+ word.in
+ " \cite{" * crossref * "}" *
+}
+FUNCTION {format.org.or.pub}
+{ 't :=
+ ""
+ address empty$ t empty$ and
+ 'skip$
+ {
+ address "address" bibinfo.check *
+ t empty$
+ 'skip$
+ { address empty$
+ 'skip$
+ { ": " * }
+ if$
+ t *
+ }
+ if$
+ }
+ if$
+}
+FUNCTION {format.publisher.address}
+{ publisher "publisher" bibinfo.warn format.org.or.pub
+}
+
+FUNCTION {format.organization.address}
+{ organization "organization" bibinfo.check format.org.or.pub
+}
+
+FUNCTION {article}
+{ output.bibitem
+ format.authors "author" output.check
+ author format.key output
+ format.date "year" output.check
+ date.block
+ format.title "title" output.check
+ new.block
+ crossref missing$
+ {
+ journal
+ "journal" bibinfo.check
+ emphasize
+ "journal" output.check
+ add.blank
+ format.vol.num.pages output
+ }
+ { format.article.crossref output.nonnull
+ format.pages output
+ }
+ if$
+ new.block
+ format.note output
+ fin.entry
+}
+FUNCTION {book}
+{ output.bibitem
+ author empty$
+ { format.editors "author and editor" output.check
+ editor format.key output
+ add.blank
+ }
+ { format.authors output.nonnull
+ crossref missing$
+ { "author and editor" editor either.or.check }
+ 'skip$
+ if$
+ }
+ if$
+ format.date "year" output.check
+ date.block
+ format.btitle "title" output.check
+ crossref missing$
+ { format.bvolume output
+ new.block
+ format.number.series output
+ format.edition output
+ new.sentence
+ format.publisher.address output
+ }
+ {
+ new.block
+ format.book.crossref output.nonnull
+ }
+ if$
+ new.block
+ format.note output
+ fin.entry
+}
+FUNCTION {booklet}
+{ output.bibitem
+ format.authors output
+ author format.key output
+ format.date "year" output.check
+ date.block
+ format.title "title" output.check
+ new.block
+ howpublished "howpublished" bibinfo.check output
+ address "address" bibinfo.check output
+ new.block
+ format.note output
+ fin.entry
+}
+
+FUNCTION {inbook}
+{ output.bibitem
+ author empty$
+ { format.editors "author and editor" output.check
+ editor format.key output
+ }
+ { format.authors output.nonnull
+ crossref missing$
+ { "author and editor" editor either.or.check }
+ 'skip$
+ if$
+ }
+ if$
+ format.date "year" output.check
+ date.block
+ format.btitle "title" output.check
+ crossref missing$
+ {
+ format.bvolume output
+ format.chapter.pages "chapter and pages" output.check
+ new.block
+ format.number.series output
+ format.edition output
+ new.sentence
+ format.publisher.address output
+ }
+ {
+ format.chapter.pages "chapter and pages" output.check
+ new.block
+ format.book.crossref output.nonnull
+ }
+ if$
+ new.block
+ format.note output
+ fin.entry
+}
+
+FUNCTION {incollection}
+{ output.bibitem
+ format.authors "author" output.check
+ author format.key output
+ format.date "year" output.check
+ date.block
+ format.title "title" output.check
+ new.block
+ crossref missing$
+ { format.in.ed.booktitle "booktitle" output.check
+ format.bvolume output
+ format.number.series output
+ format.edition output
+ format.chapter.pages output
+ new.sentence
+ format.publisher.address output
+ }
+ { format.incoll.inproc.crossref output.nonnull
+ format.chapter.pages output
+ }
+ if$
+ new.block
+ format.note output
+ fin.entry
+}
+FUNCTION {inproceedings}
+{ output.bibitem
+ format.authors "author" output.check
+ author format.key output
+ format.date "year" output.check
+ date.block
+ format.title "title" output.check
+ new.block
+ crossref missing$
+ { format.in.ed.booktitle "booktitle" output.check
+ format.bvolume output
+ format.number.series output
+ format.pages output
+ new.sentence
+ publisher empty$
+ { format.organization.address output }
+ { organization "organization" bibinfo.check output
+ format.publisher.address output
+ }
+ if$
+ }
+ { format.incoll.inproc.crossref output.nonnull
+ format.pages output
+ }
+ if$
+ new.block
+ format.note output
+ fin.entry
+}
+FUNCTION {conference} { inproceedings }
+FUNCTION {manual}
+{ output.bibitem
+ format.authors output
+ author format.key output
+ format.date "year" output.check
+ date.block
+ format.btitle "title" output.check
+ organization address new.block.checkb
+ organization "organization" bibinfo.check output
+ address "address" bibinfo.check output
+ format.edition output
+ new.block
+ format.note output
+ fin.entry
+}
+
+FUNCTION {mastersthesis}
+{ output.bibitem
+ format.authors "author" output.check
+ author format.key output
+ format.date "year" output.check
+ date.block
+ format.title
+ "title" output.check
+ new.block
+ bbl.mthesis format.thesis.type output.nonnull
+ school "school" bibinfo.warn output
+ address "address" bibinfo.check output
+ new.block
+ format.note output
+ fin.entry
+}
+
+FUNCTION {misc}
+{ output.bibitem
+ format.authors output
+ author format.key output
+ format.date "year" output.check
+ date.block
+ format.title output
+ new.block
+ howpublished "howpublished" bibinfo.check output
+ new.block
+ format.note output
+ fin.entry
+}
+FUNCTION {phdthesis}
+{ output.bibitem
+ format.authors "author" output.check
+ author format.key output
+ format.date "year" output.check
+ date.block
+ format.title
+ "title" output.check
+ new.block
+ bbl.phdthesis format.thesis.type output.nonnull
+ school "school" bibinfo.warn output
+ address "address" bibinfo.check output
+ new.block
+ format.note output
+ fin.entry
+}
+
+FUNCTION {proceedings}
+{ output.bibitem
+ format.editors output
+ editor format.key output
+ format.date "year" output.check
+ date.block
+ format.btitle "title" output.check
+ format.bvolume output
+ format.number.series output
+ new.sentence
+ publisher empty$
+ { format.organization.address output }
+ { organization "organization" bibinfo.check output
+ format.publisher.address output
+ }
+ if$
+ new.block
+ format.note output
+ fin.entry
+}
+
+FUNCTION {techreport}
+{ output.bibitem
+ format.authors "author" output.check
+ author format.key output
+ format.date "year" output.check
+ date.block
+ format.title
+ "title" output.check
+ new.block
+ format.tr.number output.nonnull
+ institution "institution" bibinfo.warn output
+ address "address" bibinfo.check output
+ new.block
+ format.note output
+ fin.entry
+}
+
+FUNCTION {unpublished}
+{ output.bibitem
+ format.authors "author" output.check
+ author format.key output
+ format.date "year" output.check
+ date.block
+ format.title "title" output.check
+ new.block
+ format.note "note" output.check
+ fin.entry
+}
+
+FUNCTION {default.type} { misc }
+READ
+FUNCTION {sortify}
+{ purify$
+ "l" change.case$
+}
+INTEGERS { len }
+FUNCTION {chop.word}
+{ 's :=
+ 'len :=
+ s #1 len substring$ =
+ { s len #1 + global.max$ substring$ }
+ 's
+ if$
+}
+FUNCTION {format.lab.names}
+{ 's :=
+ "" 't :=
+ s #1 "{vv~}{ll}" format.name$
+ s num.names$ duplicate$
+ #2 >
+ { pop$
+ " " * bbl.etal *
+ }
+ { #2 <
+ 'skip$
+ { s #2 "{ff }{vv }{ll}{ jj}" format.name$ "others" =
+ {
+ " " * bbl.etal *
+ }
+ { bbl.and space.word * s #2 "{vv~}{ll}" format.name$
+ * }
+ if$
+ }
+ if$
+ }
+ if$
+}
+
+FUNCTION {author.key.label}
+{ author empty$
+ { key empty$
+ { cite$ #1 #3 substring$ }
+ 'key
+ if$
+ }
+ { author format.lab.names }
+ if$
+}
+
+FUNCTION {author.editor.key.label}
+{ author empty$
+ { editor empty$
+ { key empty$
+ { cite$ #1 #3 substring$ }
+ 'key
+ if$
+ }
+ { editor format.lab.names }
+ if$
+ }
+ { author format.lab.names }
+ if$
+}
+
+FUNCTION {editor.key.label}
+{ editor empty$
+ { key empty$
+ { cite$ #1 #3 substring$ }
+ 'key
+ if$
+ }
+ { editor format.lab.names }
+ if$
+}
+
+FUNCTION {calc.short.authors}
+{ type$ "book" =
+ type$ "inbook" =
+ or
+ 'author.editor.key.label
+ { type$ "proceedings" =
+ 'editor.key.label
+ 'author.key.label
+ if$
+ }
+ if$
+ 'short.list :=
+}
+
+FUNCTION {calc.label}
+{ calc.short.authors
+ short.list
+ "("
+ *
+ year duplicate$ empty$
+ short.list key field.or.null = or
+ { pop$ "" }
+ 'skip$
+ if$
+ *
+ 'label :=
+}
+
+FUNCTION {sort.format.names}
+{ 's :=
+ #1 'nameptr :=
+ ""
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ { s nameptr
+ "{vv{ } }{ll{ }}{ ff{ }}{ jj{ }}"
+ format.name$ 't :=
+ nameptr #1 >
+ {
+ " " *
+ namesleft #1 = t "others" = and
+ { "zzzzz" * }
+ { t sortify * }
+ if$
+ }
+ { t sortify * }
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+}
+
+FUNCTION {sort.format.title}
+{ 't :=
+ "A " #2
+ "An " #3
+ "The " #4 t chop.word
+ chop.word
+ chop.word
+ sortify
+ #1 global.max$ substring$
+}
+FUNCTION {author.sort}
+{ author empty$
+ { key empty$
+ { "to sort, need author or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { author sort.format.names }
+ if$
+}
+FUNCTION {author.editor.sort}
+{ author empty$
+ { editor empty$
+ { key empty$
+ { "to sort, need author, editor, or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { editor sort.format.names }
+ if$
+ }
+ { author sort.format.names }
+ if$
+}
+FUNCTION {editor.sort}
+{ editor empty$
+ { key empty$
+ { "to sort, need editor or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { editor sort.format.names }
+ if$
+}
+FUNCTION {presort}
+{ calc.label
+ label sortify
+ " "
+ *
+ type$ "book" =
+ type$ "inbook" =
+ or
+ 'author.editor.sort
+ { type$ "proceedings" =
+ 'editor.sort
+ 'author.sort
+ if$
+ }
+ if$
+ #1 entry.max$ substring$
+ 'sort.label :=
+ sort.label
+ *
+ " "
+ *
+ title field.or.null
+ sort.format.title
+ *
+ #1 entry.max$ substring$
+ 'sort.key$ :=
+}
+
+ITERATE {presort}
+SORT
+STRINGS { last.label next.extra }
+INTEGERS { last.extra.num number.label }
+FUNCTION {initialize.extra.label.stuff}
+{ #0 int.to.chr$ 'last.label :=
+ "" 'next.extra :=
+ #0 'last.extra.num :=
+ #0 'number.label :=
+}
+FUNCTION {forward.pass}
+{ last.label label =
+ { last.extra.num #1 + 'last.extra.num :=
+ last.extra.num int.to.chr$ 'extra.label :=
+ }
+ { "a" chr.to.int$ 'last.extra.num :=
+ "" 'extra.label :=
+ label 'last.label :=
+ }
+ if$
+ number.label #1 + 'number.label :=
+}
+FUNCTION {reverse.pass}
+{ next.extra "b" =
+ { "a" 'extra.label := }
+ 'skip$
+ if$
+ extra.label 'next.extra :=
+ extra.label
+ duplicate$ empty$
+ 'skip$
+ { "{\natexlab{" swap$ * "}}" * }
+ if$
+ 'extra.label :=
+ label extra.label * 'label :=
+}
+EXECUTE {initialize.extra.label.stuff}
+ITERATE {forward.pass}
+REVERSE {reverse.pass}
+FUNCTION {bib.sort.order}
+{ sort.label
+ " "
+ *
+ year field.or.null sortify
+ *
+ " "
+ *
+ title field.or.null
+ sort.format.title
+ *
+ #1 entry.max$ substring$
+ 'sort.key$ :=
+}
+ITERATE {bib.sort.order}
+SORT
+FUNCTION {begin.bib}
+{ preamble$ empty$
+ 'skip$
+ { preamble$ write$ newline$ }
+ if$
+ "\begin{thebibliography}{" number.label int.to.str$ * "}" *
+ write$ newline$
+ "\providecommand{\natexlab}[1]{#1}"
+ write$ newline$
+}
+EXECUTE {begin.bib}
+EXECUTE {init.state.consts}
+ITERATE {call.type$}
+FUNCTION {end.bib}
+{ newline$
+ "\end{thebibliography}" write$ newline$
+}
+EXECUTE {end.bib}
+%% End of customized bst file
+%%
+%% End of file `oega.bst'.
diff --git a/biblio/bibtex/contrib/economic/oegatb-ex.bib b/biblio/bibtex/contrib/economic/oegatb-ex.bib
new file mode 100644
index 0000000000..a88bec9011
--- /dev/null
+++ b/biblio/bibtex/contrib/economic/oegatb-ex.bib
@@ -0,0 +1,36 @@
+@ARTICLE{hansen04,
+ author = {Hansen, A. L. and Jacobsen, K. K. and Jensen, B.},
+ year = {2004},
+ title = {Title of Paper},
+ journal = {Journal of Animal Physiology and Animal Nutrition},
+ volume = {68},
+ number = {3},
+ pages = {123-135}
+}
+
+@BOOK{hansen95,
+ author = {Hansen, A.},
+ year = {1995},
+ title = {A Guide to Good Writing for Scientists},
+ edition = {2},
+ address = {Viborg},
+ publisher = {Low Budget Publishing}
+}
+
+@INCOLLECTION{jones95,
+ author = {Jones, A. R. and Walter, H.},
+ year = {1995},
+ title = {Title of Chapter},
+ editor = {Mohr, A. and Wings, P.},
+ booktitle = {New Soil Analysis},
+ pages = {42-51},
+ address = {Copenhagen},
+ publisher = {Danish Soil Association}
+}
+
+@PHDTHESIS{schulze94,
+ author = {Schulze, H.},
+ year = {1994},
+ title = {Endogenous ileal nitrogen losses in pigs: Dietary factors},
+ school = {Wageningen Agricultural University}
+}
diff --git a/biblio/bibtex/contrib/economic/oegatb-ex.pdf b/biblio/bibtex/contrib/economic/oegatb-ex.pdf
new file mode 100644
index 0000000000..391de3234e
--- /dev/null
+++ b/biblio/bibtex/contrib/economic/oegatb-ex.pdf
Binary files differ
diff --git a/biblio/bibtex/contrib/economic/oegatb-ex.png b/biblio/bibtex/contrib/economic/oegatb-ex.png
new file mode 100644
index 0000000000..034c44de97
--- /dev/null
+++ b/biblio/bibtex/contrib/economic/oegatb-ex.png
Binary files differ
diff --git a/biblio/bibtex/contrib/economic/oegatb-ex.tex b/biblio/bibtex/contrib/economic/oegatb-ex.tex
new file mode 100644
index 0000000000..faa5b4a2b5
--- /dev/null
+++ b/biblio/bibtex/contrib/economic/oegatb-ex.tex
@@ -0,0 +1,253 @@
+\documentclass[english]{oegatb}
+\usepackage[utf8]{inputenc}
+\usepackage[T1]{fontenc}
+\usepackage{eurosym}
+\usepackage{tabularx}
+\usepackage{graphicx}
+\usepackage{float}
+
+\title{Titel}
+
+\author{Erste Autorin, Zweiter B. Autor, und Dritte C. Autorin}
+
+\affiliation{%
+Erste A. Autorin ist am Institut für Agrar- und Forstökonomie
+der Universität für Bodenkultur tätig (erste.autorin@boku.ac.at).
+
+Zweiter B. Autor arbeitet bei der Aarhus University,
+Department of Biology, DK-8000, Aarhus, Dänemark.
+Er ist nun bei der Danish Research Centre of Organic Food and Farming,
+DK-8830 Tjele, Dänemark tätig (secondb.author@agrsci.dk).
+
+Dritte C. Autorin ist an der University of Copenhagen,
+Department of Zoology, Denmark (thirdc.author@agrsci.dk).}
+
+
+\begin{document}
+\maketitle
+
+\begin{abstract}
+These instructions give you guidelines for preparing camera-ready short papers
+for the ÖGA 2006 conference proceedings.
+The short papers can be written in German or in English.
+The length of the short paper is maximally two pages.
+There will be no key words.
+Use this document as a template if you are using Microsoft Word 6.0 or later.
+Otherwise, use this document as an instruction set. Define all symbols
+used in the paper.
+Do not cite references in the abstract.
+The abstract should not exceed ca.\ 200 words, which corresponds
+to the double length of this example.
+The footnote symbol following this abstract should not be deleted.
+\end{abstract}
+
+
+\section{Introduction to using the template}
+
+This document is a template for Microsoft Word versions 6.0 or later.
+If you are reading a paper version of this document,
+please download the electronic file, template.doc,
+from the website \url{http://www.boku.ac.at/oega} so you can use it
+to prepare your manuscript.
+
+When you open the template, select ‘Page Layout’ from the ‘View’ menu
+in the menu bar (View | Page Layout),
+which allows you to see the footnotes.
+Then type over the sections or cut and paste from another document
+and then use markup styles.
+The pull-down style menu is at the left of the Formatting Toolbar
+at the top of your Word window.
+For example, the style at this point in the document is ‘Normal text’.
+Highlight a section that you want to designate with a certain style,
+and then select the appropriate name on the style menu.
+The style will adjust your fonts and line spacing.
+Styles used are: title, author, abstract, normal text, heading 1
+(as in ‘introduction above) and footnote.
+Subheadings (as ‘Figures and tables’ in next column are italicized normal text.
+Do not change the font sizes or line spacing to squeeze more text
+into a limited number of pages.
+Use italics for emphasis; do not underline.
+Please note that there is a tab at the beginning of each paragraph,
+except for the first paragraph in a section.
+
+
+\section{Procedure for paper submission}
+
+Papers must be submitted by 31st August 2006 per email to
+\url{michaela.groetzer@boku.ac.at}.
+Papers received after this deadline cannot be included in the proceedings.
+Paper exceeding 2 pages can also not be included in the proceedings.
+The submitted paper must be in camera-ready format and in a word file.
+It will be placed into the conference proceedings as received
+and without substantial editing or reviewing.
+Therefore, we recommend that you get one or two colleagues
+to proofread the paper.
+
+
+\section{Structure of the short paper}
+
+The short paper should be structured as any other scientific publication.
+You should start with an introduction which includes background information
+(why is the topic of your research relevant?
+What have other authors found out about the topic?)
+and the specific question you tried to answer in your study
+(what is your aim and/or hypothesis?).
+
+The second section should explain the methods you used,
+so that the readers have clear information on how (and where)
+the data was collected and what methods were used to analyse the data.
+
+The third section should present the results of your research,
+i.e.\ describe your major findings.
+Please try to be as succinct as possible,
+presenting only the most relevant data in condensed form.
+
+In the fourth section you should explain how you interpret your results
+(do not leave the reader thinking "So what?").
+Continually refer to your results (but do not repeat them).
+Do not extend your conclusions beyond those
+which are directly supported by your results.
+Speculation has its place, but should not form the bulk of the discussion.
+Be sure to address the objectives of the study
+(which you stated in the introduction).
+Discuss the significance of your results in light of other published work.
+End the discussion with a short summary or conclusion
+regarding the significance of the work.
+
+
+\section{Helpful hints on formatting}
+
+\subsection{Figures and tables}
+As there will be no final formatting of your paper,
+you need to place figures and tables in the paper accordingly,
+usually at the top or bottom of column.
+Large figures and tables may span both columns,
+but it is easier to include a one-column figure or table.
+Place figure captions below the figures; place table titles above the tables.
+
+\begin{table}[H]
+\caption{Soil properties for the two studied soils
+(Style used is Normal text, but font size 7).}
+\scriptsize
+\renewcommand{\arraystretch}{1.1}
+\begin{tabularx}{\columnwidth}{Xcc}
+\hline
+Soil property & Soil A & Soil B\\
+\hline
+Temperature (C) & 15 & 12\\
+pH & 7.4 & 6.2\\
+Organic C (mg/kg) & 1.2 & 2.4\\
+\hline
+\end{tabularx}\\
+\textsuperscript{a} Water content is given on a soil dry weight basis.
+\end{table}
+
+Please verify that the figures and tables you mention in the text
+actually exist. Please do not include captions as part of the figures.
+Do not put captions in text boxes linked to the figures.
+Do not put borders around the outside of your figures.
+Use the abbreviation ``Fig.'' except at the beginning of a sentence,
+where ``Figure'' should be used.
+Do not abbreviate ``Table.''
+Tables are numbered with Roman numerals.
+Insert tables by use of the Table lay-out, not just as tabulated text and data.
+
+Figure axis labels are often a source of confusion.
+Use words rather than symbols.
+As an example, write the quantity ``Transport cost in \euro'', not just ``\euro''.
+Put units in parentheses.
+Do not label axes only with units.
+
+Figure labels should be legible, approximately 8 point type.
+Color printing of figures is not available.
+
+\subsection{Numbers}
+Figures are used for all units and quantities (e.g., 8 mm, 3 years, 6 kg)
+with a space between the figure and the measurement description.
+In descriptive text, numbers from one to nine are spelled out
+and figures are used for 10 and over (e.g., six pigs, 27 sows)
+except where the number begins a sentence,
+thus: ``Three years ago ....''.
+If you use percentages, please do not include a space between the number
+and the percentage sign (e.g. 20\% of farmers).
+
+\subsection{Abbreviations and Acronyms}
+Define abbreviations and acronyms the first time they are used in the text.
+Do not use abbreviations in the title unless they are unavoidable.
+
+\subsection{Data and units}
+Indicate which measure is being used when data are presented;
+e.g., 53.8 $\pm$ 1.5 g/L (mean $\pm$ SE).
+For tests of significance, use the form, e.g., ``P<0.001''.
+
+Use of SI units is strongly encouraged.
+Use the center dot to separate compound units (A$\cdot$m2).
+
+\subsection{Tense}
+If you wish, you may write in the first person singular
+or plural and use the active voice
+(``We observed that...'' instead of ``It was observed that ...'' or
+``The authors observed that...'').
+Remember to check spelling.
+If your native language is not English or German
+(depending on the language you write in),
+please get a native speaker to proofread your paper.
+
+
+\section{Guidelines for references}
+
+\subsection{In text}
+
+In the body of the text,
+references should be cited according to the following rules.\\
+- Where a paper is by three or more authors,
+ the name of the first author should be followed by et al.\
+ [\citet{hansen04} demonstrated\ldots] or
+ [as previously demonstrated \citep{hansen04}].\\
+- Please place a comma between the author's name and the year
+ \citep{schulze94,hansen95}.
+ - The earliest work is reported first.\\
+- Letters following the year are used to differentiate between
+ two or more papers with the same authors and the same year
+ (Smith, 1964a, 1964b).\\
+- A semi-colon separates reference to different authors
+ \citep{schulze94,hansen04}.
+
+\begin{figure}[H]
+\includegraphics[width=0.9\columnwidth]{oegatb-ex.png}
+\caption{Air temperature during the summer in Denmark
+(Style as normal text, but in italic and font size 7).}
+\end{figure}
+
+
+\subsection{Reference list}
+A complete list of the references cited in the text must be arranged
+alphabetically at the end of your paper under the heading References.
+
+For papers published in journals: Authors' names, year of publication,
+title of paper, name of journal (in full and italics), volume number (issue),
+and the first and last page numbers should be given, in that order.
+
+For books: Authors' names, year of publication, title of book (in italics),
+volume or edition number, place of publication and name of publisher
+should be given in that order.
+
+For chapters in a book: Authors' names, year of publication, title of chapter.
+In: editors. Title of Book (in italics), first and last page,
+place of publication and name of publisher.
+
+For a thesis: The author's name, year of publication, title of the thesis,
+degree and University should be given, in that order.
+
+There is a 4 pt space between references (4pt before each paragraph).
+
+
+\section{Acknowledgement}
+
+I would like to thank the Joint Organic Congress for providing
+this template and most of the detailed instructions included in it.
+
+\nocite{*}
+\bibliography{oegatb-ex}
+
+\end{document}
diff --git a/biblio/bibtex/contrib/economic/oegatb.cls b/biblio/bibtex/contrib/economic/oegatb.cls
new file mode 100644
index 0000000000..8280b6b59e
--- /dev/null
+++ b/biblio/bibtex/contrib/economic/oegatb.cls
@@ -0,0 +1,220 @@
+%%% LaTeX class for short papers for publication in the "Tagungsband"
+%%% of the "Oesterreichische Gesellschaft für Agraroekonomie" (OeGA)
+%%%
+%%% author: Arne Henningsen
+%%% version: 1.0 (19 August 2008)
+%%% license: LaTeX Project Public License
+%%%
+%%% Note: This is an unofficial style file that may not fully comply
+%%% with the OeGA Formatting Instructions in every detail.
+%%% Please report any problems at
+%%% http://sourceforge.net/projects/economtex/
+%%% Further information is available at
+%%% http://economtex.wiki.sourceforge.net/
+%%%
+%%% This document class is based on the "scrartcl" class
+%%% from the KOMA script bundle.
+%%% Following additional packages are required:
+%%% amsmath, babel, fancyhdr, geometry, helvet, ifthen,
+%%% natbib, setspace, titlesec, url
+%%%
+%%% The class provides following options:
+%%% german - German language (default)
+%%% english - English language
+%%% nopagenumbers - suppress page numbers
+%%%
+%%%
+%%% The corresponding BibTeX style file "oega.bst" is used
+%%% for the bibliography: \bibliographystyle{oega}
+%%%
+%%% This document class provides following new commands:
+%%% \affiliation should be used to add affiliation information
+
+
+\NeedsTeXFormat{LaTeX2e}
+\ProvidesClass{oegatb}[2008/08/19 LaTeX class for the OeGA Tagungsband]
+
+% option for English language
+\newif\if@LanguageEnglish
+\@LanguageEnglishfalse
+\DeclareOption{english}{\@LanguageEnglishtrue}
+\DeclareOption{german}{\@LanguageEnglishfalse}
+
+% option for no page numbers
+\newif\if@PageNumbers
+\@PageNumberstrue
+\DeclareOption{nopagenumbers}{\@PageNumbersfalse}
+
+% pass any options on to the scrartcl class and load this class with some options
+\DeclareOption*{\PassOptionsToClass{\CurrentOption}{scrartcl}}
+\ProcessOptions\relax
+\LoadClass[10pt,tablecaptionabove]{scrartcl}
+% tablecaptionabove = use \captionabove for tables
+
+% load ifthen package
+\RequirePackage{ifthen}
+
+% Verdana font
+\RequirePackage[scaled=1.18]{helvet}
+\renewcommand\familydefault{phv}
+
+% page format, margins
+\RequirePackage{geometry}
+\geometry{a4paper, tmargin=2.3cm, bmargin=2.5cm, lmargin=2.6cm,
+ rmargin=2.0cm, headheight=0in, headsep=0in, footskip=1.25cm}
+
+% language
+\if@LanguageEnglish
+ \RequirePackage[english]{babel}
+\else
+ \RequirePackage[ngerman]{babel}
+\fi
+
+% space between columns
+\setlength{\columnsep}{1.25cm}
+
+% spacing
+\RequirePackage{setspace}
+
+% formatting of main text
+\newcommand{\StartTextFormat}{%
+ \footnotesize%
+ \begin{spacing}{1.18}%
+}
+\newcommand{\EndTextFormat}{%
+ \end{spacing}%
+}
+
+% spacing around (sub)section headers
+\RequirePackage{titlesec}
+\titlespacing*{\section}{0pt}{1em}{0.25em}
+\titlespacing*{\subsection}{0pt}{0.85em}{0.15em}
+
+% spacing around formulas
+\newcommand{\SetFormulaSpacings}{
+\setlength{\abovedisplayshortskip}{6pt}
+\setlength{\belowdisplayshortskip}{6pt}
+\setlength{\abovedisplayskip}{6pt}
+\setlength{\belowdisplayskip}{6pt}
+\allowdisplaybreaks
+}
+
+% spacing around captions and floats
+\setlength{\abovecaptionskip}{6pt}
+\setlength{\belowcaptionskip}{3pt}
+\setlength{\floatsep}{0pt}
+\setlength{\textfloatsep}{20pt}
+\setlength{\intextsep}{5pt}
+
+% section headers: centering and set font
+\titleformat{\section}[block]
+ {\normalfont\filcenter}
+ {\arabic{section}. }
+ {0pt}
+ {\normalfont\small\scshape}
+
+% subsection headers: font
+\setkomafont{subsection}{\normalfont\footnotesize\itshape}
+
+% footnote: font
+\setkomafont{footnote}{\fontsize{6pt}{8pt}\selectfont}
+% no rule between text and footnotes
+\renewcommand{\footnoterule}{}
+
+% URLS: font
+\RequirePackage{url}
+\def\UrlFont{\sffamily}
+
+% math
+\RequirePackage{amsmath}
+
+% citations and bibliography
+\RequirePackage[authoryear]{natbib}
+\setlength{\bibsep}{4pt}
+\setlength{\bibhang}{0em}
+\bibliographystyle{oega}
+
+% set footer
+\RequirePackage{fancyhdr}
+\renewcommand{\headrulewidth}{0pt}
+\newcommand{\FormatFooters}{%
+\fancyhead{}
+\fancyfoot{}
+% \fancyfoot[L]{\fontsize{6pt}{8pt}\selectfont{\"O}GA Tagungsband \the\year}
+\if@PageNumbers
+ \fancyfoot[R]{\footnotesize\thepage}
+\fi
+\pagestyle{fancy}
+}
+
+% captions of figures and tables
+\setcapindent{0pt}
+\setkomafont{captionlabel}{\normalfont\scriptsize}
+\setkomafont{caption}{\normalfont\scriptsize}
+\renewcommand{\captionformat}{.\ }
+
+% section and subsections are not numbered
+\setcounter{secnumdepth}{0}
+
+% titlepage without author and date
+\renewcommand{\maketitle}{
+\twocolumn[
+ \begin{@twocolumnfalse}
+ \begin{center}
+ \vspace*{5mm}
+ \begin{huge}
+ \begin{spacing}{1.25}
+ \@title
+ \end{spacing}
+ \end{huge}
+ \vspace*{6mm}
+ \@author\\
+ \vspace*{4.5mm}
+ \end{center}
+ \end{@twocolumnfalse}
+ ]
+\StartTextFormat
+}
+
+% abstract with affiliation
+\newcommand{\affiliation}[1]{\newcommand{\@affiliation}{#1}}
+\renewenvironment{abstract}{%
+\noindent%
+\scriptsize%
+\bfseries%
+\textit{Abstract} --
+}{%
+\ifthenelse{ \isundefined\@affiliation }{
+\ClassWarning{oegatb}{no affiliation specified.
+ Please use command \protect\affiliation}%
+}{%
+\deffootnote[0pt]{0pt}{1.5em}{}%
+\hspace{-1.0em}\footnote{\@affiliation}}%
+\deffootnote[0.5em]{0.5em}{1.5em}{\textsuperscript{\thefootnotemark}}%
+}
+
+% avoid clubs and widows
+\clubpenalty=10000
+\widowpenalty=10000
+% \displaywidowpenalty=10000
+
+% increase stretchability of the spaces (avoid overful hboxes)
+\setlength{\emergencystretch}{3em}
+
+% commands that should be used at the beginning / end of the document
+\AtBeginDocument{
+\sffamily
+\SetFormulaSpacings
+\FormatFooters
+}
+\AtEndDocument{
+\EndTextFormat
+}
+
+% for compatibility with other classes
+\newcommand{\keywords}[1]{\newcommand{\@keywords}{#1}} % ignored
+\newcommand{\jelclass}[1]{\newcommand{\@jelclass}{#1}} % ignored
+
+% for compatibility with erae.cls
+\newcommand{\citetPage}[2]{\citeauthor{#2} (\citeyear{#2}, p.~#1)}
+\newcommand{\citepPage}[2]{\citetext{\citealp{#2}, p.~#1}}
diff --git a/biblio/bibtex/contrib/economic/pocoec.cls b/biblio/bibtex/contrib/economic/pocoec.cls
new file mode 100644
index 0000000000..55246ef231
--- /dev/null
+++ b/biblio/bibtex/contrib/economic/pocoec.cls
@@ -0,0 +1,257 @@
+%%% LaTeX class for manuscripts submitted to the
+%%% Journal 'Post-Communist Economies' (PoCoEc)
+%%%
+%%% author: Arne Henningsen
+%%% version: 1.3 (18 November 2009)
+%%% license: LaTeX Project Public License
+%%%
+%%% Note: This is an unofficial style file that may not fully comply
+%%% with the PoCoEc formatting instructions in every detail.
+%%% Please report any problems at
+%%% http://sourceforge.net/projects/economtex/
+%%% Further information is available at
+%%% http://economtex.wiki.sourceforge.net/
+%%%
+%%% This document class is based on the "scrartcl" class
+%%% from the KOMA script bundle.
+%%% Following additional packages are required:
+%%% amsmath, babel, csquotes, endfloat, endnotes, geometry
+%%% ifthen, lmodern, natbib, setspace, stringstrings, textcomp, url
+%%%
+%%% The class provides the following options:
+%%% noendfloat - don't move floats to the end of the paper
+%%% nofulltitlepage - suppress "full" title page with author names,
+%%% affiliations, and address of corresponding author
+%%% noshorttitlepage - suppress "short" title page without information
+%%% about authors
+%%% showauthor - show author name(s) on "short" title page
+%%% (useful in combination with option "nofulltitlepage")
+%%%
+%%% This class selects the BibTeX style "tandfx.bst".
+%%% (Taylor and Francis Reference Style X)
+%%%
+%%% This class provides 5 new commands:
+%%% \affiliation specify affiliation(s) of the authors
+%%% \cauthormark mark the corresponding author (by an asterisk)
+%%% \cauthoraddress specify address of the corresponding author
+%%% \keywords specify some keywords (separated by semicolons)
+%%%
+%%%
+%%% Websites of the journal ``Post-Communist Economies":
+%%%
+%%%
+
+\NeedsTeXFormat{LaTeX2e}
+\ProvidesClass{pocoec}[2009/11/18 LaTeX class for the journal 'Post-Communist Economies']
+
+% package for convenient if-then-else statements
+\RequirePackage{ifthen}
+
+% option to NOT place floats at the end
+\newif\if@useendfloat
+\@useendfloattrue
+\DeclareOption{noendfloat}{\@useendfloatfalse}
+
+% option to suppress the full title page with author names
+\newif\if@makefulltitlepage
+\@makefulltitlepagetrue
+\DeclareOption{nofulltitlepage}{\@makefulltitlepagefalse}
+
+% option to suppress the short title page without author names
+\newif\if@makeshorttitlepage
+\@makeshorttitlepagetrue
+\DeclareOption{noshorttitlepage}{\@makeshorttitlepagefalse}
+
+% option to show author name(s)
+\newif\if@showauthor
+\@showauthorfalse
+\DeclareOption{showauthor}{\@showauthortrue}
+
+
+% pass any options on to the scrartcl class and load this class with some options
+\DeclareOption*{\PassOptionsToClass{\CurrentOption}{scrartcl}}
+\ProcessOptions\relax
+\LoadClass[12pt,english,pointednumbers,tablecaptionabove]{scrartcl}
+% pointednumbers = add final dot after ordinary section numbers
+% tablecaptionabove = use \captionabove for tables
+
+% additional symbols
+\RequirePackage{textcomp}
+
+% page format, margins
+\RequirePackage{geometry}
+\geometry{a4paper, tmargin=2.5cm, bmargin=2.8cm, lmargin=2.8cm,
+ rmargin=2.8cm, headheight=0cm, headsep=0cm, footskip=1.2cm }
+
+% double spacing
+\RequirePackage{setspace}
+\doublespacing
+
+% spacing around formulas
+\AtBeginDocument{
+\setlength{\abovedisplayshortskip}{6pt}
+\setlength{\belowdisplayshortskip}{6pt}
+\setlength{\abovedisplayskip}{6pt}
+\setlength{\belowdisplayskip}{6pt}
+\allowdisplaybreaks
+}
+
+% spacing around captions and floats
+\setlength{\abovecaptionskip}{6pt}
+\setlength{\belowcaptionskip}{3pt}
+\setlength{\floatsep}{0pt}
+\setlength{\textfloatsep}{20pt}
+\setlength{\intextsep}{6mm}
+
+% font families: times/helvetica/courier
+\RequirePackage{mathptmx}
+\RequirePackage[scaled=.90]{helvet}
+\RequirePackage{courier}
+
+% section headers
+\setkomafont{section}{\rmfamily\bfseries}
+\setkomafont{subsection}{\rmfamily\bfseries\itshape}
+\setkomafont{subsubsection}{\rmfamily\itshape}
+\setkomafont{paragraph}{\rmfamily\itshape}
+\setcounter{secnumdepth}{0}
+
+% amsmath
+\RequirePackage{amsmath}
+% for compatibility with ajae.cls
+\newcommand{\veclatin}[1]{#1}
+\newcommand{\matlatin}[1]{#1}
+\newcommand{\vecgreek}[1]{#1}
+\newcommand{\matgreek}[1]{#1}
+
+% font for URLs
+\RequirePackage{url}
+\def\UrlFont{\rmfamily}
+
+% citations and bibliography
+\RequirePackage[authoryear]{natbib}
+\bibpunct{(}{)}{,}{a}{}{,}
+\setlength{\bibsep}{0pt}
+\bibliographystyle{tandfx}
+
+% captions of figures and tables
+\setcapwidth[l]{\textwidth}
+\setcapindent{0pt}
+\setkomafont{captionlabel}{\normalsize\normalfont\bfseries}
+\setkomafont{caption}{\normalsize\normalfont\bfseries}
+\renewcommand{\captionformat}{.\ }
+
+% titlepage(s)
+\newcommand{\affiliation}[1]{\newcommand{\@affiliation}{#1}}
+\newcommand{\affilmark}[1]{\textsuperscript{\normalfont{#1}}}
+\newcommand{\email}[1]{\newcommand{\@email}{#1}}
+\newif\if@cauthormarkused
+\@cauthormarkusedfalse
+\newcommand{\cauthormark}{\textsuperscript{*}\@cauthormarkusedtrue}
+\RequirePackage{stringstrings}
+\renewcommand{\maketitle}{
+ \if@makefulltitlepage
+ \setcounter{page}{0}
+ \thispagestyle{empty}
+ \vspace*{12mm}
+ \begin{spacing}{1.5}\noindent
+ \large{\textbf{\@title}}%
+ \end{spacing}
+ \vspace*{6mm}
+ \ifthenelse{ \isundefined\@author }{
+ \ClassWarning{pocoec}{No author(s) specified.
+ Please specify with command \protect\author}
+ }{
+ }
+ \noindent
+ \@author\\
+ \if@cauthormarkused
+ \else
+ \ClassWarningNoLine{pocoec}{No author has been indicated as
+ corresponding author.
+ Please specify with command \protect\cauthormark}
+ \fi
+ \vspace*{6mm}
+ \begin{spacing}{1.1}
+ \ifthenelse{ \isundefined\@affiliation }{
+ \ClassWarning{pocoec}{No affiliation(s) specified.
+ Please specify with command \protect\affiliation}
+ }{
+ \noindent
+ \textit{\@affiliation}\\
+ }
+ \vfill
+ \ifthenelse{ \isundefined\@email }{
+ \ClassWarningNoLine{pocoec}{No email address of the corresponding author
+ is specified. Please specify with command \protect\email}
+ }{
+ \noindent
+ \rule{0.3\textwidth}{0.1mm}\\
+ \vspace*{2mm}\noindent
+ \cauthormark%
+ \findwords[q]{\@author}{~and~}%
+ \ifthenelse{ \equal{\theresult}{0} }{}{%
+ Corresponding author.
+ }%
+ Email: \url{\@email}\\
+ }
+ \end{spacing}
+ \vspace*{5mm}
+ \clearpage
+ \fi
+ \if@makeshorttitlepage
+ \begin{spacing}{1.5}\noindent
+ \large{\textbf{\@title}}
+ \if@showauthor
+ \renewcommand{\cauthormark}{}
+ \findwords[q]{\@author}{~and~}%
+ \ifthenelse{ \equal{\theresult}{0} }{%
+ \renewcommand{\affilmark}[1]{}}{}%
+ \vspace*{3mm}\\
+ \@author
+ \vspace*{1mm}\\
+ \textit{\small \@affiliation}
+ \fi
+ \end{spacing}
+ \vspace*{4mm}
+ \fi
+}
+
+% abstract, keywords
+\newcommand{\keywords}[1]{\newcommand{\@keywords}{#1}}
+\newcommand{\jelclass}[1]{\newcommand{\@jelclass}{#1}}
+\renewenvironment{abstract}{%
+ \vspace*{5mm}
+ \noindent
+ \textbf{Abstract}\\
+ \noindent
+}{%
+ \ifthenelse{ \isundefined\@keywords }{
+ \ClassWarningNoLine{pocoec}{No keywords specified.
+ Please use the command \protect\keywords}
+ }{
+ \vspace*{5mm}\\ \noindent
+ \textbf{Keywords:} \@keywords%
+ }
+ \vspace*{5mm}
+ \clearpage
+}
+
+% use babel package and set language to british english
+\RequirePackage[english,british]{babel}
+
+% avoid clubs and widows
+\clubpenalty=10000
+\widowpenalty=10000
+% \displaywidowpenalty=10000
+
+% increase stretchability of the spaces (avoid overful hboxes)
+\setlength{\emergencystretch}{3em}
+
+% move floats to the end of the paper
+\if@useendfloat
+ \RequirePackage[nolists,tablesfirst]{endfloat}
+\fi
+
+% for compatibility with erae.cls
+\newcommand{\citetPage}[2]{\citeauthor{#2} (\citeyear{#2}, p.~#1)}
+\newcommand{\citepPage}[2]{\citetext{\citealp{#2}, p.~#1}}
diff --git a/biblio/bibtex/contrib/economic/regstud.bst b/biblio/bibtex/contrib/economic/regstud.bst
new file mode 100644
index 0000000000..afb2165b69
--- /dev/null
+++ b/biblio/bibtex/contrib/economic/regstud.bst
@@ -0,0 +1,1431 @@
+%%% journal "Regional Studies" (RegStud)
+%%% bibliography style for use with LaTeX2e
+%%% version: 1.0 (15 January 2008)
+%%% license: LaTeX Project Public License (see below)
+%%% This file was created with makebst (see below) and modified
+%%% by Arne Henningsen.
+%%% Note: This is an unofficial style file that may not fully comply
+%%% with the reference guidelines of "Regional Studies" in every detail.
+%%% Please report any problems at
+%%% http://sourceforge.net/projects/economtex/
+%%% Further information is available at
+%%% http://economtex.wiki.sourceforge.net/
+%%%
+%%% This BibTeX style should be used with the corresponding
+%%% LaTeX class "regstud" (regstud.cls).
+%%% Otherwise, the following line has to be added to the LaTeX preamble:
+%%% \usepackage[authoryear]{natbib}
+%%%
+%%
+%% This is file `regstud.bst',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% merlin.mbs (with options: `ay,nat,nm-rev,ed-rev,jnrlst,nmft,nmft-sc,nmfted,nmand-rm,lab,lab-sc,and-rm,keyxyr,dt-beg,yr-par,yrp-x,note-yr,thtit-a,vol-bf,volp-com,num-xser,ser-vol,jnm-x,edparxc,bkedcap,blk-com,pp,ed,abr,xedn,and-xcom,etal-it,em-it,nfss,')
+%% ----------------------------------------
+%% *** Regional Studies ***
+%%
+%% Copyright 1994-2004 Patrick W Daly
+ % ===============================================================
+ % IMPORTANT NOTICE:
+ % This bibliographic style (bst) file has been generated from one or
+ % more master bibliographic style (mbs) files, listed above.
+ %
+ % This generated file can be redistributed and/or modified under the terms
+ % of the LaTeX Project Public License Distributed from CTAN
+ % archives in directory macros/latex/base/lppl.txt; either
+ % version 1 of the License, or any later version.
+ % ===============================================================
+ % Name and version information of the main mbs file:
+ % \ProvidesFile{merlin.mbs}[2004/02/09 4.13 (PWD, AO, DPC)]
+ % For use with BibTeX version 0.99a or later
+ %-------------------------------------------------------------------
+ % This bibliography style file is intended for texts in ENGLISH
+ % This is an author-year citation style bibliography. As such, it is
+ % non-standard LaTeX, and requires a special package file to function properly.
+ % Such a package is natbib.sty by Patrick W. Daly
+ % The form of the \bibitem entries is
+ % \bibitem[Jones et al.(1990)]{key}...
+ % \bibitem[Jones et al.(1990)Jones, Baker, and Smith]{key}...
+ % The essential feature is that the label (the part in brackets) consists
+ % of the author names, as they should appear in the citation, with the year
+ % in parentheses following. There must be no space before the opening
+ % parenthesis!
+ % With natbib v5.3, a full list of authors may also follow the year.
+ % In natbib.sty, it is possible to define the type of enclosures that is
+ % really wanted (brackets or parentheses), but in either case, there must
+ % be parentheses in the label.
+ % The \cite command functions as follows:
+ % \citet{key} ==>> Jones et al. (1990)
+ % \citet*{key} ==>> Jones, Baker, and Smith (1990)
+ % \citep{key} ==>> (Jones et al., 1990)
+ % \citep*{key} ==>> (Jones, Baker, and Smith, 1990)
+ % \citep[chap. 2]{key} ==>> (Jones et al., 1990, chap. 2)
+ % \citep[e.g.][]{key} ==>> (e.g. Jones et al., 1990)
+ % \citep[e.g.][p. 32]{key} ==>> (e.g. Jones et al., p. 32)
+ % \citeauthor{key} ==>> Jones et al.
+ % \citeauthor*{key} ==>> Jones, Baker, and Smith
+ % \citeyear{key} ==>> 1990
+ %---------------------------------------------------------------------
+
+ENTRY
+ { address
+ author
+ booktitle
+ chapter
+ edition
+ editor
+ eid
+ howpublished
+ institution
+ journal
+ key
+ month
+ note
+ number
+ organization
+ pages
+ publisher
+ school
+ series
+ title
+ type
+ volume
+ year
+ }
+ {}
+ { label extra.label sort.label short.list }
+INTEGERS { output.state before.all mid.sentence after.sentence after.block }
+FUNCTION {init.state.consts}
+{ #0 'before.all :=
+ #1 'mid.sentence :=
+ #2 'after.sentence :=
+ #3 'after.block :=
+}
+STRINGS { s t}
+FUNCTION {output.nonnull}
+{ 's :=
+ output.state mid.sentence =
+ { ", " * write$ }
+ { output.state after.block =
+ { add.period$ write$
+ newline$
+ "\newblock " write$
+ }
+ { output.state before.all =
+ 'write$
+ { add.period$ " " * write$ }
+ if$
+ }
+ if$
+ mid.sentence 'output.state :=
+ }
+ if$
+ s
+}
+FUNCTION {output}
+{ duplicate$ empty$
+ 'pop$
+ 'output.nonnull
+ if$
+}
+FUNCTION {output.check}
+{ 't :=
+ duplicate$ empty$
+ { pop$ "empty " t * " in " * cite$ * warning$ }
+ 'output.nonnull
+ if$
+}
+FUNCTION {fin.entry}
+{ add.period$
+ write$
+ newline$
+}
+
+FUNCTION {new.block}
+{ output.state before.all =
+ 'skip$
+ { after.block 'output.state := }
+ if$
+}
+FUNCTION {new.sentence}
+{ output.state after.block =
+ 'skip$
+ { output.state before.all =
+ 'skip$
+ { after.sentence 'output.state := }
+ if$
+ }
+ if$
+}
+FUNCTION {add.blank}
+{ " " * before.all 'output.state :=
+}
+
+FUNCTION {date.block}
+{
+ add.blank
+}
+
+FUNCTION {not}
+{ { #0 }
+ { #1 }
+ if$
+}
+FUNCTION {and}
+{ 'skip$
+ { pop$ #0 }
+ if$
+}
+FUNCTION {or}
+{ { pop$ #1 }
+ 'skip$
+ if$
+}
+FUNCTION {new.block.checkb}
+{ empty$
+ swap$ empty$
+ and
+ 'skip$
+ 'new.block
+ if$
+}
+FUNCTION {field.or.null}
+{ duplicate$ empty$
+ { pop$ "" }
+ 'skip$
+ if$
+}
+FUNCTION {emphasize}
+{ duplicate$ empty$
+ { pop$ "" }
+ { "\textit{" swap$ * "}" * }
+ if$
+}
+FUNCTION {bolden}
+{ duplicate$ empty$
+ { pop$ "" }
+ { "\textbf{" swap$ * "}" * }
+ if$
+}
+FUNCTION {scaps}
+{ duplicate$ empty$
+ { pop$ "" }
+ { "\textsc{" swap$ * "}" * }
+ if$
+}
+FUNCTION {bib.name.font}
+{ scaps }
+FUNCTION {bib.fname.font}
+{ bib.name.font }
+FUNCTION {cite.name.font}
+{ scaps }
+FUNCTION {tie.or.space.prefix}
+{ duplicate$ text.length$ #3 <
+ { "~" }
+ { " " }
+ if$
+ swap$
+}
+
+FUNCTION {capitalize}
+{ "u" change.case$ "t" change.case$ }
+
+FUNCTION {space.word}
+{ " " swap$ * " " * }
+ % Here are the language-specific definitions for explicit words.
+ % Each function has a name bbl.xxx where xxx is the English word.
+ % The language selected here is ENGLISH
+FUNCTION {bbl.and}
+{ "and"}
+
+FUNCTION {bbl.etal}
+{ "et~al." }
+
+FUNCTION {bbl.editors}
+{ "eds." }
+
+FUNCTION {bbl.editor}
+{ "ed." }
+
+FUNCTION {bbl.edby}
+{ "edited by" }
+
+FUNCTION {bbl.edition}
+{ "edn." }
+
+FUNCTION {bbl.volume}
+{ "vol." }
+
+FUNCTION {bbl.of}
+{ "of" }
+
+FUNCTION {bbl.number}
+{ "no." }
+
+FUNCTION {bbl.nr}
+{ "no." }
+
+FUNCTION {bbl.in}
+{ "in" }
+
+FUNCTION {bbl.pages}
+{ "pp." }
+
+FUNCTION {bbl.page}
+{ "p." }
+
+FUNCTION {bbl.chapter}
+{ "chap." }
+
+FUNCTION {bbl.techrep}
+{ "Tech. Rep." }
+
+FUNCTION {bbl.mthesis}
+{ "Master's thesis" }
+
+FUNCTION {bbl.phdthesis}
+{ "Ph.D. thesis" }
+
+MACRO {jan} {"Jan."}
+
+MACRO {feb} {"Feb."}
+
+MACRO {mar} {"Mar."}
+
+MACRO {apr} {"Apr."}
+
+MACRO {may} {"May"}
+
+MACRO {jun} {"Jun."}
+
+MACRO {jul} {"Jul."}
+
+MACRO {aug} {"Aug."}
+
+MACRO {sep} {"Sep."}
+
+MACRO {oct} {"Oct."}
+
+MACRO {nov} {"Nov."}
+
+MACRO {dec} {"Dec."}
+
+MACRO {acmcs} {"ACM Computing Surveys"}
+
+MACRO {acta} {"Acta Informatica"}
+
+MACRO {cacm} {"Communications of the ACM"}
+
+MACRO {ibmjrd} {"IBM Journal of Research and Development"}
+
+MACRO {ibmsj} {"IBM Systems Journal"}
+
+MACRO {ieeese} {"IEEE Transactions on Software Engineering"}
+
+MACRO {ieeetc} {"IEEE Transactions on Computers"}
+
+MACRO {ieeetcad}
+ {"IEEE Transactions on Computer-Aided Design of Integrated Circuits"}
+
+MACRO {ipl} {"Information Processing Letters"}
+
+MACRO {jacm} {"Journal of the ACM"}
+
+MACRO {jcss} {"Journal of Computer and System Sciences"}
+
+MACRO {scp} {"Science of Computer Programming"}
+
+MACRO {sicomp} {"SIAM Journal on Computing"}
+
+MACRO {tocs} {"ACM Transactions on Computer Systems"}
+
+MACRO {tods} {"ACM Transactions on Database Systems"}
+
+MACRO {tog} {"ACM Transactions on Graphics"}
+
+MACRO {toms} {"ACM Transactions on Mathematical Software"}
+
+MACRO {toois} {"ACM Transactions on Office Information Systems"}
+
+MACRO {toplas} {"ACM Transactions on Programming Languages and Systems"}
+
+MACRO {tcs} {"Theoretical Computer Science"}
+FUNCTION {bibinfo.check}
+{ swap$
+ duplicate$ missing$
+ {
+ pop$ pop$
+ ""
+ }
+ { duplicate$ empty$
+ {
+ swap$ pop$
+ }
+ { swap$
+ pop$
+ }
+ if$
+ }
+ if$
+}
+FUNCTION {bibinfo.warn}
+{ swap$
+ duplicate$ missing$
+ {
+ swap$ "missing " swap$ * " in " * cite$ * warning$ pop$
+ ""
+ }
+ { duplicate$ empty$
+ {
+ swap$ "empty " swap$ * " in " * cite$ * warning$
+ }
+ { swap$
+ pop$
+ }
+ if$
+ }
+ if$
+}
+STRINGS { bibinfo}
+INTEGERS { nameptr namesleft numnames }
+
+FUNCTION {format.names}
+{ 'bibinfo :=
+ duplicate$ empty$ 'skip$ {
+ 's :=
+ "" 't :=
+ #1 'nameptr :=
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ { s nameptr
+ "{vv~}{ll}{ f.}{, jj}"
+ format.name$
+ bib.name.font
+ bibinfo bibinfo.check
+ 't :=
+ nameptr #1 >
+ {
+ namesleft #1 >
+ { ", " * t * }
+ {
+ s nameptr "{ll}" format.name$ duplicate$ "others" =
+ { 't := }
+ { pop$ }
+ if$
+ t "others" =
+ {
+ " " * bbl.etal emphasize *
+ }
+ {
+ bbl.and
+ space.word * t *
+ }
+ if$
+ }
+ if$
+ }
+ 't
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+ } if$
+}
+FUNCTION {format.names.ed}
+{
+ format.names
+}
+FUNCTION {format.key}
+{ empty$
+ { key field.or.null }
+ { "" }
+ if$
+}
+
+FUNCTION {format.authors}
+{ author "author" format.names
+}
+FUNCTION {get.bbl.editor}
+{ editor num.names$ #1 > 'bbl.editors 'bbl.editor if$ }
+
+FUNCTION {format.editors}
+{ editor "editor" format.names duplicate$ empty$ 'skip$
+ {
+ " " *
+ get.bbl.editor
+ capitalize
+ "(" swap$ * ")" *
+ *
+ }
+ if$
+}
+FUNCTION {format.note}
+{
+ note empty$
+ { "" }
+ { note #1 #1 substring$
+ duplicate$ "{" =
+ 'skip$
+ { output.state mid.sentence =
+ { "l" }
+ { "u" }
+ if$
+ change.case$
+ }
+ if$
+ note #2 global.max$ substring$ * "note" bibinfo.check
+ }
+ if$
+}
+
+FUNCTION {format.title}
+{ title
+ duplicate$ empty$ 'skip$
+ { "t" change.case$ }
+ if$
+ "title" bibinfo.check
+}
+FUNCTION {format.full.names}
+{'s :=
+ "" 't :=
+ #1 'nameptr :=
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ { s nameptr
+ "{vv~}{ll}" format.name$
+ cite.name.font
+ 't :=
+ nameptr #1 >
+ {
+ namesleft #1 >
+ { ", " * t * }
+ {
+ s nameptr "{ll}" format.name$ duplicate$ "others" =
+ { 't := }
+ { pop$ }
+ if$
+ t "others" =
+ {
+ " " * bbl.etal emphasize *
+ }
+ {
+ bbl.and
+ space.word * t *
+ }
+ if$
+ }
+ if$
+ }
+ 't
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+}
+
+FUNCTION {author.editor.key.full}
+{ author empty$
+ { editor empty$
+ { key empty$
+ { cite$ #1 #3 substring$ }
+ 'key
+ if$
+ }
+ { editor format.full.names }
+ if$
+ }
+ { author format.full.names }
+ if$
+}
+
+FUNCTION {author.key.full}
+{ author empty$
+ { key empty$
+ { cite$ #1 #3 substring$ }
+ 'key
+ if$
+ }
+ { author format.full.names }
+ if$
+}
+
+FUNCTION {editor.key.full}
+{ editor empty$
+ { key empty$
+ { cite$ #1 #3 substring$ }
+ 'key
+ if$
+ }
+ { editor format.full.names }
+ if$
+}
+
+FUNCTION {make.full.names}
+{ type$ "book" =
+ type$ "inbook" =
+ or
+ 'author.editor.key.full
+ { type$ "proceedings" =
+ 'editor.key.full
+ 'author.key.full
+ if$
+ }
+ if$
+}
+
+FUNCTION {output.bibitem}
+{ newline$
+ "\bibitem[{" write$
+ label write$
+ ")" make.full.names duplicate$ short.list =
+ { pop$ }
+ { * }
+ if$
+ "}]{" * write$
+ cite$ write$
+ "}" write$
+ newline$
+ ""
+ before.all 'output.state :=
+}
+
+FUNCTION {n.dashify}
+{
+ 't :=
+ ""
+ { t empty$ not }
+ { t #1 #1 substring$ "-" =
+ { t #1 #2 substring$ "--" = not
+ { "--" *
+ t #2 global.max$ substring$ 't :=
+ }
+ { { t #1 #1 substring$ "-" = }
+ { "-" *
+ t #2 global.max$ substring$ 't :=
+ }
+ while$
+ }
+ if$
+ }
+ { t #1 #1 substring$ *
+ t #2 global.max$ substring$ 't :=
+ }
+ if$
+ }
+ while$
+}
+
+FUNCTION {word.in}
+{ bbl.in
+ " " * }
+
+FUNCTION {format.date}
+{ year "year" bibinfo.check duplicate$ empty$
+ {
+ "empty year in " cite$ * "; set to ????" * warning$
+ pop$ "????"
+ }
+ 'skip$
+ if$
+ extra.label *
+ before.all 'output.state :=
+ " (" swap$ * ")" *
+}
+FUNCTION {format.btitle}
+{ title "title" bibinfo.check
+ duplicate$ empty$ 'skip$
+ {
+ emphasize
+ }
+ if$
+}
+FUNCTION {either.or.check}
+{ empty$
+ 'pop$
+ { "can't use both " swap$ * " fields in " * cite$ * warning$ }
+ if$
+}
+FUNCTION {format.bvolume}
+{ volume empty$
+ { "" }
+ { bbl.volume volume tie.or.space.prefix
+ "volume" bibinfo.check * *
+ series "series" bibinfo.check
+ duplicate$ empty$ 'pop$
+ { emphasize ", " * swap$ * }
+ if$
+ "volume and number" number either.or.check
+ }
+ if$
+}
+FUNCTION {format.number.series}
+{ volume empty$
+ { number empty$
+ { series field.or.null }
+ { series empty$
+ { number "number" bibinfo.check }
+ { output.state mid.sentence =
+ { bbl.number }
+ { bbl.number capitalize }
+ if$
+ number tie.or.space.prefix "number" bibinfo.check * *
+ bbl.in space.word *
+ series "series" bibinfo.check *
+ }
+ if$
+ }
+ if$
+ }
+ { "" }
+ if$
+}
+
+FUNCTION {format.edition}
+{ edition duplicate$ empty$ 'skip$
+ {
+ output.state mid.sentence =
+ { "l" }
+ { "t" }
+ if$ change.case$
+ "edition" bibinfo.check
+ " " * bbl.edition *
+ }
+ if$
+}
+INTEGERS { multiresult }
+FUNCTION {multi.page.check}
+{ 't :=
+ #0 'multiresult :=
+ { multiresult not
+ t empty$ not
+ and
+ }
+ { t #1 #1 substring$
+ duplicate$ "-" =
+ swap$ duplicate$ "," =
+ swap$ "+" =
+ or or
+ { #1 'multiresult := }
+ { t #2 global.max$ substring$ 't := }
+ if$
+ }
+ while$
+ multiresult
+}
+FUNCTION {format.pages}
+{ pages duplicate$ empty$ 'skip$
+ { duplicate$ multi.page.check
+ {
+ bbl.pages swap$
+ n.dashify
+ }
+ {
+ bbl.page swap$
+ }
+ if$
+ tie.or.space.prefix
+ "pages" bibinfo.check
+ * *
+ }
+ if$
+}
+FUNCTION {format.journal.pages}
+{ pages duplicate$ empty$ 'pop$
+ { swap$ duplicate$ empty$
+ { pop$ pop$ format.pages }
+ {
+ ", " *
+ swap$
+ n.dashify
+ "pages" bibinfo.check
+ *
+ }
+ if$
+ }
+ if$
+}
+FUNCTION {format.journal.eid}
+{ eid "eid" bibinfo.check
+ duplicate$ empty$ 'pop$
+ { swap$ duplicate$ empty$ 'skip$
+ {
+ ", " *
+ }
+ if$
+ swap$ *
+ }
+ if$
+}
+FUNCTION {format.vol.num.pages}
+{ volume field.or.null
+ duplicate$ empty$ 'skip$
+ {
+ "volume" bibinfo.check
+ }
+ if$
+ bolden
+ number "number" bibinfo.check duplicate$ empty$ 'skip$
+ {
+ swap$ duplicate$ empty$
+ { "there's a number but no volume in " cite$ * warning$ }
+ 'skip$
+ if$
+ swap$
+ "(" swap$ * ")" *
+ }
+ if$ *
+ eid empty$
+ { format.journal.pages }
+ { format.journal.eid }
+ if$
+}
+
+FUNCTION {format.chapter.pages}
+{ chapter empty$
+ 'format.pages
+ { type empty$
+ { bbl.chapter }
+ { type "l" change.case$
+ "type" bibinfo.check
+ }
+ if$
+ chapter tie.or.space.prefix
+ "chapter" bibinfo.check
+ * *
+ pages empty$
+ 'skip$
+ { ", " * format.pages * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.booktitle}
+{
+ booktitle "booktitle" bibinfo.check
+ emphasize
+}
+FUNCTION {format.in.ed.booktitle}
+{ format.booktitle duplicate$ empty$ 'skip$
+ {
+ editor "editor" format.names.ed duplicate$ empty$ 'pop$
+ {
+ " " *
+ get.bbl.editor
+ capitalize
+ "(" swap$ * ") " *
+ * swap$
+ * }
+ if$
+ word.in swap$ *
+ }
+ if$
+}
+FUNCTION {format.thesis.type}
+{ type duplicate$ empty$
+ 'pop$
+ { swap$ pop$
+ "t" change.case$ "type" bibinfo.check
+ }
+ if$
+}
+FUNCTION {format.tr.number}
+{ number "number" bibinfo.check
+ type duplicate$ empty$
+ { pop$ bbl.techrep }
+ 'skip$
+ if$
+ "type" bibinfo.check
+ swap$ duplicate$ empty$
+ { pop$ "t" change.case$ }
+ { tie.or.space.prefix * * }
+ if$
+}
+FUNCTION {format.article.crossref}
+{
+ word.in
+ " \cite{" * crossref * "}" *
+}
+FUNCTION {format.book.crossref}
+{ volume duplicate$ empty$
+ { "empty volume in " cite$ * "'s crossref of " * crossref * warning$
+ pop$ word.in
+ }
+ { bbl.volume
+ swap$ tie.or.space.prefix "volume" bibinfo.check * * bbl.of space.word *
+ }
+ if$
+ " \cite{" * crossref * "}" *
+}
+FUNCTION {format.incoll.inproc.crossref}
+{
+ word.in
+ " \cite{" * crossref * "}" *
+}
+FUNCTION {format.org.or.pub}
+{ 't :=
+ ""
+ address empty$ t empty$ and
+ 'skip$
+ {
+ t empty$
+ { address "address" bibinfo.check *
+ }
+ { t *
+ address empty$
+ 'skip$
+ { ", " * address "address" bibinfo.check * }
+ if$
+ }
+ if$
+ }
+ if$
+}
+FUNCTION {format.publisher.address}
+{ publisher "publisher" bibinfo.warn format.org.or.pub
+}
+
+FUNCTION {format.organization.address}
+{ organization "organization" bibinfo.check format.org.or.pub
+}
+
+FUNCTION {article}
+{ output.bibitem
+ format.authors "author" output.check
+ author format.key output
+ format.date "year" output.check
+ date.block
+ format.title "title" output.check
+ crossref missing$
+ {
+ journal
+ "journal" bibinfo.check
+ emphasize
+ "journal" output.check
+ add.blank
+ format.vol.num.pages output
+ }
+ { format.article.crossref output.nonnull
+ format.pages output
+ }
+ if$
+ format.note output
+ fin.entry
+}
+FUNCTION {book}
+{ output.bibitem
+ author empty$
+ { format.editors "author and editor" output.check
+ editor format.key output
+ add.blank
+ }
+ { format.authors output.nonnull
+ crossref missing$
+ { "author and editor" editor either.or.check }
+ 'skip$
+ if$
+ }
+ if$
+ format.date "year" output.check
+ date.block
+ format.btitle "title" output.check
+ crossref missing$
+ { format.bvolume output
+ format.number.series output
+ format.publisher.address output
+ }
+ {
+ format.book.crossref output.nonnull
+ }
+ if$
+ format.edition output
+ format.note output
+ fin.entry
+}
+FUNCTION {booklet}
+{ output.bibitem
+ format.authors output
+ author format.key output
+ format.date "year" output.check
+ date.block
+ format.title "title" output.check
+ howpublished "howpublished" bibinfo.check output
+ address "address" bibinfo.check output
+ format.note output
+ fin.entry
+}
+
+FUNCTION {inbook}
+{ output.bibitem
+ author empty$
+ { format.editors "author and editor" output.check
+ editor format.key output
+ }
+ { format.authors output.nonnull
+ crossref missing$
+ { "author and editor" editor either.or.check }
+ 'skip$
+ if$
+ }
+ if$
+ format.date "year" output.check
+ date.block
+ format.btitle "title" output.check
+ crossref missing$
+ {
+ format.bvolume output
+ format.chapter.pages "chapter and pages" output.check
+ format.number.series output
+ format.publisher.address output
+ }
+ {
+ format.chapter.pages "chapter and pages" output.check
+ format.book.crossref output.nonnull
+ }
+ if$
+ format.edition output
+ format.note output
+ fin.entry
+}
+
+FUNCTION {incollection}
+{ output.bibitem
+ format.authors "author" output.check
+ author format.key output
+ format.date "year" output.check
+ date.block
+ format.title "title" output.check
+ crossref missing$
+ { format.in.ed.booktitle "booktitle" output.check
+ format.bvolume output
+ format.number.series output
+ format.chapter.pages output
+ format.publisher.address output
+ format.edition output
+ }
+ { format.incoll.inproc.crossref output.nonnull
+ format.chapter.pages output
+ }
+ if$
+ format.note output
+ fin.entry
+}
+FUNCTION {inproceedings}
+{ output.bibitem
+ format.authors "author" output.check
+ author format.key output
+ format.date "year" output.check
+ date.block
+ format.title "title" output.check
+ crossref missing$
+ { format.in.ed.booktitle "booktitle" output.check
+ format.bvolume output
+ format.number.series output
+ format.pages output
+ publisher empty$
+ { format.organization.address output }
+ { organization "organization" bibinfo.check output
+ format.publisher.address output
+ }
+ if$
+ }
+ { format.incoll.inproc.crossref output.nonnull
+ format.pages output
+ }
+ if$
+ format.note output
+ fin.entry
+}
+FUNCTION {conference} { inproceedings }
+FUNCTION {manual}
+{ output.bibitem
+ format.authors output
+ author format.key output
+ format.date "year" output.check
+ date.block
+ format.btitle "title" output.check
+ organization "organization" bibinfo.check output
+ address "address" bibinfo.check output
+ format.edition output
+ format.note output
+ fin.entry
+}
+
+FUNCTION {mastersthesis}
+{ output.bibitem
+ format.authors "author" output.check
+ author format.key output
+ format.date "year" output.check
+ date.block
+ format.title
+ "title" output.check
+ bbl.mthesis format.thesis.type output.nonnull
+ school "school" bibinfo.warn output
+ address "address" bibinfo.check output
+ format.note output
+ fin.entry
+}
+
+FUNCTION {misc}
+{ output.bibitem
+ format.authors output
+ author format.key output
+ format.date "year" output.check
+ date.block
+ format.title output
+ howpublished "howpublished" bibinfo.check output
+ format.note output
+ fin.entry
+}
+FUNCTION {phdthesis}
+{ output.bibitem
+ format.authors "author" output.check
+ author format.key output
+ format.date "year" output.check
+ date.block
+ format.title
+ "title" output.check
+ bbl.phdthesis format.thesis.type output.nonnull
+ school "school" bibinfo.warn output
+ address "address" bibinfo.check output
+ format.note output
+ fin.entry
+}
+
+FUNCTION {proceedings}
+{ output.bibitem
+ format.editors output
+ editor format.key output
+ format.date "year" output.check
+ date.block
+ format.btitle "title" output.check
+ format.bvolume output
+ format.number.series output
+ publisher empty$
+ { format.organization.address output }
+ { organization "organization" bibinfo.check output
+ format.publisher.address output
+ }
+ if$
+ format.note output
+ fin.entry
+}
+
+FUNCTION {techreport}
+{ output.bibitem
+ format.authors "author" output.check
+ author format.key output
+ format.date "year" output.check
+ date.block
+ format.title
+ "title" output.check
+ format.tr.number output.nonnull
+ institution "institution" bibinfo.warn output
+ address "address" bibinfo.check output
+ format.note output
+ fin.entry
+}
+
+FUNCTION {unpublished}
+{ output.bibitem
+ format.authors "author" output.check
+ author format.key output
+ format.date "year" output.check
+ date.block
+ format.title "title" output.check
+ format.note "note" output.check
+ fin.entry
+}
+
+FUNCTION {default.type} { misc }
+READ
+FUNCTION {sortify}
+{ purify$
+ "l" change.case$
+}
+INTEGERS { len }
+FUNCTION {chop.word}
+{ 's :=
+ 'len :=
+ s #1 len substring$ =
+ { s len #1 + global.max$ substring$ }
+ 's
+ if$
+}
+FUNCTION {format.lab.names}
+{ 's :=
+ "" 't :=
+ s #1 "{vv~}{ll}" format.name$
+ cite.name.font
+ s num.names$ duplicate$
+ #2 >
+ { pop$
+ " " * bbl.etal emphasize *
+ }
+ { #2 <
+ 'skip$
+ { s #2 "{ff }{vv }{ll}{ jj}" format.name$ "others" =
+ {
+ " " * bbl.etal emphasize *
+ }
+ { bbl.and space.word * s #2 "{vv~}{ll}" format.name$
+ cite.name.font
+ * }
+ if$
+ }
+ if$
+ }
+ if$
+}
+
+FUNCTION {author.key.label}
+{ author empty$
+ { key empty$
+ { cite$ #1 #3 substring$ }
+ 'key
+ if$
+ }
+ { author format.lab.names }
+ if$
+}
+
+FUNCTION {author.editor.key.label}
+{ author empty$
+ { editor empty$
+ { key empty$
+ { cite$ #1 #3 substring$ }
+ 'key
+ if$
+ }
+ { editor format.lab.names }
+ if$
+ }
+ { author format.lab.names }
+ if$
+}
+
+FUNCTION {editor.key.label}
+{ editor empty$
+ { key empty$
+ { cite$ #1 #3 substring$ }
+ 'key
+ if$
+ }
+ { editor format.lab.names }
+ if$
+}
+
+FUNCTION {calc.short.authors}
+{ type$ "book" =
+ type$ "inbook" =
+ or
+ 'author.editor.key.label
+ { type$ "proceedings" =
+ 'editor.key.label
+ 'author.key.label
+ if$
+ }
+ if$
+ 'short.list :=
+}
+
+FUNCTION {calc.label}
+{ calc.short.authors
+ short.list
+ "("
+ *
+ year duplicate$ empty$
+ short.list key field.or.null = or
+ { pop$ "" }
+ 'skip$
+ if$
+ *
+ 'label :=
+}
+
+FUNCTION {sort.format.names}
+{ 's :=
+ #1 'nameptr :=
+ ""
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ { s nameptr
+ "{vv{ } }{ll{ }}{ f{ }}{ jj{ }}"
+ format.name$ 't :=
+ nameptr #1 >
+ {
+ " " *
+ namesleft #1 = t "others" = and
+ { "zzzzz" * }
+ { t sortify * }
+ if$
+ }
+ { t sortify * }
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+}
+
+FUNCTION {sort.format.title}
+{ 't :=
+ "A " #2
+ "An " #3
+ "The " #4 t chop.word
+ chop.word
+ chop.word
+ sortify
+ #1 global.max$ substring$
+}
+FUNCTION {author.sort}
+{ author empty$
+ { key empty$
+ { "to sort, need author or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { author sort.format.names }
+ if$
+}
+FUNCTION {author.editor.sort}
+{ author empty$
+ { editor empty$
+ { key empty$
+ { "to sort, need author, editor, or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { editor sort.format.names }
+ if$
+ }
+ { author sort.format.names }
+ if$
+}
+FUNCTION {editor.sort}
+{ editor empty$
+ { key empty$
+ { "to sort, need editor or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { editor sort.format.names }
+ if$
+}
+FUNCTION {presort}
+{ calc.label
+ label sortify
+ " "
+ *
+ type$ "book" =
+ type$ "inbook" =
+ or
+ 'author.editor.sort
+ { type$ "proceedings" =
+ 'editor.sort
+ 'author.sort
+ if$
+ }
+ if$
+ #1 entry.max$ substring$
+ 'sort.label :=
+ sort.label
+ *
+ " "
+ *
+ title field.or.null
+ sort.format.title
+ *
+ #1 entry.max$ substring$
+ 'sort.key$ :=
+}
+
+ITERATE {presort}
+SORT
+STRINGS { last.label next.extra }
+INTEGERS { last.extra.num number.label }
+FUNCTION {initialize.extra.label.stuff}
+{ #0 int.to.chr$ 'last.label :=
+ "" 'next.extra :=
+ #0 'last.extra.num :=
+ #0 'number.label :=
+}
+FUNCTION {forward.pass}
+{ last.label label =
+ { last.extra.num #1 + 'last.extra.num :=
+ last.extra.num int.to.chr$ 'extra.label :=
+ }
+ { "a" chr.to.int$ 'last.extra.num :=
+ "" 'extra.label :=
+ label 'last.label :=
+ }
+ if$
+ number.label #1 + 'number.label :=
+}
+FUNCTION {reverse.pass}
+{ next.extra "b" =
+ { "a" 'extra.label := }
+ 'skip$
+ if$
+ extra.label 'next.extra :=
+ extra.label
+ duplicate$ empty$
+ 'skip$
+ { "{\natexlab{" swap$ * "}}" * }
+ if$
+ 'extra.label :=
+ label extra.label * 'label :=
+}
+EXECUTE {initialize.extra.label.stuff}
+ITERATE {forward.pass}
+REVERSE {reverse.pass}
+FUNCTION {bib.sort.order}
+{ sort.label
+ " "
+ *
+ year field.or.null sortify
+ *
+ " "
+ *
+ title field.or.null
+ sort.format.title
+ *
+ #1 entry.max$ substring$
+ 'sort.key$ :=
+}
+ITERATE {bib.sort.order}
+SORT
+FUNCTION {begin.bib}
+{ preamble$ empty$
+ 'skip$
+ { preamble$ write$ newline$ }
+ if$
+ "\begin{thebibliography}{" number.label int.to.str$ * "}" *
+ write$ newline$
+ "\providecommand{\natexlab}[1]{#1}"
+ write$ newline$
+}
+EXECUTE {begin.bib}
+EXECUTE {init.state.consts}
+ITERATE {call.type$}
+FUNCTION {end.bib}
+{ newline$
+ "\end{thebibliography}" write$ newline$
+}
+EXECUTE {end.bib}
+%% End of customized bst file
+%%
+%% End of file `regstud.bst'.
diff --git a/biblio/bibtex/contrib/economic/regstud.cls b/biblio/bibtex/contrib/economic/regstud.cls
new file mode 100644
index 0000000000..c50e06592f
--- /dev/null
+++ b/biblio/bibtex/contrib/economic/regstud.cls
@@ -0,0 +1,270 @@
+%%% LaTeX class for manuscripts submitted to the
+%%% Journal "Regional Studies" (regstud)
+%%%
+%%% author: Arne Henningsen
+%%% version: 1.1 (18 November 2009)
+%%% license: LaTeX Project Public License
+%%%
+%%% Note: This is an unofficial style file that may not fully comply
+%%% with the Formatting Instructions of the "Regional Studies" in every detail.
+%%% Please report any problems at
+%%% http://sourceforge.net/projects/economtex/
+%%% Further information is available at
+%%% http://economtex.wiki.sourceforge.net/
+%%%
+%%% This document class is based on the "scrartcl" class
+%%% from the KOMA script bundle.
+%%% Following additional packages are required:
+%%% amsmath, babel, endfloat, endnotes, fontnec, geometry,
+%%% ifthen, natbib, setspace, soul, titlesec, url, verbatim
+%%%
+%%% The corresponding BibTeX style file "regstud.bst" should be used
+%%% for the bibliography: \bibliographystyle{regstud}
+%%%
+%%% The document class provides following options:
+%%% noendfloat - don't move floats to the end of the paper
+%%% hidefloats - hide all floats (figures and tables)
+%%% author - show name(s) of authors(s)
+%%% date - show date
+%%%
+%%% This document class provides 3 new commands:
+%%% \keywords can be used to show keywors below the abstract
+%%% \jelclass can be used to show JEL classifications below the abstract
+%%% \affiliation can be used spefify the affiliation(s) of the author(s)
+%%%
+%%% If you use footnotes, add following line before the reference section:
+%%% \listofendnotes
+%%%
+%%% "Regional Studies" requires that you use single quotes
+%%% you could do this with the ``csquotes'' package:
+%%% \usepackage{csquotes}
+%%% \MakeInnerQuote{<yourQuoteCharacter>}
+%%%
+%%% To prepare a manuscript without floats, you can use
+%%% either option "hidefloats" to hide all floats
+%%% or extract the pages that do not include the floats
+%%% with "pdftk", e.g. "pdftk all.pdf cat 1-14 output main.pdf"
+%%% The former has the drawback that references to the hidden floats
+%%% with \ref{} are no longer possible.
+%%% The figures and tables can be extracted as images, e.g. with kpdf.
+%%%
+%%% Website of the "Regional Studies":
+%%% http://www.tandf.co.uk/journals/titles/00343404.asp
+
+
+\NeedsTeXFormat{LaTeX2e}
+\ProvidesClass{regstud}[2009/11/18 LaTeX class for the Journal 'Regional Studies']
+
+% option to NOT place floats at the end
+\newif\if@UseEndfloat
+\@UseEndfloattrue
+\DeclareOption{noendfloat}{\@UseEndfloatfalse}
+
+% option to hide floats
+\newif\if@HideFloats
+\@HideFloatsfalse
+\DeclareOption{hidefloats}{\@HideFloatstrue \@UseEndfloatfalse}
+
+% option to show the authors' names
+\newif\if@ShowAuthor
+\@ShowAuthorfalse
+\DeclareOption{author}{\@ShowAuthortrue}
+
+% option to print the date
+\newif\if@ShowDate
+\@ShowDatefalse
+\DeclareOption{date}{\@ShowDatetrue}
+
+% pass any options on to the scrartcl class and load this class with some options
+\DeclareOption*{\PassOptionsToClass{\CurrentOption}{scrartcl}}
+\ProcessOptions\relax
+\LoadClass[12pt,english,tablecaptionabove,
+ noonelinecaption]{scrartcl}
+% pointlessnumbers = do not add final dot after ordinary section numbers
+% tablecaptionabove = use \captionabove for tables
+% noonelinecaption = do not treat one-line captions differently
+
+% for internal use
+\RequirePackage{ifthen}
+
+% use babel package and set language to english
+\RequirePackage[english]{babel}
+
+% page format, margins
+\RequirePackage{geometry}
+\geometry{a4paper, tmargin=2.5cm, bmargin=2.8cm, lmargin=2.5cm,
+ rmargin=2.5cm, headheight=0cm, headsep=0cm, footskip=1.2cm }
+
+% double spacing
+\RequirePackage{setspace}
+\doublespacing
+
+% spacing around formulas
+\AtBeginDocument{
+\setlength{\abovedisplayshortskip}{6pt}
+\setlength{\belowdisplayshortskip}{6pt}
+\setlength{\abovedisplayskip}{6pt}
+\setlength{\belowdisplayskip}{6pt}
+\allowdisplaybreaks
+}
+
+% spacing around captions and floats
+\setlength{\abovecaptionskip}{6pt}
+\setlength{\belowcaptionskip}{3pt}
+\setlength{\floatsep}{0pt}
+\setlength{\textfloatsep}{20pt}
+\setlength{\intextsep}{15pt}
+
+% font: latin modern
+\RequirePackage{lmodern}
+
+% amsmath
+\RequirePackage{amsmath}
+% for compatibility with ajae.cls
+\newcommand{\veclatin}[1]{#1}
+\newcommand{\matlatin}[1]{#1}
+\newcommand{\vecgreek}[1]{#1}
+\newcommand{\matgreek}[1]{#1}
+
+% font for URLs
+\RequirePackage{url}
+\def\UrlFont{\rmfamily}
+
+%% formatting section headers
+\RequirePackage{titlesec}
+% package for letterspacing
+\RequirePackage{soul}
+% format of section headers
+\newcommand{\secformat}[1]{\MakeUppercase{\so{#1}}}
+\titleformat{\section}[block]
+ {\normalfont\filcenter}
+ {}
+ {0pt}
+ {\secformat}
+% spacing around section headers
+\titlespacing*{\section}{0pt}{3ex}{0.3ex}
+% format of subsection headers
+\titleformat{\subsection}[block]
+ {\normalsize\itshape}
+ {}
+ {0pt}
+ {}
+% spacing around subsection headers
+\titlespacing*{\subsection}{0pt}{2ex}{0.15ex}
+
+%% warning if subsubsection headers are present
+\renewcommand{\subsubsection}[1]{%
+\ClassWarningNoLine{regstud}{subsubsections are ignored}%
+}
+
+% citations and bibliography
+\RequirePackage[authoryear]{natbib}
+\AtBeginDocument{\renewcommand{\refname}{References}}
+\setlength{\bibsep}{0pt}
+
+%% use endnotes in place of footnotes
+\RequirePackage{endnotes}
+\renewcommand{\notesname}{Notes}
+\let\footnote=\endnote
+\newcommand{\listofendnotes}{
+ \begingroup
+ \parindent 0pt
+ \parskip 0ex
+ \def\enotesize{\normalsize}
+ \theendnotes
+ \endgroup
+}
+% use normalsize numbers (copied from endnote.sty and modified thereafter)
+\def\enoteformat{\rightskip\z@ \leftskip\z@ \parindent=0em
+ \leavevmode\llap{\theenmark. }}
+
+
+% captions of figures and tables
+\setcapwidth[c]{\textwidth}
+\setkomafont{captionlabel}{\centering \itshape}
+\setkomafont{caption}{\centering \itshape}
+\renewcommand{\captionformat}{.\, }
+\addto\captionsenglish{%
+ \renewcommand{\figurename}{Fig.}%
+}
+
+% move floats to the end of the paper
+\if@UseEndfloat
+ \RequirePackage[noheads,nolists,tablesfirst,nomarkers]{endfloat}
+ \AtBeginDelayedFloats{\pagestyle{empty}}
+\fi
+
+% hide floats
+\if@HideFloats
+ \RequirePackage{verbatim}
+ \let\figure=\comment
+ \let\endfigure=\endcomment
+ \let\table=\comment
+ \let\endtable=\endcomment
+\fi
+
+% titlepage with title, author, affiliation and date
+\newcommand{\affiliation}[1]{\newcommand{\@affiliation}{#1}}
+\renewcommand{\and}{{\normalfont and}}
+\renewcommand{\maketitle}{
+ \begin{center}
+ \begin{Large}
+ \begin{spacing}{1.25}
+ \textbf{\@title}
+ \end{spacing}
+ \end{Large}
+ \vspace*{5mm}
+ \if@ShowAuthor
+ \MakeUppercase{\so{\@author}}\\
+ \ifthenelse{ \isundefined\@affiliation }{}{
+ \textit{\@affiliation}\\
+ }
+ \vspace*{3mm}
+ \fi
+ \if@ShowDate
+ \@date\\
+ \vspace*{3mm}
+ \fi
+ \vspace*{2mm}
+ \end{center}
+}
+
+
+% abstract, keywords, JEL classification
+\newcommand{\keywords}[1]{\newcommand{\@keywords}{#1}}
+\newcommand{\jelclass}[1]{\newcommand{\@jelclass}{#1}}
+\renewenvironment{abstract}{%
+\vspace*{-\baselineskip}
+\mbox{}\\\noindent%
+}{%
+\ifthenelse{ \isundefined\@keywords }{
+\ClassWarningNoLine{ajae}{No keywords specified.
+ Please use the command \protect\keywords}
+}{
+
+\medskip \noindent
+Key words: \@keywords
+}
+\ifthenelse{ \isundefined\@jelclass }{
+\ClassWarningNoLine{ajae}{No JEL classification specified.
+ Please use the command \protect\jelclass}
+}{
+
+\medskip \noindent
+JEL classification: \@jelclass
+}
+
+\medskip
+}
+
+% avoid clubs and widows
+\clubpenalty=10000
+\widowpenalty=10000
+% \displaywidowpenalty=10000
+
+% increase stretchability of the spaces (avoid overful hboxes)
+\setlength{\emergencystretch}{3em}
+
+% for compatibility with erae.cls
+\newcommand{\citetPage}[2]{\citeauthor{#2} (\citeyear{#2}, p.~#1)}
+\newcommand{\citepPage}[2]{\citetext{\citealp{#2}, p.~#1}}
diff --git a/biblio/bibtex/contrib/economic/tandfx.bst b/biblio/bibtex/contrib/economic/tandfx.bst
new file mode 100644
index 0000000000..133232e260
--- /dev/null
+++ b/biblio/bibtex/contrib/economic/tandfx.bst
@@ -0,0 +1,1574 @@
+%%% Taylor & Francis Reference Style X (tandfx)
+%%% bibliography style for use with LaTeX2e
+%%% version: 1.0 (18 July 2008)
+%%% license: LaTeX Project Public License (see below)
+%%% This file was created with makebst (see below)
+%%% by Arne Henningsen.
+%%% Note: This is an unofficial style file that may not fully comply
+%%% with the Taylor & Francis Reference Style X in every detail.
+%%% Please report any problems at
+%%% http://sourceforge.net/projects/economtex/
+%%% Further information is available at
+%%% http://economtex.wiki.sourceforge.net/
+%%%
+%%% You should add the following lines to the LaTeX preamble:
+%%% \usepackage[authoryear]{natbib}
+%%% \bibpunct{(}{)}{,}{a}{}{,}
+%%%
+%%
+%% This is file `tandfx.bst',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% merlin.mbs (with options: `ay,nat,lang,nm-rev,jnrlst,keyxyr,blkyear,dt-beg,yr-com,yrp-per,note-yr,vnum-sp,volp-com,num-xser,ser-vol,bkpg-x,add-pub,pre-pub,blk-com,in-col,in-it,ppx,ed,abr,ednx,ord,etal-it,em-it,nfss,')
+%% ----------------------------------------
+%% *** Taylor and Francis Reference Style X ***
+%%
+%% Copyright 1994-2005 Patrick W Daly
+ % ===============================================================
+ % IMPORTANT NOTICE:
+ % This bibliographic style (bst) file has been generated from one or
+ % more master bibliographic style (mbs) files, listed above.
+ %
+ % This generated file can be redistributed and/or modified under the terms
+ % of the LaTeX Project Public License Distributed from CTAN
+ % archives in directory macros/latex/base/lppl.txt; either
+ % version 1 of the License, or any later version.
+ % ===============================================================
+ % Name and version information of the main mbs file:
+ % \ProvidesFile{merlin.mbs}[2005/10/17 4.14 (PWD, AO, DPC)]
+ % For use with BibTeX version 0.99a or later
+ %-------------------------------------------------------------------
+ % This bibliography style file is intended for texts in ENGLISH
+ % This is an author-year citation style bibliography. As such, it is
+ % non-standard LaTeX, and requires a special package file to function properly.
+ % Such a package is natbib.sty by Patrick W. Daly
+ % The form of the \bibitem entries is
+ % \bibitem[Jones et al.(1990)]{key}...
+ % \bibitem[Jones et al.(1990)Jones, Baker, and Smith]{key}...
+ % The essential feature is that the label (the part in brackets) consists
+ % of the author names, as they should appear in the citation, with the year
+ % in parentheses following. There must be no space before the opening
+ % parenthesis!
+ % With natbib v5.3, a full list of authors may also follow the year.
+ % In natbib.sty, it is possible to define the type of enclosures that is
+ % really wanted (brackets or parentheses), but in either case, there must
+ % be parentheses in the label.
+ % The \cite command functions as follows:
+ % \citet{key} ==>> Jones et al. (1990)
+ % \citet*{key} ==>> Jones, Baker, and Smith (1990)
+ % \citep{key} ==>> (Jones et al., 1990)
+ % \citep*{key} ==>> (Jones, Baker, and Smith, 1990)
+ % \citep[chap. 2]{key} ==>> (Jones et al., 1990, chap. 2)
+ % \citep[e.g.][]{key} ==>> (e.g. Jones et al., 1990)
+ % \citep[e.g.][p. 32]{key} ==>> (e.g. Jones et al., p. 32)
+ % \citeauthor{key} ==>> Jones et al.
+ % \citeauthor*{key} ==>> Jones, Baker, and Smith
+ % \citeyear{key} ==>> 1990
+ %---------------------------------------------------------------------
+
+ENTRY
+ { address
+ author
+ booktitle
+ chapter
+ edition
+ editor
+ eid
+ howpublished
+ institution
+ journal
+ key
+ language
+ month
+ note
+ number
+ organization
+ pages
+ publisher
+ school
+ series
+ title
+ type
+ volume
+ year
+ }
+ {}
+ { label extra.label sort.label short.list }
+INTEGERS { output.state before.all mid.sentence after.sentence after.block }
+FUNCTION {init.state.consts}
+{ #0 'before.all :=
+ #1 'mid.sentence :=
+ #2 'after.sentence :=
+ #3 'after.block :=
+}
+STRINGS { s t}
+FUNCTION {output.nonnull}
+{ 's :=
+ output.state mid.sentence =
+ { ", " * write$ }
+ { output.state after.block =
+ { add.period$ write$
+ newline$
+ "\newblock " write$
+ }
+ { output.state before.all =
+ 'write$
+ { add.period$ " " * write$ }
+ if$
+ }
+ if$
+ mid.sentence 'output.state :=
+ }
+ if$
+ s
+}
+FUNCTION {output}
+{ duplicate$ empty$
+ 'pop$
+ 'output.nonnull
+ if$
+}
+FUNCTION {output.check}
+{ 't :=
+ duplicate$ empty$
+ { pop$ "empty " t * " in " * cite$ * warning$ }
+ 'output.nonnull
+ if$
+}
+FUNCTION {fin.entry}
+{ add.period$
+ write$
+ newline$
+}
+
+FUNCTION {new.block}
+{ output.state before.all =
+ 'skip$
+ { after.block 'output.state := }
+ if$
+}
+FUNCTION {new.sentence}
+{ output.state after.block =
+ 'skip$
+ { output.state before.all =
+ 'skip$
+ { after.sentence 'output.state := }
+ if$
+ }
+ if$
+}
+FUNCTION {add.blank}
+{ " " * before.all 'output.state :=
+}
+
+FUNCTION {date.block}
+{
+ new.sentence
+}
+
+FUNCTION {not}
+{ { #0 }
+ { #1 }
+ if$
+}
+FUNCTION {and}
+{ 'skip$
+ { pop$ #0 }
+ if$
+}
+FUNCTION {or}
+{ { pop$ #1 }
+ 'skip$
+ if$
+}
+FUNCTION {new.block.checkb}
+{ empty$
+ swap$ empty$
+ and
+ 'skip$
+ 'new.block
+ if$
+}
+FUNCTION {field.or.null}
+{ duplicate$ empty$
+ { pop$ "" }
+ 'skip$
+ if$
+}
+FUNCTION {emphasize}
+{ duplicate$ empty$
+ { pop$ "" }
+ { "\textit{" swap$ * "}" * }
+ if$
+}
+FUNCTION {tie.or.space.prefix}
+{ duplicate$ text.length$ #3 <
+ { "~" }
+ { " " }
+ if$
+ swap$
+}
+
+FUNCTION {capitalize}
+{ "u" change.case$ "t" change.case$ }
+
+FUNCTION {space.word}
+{ " " swap$ * " " * }
+ % Here are the language-specific definitions for explicit words.
+ % Each function has a name bbl.xxx where xxx is the English word.
+ % The language selected here is ENGLISH
+FUNCTION {bbl.and}
+{ "and"}
+
+FUNCTION {bbl.etal}
+{ "et~al." }
+
+FUNCTION {bbl.editors}
+{ "eds." }
+
+FUNCTION {bbl.editor}
+{ "ed." }
+
+FUNCTION {bbl.edby}
+{ "edited by" }
+
+FUNCTION {bbl.edition}
+{ "ed." }
+
+FUNCTION {bbl.volume}
+{ "vol." }
+
+FUNCTION {bbl.of}
+{ "of" }
+
+FUNCTION {bbl.number}
+{ "no." }
+
+FUNCTION {bbl.nr}
+{ "no." }
+
+FUNCTION {bbl.in}
+{ "in" }
+
+FUNCTION {bbl.pages}
+{ "" }
+
+FUNCTION {bbl.page}
+{ "" }
+
+FUNCTION {bbl.chapter}
+{ "chap." }
+
+FUNCTION {bbl.techrep}
+{ "Tech. Rep." }
+
+FUNCTION {bbl.mthesis}
+{ "Master's thesis" }
+
+FUNCTION {bbl.phdthesis}
+{ "Ph.D. thesis" }
+
+FUNCTION {bbl.first}
+{ "1st" }
+
+FUNCTION {bbl.second}
+{ "2nd" }
+
+FUNCTION {bbl.third}
+{ "3rd" }
+
+FUNCTION {bbl.fourth}
+{ "4th" }
+
+FUNCTION {bbl.fifth}
+{ "5th" }
+
+FUNCTION {bbl.st}
+{ "st" }
+
+FUNCTION {bbl.nd}
+{ "nd" }
+
+FUNCTION {bbl.rd}
+{ "rd" }
+
+FUNCTION {bbl.th}
+{ "th" }
+
+MACRO {jan} {"Jan."}
+
+MACRO {feb} {"Feb."}
+
+MACRO {mar} {"Mar."}
+
+MACRO {apr} {"Apr."}
+
+MACRO {may} {"May"}
+
+MACRO {jun} {"Jun."}
+
+MACRO {jul} {"Jul."}
+
+MACRO {aug} {"Aug."}
+
+MACRO {sep} {"Sep."}
+
+MACRO {oct} {"Oct."}
+
+MACRO {nov} {"Nov."}
+
+MACRO {dec} {"Dec."}
+
+FUNCTION {eng.ord}
+{ duplicate$ "1" swap$ *
+ #-2 #1 substring$ "1" =
+ { bbl.th * }
+ { duplicate$ #-1 #1 substring$
+ duplicate$ "1" =
+ { pop$ bbl.st * }
+ { duplicate$ "2" =
+ { pop$ bbl.nd * }
+ { "3" =
+ { bbl.rd * }
+ { bbl.th * }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+}
+
+MACRO {acmcs} {"ACM Computing Surveys"}
+
+MACRO {acta} {"Acta Informatica"}
+
+MACRO {cacm} {"Communications of the ACM"}
+
+MACRO {ibmjrd} {"IBM Journal of Research and Development"}
+
+MACRO {ibmsj} {"IBM Systems Journal"}
+
+MACRO {ieeese} {"IEEE Transactions on Software Engineering"}
+
+MACRO {ieeetc} {"IEEE Transactions on Computers"}
+
+MACRO {ieeetcad}
+ {"IEEE Transactions on Computer-Aided Design of Integrated Circuits"}
+
+MACRO {ipl} {"Information Processing Letters"}
+
+MACRO {jacm} {"Journal of the ACM"}
+
+MACRO {jcss} {"Journal of Computer and System Sciences"}
+
+MACRO {scp} {"Science of Computer Programming"}
+
+MACRO {sicomp} {"SIAM Journal on Computing"}
+
+MACRO {tocs} {"ACM Transactions on Computer Systems"}
+
+MACRO {tods} {"ACM Transactions on Database Systems"}
+
+MACRO {tog} {"ACM Transactions on Graphics"}
+
+MACRO {toms} {"ACM Transactions on Mathematical Software"}
+
+MACRO {toois} {"ACM Transactions on Office Information Systems"}
+
+MACRO {toplas} {"ACM Transactions on Programming Languages and Systems"}
+
+MACRO {tcs} {"Theoretical Computer Science"}
+FUNCTION {bibinfo.check}
+{ swap$
+ duplicate$ missing$
+ {
+ pop$ pop$
+ ""
+ }
+ { duplicate$ empty$
+ {
+ swap$ pop$
+ }
+ { swap$
+ pop$
+ }
+ if$
+ }
+ if$
+}
+FUNCTION {bibinfo.warn}
+{ swap$
+ duplicate$ missing$
+ {
+ swap$ "missing " swap$ * " in " * cite$ * warning$ pop$
+ ""
+ }
+ { duplicate$ empty$
+ {
+ swap$ "empty " swap$ * " in " * cite$ * warning$
+ }
+ { swap$
+ pop$
+ }
+ if$
+ }
+ if$
+}
+STRINGS { bibinfo}
+INTEGERS { nameptr namesleft numnames }
+
+FUNCTION {format.names}
+{ 'bibinfo :=
+ duplicate$ empty$ 'skip$ {
+ 's :=
+ "" 't :=
+ #1 'nameptr :=
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ { s nameptr
+ "{vv~}{ll}{, f{.}.}{, jj}"
+ format.name$
+ bibinfo bibinfo.check
+ 't :=
+ nameptr #1 >
+ {
+ namesleft #1 >
+ { ", " * t * }
+ {
+ s nameptr "{ll}" format.name$ duplicate$ "others" =
+ { 't := }
+ { pop$ }
+ if$
+ numnames #2 >
+ { "," * }
+ 'skip$
+ if$
+ t "others" =
+ {
+ " " * bbl.etal emphasize *
+ }
+ {
+ bbl.and
+ space.word * t *
+ }
+ if$
+ }
+ if$
+ }
+ 't
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+ } if$
+}
+FUNCTION {format.names.ed}
+{
+ 'bibinfo :=
+ duplicate$ empty$ 'skip$ {
+ 's :=
+ "" 't :=
+ #1 'nameptr :=
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ { s nameptr
+ "{f{.}.~}{vv~}{ll}{, jj}"
+ format.name$
+ bibinfo bibinfo.check
+ 't :=
+ nameptr #1 >
+ {
+ namesleft #1 >
+ { ", " * t * }
+ {
+ s nameptr "{ll}" format.name$ duplicate$ "others" =
+ { 't := }
+ { pop$ }
+ if$
+ numnames #2 >
+ { "," * }
+ 'skip$
+ if$
+ t "others" =
+ {
+
+ " " * bbl.etal emphasize *
+ }
+ {
+ bbl.and
+ space.word * t *
+ }
+ if$
+ }
+ if$
+ }
+ 't
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+ } if$
+}
+FUNCTION {format.key}
+{ empty$
+ { key field.or.null }
+ { "" }
+ if$
+}
+
+FUNCTION {format.authors}
+{ author "author" format.names
+}
+FUNCTION {get.bbl.editor}
+{ editor num.names$ #1 > 'bbl.editors 'bbl.editor if$ }
+
+FUNCTION {format.editors}
+{ editor "editor" format.names duplicate$ empty$ 'skip$
+ {
+ "," *
+ " " *
+ get.bbl.editor
+ *
+ }
+ if$
+}
+FUNCTION {select.language}
+{ duplicate$ empty$
+ 'pop$
+ { language empty$
+ 'skip$
+ { "{\selectlanguage{" language * "}" * swap$ * "}" * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.note}
+{
+ note empty$
+ { "" }
+ { note #1 #1 substring$
+ duplicate$ "{" =
+ 'skip$
+ { output.state mid.sentence =
+ { "l" }
+ { "u" }
+ if$
+ change.case$
+ }
+ if$
+ note #2 global.max$ substring$ * "note" bibinfo.check
+ }
+ if$
+}
+
+FUNCTION {format.title}
+{ title
+ duplicate$ empty$ 'skip$
+ { "t" change.case$ }
+ if$
+ "title" bibinfo.check
+ duplicate$ empty$ 'skip$
+ {
+ select.language
+ }
+ if$
+}
+FUNCTION {format.full.names}
+{'s :=
+ "" 't :=
+ #1 'nameptr :=
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ { s nameptr
+ "{vv~}{ll}" format.name$
+ 't :=
+ nameptr #1 >
+ {
+ namesleft #1 >
+ { ", " * t * }
+ {
+ s nameptr "{ll}" format.name$ duplicate$ "others" =
+ { 't := }
+ { pop$ }
+ if$
+ t "others" =
+ {
+ " " * bbl.etal emphasize *
+ }
+ {
+ numnames #2 >
+ { "," * }
+ 'skip$
+ if$
+ bbl.and
+ space.word * t *
+ }
+ if$
+ }
+ if$
+ }
+ 't
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+}
+
+FUNCTION {author.editor.key.full}
+{ author empty$
+ { editor empty$
+ { key empty$
+ { cite$ #1 #3 substring$ }
+ 'key
+ if$
+ }
+ { editor format.full.names }
+ if$
+ }
+ { author format.full.names }
+ if$
+}
+
+FUNCTION {author.key.full}
+{ author empty$
+ { key empty$
+ { cite$ #1 #3 substring$ }
+ 'key
+ if$
+ }
+ { author format.full.names }
+ if$
+}
+
+FUNCTION {editor.key.full}
+{ editor empty$
+ { key empty$
+ { cite$ #1 #3 substring$ }
+ 'key
+ if$
+ }
+ { editor format.full.names }
+ if$
+}
+
+FUNCTION {make.full.names}
+{ type$ "book" =
+ type$ "inbook" =
+ or
+ 'author.editor.key.full
+ { type$ "proceedings" =
+ 'editor.key.full
+ 'author.key.full
+ if$
+ }
+ if$
+}
+
+FUNCTION {output.bibitem}
+{ newline$
+ "\bibitem[{" write$
+ label write$
+ ")" make.full.names duplicate$ short.list =
+ { pop$ }
+ { * }
+ if$
+ "}]{" * write$
+ cite$ write$
+ "}" write$
+ newline$
+ ""
+ before.all 'output.state :=
+}
+
+FUNCTION {n.dashify}
+{
+ 't :=
+ ""
+ { t empty$ not }
+ { t #1 #1 substring$ "-" =
+ { t #1 #2 substring$ "--" = not
+ { "--" *
+ t #2 global.max$ substring$ 't :=
+ }
+ { { t #1 #1 substring$ "-" = }
+ { "-" *
+ t #2 global.max$ substring$ 't :=
+ }
+ while$
+ }
+ if$
+ }
+ { t #1 #1 substring$ *
+ t #2 global.max$ substring$ 't :=
+ }
+ if$
+ }
+ while$
+}
+
+FUNCTION {word.in}
+{ bbl.in
+ ":" *
+ emphasize
+ " " * }
+
+FUNCTION {format.date}
+{ year "year" bibinfo.check duplicate$ empty$
+ {
+ }
+ 'skip$
+ if$
+ extra.label *
+ before.all 'output.state :=
+ ", " swap$ *
+}
+FUNCTION {format.btitle}
+{ title "title" bibinfo.check
+ duplicate$ empty$ 'skip$
+ {
+ emphasize
+ select.language
+ }
+ if$
+}
+FUNCTION {either.or.check}
+{ empty$
+ 'pop$
+ { "can't use both " swap$ * " fields in " * cite$ * warning$ }
+ if$
+}
+FUNCTION {format.bvolume}
+{ volume empty$
+ { "" }
+ { bbl.volume volume tie.or.space.prefix
+ "volume" bibinfo.check * *
+ series "series" bibinfo.check
+ duplicate$ empty$ 'pop$
+ { emphasize ", " * swap$ * }
+ if$
+ "volume and number" number either.or.check
+ }
+ if$
+}
+FUNCTION {format.number.series}
+{ volume empty$
+ { number empty$
+ { series field.or.null }
+ { series empty$
+ { number "number" bibinfo.check }
+ { output.state mid.sentence =
+ { bbl.number }
+ { bbl.number capitalize }
+ if$
+ number tie.or.space.prefix "number" bibinfo.check * *
+ bbl.in space.word *
+ series "series" bibinfo.check *
+ }
+ if$
+ }
+ if$
+ }
+ { "" }
+ if$
+}
+FUNCTION {is.num}
+{ chr.to.int$
+ duplicate$ "0" chr.to.int$ < not
+ swap$ "9" chr.to.int$ > not and
+}
+
+FUNCTION {extract.num}
+{ duplicate$ 't :=
+ "" 's :=
+ { t empty$ not }
+ { t #1 #1 substring$
+ t #2 global.max$ substring$ 't :=
+ duplicate$ is.num
+ { s swap$ * 's := }
+ { pop$ "" 't := }
+ if$
+ }
+ while$
+ s empty$
+ 'skip$
+ { pop$ s }
+ if$
+}
+
+FUNCTION {convert.edition}
+{ extract.num "l" change.case$ 's :=
+ s "first" = s "1" = or
+ { bbl.first 't := }
+ { s "second" = s "2" = or
+ { bbl.second 't := }
+ { s "third" = s "3" = or
+ { bbl.third 't := }
+ { s "fourth" = s "4" = or
+ { bbl.fourth 't := }
+ { s "fifth" = s "5" = or
+ { bbl.fifth 't := }
+ { s #1 #1 substring$ is.num
+ { s eng.ord 't := }
+ { edition 't := }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+ t
+}
+
+FUNCTION {format.edition}
+{ edition duplicate$ empty$ 'skip$
+ {
+ convert.edition
+ output.state mid.sentence =
+ { "l" }
+ { "t" }
+ if$ change.case$
+ "edition" bibinfo.check
+ " " * bbl.edition *
+ }
+ if$
+}
+INTEGERS { multiresult }
+FUNCTION {multi.page.check}
+{ 't :=
+ #0 'multiresult :=
+ { multiresult not
+ t empty$ not
+ and
+ }
+ { t #1 #1 substring$
+ duplicate$ "-" =
+ swap$ duplicate$ "," =
+ swap$ "+" =
+ or or
+ { #1 'multiresult := }
+ { t #2 global.max$ substring$ 't := }
+ if$
+ }
+ while$
+ multiresult
+}
+FUNCTION {format.pages}
+{ pages duplicate$ empty$ 'skip$
+ { duplicate$ multi.page.check
+ {
+ n.dashify
+ }
+ {
+ }
+ if$
+ "pages" bibinfo.check
+ }
+ if$
+}
+FUNCTION {format.journal.pages}
+{ pages duplicate$ empty$ 'pop$
+ { swap$ duplicate$ empty$
+ { pop$ pop$ format.pages }
+ {
+ ", " *
+ swap$
+ n.dashify
+ "pages" bibinfo.check
+ *
+ }
+ if$
+ }
+ if$
+}
+FUNCTION {format.journal.eid}
+{ eid "eid" bibinfo.check
+ duplicate$ empty$ 'pop$
+ { swap$ duplicate$ empty$ 'skip$
+ {
+ ", " *
+ }
+ if$
+ swap$ *
+ }
+ if$
+}
+FUNCTION {format.vol.num.pages}
+{ volume field.or.null
+ duplicate$ empty$ 'skip$
+ {
+ "volume" bibinfo.check
+ }
+ if$
+ number "number" bibinfo.check duplicate$ empty$ 'skip$
+ {
+ swap$ duplicate$ empty$
+ { "there's a number but no volume in " cite$ * warning$ }
+ 'skip$
+ if$
+ swap$
+ "~(" swap$ * ")" *
+ }
+ if$ *
+ eid empty$
+ { format.journal.pages }
+ { format.journal.eid }
+ if$
+}
+
+FUNCTION {format.chapter.pages}
+{ chapter empty$
+ 'format.pages
+ { type empty$
+ { bbl.chapter }
+ { type "l" change.case$
+ "type" bibinfo.check
+ }
+ if$
+ chapter tie.or.space.prefix
+ "chapter" bibinfo.check
+ * *
+ pages empty$
+ 'skip$
+ { ", " * format.pages * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.booktitle}
+{
+ booktitle "booktitle" bibinfo.check
+ emphasize
+}
+FUNCTION {format.in.ed.booktitle}
+{ format.booktitle duplicate$ empty$ 'skip$
+ {
+ editor "editor" format.names.ed duplicate$ empty$ 'pop$
+ {
+ "," *
+ " " *
+ get.bbl.editor
+ ", " *
+ * swap$
+ * }
+ if$
+ word.in swap$ *
+ }
+ if$
+}
+FUNCTION {format.thesis.type}
+{ type duplicate$ empty$
+ 'pop$
+ { swap$ pop$
+ "t" change.case$ "type" bibinfo.check
+ }
+ if$
+}
+FUNCTION {format.tr.number}
+{ number "number" bibinfo.check
+ type duplicate$ empty$
+ { pop$ bbl.techrep }
+ 'skip$
+ if$
+ "type" bibinfo.check
+ swap$ duplicate$ empty$
+ { pop$ "t" change.case$ }
+ { tie.or.space.prefix * * }
+ if$
+}
+FUNCTION {format.article.crossref}
+{
+ word.in
+ " \cite{" * crossref * "}" *
+}
+FUNCTION {format.book.crossref}
+{ volume duplicate$ empty$
+ { "empty volume in " cite$ * "'s crossref of " * crossref * warning$
+ pop$ word.in
+ }
+ { bbl.volume
+ swap$ tie.or.space.prefix "volume" bibinfo.check * * bbl.of space.word *
+ }
+ if$
+ " \cite{" * crossref * "}" *
+}
+FUNCTION {format.incoll.inproc.crossref}
+{
+ word.in
+ " \cite{" * crossref * "}" *
+}
+FUNCTION {format.org.or.pub}
+{ 't :=
+ ""
+ address empty$ t empty$ and
+ 'skip$
+ {
+ address "address" bibinfo.check *
+ t empty$
+ 'skip$
+ { address empty$
+ 'skip$
+ { ": " * }
+ if$
+ t *
+ }
+ if$
+ }
+ if$
+}
+FUNCTION {format.publisher.address}
+{ publisher "publisher" bibinfo.warn format.org.or.pub
+}
+
+FUNCTION {format.organization.address}
+{ organization "organization" bibinfo.check format.org.or.pub
+}
+
+FUNCTION {article}
+{ output.bibitem
+ format.authors "author" output.check
+ author format.key output
+ format.date "year" output.check
+ date.block
+ format.title "title" output.check
+ crossref missing$
+ {
+ journal
+ "journal" bibinfo.check
+ emphasize
+ "journal" output.check
+ format.vol.num.pages output
+ }
+ { format.article.crossref output.nonnull
+ format.pages output
+ }
+ if$
+ format.note output
+ fin.entry
+}
+FUNCTION {book}
+{ output.bibitem
+ author empty$
+ { format.editors "author and editor" output.check
+ editor format.key output
+ }
+ { format.authors output.nonnull
+ crossref missing$
+ { "author and editor" editor either.or.check }
+ 'skip$
+ if$
+ }
+ if$
+ format.date "year" output.check
+ date.block
+ format.btitle "title" output.check
+ crossref missing$
+ { format.bvolume output
+ format.number.series output
+ format.publisher.address output
+ }
+ {
+ format.book.crossref output.nonnull
+ }
+ if$
+ format.edition output
+ format.note output
+ fin.entry
+}
+FUNCTION {booklet}
+{ output.bibitem
+ format.authors output
+ author format.key output
+ format.date "year" output.check
+ date.block
+ format.title "title" output.check
+ howpublished "howpublished" bibinfo.check output
+ address "address" bibinfo.check output
+ format.note output
+ fin.entry
+}
+
+FUNCTION {inbook}
+{ output.bibitem
+ author empty$
+ { format.editors "author and editor" output.check
+ editor format.key output
+ }
+ { format.authors output.nonnull
+ crossref missing$
+ { "author and editor" editor either.or.check }
+ 'skip$
+ if$
+ }
+ if$
+ format.date "year" output.check
+ date.block
+ format.btitle "title" output.check
+ crossref missing$
+ {
+ format.publisher.address output
+ format.bvolume output
+ format.chapter.pages "chapter and pages" output.check
+ format.number.series output
+ }
+ {
+ format.chapter.pages "chapter and pages" output.check
+ format.book.crossref output.nonnull
+ }
+ if$
+ format.edition output
+ format.note output
+ fin.entry
+}
+
+FUNCTION {incollection}
+{ output.bibitem
+ format.authors "author" output.check
+ author format.key output
+ format.date "year" output.check
+ date.block
+ format.title "title" output.check
+ crossref missing$
+ { format.in.ed.booktitle "booktitle" output.check
+ format.publisher.address output
+ format.bvolume output
+ format.number.series output
+ format.chapter.pages output
+ format.edition output
+ }
+ { format.incoll.inproc.crossref output.nonnull
+ format.chapter.pages output
+ }
+ if$
+ format.note output
+ fin.entry
+}
+FUNCTION {inproceedings}
+{ output.bibitem
+ format.authors "author" output.check
+ author format.key output
+ format.date "year" output.check
+ date.block
+ format.title "title" output.check
+ crossref missing$
+ { format.in.ed.booktitle "booktitle" output.check
+ publisher empty$
+ { format.organization.address output }
+ { organization "organization" bibinfo.check output
+ format.publisher.address output
+ }
+ if$
+ format.bvolume output
+ format.number.series output
+ format.pages output
+ }
+ { format.incoll.inproc.crossref output.nonnull
+ format.pages output
+ }
+ if$
+ format.note output
+ fin.entry
+}
+FUNCTION {conference} { inproceedings }
+FUNCTION {manual}
+{ output.bibitem
+ format.authors output
+ author format.key output
+ format.date "year" output.check
+ date.block
+ format.btitle "title" output.check
+ organization "organization" bibinfo.check output
+ address "address" bibinfo.check output
+ format.edition output
+ format.note output
+ fin.entry
+}
+
+FUNCTION {mastersthesis}
+{ output.bibitem
+ format.authors "author" output.check
+ author format.key output
+ format.date "year" output.check
+ date.block
+ format.btitle
+ "title" output.check
+ bbl.mthesis format.thesis.type output.nonnull
+ school "school" bibinfo.warn output
+ address "address" bibinfo.check output
+ format.note output
+ fin.entry
+}
+
+FUNCTION {misc}
+{ output.bibitem
+ format.authors output
+ author format.key output
+ format.date "year" output.check
+ date.block
+ format.title output
+ howpublished "howpublished" bibinfo.check output
+ format.note output
+ fin.entry
+}
+FUNCTION {phdthesis}
+{ output.bibitem
+ format.authors "author" output.check
+ author format.key output
+ format.date "year" output.check
+ date.block
+ format.btitle
+ "title" output.check
+ bbl.phdthesis format.thesis.type output.nonnull
+ school "school" bibinfo.warn output
+ address "address" bibinfo.check output
+ format.note output
+ fin.entry
+}
+
+FUNCTION {proceedings}
+{ output.bibitem
+ format.editors output
+ editor format.key output
+ format.date "year" output.check
+ date.block
+ format.btitle "title" output.check
+ format.bvolume output
+ format.number.series output
+ publisher empty$
+ { format.organization.address output }
+ { organization "organization" bibinfo.check output
+ format.publisher.address output
+ }
+ if$
+ format.note output
+ fin.entry
+}
+
+FUNCTION {techreport}
+{ output.bibitem
+ format.authors "author" output.check
+ author format.key output
+ format.date "year" output.check
+ date.block
+ format.title
+ "title" output.check
+ format.tr.number output.nonnull
+ institution "institution" bibinfo.warn output
+ address "address" bibinfo.check output
+ format.note output
+ fin.entry
+}
+
+FUNCTION {unpublished}
+{ output.bibitem
+ format.authors "author" output.check
+ author format.key output
+ format.date "year" output.check
+ date.block
+ format.title "title" output.check
+ format.note "note" output.check
+ fin.entry
+}
+
+FUNCTION {default.type} { misc }
+READ
+FUNCTION {sortify}
+{ purify$
+ "l" change.case$
+}
+INTEGERS { len }
+FUNCTION {chop.word}
+{ 's :=
+ 'len :=
+ s #1 len substring$ =
+ { s len #1 + global.max$ substring$ }
+ 's
+ if$
+}
+FUNCTION {format.lab.names}
+{ 's :=
+ "" 't :=
+ s #1 "{vv~}{ll}" format.name$
+ s num.names$ duplicate$
+ #2 >
+ { pop$
+ " " * bbl.etal emphasize *
+ }
+ { #2 <
+ 'skip$
+ { s #2 "{ff }{vv }{ll}{ jj}" format.name$ "others" =
+ {
+ " " * bbl.etal emphasize *
+ }
+ { bbl.and space.word * s #2 "{vv~}{ll}" format.name$
+ * }
+ if$
+ }
+ if$
+ }
+ if$
+}
+
+FUNCTION {author.key.label}
+{ author empty$
+ { key empty$
+ { cite$ #1 #3 substring$ }
+ 'key
+ if$
+ }
+ { author format.lab.names }
+ if$
+}
+
+FUNCTION {author.editor.key.label}
+{ author empty$
+ { editor empty$
+ { key empty$
+ { cite$ #1 #3 substring$ }
+ 'key
+ if$
+ }
+ { editor format.lab.names }
+ if$
+ }
+ { author format.lab.names }
+ if$
+}
+
+FUNCTION {editor.key.label}
+{ editor empty$
+ { key empty$
+ { cite$ #1 #3 substring$ }
+ 'key
+ if$
+ }
+ { editor format.lab.names }
+ if$
+}
+
+FUNCTION {calc.short.authors}
+{ type$ "book" =
+ type$ "inbook" =
+ or
+ 'author.editor.key.label
+ { type$ "proceedings" =
+ 'editor.key.label
+ 'author.key.label
+ if$
+ }
+ if$
+ 'short.list :=
+}
+
+FUNCTION {calc.label}
+{ calc.short.authors
+ short.list
+ "("
+ *
+ year duplicate$ empty$
+ short.list key field.or.null = or
+ { pop$ "" }
+ 'skip$
+ if$
+ *
+ 'label :=
+}
+
+FUNCTION {sort.format.names}
+{ 's :=
+ #1 'nameptr :=
+ ""
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ { s nameptr
+ "{vv{ } }{ll{ }}{ f{ }}{ jj{ }}"
+ format.name$ 't :=
+ nameptr #1 >
+ {
+ " " *
+ namesleft #1 = t "others" = and
+ { "zzzzz" * }
+ { t sortify * }
+ if$
+ }
+ { t sortify * }
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+}
+
+FUNCTION {sort.format.title}
+{ 't :=
+ "A " #2
+ "An " #3
+ "The " #4 t chop.word
+ chop.word
+ chop.word
+ sortify
+ #1 global.max$ substring$
+}
+FUNCTION {author.sort}
+{ author empty$
+ { key empty$
+ { "to sort, need author or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { author sort.format.names }
+ if$
+}
+FUNCTION {author.editor.sort}
+{ author empty$
+ { editor empty$
+ { key empty$
+ { "to sort, need author, editor, or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { editor sort.format.names }
+ if$
+ }
+ { author sort.format.names }
+ if$
+}
+FUNCTION {editor.sort}
+{ editor empty$
+ { key empty$
+ { "to sort, need editor or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { editor sort.format.names }
+ if$
+}
+FUNCTION {presort}
+{ calc.label
+ label sortify
+ " "
+ *
+ type$ "book" =
+ type$ "inbook" =
+ or
+ 'author.editor.sort
+ { type$ "proceedings" =
+ 'editor.sort
+ 'author.sort
+ if$
+ }
+ if$
+ #1 entry.max$ substring$
+ 'sort.label :=
+ sort.label
+ *
+ " "
+ *
+ title field.or.null
+ sort.format.title
+ *
+ #1 entry.max$ substring$
+ 'sort.key$ :=
+}
+
+ITERATE {presort}
+SORT
+STRINGS { last.label next.extra }
+INTEGERS { last.extra.num number.label }
+FUNCTION {initialize.extra.label.stuff}
+{ #0 int.to.chr$ 'last.label :=
+ "" 'next.extra :=
+ #0 'last.extra.num :=
+ #0 'number.label :=
+}
+FUNCTION {forward.pass}
+{ last.label label =
+ { last.extra.num #1 + 'last.extra.num :=
+ last.extra.num int.to.chr$ 'extra.label :=
+ }
+ { "a" chr.to.int$ 'last.extra.num :=
+ "" 'extra.label :=
+ label 'last.label :=
+ }
+ if$
+ number.label #1 + 'number.label :=
+}
+FUNCTION {reverse.pass}
+{ next.extra "b" =
+ { "a" 'extra.label := }
+ 'skip$
+ if$
+ extra.label 'next.extra :=
+ extra.label
+ duplicate$ empty$
+ 'skip$
+ { "{\natexlab{" swap$ * "}}" * }
+ if$
+ 'extra.label :=
+ label extra.label * 'label :=
+}
+EXECUTE {initialize.extra.label.stuff}
+ITERATE {forward.pass}
+REVERSE {reverse.pass}
+FUNCTION {bib.sort.order}
+{ sort.label
+ " "
+ *
+ year field.or.null sortify
+ *
+ " "
+ *
+ title field.or.null
+ sort.format.title
+ *
+ #1 entry.max$ substring$
+ 'sort.key$ :=
+}
+ITERATE {bib.sort.order}
+SORT
+FUNCTION {begin.bib}
+{ preamble$ empty$
+ 'skip$
+ { preamble$ write$ newline$ }
+ if$
+ "\begin{thebibliography}{" number.label int.to.str$ * "}" *
+ write$ newline$
+ "\providecommand{\natexlab}[1]{#1}"
+ write$ newline$
+ "\providecommand{\selectlanguage}[1]{\relax}"
+ write$ newline$
+}
+EXECUTE {begin.bib}
+EXECUTE {init.state.consts}
+ITERATE {call.type$}
+FUNCTION {end.bib}
+{ newline$
+ "\end{thebibliography}" write$ newline$
+}
+EXECUTE {end.bib}
+%% End of customized bst file
+%%
+%% End of file `tandfx.bst'.
diff --git a/biblio/bibtex/contrib/economic/worlddev.bst b/biblio/bibtex/contrib/economic/worlddev.bst
new file mode 100644
index 0000000000..498c5a8a53
--- /dev/null
+++ b/biblio/bibtex/contrib/economic/worlddev.bst
@@ -0,0 +1,1459 @@
+%%
+%% This is file `worlddev.bst',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% merlin.mbs (with options: `ay,nat,nm-rev,jnrlst,keyxyr,dt-jnl,note-yr,volp-com,jdt-pc,num-xser,bkpg-par,add-pub,edpar,bkedcap,blk-com,au-col,pp,ed,abr,xedn,amper,and-com,and-com-ed,etal-it,nfss,')
+%% ----------------------------------------
+%% *** World Development ***
+%%
+%% Copyright 1994-2004 Patrick W Daly
+ % ===============================================================
+ % IMPORTANT NOTICE:
+ % This bibliographic style (bst) file has been generated from one or
+ % more master bibliographic style (mbs) files, listed above.
+ %
+ % This generated file can be redistributed and/or modified under the terms
+ % of the LaTeX Project Public License Distributed from CTAN
+ % archives in directory macros/latex/base/lppl.txt; either
+ % version 1 of the License, or any later version.
+ % ===============================================================
+ % Name and version information of the main mbs file:
+ % \ProvidesFile{merlin.mbs}[2004/02/09 4.13 (PWD, AO, DPC)]
+ % For use with BibTeX version 0.99a or later
+ %-------------------------------------------------------------------
+ % This bibliography style file is intended for texts in ENGLISH
+ % This is an author-year citation style bibliography. As such, it is
+ % non-standard LaTeX, and requires a special package file to function properly.
+ % Such a package is natbib.sty by Patrick W. Daly
+ % The form of the \bibitem entries is
+ % \bibitem[Jones et al.(1990)]{key}...
+ % \bibitem[Jones et al.(1990)Jones, Baker, and Smith]{key}...
+ % The essential feature is that the label (the part in brackets) consists
+ % of the author names, as they should appear in the citation, with the year
+ % in parentheses following. There must be no space before the opening
+ % parenthesis!
+ % With natbib v5.3, a full list of authors may also follow the year.
+ % In natbib.sty, it is possible to define the type of enclosures that is
+ % really wanted (brackets or parentheses), but in either case, there must
+ % be parentheses in the label.
+ % The \cite command functions as follows:
+ % \citet{key} ==>> Jones et al. (1990)
+ % \citet*{key} ==>> Jones, Baker, and Smith (1990)
+ % \citep{key} ==>> (Jones et al., 1990)
+ % \citep*{key} ==>> (Jones, Baker, and Smith, 1990)
+ % \citep[chap. 2]{key} ==>> (Jones et al., 1990, chap. 2)
+ % \citep[e.g.][]{key} ==>> (e.g. Jones et al., 1990)
+ % \citep[e.g.][p. 32]{key} ==>> (e.g. Jones et al., p. 32)
+ % \citeauthor{key} ==>> Jones et al.
+ % \citeauthor*{key} ==>> Jones, Baker, and Smith
+ % \citeyear{key} ==>> 1990
+ %---------------------------------------------------------------------
+
+ENTRY
+ { address
+ author
+ booktitle
+ chapter
+ edition
+ editor
+ eid
+ howpublished
+ institution
+ journal
+ key
+ month
+ note
+ number
+ organization
+ pages
+ publisher
+ school
+ series
+ title
+ type
+ volume
+ year
+ }
+ {}
+ { label extra.label sort.label short.list }
+INTEGERS { output.state before.all mid.sentence after.sentence after.block }
+FUNCTION {init.state.consts}
+{ #0 'before.all :=
+ #1 'mid.sentence :=
+ #2 'after.sentence :=
+ #3 'after.block :=
+}
+STRINGS { s t}
+FUNCTION {output.nonnull}
+{ 's :=
+ output.state mid.sentence =
+ { ", " * write$ }
+ { output.state after.block =
+ { add.period$ write$
+ newline$
+ "\newblock " write$
+ }
+ { output.state before.all =
+ 'write$
+ { add.period$ " " * write$ }
+ if$
+ }
+ if$
+ mid.sentence 'output.state :=
+ }
+ if$
+ s
+}
+FUNCTION {output}
+{ duplicate$ empty$
+ 'pop$
+ 'output.nonnull
+ if$
+}
+FUNCTION {output.check}
+{ 't :=
+ duplicate$ empty$
+ { pop$ "empty " t * " in " * cite$ * warning$ }
+ 'output.nonnull
+ if$
+}
+FUNCTION {fin.entry}
+{ add.period$
+ write$
+ newline$
+}
+
+FUNCTION {new.block}
+{ output.state before.all =
+ 'skip$
+ { after.block 'output.state := }
+ if$
+}
+FUNCTION {new.sentence}
+{ output.state after.block =
+ 'skip$
+ { output.state before.all =
+ 'skip$
+ { after.sentence 'output.state := }
+ if$
+ }
+ if$
+}
+FUNCTION {add.blank}
+{ " " * before.all 'output.state :=
+}
+
+FUNCTION {add.colon}
+{ duplicate$ empty$
+ 'skip$
+ { ":" * add.blank }
+ if$
+}
+
+FUNCTION {date.block}
+{
+ skip$
+}
+
+FUNCTION {not}
+{ { #0 }
+ { #1 }
+ if$
+}
+FUNCTION {and}
+{ 'skip$
+ { pop$ #0 }
+ if$
+}
+FUNCTION {or}
+{ { pop$ #1 }
+ 'skip$
+ if$
+}
+FUNCTION {new.block.checkb}
+{ empty$
+ swap$ empty$
+ and
+ 'skip$
+ 'new.block
+ if$
+}
+FUNCTION {field.or.null}
+{ duplicate$ empty$
+ { pop$ "" }
+ 'skip$
+ if$
+}
+FUNCTION {emphasize}
+{ duplicate$ empty$
+ { pop$ "" }
+ { "\emph{" swap$ * "}" * }
+ if$
+}
+FUNCTION {tie.or.space.prefix}
+{ duplicate$ text.length$ #3 <
+ { "~" }
+ { " " }
+ if$
+ swap$
+}
+
+FUNCTION {capitalize}
+{ "u" change.case$ "t" change.case$ }
+
+FUNCTION {space.word}
+{ " " swap$ * " " * }
+ % Here are the language-specific definitions for explicit words.
+ % Each function has a name bbl.xxx where xxx is the English word.
+ % The language selected here is ENGLISH
+FUNCTION {bbl.and}
+{ "and"}
+
+FUNCTION {bbl.etal}
+{ "et~al." }
+
+FUNCTION {bbl.editors}
+{ "eds." }
+
+FUNCTION {bbl.editor}
+{ "ed." }
+
+FUNCTION {bbl.edby}
+{ "edited by" }
+
+FUNCTION {bbl.edition}
+{ "edn." }
+
+FUNCTION {bbl.volume}
+{ "vol." }
+
+FUNCTION {bbl.of}
+{ "of" }
+
+FUNCTION {bbl.number}
+{ "no." }
+
+FUNCTION {bbl.nr}
+{ "no." }
+
+FUNCTION {bbl.in}
+{ "in" }
+
+FUNCTION {bbl.pages}
+{ "pp." }
+
+FUNCTION {bbl.page}
+{ "p." }
+
+FUNCTION {bbl.chapter}
+{ "chap." }
+
+FUNCTION {bbl.techrep}
+{ "Tech. Rep." }
+
+FUNCTION {bbl.mthesis}
+{ "Master's thesis" }
+
+FUNCTION {bbl.phdthesis}
+{ "Ph.D. thesis" }
+
+MACRO {jan} {"Jan."}
+
+MACRO {feb} {"Feb."}
+
+MACRO {mar} {"Mar."}
+
+MACRO {apr} {"Apr."}
+
+MACRO {may} {"May"}
+
+MACRO {jun} {"Jun."}
+
+MACRO {jul} {"Jul."}
+
+MACRO {aug} {"Aug."}
+
+MACRO {sep} {"Sep."}
+
+MACRO {oct} {"Oct."}
+
+MACRO {nov} {"Nov."}
+
+MACRO {dec} {"Dec."}
+
+MACRO {acmcs} {"ACM Computing Surveys"}
+
+MACRO {acta} {"Acta Informatica"}
+
+MACRO {cacm} {"Communications of the ACM"}
+
+MACRO {ibmjrd} {"IBM Journal of Research and Development"}
+
+MACRO {ibmsj} {"IBM Systems Journal"}
+
+MACRO {ieeese} {"IEEE Transactions on Software Engineering"}
+
+MACRO {ieeetc} {"IEEE Transactions on Computers"}
+
+MACRO {ieeetcad}
+ {"IEEE Transactions on Computer-Aided Design of Integrated Circuits"}
+
+MACRO {ipl} {"Information Processing Letters"}
+
+MACRO {jacm} {"Journal of the ACM"}
+
+MACRO {jcss} {"Journal of Computer and System Sciences"}
+
+MACRO {scp} {"Science of Computer Programming"}
+
+MACRO {sicomp} {"SIAM Journal on Computing"}
+
+MACRO {tocs} {"ACM Transactions on Computer Systems"}
+
+MACRO {tods} {"ACM Transactions on Database Systems"}
+
+MACRO {tog} {"ACM Transactions on Graphics"}
+
+MACRO {toms} {"ACM Transactions on Mathematical Software"}
+
+MACRO {toois} {"ACM Transactions on Office Information Systems"}
+
+MACRO {toplas} {"ACM Transactions on Programming Languages and Systems"}
+
+MACRO {tcs} {"Theoretical Computer Science"}
+FUNCTION {bibinfo.check}
+{ swap$
+ duplicate$ missing$
+ {
+ pop$ pop$
+ ""
+ }
+ { duplicate$ empty$
+ {
+ swap$ pop$
+ }
+ { swap$
+ pop$
+ }
+ if$
+ }
+ if$
+}
+FUNCTION {bibinfo.warn}
+{ swap$
+ duplicate$ missing$
+ {
+ swap$ "missing " swap$ * " in " * cite$ * warning$ pop$
+ ""
+ }
+ { duplicate$ empty$
+ {
+ swap$ "empty " swap$ * " in " * cite$ * warning$
+ }
+ { swap$
+ pop$
+ }
+ if$
+ }
+ if$
+}
+STRINGS { bibinfo}
+INTEGERS { nameptr namesleft numnames }
+
+FUNCTION {format.names}
+{ 'bibinfo :=
+ duplicate$ empty$ 'skip$ {
+ 's :=
+ "" 't :=
+ #1 'nameptr :=
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ { s nameptr
+ "{vv~}{ll}{, f.}{, jj}"
+ format.name$
+ bibinfo bibinfo.check
+ 't :=
+ nameptr #1 >
+ {
+ namesleft #1 >
+ { ", " * t * }
+ {
+ "," *
+ s nameptr "{ll}" format.name$ duplicate$ "others" =
+ { 't := }
+ { pop$ }
+ if$
+ t "others" =
+ {
+ " " * bbl.etal emphasize *
+ }
+ {
+ "\&"
+ space.word * t *
+ }
+ if$
+ }
+ if$
+ }
+ 't
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+ } if$
+}
+FUNCTION {format.names.ed}
+{
+ 'bibinfo :=
+ duplicate$ empty$ 'skip$ {
+ 's :=
+ "" 't :=
+ #1 'nameptr :=
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ { s nameptr
+ "{f.~}{vv~}{ll}{, jj}"
+ format.name$
+ bibinfo bibinfo.check
+ 't :=
+ nameptr #1 >
+ {
+ namesleft #1 >
+ { ", " * t * }
+ {
+ "," *
+ s nameptr "{ll}" format.name$ duplicate$ "others" =
+ { 't := }
+ { pop$ }
+ if$
+ t "others" =
+ {
+
+ " " * bbl.etal emphasize *
+ }
+ {
+ "\&"
+ space.word * t *
+ }
+ if$
+ }
+ if$
+ }
+ 't
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+ } if$
+}
+FUNCTION {format.key}
+{ empty$
+ { key field.or.null }
+ { "" }
+ if$
+}
+
+FUNCTION {format.authors}
+{ author "author" format.names
+}
+FUNCTION {get.bbl.editor}
+{ editor num.names$ #1 > 'bbl.editors 'bbl.editor if$ }
+
+FUNCTION {format.editors}
+{ editor "editor" format.names duplicate$ empty$ 'skip$
+ {
+ " " *
+ get.bbl.editor
+ capitalize
+ "(" swap$ * ")" *
+ *
+ }
+ if$
+}
+FUNCTION {format.note}
+{
+ note empty$
+ { "" }
+ { note #1 #1 substring$
+ duplicate$ "{" =
+ 'skip$
+ { output.state mid.sentence =
+ { "l" }
+ { "u" }
+ if$
+ change.case$
+ }
+ if$
+ note #2 global.max$ substring$ * "note" bibinfo.check
+ }
+ if$
+}
+
+FUNCTION {format.title}
+{ title
+ duplicate$ empty$ 'skip$
+ { "t" change.case$ }
+ if$
+ "title" bibinfo.check
+}
+FUNCTION {format.full.names}
+{'s :=
+ "" 't :=
+ #1 'nameptr :=
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ { s nameptr
+ "{vv~}{ll}" format.name$
+ 't :=
+ nameptr #1 >
+ {
+ namesleft #1 >
+ { ", " * t * }
+ {
+ s nameptr "{ll}" format.name$ duplicate$ "others" =
+ { 't := }
+ { pop$ }
+ if$
+ t "others" =
+ {
+ " " * bbl.etal emphasize *
+ }
+ {
+ numnames #2 >
+ { "," * }
+ 'skip$
+ if$
+ "\&"
+ space.word * t *
+ }
+ if$
+ }
+ if$
+ }
+ 't
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+}
+
+FUNCTION {author.editor.key.full}
+{ author empty$
+ { editor empty$
+ { key empty$
+ { cite$ #1 #3 substring$ }
+ 'key
+ if$
+ }
+ { editor format.full.names }
+ if$
+ }
+ { author format.full.names }
+ if$
+}
+
+FUNCTION {author.key.full}
+{ author empty$
+ { key empty$
+ { cite$ #1 #3 substring$ }
+ 'key
+ if$
+ }
+ { author format.full.names }
+ if$
+}
+
+FUNCTION {editor.key.full}
+{ editor empty$
+ { key empty$
+ { cite$ #1 #3 substring$ }
+ 'key
+ if$
+ }
+ { editor format.full.names }
+ if$
+}
+
+FUNCTION {make.full.names}
+{ type$ "book" =
+ type$ "inbook" =
+ or
+ 'author.editor.key.full
+ { type$ "proceedings" =
+ 'editor.key.full
+ 'author.key.full
+ if$
+ }
+ if$
+}
+
+FUNCTION {output.bibitem}
+{ newline$
+ "\bibitem[{" write$
+ label write$
+ ")" make.full.names duplicate$ short.list =
+ { pop$ }
+ { * }
+ if$
+ "}]{" * write$
+ cite$ write$
+ "}" write$
+ newline$
+ ""
+ before.all 'output.state :=
+}
+
+FUNCTION {n.dashify}
+{
+ 't :=
+ ""
+ { t empty$ not }
+ { t #1 #1 substring$ "-" =
+ { t #1 #2 substring$ "--" = not
+ { "--" *
+ t #2 global.max$ substring$ 't :=
+ }
+ { { t #1 #1 substring$ "-" = }
+ { "-" *
+ t #2 global.max$ substring$ 't :=
+ }
+ while$
+ }
+ if$
+ }
+ { t #1 #1 substring$ *
+ t #2 global.max$ substring$ 't :=
+ }
+ if$
+ }
+ while$
+}
+
+FUNCTION {word.in}
+{ bbl.in
+ " " * }
+
+FUNCTION {format.date}
+{ year "year" bibinfo.check duplicate$ empty$
+ {
+ "empty year in " cite$ * "; set to ????" * warning$
+ pop$ "????"
+ }
+ 'skip$
+ if$
+ extra.label *
+}
+FUNCTION{format.year}
+{ year "year" bibinfo.check duplicate$ empty$
+ { "empty year in " cite$ *
+ "; set to ????" *
+ warning$
+ pop$ "????"
+ }
+ {
+ }
+ if$
+ extra.label *
+ "(" swap$ * ")" *
+}
+FUNCTION {format.btitle}
+{ title "title" bibinfo.check
+ duplicate$ empty$ 'skip$
+ {
+ emphasize
+ }
+ if$
+}
+FUNCTION {either.or.check}
+{ empty$
+ 'pop$
+ { "can't use both " swap$ * " fields in " * cite$ * warning$ }
+ if$
+}
+FUNCTION {format.bvolume}
+{ volume empty$
+ { "" }
+ { bbl.volume volume tie.or.space.prefix
+ "volume" bibinfo.check * *
+ series "series" bibinfo.check
+ duplicate$ empty$ 'pop$
+ { swap$ bbl.of space.word * swap$
+ emphasize * }
+ if$
+ "volume and number" number either.or.check
+ }
+ if$
+}
+FUNCTION {format.number.series}
+{ volume empty$
+ { number empty$
+ { series field.or.null }
+ { series empty$
+ { number "number" bibinfo.check }
+ { output.state mid.sentence =
+ { bbl.number }
+ { bbl.number capitalize }
+ if$
+ number tie.or.space.prefix "number" bibinfo.check * *
+ bbl.in space.word *
+ series "series" bibinfo.check *
+ }
+ if$
+ }
+ if$
+ }
+ { "" }
+ if$
+}
+
+FUNCTION {format.edition}
+{ edition duplicate$ empty$ 'skip$
+ {
+ output.state mid.sentence =
+ { "l" }
+ { "t" }
+ if$ change.case$
+ "edition" bibinfo.check
+ " " * bbl.edition *
+ }
+ if$
+}
+INTEGERS { multiresult }
+FUNCTION {multi.page.check}
+{ 't :=
+ #0 'multiresult :=
+ { multiresult not
+ t empty$ not
+ and
+ }
+ { t #1 #1 substring$
+ duplicate$ "-" =
+ swap$ duplicate$ "," =
+ swap$ "+" =
+ or or
+ { #1 'multiresult := }
+ { t #2 global.max$ substring$ 't := }
+ if$
+ }
+ while$
+ multiresult
+}
+FUNCTION {format.pages}
+{ pages duplicate$ empty$ 'skip$
+ { duplicate$ multi.page.check
+ {
+ bbl.pages swap$
+ n.dashify
+ }
+ {
+ bbl.page swap$
+ }
+ if$
+ tie.or.space.prefix
+ "pages" bibinfo.check
+ * *
+ "(" swap$ * ")" *
+ }
+ if$
+}
+FUNCTION {format.journal.pages}
+{ pages duplicate$ empty$ 'pop$
+ { swap$ duplicate$ empty$
+ { pop$ pop$ format.pages }
+ {
+ ", " *
+ format.year * ", " *
+ swap$
+ n.dashify
+ "pages" bibinfo.check
+ *
+ }
+ if$
+ }
+ if$
+}
+FUNCTION {format.journal.eid}
+{ eid "eid" bibinfo.check
+ duplicate$ empty$ 'pop$
+ { swap$ duplicate$ empty$ 'skip$
+ {
+ ", " *
+ }
+ if$
+ swap$ *
+ }
+ if$
+}
+FUNCTION {format.vol.num.pages}
+{ volume field.or.null
+ duplicate$ empty$ 'skip$
+ {
+ "volume" bibinfo.check
+ }
+ if$
+ number "number" bibinfo.check duplicate$ empty$ 'skip$
+ {
+ swap$ duplicate$ empty$
+ { "there's a number but no volume in " cite$ * warning$ }
+ 'skip$
+ if$
+ swap$
+ "(" swap$ * ")" *
+ }
+ if$ *
+ eid empty$
+ { format.journal.pages }
+ { format.journal.eid }
+ if$
+}
+
+FUNCTION {format.chapter.pages}
+{ chapter empty$
+ 'format.pages
+ { type empty$
+ { bbl.chapter }
+ { type "l" change.case$
+ "type" bibinfo.check
+ }
+ if$
+ chapter tie.or.space.prefix
+ "chapter" bibinfo.check
+ * *
+ pages empty$
+ 'skip$
+ { ", " * format.pages * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.booktitle}
+{
+ booktitle "booktitle" bibinfo.check
+ emphasize
+}
+FUNCTION {format.in.ed.booktitle}
+{ format.booktitle duplicate$ empty$ 'skip$
+ {
+ editor "editor" format.names.ed duplicate$ empty$ 'pop$
+ {
+ " " *
+ get.bbl.editor
+ capitalize
+ "(" swap$ * "), " *
+ * swap$
+ * }
+ if$
+ word.in swap$ *
+ }
+ if$
+}
+FUNCTION {format.thesis.type}
+{ type duplicate$ empty$
+ 'pop$
+ { swap$ pop$
+ "t" change.case$ "type" bibinfo.check
+ }
+ if$
+}
+FUNCTION {format.tr.number}
+{ number "number" bibinfo.check
+ type duplicate$ empty$
+ { pop$ bbl.techrep }
+ 'skip$
+ if$
+ "type" bibinfo.check
+ swap$ duplicate$ empty$
+ { pop$ "t" change.case$ }
+ { tie.or.space.prefix * * }
+ if$
+}
+FUNCTION {format.article.crossref}
+{
+ word.in
+ " \cite{" * crossref * "}" *
+}
+FUNCTION {format.book.crossref}
+{ volume duplicate$ empty$
+ { "empty volume in " cite$ * "'s crossref of " * crossref * warning$
+ pop$ word.in
+ }
+ { bbl.volume
+ swap$ tie.or.space.prefix "volume" bibinfo.check * * bbl.of space.word *
+ }
+ if$
+ " \cite{" * crossref * "}" *
+}
+FUNCTION {format.incoll.inproc.crossref}
+{
+ word.in
+ " \cite{" * crossref * "}" *
+}
+FUNCTION {format.org.or.pub}
+{ 't :=
+ ""
+ address empty$ t empty$ and
+ 'skip$
+ {
+ address "address" bibinfo.check *
+ t empty$
+ 'skip$
+ { address empty$
+ 'skip$
+ { ": " * }
+ if$
+ t *
+ }
+ if$
+ }
+ if$
+}
+FUNCTION {format.publisher.address}
+{ publisher "publisher" bibinfo.warn format.org.or.pub
+}
+
+FUNCTION {format.organization.address}
+{ organization "organization" bibinfo.check format.org.or.pub
+}
+
+FUNCTION {article}
+{ output.bibitem
+ format.authors "author" output.check
+ author format.key output
+ add.colon
+ format.title "title" output.check
+ crossref missing$
+ {
+ journal
+ "journal" bibinfo.check
+ emphasize
+ "journal" output.check
+ format.vol.num.pages output
+ }
+ { format.article.crossref output.nonnull
+ format.pages output
+ }
+ if$
+ format.note output
+ fin.entry
+}
+FUNCTION {book}
+{ output.bibitem
+ author empty$
+ { format.editors "author and editor" output.check
+ editor format.key output
+ add.colon
+ }
+ { format.authors output.nonnull
+ add.colon
+ crossref missing$
+ { "author and editor" editor either.or.check }
+ 'skip$
+ if$
+ }
+ if$
+ format.btitle "title" output.check
+ crossref missing$
+ { format.bvolume output
+ format.number.series output
+ format.publisher.address output
+ }
+ {
+ format.book.crossref output.nonnull
+ }
+ if$
+ format.edition output
+ format.date "year" output.check
+ format.note output
+ fin.entry
+}
+FUNCTION {booklet}
+{ output.bibitem
+ format.authors output
+ author format.key output
+ add.colon
+ format.title "title" output.check
+ howpublished "howpublished" bibinfo.check output
+ address "address" bibinfo.check output
+ format.date "year" output.check
+ format.note output
+ fin.entry
+}
+
+FUNCTION {inbook}
+{ output.bibitem
+ author empty$
+ { format.editors "author and editor" output.check
+ editor format.key output
+ add.colon
+ }
+ { format.authors output.nonnull
+ add.colon
+ crossref missing$
+ { "author and editor" editor either.or.check }
+ 'skip$
+ if$
+ }
+ if$
+ format.btitle "title" output.check
+ crossref missing$
+ {
+ format.bvolume output
+ format.chapter.pages "chapter and pages" output.check
+ format.number.series output
+ format.publisher.address output
+ }
+ {
+ format.chapter.pages "chapter and pages" output.check
+ format.book.crossref output.nonnull
+ }
+ if$
+ format.edition output
+ format.date "year" output.check
+ date.block
+ format.note output
+ fin.entry
+}
+
+FUNCTION {incollection}
+{ output.bibitem
+ format.authors "author" output.check
+ author format.key output
+ add.colon
+ format.title "title" output.check
+ crossref missing$
+ { format.in.ed.booktitle "booktitle" output.check
+ format.bvolume output
+ format.number.series output
+ format.chapter.pages output
+ format.publisher.address output
+ format.edition output
+ }
+ { format.incoll.inproc.crossref output.nonnull
+ format.chapter.pages output
+ }
+ if$
+ format.date "year" output.check
+ date.block
+ format.note output
+ fin.entry
+}
+FUNCTION {inproceedings}
+{ output.bibitem
+ format.authors "author" output.check
+ author format.key output
+ add.colon
+ format.title "title" output.check
+ crossref missing$
+ { format.in.ed.booktitle "booktitle" output.check
+ format.bvolume output
+ format.number.series output
+ publisher empty$
+ { format.organization.address output }
+ { organization "organization" bibinfo.check output
+ format.publisher.address output
+ }
+ if$
+ }
+ { format.incoll.inproc.crossref output.nonnull
+ }
+ if$
+ format.date "year" output.check
+ date.block
+ format.pages "pages" output.check
+ format.note output
+ fin.entry
+}
+FUNCTION {conference} { inproceedings }
+FUNCTION {manual}
+{ output.bibitem
+ format.authors output
+ author format.key output
+ add.colon
+ format.btitle "title" output.check
+ organization "organization" bibinfo.check output
+ address "address" bibinfo.check output
+ format.edition output
+ format.date "year" output.check
+ format.note output
+ fin.entry
+}
+
+FUNCTION {mastersthesis}
+{ output.bibitem
+ format.authors "author" output.check
+ author format.key output
+ add.colon
+ format.btitle
+ "title" output.check
+ bbl.mthesis format.thesis.type output.nonnull
+ school "school" bibinfo.warn output
+ address "address" bibinfo.check output
+ format.date "year" output.check
+ format.note output
+ fin.entry
+}
+
+FUNCTION {misc}
+{ output.bibitem
+ format.authors output
+ author format.key output
+ add.colon
+ format.title output
+ howpublished "howpublished" bibinfo.check output
+ format.date "year" output.check
+ format.note output
+ fin.entry
+}
+FUNCTION {phdthesis}
+{ output.bibitem
+ format.authors "author" output.check
+ author format.key output
+ add.colon
+ format.btitle
+ "title" output.check
+ bbl.phdthesis format.thesis.type output.nonnull
+ school "school" bibinfo.warn output
+ address "address" bibinfo.check output
+ format.date "year" output.check
+ format.note output
+ fin.entry
+}
+
+FUNCTION {proceedings}
+{ output.bibitem
+ format.editors output
+ editor format.key output
+ add.colon
+ format.btitle "title" output.check
+ format.bvolume output
+ format.number.series output
+ publisher empty$
+ { format.organization.address output }
+ { organization "organization" bibinfo.check output
+ format.publisher.address output
+ }
+ if$
+ format.date "year" output.check
+ format.note output
+ fin.entry
+}
+
+FUNCTION {techreport}
+{ output.bibitem
+ format.authors "author" output.check
+ author format.key output
+ add.colon
+ format.title
+ "title" output.check
+ format.tr.number output.nonnull
+ institution "institution" bibinfo.warn output
+ address "address" bibinfo.check output
+ format.date "year" output.check
+ format.note output
+ fin.entry
+}
+
+FUNCTION {unpublished}
+{ output.bibitem
+ format.authors "author" output.check
+ author format.key output
+ add.colon
+ format.title "title" output.check
+ format.date "year" output.check
+ format.note "note" output.check
+ fin.entry
+}
+
+FUNCTION {default.type} { misc }
+READ
+FUNCTION {sortify}
+{ purify$
+ "l" change.case$
+}
+INTEGERS { len }
+FUNCTION {chop.word}
+{ 's :=
+ 'len :=
+ s #1 len substring$ =
+ { s len #1 + global.max$ substring$ }
+ 's
+ if$
+}
+FUNCTION {format.lab.names}
+{ 's :=
+ "" 't :=
+ s #1 "{vv~}{ll}" format.name$
+ s num.names$ duplicate$
+ #2 >
+ { pop$
+ " " * bbl.etal emphasize *
+ }
+ { #2 <
+ 'skip$
+ { s #2 "{ff }{vv }{ll}{ jj}" format.name$ "others" =
+ {
+ " " * bbl.etal emphasize *
+ }
+ { " \& " * s #2 "{vv~}{ll}" format.name$
+ * }
+ if$
+ }
+ if$
+ }
+ if$
+}
+
+FUNCTION {author.key.label}
+{ author empty$
+ { key empty$
+ { cite$ #1 #3 substring$ }
+ 'key
+ if$
+ }
+ { author format.lab.names }
+ if$
+}
+
+FUNCTION {author.editor.key.label}
+{ author empty$
+ { editor empty$
+ { key empty$
+ { cite$ #1 #3 substring$ }
+ 'key
+ if$
+ }
+ { editor format.lab.names }
+ if$
+ }
+ { author format.lab.names }
+ if$
+}
+
+FUNCTION {editor.key.label}
+{ editor empty$
+ { key empty$
+ { cite$ #1 #3 substring$ }
+ 'key
+ if$
+ }
+ { editor format.lab.names }
+ if$
+}
+
+FUNCTION {calc.short.authors}
+{ type$ "book" =
+ type$ "inbook" =
+ or
+ 'author.editor.key.label
+ { type$ "proceedings" =
+ 'editor.key.label
+ 'author.key.label
+ if$
+ }
+ if$
+ 'short.list :=
+}
+
+FUNCTION {calc.label}
+{ calc.short.authors
+ short.list
+ "("
+ *
+ year duplicate$ empty$
+ short.list key field.or.null = or
+ { pop$ "" }
+ 'skip$
+ if$
+ *
+ 'label :=
+}
+
+FUNCTION {sort.format.names}
+{ 's :=
+ #1 'nameptr :=
+ ""
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ { s nameptr
+ "{vv{ } }{ll{ }}{ f{ }}{ jj{ }}"
+ format.name$ 't :=
+ nameptr #1 >
+ {
+ " " *
+ namesleft #1 = t "others" = and
+ { "zzzzz" * }
+ { t sortify * }
+ if$
+ }
+ { t sortify * }
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+}
+
+FUNCTION {sort.format.title}
+{ 't :=
+ "A " #2
+ "An " #3
+ "The " #4 t chop.word
+ chop.word
+ chop.word
+ sortify
+ #1 global.max$ substring$
+}
+FUNCTION {author.sort}
+{ author empty$
+ { key empty$
+ { "to sort, need author or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { author sort.format.names }
+ if$
+}
+FUNCTION {author.editor.sort}
+{ author empty$
+ { editor empty$
+ { key empty$
+ { "to sort, need author, editor, or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { editor sort.format.names }
+ if$
+ }
+ { author sort.format.names }
+ if$
+}
+FUNCTION {editor.sort}
+{ editor empty$
+ { key empty$
+ { "to sort, need editor or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { editor sort.format.names }
+ if$
+}
+FUNCTION {presort}
+{ calc.label
+ label sortify
+ " "
+ *
+ type$ "book" =
+ type$ "inbook" =
+ or
+ 'author.editor.sort
+ { type$ "proceedings" =
+ 'editor.sort
+ 'author.sort
+ if$
+ }
+ if$
+ #1 entry.max$ substring$
+ 'sort.label :=
+ sort.label
+ *
+ " "
+ *
+ title field.or.null
+ sort.format.title
+ *
+ #1 entry.max$ substring$
+ 'sort.key$ :=
+}
+
+ITERATE {presort}
+SORT
+STRINGS { last.label next.extra }
+INTEGERS { last.extra.num number.label }
+FUNCTION {initialize.extra.label.stuff}
+{ #0 int.to.chr$ 'last.label :=
+ "" 'next.extra :=
+ #0 'last.extra.num :=
+ #0 'number.label :=
+}
+FUNCTION {forward.pass}
+{ last.label label =
+ { last.extra.num #1 + 'last.extra.num :=
+ last.extra.num int.to.chr$ 'extra.label :=
+ }
+ { "a" chr.to.int$ 'last.extra.num :=
+ "" 'extra.label :=
+ label 'last.label :=
+ }
+ if$
+ number.label #1 + 'number.label :=
+}
+FUNCTION {reverse.pass}
+{ next.extra "b" =
+ { "a" 'extra.label := }
+ 'skip$
+ if$
+ extra.label 'next.extra :=
+ extra.label
+ duplicate$ empty$
+ 'skip$
+ { "{\natexlab{" swap$ * "}}" * }
+ if$
+ 'extra.label :=
+ label extra.label * 'label :=
+}
+EXECUTE {initialize.extra.label.stuff}
+ITERATE {forward.pass}
+REVERSE {reverse.pass}
+FUNCTION {bib.sort.order}
+{ sort.label
+ " "
+ *
+ year field.or.null sortify
+ *
+ " "
+ *
+ title field.or.null
+ sort.format.title
+ *
+ #1 entry.max$ substring$
+ 'sort.key$ :=
+}
+ITERATE {bib.sort.order}
+SORT
+FUNCTION {begin.bib}
+{ preamble$ empty$
+ 'skip$
+ { preamble$ write$ newline$ }
+ if$
+ "\begin{thebibliography}{" number.label int.to.str$ * "}" *
+ write$ newline$
+ "\providecommand{\natexlab}[1]{#1}"
+ write$ newline$
+}
+EXECUTE {begin.bib}
+EXECUTE {init.state.consts}
+ITERATE {call.type$}
+FUNCTION {end.bib}
+{ newline$
+ "\end{thebibliography}" write$ newline$
+}
+EXECUTE {end.bib}
+%% End of customized bst file
+%%
+%% End of file `worlddev.bst'.
diff --git a/biblio/bibtex/contrib/economic/worlddev.cls b/biblio/bibtex/contrib/economic/worlddev.cls
new file mode 100644
index 0000000000..8c9aeb8c97
--- /dev/null
+++ b/biblio/bibtex/contrib/economic/worlddev.cls
@@ -0,0 +1,243 @@
+%%% LaTeX class for manuscripts submitted to the
+%%% Journal "World Development" (worlddev)
+%%%
+%%% author: Arne Henningsen
+%%% version: 1.1 (18 November 2009)
+%%% license: LaTeX Project Public License
+%%%
+%%% Note: This is an unofficial style file that may not fully comply
+%%% with the Formatting Instructions of the "World Development" in every detail.
+%%% Please report any problems at
+%%% http://sourceforge.net/projects/economtex/
+%%% Further information is available at
+%%% http://economtex.wiki.sourceforge.net/
+%%%
+%%% This document class is based on the "scrartcl" class
+%%% from the KOMA script bundle.
+%%% Following additional packages are required:
+%%% amsmath, babel, endfloat, endnotes, geometry,
+%%% ifthen, lmodern, natbib, setspace, textcomp, titlesec, url
+%%%
+%%% The class provides following options:
+%%% noendnotes - don't use endnotes (use footnotes)
+%%% noendfloat - don't move floats to the end of the paper
+%%% author - show name(s) of authors(s)
+%%% date - show date
+%%%
+%%% This document class provides 3 new commands:
+%%% \keywords can be used to show keywors below the abstract
+%%% \jelclass can be used to show JEL classifications below the abstract
+%%% \affiliation can be used spefify the affiliation(s) of the author(s)
+%%%
+%%% If you use footnotes, add following line before the reference section:
+%%% \listofendnotes
+%%%
+%%% "World Development" requires that you use double quotes
+%%% you could do this with the ``csquotes'' package:
+%%% \usepackage{csquotes}
+%%% \MakeOuterQuote{<yourQuoteCharacter>}
+%%%
+%%% Website of the journal "World Development":
+%%% http://www.elsevier.com/wps/locate/worlddev/
+
+
+\NeedsTeXFormat{LaTeX2e}
+\ProvidesClass{worlddev}[2009/11/18 LaTeX class for the Journal 'World Development']
+
+\RequirePackage{ifthen}
+
+% option NOT to place floats at the end
+\newcounter{UseEndfloat}
+\setcounter{UseEndfloat}{1}
+\DeclareOption{noendfloat}{\setcounter{UseEndfloat}{0}}
+
+% option to use footnotes in place of endnotes
+\newcounter{UseEndnotes}
+\setcounter{UseEndnotes}{1}
+\DeclareOption{noendnotes}{\setcounter{UseEndnotes}{0}}
+
+% option to show the authors' names
+\newcounter{ShowAuthor}
+\setcounter{ShowAuthor}{0}
+\DeclareOption{author}{\setcounter{ShowAuthor}{1}}
+
+% option to print the date
+\newcounter{ShowDate}
+\setcounter{ShowDate}{0}
+\DeclareOption{date}{\setcounter{ShowDate}{1}}
+
+% pass any options on to the scrartcl class and load this class with some options
+\DeclareOption*{\PassOptionsToClass{\CurrentOption}{scrartcl}}
+\ProcessOptions\relax
+\LoadClass[12pt,english,pointlessnumbers,tablecaptionabove,
+ noonelinecaption]{scrartcl}
+% pointlessnumbers = do not add final dot after ordinary section numbers
+% tablecaptionabove = use \captionabove for tables
+% noonelinecaption = do not treat one-line captions differently
+
+% use babel package and set language to english
+\RequirePackage[english]{babel}
+
+% page format, margins
+\RequirePackage{geometry}
+\geometry{a4paper, tmargin=2.5cm, bmargin=2.8cm, lmargin=2.5cm,
+ rmargin=2.5cm, headheight=0cm, headsep=0cm, footskip=1.2cm }
+
+% double spacing
+\RequirePackage{setspace}
+\doublespacing
+
+% spacing around formulas
+\AtBeginDocument{
+\setlength{\abovedisplayshortskip}{6pt}
+\setlength{\belowdisplayshortskip}{6pt}
+\setlength{\abovedisplayskip}{6pt}
+\setlength{\belowdisplayskip}{6pt}
+\allowdisplaybreaks
+}
+
+% spacing around captions and floats
+\setlength{\abovecaptionskip}{6pt}
+\setlength{\belowcaptionskip}{3pt}
+\setlength{\floatsep}{0pt}
+\setlength{\textfloatsep}{20pt}
+\setlength{\intextsep}{15pt}
+
+% font family: Latin Modern
+\RequirePackage{textcomp}
+\RequirePackage{lmodern}
+
+% amsmath
+\RequirePackage[fleqn]{amsmath}
+% for compatibility with ajae.cls
+\newcommand{\veclatin}[1]{#1}
+\newcommand{\matlatin}[1]{#1}
+\newcommand{\vecgreek}[1]{#1}
+\newcommand{\matgreek}[1]{#1}
+
+% font for URLs
+\RequirePackage{url}
+\def\UrlFont{\rmfamily}
+
+%% formatting section and subsection headers
+\RequirePackage{titlesec}
+% format of section headers
+\newcommand{\secformat}[1]{\MakeUppercase{#1}}
+\titleformat{\section}[block]
+ {\normalfont\filcenter}
+ {\arabic{section}. }
+ {0pt}
+ {\secformat}
+% spacing around section headers
+\titlespacing*{\section}{0pt}{3ex}{0.3ex}
+% format of subsection headers
+\titleformat{\subsection}[block]
+ {\normalsize\filcenter}
+ {(\alph{subsection}) }
+ {0pt}
+ {\textit}
+% spacing around subsection headers
+\titlespacing*{\subsection}{0pt}{2ex}{0.15ex}
+
+%% warning if subsubsection headers are present
+\renewcommand{\subsubsection}[1]{%
+\ClassWarning{worlddev}{subsubsections are ignored}%
+}
+
+% citations and bibliography
+\RequirePackage[authoryear]{natbib}
+\setlength{\bibsep}{0pt}
+
+%% use endnotes in place of footnotes
+\ifthenelse{\equal{\theUseEndnotes}{1}}{
+ \RequirePackage{endnotes}
+ \let\footnote=\endnote
+ \newcommand{\listofendnotes}{
+ \begingroup
+ \parindent 0pt
+ \parskip 0ex
+ \def\enotesize{\normalsize}
+ \theendnotes
+ \endgroup
+ }
+ % use normalsize numbers (copied from endnote.sty and modified thereafter)
+ \def\enoteformat{\rightskip\z@ \leftskip\z@ \parindent=0em
+ \leavevmode\llap{\theenmark. }}
+}{}
+
+% captions of figures and tables
+\setcapwidth[c]{\textwidth}
+\setkomafont{caption}{\centering \itshape}
+\renewcommand{\captionformat}{. }
+
+% move floats to the end of the paper
+\ifthenelse{\equal{\theUseEndfloat}{1}}{
+ \RequirePackage[nolists,tablesfirst]{endfloat}
+}{}
+
+% titlepage with title, author, affiliation and date
+\newcommand{\affiliation}[1]{\newcommand{\@affiliation}{#1}}
+\renewcommand{\and}{{\normalfont and}}
+\renewcommand{\maketitle}{
+ \begin{center}
+ \begin{Large}
+ \begin{spacing}{1.25}
+ \textbf{\@title}
+ \end{spacing}
+ \end{Large}
+ \vspace*{5mm}
+ \ifthenelse{\equal{\theShowAuthor}{1}}{
+ \MakeUppercase{\@author}\\
+ \ifthenelse{ \isundefined\@affiliation }{}{
+ \vspace*{3mm}
+ \textit{\@affiliation}\\
+ }
+ }{}
+ \vspace*{3mm}
+ \ifthenelse{\equal{\theShowDate}{1}}{
+ \@date\\
+ }{}
+ \vspace*{3mm}
+ \end{center}
+}
+
+
+% abstract, keywords, JEL classification
+\newcommand{\keywords}[1]{\newcommand{\@keywords}{#1}}
+\newcommand{\jelclass}[1]{\newcommand{\@jelclass}{#1}}
+\renewenvironment{abstract}{%
+\begin{center}
+\begin{minipage}{0.94 \textwidth}
+\small
+\textbf{Summary.}\;---%
+}{%
+\ifthenelse{ \isundefined\@keywords }{
+\ClassWarningNoLine{worlddev}{No keywords specified.
+ Please use the command \protect\keywords}
+}{
+
+\medskip \noindent
+\textit{Key words} --- \@keywords
+}
+\ifthenelse{ \isundefined\@jelclass }{
+}{
+
+\medskip \noindent
+\textit{JEL classification} --- \@jelclass
+}
+\end{minipage}
+\end{center}%
+\noindent%
+}
+
+% avoid clubs and widows
+\clubpenalty=10000
+\widowpenalty=10000
+% \displaywidowpenalty=10000
+
+% increase stretchability of the spaces (avoid overful hboxes)
+\setlength{\emergencystretch}{3em}
+
+% for compatibility with erae.cls
+\newcommand{\citetPage}[2]{\citeauthor{#2} (\citeyear{#2}, p.~#1)}
+\newcommand{\citepPage}[2]{\citetext{\citealp{#2}, p.~#1}}
diff --git a/biblio/bibtex/contrib/examples/xampl-aaai-named.ltx b/biblio/bibtex/contrib/examples/xampl-aaai-named.ltx
new file mode 100644
index 0000000000..73e0f65403
--- /dev/null
+++ b/biblio/bibtex/contrib/examples/xampl-aaai-named.ltx
@@ -0,0 +1,28 @@
+% -*-latex-*-
+% Document name: /usr/local/lib/tex/bibtex/xampl.ltx
+% Creator: Nelson H. F. Beebe [beebe@alfred.math.utah.edu]
+% Creation Date: Mon Jun 8 08:42:49 1992
+
+\documentstyle[authordate1-4]{article}
+
+\author{A. U. Thor}
+
+\date{}
+
+\title{Bibliography Style: {\tt {aaai-named}}}
+
+\pagestyle{myheadings}
+
+\markboth{Bibliography Style: {\tt {aaai-named}}}{Bibliography Style: {\tt {aaai-named}}}
+
+\begin{document}
+
+ \bibliographystyle{aaai-named}
+
+ \maketitle
+
+ \nocite{*}
+
+ \bibliography{xampl}
+
+\end{document}
diff --git a/biblio/bibtex/contrib/examples/xampl-abbrv.ltx b/biblio/bibtex/contrib/examples/xampl-abbrv.ltx
new file mode 100644
index 0000000000..8b46766b02
--- /dev/null
+++ b/biblio/bibtex/contrib/examples/xampl-abbrv.ltx
@@ -0,0 +1,28 @@
+% -*-latex-*-
+% Document name: /usr/local/lib/tex/bibtex/xampl.ltx
+% Creator: Nelson H. F. Beebe [beebe@alfred.math.utah.edu]
+% Creation Date: Mon Jun 8 08:42:49 1992
+
+\documentstyle[]{article}
+
+\author{A. U. Thor}
+
+\date{}
+
+\title{Bibliography Style: {\tt {abbrv}}}
+
+\pagestyle{myheadings}
+
+\markboth{Bibliography Style: {\tt {abbrv}}}{Bibliography Style: {\tt {abbrv}}}
+
+\begin{document}
+
+ \bibliographystyle{abbrv}
+
+ \maketitle
+
+ \nocite{*}
+
+ \bibliography{xampl}
+
+\end{document}
diff --git a/biblio/bibtex/contrib/examples/xampl-abstract.ltx b/biblio/bibtex/contrib/examples/xampl-abstract.ltx
new file mode 100644
index 0000000000..c21eb68859
--- /dev/null
+++ b/biblio/bibtex/contrib/examples/xampl-abstract.ltx
@@ -0,0 +1,28 @@
+% -*-latex-*-
+% Document name: /usr/local/lib/tex/bibtex/xampl.ltx
+% Creator: Nelson H. F. Beebe [beebe@alfred.math.utah.edu]
+% Creation Date: Mon Jun 8 08:42:49 1992
+
+\documentstyle[]{article}
+
+\author{A. U. Thor}
+
+\date{}
+
+\title{Bibliography Style: {\tt {abstract}}}
+
+\pagestyle{myheadings}
+
+\markboth{Bibliography Style: {\tt {abstract}}}{Bibliography Style: {\tt {abstract}}}
+
+\begin{document}
+
+ \bibliographystyle{abstract}
+
+ \maketitle
+
+ \nocite{*}
+
+ \bibliography{xampl}
+
+\end{document}
diff --git a/biblio/bibtex/contrib/examples/xampl-acm.ltx b/biblio/bibtex/contrib/examples/xampl-acm.ltx
new file mode 100644
index 0000000000..d80c79849f
--- /dev/null
+++ b/biblio/bibtex/contrib/examples/xampl-acm.ltx
@@ -0,0 +1,28 @@
+% -*-latex-*-
+% Document name: /usr/local/lib/tex/bibtex/xampl.ltx
+% Creator: Nelson H. F. Beebe [beebe@alfred.math.utah.edu]
+% Creation Date: Mon Jun 8 08:42:49 1992
+
+\documentstyle[]{article}
+
+\author{A. U. Thor}
+
+\date{}
+
+\title{Bibliography Style: {\tt {acm}}}
+
+\pagestyle{myheadings}
+
+\markboth{Bibliography Style: {\tt {acm}}}{Bibliography Style: {\tt {acm}}}
+
+\begin{document}
+
+ \bibliographystyle{acm}
+
+ \maketitle
+
+ \nocite{*}
+
+ \bibliography{xampl}
+
+\end{document}
diff --git a/biblio/bibtex/contrib/examples/xampl-agsm.ltx b/biblio/bibtex/contrib/examples/xampl-agsm.ltx
new file mode 100644
index 0000000000..c69af77edb
--- /dev/null
+++ b/biblio/bibtex/contrib/examples/xampl-agsm.ltx
@@ -0,0 +1,28 @@
+% -*-latex-*-
+% Document name: /usr/local/lib/tex/bibtex/xampl.ltx
+% Creator: Nelson H. F. Beebe [beebe@alfred.math.utah.edu]
+% Creation Date: Mon Jun 8 08:42:49 1992
+
+\documentstyle[harvard]{article}
+
+\author{A. U. Thor}
+
+\date{}
+
+\title{Bibliography Style: {\tt {agsm}}}
+
+\pagestyle{myheadings}
+
+\markboth{Bibliography Style: {\tt {agsm}}}{Bibliography Style: {\tt {agsm}}}
+
+\begin{document}
+
+ \bibliographystyle{agsm}
+
+ \maketitle
+
+ \nocite{*}
+
+ \bibliography{xampl}
+
+\end{document}
diff --git a/biblio/bibtex/contrib/examples/xampl-alpha.ltx b/biblio/bibtex/contrib/examples/xampl-alpha.ltx
new file mode 100644
index 0000000000..aa8f63cbf7
--- /dev/null
+++ b/biblio/bibtex/contrib/examples/xampl-alpha.ltx
@@ -0,0 +1,28 @@
+% -*-latex-*-
+% Document name: /usr/local/lib/tex/bibtex/xampl.ltx
+% Creator: Nelson H. F. Beebe [beebe@alfred.math.utah.edu]
+% Creation Date: Mon Jun 8 08:42:49 1992
+
+\documentstyle[]{article}
+
+\author{A. U. Thor}
+
+\date{}
+
+\title{Bibliography Style: {\tt {alpha}}}
+
+\pagestyle{myheadings}
+
+\markboth{Bibliography Style: {\tt {alpha}}}{Bibliography Style: {\tt {alpha}}}
+
+\begin{document}
+
+ \bibliographystyle{alpha}
+
+ \maketitle
+
+ \nocite{*}
+
+ \bibliography{xampl}
+
+\end{document}
diff --git a/biblio/bibtex/contrib/examples/xampl-amsalpha.ltx b/biblio/bibtex/contrib/examples/xampl-amsalpha.ltx
new file mode 100644
index 0000000000..b01bb11f4c
--- /dev/null
+++ b/biblio/bibtex/contrib/examples/xampl-amsalpha.ltx
@@ -0,0 +1,28 @@
+% -*-latex-*-
+% Document name: /usr/local/lib/tex/bibtex/xampl.ltx
+% Creator: Nelson H. F. Beebe [beebe@alfred.math.utah.edu]
+% Creation Date: Mon Jun 8 08:42:49 1992
+
+\documentstyle[]{article}
+
+\author{A. U. Thor}
+
+\date{}
+
+\title{Bibliography Style: {\tt {amsalpha}}}
+
+\pagestyle{myheadings}
+
+\markboth{Bibliography Style: {\tt {amsalpha}}}{Bibliography Style: {\tt {amsalpha}}}
+
+\begin{document}
+
+ \bibliographystyle{amsalpha}
+
+ \maketitle
+
+ \nocite{*}
+
+ \bibliography{xampl}
+
+\end{document}
diff --git a/biblio/bibtex/contrib/examples/xampl-amsplain.ltx b/biblio/bibtex/contrib/examples/xampl-amsplain.ltx
new file mode 100644
index 0000000000..d93b440bba
--- /dev/null
+++ b/biblio/bibtex/contrib/examples/xampl-amsplain.ltx
@@ -0,0 +1,28 @@
+% -*-latex-*-
+% Document name: /usr/local/lib/tex/bibtex/xampl.ltx
+% Creator: Nelson H. F. Beebe [beebe@alfred.math.utah.edu]
+% Creation Date: Mon Jun 8 08:42:49 1992
+
+\documentstyle[]{article}
+
+\author{A. U. Thor}
+
+\date{}
+
+\title{Bibliography Style: {\tt {amsplain}}}
+
+\pagestyle{myheadings}
+
+\markboth{Bibliography Style: {\tt {amsplain}}}{Bibliography Style: {\tt {amsplain}}}
+
+\begin{document}
+
+ \bibliographystyle{amsplain}
+
+ \maketitle
+
+ \nocite{*}
+
+ \bibliography{xampl}
+
+\end{document}
diff --git a/biblio/bibtex/contrib/examples/xampl-annotate.ltx b/biblio/bibtex/contrib/examples/xampl-annotate.ltx
new file mode 100644
index 0000000000..31ba629fd7
--- /dev/null
+++ b/biblio/bibtex/contrib/examples/xampl-annotate.ltx
@@ -0,0 +1,28 @@
+% -*-latex-*-
+% Document name: /usr/local/lib/tex/bibtex/xampl.ltx
+% Creator: Nelson H. F. Beebe [beebe@alfred.math.utah.edu]
+% Creation Date: Mon Jun 8 08:42:49 1992
+
+\documentstyle[]{article}
+
+\author{A. U. Thor}
+
+\date{}
+
+\title{Bibliography Style: {\tt {annotate}}}
+
+\pagestyle{myheadings}
+
+\markboth{Bibliography Style: {\tt {annotate}}}{Bibliography Style: {\tt {annotate}}}
+
+\begin{document}
+
+ \bibliographystyle{annotate}
+
+ \maketitle
+
+ \nocite{*}
+
+ \bibliography{xampl}
+
+\end{document}
diff --git a/biblio/bibtex/contrib/examples/xampl-annotation.ltx b/biblio/bibtex/contrib/examples/xampl-annotation.ltx
new file mode 100644
index 0000000000..558d7e9cbe
--- /dev/null
+++ b/biblio/bibtex/contrib/examples/xampl-annotation.ltx
@@ -0,0 +1,28 @@
+% -*-latex-*-
+% Document name: /usr/local/lib/tex/bibtex/xampl.ltx
+% Creator: Nelson H. F. Beebe [beebe@alfred.math.utah.edu]
+% Creation Date: Mon Jun 8 08:42:49 1992
+
+\documentstyle[]{article}
+
+\author{A. U. Thor}
+
+\date{}
+
+\title{Bibliography Style: {\tt {annotation}}}
+
+\pagestyle{myheadings}
+
+\markboth{Bibliography Style: {\tt {annotation}}}{Bibliography Style: {\tt {annotation}}}
+
+\begin{document}
+
+ \bibliographystyle{annotation}
+
+ \maketitle
+
+ \nocite{*}
+
+ \bibliography{xampl}
+
+\end{document}
diff --git a/biblio/bibtex/contrib/examples/xampl-apa.ltx b/biblio/bibtex/contrib/examples/xampl-apa.ltx
new file mode 100644
index 0000000000..a05c43bff4
--- /dev/null
+++ b/biblio/bibtex/contrib/examples/xampl-apa.ltx
@@ -0,0 +1,28 @@
+% -*-latex-*-
+% Document name: /usr/local/lib/tex/bibtex/xampl.ltx
+% Creator: Nelson H. F. Beebe [beebe@alfred.math.utah.edu]
+% Creation Date: Mon Jun 8 08:42:49 1992
+
+\documentstyle[astron]{article}
+
+\author{A. U. Thor}
+
+\date{}
+
+\title{Bibliography Style: {\tt {apa}}}
+
+\pagestyle{myheadings}
+
+\markboth{Bibliography Style: {\tt {apa}}}{Bibliography Style: {\tt {apa}}}
+
+\begin{document}
+
+ \bibliographystyle{apa}
+
+ \maketitle
+
+ \nocite{*}
+
+ \bibliography{xampl}
+
+\end{document}
diff --git a/biblio/bibtex/contrib/examples/xampl-apalike.ltx b/biblio/bibtex/contrib/examples/xampl-apalike.ltx
new file mode 100644
index 0000000000..cf9dff9bae
--- /dev/null
+++ b/biblio/bibtex/contrib/examples/xampl-apalike.ltx
@@ -0,0 +1,28 @@
+% -*-latex-*-
+% Document name: /usr/local/lib/tex/bibtex/xampl.ltx
+% Creator: Nelson H. F. Beebe [beebe@alfred.math.utah.edu]
+% Creation Date: Mon Jun 8 08:42:49 1992
+
+\documentstyle[]{article}
+
+\author{A. U. Thor}
+
+\date{}
+
+\title{Bibliography Style: {\tt {apalike}}}
+
+\pagestyle{myheadings}
+
+\markboth{Bibliography Style: {\tt {apalike}}}{Bibliography Style: {\tt {apalike}}}
+
+\begin{document}
+
+ \bibliographystyle{apalike}
+
+ \maketitle
+
+ \nocite{*}
+
+ \bibliography{xampl}
+
+\end{document}
diff --git a/biblio/bibtex/contrib/examples/xampl-apalike2.ltx b/biblio/bibtex/contrib/examples/xampl-apalike2.ltx
new file mode 100644
index 0000000000..cf97bdd8e4
--- /dev/null
+++ b/biblio/bibtex/contrib/examples/xampl-apalike2.ltx
@@ -0,0 +1,28 @@
+% -*-latex-*-
+% Document name: /usr/local/lib/tex/bibtex/xampl.ltx
+% Creator: Nelson H. F. Beebe [beebe@alfred.math.utah.edu]
+% Creation Date: Mon Jun 8 08:42:49 1992
+
+\documentstyle[]{article}
+
+\author{A. U. Thor}
+
+\date{}
+
+\title{Bibliography Style: {\tt {apalike2}}}
+
+\pagestyle{myheadings}
+
+\markboth{Bibliography Style: {\tt {apalike2}}}{Bibliography Style: {\tt {apalike2}}}
+
+\begin{document}
+
+ \bibliographystyle{apalike2}
+
+ \maketitle
+
+ \nocite{*}
+
+ \bibliography{xampl}
+
+\end{document}
diff --git a/biblio/bibtex/contrib/examples/xampl-astron.ltx b/biblio/bibtex/contrib/examples/xampl-astron.ltx
new file mode 100644
index 0000000000..ad8d5712c0
--- /dev/null
+++ b/biblio/bibtex/contrib/examples/xampl-astron.ltx
@@ -0,0 +1,28 @@
+% -*-latex-*-
+% Document name: /usr/local/lib/tex/bibtex/xampl.ltx
+% Creator: Nelson H. F. Beebe [beebe@alfred.math.utah.edu]
+% Creation Date: Mon Jun 8 08:42:49 1992
+
+\documentstyle[astron]{article}
+
+\author{A. U. Thor}
+
+\date{}
+
+\title{Bibliography Style: {\tt {astron}}}
+
+\pagestyle{myheadings}
+
+\markboth{Bibliography Style: {\tt {astron}}}{Bibliography Style: {\tt {astron}}}
+
+\begin{document}
+
+ \bibliographystyle{astron}
+
+ \maketitle
+
+ \nocite{*}
+
+ \bibliography{xampl}
+
+\end{document}
diff --git a/biblio/bibtex/contrib/examples/xampl-authordate1.ltx b/biblio/bibtex/contrib/examples/xampl-authordate1.ltx
new file mode 100644
index 0000000000..c3a2b988f7
--- /dev/null
+++ b/biblio/bibtex/contrib/examples/xampl-authordate1.ltx
@@ -0,0 +1,28 @@
+% -*-latex-*-
+% Document name: /usr/local/lib/tex/bibtex/xampl.ltx
+% Creator: Nelson H. F. Beebe [beebe@alfred.math.utah.edu]
+% Creation Date: Mon Jun 8 08:42:49 1992
+
+\documentstyle[authordate1-4]{article}
+
+\author{A. U. Thor}
+
+\date{}
+
+\title{Bibliography Style: {\tt {authordate1}}}
+
+\pagestyle{myheadings}
+
+\markboth{Bibliography Style: {\tt {authordate1}}}{Bibliography Style: {\tt {authordate1}}}
+
+\begin{document}
+
+ \bibliographystyle{authordate1}
+
+ \maketitle
+
+ \nocite{*}
+
+ \bibliography{xampl}
+
+\end{document}
diff --git a/biblio/bibtex/contrib/examples/xampl-authordate2.ltx b/biblio/bibtex/contrib/examples/xampl-authordate2.ltx
new file mode 100644
index 0000000000..30751e121d
--- /dev/null
+++ b/biblio/bibtex/contrib/examples/xampl-authordate2.ltx
@@ -0,0 +1,28 @@
+% -*-latex-*-
+% Document name: /usr/local/lib/tex/bibtex/xampl.ltx
+% Creator: Nelson H. F. Beebe [beebe@alfred.math.utah.edu]
+% Creation Date: Mon Jun 8 08:42:49 1992
+
+\documentstyle[authordate1-4]{article}
+
+\author{A. U. Thor}
+
+\date{}
+
+\title{Bibliography Style: {\tt {authordate2}}}
+
+\pagestyle{myheadings}
+
+\markboth{Bibliography Style: {\tt {authordate2}}}{Bibliography Style: {\tt {authordate2}}}
+
+\begin{document}
+
+ \bibliographystyle{authordate2}
+
+ \maketitle
+
+ \nocite{*}
+
+ \bibliography{xampl}
+
+\end{document}
diff --git a/biblio/bibtex/contrib/examples/xampl-authordate3.ltx b/biblio/bibtex/contrib/examples/xampl-authordate3.ltx
new file mode 100644
index 0000000000..36d1108a84
--- /dev/null
+++ b/biblio/bibtex/contrib/examples/xampl-authordate3.ltx
@@ -0,0 +1,28 @@
+% -*-latex-*-
+% Document name: /usr/local/lib/tex/bibtex/xampl.ltx
+% Creator: Nelson H. F. Beebe [beebe@alfred.math.utah.edu]
+% Creation Date: Mon Jun 8 08:42:49 1992
+
+\documentstyle[authordate1-4]{article}
+
+\author{A. U. Thor}
+
+\date{}
+
+\title{Bibliography Style: {\tt {authordate3}}}
+
+\pagestyle{myheadings}
+
+\markboth{Bibliography Style: {\tt {authordate3}}}{Bibliography Style: {\tt {authordate3}}}
+
+\begin{document}
+
+ \bibliographystyle{authordate3}
+
+ \maketitle
+
+ \nocite{*}
+
+ \bibliography{xampl}
+
+\end{document}
diff --git a/biblio/bibtex/contrib/examples/xampl-authordate4.ltx b/biblio/bibtex/contrib/examples/xampl-authordate4.ltx
new file mode 100644
index 0000000000..b709217384
--- /dev/null
+++ b/biblio/bibtex/contrib/examples/xampl-authordate4.ltx
@@ -0,0 +1,28 @@
+% -*-latex-*-
+% Document name: /usr/local/lib/tex/bibtex/xampl.ltx
+% Creator: Nelson H. F. Beebe [beebe@alfred.math.utah.edu]
+% Creation Date: Mon Jun 8 08:42:49 1992
+
+\documentstyle[authordate1-4]{article}
+
+\author{A. U. Thor}
+
+\date{}
+
+\title{Bibliography Style: {\tt {authordate4}}}
+
+\pagestyle{myheadings}
+
+\markboth{Bibliography Style: {\tt {authordate4}}}{Bibliography Style: {\tt {authordate4}}}
+
+\begin{document}
+
+ \bibliographystyle{authordate4}
+
+ \maketitle
+
+ \nocite{*}
+
+ \bibliography{xampl}
+
+\end{document}
diff --git a/biblio/bibtex/contrib/examples/xampl-bbs.ltx b/biblio/bibtex/contrib/examples/xampl-bbs.ltx
new file mode 100644
index 0000000000..214a2afe0b
--- /dev/null
+++ b/biblio/bibtex/contrib/examples/xampl-bbs.ltx
@@ -0,0 +1,28 @@
+% -*-latex-*-
+% Document name: /usr/local/lib/tex/bibtex/xampl.ltx
+% Creator: Nelson H. F. Beebe [beebe@alfred.math.utah.edu]
+% Creation Date: Mon Jun 8 08:42:49 1992
+
+\documentstyle[astron]{article}
+
+\author{A. U. Thor}
+
+\date{}
+
+\title{Bibliography Style: {\tt {bbs}}}
+
+\pagestyle{myheadings}
+
+\markboth{Bibliography Style: {\tt {bbs}}}{Bibliography Style: {\tt {bbs}}}
+
+\begin{document}
+
+ \bibliographystyle{bbs}
+
+ \maketitle
+
+ \nocite{*}
+
+ \bibliography{xampl}
+
+\end{document}
diff --git a/biblio/bibtex/contrib/examples/xampl-cbe.ltx b/biblio/bibtex/contrib/examples/xampl-cbe.ltx
new file mode 100644
index 0000000000..bf60328110
--- /dev/null
+++ b/biblio/bibtex/contrib/examples/xampl-cbe.ltx
@@ -0,0 +1,28 @@
+% -*-latex-*-
+% Document name: /usr/local/lib/tex/bibtex/xampl.ltx
+% Creator: Nelson H. F. Beebe [beebe@alfred.math.utah.edu]
+% Creation Date: Mon Jun 8 08:42:49 1992
+
+\documentstyle[astron]{article}
+
+\author{A. U. Thor}
+
+\date{}
+
+\title{Bibliography Style: {\tt {cbe}}}
+
+\pagestyle{myheadings}
+
+\markboth{Bibliography Style: {\tt {cbe}}}{Bibliography Style: {\tt {cbe}}}
+
+\begin{document}
+
+ \bibliographystyle{cbe}
+
+ \maketitle
+
+ \nocite{*}
+
+ \bibliography{xampl}
+
+\end{document}
diff --git a/biblio/bibtex/contrib/examples/xampl-cell.ltx b/biblio/bibtex/contrib/examples/xampl-cell.ltx
new file mode 100644
index 0000000000..799b0a0bc0
--- /dev/null
+++ b/biblio/bibtex/contrib/examples/xampl-cell.ltx
@@ -0,0 +1,28 @@
+% -*-latex-*-
+% Document name: /usr/local/lib/tex/bibtex/xampl.ltx
+% Creator: Nelson H. F. Beebe [beebe@alfred.math.utah.edu]
+% Creation Date: Mon Jun 8 08:42:49 1992
+
+\documentstyle[]{article}
+
+\author{A. U. Thor}
+
+\date{}
+
+\title{Bibliography Style: {\tt {cell}}}
+
+\pagestyle{myheadings}
+
+\markboth{Bibliography Style: {\tt {cell}}}{Bibliography Style: {\tt {cell}}}
+
+\begin{document}
+
+ \bibliographystyle{cell}
+
+ \maketitle
+
+ \nocite{*}
+
+ \bibliography{xampl}
+
+\end{document}
diff --git a/biblio/bibtex/contrib/examples/xampl-dcu.ltx b/biblio/bibtex/contrib/examples/xampl-dcu.ltx
new file mode 100644
index 0000000000..88b08e99fd
--- /dev/null
+++ b/biblio/bibtex/contrib/examples/xampl-dcu.ltx
@@ -0,0 +1,28 @@
+% -*-latex-*-
+% Document name: /usr/local/lib/tex/bibtex/xampl.ltx
+% Creator: Nelson H. F. Beebe [beebe@alfred.math.utah.edu]
+% Creation Date: Mon Jun 8 08:42:49 1992
+
+\documentstyle[harvard]{article}
+
+\author{A. U. Thor}
+
+\date{}
+
+\title{Bibliography Style: {\tt {dcu}}}
+
+\pagestyle{myheadings}
+
+\markboth{Bibliography Style: {\tt {dcu}}}{Bibliography Style: {\tt {dcu}}}
+
+\begin{document}
+
+ \bibliographystyle{dcu}
+
+ \maketitle
+
+ \nocite{*}
+
+ \bibliography{xampl}
+
+\end{document}
diff --git a/biblio/bibtex/contrib/examples/xampl-humanbio.ltx b/biblio/bibtex/contrib/examples/xampl-humanbio.ltx
new file mode 100644
index 0000000000..ef1e2329fa
--- /dev/null
+++ b/biblio/bibtex/contrib/examples/xampl-humanbio.ltx
@@ -0,0 +1,28 @@
+% -*-latex-*-
+% Document name: /usr/local/lib/tex/bibtex/xampl.ltx
+% Creator: Nelson H. F. Beebe [beebe@alfred.math.utah.edu]
+% Creation Date: Mon Jun 8 08:42:49 1992
+
+\documentstyle[astron]{article}
+
+\author{A. U. Thor}
+
+\date{}
+
+\title{Bibliography Style: {\tt {humanbio}}}
+
+\pagestyle{myheadings}
+
+\markboth{Bibliography Style: {\tt {humanbio}}}{Bibliography Style: {\tt {humanbio}}}
+
+\begin{document}
+
+ \bibliographystyle{humanbio}
+
+ \maketitle
+
+ \nocite{*}
+
+ \bibliography{xampl}
+
+\end{document}
diff --git a/biblio/bibtex/contrib/examples/xampl-humannat.ltx b/biblio/bibtex/contrib/examples/xampl-humannat.ltx
new file mode 100644
index 0000000000..fe3f57c8d5
--- /dev/null
+++ b/biblio/bibtex/contrib/examples/xampl-humannat.ltx
@@ -0,0 +1,28 @@
+% -*-latex-*-
+% Document name: /usr/local/lib/tex/bibtex/xampl.ltx
+% Creator: Nelson H. F. Beebe [beebe@alfred.math.utah.edu]
+% Creation Date: Mon Jun 8 08:42:49 1992
+
+\documentstyle[astron]{article}
+
+\author{A. U. Thor}
+
+\date{}
+
+\title{Bibliography Style: {\tt {humannat}}}
+
+\pagestyle{myheadings}
+
+\markboth{Bibliography Style: {\tt {humannat}}}{Bibliography Style: {\tt {humannat}}}
+
+\begin{document}
+
+ \bibliographystyle{humannat}
+
+ \maketitle
+
+ \nocite{*}
+
+ \bibliography{xampl}
+
+\end{document}
diff --git a/biblio/bibtex/contrib/examples/xampl-ieeetr.ltx b/biblio/bibtex/contrib/examples/xampl-ieeetr.ltx
new file mode 100644
index 0000000000..4b8bfee34f
--- /dev/null
+++ b/biblio/bibtex/contrib/examples/xampl-ieeetr.ltx
@@ -0,0 +1,28 @@
+% -*-latex-*-
+% Document name: /usr/local/lib/tex/bibtex/xampl.ltx
+% Creator: Nelson H. F. Beebe [beebe@alfred.math.utah.edu]
+% Creation Date: Mon Jun 8 08:42:49 1992
+
+\documentstyle[]{article}
+
+\author{A. U. Thor}
+
+\date{}
+
+\title{Bibliography Style: {\tt {ieeetr}}}
+
+\pagestyle{myheadings}
+
+\markboth{Bibliography Style: {\tt {ieeetr}}}{Bibliography Style: {\tt {ieeetr}}}
+
+\begin{document}
+
+ \bibliographystyle{ieeetr}
+
+ \maketitle
+
+ \nocite{*}
+
+ \bibliography{xampl}
+
+\end{document}
diff --git a/biblio/bibtex/contrib/examples/xampl-is-abbrv.ltx b/biblio/bibtex/contrib/examples/xampl-is-abbrv.ltx
new file mode 100644
index 0000000000..0fbc23f68c
--- /dev/null
+++ b/biblio/bibtex/contrib/examples/xampl-is-abbrv.ltx
@@ -0,0 +1,28 @@
+% -*-latex-*-
+% Document name: /usr/local/lib/tex/bibtex/xampl.ltx
+% Creator: Nelson H. F. Beebe [beebe@alfred.math.utah.edu]
+% Creation Date: Mon Jun 8 08:42:49 1992
+
+\documentstyle[]{article}
+
+\author{A. U. Thor}
+
+\date{}
+
+\title{Bibliography Style: {\tt {is-abbrv}}}
+
+\pagestyle{myheadings}
+
+\markboth{Bibliography Style: {\tt {is-abbrv}}}{Bibliography Style: {\tt {is-abbrv}}}
+
+\begin{document}
+
+ \bibliographystyle{is-abbrv}
+
+ \maketitle
+
+ \nocite{*}
+
+ \bibliography{xampl}
+
+\end{document}
diff --git a/biblio/bibtex/contrib/examples/xampl-is-alpha.ltx b/biblio/bibtex/contrib/examples/xampl-is-alpha.ltx
new file mode 100644
index 0000000000..69d920f939
--- /dev/null
+++ b/biblio/bibtex/contrib/examples/xampl-is-alpha.ltx
@@ -0,0 +1,28 @@
+% -*-latex-*-
+% Document name: /usr/local/lib/tex/bibtex/xampl.ltx
+% Creator: Nelson H. F. Beebe [beebe@alfred.math.utah.edu]
+% Creation Date: Mon Jun 8 08:42:49 1992
+
+\documentstyle[]{article}
+
+\author{A. U. Thor}
+
+\date{}
+
+\title{Bibliography Style: {\tt {is-alpha}}}
+
+\pagestyle{myheadings}
+
+\markboth{Bibliography Style: {\tt {is-alpha}}}{Bibliography Style: {\tt {is-alpha}}}
+
+\begin{document}
+
+ \bibliographystyle{is-alpha}
+
+ \maketitle
+
+ \nocite{*}
+
+ \bibliography{xampl}
+
+\end{document}
diff --git a/biblio/bibtex/contrib/examples/xampl-is-plain.ltx b/biblio/bibtex/contrib/examples/xampl-is-plain.ltx
new file mode 100644
index 0000000000..321d8ba369
--- /dev/null
+++ b/biblio/bibtex/contrib/examples/xampl-is-plain.ltx
@@ -0,0 +1,28 @@
+% -*-latex-*-
+% Document name: /usr/local/lib/tex/bibtex/xampl.ltx
+% Creator: Nelson H. F. Beebe [beebe@alfred.math.utah.edu]
+% Creation Date: Mon Jun 8 08:42:49 1992
+
+\documentstyle[]{article}
+
+\author{A. U. Thor}
+
+\date{}
+
+\title{Bibliography Style: {\tt {is-plain}}}
+
+\pagestyle{myheadings}
+
+\markboth{Bibliography Style: {\tt {is-plain}}}{Bibliography Style: {\tt {is-plain}}}
+
+\begin{document}
+
+ \bibliographystyle{is-plain}
+
+ \maketitle
+
+ \nocite{*}
+
+ \bibliography{xampl}
+
+\end{document}
diff --git a/biblio/bibtex/contrib/examples/xampl-is-unsrt.ltx b/biblio/bibtex/contrib/examples/xampl-is-unsrt.ltx
new file mode 100644
index 0000000000..82dc66fd91
--- /dev/null
+++ b/biblio/bibtex/contrib/examples/xampl-is-unsrt.ltx
@@ -0,0 +1,28 @@
+% -*-latex-*-
+% Document name: /usr/local/lib/tex/bibtex/xampl.ltx
+% Creator: Nelson H. F. Beebe [beebe@alfred.math.utah.edu]
+% Creation Date: Mon Jun 8 08:42:49 1992
+
+\documentstyle[]{article}
+
+\author{A. U. Thor}
+
+\date{}
+
+\title{Bibliography Style: {\tt {is-unsrt}}}
+
+\pagestyle{myheadings}
+
+\markboth{Bibliography Style: {\tt {is-unsrt}}}{Bibliography Style: {\tt {is-unsrt}}}
+
+\begin{document}
+
+ \bibliographystyle{is-unsrt}
+
+ \maketitle
+
+ \nocite{*}
+
+ \bibliography{xampl}
+
+\end{document}
diff --git a/biblio/bibtex/contrib/examples/xampl-jbact.ltx b/biblio/bibtex/contrib/examples/xampl-jbact.ltx
new file mode 100644
index 0000000000..d2f16b2bb4
--- /dev/null
+++ b/biblio/bibtex/contrib/examples/xampl-jbact.ltx
@@ -0,0 +1,28 @@
+% -*-latex-*-
+% Document name: /usr/local/lib/tex/bibtex/xampl.ltx
+% Creator: Nelson H. F. Beebe [beebe@alfred.math.utah.edu]
+% Creation Date: Mon Jun 8 08:42:49 1992
+
+\documentstyle[]{article}
+
+\author{A. U. Thor}
+
+\date{}
+
+\title{Bibliography Style: {\tt {jbact}}}
+
+\pagestyle{myheadings}
+
+\markboth{Bibliography Style: {\tt {jbact}}}{Bibliography Style: {\tt {jbact}}}
+
+\begin{document}
+
+ \bibliographystyle{jbact}
+
+ \maketitle
+
+ \nocite{*}
+
+ \bibliography{xampl}
+
+\end{document}
diff --git a/biblio/bibtex/contrib/examples/xampl-jmb.ltx b/biblio/bibtex/contrib/examples/xampl-jmb.ltx
new file mode 100644
index 0000000000..92fb5966f7
--- /dev/null
+++ b/biblio/bibtex/contrib/examples/xampl-jmb.ltx
@@ -0,0 +1,28 @@
+% -*-latex-*-
+% Document name: /usr/local/lib/tex/bibtex/xampl.ltx
+% Creator: Nelson H. F. Beebe [beebe@alfred.math.utah.edu]
+% Creation Date: Mon Jun 8 08:42:49 1992
+
+\documentstyle[jmb]{article}
+
+\author{A. U. Thor}
+
+\date{}
+
+\title{Bibliography Style: {\tt {jmb}}}
+
+\pagestyle{myheadings}
+
+\markboth{Bibliography Style: {\tt {jmb}}}{Bibliography Style: {\tt {jmb}}}
+
+\begin{document}
+
+ \bibliographystyle{jmb}
+
+ \maketitle
+
+ \nocite{*}
+
+ \bibliography{xampl}
+
+\end{document}
diff --git a/biblio/bibtex/contrib/examples/xampl-jtb.ltx b/biblio/bibtex/contrib/examples/xampl-jtb.ltx
new file mode 100644
index 0000000000..191d635f34
--- /dev/null
+++ b/biblio/bibtex/contrib/examples/xampl-jtb.ltx
@@ -0,0 +1,28 @@
+% -*-latex-*-
+% Document name: /usr/local/lib/tex/bibtex/xampl.ltx
+% Creator: Nelson H. F. Beebe [beebe@alfred.math.utah.edu]
+% Creation Date: Mon Jun 8 08:42:49 1992
+
+\documentstyle[astron]{article}
+
+\author{A. U. Thor}
+
+\date{}
+
+\title{Bibliography Style: {\tt {jtb}}}
+
+\pagestyle{myheadings}
+
+\markboth{Bibliography Style: {\tt {jtb}}}{Bibliography Style: {\tt {jtb}}}
+
+\begin{document}
+
+ \bibliographystyle{jtb}
+
+ \maketitle
+
+ \nocite{*}
+
+ \bibliography{xampl}
+
+\end{document}
diff --git a/biblio/bibtex/contrib/examples/xampl-kluwer.ltx b/biblio/bibtex/contrib/examples/xampl-kluwer.ltx
new file mode 100644
index 0000000000..c0a17c70eb
--- /dev/null
+++ b/biblio/bibtex/contrib/examples/xampl-kluwer.ltx
@@ -0,0 +1,28 @@
+% -*-latex-*-
+% Document name: /usr/local/lib/tex/bibtex/xampl.ltx
+% Creator: Nelson H. F. Beebe [beebe@alfred.math.utah.edu]
+% Creation Date: Mon Jun 8 08:42:49 1992
+
+\documentstyle[harvard]{article}
+
+\author{A. U. Thor}
+
+\date{}
+
+\title{Bibliography Style: {\tt {kluwer}}}
+
+\pagestyle{myheadings}
+
+\markboth{Bibliography Style: {\tt {kluwer}}}{Bibliography Style: {\tt {kluwer}}}
+
+\begin{document}
+
+ \bibliographystyle{kluwer}
+
+ \maketitle
+
+ \nocite{*}
+
+ \bibliography{xampl}
+
+\end{document}
diff --git a/biblio/bibtex/contrib/examples/xampl-named.ltx b/biblio/bibtex/contrib/examples/xampl-named.ltx
new file mode 100644
index 0000000000..06f45ab5a4
--- /dev/null
+++ b/biblio/bibtex/contrib/examples/xampl-named.ltx
@@ -0,0 +1,28 @@
+% -*-latex-*-
+% Document name: /usr/local/lib/tex/bibtex/xampl.ltx
+% Creator: Nelson H. F. Beebe [beebe@alfred.math.utah.edu]
+% Creation Date: Mon Jun 8 08:42:49 1992
+
+\documentstyle[named]{article}
+
+\author{A. U. Thor}
+
+\date{}
+
+\title{Bibliography Style: {\tt {named}}}
+
+\pagestyle{myheadings}
+
+\markboth{Bibliography Style: {\tt {named}}}{Bibliography Style: {\tt {named}}}
+
+\begin{document}
+
+ \bibliographystyle{named}
+
+ \maketitle
+
+ \nocite{*}
+
+ \bibliography{xampl}
+
+\end{document}
diff --git a/biblio/bibtex/contrib/examples/xampl-namunsrt.ltx b/biblio/bibtex/contrib/examples/xampl-namunsrt.ltx
new file mode 100644
index 0000000000..83b0640a1c
--- /dev/null
+++ b/biblio/bibtex/contrib/examples/xampl-namunsrt.ltx
@@ -0,0 +1,28 @@
+% -*-latex-*-
+% Document name: /usr/local/lib/tex/bibtex/xampl.ltx
+% Creator: Nelson H. F. Beebe [beebe@alfred.math.utah.edu]
+% Creation Date: Mon Jun 8 08:42:49 1992
+
+\documentstyle[]{article}
+
+\author{A. U. Thor}
+
+\date{}
+
+\title{Bibliography Style: {\tt {namunsrt}}}
+
+\pagestyle{myheadings}
+
+\markboth{Bibliography Style: {\tt {namunsrt}}}{Bibliography Style: {\tt {namunsrt}}}
+
+\begin{document}
+
+ \bibliographystyle{namunsrt}
+
+ \maketitle
+
+ \nocite{*}
+
+ \bibliography{xampl}
+
+\end{document}
diff --git a/biblio/bibtex/contrib/examples/xampl-nar.ltx b/biblio/bibtex/contrib/examples/xampl-nar.ltx
new file mode 100644
index 0000000000..e56700a179
--- /dev/null
+++ b/biblio/bibtex/contrib/examples/xampl-nar.ltx
@@ -0,0 +1,28 @@
+% -*-latex-*-
+% Document name: /usr/local/lib/tex/bibtex/xampl.ltx
+% Creator: Nelson H. F. Beebe [beebe@alfred.math.utah.edu]
+% Creation Date: Mon Jun 8 08:42:49 1992
+
+\documentstyle[nar]{article}
+
+\author{A. U. Thor}
+
+\date{}
+
+\title{Bibliography Style: {\tt {nar}}}
+
+\pagestyle{myheadings}
+
+\markboth{Bibliography Style: {\tt {nar}}}{Bibliography Style: {\tt {nar}}}
+
+\begin{document}
+
+ \bibliographystyle{nar}
+
+ \maketitle
+
+ \nocite{*}
+
+ \bibliography{xampl}
+
+\end{document}
diff --git a/biblio/bibtex/contrib/examples/xampl-nature.ltx b/biblio/bibtex/contrib/examples/xampl-nature.ltx
new file mode 100644
index 0000000000..e9b626b06c
--- /dev/null
+++ b/biblio/bibtex/contrib/examples/xampl-nature.ltx
@@ -0,0 +1,28 @@
+% -*-latex-*-
+% Document name: /usr/local/lib/tex/bibtex/xampl.ltx
+% Creator: Nelson H. F. Beebe [beebe@alfred.math.utah.edu]
+% Creation Date: Sat Jun 27 16:58:51 1992
+
+\documentstyle[]{article}
+
+\author{A. U. Thor}
+
+\date{}
+
+\title{Bibliography Style: {\tt {nature}}}
+
+\pagestyle{myheadings}
+
+\markboth{Bibliography Style: {\tt {nature}}}{Bibliography Style: {\tt {nature}}}
+
+\begin{document}
+
+ \bibliographystyle{nature}
+
+ \maketitle
+
+ \nocite{*}
+
+ \bibliography{xampl}
+
+\end{document}
diff --git a/biblio/bibtex/contrib/examples/xampl-newapa.ltx b/biblio/bibtex/contrib/examples/xampl-newapa.ltx
new file mode 100644
index 0000000000..31698cdc67
--- /dev/null
+++ b/biblio/bibtex/contrib/examples/xampl-newapa.ltx
@@ -0,0 +1,28 @@
+% -*-latex-*-
+% Document name: /usr/local/lib/tex/bibtex/xampl.ltx
+% Creator: Nelson H. F. Beebe [beebe@alfred.math.utah.edu]
+% Creation Date: Mon Jun 8 08:42:49 1992
+
+\documentstyle[apalike,newapa]{article}
+
+\author{A. U. Thor}
+
+\date{}
+
+\title{Bibliography Style: {\tt {newapa}}}
+
+\pagestyle{myheadings}
+
+\markboth{Bibliography Style: {\tt {newapa}}}{Bibliography Style: {\tt {newapa}}}
+
+\begin{document}
+
+ \bibliographystyle{newapa}
+
+ \maketitle
+
+ \nocite{*}
+
+ \bibliography{xampl}
+
+\end{document}
diff --git a/biblio/bibtex/contrib/examples/xampl-phaip.ltx b/biblio/bibtex/contrib/examples/xampl-phaip.ltx
new file mode 100644
index 0000000000..bccd07710b
--- /dev/null
+++ b/biblio/bibtex/contrib/examples/xampl-phaip.ltx
@@ -0,0 +1,28 @@
+% -*-latex-*-
+% Document name: /usr/local/lib/tex/bibtex/xampl.ltx
+% Creator: Nelson H. F. Beebe [beebe@alfred.math.utah.edu]
+% Creation Date: Mon Jun 8 08:42:49 1992
+
+\documentstyle[]{article}
+
+\author{A. U. Thor}
+
+\date{}
+
+\title{Bibliography Style: {\tt {phaip}}}
+
+\pagestyle{myheadings}
+
+\markboth{Bibliography Style: {\tt {phaip}}}{Bibliography Style: {\tt {phaip}}}
+
+\begin{document}
+
+ \bibliographystyle{phaip}
+
+ \maketitle
+
+ \nocite{*}
+
+ \bibliography{xampl}
+
+\end{document}
diff --git a/biblio/bibtex/contrib/examples/xampl-phapalik.ltx b/biblio/bibtex/contrib/examples/xampl-phapalik.ltx
new file mode 100644
index 0000000000..261e48b2db
--- /dev/null
+++ b/biblio/bibtex/contrib/examples/xampl-phapalik.ltx
@@ -0,0 +1,28 @@
+% -*-latex-*-
+% Document name: /usr/local/lib/tex/bibtex/xampl.ltx
+% Creator: Nelson H. F. Beebe [beebe@alfred.math.utah.edu]
+% Creation Date: Mon Jun 8 08:42:49 1992
+
+\documentstyle[]{article}
+
+\author{A. U. Thor}
+
+\date{}
+
+\title{Bibliography Style: {\tt {phapalik}}}
+
+\pagestyle{myheadings}
+
+\markboth{Bibliography Style: {\tt {phapalik}}}{Bibliography Style: {\tt {phapalik}}}
+
+\begin{document}
+
+ \bibliographystyle{phapalik}
+
+ \maketitle
+
+ \nocite{*}
+
+ \bibliography{xampl}
+
+\end{document}
diff --git a/biblio/bibtex/contrib/examples/xampl-phcpc.ltx b/biblio/bibtex/contrib/examples/xampl-phcpc.ltx
new file mode 100644
index 0000000000..ac3e524e15
--- /dev/null
+++ b/biblio/bibtex/contrib/examples/xampl-phcpc.ltx
@@ -0,0 +1,28 @@
+% -*-latex-*-
+% Document name: /usr/local/lib/tex/bibtex/xampl.ltx
+% Creator: Nelson H. F. Beebe [beebe@alfred.math.utah.edu]
+% Creation Date: Mon Jun 8 08:42:49 1992
+
+\documentstyle[]{article}
+
+\author{A. U. Thor}
+
+\date{}
+
+\title{Bibliography Style: {\tt {phcpc}}}
+
+\pagestyle{myheadings}
+
+\markboth{Bibliography Style: {\tt {phcpc}}}{Bibliography Style: {\tt {phcpc}}}
+
+\begin{document}
+
+ \bibliographystyle{phcpc}
+
+ \maketitle
+
+ \nocite{*}
+
+ \bibliography{xampl}
+
+\end{document}
diff --git a/biblio/bibtex/contrib/examples/xampl-phiaea.ltx b/biblio/bibtex/contrib/examples/xampl-phiaea.ltx
new file mode 100644
index 0000000000..5f15f44c8d
--- /dev/null
+++ b/biblio/bibtex/contrib/examples/xampl-phiaea.ltx
@@ -0,0 +1,28 @@
+% -*-latex-*-
+% Document name: /usr/local/lib/tex/bibtex/xampl.ltx
+% Creator: Nelson H. F. Beebe [beebe@alfred.math.utah.edu]
+% Creation Date: Mon Jun 8 08:42:49 1992
+
+\documentstyle[]{article}
+
+\author{A. U. Thor}
+
+\date{}
+
+\title{Bibliography Style: {\tt {phiaea}}}
+
+\pagestyle{myheadings}
+
+\markboth{Bibliography Style: {\tt {phiaea}}}{Bibliography Style: {\tt {phiaea}}}
+
+\begin{document}
+
+ \bibliographystyle{phiaea}
+
+ \maketitle
+
+ \nocite{*}
+
+ \bibliography{xampl}
+
+\end{document}
diff --git a/biblio/bibtex/contrib/examples/xampl-phjcp.ltx b/biblio/bibtex/contrib/examples/xampl-phjcp.ltx
new file mode 100644
index 0000000000..a381a6a567
--- /dev/null
+++ b/biblio/bibtex/contrib/examples/xampl-phjcp.ltx
@@ -0,0 +1,28 @@
+% -*-latex-*-
+% Document name: /usr/local/lib/tex/bibtex/xampl.ltx
+% Creator: Nelson H. F. Beebe [beebe@alfred.math.utah.edu]
+% Creation Date: Mon Jun 8 08:42:49 1992
+
+\documentstyle[]{article}
+
+\author{A. U. Thor}
+
+\date{}
+
+\title{Bibliography Style: {\tt {phjcp}}}
+
+\pagestyle{myheadings}
+
+\markboth{Bibliography Style: {\tt {phjcp}}}{Bibliography Style: {\tt {phjcp}}}
+
+\begin{document}
+
+ \bibliographystyle{phjcp}
+
+ \maketitle
+
+ \nocite{*}
+
+ \bibliography{xampl}
+
+\end{document}
diff --git a/biblio/bibtex/contrib/examples/xampl-phnf.ltx b/biblio/bibtex/contrib/examples/xampl-phnf.ltx
new file mode 100644
index 0000000000..b1a3eea935
--- /dev/null
+++ b/biblio/bibtex/contrib/examples/xampl-phnf.ltx
@@ -0,0 +1,28 @@
+% -*-latex-*-
+% Document name: /usr/local/lib/tex/bibtex/xampl.ltx
+% Creator: Nelson H. F. Beebe [beebe@alfred.math.utah.edu]
+% Creation Date: Mon Jun 8 08:42:49 1992
+
+\documentstyle[]{article}
+
+\author{A. U. Thor}
+
+\date{}
+
+\title{Bibliography Style: {\tt {phnf}}}
+
+\pagestyle{myheadings}
+
+\markboth{Bibliography Style: {\tt {phnf}}}{Bibliography Style: {\tt {phnf}}}
+
+\begin{document}
+
+ \bibliographystyle{phnf}
+
+ \maketitle
+
+ \nocite{*}
+
+ \bibliography{xampl}
+
+\end{document}
diff --git a/biblio/bibtex/contrib/examples/xampl-phnflet.ltx b/biblio/bibtex/contrib/examples/xampl-phnflet.ltx
new file mode 100644
index 0000000000..420512932b
--- /dev/null
+++ b/biblio/bibtex/contrib/examples/xampl-phnflet.ltx
@@ -0,0 +1,28 @@
+% -*-latex-*-
+% Document name: /usr/local/lib/tex/bibtex/xampl.ltx
+% Creator: Nelson H. F. Beebe [beebe@alfred.math.utah.edu]
+% Creation Date: Mon Jun 8 08:42:49 1992
+
+\documentstyle[]{article}
+
+\author{A. U. Thor}
+
+\date{}
+
+\title{Bibliography Style: {\tt {phnflet}}}
+
+\pagestyle{myheadings}
+
+\markboth{Bibliography Style: {\tt {phnflet}}}{Bibliography Style: {\tt {phnflet}}}
+
+\begin{document}
+
+ \bibliographystyle{phnflet}
+
+ \maketitle
+
+ \nocite{*}
+
+ \bibliography{xampl}
+
+\end{document}
diff --git a/biblio/bibtex/contrib/examples/xampl-phpf.ltx b/biblio/bibtex/contrib/examples/xampl-phpf.ltx
new file mode 100644
index 0000000000..c2bfea9c72
--- /dev/null
+++ b/biblio/bibtex/contrib/examples/xampl-phpf.ltx
@@ -0,0 +1,28 @@
+% -*-latex-*-
+% Document name: /usr/local/lib/tex/bibtex/xampl.ltx
+% Creator: Nelson H. F. Beebe [beebe@alfred.math.utah.edu]
+% Creation Date: Mon Jun 8 08:42:49 1992
+
+\documentstyle[]{article}
+
+\author{A. U. Thor}
+
+\date{}
+
+\title{Bibliography Style: {\tt {phpf}}}
+
+\pagestyle{myheadings}
+
+\markboth{Bibliography Style: {\tt {phpf}}}{Bibliography Style: {\tt {phpf}}}
+
+\begin{document}
+
+ \bibliographystyle{phpf}
+
+ \maketitle
+
+ \nocite{*}
+
+ \bibliography{xampl}
+
+\end{document}
diff --git a/biblio/bibtex/contrib/examples/xampl-phppcf.ltx b/biblio/bibtex/contrib/examples/xampl-phppcf.ltx
new file mode 100644
index 0000000000..ee9af0b853
--- /dev/null
+++ b/biblio/bibtex/contrib/examples/xampl-phppcf.ltx
@@ -0,0 +1,28 @@
+% -*-latex-*-
+% Document name: /usr/local/lib/tex/bibtex/xampl.ltx
+% Creator: Nelson H. F. Beebe [beebe@alfred.math.utah.edu]
+% Creation Date: Mon Jun 8 08:42:49 1992
+
+\documentstyle[]{article}
+
+\author{A. U. Thor}
+
+\date{}
+
+\title{Bibliography Style: {\tt {phppcf}}}
+
+\pagestyle{myheadings}
+
+\markboth{Bibliography Style: {\tt {phppcf}}}{Bibliography Style: {\tt {phppcf}}}
+
+\begin{document}
+
+ \bibliographystyle{phppcf}
+
+ \maketitle
+
+ \nocite{*}
+
+ \bibliography{xampl}
+
+\end{document}
diff --git a/biblio/bibtex/contrib/examples/xampl-phreport.ltx b/biblio/bibtex/contrib/examples/xampl-phreport.ltx
new file mode 100644
index 0000000000..fd4e326f4b
--- /dev/null
+++ b/biblio/bibtex/contrib/examples/xampl-phreport.ltx
@@ -0,0 +1,28 @@
+% -*-latex-*-
+% Document name: /usr/local/lib/tex/bibtex/xampl.ltx
+% Creator: Nelson H. F. Beebe [beebe@alfred.math.utah.edu]
+% Creation Date: Mon Jun 8 08:42:49 1992
+
+\documentstyle[]{article}
+
+\author{A. U. Thor}
+
+\date{}
+
+\title{Bibliography Style: {\tt {phreport}}}
+
+\pagestyle{myheadings}
+
+\markboth{Bibliography Style: {\tt {phreport}}}{Bibliography Style: {\tt {phreport}}}
+
+\begin{document}
+
+ \bibliographystyle{phreport}
+
+ \maketitle
+
+ \nocite{*}
+
+ \bibliography{xampl}
+
+\end{document}
diff --git a/biblio/bibtex/contrib/examples/xampl-phrmp.ltx b/biblio/bibtex/contrib/examples/xampl-phrmp.ltx
new file mode 100644
index 0000000000..9aa0a4544e
--- /dev/null
+++ b/biblio/bibtex/contrib/examples/xampl-phrmp.ltx
@@ -0,0 +1,28 @@
+% -*-latex-*-
+% Document name: /usr/local/lib/tex/bibtex/xampl.ltx
+% Creator: Nelson H. F. Beebe [beebe@alfred.math.utah.edu]
+% Creation Date: Mon Jun 8 08:42:49 1992
+
+\documentstyle[]{article}
+
+\author{A. U. Thor}
+
+\date{}
+
+\title{Bibliography Style: {\tt {phrmp}}}
+
+\pagestyle{myheadings}
+
+\markboth{Bibliography Style: {\tt {phrmp}}}{Bibliography Style: {\tt {phrmp}}}
+
+\begin{document}
+
+ \bibliographystyle{phrmp}
+
+ \maketitle
+
+ \nocite{*}
+
+ \bibliography{xampl}
+
+\end{document}
diff --git a/biblio/bibtex/contrib/examples/xampl-plain.ltx b/biblio/bibtex/contrib/examples/xampl-plain.ltx
new file mode 100644
index 0000000000..019c997f0b
--- /dev/null
+++ b/biblio/bibtex/contrib/examples/xampl-plain.ltx
@@ -0,0 +1,28 @@
+% -*-latex-*-
+% Document name: /usr/local/lib/tex/bibtex/xampl.ltx
+% Creator: Nelson H. F. Beebe [beebe@alfred.math.utah.edu]
+% Creation Date: Mon Jun 8 08:42:49 1992
+
+\documentstyle[]{article}
+
+\author{A. U. Thor}
+
+\date{}
+
+\title{Bibliography Style: {\tt {plain}}}
+
+\pagestyle{myheadings}
+
+\markboth{Bibliography Style: {\tt {plain}}}{Bibliography Style: {\tt {plain}}}
+
+\begin{document}
+
+ \bibliographystyle{plain}
+
+ \maketitle
+
+ \nocite{*}
+
+ \bibliography{xampl}
+
+\end{document}
diff --git a/biblio/bibtex/contrib/examples/xampl-plainyr.ltx b/biblio/bibtex/contrib/examples/xampl-plainyr.ltx
new file mode 100644
index 0000000000..04a18f4151
--- /dev/null
+++ b/biblio/bibtex/contrib/examples/xampl-plainyr.ltx
@@ -0,0 +1,28 @@
+% -*-latex-*-
+% Document name: /usr/local/lib/tex/bibtex/xampl.ltx
+% Creator: Nelson H. F. Beebe [beebe@alfred.math.utah.edu]
+% Creation Date: Mon Jun 8 08:42:49 1992
+
+\documentstyle[]{article}
+
+\author{A. U. Thor}
+
+\date{}
+
+\title{Bibliography Style: {\tt {plainyr}}}
+
+\pagestyle{myheadings}
+
+\markboth{Bibliography Style: {\tt {plainyr}}}{Bibliography Style: {\tt {plainyr}}}
+
+\begin{document}
+
+ \bibliographystyle{plainyr}
+
+ \maketitle
+
+ \nocite{*}
+
+ \bibliography{xampl}
+
+\end{document}
diff --git a/biblio/bibtex/contrib/examples/xampl-siam.ltx b/biblio/bibtex/contrib/examples/xampl-siam.ltx
new file mode 100644
index 0000000000..924d10b7b6
--- /dev/null
+++ b/biblio/bibtex/contrib/examples/xampl-siam.ltx
@@ -0,0 +1,28 @@
+% -*-latex-*-
+% Document name: /usr/local/lib/tex/bibtex/xampl.ltx
+% Creator: Nelson H. F. Beebe [beebe@alfred.math.utah.edu]
+% Creation Date: Mon Jun 8 08:42:49 1992
+
+\documentstyle[]{article}
+
+\author{A. U. Thor}
+
+\date{}
+
+\title{Bibliography Style: {\tt {siam}}}
+
+\pagestyle{myheadings}
+
+\markboth{Bibliography Style: {\tt {siam}}}{Bibliography Style: {\tt {siam}}}
+
+\begin{document}
+
+ \bibliographystyle{siam}
+
+ \maketitle
+
+ \nocite{*}
+
+ \bibliography{xampl}
+
+\end{document}
diff --git a/biblio/bibtex/contrib/examples/xampl-unsrt.ltx b/biblio/bibtex/contrib/examples/xampl-unsrt.ltx
new file mode 100644
index 0000000000..ad8f607b38
--- /dev/null
+++ b/biblio/bibtex/contrib/examples/xampl-unsrt.ltx
@@ -0,0 +1,28 @@
+% -*-latex-*-
+% Document name: /usr/local/lib/tex/bibtex/xampl.ltx
+% Creator: Nelson H. F. Beebe [beebe@alfred.math.utah.edu]
+% Creation Date: Mon Jun 8 08:42:49 1992
+
+\documentstyle[]{article}
+
+\author{A. U. Thor}
+
+\date{}
+
+\title{Bibliography Style: {\tt {unsrt}}}
+
+\pagestyle{myheadings}
+
+\markboth{Bibliography Style: {\tt {unsrt}}}{Bibliography Style: {\tt {unsrt}}}
+
+\begin{document}
+
+ \bibliographystyle{unsrt}
+
+ \maketitle
+
+ \nocite{*}
+
+ \bibliography{xampl}
+
+\end{document}
diff --git a/biblio/bibtex/contrib/examples/xampl.ltx b/biblio/bibtex/contrib/examples/xampl.ltx
new file mode 100644
index 0000000000..019c997f0b
--- /dev/null
+++ b/biblio/bibtex/contrib/examples/xampl.ltx
@@ -0,0 +1,28 @@
+% -*-latex-*-
+% Document name: /usr/local/lib/tex/bibtex/xampl.ltx
+% Creator: Nelson H. F. Beebe [beebe@alfred.math.utah.edu]
+% Creation Date: Mon Jun 8 08:42:49 1992
+
+\documentstyle[]{article}
+
+\author{A. U. Thor}
+
+\date{}
+
+\title{Bibliography Style: {\tt {plain}}}
+
+\pagestyle{myheadings}
+
+\markboth{Bibliography Style: {\tt {plain}}}{Bibliography Style: {\tt {plain}}}
+
+\begin{document}
+
+ \bibliographystyle{plain}
+
+ \maketitle
+
+ \nocite{*}
+
+ \bibliography{xampl}
+
+\end{document}
diff --git a/biblio/bibtex/contrib/francais-bst/README b/biblio/bibtex/contrib/francais-bst/README
new file mode 100644
index 0000000000..587b640f69
--- /dev/null
+++ b/biblio/bibtex/contrib/francais-bst/README
@@ -0,0 +1,109 @@
+This package contains natbib compatible bibliography style files to
+typeset bibliographies using French typographic standards. The styles
+were created using makebst from package custom-bib.
+
+LICENCE
+
+LaTeX Project Public License, version 1.3c or (at your option) any
+later version.
+
+*** The rest of this file is in French for the target audience ***
+
+DESCRIPTION
+
+francais.bst et francaissc.bst sont des styles bibliographiques
+compatibles avec le paquetage natbib permettant de composer des
+bibliographies en français conformes aux règles de présentation
+proposées dans:
+
+ Malo, M. "Guide de la communication écrite", Québec Amérique. 1996.
+ ISBN 978-2-8903-7875-9.
+
+Avec francais.bst, les noms d'auteur dans la bibliographie *et* dans
+les citations apparaissent en police standard. C'est la pratique
+usuelle au Québec.
+
+Avec francaissc.bst, les noms d'auteur dans la bibliographie *et* dans
+les citations apparaissent plutôt en petites capitales. Cela semble
+être la pratique usuelle en France et ailleurs dans la Francophonie.
+
+CONTENU DE L'ARCHIVE
+
+- francais.bst: style français avec noms en police standard;
+- francaissc.bst: style français avec noms en petites capitales;
+- francaisbst.tex: définitions françaises de mots clés;
+- README: le présent fichier.
+
+INSTALLATION
+
+On peut simplement déposer les fichiers francais.bst, francaissc.bst
+et francaisbst.tex dans son dossier de travail.
+
+Pour une installation plus complète et permanente, il est préférable
+de placer les fichiers dans son arborescence TeX personnelle. Les
+emplacements finaux des fichiers devraient être:
+
+ $TEXMFHOME/bibtex/bst/francais.bst
+ $TEXMFHOME/bibtex/bst/francaissc.bst
+ $TEXMFHOME/tex/latex/francais-bst/francaisbst.tex
+
+UTILISATION
+
+Un document faisant appel à ces styles sera normalement en français,
+donc le paquetage babel sera chargé. Les styles requièrent le
+paquetage natbib et, pour bien fonctionner, celui-ci devrait être
+chargé avant babel. On aura donc dans le préambule de son document:
+
+ \usepackage{natbib}
+ \usepackage[francais]{babel}
+
+De plus, pour que la césure de mots fonctionne adéquatement avec les
+mots comportant des lettres accentuées, il faut utiliser les polices
+T1. Elles sont chargées avec:
+
+ \usepackage[T1]{fontenc}
+
+Enfin, on spécifie le style de bibliographie avec
+
+ \bibliographystyle{francais}
+
+ou
+
+ \bibliographystyle{francaissc}
+
+GUILLEMETS FRANÇAIS
+
+La bibliographie a recours aux guillemets français « et » pour les
+titres d'articles, entre autres. Les guillemets devraient apparaître
+correctement dès lors que le document utilise les polices T1 (voir
+ci-dessus). Si ce n'est pas le cas, essayer de charger les paquetages
+ae et aeguill:
+
+ \usepackage{ae,aeguill}
+
+PERSONNALISATION
+
+Si les traductions françaises de certains mots clés ne vous
+conviennent pas, simplement modifier le fichier francaisbst.tex.
+
+
+
+RÉVISIONS
+
+* Version 1.1 - 2013-05-12
+
+ Modifications à francaissc.bst pour que la conjonction "et" et le
+ marqueur "et collab." soient en romain plutôt qu'en petites
+ capitales. Merci à François Legendre <f.legendre@gmail.com> pour le
+ tuyau.
+
+ Introduction d'un numéro de version, puisqu'il semble que ce sera
+ utile.
+
+* Version 1.0a - 2013-05-03
+
+ Corrections à la doc du fichier README
+
+* Version 1.0 - Octobre 2012
+
+ Version initiale
diff --git a/biblio/bibtex/contrib/francais-bst/francais.bst b/biblio/bibtex/contrib/francais-bst/francais.bst
new file mode 100644
index 0000000000..d6451e76c4
--- /dev/null
+++ b/biblio/bibtex/contrib/francais-bst/francais.bst
@@ -0,0 +1,1739 @@
+%%
+%% This is file `francais.bst',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% merlin.mbs (with options: `babel,ay,nat,lang,vonx,nm-rev1,jnrlst,blkyear,dt-beg,yr-per,note-yr,tit-qq,qt-g,qx,vnum-nr,volp-com,pgsep-s,jwdpg,pp-last,jwdvol,num-xser,numser,ser-vol,ser-ed,pg-bk,pre-edn,isbn,issn,agu-doi,doi,edby,blk-com,blknt,pp,ed,abr,ord,and-xcom,etal-xc,url,url-nt,nfss,')
+%%
+%% >> Style bibliographique compatible avec natbib permettant de composer
+%% >> des bibliographies en francais conformes aux regles de typographie
+%% >> enoncees dans
+%% >>
+%% >> Malo, M. "Guide de la communication ecrite", Quebec Amerique, 1996.
+%% >> ISBN 978-2-8903-7875-9.
+%% >>
+%% >> Style cree et maintenu par Vincent Goulet
+%% >> <vincent.goulet@act.ulaval.ca>.
+%% >>
+%% >> Version 1.1 2013-05-12
+%%
+%% Copyright 1994-2011 Patrick W Daly
+ % ===============================================================
+ % IMPORTANT NOTICE:
+ % This bibliographic style (bst) file has been generated from one or
+ % more master bibliographic style (mbs) files, listed above.
+ %
+ % This generated file can be redistributed and/or modified under the terms
+ % of the LaTeX Project Public License Distributed from CTAN
+ % archives in directory macros/latex/base/lppl.txt; either
+ % version 1 of the License, or any later version.
+ % ===============================================================
+ % Name and version information of the main mbs file:
+ % \ProvidesFile{merlin.mbs}[2011/11/18 4.33 (PWD, AO, DPC)]
+ % For use with BibTeX version 0.99a or later
+ %-------------------------------------------------------------------
+ % This bibliography style file requires a file named francaisbst.tex
+ % containing the definitions of word commands like \bbleditor, etc.
+ % This is an author-year citation style bibliography. As such, it is
+ % non-standard LaTeX, and requires a special package file to function properly.
+ % Such a package is natbib.sty by Patrick W. Daly
+ % The form of the \bibitem entries is
+ % \bibitem[Jones et al.(1990)]{key}...
+ % \bibitem[Jones et al.(1990)Jones, Baker, and Smith]{key}...
+ % The essential feature is that the label (the part in brackets) consists
+ % of the author names, as they should appear in the citation, with the year
+ % in parentheses following. There must be no space before the opening
+ % parenthesis!
+ % With natbib v5.3, a full list of authors may also follow the year.
+ % In natbib.sty, it is possible to define the type of enclosures that is
+ % really wanted (brackets or parentheses), but in either case, there must
+ % be parentheses in the label.
+ % The \cite command functions as follows:
+ % \citet{key} ==>> Jones et al. (1990)
+ % \citet*{key} ==>> Jones, Baker, and Smith (1990)
+ % \citep{key} ==>> (Jones et al., 1990)
+ % \citep*{key} ==>> (Jones, Baker, and Smith, 1990)
+ % \citep[chap. 2]{key} ==>> (Jones et al., 1990, chap. 2)
+ % \citep[e.g.][]{key} ==>> (e.g. Jones et al., 1990)
+ % \citep[e.g.][p. 32]{key} ==>> (e.g. Jones et al., 1990, p. 32)
+ % \citeauthor{key} ==>> Jones et al.
+ % \citeauthor*{key} ==>> Jones, Baker, and Smith
+ % \citeyear{key} ==>> 1990
+ %---------------------------------------------------------------------
+
+ENTRY
+ { address
+ author
+ booktitle
+ chapter
+ doi
+ edition
+ editor
+ eid
+ howpublished
+ institution
+ isbn
+ issn
+ journal
+ key
+ language
+ month
+ note
+ number
+ organization
+ pages
+ publisher
+ school
+ series
+ title
+ type
+ url
+ volume
+ year
+ }
+ {}
+ { label extra.label sort.label short.list }
+INTEGERS { output.state before.all mid.sentence after.sentence after.block }
+FUNCTION {init.state.consts}
+{ #0 'before.all :=
+ #1 'mid.sentence :=
+ #2 'after.sentence :=
+ #3 'after.block :=
+}
+STRINGS { s t}
+FUNCTION {output.nonnull}
+{ 's :=
+ output.state mid.sentence =
+ { ", " * write$ }
+ { output.state after.block =
+ { add.period$ write$
+ newline$
+ "\newblock " write$
+ }
+ { output.state before.all =
+ 'write$
+ { add.period$ " " * write$ }
+ if$
+ }
+ if$
+ mid.sentence 'output.state :=
+ }
+ if$
+ s
+}
+FUNCTION {output}
+{ duplicate$ empty$
+ 'pop$
+ 'output.nonnull
+ if$
+}
+FUNCTION {output.check}
+{ 't :=
+ duplicate$ empty$
+ { pop$ "empty " t * " in " * cite$ * warning$ }
+ 'output.nonnull
+ if$
+}
+FUNCTION {fin.entry}
+{ add.period$
+ write$
+ newline$
+}
+
+FUNCTION {new.block}
+{ output.state before.all =
+ 'skip$
+ { after.block 'output.state := }
+ if$
+}
+FUNCTION {new.sentence}
+{ output.state after.block =
+ 'skip$
+ { output.state before.all =
+ 'skip$
+ { after.sentence 'output.state := }
+ if$
+ }
+ if$
+}
+FUNCTION {add.blank}
+{ " " * before.all 'output.state :=
+}
+
+FUNCTION {date.block}
+{
+ skip$
+}
+
+FUNCTION {not}
+{ { #0 }
+ { #1 }
+ if$
+}
+FUNCTION {and}
+{ 'skip$
+ { pop$ #0 }
+ if$
+}
+FUNCTION {or}
+{ { pop$ #1 }
+ 'skip$
+ if$
+}
+FUNCTION {non.stop}
+{ duplicate$
+ "}" * add.period$
+ #-1 #1 substring$ "." =
+}
+
+FUNCTION {new.block.checkb}
+{ empty$
+ swap$ empty$
+ and
+ 'skip$
+ 'new.block
+ if$
+}
+FUNCTION {field.or.null}
+{ duplicate$ empty$
+ { pop$ "" }
+ 'skip$
+ if$
+}
+FUNCTION {emphasize}
+{ duplicate$ empty$
+ { pop$ "" }
+ { "\emph{" swap$ * "}" * }
+ if$
+}
+FUNCTION {tie.or.space.prefix}
+{ duplicate$ text.length$ #3 <
+ { "~" }
+ { " " }
+ if$
+ swap$
+}
+
+FUNCTION {capitalize}
+{ "\capitalize" swap$ * }
+
+FUNCTION {space.word}
+{ " " swap$ * " " * }
+ % Here are the language-specific definitions for explicit words.
+ % Each function has a name bbl.xxx where xxx is the English word.
+ % The BABEL language selection is made here; definitions in francaisbst.tex.
+FUNCTION {bbl.and}
+{ "\bbland{}"}
+
+FUNCTION {bbl.etal}
+{ "\bbletal{}"}
+
+FUNCTION {bbl.editors}
+{ "\bbleds{}" }
+
+FUNCTION {bbl.editor}
+{ "\bbled{}" }
+
+FUNCTION {bbl.edby}
+{ "\bbledby{}" }
+
+FUNCTION {bbl.edition}
+{ "\bbledn{}" }
+
+FUNCTION {bbl.volume}
+{ "\bblvol{}" }
+
+FUNCTION {bbl.of}
+{ "\bblof{}" }
+
+FUNCTION {bbl.number}
+{ "\bblno{}" }
+
+FUNCTION {bbl.nr}
+{ "\bblno{}" }
+
+FUNCTION {bbl.in}
+{ "\bblin{}" }
+
+FUNCTION {bbl.pages}
+{ "\bblpp{}" }
+
+FUNCTION {bbl.page}
+{ "\bblp{}" }
+
+FUNCTION {bbl.chapter}
+{ "\bblchap{}" }
+
+FUNCTION {bbl.techrep}
+{ "\bbltechrep{}" }
+
+FUNCTION {bbl.mthesis}
+{ "\bblmthesis{}" }
+
+FUNCTION {bbl.phdthesis}
+{ "\bblphdthesis{}" }
+
+FUNCTION {bbl.first}
+{ "\bblfirsto{}" }
+
+FUNCTION {bbl.second}
+{ "\bblsecondo{}" }
+
+FUNCTION {bbl.third}
+{ "\bblthirdo{}" }
+
+FUNCTION {bbl.fourth}
+{ "\bblfourtho{}" }
+
+FUNCTION {bbl.fifth}
+{ "\bblfiftho{}" }
+
+FUNCTION {bbl.st}
+{ "\bblst{}" }
+
+FUNCTION {bbl.nd}
+{ "\bblnd{}" }
+
+FUNCTION {bbl.rd}
+{ "\bblrd{}" }
+
+FUNCTION {bbl.th}
+{ "\bblth{}" }
+
+MACRO {jan} {"\bbljan{}"}
+
+MACRO {feb} {"\bblfeb{}"}
+
+MACRO {mar} {"\bblmar{}"}
+
+MACRO {apr} {"\bblapr{}"}
+
+MACRO {may} {"\bblmay{}"}
+
+MACRO {jun} {"\bbljun{}"}
+
+MACRO {jul} {"\bbljul{}"}
+
+MACRO {aug} {"\bblaug{}"}
+
+MACRO {sep} {"\bblsep{}"}
+
+MACRO {oct} {"\bbloct{}"}
+
+MACRO {nov} {"\bblnov{}"}
+
+MACRO {dec} {"\bbldec{}"}
+
+FUNCTION {eng.ord}
+{ duplicate$ "1" swap$ *
+ #-2 #1 substring$ "1" =
+ { bbl.th * }
+ { duplicate$ #-1 #1 substring$
+ duplicate$ "1" =
+ { pop$ bbl.st * }
+ { duplicate$ "2" =
+ { pop$ bbl.nd * }
+ { "3" =
+ { bbl.rd * }
+ { bbl.th * }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+}
+
+MACRO {acmcs} {"ACM Computing Surveys"}
+
+MACRO {acta} {"Acta Informatica"}
+
+MACRO {cacm} {"Communications of the ACM"}
+
+MACRO {ibmjrd} {"IBM Journal of Research and Development"}
+
+MACRO {ibmsj} {"IBM Systems Journal"}
+
+MACRO {ieeese} {"IEEE Transactions on Software Engineering"}
+
+MACRO {ieeetc} {"IEEE Transactions on Computers"}
+
+MACRO {ieeetcad}
+ {"IEEE Transactions on Computer-Aided Design of Integrated Circuits"}
+
+MACRO {ipl} {"Information Processing Letters"}
+
+MACRO {jacm} {"Journal of the ACM"}
+
+MACRO {jcss} {"Journal of Computer and System Sciences"}
+
+MACRO {scp} {"Science of Computer Programming"}
+
+MACRO {sicomp} {"SIAM Journal on Computing"}
+
+MACRO {tocs} {"ACM Transactions on Computer Systems"}
+
+MACRO {tods} {"ACM Transactions on Database Systems"}
+
+MACRO {tog} {"ACM Transactions on Graphics"}
+
+MACRO {toms} {"ACM Transactions on Mathematical Software"}
+
+MACRO {toois} {"ACM Transactions on Office Information Systems"}
+
+MACRO {toplas} {"ACM Transactions on Programming Languages and Systems"}
+
+MACRO {tcs} {"Theoretical Computer Science"}
+FUNCTION {bibinfo.check}
+{ swap$
+ duplicate$ missing$
+ {
+ pop$ pop$
+ ""
+ }
+ { duplicate$ empty$
+ {
+ swap$ pop$
+ }
+ { swap$
+ pop$
+ }
+ if$
+ }
+ if$
+}
+FUNCTION {bibinfo.warn}
+{ swap$
+ duplicate$ missing$
+ {
+ swap$ "missing " swap$ * " in " * cite$ * warning$ pop$
+ ""
+ }
+ { duplicate$ empty$
+ {
+ swap$ "empty " swap$ * " in " * cite$ * warning$
+ }
+ { swap$
+ pop$
+ }
+ if$
+ }
+ if$
+}
+INTEGERS { nameptr namesleft numnames }
+
+
+STRINGS { bibinfo}
+
+FUNCTION {format.names}
+{ 'bibinfo :=
+ duplicate$ empty$ 'skip$ {
+ 's :=
+ "" 't :=
+ #1 'nameptr :=
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ { s nameptr
+ duplicate$ #1 >
+ { "{f.~}{vv~}{ll}{, jj}" }
+ { "{vv~}{ll}{, f.}{, jj}" }
+ if$
+ format.name$
+ bibinfo bibinfo.check
+ 't :=
+ nameptr #1 >
+ {
+ namesleft #1 >
+ { ", " * t * }
+ {
+ s nameptr "{ll}" format.name$ duplicate$ "others" =
+ { 't := }
+ { pop$ }
+ if$
+ t "others" =
+ {
+ " " * bbl.etal *
+ }
+ {
+ bbl.and
+ space.word * t *
+ }
+ if$
+ }
+ if$
+ }
+ 't
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+ } if$
+}
+FUNCTION {format.names.ed}
+{
+ 'bibinfo :=
+ duplicate$ empty$ 'skip$ {
+ 's :=
+ "" 't :=
+ #1 'nameptr :=
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ { s nameptr
+ "{f.~}{vv~}{ll}{, jj}"
+ format.name$
+ bibinfo bibinfo.check
+ 't :=
+ nameptr #1 >
+ {
+ namesleft #1 >
+ { ", " * t * }
+ {
+ s nameptr "{ll}" format.name$ duplicate$ "others" =
+ { 't := }
+ { pop$ }
+ if$
+ t "others" =
+ {
+
+ " " * bbl.etal *
+ }
+ {
+ bbl.and
+ space.word * t *
+ }
+ if$
+ }
+ if$
+ }
+ 't
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+ } if$
+}
+FUNCTION {format.key}
+{ empty$
+ { key field.or.null }
+ { "" }
+ if$
+}
+
+FUNCTION {format.authors}
+{ author "author" format.names
+}
+FUNCTION {get.bbl.editor}
+{ editor num.names$ #1 > 'bbl.editors 'bbl.editor if$ }
+
+FUNCTION {format.editors}
+{ editor "editor" format.names duplicate$ empty$ 'skip$
+ {
+ "," *
+ " " *
+ get.bbl.editor
+ *
+ }
+ if$
+}
+FUNCTION {format.book.pages}
+{ pages "pages" bibinfo.check
+ duplicate$ empty$ 'skip$
+ { " " * bbl.pages * }
+ if$
+}
+FUNCTION {format.isbn}
+{ isbn "isbn" bibinfo.check
+ duplicate$ empty$ 'skip$
+ {
+ "ISBN " swap$ *
+ }
+ if$
+}
+
+FUNCTION {format.issn}
+{ issn "issn" bibinfo.check
+ duplicate$ empty$ 'skip$
+ {
+ "ISSN " swap$ *
+ }
+ if$
+}
+
+FUNCTION {format.doi}
+{ doi empty$
+ { "" }
+ {
+ "\doi{" doi * "}" *
+ }
+ if$
+}
+FUNCTION {select.language}
+{ duplicate$ empty$
+ 'pop$
+ { language empty$
+ 'skip$
+ { "{\selectlanguage{" language * "}" * swap$ * "}" * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.note}
+{
+ url empty$
+ 'skip$
+ { "\urlprefix\url{" url * "}" * output }
+ if$
+ note empty$
+ { "" }
+ { note #1 #1 substring$
+ duplicate$ "{" =
+ 'skip$
+ { output.state mid.sentence =
+ { "l" }
+ { "u" }
+ if$
+ change.case$
+ }
+ if$
+ note #2 global.max$ substring$ * "note" bibinfo.check
+ }
+ if$
+}
+
+FUNCTION {format.title}
+{ title
+ duplicate$ empty$ 'skip$
+ { "t" change.case$ }
+ if$
+ "title" bibinfo.check
+ duplicate$ empty$ 'skip$
+ {
+ "\enquote{" swap$ *
+ "}, " *
+ select.language
+ }
+ if$
+}
+FUNCTION {end.quote.title}
+{ title empty$
+ 'skip$
+ { before.all 'output.state := }
+ if$
+}
+FUNCTION {format.full.names}
+{'s :=
+ "" 't :=
+ #1 'nameptr :=
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ { s nameptr
+ "{vv~}{ll}" format.name$
+ 't :=
+ nameptr #1 >
+ {
+ namesleft #1 >
+ { ", " * t * }
+ {
+ s nameptr "{ll}" format.name$ duplicate$ "others" =
+ { 't := }
+ { pop$ }
+ if$
+ t "others" =
+ {
+ " " * bbl.etal *
+ }
+ {
+ bbl.and
+ space.word * t *
+ }
+ if$
+ }
+ if$
+ }
+ 't
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+}
+
+FUNCTION {author.editor.key.full}
+{ author empty$
+ { editor empty$
+ { key empty$
+ { cite$ #1 #3 substring$ }
+ 'key
+ if$
+ }
+ { editor format.full.names }
+ if$
+ }
+ { author format.full.names }
+ if$
+}
+
+FUNCTION {author.key.full}
+{ author empty$
+ { key empty$
+ { cite$ #1 #3 substring$ }
+ 'key
+ if$
+ }
+ { author format.full.names }
+ if$
+}
+
+FUNCTION {editor.key.full}
+{ editor empty$
+ { key empty$
+ { cite$ #1 #3 substring$ }
+ 'key
+ if$
+ }
+ { editor format.full.names }
+ if$
+}
+
+FUNCTION {make.full.names}
+{ type$ "book" =
+ type$ "inbook" =
+ or
+ 'author.editor.key.full
+ { type$ "proceedings" =
+ 'editor.key.full
+ 'author.key.full
+ if$
+ }
+ if$
+}
+
+FUNCTION {output.bibitem}
+{ newline$
+ "\bibitem[{" write$
+ label write$
+ ")" make.full.names duplicate$ short.list =
+ { pop$ }
+ { * }
+ if$
+ "}]{" * write$
+ cite$ write$
+ "}" write$
+ newline$
+ ""
+ before.all 'output.state :=
+}
+
+FUNCTION {if.digit}
+{ duplicate$ "0" =
+ swap$ duplicate$ "1" =
+ swap$ duplicate$ "2" =
+ swap$ duplicate$ "3" =
+ swap$ duplicate$ "4" =
+ swap$ duplicate$ "5" =
+ swap$ duplicate$ "6" =
+ swap$ duplicate$ "7" =
+ swap$ duplicate$ "8" =
+ swap$ "9" = or or or or or or or or or
+}
+FUNCTION {n.separate}
+{ 't :=
+ ""
+ #0 'numnames :=
+ { t empty$ not }
+ { t #-1 #1 substring$ if.digit
+ { numnames #1 + 'numnames := }
+ { #0 'numnames := }
+ if$
+ t #-1 #1 substring$ swap$ *
+ t #-2 global.max$ substring$ 't :=
+ numnames #5 =
+ { duplicate$ #1 #2 substring$ swap$
+ #3 global.max$ substring$
+ "\," swap$ * *
+ }
+ 'skip$
+ if$
+ }
+ while$
+}
+FUNCTION {n.dashify}
+{
+ n.separate
+ 't :=
+ ""
+ { t empty$ not }
+ { t #1 #1 substring$ "-" =
+ { t #1 #2 substring$ "--" = not
+ { "--" *
+ t #2 global.max$ substring$ 't :=
+ }
+ { { t #1 #1 substring$ "-" = }
+ { "-" *
+ t #2 global.max$ substring$ 't :=
+ }
+ while$
+ }
+ if$
+ }
+ { t #1 #1 substring$ *
+ t #2 global.max$ substring$ 't :=
+ }
+ if$
+ }
+ while$
+}
+
+FUNCTION {word.in}
+{ bbl.in
+ " " * }
+
+FUNCTION {format.date}
+{ year "year" bibinfo.check duplicate$ empty$
+ {
+ }
+ 'skip$
+ if$
+ extra.label *
+ before.all 'output.state :=
+ after.sentence 'output.state :=
+}
+FUNCTION {format.btitle}
+{ title "title" bibinfo.check
+ duplicate$ empty$ 'skip$
+ {
+ emphasize
+ select.language
+ }
+ if$
+}
+FUNCTION {either.or.check}
+{ empty$
+ 'pop$
+ { "can't use both " swap$ * " fields in " * cite$ * warning$ }
+ if$
+}
+FUNCTION {format.bvolume}
+{ volume empty$
+ { "" }
+ { bbl.volume volume tie.or.space.prefix
+ "volume" bibinfo.check * *
+ series "series" bibinfo.check
+ duplicate$ empty$ 'pop$
+ { emphasize ", " * swap$ * }
+ if$
+ "volume and number" number either.or.check
+ }
+ if$
+}
+FUNCTION {format.number.series}
+{ volume empty$
+ { number empty$
+ { series field.or.null }
+ { series empty$
+ { number "number" bibinfo.check }
+ { output.state mid.sentence =
+ { bbl.number }
+ { bbl.number capitalize }
+ if$
+ number tie.or.space.prefix "number" bibinfo.check * *
+ bbl.in space.word *
+ series "series" bibinfo.check *
+ }
+ if$
+ }
+ if$
+ }
+ { "" }
+ if$
+}
+FUNCTION {is.num}
+{ chr.to.int$
+ duplicate$ "0" chr.to.int$ < not
+ swap$ "9" chr.to.int$ > not and
+}
+
+FUNCTION {extract.num}
+{ duplicate$ 't :=
+ "" 's :=
+ { t empty$ not }
+ { t #1 #1 substring$
+ t #2 global.max$ substring$ 't :=
+ duplicate$ is.num
+ { s swap$ * 's := }
+ { pop$ "" 't := }
+ if$
+ }
+ while$
+ s empty$
+ 'skip$
+ { pop$ s }
+ if$
+}
+
+FUNCTION {convert.edition}
+{ extract.num "l" change.case$ 's :=
+ s "first" = s "1" = or
+ { bbl.first 't := }
+ { s "second" = s "2" = or
+ { bbl.second 't := }
+ { s "third" = s "3" = or
+ { bbl.third 't := }
+ { s "fourth" = s "4" = or
+ { bbl.fourth 't := }
+ { s "fifth" = s "5" = or
+ { bbl.fifth 't := }
+ { s #1 #1 substring$ is.num
+ { s eng.ord 't := }
+ { edition 't := }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+ t
+}
+
+FUNCTION {format.edition}
+{ edition duplicate$ empty$ 'skip$
+ {
+ convert.edition
+ output.state mid.sentence =
+ { "l" }
+ { "t" }
+ if$ change.case$
+ "edition" bibinfo.check
+ " " * bbl.edition *
+ }
+ if$
+}
+INTEGERS { multiresult }
+FUNCTION {multi.page.check}
+{ 't :=
+ #0 'multiresult :=
+ { multiresult not
+ t empty$ not
+ and
+ }
+ { t #1 #1 substring$
+ duplicate$ "-" =
+ swap$ duplicate$ "," =
+ swap$ "+" =
+ or or
+ { #1 'multiresult := }
+ { t #2 global.max$ substring$ 't := }
+ if$
+ }
+ while$
+ multiresult
+}
+FUNCTION {format.pages}
+{ pages duplicate$ empty$ 'skip$
+ { duplicate$ multi.page.check
+ {
+ bbl.pages swap$
+ n.dashify
+ }
+ {
+ bbl.page swap$
+ }
+ if$
+ tie.or.space.prefix
+ "pages" bibinfo.check
+ * *
+ }
+ if$
+}
+FUNCTION {format.journal.pages}
+{ pages duplicate$ empty$ 'pop$
+ { swap$ duplicate$ empty$
+ { pop$ pop$ format.pages }
+ {
+ ", " *
+ swap$
+ n.dashify
+ pages multi.page.check
+ 'bbl.pages
+ 'bbl.page
+ if$
+ swap$ tie.or.space.prefix
+ "pages" bibinfo.check
+ * *
+ *
+ }
+ if$
+ }
+ if$
+}
+FUNCTION {format.journal.eid}
+{ eid "eid" bibinfo.check
+ duplicate$ empty$ 'pop$
+ { swap$ duplicate$ empty$ 'skip$
+ {
+ ", " *
+ }
+ if$
+ swap$ *
+ }
+ if$
+}
+FUNCTION {format.vol.num.pages}
+{ volume field.or.null
+ duplicate$ empty$ 'skip$
+ {
+ bbl.volume swap$ tie.or.space.prefix
+ "volume" bibinfo.check
+ * *
+ }
+ if$
+ number "number" bibinfo.check duplicate$ empty$ 'skip$
+ {
+ swap$ duplicate$ empty$
+ { "there's a number but no volume in " cite$ * warning$ }
+ 'skip$
+ if$
+ swap$
+ ", " bbl.nr * number tie.or.space.prefix pop$ * swap$ *
+ }
+ if$ *
+}
+
+FUNCTION {format.chapter.pages}
+{ chapter empty$
+ { "" }
+ { type empty$
+ { bbl.chapter }
+ { type "l" change.case$
+ "type" bibinfo.check
+ }
+ if$
+ chapter tie.or.space.prefix
+ "chapter" bibinfo.check
+ * *
+ }
+ if$
+}
+
+FUNCTION {format.booktitle}
+{
+ booktitle "booktitle" bibinfo.check
+ emphasize
+}
+FUNCTION {format.in.ed.booktitle}
+{ format.booktitle duplicate$ empty$ 'skip$
+ {
+ format.bvolume duplicate$ empty$ 'pop$
+ { ", " swap$ * * }
+ if$
+ editor "editor" format.names.ed duplicate$ empty$ 'pop$
+ {
+ bbl.edby
+ " " * swap$ *
+ swap$
+ "," *
+ " " * swap$
+ * }
+ if$
+ word.in swap$ *
+ }
+ if$
+}
+FUNCTION {format.thesis.type}
+{ type duplicate$ empty$
+ 'pop$
+ { swap$ pop$
+ "t" change.case$ "type" bibinfo.check
+ }
+ if$
+}
+FUNCTION {format.tr.number}
+{ number "number" bibinfo.check
+ type duplicate$ empty$
+ { pop$ bbl.techrep }
+ 'skip$
+ if$
+ "type" bibinfo.check
+ swap$ duplicate$ empty$
+ { pop$ "t" change.case$ }
+ { tie.or.space.prefix * * }
+ if$
+}
+FUNCTION {format.article.crossref}
+{
+ word.in
+ " \cite{" * crossref * "}" *
+}
+FUNCTION {format.book.crossref}
+{ volume duplicate$ empty$
+ { "empty volume in " cite$ * "'s crossref of " * crossref * warning$
+ pop$ word.in
+ }
+ { bbl.volume
+ swap$ tie.or.space.prefix "volume" bibinfo.check * * bbl.of space.word *
+ }
+ if$
+ " \cite{" * crossref * "}" *
+}
+FUNCTION {format.incoll.inproc.crossref}
+{
+ word.in
+ " \cite{" * crossref * "}" *
+}
+FUNCTION {format.org.or.pub}
+{ 't :=
+ ""
+ address empty$ t empty$ and
+ 'skip$
+ {
+ t empty$
+ { address "address" bibinfo.check *
+ }
+ { t *
+ address empty$
+ 'skip$
+ { ", " * address "address" bibinfo.check * }
+ if$
+ }
+ if$
+ }
+ if$
+}
+FUNCTION {format.publisher.address}
+{ publisher "publisher" bibinfo.warn format.org.or.pub
+}
+
+FUNCTION {format.organization.address}
+{ organization "organization" bibinfo.check format.org.or.pub
+}
+
+FUNCTION {article}
+{ output.bibitem
+ format.authors "author" output.check
+ author format.key output
+ format.date "year" output.check
+ date.block
+ format.title "title" output.check
+ end.quote.title
+ crossref missing$
+ {
+ journal
+ "journal" bibinfo.check
+ emphasize
+ "journal" output.check
+ format.vol.num.pages output
+ format.doi output
+ }
+ { format.article.crossref output.nonnull
+ }
+ if$
+ eid empty$
+ { format.journal.pages }
+ { format.journal.eid }
+ if$
+ format.issn output
+ new.sentence
+ format.note output
+ fin.entry
+}
+FUNCTION {book}
+{ output.bibitem
+ author empty$
+ { format.editors "author and editor" output.check
+ editor format.key output
+ }
+ { format.authors output.nonnull
+ crossref missing$
+ { "author and editor" editor either.or.check }
+ 'skip$
+ if$
+ }
+ if$
+ format.date "year" output.check
+ date.block
+ format.btitle "title" output.check
+ crossref missing$
+ { format.bvolume output
+ format.edition output
+ format.number.series output
+ format.publisher.address output
+ }
+ {
+ format.book.crossref output.nonnull
+ }
+ if$
+ format.isbn output
+ format.book.pages output
+ format.doi output
+ new.sentence
+ format.note output
+ fin.entry
+}
+FUNCTION {booklet}
+{ output.bibitem
+ format.authors output
+ author format.key output
+ format.date "year" output.check
+ date.block
+ format.title "title" output.check
+ end.quote.title
+ howpublished "howpublished" bibinfo.check output
+ address "address" bibinfo.check output
+ format.isbn output
+ format.book.pages output
+ format.doi output
+ new.sentence
+ format.note output
+ fin.entry
+}
+
+FUNCTION {inbook}
+{ output.bibitem
+ author empty$
+ { format.editors "author and editor" output.check
+ editor format.key output
+ }
+ { format.authors output.nonnull
+ crossref missing$
+ { "author and editor" editor either.or.check }
+ 'skip$
+ if$
+ }
+ if$
+ format.date "year" output.check
+ date.block
+ format.btitle "title" output.check
+ crossref missing$
+ {
+ format.bvolume output
+ format.chapter.pages "chapter and pages" output.check
+ format.edition output
+ format.number.series output
+ format.publisher.address output
+ }
+ {
+ format.chapter.pages "chapter and pages" output.check
+ format.book.crossref output.nonnull
+ }
+ if$
+ crossref missing$
+ { format.isbn output }
+ 'skip$
+ if$
+ format.pages "pages" output.check
+ format.doi output
+ new.sentence
+ format.note output
+ fin.entry
+}
+
+FUNCTION {incollection}
+{ output.bibitem
+ format.authors "author" output.check
+ author format.key output
+ format.date "year" output.check
+ date.block
+ format.title "title" output.check
+ end.quote.title
+ crossref missing$
+ { format.in.ed.booktitle "booktitle" output.check
+ format.edition output
+ format.chapter.pages output
+ format.number.series output
+ format.publisher.address output
+ format.isbn output
+ }
+ { format.incoll.inproc.crossref output.nonnull
+ format.chapter.pages output
+ }
+ if$
+ format.pages "pages" output.check
+ format.doi output
+ new.sentence
+ format.note output
+ fin.entry
+}
+FUNCTION {inproceedings}
+{ output.bibitem
+ format.authors "author" output.check
+ author format.key output
+ format.date "year" output.check
+ date.block
+ format.title "title" output.check
+ end.quote.title
+ crossref missing$
+ { format.in.ed.booktitle "booktitle" output.check
+ format.number.series output
+ publisher empty$
+ { format.organization.address output }
+ { organization "organization" bibinfo.check output
+ format.publisher.address output
+ }
+ if$
+ format.isbn output
+ format.issn output
+ }
+ { format.incoll.inproc.crossref output.nonnull
+ }
+ if$
+ format.pages "pages" output.check
+ format.doi output
+ new.sentence
+ format.note output
+ fin.entry
+}
+FUNCTION {conference} { inproceedings }
+FUNCTION {manual}
+{ output.bibitem
+ format.authors output
+ author format.key output
+ format.date "year" output.check
+ date.block
+ format.btitle "title" output.check
+ organization "organization" bibinfo.check output
+ address "address" bibinfo.check output
+ format.edition output
+ format.doi output
+ new.sentence
+ format.note output
+ fin.entry
+}
+
+FUNCTION {mastersthesis}
+{ output.bibitem
+ format.authors "author" output.check
+ author format.key output
+ format.date "year" output.check
+ date.block
+ format.btitle
+ "title" output.check
+ bbl.mthesis format.thesis.type output.nonnull
+ school "school" bibinfo.warn output
+ address "address" bibinfo.check output
+ format.doi output
+ new.sentence
+ format.note output
+ fin.entry
+}
+
+FUNCTION {misc}
+{ output.bibitem
+ format.authors output
+ author format.key output
+ format.date "year" output.check
+ date.block
+ format.title output
+ end.quote.title
+ howpublished "howpublished" bibinfo.check output
+ format.doi output
+ new.sentence
+ format.note output
+ fin.entry
+}
+FUNCTION {phdthesis}
+{ output.bibitem
+ format.authors "author" output.check
+ author format.key output
+ format.date "year" output.check
+ date.block
+ format.btitle
+ "title" output.check
+ bbl.phdthesis format.thesis.type output.nonnull
+ school "school" bibinfo.warn output
+ address "address" bibinfo.check output
+ format.doi output
+ new.sentence
+ format.note output
+ fin.entry
+}
+
+FUNCTION {proceedings}
+{ output.bibitem
+ format.editors output
+ editor format.key output
+ format.date "year" output.check
+ date.block
+ format.btitle "title" output.check
+ format.bvolume output
+ format.number.series output
+ publisher empty$
+ { format.organization.address output }
+ { organization "organization" bibinfo.check output
+ format.publisher.address output
+ }
+ if$
+ format.isbn output
+ format.issn output
+ format.doi output
+ new.sentence
+ format.note output
+ fin.entry
+}
+
+FUNCTION {techreport}
+{ output.bibitem
+ format.authors "author" output.check
+ author format.key output
+ format.date "year" output.check
+ date.block
+ format.title
+ "title" output.check
+ end.quote.title
+ format.tr.number output.nonnull
+ institution "institution" bibinfo.warn output
+ address "address" bibinfo.check output
+ format.doi output
+ new.sentence
+ format.note output
+ fin.entry
+}
+
+FUNCTION {unpublished}
+{ output.bibitem
+ format.authors "author" output.check
+ author format.key output
+ format.date "year" output.check
+ date.block
+ format.title "title" output.check
+ end.quote.title
+ format.doi output
+ new.sentence
+ format.note "note" output.check
+ fin.entry
+}
+
+FUNCTION {default.type} { misc }
+READ
+FUNCTION {sortify}
+{ purify$
+ "l" change.case$
+}
+INTEGERS { len }
+FUNCTION {chop.word}
+{ 's :=
+ 'len :=
+ s #1 len substring$ =
+ { s len #1 + global.max$ substring$ }
+ 's
+ if$
+}
+FUNCTION {format.lab.names}
+{ 's :=
+ "" 't :=
+ s #1 "{vv~}{ll}" format.name$
+ s num.names$ duplicate$
+ #2 >
+ { pop$
+ " " * bbl.etal *
+ }
+ { #2 <
+ 'skip$
+ { s #2 "{ff }{vv }{ll}{ jj}" format.name$ "others" =
+ {
+ " " * bbl.etal *
+ }
+ { bbl.and space.word * s #2 "{vv~}{ll}" format.name$
+ * }
+ if$
+ }
+ if$
+ }
+ if$
+}
+
+FUNCTION {author.key.label}
+{ author empty$
+ { key empty$
+ { cite$ #1 #3 substring$ }
+ 'key
+ if$
+ }
+ { author format.lab.names }
+ if$
+}
+
+FUNCTION {author.editor.key.label}
+{ author empty$
+ { editor empty$
+ { key empty$
+ { cite$ #1 #3 substring$ }
+ 'key
+ if$
+ }
+ { editor format.lab.names }
+ if$
+ }
+ { author format.lab.names }
+ if$
+}
+
+FUNCTION {editor.key.label}
+{ editor empty$
+ { key empty$
+ { cite$ #1 #3 substring$ }
+ 'key
+ if$
+ }
+ { editor format.lab.names }
+ if$
+}
+
+FUNCTION {calc.short.authors}
+{ type$ "book" =
+ type$ "inbook" =
+ or
+ 'author.editor.key.label
+ { type$ "proceedings" =
+ 'editor.key.label
+ 'author.key.label
+ if$
+ }
+ if$
+ 'short.list :=
+}
+
+FUNCTION {calc.label}
+{ calc.short.authors
+ short.list
+ "("
+ *
+ year duplicate$ empty$
+ { pop$ "" }
+ 'skip$
+ if$
+ *
+ 'label :=
+}
+
+FUNCTION {sort.format.names}
+{ 's :=
+ #1 'nameptr :=
+ ""
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ { s nameptr
+ "{ll{ }}{ f{ }}{ jj{ }}"
+ format.name$ 't :=
+ nameptr #1 >
+ {
+ " " *
+ namesleft #1 = t "others" = and
+ { "zzzzz" 't := }
+ 'skip$
+ if$
+ t sortify *
+ }
+ { t sortify * }
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+}
+
+FUNCTION {sort.format.title}
+{ 't :=
+ "A " #2
+ "An " #3
+ "The " #4 t chop.word
+ chop.word
+ chop.word
+ sortify
+ #1 global.max$ substring$
+}
+FUNCTION {author.sort}
+{ author empty$
+ { key empty$
+ { "to sort, need author or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { author sort.format.names }
+ if$
+}
+FUNCTION {author.editor.sort}
+{ author empty$
+ { editor empty$
+ { key empty$
+ { "to sort, need author, editor, or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { editor sort.format.names }
+ if$
+ }
+ { author sort.format.names }
+ if$
+}
+FUNCTION {editor.sort}
+{ editor empty$
+ { key empty$
+ { "to sort, need editor or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { editor sort.format.names }
+ if$
+}
+FUNCTION {presort}
+{ calc.label
+ label sortify
+ " "
+ *
+ type$ "book" =
+ type$ "inbook" =
+ or
+ 'author.editor.sort
+ { type$ "proceedings" =
+ 'editor.sort
+ 'author.sort
+ if$
+ }
+ if$
+ #1 entry.max$ substring$
+ 'sort.label :=
+ sort.label
+ *
+ " "
+ *
+ title field.or.null
+ sort.format.title
+ *
+ #1 entry.max$ substring$
+ 'sort.key$ :=
+}
+
+ITERATE {presort}
+SORT
+STRINGS { last.label next.extra }
+INTEGERS { last.extra.num last.extra.num.extended last.extra.num.blank number.label }
+FUNCTION {initialize.extra.label.stuff}
+{ #0 int.to.chr$ 'last.label :=
+ "" 'next.extra :=
+ #0 'last.extra.num :=
+ "a" chr.to.int$ #1 - 'last.extra.num.blank :=
+ last.extra.num.blank 'last.extra.num.extended :=
+ #0 'number.label :=
+}
+FUNCTION {forward.pass}
+{ last.label label =
+ { last.extra.num #1 + 'last.extra.num :=
+ last.extra.num "z" chr.to.int$ >
+ { "a" chr.to.int$ 'last.extra.num :=
+ last.extra.num.extended #1 + 'last.extra.num.extended :=
+ }
+ 'skip$
+ if$
+ last.extra.num.extended last.extra.num.blank >
+ { last.extra.num.extended int.to.chr$
+ last.extra.num int.to.chr$
+ * 'extra.label := }
+ { last.extra.num int.to.chr$ 'extra.label := }
+ if$
+ }
+ { "a" chr.to.int$ 'last.extra.num :=
+ "" 'extra.label :=
+ label 'last.label :=
+ }
+ if$
+ number.label #1 + 'number.label :=
+}
+FUNCTION {reverse.pass}
+{ next.extra "b" =
+ { "a" 'extra.label := }
+ 'skip$
+ if$
+ extra.label 'next.extra :=
+ extra.label
+ duplicate$ empty$
+ 'skip$
+ { "{\natexlab{" swap$ * "}}" * }
+ if$
+ 'extra.label :=
+ label extra.label * 'label :=
+}
+EXECUTE {initialize.extra.label.stuff}
+ITERATE {forward.pass}
+REVERSE {reverse.pass}
+FUNCTION {bib.sort.order}
+{ sort.label
+ " "
+ *
+ year field.or.null sortify
+ *
+ " "
+ *
+ title field.or.null
+ sort.format.title
+ *
+ #1 entry.max$ substring$
+ 'sort.key$ :=
+}
+ITERATE {bib.sort.order}
+SORT
+FUNCTION {begin.bib}
+{ preamble$ empty$
+ 'skip$
+ { preamble$ write$ newline$ }
+ if$
+ "\begin{thebibliography}{" number.label int.to.str$ * "}" *
+ write$ newline$
+ "\ProvideTextCommand{\guillemotleft}{OT1}{%"
+ write$ newline$
+ " \leavevmode\raise .27ex\hbox{$\scriptscriptstyle\ll$}}"
+ write$ newline$
+ "\ProvideTextCommand{\guillemotright}{OT1}{%"
+ write$ newline$
+ " \leavevmode\raise .27ex\hbox{$\scriptscriptstyle\gg$}}"
+ write$ newline$
+ "\newcommand{\enquote}[1]{\guillemotleft#1\guillemotright}"
+ write$ newline$
+ "\providecommand{\natexlab}[1]{#1}"
+ write$ newline$
+ "\providecommand{\url}[1]{\texttt{#1}}"
+ write$ newline$
+ "\providecommand{\urlprefix}{URL }"
+ write$ newline$
+ "\expandafter\ifx\csname urlstyle\endcsname\relax"
+ write$ newline$
+ " \providecommand{\doi}[1]{doi:\discretionary{}{}{}#1}\else"
+ write$ newline$
+ " \providecommand{\doi}{doi:\discretionary{}{}{}\begingroup \urlstyle{rm}\Url}\fi"
+ write$ newline$
+ "\providecommand{\selectlanguage}[1]{\relax}"
+ write$ newline$
+ "\input{francaisbst.tex}" write$ newline$
+ "\newcommand{\Capitalize}[1]{\uppercase{#1}}" write$ newline$
+ "\newcommand{\capitalize}[1]{\expandafter\Capitalize#1}" write$ newline$
+}
+EXECUTE {begin.bib}
+EXECUTE {init.state.consts}
+ITERATE {call.type$}
+FUNCTION {end.bib}
+{ newline$
+ "\end{thebibliography}" write$ newline$
+}
+EXECUTE {end.bib}
+%% End of customized bst file
+%%
+%% End of file `francais.bst'.
diff --git a/biblio/bibtex/contrib/francais-bst/francaisbst.tex b/biblio/bibtex/contrib/francais-bst/francaisbst.tex
new file mode 100644
index 0000000000..f60e5a1e89
--- /dev/null
+++ b/biblio/bibtex/contrib/francais-bst/francaisbst.tex
@@ -0,0 +1,49 @@
+%% Copyright (C) 2012 Vincent Goulet
+%%
+%% This file may be distributed and/or modified under the conditions
+%% of the LaTeX Project Public License, either version 1.3c of this
+%% license or (at your option) any later version. The latest version
+%% of this license is in:
+%%
+%% http://www.latex-project.org/lppl.txt
+%%
+%% and version 1.3c or later is part of all distributions of LaTeX
+%% version 2006/05/20 or later.
+%%
+%% This work has the LPPL maintenance status `maintained'.
+%%
+%% The Current Maintainer of this work is Vincent Goulet
+%% <vincent.goulet@act.ulaval.ca>.
+%%
+%% This is francaisbst.tex for French.
+\def\bbland{et} \def\bbletal{et~collab.}
+\def\bbleditors{r\'edacteurs} \def\bbleds{\'ed.}
+\def\bbleditor{r\'edacteur} \def\bbled{\'ed.}
+\def\bbledby{\'edit\'e par}
+\def\bbledition{\'edition} \def\bbledn{\'ed.}
+\def\bblvolume{volume} \def\bblvol{vol.}
+\def\bblof{de}
+\def\bblnumber{num\'ero} \def\bblno{\no{}}
+\def\bblin{dans}
+\def\bblpages{pages} \def\bblpp{p.}
+\def\bblpage{page} \def\bblp{p.}
+\def\bbleidpp{pages}
+\def\bblchapter{chapitre} \def\bblchap{chap.}
+\def\bbltechreport{cahier de recherche}
+\def\bbltechrep{cahier de recherche}
+\def\bblmthesis{m\'emoire de ma\^itrise}
+\def\bblphdthesis{th\`ese de doctorat}
+\def\bblfirst{premi\`ere} \def\bblfirsto{1{\iere}}
+\def\bblsecond{seconde} \def\bblsecondo{2{\ieme}}
+\def\bblthird{troisi\`eme} \def\bblthirdo{3{\ieme}}
+\def\bblfourth{quatri\`eme} \def\bblfourtho{4{\ieme}}
+\def\bblfifth{cinqui\`eme} \def\bblfiftho{5{\ieme}}
+\def\bblst{{\iere}} \def\bblnd{{\ieme}} \def\bblrd{{\ieme}}
+\def\bblth{{\ieme}}
+\def\bbljan{janvier} \def\bblfeb{f\'evrier} \def\bblmar{mars}
+\def\bblapr{avril} \def\bblmay{mai} \def\bbljun{juin}
+\def\bbljul{juillet} \def\bblaug{ao\^ut} \def\bblsep{septembre}
+\def\bbloct{octobre} \def\bblnov{novembre} \def\bbldec{d\'ecembre}
+\endinput
+%%
+%% End of file `francaisbst.tex'.
diff --git a/biblio/bibtex/contrib/francais-bst/francaissc.bst b/biblio/bibtex/contrib/francais-bst/francaissc.bst
new file mode 100644
index 0000000000..3a024a5365
--- /dev/null
+++ b/biblio/bibtex/contrib/francais-bst/francaissc.bst
@@ -0,0 +1,1759 @@
+%%
+%% This is file `francaissc.bst',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% merlin.mbs (with options: `babel,ay,nat,lang,vonx,nm-rev1,jnrlst,nmft,nmft-sc,nmand-rm,lab,lab-sc,and-rm,blkyear,dt-beg,yr-per,note-yr,tit-qq,qt-g,qx,vnum-nr,volp-com,pgsep-s,jwdpg,pp-last,jwdvol,num-xser,numser,ser-vol,ser-ed,pg-bk,pre-edn,isbn,issn,agu-doi,doi,edby,blk-com,blknt,pp,ed,abr,ord,and-xcom,etal-xc,etal-rm,url,url-nt,nfss,')
+%%
+%% >> Style bibliographique compatible avec natbib permettant de composer
+%% >> des bibliographies en francais conformes aux regles de typographie
+%% >> enoncees dans
+%% >>
+%% >> Malo, M. "Guide de la communication ecrite", Quebec Amerique, 1996.
+%% >> ISBN 978-2-8903-7875-9.
+%% >>
+%% >> Version avec les noms d'auteurs en petites capitales dans la
+%% >> bibliographie *et* dans les citations. La conjonction "et" et le
+%% >> marqueur "et collab." sont en romain normal.
+%% >>
+%% >> Style cree et maintenu par Vincent Goulet
+%% >> <vincent.goulet@act.ulaval.ca>.
+%% >>
+%% >> Version 1.1 2013-05-12
+%%
+%% Copyright 1994-2011 Patrick W Daly
+ % ===============================================================
+ % IMPORTANT NOTICE:
+ % This bibliographic style (bst) file has been generated from one or
+ % more master bibliographic style (mbs) files, listed above.
+ %
+ % This generated file can be redistributed and/or modified under the terms
+ % of the LaTeX Project Public License Distributed from CTAN
+ % archives in directory macros/latex/base/lppl.txt; either
+ % version 1 of the License, or any later version.
+ % ===============================================================
+ % Name and version information of the main mbs file:
+ % \ProvidesFile{merlin.mbs}[2011/11/18 4.33 (PWD, AO, DPC)]
+ % For use with BibTeX version 0.99a or later
+ %-------------------------------------------------------------------
+ % This bibliography style file requires a file named francaisbst.tex
+ % containing the definitions of word commands like \bbleditor, etc.
+ % This is an author-year citation style bibliography. As such, it is
+ % non-standard LaTeX, and requires a special package file to function properly.
+ % Such a package is natbib.sty by Patrick W. Daly
+ % The form of the \bibitem entries is
+ % \bibitem[Jones et al.(1990)]{key}...
+ % \bibitem[Jones et al.(1990)Jones, Baker, and Smith]{key}...
+ % The essential feature is that the label (the part in brackets) consists
+ % of the author names, as they should appear in the citation, with the year
+ % in parentheses following. There must be no space before the opening
+ % parenthesis!
+ % With natbib v5.3, a full list of authors may also follow the year.
+ % In natbib.sty, it is possible to define the type of enclosures that is
+ % really wanted (brackets or parentheses), but in either case, there must
+ % be parentheses in the label.
+ % The \cite command functions as follows:
+ % \citet{key} ==>> Jones et al. (1990)
+ % \citet*{key} ==>> Jones, Baker, and Smith (1990)
+ % \citep{key} ==>> (Jones et al., 1990)
+ % \citep*{key} ==>> (Jones, Baker, and Smith, 1990)
+ % \citep[chap. 2]{key} ==>> (Jones et al., 1990, chap. 2)
+ % \citep[e.g.][]{key} ==>> (e.g. Jones et al., 1990)
+ % \citep[e.g.][p. 32]{key} ==>> (e.g. Jones et al., 1990, p. 32)
+ % \citeauthor{key} ==>> Jones et al.
+ % \citeauthor*{key} ==>> Jones, Baker, and Smith
+ % \citeyear{key} ==>> 1990
+ %---------------------------------------------------------------------
+
+ENTRY
+ { address
+ author
+ booktitle
+ chapter
+ doi
+ edition
+ editor
+ eid
+ howpublished
+ institution
+ isbn
+ issn
+ journal
+ key
+ language
+ month
+ note
+ number
+ organization
+ pages
+ publisher
+ school
+ series
+ title
+ type
+ url
+ volume
+ year
+ }
+ {}
+ { label extra.label sort.label short.list }
+INTEGERS { output.state before.all mid.sentence after.sentence after.block }
+FUNCTION {init.state.consts}
+{ #0 'before.all :=
+ #1 'mid.sentence :=
+ #2 'after.sentence :=
+ #3 'after.block :=
+}
+STRINGS { s t}
+FUNCTION {output.nonnull}
+{ 's :=
+ output.state mid.sentence =
+ { ", " * write$ }
+ { output.state after.block =
+ { add.period$ write$
+ newline$
+ "\newblock " write$
+ }
+ { output.state before.all =
+ 'write$
+ { add.period$ " " * write$ }
+ if$
+ }
+ if$
+ mid.sentence 'output.state :=
+ }
+ if$
+ s
+}
+FUNCTION {output}
+{ duplicate$ empty$
+ 'pop$
+ 'output.nonnull
+ if$
+}
+FUNCTION {output.check}
+{ 't :=
+ duplicate$ empty$
+ { pop$ "empty " t * " in " * cite$ * warning$ }
+ 'output.nonnull
+ if$
+}
+FUNCTION {fin.entry}
+{ add.period$
+ write$
+ newline$
+}
+
+FUNCTION {new.block}
+{ output.state before.all =
+ 'skip$
+ { after.block 'output.state := }
+ if$
+}
+FUNCTION {new.sentence}
+{ output.state after.block =
+ 'skip$
+ { output.state before.all =
+ 'skip$
+ { after.sentence 'output.state := }
+ if$
+ }
+ if$
+}
+FUNCTION {add.blank}
+{ " " * before.all 'output.state :=
+}
+
+FUNCTION {date.block}
+{
+ skip$
+}
+
+FUNCTION {not}
+{ { #0 }
+ { #1 }
+ if$
+}
+FUNCTION {and}
+{ 'skip$
+ { pop$ #0 }
+ if$
+}
+FUNCTION {or}
+{ { pop$ #1 }
+ 'skip$
+ if$
+}
+FUNCTION {non.stop}
+{ duplicate$
+ "}" * add.period$
+ #-1 #1 substring$ "." =
+}
+
+FUNCTION {new.block.checkb}
+{ empty$
+ swap$ empty$
+ and
+ 'skip$
+ 'new.block
+ if$
+}
+FUNCTION {field.or.null}
+{ duplicate$ empty$
+ { pop$ "" }
+ 'skip$
+ if$
+}
+FUNCTION {emphasize}
+{ duplicate$ empty$
+ { pop$ "" }
+ { "\emph{" swap$ * "}" * }
+ if$
+}
+FUNCTION {scaps}
+{ duplicate$ empty$
+ { pop$ "" }
+ { "\textsc{" swap$ * "}" * }
+ if$
+}
+FUNCTION {bib.name.font}
+{ scaps }
+FUNCTION {bib.fname.font}
+{ bib.name.font }
+FUNCTION {cite.name.font}
+{ scaps }
+FUNCTION {tie.or.space.prefix}
+{ duplicate$ text.length$ #3 <
+ { "~" }
+ { " " }
+ if$
+ swap$
+}
+
+FUNCTION {capitalize}
+{ "\capitalize" swap$ * }
+
+FUNCTION {space.word}
+{ " " swap$ * " " * }
+ % Here are the language-specific definitions for explicit words.
+ % Each function has a name bbl.xxx where xxx is the English word.
+ % The BABEL language selection is made here; definitions in francaisbst.tex.
+FUNCTION {bbl.and}
+{ "\bbland{}"}
+
+FUNCTION {bbl.etal}
+{ "\bbletal{}"}
+
+FUNCTION {bbl.editors}
+{ "\bbleds{}" }
+
+FUNCTION {bbl.editor}
+{ "\bbled{}" }
+
+FUNCTION {bbl.edby}
+{ "\bbledby{}" }
+
+FUNCTION {bbl.edition}
+{ "\bbledn{}" }
+
+FUNCTION {bbl.volume}
+{ "\bblvol{}" }
+
+FUNCTION {bbl.of}
+{ "\bblof{}" }
+
+FUNCTION {bbl.number}
+{ "\bblno{}" }
+
+FUNCTION {bbl.nr}
+{ "\bblno{}" }
+
+FUNCTION {bbl.in}
+{ "\bblin{}" }
+
+FUNCTION {bbl.pages}
+{ "\bblpp{}" }
+
+FUNCTION {bbl.page}
+{ "\bblp{}" }
+
+FUNCTION {bbl.chapter}
+{ "\bblchap{}" }
+
+FUNCTION {bbl.techrep}
+{ "\bbltechrep{}" }
+
+FUNCTION {bbl.mthesis}
+{ "\bblmthesis{}" }
+
+FUNCTION {bbl.phdthesis}
+{ "\bblphdthesis{}" }
+
+FUNCTION {bbl.first}
+{ "\bblfirsto{}" }
+
+FUNCTION {bbl.second}
+{ "\bblsecondo{}" }
+
+FUNCTION {bbl.third}
+{ "\bblthirdo{}" }
+
+FUNCTION {bbl.fourth}
+{ "\bblfourtho{}" }
+
+FUNCTION {bbl.fifth}
+{ "\bblfiftho{}" }
+
+FUNCTION {bbl.st}
+{ "\bblst{}" }
+
+FUNCTION {bbl.nd}
+{ "\bblnd{}" }
+
+FUNCTION {bbl.rd}
+{ "\bblrd{}" }
+
+FUNCTION {bbl.th}
+{ "\bblth{}" }
+
+MACRO {jan} {"\bbljan{}"}
+
+MACRO {feb} {"\bblfeb{}"}
+
+MACRO {mar} {"\bblmar{}"}
+
+MACRO {apr} {"\bblapr{}"}
+
+MACRO {may} {"\bblmay{}"}
+
+MACRO {jun} {"\bbljun{}"}
+
+MACRO {jul} {"\bbljul{}"}
+
+MACRO {aug} {"\bblaug{}"}
+
+MACRO {sep} {"\bblsep{}"}
+
+MACRO {oct} {"\bbloct{}"}
+
+MACRO {nov} {"\bblnov{}"}
+
+MACRO {dec} {"\bbldec{}"}
+
+FUNCTION {eng.ord}
+{ duplicate$ "1" swap$ *
+ #-2 #1 substring$ "1" =
+ { bbl.th * }
+ { duplicate$ #-1 #1 substring$
+ duplicate$ "1" =
+ { pop$ bbl.st * }
+ { duplicate$ "2" =
+ { pop$ bbl.nd * }
+ { "3" =
+ { bbl.rd * }
+ { bbl.th * }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+}
+
+MACRO {acmcs} {"ACM Computing Surveys"}
+
+MACRO {acta} {"Acta Informatica"}
+
+MACRO {cacm} {"Communications of the ACM"}
+
+MACRO {ibmjrd} {"IBM Journal of Research and Development"}
+
+MACRO {ibmsj} {"IBM Systems Journal"}
+
+MACRO {ieeese} {"IEEE Transactions on Software Engineering"}
+
+MACRO {ieeetc} {"IEEE Transactions on Computers"}
+
+MACRO {ieeetcad}
+ {"IEEE Transactions on Computer-Aided Design of Integrated Circuits"}
+
+MACRO {ipl} {"Information Processing Letters"}
+
+MACRO {jacm} {"Journal of the ACM"}
+
+MACRO {jcss} {"Journal of Computer and System Sciences"}
+
+MACRO {scp} {"Science of Computer Programming"}
+
+MACRO {sicomp} {"SIAM Journal on Computing"}
+
+MACRO {tocs} {"ACM Transactions on Computer Systems"}
+
+MACRO {tods} {"ACM Transactions on Database Systems"}
+
+MACRO {tog} {"ACM Transactions on Graphics"}
+
+MACRO {toms} {"ACM Transactions on Mathematical Software"}
+
+MACRO {toois} {"ACM Transactions on Office Information Systems"}
+
+MACRO {toplas} {"ACM Transactions on Programming Languages and Systems"}
+
+MACRO {tcs} {"Theoretical Computer Science"}
+FUNCTION {bibinfo.check}
+{ swap$
+ duplicate$ missing$
+ {
+ pop$ pop$
+ ""
+ }
+ { duplicate$ empty$
+ {
+ swap$ pop$
+ }
+ { swap$
+ pop$
+ }
+ if$
+ }
+ if$
+}
+FUNCTION {bibinfo.warn}
+{ swap$
+ duplicate$ missing$
+ {
+ swap$ "missing " swap$ * " in " * cite$ * warning$ pop$
+ ""
+ }
+ { duplicate$ empty$
+ {
+ swap$ "empty " swap$ * " in " * cite$ * warning$
+ }
+ { swap$
+ pop$
+ }
+ if$
+ }
+ if$
+}
+INTEGERS { nameptr namesleft numnames }
+
+
+STRINGS { bibinfo}
+
+FUNCTION {format.names}
+{ 'bibinfo :=
+ duplicate$ empty$ 'skip$ {
+ 's :=
+ "" 't :=
+ #1 'nameptr :=
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ { s nameptr
+ duplicate$ #1 >
+ { "{f.~}{vv~}{ll}{, jj}" }
+ { "{vv~}{ll}{, f.}{, jj}" }
+ if$
+ format.name$
+ bib.name.font
+ bibinfo bibinfo.check
+ 't :=
+ nameptr #1 >
+ {
+ namesleft #1 >
+ { ", " * t * }
+ {
+ s nameptr "{ll}" format.name$ duplicate$ "others" =
+ { 't := }
+ { pop$ }
+ if$
+ t "others" =
+ {
+ " " * bbl.etal *
+ }
+ {
+ bbl.and
+ space.word * t *
+ }
+ if$
+ }
+ if$
+ }
+ 't
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+ } if$
+}
+FUNCTION {format.names.ed}
+{
+ 'bibinfo :=
+ duplicate$ empty$ 'skip$ {
+ 's :=
+ "" 't :=
+ #1 'nameptr :=
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ { s nameptr
+ "{f.~}{vv~}{ll}{, jj}"
+ format.name$
+ bibinfo bibinfo.check
+ 't :=
+ nameptr #1 >
+ {
+ namesleft #1 >
+ { ", " * t * }
+ {
+ s nameptr "{ll}" format.name$ duplicate$ "others" =
+ { 't := }
+ { pop$ }
+ if$
+ t "others" =
+ {
+
+ " " * bbl.etal *
+ }
+ {
+ bbl.and
+ space.word * t *
+ }
+ if$
+ }
+ if$
+ }
+ 't
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+ } if$
+}
+FUNCTION {format.key}
+{ empty$
+ { key field.or.null }
+ { "" }
+ if$
+}
+
+FUNCTION {format.authors}
+{ author "author" format.names
+}
+FUNCTION {get.bbl.editor}
+{ editor num.names$ #1 > 'bbl.editors 'bbl.editor if$ }
+
+FUNCTION {format.editors}
+{ editor "editor" format.names duplicate$ empty$ 'skip$
+ {
+ "," *
+ " " *
+ get.bbl.editor
+ *
+ }
+ if$
+}
+FUNCTION {format.book.pages}
+{ pages "pages" bibinfo.check
+ duplicate$ empty$ 'skip$
+ { " " * bbl.pages * }
+ if$
+}
+FUNCTION {format.isbn}
+{ isbn "isbn" bibinfo.check
+ duplicate$ empty$ 'skip$
+ {
+ "ISBN " swap$ *
+ }
+ if$
+}
+
+FUNCTION {format.issn}
+{ issn "issn" bibinfo.check
+ duplicate$ empty$ 'skip$
+ {
+ "ISSN " swap$ *
+ }
+ if$
+}
+
+FUNCTION {format.doi}
+{ doi empty$
+ { "" }
+ {
+ "\doi{" doi * "}" *
+ }
+ if$
+}
+FUNCTION {select.language}
+{ duplicate$ empty$
+ 'pop$
+ { language empty$
+ 'skip$
+ { "{\selectlanguage{" language * "}" * swap$ * "}" * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.note}
+{
+ url empty$
+ 'skip$
+ { "\urlprefix\url{" url * "}" * output }
+ if$
+ note empty$
+ { "" }
+ { note #1 #1 substring$
+ duplicate$ "{" =
+ 'skip$
+ { output.state mid.sentence =
+ { "l" }
+ { "u" }
+ if$
+ change.case$
+ }
+ if$
+ note #2 global.max$ substring$ * "note" bibinfo.check
+ }
+ if$
+}
+
+FUNCTION {format.title}
+{ title
+ duplicate$ empty$ 'skip$
+ { "t" change.case$ }
+ if$
+ "title" bibinfo.check
+ duplicate$ empty$ 'skip$
+ {
+ "\enquote{" swap$ *
+ "}, " *
+ select.language
+ }
+ if$
+}
+FUNCTION {end.quote.title}
+{ title empty$
+ 'skip$
+ { before.all 'output.state := }
+ if$
+}
+FUNCTION {format.full.names}
+{'s :=
+ "" 't :=
+ #1 'nameptr :=
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ { s nameptr
+ "{vv~}{ll}" format.name$
+ cite.name.font
+ 't :=
+ nameptr #1 >
+ {
+ namesleft #1 >
+ { ", " * t * }
+ {
+ s nameptr "{ll}" format.name$ duplicate$ "others" =
+ { 't := }
+ { pop$ }
+ if$
+ t "others" =
+ {
+ " " * bbl.etal *
+ }
+ {
+ bbl.and
+ space.word * t *
+ }
+ if$
+ }
+ if$
+ }
+ 't
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+}
+
+FUNCTION {author.editor.key.full}
+{ author empty$
+ { editor empty$
+ { key empty$
+ { cite$ #1 #3 substring$ }
+ 'key
+ if$
+ }
+ { editor format.full.names }
+ if$
+ }
+ { author format.full.names }
+ if$
+}
+
+FUNCTION {author.key.full}
+{ author empty$
+ { key empty$
+ { cite$ #1 #3 substring$ }
+ 'key
+ if$
+ }
+ { author format.full.names }
+ if$
+}
+
+FUNCTION {editor.key.full}
+{ editor empty$
+ { key empty$
+ { cite$ #1 #3 substring$ }
+ 'key
+ if$
+ }
+ { editor format.full.names }
+ if$
+}
+
+FUNCTION {make.full.names}
+{ type$ "book" =
+ type$ "inbook" =
+ or
+ 'author.editor.key.full
+ { type$ "proceedings" =
+ 'editor.key.full
+ 'author.key.full
+ if$
+ }
+ if$
+}
+
+FUNCTION {output.bibitem}
+{ newline$
+ "\bibitem[{" write$
+ label write$
+ ")" make.full.names duplicate$ short.list =
+ { pop$ }
+ { * }
+ if$
+ "}]{" * write$
+ cite$ write$
+ "}" write$
+ newline$
+ ""
+ before.all 'output.state :=
+}
+
+FUNCTION {if.digit}
+{ duplicate$ "0" =
+ swap$ duplicate$ "1" =
+ swap$ duplicate$ "2" =
+ swap$ duplicate$ "3" =
+ swap$ duplicate$ "4" =
+ swap$ duplicate$ "5" =
+ swap$ duplicate$ "6" =
+ swap$ duplicate$ "7" =
+ swap$ duplicate$ "8" =
+ swap$ "9" = or or or or or or or or or
+}
+FUNCTION {n.separate}
+{ 't :=
+ ""
+ #0 'numnames :=
+ { t empty$ not }
+ { t #-1 #1 substring$ if.digit
+ { numnames #1 + 'numnames := }
+ { #0 'numnames := }
+ if$
+ t #-1 #1 substring$ swap$ *
+ t #-2 global.max$ substring$ 't :=
+ numnames #5 =
+ { duplicate$ #1 #2 substring$ swap$
+ #3 global.max$ substring$
+ "\," swap$ * *
+ }
+ 'skip$
+ if$
+ }
+ while$
+}
+FUNCTION {n.dashify}
+{
+ n.separate
+ 't :=
+ ""
+ { t empty$ not }
+ { t #1 #1 substring$ "-" =
+ { t #1 #2 substring$ "--" = not
+ { "--" *
+ t #2 global.max$ substring$ 't :=
+ }
+ { { t #1 #1 substring$ "-" = }
+ { "-" *
+ t #2 global.max$ substring$ 't :=
+ }
+ while$
+ }
+ if$
+ }
+ { t #1 #1 substring$ *
+ t #2 global.max$ substring$ 't :=
+ }
+ if$
+ }
+ while$
+}
+
+FUNCTION {word.in}
+{ bbl.in
+ " " * }
+
+FUNCTION {format.date}
+{ year "year" bibinfo.check duplicate$ empty$
+ {
+ }
+ 'skip$
+ if$
+ extra.label *
+ before.all 'output.state :=
+ after.sentence 'output.state :=
+}
+FUNCTION {format.btitle}
+{ title "title" bibinfo.check
+ duplicate$ empty$ 'skip$
+ {
+ emphasize
+ select.language
+ }
+ if$
+}
+FUNCTION {either.or.check}
+{ empty$
+ 'pop$
+ { "can't use both " swap$ * " fields in " * cite$ * warning$ }
+ if$
+}
+FUNCTION {format.bvolume}
+{ volume empty$
+ { "" }
+ { bbl.volume volume tie.or.space.prefix
+ "volume" bibinfo.check * *
+ series "series" bibinfo.check
+ duplicate$ empty$ 'pop$
+ { emphasize ", " * swap$ * }
+ if$
+ "volume and number" number either.or.check
+ }
+ if$
+}
+FUNCTION {format.number.series}
+{ volume empty$
+ { number empty$
+ { series field.or.null }
+ { series empty$
+ { number "number" bibinfo.check }
+ { output.state mid.sentence =
+ { bbl.number }
+ { bbl.number capitalize }
+ if$
+ number tie.or.space.prefix "number" bibinfo.check * *
+ bbl.in space.word *
+ series "series" bibinfo.check *
+ }
+ if$
+ }
+ if$
+ }
+ { "" }
+ if$
+}
+FUNCTION {is.num}
+{ chr.to.int$
+ duplicate$ "0" chr.to.int$ < not
+ swap$ "9" chr.to.int$ > not and
+}
+
+FUNCTION {extract.num}
+{ duplicate$ 't :=
+ "" 's :=
+ { t empty$ not }
+ { t #1 #1 substring$
+ t #2 global.max$ substring$ 't :=
+ duplicate$ is.num
+ { s swap$ * 's := }
+ { pop$ "" 't := }
+ if$
+ }
+ while$
+ s empty$
+ 'skip$
+ { pop$ s }
+ if$
+}
+
+FUNCTION {convert.edition}
+{ extract.num "l" change.case$ 's :=
+ s "first" = s "1" = or
+ { bbl.first 't := }
+ { s "second" = s "2" = or
+ { bbl.second 't := }
+ { s "third" = s "3" = or
+ { bbl.third 't := }
+ { s "fourth" = s "4" = or
+ { bbl.fourth 't := }
+ { s "fifth" = s "5" = or
+ { bbl.fifth 't := }
+ { s #1 #1 substring$ is.num
+ { s eng.ord 't := }
+ { edition 't := }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+ t
+}
+
+FUNCTION {format.edition}
+{ edition duplicate$ empty$ 'skip$
+ {
+ convert.edition
+ output.state mid.sentence =
+ { "l" }
+ { "t" }
+ if$ change.case$
+ "edition" bibinfo.check
+ " " * bbl.edition *
+ }
+ if$
+}
+INTEGERS { multiresult }
+FUNCTION {multi.page.check}
+{ 't :=
+ #0 'multiresult :=
+ { multiresult not
+ t empty$ not
+ and
+ }
+ { t #1 #1 substring$
+ duplicate$ "-" =
+ swap$ duplicate$ "," =
+ swap$ "+" =
+ or or
+ { #1 'multiresult := }
+ { t #2 global.max$ substring$ 't := }
+ if$
+ }
+ while$
+ multiresult
+}
+FUNCTION {format.pages}
+{ pages duplicate$ empty$ 'skip$
+ { duplicate$ multi.page.check
+ {
+ bbl.pages swap$
+ n.dashify
+ }
+ {
+ bbl.page swap$
+ }
+ if$
+ tie.or.space.prefix
+ "pages" bibinfo.check
+ * *
+ }
+ if$
+}
+FUNCTION {format.journal.pages}
+{ pages duplicate$ empty$ 'pop$
+ { swap$ duplicate$ empty$
+ { pop$ pop$ format.pages }
+ {
+ ", " *
+ swap$
+ n.dashify
+ pages multi.page.check
+ 'bbl.pages
+ 'bbl.page
+ if$
+ swap$ tie.or.space.prefix
+ "pages" bibinfo.check
+ * *
+ *
+ }
+ if$
+ }
+ if$
+}
+FUNCTION {format.journal.eid}
+{ eid "eid" bibinfo.check
+ duplicate$ empty$ 'pop$
+ { swap$ duplicate$ empty$ 'skip$
+ {
+ ", " *
+ }
+ if$
+ swap$ *
+ }
+ if$
+}
+FUNCTION {format.vol.num.pages}
+{ volume field.or.null
+ duplicate$ empty$ 'skip$
+ {
+ bbl.volume swap$ tie.or.space.prefix
+ "volume" bibinfo.check
+ * *
+ }
+ if$
+ number "number" bibinfo.check duplicate$ empty$ 'skip$
+ {
+ swap$ duplicate$ empty$
+ { "there's a number but no volume in " cite$ * warning$ }
+ 'skip$
+ if$
+ swap$
+ ", " bbl.nr * number tie.or.space.prefix pop$ * swap$ *
+ }
+ if$ *
+}
+
+FUNCTION {format.chapter.pages}
+{ chapter empty$
+ { "" }
+ { type empty$
+ { bbl.chapter }
+ { type "l" change.case$
+ "type" bibinfo.check
+ }
+ if$
+ chapter tie.or.space.prefix
+ "chapter" bibinfo.check
+ * *
+ }
+ if$
+}
+
+FUNCTION {format.booktitle}
+{
+ booktitle "booktitle" bibinfo.check
+ emphasize
+}
+FUNCTION {format.in.ed.booktitle}
+{ format.booktitle duplicate$ empty$ 'skip$
+ {
+ format.bvolume duplicate$ empty$ 'pop$
+ { ", " swap$ * * }
+ if$
+ editor "editor" format.names.ed duplicate$ empty$ 'pop$
+ {
+ bbl.edby
+ " " * swap$ *
+ swap$
+ "," *
+ " " * swap$
+ * }
+ if$
+ word.in swap$ *
+ }
+ if$
+}
+FUNCTION {format.thesis.type}
+{ type duplicate$ empty$
+ 'pop$
+ { swap$ pop$
+ "t" change.case$ "type" bibinfo.check
+ }
+ if$
+}
+FUNCTION {format.tr.number}
+{ number "number" bibinfo.check
+ type duplicate$ empty$
+ { pop$ bbl.techrep }
+ 'skip$
+ if$
+ "type" bibinfo.check
+ swap$ duplicate$ empty$
+ { pop$ "t" change.case$ }
+ { tie.or.space.prefix * * }
+ if$
+}
+FUNCTION {format.article.crossref}
+{
+ word.in
+ " \cite{" * crossref * "}" *
+}
+FUNCTION {format.book.crossref}
+{ volume duplicate$ empty$
+ { "empty volume in " cite$ * "'s crossref of " * crossref * warning$
+ pop$ word.in
+ }
+ { bbl.volume
+ swap$ tie.or.space.prefix "volume" bibinfo.check * * bbl.of space.word *
+ }
+ if$
+ " \cite{" * crossref * "}" *
+}
+FUNCTION {format.incoll.inproc.crossref}
+{
+ word.in
+ " \cite{" * crossref * "}" *
+}
+FUNCTION {format.org.or.pub}
+{ 't :=
+ ""
+ address empty$ t empty$ and
+ 'skip$
+ {
+ t empty$
+ { address "address" bibinfo.check *
+ }
+ { t *
+ address empty$
+ 'skip$
+ { ", " * address "address" bibinfo.check * }
+ if$
+ }
+ if$
+ }
+ if$
+}
+FUNCTION {format.publisher.address}
+{ publisher "publisher" bibinfo.warn format.org.or.pub
+}
+
+FUNCTION {format.organization.address}
+{ organization "organization" bibinfo.check format.org.or.pub
+}
+
+FUNCTION {article}
+{ output.bibitem
+ format.authors "author" output.check
+ author format.key output
+ format.date "year" output.check
+ date.block
+ format.title "title" output.check
+ end.quote.title
+ crossref missing$
+ {
+ journal
+ "journal" bibinfo.check
+ emphasize
+ "journal" output.check
+ format.vol.num.pages output
+ format.doi output
+ }
+ { format.article.crossref output.nonnull
+ }
+ if$
+ eid empty$
+ { format.journal.pages }
+ { format.journal.eid }
+ if$
+ format.issn output
+ new.sentence
+ format.note output
+ fin.entry
+}
+FUNCTION {book}
+{ output.bibitem
+ author empty$
+ { format.editors "author and editor" output.check
+ editor format.key output
+ }
+ { format.authors output.nonnull
+ crossref missing$
+ { "author and editor" editor either.or.check }
+ 'skip$
+ if$
+ }
+ if$
+ format.date "year" output.check
+ date.block
+ format.btitle "title" output.check
+ crossref missing$
+ { format.bvolume output
+ format.edition output
+ format.number.series output
+ format.publisher.address output
+ }
+ {
+ format.book.crossref output.nonnull
+ }
+ if$
+ format.isbn output
+ format.book.pages output
+ format.doi output
+ new.sentence
+ format.note output
+ fin.entry
+}
+FUNCTION {booklet}
+{ output.bibitem
+ format.authors output
+ author format.key output
+ format.date "year" output.check
+ date.block
+ format.title "title" output.check
+ end.quote.title
+ howpublished "howpublished" bibinfo.check output
+ address "address" bibinfo.check output
+ format.isbn output
+ format.book.pages output
+ format.doi output
+ new.sentence
+ format.note output
+ fin.entry
+}
+
+FUNCTION {inbook}
+{ output.bibitem
+ author empty$
+ { format.editors "author and editor" output.check
+ editor format.key output
+ }
+ { format.authors output.nonnull
+ crossref missing$
+ { "author and editor" editor either.or.check }
+ 'skip$
+ if$
+ }
+ if$
+ format.date "year" output.check
+ date.block
+ format.btitle "title" output.check
+ crossref missing$
+ {
+ format.bvolume output
+ format.chapter.pages "chapter and pages" output.check
+ format.edition output
+ format.number.series output
+ format.publisher.address output
+ }
+ {
+ format.chapter.pages "chapter and pages" output.check
+ format.book.crossref output.nonnull
+ }
+ if$
+ crossref missing$
+ { format.isbn output }
+ 'skip$
+ if$
+ format.pages "pages" output.check
+ format.doi output
+ new.sentence
+ format.note output
+ fin.entry
+}
+
+FUNCTION {incollection}
+{ output.bibitem
+ format.authors "author" output.check
+ author format.key output
+ format.date "year" output.check
+ date.block
+ format.title "title" output.check
+ end.quote.title
+ crossref missing$
+ { format.in.ed.booktitle "booktitle" output.check
+ format.edition output
+ format.chapter.pages output
+ format.number.series output
+ format.publisher.address output
+ format.isbn output
+ }
+ { format.incoll.inproc.crossref output.nonnull
+ format.chapter.pages output
+ }
+ if$
+ format.pages "pages" output.check
+ format.doi output
+ new.sentence
+ format.note output
+ fin.entry
+}
+FUNCTION {inproceedings}
+{ output.bibitem
+ format.authors "author" output.check
+ author format.key output
+ format.date "year" output.check
+ date.block
+ format.title "title" output.check
+ end.quote.title
+ crossref missing$
+ { format.in.ed.booktitle "booktitle" output.check
+ format.number.series output
+ publisher empty$
+ { format.organization.address output }
+ { organization "organization" bibinfo.check output
+ format.publisher.address output
+ }
+ if$
+ format.isbn output
+ format.issn output
+ }
+ { format.incoll.inproc.crossref output.nonnull
+ }
+ if$
+ format.pages "pages" output.check
+ format.doi output
+ new.sentence
+ format.note output
+ fin.entry
+}
+FUNCTION {conference} { inproceedings }
+FUNCTION {manual}
+{ output.bibitem
+ format.authors output
+ author format.key output
+ format.date "year" output.check
+ date.block
+ format.btitle "title" output.check
+ organization "organization" bibinfo.check output
+ address "address" bibinfo.check output
+ format.edition output
+ format.doi output
+ new.sentence
+ format.note output
+ fin.entry
+}
+
+FUNCTION {mastersthesis}
+{ output.bibitem
+ format.authors "author" output.check
+ author format.key output
+ format.date "year" output.check
+ date.block
+ format.btitle
+ "title" output.check
+ bbl.mthesis format.thesis.type output.nonnull
+ school "school" bibinfo.warn output
+ address "address" bibinfo.check output
+ format.doi output
+ new.sentence
+ format.note output
+ fin.entry
+}
+
+FUNCTION {misc}
+{ output.bibitem
+ format.authors output
+ author format.key output
+ format.date "year" output.check
+ date.block
+ format.title output
+ end.quote.title
+ howpublished "howpublished" bibinfo.check output
+ format.doi output
+ new.sentence
+ format.note output
+ fin.entry
+}
+FUNCTION {phdthesis}
+{ output.bibitem
+ format.authors "author" output.check
+ author format.key output
+ format.date "year" output.check
+ date.block
+ format.btitle
+ "title" output.check
+ bbl.phdthesis format.thesis.type output.nonnull
+ school "school" bibinfo.warn output
+ address "address" bibinfo.check output
+ format.doi output
+ new.sentence
+ format.note output
+ fin.entry
+}
+
+FUNCTION {proceedings}
+{ output.bibitem
+ format.editors output
+ editor format.key output
+ format.date "year" output.check
+ date.block
+ format.btitle "title" output.check
+ format.bvolume output
+ format.number.series output
+ publisher empty$
+ { format.organization.address output }
+ { organization "organization" bibinfo.check output
+ format.publisher.address output
+ }
+ if$
+ format.isbn output
+ format.issn output
+ format.doi output
+ new.sentence
+ format.note output
+ fin.entry
+}
+
+FUNCTION {techreport}
+{ output.bibitem
+ format.authors "author" output.check
+ author format.key output
+ format.date "year" output.check
+ date.block
+ format.title
+ "title" output.check
+ end.quote.title
+ format.tr.number output.nonnull
+ institution "institution" bibinfo.warn output
+ address "address" bibinfo.check output
+ format.doi output
+ new.sentence
+ format.note output
+ fin.entry
+}
+
+FUNCTION {unpublished}
+{ output.bibitem
+ format.authors "author" output.check
+ author format.key output
+ format.date "year" output.check
+ date.block
+ format.title "title" output.check
+ end.quote.title
+ format.doi output
+ new.sentence
+ format.note "note" output.check
+ fin.entry
+}
+
+FUNCTION {default.type} { misc }
+READ
+FUNCTION {sortify}
+{ purify$
+ "l" change.case$
+}
+INTEGERS { len }
+FUNCTION {chop.word}
+{ 's :=
+ 'len :=
+ s #1 len substring$ =
+ { s len #1 + global.max$ substring$ }
+ 's
+ if$
+}
+FUNCTION {format.lab.names}
+{ 's :=
+ "" 't :=
+ s #1 "{vv~}{ll}" format.name$
+ cite.name.font
+ s num.names$ duplicate$
+ #2 >
+ { pop$
+ " " * bbl.etal *
+ }
+ { #2 <
+ 'skip$
+ { s #2 "{ff }{vv }{ll}{ jj}" format.name$ "others" =
+ {
+ " " * bbl.etal *
+ }
+ { bbl.and space.word * s #2 "{vv~}{ll}" format.name$
+ cite.name.font
+ * }
+ if$
+ }
+ if$
+ }
+ if$
+}
+
+FUNCTION {author.key.label}
+{ author empty$
+ { key empty$
+ { cite$ #1 #3 substring$ }
+ 'key
+ if$
+ }
+ { author format.lab.names }
+ if$
+}
+
+FUNCTION {author.editor.key.label}
+{ author empty$
+ { editor empty$
+ { key empty$
+ { cite$ #1 #3 substring$ }
+ 'key
+ if$
+ }
+ { editor format.lab.names }
+ if$
+ }
+ { author format.lab.names }
+ if$
+}
+
+FUNCTION {editor.key.label}
+{ editor empty$
+ { key empty$
+ { cite$ #1 #3 substring$ }
+ 'key
+ if$
+ }
+ { editor format.lab.names }
+ if$
+}
+
+FUNCTION {calc.short.authors}
+{ type$ "book" =
+ type$ "inbook" =
+ or
+ 'author.editor.key.label
+ { type$ "proceedings" =
+ 'editor.key.label
+ 'author.key.label
+ if$
+ }
+ if$
+ 'short.list :=
+}
+
+FUNCTION {calc.label}
+{ calc.short.authors
+ short.list
+ "("
+ *
+ year duplicate$ empty$
+ { pop$ "" }
+ 'skip$
+ if$
+ *
+ 'label :=
+}
+
+FUNCTION {sort.format.names}
+{ 's :=
+ #1 'nameptr :=
+ ""
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ { s nameptr
+ "{ll{ }}{ f{ }}{ jj{ }}"
+ format.name$ 't :=
+ nameptr #1 >
+ {
+ " " *
+ namesleft #1 = t "others" = and
+ { "zzzzz" 't := }
+ 'skip$
+ if$
+ t sortify *
+ }
+ { t sortify * }
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+}
+
+FUNCTION {sort.format.title}
+{ 't :=
+ "A " #2
+ "An " #3
+ "The " #4 t chop.word
+ chop.word
+ chop.word
+ sortify
+ #1 global.max$ substring$
+}
+FUNCTION {author.sort}
+{ author empty$
+ { key empty$
+ { "to sort, need author or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { author sort.format.names }
+ if$
+}
+FUNCTION {author.editor.sort}
+{ author empty$
+ { editor empty$
+ { key empty$
+ { "to sort, need author, editor, or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { editor sort.format.names }
+ if$
+ }
+ { author sort.format.names }
+ if$
+}
+FUNCTION {editor.sort}
+{ editor empty$
+ { key empty$
+ { "to sort, need editor or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { editor sort.format.names }
+ if$
+}
+FUNCTION {presort}
+{ calc.label
+ label sortify
+ " "
+ *
+ type$ "book" =
+ type$ "inbook" =
+ or
+ 'author.editor.sort
+ { type$ "proceedings" =
+ 'editor.sort
+ 'author.sort
+ if$
+ }
+ if$
+ #1 entry.max$ substring$
+ 'sort.label :=
+ sort.label
+ *
+ " "
+ *
+ title field.or.null
+ sort.format.title
+ *
+ #1 entry.max$ substring$
+ 'sort.key$ :=
+}
+
+ITERATE {presort}
+SORT
+STRINGS { last.label next.extra }
+INTEGERS { last.extra.num last.extra.num.extended last.extra.num.blank number.label }
+FUNCTION {initialize.extra.label.stuff}
+{ #0 int.to.chr$ 'last.label :=
+ "" 'next.extra :=
+ #0 'last.extra.num :=
+ "a" chr.to.int$ #1 - 'last.extra.num.blank :=
+ last.extra.num.blank 'last.extra.num.extended :=
+ #0 'number.label :=
+}
+FUNCTION {forward.pass}
+{ last.label label =
+ { last.extra.num #1 + 'last.extra.num :=
+ last.extra.num "z" chr.to.int$ >
+ { "a" chr.to.int$ 'last.extra.num :=
+ last.extra.num.extended #1 + 'last.extra.num.extended :=
+ }
+ 'skip$
+ if$
+ last.extra.num.extended last.extra.num.blank >
+ { last.extra.num.extended int.to.chr$
+ last.extra.num int.to.chr$
+ * 'extra.label := }
+ { last.extra.num int.to.chr$ 'extra.label := }
+ if$
+ }
+ { "a" chr.to.int$ 'last.extra.num :=
+ "" 'extra.label :=
+ label 'last.label :=
+ }
+ if$
+ number.label #1 + 'number.label :=
+}
+FUNCTION {reverse.pass}
+{ next.extra "b" =
+ { "a" 'extra.label := }
+ 'skip$
+ if$
+ extra.label 'next.extra :=
+ extra.label
+ duplicate$ empty$
+ 'skip$
+ { "{\natexlab{" swap$ * "}}" * }
+ if$
+ 'extra.label :=
+ label extra.label * 'label :=
+}
+EXECUTE {initialize.extra.label.stuff}
+ITERATE {forward.pass}
+REVERSE {reverse.pass}
+FUNCTION {bib.sort.order}
+{ sort.label
+ " "
+ *
+ year field.or.null sortify
+ *
+ " "
+ *
+ title field.or.null
+ sort.format.title
+ *
+ #1 entry.max$ substring$
+ 'sort.key$ :=
+}
+ITERATE {bib.sort.order}
+SORT
+FUNCTION {begin.bib}
+{ preamble$ empty$
+ 'skip$
+ { preamble$ write$ newline$ }
+ if$
+ "\begin{thebibliography}{" number.label int.to.str$ * "}" *
+ write$ newline$
+ "\ProvideTextCommand{\guillemotleft}{OT1}{%"
+ write$ newline$
+ " \leavevmode\raise .27ex\hbox{$\scriptscriptstyle\ll$}}"
+ write$ newline$
+ "\ProvideTextCommand{\guillemotright}{OT1}{%"
+ write$ newline$
+ " \leavevmode\raise .27ex\hbox{$\scriptscriptstyle\gg$}}"
+ write$ newline$
+ "\newcommand{\enquote}[1]{\guillemotleft#1\guillemotright}"
+ write$ newline$
+ "\providecommand{\natexlab}[1]{#1}"
+ write$ newline$
+ "\providecommand{\url}[1]{\texttt{#1}}"
+ write$ newline$
+ "\providecommand{\urlprefix}{URL }"
+ write$ newline$
+ "\expandafter\ifx\csname urlstyle\endcsname\relax"
+ write$ newline$
+ " \providecommand{\doi}[1]{doi:\discretionary{}{}{}#1}\else"
+ write$ newline$
+ " \providecommand{\doi}{doi:\discretionary{}{}{}\begingroup \urlstyle{rm}\Url}\fi"
+ write$ newline$
+ "\providecommand{\selectlanguage}[1]{\relax}"
+ write$ newline$
+ "\input{francaisbst.tex}" write$ newline$
+ "\newcommand{\Capitalize}[1]{\uppercase{#1}}" write$ newline$
+ "\newcommand{\capitalize}[1]{\expandafter\Capitalize#1}" write$ newline$
+}
+EXECUTE {begin.bib}
+EXECUTE {init.state.consts}
+ITERATE {call.type$}
+FUNCTION {end.bib}
+{ newline$
+ "\end{thebibliography}" write$ newline$
+}
+EXECUTE {end.bib}
+%% End of customized bst file
+%%
+%% End of file `francaissc.bst'.
diff --git a/biblio/bibtex/contrib/gbt7714/LICENSE b/biblio/bibtex/contrib/gbt7714/LICENSE
new file mode 100644
index 0000000000..2244313901
--- /dev/null
+++ b/biblio/bibtex/contrib/gbt7714/LICENSE
@@ -0,0 +1,416 @@
+The LaTeX Project Public License
+=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
+
+LPPL Version 1.3c 2008-05-04
+
+Copyright 1999 2002-2008 LaTeX3 Project
+ Everyone is allowed to distribute verbatim copies of this
+ license document, but modification of it is not allowed.
+
+
+PREAMBLE
+========
+
+The LaTeX Project Public License (LPPL) is the primary license under
+which the LaTeX kernel and the base LaTeX packages are distributed.
+
+You may use this license for any work of which you hold the copyright
+and which you wish to distribute. This license may be particularly
+suitable if your work is TeX-related (such as a LaTeX package), but
+it is written in such a way that you can use it even if your work is
+unrelated to TeX.
+
+The section `WHETHER AND HOW TO DISTRIBUTE WORKS UNDER THIS LICENSE',
+below, gives instructions, examples, and recommendations for authors
+who are considering distributing their works under this license.
+
+This license gives conditions under which a work may be distributed
+and modified, as well as conditions under which modified versions of
+that work may be distributed.
+
+We, the LaTeX3 Project, believe that the conditions below give you
+the freedom to make and distribute modified versions of your work
+that conform with whatever technical specifications you wish while
+maintaining the availability, integrity, and reliability of
+that work. If you do not see how to achieve your goal while
+meeting these conditions, then read the document `cfgguide.tex'
+and `modguide.tex' in the base LaTeX distribution for suggestions.
+
+
+DEFINITIONS
+===========
+
+In this license document the following terms are used:
+
+ `Work'
+ Any work being distributed under this License.
+
+ `Derived Work'
+ Any work that under any applicable law is derived from the Work.
+
+ `Modification'
+ Any procedure that produces a Derived Work under any applicable
+ law -- for example, the production of a file containing an
+ original file associated with the Work or a significant portion of
+ such a file, either verbatim or with modifications and/or
+ translated into another language.
+
+ `Modify'
+ To apply any procedure that produces a Derived Work under any
+ applicable law.
+
+ `Distribution'
+ Making copies of the Work available from one person to another, in
+ whole or in part. Distribution includes (but is not limited to)
+ making any electronic components of the Work accessible by
+ file transfer protocols such as FTP or HTTP or by shared file
+ systems such as Sun's Network File System (NFS).
+
+ `Compiled Work'
+ A version of the Work that has been processed into a form where it
+ is directly usable on a computer system. This processing may
+ include using installation facilities provided by the Work,
+ transformations of the Work, copying of components of the Work, or
+ other activities. Note that modification of any installation
+ facilities provided by the Work constitutes modification of the Work.
+
+ `Current Maintainer'
+ A person or persons nominated as such within the Work. If there is
+ no such explicit nomination then it is the `Copyright Holder' under
+ any applicable law.
+
+ `Base Interpreter'
+ A program or process that is normally needed for running or
+ interpreting a part or the whole of the Work.
+
+ A Base Interpreter may depend on external components but these
+ are not considered part of the Base Interpreter provided that each
+ external component clearly identifies itself whenever it is used
+ interactively. Unless explicitly specified when applying the
+ license to the Work, the only applicable Base Interpreter is a
+ `LaTeX-Format' or in the case of files belonging to the
+ `LaTeX-format' a program implementing the `TeX language'.
+
+
+
+CONDITIONS ON DISTRIBUTION AND MODIFICATION
+===========================================
+
+1. Activities other than distribution and/or modification of the Work
+are not covered by this license; they are outside its scope. In
+particular, the act of running the Work is not restricted and no
+requirements are made concerning any offers of support for the Work.
+
+2. You may distribute a complete, unmodified copy of the Work as you
+received it. Distribution of only part of the Work is considered
+modification of the Work, and no right to distribute such a Derived
+Work may be assumed under the terms of this clause.
+
+3. You may distribute a Compiled Work that has been generated from a
+complete, unmodified copy of the Work as distributed under Clause 2
+above, as long as that Compiled Work is distributed in such a way that
+the recipients may install the Compiled Work on their system exactly
+as it would have been installed if they generated a Compiled Work
+directly from the Work.
+
+4. If you are the Current Maintainer of the Work, you may, without
+restriction, modify the Work, thus creating a Derived Work. You may
+also distribute the Derived Work without restriction, including
+Compiled Works generated from the Derived Work. Derived Works
+distributed in this manner by the Current Maintainer are considered to
+be updated versions of the Work.
+
+5. If you are not the Current Maintainer of the Work, you may modify
+your copy of the Work, thus creating a Derived Work based on the Work,
+and compile this Derived Work, thus creating a Compiled Work based on
+the Derived Work.
+
+6. If you are not the Current Maintainer of the Work, you may
+distribute a Derived Work provided the following conditions are met
+for every component of the Work unless that component clearly states
+in the copyright notice that it is exempt from that condition. Only
+the Current Maintainer is allowed to add such statements of exemption
+to a component of the Work.
+
+ a. If a component of this Derived Work can be a direct replacement
+ for a component of the Work when that component is used with the
+ Base Interpreter, then, wherever this component of the Work
+ identifies itself to the user when used interactively with that
+ Base Interpreter, the replacement component of this Derived Work
+ clearly and unambiguously identifies itself as a modified version
+ of this component to the user when used interactively with that
+ Base Interpreter.
+
+ b. Every component of the Derived Work contains prominent notices
+ detailing the nature of the changes to that component, or a
+ prominent reference to another file that is distributed as part
+ of the Derived Work and that contains a complete and accurate log
+ of the changes.
+
+ c. No information in the Derived Work implies that any persons,
+ including (but not limited to) the authors of the original version
+ of the Work, provide any support, including (but not limited to)
+ the reporting and handling of errors, to recipients of the
+ Derived Work unless those persons have stated explicitly that
+ they do provide such support for the Derived Work.
+
+ d. You distribute at least one of the following with the Derived Work:
+
+ 1. A complete, unmodified copy of the Work;
+ if your distribution of a modified component is made by
+ offering access to copy the modified component from a
+ designated place, then offering equivalent access to copy
+ the Work from the same or some similar place meets this
+ condition, even though third parties are not compelled to
+ copy the Work along with the modified component;
+
+ 2. Information that is sufficient to obtain a complete,
+ unmodified copy of the Work.
+
+7. If you are not the Current Maintainer of the Work, you may
+distribute a Compiled Work generated from a Derived Work, as long as
+the Derived Work is distributed to all recipients of the Compiled
+Work, and as long as the conditions of Clause 6, above, are met with
+regard to the Derived Work.
+
+8. The conditions above are not intended to prohibit, and hence do not
+apply to, the modification, by any method, of any component so that it
+becomes identical to an updated version of that component of the Work as
+it is distributed by the Current Maintainer under Clause 4, above.
+
+9. Distribution of the Work or any Derived Work in an alternative
+format, where the Work or that Derived Work (in whole or in part) is
+then produced by applying some process to that format, does not relax or
+nullify any sections of this license as they pertain to the results of
+applying that process.
+
+10. a. A Derived Work may be distributed under a different license
+ provided that license itself honors the conditions listed in
+ Clause 6 above, in regard to the Work, though it does not have
+ to honor the rest of the conditions in this license.
+
+ b. If a Derived Work is distributed under a different license, that
+ Derived Work must provide sufficient documentation as part of
+ itself to allow each recipient of that Derived Work to honor the
+ restrictions in Clause 6 above, concerning changes from the Work.
+
+11. This license places no restrictions on works that are unrelated to
+the Work, nor does this license place any restrictions on aggregating
+such works with the Work by any means.
+
+12. Nothing in this license is intended to, or may be used to, prevent
+complete compliance by all parties with all applicable laws.
+
+
+NO WARRANTY
+===========
+
+There is no warranty for the Work. Except when otherwise stated in
+writing, the Copyright Holder provides the Work `as is', without
+warranty of any kind, either expressed or implied, including, but not
+limited to, the implied warranties of merchantability and fitness for a
+particular purpose. The entire risk as to the quality and performance
+of the Work is with you. Should the Work prove defective, you assume
+the cost of all necessary servicing, repair, or correction.
+
+In no event unless required by applicable law or agreed to in writing
+will The Copyright Holder, or any author named in the components of the
+Work, or any other party who may distribute and/or modify the Work as
+permitted above, be liable to you for damages, including any general,
+special, incidental or consequential damages arising out of any use of
+the Work or out of inability to use the Work (including, but not limited
+to, loss of data, data being rendered inaccurate, or losses sustained by
+anyone as a result of any failure of the Work to operate with any other
+programs), even if the Copyright Holder or said author or said other
+party has been advised of the possibility of such damages.
+
+
+MAINTENANCE OF THE WORK
+=======================
+
+The Work has the status `author-maintained' if the Copyright Holder
+explicitly and prominently states near the primary copyright notice in
+the Work that the Work can only be maintained by the Copyright Holder
+or simply that it is `author-maintained'.
+
+The Work has the status `maintained' if there is a Current Maintainer
+who has indicated in the Work that they are willing to receive error
+reports for the Work (for example, by supplying a valid e-mail
+address). It is not required for the Current Maintainer to acknowledge
+or act upon these error reports.
+
+The Work changes from status `maintained' to `unmaintained' if there
+is no Current Maintainer, or the person stated to be Current
+Maintainer of the work cannot be reached through the indicated means
+of communication for a period of six months, and there are no other
+significant signs of active maintenance.
+
+You can become the Current Maintainer of the Work by agreement with
+any existing Current Maintainer to take over this role.
+
+If the Work is unmaintained, you can become the Current Maintainer of
+the Work through the following steps:
+
+ 1. Make a reasonable attempt to trace the Current Maintainer (and
+ the Copyright Holder, if the two differ) through the means of
+ an Internet or similar search.
+
+ 2. If this search is successful, then enquire whether the Work
+ is still maintained.
+
+ a. If it is being maintained, then ask the Current Maintainer
+ to update their communication data within one month.
+
+ b. If the search is unsuccessful or no action to resume active
+ maintenance is taken by the Current Maintainer, then announce
+ within the pertinent community your intention to take over
+ maintenance. (If the Work is a LaTeX work, this could be
+ done, for example, by posting to comp.text.tex.)
+
+ 3a. If the Current Maintainer is reachable and agrees to pass
+ maintenance of the Work to you, then this takes effect
+ immediately upon announcement.
+
+ b. If the Current Maintainer is not reachable and the Copyright
+ Holder agrees that maintenance of the Work be passed to you,
+ then this takes effect immediately upon announcement.
+
+ 4. If you make an `intention announcement' as described in 2b. above
+ and after three months your intention is challenged neither by
+ the Current Maintainer nor by the Copyright Holder nor by other
+ people, then you may arrange for the Work to be changed so as
+ to name you as the (new) Current Maintainer.
+
+ 5. If the previously unreachable Current Maintainer becomes
+ reachable once more within three months of a change completed
+ under the terms of 3b) or 4), then that Current Maintainer must
+ become or remain the Current Maintainer upon request provided
+ they then update their communication data within one month.
+
+A change in the Current Maintainer does not, of itself, alter the fact
+that the Work is distributed under the LPPL license.
+
+If you become the Current Maintainer of the Work, you should
+immediately provide, within the Work, a prominent and unambiguous
+statement of your status as Current Maintainer. You should also
+announce your new status to the same pertinent community as
+in 2b) above.
+
+
+WHETHER AND HOW TO DISTRIBUTE WORKS UNDER THIS LICENSE
+======================================================
+
+This section contains important instructions, examples, and
+recommendations for authors who are considering distributing their
+works under this license. These authors are addressed as `you' in
+this section.
+
+Choosing This License or Another License
+----------------------------------------
+
+If for any part of your work you want or need to use *distribution*
+conditions that differ significantly from those in this license, then
+do not refer to this license anywhere in your work but, instead,
+distribute your work under a different license. You may use the text
+of this license as a model for your own license, but your license
+should not refer to the LPPL or otherwise give the impression that
+your work is distributed under the LPPL.
+
+The document `modguide.tex' in the base LaTeX distribution explains
+the motivation behind the conditions of this license. It explains,
+for example, why distributing LaTeX under the GNU General Public
+License (GPL) was considered inappropriate. Even if your work is
+unrelated to LaTeX, the discussion in `modguide.tex' may still be
+relevant, and authors intending to distribute their works under any
+license are encouraged to read it.
+
+A Recommendation on Modification Without Distribution
+-----------------------------------------------------
+
+It is wise never to modify a component of the Work, even for your own
+personal use, without also meeting the above conditions for
+distributing the modified component. While you might intend that such
+modifications will never be distributed, often this will happen by
+accident -- you may forget that you have modified that component; or
+it may not occur to you when allowing others to access the modified
+version that you are thus distributing it and violating the conditions
+of this license in ways that could have legal implications and, worse,
+cause problems for the community. It is therefore usually in your
+best interest to keep your copy of the Work identical with the public
+one. Many works provide ways to control the behavior of that work
+without altering any of its licensed components.
+
+How to Use This License
+-----------------------
+
+To use this license, place in each of the components of your work both
+an explicit copyright notice including your name and the year the work
+was authored and/or last substantially modified. Include also a
+statement that the distribution and/or modification of that
+component is constrained by the conditions in this license.
+
+Here is an example of such a notice and statement:
+
+ %% pig.dtx
+ %% Copyright 2005 M. Y. Name
+ %
+ % This work may be distributed and/or modified under the
+ % conditions of the LaTeX Project Public License, either version 1.3
+ % of this license or (at your option) any later version.
+ % The latest version of this license is in
+ % http://www.latex-project.org/lppl.txt
+ % and version 1.3 or later is part of all distributions of LaTeX
+ % version 2005/12/01 or later.
+ %
+ % This work has the LPPL maintenance status `maintained'.
+ %
+ % The Current Maintainer of this work is M. Y. Name.
+ %
+ % This work consists of the files pig.dtx and pig.ins
+ % and the derived file pig.sty.
+
+Given such a notice and statement in a file, the conditions
+given in this license document would apply, with the `Work' referring
+to the three files `pig.dtx', `pig.ins', and `pig.sty' (the last being
+generated from `pig.dtx' using `pig.ins'), the `Base Interpreter'
+referring to any `LaTeX-Format', and both `Copyright Holder' and
+`Current Maintainer' referring to the person `M. Y. Name'.
+
+If you do not want the Maintenance section of LPPL to apply to your
+Work, change `maintained' above into `author-maintained'.
+However, we recommend that you use `maintained', as the Maintenance
+section was added in order to ensure that your Work remains useful to
+the community even when you can no longer maintain and support it
+yourself.
+
+Derived Works That Are Not Replacements
+---------------------------------------
+
+Several clauses of the LPPL specify means to provide reliability and
+stability for the user community. They therefore concern themselves
+with the case that a Derived Work is intended to be used as a
+(compatible or incompatible) replacement of the original Work. If
+this is not the case (e.g., if a few lines of code are reused for a
+completely different task), then clauses 6b and 6d shall not apply.
+
+
+Important Recommendations
+-------------------------
+
+ Defining What Constitutes the Work
+
+ The LPPL requires that distributions of the Work contain all the
+ files of the Work. It is therefore important that you provide a
+ way for the licensee to determine which files constitute the Work.
+ This could, for example, be achieved by explicitly listing all the
+ files of the Work near the copyright notice of each file or by
+ using a line such as:
+
+ % This work consists of all files listed in manifest.txt.
+
+ in that place. In the absence of an unequivocal list it might be
+ impossible for the licensee to determine what is considered by you
+ to comprise the Work and, in such a case, the licensee would be
+ entitled to make reasonable conjectures as to which files comprise
+ the Work.
+
diff --git a/biblio/bibtex/contrib/gbt7714/README.md b/biblio/bibtex/contrib/gbt7714/README.md
new file mode 100644
index 0000000000..81fb4fb9c9
--- /dev/null
+++ b/biblio/bibtex/contrib/gbt7714/README.md
@@ -0,0 +1,163 @@
+# GB/T 7714-2015 BibTeX Style
+
+
+[![CTAN](https://img.shields.io/ctan/v/gbt7714.svg)](https://ctan.org/pkg/gbt7714)
+[![GitHub release](https://img.shields.io/github/release/CTeX-org/gbt7714-bibtex-style/all.svg)](https://github.com/CTeX-org/gbt7714-bibtex-style/releases/latest)
+[![GitHub commits](https://img.shields.io/github/commits-since/CTeX-org/gbt7714-bibtex-style/latest.svg)](https://github.com/CTeX-org/gbt7714-bibtex-style/commits/master)
+[![Travis build](https://travis-ci.org/CTeX-org/gbt7714-bibtex-style.svg?branch=master)](https://travis-ci.org/CTeX-org/gbt7714-bibtex-style)
+
+
+## Introduction
+
+The `gbt7714` package provides a BibTeX implementation for the China's
+bibliography style standard GB/T 7714-2015.
+It consists of two `bst` files for numerical and authoryear styles as well as a
+LaTeX package which provides the citation style defined in the standard.
+It is compatible with `natbib` and supports language detection (Chinese
+and English) for each biblilography entry.
+
+- Homepage: https://github.com/CTeX-org/gbt7714-bibtex-style
+- Maintainer: Zeping Lee
+- Email: zeinglee AT gmail DOT com
+- License: LaTeX Project Public License 1.3c or later
+
+## 新特性
+
+- 兼容 `natbib`
+- 支持顺序编码制和著者-出版年制两种风格
+- 自动识别语言并进行相应处理
+- 提供了简单的接口供用户修改样式
+
+
+## 使用方法
+
+1. 将 `bst` 文件和 `sty` 文件复制到工作目录。
+
+2. 在导言区调用宏包 `gbt7714`,可选的参数如下表。
+ 默认的参数是 `super`,额外的参数会传递给 `natbib` 宏包。
+
+可选参数 | 引用标注 | 参考文献列表
+--- | --- | ---
+`super`(默认) | 角标数字 | 顺序编码
+`numbers` | 数字 | 顺序编码
+`authoryear` | 著者-出版年 | 著者-出版年
+`2015`(默认) | - | GB/T 7714-2015 版
+`2005` | - | GB/T 7714-2005 版
+
+比如: `\usepackage[authoryear]{gbt7714}`
+
+3. 在正文中 `\cite` 文献。
+
+4. 使用 `\bibliography` 命令生成参考文献表。
+
+
+## 注意事项
+
+1. **不再**需要调用 `\bibliographystyle` 命令。
+2. `bib` 数据库应使用 UTF-8 编码。
+3. 使用著者-出版年制参考文献表时,中文的文献**必须**在 `key` 域填写
+著者姓名的拼音,才能按照拼音排序,比如:
+```
+@book{capital,
+ author = {马克思 and 恩格斯},
+ key = {ma3 ke4 si1 en1 ge2 si1},
+ ...
+```
+
+同一处引用多篇文献时,应将各篇文献的 key 一同写在 `\cite` 命令中,
+如 `\cite{knuth84,lamport94,mittelbach04}`。
+如遇连续编号,可以自动转为起讫序号并用短横线连接。
+它可以自动排序并用处理连续编号。
+
+若需要标出引文的页码,可以标在 `\cite` 的可选参数中,如 `\cite[42]{knuth84}`。
+
+更多的引用标注方法可以参考 `natbib` 宏包的使用说明。
+
+本宏包默认情况下可以自动识别文献语言,并自动处理文献类型和载体类型标识,
+但是在少数情况下需要用户手动指定,如:
+```
+@misc{citekey,
+ language = {japanese},
+ mark = {Z},
+ medium = {DK},
+ ...
+```
+可选的语言有 `english`, `chinese`, `japanese`, `russian`。
+
+
+## 文献类型
+
+文献类型 | 标识代码 | Entry Type
+--- | :---: | ---
+普通图书 | M | `book`
+图书的析出文献 | M | `incollection`
+会议录 | C | `proceedings`
+会议录的析出文献 | C | `inproceedings` 或 `conference`
+汇编 | G | `collection`\*
+报纸 | N | `newspaper`\*
+期刊的析出文献 | J | `article`
+学位论文 | D | `mastersthesis` 或 `phdthesis`
+报告 | R | `techreport`
+标准 | S | `standard`\*
+专利 | P | `patent`\*
+数据库 | DB | `database`\*
+计算机程序 | CP | `software`\*
+电子公告 | EB | `online`\*
+档案 | A | `archive`\*
+舆图 | CM | `map`\*
+数据集 | DS | `dataset`\*
+其他 | Z | `misc`
+
+注:
+- 带 “\*” 的类型不是 BibTeX 的标准文献类型。
+
+
+## 著录项目
+
+著录项目(域) | Entry Field
+--- | ---
+主要责任者 | `author`
+题名 | `title`
+文献类型标识 | `mark`\*
+载体类型标识 | `medium`\*
+翻译者 | `translator`\*
+编辑 | `editor`
+组织(用于会议) | `organization`
+图书题名 | `booktitle`
+系列 | `series`
+期刊题名 | `journal`
+版本 | `edition`
+出版地 | `address`
+出版者 | `publisher`
+学校(用于phdthesis) | `school`
+机构(用于techreport) | `institution`
+出版年 | `year`
+卷 | `volume`
+期(或者专利号) | `number`
+引文页码 | `pages`
+更新或修改日期 | `date`\*
+引用日期 | `urldate`\*
+获取和访问路径 | `url`
+数字对象唯一标识符 | `doi`
+语言 | `language`\*
+拼音(用于排序) | `key`
+
+注:
+- 其中带星号的不是 BibTeX/natbib 的标准著录项目。
+- 不支持的 BibTeX 标准著录项目有 `annote`, `chapter`, `crossref`, `month`,
+`type`。
+
+## 参考文献著录标准
+
+- [GB/T 7714-2015 信息与文献 参考文献著录规则.pdf](https://github.com/Haixing-Hu/GBT7714-2005-BibTeX-Style/files/153951/GBT.7714-2015.pdf)
+- [GB/T 7714-2005 文后参考文献著录规则.pdf](https://github.com/Haixing-Hu/typesetting-standard/raw/master/%E5%9B%BE%E4%B9%A6%E3%80%81%E6%9C%9F%E5%88%8A%E3%80%81%E8%AE%BA%E6%96%87%E7%9A%84%E7%BC%96%E6%8E%92/%E3%80%90GB:T%207714-2005%E3%80%91%E6%96%87%E5%90%8E%E5%8F%82%E8%80%83%E6%96%87%E7%8C%AE%E8%91%97%E5%BD%95%E8%A7%84%E5%88%99.pdf)
+
+
+## 相关项目
+
+- 胡振震 [hushidong/biblatex-gb7714-2015](https://github.com/hushidong/biblatex-gb7714-2015)
+- 沈周 [szsdk/biblatex-gbt77142005](https://github.com/szsdk/biblatex-gbt77142005)
+- 胡海星 [Haixing-Hu/GBT7714-2005-BibTeX-Style](https://github.com/Haixing-Hu/GBT7714-2005-BibTeX-Style)
+- 李志奇 [基于biblatex的符合GBT7714-2005的中文文献生成工具](http://bbs.ctex.org/forum.php?mod=viewthread&tid=74474)
+- Casper Ti. Vector [CasperVector/biblatex-caspervector](https://github.com/CasperVector/biblatex-caspervector)
+- 吴凯 [发布GBT7714-2005.bst version1 Beta版](http://bbs.ctex.org/forum.php?mod=viewthread&tid=33591)
diff --git a/biblio/bibtex/contrib/gbt7714/gbt7714-plain.bst b/biblio/bibtex/contrib/gbt7714/gbt7714-plain.bst
new file mode 100644
index 0000000000..5e9aee9bb1
--- /dev/null
+++ b/biblio/bibtex/contrib/gbt7714/gbt7714-plain.bst
@@ -0,0 +1,2043 @@
+%%
+%% This is file `gbt7714-plain.bst',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% gbt7714.dtx (with options: `2015,authoryear')
+%% -------------------------------------------------------------------
+%% GB/T 7714-2015 BibTeX Style
+%% https://github.com/CTeX-org/gbt7714-bibtex-style
+%% Version: 2019/03/21 v1.1.1
+%% -------------------------------------------------------------------
+%% Copyright (C) 2016-2019 by Zeping Lee <zepinglee AT gmail.com>
+%% -------------------------------------------------------------------
+%% This file may be distributed and/or modified under the
+%% conditions of the LaTeX Project Public License, either version 1.3c
+%% of this license or (at your option) any later version.
+%% The latest version of this license is in
+%% https://www.latex-project.org/lppl.txt
+%% and version 1.3c or later is part of all distributions of LaTeX
+%% version 2005/12/01 or later.
+%% -------------------------------------------------------------------
+INTEGERS {
+ uppercase.name
+ max.num.authors
+ period.between.author.year
+ sentence.case.title
+ link.title
+ show.mark
+ slash.for.extraction
+ in.booktitle
+ italic.jounal
+ bold.journal.volume
+ show.missing.address.publisher
+ show.url
+ show.doi
+ show.note
+ lang.zh.order
+ lang.ja.order
+ lang.en.order
+ lang.ru.order
+ lang.other.order
+}
+
+FUNCTION {load.config}
+{
+ #1 'uppercase.name :=
+ #3 'max.num.authors :=
+ #0 'period.between.author.year :=
+ #1 'sentence.case.title :=
+ #0 'link.title :=
+ #1 'show.mark :=
+ #1 'slash.for.extraction :=
+ #0 'in.booktitle :=
+ #0 'italic.jounal :=
+ #0 'bold.journal.volume :=
+ #1 'show.missing.address.publisher :=
+ #1 'show.url :=
+ #1 'show.doi :=
+ #0 'show.note :=
+ #1 'lang.zh.order :=
+ #2 'lang.ja.order :=
+ #3 'lang.en.order :=
+ #4 'lang.ru.order :=
+ #5 'lang.other.order :=
+}
+
+ENTRY
+ { address
+ author
+ booktitle
+ date
+ doi
+ edition
+ editor
+ howpublished
+ institution
+ journal
+ key
+ language
+ mark
+ medium
+ note
+ number
+ organization
+ pages
+ publisher
+ school
+ series
+ title
+ translator
+ url
+ urldate
+ volume
+ year
+ }
+ { entry.lang entry.is.electronic entry.numbered }
+ { label extra.label sort.label short.list entry.mark entry.url }
+
+INTEGERS { output.state before.all mid.sentence after.sentence after.block after.slash }
+
+INTEGERS { lang.zh lang.ja lang.en lang.ru lang.other }
+
+INTEGERS { charptr len }
+
+FUNCTION {init.state.consts}
+{ #0 'before.all :=
+ #1 'mid.sentence :=
+ #2 'after.sentence :=
+ #3 'after.block :=
+ #4 'after.slash :=
+ #3 'lang.zh :=
+ #4 'lang.ja :=
+ #1 'lang.en :=
+ #2 'lang.ru :=
+ #0 'lang.other :=
+}
+
+FUNCTION {bbl.anonymous}
+{ entry.lang lang.zh =
+ { "佚名" }
+ { "Anon" }
+ if$
+}
+
+FUNCTION {bbl.space}
+{ entry.lang lang.zh =
+ { "\ " }
+ { " " }
+ if$
+}
+
+FUNCTION {bbl.et.al}
+{ entry.lang lang.zh =
+ { "等" }
+ { entry.lang lang.ja =
+ { "他" }
+ { entry.lang lang.ru =
+ { "идр" }
+ { "et~al." }
+ if$
+ }
+ if$
+ }
+ if$
+}
+
+FUNCTION {citation.et.al}
+{ bbl.et.al }
+
+FUNCTION {bbl.colon} { ": " }
+
+FUNCTION {bbl.wide.space} { "\quad " }
+
+FUNCTION {bbl.slash} { "//\allowbreak " }
+
+FUNCTION {bbl.sine.loco}
+{ entry.lang lang.zh =
+ { "[出版地不详]" }
+ { "[S.l.]" }
+ if$
+}
+
+FUNCTION {bbl.sine.nomine}
+{ entry.lang lang.zh =
+ { "[出版者不详]" }
+ { "[s.n.]" }
+ if$
+}
+
+FUNCTION {bbl.sine.loco.sine.nomine}
+{ entry.lang lang.zh =
+ { "[出版地不详: 出版者不详]" }
+ { "[S.l.: s.n.]" }
+ if$
+}
+
+FUNCTION {not}
+{ { #0 }
+ { #1 }
+ if$
+}
+
+FUNCTION {and}
+{ 'skip$
+ { pop$ #0 }
+ if$
+}
+
+FUNCTION {or}
+{ { pop$ #1 }
+ 'skip$
+ if$
+}
+
+STRINGS { s t }
+
+FUNCTION {output.nonnull}
+{ 's :=
+ output.state mid.sentence =
+ { ", " * write$ }
+ { output.state after.block =
+ { add.period$ write$
+ newline$
+ "\newblock " write$
+ }
+ { output.state before.all =
+ 'write$
+ { output.state after.slash =
+ { bbl.slash * write$
+ newline$
+ }
+ { add.period$ " " * write$ }
+ if$
+ }
+ if$
+ }
+ if$
+ mid.sentence 'output.state :=
+ }
+ if$
+ s
+}
+
+FUNCTION {output}
+{ duplicate$ empty$
+ 'pop$
+ 'output.nonnull
+ if$
+}
+
+FUNCTION {output.after}
+{ 't :=
+ duplicate$ empty$
+ 'pop$
+ { 's :=
+ output.state mid.sentence =
+ { t * write$ }
+ { output.state after.block =
+ { add.period$ write$
+ newline$
+ "\newblock " write$
+ }
+ { output.state before.all =
+ 'write$
+ { output.state after.slash =
+ { bbl.slash * write$ }
+ { add.period$ " " * write$ }
+ if$
+ }
+ if$
+ }
+ if$
+ mid.sentence 'output.state :=
+ }
+ if$
+ s
+ }
+ if$
+}
+
+FUNCTION {output.check}
+{ 't :=
+ duplicate$ empty$
+ { pop$ "empty " t * " in " * cite$ * warning$ }
+ 'output.nonnull
+ if$
+}
+
+FUNCTION {fin.entry}
+{ add.period$
+ write$
+ newline$
+}
+
+FUNCTION {new.block}
+{ output.state before.all =
+ 'skip$
+ { output.state after.slash =
+ 'skip$
+ { after.block 'output.state := }
+ if$
+ }
+ if$
+}
+
+FUNCTION {new.sentence}
+{ output.state after.block =
+ 'skip$
+ { output.state before.all =
+ 'skip$
+ { output.state after.slash =
+ 'skip$
+ { after.sentence 'output.state := }
+ if$
+ }
+ if$
+ }
+ if$
+}
+
+FUNCTION {new.slash}
+{ output.state before.all =
+ 'skip$
+ { slash.for.extraction
+ { after.slash 'output.state := }
+ { after.block 'output.state := }
+ if$
+ }
+ if$
+}
+
+FUNCTION {new.block.checka}
+{ empty$
+ 'skip$
+ 'new.block
+ if$
+}
+
+FUNCTION {new.block.checkb}
+{ empty$
+ swap$ empty$
+ and
+ 'skip$
+ 'new.block
+ if$
+}
+
+FUNCTION {new.sentence.checka}
+{ empty$
+ 'skip$
+ 'new.sentence
+ if$
+}
+
+FUNCTION {new.sentence.checkb}
+{ empty$
+ swap$ empty$
+ and
+ 'skip$
+ 'new.sentence
+ if$
+}
+
+FUNCTION {field.or.null}
+{ duplicate$ empty$
+ { pop$ "" }
+ 'skip$
+ if$
+}
+
+FUNCTION {italicize}
+{ duplicate$ empty$
+ { pop$ "" }
+ { "\textit{" swap$ * "}" * }
+ if$
+}
+
+INTEGERS { byte second.byte }
+
+INTEGERS { char.lang tmp.lang }
+
+STRINGS { tmp.str }
+
+FUNCTION {get.str.lang}
+{ 'tmp.str :=
+ lang.other 'tmp.lang :=
+ #1 'charptr :=
+ tmp.str text.length$ #1 + 'len :=
+ { charptr len < }
+ { tmp.str charptr #1 substring$ chr.to.int$ 'byte :=
+ byte #128 <
+ { charptr #1 + 'charptr :=
+ byte #64 > byte #91 < and byte #96 > byte #123 < and or
+ { lang.en 'char.lang := }
+ { lang.other 'char.lang := }
+ if$
+ }
+ { tmp.str charptr #1 + #1 substring$ chr.to.int$ 'second.byte :=
+ byte #224 <
+ { charptr #2 + 'charptr :=
+ byte #207 > byte #212 < and
+ byte #212 = second.byte #176 < and or
+ { lang.ru 'char.lang := }
+ { lang.other 'char.lang := }
+ if$
+ }
+ { byte #240 <
+ { charptr #3 + 'charptr :=
+ byte #227 > byte #234 < and
+ { lang.zh 'char.lang := }
+ { byte #227 =
+ { second.byte #143 >
+ { lang.zh 'char.lang := }
+ { second.byte #128 > second.byte #132 < and
+ { lang.ja 'char.lang := }
+ { lang.other 'char.lang := }
+ if$
+ }
+ if$
+ }
+ { byte #239 =
+ second.byte #163 > second.byte #172 < and and
+ { lang.zh 'char.lang := }
+ { lang.other 'char.lang := }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ { charptr #4 + 'charptr :=
+ byte #240 = second.byte #159 > and
+ { lang.zh 'char.lang := }
+ { lang.other 'char.lang := }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+ char.lang tmp.lang >
+ { char.lang 'tmp.lang := }
+ 'skip$
+ if$
+ }
+ while$
+ tmp.lang
+}
+
+FUNCTION {check.entry.lang}
+{ author field.or.null
+ title field.or.null *
+ get.str.lang
+}
+
+FUNCTION {set.entry.lang}
+{ language empty$
+ { check.entry.lang }
+ { language "english" = language "american" = or language "british" = or
+ { lang.en }
+ { language "chinese" =
+ { lang.zh }
+ { language "japanese" =
+ { lang.ja }
+ { language "russian" =
+ { lang.ru }
+ { check.entry.lang }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+ 'entry.lang :=
+}
+
+FUNCTION {set.entry.numbered}
+{ type$ "patent" =
+ type$ "standard" = or
+ type$ "techreport" = or
+ { #1 'entry.numbered := }
+ { #0 'entry.numbered := }
+ if$
+}
+
+INTEGERS { nameptr namesleft numnames name.lang }
+
+FUNCTION {format.names}
+{ 's :=
+ #1 'nameptr :=
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ { s nameptr "{vv~}{ll}{, jj}{, ff}" format.name$ 't :=
+ nameptr max.num.authors >
+ { bbl.et.al
+ #1 'namesleft :=
+ }
+ { t "others" =
+ { bbl.et.al }
+ { t get.str.lang 'name.lang :=
+ name.lang lang.en =
+ { t #1 "{vv~}{ll}{~f{~}}" format.name$
+ uppercase.name
+ { "u" change.case$ }
+ 'skip$
+ if$
+ t #1 "{, jj}" format.name$ *
+ }
+ { t #1 "{ll}{ff}" format.name$ }
+ if$
+ }
+ if$
+ }
+ if$
+ nameptr #1 >
+ { ", " swap$ * * }
+ 'skip$
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+}
+
+FUNCTION {format.key}
+{ empty$
+ { key field.or.null }
+ { "" }
+ if$
+}
+
+FUNCTION {format.authors}
+{ author empty$ not
+ { author format.names }
+ { "empty author in " cite$ * warning$
+ bbl.anonymous
+ }
+ if$
+}
+
+FUNCTION {format.editors}
+{ editor empty$
+ { "" }
+ { editor format.names }
+ if$
+}
+
+FUNCTION {format.translators}
+{ translator empty$
+ { "" }
+ { translator format.names
+ entry.lang lang.zh =
+ { translator num.names$ #3 >
+ { "译" * }
+ { ", 译" * }
+ if$
+ }
+ 'skip$
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.full.names}
+{'s :=
+ #1 'nameptr :=
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ { s nameptr "{vv~}{ll}{, jj}{, ff}" format.name$ 't :=
+ t get.str.lang 'name.lang :=
+ name.lang lang.en =
+ { t #1 "{vv~}{ll}" format.name$ 't := }
+ { t #1 "{ll}{ff}" format.name$ 't := }
+ if$
+ nameptr #1 >
+ {
+ namesleft #1 >
+ { ", " * t * }
+ {
+ numnames #2 >
+ { "," * }
+ 'skip$
+ if$
+ t "others" =
+ { " et~al." * }
+ { " and " * t * }
+ if$
+ }
+ if$
+ }
+ 't
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+}
+
+FUNCTION {author.editor.full}
+{ author empty$
+ { editor empty$
+ { "" }
+ { editor format.full.names }
+ if$
+ }
+ { author format.full.names }
+ if$
+}
+
+FUNCTION {author.full}
+{ author empty$
+ { "" }
+ { author format.full.names }
+ if$
+}
+
+FUNCTION {editor.full}
+{ editor empty$
+ { "" }
+ { editor format.full.names }
+ if$
+}
+
+FUNCTION {make.full.names}
+{ type$ "book" =
+ type$ "inbook" =
+ or
+ 'author.editor.full
+ { type$ "collection" =
+ type$ "proceedings" =
+ or
+ 'editor.full
+ 'author.full
+ if$
+ }
+ if$
+}
+
+FUNCTION {output.bibitem}
+{ newline$
+ "\bibitem[" write$
+ label write$
+ ")" make.full.names duplicate$ short.list =
+ { pop$ }
+ { * }
+ if$
+ 's :=
+ s text.length$ 'charptr :=
+ { charptr #0 > }
+ { s charptr #1 substring$ "]" =
+ { #0 'charptr := }
+ { charptr #1 - 'charptr := }
+ if$
+ }
+ while$
+ charptr #0 >
+ { "{" s * "}" * }
+ { s }
+ if$
+ "]{" * write$
+ cite$ write$
+ "}" write$
+ newline$
+ ""
+ before.all 'output.state :=
+}
+
+FUNCTION {change.sentence.case}
+{ entry.lang lang.en =
+ { "t" change.case$ }
+ 'skip$
+ if$
+}
+
+FUNCTION {add.link}
+{ url empty$ not
+ { "\href{" url * "}{" * swap$ * "}" * }
+ { doi empty$ not
+ { "\href{http://dx.doi.org/" doi * "}{" * swap$ * "}" * }
+ 'skip$
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.title}
+{ title empty$
+ { "" }
+ { title
+ sentence.case.title
+ 'change.sentence.case
+ 'skip$
+ if$
+ entry.numbered number empty$ not and
+ { bbl.colon * number * }
+ 'skip$
+ if$
+ link.title
+ 'add.link
+ 'skip$
+ if$
+ }
+ if$
+}
+
+FUNCTION {tie.or.space.connect}
+{ duplicate$ text.length$ #3 <
+ { "~" }
+ { " " }
+ if$
+ swap$ * *
+}
+
+FUNCTION {either.or.check}
+{ empty$
+ 'pop$
+ { "can't use both " swap$ * " fields in " * cite$ * warning$ }
+ if$
+}
+
+FUNCTION {is.digit}
+{ duplicate$ empty$
+ { pop$ #0 }
+ { chr.to.int$
+ duplicate$ "0" chr.to.int$ <
+ { pop$ #0 }
+ { "9" chr.to.int$ >
+ { #0 }
+ { #1 }
+ if$
+ }
+ if$
+ }
+ if$
+}
+
+FUNCTION {is.number}
+{ 's :=
+ s empty$
+ { #0 }
+ { s text.length$ 'charptr :=
+ { charptr #0 >
+ s charptr #1 substring$ is.digit
+ and
+ }
+ { charptr #1 - 'charptr := }
+ while$
+ charptr not
+ }
+ if$
+}
+
+FUNCTION {format.volume}
+{ volume empty$ not
+ { volume is.number
+ { entry.lang lang.zh =
+ { "第 " volume * " 卷" * }
+ { "volume" volume tie.or.space.connect }
+ if$
+ }
+ { volume }
+ if$
+ }
+ { "" }
+ if$
+}
+
+FUNCTION {format.number}
+{ number empty$ not
+ { number is.number
+ { entry.lang lang.zh =
+ { "第 " number * " 册" * }
+ { "number" number tie.or.space.connect }
+ if$
+ }
+ { number }
+ if$
+ }
+ { "" }
+ if$
+}
+
+FUNCTION {format.volume.number}
+{ volume empty$ not
+ { format.volume }
+ { format.number }
+ if$
+}
+
+FUNCTION {format.title.vol.num}
+{ title
+ sentence.case.title
+ 'change.sentence.case
+ 'skip$
+ if$
+ entry.numbered
+ { number empty$ not
+ { bbl.colon * number * }
+ 'skip$
+ if$
+ }
+ { format.volume.number 's :=
+ s empty$ not
+ { bbl.colon * s * }
+ 'skip$
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.series.vol.num.title}
+{ format.volume.number 's :=
+ series empty$ not
+ { series
+ sentence.case.title
+ 'change.sentence.case
+ 'skip$
+ if$
+ entry.numbered
+ { bbl.wide.space * }
+ { bbl.colon *
+ s empty$ not
+ { s * bbl.wide.space * }
+ 'skip$
+ if$
+ }
+ if$
+ title *
+ sentence.case.title
+ 'change.sentence.case
+ 'skip$
+ if$
+ entry.numbered number empty$ not and
+ { bbl.colon * number * }
+ 'skip$
+ if$
+ }
+ { format.title.vol.num }
+ if$
+ link.title
+ 'add.link
+ 'skip$
+ if$
+}
+
+FUNCTION {format.booktitle.vol.num}
+{ booktitle
+ entry.numbered
+ 'skip$
+ { format.volume.number 's :=
+ s empty$ not
+ { bbl.colon * s * }
+ 'skip$
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.series.vol.num.booktitle}
+{ format.volume.number 's :=
+ series empty$ not
+ { series bbl.colon *
+ entry.numbered not s empty$ not and
+ { s * bbl.wide.space * }
+ 'skip$
+ if$
+ booktitle *
+ }
+ { format.booktitle.vol.num }
+ if$
+ in.booktitle
+ { duplicate$ empty$ not entry.lang lang.en = and
+ { "In: " swap$ * }
+ 'skip$
+ if$
+ }
+ 'skip$
+ if$
+}
+
+FUNCTION {format.journal}
+{ journal
+ italic.jounal entry.lang lang.en = and
+ 'italicize
+ 'skip$
+ if$
+}
+
+FUNCTION {set.entry.mark}
+{ entry.mark empty$ not
+ 'pop$
+ { mark empty$ not
+ { pop$ mark 'entry.mark := }
+ { 'entry.mark := }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.mark}
+{ show.mark
+ { medium empty$ not
+ { entry.mark "/" * medium * 'entry.mark := }
+ { entry.is.electronic
+ { entry.mark "/OL" * 'entry.mark := }
+ 'skip$
+ if$
+ }
+ if$
+ "\allowbreak[" entry.mark * "]" *
+ }
+ { "" }
+ if$
+}
+
+FUNCTION {num.to.ordinal}
+{ duplicate$ text.length$ 'charptr :=
+ duplicate$ charptr #1 substring$ 's :=
+ s "1" =
+ { "st" * }
+ { s "2" =
+ { "nd" * }
+ { s "3" =
+ { "rd" * }
+ { "th" * }
+ if$
+ }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.edition}
+{ edition empty$
+ { "" }
+ { edition is.number
+ { entry.lang lang.zh =
+ { edition " 版" * }
+ { edition num.to.ordinal " ed." * }
+ if$
+ }
+ { entry.lang lang.en =
+ { edition change.sentence.case 's :=
+ s "Revised" = s "Revised edition" = or
+ { "Rev. ed." }
+ { s " ed." *}
+ if$
+ }
+ { edition }
+ if$
+ }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.publisher}
+{ publisher empty$ not
+ { publisher }
+ { school empty$ not
+ { school }
+ { organization empty$ not
+ { organization }
+ { institution empty$ not
+ { institution }
+ { "" }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.address.publisher}
+{ address empty$ not
+ { address
+ format.publisher empty$ not
+ { bbl.colon * format.publisher * }
+ { entry.is.electronic not show.missing.address.publisher and
+ { bbl.colon * bbl.sine.nomine * }
+ 'skip$
+ if$
+ }
+ if$
+ }
+ { entry.is.electronic not show.missing.address.publisher and
+ { format.publisher empty$ not
+ { bbl.sine.loco bbl.colon * format.publisher * }
+ { bbl.sine.loco.sine.nomine }
+ if$
+ }
+ { format.publisher empty$ not
+ { format.publisher }
+ { "" }
+ if$
+ }
+ if$
+ }
+ if$
+}
+
+FUNCTION {extract.before.dash}
+{ duplicate$ empty$
+ { pop$ "" }
+ { 's :=
+ #1 'charptr :=
+ s text.length$ #1 + 'len :=
+ { charptr len <
+ s charptr #1 substring$ "-" = not
+ and
+ }
+ { charptr #1 + 'charptr := }
+ while$
+ s #1 charptr #1 - substring$
+ }
+ if$
+}
+
+FUNCTION {extract.after.dash}
+{ duplicate$ empty$
+ { pop$ "" }
+ { 's :=
+ #1 'charptr :=
+ s text.length$ #1 + 'len :=
+ { charptr len <
+ s charptr #1 substring$ "-" = not
+ and
+ }
+ { charptr #1 + 'charptr := }
+ while$
+ { charptr len <
+ s charptr #1 substring$ "-" =
+ and
+ }
+ { charptr #1 + 'charptr := }
+ while$
+ s charptr global.max$ substring$
+ }
+ if$
+}
+
+FUNCTION {contains.dash}
+{ duplicate$ empty$
+ { pop$ #0 }
+ { 's :=
+ { s empty$ not
+ s #1 #1 substring$ "-" = not
+ and
+ }
+ { s #2 global.max$ substring$ 's := }
+ while$
+ s empty$ not
+ }
+ if$
+}
+
+FUNCTION {format.year}
+{ year empty$ not
+ { year extract.before.dash }
+ { date empty$ not
+ { date extract.before.dash }
+ { "empty year in " cite$ * warning$
+ urldate empty$ not
+ { "[" urldate extract.before.dash * "]" * }
+ { "" }
+ if$
+ }
+ if$
+ }
+ if$
+ extra.label *
+}
+
+FUNCTION {format.date}
+{ type$ "patent" = type$ "newspaper" = or
+ date empty$ not and
+ { date }
+ { year }
+ if$
+}
+
+FUNCTION {format.editdate}
+{ date empty$ not
+ { "\allowbreak(" date * ")" * }
+ { "" }
+ if$
+}
+
+FUNCTION {format.urldate}
+{ urldate empty$ not entry.is.electronic and
+ { "\allowbreak[" urldate * "]" * }
+ { "" }
+ if$
+}
+
+FUNCTION {hyphenate}
+{ 't :=
+ ""
+ { t empty$ not }
+ { t #1 #1 substring$ "-" =
+ { "-" *
+ { t #1 #1 substring$ "-" = }
+ { t #2 global.max$ substring$ 't := }
+ while$
+ }
+ { t #1 #1 substring$ *
+ t #2 global.max$ substring$ 't :=
+ }
+ if$
+ }
+ while$
+}
+
+FUNCTION {format.pages}
+{ pages empty$
+ { "" }
+ { pages hyphenate }
+ if$
+}
+
+FUNCTION {format.journal.volume}
+{ volume empty$ not
+ { bold.journal.volume
+ { "\textbf{" volume * "}" * }
+ { volume }
+ if$
+ }
+ { "" }
+ if$
+}
+
+FUNCTION {format.journal.number}
+{ number empty$ not
+ { "\penalty0 (" number * ")" * }
+ { "" }
+ if$
+}
+
+FUNCTION {format.journal.pages}
+{ pages empty$
+ { "" }
+ { ":\penalty0 " pages hyphenate * }
+ if$
+}
+
+FUNCTION {format.periodical.year.volume.number}
+{ year empty$ not
+ { year extract.before.dash }
+ { "empty year in periodical " cite$ * warning$ }
+ if$
+ volume empty$ not
+ { ", " * volume extract.before.dash * }
+ 'skip$
+ if$
+ number empty$ not
+ { "\penalty0 (" * number extract.before.dash * ")" * }
+ 'skip$
+ if$
+ year contains.dash
+ { "--" *
+ year extract.after.dash empty$
+ volume extract.after.dash empty$ and
+ number extract.after.dash empty$ and not
+ { year extract.after.dash empty$ not
+ { year extract.after.dash * }
+ { year extract.before.dash * }
+ if$
+ volume empty$ not
+ { ", " * volume extract.after.dash * }
+ 'skip$
+ if$
+ number empty$ not
+ { "\penalty0 (" * number extract.after.dash * ")" * }
+ 'skip$
+ if$
+ }
+ 'skip$
+ if$
+ }
+ 'skip$
+ if$
+}
+
+FUNCTION {check.url}
+{ url empty$ not
+ { "\url{" url * "}" * 'entry.url :=
+ #1 'entry.is.electronic :=
+ }
+ { howpublished empty$ not
+ { howpublished #1 #5 substring$ "\url{" =
+ { howpublished 'entry.url :=
+ #1 'entry.is.electronic :=
+ }
+ 'skip$
+ if$
+ }
+ { note empty$ not
+ { note #1 #5 substring$ "\url{" =
+ { note 'entry.url :=
+ #1 'entry.is.electronic :=
+ }
+ 'skip$
+ if$
+ }
+ 'skip$
+ if$
+ }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.url}
+{ entry.url empty$ not
+ { new.block entry.url }
+ { "" }
+ if$
+}
+
+FUNCTION {check.doi}
+{ doi empty$ not
+ { #1 'entry.is.electronic := }
+ 'skip$
+ if$
+}
+
+FUNCTION {is.in.url}
+{ 's :=
+ s empty$
+ { #1 }
+ { entry.url empty$
+ { #0 }
+ { s text.length$ 'len :=
+ entry.url text.length$ 'charptr :=
+ { entry.url charptr len substring$ s = not
+ charptr #0 >
+ and
+ }
+ { charptr #1 - 'charptr := }
+ while$
+ charptr
+ }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.doi}
+{ ""
+ doi empty$ not show.doi and
+ { "" 's :=
+ doi 't :=
+ #0 'numnames :=
+ { t empty$ not}
+ { t #1 #1 substring$ 'tmp.str :=
+ tmp.str "," = tmp.str " " = or t #2 #1 substring$ empty$ or
+ { t #2 #1 substring$ empty$
+ { s tmp.str * 's := }
+ 'skip$
+ if$
+ s empty$ s is.in.url or
+ 'skip$
+ { numnames #1 + 'numnames :=
+ numnames #1 >
+ { ", " * }
+ { "DOI: " * }
+ if$
+ "\doi{" s * "}" * *
+ }
+ if$
+ "" 's :=
+ }
+ { s tmp.str * 's := }
+ if$
+ t #2 global.max$ substring$ 't :=
+ }
+ while$
+ 's :=
+ s empty$ not
+ { new.block s }
+ { "" }
+ if$
+ }
+ 'skip$
+ if$
+}
+
+FUNCTION {check.electronic}
+{ "" 'entry.url :=
+ #0 'entry.is.electronic :=
+ 'check.doi
+ 'skip$
+ if$
+ 'check.url
+ 'skip$
+ if$
+ medium empty$ not
+ { medium "MT" = medium "DK" = or medium "CD" = or medium "OL" = or
+ { #1 'entry.is.electronic := }
+ 'skip$
+ if$
+ }
+ 'skip$
+ if$
+}
+
+FUNCTION {format.note}
+{ note empty$ not show.note and
+ { note }
+ { "" }
+ if$
+}
+
+FUNCTION {empty.misc.check}
+{ author empty$ title empty$
+ year empty$
+ and and
+ key empty$ not and
+ { "all relevant fields are empty in " cite$ * warning$ }
+ 'skip$
+ if$
+}
+
+FUNCTION {monograph}
+{ output.bibitem
+ author empty$ not
+ { format.authors }
+ { editor empty$ not
+ { format.editors }
+ { "empty author and editor in " cite$ * warning$
+ bbl.anonymous
+ }
+ if$
+ }
+ if$
+ output
+ period.between.author.year
+ 'new.sentence
+ 'skip$
+ if$
+ format.year "year" output.check
+ new.block
+ format.series.vol.num.title "title" output.check
+ "M" set.entry.mark
+ format.mark "" output.after
+ new.block
+ format.translators output
+ new.sentence
+ format.edition output
+ new.block
+ format.address.publisher output
+ format.pages bbl.colon output.after
+ format.urldate "" output.after
+ format.url output
+ format.doi output
+ new.block
+ format.note output
+ fin.entry
+}
+
+FUNCTION {incollection}
+{ output.bibitem
+ format.authors output
+ author format.key output
+ period.between.author.year
+ 'new.sentence
+ 'skip$
+ if$
+ format.year "year" output.check
+ new.block
+ format.title "title" output.check
+ "M" set.entry.mark
+ format.mark "" output.after
+ new.block
+ format.translators output
+ new.slash
+ format.editors output
+ new.block
+ format.series.vol.num.booktitle "booktitle" output.check
+ new.block
+ format.edition output
+ new.block
+ format.address.publisher output
+ format.pages bbl.colon output.after
+ format.urldate "" output.after
+ format.url output
+ format.doi output
+ new.block
+ format.note output
+ fin.entry
+}
+
+FUNCTION {periodical}
+{ output.bibitem
+ format.authors output
+ author format.key output
+ period.between.author.year
+ 'new.sentence
+ 'skip$
+ if$
+ format.year "year" output.check
+ new.block
+ format.title "title" output.check
+ "J" set.entry.mark
+ format.mark "" output.after
+ new.block
+ format.periodical.year.volume.number output
+ new.block
+ format.address.publisher output
+ format.urldate "" output.after
+ format.url output
+ format.doi output
+ new.block
+ format.note output
+ fin.entry
+}
+
+FUNCTION {article}
+{ output.bibitem
+ format.authors output
+ author format.key output
+ period.between.author.year
+ 'new.sentence
+ 'skip$
+ if$
+ format.year "year" output.check
+ new.block
+ format.title "title" output.check
+ "J" set.entry.mark
+ format.mark "" output.after
+ new.block
+ format.journal "journal" output.check
+ format.journal.volume output
+ format.journal.number "" output.after
+ format.journal.pages "" output.after
+ format.urldate "" output.after
+ format.url output
+ format.doi output
+ new.block
+ format.note output
+ fin.entry
+}
+
+FUNCTION {patent}
+{ output.bibitem
+ format.authors output
+ author format.key output
+ period.between.author.year
+ 'new.sentence
+ 'skip$
+ if$
+ format.year "year" output.check
+ new.block
+ format.title "title" output.check
+ "P" set.entry.mark
+ format.mark "" output.after
+ new.block
+ format.date "year" output.check
+ format.urldate "" output.after
+ format.url output
+ format.doi output
+ new.block
+ format.note output
+ fin.entry
+}
+
+FUNCTION {electronic}
+{ #1 #1 check.electronic
+ #1 'entry.is.electronic :=
+ output.bibitem
+ format.authors output
+ author format.key output
+ period.between.author.year
+ 'new.sentence
+ 'skip$
+ if$
+ format.year "year" output.check
+ new.block
+ format.series.vol.num.title "title" output.check
+ "EB" set.entry.mark
+ format.mark "" output.after
+ new.block
+ format.address.publisher output
+ format.pages bbl.colon output.after
+ format.editdate "" output.after
+ format.urldate "" output.after
+ format.url output
+ format.doi output
+ new.block
+ format.note output
+ fin.entry
+}
+
+FUNCTION {misc}
+{ journal empty$ not
+ 'article
+ { booktitle empty$ not
+ 'incollection
+ { publisher empty$ not
+ 'monograph
+ { entry.is.electronic
+ 'electronic
+ { "Z" set.entry.mark
+ monograph
+ }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+ empty.misc.check
+}
+
+FUNCTION {archive}
+{ "A" set.entry.mark
+ misc
+}
+
+FUNCTION {book} { monograph }
+
+FUNCTION {booklet} { book }
+
+FUNCTION {collection}
+{ "G" set.entry.mark
+ monograph
+}
+
+FUNCTION {database}
+{ "DB" set.entry.mark
+ electronic
+}
+
+FUNCTION {dataset}
+{ "DS" set.entry.mark
+ electronic
+}
+
+FUNCTION {inbook} { book }
+
+FUNCTION {inproceedings}
+{ "C" set.entry.mark
+ incollection
+}
+
+FUNCTION {conference} { inproceedings }
+
+FUNCTION {map}
+{ "CM" set.entry.mark
+ misc
+}
+
+FUNCTION {manual} { monograph }
+
+FUNCTION {mastersthesis}
+{ "D" set.entry.mark
+ monograph
+}
+
+FUNCTION {newspaper}
+{ "N" set.entry.mark
+ article
+}
+
+FUNCTION {online}
+{ "EB" set.entry.mark
+ electronic
+}
+
+FUNCTION {phdthesis} { mastersthesis }
+
+FUNCTION {proceedings}
+{ "C" set.entry.mark
+ monograph
+}
+
+FUNCTION {software}
+{ "CP" set.entry.mark
+ electronic
+}
+
+FUNCTION {standard}
+{ "S" set.entry.mark
+ misc
+}
+
+FUNCTION {techreport}
+{ "R" set.entry.mark
+ misc
+}
+
+FUNCTION {unpublished}
+{ "Z" set.entry.mark
+ misc
+}
+
+FUNCTION {default.type} { misc }
+
+MACRO {jan} {"January"}
+
+MACRO {feb} {"February"}
+
+MACRO {mar} {"March"}
+
+MACRO {apr} {"April"}
+
+MACRO {may} {"May"}
+
+MACRO {jun} {"June"}
+
+MACRO {jul} {"July"}
+
+MACRO {aug} {"August"}
+
+MACRO {sep} {"September"}
+
+MACRO {oct} {"October"}
+
+MACRO {nov} {"November"}
+
+MACRO {dec} {"December"}
+
+MACRO {acmcs} {"ACM Computing Surveys"}
+
+MACRO {acta} {"Acta Informatica"}
+
+MACRO {cacm} {"Communications of the ACM"}
+
+MACRO {ibmjrd} {"IBM Journal of Research and Development"}
+
+MACRO {ibmsj} {"IBM Systems Journal"}
+
+MACRO {ieeese} {"IEEE Transactions on Software Engineering"}
+
+MACRO {ieeetc} {"IEEE Transactions on Computers"}
+
+MACRO {ieeetcad}
+ {"IEEE Transactions on Computer-Aided Design of Integrated Circuits"}
+
+MACRO {ipl} {"Information Processing Letters"}
+
+MACRO {jacm} {"Journal of the ACM"}
+
+MACRO {jcss} {"Journal of Computer and System Sciences"}
+
+MACRO {scp} {"Science of Computer Programming"}
+
+MACRO {sicomp} {"SIAM Journal on Computing"}
+
+MACRO {tocs} {"ACM Transactions on Computer Systems"}
+
+MACRO {tods} {"ACM Transactions on Database Systems"}
+
+MACRO {tog} {"ACM Transactions on Graphics"}
+
+MACRO {toms} {"ACM Transactions on Mathematical Software"}
+
+MACRO {toois} {"ACM Transactions on Office Information Systems"}
+
+MACRO {toplas} {"ACM Transactions on Programming Languages and Systems"}
+
+MACRO {tcs} {"Theoretical Computer Science"}
+
+FUNCTION {sortify}
+{ purify$
+ "l" change.case$
+}
+
+FUNCTION {chop.word}
+{ 's :=
+ 'len :=
+ s #1 len substring$ =
+ { s len #1 + global.max$ substring$ }
+ 's
+ if$
+}
+
+FUNCTION {format.lab.names}
+{ 's :=
+ s #1 "{vv~}{ll}{, jj}{, ff}" format.name$ 't :=
+ t get.str.lang 'name.lang :=
+ name.lang lang.en =
+ { t #1 "{vv~}{ll}" format.name$}
+ { t #1 "{ll}{ff}" format.name$}
+ if$
+ s num.names$ #1 >
+ { bbl.space * citation.et.al * }
+ 'skip$
+ if$
+}
+
+FUNCTION {author.key.label}
+{ author empty$
+ { key empty$
+ { cite$ #1 #3 substring$ }
+ 'key
+ if$
+ }
+ { author format.lab.names }
+ if$
+}
+
+FUNCTION {author.editor.key.label}
+{ author empty$
+ { editor empty$
+ { key empty$
+ { cite$ #1 #3 substring$ }
+ 'key
+ if$
+ }
+ { editor format.lab.names }
+ if$
+ }
+ { author format.lab.names }
+ if$
+}
+
+FUNCTION {author.key.organization.label}
+{ author empty$
+ { key empty$
+ { organization empty$
+ { cite$ #1 #3 substring$ }
+ { "The " #4 organization chop.word #3 text.prefix$ }
+ if$
+ }
+ 'key
+ if$
+ }
+ { author format.lab.names }
+ if$
+}
+
+FUNCTION {editor.key.organization.label}
+{ editor empty$
+ { key empty$
+ { organization empty$
+ { cite$ #1 #3 substring$ }
+ { "The " #4 organization chop.word #3 text.prefix$ }
+ if$
+ }
+ 'key
+ if$
+ }
+ { editor format.lab.names }
+ if$
+}
+
+FUNCTION {calc.short.authors}
+{ type$ "book" =
+ type$ "inbook" =
+ or
+ 'author.editor.key.label
+ { type$ "collection" =
+ type$ "proceedings" =
+ or
+ { editor empty$ not
+ 'editor.key.organization.label
+ 'author.key.organization.label
+ if$
+ }
+ 'author.key.label
+ if$
+ }
+ if$
+ 'short.list :=
+}
+
+FUNCTION {calc.label}
+{ calc.short.authors
+ short.list
+ "("
+ *
+ format.year duplicate$ empty$
+ short.list key field.or.null = or
+ { pop$ "" }
+ 'skip$
+ if$
+ *
+ 'label :=
+}
+
+FUNCTION {sort.language.label}
+{ entry.lang lang.zh =
+ { lang.zh.order }
+ { entry.lang lang.ja =
+ { lang.ja.order }
+ { entry.lang lang.en =
+ { lang.en.order }
+ { entry.lang lang.ru =
+ { lang.ru.order }
+ { lang.other.order }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+ int.to.chr$
+}
+
+FUNCTION {sort.format.names}
+{ 's :=
+ #1 'nameptr :=
+ ""
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ {
+ s nameptr "{vv{ } }{ll{ }}{ ff{ }}{ jj{ }}" format.name$ 't :=
+ nameptr #1 >
+ {
+ " " *
+ namesleft #1 = t "others" = and
+ { "zzzzz" * }
+ { numnames #2 > nameptr #2 = and
+ { "zz" * year field.or.null * " " * }
+ 'skip$
+ if$
+ t sortify *
+ }
+ if$
+ }
+ { t sortify * }
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+}
+
+FUNCTION {sort.format.title}
+{ 't :=
+ "A " #2
+ "An " #3
+ "The " #4 t chop.word
+ chop.word
+ chop.word
+ sortify
+ #1 global.max$ substring$
+}
+
+FUNCTION {anonymous.sort}
+{ entry.lang lang.zh =
+ { "yi4 ming2" }
+ { "anon" }
+ if$
+}
+
+FUNCTION {warn.empty.key}
+{ entry.lang lang.zh =
+ { "empty key in " cite$ * warning$ }
+ 'skip$
+ if$
+}
+
+FUNCTION {author.sort}
+{ key empty$
+ { warn.empty.key
+ author empty$
+ { anonymous.sort }
+ { author sort.format.names }
+ if$
+ }
+ { key sortify }
+ if$
+}
+
+FUNCTION {author.editor.sort}
+{ key empty$
+ { warn.empty.key
+ author empty$
+ { editor empty$
+ { anonymous.sort }
+ { editor sort.format.names }
+ if$
+ }
+ { author sort.format.names }
+ if$
+ }
+ { key sortify }
+ if$
+}
+
+FUNCTION {author.organization.sort}
+{ key empty$
+ { warn.empty.key
+ author empty$
+ { organization empty$
+ { anonymous.sort }
+ { "The " #4 organization chop.word sortify }
+ if$
+ }
+ { author sort.format.names }
+ if$
+ }
+ { key sortify }
+ if$
+}
+
+FUNCTION {editor.organization.sort}
+{ key empty$
+ { warn.empty.key
+ editor empty$
+ { organization empty$
+ { anonymous.sort }
+ { "The " #4 organization chop.word sortify }
+ if$
+ }
+ { editor sort.format.names }
+ if$
+ }
+ { key sortify }
+ if$
+}
+
+FUNCTION {presort}
+{ set.entry.lang
+ set.entry.numbered
+ show.url show.doi check.electronic
+ calc.label
+ label sortify
+ " "
+ *
+ sort.language.label
+ type$ "book" =
+ type$ "inbook" =
+ or
+ 'author.editor.sort
+ { type$ "collection" =
+ type$ "proceedings" =
+ or
+ 'editor.organization.sort
+ 'author.sort
+ if$
+ }
+ if$
+ *
+ " "
+ *
+ year field.or.null sortify
+ *
+ " "
+ *
+ cite$
+ *
+ #1 entry.max$ substring$
+ 'sort.label :=
+ sort.label *
+ #1 entry.max$ substring$
+ 'sort.key$ :=
+}
+
+STRINGS { longest.label last.label next.extra }
+
+INTEGERS { longest.label.width last.extra.num number.label }
+
+FUNCTION {initialize.longest.label}
+{ "" 'longest.label :=
+ #0 int.to.chr$ 'last.label :=
+ "" 'next.extra :=
+ #0 'longest.label.width :=
+ #0 'last.extra.num :=
+ #0 'number.label :=
+}
+
+FUNCTION {forward.pass}
+{ last.label label =
+ { last.extra.num #1 + 'last.extra.num :=
+ last.extra.num int.to.chr$ 'extra.label :=
+ }
+ { "a" chr.to.int$ 'last.extra.num :=
+ "" 'extra.label :=
+ label 'last.label :=
+ }
+ if$
+ number.label #1 + 'number.label :=
+}
+
+FUNCTION {reverse.pass}
+{ next.extra "b" =
+ { "a" 'extra.label := }
+ 'skip$
+ if$
+ extra.label 'next.extra :=
+ extra.label
+ duplicate$ empty$
+ 'skip$
+ { "{\natexlab{" swap$ * "}}" * }
+ if$
+ 'extra.label :=
+ label extra.label * 'label :=
+}
+
+FUNCTION {bib.sort.order}
+{ sort.label 'sort.key$ :=
+}
+
+FUNCTION {begin.bib}
+{ preamble$ empty$
+ 'skip$
+ { preamble$ write$ newline$ }
+ if$
+ "\begin{thebibliography}{" number.label int.to.str$ * "}" *
+ write$ newline$
+ "\providecommand{\natexlab}[1]{#1}"
+ write$ newline$
+ "\providecommand{\url}[1]{#1}"
+ write$ newline$
+ "\expandafter\ifx\csname urlstyle\endcsname\relax\relax\else"
+ write$ newline$
+ " \urlstyle{same}\fi"
+ write$ newline$
+ show.doi
+ { "\providecommand{\href}[2]{\url{#2}}"
+ write$ newline$
+ "\providecommand{\doi}[1]{\href{https://doi.org/#1}{#1}}"
+ write$ newline$
+ }
+ 'skip$
+ if$
+}
+
+FUNCTION {end.bib}
+{ newline$
+ "\end{thebibliography}" write$ newline$
+}
+
+READ
+
+EXECUTE {init.state.consts}
+
+EXECUTE {load.config}
+
+ITERATE {presort}
+
+SORT
+
+EXECUTE {initialize.longest.label}
+
+ITERATE {forward.pass}
+
+REVERSE {reverse.pass}
+
+ITERATE {bib.sort.order}
+
+SORT
+
+EXECUTE {begin.bib}
+
+ITERATE {call.type$}
+
+EXECUTE {end.bib}
diff --git a/biblio/bibtex/contrib/gbt7714/gbt7714-unsrt.bst b/biblio/bibtex/contrib/gbt7714/gbt7714-unsrt.bst
new file mode 100644
index 0000000000..802e5e66e4
--- /dev/null
+++ b/biblio/bibtex/contrib/gbt7714/gbt7714-unsrt.bst
@@ -0,0 +1,1866 @@
+%%
+%% This is file `gbt7714-unsrt.bst',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% gbt7714.dtx (with options: `2015,numerical')
+%% -------------------------------------------------------------------
+%% GB/T 7714-2015 BibTeX Style
+%% https://github.com/CTeX-org/gbt7714-bibtex-style
+%% Version: 2019/03/21 v1.1.1
+%% -------------------------------------------------------------------
+%% Copyright (C) 2016-2019 by Zeping Lee <zepinglee AT gmail.com>
+%% -------------------------------------------------------------------
+%% This file may be distributed and/or modified under the
+%% conditions of the LaTeX Project Public License, either version 1.3c
+%% of this license or (at your option) any later version.
+%% The latest version of this license is in
+%% https://www.latex-project.org/lppl.txt
+%% and version 1.3c or later is part of all distributions of LaTeX
+%% version 2005/12/01 or later.
+%% -------------------------------------------------------------------
+INTEGERS {
+ uppercase.name
+ max.num.authors
+ period.between.author.year
+ sentence.case.title
+ link.title
+ show.mark
+ slash.for.extraction
+ in.booktitle
+ italic.jounal
+ bold.journal.volume
+ show.missing.address.publisher
+ show.url
+ show.doi
+ show.note
+}
+
+FUNCTION {load.config}
+{
+ #1 'uppercase.name :=
+ #3 'max.num.authors :=
+ #1 'sentence.case.title :=
+ #0 'link.title :=
+ #1 'show.mark :=
+ #1 'slash.for.extraction :=
+ #0 'in.booktitle :=
+ #0 'italic.jounal :=
+ #0 'bold.journal.volume :=
+ #1 'show.missing.address.publisher :=
+ #1 'show.url :=
+ #1 'show.doi :=
+ #0 'show.note :=
+}
+
+ENTRY
+ { address
+ author
+ booktitle
+ date
+ doi
+ edition
+ editor
+ howpublished
+ institution
+ journal
+ key
+ language
+ mark
+ medium
+ note
+ number
+ organization
+ pages
+ publisher
+ school
+ series
+ title
+ translator
+ url
+ urldate
+ volume
+ year
+ }
+ { entry.lang entry.is.electronic entry.numbered }
+ { label extra.label sort.label short.list entry.mark entry.url }
+
+INTEGERS { output.state before.all mid.sentence after.sentence after.block after.slash }
+
+INTEGERS { lang.zh lang.ja lang.en lang.ru lang.other }
+
+INTEGERS { charptr len }
+
+FUNCTION {init.state.consts}
+{ #0 'before.all :=
+ #1 'mid.sentence :=
+ #2 'after.sentence :=
+ #3 'after.block :=
+ #4 'after.slash :=
+ #3 'lang.zh :=
+ #4 'lang.ja :=
+ #1 'lang.en :=
+ #2 'lang.ru :=
+ #0 'lang.other :=
+}
+
+FUNCTION {bbl.anonymous}
+{ entry.lang lang.zh =
+ { "佚名" }
+ { "Anon" }
+ if$
+}
+
+FUNCTION {bbl.space}
+{ entry.lang lang.zh =
+ { "\ " }
+ { " " }
+ if$
+}
+
+FUNCTION {bbl.et.al}
+{ entry.lang lang.zh =
+ { "等" }
+ { entry.lang lang.ja =
+ { "他" }
+ { entry.lang lang.ru =
+ { "идр" }
+ { "et~al." }
+ if$
+ }
+ if$
+ }
+ if$
+}
+
+FUNCTION {citation.et.al}
+{ bbl.et.al }
+
+FUNCTION {bbl.colon} { ": " }
+
+FUNCTION {bbl.wide.space} { "\quad " }
+
+FUNCTION {bbl.slash} { "//\allowbreak " }
+
+FUNCTION {bbl.sine.loco}
+{ entry.lang lang.zh =
+ { "[出版地不详]" }
+ { "[S.l.]" }
+ if$
+}
+
+FUNCTION {bbl.sine.nomine}
+{ entry.lang lang.zh =
+ { "[出版者不详]" }
+ { "[s.n.]" }
+ if$
+}
+
+FUNCTION {bbl.sine.loco.sine.nomine}
+{ entry.lang lang.zh =
+ { "[出版地不详: 出版者不详]" }
+ { "[S.l.: s.n.]" }
+ if$
+}
+
+FUNCTION {not}
+{ { #0 }
+ { #1 }
+ if$
+}
+
+FUNCTION {and}
+{ 'skip$
+ { pop$ #0 }
+ if$
+}
+
+FUNCTION {or}
+{ { pop$ #1 }
+ 'skip$
+ if$
+}
+
+STRINGS { s t }
+
+FUNCTION {output.nonnull}
+{ 's :=
+ output.state mid.sentence =
+ { ", " * write$ }
+ { output.state after.block =
+ { add.period$ write$
+ newline$
+ "\newblock " write$
+ }
+ { output.state before.all =
+ 'write$
+ { output.state after.slash =
+ { bbl.slash * write$
+ newline$
+ }
+ { add.period$ " " * write$ }
+ if$
+ }
+ if$
+ }
+ if$
+ mid.sentence 'output.state :=
+ }
+ if$
+ s
+}
+
+FUNCTION {output}
+{ duplicate$ empty$
+ 'pop$
+ 'output.nonnull
+ if$
+}
+
+FUNCTION {output.after}
+{ 't :=
+ duplicate$ empty$
+ 'pop$
+ { 's :=
+ output.state mid.sentence =
+ { t * write$ }
+ { output.state after.block =
+ { add.period$ write$
+ newline$
+ "\newblock " write$
+ }
+ { output.state before.all =
+ 'write$
+ { output.state after.slash =
+ { bbl.slash * write$ }
+ { add.period$ " " * write$ }
+ if$
+ }
+ if$
+ }
+ if$
+ mid.sentence 'output.state :=
+ }
+ if$
+ s
+ }
+ if$
+}
+
+FUNCTION {output.check}
+{ 't :=
+ duplicate$ empty$
+ { pop$ "empty " t * " in " * cite$ * warning$ }
+ 'output.nonnull
+ if$
+}
+
+FUNCTION {fin.entry}
+{ add.period$
+ write$
+ newline$
+}
+
+FUNCTION {new.block}
+{ output.state before.all =
+ 'skip$
+ { output.state after.slash =
+ 'skip$
+ { after.block 'output.state := }
+ if$
+ }
+ if$
+}
+
+FUNCTION {new.sentence}
+{ output.state after.block =
+ 'skip$
+ { output.state before.all =
+ 'skip$
+ { output.state after.slash =
+ 'skip$
+ { after.sentence 'output.state := }
+ if$
+ }
+ if$
+ }
+ if$
+}
+
+FUNCTION {new.slash}
+{ output.state before.all =
+ 'skip$
+ { slash.for.extraction
+ { after.slash 'output.state := }
+ { after.block 'output.state := }
+ if$
+ }
+ if$
+}
+
+FUNCTION {new.block.checka}
+{ empty$
+ 'skip$
+ 'new.block
+ if$
+}
+
+FUNCTION {new.block.checkb}
+{ empty$
+ swap$ empty$
+ and
+ 'skip$
+ 'new.block
+ if$
+}
+
+FUNCTION {new.sentence.checka}
+{ empty$
+ 'skip$
+ 'new.sentence
+ if$
+}
+
+FUNCTION {new.sentence.checkb}
+{ empty$
+ swap$ empty$
+ and
+ 'skip$
+ 'new.sentence
+ if$
+}
+
+FUNCTION {field.or.null}
+{ duplicate$ empty$
+ { pop$ "" }
+ 'skip$
+ if$
+}
+
+FUNCTION {italicize}
+{ duplicate$ empty$
+ { pop$ "" }
+ { "\textit{" swap$ * "}" * }
+ if$
+}
+
+INTEGERS { byte second.byte }
+
+INTEGERS { char.lang tmp.lang }
+
+STRINGS { tmp.str }
+
+FUNCTION {get.str.lang}
+{ 'tmp.str :=
+ lang.other 'tmp.lang :=
+ #1 'charptr :=
+ tmp.str text.length$ #1 + 'len :=
+ { charptr len < }
+ { tmp.str charptr #1 substring$ chr.to.int$ 'byte :=
+ byte #128 <
+ { charptr #1 + 'charptr :=
+ byte #64 > byte #91 < and byte #96 > byte #123 < and or
+ { lang.en 'char.lang := }
+ { lang.other 'char.lang := }
+ if$
+ }
+ { tmp.str charptr #1 + #1 substring$ chr.to.int$ 'second.byte :=
+ byte #224 <
+ { charptr #2 + 'charptr :=
+ byte #207 > byte #212 < and
+ byte #212 = second.byte #176 < and or
+ { lang.ru 'char.lang := }
+ { lang.other 'char.lang := }
+ if$
+ }
+ { byte #240 <
+ { charptr #3 + 'charptr :=
+ byte #227 > byte #234 < and
+ { lang.zh 'char.lang := }
+ { byte #227 =
+ { second.byte #143 >
+ { lang.zh 'char.lang := }
+ { second.byte #128 > second.byte #132 < and
+ { lang.ja 'char.lang := }
+ { lang.other 'char.lang := }
+ if$
+ }
+ if$
+ }
+ { byte #239 =
+ second.byte #163 > second.byte #172 < and and
+ { lang.zh 'char.lang := }
+ { lang.other 'char.lang := }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ { charptr #4 + 'charptr :=
+ byte #240 = second.byte #159 > and
+ { lang.zh 'char.lang := }
+ { lang.other 'char.lang := }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+ char.lang tmp.lang >
+ { char.lang 'tmp.lang := }
+ 'skip$
+ if$
+ }
+ while$
+ tmp.lang
+}
+
+FUNCTION {check.entry.lang}
+{ author field.or.null
+ title field.or.null *
+ get.str.lang
+}
+
+FUNCTION {set.entry.lang}
+{ language empty$
+ { check.entry.lang }
+ { language "english" = language "american" = or language "british" = or
+ { lang.en }
+ { language "chinese" =
+ { lang.zh }
+ { language "japanese" =
+ { lang.ja }
+ { language "russian" =
+ { lang.ru }
+ { check.entry.lang }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+ 'entry.lang :=
+}
+
+FUNCTION {set.entry.numbered}
+{ type$ "patent" =
+ type$ "standard" = or
+ type$ "techreport" = or
+ { #1 'entry.numbered := }
+ { #0 'entry.numbered := }
+ if$
+}
+
+INTEGERS { nameptr namesleft numnames name.lang }
+
+FUNCTION {format.names}
+{ 's :=
+ #1 'nameptr :=
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ { s nameptr "{vv~}{ll}{, jj}{, ff}" format.name$ 't :=
+ nameptr max.num.authors >
+ { bbl.et.al
+ #1 'namesleft :=
+ }
+ { t "others" =
+ { bbl.et.al }
+ { t get.str.lang 'name.lang :=
+ name.lang lang.en =
+ { t #1 "{vv~}{ll}{~f{~}}" format.name$
+ uppercase.name
+ { "u" change.case$ }
+ 'skip$
+ if$
+ t #1 "{, jj}" format.name$ *
+ }
+ { t #1 "{ll}{ff}" format.name$ }
+ if$
+ }
+ if$
+ }
+ if$
+ nameptr #1 >
+ { ", " swap$ * * }
+ 'skip$
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+}
+
+FUNCTION {format.key}
+{ empty$
+ { key field.or.null }
+ { "" }
+ if$
+}
+
+FUNCTION {format.authors}
+{ author empty$ not
+ { author format.names }
+ { "empty author in " cite$ * warning$
+ ""
+ }
+ if$
+}
+
+FUNCTION {format.editors}
+{ editor empty$
+ { "" }
+ { editor format.names }
+ if$
+}
+
+FUNCTION {format.translators}
+{ translator empty$
+ { "" }
+ { translator format.names
+ entry.lang lang.zh =
+ { translator num.names$ #3 >
+ { "译" * }
+ { ", 译" * }
+ if$
+ }
+ 'skip$
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.full.names}
+{'s :=
+ #1 'nameptr :=
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ { s nameptr "{vv~}{ll}{, jj}{, ff}" format.name$ 't :=
+ t get.str.lang 'name.lang :=
+ name.lang lang.en =
+ { t #1 "{vv~}{ll}" format.name$ 't := }
+ { t #1 "{ll}{ff}" format.name$ 't := }
+ if$
+ nameptr #1 >
+ {
+ namesleft #1 >
+ { ", " * t * }
+ {
+ numnames #2 >
+ { "," * }
+ 'skip$
+ if$
+ t "others" =
+ { " et~al." * }
+ { " and " * t * }
+ if$
+ }
+ if$
+ }
+ 't
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+}
+
+FUNCTION {author.editor.full}
+{ author empty$
+ { editor empty$
+ { "" }
+ { editor format.full.names }
+ if$
+ }
+ { author format.full.names }
+ if$
+}
+
+FUNCTION {author.full}
+{ author empty$
+ { "" }
+ { author format.full.names }
+ if$
+}
+
+FUNCTION {editor.full}
+{ editor empty$
+ { "" }
+ { editor format.full.names }
+ if$
+}
+
+FUNCTION {make.full.names}
+{ type$ "book" =
+ type$ "inbook" =
+ or
+ 'author.editor.full
+ { type$ "collection" =
+ type$ "proceedings" =
+ or
+ 'editor.full
+ 'author.full
+ if$
+ }
+ if$
+}
+
+FUNCTION {output.bibitem}
+{ newline$
+ "\bibitem[" write$
+ label write$
+ ")" make.full.names duplicate$ short.list =
+ { pop$ }
+ { * }
+ if$
+ 's :=
+ s text.length$ 'charptr :=
+ { charptr #0 > }
+ { s charptr #1 substring$ "]" =
+ { #0 'charptr := }
+ { charptr #1 - 'charptr := }
+ if$
+ }
+ while$
+ charptr #0 >
+ { "{" s * "}" * }
+ { s }
+ if$
+ "]{" * write$
+ cite$ write$
+ "}" write$
+ newline$
+ ""
+ before.all 'output.state :=
+}
+
+FUNCTION {change.sentence.case}
+{ entry.lang lang.en =
+ { "t" change.case$ }
+ 'skip$
+ if$
+}
+
+FUNCTION {add.link}
+{ url empty$ not
+ { "\href{" url * "}{" * swap$ * "}" * }
+ { doi empty$ not
+ { "\href{http://dx.doi.org/" doi * "}{" * swap$ * "}" * }
+ 'skip$
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.title}
+{ title empty$
+ { "" }
+ { title
+ sentence.case.title
+ 'change.sentence.case
+ 'skip$
+ if$
+ entry.numbered number empty$ not and
+ { bbl.colon * number * }
+ 'skip$
+ if$
+ link.title
+ 'add.link
+ 'skip$
+ if$
+ }
+ if$
+}
+
+FUNCTION {tie.or.space.connect}
+{ duplicate$ text.length$ #3 <
+ { "~" }
+ { " " }
+ if$
+ swap$ * *
+}
+
+FUNCTION {either.or.check}
+{ empty$
+ 'pop$
+ { "can't use both " swap$ * " fields in " * cite$ * warning$ }
+ if$
+}
+
+FUNCTION {is.digit}
+{ duplicate$ empty$
+ { pop$ #0 }
+ { chr.to.int$
+ duplicate$ "0" chr.to.int$ <
+ { pop$ #0 }
+ { "9" chr.to.int$ >
+ { #0 }
+ { #1 }
+ if$
+ }
+ if$
+ }
+ if$
+}
+
+FUNCTION {is.number}
+{ 's :=
+ s empty$
+ { #0 }
+ { s text.length$ 'charptr :=
+ { charptr #0 >
+ s charptr #1 substring$ is.digit
+ and
+ }
+ { charptr #1 - 'charptr := }
+ while$
+ charptr not
+ }
+ if$
+}
+
+FUNCTION {format.volume}
+{ volume empty$ not
+ { volume is.number
+ { entry.lang lang.zh =
+ { "第 " volume * " 卷" * }
+ { "volume" volume tie.or.space.connect }
+ if$
+ }
+ { volume }
+ if$
+ }
+ { "" }
+ if$
+}
+
+FUNCTION {format.number}
+{ number empty$ not
+ { number is.number
+ { entry.lang lang.zh =
+ { "第 " number * " 册" * }
+ { "number" number tie.or.space.connect }
+ if$
+ }
+ { number }
+ if$
+ }
+ { "" }
+ if$
+}
+
+FUNCTION {format.volume.number}
+{ volume empty$ not
+ { format.volume }
+ { format.number }
+ if$
+}
+
+FUNCTION {format.title.vol.num}
+{ title
+ sentence.case.title
+ 'change.sentence.case
+ 'skip$
+ if$
+ entry.numbered
+ { number empty$ not
+ { bbl.colon * number * }
+ 'skip$
+ if$
+ }
+ { format.volume.number 's :=
+ s empty$ not
+ { bbl.colon * s * }
+ 'skip$
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.series.vol.num.title}
+{ format.volume.number 's :=
+ series empty$ not
+ { series
+ sentence.case.title
+ 'change.sentence.case
+ 'skip$
+ if$
+ entry.numbered
+ { bbl.wide.space * }
+ { bbl.colon *
+ s empty$ not
+ { s * bbl.wide.space * }
+ 'skip$
+ if$
+ }
+ if$
+ title *
+ sentence.case.title
+ 'change.sentence.case
+ 'skip$
+ if$
+ entry.numbered number empty$ not and
+ { bbl.colon * number * }
+ 'skip$
+ if$
+ }
+ { format.title.vol.num }
+ if$
+ link.title
+ 'add.link
+ 'skip$
+ if$
+}
+
+FUNCTION {format.booktitle.vol.num}
+{ booktitle
+ entry.numbered
+ 'skip$
+ { format.volume.number 's :=
+ s empty$ not
+ { bbl.colon * s * }
+ 'skip$
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.series.vol.num.booktitle}
+{ format.volume.number 's :=
+ series empty$ not
+ { series bbl.colon *
+ entry.numbered not s empty$ not and
+ { s * bbl.wide.space * }
+ 'skip$
+ if$
+ booktitle *
+ }
+ { format.booktitle.vol.num }
+ if$
+ in.booktitle
+ { duplicate$ empty$ not entry.lang lang.en = and
+ { "In: " swap$ * }
+ 'skip$
+ if$
+ }
+ 'skip$
+ if$
+}
+
+FUNCTION {format.journal}
+{ journal
+ italic.jounal entry.lang lang.en = and
+ 'italicize
+ 'skip$
+ if$
+}
+
+FUNCTION {set.entry.mark}
+{ entry.mark empty$ not
+ 'pop$
+ { mark empty$ not
+ { pop$ mark 'entry.mark := }
+ { 'entry.mark := }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.mark}
+{ show.mark
+ { medium empty$ not
+ { entry.mark "/" * medium * 'entry.mark := }
+ { entry.is.electronic
+ { entry.mark "/OL" * 'entry.mark := }
+ 'skip$
+ if$
+ }
+ if$
+ "\allowbreak[" entry.mark * "]" *
+ }
+ { "" }
+ if$
+}
+
+FUNCTION {num.to.ordinal}
+{ duplicate$ text.length$ 'charptr :=
+ duplicate$ charptr #1 substring$ 's :=
+ s "1" =
+ { "st" * }
+ { s "2" =
+ { "nd" * }
+ { s "3" =
+ { "rd" * }
+ { "th" * }
+ if$
+ }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.edition}
+{ edition empty$
+ { "" }
+ { edition is.number
+ { entry.lang lang.zh =
+ { edition " 版" * }
+ { edition num.to.ordinal " ed." * }
+ if$
+ }
+ { entry.lang lang.en =
+ { edition change.sentence.case 's :=
+ s "Revised" = s "Revised edition" = or
+ { "Rev. ed." }
+ { s " ed." *}
+ if$
+ }
+ { edition }
+ if$
+ }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.publisher}
+{ publisher empty$ not
+ { publisher }
+ { school empty$ not
+ { school }
+ { organization empty$ not
+ { organization }
+ { institution empty$ not
+ { institution }
+ { "" }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.address.publisher}
+{ address empty$ not
+ { address
+ format.publisher empty$ not
+ { bbl.colon * format.publisher * }
+ { entry.is.electronic not show.missing.address.publisher and
+ { bbl.colon * bbl.sine.nomine * }
+ 'skip$
+ if$
+ }
+ if$
+ }
+ { entry.is.electronic not show.missing.address.publisher and
+ { format.publisher empty$ not
+ { bbl.sine.loco bbl.colon * format.publisher * }
+ { bbl.sine.loco.sine.nomine }
+ if$
+ }
+ { format.publisher empty$ not
+ { format.publisher }
+ { "" }
+ if$
+ }
+ if$
+ }
+ if$
+}
+
+FUNCTION {extract.before.dash}
+{ duplicate$ empty$
+ { pop$ "" }
+ { 's :=
+ #1 'charptr :=
+ s text.length$ #1 + 'len :=
+ { charptr len <
+ s charptr #1 substring$ "-" = not
+ and
+ }
+ { charptr #1 + 'charptr := }
+ while$
+ s #1 charptr #1 - substring$
+ }
+ if$
+}
+
+FUNCTION {extract.after.dash}
+{ duplicate$ empty$
+ { pop$ "" }
+ { 's :=
+ #1 'charptr :=
+ s text.length$ #1 + 'len :=
+ { charptr len <
+ s charptr #1 substring$ "-" = not
+ and
+ }
+ { charptr #1 + 'charptr := }
+ while$
+ { charptr len <
+ s charptr #1 substring$ "-" =
+ and
+ }
+ { charptr #1 + 'charptr := }
+ while$
+ s charptr global.max$ substring$
+ }
+ if$
+}
+
+FUNCTION {contains.dash}
+{ duplicate$ empty$
+ { pop$ #0 }
+ { 's :=
+ { s empty$ not
+ s #1 #1 substring$ "-" = not
+ and
+ }
+ { s #2 global.max$ substring$ 's := }
+ while$
+ s empty$ not
+ }
+ if$
+}
+
+FUNCTION {format.year}
+{ year empty$ not
+ { year extract.before.dash }
+ { date empty$ not
+ { date extract.before.dash }
+ { "empty year in " cite$ * warning$
+ urldate empty$ not
+ { "[" urldate extract.before.dash * "]" * }
+ { "" }
+ if$
+ }
+ if$
+ }
+ if$
+ extra.label *
+}
+
+FUNCTION {format.date}
+{ type$ "patent" = type$ "newspaper" = or
+ date empty$ not and
+ { date }
+ { year }
+ if$
+}
+
+FUNCTION {format.editdate}
+{ date empty$ not
+ { "\allowbreak(" date * ")" * }
+ { "" }
+ if$
+}
+
+FUNCTION {format.urldate}
+{ urldate empty$ not entry.is.electronic and
+ { "\allowbreak[" urldate * "]" * }
+ { "" }
+ if$
+}
+
+FUNCTION {hyphenate}
+{ 't :=
+ ""
+ { t empty$ not }
+ { t #1 #1 substring$ "-" =
+ { "-" *
+ { t #1 #1 substring$ "-" = }
+ { t #2 global.max$ substring$ 't := }
+ while$
+ }
+ { t #1 #1 substring$ *
+ t #2 global.max$ substring$ 't :=
+ }
+ if$
+ }
+ while$
+}
+
+FUNCTION {format.pages}
+{ pages empty$
+ { "" }
+ { pages hyphenate }
+ if$
+}
+
+FUNCTION {format.journal.volume}
+{ volume empty$ not
+ { bold.journal.volume
+ { "\textbf{" volume * "}" * }
+ { volume }
+ if$
+ }
+ { "" }
+ if$
+}
+
+FUNCTION {format.journal.number}
+{ number empty$ not
+ { "\penalty0 (" number * ")" * }
+ { "" }
+ if$
+}
+
+FUNCTION {format.journal.pages}
+{ pages empty$
+ { "" }
+ { ":\penalty0 " pages hyphenate * }
+ if$
+}
+
+FUNCTION {format.periodical.year.volume.number}
+{ year empty$ not
+ { year extract.before.dash }
+ { "empty year in periodical " cite$ * warning$ }
+ if$
+ volume empty$ not
+ { ", " * volume extract.before.dash * }
+ 'skip$
+ if$
+ number empty$ not
+ { "\penalty0 (" * number extract.before.dash * ")" * }
+ 'skip$
+ if$
+ year contains.dash
+ { "--" *
+ year extract.after.dash empty$
+ volume extract.after.dash empty$ and
+ number extract.after.dash empty$ and not
+ { year extract.after.dash empty$ not
+ { year extract.after.dash * }
+ { year extract.before.dash * }
+ if$
+ volume empty$ not
+ { ", " * volume extract.after.dash * }
+ 'skip$
+ if$
+ number empty$ not
+ { "\penalty0 (" * number extract.after.dash * ")" * }
+ 'skip$
+ if$
+ }
+ 'skip$
+ if$
+ }
+ 'skip$
+ if$
+}
+
+FUNCTION {check.url}
+{ url empty$ not
+ { "\url{" url * "}" * 'entry.url :=
+ #1 'entry.is.electronic :=
+ }
+ { howpublished empty$ not
+ { howpublished #1 #5 substring$ "\url{" =
+ { howpublished 'entry.url :=
+ #1 'entry.is.electronic :=
+ }
+ 'skip$
+ if$
+ }
+ { note empty$ not
+ { note #1 #5 substring$ "\url{" =
+ { note 'entry.url :=
+ #1 'entry.is.electronic :=
+ }
+ 'skip$
+ if$
+ }
+ 'skip$
+ if$
+ }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.url}
+{ entry.url empty$ not
+ { new.block entry.url }
+ { "" }
+ if$
+}
+
+FUNCTION {check.doi}
+{ doi empty$ not
+ { #1 'entry.is.electronic := }
+ 'skip$
+ if$
+}
+
+FUNCTION {is.in.url}
+{ 's :=
+ s empty$
+ { #1 }
+ { entry.url empty$
+ { #0 }
+ { s text.length$ 'len :=
+ entry.url text.length$ 'charptr :=
+ { entry.url charptr len substring$ s = not
+ charptr #0 >
+ and
+ }
+ { charptr #1 - 'charptr := }
+ while$
+ charptr
+ }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.doi}
+{ ""
+ doi empty$ not show.doi and
+ { "" 's :=
+ doi 't :=
+ #0 'numnames :=
+ { t empty$ not}
+ { t #1 #1 substring$ 'tmp.str :=
+ tmp.str "," = tmp.str " " = or t #2 #1 substring$ empty$ or
+ { t #2 #1 substring$ empty$
+ { s tmp.str * 's := }
+ 'skip$
+ if$
+ s empty$ s is.in.url or
+ 'skip$
+ { numnames #1 + 'numnames :=
+ numnames #1 >
+ { ", " * }
+ { "DOI: " * }
+ if$
+ "\doi{" s * "}" * *
+ }
+ if$
+ "" 's :=
+ }
+ { s tmp.str * 's := }
+ if$
+ t #2 global.max$ substring$ 't :=
+ }
+ while$
+ 's :=
+ s empty$ not
+ { new.block s }
+ { "" }
+ if$
+ }
+ 'skip$
+ if$
+}
+
+FUNCTION {check.electronic}
+{ "" 'entry.url :=
+ #0 'entry.is.electronic :=
+ 'check.doi
+ 'skip$
+ if$
+ 'check.url
+ 'skip$
+ if$
+ medium empty$ not
+ { medium "MT" = medium "DK" = or medium "CD" = or medium "OL" = or
+ { #1 'entry.is.electronic := }
+ 'skip$
+ if$
+ }
+ 'skip$
+ if$
+}
+
+FUNCTION {format.note}
+{ note empty$ not show.note and
+ { note }
+ { "" }
+ if$
+}
+
+FUNCTION {empty.misc.check}
+{ author empty$ title empty$
+ year empty$
+ and and
+ key empty$ not and
+ { "all relevant fields are empty in " cite$ * warning$ }
+ 'skip$
+ if$
+}
+
+FUNCTION {monograph}
+{ output.bibitem
+ author empty$ not
+ { format.authors }
+ { editor empty$ not
+ { format.editors }
+ { "empty author and editor in " cite$ * warning$
+ ""
+ }
+ if$
+ }
+ if$
+ output
+ new.block
+ format.series.vol.num.title "title" output.check
+ "M" set.entry.mark
+ format.mark "" output.after
+ new.block
+ format.translators output
+ new.sentence
+ format.edition output
+ new.block
+ format.address.publisher output
+ format.year "year" output.check
+ format.pages bbl.colon output.after
+ format.urldate "" output.after
+ format.url output
+ format.doi output
+ new.block
+ format.note output
+ fin.entry
+}
+
+FUNCTION {incollection}
+{ output.bibitem
+ format.authors output
+ author format.key output
+ new.block
+ format.title "title" output.check
+ "M" set.entry.mark
+ format.mark "" output.after
+ new.block
+ format.translators output
+ new.slash
+ format.editors output
+ new.block
+ format.series.vol.num.booktitle "booktitle" output.check
+ new.block
+ format.edition output
+ new.block
+ format.address.publisher output
+ format.year "year" output.check
+ format.pages bbl.colon output.after
+ format.urldate "" output.after
+ format.url output
+ format.doi output
+ new.block
+ format.note output
+ fin.entry
+}
+
+FUNCTION {periodical}
+{ output.bibitem
+ format.authors output
+ author format.key output
+ new.block
+ format.title "title" output.check
+ "J" set.entry.mark
+ format.mark "" output.after
+ new.block
+ format.periodical.year.volume.number output
+ new.block
+ format.address.publisher output
+ format.date "year" output.check
+ format.urldate "" output.after
+ format.url output
+ format.doi output
+ new.block
+ format.note output
+ fin.entry
+}
+
+FUNCTION {article}
+{ output.bibitem
+ format.authors output
+ author format.key output
+ new.block
+ format.title "title" output.check
+ "J" set.entry.mark
+ format.mark "" output.after
+ new.block
+ format.journal "journal" output.check
+ format.date "year" output.check
+ format.journal.volume output
+ format.journal.number "" output.after
+ format.journal.pages "" output.after
+ format.urldate "" output.after
+ format.url output
+ format.doi output
+ new.block
+ format.note output
+ fin.entry
+}
+
+FUNCTION {patent}
+{ output.bibitem
+ format.authors output
+ author format.key output
+ new.block
+ format.title "title" output.check
+ "P" set.entry.mark
+ format.mark "" output.after
+ new.block
+ format.date "year" output.check
+ format.urldate "" output.after
+ format.url output
+ format.doi output
+ new.block
+ format.note output
+ fin.entry
+}
+
+FUNCTION {electronic}
+{ #1 #1 check.electronic
+ #1 'entry.is.electronic :=
+ output.bibitem
+ format.authors output
+ author format.key output
+ new.block
+ format.series.vol.num.title "title" output.check
+ "EB" set.entry.mark
+ format.mark "" output.after
+ new.block
+ format.address.publisher output
+ date empty$
+ { format.date output }
+ 'skip$
+ if$
+ format.pages bbl.colon output.after
+ format.editdate "" output.after
+ format.urldate "" output.after
+ format.url output
+ format.doi output
+ new.block
+ format.note output
+ fin.entry
+}
+
+FUNCTION {misc}
+{ journal empty$ not
+ 'article
+ { booktitle empty$ not
+ 'incollection
+ { publisher empty$ not
+ 'monograph
+ { entry.is.electronic
+ 'electronic
+ { "Z" set.entry.mark
+ monograph
+ }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+ empty.misc.check
+}
+
+FUNCTION {archive}
+{ "A" set.entry.mark
+ misc
+}
+
+FUNCTION {book} { monograph }
+
+FUNCTION {booklet} { book }
+
+FUNCTION {collection}
+{ "G" set.entry.mark
+ monograph
+}
+
+FUNCTION {database}
+{ "DB" set.entry.mark
+ electronic
+}
+
+FUNCTION {dataset}
+{ "DS" set.entry.mark
+ electronic
+}
+
+FUNCTION {inbook} { book }
+
+FUNCTION {inproceedings}
+{ "C" set.entry.mark
+ incollection
+}
+
+FUNCTION {conference} { inproceedings }
+
+FUNCTION {map}
+{ "CM" set.entry.mark
+ misc
+}
+
+FUNCTION {manual} { monograph }
+
+FUNCTION {mastersthesis}
+{ "D" set.entry.mark
+ monograph
+}
+
+FUNCTION {newspaper}
+{ "N" set.entry.mark
+ article
+}
+
+FUNCTION {online}
+{ "EB" set.entry.mark
+ electronic
+}
+
+FUNCTION {phdthesis} { mastersthesis }
+
+FUNCTION {proceedings}
+{ "C" set.entry.mark
+ monograph
+}
+
+FUNCTION {software}
+{ "CP" set.entry.mark
+ electronic
+}
+
+FUNCTION {standard}
+{ "S" set.entry.mark
+ misc
+}
+
+FUNCTION {techreport}
+{ "R" set.entry.mark
+ misc
+}
+
+FUNCTION {unpublished}
+{ "Z" set.entry.mark
+ misc
+}
+
+FUNCTION {default.type} { misc }
+
+MACRO {jan} {"January"}
+
+MACRO {feb} {"February"}
+
+MACRO {mar} {"March"}
+
+MACRO {apr} {"April"}
+
+MACRO {may} {"May"}
+
+MACRO {jun} {"June"}
+
+MACRO {jul} {"July"}
+
+MACRO {aug} {"August"}
+
+MACRO {sep} {"September"}
+
+MACRO {oct} {"October"}
+
+MACRO {nov} {"November"}
+
+MACRO {dec} {"December"}
+
+MACRO {acmcs} {"ACM Computing Surveys"}
+
+MACRO {acta} {"Acta Informatica"}
+
+MACRO {cacm} {"Communications of the ACM"}
+
+MACRO {ibmjrd} {"IBM Journal of Research and Development"}
+
+MACRO {ibmsj} {"IBM Systems Journal"}
+
+MACRO {ieeese} {"IEEE Transactions on Software Engineering"}
+
+MACRO {ieeetc} {"IEEE Transactions on Computers"}
+
+MACRO {ieeetcad}
+ {"IEEE Transactions on Computer-Aided Design of Integrated Circuits"}
+
+MACRO {ipl} {"Information Processing Letters"}
+
+MACRO {jacm} {"Journal of the ACM"}
+
+MACRO {jcss} {"Journal of Computer and System Sciences"}
+
+MACRO {scp} {"Science of Computer Programming"}
+
+MACRO {sicomp} {"SIAM Journal on Computing"}
+
+MACRO {tocs} {"ACM Transactions on Computer Systems"}
+
+MACRO {tods} {"ACM Transactions on Database Systems"}
+
+MACRO {tog} {"ACM Transactions on Graphics"}
+
+MACRO {toms} {"ACM Transactions on Mathematical Software"}
+
+MACRO {toois} {"ACM Transactions on Office Information Systems"}
+
+MACRO {toplas} {"ACM Transactions on Programming Languages and Systems"}
+
+MACRO {tcs} {"Theoretical Computer Science"}
+
+FUNCTION {sortify}
+{ purify$
+ "l" change.case$
+}
+
+FUNCTION {chop.word}
+{ 's :=
+ 'len :=
+ s #1 len substring$ =
+ { s len #1 + global.max$ substring$ }
+ 's
+ if$
+}
+
+FUNCTION {format.lab.names}
+{ 's :=
+ s #1 "{vv~}{ll}{, jj}{, ff}" format.name$ 't :=
+ t get.str.lang 'name.lang :=
+ name.lang lang.en =
+ { t #1 "{vv~}{ll}" format.name$}
+ { t #1 "{ll}{ff}" format.name$}
+ if$
+ s num.names$ #1 >
+ { bbl.space * citation.et.al * }
+ 'skip$
+ if$
+}
+
+FUNCTION {author.key.label}
+{ author empty$
+ { key empty$
+ { cite$ #1 #3 substring$ }
+ 'key
+ if$
+ }
+ { author format.lab.names }
+ if$
+}
+
+FUNCTION {author.editor.key.label}
+{ author empty$
+ { editor empty$
+ { key empty$
+ { cite$ #1 #3 substring$ }
+ 'key
+ if$
+ }
+ { editor format.lab.names }
+ if$
+ }
+ { author format.lab.names }
+ if$
+}
+
+FUNCTION {author.key.organization.label}
+{ author empty$
+ { key empty$
+ { organization empty$
+ { cite$ #1 #3 substring$ }
+ { "The " #4 organization chop.word #3 text.prefix$ }
+ if$
+ }
+ 'key
+ if$
+ }
+ { author format.lab.names }
+ if$
+}
+
+FUNCTION {editor.key.organization.label}
+{ editor empty$
+ { key empty$
+ { organization empty$
+ { cite$ #1 #3 substring$ }
+ { "The " #4 organization chop.word #3 text.prefix$ }
+ if$
+ }
+ 'key
+ if$
+ }
+ { editor format.lab.names }
+ if$
+}
+
+FUNCTION {calc.short.authors}
+{ type$ "book" =
+ type$ "inbook" =
+ or
+ 'author.editor.key.label
+ { type$ "collection" =
+ type$ "proceedings" =
+ or
+ { editor empty$ not
+ 'editor.key.organization.label
+ 'author.key.organization.label
+ if$
+ }
+ 'author.key.label
+ if$
+ }
+ if$
+ 'short.list :=
+}
+
+FUNCTION {calc.label}
+{ calc.short.authors
+ short.list
+ "("
+ *
+ format.year duplicate$ empty$
+ short.list key field.or.null = or
+ { pop$ "" }
+ 'skip$
+ if$
+ *
+ 'label :=
+}
+
+INTEGERS { seq.num }
+
+FUNCTION {init.seq}
+{ #0 'seq.num :=}
+
+FUNCTION {int.to.fix}
+{ "000000000" swap$ int.to.str$ *
+ #-1 #10 substring$
+}
+
+FUNCTION {presort}
+{ set.entry.lang
+ set.entry.numbered
+ show.url show.doi check.electronic
+ calc.label
+ label sortify
+ " "
+ *
+ seq.num #1 + 'seq.num :=
+ seq.num int.to.fix
+ 'sort.label :=
+ sort.label *
+ #1 entry.max$ substring$
+ 'sort.key$ :=
+}
+
+STRINGS { longest.label last.label next.extra }
+
+INTEGERS { longest.label.width last.extra.num number.label }
+
+FUNCTION {initialize.longest.label}
+{ "" 'longest.label :=
+ #0 int.to.chr$ 'last.label :=
+ "" 'next.extra :=
+ #0 'longest.label.width :=
+ #0 'last.extra.num :=
+ #0 'number.label :=
+}
+
+FUNCTION {forward.pass}
+{ last.label label =
+ { last.extra.num #1 + 'last.extra.num :=
+ last.extra.num int.to.chr$ 'extra.label :=
+ }
+ { "a" chr.to.int$ 'last.extra.num :=
+ "" 'extra.label :=
+ label 'last.label :=
+ }
+ if$
+ number.label #1 + 'number.label :=
+}
+
+FUNCTION {reverse.pass}
+{ next.extra "b" =
+ { "a" 'extra.label := }
+ 'skip$
+ if$
+ extra.label 'next.extra :=
+ extra.label
+ duplicate$ empty$
+ 'skip$
+ { "{\natexlab{" swap$ * "}}" * }
+ if$
+ 'extra.label :=
+ label extra.label * 'label :=
+}
+
+FUNCTION {bib.sort.order}
+{ sort.label 'sort.key$ :=
+}
+
+FUNCTION {begin.bib}
+{ preamble$ empty$
+ 'skip$
+ { preamble$ write$ newline$ }
+ if$
+ "\begin{thebibliography}{" number.label int.to.str$ * "}" *
+ write$ newline$
+ "\providecommand{\natexlab}[1]{#1}"
+ write$ newline$
+ "\providecommand{\url}[1]{#1}"
+ write$ newline$
+ "\expandafter\ifx\csname urlstyle\endcsname\relax\relax\else"
+ write$ newline$
+ " \urlstyle{same}\fi"
+ write$ newline$
+ show.doi
+ { "\providecommand{\href}[2]{\url{#2}}"
+ write$ newline$
+ "\providecommand{\doi}[1]{\href{https://doi.org/#1}{#1}}"
+ write$ newline$
+ }
+ 'skip$
+ if$
+}
+
+FUNCTION {end.bib}
+{ newline$
+ "\end{thebibliography}" write$ newline$
+}
+
+READ
+
+EXECUTE {init.state.consts}
+
+EXECUTE {load.config}
+
+EXECUTE {init.seq}
+
+ITERATE {presort}
+
+SORT
+
+EXECUTE {initialize.longest.label}
+
+ITERATE {forward.pass}
+
+REVERSE {reverse.pass}
+
+ITERATE {bib.sort.order}
+
+SORT
+
+EXECUTE {begin.bib}
+
+ITERATE {call.type$}
+
+EXECUTE {end.bib}
diff --git a/biblio/bibtex/contrib/gbt7714/gbt7714.dtx b/biblio/bibtex/contrib/gbt7714/gbt7714.dtx
new file mode 100644
index 0000000000..cfadbd888b
--- /dev/null
+++ b/biblio/bibtex/contrib/gbt7714/gbt7714.dtx
@@ -0,0 +1,3884 @@
+% \iffalse meta-comment
+% GB/T 7714-2015 BibTeX Style
+% https://github.com/CTeX-org/gbt7714-bibtex-style
+%
+% Copyright (C) 2016-2019 by Zeping Lee <zepinglee AT gmail.com>
+%
+% This file may be distributed and/or modified under the
+% conditions of the LaTeX Project Public License, either version 1.3c
+% of this license or (at your option) any later version.
+% The latest version of this license is in
+% https://www.latex-project.org/lppl.txt
+% and version 1.3c or later is part of all distributions of LaTeX
+% version 2005/12/01 or later.
+%
+%<*internal>
+\iffalse
+\fi
+\begingroup
+ \def\nameoflatex{LaTeX2e}
+\expandafter\endgroup\ifx\nameoflatex\fmtname\else
+\csname fi\endcsname
+%</internal>
+%<*install>
+\input docstrip.tex
+\preamble
+-------------------------------------------------------------------
+GB/T 7714-2015 BibTeX Style
+https://github.com/CTeX-org/gbt7714-bibtex-style
+Version: 2019/03/21 v1.1.1
+-------------------------------------------------------------------
+Copyright (C) 2016-\the\year by Zeping Lee <zepinglee AT gmail.com>
+-------------------------------------------------------------------
+This file may be distributed and/or modified under the
+conditions of the LaTeX Project Public License, either version 1.3c
+of this license or (at your option) any later version.
+The latest version of this license is in
+ https://www.latex-project.org/lppl.txt
+and version 1.3c or later is part of all distributions of LaTeX
+version 2005/12/01 or later.
+-------------------------------------------------------------------
+\endpreamble
+\keepsilent
+\askforoverwritefalse
+\nopostamble
+\generate{
+ \file{\jobname.sty}{\from{\jobname.dtx}{package}}
+ \file{\jobname-plain.bst}{\from{\jobname.dtx}{2015,authoryear}}
+ \file{\jobname-unsrt.bst}{\from{\jobname.dtx}{2015,numerical}}
+ \file{versions/2005/\jobname-2005-plain.bst}{
+ \from{\jobname.dtx}{2005,authoryear}
+ }
+ \file{versions/2005/\jobname-2005-unsrt.bst}{
+ \from{\jobname.dtx}{2005,numerical}
+ }
+ \file{versions/thu/thuthesis-author-year.bst}{
+ \from{\jobname.dtx}{thu,2005,authoryear}}
+ \file{versions/thu/thuthesis-numeric.bst}{
+ \from{\jobname.dtx}{thu,2005,numerical}}
+ \file{versions/thu/thuthesis-bachelor.bst}{
+ \from{\jobname.dtx}{2015,numerical}}
+ \file{versions/ustc/ustcthesis-authoryear.bst}{
+ \from{\jobname.dtx}{ustc,2015,authoryear}
+ }
+ \file{versions/ustc/ustcthesis-numerical.bst}{
+ \from{\jobname.dtx}{ustc,2015,numerical}
+ }
+ \file{versions/ustc/ustcthesis-bachelor.bst}{
+ \from{\jobname.dtx}{ustc,2015,numerical,nouppercase,nomark,italicjournal}
+ }
+}
+\endbatchfile
+%</install>
+%<*internal>
+\fi
+%</internal>
+%<*driver>
+\ProvidesFile{\jobname.dtx}
+%</driver>
+%<package>\NeedsTeXFormat{LaTeX2e}[1999/12/01]
+%<package>\ProvidesPackage{gbt7714}
+%<*package>
+ [2019/03/21 v1.1.1 GB/T 7714-2015 BibTeX Style]
+%</package>
+%
+%<*driver>
+\documentclass[a4paper]{ltxdoc}
+\usepackage[paper=a4paper,margin=1in,left=1.25in]{geometry}
+\usepackage{hypdoc}
+\hypersetup{allcolors=blue}
+\usepackage[UTF8]{ctex}
+\IfFileExists{/System/Library/Fonts/Times.ttc}{
+ \setmainfont{Times}
+ \setsansfont[Scale=MatchLowercase]{Helvetica}
+ \setmonofont[Scale=MatchLowercase]{Menlo}
+}{}
+\usepackage{caption}
+\usepackage{booktabs}
+\usepackage{gbt7714}
+\usepackage{listings}
+\lstnewenvironment{latex}{%
+ \lstset{%
+ basicstyle = \ttfamily\small,
+ language = [LaTeX]TeX,
+ gobble = 2,
+ frame = single,}}{}
+\lstnewenvironment{pseudocode}{%
+ \lstset{%
+ basicstyle=\ttfamily\small,
+ language=bash,
+ gobble=2,
+ frame=single,}}{}
+\makeatletter
+\def\DescribeOption{\leavevmode\@bsphack\begingroup\MakePrivateLetters
+ \Describe@Option}
+\def\Describe@Option#1{\endgroup
+ \marginpar{\raggedleft\PrintDescribeOption{#1}}%
+ \SpecialEnvIndex{#1}\@esphack\ignorespaces}
+\@ifundefined{PrintDescribeOption}
+ {\def\PrintDescribeOption#1{\strut \MacroFont #1\ }}{}
+\DeclareRobustCommand\file{\nolinkurl}
+\DeclareRobustCommand\env{\texttt}
+\DeclareRobustCommand\pkg{\textsf}
+\DeclareRobustCommand\cls{\textsf}
+\DeclareRobustCommand\opt{\texttt}
+\setlength\partopsep{\z@}
+\def\@listi{\leftmargin\leftmargini
+ \parsep \z@
+ \topsep 5\p@ \@plus2\p@ \@minus3\p@
+ \itemsep\z@}
+\let\@listI\@listi
+\@listi
+\renewcommand\glossaryname{版本历史}
+\GlossaryPrologue{\section*{\glossaryname}}
+\renewcommand*{\changes@}[3]{%
+ \protected@edef\@tempa{%
+ \noexpand\glossary{#1 (#2)\levelchar
+ \ifx\saved@macroname\@empty
+ \space\actualchar\generalname
+ \else
+ \expandafter\@gobble\saved@macroname
+ \actualchar
+ \string\verb\quotechar*\verbatimchar\saved@macroname\verbatimchar
+ \fi
+ :\levelchar #3}}%
+ \@tempa
+ \endgroup
+ \@esphack
+}
+\makeatother
+\EnableCrossrefs
+\CodelineIndex
+\RecordChanges
+% \OnlyDescription
+
+\begin{document}
+ \DocInput{\jobname.dtx}
+\end{document}
+%</driver>
+% \fi
+%
+%
+%
+% \GetFileInfo{\jobname.dtx}
+%
+% \title{GB/T 7714-2015 \BibTeX{} style}
+% \author{Zeping Lee\thanks{zepinglee AT gmail.com}}
+% \date{\filedate\qquad\fileversion}
+% \maketitle
+%
+% \changes{v1.0}{2018/01/01}{Initial release.}
+%
+%
+% \begin{abstract}
+% The \pkg{gbt7714} package provides a \BibTeX{} implementation for the China's
+% bibliography style standard GB/T 7714-2015.
+% It consists of two bst files for numerical and authoryear styles as well as a
+% \LaTeX{} package which provides the citation style defined in the standard.
+% It is compatible with \pkg{natbib} and supports language detection (Chinese
+% and English) for each biblilography entry.
+% \end{abstract}
+%
+% \section{简介}
+%
+% GB/T 7714-2015 《信息与文献\quad 参考文献著录规则》\cite{gbt77142015}
+% (以下简称“国标”)是中国的参考文献推荐标准。
+% 本宏包是国标的 \BibTeX{}\cite{bibtex} 实现,具有以下特性:
+% \begin{itemize}
+% \item 兼容 \pkg{natbib} 宏包\cite{natbib}
+% \item 支持顺序编码制和著者-出版年制两种风格
+% \item 自动识别语言并进行相应处理
+% \item 提供了简单的接口供用户修改样式
+% \end{itemize}
+% 本宏包的主页:\url{https://github.com/CTeX-org/gbt7714-bibtex-style}。
+%
+%
+% \section{使用方法}
+%
+% \DescribeOption{super}
+% \DescribeOption{numbers}
+% \DescribeOption{authoryear}
+% 按照国标的规定,参考文献的标注体系分为“顺序编码制”和
+% “著者-出版年制”(\opt{authoryear}),
+% 其中顺序编码制根据引用标注样式的不同分为角标数字式(\opt{super})和
+% 与正文平排的数字式(\opt{numbers})。
+%
+% 用户应在导言区调用宏包 \pkg{gbt7714},并在参数中选择参考文献的标注样式。
+% 默认的参数是 \opt{super},额外的参数会传递给 \pkg{natbib} 宏包,比如:
+% \begin{latex}
+% \usepackage[authoryear]{gbt7714}
+% \end{latex}
+% 然后\emph{不再}需要调用 \cs{bibliographystyle} 命令设置参考文献列表风格。
+%
+% 使用时需要注意以下几点:
+% \begin{itemize}
+% \item \emph{不}再需要调用 \cs{bibliographystyle} 命令选择参考文献表的格式。
+% \item bib 数据库应使用 UTF-8 编码。
+% \item 使用著者-出版年制参考文献表时,中文的文献\emph{必须}
+% 在 key 域填写作者姓名的拼音,才能按照拼音排序,
+% 详见第~\ref{sec:sort}~节。
+% \end{itemize}
+%
+% \DescribeMacro{\cite}
+% 在正文中引用文献时应使用 \cs{cite} 命令。
+% 同一处引用多篇文献时,应将各篇文献的 key 一同写在 \cs{cite} 命令中,
+% 如 |\cite{knuth84,lamport94,mittelbach04}|。
+% 如遇连续编号,可以自动转为起讫序号并用短横线连接。
+% 它可以自动排序并用处理连续编号。
+% 若需要标出引文的页码,可以标在 \cs{cite} 的可选参数中,如
+% |\cite[42]{knuth84}|。
+% 更多的引用标注方法可以参考 \pkg{natbib} 宏包的使用说明\cite{natbib}。
+%
+% \DescribeMacro{\bibliography}
+% 参考文献表可以在文中使用 \cs{bibliography} 命令调用。
+% 注意文献列表的样式已经在模板中根据选项设置,
+% 用户\emph{不再}需要使用 \cs{bibliographystyle} 命令。
+%
+%
+% \section{文献类型}
+%
+% 国标中规定了 16 种参考文献类型,
+% 表~\ref{tab:entry-types} 列举了 \file{bib} 数据库中对应的文献类型。
+% 这些尽可能兼容 \BibTeX{} 的标准类型,但是新增了若干文献类型(带 * 号)。
+%
+% \begin{table}[htb]
+% \centering\small
+% \caption{全部文献类型}
+% \label{tab:entry-types}
+% \begin{tabular}{lcl}
+% \toprule
+% 文献类型 & 标识代码 & Entry Type \\
+% \midrule
+% 普通图书 & M & book \\
+% 图书的析出文献 & M & incollection \\
+% 会议录 & C & proceedings \\
+% 会议录的析出文献 & C & inproceedings 或 conference \\
+% 汇编 & G & collection* \\
+% 报纸 & N & newspaper* \\
+% 期刊的析出文献 & J & article \\
+% 学位论文 & D & mastersthesis 或 phdthesis \\
+% 报告 & R & techreport \\
+% 标准 & S & standard* \\
+% 专利 & P & patent* \\
+% 数据库 & DB & database* \\
+% 计算机程序 & CP & software* \\
+% 电子公告 & EB & online* \\
+% 档案 & A & archive* \\
+% 舆图 & CM & map* \\
+% 数据集 & DS & dataset* \\
+% 其他 & Z & misc \\
+% \bottomrule
+% \end{tabular}
+% \end{table}
+%
+%
+% \section{著录项目}
+%
+% 由于国标中规定的著录项目多于 \BibTeX{} 的标准域,
+% 必须新增一些著录项目(带 * 号),
+% 这些新增的类型在设计时参考了 BibLaTeX,如 date 和 urldate。
+% 本宏包支持的全部域如下:
+% \begin{description}
+% \item[author] 主要责任者
+% \item[title] 题名
+% \item[mark*] 文献类型标识
+% \item[medium*] 载体类型标识
+% \item[translator*] 译者
+% \item[editor] 编辑
+% \item[organization] 组织(用于会议)
+% \item[booktitle] 图书题名
+% \item[series] 系列
+% \item[journal] 期刊题名
+% \item[edition] 版本
+% \item[address] 出版地
+% \item[publisher] 出版者
+% \item[school] 学校(用于phdthesis)
+% \item[institution] 机构(用于techreport)
+% \item[year] 出版年
+% \item[volume] 卷
+% \item[number] 期(或者专利号)
+% \item[pages] 引文页码
+% \item[date*] 更新或修改日期
+% \item[urldate*] 引用日期
+% \item[url] 获取和访问路径
+% \item[doi] 数字对象唯一标识符
+% \item[language*] 语言
+% \item[key] 拼音(用于排序)
+% \end{description}
+% 不支持的 \BibTeX{} 标准著录项目有 annote, chapter, crossref, month, type。
+%
+% 本宏包默认情况下可以自动识别文献语言,并自动处理文献类型和载体类型标识,
+% 但是在少数情况下需要用户手动指定,如:
+% \begin{latex}
+% @misc{citekey,
+% language = {japanese},
+% mark = {Z},
+% medium = {DK},
+% ...
+% \end{latex}
+% 可选的语言有 english, chinese, japanese, russian。
+%
+%
+% \section{文献列表的排序}
+% \label{sec:sort}
+%
+% 国标规定参考文献表采用著者-出版年制组织时,各篇文献首先按文种集中,
+% 然后按著者字顺和出版年排列;
+% 中文文献可以按著者汉语拼音字顺排列,也可以按著者的笔画笔顺排列。
+% 然而由于 \BibTeX{} 功能的局限性,无法自动获取著者姓名的拼音或笔画笔顺,
+% 所以\emph{必须}在 bib 数据库中的 key 域手动录入著者姓名的拼音,如:
+% \begin{latex}
+% @book{capital,
+% author = {马克思 and 恩格斯},
+% key = {ma3 ke4 si1 en1 ge2 si1},
+% ...
+% \end{latex}
+%
+%
+% \section{自定义样式}
+%
+% \BibTeX{} 对自定义样式的支持比较有限,
+% 所以用户只能通过修改 \file{bst} 文件来修改文献列表的格式。
+% 本宏包提供了一些接口供用户更方便地修改。
+%
+% 在 \file{bst} 文件开始处的 |load.config| 函数中,
+% 有一组配置参数用来控制样式,表~\ref{tab:config} 列出了每一项的默认值和功能。
+% 若变量被设为 |#1| 则表示该项被启用,设为 |#0| 则不启用。
+% 默认的值是严格遵循国标的配置。
+%
+% \begin{table}[htb]
+% \centering\small
+% \caption{参考文献表样式的配置参数}
+% \label{tab:config}
+% \begin{tabular}{lcl}
+% \toprule
+% 参数值 & 默认值 & 功能 \\
+% \midrule
+% uppercase.name & |#1| & 将著者姓名转为大写 \\
+% max.num.authors & |#3| & 输出著者的最多数量 \\
+% period.between.author.year & |#0| & 著者和年份之间使用句点连接 \\
+% sentence.case.title & |#1| & 将西文的题名转为 sentence case \\
+% link.title & |#0| & 在题名上添加 url 的超链接 \\
+% show.mark & |#1| & 显示文献类型标识 \\
+% italic.jounal & |#0| & 西文期刊名使用斜体 \\
+% show.missing.address.publisher & |#1| & 出版项缺失时显示“出版者不详” \\
+% show.url & |#1| & 显示 url \\
+% show.doi & |#1| & 显示 doi \\
+% show.note & |#0| & 显示 note 域的信息 \\
+% \bottomrule
+% \end{tabular}
+% \end{table}
+%
+% 若用户需要定制更多内容,可以学习 \file{bst} 文件的语法并修改
+% \cite{btxhak,ttb,tlc2},或者联系作者。
+%
+%
+% \section{相关工作}
+%
+% TeX 社区也有其他关于 GB/T 7714 系列参考文献标准的工作。
+% 2005 年吴凯\cite{wk2006}发布了基于 GB/T 7714-2005 的 \BibTeX{} 样式,
+% 支持顺序编码制和著者出版年制两种风格。
+% 李志奇\cite{lqz2013}发布了严格遵循 GB/T 7714-2005 的 BibLaTeX 的样式。
+% 胡海星\cite{hhx2013}提供了另一个 \BibTeX{} 实现,
+% 还给每行 bst 代码写了 java 语言注释。
+% 沈周\cite{sz2016}基于 \pkg{biblatex-caspervector}\cite{vector2012} 进行修改,
+% 以符合国标的格式。
+% 胡振震发布了符合 GB/T 7714-2015 标准的 BibLaTeX 参考文献样式\cite{hzz2016},
+% 并进行了比较完善的持续维护。
+%
+%
+% \begin{thebibliography}{12}
+% \providecommand{\natexlab}[1]{#1}
+% \providecommand{\url}[1]{#1}
+% \expandafter\ifx\csname urlstyle\endcsname\relax\relax\else
+% \urlstyle{same}\fi
+% \providecommand{\href}[2]{\url{#2}}
+% \providecommand{\doi}[1]{\href{https://doi.org/#1}{#1}}
+%
+% \bibitem[{中国国家标准化委员会}(2015)]{gbt77142015}
+% {中国国家标准化委员会}.
+% \newblock 信息与文献\quad 参考文献著录规则: GB/T
+% 7714--2015\allowbreak[S].
+% \newblock 北京: 中国标准出版社, 2015.
+%
+% \bibitem[Patashnik(1988{\natexlab{a}})]{bibtex}
+% PATASHNIK~O.
+% \newblock {\BibTeX}ing\allowbreak[M/OL].
+% \newblock 1988{\natexlab{a}}.
+% \newblock \url{http://mirrors.ctan.org/biblio/bibtex/base/btxdoc.pdf}.
+%
+% \bibitem[Daly(1999)]{natbib}
+% DALY~P~W.
+% \newblock Natural sciences citations and references\allowbreak[M/OL].
+% \newblock 1999.
+% \newblock \url{http://mirrors.ctan.org/macros/latex/contrib/natbib/natbib.pdf}.
+%
+% \bibitem[Patashnik(1988{\natexlab{b}})]{btxhak}
+% PATASHNIK~O.
+% \newblock Designing {\BibTeX} styles\allowbreak[M/OL].
+% \newblock 1988{\natexlab{b}}.
+% \newblock \url{http://mirrors.ctan.org/biblio/bibtex/base/btxhak.pdf}.
+%
+% \bibitem[Markey(2003)]{ttb}
+% MARKEY~N.
+% \newblock Tame the beast\allowbreak[M/OL].
+% \newblock 2003.
+% \newblock \url{http://mirrors.ctan.org/info/bibtex/tamethebeast/ttb_en.pdf}.
+%
+% \bibitem[Mittelbach\ et~al.(2004)Mittelbach, Goossens, Braams, Carlisle, and
+% Rowley]{tlc2}
+% MITTELBACH~F, GOOSSENS~M, BRAAMS~J, et~al.
+% \newblock The {\LaTeX} companion\allowbreak[M].
+% \newblock 2nd ed.
+% \newblock Reading, MA, USA: Addison-Wesley, 2004.
+%
+% \bibitem[吴凯(2006)]{wk2006}
+% 吴凯.
+% \newblock 发布GBT7714-2005.bst version1 Beta版\allowbreak[EB/OL].
+% \newblock 2006.
+% \newblock \url{http://bbs.ctex.org/forum.php?mod=viewthread&tid=33591}.
+%
+% \bibitem[李志奇(2013)]{lqz2013}
+% 李志奇.
+% \newblock
+% 基于biblatex的符合GBT7714-2005的中文文献生成工具\allowbreak[EB/OL].
+% \newblock 2013.
+% \newblock \url{http://bbs.ctex.org/forum.php?mod=viewthread&tid=74474}.
+%
+% \bibitem[胡海星(2013)]{hhx2013}
+% 胡海星.
+% \newblock A GB/T 7714-2005 national standard compliant BibTeX
+% style\allowbreak[EB/OL].
+% \newblock 2013.
+% \newblock \url{https://github.com/Haixing-Hu/GBT7714-2005-BibTeX-Style}.
+%
+% \bibitem[沈周(2016)]{sz2016}
+% 沈周.
+% \newblock 基于caspervector改写的符合GB/T
+% 7714-2005标准的参考文献格式\allowbreak[EB/OL].
+% \newblock 2016.
+% \newblock \url{https://github.com/szsdk/biblatex-gbt77142005}.
+%
+% \bibitem[Vector(2012)]{vector2012}
+% VECTOR~C~T.
+% \newblock biblatex 参考文献和引用样式: caspervector\allowbreak[M/OL].
+% \newblock 2012.
+% \newblock
+% \url{http://mirrors.ctan.org/macros/latex/contrib/biblatex-contrib/biblatex-caspervector/doc/caspervector.pdf}.
+%
+% \bibitem[胡振震(2016)]{hzz2016}
+% 胡振震.
+% \newblock 符合 GB/T 7714-2015 标准的 biblatex
+% 参考文献样式\allowbreak[M/OL].
+% \newblock 2016.
+% \newblock
+% \url{http://mirrors.ctan.org/macros/latex/contrib/biblatex-contrib/biblatex-gb7714-2015/biblatex-gb7714-2015.pdf}.
+%
+% \end{thebibliography}
+%
+%
+% \linespread{1.3}
+% \PrintChanges
+%
+%
+% \clearpage
+% \appendix
+% \StopEventually{}
+%
+% \section{宏包的代码实现}
+%
+% 下面声明和处理宏包的选项,有 \opt{authoryear} 和 \opt{numbers}。
+% \begin{macrocode}
+%<*package>
+\newif\if@gbt@mmxv
+\newif\if@gbt@numerical
+\newif\if@gbt@super
+\DeclareOption{2015}{\@gbt@mmxvtrue}
+\DeclareOption{2005}{\@gbt@mmxvfalse}
+\DeclareOption{super}{\@gbt@numericaltrue\@gbt@supertrue}
+\DeclareOption{numbers}{\@gbt@numericaltrue\@gbt@superfalse}
+\DeclareOption{authoryear}{\@gbt@numericalfalse}
+\DeclareOption*{\PassOptionsToPackage{\CurrentOption}{natbib}}
+\ExecuteOptions{2015,super}
+\ProcessOptions\relax
+% \end{macrocode}
+%
+% 只在顺序编码时使用 \opt{sort\&compress}。
+% \changes{v1.0.1}{2018/03/09}{著者出版年制的文献引用不再排序}
+% \begin{macrocode}
+\if@gbt@numerical
+ \PassOptionsToPackage{sort&compress}{natbib}
+\fi
+\RequirePackage{natbib}
+\RequirePackage{etoolbox}
+\RequirePackage{url}
+% \end{macrocode}
+%
+% \begin{macro}{\citestyle}
+% 定义接口切换引用文献的标注法,可用 \cs{citestyle} 调用 \opt{numerical}
+% 或 \opt{authoryear},参见 \pkg{natbib}。
+% \begin{macrocode}
+\newcommand\bibstyle@super{\bibpunct{[}{]}{,}{s}{,}{\textsuperscript{,}}}
+\newcommand\bibstyle@numbers{\bibpunct{[}{]}{,}{n}{,}{,}}
+\newcommand\bibstyle@authoryear{\bibpunct{(}{)}{;}{a}{,}{,}}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\gbtbibstyle}
+% 定义接口切换参考文献表的风格,可选 \opt{authoryear} 和 \opt{numerical},
+% 这个仅用于\pkg{chapterbib}。
+% \begin{macrocode}
+\newcommand\gbtbibstyle[1]{%
+ \ifstrequal{#1}{numerical}{%
+ \if@gbt@mmxv
+ \bibliographystyle{gbt7714-unsrt}%
+ \else
+ \bibliographystyle{gbt7714-2005-unsrt}%
+ \fi
+ }{%
+ \ifstrequal{#1}{authoryear}{%
+ \if@gbt@mmxv
+ \bibliographystyle{gbt7714-plain}%
+ \else
+ \bibliographystyle{gbt7714-2005-plain}%
+ \fi
+ }{%
+ \PackageError{gbt7714}{Unknown argument #1.}%
+ {It should be `numerical' or `authoryear'.}%
+ }%
+ }%
+}
+% \end{macrocode}
+% \end{macro}
+%
+% 处理宏包选项。
+% \begin{macrocode}
+\if@gbt@numerical
+ \if@gbt@super
+ \citestyle{super}%
+ \gbtbibstyle{numerical}%
+ \else
+ \citestyle{numbers}
+ \gbtbibstyle{numerical}%
+ \fi
+\else
+ \citestyle{authoryear}
+ \gbtbibstyle{authoryear}%
+\fi
+% \end{macrocode}
+%
+% \begin{macro}{\cite}
+% 下面修改 \pkg{natbib} 的引用格式,主要是将页码写在上标位置。
+% Numerical 模式的 \cs{citet} 的页码:
+% \begin{macrocode}
+\newcommand\gbt@patchfailure[1]{%
+ \PackageError{gbt7714}{Failed to patch command \protect#1}{}%
+}
+\patchcmd{\NAT@citexnum}{%
+ \@ifnum{\NAT@ctype=\z@}{%
+ \if*#2*\else\NAT@cmt#2\fi
+ }{}%
+ \NAT@mbox{\NAT@@close}%
+}{%
+ \NAT@mbox{\NAT@@close}%
+ \@ifnum{\NAT@ctype=\z@}{%
+ \if*#2*\else\textsuperscript{#2}\fi
+ }{}%
+}{}{\gbt@patchfailure{\NAT@citexnum}}
+% \end{macrocode}
+%
+% Numerical 模式的 \cs{citep} 的页码:
+% \begin{macrocode}
+\renewcommand\NAT@citesuper[3]{\ifNAT@swa
+ \if*#2*\else#2\NAT@spacechar\fi
+\unskip\kern\p@\textsuperscript{\NAT@@open#1\NAT@@close\if*#3*\else#3\fi}%
+ \else #1\fi\endgroup}
+% \end{macrocode}
+%
+% Author-year 模式的 \cs{citet} 的页码:
+% \begin{macrocode}
+\patchcmd{\NAT@citex}{%
+ \if*#2*\else\NAT@cmt#2\fi
+ \if\relax\NAT@date\relax\else\NAT@@close\fi
+}{%
+ \if\relax\NAT@date\relax\else\NAT@@close\fi
+ \if*#2*\else\textsuperscript{#2}\fi
+}{}{\gbt@patchfailure{\NAT@citex}}
+% \end{macrocode}
+%
+% Author-year 模式的 \cs{citep} 的页码:
+% \begin{macrocode}
+\renewcommand\NAT@cite%
+ [3]{\ifNAT@swa\NAT@@open\if*#2*\else#2\NAT@spacechar\fi
+ #1\NAT@@close\if*#3*\else\textsuperscript{#3}\fi\else#1\fi\endgroup}
+% \end{macrocode}
+%
+% 在顺序编码制下,\pkg{natbib} 只有在三个以上连续文献引用才会使用连接号,
+% 这里修改为允许两个引用使用连接号。
+% \changes{v1.0.3}{2018/03/29}{顺序编码制连续两个文献引用之间使用连接号}
+% \changes{v1.0.4}{2018/04/12}{页码的连接号由 en dash 改为 hyphen}
+% \begin{macrocode}
+\patchcmd{\NAT@citexnum}{%
+ \ifx\NAT@last@yr\relax
+ \def@NAT@last@yr{\@citea}%
+ \else
+ \def@NAT@last@yr{--\NAT@penalty}%
+ \fi
+}{%
+ \def@NAT@last@yr{-\NAT@penalty}%
+}{}{\gbt@patchfailure{\NAT@citexnum}}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{environment}{thebibliography}
+% 参考文献列表的标签左对齐
+% \changes{v1.0.6}{2018/05/10}{文献列表的数字标签左对齐}
+% \begin{macrocode}
+\renewcommand\@biblabel[1]{[#1]\hfill}
+% \end{macrocode}
+% \end{environment}
+%
+% \begin{macro}{\url}
+% 使用 \pkg{xurl} 宏包的方法,增加 URL 可断行的位置。
+% \changes{v1.0.8}{2018/06/23}{使用 \pkg{xurl} 的方法改进 URL 断行}
+% \begin{macrocode}
+\def\UrlBreaks{%
+ \do\/%
+ \do\a\do\b\do\c\do\d\do\e\do\f\do\g\do\h\do\i\do\j\do\k\do\l%
+ \do\m\do\n\do\o\do\p\do\q\do\r\do\s\do\t\do\u\do\v\do\w\do\x\do\y\do\z%
+ \do\A\do\B\do\C\do\D\do\E\do\F\do\G\do\H\do\I\do\J\do\K\do\L%
+ \do\M\do\N\do\O\do\P\do\Q\do\R\do\S\do\T\do\U\do\V\do\W\do\X\do\Y\do\Z%
+ \do0\do1\do2\do3\do4\do5\do6\do7\do8\do9\do=\do/\do.\do:%
+ \do\*\do\-\do\~\do\'\do\"\do\-}
+\Urlmuskip=0mu plus 0.1mu
+%</package>
+% \end{macrocode}
+% \end{macro}
+%
+%
+%
+% \section{BibTeX 样式的代码实现}
+% \label{bst-implementation}
+% \linespread{1}
+%
+% \subsection{自定义选项}
+% \label{sec:options}
+%
+% \begin{environment}{bst}
+% 这里定义了一些变量用于定制样式,
+% 可以在下面的 |load.config| 函数中选择是否启用。
+% \changes{v1.0.8}{2018/06/23}{新增接口供用户自定义样式}
+% \begin{macrocode}
+%<*authoryear|numerical>
+INTEGERS {
+ uppercase.name
+ max.num.authors
+ period.between.author.year
+ sentence.case.title
+ link.title
+ show.mark
+ slash.for.extraction
+ in.booktitle
+ italic.jounal
+ bold.journal.volume
+ show.missing.address.publisher
+ show.url
+ show.doi
+ show.note
+%<*authoryear>
+ lang.zh.order
+ lang.ja.order
+ lang.en.order
+ lang.ru.order
+ lang.other.order
+%</authoryear>
+}
+
+% \end{macrocode}
+%
+% 下面每个变量若被设为 |#1| 则启用该项,若被设为 |#0| 则不启用。
+% 默认的值是严格遵循国标的配置。
+% \begin{macrocode}
+FUNCTION {load.config}
+{
+% \end{macrocode}
+%
+% 英文姓名转为全大写:
+% \begin{macrocode}
+ #1 'uppercase.name :=
+%<*nouppercase|thu>
+ #0 'uppercase.name :=
+%</nouppercase|thu>
+% \end{macrocode}
+%
+% 最多显示的作者数量:
+% \begin{macrocode}
+ #3 'max.num.authors :=
+% \end{macrocode}
+%
+% 采用著者-出版年制时,作者姓名与年份之间使用句点连接:
+% \begin{macrocode}
+%<*authoryear>
+ #0 'period.between.author.year :=
+%<*period|2005|ustc>
+ #1 'period.between.author.year :=
+%</period|2005|ustc>
+%</authoryear>
+% \end{macrocode}
+%
+% 英文标题转为 sentence case (句首字母大写,其余小写):
+% \begin{macrocode}
+ #1 'sentence.case.title :=
+%<*nosentencecase>
+ #0 'sentence.case.title :=
+%</nosentencecase>
+% \end{macrocode}
+%
+% 在标题添加超链接:
+% \begin{macrocode}
+ #0 'link.title :=
+%<*linktitle>
+ #1 'link.title :=
+%</linktitle>
+% \end{macrocode}
+%
+% 著录文献类型标识(比如“[M/OL]“):
+% \begin{macrocode}
+ #1 'show.mark :=
+%<*nomark>
+ #0 'show.mark :=
+%</nomark>
+% \end{macrocode}
+%
+% 使用“//”表示析出文献
+% \begin{macrocode}
+ #1 'slash.for.extraction :=
+%<*noslash>
+ #0 'slash.for.extraction :=
+%</noslash>
+% \end{macrocode}
+%
+% 使用“In:”表示析出文献
+% \begin{macrocode}
+ #0 'in.booktitle :=
+% \end{macrocode}
+%
+% 期刊名使用斜体:
+% \begin{macrocode}
+ #0 'italic.jounal :=
+%<*italicjournal>
+ #1 'italic.jounal :=
+%</italicjournal>
+% \end{macrocode}
+%
+% 期刊的卷使用粗体:
+% \begin{macrocode}
+ #0 'bold.journal.volume :=
+% \end{macrocode}
+%
+% 无出版地或出版者时,著录“出版地不详”,“出版者不详”,“S.l.” 或 “s.n.”:
+% \begin{macrocode}
+ #1 'show.missing.address.publisher :=
+%<*noslsn|ustc>
+ #0 'show.missing.address.publisher :=
+%</noslsn|ustc>
+% \end{macrocode}
+%
+% 是否著录 URL:
+% \begin{macrocode}
+ #1 'show.url :=
+%<*nourl>
+ #0 'show.url :=
+%</nourl>
+% \end{macrocode}
+%
+% 是否著录 DOI:
+% \begin{macrocode}
+ #1 'show.doi :=
+%<*nodoi|2005>
+ #0 'show.doi :=
+%</nodoi|2005>
+% \end{macrocode}
+%
+% 在每一条文献最后输出注释(note)的内容:
+% \begin{macrocode}
+ #0 'show.note :=
+% \end{macrocode}
+%
+% \changes{v1.1.1}{2019/03/21}{允许自定义文种的顺序}
+% 参考文献表按照“著者-出版年”组织时,各个文种的顺序:
+% \begin{macrocode}
+%<*authoryear>
+ #1 'lang.zh.order :=
+ #2 'lang.ja.order :=
+ #3 'lang.en.order :=
+ #4 'lang.ru.order :=
+ #5 'lang.other.order :=
+%</authoryear>
+}
+
+% \end{macrocode}
+%
+%
+% \subsection{The ENTRY declaration}
+%
+% Like Scribe's (according to pages 231-2 of the April '84 edition),
+% but no fullauthor or editors fields because BibTeX does name handling.
+% The annote field is commented out here because this family doesn't
+% include an annotated bibliography style. And in addition to the fields
+% listed here, BibTeX has a built-in crossref field, explained later.
+% \begin{macrocode}
+ENTRY
+ { address
+ author
+ booktitle
+ date
+ doi
+ edition
+ editor
+ howpublished
+ institution
+ journal
+ key
+ language
+ mark
+ medium
+ note
+ number
+ organization
+ pages
+ publisher
+ school
+ series
+ title
+ translator
+ url
+ urldate
+ volume
+ year
+ }
+ { entry.lang entry.is.electronic entry.numbered }
+% \end{macrocode}
+%
+% These string entry variables are used to form the citation label.
+% In a storage pinch, sort.label can be easily computed on the fly.
+% \begin{macrocode}
+ { label extra.label sort.label short.list entry.mark entry.url }
+
+% \end{macrocode}
+%
+%
+% \subsection{Entry functions}
+%
+% Each entry function starts by calling output.bibitem, to write the
+% |\bibitem| and its arguments to the .BBL file. Then the various fields
+% are formatted and printed by output or output.check. Those functions
+% handle the writing of separators (commas, periods, |\newblock|'s),
+% taking care not to do so when they are passed a null string.
+% Finally, fin.entry is called to add the final period and finish the
+% entry.
+%
+% A bibliographic reference is formatted into a number of `blocks':
+% in the open format, a block begins on a new line and subsequent
+% lines of the block are indented. A block may contain more than
+% one sentence (well, not a grammatical sentence, but something to
+% be ended with a sentence ending period). The entry functions should
+% call new.block whenever a block other than the first is about to be
+% started. They should call new.sentence whenever a new sentence is
+% to be started. The output functions will ensure that if two
+% new.sentence's occur without any non-null string being output between
+% them then there won't be two periods output. Similarly for two
+% successive new.block's.
+%
+% The output routines don't write their argument immediately.
+% Instead, by convention, that argument is saved on the stack to be
+% output next time (when we'll know what separator needs to come
+% after it). Meanwhile, the output routine has to pop the pending
+% output off the stack, append any needed separator, and write it.
+%
+% To tell which separator is needed, we maintain an output.state.
+% It will be one of these values:
+% before.all just after the |\bibitem|
+% mid.sentence in the middle of a sentence: comma needed
+% if more sentence is output
+% after.sentence just after a sentence: period needed
+% after.block just after a block (and sentence):
+% period and |\newblock| needed.
+% Note: These styles don't use after.sentence
+%
+% VAR: output.state : INTEGER -- state variable for output
+%
+% The output.nonnull function saves its argument (assumed to be nonnull)
+% on the stack, and writes the old saved value followed by any needed
+% separator. The ordering of the tests is decreasing frequency of
+% occurrence.
+%
+% 由于专著中的析出文献需要用到很特殊的“//”,所以我又加了一个 after.slash。
+% 其他需要在特定符号后面输出,所以写了一个 output.after。
+%
+% \begin{pseudocode}
+% output.nonnull(s) ==
+% BEGIN
+% s := argument on stack
+% if output.state = mid.sentence then
+% write$(pop() * ", ")
+% -- "pop" isn't a function: just use stack top
+% else
+% if output.state = after.block then
+% write$(add.period$(pop()))
+% newline$
+% write$("\newblock ")
+% else
+% if output.state = before.all then
+% write$(pop())
+% else -- output.state should be after.sentence
+% write$(add.period$(pop()) * " ")
+% fi
+% fi
+% output.state := mid.sentence
+% fi
+% push s on stack
+% END
+% \end{pseudocode}
+%
+% The output function calls output.nonnull if its argument is non-empty;
+% its argument may be a missing field (thus, not necessarily a string)
+%
+% \begin{pseudocode}
+% output(s) ==
+% BEGIN
+% if not empty$(s) then output.nonnull(s)
+% fi
+% END
+% \end{pseudocode}
+%
+% The output.check function is the same as the output function except that, if
+% necessary, output.check warns the user that the t field shouldn't be empty
+% (this is because it probably won't be a good reference without the field;
+% the entry functions try to make the formatting look reasonable even when
+% such fields are empty).
+%
+% \begin{pseudocode}
+% output.check(s,t) ==
+% BEGIN
+% if empty$(s) then
+% warning$("empty " * t * " in " * cite$)
+% else output.nonnull(s)
+% fi
+% END
+% \end{pseudocode}
+%
+% The output.bibitem function writes the |\bibitem| for the current entry
+% (the label should already have been set up), and sets up the separator
+% state for the output functions. And, it leaves a string on the stack
+% as per the output convention.
+%
+% \begin{pseudocode}
+% output.bibitem ==
+% BEGIN
+% newline$
+% write$("\bibitem[") % for alphabetic labels,
+% write$(label) % these three lines
+% write$("]{") % are used
+% write$("\bibitem{") % this line for numeric labels
+% write$(cite$)
+% write$("}")
+% push "" on stack
+% output.state := before.all
+% END
+% \end{pseudocode}
+%
+% The fin.entry function finishes off an entry by adding a period to the
+% string remaining on the stack. If the state is still before.all
+% then nothing was produced for this entry, so the result will look bad,
+% but the user deserves it. (We don't omit the whole entry because the
+% entry was cited, and a bibitem is needed to define the citation label.)
+%
+% \begin{pseudocode}
+% fin.entry ==
+% BEGIN
+% write$(add.period$(pop()))
+% newline$
+% END
+% \end{pseudocode}
+%
+% The new.block function prepares for a new block to be output, and
+% new.sentence prepares for a new sentence.
+%
+% \begin{pseudocode}
+% new.block ==
+% BEGIN
+% if output.state <> before.all then
+% output.state := after.block
+% fi
+% END
+% \end{pseudocode}
+%
+% \begin{pseudocode}
+% new.sentence ==
+% BEGIN
+% if output.state <> after.block then
+% if output.state <> before.all then
+% output.state := after.sentence
+% fi
+% fi
+% END
+% \end{pseudocode}
+% \begin{macrocode}
+INTEGERS { output.state before.all mid.sentence after.sentence after.block after.slash }
+
+INTEGERS { lang.zh lang.ja lang.en lang.ru lang.other }
+
+INTEGERS { charptr len }
+
+FUNCTION {init.state.consts}
+{ #0 'before.all :=
+ #1 'mid.sentence :=
+ #2 'after.sentence :=
+ #3 'after.block :=
+ #4 'after.slash :=
+ #3 'lang.zh :=
+ #4 'lang.ja :=
+ #1 'lang.en :=
+ #2 'lang.ru :=
+ #0 'lang.other :=
+}
+
+% \end{macrocode}
+%
+% 下面是一些常量的定义
+% \changes{v1.1}{2019/01/02}{允许自定义“et al”}
+% \begin{macrocode}
+FUNCTION {bbl.anonymous}
+{ entry.lang lang.zh =
+ { "佚名" }
+ { "Anon" }
+ if$
+}
+
+FUNCTION {bbl.space}
+{ entry.lang lang.zh =
+ { "\ " }
+ { " " }
+ if$
+}
+
+FUNCTION {bbl.et.al}
+{ entry.lang lang.zh =
+ { "等" }
+ { entry.lang lang.ja =
+ { "他" }
+ { entry.lang lang.ru =
+ { "идр" }
+ { "et~al." }
+ if$
+ }
+ if$
+ }
+ if$
+}
+
+FUNCTION {citation.et.al}
+{ bbl.et.al }
+
+FUNCTION {bbl.colon} { ": " }
+
+%<*2015>
+FUNCTION {bbl.wide.space} { "\quad " }
+%</2015>
+%<*2005>
+FUNCTION {bbl.wide.space} { "\ " }
+%</2005>
+
+FUNCTION {bbl.slash} { "//\allowbreak " }
+
+FUNCTION {bbl.sine.loco}
+{ entry.lang lang.zh =
+ { "[出版地不详]" }
+ { "[S.l.]" }
+ if$
+}
+
+FUNCTION {bbl.sine.nomine}
+{ entry.lang lang.zh =
+ { "[出版者不详]" }
+ { "[s.n.]" }
+ if$
+}
+
+FUNCTION {bbl.sine.loco.sine.nomine}
+{ entry.lang lang.zh =
+ { "[出版地不详: 出版者不详]" }
+ { "[S.l.: s.n.]" }
+ if$
+}
+
+% \end{macrocode}
+%
+% These three functions pop one or two (integer) arguments from the stack
+% and push a single one, either 0 or 1.
+% The |'skip$| in the `and' and `or' functions are used because
+% the corresponding |if$| would be idempotent
+% \begin{macrocode}
+FUNCTION {not}
+{ { #0 }
+ { #1 }
+ if$
+}
+
+FUNCTION {and}
+{ 'skip$
+ { pop$ #0 }
+ if$
+}
+
+FUNCTION {or}
+{ { pop$ #1 }
+ 'skip$
+ if$
+}
+
+% \end{macrocode}
+%
+% the variables s and t are temporary string holders
+% \begin{macrocode}
+STRINGS { s t }
+
+FUNCTION {output.nonnull}
+{ 's :=
+ output.state mid.sentence =
+ { ", " * write$ }
+ { output.state after.block =
+ { add.period$ write$
+ newline$
+ "\newblock " write$
+ }
+ { output.state before.all =
+ 'write$
+ { output.state after.slash =
+ { bbl.slash * write$
+ newline$
+ }
+ { add.period$ " " * write$ }
+ if$
+ }
+ if$
+ }
+ if$
+ mid.sentence 'output.state :=
+ }
+ if$
+ s
+}
+
+FUNCTION {output}
+{ duplicate$ empty$
+ 'pop$
+ 'output.nonnull
+ if$
+}
+
+FUNCTION {output.after}
+{ 't :=
+ duplicate$ empty$
+ 'pop$
+ { 's :=
+ output.state mid.sentence =
+ { t * write$ }
+ { output.state after.block =
+ { add.period$ write$
+ newline$
+ "\newblock " write$
+ }
+ { output.state before.all =
+ 'write$
+ { output.state after.slash =
+ { bbl.slash * write$ }
+ { add.period$ " " * write$ }
+ if$
+ }
+ if$
+ }
+ if$
+ mid.sentence 'output.state :=
+ }
+ if$
+ s
+ }
+ if$
+}
+
+FUNCTION {output.check}
+{ 't :=
+ duplicate$ empty$
+ { pop$ "empty " t * " in " * cite$ * warning$ }
+ 'output.nonnull
+ if$
+}
+
+% \end{macrocode}
+%
+% This function finishes all entries.
+%
+% Tsinghua requires no period at the end of book-like entries.
+% \begin{macrocode}
+FUNCTION {fin.entry}
+%<*!thu>
+{ add.period$
+%</!thu>
+%<*thu>
+{ type$ "book" =
+ type$ "inbook" = or
+ type$ "incollection" = or
+ type$ "collection" = or
+ 'skip$
+ 'add.period$
+ if$
+%</thu>
+ write$
+ newline$
+}
+
+FUNCTION {new.block}
+{ output.state before.all =
+ 'skip$
+ { output.state after.slash =
+ 'skip$
+ { after.block 'output.state := }
+ if$
+ }
+ if$
+}
+
+FUNCTION {new.sentence}
+{ output.state after.block =
+ 'skip$
+ { output.state before.all =
+ 'skip$
+ { output.state after.slash =
+ 'skip$
+ { after.sentence 'output.state := }
+ if$
+ }
+ if$
+ }
+ if$
+}
+
+FUNCTION {new.slash}
+{ output.state before.all =
+ 'skip$
+ { slash.for.extraction
+ { after.slash 'output.state := }
+ { after.block 'output.state := }
+ if$
+ }
+ if$
+}
+
+% \end{macrocode}
+%
+% Sometimes we begin a new block only if the block will be big enough. The
+% new.block.checka function issues a new.block if its argument is nonempty;
+% new.block.checkb does the same if either of its TWO arguments is nonempty.
+% \begin{macrocode}
+FUNCTION {new.block.checka}
+{ empty$
+ 'skip$
+ 'new.block
+ if$
+}
+
+FUNCTION {new.block.checkb}
+{ empty$
+ swap$ empty$
+ and
+ 'skip$
+ 'new.block
+ if$
+}
+
+% \end{macrocode}
+%
+% The new.sentence.check functions are analogous.
+% \begin{macrocode}
+FUNCTION {new.sentence.checka}
+{ empty$
+ 'skip$
+ 'new.sentence
+ if$
+}
+
+FUNCTION {new.sentence.checkb}
+{ empty$
+ swap$ empty$
+ and
+ 'skip$
+ 'new.sentence
+ if$
+}
+
+% \end{macrocode}
+%
+%
+% \subsection{Formatting chunks}
+%
+% Here are some functions for formatting chunks of an entry.
+% By convention they either produce a string that can be followed by
+% a comma or period (using |add.period$|, so it is OK to end in a period),
+% or they produce the null string.
+%
+% A useful utility is the field.or.null function, which checks if the
+% argument is the result of pushing a `missing' field (one for which no
+% assignment was made when the current entry was read in from the database)
+% or the result of pushing a string having no non-white-space characters.
+% It returns the null string if so, otherwise it returns the field string.
+% Its main (but not only) purpose is to guarantee that what's left on the
+% stack is a string rather than a missing field.
+%
+% \begin{pseudocode}
+% field.or.null(s) ==
+% BEGIN
+% if empty$(s) then return ""
+% else return s
+% END
+% \end{pseudocode}
+%
+% Another helper function is emphasize, which returns the argument emphazised,
+% if that is non-empty, otherwise it returns the null string. Italic
+% corrections aren't used, so this function should be used when punctation
+% will follow the result.
+%
+% \begin{pseudocode}
+% emphasize(s) ==
+% BEGIN
+% if empty$(s) then return ""
+% else return "{\em " * s * "}"
+% \end{pseudocode}
+%
+% The `pop\$' in this function gets rid of the duplicate `empty' value and
+% the `skip\$' returns the duplicate field value
+% \begin{macrocode}
+FUNCTION {field.or.null}
+{ duplicate$ empty$
+ { pop$ "" }
+ 'skip$
+ if$
+}
+
+FUNCTION {italicize}
+{ duplicate$ empty$
+ { pop$ "" }
+ { "\textit{" swap$ * "}" * }
+ if$
+}
+
+% \end{macrocode}
+%
+% \subsubsection{Detect Language}
+% \changes{v1.0.7}{2018/05/12}{修正了检测 Unicode 语言}
+% \begin{macrocode}
+INTEGERS { byte second.byte }
+
+INTEGERS { char.lang tmp.lang }
+
+STRINGS { tmp.str }
+
+FUNCTION {get.str.lang}
+{ 'tmp.str :=
+ lang.other 'tmp.lang :=
+ #1 'charptr :=
+ tmp.str text.length$ #1 + 'len :=
+ { charptr len < }
+ { tmp.str charptr #1 substring$ chr.to.int$ 'byte :=
+ byte #128 <
+ { charptr #1 + 'charptr :=
+ byte #64 > byte #91 < and byte #96 > byte #123 < and or
+ { lang.en 'char.lang := }
+ { lang.other 'char.lang := }
+ if$
+ }
+ { tmp.str charptr #1 + #1 substring$ chr.to.int$ 'second.byte :=
+ byte #224 <
+% \end{macrocode}
+% 俄文西里尔字母:U+0400 到 U+052F,对应 UTF-8 从 D0 80 到 D4 AF。
+% \begin{macrocode}
+ { charptr #2 + 'charptr :=
+ byte #207 > byte #212 < and
+ byte #212 = second.byte #176 < and or
+ { lang.ru 'char.lang := }
+ { lang.other 'char.lang := }
+ if$
+ }
+ { byte #240 <
+% \end{macrocode}
+% CJK Unified Ideographs: U+4E00--U+9FFF; UTF-8: E4 B8 80--E9 BF BF.
+% \begin{macrocode}
+ { charptr #3 + 'charptr :=
+ byte #227 > byte #234 < and
+ { lang.zh 'char.lang := }
+% \end{macrocode}
+% CJK Unified Ideographs Extension A: U+3400--U+4DBF; UTF-8: E3 90 80--E4 B6 BF.
+% \begin{macrocode}
+ { byte #227 =
+ { second.byte #143 >
+ { lang.zh 'char.lang := }
+% \end{macrocode}
+% 日语假名:U+3040--U+30FF, UTF-8: E3 81 80--E3 83 BF.
+% \begin{macrocode}
+ { second.byte #128 > second.byte #132 < and
+ { lang.ja 'char.lang := }
+ { lang.other 'char.lang := }
+ if$
+ }
+ if$
+ }
+% \end{macrocode}
+% CJK Compatibility Ideographs: U+F900--U+FAFF, UTF-8: EF A4 80--EF AB BF.
+% \begin{macrocode}
+ { byte #239 =
+ second.byte #163 > second.byte #172 < and and
+ { lang.zh 'char.lang := }
+ { lang.other 'char.lang := }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+% \end{macrocode}
+% CJK Unified Ideographs Extension B--F: U+20000--U+2EBEF,
+% UTF-8: F0 A0 80 80--F0 AE AF AF.
+% CJK Compatibility Ideographs Supplement: U+2F800--U+2FA1F,
+% UTF-8: F0 AF A0 80--F0 AF A8 9F.
+% \begin{macrocode}
+ { charptr #4 + 'charptr :=
+ byte #240 = second.byte #159 > and
+ { lang.zh 'char.lang := }
+ { lang.other 'char.lang := }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+ char.lang tmp.lang >
+ { char.lang 'tmp.lang := }
+ 'skip$
+ if$
+ }
+ while$
+ tmp.lang
+}
+
+FUNCTION {check.entry.lang}
+{ author field.or.null
+ title field.or.null *
+ get.str.lang
+}
+
+FUNCTION {set.entry.lang}
+{ language empty$
+ { check.entry.lang }
+ { language "english" = language "american" = or language "british" = or
+ { lang.en }
+ { language "chinese" =
+ { lang.zh }
+ { language "japanese" =
+ { lang.ja }
+ { language "russian" =
+ { lang.ru }
+ { check.entry.lang }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+ 'entry.lang :=
+}
+
+FUNCTION {set.entry.numbered}
+{ type$ "patent" =
+ type$ "standard" = or
+ type$ "techreport" = or
+ { #1 'entry.numbered := }
+ { #0 'entry.numbered := }
+ if$
+}
+
+% \end{macrocode}
+%
+% \subsubsection{Format names}
+%
+% The format.names function formats the argument (which should be in
+% BibTeX name format) into "First Von Last, Junior", separated by commas
+% and with an "and" before the last (but ending with "et~al." if the last
+% of multiple authors is "others"). This function's argument should always
+% contain at least one name.
+%
+% \begin{pseudocode}
+% VAR: nameptr, namesleft, numnames: INTEGER
+% pseudoVAR: nameresult: STRING (it's what's accumulated on the stack)
+%
+% format.names(s) ==
+% BEGIN
+% nameptr := 1
+% numnames := num.names$(s)
+% namesleft := numnames
+% while namesleft > 0
+% do
+% % for full names:
+% t := format.name$(s, nameptr, "{ff~}{vv~}{ll}{, jj}")
+% % for abbreviated first names:
+% t := format.name$(s, nameptr, "{f.~}{vv~}{ll}{, jj}")
+% if nameptr > 1 then
+% if namesleft > 1 then nameresult := nameresult * ", " * t
+% else if numnames > 2
+% then nameresult := nameresult * ","
+% fi
+% if t = "others"
+% then nameresult := nameresult * " et~al."
+% else nameresult := nameresult * " and " * t
+% fi
+% fi
+% else nameresult := t
+% fi
+% nameptr := nameptr + 1
+% namesleft := namesleft - 1
+% od
+% return nameresult
+% END
+% \end{pseudocode}
+%
+% The format.authors function returns the result of format.names(author)
+% if the author is present, or else it returns the null string
+%
+% \begin{pseudocode}
+% format.authors ==
+% BEGIN
+% if empty$(author) then return ""
+% else return format.names(author)
+% fi
+% END
+% \end{pseudocode}
+%
+% Format.editors is like format.authors, but it uses the editor field,
+% and appends ", editor" or ", editors"
+%
+% \begin{pseudocode}
+% format.editors ==
+% BEGIN
+% if empty$(editor) then return ""
+% else
+% if num.names$(editor) > 1 then
+% return format.names(editor) * ", editors"
+% else
+% return format.names(editor) * ", editor"
+% fi
+% fi
+% END
+% \end{pseudocode}
+%
+% Other formatting functions are similar, so no "comment version" will be
+% given for them.
+% \changes{v1.0.2}{2018/03/16}{正确识别姓名中的“others”}
+% \changes{v1.0.8}{2018/06/23}{使用“\textasciitilde”连接英文姓名}
+% \begin{macrocode}
+INTEGERS { nameptr namesleft numnames name.lang }
+
+FUNCTION {format.names}
+{ 's :=
+ #1 'nameptr :=
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ { s nameptr "{vv~}{ll}{, jj}{, ff}" format.name$ 't :=
+ nameptr max.num.authors >
+ { bbl.et.al
+ #1 'namesleft :=
+ }
+ { t "others" =
+ { bbl.et.al }
+ { t get.str.lang 'name.lang :=
+ name.lang lang.en =
+ { t #1 "{vv~}{ll}{~f{~}}" format.name$
+ uppercase.name
+ { "u" change.case$ }
+ 'skip$
+ if$
+ t #1 "{, jj}" format.name$ *
+ }
+ { t #1 "{ll}{ff}" format.name$ }
+ if$
+ }
+ if$
+ }
+ if$
+ nameptr #1 >
+ { ", " swap$ * * }
+ 'skip$
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+}
+
+FUNCTION {format.key}
+{ empty$
+ { key field.or.null }
+ { "" }
+ if$
+}
+
+FUNCTION {format.authors}
+{ author empty$ not
+ { author format.names }
+ { "empty author in " cite$ * warning$
+%<*authoryear>
+ bbl.anonymous
+%</authoryear>
+%<*numerical>
+ ""
+%</numerical>
+ }
+ if$
+}
+
+FUNCTION {format.editors}
+{ editor empty$
+ { "" }
+ { editor format.names }
+ if$
+}
+
+FUNCTION {format.translators}
+{ translator empty$
+ { "" }
+ { translator format.names
+ entry.lang lang.zh =
+ { translator num.names$ #3 >
+ { "译" * }
+ { ", 译" * }
+ if$
+ }
+ 'skip$
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.full.names}
+{'s :=
+ #1 'nameptr :=
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ { s nameptr "{vv~}{ll}{, jj}{, ff}" format.name$ 't :=
+ t get.str.lang 'name.lang :=
+ name.lang lang.en =
+ { t #1 "{vv~}{ll}" format.name$ 't := }
+ { t #1 "{ll}{ff}" format.name$ 't := }
+ if$
+ nameptr #1 >
+ {
+ namesleft #1 >
+ { ", " * t * }
+ {
+ numnames #2 >
+ { "," * }
+ 'skip$
+ if$
+ t "others" =
+ { " et~al." * }
+ { " and " * t * }
+ if$
+ }
+ if$
+ }
+ 't
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+}
+
+FUNCTION {author.editor.full}
+{ author empty$
+ { editor empty$
+ { "" }
+ { editor format.full.names }
+ if$
+ }
+ { author format.full.names }
+ if$
+}
+
+FUNCTION {author.full}
+{ author empty$
+ { "" }
+ { author format.full.names }
+ if$
+}
+
+FUNCTION {editor.full}
+{ editor empty$
+ { "" }
+ { editor format.full.names }
+ if$
+}
+
+FUNCTION {make.full.names}
+{ type$ "book" =
+ type$ "inbook" =
+ or
+ 'author.editor.full
+ { type$ "collection" =
+ type$ "proceedings" =
+ or
+ 'editor.full
+ 'author.full
+ if$
+ }
+ if$
+}
+
+FUNCTION {output.bibitem}
+{ newline$
+ "\bibitem[" write$
+ label write$
+ ")" make.full.names duplicate$ short.list =
+ { pop$ }
+ { * }
+ if$
+ 's :=
+ s text.length$ 'charptr :=
+ { charptr #0 > }
+ { s charptr #1 substring$ "]" =
+ { #0 'charptr := }
+ { charptr #1 - 'charptr := }
+ if$
+ }
+ while$
+ charptr #0 >
+ { "{" s * "}" * }
+ { s }
+ if$
+ "]{" * write$
+ cite$ write$
+ "}" write$
+ newline$
+ ""
+ before.all 'output.state :=
+}
+
+% \end{macrocode}
+%
+% \subsubsection{Format title}
+%
+% The |format.title| function is used for non-book-like titles.
+% For most styles we convert to lowercase (except for the very first letter,
+% and except for the first one after a colon (followed by whitespace)),
+% and hope the user has brace-surrounded words that need to stay capitilized;
+% for some styles, however, we leave it as it is in the database.
+% \changes{v1.0.6}{2018/05/10}{不再处理中文标题的英文单词的大小写}
+% \changes{v1.0.9}{2018/08/05}{不再转换题名 volume 的大小写}
+% \changes{v1.0.9}{2018/08/05}{增加选项在题名添加超链接}
+% \begin{macrocode}
+FUNCTION {change.sentence.case}
+{ entry.lang lang.en =
+ { "t" change.case$ }
+ 'skip$
+ if$
+}
+
+FUNCTION {add.link}
+{ url empty$ not
+ { "\href{" url * "}{" * swap$ * "}" * }
+ { doi empty$ not
+ { "\href{http://dx.doi.org/" doi * "}{" * swap$ * "}" * }
+ 'skip$
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.title}
+{ title empty$
+ { "" }
+ { title
+ sentence.case.title
+ 'change.sentence.case
+ 'skip$
+ if$
+ entry.numbered number empty$ not and
+ { bbl.colon * number * }
+ 'skip$
+ if$
+ link.title
+ 'add.link
+ 'skip$
+ if$
+ }
+ if$
+}
+
+% \end{macrocode}
+%
+% For several functions we'll need to connect two strings with a
+% tie (|~|) if the second one isn't very long (fewer than 3 characters).
+% The tie.or.space.connect function does that. It concatenates the two
+% strings on top of the stack, along with either a tie or space between
+% them, and puts this concatenation back onto the stack:
+%
+% \begin{pseudocode}
+% tie.or.space.connect(str1,str2) ==
+% BEGIN
+% if text.length$(str2) < 3
+% then return the concatenation of str1, "~", and str2
+% else return the concatenation of str1, " ", and str2
+% END
+% \end{pseudocode}
+% \begin{macrocode}
+FUNCTION {tie.or.space.connect}
+{ duplicate$ text.length$ #3 <
+ { "~" }
+ { " " }
+ if$
+ swap$ * *
+}
+
+% \end{macrocode}
+%
+% The either.or.check function complains if both fields or an either-or pair
+% are nonempty.
+%
+% \begin{pseudocode}
+% either.or.check(t,s) ==
+% BEGIN
+% if empty$(s) then
+% warning$(can't use both " * t * " fields in " * cite$)
+% fi
+% END
+% \end{pseudocode}
+% \begin{macrocode}
+FUNCTION {either.or.check}
+{ empty$
+ 'pop$
+ { "can't use both " swap$ * " fields in " * cite$ * warning$ }
+ if$
+}
+
+% \end{macrocode}
+%
+% The format.bvolume function is for formatting the volume and perhaps
+% series name of a multivolume work. If both a volume and a series field
+% are there, we assume the series field is the title of the whole multivolume
+% work (the title field should be the title of the thing being referred to),
+% and we add an "of <series>". This function is called in mid-sentence.
+%
+% The format.number.series function is for formatting the series name
+% and perhaps number of a work in a series. This function is similar to
+% format.bvolume, although for this one the series must exist (and the
+% volume must not exist). If the number field is empty we output either
+% the series field unchanged if it exists or else the null string.
+% If both the number and series fields are there we assume the series field
+% gives the name of the whole series (the title field should be the title
+% of the work being one referred to), and we add an "in <series>".
+% We capitilize Number when this function is used at the beginning of a block.
+% \begin{macrocode}
+FUNCTION {is.digit}
+{ duplicate$ empty$
+ { pop$ #0 }
+ { chr.to.int$
+ duplicate$ "0" chr.to.int$ <
+ { pop$ #0 }
+ { "9" chr.to.int$ >
+ { #0 }
+ { #1 }
+ if$
+ }
+ if$
+ }
+ if$
+}
+
+FUNCTION {is.number}
+{ 's :=
+ s empty$
+ { #0 }
+ { s text.length$ 'charptr :=
+ { charptr #0 >
+ s charptr #1 substring$ is.digit
+ and
+ }
+ { charptr #1 - 'charptr := }
+ while$
+ charptr not
+ }
+ if$
+}
+
+FUNCTION {format.volume}
+{ volume empty$ not
+ { volume is.number
+ { entry.lang lang.zh =
+ { "第 " volume * " 卷" * }
+ { "volume" volume tie.or.space.connect }
+ if$
+ }
+ { volume }
+ if$
+ }
+ { "" }
+ if$
+}
+
+FUNCTION {format.number}
+{ number empty$ not
+ { number is.number
+ { entry.lang lang.zh =
+ { "第 " number * " 册" * }
+ { "number" number tie.or.space.connect }
+ if$
+ }
+ { number }
+ if$
+ }
+ { "" }
+ if$
+}
+
+FUNCTION {format.volume.number}
+{ volume empty$ not
+ { format.volume }
+ { format.number }
+ if$
+}
+
+FUNCTION {format.title.vol.num}
+{ title
+ sentence.case.title
+ 'change.sentence.case
+ 'skip$
+ if$
+ entry.numbered
+ { number empty$ not
+ { bbl.colon * number * }
+ 'skip$
+ if$
+ }
+ { format.volume.number 's :=
+ s empty$ not
+ { bbl.colon * s * }
+ 'skip$
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.series.vol.num.title}
+{ format.volume.number 's :=
+ series empty$ not
+ { series
+ sentence.case.title
+ 'change.sentence.case
+ 'skip$
+ if$
+ entry.numbered
+ { bbl.wide.space * }
+ { bbl.colon *
+ s empty$ not
+ { s * bbl.wide.space * }
+ 'skip$
+ if$
+ }
+ if$
+ title *
+ sentence.case.title
+ 'change.sentence.case
+ 'skip$
+ if$
+ entry.numbered number empty$ not and
+ { bbl.colon * number * }
+ 'skip$
+ if$
+ }
+ { format.title.vol.num }
+ if$
+ link.title
+ 'add.link
+ 'skip$
+ if$
+}
+
+FUNCTION {format.booktitle.vol.num}
+{ booktitle
+ entry.numbered
+ 'skip$
+ { format.volume.number 's :=
+ s empty$ not
+ { bbl.colon * s * }
+ 'skip$
+ if$
+ }
+ if$
+}
+
+% \end{macrocode}
+%
+% \changes{v1.1}{2019/01/02}{修正 series 的 bug}
+% \begin{macrocode}
+FUNCTION {format.series.vol.num.booktitle}
+{ format.volume.number 's :=
+ series empty$ not
+ { series bbl.colon *
+ entry.numbered not s empty$ not and
+ { s * bbl.wide.space * }
+ 'skip$
+ if$
+ booktitle *
+ }
+ { format.booktitle.vol.num }
+ if$
+ in.booktitle
+ { duplicate$ empty$ not entry.lang lang.en = and
+ { "In: " swap$ * }
+ 'skip$
+ if$
+ }
+ 'skip$
+ if$
+}
+
+FUNCTION {format.journal}
+{ journal
+ italic.jounal entry.lang lang.en = and
+ 'italicize
+ 'skip$
+ if$
+}
+
+% \end{macrocode}
+%
+% \subsubsection{Format entry type mark}
+%
+% \begin{macrocode}
+FUNCTION {set.entry.mark}
+{ entry.mark empty$ not
+ 'pop$
+ { mark empty$ not
+ { pop$ mark 'entry.mark := }
+ { 'entry.mark := }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.mark}
+{ show.mark
+ { medium empty$ not
+ { entry.mark "/" * medium * 'entry.mark := }
+ { entry.is.electronic
+ { entry.mark "/OL" * 'entry.mark := }
+ 'skip$
+ if$
+ }
+ if$
+ "\allowbreak[" entry.mark * "]" *
+ }
+ { "" }
+ if$
+}
+
+% \end{macrocode}
+%
+% \subsubsection{Format edition}
+%
+% The format.edition function appends " edition" to the edition, if present.
+% We lowercase the edition (it should be something like "Third"), because
+% this doesn't start a sentence.
+% \begin{macrocode}
+FUNCTION {num.to.ordinal}
+{ duplicate$ text.length$ 'charptr :=
+ duplicate$ charptr #1 substring$ 's :=
+ s "1" =
+ { "st" * }
+ { s "2" =
+ { "nd" * }
+ { s "3" =
+ { "rd" * }
+ { "th" * }
+ if$
+ }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.edition}
+{ edition empty$
+ { "" }
+ { edition is.number
+ { entry.lang lang.zh =
+ { edition " 版" * }
+ { edition num.to.ordinal " ed." * }
+ if$
+ }
+ { entry.lang lang.en =
+ { edition change.sentence.case 's :=
+ s "Revised" = s "Revised edition" = or
+ { "Rev. ed." }
+ { s " ed." *}
+ if$
+ }
+ { edition }
+ if$
+ }
+ if$
+ }
+ if$
+}
+
+% \end{macrocode}
+%
+% \subsubsection{Format publishing items}
+%
+% 出版地址和出版社会有 “[S.l.: s.n.]” 的情况,所以必须一起处理。
+% \begin{macrocode}
+FUNCTION {format.publisher}
+{ publisher empty$ not
+ { publisher }
+ { school empty$ not
+ { school }
+ { organization empty$ not
+ { organization }
+ { institution empty$ not
+ { institution }
+ { "" }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.address.publisher}
+{ address empty$ not
+ { address
+ format.publisher empty$ not
+ { bbl.colon * format.publisher * }
+ { entry.is.electronic not show.missing.address.publisher and
+ { bbl.colon * bbl.sine.nomine * }
+ 'skip$
+ if$
+ }
+ if$
+ }
+ { entry.is.electronic not show.missing.address.publisher and
+ { format.publisher empty$ not
+ { bbl.sine.loco bbl.colon * format.publisher * }
+ { bbl.sine.loco.sine.nomine }
+ if$
+ }
+ { format.publisher empty$ not
+ { format.publisher }
+ { "" }
+ if$
+ }
+ if$
+ }
+ if$
+}
+
+% \end{macrocode}
+%
+% \subsubsection{Format date}
+%
+% The format.date function is for the month and year, but we give a warning if
+% there's an empty year but the month is there, and we return the empty string
+% if they're both empty.
+%
+% Newspaer 和 paptent 要显示完整的日期,同时不再显示修改日期。
+% 但是在 author-year 模式下,需要单独设置 format.year。
+% \begin{macrocode}
+FUNCTION {extract.before.dash}
+{ duplicate$ empty$
+ { pop$ "" }
+ { 's :=
+ #1 'charptr :=
+ s text.length$ #1 + 'len :=
+ { charptr len <
+ s charptr #1 substring$ "-" = not
+ and
+ }
+ { charptr #1 + 'charptr := }
+ while$
+ s #1 charptr #1 - substring$
+ }
+ if$
+}
+
+FUNCTION {extract.after.dash}
+{ duplicate$ empty$
+ { pop$ "" }
+ { 's :=
+ #1 'charptr :=
+ s text.length$ #1 + 'len :=
+ { charptr len <
+ s charptr #1 substring$ "-" = not
+ and
+ }
+ { charptr #1 + 'charptr := }
+ while$
+ { charptr len <
+ s charptr #1 substring$ "-" =
+ and
+ }
+ { charptr #1 + 'charptr := }
+ while$
+ s charptr global.max$ substring$
+ }
+ if$
+}
+
+FUNCTION {contains.dash}
+{ duplicate$ empty$
+ { pop$ #0 }
+ { 's :=
+ { s empty$ not
+ s #1 #1 substring$ "-" = not
+ and
+ }
+ { s #2 global.max$ substring$ 's := }
+ while$
+ s empty$ not
+ }
+ if$
+}
+
+% \end{macrocode}
+%
+% 著者-出版年制必须提取出年份
+% \begin{macrocode}
+FUNCTION {format.year}
+{ year empty$ not
+ { year extract.before.dash }
+ { date empty$ not
+ { date extract.before.dash }
+ { "empty year in " cite$ * warning$
+ urldate empty$ not
+ { "[" urldate extract.before.dash * "]" * }
+ { "" }
+ if$
+ }
+ if$
+ }
+ if$
+ extra.label *
+}
+
+% \end{macrocode}
+%
+% 专利和报纸都是使用日期而不是年
+% \begin{macrocode}
+FUNCTION {format.date}
+{ type$ "patent" = type$ "newspaper" = or
+ date empty$ not and
+ { date }
+ { year }
+ if$
+}
+
+% \end{macrocode}
+%
+% 更新、修改日期只用于电子资源 elctronic
+% \begin{macrocode}
+FUNCTION {format.editdate}
+{ date empty$ not
+ { "\allowbreak(" date * ")" * }
+ { "" }
+ if$
+}
+
+% \end{macrocode}
+%
+% 国标中的“引用日期”都是与 URL 同时出现的,所以其实为 urldate,这个虽然
+% 不是 \BibTeX{} 标准的域,但是实际中很常见。
+% \begin{macrocode}
+FUNCTION {format.urldate}
+{ urldate empty$ not entry.is.electronic and
+ { "\allowbreak[" urldate * "]" * }
+ { "" }
+ if$
+}
+
+% \end{macrocode}
+%
+% \subsubsection{Format pages}
+%
+% By default, BibTeX sets the global integer variable |global.max$| to the BibTeX
+% constant |glob_str_size|, the maximum length of a global string variable.
+% Analogously, BibTeX sets the global integer variable |entry.max$| to
+% |ent_str_size|, the maximum length of an entry string variable.
+% The style designer may change these if necessary (but this is unlikely)
+%
+% The n.dashify function makes each single |`-'| in a string a double |`--'|
+% if it's not already
+%
+% \begin{pseudocode}
+% pseudoVAR: pageresult: STRING (it's what's accumulated on the stack)
+%
+% n.dashify(s) ==
+% BEGIN
+% t := s
+% pageresult := ""
+% while (not empty$(t))
+% do
+% if (first character of t = "-")
+% then
+% if (next character isn't)
+% then
+% pageresult := pageresult * "--"
+% t := t with the "-" removed
+% else
+% while (first character of t = "-")
+% do
+% pageresult := pageresult * "-"
+% t := t with the "-" removed
+% od
+% fi
+% else
+% pageresult := pageresult * the first character
+% t := t with the first character removed
+% fi
+% od
+% return pageresult
+% END
+% \end{pseudocode}
+%
+% 国标里页码范围的连接号使用 hyphen,需要将 dash 转为 hyphen。
+% \begin{macrocode}
+FUNCTION {hyphenate}
+{ 't :=
+ ""
+ { t empty$ not }
+ { t #1 #1 substring$ "-" =
+ { "-" *
+ { t #1 #1 substring$ "-" = }
+ { t #2 global.max$ substring$ 't := }
+ while$
+ }
+ { t #1 #1 substring$ *
+ t #2 global.max$ substring$ 't :=
+ }
+ if$
+ }
+ while$
+}
+
+% \end{macrocode}
+%
+% This function doesn't begin a sentence so "pages" isn't capitalized.
+% Other functions that use this should keep that in mind.
+% \begin{macrocode}
+FUNCTION {format.pages}
+{ pages empty$
+ { "" }
+ { pages hyphenate }
+ if$
+}
+
+% \end{macrocode}
+%
+% The |format.vol.num.pages| function is for the volume, number, and page range
+% of a journal article. We use the format: vol(number):pages, with some
+% variations for empty fields. This doesn't begin a sentence.
+%
+% 报纸在卷号缺失时,期号与前面的日期直接相连,所以必须拆开输出。
+% \begin{macrocode}
+FUNCTION {format.journal.volume}
+{ volume empty$ not
+ { bold.journal.volume
+ { "\textbf{" volume * "}" * }
+ { volume }
+ if$
+ }
+ { "" }
+ if$
+}
+
+FUNCTION {format.journal.number}
+{ number empty$ not
+ { "\penalty0 (" number * ")" * }
+ { "" }
+ if$
+}
+
+FUNCTION {format.journal.pages}
+{ pages empty$
+ { "" }
+ { ":\penalty0 " pages hyphenate * }
+ if$
+}
+
+% \end{macrocode}
+%
+% 连续出版物的年卷期有起止范围,需要特殊处理
+% \begin{macrocode}
+FUNCTION {format.periodical.year.volume.number}
+{ year empty$ not
+ { year extract.before.dash }
+ { "empty year in periodical " cite$ * warning$ }
+ if$
+ volume empty$ not
+ { ", " * volume extract.before.dash * }
+ 'skip$
+ if$
+ number empty$ not
+ { "\penalty0 (" * number extract.before.dash * ")" * }
+ 'skip$
+ if$
+ year contains.dash
+ { "--" *
+ year extract.after.dash empty$
+ volume extract.after.dash empty$ and
+ number extract.after.dash empty$ and not
+ { year extract.after.dash empty$ not
+ { year extract.after.dash * }
+ { year extract.before.dash * }
+ if$
+ volume empty$ not
+ { ", " * volume extract.after.dash * }
+ 'skip$
+ if$
+ number empty$ not
+ { "\penalty0 (" * number extract.after.dash * ")" * }
+ 'skip$
+ if$
+ }
+ 'skip$
+ if$
+ }
+ 'skip$
+ if$
+}
+
+% \end{macrocode}
+%
+% \subsubsection{Format url and doi}
+%
+% 传统的 \BibTeX{} 习惯使用 howpublished 著录 url,这里提供支持。
+% \changes{v1.0.8}{2018/06/23}{支持 howpublished 中的 url}
+% \begin{macrocode}
+FUNCTION {check.url}
+{ url empty$ not
+ { "\url{" url * "}" * 'entry.url :=
+ #1 'entry.is.electronic :=
+ }
+ { howpublished empty$ not
+ { howpublished #1 #5 substring$ "\url{" =
+ { howpublished 'entry.url :=
+ #1 'entry.is.electronic :=
+ }
+ 'skip$
+ if$
+ }
+ { note empty$ not
+ { note #1 #5 substring$ "\url{" =
+ { note 'entry.url :=
+ #1 'entry.is.electronic :=
+ }
+ 'skip$
+ if$
+ }
+ 'skip$
+ if$
+ }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.url}
+{ entry.url empty$ not
+ { new.block entry.url }
+ { "" }
+ if$
+}
+
+% \end{macrocode}
+%
+% 需要检测 DOI 是否已经包含在 URL 中。
+% \changes{v1.0.5}{2018/04/18}{允许著录多个 DOI}
+% \begin{macrocode}
+FUNCTION {check.doi}
+{ doi empty$ not
+ { #1 'entry.is.electronic := }
+ 'skip$
+ if$
+}
+
+FUNCTION {is.in.url}
+{ 's :=
+ s empty$
+ { #1 }
+ { entry.url empty$
+ { #0 }
+ { s text.length$ 'len :=
+ entry.url text.length$ 'charptr :=
+ { entry.url charptr len substring$ s = not
+ charptr #0 >
+ and
+ }
+ { charptr #1 - 'charptr := }
+ while$
+ charptr
+ }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.doi}
+{ ""
+ doi empty$ not show.doi and
+ { "" 's :=
+ doi 't :=
+ #0 'numnames :=
+ { t empty$ not}
+ { t #1 #1 substring$ 'tmp.str :=
+ tmp.str "," = tmp.str " " = or t #2 #1 substring$ empty$ or
+ { t #2 #1 substring$ empty$
+ { s tmp.str * 's := }
+ 'skip$
+ if$
+ s empty$ s is.in.url or
+ 'skip$
+ { numnames #1 + 'numnames :=
+ numnames #1 >
+ { ", " * }
+ { "DOI: " * }
+ if$
+ "\doi{" s * "}" * *
+ }
+ if$
+ "" 's :=
+ }
+ { s tmp.str * 's := }
+ if$
+ t #2 global.max$ substring$ 't :=
+ }
+ while$
+ 's :=
+ s empty$ not
+ { new.block s }
+ { "" }
+ if$
+ }
+ 'skip$
+ if$
+}
+
+FUNCTION {check.electronic}
+{ "" 'entry.url :=
+ #0 'entry.is.electronic :=
+ 'check.doi
+ 'skip$
+ if$
+ 'check.url
+ 'skip$
+ if$
+ medium empty$ not
+ { medium "MT" = medium "DK" = or medium "CD" = or medium "OL" = or
+ { #1 'entry.is.electronic := }
+ 'skip$
+ if$
+ }
+ 'skip$
+ if$
+}
+
+FUNCTION {format.note}
+{ note empty$ not show.note and
+ { note }
+ { "" }
+ if$
+}
+
+% \end{macrocode}
+%
+% The function empty.misc.check complains if all six fields are empty, and
+% if there's been no sorting or alphabetic-label complaint.
+% \begin{macrocode}
+FUNCTION {empty.misc.check}
+{ author empty$ title empty$
+ year empty$
+ and and
+ key empty$ not and
+ { "all relevant fields are empty in " cite$ * warning$ }
+ 'skip$
+ if$
+}
+
+% \end{macrocode}
+%
+%
+% \subsection{Functions for all entry types}
+%
+% Now we define the type functions for all entry types that may appear
+% in the .BIB file---e.g., functions like `article' and `book'. These
+% are the routines that actually generate the .BBL-file output for
+% the entry. These must all precede the READ command. In addition, the
+% style designer should have a function `default.type' for unknown types.
+% Note: The fields (within each list) are listed in order of appearance,
+% except as described for an `inbook' or a `proceedings'.
+%
+% \subsubsection{专著}
+%
+% \begin{macrocode}
+FUNCTION {monograph}
+{ output.bibitem
+ author empty$ not
+ { format.authors }
+ { editor empty$ not
+ { format.editors }
+ { "empty author and editor in " cite$ * warning$
+%<*authoryear>
+ bbl.anonymous
+%</authoryear>
+%<*numerical>
+ ""
+%</numerical>
+ }
+ if$
+ }
+ if$
+ output
+%<*authoryear>
+ period.between.author.year
+ 'new.sentence
+ 'skip$
+ if$
+ format.year "year" output.check
+%</authoryear>
+ new.block
+ format.series.vol.num.title "title" output.check
+ "M" set.entry.mark
+ format.mark "" output.after
+ new.block
+ format.translators output
+ new.sentence
+ format.edition output
+ new.block
+ format.address.publisher output
+%<*numerical>
+ format.year "year" output.check
+%</numerical>
+ format.pages bbl.colon output.after
+ format.urldate "" output.after
+ format.url output
+ format.doi output
+ new.block
+ format.note output
+ fin.entry
+}
+
+% \end{macrocode}
+%
+% \subsubsection{专著中的析出文献}
+%
+% An incollection is like inbook, but where there is a separate title
+% for the referenced thing (and perhaps an editor for the whole).
+% An incollection may CROSSREF a book.
+%
+% Required: author, title, booktitle, publisher, year
+%
+% Optional: editor, volume or number, series, type, chapter, pages,
+% address, edition, month, note
+% \begin{macrocode}
+FUNCTION {incollection}
+{ output.bibitem
+ format.authors output
+ author format.key output
+%<*authoryear>
+ period.between.author.year
+ 'new.sentence
+ 'skip$
+ if$
+ format.year "year" output.check
+%</authoryear>
+ new.block
+ format.title "title" output.check
+ "M" set.entry.mark
+ format.mark "" output.after
+ new.block
+ format.translators output
+ new.slash
+ format.editors output
+ new.block
+ format.series.vol.num.booktitle "booktitle" output.check
+ new.block
+ format.edition output
+ new.block
+ format.address.publisher output
+%<*numerical>
+ format.year "year" output.check
+%</numerical>
+ format.pages bbl.colon output.after
+ format.urldate "" output.after
+ format.url output
+ format.doi output
+ new.block
+ format.note output
+ fin.entry
+}
+
+% \end{macrocode}
+%
+% \subsubsection{连续出版物}
+%
+% \begin{macrocode}
+FUNCTION {periodical}
+{ output.bibitem
+ format.authors output
+ author format.key output
+%<*authoryear>
+ period.between.author.year
+ 'new.sentence
+ 'skip$
+ if$
+ format.year "year" output.check
+%</authoryear>
+ new.block
+ format.title "title" output.check
+ "J" set.entry.mark
+ format.mark "" output.after
+ new.block
+ format.periodical.year.volume.number output
+ new.block
+ format.address.publisher output
+%<*numerical>
+ format.date "year" output.check
+%</numerical>
+ format.urldate "" output.after
+ format.url output
+ format.doi output
+ new.block
+ format.note output
+ fin.entry
+}
+
+% \end{macrocode}
+%
+% \subsubsection{连续出版物中的析出文献}
+%
+% The article function is for an article in a journal. An article may
+% CROSSREF another article.
+%
+% Required fields: author, title, journal, year
+%
+% Optional fields: volume, number, pages, month, note
+%
+% The other entry functions are all quite similar, so no "comment version"
+% will be given for them.
+% \begin{macrocode}
+FUNCTION {article}
+{ output.bibitem
+ format.authors output
+ author format.key output
+%<*authoryear>
+ period.between.author.year
+ 'new.sentence
+ 'skip$
+ if$
+ format.year "year" output.check
+%</authoryear>
+ new.block
+ format.title "title" output.check
+ "J" set.entry.mark
+ format.mark "" output.after
+ new.block
+ format.journal "journal" output.check
+%<*numerical>
+ format.date "year" output.check
+%</numerical>
+ format.journal.volume output
+ format.journal.number "" output.after
+ format.journal.pages "" output.after
+ format.urldate "" output.after
+ format.url output
+ format.doi output
+ new.block
+ format.note output
+ fin.entry
+}
+
+% \end{macrocode}
+%
+% \subsubsection{专利文献}
+%
+% number 域也可以用来表示专利号。
+% \begin{macrocode}
+FUNCTION {patent}
+{ output.bibitem
+ format.authors output
+ author format.key output
+%<*authoryear>
+ period.between.author.year
+ 'new.sentence
+ 'skip$
+ if$
+ format.year "year" output.check
+%</authoryear>
+ new.block
+ format.title "title" output.check
+ "P" set.entry.mark
+ format.mark "" output.after
+ new.block
+ format.date "year" output.check
+ format.urldate "" output.after
+ format.url output
+ format.doi output
+ new.block
+ format.note output
+ fin.entry
+}
+
+% \end{macrocode}
+%
+% \subsubsection{电子资源}
+% \begin{macrocode}
+FUNCTION {electronic}
+{ #1 #1 check.electronic
+ #1 'entry.is.electronic :=
+ output.bibitem
+ format.authors output
+ author format.key output
+%<*authoryear>
+ period.between.author.year
+ 'new.sentence
+ 'skip$
+ if$
+ format.year "year" output.check
+%</authoryear>
+ new.block
+ format.series.vol.num.title "title" output.check
+ "EB" set.entry.mark
+ format.mark "" output.after
+ new.block
+ format.address.publisher output
+%<*numerical>
+ date empty$
+ { format.date output }
+ 'skip$
+ if$
+%</numerical>
+ format.pages bbl.colon output.after
+ format.editdate "" output.after
+ format.urldate "" output.after
+ format.url output
+ format.doi output
+ new.block
+ format.note output
+ fin.entry
+}
+
+% \end{macrocode}
+%
+% \subsubsection{其他文献类型}
+%
+% A misc is something that doesn't fit elsewhere.
+%
+% Required: at least one of the `optional' fields
+%
+% Optional: author, title, howpublished, month, year, note
+%
+% Misc 用来自动判断类型。
+% \changes{v1.0.9}{2018/08/05}{修正不显示 url 的选项}
+% \begin{macrocode}
+FUNCTION {misc}
+{ journal empty$ not
+ 'article
+ { booktitle empty$ not
+ 'incollection
+ { publisher empty$ not
+ 'monograph
+ { entry.is.electronic
+ 'electronic
+ { "Z" set.entry.mark
+ monograph
+ }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+ empty.misc.check
+}
+
+FUNCTION {archive}
+{ "A" set.entry.mark
+ misc
+}
+
+% \end{macrocode}
+%
+% The book function is for a whole book. A book may CROSSREF another book.
+%
+% Required fields: author or editor, title, publisher, year
+%
+% Optional fields: volume or number, series, address, edition, month,
+% note
+% \begin{macrocode}
+FUNCTION {book} { monograph }
+
+% \end{macrocode}
+%
+% A booklet is a bound thing without a publisher or sponsoring institution.
+%
+% Required: title
+%
+% Optional: author, howpublished, address, month, year, note
+% \begin{macrocode}
+FUNCTION {booklet} { book }
+
+FUNCTION {collection}
+{ "G" set.entry.mark
+ monograph
+}
+
+FUNCTION {database}
+{ "DB" set.entry.mark
+ electronic
+}
+
+FUNCTION {dataset}
+{ "DS" set.entry.mark
+ electronic
+}
+
+% \end{macrocode}
+%
+% An inbook is a piece of a book: either a chapter and/or a page range.
+% It may CROSSREF a book. If there's no volume field, the type field
+% will come before number and series.
+%
+% Required: author or editor, title, chapter and/or pages, publisher,year
+%
+% Optional: volume or number, series, type, address, edition, month, note
+%
+% inbook 类是不含 booktitle 域的,所以不应该适用于“专著中的析出文献”,而应该是专
+% 著,即 book 类。
+% \begin{macrocode}
+FUNCTION {inbook} { book }
+
+% \end{macrocode}
+%
+% An inproceedings is an article in a conference proceedings, and it may
+% CROSSREF a proceedings. If there's no address field, the month (\& year)
+% will appear just before note.
+%
+% Required: author, title, booktitle, year
+%
+% Optional: editor, volume or number, series, pages, address, month,
+% organization, publisher, note
+% \begin{macrocode}
+FUNCTION {inproceedings}
+{ "C" set.entry.mark
+ incollection
+}
+
+% \end{macrocode}
+%
+% The conference function is included for Scribe compatibility.
+% \begin{macrocode}
+FUNCTION {conference} { inproceedings }
+
+FUNCTION {map}
+{ "CM" set.entry.mark
+ misc
+}
+
+% \end{macrocode}
+%
+% A manual is technical documentation.
+%
+% Required: title
+%
+% Optional: author, organization, address, edition, month, year, note
+% \begin{macrocode}
+FUNCTION {manual} { monograph }
+
+% \end{macrocode}
+%
+% A mastersthesis is a Master's thesis.
+%
+% Required: author, title, school, year
+%
+% Optional: type, address, month, note
+% \begin{macrocode}
+FUNCTION {mastersthesis}
+%<*!thu>
+{ "D" set.entry.mark
+%</!thu>
+%<*thu>
+{ lang.zh entry.lang =
+ { "硕士学位论文" }
+ { "D" }
+ if$
+ set.entry.mark
+%</thu>
+ monograph
+}
+
+FUNCTION {newspaper}
+{ "N" set.entry.mark
+ article
+}
+
+FUNCTION {online}
+{ "EB" set.entry.mark
+ electronic
+}
+
+% \end{macrocode}
+%
+% A phdthesis is like a mastersthesis.
+%
+% Required: author, title, school, year
+%
+% Optional: type, address, month, note
+% \begin{macrocode}
+%<*!thu>
+FUNCTION {phdthesis} { mastersthesis }
+%</!thu>
+%<*thu>
+FUNCTION {phdthesis}
+{ lang.zh entry.lang =
+ { "博士学位论文" }
+ { "D" }
+ if$
+ set.entry.mark
+ monograph
+}
+%</thu>
+
+% \end{macrocode}
+%
+% A proceedings is a conference proceedings.
+% If there is an organization but no editor field, the organization will
+% appear as the first optional field (we try to make the first block nonempty);
+% if there's no address field, the month (\& year) will appear just before note.
+%
+% Required: title, year
+%
+% Optional: editor, volume or number, series, address, month,
+% organization, publisher, note
+% \begin{macrocode}
+FUNCTION {proceedings}
+{ "C" set.entry.mark
+ monograph
+}
+
+FUNCTION {software}
+{ "CP" set.entry.mark
+ electronic
+}
+
+FUNCTION {standard}
+{ "S" set.entry.mark
+ misc
+}
+
+% \end{macrocode}
+%
+% A techreport is a technical report.
+%
+% Required: author, title, institution, year
+%
+% Optional: type, number, address, month, note
+% \begin{macrocode}
+FUNCTION {techreport}
+{ "R" set.entry.mark
+ misc
+}
+
+% \end{macrocode}
+%
+% An unpublished is something that hasn't been published.
+%
+% Required: author, title, note
+%
+% Optional: month, year
+% \begin{macrocode}
+FUNCTION {unpublished}
+{ "Z" set.entry.mark
+ misc
+}
+
+% \end{macrocode}
+%
+% We use entry type `misc' for an unknown type; BibTeX gives a warning.
+% \begin{macrocode}
+FUNCTION {default.type} { misc }
+
+% \end{macrocode}
+%
+%
+% \subsection{Common macros}
+%
+% Here are macros for common things that may vary from style to style.
+% Users are encouraged to use these macros.
+%
+% Months are either written out in full or abbreviated
+% \begin{macrocode}
+MACRO {jan} {"January"}
+
+MACRO {feb} {"February"}
+
+MACRO {mar} {"March"}
+
+MACRO {apr} {"April"}
+
+MACRO {may} {"May"}
+
+MACRO {jun} {"June"}
+
+MACRO {jul} {"July"}
+
+MACRO {aug} {"August"}
+
+MACRO {sep} {"September"}
+
+MACRO {oct} {"October"}
+
+MACRO {nov} {"November"}
+
+MACRO {dec} {"December"}
+
+% \end{macrocode}
+%
+% Journals are either written out in full or abbreviated;
+% the abbreviations are like those found in ACM publications.
+%
+% To get a completely different set of abbreviations, it may be best to make
+% a separate .bib file with nothing but those abbreviations; users could then
+% include that file name as the first argument to the \cs{bibliography} command
+% \begin{macrocode}
+MACRO {acmcs} {"ACM Computing Surveys"}
+
+MACRO {acta} {"Acta Informatica"}
+
+MACRO {cacm} {"Communications of the ACM"}
+
+MACRO {ibmjrd} {"IBM Journal of Research and Development"}
+
+MACRO {ibmsj} {"IBM Systems Journal"}
+
+MACRO {ieeese} {"IEEE Transactions on Software Engineering"}
+
+MACRO {ieeetc} {"IEEE Transactions on Computers"}
+
+MACRO {ieeetcad}
+ {"IEEE Transactions on Computer-Aided Design of Integrated Circuits"}
+
+MACRO {ipl} {"Information Processing Letters"}
+
+MACRO {jacm} {"Journal of the ACM"}
+
+MACRO {jcss} {"Journal of Computer and System Sciences"}
+
+MACRO {scp} {"Science of Computer Programming"}
+
+MACRO {sicomp} {"SIAM Journal on Computing"}
+
+MACRO {tocs} {"ACM Transactions on Computer Systems"}
+
+MACRO {tods} {"ACM Transactions on Database Systems"}
+
+MACRO {tog} {"ACM Transactions on Graphics"}
+
+MACRO {toms} {"ACM Transactions on Mathematical Software"}
+
+MACRO {toois} {"ACM Transactions on Office Information Systems"}
+
+MACRO {toplas} {"ACM Transactions on Programming Languages and Systems"}
+
+MACRO {tcs} {"Theoretical Computer Science"}
+
+% \end{macrocode}
+%
+%
+% \subsection{Format labels}
+%
+% The sortify function converts to lower case after |purify$|ing; it's
+% used in sorting and in computing alphabetic labels after sorting
+%
+% The chop.word(w,len,s) function returns either s or, if the first len
+% letters of s equals w (this comparison is done in the third line of the
+% function's definition), it returns that part of s after w.
+% \begin{macrocode}
+FUNCTION {sortify}
+{ purify$
+ "l" change.case$
+}
+
+% \end{macrocode}
+%
+% We need the chop.word stuff for the dubious unsorted-list-with-labels case.
+% \begin{macrocode}
+FUNCTION {chop.word}
+{ 's :=
+ 'len :=
+ s #1 len substring$ =
+ { s len #1 + global.max$ substring$ }
+ 's
+ if$
+}
+
+% \end{macrocode}
+%
+% The |format.lab.names| function makes a short label by using the initials of
+% the von and Last parts of the names (but if there are more than four names,
+% (i.e., people) it truncates after three and adds a superscripted "+";
+% it also adds such a "+" if the last of multiple authors is "others").
+% If there is only one name, and its von and Last parts combined have just
+% a single name-token ("Knuth" has a single token, "Brinch Hansen" has two),
+% we take the first three letters of the last name. The boolean
+% et.al.char.used tells whether we've used a superscripted "+", so that we
+% know whether to include a LaTeX macro for it.
+%
+% \begin{pseudocode}
+% format.lab.names(s) ==
+% BEGIN
+% numnames := num.names$(s)
+% if numnames > 1 then
+% if numnames > 4 then
+% namesleft := 3
+% else
+% namesleft := numnames
+% nameptr := 1
+% nameresult := ""
+% while namesleft > 0
+% do
+% if (name_ptr = numnames) and
+% format.name$(s, nameptr, "{ff }{vv }{ll}{ jj}") = "others"
+% then nameresult := nameresult * "{\etalchar{+}}"
+% et.al.char.used := true
+% else nameresult := nameresult *
+% format.name$(s, nameptr, "{v{}}{l{}}")
+% nameptr := nameptr + 1
+% namesleft := namesleft - 1
+% od
+% if numnames > 4 then
+% nameresult := nameresult * "{\etalchar{+}}"
+% et.al.char.used := true
+% else
+% t := format.name$(s, 1, "{v{}}{l{}}")
+% if text.length$(t) < 2 then % there's just one name-token
+% nameresult := text.prefix$(format.name$(s,1,"{ll}"),3)
+% else
+% nameresult := t
+% fi
+% fi
+% return nameresult
+% END
+% \end{pseudocode}
+%
+% Exactly what fields we look at in constructing the primary part of the label
+% depends on the entry type; this selectivity (as opposed to, say, always
+% looking at author, then editor, then key) helps ensure that "ignored" fields,
+% as described in the LaTeX book, really are ignored. Note that MISC is part
+% of the deepest `else' clause in the nested part of calc.label; thus, any
+% unrecognized entry type in the database is handled correctly.
+%
+% There is one auxiliary function for each of the four different sequences of
+% fields we use. The first of these functions looks at the author field, and
+% then, if necessary, the key field. The other three functions, which might
+% look at two fields and the key field, are similar, except that the key field
+% takes precedence over the organization field (for labels---not for sorting).
+%
+% The calc.label function calculates the preliminary label of an entry, which
+% is formed by taking three letters of information from the author or editor or
+% key or organization field (depending on the entry type and on what's empty,
+% but ignoring a leading "The " in the organization), and appending the last
+% two characters (digits) of the year. It is an error if the appropriate fields
+% among author, editor, organization, and key are missing, and we use
+% the first three letters of the |cite$| in desperation when this happens.
+% The resulting label has the year part, but not the name part, |purify$|ed
+% (|purify$|ing the year allows some sorting shenanigans by the user).
+%
+% This function also calculates the version of the label to be used in sorting.
+%
+% The final label may need a trailing 'a', 'b', etc., to distinguish it from
+% otherwise identical labels, but we can't calculated those "extra.label"s
+% until after sorting.
+%
+% \begin{pseudocode}
+% calc.label ==
+% BEGIN
+% if type$ = "book" or "inbook" then
+% author.editor.key.label
+% else if type$ = "proceedings" then
+% editor.key.organization.label
+% else if type$ = "manual" then
+% author.key.organization.label
+% else
+% author.key.label
+% fi fi fi
+% label := label * substring$(purify$(field.or.null(year)), -1, 2)
+% % assuming we will also sort, we calculate a sort.label
+% sort.label := sortify(label), but use the last four, not two, digits
+% END
+% \end{pseudocode}
+% \begin{macrocode}
+FUNCTION {format.lab.names}
+{ 's :=
+ s #1 "{vv~}{ll}{, jj}{, ff}" format.name$ 't :=
+ t get.str.lang 'name.lang :=
+ name.lang lang.en =
+ { t #1 "{vv~}{ll}" format.name$}
+ { t #1 "{ll}{ff}" format.name$}
+ if$
+ s num.names$ #1 >
+ { bbl.space * citation.et.al * }
+ 'skip$
+ if$
+}
+
+FUNCTION {author.key.label}
+{ author empty$
+ { key empty$
+ { cite$ #1 #3 substring$ }
+ 'key
+ if$
+ }
+ { author format.lab.names }
+ if$
+}
+
+FUNCTION {author.editor.key.label}
+{ author empty$
+ { editor empty$
+ { key empty$
+ { cite$ #1 #3 substring$ }
+ 'key
+ if$
+ }
+ { editor format.lab.names }
+ if$
+ }
+ { author format.lab.names }
+ if$
+}
+
+FUNCTION {author.key.organization.label}
+{ author empty$
+ { key empty$
+ { organization empty$
+ { cite$ #1 #3 substring$ }
+ { "The " #4 organization chop.word #3 text.prefix$ }
+ if$
+ }
+ 'key
+ if$
+ }
+ { author format.lab.names }
+ if$
+}
+
+FUNCTION {editor.key.organization.label}
+{ editor empty$
+ { key empty$
+ { organization empty$
+ { cite$ #1 #3 substring$ }
+ { "The " #4 organization chop.word #3 text.prefix$ }
+ if$
+ }
+ 'key
+ if$
+ }
+ { editor format.lab.names }
+ if$
+}
+
+FUNCTION {calc.short.authors}
+{ type$ "book" =
+ type$ "inbook" =
+ or
+ 'author.editor.key.label
+ { type$ "collection" =
+ type$ "proceedings" =
+ or
+ { editor empty$ not
+ 'editor.key.organization.label
+ 'author.key.organization.label
+ if$
+ }
+ 'author.key.label
+ if$
+ }
+ if$
+ 'short.list :=
+}
+
+FUNCTION {calc.label}
+{ calc.short.authors
+ short.list
+ "("
+ *
+ format.year duplicate$ empty$
+ short.list key field.or.null = or
+ { pop$ "" }
+ 'skip$
+ if$
+ *
+ 'label :=
+}
+
+% \end{macrocode}
+%
+%
+% \subsection{Sorting}
+%
+% When sorting, we compute the sortkey by executing "presort" on each entry.
+% The presort key contains a number of "sortify"ed strings, concatenated
+% with multiple blanks between them. This makes things like "brinch per"
+% come before "brinch hansen per".
+%
+% The fields used here are: the sort.label for alphabetic labels (as set by
+% |calc.label|), followed by the author names (or editor names or organization
+% (with a leading "The " removed) or key field, depending on entry type and on
+% what's empty), followed by year, followed by the first bit of the title
+% (chopping off a leading "The ", "A ", or "An ").
+% Names are formatted: Von Last First Junior.
+% The names within a part will be separated by a single blank
+% (such as "brinch hansen"), two will separate the name parts themselves
+% (except the von and last), three will separate the names,
+% four will separate the names from year (and from label, if alphabetic),
+% and four will separate year from title.
+%
+% The |sort.format.names| function takes an argument that should be in
+% BibTeX name format, and returns a string containing " "-separated
+% names in the format described above. The function is almost the same
+% as format.names.
+% \begin{macrocode}
+%<*authoryear>
+FUNCTION {sort.language.label}
+{ entry.lang lang.zh =
+ { lang.zh.order }
+ { entry.lang lang.ja =
+ { lang.ja.order }
+ { entry.lang lang.en =
+ { lang.en.order }
+ { entry.lang lang.ru =
+ { lang.ru.order }
+ { lang.other.order }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+ int.to.chr$
+}
+
+FUNCTION {sort.format.names}
+{ 's :=
+ #1 'nameptr :=
+ ""
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ {
+ s nameptr "{vv{ } }{ll{ }}{ ff{ }}{ jj{ }}" format.name$ 't :=
+ nameptr #1 >
+ {
+ " " *
+ namesleft #1 = t "others" = and
+ { "zzzzz" * }
+ { numnames #2 > nameptr #2 = and
+ { "zz" * year field.or.null * " " * }
+ 'skip$
+ if$
+ t sortify *
+ }
+ if$
+ }
+ { t sortify * }
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+}
+
+% \end{macrocode}
+%
+% The sort.format.title function returns the argument,
+% but first any leading "A "'s, "An "'s, or "The "'s are removed.
+% The chop.word function uses s, so we need another string variable, t
+% \begin{macrocode}
+FUNCTION {sort.format.title}
+{ 't :=
+ "A " #2
+ "An " #3
+ "The " #4 t chop.word
+ chop.word
+ chop.word
+ sortify
+ #1 global.max$ substring$
+}
+
+% \end{macrocode}
+%
+% The auxiliary functions here, for the presort function, are analogous to
+% the ones for calc.label; the same comments apply, except that the
+% organization field takes precedence here over the key field. For sorting
+% purposes, we still remove a leading "The " from the organization field.
+% \begin{macrocode}
+FUNCTION {anonymous.sort}
+{ entry.lang lang.zh =
+ { "yi4 ming2" }
+ { "anon" }
+ if$
+}
+
+FUNCTION {warn.empty.key}
+{ entry.lang lang.zh =
+ { "empty key in " cite$ * warning$ }
+ 'skip$
+ if$
+}
+
+FUNCTION {author.sort}
+{ key empty$
+ { warn.empty.key
+ author empty$
+ { anonymous.sort }
+ { author sort.format.names }
+ if$
+ }
+ { key sortify }
+ if$
+}
+
+FUNCTION {author.editor.sort}
+{ key empty$
+ { warn.empty.key
+ author empty$
+ { editor empty$
+ { anonymous.sort }
+ { editor sort.format.names }
+ if$
+ }
+ { author sort.format.names }
+ if$
+ }
+ { key sortify }
+ if$
+}
+
+FUNCTION {author.organization.sort}
+{ key empty$
+ { warn.empty.key
+ author empty$
+ { organization empty$
+ { anonymous.sort }
+ { "The " #4 organization chop.word sortify }
+ if$
+ }
+ { author sort.format.names }
+ if$
+ }
+ { key sortify }
+ if$
+}
+
+FUNCTION {editor.organization.sort}
+{ key empty$
+ { warn.empty.key
+ editor empty$
+ { organization empty$
+ { anonymous.sort }
+ { "The " #4 organization chop.word sortify }
+ if$
+ }
+ { editor sort.format.names }
+ if$
+ }
+ { key sortify }
+ if$
+}
+
+%</authoryear>
+% \end{macrocode}
+%
+% 顺序编码制的排序要简单得多
+% \begin{macrocode}
+%<*numerical>
+INTEGERS { seq.num }
+
+FUNCTION {init.seq}
+{ #0 'seq.num :=}
+
+FUNCTION {int.to.fix}
+{ "000000000" swap$ int.to.str$ *
+ #-1 #10 substring$
+}
+
+%</numerical>
+% \end{macrocode}
+%
+% There is a limit, |entry.max$|, on the length of an entry string variable
+% (which is what its |sort.key$| is), so we take at most that many characters
+% of the constructed key, and hope there aren't many references that match
+% to that many characters!
+% \begin{macrocode}
+FUNCTION {presort}
+{ set.entry.lang
+ set.entry.numbered
+ show.url show.doi check.electronic
+ calc.label
+ label sortify
+ " "
+ *
+%<*authoryear>
+ sort.language.label
+ type$ "book" =
+ type$ "inbook" =
+ or
+ 'author.editor.sort
+ { type$ "collection" =
+ type$ "proceedings" =
+ or
+ 'editor.organization.sort
+ 'author.sort
+ if$
+ }
+ if$
+ *
+ " "
+ *
+ year field.or.null sortify
+ *
+ " "
+ *
+ cite$
+ *
+ #1 entry.max$ substring$
+%</authoryear>
+%<*numerical>
+ seq.num #1 + 'seq.num :=
+ seq.num int.to.fix
+%</numerical>
+ 'sort.label :=
+ sort.label *
+ #1 entry.max$ substring$
+ 'sort.key$ :=
+}
+
+% \end{macrocode}
+%
+% Now comes the final computation for alphabetic labels, putting in the 'a's
+% and 'b's and so forth if required. This involves two passes: a forward
+% pass to put in the 'b's, 'c's and so on, and a backwards pass
+% to put in the 'a's (we don't want to put in 'a's unless we know there
+% are 'b's).
+% We have to keep track of the longest (in |width$| terms) label, for use
+% by the "thebibliography" environment.
+%
+% \begin{pseudocode}
+% VAR: longest.label, last.sort.label, next.extra: string
+% longest.label.width, last.extra.num: integer
+%
+% initialize.longest.label ==
+% BEGIN
+% longest.label := ""
+% last.sort.label := int.to.chr$(0)
+% next.extra := ""
+% longest.label.width := 0
+% last.extra.num := 0
+% END
+%
+% forward.pass ==
+% BEGIN
+% if last.sort.label = sort.label then
+% last.extra.num := last.extra.num + 1
+% extra.label := int.to.chr$(last.extra.num)
+% else
+% last.extra.num := chr.to.int$("a")
+% extra.label := ""
+% last.sort.label := sort.label
+% fi
+% END
+%
+% reverse.pass ==
+% BEGIN
+% if next.extra = "b" then
+% extra.label := "a"
+% fi
+% label := label * extra.label
+% if width$(label) > longest.label.width then
+% longest.label := label
+% longest.label.width := width$(label)
+% fi
+% next.extra := extra.label
+% END
+% \end{pseudocode}
+% \begin{macrocode}
+STRINGS { longest.label last.label next.extra }
+
+INTEGERS { longest.label.width last.extra.num number.label }
+
+FUNCTION {initialize.longest.label}
+{ "" 'longest.label :=
+ #0 int.to.chr$ 'last.label :=
+ "" 'next.extra :=
+ #0 'longest.label.width :=
+ #0 'last.extra.num :=
+ #0 'number.label :=
+}
+
+FUNCTION {forward.pass}
+{ last.label label =
+ { last.extra.num #1 + 'last.extra.num :=
+ last.extra.num int.to.chr$ 'extra.label :=
+ }
+ { "a" chr.to.int$ 'last.extra.num :=
+ "" 'extra.label :=
+ label 'last.label :=
+ }
+ if$
+ number.label #1 + 'number.label :=
+}
+
+FUNCTION {reverse.pass}
+{ next.extra "b" =
+ { "a" 'extra.label := }
+ 'skip$
+ if$
+ extra.label 'next.extra :=
+ extra.label
+ duplicate$ empty$
+ 'skip$
+ { "{\natexlab{" swap$ * "}}" * }
+ if$
+ 'extra.label :=
+ label extra.label * 'label :=
+}
+
+FUNCTION {bib.sort.order}
+{ sort.label 'sort.key$ :=
+}
+
+% \end{macrocode}
+%
+%
+% \subsection{Write bbl file}
+%
+% Now we're ready to start writing the .BBL file.
+% We begin, if necessary, with a \LaTeX{} macro for unnamed names in an
+% alphabetic label; next comes stuff from the `preamble' command in the
+% database files. Then we give an incantation containing the command
+% |\begin{thebibliography}{...}|
+% where the `...' is the longest label.
+%
+% We also call init.state.consts, for use by the output routines.
+% \begin{macrocode}
+FUNCTION {begin.bib}
+{ preamble$ empty$
+ 'skip$
+ { preamble$ write$ newline$ }
+ if$
+ "\begin{thebibliography}{" number.label int.to.str$ * "}" *
+ write$ newline$
+ "\providecommand{\natexlab}[1]{#1}"
+ write$ newline$
+ "\providecommand{\url}[1]{#1}"
+ write$ newline$
+ "\expandafter\ifx\csname urlstyle\endcsname\relax\relax\else"
+ write$ newline$
+ " \urlstyle{same}\fi"
+ write$ newline$
+ show.doi
+ { "\providecommand{\href}[2]{\url{#2}}"
+ write$ newline$
+ "\providecommand{\doi}[1]{\href{https://doi.org/#1}{#1}}"
+ write$ newline$
+ }
+ 'skip$
+ if$
+}
+
+% \end{macrocode}
+%
+% Finally, we finish up by writing the `|\end{thebibliography}|' command.
+% \begin{macrocode}
+FUNCTION {end.bib}
+{ newline$
+ "\end{thebibliography}" write$ newline$
+}
+
+% \end{macrocode}
+%
+%
+% \subsection{Main execution}
+%
+% Now we read in the .BIB entries.
+% \begin{macrocode}
+READ
+
+EXECUTE {init.state.consts}
+
+EXECUTE {load.config}
+
+%<*numerical>
+EXECUTE {init.seq}
+
+%</numerical>
+ITERATE {presort}
+
+% \end{macrocode}
+%
+% And now we can sort
+% \begin{macrocode}
+SORT
+
+EXECUTE {initialize.longest.label}
+
+ITERATE {forward.pass}
+
+REVERSE {reverse.pass}
+
+ITERATE {bib.sort.order}
+
+SORT
+
+EXECUTE {begin.bib}
+
+% \end{macrocode}
+%
+% Now we produce the output for all the entries
+% \begin{macrocode}
+ITERATE {call.type$}
+
+EXECUTE {end.bib}
+%</authoryear|numerical>
+% \end{macrocode}
+% \end{environment}
+%
+% \Finale
+\endinput
diff --git a/biblio/bibtex/contrib/gbt7714/gbt7714.pdf b/biblio/bibtex/contrib/gbt7714/gbt7714.pdf
new file mode 100644
index 0000000000..a37986e804
--- /dev/null
+++ b/biblio/bibtex/contrib/gbt7714/gbt7714.pdf
Binary files differ
diff --git a/biblio/bibtex/contrib/gbt7714/gbt7714.sty b/biblio/bibtex/contrib/gbt7714/gbt7714.sty
new file mode 100644
index 0000000000..3269ff5bf7
--- /dev/null
+++ b/biblio/bibtex/contrib/gbt7714/gbt7714.sty
@@ -0,0 +1,124 @@
+%%
+%% This is file `gbt7714.sty',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% gbt7714.dtx (with options: `package')
+%% -------------------------------------------------------------------
+%% GB/T 7714-2015 BibTeX Style
+%% https://github.com/CTeX-org/gbt7714-bibtex-style
+%% Version: 2019/03/21 v1.1.1
+%% -------------------------------------------------------------------
+%% Copyright (C) 2016-2019 by Zeping Lee <zepinglee AT gmail.com>
+%% -------------------------------------------------------------------
+%% This file may be distributed and/or modified under the
+%% conditions of the LaTeX Project Public License, either version 1.3c
+%% of this license or (at your option) any later version.
+%% The latest version of this license is in
+%% https://www.latex-project.org/lppl.txt
+%% and version 1.3c or later is part of all distributions of LaTeX
+%% version 2005/12/01 or later.
+%% -------------------------------------------------------------------
+\NeedsTeXFormat{LaTeX2e}[1999/12/01]
+\ProvidesPackage{gbt7714}
+ [2019/03/21 v1.1.1 GB/T 7714-2015 BibTeX Style]
+\newif\if@gbt@mmxv
+\newif\if@gbt@numerical
+\newif\if@gbt@super
+\DeclareOption{2015}{\@gbt@mmxvtrue}
+\DeclareOption{2005}{\@gbt@mmxvfalse}
+\DeclareOption{super}{\@gbt@numericaltrue\@gbt@supertrue}
+\DeclareOption{numbers}{\@gbt@numericaltrue\@gbt@superfalse}
+\DeclareOption{authoryear}{\@gbt@numericalfalse}
+\DeclareOption*{\PassOptionsToPackage{\CurrentOption}{natbib}}
+\ExecuteOptions{2015,super}
+\ProcessOptions\relax
+\if@gbt@numerical
+ \PassOptionsToPackage{sort&compress}{natbib}
+\fi
+\RequirePackage{natbib}
+\RequirePackage{etoolbox}
+\RequirePackage{url}
+\newcommand\bibstyle@super{\bibpunct{[}{]}{,}{s}{,}{\textsuperscript{,}}}
+\newcommand\bibstyle@numbers{\bibpunct{[}{]}{,}{n}{,}{,}}
+\newcommand\bibstyle@authoryear{\bibpunct{(}{)}{;}{a}{,}{,}}
+\newcommand\gbtbibstyle[1]{%
+ \ifstrequal{#1}{numerical}{%
+ \if@gbt@mmxv
+ \bibliographystyle{gbt7714-unsrt}%
+ \else
+ \bibliographystyle{gbt7714-2005-unsrt}%
+ \fi
+ }{%
+ \ifstrequal{#1}{authoryear}{%
+ \if@gbt@mmxv
+ \bibliographystyle{gbt7714-plain}%
+ \else
+ \bibliographystyle{gbt7714-2005-plain}%
+ \fi
+ }{%
+ \PackageError{gbt7714}{Unknown argument #1.}%
+ {It should be `numerical' or `authoryear'.}%
+ }%
+ }%
+}
+\if@gbt@numerical
+ \if@gbt@super
+ \citestyle{super}%
+ \gbtbibstyle{numerical}%
+ \else
+ \citestyle{numbers}
+ \gbtbibstyle{numerical}%
+ \fi
+\else
+ \citestyle{authoryear}
+ \gbtbibstyle{authoryear}%
+\fi
+\newcommand\gbt@patchfailure[1]{%
+ \PackageError{gbt7714}{Failed to patch command \protect#1}{}%
+}
+\patchcmd{\NAT@citexnum}{%
+ \@ifnum{\NAT@ctype=\z@}{%
+ \if*#2*\else\NAT@cmt#2\fi
+ }{}%
+ \NAT@mbox{\NAT@@close}%
+}{%
+ \NAT@mbox{\NAT@@close}%
+ \@ifnum{\NAT@ctype=\z@}{%
+ \if*#2*\else\textsuperscript{#2}\fi
+ }{}%
+}{}{\gbt@patchfailure{\NAT@citexnum}}
+\renewcommand\NAT@citesuper[3]{\ifNAT@swa
+ \if*#2*\else#2\NAT@spacechar\fi
+\unskip\kern\p@\textsuperscript{\NAT@@open#1\NAT@@close\if*#3*\else#3\fi}%
+ \else #1\fi\endgroup}
+\patchcmd{\NAT@citex}{%
+ \if*#2*\else\NAT@cmt#2\fi
+ \if\relax\NAT@date\relax\else\NAT@@close\fi
+}{%
+ \if\relax\NAT@date\relax\else\NAT@@close\fi
+ \if*#2*\else\textsuperscript{#2}\fi
+}{}{\gbt@patchfailure{\NAT@citex}}
+\renewcommand\NAT@cite%
+ [3]{\ifNAT@swa\NAT@@open\if*#2*\else#2\NAT@spacechar\fi
+ #1\NAT@@close\if*#3*\else\textsuperscript{#3}\fi\else#1\fi\endgroup}
+\patchcmd{\NAT@citexnum}{%
+ \ifx\NAT@last@yr\relax
+ \def@NAT@last@yr{\@citea}%
+ \else
+ \def@NAT@last@yr{--\NAT@penalty}%
+ \fi
+}{%
+ \def@NAT@last@yr{-\NAT@penalty}%
+}{}{\gbt@patchfailure{\NAT@citexnum}}
+\renewcommand\@biblabel[1]{[#1]\hfill}
+\def\UrlBreaks{%
+ \do\/%
+ \do\a\do\b\do\c\do\d\do\e\do\f\do\g\do\h\do\i\do\j\do\k\do\l%
+ \do\m\do\n\do\o\do\p\do\q\do\r\do\s\do\t\do\u\do\v\do\w\do\x\do\y\do\z%
+ \do\A\do\B\do\C\do\D\do\E\do\F\do\G\do\H\do\I\do\J\do\K\do\L%
+ \do\M\do\N\do\O\do\P\do\Q\do\R\do\S\do\T\do\U\do\V\do\W\do\X\do\Y\do\Z%
+ \do0\do1\do2\do3\do4\do5\do6\do7\do8\do9\do=\do/\do.\do:%
+ \do\*\do\-\do\~\do\'\do\"\do\-}
+\Urlmuskip=0mu plus 0.1mu
diff --git a/biblio/bibtex/contrib/german/din1505/abbrvdin.bst b/biblio/bibtex/contrib/german/din1505/abbrvdin.bst
new file mode 100644
index 0000000000..aff24f69ac
--- /dev/null
+++ b/biblio/bibtex/contrib/german/din1505/abbrvdin.bst
@@ -0,0 +1,2031 @@
+%% ABBRVDIN.BST Ausgabe [8.2] 2006-01-02
+%% mit doi-, url-, urn-Funktionen
+%% ersetzt ABBRVDIN.BST Ausgabe [8.1b1] 15/12/2004
+%%
+%% K.F.Lorenzen (Copyright 1994-2006) email: lorenzen.marxen@t-online.de
+%% ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+%% ABBRVDIN.BST wurde entwickelt aus Oren Patashnik's BibTeX standard
+%% bibliography style `abbrv'. Eine vorgegebene Literaturdatenbank laesst sich
+%% somit beliebig nach US- oder deutscher DIN 1505-Zitierkonvention
+%% verarbeiten.
+%% Analog zu den 4 US standard styles werden 4 DIN-gerechte bst-style Dateien
+%% veroeffentlicht (alphadin.bst, plaindin.bst, unsrtdin.bst, abbrvdin.bst).
+%% Die gueltige Version ist am schnellsten aus dem WWW ueber folgende URL zu
+%% beziehen:
+%% http://www.haw-hamburg.de/pers/Lorenzen/bibtex/
+%% Stand: 2006-01-02
+%% ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+%% WAS IST ABBRVDIN.BST ?
+%% Dieser style produziert Literaturzitate in Literaturverzeichnissen
+%% gemaess der deutschen Norm DIN 1505, Teil 2 vom Jan. 1984.
+%% Die Vornamen der Verfasser, Herausgeber, Zeitschriftennamen, Monatsnamen
+%% werden abgekuerzt. Die Anordnung im Literaturverzeichnis entspricht der von
+%% plaindin.bst, also sortiert und in eckigen Klammern gezaehlt. Die
+%% vorliegenden DIN-styles gehen ueber einige bibliographische Beschraenkungen
+%% der Originalstyles hinaus.
+%
+%% Es werden nun auch Elektronische Online / Offline Ressourcen wie Internet-
+%% quellen, CD-ROM usw. verarbeitet. Dazu kommen besondere Publikationsformen
+%% wie Patente, Normen, Karten, Fernsehaufzeichnungen, Gesetzesstellen, Spiele.
+%
+%% Zur Gewaehrleistung der Allgemeingueltigkeit von bib-files gelten in den
+%% DIN-styles die in der Tex-Literatur veroeffentlichten originalen
+%% Definitionen und Regeln fuer die Publikationstypen (entry-types) und die
+%% bibliographischen Felder (fields).
+%% Treten kleinere "Schoenheitsfehler" im fertig gesetzten output auf,
+%% lassen sich diese so gut wie immer durch eine veraenderte
+%% Erfassung im bib-inputfile beseitigen. Oren Patashnik empfiehlt, die
+%% Definition der Felder weit auszulegen. Last but not least koennen
+%% Sie im output-file < *.bbl > noch letzte Hand zur Korrektur ansetzen.
+%
+%% WARN- UND FEHLERMELDUNGEN
+%% Ursache von Warnmeldungen sind meistens ausgelassene Felder oder
+%% Erfassungs-"Fehler". Letztere haengen teilweise mit den gegenueber US-
+%% Gepflogenheiten andersartigen bibliographischen Regeln nach DIN 1505
+%% zusammen. Sie sind also in Wahrheit keine "Fehler" und duerfen fast immer
+%% ignoriert werden. Dennoch pruefen Sie diese Warnungen, um heraus zu finden,
+%% ob Publikationstyp (=entry-type) und "fields" eventuell unzulaessig
+%% kombiniert worden sind.
+%% Echte Fehler ("errors") treten nur noch in Verbindung mit falscher
+%% Erfassung auf (nach meinen Tests!). Pruefen Sie die Syntax, den entry-type
+%% und die fields.
+%% Zu guter letzt: Qualitaetsmasstab ist einzig der DIN-konforme output!
+%%
+%% DANKSAGUNG
+%% Hartmut Lueddecke, HAW Hamburg, hat viele Verbesserungsvorschlaege
+%% in die frueheren Versionen eingebracht. Ihm danke ich herzlich.
+%% Patrick W. Daly, dem Entwickler des Natbib-Stils, verdanke ich viele
+%% Anregungen und den steten Ansporn, die DIN-Stile zu verbessern.
+%% Viele an dieser Stelle ungenannt bleibende Anwender haben mich in
+%% den vergangenen Jahren auf Fehler oder Verbesserungsmoeglichkeiten
+%% aufmerksam gemacht und so diesen Stil mitentwickelt. Ihnen gilt mein
+%% besonderer Dank. Ihr Feedback ist immer willkommen und eine Ermunterung.
+%%
+%% Klaus F. Lorenzen
+%%
+%%
+%%
+%% HINWEIS: Neben den vier bibliographischen DIN 1505 Standard-Stilen
+%% nach den Original-styles von Oren Patashnik
+%% gibt es zusaetzlich vier DIN 1505 Modifikationen der style
+%% Emulationen des NATBIB-Pakets von Patrick W.Daly.
+%% In den NATBIB-Modifikationen werden jetzt alle von P.W. Daly
+%% implementierten Zitierweisen des Autor-Jahr-Stils unterstuetzt.
+%% Damit erhaelt der Anwender eine weit ueber die urspruenglichen
+%% Standardstyles hinausreichende Flexibilitaet beim Zitieren.
+%% Naeheres unter URL http://www.haw-hamburg.de/pers/Lorenzen/bibtex/
+%%
+%%
+%% ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+% version 0.99c for BibTeX versions 0.99c or later, LaTeX2e
+% Copyright (C) 1985, all rights reserved.
+% Copying of this file is authorized only if either
+% (1) you make absolutely no changes to your copy, including name, or
+% (2) if you do make changes, you name it something other than
+% plaindin.bst, unsrtdin.bst, alphadin.bst, and abbrvdin.bst.
+% This restriction helps ensure that all standard styles are identical.
+% The file btxbst.doc has the original documentation for style 'alpha'.
+%%
+%% ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+%%
+%% NEUE FELDER
+%% Zur Erfassung der neuen digitalen Online-Medien z.B. Internetquellen, E-journals, E-books,
+%% E-mail u.a. gibt es die zusaetzlichen Felder: doi, url, urn, lastchecked
+%% Internetquellen werden vorzugsweise mit dem BOOKLET-Typ erfasst.
+%% Normen, Patente, Schutzrechte sind mit dem MISC-Typ zu erfassen.
+%
+%
+ENTRY
+ { address %% Verlagsort
+ author %% persoenlicher Urheber eines Werkes
+ booktitle %% a) Gesamttitel eines mehrbaendigen Werkes
+% %% b) Titel des Sammelwerks, das einzelne selbstaendige
+% %% Beitraege mit eigenem Titel enthaelt (->incollection)
+ chapter %% Kapitel in einem Buch (Monographie)
+ doi %%% Digital Object Identifier
+ edition %% Auflagevermerk; bei selbst. elektron. Dok. == Version
+ editor %% Persoenl.Herausgeber oder Koerperschaftlicher Herausgeber
+ howpublished %% beliebiger Verlegervermerk: von wem, wo
+ institution %% Institution, die e.Verlagsfreie Veroeffentlichung betreibt
+ isbn %% Standardnr fuer Buecher
+ issn %% - " - : Zeitschriften u. Serien
+ journal %% Titel einer Zeitschrift
+ key %% Zusaetzlich vergebener Sortierschluessel, mitunter notwend.
+ lastchecked %% Online Abruf einer Internetquelle ( GRAY ); 22.1.2004
+ month %% naehere Bestimmung des Erscheinungsjahres (-> macro 's)
+ note %% freies Eingabefeld fuer zusaetzliche Informationen
+ number %% Mehrfachbedeutung in Abhaengigkeit vom Eingabetyp
+ organization %% a) Name der Organisation/des Organisators e. Tagung,Konferenz
+% %% b) Name einer Firma/Gesellschaft, die ein ->manual herausgab
+ pages %% Umfangsangaben, meist Seitenzahlen
+ publisher %% Verlag
+ school %% Hochschule/Universitaet, die eine Dipl.-Arb./Dissertation veroeff.
+ series %% Titel e.Reihe, in der ein best. Buchtitel erschienen ist
+ title %% Titel einer (namentlich gekennzeichneten) Veroeffentlichung
+ type %% Zusatzfeld z.Kennzeichnung e.besonderen Publikationstyps
+ url %%% Internet-Adresse URL ( Uniform Resource Locator )
+ urn %% Persistent Identifier URN ( Uniform Resource Name )
+ volume %% a) Zaehlung bei einem mehrbaendigen Werk (-> book)
+% %% b) Jahrgang einer Zeitschrift (-> article
+ year %% Erscheinungsjahr
+ }
+ {}
+ { label extra.label sort.label }
+
+%% Variablen-Vereinbarungen
+
+INTEGERS { output.state before.all mid.sentence after.sentence after.block }
+
+INTEGERS { colon.after period.dash }
+
+INTEGERS { after.firstblock }
+
+%% fuer die Namensbehandlung
+
+INTEGERS { zahl lang }
+
+INTEGERS { nameptr namesleft numnames }
+
+INTEGERS { ptr collation collrest }
+
+%% fuer die Sortierung bei der label-Produktion
+INTEGERS { len }
+
+INTEGERS { number.label longest.label.width }
+%%----------------------------------------------------------------------
+
+STRINGS { h s t u v w }
+
+%% bei der Behandlung der Namen-Funktionsbezeichnung (Hrsg., Redakt., usw)
+STRINGS { fkt }
+
+%% fuer die label-Produktion
+STRINGS { longest.label }
+
+%%%----------------------------------------------------------------------------
+% Einige Standardvorgaben, die vom Benutzer veraendert werden koennen.
+%%%----------------------------------------------------------------------------
+
+% Abkuerzung ("... und andere") bei Mehrverfasserquellen:
+
+FUNCTION { ua.etal } { " u.\,a." } %% evtl. auch in eckigen Klammern " [u.\,a.]"
+
+%% oder lateinisch: FUNCTION { ua.etal } { " et~al." }
+
+FUNCTION { und } { " u. " }
+
+%% oder ausgeschrieben: FUNCTION { und } { " und " }
+%
+% Einige elektronische Medien erhalten nach DIN 1505 eine "Ergaenzende Angabe"
+% zusaetzlich zum materiellen Typ, z.B. CD ROM oder DVD u.a.:
+
+FUNCTION { eress } { "Elektronische Ressource" }
+
+%%%-----------------------------------------------------------------------------------
+
+
+FUNCTION {init.state.consts}
+{ #0 'before.all :=
+ #1 'mid.sentence :=
+ #2 'after.sentence :=
+ #3 'after.block :=
+ #4 'colon.after :=
+ #5 'period.dash :=
+ #6 'after.firstblock :=
+}
+
+FUNCTION {output.nonnull}
+{ 's :=
+ output.state after.block =
+ { add.period$ write$
+ newline$
+ "\newblock " write$
+ }
+ { output.state before.all =
+ { write$ }
+ { output.state colon.after =
+ { ": " * write$
+ newline$
+ "\newblock " write$
+ }
+ { output.state period.dash =
+ { ". -- " * write$
+ newline$
+ "\newblock " write$
+ }
+ { output.state mid.sentence =
+ { ", " * write$ }
+ { output.state after.sentence =
+ { " " * write$ }
+ { output.state after.firstblock =
+ { add.period$ write$
+ newline$
+ "\newblock " write$
+ }
+ { write$
+ newline$
+ "\newblock " write$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+ after.block 'output.state :=
+ }
+ if$
+ s
+ }
+
+FUNCTION {output}
+{ duplicate$ empty$
+ 'pop$
+ 'output.nonnull
+ if$
+}
+
+FUNCTION {output.check}
+{ 't :=
+ duplicate$ empty$
+ { pop$ "empty " t * " in " * cite$ * warning$ }
+ 'output.nonnull
+ if$
+}
+
+FUNCTION {new.block}
+{ output.state before.all =
+ 'skip$
+ { after.block 'output.state := }
+ if$
+}
+
+FUNCTION {not}
+{ { #0 }
+ { #1 }
+ if$
+}
+
+FUNCTION {and}
+{ 'skip$
+ { pop$ #0 }
+ if$
+}
+
+FUNCTION {or}
+{ { pop$ #1 }
+ 'skip$
+ if$
+}
+
+
+FUNCTION {output.bibitem}
+{ newline$
+ "\bibitem[" write$
+ label write$%
+ "]{" write$
+ cite$ write$
+ "}" write$
+ newline$
+ ""
+ before.all 'output.state :=
+}
+
+FUNCTION {fin.entry}
+{ write$
+ newline$
+}
+
+FUNCTION {set.period.dash} %% Wenn ein ". - " die Satzteile trennen soll.!
+{ output.state before.all =
+ 'skip$
+ { period.dash 'output.state := }
+ if$
+}
+
+FUNCTION {set.period.dash.check}
+{ empty$
+ 'skip$
+ 'set.period.dash
+ if$
+}
+
+FUNCTION {set.colon.after} %%$$$ Wenn ein ": " d. Satzteile trennen soll!
+{ output.state before.all =
+ 'skip$
+ { colon.after 'output.state := }
+ if$
+}
+
+%% Wenn ein " " die Satzteile trennen soll.!
+FUNCTION {new.sentence}
+{ output.state before.all =
+ 'skip$
+ { after.sentence 'output.state := }
+ if$
+}
+
+%% Wenn ein ", " die Satzteile trennen soll.!
+FUNCTION { part.of.sentence }
+{ output.state before.all =
+ 'skip$
+ { mid.sentence 'output.state := }
+ if$
+}
+
+FUNCTION {new.sentence.checka}
+{ empty$
+ 'skip$
+ 'new.sentence
+ if$
+}
+
+FUNCTION {field.or.null}
+{ duplicate$ empty$
+ { pop$ "" }
+ 'skip$
+ if$
+}
+
+FUNCTION {emphasize}
+{ duplicate$ empty$
+ { pop$ "" }
+ { "\emph{" swap$ * "}" * }
+ if$
+}
+
+FUNCTION { capitalize }
+ { duplicate$ empty$
+ { pop$ "" }
+ { "\textsc{" swap$ * "}" * }
+ if$
+}
+
+FUNCTION {article.in.journal}
+{ duplicate$ empty$
+ { pop$ "" }
+ { author missing$ title missing$ and
+ { emphasize }
+ { emphasize "{In: }" swap$ * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.doi}
+{ doi empty$
+ { "" }
+ { new.block " \url{http://dx.doi.org/" doi * "}" *
+ %% { new.block " \url{http://dx.medra.org/" doi * "}" *
+ }
+ if$
+}
+
+FUNCTION {format.url}
+{ urn missing$
+ { doi missing$
+ { url empty$
+ { "" }
+ { type empty$ NOT
+ { type #-1 #4 substring$ "mail" =
+ type #1 #4 substring$ "Mail" =
+ OR
+ { type$ "incollection" =
+ { "" }
+ { "\,Absenderadresse: \url{" url * "}" * }
+ if$
+ }
+ { "\url{" url * "}" * }%% evtl. "URL" oder "<...>"
+ if$
+ }
+ { "\url{" url * "}" * } %% evtl. "URL" oder "<...>"
+ if$
+ }
+ if$
+ }
+ { format.doi }
+ if$
+ }
+ { "\url{http://nbn-resolving.de/urn/resolver.pl?urn=" urn * "}" *
+ }
+ if$
+}
+
+FUNCTION {format.maillist.url}
+ { url empty$
+ { "" }
+ { type empty$
+ { "" }
+ { type #-1 #4 substring$ "mail" =
+ type #1 #4 substring$ "Mail" =
+ OR
+ { "\url{" url * "}" * }
+ { "" }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+
+%% Adelspraedikate beim Sortieren nach den(m) Vornamen auffuehren
+%% Abweichend v. DIN !!!
+FUNCTION {format.names}
+{ 's :=
+ "" 'u :=
+ #1 'nameptr :=
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ {
+ s nameptr "{ll}" format.name$ 't :=
+ t capitalize 't :=
+ s nameptr "{ jj}" format.name$ 'w :=
+ s nameptr "{, f.~}{ vv}{ jj}" format.name$ 'u :=
+ u text.length$ 'lang :=
+ #1 'zahl :=
+ "" 'v :=
+ { zahl lang < }
+ { u zahl #1 substring$ "~" =
+ { v "" =
+ { u #1 zahl #1 - substring$ 'v := }
+ 'skip$
+ if$
+ v u zahl #2 substring$ * "." * w * 'v :=
+ }
+ 'skip$
+ if$
+ zahl #1 + 'zahl := }
+ while$
+ v "" =
+ { u 'v := }
+ 'skip$
+ if$
+ t v * fkt * 't :=
+ nameptr #1 >
+ { namesleft #1 >
+ { " ; " * t * }
+ { numnames #2 >
+ { " " * }
+ 'skip$
+ if$
+ t "\textsc{others}" = t "\textsc{others} (Hrsg.)" = or
+ { ua.etal * }
+ { " ; " * t * }
+ if$
+ }
+ if$ %% Ende der namesleft-Pruefung
+ }
+ 't
+ if$ %% Ende der nameptr-Pruefung
+
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$ %% Ende von { namesleft #0 > } ganz oben
+ "" 'fkt := %% fkt wird zurueckgesetzt
+}
+
+FUNCTION {format.authors}
+{ author empty$
+ { "" }
+ { author format.names }
+ if$
+}
+
+FUNCTION {format.editors}
+{ editor empty$
+ { author empty$
+ { "empty author and editor in " cite$ * warning$ "" }
+ 'skip$
+ if$
+ }
+ { author empty$
+ { " (Hrsg.)" 'fkt :=
+ editor format.names
+ }
+ { " (Hrsg.)" 'fkt :=
+ " ; " * editor format.names *
+ }
+ if$
+ }
+ if$
+ }
+
+%% 2005-11-11
+FUNCTION { format.authors.organization }
+{ type$ "misc" =
+ { organization empty$
+ { author empty$
+ { "" }
+ { author format.names " (Erfinder)" * }
+ if$
+ }
+ { author empty$
+ { organization }
+ { author format.names " (Erfinder); " *
+ organization * " (Anmelder)" *
+ }
+ if$
+ }
+ if$
+ }
+ { type$ "manual" =
+ { organization empty$
+ { format.authors }
+ { author empty$
+ { organization capitalize " (Hrsg.)" * }
+ { author format.names }
+ if$
+ }
+ if$
+ }
+ 'skip$
+ if$
+ }
+ if$
+}
+
+
+
+FUNCTION { format.editors.organization }
+{ organization empty$
+ 'skip$
+ { type$ "misc" =
+ { organization }
+ { * " ; " * organization " (Veranst.)" *}
+ if$
+ }
+ if$
+}
+
+FUNCTION { format.tr.institution }
+{ institution empty$
+ 'skip$
+ { institution capitalize }
+ if$
+}
+
+FUNCTION {format.ed.incoll}
+{ editor empty$
+ { "" }
+ { " (Hrsg.)" 'fkt :=
+ editor format.names
+ format.editors.organization
+ }
+ if$
+}
+
+
+FUNCTION {format.title}
+{ title empty$
+ { "" }
+ { title } %% Text so wie er dasteht im Feld title
+ if$
+}
+
+FUNCTION {format.number}
+{ number empty$
+ { "" }
+ { number " " * } %% Text so wie er im Feld number steht plus " "
+ if$
+}
+
+
+FUNCTION {format.type}
+{ type empty$
+ { "" }
+ { type " " * } %% Text wie er dasteht; Schutzrecht, Norm etc.
+ if$
+}
+
+FUNCTION {format.digital.type}
+{ type empty$
+ { "" }
+ { type #-1 #4 substring$ "mail" =
+ type #1 #4 substring$ "Mail" =
+ OR
+ { "" }
+ { type } %% Typ einer digitalen Ressource in Form einer
+ %% "Ergaenzenden Angabe", so wie er dasteht;
+ %% Alternativ kann dieser Text auch in NOTE erfasst werden.
+ if$
+ }
+ if$
+}
+
+FUNCTION {n.dashify}
+{ 't :=
+ ""
+ { t empty$ not }
+ { t #1 #1 substring$ "-" =
+ { t #1 #2 substring$ "--" = not
+ { "--" *
+ t #2 global.max$ substring$ 't :=
+ }
+ { { t #1 #1 substring$ "-" = }
+ { "-" *
+ t #2 global.max$ substring$ 't :=
+ }
+ while$
+ }
+ if$
+ }
+ { t #1 #1 substring$ *
+ t #2 global.max$ substring$ 't :=
+ }
+ if$
+ }
+ while$
+}
+
+%% Auflagenvermerke gibt man komplett, einschliesslich Abkuerzungen in
+%% das Feld edition ein: ---> EDITION= { 3., erw. und verb. Aufl. }
+%% oder fremdsprachlich: EDITION= { 2nd edition }
+
+FUNCTION {format.edition}
+{ edition empty$
+ { "" }
+ { edition }
+ if$
+}
+
+FUNCTION {format.date}
+{ year duplicate$ empty$
+ { "empty year in " cite$ * warning$
+ pop$ "" }
+ 'skip$
+ if$
+ month empty$
+ 'skip$
+ { type$ "book" =
+ type$ "inbook" =
+ OR
+ 'skip$
+ { month " " * swap$ * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.edition.or.date}
+{ edition empty$ year empty$ and
+ { "" }
+ { edition empty$
+ { type empty$ NOT
+ { type #-1 #4 substring$ "mail" =
+ type #1 #4 substring$ "Mail" =
+ OR
+ { " gesendet: " "-- " type * swap$ *
+ format.date *
+ }
+ { "\,Version:\,"
+ format.date *
+ }
+ if$
+ }
+ { "\,Version:\,"
+ format.date *
+ }
+ if$
+ }
+ { year empty$
+ { "\,Version:\," edition * }
+ { "\,Version:\," edition * ", " *
+ format.date *
+ }
+ if$
+ }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.version.url}
+{ url empty$ doi empty$ urn empty$ and and
+ { type$ "techreport" =
+ { format.edition }
+ { "" }
+ if$
+ }
+ { format.edition.or.date output format.url }
+ if$
+}
+
+FUNCTION {format.edition.or.version}
+{ url empty$ doi empty$ urn empty$ and and
+ { format.edition }
+ { format.edition.or.date }
+ if$
+}
+
+FUNCTION {format.address.publisher.year}
+{ publisher empty$
+ { address empty$
+ { year empty$
+ { "" }
+ { url empty$
+ { year }
+ { "" }
+ if$
+ }
+ if$
+ }
+ { "there's an address but no publisher in " cite$ * warning$
+ address ", " * format.date *
+ }
+ if$
+ }
+ { url empty$%%%% wenn es URL gibt wird nur die service-provider Adresse
+%%% ausgegeben, die im publisher-Feld steht
+ { address empty$
+ { year empty$
+ { "neither address nor publication date in " cite$ * warning$
+ publisher
+ }
+ { publisher ", " * format.date * }
+ if$
+ }
+ { year empty$
+ { address " : " * publisher * }
+ { address " : " * publisher * ", " * format.date * }
+ if$
+ }
+ if$
+ }
+ { publisher }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.howpublished}
+{ url missing$ urn missing$ doi missing$ AND AND
+ { howpublished empty$
+ { address empty$
+ { type empty$
+ { "" }
+ { type #-1 #4 substring$ "mail" =
+ { "(gesendet: " new.sentence
+ format.date * ")" *
+ }
+ { "" }
+ if$
+ }
+ if$
+ format.date *
+ }
+ { address ", " * format.date * }
+ if$
+ }
+ { address empty$
+ { howpublished ", " * format.date * }
+ { address " : " * howpublished * ", " * format.date * }
+ if$
+ }
+ if$
+ }
+ { howpublished empty$
+ { "" }
+ { howpublished }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.lastchecked.or.type}
+{ lastchecked empty$
+ { url empty$ doi empty$ urn empty$ and and
+ { type empty$
+ { skip$ }
+ { type set.period.dash.check
+ type output
+ }
+ if$
+ }
+ { type empty$
+ { skip$ }
+ { type #-1 #4 substring$ "mail" =
+ type #1 #4 substring$ "Mail" =
+ OR
+ { skip$ }
+ { type set.period.dash.check
+ type output }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ { url empty$ doi empty$ urn empty$ and and
+ { "there's a lastchecked date but no url, urn or doi in "
+ cite$ * warning$
+ }
+ { type empty$
+ { "there's a URL and a lastchecked date but no type in "
+ cite$ * warning$
+ }
+ { type set.period.dash.check
+ type output
+ part.of.sentence
+ lastchecked "Abruf: " swap$ * output
+ }
+ if$
+ }
+ if$
+ }
+ if$
+}
+
+
+FUNCTION {format.btitle}
+{ title emphasize
+}
+
+FUNCTION {tie.or.space.connect}
+{ duplicate$ text.length$ #3 <
+ { "~" }
+ { " " }
+ if$
+ swap$ * *
+}
+
+FUNCTION {format.btitle.vol}
+{ number empty$
+ { series empty$
+ { volume empty$
+ { title emphasize }
+ { title emphasize ". Bd." * volume tie.or.space.connect }
+ if$
+ }
+ { volume empty$
+ { title emphasize }%% ein Buch, das zusaetzl. SERIES=Reihentitel besitzt
+ %% jetzt kommt d. Fall des mehrbaendigen Werkes mit Gesamttitel=SERIES
+ %% Zaehlung=VOLUME und Bandtitel=TITLE;
+ { series emphasize ". Bd." * volume tie.or.space.connect
+ ": " * "{\emph{" * title * "}}" * }
+ if$
+ }
+ if$%% series-test
+ }
+ { title emphasize }%% wenn number ex., dann immer title-Feld
+ if$%% Ende number-test
+}
+
+FUNCTION {format.series.number.din}
+{ volume empty$
+ { number empty$
+ { series empty$
+ { "" }
+ { "(" series * ")" * } %% d. Seriennr koennte auch gleich hier
+ %% im SERIES-Feld miterfasst werden
+ if$
+ }
+ { series empty$
+ { "(" number * ")" *
+ "there's a number but no series in " cite$ * warning$
+ }
+ { "(" series * number tie.or.space.connect ")" * }
+ if$
+ }
+ if$
+ }
+ { series empty$
+ { "" }
+ { type$ "proceedings" = %% Sonderfall, es darf VOLUME und NUMBER ex. !
+ type$ "inproceedings" = OR
+ { number empty$
+ { "(" series * ")" * }
+ { "(" series * number tie.or.space.connect ")" * }
+ if$
+ }
+ { "" }%% Ausstieg mit Nullstring, s. Kommentar
+ if$
+ }%% bei gezaehlten Reihen MUSS die Reihennr. im Feld NUMBER stehen!
+ if$ %% wenn also d. Feld VOLUME nicht leer ist, dann liegt ausser bei
+ %% Typ PROCEEDINGS falsche
+ } %% Erfassung vor und es erfolgt d. Ausstieg mit d. Nullstring!
+ if$
+}
+
+FUNCTION {format.tr.series.or.number}
+{ number empty$
+ { series empty$
+ { "" }
+ { "(" series * ")" * }
+ if$
+ }
+ { series empty$
+ { "(" number * ")" * }
+ { "(" series * number tie.or.space.connect ")" * }
+ if$
+ }
+ if$
+ }
+
+FUNCTION {format.misc.series}
+{ series empty$
+ { "" }
+ { "(" series * ")" * }
+ if$
+}
+
+FUNCTION { format.doi.urn }
+{ urn empty$
+ { doi empty$
+ { "" }
+ { "DOI" doi n.dashify tie.or.space.connect }
+ if$
+ }
+ { "URN" urn n.dashify tie.or.space.connect }
+ if$
+}
+
+FUNCTION { format.isbn.issn }
+{ isbn empty$
+ { issn empty$
+ { "" }
+ { "ISSN" issn n.dashify tie.or.space.connect }
+ if$
+ }
+ { "ISBN" isbn n.dashify tie.or.space.connect }
+ if$
+}
+
+FUNCTION {format.pages}
+{ pages empty$
+ { "" }
+ { url empty$
+ { "S." pages n.dashify tie.or.space.connect }
+ { pages }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.pages.book}
+{ pages empty$
+ { "" }
+ { note empty$ isbn empty$ AND
+ { "" pages n.dashify tie.or.space.connect " S" *
+ add.period$ }
+ { "" pages n.dashify tie.or.space.connect " S" * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.pages.bkcollation}
+{ pages empty$
+ { "" }
+ { "" pages n.dashify tie.or.space.connect }
+ if$
+}
+
+FUNCTION {format.bkpages.collat.check}
+{ 's :=
+ #1 'ptr :=
+ s text.length$ 'collation :=
+ collation #1 =
+ { format.pages.book }
+ {
+ collation 'collrest :=
+ { collrest #0 > }
+ { s ptr #2 substring$ 't :=
+ t "S." =
+ { format.pages.bkcollation
+ #0 'collrest := }
+ { ptr #1 + 'ptr :=
+ collrest #1 - 'collrest :=
+ #1 collrest =
+ { format.pages.book }
+ { skip$ }
+ if$
+ }
+ if$
+ }
+ while$
+ }
+ if$
+}
+
+FUNCTION {format.bkpages.collat.check.alt}
+{ 's :=
+ #1 'ptr :=
+ s text.length$ 'collation :=
+ collation 'collrest :=
+ { collrest #0 > }
+ { s ptr #2 substring$ 't :=
+ t "S." =
+ { format.pages.bkcollation
+ #0 'collrest := }
+ { ptr #1 + 'ptr :=
+ collrest #1 - 'collrest :=
+ #1 collrest =
+ { format.pages.book }
+ { skip$ }
+ if$
+ }
+ if$
+ }
+ while$
+}
+
+
+FUNCTION {format.vol.year.num.pages}
+{ volume field.or.null
+ year empty$
+ { "there's no year in " cite$ * warning$ }
+ { " (" year * ")" * * }
+ if$
+ month empty$
+ 'skip$
+ { ", " month * * }
+ if$
+ number empty$
+ 'skip$
+ { ", Nr. " number * * }
+ if$
+ pages empty$
+ 'skip$
+ { duplicate$ empty$
+ { pop$ "" }
+ { title missing$
+ { ", " pages format.bkpages.collat.check * *}
+ { ", " format.pages * *}
+ if$
+ }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.chapter.inbook}
+{ duplicate$ empty$
+ { pop$ "empty chapter in " cite$ * warning$ }
+ { type empty$
+ { "\emph{Kapitel\/} " swap$ tie.or.space.connect }
+ { type " " * swap$ * }%% wenn keine bes. Abschnittsform gen. werden soll,
+ %% koennte e. kl. Zwischenraum gewaehlt werden, z.B. " \, "
+ if$
+ }
+ if$
+ }
+
+FUNCTION {format.chapter.pages}
+{ chapter empty$
+ 'format.pages
+ { type empty$
+ { "Kapitel " }
+ { url empty$
+ { type }
+ { "Kapitel " }
+ if$
+ }
+ if$
+ chapter tie.or.space.connect
+ pages empty$
+ 'skip$
+ { ", " * format.pages * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.in.ed.booktitle.din}
+{ booktitle empty$
+ { "" }
+ { editor empty$
+ { volume empty$
+ { "{In: }" booktitle emphasize * }
+ { "{In: }" booktitle emphasize *
+ " Bd." volume tie.or.space.connect *
+ }
+ if$
+ }
+ { volume empty$
+ { "{In: }" format.ed.incoll * ": " * booktitle emphasize * }
+ { "{In: }" format.ed.incoll * ": " * booktitle emphasize *
+ " Bd." volume tie.or.space.connect *
+ }
+ if$
+ }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.thesis.tr.type}
+{ type empty$
+ 'skip$
+ { pop$
+ type
+ }
+ if$
+}
+
+FUNCTION {format.online.lastcheck}
+{ lastchecked empty$
+ { url empty$ doi empty$ urn empty$ and and
+ { skip$ }
+ { "" output }
+ if$
+ }
+ { url empty$ doi empty$ urn empty$ and and
+ { "there's a lastchecked date but no url, urn or doi in "
+ cite$ * warning$
+ }
+ { part.of.sentence
+ lastchecked "Abruf: " swap$ * output
+ }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.maillist.lastcheck}
+ { type empty$ NOT
+ { type #-1 #4 substring$ "mail" =
+ type #1 #4 substring$ "Mail" =
+ OR
+ { format.online.lastcheck }
+ 'skip$
+ if$
+ }
+ 'skip$
+ if$
+ }
+
+
+FUNCTION {format.article.crossref}
+{ key empty$
+ { journal empty$
+ { "need key or journal for " cite$ * " to crossref " * crossref *
+ warning$
+ ""
+ }
+ { "{In: }{\emph " journal * "}" * }
+ if$
+ }
+ { "{In: }" key * }
+ if$
+ "\cite{" * crossref * "}" * ", " * format.pages *
+}
+
+FUNCTION {format.crossref.editor}
+ { editor #1 "{ll}" format.name$ " (Hrsg.)" *
+ editor num.names$ duplicate$
+ #2 >
+ { pop$ ua.etal * }%% --->u. a.
+ { #2 <
+ 'skip$
+ { editor #2 "{ff }{vv }{ll}{ jj}" format.name$ "others" =
+ { ua.etal }
+
+ { " ; " * editor #2 "{vv~}{ll}" format.name$ * " (Hrsg.)" * }
+ if$
+ }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.inbk.vol.title}
+{ volume empty$
+ { " In: " }
+ { title empty$
+ { " In: Bd." volume tie.or.space.connect
+ " von " *
+ }
+ { "In: Bd." volume tie.or.space.connect ": " * title emphasize *
+ " (" * year * ") in " *
+ }
+ if$
+ }
+ if$
+ }
+
+
+FUNCTION {format.book.crossref}
+{ type$ "inbook" =
+ { format.inbk.vol.title }
+ { volume empty$
+ { "empty volume in " cite$ * "'s crossref of " * crossref * warning$
+ " "
+ }
+ { ". -- Bd." volume tie.or.space.connect
+ " von " *
+ }
+ if$
+ }
+ if$
+ editor empty$
+ editor field.or.null author field.or.null =
+ or
+ { key empty$
+ { series empty$
+ { "need editor, key, or series for " cite$ * " to crossref " *
+ crossref * warning$
+ "" *
+ }
+ { "" * }
+ if$
+ }
+ { key * }
+ if$
+ }
+ { "" * }
+ if$
+ "\cite{" * crossref * "}" *
+}
+
+FUNCTION {format.incoll.inproc.crossref}
+{ editor empty$
+ editor field.or.null author field.or.null =
+ or
+ { key empty$
+ { booktitle empty$
+ { "need editor, key, or booktitle for " cite$ * " to crossref " *
+ crossref * warning$
+ ""
+ }
+ { "{In: }{\emph " booktitle * "}" * }%%
+ if$
+ }
+ { "{In: }" }
+ if$
+ }
+ { "{In: }" }
+ if$
+ "\cite{" * crossref * "}" * %% ", " * format.pages * 5.12.2005
+}
+
+FUNCTION {article}
+{ output.bibitem
+ format.authors "author" output.check
+ set.colon.after
+ format.title "title" output.check
+ crossref missing$
+ { journal article.in.journal output.nonnull
+ new.sentence
+ format.vol.year.num.pages output
+ format.url output
+ }
+ { format.article.crossref output.nonnull }
+ if$
+ format.online.lastcheck
+ doi set.period.dash.check
+ urn set.period.dash.check
+ format.doi.urn output
+ issn set.period.dash.check
+ format.isbn.issn output
+ note set.period.dash.check
+ note output
+ fin.entry
+}
+
+FUNCTION {book}
+{ output.bibitem
+ author empty$
+ { format.editors "author and editor" output.check }
+ { format.authors format.editors output.nonnull }
+ if$
+ set.colon.after
+ crossref missing$
+ { format.btitle.vol "title" output.check }
+ { format.btitle "title" output.check }
+ if$
+ format.edition output
+ format.address.publisher.year "publisher" output.check
+ new.sentence
+ crossref missing$
+ { format.series.number.din output }
+ { format.book.crossref output.nonnull }
+ if$
+ pages empty$
+ { skip$ }
+ { pages set.period.dash.check
+ pages format.bkpages.collat.check output
+ }
+ if$
+ format.doi output
+ format.url output
+ new.block
+ isbn set.period.dash.check
+ format.isbn.issn output
+ note set.period.dash.check
+ note output
+ fin.entry
+}
+
+FUNCTION {booklet}
+{ output.bibitem
+ author empty$
+ { format.editors "author and editor" output.check }
+ { format.authors format.editors output.nonnull }
+ if$
+ set.colon.after
+ format.btitle "title" output.check
+ format.edition.or.version output
+ format.url output
+ format.online.lastcheck
+ format.howpublished output
+ series new.sentence.checka
+ format.series.number.din output
+ pages empty$
+ { skip$ }
+ { pages set.period.dash.check
+ pages format.bkpages.collat.check output
+ }
+ if$
+ type set.period.dash.check
+ format.digital.type output
+ doi set.period.dash.check
+ urn set.period.dash.check
+ format.doi.urn output
+ note set.period.dash.check
+ note output
+ format.isbn.issn output
+ fin.entry
+}
+
+
+FUNCTION {inbook}
+{ output.bibitem
+ chapter format.chapter.inbook output.nonnull
+ crossref missing$
+ { author empty$
+ { format.editors "\,{In:\,}" swap$ * "author and editor" output.check }
+ { format.authors "\,{In:\,}" swap$ * output.nonnull }
+ if$
+ author empty$ editor empty$ AND
+ { before.all 'output.state := }
+ { set.colon.after }
+ if$
+ format.btitle.vol "title" output.check
+ format.edition output
+ format.address.publisher.year "publisher" output.check
+ new.sentence
+ format.series.number.din output
+ isbn set.period.dash.check
+ format.isbn.issn output
+ }
+ { format.book.crossref output.nonnull }
+ if$
+ part.of.sentence
+ format.pages output
+ note set.period.dash.check
+ note output
+ fin.entry
+}
+
+FUNCTION {incollection}
+{ output.bibitem
+ format.authors "author" output.check
+ set.colon.after
+ format.title "title" output.check
+ format.version.url output
+ type empty$ NOT
+ { type #-1 #4 substring$ "mail" =
+ type #1 #4 substring$ "Mail" =
+ OR
+ 'skip$
+ { format.online.lastcheck }
+ if$
+ }
+ { format.online.lastcheck }
+ if$
+ crossref missing$
+ { format.in.ed.booktitle.din "booktitle" output.check
+ format.edition output
+ format.address.publisher.year "publisher" output.check
+ format.maillist.url output
+ format.maillist.lastcheck
+ new.sentence
+ format.series.number.din output
+ doi set.period.dash.check
+ urn set.period.dash.check
+ format.doi.urn output
+ isbn set.period.dash.check
+ issn set.period.dash.check
+ format.isbn.issn output
+ }
+ { format.incoll.inproc.crossref output.nonnull }
+ if$
+ part.of.sentence
+ format.chapter.pages "pages" output.check
+ note set.period.dash.check
+ note output
+ fin.entry
+}
+
+
+FUNCTION {inproceedings}
+{ output.bibitem
+ format.authors "author" output.check
+ set.colon.after
+ format.title "title" output.check
+ crossref missing$
+ { format.in.ed.booktitle.din "booktitle" output.check
+ address empty$
+ { organization new.sentence.checka
+ organization output
+ part.of.sentence
+ format.address.publisher.year output
+ }
+ { format.address.publisher.year "publisher" output.check }
+ if$
+ new.sentence
+ series empty$
+ 'skip$
+ { format.series.number.din output }
+ if$
+ isbn set.period.dash.check
+ issn set.period.dash.check
+ format.isbn.issn output
+ }
+ { format.incoll.inproc.crossref output.nonnull }
+ if$
+ part.of.sentence
+ format.pages "pages" output.check
+ note set.period.dash.check
+ note output
+ fin.entry
+}
+
+FUNCTION {conference} { inproceedings }%% nach Patashnik, wg US-Kompatibilitaet
+
+FUNCTION {manual}
+{ output.bibitem
+ author empty$
+ { organization empty$
+ { title empty$
+ 'skip$
+ {format.btitle "title" output.check }
+ if$
+ }
+ 'skip$
+ if$
+ }
+ 'skip$
+ if$
+ format.authors.organization output.nonnull
+ set.colon.after
+ format.btitle "title" output.check
+ format.edition "edition" output.check
+ author empty$ organization empty$ AND
+ { address "address" output.check
+ part.of.sentence
+ }
+ { organization empty$
+ { address "address" output.check
+ part.of.sentence
+ }
+ { address ": " * organization * output
+ part.of.sentence
+ }
+ if$
+ }
+ if$
+ format.date output
+ number empty$
+ 'skip$
+ { "(" number * ") " * output }
+ if$
+ pages empty$
+ { skip$ }
+ { pages set.period.dash.check
+ pages format.bkpages.collat.check output
+ }
+ if$
+ format.doi output
+ format.url output
+ format.online.lastcheck
+ note set.period.dash.check
+ note output
+ fin.entry
+}
+
+%% Standard ist "Diplomarbeit", anderes mit TYPE="anderer Typ" erfassen!
+%% z.B. TYPE={Hausarbeit}, TYPE={Diss.}, TYPE={Habil.}, TYPE={Magisterarb.}
+FUNCTION {mastersthesis}
+{ output.bibitem
+ format.authors "author" output.check
+ set.colon.after
+ format.btitle "title" output.check
+ address output
+ part.of.sentence
+ school "school" output.check
+ part.of.sentence
+ "Diplomarbeit" format.thesis.tr.type output.nonnull
+ part.of.sentence
+ format.date "year" output.check
+ format.url output
+ format.online.lastcheck
+ doi set.period.dash.check
+ urn set.period.dash.check
+ format.doi.urn output
+ pages empty$
+ { skip$ }
+ { pages set.period.dash.check
+ pages format.bkpages.collat.check output
+ }
+ if$
+ note set.period.dash.check
+ note output
+ fin.entry
+}
+
+FUNCTION {phdthesis} %% {mastersthesis}% ist identisch bis auf Standardwert, s.o.
+{ output.bibitem
+ format.authors "author" output.check
+ set.colon.after
+ format.btitle "title" output.check
+ address output
+ part.of.sentence
+ school "school" output.check
+ part.of.sentence
+ "Diss." format.thesis.tr.type output.nonnull % koennte auch `Dissertation' sein
+ part.of.sentence
+ format.date "year" output.check
+ format.url output
+ format.online.lastcheck
+ doi set.period.dash.check
+ urn set.period.dash.check
+ format.doi.urn output
+ pages empty$
+ { skip$ }
+ { pages set.period.dash.check
+ pages format.bkpages.collat.check output
+ }
+ if$
+ note set.period.dash.check
+ note output
+ fin.entry
+}
+
+
+%% Normen, Vornormen, Schutzrechte (Patente) werden hiermit erfasst;
+%% (z.Zt. auch noch Internetressourcen)
+%% das type-Feld uebernimmt eine wichtige Steuerfunktion:
+FUNCTION {misc}
+{ output.bibitem
+ type missing$ not
+ { type duplicate$ #1 #4 substring$ "Norm" =
+ type #1 #4 substring$ "Vorn" = OR
+ { " " *
+ format.number * output
+ new.sentence
+ format.date output
+ title empty$
+ { skip$ }
+ { add.period$ new.sentence }
+ if$
+ format.btitle "title" output.check
+ note set.period.dash.check
+ note output
+ }
+ { duplicate$ #1 #6 substring$ "Schutz" =
+ { " " * format.number * output
+ new.sentence
+ "(" * format.date ")" * output
+ add.period$ new.sentence
+ format.authors.organization add.period$ output
+ note output
+ }
+ %% wenn irgendein anderer Typ eingetragen ist
+ { pop$ pop$ ""
+ title empty$
+ { note empty$
+ { url empty$
+ { "there's no relevant field in " cite$ warning$
+ pop$ ""
+ }
+ { format.url output }%%%
+ if$
+ }
+ { note " " * output.nonnull }
+ if$
+ }
+ { author empty$
+ { editor empty$
+ { organization empty$
+ { skip$ }
+ { format.editors.organization output.nonnull
+ set.colon.after
+ }
+ if$
+ }
+ { format.editors format.editors.organization
+ output.nonnull set.colon.after
+ }
+ if$
+ }
+ { format.authors format.editors output.nonnull
+ set.colon.after
+ }
+ if$
+ format.btitle output.nonnull
+ url empty$
+ { format.edition output
+ format.howpublished output}
+ { format.howpublished output
+ format.edition.or.date output
+ format.url output
+ }
+ if$
+ format.online.lastcheck
+%% format.lastchecked.or.type
+ new.sentence
+ format.misc.series output
+%% note set.period.dash.check
+ note output
+ }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ %% wenn es keinen type gibt
+ { title empty$
+ { note empty$
+ { url empty$
+ { "there's no relevant field in " cite$ warning$
+ pop$ ""
+ }
+ { format.url output }%%% das waere e. reine URL
+ if$
+ }
+ { note " " * output.nonnull }
+ if$
+ }
+ { author empty$
+ { editor empty$
+ { organization empty$
+ { skip$ }
+ { format.editors.organization output.nonnull
+ set.colon.after
+ }
+ if$
+ }
+ { format.editors format.editors.organization
+ output.nonnull set.colon.after
+ }
+ if$
+ }
+ { format.authors format.editors output.nonnull
+ set.colon.after
+ }
+ if$
+ format.btitle output.nonnull
+ url empty$
+ { format.edition output
+ format.howpublished output}
+ { format.howpublished output
+ format.url output
+ format.edition.or.date output
+ format.online.lastcheck
+%% format.lastchecked.or.type
+ }
+ if$
+ new.sentence
+ format.misc.series output
+ note set.period.dash.check
+ note output
+ }
+ if$
+ }
+ if$
+ fin.entry
+}
+
+FUNCTION {proceedings}
+{ output.bibitem
+ editor empty$
+ { organization empty$
+ { "empty organization and editor in " cite$ * warning$ }
+ { organization " (Veranst.)" * output }
+ if$
+ }
+ { format.editors format.editors.organization output.nonnull }
+ if$
+ set.colon.after
+ format.btitle "title" output.check
+ volume empty$
+ { skip$ }
+ { "{\textnormal{Bd.}}" volume tie.or.space.connect emphasize "volume" output.check }
+ if$
+ format.address.publisher.year "publisher" output.check
+ new.sentence
+ format.series.number.din output.nonnull
+ pages empty$
+ { skip$ }
+ { pages set.period.dash.check
+ pages format.bkpages.collat.check output
+ }
+ if$
+ isbn set.period.dash.check
+ issn set.period.dash.check
+ format.isbn.issn output
+ note set.period.dash.check
+ note output
+ fin.entry
+}
+
+FUNCTION {techreport}
+{ output.bibitem
+ author empty$
+ { format.editors "author and editor" output.check
+ format.tr.institution output.nonnull }
+ { format.authors format.editors output.nonnull }
+ if$
+ set.colon.after
+ format.title "title" output.check
+ institution empty$
+ 'skip$
+ { author empty$ editor empty$ AND
+ 'skip$
+ { institution new.sentence.checka
+ "/ " institution * output.nonnull
+ }
+ if$
+ }
+ if$
+ format.version.url output
+ format.online.lastcheck
+ format.address.publisher.year output
+ number new.sentence.checka
+ format.tr.series.or.number "number" output.check
+ "Forschungsbericht" format.thesis.tr.type set.period.dash.check
+ "Forschungsbericht" format.thesis.tr.type output
+ pages empty$
+ { skip$ }
+ { pages set.period.dash.check
+ pages format.bkpages.collat.check output
+ }
+ if$
+ isbn set.period.dash.check
+ issn set.period.dash.check
+ format.isbn.issn output
+ note set.period.dash.check
+ note "note" output.check
+ fin.entry
+}
+
+
+FUNCTION {unpublished} {misc}
+
+FUNCTION {default.type} { misc }
+
+%%-------------------------- abgekuerzte Monatsnamen --------------
+
+MACRO {jan} {"Jan."}
+
+MACRO {feb} {"Febr."}
+
+MACRO {mar} {"M{\^^b a}rz"}
+
+MACRO {apr} {"Apr."}
+
+MACRO {mai} {"Mai"}
+
+MACRO {may} {"Mai"}
+
+MACRO {jun} {"Jun."}
+
+MACRO {jul} {"Jul."}
+
+MACRO {aug} {"Aug."}
+
+MACRO {sep} {"Sept."}
+
+MACRO {okt} {"Okt."}
+
+MACRO {oct} {"Okt."}
+
+MACRO {nov} {"Nov."}
+
+MACRO {dez} {"Dez."}
+
+MACRO {dec} {"Dez."}
+
+%%$$$ stillgelegte Beispiele fuer den Gebrauch von Kuerzeln (hier Zs-Titel).
+%% im abbrvdin-Stil werden die Zeitschriftennamen abgekuerzt!
+
+%%MACRO {acmcs} {"ACM Comp. Surv."}
+
+%%MACRO {acta} {"Acta Informat."}
+
+READ
+
+FUNCTION {sortify}
+{ purify$
+ "l" change.case$
+}
+
+FUNCTION {chop.word}
+{ 's :=
+ 'len :=
+ s #1 len substring$ =
+ { s len #1 + global.max$ substring$ }
+ 's
+ if$
+}
+
+FUNCTION {sort.format.names}
+{ 's :=
+ #1 'nameptr :=
+ ""
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ { nameptr #1 >
+ { " " * }
+ 'skip$
+ if$
+ s nameptr "{ll{ }}{ ff{ }}{ vv{ }}{ jj{ }}" format.name$ 't :=
+ nameptr numnames = t "others" = and
+ { ua.etal * }
+ { t sortify * }
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+}
+
+FUNCTION {sort.format.title}
+{ 't :=
+ "A " #2
+ "An " #3
+ "Der " #4
+ "Die " #4
+ "Das " #4
+ "Ein " #4
+ "Eine " #5
+ "The " #4 t chop.word
+ chop.word
+ chop.word
+ chop.word
+ chop.word
+ chop.word
+ chop.word
+ chop.word
+ sortify
+ #1 global.max$ substring$
+}
+
+FUNCTION {author.sort}
+{ author empty$
+ { key empty$
+ { "to sort, need author or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { author sort.format.names }
+ if$
+}
+
+FUNCTION {author.editor.sort}
+{ author empty$
+ { editor empty$
+ { key empty$
+ { "to sort, need author, editor, or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { editor sort.format.names }
+ if$
+ }
+ { author sort.format.names }
+ if$
+}
+
+FUNCTION {author.organization.sort}
+{ author empty$
+ { organization empty$
+ { key empty$
+ { "to sort, need author, organization, or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { "The " #4 organization chop.word sortify }
+ if$
+ }
+ { author sort.format.names }
+ if$
+}
+
+FUNCTION {editor.organization.sort}
+{ editor empty$
+ { organization empty$
+ { key empty$
+ { "to sort, need editor, organization, or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { "The " #4 organization chop.word sortify }
+ if$
+ }
+ { editor sort.format.names }
+ if$
+}
+
+FUNCTION {presort}
+{ type$ "book" =
+ type$ "inbook" =
+ or
+ 'author.editor.sort
+ { type$ "proceedings" =
+ 'editor.organization.sort
+ { type$ "manual" =
+ 'author.organization.sort
+ 'author.sort
+ if$
+ }
+ if$
+ }
+ if$
+ " "
+ *
+ year field.or.null sortify
+ *
+ " "
+ *
+ title field.or.null
+ sort.format.title
+ *
+ #1 entry.max$ substring$
+ 'sort.key$ :=
+}
+
+ITERATE {presort}
+
+SORT
+
+FUNCTION {initialize.longest.label}%% nicht identisch mit der Fkt.im ALPHA-Stil
+{ "" 'longest.label :=
+ #1 'number.label :=
+ #0 'longest.label.width :=
+}
+
+FUNCTION {longest.label.pass}
+{ number.label int.to.str$ 'label :=
+ number.label #1 + 'number.label :=
+ label width$ longest.label.width >
+ { label 'longest.label :=
+ label width$ 'longest.label.width :=
+ }
+ 'skip$
+ if$
+}
+
+EXECUTE { initialize.longest.label }
+
+ITERATE { longest.label.pass }
+
+FUNCTION {begin.bib}
+{ preamble$ empty$
+ 'skip$
+ { preamble$ write$ newline$ }
+ if$
+ "\begin{thebibliography}{" longest.label * "}" * write$ newline$
+ newline$
+ "% this bibliography is generated by abbrvdin.bst [8.2] from 2005-12-21"
+ write$ newline$ newline$
+ "\providecommand{\url}[1]{\texttt{#1}}"
+ write$ newline$
+ "\expandafter\ifx\csname urlstyle\endcsname\relax"
+ write$ newline$
+ " \providecommand{\doi}[1]{doi: #1}\else"
+ write$ newline$
+ " \providecommand{\doi}{doi: \begingroup \urlstyle{rm}\Url}\fi"
+ write$ newline$
+}
+
+EXECUTE {begin.bib}
+
+EXECUTE {init.state.consts}
+
+ITERATE {call.type$}
+
+FUNCTION {end.bib}
+{ newline$
+ "\end{thebibliography}" write$ newline$
+}
+
+EXECUTE {end.bib} \ No newline at end of file
diff --git a/biblio/bibtex/contrib/german/din1505/alphadin.bst b/biblio/bibtex/contrib/german/din1505/alphadin.bst
new file mode 100644
index 0000000000..0698026188
--- /dev/null
+++ b/biblio/bibtex/contrib/german/din1505/alphadin.bst
@@ -0,0 +1,2212 @@
+%% ALPHADIN.BST Ausgabe [8.2] 2006-01-02
+%%
+%% ersetzt ABBRVDIN.BST Ausgabe [8.1b4] 15/12/2004
+%% wichtigste Aenderung gegenueber Version [8.1b4]:
+%% die Standardergaenzung "Online-Ressource" bei Internetquellen
+%% ist ersatzlos gestrichen worden (wegen ueberfluessiger Redundanz).
+%%
+%
+%% K.F.Lorenzen (Copyright 1994-2006) email: lorenzen.marxen@t-online.de
+%% ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+%% ALPHADIN.BST wurde entwickelt aus Oren Patashnik's BibTeX standard
+%% bibliography style `alpha'. Eine vorgegebene Literaturdatenbank laesst sich
+%% somit beliebig nach Us- oder deutscher DIN 1505-Zitierkonvention
+%% verarbeiten.
+%% Analog zu den 4 US standard styles werden 4 DIN-gerechte bst-style Dateien
+%% veroeffentlicht (alphadin.bst, plaindin.bst, unsrtdin.bst, abbrvdin.bst).
+%% Die gueltige Version ist am schnellsten aus dem WWW ueber folgende URL zu
+%% beziehen:
+%% http://www.haw-hamburg.de/pers/Lorenzen/bibtex/
+%% Stand: 2006-01-02
+%% ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+%% WAS IST ALPHADIN.BST ?
+%% Dieser style produziert "deutsche" Literaturzitate in Literaturverzeichnis-
+%% sen gemaess der deutschen Norm DIN 1505, Teil 2 vom Jan. 1984.
+%% Die Literaturzitate werden alphabetisch nach Verfassern sortiert.
+%% Die Zitiermarken im Text und die Ordnungsmarken im Literaturverzeichnis
+%% bestehen aus abgekuerzten Verfasserbuchstaben plus Erscheinungsjahr in
+%% eckigen Klammern. Die vorliegenden DIN-styles gehen ueber einige bibliogra-
+%% phischen Beschraenkungen der Originalstyles hinaus.
+%
+%% Es werden nun auch Elektronische Online / Offline Ressourcen wie Internet-
+%% quellen, CD-ROM usw. verarbeitet. Dazu kommen besondere Publikationsformen
+%% wie Patente, Normen, Karten, Fernsehaufzeichnungen, Gesetzesstellen, Spiele.
+%
+%% Zur Gewaehrleistung der Allgemeingueltigkeit von bib-files gelten in den
+%% DIN-styles die in der Tex-Literatur veroeffentlichten originalen
+%% Definitionen und Regeln fuer die Publikationstypen (entry-types) und die
+%% bibliographischen Felder (fields).
+%% Treten kleinere "Schoenheitsfehler" im fertig gesetzten output auf,
+%% lassen sich diese so gut wie immer durch eine veraenderte
+%% Erfassung im bib-inputfile beseitigen. Oren Patashnik empfiehlt, die
+%% Definition der Felder weit auszulegen. Last but not least koennen
+%% Sie im output-file < *.bbl > noch letzte Hand zur Korrektur ansetzen.
+%
+%% WARN- UND FEHLERMELDUNGEN
+%% Ursache von Warnmeldungen sind meistens ausgelassene Felder oder
+%% Erfassungs-"Fehler". Letztere haengen teilweise mit den gegenueber US-
+%% Gepflogenheiten andersartigen bibliographischen Regeln nach DIN 1505
+%% zusammen. Sie sind also in Wahrheit keine "Fehler" und duerfen fast immer
+%% ignoriert werden. Dennoch pruefen Sie diese Warnungen, um herauszufinden,
+%% ob Publikationstyp (=entry-type) und "fields" eventuell unzulaessig
+%% kombiniert worden sind.
+%% Echte Fehler ("errors") treten nur noch in Verbindung mit falscher
+%% Erfassung auf (nach meinen Tests!). Pruefen Sie die Syntax, den entry-type
+%% und die fields.
+%% Zu guter letzt: Qualitaetsmasstab ist einzig der DIN-konforme output!
+%%
+%% DANKSAGUNG
+%% Hartmut Lueddecke, HAW Hamburg, hat viele Verbesserungsvorschlaege
+%% in die frueheren Versionen eingebracht. Ihm danke ich herzlich.
+%% Patrick W. Daly, dem Entwickler des Natbib-Stils, verdanke ich viele
+%% Anregungen und den steten Ansporn, die DIN-Stile zu verbessern.
+%% Viele an dieser Stelle ungenannt bleibende Anwender haben mich in
+%% den vergangenen Jahren auf Fehler oder Verbesserungsmoeglichkeiten
+%% aufmerksam gemacht und so diesen Stil mitentwickelt. Ihnen gilt mein
+%% besonderer Dank. Ihr Feedback ist immer willkommen und eine Ermunterung.
+%%
+%% Klaus F. Lorenzen
+%%
+%%
+%%
+%% HINWEIS: Neben den vier bibliographischen DIN 1505 Standard-Stilen
+%% nach den Original-styles von Oren Patashnik
+%% gibt es noch vier DIN 1505 Adaptionen der NATBIB-style
+%% Emulationen von Patrick W.Daly. Die Fuelle der darin
+%% implementierten Zitierweisen geht weit ueber die urspruenglichen
+%% Standardstyles hinaus.
+%% Naeheres unter URL http://www.haw-hamburg.de/pers/Lorenzen/bibtex/
+%%
+%%~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+%% version 0.99c for BibTeX versions 0.99c or later, LaTeX2e version
+%% Copyright (C) 1985, all rights reserved.
+%% Copying of this file is authorized only if either
+%% (1) you make absolutely no changes to your copy, including name, or
+%% (2) if you do make changes, you name it something other than
+%% alphadin.bst
+%% This restriction helps ensure that all standard styles are identical.
+%%
+%%
+%%
+%%~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+%% NEUE FELDER
+%% Zur Erfassung der neuen digitalen Online-Medien z.B. Internetquellen, E-journals, E-books,
+%% E-mail u.a. gibt es die zusaetzlichen Felder: doi, url, urn, lastchecked
+%% Internetquellen werden vorzugsweise mit dem BOOKLET-Typ erfasst.
+%% Normen, Patente, Schutzrechte sind mit dem MISC-Typ zu erfassen.
+
+ENTRY
+ { address %% Verlagsort (immer!)
+ author %% persoenlicher Urheber eines Werkes oder am Zustandekommen
+ %% beteiligte Personen(=Mitarbeiter, Uebersetzer, Redakteur u.a.)
+ booktitle %% a) Gesamttitel eines mehrbaendigen Werkes
+% %% b) Titel des Sammelwerks, das einzelne selbstaendige
+% %% Beitraege mit eigenem Titel enthaelt ->incollection
+ chapter %% Kapitel in einem Buch (Monographie)
+ doi %%% Digital Object Identifier ->article
+ edition %% a) Auflagevermerk
+% %% b) bei selbst. elektron. Quellen == Version ->booklet
+ editor %% Persoenl.Herausgeber oder Koerperschaftlicher Herausgeber
+ howpublished %% beliebiger Verlegervermerk: veroeffentlicht "von wem, wo"
+ institution %% Institution, die e.verlagsfreie Veroeffentlichung betreibt
+ isbn %% Standardnr fuer Buecher
+ issn %% - " - : Zeitschriften u. Serien
+ journal %% Titel einer Zeitschrift
+ key %% Zusaetzlich vergebener Sortierschluessel, mitunter notwend.
+ lastchecked %% neues Feld fuer das Datum des Online-Abrufs
+% %% einer Internetquelle (n. GRAY )
+ month %% naehere Bestimmung des Erscheinungsjahres -> macro 's
+ note %% freies Eingabefeld fuer zusaetzliche Informationen z. Quelle
+ number %% Versch. Bedeutungen in Abhaengigkeit vom Eingabetyp:
+% %% a) Bandnummer einer gezaehlten Reihe (series)
+% %% b) Heftnummer einer Zeitschrift ->article
+% %% c) Nummer eines Forschungsberichts ->techreport
+ organization %% a) Name der Organisation/des Organisators e. Tagung,Konferenz
+% %% b) Name einer Firma/Gesellschaft, die ein ->manual herausgab
+ pages %% Umfangsangaben, meist Seitenzahlen
+ publisher %% Verlag
+ school %% Hochschule/Universitaet, die eine Dipl.-Arb./Dissertation veroeff.
+ series %% Titel e.Reihe, in der ein best. Buchtitel erschienen ist
+ title %% Titel einer (namentlich gekennzeichneten) Veroeffentlichung
+ type %% Zusatzfeld z.Kennzeichnung e.besonderen Publikationstyps
+ url %% neues Feld URL ( Uniform Resource Locator ):
+% %% Serveradresse einer Internetquelle
+ urn %% neues Feld URN ( Uniform Resource Name ):
+% %% Persistent Identifier einer Internetquelle
+ volume %% a) Zaehlung bei einem mehrbaendigen Werk ->book/->proceedings
+% %% b) Jahrgang einer Zeitschrift ->article
+ year %% Erscheinungsjahr
+ }
+ {}
+ { label extra.label sort.label short.list }
+
+%%%----------------------------------------------------------------------------
+% Einige Standardvorgaben, die vom Benutzer veraendert werden koennen.
+%%%----------------------------------------------------------------------------
+
+% Abkuerzung ("... und andere") bei Mehrverfasserquellen:
+
+FUNCTION { ua.etal } { " u.\,a." } %% evtl. auch in eckigen Klammern " [u.\,a.]"
+
+%% oder lateinisch: FUNCTION { ua.etal } { " et~al." }
+
+FUNCTION { und } { " u. " }
+
+%% oder ausgeschrieben: FUNCTION { und } { " und " }
+%
+% Einige elektronische Medien erhalten nach DIN 1505 eine "Ergaenzende Angabe"
+% zusaetzlich zum materiellen Typ, z.B. CD ROM oder DVD u.a.:
+
+FUNCTION { eress } { "Elektronische Ressource" }
+
+%%%-----------------------------------------------------------------------------------
+
+INTEGERS { output.state before.all mid.sentence after.sentence after.block }
+
+INTEGERS { colon.after period.dash }
+
+INTEGERS { after.firstblock }
+
+INTEGERS { zahl lang }
+
+INTEGERS { nameptr namesleft numnames }
+
+INTEGERS { ptr collation collrest }
+
+INTEGERS { len }
+
+INTEGERS { et.al.char.used }
+
+INTEGERS { longest.label.width last.extra.num }
+%-------------------------
+STRINGS { longest.label last.sort.label next.extra }
+
+STRINGS { h s t u v w }
+
+STRINGS { fkt }
+%-------------------------
+
+FUNCTION {init.state.consts}
+{ #0 'before.all :=
+ #1 'mid.sentence :=
+ #2 'after.sentence :=
+ #3 'after.block :=
+ #4 'colon.after :=
+ #5 'period.dash :=
+ #6 'after.firstblock :=
+}
+
+FUNCTION {output.nonnull}
+{ 's :=
+ output.state after.block =
+ { add.period$ write$
+ newline$
+ "\newblock " write$
+ }
+ { output.state before.all =
+ { write$ }
+ { output.state colon.after =
+ { ": " * write$
+ newline$
+ "\newblock " write$
+ }
+ { output.state period.dash =
+ { ". -- " * write$
+ newline$
+ "\newblock " write$
+ }
+ { output.state mid.sentence =
+ { ", " * write$ }
+ { output.state after.sentence =
+ { " " * write$ }
+ { output.state after.firstblock =
+ { add.period$ write$
+ newline$
+ "\newblock " write$
+ }
+ { write$
+ newline$
+ "\newblock " write$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+ after.block 'output.state :=
+ }
+ if$
+ s
+ }
+
+FUNCTION {output}
+{ duplicate$ empty$
+ 'pop$
+ 'output.nonnull
+ if$
+}
+
+FUNCTION {output.check}
+{ 't :=
+ duplicate$ empty$
+ { pop$ "empty " t * " in " * cite$ * warning$ }
+ 'output.nonnull
+ if$
+}
+
+FUNCTION {new.block}
+{ output.state before.all =
+ 'skip$
+ { after.block 'output.state := }
+ if$
+}
+
+FUNCTION {not}
+{ { #0 }
+ { #1 }
+ if$
+}
+
+FUNCTION {and}
+{ 'skip$
+ { pop$ #0 }
+ if$
+}
+
+FUNCTION {or}
+{ { pop$ #1 }
+ 'skip$
+ if$
+}
+
+
+FUNCTION {output.bibitem}
+{ newline$
+ "\bibitem[" write$
+ label write$%
+ "]{" write$
+ cite$ write$
+ "}" write$
+ newline$
+ ""
+ before.all 'output.state :=
+}
+
+FUNCTION {fin.entry}
+{ write$
+ newline$
+}
+
+FUNCTION {set.period.dash} %% Wenn ein ". - " die Satzteile trennen soll.!
+{ output.state before.all =
+ 'skip$
+ { period.dash 'output.state := }
+ if$
+}
+
+FUNCTION {set.period.dash.check}
+{ empty$
+ 'skip$
+ 'set.period.dash
+ if$
+}
+
+FUNCTION {set.colon.after} %%$$$ Wenn ein ": " d. Satzteile trennen soll!
+{ output.state before.all =
+ 'skip$
+ { colon.after 'output.state := }
+ if$
+}
+
+%% Wenn ein " " die Satzteile trennen soll.!
+FUNCTION {new.sentence}
+{ output.state before.all =
+ 'skip$
+ { after.sentence 'output.state := }
+ if$
+}
+
+%% Wenn ein ", " die Satzteile trennen soll.!
+FUNCTION { part.of.sentence }
+{ output.state before.all =
+ 'skip$
+ { mid.sentence 'output.state := }
+ if$
+}
+
+FUNCTION {new.sentence.checka}
+{ empty$
+ 'skip$
+ 'new.sentence
+ if$
+}
+
+FUNCTION {field.or.null}
+{ duplicate$ empty$
+ { pop$ "" }
+ 'skip$
+ if$
+}
+
+FUNCTION {emphasize}
+{ duplicate$ empty$
+ { pop$ "" }
+ { "\emph{" swap$ * "}" * }
+ if$
+}
+
+FUNCTION { capitalize }
+ { duplicate$ empty$
+ { pop$ "" }
+ { "\textsc{" swap$ * "}" * }
+ if$
+}
+
+
+%% Adelspraedikate beim Sortieren nach den(m) Vornamen auffuehren
+%% Abweichend v. DIN !!!
+FUNCTION {format.names}
+{ 's :=
+ "" 'u :=
+ #1 'nameptr :=
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ {
+ s nameptr "{ll}" format.name$ 't :=
+ t capitalize 't :=
+ s nameptr "{ jj}" format.name$ 'w :=
+ s nameptr "{, ff}{ vv}{ jj}" format.name$ 'u :=
+ u text.length$ 'lang :=
+ #1 'zahl :=
+ "" 'v :=
+ { zahl lang < }
+ { u zahl #1 substring$ "~" =
+ { v "" =
+ { u #1 zahl #1 - substring$ 'v := }
+ 'skip$
+ if$
+ v u zahl #2 substring$ * "." * w * 'v :=
+ }
+ 'skip$
+ if$
+ zahl #1 + 'zahl := }
+ while$
+ v "" =
+ { u 'v := }
+ 'skip$
+ if$
+ t v * fkt * 't :=
+ nameptr #1 >
+ { namesleft #1 >
+ { " ; " * t * }
+ { numnames #2 >
+ { " " * }
+ 'skip$
+ if$
+ t "\textsc{others}" = t "\textsc{others} (Hrsg.)" = or
+ { ua.etal * }
+ { " ; " * t * }
+ if$
+ }
+ if$ %% Ende der namesleft-Pruefung
+ }
+ 't
+ if$ %% Ende der nameptr-Pruefung
+
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$ %% Ende von { namesleft #0 > } ganz oben
+ "" 'fkt := %% fkt wird zurueckgesetzt
+}
+
+FUNCTION {format.authors}
+{ author empty$
+ { "" }
+ { author format.names }
+ if$
+}
+
+FUNCTION {format.editors}
+{ editor empty$
+ { author empty$
+ { "empty author and editor in " cite$ * warning$ "" }
+ 'skip$
+ if$
+ }
+ { author empty$
+ { " (Hrsg.)" 'fkt :=
+ editor format.names
+ }
+ { " (Hrsg.)" 'fkt :=
+ " ; " * editor format.names *
+ }
+ if$
+ }
+ if$
+ }
+
+%% 2005-11-11
+FUNCTION { format.authors.organization }
+{ type$ "misc" =
+ { organization empty$
+ { author empty$
+ { "" }
+ { author format.names " (Erfinder)" * }
+ if$
+ }
+ { author empty$
+ { organization }
+ { author format.names " (Erfinder); " *
+ organization * " (Anmelder)" *
+ }
+ if$
+ }
+ if$
+ }
+ { type$ "manual" =
+ { organization empty$
+ { author empty$
+ { "" }
+ { author format.names }
+ if$
+ }
+ { author empty$
+ { organization capitalize " (Hrsg.)" * }
+ { author format.names " ; " *
+ organization capitalize * " (Hrsg.)" *
+ }
+ if$
+ }
+ if$
+ }
+ 'skip$
+ if$
+ }
+ if$
+}
+
+
+FUNCTION { format.editors.organization }
+{ organization empty$
+ 'skip$
+ { type$ "misc" =
+ { organization }
+ { * " ; " * organization " (Veranst.)" *}
+ if$
+ }
+ if$
+}
+
+FUNCTION { format.tr.institution }
+{ institution empty$
+ 'skip$
+ { institution capitalize }
+ if$
+}
+
+FUNCTION {format.ed.incoll}
+{ editor empty$
+ { "" }
+ { " (Hrsg.)" 'fkt :=
+ editor format.names
+ format.editors.organization
+ }
+ if$
+}
+
+FUNCTION {article.in.journal}
+{ duplicate$ empty$
+ { pop$ "" }
+ { author missing$ title missing$ and
+ { emphasize }
+ { emphasize "{In: }" swap$ * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.title}
+{ title empty$
+ { "" }
+ { title } %% Text so wie er dasteht im Feld title
+ if$
+}
+
+FUNCTION {format.number}
+{ number empty$
+ { "" }
+ { number " " * } %% Text so wie er im Feld number steht plus " "
+ if$
+}
+
+
+FUNCTION {format.digital.type}
+{ type empty$
+ { "" }
+ { type #-1 #4 substring$ "mail" =
+ type #1 #4 substring$ "Mail" =
+ OR
+ { "" }
+ { type } %% Typ einer digitalen Ressource in Form einer
+ %% "Ergaenzenden Angabe", so wie er dasteht;
+ %% Alternativ kann dieser Text auch in NOTE erfasst werden.
+ if$
+ }
+ if$
+}
+
+FUNCTION {n.dashify}
+{ 't :=
+ ""
+ { t empty$ not }
+ { t #1 #1 substring$ "-" =
+ { t #1 #2 substring$ "--" = not
+ { "--" *
+ t #2 global.max$ substring$ 't :=
+ }
+ { { t #1 #1 substring$ "-" = }
+ { "-" *
+ t #2 global.max$ substring$ 't :=
+ }
+ while$
+ }
+ if$
+ }
+ { t #1 #1 substring$ *
+ t #2 global.max$ substring$ 't :=
+ }
+ if$
+ }
+ while$
+}
+
+%% Auflagenvermerke gibt man komplett, einschliesslich Abkuerzungen in
+%% das Feld edition ein: ---> EDITION= { 3., erw. und verb. Aufl. }
+%% oder fremdsprachlich: EDITION= { 2nd edition }
+
+FUNCTION {format.edition}
+{ edition empty$
+ { "" }
+ { edition }
+ if$
+}
+
+FUNCTION {format.date}
+{ year duplicate$ empty$
+ { "empty year in " cite$ * warning$
+ pop$ "" }
+ 'skip$
+ if$
+ month empty$
+ 'skip$
+ { type$ "book" =
+ type$ "inbook" =
+ OR
+ 'skip$
+ { month " " * swap$ * }
+ if$
+ }
+ if$
+}
+
+
+FUNCTION {format.edition.or.date}
+{ edition empty$ year empty$ and
+ { "" }
+ { edition empty$
+ { type empty$ NOT
+ { type #-1 #4 substring$ "mail" =
+ type #1 #4 substring$ "Mail" =
+ OR
+ { " gesendet: " "-- " type * swap$ *
+ format.date *
+ }
+ { "\,Version:\,"
+ format.date *
+ }
+ if$
+ }
+ { "\,Version:\,"
+ format.date *
+ }
+ if$
+ }
+ { year empty$
+ { "\,Version:\," edition * }
+ { "\,Version:\," edition * ", " *
+ format.date *
+ }
+ if$
+ }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.doi}
+{ doi empty$
+ { "" }
+ { new.block "\url{http://dx.doi.org/" doi * "}" *
+ %% { new.block "\url{http://dx.medra.org/" doi * "}" *
+ }
+ if$
+}
+
+FUNCTION {format.url}
+{ urn missing$
+ { doi missing$
+ { url empty$
+ { "" }
+ { type empty$ NOT
+ { type #-1 #4 substring$ "mail" =
+ type #1 #4 substring$ "Mail" =
+ OR
+ { type$ "incollection" =
+ { "" }
+ { "\,Absenderadresse: \url{" url * "}" * }
+ if$
+ }
+ { "\url{" url * "}" * }%% evtl. "URL" oder "<...>"
+ if$
+ }
+ { "\url{" url * "}" * } %% evtl. "URL" oder "<...>"
+ if$
+ }
+ if$
+ }
+ { format.doi }
+ if$
+ }
+ { "\url{http://nbn-resolving.de/urn/resolver.pl?urn=" urn * "}" *
+ }
+ if$
+}
+
+FUNCTION {format.maillist.url}
+ { url empty$
+ { "" }
+ { type empty$
+ { "" }
+ { type #-1 #4 substring$ "mail" =
+ type #1 #4 substring$ "Mail" =
+ OR
+ { "\url{" url * "}" * }
+ { "" }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+
+
+FUNCTION {format.version.url}
+{ url empty$ doi empty$ urn empty$ and and
+ { type$ "techreport" =
+ { format.edition }
+ { "" }
+ if$
+ }
+ { format.edition.or.date output format.url }
+ if$
+}
+
+FUNCTION {format.edition.or.version}
+{ url empty$ doi empty$ urn empty$ and and
+ { format.edition }
+ { format.edition.or.date }
+ if$
+}
+
+FUNCTION {format.online.lastcheck}
+{ lastchecked empty$
+ { url empty$ doi empty$ urn empty$ and and
+ { skip$ }
+ { "" output }
+ if$
+ }
+ { url empty$ doi empty$ urn empty$ and and
+ { "there's a lastchecked date but no url, urn or doi in "
+ cite$ * warning$
+ }
+ { part.of.sentence
+ lastchecked "Abruf: " swap$ * output
+ }
+ if$
+ }
+ if$
+}
+
+
+FUNCTION {format.maillist.lastcheck}
+ { type empty$ NOT
+ { type #-1 #4 substring$ "mail" =
+ type #1 #4 substring$ "Mail" =
+ OR
+ { format.online.lastcheck }
+ 'skip$
+ if$
+ }
+ 'skip$
+ if$
+ }
+
+FUNCTION {format.address.publisher.year}
+{ publisher empty$
+ { address empty$
+ { year empty$
+ { "" }
+ { year }
+ if$
+ }
+ { "there's an address but no publisher in " cite$ * warning$
+ address ", " * format.date *
+ }
+ if$
+ }
+ { address empty$
+ { year empty$
+ { "neither address nor publication date in " cite$ * warning$
+ publisher
+ }
+ { publisher ", " * format.date * }
+ if$
+ }
+ { year empty$
+ { address " : " * publisher * }
+ { address " : " * publisher * ", " * format.date * }
+ if$
+ }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.address.publisher.year.alt}
+{ publisher empty$
+ { address empty$
+ { year empty$
+ { "" }
+ { url empty$
+ { year }
+ { "" }
+ if$
+ }
+ if$
+ }
+ { "there's an address but no publisher in " cite$ * warning$
+ address ", " * format.date *
+ }
+ if$
+ }
+ { url empty$%%%% wenn es URL gibt wird nur die service-provider Adresse
+%%% ausgegeben, die im publisher-Feld steht
+ { address empty$
+ { year empty$
+ { "neither address nor publication date in " cite$ * warning$
+ publisher
+ }
+ { publisher ", " * format.date * }
+ if$
+ }
+ { year empty$
+ { address " : " * publisher * }
+ { address " : " * publisher * ", " * format.date * }
+ if$
+ }
+ if$
+ }
+ { publisher }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.howpublished}
+{ url missing$ urn missing$ doi missing$ AND AND
+ { howpublished empty$
+ { address empty$
+ { type empty$
+ { "" }
+ { type #-1 #4 substring$ "mail" =
+ { "(gesendet: " new.sentence
+ format.date * ")" *
+ }
+ { "" }
+ if$
+ }
+ if$
+ format.date *
+ }
+ { address ", " * format.date * }
+ if$
+ }
+ { address empty$
+ { howpublished ", " * format.date * }
+ { address " : " * howpublished * ", " * format.date * }
+ if$
+ }
+ if$
+ }
+ { howpublished empty$
+ { "" }
+ { howpublished }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.lastchecked.or.type}%% nur in misc-Funktion
+{ lastchecked empty$
+ { url empty$ doi empty$ urn empty$ and and
+ { type empty$
+ { skip$ }
+ { type set.period.dash.check
+ type output
+ }
+ if$
+ }
+ { type empty$
+ { skip$ }
+ { type #-1 #4 substring$ "mail" =
+ type #1 #4 substring$ "Mail" =
+ OR
+ { skip$ }
+ { type set.period.dash.check
+ type output }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ { url empty$ doi empty$ urn empty$ and and
+ { "there's a lastchecked date but no url, urn or doi in "
+ cite$ * warning$
+ }
+ { type empty$
+ { "there's a URL and a lastchecked date but no type in "
+ cite$ * warning$
+ }
+ { type set.period.dash.check
+ type output
+ part.of.sentence
+ lastchecked "Abruf: " swap$ * output
+ }
+ if$
+ }
+ if$
+ }
+ if$
+}
+
+
+FUNCTION {format.btitle}
+{ title emphasize
+}
+
+FUNCTION {tie.or.space.connect}
+{ duplicate$ text.length$ #3 <
+ { "~" }
+ { " " }
+ if$
+ swap$ * *
+}
+
+FUNCTION {format.btitle.vol}
+{ number empty$
+ { series empty$
+ { volume empty$
+ { title emphasize }
+ { title emphasize ". Bd." * volume tie.or.space.connect }
+ if$
+ }
+ { volume empty$
+ { title emphasize }%% ein Buch, das zusaetzl. SERIES=Reihentitel besitzt
+ %% jetzt kommt d. Fall des mehrbaendigen Werkes mit Gesamttitel=SERIES
+ %% Zaehlung=VOLUME und Bandtitel=TITLE;
+ { series emphasize ". Bd." * volume tie.or.space.connect
+ ": " * "{\emph{" * title * "}}" * }
+ if$
+ }
+ if$%% series-test
+ }
+ { title emphasize }%% wenn number ex., dann immer title-Feld
+ if$%% Ende number-test
+}
+
+FUNCTION {format.series.number.din}
+{ volume empty$
+ { number empty$
+ { series empty$
+ { "" }
+ { "(" series * ")" * } %% d. Seriennr koennte auch gleich hier
+ %% im SERIES-Feld miterfasst werden
+ if$
+ }
+ { series empty$
+ { "(" number * ")" *
+ "there's a number but no series in " cite$ * warning$
+ }
+ { "(" series * number tie.or.space.connect ")" * }
+ if$
+ }
+ if$
+ }
+ { series empty$
+ { "" }
+ { type$ "proceedings" = %% Sonderfall, es darf VOLUME und NUMBER ex. !
+ type$ "inproceedings" = OR
+ { number empty$
+ { "(" series * ")" * }
+ { "(" series * number tie.or.space.connect ")" * }
+ if$
+ }
+ { "" }%% Ausstieg mit Nullstring, s. Kommentar
+ if$
+ }%% bei gezaehlten Reihen MUSS die Reihennr. im Feld NUMBER stehen!
+ if$ %% wenn also d. Feld VOLUME nicht leer ist, dann liegt ausser bei
+ %% Typ PROCEEDINGS falsche
+ } %% Erfassung vor und es erfolgt d. Ausstieg mit d. Nullstring!
+ if$
+}
+
+FUNCTION {format.tr.series.or.number}
+{ number empty$
+ { series empty$
+ { "" }
+ { "(" series * ")" * }
+ if$
+ }
+ { series empty$
+ { "(" number * ")" * }
+ { "(" series * number tie.or.space.connect ")" * }
+ if$
+ }
+ if$
+ }
+
+FUNCTION {format.misc.series}
+{ series empty$
+ { "" }
+ { "(" series * ")" * }
+ if$
+}
+
+FUNCTION { format.doi.urn }
+{ urn empty$
+ { doi empty$
+ { "" }
+ { "DOI" doi n.dashify tie.or.space.connect }
+ if$
+ }
+ { "URN" urn n.dashify tie.or.space.connect }
+ if$
+}
+
+FUNCTION { format.isbn.issn }
+{ isbn empty$
+ { issn empty$
+ { "" }
+ { "ISSN" issn n.dashify tie.or.space.connect }
+ if$
+ }
+ { "ISBN" isbn n.dashify tie.or.space.connect }
+ if$
+}
+
+FUNCTION {format.pages}
+{ pages empty$
+ { "" }
+ { url empty$
+ { "S." pages n.dashify tie.or.space.connect }
+ { pages }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.pages.book}
+{ pages empty$
+ { "" }
+ { note empty$ isbn empty$ AND
+ { "" pages n.dashify tie.or.space.connect " S" *
+ add.period$ }
+ { "" pages n.dashify tie.or.space.connect " S" * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.pages.bkcollation}
+{ pages empty$
+ { "" }
+ { "" pages n.dashify tie.or.space.connect }
+ if$
+}
+
+FUNCTION {format.bkpages.collat.check}
+{ 's :=
+ #1 'ptr :=
+ s text.length$ 'collation :=
+ collation #1 =
+ { format.pages.book }
+ {
+ collation 'collrest :=
+ { collrest #0 > }
+ { s ptr #2 substring$ 't :=
+ t "S." =
+ { format.pages.bkcollation
+ #0 'collrest := }
+ { ptr #1 + 'ptr :=
+ collrest #1 - 'collrest :=
+ #1 collrest =
+ { format.pages.book }
+ { skip$ }
+ if$
+ }
+ if$
+ }
+ while$
+ }
+ if$
+}
+
+FUNCTION {format.vol.year.num.pages}
+{ volume field.or.null
+ year empty$
+ { "there's no year in " cite$ * warning$ }
+ { " (" year * ")" * * }
+ if$
+ month empty$
+ 'skip$
+ { ", " month * * }
+ if$
+ number empty$
+ 'skip$
+ { ", Nr. " number * * }
+ if$
+ pages empty$
+ 'skip$
+ { duplicate$ empty$
+ { pop$ "" }
+ { title missing$
+ { ", " pages format.bkpages.collat.check * *}
+ { ", " format.pages * *}
+ if$
+ }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.chapter.inbook}
+{ duplicate$ empty$
+ { pop$ "empty chapter in " cite$ * warning$ }
+ { type empty$
+ { "\emph{Kapitel\/} " swap$ tie.or.space.connect }
+ { type " " * swap$ * }%% wenn keine bes. Abschnittsform gen. werden soll,
+ %% koennte e. kl. Zwischenraum gewaehlt werden, z.B. " \, "
+ if$
+ }
+ if$
+ }
+
+FUNCTION {format.chapter.pages}
+{ chapter empty$
+ 'format.pages
+ { type empty$
+ { "Kapitel " }
+ { url empty$
+ { type }
+ { "Kapitel " }
+ if$
+ }
+ if$
+ chapter tie.or.space.connect
+ pages empty$
+ 'skip$
+ { ", " * format.pages * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.in.ed.booktitle.din}
+{ booktitle empty$
+ { "" }
+ { editor empty$
+ { volume empty$
+ { "{In: }" booktitle emphasize * }
+ { "{In: }" booktitle emphasize *
+ " Bd." volume tie.or.space.connect *
+ }
+ if$
+ }
+ { volume empty$
+ { "{In: }" format.ed.incoll * ": " * booktitle emphasize * }
+ { "{In: }" format.ed.incoll * ": " * booktitle emphasize *
+ " Bd." volume tie.or.space.connect *
+ }
+ if$
+ }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.thesis.tr.type}
+{ type empty$
+ 'skip$
+ { pop$
+ type
+ }
+ if$
+}
+
+FUNCTION {format.article.crossref}
+{ key empty$
+ { journal empty$
+ { "need key or journal for " cite$ * " to crossref " * crossref *
+ warning$
+ ""
+ }
+ { "{In: }{\emph " journal * "}" * }
+ if$
+ }
+ { "{In: }" key * }
+ if$
+ "\cite{" * crossref * "}" * ", " * format.pages *
+}
+
+FUNCTION {format.crossref.editor}
+ { editor #1 "{ll}" format.name$ " (Hrsg.)" *
+ editor num.names$ duplicate$
+ #2 >
+ { pop$ ua.etal * }%% --->u. a.
+ { #2 <
+ 'skip$
+ { editor #2 "{ff }{vv }{ll}{ jj}" format.name$ "others" =
+ { ua.etal }
+ { " ; " * editor #2 "{vv~}{ll}" format.name$ * " (Hrsg.)" * }
+ if$
+ }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.inbk.vol.title}
+{ volume empty$
+ { " In: " }
+ { title empty$
+ { " In: Bd." volume tie.or.space.connect
+ " von " *
+ }
+ { "In: Bd." volume tie.or.space.connect ": " * title emphasize *
+ " (" * year * ") in " *
+ }
+ if$
+ }
+ if$
+ }
+
+
+FUNCTION {format.book.crossref}
+{ type$ "inbook" =
+ { format.inbk.vol.title }
+ { volume empty$
+ { "empty volume in " cite$ * "'s crossref of " * crossref * warning$
+ " "
+ }
+ { ". -- Bd." volume tie.or.space.connect
+ " von " *
+ }
+ if$
+ }
+ if$
+ editor empty$
+ editor field.or.null author field.or.null =
+ or
+ { key empty$
+ { series empty$
+ { "need editor, key, or series for " cite$ * " to crossref " *
+ crossref * warning$
+ "" *
+ }
+ { "" * }
+ if$
+ }
+ { key * }
+ if$
+ }
+ { "" * }
+ if$
+ "\cite{" * crossref * "}" *
+}
+
+FUNCTION {format.incoll.inproc.crossref}
+{ editor empty$
+ editor field.or.null author field.or.null =
+ or
+ { key empty$
+ { booktitle empty$
+ { "need editor, key, or booktitle for " cite$ * " to crossref " *
+ crossref * warning$
+ ""
+ }
+ { "{In: }{\emph " booktitle * "}" * }%%
+ if$
+ }
+ { "{In: }" }
+ if$
+ }
+ { "{In: }" }
+ if$
+ "\cite{" * crossref * "}" * %% ", " * format.pages * 5.12.2005
+}
+
+FUNCTION {article}
+{ output.bibitem
+ format.authors "author" output.check
+ set.colon.after
+ format.title "title" output.check
+ crossref missing$
+ { journal article.in.journal output.nonnull
+ new.sentence
+ format.vol.year.num.pages output
+ format.url output
+ }
+ { format.article.crossref output.nonnull }
+ if$
+ format.online.lastcheck
+ doi set.period.dash.check
+ urn set.period.dash.check
+ format.doi.urn output
+ issn set.period.dash.check
+ format.isbn.issn output
+ note set.period.dash.check
+ note output
+ fin.entry
+}
+
+FUNCTION {book}
+{ output.bibitem
+ author empty$
+ { format.editors "author and editor" output.check }
+ { format.authors format.editors output.nonnull }
+ if$
+ set.colon.after
+ crossref missing$
+ { format.btitle.vol "title" output.check }
+ { format.btitle "title" output.check }
+ if$
+ format.edition output
+ format.address.publisher.year "publisher" output.check
+ new.sentence
+ crossref missing$
+ { format.series.number.din output }
+ { format.book.crossref output.nonnull }
+ if$
+ pages empty$
+ { skip$ }
+ { pages set.period.dash.check
+ pages format.bkpages.collat.check output
+ }
+ if$
+ format.doi output
+ format.url output
+ new.block
+ isbn set.period.dash.check
+ format.isbn.issn output
+ note set.period.dash.check
+ note output
+ fin.entry
+}
+
+FUNCTION {booklet}
+{ output.bibitem
+ author empty$
+ { format.editors "author and editor" output.check }
+ { format.authors format.editors output.nonnull }
+ if$
+ set.colon.after
+ format.btitle "title" output.check
+ format.edition.or.version output
+ format.url output
+ format.online.lastcheck
+ format.howpublished output
+ series new.sentence.checka
+ format.series.number.din output
+ pages empty$
+ { skip$ }
+ { pages set.period.dash.check
+ pages format.bkpages.collat.check output
+ }
+ if$
+ type set.period.dash.check
+ format.digital.type output
+ doi set.period.dash.check
+ urn set.period.dash.check
+ format.doi.urn output
+ note set.period.dash.check
+ note output
+ format.isbn.issn output
+ fin.entry
+}
+
+
+FUNCTION {inbook}
+{ output.bibitem
+ chapter format.chapter.inbook output.nonnull
+ crossref missing$
+ { author empty$
+ { format.editors "\,{In:\,}" swap$ * "author and editor" output.check }
+ { format.authors "\,{In:\,}" swap$ * output.nonnull }
+ if$
+ author empty$ editor empty$ AND
+ { before.all 'output.state := }
+ { set.colon.after }
+ if$
+ format.btitle.vol "title" output.check
+ format.edition output
+ format.address.publisher.year "publisher" output.check
+ new.sentence
+ format.series.number.din output
+ isbn set.period.dash.check
+ format.isbn.issn output
+ }
+ { format.book.crossref output.nonnull }
+ if$
+ part.of.sentence
+ format.pages output
+ note set.period.dash.check
+ note output
+ fin.entry
+}
+
+FUNCTION {incollection}
+{ output.bibitem
+ format.authors "author" output.check
+ set.colon.after
+ format.title "title" output.check
+ format.version.url output
+ type empty$ NOT
+ { type #-1 #4 substring$ "mail" =
+ type #1 #4 substring$ "Mail" =
+ OR
+ 'skip$
+ { format.online.lastcheck }
+ if$
+ }
+ { format.online.lastcheck }
+ if$
+ crossref missing$
+ { format.in.ed.booktitle.din "booktitle" output.check
+ format.edition output
+ format.address.publisher.year "publisher" output.check
+ format.maillist.url output
+ format.maillist.lastcheck
+ new.sentence
+ format.series.number.din output
+ doi set.period.dash.check
+ urn set.period.dash.check
+ format.doi.urn output
+ isbn set.period.dash.check
+ issn set.period.dash.check
+ format.isbn.issn output
+ }
+ { format.incoll.inproc.crossref output.nonnull }
+ if$
+ part.of.sentence
+ format.chapter.pages "pages" output.check
+ note set.period.dash.check
+ note output
+ fin.entry
+}
+
+
+FUNCTION {inproceedings}
+{ output.bibitem
+ format.authors "author" output.check
+ set.colon.after
+ format.title "title" output.check
+ crossref missing$
+ { format.in.ed.booktitle.din "booktitle" output.check
+ address empty$
+ { organization new.sentence.checka
+ organization output
+ part.of.sentence
+ format.address.publisher.year output
+ }
+ { format.address.publisher.year "publisher" output.check }
+ if$
+ new.sentence
+ series empty$
+ 'skip$
+ { format.series.number.din output }
+ if$
+ isbn set.period.dash.check
+ issn set.period.dash.check
+ format.isbn.issn output
+ }
+ { format.incoll.inproc.crossref output.nonnull }
+ if$
+ part.of.sentence
+ format.pages "pages" output.check
+ note set.period.dash.check
+ note output
+ fin.entry
+}
+
+FUNCTION {conference} { inproceedings }%% nach Patashnik, wg US-Kompatibilitaet
+
+FUNCTION {manual}
+{ output.bibitem
+ author empty$
+ { organization empty$
+ { title empty$
+ 'skip$
+ {format.btitle "title" output.check }
+ if$
+ }
+ 'skip$
+ if$
+ }
+ 'skip$
+ if$
+ format.authors.organization output.nonnull
+ set.colon.after
+ format.btitle "title" output.check
+ format.edition "edition" output.check
+ author empty$ organization empty$ AND
+ { address "address" output.check
+ part.of.sentence
+ }
+ { organization empty$
+ { address "address" output.check
+ part.of.sentence
+ }
+ { address ": " * organization * output
+ part.of.sentence
+ }
+ if$
+ }
+ if$
+ format.date output
+ number empty$
+ 'skip$
+ { "(" number * ") " * output }
+ if$
+ pages empty$
+ { skip$ }
+ { pages set.period.dash.check
+ pages format.bkpages.collat.check output
+ }
+ if$
+ format.doi output
+ format.url output
+ format.online.lastcheck
+ note set.period.dash.check
+ note output
+ fin.entry
+}
+
+%% Standard ist "Diplomarbeit", anderes mit TYPE="anderer Typ" erfassen!
+%% z.B. TYPE={Hausarbeit}, TYPE={Diss.}, TYPE={Habil.}, TYPE={Magisterarb.}
+FUNCTION {mastersthesis}
+{ output.bibitem
+ format.authors "author" output.check
+ set.colon.after
+ format.btitle "title" output.check
+ address output
+ part.of.sentence
+ school "school" output.check
+ part.of.sentence
+ "Diplomarbeit" format.thesis.tr.type output.nonnull
+ part.of.sentence
+ format.date "year" output.check
+ format.url output
+ format.online.lastcheck
+%% format.digital.resource.type
+ doi set.period.dash.check
+ urn set.period.dash.check
+ format.doi.urn output
+%% pages set.period.dash.check
+%% format.pages.book output
+ pages empty$
+ { skip$ }
+ { pages set.period.dash.check
+ pages format.bkpages.collat.check output
+ }
+ if$
+ note set.period.dash.check
+ note output
+ fin.entry
+}
+
+FUNCTION {phdthesis} %% {mastersthesis}% ist identisch bis auf Standardwert, s.o.
+{ output.bibitem
+ format.authors "author" output.check
+ set.colon.after
+ format.btitle "title" output.check
+ address output
+ part.of.sentence
+ school "school" output.check
+ part.of.sentence
+ "Diss." format.thesis.tr.type output.nonnull % koennte auch `Dissertation' sein
+ part.of.sentence
+ format.date "year" output.check
+ format.url output
+ format.online.lastcheck
+%% format.digital.resource.type
+ doi set.period.dash.check
+ urn set.period.dash.check
+ format.doi.urn output
+ pages empty$
+ { skip$ }
+ { pages set.period.dash.check
+ pages format.bkpages.collat.check output
+ }
+ if$
+%% pages set.period.dash.check
+%% format.pages.book output
+ note set.period.dash.check
+ note output
+ fin.entry
+}
+
+
+%% Normen, Vornormen, Schutzrechte (Patente) werden hiermit erfasst;
+%% (z.Zt. auch noch Internetressourcen)
+%% das type-Feld uebernimmt eine wichtige Steuerfunktion:
+FUNCTION {misc}
+{ output.bibitem
+ type missing$ not
+ { type duplicate$ #1 #4 substring$ "Norm" =
+ type #1 #4 substring$ "Vorn" = OR
+ { " " *
+ format.number * output
+ new.sentence
+ format.date output
+ title empty$
+ { skip$ }
+ { add.period$ new.sentence }
+ if$
+ format.btitle "title" output.check
+ note set.period.dash.check
+ note output
+ }
+ { duplicate$ #1 #6 substring$ "Schutz" =
+ { " " * format.number * output
+ new.sentence
+ "(" * format.date ")" * output
+ add.period$ new.sentence
+ format.authors.organization add.period$ output
+ note output
+ }
+ %% wenn irgendein anderer Typ eingetragen ist
+ { pop$ pop$ ""
+ title empty$
+ { note empty$
+ { url empty$
+ { "there's no relevant field in " cite$ warning$
+ pop$ ""
+ }
+ { format.url output }%%%
+ if$
+ }
+ { note " " * output.nonnull }
+ if$
+ }
+ { author empty$
+ { editor empty$
+ { organization empty$
+ { skip$ }
+ { format.editors.organization output.nonnull
+ set.colon.after
+ }
+ if$
+ }
+ { format.editors format.editors.organization
+ output.nonnull set.colon.after
+ }
+ if$
+ }
+ { format.authors format.editors output.nonnull
+ set.colon.after
+ }
+ if$
+ format.btitle output.nonnull
+ url empty$
+ { format.edition output
+ format.howpublished output}
+ { format.howpublished output
+ format.edition.or.date output
+ format.url output
+ }
+ if$
+ format.online.lastcheck
+%% format.lastchecked.or.type
+ new.sentence
+ format.misc.series output
+%% note set.period.dash.check
+ note output
+ }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ %% wenn es keinen type gibt
+ { title empty$
+ { note empty$
+ { url empty$
+ { "there's no relevant field in " cite$ warning$
+ pop$ ""
+ }
+ { format.url output }%%% das waere e. reine URL
+ if$
+ }
+ { note " " * output.nonnull
+ %% format.url format.date output
+ }
+ if$
+ }
+ { author empty$
+ { editor empty$
+ { organization empty$
+ { skip$ }
+ { format.editors.organization output.nonnull
+ set.colon.after
+ }
+ if$
+ }
+ { format.editors format.editors.organization
+ output.nonnull set.colon.after
+ }
+ if$
+ }
+ { format.authors format.editors output.nonnull
+ set.colon.after
+ }
+ if$
+ format.btitle output.nonnull
+ url empty$
+ { format.edition output
+ format.howpublished output}
+ { format.howpublished output
+ format.url output
+ format.edition.or.date output
+ format.online.lastcheck
+%% format.lastchecked.or.type
+ }
+ if$
+ new.sentence
+ format.misc.series output
+ note set.period.dash.check
+ note output
+ }
+ if$
+ }
+ if$
+ fin.entry
+}
+
+FUNCTION {proceedings}
+{ output.bibitem
+ editor empty$
+ { organization empty$
+ { "empty organization and editor in " cite$ * warning$ }
+ { organization " (Veranst.)" * output }
+ if$
+ }
+ { format.editors format.editors.organization output.nonnull }
+ if$
+ set.colon.after
+ format.btitle "title" output.check
+ volume empty$
+ { skip$ }
+ { "{\textnormal{Bd.}}" volume tie.or.space.connect emphasize "volume" output.check }
+ if$
+ format.address.publisher.year "publisher" output.check
+ new.sentence
+ format.series.number.din output.nonnull
+ pages empty$
+ { skip$ }
+ { pages set.period.dash.check
+ pages format.bkpages.collat.check output
+ }
+ if$
+ isbn set.period.dash.check
+ issn set.period.dash.check
+ format.isbn.issn output
+ note set.period.dash.check
+ note output
+ fin.entry
+}
+
+FUNCTION {techreport}
+{ output.bibitem
+ author empty$
+ { format.editors "author and editor" output.check
+ format.tr.institution output.nonnull }
+ { format.authors format.editors output.nonnull }
+ if$
+ set.colon.after
+ format.title "title" output.check
+ institution empty$
+ 'skip$
+ { author empty$ editor empty$ AND
+ 'skip$
+ { institution new.sentence.checka
+ "/ " institution * output.nonnull
+ }
+ if$
+ }
+ if$
+ format.version.url output
+ format.online.lastcheck
+ format.address.publisher.year output
+ number new.sentence.checka
+ format.tr.series.or.number "number" output.check
+ "Forschungsbericht" format.thesis.tr.type set.period.dash.check
+ "Forschungsbericht" format.thesis.tr.type output
+%% format.digital.resource.type
+ pages empty$
+ { skip$ }
+ { pages set.period.dash.check
+ pages format.bkpages.collat.check output
+ }
+ if$
+ isbn set.period.dash.check
+ issn set.period.dash.check
+ format.isbn.issn output
+ note set.period.dash.check
+ note "note" output.check
+ fin.entry
+}
+
+FUNCTION {unpublished} {misc}%% AUTHOR, TITLE, NOTE muessen sein!
+%% andere Felder sind optional
+
+FUNCTION {default.type} { misc }
+
+
+MACRO {jan} {"Januar"}
+
+MACRO {feb} {"Februar"}
+
+MACRO {mar} {"M{\^^b a}rz"}
+
+MACRO {apr} {"April"}
+
+MACRO {mai} {"Mai"}
+
+MACRO {may} {"Mai"}
+
+MACRO {jun} {"Juni"}
+
+MACRO {jul} {"Juli"}
+
+MACRO {aug} {"August"}
+
+MACRO {sep} {"September"}
+
+MACRO {okt} {"Oktober"}
+
+MACRO {oct} {"Oktober"}
+
+MACRO {nov} {"November"}
+
+MACRO {dez} {"Dezember"}
+
+MACRO {dec} {"Dezember"}
+
+%%$$$ stillgelegte Beispiele fuer den Gebrauch von Kuerzeln (hier Zs-Titel).
+
+%%MACRO {acmcs} {"ACM Computing Surveys"}
+
+%%MACRO {acta} {"Acta Informatica"}
+
+READ
+
+FUNCTION {sortify}
+{ purify$
+ "l" change.case$
+}
+
+FUNCTION {chop.word}
+{ 's :=
+ 'len :=
+ s #1 len substring$ =
+ { s len #1 + global.max$ substring$ }
+ 's
+ if$
+}
+
+FUNCTION {initialize.et.al.char.used}
+{ #0 'et.al.char.used :=
+}
+
+EXECUTE {initialize.et.al.char.used}
+
+FUNCTION {format.lab.names}
+{ 's :=
+ s num.names$ 'numnames :=
+ numnames #1 >
+ { numnames #4 >
+ { #3 'namesleft := }
+ { numnames 'namesleft := }
+ if$
+ #1 'nameptr :=
+ ""
+ { namesleft #0 > }
+ { nameptr numnames =
+ { s nameptr "{ff }{vv }{ll}{ jj}" format.name$ "others" =
+%% { "\," * %% kein besonderes Zeichen fuer "others" i. label
+ { "{\etalchar{+}}" * %% ein plus-Zeichen (+) fuer "others"!
+ #1 'et.al.char.used :=
+ }
+ { s nameptr "{l{}}" format.name$ * }
+ if$
+ }
+ { s nameptr "{l{}}" format.name$ * }
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+ numnames #4 >
+%% { "\," * %% s. Bemerkung oben
+ { "{\etalchar{+}}" *
+ #1 'et.al.char.used :=
+ }
+ 'skip$
+ if$
+ }
+ { s #1 "{l{}}" format.name$
+ duplicate$ text.length$ #2 <
+ { pop$ s #1 "{ll}" format.name$ #3 text.prefix$ } %% vgl. Anmerkung!
+ 'skip$
+ if$
+ }
+ if$
+}
+
+FUNCTION {author.key.label}
+{ author empty$
+ { key empty$
+ { cite$ #1 #3 substring$ }
+ { key #3 text.prefix$ }
+ if$
+ }
+ { author format.lab.names }
+ if$
+}
+
+FUNCTION {author.editor.key.label}
+{ author empty$
+ { editor empty$
+ { key empty$
+ { cite$ #1 #3 substring$ }
+ { key #3 text.prefix$ }
+ if$
+ }
+ { editor format.lab.names }
+ if$
+ }
+ { author format.lab.names }
+ if$
+}
+
+FUNCTION {author.key.organization.label}
+{ author empty$
+ { key empty$
+ { organization empty$
+ { cite$ #1 #3 substring$ }
+ { "The " #4 organization chop.word #3 text.prefix$ }
+ if$
+ }
+ { key #3 text.prefix$ }
+ if$
+ }
+ { author format.lab.names }
+ if$
+}
+
+FUNCTION {editor.key.organization.label}
+{ editor empty$
+ { key empty$
+ { organization empty$
+ { cite$ #1 #3 substring$ }
+ { "The " #4 organization chop.word organization }
+ if$
+ }
+ { key #5 text.prefix$ }%% man kann Laenge des key einstellen
+ if$
+ }
+ { key empty$%% wenn key vh., dann macht er das label! Lo,18/5/99
+ { editor format.lab.names }
+ { key #5 text.prefix$ }
+ if$
+ }
+ if$
+}
+
+FUNCTION {calc.label}
+{ type$ "book" =
+ type$ "booklet" =
+ type$ "inbook" =
+ or or
+ 'author.editor.key.label
+ { type$ "proceedings" =
+ 'editor.key.organization.label
+ { type$ "manual" =
+ 'author.key.organization.label
+ 'author.key.label
+ if$
+ }
+ if$
+ }
+ if$
+ duplicate$
+ year field.or.null purify$ #-1 #2 substring$
+ *
+ 'label :=
+ year field.or.null purify$ #-1 #4 substring$
+ *
+ sortify 'sort.label :=
+}
+
+FUNCTION {sort.format.names}
+{ 's :=
+ #1 'nameptr :=
+ ""
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ { nameptr #1 >
+ { " " * }
+ 'skip$
+ if$
+ s nameptr "{ll{ }}{ ff{ }}{ vv{ }}{ jj{ }}" format.name$ 't :=
+ nameptr numnames = t "others" = and
+ { ua.etal * }
+ { t sortify * }
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+}
+
+FUNCTION {sort.format.title}
+{ 't :=
+ "A " #2
+ "An " #3
+ "Der " #4
+ "Die " #4
+ "Das " #4
+ "Ein " #4
+ "Eine " #5
+ "The " #4 t chop.word
+ chop.word
+ chop.word
+ chop.word
+ chop.word
+ chop.word
+ chop.word
+ chop.word
+ sortify
+ #1 global.max$ substring$
+}
+
+FUNCTION {author.sort}
+{ author empty$
+ { key empty$
+ { "to sort, need author or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { author sort.format.names }
+ if$
+}
+
+FUNCTION {author.editor.sort}
+{ author empty$
+ { editor empty$
+ { key empty$
+ { "to sort, need author, editor, or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { editor sort.format.names }
+ if$
+ }
+ { author sort.format.names }
+ if$
+}
+
+FUNCTION {author.organization.sort}
+{ author empty$
+ { organization empty$
+ { key empty$
+ { "to sort, need author, organization, or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { "The " #4 organization chop.word sortify }
+ if$
+ }
+ { author sort.format.names }
+ if$
+}
+
+FUNCTION {editor.organization.sort}
+{ editor empty$
+ { organization empty$
+ { key empty$
+ { "to sort, need editor, organization, or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { "The " #4 organization chop.word sortify }
+ if$
+ }
+ { editor sort.format.names }
+ if$
+}
+
+FUNCTION {presort}
+{ calc.label
+ sort.label
+ " "
+ *
+ type$ "book" =
+ type$ "booklet" =
+ type$ "inbook" =
+ or or
+ 'author.editor.sort
+ { type$ "proceedings" =
+ 'editor.organization.sort
+ { type$ "manual" =
+ 'author.organization.sort
+ 'author.sort
+ if$
+ }
+ if$
+ }
+ if$
+ *
+ " "
+ *
+ year field.or.null sortify
+ *
+ " "
+ *
+ title field.or.null
+ sort.format.title
+ *
+ #1 entry.max$ substring$
+ 'sort.key$ :=
+}
+
+ITERATE {presort}
+
+SORT
+
+FUNCTION {initialize.longest.label}
+{ "" 'longest.label :=
+ #0 int.to.chr$ 'last.sort.label :=
+ "" 'next.extra :=
+ #0 'longest.label.width :=
+ #0 'last.extra.num :=
+}
+
+FUNCTION {forward.pass}
+{ last.sort.label sort.label =
+ { last.extra.num #1 + 'last.extra.num :=
+ last.extra.num int.to.chr$ 'extra.label :=
+ }
+ { "a" chr.to.int$ 'last.extra.num :=
+ "" 'extra.label :=
+ sort.label 'last.sort.label :=
+ }
+ if$
+}
+
+FUNCTION {reverse.pass}
+{ next.extra "b" =
+ { "a" 'extra.label := }
+ 'skip$
+ if$
+ label extra.label * 'label :=
+ label width$ longest.label.width >
+ { label 'longest.label :=
+ label width$ 'longest.label.width :=
+ }
+ 'skip$
+ if$
+ extra.label 'next.extra :=
+}
+
+EXECUTE {initialize.longest.label}
+
+ITERATE {forward.pass}
+
+REVERSE {reverse.pass}
+
+FUNCTION {begin.bib}
+{ et.al.char.used
+ { "\newcommand{\etalchar}[1]{$^{#1}$}" write$ newline$ }
+ 'skip$
+ if$
+ preamble$ empty$
+ 'skip$
+ { preamble$ write$ newline$ }
+ if$
+ "\begin{thebibliography}{" longest.label * "}" * write$ newline$
+ newline$
+ "% this bibliography is generated by alphadin.bst [8.2] from 2005-12-21"
+ write$ newline$
+ newline$
+ "\providecommand{\url}[1]{\texttt{#1}}"
+ write$ newline$
+ "\expandafter\ifx\csname urlstyle\endcsname\relax"
+ write$ newline$
+ " \providecommand{\doi}[1]{doi: #1}\else"
+ write$ newline$
+ " \providecommand{\doi}{doi: \begingroup \urlstyle{rm}\Url}\fi"
+ write$ newline$
+}
+
+EXECUTE {begin.bib}
+
+EXECUTE {init.state.consts}
+
+ITERATE {call.type$}
+
+FUNCTION {end.bib}
+{ newline$
+ "\end{thebibliography}" write$ newline$
+}
+
+EXECUTE {end.bib} \ No newline at end of file
diff --git a/biblio/bibtex/contrib/german/din1505/leitbild.bib b/biblio/bibtex/contrib/german/din1505/leitbild.bib
new file mode 100644
index 0000000000..41750ae450
--- /dev/null
+++ b/biblio/bibtex/contrib/german/din1505/leitbild.bib
@@ -0,0 +1,145 @@
+%% LEITBILD.BIB
+%% Lo, 11.10.04
+%
+%
+%%%%%%%%%%%%%%%%%%%%%%%%%%% typische Eingabemaske fuer selbstaendige Internetquelle
+% in howpublished kann evtl. der Provider-/Server-Ort genannt werden
+%% @BOOKLET{,
+ key = "",
+ author = "",
+ editor = "",
+ title = "",
+ howpublished = "",
+ month = "",
+ year = "",
+ url = "http://www.",
+ lastchecked = ".\,.\,2004",
+}
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+@BOOKLET{otto:04,
+ key = "Otto 2004",
+ editor = "{Otto GmbH \& Co KG}",
+ title = "Grunds{\"a}tze",
+ month = "",
+ year = "",
+ url = "http://www.otto.com/umwelt/umwelt_grundindex.html",
+ lastchecked = "5.\,Okt.\,2004",
+ note = "Einstiegsseite zum Unternehmensleitbild",
+}
+
+
+@BOOKLET{ikea,
+ key = "Ikea 2004",
+ editor = "{IKEA Deutschland GmbH \& Co KG}",
+ title = "Unsere Vision",
+ month = "",
+ year = "",
+ url = "http://www.ikea.de/ms/de_DE/about_ikea/our_vision/better_life.html",
+ lastchecked = "5.\,Okt.\,2004",
+ note = "Unternehmensleitbild",
+}
+
+@BOOKLET{lock:04,
+ key = "Lockheed",
+ editor = "{Lockheed Martin Corporation}",
+ title = "Corporate Value Statement",
+ month = "",
+ year = 2004,
+ url = "http://www.lockheedmartin.com/wms/findPage.do?dsp=fec&ci=13127&rsbci=12911&fti=0&ti=0&sc=400",
+ lastchecked = "5.\,Okt.\,2004",
+ note = "Einstiegsseite zum Unternehmensleitbild",
+}
+
+
+
+@BOOKLET{vw:02,
+ key = "VW",
+ editor = "{Volkswagen AG}",
+ title = "Nachhaltigkeitsleitbild von Volkswagen",
+ month = "",
+ year = "2002",
+ url = "http://www.volkswagen-umwelt.de/_content/wissen_21320.asp",
+ lastchecked = "5.\,Okt.\,2004",
+ note = "Erkl{\"a}rung zum Global Compact auf dem Weltgipfel 2002",
+}
+
+
+@BOOKLET{micro:04,
+ key = "Microsoft",
+ editor = "{Microsoft Deutschland GmbH}",
+ title = "Leitbild und Werte",
+ month = "16." # jan,
+ year = 2004,
+ url = "http://www.microsoft.com/germany/ms/unternehmensinformationen/werte.htm",
+ lastchecked = "5.\,Okt.\,2004",
+}
+
+@BOOKLET{bibnord:04,
+ key = "Stadtb{\"u}cherei 2004",
+ editor = "Susanne Martin and {Stadtb"ucherei Norderstedt}",
+ title = "Homepage Stadtb{\"u}cherei Norderstedt",
+ month = "",
+ year = "",
+ url = "http://www.norderstedt.de/cms3/index.php?hid=4&id=1323",
+ lastchecked = "5.\,Okt.\,2004",
+ note = "Darin entalten Aussagen zur Aufgabenerf{\"u}llung.",
+}
+
+@BOOKLET{aldi:04,
+ key = "Aldi 2004",
+ editor = "{ALDI Gmbh \& CO KG}",
+ title = "Das ALDI--Prinzip",
+ month = "",
+ year = "",
+ url = "http://www.aldi-essen.de/PRINZIP_D/P_index.htm",
+ lastchecked = "5.\,Okt.\,2004",
+}
+
+@BOOKLET{zbwkiel,
+ key = "ZBW-Kiel",
+ editor = "{Deutsche Zentralbibliothek f{\"u}r Wirtschaftswissenschaften}",
+ title = "Leitbild",
+ howpublished = "Kiel : ZBW",
+ url = "http://www.zbw-kiel.de/ueberbib/leitbild.html",
+ month = "",
+ year = "",
+ note = "Startseite der ZBW--website: http://www.zbw-kiel.de/index.html",
+ lastchecked = "21." # jan # 2004,
+}
+
+@BOOKLET{abbleit,
+ author = "Albert Glossner",
+ title = "Leitbilder",
+ publisher = "Arbeitsgem. Bildung u.Beruf e.~V.",
+ address = "P{\"o}ssneck",
+ url = "http://www.abb-seminare.de/leittext.htm",
+ month = "5.~" # jun,
+ year = "2003",
+ note = "Erstver{\"o}ffentl. Juni 1998",
+ lastchecked = "2004-01-21",
+}
+
+@BOOKLET{hahnleit,
+ author = "Anton Hahne",
+ title = "Thesen zur Leitbildentwicklung",
+ url = "http://people.freenet.de/hahne/ProjektLeitbildentwicklung.ppt",
+ lastchecked = "21.1.2004",
+ year = 2002,
+ note = "Powerpoint-Pr{\"a}sentation",
+}
+
+%% 22.1.04
+@BOOKLET{leitdef,
+ author = "Franz Lehner",
+ title = "Das Leitbild -- eine Definition",
+ howpublished = "FH Deggendorf, FB Betriebswirtschaftslehre",
+ url = "http://www.bw.fh-deggendorf.de/kapitel1/kap72/72seite21.html",
+ month = "25.~" # jun,
+ year = 2002,
+ note = "Teil der Virtuellen Vorlesung \emph{Informationsmanagment}
+ von Prof. Lehner, Univ. Regensburg",
+ lastchecked = "2004-01-21",
+}
+
+%% leitbild.bib 11.10.2004 \ No newline at end of file
diff --git a/biblio/bibtex/contrib/german/din1505/leitbild3.pdf b/biblio/bibtex/contrib/german/din1505/leitbild3.pdf
new file mode 100644
index 0000000000..13b8f17daf
--- /dev/null
+++ b/biblio/bibtex/contrib/german/din1505/leitbild3.pdf
Binary files differ
diff --git a/biblio/bibtex/contrib/german/din1505/natbib.cfg b/biblio/bibtex/contrib/german/din1505/natbib.cfg
new file mode 100644
index 0000000000..32ed930dba
--- /dev/null
+++ b/biblio/bibtex/contrib/german/din1505/natbib.cfg
@@ -0,0 +1,19 @@
+% NATBIB.CFG in Verbindung mit natbib.sty
+% Lorenzen, 2006-01-02
+% diese Konfigurationsdatei wird zuletzt eingelesen und
+% enth"alt die lokal gew"unschten Einstellungen f"ur den
+% Bibliographie-- und Zitierstil
+
+\newcommand{\bibstyle@natdin}%
+ {\bibpunct{(}{)}{;}{a}{}{,~}
+ \gdef\NAT@biblabelnum##1{\textbf{##1}\\}}
+%% nach dieser Definition wird das label (dinatlabel) fett geschrieben, dann Zeilenumbruch;
+%% darunter der bibliographische Beleg
+
+
+\bibstyle@natdin
+
+%% Einzug der Belege nach der Einordnungsmarke
+\setlength{\bibhang}{7mm}
+
+
diff --git a/biblio/bibtex/contrib/german/din1505/natdin.bst b/biblio/bibtex/contrib/german/din1505/natdin.bst
new file mode 100644
index 0000000000..5ad6520c56
--- /dev/null
+++ b/biblio/bibtex/contrib/german/din1505/natdin.bst
@@ -0,0 +1,2234 @@
+%% natdin.bst Vers. [3.1] 2006-01-02 mit PWD cite-multimode
+%%
+%% Aenderungen seit Vers. [3.0bx]:
+%% a) Funktions-Zusaetze bei Autoren sind nun moeglich
+%% b) Internetquellen ohne Zusatz "Online--Ressource" !
+%% c) verbesserte INPROCEEDINGS, PROCEEDINGS-Funktionen
+%% d) neue TECHREPORT und MANUAL-Funktionen
+%% e) neue format.pages.book-Funktion
+%% f) neue format.online.lastchecked-Funktion
+%%
+%%
+%% K.F.Lorenzen (Copyright 1994-2006) email: lorenzen.marxen@t-online.de
+%% ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+%% Mit diesem BibTex-style werden Literaturverzeichnisse nach dem deutschen
+%% Standard DIN 1505, Teil 2 und 3 formatiert. Die label im Quellen-/
+%% Literaturverzeichnis sind vom Typ 'Verfasser - Jahr' und
+%% entsprechen den Zitatformen im Text. Es koennen alle von
+%% Patrick W. Daly im natbib-Paket implementierten Zitierbefehle
+%% genutzt werden. Eine Kurzbeschreibung liegt als Datei natnotes.pdf zusammen
+%% mit der im Aufbau befindlichen Beschreibung des natdin-Stils
+%% unter der URL http://www.haw-hamburg.de/pers/Lorenzen/bibtex.
+%% Eine Anleitung zur Anwendung der Norm DIN 1505 findet sich unter der
+%% URL http://www.bui.haw-hamburg.de/pers/klaus.lorenzen/ASP/litverz.pdf
+%%
+%% Es werden nun auch Elektronische Online / Offline Ressourcen wie
+%% Internetquellen, CD-ROM usw. verarbeitet. Dazu kommen spezielle
+%% Publikationsformen wie Patente, Normen, Karten, Fernsehaufzeichnungen,
+%% Gesetzesstellen, Spiele u.a.
+%
+%% NATDIN.BST muss zusammen mit NATBIB.STY von Patrick W. Daly und der in
+%% dieser Verteilung modifizierten Konfiguration NATBIB.CFG aufgerufen
+%% werden. NATDIN.BST ist vorzugsweise in den ...\bibtex\bst - Pfad zu
+%% stellen. Die jeweils individuelle Konfiguration NATBIB.CFG wird am
+%% besten in das Verzeichnis der LaTex-Quelle selbst gelegt.
+%%
+%% Eine Muster-Konfiguration wird auf Vorschlag von Helge Baumann eingefuegt:
+% ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+% NATBIB.CFG in Verbindung mit natbib.sty Lorenzen, 2005-05-31
+% diese Konfigurationsdatei wird zuletzt eingelesen und
+% enthaelt die lokal gewuenschten Einstellungen fuer den
+% Bibliographie-- und Zitierstil
+%
+% \newcommand{\bibstyle@natdin}%
+% {\bibpunct{(}{)}{;}{a}{}{,~}
+% \gdef\NAT@biblabelnum##1{\textbf{##1}\\}} %% \\ bewirkt Zeilenumbruch
+% %% nach label-Ausgabe
+%
+% \bibstyle@natdin
+%
+% % Einzug der Belege nach der Einordnungsmarke
+% \setlength{\bibhang}{7mm}
+%
+%% ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+%%
+%% Zur Gewaehrleistung der Allgemeingueltigkeit von bib-files gelten
+%% in den DIN-styles mit einer einzigen Ausnahme die in der Tex-Literatur
+%% veroeffentlichten originalen Definitionen und Regeln fuer die
+%% Publikationstypen (entry-types) und die bibliographischen Felder (fields).
+%% Die Ausnahme bezieht sich auf den entry-type PROCEEDINGS und das Feld
+%% address, fuer das Oren Patashnik dort die Sonderbedeutung "Konferenzort"
+%% gewaehlt hatte. In den DIN-Stilen behaelt address auch hier seine normale
+%% Bedeutung als "Verlagsort" bei!
+%% In einigen entry-types werden zu Gunsten bibliographischer Vollstaendigkeit
+%% mehr optionale Felder verwendet als seinerzeit von Patashnik angegeben.
+%% Treten "Schoenheitsfehler" im fertig gesetzten output auf,
+%% lassen sich diese so gut wie immer durch eine veraenderte
+%% Erfassung im bib-inputfile beseitigen. Oren Patashnik empfiehlt, die
+%% Definition der Felder weit auszulegen. Last but not least koennen
+%% Sie im output-file < *.bbl > noch letzte Hand zur Korrektur ansetzen.
+%% Wegen der meist langen Internetadressen kann es zu "unschoenen" Luecken
+%% im Belegtext kommen. Dann muss mit \underfull hbox.... gekaempft werden.
+%%
+%% Die Darstellung von Internetadressen wird durch das Zusatzpaket
+%% url.sty ver 3.1, 15-Mar-2004 von Donald Arseneau erheblich verbessert und
+%% wird sehr empfohlen.
+%%
+%% HYPERREF-Paket: wird dieses Paket zusaetzlich geladen, werden im output
+%% aktivierbare externe (URLs usw.) und interne (Dokumentbezogene) Links
+%% gesetzt. Sehr gute Zusammenarbeit mit PDFLaTex u.a.
+%
+%% WARN- UND FEHLERMELDUNGEN
+%% Ursache von Warnmeldungen sind meistens ausgelassene Felder oder
+%% Erfassungs-"Fehler". Letztere haengen teilweise mit den gegenueber US-
+%% Gepflogenheiten andersartigen bibliographischen Regeln nach DIN 1505
+%% zusammen. Sie sind also in Wahrheit keine "Fehler" und duerfen fast immer
+%% ignoriert werden. Dennoch pruefen Sie diese Warnungen, um heraus zu finden,
+%% ob Publikationstyp (=entry-type) und "fields" eventuell unzulaessig
+%% kombiniert worden sind.
+%% Echte Fehler ("errors") duerften nur noch bei bibliographisch falscher
+%% Erfassung auftreten. Pruefen Sie die Syntax, den entry-type und die fields.
+%% Zu guter letzt: Qualitaetsmasstab ist einzig der DIN-konforme output!
+%%
+%% DANKSAGUNG
+%% Hartmut Lueddecke, HAW Hamburg, hat viele Verbesserungsvorschlaege
+%% in die frueheren Versionen eingebracht. Ihm danke ich herzlich.
+%% Patrick W. Daly, dem Entwickler des Natbib-Stils, verdanke ich viele
+%% Anregungen und den steten Ansporn, die DIN-Stile zu verbessern.
+%% Helge Baumann hatte mit seiner Weiterentwicklung meines alten natdin.bst
+%% zu dinat.bst (Vers. 2001) die volle Zitierkapazitaet des natbib-Pakets
+%% eingefuehrt. Damit war ein deutlicher Zugewinn erreicht. Von ihm stammt
+%% der in der vorliegenden natdin.bst-Version 3.0x neu eingefuehrte Befehl
+%% \dinatlabel unter seinem von H. Baumann vergebenen Namen.
+%% Viele an dieser Stelle ungenannt bleibende Anwender haben mich in
+%% den vergangenen Jahren auf Fehler oder Verbesserungsmoeglichkeiten
+%% aufmerksam gemacht und so diesen Stil mitentwickelt. Ihnen gilt mein
+%% besonderer Dank. Ihr Feedback ist immer willkommen und eine Ermunterung.
+%%
+%% Klaus F. Lorenzen
+%%
+%% ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+%% version 0.99c for BibTeX versions 0.99c or later, LaTeX2e version
+%% Copyright (C) 1985, all rights reserved.
+%% Copying of this file is authorized only if either
+%% (1) you make absolutely no changes to your copy, including name, or
+%% (2) if you do make changes, you name it something other than
+%% natdin.bst, natbib.sty
+%% This restriction helps ensure that all standard styles are identical.
+%% ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+%%
+%% NEUE FELDER
+%% Zur Erfassung von Internetquellen, E-mail u.a. gibt es folgende
+%% neue Felder: doi, lastchecked (nach Gray), url, urn
+%% Internetquellen (z.B. auch E-mail) werden vorzugsweise mit dem
+%% BOOKLET-Typ erfasst.
+%% Normen, Patente, Schutzrechte, Gesetzesstellen sind mit dem MISC-Typ
+%% zu erfassen.
+%%
+
+
+ENTRY
+ { address %% Verlagsort (immer!)
+ author %% persoenlicher Urheber eines Werkes oder am Zustandekommen
+ %% beteiligte Personen(=Mitarbeiter, Uebersetzer, Redakteur u.a.)
+ booktitle %% a) Gesamttitel eines mehrbaendigen Werkes
+% %% b) Titel des Sammelwerks, das einzelne selbstaendige
+% %% Beitraege mit eigenem Titel enthaelt ->incollection
+ chapter %% Kapitel in einem Buch (Monographie)
+ doi %%% Digital Object Identifier ->article
+ edition %% a) Auflagevermerk
+% %% b) bei selbst. elektron. Quellen == Version ->booklet
+ editor %% Persoenl.Herausgeber oder Koerperschaftlicher Herausgeber
+ howpublished %% beliebiger Verlegervermerk: veroeffentlicht "von wem, wo"
+ institution %% Institution, die e.verlagsfreie Veroeffentlichung betreibt
+ isbn %% Standardnr fuer Buecher
+ issn %% - " - : Zeitschriften u. Serien
+ journal %% Titel einer Zeitschrift
+ key %% Zusaetzlich vergebener Sortierschluessel, mitunter notwend.
+ lastchecked %% neues Feld fuer das Datum des Online-Abrufs
+% %% einer Internetquelle (n. GRAY )
+ month %% naehere Bestimmung des Erscheinungsjahres -> macro 's
+ note %% freies Eingabefeld fuer zusaetzliche Informationen z. Quelle
+ number %% Versch. Bedeutungen in Abhaengigkeit vom Eingabetyp:
+% %% a) Bandnummer einer gezaehlten Reihe (series)
+% %% b) Heftnummer einer Zeitschrift ->article
+% %% c) Nummer eines Forschungsberichts ->techreport
+ organization %% a) Name der Organisation/des Organisators e. Tagung,Konferenz
+% %% b) Name einer Firma/Gesellschaft, die ein ->manual herausgab
+ pages %% Umfangsangaben, meist Seitenzahlen
+ publisher %% Verlag
+ school %% Hochschule/Universitaet, die eine Dipl.-Arb./Dissertation veroeff.
+ series %% Titel e.Reihe, in der ein best. Buchtitel erschienen ist
+ title %% Titel einer (namentlich gekennzeichneten) Veroeffentlichung
+ type %% Zusatzfeld z.Kennzeichnung e.besonderen Publikationstyps
+ url %% neues Feld URL ( Uniform Resource Locator ):
+% %% Serveradresse einer Internetquelle
+ urn %% neues Feld URN ( Uniform Resource Name ):
+% %% Persistent Identifier einer Internetquelle
+ volume %% a) Zaehlung bei einem mehrbaendigen Werk ->book/->proceedings
+% %% b) Jahrgang einer Zeitschrift ->article
+ year %% Erscheinungsjahr
+ }
+ {}
+ { label extra.label sort.label short.list dinat.label}
+
+%%%----------------------------------------------------------------------------
+% Einige Standardvorgaben, die vom Benutzer veraendert werden koennen.
+%%%----------------------------------------------------------------------------
+
+% Abkuerzung ("... und andere") bei Mehrverfasserquellen:
+
+FUNCTION { ua.etal } { " u.\,a." } %% evtl. auch in eckigen Klammern " [u.\,a.]"
+
+%% oder lateinisch: FUNCTION { ua.etal } { " et~al." }
+
+FUNCTION { und } { " u. " }
+
+%% oder ausgeschrieben: FUNCTION { und } { " und " }
+
+
+% Einige elektronische Medien erhalten nach DIN 1505 eine "Ergaenzende Angabe"
+% zusaetzlich zum materiellen Typ, z.B. CD ROM oder DVD u.a.:
+
+FUNCTION { eress } { "Elektronische Ressource" }
+%%%-----------------------------------------------------------------------------------
+
+INTEGERS { output.state before.all mid.sentence after.sentence after.block }
+
+INTEGERS { after.firstblock }
+
+INTEGERS { colon.after period.dash }
+
+INTEGERS { zahl lang }
+
+INTEGERS { len }
+
+INTEGERS { longest.label.width last.extra.num number.label }
+
+INTEGERS { nameptr namesleft numnames }
+
+INTEGERS { ptr collation collrest }
+
+STRINGS { longest.label last.label next.extra }
+
+STRINGS { h s t u v w }
+
+STRINGS { fkt }
+
+%%---------------------------
+
+FUNCTION {init.state.consts}
+{ #0 'before.all :=
+ #1 'mid.sentence :=
+ #2 'after.sentence :=
+ #3 'after.block :=
+ #4 'colon.after :=
+ #5 'period.dash :=
+ #6 'after.firstblock :=
+}
+
+
+
+FUNCTION {set.period.dash} %% Wenn ein ". - " die Satzteile trennen soll.!
+{ output.state before.all =
+ 'skip$
+ { period.dash 'output.state := }
+ if$
+}
+
+
+FUNCTION {set.period.dash.check}
+{ empty$
+ 'skip$
+ 'set.period.dash
+ if$
+}
+
+FUNCTION {set.colon.after} %%$$$ Wenn ein ": " d. Satzteile trennen soll!
+{ output.state before.all =
+ 'skip$
+ { colon.after 'output.state := }
+ if$
+}
+
+%% Wenn ein " " die Satzteile trennen soll.!
+FUNCTION {new.sentence}
+{ output.state before.all =
+ 'skip$
+ { after.sentence 'output.state := }
+ if$
+}
+
+%% neu 17/2/94 Wenn ein ", " die Satzteile trennen soll.!
+FUNCTION { part.of.sentence }
+{ output.state before.all =
+ 'skip$
+ { mid.sentence 'output.state := }
+ if$
+}
+
+FUNCTION {new.sentence.checka}
+{ empty$
+ 'skip$
+ 'new.sentence
+ if$
+}
+
+FUNCTION {output.nonnull}
+{ 's :=
+ output.state after.block =
+ { add.period$ write$
+ newline$
+ "\newblock " write$
+ }
+ { output.state before.all =
+ { write$ }
+ { output.state colon.after =
+ { ": " * write$
+ newline$
+ "\newblock " write$
+ }
+ { output.state period.dash =
+ { ". -- " * write$
+ newline$
+ "\newblock " write$
+ }
+ { output.state mid.sentence =
+ { ", " * write$ }
+ { output.state after.sentence =
+ { " " * write$ }
+ { output.state after.firstblock =
+ { add.period$ write$
+ newline$
+ "\newblock " write$
+ }
+ { write$
+ newline$
+ "\newblock " write$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+ after.block 'output.state :=
+ }
+ if$
+ s
+ }
+
+FUNCTION {output}
+{ duplicate$ empty$
+ 'pop$
+ 'output.nonnull
+ if$
+}
+
+FUNCTION {output.check}
+{ 't :=
+ duplicate$ empty$
+ { pop$ "empty " t * " in " * cite$ * warning$ }
+ 'output.nonnull
+ if$
+}
+
+FUNCTION {new.block}
+{ output.state before.all =
+ 'skip$
+ { after.block 'output.state := }
+ if$
+}
+
+FUNCTION {not}
+{ { #0 }
+ { #1 }
+ if$
+}
+
+FUNCTION {and}
+{ 'skip$
+ { pop$ #0 }
+ if$
+}
+
+FUNCTION {or}
+{ { pop$ #1 }
+ 'skip$
+ if$
+}
+
+FUNCTION {format.date}
+{ year duplicate$ empty$
+ { "empty year in " cite$ * warning$
+ pop$ "" }
+ 'skip$
+ if$
+ month empty$
+ 'skip$
+ { type$ "book" =
+ type$ "inbook" =
+ OR
+ 'skip$
+ { month " " * swap$ * }
+ if$
+ }
+ if$
+%% ohne Extrabuchstabe beim Erscheinungsjahr
+}
+
+FUNCTION {format.edition.or.date}
+{ edition empty$ year empty$ and
+ { "" }
+ { edition empty$
+ { type empty$ NOT
+ { type #-1 #4 substring$ "mail" =
+ type #1 #4 substring$ "Mail" =
+ OR
+ { " gesendet: " "-- " type * swap$ *
+ format.date *
+ }
+ { "\,Version:\,"
+ format.date *
+ }
+ if$
+ }
+ { "\,Version:\,"
+ format.date *
+ }
+ if$
+ }
+ { year empty$
+ { "\,Version:\," edition * }
+ { "\,Version:\," edition * ", " *
+ format.date *
+ }
+ if$
+ }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.online.lastcheck}
+{ lastchecked empty$
+ { url empty$ doi empty$ urn empty$ and and
+ { skip$ }
+ { "" output }
+ if$
+ }
+ { url empty$ doi empty$ urn empty$ and and
+ { "there's a lastchecked date but no url, urn or doi in "
+ cite$ * warning$
+ }
+ { part.of.sentence
+ lastchecked "Abruf: " swap$ * output
+ }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.maillist.lastcheck}
+ { type empty$ NOT
+ { type #-1 #4 substring$ "mail" =
+ type #1 #4 substring$ "Mail" =
+ OR
+ { format.online.lastcheck }
+ 'skip$
+ if$
+ }
+ 'skip$
+ if$
+ }
+
+FUNCTION {format.doi}
+{ doi empty$
+ { "" }
+ { new.block "\url{http://dx.doi.org/" doi * "}" *
+ %% { new.block "\url{http://dx.medra.org/" doi * "}" *
+ }
+ if$
+}
+
+FUNCTION {format.url}
+{ urn missing$
+ { doi missing$
+ { url empty$
+ { "" }
+ { type empty$ NOT
+ { type #-1 #4 substring$ "mail" =
+ type #1 #4 substring$ "Mail" =
+ OR
+ { type$ "incollection" =
+ { "" }
+ { "\,Absenderadresse: \url{" url * "}" * }
+ if$
+ }
+ { "\url{" url * "}" * }%% evtl. "URL" oder "<...>"
+ if$
+ }
+ { "\url{" url * "}" * } %% evtl. "URL" oder "<...>"
+ if$
+ }
+ if$
+ }
+ { format.doi }
+ if$
+ }
+ { "\url{http://nbn-resolving.de/urn/resolver.pl?urn=" urn * "}" *
+ }
+ if$
+}
+
+FUNCTION {format.maillist.url}
+ { url empty$
+ { "" }
+ { type empty$
+ { "" }
+ { type #-1 #4 substring$ "mail" =
+ type #1 #4 substring$ "Mail" =
+ OR
+ { "\url{" url * "}" * }
+ { "" }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+
+
+FUNCTION {format.full.names}
+{'s :=
+ #1 'nameptr :=
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ { s nameptr
+ "{vv~}{ll}" format.name$ 't :=
+ nameptr #1 >
+ {
+ namesleft #1 >
+ { ", " * t * }
+ {
+ numnames #2 >
+ { "," * }
+ 'skip$
+ if$
+ t "others" =
+ { ua.etal * }
+ { und * t * }
+ if$
+ }
+ if$
+ }
+ 't
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+}
+
+FUNCTION {author.editor.full}
+{ author empty$
+ { editor empty$
+ { "" }
+ { editor format.full.names }
+ if$
+ }
+ { author format.full.names }
+ if$
+}
+
+FUNCTION {author.full}
+{ author empty$
+ { "" }
+ { author format.full.names }
+ if$
+}
+
+FUNCTION {editor.full}
+{ editor empty$
+ { "" }
+ { editor format.full.names }
+ if$
+}
+
+FUNCTION {make.full.names}
+{ type$ "book" =
+ type$ "inbook" =
+ or
+ 'author.editor.full
+ { type$ "proceedings" =
+ 'editor.full
+ 'author.full
+ if$
+ }
+ if$
+}
+
+
+FUNCTION {output.bibitem}
+{ newline$
+ "\bibitem[" write$
+ label write$
+ ")" make.full.names duplicate$ short.list =
+ { pop$ }
+ { * }
+ if$
+ "]{" * write$
+ cite$ write$
+ "}" write$
+ newline$
+ "\dinatlabel{" dinat.label * "} " * %% Zeilenumbruch steht in NATBIB.CFG!
+ write$
+ ""
+ before.all 'output.state :=
+}
+
+
+FUNCTION {fin.entry}
+{ write$
+ newline$
+}
+
+FUNCTION {field.or.null}
+{ duplicate$ empty$
+ { pop$ "" }
+ 'skip$
+ if$
+}
+
+FUNCTION {emphasize}
+{ duplicate$ empty$
+ { pop$ "" }
+ { "\emph{" swap$ * "}" * }
+ if$
+}
+
+FUNCTION { capitalize }
+ { duplicate$ empty$
+ { pop$ "" }
+ { "\textsc{" swap$ * "}" * }
+ if$
+}
+
+FUNCTION {article.in.journal}
+{ duplicate$ empty$
+ { pop$ "" }
+ { author missing$ title missing$ and
+ { emphasize }
+ { emphasize "{In: }" swap$ * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.names}
+{ 's :=
+ "" 'u :=
+ #1 'nameptr :=
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ {
+ s nameptr "{ll}" format.name$ 't :=
+ t capitalize 't :=
+ s nameptr "{ jj}" format.name$ 'w :=
+ s nameptr "{, ff}{ vv}{ jj}" format.name$ 'u :=
+ u text.length$ 'lang :=
+ #1 'zahl :=
+ "" 'v :=
+ { zahl lang < }
+ { u zahl #1 substring$ "~" =
+ { v "" =
+ { u #1 zahl #1 - substring$ 'v := }
+ 'skip$
+ if$
+ v u zahl #2 substring$ * "." * w * 'v :=
+ }
+ 'skip$
+ if$
+ zahl #1 + 'zahl := }
+ while$
+ v "" =
+ { u 'v := }
+ 'skip$
+ if$
+ t v * fkt * 't :=
+ nameptr #1 >
+ { namesleft #1 >
+ { " ; " * t * }
+ { numnames #2 >
+ { " " * }
+ 'skip$
+ if$
+ t "\textsc{others}" = t "\textsc{others} (Hrsg.)" = or
+ { ua.etal * }
+ { " ; " * t * }
+ if$
+ }
+ if$ %% Ende der namesleft-Pruefung
+ }
+ 't
+ if$ %% Ende der nameptr-Pruefung
+
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$ %% Ende von { namesleft #0 > } ganz oben
+ "" 'fkt := %% fkt wird zurueckgesetzt
+}
+
+FUNCTION {format.authors}
+{ author empty$
+ { "" }
+ { author format.names }
+ if$
+}
+
+FUNCTION {format.editors}
+{ editor empty$
+ { author empty$
+ { "empty author and editor in " cite$ * warning$ "" }
+ 'skip$
+ if$
+ }
+ { author empty$
+ { " (Hrsg.)" 'fkt :=
+ editor format.names
+ }
+ { " (Hrsg.)" 'fkt :=
+ " ; " * editor format.names *
+ }
+ if$
+ }
+ if$
+ }
+
+%% 2005-11-11
+FUNCTION { format.authors.organization }
+{ type$ "misc" =
+ { organization empty$
+ { author empty$
+ { "" }
+ { author format.names " (Erfinder)" * }
+ if$
+ }
+ { author empty$
+ { organization }
+ { author format.names " (Erfinder); " *
+ organization * " (Anmelder)" *
+ }
+ if$
+ }
+ if$
+ }
+ { type$ "manual" =
+ { organization empty$
+ { format.authors }
+ { author empty$
+ { organization capitalize " (Hrsg.)" * }
+ { author format.names }
+ if$
+ }
+ if$
+ }
+ 'skip$
+ if$
+ }
+ if$
+}
+
+FUNCTION { format.editors.organization }
+{ organization empty$
+ 'skip$
+ { type$ "misc" =
+ { organization }
+ { * " ; " * organization " (Veranst.)" *}
+ if$
+ }
+ if$
+}
+
+FUNCTION { format.tr.institution }
+{ institution empty$
+ 'skip$
+ { institution capitalize }
+ if$
+}
+
+FUNCTION {format.ed.incoll}
+{ editor empty$
+ { "" }
+ { " (Hrsg.)" 'fkt :=
+ editor format.names
+ format.editors.organization
+ }
+ if$
+}
+
+
+FUNCTION {format.title}
+{ title empty$
+ { "" }
+ { title } %% Text so wie er dasteht im Feld title
+ if$
+}
+
+FUNCTION {format.number}
+{ number empty$
+ { "" }
+ { number " " * } %% Text so wie er im Feld number steht plus " "
+ if$
+}
+
+FUNCTION {format.digital.type}
+{ type empty$
+ { "" }
+ { type #-1 #4 substring$ "mail" =
+ type #1 #4 substring$ "Mail" =
+ OR
+ { "" }
+ { type } %% Typ einer digitalen Ressource in Form einer
+ %% "Ergaenzenden Angabe", so wie er dasteht;
+ %% Alternativ kann dieser Text auch in NOTE erfasst werden.
+ if$
+ }
+ if$
+}
+
+FUNCTION {n.dashify}
+{ 't :=
+ ""
+ { t empty$ not }
+ { t #1 #1 substring$ "-" =
+ { t #1 #2 substring$ "--" = not
+ { "--" *
+ t #2 global.max$ substring$ 't :=
+ }
+ { { t #1 #1 substring$ "-" = }
+ { "-" *
+ t #2 global.max$ substring$ 't :=
+ }
+ while$
+ }
+ if$
+ }
+ { t #1 #1 substring$ *
+ t #2 global.max$ substring$ 't :=
+ }
+ if$
+ }
+ while$
+}
+
+%% Auflagenvermerke gibt man komplett, einschliesslich Abkuerzungen in
+%% das Feld edition ein: ---> EDITION= { 3., erw. und verb. Aufl. }
+%% oder fremdsprachlich: EDITION= { 2nd edition }
+
+FUNCTION {format.edition}
+{ edition empty$
+ { "" }
+ { edition }
+ if$
+}
+
+FUNCTION {format.version.url}
+{ url empty$ doi empty$ urn empty$ and and
+ { type$ "techreport" =
+ { format.edition }
+ { "" }
+ if$
+ }
+ { format.edition.or.date output format.url }
+ if$
+}
+
+FUNCTION {format.edition.or.version}
+{ url empty$ doi empty$ urn empty$ and and
+ { format.edition }
+ { format.edition.or.date }
+ if$
+}
+
+FUNCTION {format.address.publisher.year}
+{ publisher empty$
+ { address empty$
+ { year empty$
+ { "" }
+ { year }
+ if$
+ }
+ { "there's an address but no publisher in " cite$ * warning$
+ address ", " * format.date *
+ }
+ if$
+ }
+ { address empty$
+ { year empty$
+ { "neither address nor publication date in " cite$ * warning$
+ publisher
+ }
+ { publisher ", " * format.date * }
+ if$
+ }
+ { year empty$
+ { address " : " * publisher * }
+ { address " : " * publisher * ", " * format.date * }
+ if$
+ }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.howpublished}
+{ url missing$ urn missing$ doi missing$ AND AND
+ { howpublished empty$
+ { address empty$
+ { type empty$
+ { "" }
+ { type #-1 #4 substring$ "mail" =
+ { "(gesendet: " new.sentence
+ format.date * ")" *
+ }
+ { "" }
+ if$
+ }
+ if$
+ format.date *
+ }
+ { address ", " * format.date * }
+ if$
+ }
+ { address empty$
+ { howpublished ", " * format.date * }
+ { address " : " * howpublished * ", " * format.date * }
+ if$
+ }
+ if$
+ }
+ { howpublished empty$
+ { "" }
+ { howpublished }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.btitle}
+{ title emphasize
+}
+
+FUNCTION {tie.or.space.connect}
+{ duplicate$ text.length$ #3 <
+ { "~" }
+ { " " }
+ if$
+ swap$ * *
+}
+
+FUNCTION {format.btitle.vol}
+{ number empty$
+ { series empty$
+ { volume empty$
+ { title emphasize }
+ { title emphasize ". Bd." * volume tie.or.space.connect }
+ if$
+ }
+ { volume empty$
+ { title emphasize }%% ein Buch, das zusaetzl. SERIES=Reihentitel besitzt
+ %% jetzt kommt d. Fall des mehrbaendigen Werkes mit Gesamttitel=SERIES
+ %% Zaehlung=VOLUME und Bandtitel=TITLE;
+ { series emphasize ". Bd." * volume tie.or.space.connect
+ ": " * "{\emph{" * title * "}}" * }
+ if$
+ }
+ if$%% series-test
+ }
+ { title emphasize }%% wenn number ex., dann immer title-Feld
+ if$%% Ende number-test
+}
+
+FUNCTION {format.series.number.din}
+{ volume empty$
+ { number empty$
+ { series empty$
+ { "" }
+ { "(" series * ")" * } %% d. Seriennr koennte auch gleich hier
+ %% im SERIES-Feld miterfasst werden
+ if$
+ }
+ { series empty$
+ { "(" number tie.or.space.connect ")" *
+ "there's a number but no series in " cite$ * warning$
+ }
+ { "(" series * number tie.or.space.connect ")" * }
+ if$
+ }
+ if$
+ }
+ { series empty$
+ { "" }
+ { type$ "proceedings" = %% Sonderfall, es darf VOLUME und NUMBER ex. !
+ type$ "inproceedings" = OR
+ { number empty$
+ { "(" series * ")" * }
+ { "(" series * number tie.or.space.connect ")" * }
+ if$
+ }
+ { "" }%% Ausstieg mit Nullstring, s. Kommentar
+ if$
+ }%% bei gezaehlten Reihen MUSS die Reihennr. im Feld NUMBER stehen!
+ if$ %% wenn also d. Feld VOLUME nicht leer ist, dann liegt ausser bei
+ %% Typ PROCEEDINGS/INPROCEEDINGS falsche
+ } %% Erfassung vor und es erfolgt d. Ausstieg mit d. Nullstring!
+ if$
+}
+
+FUNCTION {format.tr.series.or.number}
+{ number empty$
+ { series empty$
+ { "" }
+ { "(" series * ")" * }
+ if$
+ }
+ { series empty$
+ { "(" number * ")" * }
+ { "(" series * number tie.or.space.connect ")" * }
+ if$
+ }
+ if$
+ }
+
+FUNCTION {format.misc.series}
+{ series empty$
+ { "" }
+ { "(" series * ")" * }
+ if$
+}
+
+FUNCTION { format.doi.urn }
+{ urn empty$
+ { doi empty$
+ { "" }
+ { "DOI" doi n.dashify tie.or.space.connect }
+ if$
+ }
+ { "URN" urn n.dashify tie.or.space.connect }
+ if$
+}
+
+FUNCTION { format.isbn.issn }
+{ isbn empty$
+ { issn empty$
+ { "" }
+ { "ISSN" issn n.dashify tie.or.space.connect }
+ if$
+ }
+ { "ISBN" isbn n.dashify tie.or.space.connect }
+ if$
+}
+
+FUNCTION {format.pages}
+{ pages empty$
+ { "" }
+ { url empty$
+ { "S." pages n.dashify tie.or.space.connect }
+ { pages }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.pages.book}
+{ pages empty$
+ { "" }
+ { note empty$ isbn empty$ AND
+ { "" pages n.dashify tie.or.space.connect " S" *
+ add.period$
+ }
+ { "" pages n.dashify tie.or.space.connect " S" *
+ }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.pages.bkcollation}
+{ pages empty$
+ { "" }
+ { "" pages n.dashify tie.or.space.connect }
+ if$
+}
+
+FUNCTION {format.bkpages.collat.check}
+{ 's :=
+ #1 'ptr :=
+ s text.length$ 'collation :=
+ collation #1 =
+ { format.pages.book }
+ {
+ collation 'collrest :=
+ { collrest #0 > }
+ { s ptr #2 substring$ 't :=
+ t "S." =
+ { format.pages.bkcollation
+ #0 'collrest := }
+ { ptr #1 + 'ptr :=
+ collrest #1 - 'collrest :=
+ #1 collrest =
+ { format.pages.book }
+ { skip$ }
+ if$
+ }
+ if$
+ }
+ while$
+ }
+ if$
+}
+
+FUNCTION {format.vol.year.num.pages}
+{ volume field.or.null
+ year empty$
+ { "there's no year in " cite$ * warning$ }
+ { " (" year * ")" * * }
+ if$
+ month empty$
+ 'skip$
+ { ", " month * * }
+ if$
+ number empty$
+ 'skip$
+ { ", Nr. " number * * }
+ if$
+ pages empty$
+ 'skip$
+ { duplicate$ empty$
+ { pop$ "" }
+ { title missing$
+ { ", " pages format.bkpages.collat.check * *}
+ { ", " format.pages * *}
+ if$
+ }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.chapter.inbook}
+{ duplicate$ empty$
+ { pop$ "empty chapter in " cite$ * warning$ }
+ { type empty$
+ { "\emph{Kapitel\/} " swap$ tie.or.space.connect }
+ { type " " * swap$ * }%% wenn keine bes. Abschnittsform gen. werden soll,
+ %% koennte e. kl. Zwischenraum gewaehlt werden, z.B. " \, "
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.chapter.pages}
+{ chapter empty$
+ 'format.pages
+ { type empty$
+ { "Kapitel " }
+ { url empty$
+ { type }
+ { "Kapitel " }
+ if$
+ }
+ if$
+ chapter tie.or.space.connect
+ pages empty$
+ 'skip$
+ { ", " * format.pages * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.in.ed.booktitle.din}
+{ booktitle empty$
+ { "" }
+ { editor empty$
+ { volume empty$
+ { "{In: }" booktitle emphasize * }%% n. Belieben fettes In:
+ { "{In: }" booktitle emphasize * %% - " -
+ " Bd." volume tie.or.space.connect *
+ }
+ if$
+ }
+ { volume empty$
+ { "{In: }" format.ed.incoll * ": " * booktitle emphasize * }
+ { "{In: }" format.ed.incoll * ": " * booktitle emphasize *
+ " Bd." volume tie.or.space.connect *
+ }
+ if$
+ }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.thesis.tr.type}
+{ type empty$
+ 'skip$
+ { pop$
+ type
+ }
+ if$
+}
+
+FUNCTION {format.article.crossref}
+{ key empty$
+ { journal empty$
+ { "need key or journal for " cite$ * " to crossref " * crossref *
+ warning$
+ ""
+ }
+ { "{In: }{\emph " journal * "}" * }%% n. Belieben fettes In:
+ if$
+ }
+ { "{In: }" key * }%% s.o. fettes In:
+ if$
+ " {\textbf{\citep{" * crossref * "}" * "}" * "}" * ", " * format.pages *
+}
+
+FUNCTION {format.crossref.editor}
+%vorher,Lue { editor #1 "{vv~}{ll}" format.name$ " (Hrsg.)" *
+ { editor #1 "{ll}" format.name$ " (Hrsg.)" *
+ editor num.names$ duplicate$
+ #2 >
+ { pop$ ua.etal * }
+ { #2 <
+ 'skip$
+ { editor #2 "{ff }{vv }{ll}{ jj}" format.name$ "others" =
+ { ua.etal * }
+ { " ; " * editor #2 "{vv~}{ll}" format.name$ * " (Hrsg.)" * }
+ if$
+ }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.inbk.vol.title}
+{ volume empty$
+ { " In: " }
+ { title empty$
+ { " In: Bd." volume tie.or.space.connect
+ " von " *
+ }
+ { "In: Bd." volume tie.or.space.connect ": " * title emphasize *
+ " (" * year * ") in " *
+ }
+ if$
+ }
+ if$
+ }
+
+FUNCTION {format.book.crossref}
+{ type$ "inbook" =
+ { format.inbk.vol.title }
+ { volume empty$
+ { "empty volume in " cite$ * "'s crossref of " * crossref * warning$
+ " "
+ }
+ { ". -- Bd." volume tie.or.space.connect
+ " von " *
+ }
+ if$
+ }
+ if$
+ editor empty$
+ editor field.or.null author field.or.null =
+ or
+ { key empty$
+ { series empty$
+ { "need editor, key, or series for " cite$ * " to crossref " *
+ crossref * warning$
+ "" *
+ }
+ { "" * }%% dadurch kommt nach der Band Nr. gleich das label 2/6/99
+%% { "{\emph{" * series * "}} {\textbf{siehe}} " * }
+ if$
+ }
+ { key * }
+ if$
+ }
+ { "" * }
+ if$
+ "{\textbf{\citep{" * crossref * "}" * "}" * "}" *
+}
+
+FUNCTION {format.incoll.inproc.crossref}
+{ editor empty$
+ editor field.or.null author field.or.null =
+ or
+ { key empty$
+ { booktitle empty$
+ { "need editor, key, or booktitle for " cite$ * " to crossref " *
+ crossref * warning$
+ ""
+ }
+ { "{In: }{\emph " booktitle * "}" * }%%
+ if$
+ }
+ { "{In: }" }
+ if$
+ }
+ { "{In: }" }
+ if$
+ "{\textbf{\citep{" * crossref * "}" * "}" * "}" * %% ", " * format.pages *
+}
+
+FUNCTION {article}
+{ output.bibitem
+ format.authors "author" output.check
+ set.colon.after
+ format.title "title" output.check
+ crossref missing$
+ { journal article.in.journal output.nonnull
+ new.sentence
+ format.vol.year.num.pages output
+ format.url output
+ }
+ { format.article.crossref output.nonnull }
+ if$
+ format.online.lastcheck
+ doi set.period.dash.check
+ urn set.period.dash.check
+ format.doi.urn output
+ issn set.period.dash.check
+ format.isbn.issn output
+ note set.period.dash.check
+ note output
+ fin.entry
+}
+
+FUNCTION {book}
+{ output.bibitem
+ author empty$
+ { format.editors "author and editor" output.check }
+ { format.authors format.editors output.nonnull }
+ if$
+ set.colon.after
+ crossref missing$
+ { format.btitle.vol "title" output.check }
+ { format.btitle "title" output.check }
+ if$
+ format.edition output
+ format.address.publisher.year "publisher" output.check
+ new.sentence
+ crossref missing$
+ { format.series.number.din output }
+ { format.book.crossref output.nonnull }
+ if$
+ pages empty$
+ { skip$ }
+ { pages set.period.dash.check
+ pages format.bkpages.collat.check output
+ }
+ if$
+ format.doi output
+ format.url output
+ new.block
+ isbn set.period.dash.check
+ format.isbn.issn output
+ note set.period.dash.check
+ note output
+ fin.entry
+}
+
+FUNCTION {booklet}
+{ output.bibitem
+ author empty$
+ { format.editors "author and editor" output.check }
+ { format.authors format.editors output.nonnull }
+ if$
+ set.colon.after
+ format.btitle "title" output.check
+ format.edition.or.version output
+ format.url output
+ format.online.lastcheck
+ format.howpublished output
+ series new.sentence.checka
+ format.series.number.din output
+ pages empty$
+ { skip$ }
+ { pages set.period.dash.check
+ pages format.bkpages.collat.check output
+ }
+ if$
+ type set.period.dash.check
+ format.digital.type output
+ doi set.period.dash.check
+ urn set.period.dash.check
+ format.doi.urn output
+ note set.period.dash.check
+ note output
+ format.isbn.issn output
+ fin.entry
+}
+
+FUNCTION {inbook}
+{ output.bibitem
+ chapter format.chapter.inbook output.nonnull
+ crossref missing$
+ { author empty$
+ { format.editors "\,{In:\,}" swap$ * "author and editor" output.check }
+ { format.authors "\,{In:\,}" swap$ * output.nonnull }
+ if$
+ author empty$ editor empty$ AND
+ { before.all 'output.state := }
+ { set.colon.after }
+ if$
+ format.btitle.vol "title" output.check
+ format.edition output
+ format.address.publisher.year "publisher" output.check
+ new.sentence
+ format.series.number.din output
+ isbn set.period.dash.check
+ format.isbn.issn output
+ }
+ { format.book.crossref output.nonnull
+ }
+ if$
+ part.of.sentence
+ format.pages output
+ note set.period.dash.check
+ note output
+ fin.entry
+}
+
+FUNCTION {incollection}
+{ output.bibitem
+ format.authors "author" output.check
+ set.colon.after
+ format.title "title" output.check
+ format.version.url output
+ type empty$ NOT
+ { type #-1 #4 substring$ "mail" =
+ type #1 #4 substring$ "Mail" =
+ OR
+ 'skip$
+ { format.online.lastcheck }
+ if$
+ }
+ { format.online.lastcheck }
+ if$
+ crossref missing$
+ { format.in.ed.booktitle.din "booktitle" output.check
+ format.edition output
+ format.address.publisher.year "publisher" output.check
+ format.maillist.url output
+ format.maillist.lastcheck
+ new.sentence
+ format.series.number.din output
+ doi set.period.dash.check
+ urn set.period.dash.check
+ format.doi.urn output
+ isbn set.period.dash.check
+ issn set.period.dash.check
+ format.isbn.issn output
+ }
+ { format.incoll.inproc.crossref output.nonnull }
+ if$
+ part.of.sentence
+ format.chapter.pages "pages" output.check
+ note set.period.dash.check
+ note output
+ fin.entry
+}
+
+FUNCTION {inproceedings}
+{ output.bibitem
+ format.authors "author" output.check
+ set.colon.after
+ format.title "title" output.check
+ crossref missing$
+ { format.in.ed.booktitle.din "booktitle" output.check
+ address empty$
+ { organization new.sentence.checka
+ organization output
+ part.of.sentence
+ format.address.publisher.year output
+ }
+ { format.address.publisher.year "publisher" output.check }
+ if$
+ new.sentence
+ format.series.number.din output
+ isbn set.period.dash.check
+ issn set.period.dash.check
+ format.isbn.issn output
+ }
+ { format.incoll.inproc.crossref output.nonnull }
+ if$
+ part.of.sentence
+ format.pages output
+ note set.period.dash.check
+ note output
+ fin.entry
+}
+
+FUNCTION {conference} { inproceedings }%% nach Patashnik, wg US-Kompatibilitaet
+
+FUNCTION {manual}
+{ output.bibitem
+ author empty$
+ { organization empty$
+ { title empty$
+ 'skip$
+ {format.btitle "title" output.check }
+ if$
+ }
+ 'skip$
+ if$
+ }
+ 'skip$
+ if$
+ format.authors.organization output.nonnull
+ set.colon.after
+ format.btitle "title" output.check
+ format.edition "edition" output.check
+ author empty$ organization empty$ AND
+ { address "address" output.check
+ part.of.sentence
+ }
+ { organization empty$
+ { address "address" output.check
+ part.of.sentence
+ }
+ { address ": " * organization * output
+ part.of.sentence
+ }
+ if$
+ }
+ if$
+ format.date output
+ number empty$
+ 'skip$
+ { "(" number * ") " * output }
+ if$
+ pages empty$
+ { skip$ }
+ { pages set.period.dash.check
+ pages format.bkpages.collat.check output
+ }
+ if$
+ format.doi output
+ format.url output
+ format.online.lastcheck
+ note set.period.dash.check
+ note output
+ fin.entry
+}
+
+%% Standard ist "Diplomarbeit", anderes mit TYPE="anderer Typ" erfassen!
+%% z.B. TYPE={Hausarbeit}, TYPE={Diss.}, TYPE={Habil.}, TYPE={Magisterarb.}
+FUNCTION {mastersthesis}
+{ output.bibitem
+ format.authors "author" output.check
+ set.colon.after
+ format.btitle "title" output.check
+ address output
+ part.of.sentence
+ school "school" output.check
+ part.of.sentence
+ "Diplomarbeit" format.thesis.tr.type output.nonnull
+ part.of.sentence
+ format.date "year" output.check
+ format.url output
+ format.online.lastcheck
+ doi set.period.dash.check
+ urn set.period.dash.check
+ format.doi.urn output
+ pages empty$
+ { skip$ }
+ { pages set.period.dash.check
+ pages format.bkpages.collat.check output
+ }
+ if$
+ note set.period.dash.check
+ note output
+ fin.entry
+}
+
+FUNCTION {phdthesis} %% {mastersthesis}% ist identisch bis auf Standardwert, s.o.
+{ output.bibitem
+ format.authors "author" output.check
+ set.colon.after
+ format.btitle "title" output.check
+ address output
+ part.of.sentence
+ school "school" output.check
+ part.of.sentence
+ "Diss." format.thesis.tr.type output.nonnull % koennte auch `Dissertation' sein
+ part.of.sentence
+ format.date "year" output.check
+ format.url output
+ format.online.lastcheck
+ doi set.period.dash.check
+ urn set.period.dash.check
+ format.doi.urn output
+ pages empty$
+ { skip$ }
+ { pages set.period.dash.check
+ pages format.bkpages.collat.check output
+ }
+ if$
+ note set.period.dash.check
+ note output
+ fin.entry
+}
+
+
+%% Normen, Vornormen, Schutzrechte (Patente) werden hiermit erfasst;
+%% E-mail, (auch Internetressourcen moeglich; besser --> booklet-Fkt!)
+%% das type-Feld uebernimmt eine wichtige Steuerfunktion:
+FUNCTION {misc}
+{ output.bibitem
+ type missing$ not
+ { type duplicate$ #1 #4 substring$ "Norm" =
+ type #1 #4 substring$ "Vorn" = OR
+ { " " *
+ format.number * output
+ new.sentence
+ format.date output
+ title empty$
+ { skip$ }
+ { add.period$ new.sentence }
+ if$
+ format.btitle "title" output.check
+ note set.period.dash.check
+ note output
+ }
+ { duplicate$ #1 #6 substring$ "Schutz" =
+ { " " * format.number * output
+ new.sentence
+ "(" * format.date ")" * output
+ add.period$ new.sentence
+ format.authors.organization add.period$ output
+ note output
+ }
+ %% wenn irgendein anderer Typ eingetragen ist
+ { pop$ pop$ ""
+ title empty$
+ { note empty$
+ { url empty$
+ { "there's no relevant field in " cite$ warning$
+ pop$ ""
+ }
+ { format.url output }%%%
+ if$
+ }
+ { note " " * output.nonnull }
+ if$
+ }
+ { author empty$
+ { editor empty$
+ { organization empty$
+ { skip$ }
+ { format.editors.organization output.nonnull
+ set.colon.after
+ }
+ if$
+ }
+ { format.editors format.editors.organization
+ output.nonnull set.colon.after
+ }
+ if$
+ }
+ { format.authors format.editors output.nonnull
+ set.colon.after
+ }
+ if$
+ format.btitle output.nonnull
+ url empty$
+ { format.edition output
+ format.howpublished output}
+ { format.howpublished output
+ format.edition.or.version output
+ format.url output
+ }
+ if$
+ format.online.lastcheck
+ new.sentence
+ format.misc.series output
+ note set.period.dash.check
+ note output
+ }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ %% wenn es keinen type gibt
+ { title empty$
+ { note empty$
+ { url empty$
+ { "there's no relevant field in " cite$ warning$
+ pop$ ""
+ }
+ { format.url output }%%% das waere e. reine URL
+ if$
+ }
+ { note " " * output.nonnull
+ }
+ if$
+ }
+ { author empty$
+ { editor empty$
+ { organization empty$
+ 'skip$
+ { format.editors.organization output.nonnull
+ set.colon.after
+ }
+ if$
+ }
+ { format.editors format.editors.organization
+ output.nonnull set.colon.after
+ }
+ if$
+ }
+ { format.authors format.editors output.nonnull
+ set.colon.after
+ }
+ if$
+ format.btitle output.nonnull
+ url empty$
+ { format.edition output
+ format.howpublished output}
+ { format.howpublished output
+ format.url output
+ format.edition.or.date output
+ format.online.lastcheck
+ }
+ if$
+ new.sentence
+ format.misc.series output
+ note set.period.dash.check
+ note output
+ }
+ if$
+ }
+ if$
+ fin.entry
+}
+
+FUNCTION {proceedings}
+{ output.bibitem
+ editor empty$
+ { organization empty$
+ { "empty organization and editor in " cite$ * warning$ }
+ { organization " (Veranst.)" * output }
+ if$
+ }
+ { format.editors format.editors.organization output.nonnull }
+ if$
+ set.colon.after
+ format.btitle "title" output.check
+ volume empty$
+ 'skip$
+ { "{\textnormal{Bd.}}" volume tie.or.space.connect emphasize "volume" output.check }
+ if$
+ format.address.publisher.year "publisher" output.check
+ new.sentence
+ format.series.number.din output.nonnull
+ pages empty$
+ { skip$ }
+ { pages set.period.dash.check
+ pages format.bkpages.collat.check output
+ }
+ if$
+ isbn set.period.dash.check
+ issn set.period.dash.check
+ format.isbn.issn output
+ note set.period.dash.check
+ note output
+ fin.entry
+}
+
+FUNCTION {techreport}
+{ output.bibitem
+ author empty$
+ { format.editors "author and editor" output.check
+ format.tr.institution output.nonnull }
+ { format.authors format.editors output.nonnull }
+ if$
+ set.colon.after
+ format.title "title" output.check
+ institution empty$
+ 'skip$
+ { author empty$ editor empty$ AND
+ 'skip$
+ { institution new.sentence.checka
+ "/ " institution * output.nonnull
+ }
+ if$
+ }
+ if$
+ format.version.url output
+ format.online.lastcheck
+ format.address.publisher.year output
+ number new.sentence.checka
+ format.tr.series.or.number "number" output.check
+ "Forschungsbericht" format.thesis.tr.type set.period.dash.check
+ "Forschungsbericht" format.thesis.tr.type output
+ pages empty$
+ { skip$ }
+ { pages set.period.dash.check
+ pages format.bkpages.collat.check output
+ }
+ if$
+ isbn set.period.dash.check
+ issn set.period.dash.check
+ format.isbn.issn output
+ note set.period.dash.check
+ note "note" output.check
+ fin.entry
+}
+
+
+FUNCTION {unpublished} {misc}%% author, title, note muessen sein! howpublished
+%% %% entfaellt natuerlich
+
+FUNCTION {default.type} { misc }
+
+MACRO {jan} {"Januar"}
+
+MACRO {feb} {"Februar"}
+
+MACRO {mar} {"M{\^^b a}rz"}
+
+MACRO {apr} {"April"}
+
+MACRO {mai} {"Mai"}
+
+MACRO {may} {"Mai"}
+
+MACRO {jun} {"Juni"}
+
+MACRO {jul} {"Juli"}
+
+MACRO {aug} {"August"}
+
+MACRO {sep} {"September"}
+
+MACRO {okt} {"Oktober"}
+
+MACRO {oct} {"Oktober"}
+
+MACRO {nov} {"November"}
+
+MACRO {dez} {"Dezember"}
+
+MACRO {dec} {"Dezember"}
+
+%%$$$ stillgelegte Beispiele fuer den Gebrauch von Kuerzeln (hier Zs-Titel).
+
+%%MACRO {acmcs} {"ACM Computing Surveys"}
+
+%%MACRO {acta} {"Acta Informatica"}
+
+READ
+
+FUNCTION {sortify}
+{ purify$
+ "l" change.case$
+}
+
+FUNCTION {chop.word}
+{ 's :=
+ 'len :=
+ s #1 len substring$ =
+ { s len #1 + global.max$ substring$ }
+ 's
+ if$
+}
+
+FUNCTION {format.lab.names}
+{ 's :=
+ s #1 "{vv~}{ll}" format.name$
+ s num.names$ duplicate$
+ #2 >
+ { pop$ ua.etal * }
+ { #2 <
+ 'skip$
+ { s #2 "{ff }{vv }{ll}{ jj}" format.name$ "others" =
+ { ua.etal * }
+ { und * s #2 "{vv~}{ll}" format.name$ * }
+ if$
+ }
+ if$
+ }
+ if$
+}
+
+FUNCTION {author.key.label}
+{ author empty$
+ { key empty$
+ { cite$ #1 #3 substring$ }
+ 'key
+ if$
+ }
+ { author format.lab.names }
+ if$
+}
+
+FUNCTION {author.editor.key.label}
+{ author empty$
+ { editor empty$
+ { key empty$
+ { cite$ #1 #3 substring$ }
+ 'key
+ if$
+ }
+ { year empty$
+ 'key
+ { editor format.lab.names }
+ if$
+ }
+ if$
+ }
+ { author format.lab.names }
+ if$
+}
+
+FUNCTION {author.key.organization.label}
+{ author empty$
+ { key empty$
+ { organization empty$
+ { cite$ #1 #3 substring$ }
+ { "The " #4 organization chop.word #3 text.prefix$ }
+ if$
+ }
+ { key }
+ if$
+ }
+ { author format.lab.names }
+ if$
+}
+
+FUNCTION {editor.key.organization.label}
+{ editor empty$
+ { key empty$
+ { organization empty$
+ { cite$ #1 #3 substring$ }
+ { "The " #4 organization chop.word #4 text.prefix$ }
+ if$
+ }
+ { key }
+ if$
+ }
+ { key empty$%% das key-feld soll zwangsweise das label machen!
+ { editor format.lab.names }
+ { key }%%das ganze label
+ if$
+ }
+ if$
+}
+FUNCTION {calc.short.authors}
+{ type$ "book" =
+ type$ "booklet" =
+ type$ "inbook" =
+ or or
+ 'author.editor.key.label
+ { type$ "proceedings" =
+ 'editor.key.organization.label
+ { type$ "manual" =
+ 'author.key.organization.label
+ 'author.key.label
+ if$
+ }
+ if$
+ }
+ if$
+ 'short.list :=
+}
+
+FUNCTION {calc.label}
+{ calc.short.authors
+ short.list
+ "("
+ *
+%% year duplicate$ empty$
+%% short.list key field.or.null = or
+%% { pop$ "" }
+%% 'skip$
+%% if$
+ year field.or.null purify$ #1 #4 substring$
+ *
+ 'label :=
+ short.list " " *
+ year field.or.null purify$ #1 #4 substring$ * 'dinat.label :=
+}
+
+FUNCTION {sort.format.names}
+{ 's :=
+ #1 'nameptr :=
+ ""
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ { nameptr #1 >
+ { " " * }
+ 'skip$
+ if$
+ s nameptr "{ll{ }}{ ff{ }}{ vv{ }}{ jj{ }}" format.name$ 't :=
+ nameptr numnames = t "others" = and
+ { ua.etal * }
+ { t sortify * }
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+}
+
+FUNCTION {sort.format.title}
+{ 't :=
+ "A " #2
+ "An " #3
+ "Der " #4
+ "Die " #4
+ "Das " #4
+ "Ein " #4
+ "Eine " #5
+ "The " #4 t chop.word
+ chop.word
+ chop.word
+ chop.word
+ chop.word
+ chop.word
+ chop.word
+ chop.word
+ sortify
+ #1 global.max$ substring$
+}
+
+FUNCTION {author.sort}
+{ author empty$
+ { key empty$
+ { "to sort, need author or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { author sort.format.names }
+ if$
+}
+
+FUNCTION {author.editor.sort}
+{ author empty$
+ { editor empty$
+ { key empty$
+ { "to sort, need author, editor, or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { editor sort.format.names }
+ if$
+ }
+ { author sort.format.names }
+ if$
+}
+
+FUNCTION {author.organization.sort}
+{ author empty$
+ { organization empty$
+ { key empty$
+ { "to sort, need author, organization, or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { "The " #4 organization chop.word sortify }
+ if$
+ }
+ { author sort.format.names }
+ if$
+}
+
+FUNCTION {editor.organization.sort.PWD}%% so war es in plainnat
+{ editor empty$
+ { organization empty$
+ { key empty$
+ { "to sort, need editor, organization, or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { "The " #4 organization chop.word sortify }
+ if$
+ }
+ { editor sort.format.names }
+ if$
+}
+
+FUNCTION {editor.organization.sort}%%das key-Feld soll z. Sortieren ben. werden
+{ key empty$
+ { editor empty$
+ { organization empty$
+ { "to sort, need editor, organization, or key in " cite$ * warning$
+ ""
+ }
+ { "The " #4 organization chop.word sortify }
+ if$
+ }
+ { editor sort.format.names }
+ if$
+ }
+ { key sortify }
+ if$
+}
+
+FUNCTION {presort}
+{ calc.label
+ label sortify
+ " "
+ *
+ type$ "book" =
+ type$ "booklet" =
+ type$ "inbook" =
+ or or
+ 'author.editor.sort
+ { type$ "proceedings" =
+ 'editor.organization.sort
+ { type$ "manual" =
+ 'author.organization.sort
+ 'author.sort
+ if$
+ }
+ if$
+ }
+ if$
+ " "
+ *
+ year field.or.null sortify
+ *
+ " "
+ *
+ title field.or.null
+ sort.format.title
+ *
+ #1 entry.max$ substring$
+ 'sort.label :=
+ sort.label *
+ #1 entry.max$ substring$
+ 'sort.key$ :=
+}
+
+ITERATE {presort}
+
+SORT
+
+FUNCTION {initialize.longest.label}
+{ "" 'longest.label :=
+ #0 int.to.chr$ 'last.label :=
+ "" 'next.extra :=
+ #0 'longest.label.width :=
+ #0 'last.extra.num :=
+ #0 'number.label :=
+}
+
+FUNCTION {forward.pass}
+{ last.label label =
+ { last.extra.num #1 + 'last.extra.num :=
+ last.extra.num int.to.chr$ 'extra.label :=
+ }
+ { "a" chr.to.int$ 'last.extra.num :=
+ "" 'extra.label :=
+ label 'last.label :=
+ }
+ if$
+ number.label #1 + 'number.label :=
+}
+
+FUNCTION {reverse.pass}
+{ next.extra "b" =
+ { "a" 'extra.label := }
+ 'skip$
+ if$
+ extra.label 'next.extra :=
+ extra.label
+ duplicate$ empty$
+ 'skip$
+ { "{\natexlab{" swap$ * "}}" * }
+ if$
+ 'extra.label :=
+ label extra.label * 'label :=
+ dinat.label extra.label * 'dinat.label :=
+}
+
+EXECUTE {initialize.longest.label}
+
+ITERATE {forward.pass}
+
+REVERSE {reverse.pass}
+
+FUNCTION {bib.sort.order}
+{ sort.label 'sort.key$ :=
+}
+
+ITERATE {bib.sort.order}
+
+SORT
+
+FUNCTION {begin.bib}
+{ preamble$ empty$
+ 'skip$
+ { preamble$ write$ newline$ }
+ if$
+ "\begin{thebibliography}{" number.label int.to.str$ * "}" *
+ write$ newline$ newline$
+ "% this bibliography is generated by nd24.bst [3.0c2] from 2005-12-21"
+ write$ newline$ newline$
+ "\providecommand{\natexlab}[1]{#1}"
+ write$ newline$
+ "\providecommand{\url}[1]{\texttt{#1}}"
+ write$ newline$
+ "\makeatletter"
+ write$ newline$
+ "\newcommand{\dinatlabel}[1]%"
+ write$ newline$
+ "{\ifNAT@numbers\else\NAT@biblabelnum{#1}\fi}"
+ write$ newline$
+ "\makeatother"
+ write$ newline$
+ "\expandafter\ifx\csname urlstyle\endcsname\relax"
+ write$ newline$
+ " \providecommand{\doi}[1]{doi: #1}\else"
+ write$ newline$
+ " \providecommand{\doi}{doi: \begingroup \urlstyle{rm}\Url}\fi"
+ write$ newline$
+}
+
+EXECUTE {begin.bib}
+
+EXECUTE {init.state.consts}
+
+ITERATE {call.type$}
+
+FUNCTION {end.bib}
+{ newline$
+ "\end{thebibliography}" write$ newline$
+}
+
+EXECUTE {end.bib} \ No newline at end of file
diff --git a/biblio/bibtex/contrib/german/din1505/normpatsoft.pdf b/biblio/bibtex/contrib/german/din1505/normpatsoft.pdf
new file mode 100644
index 0000000000..14b0f65cb9
--- /dev/null
+++ b/biblio/bibtex/contrib/german/din1505/normpatsoft.pdf
Binary files differ
diff --git a/biblio/bibtex/contrib/german/din1505/plaindin.bst b/biblio/bibtex/contrib/german/din1505/plaindin.bst
new file mode 100644
index 0000000000..5c6eca0bea
--- /dev/null
+++ b/biblio/bibtex/contrib/german/din1505/plaindin.bst
@@ -0,0 +1,2038 @@
+%% PLAINDIN.BST Ausgabe [8.2] 2006-01-02
+%% mit doi-, urn-, url-Funktionen fuer Internetressourcen
+%% ersetzt PLAINDIN.BST Ausgabe [8.1b3] 22.2.2005
+%%
+%%
+%% K.F.Lorenzen (Copyright 1994-2006) email: lorenzen.marxen@t-online.de
+%% ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+%% PLAINDIN.BST wurde entwickelt aus Oren Patashnik's BibTeX standard
+%% bibliography style `plain'. Dadurch ist es moeglich, eine vorgegebene
+%% Literaturdatenbank ohne Aenderungen beliebig nach Us- oder deutscher
+%% Zitierkonvention zu verarbeiten.
+%% Mit PLAINDIN.BST werden Literaturverzeichnisse gemaess der deutschen
+%% Zitiernorm DIN 1505 Teil 2 formatiert.
+%% Analog zu den 4 US standard styles wird ein vollstaendiger Satz von
+%% 4 DIN-gerechten bst-style Dateien veroeffentlicht (alphadin.bst,
+%% plaindin.bst, unsrtdin.bst, abbrvdin.bst). Die gueltige Version
+%% ist am schnellsten aus dem WWW ueber folgende URL zu beziehen
+%% http://www.haw-hamburg.de/pers/Lorenzen/bibtex/
+%% Stand: 2006-01-02
+%% ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+%% WAS IST PLAINDIN.BST ?
+%% Dieser style produziert Literaturzitate in Literaturverzeichnissen
+%% gemaess der deutschen Norm DIN 1505, Teil 2 vom Jan. 1984.
+%% Die Literaturzitate werden alphabetisch nach Verfassern sortiert
+%% und fortlaufend in eckigen Klammern gezaehlt. Die vorliegenden DIN-styles
+%% gehen ueber die bibliographischen Beschraenkungen der Originalstyles hinaus.
+%
+%% Es werden nun auch Elektronische Online / Offline Ressourcen wie Internet-
+%% quellen, CD-ROM usw. verarbeitet. Dazu kommen besondere Publikationsformen
+%% wie Patente, Normen, Karten, Fernsehaufzeichnungen, Gesetzesstellen, Spiele.
+%
+%% Zur Gewaehrleistung der Allgemeingueltigkeit von bib-files gelten in den
+%% DIN-styles die in der Tex-Literatur veroeffentlichten originalen
+%% Definitionen und Regeln fuer die Publikationstypen (entry-types) und die
+%% bibliographischen Felder (fields).
+%% Treten kleinere "Schoenheitsfehler" im fertig gesetzten output auf,
+%% lassen sich diese so gut wie immer durch eine veraenderte
+%% Erfassung im bib-inputfile beseitigen. Oren Patashnik empfiehlt, die
+%% Definition der Felder weit auszulegen. Last but not least koennen
+%% Sie im output-file < *.bbl > noch letzte Hand zur Korrektur ansetzen.
+%
+%% WARN- UND FEHLERMELDUNGEN
+%% Ursache von Warnmeldungen sind meistens fehlende Felder oder
+%% Erfassungs-"Fehler". Letztere haengen teilweise mit den gegenueber US-
+%% Gepflogenheiten andersartigen bibliographischen Regeln nach DIN 1505
+%% zusammen. Sie sind also in Wahrheit keine "Fehler" und duerfen fast immer
+%% ignoriert werden. Dennoch pruefen Sie diese Warnungen, um heraus zu finden,
+%% ob Publikationstyp (=entry-type) und "fields" eventuell unzulaessig
+%% kombiniert worden sind.
+%% Echte Fehler ("errors") treten nur noch in Verbindung mit falscher
+%% Erfassung auf (nach meinen Tests!). Pruefen Sie die Syntax, den entry-type
+%% und die fields.
+%% Zu guter letzt: Qualitaetsmasstab ist einzig der DIN-konforme output!
+%%
+%% DANKSAGUNG
+%% Hartmut Lueddecke, HAW Hamburg, hat viele Verbesserungsvorschlaege
+%% in die frueheren Versionen eingebracht. Ihm danke ich herzlich.
+%% Patrick W. Daly, dem Entwickler des Natbib-Stils, verdanke ich viele
+%% Anregungen und den steten Ansporn, die DIN-Stile zu verbessern.
+%% Viele an dieser Stelle ungenannt bleibende Anwender haben mich in
+%% den vergangenen Jahren auf Fehler oder Verbesserungsmoeglichkeiten
+%% aufmerksam gemacht und so diesen Stil mitentwickelt. Ihnen gilt mein
+%% besonderer Dank. Ihr Feedback ist immer willkommen und eine Ermunterung.
+%%
+%% Klaus F. Lorenzen
+%%
+%%
+%%
+%% HINWEIS: Neben den vier bibliographischen DIN 1505 Standard-Stilen
+%% nach den Original-styles von Oren Patashnik
+%% gibt es zusaetzlich vier DIN 1505 Modifikationen der style
+%% Emulationen des NATBIB-Pakets von Patrick W.Daly.
+%% In den NATBIB-Modifikationen werden jetzt alle von P.W. Daly
+%% implementierten Zitierweisen des Autor-Jahr-Stils unterstuetzt.
+%% Damit erhaelt der Anwender eine weit ueber die urspruenglichen
+%% Standardstyles hinausreichende Flexibilitaet beim Zitieren.
+%% Naeheres unter URL http://www.haw-hamburg.de/pers/Lorenzen/bibtex/
+%%
+%%
+%% ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+% version 0.99c for BibTeX versions 0.99c or later, LaTeX2e
+% Copyright (C) 1985, all rights reserved.
+% Copying of this file is authorized only if either
+% (1) you make absolutely no changes to your copy, including name, or
+% (2) if you do make changes, you name it something other than
+% plaindin.bst, unsrtdin.bst, alphadin.bst, and abbrvdin.bst.
+% This restriction helps ensure that all standard styles are identical.
+% The file btxbst.doc has the original documentation for style 'alpha'.
+%%
+%% ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+%%
+%% NEUE FELDER
+%% Zur Erfassung der neuen digitalen Online-Medien z.B. Internetquellen, E-journals, E-books,
+%% E-mail u.a. gibt es die zusaetzlichen Felder: doi, url, urn, lastchecked
+%% Internetquellen werden vorzugsweise mit dem BOOKLET-Typ erfasst.
+%% Normen, Patente, Schutzrechte sind mit dem MISC-Typ zu erfassen.
+%
+%
+ENTRY
+ { address %% Verlagsort
+ author %% persoenlicher Urheber eines Werkes
+ booktitle %% a) Gesamttitel eines mehrbaendigen Werkes
+% %% b) Titel des Sammelwerks, das einzelne selbstaendige
+% %% Beitraege mit eigenem Titel enthaelt (->incollection)
+ chapter %% Kapitel in einem Buch (Monographie)
+ doi %%% Digital Object Identifier
+ edition %% Auflagevermerk; bei selbst. elektron. Dok. == Version
+ editor %% Persoenl.Herausgeber oder Koerperschaftlicher Herausgeber
+ howpublished %% beliebiger Verlegervermerk: von wem, wo
+ institution %% Institution, die e.Verlagsfreie Veroeffentlichung betreibt
+ isbn %% Standardnr fuer Buecher
+ issn %% - " - : Zeitschriften u. Serien
+ journal %% Titel einer Zeitschrift
+ key %% Zusaetzlich vergebener Sortierschluessel, mitunter notwend.
+ lastchecked %% Online Abruf einer Internetquelle ( GRAY ); 22.1.2004
+ month %% naehere Bestimmung des Erscheinungsjahres (-> macro 's)
+ note %% freies Eingabefeld fuer zusaetzliche Informationen
+ number %% Mehrfachbedeutung in Abhaengigkeit vom Eingabetyp
+ organization %% a) Name der Organisation/des Organisators e. Tagung,Konferenz
+% %% b) Name einer Firma/Gesellschaft, die ein ->manual herausgab
+ pages %% Umfangsangaben, meist Seitenzahlen
+ publisher %% Verlag
+ school %% Hochschule/Universitaet, die eine Dipl.-Arb./Dissertation veroeff.
+ series %% Titel e.Reihe, in der ein best. Buchtitel erschienen ist
+ title %% Titel einer (namentlich gekennzeichneten) Veroeffentlichung
+ type %% Zusatzfeld z.Kennzeichnung e.besonderen Publikationstyps
+ url %%% Internet-Adresse URL ( Uniform Resource Locator )
+ urn %% Persistent Identifier URN ( Uniform Resource Name )
+ volume %% a) Zaehlung bei einem mehrbaendigen Werk (-> book)
+% %% b) Jahrgang einer Zeitschrift (-> article
+ year %% Erscheinungsjahr
+ }
+ {}
+ { label extra.label sort.label }
+
+%% Variablen-Vereinbarungen
+
+INTEGERS { output.state before.all mid.sentence after.sentence after.block }
+
+INTEGERS { colon.after period.dash }
+
+INTEGERS { after.firstblock }
+
+%% fuer die Namensbehandlung
+
+INTEGERS { zahl lang }
+
+INTEGERS { nameptr namesleft numnames }
+
+INTEGERS { ptr collation collrest }
+
+%% fuer die Sortierung bei der label-Produktion
+INTEGERS { len }
+
+INTEGERS { number.label longest.label.width }
+%%----------------------------------------------------------------------
+
+STRINGS { h s t u v w }
+
+%% bei der Behandlung der Namen-Funktionsbezeichnung (Hrsg., Redakt., usw)
+STRINGS { fkt }
+
+%% fuer die label-Produktion
+STRINGS { longest.label }
+
+%%%----------------------------------------------------------------------------
+% Einige Standardvorgaben, die vom Benutzer veraendert werden koennen.
+%%%----------------------------------------------------------------------------
+
+% Abkuerzung ("... und andere") bei Mehrverfasserquellen:
+
+FUNCTION { ua.etal } { " u.\,a." } %% evtl. auch in eckigen Klammern " [u.\,a.]"
+
+%% oder lateinisch: FUNCTION { ua.etal } { " et~al." }
+
+FUNCTION { und } { " u. " }
+
+%% oder ausgeschrieben: FUNCTION { und } { " und " }
+%
+% Einige elektronische Medien erhalten nach DIN 1505 eine "Ergaenzende Angabe"
+% zusaetzlich zum materiellen Typ, z.B. CD ROM oder DVD u.a.:
+
+FUNCTION { eress } { "Elektronische Ressource" }
+
+%%%-----------------------------------------------------------------------------------
+
+
+FUNCTION {init.state.consts}
+{ #0 'before.all :=
+ #1 'mid.sentence :=
+ #2 'after.sentence :=
+ #3 'after.block :=
+ #4 'colon.after :=
+ #5 'period.dash :=
+ #6 'after.firstblock :=
+}
+
+FUNCTION {output.nonnull}
+{ 's :=
+ output.state after.block =
+ { add.period$ write$
+ newline$
+ "\newblock " write$
+ }
+ { output.state before.all =
+ { write$ }
+ { output.state colon.after =
+ { ": " * write$
+ newline$
+ "\newblock " write$
+ }
+ { output.state period.dash =
+ { ". -- " * write$
+ newline$
+ "\newblock " write$
+ }
+ { output.state mid.sentence =
+ { ", " * write$ }
+ { output.state after.sentence =
+ { " " * write$ }
+ { output.state after.firstblock =
+ { add.period$ write$
+ newline$
+ "\newblock " write$
+ }
+ { write$
+ newline$
+ "\newblock " write$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+ after.block 'output.state :=
+ }
+ if$
+ s
+ }
+
+FUNCTION {output}
+{ duplicate$ empty$
+ 'pop$
+ 'output.nonnull
+ if$
+}
+
+FUNCTION {output.check}
+{ 't :=
+ duplicate$ empty$
+ { pop$ "empty " t * " in " * cite$ * warning$ }
+ 'output.nonnull
+ if$
+}
+
+FUNCTION {new.block}
+{ output.state before.all =
+ 'skip$
+ { after.block 'output.state := }
+ if$
+}
+
+FUNCTION {not}
+{ { #0 }
+ { #1 }
+ if$
+}
+
+FUNCTION {and}
+{ 'skip$
+ { pop$ #0 }
+ if$
+}
+
+FUNCTION {or}
+{ { pop$ #1 }
+ 'skip$
+ if$
+}
+
+
+FUNCTION {output.bibitem}
+{ newline$
+ "\bibitem[" write$
+ label write$%
+ "]{" write$
+ cite$ write$
+ "}" write$
+ newline$
+ ""
+ before.all 'output.state :=
+}
+
+FUNCTION {fin.entry}
+{ write$
+ newline$
+}
+
+FUNCTION {set.period.dash} %% Wenn ein ". - " die Satzteile trennen soll.!
+{ output.state before.all =
+ 'skip$
+ { period.dash 'output.state := }
+ if$
+}
+
+FUNCTION {set.period.dash.check}
+{ empty$
+ 'skip$
+ 'set.period.dash
+ if$
+}
+
+FUNCTION {set.colon.after} %%$$$ Wenn ein ": " d. Satzteile trennen soll!
+{ output.state before.all =
+ 'skip$
+ { colon.after 'output.state := }
+ if$
+}
+
+%% Wenn ein " " die Satzteile trennen soll.!
+FUNCTION {new.sentence}
+{ output.state before.all =
+ 'skip$
+ { after.sentence 'output.state := }
+ if$
+}
+
+%% Wenn ein ", " die Satzteile trennen soll.!
+FUNCTION { part.of.sentence }
+{ output.state before.all =
+ 'skip$
+ { mid.sentence 'output.state := }
+ if$
+}
+
+FUNCTION {new.sentence.checka}
+{ empty$
+ 'skip$
+ 'new.sentence
+ if$
+}
+
+FUNCTION {field.or.null}
+{ duplicate$ empty$
+ { pop$ "" }
+ 'skip$
+ if$
+}
+
+FUNCTION {emphasize}
+{ duplicate$ empty$
+ { pop$ "" }
+ { "\emph{" swap$ * "}" * }
+ if$
+}
+
+FUNCTION { capitalize }
+ { duplicate$ empty$
+ { pop$ "" }
+ { "\textsc{" swap$ * "}" * }
+ if$
+}
+
+FUNCTION {article.in.journal}
+{ duplicate$ empty$
+ { pop$ "" }
+ { author missing$ title missing$ and
+ { emphasize }
+ { emphasize "{In: }" swap$ * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.doi}
+{ doi empty$
+ { "" }
+ { new.block "\url{http://dx.doi.org/" doi * "}" *
+ %% { new.block "\url{http://dx.medra.org/" doi * "}" *
+ }
+ if$
+}
+
+FUNCTION {format.url}
+{ urn missing$
+ { doi missing$
+ { url empty$
+ { "" }
+ { type empty$ NOT
+ { type #-1 #4 substring$ "mail" =
+ type #1 #4 substring$ "Mail" =
+ OR
+ { type$ "incollection" =
+ { "" }
+ { "\,Absenderadresse: \url{" url * "}" * }
+ if$
+ }
+ { "\url{" url * "}" * }%% evtl. "URL" oder "<...>"
+ if$
+ }
+ { "\url{" url * "}" * } %% evtl. "URL" oder "<...>"
+ if$
+ }
+ if$
+ }
+ { format.doi }
+ if$
+ }
+ { "\url{http://nbn-resolving.de/urn/resolver.pl?urn=" urn * "}" *
+ }
+ if$
+}
+
+FUNCTION {format.maillist.url}
+ { url empty$
+ { "" }
+ { type empty$
+ { "" }
+ { type #-1 #4 substring$ "mail" =
+ type #1 #4 substring$ "Mail" =
+ OR
+ { "\url{" url * "}" * }
+ { "" }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+
+%% Adelspraedikate beim Sortieren nach den(m) Vornamen auffuehren
+%% Abweichend v. DIN !!!
+FUNCTION {format.names}
+{ 's :=
+ "" 'u :=
+ #1 'nameptr :=
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ {
+ s nameptr "{ll}" format.name$ 't :=
+ t capitalize 't :=
+ s nameptr "{ jj}" format.name$ 'w :=
+ s nameptr "{, ff}{ vv}{ jj}" format.name$ 'u :=
+ u text.length$ 'lang :=
+ #1 'zahl :=
+ "" 'v :=
+ { zahl lang < }
+ { u zahl #1 substring$ "~" =
+ { v "" =
+ { u #1 zahl #1 - substring$ 'v := }
+ 'skip$
+ if$
+ v u zahl #2 substring$ * "." * w * 'v :=
+ }
+ 'skip$
+ if$
+ zahl #1 + 'zahl := }
+ while$
+ v "" =
+ { u 'v := }
+ 'skip$
+ if$
+ t v * fkt * 't :=
+ nameptr #1 >
+ { namesleft #1 >
+ { " ; " * t * }
+ { numnames #2 >
+ { " " * }
+ 'skip$
+ if$
+ t "\textsc{others}" = t "\textsc{others} (Hrsg.)" = or
+ { ua.etal * }
+ { " ; " * t * }
+ if$
+ }
+ if$ %% Ende der namesleft-Pruefung
+ }
+ 't
+ if$ %% Ende der nameptr-Pruefung
+
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$ %% Ende von { namesleft #0 > } ganz oben
+ "" 'fkt := %% fkt wird zurueckgesetzt
+}
+
+FUNCTION {format.authors}
+{ author empty$
+ { "" }
+ { author format.names }
+ if$
+}
+
+FUNCTION {format.editors}
+{ editor empty$
+ { author empty$
+ { "empty author and editor in " cite$ * warning$ "" }
+ 'skip$
+ if$
+ }
+ { author empty$
+ { " (Hrsg.)" 'fkt :=
+ editor format.names
+ }
+ { " (Hrsg.)" 'fkt :=
+ " ; " * editor format.names *
+ }
+ if$
+ }
+ if$
+ }
+
+FUNCTION { format.authors.organization }
+{ type$ "misc" =
+ { organization empty$
+ { author empty$
+ { "" }
+ { author format.names " (Erfinder)" * }
+ if$
+ }
+ { author empty$
+ { organization }
+ { author format.names " (Erfinder); " *
+ organization * " (Anmelder)" *
+ }
+ if$
+ }
+ if$
+ }
+ { type$ "manual" =
+ { organization empty$
+ { format.authors }
+ { author empty$
+ { organization capitalize " (Hrsg.)" * }
+ { author format.names }
+ if$
+ }
+ if$
+ }
+ 'skip$
+ if$
+ }
+ if$
+}
+
+
+
+FUNCTION { format.editors.organization }
+{ organization empty$
+ 'skip$
+ { type$ "misc" =
+ { organization }
+ { * " ; " * organization " (Veranst.)" *}
+ if$
+ }
+ if$
+}
+
+FUNCTION { format.tr.institution }
+{ institution empty$
+ 'skip$
+ { institution capitalize }
+ if$
+}
+
+FUNCTION {format.ed.incoll}
+{ editor empty$
+ { "" }
+ { " (Hrsg.)" 'fkt :=
+ editor format.names
+ format.editors.organization
+ }
+ if$
+}
+
+
+FUNCTION {format.title}
+{ title empty$
+ { "" }
+ { title } %% Text so wie er dasteht im Feld title
+ if$
+}
+
+FUNCTION {format.number}
+{ number empty$
+ { "" }
+ { number " " * } %% Text so wie er im Feld number steht plus " "
+ if$
+}
+
+FUNCTION {format.digital.type}%% nur in booklet
+{ type empty$
+ { "" }
+ { type #-1 #4 substring$ "mail" =
+ type #1 #4 substring$ "Mail" =
+ OR
+ { "" }
+ { type } %% Typ einer digitalen Ressource in Form einer
+ %% "Ergaenzenden Angabe", so wie er dasteht;
+ %% Alternativ kann dieser Text auch in NOTE erfasst werden.
+ if$
+ }
+ if$
+}
+
+FUNCTION {n.dashify}
+{ 't :=
+ ""
+ { t empty$ not }
+ { t #1 #1 substring$ "-" =
+ { t #1 #2 substring$ "--" = not
+ { "--" *
+ t #2 global.max$ substring$ 't :=
+ }
+ { { t #1 #1 substring$ "-" = }
+ { "-" *
+ t #2 global.max$ substring$ 't :=
+ }
+ while$
+ }
+ if$
+ }
+ { t #1 #1 substring$ *
+ t #2 global.max$ substring$ 't :=
+ }
+ if$
+ }
+ while$
+}
+
+%% Auflagenvermerke gibt man komplett, einschliesslich Abkuerzungen in
+%% das Feld edition ein: ---> EDITION= { 3., erw. und verb. Aufl. }
+%% oder fremdsprachlich: EDITION= { 2nd edition }
+
+FUNCTION {format.edition}
+{ edition empty$
+ { "" }
+ { edition }
+ if$
+}
+
+FUNCTION {format.date}
+{ year duplicate$ empty$
+ { "empty year in " cite$ * warning$
+ pop$ "" }
+ 'skip$
+ if$
+ month empty$
+ 'skip$
+ { type$ "book" =
+ type$ "inbook" =
+ OR
+ 'skip$
+ { month " " * swap$ * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.edition.or.date}
+{ edition empty$ year empty$ and
+ { "" }
+ { edition empty$
+ { type empty$ NOT
+ { type #-1 #4 substring$ "mail" =
+ type #1 #4 substring$ "Mail" =
+ OR
+ { " gesendet: " "-- " type * swap$ *
+ format.date *
+ }
+ { "\,Version:\,"
+ format.date *
+ }
+ if$
+ }
+ { "\,Version:\,"
+ format.date *
+ }
+ if$
+ }
+ { year empty$
+ { "\,Version:\," edition * }
+ { "\,Version:\," edition * ", " *
+ format.date *
+ }
+ if$
+ }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.version.url}
+{ url empty$ doi empty$ urn empty$ and and
+ { type$ "techreport" =
+ { format.edition }
+ { "" }
+ if$
+ }
+ { format.edition.or.date output format.url }
+ if$
+}
+
+FUNCTION {format.edition.or.version}
+{ url empty$ doi empty$ urn empty$ and and
+ { format.edition }
+ { format.edition.or.date }
+ if$
+}
+
+FUNCTION {format.address.publisher.year}
+{ publisher empty$
+ { address empty$
+ { year empty$
+ { "" }
+ { year }
+ if$
+ }
+ { "there's an address but no publisher in " cite$ * warning$
+ address ", " * format.date *
+ }
+ if$
+ }
+ { address empty$
+ { year empty$
+ { "neither address nor publication date in " cite$ * warning$
+ publisher
+ }
+ { publisher ", " * format.date * }
+ if$
+ }
+ { year empty$
+ { address " : " * publisher * }
+ { address " : " * publisher * ", " * format.date * }
+ if$
+ }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.address.publisher.year.alt}
+{ publisher empty$
+ { address empty$
+ { year empty$
+ { "" }
+ { url empty$
+ { year }
+ { "" }
+ if$
+ }
+ if$
+ }
+ { "there's an address but no publisher in " cite$ * warning$
+ address ", " * format.date *
+ }
+ if$
+ }
+ { url empty$%%%% wenn es URL gibt wird nur die service-provider Adresse
+%%% ausgegeben, die im publisher-Feld steht
+ { address empty$
+ { year empty$
+ { "neither address nor publication date in " cite$ * warning$
+ publisher
+ }
+ { publisher ", " * format.date * }
+ if$
+ }
+ { year empty$
+ { address " : " * publisher * }
+ { address " : " * publisher * ", " * format.date * }
+ if$
+ }
+ if$
+ }
+ { publisher }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.howpublished}
+{ url missing$ urn missing$ doi missing$ AND AND
+ { howpublished empty$
+ { address empty$
+ { type empty$
+ { "" }
+ { type #-1 #4 substring$ "mail" =
+ { "(gesendet: " new.sentence
+ format.date * ")" *
+ }
+ { "" }
+ if$
+ }
+ if$
+ format.date *
+ }
+ { address ", " * format.date * }
+ if$
+ }
+ { address empty$
+ { howpublished ", " * format.date * }
+ { address " : " * howpublished * ", " * format.date * }
+ if$
+ }
+ if$
+ }
+ { howpublished empty$
+ { "" }
+ { howpublished }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.lastchecked.or.type}%% nur in misc-Funktion
+{ lastchecked empty$
+ { url empty$ doi empty$ urn empty$ and and
+ { type empty$
+ { skip$ }
+ { type set.period.dash.check
+ type output
+ }
+ if$
+ }
+ { type empty$
+ { skip$ }
+ { type #-1 #4 substring$ "mail" =
+ type #1 #4 substring$ "Mail" =
+ OR
+ { skip$ }
+ { type set.period.dash.check
+ type output }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ { url empty$ doi empty$ urn empty$ and and
+ { "there's a lastchecked date but no url, urn or doi in "
+ cite$ * warning$
+ }
+ { type empty$
+ { "there's a URL and a lastchecked date but no type in "
+ cite$ * warning$
+ }
+ { type set.period.dash.check
+ type output
+ part.of.sentence
+ lastchecked "Abruf: " swap$ * output
+ }
+ if$
+ }
+ if$
+ }
+ if$
+}
+
+
+FUNCTION {format.btitle}
+{ title emphasize
+}
+
+FUNCTION {tie.or.space.connect}
+{ duplicate$ text.length$ #3 <
+ { "~" }
+ { " " }
+ if$
+ swap$ * *
+}
+
+FUNCTION {format.btitle.vol}
+{ number empty$
+ { series empty$
+ { volume empty$
+ { title emphasize }
+ { title emphasize ". Bd." * volume tie.or.space.connect }
+ if$
+ }
+ { volume empty$
+ { title emphasize }%% ein Buch, das zusaetzl. SERIES=Reihentitel besitzt
+ %% jetzt kommt d. Fall des mehrbaendigen Werkes mit Gesamttitel=SERIES
+ %% Zaehlung=VOLUME und Bandtitel=TITLE;
+ { series emphasize ". Bd." * volume tie.or.space.connect
+ ": " * "{\emph{" * title * "}}" * }
+ if$
+ }
+ if$%% series-test
+ }
+ { title emphasize }%% wenn number ex., dann immer title-Feld
+ if$%% Ende number-test
+}
+
+FUNCTION {format.series.number.din}
+{ volume empty$
+ { number empty$
+ { series empty$
+ { "" }
+ { "(" series * ")" * } %% d. Seriennr koennte auch gleich hier
+ %% im SERIES-Feld miterfasst werden
+ if$
+ }
+ { series empty$
+ { "(" number * ")" *
+ "there's a number but no series in " cite$ * warning$
+ }
+ { "(" series * number tie.or.space.connect ")" * }
+ if$
+ }
+ if$
+ }
+ { series empty$
+ { "" }
+ { type$ "proceedings" = %% Sonderfall, es darf VOLUME und NUMBER ex. !
+ type$ "inproceedings" = OR
+ { number empty$
+ { "(" series * ")" * }
+ { "(" series * number tie.or.space.connect ")" * }
+ if$
+ }
+ { "" }%% Ausstieg mit Nullstring, s. Kommentar
+ if$
+ }%% bei gezaehlten Reihen MUSS die Reihennr. im Feld NUMBER stehen!
+ if$ %% wenn also d. Feld VOLUME nicht leer ist, dann liegt ausser bei
+ %% Typ PROCEEDINGS falsche
+ } %% Erfassung vor und es erfolgt d. Ausstieg mit d. Nullstring!
+ if$
+}
+
+FUNCTION {format.tr.series.or.number}
+{ number empty$
+ { series empty$
+ { "" }
+ { "(" series * ")" * }
+ if$
+ }
+ { series empty$
+ { "(" number * ")" * }
+ { "(" series * number tie.or.space.connect ")" * }
+ if$
+ }
+ if$
+ }
+
+FUNCTION {format.misc.series}
+{ series empty$
+ { "" }
+ { "(" series * ")" * }
+ if$
+}
+
+FUNCTION { format.doi.urn }
+{ urn empty$
+ { doi empty$
+ { "" }
+ { "DOI" doi n.dashify tie.or.space.connect }
+ if$
+ }
+ { "URN" urn n.dashify tie.or.space.connect }
+ if$
+}
+
+FUNCTION { format.isbn.issn }
+{ isbn empty$
+ { issn empty$
+ { "" }
+ { "ISSN" issn n.dashify tie.or.space.connect }
+ if$
+ }
+ { "ISBN" isbn n.dashify tie.or.space.connect }
+ if$
+}
+
+FUNCTION {format.pages}
+{ pages empty$
+ { "" }
+ { url empty$
+ { "S." pages n.dashify tie.or.space.connect }
+ { pages }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.pages.book}
+{ pages empty$
+ { "" }
+ { note empty$ isbn empty$ AND
+ { "" pages n.dashify tie.or.space.connect " S" *
+ add.period$ }
+ { "" pages n.dashify tie.or.space.connect " S" * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.pages.bkcollation}
+{ pages empty$
+ { "" }
+ { "" pages n.dashify tie.or.space.connect }
+ if$
+}
+
+FUNCTION {format.bkpages.collat.check}
+{ 's :=
+ #1 'ptr :=
+ s text.length$ 'collation :=
+ collation #1 =
+ { format.pages.book }
+ {
+ collation 'collrest :=
+ { collrest #0 > }
+ { s ptr #2 substring$ 't :=
+ t "S." =
+ { format.pages.bkcollation
+ #0 'collrest := }
+ { ptr #1 + 'ptr :=
+ collrest #1 - 'collrest :=
+ #1 collrest =
+ { format.pages.book }
+ { skip$ }
+ if$
+ }
+ if$
+ }
+ while$
+ }
+ if$
+}
+
+FUNCTION {format.vol.year.num.pages}
+{ volume field.or.null
+ year empty$
+ { "there's no year in " cite$ * warning$ }
+ { " (" year * ")" * * }
+ if$
+ month empty$
+ 'skip$
+ { ", " month * * }
+ if$
+ number empty$
+ 'skip$
+ { ", Nr. " number * * }
+ if$
+ pages empty$
+ 'skip$
+ { duplicate$ empty$
+ { pop$ "" }
+ { title missing$
+ { ", " pages format.bkpages.collat.check * *}
+ { ", " format.pages * *}
+ if$
+ }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.chapter.inbook}
+{ duplicate$ empty$
+ { pop$ "empty chapter in " cite$ * warning$ }
+ { type empty$
+ { "\emph{Kapitel\/} " swap$ tie.or.space.connect }
+ { type " " * swap$ * }%% wenn keine bes. Abschnittsform gen. werden soll,
+ %% koennte e. kl. Zwischenraum gewaehlt werden, z.B. " \, "
+ if$
+ }
+ if$
+ }
+
+FUNCTION {format.chapter.pages}
+{ chapter empty$
+ 'format.pages
+ { type empty$
+ { "Kapitel " }
+ { url empty$
+ { type }
+ { "Kapitel " }
+ if$
+ }
+ if$
+ chapter tie.or.space.connect
+ pages empty$
+ 'skip$
+ { ", " * format.pages * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.in.ed.booktitle.din}
+{ booktitle empty$
+ { "" }
+ { editor empty$
+ { volume empty$
+ { "{In: }" booktitle emphasize * }
+ { "{In: }" booktitle emphasize *
+ " Bd." volume tie.or.space.connect *
+ }
+ if$
+ }
+ { volume empty$
+ { "{In: }" format.ed.incoll * ": " * booktitle emphasize * }
+ { "{In: }" format.ed.incoll * ": " * booktitle emphasize *
+ " Bd." volume tie.or.space.connect *
+ }
+ if$
+ }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.thesis.tr.type}
+{ type empty$
+ 'skip$
+ { pop$
+ type
+ }
+ if$
+}
+
+FUNCTION {format.online.lastcheck}
+{ lastchecked empty$
+ { url empty$ doi empty$ urn empty$ and and
+ { skip$ }
+ { "" output }
+ if$
+ }
+ { url empty$ doi empty$ urn empty$ and and
+ { "there's a lastchecked date but no url, urn or doi in "
+ cite$ * warning$
+ }
+ { part.of.sentence
+ lastchecked "Abruf: " swap$ * output
+ }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.maillist.lastcheck}
+ { type empty$ NOT
+ { type #-1 #4 substring$ "mail" =
+ type #1 #4 substring$ "Mail" =
+ OR
+ { format.online.lastcheck }
+ 'skip$
+ if$
+ }
+ 'skip$
+ if$
+ }
+
+
+
+FUNCTION {format.article.crossref}
+{ key empty$
+ { journal empty$
+ { "need key or journal for " cite$ * " to crossref " * crossref *
+ warning$
+ ""
+ }
+ { "{In: }{\emph " journal * "}" * }
+ if$
+ }
+ { "{In: }" key * }
+ if$
+ "\cite{" * crossref * "}" * ", " * format.pages *
+}
+
+FUNCTION {format.crossref.editor}
+ { editor #1 "{ll}" format.name$ " (Hrsg.)" *
+ editor num.names$ duplicate$
+ #2 >
+ { pop$ ua.etal * }%% --->u. a.
+ { #2 <
+ 'skip$
+ { editor #2 "{ff }{vv }{ll}{ jj}" format.name$ "others" =
+ { ua.etal }
+ { " ; " * editor #2 "{vv~}{ll}" format.name$ * " (Hrsg.)" * }
+ if$
+ }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.inbk.vol.title}
+{ volume empty$
+ { " In: " }
+ { title empty$
+ { " In: Bd." volume tie.or.space.connect
+ " von " *
+ }
+ { "In: Bd." volume tie.or.space.connect ": " * title emphasize *
+ " (" * year * ") in " *
+ }
+ if$
+ }
+ if$
+ }
+
+
+FUNCTION {format.book.crossref}
+{ type$ "inbook" =
+ { format.inbk.vol.title }
+ { volume empty$
+ { "empty volume in " cite$ * "'s crossref of " * crossref * warning$
+ " "
+ }
+ { ". -- Bd." volume tie.or.space.connect
+ " von " *
+ }
+ if$
+ }
+ if$
+ editor empty$
+ editor field.or.null author field.or.null =
+ or
+ { key empty$
+ { series empty$
+ { "need editor, key, or series for " cite$ * " to crossref " *
+ crossref * warning$
+ "" *
+ }
+ { "" * }
+ if$
+ }
+ { key * }
+ if$
+ }
+ { "" * }
+ if$
+ "\cite{" * crossref * "}" *
+}
+
+FUNCTION {format.incoll.inproc.crossref}
+{ editor empty$
+ editor field.or.null author field.or.null =
+ or
+ { key empty$
+ { booktitle empty$
+ { "need editor, key, or booktitle for " cite$ * " to crossref " *
+ crossref * warning$
+ ""
+ }
+ { "{In: }{\emph " booktitle * "}" * }%%
+ if$
+ }
+ { "{In: }" }
+ if$
+ }
+ { "{In: }" }
+ if$
+ "\cite{" * crossref * "}" * %% ", " * format.pages * 5.12.2005
+}
+
+
+FUNCTION {article}
+{ output.bibitem
+ format.authors "author" output.check
+ set.colon.after
+ format.title "title" output.check
+ crossref missing$
+ { journal article.in.journal output.nonnull
+ new.sentence
+ format.vol.year.num.pages output
+ format.url output
+ }
+ { format.article.crossref output.nonnull }
+ if$
+ format.online.lastcheck
+ doi set.period.dash.check
+ urn set.period.dash.check
+ format.doi.urn output
+ issn set.period.dash.check
+ format.isbn.issn output
+ note set.period.dash.check
+ note output
+ fin.entry
+}
+
+FUNCTION {book}
+{ output.bibitem
+ author empty$
+ { format.editors "author and editor" output.check }
+ { format.authors format.editors output.nonnull }
+ if$
+ set.colon.after
+ crossref missing$
+ { format.btitle.vol "title" output.check }
+ { format.btitle "title" output.check }
+ if$
+ format.edition output
+ format.address.publisher.year "publisher" output.check
+ new.sentence
+ crossref missing$
+ { format.series.number.din output }
+ { format.book.crossref output.nonnull }
+ if$
+ pages empty$
+ { skip$ }
+ { pages set.period.dash.check
+ pages format.bkpages.collat.check output
+ }
+ if$
+ format.doi output
+ format.url output
+ new.block
+ isbn set.period.dash.check
+ format.isbn.issn output
+ note set.period.dash.check
+ note output
+ fin.entry
+}
+
+FUNCTION {booklet}
+{ output.bibitem
+ author empty$
+ { format.editors "author and editor" output.check }
+ { format.authors format.editors output.nonnull }
+ if$
+ set.colon.after
+ format.btitle "title" output.check
+ format.edition.or.version output
+ format.url output
+ format.online.lastcheck
+ format.howpublished output
+ series new.sentence.checka
+ format.series.number.din output
+ pages empty$
+ { skip$ }
+ { pages set.period.dash.check
+ pages format.bkpages.collat.check output
+ }
+ if$
+ type set.period.dash.check
+ format.digital.type output
+ doi set.period.dash.check
+ urn set.period.dash.check
+ format.doi.urn output
+ note set.period.dash.check
+ note output
+ format.isbn.issn output
+ fin.entry
+}
+
+
+FUNCTION {inbook}
+{ output.bibitem
+ chapter format.chapter.inbook output.nonnull
+ crossref missing$
+ { author empty$
+ { format.editors "\,{In:\,}" swap$ * "author and editor" output.check }
+ { format.authors "\,{In:\,}" swap$ * output.nonnull }
+ if$
+ author empty$ editor empty$ AND
+ { before.all 'output.state := }
+ { set.colon.after }
+ if$
+ format.btitle.vol "title" output.check
+ format.edition output
+ format.address.publisher.year "publisher" output.check
+ new.sentence
+ format.series.number.din output
+ isbn set.period.dash.check
+ format.isbn.issn output
+ }
+ { format.book.crossref output.nonnull }
+ if$
+ part.of.sentence
+ format.pages output
+ note set.period.dash.check
+ note output
+ fin.entry
+}
+
+FUNCTION {incollection}
+{ output.bibitem
+ format.authors "author" output.check
+ set.colon.after
+ format.title "title" output.check
+ format.version.url output
+ type empty$ NOT
+ { type #-1 #4 substring$ "mail" =
+ type #1 #4 substring$ "Mail" =
+ OR
+ 'skip$
+ { format.online.lastcheck }
+ if$
+ }
+ { format.online.lastcheck }
+ if$
+ crossref missing$
+ { format.in.ed.booktitle.din "booktitle" output.check
+ format.edition output
+ format.address.publisher.year "publisher" output.check
+ format.maillist.url output
+ format.maillist.lastcheck
+ new.sentence
+ format.series.number.din output
+ doi set.period.dash.check
+ urn set.period.dash.check
+ format.doi.urn output
+ isbn set.period.dash.check
+ issn set.period.dash.check
+ format.isbn.issn output
+ }
+ { format.incoll.inproc.crossref output.nonnull }
+ if$
+ part.of.sentence
+ format.chapter.pages "pages" output.check
+ note set.period.dash.check
+ note output
+ fin.entry
+}
+
+
+FUNCTION {inproceedings}
+{ output.bibitem
+ format.authors "author" output.check
+ set.colon.after
+ format.title "title" output.check
+ crossref missing$
+ { format.in.ed.booktitle.din "booktitle" output.check
+ address empty$
+ { organization new.sentence.checka
+ organization output
+ part.of.sentence
+ format.address.publisher.year output
+ }
+ { format.address.publisher.year "publisher" output.check }
+ if$
+ new.sentence
+ series empty$
+ 'skip$
+ { format.series.number.din output }
+ if$
+ isbn set.period.dash.check
+ issn set.period.dash.check
+ format.isbn.issn output
+ }
+ { format.incoll.inproc.crossref output.nonnull }
+ if$
+ part.of.sentence
+ format.pages "pages" output.check
+ note set.period.dash.check
+ note output
+ fin.entry
+}
+
+FUNCTION {conference} { inproceedings }%% nach Patashnik, wg US-Kompatibilitaet
+
+FUNCTION {manual}
+{ output.bibitem
+ author empty$
+ { organization empty$
+ { title empty$
+ 'skip$
+ {format.btitle "title" output.check }
+ if$
+ }
+ 'skip$
+ if$
+ }
+ 'skip$
+ if$
+ format.authors.organization output.nonnull
+ set.colon.after
+ format.btitle "title" output.check
+ format.edition "edition" output.check
+ author empty$ organization empty$ AND
+ { address "address" output.check
+ part.of.sentence
+ }
+ { organization empty$
+ { address "address" output.check
+ part.of.sentence
+ }
+ { address ": " * organization * output
+ part.of.sentence
+ }
+ if$
+ }
+ if$
+ format.date output
+ number empty$
+ 'skip$
+ { "(" number * ") " * output }
+ if$
+ pages empty$
+ { skip$ }
+ { pages set.period.dash.check
+ pages format.bkpages.collat.check output
+ }
+ if$
+ format.doi output
+ format.url output
+ format.online.lastcheck
+ note set.period.dash.check
+ note output
+ fin.entry
+}
+
+%% Standard ist "Diplomarbeit", anderes mit TYPE="anderer Typ" erfassen!
+%% z.B. TYPE={Hausarbeit}, TYPE={Diss.}, TYPE={Habil.}, TYPE={Magisterarb.}
+FUNCTION {mastersthesis}
+{ output.bibitem
+ format.authors "author" output.check
+ set.colon.after
+ format.btitle "title" output.check
+ address output
+ part.of.sentence
+ school "school" output.check
+ part.of.sentence
+ "Diplomarbeit" format.thesis.tr.type output.nonnull
+ part.of.sentence
+ format.date "year" output.check
+ format.url output
+ format.online.lastcheck
+%% format.digital.resource.type
+ doi set.period.dash.check
+ urn set.period.dash.check
+ format.doi.urn output
+%% pages set.period.dash.check
+%% format.pages.book output
+ pages empty$
+ { skip$ }
+ { pages set.period.dash.check
+ pages format.bkpages.collat.check output
+ }
+ if$
+ note set.period.dash.check
+ note output
+ fin.entry
+}
+
+FUNCTION {phdthesis} %% {mastersthesis}% ist identisch bis auf Standardwert, s.o.
+{ output.bibitem
+ format.authors "author" output.check
+ set.colon.after
+ format.btitle "title" output.check
+ address output
+ part.of.sentence
+ school "school" output.check
+ part.of.sentence
+ "Diss." format.thesis.tr.type output.nonnull % koennte auch `Dissertation' sein
+ part.of.sentence
+ format.date "year" output.check
+ format.url output
+ format.online.lastcheck
+%% format.digital.resource.type
+ doi set.period.dash.check
+ urn set.period.dash.check
+ format.doi.urn output
+ pages empty$
+ { skip$ }
+ { pages set.period.dash.check
+ pages format.bkpages.collat.check output
+ }
+ if$
+%% pages set.period.dash.check
+%% format.pages.book output
+ note set.period.dash.check
+ note output
+ fin.entry
+}
+
+
+%% Normen, Vornormen, Schutzrechte (Patente) werden hiermit erfasst;
+%% (z.Zt. auch noch Internetressourcen)
+%% das type-Feld uebernimmt eine wichtige Steuerfunktion:
+FUNCTION {misc}
+{ output.bibitem
+ type missing$ not
+ { type duplicate$ #1 #4 substring$ "Norm" =
+ type #1 #4 substring$ "Vorn" = OR
+ { " " *
+ format.number * output
+ new.sentence
+ format.date output
+ title empty$
+ { skip$ }
+ { add.period$ new.sentence }
+ if$
+ format.btitle "title" output.check
+ note set.period.dash.check
+ note output
+ }
+ { duplicate$ #1 #6 substring$ "Schutz" =
+ { " " * format.number * output
+ new.sentence
+ "(" * format.date ")" * output
+ add.period$ new.sentence
+ format.authors.organization add.period$ output
+ note output
+ }
+ %% wenn irgendein anderer Typ eingetragen ist
+ { pop$ pop$ ""
+ title empty$
+ { note empty$
+ { url empty$
+ { "there's no relevant field in " cite$ warning$
+ pop$ ""
+ }
+ { format.url output }%%%
+ if$
+ }
+ { note " " * output.nonnull }
+ if$
+ }
+ { author empty$
+ { editor empty$
+ { organization empty$
+ { skip$ }
+ { format.editors.organization output.nonnull
+ set.colon.after
+ }
+ if$
+ }
+ { format.editors format.editors.organization
+ output.nonnull set.colon.after
+ }
+ if$
+ }
+ { format.authors format.editors output.nonnull
+ set.colon.after
+ }
+ if$
+ format.btitle output.nonnull
+ url empty$
+ { format.edition output
+ format.howpublished output}
+ { format.howpublished output
+ format.edition.or.date output
+ format.url output
+ }
+ if$
+ format.online.lastcheck
+ new.sentence
+ format.misc.series output
+%% note set.period.dash.check
+ note output
+ }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ %% wenn es keinen type gibt
+ { title empty$
+ { note empty$
+ { url empty$
+ { "there's no relevant field in " cite$ warning$
+ pop$ ""
+ }
+ { format.url output }%%% das waere e. reine URL
+ if$
+ }
+ { note " " * output.nonnull
+ %% format.url format.date output
+ }
+ if$
+ }
+ { author empty$
+ { editor empty$
+ { organization empty$
+ { skip$ }
+ { format.editors.organization output.nonnull
+ set.colon.after
+ }
+ if$
+ }
+ { format.editors format.editors.organization
+ output.nonnull set.colon.after
+ }
+ if$
+ }
+ { format.authors format.editors output.nonnull
+ set.colon.after
+ }
+ if$
+ format.btitle output.nonnull
+ url empty$
+ { format.edition output
+ format.howpublished output}
+ { format.howpublished output
+ format.url output
+ format.edition.or.date output
+ format.online.lastcheck
+ }
+ if$
+ new.sentence
+ format.misc.series output
+ note set.period.dash.check
+ note output
+ }
+ if$
+ }
+ if$
+ fin.entry
+}
+
+FUNCTION {proceedings}
+{ output.bibitem
+ editor empty$
+ { organization empty$
+ { "empty organization and editor in " cite$ * warning$ }
+ { organization " (Veranst.)" * output }
+ if$
+ }
+ { format.editors format.editors.organization output.nonnull }
+ if$
+ set.colon.after
+ format.btitle "title" output.check
+ volume empty$
+ { skip$ }
+ { "{\textnormal{Bd.}}" volume tie.or.space.connect emphasize "volume" output.check }
+ if$
+ format.address.publisher.year "publisher" output.check
+ new.sentence
+ format.series.number.din output.nonnull
+ pages empty$
+ { skip$ }
+ { pages set.period.dash.check
+ pages format.bkpages.collat.check output
+ }
+ if$
+ isbn set.period.dash.check
+ issn set.period.dash.check
+ format.isbn.issn output
+ note set.period.dash.check
+ note output
+ fin.entry
+}
+
+FUNCTION {techreport}
+{ output.bibitem
+ author empty$
+ { format.editors "author and editor" output.check
+ format.tr.institution output.nonnull }
+ { format.authors format.editors output.nonnull }
+ if$
+ set.colon.after
+ format.title "title" output.check
+ institution empty$
+ 'skip$
+ { author empty$ editor empty$ AND
+ 'skip$
+ { institution new.sentence.checka
+ "/ " institution * output.nonnull
+ }
+ if$
+ }
+ if$
+ format.version.url output
+ format.online.lastcheck
+ format.address.publisher.year output
+ number new.sentence.checka
+ format.tr.series.or.number "number" output.check
+ "Forschungsbericht" format.thesis.tr.type set.period.dash.check
+ "Forschungsbericht" format.thesis.tr.type output
+%% format.digital.resource.type
+ pages empty$
+ { skip$ }
+ { pages set.period.dash.check
+ pages format.bkpages.collat.check output
+ }
+ if$
+ isbn set.period.dash.check
+ issn set.period.dash.check
+ format.isbn.issn output
+ note set.period.dash.check
+ note "note" output.check
+ fin.entry
+}
+
+
+FUNCTION {unpublished} {misc}%% AUTHOR, TITLE, NOTE muessen sein!
+%% andere Felder sind optional
+
+FUNCTION {default.type} { misc }
+
+
+MACRO {jan} {"Januar"}
+
+MACRO {feb} {"Februar"}
+
+MACRO {mar} {"M{\^^b a}rz"}
+
+MACRO {apr} {"April"}
+
+MACRO {mai} {"Mai"}
+
+MACRO {may} {"Mai"}
+
+MACRO {jun} {"Juni"}
+
+MACRO {jul} {"Juli"}
+
+MACRO {aug} {"August"}
+
+MACRO {sep} {"September"}
+
+MACRO {okt} {"Oktober"}
+
+MACRO {oct} {"Oktober"}
+
+MACRO {nov} {"November"}
+
+MACRO {dez} {"Dezember"}
+
+MACRO {dec} {"Dezember"}
+
+%%$$$ stillgelegte Beispiele fuer den Gebrauch von Kuerzeln (hier Zs-Titel).
+
+%%MACRO {acmcs} {"ACM Computing Surveys"}
+
+%%MACRO {acta} {"Acta Informatica"}
+
+READ
+
+FUNCTION {sortify}
+{ purify$
+ "l" change.case$
+}
+
+FUNCTION {chop.word}
+{ 's :=
+ 'len :=
+ s #1 len substring$ =
+ { s len #1 + global.max$ substring$ }
+ 's
+ if$
+}
+
+FUNCTION {sort.format.names}
+{ 's :=
+ #1 'nameptr :=
+ ""
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ { nameptr #1 >
+ { " " * }
+ 'skip$
+ if$
+ s nameptr "{ll{ }}{ ff{ }}{ vv{ }}{ jj{ }}" format.name$ 't :=
+ nameptr numnames = t "others" = and
+ { ua.etal * }
+ { t sortify * }
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+}
+
+FUNCTION {sort.format.title}
+{ 't :=
+ "A " #2
+ "An " #3
+ "Der " #4
+ "Die " #4
+ "Das " #4
+ "Ein " #4
+ "Eine " #5
+ "The " #4 t chop.word
+ chop.word
+ chop.word
+ chop.word
+ chop.word
+ chop.word
+ chop.word
+ chop.word
+ sortify
+ #1 global.max$ substring$
+}
+
+FUNCTION {author.sort}
+{ author empty$
+ { key empty$
+ { "to sort, need author or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { author sort.format.names }
+ if$
+}
+
+FUNCTION {author.editor.sort}
+{ author empty$
+ { editor empty$
+ { key empty$
+ { "to sort, need author, editor, or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { editor sort.format.names }
+ if$
+ }
+ { author sort.format.names }
+ if$
+}
+
+FUNCTION {author.organization.sort}
+{ author empty$
+ { organization empty$
+ { key empty$
+ { "to sort, need author, organization, or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { "The " #4 organization chop.word sortify }
+ if$
+ }
+ { author sort.format.names }
+ if$
+}
+
+FUNCTION {editor.organization.sort}
+{ editor empty$
+ { organization empty$
+ { key empty$
+ { "to sort, need editor, organization, or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { "The " #4 organization chop.word sortify }
+ if$
+ }
+ { editor sort.format.names }
+ if$
+}
+
+FUNCTION {presort}
+{ type$ "book" =
+ type$ "inbook" =
+ or
+ 'author.editor.sort
+ { type$ "proceedings" =
+ 'editor.organization.sort
+ { type$ "manual" =
+ 'author.organization.sort
+ 'author.sort
+ if$
+ }
+ if$
+ }
+ if$
+ " "
+ *
+ year field.or.null sortify
+ *
+ " "
+ *
+ title field.or.null
+ sort.format.title
+ *
+ #1 entry.max$ substring$
+ 'sort.key$ :=
+}
+
+ITERATE {presort}
+
+SORT
+
+FUNCTION {initialize.longest.label}%% nicht identisch mit der Fkt.im ALPHA-Stil
+{ "" 'longest.label :=
+ #1 'number.label :=
+ #0 'longest.label.width :=
+}
+
+FUNCTION {longest.label.pass}
+{ number.label int.to.str$ 'label :=
+ number.label #1 + 'number.label :=
+ label width$ longest.label.width >
+ { label 'longest.label :=
+ label width$ 'longest.label.width :=
+ }
+ 'skip$
+ if$
+}
+
+EXECUTE { initialize.longest.label }
+
+ITERATE { longest.label.pass }
+
+FUNCTION {begin.bib}
+{ preamble$ empty$
+ 'skip$
+ { preamble$ write$ newline$ }
+ if$
+ "\begin{thebibliography}{" longest.label * "}" * write$ newline$
+ newline$
+ "% this bibliography is generated by plaindin.bst [8.2] from 2005-12-21"
+ write$ newline$ newline$
+ "\providecommand{\url}[1]{\texttt{#1}}"
+ write$ newline$
+ "\expandafter\ifx\csname urlstyle\endcsname\relax"
+ write$ newline$
+ " \providecommand{\doi}[1]{doi: #1}\else"
+ write$ newline$
+ " \providecommand{\doi}{doi: \begingroup \urlstyle{rm}\Url}\fi"
+ write$ newline$
+}
+
+EXECUTE {begin.bib}
+
+EXECUTE {init.state.consts}
+
+ITERATE {call.type$}
+
+FUNCTION {end.bib}
+{ newline$
+ "\end{thebibliography}" write$ newline$
+}
+
+EXECUTE {end.bib} \ No newline at end of file
diff --git a/biblio/bibtex/contrib/german/din1505/unsrtdin.bst b/biblio/bibtex/contrib/german/din1505/unsrtdin.bst
new file mode 100644
index 0000000000..5505961b70
--- /dev/null
+++ b/biblio/bibtex/contrib/german/din1505/unsrtdin.bst
@@ -0,0 +1,1894 @@
+%% UNSRTDIN.BST Ausgabe [8.2] 2006-01-02
+%% mit doi-, urn-, url-Funktionen
+%% ersetzt UNSRTDIN.BST Ausgabe [8.1b3] 22.2.2005
+%% ersetzt UNSRTDIN.BST Ausgabe [7] 16/6/99
+%%
+%% K.F.Lorenzen (Copyright 1994-2006) email: lorenzen.marxen@t-online.de
+%% ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+%% UNSRTDIN.BST wurde entwickelt aus BibTeX standard bibliography style
+%% `unsrt'.Mit UNSRTDIN.BST werden Literaturverzeichnisse gemaess der deutschen
+%% Zitiernorm DIN 1505 Teil 2 formatiert.
+%% Analog zu den 4 US standard styles wird ein vollstaendiger Satz von
+%% 4 DIN-gerechten bst-style Dateien veroeffentlicht (alphadin.bst,
+%% plaindin.bst, unsrtdin.bst, abbrvdin.bst). Die gueltige Version
+%% ist am schnellsten aus dem WWW ueber folgende URL zu beziehen
+%% http://www.haw-hamburg.de/pers/Lorenzen/bibtex/
+%% Stand: 2006-01-02
+%% ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+%% WAS IST UNSRTDIN.BST ?
+%% Dieser style produziert Literaturzitate in Literaturverzeichnissen
+%% gemaess der deutschen Norm DIN 1505, Teil 2 vom Jan. 1984.
+%% Die Reihenfolge der Zitate im Text bestimmt die Reihenfolge im
+%% Literaturverzeichnis, das somit unsortiert ist. Form und Gestaltung
+%% entsprechen der von plaindin.bst. Die label im Literaturverzeichnis sowie
+%% im Text sind Nummern in eckigen Klammern. Die vorliegenden DIN-styles
+%% gehen ueber die bibliographischen Beschraenkungen der Originalstyles hinaus.
+%
+%% Es werden nun auch Elektronische Online / Offline Ressourcen wie Internet-
+%% quellen, CD-ROM usw. verarbeitet. Dazu kommen besondere Publikationsformen
+%% wie Patente, Normen, Karten, Fernsehaufzeichnungen, Gesetzesstellen, Spiele.
+%
+%% Zur Gewaehrleistung der Allgemeingueltigkeit von bib-files gelten in den
+%% DIN-styles die in der Tex-Literatur veroeffentlichten originalen
+%% Definitionen und Regeln fuer die Publikationstypen (entry-types) und die
+%% bibliographischen Felder (fields).
+%% Treten kleinere "Schoenheitsfehler" im fertig gesetzten output auf,
+%% lassen sich diese so gut wie immer durch eine veraenderte
+%% Erfassung im bib-inputfile beseitigen. Oren Patashnik empfiehlt, die
+%% Definition der Felder weit auszulegen. Last but not least koennen
+%% Sie im output-file < *.bbl > noch letzte Hand zur Korrektur ansetzen.
+%
+%% WARN- UND FEHLERMELDUNGEN
+%% Ursache von Warnmeldungen sind meistens ausgelassene Felder oder
+%% Erfassungs-"Fehler". Letztere haengen teilweise mit den gegenueber US-
+%% Gepflogenheiten andersartigen bibliographischen Regeln nach DIN 1505
+%% zusammen. Sie sind also in Wahrheit keine "Fehler" und duerfen fast immer
+%% ignoriert werden. Dennoch pruefen Sie diese Warnungen, um heraus zu finden,
+%% ob Publikationstyp (=entry-type) und "fields" eventuell unzulaessig
+%% kombiniert worden sind.
+%% Echte Fehler ("errors") treten nur noch in Verbindung mit falscher
+%% Erfassung auf (nach meinen Tests!). Pruefen Sie die Syntax, den entry-type
+%% und die fields.
+%% Zu guter letzt: Qualitaetsmasstab ist einzig der DIN-konforme output!
+%%
+%% DANKSAGUNG
+%% Hartmut Lueddecke, HAW Hamburg, hat viele Verbesserungsvorschlaege
+%% in die frueheren Versionen eingebracht. Ihm danke ich herzlich.
+%% Patrick W. Daly, dem Entwickler des Natbib-Stils, verdanke ich viele
+%% Anregungen und den steten Ansporn, die DIN-Stile zu verbessern.
+%% Viele an dieser Stelle ungenannt bleibende Anwender haben mich in
+%% den vergangenen Jahren auf Fehler oder Verbesserungsmoeglichkeiten
+%% aufmerksam gemacht und so diesen Stil mitentwickelt. Ihnen gilt mein
+%% besonderer Dank. Ihr Feedback ist immer willkommen und eine Ermunterung.
+%%
+%% Klaus F. Lorenzen
+%%
+%%
+%%
+%% HINWEIS: Neben den vier bibliographischen DIN 1505 Standard-Stilen
+%% nach den Original-styles von Oren Patashnik
+%% gibt es zusaetzlich vier DIN 1505 Modifikationen der style
+%% Emulationen des NATBIB-Pakets von Patrick W.Daly.
+%% In den NATBIB-Modifikationen werden jetzt alle von P.W. Daly
+%% implementierten Zitierweisen des Autor-Jahr-Stils unterstuetzt.
+%% Damit erhaelt der Anwender eine weit ueber die urspruenglichen
+%% Standardstyles hinausreichende Flexibilitaet beim Zitieren.
+%% Naeheres unter URL http://www.haw-hamburg.de/pers/Lorenzen/bibtex/
+%%
+%%
+%% ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+% version 0.99c for BibTeX versions 0.99c or later, LaTeX2e
+% Copyright (C) 1985, all rights reserved.
+% Copying of this file is authorized only if either
+% (1) you make absolutely no changes to your copy, including name, or
+% (2) if you do make changes, you name it something other than
+% plaindin.bst, unsrtdin.bst, alphadin.bst, and abbrvdin.bst.
+% This restriction helps ensure that all standard styles are identical.
+% The file btxbst.doc has the original documentation for style 'alpha'.
+%%
+%% ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+%%
+%% NEUE FELDER
+%% Zur Erfassung der neuen digitalen Online-Medien z.B. Internetquellen, E-journals, E-books,
+%% E-mail u.a. gibt es die zusaetzlichen Felder: doi, url, urn, lastchecked
+%% Internetquellen werden vorzugsweise mit dem BOOKLET-Typ erfasst.
+%% Normen, Patente, Schutzrechte sind mit dem MISC-Typ zu erfassen.
+%
+%
+ENTRY
+ { address %% Verlagsort
+ author %% persoenlicher Urheber eines Werkes
+ booktitle %% a) Gesamttitel eines mehrbaendigen Werkes
+% %% b) Titel des Sammelwerks, das einzelne selbstaendige
+% %% Beitraege mit eigenem Titel enthaelt (->incollection)
+ chapter %% Kapitel in einem Buch (Monographie)
+ doi %%% Digital Object Identifier
+ edition %% Auflagevermerk; bei selbst. elektron. Dok. == Version
+ editor %% Persoenl.Herausgeber oder Koerperschaftlicher Herausgeber
+ howpublished %% beliebiger Verlegervermerk: von wem, wo
+ institution %% Institution, die e.Verlagsfreie Veroeffentlichung betreibt
+ isbn %% Standardnr fuer Buecher
+ issn %% - " - : Zeitschriften u. Serien
+ journal %% Titel einer Zeitschrift
+ key %% Zusaetzlich vergebener Sortierschluessel, mitunter notwend.
+ lastchecked %% Online Abruf einer Internetquelle ( GRAY ); 22.1.2004
+ month %% naehere Bestimmung des Erscheinungsjahres (-> macro 's)
+ note %% freies Eingabefeld fuer zusaetzliche Informationen
+ number %% Mehrfachbedeutung in Abhaengigkeit vom Eingabetyp
+ organization %% a) Name der Organisation/des Organisators e. Tagung,Konferenz
+% %% b) Name einer Firma/Gesellschaft, die ein ->manual herausgab
+ pages %% Umfangsangaben, meist Seitenzahlen
+ publisher %% Verlag
+ school %% Hochschule/Universitaet, die eine Dipl.-Arb./Dissertation veroeff.
+ series %% Titel e.Reihe, in der ein best. Buchtitel erschienen ist
+ title %% Titel einer (namentlich gekennzeichneten) Veroeffentlichung
+ type %% Zusatzfeld z.Kennzeichnung e.besonderen Publikationstyps
+ url %%% Internet-Adresse URL ( Uniform Resource Locator )
+ urn %% Persistent Identifier URN ( Uniform Resource Name )
+ volume %% a) Zaehlung bei einem mehrbaendigen Werk (-> book)
+% %% b) Jahrgang einer Zeitschrift (-> article
+ year %% Erscheinungsjahr
+ }
+ {}
+ { label }
+
+%% Variablen-Vereinbarungen
+
+INTEGERS { output.state before.all mid.sentence after.sentence after.block }
+
+INTEGERS { colon.after period.dash }
+
+INTEGERS { after.firstblock }
+
+%% fuer die Namensbehandlung
+
+INTEGERS { zahl lang }
+
+INTEGERS { nameptr namesleft numnames }
+
+INTEGERS { ptr collation collrest }
+
+%% fuer die Sortierung bei der label-Produktion
+INTEGERS { len }
+
+INTEGERS { number.label longest.label.width }
+%%----------------------------------------------------------------------
+
+STRINGS { h s t u v w }
+
+%% bei der Behandlung der Namen-Funktionsbezeichnung (Hrsg., Redakt., usw)
+STRINGS { fkt }
+
+%% fuer die label-Produktion
+STRINGS { longest.label }
+
+%%%----------------------------------------------------------------------------
+% Einige Standardvorgaben, die vom Benutzer veraendert werden koennen.
+%%%----------------------------------------------------------------------------
+
+% Abkuerzung ("... und andere") bei Mehrverfasserquellen:
+
+FUNCTION { ua.etal } { " u.\,a." } %% evtl. auch in eckigen Klammern " [u.\,a.]"
+
+%% oder lateinisch: FUNCTION { ua.etal } { " et~al." }
+
+FUNCTION { und } { " u. " }
+
+%% oder ausgeschrieben: FUNCTION { und } { " und " }
+%
+% Einige elektronische Medien erhalten nach DIN 1505 eine "Ergaenzende Angabe"
+% zusaetzlich zum materiellen Typ, z.B. CD ROM oder DVD u.a.:
+
+FUNCTION { eress } { "Elektronische Ressource" }
+
+%%%-----------------------------------------------------------------------------------
+
+
+FUNCTION {init.state.consts}
+{ #0 'before.all :=
+ #1 'mid.sentence :=
+ #2 'after.sentence :=
+ #3 'after.block :=
+ #4 'colon.after :=
+ #5 'period.dash :=
+ #6 'after.firstblock :=
+}
+
+FUNCTION {output.nonnull}
+{ 's :=
+ output.state after.block =
+ { add.period$ write$
+ newline$
+ "\newblock " write$
+ }
+ { output.state before.all =
+ { write$ }
+ { output.state colon.after =
+ { ": " * write$
+ newline$
+ "\newblock " write$
+ }
+ { output.state period.dash =
+ { ". -- " * write$
+ newline$
+ "\newblock " write$
+ }
+ { output.state mid.sentence =
+ { ", " * write$ }
+ { output.state after.sentence =
+ { " " * write$ }
+ { output.state after.firstblock =
+ { add.period$ write$
+ newline$
+ "\newblock " write$
+ }
+ { write$
+ newline$
+ "\newblock " write$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+ after.block 'output.state :=
+ }
+ if$
+ s
+ }
+
+FUNCTION {output}
+{ duplicate$ empty$
+ 'pop$
+ 'output.nonnull
+ if$
+}
+
+FUNCTION {output.check}
+{ 't :=
+ duplicate$ empty$
+ { pop$ "empty " t * " in " * cite$ * warning$ }
+ 'output.nonnull
+ if$
+}
+
+FUNCTION {new.block}
+{ output.state before.all =
+ 'skip$
+ { after.block 'output.state := }
+ if$
+}
+
+FUNCTION {not}
+{ { #0 }
+ { #1 }
+ if$
+}
+
+FUNCTION {and}
+{ 'skip$
+ { pop$ #0 }
+ if$
+}
+
+FUNCTION {or}
+{ { pop$ #1 }
+ 'skip$
+ if$
+}
+
+
+FUNCTION {output.bibitem}
+{ newline$
+ "\bibitem[" write$
+ label write$%
+ "]{" write$
+ cite$ write$
+ "}" write$
+ newline$
+ ""
+ before.all 'output.state :=
+}
+
+FUNCTION {fin.entry}
+{ write$
+ newline$
+}
+
+FUNCTION {set.period.dash} %% Wenn ein ". - " die Satzteile trennen soll.!
+{ output.state before.all =
+ 'skip$
+ { period.dash 'output.state := }
+ if$
+}
+
+FUNCTION {set.period.dash.check}
+{ empty$
+ 'skip$
+ 'set.period.dash
+ if$
+}
+
+FUNCTION {set.colon.after} %%$$$ Wenn ein ": " d. Satzteile trennen soll!
+{ output.state before.all =
+ 'skip$
+ { colon.after 'output.state := }
+ if$
+}
+
+%% Wenn ein " " die Satzteile trennen soll.!
+FUNCTION {new.sentence}
+{ output.state before.all =
+ 'skip$
+ { after.sentence 'output.state := }
+ if$
+}
+
+%% Wenn ein ", " die Satzteile trennen soll.!
+FUNCTION { part.of.sentence }
+{ output.state before.all =
+ 'skip$
+ { mid.sentence 'output.state := }
+ if$
+}
+
+FUNCTION {new.sentence.checka}
+{ empty$
+ 'skip$
+ 'new.sentence
+ if$
+}
+
+FUNCTION {field.or.null}
+{ duplicate$ empty$
+ { pop$ "" }
+ 'skip$
+ if$
+}
+
+FUNCTION {emphasize}
+{ duplicate$ empty$
+ { pop$ "" }
+ { "\emph{" swap$ * "}" * }
+ if$
+}
+
+FUNCTION { capitalize }
+ { duplicate$ empty$
+ { pop$ "" }
+ { "\textsc{" swap$ * "}" * }
+ if$
+}
+
+FUNCTION {article.in.journal}
+{ duplicate$ empty$
+ { pop$ "" }
+ { author missing$ title missing$ and
+ { emphasize }
+ { emphasize "{In: }" swap$ * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.doi}
+{ doi empty$
+ { "" }
+ { new.block "\url{http://dx.doi.org/" doi * "}" *
+ %% { new.block "\url{http://dx.medra.org/" doi * "}" *
+ }
+ if$
+}
+
+FUNCTION {format.url}
+{ urn missing$
+ { doi missing$
+ { url empty$
+ { "" }
+ { type empty$ NOT
+ { type #-1 #4 substring$ "mail" =
+ type #1 #4 substring$ "Mail" =
+ OR
+ { type$ "incollection" =
+ { "" }
+ { "\,Absenderadresse: \url{" url * "}" * }
+ if$
+ }
+ { "\url{" url * "}" * }%% evtl. "URL" oder "<...>"
+ if$
+ }
+ { "\url{" url * "}" * } %% evtl. "URL" oder "<...>"
+ if$
+ }
+ if$
+ }
+ { format.doi }
+ if$
+ }
+ { "\url{http://nbn-resolving.de/urn/resolver.pl?urn=" urn * "}" *
+ }
+ if$
+}
+
+FUNCTION {format.maillist.url}
+ { url empty$
+ { "" }
+ { type empty$
+ { "" }
+ { type #-1 #4 substring$ "mail" =
+ type #1 #4 substring$ "Mail" =
+ OR
+ { "\url{" url * "}" * }
+ { "" }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+
+
+
+%% Adelspraedikate beim Sortieren nach den(m) Vornamen auffuehren
+%% Abweichend v. DIN !!!
+FUNCTION {format.names}
+{ 's :=
+ "" 'u :=
+ #1 'nameptr :=
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ {
+ s nameptr "{ll}" format.name$ 't :=
+ t capitalize 't :=
+ s nameptr "{ jj}" format.name$ 'w :=
+ s nameptr "{, ff}{ vv}{ jj}" format.name$ 'u :=
+ u text.length$ 'lang :=
+ #1 'zahl :=
+ "" 'v :=
+ { zahl lang < }
+ { u zahl #1 substring$ "~" =
+ { v "" =
+ { u #1 zahl #1 - substring$ 'v := }
+ 'skip$
+ if$
+ v u zahl #2 substring$ * "." * w * 'v :=
+ }
+ 'skip$
+ if$
+ zahl #1 + 'zahl := }
+ while$
+ v "" =
+ { u 'v := }
+ 'skip$
+ if$
+ t v * fkt * 't :=
+ nameptr #1 >
+ { namesleft #1 >
+ { " ; " * t * }
+ { numnames #2 >
+ { " " * }
+ 'skip$
+ if$
+ t "\textsc{others}" = t "\textsc{others} (Hrsg.)" = or
+ { ua.etal * }
+ { " ; " * t * }
+ if$
+ }
+ if$ %% Ende der namesleft-Pruefung
+ }
+ 't
+ if$ %% Ende der nameptr-Pruefung
+
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$ %% Ende von { namesleft #0 > } ganz oben
+ "" 'fkt := %% fkt wird zurueckgesetzt
+}
+
+FUNCTION {format.authors}
+{ author empty$
+ { "" }
+ { author format.names }
+ if$
+}
+
+FUNCTION {format.editors}
+{ editor empty$
+ { author empty$
+ { "empty author and editor in " cite$ * warning$ "" }
+ 'skip$
+ if$
+ }
+ { author empty$
+ { " (Hrsg.)" 'fkt :=
+ editor format.names
+ }
+ { " (Hrsg.)" 'fkt :=
+ " ; " * editor format.names *
+ }
+ if$
+ }
+ if$
+ }
+
+FUNCTION { format.authors.organization }
+{ type$ "misc" =
+ { organization empty$
+ { author empty$
+ { "" }
+ { author format.names " (Erfinder)" * }
+ if$
+ }
+ { author empty$
+ { organization }
+ { author format.names " (Erfinder); " *
+ organization * " (Anmelder)" *
+ }
+ if$
+ }
+ if$
+ }
+ { type$ "manual" =
+ { organization empty$
+ { format.authors }
+ { author empty$
+ { organization capitalize " (Hrsg.)" * }
+ { author format.names }
+ if$
+ }
+ if$
+ }
+ 'skip$
+ if$
+ }
+ if$
+}
+
+
+
+FUNCTION { format.editors.organization }
+{ organization empty$
+ 'skip$
+ { type$ "misc" =
+ { organization }
+ { * " ; " * organization " (Veranst.)" *}
+ if$
+ }
+ if$
+}
+
+FUNCTION { format.tr.institution }
+{ institution empty$
+ 'skip$
+ { institution capitalize }
+ if$
+}
+
+FUNCTION {format.ed.incoll}
+{ editor empty$
+ { "" }
+ { " (Hrsg.)" 'fkt :=
+ editor format.names
+ }
+ if$
+}
+
+
+FUNCTION {format.title}
+{ title empty$
+ { "" }
+ { title } %% Text so wie er dasteht im Feld title
+ if$
+}
+
+FUNCTION {format.number}
+{ number empty$
+ { "" }
+ { number " " * } %% Text so wie er im Feld number steht plus " "
+ if$
+}
+
+
+FUNCTION {format.type}
+{ type empty$
+ { "" }
+ { type " " * } %% Text wie er dasteht; Schutzrecht, Norm etc.
+ if$
+}
+
+FUNCTION {format.digital.type}
+{ type empty$
+ { "" }
+ { type #-1 #4 substring$ "mail" =
+ type #1 #4 substring$ "Mail" =
+ OR
+ { "" }
+ { type } %% Typ einer digitalen Ressource in Form einer
+ %% "Ergaenzenden Angabe", so wie er dasteht;
+ %% Alternativ kann dieser Text auch in NOTE erfasst werden.
+ if$
+ }
+ if$
+}
+
+FUNCTION {n.dashify}
+{ 't :=
+ ""
+ { t empty$ not }
+ { t #1 #1 substring$ "-" =
+ { t #1 #2 substring$ "--" = not
+ { "--" *
+ t #2 global.max$ substring$ 't :=
+ }
+ { { t #1 #1 substring$ "-" = }
+ { "-" *
+ t #2 global.max$ substring$ 't :=
+ }
+ while$
+ }
+ if$
+ }
+ { t #1 #1 substring$ *
+ t #2 global.max$ substring$ 't :=
+ }
+ if$
+ }
+ while$
+}
+
+%% Auflagenvermerke gibt man komplett, einschliesslich Abkuerzungen in
+%% das Feld edition ein: ---> EDITION= { 3., erw. und verb. Aufl. }
+%% oder fremdsprachlich: EDITION= { 2nd edition }
+
+FUNCTION {format.edition}
+{ edition empty$
+ { "" }
+ { edition }
+ if$
+}
+
+FUNCTION {format.date}
+{ year duplicate$ empty$
+ { "empty year in " cite$ * warning$
+ pop$ "" }
+ 'skip$
+ if$
+ month empty$
+ 'skip$
+ { type$ "book" =
+ type$ "inbook" =
+ OR
+ 'skip$
+ { month " " * swap$ * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.edition.or.date}
+{ edition empty$ year empty$ and
+ { "" }
+ { edition empty$
+ { type empty$ NOT
+ { type #-1 #4 substring$ "mail" =
+ type #1 #4 substring$ "Mail" =
+ OR
+ { " gesendet: " "-- " type * swap$ *
+ format.date *
+ }
+ { "\,Version:\,"
+ format.date *
+ }
+ if$
+ }
+ { "\,Version:\,"
+ format.date *
+ }
+ if$
+ }
+ { year empty$
+ { "\,Version:\," edition * }
+ { "\,Version:\," edition * ", " *
+ format.date *
+ }
+ if$
+ }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.version.url}
+{ url empty$ doi empty$ urn empty$ and and
+ { type$ "techreport" =
+ { format.edition }
+ { "" }
+ if$
+ }
+ { format.edition.or.date output format.url }
+ if$
+}
+
+FUNCTION {format.edition.or.version}
+{ url empty$ doi empty$ urn empty$ and and
+ { format.edition }
+ { format.edition.or.date }
+ if$
+}
+
+FUNCTION {format.address.publisher.year}
+{ publisher empty$
+ { address empty$
+ { year empty$
+ { "" }
+ { year }
+ if$
+ }
+ { "there's an address but no publisher in " cite$ * warning$
+ address ", " * format.date *
+ }
+ if$
+ }
+ { address empty$
+ { year empty$
+ { "neither address nor publication date in " cite$ * warning$
+ publisher
+ }
+ { publisher ", " * format.date * }
+ if$
+ }
+ { year empty$
+ { address " : " * publisher * }
+ { address " : " * publisher * ", " * format.date * }
+ if$
+ }
+ if$
+ }
+ if$
+}
+
+
+FUNCTION {format.address.publisher.year.alt}
+{ publisher empty$
+ { address empty$
+ { year empty$
+ { "" }
+ { url empty$
+ { year }
+ { "" }
+ if$
+ }
+ if$
+ }
+ { "there's an address but no publisher in " cite$ * warning$
+ address ", " * format.date *
+ }
+ if$
+ }
+ { url empty$%%%% wenn es URL gibt wird nur die service-provider Adresse
+%%% ausgegeben, die im publisher-Feld steht
+ { address empty$
+ { year empty$
+ { "neither address nor publication date in " cite$ * warning$
+ publisher
+ }
+ { publisher ", " * format.date * }
+ if$
+ }
+ { year empty$
+ { address " : " * publisher * }
+ { address " : " * publisher * ", " * format.date * }
+ if$
+ }
+ if$
+ }
+ { publisher }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.howpublished}
+{ url missing$ urn missing$ doi missing$ AND AND
+ { howpublished empty$
+ { address empty$
+ { type empty$
+ { "" }
+ { type #-1 #4 substring$ "mail" =
+ { "(gesendet: " new.sentence
+ format.date * ")" *
+ }
+ { "" }
+ if$
+ }
+ if$
+ format.date *
+ }
+ { address ", " * format.date * }
+ if$
+ }
+ { address empty$
+ { howpublished ", " * format.date * }
+ { address " : " * howpublished * ", " * format.date * }
+ if$
+ }
+ if$
+ }
+ { howpublished empty$
+ { "" }
+ { howpublished }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.lastchecked.or.type}
+{ lastchecked empty$
+ { url empty$ doi empty$ urn empty$ and and
+ { type empty$
+ { skip$ }
+ { type set.period.dash.check
+ type output
+ }
+ if$
+ }
+ { type empty$
+ { skip$ }
+ { type #-1 #4 substring$ "mail" =
+ type #1 #4 substring$ "Mail" =
+ OR
+ { skip$ }
+ { type set.period.dash.check
+ type output }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ { url empty$ doi empty$ urn empty$ and and
+ { "there's a lastchecked date but no url, urn or doi in "
+ cite$ * warning$
+ }
+ { type empty$
+ { "there's a URL and a lastchecked date but no type in "
+ cite$ * warning$
+ }
+ { type set.period.dash.check
+ type output
+ part.of.sentence
+ lastchecked "Abruf: " swap$ * output
+ }
+ if$
+ }
+ if$
+ }
+ if$
+}
+
+
+FUNCTION {format.btitle}
+{ title emphasize
+}
+
+FUNCTION {tie.or.space.connect}
+{ duplicate$ text.length$ #3 <
+ { "~" }
+ { " " }
+ if$
+ swap$ * *
+}
+
+FUNCTION {format.btitle.vol}
+{ number empty$
+ { series empty$
+ { volume empty$
+ { title emphasize }
+ { title emphasize ". Bd." * volume tie.or.space.connect }
+ if$
+ }
+ { volume empty$
+ { title emphasize }%% ein Buch, das zusaetzl. SERIES=Reihentitel besitzt
+ %% jetzt kommt d. Fall des mehrbaendigen Werkes mit Gesamttitel=SERIES
+ %% Zaehlung=VOLUME und Bandtitel=TITLE;
+ { series emphasize ". Bd." * volume tie.or.space.connect
+ ": " * "{\emph{" * title * "}}" * }
+ if$
+ }
+ if$%% series-test
+ }
+ { title emphasize }%% wenn number ex., dann immer title-Feld
+ if$%% Ende number-test
+}
+
+FUNCTION {format.series.number.din}
+{ volume empty$
+ { number empty$
+ { series empty$
+ { "" }
+ { "(" series * ")" * } %% d. Seriennr koennte auch gleich hier
+ %% im SERIES-Feld miterfasst werden
+ if$
+ }
+ { series empty$
+ { "(" number * ")" *
+ "there's a number but no series in " cite$ * warning$
+ }
+ { "(" series * number tie.or.space.connect ")" * }
+ if$
+ }
+ if$
+ }
+ { series empty$
+ { "" }
+ { type$ "proceedings" = %% Sonderfall, es darf VOLUME und NUMBER ex. !
+ type$ "inproceedings" = OR
+ { number empty$
+ { "(" series * ")" * }
+ { "(" series * number tie.or.space.connect ")" * }
+ if$
+ }
+ { "" }%% Ausstieg mit Nullstring, s. Kommentar
+ if$
+ }%% bei gezaehlten Reihen MUSS die Reihennr. im Feld NUMBER stehen!
+ if$ %% wenn also d. Feld VOLUME nicht leer ist, dann liegt ausser bei
+ %% Typ PROCEEDINGS falsche
+ } %% Erfassung vor und es erfolgt d. Ausstieg mit d. Nullstring!
+ if$
+}
+
+FUNCTION {format.tr.series.or.number}
+{ number empty$
+ { series empty$
+ { "" }
+ { "(" series * ")" * }
+ if$
+ }
+ { series empty$
+ { "(" number * ")" * }
+ { "(" series * number tie.or.space.connect ")" * }
+ if$
+ }
+ if$
+ }
+
+FUNCTION {format.misc.series}
+{ series empty$
+ { "" }
+ { "(" series * ")" * }
+ if$
+}
+
+FUNCTION { format.doi.urn }
+{ urn empty$
+ { doi empty$
+ { "" }
+ { "DOI" doi n.dashify tie.or.space.connect }
+ if$
+ }
+ { "URN" urn n.dashify tie.or.space.connect }
+ if$
+}
+
+FUNCTION { format.isbn.issn }
+{ isbn empty$
+ { issn empty$
+ { "" }
+ { "ISSN" issn n.dashify tie.or.space.connect }
+ if$
+ }
+ { "ISBN" isbn n.dashify tie.or.space.connect }
+ if$
+}
+
+FUNCTION {format.pages}
+{ pages empty$
+ { "" }
+ { url empty$
+ { "S." pages n.dashify tie.or.space.connect }
+ { pages }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.pages.book}
+{ pages empty$
+ { "" }
+ { note empty$ isbn empty$ AND
+ { "" pages n.dashify tie.or.space.connect " S" *
+ add.period$ }
+ { "" pages n.dashify tie.or.space.connect " S" * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.pages.bkcollation}
+{ pages empty$
+ { "" }
+ { "" pages n.dashify tie.or.space.connect }
+ if$
+}
+
+FUNCTION {format.bkpages.collat.check}
+{ 's :=
+ #1 'ptr :=
+ s text.length$ 'collation :=
+ collation #1 =
+ { format.pages.book }
+ {
+ collation 'collrest :=
+ { collrest #0 > }
+ { s ptr #2 substring$ 't :=
+ t "S." =
+ { format.pages.bkcollation
+ #0 'collrest := }
+ { ptr #1 + 'ptr :=
+ collrest #1 - 'collrest :=
+ #1 collrest =
+ { format.pages.book }
+ { skip$ }
+ if$
+ }
+ if$
+ }
+ while$
+ }
+ if$
+}
+
+FUNCTION {format.vol.year.num.pages}
+{ volume field.or.null
+ year empty$
+ { "there's no year in " cite$ * warning$ }
+ { " (" year * ")" * * }
+ if$
+ month empty$
+ 'skip$
+ { ", " month * * }
+ if$
+ number empty$
+ 'skip$
+ { ", Nr. " number * * }
+ if$
+ pages empty$
+ 'skip$
+ { duplicate$ empty$
+ { pop$ "" }
+ { title missing$
+ { ", " pages format.bkpages.collat.check * *}
+ { ", " format.pages * *}
+ if$
+ }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.chapter.inbook}
+{ duplicate$ empty$
+ { pop$ "empty chapter in " cite$ * warning$ }
+ { type empty$
+ { "\emph{Kapitel\/} " swap$ tie.or.space.connect }
+ { type " " * swap$ * }%% wenn keine bes. Abschnittsform gen. werden soll,
+ %% koennte e. kl. Zwischenraum gewaehlt werden, z.B. " \, "
+ if$
+ }
+ if$
+ }
+
+FUNCTION {format.chapter.pages}
+{ chapter empty$
+ 'format.pages
+ { type empty$
+ { "Kapitel " }
+ { url empty$
+ { type }
+ { "Kapitel " }
+ if$
+ }
+ if$
+ chapter tie.or.space.connect
+ pages empty$
+ 'skip$
+ { ", " * format.pages * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.in.ed.booktitle.din}
+{ booktitle empty$
+ { "" }
+ { editor empty$
+ { volume empty$
+ { "{In: }" booktitle emphasize * }
+ { "{In: }" booktitle emphasize *
+ " Bd." volume tie.or.space.connect *
+ }
+ if$
+ }
+ { volume empty$
+ { "{In: }" format.ed.incoll * ": " * booktitle emphasize * }
+ { "{In: }" format.ed.incoll * ": " * booktitle emphasize *
+ " Bd." volume tie.or.space.connect *
+ }
+ if$
+ }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.thesis.tr.type}
+{ type empty$
+ 'skip$
+ { pop$
+ type
+ }
+ if$
+}
+
+FUNCTION {format.online.lastcheck}
+{ lastchecked empty$
+ { url empty$ doi empty$ urn empty$ and and
+ { skip$ }
+ { "" output }
+ if$
+ }
+ { url empty$ doi empty$ urn empty$ and and
+ { "there's a lastchecked date but no url, urn or doi in "
+ cite$ * warning$
+ }
+ { part.of.sentence
+ lastchecked "Abruf: " swap$ * output
+ }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.maillist.lastcheck}
+ { type empty$ NOT
+ { type #-1 #4 substring$ "mail" =
+ type #1 #4 substring$ "Mail" =
+ OR
+ { format.online.lastcheck }
+ 'skip$
+ if$
+ }
+ 'skip$
+ if$
+ }
+
+FUNCTION {format.article.crossref}
+{ key empty$
+ { journal empty$
+ { "need key or journal for " cite$ * " to crossref " * crossref *
+ warning$
+ ""
+ }
+ { "{In: }{\emph " journal * "}" * }
+ if$
+ }
+ { "{In: }" key * }
+ if$
+ "\cite{" * crossref * "}" * ", " * format.pages *
+}
+
+FUNCTION {format.crossref.editor}
+ { editor #1 "{ll}" format.name$ " (Hrsg.)" *
+ editor num.names$ duplicate$
+ #2 >
+ { pop$ ua.etal * }%% --->u. a.
+ { #2 <
+ 'skip$
+ { editor #2 "{ff }{vv }{ll}{ jj}" format.name$ "others" =
+ { ua.etal }
+
+ { " ; " * editor #2 "{vv~}{ll}" format.name$ * " (Hrsg.)" * }
+ if$
+ }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.inbk.vol.title}
+{ volume empty$
+ { " In: " }
+ { title empty$
+ { " In: Bd." volume tie.or.space.connect
+ " von " *
+ }
+ { "In: Bd." volume tie.or.space.connect ": " * title emphasize *
+ " (" * year * ") in " *
+ }
+ if$
+ }
+ if$
+ }
+
+
+FUNCTION {format.book.crossref}
+{ type$ "inbook" =
+ { format.inbk.vol.title }
+ { volume empty$
+ { "empty volume in " cite$ * "'s crossref of " * crossref * warning$
+ " "
+ }
+ { ". -- Bd." volume tie.or.space.connect
+ " von " *
+ }
+ if$
+ }
+ if$
+ editor empty$
+ editor field.or.null author field.or.null =
+ or
+ { key empty$
+ { series empty$
+ { "need editor, key, or series for " cite$ * " to crossref " *
+ crossref * warning$
+ "" *
+ }
+ { "" * }
+ if$
+ }
+ { key * }
+ if$
+ }
+ { "" * }
+ if$
+ "\cite{" * crossref * "}" *
+}
+
+FUNCTION {format.incoll.inproc.crossref}
+{ editor empty$
+ editor field.or.null author field.or.null =
+ or
+ { key empty$
+ { booktitle empty$
+ { "need editor, key, or booktitle for " cite$ * " to crossref " *
+ crossref * warning$
+ ""
+ }
+ { "{In: }{\emph " booktitle * "}" * }%%
+ if$
+ }
+ { "{In: }" }
+ if$
+ }
+ { "{In: }" }
+ if$
+ "\cite{" * crossref * "}" * %% ", " * format.pages * 5.12.2005
+}
+
+FUNCTION {article}
+{ output.bibitem
+ format.authors "author" output.check
+ set.colon.after
+ format.title "title" output.check
+ crossref missing$
+ { journal article.in.journal output.nonnull
+ new.sentence
+ format.vol.year.num.pages output
+ format.url output
+ }
+ { format.article.crossref output.nonnull }
+ if$
+ format.online.lastcheck
+ doi set.period.dash.check
+ urn set.period.dash.check
+ format.doi.urn output
+ issn set.period.dash.check
+ format.isbn.issn output
+ note set.period.dash.check
+ note output
+ fin.entry
+}
+
+FUNCTION {book}
+{ output.bibitem
+ author empty$
+ { format.editors "author and editor" output.check }
+ { format.authors format.editors output.nonnull }
+ if$
+ set.colon.after
+ crossref missing$
+ { format.btitle.vol "title" output.check }
+ { format.btitle "title" output.check }
+ if$
+ format.edition output
+ format.address.publisher.year "publisher" output.check
+ new.sentence
+ crossref missing$
+ { format.series.number.din output }
+ { format.book.crossref output.nonnull }
+ if$
+ pages empty$
+ { skip$ }
+ { pages set.period.dash.check
+ pages format.bkpages.collat.check output
+ }
+ if$
+ format.doi output
+ format.url output
+ new.block
+ isbn set.period.dash.check
+ format.isbn.issn output
+ note set.period.dash.check
+ note output
+ fin.entry
+}
+
+FUNCTION {booklet}
+{ output.bibitem
+ author empty$
+ { format.editors "author and editor" output.check }
+ { format.authors format.editors output.nonnull }
+ if$
+ set.colon.after
+ format.btitle "title" output.check
+ format.edition.or.version output
+ format.url output
+ format.online.lastcheck
+ format.howpublished output
+ series new.sentence.checka
+ format.series.number.din output
+ pages empty$
+ { skip$ }
+ { pages set.period.dash.check
+ pages format.bkpages.collat.check output
+ }
+ if$
+ type set.period.dash.check
+ format.digital.type output
+ doi set.period.dash.check
+ urn set.period.dash.check
+ format.doi.urn output
+ note set.period.dash.check
+ note output
+ format.isbn.issn output
+ fin.entry
+}
+
+
+FUNCTION {inbook}
+{ output.bibitem
+ chapter format.chapter.inbook output.nonnull
+ crossref missing$
+ { author empty$
+ { format.editors "\,{In:\,}" swap$ * "author and editor" output.check }
+ { format.authors "\,{In:\,}" swap$ * output.nonnull }
+ if$
+ author empty$ editor empty$ AND
+ { before.all 'output.state := }
+ { set.colon.after }
+ if$
+ format.btitle.vol "title" output.check
+ format.edition output
+ format.address.publisher.year "publisher" output.check
+ new.sentence
+ format.series.number.din output
+ isbn set.period.dash.check
+ format.isbn.issn output
+ }
+ { format.book.crossref output.nonnull }
+ if$
+ part.of.sentence
+ format.pages output
+ note set.period.dash.check
+ note output
+ fin.entry
+}
+
+FUNCTION {incollection}
+{ output.bibitem
+ format.authors "author" output.check
+ set.colon.after
+ format.title "title" output.check
+ format.version.url output
+ type empty$ NOT
+ { type #-1 #4 substring$ "mail" =
+ type #1 #4 substring$ "Mail" =
+ OR
+ 'skip$
+ { format.online.lastcheck }
+ if$
+ }
+ { format.online.lastcheck }
+ if$
+ crossref missing$
+ { format.in.ed.booktitle.din "booktitle" output.check
+ format.edition output
+ format.address.publisher.year "publisher" output.check
+ format.maillist.url output
+ format.maillist.lastcheck
+ new.sentence
+ format.series.number.din output
+ doi set.period.dash.check
+ urn set.period.dash.check
+ format.doi.urn output
+ isbn set.period.dash.check
+ issn set.period.dash.check
+ format.isbn.issn output
+ }
+ { format.incoll.inproc.crossref output.nonnull }
+ if$
+ part.of.sentence
+ format.chapter.pages "pages" output.check
+ note set.period.dash.check
+ note output
+ fin.entry
+}
+
+
+FUNCTION {inproceedings}
+{ output.bibitem
+ format.authors "author" output.check
+ set.colon.after
+ format.title "title" output.check
+ crossref missing$
+ { format.in.ed.booktitle.din "booktitle" output.check
+ address empty$
+ { organization new.sentence.checka
+ organization output
+ part.of.sentence
+ format.address.publisher.year output
+ }
+ { format.address.publisher.year "publisher" output.check }
+ if$
+ new.sentence
+ series empty$
+ 'skip$
+ { format.series.number.din output }
+ if$
+ isbn set.period.dash.check
+ issn set.period.dash.check
+ format.isbn.issn output
+ }
+ { format.incoll.inproc.crossref output.nonnull }
+ if$
+ part.of.sentence
+ format.pages "pages" output.check
+ note set.period.dash.check
+ note output
+ fin.entry
+}
+
+
+FUNCTION {conference} { inproceedings }%% nach Patashnik, wg US-Kompatibilitaet
+
+FUNCTION {manual}
+{ output.bibitem
+ author empty$
+ { organization empty$
+ { title empty$
+ 'skip$
+ {format.btitle "title" output.check }
+ if$
+ }
+ 'skip$
+ if$
+ }
+ 'skip$
+ if$
+ format.authors.organization output.nonnull
+ set.colon.after
+ format.btitle "title" output.check
+ format.edition "edition" output.check
+ author empty$ organization empty$ AND
+ { address "address" output.check
+ part.of.sentence
+ }
+ { organization empty$
+ { address "address" output.check
+ part.of.sentence
+ }
+ { address ": " * organization * output
+ part.of.sentence
+ }
+ if$
+ }
+ if$
+ format.date output
+ number empty$
+ 'skip$
+ { "(" number * ") " * output }
+ if$
+ pages empty$
+ { skip$ }
+ { pages set.period.dash.check
+ pages format.bkpages.collat.check output
+ }
+ if$
+ format.doi output
+ format.url output
+ format.online.lastcheck
+ note set.period.dash.check
+ note output
+ fin.entry
+}
+
+%% Standard ist "Diplomarbeit", anderes mit TYPE="anderer Typ" erfassen!
+%% z.B. TYPE={Hausarbeit}, TYPE={Diss.}, TYPE={Habil.}, TYPE={Magisterarb.}
+FUNCTION {mastersthesis}
+{ output.bibitem
+ format.authors "author" output.check
+ set.colon.after
+ format.btitle "title" output.check
+ address output
+ part.of.sentence
+ school "school" output.check
+ part.of.sentence
+ "Diplomarbeit" format.thesis.tr.type output.nonnull
+ part.of.sentence
+ format.date "year" output.check
+ format.url output
+ format.online.lastcheck
+%% format.digital.resource.type
+ doi set.period.dash.check
+ urn set.period.dash.check
+ format.doi.urn output
+%% pages set.period.dash.check
+%% format.pages.book output
+ pages empty$
+ { skip$ }
+ { pages set.period.dash.check
+ pages format.bkpages.collat.check output
+ }
+ if$
+ note set.period.dash.check
+ note output
+ fin.entry
+}
+
+FUNCTION {phdthesis} %% {mastersthesis}% ist identisch bis auf Standardwert, s.o.
+{ output.bibitem
+ format.authors "author" output.check
+ set.colon.after
+ format.btitle "title" output.check
+ address output
+ part.of.sentence
+ school "school" output.check
+ part.of.sentence
+ "Diss." format.thesis.tr.type output.nonnull % koennte auch `Dissertation' sein
+ part.of.sentence
+ format.date "year" output.check
+ format.url output
+ format.online.lastcheck
+%% format.digital.resource.type
+ doi set.period.dash.check
+ urn set.period.dash.check
+ format.doi.urn output
+ pages empty$
+ { skip$ }
+ { pages set.period.dash.check
+ pages format.bkpages.collat.check output
+ }
+ if$
+%% pages set.period.dash.check
+%% format.pages.book output
+ note set.period.dash.check
+ note output
+ fin.entry
+}
+
+
+%% Normen, Vornormen, Schutzrechte (Patente) werden hiermit erfasst;
+%% (z.Zt. auch noch Internetressourcen)
+%% das type-Feld uebernimmt eine wichtige Steuerfunktion:
+FUNCTION {misc}
+{ output.bibitem
+ type missing$ not
+ { type duplicate$ #1 #4 substring$ "Norm" =
+ type #1 #4 substring$ "Vorn" = OR
+ { " " *
+ format.number * output
+ new.sentence
+ format.date output
+ title empty$
+ { skip$ }
+ { add.period$ new.sentence }
+ if$
+ format.btitle "title" output.check
+ note set.period.dash.check
+ note output
+ }
+ { duplicate$ #1 #6 substring$ "Schutz" =
+ { " " * format.number * output
+ new.sentence
+ "(" * format.date ")" * output
+ add.period$ new.sentence
+ format.authors.organization add.period$ output
+ note output
+ }
+ %% wenn irgendein anderer Typ eingetragen ist
+ { pop$ pop$ ""
+ title empty$
+ { note empty$
+ { url empty$
+ { "there's no relevant field in " cite$ warning$
+ pop$ ""
+ }
+ { format.url output }%%%
+ if$
+ }
+ { note " " * output.nonnull }
+ if$
+ }
+ { author empty$
+ { editor empty$
+ { organization empty$
+ { skip$ }
+ { format.editors.organization output.nonnull
+ set.colon.after
+ }
+ if$
+ }
+ { format.editors format.editors.organization
+ output.nonnull set.colon.after
+ }
+ if$
+ }
+ { format.authors format.editors output.nonnull
+ set.colon.after
+ }
+ if$
+ format.btitle output.nonnull
+ url empty$
+ { format.edition output
+ format.howpublished output}
+ { format.howpublished output
+ format.edition.or.date output
+ format.url output
+ }
+ if$
+ format.online.lastcheck
+%% format.lastchecked.or.type
+ new.sentence
+ format.misc.series output
+%% note set.period.dash.check
+ note output
+ }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ %% wenn es keinen type gibt
+ { title empty$
+ { note empty$
+ { url empty$
+ { "there's no relevant field in " cite$ warning$
+ pop$ ""
+ }
+ { format.url output }%%% das waere e. reine URL
+ if$
+ }
+ { note " " * output.nonnull
+ %% format.url format.date output
+ }
+ if$
+ }
+ { author empty$
+ { editor empty$
+ { organization empty$
+ { skip$ }
+ { format.editors.organization output.nonnull
+ set.colon.after
+ }
+ if$
+ }
+ { format.editors format.editors.organization
+ output.nonnull set.colon.after
+ }
+ if$
+ }
+ { format.authors format.editors output.nonnull
+ set.colon.after
+ }
+ if$
+ format.btitle output.nonnull
+ url empty$
+ { format.edition output
+ format.howpublished output}
+ { format.howpublished output
+ format.url output
+ format.edition.or.date output
+ format.online.lastcheck
+%% format.lastchecked.or.type
+ }
+ if$
+ new.sentence
+ format.misc.series output
+ note set.period.dash.check
+ note output
+ }
+ if$
+ }
+ if$
+ fin.entry
+}
+
+FUNCTION {proceedings}
+{ output.bibitem
+ editor empty$
+ { organization empty$
+ { "empty organization and editor in " cite$ * warning$ }
+ { organization " (Veranst.)" * output }
+ if$
+ }
+ { format.editors format.editors.organization output.nonnull }
+ if$
+ set.colon.after
+ format.btitle "title" output.check
+ volume empty$
+ { skip$ }
+ { "{\textnormal{Bd.}}" volume tie.or.space.connect emphasize "volume" output.check }
+ if$
+ format.address.publisher.year "publisher" output.check
+ new.sentence
+ format.series.number.din output.nonnull
+ pages empty$
+ { skip$ }
+ { pages set.period.dash.check
+ pages format.bkpages.collat.check output
+ }
+ if$
+ isbn set.period.dash.check
+ issn set.period.dash.check
+ format.isbn.issn output
+ note set.period.dash.check
+ note output
+ fin.entry
+}
+
+FUNCTION {techreport}
+{ output.bibitem
+ author empty$
+ { format.editors "author and editor" output.check
+ format.tr.institution output.nonnull }
+ { format.authors format.editors output.nonnull }
+ if$
+ set.colon.after
+ format.title "title" output.check
+ institution empty$
+ 'skip$
+ { author empty$ editor empty$ AND
+ 'skip$
+ { institution new.sentence.checka
+ "/ " institution * output.nonnull
+ }
+ if$
+ }
+ if$
+ format.version.url output
+ format.online.lastcheck
+ format.address.publisher.year output
+ number new.sentence.checka
+ format.tr.series.or.number "number" output.check
+ "Forschungsbericht" format.thesis.tr.type set.period.dash.check
+ "Forschungsbericht" format.thesis.tr.type output
+%% format.digital.resource.type
+ pages empty$
+ { skip$ }
+ { pages set.period.dash.check
+ pages format.bkpages.collat.check output
+ }
+ if$
+ isbn set.period.dash.check
+ issn set.period.dash.check
+ format.isbn.issn output
+ note set.period.dash.check
+ note "note" output.check
+ fin.entry
+}
+
+FUNCTION {unpublished} {misc}%% AUTHOR, TITLE, NOTE muessen sein!
+%% andere Felder sind optional
+
+FUNCTION {default.type} { misc }
+
+
+MACRO {jan} {"Januar"}
+
+MACRO {feb} {"Februar"}
+
+MACRO {mar} {"M{\^^b a}rz"}
+
+MACRO {apr} {"April"}
+
+MACRO {mai} {"Mai"}
+
+MACRO {may} {"Mai"}
+
+MACRO {jun} {"Juni"}
+
+MACRO {jul} {"Juli"}
+
+MACRO {aug} {"August"}
+
+MACRO {sep} {"September"}
+
+MACRO {okt} {"Oktober"}
+
+MACRO {oct} {"Oktober"}
+
+MACRO {nov} {"November"}
+
+MACRO {dez} {"Dezember"}
+
+MACRO {dec} {"Dezember"}
+
+%%$$$ stillgelegte Beispiele fuer den Gebrauch von Kuerzeln (hier Zs-Titel).
+
+%%MACRO {acmcs} {"ACM Computing Surveys"}
+
+%%MACRO {acta} {"Acta Informatica"}
+
+READ
+
+FUNCTION {initialize.longest.label}%% nicht identisch mit der Fkt.im ALPHA-Stil
+{ "" 'longest.label :=
+ #1 'number.label :=
+ #0 'longest.label.width :=
+}
+
+FUNCTION {longest.label.pass}
+{ number.label int.to.str$ 'label :=
+ number.label #1 + 'number.label :=
+ label width$ longest.label.width >
+ { label 'longest.label :=
+ label width$ 'longest.label.width :=
+ }
+ 'skip$
+ if$
+}
+
+EXECUTE { initialize.longest.label }
+
+ITERATE { longest.label.pass }
+
+FUNCTION {begin.bib}
+{ preamble$ empty$
+ 'skip$
+ { preamble$ write$ newline$ }
+ if$
+ "\begin{thebibliography}{" number.label int.to.str$ * "}" *
+ write$ newline$ newline$
+ "% this bibliography is generated by unsrtdin.bst [8.2] from 2005-12-21"
+ write$ newline$ newline$
+ "\providecommand{\url}[1]{\texttt{#1}}"
+ write$ newline$
+ "\expandafter\ifx\csname urlstyle\endcsname\relax"
+ write$ newline$
+ " \providecommand{\doi}[1]{doi: #1}\else"
+ write$ newline$
+ " \providecommand{\doi}{doi: \begingroup \urlstyle{rm}\Url}\fi"
+ write$ newline$
+}
+
+EXECUTE {begin.bib}
+
+EXECUTE {init.state.consts}
+
+ITERATE {call.type$}
+
+FUNCTION {end.bib}
+{ newline$
+ "\end{thebibliography}" write$ newline$
+}
+
+EXECUTE {end.bib} \ No newline at end of file
diff --git a/biblio/bibtex/contrib/german/dinat/dinat-index.html b/biblio/bibtex/contrib/german/dinat/dinat-index.html
new file mode 100644
index 0000000000..5f3a82a8e5
--- /dev/null
+++ b/biblio/bibtex/contrib/german/dinat/dinat-index.html
@@ -0,0 +1,229 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
+<HTML LANG="de">
+
+<HEAD>
+<META HTTP-EQUIV="Content-Type" CONTENT="text/html; CHARSET=iso-8859-1">
+<META NAME="description"
+CONTENT="bibliographies following the german DIN 1505 with BibTeX by dinat">
+<META NAME="keywords" CONTENT="dinat literatur DIN 1505 bibtex">
+<META NAME="resource-type" CONTENT="document">
+<META NAME="distribution" CONTENT="global">
+
+<TITLE>Literaturverzeichnisse nach DIN mit BibTeX</TITLE>
+
+</HEAD>
+
+<BODY BGCOLOR="white">
+
+<H1>Literaturverzeichnisse nach DIN mit BibTeX</H1>
+
+<HR>
+
+<H4>A short note for english speaking people</H4>
+
+<P>
+This page is about a bibliography style for BibTeX named
+<CODE>dinat.bst</CODE>, which produce bibliographies following the german
+norm DIN 1505. Because this norm is only usefull for text in german, all
+extra documentation like these pages is in german, too. Nonetheless the
+styles themselves have comments and output in english. If you like to get
+this pages in english, too, please write me, I'll do my very best.
+</P>
+
+<ADDRESS><A HREF="mailto:helge.baumann@gmx.de">mailto</A>: Helge Baumann</ADDRESS>
+<HR>
+
+<H2>Wie und warum?</H2>
+
+<P>
+Im Zuge meiner Diplomarbeit stand ich vor dem Problem, ein
+Literaturverzeichnis nach DIN 1505 verwenden zu wollen. Da ich meine Arbeit
+mit LaTeX gesetzt habe und die Literatureintr&auml;ge im BibTeX-Format
+vorlagen, war es naheliegend, nach einem passenden fertigen Stil zu suchen.
+Gefunden habe ich <A
+HREF="http://www.fh-hamburg.de/pers/Lorenzen/bibtex/"><CODE>natdin</CODE></A>
+von <A HREF="http://www.fh-hamburg.de/pers/Lorenzen/">Lorenzen</A>, der
+auch ein gutes Werk zu <A
+HREF="http://www.fh-hamburg.de/pers/Lorenzen/tum/litverz.ps">Literaturverzeichnissen
+nach DIN</A> verfasst hat. Leider ist der von ihm erstellte Stil nicht ganz
+ausgereift, also machte ich mich daran, davon ausgehend einen neuen Stil zu
+entwicklen.
+</P>
+
+<P>
+Am Ende einer gewissen Entwicklung mit diversen Umwegen ist dann der Stil
+<A HREF="dinat.bst">dinat.bst</A> herausgekommen, der alle
+M&ouml;glichkeiten des <CODE>natbib</CODE>-Pakets bietet (dieses allerdings
+auch in mindestens Version 7.0 voraussetzt), und bei konsequenter Anwendung von
+<CODE>\citep</CODE> auch weitestgehend DIN-konforme Literaturverzeichnisse und
+Zitierungen bietet.
+</P>
+
+<HR>
+
+<H2>natbib</H2>
+
+<P>
+Wie oben erw&auml;hnt, ist das Paket <CODE>natbib</CODE> Voraussetzung f&uuml;r den
+Einsatz von <CODE>dinat</CODE>. Zur Zeit wird mindestens Version 7.0
+erwartet, das ist auch die bisher aktuellste auf den DANTE-Servern.</P>
+<P>
+Um mit <CODE>dinat</CODE> Literaturverzeichnisse zu erhalten, bei denen die
+Marken (die Verweise, wie sie im Text auftauchen) den Eintr&auml;gen
+fettgedruckt vorangestellt sind, ist die Datei <CODE>natbib.cfg</CODE> um
+den folgenden Eintrag zu erweitern (siehe auch die Dokumentation zu
+<CODE>natbib</CODE>):
+</P>
+
+<PRE>
+\newcommand{\bibstyle@dinat}%
+ {\bibpunct{(}{)}{;}{a}{}{,~}%
+ \gdef\NAT@biblabelnum##1{\textbf{##1}}}
+</PRE>
+
+<HR>
+
+<H2>Zus&auml;tze</H2>
+
+<P>
+Zus&auml;tzlich zu den Standard-Feldern der Eintr&auml;ge existieren noch
+die folgenden Felder:
+</P>
+
+<DL>
+ <DT><CODE>issn</CODE></DT> <DD>Internationale Nummer f&uuml;r Zeitschriften
+ o.&auml;.</DD>
+ <DT><CODE>isbn</CODE></DT> <DD>Internationale Nummer f&uuml;r
+ B&uuml;cher</DD>
+ <DT><CODE>url</CODE></DT> <DD>Quelle eines elektronischen Dokuments. Wird
+ als Impressum verwendet, wenn kein Verlag und Verlagsort genannt wird,
+ sonst erscheint sie als zus&auml;tzliche Anmerkung</DD>
+ <DT><CODE>urldate</CODE></DT> <DD>Datum des Zugriffs auf eine url</DD>
+</DL>
+
+<HR>
+
+<H2>Verf&uuml;gbarkeit</H2>
+
+<P>
+Der Stil <A HREF="dinat.bst">dinat.bst</A> ist in seiner jeweils
+aktuellsten Version auf den CTAN-Servern (z.B. <A
+HREF="ftp.dante.de">ftp.dante.de</A>) im Verzeichnis <A
+HREF="ftp://ftp.dante.de/biblio/bibtex/contrib/german/dinat/">biblio/bibtex/contrib/german/dinat/</A>
+zu finden.
+</P>
+
+<P>
+Eine &Uuml;bersicht &uuml;ber die Entstehung des Stils ist in der <A
+HREF="history.html">Versions&uuml;bersicht</A> zu finden.
+</P>
+
+<HR>
+
+<H2>Anstehende Arbeiten</H2>
+
+<P>
+Trotz der vielen &Auml;nderungen ist immer noch genug zu tun, bis
+<CODE>dinat</CODE> wirklich zufriedenstellende Eintr&auml;ge erzeugt, die
+alle Eventualit&auml;ten ber&uuml;cksichtigen, gut aussehen und DIN-konform
+sind. Vor allem die letzten beiden Punkte sind manchmal nur schwer zu
+vereinen :-)
+</P>
+
+<P>
+Was noch zu tun ist:
+</P>
+
+<UL>
+ <LI>Eine sch&ouml;ne Anleitung in HTML und LaTeX mit Beispielen etc.</LI>
+ <LI><CODE>proceedings</CODE> scheint noch nicht so ausgereift zu sein.</LI>
+ <LI>Eigenst&auml;ndige Formatierungen f&uuml;r <CODE>booklet</CODE>,
+ <CODE>conference</CODE> und <CODE>unpublished</CODE>.</LI>
+ <LI>Der Code ist teilweise noch unsauber bzw. durcheinander, aber das
+ h&ouml;rt wohl nie auf.</LI>
+ <LI>Fehlende Felder m&uuml;ssen aufgeteilt werden in Standard-Felder
+ (required) und Feldern, die nur nach DIN notwendig sind. Echte Warnungen
+ sollte es nur bei fehlenden Standard-Feldern geben!</LI>
+ <LI>Wenn alle Standard-Felder vorhandenen sind, sollte ohne Warnungen
+ &uuml;bersetzt werden.</LI>
+</UL>
+
+<P>
+F&uuml;r Erg&auml;nzungen bin ich nicht unbedingt dankbar, das w&auml;re
+&uuml;bertrieben, aber ich werde sie aufnehmen, wenn sie sinnvoll sind.
+</P>
+
+<P>
+Inzwischen bin ich auch soweit, dass ich eine Anleitung zum Erstellen bzw.
+modifizieren von BibTeX-Stilen schreiben k&ouml;nnte. Falls daran sehr
+gro&szlig;es Interesse besteht, bitte melden!
+</P>
+
+<HR>
+
+<H2>Kontakt</H2>
+
+<P>
+Fragen und Anregungen bitte direkt an mich unter <A
+HREF="mailto:Helge.Baumann@gmx.de">Helge.Baumann@gmx.de</A> richten.
+</P>
+
+<P>
+Zur Zeit lese ich auch noch regelm&auml;&szlig;ig die Newsgruppe <A
+HREF="news:DE.comp.text.tex">de.comp.text.tex</A>, so dass ich auch dort
+erreichbar bin.
+</P>
+
+<P>
+Anfragen etc. kann ich am einfachsten nachvollziehen, wenn sie Folgendes
+beinhalten (soweit m&ouml;glich und sinnvoll):
+</P>
+
+<OL>
+ <LI>verwendete Systeme, Versionsnummern etc. (ich selbst arbeite auf
+ einem Macintosh mit OzTeX, siehe <A HREF="#sonst">unten</A>)</LI>
+ <LI>eine kurze Beschreibung des Problems</LI>
+ <LI>einen Verweis auf die DIN bzw. den <A
+ HREF="http://www.fh-hamburg.de/pers/Lorenzen/tum/litverz.ps">Lorenzen</A></LI>
+ <LI>einen BibTeX-Eintrag</LI>
+ <LI>dem daraus mit <CODE>dinat</CODE> erzeugten Eintrag</LI>
+ <LI>den gew&uuml;nschten Eintrag</LI>
+ <LI>Hinweis auf die ge&auml;nderten bzw. zu &auml;ndernden Stellen</LI>
+</OL>
+
+<P>
+Ich versuche, Anfragen m&ouml;glichst gleich nach Eingang zu beantworten,
+und sei es nur mit einem Hinweis in der Art &quot;Anfrage erhalten, ich
+k&uuml;mmere mich demn&auml;chst drum&quot; (oder oft leider auch &quot;Mache ich
+nicht, weil nicht DIN ...&quot;).
+</P>
+
+<HR>
+
+<H2>Sonstiges</H2>
+
+<P>
+<A name="sonst"></A> Entwickelt wurde der Stil auf einem <A
+HREF="http://www.apple.de">Apple</A> Macintosh PowerPC 7100/66AV.<BR>
+Als Editor kam <A HREF="http://alpha.olm.net">Alpha</A> zum Einsatz.<BR>
+Als (Bib)TeX-System verwende ich <A
+HREF="http://www.kagi.com/akt">OzTeX</A>.
+</P>
+
+<P>
+Als Literatur standen nur &quot;BibTeXing&quot; und &quot;Designing BibTeX
+Stiles&quot; von Oren Patashnik zur Verf&uuml;gung, das hat sich aber als
+ausreichend herausgestellt, schliesslich studierte ich Informatik!
+</P>
+
+<P>
+Diese Webseiten sollten dem HTML-Standard 4.0 entsprechen und wurden mit
+dem Browser <A HREF="http://www.icab.de">iCab</A> getestet.
+</P>
+
+<HR>
+<ADDRESS><A HREF="mailto:helge.baumann@gmx.de">mailto</A>: Helge Baumann,
+2000-11-15</ADDRESS>
+</BODY>
+
+</HTML>
diff --git a/biblio/bibtex/contrib/german/dinat/dinat.bst b/biblio/bibtex/contrib/german/dinat/dinat.bst
new file mode 100644
index 0000000000..38a8cb4a27
--- /dev/null
+++ b/biblio/bibtex/contrib/german/dinat/dinat.bst
@@ -0,0 +1,1952 @@
+%% DINAT.BST Version 2.5 2000-11-14
+%% (c) Helge Baumann email:Helge.Baumann@gmx.de
+%%------------------------------------------------------------------------------
+%% For use with BibTeX version 0.99a or later.
+%%------------------------------------------------------------------------------
+%% Copying of this file is authorized only if either
+%% (1) you make absolutely no changes to your copy, including name, or
+%% (2) if you do make changes, you name it something other than dinat.bst,
+%% natdin.bst, plain.bst, unsrt.bst, alpha.bst, and abbrv.bst.
+%% This restriction helps ensure that all standard styles are identical.
+%%------------------------------------------------------------------------------
+%% This is a full author-year citation style bibliography. As such, it is
+%% non-standard LaTeX, and requires the natbib-package by Patrick W. Daly,
+%% version 7 or higher to function properly.
+%% It should be used with the following configuration in natbib.cfg:
+%% \newcommand{\bibstyle@dinat}%
+%% {\bibpunct{(}{)}{;}{a}{}{,~}%
+%% \gdef\NAT@biblabelnum##1{\textbf{##1}}}
+%%------------------------------------------------------------------------------
+%% The form of the \bibitem entries is
+%% \bibitem[Jones u. a.(1990)Jones, Baker und Smith]{key}...
+%% If there are more [Jones u. a. 1990], a single character is added to
+%% the year like in [Jones u.a.(1990{\natexlab{a}})Jones, Baker und Smith].
+%% The resulting bibliography entry is
+%% \textsc{Jones}, \textsc{Baker} und \textsc{Smith} ...
+%% The \cite command functions as follows:
+%% \cite{key} ==>> Jones u. a. (1990)
+%% \cite[chap. 2]{key} ==>> (Jones u. a. 1990, chap. 2)
+%% \cite[e.g.][]{key} ==>> (e.g. Jones u. a. 1990)
+%% \cite[e.g.][p. 32]{key} ==>> (e.g. Jones u. a. p. 32)
+%% \citep{key} ==>> (Jones u. a. 1990)
+%% \citep*{key} ==>> (Jones, Baker und Smith 1990)
+%% \citet{key} ==>> Jones u. a. (1990)
+%% \citet*{key} ==>> Jones, Baker und Smith (1990)
+%% \citeauthor{key} ==>> Jones u. a.
+%% \citeauthor*{key} ==>> Jones, Baker und Smith
+%% \citeyear{key} ==>> 1990
+%%------------------------------------------------------------------------------
+%% This bibliography style file is intended for texts in german.
+%% It draws up bibliographies in accordance with the german DIN 1505,
+%% part 2 and 3, as discribed in the german text
+%% http://www.fh-hamburg.de/pers/Lorenzen/tum/litverz.ps
+%%------------------------------------------------------------------------------
+%% This style is based on the natdin.bst style.
+%% The intention for designing a new style for the same result
+%% were the many bugs and the poor design of the original style.
+%% So i simplified the programming and add some comments for rework.
+%% The names of the functions were changed to reflect their functionality:
+%% out.*: write the top of the stack to the bbl-file
+%% format.*: format the top of the stack
+%% push.*: put one item on top of the stack
+%%------------------------------------------------------------------------------
+%% There are some non standard fields for most entries:
+%% isbn: international book number
+%% issn: internation journal number
+%% url: for electronic published documents or additional information
+%% if there is no publisher and address, the url is used instead,
+%% else it acts like a additional note
+%% urldate: the date of the access to the url
+%%------------------------------------------------------------------------------
+%% Author(s):
+%% HB: Helge Baumann, helge.baumann@gmx.de
+%%------------------------------------------------------------------------------
+%% History:
+%% (only main changes are listed, for others see the webpage)
+%% 2000-04-10 (HB): Initial release
+%% 2000-04-18 (HB): Version 1.1:
+%% corrected some typos and oversights
+%% minor changes in output
+%% 2000-04-25 (HB): Version 1.2:
+%% dinat only: added \natexlab
+%% using full key/cite for label
+%% 2000-05-02 (HB): Version 2.0:
+%% added urldate for date of visit
+%% added labels in bibliography, so the seperate
+%% style dinnat.bst is not needed anymore
+%% 2000-05-09 (HB): Version 2.1:
+%% removed blanc in bibpunct
+%% put text ("u.\,a." ...) in functions
+%% rebuild some push functions
+%% changed \cite to \citep
+%% removed push.crossref.editor (not used)
+%% 2000-07-12 (HB): version 2.2:
+%% added push.crossref
+%% changed many crossrefs
+%% corrected typos
+%% put \, in curly braces
+%% 2000-10-03 (HB): version 2.3:
+%% changed remaining "u.~a."
+%% added \labelsep behind dinatlabel
+%% added mastersthesis again, keeping (wrong)
+%% masterthesis (sorry for that)
+%% minor changes in proceedings
+%% 2000-11-05 (HB): version 2.4:
+%% improved inbook
+%% removed extra period from proceedings
+%% added missing colon in misc
+%% improved name formatting
+%% removed long dashes from ISBN/ISSN
+%% restructured format.dashes
+%% 2000-11-14 (HB): version 2.5:
+%% always use key for label if present
+%%------------------------------------------------------------------------------
+
+
+%%------------------------------------------------------------------------------
+%% push standard text items on top of the stack
+%%------------------------------------------------------------------------------
+FUNCTION {push.bd} { "Bd." }
+FUNCTION {push.diplom} { "Diplomarbeit" }
+FUNCTION {push.disser} { "Dissertation" }
+FUNCTION {push.forschung} { "Forschungsbericht" }
+FUNCTION {push.hrsg} { "Hrsg." }
+FUNCTION {push.in} { "In:" }
+FUNCTION {push.isbn} { "ISBN" }
+FUNCTION {push.issn} { "ISSN" }
+FUNCTION {push.kap} { "Kap." }
+FUNCTION {push.nr} { "Nr." }
+FUNCTION {push.sn} { "S" }
+FUNCTION {push.s} { "S." }
+FUNCTION {push.siehe} { "Siehe" }
+FUNCTION {push.ua} { "u.\,a." }
+FUNCTION {push.und} { "und" }
+FUNCTION {push.url.name} { "URL" }
+FUNCTION {push.veranst} { "Veranst." }
+FUNCTION {push.von} { "von" }
+FUNCTION {push.zugriff} { "Zugriffsdatum" }
+
+FUNCTION {push.cite} { "\citep" }
+
+
+%%------------------------------------------------------------------------------
+%% Definitions for every bibliography entry
+%%------------------------------------------------------------------------------
+ENTRY
+ % fields (crossref is default)
+ { address
+ author
+ booktitle
+ chapter
+ edition
+ editor
+ howpublished
+ institution
+ isbn
+ issn
+ journal
+ key
+ month
+ note
+ number
+ organization
+ pages
+ publisher
+ school
+ series
+ title
+ type
+ url
+ urldate
+ volume
+ year
+ }
+ % INTEGERS
+ {}
+ % STRINGS (sort.key$ is default)
+ { label extra.label sort.label short.list dinat.label }
+
+
+%%------------------------------------------------------------------------------
+%% required macros for abbr. names of month
+%%------------------------------------------------------------------------------
+MACRO {jan} {"Januar"}
+
+MACRO {feb} {"Februar"}
+
+MACRO {mar} {"M\^^b{a}rz"}
+
+MACRO {apr} {"April"}
+
+MACRO {may} {"Mai"}
+
+MACRO {jun} {"Juni"}
+
+MACRO {jul} {"Juli"}
+
+MACRO {aug} {"August"}
+
+MACRO {sep} {"September"}
+
+MACRO {oct} {"Oktober"}
+
+MACRO {nov} {"November"}
+
+MACRO {dec} {"Dezember"}
+
+
+%%------------------------------------------------------------------------------
+%% macros for common journals
+%%------------------------------------------------------------------------------
+MACRO {acmcs} {"ACM Computing Surveys"}
+
+MACRO {acta} {"Acta Informatica"}
+
+MACRO {cacm} {"Communications of the ACM"}
+
+MACRO {ibmjrd} {"IBM Journal of Research and Development"}
+
+MACRO {ibmsj} {"IBM Systems Journal"}
+
+MACRO {ieeese} {"IEEE Transactions on Software Engineering"}
+
+MACRO {ieeetc} {"IEEE Transactions on Computers"}
+
+MACRO {ieeetcad}
+ {"IEEE Transactions on Computer-Aided Design of Integrated Circuits"}
+
+MACRO {ipl} {"Information Processing Letters"}
+
+MACRO {jacm} {"Journal of the ACM"}
+
+MACRO {jcss} {"Journal of Computer and System Sciences"}
+
+MACRO {scp} {"Science of Computer Programming"}
+
+MACRO {sicomp} {"SIAM Journal on Computing"}
+
+MACRO {tocs} {"ACM Transactions on Computer Systems"}
+
+MACRO {tods} {"ACM Transactions on Database Systems"}
+
+MACRO {tog} {"ACM Transactions on Graphics"}
+
+MACRO {toms} {"ACM Transactions on Mathematical Software"}
+
+MACRO {toois} {"ACM Transactions on Office Information Systems"}
+
+MACRO {toplas} {"ACM Transactions on Programming Languages and Systems"}
+
+MACRO {tcs} {"Theoretical Computer Science"}
+
+
+%%------------------------------------------------------------------------------
+%% for debugging (not used)
+%%------------------------------------------------------------------------------
+FUNCTION {show}
+% show quoted top of stack
+{ duplicate$ ":::: `" swap$ * "'" * top$
+}
+
+FUNCTION {show.stack}
+% show and clear whole stack
+{ "STACK====================================================================="
+ top$
+ stack$
+ "ENDSTACK=================================================================="
+ top$
+}
+
+
+%%------------------------------------------------------------------------------
+%% logical functions
+%%------------------------------------------------------------------------------
+FUNCTION {not}
+{ { #0 }
+ { #1 }
+ if$
+}
+
+FUNCTION {and}
+{ { skip$ }
+ { pop$ #0 }
+ if$
+}
+
+FUNCTION {or}
+{ { pop$ #1 }
+ { skip$ }
+ if$
+}
+
+
+%%------------------------------------------------------------------------------
+%% variables for the recent output state
+%%------------------------------------------------------------------------------
+INTEGERS { output.state
+ before.all
+ mid.sentence
+ after.sentence
+ after.block
+ colon.after
+ period.dash }
+
+FUNCTION {init.state.consts}
+% initialisation of the state variables
+{ #0 'before.all :=
+ #1 'mid.sentence :=
+ #2 'after.sentence :=
+ #3 'after.block :=
+ #4 'colon.after :=
+ #5 'period.dash :=
+}
+
+FUNCTION {set.period.dash}
+% set ". -- "
+{ output.state before.all =
+ { skip$ }
+ { period.dash 'output.state := }
+ if$
+}
+
+FUNCTION {set.period.dash.check}
+% only if not empty
+{ empty$
+ { skip$ }
+ { set.period.dash }
+ if$
+}
+
+FUNCTION {set.colon.after}
+% set ": "
+{ output.state before.all =
+ { skip$ }
+ { colon.after 'output.state := }
+ if$
+}
+
+FUNCTION {new.sentence}
+% set ". "
+{ output.state before.all =
+ { skip$ }
+ { after.sentence 'output.state := }
+ if$
+}
+
+FUNCTION {new.sentence.check}
+% only if not empty
+{ empty$
+ { skip$ }
+ { new.sentence }
+ if$
+}
+
+FUNCTION {part.of.sentence}
+% set ", "
+{ output.state before.all =
+ { skip$ }
+ { mid.sentence 'output.state := }
+ if$
+}
+
+
+%%------------------------------------------------------------------------------
+%% output lines to bbl. file
+%%------------------------------------------------------------------------------
+STRINGS { h s t u v }
+
+FUNCTION {out.block}
+% writes the second but last element with seperator
+{ 's :=
+ output.state after.block =
+ { add.period$ write$
+ newline$
+ "\newblock " write$
+ }
+ { output.state before.all =
+ { write$ }
+ { output.state colon.after =
+ { ": " * write$
+ newline$
+ "\newblock " write$
+ }
+ { output.state period.dash =
+ { ". -- " * write$
+ newline$
+ "\newblock " write$
+ }
+ { output.state mid.sentence =
+ { ", " * write$ }
+ { write$
+ newline$
+ "\newblock " write$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+ after.block 'output.state :=
+ }
+ if$
+ s
+}
+
+FUNCTION {out}
+% write only if not empty
+{ duplicate$ empty$
+ { pop$ }
+ { out.block }
+ if$
+}
+
+FUNCTION {out.check.required}
+% write if not empty, else drop warning
+{ 't :=
+ duplicate$ empty$
+ { pop$ "empty " t * " in " * cite$ * warning$ }
+ { out.block }
+ if$
+}
+
+FUNCTION {out.check.din}
+% write if not empty, else drop note
+{ 't :=
+ duplicate$ empty$
+ { pop$ "DIN: empty " t * " in " * cite$ * top$ }
+ { out.block }
+ if$
+}
+
+
+%%------------------------------------------------------------------------------
+%% format entries for full author/editor citations
+%%------------------------------------------------------------------------------
+INTEGERS { nameptr namesleft pos len }
+
+FUNCTION {format.full.names}
+% format all names
+{ 's :=
+ ""
+ #1 'nameptr :=
+ s num.names$ 'namesleft :=
+ { namesleft #0 > } % while
+ { s nameptr "{vv~}{ll}" format.name$ 't :=
+ nameptr #1 =
+ { % first name
+ t *
+ }
+ { namesleft #1 =
+ { % last name
+ t "others" =
+ { " " * push.ua * }
+ { " " * push.und * " " * t * }
+ if$
+ }
+ { % other names
+ ", " * t *
+ }
+ if$
+ }
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$ % { namesleft #0 > }
+}
+
+FUNCTION {key.full}
+{ key empty$
+ { cite$ }
+ { key }
+ if$
+}
+
+FUNCTION {author.key.full}
+{ author empty$
+ { key.full }
+ { author format.full.names }
+ if$
+}
+
+FUNCTION {editor.key.full}
+{ editor empty$
+ { key.full }
+ { editor format.full.names }
+ if$
+}
+
+FUNCTION {author.editor.key.full}
+{ author empty$
+ { editor.key.full }
+ { author format.full.names }
+ if$
+}
+
+FUNCTION {make.full.names}
+{ type$ "book" =
+ type$ "inbook" =
+ or
+ { author.editor.key.full }
+ { type$ "proceedings" =
+ { editor.key.full }
+ { author.key.full }
+ if$
+ }
+ if$
+}
+
+
+%%------------------------------------------------------------------------------
+%% write bibentry to bbl. file
+%%------------------------------------------------------------------------------
+FUNCTION {out.bibitem.start}
+% start of entry
+{ newline$
+ "\bibitem[" label * ")" *
+ make.full.names
+ duplicate$ short.list =
+ { pop$ }
+ { * }
+ if$
+ "]{" * cite$ * "}" *
+ write$
+ newline$
+ "\dinatlabel{" dinat.label * "} " *
+ write$
+ ""
+ before.all 'output.state :=
+}
+
+FUNCTION {out.bibitem.end}
+% end of entry
+{ write$
+ newline$
+}
+
+
+%%------------------------------------------------------------------------------
+%% format text
+%%------------------------------------------------------------------------------
+FUNCTION {format.emphasize}
+% emphasize top of stack
+{ duplicate$ empty$
+ { pop$ "" }
+ { "\emph{" swap$ * "}" * }
+ if$
+}
+
+FUNCTION {format.smallcaps}
+% top of stack in small caps
+{ duplicate$ empty$
+ { pop$ "" }
+ { "\textsc{" swap$ * "}" * }
+ if$
+}
+
+FUNCTION {format.dashes}
+% replace single dashes (-) with tex-styled dashes (--)
+{ 't :=
+ ""
+ { t empty$ not } % while$
+ { t #1 #2 substring$ "--" =
+ { { t #1 #1 substring$ "-" = }
+ { "-" *
+ t #2 global.max$ substring$ 't :=
+ }
+ while$
+ }
+ { t #1 #1 substring$ "-" =
+ { "--" * }
+ { t #1 #1 substring$ * }
+ if$
+ t #2 global.max$ substring$ 't :=
+ }
+ if$
+ }
+ while$ % { t empty$ not }
+}
+
+
+%%------------------------------------------------------------------------------
+%% manipulte entries on the stack
+%%------------------------------------------------------------------------------
+FUNCTION {tie.or.space.connect}
+% connect two top items with space or ~, if second is shorter than 3
+{ duplicate$ text.length$ #3 <
+ { "~" }
+ { " " }
+ if$
+ swap$ * *
+}
+
+FUNCTION {push.field.or.null}
+% push an empty item on the stack if it's a missing entry
+{ duplicate$ empty$
+ { pop$ "" }
+ { skip$ }
+ if$
+}
+
+
+%%------------------------------------------------------------------------------
+%% format text on stack
+%%------------------------------------------------------------------------------
+STRINGS { hrsg }
+
+FUNCTION {format.names}
+% format all names on top of stack
+{ 's :=
+ ""
+ #1 'nameptr :=
+ s num.names$ 'namesleft :=
+ { namesleft #0 > } % while names left
+ { % first get last name in small caps
+ s nameptr "{ll}" format.name$ 't :=
+ t format.smallcaps 't :=
+ % second get all first names
+ s nameptr "{, ff}" format.name$ 'u :=
+ u text.length$ 'len :=
+ #1 'pos :=
+ "" 'v :=
+ { pos len < } % while
+ { u pos #1 substring$ "~" =
+ { v "" =
+ { u #1 pos #1 - substring$ 'v := }
+ { skip$ }
+ if$
+ % cut second and more first names
+ v u pos #2 substring$ * "." * 'v :=
+ }
+ { skip$ }
+ if$
+ pos #1 + 'pos :=
+ }
+ while$ % { pos len < }
+ v "" =
+ { u 'v := }
+ { skip$ }
+ if$
+ % third get all "von"
+ s nameptr "{ vv}" format.name$ 'u :=
+ % put it all together
+ t v * u * hrsg * 't :=
+
+ nameptr #1 =
+ { %first name
+ t *
+ }
+ { namesleft #1 =
+ { % last name
+ t "others" format.smallcaps =
+ t "others" format.smallcaps hrsg * =
+ or
+ { " " * push.ua * }
+ { "~; " * t * }
+ if$
+ }
+ { % other names
+ "~; " * t *
+ }
+ if$
+ }
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$ % { namesleft #0 > }
+ "" 'hrsg :=
+}
+
+
+%%------------------------------------------------------------------------------
+%% push formatted or empty field(s) on top of the stack
+%%------------------------------------------------------------------------------
+FUNCTION {push.authors}
+% format author names
+{ author empty$
+ { "" }
+ { author format.names }
+ if$
+}
+
+FUNCTION {push.editors}
+% format editor names
+{ editor empty$
+ { "" }
+ { " (" push.hrsg * ")" * 'hrsg :=
+ editor format.names
+ }
+ if$
+}
+
+FUNCTION {push.authors.editors}
+% format author and/or editor names
+{ author empty$
+ { push.editors }
+ { push.authors
+ editor empty$
+ { skip$ }
+ { "~; " * push.editors * }
+ if$
+ }
+ if$
+}
+
+
+FUNCTION {push.organization}
+% format organization
+{ organization empty$
+ { "" }
+ { organization
+ " (" * push.veranst * ")" *
+ }
+ if$
+}
+
+FUNCTION {push.title}
+% title as in entry
+{ title empty$
+ { "" }
+ { title }
+ if$
+}
+
+FUNCTION {push.url}
+% prefixed with "URL" and special formatting
+{ url empty$
+ { "" }
+ { push.url.name " \url{" * url * "}" *
+ urldate empty$
+ { skip$ }
+ { ". -- " * push.zugriff * ": " * urldate * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {push.date}
+% format: month year
+{ year empty$
+ { month empty$
+ { "" }
+ { "there's a month but no year in " cite$ * warning$
+ month
+ }
+ if$
+ }
+ { month empty$
+ { year }
+ { month " " * year * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {push.address.publisher.year}
+% the whole imprint
+{ address empty$
+ { publisher empty$
+ { url empty$
+ { year empty$
+ { "no publisher, address, url or date in " cite$ * warning$
+ "" }
+ { push.date }
+ if$
+ }
+ { "no proper publisher, using url in " cite$ * warning$
+ push.url
+ year empty$
+ { skip$ }
+ { ", " * push.date * }
+ if$
+ }
+ if$
+ }
+ { publisher
+ year empty$
+ { "there's a publisher but no year in " cite$ * warning$ }
+ { ", " * push.date * }
+ if$
+ }
+ if$
+ }
+ { address
+ publisher empty$
+ { "there's an address but no publisher in " cite$ * warning$ }
+ { "~: " * publisher * }
+ if$
+ year empty$
+ { skip$ }
+ { ", " * push.date * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {push.btitle}
+% the booktitle
+{ title empty$
+ { "" }
+ { title format.emphasize }
+ if$
+}
+
+FUNCTION {push.btitle.vol}
+% booktitle in multivolume works
+{ number empty$
+ { series empty$
+ { push.btitle
+ volume empty$
+ { skip$ }
+ { ". " * push.bd * volume tie.or.space.connect }
+ if$
+ }
+ { volume empty$
+ { push.btitle }
+ { series format.emphasize ". " *
+ push.bd * volume tie.or.space.connect
+ ": " * push.btitle *
+ }
+ if$
+ }
+ if$
+ }
+ { push.btitle }
+ if$
+}
+
+FUNCTION {push.article.in.journal}
+% source of article
+{ journal empty$
+ { "" }
+ { author missing$
+ title missing$
+ and
+ { journal format.emphasize }
+ { push.in " " * journal format.emphasize * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {push.series.number}
+% series and number like DIN
+{ volume empty$
+ { series empty$
+ { number empty$
+ { "" }
+ { "there's a number but no series in " cite$ * warning$
+ "(" number * ")" * }
+ if$
+ }
+ { "(" series *
+ number empty$
+ { skip$ }
+ { number tie.or.space.connect }
+ if$
+ ")" *
+ }
+ if$
+ }
+ { series empty$
+ { "" }
+ { type$ "proceedings" =
+ { "(" series *
+ number empty$
+ { skip$ }
+ { number tie.or.space.connect }
+ if$
+ ")" *
+ }
+ { "" }
+ if$
+ }
+ if$
+ }
+ if$
+}
+
+FUNCTION {push.misc.series}
+% series in MISC
+{ series empty$
+ { "" }
+ { "(" series * ")" * }
+ if$
+}
+
+FUNCTION {push.edition}
+% like in entry
+{ edition empty$
+ { "" }
+ { edition }
+ if$
+}
+
+FUNCTION {push.isbn.issn}
+% preceeded with ISSN/ISBN
+{ isbn empty$
+ { issn empty$
+ { "" }
+ { push.issn " " * issn * }
+ if$
+ }
+ { push.isbn " " * isbn * }
+ if$
+}
+
+FUNCTION {push.pages.book}
+% as length of a book
+{ pages empty$
+ { "" }
+ { pages format.dashes "~" * push.sn * }
+ if$
+}
+
+FUNCTION {push.pages}
+% as part of a book
+{ pages empty$
+ { "" }
+ { push.s "~" * pages format.dashes * }
+ if$
+}
+
+FUNCTION {push.vol.year.num.pages}
+% for journals etc.
+{ volume push.field.or.null
+ year empty$
+ { "there's no year in " cite$ * warning$ }
+ { duplicate$ empty$
+ { pop$ "(" }
+ { " (" * }
+ if$
+ year * ")" *
+ }
+ if$
+ month empty$
+ { skip$ }
+ { duplicate$ empty$
+ { pop$ month }
+ { ", " * month * }
+ if$
+ }
+ if$
+ number empty$
+ { skip$ }
+ { duplicate$ empty$
+ { pop$ push.nr }
+ { ", " * push.nr * }
+ if$
+ "~" * number *
+ }
+ if$
+ pages empty$
+ { skip$ }
+ { duplicate$ empty$
+ { skip$ }
+ { ", " *
+ title missing$
+ { push.pages.book * }
+ { push.pages * }
+ if$
+ }
+ if$
+ }
+ if$
+}
+
+FUNCTION {push.chapter.pages}
+% chapter and pages
+{ chapter empty$
+ { push.pages }
+ { type empty$
+ { push.kap }
+ { type }
+ if$
+ chapter tie.or.space.connect
+ pages empty$
+ { skip$ }
+ { ", " * push.pages * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {push.in.ed.booktitle}
+% main title and volume
+{ booktitle empty$
+ { "" }
+ { push.in " " *
+ editor empty$
+ { skip$ }
+ { push.editors * ": " * }
+ if$
+ booktitle format.emphasize *
+ volume empty$
+ { skip$ }
+ { " " * push.bd * "~" * volume * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {push.mastersthesis.type}
+% type of a mastersthesis
+{ type empty$
+ { push.diplom }
+ { type }
+ if$
+}
+
+FUNCTION {push.phdthesis.type}
+% type of a phdthesis
+{ type empty$
+ { push.disser }
+ { type }
+ if$
+}
+
+FUNCTION {push.tr.number}
+% type and number of a technical report
+{ number empty$
+ { " " }
+ { "(" number * "). " * }
+ if$
+ "-- " *
+ type empty$
+ { push.forschung * }
+ { type * }
+ if$
+}
+
+FUNCTION {push.article.crossref}
+% article from a journal
+{ key empty$
+ { journal empty$
+ { "need key or journal for " cite$ * " to crossref " * crossref *
+ warning$
+ ""
+ }
+ { push.in " " * journal format.emphasize * }
+ if$
+ }
+ { push.in " " * key * }
+ if$
+ " " * push.cite * "{" * crossref * "}" *
+ pages empty$
+ { skip$ }
+ { ", " * push.pages * }
+ if$
+}
+
+FUNCTION {push.book.crossref}
+% crossreference in BOOKs
+{ volume empty$
+ { "empty volume in " cite$ * "'s crossref of " * crossref * warning$
+ push.siehe
+ }
+ { ". -- " push.bd * "~" * volume *
+ " " * push.von *
+ }
+ if$
+ " " * push.cite * "{" * crossref * "}" *
+}
+
+FUNCTION {push.incoll.inproc.crossref}
+% crossreference with In:
+{ editor empty$
+ editor push.field.or.null author push.field.or.null =
+ or
+ { key empty$
+ { booktitle empty$
+ { push.siehe }
+ { push.in " " * booktitle format.emphasize * "." * }
+ if$
+ }
+ { push.in }
+ if$
+ }
+ { push.in }
+ if$
+ " " * push.cite * "{" * crossref * "}" *
+ chapter empty$
+ { skip$ }
+ { ", " *
+ type empty$
+ { push.kap * }
+ { type * }
+ if$
+ chapter tie.or.space.connect
+ }
+ if$
+ pages empty$
+ { skip$ }
+ { ", " * push.pages * }
+ if$
+}
+
+FUNCTION {push.crossref}
+% a simple crossref
+{ crossref empty$
+ { "" }
+ { push.siehe " " * push.cite * "{" * crossref * "}" * }
+ if$
+}
+
+
+%%------------------------------------------------------------------------------
+%% functions for the different entries
+%%------------------------------------------------------------------------------
+FUNCTION {article}
+% required: author, title, journal, year
+% optional: volume, number, pages, month, note, url, issn
+{ out.bibitem.start
+ push.authors "author" out.check.required
+ set.colon.after
+ push.title "title" out.check.required
+ crossref missing$
+ { push.article.in.journal out.block
+ new.sentence
+ push.vol.year.num.pages out
+ }
+ { push.article.crossref out.block }
+ if$
+ url set.period.dash.check
+ push.url out
+ note set.period.dash.check
+ note out
+ issn set.period.dash.check
+ push.isbn.issn out
+ out.bibitem.end
+}
+
+FUNCTION {book}
+% required: author/editor, title, publisher, year
+% optional: volume oder number, series, address, edition, pages, month,
+% note, url, isbn
+{ out.bibitem.start
+ author empty$
+ { push.editors "author and editor" out.check.required }
+ { push.authors.editors out.block }
+ if$
+ set.colon.after
+ crossref missing$
+ { push.btitle.vol }
+ { push.btitle }
+ if$
+ "title" out.check.required
+ push.edition out
+ push.address.publisher.year "publisher" out.check.required
+ new.sentence
+ crossref missing$
+ { push.series.number out }
+ { push.book.crossref out.block }
+ if$
+ pages set.period.dash.check
+ push.pages.book out
+ address empty$
+ publisher empty$
+ and
+ { skip$ }
+ { url set.period.dash.check
+ push.url out
+ }
+ if$
+ note set.period.dash.check
+ note out
+ isbn set.period.dash.check
+ push.isbn.issn out
+ out.bibitem.end
+}
+
+% booklet see below
+
+% conference see below
+
+FUNCTION {inbook}
+% required: author/editor, title, chapter/pages, publisher, year
+% optional: volume oder number, series, type, address, month, note, url, isbn
+{ out.bibitem.start
+ author empty$
+ { push.editors "author and editor" out.check.required }
+ { push.authors out.block }
+ if$
+ set.colon.after
+ push.btitle.vol "title" out.check.required
+ push.chapter.pages out
+ crossref missing$
+ { push.in.ed.booktitle "booktitle" out.check.required
+ address empty$
+ { part.of.sentence
+ push.address.publisher.year out
+ }
+ { push.address.publisher.year "publisher" out.check.required }
+ if$
+ new.sentence
+ series empty$
+ { skip$ }
+ { push.series.number out }
+ if$
+ part.of.sentence
+ address empty$
+ publisher empty$
+ and
+ { skip$ }
+ { url set.period.dash.check
+ push.url out
+ }
+ if$
+ }
+ { push.crossref out.block
+ url set.period.dash.check
+ push.url out
+ }
+ if$
+ note set.period.dash.check
+ note out
+ isbn set.period.dash.check
+ push.isbn.issn out
+ out.bibitem.end
+}
+
+FUNCTION {incollection}
+% required: author, title, booktitle, publisher, year
+% optional: editor, volume oder number, series, type, chapter,
+% pages, address, edition, month, note, url
+{ out.bibitem.start
+ push.authors "author" out.check.required
+ set.colon.after
+ push.title "title" out.check.required
+ crossref missing$
+ { push.in.ed.booktitle "booktitle" out.check.required
+ push.edition out
+ push.address.publisher.year "publisher" out.check.required
+ new.sentence
+ push.series.number out
+ part.of.sentence
+ push.chapter.pages "pages" out.check.required
+ address empty$
+ publisher empty$
+ and
+ { skip$ }
+ { url set.period.dash.check
+ push.url out
+ }
+ if$
+ }
+ { push.incoll.inproc.crossref out.block
+ url set.period.dash.check
+ push.url out
+ }
+ if$
+ note set.period.dash.check
+ note out
+ isbn set.period.dash.check
+ issn set.period.dash.check
+ push.isbn.issn out
+ out.bibitem.end
+}
+
+FUNCTION {inproceedings}
+% required: author, title, booktitle, year
+% optional: editor, volume oder number, series, pages, address, month,
+% organization, publisher, note, url
+{ out.bibitem.start
+ push.authors "author" out.check.required
+ set.colon.after
+ push.title "title" out.check.required
+ crossref missing$
+ { push.in.ed.booktitle "booktitle" out.check.required
+ address empty$
+ { organization new.sentence.check
+ push.organization out
+ part.of.sentence
+ push.address.publisher.year out
+ }
+ { push.address.publisher.year "publisher" out.check.required }
+ if$
+ new.sentence
+ series empty$
+ { skip$ }
+ { push.series.number out }
+ if$
+ part.of.sentence
+ push.pages "pages" out.check.required
+ address empty$
+ publisher empty$
+ and
+ { skip$ }
+ { url set.period.dash.check
+ push.url out
+ }
+ if$
+ }
+ { push.incoll.inproc.crossref out.block
+ url set.period.dash.check
+ push.url out
+ }
+ if$
+ note set.period.dash.check
+ note out
+ isbn set.period.dash.check
+ issn set.period.dash.check
+ push.isbn.issn out
+ out.bibitem.end
+}
+
+FUNCTION {manual}
+% required: title
+% optional: author, organization, address, edition, month, year, note, url
+{ out.bibitem.start
+ author empty$
+ { organization empty$
+ { title empty$
+ { skip$ }
+ { push.btitle "title" out.check.required }
+ if$
+ }
+ { push.organization out.block
+ set.colon.after
+ push.btitle "title" out.check.required
+ }
+ if$
+ }
+ { push.authors out.block
+ set.colon.after
+ push.btitle "title" out.check.required
+ }
+ if$
+ push.edition "edition" out.check.required
+ author empty$
+ { organization empty$
+ { address out
+ part.of.sentence
+ }
+ { skip$ }
+ if$
+ }
+ { address ": " * push.organization * out
+ part.of.sentence
+ }
+ if$
+ push.date out
+ pages set.period.dash.check
+ push.pages.book out
+ url set.period.dash.check
+ push.url out
+ note set.period.dash.check
+ note out
+ out.bibitem.end
+}
+
+FUNCTION {mastersthesis}
+% required: author, title, school, year
+% optional: type, address, month, note, url
+{ out.bibitem.start
+ push.authors "author" out.check.required
+ set.colon.after
+ push.btitle "title" out.check.required
+ address out
+ part.of.sentence
+ school "school" out.check.required
+ part.of.sentence
+ push.mastersthesis.type out.block
+ part.of.sentence
+ push.date "year" out.check.required
+ pages set.period.dash.check
+ push.pages.book out
+ url set.period.dash.check
+ push.url out
+ note set.period.dash.check
+ note out
+ out.bibitem.end
+}
+
+FUNCTION {misc}
+% required:
+% optional: author, title, howpublished, month, year, note, url
+{ out.bibitem.start
+ note empty$
+ { title empty$
+ { skip$ }
+ { push.authors.editors out.block
+ set.colon.after
+ push.btitle out
+ howpublished out
+ push.date out
+ push.crossref out
+ url set.period.dash.check
+ push.url out
+ }
+ if$
+ }
+ { note #1 #4 substring$ "u" change.case$ "NORM" =
+ { note out
+ part.of.sentence
+ push.date out
+ push.title format.emphasize out
+ push.crossref out
+ }
+ { author empty$
+ { editor empty$
+ { organization empty$
+ { skip$ }
+ { push.organization out.block
+ set.colon.after
+ }
+ if$
+ }
+ { push.editors push.organization * out.block
+ set.colon.after
+ }
+ if$
+ }
+ { push.authors.editors out.block
+ set.colon.after
+ }
+ if$
+ push.btitle out
+ push.crossref out
+ howpublished out
+ push.date out
+ new.sentence
+ push.misc.series out
+ url set.period.dash.check
+ push.url out
+ note set.period.dash.check
+ note out
+ }
+ if$
+ }
+ if$
+ out.bibitem.end
+}
+
+FUNCTION {phdthesis}
+% required: author, title, school, year
+% optional: type, address, month, note, url
+{ out.bibitem.start
+ push.authors "author" out.check.required
+ set.colon.after
+ push.btitle "title" out.check.required
+ address out
+ part.of.sentence
+ school "school" out.check.required
+ part.of.sentence
+ push.phdthesis.type out.block
+ part.of.sentence
+ push.date "year" out.check.required
+ pages set.period.dash.check
+ push.pages.book out
+ url set.period.dash.check
+ push.url out
+ note set.period.dash.check
+ note out
+ out.bibitem.end
+}
+
+FUNCTION {proceedings}
+% required: title, year
+% optional: editor, volume oder number, series, address, month,
+% organization, publisher, note, url
+{ out.bibitem.start
+ editor empty$
+ { push.organization }
+ { push.editors
+ organization empty$
+ { skip$ }
+ { "~; " * push.organization * }
+ if$
+ }
+ if$
+ out.block
+ set.colon.after
+ push.btitle "title" out.check.required
+ volume empty$
+ { skip$ }
+ { push.bd "~" * volume format.emphasize * out.block }
+ if$
+ push.address.publisher.year "publisher" out.check.required
+ push.series.number out
+ pages set.period.dash.check
+ push.pages.book out
+ address empty$
+ publisher empty$
+ and
+ { skip$ }
+ { url set.period.dash.check
+ push.url out
+ }
+ if$
+ note set.period.dash.check
+ note out
+ isbn set.period.dash.check
+ issn set.period.dash.check
+ push.isbn.issn out
+ out.bibitem.end
+}
+
+FUNCTION {techreport}
+% required: author, title, institution, year
+% optional: type, number, address, month, note, url
+{ out.bibitem.start
+ author empty$
+ { push.editors "author and editor" out.check.required }
+ { push.authors.editors out.block }
+ if$
+ set.colon.after
+ push.title "title" out.check.required
+ institution empty$
+ { skip$ }
+ { institution new.sentence.check
+ "/ " institution * out.block
+ }
+ if$
+ push.address.publisher.year out
+ number new.sentence.check
+ push.tr.number "number" out.check.required
+ pages set.period.dash.check
+ push.pages.book out
+ address empty$
+ publisher empty$
+ and
+ { skip$ }
+ { url set.period.dash.check
+ push.url out
+ }
+ if$
+ note "note" out.check.required
+ isbn set.period.dash.check
+ issn set.period.dash.check
+ push.isbn.issn out
+ out.bibitem.end
+}
+
+FUNCTION {booklet}
+% required: title
+% optional: author, howpublished, address, month, year, note, url
+{ misc % so far
+}
+
+FUNCTION {conference}
+% required: author, title, note
+% optional: month, year, url
+{ inproceedings % like stated in BibTeXing by O. Patashnik
+}
+
+FUNCTION {masterthesis}
+% required: author, title, school, year
+% optional: type, address, month, note, url
+{ mastersthesis % just because of a typo in former version
+}
+
+FUNCTION {unpublished}
+% required: author, title, note
+% optional: month, year, url
+{ misc % so far
+}
+
+FUNCTION {default.type}
+% all other types
+{ misc
+}
+
+
+%%------------------------------------------------------------------------------
+%% for producing the labels
+%%------------------------------------------------------------------------------
+FUNCTION {sortify}
+% simplify for sorting
+{ purify$
+ "l" change.case$
+}
+
+FUNCTION {chop.word}
+% cut a word
+{ 's :=
+ 'len :=
+ s #1 len substring$ =
+ { s len #1 + global.max$ substring$ }
+ { s }
+ if$
+}
+
+FUNCTION {chop.article}
+% cut article from a word
+{ 't :=
+ "A " #2
+ "An " #3
+ "Der " #4
+ "Die " #4
+ "Das " #4
+ "Ein " #4
+ "Eine " #5
+ "The " #4 t chop.word
+ chop.word
+ chop.word
+ chop.word
+ chop.word
+ chop.word
+ chop.word
+ chop.word
+}
+
+
+FUNCTION {format.lab.names}
+% format names for the label
+{ 's :=
+ s #1 "{vv~}{ll}" format.name$
+ s num.names$ duplicate$
+ #2 >
+ { pop$ " " * push.ua * }
+ { #2 <
+ { skip$ }
+ { s #2 "{ll}" format.name$ "others" =
+ { " " * push.ua * }
+ { " " * push.und * " " * s #2 "{vv~}{ll}" format.name$ * }
+ if$
+ }
+ if$
+ }
+ if$
+}
+
+FUNCTION {author.label}
+% label from key or author
+{ key empty$
+ { author empty$
+ { cite$ }
+ { author format.lab.names }
+ if$
+ }
+ { key }
+ if$
+}
+
+FUNCTION {author.editor.label}
+% label from key, author or editor
+{ key empty$
+ { author empty$
+ { editor empty$
+ { cite$ }
+ { editor format.lab.names }
+ if$
+ }
+ { author format.lab.names }
+ if$
+ }
+ { key }
+ if$
+}
+
+FUNCTION {author.organization.label}
+% label from key, author or organization
+{ key empty$
+ { author empty$
+ { organization empty$
+ { cite$ }
+ { organization chop.article }
+ if$
+ }
+ { author format.lab.names }
+ if$
+ }
+ { key }
+ if$
+}
+
+FUNCTION {editor.organization.label}
+% label from key, editor or organization
+{ key empty$
+ { editor empty$
+ { organization empty$
+ { cite$ }
+ { organization chop.article }
+ if$
+ }
+ { editor format.lab.names }
+ if$
+ }
+ { key }
+ if$
+}
+
+FUNCTION {calc.short.authors}
+% make short label (only first author)
+{ type$ "book" =
+ type$ "inbook" =
+ or
+ { author.editor.label }
+ { type$ "proceedings" =
+ { editor.organization.label }
+ { type$ "manual" =
+ { author.organization.label }
+ { author.label }
+ if$
+ }
+ if$
+ }
+ if$
+ 'short.list :=
+}
+
+FUNCTION {calc.label}
+% make a full label
+{ calc.short.authors
+ short.list "(" *
+ year push.field.or.null format.dashes * 'label :=
+ short.list " " *
+ year push.field.or.null format.dashes * 'dinat.label :=
+ label sortify 'sort.label :=
+}
+
+
+%%------------------------------------------------------------------------------
+%% sorting
+%%------------------------------------------------------------------------------
+FUNCTION {sort.format.names}
+% format names for sorting
+{ 's :=
+ #1 'nameptr :=
+ ""
+ s num.names$ 'namesleft :=
+ { namesleft #0 > } % while
+ { nameptr #1 =
+ { skip$ }
+ { " " * }
+ if$
+ s nameptr "{ll{ }}{ ff{ }}{ vv{ }}{ jj{ }}" format.name$ 't :=
+ namesleft #1 =
+ t "others" =
+ and
+ { "[" * push.ua * "]" * }
+ { t sortify * }
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$ % { namesleft #0 > }
+}
+
+FUNCTION {sort.format.title}
+% format title for sorting (without article)
+{ chop.article
+ sortify
+ #1 global.max$ substring$
+}
+
+FUNCTION {author.sort}
+% author or key for sorting
+{ key empty$
+ { author empty$
+ { "to sort, need author or key in " cite$ * warning$
+ ""
+ }
+ { author sort.format.names }
+ if$
+ }
+ { key sortify }
+ if$
+}
+
+FUNCTION {author.editor.sort}
+% author, editor or key for sorting
+{ key empty$
+ { author empty$
+ { editor empty$
+ { "to sort, need author, editor, or key in " cite$ * warning$
+ ""
+ }
+ { editor sort.format.names }
+ if$
+ }
+ { author sort.format.names }
+ if$
+ }
+ { key sortify }
+ if$
+}
+
+FUNCTION {author.organization.sort}
+% author, organization or key for sorting
+{ key empty$
+ { author empty$
+ { organization empty$
+ { "to sort, need author, organization, or key in " cite$ * warning$
+ ""
+ }
+ { organization chop.article sortify }
+ if$
+ }
+ { author sort.format.names }
+ if$
+ }
+ { key sortify }
+ if$
+}
+
+FUNCTION {editor.organization.sort}
+% editor, organization or key for sorting
+{ key empty$
+ { editor empty$
+ { organization empty$
+ { "to sort, need editor, organization, or key in " cite$ * warning$
+ ""
+ }
+ { organization chop.article sortify }
+ if$
+ }
+ { editor sort.format.names }
+ if$
+ }
+ { key sortify }
+ if$
+}
+
+FUNCTION {presort}
+% first sort
+{ calc.label
+ sort.label
+ " " *
+ type$ "book" =
+ type$ "inbook" =
+ or
+ { author.editor.sort }
+ { type$ "proceedings" =
+ { editor.organization.sort }
+ { type$ "manual" =
+ { author.organization.sort }
+ { author.sort }
+ if$
+ }
+ if$
+ }
+ if$
+ " " *
+ year push.field.or.null sortify *
+ " " *
+ title push.field.or.null sort.format.title *
+ #1 entry.max$ substring$
+ 'sort.label :=
+ sort.label *
+ #1 entry.max$ substring$
+ 'sort.key$ :=
+}
+
+STRINGS { last.label next.extra }
+
+INTEGERS { last.extra.num label.count }
+
+FUNCTION {initialize.label}
+{ "" 'last.label :=
+ #0 'label.count :=
+}
+
+FUNCTION {forward.pass}
+% find maximum additional character for identical labels
+{ last.label label =
+ { last.extra.num #1 + 'last.extra.num :=
+ last.extra.num int.to.chr$ 'extra.label :=
+ }
+ { "a" chr.to.int$ 'last.extra.num :=
+ "" 'extra.label :=
+ label 'last.label :=
+ }
+ if$
+ label.count #1 + 'label.count :=
+}
+
+FUNCTION {reverse.pass}
+% add additional characters to identical labels
+{ next.extra "b" =
+ { "a" 'extra.label := }
+ { skip$ }
+ if$
+ extra.label 'next.extra :=
+ extra.label empty$
+ { "" }
+ { "{\natexlab{" extra.label * "}}" * }
+ if$
+ 'extra.label :=
+ label extra.label * 'label :=
+ dinat.label extra.label * 'dinat.label :=
+}
+
+FUNCTION {bib.sort.order}
+{ sort.label 'sort.key$ :=
+}
+
+
+%%------------------------------------------------------------------------------
+%% making the bbl. file
+%%------------------------------------------------------------------------------
+FUNCTION {begin.bib}
+% beginning of the file
+{ preamble$ empty$
+ { skip$ }
+ { preamble$
+ write$
+ newline$
+ }
+ if$
+ "\begin{thebibliography}{" label.count int.to.str$ * "}" *
+ write$
+ newline$
+ "% this bibliography was produced with the style dinat.bst v2.5"
+ write$
+ newline$
+ "\makeatletter"
+ write$
+ newline$
+ "\newcommand{\dinatlabel}[1]%"
+ write$
+ newline$
+ "{\ifNAT@numbers\else\NAT@biblabelnum{#1}\hspace{2\labelsep}\fi}"
+ write$
+ newline$
+ "\makeatother"
+ write$
+ newline$
+ "\expandafter\ifx\csname natexlab\endcsname\relax\def\natexlab#1{#1}\fi"
+ write$
+ newline$
+ "\expandafter\ifx\csname url\endcsname\relax\def\url#1{\texttt{#1}}\fi"
+ write$
+ newline$
+}
+
+FUNCTION {end.bib}
+% end of the bbl. file
+{ newline$
+ "\end{thebibliography}" write$ newline$
+}
+
+
+%%------------------------------------------------------------------------------
+%% processing the .bib file
+%%------------------------------------------------------------------------------
+READ
+
+ITERATE {presort}
+
+SORT
+
+EXECUTE {initialize.label}
+
+ITERATE {forward.pass}
+
+REVERSE {reverse.pass}
+
+ITERATE {bib.sort.order}
+
+SORT
+
+EXECUTE {begin.bib}
+
+EXECUTE {init.state.consts}
+
+ITERATE {call.type$}
+
+EXECUTE {end.bib}
diff --git a/biblio/bibtex/contrib/german/dinat/history.html b/biblio/bibtex/contrib/german/dinat/history.html
new file mode 100644
index 0000000000..4038a66228
--- /dev/null
+++ b/biblio/bibtex/contrib/german/dinat/history.html
@@ -0,0 +1,692 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
+<HTML LANG="de">
+
+<HEAD>
+<META HTTP-EQUIV="Content-Type" CONTENT="text/html; CHARSET=iso-8859-1">
+<META NAME="description" CONTENT="history of the BibTeX styles dinat">
+<META NAME="keywords" CONTENT="history dinat literatur DIN 1505 bibtex">
+<META NAME="resource-type" CONTENT="document">
+<META NAME="distribution" CONTENT="global">
+
+<TITLE>Versions&uuml;bersicht</TITLE>
+
+</HEAD>
+
+<BODY BGCOLOR="white">
+
+<H1>Versions&uuml;bersicht f&uuml;r <A HREF="index.html">dinat</A></H1>
+
+<HR>
+
+<H4>A short note for english speaking people</H4>
+
+<P>
+This page is the version history of the BibTeX style
+<CODE>dinat.bst</CODE>, which produce bibliographies following the german
+norm DIN 1505. Because this norm is only usefull for text in german, all
+extra documentation like these pages is in german, too. Nonetheless the
+styles themselves have comments and output in english. If you like to get
+this pages in english, too, please write me, I'll do my very best.
+</P>
+
+<ADDRESS><A HREF="mailto:helge.baumann@gmx.de">mailto</A>: Helge
+Baumann</ADDRESS>
+<HR>
+
+<H2>Einleitung</H2>
+
+<P>
+Hier werden (hoffentlich) alle &Auml;nderungen und ihr Sinn
+aufgef&uuml;hrt, die zum Erreichen der aktuellen Version des BibTeX-Stils
+<A HREF="dinat.bst">dinat.bst</A> durchgef&uuml;hrt wurden. Ich hoffe, dass
+damit das Verst&auml;ndnis des Stils im Speziellen und von BibTeX im
+Allgemeinen vertieft wird.
+</P>
+
+<HR>
+
+<H4> Zu den <A HREF="#last">letzten &Auml;nderungen</A></H4>
+
+<HR>
+
+<H2>Der Anfang</H2>
+
+<P>
+Einen neuen Stil zu schreiben kam mir zwar auch kurzzeitig in den Sinn,
+aber nach einigen halbherzigen Versuchen habe ich es aufgegeben (hey, ich
+sollte eigentlich meine Diplomarbeit schreiben!) und mich lieber auf die
+Modifikation eines existierenden Stils beschr&auml;nkt. Als Ausgangspunkt
+habe ich den Stil <A
+HREF="http://www.fh-hamburg.de/pers/Lorenzen/bibtex/"><CODE>natdin</CODE></A>
+von <A HREF="http://www.fh-hamburg.de/pers/Lorenzen/">Lorenzen</A>
+genommen, der die grundlegende DIN-Konformit&auml;t schon eingebaut hat,
+allerdings ziemlich fehlerhaft (und chaotisch) ist. Als Gradmesser f&uuml;r
+den Erfolg habe ich anfangs die Datei <CODE>xampl.bib</CODE> verwendet, die
+mit BibTeX mitgeliefert wird. Sie bietet zwar nicht unbedingt DIN-konforme
+Eintr&auml;ge, deckt aber alle Standardf&auml;lle ab.
+</P>
+
+<P>
+Nachdem die Entscheidung gefallen war, einen &quot;neuen&quot; Stil zu
+produzieren, ging es an die Einarbeitung in BibTeX im Allgemeinen und
+<CODE>natdin</CODE> im Besonderen. Irgendwann verstand ich so
+ungef&auml;hr, wie BibTeX mit Hilfe der bst-Dateien aus den Eintr&auml;gen
+der Datenbank eine TeX-Quelle erzeugt und f&uuml;hlte mich gewappnet, dem
+Problem entgegenzutreten.
+</P>
+
+<HR>
+
+<H2>Von NATDIN zu DINAT</H2>
+
+<P>
+Zuallererst musste ich <CODE>natdin</CODE> erstmal zum Laufen bekommen,
+bei mir produzierte das Ding haufenweise Fehlermeldungen und Warnungen.
+Fehler sind schlimmer als Warnungen, also musste ich mich zuerst um diese
+k&uuml;mmern.
+</P>
+
+<H3>Grundlegende Fehler</H3>
+
+<UL>
+ <LI>doppelte Funktionen <CODE>or</CODE> und <CODE>conference</CODE>
+ entfernt</LI>
+</UL>
+
+<P>
+Ab hier lie&szlig; sich der Stil ohne Fehler einlesen, produzierte aber
+noch 48 Fehler mit xampl.bib, ein bischen viel f&uuml;r meinen Geschmack!
+</P>
+
+<H3>Detail-Arbeit</H3>
+
+<P>
+Nun wurden einige &Auml;nderungen durchgef&uuml;hrt, die die Ausgabe nicht
+grundlegend &auml;ndern, aber f&uuml;r das Verst&auml;ndnis des Stils gut
+waren. Das meiste war eigentlich einfaches Aufr&auml;umen, nur ein paar
+Sachen sind mir im Vorbeigehen zus&auml;tzlich aufgefallen, und so habe
+ich sie gleich mit ge&auml;ndert:
+</P>
+
+<UL>
+ <LI>Kommentare komplett entfernt, die meisten betrafen sowieso
+ irgendwelche &Auml;nderungen von vorangegangenen Versionen</LI>
+ <LI>Funktion <CODE>either.or.check</CODE> entfernt, wird nicht aufgerufen</LI>
+ <LI>in <CODE>misc</CODE> <CODE>Norm</CODE> durch <CODE>NORM</CODE>
+ ersetzt</LI>
+ <LI><CODE>[u.~a.~]</CODE> durch <CODE>[u.~a.]</CODE> ersetzt</LI>
+ <LI><CODE>{ 'skip$ }</CODE> durch <CODE>{ skip$ }</CODE> ersetzt</LI>
+ <LI>Formatierung (Einr&uuml;ckungen und Umbr&uuml;che) vereinheitlicht</LI>
+ <LI>Macro f&uuml;r <CODE>mar</CODE> ge&auml;ndert</LI>
+ <LI><CODE>phdthesis</CODE> eingef&uuml;hrt</LI>
+ <LI><CODE>format.pages.book</CODE> ge&auml;ndert</LI>
+ <LI>Funktionen <CODE>show</CODE> und <CODE>show.stack</CODE> f&uuml;r
+ Debugging eingef&uuml;hrt</LI>
+ <LI><CODE>&quot;x&quot; * &quot;y&quot;</CODE> zu
+ <CODE>&quot;xy&quot;</CODE>zusammengezogen</LI>
+ <LI>Funktionsaufrufe <CODE>'name</CODE> durch <CODE>{ name }</CODE>
+ ersetzt</LI>
+ <LI>gemeinsame Teile aus if-Zweigen verschoben bei</LI>
+
+ <UL>
+ <LI><CODE>article.in.journal</CODE></LI>
+ <LI><CODE>format.editors</CODE></LI>
+ <LI><CODE>format.address.publisher.year</CODE></LI>
+ <LI><CODE>format.btitle.vol</CODE></LI>
+ <LI><CODE>format.series.number.din</CODE></LI>
+ <LI><CODE>format.vol.year.num.pages</CODE></LI>
+ <LI><CODE>format.in.ed.booktitle.din</CODE></LI>
+ <LI><CODE>format.tr.number.din</CODE> (umgestellt!)</LI>
+ <LI><CODE>format.book.crossref</CODE></LI>
+ <LI>allen entry-Funktionen</LI>
+ </UL>
+
+ <LI>alle Kommandos ausser ENTRY, INTEGERS und STRINGS an das Ende
+ gesetzt</LI>
+ <LI><CODE>extra.label</CODE> am Ende von <CODE>format.date</CODE>
+ entfernt</LI>
+ <LI>diverse <CODE>tie.or.space.connect</CODE> durch <CODE>*</CODE> ersetzt,
+ falls kein festes Leerzeichen n&ouml;tig</LI>
+</UL>
+
+<P>
+Bis hier waren alle Ma&szlig;nahmen im Prinzip semantik-erhaltend, haben
+damit also an der Anzahl der Fehler nichts ge&auml;ndert! Dies sollte nun
+anders werden ...
+</P>
+
+<H3><I>You can't pop an empty literal stack ...</I>-Fehler</H3>
+
+<UL>
+ <LI>in <CODE>calc.label</CODE> vor <CODE>sortify</CODE> ein
+ <CODE>label</CODE> eingef&uuml;gt</LI>
+</UL>
+
+<P>
+Das entfernte die Fehlermeldungen, die durch das Sortieren hervorgerufen
+wurden. Es blieben noch 12 Fehlermeldungen.
+</P>
+
+<UL>
+ <LI>in <CODE>article.in.journal</CODE> bei leeren <CODE>author</CODE> und
+ <CODE>editor</CODE> kein <CODE>*</CODE></LI>
+</UL>
+
+<P>
+Das behebt den <CODE>empty literal stack</CODE> bei
+<CODE>whole-jounal</CODE>, es bleiben noch 11 <I>the literal stack isn't
+empty ...</I>-Fehler.
+</P>
+
+<H3>Kommentare</H3>
+
+<P>
+Ab hier war das Verst&auml;ndnis des Stils allerdings schon relativ
+gro&szlig;, so dass vorher ein paar weitere Dinge in Angriff genommen
+werden konnten:
+</P>
+
+<UL>
+ <LI>Funktionen etc. kommentiert</LI>
+ <LI>Funktionen umbenannt, um ihren Zweck zu beschreiben:
+
+ <DL>
+ <DT><CODE>out.*</CODE></DT> <DD>Schreibt den obersten Eintrag des Stacks in
+ die bbl-Datei</DD>
+ <DT><CODE>format.*</CODE></DT> <DD>Formatiert den obersten Eintrag des
+ Stacks, d.h. baut ihn irgendwie um, packt aber keinen neuen Eintrag drauf
+ oder entfernt einen</DD>
+ <DT><CODE>push.*</CODE></DT> <DD>Legt genau einen (evtl. leeren) neuen
+ Eintrag auf den Stack</DD>
+ </DL>
+
+ </LI>
+</UL>
+
+<H3><I>the literal stack isn't empty ...</I>-Fehler</H3>
+
+<P>
+Eine naheliegende Ma&szlig;name war das Einf&uuml;gen von
+<CODE>stack$</CODE> am Ende von <CODE>out.bibitem.end</CODE> (ehemals
+<CODE>fin.entry</CODE>), aber das h&auml;tte nur die Symptome kuriert,
+nicht deren Ursache. Also ging es einzeln ans Eingemachte: Es waren alle
+Stellen zu suchen und zu finden, in denen irgendwas auf den Stack gelegt
+wurde, das hinterher nicht verarbeitet wurde. Dazu half die Umbenennung:
+alles mit <CODE>push</CODE> musste etwas (genauer gesagt, exakt
+<STRONG>ein</STRONG> Item) auf den Stack legen, alles mit
+<CODE>format</CODE> dagegen sollte den obersten Stack-Eintrag manipulieren,
+musste ihn also dazu abheben und hinterher wieder drauftun oder/und musste
+etwas daranh&auml;ngen. Gefunden habe ich dann nur den einen Eintrag:
+</P>
+
+<UL>
+ <LI>in <CODE>format.article.in.journal</CODE> bei leerem Titel
+ <CODE>*</CODE> entfernt</LI>
+</UL>
+
+<P>
+Damit (wenn ich nichts vergessen habe) waren alle Fehlermeldungen
+verschwunden, und die Hauptarbeit war getan:
+</P>
+
+<H3>DINAT war geboren!</H3>
+
+<HR>
+
+<H2>Neue Funktionen</H2>
+
+<P>
+Nun ging es daran, neue Funktionen einzubauen bzw. die existierenden
+Formatierungen zu modifizieren:
+</P>
+
+<UL>
+ <LI>Macros f&uuml;r Zeitschriften eingef&uuml;gt</LI>
+ <LI>Leerzeichen vor Verweis in <CODE>format.article.crossref</CODE>
+ eingef&uuml;rht</LI>
+ <LI>fette Verweise (<CODE>\textbf</CODE>) entfernt</LI>
+ <LI>ein Klammerpaar (&quot;{}&quot;) um ehemalige <CODE>\textbf</CODE>
+ entfernt</LI>
+ <LI>zus&auml;tzliche Macros f&uuml;r Monate entfernt</LI>
+ <LI><CODE>pages</CODE> in <CODE>incollection</CODE> und
+ <CODE>inproceedings</CODE> hinter <CODE>series</CODE> und </LI>
+ <CODE>number</CODE> verschoben
+ <LI>alle Ausgaben in Englisch</LI>
+</UL>
+
+<HR>
+
+<H2>URL</H2>
+
+<P>
+Neuere Stile enthalten das Feld URL, also mu&szlig; das auch hier rein
+(au&szlig;erdem brauche ich es selbst!).
+</P>
+
+<UL>
+ <LI>Feld <CODE>url</CODE> eingef&uuml;gt</LI>
+ <LI>Formatierung f&uuml;r <CODE>url</CODE> eingef&uuml;gt</LI>
+ <LI>falls das url-Paket nicht verwendet wird, <CODE>\texttt</CODE> f&uuml;r
+ URL verwenden (<CODE>begin.bib</CODE>)</LI>
+ <LI>bei leerem <CODE>publisher</CODE>, <CODE>author</CODE> und
+ <CODE>editor</CODE> als Impressum die <CODE>url</CODE> verwenden</LI>
+ <LI><CODE>url</CODE> in alle Eintr&auml;ge vor <CODE>note</CODE> eingebaut,
+ allerdings nur, wenn noch nicht im Impressum verwendet</LI>
+</UL>
+
+<HR>
+
+<H2>Von DINAT zu DINNAT</H2>
+
+<P>
+Nachdem der DINAT-Stil so weit gediehen war, kam ich durch Beitr&auml;ge in
+der Newsgruppe <A HREF="news:de.comp.text.tex">de.comp.text.tex</A> auf die
+Idee, den Stil so zu modifizieren, dass er die ganzen
+NATBIB-M&ouml;glichkeiten bietet, also z.B. auch <CODE>\citeyear</CODE> und
+die <CODE>*</CODE>-Formen.
+</P>
+
+<UL>
+ <LI>Klammern um <CODE>year</CODE> in das Label eingebaut
+ (<CODE>calc.label</CODE>)</LI>
+</UL>
+
+<P>
+Leider gingen dabei die Marken vor den Eintr&auml;gen im
+Literaturverzeichnis fl&ouml;ten, so dass ein zweiter Stil n&ouml;tig
+wurde, der allerdings nicht mehr so richtig DIN-konform genannt werden
+kann. Da er aber quasi die Langform von DINAT ist, wurde er DINNAT genannt.
+Falls ich das jemals hinbekomme, die Marken zu erzeugen, wird DINNAT aber
+wieder eingestellt!
+</P>
+
+<P>
+Ab jetzt m&uuml;ssen alle &Auml;nderungen parallel in beiden Stilen
+durchgef&uuml;hrt werden, falls nicht anders vermerkt.
+</P>
+
+<P>
+Damit werden aber schon die zus&auml;tzlichen cite-Versionen
+erm&ouml;glicht, es fehlt allerdings noch die lange Autorenliste.
+</P>
+
+<UL>
+ <LI><CODE>make.full.names</CODE> mit allen in ihr aufgerufenen Funktionen
+ aus den anderen NAT-Stilen in <CODE>dinnat</CODE> eingef&uuml;gt und hinter
+ das bisherige Label eingebaut</LI>
+</UL>
+
+<HR>
+
+<H2>Erste Ver&ouml;ffentlichung am 10.4.2000</H2>
+
+<P>
+Nachdem ich soweit gekommen war, war es an der Zeit, DINAT mit der
+gro&szlig;en b&ouml;sen Welt in Kontakt kommen zu lassen: Eine erste
+Ank&uuml;ndigung erfolgte in der Newsgruppe de.comp.text.tex. Das Ergebnis
+war nicht &uuml;berw&auml;ltigend, aber gr&ouml;&szlig;er als gedacht, und
+vor allem positiv! Ein echter Ansporn, weiter zu arbeiten.
+</P>
+
+<HR>
+
+<H2>Version 1.1 vom 18.4.2000</H2>
+
+<P>
+Wie &uuml;blich finden sich direkt nach Ver&ouml;ffentlichung der ersten
+Version sofort ein paar kleine Fehler, die eine &Uuml;berarbeitung
+notwendig machen:
+</P>
+
+<UL>
+ <LI><CODE>format.dashes</CODE> aus <CODE>push.url</CODE> entfernt</LI>
+ <LI><CODE>out.bibitem.start.end</CODE> in <CODE>out.bibitem.end</CODE>
+ umbenannt (typischer Suchen-und-Ersetzen-Fehler)</LI>
+ <LI><CODE>top$</CODE> durch <CODE>warning$</CODE> ersetzt, falls es nicht
+ f&uuml;r Debugging gebraucht wird</LI>
+ <LI>diverse <CODE>tie.or.space.connect</CODE> durch <CODE>*</CODE> ersetzt,
+ falls der hintere Teil auf jeden Fall l&auml;nger ist, z.B. bei
+ ISBN/ISSN</LI>
+ <LI>diverse Leerzeichen vor bzw. hinter Satzzeichen etc. durch eine Tilde
+ ersetzt (und <CODE>tie.or.space.connect</CODE> durch <CODE>*</CODE>
+ ersetzt)</LI>
+ <LI>&uuml;berfl&uuml;ssige geschweifte Klammern entfernt</LI>
+ <LI><CODE>format.article.in.journal</CODE> vereinfacht</LI>
+ <LI><CODE>push.series.number</CODE> umgestellt</LI>
+</UL>
+
+<P>
+Und nat&uuml;rlich auch ein paar richtige &Auml;nderungen (welche erste
+Verison ist schon korrekt?):
+</P>
+
+<UL>
+ <LI>zur Label-Erzeugung durch <CODE>key</CODE> wird der ganze Eintrag
+ genommen, nicht mehr nur die ersten drei Buchstaben (<A
+ HREF="mailto:rascher@ifn.ing.tu-bs.de">mailto</A>: Kai Rascher)</LI>
+ <LI>zur Label-Erzeugung wird der komplette <CODE>year</CODE>-Eintrag
+ verwendet, nicht nur die letzten vier Stellen, z.B. f&uuml;r
+ von-bis-Angaben (<A HREF="mailto:ulfhinze@gmx.de">mailto</A>: Ulf
+ Hinze)</LI>
+ <LI>bei <CODE>incollection</CODE> und <CODE>inproceedings</CODE> wird auch
+ mit <CODE>crossref</CODE> das Kapitel angegeben</LI>
+ <LI><CODE>push.book.crossref</CODE> vereinfacht</LI>
+</UL>
+
+<P>
+Ab jetzt sind auch diese Webseiten verf&uuml;gbar, ich hoffe, damit werden
+viele Fragen im Vorfeld beantwortet. Irgendwann demn&auml;chst wird diese
+Seite auch umziehen, auf jeden Fall steht die Adresse dann im Vorspann der
+Dateien.
+</P>
+
+<HR>
+
+<H2>Version 1.2 vom 25.4.2000</H2>
+
+<P>
+Nachdem diese Stile und damit auch diese Webseiten (auf Anregungen von <A
+HREF="mailto:niepraschk@ptb.de">mailto</A>: Rolf Niepraschk) die Aufnahme
+in die heiligen Hallen des <A HREF="http://www.ctan.com">CTAN</A> im Pfad
+<CODE>biblio/bibtex/contrib/german/dinat/</CODE> gefunden haben, gibt es
+auch noch ein paar &Auml;nderungen:
+</P>
+
+<UL>
+ <LI>doppelte Leerzeichen entfernt</LI>
+ <LI><CODE>\natexlab</CODE> in <CODE>dinat</CODE> wieder eingef&uuml;hrt
+ (warum war das eigentlich draussen?)</LI>
+ <LI>in <CODE>dinnat</CODE> geschweifte Klammern um <CODE>\natexlab</CODE>
+ und in <CODE>\bibitem[...]</CODE> entfernt</LI>
+ <LI>in <CODE>misc</CODE> wird f&uuml;r <CODE>NORM</CODE> eine beliebige
+ Gro&szlig;-/Kleinschreibung erkannt und verwendet</LI>
+ <LI>bei fehlenden Autor- etc. Angaben wird die gesamte Marke
+ (<CODE>cite$</CODE>) als Label genommen, nicht nur ihre ersten drei
+ Buchstaben</LI>
+ <LI><CODE>push.address.publisher.year</CODE> umgestellt</LI>
+ <LI>diverse <CODE>tie.or.space.connect</CODE> durch <CODE>*</CODE> ersetzt
+ (und Leerzeichen bzw. Tilden eingef&uuml;gt)</LI>
+ <LI>Kommata in <CODE>push.incoll.inproc.crossref</CODE> richtig
+ gesetzt</LI>
+ <LI><CODE>url</CODE> nicht bei fehlenden Verlagsangaben (und nicht
+ fehlenden Autor und Editor!)</LI>
+ <LI>Titel von Normen kursiv</LI>
+ <LI><CODE>crossref</CODE> bei Normen eingef&uuml;gt</LI>
+</UL>
+
+<HR>
+
+<H2>Version 2.0 vom 2.5.2000</H2>
+
+<P>
+Wenn das so weitergeht, komme ich doch noch in einen w&ouml;chentlichen
+Update-Rhythmus :-)
+</P>
+
+<P>
+Ab jetzt gibt es zu den &Auml;nderungen auf dieser Seite auch die Namen und
+Mail-Adressen der Leute, die diese angeregt haben, als Dank und Ansporn
+sozusagen.
+</P>
+
+<UL>
+ <LI>&uuml;berfl&uuml;ssiges Leerzeichen in der Namensliste durch
+ <CODE>format.names</CODE> entfernt (<A
+ HREF="mailto:stefan@snobis.de">mailto</A>: Stefan Nobis)</LI>
+ <LI><CODE>urldate</CODE> als Datum des Zugriffs auf die URL eingebaut (<A
+ HREF="mailto:stefan@snobis.de">mailto</A>: Stefan Nobis)</LI>
+ <LI>Kommentar mit Namen des Stils in <CODE>begin.bib</CODE> zur Ausgabe in
+ die bbl-Datei eingef&uuml;gt (sollte eigentlich Standard sein!)</LI>
+ <LI>einen Punkt hinter den Buchtitel bei Verweisen in
+ <CODE>incollection</CODE> und <CODE>inproceedings</CODE> gesetzt
+ (<CODE>push.incoll.inproc.crossref</CODE>)</LI>
+ <LI>Muster f&uuml;r den Eintrag in <CODE>natbib.cfg</CODE> berichtigt (<A
+ HREF="mailto:stefan@snobis.de">mailto</A>: Stefan Nobis)</LI>
+ <LI>L&ouml;sung des Label-Problems in <CODE>dinnat</CODE> gefunden!<BR>
+ Na gut, keine &uuml;berzeugende, ist mehr ein Hack, aber wenigstens
+ funktioniert es</LI>
+</UL>
+
+<P>
+Diese L&ouml;sung sollte auch mit der Formatierung per
+<CODE>natbib.cfg</CODE> zurechtkommen.<BR>
+Falls die <CODE>natbib</CODE>-Option <CODE>numbers</CODE> oder die
+<CODE>\bibpunct</CODE>-Variante <CODE>n</CODE> gew&auml;hlt wurde, wird
+auch nur ein entsprechendes numerisches Label erzeugt.
+</P>
+
+<P>
+Die letzte &Auml;nderung rechtfertigt den Sprung auf Version 2.0, da nun
+mit einem Stil alle Zitierm&ouml;glichkeiten und Label erreicht werden
+k&ouml;nnen.
+</P>
+
+<P>
+Diese &Auml;nderung f&uuml;hrt dar&uuml;berhinaus zur Zusammenf&uuml;hrung
+der beiden Stile, so dass nur noch ein Stil, n&auml;mlich der eigentlich
+geplante <A HREF="dinat.bst">dinat.bst</A>, &uuml;brigbleibt.
+</P>
+
+<HR>
+
+<H2>Version 2.1 vom 9.5.2000</H2>
+
+<P>
+Und weiter geht es im immerw&auml;hrenden Kreislauf der &Auml;nderungen,
+selbst an meinem Geburtstag (aber schlie&szlig;lich erfolgte die erste
+Ver&ouml;ffentlichung auch am Geburtstag meiner Frau):
+</P>
+
+<UL>
+ <LI>der f&uuml;nfte Parameter von <CODE>\bibpunct</CODE> in der
+ Konfiguration <CODE>natbib.cfg</CODE> erzeugte ein zus&auml;tzliches
+ Leerzeichen in den Zitierungen, also wurde es entfernt</LI>
+ <LI> die Felder <CODE>isbn</CODE>, <CODE>issn</CODE>, <CODE>url</CODE> und
+ <CODE>urldate</CODE> im Vorspann und auf der Webseite erkl&auml;rt
+ (demn&auml;chst wird es auch eine richtige Anleitung geben)</LI>
+ <LI>f&uuml;r <CODE>techreport</CODE> <CODE>url</CODE> als Impressum bei
+ leerem <CODE>institution</CODE>, nicht <CODE>publisher</CODE></LI>
+ <LI>Links hier im Dokument ge&auml;ndert: Mailadressen werden jetzt
+ &uuml;ber <CODE>mailto:</CODE> verlinkt, Webseiten &uuml;ber den Namen</LI>
+ <LI>alle Texte in Funktionen verlagert, um sie leichter &auml;nderbar zu
+ machen, z.B. f&uuml;r Leute, die <CODE>et.al.</CODE> statt
+ <CODE>u.a.</CODE> haben wollen (<A
+ HREF="mailto:baum@mbox.cri.uni-hannover.de">mailto</A>: Peter Baum)</LI>
+ <LI><CODE>push.editors.organization</CODE> in
+ <CODE>push.organization</CODE> umbenannt und umgebaut</LI>
+ <LI><CODE>push.editors</CODE> umgebaut</LI>
+ <LI>damit wurde auch <CODE>push.ed.incoll</CODE> &uuml;berfl&uuml;ssig</LI>
+ <LI><CODE>push.authors.editors</CODE> neu erstellt und eingebunden</LI>
+ <LI>die letzten vier &Auml;nderungen machten auch einige &Auml;nderungen an
+ anderen Funktionen notwendig</LI>
+ <LI>kleinerer Abstand bei <CODE>u.a.</CODE>: <CODE>\,</CODE> statt
+ <CODE>~</CODE></LI>
+ <LI><CODE>format.article.in.journal</CODE> zu
+ <CODE>push.article.in.journal</CODE> umgebaut</LI>
+ <LI><CODE>\cite</CODE> durch <CODE>\citep</CODE> ersetzt</LI>
+ <LI><CODE>push.crossref.editor</CODE> entfernt, da es nicht benutzt
+ wurde</LI>
+ <LI>in vielen Funktionen kleinere Umstellungen vorgenommen, um den Code
+ verst&auml;ndlicher und wartungsfreundlicher zu machen</LI>
+</UL>
+
+<HR>
+<A NAME="last"></A>
+
+<H2>Version 2.2 vom 12.07.2000</H2>
+
+<P>
+Nachdem die Diplomarbeit abgegeben war, war wieder Zeit f&uuml;r
+die Arbeit an dinat, dachte ich. Aber dann kam die neue Wohnung, der
+Umzug, das Einrichten, der neue Job usw. Aber nun ist es geschafft, eine
+neue Version ist fertig, wenn auch nicht so neu wie erhofft:
+</P>
+
+<UL>
+ <LI><CODE>push.crossref</CODE> erstellt und eingebaut</LI>
+ <LI>diverse <CODE>crossref</CODE> ge&auml;ndert</LI>
+ <LI><CODE>out.check</CODE> in <CODE>out.check.required</CODE>
+ umbenannt</LI>
+ <LI><CODE>out.check.din</CODE> eingebaut f&uuml;r nur nach DIN
+ fehlende Teile</LI>
+ <LI><CODE>mastersthesis</CODE> in <CODE>masterthesis</CODE>
+ korrigiert</LI>
+ <LI><CODE>Zugriffsdatum</CODE> ebenfalls richtig geschrieben</LI>
+ <LI>um <CODE>\,</CODE> geschweifte Klammern gesetzt, hoffentlich
+ behebt das den nervigen <CODE>\nobreakspace{}</CODE>-Fehler
+</UL>
+
+<P>
+Vor allem f&uuml;r das letztere erbitte ich Meldungen, ob es geholfen hat!
+</P>
+
+<HR>
+
+<H2>Version 2.3 vom 03.10.2000</H2>
+
+<P>
+Nun ist der erste Stress mit neuer Wohnung, neuem Job etc. weg, viele viele
+Vorschl&auml;ge f&uuml;r dinat sind eingegegangen, und jetzt habe ich auch Zeit
+f&uuml;r eine neue Version gefunden. Diese bringt noch nicht die
+angek&uuml;ndigten gro&szlig;en &Auml;nderungen, sondern wie die vorigen vor
+allem Detailverbesserungen, wenn auch einige lange geforderte:
+</P>
+
+<UL>
+ <LI><CODE>masterthesis</CODE> wieder in das korrekte <CODE>mastersthesis</CODE>
+ ge&auml;ndert. Entschuldigung an alle f&uuml;r diese schlampige Korrektur, da
+ hatte ich mich aufs Glatteis f&uuml;hren lassen und selbst nicht genug
+ recherchiert. Um den Frust nicht zu gro&szlig; werden zu lassen, bleibt
+ <CODE>masterthesis</CODE> erhalten.</LI>
+ <LI>die letzten Vorkommen von <CODE>u.~a.</CODE> beseitigt, nun sollten
+ wirklich alle <CODE>\nobreakspace{}</CODE>-Fehler weg sein!</LI>
+ <LI>als Abstand zwischen der Marke und dem Eintrag wird nun
+ standardm&auml;&szlig;ig <CODE>\labelsep</CODE> verwendet, wie es sich
+ geh&ouml;rt.</LI>
+ <LI><CODE>...key.organization.label</CODE> korrigiert, so dass nun die
+ ganze Organisation als Label verwendet wird.</LI>
+ <LI>in <CODE>proceedings</CODE> wird jetzt eine leere Organisation
+ abgefangen und falls vorhanden durch (Hrsg.) erg&auml;nzt.</LI>
+</UL>
+
+<P>
+<A NAME="doku">Und die Dokumentation ist immer noch nicht fertig.</A>
+</P>
+
+<HR>
+
+<H2>Version 2.4 vom 05.11.2000</H2>
+
+<P>
+Diese Version ist eine Olaf-Meltzer-Dank-Ausgabe, da er die
+meisten &Auml;nderungen zu dieser Version beigetragen hat. Ich hatte
+eigentlich nur ein wenig zu tun mit dem Zusammentragen und
+Ver&ouml;ffentlichen. Dachte ich jedenfalls, bis ich mich an die
+Namens-Formatierung machte ... Aber trotzdem, er hat es verdient, da er
+nicht nur Fragen stellt, sondern auch selbst gute L&ouml;sungen liefert!
+</P>
+
+<UL>
+ <LI><CODE>inbook</CODE> verbessert. Nun wird bei der Zitierung eines
+ einzelnen Teils eines Buchs nur eine einzelne Literaturangabe mit allen Werten
+ genriert. Wenn dagegen mehr als ein Teil eines Buchs zitiert werden, wird
+ das Buch mit allen Angaben aufgef&uuml;hrt und die jeweiligen Teile mit einem
+ entsprechenden Verweis (<A HREF="mailto:Olaf.Meltzer@freenet.de">mailto</A>: Olaf Meltzer).</LI>
+ <LI>&uuml;berfl&uuml;ssigen Satzanfang aus <CODE>proceedings</CODE> entfernt
+ (<A HREF="mailto:Olaf.Meltzer@freenet.de">mailto</A>: Olaf Meltzer).</LI>
+ <LI>fehlenden Doppelpunkt nach Autor/Editor in <CODE>misc</CODE>
+ erg&auml;nzt (<A HREF="mailto:Olaf.Meltzer@freenet.de">mailto</A>: Olaf Meltzer).</LI>
+ <LI>wegen Problemen mit Adelspr&auml;dikaten wurden die Funktionen
+ <CODE>format.full.names</CODE>, <CODE>format.names</CODE> und
+ <CODE>sort.format.names</CODE> &uuml;berarbeitet. Dabei fiel ab:
+ <UL>
+ <LI>die Variable <CODE>numnames</CODE> konnte entfernt werden.</LI>
+ <LI>die Variable <CODE>zahl</CODE> wurde in <CODE>pos</CODE> umbenannt,
+ da sie nicht einfach eine Zahl ist, sondern eine Position angibt.</LI>
+ <LI>die Variable <CODE>lang</CODE> wurde entfernt und statt dessen
+ die Variable <CODE>len</CODE> verwendet.</LI>
+ <LI>das allgemeine Verst&auml;ndnis der Namensformatierung wurde
+ gr&ouml;&szlig;er!</LI>
+ </UL></LI>
+ <LI>innerhalb der ISBN/ISSN wird laut Duden der Binde-, also
+ Trennstrich verwendet, also keine Verdoppelung des <CODE>-</CODE>
+ mehr (sollte eigentlich schon lange gemacht sein).</LI>
+ <LI>Bei der Gelegenheit auch <CODE>format.dashes</CODE> etwas
+ aufger&auml;umt und verstanden.</LI>
+</UL>
+
+<P>
+Zum Stand der Dokumentation siehe <A HREF="#doku">oben</A>. Aber
+inzwischen habe ich sehr viele Beispiel-Eintr&auml;ge sammeln k&ouml;nnen!
+</P>
+
+<HR>
+<A NAME="last"></A>
+
+<H2>Version 2.5 vom 15.11.2000</H2>
+
+<P>
+Und direkt nach der letzten Version nun schon wieder eine neue.
+Es haben sich einfach ein paar Dinge ergeben, die mir sinnvoll erschienen
+und eine echte Verbesserung darstellen. Au&szlig;erdem habe ich gerade
+etwas Zeit.
+</P>
+
+<UL>
+ <LI>In <CODE>proceedings</CODE> fehlendes <CODE>*</CODE> hinter
+ <CODE>push.organization</CODE> angef&uuml;gt (<A
+ HREF="mailto:huhr@uni-paderborn.de">mailto</A>: Holger Uhr).</LI>
+ <LI>In <CODE>dinatlabel</CODE> wird nicht mehr <CODE>\citealt</CODE>
+ aufgerufen, sondern ein eigenes Label (<CODE>dinat.label</CODE>) gebastelt.
+ Dies spart einen LaTeX-Durchgang und erm&ouml;glicht vor allem das
+ Entfernen eines Zitats aus dem Text, ohne alle <CODE>.aux</CODE>-Dateien
+ wegschmeissen zu m&uuml;ssen. Ausserdem verhindert es &uuml;berfl&uuml;ssige
+ Links, wenn das <CODE>hypertext</CODE>-Paket verwendet wird (<A
+ HREF="mailto:ben.samwer@ptb.de">mailto</A>: Ben Samwer).</LI>
+ <LI>Wenn ein Wert f&uuml;r <CODE>key</CODE> vorhanden ist, wird dieser
+ immer f&uuml;r das Label verwendet, vor <CODE>author</CODE>,
+ <CODE>editor</CODE> etc. Die dahinterliegende &Uuml;berlegung ist, dass
+ ein <CODE>key</CODE> wohl nur angegeben wird, wenn er Sinn macht. Ist dann
+ aber ein <CODE>author</CODE> o.&Auml;. vorhanden, w&uuml;rde
+ <CODE>key</CODE> nirgendwo auftauchen. So lassen sich nun auch Werke mit
+ Autorenangaben etc. mit einer evtl. &uuml;blicheren Kurzbezeichnung zitieren (<A
+ HREF="mailto:ben.samwer@ptb.de">mailto</A>: Ben Samwer)</LI>.
+ <LI>Dazu wurden alle <CODE>...label</CODE>-Funktionen umgestellt und
+ auch umbenannt.</LI>
+ <LI>Und die <CODE>...sort</CODE>-Funktionen mussten ebenfalls
+ angepasst werden.</LI>
+ <LI><CODE>longest.label.width</CODE> und <CODE>longest.label</CODE> wurden
+ nicht benutzt, also wurden sie entfernt. Urspr&uuml;nglich waren die Variablen
+ wohl zur Bestimmung der Einr&uuml;cktiefe im Literaturverzeichnis
+ gedacht, was aber bei Autor-Jahr-Labels wenig Sinn macht, vor allem
+ wenn man an Werke mit zwei Autoren denkt, deren Label allein schon eine
+ ganze Zeile f&uuml;llen kann.</LI>
+ <LI><CODE>initialize.longest.label</CODE> in <CODE>initialize.label</CODE>
+ umbenannt und vereinfacht.</LI>
+ <LI><CODE>number.label</CODE> in <CODE>label.count</CODE>
+ umbenannt.</LI>
+ <LI>Die <A HREF="index.html">Webseite</A> von Fehlern bereinigt.</LI>
+</UL>
+
+<P>
+Ein Problem bleibt die Sortierung von Eintr&auml;gen mit gleichem ersten
+(<EM>A</EM>), aber verschiedenem zweiten Autor (<EM>B</EM> bzw. <EM>C</EM>)
+sowie mindestens einem weiteren Autoren (<EM>D</EM>) und unterschiedlicher
+Jahreszahl (<EM>1994</EM> bzw. <EM>1999</EM>). Das Label wird dann aus erstem
+Autor und Jahr gebildet (<EM>A u.a. 1994</EM> bzw. <EM>A u.a. 1999</EM>) und
+entsprechend sortiert. Wird aber das Label nicht angezeigt, z.B. bei
+numerischer Zitierung, dann wird das Werk <EM>A, B und D 1999</EM> trotzdem
+hinter <EM>A, C und D 1994</EM> einsortiert, was zu Verwirrung f&uuml;hren kann.
+Dies ist aber nicht befriedigend zu l&ouml;sen, da zur Sortierzeit nicht
+zwischen den beiden Zitierungsarten unterschieden werden kann. Da laut DIN
+nach dem Label sortiert wird, behalte ich dieses bei, da ja die numerische
+Zitierung nicht DIN entspricht.
+</P>
+
+<HR>
+<ADDRESS><A HREF="mailto:helge.baumann@gmx.de">mailto</A>: Helge Baumann,
+2000-11-15</ADDRESS>
+
+</BODY>
+
+</HTML>
diff --git a/biblio/bibtex/contrib/germbib/README.bibgerm b/biblio/bibtex/contrib/germbib/README.bibgerm
new file mode 100644
index 0000000000..722ce8706e
--- /dev/null
+++ b/biblio/bibtex/contrib/germbib/README.bibgerm
@@ -0,0 +1,24 @@
+REAMDE to bibgerm.sty
+=====================
+
+History:
+
+- Macros for german `BibTeX'ing added to Style Option `german' 20 Apr 1993
+ idea and languages `german' and `USenglish' implemented by M. Wallmeier
+- Modified for LaTeX 2e and german.sty 2.5b by A. Scherer 1 Nov 1995
+- Modified for ngerman.sty and babel.sty by H. Harders 21 August 2000
+
+
+The package bibgerm.sty now supports the language packages ngerman.sty and
+babel.sty.
+If using LaTeX2e you can load either german.sty, ngerman.sty or babel.sty
+before or after bibgerm.sty. If none of these packages is used bibgerm
+behaves as before and loads german.sty.
+If using LaTeX 2.09 you can load german.sty or ngerman.sty _before_
+bibgerm.sty.
+
+The file test/testbibgerm.tex tests the new version of bibgerm.sty.
+
+2000-08-21
+Harald harders
+h.harders@tu-bs.de
diff --git a/biblio/bibtex/contrib/germbib/bst/gerabbrv.bst b/biblio/bibtex/contrib/germbib/bst/gerabbrv.bst
new file mode 100644
index 0000000000..1f6088715d
--- /dev/null
+++ b/biblio/bibtex/contrib/germbib/bst/gerabbrv.bst
@@ -0,0 +1,1208 @@
+% BibTeX standard bibliography style `abbrv'
+ % version 0.99a for BibTeX versions 0.99a or later, LaTeX version 2.09.
+ % Copyright (C) 1985, all rights reserved.
+ % Copying of this file is authorized only if either
+ % (1) you make absolutely no changes to your copy, including name, or
+ % (2) if you do make changes, you name it something other than
+ % btxbst.doc, plain.bst, unsrt.bst, alpha.bst, and abbrv.bst.
+ % This restriction helps ensure that all standard styles are identical.
+ % The file btxbst.doc has the documentation for this style.
+% 15-feb-92 (MW) Updated for use with `bibgerman.sty': things like "and"
+% change with the language. Switch the language using the
+% language field:
+% language = "german" | "USenglish" | "english"
+% Then a `\selectlanguage{...}' command will be pushed just
+% before the `\bibitem...' command for the entry in work.
+% 2003/03/31 Harald Harders Fixed bug in detection of "and others"
+% 2003/04/29 Harald Harders Fixed bug format of names. For multiple
+% names, some of them were not typeset in
+% small caps.
+
+ENTRY
+ { address
+ author
+ booktitle
+ chapter
+ edition
+ editor
+ howpublished
+ institution
+ journal
+ key
+ language
+ month
+ note
+ number
+ organization
+ pages
+ publisher
+ school
+ series
+ title
+ type
+ volume
+ year
+ }
+ {}
+ { label }
+
+INTEGERS { output.state before.all mid.sentence after.sentence after.block before.title }
+
+STRINGS { s t language.state language.temp }
+
+FUNCTION {init.state.consts}
+{ #0 'before.all :=
+ #1 'mid.sentence :=
+ #2 'after.sentence :=
+ #3 'after.block :=
+ #4 'before.title :=
+ "nostate" 'language.state :=
+}
+
+FUNCTION {language.state.test}
+{
+ 'language.temp :=
+ language.temp language.state =
+ { #1 }
+ { #0 }
+ if$
+}
+
+FUNCTION {not}
+{ { #0 }
+ { #1 }
+ if$
+}
+
+FUNCTION {and}
+{ 'skip$
+ { pop$ #0 }
+ if$
+}
+
+FUNCTION {or}
+{ { pop$ #1 }
+ 'skip$
+ if$
+}
+
+FUNCTION {output.nonnull}
+{ 's :=
+ output.state mid.sentence =
+ { ", " * write$ }
+ { output.state after.block =
+ { add.period$ write$
+ newline$
+ "\newblock " write$
+ }
+ { output.state before.all =
+ 'write$
+ % next if is for use with `new' FUNCTION {after.authors}
+ { output.state before.title =
+ { ": " * write$ }
+ { add.period$ " " * write$ }
+ if$
+ }
+ if$
+ }
+ if$
+ mid.sentence 'output.state :=
+ }
+ if$
+ s
+}
+
+FUNCTION {output}
+{ duplicate$ empty$
+ 'pop$
+ 'output.nonnull
+ if$
+}
+
+FUNCTION {output.check}
+{ 't :=
+ duplicate$ empty$
+ { pop$ "empty " t * " in " * cite$ * warning$ }
+ 'output.nonnull
+ if$
+}
+
+FUNCTION {output.bibitem}
+{ newline$
+ language empty$
+ 'skip$
+ { language.state language =
+ 'skip$
+ { "\selectlanguage{\" language * "}" * write$
+ newline$
+ }
+ if$
+ language 'language.state :=
+ }
+ if$
+ "\bibitem{" write$
+ cite$ write$
+ "}" write$
+ newline$
+ ""
+ before.all 'output.state :=
+}
+
+FUNCTION {fin.entry}
+{ add.period$
+ write$
+ newline$
+}
+
+FUNCTION {new.block}
+{ output.state before.all =
+ 'skip$
+ { after.block 'output.state := }
+ if$
+}
+
+FUNCTION {new.sentence}
+{ output.state after.block =
+ 'skip$
+ { output.state before.all =
+ 'skip$
+ { after.sentence 'output.state := }
+ if$
+ }
+ if$
+}
+
+% new one -> sets what is specified in FUNCTION {output.nonnull}
+% if `before.title 'output.state = ... if$' is true
+FUNCTION {after.authors}
+{ output.state before.all =
+ 'skip$
+ { before.title 'output.state := }
+ if$
+}
+
+FUNCTION {new.block.checka}
+{ empty$
+ 'skip$
+ 'new.block
+ if$
+}
+
+FUNCTION {new.block.checkb}
+{ empty$
+ swap$ empty$
+ and
+ 'skip$
+ 'new.block
+ if$
+}
+
+FUNCTION {new.block.checkc}
+{ empty$
+ swap$ empty$
+ and
+ 'skip$
+ 'after.authors
+ if$
+}
+
+FUNCTION {new.sentence.checka}
+{ empty$
+ 'skip$
+ 'new.sentence
+ if$
+}
+
+FUNCTION {new.sentence.checkb}
+{ empty$
+ swap$ empty$
+ and
+ 'skip$
+ 'new.sentence
+ if$
+}
+
+FUNCTION {field.or.null}
+{ duplicate$ empty$
+ { pop$ "" }
+ 'skip$
+ if$
+}
+
+FUNCTION {emphasize}
+{ duplicate$ empty$
+ { pop$ "" }
+ { "{\em " swap$ * "\/}" * }
+ if$
+}
+
+FUNCTION {smallcaps}
+{ duplicate$ empty$
+ { pop$ "" }
+ { "{\sc " swap$ * "}" * }
+ if$
+}
+
+INTEGERS { nameptr namesleft numnames }
+
+FUNCTION {format.names}
+{ 's :=
+ #1 'nameptr :=
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ { nameptr #1 >
+ { s nameptr "{f.~}{vv~}{ll}{, jj}" format.name$ 't :=
+ namesleft #1 >
+ { ", " * t smallcaps * }
+ { numnames #2 >
+ { "english" language.state.test
+ "USenglish" language.state.test
+ or
+ {"," * }
+ 'skip$
+ if$
+ }
+ 'skip$
+ if$
+ t "others" =
+ { " \btxetalshort{.}" * }
+ { " \btxandshort{.}\ " * t smallcaps * }
+ if$
+ }
+ if$
+ }
+ { s nameptr "{ll}{, jj}{, f.}{~vv}" format.name$ smallcaps }
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+}
+
+FUNCTION {format.authors}
+{ author empty$
+ { "" }
+ { author format.names }
+ if$
+}
+
+FUNCTION {format.editors}
+{ editor empty$
+ { "" }
+ { editor format.names
+ editor num.names$ #1 >
+ { "\ (\btxeditorsshort{.})" * }
+ { "\ (\btxeditorshort{.})" * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.title}
+{ title empty$
+ { "" }
+ { "english" language.state.test
+ "USenglish" language.state.test
+ or
+ { title "t" change.case$ emphasize }
+ { title emphasize }
+ if$
+ }
+ if$
+}
+
+FUNCTION {n.dashify}
+{ 't :=
+ ""
+ { t empty$ not }
+ { t #1 #1 substring$ "-" =
+ { t #1 #2 substring$ "--" = not
+ { "--" *
+ t #2 global.max$ substring$ 't :=
+ }
+ { { t #1 #1 substring$ "-" = }
+ { "-" *
+ t #2 global.max$ substring$ 't :=
+ }
+ while$
+ }
+ if$
+ }
+ { t #1 #1 substring$ *
+ t #2 global.max$ substring$ 't :=
+ }
+ if$
+ }
+ while$
+}
+
+FUNCTION {format.date}
+{ year empty$
+ { month empty$
+ { "" }
+ { "there's a month but no year in " cite$ * warning$
+ month
+ }
+ if$
+ }
+ { month empty$
+ 'year
+ { month "\ " * year * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.btitle}
+{ title emphasize
+}
+
+FUNCTION {tie.or.space.connect}
+{ duplicate$ text.length$ #3 <
+ { "~" }
+ { "\ " }
+ if$
+ swap$ * *
+}
+
+FUNCTION {either.or.check}
+{ empty$
+ 'pop$
+ { "can't use both " swap$ * " fields in " * cite$ * warning$ }
+ if$
+}
+
+FUNCTION {format.bvolume}
+{ volume empty$
+ { "" }
+ { output.state after.block =
+ { "\Btxvolumeshort{.}" }
+ { "\btxvolumeshort{.}" }
+ if$
+ volume tie.or.space.connect
+ series empty$
+ 'skip$
+ { " \btxofseriesshort{.}\ " * series emphasize * }
+ if$
+ "volume and number" number either.or.check
+ }
+ if$
+}
+
+FUNCTION {format.number.series}
+{ volume empty$
+ { number empty$
+ { series field.or.null }
+ { output.state mid.sentence =
+ { "\btxnumbershort{.}" }
+ { "\Btxnumbershort{.}" }
+ if$
+ number tie.or.space.connect
+ series empty$
+ { "there's a number but no series in " cite$ * warning$ }
+ { " \btxinseriesshort{.}\ " * series emphasize * }
+ if$
+ }
+ if$
+ }
+ { "" }
+ if$
+}
+
+FUNCTION {format.edition}
+{ edition empty$
+ { "" }
+ { "english" language.state.test
+ "USenglish" language.state.test
+ or
+ { output.state mid.sentence =
+ { edition "l" change.case$ " \btxeditionshort{.}" * }
+ { edition "t" change.case$ " \btxeditionshort{.}" * }
+ if$
+ }
+ { edition " \btxeditionshort{.}" * }
+ if$
+ }
+ if$
+}
+
+INTEGERS { multiresult }
+
+FUNCTION {multi.page.check}
+{ 't :=
+ #0 'multiresult :=
+ { multiresult not
+ t empty$ not
+ and
+ }
+ { t #1 #1 substring$
+ duplicate$ "-" =
+ swap$ duplicate$ "," =
+ swap$ "+" =
+ or or
+ { #1 'multiresult := }
+ { t #2 global.max$ substring$ 't := }
+ if$
+ }
+ while$
+ multiresult
+}
+
+FUNCTION {format.pages}
+{ pages empty$
+ { "" }
+ { pages multi.page.check
+ { "\btxpagesshort{.}" pages n.dashify tie.or.space.connect }
+ { "\btxpageshort{.}" pages tie.or.space.connect }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.vol.num.pages}
+{ volume field.or.null
+ number empty$
+ 'skip$
+ { "(" number * ")" * *
+ volume empty$
+ { "there's a number but no volume in " cite$ * warning$ }
+ 'skip$
+ if$
+ }
+ if$
+ pages empty$
+ 'skip$
+ { duplicate$ empty$
+ { pop$ format.pages }
+ { ":" * pages n.dashify * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.chapter.pages}
+{ chapter empty$
+ 'format.pages
+ { type empty$
+ { "\btxchaptershort{.}" }
+ { "english" language.state.test
+ "USenglish" language.state.test
+ or
+ { type "l" change.case$ }
+ { type }
+ if$
+ }
+ if$
+ chapter tie.or.space.connect
+ pages empty$
+ 'skip$
+ { ", " * format.pages * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.in.ed.booktitle}
+{ booktitle empty$
+ { "" }
+ { editor empty$
+ { "\Btxinshort{.}\ " booktitle emphasize * }
+ { "\Btxinshort{.}\ " format.editors * ": " * booktitle emphasize * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {empty.misc.check}
+{ author empty$ title empty$ howpublished empty$
+ month empty$ year empty$ note empty$
+ and and and and and
+ key empty$ not and
+ { "all relevant fields are empty in " cite$ * warning$ }
+ 'skip$
+ if$
+}
+
+FUNCTION {format.thesis.type}
+{ type empty$
+ 'skip$
+ { pop$
+ "english" language.state.test
+ "USenglish" language.state.test
+ or
+ { type "t" change.case$ }
+ { type }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.tr.number}
+{ type empty$
+ { "\Btxtechrepshort{.}" }
+ 'type
+ if$
+ number empty$
+ { "english" language.state.test
+ "USenglish" language.state.test
+ or
+ { type empty$
+ { pop$ "\btxtechreplong{}" }
+ { "t" change.case$ }
+ if$
+ }
+ 'skip$
+ if$
+ }
+ { number tie.or.space.connect }
+ if$
+}
+
+FUNCTION {format.article.crossref}
+{ key empty$
+ { journal empty$
+ { "need key or journal for " cite$ * " to crossref " * crossref *
+ warning$
+ ""
+ }
+ { "\Btxinshort{.}\ " journal emphasize * }
+ if$
+ }
+ { "\Btxinshort{.}\ " key emphasize * }
+ if$
+ " \cite{" * crossref * "}" *
+}
+
+FUNCTION {format.crossref.editor}
+{ editor #1 "{ll}{, jj}{, f.}{~vv}" format.name$ smallcaps
+ editor num.names$ duplicate$
+ #2 >
+ { pop$ " \btxetalshort{.}" * }
+ { #2 <
+ 'skip$
+ { editor #2 "{ff }{vv }{ll}{ jj}" format.name$ "others" =
+ { " \btxetalshort{.}" * }
+ { " \btxandshort{.}\ " * editor #2 "{vv~}{ll}" format.name$ smallcaps * }
+ if$
+ }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.book.crossref}
+{ volume empty$
+ { "empty volume in " cite$ * "'s crossref of " * crossref * warning$
+ "\Btxinshort{.}\ "
+ }
+ { "\Btxvolumeshort{.}" volume tie.or.space.connect
+ " \btxofseriesshort{.}\ " *
+ }
+ if$
+ editor empty$
+ editor field.or.null author field.or.null =
+ or
+ { key empty$
+ { series empty$
+ { "need editor, key, or series for " cite$ * " to crossref " *
+ crossref * warning$
+ "" *
+ }
+ { series emphasize * }
+ if$
+ }
+ { key emphasize * }
+ if$
+ }
+ { "\Btxinshort{.}\ " format.crossref.editor * }
+ if$
+ " \cite{" * crossref * "}" *
+}
+
+FUNCTION {format.incoll.inproc.crossref}
+{ editor empty$
+ editor field.or.null author field.or.null =
+ or
+ { key empty$
+ { booktitle empty$
+ { "need editor, key, or booktitle for " cite$ * " to crossref " *
+ crossref * warning$
+ ""
+ }
+ { "\Btxinshort{.}\ " booktitle emphasize * }
+ if$
+ }
+ { "\Btxinshort{.}\ " key emphasize * }
+ if$
+ }
+ { "\Btxinshort{.}\ " format.crossref.editor * }
+ if$
+ " \cite{" * crossref * "}" *
+}
+
+FUNCTION {article}
+{ output.bibitem
+ format.authors "author" output.check
+ after.authors
+ format.title "title" output.check
+ new.block
+ crossref missing$
+ { journal
+ title missing$
+ { emphasize }
+ 'skip$
+ if$
+ "journal" output.check
+ format.vol.num.pages output
+ format.date "year" output.check
+ }
+ { format.article.crossref output.nonnull
+ format.pages output
+ }
+ if$
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {book}
+{ output.bibitem
+ author empty$
+ { format.editors "author and editor" output.check }
+ { format.authors output.nonnull
+ crossref missing$
+ { "author and editor" editor either.or.check }
+ 'skip$
+ if$
+ }
+ if$
+ after.authors
+ format.btitle "title" output.check
+ crossref missing$
+ { format.bvolume output
+ new.block
+ format.number.series output
+ new.sentence
+ publisher "publisher" output.check
+ address output
+ }
+ { new.block
+ format.book.crossref output.nonnull
+ }
+ if$
+ format.edition output
+ format.date "year" output.check
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {booklet}
+{ output.bibitem
+ format.authors output
+ after.authors
+ format.title "title" output.check
+ howpublished address new.block.checkb
+ howpublished output
+ address output
+ format.date output
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {inbook}
+{ output.bibitem
+ author empty$
+ { format.editors "author and editor" output.check }
+ { format.authors output.nonnull
+ crossref missing$
+ { "author and editor" editor either.or.check }
+ 'skip$
+ if$
+ }
+ if$
+ after.authors
+ format.btitle "title" output.check
+ crossref missing$
+ { format.bvolume output
+ format.chapter.pages "chapter and pages" output.check
+ new.block
+ format.number.series output
+ new.sentence
+ publisher "publisher" output.check
+ address output
+ }
+ { format.chapter.pages "chapter and pages" output.check
+ new.block
+ format.book.crossref output.nonnull
+ }
+ if$
+ format.edition output
+ format.date "year" output.check
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {incollection}
+{ output.bibitem
+ format.authors "author" output.check
+ after.authors
+ format.title "title" output.check
+ new.block
+ crossref missing$
+ { format.in.ed.booktitle "booktitle" output.check
+ format.bvolume output
+ format.number.series output
+ format.chapter.pages output
+ new.sentence
+ publisher "publisher" output.check
+ address output
+ format.edition output
+ format.date "year" output.check
+ }
+ { format.incoll.inproc.crossref output.nonnull
+ format.chapter.pages output
+ }
+ if$
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {inproceedings}
+{ output.bibitem
+ format.authors "author" output.check
+ after.authors
+ format.title "title" output.check
+ new.block
+ crossref missing$
+ { format.in.ed.booktitle "booktitle" output.check
+ format.bvolume output
+ format.number.series output
+ format.pages output
+ address empty$
+ { organization publisher new.sentence.checkb
+ organization output
+ publisher output
+ format.date "year" output.check
+ }
+ { address output.nonnull
+ format.date "year" output.check
+ new.sentence
+ organization output
+ publisher output
+ }
+ if$
+ }
+ { format.incoll.inproc.crossref output.nonnull
+ format.pages output
+ }
+ if$
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {conference} { inproceedings }
+
+FUNCTION {manual}
+{ output.bibitem
+ author empty$
+ { organization empty$
+ 'skip$
+ { organization smallcaps output.nonnull
+ address output
+ }
+ if$
+ }
+ { format.authors output.nonnull }
+ if$
+ after.authors
+ format.btitle "title" output.check
+ author empty$
+ { organization empty$
+ { address new.block.checka
+ address output
+ }
+ 'skip$
+ if$
+ }
+ { organization address new.block.checkb
+ organization output
+ address output
+ }
+ if$
+ format.edition output
+ format.date output
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {mastersthesis}
+{ output.bibitem
+ format.authors "author" output.check
+ after.authors
+ format.title "title" output.check
+ new.block
+ "\btxmastthesis{}" format.thesis.type output.nonnull
+ school "school" output.check
+ address output
+ format.date "year" output.check
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {misc}
+{ output.bibitem
+ format.authors output
+ title howpublished new.block.checkc
+ format.title output
+ howpublished new.block.checka
+ howpublished output
+ format.date output
+ new.block
+ note output
+ fin.entry
+ empty.misc.check
+}
+
+FUNCTION {phdthesis}
+{ output.bibitem
+ format.authors "author" output.check
+ after.authors
+ format.btitle "title" output.check
+ new.block
+ "\btxphdthesis{}" format.thesis.type output.nonnull
+ school "school" output.check
+ address output
+ format.date "year" output.check
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {proceedings}
+{ output.bibitem
+ editor empty$
+ { organization smallcaps output }
+ { format.editors output.nonnull }
+ if$
+ after.authors
+ format.btitle "title" output.check
+ format.bvolume output
+ format.number.series output
+ address empty$
+ { editor empty$
+ { publisher new.sentence.checka }
+ { organization publisher new.sentence.checkb
+ organization output
+ }
+ if$
+ publisher output
+ format.date "year" output.check
+ }
+ { address output.nonnull
+ format.date "year" output.check
+ new.sentence
+ editor empty$
+ 'skip$
+ { organization output }
+ if$
+ publisher output
+ }
+ if$
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {techreport}
+{ output.bibitem
+ format.authors "author" output.check
+ after.authors
+ format.title "title" output.check
+ new.block
+ format.tr.number output.nonnull
+ institution "institution" output.check
+ address output
+ format.date "year" output.check
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {unpublished}
+{ output.bibitem
+ format.authors "author" output.check
+ after.authors
+ format.title "title" output.check
+ new.block
+ note "note" output.check
+ format.date output
+ fin.entry
+}
+
+FUNCTION {default.type} { misc }
+
+MACRO {jan} {"\btxmonjanshort{.}"}
+
+MACRO {feb} {"\btxmonfebshort{.}"}
+
+MACRO {mar} {"\btxmonmarshort{.}"}
+
+MACRO {apr} {"\btxmonaprshort{.}"}
+
+MACRO {may} {"\btxmonmayshort{.}"}
+
+MACRO {jun} {"\btxmonjunshort{.}"}
+
+MACRO {jul} {"\btxmonjulshort{.}"}
+
+MACRO {aug} {"\btxmonaugshort{.}"}
+
+MACRO {sep} {"\btxmonsepshort{.}"}
+
+MACRO {oct} {"\btxmonoctshort{.}"}
+
+MACRO {nov} {"\btxmonnovshort{.}"}
+
+MACRO {dec} {"\btxmondecshort{.}"}
+
+MACRO {acmcs} {"ACM Comput. Surv."}
+
+MACRO {acta} {"Acta Inf."}
+
+MACRO {cacm} {"Commun. ACM"}
+
+MACRO {ibmjrd} {"IBM J. Res. Dev."}
+
+MACRO {ibmsj} {"IBM Syst.~J."}
+
+MACRO {ieeese} {"IEEE Trans. Softw. Eng."}
+
+MACRO {ieeetc} {"IEEE Trans. Comput."}
+
+MACRO {ieeetcad}
+ {"IEEE Trans. Comput.-Aided Design Integrated Circuits"}
+
+MACRO {ipl} {"Inf. Process. Lett."}
+
+MACRO {jacm} {"J.~ACM"}
+
+MACRO {jcss} {"J.~Comput. Syst. Sci."}
+
+MACRO {scp} {"Sci. Comput. Programming"}
+
+MACRO {sicomp} {"SIAM J. Comput."}
+
+MACRO {tocs} {"ACM Trans. Comput. Syst."}
+
+MACRO {tods} {"ACM Trans. Database Syst."}
+
+MACRO {tog} {"ACM Trans. Gr."}
+
+MACRO {toms} {"ACM Trans. Math. Softw."}
+
+MACRO {toois} {"ACM Trans. Office Inf. Syst."}
+
+MACRO {toplas} {"ACM Trans. Prog. Lang. Syst."}
+
+MACRO {tcs} {"Theoretical Comput. Sci."}
+
+READ
+
+FUNCTION {sortify}
+{ purify$
+ "l" change.case$
+}
+
+INTEGERS { len }
+
+FUNCTION {chop.word}
+{ 's :=
+ 'len :=
+ s #1 len substring$ =
+ { s len #1 + global.max$ substring$ }
+ 's
+ if$
+}
+
+FUNCTION {sort.format.names}
+{ 's :=
+ #1 'nameptr :=
+ ""
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ { nameptr #1 >
+ { " " * }
+ 'skip$
+ if$
+ s nameptr "{ll{ }}{ f{ }}{vv{ } }{ jj{ }}" format.name$ 't :=
+ nameptr numnames = t "others" = and
+ { "et al" * }
+ { t sortify * }
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+}
+
+FUNCTION {sort.format.title}
+{ 't :=
+ "A " #2
+ "An " #3
+ "The " #4 t chop.word
+ chop.word
+ chop.word
+ sortify
+ #1 global.max$ substring$
+}
+
+FUNCTION {author.sort}
+{ author empty$
+ { key empty$
+ { "to sort, need author or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { author sort.format.names }
+ if$
+}
+
+FUNCTION {author.editor.sort}
+{ author empty$
+ { editor empty$
+ { key empty$
+ { "to sort, need author, editor, or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { editor sort.format.names }
+ if$
+ }
+ { author sort.format.names }
+ if$
+}
+
+FUNCTION {author.organization.sort}
+{ author empty$
+ { organization empty$
+ { key empty$
+ { "to sort, need author, organization, or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { "The " #4 organization chop.word sortify }
+ if$
+ }
+ { author sort.format.names }
+ if$
+}
+
+FUNCTION {editor.organization.sort}
+{ editor empty$
+ { organization empty$
+ { key empty$
+ { "to sort, need editor, organization, or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { "The " #4 organization chop.word sortify }
+ if$
+ }
+ { editor sort.format.names }
+ if$
+}
+
+FUNCTION {presort}
+{ type$ "book" =
+ type$ "inbook" =
+ or
+ 'author.editor.sort
+ { type$ "proceedings" =
+ 'editor.organization.sort
+ { type$ "manual" =
+ 'author.organization.sort
+ 'author.sort
+ if$
+ }
+ if$
+ }
+ if$
+ " "
+ *
+ year field.or.null sortify
+ *
+ " "
+ *
+ title field.or.null
+ sort.format.title
+ *
+ #1 entry.max$ substring$
+ 'sort.key$ :=
+}
+
+ITERATE {presort}
+
+SORT
+
+STRINGS { longest.label }
+
+INTEGERS { number.label longest.label.width }
+
+FUNCTION {initialize.longest.label}
+{ "" 'longest.label :=
+ #1 'number.label :=
+ #0 'longest.label.width :=
+}
+
+FUNCTION {longest.label.pass}
+{ number.label int.to.str$ 'label :=
+ number.label #1 + 'number.label :=
+ label width$ longest.label.width >
+ { label 'longest.label :=
+ label width$ 'longest.label.width :=
+ }
+ 'skip$
+ if$
+}
+
+EXECUTE {initialize.longest.label}
+
+ITERATE {longest.label.pass}
+
+FUNCTION {begin.bib}
+{ preamble$ empty$
+ 'skip$
+ { preamble$ write$ newline$ }
+ if$
+ "\begin{thebibliography}{" longest.label * "}" * write$ newline$
+}
+
+EXECUTE {begin.bib}
+
+EXECUTE {init.state.consts}
+
+ITERATE {call.type$}
+
+FUNCTION {end.bib}
+{ newline$
+ "\end{thebibliography}" write$ newline$
+}
+
+EXECUTE {end.bib}
diff --git a/biblio/bibtex/contrib/germbib/bst/geralpha.bst b/biblio/bibtex/contrib/germbib/bst/geralpha.bst
new file mode 100644
index 0000000000..984bbead5b
--- /dev/null
+++ b/biblio/bibtex/contrib/germbib/bst/geralpha.bst
@@ -0,0 +1,1369 @@
+% BibTeX standard bibliography style `plain'
+ % version 0.99a for BibTeX versions 0.99a or later, LaTeX version 2.09.
+ % Copyright (C) 1985, all rights reserved.
+ % Copying of this file is authorized only if either
+ % (1) you make absolutely no changes to your copy, including name, or
+ % (2) if you do make changes, you name it something other than
+ % btxbst.doc, plain.bst, unsrt.bst, alpha.bst, and abbrv.bst.
+ % This restriction helps ensure that all standard styles are identical.
+ % The file btxbst.doc has the documentation for this style.
+% 15-feb-92 (MW) Updated for use with `bibgerman.sty': things like "and"
+% change with the language. Switch the language using the
+% language field:
+% language = "german" | "USenglish" | "english"
+% Then a `\selectlanguage{...}' command will be pushed just
+% before the `\bibitem...' command for the entry in work.
+% 2003/03/31 Harald Harders Fixed bug in detection of "and others"
+% 2003/04/29 Harald Harders Fixed bug format of names. For multiple
+% names, some of them were not typeset in
+% small caps.
+
+ENTRY
+ { address
+ author
+ booktitle
+ chapter
+ edition
+ editor
+ howpublished
+ institution
+ journal
+ key
+ language
+ month
+ note
+ number
+ organization
+ pages
+ publisher
+ school
+ series
+ title
+ type
+ volume
+ year
+ }
+ {}
+ { label extra.label sort.label }
+
+INTEGERS { output.state before.all mid.sentence after.sentence after.block before.title }
+
+STRINGS { s t language.state language.temp }
+
+FUNCTION {init.state.consts}
+{ #0 'before.all :=
+ #1 'mid.sentence :=
+ #2 'after.sentence :=
+ #3 'after.block :=
+ #4 'before.title :=
+ "nostate" 'language.state :=
+}
+
+FUNCTION {language.state.test}
+{
+ 'language.temp :=
+ language.temp language.state =
+ { #1 }
+ { #0 }
+ if$
+}
+
+FUNCTION {not}
+{ { #0 }
+ { #1 }
+ if$
+}
+
+FUNCTION {and}
+{ 'skip$
+ { pop$ #0 }
+ if$
+}
+
+FUNCTION {or}
+{ { pop$ #1 }
+ 'skip$
+ if$
+}
+
+FUNCTION {output.nonnull}
+{ 's :=
+ output.state mid.sentence =
+ { ", " * write$ }
+ { output.state after.block =
+ { add.period$ write$
+ newline$
+ "\newblock " write$
+ }
+ { output.state before.all =
+ 'write$
+ % next if is for use with `new' FUNCTION {after.authors}
+ { output.state before.title =
+ { ": " * write$ }
+ { add.period$ " " * write$ }
+ if$
+ }
+ if$
+ }
+ if$
+ mid.sentence 'output.state :=
+ }
+ if$
+ s
+}
+
+FUNCTION {output}
+{ duplicate$ empty$
+ 'pop$
+ 'output.nonnull
+ if$
+}
+
+FUNCTION {output.check}
+{ 't :=
+ duplicate$ empty$
+ { pop$ "empty " t * " in " * cite$ * warning$ }
+ 'output.nonnull
+ if$
+}
+
+FUNCTION {output.bibitem}
+{ newline$
+ language empty$
+ 'skip$
+ { language.state language =
+ 'skip$
+ { "\selectlanguage{\" language * "}" * write$
+ newline$
+ }
+ if$
+ language 'language.state :=
+ }
+ if$
+ "\bibitem[" write$
+ label write$
+ "]{" write$
+ cite$ write$
+ "}" write$
+ newline$
+ ""
+ before.all 'output.state :=
+}
+
+FUNCTION {fin.entry}
+{ add.period$
+ write$
+ newline$
+}
+
+FUNCTION {new.block}
+{ output.state before.all =
+ 'skip$
+ { after.block 'output.state := }
+ if$
+}
+
+FUNCTION {new.sentence}
+{ output.state after.block =
+ 'skip$
+ { output.state before.all =
+ 'skip$
+ { after.sentence 'output.state := }
+ if$
+ }
+ if$
+}
+
+% new one -> sets what is specified in FUNCTION {output.nonnull}
+% if `before.title 'output.state = ... if$' is true
+FUNCTION {after.authors}
+{ output.state before.all =
+ 'skip$
+ { before.title 'output.state := }
+ if$
+}
+
+FUNCTION {new.block.checka}
+{ empty$
+ 'skip$
+ 'new.block
+ if$
+}
+
+FUNCTION {new.block.checkb}
+{ empty$
+ swap$ empty$
+ and
+ 'skip$
+ 'new.block
+ if$
+}
+
+FUNCTION {new.block.checkc}
+{ empty$
+ swap$ empty$
+ and
+ 'skip$
+ 'after.authors
+ if$
+}
+
+FUNCTION {new.sentence.checka}
+{ empty$
+ 'skip$
+ 'new.sentence
+ if$
+}
+
+FUNCTION {new.sentence.checkb}
+{ empty$
+ swap$ empty$
+ and
+ 'skip$
+ 'new.sentence
+ if$
+}
+
+FUNCTION {field.or.null}
+{ duplicate$ empty$
+ { pop$ "" }
+ 'skip$
+ if$
+}
+
+FUNCTION {emphasize}
+{ duplicate$ empty$
+ { pop$ "" }
+ { "{\em " swap$ * "}" * }
+ if$
+}
+
+FUNCTION {smallcaps}
+{ duplicate$ empty$
+ { pop$ "" }
+ { "{\sc " swap$ * "}" * }
+ if$
+}
+
+INTEGERS { nameptr namesleft numnames }
+
+FUNCTION {format.names}
+{ 's :=
+ #1 'nameptr :=
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ { nameptr #1 >
+ { s nameptr "{ff~}{vv~}{ll}{, jj}" format.name$ 't :=
+ namesleft #1 >
+ { ", " * t smallcaps * }
+ { numnames #2 >
+ { "english" language.state.test
+ "USenglish" language.state.test
+ or
+ {"," * }
+ 'skip$
+ if$
+ }
+ 'skip$
+ if$
+ t "others" =
+ { " \btxetalshort{.}" * }
+ { " \btxandlong{}\ " * t smallcaps * }
+ if$
+ }
+ if$
+ }
+ { s nameptr "{ll}{, jj}{, ff}{~vv}" format.name$ smallcaps }
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+}
+
+FUNCTION {format.authors}
+{ author empty$
+ { "" }
+ { author format.names }
+ if$
+}
+
+FUNCTION {format.editors}
+{ editor empty$
+ { "" }
+ { editor format.names
+ editor num.names$ #1 >
+ { "\ (\btxeditorslong{})" * }
+ { "\ (\btxeditorlong{})" * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.title}
+{ title empty$
+ { "" }
+ { "english" language.state.test
+ "USenglish" language.state.test
+ or
+ { title "t" change.case$ emphasize }
+ { title emphasize }
+ if$
+ }
+ if$
+}
+
+FUNCTION {n.dashify}
+{ 't :=
+ ""
+ { t empty$ not }
+ { t #1 #1 substring$ "-" =
+ { t #1 #2 substring$ "--" = not
+ { "--" *
+ t #2 global.max$ substring$ 't :=
+ }
+ { { t #1 #1 substring$ "-" = }
+ { "-" *
+ t #2 global.max$ substring$ 't :=
+ }
+ while$
+ }
+ if$
+ }
+ { t #1 #1 substring$ *
+ t #2 global.max$ substring$ 't :=
+ }
+ if$
+ }
+ while$
+}
+
+FUNCTION {format.date}
+{ year empty$
+ { month empty$
+ { "" }
+ { "there's a month but no year in " cite$ * warning$
+ month
+ }
+ if$
+ }
+ { month empty$
+ 'year
+ { month " " * year * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.btitle}
+{ title emphasize
+}
+
+FUNCTION {tie.or.space.connect}
+{ duplicate$ text.length$ #3 <
+ { "~" }
+ { "\ " }
+ if$
+ swap$ * *
+}
+
+FUNCTION {either.or.check}
+{ empty$
+ 'pop$
+ { "can't use both " swap$ * " fields in " * cite$ * warning$ }
+ if$
+}
+
+FUNCTION {format.bvolume}
+{ volume empty$
+ { "" }
+ { output.state after.block =
+ { "\Btxvolumelong{}" }
+ { "\btxvolumelong{}" }
+ if$
+ volume tie.or.space.connect
+ series empty$
+ 'skip$
+ { " \btxofserieslong{}\ " * series emphasize * }
+ if$
+ "volume and number" number either.or.check
+ }
+ if$
+}
+
+FUNCTION {format.number.series}
+{ volume empty$
+ { number empty$
+ { series field.or.null }
+ { output.state mid.sentence =
+ { "\btxnumberlong{}" }
+ { "\Btxnumberlong{}" }
+ if$
+ number tie.or.space.connect
+ series empty$
+ { "there's a number but no series in " cite$ * warning$ }
+ { " \btxinserieslong{}\ " * series emphasize * }
+ if$
+ }
+ if$
+ }
+ { "" }
+ if$
+}
+
+FUNCTION {format.edition}
+{ edition empty$
+ { "" }
+ { "english" language.state.test
+ "USenglish" language.state.test
+ or
+ { output.state mid.sentence =
+ { edition "l" change.case$ " \btxeditionlong{}" * }
+ { edition "t" change.case$ " \btxeditionlong{}" * }
+ if$
+ }
+ { edition " \btxeditionlong{}" * }
+ if$
+ }
+ if$
+}
+
+INTEGERS { multiresult }
+
+FUNCTION {multi.page.check}
+{ 't :=
+ #0 'multiresult :=
+ { multiresult not
+ t empty$ not
+ and
+ }
+ { t #1 #1 substring$
+ duplicate$ "-" =
+ swap$ duplicate$ "," =
+ swap$ "+" =
+ or or
+ { #1 'multiresult := }
+ { t #2 global.max$ substring$ 't := }
+ if$
+ }
+ while$
+ multiresult
+}
+
+FUNCTION {format.pages}
+{ pages empty$
+ { "" }
+ { pages multi.page.check
+ { "\btxpageslong{}" pages n.dashify tie.or.space.connect }
+ { "\btxpagelong{}" pages tie.or.space.connect }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.vol.num.pages}
+{ volume field.or.null
+ number empty$
+ 'skip$
+ { "(" number * ")" * *
+ volume empty$
+ { "there's a number but no volume in " cite$ * warning$ }
+ 'skip$
+ if$
+ }
+ if$
+ pages empty$
+ 'skip$
+ { duplicate$ empty$
+ { pop$ format.pages }
+ { ":" * pages n.dashify * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.chapter.pages}
+{ chapter empty$
+ 'format.pages
+ { type empty$
+ { "\btxchapterlong{}" }
+ { "english" language.state.test
+ "USenglish" language.state.test
+ or
+ { type "l" change.case$ }
+ { type }
+ if$
+ }
+ if$
+ chapter tie.or.space.connect
+ pages empty$
+ 'skip$
+ { ", " * format.pages * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.in.ed.booktitle}
+{ booktitle empty$
+ { "" }
+ { editor empty$
+ { "\Btxinlong{}\ " booktitle emphasize * }
+ { "\Btxinlong{}\ " format.editors * ": " * booktitle emphasize * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {empty.misc.check}
+{ author empty$ title empty$ howpublished empty$
+ month empty$ year empty$ note empty$
+ and and and and and
+ key empty$ not and
+ { "all relevant fields are empty in " cite$ * warning$ }
+ 'skip$
+ if$
+}
+
+FUNCTION {format.thesis.type}
+{ type empty$
+ 'skip$
+ { pop$
+ "english" language.state.test
+ "USenglish" language.state.test
+ or
+ { type "t" change.case$ }
+ { type }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.tr.number}
+{ type empty$
+ { "\Btxtechreplong{}" }
+ 'type
+ if$
+ number empty$
+ { "english" language.state.test
+ "USenglish" language.state.test
+ or
+ { type empty$
+ { pop$ "\btxtechreplong{}" }
+ { "t" change.case$ }
+ if$
+ }
+ 'skip$
+ if$
+ }
+ { number tie.or.space.connect }
+ if$
+}
+
+FUNCTION {format.article.crossref}
+{ key empty$
+ { journal empty$
+ { "need key or journal for " cite$ * " to crossref " * crossref *
+ warning$
+ ""
+ }
+ { "\Btxinlong{}\ " journal emphasize * }
+ if$
+ }
+ { "\Btxinlong{}\ " key emphasize * }
+ if$
+ " \cite{" * crossref * "}" *
+}
+
+FUNCTION {format.crossref.editor}
+{ editor #1 "{ll}{, jj}{, ff}{~vv}" format.name$ smallcaps
+ editor num.names$ duplicate$
+ #2 >
+ { pop$ " \btxetalshort{.}" * }
+ { #2 <
+ 'skip$
+ { editor #2 "{ff }{vv }{ll}{ jj}" format.name$ "others" =
+ { " \btxetalshort{.}" * }
+ { " \btxandlong{}\ " * editor #2 "{ff}{~vv}{~ll}{, jj}" format.name$ smallcaps * }
+ if$
+ }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.book.crossref}
+{ volume empty$
+ { "empty volume in " cite$ * "'s crossref of " * crossref * warning$
+ "\Btxinlong{}\ "
+ }
+ { "\Btxvolumelong{}" volume tie.or.space.connect
+ " \btxofserieslong{}\ " *
+ }
+ if$
+ editor empty$
+ editor field.or.null author field.or.null =
+ or
+ { key empty$
+ { series empty$
+ { "need editor, key, or series for " cite$ * " to crossref " *
+ crossref * warning$
+ "" *
+ }
+ { series emphasize * }
+ if$
+ }
+ { key emphasize * }
+ if$
+ }
+ { format.crossref.editor * }
+ if$
+ " \cite{" * crossref * "}" *
+}
+
+FUNCTION {format.incoll.inproc.crossref}
+{ editor empty$
+ editor field.or.null author field.or.null =
+ or
+ { key empty$
+ { booktitle empty$
+ { "need editor, key, or booktitle for " cite$ * " to crossref " *
+ crossref * warning$
+ ""
+ }
+ { "\Btxinlong{}\ " booktitle emphasize * }
+ if$
+ }
+ { "\Btxinlong{}\ " key emphasize * }
+ if$
+ }
+ { "\Btxinlong{}\ " format.crossref.editor * }
+ if$
+ " \cite{" * crossref * "}" *
+}
+
+FUNCTION {article}
+{ output.bibitem
+ format.authors "author" output.check
+ after.authors
+ format.title "title" output.check
+ new.block
+ crossref missing$
+ { journal
+ title missing$
+ { emphasize }
+ 'skip$
+ if$
+ "journal" output.check
+ format.vol.num.pages output
+ format.date "year" output.check
+ }
+ { format.article.crossref output.nonnull
+ format.pages output
+ }
+ if$
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {book}
+{ output.bibitem
+ author empty$
+ { format.editors "author and editor" output.check }
+ { format.authors output.nonnull
+ crossref missing$
+ { "author and editor" editor either.or.check }
+ 'skip$
+ if$
+ }
+ if$
+ after.authors
+ format.btitle "title" output.check
+ crossref missing$
+ { format.bvolume output
+ new.block
+ format.number.series output
+ new.sentence
+ publisher "publisher" output.check
+ address output
+ }
+ { new.block
+ format.book.crossref output.nonnull
+ }
+ if$
+ format.edition output
+ format.date "year" output.check
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {booklet}
+{ output.bibitem
+ format.authors output
+ after.authors
+ format.title "title" output.check
+ howpublished address new.block.checkb
+ howpublished output
+ address output
+ format.date output
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {inbook}
+{ output.bibitem
+ author empty$
+ { format.editors "author and editor" output.check }
+ { format.authors output.nonnull
+ crossref missing$
+ { "author and editor" editor either.or.check }
+ 'skip$
+ if$
+ }
+ if$
+ after.authors
+ format.btitle "title" output.check
+ crossref missing$
+ { format.bvolume output
+ format.chapter.pages "chapter and pages" output.check
+ new.block
+ format.number.series output
+ new.sentence
+ publisher "publisher" output.check
+ address output
+ }
+ { format.chapter.pages "chapter and pages" output.check
+ new.block
+ format.book.crossref output.nonnull
+ }
+ if$
+ format.edition output
+ format.date "year" output.check
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {incollection}
+{ output.bibitem
+ format.authors "author" output.check
+ after.authors
+ format.title "title" output.check
+ new.block
+ crossref missing$
+ { format.in.ed.booktitle "booktitle" output.check
+ format.bvolume output
+ format.number.series output
+ format.chapter.pages output
+ new.sentence
+ publisher "publisher" output.check
+ address output
+ format.edition output
+ format.date "year" output.check
+ }
+ { format.incoll.inproc.crossref output.nonnull
+ format.chapter.pages output
+ }
+ if$
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {inproceedings}
+{ output.bibitem
+ format.authors "author" output.check
+ after.authors
+ format.title "title" output.check
+ new.block
+ crossref missing$
+ { format.in.ed.booktitle "booktitle" output.check
+ format.bvolume output
+ format.number.series output
+ format.pages output
+ address empty$
+ { organization publisher new.sentence.checkb
+ organization output
+ publisher output
+ format.date "year" output.check
+ }
+ { address output.nonnull
+ format.date "year" output.check
+ new.sentence
+ organization output
+ publisher output
+ }
+ if$
+ }
+ { format.incoll.inproc.crossref output.nonnull
+ format.pages output
+ }
+ if$
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {conference} { inproceedings }
+
+FUNCTION {manual}
+{ output.bibitem
+ author empty$
+ { organization empty$
+ 'skip$
+ { organization smallcaps output.nonnull
+ address output
+ }
+ if$
+ }
+ { format.authors output.nonnull }
+ if$
+ after.authors
+ format.btitle "title" output.check
+ author empty$
+ { organization empty$
+ { address new.block.checka
+ address output
+ }
+ 'skip$
+ if$
+ }
+ { organization address new.block.checkb
+ organization output
+ address output
+ }
+ if$
+ format.edition output
+ format.date output
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {mastersthesis}
+{ output.bibitem
+ format.authors "author" output.check
+ after.authors
+ format.title "title" output.check
+ new.block
+ "\btxmastthesis{}" format.thesis.type output.nonnull
+ school "school" output.check
+ address output
+ format.date "year" output.check
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {misc}
+{ output.bibitem
+ format.authors output
+ title howpublished new.block.checkc
+ format.title output
+ howpublished new.block.checka
+ howpublished output
+ format.date output
+ new.block
+ note output
+ fin.entry
+ empty.misc.check
+}
+
+FUNCTION {phdthesis}
+{ output.bibitem
+ format.authors "author" output.check
+ after.authors
+ format.btitle "title" output.check
+ new.block
+ "\btxphdthesis{}" format.thesis.type output.nonnull
+ school "school" output.check
+ address output
+ format.date "year" output.check
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {proceedings}
+{ output.bibitem
+ editor empty$
+ { organization smallcaps output }
+ { format.editors output.nonnull }
+ if$
+ after.authors
+ format.btitle "title" output.check
+ format.bvolume output
+ format.number.series output
+ address empty$
+ { editor empty$
+ { publisher new.sentence.checka }
+ { organization publisher new.sentence.checkb
+ organization output
+ }
+ if$
+ publisher output
+ format.date "year" output.check
+ }
+ { address output.nonnull
+ format.date "year" output.check
+ new.sentence
+ editor empty$
+ 'skip$
+ { organization output }
+ if$
+ publisher output
+ }
+ if$
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {techreport}
+{ output.bibitem
+ format.authors "author" output.check
+ after.authors
+ format.title "title" output.check
+ new.block
+ format.tr.number output.nonnull
+ institution "institution" output.check
+ address output
+ format.date "year" output.check
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {unpublished}
+{ output.bibitem
+ format.authors "author" output.check
+ after.authors
+ format.title "title" output.check
+ new.block
+ note "note" output.check
+ format.date output
+ fin.entry
+}
+
+FUNCTION {default.type} { misc }
+
+MACRO {jan} {"\btxmonjanlong{}"}
+
+MACRO {feb} {"\btxmonfeblong{}"}
+
+MACRO {mar} {"\btxmonmarlong{}"}
+
+MACRO {apr} {"\btxmonaprlong{}"}
+
+MACRO {may} {"\btxmonmaylong{}"}
+
+MACRO {jun} {"\btxmonjunlong{}"}
+
+MACRO {jul} {"\btxmonjullong{}"}
+
+MACRO {aug} {"\btxmonauglong{}"}
+
+MACRO {sep} {"\btxmonseplong{}"}
+
+MACRO {oct} {"\btxmonoctlong{}"}
+
+MACRO {nov} {"\btxmonnovlong{}"}
+
+MACRO {dec} {"\btxmondeclong{}"}
+
+MACRO {acmcs} {"ACM Computing Surveys"}
+
+MACRO {acta} {"Acta Informatica"}
+
+MACRO {cacm} {"Communications of the ACM"}
+
+MACRO {ibmjrd} {"IBM Journal of Research and Development"}
+
+MACRO {ibmsj} {"IBM Systems Journal"}
+
+MACRO {ieeese} {"IEEE Transactions on Software Engineering"}
+
+MACRO {ieeetc} {"IEEE Transactions on Computers"}
+
+MACRO {ieeetcad}
+ {"IEEE Transactions on Computer-Aided Design of Integrated Circuits"}
+
+MACRO {ipl} {"Information Processing Letters"}
+
+MACRO {jacm} {"Journal of the ACM"}
+
+MACRO {jcss} {"Journal of Computer and System Sciences"}
+
+MACRO {scp} {"Science of Computer Programming"}
+
+MACRO {sicomp} {"SIAM Journal on Computing"}
+
+MACRO {tocs} {"ACM Transactions on Computer Systems"}
+
+MACRO {tods} {"ACM Transactions on Database Systems"}
+
+MACRO {tog} {"ACM Transactions on Graphics"}
+
+MACRO {toms} {"ACM Transactions on Mathematical Software"}
+
+MACRO {toois} {"ACM Transactions on Office Information Systems"}
+
+MACRO {toplas} {"ACM Transactions on Programming Languages and Systems"}
+
+MACRO {tcs} {"Theoretical Computer Science"}
+
+READ
+
+FUNCTION {sortify}
+{ purify$
+ "l" change.case$
+}
+
+INTEGERS { len }
+
+FUNCTION {chop.word}
+{ 's :=
+ 'len :=
+ s #1 len substring$ =
+ { s len #1 + global.max$ substring$ }
+ 's
+ if$
+}
+
+INTEGERS { et.al.char.used }
+
+FUNCTION {initialize.et.al.char.used}
+{ #0 'et.al.char.used :=
+}
+
+EXECUTE {initialize.et.al.char.used}
+
+FUNCTION {format.lab.names}
+{ 's :=
+ s num.names$ 'numnames :=
+ numnames #1 >
+ { numnames #4 >
+ { #3 'namesleft := }
+ { numnames 'namesleft := }
+ if$
+ #1 'nameptr :=
+ ""
+ { namesleft #0 > }
+ { nameptr numnames =
+ { s nameptr "{ff }{vv }{ll}{ jj}" format.name$ "others" =
+ { "{\etalchar{+}}" *
+ #1 'et.al.char.used :=
+ }
+ { s nameptr "{v{}}{l{}}" format.name$ * }
+ if$
+ }
+ { s nameptr "{v{}}{l{}}" format.name$ * }
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+ numnames #4 >
+ { "{\etalchar{+}}" *
+ #1 'et.al.char.used :=
+ }
+ 'skip$
+ if$
+ }
+ { s #1 "{v{}}{l{}}" format.name$
+ duplicate$ text.length$ #2 <
+ { pop$ s #1 "{ll}" format.name$ #3 text.prefix$ }
+ 'skip$
+ if$
+ }
+ if$
+}
+
+FUNCTION {author.key.label}
+{ author empty$
+ { key empty$
+ { cite$ #1 #3 substring$ }
+ { key #3 text.prefix$ }
+ if$
+ }
+ { author format.lab.names }
+ if$
+}
+
+FUNCTION {author.editor.key.label}
+{ author empty$
+ { editor empty$
+ { key empty$
+ { cite$ #1 #3 substring$ }
+ { key #3 text.prefix$ }
+ if$
+ }
+ { editor format.lab.names }
+ if$
+ }
+ { author format.lab.names }
+ if$
+}
+
+FUNCTION {author.key.organization.label}
+{ author empty$
+ { key empty$
+ { organization empty$
+ { cite$ #1 #3 substring$ }
+ { "The " #4 organization chop.word #3 text.prefix$ }
+ if$
+ }
+ { key #3 text.prefix$ }
+ if$
+ }
+ { author format.lab.names }
+ if$
+}
+
+FUNCTION {editor.key.organization.label}
+{ editor empty$
+ { key empty$
+ { organization empty$
+ { cite$ #1 #3 substring$ }
+ { "The " #4 organization chop.word #3 text.prefix$ }
+ if$
+ }
+ { key #3 text.prefix$ }
+ if$
+ }
+ { editor format.lab.names }
+ if$
+}
+
+FUNCTION {calc.label}
+{ type$ "book" =
+ type$ "inbook" =
+ or
+ 'author.editor.key.label
+ { type$ "proceedings" =
+ 'editor.key.organization.label
+ { type$ "manual" =
+ 'author.key.organization.label
+ 'author.key.label
+ if$
+ }
+ if$
+ }
+ if$
+ duplicate$
+ year field.or.null purify$ #-1 #2 substring$
+ *
+ 'label :=
+ year field.or.null purify$ #-1 #4 substring$
+ *
+ sortify 'sort.label :=
+}
+
+FUNCTION {sort.format.names}
+{ 's :=
+ #1 'nameptr :=
+ ""
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ { nameptr #1 >
+ { " " * }
+ 'skip$
+ if$
+ s nameptr "{vv{ } }{ll{ }}{ ff{ }}{ jj{ }}" format.name$ 't :=
+ nameptr numnames = t "others" = and
+ { "et al" * }
+ { t sortify * }
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+}
+
+FUNCTION {sort.format.title}
+{ 't :=
+ "A " #2
+ "An " #3
+ "The " #4 t chop.word
+ chop.word
+ chop.word
+ sortify
+ #1 global.max$ substring$
+}
+
+FUNCTION {author.sort}
+{ author empty$
+ { key empty$
+ { "to sort, need author or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { author sort.format.names }
+ if$
+}
+
+FUNCTION {author.editor.sort}
+{ author empty$
+ { editor empty$
+ { key empty$
+ { "to sort, need author, editor, or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { editor sort.format.names }
+ if$
+ }
+ { author sort.format.names }
+ if$
+}
+
+FUNCTION {author.organization.sort}
+{ author empty$
+ { organization empty$
+ { key empty$
+ { "to sort, need author, organization, or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { "The " #4 organization chop.word sortify }
+ if$
+ }
+ { author sort.format.names }
+ if$
+}
+
+FUNCTION {editor.organization.sort}
+{ editor empty$
+ { organization empty$
+ { key empty$
+ { "to sort, need editor, organization, or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { "The " #4 organization chop.word sortify }
+ if$
+ }
+ { editor sort.format.names }
+ if$
+}
+
+FUNCTION {presort}
+{ calc.label
+ sort.label
+ " "
+ *
+ type$ "book" =
+ type$ "inbook" =
+ or
+ 'author.editor.sort
+ { type$ "proceedings" =
+ 'editor.organization.sort
+ { type$ "manual" =
+ 'author.organization.sort
+ 'author.sort
+ if$
+ }
+ if$
+ }
+ if$
+ *
+ " "
+ *
+ year field.or.null sortify
+ *
+ " "
+ *
+ title field.or.null
+ sort.format.title
+ *
+ #1 entry.max$ substring$
+ 'sort.key$ :=
+}
+
+ITERATE {presort}
+
+SORT
+
+STRINGS { longest.label last.sort.label next.extra }
+
+INTEGERS { longest.label.width last.extra.num }
+
+FUNCTION {initialize.longest.label}
+{ "" 'longest.label :=
+ #0 int.to.chr$ 'last.sort.label :=
+ "" 'next.extra :=
+ #0 'longest.label.width :=
+ #0 'last.extra.num :=
+}
+
+FUNCTION {forward.pass}
+{ last.sort.label sort.label =
+ { last.extra.num #1 + 'last.extra.num :=
+ last.extra.num int.to.chr$ 'extra.label :=
+ }
+ { "a" chr.to.int$ 'last.extra.num :=
+ "" 'extra.label :=
+ sort.label 'last.sort.label :=
+ }
+ if$
+}
+
+FUNCTION {reverse.pass}
+{ next.extra "b" =
+ { "a" 'extra.label := }
+ 'skip$
+ if$
+ label extra.label * 'label :=
+ label width$ longest.label.width >
+ { label 'longest.label :=
+ label width$ 'longest.label.width :=
+ }
+ 'skip$
+ if$
+ extra.label 'next.extra :=
+}
+
+EXECUTE {initialize.longest.label}
+
+ITERATE {forward.pass}
+
+REVERSE {reverse.pass}
+
+FUNCTION {begin.bib}
+{ et.al.char.used
+ { "\newcommand{\etalchar}[1]{$^{#1}$}" write$ newline$ }
+ 'skip$
+ if$
+ preamble$ empty$
+ 'skip$
+ { preamble$ write$ newline$ }
+ if$
+ "\begin{thebibliography}{" longest.label * "}" * write$ newline$
+}
+
+EXECUTE {begin.bib}
+
+EXECUTE {init.state.consts}
+
+ITERATE {call.type$}
+
+FUNCTION {end.bib}
+{ newline$
+ "\end{thebibliography}" write$ newline$
+}
+
+EXECUTE {end.bib}
+
diff --git a/biblio/bibtex/contrib/germbib/bst/gerapali.bst b/biblio/bibtex/contrib/germbib/bst/gerapali.bst
new file mode 100644
index 0000000000..0e4ad7c641
--- /dev/null
+++ b/biblio/bibtex/contrib/germbib/bst/gerapali.bst
@@ -0,0 +1,1227 @@
+% BibTeX `apalike' bibliography style (24-Jan-88 version)
+% Adapted from the `alpha' style, version 0.99a; for BibTeX version 0.99a.
+% Copyright (C) 1988, all rights reserved.
+% Copying of this file is allowed, provided that if you make any changes at all
+% you name it something other than `apalike.bst'.
+% This restriction helps ensure that all copies are identical.
+% Differences between this style and `alpha' are generally heralded by a `%'.
+% The file btxbst.doc has the documentation for alpha.bst.
+%
+% This style should be used with the `apalike' LaTeX style (apalike.sty).
+% \cite's come out like "(Jones, 1986)" in the text but there are no labels
+% in the bibliography, and something like "(1986)" comes out immediately
+% after the author. Author (and editor) names appear as last name, comma,
+% initials. A `year' field is required for every entry, and so is either
+% an author (or in some cases, an editor) field or a key field.
+%
+% Editorial note:
+% Many journals require a style like `apalike', but I strongly, strongly,
+% strongly recommend that you not use it if you have a choice---use something
+% like `plain' instead. Mary-Claire van Leunen (A Handbook for Scholars,
+% Knopf, 1979) argues convincingly that a style like `plain' encourages better
+% writing than one like `apalike'. Furthermore the strongest arguments for
+% using an author-date style like `apalike'---that it's "the most practical"
+% (The Chicago Manual of Style, University of Chicago Press, thirteenth
+% edition, 1982, pages 400--401)---fall flat on their face with the new
+% computer-typesetting technology. For instance page 401 anachronistically
+% states "The chief disadvantage of [a style like `plain'] is that additions
+% or deletions cannot be made after the manuscript is typed without changing
+% numbers in both text references and list." LaTeX sidesteps the disadvantage.
+%
+% History:
+% 15-sep-86 (SK,OP) Original version, by Susan King and Oren Patashnik.
+% 10-nov-86 (OP) Truncated the sort.key$ string to the correct length
+% in bib.sort.order to eliminate error message.
+% 24-jan-88 (OP) Updated for BibTeX version 0.99a, from alpha.bst 0.99a;
+% apalike now sorts by author, then year, then title;
+% THIS `apalike' VERSION DOES NOT WORK WITH BIBTEX 0.98i.
+% 15-feb-92 (MW) Updated for use with `bibgerman.sty': things like "and"
+% change with the language. Switch the language using the
+% language field:
+% language = "german" | "USenglish" | "english"
+% Then a `\selectlanguage{...}' command will be pushed just
+% before the `\bibitem...' command for the entry in work.
+
+ENTRY
+ { address
+ author
+ booktitle
+ chapter
+ citelabel
+ edition
+ editor
+ howpublished
+ institution
+ journal
+ key
+ language
+% month not used in apalike
+ note
+ number
+ organization
+ pages
+ publisher
+ school
+ series
+ title
+ type
+ volume
+ year
+ }
+ {}
+ { label extra.label sort.label }
+
+INTEGERS { output.state before.all mid.sentence after.sentence after.block before.title }
+
+STRINGS { s t language.state language.temp }
+
+FUNCTION {init.state.consts}
+{ #0 'before.all :=
+ #1 'mid.sentence :=
+ #2 'after.sentence :=
+ #3 'after.block :=
+ #4 'before.title :=
+ "nostate" 'language.state :=
+}
+
+FUNCTION {language.state.test}
+{
+ 'language.temp :=
+ language.temp language.state =
+ { #1 }
+ { #0 }
+ if$
+}
+
+FUNCTION {output.nonnull}
+{ 's :=
+ output.state mid.sentence =
+ { ", " * write$ }
+ { output.state after.block =
+ { add.period$ write$
+ newline$
+ "\newblock " write$
+ }
+ { output.state before.all =
+ 'write$
+ % next if is for use with `new' FUNCTION {after.authors}
+ { output.state before.title =
+ { ": " * write$ }
+ { add.period$ " " * write$ }
+ if$
+ }
+ if$
+ }
+ if$
+ mid.sentence 'output.state :=
+ }
+ if$
+ s
+}
+
+FUNCTION {output}
+{ duplicate$ empty$
+ 'pop$
+ 'output.nonnull
+ if$
+}
+
+FUNCTION {output.check}
+{ 't :=
+ duplicate$ empty$
+ { pop$ "empty " t * " in " * cite$ * warning$ }
+ 'output.nonnull
+ if$
+}
+
+% apalike needs this function because
+% the year has special punctuation;
+% apalike ignores the month
+FUNCTION {output.year.check}
+{ year empty$
+ { "empty year in " cite$ * warning$ }
+ { write$
+ "\ (" year * extra.label * ")" *
+ mid.sentence 'output.state :=
+ }
+ if$
+}
+
+FUNCTION {output.bibitem}
+{ newline$
+ language empty$
+ 'skip$
+ { language.state language =
+ 'skip$
+ { "\selectlanguage{\" language * "}" * write$
+ newline$
+ }
+ if$
+ language 'language.state :=
+ }
+ if$
+ "\bibitem[" write$
+ label write$
+ "]{" write$
+ cite$ write$
+ "}" write$
+ newline$
+ ""
+ before.all 'output.state :=
+}
+
+FUNCTION {fin.entry}
+{ add.period$
+ write$
+ newline$
+}
+
+FUNCTION {new.block}
+{ output.state before.all =
+ 'skip$
+ { after.block 'output.state := }
+ if$
+}
+
+% new one -> sets what is specified in FUNCTION {output.nonnull}
+% if `before.title 'output.state = ... if$' is true
+% FUNCTION {after.authors}
+% { output.state before.all =
+% 'skip$
+% { before.title 'output.state := }
+% if$
+% }
+
+% original -> sets points after (year) and before title
+FUNCTION {after.authors}
+{ new.block }
+
+FUNCTION {new.sentence}
+{ output.state after.block =
+ 'skip$
+ { output.state before.all =
+ 'skip$
+ { after.sentence 'output.state := }
+ if$
+ }
+ if$
+}
+
+FUNCTION {not}
+{ { #0 }
+ { #1 }
+ if$
+}
+
+FUNCTION {and}
+{ 'skip$
+ { pop$ #0 }
+ if$
+}
+
+FUNCTION {or}
+{ { pop$ #1 }
+ 'skip$
+ if$
+}
+
+FUNCTION {new.block.checkb}
+{ empty$
+ swap$ empty$
+ and
+ 'skip$
+ 'new.block
+ if$
+}
+
+FUNCTION {field.or.null}
+{ duplicate$ empty$
+ { pop$ "" }
+ 'skip$
+ if$
+}
+
+FUNCTION {emphasize}
+{ duplicate$ empty$
+ { pop$ "" }
+ { "{\em " swap$ * "\/}" * }
+ if$
+}
+
+FUNCTION {smallcaps}
+{ duplicate$ empty$
+ { pop$ "" }
+ { "{\sc " swap$ * "}" * }
+ if$
+}
+
+INTEGERS { nameptr namesleft numnames }
+
+FUNCTION {format.names}
+{ 's :=
+ #1 'nameptr :=
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ { nameptr #1 >
+ { s nameptr "{f.~}{vv~}{ll}{, jj}" format.name$ 't := % last name first
+ namesleft #1 >
+ { ", " * t smallcaps * }
+ { numnames #2 >
+ { "english" language.state.test
+ "USenglish" language.state.test
+ or
+ {"," * }
+ 'skip$
+ if$
+ }
+ 'skip$
+ if$
+ t "others" =
+ { " \btxetalshort{.}" * }
+ { " \btxandshort{.}\ " * t smallcaps * }
+ if$
+ }
+ if$
+ }
+ { s nameptr "{ll}{, jj}{, ff}{~vv}" format.name$ smallcaps } % last name first
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+}
+
+FUNCTION {format.authors}
+{ author empty$
+ { "" }
+ { author format.names }
+ if$
+}
+
+FUNCTION {format.key} % this function is just for apalike
+{ empty$
+ { key field.or.null
+ duplicate$ empty$
+ 'skip$
+ { smallcaps }
+ if$
+ }
+ { "" }
+ if$
+}
+
+FUNCTION {format.editors}
+{ editor empty$
+ { "" }
+ { editor format.names
+ editor num.names$ #1 >
+ { ", \btxeditorsshort{.}" * }
+ { ", \btxeditorshort{.}" * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.title}
+{ title empty$
+ { "" }
+ { "english" language.state.test
+ "USenglish" language.state.test
+ or
+ { title "t" change.case$ emphasize }
+ { title emphasize }
+ if$
+ }
+ if$
+}
+
+FUNCTION {n.dashify}
+{ 't :=
+ ""
+ { t empty$ not }
+ { t #1 #1 substring$ "-" =
+ { t #1 #2 substring$ "--" = not
+ { "--" *
+ t #2 global.max$ substring$ 't :=
+ }
+ { { t #1 #1 substring$ "-" = }
+ { "-" *
+ t #2 global.max$ substring$ 't :=
+ }
+ while$
+ }
+ if$
+ }
+ { t #1 #1 substring$ *
+ t #2 global.max$ substring$ 't :=
+ }
+ if$
+ }
+ while$
+}
+
+FUNCTION {format.btitle}
+{ title emphasize
+}
+
+FUNCTION {tie.or.space.connect}
+{ duplicate$ text.length$ #3 <
+ { "~" }
+ { "\ " }
+ if$
+ swap$ * *
+}
+
+FUNCTION {either.or.check}
+{ empty$
+ 'pop$
+ { "can't use both " swap$ * " fields in " * cite$ * warning$ }
+ if$
+}
+
+FUNCTION {format.bvolume}
+{ volume empty$
+ { "" }
+ { output.state after.block =
+ { "\Btxvolumeshort{.}" }
+ { "\btxvolumeshort{.}" }
+ if$
+ volume tie.or.space.connect
+ series empty$
+ 'skip$
+ { " \btxofseriesshort{.}\ " * series emphasize * }
+ if$
+ "volume and number" number either.or.check
+ }
+ if$
+}
+
+FUNCTION {format.number.series}
+{ volume empty$
+ { number empty$
+ { series field.or.null }
+ { output.state mid.sentence =
+ { "\btxnumbershort{.}" }
+ { "\Btxnumbershort{.}" }
+ if$
+ number tie.or.space.connect
+ series empty$
+ { "there's a number but no series in " cite$ * warning$ }
+ { " \btxinseriesshort{.}\ " * series emphasize * }
+ if$
+ }
+ if$
+ }
+ { "" }
+ if$
+}
+
+FUNCTION {format.edition}
+{ edition empty$
+ { "" }
+ { "english" language.state.test
+ "USenglish" language.state.test
+ or
+ { output.state mid.sentence =
+ { edition "l" change.case$ " \btxeditionshort{.}" * }
+ { edition "t" change.case$ " \btxeditionshort{.}" * }
+ if$
+ }
+ { edition " \btxeditionshort{.}" * }
+ if$
+ }
+ if$
+}
+
+INTEGERS { multiresult }
+
+FUNCTION {multi.page.check}
+{ 't :=
+ #0 'multiresult :=
+ { multiresult not
+ t empty$ not
+ and
+ }
+ { t #1 #1 substring$
+ duplicate$ "-" =
+ swap$ duplicate$ "," =
+ swap$ "+" =
+ or or
+ { #1 'multiresult := }
+ { t #2 global.max$ substring$ 't := }
+ if$
+ }
+ while$
+ multiresult
+}
+
+FUNCTION {format.pages}
+{ pages empty$
+ { "" }
+ { pages multi.page.check
+ { "\btxpagesshort{.}" pages n.dashify tie.or.space.connect }
+ { "\btxpageshort{.}" pages tie.or.space.connect }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.vol.num.pages}
+{ volume field.or.null
+ number empty$
+ 'skip$
+ { "(" number * ")" * *
+ volume empty$
+ { "there's a number but no volume in " cite$ * warning$ }
+ 'skip$
+ if$
+ }
+ if$
+ pages empty$
+ 'skip$
+ { duplicate$ empty$
+ { pop$ format.pages }
+ { ":" * pages n.dashify * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.chapter.pages}
+{ chapter empty$
+ 'format.pages
+ { type empty$
+ { "\btxchaptershort{.}" }
+ { "english" language.state.test
+ "USenglish" language.state.test
+ or
+ { type "l" change.case$ }
+ { type }
+ if$
+ }
+ if$
+ chapter tie.or.space.connect
+ pages empty$
+ 'skip$
+ { ", " * format.pages * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.in.ed.booktitle}
+{ booktitle empty$
+ { "" }
+ { editor empty$
+ { "\Btxinshort{.}\ " booktitle emphasize * }
+ { "\Btxinshort{.}\ " format.editors * ": " * booktitle emphasize * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.thesis.type}
+{ type empty$
+ 'skip$
+ { pop$
+ "english" language.state.test
+ "USenglish" language.state.test
+ or
+ { type "t" change.case$ }
+ { type }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.tr.number}
+{ type empty$
+ { "\Btxtechreplong{.}" }
+ 'type
+ if$
+ number empty$
+ { "english" language.state.test
+ "USenglish" language.state.test
+ or
+ { type empty$
+ { pop$ "\btxtechreplong{.}" }
+ { "t" change.case$ }
+ if$
+ }
+ 'skip$
+ if$
+ }
+ { number tie.or.space.connect }
+ if$
+}
+
+FUNCTION {format.article.crossref}
+{ "In" % this is for apalike
+ " \cite{" * crossref * "}" *
+}
+
+FUNCTION {format.book.crossref}
+{ volume empty$
+ { "empty volume in " cite$ * "'s crossref of " * crossref * warning$
+ "\Btxinshort{.}\ "
+ }
+ { "\Btxvolumeshort{.}" volume tie.or.space.connect
+ " \btxofseriesshort{.}\ " *
+ }
+ if$
+ "\cite{" * crossref * "}" * % this is for apalike
+}
+
+FUNCTION {format.incoll.inproc.crossref}
+{ "\Btxinshort{.}\ " % this is for apalike
+ "\cite{" * crossref * "}" *
+}
+
+FUNCTION {article}
+{ output.bibitem
+ format.authors "author" output.check
+ author format.key output % special for
+ output.year.check % apalike
+ after.authors
+ format.title "title" output.check
+ new.block
+ crossref missing$
+ { journal
+ title missing$
+ { emphasize }
+ 'skip$
+ if$
+ "journal" output.check
+ format.vol.num.pages output
+ }
+ { format.article.crossref output.nonnull
+ format.pages output
+ }
+ if$
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {book}
+{ output.bibitem
+ author empty$
+ { format.editors "author and editor" output.check
+ editor format.key output
+ }
+ { format.authors output.nonnull
+ crossref missing$
+ { "author and editor" editor either.or.check }
+ 'skip$
+ if$
+ }
+ if$
+ output.year.check % special for apalike
+ after.authors
+ format.btitle "title" output.check
+ crossref missing$
+ { format.bvolume output
+ new.block
+ format.number.series output
+ new.sentence
+ publisher "publisher" output.check
+ address output
+ }
+ { new.block
+ format.book.crossref output.nonnull
+ }
+ if$
+ format.edition output
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {booklet}
+{ output.bibitem
+ format.authors output
+ author format.key output % special for
+ output.year.check % apalike
+ after.authors
+ format.title "title" output.check
+ new.block
+ howpublished output
+ address output
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {inbook}
+{ output.bibitem
+ author empty$
+ { format.editors "author and editor" output.check
+ editor format.key output
+ }
+ { format.authors output.nonnull
+ crossref missing$
+ { "author and editor" editor either.or.check }
+ 'skip$
+ if$
+ }
+ if$
+ output.year.check % special for apalike
+ after.authors
+ format.btitle "title" output.check
+ crossref missing$
+ { format.bvolume output
+ format.chapter.pages "chapter and pages" output.check
+ new.block
+ format.number.series output
+ new.sentence
+ publisher "publisher" output.check
+ address output
+ }
+ { format.chapter.pages "chapter and pages" output.check
+ new.block
+ format.book.crossref output.nonnull
+ }
+ if$
+ format.edition output
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {incollection}
+{ output.bibitem
+ format.authors "author" output.check
+ author format.key output % special for
+ output.year.check % apalike
+ after.authors
+ format.title "title" output.check
+ new.block
+ crossref missing$
+ { format.in.ed.booktitle "booktitle" output.check
+ format.bvolume output
+ format.number.series output
+ format.chapter.pages output
+ new.sentence
+ publisher "publisher" output.check
+ address output
+ format.edition output
+ }
+ { format.incoll.inproc.crossref output.nonnull
+ format.chapter.pages output
+ }
+ if$
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {inproceedings}
+{ output.bibitem
+ format.authors "author" output.check
+ author format.key output % special for
+ output.year.check % apalike
+ after.authors
+ format.title "title" output.check
+ new.block
+ crossref missing$
+ { format.in.ed.booktitle "booktitle" output.check
+ format.bvolume output
+ format.number.series output
+ format.pages output
+ address output % for apalike
+ new.sentence % there's no year
+ organization output % here so things
+ publisher output % are simpler
+ }
+ { format.incoll.inproc.crossref output.nonnull
+ format.pages output
+ }
+ if$
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {conference} { inproceedings }
+
+FUNCTION {manual}
+{ output.bibitem
+ format.authors output
+ author format.key output % special for
+ output.year.check % apalike
+ after.authors
+ format.btitle "title" output.check
+ organization address new.block.checkb
+ organization output
+ address output
+ format.edition output
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {mastersthesis}
+{ output.bibitem
+ format.authors "author" output.check
+ author format.key output % special for
+ output.year.check % apalike
+ after.authors
+ format.title "title" output.check
+ new.block
+ "\btxmastthesis{.}" format.thesis.type output.nonnull
+ school "school" output.check
+ address output
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {misc}
+{ output.bibitem
+ format.authors output
+ author format.key output % special for
+ output.year.check % apalike
+ after.authors
+ format.title output
+ new.block
+ howpublished output
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {phdthesis}
+{ output.bibitem
+ format.authors "author" output.check
+ author format.key output % special for
+ output.year.check % apalike
+ after.authors
+ format.btitle "title" output.check
+ new.block
+ "\btxphdthesis{.}" format.thesis.type output.nonnull
+ school "school" output.check
+ address output
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {proceedings}
+{ output.bibitem
+ format.editors output
+ editor format.key output % special for
+ output.year.check % apalike
+ after.authors
+ format.btitle "title" output.check
+ format.bvolume output
+ format.number.series output
+ address output % for apalike
+ new.sentence % we always output
+ organization output % a nonempty organization
+ publisher output % here
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {techreport}
+{ output.bibitem
+ format.authors "author" output.check
+ author format.key output % special for
+ output.year.check % apalike
+ after.authors
+ format.title "title" output.check
+ new.block
+ format.tr.number output.nonnull
+ institution "institution" output.check
+ address output
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {unpublished}
+{ output.bibitem
+ format.authors "author" output.check
+ author format.key output % special for
+ output.year.check % apalike
+ after.authors
+ format.title "title" output.check
+ new.block
+ note "note" output.check
+ fin.entry
+}
+
+FUNCTION {default.type} { misc }
+
+MACRO {jan} {"\btxmonjanshort{.}"}
+
+MACRO {feb} {"\btxmonfebshort{.}"}
+
+MACRO {mar} {"\btxmonmarshort{.}"}
+
+MACRO {apr} {"\btxmonaprshort{.}"}
+
+MACRO {may} {"\btxmonmayshort{.}"}
+
+MACRO {jun} {"\btxmonjunshort{.}"}
+
+MACRO {jul} {"\btxmonjulshort{.}"}
+
+MACRO {aug} {"\btxmonaugshort{.}"}
+
+MACRO {sep} {"\btxmonsepshort{.}"}
+
+MACRO {oct} {"\btxmonoctshort{.}"}
+
+MACRO {nov} {"\btxmonnovshort{.}"}
+
+MACRO {dec} {"\btxmondecshort{.}"}
+
+MACRO {acmcs} {"ACM Computing Surveys"}
+
+MACRO {acta} {"Acta Informatica"}
+
+MACRO {cacm} {"Communications of the ACM"}
+
+MACRO {ibmjrd} {"IBM Journal of Research and Development"}
+
+MACRO {ibmsj} {"IBM Systems Journal"}
+
+MACRO {ieeese} {"IEEE Transactions on Software Engineering"}
+
+MACRO {ieeetc} {"IEEE Transactions on Computers"}
+
+MACRO {ieeetcad}
+ {"IEEE Transactions on Computer-Aided Design of Integrated Circuits"}
+
+MACRO {ipl} {"Information Processing Letters"}
+
+MACRO {jacm} {"Journal of the ACM"}
+
+MACRO {jcss} {"Journal of Computer and System Sciences"}
+
+MACRO {scp} {"Science of Computer Programming"}
+
+MACRO {sicomp} {"SIAM Journal on Computing"}
+
+MACRO {tocs} {"ACM Transactions on Computer Systems"}
+
+MACRO {tods} {"ACM Transactions on Database Systems"}
+
+MACRO {tog} {"ACM Transactions on Graphics"}
+
+MACRO {toms} {"ACM Transactions on Mathematical Software"}
+
+MACRO {toois} {"ACM Transactions on Office Information Systems"}
+
+MACRO {toplas} {"ACM Transactions on Programming Languages and Systems"}
+
+MACRO {tcs} {"Theoretical Computer Science"}
+
+READ
+
+FUNCTION {sortify}
+{ purify$
+ "l" change.case$
+}
+
+INTEGERS { len }
+
+FUNCTION {chop.word}
+{ 's :=
+ 'len :=
+ s #1 len substring$ =
+ { s len #1 + global.max$ substring$ }
+ 's
+ if$
+}
+
+% There are three apalike cases: one person (Jones),
+% two (Jones and de~Bruijn), and more (Jones et~al.).
+% This function is much like format.crossref.editors.
+%
+FUNCTION {format.lab.names}
+{ 's :=
+ s #1 "{vv~}{ll}" format.name$ smallcaps
+ s num.names$ duplicate$
+ #2 >
+ { pop$ " \btxetalshort{.}" * }
+ { #2 <
+ 'skip$
+ { s #2 "{ff }{vv }{ll}{ jj}" format.name$ "others" =
+ { " \btxetalshort{.}" * }
+ { " \btxandshort{.}\ " * s #2 "{vv~}{ll}" format.name$ smallcaps * }
+ if$
+ }
+ if$
+ }
+ if$
+}
+
+FUNCTION {author.key.label}
+{ citelabel empty$
+ { author empty$
+ { key empty$
+ { cite$ #1 #3 substring$ }
+ 'key % apalike uses the whole key
+ if$
+ }
+ { author format.lab.names }
+ if$
+ }
+ { citelabel smallcaps }
+ if$
+}
+
+FUNCTION {author.editor.key.label}
+{ citelabel empty$
+ { author empty$
+ { editor empty$
+ { key empty$
+ { cite$ #1 #3 substring$ }
+ 'key % apalike uses the whole key
+ if$
+ }
+ { editor format.lab.names }
+ if$
+ }
+ { author format.lab.names }
+ if$
+ }
+ { citelabel smallcaps }
+ if$
+}
+
+FUNCTION {editor.key.label}
+{ citelabel empty$
+ { editor empty$
+ { key empty$
+ { cite$ #1 #3 substring$ }
+ 'key % apalike uses the whole key, no organization
+ if$
+ }
+ { editor format.lab.names }
+ if$
+ }
+ { citelabel smallcaps }
+ if$
+}
+
+FUNCTION {calc.label}
+{ type$ "book" =
+ type$ "inbook" =
+ or
+ 'author.editor.key.label
+ { type$ "proceedings" =
+ 'editor.key.label % apalike ignores organization
+ 'author.key.label % for labeling and sorting
+ if$
+ }
+ if$
+ year empty$
+ {""}
+ {", "} % original
+% {" "} % gendert fr Andreas Diplomarbeit 30/04/92
+ if$ % these three lines are
+ * % for apalike, which
+% year field.or.null purify$ #-1 #4 substring$ % uses all four digits % original
+ year field.or.null % gendert fr Andreas Diplomarbeit 19/09/92 um Jahresangaben wie 1988a, 1988b zu ermglichen
+ *
+ 'label :=
+}
+
+FUNCTION {sort.format.names}
+{ 's :=
+ #1 'nameptr :=
+ ""
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ { nameptr #1 >
+ { " " * }
+ 'skip$
+ if$ % apalike uses initials
+ s nameptr "{ll{ }}{ ff{ }}{vv{ } }{ jj{ }}" format.name$ 't := % <= here
+ nameptr numnames = t "others" = and
+ { "et al" * }
+ { t sortify * }
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+}
+
+FUNCTION {sort.format.title}
+{ 't :=
+ "A " #2
+ "An " #3
+ "The " #4 t chop.word
+ chop.word
+ chop.word
+ sortify
+ #1 global.max$ substring$
+}
+
+FUNCTION {author.sort}
+{ author empty$
+ { key empty$
+ { "to sort, need author or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { author sort.format.names }
+ if$
+}
+
+FUNCTION {author.editor.sort}
+{ author empty$
+ { editor empty$
+ { key empty$
+ { "to sort, need author, editor, or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { editor sort.format.names }
+ if$
+ }
+ { author sort.format.names }
+ if$
+}
+
+FUNCTION {editor.sort}
+{ editor empty$
+ { key empty$
+ { "to sort, need editor or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { editor sort.format.names }
+ if$
+}
+
+% apalike uses two sorting passes; the first one sets the
+% labels so that the `a's, `b's, etc. can be computed;
+% the second pass puts the references in "correct" order.
+% The presort function is for the first pass. It computes
+% label, sort.label, and title, and then concatenates.
+FUNCTION {presort}
+{ calc.label
+ label sortify
+ " "
+ *
+ type$ "book" =
+ type$ "inbook" =
+ or
+ 'author.editor.sort
+ { type$ "proceedings" =
+ 'editor.sort
+ 'author.sort
+ if$
+ }
+ if$
+ #1 entry.max$ substring$ % for
+ 'sort.label := % apalike
+ sort.label % style
+ *
+ " "
+ *
+ title field.or.null
+ sort.format.title
+ *
+ #1 entry.max$ substring$
+ 'sort.key$ :=
+}
+
+ITERATE {presort}
+
+SORT % by label, sort.label, title---for final label calculation
+
+STRINGS { last.label next.extra } % apalike labels are only for the text;
+
+INTEGERS { last.extra.num } % there are none in the bibliography
+
+FUNCTION {initialize.extra.label.stuff} % and hence there is no `longest.label'
+{ #0 int.to.chr$ 'last.label :=
+ "" 'next.extra :=
+ #0 'last.extra.num :=
+}
+
+FUNCTION {forward.pass}
+{ last.label label =
+ { last.extra.num #1 + 'last.extra.num :=
+ last.extra.num int.to.chr$ 'extra.label :=
+ }
+ { "a" chr.to.int$ 'last.extra.num :=
+ "" 'extra.label :=
+ label 'last.label :=
+ }
+ if$
+}
+
+FUNCTION {reverse.pass}
+{ next.extra "b" =
+ { "a" 'extra.label := }
+ 'skip$
+ if$
+ label extra.label * 'label :=
+ extra.label 'next.extra :=
+}
+
+EXECUTE {initialize.extra.label.stuff}
+
+ITERATE {forward.pass}
+
+REVERSE {reverse.pass}
+
+% Now that the label is right we sort for real,
+% on sort.label then year then title. This is
+% for the second sorting pass.
+FUNCTION {bib.sort.order}
+{ sort.label
+ " "
+ *
+ year field.or.null sortify
+ *
+ " "
+ *
+ title field.or.null
+ sort.format.title
+ *
+ #1 entry.max$ substring$
+ 'sort.key$ :=
+}
+
+ITERATE {bib.sort.order}
+
+SORT % by sort.label, year, title---giving final bibliography order
+
+FUNCTION {begin.bib}
+{ preamble$ empty$ % no \etalchar in apalike
+ 'skip$
+ { preamble$ write$ newline$ }
+ if$
+ "\begin{thebibliography}{}" write$ newline$ % no labels in apalike
+}
+
+EXECUTE {begin.bib}
+
+EXECUTE {init.state.consts}
+
+ITERATE {call.type$}
+
+FUNCTION {end.bib}
+{ newline$
+ "\end{thebibliography}" write$ newline$
+}
+
+EXECUTE {end.bib}
+
diff --git a/biblio/bibtex/contrib/germbib/bst/gerplain.bst b/biblio/bibtex/contrib/germbib/bst/gerplain.bst
new file mode 100644
index 0000000000..5e2de73cd4
--- /dev/null
+++ b/biblio/bibtex/contrib/germbib/bst/gerplain.bst
@@ -0,0 +1,1209 @@
+% BibTeX standard bibliography style `plain'
+ % version 0.99a for BibTeX versions 0.99a or later, LaTeX version 2.09.
+ % Copyright (C) 1985, all rights reserved.
+ % Copying of this file is authorized only if either
+ % (1) you make absolutely no changes to your copy, including name, or
+ % (2) if you do make changes, you name it something other than
+ % btxbst.doc, plain.bst, unsrt.bst, alpha.bst, and abbrv.bst.
+ % This restriction helps ensure that all standard styles are identical.
+ % The file btxbst.doc has the documentation for this style.
+% 15-feb-92 (MW) Updated for use with `bibgerman.sty': things like "and"
+% change with the language. Switch the language using the
+% language field:
+% language = "german" | "USenglish" | "english"
+% Then a `\selectlanguage{...}' command will be pushed just
+% before the `\bibitem...' command for the entry in work.
+% 2003/03/31 Harald Harders Fixed bug in detection of "and others"
+% 2003/04/29 Harald Harders Fixed bug format of names. For multiple
+% names, some of them were not typeset in
+% small caps.
+
+ENTRY
+ { address
+ author
+ booktitle
+ chapter
+ edition
+ editor
+ howpublished
+ institution
+ journal
+ key
+ language
+ month
+ note
+ number
+ organization
+ pages
+ publisher
+ school
+ series
+ title
+ type
+ volume
+ year
+ }
+ {}
+ { label }
+
+INTEGERS { output.state before.all mid.sentence after.sentence after.block before.title }
+
+STRINGS { s t language.state language.temp }
+
+FUNCTION {init.state.consts}
+{ #0 'before.all :=
+ #1 'mid.sentence :=
+ #2 'after.sentence :=
+ #3 'after.block :=
+ #4 'before.title :=
+ "nostate" 'language.state :=
+}
+
+FUNCTION {language.state.test}
+{
+ 'language.temp :=
+ language.temp language.state =
+ { #1 }
+ { #0 }
+ if$
+}
+
+
+FUNCTION {not}
+{ { #0 }
+ { #1 }
+ if$
+}
+
+FUNCTION {and}
+{ 'skip$
+ { pop$ #0 }
+ if$
+}
+
+FUNCTION {or}
+{ { pop$ #1 }
+ 'skip$
+ if$
+}
+
+FUNCTION {output.nonnull}
+{ 's :=
+ output.state mid.sentence =
+ { ", " * write$ }
+ { output.state after.block =
+ { add.period$ write$
+ newline$
+ "\newblock " write$
+ }
+ { output.state before.all =
+ 'write$
+ % next if is for use with `new' FUNCTION {after.authors}
+ { output.state before.title =
+ { ": " * write$ }
+ { add.period$ " " * write$ }
+ if$
+ }
+ if$
+ }
+ if$
+ mid.sentence 'output.state :=
+ }
+ if$
+ s
+}
+
+FUNCTION {output}
+{ duplicate$ empty$
+ 'pop$
+ 'output.nonnull
+ if$
+}
+
+FUNCTION {output.check}
+{ 't :=
+ duplicate$ empty$
+ { pop$ "empty " t * " in " * cite$ * warning$ }
+ 'output.nonnull
+ if$
+}
+
+FUNCTION {output.bibitem}
+{ newline$
+ language empty$
+ 'skip$
+ { language.state language =
+ 'skip$
+ { "\selectlanguage{\" language * "}" * write$
+ newline$
+ }
+ if$
+ language 'language.state :=
+ }
+ if$
+ "\bibitem{" write$
+ cite$ write$
+ "}" write$
+ newline$
+ ""
+ before.all 'output.state :=
+}
+
+FUNCTION {fin.entry}
+{ add.period$
+ write$
+ newline$
+}
+
+FUNCTION {new.block}
+{ output.state before.all =
+ 'skip$
+ { after.block 'output.state := }
+ if$
+}
+
+FUNCTION {new.sentence}
+{ output.state after.block =
+ 'skip$
+ { output.state before.all =
+ 'skip$
+ { after.sentence 'output.state := }
+ if$
+ }
+ if$
+}
+
+% new one -> sets what is specified in FUNCTION {output.nonnull}
+% if `before.title 'output.state = ... if$' is true
+FUNCTION {after.authors}
+{ output.state before.all =
+ 'skip$
+ { before.title 'output.state := }
+ if$
+}
+
+FUNCTION {new.block.checka}
+{ empty$
+ 'skip$
+ 'new.block
+ if$
+}
+
+FUNCTION {new.block.checkb}
+{ empty$
+ swap$ empty$
+ and
+ 'skip$
+ 'new.block
+ if$
+}
+
+FUNCTION {new.block.checkc}
+{ empty$
+ swap$ empty$
+ and
+ 'skip$
+ 'after.authors
+ if$
+}
+
+FUNCTION {new.sentence.checka}
+{ empty$
+ 'skip$
+ 'new.sentence
+ if$
+}
+
+FUNCTION {new.sentence.checkb}
+{ empty$
+ swap$ empty$
+ and
+ 'skip$
+ 'new.sentence
+ if$
+}
+
+FUNCTION {field.or.null}
+{ duplicate$ empty$
+ { pop$ "" }
+ 'skip$
+ if$
+}
+
+FUNCTION {emphasize}
+{ duplicate$ empty$
+ { pop$ "" }
+ { "{\em " swap$ * "}" * }
+ if$
+}
+
+FUNCTION {smallcaps}
+{ duplicate$ empty$
+ { pop$ "" }
+ { "{\sc " swap$ * "}" * }
+ if$
+}
+
+INTEGERS { nameptr namesleft numnames }
+
+FUNCTION {format.names}
+{ 's :=
+ #1 'nameptr :=
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ { nameptr #1 >
+ { s nameptr "{ff~}{vv~}{ll}{, jj}" format.name$ 't :=
+ namesleft #1 >
+ { ", " * t smallcaps * }
+ { numnames #2 >
+ { "english" language.state.test
+ "USenglish" language.state.test
+ or
+ {"," * }
+ 'skip$
+ if$
+ }
+ 'skip$
+ if$
+ t "others" =
+ { " \btxetalshort{.}" * }
+ { " \btxandlong{}\ " * t smallcaps * }
+ if$
+ }
+ if$
+ }
+ { s nameptr "{ll}{, jj}{, ff}{~vv}" format.name$ smallcaps }
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+}
+
+FUNCTION {format.authors}
+{ author empty$
+ { "" }
+ { author format.names }
+ if$
+}
+
+FUNCTION {format.editors}
+{ editor empty$
+ { "" }
+ { editor format.names
+ editor num.names$ #1 >
+ { "\ (\btxeditorslong{})" * }
+ { "\ (\btxeditorlong{})" * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.title}
+{ title empty$
+ { "" }
+ { "english" language.state.test
+ "USenglish" language.state.test
+ or
+ { title "t" change.case$ emphasize }
+ { title emphasize }
+ if$
+ }
+ if$
+}
+
+FUNCTION {n.dashify}
+{ 't :=
+ ""
+ { t empty$ not }
+ { t #1 #1 substring$ "-" =
+ { t #1 #2 substring$ "--" = not
+ { "--" *
+ t #2 global.max$ substring$ 't :=
+ }
+ { { t #1 #1 substring$ "-" = }
+ { "-" *
+ t #2 global.max$ substring$ 't :=
+ }
+ while$
+ }
+ if$
+ }
+ { t #1 #1 substring$ *
+ t #2 global.max$ substring$ 't :=
+ }
+ if$
+ }
+ while$
+}
+
+FUNCTION {format.date}
+{ year empty$
+ { month empty$
+ { "" }
+ { "there's a month but no year in " cite$ * warning$
+ month
+ }
+ if$
+ }
+ { month empty$
+ 'year
+ { month " " * year * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.btitle}
+{ title emphasize
+}
+
+FUNCTION {tie.or.space.connect}
+{ duplicate$ text.length$ #3 <
+ { "~" }
+ { "\ " }
+ if$
+ swap$ * *
+}
+
+FUNCTION {either.or.check}
+{ empty$
+ 'pop$
+ { "can't use both " swap$ * " fields in " * cite$ * warning$ }
+ if$
+}
+
+FUNCTION {format.bvolume}
+{ volume empty$
+ { "" }
+ { output.state after.block =
+ { "\Btxvolumelong{}" }
+ { "\btxvolumelong{}" }
+ if$
+ volume tie.or.space.connect
+ series empty$
+ 'skip$
+ { " \btxofserieslong{}\ " * series emphasize * }
+ if$
+ "volume and number" number either.or.check
+ }
+ if$
+}
+
+FUNCTION {format.number.series}
+{ volume empty$
+ { number empty$
+ { series field.or.null }
+ { output.state mid.sentence =
+ { "\btxnumberlong{}" }
+ { "\Btxnumberlong{}" }
+ if$
+ number tie.or.space.connect
+ series empty$
+ { "there's a number but no series in " cite$ * warning$ }
+ { " \btxinserieslong{}\ " * series emphasize * }
+ if$
+ }
+ if$
+ }
+ { "" }
+ if$
+}
+
+FUNCTION {format.edition}
+{ edition empty$
+ { "" }
+ { "english" language.state.test
+ "USenglish" language.state.test
+ or
+ { output.state mid.sentence =
+ { edition "l" change.case$ " \btxeditionlong{}" * }
+ { edition "t" change.case$ " \btxeditionlong{}" * }
+ if$
+ }
+ { edition " \btxeditionlong{}" * }
+ if$
+ }
+ if$
+}
+
+INTEGERS { multiresult }
+
+FUNCTION {multi.page.check}
+{ 't :=
+ #0 'multiresult :=
+ { multiresult not
+ t empty$ not
+ and
+ }
+ { t #1 #1 substring$
+ duplicate$ "-" =
+ swap$ duplicate$ "," =
+ swap$ "+" =
+ or or
+ { #1 'multiresult := }
+ { t #2 global.max$ substring$ 't := }
+ if$
+ }
+ while$
+ multiresult
+}
+
+FUNCTION {format.pages}
+{ pages empty$
+ { "" }
+ { pages multi.page.check
+ { "\btxpageslong{}" pages n.dashify tie.or.space.connect }
+ { "\btxpagelong{}" pages tie.or.space.connect }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.vol.num.pages}
+{ volume field.or.null
+ number empty$
+ 'skip$
+ { "(" number * ")" * *
+ volume empty$
+ { "there's a number but no volume in " cite$ * warning$ }
+ 'skip$
+ if$
+ }
+ if$
+ pages empty$
+ 'skip$
+ { duplicate$ empty$
+ { pop$ format.pages }
+ { ":" * pages n.dashify * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.chapter.pages}
+{ chapter empty$
+ 'format.pages
+ { type empty$
+ { "\btxchapterlong{}" }
+ { "english" language.state.test
+ "USenglish" language.state.test
+ or
+ { type "l" change.case$ }
+ { type }
+ if$
+ }
+ if$
+ chapter tie.or.space.connect
+ pages empty$
+ 'skip$
+ { ", " * format.pages * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.in.ed.booktitle}
+{ booktitle empty$
+ { "" }
+ { editor empty$
+ { "\Btxinlong{}\ " booktitle emphasize * }
+ { "\Btxinlong{}\ " format.editors * ": " * booktitle emphasize * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {empty.misc.check}
+{ author empty$ title empty$ howpublished empty$
+ month empty$ year empty$ note empty$
+ and and and and and
+ key empty$ not and
+ { "all relevant fields are empty in " cite$ * warning$ }
+ 'skip$
+ if$
+}
+
+FUNCTION {format.thesis.type}
+{ type empty$
+ 'skip$
+ { pop$
+ "english" language.state.test
+ "USenglish" language.state.test
+ or
+ { type "t" change.case$ }
+ { type }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.tr.number}
+{ type empty$
+ { "\Btxtechreplong{}" }
+ 'type
+ if$
+ number empty$
+ { "english" language.state.test
+ "USenglish" language.state.test
+ or
+ { type empty$
+ { pop$ "\btxtechreplong{}" }
+ { "t" change.case$ }
+ if$
+ }
+ 'skip$
+ if$
+ }
+ { number tie.or.space.connect }
+ if$
+}
+
+FUNCTION {format.article.crossref}
+{ key empty$
+ { journal empty$
+ { "need key or journal for " cite$ * " to crossref " * crossref *
+ warning$
+ ""
+ }
+ { "\Btxinlong{}\ " journal emphasize * }
+ if$
+ }
+ { "\Btxinlong{}\ " key emphasize * }
+ if$
+ " \cite{" * crossref * "}" *
+}
+
+FUNCTION {format.crossref.editor}
+{ editor #1 "{ll}{, jj}{, ff}{~vv}" format.name$ smallcaps
+ editor num.names$ duplicate$
+ #2 >
+ { pop$ " \btxetalshort{.}" * }
+ { #2 <
+ 'skip$
+ { editor #2 "{ff }{vv }{ll}{ jj}" format.name$ "others" =
+ { " \btxetalshort{.}" * }
+ { " \btxandlong{}\ " * editor #2 "{ff}{~vv}{~ll}{, jj}" format.name$ smallcaps * }
+ if$
+ }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.book.crossref}
+{ volume empty$
+ { "empty volume in " cite$ * "'s crossref of " * crossref * warning$
+ "\Btxinlong{}\ "
+ }
+ { "\Btxvolumelong{}" volume tie.or.space.connect
+ " \btxofserieslong{}\ " *
+ }
+ if$
+ editor empty$
+ editor field.or.null author field.or.null =
+ or
+ { key empty$
+ { series empty$
+ { "need editor, key, or series for " cite$ * " to crossref " *
+ crossref * warning$
+ "" *
+ }
+ { series emphasize * }
+ if$
+ }
+ { key emphasize * }
+ if$
+ }
+ { format.crossref.editor * }
+ if$
+ " \cite{" * crossref * "}" *
+}
+
+FUNCTION {format.incoll.inproc.crossref}
+{ editor empty$
+ editor field.or.null author field.or.null =
+ or
+ { key empty$
+ { booktitle empty$
+ { "need editor, key, or booktitle for " cite$ * " to crossref " *
+ crossref * warning$
+ ""
+ }
+ { "\Btxinlong{}\ " booktitle emphasize * }
+ if$
+ }
+ { "\Btxinlong{}\ " key emphasize * }
+ if$
+ }
+ { "\Btxinlong{}\ " format.crossref.editor * }
+ if$
+ " \cite{" * crossref * "}" *
+}
+
+FUNCTION {article}
+{ output.bibitem
+ format.authors "author" output.check
+ after.authors
+ format.title "title" output.check
+ new.block
+ crossref missing$
+ { journal
+ title missing$
+ { emphasize }
+ 'skip$
+ if$
+ "journal" output.check
+ format.vol.num.pages output
+ format.date "year" output.check
+ }
+ { format.article.crossref output.nonnull
+ format.pages output
+ }
+ if$
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {book}
+{ output.bibitem
+ author empty$
+ { format.editors "author and editor" output.check }
+ { format.authors output.nonnull
+ crossref missing$
+ { "author and editor" editor either.or.check }
+ 'skip$
+ if$
+ }
+ if$
+ after.authors
+ format.btitle "title" output.check
+ crossref missing$
+ { format.bvolume output
+ new.block
+ format.number.series output
+ new.sentence
+ publisher "publisher" output.check
+ address output
+ }
+ { new.block
+ format.book.crossref output.nonnull
+ }
+ if$
+ format.edition output
+ format.date "year" output.check
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {booklet}
+{ output.bibitem
+ format.authors output
+ after.authors
+ format.title "title" output.check
+ howpublished address new.block.checkb
+ howpublished output
+ address output
+ format.date output
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {inbook}
+{ output.bibitem
+ author empty$
+ { format.editors "author and editor" output.check }
+ { format.authors output.nonnull
+ crossref missing$
+ { "author and editor" editor either.or.check }
+ 'skip$
+ if$
+ }
+ if$
+ after.authors
+ format.btitle "title" output.check
+ crossref missing$
+ { format.bvolume output
+ format.chapter.pages "chapter and pages" output.check
+ new.block
+ format.number.series output
+ new.sentence
+ publisher "publisher" output.check
+ address output
+ }
+ { format.chapter.pages "chapter and pages" output.check
+ new.block
+ format.book.crossref output.nonnull
+ }
+ if$
+ format.edition output
+ format.date "year" output.check
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {incollection}
+{ output.bibitem
+ format.authors "author" output.check
+ after.authors
+ format.title "title" output.check
+ new.block
+ crossref missing$
+ { format.in.ed.booktitle "booktitle" output.check
+ format.bvolume output
+ format.number.series output
+ format.chapter.pages output
+ new.sentence
+ publisher "publisher" output.check
+ address output
+ format.edition output
+ format.date "year" output.check
+ }
+ { format.incoll.inproc.crossref output.nonnull
+ format.chapter.pages output
+ }
+ if$
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {inproceedings}
+{ output.bibitem
+ format.authors "author" output.check
+ after.authors
+ format.title "title" output.check
+ new.block
+ crossref missing$
+ { format.in.ed.booktitle "booktitle" output.check
+ format.bvolume output
+ format.number.series output
+ format.pages output
+ address empty$
+ { organization publisher new.sentence.checkb
+ organization output
+ publisher output
+ format.date "year" output.check
+ }
+ { address output.nonnull
+ format.date "year" output.check
+ new.sentence
+ organization output
+ publisher output
+ }
+ if$
+ }
+ { format.incoll.inproc.crossref output.nonnull
+ format.pages output
+ }
+ if$
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {conference} { inproceedings }
+
+FUNCTION {manual}
+{ output.bibitem
+ author empty$
+ { organization empty$
+ 'skip$
+ { organization smallcaps output.nonnull
+ address output
+ }
+ if$
+ }
+ { format.authors output.nonnull }
+ if$
+ after.authors
+ format.btitle "title" output.check
+ author empty$
+ { organization empty$
+ { address new.block.checka
+ address output
+ }
+ 'skip$
+ if$
+ }
+ { organization address new.block.checkb
+ organization output
+ address output
+ }
+ if$
+ format.edition output
+ format.date output
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {mastersthesis}
+{ output.bibitem
+ format.authors "author" output.check
+ after.authors
+ format.title "title" output.check
+ new.block
+ "\btxmastthesis{}" format.thesis.type output.nonnull
+ school "school" output.check
+ address output
+ format.date "year" output.check
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {misc}
+{ output.bibitem
+ format.authors output
+ title howpublished new.block.checkc
+ format.title output
+ howpublished new.block.checka
+ howpublished output
+ format.date output
+ new.block
+ note output
+ fin.entry
+ empty.misc.check
+}
+
+FUNCTION {phdthesis}
+{ output.bibitem
+ format.authors "author" output.check
+ after.authors
+ format.btitle "title" output.check
+ new.block
+ "\btxphdthesis{}" format.thesis.type output.nonnull
+ school "school" output.check
+ address output
+ format.date "year" output.check
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {proceedings}
+{ output.bibitem
+ editor empty$
+ { organization smallcaps output }
+ { format.editors output.nonnull }
+ if$
+ after.authors
+ format.btitle "title" output.check
+ format.bvolume output
+ format.number.series output
+ address empty$
+ { editor empty$
+ { publisher new.sentence.checka }
+ { organization publisher new.sentence.checkb
+ organization output
+ }
+ if$
+ publisher output
+ format.date "year" output.check
+ }
+ { address output.nonnull
+ format.date "year" output.check
+ new.sentence
+ editor empty$
+ 'skip$
+ { organization output }
+ if$
+ publisher output
+ }
+ if$
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {techreport}
+{ output.bibitem
+ format.authors "author" output.check
+ after.authors
+ format.title "title" output.check
+ new.block
+ format.tr.number output.nonnull
+ institution "institution" output.check
+ address output
+ format.date "year" output.check
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {unpublished}
+{ output.bibitem
+ format.authors "author" output.check
+ after.authors
+ format.title "title" output.check
+ new.block
+ note "note" output.check
+ format.date output
+ fin.entry
+}
+
+FUNCTION {default.type} { misc }
+
+MACRO {jan} {"\btxmonjanlong{}"}
+
+MACRO {feb} {"\btxmonfeblong{}"}
+
+MACRO {mar} {"\btxmonmarlong{}"}
+
+MACRO {apr} {"\btxmonaprlong{}"}
+
+MACRO {may} {"\btxmonmaylong{}"}
+
+MACRO {jun} {"\btxmonjunlong{}"}
+
+MACRO {jul} {"\btxmonjullong{}"}
+
+MACRO {aug} {"\btxmonauglong{}"}
+
+MACRO {sep} {"\btxmonseplong{}"}
+
+MACRO {oct} {"\btxmonoctlong{}"}
+
+MACRO {nov} {"\btxmonnovlong{}"}
+
+MACRO {dec} {"\btxmondeclong{}"}
+
+MACRO {acmcs} {"ACM Computing Surveys"}
+
+MACRO {acta} {"Acta Informatica"}
+
+MACRO {cacm} {"Communications of the ACM"}
+
+MACRO {ibmjrd} {"IBM Journal of Research and Development"}
+
+MACRO {ibmsj} {"IBM Systems Journal"}
+
+MACRO {ieeese} {"IEEE Transactions on Software Engineering"}
+
+MACRO {ieeetc} {"IEEE Transactions on Computers"}
+
+MACRO {ieeetcad}
+ {"IEEE Transactions on Computer-Aided Design of Integrated Circuits"}
+
+MACRO {ipl} {"Information Processing Letters"}
+
+MACRO {jacm} {"Journal of the ACM"}
+
+MACRO {jcss} {"Journal of Computer and System Sciences"}
+
+MACRO {scp} {"Science of Computer Programming"}
+
+MACRO {sicomp} {"SIAM Journal on Computing"}
+
+MACRO {tocs} {"ACM Transactions on Computer Systems"}
+
+MACRO {tods} {"ACM Transactions on Database Systems"}
+
+MACRO {tog} {"ACM Transactions on Graphics"}
+
+MACRO {toms} {"ACM Transactions on Mathematical Software"}
+
+MACRO {toois} {"ACM Transactions on Office Information Systems"}
+
+MACRO {toplas} {"ACM Transactions on Programming Languages and Systems"}
+
+MACRO {tcs} {"Theoretical Computer Science"}
+
+READ
+
+FUNCTION {sortify}
+{ purify$
+ "l" change.case$
+}
+
+INTEGERS { len }
+
+FUNCTION {chop.word}
+{ 's :=
+ 'len :=
+ s #1 len substring$ =
+ { s len #1 + global.max$ substring$ }
+ 's
+ if$
+}
+
+FUNCTION {sort.format.names}
+{ 's :=
+ #1 'nameptr :=
+ ""
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ { nameptr #1 >
+ { " " * }
+ 'skip$
+ if$
+ s nameptr "{ll{ }}{ ff{ }}{vv{ } }{ jj{ }}" format.name$ 't :=
+ nameptr numnames = t "others" = and
+ { "et al" * }
+ { t sortify * }
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+}
+
+FUNCTION {sort.format.title}
+{ 't :=
+ "A " #2
+ "An " #3
+ "The " #4 t chop.word
+ chop.word
+ chop.word
+ sortify
+ #1 global.max$ substring$
+}
+
+FUNCTION {author.sort}
+{ author empty$
+ { key empty$
+ { "to sort, need author or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { author sort.format.names }
+ if$
+}
+
+FUNCTION {author.editor.sort}
+{ author empty$
+ { editor empty$
+ { key empty$
+ { "to sort, need author, editor, or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { editor sort.format.names }
+ if$
+ }
+ { author sort.format.names }
+ if$
+}
+
+FUNCTION {author.organization.sort}
+{ author empty$
+ { organization empty$
+ { key empty$
+ { "to sort, need author, organization, or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { "The " #4 organization chop.word sortify }
+ if$
+ }
+ { author sort.format.names }
+ if$
+}
+
+FUNCTION {editor.organization.sort}
+{ editor empty$
+ { organization empty$
+ { key empty$
+ { "to sort, need editor, organization, or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { "The " #4 organization chop.word sortify }
+ if$
+ }
+ { editor sort.format.names }
+ if$
+}
+
+FUNCTION {presort}
+{ type$ "book" =
+ type$ "inbook" =
+ or
+ 'author.editor.sort
+ { type$ "proceedings" =
+ 'editor.organization.sort
+ { type$ "manual" =
+ 'author.organization.sort
+ 'author.sort
+ if$
+ }
+ if$
+ }
+ if$
+ " "
+ *
+ year field.or.null sortify
+ *
+ " "
+ *
+ title field.or.null
+ sort.format.title
+ *
+ #1 entry.max$ substring$
+ 'sort.key$ :=
+}
+
+ITERATE {presort}
+
+SORT
+
+STRINGS { longest.label }
+
+INTEGERS { number.label longest.label.width }
+
+FUNCTION {initialize.longest.label}
+{ "" 'longest.label :=
+ #1 'number.label :=
+ #0 'longest.label.width :=
+}
+
+FUNCTION {longest.label.pass}
+{ number.label int.to.str$ 'label :=
+ number.label #1 + 'number.label :=
+ label width$ longest.label.width >
+ { label 'longest.label :=
+ label width$ 'longest.label.width :=
+ }
+ 'skip$
+ if$
+}
+
+EXECUTE {initialize.longest.label}
+
+ITERATE {longest.label.pass}
+
+FUNCTION {begin.bib}
+{ preamble$ empty$
+ 'skip$
+ { preamble$ write$ newline$ }
+ if$
+ "\begin{thebibliography}{" longest.label * "}" * write$ newline$
+}
+
+EXECUTE {begin.bib}
+
+EXECUTE {init.state.consts}
+
+ITERATE {call.type$}
+
+FUNCTION {end.bib}
+{ newline$
+ "\end{thebibliography}" write$ newline$
+}
+
+EXECUTE {end.bib}
diff --git a/biblio/bibtex/contrib/germbib/bst/gerunsrt.bst b/biblio/bibtex/contrib/germbib/bst/gerunsrt.bst
new file mode 100644
index 0000000000..293ef709c5
--- /dev/null
+++ b/biblio/bibtex/contrib/germbib/bst/gerunsrt.bst
@@ -0,0 +1,1063 @@
+% BibTeX standard bibliography style `plain'
+ % version 0.99a for BibTeX versions 0.99a or later, LaTeX version 2.09.
+ % Copyright (C) 1985, all rights reserved.
+ % Copying of this file is authorized only if either
+ % (1) you make absolutely no changes to your copy, including name, or
+ % (2) if you do make changes, you name it something other than
+ % btxbst.doc, plain.bst, unsrt.bst, alpha.bst, and abbrv.bst.
+ % This restriction helps ensure that all standard styles are identical.
+ % The file btxbst.doc has the documentation for this style.
+% 15-feb-92 (MW) Updated for use with `bibgerman.sty': things like "and"
+% change with the language. Switch the language using the
+% language field:
+% language = "german" | "USenglish" | "english"
+% Then a `\selectlanguage{...}' command will be pushed just
+% before the `\bibitem...' command for the entry in work.
+% 2003/03/31 Harald Harders Fixed bug in detection of "and others"
+% 2003/04/29 Harald Harders Fixed bug format of names. For multiple
+% names, some of them were not typeset in
+% small caps.
+
+ENTRY
+ { address
+ author
+ booktitle
+ chapter
+ edition
+ editor
+ howpublished
+ institution
+ journal
+ key
+ language
+ month
+ note
+ number
+ organization
+ pages
+ publisher
+ school
+ series
+ title
+ type
+ volume
+ year
+ }
+ {}
+ { label }
+
+INTEGERS { output.state before.all mid.sentence after.sentence after.block before.title }
+
+STRINGS { s t language.state language.temp }
+
+FUNCTION {init.state.consts}
+{ #0 'before.all :=
+ #1 'mid.sentence :=
+ #2 'after.sentence :=
+ #3 'after.block :=
+ #4 'before.title :=
+ "nostate" 'language.state :=
+}
+
+FUNCTION {language.state.test}
+{
+ 'language.temp :=
+ language.temp language.state =
+ { #1 }
+ { #0 }
+ if$
+}
+
+
+FUNCTION {not}
+{ { #0 }
+ { #1 }
+ if$
+}
+
+FUNCTION {and}
+{ 'skip$
+ { pop$ #0 }
+ if$
+}
+
+FUNCTION {or}
+{ { pop$ #1 }
+ 'skip$
+ if$
+}
+
+FUNCTION {output.nonnull}
+{ 's :=
+ output.state mid.sentence =
+ { ", " * write$ }
+ { output.state after.block =
+ { add.period$ write$
+ newline$
+ "\newblock " write$
+ }
+ { output.state before.all =
+ 'write$
+ % next if is for use with `new' FUNCTION {after.authors}
+ { output.state before.title =
+ { ": " * write$ }
+ { add.period$ " " * write$ }
+ if$
+ }
+ if$
+ }
+ if$
+ mid.sentence 'output.state :=
+ }
+ if$
+ s
+}
+
+FUNCTION {output}
+{ duplicate$ empty$
+ 'pop$
+ 'output.nonnull
+ if$
+}
+
+FUNCTION {output.check}
+{ 't :=
+ duplicate$ empty$
+ { pop$ "empty " t * " in " * cite$ * warning$ }
+ 'output.nonnull
+ if$
+}
+
+FUNCTION {output.bibitem}
+{ newline$
+ language empty$
+ 'skip$
+ { language.state language =
+ 'skip$
+ { "\selectlanguage{\" language * "}" * write$
+ newline$
+ }
+ if$
+ language 'language.state :=
+ }
+ if$
+ "\bibitem{" write$
+ cite$ write$
+ "}" write$
+ newline$
+ ""
+ before.all 'output.state :=
+}
+
+FUNCTION {fin.entry}
+{ add.period$
+ write$
+ newline$
+}
+
+FUNCTION {new.block}
+{ output.state before.all =
+ 'skip$
+ { after.block 'output.state := }
+ if$
+}
+
+FUNCTION {new.sentence}
+{ output.state after.block =
+ 'skip$
+ { output.state before.all =
+ 'skip$
+ { after.sentence 'output.state := }
+ if$
+ }
+ if$
+}
+
+% new one -> sets what is specified in FUNCTION {output.nonnull}
+% if `before.title 'output.state = ... if$' is true
+FUNCTION {after.authors}
+{ output.state before.all =
+ 'skip$
+ { before.title 'output.state := }
+ if$
+}
+
+FUNCTION {new.block.checka}
+{ empty$
+ 'skip$
+ 'new.block
+ if$
+}
+
+FUNCTION {new.block.checkb}
+{ empty$
+ swap$ empty$
+ and
+ 'skip$
+ 'new.block
+ if$
+}
+
+FUNCTION {new.block.checkc}
+{ empty$
+ swap$ empty$
+ and
+ 'skip$
+ 'after.authors
+ if$
+}
+
+FUNCTION {new.sentence.checka}
+{ empty$
+ 'skip$
+ 'new.sentence
+ if$
+}
+
+FUNCTION {new.sentence.checkb}
+{ empty$
+ swap$ empty$
+ and
+ 'skip$
+ 'new.sentence
+ if$
+}
+
+FUNCTION {field.or.null}
+{ duplicate$ empty$
+ { pop$ "" }
+ 'skip$
+ if$
+}
+
+FUNCTION {emphasize}
+{ duplicate$ empty$
+ { pop$ "" }
+ { "{\em " swap$ * "}" * }
+ if$
+}
+
+FUNCTION {smallcaps}
+{ duplicate$ empty$
+ { pop$ "" }
+ { "{\sc " swap$ * "}" * }
+ if$
+}
+
+INTEGERS { nameptr namesleft numnames }
+
+FUNCTION {format.names}
+{ 's :=
+ #1 'nameptr :=
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ { nameptr #1 >
+ { s nameptr "{ff~}{vv~}{ll}{, jj}" format.name$ 't :=
+ namesleft #1 >
+ { ", " * t smallcaps * }
+ { numnames #2 >
+ { "english" language.state.test
+ "USenglish" language.state.test
+ or
+ {"," * }
+ 'skip$
+ if$
+ }
+ 'skip$
+ if$
+ t "others" =
+ { " \btxetalshort{.}" * }
+ { " \btxandlong{}\ " * t smallcaps * }
+ if$
+ }
+ if$
+ }
+ { s nameptr "{ll}{, jj}{, ff}{~vv}" format.name$ smallcaps }
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+}
+
+FUNCTION {format.authors}
+{ author empty$
+ { "" }
+ { author format.names }
+ if$
+}
+
+FUNCTION {format.editors}
+{ editor empty$
+ { "" }
+ { editor format.names
+ editor num.names$ #1 >
+ { "\ (\btxeditorslong{})" * }
+ { "\ (\btxeditorlong{})" * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.title}
+{ title empty$
+ { "" }
+ { "english" language.state.test
+ "USenglish" language.state.test
+ or
+ { title "t" change.case$ emphasize }
+ { title emphasize }
+ if$
+ }
+ if$
+}
+
+FUNCTION {n.dashify}
+{ 't :=
+ ""
+ { t empty$ not }
+ { t #1 #1 substring$ "-" =
+ { t #1 #2 substring$ "--" = not
+ { "--" *
+ t #2 global.max$ substring$ 't :=
+ }
+ { { t #1 #1 substring$ "-" = }
+ { "-" *
+ t #2 global.max$ substring$ 't :=
+ }
+ while$
+ }
+ if$
+ }
+ { t #1 #1 substring$ *
+ t #2 global.max$ substring$ 't :=
+ }
+ if$
+ }
+ while$
+}
+
+FUNCTION {format.date}
+{ year empty$
+ { month empty$
+ { "" }
+ { "there's a month but no year in " cite$ * warning$
+ month
+ }
+ if$
+ }
+ { month empty$
+ 'year
+ { month " " * year * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.btitle}
+{ title emphasize
+}
+
+FUNCTION {tie.or.space.connect}
+{ duplicate$ text.length$ #3 <
+ { "~" }
+ { "\ " }
+ if$
+ swap$ * *
+}
+
+FUNCTION {either.or.check}
+{ empty$
+ 'pop$
+ { "can't use both " swap$ * " fields in " * cite$ * warning$ }
+ if$
+}
+
+FUNCTION {format.bvolume}
+{ volume empty$
+ { "" }
+ { output.state after.block =
+ { "\Btxvolumelong{}" }
+ { "\btxvolumelong{}" }
+ if$
+ volume tie.or.space.connect
+ series empty$
+ 'skip$
+ { " \btxofserieslong{}\ " * series emphasize * }
+ if$
+ "volume and number" number either.or.check
+ }
+ if$
+}
+
+FUNCTION {format.number.series}
+{ volume empty$
+ { number empty$
+ { series field.or.null }
+ { output.state mid.sentence =
+ { "\btxnumberlong{}" }
+ { "\Btxnumberlong{}" }
+ if$
+ number tie.or.space.connect
+ series empty$
+ { "there's a number but no series in " cite$ * warning$ }
+ { " \btxinserieslong{}\ " * series emphasize * }
+ if$
+ }
+ if$
+ }
+ { "" }
+ if$
+}
+
+FUNCTION {format.edition}
+{ edition empty$
+ { "" }
+ { "english" language.state.test
+ "USenglish" language.state.test
+ or
+ { output.state mid.sentence =
+ { edition "l" change.case$ " \btxeditionlong{}" * }
+ { edition "t" change.case$ " \btxeditionlong{}" * }
+ if$
+ }
+ { edition " \btxeditionlong{}" * }
+ if$
+ }
+ if$
+}
+
+INTEGERS { multiresult }
+
+FUNCTION {multi.page.check}
+{ 't :=
+ #0 'multiresult :=
+ { multiresult not
+ t empty$ not
+ and
+ }
+ { t #1 #1 substring$
+ duplicate$ "-" =
+ swap$ duplicate$ "," =
+ swap$ "+" =
+ or or
+ { #1 'multiresult := }
+ { t #2 global.max$ substring$ 't := }
+ if$
+ }
+ while$
+ multiresult
+}
+
+FUNCTION {format.pages}
+{ pages empty$
+ { "" }
+ { pages multi.page.check
+ { "\btxpageslong{}" pages n.dashify tie.or.space.connect }
+ { "\btxpagelong{}" pages tie.or.space.connect }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.vol.num.pages}
+{ volume field.or.null
+ number empty$
+ 'skip$
+ { "(" number * ")" * *
+ volume empty$
+ { "there's a number but no volume in " cite$ * warning$ }
+ 'skip$
+ if$
+ }
+ if$
+ pages empty$
+ 'skip$
+ { duplicate$ empty$
+ { pop$ format.pages }
+ { ":" * pages n.dashify * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.chapter.pages}
+{ chapter empty$
+ 'format.pages
+ { type empty$
+ { "\btxchapterlong{}" }
+ { "english" language.state.test
+ "USenglish" language.state.test
+ or
+ { type "l" change.case$ }
+ { type }
+ if$
+ }
+ if$
+ chapter tie.or.space.connect
+ pages empty$
+ 'skip$
+ { ", " * format.pages * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.in.ed.booktitle}
+{ booktitle empty$
+ { "" }
+ { editor empty$
+ { "\Btxinlong{}\ " booktitle emphasize * }
+ { "\Btxinlong{}\ " format.editors * ": " * booktitle emphasize * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {empty.misc.check}
+{ author empty$ title empty$ howpublished empty$
+ month empty$ year empty$ note empty$
+ and and and and and
+ { "all relevant fields are empty in " cite$ * warning$ }
+ 'skip$
+ if$
+}
+
+FUNCTION {format.thesis.type}
+{ type empty$
+ 'skip$
+ { pop$
+ "english" language.state.test
+ "USenglish" language.state.test
+ or
+ { type "t" change.case$ }
+ { type }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.tr.number}
+{ type empty$
+ { "\Btxtechreplong{}" }
+ 'type
+ if$
+ number empty$
+ { "english" language.state.test
+ "USenglish" language.state.test
+ or
+ { type empty$
+ { pop$ "\btxtechreplong{}" }
+ { "t" change.case$ }
+ if$
+ }
+ 'skip$
+ if$
+ }
+ { number tie.or.space.connect }
+ if$
+}
+
+FUNCTION {format.article.crossref}
+{ key empty$
+ { journal empty$
+ { "need key or journal for " cite$ * " to crossref " * crossref *
+ warning$
+ ""
+ }
+ { "\Btxinlong{}\ " journal emphasize * }
+ if$
+ }
+ { "\Btxinlong{}\ " key emphasize * }
+ if$
+ " \cite{" * crossref * "}" *
+}
+
+FUNCTION {format.crossref.editor}
+{ editor #1 "{ll}{, jj}{, ff}{~vv}" format.name$ smallcaps
+ editor num.names$ duplicate$
+ #2 >
+ { pop$ " \btxetalshort{.}" * }
+ { #2 <
+ 'skip$
+ { editor #2 "{ff }{vv }{ll}{ jj}" format.name$ "others" =
+ { " \btxetalshort{.}" * }
+ { " \btxandlong{}\ " * editor #2 "{ff}{~vv}{~ll}{, jj}" format.name$ smallcaps * }
+ if$
+ }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.book.crossref}
+{ volume empty$
+ { "empty volume in " cite$ * "'s crossref of " * crossref * warning$
+ "\Btxinlong{}\ "
+ }
+ { "\Btxvolumelong{}" volume tie.or.space.connect
+ " \btxofserieslong{}\ " *
+ }
+ if$
+ editor empty$
+ editor field.or.null author field.or.null =
+ or
+ { key empty$
+ { series empty$
+ { "need editor, key, or series for " cite$ * " to crossref " *
+ crossref * warning$
+ "" *
+ }
+ { series emphasize * }
+ if$
+ }
+ { key emphasize * }
+ if$
+ }
+ { format.crossref.editor * }
+ if$
+ " \cite{" * crossref * "}" *
+}
+
+FUNCTION {format.incoll.inproc.crossref}
+{ editor empty$
+ editor field.or.null author field.or.null =
+ or
+ { key empty$
+ { booktitle empty$
+ { "need editor, key, or booktitle for " cite$ * " to crossref " *
+ crossref * warning$
+ ""
+ }
+ { "\Btxinlong{}\ " booktitle emphasize * }
+ if$
+ }
+ { "\Btxinlong{}\ " key emphasize * }
+ if$
+ }
+ { "\Btxinlong{}\ " format.crossref.editor * }
+ if$
+ " \cite{" * crossref * "}" *
+}
+
+FUNCTION {article}
+{ output.bibitem
+ format.authors "author" output.check
+ after.authors
+ format.title "title" output.check
+ new.block
+ crossref missing$
+ { journal
+ title missing$
+ { emphasize }
+ 'skip$
+ if$
+ "journal" output.check
+ format.vol.num.pages output
+ format.date "year" output.check
+ }
+ { format.article.crossref output.nonnull
+ format.pages output
+ }
+ if$
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {book}
+{ output.bibitem
+ author empty$
+ { format.editors "author and editor" output.check }
+ { format.authors output.nonnull
+ crossref missing$
+ { "author and editor" editor either.or.check }
+ 'skip$
+ if$
+ }
+ if$
+ after.authors
+ format.btitle "title" output.check
+ crossref missing$
+ { format.bvolume output
+ new.block
+ format.number.series output
+ new.sentence
+ publisher "publisher" output.check
+ address output
+ }
+ { new.block
+ format.book.crossref output.nonnull
+ }
+ if$
+ format.edition output
+ format.date "year" output.check
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {booklet}
+{ output.bibitem
+ format.authors output
+ after.authors
+ format.title "title" output.check
+ howpublished address new.block.checkb
+ howpublished output
+ address output
+ format.date output
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {inbook}
+{ output.bibitem
+ author empty$
+ { format.editors "author and editor" output.check }
+ { format.authors output.nonnull
+ crossref missing$
+ { "author and editor" editor either.or.check }
+ 'skip$
+ if$
+ }
+ if$
+ after.authors
+ format.btitle "title" output.check
+ crossref missing$
+ { format.bvolume output
+ format.chapter.pages "chapter and pages" output.check
+ new.block
+ format.number.series output
+ new.sentence
+ publisher "publisher" output.check
+ address output
+ }
+ { format.chapter.pages "chapter and pages" output.check
+ new.block
+ format.book.crossref output.nonnull
+ }
+ if$
+ format.edition output
+ format.date "year" output.check
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {incollection}
+{ output.bibitem
+ format.authors "author" output.check
+ after.authors
+ format.title "title" output.check
+ new.block
+ crossref missing$
+ { format.in.ed.booktitle "booktitle" output.check
+ format.bvolume output
+ format.number.series output
+ format.chapter.pages output
+ new.sentence
+ publisher "publisher" output.check
+ address output
+ format.edition output
+ format.date "year" output.check
+ }
+ { format.incoll.inproc.crossref output.nonnull
+ format.chapter.pages output
+ }
+ if$
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {inproceedings}
+{ output.bibitem
+ format.authors "author" output.check
+ after.authors
+ format.title "title" output.check
+ new.block
+ crossref missing$
+ { format.in.ed.booktitle "booktitle" output.check
+ format.bvolume output
+ format.number.series output
+ format.pages output
+ address empty$
+ { organization publisher new.sentence.checkb
+ organization output
+ publisher output
+ format.date "year" output.check
+ }
+ { address output.nonnull
+ format.date "year" output.check
+ new.sentence
+ organization output
+ publisher output
+ }
+ if$
+ }
+ { format.incoll.inproc.crossref output.nonnull
+ format.pages output
+ }
+ if$
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {conference} { inproceedings }
+
+FUNCTION {manual}
+{ output.bibitem
+ author empty$
+ { organization empty$
+ 'skip$
+ { organization smallcaps output.nonnull
+ address output
+ }
+ if$
+ }
+ { format.authors output.nonnull }
+ if$
+ after.authors
+ format.btitle "title" output.check
+ author empty$
+ { organization empty$
+ { address new.block.checka
+ address output
+ }
+ 'skip$
+ if$
+ }
+ { organization address new.block.checkb
+ organization output
+ address output
+ }
+ if$
+ format.edition output
+ format.date output
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {mastersthesis}
+{ output.bibitem
+ format.authors "author" output.check
+ after.authors
+ format.title "title" output.check
+ new.block
+ "\btxmastthesis{}" format.thesis.type output.nonnull
+ school "school" output.check
+ address output
+ format.date "year" output.check
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {misc}
+{ output.bibitem
+ format.authors output
+ title howpublished new.block.checkc
+ format.title output
+ howpublished new.block.checka
+ howpublished output
+ format.date output
+ new.block
+ note output
+ fin.entry
+ empty.misc.check
+}
+
+FUNCTION {phdthesis}
+{ output.bibitem
+ format.authors "author" output.check
+ after.authors
+ format.btitle "title" output.check
+ new.block
+ "\btxphdthesis{}" format.thesis.type output.nonnull
+ school "school" output.check
+ address output
+ format.date "year" output.check
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {proceedings}
+{ output.bibitem
+ editor empty$
+ { organization smallcaps output }
+ { format.editors output.nonnull }
+ if$
+ after.authors
+ format.btitle "title" output.check
+ format.bvolume output
+ format.number.series output
+ address empty$
+ { editor empty$
+ { publisher new.sentence.checka }
+ { organization publisher new.sentence.checkb
+ organization output
+ }
+ if$
+ publisher output
+ format.date "year" output.check
+ }
+ { address output.nonnull
+ format.date "year" output.check
+ new.sentence
+ editor empty$
+ 'skip$
+ { organization output }
+ if$
+ publisher output
+ }
+ if$
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {techreport}
+{ output.bibitem
+ format.authors "author" output.check
+ after.authors
+ format.title "title" output.check
+ new.block
+ format.tr.number output.nonnull
+ institution "institution" output.check
+ address output
+ format.date "year" output.check
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {unpublished}
+{ output.bibitem
+ format.authors "author" output.check
+ after.authors
+ format.title "title" output.check
+ new.block
+ note "note" output.check
+ format.date output
+ fin.entry
+}
+
+FUNCTION {default.type} { misc }
+
+MACRO {jan} {"\btxmonjanlong{}"}
+
+MACRO {feb} {"\btxmonfeblong{}"}
+
+MACRO {mar} {"\btxmonmarlong{}"}
+
+MACRO {apr} {"\btxmonaprlong{}"}
+
+MACRO {may} {"\btxmonmaylong{}"}
+
+MACRO {jun} {"\btxmonjunlong{}"}
+
+MACRO {jul} {"\btxmonjullong{}"}
+
+MACRO {aug} {"\btxmonauglong{}"}
+
+MACRO {sep} {"\btxmonseplong{}"}
+
+MACRO {oct} {"\btxmonoctlong{}"}
+
+MACRO {nov} {"\btxmonnovlong{}"}
+
+MACRO {dec} {"\btxmondeclong{}"}
+
+MACRO {acmcs} {"ACM Computing Surveys"}
+
+MACRO {acta} {"Acta Informatica"}
+
+MACRO {cacm} {"Communications of the ACM"}
+
+MACRO {ibmjrd} {"IBM Journal of Research and Development"}
+
+MACRO {ibmsj} {"IBM Systems Journal"}
+
+MACRO {ieeese} {"IEEE Transactions on Software Engineering"}
+
+MACRO {ieeetc} {"IEEE Transactions on Computers"}
+
+MACRO {ieeetcad}
+ {"IEEE Transactions on Computer-Aided Design of Integrated Circuits"}
+
+MACRO {ipl} {"Information Processing Letters"}
+
+MACRO {jacm} {"Journal of the ACM"}
+
+MACRO {jcss} {"Journal of Computer and System Sciences"}
+
+MACRO {scp} {"Science of Computer Programming"}
+
+MACRO {sicomp} {"SIAM Journal on Computing"}
+
+MACRO {tocs} {"ACM Transactions on Computer Systems"}
+
+MACRO {tods} {"ACM Transactions on Database Systems"}
+
+MACRO {tog} {"ACM Transactions on Graphics"}
+
+MACRO {toms} {"ACM Transactions on Mathematical Software"}
+
+MACRO {toois} {"ACM Transactions on Office Information Systems"}
+
+MACRO {toplas} {"ACM Transactions on Programming Languages and Systems"}
+
+MACRO {tcs} {"Theoretical Computer Science"}
+
+READ
+
+STRINGS { longest.label }
+
+INTEGERS { number.label longest.label.width }
+
+FUNCTION {initialize.longest.label}
+{ "" 'longest.label :=
+ #1 'number.label :=
+ #0 'longest.label.width :=
+}
+
+FUNCTION {longest.label.pass}
+{ number.label int.to.str$ 'label :=
+ number.label #1 + 'number.label :=
+ label width$ longest.label.width >
+ { label 'longest.label :=
+ label width$ 'longest.label.width :=
+ }
+ 'skip$
+ if$
+}
+
+EXECUTE {initialize.longest.label}
+
+ITERATE {longest.label.pass}
+
+FUNCTION {begin.bib}
+{ preamble$ empty$
+ 'skip$
+ { preamble$ write$ newline$ }
+ if$
+ "\begin{thebibliography}{" longest.label * "}" * write$ newline$
+}
+
+EXECUTE {begin.bib}
+
+EXECUTE {init.state.consts}
+
+ITERATE {call.type$}
+
+FUNCTION {end.bib}
+{ newline$
+ "\end{thebibliography}" write$ newline$
+}
+
+EXECUTE {end.bib}
diff --git a/biblio/bibtex/contrib/germbib/document/apalike.doc b/biblio/bibtex/contrib/germbib/document/apalike.doc
new file mode 100644
index 0000000000..8861e11e21
--- /dev/null
+++ b/biblio/bibtex/contrib/germbib/document/apalike.doc
@@ -0,0 +1,60 @@
+% apalike.sty style, used in conjunction with apalike.bst,
+% will produce an apa-like bibliography style:
+%
+% 1) Bibliography entries formatted alphabetically, last name
+% first, each entry having a hanging indentation and no label.
+% 2) References in the following formats:
+% (Author, 1986)
+% (Author and Author, 1986)
+% (Author et al., 1986).
+% 3) Multiple references in the form (Author1, 1986; Author2, 1987)
+%
+% To be used as an optional argument to the \documentstyle command; for example
+% \documentstyle[11pt,apalike]{book}
+%
+% 16-Sep-86, original version by Susan King and Oren Patashnik.
+% 13-Oct-87 changes:
+% Fixed bug in last line by adding the {} that disappeard when
+% the \hbox{} was removed from the pre-APALIKE definition;
+% added club and widow penalties;
+% patched the \newblock LaTeX bug from `-.07em' to simply `.07em';
+% and made this work for document styles that don't define `chapter'.
+%
+%
+% Use parens instead of brackets for \cite, and no label in the bibliography
+%
+\def\@cite#1#2{(#1\if@tempswa , #2\fi)}
+\def\@biblabel#1{}
+
+% Set length of hanging indentation for bibliography entries
+%
+\newlength{\bibhang}
+\setlength{\bibhang}{2em}
+
+% \thebibliography environment depends on whether or not `chapter's can exist
+%
+\@ifundefined{chapter}{\def\thebibliography#1{\section*{References\@mkboth
+ {REFERENCES}{REFERENCES}}\list
+ {\relax}{\setlength{\labelsep}{0em}
+ \setlength{\itemindent}{-\bibhang}
+ \setlength{\leftmargin}{\bibhang}}
+ \def\newblock{\hskip .11em plus .33em minus .07em}
+ \sloppy\clubpenalty4000\widowpenalty4000
+ \sfcode`\.=1000\relax}}%
+{\def\thebibliography#1{\chapter*{Bibliography\@mkboth
+ {BIBLIOGRAPHY}{BIBLIOGRAPHY}}\list
+ {\relax}{\setlength{\labelsep}{0em}
+ \setlength{\itemindent}{-\bibhang}
+ \setlength{\leftmargin}{\bibhang}}
+ \def\newblock{\hskip .11em plus .33em minus .07em}
+ \sloppy\clubpenalty4000\widowpenalty4000
+ \sfcode`\.=1000\relax}}
+
+% `; ' goes between cites, and there's no \hbox around individual cites
+%
+\def\@citex[#1]#2{\if@filesw\immediate\write\@auxout{\string\citation{#2}}\fi
+ \def\@citea{}\@cite{\@for\@citeb:=#2\do
+ {\@citea\def\@citea{; }\@ifundefined
+ {b@\@citeb}{{\bf ?}\@warning
+ {Citation `\@citeb' on page \thepage \space undefined}}%
+{\csname b@\@citeb\endcsname}}}{#1}}
diff --git a/biblio/bibtex/contrib/germbib/document/btxbst.doc b/biblio/bibtex/contrib/germbib/document/btxbst.doc
new file mode 120000
index 0000000000..557d46b8f4
--- /dev/null
+++ b/biblio/bibtex/contrib/germbib/document/btxbst.doc
@@ -0,0 +1 @@
+../../../base/btxbst.doc \ No newline at end of file
diff --git a/biblio/bibtex/contrib/germbib/document/btxdoc.bib b/biblio/bibtex/contrib/germbib/document/btxdoc.bib
new file mode 120000
index 0000000000..1df0298851
--- /dev/null
+++ b/biblio/bibtex/contrib/germbib/document/btxdoc.bib
@@ -0,0 +1 @@
+../../../base/btxdoc.bib \ No newline at end of file
diff --git a/biblio/bibtex/contrib/germbib/document/btxdoc.tex b/biblio/bibtex/contrib/germbib/document/btxdoc.tex
new file mode 100644
index 0000000000..987b1659c2
--- /dev/null
+++ b/biblio/bibtex/contrib/germbib/document/btxdoc.tex
@@ -0,0 +1,1119 @@
+% Copyright (C) 1988, all rights reserved.
+
+\def\symbol#1{\char #1\relax}
+\def\bsl{{\tt\symbol{'134}}}
+\def\BibTeX{{\rm B\kern-.05em{\sc i\kern-.025em b}\kern-.08em
+ T\kern-.1667em\lower.7ex\hbox{E}\kern-.125emX}}
+
+\title{B\kern-.05em{\large I}\kern-.025em{\large B}\kern-.08em\TeX ing}
+\author{Oren Patashnik}
+\date{February 8, 1988}
+
+\documentstyle[mynormal]{article}
+\begin{document}
+
+\maketitle
+
+\section{Overview}
+
+[This document will be expanded when \BibTeX\ version 1.00 comes out.
+Please report typos, omissions, inaccuracies,
+and especially unclear explanations
+to me ({\tt patashnik@SCORE.STANFORD.EDU}).
+Suggestions for improvements are wanted and welcome.]
+
+This documentation, for \BibTeX\ version 0.99b,
+is meant for general \BibTeX\ users;
+bibliography-style designers should read this document
+and then read ``Designing \BibTeX\ Styles''~\cite{btxhak},
+which is meant for just them.
+
+This document has three parts:
+Section~\ref{differences}
+describes the differences between versions 0.98i and 0.99b
+of \BibTeX\ and between the corresponding versions of the standard styles;
+Section~\ref{latex-appendix}
+updates Appendix~B.2 of the \LaTeX\ book~\cite{latex};
+and Section~\ref{odds-and-ends}
+gives some general and specific tips
+that aren't documented elsewhere.
+It's assumed throughout that you're familiar with
+the relevant sections of the \LaTeX\ book.
+
+This documentation also serves as sample input to help
+\BibTeX\ implementors get it running.
+For most documents, this one included, you produce the reference list by:
+running \LaTeX\ on the document (to produce the {\tt aux} file(s)),
+then running \BibTeX\ (to produce the {\tt bbl} file),
+then \LaTeX\ twice more (first to find the information in the {\tt bbl} file
+and then to get the forward references correct).
+In very rare circumstances you may need an extra \BibTeX/\LaTeX\ run.
+
+\BibTeX\ version 0.99b should be used with \LaTeX\ version 2.09,
+for which the closed bibliography format is the default;
+to get the open format, use the optional document style {\tt openbib}
+(in an open format there's a line break between major blocks of a
+reference-list entry; in a closed format the blocks run together).]
+
+Note: \BibTeX\ 0.99b is not compatible with the old style files;
+nor is \BibTeX\ 0.98i compatible with the new ones
+(the new \BibTeX, however, is compatible with old database files).
+
+Note for implementors: \BibTeX\ provides logical-area names
+\hbox{\tt TEXINPUTS:} for bibliography-style files and
+\hbox{\tt TEXBIB:} for database files it can't otherwise find.
+
+
+\section{Changes}
+\label{differences}
+
+This section describes the differences between
+\BibTeX\ versions 0.98i and 0.99b, and also between
+the corresponding standard styles.
+There were a lot of differences;
+there will be a lot fewer between 0.99 and 1.00.
+
+
+\subsection{New \BibTeX\ features}
+\label{features}
+
+The following list explains \BibTeX's new features and how to use them.
+\begin{enumerate}
+
+\item
+With the single command `\hbox{\verb|\nocite{*}|}'
+you can now include in the reference list
+every entry in the database files, without having to explicitly
+\verb|\cite| or \hbox{\verb|\nocite|} each entry.
+Giving this command, in essence,
+\hbox{\verb|\nocite|}s
+all the enties in the database, in database order,
+at the very spot in your document
+where you give the command.
+
+\item
+\label{concat}
+You can now have as a field value (or an {\tt @STRING} definition)
+the concatenation of several strings.
+For example if you've defined
+\begin{verbatim}
+ @STRING( WGA = " World Gnus Almanac" )
+\end{verbatim}
+then it's easy to produce nearly-identical
+{\tt title} fields for different entries:
+\begin{verbatim}
+ @BOOK(almanac-66,
+ title = 1966 # WGA,
+ . . .
+ @BOOK(almanac-67,
+ title = 1967 # WGA,
+\end{verbatim}
+and so on. Or, you could have a field like
+\begin{verbatim}
+ month = "1~" # jan,
+\end{verbatim}
+which would come out something like
+`\hbox{\verb|1~January|}' or `\hbox{\verb|1~Jan.|}' in the {\tt bbl} file,
+depending on how your bibliography style defines
+the {\tt jan} abbreviation.
+You may concatenate as many strings as you like
+(except that there's a limit to the overall length
+of the resulting field);
+just be sure to put the concatenation character `{\tt\#}'$\!$,
+surrounded by optional spaces or newlines,
+between each successive pair of strings.
+
+\item
+\BibTeX\ has a new cross-referencing feature,
+explained by an example.
+Suppose you say {\tt\bsl cite\{no-gnats\}} in your document,
+and suppose you have these two entries in your database file:
+\begin{verbatim}
+ @INPROCEEDINGS(no-gnats,
+ crossref = "gg-proceedings",
+ author = "Rocky Gneisser",
+ title = "No Gnats Are Taken for Granite",
+ pages = "133-139")
+ . . .
+ @PROCEEDINGS(gg-proceedings,
+ editor = "Gerald Ford and Jimmy Carter",
+ title = "The Gnats and Gnus 1988 Proceedings",
+ booktitle = "The Gnats and Gnus 1988 Proceedings")
+\end{verbatim}
+Two things happen.
+First, the special \hbox{\tt crossref} field tells \BibTeX\
+that the \hbox{\tt no-gnats} entry should inherit
+any fields it's missing from
+the entry it cross references, \hbox{\tt gg-proceedings}.
+In this case it in inherits the two fields
+\hbox{\tt editor} and \hbox{\tt booktitle}.
+Note that, in the standard styles at least,
+the \hbox{\tt booktitle} field is irrelevant
+for the \hbox{\tt PROCEEDINGS} entry type.
+The \hbox{\tt booktitle} field appears here
+in the \hbox{\tt gg-proceedings} entry
+only so that the entries that cross reference it
+may inherit the field.
+No matter how many papers from this meeting exist in the database,
+this \hbox{\tt booktitle} field need only appear once.
+
+The second thing that happens:
+\BibTeX\ automatically puts the entry \hbox{\tt gg-proceedings}
+into the reference list if it's cross
+referenced by two or more entries that you
+\verb|\cite| or \hbox{\verb|\nocite|},
+even if you don't \verb|\cite| or \hbox{\verb|\nocite|}
+the \hbox{\tt gg-proceedings} entry itself.
+So \hbox{\tt gg-proceedings} will automatically appear
+on the reference list if one other entry
+besides \hbox{\tt no-gnats} cross references it.
+
+To guarantee that this scheme works, however,
+a cross-referenced entry must occur later in the database files
+than every entry that cross-references it.
+Thus, putting all cross-referenced entries at the end makes sense.
+(Moreover, you may not reliably nest cross references;
+that is, a cross-referenced entry may
+not itself reliably cross reference an entry.
+This is almost certainly not something you'd
+want to do, though.)
+
+One final note:
+This cross-referencing feature is completely unrelated
+to the old \BibTeX's cross referencing,
+which is still allowed.
+Thus, having a field like
+\begin{verbatim}
+ note = "Jones \cite{jones-proof} improves the result"
+\end{verbatim}
+is not affected by the new feature.
+
+\item
+\BibTeX\ now handles accented characters.
+For example if you have an entry with the two fields
+\begin{verbatim}
+ author = "Kurt G{\"o}del",
+ year = 1931,
+\end{verbatim}
+and if you're using the \hbox{\tt alpha} bibliography style,
+then \BibTeX\ will construct the label
+\hbox{[G{\"o}d31]} for this entry, which is what you'd want.
+To get this feature to work you must place the entire accented
+character in braces;
+in this case either \hbox{\verb|{\"o}|}
+or \hbox{\verb|{\"{o}}|} will do.
+Furthermore these braces must not themselves be
+enclosed in braces (other than the ones that might delimit
+the entire field or the entire entry);
+and there must be a backslash
+as the very first character inside the braces.
+Thus neither \hbox{\verb|{G{\"{o}}del}|}
+nor \hbox{\verb|{G\"{o}del}|} will work for this example.
+
+This feature handles all the accented characters and
+all but the nonbackslashed foreign symbols found in Tables
+3.1 and~3.2 of the \LaTeX\ book.
+This feature behaves similarly for ``accents'' you might define;
+we'll see an example shortly.
+For the purposes of counting letters in labels,
+\BibTeX\ considers everything contained inside the braces
+as a single letter.
+
+\item
+\BibTeX\ also handles hyphenated names.
+For example if you have an entry with
+\begin{verbatim}
+ author = "Jean-Paul Sartre",
+\end{verbatim}
+and if you're using the \hbox{\tt abbrv} style,
+then the result is `J.-P. Sartre'$\!$.
+
+\item
+\label{preamble}
+There's now an \hbox{\verb|@PREAMBLE|} command
+for the database files.
+This command's syntax is just like \hbox{\verb|@STRING|}'s,
+except that there is no name or equals-sign, just the string.
+Here's an example:
+\begin{verbatim}
+ @PREAMBLE{ "\newcommand{\noopsort}[1]{} "
+ # "\newcommand{\singleletter}[1]{#1} " }
+\end{verbatim}
+(note the use of concatenation here, too).
+The standard styles output whatever information you give this command
+(\LaTeX\ macros most likely) directly to the {\tt bbl} file.
+We'll look at one possible use of this command,
+based on the \hbox{\verb|\noopsort|} command just defined.
+
+The issue here is sorting (alphabetizing).
+\BibTeX\ does a pretty good job,
+but occasionally weird circumstances conspire to confuse \BibTeX:
+Suppose that you have entries in your database for
+the two books in a two-volume set by the same author,
+and that you'd like volume~1 to appear
+just before volume~2 in your reference list.
+Further suppose that there's now a second edition of volume~1,
+which came out in 1973, say,
+but that there's still just one edition of volume~2,
+which came out in 1971.
+Since the {\tt plain} standard style
+sorts by author and then year,
+it will place volume~2 first
+(because its edition came out two years earlier)
+unless you help \BibTeX.
+You can do this by using the {\tt year} fields below
+for the two volumes:
+\begin{verbatim}
+ year = "{\noopsort{a}}1973"
+ . . .
+ year = "{\noopsort{b}}1971"
+\end{verbatim}
+According to the definition of \hbox{\verb|\noopsort|},
+\LaTeX\ will print nothing but the true year for these fields.
+But \BibTeX\ will be perfectly happy pretending that
+\hbox{\verb|\noopsort|} specifies some fancy accent
+that's supposed to adorn the `a' and the~`b';
+thus when \BibTeX\ sorts it will pretend that
+`a1973' and `b1971' are the real years,
+and since `a' comes before~`b'$\!$, it will place volume~1 before volume~2,
+just what you wanted.
+By the way, if this author has any other works included
+in your database, you'd probably want to use instead something like
+\hbox{\verb|{\noopsort{1968a}}1973|} and
+\hbox{\verb|{\noopsort{1968b}}1971|},
+so that these two books would come out in a reasonable spot
+relative to the author's other works
+(this assumes that 1968 results in a reasonable spot,
+say because that's when the first edition of volume~1 appeared).
+
+There is a limit to the number of \hbox{\verb|@PREAMBLE|} commands
+you may use, but you'll never exceed this limit if
+you restrict yourself to one per database file;
+this is not a serious restriction,
+given the concatenation feature (item~\ref{concat}).
+
+\item
+\BibTeX's sorting algorithm is now stable.
+This means that if two entries have identical sort keys,
+those two entries will appear in citation order.
+(The bibliography styles construct these sort keys---%
+usually the author information followed by the year and the title.)
+
+\item
+\BibTeX\ no longer does case conversion for file names;
+this will make \BibTeX\ easier to install on Unix systems, for example.
+
+\item
+It's now easier to add code for processing a
+command-line {\tt aux}-file name.
+
+\end{enumerate}
+
+
+\subsection{Changes to the standard styles}
+
+This section describes changes to the standard styles
+({\tt plain}, {\tt unsrt}, {\tt alpha}, {\tt abbrv})
+that affect ordinary users.
+Changes that affect style designers appear in
+the document ``Designing \BibTeX\ Styles''~\cite{btxhak}.
+\begin{enumerate}
+
+\item
+In general, sorting is now by ``author''$\!$, then year, then title---%
+the old versions didn't use the year field.
+(The {\tt alpha} style, however, sorts first by label,
+then ``author''$\!$, year, and title.)
+The quotes around author mean that some entry types
+might use something besides the author, like the editor or organization.
+
+\item
+Many unnecessary ties (\verb|~|) have been removed.
+\LaTeX\ thus will produce slightly fewer
+`\hbox{\tt Underfull} \verb|\hbox|' messages
+when it's formatting the reference list.
+
+\item
+Emphasizing (\hbox{\verb|{\em ...}|})
+has replaced italicizing (\hbox{\verb|{\it ...}|}).
+This will almost never result in a difference
+between the old output and the new.
+
+\item
+The {\tt alpha} style now uses a superscripted~`$^{+}$' instead of a~`*'
+to represent names omitted in constructing the label.
+If you really liked it the way it was, however,
+or if you want to omit the character entirely,
+you don't have to modify the style file---%
+you can override the~`$^{+}$' by
+redefining the \hbox{\verb|\etalchar|} command
+that the {\tt alpha} style writes onto the {\tt bbl} file
+(just preceding the \hbox{\verb|\thebibliography|} environment);
+use \LaTeX's \hbox{\verb|\renewcommand|} inside
+a database \hbox{\tt @PREAMBLE} command,
+described in the previous subsection's item~\ref{preamble}.
+
+\item
+The {\tt abbrv} style now uses `Mar.' and `Sept.'\
+for those months rather than `March' and `Sep.'
+
+\item
+The standard styles use \BibTeX's new cross-referencing feature
+by giving a \verb|\cite| of the cross-referenced entry and by
+omitting from the cross-referencing entry
+(most of the) information that appears
+in the cross-referenced entry.
+These styles do this when
+a titled thing (the cross-referencing entry)
+is part of a larger titled thing (the cross-referenced entry).
+There are five such situations:
+when (1)~an \hbox{\tt INPROCEEDINGS}
+(or \hbox{\tt CONFERENCE}, which is the same)
+cross references a \hbox{\tt PROCEEDINGS};
+when (2)~a {\tt BOOK}, (3)~an \hbox{\tt INBOOK},
+or (4)~an \hbox{\tt INCOLLECTION}
+cross references a {\tt BOOK}
+(in these cases, the cross-referencing entry is a single
+volume in a multi-volume work);
+and when (5)~an \hbox{\tt ARTICLE}
+cross references an \hbox{\tt ARTICLE}
+(in this case, the cross-referenced entry is really a journal,
+but there's no \hbox{\tt JOURNAL} entry type;
+this will result in warning messages about
+an empty \hbox{\tt author} and \hbox{\tt title} for the journal---%
+you should just ignore these warnings).
+
+\item
+The \hbox{\tt MASTERSTHESIS} and \hbox{\tt PHDTHESIS}
+entry types now take an optional {\tt type} field.
+For example you can get the standard styles to
+call your reference a `Ph.D.\ dissertation'
+instead of the default `PhD thesis' by including a
+\begin{verbatim}
+ type = "{Ph.D.} dissertation"
+\end{verbatim}
+in your database entry.
+
+\item
+Similarly, the \hbox{\tt INBOOK} and \hbox{\tt INCOLLECTION}
+entry types now take an optional {\tt type} field,
+allowing `section~1.2' instead of the default `chapter~1.2'$\!$.
+You get this by putting
+\begin{verbatim}
+ chapter = "1.2",
+ type = "Section"
+\end{verbatim}
+in your database entry.
+
+\item
+The \hbox{\tt BOOKLET}, \hbox{\tt MASTERSTHESIS},
+and \hbox{\tt TECHREPORT} entry types now format
+their \hbox{\tt title} fields as if they were
+\hbox{\tt ARTICLE} \hbox{\tt title}s
+rather than \hbox{\tt BOOK} \hbox{\tt title}s.
+
+\item
+The \hbox{\tt PROCEEDINGS} and \hbox{\tt INPROCEEDINGS}
+entry types now use the \hbox{\tt address} field
+to tell where a conference was held,
+rather than to give the address
+of the publisher or organization.
+If you want to include the
+publisher's or organization's address,
+put it in the \hbox{\tt publisher}
+or \hbox{\tt organization} field.
+
+\item
+The \hbox{\tt BOOK}, \hbox{\tt INBOOK}, \hbox{\tt INCOLLECTION},
+and \hbox{\tt PROCEEDINGS} entry types now allow either
+\hbox{\tt volume} or \hbox{\tt number} (but not both),
+rather than just \hbox{\tt volume}.
+
+\item
+The \hbox{\tt INCOLLECTION} entry type now allows
+a \hbox{\tt series} and an \hbox{\tt edition} field.
+
+\item
+The \hbox{\tt INPROCEEDINGS} and \hbox{\tt PROCEEDINGS}
+entry types now allow either a \hbox{\tt volume} or \hbox{\tt number},
+and also a \hbox{\tt series} field.
+
+\item
+The \hbox{\tt UNPUBLISHED} entry type now outputs,
+in one block, the \hbox{\tt note} field
+followed by the date information.
+
+\item
+The \hbox{\tt MANUAL} entry type now prints out
+the \hbox{\tt organization} in the first block
+if the \hbox{\tt author} field is empty.
+
+\item
+The {\tt MISC} entry type now issues a warning
+if all the optional fields are empty
+(that is, if the entire entry is empty).
+
+\end{enumerate}
+
+
+\section{The Entries}
+\label{latex-appendix}
+
+This section is simply a corrected version of
+Appendix~B.2 of the \LaTeX\ book~\cite{latex},
+\copyright~1986, by Addison-Wesley.
+The basic scheme is the same, only a few details have changed.
+
+
+\subsection{Entry Types}
+
+When entering a reference in the database, the first thing to decide
+is what type of entry it is. No fixed classification scheme can be
+complete, but \BibTeX\ provides enough entry types to handle almost
+any reference reasonably well.
+
+References to different types of publications contain different
+information; a reference to a journal article might include the volume
+and number of the journal, which is usually not meaningful for a book.
+Therefore, database entries of different types have different fields.
+For each entry type, the fields are divided into three classes:
+\begin{description}
+
+\item[required]
+Omitting the field will produce a warning message
+and, rarely, a badly formatted bibliography entry.
+If the required information is not meaningful,
+you are using the wrong entry type.
+However, if the required information is meaningful
+but, say, already included is some other field,
+simply ignore the warning.
+
+\item[optional]
+The field's information will be used if present,
+but can be omitted without causing any formatting problems.
+You should include the optional field if it will help the reader.
+
+\item[ignored]
+The field is ignored.
+\BibTeX\ ignores any field that is not required or optional, so you can include
+any fields you want in a \hbox{\tt bib} file entry. It's a good idea
+to put all relevant information about
+a reference in its \hbox{\tt bib} file entry---even information that
+may never appear in the bibliography. For example, if you want to
+keep an abstract of a paper in a computer file, put it in an \hbox{\tt
+abstract} field in the paper's \hbox{\tt bib} file entry. The
+\hbox{\tt bib} file is likely to be as good a place as any for the
+abstract, and it is possible to design a bibliography style for
+printing selected abstracts.
+Note: Misspelling a field name will
+result in its being ignored,
+so watch out for typos
+(especially for optional fields,
+since \BibTeX\ won't warn you when those are missing).
+
+\end{description}
+
+The following are the standard entry types, along with their required
+and optional fields, that are used by the standard bibliography styles.
+The fields within each class (required or optional)
+are listed in order of occurrence in the output,
+except that a few entry types may perturb the order slightly,
+depending on what fields are missing.
+These entry types are similar to those adapted by Brian Reid
+from the classification scheme of van~Leunen~\cite{van-leunen}
+for use in the {\em Scribe\/} system.
+The meanings of the individual fields are explained in the next section.
+Some nonstandard bibliography styles may ignore some optional fields
+in creating the reference.
+Remember that, when used in the \hbox{\tt bib}
+file, the entry-type name is preceded by an \hbox{\tt @} character.
+
+\begin{description}
+\sloppy
+
+\item[article\hfill] An article from a journal or magazine.
+Required fields: \hbox{\tt author}, \hbox{\tt title}, \hbox{\tt journal},
+\hbox{\tt year}.
+Optional fields: \hbox{\tt volume}, \hbox{\tt number},
+\hbox{\tt pages}, \hbox{\tt month}, \hbox{\tt note}.
+
+\item[book\hfill] A book with an explicit publisher.
+Required fields: \hbox{\tt author} or \hbox{\tt editor},
+\hbox{\tt title}, \hbox{\tt publisher}, \hbox{\tt year}.
+Optional fields: \hbox{\tt volume} or \hbox{\tt number}, \hbox{\tt series},
+\hbox{\tt address}, \hbox{\tt edition}, \hbox{\tt month},
+\hbox{\tt note}.
+
+\item[booklet\hfill] A work that is printed and bound,
+but without a named publisher or sponsoring institution.
+Required field: \hbox{\tt title}.
+Optional fields: \hbox{\tt author}, \hbox{\tt howpublished},
+\hbox{\tt address}, \hbox{\tt month}, \hbox{\tt year}, \hbox{\tt note}.
+
+\item[conference\hfill] The same as {\tt INPROCEEDINGS},
+included for {\em Scribe\/} compatibility.
+
+\item[inbook\hfill] A part of a book,
+which may be a chapter (or section or whatever) and/or a range of pages.
+Required fields: \hbox{\tt author} or \hbox{\tt editor}, \hbox{\tt title},
+\hbox{\tt chapter} and/or \hbox{\tt pages}, \hbox{\tt publisher},
+\hbox{\tt year}.
+Optional fields: \hbox{\tt volume} or \hbox{\tt number}, \hbox{\tt series},
+\hbox{\tt type}, \hbox{\tt address},
+\hbox{\tt edition}, \hbox{\tt month}, \hbox{\tt note}.
+
+\item[incollection\hfill] A part of a book having its own title.
+Required fields: \hbox{\tt author}, \hbox{\tt title}, \hbox{\tt booktitle},
+\hbox{\tt publisher}, \hbox{\tt year}.
+Optional fields: \hbox{\tt editor}, \hbox{\tt volume} or \hbox{\tt number},
+\hbox{\tt series}, \hbox{\tt type}, \hbox{\tt chapter}, \hbox{\tt pages},
+\hbox{\tt address}, \hbox{\tt edition}, \hbox{\tt month}, \hbox{\tt note}.
+
+\item[inproceedings\hfill] An article in a conference proceedings.
+Required fields: \hbox{\tt author}, \hbox{\tt title}, \hbox{\tt booktitle},
+\hbox{\tt year}.
+Optional fields: \hbox{\tt editor}, \hbox{\tt volume} or \hbox{\tt number},
+\hbox{\tt series}, \hbox{\tt pages}, \hbox{\tt address}, \hbox{\tt month},
+\hbox{\tt organization}, \hbox{\tt publisher}, \hbox{\tt note}.
+
+\item[manual\hfill] Technical documentation. Required field: \hbox{\tt title}.
+Optional fields: \hbox{\tt author}, \hbox{\tt organization},
+\hbox{\tt address}, \hbox{\tt edition}, \hbox{\tt month}, \hbox{\tt year},
+\hbox{\tt note}.
+
+\item[mastersthesis\hfill] A Master's thesis.
+Required fields: \hbox{\tt author}, \hbox{\tt title}, \hbox{\tt school},
+\hbox{\tt year}.
+Optional fields: \hbox{\tt type}, \hbox{\tt address}, \hbox{\tt month},
+\hbox{\tt note}.
+
+\item[misc\hfill] Use this type when nothing else fits.
+Required fields: none.
+Optional fields: \hbox{\tt author}, \hbox{\tt title}, \hbox{\tt howpublished},
+\hbox{\tt month}, \hbox{\tt year}, \hbox{\tt note}.
+
+\item[phdthesis\hfill] A PhD thesis.
+Required fields: \hbox{\tt author}, \hbox{\tt title}, \hbox{\tt school},
+\hbox{\tt year}.
+Optional fields: \hbox{\tt type}, \hbox{\tt address}, \hbox{\tt month},
+\hbox{\tt note}.
+
+\item[proceedings\hfill] The proceedings of a conference.
+Required fields: \hbox{\tt title}, \hbox{\tt year}.
+Optional fields: \hbox{\tt editor}, \hbox{\tt volume} or \hbox{\tt number},
+\hbox{\tt series}, \hbox{\tt address}, \hbox{\tt month},
+\hbox{\tt organization}, \hbox{\tt publisher}, \hbox{\tt note}.
+
+
+\item[techreport\hfill] A report published by a school or other institution,
+usually numbered within a series.
+Required fields: \hbox{\tt author},
+\hbox{\tt title}, \hbox{\tt institution}, \hbox{\tt year}.
+Optional fields: \hbox{\tt type}, \hbox{\tt number}, \hbox{\tt address},
+\hbox{\tt month}, \hbox{\tt note}.
+
+\item[unpublished\hfill] A document having an author and title,
+but not formally published.
+Required fields: \hbox{\tt author}, \hbox{\tt title}, \hbox{\tt note}.
+Optional fields: \hbox{\tt month}, \hbox{\tt year}.
+
+\end{description}
+
+In addition to the fields listed above, each entry type also has an
+optional \hbox{\tt key} field, used in some styles
+for alphabetizing, for cross referencing,
+or for forming a \hbox{\verb|\bibitem|} label.
+You should include a \hbox{\tt key} field for any entry whose
+``author'' information is missing;
+the ``author'' information is usually the \hbox{\tt author} field,
+but for some entry types it can be the \hbox{\tt editor}
+or even the \hbox{\tt organization} field
+(Section~\ref{odds-and-ends} describes this in more detail).
+Do not confuse the \hbox{\tt key} field with the key that appears in the
+\hbox{\verb|\cite|} command and at the beginning of the database entry;
+this field is named ``key'' only for compatibility with {\it Scribe}.
+
+
+\subsection{Fields}
+
+Below is a description of all fields
+recognized by the standard bibliography styles.
+An entry can also contain other fields, which are ignored by those styles.
+\begin{description}
+
+\item[address\hfill]
+Usually the address of the \hbox{\tt publisher} or other type
+of institution.
+For major publishing houses,
+van~Leunen recommends omitting the information entirely.
+For small publishers, on the other hand, you can help the
+reader by giving the complete address.
+
+\item[annote\hfill]
+An annotation.
+It is not used by the standard bibliography styles,
+but may be used by others that produce an annotated bibliography.
+
+\item[author\hfill]
+The name(s) of the author(s),
+in the format described in the \LaTeX\ book.
+
+\item[booktitle\hfill]
+Title of a book, part of which is being cited.
+See the \LaTeX\ book for how to type titles.
+For book entries, use the \hbox{\tt title} field instead.
+
+\item[chapter\hfill]
+A chapter (or section or whatever) number.
+
+\item[crossref\hfill]
+The database key of the entry being cross referenced.
+
+\item[edition\hfill]
+The edition of a book---for example, ``Second''$\!$.
+This should be an ordinal, and
+should have the first letter capitalized, as shown here;
+the standard styles convert to lower case when necessary.
+
+\item[editor\hfill]
+Name(s) of editor(s), typed as indicated in the \LaTeX\ book.
+If there is also an \hbox{\tt author} field, then
+the \hbox{\tt editor} field gives the editor of the book or collection
+in which the reference appears.
+
+\item[howpublished\hfill]
+How something strange has been published.
+The first word should be capitalized.
+
+\item[institution\hfill]
+The sponsoring institution of a technical report.
+
+\item[journal\hfill]
+A journal name.
+Abbreviations are provided for many journals; see the {\it Local Guide}.
+
+\item[key\hfill]
+Used for alphabetizing, cross referencing, and creating a label when
+the ``author'' information
+(described in Section~\ref{odds-and-ends}) is missing.
+This field should not be confused with the key that appears in the
+\hbox{\verb|\cite|} command and at the beginning of the database entry.
+
+\item[month\hfill]
+The month in which the work was
+published or, for an unpublished work, in which it was written.
+You should use the standard three-letter abbreviation,
+as described in Appendix B.1.3 of the \LaTeX\ book.
+
+\item[note\hfill]
+Any additional information that can help the reader.
+The first word should be capitalized.
+
+\item[number\hfill]
+The number of a journal, magazine, technical report,
+or of a work in a series.
+An issue of a journal or magazine is usually
+identified by its volume and number;
+the organization that issues a
+technical report usually gives it a number;
+and sometimes books are given numbers in a named series.
+
+\item[organization\hfill]
+The organization that sponsors a conference or that publishes a \hbox{manual}.
+
+\item[pages\hfill]
+One or more page numbers or range of numbers,
+such as \hbox{\tt 42--111} or \hbox{\tt 7,41,73--97} or \hbox{\tt 43+}
+(the `{\tt +}' in this last example indicates pages following
+that don't form a simple range).
+To make it easier to maintain {\em Scribe\/}-compatible databases,
+the standard styles convert a single dash (as in \hbox{\tt 7-33})
+to the double dash used in \TeX\ to denote number ranges
+(as in \hbox{\tt 7--33}).
+
+\item[publisher\hfill]
+The publisher's name.
+
+\item[school\hfill]
+The name of the school where a thesis was written.
+
+\item[series\hfill]
+The name of a series or set of books.
+When citing an entire book, the the \hbox{\tt title} field
+gives its title and an optional \hbox{\tt series} field gives the
+name of a series or multi-volume set
+in which the book is published.
+
+\item[title\hfill]
+The work's title, typed as explained in the \LaTeX\ book.
+
+\item[type\hfill]
+The type of a technical report---for example,
+``Research Note''$\!$.
+
+\item[volume\hfill]
+The volume of a journal or multivolume book.
+
+\item[year\hfill]
+The year of publication or, for
+an unpublished work, the year it was written.
+Generally it should consist of four numerals, such as {\tt 1984},
+although the standard styles can handle any {\tt year} whose
+last four nonpunctuation characters are numerals,
+such as `\hbox{(about 1984)}'$\!$.
+
+\end{description}
+
+
+\section{Helpful Hints}
+\label{odds-and-ends}
+
+This section gives some random tips
+that aren't documented elsewhere,
+at least not in this detail.
+They are, roughly, in order
+of least esoteric to most.
+First, however, a brief spiel.
+
+I understand that there's often little choice in choosing
+a bibliography style---journal~$X$ says you must use style~$Y$
+and that's that.
+If you have a choice, however, I strongly recommend that you
+choose something like the {\tt plain} standard style.
+Such a style, van~Leunen~\cite{van-leunen} argues convincingly,
+encourages better writing than the alternatives---%
+more concrete, more vivid.
+
+{\em The Chicago Manual of Style\/}~\cite{chicago},
+on the other hand,
+espouse the author-date system,
+in which the citation might appear in the text as `(Jones, 1986)'$\!$.
+I argue that this system,
+besides cluttering up the
+text with information that may or may not be relevant,
+encourages the passive voice and vague writing.
+Furthermore the strongest arguments for
+using the author-date system---like ``it's the most practical''---%
+fall flat on their face with the advent
+of computer-typesetting technology.
+For instance the {\em Chicago Manual\/} contains,
+right in the middle of page~401, this anachronism:
+``The chief disadvantage of [a style like {\tt plain}] is that additions
+or deletions cannot be made after the manuscript is typed without changing
+numbers in both text references and list.''
+\LaTeX, obviously, sidesteps the disadvantage.
+
+Finally, the logical deficiencies of the author-date style
+are quite evident once you've written a program to implement it.
+For example, in a large bibliography,
+using the standard alphabetizing scheme,
+the entry for `(Aho et~al., 1983b)'
+might be half a page later than the one for `(Aho et~al., 1983a)'$\!$.
+Fixing this problem results in even worse ones.
+What a mess.
+(I have, unfortunately, programmed such a style,
+and if you're saddled with an unenlightened publisher
+or if you don't buy my propaganda,
+it's available from the Rochester style collection.)
+
+Ok, so the spiel wasn't very brief;
+but it made me feel better,
+and now my blood pressure is back to normal.
+Here are the tips for using \BibTeX\
+with the standard styles
+(although many of them hold for nonstandard styles, too).
+\begin{enumerate}
+
+\item
+With \BibTeX's style-designing language
+you can program general database manipulations,
+in addition to bibliography styles.
+For example it's a fairly easy task for someone familiar with the language
+to produce a database-key/author index of all the entries in a database.
+Consult the {\em Local Guide\/} to see
+what tools are available on your system.
+
+\item
+The standard style's thirteen entry types
+do reasonably well at formatting most entries,
+but no scheme with just thirteen formats
+can do everything perfectly.
+Thus, you should feel free to be creative
+in how you use these entry types
+(but if you have to be too creative,
+there's a good chance you're using the wrong entry type).
+
+\item
+Don't take the field names too seriously.
+Sometimes, for instance, you might have to include
+the publisher's address along with the publisher's name
+in the \hbox{\tt publisher} field,
+rather than putting it in the \hbox{\tt address} field.
+Or sometimes, difficult entries work best when you
+make judicious use of the {\tt note} field.
+
+\item
+Don't take the warning messages too seriously.
+Sometimes, for instance, the year appears in the title,
+as in {\em The 1966 World Gnus Almanac}.
+In this case it's best to omit the {\tt year} field
+and to ignore \BibTeX's warning message.
+
+\item
+If you have too many names to list in an
+\hbox{\tt author} or \hbox{\tt editor} field,
+you can end the list with ``and others'';
+the standard styles appropriately append an ``et~al.''
+
+\item
+In general, if you want to keep \BibTeX\ from changing
+something to lower case, you enclose it in braces.
+You might not get the effect you want, however,
+if the very first character after the left brace is a backslash.
+The ``special characters'' item later in this section explains.
+
+\item
+For {\em Scribe\/} compatibility, the database files
+allow an \hbox{\tt @COMMENT} command; it's not really
+needed because \BibTeX\ allows in the database files
+any comment that's not within an entry.
+If you want to comment out an entry,
+simply remove the `{\tt @}' character preceding the entry type.
+
+\item
+The standard styles have journal abbreviations that are
+computer-science oriented;
+these are in the style files primarily for the example.
+If you have a different set of journal abbreviations,
+it's sensible to put them in \hbox{\tt @STRING} commands
+in their own database file and to list this database file
+as an argument to \LaTeX's \hbox{\verb|\bibliography|} command
+(but you should list this argument before the ones that
+specify real database entries).
+
+\item
+It's best to use the three-letter abbreviations for the month,
+rather than spelling out the month yourself.
+This lets the bibliography style be consistent.
+And if you want to include information for the day of the month,
+the {\tt month} field is usually the best place.
+For example
+\begin{verbatim}
+ month = jul # "~4,"
+\end{verbatim}
+will probably produce just what you want.
+
+\item
+If you're using the \hbox{\tt unsrt} style
+(references are listed in order of citation)
+along with the \hbox{\verb|\nocite{*}|} feature
+(all entries in the database are included),
+the placement of the \hbox{\verb|\nocite{*}|} command
+within your document file will determine the reference order.
+According to the rule given in Section~\ref{features}:
+If the command is placed at the beginning of the document,
+the entries will be listed in exactly the order
+they occur in the database;
+if it's placed at the end,
+the entries that you explicitly
+\hbox{\verb|\cite|} or \hbox{\verb|\nocite|}
+will occur in citation order,
+and the remaining database entries will be in database order.
+
+\item
+For theses, van Leunen recommends not giving
+the school's department after the name of the degree,
+since schools, not departments, issue degrees.
+If you really think that giving the department information
+will help the reader find the thesis,
+put that information in the \hbox{\tt address} field.
+
+\item
+The \hbox{\tt MASTERSTHESIS} and \hbox{\tt PHDTHESIS} entry types
+are so named for {\em Scribe\/} compatibility;
+\hbox{\tt MINORTHESIS} and \hbox{\tt MAJORTHESIS}
+probably would have been better names.
+Keep this in mind when trying to classify
+a non-U.S.\ thesis.
+
+\item
+Here's yet another suggestion for what to do when an author's
+name appears slightly differently in two publications.
+Suppose, for example, two journals articles use these fields.
+\begin{verbatim}
+ author = "Donald E. Knuth"
+ . . .
+ author = "D. E. Knuth"
+\end{verbatim}
+There are two possibilities.
+You could (1)~simply leave them as is,
+or (2)~assuming you know for sure that
+these authors are one and the same person,
+you could list both in the form that the author prefers
+(say, `Donald~E.\ Knuth').
+In the first case, the entries might be alphabetized incorrectly,
+and in the second, the slightly altered name might
+foul up somebody's electronic library search.
+But there's a third possibility, which is the one I prefer.
+You could convert the second journal's field to
+\begin{verbatim}
+ author = "D[onald] E. Knuth"
+\end{verbatim}
+This avoids the pitfalls of the previous two solutions,
+since \BibTeX\ alphabetizes this as if the brackets weren't there,
+and since the brackets clue the reader in that a full first name
+was missing from the original.
+Of course it introduces another pitfall---`D[onald]~E.\ Knuth' looks ugly---%
+but in this case I think the increase in accuracy outweighs
+the loss in aesthetics.
+
+\item
+\LaTeX's comment character `{\tt\%}' is not a comment character
+in the database files.
+
+\item
+Here's a more complete description of
+the ``author'' information referred to in previous sections.
+For most entry types the ``author'' information
+is simply the \hbox{\tt author} field.
+However:
+For the \hbox{\tt BOOK} and \hbox{\tt INBOOK} entry types
+it's the \hbox{\tt author} field, but if there's no author
+then it's the \hbox{\tt editor} field;
+for the \hbox{\tt MANUAL} entry type
+it's the \hbox{\tt author} field, but if there's no author
+then it's the \hbox{\tt organization} field;
+and for the \hbox{\tt PROCEEDINGS} entry type
+it's the \hbox{\tt editor} field, but if there's no editor
+then it's the \hbox{\tt organization} field.
+
+\item
+When creating a label,
+the \hbox{\tt alpha} style uses the ``author'' information described above,
+but with a slight change---%
+for the \hbox{\tt MANUAL} and \hbox{\tt PROCEEDINGS} entry types,
+the {\tt key} field takes precedence over the \hbox{\tt organization} field.
+Here's a situation where this is useful.
+\begin{verbatim}
+ organization = "The Association for Computing Machinery",
+ key = "ACM"
+\end{verbatim}
+Without the {\tt key} field, the \hbox{\tt alpha} style
+would make a label from the first three letters of information
+in the \hbox{\tt organization} field;
+\hbox{\tt alpha} knows to strip off the `\hbox{\tt The }'$\!$,
+but it would still form a label like `\hbox{[Ass86]}'$\!$,
+which, however intriguing, is uninformative.
+Including the {\tt key} field, as above,
+would yield the better label `\hbox{[ACM86]}'$\!$.
+
+You won't always need the {\tt key} field to override the
+\hbox{\tt organization}, though:
+With
+\begin{verbatim}
+ organization = "Unilogic, Ltd.",
+\end{verbatim}
+for instance, the \hbox{\tt alpha} style would
+form the perfectly reasonable label `\hbox{[Uni86]}'$\!$.
+
+\item
+Section~\ref{features} discusses accented characters.
+To \BibTeX, an accented character is really a special case
+of a ``special character''$\!$,
+which consists of everything from a left brace at the top-most level,
+immediately followed by a backslash,
+up through the matching right brace.
+For example in the field
+\begin{verbatim}
+ author = "\AA{ke} {Jos{\'{e}} {\'{E}douard} G{\"o}del"
+\end{verbatim}
+there are just two special characters,
+`\hbox{\verb|{\'{E}douard}|}' and `\hbox{\verb|{\"o}|}'
+(the same would be true if the pair of double quotes
+delimiting the field were braces instead).
+In general, \BibTeX\ will not do any processing
+of a \TeX\ or \LaTeX\ control sequence inside a special character,
+but it {\em will\/} process other characters.
+Thus a style that converts all titles to lower case
+would convert
+\begin{verbatim}
+ The {\TeX BOOK\NOOP} Experience
+\end{verbatim}
+to
+\begin{verbatim}
+ The {\TeX book\NOOP} experience
+\end{verbatim}
+(the `{\tt The}' is still capitalized
+because it's the first word of the title).
+
+This special-character scheme is useful for handling accented characters,
+for getting \BibTeX's alphabetizing to do what you want,
+and, since \BibTeX\ counts an entire special character as just one letter,
+for stuffing extra characters inside labels.
+The file \hbox{\tt XAMPL.BIB} distributed with \BibTeX\
+gives examples of all three uses.
+
+\item
+This final item of the section describes \BibTeX's names
+(which appear in the \hbox{\tt author} or \hbox{\tt editor} field)
+in slightly more detail than what
+appears in Appendix~B of the \LaTeX\ book.
+In what follows, a ``name'' corresponds to a person.
+(Recall that you separate multiple names in a single field
+with the word ``and''$\!$, surrounded by spaces,
+and not enclosed in braces.
+This item concerns itself with the structure of a single name.)
+
+Each name consists of four parts: First, von, Last, and~Jr;
+each part consists of a (possibly empty) list of name-tokens.
+The Last part will be nonempty if any part is,
+so if there's just one token, it's always a Last token.
+
+Recall that Per Brinch~Hansen's name should be typed
+\begin{verbatim}
+ "Brinch Hansen, Per"
+\end{verbatim}
+The First part of his name has the single token ``Per'';
+the Last part has two tokens, ``Brinch'' and ``Hansen'';
+and the von and Jr parts are empty.
+If you had typed
+\begin{verbatim}
+ "Per Brinch Hansen"
+\end{verbatim}
+instead, \BibTeX\ would (erroneously) think ``Brinch'' were a First-part token,
+just as ``Paul'' is a First-part token in ``John~Paul Jones''$\!$,
+so this erroneous form would have two First tokens and one Last token.
+
+Here's another example:
+\begin{verbatim}
+ "Charles Louis Xavier Joseph de la Vall{\'e}e Poussin"
+\end{verbatim}
+This name has four tokens in the First part, two in the von, and
+two in the Last.
+Here \BibTeX\ knows where one part ends and the other begins because
+the tokens in the von part begin with lower-case letters.
+
+In general, it's a von token if the first letter at brace-level~0
+is in lower case.
+Since technically everything
+in a ``special character'' is at brace-level~0,
+you can trick \BibTeX\ into thinking that
+a token is or is not a von token by prepending a dummy
+special character whose first letter past the \TeX\ control sequence
+is in the desired case, upper or lower.
+
+To summarize, \BibTeX\ allows three possible forms for the name:
+\begin{verbatim}
+ "First von Last"
+ "von Last, First"
+ "von Last, Jr, First"
+\end{verbatim}
+You may almost always use the first form;
+you shouldn't if either there's a Jr part,
+or the Last part has multiple tokens but there's no von part.
+
+\end{enumerate}
+
+\bibliography{btxdoc}
+\bibliographystyle{plain}
+\end{document}
diff --git a/biblio/bibtex/contrib/germbib/document/btxhak.tex b/biblio/bibtex/contrib/germbib/document/btxhak.tex
new file mode 100644
index 0000000000..fe49d79cd7
--- /dev/null
+++ b/biblio/bibtex/contrib/germbib/document/btxhak.tex
@@ -0,0 +1,623 @@
+% Copyright (C) 1988, all rights reserved.
+
+\def\BibTeX{{\rm B\kern-.05em{\sc i\kern-.025em b}\kern-.08em
+ T\kern-.1667em\lower.7ex\hbox{E}\kern-.125emX}}
+
+\title{Designing B\kern-.05em{\large I}\kern-.025em{\large B}\kern-.08em\TeX\
+ Styles}
+\author{Oren Patashnik}
+\date{February 8, 1988}
+
+\documentstyle[mynormal]{article}
+\begin{document}
+
+\maketitle
+
+\setcounter{section}{4}
+\section{Bibliography-style hacking}
+\label{style}
+
+This document starts (and ends) with Section~\ref{style},
+because in reality it is the final section of ``\BibTeX ing''~\cite{btxdoc},
+the general documentation for \BibTeX.
+But that document was meant for all \BibTeX\ users,
+while this one is just for style designers,
+so the two are physically separate.
+Still, you should be completely familiar with ``\BibTeX ing''$\!$,
+and all references in this document
+to sections and section numbers
+assume that the two documents are one.
+
+This section,
+along with the standard-style documentation file \hbox{\tt btxbst.doc},
+should explain how to modify
+existing style files and to produce new ones.
+If you're a serious style hacker you should be familiar
+with van~Leunen~\cite{van-leunen} for points of style,
+with Lamport~\cite{latex} and Knuth~\cite{texbook} for formatting matters,
+and perhaps with {\em Scribe\/}~\cite{scribe} for compatibility details.
+And while you're at it, if you don't read the great little book by Strunk and
+White~\cite{strunk-and-white}, you should at least look at its
+entries in the database and the reference list
+to see how \BibTeX\ handles multiple names.
+
+To create a new style,
+it's best to start with an existing style that's close to yours,
+and then modify that.
+This is true even if you're simply updating an old style
+for \BibTeX\ version 0.99
+(I've updated four nonstandard styles,
+so I say this with some experience).
+If you want to insert into a new style
+some function you'd written for an old (version 0.98i) style,
+keep in mind that the order of the arguments to
+the assignment ({\tt :=}) function has been reversed.
+When you're finished with your style,
+you may want to try running it on the entire \hbox{\tt XAMPL.BIB} database
+to make sure it handles all the standard entry types.
+
+If you find any bugs in the standard styles,
+or if there are things you'd like to do
+with bibliography-style files but can't,
+please complain to Oren Patashnik.
+
+
+\subsection{General description}
+
+You write bibliography styles in a postfix stack language. It's
+not too hard to figure out how by looking at the standard-style documentation,
+but this description fills in a few details (it will fill in more
+details if there's a demand for it).
+
+Basically the style file is a program, written in an unnamed language, that
+tells \BibTeX\ how to format the entries that will go in the reference list
+(henceforth ``the entries'' will be ``the entry list''
+or simply ``the list''$\!$, context permitting).
+This programming language has ten commands, described in the next subsection.
+These commands manipulate the language's objects:
+constants, variables, functions, the stack, and the entry list.
+(Warning: The terminology in this documentation,
+chosen for ease of explanation, is slightly different from \BibTeX's.
+For example, this documentation's ``variables'' and ``functions''
+are both ``functions'' to \BibTeX.
+Keep this in mind when interpreting \BibTeX's error messages.)
+
+There are two types of functions: {\it built-in\/} ones that \BibTeX\ provides
+(these are described in Section~\ref{built-in-fns}), and ones you define
+using either the \hbox{\tt MACRO} or \hbox{\tt FUNCTION} command.
+
+Your most time-consuming task, as a style designer,
+will be creating or modifying functions
+using the \hbox{\tt FUNCTION} command
+(actually, becoming familiar with the references listed above will be
+more time consuming, but assume for the moment that that's done).
+
+Let's look at a sample function fragment.
+Suppose you have a string variable named \hbox{\tt label}
+and an integer variable named \hbox{\tt lab.width},
+and suppose you want to append the character `{\tt a}' to \hbox{\tt label}
+and to increment \hbox{\tt lab.width}:
+\begin{verbatim}
+ . . .
+ label "a" * 'label := % label := label * "a"
+ lab.width #1 + 'lab.width := % lab.width := lab.width + 1
+ . . .
+\end{verbatim}
+In the first line,
+\hbox{\tt label} pushes that variable's value onto the stack.
+Next, the {\tt "a"} pushes the string constant `{\tt a}' onto the stack.
+Then the built-in function {\tt *} pops the top two strings and
+pushes their concatenation.
+The \hbox{\tt 'label} pushes that variable's name onto the stack.
+And finally, the built-in function {\tt :=} pops
+the variable name and the concatenation and performs the assignment.
+\BibTeX\ treats the stuff following the {\tt \%} as a comment
+in the style file.
+The second line is similar except that it uses {\tt \#1},
+with no spaces intervening between the `{\tt \#}' and the `{\tt 1}'$\!$,
+to push this integer constant.
+
+The nonnull spacing here is arbitrary: multiple spaces, tabs, or newlines
+are equivalent to a single one (except that you're probably better off
+not having blank lines within commands, as explained shortly).
+
+For string constants, absolutely any printing character
+is legal between two consecutive double quotes, but \BibTeX\ here
+(and only here) treats upper- and lower-case equivalents as different.
+Furthermore, spacing {\em is\/} relevant within a string constant,
+and you mustn't split a string constant across lines
+(that is, the beginning and ending double quotes must be on the same line).
+
+Variable and function names may not begin with a numeral and
+may not contain any of the ten restricted characters
+on page~143 of the \LaTeX\ book,
+but may otherwise contain any printing characters.
+Also, \BibTeX\ considers upper- and lower-case equivalents to be the same.
+
+Integers and strings are the only value types for constants and variables
+(booleans are implemented simply as 0-or-1 integers).
+There are three kinds of variables:
+\begin{description}
+
+\item[global variables\hfill] These are either integer- or string-valued,
+declared using an \hbox{\tt INTEGERS} or \hbox{\tt STRINGS} command.
+
+\item[entry variables\hfill] These are either integer- or string-valued,
+declared using the \hbox{\tt ENTRY} command.
+Each has a value for each entry on the list
+(example: a variable \hbox{\tt label} might store
+the label string you'll use for the entry).
+
+\item[fields\hfill] These are string-valued, read-only variables
+that store the information from the database file;
+their values are set by the \hbox{\tt READ} command.
+As with entry variables, each has a value for each entry.
+\end{description}
+
+
+\subsection{Commands}
+
+There are ten style-file commands:
+Five (\hbox{\tt ENTRY}, \hbox{\tt FUNCTION}, \hbox{\tt INTEGERS},
+\hbox{\tt MACRO}, and \hbox{\tt STRINGS})
+declare and define variables and functions;
+one (\hbox{\tt READ}) reads in the database information;
+and four (\hbox{\tt EXECUTE}, \hbox{\tt ITERATE}, \hbox{\tt REVERSE},
+and \hbox{\tt SORT}) manipulate the entries and produce output.
+Although the command names appear here in upper case,
+\BibTeX\ ignores case differences.
+
+Some restrictions:
+There must be exactly one \hbox{\tt ENTRY} and one \hbox{\tt READ} command;
+the \hbox{\tt ENTRY} command, all \hbox{\tt MACRO} commands,
+and certain \hbox{\tt FUNCTION} commands
+(see next subsection's description of \hbox{\tt call.type\$})
+must precede the \hbox{\tt READ} command;
+and the \hbox{\tt READ} command must precede the four that
+manipulate the entries and produce output.
+
+Also it's best (but not essential) to leave at least one blank line
+between commands and to leave no blank lines within a command;
+this helps \BibTeX\ recover from any syntax errors you make.
+
+You must enclose each argument of every command in braces.
+Look at the standard-style documentation
+for syntactic issues not described in this section.
+Here are the ten commands:
+\begin{description}
+
+\item[\hbox{\tt ENTRY}\hfill]
+Declares the fields and entry variables.
+It has three arguments, each a (possibly empty) list of variable names.
+The three lists are of:
+fields, integer entry variables, and string entry variables.
+There is an additional field that \BibTeX\ automatically
+declares, \hbox{\tt crossref}, used for cross referencing.
+And there is an additional string entry variable automatically declared,
+\hbox{\tt sort.key\$}, used by the \hbox{\tt SORT} command.
+Each of these variables has a value for each entry on the list.
+
+\item[\hbox{\tt EXECUTE}\hfill]
+Executes a single function.
+It has one argument, the function name.
+
+\item[\hbox{\tt FUNCTION}\hfill]
+Defines a new function.
+It has two arguments; the first is the function's name and the
+second is its definition.
+You must define a function before using it;
+recursive functions are thus illegal.
+
+\item[\hbox{\tt INTEGERS}\hfill]
+Declares global integer variables.
+It has one argument, a list of variable names.
+There are two such automatically-declared variables,
+\hbox{\tt entry.max\$} and \hbox{\tt global.max\$},
+used for limiting the lengths of string variables.
+You may have any number of these commands, but a variable's declaration
+must precede its use.
+
+\item[\hbox{\tt ITERATE}\hfill]
+Executes a single function, once
+for each entry in the list, in the list's current order
+(initially the list is in citation order, but the \hbox{\tt SORT}
+command may change this).
+It has one argument, the function name.
+
+\item[\hbox{\tt MACRO}\hfill]
+Defines a string macro.
+It has two arguments; the first is the macro's name, which is treated like
+any other variable or function name,
+and the second is its definition, which must be double-quote-delimited.
+You must have one for each three-letter month abbreviation;
+in addition, you should have one for common journal names.
+The user's database may override any definition you define using this command.
+If you want to define a string the user can't touch,
+use the \hbox{\tt FUNCTION} command, which has a compatible syntax.
+
+\item[\hbox{\tt READ}\hfill]
+Dredges up from the database file
+the field values for each entry in the list.
+It has no arguments.
+If a database entry doesn't have a value for a field
+(and probably no database entry will have a value for every field),
+that field variable is marked as missing for the entry.
+
+\item[\hbox{\tt REVERSE}\hfill]
+Exactly the same as the
+\hbox{\tt ITERATE} command except that it executes the function
+on the entry list in reverse order.
+
+\item[\hbox{\tt SORT}\hfill]
+Sorts the entry list using
+the values of the string entry variable \hbox{\tt sort.key\$}.
+It has no arguments.
+
+\item[\hbox{\tt STRINGS}\hfill]
+Declares global string variables.
+It has one argument, a list of variable names.
+You may have any number of these commands, but a variable's declaration
+must precede its use.
+\end{description}
+
+
+\subsection{The built-in functions}
+\label{built-in-fns}
+
+Before we get to the built-in functions,
+a few words about some other built-in objects.
+There is one built-in string entry variable, \hbox{\tt sort.key\$},
+which the style program must set if the style is to do sorting.
+There is one built-in field, \hbox{\tt crossref},
+used for the cross referencing feature
+described in Section~4.
+And there are two built-in integer global variables,
+\hbox{\tt entry.max\$} and \hbox{\tt global.max\$},
+which are set by default to some internal \BibTeX\ constants;
+you should truncate strings to these lengths before
+you assign to string variables,
+so as to not generate any \BibTeX\ warning messages.
+
+There are currently 37 built-in functions.
+Every built-in function with a letter in its name ends with a `{\tt \$}'$\!$.
+In what follows, ``first''$\!$, ``second''$\!$,
+and so on refer to the order popped.
+A ``literal'' is an element on the stack, and it will be either
+an integer value, a string value, a variable or function name,
+or a special value denoting a missing field.
+If any popped literal has an incorrect type, \BibTeX\ complains and pushes
+the integer 0 or the null string, depending on whether the function
+was supposed to push an integer or string.
+\begin{description}
+
+\item[\hbox{\tt >}\hfill]
+Pops the top two (integer) literals,
+compares them, and pushes the integer 1 if the second is greater than
+the first, 0 otherwise.
+
+\item[\hbox{\tt <}\hfill]
+Analogous.
+
+\item[\hbox{\tt =}\hfill]
+Pops the top two (both integer or both string) literals,
+compares them,
+and pushes the integer 1 if they're equal, 0 otherwise.
+
+\item[\hbox{\tt +}\hfill]
+Pops the top two (integer) literals and pushes their sum.
+
+\item[\hbox{\tt -}\hfill]
+Pops the top two (integer) literals and pushes their difference
+(the first subtracted from the second).
+
+\item[\hbox{\tt *}\hfill]
+Pops the top two (string) literals,
+concatenates them (in reverse order, that is, the order in which
+pushed), and pushes the resulting string.
+
+\item[\hbox{\tt :=}\hfill]
+Pops the top two literals and assigns
+to the first (which must be a global or entry variable)
+the value of the second.
+
+\item[\hbox{\tt add.period\$}\hfill]
+Pops the top (string) literal,
+adds a `{\tt .}' to it if the last non`{\tt \}}' character
+isn't a `{\tt .}'$\!$, `{\tt ?}', or `{\tt !}'$\!$,
+and pushes this resulting string.
+
+\item[\hbox{\tt call.type\$}\hfill]
+Executes the function whose name is the entry type of an entry.
+For example if an entry is of type {\tt book}, this function executes
+the {\tt book} function.
+When given as an argument to the \hbox{\tt ITERATE} command,
+\hbox{\tt call.type\$} actually produces the output for the entries.
+For an entry with an unknown type,
+it executes the function \hbox{\tt default.type}.
+Thus you should define (before the \hbox{\tt READ} command) one function
+for each standard entry type as well as a \hbox{\tt default.type} function.
+
+\item[\hbox{\tt change.case\$}\hfill]
+Pops the top two (string) literals;
+it changes the case of the second according to the
+specifications of the first, as follows. (Note: The word `letters' in
+the next sentence refers only to those at brace-level~0, the top-most
+brace level; no other characters are changed, except perhaps for
+``special characters''$\!$, described in Section~4.)
+If the first literal is the
+string~`{\tt t}'$\!$, it converts to lower case all letters except the very
+first character in the string, which it leaves alone, and except the
+first character following any colon and then nonnull white space,
+which it also leaves alone; if it's the string~`{\tt l}'$\!$, it converts all
+letters to lower case; and if it's the string~`{\tt u}'$\!$, it converts all
+letters to upper case.
+It then pushes this resulting string. If either
+type is incorrect, it complains and pushes the null string; however,
+if both types are correct but the specification string (i.e., the
+first string) isn't one of the legal ones, it merely pushes the second
+back onto the stack, after complaining. (Another note: It ignores
+case differences in the specification string; for example, the strings
+{\tt t} and {\tt T} are equivalent for the purposes of this built-in
+function.)
+
+\item[\hbox{\tt chr.to.int\$}\hfill]
+Pops the top (string) literal,
+makes sure it's a single character, converts it to the
+corresponding ASCII integer, and pushes this integer.
+
+\item[\hbox{\tt cite\$}\hfill]
+Pushes the string that was the
+\hbox{\verb|\cite|}-command argument for this entry.
+
+\item[\hbox{\tt duplicate\$}\hfill]
+Pops the top literal from the stack and pushes two copies of it.
+
+\item[\hbox{\tt empty\$}\hfill]
+Pops the top literal and pushes
+the integer 1 if it's a missing field or a string having no
+non-white-space characters, 0 otherwise.
+
+\item[\hbox{\tt format.name\$}\hfill]
+Pops the top three literals
+(they are a string, an integer, and a string literal).
+The last string literal represents a name list (each name
+corresponding to a person), the integer literal specifies which name
+to pick from this list, and the first string literal specifies how to
+format this name, as explained in the next subsection.
+Finally, this function pushes the formatted name.
+
+\item[\hbox{\tt if\$}\hfill]
+Pops the top three literals (they
+are two function literals and an integer literal, in that order);
+if the integer is greater than 0, it executes the second literal,
+else it executes the first.
+
+\item[\hbox{\tt int.to.chr\$}\hfill]
+Pops the top (integer) literal,
+interpreted as the ASCII integer value of a single character,
+converts it to the corresponding single-character string, and pushes
+this string.
+
+\item[\hbox{\tt int.to.str\$}\hfill]
+Pops the top (integer) literal,
+converts it to its (unique) string equivalent, and pushes this string.
+
+\item[\hbox{\tt missing\$}\hfill]
+Pops the top literal and
+pushes the integer 1 if it's a missing field, 0~otherwise.
+
+\item[\hbox{\tt newline\$}\hfill]
+Writes onto the {\tt bbl} file
+what's accumulated in the output buffer.
+It writes a blank line if and only if the output buffer is empty.
+Since \hbox{\tt write\$} does reasonable line breaking, you should use
+this function only when you want a blank line or an explicit line break.
+
+\item[\hbox{\tt num.names\$}\hfill]
+Pops the top (string) literal
+and pushes the number of names the string represents---one plus
+the number of occurrences of the substring ``and'' (ignoring case differences)
+surrounded by nonnull white-space at the top brace level.
+
+\item[\hbox{\tt pop\$}\hfill]
+Pops the top of the stack but
+doesn't print it; this gets rid of an unwanted stack literal.
+
+\item[\hbox{\tt preamble\$}\hfill]
+Pushes onto the stack the concatenation of all the
+\hbox{\tt @PREAMBLE} strings read from the database files.
+
+\item[\hbox{\tt purify\$}\hfill]
+Pops the top (string) literal,
+removes nonalphanumeric characters except for white-space characters and
+hyphens and ties (these all get converted to a space), removes
+certain alphabetic characters contained in the control sequences
+associated with a ``special character''$\!$, and pushes the resulting string.
+
+\item[\hbox{\tt quote\$}\hfill]
+Pushes the string consisting of the double-quote character.
+
+\item[\hbox{\tt skip\$}\hfill]
+Is a no-op.
+
+\item[\hbox{\tt stack\$}\hfill]
+Pops and prints the whole stack;
+it's meant to be used for style designers while debugging.
+
+\item[\hbox{\tt substring\$}\hfill]
+Pops the top three literals
+(they are the two integers literals {\it len\/} and {\it start}, and a
+string literal, in that order).
+It pushes the substring of the (at most) {\it len\/} consecutive characters
+starting at the {\it start\/}th character (assuming 1-based indexing)
+if {\it start\/} is positive, and ending at the $-${\it start\/}th character
+from the end if {\it start\/} is negative
+(where the first character from the end is the last character).
+
+\item[\hbox{\tt swap\$}\hfill]
+Swaps the top two literals on the stack.
+
+\item[\hbox{\tt text.length\$}\hfill]
+Pops the top (string) literal,
+and pushes the number of text characters it contains, where an
+accented character (more precisely, a ``special character''$\!$,
+defined in Section~4)
+counts as a single text character, even if it's missing
+its matching right brace, and where braces don't count as
+text characters.
+
+\item[\hbox{\tt text.prefix\$}\hfill]
+Pops the top two literals
+(the integer literal {\it len\/} and a string literal, in that order).
+It pushes the substring of the (at most) {\it len\/} consecutive text
+characters starting from the beginning of the string. This function
+is similar to \hbox{\tt substring\$}, but this one considers
+a ``special character''$\!$, even if
+it's missing its matching right brace, to be a single text character
+(rather than however many ASCII characters it actually comprises),
+and this function doesn't consider braces to be text characters;
+furthermore, this function appends any needed matching right braces.
+
+\item[\hbox{\tt top\$}\hfill]
+Pops and prints the top of the stack on the terminal and log file.
+It's useful for debugging.
+
+\item[\hbox{\tt type\$}\hfill]
+Pushes the current entry's type (book, article, etc.),
+but pushes the null string
+if the type is either unknown or undefined.
+
+\item[\hbox{\tt warning\$}\hfill]
+Pops the top (string) literal
+and prints it following a warning message.
+This also increments a count of the number of warning messages issued.
+
+\item[\hbox{\tt while\$}\hfill]
+Pops the top two (function) literals,
+and keeps executing the second as long as the (integer)
+literal left on the stack by executing the first is greater than 0.
+
+\item[\hbox{\tt width\$}\hfill]
+Pops the top (string) literal
+and pushes the integer that represents its width in some relative units
+(currently, hundredths of a point, as specified by the June 1987 version
+of the $cmr10$ font; the only white-space character with nonzero width
+is the space).
+This function takes the literal literally;
+that is, it assumes each character in the string is to be printed as
+is, regardless of whether the character has a special meaning to \TeX,
+except that ``special characters'' (even without their right braces) are
+handled specially.
+This is meant to be used for comparing widths of label strings.
+
+\item[\hbox{\tt write\$}\hfill]
+Pops the top (string) literal
+and writes it on the output buffer (which will result in
+stuff being written onto the {\tt bbl} file when the buffer fills up).
+
+\end{description}
+
+Note that the built-in functions \hbox{\tt while\$} and \hbox{\tt if\$}
+require two function literals on the stack.
+You get them there either by immediately preceding the name of a function
+by a single quote, or, if you don't feel like defining a new function with
+the \hbox{\tt FUNCTION} command,
+by simply giving its definition (that is, giving what would be the second
+argument to the \hbox{\tt FUNCTION} command, including the surrounding braces).
+For example the following function fragment appends the character `{\tt a}'
+if the string variable named \hbox{\tt label} is nonnull:
+\begin{verbatim}
+ . . .
+ label "" =
+ 'skip$
+ { label "a" * 'label := }
+ if$
+ . . .
+\end{verbatim}
+A function whose name you quote needn't be built in
+like \hbox{\tt skip\$} above---it may, for example,
+be a field name or a function you've defined earlier.
+
+
+\subsection{Name formatting}
+
+What's in a name?
+Section~4 pretty much describes this.
+Each name consists of four parts: First, von, Last, and Jr;
+each consists of a list of name-tokens,
+and any list but Last's may be empty for a nonnull name.
+This subsection describes the format string you must supply to
+the built-in function \hbox{\tt format.name\$}.
+
+Let's look at an example of a very long name.
+Suppose a database entry~\cite{prime-number-theorem} has the field
+\begin{verbatim}
+ author = "Charles Louis Xavier Joseph de la Vall{\'e}e Poussin"
+\end{verbatim}
+and suppose you want this formatted ``last name comma initials''$\!$.
+If you use the format string
+\begin{verbatim}
+ "{vv~}{ll}{, jj}{, f}?"
+\end{verbatim}
+\BibTeX\ will produce
+\begin{verbatim}
+ de~la Vall{\'e}e~Poussin, C.~L. X.~J?
+\end{verbatim}
+as the formatted string.
+
+Let's look at this example in detail.
+There are four brace-level~1 {\em pieces\/} to this format string,
+one for each part of a name.
+If the corresponding part of a name isn't present (the Jr part for this name),
+everything in that piece is ignored.
+Anything at brace-level~0 is output verbatim
+(the presumed typo `{\tt ?}' for this name is at brace-level~0),
+but you probably won't use this feature much.
+
+Within each piece a double letter tells \BibTeX\ to use whole tokens, and
+a single letter, to abbreviate them (these letters must be at brace-level~1);
+everything else within the piece is used verbatim
+(well, almost everything---read on).
+The tie at the end of the von part (in \hbox{\verb|{vv~}|})
+is a discretionary tie---\BibTeX\ will output a tie at that point
+if it thinks there's a need for one;
+otherwise it will output a space.
+If you really, really, want a tie there,
+regardless of what \BibTeX\ thinks, use two of them
+(only one will be output); that is, use \hbox{\verb|{vv~~}|}.
+A tie is discretionary only if it's the last character of the piece;
+anywhere else it's treated as an ordinary character.
+
+\BibTeX\ puts default strings {\em between\/} tokens of a name part:
+For whole tokens it uses either a space or a tie,
+depending on which one it thinks is best,
+and for abbreviated tokens it uses a period followed by
+either a space or a tie.
+However it doesn't use this default string after the last token in a list;
+hence there's no period following the `J' for our example.
+You should have used
+\begin{verbatim}
+ "{vv~}{ll}{, jj}{, f.}"
+\end{verbatim}
+to get \BibTeX\ to produce the same formatted string but with the question
+mark replaced by a period.
+Note that the period should go inside the First-name piece,
+rather than where the question mark was, in case a name has no First part.
+
+If you want to override \BibTeX's default between-token strings, you
+must explicitly specify a string.
+For example suppose you want a label to contain the first letter from each
+token in the von and Last parts, with no spaces;
+you should use the format string
+\begin{verbatim}
+ "{v{}}{l{}}"
+\end{verbatim}
+so that \BibTeX\ will produce `{\tt dlVP}' as the formatted string.
+You must give a string for each piece whose default you want overridden
+(the example here uses the null string for both pieces), and this string
+must immediately follow either the single or double letter for the piece.
+You may not have any other letters at brace-level~1 in the format string.
+
+\bibliography{btxdoc}
+\bibliographystyle{plain}
+\end{document}
diff --git a/biblio/bibtex/contrib/germbib/document/gerbibtx.bib b/biblio/bibtex/contrib/germbib/document/gerbibtx.bib
new file mode 100644
index 0000000000..27cba72621
--- /dev/null
+++ b/biblio/bibtex/contrib/germbib/document/gerbibtx.bib
@@ -0,0 +1,54 @@
+
+@UNPUBLISHED{bibtex.a,
+ author = "Oren Patashnik",
+ title = "{{\BibTeX ing}}",
+ note = "Documentation for general {\BibTeX} users",
+ month = "8$^{th}$~" # feb,
+ language = "USenglish",
+ year = 1988, }
+
+@UNPUBLISHED{bibtex.b,
+ author = "Oren Patashnik",
+ title = "Designing {\BibTeX} Styles",
+ note = "The part of \BibTeX's documentation
+ that's not meant for general users",
+ month = "8$^{th}$~" # feb,
+ language = "USenglish",
+ year = 1988, }
+
+@BOOK{texbook,
+ author = "Donald E. Knuth",
+ title= "The {{\tex}book}",
+ publisher = "Addison-Wesley Publishing Company",
+ address = "Reading, Massachusetts",
+ language = "USenglish",
+ year = 1984 }
+
+@BOOK{lamport,
+ author = "Leslie Lamport",
+ title = "{\LaTeX \rm:} {A} Document Preparation System",
+ publisher = "Addison-Wesley Publishing Company",
+ address = "Reading, Massachusetts",
+ language = "USenglish",
+ year = 1986 }
+
+@BOOK{kopka,
+ language = "german",
+ author = "Helmut Kopka",
+ title = "{\LaTeX} --- Eine Einf{\"{u}}hrung",
+ publisher = "Addison-Wesley (Deutschland) GmbH",
+ address = "Bonn; Reading, Massachusetts",
+ year = 1988,
+ note = "Das deutsche Standardwerk {\"{u}}ber {\latex}",
+ }
+
+@UNPUBLISHED{partl,
+ language = "german",
+ author = "Hubert Partl",
+ address = "Technische Universit{\"{a}}t Wien",
+ title = "{\normalshape\tt german.sty} --- Version 2.3d",
+ month = "21.~" # nov,
+ year = 1990,
+ note = "Erh{\"{a}}ltlich {\"{u}}ber DANTE (Deutsche Anwendervereinigung
+ {\TeX} e.\,\,V.): Bitnet server {\tt LISTSERV@DHDURZ1}",
+}
diff --git a/biblio/bibtex/contrib/germbib/document/gerbibtx.tex b/biblio/bibtex/contrib/germbib/document/gerbibtx.tex
new file mode 100644
index 0000000000..82c0934e30
--- /dev/null
+++ b/biblio/bibtex/contrib/germbib/document/gerbibtx.tex
@@ -0,0 +1,433 @@
+%macropackage=lplaing
+
+\documentstyle[bibgerm]{article}
+
+\def\tex{{\the\textfont0\TeX}}
+\def\pLaTeX{{\the\textfont0 L\kern-.36em\raise.3ex\hbox{\the\scriptfont0
+A}\kern-.15em T\kern-.1667em\lower.7ex\hbox{E}\kern-.125emX}}
+\def\LaTeX{\protect\pLaTeX}
+\def\pBibTeX{{\the\textfont0 B\hbox{\the\scriptfont0 IB}\kern-.1em\TeX}}
+\def\BibTeX{\protect\pBibTeX}
+\def\bibtex{\BibTeX}\def\tex{\TeX}
+\def\latex{\LaTeX}
+\def\dat#1{{\tt #1}}
+\def\bsl{{\tt\char'134}} % '\'
+\def\leerz{{\tt\char'040}} % little 'u' for spaces
+\def\affe{\char'100} % '@'
+\exhyphenpenalty=50 \hyphenpenalty=10 \doublehyphendemerits=50
+\finalhyphendemerits=50 \brokenpenalty=100 \pretolerance=0 \tolerance=2000
+\looseness=0 \linepenalty=10
+\hoffset=-1.0in \textwidth6.4in \oddsidemargin0.8in \evensidemargin0.8in
+\marginparwidth0.6in \marginparsep0.2in \marginparpush1ex
+\topmargin0pt \headheight2.5ex \headsep5ex \textheight9.25in
+\columnsep10pt \columnseprule0pt
+\parindent0pt \parskip2.5ex plus1.5ex minus1.5ex
+\renewcommand{\arraystretch}{1.2}
+\renewcommand{\baselinestretch}{1.1}
+\def\footnoterule{\vfill\kern-3pt \hrule width \textwidth\kern 2.6pt}
+\pagestyle{headings}
+\newlength{\mylena}
+\originalTeX\nonfrenchspacing
+
+\begin{document}
+
+\title{German and international \bibtex ing\\A manual for the 'german' \bibtex\ styles}
+\author{Martin Wallmeier\thanks{Tel.:
+[[0]0\,49]\,(09\,31)\,80\,05\,--\,5\,10}\\ G"obelslehenstr. 1--b\,16\\8700
+W"urzburg\\ West Germany\\e-mail: neuk121@wrzx13.rz.uni-wuerzburg.de}
+\date{20$^{th}$ April 1993}
+\maketitle
+
+\tableofcontents
+
+\section{Introduction}
+
+The original \bibtex\ version 0.99b standard styles allow only English
+references. There are some so called \dat{'German'} styles, but they allow
+only German references. I couldn't find any style beeing able to switch
+between the language for mixed references. In scientific publications you
+will find a lot of English references beside the ones of the country, where
+the publication was written. But it looks awful, if you mix an english
+reference with german expressions, for example:
+\begin{center}\begin{minipage}{.7\textwidth}\raggedright\tt Wilson,
+Braunwald, und Isselbacher, Herausgeber. Harrison's Principles of Internal
+Medicine. Band 1, twelfth Auf{}lage\ldots\end{minipage}\end{center}
+So I tried to write a style being able to switch the language.
+
+\section[Restrictions of and problems with \bibtex]{Restrictions of and
+problems with \bibtex\footnote{Dedicated to Oren Patashnik at Stanford
+University. I hope this will find him anytime.}}
+
+There is a terrific restriction at least in my version of \bibtex: it
+allows only ten (10) global variables of type \dat{STRINGS}. Therefore it
+was impossible to implement a function which would decide whether to switch
+the language and then call a specific function for every country that could
+actualize the contents of these string variables. So the only possible way
+seemed to be to create a series of \tex\ macros.
+
+Another problem occured with \bibtex's built in function
+\verb|add.period$|. This function adds a point, if the last non '\}'
+character is no '.', '!' or '?'. But how to tell \verb|add.period$| that
+the \tex\ macros for abbreviations contain a point, although there is not
+one obvious for \bibtex? The \tex\ macros have one parameter now: If you
+abbreviate editors for example as 'eds.' \verb|add.period$| mustn't set a
+point if the corresponding \tex\ macro is set in the output. So {\tt\bsl
+btxeditorsshort} is defined as follows:\\[.5ex]
+\verb| \def\btxeditorsshort#1{eds#1}|\\[.5ex]
+Now you can write {\tt\bsl btxeditorsshort\{.\}} in the \bibtex\ style file
+and \verb|add.period$| will find a point if {\tt\bsl btxeditorsshort\{.\}}
+is the last expression in the sentence. As you can see this is only
+necessary for those expressions that can stand at the end of a sentence or
+block. 'And' usually will not stay at the end of a sentence. So you can
+define the corresponding macros as pointed abbreviation, if you want to.
+
+I had to face a last problem with the built in function
+\verb|change.case$|. It's similar to the one with \verb|add.period$|. This
+function is also unable to expand the defined \tex\ macros. Therefore I had
+to define always two forms of macros \verb|\btx...| and \verb|\Btx...|
+where the second should be used where something like `The Quick Brown Fox
+Jumps Over The Lazy Dog' is to occure and the first for something like `The
+quick brown fox\ldots' if the expression starts a sentence or `the quick
+brown fox\ldots' if it is used in the middle of a sentence. The {\tt
+change.case\$} function will not be called if a title is going to be
+formatted and {\tt language} is not set to {\tt 'english'} or {\tt
+'USenglish'}. Henceforth you don't have to use '\{\}' braces to avoid {\tt
+chang.case\$} in titles of other languages. Thus typing is much easier.
+Typing comfort could be also improoved very much if \bibtex\ would
+understand umlauts as \tex\ version 3.1 and not only constructions like
+\verb|{\"{a}}|.
+
+All these constructions are tricky and uncomfortable only to bypass or fool
+the built in \bibtex\ functions. Things would be much easier if more global
+string variables could be defined. Then \bibtex\ could format the content
+of the string variables directly and commands like \verb|add.period$| or
+\verb|\cange.case$| would work the same way as if the expression would
+occure in the text.
+
+Now you know about the reasons why I had to make a new \latex\ style
+\dat{bibgerm.sty} for use with the \dat{ger[...].bst} \bibtex\ styles. It
+defines the \tex\ macros mentioned above and listed below.
+
+\section{Implementation}
+
+\bibtex\ was changed in the way that it doesn't place string constants, but
+\tex\ macros into the output for expressions that vary in the different
+languages. So \bibtex\ generates a {\tt\bsl selectlanguage\{...\}} command
+just before the current \verb|\bibitem[...]{...}| if the {\tt language}
+field in the database entry is not empty. There are only a few allowed
+contents for {\tt language}: {\tt 'german'}, {\tt 'austrian'}, {\tt
+'english'}, and {\tt 'USenglish'}, because I'm speaking only German and
+bad English. {\tt 'english'} does the same as {\tt 'USenglish'} at the
+moment. I think there won't be many differences, but I could imagine some
+concerning 'Master's thesis' and 'PhD thesis'. {\tt 'austrian'} does nearly
+the same as {\tt 'german'}, only the month 'January' is different.
+
+It should be not so very difficult to implement other languages for someone
+who is a little bit acquainted to \tex\ or \latex. You probably needn't
+change the \bibtex\ styles, but only to supplement the \dat{bibgerm.sty}
+\latex\ style a little bit.
+
+\subsection{\ifx\undefined\selectfont \else\series{m}\fi\dat{bibgerm.sty}}
+
+The macro \verb|\selectlanguage{...}| of the original \dat{german.sty}
+\cite{partl}switched already things like {\tt 'date'} and {\tt
+'captionnames'}. There are now some new global definitions
+\verb|\bibsgerman|, \verb|\bibsenglish| and \verb|\bibsUSenglish| being
+called by {\tt\bsl selectlanguage\{...\}}. The \verb|\bibs...| macros
+redefine the meanings for a list of \tex\ macros according to the current
+language:
+\settowidth{\mylena}{\tt\bsl def\bsl ...short\#\#1\{...\#\#1\}}
+\begin{center}\begin{tabular}{|l|p{.67\textwidth}@{}l|}\hline
+\multicolumn{3}{|c|}{General Aspects}\\\hline
+\hbox to\mylena{\tex\ macro\hfil} & Meaning &\\\hline
+{\tt\bsl def\bsl btx...\{...\}} & \raggedright Expression in lower case
+letters for use in the middle of a sentence (e.\ g.\ 'volume').&\\
+{\tt\bsl def\bsl Btx...\{...\}} & \raggedright Expression with the first
+letter capitalized for use at the beginning of a sentence (e.\ g.\
+'Volume') or formatted like a booktitle (e.\ g.\ 'Technical Report
+037').&\\
+{\tt\bsl def\bsl ...short\#\#1\{...\#\#1\}} & \raggedright Mostly
+abbreviated expression. The tricky construction {\tt\#\#1} was explained
+above. You need double {\tt'\#'} because the macros are defined inside the
+global definition of the {\tt\bsl bibs...} macro. The parameter {\tt\#\#1}
+is used to set the last point of an abbreviation that can occure at the end
+of a sentence (e.\ g.\ {\tt\bsl def\bsl btxetalshort\#\#1\{et~al\#\#1\}}).
+If you don't want to have a point at the end you skip the {\tt\#\#1} inside
+the braces.&\\
+{\tt\bsl def\bsl ...long\{...\}} & \raggedright Expression used for the
+long i.\,\,e.\ unabbreviated form (e.\ g.\ {\tt\bsl def\bsl btxetallong\{
+et~alii\}}). &\\\hline
+\multicolumn{3}{|c|}{Details}\\\hline
+\hbox to\mylena{\tex\ macro\hfil} & meaning &\\\hline
+{\tt\bsl def\bsl btxetalshort\#\#1} & \raggedright Used after authors or
+editors, if there is {\tt 'and othrers'} at the end of the corresponding
+\bibtex\ database entry field (defined as {\tt 'et~al\#\#1{}'}). This
+expression might finish a sentence or block; so {\tt '\#\#1'} is necessary
+for {\tt 'add.period\$'}. &\\
+{\tt\bsl def\bsl btxetallong} & \raggedright Unabbreviated form of the
+above (defined as {\tt 'et~alii'}). &\\
+{\tt\bsl def\bsl btxandshort} & \raggedright Used before the last author or
+editor if there are more than one (defined as {\tt 'and'}). &\\
+{\tt\bsl def\bsl btxandlong} & \raggedright Unabbreviated form of the above
+(defined as {\tt 'and'}). &\\
+{\tt\bsl def\bsl btxinshort} & \raggedright Used with entry type {\tt
+@incollection} or {\tt @inproceedings} as introduction for the reference to
+the superior work (defined as {\tt 'in'}). &\\
+{\tt\bsl def\bsl btxinlong} & \raggedright Unabbreviated form of the above
+(defined as {\tt 'in'}). &\\
+{\tt\bsl def\bsl Btxinshort} & \raggedright For use at the beginning of a
+sentence (defined as {\tt 'In'}). &\\
+{\tt\bsl def\bsl Btxinlong} & \raggedright Unabbreviated form of the above
+(defined as {\tt 'In'}). &\\
+{\tt\bsl def\bsl btxofseriesshort} & \raggedright Used after the volume
+number before the title of the book series (defined as {\tt 'of'}). &\\
+{\tt\bsl def\bsl btxofserieslong} & \raggedright Unabbreviated form of the
+above (defined as {\tt 'of'}). &\\
+{\tt\bsl def\bsl btxinseriesshort} & \raggedright Used for a part of a book
+with a separate title. If there is a number given it is placed before the
+title of the series (defined as {\tt 'in'}). &\\
+{\tt\bsl def\bsl btxinserieslong} & \raggedright Unabbreviated form of the
+above (defined as {\tt 'in'}). &\\
+\hline\end{tabular}
+
+\begin{tabular}{|l|p{.67\textwidth}@{}l|}\hline
+\hbox to\mylena{\tex\ macro\hfil} & meaning &\\\hline
+{\tt\bsl def\bsl btxeditorshort\#\#1} & \raggedright Abbreviation for a
+single {\em editor\/} that can be placed at the end of the editor block
+(defined as {\tt 'ed\#\#1{}'}). &\\
+{\tt\bsl def\bsl btxeditorlong} & \raggedright Unabbreviated form of the
+above (defined as {\tt 'editor'}). &\\
+{\tt\bsl def\bsl btxeditorsshort\#\#1} & \raggedright Equivalent of the
+above for more than one editor (defined as {\tt 'eds\#\#1{}'}). &\\
+{\tt\bsl def\bsl btxeditorslong} & \raggedright Unabbreviated form of the
+above (defined as {\tt 'editors'}). &\\
+{\tt\bsl def\bsl Btxeditorshort\#\#1} & \raggedright This and the following
+macros could be used by a style file that would start a bibliography entry
+with something like 'Ed.:\ \ldots' (defined as {\tt 'Ed\#\#1{}'}). &\\
+{\tt\bsl def\bsl Btxeditorlong} & \raggedright Unabbreviated form of the
+above (defined as {\tt 'Editor'}). &\\
+{\tt\bsl def\bsl Btxeditorsshort\#\#1} & \raggedright Plural of the above
+(defined as {\tt 'Eds\#\#1{}'}). &\\
+{\tt\bsl def\bsl Btxeditorslong} & \raggedright Unabbreviated form of the
+above (defined as {\tt 'Editors'}). &\\
+{\tt\bsl def\bsl btxvolumeshort\#\#1} & \raggedright Abbreviation for {\em
+volume\/} for use after a comma, i.\,\,e.\ in the middle of a sentence
+(defined as {\tt 'vol\#\#1{}'}). &\\
+{\tt\bsl def\bsl btxvolumelong} & \raggedright Unabbreviated form of the
+above (defined as {\tt 'volume'}). &\\
+{\tt\bsl def\bsl Btxvolumeshort\#\#1} & \raggedright For use at the
+beginning of a sentence (defined as {\tt 'Vol\#\#1{}'}). &\\
+{\tt\bsl def\bsl Btxvolumelong} & \raggedright Unabbreviated form of the
+above (defined as {\tt 'Volume'}). &\\
+{\tt\bsl def\bsl btxnumbershort\#\#1} & \raggedright Abbreviation for {\em
+number\/} if used in the middle of a sentence (defined as {\tt
+'no\#\#1{}'}). &\\
+{\tt\bsl def\bsl btxnumberlong} & \raggedright Unabbreviated form of the
+above (defined as {\tt 'number'}). &\\
+{\tt\bsl def\bsl Btxnumbershort\#\#1} & \raggedright For use at the
+beginning of a sentence (defined as {\tt 'No\#\#1{}'}). &\\
+{\tt\bsl def\bsl Btxnumberlong} & \raggedright Unabbreviated form of the
+above (defined as {\tt 'Number'}). &\\
+{\tt\bsl def\bsl btxeditionshort\#\#1} & \raggedright Abbreviation for {\em
+edition\/} that can finish a sentence or block (defined as {\tt
+'ed\#\#1{}'}). &\\
+{\tt\bsl def\bsl btxeditionlong} & \raggedright Unabbreviated form of the
+above (defined as {\tt 'edition'}). &\\
+{\tt\bsl def\bsl Btxeditionshort\#\#1} & \raggedright For use at the
+beginning of a sentence (defined as {\tt 'Ed\#\#1{}'}). &\\
+{\tt\bsl def\bsl Btxeditionlong} & \raggedright Unabbreviated form of the
+above (defined as {\tt 'Edition'}). &\\
+{\tt\bsl def\bsl btxchaptershort\#\#1} & \raggedright Abbreviation for {\em
+chapter\/} which might be placed at the end of a sentence if it would be
+used after first, second, etc. (defined as {\tt 'chap\#\#1{}'}). &\\
+{\tt\bsl def\bsl btxchapterlong} & \raggedright Unabbreviated form of the
+above (defined as {\tt 'chapter'}). &\\
+{\tt\bsl def\bsl Btxchaptershort\#\#1} & \raggedright For use at the
+beginning of a sentence (defined as {\tt 'Chap\#\#1{}'}). &\\
+{\tt\bsl def\bsl Btxchapterlong} & \raggedright Unabbreviated form of the
+above (defined as {\tt 'Chapter'}). &\\
+{\tt\bsl def\bsl btxpageshort\#\#1} & Abbreviation for {\em page\/}
+\raggedright (defined as {\tt 'p\#\#1{}'}). &\\
+{\tt\bsl def\bsl btxpagelong} & \raggedright Unabbreviated form of the
+above (defined as {\tt 'page'}). &\\
+{\tt\bsl def\bsl btxpagesshort\#\#1} & \raggedright If there are more than
+one {\em page\/} this abbreviation will be used (defined as {\tt
+'pp\#\#1{}'}). &\\
+{\tt\bsl def\bsl btxpageslong} & \raggedright Unabbreviated form of the
+above (defined as {\tt 'pages'}). &\\
+{\tt\bsl def\bsl Btxpageshort\#\#1} & \raggedright For use at the beginning
+of a sentence (defined as {\tt 'P\#\#1{}'}). &\\
+{\tt\bsl def\bsl Btxpagelong} & \raggedright Unabbreviated form of the
+above (defined as {\tt 'Page'}). &\\
+{\tt\bsl def\bsl Btxpagesshort\#\#1} & \raggedright Plural of the above
+(defined as {\tt 'Pp\#\#1{}'}). &\\
+{\tt\bsl def\bsl Btxpageslong} & \raggedright Unabbreviated form of the
+above (defined as {\tt 'Pages'}). &\\
+\hline\end{tabular}
+
+\begin{tabular}{|l|p{.67\textwidth}@{}l|}\hline
+\hbox to\mylena{\tex\ macro\hfil} & Meaning &\\\hline
+{\tt\bsl def\bsl btxmastthesis} & \raggedright Expression that will be used
+by default if there is given no \bibtex\ database entry field {\tt type} in
+a {\tt @masterthesis} entry (defined as {\tt 'Master's thesis'}). &\\
+{\tt\bsl def\bsl btxphdthesis} & \raggedright Equivalent of the above for
+the {\tt @phdthesis} entry (defined as {\tt 'PhD thesis'}). &\\
+{\tt\bsl def\bsl btxtechrepshort\#\#1} & \raggedright Equivalent of the
+above for abbreviated {\tt @techreport} entry formatted like the title of
+an article or journal, i.\,\,e.\ only the first letter capitalized (defined
+as {\tt 'Techn.\ rep\#\#1{}'}). &\\
+{\tt\bsl def\bsl btxtechreplong} & \raggedright Unabbreviated form of the
+above (defined as {\tt 'Technical report'}). &\\
+{\tt\bsl def\bsl Btxtechrepshort\#\#1} & \raggedright Same as the above but
+formatted like a booktitle, i.\,\,e.\ all words capitalized except articles
+and conjunctions like 'the' or 'of', etc. This one is used if the number
+field of the {\tt @techreport} entry is not empty (defined as {\tt 'Techn.\
+Rep\#\#1{}'}). &\\
+{\tt\bsl def\bsl Btxtechreplong} & \raggedright Unabbreviated form of the
+above (defined as {\tt 'Technical Report'}). &\\
+{\tt\bsl def\bsl btxmonjanshort\#\#1} & \raggedright Abbreviated names of
+the months (defined as {\tt 'Jan\#\#1{}'}). &\\
+{\tt\bsl def\bsl btxmonfebshort\#\#1} & \raggedright (defined as {\tt
+'Feb\#\#1{}'}). &\\
+{\tt\bsl def\bsl btxmonmarshort\#\#1} & \raggedright (defined as {\tt
+'Mar\#\#1{}'}). &\\
+{\tt\bsl def\bsl btxmonaprshort\#\#1} & \raggedright (defined as {\tt
+'Apr\#\#1{}'}). &\\
+{\tt\bsl def\bsl btxmonmayshort\#\#1} & \raggedright (defined as {\tt
+'May'}). &\\
+{\tt\bsl def\bsl btxmonjunshort\#\#1} & \raggedright (defined as {\tt
+'June'}). &\\
+{\tt\bsl def\bsl btxmonjulshort\#\#1} & \raggedright (defined as {\tt
+'July'}). &\\
+{\tt\bsl def\bsl btxmonaugshort\#\#1} & \raggedright (defined as {\tt
+'Aug\#\#1{}'}). &\\
+{\tt\bsl def\bsl btxmonsepshort\#\#1} & \raggedright (defined as {\tt
+'Sept\#\#1{}'}). &\\
+{\tt\bsl def\bsl btxmonoctshort\#\#1} & \raggedright (defined as {\tt
+'Oct\#\#1{}'}). &\\
+{\tt\bsl def\bsl btxmonnovshort\#\#1} & \raggedright (defined as {\tt
+'Nov\#\#1{}'}). &\\
+{\tt\bsl def\bsl btxmondecshort\#\#1} & \raggedright (defined as {\tt
+'Dec\#\#1{}'}). &\\
+{\tt\bsl def\bsl btxmonjanlong} & \raggedright Unabbreviated names of the
+months (defined as {\tt 'January'}). &\\
+{\tt\bsl def\bsl btxmonfeblong} & \raggedright (defined as {\tt
+'February'}). &\\
+{\tt\bsl def\bsl btxmonmarlong} & \raggedright (defined as {\tt 'March'}).
+&\\
+{\tt\bsl def\bsl btxmonaprlong} & \raggedright (defined as {\tt 'April'}).
+&\\
+{\tt\bsl def\bsl btxmonmaylong} & \raggedright (defined as {\tt 'May'}).
+&\\
+{\tt\bsl def\bsl btxmonjunlong} & \raggedright (defined as {\tt 'June'}).
+&\\
+{\tt\bsl def\bsl btxmonjullong} & \raggedright (defined as {\tt 'July'}).
+&\\
+{\tt\bsl def\bsl btxmonauglong} & \raggedright (defined as {\tt 'August'}).
+&\\
+{\tt\bsl def\bsl btxmonseplong} & \raggedright (defined as {\tt
+'September'}). &\\
+{\tt\bsl def\bsl btxmonoctlong} & \raggedright (defined as {\tt
+'October'}). &\\
+{\tt\bsl def\bsl btxmonnovlong} & \raggedright (defined as {\tt
+'November'}). &\\
+{\tt\bsl def\bsl btxmondeclong} & \raggedright (defined as {\tt
+'December'}). &\\
+\hline\end{tabular}\end{center}
+
+For more details about macro programming refer to \cite{texbook}.
+
+\subsection{Available \bibtex\ styles and file list}
+
+All \bibtex\ standard styles are available although I've changed their
+design a little bit. Furthermore, I adjusted the \dat{'apalike.bst'} which
+allows references like '(Jones 1986)'. The names of the 'german' \bibtex\
+styles, their corresponding standards, and the remaining files are listed
+in the following table:
+\begin{center}\begin{tabular}{|l|l|}\hline
+\multicolumn{2}{|c|}{\bibtex\ Styles and Files}\\\hline
+'german' & Standard \\\hline
+{\tt gerabbrv.bst} & {\tt abbrv.bst} \\
+{\tt geralpha.bst} & {\tt alpha.bst} \\
+{\tt gerplain.bst} & {\tt plain.bst} \\
+{\tt gerunsrt.bst} & {\tt unsrt.bst} \\\hline
+{\tt gerapali.bst} & {\tt apalike.bst} \\\hline
+{\tt gerxampl.bib} & {\tt xampl.bib} \\\hline\hline
+\multicolumn{2}{|c|}{\latex\ Styles}\\\hline
+'german' & Standard \\\hline
+{\tt bibgerm.sty} & {\tt german.sty} \\
+{\tt apalike.sty} & {\tt apalike.sty} \\\hline\hline
+\multicolumn{2}{|c|}{Manual for \latex}\\\hline
+{\tt gerbibtx.tex} & {\sc Manual} and \\
+{\tt gerbibtx.bib} & {\sc Bibliography}\\\hline\hline
+\multicolumn{2}{|c|}{Original Manuals}\\\hline
+{\tt btxdoc.tex} & For general users\\
+{\tt btxhak.tex} & For style designers\\
+{\tt btxdoc.bib} & {\sc Bibliography}\\\hline
+\end{tabular}\end{center}
+
+If you want to write \bibtex\ styles on your own, you are absolutely in
+need of \cite{bibtex.a} and \cite{bibtex.b}. These documents should be as
+files in your distribution of \bibtex. If they are not, complain violently
+to the distributor.
+
+\subsection{Changes to the standard styles}
+
+There are two new functions: {\tt after.authors} and {\tt smallcaps}. The
+last is similar to {\tt emphasize}. It sets the authors or editors in {\sc
+Small Caps}. If you don't like that, you can change it to an empty
+function. The other one sets the new 'state' {\tt before.title}. These
+'states' are used by the different {\tt output} routines to decide what
+punctuation is going to be placed (most times point or comma) before the
+string on the stack. If the current 'state' is {\tt before.title} a colon
+is placed before the title of what ever, i.\,\,e. regularly after authors
+and editors. If you don't like this either, you can copy the function {\tt
+new.block} to {\tt after.authors}. Then a point will be set instead of a
+colon. {\tt gerapali.bst} behaves in this way, because a colon after braces
+looks a little bit strange.
+
+I've changed also the format of the authors' and editors' names to my
+personal favorites:
+
+\begin{center}\begin{minipage}{.7\textwidth}\raggedright\tt Wallmeier, M.
+van, O. Patashnik, and L. van Lamport (eds.): \bibtex ing is
+great\ldots\end{minipage}\end{center}
+
+You can reset the original status by comparing the lines where the function
+{\tt format.name\$} occures with the according lines in the original
+standard \bibtex\ styles. Nevertheless you should be familar with \bibtex's
+name formatting \cite[section 5.4]{bibtex.b}.
+
+I'm not in access to the original \latex\ standard work \cite{lamport}. But
+\cite[appendix B]{kopka} is marked as an almost extensive translation from
+\cite{lamport}. If this is true, there are a few differences concerning the
+optional fields in some entry types. They concern the additional field {\tt
+number} that is used by the entry types {\tt @book}, {\tt @inbook}, {\tt
+@incollection}, {\tt @inproceedings}, and {\tt @proceedings} and the
+additional field {\tt tpye} that is used in {\tt @masterthesis} and {\tt
+@phdthesis}.
+
+Those were of most importance for writing {\tt bibgerm.sty} and the {\tt
+ger[...].bst} files, but there are some more \cite[section 2.2 'Changes to
+the standard styles']{bibtex.a}.
+
+
+\section{Changes}
+
+\begin{description}
+\item[1993, April 20th:] \verb|bibgerm.sty| changed for use with `german.sty'
+version 2.4. In detail: redefine `\verb|\selectlanguage|' or
+`\verb|\p@selectlanguage|' depending on version of `german.sty'.
+\end{description}
+
+\section{Known bugs}
+
+\begin{description}
+\item[german.sty:] Probably `\verb|bibgerm.sty|' won't work with `german.sty'
+version 3.
+\end{description}
+
+\bibliography{gerbibtx}\bibliographystyle{gerplain}
+
+\end{document}
+
diff --git a/biblio/bibtex/contrib/germbib/for_tex/apalike.tex b/biblio/bibtex/contrib/germbib/for_tex/apalike.tex
new file mode 100644
index 0000000000..8f2ac454dd
--- /dev/null
+++ b/biblio/bibtex/contrib/germbib/for_tex/apalike.tex
@@ -0,0 +1,88 @@
+%% @texfile{
+%% author = "Oren Patashnik",
+%% version = "0.99a",
+%% date = "12 Dec 1990",
+%% filename = "apalike.tex",
+%% address = "Please use electronic mail",
+%% checksum = "88 707 4412",
+%% email = "opbibtex@neon.stanford.edu",
+%% codetable = "ISO/ASCII",
+%% supported = "yes",
+%% docstring = "Defines macros that make apalike work with plain TeX",
+%% }
+% apalike.tex, version 0.99a, for btxmac 0.99f, BibTeX 0.99c, TeX 3.0 or later.
+% Copyright (C) 1990; all rights reserved.
+% You may copy this file provided: that it's accompanied by btxmac.tex;
+% and that either you make absolutely no changes to your copy, or if you
+% do make changes, (1) you name the file something other than
+% `apalike.tex' and you remove all occurrences of `apalike.tex' from the
+% file, (2) you put, somewhere in the first twenty lines of the file,
+% your name, along with an electronic address at which others who might
+% use the file may reach you, and (3) you remove each occurrence of
+% Oren's name and electronic address from this file. These restrictions
+% help ensure that all standard versions of these macros are identical,
+% and that Oren doesn't get deluged with inappropriate e-mail.
+%
+% This file, apalike.tex, contains TeX macros that let you use the
+% apalike bibliography style with plain TeX. In essence, this file
+% provides the Tex counterpart to apalike.sty, the LaTeX style file
+% required for using the apalike bibliography style. Please report any
+% bugs (outright goofs, misfeatures, or unclear documentation) to Oren
+% Patashnik (opbibtex@neon.stanford.edu). These macros will become
+% frozen shortly after BibTeX version 1.00 is released.
+%
+% Editorial note (i.e., flame):
+% Many journals require a style like `apalike', but I strongly, strongly,
+% strongly recommend that you not use it if you have a choice---use
+% something like `plain' instead. Mary-Claire van Leunen (A Handbook for
+% Scholars, Knopf, 1979) argues convincingly that a style like `plain'
+% encourages better writing than one like `apalike'. Furthermore the best
+% argument for using an author-date style like `apalike'---that it's "the
+% most practical" (The Chicago Manual of Style, University of Chicago
+% Press, thirteenth edition, 1982, pages 400--401)---falls flat on its
+% face with the new computer-typesetting technology. For instance page 401
+% of the Chicago Manual anachronistically states "The chief disadvantage of
+% [a style like `plain'] is that additions or deletions cannot be made
+% after the manuscript is typed without changing numbers in both text
+% references and list." With LaTeX the disadvantage obviously evaporates.
+% Moreover, apalike indulges in what I think is an execrable practice:
+% automatically abbreviating first names. It's true that there aren't very
+% many D. E. Knuth's around, so abbreviating his first name doesn't cause
+% much confusion. But I've personally known three D. E. Smith's, two of
+% whom have published in the same field; abbreviating their first names
+% *is* confusing. Especially with all the citation indexes nowadays, it's
+% better to give first names exactly as they appear in the source being
+% cited. Automatically abbreviating first names is simply bad scholarship.
+% (End of flame.)
+%
+% To use these macros you need the btxmac macros, whose purpose is to
+% let you use BibTeX with plain TeX (rather than with LaTeX); the file
+% btxmac.tex explains those macros in detail. You simply \input apalike
+% right after you \input btxmac to invoke these macros.
+%
+%
+% HISTORY
+%
+% Oren Patashnik wrote the original version of these macros in December
+% 1990, for use with btxmac.tex.
+%
+% 12-Dec-90 Version 0.99a, first general release.
+%
+%
+% Here, finally (I swear, I thought he was never gonna stop), are the
+% macros. The first bunch makes the label empty and sets 2em of
+% hanging indentation for each entry.
+%
+\def\biblabelprint#1{\noindent}%
+\def\biblabelcontents#1{}%
+\def\bblhook{\biblabelextrahang = 2em}%
+%
+%
+% And the last bunch formats an in-text citation: parens around the
+% entire citation; semicolons separating individual references; and a
+% comma between a reference and its note (like `page 41') if it exists.
+%
+\def\printcitestart{(}% left paren
+\def\printcitefinish{)}% right parent
+\def\printbetweencitations{; }% semicolon, space
+\def\printcitenote#1{, #1}% comma, space, note (if it exists)
diff --git a/biblio/bibtex/contrib/germbib/styles/apalike.sty b/biblio/bibtex/contrib/germbib/styles/apalike.sty
new file mode 100644
index 0000000000..fc5fefadb9
--- /dev/null
+++ b/biblio/bibtex/contrib/germbib/styles/apalike.sty
@@ -0,0 +1,30 @@
+\def\@cite#1#2{(#1\if@tempswa , #2\fi)}
+\def\@biblabel#1{}
+
+\newlength{\bibhang}
+\setlength{\bibhang}{2em}
+
+\@ifundefined{chapter}{\def\thebibliography#1{\section*{\refname\@mkboth
+ {\sl\uppercase{\refname}}{\sl\uppercase{\refname}}}\list
+ {\relax}{\setlength{\labelsep}{0em}
+ \setlength{\itemindent}{-\bibhang}
+ \setlength{\leftmargin}{\bibhang}}
+ \def\newblock{\hskip .11em plus .33em minus .07em}
+ \sloppy\clubpenalty4000\widowpenalty4000
+ \sfcode`\.=1000\relax}}%
+{\def\thebibliography#1{\chapter*{\bibname\@mkboth
+ {\sl\uppercase{\bibname}}{\sl\uppercase{\bibname}}}\list
+ {\relax}{\setlength{\labelsep}{0em}
+ \setlength{\itemindent}{-\bibhang}
+ \setlength{\leftmargin}{\bibhang}}
+ \def\newblock{\hskip .11em plus .33em minus .07em}
+ \sloppy\clubpenalty4000\widowpenalty4000
+ \sfcode`\.=1000\relax}}
+
+\def\@citex[#1]#2{\if@filesw\immediate\write\@auxout{\string\citation{#2}}\fi
+ \def\@citea{}\@cite{\@for\@citeb:=#2\do
+ {\@citea\def\@citea{; }\@ifundefined
+ {b@\@citeb}{{\bf ?}\@warning
+ {Citation `\@citeb' on page \thepage \space undefined}}%
+{\csname b@\@citeb\endcsname}}}{#1}}
+
diff --git a/biblio/bibtex/contrib/germbib/styles/bibgerm.sty b/biblio/bibtex/contrib/germbib/styles/bibgerm.sty
new file mode 100644
index 0000000000..0087cc2fde
--- /dev/null
+++ b/biblio/bibtex/contrib/germbib/styles/bibgerm.sty
@@ -0,0 +1,312 @@
+
+%% \ifx\germanTeX\undefined\input german.tex\fi % MW 20.04.1993 changed to
+%\ifx\germanTeX\undefined\input german.sty\fi % AS 26.04.1995 changed to
+\newif\ifoldstyle
+\ifx\documentclass\undefined % plain TeX or LaTeX 2.09
+ \oldstyletrue\else\oldstylefalse\fi
+\ifoldstyle % plain TeX or LaTeX 2.09
+ \ifx\germanTeX\undefined
+ \ifx\ngermanTeX\undefined % AS 09.08.2000
+ \input german.sty\fi\fi
+\else % LaTeX 2e
+ \NeedsTeXFormat{LaTeX2e}
+ \ProvidesPackage{bibgerm}[2000/08/18 v0.1 %
+ Support for mixed language bibliographies]
+ \AtBeginDocument{% HH 08.08.2000
+ \@ifpackageloaded{babel}{}{%
+ \@ifpackageloaded{german}{}{%
+ \@ifpackageloaded{ngerman}{}{%
+ \RequirePackage{german}[1995/01/20]}}}}
+\fi
+
+\message{** Macros for german `BibTeX'ing added to Style Option `german' %
+ 20 Apr 1993 **}
+\message{** idea and languages `german' and `USenglish' implemented %
+ by M. Wallmeier **}
+\message{** Modified for LaTeX 2e and german.sty 2.5b %
+ by A. Scherer 1 Nov 1995 **}
+\message{** Modified for ngerman.sty and babel.sty %
+ by H. Harders 21 August 2000 **}
+
+
+\gdef\bibsgerman{% \btx... -> im Satz verwendet bzw. klein geschrieben
+\def\btxetalshort##1{et~al##1{}}%
+\def\btxetallong##1{et~alii}%
+\def\btxandshort##1{und}%
+\def\btxandlong##1{und}%
+\def\btxinlong##1{in:}%
+\def\btxinshort##1{in:}%
+\def\btxofseriesshort##1{d.\ Reihe}%
+\def\btxinseriesshort##1{in}%
+\def\btxofserieslong##1{der Reihe}%
+\def\btxinserieslong##1{in}%
+\def\btxeditorshort##1{Hrsg##1{}}%
+\def\btxeditorlong##1{Herausgeber}%
+\def\btxeditorsshort##1{Hrsg##1{}}%
+\def\btxeditorslong##1{Herausgeber}%
+\def\btxvolumeshort##1{Bd##1{}}%
+\def\btxvolumelong##1{Band}%
+\def\btxnumbershort##1{Nr##1{}}%
+\def\btxnumberlong##1{Nummer}%
+\def\btxeditionshort##1{Aufl##1{}}%
+\def\btxeditionlong##1{Au\discretionary{f-}{l}{f\null l}age}%
+\def\btxchaptershort##1{Kap##1{}}%
+\def\btxchapterlong##1{Kapitel}%
+\def\btxpageshort##1{S##1{}}%
+\def\btxpagelong##1{Seite}%
+\def\btxpagesshort##1{S##1{}}%
+\def\btxpageslong##1{Seiten}%
+\def\btxmastthesis##1{Diplomarbeit}%
+\def\btxphdthesis##1{Doktorarbeit}%
+\def\btxtechrepshort##1{Techn.\ Ber##1{}}%
+\def\btxtechreplong##1{Technischer Bericht}%
+\def\btxmonjanlong##1{Januar}%
+\def\btxmonfeblong##1{Februar}%
+\def\btxmonmarlong##1{M{{\"a}}rz}%
+\def\btxmonaprlong##1{April}%
+\def\btxmonmaylong##1{Mai}%
+\def\btxmonjunlong##1{Juni}%
+\def\btxmonjullong##1{Juli}%
+\def\btxmonauglong##1{August}%
+\def\btxmonseplong##1{September}%
+\def\btxmonoctlong##1{Oktober}%
+\def\btxmonnovlong##1{November}%
+\def\btxmondeclong##1{Dezember}%
+\def\btxmonjanshort##1{Jan##1{}}%
+\def\btxmonfebshort##1{Feb##1{}}%
+\def\btxmonmarshort##1{M{{\"a}}rz}%
+\def\btxmonaprshort##1{Apr##1{}}%
+\def\btxmonmayshort##1{Mai}%
+\def\btxmonjunshort##1{Juni}%
+\def\btxmonjulshort##1{Juli}%
+\def\btxmonaugshort##1{Aug##1{}}%
+\def\btxmonsepshort##1{Sep##1{}}%
+\def\btxmonoctshort##1{Okt##1{}}%
+\def\btxmonnovshort##1{Nov##1{}}%
+\def\btxmondecshort##1{Dez##1{}}%
+% \Btx... -> Satzanfang bzw. gro{\ss} geschrieben.
+\def\Btxinlong##1{In:}%
+\def\Btxinshort##1{In:}%
+\def\Btxeditorshort##1{\btxeditorshort##1{}}%
+\def\Btxeditorlong{\btxeditorlong}%
+\def\Btxeditorsshort##1{\btxeditorsshort##1{}}%
+\def\Btxeditorslong{\btxeditorslong}%
+\def\Btxvolumeshort##1{\btxvolumeshort##1{}}%
+\def\Btxvolumelong{\btxvolumelong}%
+\def\Btxnumbershort##1{\btxnumbershort##1{}}%
+\def\Btxnumberlong{\btxnumberlong}%
+\def\Btxeditionshort##1{\btxeditionshort##1{}}%
+\def\Btxeditionlong{\btxeditionlong}%
+\def\Btxchaptershort##1{\btxchaptershort##1{}}%
+\def\Btxchapterlong{\btxchapterlong}%
+\def\Btxpageshort##1{\btxpageshort##1{}}%
+\def\Btxpagelong{\btxpagelong}%
+\def\Btxpagesshort##1{\btxpagesshort##1{}}%
+\def\Btxpageslong{\btxpageslong}%
+\def\Btxtechrepshort##1{\btxtechrepshort##1{}}%
+\def\Btxtechreplong{\btxtechreplong}%
+}
+\gdef\bibsaustrian{%
+ \bibsgerman%
+ \def\btxmonjanlong##1{J{\"a}nner}%
+}
+\gdef\bibsngerman{\bibsgerman}
+\gdef\bibsnaustrian{\bibsaustrian}
+%
+\gdef\bibsUSenglish{% \btx... -> im Satz verwendet bzw. klein geschrieben
+\def\btxetalshort##1{et~al##1{}}%
+\def\btxetallong##1{et~alii}%
+\def\btxandshort##1{and}%
+\def\btxandlong##1{and}%
+\def\btxinlong##1{in}%
+\def\btxinshort##1{in}%
+\def\btxofseriesshort##1{of}%
+\def\btxinseriesshort##1{in}%
+\def\btxofserieslong##1{of}%
+\def\btxinserieslong##1{in}%
+\def\btxeditorshort##1{ed##1{}}%
+\def\btxeditorlong##1{editor}%
+\def\btxeditorsshort##1{eds##1{}}%
+\def\btxeditorslong##1{editors}%
+\def\btxvolumeshort##1{vol##1{}}%
+\def\btxvolumelong##1{volume}%
+\def\btxnumbershort##1{no##1{}}%
+\def\btxnumberlong##1{number}%
+\def\btxeditionshort##1{ed##1{}}%
+\def\btxeditionlong##1{edition}%
+\def\btxchaptershort##1{chap##1{}}%
+\def\btxchapterlong##1{chapter}%
+\def\btxpageshort##1{p##1{}}%
+\def\btxpagelong##1{page}%
+\def\btxpagesshort##1{pp##1{}}%
+\def\btxpageslong##1{pages}%
+\def\btxmastthesis##1{Master's thesis}%
+\def\btxphdthesis##1{PhD thesis}%
+\def\btxtechrepshort##1{Techn.\ rep##1{}}%
+\def\btxtechreplong##1{Technical report}%
+\def\btxmonjanlong##1{January}%
+\def\btxmonfeblong##1{February}%
+\def\btxmonmarlong##1{March}%
+\def\btxmonaprlong##1{April}%
+\def\btxmonmaylong##1{May}%
+\def\btxmonjunlong##1{June}%
+\def\btxmonjullong##1{July}%
+\def\btxmonauglong##1{August}%
+\def\btxmonseplong##1{September}%
+\def\btxmonoctlong##1{October}%
+\def\btxmonnovlong##1{November}%
+\def\btxmondeclong##1{December}%
+\def\btxmonjanshort##1{Jan##1{}}%
+\def\btxmonfebshort##1{Feb##1{}}%
+\def\btxmonmarshort##1{Mar##1{}}%
+\def\btxmonaprshort##1{Apr##1{}}%
+\def\btxmonmayshort##1{May}%
+\def\btxmonjunshort##1{June}%
+\def\btxmonjulshort##1{July}%
+\def\btxmonaugshort##1{Aug##1{}}%
+\def\btxmonsepshort##1{Sept##1{}}%
+\def\btxmonoctshort##1{Oct##1{}}%
+\def\btxmonnovshort##1{Nov##1{}}%
+\def\btxmondecshort##1{Dec##1{}}%
+% \Btx... -> Satzanfang bzw. gro{\ss} geschrieben.
+\def\Btxinlong##1{In}%
+\def\Btxinshort##1{In}%
+\def\Btxeditorshort##1{Ed##1{}}%
+\def\Btxeditorlong##1{Editor}%
+\def\Btxeditorsshort##1{Eds##1{}}%
+\def\Btxeditorslong##1{Editors}%
+\def\Btxvolumeshort##1{Vol##1{}}%
+\def\Btxvolumelong##1{Volume}%
+\def\Btxnumbershort##1{No##1{}}%
+\def\Btxnumberlong##1{Number}%
+\def\Btxeditionshort##1{Ed##1{}}%
+\def\Btxeditionlong##1{Edition}%
+\def\Btxchaptershort##1{Chap##1{}}%
+\def\Btxchapterlong##1{Chapter}%
+\def\Btxpageshort##1{P##1{}}%
+\def\Btxpagelong##1{Page}%
+\def\Btxpagesshort##1{Pp##1{}}%
+\def\Btxpageslong##1{Pages}%
+\def\Btxtechrepshort##1{Techn.\ Rep##1{}}%
+\def\Btxtechreplong##1{Technical Report}%
+}
+\gdef\bibsenglish{%
+ \bibsUSenglish%
+%perhaps there is something different for the
+%\btx...thesis commands: I'm german -> thus I don't know so exactly!
+}
+\gdef\bibsamerican{\bibsUSenglish}
+
+% MW 20.04.1993 changed to \gdef\p@selectlanguage for german.sty v2.4
+% AS 26.04.1995 changed for german.sty v2.5b
+
+\newif\ifgermbibgerman
+
+\ifoldstyle % plain TeX or LaTeX 2.09
+ \ifx\undefined\p@selectlanguage% wenn german.sty 2.3d,e
+ \gdef\selectlanguage#1{%
+ \expandafter\ifcase #1\relax
+ \dateUSenglish \captionsenglish \bibsUSenglish \or
+ \dategerman \captionsgerman \bibsgerman \or
+ \dateaustrian \captionsgerman \bibsaustrian \or
+ \datefrench \captionsfrench \or
+ \dateenglish \captionsenglish \bibsenglish \fi}
+ \else
+ \ifx\undefined\grmn@originalTeX % andernfalls, wenn german.sty 2.4a, 3.0
+ \gdef\p@selectlanguage#1{\relax \original@TeX
+ \expandafter\ifx\csname l@#1\endcsname\relax
+ \errhelp{Your command will be ignored, type <return> to proceed}%
+ \errmessage{You haven't defined the language #1 yet}%
+ \else
+ \edef\original@TeX{\csname noextras#1\endcsname
+ \let\noexpand\original@TeX\relax}%
+ \csname date#1\endcsname
+ \csname captions#1\endcsname
+ \csname extras#1\endcsname
+ \csname bibs#1\endcsname
+ \language \csname l@#1\endcsname\relax
+ \fi}
+ \else % german.sty 2.5b
+ \def\p@selectlanguage#1{\relax
+ \expandafter\ifx\csname l@#1\endcsname\relax
+ \errhelp{Your command will be ignored, type <return> to proceed}%
+ \errmessage{You haven't defined the language #1 yet}%
+ \else
+ \grmn@originalTeX
+ \edef\grmn@originalTeX{\csname noextras#1\endcsname
+ \def\noexpand\grmn@originalTeX{}}%
+ \csname date#1\endcsname
+ \csname captions#1\endcsname
+ \csname extras#1\endcsname\relax
+ \csname bibs#1\endcsname\relax
+ \language \csname l@#1\endcsname\relax
+ \fi}
+ \fi
+ \fi
+\else % LaTeX 2e
+\AtBeginDocument{%
+\@ifpackageloaded{german}{\germbibgermantrue}{}%
+\@ifpackageloaded{ngerman}{\germbibgermantrue}{}%
+
+\ifgermbibgerman
+ \ifx\undefined\p@selectlanguage% wenn german.sty 2.3d,e
+ \typeout{^^Jbibgerm.sty: (n)german.sty 2.3d,e detected^^J}
+ \gdef\selectlanguage#1{%
+ \expandafter\ifcase #1\relax
+ \dateUSenglish \captionsenglish \bibsUSenglish \or
+ \dategerman \captionsgerman \bibsgerman \or
+ \dateaustrian \captionsgerman \bibsaustrian \or
+ \datefrench \captionsfrench \or
+ \dateenglish \captionsenglish \bibsenglish \fi}
+ \else
+ \ifx\undefined\grmn@originalTeX % andernfalls, wenn german.sty 2.4a, 3.0
+ \typeout{^^Jbibgerm.sty: (n)german.sty 2.4a, 3.0 detected^^J}
+ \gdef\p@selectlanguage#1{\relax \original@TeX
+ \expandafter\ifx\csname l@#1\endcsname\relax
+ \errhelp{Your command will be ignored, type <return> to proceed}%
+ \errmessage{You haven't defined the language #1 yet}%
+ \else
+ \edef\original@TeX{\csname noextras#1\endcsname
+ \let\noexpand\original@TeX\relax}%
+ \csname date#1\endcsname
+ \csname captions#1\endcsname
+ \csname extras#1\endcsname
+ \csname bibs#1\endcsname
+ \language \csname l@#1\endcsname\relax
+ \fi}
+ \else % german.sty 2.5b
+ \typeout{^^Jbibgerm.sty: (n)german.sty 2.5b detected^^J}
+ \def\p@selectlanguage#1{\relax
+ \expandafter\ifx\csname l@#1\endcsname\relax
+ \errhelp{Your command will be ignored, type <return> to proceed}%
+ \errmessage{You haven't defined the language #1 yet}%
+ \else
+ \grmn@originalTeX
+ \edef\grmn@originalTeX{\csname noextras#1\endcsname
+ \def\noexpand\grmn@originalTeX{}}%
+ \csname date#1\endcsname
+ \csname captions#1\endcsname
+ \csname extras#1\endcsname\relax
+ \csname bibs#1\endcsname\relax
+ \language \csname l@#1\endcsname\relax
+ \fi}
+ \fi
+ \fi
+\else % HH 08.08.2000
+ \typeout{^^Jbibgerm.sty: babel.sty detected^^J}
+ \addto{\extrasgerman}{\bibsgerman}
+ \addto{\extrasaustrian}{\bibsaustrian}
+ \addto{\extrasngerman}{\bibsgerman}
+ \addto{\extrasnaustrian}{\bibsaustrian}
+ \addto{\extrasenglish}{\bibsenglish}
+ \addto{\extrasUSenglish}{\bibsUSenglish}
+ \addto{\extrasamerican}{\bibsUSenglish}
+\fi
+}
+\fi % LaTeX 2e
+
+\AtBeginDocument{\expandafter\selectlanguage\expandafter{\languagename}}
+%\germanTeX
+%\selectlanguage{\german}
+
+\endinput
diff --git a/biblio/bibtex/contrib/germbib/styles/german.MISSING b/biblio/bibtex/contrib/germbib/styles/german.MISSING
new file mode 120000
index 0000000000..5341c94c12
--- /dev/null
+++ b/biblio/bibtex/contrib/germbib/styles/german.MISSING
@@ -0,0 +1 @@
+../../../../../language/german/german.MISSING \ No newline at end of file
diff --git a/biblio/bibtex/contrib/germbib/styles/mynormal.sty b/biblio/bibtex/contrib/germbib/styles/mynormal.sty
new file mode 100644
index 0000000000..12955026f5
--- /dev/null
+++ b/biblio/bibtex/contrib/germbib/styles/mynormal.sty
@@ -0,0 +1,101 @@
+\adjdemerits=1000 % penalty for visually incompatible lines (one with maximum space second with miminum space between words)
+\brokenpenalty=100 % additional penalty for breaking a page after a hyphenation
+\clubpenalty=100 % penalty for breaking a page after the first line of a paragraph
+\displaywidowpenalty=50 % penalty for breaking a page before the last line above a display formula
+\doublehyphendemerits=50 % penalty if two consecutive lines end with a hyphen
+\exhyphenpenalty=10 % as last but breaking at an explicit hyphen (z. B. 'in-output')
+\finalhyphendemerits=50 % penalty if the penultimate line of a paragraph ends with a hyphen
+\floatingpenalty=8000 % penalty added to \insertpenalty when an insertion (e.g. footnotes) is split
+\hyphenpenalty=10 % penalty for a normal hyphenation
+\interdisplaylinepenalty=100 % penalty for breaking a formula set with \displaylines
+\interfootnotelinepenalty=100 % penalty for breaking a page in a footnote
+\interlinepenalty=10 % penalty for breaking a page between lines of a paragraph
+\linepenalty=10 % penalty for each line
+\looseness=0 % stetch a ideally set paragraph by \looseness-lines
+\predisplaypenalty=100 % penalty placed in a vertical list above a display
+\pretolerance=500 % tolerance value for a paragraph without hyphenation
+\postdisplaypenalty=0 % penalty placed in a vertical list below a display
+\relpenalty=500 % penalty for breaking after a binary relation
+\tolerance=2000 % tolerance value for a paragraph with hyphenation
+\widowpenalty=150 % penalty for breaking a page before the last line of a paragraph
+\ifx \lefthyphenmin\undefined \else
+ \lefthyphenmin=2
+ \righthyphenmin=3
+ \errorcontextlines=1
+ \emergencystretch=2em % assumed extra stretchability in lines of a paragraph (TeX3 only)
+\fi
+\hoffset=-1.0in
+\textwidth6.4in
+\oddsidemargin0.8in
+\evensidemargin0.8in
+\marginparwidth0.6in
+\marginparsep0.2in
+\marginparpush1ex
+\topmargin0pt
+\headheight3.5ex
+\headsep3ex
+\textheight9.25in
+\columnsep10pt
+\columnseprule0pt
+\parindent0pt
+\parskip2.5ex plus1.5ex minus1.5ex
+%mehr Platz fr Bilder und Tabellen
+\setcounter{topnumber}{2}
+\def\topfraction{.8}
+\setcounter{bottomnumber}{2}
+\def\bottomfraction{.8}
+\setcounter{totalnumber}{4}
+\def\textfraction{0.19}
+\def\floatpagefraction{.8}
+\setcounter{dbltopnumber}{2}
+\def\dbltopfraction{.9}
+\def\dblfloatpagefraction{.9}
+\long\def\@makecaption#1#2{
+% \vskip 10pt
+ \vskip 2pt
+ \setbox\@tempboxa\hbox{#1: #2}
+ \ifdim \wd\@tempboxa >\hsize #1: #2\par \else \hbox
+to\hsize{\hfil\box\@tempboxa\hfil}
+ \fi}
+\renewcommand{\arraystretch}{1.2}
+\renewcommand{\baselinestretch}{1.1}
+\newlength{\mylena}
+\newlength{\mylenb}
+\newlength{\mylenc}
+\newlength{\mylend}
+\newlength{\mylene}
+\frenchspacing
+%unterstrichene Seitenberschriften
+\mark{{}{}}
+
+\if@twoside
+ \def\ps@headings{
+ \let\@mkboth\markboth
+ \def\@oddfoot{}\def\@evenfoot{}
+ \def\@evenhead{\vbox{\hbox to \textwidth{\rm \thepage\hfil \sl
+ \leftmark}\vspace{2pt}\hbox to \textwidth{\hrulefill}}}
+ \def\@oddhead{\vbox{\hbox to \textwidth{\hbox{}\sl \rightmark
+ \hfil\rm\thepage}\vspace{2pt}\hbox to \textwidth{\hrulefill}}}
+ \def\sectionmark##1{\markboth {\uppercase{\ifnum \c@secnumdepth>\z@
+ \thesection\hskip 1em\relax \fi ##1}}{}}
+ \def\subsectionmark##1{\markright{\ifnum \c@secnumdepth >\@ne
+ \thesubsection\hskip 1em\relax \fi ##1}}}
+\else
+ \def\ps@headings{\let\@mkboth\markboth
+ \def\@oddfoot{}\def\@evenfoot{}
+ \def\@oddhead{\vbox{\hbox to \textwidth{\hbox {}\sl \rightmark \hfil
+ \rm\thepage}\vspace{2pt}\hbox to \textwidth{\hrulefill}}}
+ \def\sectionmark##1{\markright {\uppercase{\ifnum \c@secnumdepth>\z@
+ \thesection\hskip 1em\relax \fi ##1}}}}
+\fi
+\def\ps@myheadings{\let\@mkboth\@gobbletwo
+ \def\@oddfoot{}\def\@evenfoot{}
+ \def\@oddhead{\vbox{\hbox to \textwidth{\hbox{}\sl\rightmark \hfil
+ \rm\thepage}\vspace{2pt}\hbox to \textwidth{\hrulefill}}}
+ \def\@evenhead{\vbox{\hbox to \textwidth{\rm \thepage\hfil
+ \sl\leftmark\hbox{}}\vspace{2pt}\hbox to \textwidth{\hrulefill}}}
+ \def\sectionmark##1{}\def\subsectionmark##1{}}
+\def\footnoterule{\vfill\kern-3\p@ \hrule width \textwidth
+ \kern 2.6\p@}
+\pagestyle{headings}
+
diff --git a/biblio/bibtex/contrib/germbib/test/gerxampl.bib b/biblio/bibtex/contrib/germbib/test/gerxampl.bib
new file mode 100644
index 0000000000..8ef6df3ecc
--- /dev/null
+++ b/biblio/bibtex/contrib/germbib/test/gerxampl.bib
@@ -0,0 +1,359 @@
+@preamble{ "\newcommand{\noopsort}[1]{} "
+ # "\newcommand{\printfirst}[2]{#1} "
+ # "\newcommand{\singleletter}[1]{#1} "
+ # "\newcommand{\switchargs}[2]{#2#1} " }
+
+@ARTICLE{article-minimal,
+ author = {Leslie Andrew Aamport},
+ title = {Das System f{\"u}r die Vorbereitung von Dokumentationen {\"u}ber Gnats und Gnus},
+ journal = {Die Haustier-Zeitschrift},
+ year = 1986,
+ language = "german"
+}
+
+@ARTICLE{article-full,
+ author = {Leslie Andrew Aamport},
+ title = {Das System f{\"u}r die Vorbereitung von Dokumentationen {\"u}ber Gnats und Gnus},
+ journal = {Die Haustier-Zeitschrift},
+ year = 1986,
+ volume = 41,
+ number = 7,
+ pages = "73\,ff.",
+ month = jul,
+ note = "Dies ist ein vollst{\"a}ndiger ARTICLE-Eintrag",
+}
+
+The KEY field is here to override the KEY field in the journal being
+cross referenced (so is the NOTE field, in addition to its imparting
+information).
+
+@ARTICLE{article-crossref,
+ crossref = {WHOLE-JOURNAL},
+ key = "",
+ author = {Leslie Andrew Aamport},
+ title = {Das System f{\"u}r die Vorbereitung von Dokumentationen {\"u}ber Gnats und Gnus},
+ pages = "73\,ff.",
+ note = "Dies ist ein querverweisender ARTICLE-Eintrag",
+}
+
+@ARTICLE{whole-journal,
+ key = "GAJ",
+ journal = {Die Haustier-Zeitschrift},
+ year = 1986,
+ volume = 41,
+ number = 7,
+ month = jul,
+ note = {Dieses ganze Exemplar ist den Gnats und Gnus gewidmet
+ (dieser Eintrag ist ein ARTICLE (journal), auf den Verwiesen wurde)},
+}
+
+@INBOOK{inbook-minimal,
+ author = "Donald Edward Knuth",
+ title = "Fundamentale Algorithmen",
+ publisher = "Addison-Wesley",
+ year = "{\noopsort{1973b}}1973",
+ chapter = "1.2",
+}
+
+@INBOOK{inbook-full,
+ author = "Donald Edward Knuth",
+ title = "Fundamentale Algorithmen",
+ volume = 1,
+ series = "Die Kunst der Computerprogrammierung",
+ publisher = "Addison-Wesley",
+ address = "Reading, Massachusetts",
+ edition = "Zweite",
+ month = "10.~" # jan,
+ year = "{\noopsort{1973b}}1973",
+ type = "Kapitel",
+ chapter = "1.2",
+ pages = "10--119",
+ note = "Dies ist ein vollst{\"a}ndiger INBOOK-Eintrag",
+}
+
+@INBOOK{inbook-crossref,
+ crossref = "whole-set",
+ title = "Fundamentale Algorithmen",
+ volume = 1,
+ series = "Die Kunst der Computerprogrammierung",
+ edition = "Zweite",
+ year = "{\noopsort{1973b}}1973",
+ type = "Kapitel",
+ chapter = "1.2",
+ note = "Dies ist ein querverweisender INBOOK-Eintrag",
+}
+
+@BOOK{book-minimal,
+ author = "Donald Edward Knuth",
+ title = "Seminumerische Algorithmen",
+ publisher = "Addison-Wesley",
+ year = "{\noopsort{1973c}}1981",
+}
+
+@BOOK{book-full,
+ author = "Donald Edward Knuth",
+ title = "Seminumerische Algorithmen",
+ volume = 2,
+ series = "Die Kunst der Computerprogrammierung",
+ publisher = "Addison-Wesley",
+ address = "Reading, Massachusetts",
+ edition = "Zweite",
+ month = "10.~" # jan,
+ year = "{\noopsort{1973c}}1981",
+ note = "Dies ist ein vollst{\"a}ndiger BOOK-Eintrag",
+}
+
+@BOOK{book-crossref,
+ crossref = "whole-set",
+ title = "Seminumerische Algorithmen",
+ volume = 2,
+ series = "Die Kunst der Computerprogrammierung",
+ edition = "Zweite",
+ year = "{\noopsort{1973c}}1981",
+ note = "Dies ist ein querverweisender BOOK-Eintrag",
+}
+
+@BOOK{whole-set,
+ author = "Donald Edward Knuth",
+ publisher = "Addison-Wesley",
+ title = "Die Kunst der Computerprogrammierung",
+ series = "Vier B{\"a}nde",
+ year = "{\noopsort{1973a}}{\switchargs{--90}{1968}}",
+ note = "Sieben B{\"a}nde geplant (dies ist eine Reihe von BOOK(s), auf die verwiesen wird)",
+}
+
+@BOOKLET{booklet-minimal,
+ key = "Kn{\printfirst{v}{1987}}",
+ title = "Die Programmierung von Computerkunst",
+}
+
+@BOOKLET{booklet-full,
+ author = "Jill Clown Knvth",
+ title = "Die Programmierung von Computerkunst",
+ howpublished = "Kunstverein D{\"u}sseldorf",
+ address = "D{\"u}sseldorf, Nordrheinwestfalen",
+ month = feb,
+ year = 1988,
+ note = "Dies ist ein vollst{\"a}ndiger BOOKLET-Eintrag",
+}
+
+@INCOLLECTION{incollection-minimal,
+ author = "Daniel David Lincoll",
+ title = "Semigruppen von Wiederholungen",
+ booktitle = "High Speed Computer und Algorithmus Organisation",
+ publisher = "Universit{\"a}tsdruckerei",
+ year = 1977,
+}
+
+@INCOLLECTION{incollection-full,
+ author = "Daniel David Lincoll",
+ title = "Semigruppen von Wiederholungen",
+ editor = "David Johannes Lipcoll and Dirk Herwig Lawrie and Abraham Hans Sameh",
+ booktitle = "High Speed Computer und Algorithmus Organisation",
+ number = 23,
+ series = "Schnelle Computer",
+ chapter = 3,
+ type = "Teil",
+ pages = "179--183",
+ publisher = "Universit{\"a}tsdruckerei",
+ address = "Hintertupfingen am Bodensee",
+ edition = "Dritte",
+ month = sep,
+ year = 1977,
+ note = "Dies ist ein vollst{\"a}ndiger INCOLLECTION-Eintrag",
+}
+
+@INCOLLECTION{incollection-crossref,
+ crossref = "whole-collection",
+ author = "Daniel Depp Lincoll",
+ title = "Semigruppen von Wiederholungen",
+ pages = "179--183",
+ note = "Dies ist ein querverweisender INCOLLECTION-Eintrag",
+}
+
+@BOOK{whole-collection,
+ editor = "David Johannes Lipcoll and Dirk Herwig Lawrie and Abraham Hans Sameh",
+ title = "High Speed Computer und Algorithmus Organisation",
+ booktitle = "High Speed Computer und Algorithmus Organisation",
+ number = 23,
+ series = "Schnelle Computer",
+ publisher = "Universit{\"a}tsdruckerei",
+ address = "Hintertupfingen am Bodensee",
+ edition = "Dritte",
+ month = sep,
+ year = 1977,
+ note = "Dies ist ein BOOK-Eintrag (aus einer Reihe), auf den verwiesen wurde",
+}
+
+@MANUAL{manual-minimal,
+ key = "Handbuchmacher",
+ title = "Das definitive Computer-Handbuch",
+}
+
+@MANUAL{manual-full,
+ author = "Larry Manmaker",
+ title = "Das definitive Computer-Handbuch",
+ organization = "Microchips-Revelation-Deutschland",
+ address = "Silikontal",
+ edition = "Silberpfeil",
+ month = apr # "--" # may,
+ year = 1986,
+ note = "Dies ist ein vollst{\"a}ndiger MANUAL-Eintrag",
+}
+
+@MASTERSTHESIS{mastersthesis-minimal,
+ author = "{\'{E}}douard Masterly",
+ title = "Wie schreibe ich eine Diplomarbeit?",
+ school = "Universit{\"a}t W{\"u}rzfestung",
+ year = 1988,
+}
+
+@MASTERSTHESIS{mastersthesis-full,
+ author = "{\'{E}}douard Masterly",
+ title = "Wie schreibe ich eine Diplomarbeit?",
+ school = "Universit{\"a}t W{\"u}rzfestung",
+ type = "Projekt {\"u}ber Diplom- und Magisterarbeiten",
+ address = "Abteilung f{\"u}r Germanistik",
+ month = jun # "--" # aug,
+ year = 1988,
+ note = "Dies ist ein vollst{\"a}ndiger MASTERSTHESIS-Eintrag",
+}
+
+@MISC{misc-minimal,
+ key = "Vermixtes",
+ note = "Dies ist ein minimaler MISC-Eintrag",
+}
+
+@MISC{misc-full,
+ author = "Joe-Bob Missilany",
+ title = "Zuf{\"a}llige Verteilung von Pamphleten an Flugh{\"a}fen",
+ howpublished = "Ausgegeben in Frankfurt am Main",
+ month = oct,
+ year = 1984,
+ note = "Dies ist ein vollst{\"a}ndiger MISC-Eintrag",
+}
+
+@STRING{STOC-key = "OX{\singleletter{stoc}}"}
+
+@STRING{ACM = "OX-Vereinigung f{\"u}r Computing-Maschinerie"}
+
+@STRING{STOC = ": Symposium {\"u}ber die Theorie des Computing"}
+
+@INPROCEEDINGS{inproceedings-minimal,
+ author = "Alfred Veit Oaho and Jeffrey Dieter Ullman and Mihalis Yannakakis",
+ title = "Vorstellungen {\"u}ber die Informations{\"u}bertragung in {VLSI}-Schaltkreisen",
+ booktitle = "Konferenz zum f{\"u}nften Jahrestag der " # ACM # STOC,
+ year = 1983,
+}
+
+@INPROCEEDINGS{inproceedings-full,
+ author = "Alfred Veit Oaho and Jeffrey Dieter Ullman and Mihalis Yannakakis",
+ title = "Vorstellungen {\"u}ber die Informations{\"u}bertragung in {VLSI}-Schaltkreisen",
+ booktitle = "Konferenz zum f{\"u}nften Jahrestag der " # ACM # STOC,
+ editor = "Wizard Veit Oz and Mihalis Yannakakis",
+ number = 17,
+ series = "Alle Konferenzen der " # ACM,
+ pages = "133--139",
+ month = mar,
+ year = 1983,
+ address = "M{\"u}nchen",
+ organization = ACM,
+ publisher = "Universit{\"a}tsdruckerei",
+ note = "Dies ist ein vollst{\"a}ndiger INPROCEDINGS-Eintrag",
+}
+
+@INPROCEEDINGS{inproceedings-crossref,
+ crossref = "whole-proceedings",
+ author = "Alfred Veit Oaho and Jeffrey Dieter Ullman and Mihalis Yannakakis",
+ title = "Vorstellungen {\"u}ber die Informations{\"u}bertragung in {VLSI}-Schaltkreisen",
+ organization = "",
+ pages = "133--139",
+ note = "Dies ist ein querverweisender INPROCEEDINGS-Eintrag",
+}
+
+@PROCEEDINGS{proceedings-minimal,
+ key = STOC-key,
+ title = "Konferenz zum f{\"u}nften Jahrestag der " # ACM # STOC,
+ year = 1983,
+}
+
+@PROCEEDINGS{proceedings-full,
+ editor = "Wizard Veit Oz and Mihalis Yannakakis",
+ title = "Proc. Fifteenth Annual" # STOC,
+ number = 17,
+ series = "Alle Konferenzen der " # ACM,
+ month = mar,
+ year = 1983,
+ address = "M{\"u}nchen",
+ organization = ACM,
+ publisher = "Universit{\"a}tsdruckerei",
+ note = "Dies ist ein vollst{\"a}ndiger PROCEEDINGS-Eintrag",
+}
+
+@PROCEEDINGS{whole-proceedings,
+ key = STOC-key,
+ organization = ACM,
+ title = "Konferenz zum f{\"u}nften Jahrestag" # STOC,
+ address = "M{\"u}nchen",
+ year = 1983,
+ booktitle = "Konferenz zum f{\"u}nften Jahrestag der " # ACM # STOC,
+ note = "This is a cross-referenced PROCEEDINGS",
+}
+
+@PHDTHESIS{phdthesis-minimal,
+ author = "Friedrich Phidias Phony-Baloney",
+ title = "Feuer mit Feuer bek{\"a}mpfen: Gewandte Franz{\"o}sische Redewendungen",
+ school = "Fanstord Universit{\"a}t",
+ year = 1988,
+}
+
+@PHDTHESIS{phdthesis-full,
+ author = "Friedrich Phidias Phony-Baloney",
+ title = "Feuer mit Feuer bek{\"a}mpfen: Gewandte Franz{\"o}sische Redewendungen",
+ school = "Universit{\"a}t W{\"u}rzburg",
+ type = "Dissertation",
+ address = "Abteilung f{\"u}r Franz{\"o}sisch",
+ month = jun # "--" # aug,
+ year = 1988,
+ note = "Dies ist ein vollst{\"a}ndiger PHDTHESIS-Eintrag",
+}
+
+@TECHREPORT{techreport-minimal,
+ author = "Tom von Schrecklich",
+ title = "An {$O(n \log n / \! \log\log n)$} Sortier Algorithmus",
+ institution = "Universit{\"a}t W{\"u}rzburg",
+ year = 1988,
+}
+
+@TECHREPORT{techreport-full,
+ author = "Tom T{\'{e}}rrific",
+ title = "An {$O(n \log n / \! \log\log n)$} Sortier Algorithmus",
+ institution = "Universit{\"a}t W{\"u}rzburg",
+ type = "W{\"u}nschenswertes Untersuchungsergebnis",
+ number = "7",
+ address = "Abteilung f{\"u}r Computerwissenschaften, W{\"u}rzburg, Bayern",
+ month = oct,
+ year = 1988,
+ note = "Dies ist ein vollst{\"a}ndiger TECHREPORT-Eintrag",
+}
+
+@UNPUBLISHED{unpublished-minimal,
+ author = "Ulrich {\"{U}}nderwood and Ned {\~N}et and Paul {\={P}}ot",
+ title = "Niedrigere Grenzen f{\"u}r w{\"u}nschenswerte Untersuchungsergebnisse",
+ note = "Colloquium an der Universit{\"a}t W{\"u}rzburg (dies ist ein minimaler UNPUBLISHED-Eintrag)",
+}
+
+@UNPUBLISHED{unpublished-full,
+ author = "Ulrich {\"{U}}nderwood and Ned {\~N}et and Paul {\={P}}ot",
+ title = "Niedrigere Grenzen f{\"u}r w{\"u}nschenswerte Untersuchungsergebnisse",
+ month = nov # ", " # dec,
+ year = 1988,
+ note = "Colloquium an der Universit{\"a}t W{\"u}rzburg (dies ist ein vollst{\"a}ndiger UNPUBLISHED-Eintrag)",
+}
+
+@MISC{random-note-crossref,
+ key = {Volume-2},
+ note = "Band~2 ist unter Knuth \cite{book-full} aufgef{\"u}hrt"
+}
+
+
diff --git a/biblio/bibtex/contrib/germbib/test/schaum.bib b/biblio/bibtex/contrib/germbib/test/schaum.bib
new file mode 100644
index 0000000000..e8676552b4
--- /dev/null
+++ b/biblio/bibtex/contrib/germbib/test/schaum.bib
@@ -0,0 +1,531 @@
+@Book{gibson1997a,
+ author = {Gibson, L. J. and Ashby, M. F.},
+ ALTeditor = {},
+ title = {{Cellular solids}},
+ publisher = {Cambridge University Press},
+ year = {1997},
+ OPTkey = {},
+ OPTvolume = {},
+ OPTnumber = {},
+ OPTseries = {},
+ OPTaddress = {},
+ edition = {second},
+ OPTmonth = {},
+ OPTnote = {},
+ OPTannote = {},
+ language = {english}
+}
+
+
+
+@Article{davies1983a,
+ author = {Davies, G. J. and Zhen, Shu},
+ title = {{Metallic foams: their production, properties and
+ applications}},
+ journal = {Mater. Sci.},
+ year = {1899},
+ OPTkey = {},
+ volume = {18},
+ OPTnumber = {},
+ pages = {1899},
+ OPTmonth = {},
+ OPTnote = {},
+ OPTannote = {},
+ language = {english}
+}
+
+
+@InProceedings{baumeister1997a,
+ author = {Baumeister, J.},
+ title = {{\"Uberblick: Verfahren zur Herstellung von Metallsch\"aumen}},
+ booktitle = {Metallsch\"aume (Beitr\"age zum Symposium Metallsch\"aume,
+ IFAM, Bremen, 06.\,--\,07.\,03.~1997)},
+ OPTcrossref = {},
+ OPTkey = {},
+ OPTpages = {3},
+ year = {1997},
+ OPTeditor = {},
+ OPTvolume = {},
+ OPTnumber = {},
+ OPTseries = {},
+ OPTaddress = {Bremen},
+ OPTmonth = {},
+ OPTorganization = {},
+ publisher = {Verlag MIT Bremen},
+ OPTnote = {},
+ OPTannote = {},
+ language = {german}
+}
+
+
+@Article{simone1998a,
+ author = {Simone, A. E. and Gibson, L. J.},
+ title = {{Aluminium foams produced by liquid-state processes}},
+ journal = {Acta mater.},
+ year = {1998},
+ OPTkey = {},
+ volume = {46},
+ OPTnumber = {},
+ pages = {3109},
+ OPTmonth = {},
+ OPTnote = {},
+ OPTannote = {},
+ language = {english}
+}
+
+
+@Article{banhart1994a,
+ author = {Banhart, J. and Baumeister, J. and Weber, M.},
+ title = {{Metallschaum -- ein Werkstoff mit Perspektiven}},
+ journal = {Aluminium},
+ year = {1994},
+ OPTkey = {},
+ volume = {70},
+ OPTnumber = {},
+ pages = {209},
+ OPTmonth = {},
+ OPTnote = {},
+ OPTannote = {},
+ language = {german}
+}
+
+@Article{banhart1997a,
+ author = {Banhart, J. and Baumeister, J. and Weber, M.},
+ title = {{Aluminium foams for transport industry}},
+ journal = {Materials \& Design},
+ year = {1997},
+ OPTkey = {},
+ volume = {18},
+ OPTnumber = {},
+ pages = {221},
+ OPTmonth = {},
+ OPTnote = {},
+ OPTannote = {},
+ language = {english}
+}
+
+
+@Misc{mepura1997a,
+ key = {MEPURA},
+ OPTauthor = {},
+ title = {{MEPURA: "`Alulight"'}},
+ howpublished = {Firmenschrift der MEPURA-Metallpulver GmbH},
+ month = {April},
+ year = {1997},
+ note = {Ranshofen, \"Osterreich},
+ OPTannote = {},
+ language = {german}
+}
+
+
+
+@Article{degischer1997a,
+ author = {Degischer, H. P.},
+ title = {{Innovative light metals: metal matrix composites and
+ foamed aluminium}},
+ journal = {Materials \& Design},
+ year = {1997},
+ OPTkey = {},
+ volume = {18},
+ OPTnumber = {},
+ pages = {221},
+ OPTmonth = {},
+ OPTnote = {},
+ OPTannote = {},
+ language = {english}
+}
+
+
+
+@Article{ashby1983a,
+ author = {Ashby, M. F.},
+ title = {{The mechanical properties of cellular solids}},
+ journal = {Met. Trans.},
+ year = {1983},
+ OPTkey = {},
+ volume = {14A},
+ OPTnumber = {},
+ pages = {1755},
+ OPTmonth = {},
+ OPTnote = {},
+ OPTannote = {},
+ language = {english}
+}
+
+
+
+
+@Article{gibson1989a,
+ author = {Gibson, L. J.},
+ title = {{Modelling the mechanical behaviour of cellular materials}},
+ journal = {Mat. Sci. Eng.},
+ year = {1989},
+ OPTkey = {},
+ volume = {A 110},
+ OPTnumber = {},
+ pages = {1},
+ OPTmonth = {},
+ OPTnote = {},
+ OPTannote = {},
+ language = {english}
+}
+
+
+@Article{weaire1994a,
+ author = {Weaire, D. and Fortes, M. A.},
+ title = {{Stress and strain in liquid and solid foams}},
+ journal = {Adv. in Physics},
+ year = {1994},
+ OPTkey = {},
+ volume = {43},
+ OPTnumber = {},
+ pages = {685},
+ OPTmonth = {},
+ OPTnote = {},
+ OPTannote = {},
+ language = {english}
+}
+
+
+
+@Article{triantafillou1989a,
+ author = {Triantafillou, T. C. and Zhang, J. and Shercliff, T. L. and
+ Gibson, L. J. and Ashby, M. F.},
+ title = {{Failure surfaces for cellular materials under multiaxial
+ loads -- II. Comparison of models with experiment}},
+ journal = {Int. J. Mech. Sci.},
+ year = {1997},
+ OPTkey = {},
+ volume = {39},
+ OPTnumber = {},
+ pages = {549},
+ OPTmonth = {},
+ OPTnote = {},
+ OPTannote = {},
+ language = {english}
+}
+
+
+
+
+@Article{silva1997a,
+ author = {Silva, M. J. and Gibson, L. J.},
+ title = {{The effect of non-periodic microstructure and defects
+ on the compressive strength of two-dimensional cellular
+ solids}},
+ journal = {Int. J. Mech. Sci.},
+ year = {1997},
+ OPTkey = {},
+ volume = {39},
+ OPTnumber = {},
+ pages = {549},
+ OPTmonth = {},
+ OPTnote = {},
+ OPTannote = {},
+ language = {english}
+}
+
+
+
+@Article{simone1998b,
+ author = {Simone, A. E. and Gibson, L. J.},
+ title = {{Effects of solid distribution on the stiffness and
+ strength of metallic foams}},
+ journal = {Acta mater.},
+ year = {1998},
+ OPTkey = {},
+ volume = {46},
+ OPTnumber = {},
+ pages = {2139},
+ OPTmonth = {},
+ OPTnote = {},
+ OPTannote = {},
+ language = {english}
+}
+
+
+
+
+@InProceedings{degischer1997b,
+ author = {Degischer, H. P. and Galovsky, U. and Gradinger, R. and
+ Kretz, R. and Simanc\'ik, F.},
+ title = {{\"Uber mechanische Eigenschaften von Aluminiumsch\"aumen}},
+ booktitle = {Metallsch\"aume (Beitr\"age zum Symposium Metallsch\"aume, IFAM,
+ Bremen, 06.\,--\,07.\,03.~1997},
+ OPTcrossref = {},
+ OPTkey = {},
+ pages = {79},
+ year = {1997},
+ editor = {J. Banhart},
+ OPTvolume = {},
+ OPTnumber = {},
+ OPTseries = {},
+ OPTaddress = {},
+ OPTmonth = {},
+ OPTorganization = {},
+ publisher = {Verlag MIT Bremen},
+ OPTnote = {},
+ OPTannote = {},
+ language = {german}
+}
+
+
+
+@Article{beals1997a,
+ author = {Beals, J. T. and Thompson, M. S.},
+ title = {{Density gradient effects on aluminium foam compression
+ behavior}},
+ journal = {J. Mater. Sci},
+ year = {1997},
+ OPTkey = {},
+ volume = {32},
+ OPTnumber = {},
+ pages = {3595},
+ OPTmonth = {},
+ OPTnote = {},
+ OPTannote = {},
+ language = {english}
+}
+
+
+
+@Article{sugimura1997a,
+ author = {Sugimura, Y. and Meyer, J. and He, M. Y. and
+ Bart-Smith, H. and Greenstedt, J. and Evans, A. G.},
+ title = {{On the mechanical performance of closed cell Al foams}},
+ journal = {Acta mater.},
+ year = {1997},
+ OPTkey = {},
+ volume = {45},
+ OPTnumber = {45},
+ pages = {5245},
+ OPTmonth = {},
+ OPTnote = {},
+ OPTannote = {},
+ language = {english}
+}
+
+
+@Article{banhart1997b,
+ author = {Banhart, J. and Baumeister, J.},
+ title = {{Das Verformungsverhalten gesch\"aumter Metalle}},
+ journal = {Metall},
+ year = {1997},
+ OPTkey = {},
+ volume = {51},
+ OPTnumber = {},
+ pages = {19},
+ OPTmonth = {},
+ note = {},
+ OPTannote = {},
+ language = {german}
+}
+
+
+
+@Article{banhart1998a,
+ author = {Banhart, J. and Baumeister, J.},
+ title = {{Deformation characteristics of metal foams}},
+ journal = {J. Mater. Sci.},
+ year = {1998},
+ OPTkey = {},
+ volume = {33},
+ OPTnumber = {},
+ pages = {1431},
+ OPTmonth = {},
+ note = {},
+ OPTannote = {},
+ language = {english}
+}
+
+
+
+@InProceedings{huschka1997a,
+ author = {Huschka, S. and Hicken, S. and Arendts, F.-J.},
+ title = {{Modellierung der Spannungs-Stauchungskurven von
+ Aluminiumschaum unter Ber\"ucksichtigung der
+ Porengr\"o\ss{}enverteilung}},
+ booktitle = {Metallsch\"aume (Beitr\"age zum Symposium Metallsch\"aume, IFAM,
+ Bremen 06.\,--\,07.\,03.~1997},
+ OPTcrossref = {},
+ OPTkey = {},
+ pages = {189},
+ year = {1997},
+ editor = {J. Banhart},
+ OPTvolume = {},
+ OPTnumber = {},
+ OPTseries = {},
+ OPTaddress = {},
+ OPTmonth = {},
+ OPTorganization = {},
+ publisher = {Verlag MIT Bremen},
+ OPTnote = {},
+ OPTannote = {},
+ language = {german}
+}
+
+
+@Article{santosa1998a,
+ author = {Santosa, S. and Wierzbicki, T.},
+ title = {{On the modeling of crush behavior of a closed-cell
+ aluminium foam structure}},
+ journal = {J. Mech. Phys. Solids},
+ year = {1998},
+ OPTkey = {},
+ volume = {46},
+ OPTnumber = {},
+ pages = {645},
+ OPTmonth = {},
+ OPTnote = {},
+ OPTannote = {},
+ language = {english}
+}
+
+
+
+@PhdThesis{huschka1998a,
+ author = {Huschka, S.},
+ title = {{Modellierung eines Materialgesetzes zur Beschreibung
+ der mechanischen Eigenschaften von Aluminiumschaum}},
+ school = {Universit\"at Stuttgart},
+ year = {1998},
+ OPTkey = {},
+ type = {Dissertation},
+ address = {VDI-Verlag. Fortschrittsberichte, Reihe 5, Nr. 525},
+ OPTmonth = {},
+ OPTnote = {},
+ OPTannote = {},
+ language = {german}
+}
+
+
+
+@Misc{dfgdaempfung2000a,
+ key = {Arbeitsbericht},
+ OPTauthor = {},
+ title = {{Arbeitsbericht zum DFG-Vorhaben Si~408/5-1 \glqq Mechanische
+ D\"ampfung metallischer Sch\"aume\grqq\ im
+ DFG"=Schwerpunktprogramm SPP~1075}},
+ OPThowpublished = {},
+ OPTmonth = {},
+ year = {2000},
+ OPTnote = {},
+ OPTannote = {},
+ language = {german}
+}
+
+@Misc{akprueftechnik2000a,
+ key = {Protokoll},
+ OPTauthor = {},
+ title = {{Protokoll des Arbeitskreistreffens \glqq Mechanische
+ Pr\"uftechnik\grqq\ und \glqq Quantitative
+ Gef\"ugebeschreibung\grqq\ am 29. und 30.\,03.~2000 an der
+ TU Bergakademie Freiberg, Institut f\"ur Metallkunde}},
+ OPThowpublished = {},
+ month = {04.\,04.},
+ year = {2000},
+ OPTnote = {},
+ OPTannote = {},
+ language = {german}
+}
+
+
+@Article{sugimura1999a,
+ author = {Sugimura, Y. and Rabiei, A. and Evans, A. G. and
+ Harte, A. M. and Fleck, N. A.},
+ title = {{Compression fatigue of a cellular Al alloy}},
+ journal = {Materials Science \&\ Engineering},
+ year = {1999},
+ OPTkey = {},
+ volume = {A269},
+ OPTnumber = {},
+ pages = {38--48},
+ OPTmonth = {},
+ OPTnote = {},
+ OPTannote = {},
+ language = {english}
+}
+
+
+@InProceedings{schultz1999a,
+ author = {Schultz, O. and Ligneris A. des and
+ Haider, O. and Starke, P.},
+ title = {{Fatigue behaviour, strength and failure of aluminium foam}},
+ booktitle = {Metal Foams and Porous Metal Structures},
+ OPTcrossref = {},
+ OPTkey = {},
+ pages = {379--386},
+ year = {1999},
+ editor = {Banhart, J. and Ashby, M. F. and Fleck, N. A.},
+ OPTvolume = {},
+ OPTnumber = {},
+ OPTseries = {},
+ OPTaddress = {},
+ OPTmonth = {},
+ OPTorganization = {},
+ publisher = {MIT Verlag},
+ OPTnote = {},
+ OPTannote = {},
+ language = {english}
+}
+
+@InProceedings{olurin1999a,
+ author = {Olurin, O. B. and Fleck, N. A. and Ashby, M. F.},
+ title = {{Fatigue of an aluminium alloy foam}},
+ booktitle = {Metal Foams and Porous Metal Structures},
+ OPTcrossref = {},
+ OPTkey = {},
+ pages = {365--371},
+ year = {1999},
+ editor = {Banhart, J. and Ashby, M. F. and Fleck, N. A.},
+ OPTvolume = {},
+ OPTnumber = {},
+ OPTseries = {},
+ OPTaddress = {},
+ OPTmonth = {},
+ OPTorganization = {},
+ publisher = {MIT Verlag},
+ OPTnote = {},
+ OPTannote = {},
+ language = {english}
+}
+
+@InProceedings{zettl1999a,
+ author = {Zettl, B. and Stanzl-Tschegg, S.},
+ title = {{Fatigue of Aluminium Foams at Ultrasonic Frequencies}},
+ booktitle = {Metal Foams and Porous Metal Structures},
+ OPTcrossref = {},
+ OPTkey = {},
+ pages = {373--378},
+ year = {1999},
+ editor = {Banhart, J. and Ashby, M. F. and Fleck, N. A.},
+ OPTvolume = {},
+ OPTnumber = {},
+ OPTseries = {},
+ OPTaddress = {},
+ OPTmonth = {},
+ OPTorganization = {},
+ publisher = {MIT Verlag},
+ OPTnote = {},
+ OPTannote = {},
+ language = {english}
+}
+
+@Article{bart-smith1998a,
+ author = {Bart-Smith, H. and Bastawros, A.-F. and Mumm, D. R. and
+ Evans, A. G. and Sypeck, D. J. and Wadley, H. N. G.},
+ title = {{Compressive Deformation and Yielding Mechanisms in
+ Cellular Al Alloys Determined Using X-Ray Tomography and
+ Surface Strain Mapping}},
+ journal = {Acta mater.},
+ year = {1998},
+ OPTkey = {},
+ volume = {46},
+ number = {10},
+ pages = {3583--3592},
+ OPTmonth = {},
+ OPTnote = {},
+ OPTannote = {},
+ language = {english}
+}
+
diff --git a/biblio/bibtex/contrib/germbib/test/testbibgerm.dvi b/biblio/bibtex/contrib/germbib/test/testbibgerm.dvi
new file mode 100644
index 0000000000..572aa87868
--- /dev/null
+++ b/biblio/bibtex/contrib/germbib/test/testbibgerm.dvi
Binary files differ
diff --git a/biblio/bibtex/contrib/germbib/test/testbibgerm.tex b/biblio/bibtex/contrib/germbib/test/testbibgerm.tex
new file mode 100644
index 0000000000..e58bcfe1cd
--- /dev/null
+++ b/biblio/bibtex/contrib/germbib/test/testbibgerm.tex
@@ -0,0 +1,21 @@
+\iffalse % true: LaTeX 2.09; false: LaTeX (2e)
+ %\documentstyle[ngerman,hhbibgerm]{article}
+ %\documentstyle[german,hhbibgerm]{article}
+ \documentstyle[bibgerm]{article}
+\else
+ \documentclass{article}
+ \listfiles
+ \usepackage{bibgerm}
+ \usepackage[english,german,ngerman]{babel}
+ %\usepackage{ngerman}
+ %\usepackage{german}
+\fi
+
+\begin{document}
+\noindent Active language: \languagename
+\nocite{mepura1997a,degischer1997b}
+\nocite{ashby1983a,banhart1997b,banhart1998a,beals1997a,
+ gibson1989a,sugimura1997a}
+\bibliographystyle{gerplain}
+\bibliography{schaum}
+\end{document}
diff --git a/biblio/bibtex/contrib/germbib/test/testgerb.tex b/biblio/bibtex/contrib/germbib/test/testgerb.tex
new file mode 100644
index 0000000000..3103c8df6c
--- /dev/null
+++ b/biblio/bibtex/contrib/germbib/test/testgerb.tex
@@ -0,0 +1,89 @@
+% macropackage lplaing
+%format latexg
+% This is for tests with `GERXAMPL.BIB' or `XAMPL.BIB'
+% and the different style-files
+\def\BibTeX{{\rm B\kern-.05em{\sc i\kern-.025em b}\kern-.08em
+ T\kern-.1667em\lower.7ex\hbox{E}\kern-.125emX}}
+
+\documentstyle[bibgerm,mynormal%
+%,apalike%
+]{article}
+%\nonfrenchspacing
+%\originalTeX
+\begin{document}
+
+Siehe \cite[Kapitel 3.4, S. 105\,ff.]{article-full}.
+
+
+Aaamport schreibt in \cite[S. 77--78]{article-minimal} wie sich
+die Gnats mit den Gnus vertragen.
+
+
+Ein Artikel in \cite{article-crossref}.
+
+Bcher, Bcher, Bcher \cite{book-crossref}.
+
+
+Ein volles Buch kann schwer sein, ein vielbndiges Werk wie die Reihe
+\cite{book-full} erst recht.
+
+Etwas fr Leseratten zum Thema \TeX\ findet sich in \cite{book-minimal}.
+
+Fr weniger Leseinteressierte ein kleines Buch \cite{booklet-full}.
+
+Booklet heien solche Dinger auf "`USenglish"' \cite{booklet-minimal}.
+
+Ein Kapitel aus einem Buch ist in \cite{inbook-crossref} angegeben,
+dasselbe Kapitel noch einmal unter \cite{inbook-full}. Der nchste
+Eintrag ist glaube ich ein neuer \cite{inbook-minimal} --- oder auch nicht.
+
+Einzelne Bnde einer Reihe wie \cite{incollection-crossref} knnen so oder
+auch anders wie hier \cite{incollection-full} zitiert werden. Auch die
+folgende Variante kann ich ihnen anbieten \cite{incollection-minimal}.
+
+Konferenzen, Konferenzen \cite{inproceedings-crossref}. Und wenn auf der
+Konferenz etwas verffentlicht wurde wie \cite{inproceedings-full} dann kann
+man es unter \cite{inproceedings-minimal} nachlesen.
+
+Hnadbcher gibts auch \cite{manual-full}. Auch wenn \cite{manual-minimal} ein
+bldes Beispiel dafr ist.
+
+Dieser Text und diese \cite{mastersthesis-full} Diplomarbeit sind wohl
+ebensowenig wie die folgende \cite{mastersthesis-minimal} ganz ernst zu
+nehmen.
+
+Vermixtes will heien \cite{misc-full}. Gemischtes \cite{misc-minimal} ist
+fr alles gut.
+
+Anspruschsvolelr ist da schon \cite{phdthesis-full}, eine Doktorarbeit, mit der
+sich auch \cite{phdthesis-minimal} beschftigt.
+
+Schon wieder Konferenzen \cite{proceedings-full} ber Konferenzen \cite{proceedings-minimal}.
+
+
+Diese ist ein Band mit einem zuflligen Querverweis \cite{random-note-crossref} --- oder so.
+
+Heit es nun "`Technischer Bericht"' \cite{techreport-full} oder sind einfach
+Bedienungsanleitungen damit gemeint \cite{techreport-minimal}.
+
+Selbst Sachen, die noch nicht publiziert sind \cite{unpublished-full} kann man
+so \cite{unpublished-minimal} zitieren.
+
+Ein Beispiel fr eine Gesamtausgabe \cite{whole-collection}.
+
+Ein Beispiel fr eine Zeitschrift \cite{whole-journal}.
+
+Und noch mehr vollstndiges: Konferenzen \cite{whole-proceedings} und
+ein "`Set"' \cite{whole-set}.
+
+\nocite{*}
+
+\bibliography{gerxampl}
+\bibliographystyle{gerabbrv}
+%\bibliographystyle{gerplain}
+%\bibliographystyle{gerunsrt}
+%\bibliographystyle{geralpha}
+%%\bibliographystyle{gerapali}
+
+
+\end{document}
diff --git a/biblio/bibtex/contrib/germbib/test/xampl.bib b/biblio/bibtex/contrib/germbib/test/xampl.bib
new file mode 100644
index 0000000000..7121774497
--- /dev/null
+++ b/biblio/bibtex/contrib/germbib/test/xampl.bib
@@ -0,0 +1,359 @@
+@preamble{ "\newcommand{\noopsort}[1]{} "
+ # "\newcommand{\printfirst}[2]{#1} "
+ # "\newcommand{\singleletter}[1]{#1} "
+ # "\newcommand{\switchargs}[2]{#2#1} " }
+
+@ARTICLE{article-minimal,
+ author = {L[eslie] A. Aamport},
+ title = {The Gnats and Gnus Document Preparation System},
+ journal = {\mbox{G-Animal's} Journal},
+ year = 1986,
+ language = "english"
+}
+
+@ARTICLE{article-full,
+ author = {L[eslie] A. Aamport},
+ title = {The Gnats and Gnus Document Preparation System},
+ journal = {\mbox{G-Animal's} Journal},
+ year = 1986,
+ volume = 41,
+ number = 7,
+ pages = "73+",
+ month = jul,
+ note = "This is a full ARTICLE entry",
+}
+
+The KEY field is here to override the KEY field in the journal being
+cross referenced (so is the NOTE field, in addition to its imparting
+information).
+
+@ARTICLE{article-crossref,
+ crossref = {WHOLE-JOURNAL},
+ key = "",
+ author = {L[eslie] A. Aamport},
+ title = {The Gnats and Gnus Document Preparation System},
+ pages = "73+",
+ note = "This is a cross-referencing ARTICLE entry",
+}
+
+@ARTICLE{whole-journal,
+ key = "GAJ",
+ journal = {\mbox{G-Animal's} Journal},
+ year = 1986,
+ volume = 41,
+ number = 7,
+ month = jul,
+ note = {The entire issue is devoted to gnats and gnus
+ (this entry is a cross-referenced ARTICLE (journal))},
+}
+
+@INBOOK{inbook-minimal,
+ author = "Donald E. Knuth",
+ title = "Fundamental Algorithms",
+ publisher = "Addison-Wesley",
+ year = "{\noopsort{1973b}}1973",
+ chapter = "1.2",
+}
+
+@INBOOK{inbook-full,
+ author = "Donald E. Knuth",
+ title = "Fundamental Algorithms",
+ volume = 1,
+ series = "The Art of Computer Programming",
+ publisher = "Addison-Wesley",
+ address = "Reading, Massachusetts",
+ edition = "Second",
+ month = "10~" # jan,
+ year = "{\noopsort{1973b}}1973",
+ type = "Section",
+ chapter = "1.2",
+ pages = "10--119",
+ note = "This is a full INBOOK entry",
+}
+
+@INBOOK{inbook-crossref,
+ crossref = "whole-set",
+ title = "Fundamental Algorithms",
+ volume = 1,
+ series = "The Art of Computer Programming",
+ edition = "Second",
+ year = "{\noopsort{1973b}}1973",
+ type = "Section",
+ chapter = "1.2",
+ note = "This is a cross-referencing INBOOK entry",
+}
+
+@BOOK{book-minimal,
+ author = "Donald E. Knuth",
+ title = "Seminumerical Algorithms",
+ publisher = "Addison-Wesley",
+ year = "{\noopsort{1973c}}1981",
+}
+
+@BOOK{book-full,
+ author = "Donald E. Knuth",
+ title = "Seminumerical Algorithms",
+ volume = 2,
+ series = "The Art of Computer Programming",
+ publisher = "Addison-Wesley",
+ address = "Reading, Massachusetts",
+ edition = "Second",
+ month = "10~" # jan,
+ year = "{\noopsort{1973c}}1981",
+ note = "This is a full BOOK entry",
+}
+
+@BOOK{book-crossref,
+ crossref = "whole-set",
+ title = "Seminumerical Algorithms",
+ volume = 2,
+ series = "The Art of Computer Programming",
+ edition = "Second",
+ year = "{\noopsort{1973c}}1981",
+ note = "This is a cross-referencing BOOK entry",
+}
+
+@BOOK{whole-set,
+ author = "Donald E. Knuth",
+ publisher = "Addison-Wesley",
+ title = "The Art of Computer Programming",
+ series = "Four volumes",
+ year = "{\noopsort{1973a}}{\switchargs{--90}{1968}}",
+ note = "Seven volumes planned (this is a cross-referenced set of BOOKs)",
+}
+
+@BOOKLET{booklet-minimal,
+ key = "Kn{\printfirst{v}{1987}}",
+ title = "The Programming of Computer Art",
+}
+
+@BOOKLET{booklet-full,
+ author = "Jill C. Knvth",
+ title = "The Programming of Computer Art",
+ howpublished = "Vernier Art Center",
+ address = "Stanford, California",
+ month = feb,
+ year = 1988,
+ note = "This is a full BOOKLET entry",
+}
+
+@INCOLLECTION{incollection-minimal,
+ author = "Daniel D. Lincoll",
+ title = "Semigroups of Recurrences",
+ booktitle = "High Speed Computer and Algorithm Organization",
+ publisher = "Academic Press",
+ year = 1977,
+}
+
+@INCOLLECTION{incollection-full,
+ author = "Daniel D. Lincoll",
+ title = "Semigroups of Recurrences",
+ editor = "David J. Lipcoll and D. H. Lawrie and A. H. Sameh",
+ booktitle = "High Speed Computer and Algorithm Organization",
+ number = 23,
+ series = "Fast Computers",
+ chapter = 3,
+ type = "Part",
+ pages = "179--183",
+ publisher = "Academic Press",
+ address = "New York",
+ edition = "Third",
+ month = sep,
+ year = 1977,
+ note = "This is a full INCOLLECTION entry",
+}
+
+@INCOLLECTION{incollection-crossref,
+ crossref = "whole-collection",
+ author = "Daniel D. Lincoll",
+ title = "Semigroups of Recurrences",
+ pages = "179--183",
+ note = "This is a cross-referencing INCOLLECTION entry",
+}
+
+@BOOK{whole-collection,
+ editor = "David J. Lipcoll and D. H. Lawrie and A. H. Sameh",
+ title = "High Speed Computer and Algorithm Organization",
+ booktitle = "High Speed Computer and Algorithm Organization",
+ number = 23,
+ series = "Fast Computers",
+ publisher = "Academic Press",
+ address = "New York",
+ edition = "Third",
+ month = sep,
+ year = 1977,
+ note = "This is a cross-referenced BOOK (collection) entry",
+}
+
+@MANUAL{manual-minimal,
+ key = "Manmaker",
+ title = "The Definitive Computer Manual",
+}
+
+@MANUAL{manual-full,
+ author = "Larry Manmaker",
+ title = "The Definitive Computer Manual",
+ organization = "Chips-R-Us",
+ address = "Silicon Valley",
+ edition = "Silver",
+ month = apr # "--" # may,
+ year = 1986,
+ note = "This is a full MANUAL entry",
+}
+
+@MASTERSTHESIS{mastersthesis-minimal,
+ author = "{\'{E}}douard Masterly",
+ title = "Mastering Thesis Writing",
+ school = "Stanford University",
+ year = 1988,
+}
+
+@MASTERSTHESIS{mastersthesis-full,
+ author = "{\'{E}}douard Masterly",
+ title = "Mastering Thesis Writing",
+ school = "Stanford University",
+ type = "Master's project",
+ address = "English Department",
+ month = jun # "-" # aug,
+ year = 1988,
+ note = "This is a full MASTERSTHESIS entry",
+}
+
+@MISC{misc-minimal,
+ key = "Missilany",
+ note = "This is a minimal MISC entry",
+}
+
+@MISC{misc-full,
+ author = "Joe-Bob Missilany",
+ title = "Handing out random pamphlets in airports",
+ howpublished = "Handed out at O'Hare",
+ month = oct,
+ year = 1984,
+ note = "This is a full MISC entry",
+}
+
+@STRING{STOC-key = "OX{\singleletter{stoc}}"}
+
+@STRING{ACM = "The OX Association for Computing Machinery"}
+
+@STRING{STOC = " Symposium on the Theory of Computing"}
+
+@INPROCEEDINGS{inproceedings-minimal,
+ author = "Alfred V. Oaho and Jeffrey D. Ullman and Mihalis Yannakakis",
+ title = "On Notions of Information Transfer in {VLSI} Circuits",
+ booktitle = "Proc. Fifteenth Annual ACM" # STOC,
+ year = 1983,
+}
+
+@INPROCEEDINGS{inproceedings-full,
+ author = "Alfred V. Oaho and Jeffrey D. Ullman and Mihalis Yannakakis",
+ title = "On Notions of Information Transfer in {VLSI} Circuits",
+ editor = "Wizard V. Oz and Mihalis Yannakakis",
+ booktitle = "Proc. Fifteenth Annual ACM" # STOC,
+ number = 17,
+ series = "All ACM Conferences",
+ pages = "133--139",
+ month = mar,
+ year = 1983,
+ address = "Boston",
+ organization = ACM,
+ publisher = "Academic Press",
+ note = "This is a full INPROCEDINGS entry",
+}
+
+@INPROCEEDINGS{inproceedings-crossref,
+ crossref = "whole-proceedings",
+ author = "Alfred V. Oaho and Jeffrey D. Ullman and Mihalis Yannakakis",
+ title = "On Notions of Information Transfer in {VLSI} Circuits",
+ organization = "",
+ pages = "133--139",
+ note = "This is a cross-referencing INPROCEEDINGS entry",
+}
+
+@PROCEEDINGS{proceedings-minimal,
+ key = STOC-key,
+ title = "Proc. Fifteenth Annual" # STOC,
+ year = 1983,
+}
+
+@PROCEEDINGS{proceedings-full,
+ editor = "Wizard V. Oz and Mihalis Yannakakis",
+ title = "Proc. Fifteenth Annual" # STOC,
+ number = 17,
+ series = "All ACM Conferences",
+ month = mar,
+ year = 1983,
+ address = "Boston",
+ organization = ACM,
+ publisher = "Academic Press",
+ note = "This is a full PROCEEDINGS entry",
+}
+
+@PROCEEDINGS{whole-proceedings,
+ key = STOC-key,
+ organization = ACM,
+ title = "Proc. Fifteenth Annual" # STOC,
+ address = "Boston",
+ year = 1983,
+ booktitle = "Proc. Fifteenth Annual ACM" # STOC,
+ note = "This is a cross-referenced PROCEEDINGS",
+}
+
+@PHDTHESIS{phdthesis-minimal,
+ author = "F. Phidias Phony-Baloney",
+ title = "Fighting Fire with Fire: Festooning {F}rench Phrases",
+ school = "Fanstord University",
+ year = 1988,
+}
+
+@PHDTHESIS{phdthesis-full,
+ author = "F. Phidias Phony-Baloney",
+ title = "Fighting Fire with Fire: Festooning {F}rench Phrases",
+ school = "Fanstord University",
+ type = "{PhD} Dissertation",
+ address = "Department of French",
+ month = jun # "-" # aug,
+ year = 1988,
+ note = "This is a full PHDTHESIS entry",
+}
+
+@TECHREPORT{techreport-minimal,
+ author = "Tom Terrific",
+ title = "An {$O(n \log n / \! \log\log n)$} Sorting Algorithm",
+ institution = "Fanstord University",
+ year = 1988,
+}
+
+@TECHREPORT{techreport-full,
+ author = "Tom T{\'{e}}rrific",
+ title = "An {$O(n \log n / \! \log\log n)$} Sorting Algorithm",
+ institution = "Fanstord University",
+ type = "Wishful Research Result",
+ number = "7",
+ address = "Computer Science Department, Fanstord, California",
+ month = oct,
+ year = 1988,
+ note = "This is a full TECHREPORT entry",
+}
+
+@UNPUBLISHED{unpublished-minimal,
+ author = "Ulrich {\"{U}}nderwood and Ned {\~N}et and Paul {\={P}}ot",
+ title = "Lower Bounds for Wishful Research Results",
+ note = "Talk at Fanstord University (this is a minimal UNPUBLISHED entry)",
+}
+
+@UNPUBLISHED{unpublished-full,
+ author = "Ulrich {\"{U}}nderwood and Ned {\~N}et and Paul {\={P}}ot",
+ title = "Lower Bounds for Wishful Research Results",
+ month = nov # ", " # dec,
+ year = 1988,
+ note = "Talk at Fanstord University (this is a full UNPUBLISHED entry)",
+}
+
+@MISC{random-note-crossref,
+ key = {Volume-2},
+ note = "Volume~2 is listed under Knuth \cite{book-full}"
+}
+
+
diff --git a/biblio/bibtex/contrib/getrefs/getrefs.bst b/biblio/bibtex/contrib/getrefs/getrefs.bst
new file mode 100644
index 0000000000..d16e55de44
--- /dev/null
+++ b/biblio/bibtex/contrib/getrefs/getrefs.bst
@@ -0,0 +1,1180 @@
+% ----------------------------------------------------------------------
+% $Header: D:/scrtch/sad/ports/getref/getrefs.bst,v 1.3 1998/11/10 14:09:46 stefand Exp $
+% ----------------------------------------------------------------------
+% BibTeX bibliography style `getrefs', based on
+% BibTeX standard bibliography style `abbrv' from the distribution:
+ % version 0.99a for BibTeX versions 0.99a or later, LaTeX version 2.09.
+ % Copyright (C) 1985, all rights reserved.
+ % Copying of this file is authorized only if either
+ % (1) you make absolutely no changes to your copy, including name, or
+ % (2) if you do make changes, you name it something other than
+ % btxbst.doc, plain.bst, unsrt.bst, alpha.bst, and abbrv.bst.
+ % This restriction helps ensure that all standard styles are identical.
+ % The file btxbst.doc has the documentation for this style.
+
+%% here is another one: When I read a paper I normally find a few
+%% references interesting, but can't retrieve them immediately, be it
+%% because my desk is not in the library, or because the library doesn't
+%% carry the stuff, anyway, and I have to pile up a few references before
+%% travelling to another library (or ordering copies). So, I put all
+%% these references in my bibtex data base with a distinctive tag ('get
+%% ref'), and once in a while I output only those in a separate file,
+%% type set them and go wild in the library.
+%%
+%% Now, I'd love to have a bibtex style that allows me to obtain the type
+%% set version of this bibtex input file sorted first according to source
+%% (say, 'J. Phys. B' before 'Phys. Rev.' before 'Phys. Rev. B' before
+%% 'Zeitschrift f\"ur Physik' etc.), and within each group ordered
+%% according to year, and within this according to volume, possibly down
+%% to issue and page number.
+%%
+%% This would make life a lot easier for me or for who ever I ask to
+%% retrieve the papers for me, especially when some stuff is on micro
+%% film, other journals on display, others in storage etc.
+%%
+%% Is there anything like this out there, or is it easy to cook up
+%% something like this?
+
+
+ENTRY
+ { address
+ author
+ booktitle
+ chapter
+ edition
+ editor
+ howpublished
+ institution
+ journal
+ key
+ month
+ note
+ number
+ organization
+ pages
+ publisher
+ school
+ series
+ title
+ type
+ volume
+ year
+ }
+ {}
+ { label }
+
+INTEGERS { output.state before.all mid.sentence after.sentence after.block }
+
+FUNCTION {init.state.consts}
+{ #0 'before.all :=
+ #1 'mid.sentence :=
+ #2 'after.sentence :=
+ #3 'after.block :=
+}
+
+STRINGS { s t }
+
+FUNCTION {output.nonnull}
+{ 's :=
+ output.state mid.sentence =
+ { ", " * write$ }
+ { output.state after.block =
+ { add.period$ write$
+ newline$
+ "\newblock " write$
+ }
+ { output.state before.all =
+ 'write$
+ { add.period$ " " * write$ }
+ if$
+ }
+ if$
+ mid.sentence 'output.state :=
+ }
+ if$
+ s
+}
+
+FUNCTION {output}
+{ duplicate$ empty$
+ 'pop$
+ 'output.nonnull
+ if$
+}
+
+FUNCTION {output.check}
+{ 't :=
+ duplicate$ empty$
+ { pop$ "empty " t * " in " * cite$ * warning$ }
+ 'output.nonnull
+ if$
+}
+
+FUNCTION {output.bibitem}
+{ newline$
+ "\bibitem{" write$
+ cite$ write$
+ "}" write$
+ newline$
+ ""
+ before.all 'output.state :=
+}
+
+FUNCTION {fin.entry}
+{ add.period$
+ write$
+ newline$
+}
+
+FUNCTION {new.block}
+{ output.state before.all =
+ 'skip$
+ { after.block 'output.state := }
+ if$
+}
+
+FUNCTION {new.sentence}
+{ output.state after.block =
+ 'skip$
+ { output.state before.all =
+ 'skip$
+ { after.sentence 'output.state := }
+ if$
+ }
+ if$
+}
+
+FUNCTION {not}
+{ { #0 }
+ { #1 }
+ if$
+}
+
+FUNCTION {and}
+{ 'skip$
+ { pop$ #0 }
+ if$
+}
+
+FUNCTION {or}
+{ { pop$ #1 }
+ 'skip$
+ if$
+}
+
+FUNCTION {new.block.checka}
+{ empty$
+ 'skip$
+ 'new.block
+ if$
+}
+
+FUNCTION {new.block.checkb}
+{ empty$
+ swap$ empty$
+ and
+ 'skip$
+ 'new.block
+ if$
+}
+
+FUNCTION {new.sentence.checka}
+{ empty$
+ 'skip$
+ 'new.sentence
+ if$
+}
+
+FUNCTION {new.sentence.checkb}
+{ empty$
+ swap$ empty$
+ and
+ 'skip$
+ 'new.sentence
+ if$
+}
+
+FUNCTION {field.or.null}
+{ duplicate$ empty$
+ { pop$ "" }
+ 'skip$
+ if$
+}
+
+FUNCTION {emphasize}
+{ duplicate$ empty$
+ { pop$ "" }
+ { "{\em " swap$ * "}" * }
+ if$
+}
+
+INTEGERS { nameptr namesleft numnames }
+
+FUNCTION {format.names}
+{ 's :=
+ #1 'nameptr :=
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ { s nameptr "{f.~}{vv~}{ll}{, jj}" format.name$ 't :=
+ nameptr #1 >
+ { namesleft #1 >
+ { ", " * t * }
+ { numnames #2 >
+ { "," * }
+ 'skip$
+ if$
+ t "others" =
+ { " et~al." * }
+ { " and " * t * }
+ if$
+ }
+ if$
+ }
+ 't
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+}
+
+FUNCTION {format.authors}
+{ author empty$
+ { "" }
+ { author format.names }
+ if$
+}
+
+FUNCTION {format.editors}
+{ editor empty$
+ { "" }
+ { editor format.names
+ editor num.names$ #1 >
+ { ", editors" * }
+ { ", editor" * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.title}
+{ title empty$
+ { "" }
+ { title "t" change.case$ }
+ if$
+}
+
+FUNCTION {n.dashify}
+{ 't :=
+ ""
+ { t empty$ not }
+ { t #1 #1 substring$ "-" =
+ { t #1 #2 substring$ "--" = not
+ { "--" *
+ t #2 global.max$ substring$ 't :=
+ }
+ { { t #1 #1 substring$ "-" = }
+ { "-" *
+ t #2 global.max$ substring$ 't :=
+ }
+ while$
+ }
+ if$
+ }
+ { t #1 #1 substring$ *
+ t #2 global.max$ substring$ 't :=
+ }
+ if$
+ }
+ while$
+}
+
+FUNCTION {format.date}
+{ year empty$
+ { month empty$
+ { "" }
+ { "there's a month but no year in " cite$ * warning$
+ month
+ }
+ if$
+ }
+ { month empty$
+ 'year
+ { month " " * year * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.btitle}
+{ title emphasize
+}
+
+FUNCTION {tie.or.space.connect}
+{ duplicate$ text.length$ #3 <
+ { "~" }
+ { " " }
+ if$
+ swap$ * *
+}
+
+FUNCTION {either.or.check}
+{ empty$
+ 'pop$
+ { "can't use both " swap$ * " fields in " * cite$ * warning$ }
+ if$
+}
+
+FUNCTION {format.bvolume}
+{ volume empty$
+ { "" }
+ { "volume" volume tie.or.space.connect
+ series empty$
+ 'skip$
+ { " of " * series emphasize * }
+ if$
+ "volume and number" number either.or.check
+ }
+ if$
+}
+
+FUNCTION {format.number.series}
+{ volume empty$
+ { number empty$
+ { series field.or.null }
+ { output.state mid.sentence =
+ { "number" }
+ { "Number" }
+ if$
+ number tie.or.space.connect
+ series empty$
+ { "there's a number but no series in " cite$ * warning$ }
+ { " in " * series * }
+ if$
+ }
+ if$
+ }
+ { "" }
+ if$
+}
+
+FUNCTION {format.edition}
+{ edition empty$
+ { "" }
+ { output.state mid.sentence =
+ { edition "l" change.case$ " edition" * }
+ { edition "t" change.case$ " edition" * }
+ if$
+ }
+ if$
+}
+
+INTEGERS { multiresult }
+
+FUNCTION {multi.page.check}
+{ 't :=
+ #0 'multiresult :=
+ { multiresult not
+ t empty$ not
+ and
+ }
+ { t #1 #1 substring$
+ duplicate$ "-" =
+ swap$ duplicate$ "," =
+ swap$ "+" =
+ or or
+ { #1 'multiresult := }
+ { t #2 global.max$ substring$ 't := }
+ if$
+ }
+ while$
+ multiresult
+}
+
+FUNCTION {format.pages}
+{ pages empty$
+ { "" }
+ { pages multi.page.check
+ { "pages" pages n.dashify tie.or.space.connect }
+ { "page" pages tie.or.space.connect }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.vol.num.pages}
+{ volume field.or.null
+ number empty$
+ 'skip$
+ { "(" number * ")" * *
+ volume empty$
+ { "there's a number but no volume in " cite$ * warning$ }
+ 'skip$
+ if$
+ }
+ if$
+ pages empty$
+ 'skip$
+ { duplicate$ empty$
+ { pop$ format.pages }
+ { ":" * pages n.dashify * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.chapter.pages}
+{ chapter empty$
+ 'format.pages
+ { type empty$
+ { "chapter" }
+ { type "l" change.case$ }
+ if$
+ chapter tie.or.space.connect
+ pages empty$
+ 'skip$
+ { ", " * format.pages * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.in.ed.booktitle}
+{ booktitle empty$
+ { "" }
+ { editor empty$
+ { "In " booktitle emphasize * }
+ { "In " format.editors * ", " * booktitle emphasize * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {empty.misc.check}
+{ author empty$ title empty$ howpublished empty$
+ month empty$ year empty$ note empty$
+ and and and and and
+ key empty$ not and
+ { "all relevant fields are empty in " cite$ * warning$ }
+ 'skip$
+ if$
+}
+
+FUNCTION {format.thesis.type}
+{ type empty$
+ 'skip$
+ { pop$
+ type "t" change.case$
+ }
+ if$
+}
+
+FUNCTION {format.tr.number}
+{ type empty$
+ { "Technical Report" }
+ 'type
+ if$
+ number empty$
+ { "t" change.case$ }
+ { number tie.or.space.connect }
+ if$
+}
+
+FUNCTION {format.article.crossref}
+{ key empty$
+ { journal empty$
+ { "need key or journal for " cite$ * " to crossref " * crossref *
+ warning$
+ ""
+ }
+ { "In {\em " journal * "\/}" * }
+ if$
+ }
+ { "In " key * }
+ if$
+ " \cite{" * crossref * "}" *
+}
+
+FUNCTION {format.crossref.editor}
+{ editor #1 "{vv~}{ll}" format.name$
+ editor num.names$ duplicate$
+ #2 >
+ { pop$ " et~al." * }
+ { #2 <
+ 'skip$
+ { editor #2 "{ff }{vv }{ll}{ jj}" format.name$ "others" =
+ { " et~al." * }
+ { " and " * editor #2 "{vv~}{ll}" format.name$ * }
+ if$
+ }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.book.crossref}
+{ volume empty$
+ { "empty volume in " cite$ * "'s crossref of " * crossref * warning$
+ "In "
+ }
+ { "Volume" volume tie.or.space.connect
+ " of " *
+ }
+ if$
+ editor empty$
+ editor field.or.null author field.or.null =
+ or
+ { key empty$
+ { series empty$
+ { "need editor, key, or series for " cite$ * " to crossref " *
+ crossref * warning$
+ "" *
+ }
+ { "{\em " * series * "\/}" * }
+ if$
+ }
+ { key * }
+ if$
+ }
+ { format.crossref.editor * }
+ if$
+ " \cite{" * crossref * "}" *
+}
+
+FUNCTION {format.incoll.inproc.crossref}
+{ editor empty$
+ editor field.or.null author field.or.null =
+ or
+ { key empty$
+ { booktitle empty$
+ { "need editor, key, or booktitle for " cite$ * " to crossref " *
+ crossref * warning$
+ ""
+ }
+ { "In {\em " booktitle * "\/}" * }
+ if$
+ }
+ { "In " key * }
+ if$
+ }
+ { "In " format.crossref.editor * }
+ if$
+ " \cite{" * crossref * "}" *
+}
+
+FUNCTION {article}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.title "title" output.check
+ new.block
+ crossref missing$
+ { journal emphasize "journal" output.check
+ format.vol.num.pages output
+ format.date "year" output.check
+ }
+ { format.article.crossref output.nonnull
+ format.pages output
+ }
+ if$
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {book}
+{ output.bibitem
+ author empty$
+ { format.editors "author and editor" output.check }
+ { format.authors output.nonnull
+ crossref missing$
+ { "author and editor" editor either.or.check }
+ 'skip$
+ if$
+ }
+ if$
+ new.block
+ format.btitle "title" output.check
+ crossref missing$
+ { format.bvolume output
+ new.block
+ format.number.series output
+ new.sentence
+ publisher "publisher" output.check
+ address output
+ }
+ { new.block
+ format.book.crossref output.nonnull
+ }
+ if$
+ format.edition output
+ format.date "year" output.check
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {booklet}
+{ output.bibitem
+ format.authors output
+ new.block
+ format.title "title" output.check
+ howpublished address new.block.checkb
+ howpublished output
+ address output
+ format.date output
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {inbook}
+{ output.bibitem
+ author empty$
+ { format.editors "author and editor" output.check }
+ { format.authors output.nonnull
+ crossref missing$
+ { "author and editor" editor either.or.check }
+ 'skip$
+ if$
+ }
+ if$
+ new.block
+ format.btitle "title" output.check
+ crossref missing$
+ { format.bvolume output
+ format.chapter.pages "chapter and pages" output.check
+ new.block
+ format.number.series output
+ new.sentence
+ publisher "publisher" output.check
+ address output
+ }
+ { format.chapter.pages "chapter and pages" output.check
+ new.block
+ format.book.crossref output.nonnull
+ }
+ if$
+ format.edition output
+ format.date "year" output.check
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {incollection}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.title "title" output.check
+ new.block
+ crossref missing$
+ { format.in.ed.booktitle "booktitle" output.check
+ format.bvolume output
+ format.number.series output
+ format.chapter.pages output
+ new.sentence
+ publisher "publisher" output.check
+ address output
+ format.edition output
+ format.date "year" output.check
+ }
+ { format.incoll.inproc.crossref output.nonnull
+ format.chapter.pages output
+ }
+ if$
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {inproceedings}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.title "title" output.check
+ new.block
+ crossref missing$
+ { format.in.ed.booktitle "booktitle" output.check
+ format.bvolume output
+ format.number.series output
+ format.pages output
+ address empty$
+ { organization publisher new.sentence.checkb
+ organization output
+ publisher output
+ format.date "year" output.check
+ }
+ { address output.nonnull
+ format.date "year" output.check
+ new.sentence
+ organization output
+ publisher output
+ }
+ if$
+ }
+ { format.incoll.inproc.crossref output.nonnull
+ format.pages output
+ }
+ if$
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {conference} { inproceedings }
+
+FUNCTION {manual}
+{ output.bibitem
+ author empty$
+ { organization empty$
+ 'skip$
+ { organization output.nonnull
+ address output
+ }
+ if$
+ }
+ { format.authors output.nonnull }
+ if$
+ new.block
+ format.btitle "title" output.check
+ author empty$
+ { organization empty$
+ { address new.block.checka
+ address output
+ }
+ 'skip$
+ if$
+ }
+ { organization address new.block.checkb
+ organization output
+ address output
+ }
+ if$
+ format.edition output
+ format.date output
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {mastersthesis}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.title "title" output.check
+ new.block
+ "Master's thesis" format.thesis.type output.nonnull
+ school "school" output.check
+ address output
+ format.date "year" output.check
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {misc}
+{ output.bibitem
+ format.authors output
+ title howpublished new.block.checkb
+ format.title output
+ howpublished new.block.checka
+ howpublished output
+ format.date output
+ new.block
+ note output
+ fin.entry
+ empty.misc.check
+}
+
+FUNCTION {phdthesis}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.btitle "title" output.check
+ new.block
+ "PhD thesis" format.thesis.type output.nonnull
+ school "school" output.check
+ address output
+ format.date "year" output.check
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {proceedings}
+{ output.bibitem
+ editor empty$
+ { organization output }
+ { format.editors output.nonnull }
+ if$
+ new.block
+ format.btitle "title" output.check
+ format.bvolume output
+ format.number.series output
+ address empty$
+ { editor empty$
+ { publisher new.sentence.checka }
+ { organization publisher new.sentence.checkb
+ organization output
+ }
+ if$
+ publisher output
+ format.date "year" output.check
+ }
+ { address output.nonnull
+ format.date "year" output.check
+ new.sentence
+ editor empty$
+ 'skip$
+ { organization output }
+ if$
+ publisher output
+ }
+ if$
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {techreport}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.title "title" output.check
+ new.block
+ format.tr.number output.nonnull
+ institution "institution" output.check
+ address output
+ format.date "year" output.check
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {unpublished}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.title "title" output.check
+ new.block
+ note "note" output.check
+ format.date output
+ fin.entry
+}
+
+FUNCTION {default.type} { misc }
+
+MACRO {jan} {"Jan."}
+
+MACRO {feb} {"Feb."}
+
+MACRO {mar} {"Mar."}
+
+MACRO {apr} {"Apr."}
+
+MACRO {may} {"May"}
+
+MACRO {jun} {"June"}
+
+MACRO {jul} {"July"}
+
+MACRO {aug} {"Aug."}
+
+MACRO {sep} {"Sept."}
+
+MACRO {oct} {"Oct."}
+
+MACRO {nov} {"Nov."}
+
+MACRO {dec} {"Dec."}
+
+MACRO {acmcs} {"ACM Comput. Surv."}
+
+MACRO {acta} {"Acta Inf."}
+
+MACRO {cacm} {"Commun. ACM"}
+
+MACRO {ibmjrd} {"IBM J. Res. Dev."}
+
+MACRO {ibmsj} {"IBM Syst.~J."}
+
+MACRO {ieeese} {"IEEE Trans. Softw. Eng."}
+
+MACRO {ieeetc} {"IEEE Trans. Comput."}
+
+MACRO {ieeetcad}
+ {"IEEE Trans. Comput.-Aided Design Integrated Circuits"}
+
+MACRO {ipl} {"Inf. Process. Lett."}
+
+MACRO {jacm} {"J.~ACM"}
+
+MACRO {jcss} {"J.~Comput. Syst. Sci."}
+
+MACRO {scp} {"Sci. Comput. Programming"}
+
+MACRO {sicomp} {"SIAM J. Comput."}
+
+MACRO {tocs} {"ACM Trans. Comput. Syst."}
+
+MACRO {tods} {"ACM Trans. Database Syst."}
+
+MACRO {tog} {"ACM Trans. Gr."}
+
+MACRO {toms} {"ACM Trans. Math. Softw."}
+
+MACRO {toois} {"ACM Trans. Office Inf. Syst."}
+
+MACRO {toplas} {"ACM Trans. Prog. Lang. Syst."}
+
+MACRO {tcs} {"Theoretical Comput. Sci."}
+
+READ
+
+FUNCTION {sortify}
+{ purify$
+ "l" change.case$
+}
+
+INTEGERS { len }
+
+FUNCTION {chop.word}
+{ 's :=
+ 'len :=
+ s #1 len substring$ =
+ { s len #1 + global.max$ substring$ }
+ 's
+ if$
+}
+
+FUNCTION {sort.format.names}
+{ 's :=
+ #1 'nameptr :=
+ ""
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ { nameptr #1 >
+ { " " * }
+ 'skip$
+ if$
+ s nameptr "{vv{ } }{ll{ }}{ f{ }}{ jj{ }}" format.name$ 't :=
+ nameptr numnames = t "others" = and
+ { "et al" * }
+ { t sortify * }
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+}
+
+FUNCTION {sort.format.title}
+{ 't :=
+ "A " #2
+ "An " #3
+ "The " #4 t chop.word
+ chop.word
+ chop.word
+ sortify
+ #1 global.max$ substring$
+}
+
+FUNCTION {author.sort}
+{ author empty$
+ { key empty$
+ { "to sort, need author or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { author sort.format.names }
+ if$
+}
+
+FUNCTION {author.editor.sort}
+{ author empty$
+ { editor empty$
+ { key empty$
+ { "to sort, need author, editor, or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { editor sort.format.names }
+ if$
+ }
+ { author sort.format.names }
+ if$
+}
+
+FUNCTION {author.organization.sort}
+{ author empty$
+ { organization empty$
+ { key empty$
+ { "to sort, need author, organization, or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { "The " #4 organization chop.word sortify }
+ if$
+ }
+ { author sort.format.names }
+ if$
+}
+
+FUNCTION {editor.organization.sort}
+{ editor empty$
+ { organization empty$
+ { key empty$
+ { "to sort, need editor, organization, or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { "The " #4 organization chop.word sortify }
+ if$
+ }
+ { editor sort.format.names }
+ if$
+}
+
+
+%% following a suggestion by: Nicolas Holzschuch in reply to my inquiry
+%% in comp.text.tex of 26. Jul 1998, with slight improvements (left.pad
+%% etc.) as suggested by the BibTeX author Oren Patashnik, 27 Jul 1998.
+
+INTEGERS { pad-length }
+
+FUNCTION {left.pad} % left-pad one string with another
+{ duplicate$
+ text.length$ 'pad-length := % the length of the padding string
+ swap$ *
+ #-1 pad-length substring$ % is the length of the result
+}
+
+INTEGERS { pageptr }
+
+FUNCTION {first.page} % use just the first of multiple pages
+{ #1 'pageptr :=
+ { duplicate$ pageptr #1 substring$ % stop at
+ duplicate$ "" = % end of string or
+ swap$ duplicate$ "-" = % at one of three
+ swap$ duplicate$ "," = % multipage
+ swap$ "+" = % indicators
+ or or or not
+ }
+ { pageptr #1 + 'pageptr := }
+ while$
+ pageptr #1 - 'pageptr := % now back up over
+ { duplicate$ pageptr #1 substring$ % any spaces preceding stop spot
+ " " =
+ }
+ { pageptr #1 - 'pageptr := }
+ while$
+ #1 pageptr substring$ % return relevant prefix
+}
+
+
+FUNCTION {presort}
+{ type$ "article" =
+ {
+ journal sortify
+ }
+ {
+ booktitle field.or.null sortify
+ }
+ if$
+ " "
+ *
+ year field.or.null sortify
+ *
+ " "
+ *
+%% volume field.or.null sortify * % N.H.
+ volume field.or.null sortify "0000" left.pad * % O.P.
+ " " *
+%% number field.or.null sortify * % N.H.
+ number field.or.null sortify "0000" left.pad * % O.P.
+ " " *
+%% page sortify * % N.H.
+%% pages field.or.null sortify "00000000" left.pad * % O.P.
+ pages field.or.null first.page sortify "00000000" left.pad * % O.P.
+ title field.or.null
+ sort.format.title
+ *
+ #1 entry.max$ substring$
+ 'sort.key$ :=
+}
+
+ITERATE {presort}
+
+SORT
+
+STRINGS { longest.label }
+
+INTEGERS { number.label longest.label.width }
+
+FUNCTION {initialize.longest.label}
+{ "" 'longest.label :=
+ #1 'number.label :=
+ #0 'longest.label.width :=
+}
+
+FUNCTION {longest.label.pass}
+{ number.label int.to.str$ 'label :=
+ number.label #1 + 'number.label :=
+ label width$ longest.label.width >
+ { label 'longest.label :=
+ label width$ 'longest.label.width :=
+ }
+ 'skip$
+ if$
+}
+
+EXECUTE {initialize.longest.label}
+
+ITERATE {longest.label.pass}
+
+FUNCTION {begin.bib}
+{ preamble$ empty$
+ 'skip$
+ { preamble$ write$ newline$ }
+ if$
+ "\begin{thebibliography}{" longest.label * "}" * write$ newline$
+}
+
+EXECUTE {begin.bib}
+
+EXECUTE {init.state.consts}
+
+ITERATE {call.type$}
+
+FUNCTION {end.bib}
+{ newline$
+ "\end{thebibliography}" write$ newline$
+}
+
+EXECUTE {end.bib}
+
+% ----------------------------------------------------------------------
+%
+% $Log: getrefs.bst,v $
+% Revision 1.3 1998/11/10 14:09:46 stefand
+% removed email address of Oren and Nicolas for privacy.
+%
+% Revision 1.2 1998/11/10 13:57:22 stefand
+% Changed handling of page ranges, following a suggestion of Oren Patashnik.
+%
+% Revision 1.1 1998/08/05 15:49:12 stefand
+% Initial revision
+%
+%
+% ----------------------------------------------------------------------
diff --git a/biblio/bibtex/contrib/getrefs/getrefs.tex b/biblio/bibtex/contrib/getrefs/getrefs.tex
new file mode 100644
index 0000000000..686878c47e
--- /dev/null
+++ b/biblio/bibtex/contrib/getrefs/getrefs.tex
@@ -0,0 +1,9 @@
+\documentclass{article}
+%
+\begin{document}
+\section*{Please, get these references:}
+\nocite{*}
+\bibliographystyle{getrefs}
+\bibliography{getrefs}
+\end{document}
+%
diff --git a/biblio/bibtex/contrib/getrefs/getrefs.txt b/biblio/bibtex/contrib/getrefs/getrefs.txt
new file mode 100644
index 0000000000..51099442eb
--- /dev/null
+++ b/biblio/bibtex/contrib/getrefs/getrefs.txt
@@ -0,0 +1,72 @@
+
+getrefs.zip: 29. July 1998
+
+This package contains a BibTeX style file and a LaTeX2e document
+template to facilitate the retrieval of references from a library.
+Here is the idea, posted as a question to comp.text.tex in July 1998:
+
+ When I read a paper I normally find a few references interesting, but
+ can't retrieve them immediately, be it because my desk is not in the
+ library, or because the library doesn't carry the stuff, anyway, and I
+ have to pile up a few references before travelling to another library
+ (or ordering copies). So, I put all these references in my BibTeX data
+ base with a distinctive tag ('get ref'), and once in a while I output
+ only those in a separate file, type set them and go wild in the
+ library.
+
+ Now, I'd love to have a BibTeX style that allows me to obtain the type
+ set version of this BibTeX input file sorted first according to source
+ (say, 'J. Phys. B' before 'Phys. Rev.' before 'Phys. Rev. B' before
+ 'Zeitschrift f\"ur Physik' etc.), and within each group ordered
+ according to year, and within this according to volume, possibly down
+ to issue and page number.
+
+ This would make life a lot easier for me or for who ever I ask to
+ retrieve the papers for me, especially when some stuff is on micro
+ film, other journals on display, others in storage etc.
+
+ Is there anything like this out there, or is it easy to cook up
+ something like this?
+
+
+With the help of Nicolas Holzschuch and the BibTeX author, Oren
+Patashnik, the problem was easily solved. Nicolas emailed me the
+suggestion for a modification of an existing BibTeX style file, Oren
+made a few suggestions to make the sorting and handling of page ranges a
+bit more robust, and there it was. I don't think I would have been able
+to cook this up in a reasonable amount of time w/o reading the 'LaTeX
+companion' again, so the credit really ought to go to those two people.
+I just want to make the result available to avoid doubling of efforts,
+since I think I am not the only one who could benefit from such a
+solution.
+
+I have chosen to modify the 'abbrv' style file and rename it to
+'getrefs.bst', which together with the included 'getrefs.tex'
+accomplishes the desired result.
+
+Once you have put the BibTeX style file 'getrefs.bst' in a directory
+searched by (e.g. the one where your other *.bst files reside)
+and a copy of 'getrefs.tex' in your tex input path, only the following
+steps are needed:
+
+1. Extract from your BibTeX data base file(s) all entries for which you
+ want to retrieve the papers from the library, and copy them into a
+ separate file, say, getrefs.bib.
+
+ (I label the title field as 'no idea yet -- get ref!', so it is easy
+ to extract the entries with tools such as bibtool (from CTAN) or even
+ sed.)
+
+2. Run LaTeX and BibTeX on the file getrefs.tex:
+
+ latex getrefs
+ bibtex getrefs
+ latex getrefs
+ latex getrefs
+
+3. Print the resulting getrefs.dvi file.
+
+4. Find someone to go to the library for you ...
+
+
+Have fun! Stefan A. Deutscher (sad@utk.edu) 05-Nov-1998
diff --git a/biblio/bibtex/contrib/gost/README.md b/biblio/bibtex/contrib/gost/README.md
new file mode 100644
index 0000000000..6a70110f21
--- /dev/null
+++ b/biblio/bibtex/contrib/gost/README.md
@@ -0,0 +1,327 @@
+GOST is a bundle of BibTeX styles designed to match the State Standards (GOST)
+on information, librarianship and publishing issued by The Russian Federation
+and Interstate Committee of former USSR States.
+
+It may be distributed and/or modified under the conditions of the LaTeX
+Project Public License, either version 1.3 of this license or (at your
+option) any later version. The latest version of this license is in
+ http://www.latex-project.org/lppl.txt
+and version 1.3 or later is part of all distributions of LaTeX
+ version 2005/12/01 or later.
+
+The System of Standards includes:
+GOST 7.0.5-2008 Bibliographic reference.
+ General requirements and rules of making.
+GOST 7.1 -2003 Bibliographic record.
+ Bibliographic description.
+ General requirements and rules.
+GOST 7.80 -2000 Bibliographic record.
+ Heading. General requirements and rules.
+GOST 7.11 -2004 Bibliographic description and references.
+ Rules for the abbreviation of words and word combinations
+ in foreign European languages.
+GOST 7.83 -2001 Electronic editions. Basic types and imprint.
+Etc.
+
+GOST comprises 16 BibTeX styles to format bibliography in English, Russian
+and Ukrainian according to GOST 7.0.5-2008 and GOST 7.1-2003. Both 8-bit
+and Unicode (UTF-8) versions of each BibTeX style, in each case offering
+a choice of sorted and unsorted. Further, 2 more styles, |gost780| and
+|gost780s| styles (not conforming to effective standards) are retained
+for backwards compatibility.
+
+All BibTeX styles are derived from same master file |gost.dtx| by applying
+different set of options as shown in the table below.
+
+------------------------------------------------------------------------
+ Style | utf8 | strict | modern | eprint | long | sort | natbib
+------------------------------------------------------------------------
+ gost780 | | | | | | |
+ gost780s | | | | | | + |
+------------------------------------------------------------------------
+ gost2003 | | + | | + | | |
+ gost2003s | | + | | + | | + |
+ gost2008 | | | + | + | | |
+ gost2008n | | | + | + | | | +
+ gost2008l | | | + | + | + | |
+ gost2008s | | | + | + | | + |
+ gost2008ns | | | + | + | | + | +
+ gost2008ls | | | + | + | + | + |
+------------------------------------------------------------------------
+ ugost2003 | + | + | | + | | |
+ ugost2003s | + | + | | + | | + |
+ ugost2008 | + | | + | + | | |
+ ugost2008n | + | | + | + | | | +
+ ugost2008l | + | | + | + | + | |
+ ugost2008s | + | | + | + | | + |
+ ugost2008ns | + | | + | + | | + | +
+ ugost2008ls | + | | + | + | + | + |
+------------------------------------------------------------------------
+ Style | utf8 | strict | modern | eprint | long | sort | natbib
+------------------------------------------------------------------------
+
+|Gost2008| style is recommended for most applications. It corresponds to the
+currently effective Standard 7.0.5-2008. Librarians should use the style
+|gost2003| instead of |gost2008| to compile a library catalog to meet the
+Standard 7.1-2003. Use of other styles is best explained through
+the meaning of options used to compile those styles from the master source.
+
+Two styles, |gost780| and |gost780s|, generated without |modern| and
+|strict| options, are retained for backward compatibility. They do not
+conform the Standards 7.0.5-2008 and 7.1-2003 cited above.
+
+The |strict| option provides conformance to the Standard 7.1-2003. The
+styles compiled with that option bear the name |gost2003| with possible
+suffixes |s|, |l|, |n| as explained below. These styles are intended
+primarily for the librarians who compose a library catalog.
+
+The |modern| option meets the Standard 7.0.5-2008 which can be thought
+off as a relaxed version of the Standard 7.1-2003. The styles compiled with
+that option bear the name |gost2008| with possible suffixes |s|, |l|, |n|.
+The |strict| option has precedence over |modern| so that a style compiled
+with both options will resemble mainly the |gost2003| style rather than
+|gost2008|.
+
+If the number of authors exceeds 4, modern styles cut the list of authors
+to at most 4 persons as prescibed by the Standards. The option
+|long| overrides this rule to provide backward compatibility with the
+package disser by Stanislab Kruchinin. Two styles, |gost2008l| and
+|gost2008ls|, compiled with the option |long| mimic behavior of the styles
+|gost705| and |gost705s| from the disser package. Major
+effect of the |long| option is that the list of authors always
+precedes book or article title no matter how long is it.
+Modern styles compiled without |long| place long list of authors behind
+the title. The names of styles compiled with the option |long| has the
+suffix |l|. Recall that those styles do not conform effective Standards and
+their use is discouraged.
+
+The |eprint| option enables formatting electronic publications. In particular,
+it enables |eprint|, |eprinttype|, |eprintclass|, and |doi| fields for a
+bibliographic entry. The styles, generated without the |eprint| option,
+just ignore these fields. Starting from the version 1.2 of the GOST package,
+all modern styles are compiled with this option included, and therefore the
+suffix |e| which designated this option in earlier versions is not appended
+to the name of style any more.
+
+The |natbib| option provides compatibility with the |natbib| package. The names
+of styles compiled with the option |natbib| bear the suffix |n|. Currently
+4 styles with that option are available for public use.
+
+The |sort| option enables sorting bibliographic references by author names
+and titles of references. The names of styles compiled with the option |sort|
+bear the suffix |s|. Sorting does not work as expected for databases in
+unicode encoding (see below).
+
+Finally, the |utf8| option produces bibliographic styles in unicode rather
+that in 8-bit encoding. Names of those styles bear the prefix |u|.
+
+
+Beyond bibliographic style, GOST bundle contains CS files (codepage and
+sorting order).
+
+----------------------------------------------------------------
+ Encoding | CSF Sorting order
+----------------------------------------------------------------
+ cp866 | ruscii.csf Cyrillic first, Latin
+ cp1251 | cp1251.csf Cyrillic first, Latin
+ koi8-u | koi8u.csf Cyrillic first, Latin
+ utf8 | utf8cyrillic.csf Cyrillic first, Latin
+----------------------------------------------------------------
+
+In addition, BibTeX8 distribution comes with few more CSFs.
+
+----------------------------------------------------------------
+ Encoding | CSF Sorting order
+----------------------------------------------------------------
+ cp866 | cp866rus.csf Latin first, Cyrillic
+----------------------------------------------------------------
+
+
+How to use
+
+1. Select bibliography style by adding appropriate \bibliographystyle
+ declaration to your source file <filename>.tex, e.g.
+
+ \bibliographystyle{gost2008}
+ \bibliography{database}
+
+2. Add the field language="ukrainian" or language="russian" to the
+ bibliographic entries in Ukrainian or Russian languages in your
+ database; English is the default language. German, Italian and
+ French are partially supported.
+
+3. To compile list of references from your database use bibtex8.exe
+ rather than bibtex.exe. Depending on the codepage of your
+ bibliographic database, indicate one of the CS files
+ listed above as option to bibtex8.exe. Run LaTeX, then run
+ bibTeX8 and again LaTeX:
+
+ latex <filename>.tex
+ bibtex8 -B -c <csf_file>.csf <filename>.aux
+ latex <filename>.tex
+
+4. For details on preparing bibliographic database see
+ examples in |gost*.pdf|.
+
+5. Ugost*.bst styles are primarily intended for use
+ with unicode compilers (xelatex and lualatex). They
+ should be preferred as well when using 8bit compilers
+ (latex and pdflatex) if source file is in utf8 encoding.
+
+6. Neither bibtex.exe nor bibtex8.exe provide
+ correct sorting order of unicode text. It means that using
+ ugost2008s or any other style ended with `s' in
+ its name may produce unexpected result for utf8 documents.
+
+7. Bibtex8 fails to change case of a string if it contains Cyrillic
+ letter in unicode. Therefore ugost2008* styles do not change case of
+ titles and other parts of bibliographic record while 8-bit styles
+ do the case change where appropriate.
+
+8. Either |bibtex8| or |Bibtex8| fail to cut Cyrillic names to
+ initials. Therefore |ugost2008*| styles do not modify the name of
+ authors.
+
+9. Package |natbib| should be loaded when using styles with
+ suffix |n| in their names.
+
+
+Customization
+
+Every GOST style defines few commands to format some parts of a
+reference. You can redefine these commands prior to
+the \bibliography{<bibtex_style>} command. Initial
+definitions are listed below.
+
+ \providecommand*{\url}[1]{{\small #1}}
+ \providecommand*{\BibUrl}[1]{\url{#1}}
+ \providecommand{\BibAnnote}[1]{}
+ \providecommand*{\BibEmph}[1]{#1}
+
+By default, gost styles separate logical parts of a bibliography
+record by a period and cyrdash (. "---). It is legitimate to drop
+that dash by overriding the command \BibDash as follows
+
+ \providecommand*{\BibDash}{}
+
+By default, \BibDash is equivalent to the shorthand "---
+introduced by the babel package with the option russian.
+It prints a so called Cyrillic dash (\cyrdash), which is
+20% shorter than ordinary LaTeX dash (---), and puts
+unbreakable space before \cyrdash so that the dash never
+appears at the beginning of a line.
+
+
+Where to get from
+
+1. http://mirror.ctan.org/biblio/bibtex/contrib/gost/
+2. http://ctan.org/pkg/gost
+
+
+What's new in version 1.2i (2017.01.12)
+
+1. Documentation and examples update (thanks to Leonid Sinev).
+
+2, Restored @MastersThesis instead of @MasterThesis (thanks to Leonid Sinev).
+
+3. Media="eresource" field is introduced in addition to the media="online" and
+ media="text"; if present, the media field is not ignored any more in
+ modern bst-styles compiled without the strict option.
+
+4. Location field is introduced as an alias of address field.
+
+5. @DSCISTHESIS entry renamed to @DOCTHESIS.
+
+6. School field is now treated as an alias of institution.
+
+7. Specialitycode is added for @THESIS and similar entries; number is treated as
+ alias of specialitycode.
+
+8. Type field in THESIS and similar entries can now accept three values
+ (mathesis, phdthesis, docthesis) which are translated to built-in
+ language-sensitive strings; any other value is reproduced literally.
+
+
+What's new in version 1.2h (2016.08.21)
+
+1. Minor changes in documentation.
+
+
+What's new in version 1.2g (2016.07.25)
+
+1. Minor changes in documentation.
+
+
+What's new in version 1.2f (2016.07.11)
+
+1. Support for |@patent| entry added (thanks to Stanislav Kruchinin).
+2. medium field renamed to media field.
+
+
+What's new in version 1.2e (2016.07.07)
+
+1. Hard coded "URL" string replaced with a language sensitive string
+ (thanks to Roman Budnyi).
+
+
+What's new in version 1.2d (2016.02.18)
+
+1. jan, feb, mar, e.t.c. month macros fixed;
+2. New macro format.month.
+3. \cyrdash is now faked via \ProvideTextCommandDefault if not defined.
+
+
+What's new in version 1.2c (2015.01.10)
+
+1. langid field added; language field supported for backward compatibility.
+2. eid field added, it has priority over pages field;
+3. Fix Gost2003: "--- replaced by \BibDash;
+4. Spacing around \BibDash improved.
+
+
+What's new in version 1.2b (2014.01.19)
+
+1. numpages renamed to pagetotal.
+
+
+What's new in version 1.2a (2012.08.31)
+
+1. \cyrdash is now defined via \ProvideTextCommand rather than \providecommand.
+
+
+What's new in version 1.2 (2012.02.22)
+
+1. Code refactoring. All styles are now generated from single source file.
+2. Support for GOST-7.1-2003. The field |medium| is added to reflect type
+ of material. For most entry types |medium| defaults to |text|.
+3. Support for |natbib| package.
+4. All modern styles are now compiled with the |eprint| option.
+
+
+What's new in version 1.1 (2012.01.21)
+
+1. Support for GOST 7.0.5-2008 and GOST 7.1-2003 is provided.
+2. |@Online| entry is added to format a reference to electronic
+ resource on Internet.
+3. |@MastersThesis| entry is added to format a reference to master's thesis.
+ |@DSciThesis| entry is added to format a reference to doctor of
+ sciences thesis.
+4. |Urldate|, |eprint|, |eprintclass|, |eprinttype| fields are added.
+
+
+Version history
+
+2012.08.31 \cyrdash is now defined via \ProvideTextCommand.
+2012.02.22 Support for |natbib| package.
+2012.02.02 Adaptation to GOST 7.0.5, electronic publishing.
+2005.08.12 First version uploaded to CTAN.
+2003.06.06 First public version.
+
+
+
+Please, send feature requests and bug reports via e-mail:
+ kia999 at mail dot ru <Igor A. Kotelnikov>
+or
+ polyama at yahoo dot com <Maksym Polyakov>
+
+Happy BibTeXing!
diff --git a/biblio/bibtex/contrib/gost/bibtex/cp1251.csf b/biblio/bibtex/contrib/gost/bibtex/cp1251.csf
new file mode 100644
index 0000000000..692238930b
--- /dev/null
+++ b/biblio/bibtex/contrib/gost/bibtex/cp1251.csf
@@ -0,0 +1,275 @@
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%%
+%% CHARACTER SET: Cyrillic (CP 1251)
+%%
+%% SORTING ORDER: Ukrainian/Russian (First Cyrillic then Latin)
+%%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%%
+%% FILE FORMAT
+%%
+%% The codepage and sorting order (CS) file defines how BibTeX will treat an
+%% 8-bit character set, specifically which characters are to be treated as
+%% letters, the upper/lower case relationships between characters, and the
+%% sorting order of characters.
+%%
+%% The CS file may contain a number of sections, each presented in the
+%% form of a TeX macro:
+%%
+%% \section-name{
+%% <section definitions>
+%% }
+%%
+%% Four sections are currently supported: \lowupcase, \lowercase, \uppercase
+%% and \order. The syntax of the four supported sections is summarised below.
+%%
+%% 8-bit characters may be entered naturally, but to avoid problems with
+%% character set translation or corruption, they can also be entered using
+%% the TeX-style portable notation for character codes, i.e. ^^XX, where XX
+%% is the hexadecimal value ofthe character code.
+%%
+%% Reading of the sections ends when the first '}' character is reached, so
+%% '}' can't be included in a section. You can't use ^^7d either.
+%%
+%% The percent sign ('%') is used to introduce a trailing comment - it and
+%% all remaining characters on a line are ignored. ^^25 has the same effect.
+%%
+%%
+%% \lowupcase section
+%%
+%% The \lowupcase section of the CS file is used to define the lower
+%% /upper and upper/lower case relationship of pairs of specified
+%% characters. It is only used if the relationship is symmetrical - use
+%% \lowercase or \upcase if it isn't.
+%%
+%% The syntax of the \lowupcase section is:
+%%
+%% \lowupcase{
+%% <LC-1> <UC-1> % Comment begins with a percent sign
+%% <LC-2> <UC-2>
+%% ...
+%% <LC-N> <UC-N>
+%% }
+%%
+%% Each <LC-n> <UC-n> pair of characters defines that the upper case
+%% equivalent of <LC-n> is <UC-n> *and* the lower case equivalent of
+%% <UC-n> is <LC-n>.
+%%
+%% You cannot redefine the lower or upper case equivalent of an ASCII
+%% character (code < 128), so all instances of <LC-n> and <UC-n>
+%% (i.e. both sides of the relationship) must have codes > 127.
+%%
+%%
+%% \lowercase section
+%%
+%% The \lowercase section of the CS file is used to define the lower case
+%% equivalent of specified characters. It should normally only be used
+%% if the relationship isn't symmetrical - use \lowupcase if it is.
+%%
+%% The syntax of the \lowercase section is:
+%%
+%% \lowercase{
+%% <UC-1> <LC-1> % Comment begins with a percent sign
+%% <UC-2> <LC-2>
+%% ...
+%% <UC-N> <LC-N>
+%% }
+%%
+%% Each <LC-n> <UC-n> pair of characters defines that the lower case
+%% equivalent of <UC-n> is <LC-n>.
+%%
+%% You cannot redefine the lower case equivalent of an ASCII character
+%% (code < 128), so all instances of <UC-n> (i.e. the left hand side
+%% of the relationship) must have codes > 127.
+%%
+%%
+%% \uppercase section
+%%
+%% The \uppercase section of the CS file is used to define the upper case
+%% equivalent of specified characters. It should normally only be used
+%% if the relationship isn't symmetrical - use \lowupcase if it is.
+%%
+%% The syntax of the \uppercase section is:
+%%
+%% \uppercase{
+%% <LC-1> <UC-1> % Comment begins with a percent sign
+%% <LC-2> <UC-2>
+%% ...
+%% <LC-N> <UC-N>
+%% }
+%%
+%% Each <LC-n> <UC-n> pair of characters defines that the upper case
+%% case equivalent of <LC-n> is <UC-n>.
+%%
+%% You cannot redefine the upper case equivalent of an ASCII character
+%% (code < 128), so all instances of <LC-n> (i.e. the left hand side
+%% of the relationship) must have codes > 127.
+%%
+%%
+%% \order section
+%%
+%% The \order section of the CS file is used to define the order in which
+%% characters are sorted.
+%%
+%% The syntax of the \order section is:
+%%
+%% \order{
+%% <char-1> % Comment begins with a percent sign
+%% <char-2> <char-3> % whitespace between the chars
+%% <char-4> - <char-5> % a hyphen between the chars
+%% <char-4> _ <char-5> % an underscore between the chars
+%% ...
+%% <char-n>
+%% }
+%%
+%% All characters on the same line are given the same sorting weight.
+%%
+%% The construct <char-1> <underscore> <char-2> is used to denote that
+%% all characters in the range <char-1> to <char-2> should be given the
+%% same sorting weight. For example, "A _ Z" would cause all ASCII
+%% upper case alphabetical characters to have the same sorting weight
+%% and would be equivalent to placing all 26 characters on the same line.
+%%
+%% The construct <char-1> <hyphen> <char-2> is used to denote that all
+%% characters in the range <char-1> to <char-2> should be given an
+%% ascending set of sorting weights, starting with <char-1> and ending
+%% with <char-2>. For example, "A - Z" would cause all upper case ASCII
+%% alphabetical characters to be sorted in ascending order and would be
+%% equivalent to placing 'A' on the first line, 'B' on the second,
+%% through to 'Z' on the 26th line.
+%%
+%% The characters at the beginning of the order section are given a lower
+%% sorting weight than characters occuring later. When sorting
+%% alphabetically, characters with the lowest weight come first.
+%%
+%% All characters not in the \order section (including ASCII characters)
+%% are given the same very high sorting weight to ensure that they come
+%% last when sorting alphabetically.
+%%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+
+
+%%
+%% CHARACTER SET
+%%
+\lowupcase{
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+}
+
+
+
+%%
+%% SORTING ORDER
+%%
+%%
+\order{
+ 0-9
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ A a
+ B b
+ C c
+ D d
+ E e
+ F f
+ G g
+ H h
+ I i
+ J j
+ K k
+ L l
+ M m
+ N n
+ O o
+ P p
+ Q q
+ R r
+ S s
+ T t
+ U u
+ V v
+ W w
+ X x
+ Y y
+ Z z
+}
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% END OF FILE %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
diff --git a/biblio/bibtex/contrib/gost/bibtex/koi8u.csf b/biblio/bibtex/contrib/gost/bibtex/koi8u.csf
new file mode 100644
index 0000000000..f84ae4870a
--- /dev/null
+++ b/biblio/bibtex/contrib/gost/bibtex/koi8u.csf
@@ -0,0 +1,275 @@
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%%
+%% CHARACTER SET: Cyrillic (koi8-u)
+%%
+%% SORTING ORDER: Ukrainian/Russian (First Cyrillic then Latin)
+%%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%%
+%% FILE FORMAT
+%%
+%% The codepage and sorting order (CS) file defines how BibTeX will treat an
+%% 8-bit character set, specifically which characters are to be treated as
+%% letters, the upper/lower case relationships between characters, and the
+%% sorting order of characters.
+%%
+%% The CS file may contain a number of sections, each presented in the
+%% form of a TeX macro:
+%%
+%% \section-name{
+%% <section definitions>
+%% }
+%%
+%% Four sections are currently supported: \lowupcase, \lowercase, \uppercase
+%% and \order. The syntax of the four supported sections is summarised below.
+%%
+%% 8-bit characters may be entered naturally, but to avoid problems with
+%% character set translation or corruption, they can also be entered using
+%% the TeX-style portable notation for character codes, i.e. ^^XX, where XX
+%% is the hexadecimal value ofthe character code.
+%%
+%% Reading of the sections ends when the first '}' character is reached, so
+%% '}' can't be included in a section. You can't use ^^7d either.
+%%
+%% The percent sign ('%') is used to introduce a trailing comment - it and
+%% all remaining characters on a line are ignored. ^^25 has the same effect.
+%%
+%%
+%% \lowupcase section
+%%
+%% The \lowupcase section of the CS file is used to define the lower
+%% /upper and upper/lower case relationship of pairs of specified
+%% characters. It is only used if the relationship is symmetrical - use
+%% \lowercase or \upcase if it isn't.
+%%
+%% The syntax of the \lowupcase section is:
+%%
+%% \lowupcase{
+%% <LC-1> <UC-1> % Comment begins with a percent sign
+%% <LC-2> <UC-2>
+%% ...
+%% <LC-N> <UC-N>
+%% }
+%%
+%% Each <LC-n> <UC-n> pair of characters defines that the upper case
+%% equivalent of <LC-n> is <UC-n> *and* the lower case equivalent of
+%% <UC-n> is <LC-n>.
+%%
+%% You cannot redefine the lower or upper case equivalent of an ASCII
+%% character (code < 128), so all instances of <LC-n> and <UC-n>
+%% (i.e. both sides of the relationship) must have codes > 127.
+%%
+%%
+%% \lowercase section
+%%
+%% The \lowercase section of the CS file is used to define the lower case
+%% equivalent of specified characters. It should normally only be used
+%% if the relationship isn't symmetrical - use \lowupcase if it is.
+%%
+%% The syntax of the \lowercase section is:
+%%
+%% \lowercase{
+%% <UC-1> <LC-1> % Comment begins with a percent sign
+%% <UC-2> <LC-2>
+%% ...
+%% <UC-N> <LC-N>
+%% }
+%%
+%% Each <LC-n> <UC-n> pair of characters defines that the lower case
+%% equivalent of <UC-n> is <LC-n>.
+%%
+%% You cannot redefine the lower case equivalent of an ASCII character
+%% (code < 128), so all instances of <UC-n> (i.e. the left hand side
+%% of the relationship) must have codes > 127.
+%%
+%%
+%% \uppercase section
+%%
+%% The \uppercase section of the CS file is used to define the upper case
+%% equivalent of specified characters. It should normally only be used
+%% if the relationship isn't symmetrical - use \lowupcase if it is.
+%%
+%% The syntax of the \uppercase section is:
+%%
+%% \uppercase{
+%% <LC-1> <UC-1> % Comment begins with a percent sign
+%% <LC-2> <UC-2>
+%% ...
+%% <LC-N> <UC-N>
+%% }
+%%
+%% Each <LC-n> <UC-n> pair of characters defines that the upper case
+%% case equivalent of <LC-n> is <UC-n>.
+%%
+%% You cannot redefine the upper case equivalent of an ASCII character
+%% (code < 128), so all instances of <LC-n> (i.e. the left hand side
+%% of the relationship) must have codes > 127.
+%%
+%%
+%% \order section
+%%
+%% The \order section of the CS file is used to define the order in which
+%% characters are sorted.
+%%
+%% The syntax of the \order section is:
+%%
+%% \order{
+%% <char-1> % Comment begins with a percent sign
+%% <char-2> <char-3> % whitespace between the chars
+%% <char-4> - <char-5> % a hyphen between the chars
+%% <char-4> _ <char-5> % an underscore between the chars
+%% ...
+%% <char-n>
+%% }
+%%
+%% All characters on the same line are given the same sorting weight.
+%%
+%% The construct <char-1> <underscore> <char-2> is used to denote that
+%% all characters in the range <char-1> to <char-2> should be given the
+%% same sorting weight. For example, "A _ Z" would cause all ASCII
+%% upper case alphabetical characters to have the same sorting weight
+%% and would be equivalent to placing all 26 characters on the same line.
+%%
+%% The construct <char-1> <hyphen> <char-2> is used to denote that all
+%% characters in the range <char-1> to <char-2> should be given an
+%% ascending set of sorting weights, starting with <char-1> and ending
+%% with <char-2>. For example, "A - Z" would cause all upper case ASCII
+%% alphabetical characters to be sorted in ascending order and would be
+%% equivalent to placing 'A' on the first line, 'B' on the second,
+%% through to 'Z' on the 26th line.
+%%
+%% The characters at the beginning of the order section are given a lower
+%% sorting weight than characters occuring later. When sorting
+%% alphabetically, characters with the lowest weight come first.
+%%
+%% All characters not in the \order section (including ASCII characters)
+%% are given the same very high sorting weight to ensure that they come
+%% last when sorting alphabetically.
+%%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+
+
+%%
+%% CHARACTER SET
+%%
+\lowupcase{
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+}
+
+
+
+%%
+%% SORTING ORDER
+%%
+%%
+\order{
+ 0-9
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ A a
+ B b
+ C c
+ D d
+ E e
+ F f
+ G g
+ H h
+ I i
+ J j
+ K k
+ L l
+ M m
+ N n
+ O o
+ P p
+ Q q
+ R r
+ S s
+ T t
+ U u
+ V v
+ W w
+ X x
+ Y y
+ Z z
+}
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% END OF FILE %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
diff --git a/biblio/bibtex/contrib/gost/bibtex/ruscii.csf b/biblio/bibtex/contrib/gost/bibtex/ruscii.csf
new file mode 100644
index 0000000000..6f20a6f8af
--- /dev/null
+++ b/biblio/bibtex/contrib/gost/bibtex/ruscii.csf
@@ -0,0 +1,275 @@
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%%
+%% CHARACTER SET: Cyrillic (CP 866nav aka RUSCII)
+%%
+%% SORTING ORDER: Ukrainian/Russian (First Cyrillic then Latin)
+%%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%%
+%% FILE FORMAT
+%%
+%% The codepage and sorting order (CS) file defines how BibTeX will treat an
+%% 8-bit character set, specifically which characters are to be treated as
+%% letters, the upper/lower case relationships between characters, and the
+%% sorting order of characters.
+%%
+%% The CS file may contain a number of sections, each presented in the
+%% form of a TeX macro:
+%%
+%% \section-name{
+%% <section definitions>
+%% }
+%%
+%% Four sections are currently supported: \lowupcase, \lowercase, \uppercase
+%% and \order. The syntax of the four supported sections is summarised below.
+%%
+%% 8-bit characters may be entered naturally, but to avoid problems with
+%% character set translation or corruption, they can also be entered using
+%% the TeX-style portable notation for character codes, i.e. ^^XX, where XX
+%% is the hexadecimal value ofthe character code.
+%%
+%% Reading of the sections ends when the first '}' character is reached, so
+%% '}' can't be included in a section. You can't use ^^7d either.
+%%
+%% The percent sign ('%') is used to introduce a trailing comment - it and
+%% all remaining characters on a line are ignored. ^^25 has the same effect.
+%%
+%%
+%% \lowupcase section
+%%
+%% The \lowupcase section of the CS file is used to define the lower
+%% /upper and upper/lower case relationship of pairs of specified
+%% characters. It is only used if the relationship is symmetrical - use
+%% \lowercase or \upcase if it isn't.
+%%
+%% The syntax of the \lowupcase section is:
+%%
+%% \lowupcase{
+%% <LC-1> <UC-1> % Comment begins with a percent sign
+%% <LC-2> <UC-2>
+%% ...
+%% <LC-N> <UC-N>
+%% }
+%%
+%% Each <LC-n> <UC-n> pair of characters defines that the upper case
+%% equivalent of <LC-n> is <UC-n> *and* the lower case equivalent of
+%% <UC-n> is <LC-n>.
+%%
+%% You cannot redefine the lower or upper case equivalent of an ASCII
+%% character (code < 128), so all instances of <LC-n> and <UC-n>
+%% (i.e. both sides of the relationship) must have codes > 127.
+%%
+%%
+%% \lowercase section
+%%
+%% The \lowercase section of the CS file is used to define the lower case
+%% equivalent of specified characters. It should normally only be used
+%% if the relationship isn't symmetrical - use \lowupcase if it is.
+%%
+%% The syntax of the \lowercase section is:
+%%
+%% \lowercase{
+%% <UC-1> <LC-1> % Comment begins with a percent sign
+%% <UC-2> <LC-2>
+%% ...
+%% <UC-N> <LC-N>
+%% }
+%%
+%% Each <LC-n> <UC-n> pair of characters defines that the lower case
+%% equivalent of <UC-n> is <LC-n>.
+%%
+%% You cannot redefine the lower case equivalent of an ASCII character
+%% (code < 128), so all instances of <UC-n> (i.e. the left hand side
+%% of the relationship) must have codes > 127.
+%%
+%%
+%% \uppercase section
+%%
+%% The \uppercase section of the CS file is used to define the upper case
+%% equivalent of specified characters. It should normally only be used
+%% if the relationship isn't symmetrical - use \lowupcase if it is.
+%%
+%% The syntax of the \uppercase section is:
+%%
+%% \uppercase{
+%% <LC-1> <UC-1> % Comment begins with a percent sign
+%% <LC-2> <UC-2>
+%% ...
+%% <LC-N> <UC-N>
+%% }
+%%
+%% Each <LC-n> <UC-n> pair of characters defines that the upper case
+%% case equivalent of <LC-n> is <UC-n>.
+%%
+%% You cannot redefine the upper case equivalent of an ASCII character
+%% (code < 128), so all instances of <LC-n> (i.e. the left hand side
+%% of the relationship) must have codes > 127.
+%%
+%%
+%% \order section
+%%
+%% The \order section of the CS file is used to define the order in which
+%% characters are sorted.
+%%
+%% The syntax of the \order section is:
+%%
+%% \order{
+%% <char-1> % Comment begins with a percent sign
+%% <char-2> <char-3> % whitespace between the chars
+%% <char-4> - <char-5> % a hyphen between the chars
+%% <char-4> _ <char-5> % an underscore between the chars
+%% ...
+%% <char-n>
+%% }
+%%
+%% All characters on the same line are given the same sorting weight.
+%%
+%% The construct <char-1> <underscore> <char-2> is used to denote that
+%% all characters in the range <char-1> to <char-2> should be given the
+%% same sorting weight. For example, "A _ Z" would cause all ASCII
+%% upper case alphabetical characters to have the same sorting weight
+%% and would be equivalent to placing all 26 characters on the same line.
+%%
+%% The construct <char-1> <hyphen> <char-2> is used to denote that all
+%% characters in the range <char-1> to <char-2> should be given an
+%% ascending set of sorting weights, starting with <char-1> and ending
+%% with <char-2>. For example, "A - Z" would cause all upper case ASCII
+%% alphabetical characters to be sorted in ascending order and would be
+%% equivalent to placing 'A' on the first line, 'B' on the second,
+%% through to 'Z' on the 26th line.
+%%
+%% The characters at the beginning of the order section are given a lower
+%% sorting weight than characters occuring later. When sorting
+%% alphabetically, characters with the lowest weight come first.
+%%
+%% All characters not in the \order section (including ASCII characters)
+%% are given the same very high sorting weight to ensure that they come
+%% last when sorting alphabetically.
+%%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+
+
+%%
+%% CHARACTER SET
+%%
+\lowupcase{
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+}
+
+
+
+%%
+%% SORTING ORDER
+%%
+%%
+\order{
+ 0-9
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ A a
+ B b
+ C c
+ D d
+ E e
+ F f
+ G g
+ H h
+ I i
+ J j
+ K k
+ L l
+ M m
+ N n
+ O o
+ P p
+ Q q
+ R r
+ S s
+ T t
+ U u
+ V v
+ W w
+ X x
+ Y y
+ Z z
+}
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% END OF FILE %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
diff --git a/biblio/bibtex/contrib/gost/bibtex/utf8cyrillic.csf b/biblio/bibtex/contrib/gost/bibtex/utf8cyrillic.csf
new file mode 100644
index 0000000000..60d4550a13
--- /dev/null
+++ b/biblio/bibtex/contrib/gost/bibtex/utf8cyrillic.csf
@@ -0,0 +1,275 @@
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%%
+%% CHARACTER SET: Cyrillic (utf8)
+%%
+%% SORTING ORDER: Ukrainian/Russian (First Cyrillic then Latin)
+%%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%%
+%% FILE FORMAT
+%%
+%% The codepage and sorting order (CS) file defines how BibTeX will treat an
+%% 8-bit character set, specifically which characters are to be treated as
+%% letters, the upper/lower case relationships between characters, and the
+%% sorting order of characters.
+%%
+%% The CS file may contain a number of sections, each presented in the
+%% form of a TeX macro:
+%%
+%% \section-name{
+%% <section definitions>
+%% }
+%%
+%% Four sections are currently supported: \lowupcase, \lowercase, \uppercase
+%% and \order. The syntax of the four supported sections is summarised below.
+%%
+%% 8-bit characters may be entered naturally, but to avoid problems with
+%% character set translation or corruption, they can also be entered using
+%% the TeX-style portable notation for character codes, i.e. ^^XX, where XX
+%% is the hexadecimal value ofthe character code.
+%%
+%% Reading of the sections ends when the first '}' character is reached, so
+%% '}' can't be included in a section. You can't use ^^7d either.
+%%
+%% The percent sign ('%') is used to introduce a trailing comment - it and
+%% all remaining characters on a line are ignored. ^^25 has the same effect.
+%%
+%%
+%% \lowupcase section
+%%
+%% The \lowupcase section of the CS file is used to define the lower
+%% /upper and upper/lower case relationship of pairs of specified
+%% characters. It is only used if the relationship is symmetrical - use
+%% \lowercase or \upcase if it isn't.
+%%
+%% The syntax of the \lowupcase section is:
+%%
+%% \lowupcase{
+%% <LC-1> <UC-1> % Comment begins with a percent sign
+%% <LC-2> <UC-2>
+%% ...
+%% <LC-N> <UC-N>
+%% }
+%%
+%% Each <LC-n> <UC-n> pair of characters defines that the upper case
+%% equivalent of <LC-n> is <UC-n> *and* the lower case equivalent of
+%% <UC-n> is <LC-n>.
+%%
+%% You cannot redefine the lower or upper case equivalent of an ASCII
+%% character (code < 128), so all instances of <LC-n> and <UC-n>
+%% (i.e. both sides of the relationship) must have codes > 127.
+%%
+%%
+%% \lowercase section
+%%
+%% The \lowercase section of the CS file is used to define the lower case
+%% equivalent of specified characters. It should normally only be used
+%% if the relationship isn't symmetrical - use \lowupcase if it is.
+%%
+%% The syntax of the \lowercase section is:
+%%
+%% \lowercase{
+%% <UC-1> <LC-1> % Comment begins with a percent sign
+%% <UC-2> <LC-2>
+%% ...
+%% <UC-N> <LC-N>
+%% }
+%%
+%% Each <LC-n> <UC-n> pair of characters defines that the lower case
+%% equivalent of <UC-n> is <LC-n>.
+%%
+%% You cannot redefine the lower case equivalent of an ASCII character
+%% (code < 128), so all instances of <UC-n> (i.e. the left hand side
+%% of the relationship) must have codes > 127.
+%%
+%%
+%% \uppercase section
+%%
+%% The \uppercase section of the CS file is used to define the upper case
+%% equivalent of specified characters. It should normally only be used
+%% if the relationship isn't symmetrical - use \lowupcase if it is.
+%%
+%% The syntax of the \uppercase section is:
+%%
+%% \uppercase{
+%% <LC-1> <UC-1> % Comment begins with a percent sign
+%% <LC-2> <UC-2>
+%% ...
+%% <LC-N> <UC-N>
+%% }
+%%
+%% Each <LC-n> <UC-n> pair of characters defines that the upper case
+%% case equivalent of <LC-n> is <UC-n>.
+%%
+%% You cannot redefine the upper case equivalent of an ASCII character
+%% (code < 128), so all instances of <LC-n> (i.e. the left hand side
+%% of the relationship) must have codes > 127.
+%%
+%%
+%% \order section
+%%
+%% The \order section of the CS file is used to define the order in which
+%% characters are sorted.
+%%
+%% The syntax of the \order section is:
+%%
+%% \order{
+%% <char-1> % Comment begins with a percent sign
+%% <char-2> <char-3> % whitespace between the chars
+%% <char-4> - <char-5> % a hyphen between the chars
+%% <char-4> _ <char-5> % an underscore between the chars
+%% ...
+%% <char-n>
+%% }
+%%
+%% All characters on the same line are given the same sorting weight.
+%%
+%% The construct <char-1> <underscore> <char-2> is used to denote that
+%% all characters in the range <char-1> to <char-2> should be given the
+%% same sorting weight. For example, "A _ Z" would cause all ASCII
+%% upper case alphabetical characters to have the same sorting weight
+%% and would be equivalent to placing all 26 characters on the same line.
+%%
+%% The construct <char-1> <hyphen> <char-2> is used to denote that all
+%% characters in the range <char-1> to <char-2> should be given an
+%% ascending set of sorting weights, starting with <char-1> and ending
+%% with <char-2>. For example, "A - Z" would cause all upper case ASCII
+%% alphabetical characters to be sorted in ascending order and would be
+%% equivalent to placing 'A' on the first line, 'B' on the second,
+%% through to 'Z' on the 26th line.
+%%
+%% The characters at the beginning of the order section are given a lower
+%% sorting weight than characters occuring later. When sorting
+%% alphabetically, characters with the lowest weight come first.
+%%
+%% All characters not in the \order section (including ASCII characters)
+%% are given the same very high sorting weight to ensure that they come
+%% last when sorting alphabetically.
+%%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+
+
+%%
+%% CHARACTER SET
+%%
+\lowupcase{
+ а А
+ б Б
+ в В
+ г Г
+ ґ Ґ
+ д Д
+ е Е
+ є Є
+ ё Ё
+ ж Ж
+ з З
+ и И
+ і І
+ ї Ї
+ й Й
+ к К
+ л Л
+ м М
+ н Н
+ о О
+ п П
+ р Р
+ с С
+ т Т
+ у У
+ ф Ф
+ х Х
+ ц Ц
+ ч Ч
+ ш Ш
+ щ Щ
+ ъ Ъ
+ ы Ы
+ ь Ь
+ э Э
+ ю Ю
+ я Я
+}
+
+
+
+%%
+%% SORTING ORDER
+%%
+%%
+\order{
+ 0-9
+ А а
+ Б б
+ В в
+ Г г
+ Ґ ґ
+ Д д
+ Е е
+ Є є
+ Ё ё
+ Ж ж
+ З з
+ И и
+ І і
+ Ї ї
+ Й й
+ К к
+ Л л
+ М м
+ Н н
+ О о
+ П п
+ Р р
+ С с
+ Т т
+ У у
+ Ф ф
+ Х х
+ Ц ц
+ Ч ч
+ Ш ш
+ Щ щ
+ Ъ ъ
+ Ы ы
+ Ь ь
+ Э э
+ Ю ю
+ Я я
+ A a
+ B b
+ C c
+ D d
+ E e
+ F f
+ G g
+ H h
+ I i
+ J j
+ K k
+ L l
+ M m
+ N n
+ O o
+ P p
+ Q q
+ R r
+ S s
+ T t
+ U u
+ V v
+ W w
+ X x
+ Y y
+ Z z
+}
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% END OF FILE %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
diff --git a/biblio/bibtex/contrib/gost/doc/examples/cp1251/bib/ex01.bib b/biblio/bibtex/contrib/gost/doc/examples/cp1251/bib/ex01.bib
new file mode 100644
index 0000000000..57063ef0af
--- /dev/null
+++ b/biblio/bibtex/contrib/gost/doc/examples/cp1251/bib/ex01.bib
@@ -0,0 +1,9 @@
+@BOOK{Vasylenko92,
+ author = {, . .},
+ title = { : },
+ address = {.},
+ publisher = { },
+ year = {1992},
+ pagetotal = {430},
+ language = {ukrainian},
+}
diff --git a/biblio/bibtex/contrib/gost/doc/examples/cp1251/bib/ex02.bib b/biblio/bibtex/contrib/gost/doc/examples/cp1251/bib/ex02.bib
new file mode 100644
index 0000000000..28d34ab5e4
--- /dev/null
+++ b/biblio/bibtex/contrib/gost/doc/examples/cp1251/bib/ex02.bib
@@ -0,0 +1,10 @@
+@BOOK{Afanasyev92,
+ author = {, . . and , . .},
+ title = {
+ },
+ address = {.},
+ publisher = {},
+ year = {1992},
+ pagetotal = {190},
+ language = {russian},
+}
diff --git a/biblio/bibtex/contrib/gost/doc/examples/cp1251/bib/ex03.bib b/biblio/bibtex/contrib/gost/doc/examples/cp1251/bib/ex03.bib
new file mode 100644
index 0000000000..429a2da7fa
--- /dev/null
+++ b/biblio/bibtex/contrib/gost/doc/examples/cp1251/bib/ex03.bib
@@ -0,0 +1,11 @@
+@BOOK{Makilov91,
+ author = {, . . and , . .
+ and , . .},
+ title = {
+ },
+ address = {.},
+ publisher = {},
+ year = {1991},
+ pagetotal = {265},
+ language = {russian},
+}
diff --git a/biblio/bibtex/contrib/gost/doc/examples/cp1251/bib/ex04.bib b/biblio/bibtex/contrib/gost/doc/examples/cp1251/bib/ex04.bib
new file mode 100644
index 0000000000..5a838c074c
--- /dev/null
+++ b/biblio/bibtex/contrib/gost/doc/examples/cp1251/bib/ex04.bib
@@ -0,0 +1,11 @@
+@BOOK{Ponomarenko86,
+ title = { },
+ author = {. . and . .
+ and . . and . . },
+ editor = {. . },
+ address = {.},
+ publisher = {},
+ year = {1986},
+ pagetotal = {144},
+ language = {russian},
+}
diff --git a/biblio/bibtex/contrib/gost/doc/examples/cp1251/bib/ex05.bib b/biblio/bibtex/contrib/gost/doc/examples/cp1251/bib/ex05.bib
new file mode 100644
index 0000000000..b4acb9dd8e
--- /dev/null
+++ b/biblio/bibtex/contrib/gost/doc/examples/cp1251/bib/ex05.bib
@@ -0,0 +1,11 @@
+@BOOK{Belousova81,
+ title = {
+ },
+ author = {, . . and , . .
+ and , . . and others},
+ address = {.},
+ publisher = {},
+ year = {1981},
+ pagetotal = {62},
+ language = {russian},
+}
diff --git a/biblio/bibtex/contrib/gost/doc/examples/cp1251/bib/ex06.bib b/biblio/bibtex/contrib/gost/doc/examples/cp1251/bib/ex06.bib
new file mode 100644
index 0000000000..4de1c6bcf7
--- /dev/null
+++ b/biblio/bibtex/contrib/gost/doc/examples/cp1251/bib/ex06.bib
@@ -0,0 +1,12 @@
+@BOOK{BibOp91,
+ title = { :
+ },
+ organization = {. . .
+ . - .~.~. },
+ edition = {2-, .},
+ address = {.},
+ publisher = {.~},
+ year = {1991},
+ pagetotal = {224},
+ language = {russian},
+}
diff --git a/biblio/bibtex/contrib/gost/doc/examples/cp1251/bib/ex06a.bib b/biblio/bibtex/contrib/gost/doc/examples/cp1251/bib/ex06a.bib
new file mode 100644
index 0000000000..d595539ba9
--- /dev/null
+++ b/biblio/bibtex/contrib/gost/doc/examples/cp1251/bib/ex06a.bib
@@ -0,0 +1,10 @@
+@BOOK{Poems82,
+ title = { . ,
+ , : },
+ compiler = {. and . },
+ address = {.},
+ publisher = {. },
+ year = {1982},
+ pagetotal = {224},
+ language = {russian},
+}
diff --git a/biblio/bibtex/contrib/gost/doc/examples/cp1251/bib/ex07.bib b/biblio/bibtex/contrib/gost/doc/examples/cp1251/bib/ex07.bib
new file mode 100644
index 0000000000..8801a77719
--- /dev/null
+++ b/biblio/bibtex/contrib/gost/doc/examples/cp1251/bib/ex07.bib
@@ -0,0 +1,9 @@
+@BOOK{HistLit82,
+ title = { : 4 .},
+ organization = { , - .~.\ (.)},
+ address = {.},
+ year = {1982},
+ volume = {3: },
+ pagetotal = {876},
+ language = {russian},
+}
diff --git a/biblio/bibtex/contrib/gost/doc/examples/cp1251/bib/ex08.bib b/biblio/bibtex/contrib/gost/doc/examples/cp1251/bib/ex08.bib
new file mode 100644
index 0000000000..261cb27089
--- /dev/null
+++ b/biblio/bibtex/contrib/gost/doc/examples/cp1251/bib/ex08.bib
@@ -0,0 +1,10 @@
+@BOOK{Landau:eldin,
+ author = {. . and . . },
+ title = { : 10 .},
+ publisher = {. .\ .\ .-.\ .},
+ address = {.},
+ year = {1992},
+ volume = {VIII. },
+ edition = {3-, .},
+ language = {russian},
+}
diff --git a/biblio/bibtex/contrib/gost/doc/examples/cp1251/bib/ex09.bib b/biblio/bibtex/contrib/gost/doc/examples/cp1251/bib/ex09.bib
new file mode 100644
index 0000000000..cd31d23bec
--- /dev/null
+++ b/biblio/bibtex/contrib/gost/doc/examples/cp1251/bib/ex09.bib
@@ -0,0 +1,12 @@
+@BOOK{BRLS94,
+ title = { ii -i
+ i : 4 .},
+ organization = {.\ i. I- i.},
+ address = {i},
+ publisher = { i i},
+ year = {1994},
+ volume = {2: . 1900--1917 .},
+ editor = {. . and I. . },
+ pagetotal = {440},
+ language = {russian},
+}
diff --git a/biblio/bibtex/contrib/gost/doc/examples/cp1251/bib/ex10.bib b/biblio/bibtex/contrib/gost/doc/examples/cp1251/bib/ex10.bib
new file mode 100644
index 0000000000..5c3f395b64
--- /dev/null
+++ b/biblio/bibtex/contrib/gost/doc/examples/cp1251/bib/ex10.bib
@@ -0,0 +1,9 @@
+@BOOK{Grosse80,
+ author = {, . and , .},
+ title = { : .\ .},
+ address = {.},
+ publisher = {},
+ year = {1980},
+ pagetotal = {392},
+ language = {russian},
+}
diff --git a/biblio/bibtex/contrib/gost/doc/examples/cp1251/bib/ex11.bib b/biblio/bibtex/contrib/gost/doc/examples/cp1251/bib/ex11.bib
new file mode 100644
index 0000000000..4711209121
--- /dev/null
+++ b/biblio/bibtex/contrib/gost/doc/examples/cp1251/bib/ex11.bib
@@ -0,0 +1,11 @@
+@BOOK{GOST7184,
+ key = {},
+ title = { 7.1-84. .
+ .
+ --- 7.1-76~; . 01.01.86.},
+ address = {.},
+ publisher = {- },
+ year = {1984},
+ pagetotal = {78},
+ language = {russian},
+}
diff --git a/biblio/bibtex/contrib/gost/doc/examples/cp1251/bib/ex12.bib b/biblio/bibtex/contrib/gost/doc/examples/cp1251/bib/ex12.bib
new file mode 100644
index 0000000000..ecfc60291b
--- /dev/null
+++ b/biblio/bibtex/contrib/gost/doc/examples/cp1251/bib/ex12.bib
@@ -0,0 +1,8 @@
+@BOOK{ObchTech93,
+ title = { : ...},
+ address = {.},
+ publisher = {},
+ year = {1993},
+ pagetotal = {99},
+ language = {ukrainian},
+}
diff --git a/biblio/bibtex/contrib/gost/doc/examples/cp1251/bib/ex13.bib b/biblio/bibtex/contrib/gost/doc/examples/cp1251/bib/ex13.bib
new file mode 100644
index 0000000000..755ef6661e
--- /dev/null
+++ b/biblio/bibtex/contrib/gost/doc/examples/cp1251/bib/ex13.bib
@@ -0,0 +1,10 @@
+@BOOK{Bibdelo86,
+ title = { : . },
+ composer = {. . and . . },
+ edition = {2- .},
+ address = {.},
+ publisher = {},
+ year = {1986},
+ pagetotal = {224},
+ language = {russian},
+}
diff --git a/biblio/bibtex/contrib/gost/doc/examples/cp1251/bib/ex14.bib b/biblio/bibtex/contrib/gost/doc/examples/cp1251/bib/ex14.bib
new file mode 100644
index 0000000000..8ded1d318c
--- /dev/null
+++ b/biblio/bibtex/contrib/gost/doc/examples/cp1251/bib/ex14.bib
@@ -0,0 +1,11 @@
+@INBOOK{Ponomarenko79,
+ author = {, . .},
+ title = { },
+ booktitle = {
+ },
+ address = {.},
+ publisher = {},
+ year = {1979},
+ pages = {141-148},
+ language = {russian},
+}
diff --git a/biblio/bibtex/contrib/gost/doc/examples/cp1251/bib/ex14a.bib b/biblio/bibtex/contrib/gost/doc/examples/cp1251/bib/ex14a.bib
new file mode 100644
index 0000000000..13a5a7e4c5
--- /dev/null
+++ b/biblio/bibtex/contrib/gost/doc/examples/cp1251/bib/ex14a.bib
@@ -0,0 +1,11 @@
+@INBOOK{Zeyts70,
+ author = {, .},
+ title = { },
+ booktitle = { },
+ bookauthor = {, . and , .},
+ address = {.},
+ publisher = {},
+ year = {1970},
+ pages = {172--186},
+ language = {russian},
+}
diff --git a/biblio/bibtex/contrib/gost/doc/examples/cp1251/bib/ex15.bib b/biblio/bibtex/contrib/gost/doc/examples/cp1251/bib/ex15.bib
new file mode 100644
index 0000000000..ec178f2f01
--- /dev/null
+++ b/biblio/bibtex/contrib/gost/doc/examples/cp1251/bib/ex15.bib
@@ -0,0 +1,12 @@
+@INCOLLECTION{Ponoomarenko76,
+ author = {, . .},
+ title = {
+ },
+ booktitle = {
+ },
+ address = {},
+ publisher = { },
+ year = {1976},
+ pages = {3-16},
+ language = {russian},
+}
diff --git a/biblio/bibtex/contrib/gost/doc/examples/cp1251/bib/ex16.bib b/biblio/bibtex/contrib/gost/doc/examples/cp1251/bib/ex16.bib
new file mode 100644
index 0000000000..8db207bd87
--- /dev/null
+++ b/biblio/bibtex/contrib/gost/doc/examples/cp1251/bib/ex16.bib
@@ -0,0 +1,10 @@
+@ARTICLE{Malikov92,
+ author = {, . . and , . .},
+ title = {
+ },
+ journal = { },
+ year = {1992},
+ number = {6},
+ pages = {34-38},
+ language = {russian},
+}
diff --git a/biblio/bibtex/contrib/gost/doc/examples/cp1251/bib/ex17.bib b/biblio/bibtex/contrib/gost/doc/examples/cp1251/bib/ex17.bib
new file mode 100644
index 0000000000..39e1d292b4
--- /dev/null
+++ b/biblio/bibtex/contrib/gost/doc/examples/cp1251/bib/ex17.bib
@@ -0,0 +1,11 @@
+@ARTICLE{Ponomarenko86a,
+ author = {, . . and , . .},
+ title = {
+ },
+ journal = {.\ .\ . .\ .-.\ .\ },
+ year = {1986},
+ volume = {7},
+ number = {6},
+ pages = {79-83},
+ language = {russian},
+}
diff --git a/biblio/bibtex/contrib/gost/doc/examples/cp1251/bib/ex17a.bib b/biblio/bibtex/contrib/gost/doc/examples/cp1251/bib/ex17a.bib
new file mode 100644
index 0000000000..5351992600
--- /dev/null
+++ b/biblio/bibtex/contrib/gost/doc/examples/cp1251/bib/ex17a.bib
@@ -0,0 +1,8 @@
+@ARTICLE{dixit.pindyck:options,
+ title = {The Options Approach to Capital Investment},
+ author = {Avinash K. Dixit and Robert S. Pindyck},
+ journal = {Harvard Business Review},
+ year = {1995},
+ month = {May-June},
+ pages = {105--115},
+}
diff --git a/biblio/bibtex/contrib/gost/doc/examples/cp1251/bib/ex17b.bib b/biblio/bibtex/contrib/gost/doc/examples/cp1251/bib/ex17b.bib
new file mode 100644
index 0000000000..4407d93cf3
--- /dev/null
+++ b/biblio/bibtex/contrib/gost/doc/examples/cp1251/bib/ex17b.bib
@@ -0,0 +1,10 @@
+@ARTICLE{RosGaz-article,
+ title = {
+ },
+ journal = { },
+ year = {1997},
+ month = {19 },
+ pages = {4},
+ note = { . },
+ language = {russian},
+}
diff --git a/biblio/bibtex/contrib/gost/doc/examples/cp1251/bib/ex18.bib b/biblio/bibtex/contrib/gost/doc/examples/cp1251/bib/ex18.bib
new file mode 100644
index 0000000000..67a509d497
--- /dev/null
+++ b/biblio/bibtex/contrib/gost/doc/examples/cp1251/bib/ex18.bib
@@ -0,0 +1,11 @@
+@INBOOK{Dolmatovskiy88,
+ author = {, . .},
+ title = {},
+ booktitle = {},
+ edition = {3-},
+ address = {.},
+ year = {1988},
+ volume = {30},
+ pages = {72},
+ language = {russian},
+}
diff --git a/biblio/bibtex/contrib/gost/doc/examples/cp1251/bib/ex19.bib b/biblio/bibtex/contrib/gost/doc/examples/cp1251/bib/ex19.bib
new file mode 100644
index 0000000000..46d4523928
--- /dev/null
+++ b/biblio/bibtex/contrib/gost/doc/examples/cp1251/bib/ex19.bib
@@ -0,0 +1,14 @@
+@INPROCEEDINGS{Ponomarenko88,
+ author = {, . . and , . .},
+ title = {
+
+ },
+ booktitle = { .\ .\
+ << >> ( 88)},
+ volume = {1},
+ address = {},
+ publisher = { },
+ year = {1988},
+ pages = {149-153},
+ language = {russian},
+}
diff --git a/biblio/bibtex/contrib/gost/doc/examples/cp1251/bib/ex20.bib b/biblio/bibtex/contrib/gost/doc/examples/cp1251/bib/ex20.bib
new file mode 100644
index 0000000000..59d5fd3c67
--- /dev/null
+++ b/biblio/bibtex/contrib/gost/doc/examples/cp1251/bib/ex20.bib
@@ -0,0 +1,9 @@
+@INPROCEEDINGS{Melikov95,
+ author = {Melikov, A. Z. and Ponomarenko, L. A.},
+ title = {On the approach to optimal control
+ of queuing systems with multiple classes of customers},
+ booktitle = {Proc.\ International Conf.\ on Syst.\ Sci.\ XII.},
+ address = {Wroclaw (Poland)},
+ year = {1995},
+ pages = {507-515},
+}
diff --git a/biblio/bibtex/contrib/gost/doc/examples/cp1251/bib/ex20a.bib b/biblio/bibtex/contrib/gost/doc/examples/cp1251/bib/ex20a.bib
new file mode 100644
index 0000000000..510df37e95
--- /dev/null
+++ b/biblio/bibtex/contrib/gost/doc/examples/cp1251/bib/ex20a.bib
@@ -0,0 +1,28 @@
+@INPROCEEDINGS{Gojchuk98,
+ author = {, . .},
+ title = { 㳿
+ },
+ booktitle = {
+ },
+ editor = {, . . and others},
+ address = {.},
+ publisher = {},
+ year = {1998},
+ series = {. 8: ˳},
+ pages = {168--173},
+ language = {ukrainian},
+}
+
+@INPROCEEDINGS{Polyakov98a,
+ author = {. . },
+ title = {
+ },
+ crossref = {Gojchuk98},
+ annote = {
+ .
+
+
+
+ },
+ pages = {213--220},
+}
diff --git a/biblio/bibtex/contrib/gost/doc/examples/cp1251/bib/ex20b.bib b/biblio/bibtex/contrib/gost/doc/examples/cp1251/bib/ex20b.bib
new file mode 100644
index 0000000000..ee783d526d
--- /dev/null
+++ b/biblio/bibtex/contrib/gost/doc/examples/cp1251/bib/ex20b.bib
@@ -0,0 +1,16 @@
+@INPROCEEDINGS{TranskSpivrob99:Purich,
+ author = {, },
+ title = {{}-{} :
+ },
+ language = {russian},
+ booktitle = {
+ {} {}-{} {}: {}
+ },
+ editor = {, .},
+ address = {},
+ publisher = { },
+ organization = { },
+ year = {1999},
+ pagetotal = {196},
+ booklanguage = {ukrainian},
+}
diff --git a/biblio/bibtex/contrib/gost/doc/examples/cp1251/bib/ex20c.bib b/biblio/bibtex/contrib/gost/doc/examples/cp1251/bib/ex20c.bib
new file mode 100644
index 0000000000..002f8f4fb4
--- /dev/null
+++ b/biblio/bibtex/contrib/gost/doc/examples/cp1251/bib/ex20c.bib
@@ -0,0 +1,20 @@
+@INPROCEEDINGS{Selikov95,
+ author = {Selikov, A. Z. and Ponomarenko, L. A. and Qranamarenko, L. S. and Zonomarenko, L. U.},
+ title = {On the approach to optimal control
+ of queuing systems with multiple classes of customers},
+ booktitle = {Proc.\ International Conf.\ on Syst.\ Sci.\ XII.},
+ address = {Wroclaw (Poland)},
+ year = {1995},
+ pages = {507-515},
+}
+
+@INPROCEEDINGS{Selikov+95,
+ author = {, A. Z. and , L. A. and , L. S. and , . .},
+ title = {On the approach to optimal control
+ of queuing systems with multiple classes of customers},
+ booktitle = {Proc.\ International Conf.\ on Syst.\ Sci.\ XII.},
+ address = {Wroclaw (Poland)},
+ year = {1995},
+ pages = {507-515},
+ language = {russian},
+}
diff --git a/biblio/bibtex/contrib/gost/doc/examples/cp1251/bib/ex21.bib b/biblio/bibtex/contrib/gost/doc/examples/cp1251/bib/ex21.bib
new file mode 100644
index 0000000000..b3e88b84d2
--- /dev/null
+++ b/biblio/bibtex/contrib/gost/doc/examples/cp1251/bib/ex21.bib
@@ -0,0 +1,14 @@
+@PHDTHESIS{Luus82,
+ author = {, },
+ title = {
+ ,
+
+ },
+ type = { },
+ number = {05.05.04},
+ institution = {.\ .\ -},
+ address = {.},
+ year = {1982},
+ pagetotal = {212},
+ language = {russian},
+}
diff --git a/biblio/bibtex/contrib/gost/doc/examples/cp1251/bib/ex21a.bib b/biblio/bibtex/contrib/gost/doc/examples/cp1251/bib/ex21a.bib
new file mode 100644
index 0000000000..9eefa82a93
--- /dev/null
+++ b/biblio/bibtex/contrib/gost/doc/examples/cp1251/bib/ex21a.bib
@@ -0,0 +1,11 @@
+@DOCTHESIS{KIA95-default,
+ author = {, },
+ title = {
+ },
+ number = {01.04.08},
+ institution = {- .\ .~. },
+ address = {},
+ year = {1995},
+ pagetotal = {350},
+ language = {russian},
+}
diff --git a/biblio/bibtex/contrib/gost/doc/examples/cp1251/bib/ex21b.bib b/biblio/bibtex/contrib/gost/doc/examples/cp1251/bib/ex21b.bib
new file mode 100644
index 0000000000..49be181505
--- /dev/null
+++ b/biblio/bibtex/contrib/gost/doc/examples/cp1251/bib/ex21b.bib
@@ -0,0 +1,17 @@
+@MASTERSTHESIS{mastersthesis-minimal,
+ title = {Mastering Thesis Writing},
+ author = {{\'{E}}douard Masterly},
+ year = {1988},
+ institution = {Stanford University},
+}
+
+@MASTERSTHESIS{mastersthesis-full,
+ title = {Mastering Thesis Writing},
+ author = {{\'{E}}douard Masterly},
+ month = jun,
+ note = {This is a full MASTERSTHESIS entry},
+ type = {Master's project},
+ year = {1988},
+ address = {English Department},
+ institution = {Stanford University},
+}
diff --git a/biblio/bibtex/contrib/gost/doc/examples/cp1251/bib/ex23.bib b/biblio/bibtex/contrib/gost/doc/examples/cp1251/bib/ex23.bib
new file mode 100644
index 0000000000..8919d9102e
--- /dev/null
+++ b/biblio/bibtex/contrib/gost/doc/examples/cp1251/bib/ex23.bib
@@ -0,0 +1,11 @@
+@BOOK{Ponomarenko76,
+ author = {, . . and , . .},
+ title = {
+
+ },
+ address = {.},
+ year = {1976},
+ pagetotal = {37},
+ language = {russian},
+ note = {(./ . - ; 76-76)},
+}
diff --git a/biblio/bibtex/contrib/gost/doc/examples/cp1251/bib/ex24.bib b/biblio/bibtex/contrib/gost/doc/examples/cp1251/bib/ex24.bib
new file mode 100644
index 0000000000..7f94e041da
--- /dev/null
+++ b/biblio/bibtex/contrib/gost/doc/examples/cp1251/bib/ex24.bib
@@ -0,0 +1,15 @@
+@REPORT{Report81-rep,
+ title = {
+ {-2-12-}
+ {-2-12-Dz}},
+ institution = {.\ .\ - .\ -},
+ address = {.},
+ organization = {},
+ year = {1981},
+ pagetotal = {90},
+ type = { {}},
+ editor = {, . .},
+ author = {, . . and others},
+ note = {.\ 119692},
+ language = {russian},
+}
diff --git a/biblio/bibtex/contrib/gost/doc/examples/cp1251/bib/ex24a.bib b/biblio/bibtex/contrib/gost/doc/examples/cp1251/bib/ex24a.bib
new file mode 100644
index 0000000000..4d0612148f
--- /dev/null
+++ b/biblio/bibtex/contrib/gost/doc/examples/cp1251/bib/ex24a.bib
@@ -0,0 +1,12 @@
+@REPORT{Report81b-rep-notype,
+ title = {
+ {-2-12-}
+ {-2-12-Dz}},
+ institution = {.\ .\ - .\ -},
+ address = {.},
+ organization = {},
+ year = {1981},
+ pagetotal = {90},
+ note = {.\ 119692},
+ language = {russian},
+}
diff --git a/biblio/bibtex/contrib/gost/doc/examples/cp1251/bib/ex24b.bib b/biblio/bibtex/contrib/gost/doc/examples/cp1251/bib/ex24b.bib
new file mode 100644
index 0000000000..e9377071aa
--- /dev/null
+++ b/biblio/bibtex/contrib/gost/doc/examples/cp1251/bib/ex24b.bib
@@ -0,0 +1,14 @@
+@TECHREPORT{Report81-techrep,
+ title = {
+ {-2-12-}
+ {-2-12-Dz}},
+ institution = {.\ .\ - .\ -},
+ address = {.},
+ organization = {},
+ year = {1981},
+ pagetotal = {90},
+ editor = {, . .},
+ author = {, . . and others},
+ note = {.\ 119692},
+ language = {russian},
+}
diff --git a/biblio/bibtex/contrib/gost/doc/examples/cp1251/bib/ex25.bib b/biblio/bibtex/contrib/gost/doc/examples/cp1251/bib/ex25.bib
new file mode 100644
index 0000000000..2e8efb6726
--- /dev/null
+++ b/biblio/bibtex/contrib/gost/doc/examples/cp1251/bib/ex25.bib
@@ -0,0 +1,11 @@
+@BOOK{CatalogMamals81,
+ title = { .
+ "--- },
+ organization = { , .\ -},
+ editor = {. . and . . },
+ address = {.},
+ publisher = {, .\ -},
+ year = {1981},
+ pagetotal = {456},
+ language = {russian},
+}
diff --git a/biblio/bibtex/contrib/gost/doc/examples/cp1251/bib/ex26.bib b/biblio/bibtex/contrib/gost/doc/examples/cp1251/bib/ex26.bib
new file mode 100644
index 0000000000..62820b280e
--- /dev/null
+++ b/biblio/bibtex/contrib/gost/doc/examples/cp1251/bib/ex26.bib
@@ -0,0 +1,12 @@
+@BOOK{Instr86,
+ title = {
+ ~:
+ 34-70-044-85~: . . . .
+ 01.10.85~:
+ 01.01.86 01.01.95},
+ organization = {- },
+ address = {.},
+ year = {1986},
+ pagetotal = {43},
+ language = {russian},
+}
diff --git a/biblio/bibtex/contrib/gost/doc/examples/cp1251/bib/ex27a.bib b/biblio/bibtex/contrib/gost/doc/examples/cp1251/bib/ex27a.bib
new file mode 100644
index 0000000000..9b58759802
--- /dev/null
+++ b/biblio/bibtex/contrib/gost/doc/examples/cp1251/bib/ex27a.bib
@@ -0,0 +1,18 @@
+@ONLINE{wiki:latex,
+ author = {Wikipedia},
+ title = {{\LaTeX}---Wikipedia{,} The Free Encyclopedia},
+ year = {2012},
+ url = {http://en.wikipedia.org/wiki/LaTeX},
+ urldate = {25.01.2012},
+}
+
+@ONLINE{wiki:latex-2,
+ author = {Wikipedia},
+ title = {{\LaTeX}},
+ howpublished = {Wikipedia, The Free Encyclopedia},
+ year = {2012},
+ eprint = {wiki/LaTeX},
+ eprinttype = {WikiPedia},
+ url = {http://en.wikipedia.org/wiki/LaTeX},
+ urldate = {25.01.2012},
+}
diff --git a/biblio/bibtex/contrib/gost/doc/examples/cp1251/bib/ex27b.bib b/biblio/bibtex/contrib/gost/doc/examples/cp1251/bib/ex27b.bib
new file mode 100644
index 0000000000..d298189634
--- /dev/null
+++ b/biblio/bibtex/contrib/gost/doc/examples/cp1251/bib/ex27b.bib
@@ -0,0 +1,10 @@
+@ONLINE{phys:moodle,
+ author = {, . .},
+ title = { },
+ howpublished = { },
+ organization = {},
+ year = {2012},
+ url = {http://www.phys.nsu.ru/moodle/},
+ urldate = {16.01.2012},
+ language = {russian},
+}
diff --git a/biblio/bibtex/contrib/gost/doc/examples/cp1251/bib/ex27c.bib b/biblio/bibtex/contrib/gost/doc/examples/cp1251/bib/ex27c.bib
new file mode 100644
index 0000000000..35f92171c2
--- /dev/null
+++ b/biblio/bibtex/contrib/gost/doc/examples/cp1251/bib/ex27c.bib
@@ -0,0 +1,8 @@
+@MISC{EXFOR,
+ author = {IAEA},
+ title = {{EXFOR}---Experimental Nuclear Reaction Data },
+ url = {http://www-nds.iaea.org/exfor},
+ address = {P.O. Box 100, Wagramer Strasse 5, A-1400 Vienna, Austria},
+ year = {2012},
+ media = {eresource}
+}
diff --git a/biblio/bibtex/contrib/gost/doc/examples/cp1251/bib/ex28.bib b/biblio/bibtex/contrib/gost/doc/examples/cp1251/bib/ex28.bib
new file mode 100644
index 0000000000..530ca4e2eb
--- /dev/null
+++ b/biblio/bibtex/contrib/gost/doc/examples/cp1251/bib/ex28.bib
@@ -0,0 +1,25 @@
+@BOOK{IsaacNewton,
+ author = {Newton, {\relax Sir Isaac}},
+ title = {Opticks, or a treatise of the reflections,
+ refractions, inflections and colours of light},
+ publisher = {William Innys},
+ url = {http://books.google.com/books?id=XXu4AkRVBBoC},
+ media = {eresource},
+ year = {1730},
+ pagetotal = {382},
+ eprint = {XXu4AkRVBBoC},
+ eprinttype = {Google Books},
+}
+
+@BOOK{IsaacNewton-sl:sn,
+ author = {{\relax Sir I}saac Newton},
+ title = {Opticks, or a treatise of the reflections,
+ refractions, inflections and colours of light},
+ url = {http://books.google.com/books?id=XXu4AkRVBBoC},
+ media = {online},
+ year = {1730},
+ pagetotal = {382},
+ eprint = {XXu4AkRVBBoC},
+ eprinttype = {Google Books},
+}
+% publisher = {William Innys},
diff --git a/biblio/bibtex/contrib/gost/doc/examples/cp1251/bib/ex28a.bib b/biblio/bibtex/contrib/gost/doc/examples/cp1251/bib/ex28a.bib
new file mode 100644
index 0000000000..856f384899
--- /dev/null
+++ b/biblio/bibtex/contrib/gost/doc/examples/cp1251/bib/ex28a.bib
@@ -0,0 +1,32 @@
+@BOOK{Encyclopedia,
+ title = { },
+ publisher = { . .},
+ year = {1996},
+ address = {.},
+ note = {1 . . (CD-ROM)},
+ language = {russian},
+ media = {eresource},
+}
+
+@ARTICLE{Nasirova,
+ title = { },
+ author = {, . .},
+ language = {russian},
+ note = { : http://vestnik.fa.ru/4(28)2003/4.html},
+ number = {4},
+ year = {2003},
+ journal = { },
+ media2 = {eresource},
+ media = {online},
+}
+
+@BOOK{kremlincd,
+ title = { },
+ titleaddon = {. },
+ language = {russian},
+ note = {CD-ROM},
+ date = {2007},
+ location = {.},
+ publisher = { },
+ media = {eresource},
+}
diff --git a/biblio/bibtex/contrib/gost/doc/examples/cp1251/bib/ex29.bib b/biblio/bibtex/contrib/gost/doc/examples/cp1251/bib/ex29.bib
new file mode 100644
index 0000000000..416cb5b91c
--- /dev/null
+++ b/biblio/bibtex/contrib/gost/doc/examples/cp1251/bib/ex29.bib
@@ -0,0 +1,15 @@
+@ARTICLE{PhysRevLett.101.085006,
+ author = {Kotelnikov, Igor and Rom\'e, Massimiliano},
+ volume = {101},
+ journal = {Phys. Rev. Lett.},
+ month = {Aug},
+ pagetotal = {4},
+ title = {Admissible Equilibria of Non-neutral Plasmas in a Malmberg-Penning Trap},
+ year = {2008},
+ doi = {10.1103/PhysRevLett.101.085006},
+ issue = {8},
+ publisher = {American Physical Society},
+ pages = {085006},
+}
+
+% url = {http://link.aps.org/doi/10.1103/PhysRevLett.101.085006},
diff --git a/biblio/bibtex/contrib/gost/doc/examples/cp1251/bib/ex30.bib b/biblio/bibtex/contrib/gost/doc/examples/cp1251/bib/ex30.bib
new file mode 100644
index 0000000000..836bc7e5ad
--- /dev/null
+++ b/biblio/bibtex/contrib/gost/doc/examples/cp1251/bib/ex30.bib
@@ -0,0 +1,27 @@
+@ARTICLE{1998PhRvE..57.7111K,
+ author = {{Kinney}, R.~M. and {McWilliams}, J.~C.},
+ title = {{Turbulent cascades in anisotropic magnetohydrodynamics}},
+ journal = pre,
+ keywords = {Plasma turbulence, Magnetohydrodynamic and fluid equation},
+ year = {1998},
+ month = jun,
+ volume = {57},
+ pages = {7111-7121},
+ doi = {10.1103/PhysRevE.57.7111},
+ adsurl = {http://adsabs.harvard.edu/abs/1998PhRvE..57.7111K},
+ adsnote = {Provided by the SAO/NASA Astrophysics Data System},
+}
+
+@ARTICLE{1998UFN,
+ author = {, . . and , . .},
+ title = { },
+ journal = ufn,
+ keywords = { , },
+ year = {2015},
+ month = jul,
+ volume = {185},
+ pages = {753-771},
+ language = {russian},
+ doi = {10.3367/UFNr.0185.201507c.0753},
+ url = {http://ufn.ru/ru/articles/2015/7/c/},
+}
diff --git a/biblio/bibtex/contrib/gost/doc/examples/cp1251/bib/ex31.bib b/biblio/bibtex/contrib/gost/doc/examples/cp1251/bib/ex31.bib
new file mode 100644
index 0000000000..4ea961f068
--- /dev/null
+++ b/biblio/bibtex/contrib/gost/doc/examples/cp1251/bib/ex31.bib
@@ -0,0 +1,40 @@
+@PATENT{patent1,
+ author = {. . },
+ authorcountry = {},
+ title = { -},
+ media = {text},
+ type = {},
+ number = {1095735},
+ location = {. },
+ ipc = {\ensuremath{^7} B 64 G 1/00},
+ holder = { /, .},
+ credits = {. . .},
+ requestnumber = {000108705/28},
+ requestdate = {07.04.2000},
+ publicationdate = {10.03.2001},
+ publication = {. 7 (I .)},
+ prioritydate= {09.04.1999},
+ prioritynumber = {09/289, 037},
+ prioritycountry = {},
+ pagetotal = {5 .~: .},
+ language = {russian},
+}
+
+@PATENT{patent2,
+ author = {. . },
+ authorcountry = {},
+ title = { },
+ media = {text},
+ type = {.},
+ number = {2000131736/09},
+ location = {. },
+ ipc = {\ensuremath{^7} H 04 1/38, 04 J 13/00},
+ holder = { . .-. - .},
+ credits = {. . .},
+ requestnumber = {000108705/28},
+ date = {18.12.2000},
+ publicationdate = {20.08.2002},
+ publication = {. 23 (II .)},
+ pagetotal = {2 .~: .},
+ language = {russian},
+}
diff --git a/biblio/bibtex/contrib/gost/doc/examples/cp1251/bib/examples.bib b/biblio/bibtex/contrib/gost/doc/examples/cp1251/bib/examples.bib
new file mode 100644
index 0000000000..f3c17bdef3
--- /dev/null
+++ b/biblio/bibtex/contrib/gost/doc/examples/cp1251/bib/examples.bib
@@ -0,0 +1,606 @@
+@BOOK{Vasylenko92,
+ author = {, . .},
+ title = { : },
+ address = {.},
+ publisher = { },
+ year = {1992},
+ pagetotal = {430},
+ language = {ukrainian},
+}
+@BOOK{Afanasyev92,
+ author = {, . . and , . .},
+ title = {
+ },
+ address = {.},
+ publisher = {},
+ year = {1992},
+ pagetotal = {190},
+ language = {russian},
+}
+@BOOK{Makilov91,
+ author = {, . . and , . .
+ and , . .},
+ title = {
+ },
+ address = {.},
+ publisher = {},
+ year = {1991},
+ pagetotal = {265},
+ language = {russian},
+}
+@BOOK{Ponomarenko86,
+ title = { },
+ author = {. . and . .
+ and . . and . . },
+ editor = {. . },
+ address = {.},
+ publisher = {},
+ year = {1986},
+ pagetotal = {144},
+ language = {russian},
+}
+@BOOK{Belousova81,
+ title = {
+ },
+ author = {, . . and , . .
+ and , . . and others},
+ address = {.},
+ publisher = {},
+ year = {1981},
+ pagetotal = {62},
+ language = {russian},
+}
+@BOOK{BibOp91,
+ title = { :
+ },
+ organization = {. . .
+ . - .~.~. },
+ edition = {2-, .},
+ address = {.},
+ publisher = {.~},
+ year = {1991},
+ pagetotal = {224},
+ language = {russian},
+}
+@BOOK{Poems82,
+ title = { . ,
+ , : },
+ compiler = {. and . },
+ address = {.},
+ publisher = {. },
+ year = {1982},
+ pagetotal = {224},
+ language = {russian},
+}
+@BOOK{HistLit82,
+ title = { : 4 .},
+ organization = { , - .~.\ (.)},
+ address = {.},
+ year = {1982},
+ volume = {3: },
+ pagetotal = {876},
+ language = {russian},
+}
+@BOOK{Landau:eldin,
+ author = {. . and . . },
+ title = { : 10 .},
+ publisher = {. .\ .\ .-.\ .},
+ address = {.},
+ year = {1992},
+ volume = {VIII. },
+ edition = {3-, .},
+ language = {russian},
+}
+@BOOK{BRLS94,
+ title = { ii -i
+ i : 4 .},
+ organization = {.\ i. I- i.},
+ address = {i},
+ publisher = { i i},
+ year = {1994},
+ volume = {2: . 1900--1917 .},
+ editor = {. . and I. . },
+ pagetotal = {440},
+ language = {russian},
+}
+@BOOK{Grosse80,
+ author = {, . and , .},
+ title = { : .\ .},
+ address = {.},
+ publisher = {},
+ year = {1980},
+ pagetotal = {392},
+ language = {russian},
+}
+@BOOK{GOST7184,
+ key = {},
+ title = { 7.1-84. .
+ .
+ --- 7.1-76~; . 01.01.86.},
+ address = {.},
+ publisher = {- },
+ year = {1984},
+ pagetotal = {78},
+ language = {russian},
+}
+@BOOK{ObchTech93,
+ title = { : ...},
+ address = {.},
+ publisher = {},
+ year = {1993},
+ pagetotal = {99},
+ language = {ukrainian},
+}
+@BOOK{Bibdelo86,
+ title = { : . },
+ composer = {. . and . . },
+ edition = {2- .},
+ address = {.},
+ publisher = {},
+ year = {1986},
+ pagetotal = {224},
+ language = {russian},
+}
+@INBOOK{Ponomarenko79,
+ author = {, . .},
+ title = { },
+ booktitle = {
+ },
+ address = {.},
+ publisher = {},
+ year = {1979},
+ pages = {141-148},
+ language = {russian},
+}
+@INBOOK{Zeyts70,
+ author = {, .},
+ title = { },
+ booktitle = { },
+ bookauthor = {, . and , .},
+ address = {.},
+ publisher = {},
+ year = {1970},
+ pages = {172--186},
+ language = {russian},
+}
+@INCOLLECTION{Ponoomarenko76,
+ author = {, . .},
+ title = {
+ },
+ booktitle = {
+ },
+ address = {},
+ publisher = { },
+ year = {1976},
+ pages = {3-16},
+ language = {russian},
+}
+@ARTICLE{Malikov92,
+ author = {, . . and , . .},
+ title = {
+ },
+ journal = { },
+ year = {1992},
+ number = {6},
+ pages = {34-38},
+ language = {russian},
+}
+@ARTICLE{Ponomarenko86a,
+ author = {, . . and , . .},
+ title = {
+ },
+ journal = {.\ .\ . .\ .-.\ .\ },
+ year = {1986},
+ volume = {7},
+ number = {6},
+ pages = {79-83},
+ language = {russian},
+}
+@ARTICLE{dixit.pindyck:options,
+ title = {The Options Approach to Capital Investment},
+ author = {Avinash K. Dixit and Robert S. Pindyck},
+ journal = {Harvard Business Review},
+ year = {1995},
+ month = {May-June},
+ pages = {105--115},
+}
+@ARTICLE{RosGaz-article,
+ title = {
+ },
+ journal = { },
+ year = {1997},
+ month = {19 },
+ pages = {4},
+ note = { . },
+ language = {russian},
+}
+@INBOOK{Dolmatovskiy88,
+ author = {, . .},
+ title = {},
+ booktitle = {},
+ edition = {3-},
+ address = {.},
+ year = {1988},
+ volume = {30},
+ pages = {72},
+ language = {russian},
+}
+@INPROCEEDINGS{Ponomarenko88,
+ author = {, . . and , . .},
+ title = {
+
+ },
+ booktitle = { .\ .\
+ << >> ( 88)},
+ volume = {1},
+ address = {},
+ publisher = { },
+ year = {1988},
+ pages = {149-153},
+ language = {russian},
+}
+@INPROCEEDINGS{Melikov95,
+ author = {Melikov, A. Z. and Ponomarenko, L. A.},
+ title = {On the approach to optimal control
+ of queuing systems with multiple classes of customers},
+ booktitle = {Proc.\ International Conf.\ on Syst.\ Sci.\ XII.},
+ address = {Wroclaw (Poland)},
+ year = {1995},
+ pages = {507-515},
+}
+@INPROCEEDINGS{Gojchuk98,
+ author = {, . .},
+ title = { 㳿
+ },
+ booktitle = {
+ },
+ editor = {, . . and others},
+ address = {.},
+ publisher = {},
+ year = {1998},
+ series = {. 8: ˳},
+ pages = {168--173},
+ language = {ukrainian},
+}
+
+@INPROCEEDINGS{Polyakov98a,
+ author = {. . },
+ title = {
+ },
+ crossref = {Gojchuk98},
+ annote = {
+ .
+
+
+
+ },
+ pages = {213--220},
+}
+@INPROCEEDINGS{TranskSpivrob99:Purich,
+ author = {, },
+ title = {{}-{} :
+ },
+ language = {russian},
+ booktitle = {
+ {} {}-{} {}: {}
+ },
+ editor = {, .},
+ address = {},
+ publisher = { },
+ organization = { },
+ year = {1999},
+ pagetotal = {196},
+ booklanguage = {ukrainian},
+}
+@INPROCEEDINGS{Selikov95,
+ author = {Selikov, A. Z. and Ponomarenko, L. A. and Qranamarenko, L. S. and Zonomarenko, L. U.},
+ title = {On the approach to optimal control
+ of queuing systems with multiple classes of customers},
+ booktitle = {Proc.\ International Conf.\ on Syst.\ Sci.\ XII.},
+ address = {Wroclaw (Poland)},
+ year = {1995},
+ pages = {507-515},
+}
+
+@INPROCEEDINGS{Selikov+95,
+ author = {, A. Z. and , L. A. and , L. S. and , . .},
+ title = {On the approach to optimal control
+ of queuing systems with multiple classes of customers},
+ booktitle = {Proc.\ International Conf.\ on Syst.\ Sci.\ XII.},
+ address = {Wroclaw (Poland)},
+ year = {1995},
+ pages = {507-515},
+ language = {russian},
+}
+@PHDTHESIS{Luus82,
+ author = {, },
+ title = {
+ ,
+
+ },
+ type = { },
+ number = {05.05.04},
+ institution = {.\ .\ -},
+ address = {.},
+ year = {1982},
+ pagetotal = {212},
+ language = {russian},
+}
+@DOCTHESIS{KIA95-default,
+ author = {, },
+ title = {
+ },
+ number = {01.04.08},
+ institution = {- .\ .~. },
+ address = {},
+ year = {1995},
+ pagetotal = {350},
+ language = {russian},
+}
+@MASTERSTHESIS{mastersthesis-minimal,
+ title = {Mastering Thesis Writing},
+ author = {{\'{E}}douard Masterly},
+ year = {1988},
+ institution = {Stanford University},
+}
+
+@MASTERSTHESIS{mastersthesis-full,
+ title = {Mastering Thesis Writing},
+ author = {{\'{E}}douard Masterly},
+ month = jun,
+ note = {This is a full MASTERSTHESIS entry},
+ type = {Master's project},
+ year = {1988},
+ address = {English Department},
+ institution = {Stanford University},
+}
+@BOOK{Ponomarenko76,
+ author = {, . . and , . .},
+ title = {
+
+ },
+ address = {.},
+ year = {1976},
+ pagetotal = {37},
+ language = {russian},
+ note = {(./ . - ; 76-76)},
+}
+@REPORT{Report81-rep,
+ title = {
+ {-2-12-}
+ {-2-12-Dz}},
+ institution = {.\ .\ - .\ -},
+ address = {.},
+ organization = {},
+ year = {1981},
+ pagetotal = {90},
+ type = { {}},
+ editor = {, . .},
+ author = {, . . and others},
+ note = {.\ 119692},
+ language = {russian},
+}
+@REPORT{Report81b-rep-notype,
+ title = {
+ {-2-12-}
+ {-2-12-Dz}},
+ institution = {.\ .\ - .\ -},
+ address = {.},
+ organization = {},
+ year = {1981},
+ pagetotal = {90},
+ note = {.\ 119692},
+ language = {russian},
+}
+@TECHREPORT{Report81-techrep,
+ title = {
+ {-2-12-}
+ {-2-12-Dz}},
+ institution = {.\ .\ - .\ -},
+ address = {.},
+ organization = {},
+ year = {1981},
+ pagetotal = {90},
+ editor = {, . .},
+ author = {, . . and others},
+ note = {.\ 119692},
+ language = {russian},
+}
+@BOOK{CatalogMamals81,
+ title = { .
+ "--- },
+ organization = { , .\ -},
+ editor = {. . and . . },
+ address = {.},
+ publisher = {, .\ -},
+ year = {1981},
+ pagetotal = {456},
+ language = {russian},
+}
+@BOOK{Instr86,
+ title = {
+ ~:
+ 34-70-044-85~: . . . .
+ 01.10.85~:
+ 01.01.86 01.01.95},
+ organization = {- },
+ address = {.},
+ year = {1986},
+ pagetotal = {43},
+ language = {russian},
+}
+@ONLINE{wiki:latex,
+ author = {Wikipedia},
+ title = {{\LaTeX}---Wikipedia{,} The Free Encyclopedia},
+ year = {2012},
+ url = {http://en.wikipedia.org/wiki/LaTeX},
+ urldate = {25.01.2012},
+}
+
+@ONLINE{wiki:latex-2,
+ author = {Wikipedia},
+ title = {{\LaTeX}},
+ howpublished = {Wikipedia, The Free Encyclopedia},
+ year = {2012},
+ eprint = {wiki/LaTeX},
+ eprinttype = {WikiPedia},
+ url = {http://en.wikipedia.org/wiki/LaTeX},
+ urldate = {25.01.2012},
+}
+@ONLINE{phys:moodle,
+ author = {, . .},
+ title = { },
+ howpublished = { },
+ organization = {},
+ year = {2012},
+ url = {http://www.phys.nsu.ru/moodle/},
+ urldate = {16.01.2012},
+ language = {russian},
+}
+@MISC{EXFOR,
+ author = {IAEA},
+ title = {{EXFOR}---Experimental Nuclear Reaction Data },
+ url = {http://www-nds.iaea.org/exfor},
+ address = {P.O. Box 100, Wagramer Strasse 5, A-1400 Vienna, Austria},
+ year = {2012},
+ media = {eresource}
+}
+@BOOK{IsaacNewton,
+ author = {Newton, {\relax Sir Isaac}},
+ title = {Opticks, or a treatise of the reflections,
+ refractions, inflections and colours of light},
+ publisher = {William Innys},
+ url = {http://books.google.com/books?id=XXu4AkRVBBoC},
+ media = {eresource},
+ year = {1730},
+ pagetotal = {382},
+ eprint = {XXu4AkRVBBoC},
+ eprinttype = {Google Books},
+}
+
+@BOOK{IsaacNewton-sl:sn,
+ author = {{\relax Sir I}saac Newton},
+ title = {Opticks, or a treatise of the reflections,
+ refractions, inflections and colours of light},
+ url = {http://books.google.com/books?id=XXu4AkRVBBoC},
+ media = {online},
+ year = {1730},
+ pagetotal = {382},
+ eprint = {XXu4AkRVBBoC},
+ eprinttype = {Google Books},
+}
+% publisher = {William Innys},
+@BOOK{Encyclopedia,
+ title = { },
+ publisher = { . .},
+ year = {1996},
+ address = {.},
+ note = {1 . . (CD-ROM)},
+ language = {russian},
+ media = {eresource},
+}
+
+@ARTICLE{Nasirova,
+ title = { },
+ author = {, . .},
+ language = {russian},
+ note = { : http://vestnik.fa.ru/4(28)2003/4.html},
+ number = {4},
+ year = {2003},
+ journal = { },
+ media2 = {eresource},
+ media = {online},
+}
+
+@BOOK{kremlincd,
+ title = { },
+ titleaddon = {. },
+ language = {russian},
+ note = {CD-ROM},
+ date = {2007},
+ location = {.},
+ publisher = { },
+ media = {eresource},
+}
+@ARTICLE{PhysRevLett.101.085006,
+ author = {Kotelnikov, Igor and Rom\'e, Massimiliano},
+ volume = {101},
+ journal = {Phys. Rev. Lett.},
+ month = {Aug},
+ pagetotal = {4},
+ title = {Admissible Equilibria of Non-neutral Plasmas in a Malmberg-Penning Trap},
+ year = {2008},
+ doi = {10.1103/PhysRevLett.101.085006},
+ issue = {8},
+ publisher = {American Physical Society},
+ pages = {085006},
+}
+
+% url = {http://link.aps.org/doi/10.1103/PhysRevLett.101.085006},
+@ARTICLE{1998PhRvE..57.7111K,
+ author = {{Kinney}, R.~M. and {McWilliams}, J.~C.},
+ title = {{Turbulent cascades in anisotropic magnetohydrodynamics}},
+ journal = pre,
+ keywords = {Plasma turbulence, Magnetohydrodynamic and fluid equation},
+ year = {1998},
+ month = jun,
+ volume = {57},
+ pages = {7111-7121},
+ doi = {10.1103/PhysRevE.57.7111},
+ adsurl = {http://adsabs.harvard.edu/abs/1998PhRvE..57.7111K},
+ adsnote = {Provided by the SAO/NASA Astrophysics Data System},
+}
+
+@ARTICLE{1998UFN,
+ author = {, . . and , . .},
+ title = { },
+ journal = ufn,
+ keywords = { , },
+ year = {2015},
+ month = jul,
+ volume = {185},
+ pages = {753-771},
+ language = {russian},
+ doi = {10.3367/UFNr.0185.201507c.0753},
+ url = {http://ufn.ru/ru/articles/2015/7/c/},
+}
+@PATENT{patent1,
+ author = {. . },
+ authorcountry = {},
+ title = { -},
+ media = {text},
+ type = {},
+ number = {1095735},
+ location = {. },
+ ipc = {\ensuremath{^7} B 64 G 1/00},
+ holder = { /, .},
+ credits = {. . .},
+ requestnumber = {000108705/28},
+ requestdate = {07.04.2000},
+ publicationdate = {10.03.2001},
+ publication = {. 7 (I .)},
+ prioritydate= {09.04.1999},
+ prioritynumber = {09/289, 037},
+ prioritycountry = {},
+ pagetotal = {5 .~: .},
+ language = {russian},
+}
+
+@PATENT{patent2,
+ author = {. . },
+ authorcountry = {},
+ title = { },
+ media = {text},
+ type = {.},
+ number = {2000131736/09},
+ location = {. },
+ ipc = {\ensuremath{^7} H 04 1/38, 04 J 13/00},
+ holder = { . .-. - .},
+ credits = {. . .},
+ requestnumber = {000108705/28},
+ date = {18.12.2000},
+ publicationdate = {20.08.2002},
+ publication = {. 23 (II .)},
+ pagetotal = {2 .~: .},
+ language = {russian},
+}
diff --git a/biblio/bibtex/contrib/gost/doc/examples/cp1251/gost.tex b/biblio/bibtex/contrib/gost/doc/examples/cp1251/gost.tex
new file mode 100644
index 0000000000..71ca598681
--- /dev/null
+++ b/biblio/bibtex/contrib/gost/doc/examples/cp1251/gost.tex
@@ -0,0 +1,195 @@
+\documentclass[a4paper]{article}
+ % cmap inputenc, utf8
+\usepackage{cmap}
+\usepackage[T2A]{fontenc}
+\usepackage[cp1251]{inputenc}
+\usepackage[russian]{babel}
+\usepackage{bibunits,verbatim,geometry,ifpdf}
+
+%============================================================
+\makeatletter
+\RequirePackage{bibunits}
+\renewcommand{\@bibunitname}{\jobname-\the\@bibunitauxcnt}
+\newcounter{qnum}\newcounter{qnuma}\setcounter{qnum}{0}
+\def\@biblabel#1{#1.\hfill}
+%\endinput
+\renewenvironment{thebibliography}[1]
+ {\list{\@biblabel{\@arabic\c@enumiv}}%
+ {\settowidth\labelwidth{\@biblabel{99}}%
+ \leftmargin\labelwidth
+ \advance\leftmargin\labelsep
+% \advance\leftmargin\parindent
+ \setcounter{qnuma}{\c@enumiv}
+ \@openbib@code
+ \usecounter{enumiv}%
+ \let\p@enumiv\@empty
+ \setcounter{enumiv}{\theqnuma}
+ \renewcommand\theenumiv{\@arabic\c@enumiv}}%
+ \sloppy
+ \clubpenalty4000
+ \@clubpenalty \clubpenalty
+ \widowpenalty4000%
+ \sfcode`\.\@m}
+ {\def\@noitemerr
+ {\@latex@warning{Empty `thebibliography' environment}}%
+ \endlist}
+\makeatother
+%============================================================
+
+\ifpdf
+ \usepackage[pdftex,hyperindex,unicode]{hyperref}
+\else
+ \usepackage[hypertex]{hyperref}
+\fi
+\usepackage{color}
+\definecolor{darkblue}{rgb}{0,0,.6}
+\hypersetup{
+ pdftitle = {\mytitle},
+ pdfauthor = {Igor A. Kotelnikov},
+ pdfsubject = {GOST, BibTeX},
+ pdfstartview = {FitH},
+% pdfborder = {0 0 0},
+% bookmarksopen = true,
+ bookmarksnumbered = true,
+% bookmarksopenlevel = 2,
+ colorlinks = true, linkcolor = darkblue,
+ citecolor = darkblue, filecolor = darkblue,
+ menucolor = darkblue, urlcolor = darkblue
+}
+
+
+\begin{document}
+
+\newcommand{\bibentry}[1]{
+\begin{bibunit}
+\nocite{*}
+\putbib[bib/#1]
+\nopagebreak
+\verbatiminput{bib/#1.bib}
+\end{bibunit}
+}
+
+\title{\mytitle}
+\maketitle
+\begin{abstract}
+ \mydescription
+\end{abstract}
+
+\bibliographyunit[\section]
+\bibliographystyle{\mybibstyle}
+
+\section{Books}
+
+\subsection{One--three authors}
+\bibentry{ex01}
+\bibentry{ex02}
+\bibentry{ex03}
+
+\subsection{Four and more authors}
+\bibentry{ex04}
+\bibentry{ex05}
+
+\subsection{Collective author}
+\bibentry{ex06}
+
+\subsection{Compiler}
+\bibentry{ex06a}
+
+\subsection{Multiple-volume publications}
+\bibentry{ex07}
+\bibentry{ex08}
+\bibentry{ex09}
+
+\subsection{Translated}
+\bibentry{ex10}
+
+\subsection{Collections}
+\bibentry{ex12}
+
+\subsection{Dictionary}
+\bibentry{ex13}
+
+
+\section{Parts of \ldots}
+
+\subsection{Book}
+\bibentry{ex14}
+\bibentry{ex14a}
+
+\subsection{Collection}
+\bibentry{ex15}
+
+\subsection{Journal}
+\bibentry{ex16}
+\bibentry{ex17}
+\bibentry{ex17a}
+
+\subsection{Newspaper}
+\bibentry{ex17b}
+
+\subsection{Encyclopedia}
+\bibentry{ex18}
+
+\subsection{Proceedings}
+\bibentry{ex19}
+\bibentry{ex20}
+
+\subsubsection{With crossreference}
+\bibentry{ex20a}
+
+\subsubsection{With multiple languages}
+\bibentry{ex20b}
+
+
+\section{Others}
+
+\subsection{Standard}
+\bibentry{ex11}
+
+\subsection{Dissertation}
+\bibentry{ex21}
+\bibentry{ex21a}
+\bibentry{ex21b}
+Allowed built-in values of \verb|type| field in \verb|@THESIS| entry are \verb|mathesis| for masters thesis, \verb|phdthesis| for Ph.D. thesis, and \verb|docthesis| for doctor of sciences dissertation. Any other value of \verb|type| is reproduced literally.
+\bibentry{ex22}
+\bibentry{ex22a}
+
+\subsection{Preprint}
+\bibentry{ex23}
+
+\subsection{Report}
+\bibentry{ex24}
+\bibentry{ex24a}
+\bibentry{ex24b}
+
+\subsection{Catalog}
+\bibentry{ex25}
+
+\subsection{Instruction}
+\bibentry{ex26}
+
+\subsection{Patent}
+\bibentry{ex31}
+
+
+\section{Electronic resources}
+
+\subsection{Common Fields}
+\verb|Url|, \verb|eprint|, \verb|doi| and \verb|media| fields can be assigned to any entry. Allowed values of \verb|media| are \verb|online|, \verb|eresource| and \verb|text| (default).
+\bibentry{ex27c}
+\bibentry{ex28}
+\bibentry{ex28a}
+\bibentry{ex29}
+
+\subsection{Online Entry}
+\bibentry{ex27a}
+\bibentry{ex27b}
+
+\section{Use of macros}
+
+\texttt{jan}, \texttt{feb}, \texttt{mar},\ldots{} \texttt{dec} macros in \texttt{month} field
+are automatically translated to Russian or English if necessary. Other languages are not supported.
+\bibentry{ex30}
+
+
+\end{document} \ No newline at end of file
diff --git a/biblio/bibtex/contrib/gost/doc/examples/cp1251/gost2003.pdf b/biblio/bibtex/contrib/gost/doc/examples/cp1251/gost2003.pdf
new file mode 100644
index 0000000000..ec6e396e08
--- /dev/null
+++ b/biblio/bibtex/contrib/gost/doc/examples/cp1251/gost2003.pdf
Binary files differ
diff --git a/biblio/bibtex/contrib/gost/doc/examples/cp1251/gost2003.tex b/biblio/bibtex/contrib/gost/doc/examples/cp1251/gost2003.tex
new file mode 100644
index 0000000000..1dbe684d6c
--- /dev/null
+++ b/biblio/bibtex/contrib/gost/doc/examples/cp1251/gost2003.tex
@@ -0,0 +1,16 @@
+\edef\mybibstyle{gost2003}
+\RequirePackage[cp1251]{inputenc}
+\newcommand*{\mytitle}{The GOST bundle: \mybibstyle.bst}
+\newcommand{\mydescription}{
+ Example bibliographic description using the style \texttt{\mybibstyle.bst}.
+ No customization is applied.
+
+ \texttt{\mybibstyle.bst}.
+ .
+
+ This is style is intended for composing bibliographic catalogs and descriptions.
+
+ .
+
+}
+\input gost \ No newline at end of file
diff --git a/biblio/bibtex/contrib/gost/doc/examples/cp1251/gost2008-customized.pdf b/biblio/bibtex/contrib/gost/doc/examples/cp1251/gost2008-customized.pdf
new file mode 100644
index 0000000000..7732e939b6
--- /dev/null
+++ b/biblio/bibtex/contrib/gost/doc/examples/cp1251/gost2008-customized.pdf
Binary files differ
diff --git a/biblio/bibtex/contrib/gost/doc/examples/cp1251/gost2008-customized.tex b/biblio/bibtex/contrib/gost/doc/examples/cp1251/gost2008-customized.tex
new file mode 100644
index 0000000000..9e095c5c58
--- /dev/null
+++ b/biblio/bibtex/contrib/gost/doc/examples/cp1251/gost2008-customized.tex
@@ -0,0 +1,18 @@
+\edef\mybibstyle{gost2008}
+\RequirePackage[cp1251]{inputenc}
+\newcommand*{\mytitle}{The GOST bundle: customization}
+\newcommand{\mydescription}{
+ Example of a bibliography using the style \texttt{\mybibstyle.bst}.
+ Customization is applied.
+% \protect\verb|\providecommand*{\BibEmph}[1]{#1}|\\
+% \protect\verb|\providecommand*{\BibDash}{}|
+
+
+ \texttt{\mybibstyle.bst}.
+ .
+% \protect\verb|\providecommand*{\BibEmph}[1]{\#1}|\\
+% \protect\verb|\providecommand*{\BibDash}{}|
+}
+\providecommand*{\BibEmph}[1]{\textbf{#1}}
+\providecommand*{\BibDash}{}
+\input gost
diff --git a/biblio/bibtex/contrib/gost/doc/examples/cp1251/gost2008.pdf b/biblio/bibtex/contrib/gost/doc/examples/cp1251/gost2008.pdf
new file mode 100644
index 0000000000..317bc4d616
--- /dev/null
+++ b/biblio/bibtex/contrib/gost/doc/examples/cp1251/gost2008.pdf
Binary files differ
diff --git a/biblio/bibtex/contrib/gost/doc/examples/cp1251/gost2008.tex b/biblio/bibtex/contrib/gost/doc/examples/cp1251/gost2008.tex
new file mode 100644
index 0000000000..6f74b26e90
--- /dev/null
+++ b/biblio/bibtex/contrib/gost/doc/examples/cp1251/gost2008.tex
@@ -0,0 +1,12 @@
+\edef\mybibstyle{gost2008}
+\RequirePackage[cp1251]{inputenc}
+\newcommand*{\mytitle}{The GOST bundle: \mybibstyle.bst}
+\newcommand{\mydescription}{
+ Example of a bibliography using the style \texttt{\mybibstyle.bst}.
+ No customization is applied.
+
+
+ \texttt{\mybibstyle.bst}.
+ .
+}
+\input gost
diff --git a/biblio/bibtex/contrib/gost/doc/examples/cp1251/gost2008l.pdf b/biblio/bibtex/contrib/gost/doc/examples/cp1251/gost2008l.pdf
new file mode 100644
index 0000000000..c2b666f215
--- /dev/null
+++ b/biblio/bibtex/contrib/gost/doc/examples/cp1251/gost2008l.pdf
Binary files differ
diff --git a/biblio/bibtex/contrib/gost/doc/examples/cp1251/gost2008l.tex b/biblio/bibtex/contrib/gost/doc/examples/cp1251/gost2008l.tex
new file mode 100644
index 0000000000..2ba60bb037
--- /dev/null
+++ b/biblio/bibtex/contrib/gost/doc/examples/cp1251/gost2008l.tex
@@ -0,0 +1,16 @@
+\edef\mybibstyle{gost2008l}
+\RequirePackage[cp1251]{inputenc}
+\newcommand*{\mytitle}{The GOST bundle: \mybibstyle.bst}
+\newcommand{\mydescription}{
+ Example of a bibliography using the style \texttt{\mybibstyle.bst}.
+ No customization is applied.
+
+
+ \texttt{\mybibstyle.bst}.
+ .
+
+ Note: this style do not conform State Standard.
+
+ : .
+}
+\input gost
diff --git a/biblio/bibtex/contrib/gost/doc/examples/cp1251/gost2008n.pdf b/biblio/bibtex/contrib/gost/doc/examples/cp1251/gost2008n.pdf
new file mode 100644
index 0000000000..fc7d40fd5a
--- /dev/null
+++ b/biblio/bibtex/contrib/gost/doc/examples/cp1251/gost2008n.pdf
Binary files differ
diff --git a/biblio/bibtex/contrib/gost/doc/examples/cp1251/gost2008n.tex b/biblio/bibtex/contrib/gost/doc/examples/cp1251/gost2008n.tex
new file mode 100644
index 0000000000..db27fa6ee1
--- /dev/null
+++ b/biblio/bibtex/contrib/gost/doc/examples/cp1251/gost2008n.tex
@@ -0,0 +1,118 @@
+% !Mode:: "TeX:UTF-8"
+\newcommand*{\mybibstyle}{gost2008n}
+
+\RequirePackage[cp1251]{inputenc}
+
+\newcommand*{\mytitle}{The GOST bundle: \mybibstyle.bst}
+\newcommand{\mydescription}{
+ Example of a bibliography using the style \texttt{\mybibstyle.bst}
+ and \texttt{natbib} package.
+ No customization is applied.
+
+
+ \texttt{\mybibstyle.bst} \texttt{natbib}.
+ .
+}
+
+\documentclass[a4paper]{article}
+\usepackage[cp1251]{inputenc}
+\usepackage[T2A]{fontenc}
+\usepackage[ukrainian,russian]{babel}
+\usepackage{natbib}
+\usepackage{geometry,ifpdf}
+\ifpdf
+ \usepackage[pdftex,hyperindex,unicode]{hyperref}
+ \usepackage{cmap}
+\else
+ \usepackage[hypertex]{hyperref}
+\fi
+\usepackage{color}
+\definecolor{darkblue}{rgb}{0,0,.6}
+\hypersetup{
+ pdftitle = {\mytitle},
+ pdfauthor = {Igor A. Kotelnikov},
+ pdfsubject = {GOST, BibTeX},
+ pdfstartview = {FitH},
+% pdfborder = {0 0 0},
+% bookmarksopen = true,
+ bookmarksnumbered = true,
+% bookmarksopenlevel = 2,
+ colorlinks = true, linkcolor = darkblue,
+ citecolor = darkblue, filecolor = darkblue,
+ menucolor = darkblue, urlcolor = darkblue
+}
+
+\makeatletter
+\renewcommand{\@biblabel}[1]{#1.}
+\makeatother
+
+\begin{document}
+
+\title{\mytitle}
+\maketitle
+\begin{abstract}
+ \mydescription
+\end{abstract}
+
+\newcommand{\allrefs}{Vasylenko92,
+Afanasyev92,
+Makilov91,
+Ponomarenko86,
+Belousova81,
+BibOp91,
+Poems82,
+HistLit82,
+Landau:eldin,
+BRLS94,
+Grosse80,
+GOST7184,
+ObchTech93,
+Bibdelo86,
+Ponomarenko79,
+Zeyts70,
+Ponoomarenko76,
+Malikov92,
+Ponomarenko86a,
+dixit.pindyck:options,
+RosGaz-article,
+Dolmatovskiy88,
+Ponomarenko88,
+Melikov95, Selikov95, Selikov+95,
+Gojchuk98,
+Polyakov98a,
+TranskSpivrob99:Purich,
+Luus82,
+KIA95-default,
+KIA85-autoref,
+Ponomarenko76,
+Report81-rep,
+Report81b-rep-notype,
+Report81-techrep,
+CatalogMamals81,
+Instr86,
+wiki:latex,
+wiki:latex-2,
+phys:moodle,
+EXFOR,
+IsaacNewton,
+IsaacNewton-sl:sn,
+PhysRevLett.101.085006}
+
+
+\verb|\cite|\par \cite{\allrefs}
+
+\verb|\citep|\par \citep{\allrefs}
+
+\verb|\citep*|\par \citep{\allrefs}
+
+\verb|\citeauthor|\par \citeauthor{\allrefs}
+
+\verb|\citeauthor*|\par \citeauthor*{\allrefs}
+
+
+\bibliographystyle{\mybibstyle}
+\bibliography{bib/examples}
+
+\end{document}
+
+
diff --git a/biblio/bibtex/contrib/gost/doc/examples/cp1251/gost2008ns.pdf b/biblio/bibtex/contrib/gost/doc/examples/cp1251/gost2008ns.pdf
new file mode 100644
index 0000000000..6349c96af5
--- /dev/null
+++ b/biblio/bibtex/contrib/gost/doc/examples/cp1251/gost2008ns.pdf
Binary files differ
diff --git a/biblio/bibtex/contrib/gost/doc/examples/cp1251/gost2008ns.tex b/biblio/bibtex/contrib/gost/doc/examples/cp1251/gost2008ns.tex
new file mode 100644
index 0000000000..7b1613b8ff
--- /dev/null
+++ b/biblio/bibtex/contrib/gost/doc/examples/cp1251/gost2008ns.tex
@@ -0,0 +1,122 @@
+% !Mode:: "TeX:UTF-8"
+\newcommand*{\mybibstyle}{gost2008ns}
+
+\RequirePackage[cp1251]{inputenc}
+
+\newcommand*{\mytitle}{The GOST bundle: \mybibstyle.bst}
+\newcommand{\mydescription}{
+ Example of a bibliography using the style \texttt{\mybibstyle.bst}
+ and \texttt{natbib} package.
+ No customization is applied.
+
+
+ \texttt{\mybibstyle.bst} \texttt{natbib}.
+ .
+}
+
+\documentclass[a4paper]{article}
+\usepackage[cp1251]{inputenc}
+\usepackage[T2A]{fontenc}
+\usepackage[ukrainian,russian]{babel}
+\usepackage{natbib}
+\usepackage{geometry,ifpdf}
+\ifpdf
+ \usepackage[pdftex,hyperindex,unicode]{hyperref}
+ \usepackage{cmap}
+\else
+ \usepackage[hypertex]{hyperref}
+\fi
+\usepackage{color}
+\definecolor{darkblue}{rgb}{0,0,.6}
+\hypersetup{
+ pdftitle = {\mytitle},
+ pdfauthor = {Igor A. Kotelnikov},
+ pdfsubject = {GOST, BibTeX},
+ pdfstartview = {FitH},
+% pdfborder = {0 0 0},
+% bookmarksopen = true,
+ bookmarksnumbered = true,
+% bookmarksopenlevel = 2,
+ colorlinks = true, linkcolor = darkblue,
+ citecolor = darkblue, filecolor = darkblue,
+ menucolor = darkblue, urlcolor = darkblue
+}
+
+\makeatletter
+\renewcommand{\@biblabel}[1]{#1.}
+\makeatother
+
+\begin{document}
+
+\title{\mytitle}
+\maketitle
+\begin{abstract}
+ \mydescription
+\end{abstract}
+
+%\verb|\cite{*}| \cite{*}
+%
+%\verb|\citep{*}| \citep{*}
+%
+%\verb|\citet{*}| \citet{*}
+
+\newcommand{\allrefs}{Vasylenko92,
+Afanasyev92,
+Makilov91,
+Ponomarenko86,
+Belousova81,
+BibOp91,
+Poems82,
+HistLit82,
+Landau:eldin,
+BRLS94,
+Grosse80,
+GOST7184,
+ObchTech93,
+Bibdelo86,
+Ponomarenko79,
+Zeyts70,
+Ponoomarenko76,
+Malikov92,
+Ponomarenko86a,
+dixit.pindyck:options,
+RosGaz-article,
+Dolmatovskiy88,
+Ponomarenko88,
+Melikov95, Selikov95, Selikov+95,
+Gojchuk98,
+Polyakov98a,
+TranskSpivrob99:Purich,
+Luus82,
+KIA95-default,
+KIA85-autoref,
+Ponomarenko76,
+Report81-rep,
+Report81b-rep-notype,
+Report81-techrep,
+CatalogMamals81,
+Instr86,
+wiki:latex,
+wiki:latex-2,
+phys:moodle,
+EXFOR,
+IsaacNewton,
+IsaacNewton-sl:sn,
+PhysRevLett.101.085006}
+
+
+\verb|\citep|\par \citep{\allrefs}
+
+\verb|\citep*|\par \citep{\allrefs}
+
+\verb|\citeauthor|\par \citeauthor{\allrefs}
+
+\verb|\citeauthor*|\par \citeauthor*{\allrefs}
+
+
+\bibliographystyle{\mybibstyle}
+\bibliography{bib/examples}
+
+\end{document}
+
+
diff --git a/biblio/bibtex/contrib/gost/doc/examples/cp1251/gost780.pdf b/biblio/bibtex/contrib/gost/doc/examples/cp1251/gost780.pdf
new file mode 100644
index 0000000000..b24f7d2e3d
--- /dev/null
+++ b/biblio/bibtex/contrib/gost/doc/examples/cp1251/gost780.pdf
Binary files differ
diff --git a/biblio/bibtex/contrib/gost/doc/examples/cp1251/gost780.tex b/biblio/bibtex/contrib/gost/doc/examples/cp1251/gost780.tex
new file mode 100644
index 0000000000..2d9e4aa9d8
--- /dev/null
+++ b/biblio/bibtex/contrib/gost/doc/examples/cp1251/gost780.tex
@@ -0,0 +1,15 @@
+\edef\mybibstyle{gost780}
+\newcommand*{\mytitle}{The GOST bundle: \mybibstyle.bst}
+\newcommand{\mydescription}{
+ Example of a bibliography using the style \texttt{\mybibstyle.bst}.
+ \texttt{\mybibstyle.bst}.
+
+
+ \texttt{\mybibstyle.bst}.
+
+ Note: this is obsolete style.
+
+ : .
+
+}
+\input gost \ No newline at end of file
diff --git a/biblio/bibtex/contrib/gost/doc/examples/cp1251/make-examples-on-win-cp1251.cmd b/biblio/bibtex/contrib/gost/doc/examples/cp1251/make-examples-on-win-cp1251.cmd
new file mode 100644
index 0000000000..7fa6c61ce3
--- /dev/null
+++ b/biblio/bibtex/contrib/gost/doc/examples/cp1251/make-examples-on-win-cp1251.cmd
@@ -0,0 +1,34 @@
+@echo ⮢ 䠩 ਬ஢
+@echo ==========================
+
+@echo २ ।饣 饣 䠩
+
+rename .\bib\examples.bib examples.bak
+
+@echo ஢ 쪨 䠩 让
+
+copy .\bib\ex*.bib .\bib\examples.bib
+
+@echo ᪠ ਬ஢
+
+for %%f in (gost7*.tex) do pdflatex -quiet %%f
+for %%f in (gost200*.tex) do pdflatex -quiet %%f
+
+@echo ᪠ ࠡ⪠ bibtex8 *.aux, ⮣ '㤠 㤥'
+
+for %%f in (gost*.aux) do bibtex8 -B -c cp1251.csf %%f
+
+@echo ᪠ ਬ஢ (室 ᫥ bibtex8)
+
+for %%f in (gost7*.tex) do pdflatex %%f
+for %%f in (gost200*.tex) do pdflatex %%f
+for %%f in (gost2008-nat*.tex) do pdflatex %%f
+for %%f in (gost2008-sort*.tex) do pdflatex %%f
+
+@echo ⪠ 㦭 䠩
+
+@del *.aux *.out *.toc *.brf .pdf
+@del *.bbl
+@del *.blg
+@del *.log
+@echo =======
diff --git a/biblio/bibtex/contrib/gost/doc/examples/utf8/bib/ex01.bib b/biblio/bibtex/contrib/gost/doc/examples/utf8/bib/ex01.bib
new file mode 100644
index 0000000000..e6640b9602
--- /dev/null
+++ b/biblio/bibtex/contrib/gost/doc/examples/utf8/bib/ex01.bib
@@ -0,0 +1,9 @@
+@BOOK{Vasylenko92,
+ author = {Василенко, М. В.},
+ title = {Теорія коливань: Навчальний посібник},
+ address = {К.},
+ publisher = {Вища школа},
+ year = {1992},
+ pagetotal = {430},
+ language = {ukrainian},
+}
diff --git a/biblio/bibtex/contrib/gost/doc/examples/utf8/bib/ex02.bib b/biblio/bibtex/contrib/gost/doc/examples/utf8/bib/ex02.bib
new file mode 100644
index 0000000000..6e1c190f7c
--- /dev/null
+++ b/biblio/bibtex/contrib/gost/doc/examples/utf8/bib/ex02.bib
@@ -0,0 +1,10 @@
+@BOOK{Afanasyev92,
+ author = {Афанасьев, В. В. and Василевский, О. Н.},
+ title = {Расчеты электрических цепей
+ на программируемых микрокалькуляторах},
+ address = {М.},
+ publisher = {Энергоиздат},
+ year = {1992},
+ pagetotal = {190},
+ language = {russian},
+}
diff --git a/biblio/bibtex/contrib/gost/doc/examples/utf8/bib/ex03.bib b/biblio/bibtex/contrib/gost/doc/examples/utf8/bib/ex03.bib
new file mode 100644
index 0000000000..ea27f04c08
--- /dev/null
+++ b/biblio/bibtex/contrib/gost/doc/examples/utf8/bib/ex03.bib
@@ -0,0 +1,11 @@
+@BOOK{Makilov91,
+ author = {Меликов, А. З. and Пономаренко, Л. А.
+ and Рюмшин, П. А.},
+ title = {Математические модели многопотоковых
+ систем обслуживания},
+ address = {К.},
+ publisher = {Техніка},
+ year = {1991},
+ pagetotal = {265},
+ language = {russian},
+}
diff --git a/biblio/bibtex/contrib/gost/doc/examples/utf8/bib/ex04.bib b/biblio/bibtex/contrib/gost/doc/examples/utf8/bib/ex04.bib
new file mode 100644
index 0000000000..ff7d6ac21f
--- /dev/null
+++ b/biblio/bibtex/contrib/gost/doc/examples/utf8/bib/ex04.bib
@@ -0,0 +1,11 @@
+@BOOK{Ponomarenko86,
+ title = {Основы создания гибких атоматизированных производств},
+ author = {Л. А. Пономаренко and Л. В. Адамович
+ and В. Т. Музычук and А. Е. Гридасов},
+ editor = {Б. Б. Тимофеева},
+ address = {К.},
+ publisher = {Техніка},
+ year = {1986},
+ pagetotal = {144},
+ language = {russian},
+}
diff --git a/biblio/bibtex/contrib/gost/doc/examples/utf8/bib/ex05.bib b/biblio/bibtex/contrib/gost/doc/examples/utf8/bib/ex05.bib
new file mode 100644
index 0000000000..2717a9c46c
--- /dev/null
+++ b/biblio/bibtex/contrib/gost/doc/examples/utf8/bib/ex05.bib
@@ -0,0 +1,11 @@
+@BOOK{Belousova81,
+ title = {Системный анализ инфраструктуры
+ как элемент народного хозяйства},
+ author = {Белоусова, Н. И. and Вишняк, Е. И.
+ and Левит, В. Ю. and others},
+ address = {М.},
+ publisher = {Экономика},
+ year = {1981},
+ pagetotal = {62},
+ language = {russian},
+}
diff --git a/biblio/bibtex/contrib/gost/doc/examples/utf8/bib/ex06.bib b/biblio/bibtex/contrib/gost/doc/examples/utf8/bib/ex06.bib
new file mode 100644
index 0000000000..be51612340
--- /dev/null
+++ b/biblio/bibtex/contrib/gost/doc/examples/utf8/bib/ex06.bib
@@ -0,0 +1,12 @@
+@BOOK{BibOp91,
+ title = {Составление библиографического описания:
+ Краткие правила},
+ organization = {Междувед. каталогизац. комис.
+ при Гос. б-ке СССР им.~В.~И. Ленина},
+ edition = {2-е, доп.},
+ address = {М.},
+ publisher = {Кн.~палата},
+ year = {1991},
+ pagetotal = {224},
+ language = {russian},
+}
diff --git a/biblio/bibtex/contrib/gost/doc/examples/utf8/bib/ex06a.bib b/biblio/bibtex/contrib/gost/doc/examples/utf8/bib/ex06a.bib
new file mode 100644
index 0000000000..e4e96e837c
--- /dev/null
+++ b/biblio/bibtex/contrib/gost/doc/examples/utf8/bib/ex06a.bib
@@ -0,0 +1,10 @@
+@BOOK{Poems82,
+ title = {Стихи о музыке. Русские,
+ советские, зарубежные поэты: Сборник},
+ compiler = {А. Бирюкова and В. Татаринов},
+ address = {М.},
+ publisher = {Сов. композитор},
+ year = {1982},
+ pagetotal = {224},
+ language = {russian},
+}
diff --git a/biblio/bibtex/contrib/gost/doc/examples/utf8/bib/ex07.bib b/biblio/bibtex/contrib/gost/doc/examples/utf8/bib/ex07.bib
new file mode 100644
index 0000000000..b9191a0406
--- /dev/null
+++ b/biblio/bibtex/contrib/gost/doc/examples/utf8/bib/ex07.bib
@@ -0,0 +1,9 @@
+@BOOK{HistLit82,
+ title = {История русской литературы: В 4 т.},
+ organization = {АН СССР, Ин-т рус.~лит.\ (Пушкин.дом)},
+ address = {М.},
+ year = {1982},
+ volume = {3: Расцвет реализма},
+ pagetotal = {876},
+ language = {russian},
+}
diff --git a/biblio/bibtex/contrib/gost/doc/examples/utf8/bib/ex08.bib b/biblio/bibtex/contrib/gost/doc/examples/utf8/bib/ex08.bib
new file mode 100644
index 0000000000..deffa99448
--- /dev/null
+++ b/biblio/bibtex/contrib/gost/doc/examples/utf8/bib/ex08.bib
@@ -0,0 +1,10 @@
+@BOOK{Landau:eldin,
+ author = {Л. Д. Ландау and Е. М. Лифшиц},
+ title = {Теоретическая физика: учебное пособие в 10 т.},
+ publisher = {Наука. Гл.\ ред.\ физ.-мат.\ лит.},
+ address = {М.},
+ year = {1992},
+ volume = {VIII. Электродинамика сплошных сред},
+ edition = {3-е, испр.},
+ language = {russian},
+}
diff --git a/biblio/bibtex/contrib/gost/doc/examples/utf8/bib/ex09.bib b/biblio/bibtex/contrib/gost/doc/examples/utf8/bib/ex09.bib
new file mode 100644
index 0000000000..b465fc9aea
--- /dev/null
+++ b/biblio/bibtex/contrib/gost/doc/examples/utf8/bib/ex09.bib
@@ -0,0 +1,12 @@
+@BOOK{BRLS94,
+ title = {Нарысы па гiсторыi беларуска-рускiх
+ лiтаратурных сувязей: У 4 кн.},
+ organization = {Акад.\ навук Беларусi. Iн-т лiт.},
+ address = {Мiнск},
+ publisher = {Навука i тэхнiка},
+ year = {1994},
+ volume = {2: Пачатак ХХ ст. 1900--1917 гг.},
+ editor = {В. А. Каваленка and I. Я. Навуменка},
+ pagetotal = {440},
+ language = {russian},
+}
diff --git a/biblio/bibtex/contrib/gost/doc/examples/utf8/bib/ex10.bib b/biblio/bibtex/contrib/gost/doc/examples/utf8/bib/ex10.bib
new file mode 100644
index 0000000000..ebda00a86e
--- /dev/null
+++ b/biblio/bibtex/contrib/gost/doc/examples/utf8/bib/ex10.bib
@@ -0,0 +1,9 @@
+@BOOK{Grosse80,
+ author = {Гроссе, Э. and Вайсмангель, Х.},
+ title = {Химия для любознательных: Пер.\ с нем.},
+ address = {М.},
+ publisher = {Химия},
+ year = {1980},
+ pagetotal = {392},
+ language = {russian},
+}
diff --git a/biblio/bibtex/contrib/gost/doc/examples/utf8/bib/ex11.bib b/biblio/bibtex/contrib/gost/doc/examples/utf8/bib/ex11.bib
new file mode 100644
index 0000000000..16a1d96e61
--- /dev/null
+++ b/biblio/bibtex/contrib/gost/doc/examples/utf8/bib/ex11.bib
@@ -0,0 +1,11 @@
+@BOOK{GOST7184,
+ key = {ГОСТ},
+ title = {ГОСТ 7.1-84. Библиографическое описание документа.
+ Общие требования и правила составления.
+ --- Взамен ГОСТ 7.1-76~; введ. 01.01.86.},
+ address = {М.},
+ publisher = {Изд-во стандартов},
+ year = {1984},
+ pagetotal = {78},
+ language = {russian},
+}
diff --git a/biblio/bibtex/contrib/gost/doc/examples/utf8/bib/ex12.bib b/biblio/bibtex/contrib/gost/doc/examples/utf8/bib/ex12.bib
new file mode 100644
index 0000000000..33bb601e08
--- /dev/null
+++ b/biblio/bibtex/contrib/gost/doc/examples/utf8/bib/ex12.bib
@@ -0,0 +1,8 @@
+@BOOK{ObchTech93,
+ title = {Обчислювальна і прикладна математика: Зб.наук.пр.},
+ address = {К.},
+ publisher = {Либідь},
+ year = {1993},
+ pagetotal = {99},
+ language = {ukrainian},
+}
diff --git a/biblio/bibtex/contrib/gost/doc/examples/utf8/bib/ex13.bib b/biblio/bibtex/contrib/gost/doc/examples/utf8/bib/ex13.bib
new file mode 100644
index 0000000000..6c4e3a0bdc
--- /dev/null
+++ b/biblio/bibtex/contrib/gost/doc/examples/utf8/bib/ex13.bib
@@ -0,0 +1,10 @@
+@BOOK{Bibdelo86,
+ title = {Библиотечное дело: Терминол. словарь},
+ composer = {И. М. Суслова and Л. Н. Уланова},
+ edition = {2-е изд.},
+ address = {М.},
+ publisher = {Книга},
+ year = {1986},
+ pagetotal = {224},
+ language = {russian},
+}
diff --git a/biblio/bibtex/contrib/gost/doc/examples/utf8/bib/ex14.bib b/biblio/bibtex/contrib/gost/doc/examples/utf8/bib/ex14.bib
new file mode 100644
index 0000000000..e3b3428a7f
--- /dev/null
+++ b/biblio/bibtex/contrib/gost/doc/examples/utf8/bib/ex14.bib
@@ -0,0 +1,11 @@
+@INBOOK{Ponomarenko79,
+ author = {Пономаренко, Л. А.},
+ title = {Организующая система},
+ booktitle = {Автоматизация технологических процессов
+ в прокатном производстве},
+ address = {М.},
+ publisher = {Металлургия},
+ year = {1979},
+ pages = {141-148},
+ language = {russian},
+}
diff --git a/biblio/bibtex/contrib/gost/doc/examples/utf8/bib/ex14a.bib b/biblio/bibtex/contrib/gost/doc/examples/utf8/bib/ex14a.bib
new file mode 100644
index 0000000000..7d086ef71f
--- /dev/null
+++ b/biblio/bibtex/contrib/gost/doc/examples/utf8/bib/ex14a.bib
@@ -0,0 +1,11 @@
+@INBOOK{Zeyts70,
+ author = {Зейтц, Ф.},
+ title = {О приведении пространственных групп},
+ booktitle = {Симметрия в твердом теле},
+ bookauthor = {Нокс, Р. and Голд, А.},
+ address = {М.},
+ publisher = {Наука},
+ year = {1970},
+ pages = {172--186},
+ language = {russian},
+}
diff --git a/biblio/bibtex/contrib/gost/doc/examples/utf8/bib/ex15.bib b/biblio/bibtex/contrib/gost/doc/examples/utf8/bib/ex15.bib
new file mode 100644
index 0000000000..e73a2859d7
--- /dev/null
+++ b/biblio/bibtex/contrib/gost/doc/examples/utf8/bib/ex15.bib
@@ -0,0 +1,12 @@
+@INCOLLECTION{Ponoomarenko76,
+ author = {Пономаренко, Л. А.},
+ title = {Структура системы прерывания с ситуационными
+ приоритетами в АСУТП станов горячей прокатки},
+ booktitle = {Разработка автоматизированных систем управления
+ технологическими процессами},
+ address = {Тбилиси},
+ publisher = {Сабчота Сакартвело},
+ year = {1976},
+ pages = {3-16},
+ language = {russian},
+}
diff --git a/biblio/bibtex/contrib/gost/doc/examples/utf8/bib/ex16.bib b/biblio/bibtex/contrib/gost/doc/examples/utf8/bib/ex16.bib
new file mode 100644
index 0000000000..d3396fb15a
--- /dev/null
+++ b/biblio/bibtex/contrib/gost/doc/examples/utf8/bib/ex16.bib
@@ -0,0 +1,10 @@
+@ARTICLE{Malikov92,
+ author = {Меликов, А. З. and Пономаренко, Л. А.},
+ title = {Оптимизация цифровой сети интегрального обслуживания
+ с конечным числом пользователей и блокировками},
+ journal = {Автоматика и телемеханика},
+ year = {1992},
+ number = {6},
+ pages = {34-38},
+ language = {russian},
+}
diff --git a/biblio/bibtex/contrib/gost/doc/examples/utf8/bib/ex17.bib b/biblio/bibtex/contrib/gost/doc/examples/utf8/bib/ex17.bib
new file mode 100644
index 0000000000..00f2d3e869
--- /dev/null
+++ b/biblio/bibtex/contrib/gost/doc/examples/utf8/bib/ex17.bib
@@ -0,0 +1,11 @@
+@ARTICLE{Ponomarenko86a,
+ author = {Пономаренко, Л. А. and Меликов, А. З.},
+ title = {Ситуационное управление многоканальной системой
+ с переменной структурой обслуживания неоднородного потока},
+ journal = {Изв.\ АН Азерб.\ Респ. Сер.\ физ.-техн.\ и мат.\ наук},
+ year = {1986},
+ volume = {7},
+ number = {6},
+ pages = {79-83},
+ language = {russian},
+}
diff --git a/biblio/bibtex/contrib/gost/doc/examples/utf8/bib/ex17a.bib b/biblio/bibtex/contrib/gost/doc/examples/utf8/bib/ex17a.bib
new file mode 100644
index 0000000000..5351992600
--- /dev/null
+++ b/biblio/bibtex/contrib/gost/doc/examples/utf8/bib/ex17a.bib
@@ -0,0 +1,8 @@
+@ARTICLE{dixit.pindyck:options,
+ title = {The Options Approach to Capital Investment},
+ author = {Avinash K. Dixit and Robert S. Pindyck},
+ journal = {Harvard Business Review},
+ year = {1995},
+ month = {May-June},
+ pages = {105--115},
+}
diff --git a/biblio/bibtex/contrib/gost/doc/examples/utf8/bib/ex17b.bib b/biblio/bibtex/contrib/gost/doc/examples/utf8/bib/ex17b.bib
new file mode 100644
index 0000000000..b9584ca412
--- /dev/null
+++ b/biblio/bibtex/contrib/gost/doc/examples/utf8/bib/ex17b.bib
@@ -0,0 +1,10 @@
+@ARTICLE{RosGaz-article,
+ title = {Федеральный закон о внесении изменений
+ и дополнений в Семейный кодекс Российской Федерации},
+ journal = {Российская газета},
+ year = {1997},
+ month = {19 нояб},
+ pages = {4},
+ note = {Российская Федерация. Законы},
+ language = {russian},
+}
diff --git a/biblio/bibtex/contrib/gost/doc/examples/utf8/bib/ex18.bib b/biblio/bibtex/contrib/gost/doc/examples/utf8/bib/ex18.bib
new file mode 100644
index 0000000000..7c305452e6
--- /dev/null
+++ b/biblio/bibtex/contrib/gost/doc/examples/utf8/bib/ex18.bib
@@ -0,0 +1,11 @@
+@INBOOK{Dolmatovskiy88,
+ author = {Долматовский, Ю. А.},
+ title = {Электромобиль},
+ booktitle = {БСЭ},
+ edition = {3-е},
+ address = {М.},
+ year = {1988},
+ volume = {30},
+ pages = {72},
+ language = {russian},
+}
diff --git a/biblio/bibtex/contrib/gost/doc/examples/utf8/bib/ex19.bib b/biblio/bibtex/contrib/gost/doc/examples/utf8/bib/ex19.bib
new file mode 100644
index 0000000000..8a9d3979f7
--- /dev/null
+++ b/biblio/bibtex/contrib/gost/doc/examples/utf8/bib/ex19.bib
@@ -0,0 +1,14 @@
+@INPROCEEDINGS{Ponomarenko88,
+ author = {Пономаренко, Л. А. and Жучкова, И. В.},
+ title = {Оптимальное назначение приоритетов
+ при организации доступа в локальных
+ вычислительных сетях АСУТП},
+ booktitle = {Труды Междунар.\ конф.\
+ <<Локальные вычислительные сети>> (ЛОКСЕТЬ 88)},
+ volume = {1},
+ address = {Рига},
+ publisher = {ИЭВТ АН Латвии},
+ year = {1988},
+ pages = {149-153},
+ language = {russian},
+}
diff --git a/biblio/bibtex/contrib/gost/doc/examples/utf8/bib/ex20.bib b/biblio/bibtex/contrib/gost/doc/examples/utf8/bib/ex20.bib
new file mode 100644
index 0000000000..59d5fd3c67
--- /dev/null
+++ b/biblio/bibtex/contrib/gost/doc/examples/utf8/bib/ex20.bib
@@ -0,0 +1,9 @@
+@INPROCEEDINGS{Melikov95,
+ author = {Melikov, A. Z. and Ponomarenko, L. A.},
+ title = {On the approach to optimal control
+ of queuing systems with multiple classes of customers},
+ booktitle = {Proc.\ International Conf.\ on Syst.\ Sci.\ XII.},
+ address = {Wroclaw (Poland)},
+ year = {1995},
+ pages = {507-515},
+}
diff --git a/biblio/bibtex/contrib/gost/doc/examples/utf8/bib/ex20a.bib b/biblio/bibtex/contrib/gost/doc/examples/utf8/bib/ex20a.bib
new file mode 100644
index 0000000000..cf0f2c1c93
--- /dev/null
+++ b/biblio/bibtex/contrib/gost/doc/examples/utf8/bib/ex20a.bib
@@ -0,0 +1,28 @@
+@INPROCEEDINGS{Gojchuk98,
+ author = {Гойчук, А. Ф.},
+ title = {Особливості етіології і патогенезу поперечного раку
+ дуба звичайного в Україні},
+ booktitle = {Науковий вісник Національного
+ аграрного університету},
+ editor = {Мельничука, Д. О. and others},
+ address = {К.},
+ publisher = {НАУ},
+ year = {1998},
+ series = {Вип. 8: Лісівництво},
+ pages = {168--173},
+ language = {ukrainian},
+}
+
+@INPROCEEDINGS{Polyakov98a,
+ author = {М. О. Поляков},
+ title = {Системний ефект агрегування лісосік в управлінні
+ лісовими ресурсами на регіональному рівні},
+ crossref = {Gojchuk98},
+ annote = {Розглянуто ефект агрегування елементарних
+ господарських одиниць на розмір розрахункової лісосіки.
+ Запропоновано метод визначення максимально допустимого розміру
+ рубання за площею на рівні регіону в контексті системи
+ державного регулювання лісокористування для умов ринкової
+ економіки},
+ pages = {213--220},
+}
diff --git a/biblio/bibtex/contrib/gost/doc/examples/utf8/bib/ex20b.bib b/biblio/bibtex/contrib/gost/doc/examples/utf8/bib/ex20b.bib
new file mode 100644
index 0000000000..804f156ba1
--- /dev/null
+++ b/biblio/bibtex/contrib/gost/doc/examples/utf8/bib/ex20b.bib
@@ -0,0 +1,16 @@
+@INPROCEEDINGS{TranskSpivrob99:Purich,
+ author = {Пурич, Штефан},
+ title = {{Р}умынско-{У}краинское трансграничное сотрудничество:
+ проблемы и перспективы},
+ language = {russian},
+ booktitle = {Транскордонне співробітництво у поліетнічних регіонах
+ {С}хідної та {П}івденно-{С}хідної {Є}вропи: {М}атеріали наукового
+ симпозіуму},
+ editor = {Макара, Ю.},
+ address = {Чернівці},
+ publisher = {Золоті литаври},
+ organization = {Буковинський політологічний центр},
+ year = {1999},
+ pagetotal = {196},
+ booklanguage = {ukrainian},
+}
diff --git a/biblio/bibtex/contrib/gost/doc/examples/utf8/bib/ex20c.bib b/biblio/bibtex/contrib/gost/doc/examples/utf8/bib/ex20c.bib
new file mode 100644
index 0000000000..bdd9cdd95b
--- /dev/null
+++ b/biblio/bibtex/contrib/gost/doc/examples/utf8/bib/ex20c.bib
@@ -0,0 +1,20 @@
+@INPROCEEDINGS{Selikov95,
+ author = {Selikov, A. Z. and Ponomarenko, L. A. and Qranamarenko, L. S. and Zonomarenko, L. U.},
+ title = {On the approach to optimal control
+ of queuing systems with multiple classes of customers},
+ booktitle = {Proc.\ International Conf.\ on Syst.\ Sci.\ XII.},
+ address = {Wroclaw (Poland)},
+ year = {1995},
+ pages = {507-515},
+}
+
+@INPROCEEDINGS{Selikov+95,
+ author = {Селиков, A. Z. and Пономарь, L. A. and Крамаренко, L. S. and Золкин, Л. Ю.},
+ title = {On the approach to optimal control
+ of queuing systems with multiple classes of customers},
+ booktitle = {Proc.\ International Conf.\ on Syst.\ Sci.\ XII.},
+ address = {Wroclaw (Poland)},
+ year = {1995},
+ pages = {507-515},
+ language = {russian},
+}
diff --git a/biblio/bibtex/contrib/gost/doc/examples/utf8/bib/ex21.bib b/biblio/bibtex/contrib/gost/doc/examples/utf8/bib/ex21.bib
new file mode 100644
index 0000000000..a6769ddfb4
--- /dev/null
+++ b/biblio/bibtex/contrib/gost/doc/examples/utf8/bib/ex21.bib
@@ -0,0 +1,14 @@
+@PHDTHESIS{Luus82,
+ author = {Луус, Роман Аркадьевич},
+ title = {Исследование оборудования с пневмовакуумным
+ приводом для захвата, перемещения и фиксации
+ при обработке пористых и легкоповреждаемых
+ строительных изделий},
+ type = {Диссертация на соискание ученой степени кандидата технических наук},
+ number = {05.05.04},
+ institution = {Моск.\ строит.\ ин-т},
+ address = {М.},
+ year = {1982},
+ pagetotal = {212},
+ language = {russian},
+}
diff --git a/biblio/bibtex/contrib/gost/doc/examples/utf8/bib/ex21a.bib b/biblio/bibtex/contrib/gost/doc/examples/utf8/bib/ex21a.bib
new file mode 100644
index 0000000000..9464e2b008
--- /dev/null
+++ b/biblio/bibtex/contrib/gost/doc/examples/utf8/bib/ex21a.bib
@@ -0,0 +1,11 @@
+@DOCTHESIS{KIA95-default,
+ author = {Котельников, Игорь Александрович},
+ title = {Теория магнитного удержания двухкомпонентной плазмы
+ в открытых ловушках},
+ number = {01.04.08},
+ institution = {Ин-т ядерной физики им.\ Г.~И. Будкера СО РАН},
+ address = {Новосибирск},
+ year = {1995},
+ pagetotal = {350},
+ language = {russian},
+}
diff --git a/biblio/bibtex/contrib/gost/doc/examples/utf8/bib/ex21b.bib b/biblio/bibtex/contrib/gost/doc/examples/utf8/bib/ex21b.bib
new file mode 100644
index 0000000000..49be181505
--- /dev/null
+++ b/biblio/bibtex/contrib/gost/doc/examples/utf8/bib/ex21b.bib
@@ -0,0 +1,17 @@
+@MASTERSTHESIS{mastersthesis-minimal,
+ title = {Mastering Thesis Writing},
+ author = {{\'{E}}douard Masterly},
+ year = {1988},
+ institution = {Stanford University},
+}
+
+@MASTERSTHESIS{mastersthesis-full,
+ title = {Mastering Thesis Writing},
+ author = {{\'{E}}douard Masterly},
+ month = jun,
+ note = {This is a full MASTERSTHESIS entry},
+ type = {Master's project},
+ year = {1988},
+ address = {English Department},
+ institution = {Stanford University},
+}
diff --git a/biblio/bibtex/contrib/gost/doc/examples/utf8/bib/ex22.bib b/biblio/bibtex/contrib/gost/doc/examples/utf8/bib/ex22.bib
new file mode 100644
index 0000000000..d2e55c91b3
--- /dev/null
+++ b/biblio/bibtex/contrib/gost/doc/examples/utf8/bib/ex22.bib
@@ -0,0 +1,12 @@
+@THESIS{KIA85-autoref,
+ author = {Котельников, Игорь Александрович},
+ title = {Теория магнитного удержания двухкомпонентной плазмы
+ в открытых ловушках},
+ type = {Автореф.\ дис.\ на соиск.\ учен.\ степ.\ д-ра физ.-мат.\ наук},
+ number = {01.04.08},
+ school = {Ин-т ядерной физики им.\ Г.~И. Будкера СО РАН},
+ address = {Новосибирск},
+ year = {1995},
+ pagetotal = {17},
+ language = {russian},
+}
diff --git a/biblio/bibtex/contrib/gost/doc/examples/utf8/bib/ex22a.bib b/biblio/bibtex/contrib/gost/doc/examples/utf8/bib/ex22a.bib
new file mode 100644
index 0000000000..9569e1bb2d
--- /dev/null
+++ b/biblio/bibtex/contrib/gost/doc/examples/utf8/bib/ex22a.bib
@@ -0,0 +1,46 @@
+@THESIS{vishnyakov:thesis1,
+ title = {Модели и методы оценки коммерческих банков в условиях неопределенности},
+ author = {Вишняков, Илья Владимирович},
+ year = {2002},
+ date = {2002-02-04},
+ langid = {russian},
+ language = {russian},
+ location = {М.},
+ speciality = {экон. наук},
+ number = {08.00.13},
+ pagetotal = {234},
+ titleaddon = {защищена 12.02.02~: утв. 24.06.02},
+}
+
+@THESIS{vishnyakov:thesis2,
+ title = {Модели и методы оценки коммерческих банков в условиях неопределенности},
+ author = {Вишняков, Илья Владимирович},
+ type = {phdthesis},
+ addendum = {Библиогр.: с. 220---230.~--- 04200204433},
+ _year = {2002},
+ date = {2002-02-04},
+ langid = {russian},
+ language = {russian},
+ location = {М.},
+ speciality = {экон. наук},
+ specialitycode = {08.00.13},
+ media = {text},
+ pagetotal = {234},
+ titleaddon = {защищена 12.02.02~: утв. 24.06.02},
+}
+
+
+@THESIS{Skvortsov:2008,
+ title = {Флуктуационные и интерференционные эффекты в мезоскопических системах},
+ author = {Скворцов, Михаил Андреевич},
+ type = {docthesis},
+ _year = {2008},
+ institution = {ИТФ им. Л.\,Д.~Ландау},
+ langid = {russian},
+ language = {russian},
+ location = {Черноголовка},
+ speciality = {физ.-мат. наук},
+ specialitycode = {01.04.02},
+ media = {text},
+ pagetotal = {224},
+}
diff --git a/biblio/bibtex/contrib/gost/doc/examples/utf8/bib/ex23.bib b/biblio/bibtex/contrib/gost/doc/examples/utf8/bib/ex23.bib
new file mode 100644
index 0000000000..950f353aef
--- /dev/null
+++ b/biblio/bibtex/contrib/gost/doc/examples/utf8/bib/ex23.bib
@@ -0,0 +1,11 @@
+@BOOK{Ponomarenko76,
+ author = {Пономаренко, Л. А. and Буадзе, В. В.},
+ title = {Математические модели и алгоритмы сбора
+ и обработки информации в АСУТП непрерывных
+ станов горячей прокатки},
+ address = {К.},
+ year = {1976},
+ pagetotal = {37},
+ language = {russian},
+ note = {(Препр./ АН Украины. Ин-т кибернетики; 76-76)},
+}
diff --git a/biblio/bibtex/contrib/gost/doc/examples/utf8/bib/ex24.bib b/biblio/bibtex/contrib/gost/doc/examples/utf8/bib/ex24.bib
new file mode 100644
index 0000000000..f1bd612b34
--- /dev/null
+++ b/biblio/bibtex/contrib/gost/doc/examples/utf8/bib/ex24.bib
@@ -0,0 +1,15 @@
+@REPORT{Report81-rep,
+ title = {Проведение испытаний и исследований
+ теплотехнических свойств камер {КХС-2-12-ВЗ}
+ и {КХС-2-12-КЗІО}},
+ institution = {Всесоюзн.\ заочн.\ ин-т пищ.\ пром-ти},
+ address = {М.},
+ organization = {ВИНИТИ},
+ year = {1981},
+ pagetotal = {90},
+ type = {Отчет о {НИР}},
+ editor = {Путин, В. В.},
+ author = {Медведев, Д. А. and others},
+ note = {Инв.\ № В 119692},
+ language = {russian},
+}
diff --git a/biblio/bibtex/contrib/gost/doc/examples/utf8/bib/ex24a.bib b/biblio/bibtex/contrib/gost/doc/examples/utf8/bib/ex24a.bib
new file mode 100644
index 0000000000..c8c698a48a
--- /dev/null
+++ b/biblio/bibtex/contrib/gost/doc/examples/utf8/bib/ex24a.bib
@@ -0,0 +1,12 @@
+@REPORT{Report81b-rep-notype,
+ title = {Проведение испытаний и исследований
+ теплотехнических свойств камер {КХС-2-12-ВЗ}
+ и {КХС-2-12-КЗІО}},
+ institution = {Всесоюзн.\ заочн.\ ин-т пищ.\ пром-ти},
+ address = {М.},
+ organization = {ВИНИТИ},
+ year = {1981},
+ pagetotal = {90},
+ note = {Инв.\ № В 119692},
+ language = {russian},
+}
diff --git a/biblio/bibtex/contrib/gost/doc/examples/utf8/bib/ex24b.bib b/biblio/bibtex/contrib/gost/doc/examples/utf8/bib/ex24b.bib
new file mode 100644
index 0000000000..c900abee93
--- /dev/null
+++ b/biblio/bibtex/contrib/gost/doc/examples/utf8/bib/ex24b.bib
@@ -0,0 +1,14 @@
+@TECHREPORT{Report81-techrep,
+ title = {Проведение испытаний и исследований
+ теплотехнических свойств камер {КХС-2-12-ВЗ}
+ и {КХС-2-12-КЗІО}},
+ institution = {Всесоюзн.\ заочн.\ ин-т пищ.\ пром-ти},
+ address = {М.},
+ organization = {ВИНИТИ},
+ year = {1981},
+ pagetotal = {90},
+ editor = {Путин, В. В.},
+ author = {Медведев, Д. А. and others},
+ note = {Инв.\ № В 119692},
+ language = {russian},
+}
diff --git a/biblio/bibtex/contrib/gost/doc/examples/utf8/bib/ex25.bib b/biblio/bibtex/contrib/gost/doc/examples/utf8/bib/ex25.bib
new file mode 100644
index 0000000000..cc599b52b7
--- /dev/null
+++ b/biblio/bibtex/contrib/gost/doc/examples/utf8/bib/ex25.bib
@@ -0,0 +1,11 @@
+@BOOK{CatalogMamals81,
+ title = {Каталог млекопитающих СССР.
+ Плиоцен "--- современность},
+ organization = {АН СССР, Зоол.\ ин-т},
+ editor = {И. М. Громова and Г. И. Барановой},
+ address = {Л.},
+ publisher = {Наука, Ленинг.\ отд-ние},
+ year = {1981},
+ pagetotal = {456},
+ language = {russian},
+}
diff --git a/biblio/bibtex/contrib/gost/doc/examples/utf8/bib/ex26.bib b/biblio/bibtex/contrib/gost/doc/examples/utf8/bib/ex26.bib
new file mode 100644
index 0000000000..cff85edfbe
--- /dev/null
+++ b/biblio/bibtex/contrib/gost/doc/examples/utf8/bib/ex26.bib
@@ -0,0 +1,12 @@
+@BOOK{Instr86,
+ title = {Типовая инструкция по эксплуатации
+ топливоотдачи тепловых электростанций~:
+ ТИ 34-70-044-85~: Утв. Гл. техн. упр.
+ по эксплуатации энергосистем 01.10.85~:
+ Срок действия установлен с 01.01.86 до 01.01.95},
+ organization = {М-во энергетики и электрификации СССР},
+ address = {М.},
+ year = {1986},
+ pagetotal = {43},
+ language = {russian},
+}
diff --git a/biblio/bibtex/contrib/gost/doc/examples/utf8/bib/ex27a.bib b/biblio/bibtex/contrib/gost/doc/examples/utf8/bib/ex27a.bib
new file mode 100644
index 0000000000..9b58759802
--- /dev/null
+++ b/biblio/bibtex/contrib/gost/doc/examples/utf8/bib/ex27a.bib
@@ -0,0 +1,18 @@
+@ONLINE{wiki:latex,
+ author = {Wikipedia},
+ title = {{\LaTeX}---Wikipedia{,} The Free Encyclopedia},
+ year = {2012},
+ url = {http://en.wikipedia.org/wiki/LaTeX},
+ urldate = {25.01.2012},
+}
+
+@ONLINE{wiki:latex-2,
+ author = {Wikipedia},
+ title = {{\LaTeX}},
+ howpublished = {Wikipedia, The Free Encyclopedia},
+ year = {2012},
+ eprint = {wiki/LaTeX},
+ eprinttype = {WikiPedia},
+ url = {http://en.wikipedia.org/wiki/LaTeX},
+ urldate = {25.01.2012},
+}
diff --git a/biblio/bibtex/contrib/gost/doc/examples/utf8/bib/ex27b.bib b/biblio/bibtex/contrib/gost/doc/examples/utf8/bib/ex27b.bib
new file mode 100644
index 0000000000..c903934e1d
--- /dev/null
+++ b/biblio/bibtex/contrib/gost/doc/examples/utf8/bib/ex27b.bib
@@ -0,0 +1,10 @@
+@ONLINE{phys:moodle,
+ author = {Черкасский, В. С.},
+ title = {Классная комната},
+ howpublished = {Физический факультет},
+ organization = {НГУ},
+ year = {2012},
+ url = {http://www.phys.nsu.ru/moodle/},
+ urldate = {16.01.2012},
+ language = {russian},
+}
diff --git a/biblio/bibtex/contrib/gost/doc/examples/utf8/bib/ex27c.bib b/biblio/bibtex/contrib/gost/doc/examples/utf8/bib/ex27c.bib
new file mode 100644
index 0000000000..35f92171c2
--- /dev/null
+++ b/biblio/bibtex/contrib/gost/doc/examples/utf8/bib/ex27c.bib
@@ -0,0 +1,8 @@
+@MISC{EXFOR,
+ author = {IAEA},
+ title = {{EXFOR}---Experimental Nuclear Reaction Data },
+ url = {http://www-nds.iaea.org/exfor},
+ address = {P.O. Box 100, Wagramer Strasse 5, A-1400 Vienna, Austria},
+ year = {2012},
+ media = {eresource}
+}
diff --git a/biblio/bibtex/contrib/gost/doc/examples/utf8/bib/ex28.bib b/biblio/bibtex/contrib/gost/doc/examples/utf8/bib/ex28.bib
new file mode 100644
index 0000000000..530ca4e2eb
--- /dev/null
+++ b/biblio/bibtex/contrib/gost/doc/examples/utf8/bib/ex28.bib
@@ -0,0 +1,25 @@
+@BOOK{IsaacNewton,
+ author = {Newton, {\relax Sir Isaac}},
+ title = {Opticks, or a treatise of the reflections,
+ refractions, inflections and colours of light},
+ publisher = {William Innys},
+ url = {http://books.google.com/books?id=XXu4AkRVBBoC},
+ media = {eresource},
+ year = {1730},
+ pagetotal = {382},
+ eprint = {XXu4AkRVBBoC},
+ eprinttype = {Google Books},
+}
+
+@BOOK{IsaacNewton-sl:sn,
+ author = {{\relax Sir I}saac Newton},
+ title = {Opticks, or a treatise of the reflections,
+ refractions, inflections and colours of light},
+ url = {http://books.google.com/books?id=XXu4AkRVBBoC},
+ media = {online},
+ year = {1730},
+ pagetotal = {382},
+ eprint = {XXu4AkRVBBoC},
+ eprinttype = {Google Books},
+}
+% publisher = {William Innys},
diff --git a/biblio/bibtex/contrib/gost/doc/examples/utf8/bib/ex28a.bib b/biblio/bibtex/contrib/gost/doc/examples/utf8/bib/ex28a.bib
new file mode 100644
index 0000000000..de6e440d0a
--- /dev/null
+++ b/biblio/bibtex/contrib/gost/doc/examples/utf8/bib/ex28a.bib
@@ -0,0 +1,32 @@
+@BOOK{Encyclopedia,
+ title = {Художественная энциклопедия зарубежного классического искусства},
+ publisher = {Большая Рос. энцикл.},
+ year = {1996},
+ address = {М.},
+ note = {1 электрон. опт. диск (CD-ROM)},
+ language = {russian},
+ media = {eresource},
+}
+
+@ARTICLE{Nasirova,
+ title = {Модели государственного регулирования страховой деятельности},
+ author = {Насырова, Г. А.},
+ language = {russian},
+ note = {Режим доступа: http://vestnik.fa.ru/4(28)2003/4.html},
+ number = {4},
+ year = {2003},
+ journal = {Вестник Финансовой академии},
+ media2 = {eresource},
+ media = {online},
+}
+
+@BOOK{kremlincd,
+ title = {Московский Кремль},
+ titleaddon = {трехмер. путеводитель},
+ language = {russian},
+ note = {CD-ROM},
+ date = {2007},
+ location = {М.},
+ publisher = {Новый Диск},
+ media = {eresource},
+}
diff --git a/biblio/bibtex/contrib/gost/doc/examples/utf8/bib/ex29.bib b/biblio/bibtex/contrib/gost/doc/examples/utf8/bib/ex29.bib
new file mode 100644
index 0000000000..416cb5b91c
--- /dev/null
+++ b/biblio/bibtex/contrib/gost/doc/examples/utf8/bib/ex29.bib
@@ -0,0 +1,15 @@
+@ARTICLE{PhysRevLett.101.085006,
+ author = {Kotelnikov, Igor and Rom\'e, Massimiliano},
+ volume = {101},
+ journal = {Phys. Rev. Lett.},
+ month = {Aug},
+ pagetotal = {4},
+ title = {Admissible Equilibria of Non-neutral Plasmas in a Malmberg-Penning Trap},
+ year = {2008},
+ doi = {10.1103/PhysRevLett.101.085006},
+ issue = {8},
+ publisher = {American Physical Society},
+ pages = {085006},
+}
+
+% url = {http://link.aps.org/doi/10.1103/PhysRevLett.101.085006},
diff --git a/biblio/bibtex/contrib/gost/doc/examples/utf8/bib/ex30.bib b/biblio/bibtex/contrib/gost/doc/examples/utf8/bib/ex30.bib
new file mode 100644
index 0000000000..b9e2ce43b5
--- /dev/null
+++ b/biblio/bibtex/contrib/gost/doc/examples/utf8/bib/ex30.bib
@@ -0,0 +1,27 @@
+@ARTICLE{1998PhRvE..57.7111K,
+ author = {{Kinney}, R.~M. and {McWilliams}, J.~C.},
+ title = {{Turbulent cascades in anisotropic magnetohydrodynamics}},
+ journal = pre,
+ keywords = {Plasma turbulence, Magnetohydrodynamic and fluid equation},
+ year = {1998},
+ month = jun,
+ volume = {57},
+ pages = {7111-7121},
+ doi = {10.1103/PhysRevE.57.7111},
+ adsurl = {http://adsabs.harvard.edu/abs/1998PhRvE..57.7111K},
+ adsnote = {Provided by the SAO/NASA Astrophysics Data System},
+}
+
+@ARTICLE{1998UFN,
+ author = {Котельников, И. А. and Астрелин, В. Т.},
+ title = {Теория плазменного эмиттера положительных ионов},
+ journal = ufn,
+ keywords = {плазменный эмиттер, критерий Бома},
+ year = {2015},
+ month = jul,
+ volume = {185},
+ pages = {753-771},
+ language = {russian},
+ doi = {10.3367/UFNr.0185.201507c.0753},
+ url = {http://ufn.ru/ru/articles/2015/7/c/},
+}
diff --git a/biblio/bibtex/contrib/gost/doc/examples/utf8/bib/ex31.bib b/biblio/bibtex/contrib/gost/doc/examples/utf8/bib/ex31.bib
new file mode 100644
index 0000000000..7c86f15b6e
--- /dev/null
+++ b/biblio/bibtex/contrib/gost/doc/examples/utf8/bib/ex31.bib
@@ -0,0 +1,40 @@
+@PATENT{patent1,
+ author = {Э. В. Тернер},
+ authorcountry = {США},
+ title = {Одноразовая ракета-носитель},
+ media = {text},
+ type = {заявка},
+ number = {1095735},
+ location = {Рос. Федерация},
+ ipc = {МПК\ensuremath{^7} B 64 G 1/00},
+ holder = {заявитель Спейс Системз/Лорал, инк.},
+ credits = {патент. поверенный Егорова Г. Б.},
+ requestnumber = {000108705/28},
+ requestdate = {07.04.2000},
+ publicationdate = {10.03.2001},
+ publication = {Бюл. № 7 (I ч.)},
+ prioritydate= {09.04.1999},
+ prioritynumber = {09/289, 037},
+ prioritycountry = {США},
+ pagetotal = {5 с.~: ил.},
+ language = {russian},
+}
+
+@PATENT{patent2,
+ author = {В. И. Чугаева},
+ authorcountry = {РФ},
+ title = {Приемопередающее устройство},
+ media = {text},
+ type = {пат.},
+ number = {2000131736/09},
+ location = {Рос. Федерация},
+ ipc = {МПК\ensuremath{^7} H 04 В 1/38, Н 04 J 13/00},
+ holder = {заявитель и патентообладатель Воронеж. науч.-ислед. ин-т связи.},
+ credits = {патент. поверенный Егорова Г. Б.},
+ requestnumber = {000108705/28},
+ date = {18.12.2000},
+ publicationdate = {20.08.2002},
+ publication = {Бюл. № 23 (II ч.)},
+ pagetotal = {2 с.~: ил.},
+ language = {russian},
+}
diff --git a/biblio/bibtex/contrib/gost/doc/examples/utf8/bib/examples.bib b/biblio/bibtex/contrib/gost/doc/examples/utf8/bib/examples.bib
new file mode 100644
index 0000000000..c017576999
--- /dev/null
+++ b/biblio/bibtex/contrib/gost/doc/examples/utf8/bib/examples.bib
@@ -0,0 +1,664 @@
+@BOOK{Vasylenko92,
+ author = {Василенко, М. В.},
+ title = {Теорія коливань: Навчальний посібник},
+ address = {К.},
+ publisher = {Вища школа},
+ year = {1992},
+ pagetotal = {430},
+ language = {ukrainian},
+}
+@BOOK{Afanasyev92,
+ author = {Афанасьев, В. В. and Василевский, О. Н.},
+ title = {Расчеты электрических цепей
+ на программируемых микрокалькуляторах},
+ address = {М.},
+ publisher = {Энергоиздат},
+ year = {1992},
+ pagetotal = {190},
+ language = {russian},
+}
+@BOOK{Makilov91,
+ author = {Меликов, А. З. and Пономаренко, Л. А.
+ and Рюмшин, П. А.},
+ title = {Математические модели многопотоковых
+ систем обслуживания},
+ address = {К.},
+ publisher = {Техніка},
+ year = {1991},
+ pagetotal = {265},
+ language = {russian},
+}
+@BOOK{Ponomarenko86,
+ title = {Основы создания гибких атоматизированных производств},
+ author = {Л. А. Пономаренко and Л. В. Адамович
+ and В. Т. Музычук and А. Е. Гридасов},
+ editor = {Б. Б. Тимофеева},
+ address = {К.},
+ publisher = {Техніка},
+ year = {1986},
+ pagetotal = {144},
+ language = {russian},
+}
+@BOOK{Belousova81,
+ title = {Системный анализ инфраструктуры
+ как элемент народного хозяйства},
+ author = {Белоусова, Н. И. and Вишняк, Е. И.
+ and Левит, В. Ю. and others},
+ address = {М.},
+ publisher = {Экономика},
+ year = {1981},
+ pagetotal = {62},
+ language = {russian},
+}
+@BOOK{BibOp91,
+ title = {Составление библиографического описания:
+ Краткие правила},
+ organization = {Междувед. каталогизац. комис.
+ при Гос. б-ке СССР им.~В.~И. Ленина},
+ edition = {2-е, доп.},
+ address = {М.},
+ publisher = {Кн.~палата},
+ year = {1991},
+ pagetotal = {224},
+ language = {russian},
+}
+@BOOK{Poems82,
+ title = {Стихи о музыке. Русские,
+ советские, зарубежные поэты: Сборник},
+ compiler = {А. Бирюкова and В. Татаринов},
+ address = {М.},
+ publisher = {Сов. композитор},
+ year = {1982},
+ pagetotal = {224},
+ language = {russian},
+}
+@BOOK{HistLit82,
+ title = {История русской литературы: В 4 т.},
+ organization = {АН СССР, Ин-т рус.~лит.\ (Пушкин.дом)},
+ address = {М.},
+ year = {1982},
+ volume = {3: Расцвет реализма},
+ pagetotal = {876},
+ language = {russian},
+}
+@BOOK{Landau:eldin,
+ author = {Л. Д. Ландау and Е. М. Лифшиц},
+ title = {Теоретическая физика: учебное пособие в 10 т.},
+ publisher = {Наука. Гл.\ ред.\ физ.-мат.\ лит.},
+ address = {М.},
+ year = {1992},
+ volume = {VIII. Электродинамика сплошных сред},
+ edition = {3-е, испр.},
+ language = {russian},
+}
+@BOOK{BRLS94,
+ title = {Нарысы па гiсторыi беларуска-рускiх
+ лiтаратурных сувязей: У 4 кн.},
+ organization = {Акад.\ навук Беларусi. Iн-т лiт.},
+ address = {Мiнск},
+ publisher = {Навука i тэхнiка},
+ year = {1994},
+ volume = {2: Пачатак ХХ ст. 1900--1917 гг.},
+ editor = {В. А. Каваленка and I. Я. Навуменка},
+ pagetotal = {440},
+ language = {russian},
+}
+@BOOK{Grosse80,
+ author = {Гроссе, Э. and Вайсмангель, Х.},
+ title = {Химия для любознательных: Пер.\ с нем.},
+ address = {М.},
+ publisher = {Химия},
+ year = {1980},
+ pagetotal = {392},
+ language = {russian},
+}
+@BOOK{GOST7184,
+ key = {ГОСТ},
+ title = {ГОСТ 7.1-84. Библиографическое описание документа.
+ Общие требования и правила составления.
+ --- Взамен ГОСТ 7.1-76~; введ. 01.01.86.},
+ address = {М.},
+ publisher = {Изд-во стандартов},
+ year = {1984},
+ pagetotal = {78},
+ language = {russian},
+}
+@BOOK{ObchTech93,
+ title = {Обчислювальна і прикладна математика: Зб.наук.пр.},
+ address = {К.},
+ publisher = {Либідь},
+ year = {1993},
+ pagetotal = {99},
+ language = {ukrainian},
+}
+@BOOK{Bibdelo86,
+ title = {Библиотечное дело: Терминол. словарь},
+ composer = {И. М. Суслова and Л. Н. Уланова},
+ edition = {2-е изд.},
+ address = {М.},
+ publisher = {Книга},
+ year = {1986},
+ pagetotal = {224},
+ language = {russian},
+}
+@INBOOK{Ponomarenko79,
+ author = {Пономаренко, Л. А.},
+ title = {Организующая система},
+ booktitle = {Автоматизация технологических процессов
+ в прокатном производстве},
+ address = {М.},
+ publisher = {Металлургия},
+ year = {1979},
+ pages = {141-148},
+ language = {russian},
+}
+@INBOOK{Zeyts70,
+ author = {Зейтц, Ф.},
+ title = {О приведении пространственных групп},
+ booktitle = {Симметрия в твердом теле},
+ bookauthor = {Нокс, Р. and Голд, А.},
+ address = {М.},
+ publisher = {Наука},
+ year = {1970},
+ pages = {172--186},
+ language = {russian},
+}
+@INCOLLECTION{Ponoomarenko76,
+ author = {Пономаренко, Л. А.},
+ title = {Структура системы прерывания с ситуационными
+ приоритетами в АСУТП станов горячей прокатки},
+ booktitle = {Разработка автоматизированных систем управления
+ технологическими процессами},
+ address = {Тбилиси},
+ publisher = {Сабчота Сакартвело},
+ year = {1976},
+ pages = {3-16},
+ language = {russian},
+}
+@ARTICLE{Malikov92,
+ author = {Меликов, А. З. and Пономаренко, Л. А.},
+ title = {Оптимизация цифровой сети интегрального обслуживания
+ с конечным числом пользователей и блокировками},
+ journal = {Автоматика и телемеханика},
+ year = {1992},
+ number = {6},
+ pages = {34-38},
+ language = {russian},
+}
+@ARTICLE{Ponomarenko86a,
+ author = {Пономаренко, Л. А. and Меликов, А. З.},
+ title = {Ситуационное управление многоканальной системой
+ с переменной структурой обслуживания неоднородного потока},
+ journal = {Изв.\ АН Азерб.\ Респ. Сер.\ физ.-техн.\ и мат.\ наук},
+ year = {1986},
+ volume = {7},
+ number = {6},
+ pages = {79-83},
+ language = {russian},
+}
+@ARTICLE{dixit.pindyck:options,
+ title = {The Options Approach to Capital Investment},
+ author = {Avinash K. Dixit and Robert S. Pindyck},
+ journal = {Harvard Business Review},
+ year = {1995},
+ month = {May-June},
+ pages = {105--115},
+}
+@ARTICLE{RosGaz-article,
+ title = {Федеральный закон о внесении изменений
+ и дополнений в Семейный кодекс Российской Федерации},
+ journal = {Российская газета},
+ year = {1997},
+ month = {19 нояб},
+ pages = {4},
+ note = {Российская Федерация. Законы},
+ language = {russian},
+}
+@INBOOK{Dolmatovskiy88,
+ author = {Долматовский, Ю. А.},
+ title = {Электромобиль},
+ booktitle = {БСЭ},
+ edition = {3-е},
+ address = {М.},
+ year = {1988},
+ volume = {30},
+ pages = {72},
+ language = {russian},
+}
+@INPROCEEDINGS{Ponomarenko88,
+ author = {Пономаренко, Л. А. and Жучкова, И. В.},
+ title = {Оптимальное назначение приоритетов
+ при организации доступа в локальных
+ вычислительных сетях АСУТП},
+ booktitle = {Труды Междунар.\ конф.\
+ <<Локальные вычислительные сети>> (ЛОКСЕТЬ 88)},
+ volume = {1},
+ address = {Рига},
+ publisher = {ИЭВТ АН Латвии},
+ year = {1988},
+ pages = {149-153},
+ language = {russian},
+}
+@INPROCEEDINGS{Melikov95,
+ author = {Melikov, A. Z. and Ponomarenko, L. A.},
+ title = {On the approach to optimal control
+ of queuing systems with multiple classes of customers},
+ booktitle = {Proc.\ International Conf.\ on Syst.\ Sci.\ XII.},
+ address = {Wroclaw (Poland)},
+ year = {1995},
+ pages = {507-515},
+}
+@INPROCEEDINGS{Gojchuk98,
+ author = {Гойчук, А. Ф.},
+ title = {Особливості етіології і патогенезу поперечного раку
+ дуба звичайного в Україні},
+ booktitle = {Науковий вісник Національного
+ аграрного університету},
+ editor = {Мельничука, Д. О. and others},
+ address = {К.},
+ publisher = {НАУ},
+ year = {1998},
+ series = {Вип. 8: Лісівництво},
+ pages = {168--173},
+ language = {ukrainian},
+}
+
+@INPROCEEDINGS{Polyakov98a,
+ author = {М. О. Поляков},
+ title = {Системний ефект агрегування лісосік в управлінні
+ лісовими ресурсами на регіональному рівні},
+ crossref = {Gojchuk98},
+ annote = {Розглянуто ефект агрегування елементарних
+ господарських одиниць на розмір розрахункової лісосіки.
+ Запропоновано метод визначення максимально допустимого розміру
+ рубання за площею на рівні регіону в контексті системи
+ державного регулювання лісокористування для умов ринкової
+ економіки},
+ pages = {213--220},
+}
+@INPROCEEDINGS{TranskSpivrob99:Purich,
+ author = {Пурич, Штефан},
+ title = {{Р}умынско-{У}краинское трансграничное сотрудничество:
+ проблемы и перспективы},
+ language = {russian},
+ booktitle = {Транскордонне співробітництво у поліетнічних регіонах
+ {С}хідної та {П}івденно-{С}хідної {Є}вропи: {М}атеріали наукового
+ симпозіуму},
+ editor = {Макара, Ю.},
+ address = {Чернівці},
+ publisher = {Золоті литаври},
+ organization = {Буковинський політологічний центр},
+ year = {1999},
+ pagetotal = {196},
+ booklanguage = {ukrainian},
+}
+@INPROCEEDINGS{Selikov95,
+ author = {Selikov, A. Z. and Ponomarenko, L. A. and Qranamarenko, L. S. and Zonomarenko, L. U.},
+ title = {On the approach to optimal control
+ of queuing systems with multiple classes of customers},
+ booktitle = {Proc.\ International Conf.\ on Syst.\ Sci.\ XII.},
+ address = {Wroclaw (Poland)},
+ year = {1995},
+ pages = {507-515},
+}
+
+@INPROCEEDINGS{Selikov+95,
+ author = {Селиков, A. Z. and Пономарь, L. A. and Крамаренко, L. S. and Золкин, Л. Ю.},
+ title = {On the approach to optimal control
+ of queuing systems with multiple classes of customers},
+ booktitle = {Proc.\ International Conf.\ on Syst.\ Sci.\ XII.},
+ address = {Wroclaw (Poland)},
+ year = {1995},
+ pages = {507-515},
+ language = {russian},
+}
+@PHDTHESIS{Luus82,
+ author = {Луус, Роман Аркадьевич},
+ title = {Исследование оборудования с пневмовакуумным
+ приводом для захвата, перемещения и фиксации
+ при обработке пористых и легкоповреждаемых
+ строительных изделий},
+ type = {Диссертация на соискание ученой степени кандидата технических наук},
+ number = {05.05.04},
+ institution = {Моск.\ строит.\ ин-т},
+ address = {М.},
+ year = {1982},
+ pagetotal = {212},
+ language = {russian},
+}
+@DOCTHESIS{KIA95-default,
+ author = {Котельников, Игорь Александрович},
+ title = {Теория магнитного удержания двухкомпонентной плазмы
+ в открытых ловушках},
+ number = {01.04.08},
+ institution = {Ин-т ядерной физики им.\ Г.~И. Будкера СО РАН},
+ address = {Новосибирск},
+ year = {1995},
+ pagetotal = {350},
+ language = {russian},
+}
+@MASTERSTHESIS{mastersthesis-minimal,
+ title = {Mastering Thesis Writing},
+ author = {{\'{E}}douard Masterly},
+ year = {1988},
+ institution = {Stanford University},
+}
+
+@MASTERSTHESIS{mastersthesis-full,
+ title = {Mastering Thesis Writing},
+ author = {{\'{E}}douard Masterly},
+ month = jun,
+ note = {This is a full MASTERSTHESIS entry},
+ type = {Master's project},
+ year = {1988},
+ address = {English Department},
+ institution = {Stanford University},
+}
+@THESIS{KIA85-autoref,
+ author = {Котельников, Игорь Александрович},
+ title = {Теория магнитного удержания двухкомпонентной плазмы
+ в открытых ловушках},
+ type = {Автореф.\ дис.\ на соиск.\ учен.\ степ.\ д-ра физ.-мат.\ наук},
+ number = {01.04.08},
+ school = {Ин-т ядерной физики им.\ Г.~И. Будкера СО РАН},
+ address = {Новосибирск},
+ year = {1995},
+ pagetotal = {17},
+ language = {russian},
+}
+@THESIS{vishnyakov:thesis1,
+ title = {Модели и методы оценки коммерческих банков в условиях неопределенности},
+ author = {Вишняков, Илья Владимирович},
+ year = {2002},
+ date = {2002-02-04},
+ langid = {russian},
+ language = {russian},
+ location = {М.},
+ speciality = {экон. наук},
+ number = {08.00.13},
+ pagetotal = {234},
+ titleaddon = {защищена 12.02.02~: утв. 24.06.02},
+}
+
+@THESIS{vishnyakov:thesis2,
+ title = {Модели и методы оценки коммерческих банков в условиях неопределенности},
+ author = {Вишняков, Илья Владимирович},
+ type = {phdthesis},
+ addendum = {Библиогр.: с. 220---230.~--- 04200204433},
+ _year = {2002},
+ date = {2002-02-04},
+ langid = {russian},
+ language = {russian},
+ location = {М.},
+ speciality = {экон. наук},
+ specialitycode = {08.00.13},
+ media = {text},
+ pagetotal = {234},
+ titleaddon = {защищена 12.02.02~: утв. 24.06.02},
+}
+
+
+@THESIS{Skvortsov:2008,
+ title = {Флуктуационные и интерференционные эффекты в мезоскопических системах},
+ author = {Скворцов, Михаил Андреевич},
+ type = {docthesis},
+ _year = {2008},
+ institution = {ИТФ им. Л.\,Д.~Ландау},
+ langid = {russian},
+ language = {russian},
+ location = {Черноголовка},
+ speciality = {физ.-мат. наук},
+ specialitycode = {01.04.02},
+ media = {text},
+ pagetotal = {224},
+}
+@BOOK{Ponomarenko76,
+ author = {Пономаренко, Л. А. and Буадзе, В. В.},
+ title = {Математические модели и алгоритмы сбора
+ и обработки информации в АСУТП непрерывных
+ станов горячей прокатки},
+ address = {К.},
+ year = {1976},
+ pagetotal = {37},
+ language = {russian},
+ note = {(Препр./ АН Украины. Ин-т кибернетики; 76-76)},
+}
+@REPORT{Report81-rep,
+ title = {Проведение испытаний и исследований
+ теплотехнических свойств камер {КХС-2-12-ВЗ}
+ и {КХС-2-12-КЗІО}},
+ institution = {Всесоюзн.\ заочн.\ ин-т пищ.\ пром-ти},
+ address = {М.},
+ organization = {ВИНИТИ},
+ year = {1981},
+ pagetotal = {90},
+ type = {Отчет о {НИР}},
+ editor = {Путин, В. В.},
+ author = {Медведев, Д. А. and others},
+ note = {Инв.\ № В 119692},
+ language = {russian},
+}
+@REPORT{Report81b-rep-notype,
+ title = {Проведение испытаний и исследований
+ теплотехнических свойств камер {КХС-2-12-ВЗ}
+ и {КХС-2-12-КЗІО}},
+ institution = {Всесоюзн.\ заочн.\ ин-т пищ.\ пром-ти},
+ address = {М.},
+ organization = {ВИНИТИ},
+ year = {1981},
+ pagetotal = {90},
+ note = {Инв.\ № В 119692},
+ language = {russian},
+}
+@TECHREPORT{Report81-techrep,
+ title = {Проведение испытаний и исследований
+ теплотехнических свойств камер {КХС-2-12-ВЗ}
+ и {КХС-2-12-КЗІО}},
+ institution = {Всесоюзн.\ заочн.\ ин-т пищ.\ пром-ти},
+ address = {М.},
+ organization = {ВИНИТИ},
+ year = {1981},
+ pagetotal = {90},
+ editor = {Путин, В. В.},
+ author = {Медведев, Д. А. and others},
+ note = {Инв.\ № В 119692},
+ language = {russian},
+}
+@BOOK{CatalogMamals81,
+ title = {Каталог млекопитающих СССР.
+ Плиоцен "--- современность},
+ organization = {АН СССР, Зоол.\ ин-т},
+ editor = {И. М. Громова and Г. И. Барановой},
+ address = {Л.},
+ publisher = {Наука, Ленинг.\ отд-ние},
+ year = {1981},
+ pagetotal = {456},
+ language = {russian},
+}
+@BOOK{Instr86,
+ title = {Типовая инструкция по эксплуатации
+ топливоотдачи тепловых электростанций~:
+ ТИ 34-70-044-85~: Утв. Гл. техн. упр.
+ по эксплуатации энергосистем 01.10.85~:
+ Срок действия установлен с 01.01.86 до 01.01.95},
+ organization = {М-во энергетики и электрификации СССР},
+ address = {М.},
+ year = {1986},
+ pagetotal = {43},
+ language = {russian},
+}
+@ONLINE{wiki:latex,
+ author = {Wikipedia},
+ title = {{\LaTeX}---Wikipedia{,} The Free Encyclopedia},
+ year = {2012},
+ url = {http://en.wikipedia.org/wiki/LaTeX},
+ urldate = {25.01.2012},
+}
+
+@ONLINE{wiki:latex-2,
+ author = {Wikipedia},
+ title = {{\LaTeX}},
+ howpublished = {Wikipedia, The Free Encyclopedia},
+ year = {2012},
+ eprint = {wiki/LaTeX},
+ eprinttype = {WikiPedia},
+ url = {http://en.wikipedia.org/wiki/LaTeX},
+ urldate = {25.01.2012},
+}
+@ONLINE{phys:moodle,
+ author = {Черкасский, В. С.},
+ title = {Классная комната},
+ howpublished = {Физический факультет},
+ organization = {НГУ},
+ year = {2012},
+ url = {http://www.phys.nsu.ru/moodle/},
+ urldate = {16.01.2012},
+ language = {russian},
+}
+@MISC{EXFOR,
+ author = {IAEA},
+ title = {{EXFOR}---Experimental Nuclear Reaction Data },
+ url = {http://www-nds.iaea.org/exfor},
+ address = {P.O. Box 100, Wagramer Strasse 5, A-1400 Vienna, Austria},
+ year = {2012},
+ media = {eresource}
+}
+@BOOK{IsaacNewton,
+ author = {Newton, {\relax Sir Isaac}},
+ title = {Opticks, or a treatise of the reflections,
+ refractions, inflections and colours of light},
+ publisher = {William Innys},
+ url = {http://books.google.com/books?id=XXu4AkRVBBoC},
+ media = {eresource},
+ year = {1730},
+ pagetotal = {382},
+ eprint = {XXu4AkRVBBoC},
+ eprinttype = {Google Books},
+}
+
+@BOOK{IsaacNewton-sl:sn,
+ author = {{\relax Sir I}saac Newton},
+ title = {Opticks, or a treatise of the reflections,
+ refractions, inflections and colours of light},
+ url = {http://books.google.com/books?id=XXu4AkRVBBoC},
+ media = {online},
+ year = {1730},
+ pagetotal = {382},
+ eprint = {XXu4AkRVBBoC},
+ eprinttype = {Google Books},
+}
+% publisher = {William Innys},
+@BOOK{Encyclopedia,
+ title = {Художественная энциклопедия зарубежного классического искусства},
+ publisher = {Большая Рос. энцикл.},
+ year = {1996},
+ address = {М.},
+ note = {1 электрон. опт. диск (CD-ROM)},
+ language = {russian},
+ media = {eresource},
+}
+
+@ARTICLE{Nasirova,
+ title = {Модели государственного регулирования страховой деятельности},
+ author = {Насырова, Г. А.},
+ language = {russian},
+ note = {Режим доступа: http://vestnik.fa.ru/4(28)2003/4.html},
+ number = {4},
+ year = {2003},
+ journal = {Вестник Финансовой академии},
+ media2 = {eresource},
+ media = {online},
+}
+
+@BOOK{kremlincd,
+ title = {Московский Кремль},
+ titleaddon = {трехмер. путеводитель},
+ language = {russian},
+ note = {CD-ROM},
+ date = {2007},
+ location = {М.},
+ publisher = {Новый Диск},
+ media = {eresource},
+}
+@ARTICLE{PhysRevLett.101.085006,
+ author = {Kotelnikov, Igor and Rom\'e, Massimiliano},
+ volume = {101},
+ journal = {Phys. Rev. Lett.},
+ month = {Aug},
+ pagetotal = {4},
+ title = {Admissible Equilibria of Non-neutral Plasmas in a Malmberg-Penning Trap},
+ year = {2008},
+ doi = {10.1103/PhysRevLett.101.085006},
+ issue = {8},
+ publisher = {American Physical Society},
+ pages = {085006},
+}
+
+% url = {http://link.aps.org/doi/10.1103/PhysRevLett.101.085006},
+@ARTICLE{1998PhRvE..57.7111K,
+ author = {{Kinney}, R.~M. and {McWilliams}, J.~C.},
+ title = {{Turbulent cascades in anisotropic magnetohydrodynamics}},
+ journal = pre,
+ keywords = {Plasma turbulence, Magnetohydrodynamic and fluid equation},
+ year = {1998},
+ month = jun,
+ volume = {57},
+ pages = {7111-7121},
+ doi = {10.1103/PhysRevE.57.7111},
+ adsurl = {http://adsabs.harvard.edu/abs/1998PhRvE..57.7111K},
+ adsnote = {Provided by the SAO/NASA Astrophysics Data System},
+}
+
+@ARTICLE{1998UFN,
+ author = {Котельников, И. А. and Астрелин, В. Т.},
+ title = {Теория плазменного эмиттера положительных ионов},
+ journal = ufn,
+ keywords = {плазменный эмиттер, критерий Бома},
+ year = {2015},
+ month = jul,
+ volume = {185},
+ pages = {753-771},
+ language = {russian},
+ doi = {10.3367/UFNr.0185.201507c.0753},
+ url = {http://ufn.ru/ru/articles/2015/7/c/},
+}
+@PATENT{patent1,
+ author = {Э. В. Тернер},
+ authorcountry = {США},
+ title = {Одноразовая ракета-носитель},
+ media = {text},
+ type = {заявка},
+ number = {1095735},
+ location = {Рос. Федерация},
+ ipc = {МПК\ensuremath{^7} B 64 G 1/00},
+ holder = {заявитель Спейс Системз/Лорал, инк.},
+ credits = {патент. поверенный Егорова Г. Б.},
+ requestnumber = {000108705/28},
+ requestdate = {07.04.2000},
+ publicationdate = {10.03.2001},
+ publication = {Бюл. № 7 (I ч.)},
+ prioritydate= {09.04.1999},
+ prioritynumber = {09/289, 037},
+ prioritycountry = {США},
+ pagetotal = {5 с.~: ил.},
+ language = {russian},
+}
+
+@PATENT{patent2,
+ author = {В. И. Чугаева},
+ authorcountry = {РФ},
+ title = {Приемопередающее устройство},
+ media = {text},
+ type = {пат.},
+ number = {2000131736/09},
+ location = {Рос. Федерация},
+ ipc = {МПК\ensuremath{^7} H 04 В 1/38, Н 04 J 13/00},
+ holder = {заявитель и патентообладатель Воронеж. науч.-ислед. ин-т связи.},
+ credits = {патент. поверенный Егорова Г. Б.},
+ requestnumber = {000108705/28},
+ date = {18.12.2000},
+ publicationdate = {20.08.2002},
+ publication = {Бюл. № 23 (II ч.)},
+ pagetotal = {2 с.~: ил.},
+ language = {russian},
+}
diff --git a/biblio/bibtex/contrib/gost/doc/examples/utf8/make-examples-on-win-utf8.cmd b/biblio/bibtex/contrib/gost/doc/examples/utf8/make-examples-on-win-utf8.cmd
new file mode 100644
index 0000000000..817e4e3852
--- /dev/null
+++ b/biblio/bibtex/contrib/gost/doc/examples/utf8/make-examples-on-win-utf8.cmd
@@ -0,0 +1,34 @@
+@echo ⮢ 䠩 ਬ஢
+@echo ==========================
+
+@echo २ ।饣 饣 䠩
+
+rename .\bib\examples.bib examples.bak
+
+@echo ஢ 쪨 䠩 让
+
+copy .\bib\ex*.bib .\bib\examples.bib
+
+@echo ᪠ ਬ஢
+
+for %%f in (ugost7*.tex) do pdflatex -quiet %%f
+for %%f in (ugost200*.tex) do pdflatex -quiet %%f
+
+@echo ᪠ ࠡ⪠ bibtex8 *.aux, ⮣ '㤠 㤥'
+
+for %%f in (ugost*.aux) do bibtex8 -B -c utf8cyrillic.csf %%f
+
+@echo ᪠ ਬ஢ (室 ᫥ bibtex8)
+
+for %%f in (ugost7*.tex) do pdflatex %%f
+for %%f in (ugost200*.tex) do pdflatex %%f
+for %%f in (ugost2008-nat*.tex) do pdflatex %%f
+for %%f in (ugost2008-sort*.tex) do pdflatex %%f
+
+@echo ⪠ 㦭 䠩
+
+@del *.aux *.out *.toc *.brf .pdf
+@del *.bbl
+@del *.blg
+@del *.log
+@echo =======
diff --git a/biblio/bibtex/contrib/gost/doc/examples/utf8/ugost.tex b/biblio/bibtex/contrib/gost/doc/examples/utf8/ugost.tex
new file mode 100644
index 0000000000..27482cbd26
--- /dev/null
+++ b/biblio/bibtex/contrib/gost/doc/examples/utf8/ugost.tex
@@ -0,0 +1,194 @@
+\documentclass[a4paper]{article}
+\usepackage[T2A]{fontenc}
+\usepackage[utf8]{inputenc}
+\usepackage[russian]{babel}
+\usepackage{bibunits,verbatim,geometry,ifpdf}
+
+%============================================================
+\makeatletter
+\RequirePackage{bibunits}
+\renewcommand{\@bibunitname}{\jobname-\the\@bibunitauxcnt}
+\newcounter{qnum}\newcounter{qnuma}\setcounter{qnum}{0}
+\def\@biblabel#1{#1.\hfill}
+%\endinput
+\renewenvironment{thebibliography}[1]
+ {\list{\@biblabel{\@arabic\c@enumiv}}%
+ {\settowidth\labelwidth{\@biblabel{99}}%
+ \leftmargin\labelwidth
+ \advance\leftmargin\labelsep
+% \advance\leftmargin\parindent
+ \setcounter{qnuma}{\c@enumiv}
+ \@openbib@code
+ \usecounter{enumiv}%
+ \let\p@enumiv\@empty
+ \setcounter{enumiv}{\theqnuma}
+ \renewcommand\theenumiv{\@arabic\c@enumiv}}%
+ \sloppy
+ \clubpenalty4000
+ \@clubpenalty \clubpenalty
+ \widowpenalty4000%
+ \sfcode`\.\@m}
+ {\def\@noitemerr
+ {\@latex@warning{Empty `thebibliography' environment}}%
+ \endlist}
+\makeatother
+%============================================================
+
+\ifpdf
+ \usepackage[pdftex,hyperindex,unicode]{hyperref}
+ \usepackage{cmap}
+\else
+ \usepackage[hypertex]{hyperref}
+\fi
+\usepackage{color}
+\definecolor{darkblue}{rgb}{0,0,.6}
+\hypersetup{
+ pdftitle = {\mytitle},
+ pdfauthor = {Igor A. Kotelnikov},
+ pdfsubject = {GOST, BibTeX},
+ pdfstartview = {FitH},
+% pdfborder = {0 0 0},
+% bookmarksopen = true,
+ bookmarksnumbered = true,
+% bookmarksopenlevel = 2,
+ colorlinks = true, linkcolor = darkblue,
+ citecolor = darkblue, filecolor = darkblue,
+ menucolor = darkblue, urlcolor = darkblue
+}
+
+
+\begin{document}
+
+\newcommand{\bibentry}[1]{
+\begin{bibunit}
+\nocite{*}
+\putbib[bib/#1]
+\nopagebreak
+\verbatiminput{bib/#1.bib}
+\end{bibunit}
+}
+
+%\title{\mytitle}
+%\maketitle
+%\begin{abstract}
+% \mydescription
+%\end{abstract}
+%
+\bibliographyunit[\section]
+\bibliographystyle{\mybibstyle}
+
+\section{Books}
+
+\subsection{One--three authors}
+\bibentry{ex01}
+\bibentry{ex02}
+\bibentry{ex03}
+
+\subsection{Four and more authors}
+\bibentry{ex04}
+\bibentry{ex05}
+
+\subsection{Collective author}
+\bibentry{ex06}
+
+\subsection{Compiler}
+\bibentry{ex06a}
+
+\subsection{Multiple-volume publications}
+\bibentry{ex07}
+\bibentry{ex08}
+\bibentry{ex09}
+
+\subsection{Translated}
+\bibentry{ex10}
+
+\subsection{Collections}
+\bibentry{ex12}
+
+\subsection{Dictionary}
+\bibentry{ex13}
+
+
+\section{Parts of \ldots}
+
+\subsection{Book}
+\bibentry{ex14}
+\bibentry{ex14a}
+
+\subsection{Collection}
+\bibentry{ex15}
+
+\subsection{Journal}
+\bibentry{ex16}
+\bibentry{ex17}
+\bibentry{ex17a}
+
+\subsection{Newspaper}
+\bibentry{ex17b}
+
+\subsection{Encyclopedia}
+\bibentry{ex18}
+
+\subsection{Proceedings}
+\bibentry{ex19}
+\bibentry{ex20}
+
+\subsubsection{With crossreference}
+\bibentry{ex20a}
+
+\subsubsection{With multiple languages}
+\bibentry{ex20b}
+
+
+\section{Others}
+
+\subsection{Standard}
+\bibentry{ex11}
+
+\subsection{Dissertation}
+\bibentry{ex21}
+\bibentry{ex21a}
+\bibentry{ex21b}
+Allowed built-in values of \verb|type| field in \verb|@THESIS| entry are \verb|mathesis| for masters thesis, \verb|phdthesis| for Ph.D. thesis, and \verb|docthesis| for doctor of sciences dissertation. Any other value of \verb|type| is reproduced literally.
+\bibentry{ex22}
+\bibentry{ex22a}
+
+\subsection{Preprint}
+\bibentry{ex23}
+
+\subsection{Report}
+\bibentry{ex24}
+\bibentry{ex24a}
+\bibentry{ex24b}
+
+\subsection{Catalog}
+\bibentry{ex25}
+
+\subsection{Instruction}
+\bibentry{ex26}
+
+\subsection{Patent}
+\bibentry{ex31}
+
+
+\section{Electronic resources}
+
+\subsection{Common Fields}
+\verb|Url|, \verb|eprint|, \verb|doi| and \verb|media| fields can be assigned to any entry. Allowed values of \verb|media| are \verb|online|, \verb|eresource| and \verb|text| (default).
+\bibentry{ex27c}
+\bibentry{ex28}
+\bibentry{ex28a}
+\bibentry{ex29}
+
+\subsection{Online Entry}
+\bibentry{ex27a}
+\bibentry{ex27b}
+
+\section{Use of macros}
+
+\texttt{jan}, \texttt{feb}, \texttt{mar},\ldots{} \texttt{dec} macros in \texttt{month} field
+are automatically translated to Russian or English if necessary. Other languages are not supported.
+\bibentry{ex30}
+
+
+\end{document} \ No newline at end of file
diff --git a/biblio/bibtex/contrib/gost/doc/examples/utf8/ugost2003.pdf b/biblio/bibtex/contrib/gost/doc/examples/utf8/ugost2003.pdf
new file mode 100644
index 0000000000..63575d6143
--- /dev/null
+++ b/biblio/bibtex/contrib/gost/doc/examples/utf8/ugost2003.pdf
Binary files differ
diff --git a/biblio/bibtex/contrib/gost/doc/examples/utf8/ugost2003.tex b/biblio/bibtex/contrib/gost/doc/examples/utf8/ugost2003.tex
new file mode 100644
index 0000000000..b8c34901b4
--- /dev/null
+++ b/biblio/bibtex/contrib/gost/doc/examples/utf8/ugost2003.tex
@@ -0,0 +1,18 @@
+\edef\mybibstyle{ugost2003}
+\RequirePackage[utf8]{inputenc}
+\RequirePackage{cmap}
+\newcommand*{\mytitle}{The GOST bundle: \mybibstyle.bst}
+\newcommand{\mydescription}{
+ Example bibliographic description using the style \texttt{\mybibstyle.bst}.
+ No customization is applied.
+
+ Пример оформления библиографического описания с помощью стиля \texttt{\mybibstyle.bst}.
+ Команды форматирования не изменены.
+
+ This is style is intended for composing bibliographic catalogs and descriptions.
+
+ Данный стиль предназначен для составления библиотечных каталогов и описаний.
+
+}
+\input ugost
+
diff --git a/biblio/bibtex/contrib/gost/doc/examples/utf8/ugost2008-customized.pdf b/biblio/bibtex/contrib/gost/doc/examples/utf8/ugost2008-customized.pdf
new file mode 100644
index 0000000000..e2787ae9a7
--- /dev/null
+++ b/biblio/bibtex/contrib/gost/doc/examples/utf8/ugost2008-customized.pdf
Binary files differ
diff --git a/biblio/bibtex/contrib/gost/doc/examples/utf8/ugost2008-customized.tex b/biblio/bibtex/contrib/gost/doc/examples/utf8/ugost2008-customized.tex
new file mode 100644
index 0000000000..e56f03aa02
--- /dev/null
+++ b/biblio/bibtex/contrib/gost/doc/examples/utf8/ugost2008-customized.tex
@@ -0,0 +1,18 @@
+\edef\mybibstyle{ugost2008}
+\RequirePackage[utf8]{inputenc}
+\newcommand*{\mytitle}{The GOST bundle: customization}
+\newcommand{\mydescription}{
+ Example of a bibliography using the style \texttt{\mybibstyle.bst}.
+ Customization is applied.
+% \protect\verb|\providecommand*{\BibEmph}[1]{#1}|\\
+% \protect\verb|\providecommand*{\BibDash}{}|
+
+ Пример оформления списка литературы с помощью стиля
+ \texttt{\mybibstyle.bst}.
+ Применены команды форматирования.
+% \protect\verb|\providecommand*{\BibEmph}[1]{\#1}|\\
+% \protect\verb|\providecommand*{\BibDash}{}|
+}
+\providecommand*{\BibEmph}[1]{\textbf{#1}}
+\providecommand*{\BibDash}{}
+\input ugost
diff --git a/biblio/bibtex/contrib/gost/doc/examples/utf8/ugost2008.pdf b/biblio/bibtex/contrib/gost/doc/examples/utf8/ugost2008.pdf
new file mode 100644
index 0000000000..091c78e2b2
--- /dev/null
+++ b/biblio/bibtex/contrib/gost/doc/examples/utf8/ugost2008.pdf
Binary files differ
diff --git a/biblio/bibtex/contrib/gost/doc/examples/utf8/ugost2008.tex b/biblio/bibtex/contrib/gost/doc/examples/utf8/ugost2008.tex
new file mode 100644
index 0000000000..1044a71e75
--- /dev/null
+++ b/biblio/bibtex/contrib/gost/doc/examples/utf8/ugost2008.tex
@@ -0,0 +1,14 @@
+\edef\mybibstyle{ugost2008}
+\RequirePackage[utf8]{inputenc}
+\RequirePackage{cmap}
+\newcommand*{\mytitle}{The GOST bundle: \mybibstyle.bst}
+\newcommand{\mydescription}{
+ Example of a bibliography using the style \texttt{\mybibstyle.bst}.
+ No customization is applied.
+
+ Пример оформления списка литературы с помощью стиля
+ \texttt{\mybibstyle.bst}.
+ Команды форматирования не изменены.
+}
+\input ugost
+
diff --git a/biblio/bibtex/contrib/gost/doc/examples/utf8/ugost2008l.pdf b/biblio/bibtex/contrib/gost/doc/examples/utf8/ugost2008l.pdf
new file mode 100644
index 0000000000..de8bc07265
--- /dev/null
+++ b/biblio/bibtex/contrib/gost/doc/examples/utf8/ugost2008l.pdf
Binary files differ
diff --git a/biblio/bibtex/contrib/gost/doc/examples/utf8/ugost2008l.tex b/biblio/bibtex/contrib/gost/doc/examples/utf8/ugost2008l.tex
new file mode 100644
index 0000000000..8d2fdda89f
--- /dev/null
+++ b/biblio/bibtex/contrib/gost/doc/examples/utf8/ugost2008l.tex
@@ -0,0 +1,18 @@
+\edef\mybibstyle{ugost2008l}
+\RequirePackage[utf8]{inputenc}
+\RequirePackage{cmap}
+\newcommand*{\mytitle}{The GOST bundle: \mybibstyle.bst}
+\newcommand{\mydescription}{
+ Example of a bibliography using the style \texttt{\mybibstyle.bst}.
+ No customization is applied.
+
+ Пример оформления списка литературы с помощью стиля
+ \texttt{\mybibstyle.bst}.
+ Команды форматирования не изменены.
+
+ Note: this style do not conform State Standard.
+
+ Внимание: данный не удовлетворяет ГОСТу.
+}
+\input ugost
+
diff --git a/biblio/bibtex/contrib/gost/doc/examples/utf8/ugost2008n.pdf b/biblio/bibtex/contrib/gost/doc/examples/utf8/ugost2008n.pdf
new file mode 100644
index 0000000000..04e9ecefa6
--- /dev/null
+++ b/biblio/bibtex/contrib/gost/doc/examples/utf8/ugost2008n.pdf
Binary files differ
diff --git a/biblio/bibtex/contrib/gost/doc/examples/utf8/ugost2008n.tex b/biblio/bibtex/contrib/gost/doc/examples/utf8/ugost2008n.tex
new file mode 100644
index 0000000000..b11a8624a9
--- /dev/null
+++ b/biblio/bibtex/contrib/gost/doc/examples/utf8/ugost2008n.tex
@@ -0,0 +1,122 @@
+% !Mode:: "TeX:UTF-8"
+\newcommand*{\mybibstyle}{ugost2008n}
+
+\RequirePackage[utf8]{inputenc}
+\RequirePackage{cmap}
+
+\newcommand*{\mytitle}{The GOST bundle: \mybibstyle.bst}
+\newcommand{\mydescription}{
+ Example of a bibliography using the style \texttt{\mybibstyle.bst}
+ and \texttt{natbib} package.
+ No customization is applied.
+
+ Пример оформления списка литературы с помощью стиля
+ \texttt{\mybibstyle.bst} и пакета \texttt{natbib}.
+ Команды форматирования не изменены.
+}
+
+\documentclass[a4paper]{article}
+\usepackage[utf8]{inputenc}
+\usepackage[T2A]{fontenc}
+\usepackage[ukrainian,russian]{babel}
+\usepackage{natbib}
+\usepackage{geometry,ifpdf}
+\ifpdf
+ \usepackage[pdftex,hyperindex,unicode]{hyperref}
+ \usepackage{cmap}
+\else
+ \usepackage[hypertex]{hyperref}
+\fi
+\usepackage{color}
+\definecolor{darkblue}{rgb}{0,0,.6}
+\hypersetup{
+ pdftitle = {\mytitle},
+ pdfauthor = {Igor A. Kotelnikov},
+ pdfsubject = {GOST, BibTeX},
+ pdfstartview = {FitH},
+% pdfborder = {0 0 0},
+% bookmarksopen = true,
+ bookmarksnumbered = true,
+% bookmarksopenlevel = 2,
+ colorlinks = true, linkcolor = darkblue,
+ citecolor = darkblue, filecolor = darkblue,
+ menucolor = darkblue, urlcolor = darkblue
+}
+
+\makeatletter
+\renewcommand{\@biblabel}[1]{#1.}
+\makeatother
+
+\begin{document}
+
+\title{\mytitle}
+\maketitle
+\begin{abstract}
+ \mydescription
+\end{abstract}
+
+%\verb|\cite{*}| \cite{*}
+%
+%\verb|\citep{*}| \citep{*}
+%
+%\verb|\citet{*}| \citet{*}
+
+\newcommand{\allrefs}{Vasylenko92,
+Afanasyev92,
+Makilov91,
+Ponomarenko86,
+Belousova81,
+BibOp91,
+Poems82,
+HistLit82,
+Landau:eldin,
+BRLS94,
+Grosse80,
+GOST7184,
+ObchTech93,
+Bibdelo86,
+Ponomarenko79,
+Zeyts70,
+Ponoomarenko76,
+Malikov92,
+Ponomarenko86a,
+dixit.pindyck:options,
+RosGaz-article,
+Dolmatovskiy88,
+Ponomarenko88,
+Melikov95, Selikov95, Selikov+95,
+Gojchuk98,
+Polyakov98a,
+TranskSpivrob99:Purich,
+Luus82,
+KIA95-default,
+KIA85-autoref,
+Ponomarenko76,
+Report81-rep,
+Report81b-rep-notype,
+Report81-techrep,
+CatalogMamals81,
+Instr86,
+wiki:latex,
+wiki:latex-2,
+phys:moodle,
+EXFOR,
+IsaacNewton,
+IsaacNewton-sl:sn,
+PhysRevLett.101.085006}
+
+
+\verb|\citep|\par \citep{\allrefs}
+
+\verb|\citep*|\par \citep{\allrefs}
+
+\verb|\citeauthor|\par \citeauthor{\allrefs}
+
+\verb|\citeauthor*|\par \citeauthor*{\allrefs}
+
+\bibliographystyle{\mybibstyle}
+\bibliography{bib/examples}
+
+\end{document}
+
+
diff --git a/biblio/bibtex/contrib/gost/doc/examples/utf8/ugost2008ns.pdf b/biblio/bibtex/contrib/gost/doc/examples/utf8/ugost2008ns.pdf
new file mode 100644
index 0000000000..47eb226140
--- /dev/null
+++ b/biblio/bibtex/contrib/gost/doc/examples/utf8/ugost2008ns.pdf
Binary files differ
diff --git a/biblio/bibtex/contrib/gost/doc/examples/utf8/ugost2008ns.tex b/biblio/bibtex/contrib/gost/doc/examples/utf8/ugost2008ns.tex
new file mode 100644
index 0000000000..7956c2146f
--- /dev/null
+++ b/biblio/bibtex/contrib/gost/doc/examples/utf8/ugost2008ns.tex
@@ -0,0 +1,123 @@
+% !Mode:: "TeX:UTF-8"
+\newcommand*{\mybibstyle}{ugost2008ns}
+
+\RequirePackage[utf8]{inputenc}
+\RequirePackage{cmap}
+
+\newcommand*{\mytitle}{The GOST bundle: \mybibstyle.bst}
+\newcommand{\mydescription}{
+ Example of a bibliography using the style \texttt{\mybibstyle.bst}
+ and \texttt{natbib} package.
+ No customization is applied.
+
+ Пример оформления списка литературы с помощью стиля
+ \texttt{\mybibstyle.bst} и пакета \texttt{natbib}.
+ Команды форматирования не изменены.
+}
+
+\documentclass[a4paper]{article}
+\usepackage[utf8]{inputenc}
+\usepackage[T2A]{fontenc}
+\usepackage[ukrainian,russian]{babel}
+\usepackage{natbib}
+\usepackage{geometry,ifpdf}
+\ifpdf
+ \usepackage[pdftex,hyperindex,unicode]{hyperref}
+ \usepackage{cmap}
+\else
+ \usepackage[hypertex]{hyperref}
+\fi
+\usepackage{color}
+\definecolor{darkblue}{rgb}{0,0,.6}
+\hypersetup{
+ pdftitle = {\mytitle},
+ pdfauthor = {Igor A. Kotelnikov},
+ pdfsubject = {GOST, BibTeX},
+ pdfstartview = {FitH},
+% pdfborder = {0 0 0},
+% bookmarksopen = true,
+ bookmarksnumbered = true,
+% bookmarksopenlevel = 2,
+ colorlinks = true, linkcolor = darkblue,
+ citecolor = darkblue, filecolor = darkblue,
+ menucolor = darkblue, urlcolor = darkblue
+}
+
+\makeatletter
+\renewcommand{\@biblabel}[1]{#1.}
+\makeatother
+
+\begin{document}
+
+\title{\mytitle}
+\maketitle
+\begin{abstract}
+ \mydescription
+\end{abstract}
+
+%\verb|\cite{*}| \cite{*}
+%
+%\verb|\citep{*}| \citep{*}
+%
+%\verb|\citet{*}| \citet{*}
+
+\newcommand{\allrefs}{Vasylenko92,
+Afanasyev92,
+Makilov91,
+Ponomarenko86,
+Belousova81,
+BibOp91,
+Poems82,
+HistLit82,
+Landau:eldin,
+BRLS94,
+Grosse80,
+GOST7184,
+ObchTech93,
+Bibdelo86,
+Ponomarenko79,
+Zeyts70,
+Ponoomarenko76,
+Malikov92,
+Ponomarenko86a,
+dixit.pindyck:options,
+RosGaz-article,
+Dolmatovskiy88,
+Ponomarenko88,
+Melikov95, Selikov95, Selikov+95,
+Gojchuk98,
+Polyakov98a,
+TranskSpivrob99:Purich,
+Luus82,
+KIA95-default,
+KIA85-autoref,
+Ponomarenko76,
+Report81-rep,
+Report81b-rep-notype,
+Report81-techrep,
+CatalogMamals81,
+Instr86,
+wiki:latex,
+wiki:latex-2,
+phys:moodle,
+EXFOR,
+IsaacNewton,
+IsaacNewton-sl:sn,
+PhysRevLett.101.085006}
+
+
+\verb|\citep|\par \citep{\allrefs}
+
+\verb|\citep*|\par \citep{\allrefs}
+
+\verb|\citeauthor|\par \citeauthor{\allrefs}
+
+\verb|\citeauthor*|\par \citeauthor*{\allrefs}
+
+
+\bibliographystyle{\mybibstyle}
+\bibliography{bib/examples}
+
+\end{document}
+
+
diff --git a/biblio/bibtex/contrib/gost/doc/examples/utf8/ugost2008s.pdf b/biblio/bibtex/contrib/gost/doc/examples/utf8/ugost2008s.pdf
new file mode 100644
index 0000000000..739a5db4f6
--- /dev/null
+++ b/biblio/bibtex/contrib/gost/doc/examples/utf8/ugost2008s.pdf
Binary files differ
diff --git a/biblio/bibtex/contrib/gost/doc/examples/utf8/ugost2008s.tex b/biblio/bibtex/contrib/gost/doc/examples/utf8/ugost2008s.tex
new file mode 100644
index 0000000000..827e8ccd03
--- /dev/null
+++ b/biblio/bibtex/contrib/gost/doc/examples/utf8/ugost2008s.tex
@@ -0,0 +1,106 @@
+% !Mode:: "TeX:UTF-8"
+\newcommand*{\mybibstyle}{ugost2008s}
+
+\RequirePackage[utf8]{inputenc}
+
+\newcommand*{\mytitle}{The GOST bundle: \mybibstyle.bst}
+\newcommand{\mydescription}{
+ Example of a bibliography using the style \texttt{\mybibstyle.bst}.
+ No customization is applied.
+
+ Пример оформления списка литературы с помощью стиля
+ \texttt{\mybibstyle.bst}.
+ Команды форматирования не изменены.
+}
+
+\documentclass[a4paper]{article}
+\usepackage[utf8]{inputenc}
+\usepackage[T2A]{fontenc}
+\usepackage[ukrainian,russian]{babel}
+%\usepackage{natbib}
+\usepackage{geometry,ifpdf}
+\ifpdf
+ \usepackage[pdftex,hyperindex,unicode]{hyperref}
+ \usepackage{cmap}
+\else
+ \usepackage[hypertex]{hyperref}
+\fi
+\usepackage{color}
+\definecolor{darkblue}{rgb}{0,0,.6}
+\hypersetup{
+ pdftitle = {\mytitle},
+ pdfauthor = {Igor A. Kotelnikov},
+ pdfsubject = {GOST, BibTeX},
+ pdfstartview = {FitH},
+% pdfborder = {0 0 0},
+% bookmarksopen = true,
+ bookmarksnumbered = true,
+% bookmarksopenlevel = 2,
+ colorlinks = true, linkcolor = darkblue,
+ citecolor = darkblue, filecolor = darkblue,
+ menucolor = darkblue, urlcolor = darkblue
+}
+
+\makeatletter
+\renewcommand{\@biblabel}[1]{#1.}
+\makeatother
+
+\begin{document}
+
+\title{\mytitle}
+\maketitle
+\begin{abstract}
+ \mydescription
+\end{abstract}
+
+\newcommand{\allrefs}{Vasylenko92,
+Afanasyev92,
+Makilov91,
+Ponomarenko86,
+Belousova81,
+BibOp91,
+Poems82,
+HistLit82,
+Landau:eldin,
+BRLS94,
+Grosse80,
+GOST7184,
+ObchTech93,
+Bibdelo86,
+Ponomarenko79,
+Zeyts70,
+Ponoomarenko76,
+Malikov92,
+Ponomarenko86a,
+dixit.pindyck:options,
+RosGaz-article,
+Dolmatovskiy88,
+Ponomarenko88,
+Melikov95,
+Gojchuk98,
+Polyakov98a,
+TranskSpivrob99:Purich,
+Luus82,
+KIA95-default,
+KIA85-autoref,
+Ponomarenko76,
+Report81-rep,
+Report81b-rep-notype,
+Report81-techrep,
+CatalogMamals81,
+Instr86,
+wiki:latex,
+wiki:latex-2,
+phys:moodle,
+EXFOR,
+IsaacNewton,
+IsaacNewton-sl:sn,
+PhysRevLett.101.085006}
+
+\nocite{*}
+\cite{\allrefs}
+
+\bibliographystyle{\mybibstyle}
+\bibliography{bib/examples}
+
+\end{document}
diff --git a/biblio/bibtex/contrib/gost/doc/gost.pdf b/biblio/bibtex/contrib/gost/doc/gost.pdf
new file mode 100644
index 0000000000..296cadade9
--- /dev/null
+++ b/biblio/bibtex/contrib/gost/doc/gost.pdf
Binary files differ
diff --git a/biblio/bibtex/contrib/gost/source/gost.dtx b/biblio/bibtex/contrib/gost/source/gost.dtx
new file mode 100644
index 0000000000..ba678e3abd
--- /dev/null
+++ b/biblio/bibtex/contrib/gost/source/gost.dtx
@@ -0,0 +1,5097 @@
+% \iffalse
+% !Mode:: "DTX:UNIX:UTF-8"
+%
+% This is the source file for the GOST package
+% to be used with BibTeX8.
+% It contains set of bibliographic style that
+% attempt to format the bibliography according to
+% GOST R 7.0.5-2008 with some conventional modifications.
+%
+% Copyright 2012-2017 Igor A. Kotelnikov.
+% Version 1.2i
+%
+% Copyright 1996-2005 Maksym Polyakov.
+% Version 2005.08.12
+%
+% For a bibliographic entry in Russian you need
+% to add the field
+% language = {russian}.
+% Ukrainian, German, French, Italian languages are
+% also partially supported. Default language is English.
+%
+% Book entry should have the pagetotal field
+% showing total number of pages. Optional field
+% url will format URL (using hyperref, if loaded).
+%
+% See examples in gost*.pdf.
+%
+% Requires 8-bit bibtex with switch -B and csf file supporting cyrillic.
+% bibtex8 -B -c <encoding>.csf <your_document>
+%
+%
+% Download from
+% CTAN:macros/latex/contrib/gost/gost.dtx
+%
+% To unpack run
+% latex gost.ins
+%
+% To produce the documentation run
+% pdflatex gost.dtx
+% makeindex -r -s gind.ist gost
+% makeindex -r -s gglo.ist -o gost.gls gost.glo
+% pdflatex gost.dtx
+% pdflatex gost.dtx
+%
+% TeX Directory Structure
+%
+% Move all *.bst files to TDS:bibtex/bst/gost
+% Move all *.csf files to TDS:bibtex/csf/gost
+% Move all *.pdf files to TDS:doc/bibtex/gost
+% Move gost.dtx and gost.ins to TDS:source/bibtex/gost/
+%
+% $Id: gost.dtx, v.2017/01/12 kia999 $
+%
+%<*driver>
+\ProvidesFile{gost.dtx}%
+ [2017/01/12 v.1.2i Bibliography styles for GOST R 7.0.5-2008.]
+
+\documentclass{ltxdoc}
+
+\usepackage{geometry}
+\usepackage{makeidx}
+\ifpdf
+ \usepackage[pdftex,hyperindex,unicode]{hyperref}
+ \usepackage{cmap}
+\else
+ %\usepackage[hypertex]{hyperref}
+ \usepackage{hyperref}
+\fi
+\usepackage{color}
+\definecolor{darkblue}{rgb}{0,0,.6}
+\hypersetup{
+ pdftitle = {The GOST package},
+ pdfauthor = {Igor A. Kotelnikov},
+ pdfsubject = {BibTeX, GOST},
+ pdfstartview = {FitH},
+% pdfborder = {0 0 0},
+% bookmarksopen = true,
+ bookmarksnumbered = true,
+% bookmarksopenlevel = 2,
+ colorlinks = true, linkcolor = darkblue,
+ citecolor = darkblue, filecolor = darkblue,
+ menucolor = darkblue, urlcolor = darkblue
+}
+
+
+\usepackage[utf8]{inputenc}
+\usepackage[T2A]{fontenc}
+\usepackage[russian,english]{babel}
+
+\MakeShortVerb{\|}
+
+\def\file#1{\texttt{#1}}
+\def\pkg#1{\textsf{#1}}
+\def\cmd#1{\texttt{#1}}
+
+\newcommand\DescribeEntry[1]{%
+ \DescribeMacro{#1}\index{Entry!\texttt{#1}}%
+}
+\newcommand\DescribeFunction[1]{%
+ \DescribeMacro{#1}\index{\texttt{#1}}%
+}
+\newcommand\DescribeField[1]{%
+ \DescribeMacro{#1}\index{Field!\texttt{#1}}%
+}
+
+
+\GetFileInfo{gost.dtx}
+\EnableCrossrefs
+%\DisableCrossrefs % Say \DisableCrossrefs if index is ready
+\RecordChanges % Gather update information
+\CodelineIndex % Index code by line number
+%\PageIndex % Index code by page number
+
+\title{The GOST package}
+
+\author{
+ Igor A. Kotelnikov\thanks{\texttt{kia999@mail.ru}}
+}
+
+\date{\filedate, \fileversion}
+
+\makeindex
+
+\begin{document}
+ \maketitle
+ \DocInput{gost.dtx}
+\end{document}
+%</driver>
+% \fi
+%
+% \CheckSum{592}
+%
+% \DoNotIndex{\cyra,\cyrb,\cyrv,\cyrg,\cyrd,\cyre}
+% \DoNotIndex{\CYRP,\cyrii,\cyrr,\cyre,\cyro,\CYRU,\cyrk,\cyrl,\CYRS,\cyrs|}
+% \DoNotIndex{\cyrt,\cyri,\cyrz,\CYRT,\cyrm}
+% \DoNotIndex{\cyr,\cyrc,\CYRD,\cyrery,\cyrh,\CYRK,\CYRM,\CYRN,\cyrn}
+% \DoNotIndex{\cyrp,\cyrs,\cyrshch,\cyru,\CYRV,\cyrya}
+% \DoNotIndex{\CYRA,\CYRB,\cyrch,\CYRE,\CYREREV,\CYRF,\cyrf,\CYRI,\cyrishrt}
+% \DoNotIndex{\CYRO,\CYRR,\cyrsftsn,\CYRYA,\cyryu,\cyrzh}
+% \DoNotIndex{\z@skip,\z@}
+% \DoNotIndex{\|,\~,\ }
+% \DoNotIndex{\\&,\',\(,\),\`,\\,\/,\.}
+% \DoNotIndex{\begin,\DeclareUTFcharacter}
+% \DoNotIndex{\csname,\def}
+% \DoNotIndex{\else,\endcsname,\end}
+% \DoNotIndex{\expandafter,\fi}
+% \DoNotIndex{\hbox,\hss}
+% \DoNotIndex{\iffalse,\ifx,\ignorespaces,\iflanguage}
+% \DoNotIndex{\language,\lastskip,\ldots,\let,\natexlab,\newblock,\nobreak}
+% \DoNotIndex{\providecommand,\ProvideTextCommandDefault,\relax,\renewcommand}
+% \DoNotIndex{\selectlanguage,\selectlanguageifdefined,\small,\textemdash}
+% \DoNotIndex{\textnumero,\unskip,\url,\UTFencname}
+% \DoNotIndex{\,,\catcode,\cite,\citeauthor,\citet,\citeyear,\href,\hskip,\ifdim}
+%
+% \begin{abstract}
+%
+% GOST is a bundle of BibTeX styles designed to meet State Standards (GOST)
+% on information, librarianship and publishing issued by The Russian Federation
+% and Interstate Committee of former USSR States.
+%
+% It comprises 16 BibTeX styles to format bibliography in English, Russian
+% and Ukrainian according to GOST 7.0.5-2008 and GOST 7.1-2003. Both 8-bit
+% and Unicode (UTF-8) versions of each BibTeX style, in each case offering
+% a choice of sorted and unsorted. Further, 2 more styles, |gost780| and
+% |gost780s| styles (not conforming to effective standards) are retained
+% for backwards compatibility.
+%
+% \end{abstract}
+%
+% \section{Introduction}
+% The package was initially developed by Maksym Polyakov. It was later
+% updated by Igor Kotelnikov to the present status and some code was borrowed
+% from \pkg{disser} package developed by Stanislav Kruchinin and unpublished
+% work by Artem Petrenkov.
+%
+% Nowdays, GOST is a bundle of BibTeX styles designed to meet State Standards
+% (GOST) on information, librarianship and publishing issued by
+% Russian Federation and interstate committee of former USSR States.
+%
+% The System of Standards includes:
+% \begin{description}
+% \item[GOST 7.0.5-2008]
+% Bibliographic reference.
+% General requirements and rules of making.
+% \item[GOST 7.1 -2003]
+% Bibliographic record.
+% Bibliographic description.
+% General requirements and rules.
+% \item[GOST 7.80 -2000]
+% Bibliographic record.
+% Heading. General requirements and rules.
+% \item[GOST 7.11 -2004]
+% Bibliographic description and references.
+% Rules for the abbreviation of words and word combinations
+% in foreign European languages.
+% \item[GOST 7.83 -2001]
+% Electronic editions. Basic types and imprint.
+% \end{description}
+% ect.
+%
+% Currently, GOST contains 16 BibTeX styles to format bibliography in English,
+% Russian and Ukrainian according to GOST 7.0.5-2008 and GOST 7.1-2003. Both
+% 8-bit and Unicode (UTF-8) versions of each BibTeX style, in each case
+% offering a choice of sorted and unsorted. Further, 2 styles, |gost780| and
+% |gost780s| styles (which do not conform to effective standards) are retained
+% for backwards compatibility.
+%
+% All styles in the GOST bundle are derived from single master file
+% \file{gost.dtx} by applying different set of options as shown in the table
+% below.
+%
+% \begin{verbatim}
+%------------------------------------------------------------------------
+% Style | utf8 | strict | modern | eprint | long | sort | natbib
+%------------------------------------------------------------------------
+% gost780 | | | | | | |
+% gost780s | | | | | | + |
+%------------------------------------------------------------------------
+% gost2003 | | + | | + | | |
+% gost2003s | | + | | + | | + |
+% gost2008 | | | + | + | | |
+% gost2008n | | | + | + | | | +
+% gost2008l | | | + | + | + | |
+% gost2008s | | | + | + | | + |
+% gost2008ns | | | + | + | | + | +
+% gost2008ls | | | + | + | + | + |
+%------------------------------------------------------------------------
+% ugost2003 | + | + | | + | | |
+% ugost2003s | + | + | | + | | + |
+% ugost2008 | + | | + | + | | |
+% ugost2008n | + | | + | + | | | +
+% ugost2008l | + | | + | + | + | |
+% ugost2008s | + | | + | + | | + |
+% ugost2008ns | + | | + | + | | + | +
+% ugost2008ls | + | | + | + | + | + |
+%------------------------------------------------------------------------
+% Style | utf8 | strict | modern | eprint | long | sort | natbib
+%------------------------------------------------------------------------
+% \end{verbatim}
+%
+% |Gost2008| style is recommended for most applications. It corresponds to the
+% currently effective Standard 7.0.5-2008. Librarians should use the style
+% |gost2003| instead of |gost2008| to compile a library catalog to meet the
+% Standard 7.1-2003. Use of other styles is best explained through
+% the meaning of options used to compile those styles from the master source.
+%
+% Two styles, |gost780| and |gost780s|, compiled without |modern| and |strict|
+% options, are retained for backward compatibility. They do not conform
+% the Standards 7.0.5-2008 and 7.1-2003 cited above.
+%
+% The |strict| option provides conformance to the Standard 7.1-2003. The
+% styles compiled with that option bear the name |gost2003| with possible
+% suffixes |s|, |l|, |n| as explained below. These styles are intended
+% primarily for the librarians who compose a library catalog.
+%
+% The |modern| option meets the Standard 7.0.5-2008 which can be thought
+% off as a relaxed version of the Standards 7.1-2003. The styles compiled with
+% that option bear the name |gost2008| with possible suffixes |s|, |l|, |n|.
+% The |strict| option has precedence over |modern| so that a style compiled
+% with both options will resemble mainly the |gost2003| style rather than
+% |gost2008|.
+%
+% If the number of authors exceeds 4, modern styles cut the list of authors
+% to at most 4 persons as prescibed by the Standards. Option
+% |long| overrides this rule to provide backward compatibility with the
+% package disser by Stanislab Kruchinin. Two styles, |gost2008l| and
+% |gost2008ls|, compiled with the option |long| mimic behavior of the styles
+% |gost705| and |gost705s| from the disser package. Major
+% effect of the |long| option is that the list of authors always
+% precedes book or article title no matter how long is it.
+% Modern styles compiled without |long| place long list of authors behind
+% the title. The names of styles compiled with the option |long| has the
+% suffix |l|. Recall that those styles do not conform effective Standards and
+% their use is discouraged.
+%
+% The |eprint| option enables formatting electronic publications. In particular,
+% it enables |eprint|, |eprinttype|, |eprintclass|, and |doi| fields for a
+% bibliographic entry. The styles generated without the |eprint| option,
+% ignore the these fields. Starting from the
+% version 1.2 of the GOST package, all modern styles are compiled with this
+% option included, and the suffix |e| which designated
+% this option in earlier versions is not appended to the name of style
+% any more.
+%
+% The |natbib| option provides compatibility with the |natbib| package. The names
+% of styles compiled with the option |natbib| bear the suffix |n|. Currently
+% 4 styles with that option are available for beta testing.
+%
+% The |sort| option enables sorting bibliographic references by author names
+% and references titles. The names of styles compiled with the option |sort|
+% bear the suffix |s|.
+%
+% Finally, the |utf8| option produces bibliographic styles in unicode rather
+% that in 8-bit encoding. Names of those styles bear the prefix |u|.
+%
+%
+% Beyond bibliographic style, GOST bundle contains CS files (codepage and
+% sorting order).
+% \begin{verbatim}
+% ----------------------------------------------------------------
+% Encoding | CSF Sorting order
+% ----------------------------------------------------------------
+% cp866 | ruscii.csf Cyrillic first, Latin
+% cp1251 | cp1251.csf Cyrillic first, Latin
+% koi8-u | koi8u.csf Cyrillic first, Latin
+% utf8 | utf8cyrillic.csf Cyrillic first, Latin
+% ----------------------------------------------------------------
+% \end{verbatim}
+%
+% In addition, BibTeX8 distribution comes with few more CSFs.
+% \begin{verbatim}
+% ----------------------------------------------------------------
+% Encoding | CSF Sorting order
+% ----------------------------------------------------------------
+% cp866 | cp866rus.csf Latin first, Cyrillic
+% ----------------------------------------------------------------
+% \end{verbatim}
+%
+% \subsection{How to use}
+%
+% \begin{enumerate}
+% \item
+% Select bibliography style by adding appropriate |\bibliographystyle|
+% declaration to your source file \file{<filename>.tex}, e.g.
+% \begin{verbatim}
+% \bibliographystyle{gost2008}
+% \bibliography{database}
+% \end{verbatim}
+%
+% \item
+% Add the field |language="ukrainian"| or |language="russian"| to the
+% bibliographic entries in Ukrainian or Russian languages in your
+% database; English is the default language. German, Italian and
+% French are partially supported.
+%
+% \item
+% To compile list of references from your database use \file{bibtex8.exe}
+% rather than \file{bibtex.exe}. Depending on the codepage of your
+% bibliographic database, indicate one of the CS files
+% listed above as option to \file{bibtex8.exe}. Run LaTeX, then run
+% \file{bibTeX8} and LaTeX again:
+% \begin{verbatim}
+% latex <filename>.tex
+% bibtex8 -B -c <csf_file>.csf <filename>.aux
+% latex <filename>.tex
+% \end{verbatim}
+
+% \item
+% For details on preparing bibliographic database see examples in
+% \file{gost*.pdf}.
+
+% \item
+% \file{ugost*} styles are primarily intended for use
+% with unicode compilers (\file{xelatex} and \file{lualatex}). They
+% should be preferred as well when using 8bit compilers
+% (\file{latex} and \file{pdflatex}) if source file is in utf8 encoding.
+%
+% \item
+% Neither \file{bibtex.exe} nor \file{bibtex8.exe} provides
+% correct sorting order of unicode text. It means that using
+% \file{ugost2008s} or \file{ugost2008ns} may produce unexpected result
+% for documents in \texttt{utf8} encoding.
+%
+% \item
+% \file{Bibtex8} fails to change case of a string if it contains Cyrillic
+% letter in unicode. Therefore \file{ugost2008*} styles do not change case of
+% titles and other parts of bibliographic record while 8-bit styles
+% do the case change where appropriate.
+%
+% \item
+% Either \file{bibtex8} or \file{Bibtex8} fail to cut Cyrillic names to
+% initials. Therefore \file{ugost2008*} styles do not modify name of
+% authors.
+%
+% \item
+% Package |natbib| is required when choosing styles with
+% suffix |n| in their names.
+%
+% \end{enumerate}
+%
+%
+% \subsection{Customization}
+%
+% Every GOST style defines few commands to format some parts of a
+% reference. You can redefine these commands prior to
+% the |\bibliography{<bibtex_style>}| command. Initial
+% definitions are listed below.
+% \begin{verbatim}
+% \providecommand*{\url}[1]{{\small #1}}
+% \providecommand*{\BibUrl}[1]{\url{#1}}
+% \providecommand{\BibAnnote}[1]{}
+% \providecommand*{\BibEmph}[1]{#1}
+% \end{verbatim}
+%
+% By default, gost styles separate logical parts of a bibliography
+% record by a period and cyrdash (|. "---|). It is legitimate to drop
+% that dash by overriding the command |\BibDash| as follows
+%
+% \begin{verbatim}
+% \providecommand*{\BibDash}{}
+% \end{verbatim}
+%
+% By default, |\BibDash| is equivalent to the shorthand |"---|
+% defined by the babel package with the option |russian|.
+% It prints a so called Cyrillic dash (|\cyrdash|),
+% which is 20\% shorter then ordinary LaTeX dash (|---|), and puts
+% unbreakable space before |\cyrdash| so that dash never appears
+% in the beginning of a line.
+%
+% \subsection{Where to get}
+%
+% \begin{enumerate}
+% \item
+% \href{http://mirror.ctan.org/biblio/bibtex/contrib/gost/}
+% {CTAN:biblio/bibtex/contrib/gost}.
+% \item
+% \href{http://ctan.org/pkg/gost}
+% {CTAN:pkg/gost}.
+% \end{enumerate}
+%
+%
+% \subsection{Version history}
+%
+% \subsubsection*{Version 1.2i (2017.01.12)}
+%
+% \begin{enumerate}
+% \item
+% Documentation and examples update (thanks to Leonid Sinev).
+%
+% \item
+% Restored |@MastersThesis| instead of |@MasterThesis| (thanks to Leonid Sinev).
+%
+% \item
+% |media="eresource"| is introduced in addition to |media="online"| and
+% |media="text"|; if present, the |media| field is not ignored any more in
+% modern bst-styles compiled without the |strict| option.
+%
+% \item
+% |location| field is introduced as an alias of |address| field.
+%
+% \item
+% |@DSCISTHESIS| entry renamed to |@DOCTHESIS|.
+%
+% \item
+% |school| field in |@THESIS| and similar entries is replaced by
+% |institution| to comply with |biblatex-gost| style.
+%
+% \end{enumerate}
+%
+%
+% \subsubsection*{Version 1.2h (2016.08.21)}
+%
+% \begin{enumerate}
+% \item
+% Minor changes in documentation.
+%
+% \end{enumerate}
+%
+%
+% \subsubsection*{Version 1.2g (2016.07.25)}
+%
+% \begin{enumerate}
+% \item
+% Minor changes in documentation.
+%
+% \end{enumerate}
+%
+%
+% \subsubsection*{Version 1.2f (2016.07.12)}
+%
+% \begin{enumerate}
+% \item
+% Support for patent entry added (thanks to Stanislav Kruchinin).
+%
+% \item
+% |medium| field renamed to |media| field for compatibility with biblatex.
+
+% \end{enumerate}
+%
+% \subsubsection*{Version 1.2e (2016.07.07)}
+%
+% \begin{enumerate}
+% \item
+% Hard coded "URL" string replaced with a language sensitive string
+% (thanks to Roman Budnyi).
+%
+% \end{enumerate}
+%
+% \subsubsection*{Version 1.2d (2015.02.18)}
+%
+% \begin{enumerate}
+% \item
+% jan, feb, etc. macros fixed.
+%
+% \item
+% New macro format.month.
+% \end{enumerate}
+%
+% \subsubsection*{Version 1.2c (2015.01.10)}
+%
+% \begin{enumerate}
+% \item
+% |langid| field is added. It has same meaning as |language| which is now
+% obsolete but is still supported for backward compatibility; |langid| has
+% priority over |language|.
+%
+% \item
+% |eid| field is added. It has priority over |pages|.
+%
+% \item
+% The ligature |"---| has been substituted with |\BibDash| for \texttt{.bst}
+% styles compiled without |modern| options (\texttt{gost2003.bst} and
+% \texttt{gost2003s.bst}). For modern styles this was done in earlier versions.
+%
+% \item
+% Spacing around |\BibDash| has been improved.
+%
+% \item
+% |\BibDash| now typesets short em-dash (|\cyrdash|) only for |russian| and
+% |ukrainian| languages. In earlier versions, it produces short em-dash for
+% all languages.
+%
+% (This feature was removed since it did not work with all engines.)
+%
+% \end{enumerate}
+%
+% \subsubsection*{Version 1.2a (2012.08.31)}
+%
+% \begin{enumerate}
+%
+% \item
+% |\cyrdash| is now defined via |\ProvideTextCommand| rather than
+% |\providecommand|.
+%
+% \end{enumerate}
+%
+% \subsubsection*{Version 1.2 (2012.02.22)}
+%
+% \begin{enumerate}
+% \item
+% Code refactoring. All styles are now generated from single source file.
+%
+% \item
+% Support for GOST 7.1-2003. The field |medium| is added to reflect type
+% of material. For most entry types |medium| defaults to |text|.
+%
+% \item
+% Support for |natbib| package.
+%
+% \item
+% All modern styles are now compiled with the |eprint| option.
+%
+% \end{enumerate}
+%
+%
+% \subsubsection*{Version 1.1 (2012.01.21)}
+%
+% \begin{enumerate}
+% \item
+% Support for GOST 7.0.5-2008 and GOST 7.1-2003 is provided.
+%
+% \item
+% |@Online| entry is added to format a reference to electronic
+% resource on Internet.
+%
+% \item
+% |@MastersThesis| entry is added to format a reference to master's thesis.
+%
+% \item
+% |@DSciThesis| entry is added to format a reference to doctor of
+% sciences thesis.
+%
+% \item
+% |Urldate|, |eprint|, |eprintclass|, |eprinttype| fields are added.
+%
+% \end{enumerate}
+%
+% \subsubsection{Older versions}
+%
+% \begin{enumerate}
+% \item[2012.02.22] Support for |natbib| package.
+% \item[2012.02.02] Adaptation to GOST 7.0.5, electronic publishing.
+% \item[2005.08.12] First version uploaded to CTAN.
+% \item[2003.06.06] First public version.
+% \end{enumerate}
+%
+% \StopEventually{
+% \IndexPrologue{\section{Index}
+% Numbers written in dark blue refer to the page where the corresponding
+% entry is described; numbers in black roman refer to the code lines where
+% the entry is used.
+% }
+% \GlossaryPrologue{\section{Change History}}
+% \PrintChanges
+% \PrintIndex
+% }
+%
+% \section{Implementation}
+%
+% We need Russian fonts to produce documentation of the code below.
+% Therefore we switch current language to Russian by issuing the command
+% |\selectlanguage{russian}|.
+%
+% \selectlanguage{russian}
+%
+% \begin{macrocode}
+%<*bst>
+%%
+%% This bibstyle attempts to format bibliography according to
+%<!modern>%% GOST 7.1-2003 for bibliographic records.
+%<modern>%% GOST 7.0.5-2008 for bibliographic reference.
+%<*natbib>%%
+%%-------------------------------------------------------------------
+%% This is an author-year citation style bibliography.
+%% It requires a special package file to function properly
+%% such as natbib.sty by Patrick W. Daly.
+%% The form of the \bibitem entries is
+%% \bibitem[Jones et al.(1990)]{key}...
+%% \bibitem[Jones et al.(1990)Jones, Baker, and Smith]{key}...
+%% where the label part (in brackets) consists of the author names,
+%% as they should appear in the citation, with the year in parentheses following.
+%% There must be no space before the opening parenthesis!
+%% A full list of authors may also follow the year.
+%% In natbib.sty, it is possible to define the type of enclosures that is
+%% really wanted (brackets or parentheses), but in either case, there must
+%% be parentheses in the label.
+%% The \cite command functions as follows:
+%% \citet{key} => Jones et al. (1990)
+%% \citet*{key} => Jones, Baker, and Smith (1990)
+%% \cite{key} => (Jones et al., 1990)
+%% \cite*{key} => (Jones, Baker, and Smith, 1990)
+%% \cite[chap. 2]{key} => (Jones et al., 1990, chap. 2)
+%% \cite[e.g.][]{key} => (e.g. Jones et al., 1990)
+%% \cite[e.g.][p. 32]{key} => (e.g. Jones et al., p. 32)
+%% \citeauthor{key} => Jones et al.
+%% \citeauthor*{key} => Jones, Baker, and Smith
+%% \citeyear{key} => 1990
+%%---------------------------------------------------------------------
+%</natbib>
+
+% \end{macrocode}
+% \subsection{Fields}
+%
+% Enlist all entry types allowed in a bibliographic database.
+% Most entries are common for many standard bst styles.
+% \changes{v1.2f}{12 Jul 2016}{entry \texttt{patent} added}
+% \changes{v1.2c}{18 Jan 2015}{entry field \texttt{langid} added}
+% \changes{v1.2c}{18 Jan 2015}{entry field \texttt{eid} added}
+% \changes{v1.2}{01 Feb 2012}{entry field \texttt{medium} added}
+% \changes{v0.8}{06 Jun 2003}{entry field \texttt{annote} added}
+% \begin{macrocode}
+ENTRY
+ { address
+ annote
+ author
+ booktitle
+ bookauthor
+ chapter
+ edition
+ editor
+ compiler
+ howpublished
+ institution
+ journal
+ key
+ %major % new in v.1.2i, alias for speciality, not implemented
+ majorcode % new in v.1.2i, alias for specialitycode
+ month
+ note
+ number
+ organization
+ pages
+ eid % new in v1.2c
+ publisher
+ school % alias for institution
+ series
+ %speciality % new in v.1.2i, eqv. to major in biblatex-gost, not implemented yet...
+ specialitycode % new in v.1.2i, alias of number, eqv. to majorcode in biblatex-gost
+ title
+ %medium % new in v1.2; renamed to media.
+ media % new in v1.2f
+ type
+ volume
+ year
+ language
+ langid % new in v1.2c
+ booklanguage
+% \end{macrocode}
+% Entries borrowed from biblatex.
+% \changes{v1.2b}{19 Jan 2014}{entry field \texttt{numpages} renamed to \texttt{pagetotal}}
+% \changes{v1.2}{26 Jan 2012}{entry fields \texttt{eprint}, \texttt{eprintclass}, \texttt{eprinttype} added}
+% \begin{macrocode}
+ %date % not implemented yet...
+ pagetotal
+ url
+ urldate
+ isbn
+ doi
+ eprinttype % = archivePrefix
+ eprintclass % = primaryClass
+ eprint
+ % new in v1.2f:
+ % appear in biblatex:
+ %addendum % not implemented yet...
+ holder % see patent
+ location % new in v.1.2i, alias of address
+ %subtitle % not implemented yet...
+ titleaddon % new in v.1.2i, see @thesis
+ %version % not implemented yet...
+ % Appear in biblatex-gost for @patent entry:
+ authorcountry % country of the patent authors
+ credits % statement of responsibility, other than provided in Biblatex
+ ipc % Code of the International Patent Classification
+ %media % General material designation NOTE: medium in the above
+ requestnumber % Registration number of the application to the patent document
+ publicationdate % Date of publication
+ publication % and information on the official gazette, which published patent
+ prioritydate % Information about the convention priority: the date of filing of the application,
+ prioritynumber % number and
+ prioritycountry % country name of convention priority.
+ requestdate % ??
+ }
+ {}
+%<!natbib> { label }
+%<natbib> { label extra.label sort.label short.list }
+
+% \end{macrocode}
+% Declare internal variables and constants used in to format references.
+% \begin{macrocode}
+INTEGERS { output.state before.all mid.sentence after.sentence after.block
+after.dblslash after.slash after.colon after.semicolon }
+
+% \end{macrocode}
+% \DescribeFunction{init.state.consts}%
+% \begin{macrocode}
+FUNCTION {init.state.consts}
+{ #0 'before.all :=
+ #1 'mid.sentence :=
+ #2 'after.sentence :=
+ #3 'after.block :=
+ #4 'after.dblslash :=
+ #5 'after.slash :=
+ #6 'after.colon :=
+ #7 'after.semicolon :=
+}
+
+STRINGS { s t }
+
+STRINGS { curlanguage }
+
+% \end{macrocode}
+%
+% \subsection{Formatting functions}
+%
+% \DescribeFunction{change.language}
+% Declare function to switch language.
+% \begin{macrocode}
+FUNCTION {change.language}
+{ booklanguage empty$
+ { "" }
+ { booklanguage 'curlanguage :=
+ "\selectlanguageifdefined{"
+ curlanguage *
+ "}" *
+ }
+ if$
+}
+
+% \end{macrocode}
+%
+% Declare functions to output various parts of bibliographic record.
+% \DescribeFunction{output.nonnull}
+% Function |output.nonnull| writes to output buffer the last literal in the stack
+% assuming that it is not empty and adds an appropriate punctuation symbol.
+% \changes{v1.2c}{17 Jan 2015}{fix Gost2003: \texttt{"}\texttt{-}\texttt{-}\texttt{-} replaced by macro \cs{BibDash}}
+% \begin{macrocode}
+FUNCTION {output.nonnull}
+{
+ swap$
+ output.state mid.sentence =
+ { ", " * write$ }
+ { output.state after.block =
+ { add.period$ write$
+ " \BibDash " write$
+ newline$
+ "\newblock " write$
+ }
+ { output.state before.all =
+ 'write$
+ { output.state after.dblslash =
+ { "~//" * change.language * " " * write$ }
+ { output.state after.slash =
+ { "~/ " * write$ }
+ { output.state after.colon =
+%<!(strict|modern)> { ": " * write$ }
+%<strict|modern> { "~: " * write$ }
+ { output.state after.semicolon =
+%<!(strict|modern)> { "; " * write$ }
+%<strict|modern> { "~; " * write$ }
+ { add.period$ " " * write$ }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+ mid.sentence 'output.state :=
+ }
+ if$
+}
+
+% \end{macrocode}
+%
+% \DescribeFunction{output}
+% Function |output| calls |output.nonnul| is the last literal string in the stack
+% if it is not empty; otherwise it discards the literal.
+% Function |output.check| do the same but also warns if the indicated field is
+% empty.
+% \DescribeFunction{output.check}
+% \begin{macrocode}
+FUNCTION {output}
+{ duplicate$ empty$
+ 'pop$
+ 'output.nonnull
+ if$
+}
+
+FUNCTION {output.check}
+{ 't :=
+ duplicate$ empty$
+ { pop$ "empty " t * " in " * cite$ * warning$ }
+ 'output.nonnull
+ if$
+}
+
+% \end{macrocode}
+%
+% \DescribeFunction{fin.entry}
+% |fin.entry| finalizes current entry. It writes dot, if no dot is found in
+% stack, and starts new line.
+% \begin{macrocode}
+FUNCTION {fin.entry}
+{ add.period$
+ write$
+ newline$
+}
+
+% \end{macrocode}
+%
+% \DescribeFunction{new.block}%
+% Declare family of functions to put punctuation marks depending of current
+% status of output stack. The just check output state and revert it another
+% state if required. Checking output state prevents occasional doubling of
+% punctuation marks.
+% \begin{macrocode}
+FUNCTION {new.block}
+{ output.state before.all =
+ 'skip$
+ { after.block 'output.state := }
+ if$
+}
+
+% \end{macrocode}
+% \DescribeFunction{new.dblslash}%
+% \begin{macrocode}
+FUNCTION {new.dblslash}
+{ output.state before.all =
+ 'skip$
+ { after.dblslash 'output.state := }
+ if$
+}
+
+% \end{macrocode}
+% \DescribeFunction{new.slash}%
+% \begin{macrocode}
+FUNCTION {new.slash}
+{ output.state before.all =
+ 'skip$
+ { after.slash 'output.state := }
+ if$
+}
+
+% \end{macrocode}
+% \DescribeFunction{new.colon}%
+% \begin{macrocode}
+FUNCTION {new.colon}
+{ output.state before.all =
+ 'skip$
+ { after.colon 'output.state := }
+ if$
+}
+
+% \end{macrocode}
+% \DescribeFunction{new.semicolon}%
+% \begin{macrocode}
+FUNCTION {new.semicolon}
+{ output.state before.all =
+ 'skip$
+ { after.semicolon 'output.state := }
+ if$
+}
+
+% \end{macrocode}
+% \DescribeFunction{new.sentence}%
+% \begin{macrocode}
+FUNCTION {new.sentence}
+{ output.state after.block =
+ 'skip$
+ { output.state before.all =
+ 'skip$
+ { after.sentence 'output.state := }
+ if$
+ }
+ if$
+}
+
+% \end{macrocode}
+% \DescribeFunction{add.blank}%
+% \begin{macrocode}
+FUNCTION {add.blank}
+{ " " * before.all 'output.state :=
+}
+
+% \end{macrocode}
+%
+% \DescribeFunction{not}
+% Declare few logical functions.
+% \begin{macrocode}
+FUNCTION {not}
+{ { #0 }
+ { #1 }
+ if$
+}
+
+% \end{macrocode}
+% \DescribeFunction{and}
+% \begin{macrocode}
+FUNCTION {and}
+{ 'skip$
+ { pop$ #0 }
+ if$
+}
+
+% \end{macrocode}
+% \DescribeFunction{or}
+% \begin{macrocode}
+FUNCTION {or}
+{ { pop$ #1 }
+ 'skip$
+ if$
+}
+
+% \end{macrocode}
+% \DescribeFunction{chop.word}
+% The function |chop.word| in |substr len str chop.word| removes given substring
+% |substr| of length |len| from the beginning of the string |str|.
+% \begin{macrocode}
+%<*sort|natbib>
+INTEGERS { len }
+
+FUNCTION {chop.word}
+{ 's :=
+ 'len :=
+ s #1 len substring$ =
+ { s len #1 + global.max$ substring$ }
+ 's
+ if$
+}
+%</sort|natbib>
+
+% \end{macrocode}
+% \DescribeFunction{non.stop}
+% \begin{macrocode}
+FUNCTION {non.stop}
+{ duplicate$
+ "}" * add.period$
+ #-1 #1 substring$ "." =
+}
+
+% \end{macrocode}
+% \DescribeFunction{new.block.checka}
+% \begin{macrocode}
+FUNCTION {new.block.checka}
+{ empty$
+ 'skip$
+ 'new.block
+ if$
+}
+
+% \end{macrocode}
+% \DescribeFunction{new.block.checkb}
+% \begin{macrocode}
+FUNCTION {new.block.checkb}
+{ empty$
+ swap$ empty$
+ and
+ 'skip$
+ 'new.block
+ if$
+}
+
+% \end{macrocode}
+% \DescribeFunction{new.sentence.checka}
+% \begin{macrocode}
+FUNCTION {new.sentence.checka}
+{ empty$
+ 'skip$
+ 'new.sentence
+ if$
+}
+
+% \end{macrocode}
+% \DescribeFunction{new.sentence.checkb}
+% \begin{macrocode}
+FUNCTION {new.sentence.checkb}
+{ empty$
+ swap$ empty$
+ and
+ 'skip$
+ 'new.sentence
+ if$
+}
+
+% \end{macrocode}
+% \DescribeFunction{new.dblslash.checka}
+% For |online| entry.
+% \changes{v1.1}{15 Jan 2012}{entry type \texttt{@online} added}
+% \begin{macrocode}
+FUNCTION {new.dblslash.checka}
+{ empty$
+ 'skip$
+ 'new.dblslash
+ if$
+}
+
+% \end{macrocode}
+% \DescribeFunction{field.or.null}
+% \begin{macrocode}
+FUNCTION {field.or.null}
+{ duplicate$ empty$
+ { pop$ "" }
+ 'skip$
+ if$
+}
+
+% \end{macrocode}
+%
+% \DescribeFunction{emphasize}
+% Declare function to emphasize last string in stack.
+% \changes{v0.8}{10 Aug 2003}{macro \cs{BibEmph} added}
+% \begin{macrocode}
+FUNCTION {emphasize}
+{ duplicate$ empty$
+ { pop$ "" }
+ { "\BibEmph{" swap$ * "}" * }
+ if$
+}
+
+% \end{macrocode}
+%
+% \DescribeFunction{bracify}
+% New in v.1.2. An idea borrowed from apsrev4-1.bst.
+% Declare function to enclose last word by braces even if empty.
+% \begin{macrocode}
+FUNCTION {bracify}
+{ duplicate$ empty$
+ { pop$ "{}" }
+ { "{" swap$ * "}" * }
+ if$
+}
+
+% \end{macrocode}
+% \DescribeFunction{enclose.square.brackets}
+% This and the next functions are used to enclose last word by brackets.
+% \begin{macrocode}
+FUNCTION {enclose.square.brackets}
+{
+ duplicate$ empty$
+ { pop$ "" }
+ { "[" swap$ * "]" * }
+ if$
+}
+
+% \end{macrocode}
+% \DescribeFunction{enclose.round.brackets}
+% \begin{macrocode}
+FUNCTION {enclose.round.brackets}
+{
+ duplicate$ empty$
+ { pop$ "" }
+ { "(" swap$ * ")" * }
+ if$
+}
+
+% \end{macrocode}
+%
+% \DescribeFunction{space.word}
+% |space.word| inserts space before last string in stack.
+% \begin{macrocode}
+FUNCTION {space.word}
+{ " " swap$ * " " * }
+
+% \end{macrocode}
+%
+% \subsection{Standard abbreviations}
+%
+% Declare language-sensitive abbreviations.
+% \DescribeFunction{bbl.edby}
+% \begin{macrocode}
+FUNCTION {bbl.edby} % { "\bbledby{}" }
+{ curlanguage "english" =
+ {"Ed.\ by"}
+ { curlanguage "ukrainian" =
+%<!utf8> {"{\cyr\CYRP\cyrii\cyrd\ \cyrr\cyre\cyrd.}"}
+%<utf8> {"Під ред."}
+ { curlanguage "russian" =
+%<!utf8> {"{\cyr\CYRP\cyro\cyrd\ \cyrr\cyre\cyrd.}"}
+%<utf8> {"Под ред."}
+ { curlanguage "german" =
+ { "ed." }
+ {"language is not defined: " language "edby" * * warning$ "Ed.\ by"}
+ if$}
+ if$}
+ if$}
+if$}
+
+% \end{macrocode}
+% \DescribeFunction{bbl.cmplr}
+% \begin{macrocode}
+FUNCTION {bbl.cmplr}
+{ curlanguage "english" =
+ { "Compiler"}
+ { curlanguage "german" =
+ { "Hrsg." }
+ { curlanguage "ukrainian" =
+%<!utf8> {"{\cyr\CYRU\cyrk\cyrl.}"}
+%<utf8> {"{Укл.}"}
+ { curlanguage "russian" =
+%<!utf8> {"{\cyr\CYRS\cyro\cyrs\cyrt.}"}
+%<utf8> {"{Сост.}"}
+ {"language is not defined: " language "cmplr" * * warning$ "Compiler"}
+ if$}
+ if$}
+ if$}
+if$}
+
+% \end{macrocode}
+% \DescribeFunction{bbl.edition}
+% \begin{macrocode}
+FUNCTION {bbl.edition} % { "\bbledition{}" }
+{ curlanguage "english" =
+ {"edition"}
+ { curlanguage "ukrainian" =
+%<!utf8> {"{\cyr\cyrv\cyri\cyrd.}"}
+%<utf8> {"{вид.}"}
+ { curlanguage "russian" =
+%<!utf8> {"{\cyr\cyri\cyrz\cyrd.}"}
+%<utf8> {"{изд.}"}
+ { curlanguage "german" =
+ {" {aus.}" } %%%% { "Aufl." } ??
+ { curlanguage "italian" =
+ {"edizione"}
+ { curlanguage "french" =
+ {"\'{e}dition"}
+ {"language is not defined: " language "edition" * * warning$ "edition"}
+ if$}
+ if$}
+ if$}
+ if$}
+ if$}
+if$}
+
+% \end{macrocode}
+% \DescribeFunction{bbl.vvolume}
+% \begin{macrocode}
+FUNCTION {bbl.vvolume} % { "\bblVolume{}" }
+{ curlanguage "english" = curlanguage "french" = or curlanguage "italian" = or
+ {"Volume"}
+ { curlanguage "ukrainian" = curlanguage "russian" = or
+%<!utf8> { "\CYRT\cyro\cyrm" }
+%<utf8> { "Том" }
+ { curlanguage "german" =
+ {"{Band}"} %%%% { "Volumen" }
+ {"language is not defined: " language "vvolume" * * warning$ "Volume"}
+ if$}
+ if$}
+if$}
+
+% \end{macrocode}
+% \DescribeFunction{bbl.vvol}
+% \begin{macrocode}
+FUNCTION {bbl.vvol} % { "\bblVol{}" }
+{ curlanguage "english" = curlanguage "french" = or curlanguage "italian" = or
+ {"Vol."}
+ { curlanguage "ukrainian" = curlanguage "russian" = or
+%<!utf8> {"\CYRT."}
+%<utf8> {"Т."}
+ { curlanguage "german" =
+ {"{Bd.}"} %%%% { "Vol." }
+ {"language is not defined: " language "vvol" * * warning$ "Vol."}
+ if$}
+ if$}
+if$}
+
+% \end{macrocode}
+% \DescribeFunction{bbl.iissue}
+% \begin{macrocode}
+FUNCTION {bbl.iissue} % { "\bblIssue{}" }
+{ curlanguage "english" =
+ {"Issue"}
+ { curlanguage "ukrainian" =
+%<!utf8> {"\CYRV\cyri\cyrp\cyru\cyrs\cyrk"}
+%<utf8> {"Випуск"}
+ { curlanguage "russian" =
+%<!utf8> {"\CYRV\cyrery\cyrp\cyru\cyrs\cyrk"}
+%<utf8> {"Выпуск"}
+ { curlanguage "german" =
+ {"{Heft}"} %%%% { "Ausgabe" }
+ {"language is not defined: " language "iissue" * * warning$ "Issue"}
+ if$}
+ if$}
+ if$}
+if$}
+
+% \end{macrocode}
+% \DescribeFunction{bbl.iiss}
+% \begin{macrocode}
+FUNCTION {bbl.iiss} % { "\bblIss{}" }
+{ curlanguage "english" =
+ {"Iss."}
+ { curlanguage "ukrainian" =
+%<!utf8> {"\CYRV\cyri\cyrp."}
+%<utf8> {"Вип."}
+ { curlanguage "russian" =
+%<!utf8> {"\CYRV\cyrery\cyrp."}
+%<utf8> {"Вып."}
+ { curlanguage "german" =
+ {"{H.}"}
+ {"language is not defined: " language "iiss" * * warning$ "Iss."}
+ if$}
+ if$}
+ if$}
+if$}
+
+% \end{macrocode}
+% \DescribeFunction{bbl.of}
+% \begin{macrocode}
+FUNCTION {bbl.of} % { "\bblof{}" }
+{ curlanguage "english" =
+ {"of"}
+ { curlanguage "german" =
+ { "von" }
+ { curlanguage "ukrainian" =
+%<!utf8> { "{\cyr\cyrii\cyrz}" }
+%<utf8> { "{із}" }
+ { curlanguage "russian" =
+%<!utf8> { "{\cyr\cyri\cyrz}" }
+%<utf8> { "{из}" }
+ {"language is not defined: " language "of" * * warning$ "of"}
+ if$}
+ if$}
+ if$}
+if$}
+
+% \end{macrocode}
+% \DescribeFunction{bbl.etal}
+% \begin{macrocode}
+FUNCTION {bbl.etal} % { "\bblof{}" }
+{ curlanguage "english" =
+ {"et~al."}
+ { curlanguage "german" =
+ { "u.~a." }
+ { curlanguage "ukrainian" =
+%<!utf8> {"{\cyr\cyrt\cyra~\cyrii\cyrn.}"}
+%<utf8> {"{та~ін.}"}
+ { curlanguage "russian" =
+%<!utf8> {"{\cyr\cyri~\cyrd\cyrr.}"}
+%<utf8> {"и~др."}
+ {"language is not defined: " language "et~al" * * warning$ "et~al."}
+ if$}
+ if$}
+ if$}
+if$}
+
+% \end{macrocode}
+% \DescribeFunction{bbl.and}
+% \begin{macrocode}
+%<*natbib>
+FUNCTION {bbl.and} % { "\bbland{}" }
+{ curlanguage "english" =
+ {"and"}
+ { curlanguage "german" =
+ { "und" }
+ { curlanguage "ukrainian" =
+%<!utf8> {"{\cyrii}"}
+%<utf8> {"і"}
+ { curlanguage "russian" =
+%<!utf8> {"{\cyri}"}
+%<utf8> {"и"}
+ {"language is not defined: " language "and" * * warning$ "and"}
+ if$}
+ if$}
+ if$}
+if$}
+%</natbib>
+
+% \end{macrocode}
+% \DescribeFunction{bbl.nnumber}
+% \begin{macrocode}
+FUNCTION {bbl.nnumber} % { "\bblNumber{}" }
+{ curlanguage "english" =
+ {"Number"}
+ { curlanguage "ukrainian" = curlanguage "russian" = or
+%<!utf8> { "\CYRN\cyro\cyrm\cyre\cyrr" }
+%<utf8> { "{Номер}" }
+ { curlanguage "german" =
+ {"{Heft}"} %%% { "Anzahl" }
+ {"language is not defined: " language "nnumber" * * warning$ "Number"}
+ if$}
+ if$}
+if$}
+
+% \end{macrocode}
+% \DescribeFunction{bbl.number}
+% \begin{macrocode}
+FUNCTION {bbl.number} % { "\bblnumber{}" }
+{ curlanguage "english" =
+ {"number"}
+ { curlanguage "ukrainian" = curlanguage "russian" = or
+%<!utf8> {"{\cyr\cyrn\cyro\cyrm\cyre\cyrr}"}
+%<utf8> {"{номер}"}
+ { curlanguage "german" =
+ {"{Heft}"} %%% { "anzahl" }???
+ {"language is not defined: " language "number" * * warning$ "number"}
+ if$}
+ if$}
+if$}
+
+% \end{macrocode}
+% \DescribeFunction{bbl.nr}
+% \begin{macrocode}
+FUNCTION {bbl.nr} % { "\bblno{}" }
+{ curlanguage "english" =
+ {"no."}
+ { curlanguage "italian" =
+ { "no" }
+ { curlanguage "ukrainian" = curlanguage "russian" = or
+%<!utf8> { "{\cyr\textnumero}" }
+%<utf8> { "{№}" }
+ { curlanguage "german" =
+ {"{H.}"} %%% { "an." }
+ {"language is not defined: " language "nr" * * warning$ "no."}
+ if$}
+ if$}
+ if$}
+if$}
+
+% \end{macrocode}
+% \DescribeFunction{bbl.nnr}
+% \begin{macrocode}
+FUNCTION {bbl.nnr} % { "\bblno{}" }
+{ curlanguage "english" =
+ {"No."}
+ { curlanguage "ukrainian" = curlanguage "russian" = or
+%<!utf8> { "{\cyr\textnumero}" }
+%<utf8> { "{№}" }
+ { curlanguage "german" =
+ {"{H.}"} %%% { "an." }
+ {"language is not defined: " language "nnr" * * warning$ "No."}
+ if$}
+ if$}
+if$}
+
+% \end{macrocode}
+% \DescribeFunction{bbl.in}
+% \begin{macrocode}
+FUNCTION {bbl.in} % { "\bblin{}" }
+{ curlanguage "english" = curlanguage "german" = or
+ {"in"}
+ { curlanguage "ukrainian" = curlanguage "russian" = or
+%<!utf8> { "{\cyr\cyrv}" }
+%<utf8> { "{в}" }
+ {"language is not defined: " language "in" * * warning$ "in"}
+ if$}
+if$}
+
+% \end{macrocode}
+% \DescribeFunction{bbl.iin}
+% \begin{macrocode}
+FUNCTION {bbl.iin} % { "\bblIn{}" }
+{ curlanguage "english" = curlanguage "german" = or
+ {"In"}
+ { curlanguage "ukrainian" = curlanguage "russian" = or
+%<!utf8> { "\CYRV" }
+%<utf8> { "{В}" }
+ {"language is not defined: " language "iin" * * warning$ "In"}
+ if$}
+if$}
+
+% \end{macrocode}
+% \DescribeFunction{bbl.pages}
+% \begin{macrocode}
+FUNCTION {bbl.pages} % { "\bblpp." }
+{ curlanguage "english" = curlanguage "french" = or curlanguage "italian" = or
+ {"p."} %%% {"pp."}
+ { curlanguage "ukrainian" = curlanguage "russian" = or
+%<!utf8> {"{\cyr\cyrs.}"}
+%<utf8> {"{с.}"}
+ { curlanguage "german" =
+ {"S."} %%%% { "s." }
+ {"language is not defined: " language "pages" * * warning$ "p."}
+ if$}
+ if$}
+if$}
+
+% \end{macrocode}
+% \DescribeFunction{bbl.page}
+% \begin{macrocode}
+FUNCTION {bbl.page} % { "\bblp."
+{ curlanguage "english" = curlanguage "french" = or curlanguage "italian" = or
+ {"p."}
+ { curlanguage "ukrainian" = curlanguage "russian" = or
+%<!utf8> {"{\cyr\cyrs.}"}
+%<utf8> {"{с.}"}
+ { curlanguage "german" =
+ {"S."} %%%% { "s." }
+ {"language is not defined: " language "page" * * warning$ "p."}
+ if$}
+ if$}
+if$}
+
+% \end{macrocode}
+% \DescribeFunction{bbl.ppages}
+% \begin{macrocode}
+FUNCTION {bbl.ppages}% { "\bblPp." }
+{ curlanguage "english" = curlanguage "french" = or curlanguage "italian" = or
+ {"P."} %%%% { "Pp." }
+ { curlanguage "ukrainian" = curlanguage "russian" = or
+%<!utf8> {"{\cyr\CYRS.}"}
+%<utf8> {"{С.}"}
+ { curlanguage "german" =
+ {"S."}
+ {"language is not defined: " language "ppages" * * warning$ "P."}
+ if$}
+ if$}
+if$}
+
+% \end{macrocode}
+% \DescribeFunction{bbl.ppage}
+% \begin{macrocode}
+FUNCTION {bbl.ppage} % { "\bblP." }
+{ curlanguage "english" = curlanguage "french" = or curlanguage "italian" = or
+ {"P."}
+ { curlanguage "ukrainian" = curlanguage "russian" = or
+%<!utf8> {"{\cyr\CYRS.}"}
+%<utf8> {"{С.}"}
+ { curlanguage "german" =
+ {"S."}
+ {"language is not defined: " language "ppage" * * warning$ "P."}
+ if$}
+ if$}
+if$}
+
+% \end{macrocode}
+% Next function was added in version 2016.07.07.
+% \DescribeFunction{bbl.url}
+% \changes{v1.2e}{07 Jul 2016}{\texttt{bbl.url} added to replace URL string}
+% \begin{macrocode}
+FUNCTION {bbl.url}
+{ curlanguage "english" =
+ {"Access mode"}
+ { curlanguage "ukrainian" =
+%<!utf8> { "{\CYRR\cyre\cyrzh\cyri\cyrm\ \cyrd\cyro\cyrs\cyrt\cyru\cyrp\cyru}" }
+%<utf8> { "{Режим доступу}" }
+ { curlanguage "russian" =
+%<!utf8> { "{\CYRR\cyre\cyrzh\cyri\cyrm\ \cyrd\cyro\cyrs\cyrt\cyru\cyrp\cyra}" }
+%<utf8> { "{Режим доступа}" }
+ { curlanguage "german" =
+ { "{online; abgerufen}" }
+ { "language is not defined: " language "urldate" * * warning$ "online; accessed" }
+ if$}
+ if$}
+ if$}
+if$}
+% \end{macrocode}
+% Next function was added in version 2012.01.15.
+% \DescribeFunction{bbl.urldate}
+% \changes{v1.2}{13 Feb 2012}{fix \texttt{bbl.urldate} for ukrainian (Andrey Shvajkoy)}
+% \begin{macrocode}
+FUNCTION {bbl.urldate}
+{ curlanguage "english" =
+ {"online; accessed"}
+ { curlanguage "ukrainian" =
+%<!utf8> { "{\cyrd\cyra\cyrt\cyra\ \cyrz\cyrv\cyre\cyrr\cyrn\cyre\cyrn\cyrn\cyrya}" }
+%<utf8> { "{дата звернення}" }
+ { curlanguage "russian" =
+%<!utf8> { "{\cyrd\cyra\cyrt\cyra\ \cyro\cyrb\cyrr\cyra\cyrshch\cyre\cyrn\cyri\cyrya}" }
+%<utf8> { "{дата обращения}" }
+ { curlanguage "german" =
+ { "{online; abgerufen}" }
+ { "language is not defined: " language "urldate" * * warning$ "online; accessed" }
+ if$}
+ if$}
+ if$}
+if$}
+
+% \end{macrocode}
+% \DescribeFunction{bbl.techreport}
+% \begin{macrocode}
+FUNCTION {bbl.techreport} % rename to bbl.techreport
+{ curlanguage "english" =
+ { "Rep." }
+ { curlanguage "german" =
+ { "Bericht" }
+ { curlanguage "russian" =
+%<!utf8> { "{\cyr\CYRO\cyrt\cyrch\cyre\cyrt}" }
+%<utf8> { "{Отчет}" }
+ { "language is not defined: " language "techrep" * * warning$ "Rep." }
+ if$}
+ if$}
+if$}
+
+% \end{macrocode}
+% \DescribeFunction{bbl.mathesis}
+% \begin{macrocode}
+FUNCTION {bbl.mathesis}
+{ curlanguage "english" =
+ { "Master's thesis" }
+ { curlanguage "german" =
+ { "Diss.~Mag." }
+ { curlanguage "russian" =
+%<!utf8> { "{\cyr\CYRK\cyrv\cyra\cyrl\cyri\cyrf\cyri\cyrk\cyra\cyrc\cyri"
+%<!utf8> "\cyro\cyrn\cyrn\cyra\cyrya\ \cyrr\cyra\cyrb\cyro\cyrt\cyra\ " *
+%<!utf8> "\cyrm\cyra\cyrg\cyri\cyrs\cyrt\cyrr\cyra}" * }
+%<utf8> { "{Квалификационная работа магистра}" }
+ { "language is not defined: " language "mthesis" * * warning$ "Master's thesis" }
+ if$}
+ if$}
+if$}
+
+% \end{macrocode}
+% \DescribeFunction{bbl.phdthesis}
+% \changes{v1.2i}{04 Jan 2017}{corrected bbl.phdthesis and bbl.docthesis to comply GOST}
+% \begin{macrocode}
+FUNCTION {bbl.phdthesis}
+{ curlanguage "english" =
+ { "Ph.\,D. thesis" }
+ { curlanguage "german" =
+ { "Diss.~Ph.\,D." }
+ { curlanguage "russian" =
+%<!utf8> { "{\cyr\cyrd\cyri\cyrs.\ \ldots\ \cyrk\cyra\cyrn\cyrd. "
+%<!utf8> "\cyrn\cyra\cyru\cyrk}" * }
+%<utf8> { "{дис.\ \ldots\ канд. наук}" }
+ { curlanguage "french" =
+ { "Th\`{e}se de doctorat" }
+ { "language is not defined: " language "phdthesis" * * warning$ "Ph.\,D. thesis" }
+ if$}
+ if$}
+ if$}
+if$}
+
+% \end{macrocode}
+% \DescribeFunction{bbl.docthesis}
+% \begin{macrocode}
+FUNCTION {bbl.docthesis}
+{ curlanguage "english" =
+ { "Dr.\,Sci. dissertation" }
+ { curlanguage "german" =
+ { "Diss.~Dr." }
+ { curlanguage "russian" =
+%<!utf8> { "{\cyr\cyrd\cyri\cyrs.\ \ldots\ \cyrd-\cyrr\cyra\ "
+%<!utf8> "\cyrn\cyra\cyru\cyrk}" * }
+%<utf8> { "{дис.\ \ldots\ д-ра наук}" }
+ { "language is not defined: " language "docthesis" * * warning$ "Dr.\,Sci. dissertation" }
+ if$}
+ if$}
+if$}
+
+% \end{macrocode}
+% \DescribeFunction{bbl.thesis.type`}
+% \begin{macrocode}
+FUNCTION {bbl.thesis.type}
+{ type "mathesis" =
+ { bbl.mathesis }
+ { type "phdthesis" =
+ { bbl.phdthesis }
+ { type "docthesis" =
+ { bbl.docthesis }
+ %%{ "!!!" type * "t" change.case$ }
+%<!utf8> { type "t" change.case$ }
+%<utf8> { type }
+ if$}
+ if$}
+if$}
+
+% \end{macrocode}
+% \DescribeFunction{bbl.nnoaddress}
+% \begin{macrocode}
+FUNCTION {bbl.nnoaddress}
+{ curlanguage "english" =
+ { "S.\ l." }
+ { curlanguage "russian" =
+%<!utf8> { "{\cyr\CYRB.\ \cyrm.}" }
+%<utf8> { "{Б.\ м.}" }
+ { "language is not defined: " language "nnoaddress" * * warning$ "S.\ l." }
+ if$}
+if$}
+
+% \end{macrocode}
+% \DescribeFunction{bbl.nopublisher}
+% \begin{macrocode}
+FUNCTION {bbl.nopublisher}
+{ curlanguage "english" =
+ { "s.\ n." }
+ { curlanguage "russian" =
+%<!utf8> { "{\cyr\cyrb.\ \cyri.}" }
+%<utf8> { "{б.\ и.}" }
+ { "language is not defined: " language "nnopublisher" * * warning$ "s.\ n." }
+ if$}
+if$}
+
+% \end{macrocode}
+% \DescribeFunction{bbl.nnopublisher}
+% \begin{macrocode}
+FUNCTION {bbl.nnopublisher}
+{ curlanguage "english" =
+ { "S.\ n." }
+ { curlanguage "russian" =
+%<!utf8> { "{\cyr\CYRB.\ \cyri.}" }
+%<utf8> { "{Б.\ и.}" }
+ { "language is not defined: " language "nnopublisher" * * warning$ "S.\ n." }
+ if$}
+if$}
+
+% \end{macrocode}
+% \DescribeFunction{bbl.media.text}
+% \begin{macrocode}
+FUNCTION {bbl.media.text}
+{ curlanguage "english" =
+ { "Text" }
+ { curlanguage "russian" = curlanguage "ukrainian" = or
+%<!utf8> { "{\cyr\CYRT\cyre\cyrk\cyrs\cyrt}" }
+%<utf8> { "{Текст}" }
+ { "language is not defined: " language "media" * * warning$ "Text" }
+ if$}
+if$}
+
+% \end{macrocode}
+% \DescribeFunction{bbl.media.eresource}
+% \begin{macrocode}
+FUNCTION {bbl.media.eresource}
+{ curlanguage "english" =
+ { "Electronic resource" }
+ { curlanguage "russian" =
+%<!utf8> { "{\cyr\CYREREV\cyrl\cyre\cyrk\cyrt\cyrr\cyro\cyrn\cyrn\cyrery\cyrishrt\ "
+%<!utf8> "\cyrr\cyre\cyrs\cyru\cyrr\cyrs}" * }
+%<utf8> { "{Электронный ресурс}" }
+ { curlanguage "ukrainian" =
+%<!utf8> { "{\cyr\CYRE\cyrl\cyre\cyrk\cyrt\cyrr\cyro\cyrn\cyrn\cyri\cyrishrt\ "
+%<!utf8> "\cyrr\cyre\cyrs\cyru\cyrr\cyrs}" * }
+%<utf8> { "{Електронний ресурс}" }
+ { "language is not defined: " language "media" * * warning$ "Electronic resource" }
+ if$}
+ if$}
+if$}
+
+% \end{macrocode}
+% \DescribeFunction{bbl.media.online}
+% \changes{v1.2i}{02 Jan 2017}{\texttt{media} field normalised}
+% \begin{macrocode}
+FUNCTION {bbl.media.online}
+{ curlanguage "english" =
+ { "Electronic resource online" }
+ { curlanguage "russian" =
+%<!utf8> { "{\cyr\CYREREV\cyrl\cyre\cyrk\cyrt\cyrr\cyro\cyrn\cyrn\cyrery\cyrishrt\ "
+%<!utf8> "\cyrr\cyre\cyrs\cyru\cyrr\cyrs\ \cyro\cyrn\cyrl\cyra\cyrishrt\cyrn}" * }
+%<utf8> { "{Электронный ресурс онлайн}" }
+ { curlanguage "ukrainian" =
+%<!utf8> { "{\cyr\CYRE\cyrl\cyre\cyrk\cyrt\cyrr\cyro\cyrn\cyrn\cyri\cyrishrt\ "
+%<!utf8> "\cyrr\cyre\cyrs\cyru\cyrr\cyrs\ \cyro\cyrn\cyrl\cyra\cyrishrt\cyr}" * }
+%<utf8> { "{Електронний ресурс онлайн}" }
+ { "language is not defined: " language "media" * * warning$ "Electronic resource" }
+ if$}
+ if$}
+if$}
+
+% \end{macrocode}
+% \DescribeFunction{bbl.chief}
+% \begin{macrocode}
+FUNCTION {bbl.chief}
+{ curlanguage "english" =
+ { "chief" }
+ { curlanguage "russian" =
+%<!utf8> { "\cyrr\cyru\cyrk." }
+%<utf8> { "{рук.}" }
+ { curlanguage "ukrainian" =
+%<!utf8> { "\cyrr\cyru\cyrk." }
+%<utf8> { "{рук.}" }
+ { "language is not defined: " language "chief" * * warning$ "chief" }
+ if$}
+ if$}
+if$}
+
+% \end{macrocode}
+% \DescribeFunction{bbl.executor}
+% \begin{macrocode}
+FUNCTION {bbl.executor}
+{ curlanguage "english" =
+ { "Executor" }
+ { curlanguage "russian" =
+%<!utf8> { "{\cyr\cyri\cyrs\cyrp\cyro\cyrl\cyrn.}" }
+%<utf8> { "{исполн.}" }
+ { curlanguage "ukrainian" =
+%<!utf8> { "{\cyr\cyrv\cyri\cyrk\cyro\cyrn\cyra\cyrv\cyre\cyrc\cyrsftsn}" }
+%<utf8> { "{виконавець}" }
+ { "language is not defined: " language "executor" * * warning$ "executor" }
+ if$}
+ if$}
+if$}
+
+% \end{macrocode}
+% \DescribeFunction{bbl.media}
+% \begin{macrocode}
+%FUNCTION {bbl.media}
+%{ type$ "online" =
+% { bbl.media.eresource }
+% { bbl.media.text }
+%if$}
+FUNCTION {bbl.media}
+{ media "online" =
+ { bbl.media.online }
+ { media "eresource" =
+ { bbl.media.eresource }
+ { bbl.media.text }
+ if$}
+if$}
+
+% \end{macrocode}
+% \DescribeFunction{bbl.req}
+% \begin{macrocode}
+FUNCTION {bbl.req}
+{
+ curlanguage "english" =
+ { "req." }
+ { curlanguage "german" =
+ { "ang." }
+ { curlanguage "russian" =
+%<!utf8> { "{\cyr\cyrz\cyra\cyrya\cyrv\cyrl.}" }
+%<utf8> { "{заявл.}" }
+ { "language is not defined: " language "req" * * warning$ "req" }
+ if$
+ }
+ if$
+ }
+ if$
+}
+
+% \end{macrocode}
+% \DescribeFunction{bbl.publ}
+% \begin{macrocode}
+FUNCTION {bbl.publ}
+{
+ curlanguage "english" =
+ { "publ." }
+ { curlanguage "german" =
+ { "ausg." }
+ { curlanguage "russian" =
+%<!utf8> { "{\cyr\cyro\cyrp\cyru\cyrb\cyrl.}" }
+%<utf8> { "{опубл.}" }
+ { "language is not defined: " language "publication" * * warning$ "publication" }
+ if$
+ }
+ if$
+ }
+ if$
+}
+
+% \end{macrocode}
+% \DescribeFunction{bbl.priority}
+% \begin{macrocode}
+FUNCTION {bbl.priority}
+{
+ curlanguage "english" =
+ { "priority" }
+ { curlanguage "german" =
+ { "Prioritat" }
+ { curlanguage "russian" =
+%<!utf8> { "{\cyr\cyrp\cyrr\cyri\cyro\cyrr\cyri\cyrt\cyre\cyrt}" }
+%<utf8> { "{приоритет}" }
+ { "language is not defined: " language "priority" * * warning$ "priority" }
+ if$
+ }
+ if$
+ }
+ if$
+}
+
+% \end{macrocode}
+%
+% \subsection{Formatting functions}
+%
+% Declare functions to format separate elements of bibliographic reference.
+% \begin{macrocode}
+INTEGERS { nameptr namesleft numnames }
+
+
+% \end{macrocode}
+%
+% \DescribeFunction{format.names}
+% Function |format.names| has 2 version.
+% First is for bibliographic records rather then for bibliographic references.
+% It is used for \file{.bst} styles compiled without the |modern| option.
+% It format every name as `LastName, F. S.'.
+% Historically, this version was used first for earlier styles included into
+% GOST bundle.
+%
+% \textbf{Important note}
+%
+% Neither \file{bibtex} nor \file{bibtex8} can handle unicoded text without
+% troubles. In particular, they fail to reduce a Cyrillic name to initials.
+% Therefore we avoid using |f.| primitive when option |utf8| is in effect.
+
+% \begin{macrocode}
+%<*!modern>
+FUNCTION {format.names}
+{
+%<!utf8> #1 "{vv~}{ll}{~jj}{,~f.}" format.name$
+%<utf8> #1 "{vv~}{ll}{~jj}{,~ff}" format.name$
+}
+%</!modern>
+% \end{macrocode}
+% Second version drops comma from output so that every name is formatted
+% as `LastName F. S.'. It also substitutes 4th and following names by
+% localized term `et al'.
+% \begin{macrocode}
+%<*modern>
+FUNCTION {format.names}
+{
+ 's :=
+ #1 'nameptr :=
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ { s nameptr
+%<!utf8> "{vv~}{ll}{~jj}{~f.}" format.name$ 't :=
+%<utf8> "{vv~}{ll}{~jj}{~ff}" format.name$ 't :=
+ nameptr #1 >
+ { nameptr #4 =
+ numnames #4 > and
+ { "others" 't :=
+ #1 'namesleft := }
+ 'skip$
+ if$
+ namesleft #1 >
+ { ", " * t * }
+ { t "others" =
+ t "~others" =
+ or
+%<!strict> { " " * bbl.etal * }
+%<strict> { " " * bbl.etal enclose.square.brackets *}
+ { ", " * t * }
+ if$
+ }
+ if$
+ }
+ 't
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+}
+%</modern>
+
+% \end{macrocode}
+% \DescribeFunction{format.lab.names}
+% Declare function to go to optional argument of |\bibitem| in
+% the styles generated with the option |natbib|.
+% \begin{macrocode}
+%<*natbib>
+FUNCTION {format.lab.names}
+{ 's :=
+ language empty$
+ { "english" 'curlanguage := }
+ { language 'curlanguage := }
+ if$
+ s #1 "{vv~}{ll}" format.name$
+ s num.names$ duplicate$
+ #2 >
+ %{ pop$ " et~al." * }
+ { pop$ " " bbl.etal * * }
+ { #2 <
+ 'skip$
+ { s #2 "{ff }{vv }{ll}{ jj}" format.name$ "others" =
+ %{ " et~al." * }
+ { " " bbl.etal * * }
+ %{ " and " * s #2 "{vv~}{ll}" format.name$ * }
+ { " " bbl.and " " * * * s #2 "{vv~}{ll}" format.name$ * }
+ if$
+ }
+ if$
+ }
+ if$
+}
+%</natbib>
+
+% \end{macrocode}
+% \DescribeFunction{format.names.rev}
+% Declare function to format names for authors/bookauthors list after title and etc.
+% Note that |format.names.rev| cuts list of names to at most 4 persons.
+% We do not cut names to initials in this list.
+% \begin{macrocode}
+FUNCTION {format.names.rev}
+{
+ 's :=
+ #1 'nameptr :=
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ { s nameptr
+%<!utf8> %"{f.}{~vv}{~ll}{, jj}" format.name$ 't :=
+%<!utf8> "{ff}{~vv}{~ll}{, jj}" format.name$ 't :=
+%<utf8> "{ff}{~vv}{~ll}{, jj}" format.name$ 't :=
+ nameptr #1 >
+ { nameptr #4 =
+ numnames #4 > and
+ { "others" 't :=
+ #1 'namesleft := }
+ 'skip$
+ if$
+ namesleft #1 >
+ { ", " * t * }
+ { t "others" =
+ t "~others" =
+ or
+%<!strict> { " " * bbl.etal * }
+%<strict> { " " * bbl.etal enclose.square.brackets * }
+ { ", " * t * }
+ if$
+ }
+ if$
+ }
+ 't
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+}
+
+% \end{macrocode}
+% \DescribeFunction{format.key}
+% Function to substitute empty field (usually, author name) with the |key| field.
+% \begin{macrocode}
+%<*natbib>
+FUNCTION {format.key}
+{ empty$
+ { key field.or.null }
+ { "" }
+ if$
+}
+%</natbib>
+
+% \end{macrocode}
+% \DescribeFunction{format.authors}
+% \begin{macrocode}
+FUNCTION {format.authors}
+{ author empty$
+ { "" }
+ { author format.names emphasize}
+ if$
+}
+
+% \end{macrocode}
+% \DescribeFunction{author.key.label}
+% \begin{macrocode}
+%<*natbib>
+FUNCTION {author.key.label}
+{ author empty$
+ { key empty$
+ { cite$ #1 #3 substring$ }
+ 'key
+ if$
+ }
+ { author format.lab.names }
+ if$
+}
+
+FUNCTION {author.editor.key.label}
+{ author empty$
+ { editor empty$
+ { key empty$
+ { cite$ #1 #3 substring$ }
+ %'key %% causes lost of year
+ { "{}" key * } %% Bug in bibtex8 ??
+ if$
+ }
+ { editor format.lab.names }
+ if$
+ }
+ { author format.lab.names }
+ if$
+}
+
+FUNCTION {author.key.organization.label}
+{ author empty$
+ { key empty$
+ { organization empty$
+ { cite$ #1 #3 substring$ }
+ { "The " #4 organization chop.word #3 text.prefix$ }
+ if$
+ }
+ 'key
+ if$
+ }
+ { author format.lab.names }
+ if$
+}
+
+FUNCTION {editor.key.organization.label}
+{ editor empty$
+ { key empty$
+ { organization empty$
+ { cite$ #1 #3 substring$ }
+ { "The " #4 organization chop.word #3 text.prefix$ }
+ if$
+ }
+ 'key
+ if$
+ }
+ { editor format.lab.names }
+ if$
+}
+
+FUNCTION {calc.short.authors}
+{ type$ "book" =
+ type$ "inbook" =
+ or
+ 'author.editor.key.label
+ { type$ "proceedings" =
+ 'editor.key.organization.label
+ { type$ "manual" =
+ 'author.key.organization.label
+ 'author.key.label
+ if$
+ }
+ if$
+ }
+ if$
+ 'short.list :=
+}
+
+FUNCTION {calc.label}
+{ calc.short.authors
+ short.list
+ "("
+ *
+ year duplicate$ empty$
+ short.list key field.or.null = or
+ { pop$ "" }
+ 'skip$
+ if$
+ *
+ 'label :=
+}
+
+%</natbib>
+
+% \end{macrocode}
+% \DescribeFunction{format.bookauthors}
+% This function is used only once, in |bookauthor.before|, and the latter is
+% used only in |inbook| entry.
+% \begin{macrocode}
+FUNCTION {format.bookauthors}
+{ bookauthor empty$
+ { "" }
+ { bookauthor format.names}
+ if$
+}
+
+% \end{macrocode}
+% \DescribeFunction{format.authors.after}
+% \begin{macrocode}
+FUNCTION {format.authors.after}
+{ author empty$
+ { "" }
+ { author format.names.rev}
+ if$
+}
+
+% \end{macrocode}
+% \DescribeFunction{format.bookauthors.after}
+% \begin{macrocode}
+FUNCTION {format.bookauthors.after}
+{ bookauthor empty$
+ { "" }
+ { bookauthor format.names.rev}% always cuts to 4 persons
+ if$
+}
+
+% \end{macrocode}
+% \DescribeFunction{format.editors.after}
+% \begin{macrocode}
+FUNCTION {format.editors.after}
+{ editor empty$
+ { "" }
+ { bbl.edby "\ " * editor format.names.rev * }
+ if$
+}
+
+% \end{macrocode}
+% \DescribeFunction{format.chief.after}
+% \begin{macrocode}
+FUNCTION {format.chief.after}
+{ editor empty$
+ { "" }
+ { bbl.chief "\ " * editor format.names.rev * }
+ if$
+}
+
+% \end{macrocode}
+% \DescribeFunction{format.executor.after}
+% \begin{macrocode}
+FUNCTION {format.executor.after}
+{ author empty$
+ { "" }
+ { bbl.executor ": " * author format.names.rev * }
+ if$
+}
+
+% \end{macrocode}
+% \DescribeFunction{format.compiler.after}
+% \begin{macrocode}
+FUNCTION {format.compiler.after}
+{ compiler empty$
+ { "" }
+ { bbl.cmplr "\ " * compiler format.names.rev * }
+ if$
+}
+
+% \end{macrocode}
+% \DescribeFunction{format.title}
+% \textbf{Important note}
+% \
+% Neither \file{bibtex} nor \file{bibtex8} can handle unicoded text without
+% troubles. In particular, \file{bibtex8} fails to change case of a string if it
+% contains Cyrillic letter. Therefore we avoid using |change.case$| when
+% option |utf8| is in effect.
+% \begin{macrocode}
+FUNCTION {format.title}
+{ title empty$
+ { "" }
+%<!utf8> { title "t" change.case$ }
+%<utf8> { title }
+ if$
+}
+
+% \end{macrocode}
+% \DescribeFunction{format.month}
+% New in version 1.2d. This macro reads month field and translate English names
+% of months to Russian if current language is Russian.
+% \changes{v1.2i}{29 Dec 2016}{typo fix in \texttt{format.month}}
+% \begin{macrocode}
+FUNCTION {format.month}
+{ month empty$
+ { "" }
+ { curlanguage "russian" =
+ { month "Jan." =
+%<!utf8> { "\CYRYA\cyrn\cyrv." }
+%<utf8> { "Янв." }
+ { month "Feb." =
+%<!utf8> { "\CYRF\cyre\cyrv\cyrr." }
+%<utf8> { "Фев." }
+ { month "Mar." =
+%<!utf8> { "\CYRM\cyra\cyrr\cyrt" }
+%<utf8> { "Март" }
+ { month "Apr." =
+%<!utf8> { "\CYRA\cyrp\cyrr." }
+%<utf8> { "Апр." }
+ { month "May" =
+%<!utf8> { "\CYRM\cyra\cyrishrt" }
+%<utf8> { "Май" }
+ { month "Jun." =
+%<!utf8> { "\CYRI\cyryu\cyrn\cyrsftsn" }
+%<utf8> { "Июнь" }
+ { month "Jul." =
+%<!utf8> { "\CYRI\cyryu\cyrl\cyrsftsn" }
+%<utf8> { "Июль" }
+ { month "Aug." =
+%<!utf8> { "\CYRA\cyrv\cyrg\." }
+%<utf8> { "Авг." }
+ { month "Sep." =
+%<!utf8> { "\CYRS\cyre\cyrn\cyrt." }
+%<utf8> { "Сент." }
+ { month "Oct." =
+%<!utf8> { "\CYRO\cyrk\cyrt." }
+%<utf8> { "Окт." }
+ { month "Nov." =
+%<!utf8> { "\CYRN\cyro\cyrya\cyrb." }
+%<utf8> { "Нояб." }
+ { month "Dec." =
+%<!utf8> { "\CYRD\cyre\cyrk." }
+%<utf8> { "Дек." }
+ { month }
+ if$}if$}if$}if$}if$}if$}if$}if$}if$}if$}if$}if$}
+ { month }
+ if$}
+ if$
+}
+% \end{macrocode}
+% \DescribeFunction{format.date}
+% \changes{v1.2c}{17 Jan 2015}{fix Gost2003: \texttt{"}\texttt{-}\texttt{-}\texttt{-} replaced by macro \cs{BibDash}}
+% \begin{macrocode}
+FUNCTION {format.date}
+{ year empty$
+ { month empty$
+ { "" }
+ { "there's a month but no year in " cite$ * warning$
+ format.month
+ }
+ if$
+ }
+ { month empty$
+ 'year
+ { year ". \BibDash " format.month * * }
+ if$
+ }
+ if$
+%<natbib> extra.label * % new in v.1.2
+}
+
+% \end{macrocode}
+% \DescribeFunction{address.or.location}
+% New function in version 1.2i. Returns |address| value if not empty; otherwise
+% returns |location| value even if the latter is empty.
+% \changes{v1.2i}{02 Jan 2017}{\texttt{location} field added as alias to \texttt{address} field}
+% \begin{macrocode}
+%FUNCTION {address.or.location}
+%{
+% address empty$
+% { location empty$
+% 'skip$
+% { location }
+% if$ }
+% { address }
+% if$
+%}
+FUNCTION {address.or.location}
+{
+ address empty$
+ { location }
+ { address }
+ if$
+}
+
+% \end{macrocode}
+%
+% \DescribeFunction{specialitycode.or.number}
+% New function in version 1.2i. Returns |specialitycode| value if not empty; otherwise
+% returns |number| value even if the latter is empty.
+% \changes{v1.2i}{13 Jan 2017}{\texttt{number} field is now alias to \texttt{specialitycode}}
+% \begin{macrocode}
+FUNCTION {specialitycode.or.number}
+{
+ specialitycode empty$
+ { number }
+ { specialitycode }
+ if$
+}
+
+% \end{macrocode}
+%
+% \DescribeFunction{institution.or.school}
+% New function in version 1.2i. Returns |institution| value if not empty; otherwise
+% returns |school| value even if the latter is empty.
+% \changes{v1.2i}{13 Jan 2017}{\texttt{school} field is now alias to \texttt{instituttion}}
+% \begin{macrocode}
+FUNCTION {institution.or.school}
+{
+ institution empty$
+ { school}
+ { institution }
+ if$
+}
+% \end{macrocode}
+%
+% \DescribeFunction{format.address.publisher}
+% \DescribeFunction{format.address.publisher.date}
+% \begin{macrocode}
+%<*!strict>
+%FUNCTION {output.address.publisher}
+%{
+% address empty$
+% 'skip$
+% { address output
+% publisher empty$
+% 'skip$
+% { new.colon }
+% if$
+% }
+% if$
+% publisher output
+%}
+FUNCTION {output.address.publisher}
+{
+ address empty$ location empty$ and
+ 'skip$
+ { address.or.location output
+ publisher empty$
+ 'skip$
+ { new.colon }
+ if$
+ }
+ if$
+ publisher output
+}
+%</!strict>
+%<*strict>
+FUNCTION {output.address.publisher}
+{
+ address empty$
+ {
+ bbl.nnoaddress
+ publisher empty$
+ { "~: " * bbl.nopublisher * enclose.square.brackets }
+ { enclose.square.brackets "~: " * publisher * }
+ if$
+ }
+ {
+ address output
+ new.colon
+ publisher empty$
+ { bbl.nopublisher enclose.square.brackets }
+ { publisher }
+ if$
+ }
+ if$
+ output
+}
+
+%</strict>
+
+% \end{macrocode}
+% \DescribeFunction{output.address.publisher.date}
+% |Otput.address.publisher.date| is used in old styles.
+% New styles use |output.address.publisher|.
+% \begin{macrocode}
+%<*!(modern|strict)>
+FUNCTION {output.address.publisher.date}
+{
+ output.address.publisher
+ format.date output
+}
+%</!(modern|strict)>
+
+% \end{macrocode}
+% \DescribeFunction{output.bibitem}
+% \changes{v1.2c}{18 Jan 2015}{entry field \texttt{langid} added}
+% \begin{macrocode}
+%<*!natbib>
+FUNCTION {output.bibitem}
+{ newline$
+ "\bibitem" write$
+ cite$ bracify write$
+ newline$
+ langid empty$
+ { language empty$
+ { "english" 'curlanguage := }
+ { language 'curlanguage := }
+ if$
+ }
+ { langid 'curlanguage := }
+ if$
+ "\selectlanguageifdefined" curlanguage bracify * write$
+ newline$
+ ""
+ before.all 'output.state :=
+}
+
+%</!natbib>
+% \end{macrocode}
+% \DescribeFunction{format.full.names}
+% \DescribeFunction{author.full}
+% \DescribeFunction{editor.full}
+% \DescribeFunction{author.editor.full}
+% \DescribeFunction{make.full.names}
+% \DescribeFunction{output.bibitem}
+% In case of |natbib| option, we need |make.full.names| to compose
+% |output.bibitem|, and the latter in its turn requires some more functions.
+% \begin{macrocode}
+%<*natbib>
+FUNCTION {format.full.names}
+{'s :=
+ language empty$
+ { "english" 'curlanguage := }
+ { language 'curlanguage := }
+ if$
+ #1 'nameptr :=
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ { s nameptr
+ "{vv~}{ll}" format.name$ 't :=
+ nameptr #1 >
+ {
+ namesleft #1 >
+ { ", " * t * }
+ {
+ numnames #2 >
+ curlanguage "english" =
+ and
+ { "," * }
+ 'skip$
+ if$
+ t "others" =
+ %t "~others" =
+ %or
+ %{ " et~al." * }
+ { " " bbl.etal * * }
+ %{ " and " * t * }
+ { " " bbl.and " " * * * t * }
+ if$
+ }
+ if$
+ }
+ 't
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+}
+
+FUNCTION {author.full}
+{ author empty$
+ { "" }
+ { author format.full.names }
+ if$
+}
+
+FUNCTION {editor.full}
+{ editor empty$
+ { "" }
+ { editor format.full.names }
+ if$
+}
+
+FUNCTION {author.editor.full}
+{ author empty$
+ { editor empty$
+ { "" }
+ { editor format.full.names }
+ if$
+ }
+ { author format.full.names }
+ if$
+}
+
+FUNCTION {make.full.names}
+{ type$ "book" =
+ type$ "inbook" =
+ or
+ 'author.editor.full
+ { type$ "proceedings" =
+ 'editor.full
+ 'author.full
+ if$
+ }
+ if$
+}
+
+% =======================================
+FUNCTION {output.bibitem}
+{ newline$
+ "\bibitem[" write$
+ label write$
+ ")" make.full.names duplicate$ short.list =
+ { pop$ }
+ { * }
+ if$
+ "]{" * write$
+ cite$ write$
+ "}" write$
+%% language empty$
+%% { "english" 'curlanguage := }
+%% {language 'curlanguage := }
+%% if$
+ langid empty$
+ { language empty$
+ { "english" 'curlanguage := }
+ { language 'curlanguage := }
+ if$
+ }
+ { langid 'curlanguage := }
+ if$
+ "\selectlanguageifdefined" curlanguage bracify * write$
+ newline$
+ ""
+ before.all 'output.state :=
+}
+% =======================================
+%FUNCTION {output.bibitem}
+%{ newline$
+% "\bibitem" write$
+%% author.key.label
+%% year parenthesify *
+%% "; lbl:" label * *
+%% "; mfn:" make.full.names * *
+% label
+% make.full.names *
+% bracketise write$
+% cite$ bracify write$
+% newline$
+% language empty$
+% { "english" 'curlanguage := }
+% {language 'curlanguage := }
+% if$
+% "\selectlanguageifdefined" curlanguage bracify * write$
+% newline$
+% ""
+% before.all 'output.state :=
+%}
+% =======================================
+%</natbib>
+
+% \end{macrocode}
+% \DescribeFunction{n.dashify}
+% \begin{macrocode}
+FUNCTION {n.dashify}
+{ 't :=
+ ""
+ { t empty$ not }
+ { t #1 #1 substring$ "-" =
+ { t #1 #2 substring$ "--" = not
+ { "--" *
+ t #2 global.max$ substring$ 't :=
+ }
+ { { t #1 #1 substring$ "-" = }
+ { "-" *
+ t #2 global.max$ substring$ 't :=
+ }
+ while$
+ }
+ if$
+ }
+ { t #1 #1 substring$ *
+ t #2 global.max$ substring$ 't :=
+ }
+ if$
+ }
+ while$
+}
+
+% \end{macrocode}
+% \DescribeFunction{word.in}
+% \begin{macrocode}
+FUNCTION {word.in}
+{ bbl.iin
+ " " * }
+
+% \end{macrocode}
+% \DescribeFunction{format.btitle}
+% \begin{macrocode}
+FUNCTION {format.btitle}
+{ title
+}
+
+% \end{macrocode}
+% \DescribeFunction{tie.or.space.connect}
+% \begin{macrocode}
+FUNCTION {tie.or.space.connect}
+{ duplicate$ text.length$ #3 <
+ { "~" }
+ { " " }
+ if$
+ swap$ * *
+}
+
+% \end{macrocode}
+% \DescribeFunction{tie.connect}
+% Declare function to insert unbreakable space before last word in stack.
+% \begin{macrocode}
+FUNCTION {tie.connect}
+ {"~"
+ swap$ * *
+ }
+
+
+% \end{macrocode}
+% \DescribeFunction{either.or.chec}
+% \begin{macrocode}
+FUNCTION {either.or.check}
+{ empty$
+ 'pop$
+ { "can't use both " swap$ * " fields in " * cite$ * warning$ }
+ if$
+}
+
+% \end{macrocode}
+% \DescribeFunction{format.bvolume}
+% \begin{macrocode}
+FUNCTION {format.bvolume}
+{ volume empty$
+ { "" }
+ { bbl.vvol volume tie.connect
+ series empty$
+ 'skip$
+ { bbl.of space.word * series emphasize * }
+ if$
+ "volume and number" number either.or.check
+ }
+ if$
+}
+
+% \end{macrocode}
+% \DescribeFunction{format.number.series}
+% \begin{macrocode}
+FUNCTION {format.number.series}
+{ volume empty$
+ { number empty$
+ { series field.or.null }
+ { series empty$
+ { "there's a number but no series in " cite$ * warning$
+ bbl.nnr }
+ {
+ %new.dblslash
+ new.sentence
+ series
+ bbl.nr
+ tie.or.space.connect}
+ if$
+ number tie.or.space.connect
+ }
+ if$
+ }
+ { "" }
+ if$
+}
+
+% \end{macrocode}
+% \DescribeFunction{is.num}
+% \begin{macrocode}
+FUNCTION {is.num}
+{ chr.to.int$
+ duplicate$ "0" chr.to.int$ < not
+ swap$ "9" chr.to.int$ > not and
+}
+
+% \end{macrocode}
+% \DescribeFunction{extract.num}
+% \begin{macrocode}
+FUNCTION {extract.num}
+{ duplicate$ 't :=
+ "" 's :=
+ { t empty$ not }
+ { t #1 #1 substring$
+ t #2 global.max$ substring$ 't :=
+ duplicate$ is.num
+ { s swap$ * 's := }
+ { pop$ "" 't := }
+ if$
+ }
+ while$
+ s empty$
+ 'skip$
+ { pop$ s }
+ if$
+}
+
+%<*debug>
+% \end{macrocode}
+% \DescribeFunction{eng.ord}
+% \begin{macrocode}
+FUNCTION {eng.ord}
+{ duplicate$ "1" swap$ *
+ #-2 #1 substring$ "1" =
+ { bbl.th * }
+ { duplicate$ #-1 #1 substring$
+ duplicate$ "1" =
+ { pop$ bbl.st * }
+ { duplicate$ "2" =
+ { pop$ bbl.nd * }
+ { "3" =
+ { bbl.rd * }
+ { bbl.th * }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+}
+%</debug>
+
+% \end{macrocode}
+% \DescribeFunction{convert.edition}
+% \begin{macrocode}
+FUNCTION {convert.edition}
+{ edition
+% edition extract.num "l" change.case$ 's :=
+% s "first" = s "1" = or
+% { bbl.first 't := }
+% { s "second" = s "2" = or
+% { bbl.second 't := }
+% { s "third" = s "3" = or
+% { bbl.third 't := }
+% { s "fourth" = s "4" = or
+% { bbl.fourth 't := }
+% { s "fifth" = s "5" = or
+% { bbl.fifth 't := }
+% { s #1 #1 substring$ is.num
+% { s eng.ord 't := }
+% { edition 't := }
+% if$
+% }
+% if$
+% }
+% if$
+% }
+% if$
+% }
+% if$
+% }
+% if$
+% t
+}
+
+% \end{macrocode}
+% \DescribeFunction{format.edition}
+% \begin{macrocode}
+FUNCTION {format.edition}
+{ edition empty$
+ { "" }
+ { output.state mid.sentence =
+%<!utf8> { convert.edition "l" change.case$ " " * bbl.edition * }
+%<!utf8> { convert.edition "t" change.case$ " " * bbl.edition * }
+%<utf8> { convert.edition " " * bbl.edition * }
+%<utf8> { convert.edition " " * bbl.edition * }
+ if$
+ }
+ if$
+}
+
+INTEGERS { multiresult }
+
+% \end{macrocode}
+% \DescribeFunction{multi.page.check}
+% \begin{macrocode}
+FUNCTION {multi.page.check}
+{ 't :=
+ #0 'multiresult :=
+ { multiresult not
+ t empty$ not
+ and
+ }
+ { t #1 #1 substring$
+ duplicate$ "-" =
+ swap$ duplicate$ "," =
+ swap$ "+" =
+ or or
+ { #1 'multiresult := }
+ { t #2 global.max$ substring$ 't := }
+ if$
+ }
+ while$
+ multiresult
+}
+
+% \end{macrocode}
+% \DescribeFunction{format.pages}
+% \changes{v1.2c}{18 Jan 2015}{entry field \texttt{eid} added}
+% \begin{macrocode}
+%%FUNCTION {format.pages}
+%%{ pages empty$
+%% { "" }
+%% { pages multi.page.check
+%% { bbl.ppages pages n.dashify tie.connect }
+%% { bbl.ppage pages tie.connect }
+%% if$
+%% }
+%% if$
+%%}
+FUNCTION {format.pages}
+{ eid empty$
+ {
+ pages empty$
+ { "" }
+ { pages multi.page.check
+ { bbl.ppages pages n.dashify tie.connect }
+ { bbl.ppage pages tie.connect }
+ if$
+ }
+ if$
+ }
+ { eid multi.page.check
+ { bbl.ppages eid n.dashify tie.connect }
+ { bbl.ppage eid tie.connect }
+ if$
+ }
+ if$
+}
+
+% \end{macrocode}
+% \DescribeFunction{format.pages.page}
+% \changes{v1.2c}{18 Jan 2015}{entry field \texttt{eid} added}
+% \changes{v1.2b}{19 Jan 2014}{entry field \texttt{numpages} renamed to \texttt{pagetotal}}
+% \begin{macrocode}
+%%FUNCTION {format.pages.page}
+%%{ pages empty$
+%% { pagetotal empty$
+%% { "" }
+%% { pagetotal bbl.pages tie.connect }
+%% if$}
+%% { format.pages}
+%% if$
+%%}
+FUNCTION {format.pages.page}
+{ eid empty$
+ { pages empty$
+ { pagetotal empty$
+ { "" }
+ { pagetotal bbl.pages tie.connect }
+ if$
+ }
+ { format.pages}
+ if$
+ }
+ { format.pages }
+ if$
+}
+
+% \end{macrocode}
+% \DescribeFunction{format.vol.num.pages}
+% \begin{macrocode}
+FUNCTION {format.vol.num.pages}
+{ volume field.or.null
+ number empty$
+ 'skip$
+ {
+ ", no." number tie.or.space.connect *
+ volume empty$
+ { "there's a number but no volume in " cite$ * warning$ }
+ 'skip$
+ if$
+ }
+ if$
+ pages empty$
+ 'skip$
+ { duplicate$ empty$
+ { pop$ format.pages }
+ { ": " * pages n.dashify * }
+ if$
+ }
+ if$
+}
+
+% \end{macrocode}
+% \DescribeFunction{format.volume}
+% \begin{macrocode}
+FUNCTION {format.volume}
+{ volume empty$
+ { "" }
+ { bbl.vvol volume tie.or.space.connect }
+ if$
+}
+
+% \end{macrocode}
+% \DescribeFunction{format.number}
+% \begin{macrocode}
+FUNCTION {format.number}
+{ number empty$
+ { "" }
+ { bbl.nr number tie.or.space.connect }
+ if$
+}
+
+%<*debug>
+% \end{macrocode}
+% \DescribeFunction{format.chapter.pages}
+% \begin{macrocode}
+FUNCTION {format.chapter.pages}
+{ chapter empty$
+ 'format.pages
+ { type empty$
+ { bbl.chapter }
+ { type "l" change.case$ }
+ if$
+ chapter tie.or.space.connect
+ pages empty$
+ 'skip$
+ { ", " * format.pages * }
+ if$
+ }
+ if$
+}
+%</debug>
+
+% \end{macrocode}
+% \DescribeFunction{empty.misc.check}
+% \begin{macrocode}
+FUNCTION {empty.misc.check}
+{ author empty$ title empty$ howpublished empty$
+ month empty$ year empty$ note empty$
+ and and and and and
+ key empty$ not and
+ { "all relevant fields are empty in " cite$ * warning$ }
+ 'skip$
+ if$
+}
+
+% \end{macrocode}
+% \DescribeFunction{format.thesis.type}
+% \begin{macrocode}
+%FUNCTION {format.thesis.type}
+%{ type empty$
+% 'skip$
+% { pop$
+%%<!utf8> bbl.thesis.type "t" change.case$
+%%<utf8> bbl.thesis.type
+% }
+% if$
+%}
+FUNCTION {format.thesis.type}
+{ type empty$
+ 'skip$
+ { pop$
+ bbl.thesis.type
+ }
+ if$
+}
+% \end{macrocode}
+% \DescribeFunction{format.techrep.type.number}
+% Function to format report type and number.
+% \begin{macrocode}
+%FUNCTION {format.techrep.type.number}
+%{ type empty$
+% { bbl.techreport }
+% 'type
+% if$
+% number empty$
+%%<!utf8> { "t" change.case$ }
+%%<utf8> { "" }
+% { number tie.or.space.connect }
+% if$
+%}
+
+FUNCTION {format.techreport.type}
+{ type empty$
+ { bbl.techreport }
+ 'type
+ if$
+}
+
+% \end{macrocode}
+%
+% \DescribeFunction{author.before}
+% Declare the function |author.before| to format list
+% of authors in heading of a bibliographic record.
+% If the number of authors is 4 or larger, some styles skip
+% the list of authors in the beginning of the bibliographic
+% record, while other styles always print that list.
+% So, we need two version of |author.before|.
+%
+% First version is used if \file{.bst} style is compiled without option
+% |long|. It skips authors if their number is greater than or equal to 4
+% or if the author field is empty. Note that GOST requires for a long list of
+% authors to be reduced. Hence this first version is preferable.
+% Note also that |format.names| cuts list of names
+% to 4 person at most in case if |modern| option is used. and |format.authors|
+% just emphasizes |format.names|.
+% \begin{macrocode}
+%<*!long>
+FUNCTION {author.before}
+{
+ author empty$
+ 'skip$
+ {author num.names$ #4 <
+ {format.authors output
+ new.sentence}
+ 'skip$
+ if$}
+ if$
+}
+%</!long>
+% \end{macrocode}
+% Second version is used if \file{.bst} style is compiled with the option
+% |long|. It skips only if the author field is empty.
+% \begin{macrocode}
+%<*long>
+FUNCTION {author.before}
+{
+ author empty$
+ 'skip$
+ { format.authors output
+ new.sentence
+ }
+ if$
+}
+%</long>
+
+% \end{macrocode}
+% \DescribeFunction{bookauthor.before}
+% There are also 2 version of the function |bookauthor.before|.
+% Not used anymore!
+% \begin{macrocode}
+%%<*!long>
+%%FUNCTION {bookauthor.before}
+%%{
+%% bookauthor empty$
+%% 'skip$
+%% {bookauthor num.names$ #4 <
+%% {format.bookauthors output
+%% new.sentence}
+%% 'skip$
+%% if$}
+%% if$
+%%}
+%%</!long>
+%%<*long>
+%%FUNCTION {bookauthor.before}
+%%{
+%% bookauthor empty$
+%% 'skip$
+%% { format.bookauthors output
+%% new.sentence
+%% }
+%% if$
+%%}
+%%</long>
+
+% \end{macrocode}
+%
+% \DescribeFunction{author.after}
+% Functions |author.after| and |bookauthor.after| also have by 2 versions.
+% They are used to write authors list after the title followed by a slash.
+% In modern styles, compiled with option |modern|, the list of authors is
+% always cut to at most 4 persons. The cut is performed first by
+% |format.names.rev|, which is called by |format.authors.after|. For old styles,
+% |author.after| just outputs formatted string whereas for new style it
+% skips the string if the number of authors exceeds 3 (and author list is not
+% printed before the title).
+% \begin{macrocode}
+%<*!modern>
+FUNCTION {author.after}
+{
+ author empty$
+ 'skip$
+ {format.authors.after output
+ new.semicolon }
+ if$
+}
+%</!modern>
+%<*modern>
+%<*!long>
+FUNCTION {author.after}
+{
+ author empty$
+ 'skip$
+ {author num.names$ #3 >
+ {format.authors.after output
+ new.semicolon }
+ 'skip$
+ if$}
+ if$
+}
+%</!long>
+%<*long>
+FUNCTION {author.after} { }
+%</long>
+%</modern>
+
+% \end{macrocode}
+% \DescribeFunction{bookauthor.after}
+% This function is used only in |inbook| entry. It always cuts list to 4 persons
+% since |format.bookauthors.after| does that.
+% \begin{macrocode}
+FUNCTION {bookauthor.after}
+{
+ bookauthor empty$
+ 'skip$
+ {format.bookauthors.after output
+ new.semicolon }
+ if$
+}
+
+% \end{macrocode}
+% \DescribeFunction{editor.organization.after}
+% \begin{macrocode}
+FUNCTION {editor.organization.after}
+{
+ compiler empty$
+ {}
+ { format.compiler.after output
+ new.semicolon
+ }
+ if$
+ editor empty$
+ {}
+ { format.editors.after output
+ new.semicolon
+ }
+ if$
+ organization empty$
+ {}
+ {organization output
+ new.semicolon
+ }
+ if$
+}
+
+% \end{macrocode}
+% \DescribeFunction{format.url}
+% \changes{v0.8}{06 Jun 2003}{macro \cs{BibUrl} added}
+% \begin{macrocode}
+FUNCTION {format.url}
+{ url empty$
+ { "" }
+ {
+%<!(modern|strict)> "\BibUrl{ " url * "}" *
+%<modern|strict> bbl.url ": \BibUrl{" * url * "}" *
+ urldate empty$
+ { "" }
+ { " (" bbl.urldate * ": " * urldate * ")" * }
+ if$ *
+ }
+ if$
+}
+
+% \end{macrocode}
+% \DescribeFunction{output.url}
+% \begin{macrocode}
+FUNCTION {output.url}
+{
+ url empty$
+ 'skip$
+ { format.url output }
+ if$
+}
+
+% \end{macrocode}
+% \DescribeFunction{format.annote}
+% \changes{v0.8}{06 Jun 2003}{macro \cs{BibAnnote} added}
+% \begin{macrocode}
+FUNCTION {format.annote}
+{ annote empty$
+ { "" }
+ { after.sentence 'output.state :=
+ "\BibAnnote{" annote add.period$ * "}" *
+ }
+ if$
+}
+
+% \end{macrocode}
+% \DescribeFunction{format.isbn}
+% Do we really need to provide electronic search for ISNB?
+% \begin{macrocode}
+FUNCTION {format.isbn}
+{
+ isbn empty$
+ { "" }
+ { "ISBN:~\href{http://isbndb.com/search-all.html?kw=" isbn *
+ "}{" * isbn * "}" *
+ }
+ if$
+}
+
+% \end{macrocode}
+% \DescribeFunction{add.doi}
+% The Digital Object Identifier (DOI) System is for identifying content
+% objects in the digital environment. DOI names are assigned to any entity
+% for use on digital networks. They are used to provide current information,
+% including where they (or information about them) can be found on the
+% Internet. Information about a digital object may change over time,
+% including where to find it, but its DOI name will not change.
+%
+% Function |add.doi| embraces last string in stack into hyperlink
+% that links it to specified |doi| identificator at http://dx.doi.org/ web-site.
+% \begin{macrocode}
+%<*eprint>
+FUNCTION {add.doi}
+{ duplicate$ empty$
+ 'skip$
+ { doi empty$
+ 'skip$
+ { "\href{http://dx.doi.org/" doi * "}{" * swap$ * "}" * }
+ if$
+ }
+ if$
+}
+%</eprint>
+% \end{macrocode}
+% If \file{.bst} style is compiled without |eprint| option, we just ignore
+% |doi| field.
+% \begin{macrocode}
+%<*!eprint>
+FUNCTION {add.doi} { }
+%</!eprint>
+
+% \end{macrocode}
+% \DescribeFunction{add.media}
+% New in version 1.2. Adds |media| field if |strict| options is in effect.
+% If the |media| field is empty |add.media| prints a value based on the |type|
+% field. If the |type| is also empty |add.media| prints equivalent of the
+% word |text| in current language.
+% \begin{macrocode}
+%<*!strict>
+FUNCTION {add.media}
+{ duplicate$ empty$
+ 'skip$
+ { media empty$
+ 'skip$
+ { " " * bbl.media enclose.square.brackets * }
+ if$
+ }
+ if$
+}
+%</!strict>
+%<*strict>
+FUNCTION {add.media}
+{ duplicate$ empty$
+ 'skip$
+ { media empty$
+ { " " * bbl.media.text enclose.square.brackets * }
+ { " " * bbl.media enclose.square.brackets * }
+ if$
+ }
+ if$
+}
+%</strict>
+
+% \end{macrocode}
+%
+% \subsection{Electronic Publishing Information}
+%
+% The biblatex package provides three fields for electronic publishing
+% information: |eprint|, |eprinttype|, and |eprintclass|. The |eprint| field
+% is a verbatim field similar to |doi| which holds the identifier of the item.
+% The |eprinttype| field holds the resource name, i. e., the name of the
+% site or electronic archive. Optional |eprintclass| field is intended
+% for additional information specific to the resource indicated by the
+% |eprinttype| field. This could be a section, a path, classification
+% information, etc. If the |eprinttype| field is available, the standard styles
+% will use it as a literal label. In the following example, they would print
+% ``Resource: identifier'' rather than the generic ``eprint: identifier'':
+% \begin{verbatim}
+% eprint = {identifier},
+% eprinttype = {Resource},
+% \end{verbatim}
+%
+% \DescribeFunction{format.eprint}
+% The electronic identifier of an online publication.
+% This is roughly comparable to a |doi| but specific to a certain archive,
+% repository, service, or system.
+% Also see eprinttype and eprintclass.
+%
+% This function should use url. TO BE DONE YET.
+% \changes{v1.2}{26 Jan 2012}{entry fields \texttt{eprint}, \texttt{eprintclass}, \texttt{eprinttype}}
+% \begin{macrocode}
+%<*eprint>
+%FUNCTION {format.eprint}
+%{ eprint empty$
+% { "" }
+% { eprintclass empty$
+% { " \href{http://arxiv.org/abs/" eprint * "}" * "{" * eprint * "}" * }
+% { eprinttype empty$
+% { " \href{http://arxiv.org/abs/" eprint * "}" *
+% "{" * eprintclass * "/" * eprint * "}" *
+% }
+% { " \href{http://arxiv.org/abs/" eprint * "}" *
+% "{" * eprinttype * ":" * eprintclass * "/" * eprint * "}" *
+% }
+% if$}
+% if$}
+%if$}
+
+%FUNCTION {format.eprint}
+%{ eprint empty$
+% { "" }
+% { eprinttype empty$
+% { "" }
+% { eprinttype "~: " *}
+% if$
+% eprintclass empty$
+% { }
+% { eprintclass * "/" *}
+% if$
+% eprint *
+% }
+% if$
+% url empty$
+% { }
+% { "\href{" url * "}{" * swap$ * "}" *}
+% if$
+%}
+
+FUNCTION {format.eprint}
+{ eprint empty$
+ { "" }
+ { eprinttype empty$
+ { "" }
+ { eprinttype "~: " *}
+ if$
+ eprintclass empty$
+ { }
+ { eprintclass * "/" *}
+ if$
+ url empty$
+ { eprint * }
+ { "\href{" * url * "}{" * eprint * "}" *}
+ if$
+ }
+ if$
+}
+
+FUNCTION {output.eprint.url}
+{
+ eprint empty$
+ { format.url output }
+ { format.eprint output }
+ if$
+}
+
+%</eprint>
+
+%<*!eprint>
+FUNCTION {output.eprint.url}
+{
+ format.url output
+}
+%</!eprint>
+
+% \end{macrocode}
+%
+% Functions added in v1.2f to format patent entry (thanks to Stanislav Kruchinin).
+%
+% \changes{v1.2f}{12 Jul 2016}{entry field \texttt{patent} added}
+% \DescribeFunction{add.number}
+% \begin{macrocode}
+FUNCTION {add.number}
+{ duplicate$ empty$
+ { "" }
+ { bbl.nr swap$ tie.or.space.connect }
+ if$
+}
+
+% \end{macrocode}
+% \DescribeFunction{format.type.number}
+% \begin{macrocode}
+FUNCTION {format.type.number}
+{
+ type empty$
+ { "" }
+ {
+ number empty$
+ { "" }
+ { type number tie.or.space.connect }
+ if$
+ }
+ if$
+}
+
+% \end{macrocode}
+% \DescribeFunction{format.requestdate}
+% \begin{macrocode}
+FUNCTION {format.requestdate}
+{ requestdate empty$
+ { "" }
+ { bbl.req requestdate tie.or.space.connect }
+ if$
+}
+
+% \end{macrocode}
+% \DescribeFunction{format.publicationdate}
+% \begin{macrocode}
+FUNCTION {format.publicationdate}
+{ publicationdate empty$
+ { "" }
+ { bbl.publ publicationdate tie.or.space.connect }
+ if$
+}
+
+% \end{macrocode}
+% \DescribeFunction{format.prioritydate}
+% \begin{macrocode}
+FUNCTION {format.prioritydate}
+{ prioritydate empty$
+ { "" }
+ { bbl.priority prioritydate tie.or.space.connect }
+ if$
+}
+
+% \end{macrocode}
+%
+% \subsection{Entry types}
+%
+% Text below in this section is borrowed from biblatex manual. Not every
+% field listed below is actually supported by GOST styles. So description
+% below should be considered as a goal or a feature request.
+%
+% The lists below indicate the fields supported by each entry type.
+% Note that the mapping of fields to an entry type is ultimately at the
+% discretion of the bibliography style. The lists below therefore serve
+% two purposes. They indicate the fields supported by the standard styles
+% which ship with this package and they also serve as a model for custom
+% styles. Note that the required fields are not strictly required
+% in all cases. The fields marked as optional
+% are optional in a technical sense. Bibliographical formatting rules
+% usually require more than just the required fields. The standard
+% styles will generally not perform any formal validity checks, but
+% custom styles may do so. Generic fields like abstract and annotation
+% or label and shorthand are not included in the lists below because they
+% are independent of the entry type.
+%
+% \subsubsection{Regular Types}
+%
+% \DescribeFunction{article}
+% An article in a journal, magazine, newspaper, or other periodical which forms a
+% self-contained unit with its own title. The title of the periodical is given in the
+% journaltitle field. If the issue has its own title in addition to the main title of
+% the periodical, it goes in the issuetitle field. Note that editor and related fields
+% refer to the journal while translator and related fields refer to the article.
+%
+% Required fields: author, title, journaltitle, year/date.
+%
+% Optional fields: translator, annotator, commentator, subtitle, titleaddon,
+% editor, editora, editorb, editorc, journalsubtitle, issuetitle,
+% issuesubtitle, language, origlanguage, series, volume, number, eid, issue,
+% month, pages, version, note, issn, addendum, pubstate, doi, eprint,
+% eprintclass, eprinttype, url, urldate.
+% \begin{macrocode}
+FUNCTION {article}
+{
+ output.bibitem
+ author.before
+%<natbib> author format.key output
+ format.title add.media "title" output.check
+ new.slash
+ author.after
+ new.dblslash
+ journal emphasize add.doi "journal" output.check % new in v.2
+ new.block
+ format.date "year" output.check
+ new.block
+ format.volume output
+ format.number output
+ new.block
+ format.pages.page output
+ new.block
+ note output
+ new.sentence
+% format.url output
+ output.eprint.url
+ format.annote output
+ fin.entry
+}
+
+% \end{macrocode}
+% \DescribeFunction{book}
+% A single-volume book with one or more authors where the authors share credit for
+% the work as a whole. In biblatex, this entry type also covers the function
+% of the |@inbook| type of traditional BibTeX.
+%
+% Required fields: author, title, year/date.
+%
+% Optional fields: editor, editora, editorb, editorc, translator, annotator,
+% commentator, introduction, foreword, afterword, subtitle, titleaddon,
+% maintitle, mainsubtitle, maintitleaddon, language, origlanguage, volume,
+% part, edition, volumes, series, number, note, publisher, location, isbn,
+% chapter, pages, pagetotal, addendum, pubstate, doi, eprint, eprintclass,
+% eprinttype, url, urldate.
+% \begin{macrocode}
+FUNCTION {book}
+{
+ output.bibitem
+ author.before
+%<natbib> author format.key output
+ format.btitle add.doi add.media "title" output.check
+ new.slash
+ author.after
+ editor.organization.after
+ new.sentence
+ format.number.series output
+ new.block
+ format.edition output
+ new.block
+ output.address.publisher
+ format.date "year" output.check
+ new.block
+ format.bvolume output
+ new.block
+ format.pages.page output
+ new.block
+%<eprint> format.isbn output
+%<eprint> new.block
+ note output
+ new.sentence
+% format.url output
+ output.eprint.url
+ format.annote output
+ fin.entry
+}
+
+% \end{macrocode}
+% \DescribeFunction{booklet}
+% A book-like work without a formal publisher or sponsoring institution. Use the
+% field howpublished to supply publishing information in free format, if applicable.
+% The field type may be useful as well.
+%
+% Required fields: author/editor, title, year/date.
+%
+% Optional fields: subtitle, titleaddon, language, howpublished, type, note,
+% location, chapter, pages, pagetotal, addendum, pubstate, doi, eprint,
+% eprintclass, eprinttype, url, urldate.
+%
+% \begin{macrocode}
+FUNCTION {booklet}
+{
+ output.bibitem
+ author.before
+%<natbib> author format.key output
+ format.title add.doi add.media "title" output.check
+ new.slash
+ author.after
+ editor.organization.after
+ new.block
+ howpublished output
+ address.or.location output
+ format.date "year" output.check
+ new.block
+ note output
+ new.sentence
+% format.url output
+ output.eprint.url
+ format.annote output
+ fin.entry
+}
+
+% \end{macrocode}
+% \DescribeFunction{inbook}
+% A part of a book which forms a self-contained unit with its own title.
+% Note that the profile of this entry type is different from standard BibTeX.
+%
+% Required fields: author, title, booktitle, year/date.
+%
+% Optional fields: bookauthor, editor, editora, editorb, editorc, translator,
+% annotator, commentator, introduction, foreword, afterword, subtitle,
+% titleaddon, maintitle, mainsubtitle, maintitleaddon, booksubtitle,
+% booktitleaddon, language, origlanguage, volume, part, edition, volumes,
+% series, number, note, publisher, location, isbn, chapter, pages, addendum,
+% pubstate, doi, eprint, eprintclass, eprinttype, url, urldate.
+% \begin{macrocode}
+FUNCTION {inbook}
+{
+ output.bibitem
+ author.before
+%<natbib> author format.key output
+ format.btitle add.doi add.media "title" output.check
+ new.slash
+ author.after
+ new.dblslash
+% bookauthor.before
+ booktitle "booktitle" output.check
+ new.slash
+ bookauthor.after
+ editor.organization.after
+ new.block
+ format.edition output
+ new.block
+ format.number.series output
+ new.sentence
+ output.address.publisher
+ format.date "year" output.check
+ new.block
+ format.bvolume output
+ new.block
+ format.pages.page output
+ new.block
+%<eprint> format.isbn output
+%<eprint> new.block
+ note output
+ new.sentence
+% format.url output
+ output.eprint.url
+ format.annote output
+ fin.entry
+}
+
+% \end{macrocode}
+% \DescribeFunction{incollection}
+% A contribution to a collection which forms a self-contained unit with a distinct
+% author and title. The author refers to the title, the editor to the booktitle,
+% i. e., the title of the collection.
+%
+% Required fields: author, editor, title, booktitle, year/date.
+%
+% Optional fields: editora, editorb, editorc, translator, annotator,
+% commentator, introduction, foreword, afterword, subtitle, titleaddon,
+% maintitle, mainsubtitle, maintitleaddon, booksubtitle, booktitleaddon,
+% language, origlanguage, volume, part, edition, volumes, series, number,
+% note, publisher, location, isbn, chapter, pages, addendum, pubstate, doi,
+% eprint, eprintclass, eprinttype, url, urldate.
+% \begin{macrocode}
+FUNCTION {incollection}
+{
+ output.bibitem
+ author.before
+%<natbib> author format.key output
+ new.sentence
+ format.title add.doi add.media "title" output.check
+ new.slash
+ author.after
+ new.dblslash
+ booktitle "booktitle" output.check
+ new.slash
+ editor.organization.after
+ new.block
+ output.address.publisher
+ format.date "year" output.check
+ new.block
+ format.bvolume output
+ format.number.series output
+ new.block
+ format.pages.page output
+ new.block
+ note output
+ new.sentence
+% format.url output
+ output.eprint.url
+ format.annote output
+ fin.entry
+}
+
+% \end{macrocode}
+%
+% \DescribeFunction{proceedings}
+% A single-volume conference proceedings. This type is very similar to @collection.
+% It supports an optional organization field which holds the sponsoring institution.
+% The editor is omissible.
+%
+% Required fields: editor, title, year/date.
+%
+% Optional fields: subtitle, titleaddon, maintitle, mainsubtitle,
+% maintitleaddon, eventtitle, eventdate, venue, language, volume, part,
+% volumes, series, number, note, organization, publisher, location, month,
+% isbn, chapter, pages, pagetotal, addendum, pubstate, doi, eprint,
+% eprintclass, eprinttype, url, urldate.
+% \begin{macrocode}
+FUNCTION {proceedings}
+{
+ output.bibitem
+%<natbib> editor format.key output
+ format.btitle add.doi add.media "title" output.check
+ new.slash
+ editor.organization.after
+ new.block
+ format.bvolume output
+ format.number.series output
+ output.address.publisher
+ format.date "year" output.check
+ new.block
+ note output
+ new.sentence
+% format.url output
+ output.eprint.url
+ format.annote output
+ fin.entry
+}
+
+% \end{macrocode}
+% \DescribeFunction{inproceedings}
+% An article in a conference proceedings. This type is similar to @incollection. It
+% supports an optional organization field.
+%
+% Required fields: author, editor, title, booktitle, year/date.
+%
+% Optional fields: subtitle, titleaddon, maintitle, mainsubtitle,
+% maintitleaddon, booksubtitle, booktitleaddon, eventtitle, eventdate,
+% venue, language, volume, part, volumes, series, number, note, organization,
+% publisher, location, month, isbn, chapter, pages, addendum, pubstate, doi,
+% eprint, eprintclass, eprinttype, url, urldate.
+% \changes{v0.9}{07 Oct 2003}{bug fix in \texttt{@inproceedings} entry type}
+% \begin{macrocode}
+FUNCTION {inproceedings}
+{ output.bibitem
+ author.before
+%<natbib> author format.key output
+ new.sentence
+ format.title add.doi add.media "title" output.check
+ new.slash
+ author.after
+ new.dblslash
+ booktitle "booktitle" output.check
+ new.slash
+ editor.organization.after
+ new.block
+ format.bvolume output
+ format.number.series output
+ new.block
+% address empty$
+% { publisher output
+% format.date "year" output.check
+% }
+% { address output.nonnull
+% new.colon
+% publisher output
+% format.date "year" output.check
+% }
+% if$
+ output.address.publisher
+ format.date "year" output.check
+ new.block
+ format.pages.page output
+ new.block
+ note output
+ new.sentence
+% format.url output
+ output.eprint.url
+ format.annote output
+ fin.entry
+}
+
+% \end{macrocode}
+% \DescribeFunction{manual}
+% Technical or other documentation, not necessarily in printed form. The author or
+% editor is omissible.
+%
+% Required fields: author/editor, title, year/date.
+%
+% Optional fields: subtitle, titleaddon, language, edition, type, series,
+% number, version, note, organization, publisher, location, isbn, chapter,
+% pages, pagetotal, addendum, pubstate, doi, eprint, eprintclass,
+% eprinttype, url, urldate.
+% \begin{macrocode}
+FUNCTION {manual}
+{ output.bibitem
+ author empty$
+ { organization empty$
+ 'skip$
+ { organization output.nonnull
+ address output
+ }
+ if$
+ }
+ { format.authors output.nonnull }
+ if$
+%<natbib> author format.key output
+ new.block
+ format.btitle add.doi add.media "title" output.check
+ author empty$
+ { organization empty$
+ {
+ address new.block.checka
+ address output
+ }
+ 'skip$
+ if$
+ }
+ {
+ organization address new.block.checkb
+ organization output
+ address output
+ }
+ if$
+ format.edition output
+ format.date "year" output.check
+ new.block
+ note output
+ new.sentence
+% format.url output
+ output.eprint.url
+ format.annote output
+ fin.entry
+}
+
+% \end{macrocode}
+% \DescribeFunction{patent}
+% A patent or patent request. The number or record token is given in the number
+% field. Use the |type| field to specify the type and the |location| field to
+% indicate the scope of the patent, if different from the scope implied by the
+% type. Note that the location field is treated as a key list with this entry
+% type.
+%
+% Required fields: author, title, number, year/date.
+%
+% Optional fields: holder, subtitle, titleaddon, type, version, location, note,
+% date, month, year, addendum, pubstate, doi, eprint, eprint class, eprint type,
+% url, urldate.
+% \begin{macrocode}
+FUNCTION {patent}
+{
+ output.bibitem
+% title output.nonnull
+ title add.media output.nonnull
+% add.blank
+% media enclose.square.brackets output % S.Kruchinin's version
+ new.colon
+ format.type.number output
+ add.blank
+ address.or.location output
+ new.colon
+ ipc output
+ new.slash
+ format.authors.after "author" output.check
+ add.blank
+ authorcountry enclose.round.brackets output.nonnull
+%<natbib> author format.key output
+ new.semicolon
+ holder output.nonnull
+ new.semicolon
+ credits output.nonnull
+ new.block
+ requestnumber add.number output
+ new.semicolon
+ format.requestdate output
+ new.semicolon
+ format.publicationdate output
+ publication output
+ new.semicolon
+ format.prioritydate output
+ prioritynumber output
+ prioritycountry enclose.round.brackets output
+ new.block
+ note output
+ new.sentence
+ output.url
+ format.annote output
+ new.block
+ pagetotal output
+ fin.entry
+}
+
+% \end{macrocode}
+% \DescribeFunction{misc}
+% A fallback type for entries which do not fit into any other category. Use the field
+% howpublished to supply publishing information in free format, if applicable. The
+% field type may be useful as well. author, editor, and year are omissible.
+%
+% Required fields: author/editor, title, year/date.
+% \begin{macrocode}
+FUNCTION {misc}
+{ output.bibitem
+ format.authors output
+%<natbib> author format.key output
+ title howpublished new.sentence.checkb
+ format.title add.media output
+ howpublished new.block.checka
+ howpublished output
+ new.block
+ format.date "year" output.check
+ new.block
+ note output
+ new.sentence
+% format.url output
+ output.eprint.url
+ format.annote output
+ fin.entry
+}
+
+% \end{macrocode}
+% \DescribeFunction{unpublished}
+% A work with an author and a title which has not been formally published, such
+% as a manuscript or the script of a talk. Use the fields howpublished and note to
+% supply additional information in free format, if applicable.
+%
+% Required fields: author, title, year/date.
+%
+% Optional fields: subtitle, titleaddon, language, howpublished, note,
+% location, isbn, date, month, year, addendum, pubstate, url, urldate
+% \begin{macrocode}
+FUNCTION {unpublished}
+{ output.bibitem
+ author.before
+%<natbib> author format.key output
+ format.btitle "title" output.check
+ new.slash
+ author.after
+ editor.organization.after
+ new.block
+ format.date "year" output.check
+ new.block
+ note "note" output.check
+ new.sentence
+% format.url output
+ output.eprint.url
+ format.annote output
+ fin.entry
+}
+
+% \end{macrocode}
+% \DescribeFunction{online}
+% An online resource. Author, editor, and year are omissible.
+% This entry type is intended for sources such as web sites which are intrinsically
+% online resources. Note that all entry types support the url field. For example,
+% when adding an article from an online journal, it may be preferable to use the
+% |@article| type and its url field.
+%
+% Required fields: author/editor, title, year/date, url.
+%
+% Optional fields: subtitle, titleaddon, language, version, note,
+% organization, date, month, year, addendum, pubstate, urldate.
+% \changes{v1.1}{15 Jan 2012}{Entry type \texttt{@online} added}
+% \begin{macrocode}
+FUNCTION {online}
+{ output.bibitem
+ format.authors output
+%<natbib> author format.key output
+ title howpublished new.sentence.checkb
+ format.title add.doi add.media "title" output.check
+% howpublished new.block.checka
+ howpublished new.dblslash.checka
+%<!strict> howpublished output
+%<strict> howpublished enclose.square.brackets output
+ editor.organization.after
+ new.sentence
+ new.block
+ output.address.publisher
+ format.date output
+ new.block
+% format.url output
+ output.eprint.url
+ new.sentence
+ note output
+ format.annote output
+ fin.entry
+}
+
+% \end{macrocode}
+%
+% \DescribeFunction{internet}
+% \DescribeFunction{www}
+% \DescribeFunction{webpage}
+% \DescribeFunction{ielectronic}
+% New in version 2012.02.15.
+% \begin{macrocode}
+FUNCTION {internet} {online}
+FUNCTION {www} {online}
+FUNCTION {webpage} {online}
+FUNCTION {electronic} {online}
+% \end{macrocode}
+%
+% \DescribeFunction{thesis}
+% New in version 2012.02.02.
+%
+% A thesis written for an educational institution to satisfy the requirements for a
+% degree. Use the type field to specify the type of thesis.
+%
+% Required fields: author, title, type, institution, year/date.
+%
+% Optional fields: subtitle, titleaddon, language, note, location, month, isbn,
+% chapter, pages, pagetotal, addendum, pubstate, doi, eprint, eprintclass,
+% eprinttype, url, urldate
+%
+% \changes{v1.2}{02 Feb 2012}{\texttt{@thesis} entry}
+% \begin{macrocode}
+%<*!(modern|strict)>
+FUNCTION {thesis}
+{ output.bibitem
+ format.authors "author" output.check
+%<natbib> author format.key output
+ new.sentence
+ format.btitle "title" output.check
+ new.colon
+ bbl.phdthesis format.thesis.type output.nonnull
+ new.slash
+ %institution "institution" output.check
+ institution.or.school "institution/school" output.check
+ new.block
+ output.address.publisher.date
+ new.block
+ format.pages.page output
+ note output
+ new.sentence
+ format.url output
+ format.annote output
+ fin.entry
+}
+%</!(modern|strict)>
+%<*modern|strict>
+FUNCTION {thesis}
+{ output.bibitem
+ format.authors "author" output.check
+%<natbib> author format.key output
+ new.sentence
+ format.btitle add.doi add.media "title" output.check
+ new.colon
+ %%type "type" output.check
+ bbl.phdthesis format.thesis.type output.nonnull
+ new.colon
+ %%number output % code of the speciality
+ specialitycode.or.number output % code of the speciality, new in v.1.2i
+ new.colon
+ titleaddon output % date of defence and approvement; new in v.1.2i
+ new.slash
+ format.authors.after output
+ new.semicolon
+ %institution "institution" output.check
+ institution.or.school "institution/school" output.check
+ new.block
+ output.address.publisher
+ format.date "year" output.check
+ new.block
+ format.pages.page output
+ new.block
+ note output
+ new.sentence
+% format.url output
+ output.eprint.url
+ format.annote output
+ fin.entry
+}
+%</modern|strict>
+
+% \end{macrocode}
+%
+% \DescribeFunction{report}
+% New in version 2012.02.02.
+%
+% A technical report, research report, or white paper published by a university or
+% some other institution. Use the type field to specify the type of report. The sponsoring
+% institution goes in the institution field.
+%
+% Required fields: author, title, type, institution, year/date.
+%
+% Optional fields: subtitle, titleaddon, language, number, version, note,
+% location, month, isrn, chapter, pages, pagetotal, addendum, pubstate, doi,
+% eprint, eprintclass, eprinttype, url, urldate.
+% \changes{v1.2}{02 Feb 2012}{\texttt{@report} entry}
+% \begin{macrocode}
+%FUNCTION {report}
+%{
+% output.bibitem
+% author.before
+% new.sentence
+% format.title add.doi add.media "title" output.check
+% new.colon
+%% format.techrep.type.number output.nonnull
+% type "type" output.check
+% new.slash
+% author.after
+% editor.organization.after
+% new.block
+% address output
+% new.colon
+% institution "institution" output.check
+% format.date "year" output.check
+% new.block
+% note output
+% new.block % v.2
+% format.pages.page output % v.2
+% new.sentence
+%% format.url output
+% output.eprint.url
+% format.annote output
+% fin.entry
+%}
+FUNCTION {report}
+{
+ output.bibitem
+% author.before
+% new.sentence
+ format.title add.doi add.media "title" output.check
+%<natbib> title format.key output
+ new.colon
+% format.techrep.type.number output.nonnull
+% type "type" output.check
+% format.report.type.number "type" output.check
+ type "type" output.check
+ new.colon
+ number output
+ new.slash
+ %institution "institution" output.check
+ institution.or.school "institution/school" output.check
+ new.semicolon
+ format.chief.after output % from editor field
+ new.semicolon
+ format.executor.after output % from author field
+ new.block
+ address.or.location output
+ new.colon
+ organization output
+ format.date "year" output.check
+ new.block % v.2
+ format.pages.page output % v.2
+ new.sentence % или new.block ?
+ output.eprint.url
+ new.block
+ note output
+ format.annote output
+ fin.entry
+}
+
+% \end{macrocode}
+%
+% \subsubsection{Type Aliases}
+%
+% The entry types listed in this section are provided for backwards compatibility
+% with traditional BibTeX styles. These aliases are resolved by BibTeX as the data is
+% exported. Bibliography styles will see the entry type the alias points to, not the
+% alias name. All unknown entry types are generally exported as @misc.
+%
+% \DescribeFunction{phdthesis}
+% Similar to @thesis except that the type field is optional and defaults to the localized
+% term `PhD thesis'. You may still use the type field to override that.
+% \begin{macrocode}
+%<*!(modern|strict)>
+FUNCTION {phdthesis}
+{ output.bibitem
+ format.authors "author" output.check
+ new.sentence
+ format.btitle "title" output.check
+ new.colon
+ bbl.phdthesis format.thesis.type output.nonnull
+ new.slash
+ %institution "institution" output.check
+ institution.or.school "institution/school" output.check
+ new.block
+ output.address.publisher.date
+ new.block
+ format.pages.page output
+ note output
+ new.sentence
+ format.url output
+ format.annote output
+ fin.entry
+}
+%</!(modern|strict)>
+%<*modern|strict>
+FUNCTION {phdthesis}
+{ output.bibitem
+ format.authors "author" output.check
+%<natbib> author format.key output
+ new.sentence
+ format.btitle add.doi add.media "title" output.check
+ new.colon
+ bbl.phdthesis format.thesis.type output.nonnull
+ new.colon
+ %%number output % code of the speciality
+ specialitycode.or.number output % code of the speciality, new in v.1.2i
+ new.colon
+ titleaddon output % date of defence and approvement; new in v.1.2i
+ new.slash
+ format.authors.after output
+ new.semicolon
+ %institution "institution" output.check
+ institution.or.school "institution/school" output.check
+ new.block
+ output.address.publisher
+ format.date "year" output.check
+ new.block
+ format.pages.page output
+ new.block
+ note output
+ new.sentence
+% format.url output
+ output.eprint.url
+ format.annote output
+ fin.entry
+}
+%</modern|strict>
+
+% \end{macrocode}
+% \DescribeFunction{mastersthesis}
+% Similar to |@thesis| except that the type field is optional and defaults to the localized
+% term `Master's thesis'. You may still use the type field to override that.
+% \changes{v1.2i}{29 Dec 2016}{entry \texttt{@MastersThesis} added again (see v1.1)}
+% \begin{macrocode}
+%<*!(modern|strict)>
+FUNCTION {mastersthesis}
+{ output.bibitem
+ format.authors "author" output.check
+%<natbib> author format.key output
+ new.sentence
+ format.btitle "title" output.check
+ new.colon
+ bbl.mathesis format.thesis.type output.nonnull
+ new.slash
+ %institution "institution" output.check
+ institution.or.school "institution/school" output.check
+ new.block
+ output.address.publisher.date
+ new.block
+ format.pages.page output
+ note output
+ new.sentence
+ format.url output
+ format.annote output
+ fin.entry
+}
+%</!(modern|strict)>
+%<*modern|strict>
+FUNCTION {mastersthesis}
+{ output.bibitem
+ format.authors "author" output.check
+%<natbib> author format.key output
+ new.sentence
+ format.btitle add.doi add.media "title" output.check
+ new.colon
+ bbl.mathesis format.thesis.type output.nonnull
+ new.colon
+ %%number output % code of the speciality
+ specialitycode.or.number output % code of the speciality, new in v.1.2i
+ new.colon
+ titleaddon output % date of defence and approvement; new in v.1.2i
+ new.slash
+ format.authors.after output
+ new.semicolon
+ %institution "institution" output.check
+ institution.or.school "institution/school" output.check
+ new.block
+ output.address.publisher
+ format.date "year" output.check
+ new.block
+ format.pages.page output
+ new.block
+ note output
+ new.sentence
+% format.url output
+ output.eprint.url
+ format.annote output
+ fin.entry
+}
+%</modern|strict>
+
+% \end{macrocode}
+% \DescribeFunction{docthesis}
+% Similar to |@thesis| except that the type field is optional and defaults to the localized
+% term `Doctor's of sciences thesis'. You may still use the type field to override that.
+% \changes{v1.2i}{02 Jan 2017}{\texttt{@dscithesis} entry renamed to \texttt{@docthesis}}
+% \begin{macrocode}
+%<*!(modern|strict)>
+FUNCTION {docthesis}
+{ output.bibitem
+ format.authors "author" output.check
+%<natbib> author format.key output
+ new.sentence
+ format.btitle "title" output.check
+ new.colon
+ bbl.docthesis format.thesis.type output.nonnull
+ new.slash
+ %institution "institution" output.check
+ institution.or.school "institution/school" output.check
+ new.block
+ output.address.publisher.date
+ new.block
+ format.pages.page output
+ note output
+ new.sentence
+ format.url output
+ format.annote output
+ fin.entry
+}
+%</!(modern|strict)>
+%<*modern|strict>
+FUNCTION {docthesis}
+{ output.bibitem
+ format.authors "author" output.check
+%<natbib> author format.key output
+ new.sentence
+ format.btitle add.doi add.media "title" output.check
+ new.colon
+ bbl.docthesis format.thesis.type output.nonnull
+ new.colon
+ %%number output % code of the speciality
+ specialitycode.or.number output % code of the speciality, new in v.1.2i
+ new.colon
+ titleaddon output % date of defence and approvement; new in v.1.2i
+ new.slash
+ format.authors.after output
+ new.semicolon
+ %institution "institution" output.check
+ institution.or.school "institution/school" output.check
+ new.block
+ output.address.publisher
+ format.date "year" output.check
+ new.block
+ format.pages.page output
+ new.block
+ note output
+ new.sentence
+% format.url output
+ output.eprint.url
+ format.annote output
+ fin.entry
+}
+%</modern|strict>
+
+% \end{macrocode}
+% \DescribeFunction{conference}
+% \begin{macrocode}
+FUNCTION {conference} { inproceedings }
+
+% \end{macrocode}
+%
+% \DescribeFunction{techreport}
+% TechReport is similar to |@report| except that the |type| field is optional
+% and defaults to the localized term `technical report'.
+% You may still use the type field to override that.
+% \begin{macrocode}
+%FUNCTION {techreport}
+%{
+% output.bibitem
+% author.before
+% new.sentence
+% format.title add.doi add.media "title" output.check
+% new.colon
+% format.techrep.type.number output.nonnull
+% new.slash
+% author.after
+% editor.organization.after
+% new.block
+% address output
+% new.colon
+% institution "institution" output.check
+% format.date "year" output.check
+% new.block
+% note output
+% new.block % v.2
+% format.pages.page output % v.2
+% new.sentence
+%% format.url output
+% output.eprint.url
+% format.annote output
+% fin.entry
+%}
+
+FUNCTION {techreport}
+{
+ output.bibitem
+% author.before
+% new.sentence
+ format.title add.doi add.media "title" output.check
+%<natbib> title format.key output
+ new.colon
+% format.techrep.type.number output.nonnull
+% type "type" output.check
+% format.report.type.number "type" output.check
+% type output
+ format.techreport.type output
+ new.colon
+ number output
+ new.slash
+ %institution "institution" output.check
+ institution.or.school "institution/school" output.check
+ new.semicolon
+ format.chief.after output % from editor field
+ new.semicolon
+ format.executor.after output % from author field
+ new.block
+ address.or.location output
+ new.colon
+ organization output
+ format.date "year" output.check
+ new.block % v.2
+ format.pages.page output % v.2
+ new.sentence % или new.block ?
+ output.eprint.url
+ new.block
+ note output
+ format.annote output
+ fin.entry
+}
+
+% \end{macrocode}
+% \DescribeFunction{default.type}
+% \begin{macrocode}
+FUNCTION {default.type} { misc }
+
+% \end{macrocode}
+%
+% \subsection{Month Abbreviations}
+% Borrowed from \file{merlin.mbs} of package \pkg{custom-bib}. This is done for
+% backward compatibility with standard .bst styles which are designed for English.
+% The string in the definition of any month macro must coincide with that used in
+% |format.month| function in the above.
+% \changes{v1.2d}{18 Feb 2016}{\cs{bbljan} etc. macros removed}
+% \begin{macrocode}
+MACRO {jan} {"Jan."}
+MACRO {feb} {"Feb."}
+MACRO {mar} {"Mar."}
+MACRO {apr} {"Apr."}
+MACRO {may} {"May"}
+MACRO {jun} {"Jun."}
+MACRO {jul} {"Jul."}
+MACRO {aug} {"Aug."}
+MACRO {sep} {"Sep."}
+MACRO {oct} {"Oct."}
+MACRO {nov} {"Nov."}
+MACRO {dec} {"Dec."}
+% \end{macrocode}
+%
+% \subsection{Journal Abbreviations}
+%
+% \subsubsection{Physics and astronomy}
+%
+% Borrowed from \file{physjour.mbs} of package \pkg{custom-bib}.
+% \begin{macrocode}
+MACRO {aa}{"Astron. \& Astrophys."}
+MACRO {aasup}{"Astron. \& Astrophys. Suppl. Ser."}
+MACRO {aj} {"Astron. J."}
+MACRO {aph} {"Acta Phys."}
+MACRO {advp} {"Adv. Phys."}
+MACRO {ajp} {"Amer. J. Phys."}
+MACRO {ajm} {"Amer. J. Math."}
+MACRO {amsci} {"Amer. Sci."}
+MACRO {anofd} {"Ann. Fluid Dyn."}
+MACRO {am} {"Ann. Math."}
+MACRO {ap} {"Ann. Phys. (NY)"}
+MACRO {adp} {"Ann. Phys. (Leipzig)"}
+MACRO {ao} {"Appl. Opt."}
+MACRO {apl} {"Appl. Phys. Lett."}
+MACRO {app} {"Astroparticle Phys."}
+MACRO {apj} {"Astrophys. J."}
+MACRO {apjsup} {"Astrophys. J. Suppl."}
+MACRO {apss} {"Astrophys. Space Sci."}
+MACRO {araa} {"Ann. Rev. Astron. Astrophys."}
+MACRO {baas} {"Bull. Amer. Astron. Soc."}
+MACRO {baps} {"Bull. Amer. Phys. Soc."}
+MACRO {cmp} {"Comm. Math. Phys."}
+MACRO {cpam} {"Commun. Pure Appl. Math."}
+MACRO {cppcf} {"Comm. Plasma Phys. \& Controlled Fusion"}
+MACRO {cpc} {"Comp. Phys. Comm."}
+MACRO {cqg} {"Class. Quant. Grav."}
+MACRO {cra} {"C. R. Acad. Sci. A"}
+MACRO {fed} {"Fusion Eng. \& Design"}
+MACRO {ft} {"Fusion Tech."}
+MACRO {grg} {"Gen. Relativ. Gravit."}
+MACRO {ieeens} {"IEEE Trans. Nucl. Sci."}
+MACRO {ieeeps} {"IEEE Trans. Plasma Sci."}
+MACRO {ijimw} {"Interntl. J. Infrared \& Millimeter Waves"}
+MACRO {ip} {"Infrared Phys."}
+MACRO {irp} {"Infrared Phys."}
+MACRO {jap} {"J. Appl. Phys."}
+MACRO {jasa} {"J. Acoust. Soc. America"}
+MACRO {jcp} {"J. Comp. Phys."}
+MACRO {jchp} {"J. Chem. Phys."}
+MACRO {jetp} {"Sov. Phys.--JETP"}
+MACRO {jfe} {"J. Fusion Energy"}
+MACRO {jfm} {"J. Fluid Mech."}
+MACRO {jmp} {"J. Math. Phys."}
+MACRO {jne} {"J. Nucl. Energy"}
+MACRO {jnec} {"J. Nucl. Energy, C: Plasma Phys., Accelerators, Thermonucl. Res."}
+MACRO {jnm} {"J. Nucl. Mat."}
+MACRO {jpc} {"J. Phys. Chem."}
+MACRO {jpp} {"J. Plasma Phys."}
+MACRO {jpsj} {"J. Phys. Soc. Japan"}
+MACRO {jsi} {"J. Sci. Instrum."}
+MACRO {jvst} {"J. Vac. Sci. \& Tech."}
+MACRO {nat} {"Nature"}
+MACRO {nature} {"Nature"}
+MACRO {nedf} {"Nucl. Eng. \& Design/Fusion"}
+MACRO {nf} {"Nucl. Fusion"}
+MACRO {nim} {"Nucl. Inst. \& Meth."}
+MACRO {nimpr} {"Nucl. Inst. \& Meth. in Phys. Res."}
+MACRO {np} {"Nucl. Phys."}
+MACRO {npb} {"Nucl. Phys. B"}
+MACRO {nt/f} {"Nucl. Tech./Fusion"}
+MACRO {npbpc} {"Nucl. Phys. B (Proc. Suppl.)"}
+MACRO {inc} {"Nuovo Cimento"}
+MACRO {nc} {"Nuovo Cimento"}
+MACRO {pf} {"Phys. Fluids"}
+MACRO {pfa} {"Phys. Fluids A: Fluid Dyn."}
+MACRO {pfb} {"Phys. Fluids B: Plasma Phys."}
+MACRO {pl} {"Phys. Lett."}
+MACRO {pla} {"Phys. Lett. A"}
+MACRO {plb} {"Phys. Lett. B"}
+MACRO {prep} {"Phys. Rep."}
+MACRO {pnas} {"Proc. Nat. Acad. Sci. USA"}
+MACRO {pp} {"Phys. Plasmas"}
+MACRO {pop} {"Phys. Plasmas"}
+MACRO {ppcf} {"Plasma Phys. \& Controlled Fusion"}
+MACRO {phitrsl} {"Philos. Trans. Roy. Soc. London"}
+MACRO {prl} {"Phys. Rev. Lett."}
+MACRO {pr} {"Phys. Rev."}
+MACRO {physrev} {"Phys. Rev."}
+MACRO {pra} {"Phys. Rev. A"}
+MACRO {prb} {"Phys. Rev. B"}
+MACRO {prc} {"Phys. Rev. C"}
+MACRO {prd} {"Phys. Rev. D"}
+MACRO {pre} {"Phys. Rev. E"}
+MACRO {ps} {"Phys. Scripta"}
+MACRO {procrsl} {"Proc. Roy. Soc. London"}
+MACRO {rmp} {"Rev. Mod. Phys."}
+MACRO {rsi} {"Rev. Sci. Inst."}
+MACRO {science} {"Science"}
+MACRO {sciam} {"Sci. Am."}
+MACRO {sam} {"Stud. Appl. Math."}
+MACRO {st} {"Sky and Telesc."}
+% \end{macrocode}
+%
+% \subsubsection{Supplementary Journal Names}
+%
+% Borrowed from \file{suppjour.mbs} of package \pkg{custom-bib}.
+% \begin{macrocode}
+MACRO {cjp} {"Czech. J. Phys."}
+MACRO {el} {"Europhys. Lett."}
+MACRO {en} {"Europhys. News"}
+MACRO {fujitsustj} {"FUJITSU Sci. Tech. J."}
+MACRO {ieeeed} {"IEEE Trans. Electron Devices"}
+MACRO {ieeeim} {"IEEE Trans. Instrum. Meas."}
+MACRO {ieeejqe} {"IEEE J. Quantum Electron."}
+MACRO {ieeem} {"IEEE Trans. Magn."}
+MACRO {ieeeptl} {"IEEE Photonic Technol. Lett."}
+MACRO {ieeeuffc} {"IEEE Trans. Ultrason., Ferroelect., Freq. Cont."}
+MACRO {jem} {"J. Electron. Mater."}
+MACRO {jes} {"J. Electrochem. Soc."}
+MACRO {jetplett} {"JETP Lett."}
+MACRO {jjap} {"Japan. J. Appl. Phys."}
+MACRO {jpha} {"J. Phys. A: Math. Gen."}
+MACRO {jphb} {"J. Phys. B: At. Mol. Opt. Phys."}
+MACRO {jphbold} {"J. Phys. B: At. Mol. Phys."}
+MACRO {jphc} {"J. Phys.: Condens. Matter"}
+MACRO {jphcold} {"J. Phys. C: Solid State Phys."}
+MACRO {jphd} {"J. Phys. D: Appl. Phys."}
+MACRO {jvsta} {"J. Vac. Sci. Technol. A"}
+MACRO {jvstb} {"J. Vac. Sci. Technol. B"}
+MACRO {me} {"Microelectron. Eng."}
+MACRO {necrd} {"NEC Res.{\&} Develop."}
+MACRO {pa} {"Physica A"}
+MACRO {pb} {"Physica B"}
+MACRO {pc} {"Physica C"}
+MACRO {pd} {"Physica D"}
+MACRO {procieee} {"Proc. IEEE"}
+MACRO {procspie} {"Proc. SPIE"}
+MACRO {pssa} {"Phys. Stat. Sol. A"}
+MACRO {pssb} {"Phys. Stat. Sol. B"}
+MACRO {rpp} {"Rep. Progr. Phys."}
+MACRO {sm} {"Synthet. Metal"}
+MACRO {sost} {"Solid State Technol."}
+MACRO {ss} {"Surf. Sci."}
+MACRO {ssc} {"Solid State Commun."}
+MACRO {sst} {"Semicond. Sci. Technol."}
+MACRO {suplatt} {"Superlatt. Microstr."}
+MACRO {sust} {"Supercond. Sci. Technol."}
+MACRO {znat} {"Z. Naturforsch."}
+% \end{macrocode}
+%
+% \subsubsection{Optics}
+%
+% Borrowed from \file{photjour.mbs}.
+% \begin{macrocode}
+MACRO {appopt} {"Appl. Opt."}
+MACRO {bell} {"Bell Syst. Tech. J."}
+MACRO {ell} {"Electron. Lett."}
+MACRO {jasp} {"J. Appl. Spectr."}
+MACRO {jqe} {"IEEE J. Quantum Electron."}
+MACRO {jlwt} {"J. Lightwave Technol."}
+MACRO {jmo} {"J. Mod. Opt."}
+MACRO {josa} {"J. Opt. Soc. America"}
+MACRO {josaa} {"J. Opt. Soc. Amer.~A"}
+MACRO {josab} {"J. Opt. Soc. Amer.~B"}
+MACRO {jdp} {"J. Phys. (Paris)"}
+MACRO {oc} {"Opt. Commun."}
+MACRO {ol} {"Opt. Lett."}
+MACRO {os} {"Opt. Spectrosc."}
+MACRO {phtl} {"IEEE Photon. Technol. Lett."}
+MACRO {pspie} {"Proc. Soc. Photo-Opt. Instrum. Eng."}
+MACRO {vr} {"Vision Res."}
+MACRO {zph} {"Z. f. Physik"}
+MACRO {zphb} {"Z. f. Physik~B"}
+MACRO {zphd} {"Z. f. Physik~D"}
+% \end{macrocode}
+%
+% \subsubsection{Physics of condensed Matter}
+%
+% \begin{macrocode}
+MACRO {sse} {"Solid-State Electron."}
+MACRO {pss} {"Phys. Sol. State"}
+MACRO {nl} {"Nano Lett."}
+% \end{macrocode}
+%
+% \subsubsection{Soviet and Russian journals}
+% To be extended.
+% \begin{macrocode}
+MACRO {sjpp} {"Sov. J. Plasma Phys."}
+MACRO {spd} {"Sov. Phys.--Doklady"}
+MACRO {sptp} {"Sov. Phys.--Tech. Phys."}
+MACRO {spu} {"Sov. Phys.--Uspekhi"}
+%<!utf8>MACRO {ufn} {"\CYRU\CYRF\CYRN"}
+%<utf8>MACRO {ufn} {"УФН"}
+MACRO {pu} {"Phys.--Uspekhi"}
+MACRO {sjot} {"Sov. J. Opt. Technol."}
+MACRO {sjqe} {"Sov. J. Quantum Electron."}
+MACRO {sleb} {"Sov. Phys.--Leb. Inst. Rep."}
+MACRO {stph} {"Sov. Phys.--Techn. Phys."}
+MACRO {stphl}{"Sov. Techn. Phys. Lett."}
+% \end{macrocode}
+%
+% \subsection{Main cycle}
+%
+% \begin{macrocode}
+
+READ
+
+% \end{macrocode}
+%
+% \subsection{Sorting}
+%
+% Next chunk of code governs sorting reference list by authors' names and
+% titles.
+% \begin{macrocode}
+%<*sort|natbib>
+
+% \end{macrocode}
+% \DescribeFunction{sortify}
+% \begin{macrocode}
+FUNCTION {sortify}
+{ purify$
+%<!utf8> "l" change.case$
+}
+%</sort|natbib>
+
+% \end{macrocode}
+% \DescribeFunction{sort.format.names}
+% \begin{macrocode}
+%<*sort>
+%% =====================================
+%% This version from old Gost package
+%%<*!natbib>
+FUNCTION {sort.format.names}
+{ 's :=
+ #1 'nameptr :=
+ ""
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ { nameptr #1 >
+ { " " * }
+ 'skip$
+ if$
+ s nameptr
+ "{vv{ } }{ll{ }}{ f{ }}{ jj{ }}"
+ format.name$ 't :=
+ nameptr numnames = t "others" = and
+ { "et al" * }
+ %{ bbl.etal * }
+ { t sortify * }
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+}
+%%</!natbib>
+%% This version from plainnat.bst
+%% It ignores second and subsequent authors but include year.
+%%<*natbib>
+%FUNCTION {sort.format.names}
+%{ 's :=
+% #1 'nameptr :=
+% ""
+% s num.names$ 'numnames :=
+% numnames 'namesleft :=
+% { namesleft #0 > }
+% {
+% s nameptr "{vv{ } }{ll{ }}{ ff{ }}{ jj{ }}" format.name$ 't :=
+% nameptr #1 >
+% {
+% " " *
+% namesleft #1 = t "others" = and
+% { "zzzzz" * }
+% { numnames #2 > nameptr #2 = and
+% { "zz" * year field.or.null * " " * }
+% 'skip$
+% if$
+% t sortify *
+% }
+% if$
+% }
+% { t sortify * }
+% if$
+% nameptr #1 + 'nameptr :=
+% namesleft #1 - 'namesleft :=
+% }
+% while$
+%}
+%%</natbib>
+%% =====================================
+
+% \end{macrocode}
+% \DescribeFunction{sort.format.title}
+% \begin{macrocode}
+FUNCTION {sort.format.title}
+{ 't :=
+ "A " #2
+ "An " #3
+ "The " #4 t chop.word % Removes "The " if any
+ chop.word % Removes "An " if any
+ chop.word % Removes "A " if any
+ sortify
+ #1 global.max$ substring$
+}
+
+% \end{macrocode}
+% \DescribeFunction{author.sort}
+% \begin{macrocode}
+%% =====================================
+%% This version from old gost package.
+%%
+%<*!natbib>
+FUNCTION {author.sort}
+{ author empty$
+ { key empty$
+ { "to sort, need author or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ {
+ author num.names$ #4 <
+ {author sort.format.names }
+ {title sort.format.title}
+ if$
+ }
+ if$
+}
+%</!natbib>
+%% This version from plainnat.bst
+%<*natbib>
+FUNCTION {author.sort}
+{ author empty$
+ { key empty$
+ { "to sort, need author or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { author sort.format.names }
+ if$
+}
+%</natbib>
+%% =====================================
+
+% \end{macrocode}
+% \DescribeFunction{author.title.sort}
+% \begin{macrocode}
+%<*!natbib|natbib>
+FUNCTION {author.title.sort}
+{ author empty$
+ { title empty$
+ { key empty$
+ { "to sort, need author, title, or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { title sort.format.title }
+ if$
+ }
+ {
+ author num.names$ #4 <
+ {author sort.format.names }
+ {title sort.format.title}
+ if$
+ }
+ if$
+}
+%</!natbib|natbib>
+%<*natbib|natbib>
+FUNCTION {author.editor.sort}
+{ author empty$
+ { editor empty$
+ { key empty$
+ { "to sort, need author, editor, or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { editor sort.format.names }
+ if$
+ }
+ { author sort.format.names }
+ if$
+}
+
+FUNCTION {author.organization.sort}
+{ author empty$
+ { organization empty$
+ { key empty$
+ { "to sort, need author, organization, or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { "The " #4 organization chop.word sortify }
+ if$
+ }
+ { author sort.format.names }
+ if$
+}
+
+FUNCTION {editor.organization.sort}
+{ editor empty$
+ { organization empty$
+ { key empty$
+ { "to sort, need editor, organization, or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { "The " #4 organization chop.word sortify }
+ if$
+ }
+ { editor sort.format.names }
+ if$
+}
+%</natbib|natbib>
+
+
+% \end{macrocode}
+% \DescribeFunction{presort}
+% Function to compute |sort.key$|.
+% What is the space string \verb*|" "| for?
+% \begin{macrocode}
+%<*!natbib>
+FUNCTION {presort}%#1
+{
+ author.title.sort
+ " "
+ *
+ year field.or.null sortify
+ *
+ " "
+ *
+ title field.or.null
+ sort.format.title
+ *
+ #1 entry.max$ substring$
+ 'sort.key$ :=
+}
+%</!natbib>
+%<*natbib>
+FUNCTION {presort}%#2
+{ calc.label
+ label sortify
+ %author.title.sort
+ " "
+ *
+ % ========= plainnat.bst =========
+% type$ "book" =
+% type$ "inbook" =
+% or
+% 'author.editor.sort
+% { type$ "proceedings" =
+% 'editor.organization.sort
+% { type$ "manual" =
+% 'author.organization.sort
+% 'author.sort
+% if$
+% }
+% if$
+% }
+% if$
+ author.title.sort
+ " "
+ *
+ year field.or.null sortify
+ *
+ " "
+ *
+ %cite$
+ title field.or.null sort.format.title
+ *
+ #1 entry.max$ substring$
+ 'sort.label :=
+ sort.label *
+ % ================================
+ #1 entry.max$ substring$
+ 'sort.key$ :=
+}
+%</natbib>
+%</sort>
+
+%<*!sort>
+%<*natbib>
+INTEGERS { seq.num }
+
+FUNCTION {init.seq}
+{ #0 'seq.num :=}
+
+EXECUTE {init.seq}
+
+FUNCTION {int.to.fix}
+{ "000000000" swap$ int.to.str$ *
+ #-1 #10 substring$
+}
+
+FUNCTION {presort}%#3
+{
+ calc.label % computes label
+ label sortify % initiates sort.label
+ " "
+ *
+ seq.num #1 + 'seq.num := % advance seq.num
+ seq.num int.to.fix % prepend seq.num with 0s
+ 'sort.label := % set sort.label to seq.num
+ sort.label * % append seq.num to label
+ #1 entry.max$ substring$ % cut if too long
+ 'sort.key$ := % set sort.key$
+}
+%</natbib>
+%</!sort>
+
+%<*sort|natbib>
+ITERATE {presort}
+
+SORT
+
+%</sort|natbib>
+
+% \end{macrocode}
+%
+% \subsection{Bibliography list}
+%
+% We need to find longest label to put in into the argument of
+% the |thebibliography| environment. In case of |natbib| options
+% we also need to compute extra suffix for the |year| field if there two or
+% more entries for given label (=author/editor/organization) in that year.
+%
+% Declare global (external) strings used in calculation of the longest label.
+% \begin{macrocode}
+%<!natbib>STRINGS { longest.label }
+%<natbib>STRINGS { longest.label last.label next.extra }
+
+%<!natbib>INTEGERS { number.label longest.label.width }
+%<natbib>INTEGERS { number.label longest.label.width last.extra.num }
+
+% \end{macrocode}
+%
+% \DescribeFunction{initialize.longest.label}
+% Initialize those string.
+% \begin{macrocode}
+%<*!natbib>
+FUNCTION {initialize.longest.label}
+{ "" 'longest.label :=
+ #1 'number.label :=
+ #0 'longest.label.width :=
+}
+%</!natbib>
+%<*natbib>
+FUNCTION {initialize.longest.label}
+{ "" 'longest.label :=
+ #0 int.to.chr$ 'last.label :=
+ "" 'next.extra :=
+ #0 'longest.label.width :=
+ #0 'last.extra.num :=
+ #0 'number.label :=
+}
+%</natbib>
+
+EXECUTE {initialize.longest.label}
+
+% \end{macrocode}
+%
+% \DescribeFunction{initialize.longest.label}
+% Iterate though the list of entries to compute |label|.
+% \begin{macrocode}
+%<*!natbib>
+FUNCTION {forward.pass}
+{ number.label int.to.str$ 'label :=
+ number.label #1 + 'number.label :=
+ label width$ longest.label.width >
+ { label 'longest.label :=
+ label width$ 'longest.label.width :=
+ }
+ 'skip$
+ if$
+}
+%</!natbib>
+%<*natbib>
+FUNCTION {forward.pass}
+{ last.label label =
+ { last.extra.num #1 + 'last.extra.num :=
+ last.extra.num int.to.chr$ 'extra.label :=
+ }
+ { "a" chr.to.int$ 'last.extra.num :=
+ "" 'extra.label :=
+ label 'last.label :=
+ }
+ if$
+ number.label #1 + 'number.label :=
+}
+%</natbib>
+
+ITERATE {forward.pass}
+
+% \end{macrocode}
+%
+% \DescribeFunction{reverse.pass}
+% |Natbib| styles require reverse iteration over all entries.
+% \begin{macrocode}
+%<*natbib>
+FUNCTION {reverse.pass}
+{ next.extra "b" =
+ { "a" 'extra.label := }
+ 'skip$
+ if$
+ extra.label 'next.extra :=
+ extra.label
+ duplicate$ empty$
+ 'skip$
+ { "{\natexlab{" swap$ * "}}" * }
+ if$
+ 'extra.label :=
+ label extra.label * 'label :=
+}
+
+REVERSE {reverse.pass}
+
+FUNCTION {bib.sort.order}
+{ sort.label 'sort.key$ :=
+}
+
+ITERATE {bib.sort.order}
+
+SORT
+%</natbib>
+
+% \end{macrocode}
+% \DescribeFunction{begin.bib}
+% Within |thebibliography| environment we define few formatting macros
+% for user to customize how the reference list is formatted.
+% \changes{v1.2a}{31 Aug 2012}{default for \cs{cyrdash} added}
+% \changes{v0.8}{06 Jun 2003}{macro \cs{BibAnnote} added}
+% \changes{v0.8}{06 Jun 2003}{macro \cs{BibUrl} added}
+% \changes{v0.8}{10 Aug 2003}{macro \cs{BibEmph} added}
+% \begin{macrocode}
+FUNCTION {begin.bib}
+{ "\begin{thebibliography}{" longest.label * "}" * write$ newline$
+ "\def\selectlanguageifdefined#1{" write$ newline$
+ "\expandafter\ifx\csname date#1\endcsname\relax" write$ newline$
+% "\else\language\csname l@#1\endcsname\fi}" write$ newline$
+ "\else\selectlanguage{#1}\fi}" write$ newline$
+ "\providecommand*{\href}[2]{{\small #2}}" write$ newline$
+ "\providecommand*{\url}[1]{{\small #1}}" write$ newline$
+ "\providecommand*{\BibUrl}[1]{\url{#1}}" write$ newline$
+ "\providecommand{\BibAnnote}[1]{}" write$ newline$
+ "\providecommand*{\BibEmph}[1]{#1}" write$ newline$
+%<*modern|!modern>
+ %"\ProvideTextCommandDefault{\cyrdash}{---}" write$ newline$
+ %\DeclareUTFcharacter[\UTFencname]{x2014}{\cyrdash}
+ %"\let\cyrdash\textemdash" write$ newline$
+ %"\ProvideTextCommandDefault{\cyrdash}{\hbox to.8em{--\hss--}}" write$ newline$
+ %"\ProvideTextCommandDefault{\cyrdash}{\textemdash}" write$ newline$
+ "\ProvideTextCommandDefault{\cyrdash}{\iflanguage{russian}{\hbox to.8em{--\hss--}}{\textemdash}}" write$ newline$
+ %%"\ProvideTextCommandDefault{\cyrdash}{%" write$ newline$
+ %%" \iflanguage{russian}{\hbox to.8em{--\hss--}}{%" write$ newline$
+ %%" \iflanguage{ukrainian}{\hbox to.8em{--\hss--}}{\textemdash}}}" write$ newline$
+ "\providecommand*{\BibDash}{\ifdim\lastskip>0pt\unskip\nobreak\hskip.2em plus 0.1em\fi" write$ newline$
+ "\cyrdash\hskip.2em plus 0.1em\ignorespaces}" write$ newline$
+ "\renewcommand{\newblock}{\ignorespaces}" write$ newline$
+%</modern|!modern>
+%<natbib> "\providecommand{\natexlab}[1]{#1}" write$ newline$
+ preamble$ empty$
+ 'skip$
+ { preamble$ write$ newline$ }
+ if$
+}
+
+
+EXECUTE {begin.bib}
+
+EXECUTE {init.state.consts}
+
+ITERATE {call.type$}
+
+% \end{macrocode}
+% \DescribeFunction{end.bib}
+% \begin{macrocode}
+FUNCTION {end.bib}
+{ newline$
+% "\catcode`\/=11" write$ newline$
+ "\end{thebibliography}" write$ newline$
+}
+
+EXECUTE {end.bib}
+
+%</bst>
+% \end{macrocode}
+%
+% That's all, Folks!
+%
+% \PrintChanges
+% \Finale
+%
+% \endinput
diff --git a/biblio/bibtex/contrib/gost/source/gost.ins b/biblio/bibtex/contrib/gost/source/gost.ins
new file mode 100644
index 0000000000..e7a41aeab8
--- /dev/null
+++ b/biblio/bibtex/contrib/gost/source/gost.ins
@@ -0,0 +1,81 @@
+ \input docstrip
+
+\keepsilent
+
+\preamble
+
+This file may be distributed and/or modified under the
+conditions of the LaTeX Project Public License, either version 1.3
+of this license or (at your option) any later version.
+The latest version of this license is in
+ http://www.latex-project.org/lppl.txt
+and version 1.3 or later is part of all distributions of LaTeX
+version 2005/12/01 or later.
+
+This file has the LPPL maintenance status "maintained".
+Maintained by Igor A. Kotelnikov.
+
+Current version: 1.2j, 2017.01.12
+
+Please, send bug report via e-mail:
+ kia999 at mail dot ru <Igor Kotelnikov>
+or
+ polyama at yahoo dot com <Maksym Polyakov>
+
+\endpreamble
+
+\def\mypostamble{%
+ \MetaPrefix ^^J%
+ \MetaPrefix\space End of file `\outFileName'.%
+ }
+\usepostamble\mypostamble
+\askonceonly
+\generate{%
+%
+% BST styles that mimics obsoleate version of GOST 7.8.0 for bibliographic *records*
+ \file{gost780.bst} {\from{gost.dtx} {bst}}
+%
+% BST styles that mimics GOST 7.1-2003 for bibliographic *catalogs*.
+ \file{gost2003.bst} {\from{gost.dtx} {bst,strict,eprint}}
+%
+% BST styles that mimics GOST 7.0.5-2008 for bibliographic *references*
+ \file{gost2008.bst} {\from{gost.dtx} {bst,modern,eprint}}
+ \file{gost2008l.bst} {\from{gost.dtx} {bst,modern,eprint,long}}
+%
+% Same style with sorting
+ \file{gost780s.bst} {\from{gost.dtx} {bst,sort}}
+%
+ \file{gost2003s.bst} {\from{gost.dtx} {bst,strict,eprint,sort}}
+%
+ \file{gost2008s.bst} {\from{gost.dtx} {bst,modern,eprint,sort}}
+ \file{gost2008ls.bst} {\from{gost.dtx} {bst,modern,eprint,long,sort}}
+% `
+% -----------------------------------------------------------------------------------------
+% Unicode BST styles that mimics obsolete version of GOST 7.8.0 for bibliographic *records*
+% \file{ugost780.bst} {\from{gost.dtx} {bst,utf8}}
+%
+% Unicode BST styles that mimics GOST 7.1-2003 for bibliographic *catalogs*.
+ \file{ugost2003.bst} {\from{gost.dtx} {bst,utf8,strict,eprint}}
+%
+% Unicode BST styles that mimics GOST 7.0.5-2008 for bibliographic *references*
+ \file{ugost2008.bst} {\from{gost.dtx} {bst,utf8,modern,eprint}}
+ \file{ugost2008l.bst} {\from{gost.dtx} {bst,utf8,modern,eprint,long}}
+%
+% Same style with sorting
+% \file{ugost780s.bst} {\from{gost.dtx} {bst,utf8,sort}}
+%
+ \file{ugost2003s.bst} {\from{gost.dtx} {bst,utf8,strict,eprint,sort}}
+%
+ \file{ugost2008s.bst} {\from{gost.dtx} {bst,utf8,modern,eprint,sort}}
+ \file{ugost2008ls.bst} {\from{gost.dtx} {bst,utf8,modern,eprint,longlist,sort}}
+%
+% -----------------------------------------------------------------------------------------
+% Experimental style compatible with natbib package.
+%
+ \file{gost2008n.bst} {\from{gost.dtx} {bst,modern,natbib,eprint}}
+ \file{gost2008ns.bst} {\from{gost.dtx} {bst,modern,natbib,eprint,sort}}
+%
+ \file{ugost2008n.bst} {\from{gost.dtx} {bst,utf8,modern,natbib,eprint}}
+ \file{ugost2008ns.bst} {\from{gost.dtx} {bst,utf8,modern,natbib,eprint,sort}}
+}
+\endbatchfile
diff --git a/biblio/bibtex/contrib/ijqc/README b/biblio/bibtex/contrib/ijqc/README
new file mode 100644
index 0000000000..1352feaf52
--- /dev/null
+++ b/biblio/bibtex/contrib/ijqc/README
@@ -0,0 +1,35 @@
+ijqc.bst is a BibTeX style file to support publication in
+Wiley's International Journal of Quantum Chemistry. It is not in any way
+officially endorsed by the publisher or editors, and provided without
+any warranty one could ever think of.
+
+Source Files:
+
+README - this file here
+ijqc.bst - the main style file. To be copied into a directory where
+ BSTINPUTS will find it. This is the only file that is worth
+ saving.
+mybib.bib - the BibTeX database used in xampl.tex. Some entries are
+ willfully crumpled to expose how bibtex reacts to this; see
+ xampl.blg.
+xampl.tex - the LaTeX source code that demonstrates the references rendered
+ by ijqc.bst
+
+Documentation:
+
+xampl.pdf - the human readable output generated by running
+ bibtex and pdflatex over xampl.tex
+xampl.ps - the human readable output generated by running
+ bibtex and latex over xampl.tex
+makefile - an auxiliary makefile
+
+Temporary Files:
+
+xampl.aux - generated by pdflatex
+xampl.bbl - bibliography generated by bibtex
+xampl.blg - comments (errors, warnings) generated by bibtex
+xampl.log - runtime report generated by pdflatex
+
+
+Richard J. Mathar, http://www.strw.leidenuniv.nl/~mathar
+2006-12-06
diff --git a/biblio/bibtex/contrib/ijqc/ijqc.bst b/biblio/bibtex/contrib/ijqc/ijqc.bst
new file mode 100644
index 0000000000..3f747cd98b
--- /dev/null
+++ b/biblio/bibtex/contrib/ijqc/ijqc.bst
@@ -0,0 +1,1252 @@
+%%% ====================================================================
+%%% @BibTeX-style-file{
+%%% filename = "ijqc.bst",
+%%% version = "1.2",
+%%% date = "December 6, 2006",
+%%% ISO-date = "2006.12.06",
+%%% time = "00:00:00 CET",
+%%% author = "Richard J Mathar",
+%%% address = "Sterrewacht, Universiteit Leiden,
+%%% Postbus 9513,
+%%% 2300RA Leiden,
+%%% The Netherlands",
+%%% telephone = "(+31)71-527-8459",
+%%% FAX = "(+31)71-527-5819",
+%%% email = "mathar %! at !% strw.leidenuniv.nl (Internet)",
+%%% copyright = " This generated file can be redistributed and/or
+%%% modified under the terms of the LaTeX Project Public
+%%% License Distributed from CTAN archives in directory
+%%% macros/latex/base/lppl.txt; either version 1 of the
+%%% License, or any later version.",
+%%% codetable = "ISO/ASCII",
+%%% keywords = "bibtex, bibliography, Wile, IJQC",
+%%% abstract = "BibTeX bibliography style `ijqc' for BibTeX
+%%% versions 0.99a or later and LaTeX version 2e.
+%%% Produces items in a form close to the style
+%%% of the International Journal of Quantum Chemistry,
+%%% http://www3.interscience.wiley.com/cgi-bin/jhome/29830.",
+%%% docstring = "Generated with the help of latex makebst.tex.
+%%% To be replaced by any official Wiley file whence available.
+%%% Author names are given with surnames first, followed
+%%% by initials, separated by semicolons. Journal titles
+%%% loose their dots."
+%%% }
+%%% ====================================================================
+
+%%
+%% This is file `ijqc.bst',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% merlin.mbs (with options: `seq-no,nm-rev,ed-rev,aunm-semi,dt-jnl,xmth,jtit-x,jxper,jttl-rm,vnum-x,volp-com,pgsep-s,pp-last,num-xser,jnm-x,btit-rm,bt-rm,pre-pub,blk-com,blknt,pp,ed,abr,ednx,xedn,jabr,amper,xand,em-x,nfss')
+%% ----------------------------------------
+%% *** Int. J. Quantum Chem. ***
+%%
+%% Copyright 1994-2002 Patrick W Daly
+ % ===============================================================
+ % IMPORTANT NOTICE:
+ % This bibliographic style (bst) file has been generated from one or
+ % more master bibliographic style (mbs) files, listed above.
+ %
+ % This generated file can be redistributed and/or modified under the terms
+ % of the LaTeX Project Public License Distributed from CTAN
+ % archives in directory macros/latex/base/lppl.txt; either
+ % version 1 of the License, or any later version.
+ % ===============================================================
+ % Name and version information of the main mbs file:
+ % \ProvidesFile{merlin.mbs}[2002/10/21 4.05 (PWD, AO, DPC)]
+ % For use with BibTeX version 0.99a or later
+ %-------------------------------------------------------------------
+ % This bibliography style file is intended for texts in ENGLISH
+ % This is a numerical citation style, and as such is standard LaTeX.
+ % It requires no extra package to interface to the main text.
+ % The form of the \bibitem entries is
+ % \bibitem{key}...
+ % Usage of \cite is as follows:
+ % \cite{key} ==>> [#]
+ % \cite[chap. 2]{key} ==>> [#, chap. 2]
+ % where # is a number determined by the ordering in the reference list.
+ % The order in the reference list is that by which the works were originally
+ % cited in the text.
+ %---------------------------------------------------------------------
+
+ENTRY
+ { address
+ author
+ booktitle
+ chapter
+ edition
+ editor
+ eprint
+ howpublished
+ institution
+ journal
+ key
+ month
+ note
+ number
+ organization
+ pages
+ publisher
+ school
+ series
+ title
+ type
+ volume
+ year
+ }
+ {}
+ { label }
+INTEGERS { output.state before.all mid.sentence after.sentence after.block }
+FUNCTION {init.state.consts}
+{ #0 'before.all :=
+ #1 'mid.sentence :=
+ #2 'after.sentence :=
+ #3 'after.block :=
+}
+STRINGS { s t}
+FUNCTION {output.nonnull}
+{ 's :=
+ output.state mid.sentence =
+ { " " * write$ }
+ { output.state after.block =
+ { add.period$ write$
+ newline$
+ "\newblock " write$
+ }
+ { output.state before.all =
+ 'write$
+ { add.period$ " " * write$ }
+ if$
+ }
+ if$
+ mid.sentence 'output.state :=
+ }
+ if$
+ s
+}
+FUNCTION {output}
+{ duplicate$ empty$
+ 'pop$
+ 'output.nonnull
+ if$
+}
+FUNCTION {output.check}
+{ 't :=
+ duplicate$ empty$
+ { pop$ "empty " t * " in " * cite$ * warning$ }
+ 'output.nonnull
+ if$
+}
+FUNCTION {fin.entry}
+{ add.period$
+ write$
+ newline$
+}
+
+FUNCTION {new.block}
+{ output.state before.all =
+ 'skip$
+ { after.block 'output.state := }
+ if$
+}
+FUNCTION {new.sentence}
+{ output.state after.block =
+ 'skip$
+ { output.state before.all =
+ 'skip$
+ { after.sentence 'output.state := }
+ if$
+ }
+ if$
+}
+FUNCTION {add.blank}
+{ " " * before.all 'output.state :=
+}
+FUNCTION {add.comma}
+{ ", " * before.all 'output.state :=
+}
+
+FUNCTION {date.block}
+{
+ skip$
+}
+
+FUNCTION {not}
+{ { #0 }
+ { #1 }
+ if$
+}
+FUNCTION {and}
+{ 'skip$
+ { pop$ #0 }
+ if$
+}
+FUNCTION {or}
+{ { pop$ #1 }
+ 'skip$
+ if$
+}
+STRINGS {z}
+FUNCTION {remove.dots}
+{ 'z :=
+ ""
+ { z empty$ not }
+ { z #1 #1 substring$
+ z #2 global.max$ substring$ 'z :=
+ duplicate$ "." = 'pop$
+ { * }
+ if$
+ }
+ while$
+}
+FUNCTION {new.block.checka}
+{ empty$
+ 'skip$
+ 'new.block
+ if$
+}
+FUNCTION {new.block.checkb}
+{ empty$
+ swap$ empty$
+ and
+ 'skip$
+ 'new.block
+ if$
+}
+FUNCTION {new.sentence.checka}
+{ empty$
+ 'skip$
+ 'new.sentence
+ if$
+}
+FUNCTION {new.sentence.checkb}
+{ empty$
+ swap$ empty$
+ and
+ 'skip$
+ 'new.sentence
+ if$
+}
+FUNCTION {field.or.null}
+{ duplicate$ empty$
+ { pop$ "" }
+ 'skip$
+ if$
+}
+FUNCTION {tie.or.space.prefix}
+{ duplicate$ text.length$ #3 <
+ { "~" }
+ { " " }
+ if$
+ swap$
+}
+
+FUNCTION {capitalize}
+{ "u" change.case$ "t" change.case$ }
+
+FUNCTION {space.word}
+{ " " swap$ * " " * }
+ % Here are the language-specific definitions for explicit words.
+ % Each function has a name bbl.xxx where xxx is the English word.
+ % The language selected here is ENGLISH
+FUNCTION {bbl.and}
+{ "and"}
+
+FUNCTION {bbl.etal}
+{ "et~al." }
+
+FUNCTION {bbl.editors}
+{ "Eds." }
+
+FUNCTION {bbl.editor}
+{ "Ed." }
+
+FUNCTION {bbl.edby}
+{ "edited by" }
+
+FUNCTION {bbl.edition}
+{ "ed." }
+
+FUNCTION {bbl.volume}
+{ "vol." }
+
+FUNCTION {bbl.of}
+{ "of" }
+
+FUNCTION {bbl.number}
+{ "no." }
+
+FUNCTION {bbl.nr}
+{ "no." }
+
+FUNCTION {bbl.in}
+{ "In" }
+
+FUNCTION {bbl.pages}
+{ "pp." }
+
+FUNCTION {bbl.page}
+{ "p." }
+
+FUNCTION {bbl.chapter}
+{ "chap." }
+
+FUNCTION {bbl.techrep}
+{ "Tech. Rep." }
+
+FUNCTION {bbl.mthesis}
+{ "Master's thesis" }
+
+FUNCTION {bbl.phdthesis}
+{ "Ph.D. thesis" }
+
+MACRO {jan} {"Jan."}
+
+MACRO {feb} {"Feb."}
+
+MACRO {mar} {"Mar."}
+
+MACRO {apr} {"Apr."}
+
+MACRO {may} {"May"}
+
+MACRO {jun} {"Jun."}
+
+MACRO {jul} {"Jul."}
+
+MACRO {aug} {"Aug."}
+
+MACRO {sep} {"Sep."}
+
+MACRO {oct} {"Oct."}
+
+MACRO {nov} {"Nov."}
+
+MACRO {dec} {"Dec."}
+
+MACRO {acmcs} {"ACM Comput. Surv."}
+
+MACRO {acta} {"Acta Inf."}
+
+MACRO {cacm} {"Commun. ACM"}
+
+MACRO {ibmjrd} {"IBM J. Res. Dev."}
+
+MACRO {ibmsj} {"IBM Syst.~J."}
+
+MACRO {ieeese} {"IEEE Trans. Software Eng."}
+
+MACRO {ieeetc} {"IEEE Trans. Comput."}
+
+MACRO {ieeetcad}
+ {"IEEE Trans. Comput. Aid. Des."}
+
+MACRO {ipl} {"Inf. Process. Lett."}
+
+MACRO {jacm} {"J.~ACM"}
+
+MACRO {jcss} {"J.~Comput. Syst. Sci."}
+
+MACRO {scp} {"Sci. Comput. Program."}
+
+MACRO {sicomp} {"SIAM J. Comput."}
+
+MACRO {tocs} {"ACM Trans. Comput. Syst."}
+
+MACRO {tods} {"ACM Trans. Database Syst."}
+
+MACRO {tog} {"ACM Trans. Graphic."}
+
+MACRO {toms} {"ACM Trans. Math. Software"}
+
+MACRO {toois} {"ACM Trans. Office Inf. Syst."}
+
+MACRO {toplas} {"ACM Trans. Progr. Lang. Syst."}
+
+MACRO {tcs} {"Theor. Comput. Sci."}
+
+FUNCTION {bibinfo.check}
+{ swap$
+ duplicate$ missing$
+ {
+ pop$ pop$
+ ""
+ }
+ { duplicate$ empty$
+ {
+ swap$ pop$
+ }
+ { swap$
+ pop$
+ }
+ if$
+ }
+ if$
+}
+FUNCTION {bibinfo.warn}
+{ swap$
+ duplicate$ missing$
+ {
+ swap$ "missing " swap$ * " in " * cite$ * warning$ pop$
+ ""
+ }
+ { duplicate$ empty$
+ {
+ swap$ "empty " swap$ * " in " * cite$ * warning$
+ }
+ { swap$
+ pop$
+ }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.eprint}
+{ eprint empty$
+ 'skip$
+ { eprint * add.comma }
+ if$
+}
+STRINGS { bibinfo}
+INTEGERS { nameptr namesleft numnames }
+
+FUNCTION {format.names}
+{ 'bibinfo :=
+ duplicate$ empty$ 'skip$ {
+ 's :=
+ "" 't :=
+ #1 'nameptr :=
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ { s nameptr
+ "{vv~}{ll}{, jj}{, f.}"
+ format.name$
+ bibinfo bibinfo.check
+ 't :=
+ nameptr #1 >
+ {
+ namesleft #1 >
+ { "; " * t * }
+ {
+ ";" *
+ s nameptr "{ll}" format.name$ duplicate$ "others" =
+ { 't := }
+ { pop$ }
+ if$
+ t "others" =
+ {
+ " " * bbl.etal *
+ }
+ { " " * t * }
+ if$
+ }
+ if$
+ }
+ 't
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+ } if$
+}
+FUNCTION {format.names.ed}
+{
+ format.names
+}
+FUNCTION {format.authors}
+{ author "author" format.names
+}
+FUNCTION {get.bbl.editor}
+{ editor num.names$ #1 > 'bbl.editors 'bbl.editor if$ }
+
+FUNCTION {format.editors}
+{ editor "editor" format.names duplicate$ empty$ 'skip$
+ {
+ "," *
+ " " *
+ get.bbl.editor *
+ ";" *
+ }
+ if$
+}
+FUNCTION {format.note}
+{
+ note empty$
+ { "" }
+ { note #1 #1 substring$
+ duplicate$ "{" =
+ 'skip$
+ { output.state mid.sentence =
+ { "l" }
+ { "u" }
+ if$
+ change.case$
+ }
+ if$
+ note #2 global.max$ substring$ * "note" bibinfo.check
+ }
+ if$
+}
+
+FUNCTION {format.title}
+{ title
+ duplicate$ empty$ 'skip$
+ { "t" change.case$ }
+ if$
+ "title" bibinfo.check
+}
+FUNCTION {output.bibitem}
+{ newline$
+ "\bibitem{" write$
+ cite$ write$
+ "}" write$
+ newline$
+ ""
+ before.all 'output.state :=
+}
+
+FUNCTION {if.digit}
+{ duplicate$ "0" =
+ swap$ duplicate$ "1" =
+ swap$ duplicate$ "2" =
+ swap$ duplicate$ "3" =
+ swap$ duplicate$ "4" =
+ swap$ duplicate$ "5" =
+ swap$ duplicate$ "6" =
+ swap$ duplicate$ "7" =
+ swap$ duplicate$ "8" =
+ swap$ "9" = or or or or or or or or or
+}
+FUNCTION {n.separate}
+{ 't :=
+ ""
+ #0 'numnames :=
+ { t empty$ not }
+ { t #-1 #1 substring$ if.digit
+ { numnames #1 + 'numnames := }
+ { #0 'numnames := }
+ if$
+ t #-1 #1 substring$ swap$ *
+ t #-2 global.max$ substring$ 't :=
+ numnames #5 =
+ { duplicate$ #1 #2 substring$ swap$
+ #3 global.max$ substring$
+ "\," swap$ * *
+ }
+ 'skip$
+ if$
+ }
+ while$
+}
+FUNCTION {n.dashify}
+{
+ n.separate
+ 't :=
+ ""
+ { t empty$ not }
+ { t #1 #1 substring$ "-" =
+ { t #1 #2 substring$ "--" = not
+ { "--" *
+ t #2 global.max$ substring$ 't :=
+ }
+ { { t #1 #1 substring$ "-" = }
+ { "-" *
+ t #2 global.max$ substring$ 't :=
+ }
+ while$
+ }
+ if$
+ }
+ { t #1 #1 substring$ *
+ t #2 global.max$ substring$ 't :=
+ }
+ if$
+ }
+ while$
+}
+
+FUNCTION {word.in}
+{ bbl.in
+ " " * }
+
+FUNCTION {format.date}
+{
+ ""
+ duplicate$ empty$
+ year "year" bibinfo.check duplicate$ empty$
+ { swap$ 'skip$
+ { "there's a month but no year in " cite$ * warning$ }
+ if$
+ *
+ }
+ { swap$ 'skip$
+ {
+ swap$
+ ", " * swap$
+ }
+ if$
+ *
+ }
+ if$
+}
+FUNCTION {format.btitle}
+{
+ title "title" bibinfo.check
+ %booktitle "booktitle" bibinfo.check
+ duplicate$ empty$ 'skip$
+ {
+ }
+ if$
+}
+FUNCTION {either.or.check}
+{ empty$
+ 'pop$
+ { "can't use both " swap$ * " fields in " * cite$ * warning$ }
+ if$
+}
+FUNCTION {format.bvolume}
+{ volume empty$
+ { "" }
+ { " " * bbl.volume volume tie.or.space.prefix
+ "volume" bibinfo.check * *
+ series "series" bibinfo.check
+ duplicate$ empty$ 'pop$
+ { swap$ bbl.of space.word * swap$
+ * }
+ if$
+ "volume and number" number either.or.check
+ }
+ if$
+}
+FUNCTION {format.number.series}
+{ volume empty$
+ { number empty$
+ { series field.or.null }
+ { series empty$
+ { number "number" bibinfo.check }
+ { output.state mid.sentence =
+ { bbl.number }
+ { bbl.number capitalize }
+ if$
+ number tie.or.space.prefix "number" bibinfo.check * *
+ bbl.in space.word *
+ series "series" bibinfo.check *
+ }
+ if$
+ }
+ if$
+ }
+ { "" }
+ if$
+}
+
+FUNCTION {format.edition}
+{ edition duplicate$ empty$ 'skip$
+ {
+ output.state mid.sentence =
+ { "l" }
+ { "t" }
+ if$ change.case$
+ "edition" bibinfo.check
+ " " * bbl.edition *
+ }
+ if$
+}
+INTEGERS { multiresult }
+FUNCTION {multi.page.check}
+{ 't :=
+ #0 'multiresult :=
+ { multiresult not
+ t empty$ not
+ and
+ }
+ { t #1 #1 substring$
+ duplicate$ "-" =
+ swap$ duplicate$ "," =
+ swap$ "+" =
+ or or
+ { #1 'multiresult := }
+ { t #2 global.max$ substring$ 't := }
+ if$
+ }
+ while$
+ multiresult
+}
+FUNCTION {first.page}
+{ 't :=
+ ""
+ { t empty$ not t #1 #1 substring$ "-" = not and }
+ { t #1 #1 substring$ *
+ t #2 global.max$ substring$ 't :=
+ }
+ while$
+}
+FUNCTION {format.pages}
+{ pages duplicate$ empty$ 'skip$
+ {
+ bbl.page swap$
+ first.page
+ tie.or.space.prefix
+ "pages" bibinfo.check
+ * *
+ }
+ if$
+}
+FUNCTION {format.journal.pages}
+{ pages duplicate$ empty$ 'pop$
+ { swap$ duplicate$ empty$
+ { pop$ pop$ format.pages }
+ {
+ ", " *
+ swap$
+ % one of the following: either including or excluding last page
+ %n.dashify
+ first.page
+ "pages" bibinfo.check
+ *
+ }
+ if$
+ }
+ if$
+}
+FUNCTION {format.vol.num.pages}
+{ volume field.or.null
+ duplicate$ empty$ 'skip$
+ {
+ "volume" bibinfo.check
+ }
+ if$
+}
+
+FUNCTION {format.chapter.pages}
+{ chapter empty$
+ { "" }
+ { type empty$
+ { bbl.chapter }
+ { type "l" change.case$
+ "type" bibinfo.check
+ }
+ if$
+ chapter tie.or.space.prefix
+ "chapter" bibinfo.check
+ * *
+ }
+ if$
+}
+
+FUNCTION {format.booktitle}
+{
+ booktitle "booktitle" bibinfo.check
+}
+FUNCTION {format.in.ed.booktitle}
+{
+ format.booktitle duplicate$ empty$ 'skip$
+ {
+ editor empty$
+ 'skip$
+ { "; " * format.editors * }
+ if$
+ }
+ if$
+}
+FUNCTION {format.in.booktitle.ed}
+{
+ format.booktitle duplicate$ empty$
+ 'skip$
+ {
+ word.in swap$ *
+ format.bvolume *
+ "; " *
+ editor empty$
+ 'skip$
+ { format.editors * }
+ if$
+ }
+ if$
+}
+FUNCTION {empty.misc.check}
+{ author empty$ title empty$ howpublished empty$
+ month empty$ year empty$ note empty$
+ and and and and and
+ { "all relevant fields are empty in " cite$ * warning$ }
+ 'skip$
+ if$
+}
+FUNCTION {format.thesis.type}
+{ type duplicate$ empty$
+ 'pop$
+ { swap$ pop$
+ "t" change.case$ "type" bibinfo.check
+ }
+ if$
+}
+FUNCTION {format.tr.number}
+{ number "number" bibinfo.check
+ type duplicate$ empty$
+ { pop$ bbl.techrep }
+ 'skip$
+ if$
+ "type" bibinfo.check
+ swap$ duplicate$ empty$
+ { pop$ "t" change.case$ }
+ { tie.or.space.prefix * * }
+ if$
+}
+FUNCTION {format.article.crossref}
+{
+ key duplicate$ empty$
+ { pop$
+ journal duplicate$ empty$
+ { "need key or journal for " cite$ * " to crossref " * crossref * warning$ }
+ { "journal" bibinfo.check word.in swap$ * }
+ if$
+ }
+ { word.in swap$ * " " *}
+ if$
+ " \cite{" * crossref * "}" *
+}
+FUNCTION {format.crossref.editor}
+{ editor #1 "{vv~}{ll}" format.name$
+ "editor" bibinfo.check
+ editor num.names$ duplicate$
+ #2 >
+ { pop$
+ "editor" bibinfo.check
+ " " * bbl.etal
+ *
+ }
+ { #2 <
+ 'skip$
+ { editor #2 "{ff }{vv }{ll}{ jj}" format.name$ "others" =
+ {
+ "editor" bibinfo.check
+ " " * bbl.etal
+ *
+ }
+ {
+ " \& "
+ * editor #2 "{vv~}{ll}" format.name$
+ "editor" bibinfo.check
+ *
+ }
+ if$
+ }
+ if$
+ }
+ if$
+}
+FUNCTION {format.book.crossref}
+{ volume duplicate$ empty$
+ { "empty volume in " cite$ * "'s crossref of " * crossref * warning$
+ pop$ word.in
+ }
+ { bbl.volume
+ swap$ tie.or.space.prefix "volume" bibinfo.check * * bbl.of space.word *
+ }
+ if$
+ editor empty$
+ editor field.or.null author field.or.null =
+ or
+ { key empty$
+ { series empty$
+ { "need editor, key, or series for " cite$ * " to crossref " *
+ crossref * warning$
+ "" *
+ }
+ { series * }
+ if$
+ }
+ { key * }
+ if$
+ }
+ { format.crossref.editor * }
+ if$
+ " \cite{" * crossref * "}" *
+}
+FUNCTION {format.incoll.inproc.crossref}
+{
+ editor empty$
+ editor field.or.null author field.or.null =
+ or
+ { key empty$
+ { format.booktitle duplicate$ empty$
+ { "need editor, key, or booktitle for " cite$ * " to crossref " *
+ crossref * warning$
+ }
+ { word.in swap$ * }
+ if$
+ }
+ { word.in key * " " *}
+ if$
+ }
+ { word.in format.crossref.editor * " " *}
+ if$
+ " \cite{" * crossref * "}" *
+}
+FUNCTION {format.org.or.pub}
+{ 't :=
+ ""
+ address empty$ t empty$ and
+ 'skip$
+ {
+ t empty$
+ { address "address" bibinfo.check *
+ }
+ { t *
+ address empty$
+ 'skip$
+ { ": " * address "address" bibinfo.check * }
+ if$
+ }
+ if$
+ }
+ if$
+}
+FUNCTION {format.publisher.address}
+{ publisher "publisher" bibinfo.warn format.org.or.pub
+}
+
+FUNCTION {format.organization.address}
+{ organization "organization" bibinfo.check format.org.or.pub
+}
+
+FUNCTION {article}
+{ output.bibitem
+ format.authors "author" output.check
+ crossref missing$
+ {
+ journal empty$
+ { add.blank format.eprint
+ }
+ {
+ journal
+ remove.dots
+ "journal" bibinfo.check
+ "journal" output.check
+ add.blank
+ }
+ if$
+
+ format.date "year" output.check
+
+ pages empty$
+ 'skip$
+ { add.comma date.block format.vol.num.pages output
+ }
+ if$
+ }
+ { format.article.crossref output.nonnull
+ }
+ if$
+ format.journal.pages
+ new.sentence
+ format.note output
+ fin.entry
+}
+FUNCTION {book}
+{ output.bibitem
+ author empty$
+ { format.editors "author and editor" output.check
+ }
+ { format.authors output.nonnull
+ crossref missing$
+ { "author and editor" editor either.or.check }
+ 'skip$
+ if$
+ }
+ if$
+ format.btitle "title" output.check
+ ";" *
+ crossref missing$
+ { format.bvolume output
+ format.number.series output
+ format.publisher.address output
+ }
+ {
+ format.book.crossref output.nonnull
+ }
+ if$
+ %format.edition output
+ "," *
+ format.date "year" output.check
+ new.sentence
+ format.note output
+ fin.entry
+}
+FUNCTION {booklet}
+{ output.bibitem
+ format.authors output
+ format.title "title" output.check
+ howpublished "howpublished" bibinfo.check output
+ address "address" bibinfo.check output
+ format.date output
+ new.sentence
+ format.note output
+ fin.entry
+}
+
+FUNCTION {inbook}
+{ output.bibitem
+ author empty$
+ 'skip$
+ { format.authors output.nonnull
+ }
+ if$
+ format.in.booktitle.ed output.nonnull
+ crossref missing$
+ {
+ format.number.series output
+ format.publisher.address output
+ }
+ {
+ format.book.crossref output.nonnull
+ }
+ if$
+ ", " *
+ format.date "year" output.check
+ pages empty$
+ 'skip$
+ { "; " * format.pages "pages" output.check
+ }
+ if$
+ new.sentence
+ format.note output
+ fin.entry
+}
+
+FUNCTION {incollection}
+{ output.bibitem
+ format.authors "author" output.check
+ crossref missing$
+ { format.in.ed.booktitle "booktitle" output.check
+ format.publisher.address output
+ format.bvolume output
+ format.number.series output
+ format.edition output
+ year empty$
+ 'skip$
+ { ", " add.blank format.date * output
+ }
+ if$
+ }
+ { format.incoll.inproc.crossref output.nonnull
+ }
+ if$
+ pages empty$
+ 'skip$
+ { "; " * format.pages "pages" output.check }
+ if$
+ new.sentence
+ format.note output
+ fin.entry
+}
+FUNCTION {inproceedings}
+{ output.bibitem
+ format.authors "author" output.check
+ crossref missing$
+ { format.in.ed.booktitle "booktitle" output.check
+ publisher empty$
+ { format.organization.address output }
+ { organization "organization" bibinfo.check output
+ format.publisher.address output
+ }
+ if$
+ format.bvolume output
+ format.number.series output
+ year empty$
+ 'skip$
+ { add.period$ " " format.date * output }
+ if$
+ }
+ { format.incoll.inproc.crossref output.nonnull
+ }
+ if$
+
+ pages empty$
+ 'skip$
+ { "; " * format.pages "pages" output.check }
+ if$
+ new.sentence
+ format.note output
+ fin.entry
+}
+FUNCTION {conference} { inproceedings }
+FUNCTION {manual}
+{ output.bibitem
+ author empty$
+ { organization "organization" bibinfo.check
+ duplicate$ empty$ 'pop$
+ { output
+ address "address" bibinfo.check output
+ }
+ if$
+ }
+ { format.authors output.nonnull }
+ if$
+ format.btitle "title" output.check
+ author empty$
+ { organization empty$
+ {
+ address "address" bibinfo.check output
+ }
+ 'skip$
+ if$
+ }
+ {
+ organization "organization" bibinfo.check output
+ address "address" bibinfo.check output
+ }
+ if$
+ format.edition output
+ format.date output
+ new.sentence
+ format.note output
+ fin.entry
+}
+
+FUNCTION {mastersthesis}
+{ output.bibitem
+ format.authors "author" output.check
+ format.btitle
+ "title" output.check
+ "; " *
+ bbl.mthesis format.thesis.type output.nonnull
+ school "school" bibinfo.warn output
+ address "address" bibinfo.check output
+ ", " *
+ format.date "year" output.check
+ new.sentence
+ format.note output
+ fin.entry
+}
+
+FUNCTION {misc}
+{ output.bibitem
+ format.authors output
+ format.title output
+ howpublished "howpublished" bibinfo.check output
+ format.date output
+ new.sentence
+ format.note output
+ fin.entry
+ empty.misc.check
+}
+FUNCTION {phdthesis}
+{ output.bibitem
+ format.authors "author" output.check
+ format.btitle
+ "title" output.check
+ "; " *
+ bbl.phdthesis format.thesis.type output.nonnull
+ school "school" bibinfo.warn output
+ address "address" bibinfo.check output
+ ", " *
+ format.date "year" output.check
+ new.sentence
+ format.note output
+ fin.entry
+}
+
+FUNCTION {proceedings}
+{ output.bibitem
+ editor empty$
+ { organization "organization" bibinfo.check output
+ }
+ { format.editors output.nonnull }
+ if$
+ format.btitle "title" output.check
+ format.bvolume output
+ format.number.series output
+ editor empty$
+ { publisher empty$
+ 'skip$
+ {
+ format.publisher.address output
+ }
+ if$
+ }
+ { publisher empty$
+ {
+ format.organization.address output }
+ {
+ organization "organization" bibinfo.check output
+ format.publisher.address output
+ }
+ if$
+ }
+ if$
+ format.date "year" output.check
+ new.sentence
+ format.note output
+ fin.entry
+}
+
+FUNCTION {techreport}
+{ output.bibitem
+ format.authors "author" output.check
+ format.title
+ "title" output.check
+ format.tr.number output.nonnull
+ institution "institution" bibinfo.warn output
+ address "address" bibinfo.check output
+ format.date "year" output.check
+ new.sentence
+ format.note output
+ fin.entry
+}
+
+FUNCTION {unpublished}
+{ output.bibitem
+ format.authors "author" output.check
+ format.title "title" output.check
+ format.date output
+ new.sentence
+ format.note "note" output.check
+ fin.entry
+}
+
+FUNCTION {default.type} { misc }
+READ
+STRINGS { longest.label }
+INTEGERS { number.label longest.label.width }
+FUNCTION {initialize.longest.label}
+{ "" 'longest.label :=
+ #1 'number.label :=
+ #0 'longest.label.width :=
+}
+FUNCTION {longest.label.pass}
+{ number.label int.to.str$ 'label :=
+ number.label #1 + 'number.label :=
+ label width$ longest.label.width >
+ { label 'longest.label :=
+ label width$ 'longest.label.width :=
+ }
+ 'skip$
+ if$
+}
+EXECUTE {initialize.longest.label}
+ITERATE {longest.label.pass}
+FUNCTION {begin.bib}
+{ preamble$ empty$
+ 'skip$
+ { preamble$ write$ newline$ }
+ if$
+ "\begin{thebibliography}{" longest.label * "}" *
+ write$ newline$
+}
+EXECUTE {begin.bib}
+EXECUTE {init.state.consts}
+ITERATE {call.type$}
+FUNCTION {end.bib}
+{ newline$
+ "\end{thebibliography}" write$ newline$
+}
+EXECUTE {end.bib}
+%% End of customized bst file
+%%
+%% End of file `ijqc.bst'.
diff --git a/biblio/bibtex/contrib/ijqc/makefile b/biblio/bibtex/contrib/ijqc/makefile
new file mode 100644
index 0000000000..a533c88566
--- /dev/null
+++ b/biblio/bibtex/contrib/ijqc/makefile
@@ -0,0 +1,45 @@
+.SUFFIXES: .ps .dvi .tex .pdf .gz .eps
+
+.dvi.ps :
+ dvips -K -t letter $*
+ gv $@
+
+.tex.ps :
+ make $*.dvi
+ make $*.ps
+
+.tex.pdf :
+ pdflatex $*
+ - while ( fgrep -s Rerun $*.log ) ; do \
+ pdflatex $* ; \
+ done
+
+.tex.dvi :
+ - until ( latex $* ) ; do \
+ continue ; \
+ done
+ - while ( fgrep -s 'No file $*' $*.log ) ; do \
+ latex $* ; \
+ done
+ - while ( fgrep -s Rerun $*.log ) ; do \
+ latex $* ; \
+ done
+
+all: xampl.pdf
+ acroread -geometry 700x1000 $<
+
+xampl.pdf: xampl.bbl
+ pdflatex xampl
+ - while ( fgrep -s Rerun $*.log ) ; do \
+ pdflatex xampl ; \
+ done
+
+xampl.bbl: xampl.tex mybib.bib
+ # latex xampl
+ pdflatex xampl
+ bibtex -terse xampl
+
+xampl.ps: xampl.dvi xampl.bbl
+
+clean:
+ rm *.bbl *.blg *.dvi *.aux *.log xampl.ps
diff --git a/biblio/bibtex/contrib/ijqc/mybib.bib b/biblio/bibtex/contrib/ijqc/mybib.bib
new file mode 100644
index 0000000000..0d7dee20ff
--- /dev/null
+++ b/biblio/bibtex/contrib/ijqc/mybib.bib
@@ -0,0 +1,1175 @@
+@comment { Created by Richard J. Mathar for the purpose of providing
+ an input to ijqc.bst. Not any source of accurate, reliable or real
+ articles or sources of information.
+}
+
+@article{Abate,
+author = {J. Abate and H. Dubner},
+title = {A new method for generating the power series expansions of functions},
+journal = {SIAM J.\ Numer.\ Anal.},
+volume = 5,
+number = 1,
+year = {1968},
+pages = {102--112}}
+
+@article{AbeAAp374,
+author={L. Abe and F. Vakili and A. Boccaletti},
+title={The achromatic phase knife coronograph},
+journal={Astron.\ Astrophys.},
+volume=374,
+number=3,
+annote={see also Astron Astrophys 400, 385 (2003) for followup lab tests},
+pages={1161},
+year=2001}
+
+@book{AS,
+editor = {Milton Abramowitz and Irene A. Stegun},
+title = {Handbook of Mathematical Functions},
+edition = {9th},
+publisher = {Dover Publications},
+year = {1972},
+isbn = {0-486-61272-4},
+address = {New York}}
+
+@article{Adler1962,
+author={S. L. Adler},
+journal={Phys.\ Rev.},
+volume=126,
+pages=413,
+year=1962}
+
+@article{Adler,
+author={Steven M. Aderl-Golden and Stephen R. Langhoff and Charles W. {Bauschlicher Jr} and Grad D. Carney},
+title={Theoretical calculation of ozone vibrational infrared intensities},
+journal={J. Chem.\ Phys.},
+volume= 83,
+number= 1,
+pages={255--264},
+year=1985}
+
+@inproceedings{AkesonSPIE4006,
+author={Rachel L. Akeson and Mark R. Swain and Mark M. Colavita},
+title={Differential phase technique with the {K}eck Interferometer},
+series={Proc.\ SPIE},
+editor={Pierre J. Lena and Andreas Quirrenbach},
+publisher={Int.\ Soc.\ Optical Engineering},
+booktitle={Interferometry in Optical Astronomy},
+volume=4006,
+pages={321--327},
+year=2000}
+
+@article{AlbrechtTheoChemAcc107,
+author={Martin Albrecht},
+journal={Theor.\ Chem.\ Acc.},
+title={Local-orbital-based correlated ab initio band structure calculations in insulating
+solids: LiF},
+volume=107,
+pages={71--79},
+note = {The last author V. R. Saunders is missing in Ref.\ 36.},
+year=2002}
+
+@inproceedings{AlbrechtSPIE5491,
+author={Simon Albrecht and Eric J. Bakker and Jeroen A. {de Jong} and Robert N. Tubbs and Jeffrey Meisner
+and Rudolf {le Poole}},
+title={Calibration of temperature and relative humidity sensors for
+use on the {VLT}-{I}nterferometer},
+series={Proc.\ SPIE},
+editor={Wesley A. Traub},
+publisher={Int.\ Soc.\ Optical Engineering},
+booktitle={New Frontiers in Stellar Interferometry},
+volume=5491,
+pages={1266--1273},
+year=2004}
+
+@article{AlfaroJCompApplMath99,
+author = {Manuel Alfaro and Mar\'{\i}a Jos\'e Cantero and Leandro Moral},
+title = {Semiorthogonal functions and orthogonal polynomials on the unit circle},
+journal = {J. Comp.\ Appl.\ Math.},
+volume = {99},
+number = 1,
+year = {1998},
+pages = {3--14}}
+
+@inproceedings{AnkerstSIGMOD99,
+author = {Mihael Ankerst and Markus M. Breunig and Hans-Peter Kriegel and J\"org Sander},
+title = {{OPTICS}: Ordering Points To Identify the Clustering Structure},
+booktitle = {Proc. {ACM} {SIGMOD}'99 Int.\ Conf.\ Management of Data},
+year = {1999}}
+
+@article{Arakane,
+author = {Fusanori Arakane and Osamu Matsuoka},
+title = {Recurrence formulas for molecular integrals over {L}aguerre {G}aussian-type functions},
+journal = {Int.\ J. Quant.\ Chem.},
+volume = {66},
+number = 4,
+year = {1998},
+pages = {273--279}}
+
+@article{Archer,
+author={D. G. Archer and P. Wang},
+title={The dielectric constant of Water and {D}ebye-{H}\"uckel Limiting Law Slopes},
+journal={J. Phys.\ Chem.\ Ref.\ Data},
+volume={19},
+pages={371--411},
+year={1990}}
+
+@phdthesis{darcio99,
+author = {L. A. D'Arcio},
+title = {Selected aspects of wide-field stellar interferometry},
+year = 1999,
+school = {Technische Universiteit Delft}
+}
+
+@inproceedings{Avila,
+author={Remy Avila and Elena Masciadri and Leonardo J. S\'anchez and Jean Vernin
+and Alejandro Raga},
+title={Vertical Distribution of Temporal Correlation of Optical Turbulence},
+series={Proc.\ SPIE},
+editor={Peter L. Wizinowich and Domenico Bonaccini},
+publisher={Int.\ Soc.\ Optical Engineering},
+booktitle={Adaptive Optical System Technologies {II}},
+volume=4839,
+pages={792--800},
+year=2002}
+
+
+@article{Baldiniarxiv04,
+author={A. Baldini and C. Bemporad and F. Cei and T. Doke and M. Grassi and
+T. Haruyama and S. Mihara anad T. Mori and D. Nicol\'o and H. Nishiguchi
+and W. Ootani and K. Ozone and A. Papa and R. Pazzi and R. Sawada and F. Sergiampietri and G. Signorelli
+and S. Suzuki and K. Terasawa},
+journal={arXiv:physics/040172},
+title={Liquid {X}e scintiallation calorimetry and {X}e optical properties},
+year=2004}
+
+@inproceedings{BergerSPIE4838,
+author={David H. Berger and Theo A. {ten Brummelaar} and William G. Gagnuolo and
+Harold A. McAlister},
+editor={Wesley A. Traub},
+publisher={Int.\ Soc.\ Optical Engineering},
+title={Preliminary results from the longitudinal disersion compensation system for the {CHARA} array},
+series={Proc.\ SPIE},
+booktitle={Interferometry for Optical Astronomy {II}},
+volume=4838,
+annote={http://spie.org/scripts/toc.pl?volume=4838&journal=SPIE},
+pages={974--982},
+year=2003}
+
+@article{BergerPACS116,
+author={David B. Berger},
+journal=pasp,
+title={Longitudinal Dispersion Compensation for a Long Baseline Optical Interferometer},
+volume=116,
+pages={390--390},
+year=2004}
+
+@article{Biersack82,
+author={Jochen P. Biersack and E. Santer},
+journal={Nucl.\ Instrum.\ Methods},
+volume=198,
+pages=29,
+year=1982}
+
+@unpublished{Blaha,
+author={Peter Blaha},
+note={priv. commun.},
+year=1998}
+
+@article{BoettgerPRB62,
+author={Jonathan C. Boettger},
+journal={Phys.\ Rev.\ B},
+title={Approximate two-electron spin-orbit coupling terms for density-functional theory DFT calculations
+using the Doublas-Kroll-Hess transformation},
+volume=62,
+pages={7809--7815},
+year=2000}
+
+@book{Born,
+author = {Max Born and Emil Wolf},
+title = {Principles of Optics},
+edition = {7th},
+publisher = {Cambridge University Press},
+year = {1999},
+annote={Gorlaeus 33.18 6g},
+address = {Cambridge}
+}
+
+@techreport{Bos,
+author={M. S. Bos and H.-G. Scherneck},
+title={The free ocean tide loading provider},
+year = {2005},
+url={http://www.oso.chalmers.se/~loading}
+}
+
+@book{Bradley1972,
+author={C. J. Bradley and Arthur P. Cracknell},
+title={The Mathematical Theory of the Symmetry in Solids},
+publisher={Clarendon Press},
+address={Oxford},
+year=1972}
+
+
+@phdthesis{buscher88,
+author = {D. F. Buscher},
+title = {Getting the most out of C.O.A.S.T.},
+annote = {available at http://www.mrao.cam.ac.uk/{$\sim$}dfb/publications/dfbphd.pdf},
+year = 1988,
+school = {Cambridge University}
+}
+
+@book{Byrd,
+author = {Paul F. Byrd and Morris D. Friedman},
+title = {Handbook of elliptical Integrals for Engineers and Physicists},
+publisher = {Springer},
+year = {1971},
+edition = {2nd},
+series ={Die Grundlehren der mathematischen Wissenschaften in Einzeldarstellungen},
+volume = {LXVII},
+annote={33A25 217 Snellius Instituut},
+mrnumber={MR0277773 (43 \#3506)},
+address = {Berlin, G\"ottingen}}
+
+@book{Callaway,
+author={Joseph Callaway},
+title={Quantum Theory of ths Solid State},
+publisher={Academic Press},
+address={New York, San Francisco},
+year=1976}
+
+@article{Carleer,
+author={M. Carleer and A. Jenouvrier and A.-C. Vandaele and P. F. Bernath
+and M. F. M\'erienne and R. Colin and N. F. Zobov and O. L. Polyansky and J. Tennyson and V. A. Savin},
+title={The near infrared, visible and near ultraviolet overtone spectrum of water},
+journal={J. Chem.\ Phys.},
+volume=111,
+pages={2444--2450},
+url={http://www.aip.org/pubservs/pas.html},
+year=1999}
+
+@inproceedings{CassaingSPIE4006,
+author={Fr\'ed\'eric Cassaing and Bruno Fleury and Christophe Coudrain and Pierre-Yves Madec and Emmanuel {Di Folco}
+and Andreas Glindemann and Samuel L\'ev{\^e}que},
+title={An optimized fringe tracker for the {VLTI}/{PRIMA} instrument},
+series={Proc.\ SPIE},
+editor={Pierre J. Lena and Andreas Quirrenbach},
+publisher={Int.\ Soc.\ Optical Engineering},
+booktitle={Interferometry in Optical Astronomy},
+annote={doc/spie_2000/4006_17.pdf, http://www.eso.org/projects/vlti/publink/spie_muenchen2000/},
+volume=4006,
+pages={152--163},
+year=2000}
+
+
+@phdthesis{Chagnon,
+author = {Gilles Chagnon},
+title = {Interf\'erom\'etrie stellair dans l'infrarouge en pr\'esence de fon thermnique},
+school = {Observatoire de Paris (section de Meudon)},
+annote={http://tel.ccsd.cnrs.fr/documents/archives0/00/00/41/01/},
+year = 2003}
+
+@inproceedings{ChangSPIE3350,
+author={M. P. J. L. Chang and D. F. Buscher},
+title={Monomode fiber interferometer for single telescopes},
+booktitle={Astronomical Intererometry},
+editor={Robert D. Reasenberg},
+publisher={Int.\ Soc.\ Optical Engineering},
+pages= {2--13},
+series={Proc.\ SPIE},
+volume=3350,
+address="Kona",
+month= "20--28~" # mar,
+year=1998
+}
+
+@techreport{Chance1,
+author={K. Chance and K. W. Jucks and D. G. Johnson and W. A. Traub},
+title={The Smithsonian Astrophysical Observatory Database SAO92},
+url={http://cfa-www.harvard.edu/firs/sao92.html}
+}
+
+@article{Cody,
+author = {W. J. Cody},
+title = {A Survey of Practical Rational and Polynomial Approximation of Functions},
+journal = {SIAM Rev.},
+volume = {12},
+number=3,
+year = {1970},
+mrclass = {65.20 (41.00)},
+mrnumber = {42 \#2627},
+pages = {400--423}}
+
+@inproceedings{Cotton-95,
+author="W. Cotton",
+title="Fringe Fitting",
+organization="Astronomical Society of the Pacific",
+booktitle="Very Long Baseline Interferometry and the VLBA",
+series="ASP Conference Series",
+number=82,
+year=1995,
+pages="189--208"
+}
+
+@manual{binFITS,
+author="W.D. Cotton and D. Tody and W.D. Pence",
+title="Binary Table Extensions to FITS",
+journal="Astron. Astrophys. Suppl. Ser.",
+number=113,
+year=1995,
+pages="159--66"
+}
+
+@incollection{Cotton-97,
+author="W. Cotton",
+title="Very long baseline interferometry",
+booktitle="High Angular Resolution in Astrophysics",
+publisher="Kluwer Academic Publishers",
+series="NATO ASI Series",
+number=501,
+year=1997
+}
+
+@book{Cracknell,
+author={Arthur P. Cracknell},
+title={Group Theory in Solid-State Physics},
+publisher={Taylor \& Francis},
+address={London},
+year=1975}
+
+@incollection{CreathProgOpt26,
+author={Katherine Creath},
+title={Phase-Measuremnt Interferometry Techniques},
+booktitle={TBD},
+volume={XXVI},
+series={Prog.\ Opt.},
+editor={E. Wolf},
+publisher={TBD},
+address={TBD},
+annote={Gorlaeus 14.18},
+year=1988,
+pages={349--393}}
+
+@inproceedings{CubySPIE3355,
+author={J. G. Cuby and D. Bottini and J. P. Picat},
+title={Handling atmospheric dispersion and differential refraction effects in large-field
+multi-objects spectroscopic observations},
+series={Proc.\ SPIE},
+publisher={Int.\ Soc.\ Optical Engineering},
+volume=3355,
+pages={36--47},
+year= 1998}
+
+
+@inproceedings{DerieLC2002,
+author={Fr\'ed\'eric Derie and F. Delplancke and Andreas Glindemann and Samuel L\'ev{\^e}que and
+Serge M\'enardi and Francesco Paresce and Rainer Wilhelm and Krister Wirenstrand},
+title={{PRIMA} technical description and implementation},
+publisher={Lorentz Center, Leiden University},
+booktitle={Hunting for Planets},
+series={workshop Lorentz Center},
+year=2002,
+month=jun}
+
+@book{Derr,
+author = {V. E. Derr},
+title = {Atmospheric Handbook: Atmospheric Data Tables Available on Computer Tape},
+publisher = {World Data Center A for Solar-Terrestrial Physics},
+year = {1984},
+annote={http://nssdc.gsfc.nasa.gov/space/model/atmos/atmos_handbook.html},
+address = {Boulder, CO}}
+
+@book{Dymond,
+author = {J. H. Dymond and Eric Brian Smith},
+title = {The virial coefficients of pure gases and mixtures},
+publisher = {Clarendon Press},
+year = {1980},
+annote={Gorlaeus 33.99},
+address = {Oxford}}
+
+
+@article{EngelbergJOSAA21,
+author={Yaakov M. Engelberg and Shlomo Ruschiin},
+title={Fast method for physica optics propagation of high-numerical-aperture beams},
+journal = {J. Opt.\ Soc.\ Am.\ A},
+volume = {21},
+number = {11},
+pages = {2135--2145},
+year = {2004}
+}
+
+@article{Erickson,
+author={K. E. Erickson},
+year=1962,
+title={Investigation of the invariance of atmospheric dispersion with a long-path refractometer},
+journal={J.\ Opt.\ Soc.\ Am.},
+volume=52,
+number= 7,
+pages={777--780}}
+
+@inproceedings{EsterKDD96,
+author = {Martin Ester and Hans-Pter Kriegel and J\"org Sander and Xiaowei Xu},
+title = {A density-based algorithm for discovering clusters in large spatial
+databases with noise},
+booktitle = {Proc. 2nd Int Conf Konwledge Discovery and Data Mining (KDD-96)},
+year = {1996}}
+
+@book{Evarestov,
+author={R. A. Evarestov and V. P. Smirnov},
+title={Site Symmetry in Crystals},
+series={Springer Series in Solid State Sciences},
+volume=108,
+publisher={Springer},
+address={Berlin, Heidelberg},
+year=1993}
+
+@article{Fliege,
+author = {J\"org Fliege and Ulrike Maier},
+title = {The distribution of points on the sphere and corresponding cubature formulae},
+journal = {IMA J.\ Numer.\ Analysis},
+volume = {19},
+number = 3,
+year = {1999},
+url={http://www.mathematik.uni-dortmund.de/lsx/research/projects/fliege/nodes/nodes.html},
+pages = {317--334}}
+
+
+@inbook{Fugate,
+author={R.\ Q.\ Fugate},
+title={Adaptive Optics},
+booktitle={Handbook of Optics},
+volume={III},
+editor={M.\ Bass},
+publisher={McGraw-Hill},
+address={New York},
+year=2001,
+pages={1.3--1.52}}
+
+@unpublished{GaiWN041210,
+author={Mario Gai},
+title={{PRIMA} {FSU}---Effects of residual atmospheric turbulence on {GD} measurement},
+note={{WN041210}},
+month = "10~" # dec,
+year=2004}
+
+@article{GlindemannASS286,
+author = {A. Glindemann and J. Algomedo and R. Amestica and P. Ballester and
+B. Bauvir and E. Bugue{\~n}o and S. Correia and F. Delgado and F. Delplancke and
+F. Derie and Ph. Duhoux and E. {di Folco} and A. Gennai and B. Gilli and
+P. Giordano and Ph. Gitton and S. Guisard and N. Housen and A. Huxley and P. Kervella
+and M. Kiekebusch and B. Koehler and S. L\'ev\^eque and A. Longinotti
+and S. M\'enardi and S. Morel and F. Paresce and T. {Phan Duc} and A. Richichi
+and M. Sch\"oller and M. Tarenghi and A. Wallander and M. Wittkowski and R. Wilhelm},
+title = {The {VLTI}---A Status Report},
+journal = {Astrophysics and Space Science},
+volume = {286},
+number={1--2},
+pages = {35--44},
+year = 2003}
+
+@techreport{Globalview,
+author={Cooperative Atmospheric Data Integration Project},
+institution={Cooperative Atmospheric Data Integration Project -- Carbon Dioxide},
+title={{GLOBALVIEW}-{CO}$_2$},
+year=2003,
+url={ftp://ftp.cmdl.noaa.gov/ccg/co2/GLOBALVIEW},
+note={ftp://ftp.cmdl.noaa.gov/ccg/co2/GLOBALVIEW},
+}
+
+@article{GlogeAO10,
+author = {D. Gloge},
+title = {Weakly guiding fibers},
+journal = {Appl.\ Opt.},
+volume = 10,
+number = 10,
+pages = {2252--2258},
+year = 1971}
+
+@article{Golek,
+author={F. Golek},
+journal={Phys.\ Status Solidi B},
+volume=177,
+pages={K5},
+year=1993}
+
+@inproceedings{GorhamSPIE3350,
+author={P. W. Gorham},
+title={Optimal filter approach to photon-limited white light fringe
+detection and delay rate estimation in an optical interferometer},
+booktitle={Astronomical Intererometry},
+editor={Robert D. Reasenberg},
+publisher={Int.\ Soc.\ Optical Engineering},
+pages= {116--127},
+series={Proc.\ SPIE},
+volume=3350,
+address="Kona",
+month= "20--28~" # mar,
+year=1998
+}
+
+@book{GR,
+author = {I. Gradstein and I. Ryshik},
+title = {Summen-, {P}rodukt- und {I}ntegraltafeln},
+edition = {1st},
+publisher = {Harri Deutsch},
+year = {1981},
+isbn = {3-87144-350-6},
+mrnumber = {83i:00012},
+note={The numerator of the definition of $\alpha$ in 2.597
+should read $\sqrt{1+p^2}\sin x$, not $\sqrt{1+p^2\sin x}$},
+address = {Thun}}
+
+@book{Green1985,
+author={Robin M. Green},
+title={Spherical Astronomy},
+publisher={Cambridge University Press},
+address={Cambridge, London},
+annote={Gorlaeus 39.19},
+year=1985}
+
+
+@book{Hahn,
+editor={Theo Hahn},
+title={International Tables for Crystallography},
+volume={A},
+publisher={Kluwer Academic Publishers},
+address={Dordrecht, The Netherlands},
+year=2002}
+
+@inproceedings{HardySymp1998,
+author={Bob Hardy},
+title={ITS-90 formulations for vapor pressure, frostpoint temperature, dewpoint temperature,
+and enhancement factors in the range -100 to +100 C},
+booktitle={Proc.\ Third Int.\ Symp.\ on Humidity \& Moisture},
+month = "6~" # apr,
+address={Teddington, London},
+year=1998}
+
+@unpublished{Hase,
+author={Frank Hase},
+year=2003,
+howpublished={priv.\ commun},
+note={priv.\ commun.},
+}
+
+@article{Hasegawa1983,
+author = {Takemitsu Hasegawa and Tatsuo Torii and Ichizo Ninomiya},
+title = {Generalized {C}hebyshev Interpolation and Its Application to Automatic Quadrature},
+journal = {Math.\ Comp.},
+volume = {41},
+number = 164,
+year = {1983},
+mrclass = {65D32 (41A55 65D05)},
+mrnumber = {84m:65037},
+pages = {537--553}}
+
+@phdthesis{Heidmann,
+author = {Paul Scott Heidmann},
+title = {The performance of the epsilon and theta convergence acceleration algorithms},
+school = {North Dakota State University of Agriculture and Applied Science},
+year = 1992}
+
+@inbook{Yarkony,
+author={T. Helgaker and P. R. Taylor},
+title={},
+booktitle={Modern Electronic Structure Theory},
+volume={},
+editor={D. R. Yarkony},
+publisher={World Scientific},
+address={Singapore},
+year=1995,
+pages={chapt.\ 12}}
+
+@article{Helgaker,
+author={T. Helgaker and P. R. Taylor},
+title={On the evaluation of derivatives of {G}aussian integrals},
+journal = {Theor.\ Chim.\ Acta},
+volume = {83},
+number ={3/4},
+year = {1992},
+pages = {177--183}}
+
+@inbook{HerringLN,
+author={C. Herring},
+title={Accidental Degeneracy in the Energy Bands of Crystals},
+pages={240--248},
+series={Lecture Notes and Supplements in Physics},
+publisher={W. A. Benjamin},
+address={New York, Amsterdam},
+editor={Robert S. Knox and Albert Gold},
+year=1964}
+
+@book{Hog,
+editor={Erik H\/og and P. Kenneth Seidelmann},
+title={Astronomy and Astrophysics objectives of sub-milliarcsecond optical astrometry},
+publisher={Kluwer},
+address={Dordrecht},
+series ={IAU Symposium},
+volume = 166,
+annote={Gorlaeus},
+year=1995}
+
+@inproceedings{HogenhuisSPIE4006,
+author={Harm Hogenhuis and Martijn Visser and Gustav Ruwiel and Frans Hommes and Arno Wielders and Arjan Couwenberg},
+title={Test results of the {VLTI} Delay line verification program},
+series={Proc.\ SPIE},
+editor={Pierre J. Lena and Andreas Quirrenbach},
+publisher={Int.\ Soc.\ Optical Engineering},
+booktitle={Interferometry in Optical Astronomy},
+volume=4006,
+pages={198--206},
+year= 2000}
+
+@book{Hurwitz,
+author = {Adolf Hurwitz and R. Courant},
+editor = {J. L. Doob},
+title = {Allgemeine {F}unktionentheorie und elliptische {F}unktionen},
+edition = {4th},
+publisher = {Springer},
+series ={Die {G}rundlehren der {M}athematischen {W}issenschaften in {E}inzeldarstellungen},
+volume = 3,
+year = {1964},
+address = {Berlin, G\"ottingen}}
+
+@article{IdsoJGR74,
+author={Sherwood B. Idso and Ray D. Jackson},
+title={Thermal Radiation from the Atmopshere},
+journal={J. Geophys.\ Res.},
+volume= 74,
+number=23,
+pages={5397-5403},
+year=1969}
+
+@article{Iliev,
+author = {A. I. Iliev and Kh. I. Semerdzhiev},
+title = {Some generalizations of the {C}hebychev Method for Simultaneous Determination of
+All Roots of Polynomial Equations},
+year = {2001},
+eprint = {arXiv:math.NA/0104280},
+journal = {arXiv:math.NA/0104280}
+}
+
+@book{Ince1956,
+author={E. C. Ince},
+title={Ordinary Differential Equations},
+publisher={Dover Publications},
+address={Dover},
+year=1956}
+
+@article{JacquinetJQSRT62,
+author={N. Jacquinet-Husson and E. Ari\'e and J. Ballard and A. Barbe and G. Bjoraker and B. Bonnet and L. R. Brown and C. Camy-Peyret and J. P. Champion and
+A. Ch\'edin and A. Chursin and C. Clerbaux and G. Duxbury and J.-M. Flaud and
+N. Fourri\'e and A. Fayt and G. Graner and R. Gamache and A. Goldman and Vl. Golovko and G. Guelachvili and J. M. Hartmann and J. C. Hilico and J. Hillmann
+and G. Lef\`evre and E. Lellouch and S. N. Mikha\"{\i}lenko and O. V. Naumenko
+and V. Nemtchinov and D. A. Newnham and A. Nikitin and J. Orphal and A. Perrin
+and D. C. Reuter and C. P. Rinsland and L. Rosenmann and L. S. Rothman
+and N. A. Scott and J. Selby and L. N. Sinitsa and J. M. Sirota and A. M. Smith
+and K. M. Smith and Vl. G. Tyuereve and R. H. Tipping and S. Urband and P. Varanasi and M. Weber},
+title={The 1997 spectroscopic {GEISA} databank},
+journal={J.\ Quant.\ Spectr.\ \& Radiat.\ Transfer},
+volume=62,
+number=2,
+pages={205--254},
+year=1999}
+
+@book{Karttunen,
+editor = {H. Karttunen and P. Kr\"oger and H. Oja and M. Poutanen and K. J. Donner},
+title = {Fundamental Astronomy},
+publisher = {Springer},
+year = {1987},
+isbn = {0-387-17264-5},
+address = {Berlin, Heidelberg}}
+
+@article{Khare,
+author = {Avinash Khare and Uday Sukhatme},
+title = {Generalized Landen Transformation Formulas for Jacobi Elliptic Functions},
+year = {2003},
+eprint = {arXiv:math-ph/0312074},
+journal = {arXiv:math-ph/0312074}
+}
+
+@article{Kilbas,
+author = {Anatoly A. Kilbas and Luis Rodr\'{\i}guez and Juan J. Trujillo},
+title = {Asymptotic representations for hypergeometric-{B}essel type function
+and fractional integrals},
+journal = {J.\ Comput.\ Appl.\ Math.},
+volume = {149},
+number =2,
+year = {2002},
+pages = {469--487}}
+
+@inbook{Browder,
+author = {James Steve Browder and Stanley S. Ballard and Paul Klocek},
+editor = {Paul Klocek},
+title = {Physical Properties of Infrared Optical Materials},
+booktitle = {Handbook of Infrared Optical Materials},
+publisher = {Marcel Dekker},
+year = {1991},
+chapter={4},
+pages ={402--405},
+address = {NY, Basel, Hong Kong}}
+
+@article{Klopper,
+author = {W. Klopper and R. R\"ohse},
+title = {},
+journal = {Theor.\ Chim.\ Acta},
+volume = {83},
+year = {1992},
+pages = {441}}
+
+@book{Knopp,
+author = {Konrad Knopp},
+title = {Theorie und {A}nwendung der unendlichen {R}eihen},
+publisher = {Springer},
+edition = {5},
+series ={Die {G}rundlehren der {M}athematischen {W}issenschaften in {E}inzeldarstellungen},
+volume = 2,
+address = {Berlin, G\"ottingen},
+year = {1964}}
+
+@inproceedings{KoehlerSPIE4006,
+author={Bertrand Koehler and Carlo Flebus},
+editor={Pierre J. Lena and Andreas Quirrenbach},
+publisher={Int.\ Soc.\ Optical Engineering},
+title={{VLTI} Auxiliary Telescopes},
+series={Proc.\ SPIE},
+booktitle={Interferometry in Optical Astronomy},
+volume=4006,
+annote={http://www.eso.org/projects/vlti/publink/spie-muenchen2000/, doc/spie_2000/4006_02.pdf},
+pages={13--24},
+year=2000}
+
+@inproceedings{KoehlerSPIE5491,
+author={B. Koehler and M. Kraus and J. M. Moresmau and K. Wirenstrand and M. Duchateau and P. Duhoux
+and R. Karban and C. Flebus and E. Gabriel and O. Pirnay},
+title={The VLTI Auxiliary Telescopes; commissioning of AT1},
+editor={Wesley A. Traub},
+publisher={Int.\ Soc.\ Optical Engineering},
+series={Proc.\ SPIE},
+booktitle={New Frontiers in Stellar Interferometry},
+volume=5491,
+annote={#69},
+pages={600--610},
+year=2004}
+
+
+@book{LAPACK,
+author = {E. Anderson and Z. Bai and C. Bischof and
+S. Blackford and J. Demmel and Jack Dongarra and
+J. Du Croz and A. Greenbaum and S. Hammarling and
+A. McKenney and D. Sorensen},
+title = {{LAPACK} Users' Guide},
+edition = {Third},
+publisher = {Society for Industrial and Applied Mathematics},
+year = {1999},
+address = {Philadelphia, PA},
+isbn = {0-89871-447-8},
+url={http://www.netlib.org/lapack} }
+
+@article{LaiJOSAA8,
+author={Guanming Lai and Toyohiko Yatagai},
+title={Generalized phase-shifting interferomtry},
+journal={J.\ Opt. Soc.\ Am.\ A},
+volume={8},
+number={5},
+pages={822--827},
+year=1991}
+
+@inbook{Landolt,
+volume={III/7a},
+author={W. Pies and A. Weiss},
+title={},
+pages=1,
+chapter={1.1},
+series={Zahlenwerte und Funk\-ti\-onen aus Na\-tur\-wissen\-schaf\-ten
+und Tech\-nik, Neue Serie},
+publisher={Springer},
+address={Berlin},
+year=1973}
+%editor={K. H. Hell\-wege},
+%author={H. Landolt and R. R. B\"ornstein},
+
+
+@inproceedings{SPIE400605,
+author="C. Leinert and U. Graser and L. B. F. M. Waters and others",
+title="0 $\mu$m interferometry on the VLTI with the MIDI instrument: a preview",
+series="Proc. SPIE",
+number= 4006,
+pages="43--53",
+booktitle="Intern.\ Symp.\ Astronomical Telescopes and Instrumentation",
+address="Munich",
+month= "27--31~" # mar,
+year=2000
+}
+
+@book{ASILXXIV,
+editor={M. Lesieur and A Yaglu and F. David},
+title={New Trends in Turbulence},
+publisher={Springer},
+series={NATO Advanced Study Institute},
+number={LXXIV},
+address={Berlin},
+year=2000}
+
+
+@phdthesis{Levthesis,
+author="S. L\'ev\^eque",
+title="M\'ethode et syst\`emes Laser pour l'analyse du trajet
+optique interne du tr\`es grand t\'elescope interferom\`etrique europ\`een VLTI",
+school="Universit\'e Louis Pasteur, Strasbourg",
+month= "15~" # dec,
+year=1997
+}
+
+@techreport{LordNASA1992,
+author={Steven D. Lord},
+institution={{NASA}},
+title={A New software tool for computing
+earth's atmospheric transmission of near- and far-infrared radiation},
+type={{NASA} Technical Memorandum},
+number={103957},
+year=1992,
+url={http://www.gemini.edu/sciops/ObsProcess/obsConstraints/ocTransSpectra.html}
+}
+
+@phdthesis{LukasPhd,
+author={Dirk Lukas},
+title={Ein quantenmechanischer und ortsraumnaher Ansatz f\"ur die dielektrische
+Matrix eines halbunendlichen Kristalls mit realistischer Oberfl\"ache},
+school={Christian-Albrechts-Universit\"at Kiel},
+year=1996}
+
+@book{MO,
+editor = {Wilhelm Magnus and Fritz Oberhettinger and Raj Pal Soni},
+title = {Formulas and Theorems for the Special Functions of Mathematical Physics},
+edition = {3rd},
+publisher = {Springer},
+series ={Die Grundlehren der mathematischen Wissenschaften in Einzeldarstellungen},
+volume = 52,
+year = {1966},
+address = {Berlin, Heidelberg}}
+
+@book{Martensen,
+author = {Erich Martensen},
+title = {Analysis II},
+publisher = {Biblio\-gra\-phi\-sches In\-sti\-tut},
+series ={B I Hoch\-schul\-skrip\-ten},
+volume = 833,
+year = {1969},
+address = {Mannheim}}
+
+@inproceedings{MassonASP59,
+author={Colin R. Masson},
+title={Atmospheric Effects and Calibrators},
+editor={M. Ishiguro and Wm. J. Welch},
+publisher={Astron.\ Soc.\ Pacific},
+series={ASP Conf.\ Ser.},
+booktitle={Astronomy with Millimeter and Submillimeter Wave Interferometry},
+volume=59,
+pages={87--95},
+annote={phase cutoff frequency at 0.01 Hz},
+year=1994}
+
+@phdthesis{MasuiMet34,
+author={R. Masui},
+title={Effect of diffraction in a Saunders-type optical interferometer},
+journal={Metrologia},
+volume=34,
+year=1997,
+pages={125--131}
+}
+
+@phdthesis{MatharPhd,
+author={Richard J. Mathar},
+title={Dielektrische {T}heorie des elektronischen {E}nergieverlustes schwerer {I}onen in {F}estk\"orpern},
+school={Technische {U}niversit\"at Dresden},
+year=1995}
+
+@article{MatharPRB51a,
+author={Richard J. Mathar and Matthias Posselt},
+title={Effective-charge theory for the electronic stopping of heavy ions in solids:
+Stripping criteria and target-electron models},
+journal={Phys.\ Rev.\ B},
+volume=51,
+number=1,
+pages={107--116},
+year=1995}
+
+@article{MatharPRB51b,
+author={Richard J. Mathar and Matthias Posselt},
+title={Electronic stopping of heavy ions in the Kaneko model},
+journal={Phys.\ Rev.\ B},
+volume=51,
+number=22,
+pages={15798--15807},
+year=1995}
+
+@article{MatharREDS145,
+author={Richard J. Mathar},
+title={Protons passing through the homogeneous electron gas: polarization currents, velocities of excited electrons
+and deposited energy density},
+journal={Rad\. Eff.\ Def.\ Sol.},
+volume=145,
+pages={191--211},
+year=1998}
+
+@article{MatharDia,
+author={Richard J. Mathar},
+journal={arXiv:cond-mat/0007153},
+title={Electronic Stopping and Momentum Density of Diamond obtained from first-principles calculations},
+year=2000}
+
+@incollection{MatharAQC45,
+author={Richard J. Mathar and Samuel B. Trickey and John R. Sabin},
+title={Electronic Stopping and Momentum Density of Diamond from First-Principles Treatment of the Microscopic
+Dielectric},
+booktitle={Theory of the Interaction of Swift ions with Matter, Vol.\ 1},
+volume={45},
+series={Advances in Quantum Chemistry},
+editor={Remigio Trujillo-Cabrera and John R. Sabin},
+publisher={Academic Press},
+address={New York},
+year=2004,
+pages={277--288}}
+
+@techreport{McCarthyIERS32,
+author={Dennis D. McCarthy and G\'erard Petit},
+institution={{IERS} Convention Centre},
+title={{IERS} Technical Note No 32},
+year=2003,
+url={http://www.iers.org/iers/publications/tn/tn32/},
+note={http://www.iers.org/iers/publications/tn/tn32/}
+}
+
+@phdthesis{MeisnerPhd,
+author={Jeffrey Meisner},
+title={Estimation and Tracking of Atmospheric Delay Noise in a Long-Baseline Optical Stellar
+Interferometer and Determination of the Expected Estimation Error},
+school={University of Minnesota},
+year=1995,
+pages={i--249}
+}
+
+
+@book{Messiah,
+author={Albert Messiah},
+title={Quantenmechanik},
+volume=1,
+publisher={Walter de Gruyter},
+isbn = {3-11-003686-X},
+address={Berlin, New York},
+year=1976}
+
+@inbook{Moran-76,
+author="J. Moran",
+title="Very Long Baseline Interferometric Observations and Data Reduction",
+booktitle="Methods of experimental physics",
+publisher="Academic Press",
+year=1976,
+pages="235--7"
+}
+
+@article{Nitsche,
+author = {Johannes C. C. Nitsche},
+title = {{\"U}ber die {A}bh\"angigkeit der {T}schebyscheffschen {A}pproximierenden einer
+differenzierbaren {F}unktion vom {I}ntervall},
+journal = {Numer.\ Math.},
+volume = {4},
+year = {1962},
+mrnumber = {26 \#6657},
+pages = {262--276}}
+
+@book{Nussbaumer,
+author = {Henri J. Nussbaumer},
+editor = {Thomas S. Huang},
+title = {Fast {F}ourier Transform and Convolution Algorithms},
+publisher = {Springer},
+series ={Springer Series in Information Sciences},
+volume = 2,
+year = {1981},
+address = {Berlin, Heidelberg, New York}}
+
+@manual{PartrMemo,
+author={H. Partridge},
+title={NASA Technical Memorandum 1.15:101044},
+address={Ames Research Center, Moffett Field},
+year=1989}
+
+@phdthesis{Peetz,
+author={J\"org-Volker Peetz},
+title={Full-Potential Low-Energy Electron Diffraction Applied to {G}a{A}s(110)},
+year=1998,
+school={Chistian-Albrechts-Universit\"at Kiel},
+pages={1--106}
+}
+
+
+@inproceedings{PorroASP194,
+author={Irene L. Porro and U. Graser and Christoph Leinert},
+title={Estimated Performance for 10-micron Interferometry at the {VLTI} with the {MIDI} Instrument},
+organization="Astronomical Society of the Pacific",
+booktitle={Optical and {IR} Interferometry from Ground and Space},
+series="ASP Conference Series",
+number=194,
+year=1999,
+pages="325--330"
+}
+
+@book{Press,
+author = {William H. Press and Saul A. Teukolsky and William T. Vetterling and Brian P. Flannery},
+title = {Numerical Recipes in {C}++},
+publisher = {Cambridge University Press},
+edition = {2nd},
+year = {2002},
+address = {Cambridge}}
+
+@book{Rivlin,
+author = {Theodore J. Rivlin},
+title = {The {C}hebyshev {P}olynomials},
+publisher = {John Wiley},
+address = {New York, London},
+series ={Pure and Applied Mathematics},
+pages = {77},
+mrnumber={MR0450850 (56 \#9142)},
+year = {1974}}
+
+
+@incollection{RoddierProgOpt19,
+author={F. Roddier},
+title={The effects of atmospheric turbulence in optical astronomy},
+booktitle={TBD},
+volume={XIX},
+series={Prog.\ Opt.},
+editor={E. Wolf},
+publisher={TBD},
+address={TBD},
+annote={Gorlaeus 14.18},
+year=1981,
+pages={281--376}}
+
+@phdthesis{Royer,
+author = {Fr\'ed\'eric Royer},
+title = {Contribution \'a l'\'etude des populations d'\'etoiles chaudes
+\'a grande vitesse observ\'ees par Hipparcos},
+school = {Observatoire de Paris {DASGAL}},
+annote={http://tel.ccsd.cnrs.fr/documents/archives0/00/00/35/37/index.html},
+year = 1999}
+
+@techreport{RuegerIAG1999,
+author={J. M. R\"ueger},
+institution={International Association of Geodesy},
+title={Report of the Ad-Hoc Working Party on
+``Refractive indices of light, infrared and radio waves in the atmosphere''
+of the {IAG} Special Commission {SC3}--Fundamental Constants ({SCFC})},
+year=1999,
+url={http://www.gfy.ku.dk/~iag/Travaux\_99/wp51.htm}
+}
+
+@techreport{Sageatbd,
+author={{SAGE} {III} {ATBD}},
+institution={European Southern Observatory},
+title={{SAGE} {III} Algorithm Theoretical Basis Document (ATBD) Water Vapor Products},
+year=2000,
+month = "18~" # feb,
+note ={LaRC 475--00--105}
+}
+
+
+@techreport{Sarazin,
+author={Marc Sarazin},
+institution={European Southern Observatory},
+title={Astroclimatology of Paranal},
+year=2003,
+url={http://www.eso.org/gen-fac/pubs/astclim/paranal}
+}
+
+@incollection{SawadaLNCS2517,
+author={Jun Sawada and Ruben Gamboa},
+title={Mechanical Verification of a Square root algorithm Using Taylor's Theorem},
+booktitle={Formal Methods in Computer-Aided Design: 4th International Conference, FMCAD 2002, Portland, OR,
+USA, November 6--8, 2002},
+series={Lecture Notes in Computer Science},
+volume={2517},
+editor={M. D. Aagaard and J. W. O'Leary},
+publisher={Springer},
+address={Berlin, Heidelberg},
+year=2003,
+pages={274--291}}
+
+@article{EIS,
+author = {Neil J. A. Sloane},
+editor = {Neil J. A. Sloane},
+title = {The On-Line Encyclopedia of Integer Sequences},
+year = {2003},
+annote = {http://www.research.att.com/\char125njas/sequences/},
+eprint = {arXiv:math.CO/0312448}
+}
+
+@incollection{StrohbeinProgOpt9,
+author={John W. Strohbein},
+title={Optical propagation through the turbulent atmosphere},
+booktitle={TBD},
+volume={IX},
+series={Prog.\ Opt.},
+editor={E. Wolf},
+publisher={TBD},
+address={TBD},
+annote={Gorlaeus 14.18},
+year=1971,
+pages={73--122}}
+
+@book{Taff,
+editor = {Laurence G. Taff},
+title = {Computational Spherical Astronomy},
+publisher = {Wiley},
+year = {1980},
+address = {New York, Rochester}}
+
+@incollection{TangoProgOpt17,
+author={William J. Tango and R. Q. Twiss},
+title={Michelson stellar interferometry},
+booktitle={TBD},
+volume={17},
+series={Prog.\ Opt.},
+editor={E. Wolf},
+publisher={TBD},
+address={TBD},
+annote={Gorlaeus 14.18},
+year=1980,
+pages={239--277}}
+
+@phdthesis{Tatulli04,
+author = {Eric Tatulli},
+title = {Traitement du signal en interf\'erom\'etri monomode dans le cadre
+du projet {AMBER}. Application \'a l'observation interf\'erom\'etrique
+de l'environment circumstellaire des \'etoilse jeunes.},
+year = 2004,
+school = {Universit\'e Joseph Fourier, Grenoble}
+}
+
+@book{Wolfl,
+editor = {William L. Wolfl and George J. Zissis},
+title = {The Infrared Handbook},
+edition = {3rd},
+publisher = {Office of Naval Research},
+year = {1989},
+address = {Washington DC}}
+
+
+@article{ZeissMP30,
+author={G. D. Zeiss and William J. Meath},
+title={The H$_2$-H$_2$O dispersion energy constant and the dispersion of the specific refractivity of dilute water vapor},
+journal={Mol.\ Phys.},
+volume=30,
+number=1,
+year=1975,
+pages={161--169}
+}
+
+
+@manual{vlt157530001,
+author="Robert N. Tubbs and Richard J. Mathar",
+title="Astrometric Survey for Extra-Solar Planets with PRIMA, Error Budget for Astrometry",
+note="{VLT-TRE-AOS-15753-0001}",
+month= "18~" # feb,
+year=2005
+}
+
diff --git a/biblio/bibtex/contrib/ijqc/xampl.bbl b/biblio/bibtex/contrib/ijqc/xampl.bbl
new file mode 100644
index 0000000000..e045dcf090
--- /dev/null
+++ b/biblio/bibtex/contrib/ijqc/xampl.bbl
@@ -0,0 +1,459 @@
+\begin{thebibliography}{100}
+
+\bibitem{Adler1962}
+Adler, S.~L. Phys\ Rev 1962, 126, 413.
+
+\bibitem{BoettgerPRB62}
+Boettger, J.~C. Phys\ Rev\ B 2000, 62, 7809.
+
+\bibitem{LaiJOSAA8}
+Lai, G.; Yatagai, T. J\ Opt Soc\ Am\ A 1991, 8, 822.
+
+\bibitem{ZeissMP30}
+Zeiss, G.~D.; Meath, W.~J. Mol\ Phys 1975, 30, 161.
+
+\bibitem{Abate}
+Abate, J.; Dubner, H. SIAM J\ Numer\ Anal 1968, 5, 102.
+
+\bibitem{Arakane}
+Arakane, F.; Matsuoka, O. Int\ J Quant\ Chem 1998, 66, 273.
+
+\bibitem{Archer}
+Archer, D.~G.; Wang, P. J Phys\ Chem\ Ref\ Data 1990, 19, 371.
+
+\bibitem{EngelbergJOSAA21}
+Engelberg, Y.~M.; Ruschiin, S. J Opt\ Soc\ Am\ A 2004, 21, 2135.
+
+\bibitem{Adler}
+Aderl-Golden, S.~M.; Langhoff, S.~R.; {Bauschlicher Jr}, C.~W.; Carney, G.~D. J
+ Chem\ Phys 1985, 83, 255.
+
+\bibitem{AlfaroJCompApplMath99}
+Alfaro, M.; Cantero, M.~J.; Moral, L. J Comp\ Appl\ Math 1998, 99, 3.
+
+\bibitem{GlindemannASS286}
+Glindemann, A.; Algomedo, J.; Amestica, R.; Ballester, P.; Bauvir, B.;
+ Bugue{\~n}o, E.; Correia, S.; Delgado, F.; Delplancke, F.; Derie, F.; Duhoux,
+ P.; {di Folco}, E.; Gennai, A.; Gilli, B.; Giordano, P.; Gitton, P.; Guisard,
+ S.; Housen, N.; Huxley, A.; Kervella, P.; Kiekebusch, M.; Koehler, B.;
+ L\'ev\^eque, S.; Longinotti, A.; M\'enardi, S.; Morel, S.; Paresce, F.; {Phan
+ Duc}, T.; Richichi, A.; Sch\"oller, M.; Tarenghi, M.; Wallander, A.;
+ Wittkowski, M.; Wilhelm, R. Astrophysics and Space Science 2003, 286, 35.
+
+\bibitem{Baldiniarxiv04}
+Baldini, A.; Bemporad, C.; Cei, F.; Doke, T.; Grassi, M.; Haruyama, T.; anad
+ T.~Mori, S.~M.; Nicol\'o, D.; Nishiguchi, H.; Ootani, W.; Ozone, K.; Papa,
+ A.; Pazzi, R.; Sawada, R.; Sergiampietri, F.; Signorelli, G.; Suzuki, S.;
+ Terasawa, K. arXiv:physics/040172 2004.
+
+\bibitem{JacquinetJQSRT62}
+Jacquinet-Husson, N.; Ari\'e, E.; Ballard, J.; Barbe, A.; Bjoraker, G.; Bonnet,
+ B.; Brown, L.~R.; Camy-Peyret, C.; Champion, J.~P.; Ch\'edin, A.; Chursin,
+ A.; Clerbaux, C.; Duxbury, G.; Flaud, J.-M.; Fourri\'e, N.; Fayt, A.; Graner,
+ G.; Gamache, R.; Goldman, A.; Golovko, V.; Guelachvili, G.; Hartmann, J.~M.;
+ Hilico, J.~C.; Hillmann, J.; Lef\`evre, G.; Lellouch, E.; Mikha\"{\i}lenko,
+ S.~N.; Naumenko, O.~V.; Nemtchinov, V.; Newnham, D.~A.; Nikitin, A.; Orphal,
+ J.; Perrin, A.; Reuter, D.~C.; Rinsland, C.~P.; Rosenmann, L.; Rothman,
+ L.~S.; Scott, N.~A.; Selby, J.; Sinitsa, L.~N.; Sirota, J.~M.; Smith, A.~M.;
+ Smith, K.~M.; Tyuereve, V.~G.; Tipping, R.~H.; Urband, S.; Varanasi, P.;
+ Weber, M. J\ Quant\ Spectr\ \& Radiat\ Transfer 1999, 62, 205.
+
+\bibitem{AlbrechtTheoChemAcc107}
+Albrecht, M. Theor\ Chem\ Acc 2002, 107, 71. The last author V. R. Saunders is
+ missing in Ref.\ 36.
+
+\bibitem{EIS}
+Sloane, N. J.~A. arXiv:math.CO/0312448, 2003.
+
+\bibitem{Iliev}
+Iliev, A.~I.; Semerdzhiev, K.~I. arXiv:mathNA/0104280 2001.
+
+\bibitem{Biersack82}
+Biersack, J.~P.; Santer, E. Nucl\ Instrum\ Methods 1982, 198, 29.
+
+\bibitem{Klopper}
+Klopper, W.; R\"ohse, R. Theor\ Chim\ Acta 1992, 83, 441.
+
+\bibitem{Carleer}
+Carleer, M.; Jenouvrier, A.; Vandaele, A.-C.; Bernath, P.~F.; M\'erienne,
+ M.~F.; Colin, R.; Zobov, N.~F.; Polyansky, O.~L.; Tennyson, J.; Savin, V.~A.
+ J Chem\ Phys 1999, 111, 2444.
+
+\bibitem{Fliege}
+Fliege, J.; Maier, U. IMA J\ Numer\ Analysis 1999, 19, 317.
+
+\bibitem{MatharDia}
+Mathar, R.~J. arXiv:cond-mat/0007153 2000.
+
+\bibitem{Cody}
+Cody, W.~J. SIAM Rev 1970, 12, 400.
+
+\bibitem{Nitsche}
+Nitsche, J. C.~C. Numer\ Math 1962, 4, 262.
+
+\bibitem{Hasegawa1983}
+Hasegawa, T.; Torii, T.; Ninomiya, I. Math\ Comp 1983, 41, 537.
+
+\bibitem{Golek}
+Golek, F. Phys\ Status Solidi B 1993, 177, K5.
+
+\bibitem{Helgaker}
+Helgaker, T.; Taylor, P.~R. Theor\ Chim\ Acta 1992, 83, 177.
+
+\bibitem{BergerPACS116}
+Berger, D.~B. 2004, 116, 390.
+
+\bibitem{Wolfl}
+Wolfl, W.~L.; Zissis, G.~J., Eds.; The Infrared Handbook; Office of Naval
+ Research: Washington DC, 1989.
+
+\bibitem{Taff}
+Taff, L.~G., Ed.; Computational Spherical Astronomy; Wiley: New York,
+ Rochester, 1980.
+
+\bibitem{Bradley1972}
+Bradley, C.~J.; Cracknell, A.~P. The Mathematical Theory of the Symmetry in
+ Solids; Clarendon Press: Oxford, 1972.
+
+\bibitem{Callaway}
+Callaway, J. Quantum Theory of ths Solid State; Academic Press: New York, San
+ Francisco, 1976.
+
+\bibitem{Green1985}
+Green, R.~M. Spherical Astronomy; Cambridge University Press: Cambridge,
+ London, 1985.
+
+\bibitem{Ince1956}
+Ince, E.~C. Ordinary Differential Equations; Dover Publications: Dover, 1956.
+
+\bibitem{Nussbaumer}
+Nussbaumer, H.~J. Fast {F}ourier Transform and Convolution Algorithms; vol.~2
+ of Springer Series in Information Sciences Springer: Berlin, Heidelberg, New
+ York, 1981.
+
+\bibitem{Hurwitz}
+Hurwitz, A.; Courant, R. Allgemeine {F}unktionentheorie und elliptische
+ {F}unktionen; vol.~3 of Die {G}rundlehren der {M}athematischen
+ {W}issenschaften in {E}inzeldarstellungen Springer: Berlin, G\"ottingen,
+ 1964.
+
+\bibitem{AS}
+Abramowitz, M.; Stegun, I.~A., Eds.; Handbook of Mathematical Functions; Dover
+ Publications: New York, 1972.
+
+\bibitem{Hog}
+H\/og, E.; Seidelmann, P.~K., Eds.; Astronomy and Astrophysics objectives of
+ sub-milliarcsecond optical astrometry; vol. 166 of IAU Symposium Kluwer:
+ Dordrecht, 1995.
+
+\bibitem{GR}
+Gradstein, I.; Ryshik, I. Summen-, {P}rodukt- und {I}ntegraltafeln; Harri
+ Deutsch: Thun, 1981. The numerator of the definition of $\alpha$ in 2.597
+ should read $\sqrt{1+p^2}\sin x$, not $\sqrt{1+p^2\sin x}$.
+
+\bibitem{Rivlin}
+Rivlin, T.~J. The {C}hebyshev {P}olynomials; Pure and Applied Mathematics John
+ Wiley: New York, London, 1974.
+
+\bibitem{Byrd}
+Byrd, P.~F.; Friedman, M.~D. Handbook of elliptical Integrals for Engineers and
+ Physicists; vol. LXVII of Die Grundlehren der mathematischen Wissenschaften
+ in Einzeldarstellungen Springer: Berlin, G\"ottingen, 1971.
+
+\bibitem{Messiah}
+Messiah, A. Quantenmechanik; vol.~1 Walter de Gruyter: Berlin, New York, 1976.
+
+\bibitem{Karttunen}
+Karttunen, H.; Kr\"oger, P.; Oja, H.; Poutanen, M.; Donner, K.~J., Eds.;
+ Fundamental Astronomy; Springer: Berlin, Heidelberg, 1987.
+
+\bibitem{Evarestov}
+Evarestov, R.~A.; Smirnov, V.~P. Site Symmetry in Crystals; vol. 108 of
+ Springer Series in Solid State Sciences Springer: Berlin, Heidelberg, 1993.
+
+\bibitem{ASILXXIV}
+Lesieur, M.; Yaglu, A.; David, F., Eds.; New Trends in Turbulence; no. LXXIV In
+ NATO Advanced Study Institute Springer: Berlin, 2000.
+
+\bibitem{Martensen}
+Martensen, E. Analysis II; vol. 833 of B I Hoch\-schul\-skrip\-ten
+ Biblio\-gra\-phi\-sches In\-sti\-tut: Mannheim, 1969.
+
+\bibitem{Press}
+Press, W.~H.; Teukolsky, S.~A.; Vetterling, W.~T.; Flannery, B.~P. Numerical
+ Recipes in {C}++; Cambridge University Press: Cambridge, 2002.
+
+\bibitem{MO}
+Magnus, W.; Oberhettinger, F.; Soni, R.~P., Eds.; Formulas and Theorems for the
+ Special Functions of Mathematical Physics; vol.~52 of Die Grundlehren der
+ mathematischen Wissenschaften in Einzeldarstellungen Springer: Berlin,
+ Heidelberg, 1966.
+
+\bibitem{Born}
+Born, M.; Wolf, E. Principles of Optics; Cambridge University Press: Cambridge,
+ 1999.
+
+\bibitem{Derr}
+Derr, V.~E. Atmospheric Handbook: Atmospheric Data Tables Available on Computer
+ Tape; World Data Center A for Solar-Terrestrial Physics: Boulder, CO, 1984.
+
+\bibitem{Dymond}
+Dymond, J.~H.; Smith, E.~B. The virial coefficients of pure gases and mixtures;
+ Clarendon Press: Oxford, 1980.
+
+\bibitem{Hahn}
+Hahn, T., Ed.; International Tables for Crystallography; vol.~A Kluwer
+ Academic Publishers: Dordrecht, The Netherlands, 2002.
+
+\bibitem{Knopp}
+Knopp, K. Theorie und {A}nwendung der unendlichen {R}eihen; vol.~2 of Die
+ {G}rundlehren der {M}athematischen {W}issenschaften in {E}inzeldarstellungen
+ Springer: Berlin, G\"ottingen, 1964.
+
+\bibitem{Moran-76}
+Moran, J. In Methods of experimental physics; Academic Press, 1976; p. 235.
+
+\bibitem{Fugate}
+Fugate, R.~Q. In Handbook of Optics vol. III; Bass, M., Ed.; McGraw-Hill: New
+ York, 2001; p. 1.3.
+
+\bibitem{Yarkony}
+Helgaker, T.; Taylor, P.~R. In Modern Electronic Structure Theory; Yarkony,
+ D.~R., Ed.; World Scientific: Singapore, 1995; p. chapt.\ 12.
+
+\bibitem{Landolt}
+Pies, W.; Weiss, A. Springer: Berlin, 1973; p.~1.
+
+\bibitem{HerringLN}
+Herring, C. Lecture Notes and Supplements in Physics W. A. Benjamin: New York,
+ Amsterdam, 1964; p. 240.
+
+\bibitem{Browder}
+Browder, J.~S.; Ballard, S.~S.; Klocek, P. In Handbook of Infrared Optical
+ Materials; Klocek, P., Ed.; Marcel Dekker: NY, Basel, Hong Kong, 1991; p.
+ 402.
+
+\bibitem{BergerSPIE4838}
+Berger, D.~H.; {ten Brummelaar}, T.~A.; Gagnuolo, W.~G.; McAlister, H.~A.
+ Interferometry for Optical Astronomy {II}; Traub, W.~A., Ed.; Int.\ Soc.\
+ Optical Engineering vol. 4838 of Proc.\ SPIE. 2003; p. 974.
+
+\bibitem{CassaingSPIE4006}
+Cassaing, F.; Fleury, B.; Coudrain, C.; Madec, P.-Y.; {Di Folco}, E.;
+ Glindemann, A.; L\'ev{\^e}que, S. Interferometry in Optical Astronomy; Lena,
+ P.~J.; Quirrenbach, A., Eds.; Int.\ Soc.\ Optical Engineering vol. 4006 of
+ Proc.\ SPIE. 2000; p. 152.
+
+\bibitem{KoehlerSPIE4006}
+Koehler, B.; Flebus, C. Interferometry in Optical Astronomy; Lena, P.~J.;
+ Quirrenbach, A., Eds.; Int.\ Soc.\ Optical Engineering vol. 4006 of Proc.\
+ SPIE. 2000; p.~13.
+
+\bibitem{KoehlerSPIE5491}
+Koehler, B.; Kraus, M.; Moresmau, J.~M.; Wirenstrand, K.; Duchateau, M.;
+ Duhoux, P.; Karban, R.; Flebus, C.; Gabriel, E.; Pirnay, O. New Frontiers in
+ Stellar Interferometry; Traub, W.~A., Ed.; Int.\ Soc.\ Optical Engineering
+ vol. 5491 of Proc.\ SPIE. 2004; p. 600.
+
+\bibitem{PorroASP194}
+Porro, I.~L.; Graser, U.; Leinert, C. Optical and {IR} Interferometry from
+ Ground and Space Astronomical Society of the Pacific no. 194 In ASP
+ Conference Series. 1999; p. 325.
+
+\bibitem{AkesonSPIE4006}
+Akeson, R.~L.; Swain, M.~R.; Colavita, M.~M. Interferometry in Optical
+ Astronomy; Lena, P.~J.; Quirrenbach, A., Eds.; Int.\ Soc.\ Optical
+ Engineering vol. 4006 of Proc.\ SPIE. 2000; p. 321.
+
+\bibitem{MassonASP59}
+Masson, C.~R. Astronomy with Millimeter and Submillimeter Wave Interferometry;
+ Ishiguro, M.; Welch, W.~J., Eds.; Astron.\ Soc.\ Pacific vol.~59 of ASP
+ Conf.\ Ser. 1994; p.~87.
+
+\bibitem{AlbrechtSPIE5491}
+Albrecht, S.; Bakker, E.~J.; {de Jong}, J.~A.; Tubbs, R.~N.; Meisner, J.; {le
+ Poole}, R. New Frontiers in Stellar Interferometry; Traub, W.~A., Ed.; Int.\
+ Soc.\ Optical Engineering vol. 5491 of Proc.\ SPIE. 2004; p. 1266.
+
+\bibitem{Avila}
+Avila, R.; Masciadri, E.; S\'anchez, L.~J.; Vernin, J.; Raga, A. Adaptive
+ Optical System Technologies {II}; Wizinowich, P.~L.; Bonaccini, D., Eds.;
+ Int.\ Soc.\ Optical Engineering vol. 4839 of Proc.\ SPIE. 2002; p. 792.
+
+\bibitem{AnkerstSIGMOD99}
+Ankerst, M.; Breunig, M.~M.; Kriegel, H.-P.; Sander, J. Proc. {ACM} {SIGMOD}'99
+ Int.\ Conf.\ Management of Data. 1999.
+
+\bibitem{SPIE400605}
+Leinert, C.; Graser, U.; Waters, L. B. F.~M.; et~al. Intern.\ Symp.\
+ Astronomical Telescopes and Instrumentation Munich no. 4006 In Proc. SPIE.
+ 2000; p.~43.
+
+\bibitem{CubySPIE3355}
+Cuby, J.~G.; Bottini, D.; Picat, J.~P. Int.\ Soc.\ Optical Engineering vol.
+ 3355 of Proc.\ SPIE. 1998; p.~36.
+
+\bibitem{EsterKDD96}
+Ester, M.; Kriegel, H.-P.; Sander, J.; Xu, X. Proc. 2nd Int Conf Konwledge
+ Discovery and Data Mining (KDD-96). 1996.
+
+\bibitem{ChangSPIE3350}
+Chang, M. P. J.~L.; Buscher, D.~F. Astronomical Intererometry; Reasenberg,
+ R.~D., Ed.; Int.\ Soc.\ Optical Engineering: Kona vol. 3350 of Proc.\ SPIE.
+ 1998; p.~2.
+
+\bibitem{GorhamSPIE3350}
+Gorham, P.~W. Astronomical Intererometry; Reasenberg, R.~D., Ed.; Int.\ Soc.\
+ Optical Engineering: Kona vol. 3350 of Proc.\ SPIE. 1998; p. 116.
+
+\bibitem{DerieLC2002}
+Derie, F.; Delplancke, F.; Glindemann, A.; L\'ev{\^e}que, S.; M\'enardi, S.;
+ Paresce, F.; Wilhelm, R.; Wirenstrand, K. Hunting for Planets Lorentz Center,
+ Leiden University workshop Lorentz Center. 2002.
+
+\bibitem{Cotton-95}
+Cotton, W. Very Long Baseline Interferometry and the VLBA Astronomical Society
+ of the Pacific no.~82 In ASP Conference Series. 1995; p. 189.
+
+\bibitem{SawadaLNCS2517}
+Sawada, J.; Gamboa, R. Formal Methods in Computer-Aided Design: 4th
+ International Conference, FMCAD 2002, Portland, OR, USA, November 6--8, 2002;
+ Aagaard, M.~D.; O'Leary, J.~W., Eds.; Springer: Berlin, Heidelberg vol. 2517
+ of Lecture Notes in Computer Science, 2003; p. 274.
+
+\bibitem{Cotton-97}
+Cotton, W. High Angular Resolution in Astrophysics Kluwer Academic Publishers
+ no. 501 In NATO ASI Series, 1997.
+
+\bibitem{CreathProgOpt26}
+Creath, K. TBD; Wolf, E., Ed.; TBD: TBD vol. XXVI of Prog.\ Opt., 1988; p.
+ 349.
+
+\bibitem{StrohbeinProgOpt9}
+Strohbein, J.~W. TBD; Wolf, E., Ed.; TBD: TBD vol.~IX of Prog.\ Opt., 1971;
+ p.~73.
+
+\bibitem{MatharAQC45}
+Mathar, R.~J.; Trickey, S.~B.; Sabin, J.~R. Theory of the Interaction of Swift
+ ions with Matter, Vol.\ 1; Trujillo-Cabrera, R.; Sabin, J.~R., Eds.; Academic
+ Press: New York vol.~45 of Advances in Quantum Chemistry, 2004; p. 277.
+
+\bibitem{TangoProgOpt17}
+Tango, W.~J.; Twiss, R.~Q. TBD; Wolf, E., Ed.; TBD: TBD vol.~17 of Prog.\
+ Opt., 1980; p. 239.
+
+\bibitem{RoddierProgOpt19}
+Roddier, F. TBD; Wolf, E., Ed.; TBD: TBD vol. XIX of Prog.\ Opt., 1981; p.
+ 281.
+
+\bibitem{MatharPhd}
+Mathar, R.~J. Dielektrische {T}heorie des elektronischen {E}nergieverlustes
+ schwerer {I}onen in {F}estk\"orpern; Ph.D. thesis Technische {U}niversit\"at
+ Dresden, 1995.
+
+\bibitem{Tatulli04}
+Tatulli, E. Traitement du signal en interf\'erom\'etri monomode dans le cadre
+ du projet {AMBER}. Application \'a l'observation interf\'erom\'etrique de
+ l'environment circumstellaire des \'etoilse jeunes.; Ph.D. thesis
+ Universit\'e Joseph Fourier, Grenoble, 2004.
+
+\bibitem{darcio99}
+D'Arcio, L.~A. Selected aspects of wide-field stellar interferometry; Ph.D.
+ thesis Technische Universiteit Delft, 1999.
+
+\bibitem{Heidmann}
+Heidmann, P.~S. The performance of the epsilon and theta convergence
+ acceleration algorithms; Ph.D. thesis North Dakota State University of
+ Agriculture and Applied Science, 1992.
+
+\bibitem{Levthesis}
+L\'ev\^eque, S. M\'ethode et syst\`emes Laser pour l'analyse du trajet optique
+ interne du tr\`es grand t\'elescope interferom\`etrique europ\`een VLTI;
+ Ph.D. thesis Universit\'e Louis Pasteur, Strasbourg, 1997.
+
+\bibitem{MasuiMet34}
+Masui, R. Effect of diffraction in a Saunders-type optical interferometer;
+ Ph.D. thesis, 1997.
+
+\bibitem{MeisnerPhd}
+Meisner, J. Estimation and Tracking of Atmospheric Delay Noise in a
+ Long-Baseline Optical Stellar Interferometer and Determination of the
+ Expected Estimation Error; Ph.D. thesis University of Minnesota, 1995.
+
+\bibitem{Peetz}
+Peetz, J.-V. Full-Potential Low-Energy Electron Diffraction Applied to
+ {G}a{A}s(110); Ph.D. thesis Chistian-Albrechts-Universit\"at Kiel, 1998.
+
+\bibitem{buscher88}
+Buscher, D.~F. Getting the most out of C.O.A.S.T.; Ph.D. thesis Cambridge
+ University, 1988.
+
+\bibitem{Chagnon}
+Chagnon, G. Interf\'erom\'etrie stellair dans l'infrarouge en pr\'esence de fon
+ thermnique; Ph.D. thesis Observatoire de Paris (section de Meudon), 2003.
+
+\bibitem{Blaha}
+Blaha, P. 1998. Priv. commun.
+
+\bibitem{Hase}
+Hase, F. 2003. Priv.\ commun.
+
+\bibitem{GaiWN041210}
+Gai, M. {PRIMA} {FSU}---effects of residual atmospheric turbulence on {GD}
+ measurement 2004. {WN041210}.
+
+\bibitem{Bos}
+Bos, M.~S.; Scherneck, H.-G. The free ocean tide loading provider Tech. rep.
+ 2005.
+
+\bibitem{Chance1}
+Chance, K.; Jucks, K.~W.; Johnson, D.~G.; Traub, W.~A. The smithsonian
+ astrophysical observatory database sao92 Tech. rep.
+
+\bibitem{RuegerIAG1999}
+R\"ueger, J.~M. Report of the ad-hoc working party on ``refractive indices of
+ light, infrared and radio waves in the atmosphere'' of the {IAG} special
+ commission {SC3}--fundamental constants ({SCFC}) Tech. rep. International
+ Association of Geodesy 1999.
+
+\bibitem{Sarazin}
+Sarazin, M. Astroclimatology of paranal Tech. rep. European Southern
+ Observatory 2003.
+
+\bibitem{McCarthyIERS32}
+McCarthy, D.~D.; Petit, G. {IERS} technical note no 32 Tech. rep. {IERS}
+ Convention Centre 2003. Http://www.iers.org/iers/publications/tn/tn32/.
+
+\bibitem{LordNASA1992}
+Lord, S.~D. A new software tool for computing earth's atmospheric transmission
+ of near- and far-infrared radiation {NASA} Technical Memorandum 103957 {NASA}
+ 1992.
+
+\bibitem{Sageatbd}
+{ATBD}, S.~I. {SAGE} {III} algorithm theoretical basis document (atbd) water
+ vapor products Tech. rep. European Southern Observatory 2000. LaRC
+ 475--00--105.
+
+\bibitem{PartrMemo}
+Partridge, H. NASA Technical Memorandum 1.15:101044 Ames Research Center,
+ Moffett Field 1989.
+
+\bibitem{binFITS}
+Cotton, W.; Tody, D.; Pence, W. Binary Table Extensions to FITS 1995.
+
+\bibitem{vlt157530001}
+Tubbs, R.~N.; Mathar, R.~J. Astrometric Survey for Extra-Solar Planets with
+ PRIMA, Error Budget for Astrometry 2005. {VLT-TRE-AOS-15753-0001}.
+
+\bibitem{Globalview}
+Project, C. A. D.~I. {GLOBALVIEW}-{CO}$_2$ Tech. rep. Cooperative Atmospheric
+ Data Integration Project -- Carbon Dioxide 2003.
+ Ftp://ftp.cmdl.noaa.gov/ccg/co2/GLOBALVIEW.
+
+\bibitem{LAPACK}
+Anderson, E.; Bai, Z.; Bischof, C.; Blackford, S.; Demmel, J.; Dongarra, J.;
+ Croz, J.~D.; Greenbaum, A.; Hammarling, S.; McKenney, A.; Sorensen, D.
+ {LAPACK} Users' Guide; Society for Industrial and Applied Mathematics:
+ Philadelphia, PA, 1999.
+
+\end{thebibliography}
diff --git a/biblio/bibtex/contrib/ijqc/xampl.pdf b/biblio/bibtex/contrib/ijqc/xampl.pdf
new file mode 100644
index 0000000000..7eb4140666
--- /dev/null
+++ b/biblio/bibtex/contrib/ijqc/xampl.pdf
Binary files differ
diff --git a/biblio/bibtex/contrib/ijqc/xampl.tex b/biblio/bibtex/contrib/ijqc/xampl.tex
new file mode 100644
index 0000000000..4496bc600f
--- /dev/null
+++ b/biblio/bibtex/contrib/ijqc/xampl.tex
@@ -0,0 +1,180 @@
+\documentclass[preprint,pra,aps,secnumarabic,eqsecnum]{revtex4}
+
+%\documentclass[titlepage]{article}
+%\usepackage[sort&compress,numbers,comma]{natbib}
+
+\begin{document}
+
+\bibliographystyle{ijqc}
+
+\title{Xample application of ijqc.bst}
+
+\author{Richard J. Mathar}
+\homepage{http://www.strw.leidenuniv.nl/~mathar}
+\preprint{Int.\ J. Quant.\ Chem.\ 9x (x) (200x) xxx--xx}
+\affiliation{
+Sterrewacht, Leiden University, 2300RA Leiden, The Netherlands}
+
+\date{\today}
+
+\begin{abstract}
+References created by the Bib\TeX\ style {\tt ijqc} are shown that
+give an idea of the rendering of the most common types of entries.
+The style is inclined towards the standards of Wiley's Int.\ J.\ Quant.\ Chem.
+
+The BibTeX database that provides the input to what is shown here comes
+with the file {\tt mybib.bib}; some
+of the entries are erroneous (missing titles, page numbers\ldots)
+and lead to complains from the {\tt bibtex} call.
+
+key words: BibTeX; IJQC;
+\end{abstract}
+\maketitle
+
+\section{Summary of the Style}
+The characteristics of the {\tt ijqc} Bib\TeX\ file are
+\begin{itemize}
+\item
+The order of appearance follows the mentioning in the text.
+\item
+Author lists are given with the last name first, separating
+authors by a semicolon. The initials and the last name are separated
+by a comma.
+\item
+Journal titles are stripped from dots that might indicate abbreviations.
+The volume numbers are printed, but not the issue numbers.
+\item
+The bibliography entries are terminated by a full stop.
+\item
+Years are followed by the journal volume and page number. The final page
+number is suppressed.
+\end{itemize}
+
+\section{article}
+
+Articles with one author are \cite{Adler1962,BoettgerPRB62,LaiJOSAA8}.
+
+Articles with two authors list are \cite{ZeissMP30,Abate,Arakane,Archer,EngelbergJOSAA21},
+with more \cite{Adler,AlfaroJCompApplMath99}.
+
+Articles with a long author list are \cite{GlindemannASS286,Baldiniarxiv04,JacquinetJQSRT62}. All authors are listed.
+
+Articles with a {\tt note} entry are \cite{AlbrechtTheoChemAcc107}.
+
+Articles with {\tt annote} or {\tt eprint} entries
+are \cite{EIS,Iliev}. If an {\tt article} has both, a {\tt journal}
+and an {\tt eprint} entry, only the journal is produced.
+
+Articles without titles are \cite{Biersack82,Klopper} which does not matter
+since titles are omitted anyway.
+Articles with an {\tt url} are \cite{Carleer,Fliege},
+but this could also be done in the {\tt journal}: \cite{MatharDia}.
+
+Articles with an {\tt mrclass} or {\tt mrnumber} are \cite{Cody,Nitsche,Hasegawa1983}.
+These entries do not effect the output.
+
+The {\tt pages} may contain letters: \cite{Golek}, and the numbers
+be combinations \cite{Helgaker}.
+
+The MACRO list is short and does for example not know
+{\tt pasp}: \cite{BergerPACS116}.
+
+\section{book}
+
+Standard entries are \cite{Wolfl,Taff,Bradley1972,Callaway,Green1985,Ince1956}.
+If they have both {\tt author} and {\tt editor} they look like \cite{Nussbaumer,Hurwitz},
+with only one {\tt editor} like \cite{AS}, and with two editors like \cite{Hog}.
+If the {\tt mrnnumber} is present: \cite{GR,Rivlin,Byrd}.
+
+Demonstration of {\tt isbn} entry: \cite{Messiah,Karttunen}.
+
+With a {\tt series} entry we get \cite{Evarestov,ASILXXIV,Martensen},
+with an {\tt edition} \cite{Press,Byrd,MO},
+and with an {\tt annote} \cite{Born,Byrd,Green1985}.
+
+Books with {\tt annote} entries are \cite{Derr,Dymond},
+and with a {\tt volume} we have \cite{Hahn,Knopp,Martensen}.
+
+\section{inbook}
+
+The standard {\tt inbook} is \cite{Moran-76},
+with an {\tt editor} and a {\tt volume} it looks like \cite{Fugate}.
+If the title is missing we get \cite{Yarkony,Landolt}.
+Adding a {\tt series} is \cite{HerringLN},
+
+With {\tt chapter} and {\tt pages} : \cite{Browder}.
+
+\section{inproceedings}
+
+If {\tt inproceedings} include an {\tt annote}:
+\cite{BergerSPIE4838,CassaingSPIE4006,KoehlerSPIE4006,KoehlerSPIE5491}
+
+With a {\tt number}: \cite{PorroASP194}.
+With a {\tt volume}: \cite{AkesonSPIE4006,MassonASP59}.
+
+A sample case with a single editor is \cite{AlbrechtSPIE5491}
+with two editors is \cite{Avila},
+or without is \cite{AnkerstSIGMOD99,SPIE400605,CubySPIE3355,EsterKDD96}.
+
+With a {\tt month} we have \cite{ChangSPIE3350,GorhamSPIE3350,DerieLC2002}
+and without \cite{Cotton-95}.
+
+\section{incollection}
+
+With {\tt address} \cite{SawadaLNCS2517}
+or without \cite{Cotton-97}.
+
+{\tt author}, {\tt editor} and {\tt publisher} present
+results in \cite{CreathProgOpt26,StrohbeinProgOpt9}, with
+two {\tt editor}s we have \cite{MatharAQC45}.
+
+If a {\tt series} is added we have \cite{TangoProgOpt17,RoddierProgOpt19}.
+
+\section{theses}
+
+Plain minimalistic theses are \cite{MatharPhd,Tatulli04,darcio99,Heidmann}.
+
+Example with a {\tt month} entry: \cite{Levthesis}.
+Example with a {\tt journal}, {\tt volume} and {\tt pages}
+as if it were an article: \cite{MasuiMet34}.
+Example with a {\tt pages} entry: \cite{MeisnerPhd,Peetz}.
+Example with a {\tt annote} entry: \cite{buscher88,Chagnon}.
+
+\section{unpublished}
+
+Depending on whether {\tt howpublished} and {\tt title}
+are present: \cite{Blaha,Hase,GaiWN041210}.
+
+\section{techreport}
+
+A {\tt techreport} having a {\tt url} looks like
+\cite{Bos,Chance1,RuegerIAG1999,Sarazin},
+if there is also a {\tt note} like \cite{McCarthyIERS32}.
+
+A {\tt type} yields \cite{LordNASA1992}.
+
+If the {\tt month} has been given: \cite{Sageatbd}
+
+\section{manual}
+
+A manual with {\tt address} and {\tt year} is \cite{PartrMemo}.
+
+A disguised article with {\tt journal}, {\tt number} and {\tt pages}
+is \cite{binFITS}.
+
+A {\tt month} in the entry would be swallowed: \cite{vlt157530001}
+
+Handling of {\tt url} and {\tt note}: \cite{Globalview}.
+
+With authors, {\tt isbn} and {\tt url}: \cite{LAPACK}.
+
+%\begin{acknowledgments}
+%The work was supported in the middle.
+%\end{acknowledgments}
+%
+%\appendix
+%
+%\section{This is an appendix title}
+
+\bibliography{mybib}
+\end{document}
diff --git a/biblio/bibtex/contrib/index b/biblio/bibtex/contrib/index
new file mode 100644
index 0000000000..cad15618b5
--- /dev/null
+++ b/biblio/bibtex/contrib/index
@@ -0,0 +1,284 @@
+%% /usr/spool/ftp/pub/tex/bibtex/index, Tue Jun 30 10:53:12 1992
+%% Edit by Nelson H. F. Beebe <beebe@plot79.math.utah.edu>
+
+This directory, ~ftp/pub/tex/bibtex (from tuglib: tex/bibtex), contains
+collected BibTeX style files. These have been collected from our local
+archives, plus a scan on [27-Jun-1992] of about 900 Internet ftp sites
+indexed by archie, plus the contents on [27-Jun-1992] of the UK Aston
+TeX archive on tex.aston.ac.uk in disk$tex:[tex-archive.bibtex.styles.contrib].
+
+00dir.cmd -- alphabetical verbose directory as FTP
+ commands
+00dir.lst -- alphabetical verbose directory listing
+00tdir.cmd -- reverse time-ordered verbose directory as
+ FTP commands
+00tdir.lst -- reverse time-ordered verbose directory
+ listing
+
+aaai-named.bst -- aaai (????) style
+abbrv.bst -- abbrev BibTeX style
+abstract.bst -- modified alpha style with `abstract' keyword
+acm.bst -- ACM BibTeX style
+agsm.bst -- Australian Government publications
+alpha.bst -- alphanumeric BibTeX style
+amsalpha.bst -- alphanumeric BibTeX style for AmSTeX;
+ this is a copy of the file
+ tex/ams/amslatex/inputs/amsalpha.bst
+ from the AmSTeX 2.0 distribution tree
+amsplain.bst -- Plain BibTeX style for AmSTeX
+ this is a copy of the file
+ tex/ams/amslatex/inputs/amsplain.bst
+ from the AmSTeX 2.0 distribution tree
+annotate.bst -- modified alpha style with `annote' keyword
+annotation.bst -- modified plain style with `annote' keyword
+apa.bst -- American Psychology Association:
+ This is the same as apalike, but has
+ been modified a la astron.bst to use
+ \cite* for producing references like
+ "Rogers (1992)".
+apalike.bst -- APA-like BibTeX style
+apalike.doc -- LaTeX doc style file
+apalike.sty -- LaTeX sty style file (doc minus comments)
+apalike.tex -- test file describing APA-like style
+apalike2.bst -- variant of apalike
+astron -- subdirectory with Sake Hogeveen's astronomy
+ style and documentation
+astron.bst -- Astronomy BibTeX style
+authordate.readme -- remarks on David Rhead's authordate styles
+authordate1.bst -- authordate style variant 1
+authordate1.ltx -- LaTeX test for authordate style variant 1
+authordate1-4.sty -- LaTeX option for authordate style variants
+authordate2.bst -- authordate style variant 2
+authordate2.ltx -- LaTeX test for authordate style variant 2
+authordate3.bst -- authordate style variant 3
+authordate3.ltx -- LaTeX test for authordate style variant 3
+authordate4.bst -- authordate style variant 4
+authordate4.ltx -- LaTeX test for authordate style variant 4
+
+bbs.bst -- Behavioral and Brain Sciences style
+bibtex.cms-changes -- BibTeX change file for IBM VM/CMS
+bibtex.hosek-vms-changes -- BibTeX change file for VAX VMS
+bibtex.ins -- installation notes
+bibtex.pool -- Web pool file
+bibtex.tops20-changes -- BibTeX change file for
+bibtex.vms-changes -- BibTeX change file for
+bibtex.web -- Web source code for BibTeX
+big -- subdrirectory with bibtex change files et al
+bstfiles.tar-lst -- contents of bstfiles.tar.z
+bstfiles.tar.z -- compressed UNIX tar archive with
+ Makefile, index, *.bib, *.bst, *.doc,
+ *.lst, *.sty, and *.readme
+bstfiles.zip -- Info-ZIP archive with
+ Makefile, index, *.bib, *.bst, *.doc,
+ *.lst, *.sty, and *.readme
+bstfiles.zip-lst -- contents of bstfiles.zip
+bstfiles.zoo -- zoo archive with
+ Makefile, index, *.bib, *.bst, *.doc,
+ *.lst, *.sty, and *.readme
+bstfiles.zoo-lst -- contents of bstfiles.zoo
+btxbst.doc -- BibTeX doc style file
+btxdoc.bbl -- bibliography for btxdoc.tex
+btxdoc.bib -- bibliography data base for btxdoc.tex
+btxdoc.tex -- LaTeX file describing BibTeX
+btxdoc.xua -- backup of .aux file
+btxhak.bbl -- bibliography for btxhak.tex
+btxhak.tex -- LaTeX file describing BibTeX styles
+btxmac.tex -- TeX macros for using BibTeX with plain TeX
+
+cbe.bst -- Council of Biology Editors style
+ (includes such journals as American
+ Naturalist, Evolution, etc)
+cell.bst -- modification of jmb style
+cover.ltx -- cover page for btxdoc.tex
+cover2.ltx -- cover page for btxhak.tex
+
+dcu.bst -- style from Design Computing Unit,
+ Department of Architectural and
+ Design Science, University of Sydney
+
+harvard.bib -- bibliography for harvard.tex
+harvard.tex -- description of Harvard Bibliography Style
+ Family (agsm, dcu, kluwer)
+harvard.sty -- LaTeX style file needed with Harvard
+ styles
+humanbio.bst -- Human Biology style
+humannat.bst -- For journals Human Nature and
+ American Anthropologist
+
+ieeetr.bst -- IEEE transactions BibTeX style
+index -- this file
+is-abbrv.bst -- abbrev style with ISSN and ISBN keywords
+is-alpha.bst -- alpha style with ISSN and ISBN keywords
+is-plain.bst -- plain style with ISSN and ISBN keywords
+is-unsrt.bst -- unsrt style with ISSN and ISBN keywords
+
+jbact.bst -- modification of jmb.sty
+jmb.bst -- Journal of Molecular Biology style
+jmb.sty -- LaTeX option for use with jmb.bst
+jtb.bst -- Journal of Theoretical Biology
+
+kluwer.bst -- Kluwer Academic Publishers style
+
+mac -- Apple Macintosh BibTeX implementation
+Makefile -- same as makefile
+makefile -- UNIX makefile; this contains rules to
+ create and typeset all of the test-*.ltx
+ and xampl-*.ltx files listed below
+makefile.tops20 -- old TOPS-20 makefile (for BibTeX 0.98)
+makefile.tops20-new -- old TOPS-20 makefile (for BibTeX 0.99)
+makefile.vms -- old VAX VMS makefile
+
+named.bst -- named style
+named.sty -- LaTEX option for use with named.bst
+namunsrt.bst -- modification of unsrt style
+nar.bst -- Nucleic Acid Research style
+nar.sty -- LaTeX option for use with nar.bst
+nature.bst -- Nature style
+nature.sty -- LaTEX option for use with nature.bst
+newapa.bst -- modification of apalike.sty
+newapa.sty -- LaTEX option for use with newapa.bst
+
+phaip.bst -- American Institute of Physics
+ journals
+phapalik.bst -- American Psychological Association style
+phcpc.bst -- Computer Physics Communications style
+phiaea.bst -- IAEA Conferences style
+phjcp.bst -- Journal of Computational Physics
+phnf.bst -- Nuclear Fusion style
+phnflet.bst -- Nuclear Fusion Letters style
+phpf.bst -- Physics of Fluids
+phppcf.bst -- Physics version of apalike
+phreport.bst -- internal physics reports
+phrmp.bst -- Reviews of Modern Physics
+phyjabb.btx -- Physics journal abbreviations
+phyjfull.btx -- Physics journal full names
+ (included by physics.btx)
+physics.btx -- Physics journal master file from
+ which other ph*.bst files are derived
+ using the C preprocessor (automated
+ in makefile)
+plain.bst -- Plain BibTeX style
+plainyr.bst -- Plain BibTeX style with primary sort by year
+
+siam.bst -- SIAM BibTeX style
+
+test.bib -- test bibliography data base file
+ (used by authordate*.* files)
+test.ltx -- sample LaTeX file for making test-*.ltx
+ files (automated in makefile)
+test-aaai-named.ltx -- sample LaTeX file: bib in aaai-named format
+test-abbrv.ltx -- sample LaTeX file: bib in abbrv format
+test-abstract.ltx -- sample LaTeX file: bib in abstract format
+test-acm.ltx -- sample LaTeX file: bib in acm format
+test-agsm.ltx -- sample LaTeX file: bib in agsm format
+test-alpha.ltx -- sample LaTeX file: bib in alpha format
+test-amsalpha.ltx -- sample LaTeX file: bib in amsalpha format
+test-amsplain.ltx -- sample LaTeX file: bib in amsplain format
+test-annotate.ltx -- sample LaTeX file: bib in annotate format
+test-annotation.ltx -- sample LaTeX file: bib in annotation format
+test-apa.ltx -- sample LaTeX file: bib in apa format
+test-apalike.ltx -- sample LaTeX file: bib in apalike format
+test-apalike2.ltx -- sample LaTeX file: bib in apalike2 format
+test-astron.ltx -- sample LaTeX file: bib in astron format
+test-authordate1.ltx -- sample LaTeX file: bib in authordate1 format
+test-authordate2.ltx -- sample LaTeX file: bib in authordate2 format
+test-authordate3.ltx -- sample LaTeX file: bib in authordate3 format
+test-authordate4.ltx -- sample LaTeX file: bib in authordate4 format
+test-bbs.ltx -- sample LaTeX file: bib in bbs format
+test-cbe.ltx -- sample LaTeX file: bib in cbe format
+test-cell.ltx -- sample LaTeX file: bib in cell format
+test-dcu.ltx -- sample LaTeX file: bib in dcu format
+test-humanbio.ltx -- sample LaTeX file: bib in humanbio format
+test-humannat.ltx -- sample LaTeX file: bib in humannat format
+test-ieeetr.ltx -- sample LaTeX file: bib in ieeetr format
+test-is-abbrv.ltx -- sample LaTeX file: bib in is-abbrv format
+test-is-alpha.ltx -- sample LaTeX file: bib in is-alpha format
+test-is-plain.ltx -- sample LaTeX file: bib in is-plain format
+test-is-unsrt.ltx -- sample LaTeX file: bib in is-unsrt format
+test-jbact.ltx -- sample LaTeX file: bib in jbact format
+test-jmb.ltx -- sample LaTeX file: bib in jmb format
+test-jtb.ltx -- sample LaTeX file: bib in jtb format
+test-kluwer.ltx -- sample LaTeX file: bib in kluwer format
+test-named.ltx -- sample LaTeX file: bib in named format
+test-namunsrt.ltx -- sample LaTeX file: bib in namunsrt format
+test-nar.ltx -- sample LaTeX file: bib in nar format
+test-nature.ltx -- sample LaTeX file: bib in nature format
+test-newapa.ltx -- sample LaTeX file: bib in newapa format
+test-phaip.ltx -- sample LaTeX file: bib in phaip format
+test-phapalik.ltx -- sample LaTeX file: bib in phapalik format
+test-phcpc.ltx -- sample LaTeX file: bib in phcpc format
+test-phiaea.ltx -- sample LaTeX file: bib in phiaea format
+test-phjcp.ltx -- sample LaTeX file: bib in phjcp format
+test-phnf.ltx -- sample LaTeX file: bib in phnf format
+test-phnflet.ltx -- sample LaTeX file: bib in phnflet format
+test-phpf.ltx -- sample LaTeX file: bib in phpf format
+test-phppcf.ltx -- sample LaTeX file: bib in phppcf format
+test-phreport.ltx -- sample LaTeX file: bib in phreport format
+test-phrmp.ltx -- sample LaTeX file: bib in phrmp format
+test-plain.ltx -- sample LaTeX file: bib in plain format
+test-plainyr.ltx -- sample LaTeX file: bib in plainyr format
+test-siam.ltx -- sample LaTeX file: bib in siam format
+test-unsrt.ltx -- sample LaTeX file: bib in unsrt format
+testadb.ltx -- include file for authordate*.ltx files
+
+unsrt.bst -- Unsorted BibTeX style
+
+xampl.bib -- sample bibliography data base file
+xampl.ltx -- sample LaTeX file for making xampl-*.ltx
+ files (automated in makefile)
+xampl-aaai-named.ltx -- sample LaTeX file: bib in aaai-named format
+xampl-abbrv.ltx -- sample LaTeX file: bib in abbrv format
+xampl-abstract.ltx -- sample LaTeX file: bib in abstract format
+xampl-acm.ltx -- sample LaTeX file: bib in acm format
+xampl-agsm.ltx -- sample LaTeX file: bib in agsm format
+xampl-alpha.ltx -- sample LaTeX file: bib in alpha format
+xampl-amsalpha.ltx -- sample LaTeX file: bib in amsalpha format
+xampl-amsplain.ltx -- sample LaTeX file: bib in amsplain format
+xampl-annotate.ltx -- sample LaTeX file: bib in annotate format
+xampl-annotation.ltx -- sample LaTeX file: bib in annotation format
+xampl-apa.ltx -- sample LaTeX file: bib in apa format
+xampl-apalike.ltx -- sample LaTeX file: bib in apalike format
+xampl-apalike2.ltx -- sample LaTeX file: bib in apalike2 format
+xampl-astron.ltx -- sample LaTeX file: bib in astron format
+xampl-authordate1.ltx -- sample LaTeX file: bib in authordate1 format
+xampl-authordate2.ltx -- sample LaTeX file: bib in authordate2 format
+xampl-authordate3.ltx -- sample LaTeX file: bib in authordate3 format
+xampl-authordate4.ltx -- sample LaTeX file: bib in authordate4 format
+xampl-bbs.ltx -- sample LaTeX file: bib in bbs format
+xampl-cbe.ltx -- sample LaTeX file: bib in cbe format
+xampl-cell.ltx -- sample LaTeX file: bib in cell format
+xampl-dcu.ltx -- sample LaTeX file: bib in dcu format
+xampl-humanbio.ltx -- sample LaTeX file: bib in humanbio format
+xampl-humannat.ltx -- sample LaTeX file: bib in humannat format
+xampl-ieeetr.ltx -- sample LaTeX file: bib in ieeetr format
+xampl-is-abbrv.ltx -- sample LaTeX file: bib in is-abbrv format
+xampl-is-alpha.ltx -- sample LaTeX file: bib in is-alpha format
+xampl-is-plain.ltx -- sample LaTeX file: bib in is-plain format
+xampl-is-unsrt.ltx -- sample LaTeX file: bib in is-unsrt format
+xampl-jbact.ltx -- sample LaTeX file: bib in jbact format
+xampl-jmb.ltx -- sample LaTeX file: bib in jmb format
+xampl-jtb.ltx -- sample LaTeX file: bib in jtb format
+xampl-kluwer.ltx -- sample LaTeX file: bib in kluwer format
+xampl-named.ltx -- sample LaTeX file: bib in named format
+xampl-namunsrt.ltx -- sample LaTeX file: bib in namunsrt format
+xampl-nar.ltx -- sample LaTeX file: bib in nar format
+xampl-nature.ltx -- sample LaTeX file: bib in nature format
+xampl-newapa.ltx -- sample LaTeX file: bib in newapa format
+xampl-phaip.ltx -- sample LaTeX file: bib in phaip format
+xampl-phapalik.ltx -- sample LaTeX file: bib in phapalik format
+xampl-phcpc.ltx -- sample LaTeX file: bib in phcpc format
+xampl-phiaea.ltx -- sample LaTeX file: bib in phiaea format
+xampl-phjcp.ltx -- sample LaTeX file: bib in phjcp format
+xampl-phnf.ltx -- sample LaTeX file: bib in phnf format
+xampl-phnflet.ltx -- sample LaTeX file: bib in phnflet format
+xampl-phpf.ltx -- sample LaTeX file: bib in phpf format
+xampl-phppcf.ltx -- sample LaTeX file: bib in phppcf format
+xampl-phreport.ltx -- sample LaTeX file: bib in phreport format
+xampl-phrmp.ltx -- sample LaTeX file: bib in phrmp format
+xampl-plain.ltx -- sample LaTeX file: bib in plain format
+xampl-plainyr.ltx -- sample LaTeX file: bib in plainyr format
+xampl-siam.ltx -- sample LaTeX file: bib in siam format
+xampl-unsrt.ltx -- sample LaTeX file: bib in unsrt format
+xbtxbst.doc -- master file from which is-*.bst files
+ are automatically generated by steps
+ in the Makefile
diff --git a/biblio/bibtex/contrib/inlinebib/MANIFEST b/biblio/bibtex/contrib/inlinebib/MANIFEST
new file mode 100644
index 0000000000..2b956db92e
--- /dev/null
+++ b/biblio/bibtex/contrib/inlinebib/MANIFEST
@@ -0,0 +1,7 @@
+inlinebib.bst
+inlinebib.htm
+inlinebib.sty
+inlinebib.txt
+inlinebib1.gif
+inlinebib2.gif
+pageranges.sty
diff --git a/biblio/bibtex/contrib/inlinebib/inlinebib.bst b/biblio/bibtex/contrib/inlinebib/inlinebib.bst
new file mode 100644
index 0000000000..8178a47a3f
--- /dev/null
+++ b/biblio/bibtex/contrib/inlinebib/inlinebib.bst
@@ -0,0 +1,1125 @@
+% Bibliography style for footnote references. The citation is the
+% complete reference the first time, and a shorter reference the
+% following times. It uses an optional shorttitle entry in the database
+% for the short reference. For use with inlinebib.sty.
+
+% Changes made are Copyright (C) 1999 Ren Seindal
+
+% This program can redistributed and/or modified under the terms
+% of the LaTeX Project Public License Distributed from CTAN
+% archives in directory macros/latex/base/lppl.txt; either
+% version 1 of the License, or (at your option) any later version.
+
+% BibTeX standard bibliography style `plain'
+ % version 0.99a for BibTeX versions 0.99a or later, LaTeX version 2.09.
+ % Copyright (C) 1985, all rights reserved.
+ % Copying of this file is authorized only if either
+ % (1) you make absolutely no changes to your copy, including name, or
+ % (2) if you do make changes, you name it something other than
+ % btxbst.doc, plain.bst, unsrt.bst, alpha.bst, and abbrv.bst.
+ % This restriction helps ensure that all standard styles are identical.
+ % The file btxbst.doc has the documentation for this style.
+
+ENTRY
+ { address
+ author
+ booktitle
+ chapter
+ edition
+ editor
+ howpublished
+ institution
+ journal
+ key
+ month
+ note
+ number
+ organization
+ pages
+ publisher
+ school
+ shortauthor
+ shorttitle
+ series
+ title
+ type
+ volume
+ year
+ }
+ {}
+ { label }
+
+INTEGERS { output.state before.all mid.sentence after.sentence after.block
+ before.note}
+
+INTEGERS { short.title.max.length }
+
+FUNCTION {init.state.consts}
+{ #0 'before.all :=
+ #1 'mid.sentence :=
+ #2 'after.sentence :=
+ #3 'after.block :=
+ #4 'before.note :=
+
+ #50 'short.title.max.length :=
+}
+
+STRINGS { s t }
+
+FUNCTION {output.nonnull}
+{ 's :=
+% cite$ " >>>" * s * "<<< " * output.state int.to.str$ * warning$
+ output.state mid.sentence =
+ { ", " * write$ }
+ { output.state after.block =
+ { ", " * write$ % add.period$ write$
+ newline$
+ "\newblock " write$
+ }
+ { output.state before.all =
+ 'write$
+ { output.state before.note =
+ { write$
+ " \note " add.period$ write$
+ note missing$
+ 'skip$
+ { newline$
+ "\newblock " write$
+ }
+ if$
+ }
+ { add.period$ " " * write$ }
+ if$
+ }
+ if$
+ }
+ if$
+ mid.sentence 'output.state :=
+ }
+ if$
+% cite$ "x >>>" * s * "<<< " * output.state int.to.str$ * warning$
+ s
+}
+
+FUNCTION {output}
+{ duplicate$ empty$
+ 'pop$
+ 'output.nonnull
+ if$
+}
+
+FUNCTION {output.check}
+{ 't :=
+ duplicate$ empty$
+ { pop$ "empty " t * " in " * cite$ * warning$ }
+ 'output.nonnull
+ if$
+}
+
+FUNCTION {output.bibitem}
+{ newline$
+ "\bibitem{" write$
+ cite$ write$
+ "}" write$
+ newline$
+ ""
+ before.all 'output.state :=
+}
+
+FUNCTION {fin.entry}
+{ add.period$
+ write$
+ newline$
+}
+
+FUNCTION {new.block}
+{ output.state before.all =
+ 'skip$
+ { after.block 'output.state := }
+ if$
+}
+
+FUNCTION {new.sentence}
+{ output.state after.block =
+ 'skip$
+ { output.state before.all =
+ 'skip$
+ { after.sentence 'output.state := }
+ if$
+ }
+ if$
+}
+
+FUNCTION {output.note}
+{ before.note 'output.state :=
+ note missing$
+ { "" }
+ { note }
+ if$
+ output.nonnull
+}
+
+FUNCTION {not}
+{ { #0 }
+ { #1 }
+ if$
+}
+
+FUNCTION {and}
+{ 'skip$
+ { pop$ #0 }
+ if$
+}
+
+FUNCTION {or}
+{ { pop$ #1 }
+ 'skip$
+ if$
+}
+
+FUNCTION {new.block.checka}
+{ empty$
+ 'skip$
+ 'new.block
+ if$
+}
+
+FUNCTION {new.block.checkb}
+{ empty$
+ swap$ empty$
+ and
+ 'skip$
+ 'new.block
+ if$
+}
+
+FUNCTION {new.sentence.checka}
+{ empty$
+ 'skip$
+ 'new.sentence
+ if$
+}
+
+FUNCTION {new.sentence.checkb}
+{ empty$
+ swap$ empty$
+ and
+ 'skip$
+ 'new.sentence
+ if$
+}
+
+FUNCTION {field.or.null}
+{ duplicate$ empty$
+ { pop$ "" }
+ 'skip$
+ if$
+}
+
+FUNCTION {emphasize}
+{ duplicate$ empty$
+ { pop$ "" }
+ { "{\em " swap$ * "}" * }
+ if$
+}
+
+INTEGERS { nameptr namesleft numnames }
+
+FUNCTION {format.names}
+{ 's :=
+ #1 'nameptr :=
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ { s nameptr "{ff~}{vv~}{ll}{, jj}" format.name$ 't :=
+ nameptr #1 >
+ { namesleft #1 >
+ { ", " * t * }
+ { t "others" =
+ { " et al." * }
+ { " and " * t * }
+ if$
+ }
+ if$
+ }
+ 't
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+}
+
+FUNCTION {format.authors}
+{ author empty$
+ { "" }
+ { author format.names }
+ if$
+}
+
+FUNCTION {format.editors}
+{ editor empty$
+ { "" }
+ { editor format.names
+ editor num.names$ #1 >
+ { ", (eds.)" * }
+ { ", (ed.)" * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.title}
+{ title empty$
+ { "" }
+ { title "t" change.case$ "``" swap$ * "''" * }
+ if$
+}
+
+FUNCTION {n.dashify}
+{ 't :=
+ ""
+ { t empty$ not }
+ { t #1 #1 substring$ "-" =
+ { t #1 #2 substring$ "--" = not
+ { "--" *
+ t #2 global.max$ substring$ 't :=
+ }
+ { { t #1 #1 substring$ "-" = }
+ { "-" *
+ t #2 global.max$ substring$ 't :=
+ }
+ while$
+ }
+ if$
+ }
+ { t #1 #1 substring$ *
+ t #2 global.max$ substring$ 't :=
+ }
+ if$
+ }
+ while$
+}
+
+FUNCTION {format.date}
+{ year empty$
+ { month empty$
+ { "" }
+ { "there's a month but no year in " cite$ * warning$
+ month
+ }
+ if$
+ }
+ { month empty$
+ 'year
+ { month " " * year * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.btitle}
+{ title emphasize
+}
+
+FUNCTION {tie.or.space.connect}
+{ duplicate$ text.length$ #3 <
+ { "~" }
+ { " " }
+ if$
+ swap$ * *
+}
+
+FUNCTION {either.or.check}
+{ empty$
+ 'pop$
+ { "can't use both " swap$ * " fields in " * cite$ * warning$ }
+ if$
+}
+
+FUNCTION {format.bvolume}
+{ volume empty$
+ { "" }
+ { "volume" volume tie.or.space.connect
+ series empty$
+ 'skip$
+ { " by " * series emphasize * }
+ if$
+ "volume and number" number either.or.check
+ }
+ if$
+}
+
+FUNCTION {format.number.series}
+{ volume empty$
+ { number empty$
+ { series field.or.null }
+ { output.state mid.sentence =
+ { "number" }
+ { "Number" }
+ if$
+ number tie.or.space.connect
+ series empty$
+ { "there's a number but no series in " cite$ * warning$ }
+ { " in " * series * }
+ if$
+ }
+ if$
+ }
+ { "" }
+ if$
+}
+
+FUNCTION {format.edition}
+{ edition empty$
+ { "" }
+ { output.state mid.sentence =
+ { edition "l" change.case$ " edition" * }
+ { edition "t" change.case$ " edition" * }
+ if$
+ }
+ if$
+}
+
+INTEGERS { multiresult }
+
+FUNCTION {multi.page.check}
+{ 't :=
+ #0 'multiresult :=
+ { multiresult not
+ t empty$ not
+ and
+ }
+ { t #1 #1 substring$
+ duplicate$ "-" =
+ swap$ duplicate$ "," =
+ swap$ "+" =
+ or or
+ { #1 'multiresult := }
+ { t #2 global.max$ substring$ 't := }
+ if$
+ }
+ while$
+ multiresult
+}
+
+FUNCTION {format.pages}
+{ pages empty$
+ { "" }
+ { pages multi.page.check
+ { "pp." pages n.dashify tie.or.space.connect }
+ { "p." pages tie.or.space.connect }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.vol.num.pages}
+{ volume field.or.null
+ number empty$
+ 'skip$
+ { "(" number * ")" * *
+ volume empty$
+ { "there's a number but no volume in " cite$ * warning$ }
+ 'skip$
+ if$
+ }
+ if$
+ pages empty$
+ 'skip$
+ { duplicate$ empty$
+ { pop$ format.pages }
+ { ":" * pages n.dashify * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.chapter.pages}
+{ chapter empty$
+ 'format.pages
+ { type empty$
+ { "chapter" }
+ { type "l" change.case$ }
+ if$
+ chapter tie.or.space.connect
+ pages empty$
+ 'skip$
+ { ", " * format.pages * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.in.ed.booktitle}
+{ booktitle empty$
+ { "" }
+ { editor empty$
+ { "in: " booktitle emphasize * }
+ { "in: " format.editors * ", " * booktitle emphasize * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {empty.misc.check}
+{ author empty$ title empty$ howpublished empty$
+ month empty$ year empty$ note empty$
+ and and and and and
+ key empty$ not and
+ { "all relevant fields are empty in " cite$ * warning$ }
+ 'skip$
+ if$
+}
+
+FUNCTION {format.thesis.type}
+{ type empty$
+ 'skip$
+ { pop$
+ type "t" change.case$
+ }
+ if$
+}
+
+FUNCTION {format.tr.number}
+{ type empty$
+ { "Technical Report" }
+ 'type
+ if$
+ number empty$
+ { "t" change.case$ }
+ { number tie.or.space.connect }
+ if$
+}
+
+FUNCTION {format.article.crossref}
+{ "in: \cite{" crossref * "}" *
+}
+
+FUNCTION {format.book.crossref}
+{ volume empty$
+ { "in: " }
+ { "volume" volume tie.or.space.connect " of: " *
+ }
+ "\cite{" * crossref * "}" *
+}
+
+FUNCTION {format.incoll.inproc.crossref}
+{ "in: \cite{" crossref * "}" *
+}
+
+FUNCTION {format.author.short}
+{ ""
+ author empty$
+ shortauthor empty$
+ editor empty$
+ and and
+% { "no author or editor for short reference of " cite$ * warning$ }
+ 'skip$
+ { shortauthor empty$
+ { author empty$
+ 'editor
+ 'author
+ if$
+ }
+ { author empty$
+ 'shortauthor
+ { author text.length$
+ shortauthor text.length$
+ <
+ 'author
+ 'shortauthor
+ if$
+ }
+ if$
+ }
+ if$
+
+ 's :=
+ s num.names$ 'numnames :=
+ numnames #0 >
+ { s #1 "{vv~}{ll}" format.name$ *
+ numnames #1 >
+ { " et al." * }
+ { "" * }
+ if$
+ }
+ { "" * }
+ if$
+ }
+ if$
+}
+
+INTEGERS { tmp title.length }
+
+FUNCTION {shorten.title}
+{ 's :=
+ s text.length$ 'title.length :=
+% "TITLE1=" quote$ * s * quote$ * warning$
+ #2 'tmp :=
+ { tmp title.length - #1 < }
+ { s tmp text.prefix$ 't :=
+% ">>>" t * "<<< " * tmp int.to.str$ * warning$
+ t #-1 #2 substring$ ". " =
+ t #-1 #2 substring$ ": " =
+ or not
+ 'skip$
+ { s tmp #2 - text.prefix$ 's :=
+ title.length 'tmp :=
+ }
+ if$
+ tmp #1 + 'tmp :=
+ }
+ while$
+% "TITLE2=" quote$ * s * quote$ * warning$
+ s
+}
+
+FUNCTION {format.title.short}
+{
+ shorttitle missing$
+ { title field.or.null
+ shorten.title
+ duplicate$ text.length$ 'tmp :=
+ tmp short.title.max.length >
+ { "shortened title for " cite$ * " is still " *
+ tmp short.title.max.length - int.to.str$ *
+ " characters too long" * warning$
+ }
+ 'skip$
+ if$
+ }
+ { shorttitle
+ duplicate$
+ text.length$ 'tmp :=
+ tmp short.title.max.length >
+ { "specified shorttitle for " cite$ * " is " *
+ tmp short.title.max.length - int.to.str$ *
+ " characters too long" * warning$
+ }
+ 'skip$
+ if$
+ }
+ if$
+
+ duplicate$ empty$
+ { "no short title for " cite$ * " screwing up." * warning$ }
+ { "\/" * emphasize }
+ if$
+
+ volume missing$
+ 'skip$
+ { type$ "book" =
+ { ", vol.~" * volume *
+ }
+ 'skip$
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.shortref}
+{ before.all 'output.state :=
+ "\short "
+ format.author.short output
+ format.title.short " \end" * output
+% duplicate$ ">>>> " swap$ * " <<<<" * warning$
+ write$
+ newline$
+}
+
+FUNCTION {article}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.title "title" output.check
+ new.block
+ crossref missing$
+ { journal emphasize "journal" output.check
+ format.vol.num.pages output
+ format.date "year" output.check
+ }
+ { format.article.crossref output.nonnull
+ format.pages output
+ }
+ if$
+ new.block
+ output.note
+ fin.entry
+ format.shortref
+}
+
+FUNCTION {book}
+{ output.bibitem
+ author empty$
+ { format.editors "author and editor" output.check }
+ { format.authors output.nonnull
+ crossref missing$
+ { "author and editor" editor either.or.check }
+ 'skip$
+ if$
+ }
+ if$
+ new.block
+ format.btitle "title" output.check
+ crossref missing$
+ { format.bvolume output
+ new.block
+ format.number.series output
+ new.sentence
+ publisher "publisher" output.check
+ address output
+ }
+ { new.block
+ format.book.crossref output.nonnull
+ }
+ if$
+ format.edition output
+ format.date "year" output.check
+ new.block
+ output.note
+ fin.entry
+ format.shortref
+}
+
+FUNCTION {booklet}
+{ output.bibitem
+ format.authors output
+ new.block
+ format.title "title" output.check
+ howpublished address new.block.checkb
+ howpublished output
+ address output
+ format.date output
+ new.block
+ output.note
+ fin.entry
+ format.shortref
+}
+
+FUNCTION {inbook}
+{ output.bibitem
+ author empty$
+ { format.editors "author and editor" output.check }
+ { format.authors output.nonnull
+ crossref missing$
+ { "author and editor" editor either.or.check }
+ 'skip$
+ if$
+ }
+ if$
+ new.block
+ format.btitle "title" output.check
+ crossref missing$
+ { format.bvolume output
+ format.chapter.pages "chapter and pages" output.check
+ new.block
+ format.number.series output
+ new.sentence
+ publisher "publisher" output.check
+ address output
+ }
+ { format.chapter.pages "chapter and pages" output.check
+ new.block
+ format.book.crossref output.nonnull
+ }
+ if$
+ format.edition output
+ format.date "year" output.check
+ new.block
+ output.note
+ fin.entry
+ format.shortref
+}
+
+FUNCTION {incollection}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.btitle "title" output.check
+ new.block
+ crossref missing$
+ { format.in.ed.booktitle "booktitle" output.check
+ format.bvolume output
+ format.number.series output
+ format.chapter.pages output
+ new.sentence
+ publisher "publisher" output.check
+ address output
+ format.edition output
+ format.date "year" output.check
+ }
+ { format.incoll.inproc.crossref output
+ format.chapter.pages output
+ }
+ if$
+ new.block
+ output.note
+ fin.entry
+ format.shortref
+}
+
+FUNCTION {inproceedings}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.btitle "title" output.check
+ new.block
+ crossref missing$
+ { format.in.ed.booktitle "booktitle" output.check
+ format.bvolume output
+ format.number.series output
+ format.pages output
+ address empty$
+ { organization publisher new.sentence.checkb
+ organization output
+ publisher output
+ format.date "year" output.check
+ }
+ { address output.nonnull
+ format.date "year" output.check
+ new.sentence
+ organization output
+ publisher output
+ }
+ if$
+ }
+ { format.incoll.inproc.crossref output.nonnull
+ format.pages output
+ }
+ if$
+ new.block
+ output.note
+ fin.entry
+ format.shortref
+}
+
+FUNCTION {conference} { inproceedings }
+
+FUNCTION {manual}
+{ output.bibitem
+ author empty$
+ { organization empty$
+ 'skip$
+ { organization output.nonnull
+ address output
+ }
+ if$
+ }
+ { format.authors output.nonnull }
+ if$
+ new.block
+ format.btitle "title" output.check
+ author empty$
+ { organization empty$
+ { address new.block.checka
+ address output
+ }
+ 'skip$
+ if$
+ }
+ { organization address new.block.checkb
+ organization output
+ address output
+ }
+ if$
+ format.edition output
+ format.date output
+ new.block
+ output.note
+ fin.entry
+ format.shortref
+}
+
+FUNCTION {mastersthesis}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.title "title" output.check
+ new.block
+ "Speciale" format.thesis.type output.nonnull
+ school "school" output.check
+ address output
+ format.date "year" output.check
+ new.block
+ output.note
+ fin.entry
+ format.shortref
+}
+
+FUNCTION {misc}
+{ output.bibitem
+ format.authors output
+ title howpublished new.block.checkb
+ format.title output
+ howpublished new.block.checka
+ howpublished output
+ format.date output
+ new.block
+ output.note
+ fin.entry
+ format.shortref
+ empty.misc.check
+}
+
+FUNCTION {phdthesis}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.btitle "title" output.check
+ new.block
+ "PhD thesis" format.thesis.type output.nonnull
+ school "school" output.check
+ address output
+ format.date "year" output.check
+ new.block
+ output.note
+ fin.entry
+ format.shortref
+}
+
+FUNCTION {proceedings}
+{ output.bibitem
+ editor empty$
+ 'skip$
+ { format.editors output.nonnull }
+ if$
+ new.block
+ format.btitle "title" output.check
+ format.bvolume output
+ format.number.series output
+ address empty$
+ { % organization publisher new.sentence.checkb
+ organization output
+ publisher output
+ format.date "year" output.check
+ }
+ { address output.nonnull
+ format.date "year" output.check
+ new.sentence
+ organization output
+ publisher output
+ }
+ if$
+ new.block
+ output.note
+ fin.entry
+ format.shortref
+}
+
+FUNCTION {techreport}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.title "title" output.check
+ new.block
+ format.tr.number output.nonnull
+ institution "institution" output.check
+ address output
+ format.date "year" output.check
+ new.block
+ output.note
+ fin.entry
+ format.shortref
+}
+
+FUNCTION {unpublished}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.title "title" output.check
+ new.block
+ note "note" output.check
+ format.date output
+ fin.entry
+ format.shortref
+}
+
+FUNCTION {default.type} { misc }
+
+MACRO {jan} {"January"}
+
+MACRO {feb} {"February"}
+
+MACRO {mar} {"March"}
+
+MACRO {apr} {"April"}
+
+MACRO {may} {"May"}
+
+MACRO {jun} {"June"}
+
+MACRO {jul} {"July"}
+
+MACRO {aug} {"August"}
+
+MACRO {sep} {"September"}
+
+MACRO {oct} {"October"}
+
+MACRO {nov} {"November"}
+
+MACRO {dec} {"December"}
+
+
+READ
+
+FUNCTION {sortify}
+{ purify$
+ "l" change.case$
+}
+
+INTEGERS { len }
+
+FUNCTION {chop.word}
+{ 's :=
+ 'len :=
+ s #1 len substring$ =
+ { s len #1 + global.max$ substring$ }
+ 's
+ if$
+}
+
+FUNCTION {sort.format.names}
+{ 's :=
+ #1 'nameptr :=
+ ""
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ { nameptr #1 >
+ { " " * }
+ 'skip$
+ if$
+ s nameptr "{vv{ } }{ll{ }}{ ff{ }}{ jj{ }}" format.name$ 't :=
+ nameptr numnames = t "others" = and
+ { "mfl." * }
+ { t sortify * }
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+}
+
+FUNCTION {sort.format.title}
+{ 't :=
+ "A " #2
+ "An " #3
+ "The " #4 t chop.word
+ chop.word
+ chop.word
+ sortify
+ #1 global.max$ substring$
+}
+
+FUNCTION {author.sort}
+{ author empty$
+ { key empty$
+ { "to sort, need author or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { author sort.format.names }
+ if$
+}
+
+FUNCTION {author.editor.sort}
+{ author empty$
+ { editor empty$
+ { key empty$
+ { "to sort, need author, editor, or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { editor sort.format.names }
+ if$
+ }
+ { author sort.format.names }
+ if$
+}
+
+FUNCTION {author.organization.sort}
+{ author empty$
+ { organization empty$
+ { key empty$
+ { "to sort, need author, organization, or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { "The " #4 organization chop.word sortify }
+ if$
+ }
+ { author sort.format.names }
+ if$
+}
+
+FUNCTION {editor.title.sort}
+{ editor empty$
+ { key empty$
+ { title field.or.null sortify }
+ { key sortify }
+ if$
+ }
+ { editor sort.format.names }
+ if$
+}
+
+FUNCTION {presort}
+{ type$ "book" =
+ type$ "inbook" =
+ or
+ 'author.editor.sort
+ { type$ "proceedings" =
+ 'editor.title.sort
+ { type$ "manual" =
+ 'author.organization.sort
+ 'author.sort
+ if$
+ }
+ if$
+ }
+ if$
+ " "
+ *
+ year field.or.null sortify
+ *
+ " "
+ *
+ title field.or.null
+ sort.format.title
+ *
+ #1 entry.max$ substring$
+ 'sort.key$ :=
+}
+
+ITERATE {presort}
+
+SORT
+
+FUNCTION {begin.bib}
+{ preamble$ empty$
+ 'skip$
+ { preamble$ write$ newline$ }
+ if$
+ "\begin{thebibliography}{}" write$ newline$
+}
+
+EXECUTE {begin.bib}
+
+EXECUTE {init.state.consts}
+
+ITERATE {call.type$}
+
+FUNCTION {end.bib}
+{ newline$
+ "\end{thebibliography}" write$ newline$
+}
+
+EXECUTE {end.bib}
diff --git a/biblio/bibtex/contrib/inlinebib/inlinebib.htm b/biblio/bibtex/contrib/inlinebib/inlinebib.htm
new file mode 100644
index 0000000000..07619130bd
--- /dev/null
+++ b/biblio/bibtex/contrib/inlinebib/inlinebib.htm
@@ -0,0 +1,202 @@
+<!DOCTYPE html public "-//w3c//dtd html 4.0 transitional//en">
+<HTML>
+<HEAD>
+<TITLE>Ren Seindal - Software - Inline bibliography style</TITLE>
+</HEAD>
+<BODY text="#000000" bgcolor="#FFFFFF" link="#0000EE" vlink="#551A8B" alink="#FF0000">
+
+<H1 align=center>Inline bibliography style</H1>
+
+<P>I want to have by BiBTeX generated references inlined in footnotes
+rather than the very terse references BiBTeX generates by default, so I
+hacked together a BiBTeX style to do that. These macros are not
+polished or in the form of a proper distribution, but I have used them
+with succes myself.</P>
+
+<P>The following discription have been made in haste. I will document
+it better when I have the time (RSN :-).</P>
+
+<P>There are two files: <A HREF="inlinebib.sty">inlinebib.sty</A> and <A HREF="inlinebib.bst">indexing.bst</A>.</P>
+
+
+<H2>The idea</H2>
+
+<P>This works just like any other BiBTeX style. It will still generate
+the bibliography at the end of the document, but it will also store all
+the entries in the <CODE>.aux</CODE> files, so they can be inlined in
+the following <CODE>latex</CODE> run.</P>
+
+<P>The first time a citation is made using <CODE>\cite</CODE> the
+complete bibliography entry is inserted. The following citations to the
+same entry will generate a short form, with only authors last name and a
+shortened title, followed by a "<I>cit.</I>". If the same bibliography
+entry is cited several times in a row, the text will only be
+"<I>ibid.</I>".</P>
+
+<P>Citations of this form are designed to be used in footnotes.</P>
+
+<P>A little example migth be appropriate (don't we all love
+screenshots!).</P>
+
+<P><TABLE border=2 cellpadding=3>
+<TR>
+<TD>
+<P>Footnotes from page one:</P>
+<IMG SRC="inlinebib1.gif" ALT="[Example 1]">
+</TD>
+</TR>
+<TR>
+<TD>
+<P>Footnotes from page two:</P>
+<IMG SRC="inlinebib2.gif" ALT="[Example 2]">
+</TD>
+</TR>
+</TABLE>
+
+<FONT SIZE="-1">(the overstrike problem is courtesy of xdvi(1))</FONT>
+</P>
+
+<P>It is not possible to avoid having the complete bibliography at the
+end of the document. The macros simply won't work without it. If you
+don't need it, just don't print it.</P>
+
+
+
+<H2>Usage</H2>
+
+<H3>Formalities</H3>
+
+<P>To use these macros put the file <CODE>inlinebib.sty</CODE> in your
+LaTeX search path and <CODE>inlinebib.bst</CODE> in your BiBTeX style
+search path and then put the line:</P>
+
+<BLOCKQUOTE>
+<PRE>\usepackage{inlinebib}</PRE>
+</BLOCKQUOTE>
+
+<P>in the preamble of your document.</P>
+
+<P>Other commands have to be added at the point where you want the
+bibliography to appear, usually at the end of the document. To tell
+BiBTeX to use the <I>inlinebib</I> style, you have to use
+<CODE>bibliographystyle</CODE>:
+
+<BLOCKQUOTE>
+<PRE>
+\bibliographystyle{inlinebib}
+</PRE>
+</BLOCKQUOTE>
+
+<P>Often I add a leading explanation to the bibliography with the
+<CODE>\bibliographycomment</CODE> macro. That is:</P>
+
+<BLOCKQUOTE>
+<PRE>
+\bibliographycomment{This bibliography ...}
+</PRE>
+</BLOCKQUOTE>
+
+<P>The actual index is produced by the <CODE>\bibliography</CODE>
+macro. Here you have to specify which BiBTeX databases you want to use.</P>
+
+<BLOCKQUOTE>
+<PRE>
+\bibliography{file ...}
+</PRE>
+</BLOCKQUOTE>
+
+<P>These were all the formalities.</P>
+
+
+<H3>Doing citations</H3>
+
+<P>When writing, just make citations as usual. Remember that these
+macros can produce very verbose references, and they are intended for
+footnotes.</P>
+
+<P>The default implementation of <CODE>\cite</CODE> allows several
+bibliography entries to be cited. This version allows only one at a
+time. It still supports the optional argument, which should be a page
+reference within the cited text.</P>
+
+<P>There are a few additional macros available. <CODE>\fullycite</CODE>
+forces a reference in the long form, <CODE>\shortcite</CODE> forces
+the short form, and <CODE>\noibid</CODE> disables the generation
+"<I>ibid.</I>" references for the next citation (this can for example be
+used at the end of each chapter).</P>
+
+<P>To force later citations for certain entries to be either long or
+short, the macros <CODE>\fullcitenext{}</CODE> and
+<CODE>\shortcitenext{}</CODE> can be used. The single argument is a
+comma separated list of BiBTeX labels that should be either long or
+short the next time they are cited. E.g., the code
+<CITE>\fullcitenext{book1, book2}</CITE> will cause LaTeX to forget that
+the two references might have been seen earlier and they will be handled
+as if they haven't be cited yet.</P>
+
+
+<H3>The BiBTeX databases</H3>
+
+<P>This style does not require special changes to the BiBTeX
+databases.</P>
+
+<P>Sometimes the BiBTeX style doesn't manage to calculate the proper
+short forms of the author and the title. In that case the BiBTeX
+entries in question can be extended with <CODE>shortauthor = {<I>shorter
+author name</I>}</CODE> and <CODE>shorttitle = {<I>short form of
+title</I>}</CODE>.</P>
+
+
+
+<H2>Tips and tricks</H2>
+
+<P>I have some macros to format page ranges, that I use with this BiBTeX
+style. They should be usable with other styles as well.</P>
+
+<P>The macros are here: <A HREF="pageranges.sty">pageranges.sty</A></P>
+
+<P>This file defined one user visible macro: <CODE>\pages{}</CODE>,
+which will do the following transformations of the single argument:</P>
+
+<DL>
+<DT><CODE>\pages{N}</CODE>
+<DD>becomes: <CODE>p.~N</CODE>
+<DT><CODE>\pages{N-}</CODE>
+<DD>becomes: <CODE>pp.~N~ff</CODE>
+<DT><CODE>\pages{N-M}</CODE>
+<DD>becomes: <CODE>pp.~N--M</CODE>
+<DT><CODE>\pages{N M}</CODE>
+<DD>becomes: <CODE>pp.~N M</CODE>
+</DL>
+
+<P>The last version is for cases like <CODE>\pages{213, 345
+and~654}</CODE> which will become <CODE>pp.~213, 345 and~654</CODE>.</P>
+
+
+
+<P>I often have this little definition in a LaTeX style file. It makes
+<CODE>\cite</CODE> do page ranges automatically and also puts the author
+in the index (see <A HREF="indexing.htm">the indexing macros</A>).</P>
+
+<BLOCKQUOTE>
+<PRE>
+%% Automatically fix page ranges in citations and index author
+\let\RS@citex\@citex
+\def\@citex[#1]#2{\I@indexonly-{#2}\RS@citex[\pages{#1}]{#2}}
+</PRE>
+</BLOCKQUOTE>
+
+
+
+
+
+<H2>Comments</H2>
+
+
+<P>If you have comments, please <A
+HREF="mailto:rene@seindal.dk?Subject=Inlinebib macros">write me</A>.</P>
+
+
+
+</BODY>
+</HTML>
diff --git a/biblio/bibtex/contrib/inlinebib/inlinebib.sty b/biblio/bibtex/contrib/inlinebib/inlinebib.sty
new file mode 100644
index 0000000000..b631dd2260
--- /dev/null
+++ b/biblio/bibtex/contrib/inlinebib/inlinebib.sty
@@ -0,0 +1,165 @@
+%% Copyright (C) 1994, 1995 Ren Seindal (rene@seindal.dk)
+
+% This files may be distributed under the terms of the LaTeX Project Public
+% License as distributed from CTAN archives in macros/latex/base/lppl.txt;
+% either version 1.0 or, at your option, any later version.
+
+\NeedsTeXFormat{LaTeX2e}
+\ProvidesPackage{inlinebib}[1994/12/06\space Inline bibliography style]
+\ProcessOptions
+
+ %% No labels in the final list of litterature.
+
+\let\@biblabel\@gobble
+
+
+ %% This is called for each bibitem without option in the bbl file.
+ %% The inlinebib style does not use bibitems with optional
+ %% arguments. The arguments are: #1 = key, #2 = basic entry, #3 =
+ %% notes for last reference list only, #4 = short entry for successive
+ %% citations. The period that ends an entry in the list is never
+ %% present in the inline reference. Punctuations should be added
+ %% manually.
+
+\long\def\@bibitem#1 #2 \note #3 \short #4 \end{\par\if@filesw
+ {\def\protect##1{\string ##1\space}%
+ \let\newblock\@empty
+ \immediate\write\@auxout{\string
+ \bibcite{#1}{\string\@bibcall{#1}{#2}{#4}}}}\fi
+ {\let\cite\shortcite #2#3}}
+% {\let\cite\shortcite #2}}
+
+
+
+ %% This is called from the aux file at the start of the job.
+
+\long\def\bibcite#1#2{\global\@namedef{b@#1}{#2}}
+
+
+
+
+ %% Set globally true iff an immediate following period should be
+ %% gobbled, because the citation ends in a period, e.g., from a
+ %% trailing "cit." or "ibid." and there is no optional part.
+
+\newif\if@gobbleperiod
+\newif\if@withpages
+
+
+ %% Separate the first and the following citations of a reference, and
+ %% handle successive identical citations of the same reference. Each
+ %% macro b@LABEL is defined as \@bibcall{LABEL}{FULLCITE}{SHORTCITE}.
+ %% The actual definition of b@LABELis not changed after the first
+ %% citation, since it provokes messages of "Labels may have changed"
+ %% from LaTeX.
+
+\def\@lastcite{}
+\def\noibid{\gdef\@lastcite{}}
+
+\long\def\@bibcall#1#2#3{\global\@gobbleperiodfalse
+ \@ifundefined{B@#1}%
+ {{#2}\global\@namedef{B@#1}{}}%
+ {\@bibsecond{#1}{#3}}%
+ \gdef\@lastcite{#1}%
+}
+
+\long\def\@bibsecond#1#2{%
+ \def\@tempa{#1}%
+ \ifx\@tempa\@lastcite {\em ibid.}\else {#2} cit.\fi
+ \if@withpages \else \global\@gobbleperiodtrue \fi
+}
+
+ %% Called for each normal \cite call. This version does not allow
+ %% multiple citations in one call, as it makes little sense. The
+ %% labels are much too long.
+
+\def\cite{\protect\@pcite}
+\def\@pcite{\@ifnextchar [{\@withpagestrue\@citex}{\@withpagesfalse\@citex[]}}
+
+\def\@citex[#1]#2{\if@filesw\immediate\write\@auxout{\string\citation{#2}}\fi
+ \@ifundefined{b@#2}%
+ {{\reset@font\bf ?}\@warning
+ {Citation `#2' on page \thepage \space undefined}}%
+ {\@cite{\@nameuse{b@#2}}{#1}}%
+ \let\next\relax
+ \if@gobbleperiod \let\next\check@period \fi
+ \next
+}
+
+
+ %% Produces the actual inline citation, no bracketes around it.
+
+\def\@cite#1#2{{#1\if@withpages , #2\fi}}
+
+
+ %% Remove a following period.
+
+\def\check@period{\futurelet\next\check@peri@d}
+\def\check@peri@d{\ifx\next .\let\next\eat@period
+ \else \let\next\relax \fi \next}
+\def\eat@period.{}
+
+
+
+
+
+ %% Forced full citation
+
+\def\fullycite{\protect\@pfcite}
+\def\@pfcite{\@ifnextchar [{\@withpagestrue\@fcitex}{\@withpagesfalse\@fcitex[]}}
+
+\def\@fcitex[#1]#2{\expandafter\let\csname B@#2\endcsname\undefined
+ \@citex[#1]{#2}}
+
+ %% Forced short citation, with no "cit." suffix or "ibid."
+ %% substitutions.
+
+\def\shortcite{\protect\@pscite}
+\def\@pscite{\@ifnextchar [{\@withpagestrue\@scitex}{\@withpagesfalse\@scitex[]}}
+
+\def\@scitex[#1]#2{\if@filesw\immediate\write\@auxout{\string\citation{#2}}\fi
+ \@ifundefined{b@#2}{{\reset@font\bf ?}\@warning
+ {Citation `#2' on page \thepage \space undefined}}%
+ {\long\def\@bibcall##1##2##3{##3}%
+ \@cite{\@nameuse{b@#2}}{#1}}}
+
+
+
+ %% Force full citations of the specified list of references.
+
+\def\fullcitenext#1{{\@tfor
+ \@tempa :=#1\do{\expandafter\global\expandafter
+ \let\csname B@\@tempa\endcsname\undefined}}}
+
+ %% Force short citations of the specified list of references.
+
+\def\shortcitenext#1{{\@for
+ \@tempa :=#1\do{\expandafter\global\expandafter
+ \let\csname B@\@tempa\endcsname\@empty}}}
+
+
+
+
+ %% This is to allow for an introduction to the bibliography
+
+\let\bibc@mment\@empty
+\long\def\bibliographycomment#1{%
+ \def\bibc@mment{\let\bibc@mment\@empty #1\par\bigskip}%
+}
+
+
+
+ %% Copied from report.sty, changed to avoid unwanted left margin and
+ %% add bibliography comment.
+
+\def\thebibliography#1{\chapter*{\bibname\@mkboth
+ {\uppercase{\bibname}}{\uppercase{\bibname}}}\bibc@mment
+ \small
+ \def\newblock{\hskip .11em plus.33em minus.07em}%
+ \sloppy\clubpenalty4000\widowpenalty4000
+ \sfcode`\.=\@m
+ \parindent\z@\relax
+ \parskip\medskipamount
+}
+
+\def\endthebibliography{\par\medskip}
diff --git a/biblio/bibtex/contrib/inlinebib/inlinebib.txt b/biblio/bibtex/contrib/inlinebib/inlinebib.txt
new file mode 100644
index 0000000000..cfd51dcee5
--- /dev/null
+++ b/biblio/bibtex/contrib/inlinebib/inlinebib.txt
@@ -0,0 +1,151 @@
+
+ Inline bibliography style
+
+ I want to have by BiBTeX generated references inlined in footnotes
+ rather than the very terse references BiBTeX generates by default, so
+ I hacked together a BiBTeX style to do that. These macros are not
+ polished or in the form of a proper distribution, but I have used them
+ with succes myself.
+
+ The following discription have been made in haste. I will document it
+ better when I have the time (RSN :-).
+
+ There are two files: [1]inlinebib.sty and [2]indexing.bst.
+
+The idea
+
+ This works just like any other BiBTeX style. It will still generate
+ the bibliography at the end of the document, but it will also store
+ all the entries in the .aux files, so they can be inlined in the
+ following latex run.
+
+ The first time a citation is made using \cite the complete
+ bibliography entry is inserted. The following citations to the same
+ entry will generate a short form, with only authors last name and a
+ shortened title, followed by a "cit.". If the same bibliography entry
+ is cited several times in a row, the text will only be "ibid.".
+
+ Citations of this form are designed to be used in footnotes.
+
+ A little example migth be appropriate (don't we all love
+ screenshots!).
+
+ Footnotes from page one:
+ [Example 1]
+
+ Footnotes from page two:
+ [Example 2]
+
+ (the overstrike problem is courtesy of xdvi(1))
+
+ It is not possible to avoid having the complete bibliography at the
+ end of the document. The macros simply won't work without it. If you
+ don't need it, just don't print it.
+
+Usage
+
+ Formalities
+
+ To use these macros put the file inlinebib.sty in your LaTeX search
+ path and inlinebib.bst in your BiBTeX style search path and then put
+ the line:
+
+\usepackage{inlinebib}
+
+ in the preamble of your document.
+
+ Other commands have to be added at the point where you want the
+ bibliography to appear, usually at the end of the document. To tell
+ BiBTeX to use the inlinebib style, you have to use bibliographystyle:
+
+\bibliographystyle{inlinebib}
+
+ Often I add a leading explanation to the bibliography with the
+ \bibliographycomment macro. That is:
+
+\bibliographycomment{This bibliography ...}
+
+ The actual index is produced by the \bibliography macro. Here you have
+ to specify which BiBTeX databases you want to use.
+
+\bibliography{file ...}
+
+ These were all the formalities.
+
+ Doing citations
+
+ When writing, just make citations as usual. Remember that these macros
+ can produce very verbose references, and they are intended for
+ footnotes.
+
+ The default implementation of \cite allows several bibliography
+ entries to be cited. This version allows only one at a time. It still
+ supports the optional argument, which should be a page reference
+ within the cited text.
+
+ There are a few additional macros available. \fullycite forces a
+ reference in the long form, \shortcite forces the short form, and
+ \noibid disables the generation "ibid." references for the next
+ citation (this can for example be used at the end of each chapter).
+
+ To force later citations for certain entries to be either long or
+ short, the macros \fullcitenext{} and \shortcitenext{} can be used.
+ The single argument is a comma separated list of BiBTeX labels that
+ should be either long or short the next time they are cited. E.g., the
+ code \fullcitenext{book1, book2} will cause LaTeX to forget that the
+ two references might have been seen earlier and they will be handled
+ as if they haven't be cited yet.
+
+ The BiBTeX databases
+
+ This style does not require special changes to the BiBTeX databases.
+
+ Sometimes the BiBTeX style doesn't manage to calculate the proper
+ short forms of the author and the title. In that case the BiBTeX
+ entries in question can be extended with shortauthor = {shorter author
+ name} and shorttitle = {short form of title}.
+
+Tips and tricks
+
+ I have some macros to format page ranges, that I use with this BiBTeX
+ style. They should be usable with other styles as well.
+
+ The macros are here: [3]pageranges.sty
+
+ This file defined one user visible macro: \pages{}, which will do the
+ following transformations of the single argument:
+
+ \pages{N}
+ becomes: p.~N
+
+ \pages{N-}
+ becomes: pp.~N~ff
+
+ \pages{N-M}
+ becomes: pp.~N--M
+
+ \pages{N M}
+ becomes: pp.~N M
+
+ The last version is for cases like \pages{213, 345 and~654} which will
+ become pp.~213, 345 and~654.
+
+ I often have this little definition in a LaTeX style file. It makes
+ \cite do page ranges automatically and also puts the author in the
+ index (see [4]the indexing macros).
+
+%% Automatically fix page ranges in citations and index author
+\let\RS@citex\@citex
+\def\@citex[#1]#2{\I@indexonly-{#2}\RS@citex[\pages{#1}]{#2}}
+
+Comments
+
+ If you have comments, please [5]write me.
+
+References
+
+ 1. http://www.seindal.dk/rene/software/TeX/inlinebib.sty
+ 2. http://www.seindal.dk/rene/software/TeX/inlinebib.bst
+ 3. http://www.seindal.dk/rene/software/TeX/pageranges.sty
+ 4. http://www.seindal.dk/rene/software/TeX/indexing.htm
+ 5. mailto:rene@seindal.dk?Subject=Inlinebibmacros
diff --git a/biblio/bibtex/contrib/inlinebib/inlinebib1.gif b/biblio/bibtex/contrib/inlinebib/inlinebib1.gif
new file mode 100644
index 0000000000..6bcbbd0c8c
--- /dev/null
+++ b/biblio/bibtex/contrib/inlinebib/inlinebib1.gif
Binary files differ
diff --git a/biblio/bibtex/contrib/inlinebib/inlinebib2.gif b/biblio/bibtex/contrib/inlinebib/inlinebib2.gif
new file mode 100644
index 0000000000..8aaec961c0
--- /dev/null
+++ b/biblio/bibtex/contrib/inlinebib/inlinebib2.gif
Binary files differ
diff --git a/biblio/bibtex/contrib/inlinebib/pageranges.sty b/biblio/bibtex/contrib/inlinebib/pageranges.sty
new file mode 100644
index 0000000000..97fa960334
--- /dev/null
+++ b/biblio/bibtex/contrib/inlinebib/pageranges.sty
@@ -0,0 +1,94 @@
+% Copyright (C) 1999 Ren Seindal (rene@seindal.dk)
+
+% This program can redistributed and/or modified under the terms
+% of the LaTeX Project Public License Distributed from CTAN
+% archives in directory macros/latex/base/lppl.txt; either
+% version 1 of the License, or (at your option) any later version.
+
+ %% Macros for citing.
+
+\let\@DEBUG@CIT\@gobble
+%\let\@DEBUG@CIT\typeout
+
+ %% \@PG does #1={a} -> {p.~a}
+ %% and #1={a-} -> {pp.~a~ff}
+ %% and #1={a-b} -> {pp.~a--b}
+ %% and #1={a b} -> {pp.~a b}
+
+\def\@PG#1{%
+ \@DEBUG@CIT{START: #1}%
+ {\@@PG#1 \@nil}%
+}
+
+\newcommand\pages[2][\@gobble]{#1{, }\@PG{#2}}
+
+\def\@@PG#1 #2\@nil{%
+ \def\@tempa{#1}%
+ \def\@tempb{#2}%
+ \ifx\@tempb\@empty
+ \def\next{\@PGrange#1-\@nil}%
+ \else
+ \let\next\@PGspace
+ \fi
+ \next
+}
+
+ %% argument is "a-b"; tmpa="X" tmpb=void
+
+\def\@PGrange#1-#2\@nil{\hbox{%
+ \@DEBUG@CIT{RANGE: =#1=#2=}%
+ \def\@tempb{#2}%
+ \ifx\@tempb\@empty
+ p.~#1%
+ \else
+ pp.~#1%
+ \edef\@tempb{\@PGundash#2}%
+ \ifx\@tempb\@empty
+ ff%
+ \else
+ --\@tempb
+ \fi
+ \fi
+}}
+
+\def\@PGundash#1-{#1}
+
+
+ %% argument is "a b"; tmpa="a" tmpb="b "
+
+\def\@PGspace{%
+ \@DEBUG@CIT{SPACE: =\@tempa=\@tempb=}%
+ \ifx\@tempb\@empty
+ \else
+ p%
+ \fi
+ p.~\expandafter\@PGdash\@tempa-\@nil%
+ \expandafter\@PGdashloop\@tempb\@nil%
+}
+
+ %% argument is "b"; tmpa="a" tmpb="b "
+
+\def\@PGdashloop#1 #2\@nil{%
+ \@DEBUG@CIT{TEST: =#1=#2=}%
+ \space\@PGdash#1-\@nil%
+ \def\@tempa{#2}%
+ \ifx\@tempa\@empty
+ \else
+ \@PGdashloop#2\@nil%
+ \fi
+}
+
+\def\@PGdash#1-#2\@nil{\hbox{#1%
+ \@DEBUG@CIT{DASH: =#1=#2=}%
+ \def\@tempa{#2}%
+ \ifx\@tempa\@empty
+ \else
+ \edef\@tempa{\@PGundash#2}%
+ \ifx\@tempa\@empty
+ ff%
+ \else
+ --\@tempa
+ \fi
+ \fi
+}}
+
diff --git a/biblio/bibtex/contrib/iopart-num/README b/biblio/bibtex/contrib/iopart-num/README
new file mode 100644
index 0000000000..6e4bbd99da
--- /dev/null
+++ b/biblio/bibtex/contrib/iopart-num/README
@@ -0,0 +1,22 @@
+iopart-num -- BibTeX style for IOP journals
+
+--------------------------------
+
+The iopart-num BibTeX style is intended for use with Institute of
+Physics Publishing journals, including Journal of Physics. A numeric
+citation style with Harvard-like formatting is provided, based upon
+the specification in "How to prepare and submit an article for
+publication in an IOP journal using LaTeX2e" by Graham Douglas (2005).
+
+The distribution contains the BibTeX style file (iopart-num.bst), the
+source files for the documentation (iopart-num.tex and
+iopart-num.bib), and a PDF file of the documentation (iopart-num.pdf).
+
+--------------------------------
+
+Mark A. Caprio, Yale University
+January 22, 2009
+Version 2.1
+
+This material is subject to the LaTeX Project Public License. See
+http://www.latex-project.org/lppl.txt for the details of that license.
diff --git a/biblio/bibtex/contrib/iopart-num/iopart-num.bib b/biblio/bibtex/contrib/iopart-num/iopart-num.bib
new file mode 100644
index 0000000000..c9b7292e47
--- /dev/null
+++ b/biblio/bibtex/contrib/iopart-num/iopart-num.bib
@@ -0,0 +1,174 @@
+@article{ex1,
+ author = "A. Cisneros",
+ journal = "Astrophys. Space Sci.",
+ volume = 10,
+ pages = 87,
+ year = 1971
+}
+
+@article{ex2,
+ author = "S. Carlip and R. Vera",
+ journal = "Phys. Rev. D",
+ section = "D",
+ volume = 58,
+ pages = 011345,
+ year = 1998
+}
+
+@article{ex3,
+ author = "K. Davies and G. Brown",
+ journal = "J. High Energy Phys.",
+ pages = "JHEP12(1997)002",
+ year = 1997
+}
+
+@article{ex4,
+ author = "D. Neilson and M. Choptuik",
+ journal = "Class. Quantum Grav.",
+ volume = 17,
+ pages = 761,
+ year = 2000,
+ eprint = "gr-qc/9812053"
+}
+
+@unpublished{ex5,
+ author = "M. Harrison",
+ title = "Dipheomorphism-invariant manifolds",
+ year = 1999,
+ eprint = "hep-th/9909196"
+}
+
+@inbook{ex6,
+ author = "L. I. Dorman",
+ title = "Variations of Galactic Cosmic Rays",
+ publisher = "Moscow State University Press",
+ address = "Moscow",
+ year = 1975,
+ pages = 103
+}
+
+@inbook{ex7,
+ author = "R. Caplar and P. Kulisic",
+ title = "Proc. Int. Conf. on Nuclear Physics (Munich)",
+ publisher = "North-Holland/American Elsevier",
+ address = "Amsterdam",
+ year = 1973,
+ volume = 1,
+ pages = 517
+}
+
+@incollection{ex8,
+ author = "M. Morse",
+ title = "Supersonic beam sources",
+ booktitle = "Atomic Molecular and Optical Physics",
+ editor = "F. B. Dunning and R. Hulet",
+ series = "Experimental Methods in the Physical Sciences",
+ volume = 29,
+ publisher = "Academic",
+ address = "San Diego",
+ year = 1996
+}
+
+@book{ex9,
+ title = "Gulf War and Health",
+ volume = 1,
+ volumetitle = "Depleted Uranium, Pyridostigmine Bromide, Sarin, and Vaccines",
+ editor = "C. E. Fulco and C. T. Liverman and H. C. Sox",
+ publisher = "The National Academies Press",
+ address = "Washington, DC",
+ year = 2000
+}
+
+@article{bardeen1957:bcs,
+ author = "J. Bardeen and L. N. Cooper and J. R. Schrieffer",
+ journal = "Phys. Rev.",
+ volume = 108,
+ number = 5,
+ pages = 1175,
+ year = 1957
+}
+
+@article{caprio2005:coherent,
+ author = "M. A. Caprio",
+ journal = "J. Phys. A",
+ section = "A",
+ volume = 38,
+ number = 28,
+ pages = 6385,
+ year = 2005
+}
+
+@article{zamfir2005:132te-beta-enam04,
+ author = "N. V. Zamfir and others",
+ journal = "Eur. Phys. J. A",
+ section = "A",
+ volume = 25,
+ number = "s01",
+ issue = "s01",
+ year = 2005,
+ pages = 389
+}
+
+@book{rose1957:am,
+ author = "M. E. Rose",
+ title = "Elementary Theory of Angular Momentum",
+ publisher = "Wiley",
+ address = "New York",
+ year = 1957,
+}
+
+@book{dirac1958:qm,
+ author = "P. A. M. Dirac",
+ title = "The Principles of Quantum Mechanics",
+ series = "The International Series of Monographs on Physics",
+ number = 27,
+ edition = 4,
+ publisher = "Clarendon Press",
+ address = "Oxford",
+ year = 1967
+}
+
+@book{iachello2006:liealg,
+ author = "F. Iachello",
+ title = "Lie Algebras and Applications",
+ publisher = "Springer",
+ series = "Lecture Notes in Physics",
+ volume = 708,
+ address = "Berlin",
+ year = 2006
+}
+
+@book{siegbahn1965:v1,
+ editor = "K. Siegbahn",
+ title = "Alpha-, Beta-, and Gamma-Ray Spectroscopy",
+ booktitle = "Alpha-, Beta-, and Gamma-Ray Spectroscopy",
+ publisher = "North-Holland",
+ address = "Amsterdam",
+ year = 1965,
+ volume = 1
+}
+
+@book{bohr1998:v2,
+ author = "A. Bohr and B. R. Mottelson",
+ title = "Nuclear Structure",
+ volume = 2,
+ volumetitle = "Nuclear Deformations",
+ publisher = "World Scientific",
+ address = "Singapore",
+ year = "1998"
+}
+
+@phdthesis{caprio2003:diss,
+ author = "M. A. Caprio",
+ school = "Yale University",
+ year = 2003,
+ eprint = "nucl-ex/0502004",
+ archive = "arXiv"
+}
+
+@misc{doePC,
+ author = "J. Doe",
+ year = 2006,
+ note = "private communication"
+}
+
diff --git a/biblio/bibtex/contrib/iopart-num/iopart-num.bst b/biblio/bibtex/contrib/iopart-num/iopart-num.bst
new file mode 100644
index 0000000000..cc46b18766
--- /dev/null
+++ b/biblio/bibtex/contrib/iopart-num/iopart-num.bst
@@ -0,0 +1,1722 @@
+% iopart-num.bst -- BibTeX style for IOP journals (Harvard-like numeric style)
+% M. A. Caprio
+%
+% DESCRIPTION
+%
+% Further documenation may be found in iopart-num.pdf.
+%
+% Available from CTAN as /biblio/bibtex/contrib/iopart-num.
+%
+% COPYRIGHT/LICENSE
+%
+% Copyright 2009 M. A. Caprio
+%
+% This work may be distributed and/or modified under the
+% conditions of the LaTeX Project Public License, either
+% version 1.3 of this license or (at your option) any later
+% version. The latest version of this license is in
+% http://www.latex-project.org/lppl.txt
+% and version 1.3 or later is part of all distributions of
+% LaTeX version 2005/12/01 or later.
+%
+% This work has the LPPL maintenance status "maintained".
+%
+% The Current Maintainer of this work is the author.
+%
+% The contents of this work are listed in the README file.
+%
+% HISTORY
+%
+% Version 1.0 (2005/07/11)
+% Created using custom-bib (merlin.mbs), with following manual modifications:
+% -- remove trailing period from predefined volume, page, etc., abbreviations
+% -- provide command \newblock to fix incompatibility between natbib
+% and iopart (as of iopart version 1996/06/10)
+% -- move edition after booktitle
+% -- add version identifier to generated output
+% -- for incollection and inproceedings, move volume from after publisher to before
+% -- for any series with number, number after series
+% Version 2.0 (2006/12/21)
+% -- define section field for proper formatting of lettered journal sections
+% (suggested by Chris Latham)
+% -- suppress printing of number for article, but provide issue field
+% for periodicals with issue-based page numbering (suggested by Chris Latham)
+% -- patch remove.dots to not strip "\." control sequence (bug reported by Kevin Bube)
+% -- define epilog field (undocumented)
+% -- delete predefined computer science journal names
+% -- bring book volume+number or series+number formatting into IOP form
+% -- for book, inbook, and proceedings with editors but no author, fix formating of editors
+% -- for incollection and inproceedings, put editors in correct location
+% -- for journal: use same page formatting even if volume missing
+% Version 2.1 (2009/01/22)
+% -- for incollection and inproceedings: support title of chapter (not appropriate
+% to inbook)
+% -- for book, proceedings, etc.: support volumetitle for multivolume book
+%
+% LIMITATIONS
+%
+% Still not in IOP form:
+% -- for incollection and inproceedings, editors initials should preceed rather
+% than follow last name
+% Other:
+% -- hyphenated first names lose hyphen
+
+%% This is file `iopart-num.bst',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% merlin.mbs (with options: `seq-no,nm-rv,dt-beg,yr-blk,xmth,yrp-x,jtit-x,vol-bf,volp-blk,num-xser,jnm-x,add-pub,pub-par,pre-pub,isbn,issn,blk-com,com-blank,fin-bare,pp,ed,abr,ednx,mth-bare,ord,jabr,and-xcom,etal-it,revdata,eprint,url,url-blk')
+%% ----------------------------------------
+%% *** Institute of Physics (IOP) journals; Harvard-like numeric style ***
+%%
+%% Copyright 1994-2002 Patrick W Daly
+ % ===============================================================
+ % IMPORTANT NOTICE:
+ % This bibliographic style (bst) file has been generated from one or
+ % more master bibliographic style (mbs) files, listed above.
+ %
+ % This generated file can be redistributed and/or modified under the terms
+ % of the LaTeX Project Public License Distributed from CTAN
+ % archives in directory macros/latex/base/lppl.txt; either
+ % version 1 of the License, or any later version.
+ % ===============================================================
+ % Name and version information of the main mbs file:
+ % \ProvidesFile{merlin.mbs}[2002/10/21 4.05 (PWD, AO, DPC)]
+ % For use with BibTeX version 0.99a or later
+ %-------------------------------------------------------------------
+ % This bibliography style file is intended for texts in ENGLISH
+ % This is a numerical citation style, and as such is standard LaTeX.
+ % It requires no extra package to interface to the main text.
+ % The form of the \bibitem entries is
+ % \bibitem{key}...
+ % Usage of \cite is as follows:
+ % \cite{key} ==>> [#]
+ % \cite[chap. 2]{key} ==>> [#, chap. 2]
+ % where # is a number determined by the ordering in the reference list.
+ % The order in the reference list is that by which the works were originally
+ % cited in the text, or that in the database.
+ %---------------------------------------------------------------------
+
+ENTRY
+ { address
+ archive
+ author
+ booktitle
+ chapter
+ collaboration
+ edition
+ editor
+ eid
+ eprint
+ howpublished
+ institution
+ isbn
+ issn
+ journal
+ key
+ month
+ note
+ number
+ numpages
+ organization
+ pages
+ publisher
+ school
+ series
+ title
+ type
+ url
+ volume
+ year
+%mc
+ issue
+ section
+ epilog
+ volumetitle
+ transjournal
+ transsection
+ transvolume
+ transnumber
+ transissue
+ transpages
+ transyear
+ }
+ {}
+ { label }
+
+FUNCTION {not}
+{ { #0 }
+ { #1 }
+ if$
+}
+FUNCTION {and}
+{ 'skip$
+ { pop$ #0 }
+ if$
+}
+FUNCTION {or}
+{ { pop$ #1 }
+ 'skip$
+ if$
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% mc utilities
+% require merlin.mbs logical operators and field.or.null
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+% hang -- {hang} suspends execution, for debugging purposes
+% Note that not all pending output may have been flushed.
+FUNCTION {hang}
+{
+ {#1} {skip$} while$
+}
+
+% string.length -- {s string.length} returns the true character length of s
+% In contrast, text.length$ gives special treatment to LaTeX
+% accents ("special characters") and braces.
+% Example: "" string.length -> 0
+% Example: "hello" string.length -> 5
+
+STRINGS {string.length.s }
+INTEGERS {string.length.i }
+FUNCTION {string.length}
+{
+ 'string.length.s :=
+ #0 'string.length.i :=
+ {
+ string.length.s #1 #1 substring$ "" = not
+ }
+ {
+ string.length.i #1 + 'string.length.i :=
+ string.length.s #2 global.max$ substring$ 'string.length.s :=
+ }
+ while$
+ string.length.i
+}
+
+% shared working variables for stripping functions
+STRINGS { strip.s strip.t }
+INTEGERS { strip.i }
+
+% strip.leading -- {s t strip.leading} strips t from s if it appears
+% as an initial substring
+% Example: "abcdef" "abc" strip.leading -> "def"
+% Example: "abcdef" "xyz" strip.leading -> "abcdef"
+
+FUNCTION{strip.leading}
+{
+ 'strip.t :=
+ 'strip.s :=
+ strip.t string.length 'strip.i :=
+ strip.s #1 strip.i substring$ strip.t =
+ { strip.s strip.i #1 + global.max$ substring$ }
+ { strip.s }
+ if$
+}
+
+% strip.trailing -- {s t strip.trailing} strips t from s if it appears
+% as a terminal substring
+% Example: "abcdef" "def" strip.trailing -> "abc"
+% Example: "abcdef" "xyz" strip.trailing -> "abcdef"
+FUNCTION{strip.trailing}
+{
+ 'strip.t :=
+ 'strip.s :=
+ strip.t string.length 'strip.i :=
+ strip.s #-1 strip.i substring$ strip.t =
+ { strip.s #-1 strip.i - global.max$ substring$ }
+ { strip.s }
+ if$
+}
+
+% trim -- {s trim} strips any trailing whitespace from s
+% Example: "abcdef " trim -> "abcdef"
+STRINGS {trim.s trim.t}
+FUNCTION{trim}
+{
+ 'trim.s :=
+ {
+ trim.s #-1 #1 substring$ 'trim.t :=
+ trim.t empty$ trim.t string.length #0 > and
+ }
+ { trim.s #-2 global.max$ substring$ 'trim.s := }
+ while$
+ trim.s
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+
+INTEGERS { output.state before.all mid.sentence after.sentence after.block }
+FUNCTION {init.state.consts}
+{ #0 'before.all :=
+ #1 'mid.sentence :=
+ #2 'after.sentence :=
+ #3 'after.block :=
+}
+STRINGS { s t}
+
+FUNCTION {output.nonnull}
+{ 's :=
+ output.state mid.sentence =
+ { " " * write$ }
+ { output.state after.block =
+ { add.period$ write$
+ newline$
+ "\newblock " write$
+ }
+ { output.state before.all =
+ 'write$
+ { add.period$ " " * write$ }
+ if$
+ }
+ if$
+ mid.sentence 'output.state :=
+ }
+ if$
+ s
+}
+FUNCTION {output}
+{ duplicate$ empty$
+ 'pop$
+ 'output.nonnull
+ if$
+}
+FUNCTION {output.check}
+{ 't :=
+ duplicate$ empty$
+ { pop$ "empty " t * " in " * cite$ * warning$ }
+ 'output.nonnull
+ if$
+}
+
+%mc
+FUNCTION {format.epilog}
+{ epilog duplicate$ empty$
+ { pop$ }
+ { * }
+ if$
+}
+%mc end
+
+
+FUNCTION {fin.entry}
+{
+%mc
+format.epilog
+%mc end
+ duplicate$ empty$
+ 'pop$
+ 'write$
+ if$
+ newline$
+}
+
+FUNCTION {new.block}
+{ output.state before.all =
+ 'skip$
+ { after.block 'output.state := }
+ if$
+}
+FUNCTION {new.sentence}
+{ output.state after.block =
+ 'skip$
+ { output.state before.all =
+ 'skip$
+ { after.sentence 'output.state := }
+ if$
+ }
+ if$
+}
+FUNCTION {add.blank}
+{ " " * before.all 'output.state :=
+}
+
+FUNCTION {date.block}
+{
+ add.blank
+}
+
+STRINGS {z}
+FUNCTION {remove.dots}
+{ 'z :=
+ ""
+ { z empty$ not }
+ {
+%mc patch to preserve the control sequence \. if it appears in a name
+ z #1 #2 substring$ "\." =
+ {
+ % process "\." sequence
+ z #3 global.max$ substring$ 'z :=
+ "\." *
+ }
+ {
+ % process regular character
+ z #1 #1 substring$
+ z #2 global.max$ substring$ 'z :=
+ duplicate$ "." = 'pop$
+ { * }
+ if$
+ }
+ if$
+%mc
+ }
+ while$
+}
+FUNCTION {new.block.checka}
+{ empty$
+ 'skip$
+ 'new.block
+ if$
+}
+FUNCTION {new.block.checkb}
+{ empty$
+ swap$ empty$
+ and
+ 'skip$
+ 'new.block
+ if$
+}
+FUNCTION {new.sentence.checka}
+{ empty$
+ 'skip$
+ 'new.sentence
+ if$
+}
+FUNCTION {new.sentence.checkb}
+{ empty$
+ swap$ empty$
+ and
+ 'skip$
+ 'new.sentence
+ if$
+}
+FUNCTION {field.or.null}
+{ duplicate$ empty$
+ { pop$ "" }
+ 'skip$
+ if$
+}
+FUNCTION {emphasize}
+{ duplicate$ empty$
+ { pop$ "" }
+ { "{\em " swap$ * "\/}" * }
+ if$
+}
+FUNCTION {bolden}
+{ duplicate$ empty$
+ { pop$ "" }
+ { "{\bf " swap$ * "}" * }
+ if$
+}
+FUNCTION {tie.or.space.prefix}
+{ duplicate$ text.length$ #3 <
+ { "~" }
+ { " " }
+ if$
+ swap$
+}
+
+FUNCTION {capitalize}
+{ "u" change.case$ "t" change.case$ }
+
+FUNCTION {space.word}
+{ " " swap$ * " " * }
+ % Here are the language-specific definitions for explicit words.
+ % Each function has a name bbl.xxx where xxx is the English word.
+ % The language selected here is ENGLISH
+FUNCTION {bbl.and}
+{ "and"}
+
+FUNCTION {bbl.etal}
+{ "et~al." }
+
+FUNCTION {bbl.editors}
+{ "eds" }
+
+FUNCTION {bbl.editor}
+{ "ed" }
+
+FUNCTION {bbl.edby}
+{ "edited by" }
+
+FUNCTION {bbl.edition}
+{ "ed" }
+
+FUNCTION {bbl.volume}
+{ "vol" }
+
+FUNCTION {bbl.of}
+{ "of" }
+
+FUNCTION {bbl.number}
+{ "no" }
+
+FUNCTION {bbl.nr}
+{ "no" }
+
+FUNCTION {bbl.in}
+{ "in" }
+
+FUNCTION {bbl.pages}
+{ "pp" }
+
+FUNCTION {bbl.page}
+{ "p" }
+
+FUNCTION {bbl.eidpp}
+{ "pages" }
+
+FUNCTION {bbl.chapter}
+{ "chap" }
+
+FUNCTION {bbl.techrep}
+{ "Tech. Rep." }
+
+FUNCTION {bbl.mthesis}
+{ "Master's thesis" }
+
+FUNCTION {bbl.phdthesis}
+{ "Ph.D. thesis" }
+
+FUNCTION {bbl.first}
+{ "1st" }
+
+FUNCTION {bbl.second}
+{ "2nd" }
+
+FUNCTION {bbl.third}
+{ "3rd" }
+
+FUNCTION {bbl.fourth}
+{ "4th" }
+
+FUNCTION {bbl.fifth}
+{ "5th" }
+
+FUNCTION {bbl.st}
+{ "st" }
+
+FUNCTION {bbl.nd}
+{ "nd" }
+
+FUNCTION {bbl.rd}
+{ "rd" }
+
+FUNCTION {bbl.th}
+{ "th" }
+
+MACRO {jan} {"Jan."}
+
+MACRO {feb} {"Feb."}
+
+MACRO {mar} {"Mar."}
+
+MACRO {apr} {"Apr."}
+
+MACRO {may} {"May"}
+
+MACRO {jun} {"Jun."}
+
+MACRO {jul} {"Jul."}
+
+MACRO {aug} {"Aug."}
+
+MACRO {sep} {"Sep."}
+
+MACRO {oct} {"Oct."}
+
+MACRO {nov} {"Nov."}
+
+MACRO {dec} {"Dec."}
+
+FUNCTION {eng.ord}
+{ duplicate$ "1" swap$ *
+ #-2 #1 substring$ "1" =
+ { bbl.th * }
+ { duplicate$ #-1 #1 substring$
+ duplicate$ "1" =
+ { pop$ bbl.st * }
+ { duplicate$ "2" =
+ { pop$ bbl.nd * }
+ { "3" =
+ { bbl.rd * }
+ { bbl.th * }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+}
+
+FUNCTION {bibinfo.check}
+{ swap$
+ duplicate$ missing$
+ {
+ pop$ pop$
+ ""
+ }
+ { duplicate$ empty$
+ {
+ swap$ pop$
+ }
+ { swap$
+ pop$
+ }
+ if$
+ }
+ if$
+}
+FUNCTION {bibinfo.warn}
+{ swap$
+ duplicate$ missing$
+ {
+ swap$ "missing " swap$ * " in " * cite$ * warning$ pop$
+ ""
+ }
+ { duplicate$ empty$
+ {
+ swap$ "empty " swap$ * " in " * cite$ * warning$
+ }
+ { swap$
+ pop$
+ }
+ if$
+ }
+ if$
+}
+%% FUNCTION {format.eprint}
+%% { eprint duplicate$ empty$
+%% 'skip$
+%% { "\eprint"
+%% archive empty$
+%% 'skip$
+%% { "[" * archive * "]" * }
+%% if$
+%% "{" * swap$ * "}" *
+%% }
+%% if$
+%% }
+FUNCTION {format.eprint}
+{ eprint duplicate$ empty$
+ 'skip$
+ {
+ "(\textit{Preprint} "
+ swap$
+ "\eprint"
+ archive empty$
+ 'skip$
+ { "[" * archive * "]" * }
+ if$
+ "{" * swap$ * "}" *
+ *
+ ")"
+ *
+ }
+ if$
+}
+
+FUNCTION {format.url}
+{ url empty$
+ { "" }
+ { "\urlprefix\url{" url * "}" * }
+ if$
+}
+
+STRINGS { bibinfo}
+INTEGERS { nameptr namesleft numnames }
+
+FUNCTION {format.names}
+{ 'bibinfo :=
+ duplicate$ empty$ 'skip$ {
+ 's :=
+ "" 't :=
+ #1 'nameptr :=
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ { s nameptr
+ "{vv~}{ll}{ jj}{ f{~}}"
+ format.name$
+ remove.dots
+ bibinfo bibinfo.check
+ 't :=
+ nameptr #1 >
+ {
+ namesleft #1 >
+ { ", " * t * }
+ {
+ s nameptr "{ll}" format.name$ duplicate$ "others" =
+ { 't := }
+ { pop$ }
+ if$
+ t "others" =
+ {
+ " " * bbl.etal emphasize *
+ }
+ {
+ bbl.and
+ space.word * t *
+ }
+ if$
+ }
+ if$
+ }
+ 't
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+ } if$
+}
+FUNCTION {format.names.ed}
+{
+ 'bibinfo :=
+ duplicate$ empty$ 'skip$ {
+ 's :=
+ "" 't :=
+ #1 'nameptr :=
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ { s nameptr
+ "{f{~}~}{vv~}{ll}{ jj}"
+ format.name$
+ remove.dots
+ bibinfo bibinfo.check
+ 't :=
+ nameptr #1 >
+ {
+ namesleft #1 >
+ { ", " * t * }
+ {
+ s nameptr "{ll}" format.name$ duplicate$ "others" =
+ { 't := }
+ { pop$ }
+ if$
+ t "others" =
+ {
+
+ " " * bbl.etal emphasize *
+ }
+ {
+ bbl.and
+ space.word * t *
+ }
+ if$
+ }
+ if$
+ }
+ 't
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+ } if$
+}
+FUNCTION {format.authors}
+{ author "author" format.names
+ duplicate$ empty$ 'skip$
+ { collaboration "collaboration" bibinfo.check
+ duplicate$ empty$ 'skip$
+ { " (" swap$ * ")" * }
+ if$
+ *
+ }
+ if$
+}
+FUNCTION {get.bbl.editor}
+{ editor num.names$ #1 > 'bbl.editors 'bbl.editor if$ }
+
+FUNCTION {format.editors}
+{ editor "editor" format.names duplicate$ empty$ 'skip$
+ {
+%% "," *
+%% " " *
+%% get.bbl.editor
+%% *
+%mc
+ " " *
+ "(" *
+ get.bbl.editor
+ *
+ ")" *
+%mc end
+ }
+ if$
+}
+%mc
+FUNCTION {format.editors.inline}
+{ editor "editor" format.names duplicate$ empty$ 'skip$
+ {
+ bbl.editor " " *
+ swap$
+ *
+ }
+ if$
+}
+%mc end
+
+FUNCTION {format.isbn}
+{ isbn "isbn" bibinfo.check
+ duplicate$ empty$ 'skip$
+ {
+ "ISBN " swap$ *
+ }
+ if$
+}
+
+FUNCTION {format.issn}
+{ issn "issn" bibinfo.check
+ duplicate$ empty$ 'skip$
+ {
+ "ISSN " swap$ *
+ }
+ if$
+}
+
+FUNCTION {format.note}
+{
+ note empty$
+ { "" }
+ { note #1 #1 substring$
+ duplicate$ "{" =
+ 'skip$
+ { output.state mid.sentence =
+ { "l" }
+ { "u" }
+ if$
+ change.case$
+ }
+ if$
+ note #2 global.max$ substring$ * "note" bibinfo.check
+ }
+ if$
+}
+
+FUNCTION {format.title}
+{ title
+ duplicate$ empty$ 'skip$
+ { "t" change.case$ }
+ if$
+ "title" bibinfo.check
+}
+FUNCTION {output.bibitem}
+{ newline$
+ "\bibitem{" write$
+ cite$ write$
+ "}" write$
+ newline$
+ ""
+ before.all 'output.state :=
+}
+
+FUNCTION {n.dashify}
+{
+ 't :=
+ ""
+ { t empty$ not }
+ { t #1 #1 substring$ "-" =
+ { t #1 #2 substring$ "--" = not
+ { "--" *
+ t #2 global.max$ substring$ 't :=
+ }
+ { { t #1 #1 substring$ "-" = }
+ { "-" *
+ t #2 global.max$ substring$ 't :=
+ }
+ while$
+ }
+ if$
+ }
+ { t #1 #1 substring$ *
+ t #2 global.max$ substring$ 't :=
+ }
+ if$
+ }
+ while$
+}
+
+FUNCTION {word.in}
+{ bbl.in
+ " " * }
+
+FUNCTION {format.date}
+{
+ ""
+ duplicate$ empty$
+ year "year" bibinfo.check duplicate$ empty$
+ { swap$ 'skip$
+ { "there's a month but no year in " cite$ * warning$ }
+ if$
+ *
+ }
+ { swap$ 'skip$
+ {
+ swap$
+ " " * swap$
+ }
+ if$
+ *
+ remove.dots
+ }
+ if$
+ duplicate$ empty$
+ 'skip$
+ {
+ before.all 'output.state :=
+ " " swap$ *
+ }
+ if$
+}
+FUNCTION {format.btitle}
+{ title "title" bibinfo.check
+ duplicate$ empty$ 'skip$
+ {
+ emphasize
+ }
+ if$
+}
+FUNCTION {either.or.check}
+{ empty$
+ 'pop$
+ { "can't use both " swap$ * " fields in " * cite$ * warning$ }
+ if$
+}
+FUNCTION {format.bvolume}
+{ volume empty$
+ % no volume: return blank
+ { "" }
+%% { bbl.volume volume tie.or.space.prefix
+%% "volume" bibinfo.check * *
+%% series "series" bibinfo.check
+%% duplicate$ empty$ 'pop$
+%% { swap$ bbl.of space.word * swap$
+%% emphasize * }
+%% if$
+%% "volume and number" number either.or.check
+%% }
+%mc
+ {
+ series "series" bibinfo.check
+ empty$
+ % no series: must be multivolume book
+ {
+ bbl.volume volume tie.or.space.prefix "volume" bibinfo.check * *
+ volumetitle empty$
+ 'skip$
+ % volumetitle: book volume has title
+ { " " volumetitle "volumetitle" bibinfo.check emphasize * * }
+ if$
+ }
+ % series: format as volume in series
+ {
+ "("
+ series "series" bibinfo.check emphasize *
+ " " * bbl.volume *
+ volume tie.or.space.prefix "volume" bibinfo.check *
+ ")" * *
+ }
+ if$
+ "volume and number" number either.or.check
+ }
+%mc end
+ if$
+}
+FUNCTION {format.number.series}
+{ volume empty$
+ { number empty$
+ { series field.or.null }
+ { series empty$
+ { number "number" bibinfo.check }
+ {
+ %% output.state mid.sentence =
+ %% { bbl.number }
+ %% { bbl.number capitalize }
+ %% if$
+ %% number tie.or.space.prefix "number" bibinfo.check * *
+ %% bbl.in space.word *
+ %% series "series" bibinfo.check *
+ %% " " * bbl.number *
+ %% number tie.or.space.prefix "number" bibinfo.check * *
+%mc
+ "("
+ series "series" bibinfo.check emphasize *
+ " " * bbl.number *
+ number tie.or.space.prefix "number" bibinfo.check *
+ ")" *
+ *
+%mc end
+ }
+ if$
+ }
+ if$
+ }
+ { "" }
+ if$
+}
+
+
+FUNCTION {is.num}
+{ chr.to.int$
+ duplicate$ "0" chr.to.int$ < not
+ swap$ "9" chr.to.int$ > not and
+}
+
+FUNCTION {extract.num}
+{ duplicate$ 't :=
+ "" 's :=
+ { t empty$ not }
+ { t #1 #1 substring$
+ t #2 global.max$ substring$ 't :=
+ duplicate$ is.num
+ { s swap$ * 's := }
+ { pop$ "" 't := }
+ if$
+ }
+ while$
+ s empty$
+ 'skip$
+ { pop$ s }
+ if$
+}
+
+FUNCTION {convert.edition}
+{ extract.num "l" change.case$ 's :=
+ s "first" = s "1" = or
+ { bbl.first 't := }
+ { s "second" = s "2" = or
+ { bbl.second 't := }
+ { s "third" = s "3" = or
+ { bbl.third 't := }
+ { s "fourth" = s "4" = or
+ { bbl.fourth 't := }
+ { s "fifth" = s "5" = or
+ { bbl.fifth 't := }
+ { s #1 #1 substring$ is.num
+ { s eng.ord 't := }
+ { edition 't := }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+ t
+}
+
+FUNCTION {format.edition}
+{ edition duplicate$ empty$ 'skip$
+ {
+ convert.edition
+ output.state mid.sentence =
+ { "l" }
+ { "t" }
+ if$ change.case$
+ "edition" bibinfo.check
+ " " * bbl.edition *
+ }
+ if$
+}
+INTEGERS { multiresult }
+FUNCTION {multi.page.check}
+{ 't :=
+ #0 'multiresult :=
+ { multiresult not
+ t empty$ not
+ and
+ }
+ { t #1 #1 substring$
+ duplicate$ "-" =
+ swap$ duplicate$ "," =
+ swap$ "+" =
+ or or
+ { #1 'multiresult := }
+ { t #2 global.max$ substring$ 't := }
+ if$
+ }
+ while$
+ multiresult
+}
+FUNCTION {format.pages}
+{ pages duplicate$ empty$ 'skip$
+ { duplicate$ multi.page.check
+ {
+ bbl.pages swap$
+ n.dashify
+ }
+ {
+ bbl.page swap$
+ }
+ if$
+ tie.or.space.prefix
+ "pages" bibinfo.check
+ * *
+ }
+ if$
+}
+FUNCTION {format.journal.pages}
+{ pages duplicate$ empty$ 'pop$
+%mc { swap$ duplicate$ empty$
+%mc { pop$ pop$ format.pages }
+%mc {
+%mc " " *
+%mc swap$
+%mc n.dashify
+%mc "pages" bibinfo.check
+%mc *
+%mc }
+%mc if$
+%mc }
+ { swap$
+ " " *
+ swap$
+ n.dashify
+ "pages" bibinfo.check
+ *
+ }
+ if$
+}
+FUNCTION {format.journal.eid}
+{ eid "eid" bibinfo.check
+ duplicate$ empty$ 'skip$
+ { swap$ duplicate$ empty$ 'skip$
+ {
+ " " *
+ }
+ if$
+ swap$
+ numpages empty$ 'skip$
+ { bbl.eidpp numpages tie.or.space.prefix
+ "numpages" bibinfo.check * *
+ " (" swap$ * ")" * *
+ }
+ if$
+ }
+ if$ *
+}
+FUNCTION {format.vol.num.pages}
+{ volume field.or.null
+%mc section handling
+ section field.or.null strip.leading
+ section field.or.null strip.trailing trim
+%mc end
+ duplicate$ empty$ 'skip$
+ {
+ "volume" bibinfo.check
+ }
+ if$
+ bolden
+%mc number "number" bibinfo.check duplicate$ empty$ 'skip$
+ issue "issue" bibinfo.check duplicate$ empty$ 'skip$
+ {
+ swap$ duplicate$ empty$
+%mc { "there's a number but no volume in " cite$ * warning$ }
+ { "there's an issue but no volume in " cite$ * warning$ }
+ 'skip$
+ if$
+ swap$
+ "(" swap$ * ")" *
+ }
+ if$ *
+ eid empty$
+ { format.journal.pages }
+ { format.journal.eid }
+ if$
+}
+
+FUNCTION {format.chapter.pages}
+{ chapter empty$
+ 'format.pages
+ { type empty$
+ { bbl.chapter }
+ { type "l" change.case$
+ "type" bibinfo.check
+ }
+ if$
+ chapter tie.or.space.prefix
+ "chapter" bibinfo.check
+ * *
+ pages empty$
+ 'skip$
+ { ", " * format.pages * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.booktitle}
+{
+ booktitle "booktitle" bibinfo.check
+ emphasize
+}
+%% FUNCTION {format.in.ed.booktitle}
+%% { format.booktitle duplicate$ empty$ 'skip$
+%% {
+%% editor "editor" format.names.ed duplicate$ empty$ 'pop$
+%% {
+%% "," *
+%% " " *
+%% get.bbl.editor
+%% ", " *
+%% * swap$
+%% * }
+%% if$
+%% word.in swap$ *
+%% }
+%% if$
+%% }
+FUNCTION {empty.misc.check}
+{ author empty$ title empty$ howpublished empty$
+ month empty$ year empty$ note empty$
+ and and and and and
+ { "all relevant fields are empty in " cite$ * warning$ }
+ 'skip$
+ if$
+}
+FUNCTION {format.thesis.type}
+{ type duplicate$ empty$
+ 'pop$
+ { swap$ pop$
+ "t" change.case$ "type" bibinfo.check
+ }
+ if$
+}
+FUNCTION {format.tr.number}
+{ number "number" bibinfo.check
+ type duplicate$ empty$
+ { pop$ bbl.techrep }
+ 'skip$
+ if$
+ "type" bibinfo.check
+ swap$ duplicate$ empty$
+ { pop$ "t" change.case$ }
+ { tie.or.space.prefix * * }
+ if$
+}
+FUNCTION {format.article.crossref}
+{
+ key duplicate$ empty$
+ { pop$
+ journal duplicate$ empty$
+ { "need key or journal for " cite$ * " to crossref " * crossref * warning$ }
+ { "journal" bibinfo.check emphasize word.in swap$ * }
+ if$
+ }
+ { word.in swap$ * " " *}
+ if$
+ " \cite{" * crossref * "}" *
+}
+FUNCTION {format.crossref.editor}
+{ editor #1 "{vv~}{ll}" format.name$
+ "editor" bibinfo.check
+ editor num.names$ duplicate$
+ #2 >
+ { pop$
+ "editor" bibinfo.check
+ " " * bbl.etal
+ emphasize
+ *
+ }
+ { #2 <
+ 'skip$
+ { editor #2 "{ff }{vv }{ll}{ jj}" format.name$ "others" =
+ {
+ "editor" bibinfo.check
+ " " * bbl.etal
+ emphasize
+ *
+ }
+ {
+ bbl.and space.word
+ * editor #2 "{vv~}{ll}" format.name$
+ "editor" bibinfo.check
+ *
+ }
+ if$
+ }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.book.crossref}
+{ volume duplicate$ empty$
+ { "empty volume in " cite$ * "'s crossref of " * crossref * warning$
+ pop$ word.in
+ }
+ { bbl.volume
+ swap$ tie.or.space.prefix "volume" bibinfo.check * * bbl.of space.word *
+ }
+ if$
+ editor empty$
+ editor field.or.null author field.or.null =
+ or
+ { key empty$
+ { series empty$
+ { "need editor, key, or series for " cite$ * " to crossref " *
+ crossref * warning$
+ "" *
+ }
+ { series emphasize * }
+ if$
+ }
+ { key * }
+ if$
+ }
+ { format.crossref.editor * }
+ if$
+ " \cite{" * crossref * "}" *
+}
+FUNCTION {format.incoll.inproc.crossref}
+{
+ editor empty$
+ editor field.or.null author field.or.null =
+ or
+ { key empty$
+ { format.booktitle duplicate$ empty$
+ { "need editor, key, or booktitle for " cite$ * " to crossref " *
+ crossref * warning$
+ }
+ { word.in swap$ * }
+ if$
+ }
+ { word.in key * " " *}
+ if$
+ }
+ { word.in format.crossref.editor * " " *}
+ if$
+ " \cite{" * crossref * "}" *
+}
+FUNCTION {format.org.or.pub}
+{ 't :=
+ ""
+ address empty$ t empty$ and
+ 'skip$
+ {
+ add.blank "(" *
+ address "address" bibinfo.check *
+ t empty$
+ 'skip$
+ { address empty$
+ 'skip$
+ { ": " * }
+ if$
+ t *
+ }
+ if$
+ ")" *
+ }
+ if$
+}
+FUNCTION {format.publisher.address}
+{ publisher "publisher" bibinfo.warn format.org.or.pub
+}
+
+FUNCTION {format.organization.address}
+{ organization "organization" bibinfo.check format.org.or.pub
+}
+
+
+
+FUNCTION {article}
+{ output.bibitem
+ format.authors "author" output.check
+ format.date "year" output.check
+ date.block
+ crossref missing$
+ {
+%mc add section handling
+%mc journal
+%mc "journal" bibinfo.check
+%mc emphasize
+%mc "journal" output.check
+%mc add.blank
+ journal
+ "journal" bibinfo.check
+ section field.or.null strip.trailing trim
+ emphasize
+ "journal" output.check
+ add.blank
+ section empty$
+ { skip$ }
+ { section * add.blank}
+ if$
+%mc end
+ format.vol.num.pages output
+ }
+ { format.article.crossref output.nonnull
+ format.pages output
+ }
+ if$
+ format.issn output
+ format.note output
+ format.eprint output
+ format.url output
+ fin.entry
+}
+FUNCTION {book}
+{ output.bibitem
+ author empty$
+ { format.editors "author and editor" output.check
+ }
+ { format.authors output.nonnull
+ crossref missing$
+ { "author and editor" editor either.or.check }
+ 'skip$
+ if$
+ }
+ if$
+ format.date "year" output.check
+ date.block
+ format.btitle "title" output.check
+ format.edition output
+ crossref missing$
+ { format.bvolume output
+ format.number.series output
+ format.publisher.address output
+ }
+ {
+ format.book.crossref output.nonnull
+ }
+ if$
+ %% format.edition output
+ format.isbn output
+ format.note output
+ format.eprint output
+ format.url output
+ fin.entry
+}
+FUNCTION {booklet}
+{ output.bibitem
+ format.authors output
+ format.date output
+ date.block
+ format.title "title" output.check
+ howpublished "howpublished" bibinfo.check output
+ address "address" bibinfo.check output
+ format.isbn output
+ format.note output
+ format.eprint output
+ format.url output
+ fin.entry
+}
+
+FUNCTION {inbook}
+{ output.bibitem
+ author empty$
+ { format.editors "author and editor" output.check
+ }
+ { format.authors output.nonnull
+ crossref missing$
+ { "author and editor" editor either.or.check }
+ 'skip$
+ if$
+ }
+ if$
+ format.date "year" output.check
+ date.block
+ format.btitle "title" output.check
+ crossref missing$
+ {
+ format.bvolume output
+ format.publisher.address output
+ %% format.bvolume output
+ format.chapter.pages "chapter and pages" output.check
+ format.number.series output
+ }
+ {
+ format.chapter.pages "chapter and pages" output.check
+ format.book.crossref output.nonnull
+ }
+ if$
+ format.edition output
+ crossref missing$
+ { format.isbn output }
+ 'skip$
+ if$
+ format.note output
+ format.eprint output
+ format.url output
+ fin.entry
+}
+
+FUNCTION {incollection}
+{ output.bibitem
+ format.authors "author" output.check
+ format.date "year" output.check
+ date.block
+ format.title "title" output.check
+ crossref missing$
+ {
+ %% format.in.ed.booktitle "booktitle" output.check
+%mc
+ format.booktitle "booktitle" output.check
+ format.bvolume output
+ format.number.series output
+ format.editors.inline output
+%mc end
+ format.publisher.address output
+ %% format.bvolume output
+ %% format.number.series output
+ format.chapter.pages output
+ format.edition output
+ format.isbn output
+ }
+ { format.incoll.inproc.crossref output.nonnull
+ format.chapter.pages output
+ }
+ if$
+ format.note output
+ format.eprint output
+ format.url output
+ fin.entry
+}
+FUNCTION {inproceedings}
+{ output.bibitem
+ format.authors "author" output.check
+ format.date "year" output.check
+ date.block
+ format.title "title" output.check
+ crossref missing$
+ {
+
+ %%format.in.ed.booktitle "booktitle" output.check
+%mc
+ format.booktitle "booktitle" output.check
+ format.bvolume output
+ format.number.series output
+ format.editors.inline output
+%mc end
+ publisher empty$
+ { format.organization.address output }
+ { organization "organization" bibinfo.check output
+ format.publisher.address output
+ }
+ if$
+ %% format.bvolume output
+ %% format.number.series output
+ format.pages output
+ format.isbn output
+ format.issn output
+ }
+ { format.incoll.inproc.crossref output.nonnull
+ format.pages output
+ }
+ if$
+ format.note output
+ format.eprint output
+ format.url output
+ fin.entry
+}
+FUNCTION {conference} { inproceedings }
+FUNCTION {manual}
+{ output.bibitem
+ author empty$
+ { organization "organization" bibinfo.check
+ duplicate$ empty$ 'pop$
+ { output
+ address "address" bibinfo.check output
+ }
+ if$
+ }
+ { format.authors output.nonnull }
+ if$
+ format.date output
+ date.block
+ format.btitle "title" output.check
+ author empty$
+ { organization empty$
+ {
+ address "address" bibinfo.check output
+ }
+ 'skip$
+ if$
+ }
+ {
+ organization "organization" bibinfo.check output
+ address "address" bibinfo.check output
+ }
+ if$
+ format.edition output
+ format.note output
+ format.eprint output
+ format.url output
+ fin.entry
+}
+
+FUNCTION {mastersthesis}
+{ output.bibitem
+ format.authors "author" output.check
+ format.date "year" output.check
+ date.block
+ format.btitle
+ "title" output.check
+ bbl.mthesis format.thesis.type output.nonnull
+ school "school" bibinfo.warn output
+ address "address" bibinfo.check output
+ format.note output
+ format.eprint output
+ format.url output
+ fin.entry
+}
+
+FUNCTION {misc}
+{ output.bibitem
+ format.authors output
+ format.date output
+ format.title output
+ howpublished "howpublished" bibinfo.check output
+ format.note output
+ format.eprint output
+ format.url output
+ fin.entry
+ empty.misc.check
+}
+FUNCTION {phdthesis}
+{ output.bibitem
+ format.authors "author" output.check
+ format.date "year" output.check
+ date.block
+ format.btitle
+ "title" output.check
+ bbl.phdthesis format.thesis.type output.nonnull
+ school "school" bibinfo.warn output
+ address "address" bibinfo.check output
+ format.note output
+ format.eprint output
+ format.url output
+ fin.entry
+}
+
+FUNCTION {proceedings}
+{ output.bibitem
+ editor empty$
+ { organization "organization" bibinfo.check output
+ }
+ { format.editors output.nonnull }
+ if$
+ format.date "year" output.check
+ date.block
+ format.btitle "title" output.check
+ format.bvolume output
+ format.number.series output
+ editor empty$
+ { publisher empty$
+ 'skip$
+ {
+ format.publisher.address output
+ }
+ if$
+ }
+ { publisher empty$
+ {
+ format.organization.address output }
+ {
+ organization "organization" bibinfo.check output
+ format.publisher.address output
+ }
+ if$
+ }
+ if$
+ format.isbn output
+ format.issn output
+ format.note output
+ format.eprint output
+ format.url output
+ fin.entry
+}
+
+FUNCTION {techreport}
+{ output.bibitem
+ format.authors "author" output.check
+ format.date "year" output.check
+ date.block
+ format.title
+ "title" output.check
+ format.tr.number output.nonnull
+ institution "institution" bibinfo.warn output
+ address "address" bibinfo.check output
+ format.note output
+ format.eprint output
+ format.url output
+ fin.entry
+}
+
+FUNCTION {unpublished}
+{ output.bibitem
+ format.authors "author" output.check
+ format.date output
+ date.block
+ format.title "title" output.check
+ format.note "note" output.check
+ format.eprint output
+ format.url output
+ fin.entry
+}
+
+FUNCTION {default.type} { misc }
+READ
+STRINGS { longest.label }
+INTEGERS { number.label longest.label.width }
+FUNCTION {initialize.longest.label}
+{ "" 'longest.label :=
+ #1 'number.label :=
+ #0 'longest.label.width :=
+}
+FUNCTION {longest.label.pass}
+{ number.label int.to.str$ 'label :=
+ number.label #1 + 'number.label :=
+ label width$ longest.label.width >
+ { label 'longest.label :=
+ label width$ 'longest.label.width :=
+ }
+ 'skip$
+ if$
+}
+EXECUTE {initialize.longest.label}
+ITERATE {longest.label.pass}
+FUNCTION {begin.bib}
+{ preamble$ empty$
+ 'skip$
+ { preamble$ write$ newline$ }
+ if$
+ "\providecommand{\newblock}{}"
+ write$ newline$
+ "\begin{thebibliography}{" longest.label * "}" *
+ write$ newline$
+ "\expandafter\ifx\csname url\endcsname\relax"
+ write$ newline$
+ " \def\url#1{{\tt #1}}\fi"
+ write$ newline$
+ "\expandafter\ifx\csname urlprefix\endcsname\relax\def\urlprefix{URL }\fi"
+ write$ newline$
+ "\providecommand{\eprint}[2][]{\url{#2}}"
+ write$ newline$
+ "% Bibliography created with iopart-num v2.1"
+ write$ newline$
+ "% /biblio/bibtex/contrib/iopart-num"
+ write$ newline$
+}
+EXECUTE {begin.bib}
+EXECUTE {init.state.consts}
+ITERATE {call.type$}
+FUNCTION {end.bib}
+{ newline$
+ "\end{thebibliography}" write$ newline$
+}
+EXECUTE {end.bib}
+%% End of customized bst file
+%%
+%% End of file `iopart-num.bst'.
diff --git a/biblio/bibtex/contrib/iopart-num/iopart-num.pdf b/biblio/bibtex/contrib/iopart-num/iopart-num.pdf
new file mode 100644
index 0000000000..6c1da21140
--- /dev/null
+++ b/biblio/bibtex/contrib/iopart-num/iopart-num.pdf
Binary files differ
diff --git a/biblio/bibtex/contrib/iopart-num/iopart-num.tex b/biblio/bibtex/contrib/iopart-num/iopart-num.tex
new file mode 100644
index 0000000000..0e37c2bcf4
--- /dev/null
+++ b/biblio/bibtex/contrib/iopart-num/iopart-num.tex
@@ -0,0 +1,191 @@
+\documentclass[12pt]{iopart}
+
+\bibliographystyle{iopart-num}
+\usepackage{citesort}
+%% \usepackage[square,sort&compress]{natbib}
+
+\newcommand{\BibTeX}{Bib\TeX}
+\newcommand{\REVTeX}{REV\TeX}
+
+\sloppy
+
+\begin{document}
+\nocite{*}
+
+\title{The \texttt{iopart-num} \BibTeX{} style}
+
+\noindent \qquad \\[-6pt] \qquad Version 2.1\\\qquad January 22, 2009
+
+\author{M~A~Caprio}
+
+\address{Department of Physics, University of Notre Dame,
+Notre Dame, Indiana 46556-5670, USA}
+
+\section{Introduction}
+
+The \texttt{iopart-num} \BibTeX{} style is intended for use in
+preparing manuscripts for Institute of Physics Publishing journals,
+including Journal of Physics. It provides numeric citation with
+Harvard-like formatting, based upon the specification in ``How to
+prepare and submit an article for publication in an IOP journal using
+\LaTeXe'' by Graham Douglas (2005).
+
+The \texttt{iopart-num} package is available on the Comprehensive
+\TeX{} Archive Network (CTAN) as \texttt{/biblio/bibtex/contrib/iopart-num}.
+
+\section{General instructions}
+
+To use the \texttt{iopart-num} style, include the command
+\verb+\bibliographystyle{iopart-num}+ in the
+document preamble. The reference section is then inserted into the
+document with the command \verb+\bibliography{...}+, where the names
+of the necessary \BibTeX{} database files should be listed between the
+braces. Further general instructions on using \BibTeX{} may be found
+in the \BibTeX{} documentation.
+
+The \texttt{iopart-num} style is compatible with, but does not
+require, the \texttt{iopart} document class.
+For documents prepared \textit{with}
+the \texttt{natbib} package,
+\texttt{natbib} should be loaded with the options \verb+square+ and \verb+sort&compress+
+to insure proper formatting of the references in the text. If,
+instead,
+documents are prepared using the \texttt{iopart} class but
+\textit{without} \texttt{natbib}, the section header
+for the references must be manually inserted, with the command
+\verb+\section*{References}+, and use of the \texttt{citesort} package
+is recommended for proper formatting of the references in the text.
+
+\section{Special bibliographic data fields}
+
+\subsection{Journal sections}
+
+Under IOP style conventions, journal names should be set in italic
+type. However, for journals with multiple lettered sections, the IOP
+convention is that the journal section letter should appear in roman
+type after the main journal name, \textit{e.g.}, ``\textit{J.\
+Phys.\/} A''. Most existing \BibTeX{} styles do not make special
+provision for lettered sections. Therefore, typically, the section
+letter is either included as part of the journal name
+\begin{verbatim}
+ journal = "J. Phys. A",
+ volume = "38",
+\end{verbatim}
+or as part of the volume number
+\begin{verbatim}
+ journal = "J. Phys.",
+ volume = "A38",
+\end{verbatim}
+in the \BibTeX{} database entry. The \texttt{iopart-num} style
+instead introduces a new optional field \verb+section+ which can be
+used to specify a journal section letter. This section letter is set in
+roman type. Moreover, if the section letter already appears in
+\textit{any} of the usual locations in the database entry (at the end
+of the journal name, before the volume number, or after the volume
+number),
+\texttt{iopart-num} will recognize it and suppress its printing.
+Therefore, when you are creating the
+\BibTeX{} database entry for an article in a lettered journal section,
+you can still include the section letter in the \verb+journal+ or
+\verb+volume+ fields, for use with other \BibTeX{} styles,
+without adversely affecting the formatting for IOP journals. For
+example, the entry for ref.~\cite{caprio2005:coherent} can be
+generated with
+\begin{verbatim}
+ journal = "J. Phys. A",
+ section = "A",
+ volume = "38",
+\end{verbatim}
+or
+\begin{verbatim}
+ journal = "J. Phys.",
+ section = "A",
+ volume = "A38",
+\end{verbatim}
+or simply
+\begin{verbatim}
+ journal = "J. Phys.",
+ section = "A",
+ volume = "38",
+\end{verbatim}
+in the \BibTeX{} database entry. Note that section names longer than a
+single letter are also supported (\textit{e.g.},
+``\textit{Phys. Rev.\/} ST Accel. Beams'').
+
+\subsection{Journal issue numbers}
+
+Journal issue numbers are not customarily included in references to
+journal articles under the IOP formatting conventions.
+Therefore, the
+\texttt{iopart-num} style ignores the
+\verb+number+ field for articles.
+However, in some periodicals (such as popular magazines or certain
+journal online supplements), pagination restarts from 1 with each
+issue. For such periodicals, the issue number is an essential part of
+the bibliographic information needed to identify an article. The
+\texttt{iopart-num} style therefore supports an additional field
+\verb+issue+ in the \BibTeX{} database entry, which can be used to
+enforce printing of the issue number. If a value is specified for
+\verb+issue+, this value is included included parenthetically after the volume
+number in the reference, as in
+ref.~\cite{zamfir2005:132te-beta-enam04}.
+
+\subsection{Multivolume books}
+
+The IOP guidelines distinguish between a volume
+in a {\it series}
+and a volume of a {\it multivolume book} or {\it set}. For a volume in
+a series, the series title and volume number are given in parentheses
+after the book title~\cite{ex8}.
+For an individual volume in a multivolume book, the book title is
+given first, followed by the volume number and volume title~\cite{ex9}.
+
+The
+\texttt{iopart-num} style supports an additional field
+\verb+volumetitle+ in the \BibTeX{} database entry, which can be used to
+specify the title for an individual volume of a multivolume
+book, as in refs.~\cite{ex9,bohr1998:v2}. For example, the entry for
+ref.~\cite{bohr1998:v2} is generated with
+\begin{verbatim}
+ title = "Nuclear Structure",
+ volume = 2,
+ volumetitle = "Nuclear Deformations",
+\end{verbatim}
+in the \BibTeX{} database entry. In contrast, most existing \BibTeX{} styles
+allow you to reference a volume of a multivolume
+book by specifying \verb+title+ and
+\verb+volume+, as in
+refs.~\cite{ex7,siegbahn1965:v1}, but do not provide for inclusion of
+any specific title for the individual volume. A volume in a
+series~\cite{ex8,iachello2006:liealg} is indicated in
+\texttt{iopart-num}, as in most other \BibTeX{}
+styles,
+by specifying
+\verb+title+, \verb+volume+, and
+\verb+series+ in the \BibTeX{} database entry.
+
+\subsection{E-prints, collaborations, and other \REVTeX{} data fields}
+
+The \texttt{iopart-num} style supports several additional data fields
+(\verb+collaboration+, \verb+eid+, \verb+eprint+,
+\verb+numpages+, and \verb+url+) introduced in
+\REVTeX{}~4.
+
+
+\section{Examples}
+
+The entries in the reference list below provide examples of the
+formatting of various types of references, of varying complexity,
+including journal articles, articles in proceedings or collections,
+books (individual, multivolume, or in a series), theses, and
+unpublished references. The
+\BibTeX{} database entries used to generate these examples can be
+found in the file \texttt{iopart-num.bib}.
+Refs.~\cite{ex1,ex2,ex3,ex4,ex5,ex6,ex7,ex8,ex9} are based upon example entries
+from the IOP guidelines.
+
+\section*{References}
+\bibliography{iopart-num}
+
+\end{document}
+
diff --git a/biblio/bibtex/contrib/is-bst/is-abbrv.bst b/biblio/bibtex/contrib/is-bst/is-abbrv.bst
new file mode 100644
index 0000000000..5e4eaa102a
--- /dev/null
+++ b/biblio/bibtex/contrib/is-bst/is-abbrv.bst
@@ -0,0 +1,1833 @@
+%% =====================================================================
+%% WARNING: Do NOT edit this file. It was produced automatically by
+%% Nelson H. F. Beebe <beebe@plot79.math.utah.edu>
+%% from file://plot79.math.utah.edu/u/sy/beebe/tex/bib/merge/xbtxbst.doc
+%% on Wed May 15 10:36:03 MDT 1996.
+%% =====================================================================
+%%%=====================================================================
+%%% @BibTeX-style-file{
+%%% author = "Nelson H. F. Beebe",
+%%% version = "2.03",
+%%% date = "15 May 1996",
+%%% time = "10:35:51 MDT",
+%%% filename = "is-abbrv.bst",
+%%% address = "Center for Scientific Computing
+%%% Department of Mathematics
+%%% University of Utah
+%%% Salt Lake City, UT 84112
+%%% USA",
+%%% telephone = "+1 801 581 5254",
+%%% FAX = "+1 801 581 4148",
+%%% URL = "http://www.math.utah.edu/~beebe",
+%%% checksum = "47504 1833 4630 37425",
+%%% email = "beebe@math.utah.edu (Internet)",
+%%% codetable = "ISO/ASCII",
+%%% keywords = "BibTeX, style, bibliography",
+%%% supported = "yes",
+%%% docstring = "This file is a modification of the standard
+%%% BibTeX btxbst.doc file, or is a .bst file
+%%% derived from that modification. It contains
+%%% optional added support for CODEN, ISBN, ISSN,
+%%% LCCN, and PRICE fields, extended PAGES
+%%% fields, the PERIODICAL entry, and extended
+%%% citation label suffixing.
+%%%
+%%% In addition, date formatting supports a day
+%%% keyword, so that bibliography entries can be
+%%% written with
+%%%
+%%% day = {23},
+%%% month = aug,
+%%%
+%%% instead of the language-dependent awkward
+%%% forms required by the standard styles
+%%%
+%%% month = {23~} # aug,
+%%% month = aug # {~23},
+%%%
+%%% These older forms are, of course, still
+%%% handled correctly.
+%%%
+%%% The UNIX C preprocessor can be used to
+%%% extract the standard styles, as follows:
+%%%
+%%% cpp -P -DPLAIN xbtxbst.doc >plain.bst
+%%% cpp -P -DUNSRT xbtxbst.doc >unsrt.bst
+%%% cpp -P -DALPHA xbtxbst.doc >alpha.bst
+%%% cpp -P -DABBRV xbtxbst.doc >abbrv.bst
+%%%
+%%% To obtain correct file header checksums, pipe
+%%% the output through the checksum program, e.g.
+%%%
+%%% cpp -P -DPLAIN xbtxbst.doc | checksum >plain.bst
+%%%
+%%% The accompanying UNIX Makefile automates this
+%%% job, and provides some extra leading comments
+%%% in the generated style files warning the user
+%%% not to modify them.
+%%%
+%%% Additional optional definitions are recognized
+%%% to provide extensions to the standard styles:
+%%%
+%%% -D_CODEN for CODEN output
+%%%
+%%% -D_ISBN for ISBN output
+%%%
+%%% -D_ISSN for ISSN output
+%%%
+%%% -D_LCCN for LCCN output
+%%%
+%%% -D_PRICE for price output,
+%%%
+%%% -D_BOOKPAGES for book, techreport, manual,
+%%% and thesis pages output.
+%%%
+%%% -D_URL to get World-Wide Web Uniform
+%%% Resource Locator (URL) output.
+%%%
+%%% -D_NUMERIC_SUFFIXES to get numeric
+%%% label suffixes -1, -2, ..., -26, instead of
+%%% letters a, b, ..., z, so as to correctly
+%%% handle alpha-style bibliographies with more
+%%% than 26 entries for a single author in one
+%%% year. Change letter suffix code to switch
+%%% to numeric suffixes if more than 26 letters
+%%% are used, so that no matter which scheme is
+%%% selected, correct output will always be
+%%% obtained.
+%%%
+%%% The CODEN, ISBN, ISSN, LCCN, PRICE, and URL
+%%% values are wrapped inside macros \showCODEN{}
+%%% etc. that the user can provide alternate
+%%% definitions of to change the formatting, or
+%%% to suppress their output altogether. That
+%%% way, output identical to that of the four
+%%% standard BibTeX style files can be obtained
+%%% with these extended files, if these macros
+%%% are defined to expand to empty strings.
+%%%
+%%% URL handling is slightly more complex,
+%%% because URLs can contain characters which TeX
+%%% must handle in verbatim mode in a typewriter
+%%% font, and such text cannot readily appear
+%%% inside nested macro arguments. Consequently,
+%%% URLs are formatted in the .bbl file like
+%%% this:
+%%% \ifshowURL {\showURL \path|...|} \fi
+%%% where \showURL takes no argument, and
+%%% normally expands to the 4-character string
+%%% URL<space>. The grouping braces ensure that
+%%% any font changes made by \showURL remain
+%%% localized. Vertical bar is chosen as the
+%%% verbatim path delimiter, because it cannot
+%%% appear in URLs. The other prohibited ISO
+%%% Latin 1 characters are the non-printing
+%%% control characters 0..31, plus those in the
+%%% range 128..255, plus the ten special
+%%% characters
+%%%
+%%% { } [ ] \ ^ ~ < > `
+%%%
+%%% See Internet RFC 1630 (June 1994) for more
+%%% details. (Backquote is not even mentioned
+%%% there.)
+%%%
+%%% As an example of font changes, in LaTeX 2e
+%%% you might define
+%%% \newcommand{\showURL}{URL
+%%% \let \oldtt = \tt
+%%% \renewcommand{\tt}{\oldtt \itshape}}
+%%% to get URLs set in a typewriter italic font.
+%%%
+%%% If desired, a sed script can be used to
+%%% eliminate non-essential comments (this
+%%% reduces the file size by 2/3); a command
+%%% filter step like
+%%% sed -e '/^%$/d' -e '/^%[^%].*$/d'
+%%% will accomplish that job.
+%%%
+%%% The checksum field above contains a CRC-16
+%%% checksum as the first value, followed by the
+%%% equivalent of the standard UNIX wc (word
+%%% count) utility output of lines, words, and
+%%% characters. This is produced by Robert
+%%% Solovay's checksum utility."
+%%% }
+%%% ====================================================================
+%%% Revision history (reverse time order):
+%%%
+%%% 2.03 [15-May-1996]
+%%% Add CODEN support, ISBN and ISSN output for Article entries,
+%%% and ISBN output for TechReport entries (yes, these sometimes
+%%% do have ISBNs).
+%%%
+%%% Add wrapper macros \showXYZ{} (XYZ = CODEN, ISBN, ISSN, LCCN,
+%%% PRICE, and URL) defined inside the thebibliography environment
+%%% to expand to XYZ (except for PRICE) and their arguments,
+%%% PROVIDED they are not already defined. That way, the user can
+%%% provide alternate definitions outside the thebibliography
+%%% environment, for example, to suppress particular ones, or
+%%% to alter the font used.
+%%%
+%%% Substantially revise leading comments to better document the
+%%% extensions.
+%%%
+%%% 2.02 [01-Apr-1996]
+%%% Add day keyword support with new code in format.date function.
+%%% Oren Patashnik will include this new keyword in standard styles
+%%% in BibTeX 1.0.
+%%%
+%%% Add new function collapse.pagerange, and use it to collapse
+%%% page ranges with identical initial and final numbers to a
+%%% single number, so that bibliography files can distinguish
+%%% between one-page documents, and documents missing final page
+%%% numbers.
+%%%
+%%% 2.01 [25-Oct-1994]
+%%% Add URL output support.
+%%%
+%%% 2.00 [12-Oct-1994]
+%%% Add support for pages in theses and manuals, treating them
+%%% like Book and InBook pages.
+%%%
+%%% Correct ISSN support: a typo caused output of ISBN instead of
+%%% ISSN.
+%%%
+%%% Wherever ISBNs are output, also output an ISSN, if one
+%%% exists, and vice versa. The reason is that some periodicals
+%%% (e.g. The X Resource, published by O'Reilly and Associates)
+%%% have both ISSN and ISBN numbers, and can be purchased either
+%%% as journal subscriptions, or as single volumes.
+%%%
+%%% For InProceedings and Proceedings output, issue a warning for
+%%% a missing publisher: even though that field is optional, a
+%%% bibliographic reference without it is incomplete.
+%%%
+%%% Remove harmless, but unneeded, single horizontal space before
+%%% price output added with version 1.03.
+%%%
+%%% Change Proceedings and InProceedings to treat address values
+%%% as publisher addresses, as they are with every other document
+%%% type, rather than as conference addresses, which belong in
+%%% the title field (that is how major libraries, including OCLC
+%%% and Library of Congress, with nearly 60M holdings, represent
+%%% them). The need for this change has been discussed with
+%%% BibTeX's author, Oren Patashnik, and there is a good
+%%% possibility that BibTeX 1.0 will contain the change
+%%% implemented here. This is an INCOMPATIBLE change that will
+%%% produce different .bbl file formatting. However, the TUG and
+%%% BibNet bibliography projects have consistently used address
+%%% to me publisher/organization/institution address, and so
+%%% already conform to the new practice.
+%%%
+%%% 1.05 [30-May-1994]
+%%% Add NUMERIC_SUFFIXES support.
+%%%
+%%% Change all preprocessor statements to put else and endif
+%%% labels inside C-style comments to conform to 1989 ISO/ANSI C
+%%% Standard.
+%%%
+%%% 1.04 [11-Nov-1993]
+%%% Add underscore prefix to new processor symbols to prevent
+%%% substitution in comments
+%%%
+%%% 1.03 [11-Oct-1993]
+%%% Add support for LCCN (Library of Congress Catalog Number)
+%%% and price fields, and make ISBN, ISSN, LCCN, and price
+%%% selectable by preprocessor conditionals.
+%%%
+%%% 1.02 [12-Sep-1991]
+%%% Merge in Barbara N. Beeton's suggestion for hyphen-less
+%%% line breaks around volume(number):page.
+%%%
+%%% 1.01 [10-Sep-1991]
+%%% Update file comment header and use Solovay checksum program.
+%%%
+%%% 1.00 [17-Oct-1990]
+%%% Original version merging hand-edits of is-xxx.bst files into
+%%% this master file, xbtxbst.doc.
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+%% BibTeX `plain' family
+%% version 0.99b for BibTeX versions 0.99a or later, LaTeX version 2.09.
+%% Copyright (C) 1985, all rights reserved.
+%% Copying of this file is authorized only if either
+%% (1) you make absolutely no changes to your copy, including name, or
+%% (2) if you do make changes, you name it something other than
+%% btxbst.doc, plain.bst, unsrt.bst, alpha.bst, and abbrv.bst.
+%% This restriction helps ensure that all standard styles are identical.
+%% The file btxbst.doc has the documentation for this style.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ENTRY
+ { address
+ author
+ booktitle
+ chapter
+
+ coden
+
+ day
+ edition
+ editor
+ howpublished
+ institution
+
+ isbn
+
+
+ issn
+
+ journal
+ key
+
+ lccn
+
+ month
+ note
+ number
+ organization
+ pages
+
+ price
+
+ publisher
+ school
+ series
+ title
+ type
+
+ URL
+
+ volume
+ year
+ }
+ {}
+
+ { label }
+
+
+
+INTEGERS { output.state before.all mid.sentence after.sentence after.block }
+
+FUNCTION {init.state.consts}
+{ #0 'before.all :=
+ #1 'mid.sentence :=
+ #2 'after.sentence :=
+ #3 'after.block :=
+}
+
+
+STRINGS { b e new.pages original.t s t }
+
+FUNCTION {output.nonnull}
+{ 's :=
+ output.state mid.sentence =
+ { ", " * write$ }
+ { output.state after.block =
+ { add.period$ write$
+ newline$
+ "\newblock " write$
+ }
+ { output.state before.all =
+ 'write$
+ { add.period$ " " * write$ }
+ if$
+ }
+ if$
+ mid.sentence 'output.state :=
+ }
+ if$
+ s
+}
+
+FUNCTION {output}
+{ duplicate$ empty$
+ 'pop$
+ 'output.nonnull
+ if$
+}
+
+FUNCTION {output.check}
+{ 't :=
+ duplicate$ empty$
+ { pop$ "empty " t * " in " * cite$ * warning$ }
+ 'output.nonnull
+ if$
+}
+
+FUNCTION {output.bibitem}
+{ newline$
+
+ "\bibitem{" write$
+
+ cite$ write$
+ "}" write$
+ newline$
+ ""
+ before.all 'output.state :=
+}
+
+
+FUNCTION {fin.entry}
+{ add.period$
+ write$
+ newline$
+}
+
+FUNCTION {new.block}
+{ output.state before.all =
+ 'skip$
+ { after.block 'output.state := }
+ if$
+}
+
+FUNCTION {new.sentence}
+{ output.state after.block =
+ 'skip$
+ { output.state before.all =
+ 'skip$
+ { after.sentence 'output.state := }
+ if$
+ }
+ if$
+}
+
+
+FUNCTION {not}
+{ { #0 }
+ { #1 }
+ if$
+}
+
+FUNCTION {and}
+{ 'skip$
+ { pop$ #0 }
+ if$
+}
+
+FUNCTION {or}
+{ { pop$ #1 }
+ 'skip$
+ if$
+}
+
+
+FUNCTION {new.block.checka}
+{ empty$
+ 'skip$
+ 'new.block
+ if$
+}
+
+FUNCTION {new.block.checkb}
+{ empty$
+ swap$ empty$
+ and
+ 'skip$
+ 'new.block
+ if$
+}
+
+
+FUNCTION {new.sentence.checka}
+{ empty$
+ 'skip$
+ 'new.sentence
+ if$
+}
+
+FUNCTION {new.sentence.checkb}
+{ empty$
+ swap$ empty$
+ and
+ 'skip$
+ 'new.sentence
+ if$
+}
+
+
+FUNCTION {field.or.null}
+{ duplicate$ empty$
+ { pop$ "" }
+ 'skip$
+ if$
+}
+
+FUNCTION {emphasize}
+{ duplicate$ empty$
+ { pop$ "" }
+ { "{\em " swap$ * "}" * }
+ if$
+}
+
+INTEGERS { nameptr namesleft numnames }
+
+FUNCTION {format.names}
+{ 's :=
+ #1 'nameptr :=
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+
+ { s nameptr "{f.~}{vv~}{ll}{, jj}" format.name$ 't :=
+
+ nameptr #1 >
+ { namesleft #1 >
+ { ", " * t * }
+ { numnames #2 >
+ { "," * }
+ 'skip$
+ if$
+ t "others" =
+ { " et~al." * }
+ { " and " * t * }
+ if$
+ }
+ if$
+ }
+ 't
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+}
+
+FUNCTION {format.authors}
+{ author empty$
+ { "" }
+ { author format.names }
+ if$
+}
+
+
+FUNCTION {format.coden}
+{ coden empty$
+ { "" }
+ { new.block "\showCODEN{" coden * "}" *}
+ if$
+}
+
+
+FUNCTION {format.editors}
+{ editor empty$
+ { "" }
+ { editor format.names
+ editor num.names$ #1 >
+ { ", editors" * }
+ { ", editor" * }
+ if$
+ }
+ if$
+}
+
+
+FUNCTION {format.isbn}
+{ isbn empty$
+ { "" }
+ { new.block "\showISBN{" isbn * "}" *}
+ if$
+}
+
+
+
+FUNCTION {format.issn}
+{ issn empty$
+ { "" }
+ { new.block "\showISSN{" issn * "}" *}
+ if$
+}
+
+
+
+FUNCTION {format.lccn}
+{ lccn empty$
+ { "" }
+ { new.block "\showLCCN{" lccn * "}" *}
+ if$
+}
+
+
+
+FUNCTION {format.price}
+{ price empty$
+ { "" }
+ { new.block "\showPRICE{" price * "}" *}
+ if$
+}
+
+
+
+FUNCTION {format.url}
+{ url empty$
+ { "" }
+ { new.block "\ifshowURL {\showURL \path|" url * "|}\fi" *}
+ if$
+}
+
+
+
+
+FUNCTION {format.title}
+{ title empty$
+ { "" }
+
+ { title "t" change.case$ }
+
+ if$
+}
+
+
+
+FUNCTION {collapse.pagerange}
+{ 't := % save input page range string
+ t 'original.t := % save original page range
+ "" 'b := % beginning page number
+ "" 'e := % ending page number
+ { t empty$ not } % while-loop Boolean condition
+ { % while-loop body
+ t #1 #2 substring$ "--" = % have we found the en-dash?
+ {
+ t #3 global.max$ substring$ 'e := % yes, save ending page number
+ "" 't := % and set t to empty string to terminate loop
+ }
+ {
+ b t #1 #1 substring$ * 'b := % no, just accumulate this character
+ t #2 global.max$ substring$ 't := % and set t to the remaining string
+ }
+ if$
+ }
+ while$ % on exit, t has ending page number string
+ e b = % are beginning and ending numbers the same?
+ { b } % yes, return the beginning page number string
+ { original.t } % no, return the original page number string
+ if$
+}
+
+
+FUNCTION {n.dashify}
+{ 't :=
+ ""
+ { t empty$ not }
+ { t #1 #1 substring$ "-" =
+ { t #1 #2 substring$ "--" = not
+ { "--" *
+ t #2 global.max$ substring$ 't :=
+ }
+ { { t #1 #1 substring$ "-" = }
+ { "-" *
+ t #2 global.max$ substring$ 't :=
+ }
+ while$
+ }
+ if$
+ }
+ { t #1 #1 substring$ *
+ t #2 global.max$ substring$ 't :=
+ }
+ if$
+ }
+ while$
+}
+
+
+FUNCTION {format.date}
+{ year empty$
+ { month empty$
+ {
+ day empty$
+ { "" }
+ { "there's a day but no month or year in " cite$ * warning$ }
+ if$
+ }
+ { "there's a month but no year in " cite$ * warning$
+ month
+ day empty$
+ { }
+ { " " * day * }
+ if$
+ }
+ if$
+ }
+ { month empty$
+ {
+ day empty$
+ { year }
+ { "there's a day and year but no month in " cite$ * warning$ }
+ if$
+ }
+ {
+ month " " *
+ day empty$
+ { }
+ { day * ", " * }
+ if$
+ year *
+ }
+ if$
+ }
+ if$
+}
+
+
+FUNCTION {format.btitle}
+{ title emphasize
+}
+
+
+FUNCTION {tie.or.space.connect}
+{ duplicate$ text.length$ #3 <
+ { "~" }
+ { " " }
+ if$
+ swap$ * *
+}
+
+
+FUNCTION {either.or.check}
+{ empty$
+ 'pop$
+ { "can't use both " swap$ * " fields in " * cite$ * warning$ }
+ if$
+}
+
+
+FUNCTION {format.bvolume}
+{ volume empty$
+ { "" }
+ { "volume" volume tie.or.space.connect
+ series empty$
+ 'skip$
+ { " of " * series emphasize * }
+ if$
+ "volume and number" number either.or.check
+ }
+ if$
+}
+
+
+FUNCTION {format.number.series}
+{ volume empty$
+ { number empty$
+ { series field.or.null }
+ { output.state mid.sentence =
+ { "number" }
+ { "Number" }
+ if$
+ number tie.or.space.connect
+ series empty$
+ { "there's a number but no series in " cite$ * warning$ }
+ { " in " * series * }
+ if$
+ }
+ if$
+ }
+ { "" }
+ if$
+}
+
+
+FUNCTION {format.edition}
+{ edition empty$
+ { "" }
+ { output.state mid.sentence =
+ { edition "l" change.case$ " edition" * }
+ { edition "t" change.case$ " edition" * }
+ if$
+ }
+ if$
+}
+
+
+INTEGERS { multiresult }
+
+FUNCTION {multi.page.check}
+{ 't :=
+ #0 'multiresult :=
+ { multiresult not
+ t empty$ not
+ and
+ }
+ { t #1 #1 substring$
+ duplicate$ "-" =
+ swap$ duplicate$ "," =
+ swap$ "+" =
+ or or
+ { #1 'multiresult := }
+ { t #2 global.max$ substring$ 't := }
+ if$
+ }
+ while$
+ multiresult
+}
+
+
+FUNCTION {format.book.pages}
+{ pages empty$
+ { "" }
+ { new.block pages " pp." * }
+ if$
+}
+
+
+
+FUNCTION {format.pages}
+{ pages empty$
+ { "" }
+ {
+ pages multi.page.check
+ { pages collapse.pagerange 'new.pages := }
+ { pages 'new.pages := }
+ if$
+ new.pages multi.page.check
+ { "pages" new.pages n.dashify tie.or.space.connect }
+ { "page" new.pages tie.or.space.connect }
+ if$
+ }
+ if$
+}
+
+
+FUNCTION {format.vol.num.pages}
+{ volume field.or.null
+ number empty$
+ 'skip$
+ { "\penalty0 (" number * ")" * *
+ volume empty$
+ { "there's a number but no volume in " cite$ * warning$ }
+ 'skip$
+ if$
+ }
+ if$
+ pages empty$
+ 'skip$
+ { duplicate$ empty$
+ { pop$ format.pages }
+ { ":\penalty0 " * pages collapse.pagerange n.dashify * }
+ if$
+ }
+ if$
+}
+
+
+
+FUNCTION {format.chapter.pages}
+{ chapter empty$
+ 'format.pages
+ { type empty$
+ { "chapter" }
+ { type "l" change.case$ }
+ if$
+ chapter tie.or.space.connect
+ pages empty$
+ 'skip$
+ { ", " * format.pages * }
+ if$
+ }
+ if$
+}
+
+
+FUNCTION {format.in.ed.booktitle}
+{ booktitle empty$
+ { "" }
+ { editor empty$
+ { "In " booktitle emphasize * }
+ { "In " format.editors * ", " * booktitle emphasize * }
+ if$
+ }
+ if$
+}
+
+
+FUNCTION {empty.misc.check}
+{ author empty$ title empty$ howpublished empty$
+ month empty$ year empty$ note empty$
+ and and and and and
+
+ key empty$ not and
+
+ { "all relevant fields are empty in " cite$ * warning$ }
+ 'skip$
+ if$
+}
+
+
+FUNCTION {format.thesis.type}
+{ type empty$
+ 'skip$
+ { pop$
+ type "t" change.case$
+ }
+ if$
+}
+
+
+FUNCTION {format.tr.number}
+{ type empty$
+ { "Technical Report" }
+ 'type
+ if$
+ number empty$
+ { "t" change.case$ }
+ { number tie.or.space.connect }
+ if$
+}
+
+
+FUNCTION {format.article.crossref}
+{ key empty$
+ { journal empty$
+ { "need key or journal for " cite$ * " to crossref " * crossref *
+ warning$
+ ""
+ }
+ { "In {\em " journal * "\/}" * }
+ if$
+ }
+ { "In " key * }
+ if$
+ " \cite{" * crossref * "}" *
+}
+
+
+FUNCTION {format.crossref.editor}
+{ editor #1 "{vv~}{ll}" format.name$
+ editor num.names$ duplicate$
+ #2 >
+ { pop$ " et~al." * }
+ { #2 <
+ 'skip$
+ { editor #2 "{ff }{vv }{ll}{ jj}" format.name$ "others" =
+ { " et~al." * }
+ { " and " * editor #2 "{vv~}{ll}" format.name$ * }
+ if$
+ }
+ if$
+ }
+ if$
+}
+
+
+FUNCTION {format.book.crossref}
+{ volume empty$
+ { "empty volume in " cite$ * "'s crossref of " * crossref * warning$
+ "In "
+ }
+ { "Volume" volume tie.or.space.connect
+ " of " *
+ }
+ if$
+ editor empty$
+ editor field.or.null author field.or.null =
+ or
+ { key empty$
+ { series empty$
+ { "need editor, key, or series for " cite$ * " to crossref " *
+ crossref * warning$
+ "" *
+ }
+ { "{\em " * series * "\/}" * }
+ if$
+ }
+ { key * }
+ if$
+ }
+ { format.crossref.editor * }
+ if$
+ " \cite{" * crossref * "}" *
+}
+
+
+FUNCTION {format.incoll.inproc.crossref}
+{ editor empty$
+ editor field.or.null author field.or.null =
+ or
+ { key empty$
+ { booktitle empty$
+ { "need editor, key, or booktitle for " cite$ * " to crossref " *
+ crossref * warning$
+ ""
+ }
+ { "In {\em " booktitle * "\/}" * }
+ if$
+ }
+ { "In " key * }
+ if$
+ }
+ { "In " format.crossref.editor * }
+ if$
+ " \cite{" * crossref * "}" *
+}
+
+
+FUNCTION {article}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.title "title" output.check
+ new.block
+ crossref missing$
+ { journal emphasize "journal" output.check
+ format.vol.num.pages output
+ format.date "year" output.check
+ }
+ { format.article.crossref output.nonnull
+ format.pages output
+ }
+ if$
+
+ format.coden output
+
+
+ format.isbn output
+
+
+ format.issn output
+
+
+ format.url output
+
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {book}
+{ output.bibitem
+ author empty$
+ { format.editors "author and editor" output.check }
+ { format.authors output.nonnull
+ crossref missing$
+ { "author and editor" editor either.or.check }
+ 'skip$
+ if$
+ }
+ if$
+ new.block
+ format.btitle "title" output.check
+ crossref missing$
+ { format.bvolume output
+ new.block
+ format.number.series output
+ new.sentence
+ publisher "publisher" output.check
+ address output
+ }
+ { new.block
+ format.book.crossref output.nonnull
+ }
+ if$
+ format.edition output
+ format.date "year" output.check
+
+ format.coden output
+
+
+ format.isbn output
+
+
+ format.issn output
+
+
+ format.book.pages output
+
+
+ format.lccn output
+
+
+ format.price output
+
+
+ format.url output
+
+ new.block
+ note output
+ fin.entry
+}
+
+
+FUNCTION {booklet}
+{ output.bibitem
+ format.authors output
+ new.block
+ format.title "title" output.check
+ howpublished address new.block.checkb
+ howpublished output
+ address output
+ format.date output
+
+ format.coden output
+
+
+ format.isbn output
+
+
+ format.issn output
+
+
+ format.book.pages output
+
+
+ format.lccn output
+
+
+ format.price output
+
+
+ format.url output
+
+ new.block
+ note output
+ fin.entry
+}
+
+
+
+FUNCTION {inbook}
+{ output.bibitem
+ author empty$
+ { format.editors "author and editor" output.check }
+ { format.authors output.nonnull
+ crossref missing$
+ { "author and editor" editor either.or.check }
+ 'skip$
+ if$
+ }
+ if$
+ new.block
+ format.btitle "title" output.check
+ crossref missing$
+ { format.bvolume output
+ format.chapter.pages "chapter and pages" output.check
+ new.block
+ format.number.series output
+ new.sentence
+ publisher "publisher" output.check
+ address output
+ }
+ { format.chapter.pages "chapter and pages" output.check
+ new.block
+ format.book.crossref output.nonnull
+ }
+ if$
+ format.edition output
+ format.date "year" output.check
+
+ format.coden output
+
+
+ format.isbn output
+
+
+ format.issn output
+
+
+ format.lccn output
+
+
+ format.price output
+
+
+ format.url output
+
+ new.block
+ note output
+ fin.entry
+}
+
+
+FUNCTION {incollection}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.title "title" output.check
+ new.block
+ crossref missing$
+ { format.in.ed.booktitle "booktitle" output.check
+ format.bvolume output
+ format.number.series output
+ format.chapter.pages output
+ new.sentence
+ publisher "publisher" output.check
+ address output
+ format.edition output
+ format.date "year" output.check
+ }
+ { format.incoll.inproc.crossref output.nonnull
+ format.chapter.pages output
+ }
+ if$
+
+ format.coden output
+
+
+ format.isbn output
+
+
+ format.issn output
+
+
+ format.lccn output
+
+
+ format.price output
+
+
+ format.url output
+
+ new.block
+ note output
+ fin.entry
+}
+
+
+FUNCTION {inproceedings}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.title "title" output.check
+ new.block
+ crossref missing$
+ { format.in.ed.booktitle "booktitle" output.check
+ format.bvolume output
+ format.number.series output
+ format.pages output
+ address empty$
+ { organization publisher new.sentence.checkb
+ organization output
+ publisher "publisher" output.check
+ format.date "year" output.check
+ }
+ { new.sentence
+ organization output
+ publisher "publisher" output.check
+ address output.nonnull
+ format.date "year" output.check
+ }
+ if$
+ }
+ { format.incoll.inproc.crossref output.nonnull
+ format.pages output
+ }
+ if$
+
+ format.coden output
+
+
+ format.isbn output
+
+
+ format.issn output
+
+
+ format.lccn output
+
+
+ format.price output
+
+
+ format.url output
+
+ new.block
+ note output
+ fin.entry
+}
+
+
+FUNCTION {conference} { inproceedings }
+
+
+FUNCTION {manual}
+{ output.bibitem
+ author empty$
+ { organization empty$
+ 'skip$
+ { organization output.nonnull
+ address output
+ }
+ if$
+ }
+ { format.authors output.nonnull }
+ if$
+ new.block
+ format.btitle "title" output.check
+ author empty$
+ { organization empty$
+ { address new.block.checka
+ address output
+ }
+ 'skip$
+ if$
+ }
+ { organization address new.block.checkb
+ organization output
+ address output
+ }
+ if$
+ format.edition output
+ format.date output
+
+ format.book.pages output
+
+
+ format.price output
+
+
+ format.url output
+
+ new.block
+ note output
+ fin.entry
+}
+
+
+FUNCTION {mastersthesis}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.title "title" output.check
+ new.block
+ "Master's thesis" format.thesis.type output.nonnull
+ school "school" output.check
+ address output
+ format.date "year" output.check
+
+ format.book.pages output
+
+
+ format.url output
+
+ new.block
+ note output
+ fin.entry
+}
+
+
+FUNCTION {misc}
+{ output.bibitem
+ format.authors output
+ title howpublished new.block.checkb
+ format.title output
+ howpublished new.block.checka
+ howpublished output
+ format.date output
+
+ format.coden output
+
+
+ format.isbn output
+
+
+ format.issn output
+
+
+ format.price output
+
+
+ format.url output
+
+ new.block
+ note output
+ fin.entry
+ empty.misc.check
+}
+
+
+FUNCTION {phdthesis}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.btitle "title" output.check
+ new.block
+ "PhD thesis" format.thesis.type output.nonnull
+ school "school" output.check
+ address output
+ format.date "year" output.check
+
+ format.book.pages output
+
+
+ format.url output
+
+ new.block
+ note output
+ fin.entry
+}
+
+
+FUNCTION {periodical}
+{ output.bibitem
+ editor empty$
+ { organization output }
+ { format.editors output.nonnull }
+ if$
+ new.block
+ title emphasize "title" output.check
+ format.vol.num.pages output
+ format.date output
+
+ format.coden output
+
+
+ format.isbn output
+
+
+ format.issn output
+
+
+ format.price output
+
+
+ format.url output
+
+ new.sentence
+ publisher output
+ address output
+ howpublished new.block.checka
+ howpublished output
+ new.block
+ note output
+ fin.entry
+}
+
+
+FUNCTION {proceedings}
+{ output.bibitem
+ editor empty$
+ { organization output }
+ { format.editors output.nonnull }
+ if$
+ new.block
+ format.btitle "title" output.check
+ format.bvolume output
+ format.number.series output
+ address empty$
+ { editor empty$
+ { publisher new.sentence.checka }
+ { organization publisher new.sentence.checkb
+ organization output
+ }
+ if$
+ publisher "publisher" output.check %%% <- new check for missing
+ format.date "year" output.check
+ }
+ { new.sentence
+ editor empty$
+ 'skip$
+ { organization output }
+ if$
+ publisher "publisher" output.check
+ address output.nonnull
+ format.date "year" output.check
+ }
+ if$
+
+ format.coden output
+
+
+ format.isbn output
+
+
+ format.issn output
+
+
+ format.lccn output
+
+
+ format.price output
+
+
+ format.url output
+
+ new.block
+ note output
+ fin.entry
+}
+
+
+FUNCTION {techreport}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.title "title" output.check
+ new.block
+ format.tr.number output.nonnull
+ institution "institution" output.check
+ address output
+ format.date "year" output.check
+
+ format.isbn output % NB: TechReports occasionally have ISBNs
+
+
+ format.book.pages output
+
+
+ format.price output
+
+
+ format.url output
+
+ new.block
+ note output
+ fin.entry
+}
+
+
+FUNCTION {unpublished}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.title "title" output.check
+ new.block
+ note "note" output.check
+ format.date output
+
+ format.url output
+
+ fin.entry
+}
+
+
+FUNCTION {default.type} { misc }
+
+
+
+
+MACRO {jan} {"Jan."}
+
+MACRO {feb} {"Feb."}
+
+MACRO {mar} {"Mar."}
+
+MACRO {apr} {"Apr."}
+
+MACRO {may} {"May"}
+
+MACRO {jun} {"June"}
+
+MACRO {jul} {"July"}
+
+MACRO {aug} {"Aug."}
+
+MACRO {sep} {"Sept."}
+
+MACRO {oct} {"Oct."}
+
+MACRO {nov} {"Nov."}
+
+MACRO {dec} {"Dec."}
+
+
+
+
+
+
+MACRO {acmcs} {"ACM Comput. Surv."}
+
+MACRO {acta} {"Acta Inf."}
+
+MACRO {cacm} {"Commun. ACM"}
+
+MACRO {ibmjrd} {"IBM J. Res. Dev."}
+
+MACRO {ibmsj} {"IBM Syst.~J."}
+
+MACRO {ieeese} {"IEEE Trans. Softw. Eng."}
+
+MACRO {ieeetc} {"IEEE Trans. Comput."}
+
+MACRO {ieeetcad}
+ {"IEEE Trans. Comput.-Aided Design Integrated Circuits"}
+
+MACRO {ipl} {"Inf. Process. Lett."}
+
+MACRO {jacm} {"J.~ACM"}
+
+MACRO {jcss} {"J.~Comput. Syst. Sci."}
+
+MACRO {scp} {"Sci. Comput. Programming"}
+
+MACRO {sicomp} {"SIAM J. Comput."}
+
+MACRO {tocs} {"ACM Trans. Comput. Syst."}
+
+MACRO {tods} {"ACM Trans. Database Syst."}
+
+MACRO {tog} {"ACM Trans. Gr."}
+
+MACRO {toms} {"ACM Trans. Math. Softw."}
+
+MACRO {toois} {"ACM Trans. Office Inf. Syst."}
+
+MACRO {toplas} {"ACM Trans. Prog. Lang. Syst."}
+
+MACRO {tcs} {"Theoretical Comput. Sci."}
+
+
+
+
+READ
+
+
+
+
+FUNCTION {sortify}
+{ purify$
+ "l" change.case$
+}
+
+INTEGERS { len }
+
+FUNCTION {chop.word}
+{ 's :=
+ 'len :=
+ s #1 len substring$ =
+ { s len #1 + global.max$ substring$ }
+ 's
+ if$
+}
+
+
+
+
+
+
+
+
+
+FUNCTION {sort.format.names}
+{ 's :=
+ #1 'nameptr :=
+ ""
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ { nameptr #1 >
+ { " " * }
+ 'skip$
+ if$
+
+ s nameptr "{vv{ } }{ll{ }}{ f{ }}{ jj{ }}" format.name$ 't :=
+
+ nameptr numnames = t "others" = and
+ { "et al" * }
+ { t sortify * }
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+}
+
+
+FUNCTION {sort.format.title}
+{ 't :=
+ "A " #2
+ "An " #3
+ "The " #4 t chop.word
+ chop.word
+ chop.word
+ sortify
+ #1 global.max$ substring$
+}
+
+
+FUNCTION {author.sort}
+{ author empty$
+ { key empty$
+ { "to sort, need author or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { author sort.format.names }
+ if$
+}
+
+FUNCTION {author.editor.sort}
+{ author empty$
+ { editor empty$
+ { key empty$
+ { "to sort, need author, editor, or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { editor sort.format.names }
+ if$
+ }
+ { author sort.format.names }
+ if$
+}
+
+FUNCTION {author.organization.sort}
+{ author empty$
+ { organization empty$
+ { key empty$
+ { "to sort, need author, organization, or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { "The " #4 organization chop.word sortify }
+ if$
+ }
+ { author sort.format.names }
+ if$
+}
+
+FUNCTION {editor.organization.sort}
+{ editor empty$
+ { organization empty$
+ { key empty$
+ { "to sort, need editor, organization, or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { "The " #4 organization chop.word sortify }
+ if$
+ }
+ { editor sort.format.names }
+ if$
+}
+
+
+FUNCTION {presort}
+
+{ type$ "book" =
+
+ type$ "inbook" =
+ or
+ 'author.editor.sort
+ { type$ "proceedings" =
+ 'editor.organization.sort
+ { type$ "manual" =
+ 'author.organization.sort
+ 'author.sort
+ if$
+ }
+ if$
+ }
+ if$
+
+ " "
+ *
+ year field.or.null sortify
+ *
+ " "
+ *
+ title field.or.null
+ sort.format.title
+ *
+ #1 entry.max$ substring$
+ 'sort.key$ :=
+}
+
+ITERATE {presort}
+
+
+SORT
+
+
+
+
+
+
+
+STRINGS { longest.label }
+
+INTEGERS { number.label longest.label.width }
+
+FUNCTION {initialize.longest.label}
+{ "" 'longest.label :=
+ #1 'number.label :=
+ #0 'longest.label.width :=
+}
+
+FUNCTION {longest.label.pass}
+{ number.label int.to.str$ 'label :=
+ number.label #1 + 'number.label :=
+ label width$ longest.label.width >
+ { label 'longest.label :=
+ label width$ 'longest.label.width :=
+ }
+ 'skip$
+ if$
+}
+
+EXECUTE {initialize.longest.label}
+
+ITERATE {longest.label.pass}
+
+
+
+
+FUNCTION {begin.bib}
+
+{ preamble$ empty$
+
+ 'skip$
+ { preamble$ write$ newline$ }
+ if$
+ "\begin{thebibliography}{" longest.label * "}" * write$ newline$
+
+ "\ifx \showCODEN \undefined \def \showCODEN #1{CODEN #1} \fi" write$ newline$
+
+
+ "\ifx \showISBN \undefined \def \showISBN #1{ISBN #1} \fi" write$ newline$
+
+
+ "\ifx \showISSN \undefined \def \showISSN #1{ISSN #1} \fi" write$ newline$
+
+
+ "\ifx \showLCCN \undefined \def \showLCCN #1{LCCN #1} \fi" write$ newline$
+
+
+ "\ifx \showPRICE \undefined \def \showPRICE #1{#1} \fi" write$ newline$
+
+
+ "\ifx \showURL \undefined \def \showURL {URL } \fi" write$ newline$
+ "\ifx \path \undefined \input path.sty \fi" write$ newline$
+ "\ifx \ifshowURL \undefined" write$ newline$
+ " \newif \ifshowURL" write$ newline$
+ " \showURLtrue" write$ newline$
+ "\fi" write$ newline$
+
+}
+
+EXECUTE {begin.bib}
+
+EXECUTE {init.state.consts}
+
+
+ITERATE {call.type$}
+
+
+FUNCTION {end.bib}
+{ newline$
+ "\end{thebibliography}" write$ newline$
+}
+
+EXECUTE {end.bib}
diff --git a/biblio/bibtex/contrib/is-bst/is-alpha.bst b/biblio/bibtex/contrib/is-bst/is-alpha.bst
new file mode 100644
index 0000000000..8e30c422a1
--- /dev/null
+++ b/biblio/bibtex/contrib/is-bst/is-alpha.bst
@@ -0,0 +1,2020 @@
+%% =====================================================================
+%% WARNING: Do NOT edit this file. It was produced automatically by
+%% Nelson H. F. Beebe <beebe@plot79.math.utah.edu>
+%% from file://plot79.math.utah.edu/u/sy/beebe/tex/bib/merge/xbtxbst.doc
+%% on Wed May 15 10:36:04 MDT 1996.
+%% =====================================================================
+%%%=====================================================================
+%%% @BibTeX-style-file{
+%%% author = "Nelson H. F. Beebe",
+%%% version = "2.03",
+%%% date = "15 May 1996",
+%%% time = "10:35:51 MDT",
+%%% filename = "is-alpha.bst",
+%%% address = "Center for Scientific Computing
+%%% Department of Mathematics
+%%% University of Utah
+%%% Salt Lake City, UT 84112
+%%% USA",
+%%% telephone = "+1 801 581 5254",
+%%% FAX = "+1 801 581 4148",
+%%% URL = "http://www.math.utah.edu/~beebe",
+%%% checksum = "49675 2020 5086 41225",
+%%% email = "beebe@math.utah.edu (Internet)",
+%%% codetable = "ISO/ASCII",
+%%% keywords = "BibTeX, style, bibliography",
+%%% supported = "yes",
+%%% docstring = "This file is a modification of the standard
+%%% BibTeX btxbst.doc file, or is a .bst file
+%%% derived from that modification. It contains
+%%% optional added support for CODEN, ISBN, ISSN,
+%%% LCCN, and PRICE fields, extended PAGES
+%%% fields, the PERIODICAL entry, and extended
+%%% citation label suffixing.
+%%%
+%%% In addition, date formatting supports a day
+%%% keyword, so that bibliography entries can be
+%%% written with
+%%%
+%%% day = {23},
+%%% month = aug,
+%%%
+%%% instead of the language-dependent awkward
+%%% forms required by the standard styles
+%%%
+%%% month = {23~} # aug,
+%%% month = aug # {~23},
+%%%
+%%% These older forms are, of course, still
+%%% handled correctly.
+%%%
+%%% The UNIX C preprocessor can be used to
+%%% extract the standard styles, as follows:
+%%%
+%%% cpp -P -DPLAIN xbtxbst.doc >plain.bst
+%%% cpp -P -DUNSRT xbtxbst.doc >unsrt.bst
+%%% cpp -P -DALPHA xbtxbst.doc >alpha.bst
+%%% cpp -P -DABBRV xbtxbst.doc >abbrv.bst
+%%%
+%%% To obtain correct file header checksums, pipe
+%%% the output through the checksum program, e.g.
+%%%
+%%% cpp -P -DPLAIN xbtxbst.doc | checksum >plain.bst
+%%%
+%%% The accompanying UNIX Makefile automates this
+%%% job, and provides some extra leading comments
+%%% in the generated style files warning the user
+%%% not to modify them.
+%%%
+%%% Additional optional definitions are recognized
+%%% to provide extensions to the standard styles:
+%%%
+%%% -D_CODEN for CODEN output
+%%%
+%%% -D_ISBN for ISBN output
+%%%
+%%% -D_ISSN for ISSN output
+%%%
+%%% -D_LCCN for LCCN output
+%%%
+%%% -D_PRICE for price output,
+%%%
+%%% -D_BOOKPAGES for book, techreport, manual,
+%%% and thesis pages output.
+%%%
+%%% -D_URL to get World-Wide Web Uniform
+%%% Resource Locator (URL) output.
+%%%
+%%% -D_NUMERIC_SUFFIXES to get numeric
+%%% label suffixes -1, -2, ..., -26, instead of
+%%% letters a, b, ..., z, so as to correctly
+%%% handle alpha-style bibliographies with more
+%%% than 26 entries for a single author in one
+%%% year. Change letter suffix code to switch
+%%% to numeric suffixes if more than 26 letters
+%%% are used, so that no matter which scheme is
+%%% selected, correct output will always be
+%%% obtained.
+%%%
+%%% The CODEN, ISBN, ISSN, LCCN, PRICE, and URL
+%%% values are wrapped inside macros \showCODEN{}
+%%% etc. that the user can provide alternate
+%%% definitions of to change the formatting, or
+%%% to suppress their output altogether. That
+%%% way, output identical to that of the four
+%%% standard BibTeX style files can be obtained
+%%% with these extended files, if these macros
+%%% are defined to expand to empty strings.
+%%%
+%%% URL handling is slightly more complex,
+%%% because URLs can contain characters which TeX
+%%% must handle in verbatim mode in a typewriter
+%%% font, and such text cannot readily appear
+%%% inside nested macro arguments. Consequently,
+%%% URLs are formatted in the .bbl file like
+%%% this:
+%%% \ifshowURL {\showURL \path|...|} \fi
+%%% where \showURL takes no argument, and
+%%% normally expands to the 4-character string
+%%% URL<space>. The grouping braces ensure that
+%%% any font changes made by \showURL remain
+%%% localized. Vertical bar is chosen as the
+%%% verbatim path delimiter, because it cannot
+%%% appear in URLs. The other prohibited ISO
+%%% Latin 1 characters are the non-printing
+%%% control characters 0..31, plus those in the
+%%% range 128..255, plus the ten special
+%%% characters
+%%%
+%%% { } [ ] \ ^ ~ < > `
+%%%
+%%% See Internet RFC 1630 (June 1994) for more
+%%% details. (Backquote is not even mentioned
+%%% there.)
+%%%
+%%% As an example of font changes, in LaTeX 2e
+%%% you might define
+%%% \newcommand{\showURL}{URL
+%%% \let \oldtt = \tt
+%%% \renewcommand{\tt}{\oldtt \itshape}}
+%%% to get URLs set in a typewriter italic font.
+%%%
+%%% If desired, a sed script can be used to
+%%% eliminate non-essential comments (this
+%%% reduces the file size by 2/3); a command
+%%% filter step like
+%%% sed -e '/^%$/d' -e '/^%[^%].*$/d'
+%%% will accomplish that job.
+%%%
+%%% The checksum field above contains a CRC-16
+%%% checksum as the first value, followed by the
+%%% equivalent of the standard UNIX wc (word
+%%% count) utility output of lines, words, and
+%%% characters. This is produced by Robert
+%%% Solovay's checksum utility."
+%%% }
+%%% ====================================================================
+%%% Revision history (reverse time order):
+%%%
+%%% 2.03 [15-May-1996]
+%%% Add CODEN support, ISBN and ISSN output for Article entries,
+%%% and ISBN output for TechReport entries (yes, these sometimes
+%%% do have ISBNs).
+%%%
+%%% Add wrapper macros \showXYZ{} (XYZ = CODEN, ISBN, ISSN, LCCN,
+%%% PRICE, and URL) defined inside the thebibliography environment
+%%% to expand to XYZ (except for PRICE) and their arguments,
+%%% PROVIDED they are not already defined. That way, the user can
+%%% provide alternate definitions outside the thebibliography
+%%% environment, for example, to suppress particular ones, or
+%%% to alter the font used.
+%%%
+%%% Substantially revise leading comments to better document the
+%%% extensions.
+%%%
+%%% 2.02 [01-Apr-1996]
+%%% Add day keyword support with new code in format.date function.
+%%% Oren Patashnik will include this new keyword in standard styles
+%%% in BibTeX 1.0.
+%%%
+%%% Add new function collapse.pagerange, and use it to collapse
+%%% page ranges with identical initial and final numbers to a
+%%% single number, so that bibliography files can distinguish
+%%% between one-page documents, and documents missing final page
+%%% numbers.
+%%%
+%%% 2.01 [25-Oct-1994]
+%%% Add URL output support.
+%%%
+%%% 2.00 [12-Oct-1994]
+%%% Add support for pages in theses and manuals, treating them
+%%% like Book and InBook pages.
+%%%
+%%% Correct ISSN support: a typo caused output of ISBN instead of
+%%% ISSN.
+%%%
+%%% Wherever ISBNs are output, also output an ISSN, if one
+%%% exists, and vice versa. The reason is that some periodicals
+%%% (e.g. The X Resource, published by O'Reilly and Associates)
+%%% have both ISSN and ISBN numbers, and can be purchased either
+%%% as journal subscriptions, or as single volumes.
+%%%
+%%% For InProceedings and Proceedings output, issue a warning for
+%%% a missing publisher: even though that field is optional, a
+%%% bibliographic reference without it is incomplete.
+%%%
+%%% Remove harmless, but unneeded, single horizontal space before
+%%% price output added with version 1.03.
+%%%
+%%% Change Proceedings and InProceedings to treat address values
+%%% as publisher addresses, as they are with every other document
+%%% type, rather than as conference addresses, which belong in
+%%% the title field (that is how major libraries, including OCLC
+%%% and Library of Congress, with nearly 60M holdings, represent
+%%% them). The need for this change has been discussed with
+%%% BibTeX's author, Oren Patashnik, and there is a good
+%%% possibility that BibTeX 1.0 will contain the change
+%%% implemented here. This is an INCOMPATIBLE change that will
+%%% produce different .bbl file formatting. However, the TUG and
+%%% BibNet bibliography projects have consistently used address
+%%% to me publisher/organization/institution address, and so
+%%% already conform to the new practice.
+%%%
+%%% 1.05 [30-May-1994]
+%%% Add NUMERIC_SUFFIXES support.
+%%%
+%%% Change all preprocessor statements to put else and endif
+%%% labels inside C-style comments to conform to 1989 ISO/ANSI C
+%%% Standard.
+%%%
+%%% 1.04 [11-Nov-1993]
+%%% Add underscore prefix to new processor symbols to prevent
+%%% substitution in comments
+%%%
+%%% 1.03 [11-Oct-1993]
+%%% Add support for LCCN (Library of Congress Catalog Number)
+%%% and price fields, and make ISBN, ISSN, LCCN, and price
+%%% selectable by preprocessor conditionals.
+%%%
+%%% 1.02 [12-Sep-1991]
+%%% Merge in Barbara N. Beeton's suggestion for hyphen-less
+%%% line breaks around volume(number):page.
+%%%
+%%% 1.01 [10-Sep-1991]
+%%% Update file comment header and use Solovay checksum program.
+%%%
+%%% 1.00 [17-Oct-1990]
+%%% Original version merging hand-edits of is-xxx.bst files into
+%%% this master file, xbtxbst.doc.
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+%% BibTeX `plain' family
+%% version 0.99b for BibTeX versions 0.99a or later, LaTeX version 2.09.
+%% Copyright (C) 1985, all rights reserved.
+%% Copying of this file is authorized only if either
+%% (1) you make absolutely no changes to your copy, including name, or
+%% (2) if you do make changes, you name it something other than
+%% btxbst.doc, plain.bst, unsrt.bst, alpha.bst, and abbrv.bst.
+%% This restriction helps ensure that all standard styles are identical.
+%% The file btxbst.doc has the documentation for this style.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ENTRY
+ { address
+ author
+ booktitle
+ chapter
+
+ coden
+
+ day
+ edition
+ editor
+ howpublished
+ institution
+
+ isbn
+
+
+ issn
+
+ journal
+ key
+
+ lccn
+
+ month
+ note
+ number
+ organization
+ pages
+
+ price
+
+ publisher
+ school
+ series
+ title
+ type
+
+ URL
+
+ volume
+ year
+ }
+ {}
+
+
+ { label extra.label sort.label }
+
+
+
+
+INTEGERS { output.state before.all mid.sentence after.sentence after.block }
+
+FUNCTION {init.state.consts}
+{ #0 'before.all :=
+ #1 'mid.sentence :=
+ #2 'after.sentence :=
+ #3 'after.block :=
+}
+
+
+STRINGS { b e new.pages original.t s t }
+
+FUNCTION {output.nonnull}
+{ 's :=
+ output.state mid.sentence =
+ { ", " * write$ }
+ { output.state after.block =
+ { add.period$ write$
+ newline$
+ "\newblock " write$
+ }
+ { output.state before.all =
+ 'write$
+ { add.period$ " " * write$ }
+ if$
+ }
+ if$
+ mid.sentence 'output.state :=
+ }
+ if$
+ s
+}
+
+FUNCTION {output}
+{ duplicate$ empty$
+ 'pop$
+ 'output.nonnull
+ if$
+}
+
+FUNCTION {output.check}
+{ 't :=
+ duplicate$ empty$
+ { pop$ "empty " t * " in " * cite$ * warning$ }
+ 'output.nonnull
+ if$
+}
+
+FUNCTION {output.bibitem}
+{ newline$
+
+ "\bibitem[" write$
+ label write$
+ "]{" write$
+
+ cite$ write$
+ "}" write$
+ newline$
+ ""
+ before.all 'output.state :=
+}
+
+
+FUNCTION {fin.entry}
+{ add.period$
+ write$
+ newline$
+}
+
+FUNCTION {new.block}
+{ output.state before.all =
+ 'skip$
+ { after.block 'output.state := }
+ if$
+}
+
+FUNCTION {new.sentence}
+{ output.state after.block =
+ 'skip$
+ { output.state before.all =
+ 'skip$
+ { after.sentence 'output.state := }
+ if$
+ }
+ if$
+}
+
+
+FUNCTION {not}
+{ { #0 }
+ { #1 }
+ if$
+}
+
+FUNCTION {and}
+{ 'skip$
+ { pop$ #0 }
+ if$
+}
+
+FUNCTION {or}
+{ { pop$ #1 }
+ 'skip$
+ if$
+}
+
+
+FUNCTION {new.block.checka}
+{ empty$
+ 'skip$
+ 'new.block
+ if$
+}
+
+FUNCTION {new.block.checkb}
+{ empty$
+ swap$ empty$
+ and
+ 'skip$
+ 'new.block
+ if$
+}
+
+
+FUNCTION {new.sentence.checka}
+{ empty$
+ 'skip$
+ 'new.sentence
+ if$
+}
+
+FUNCTION {new.sentence.checkb}
+{ empty$
+ swap$ empty$
+ and
+ 'skip$
+ 'new.sentence
+ if$
+}
+
+
+FUNCTION {field.or.null}
+{ duplicate$ empty$
+ { pop$ "" }
+ 'skip$
+ if$
+}
+
+FUNCTION {emphasize}
+{ duplicate$ empty$
+ { pop$ "" }
+ { "{\em " swap$ * "}" * }
+ if$
+}
+
+INTEGERS { nameptr namesleft numnames }
+
+FUNCTION {format.names}
+{ 's :=
+ #1 'nameptr :=
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+
+ { s nameptr "{ff~}{vv~}{ll}{, jj}" format.name$ 't :=
+
+ nameptr #1 >
+ { namesleft #1 >
+ { ", " * t * }
+ { numnames #2 >
+ { "," * }
+ 'skip$
+ if$
+ t "others" =
+ { " et~al." * }
+ { " and " * t * }
+ if$
+ }
+ if$
+ }
+ 't
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+}
+
+FUNCTION {format.authors}
+{ author empty$
+ { "" }
+ { author format.names }
+ if$
+}
+
+
+FUNCTION {format.coden}
+{ coden empty$
+ { "" }
+ { new.block "\showCODEN{" coden * "}" *}
+ if$
+}
+
+
+FUNCTION {format.editors}
+{ editor empty$
+ { "" }
+ { editor format.names
+ editor num.names$ #1 >
+ { ", editors" * }
+ { ", editor" * }
+ if$
+ }
+ if$
+}
+
+
+FUNCTION {format.isbn}
+{ isbn empty$
+ { "" }
+ { new.block "\showISBN{" isbn * "}" *}
+ if$
+}
+
+
+
+FUNCTION {format.issn}
+{ issn empty$
+ { "" }
+ { new.block "\showISSN{" issn * "}" *}
+ if$
+}
+
+
+
+FUNCTION {format.lccn}
+{ lccn empty$
+ { "" }
+ { new.block "\showLCCN{" lccn * "}" *}
+ if$
+}
+
+
+
+FUNCTION {format.price}
+{ price empty$
+ { "" }
+ { new.block "\showPRICE{" price * "}" *}
+ if$
+}
+
+
+
+FUNCTION {format.url}
+{ url empty$
+ { "" }
+ { new.block "\ifshowURL {\showURL \path|" url * "|}\fi" *}
+ if$
+}
+
+
+
+
+FUNCTION {format.title}
+{ title empty$
+ { "" }
+
+ { title "t" change.case$ }
+
+ if$
+}
+
+
+
+FUNCTION {collapse.pagerange}
+{ 't := % save input page range string
+ t 'original.t := % save original page range
+ "" 'b := % beginning page number
+ "" 'e := % ending page number
+ { t empty$ not } % while-loop Boolean condition
+ { % while-loop body
+ t #1 #2 substring$ "--" = % have we found the en-dash?
+ {
+ t #3 global.max$ substring$ 'e := % yes, save ending page number
+ "" 't := % and set t to empty string to terminate loop
+ }
+ {
+ b t #1 #1 substring$ * 'b := % no, just accumulate this character
+ t #2 global.max$ substring$ 't := % and set t to the remaining string
+ }
+ if$
+ }
+ while$ % on exit, t has ending page number string
+ e b = % are beginning and ending numbers the same?
+ { b } % yes, return the beginning page number string
+ { original.t } % no, return the original page number string
+ if$
+}
+
+
+FUNCTION {n.dashify}
+{ 't :=
+ ""
+ { t empty$ not }
+ { t #1 #1 substring$ "-" =
+ { t #1 #2 substring$ "--" = not
+ { "--" *
+ t #2 global.max$ substring$ 't :=
+ }
+ { { t #1 #1 substring$ "-" = }
+ { "-" *
+ t #2 global.max$ substring$ 't :=
+ }
+ while$
+ }
+ if$
+ }
+ { t #1 #1 substring$ *
+ t #2 global.max$ substring$ 't :=
+ }
+ if$
+ }
+ while$
+}
+
+
+FUNCTION {format.date}
+{ year empty$
+ { month empty$
+ {
+ day empty$
+ { "" }
+ { "there's a day but no month or year in " cite$ * warning$ }
+ if$
+ }
+ { "there's a month but no year in " cite$ * warning$
+ month
+ day empty$
+ { }
+ { " " * day * }
+ if$
+ }
+ if$
+ }
+ { month empty$
+ {
+ day empty$
+ { year }
+ { "there's a day and year but no month in " cite$ * warning$ }
+ if$
+ }
+ {
+ month " " *
+ day empty$
+ { }
+ { day * ", " * }
+ if$
+ year *
+ }
+ if$
+ }
+ if$
+}
+
+
+FUNCTION {format.btitle}
+{ title emphasize
+}
+
+
+FUNCTION {tie.or.space.connect}
+{ duplicate$ text.length$ #3 <
+ { "~" }
+ { " " }
+ if$
+ swap$ * *
+}
+
+
+FUNCTION {either.or.check}
+{ empty$
+ 'pop$
+ { "can't use both " swap$ * " fields in " * cite$ * warning$ }
+ if$
+}
+
+
+FUNCTION {format.bvolume}
+{ volume empty$
+ { "" }
+ { "volume" volume tie.or.space.connect
+ series empty$
+ 'skip$
+ { " of " * series emphasize * }
+ if$
+ "volume and number" number either.or.check
+ }
+ if$
+}
+
+
+FUNCTION {format.number.series}
+{ volume empty$
+ { number empty$
+ { series field.or.null }
+ { output.state mid.sentence =
+ { "number" }
+ { "Number" }
+ if$
+ number tie.or.space.connect
+ series empty$
+ { "there's a number but no series in " cite$ * warning$ }
+ { " in " * series * }
+ if$
+ }
+ if$
+ }
+ { "" }
+ if$
+}
+
+
+FUNCTION {format.edition}
+{ edition empty$
+ { "" }
+ { output.state mid.sentence =
+ { edition "l" change.case$ " edition" * }
+ { edition "t" change.case$ " edition" * }
+ if$
+ }
+ if$
+}
+
+
+INTEGERS { multiresult }
+
+FUNCTION {multi.page.check}
+{ 't :=
+ #0 'multiresult :=
+ { multiresult not
+ t empty$ not
+ and
+ }
+ { t #1 #1 substring$
+ duplicate$ "-" =
+ swap$ duplicate$ "," =
+ swap$ "+" =
+ or or
+ { #1 'multiresult := }
+ { t #2 global.max$ substring$ 't := }
+ if$
+ }
+ while$
+ multiresult
+}
+
+
+FUNCTION {format.book.pages}
+{ pages empty$
+ { "" }
+ { new.block pages " pp." * }
+ if$
+}
+
+
+
+FUNCTION {format.pages}
+{ pages empty$
+ { "" }
+ {
+ pages multi.page.check
+ { pages collapse.pagerange 'new.pages := }
+ { pages 'new.pages := }
+ if$
+ new.pages multi.page.check
+ { "pages" new.pages n.dashify tie.or.space.connect }
+ { "page" new.pages tie.or.space.connect }
+ if$
+ }
+ if$
+}
+
+
+FUNCTION {format.vol.num.pages}
+{ volume field.or.null
+ number empty$
+ 'skip$
+ { "\penalty0 (" number * ")" * *
+ volume empty$
+ { "there's a number but no volume in " cite$ * warning$ }
+ 'skip$
+ if$
+ }
+ if$
+ pages empty$
+ 'skip$
+ { duplicate$ empty$
+ { pop$ format.pages }
+ { ":\penalty0 " * pages collapse.pagerange n.dashify * }
+ if$
+ }
+ if$
+}
+
+
+
+FUNCTION {format.chapter.pages}
+{ chapter empty$
+ 'format.pages
+ { type empty$
+ { "chapter" }
+ { type "l" change.case$ }
+ if$
+ chapter tie.or.space.connect
+ pages empty$
+ 'skip$
+ { ", " * format.pages * }
+ if$
+ }
+ if$
+}
+
+
+FUNCTION {format.in.ed.booktitle}
+{ booktitle empty$
+ { "" }
+ { editor empty$
+ { "In " booktitle emphasize * }
+ { "In " format.editors * ", " * booktitle emphasize * }
+ if$
+ }
+ if$
+}
+
+
+FUNCTION {empty.misc.check}
+{ author empty$ title empty$ howpublished empty$
+ month empty$ year empty$ note empty$
+ and and and and and
+
+ key empty$ not and
+
+ { "all relevant fields are empty in " cite$ * warning$ }
+ 'skip$
+ if$
+}
+
+
+FUNCTION {format.thesis.type}
+{ type empty$
+ 'skip$
+ { pop$
+ type "t" change.case$
+ }
+ if$
+}
+
+
+FUNCTION {format.tr.number}
+{ type empty$
+ { "Technical Report" }
+ 'type
+ if$
+ number empty$
+ { "t" change.case$ }
+ { number tie.or.space.connect }
+ if$
+}
+
+
+FUNCTION {format.article.crossref}
+{ key empty$
+ { journal empty$
+ { "need key or journal for " cite$ * " to crossref " * crossref *
+ warning$
+ ""
+ }
+ { "In {\em " journal * "\/}" * }
+ if$
+ }
+ { "In " key * }
+ if$
+ " \cite{" * crossref * "}" *
+}
+
+
+FUNCTION {format.crossref.editor}
+{ editor #1 "{vv~}{ll}" format.name$
+ editor num.names$ duplicate$
+ #2 >
+ { pop$ " et~al." * }
+ { #2 <
+ 'skip$
+ { editor #2 "{ff }{vv }{ll}{ jj}" format.name$ "others" =
+ { " et~al." * }
+ { " and " * editor #2 "{vv~}{ll}" format.name$ * }
+ if$
+ }
+ if$
+ }
+ if$
+}
+
+
+FUNCTION {format.book.crossref}
+{ volume empty$
+ { "empty volume in " cite$ * "'s crossref of " * crossref * warning$
+ "In "
+ }
+ { "Volume" volume tie.or.space.connect
+ " of " *
+ }
+ if$
+ editor empty$
+ editor field.or.null author field.or.null =
+ or
+ { key empty$
+ { series empty$
+ { "need editor, key, or series for " cite$ * " to crossref " *
+ crossref * warning$
+ "" *
+ }
+ { "{\em " * series * "\/}" * }
+ if$
+ }
+ { key * }
+ if$
+ }
+ { format.crossref.editor * }
+ if$
+ " \cite{" * crossref * "}" *
+}
+
+
+FUNCTION {format.incoll.inproc.crossref}
+{ editor empty$
+ editor field.or.null author field.or.null =
+ or
+ { key empty$
+ { booktitle empty$
+ { "need editor, key, or booktitle for " cite$ * " to crossref " *
+ crossref * warning$
+ ""
+ }
+ { "In {\em " booktitle * "\/}" * }
+ if$
+ }
+ { "In " key * }
+ if$
+ }
+ { "In " format.crossref.editor * }
+ if$
+ " \cite{" * crossref * "}" *
+}
+
+
+FUNCTION {article}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.title "title" output.check
+ new.block
+ crossref missing$
+ { journal emphasize "journal" output.check
+ format.vol.num.pages output
+ format.date "year" output.check
+ }
+ { format.article.crossref output.nonnull
+ format.pages output
+ }
+ if$
+
+ format.coden output
+
+
+ format.isbn output
+
+
+ format.issn output
+
+
+ format.url output
+
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {book}
+{ output.bibitem
+ author empty$
+ { format.editors "author and editor" output.check }
+ { format.authors output.nonnull
+ crossref missing$
+ { "author and editor" editor either.or.check }
+ 'skip$
+ if$
+ }
+ if$
+ new.block
+ format.btitle "title" output.check
+ crossref missing$
+ { format.bvolume output
+ new.block
+ format.number.series output
+ new.sentence
+ publisher "publisher" output.check
+ address output
+ }
+ { new.block
+ format.book.crossref output.nonnull
+ }
+ if$
+ format.edition output
+ format.date "year" output.check
+
+ format.coden output
+
+
+ format.isbn output
+
+
+ format.issn output
+
+
+ format.book.pages output
+
+
+ format.lccn output
+
+
+ format.price output
+
+
+ format.url output
+
+ new.block
+ note output
+ fin.entry
+}
+
+
+FUNCTION {booklet}
+{ output.bibitem
+ format.authors output
+ new.block
+ format.title "title" output.check
+ howpublished address new.block.checkb
+ howpublished output
+ address output
+ format.date output
+
+ format.coden output
+
+
+ format.isbn output
+
+
+ format.issn output
+
+
+ format.book.pages output
+
+
+ format.lccn output
+
+
+ format.price output
+
+
+ format.url output
+
+ new.block
+ note output
+ fin.entry
+}
+
+
+
+FUNCTION {inbook}
+{ output.bibitem
+ author empty$
+ { format.editors "author and editor" output.check }
+ { format.authors output.nonnull
+ crossref missing$
+ { "author and editor" editor either.or.check }
+ 'skip$
+ if$
+ }
+ if$
+ new.block
+ format.btitle "title" output.check
+ crossref missing$
+ { format.bvolume output
+ format.chapter.pages "chapter and pages" output.check
+ new.block
+ format.number.series output
+ new.sentence
+ publisher "publisher" output.check
+ address output
+ }
+ { format.chapter.pages "chapter and pages" output.check
+ new.block
+ format.book.crossref output.nonnull
+ }
+ if$
+ format.edition output
+ format.date "year" output.check
+
+ format.coden output
+
+
+ format.isbn output
+
+
+ format.issn output
+
+
+ format.lccn output
+
+
+ format.price output
+
+
+ format.url output
+
+ new.block
+ note output
+ fin.entry
+}
+
+
+FUNCTION {incollection}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.title "title" output.check
+ new.block
+ crossref missing$
+ { format.in.ed.booktitle "booktitle" output.check
+ format.bvolume output
+ format.number.series output
+ format.chapter.pages output
+ new.sentence
+ publisher "publisher" output.check
+ address output
+ format.edition output
+ format.date "year" output.check
+ }
+ { format.incoll.inproc.crossref output.nonnull
+ format.chapter.pages output
+ }
+ if$
+
+ format.coden output
+
+
+ format.isbn output
+
+
+ format.issn output
+
+
+ format.lccn output
+
+
+ format.price output
+
+
+ format.url output
+
+ new.block
+ note output
+ fin.entry
+}
+
+
+FUNCTION {inproceedings}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.title "title" output.check
+ new.block
+ crossref missing$
+ { format.in.ed.booktitle "booktitle" output.check
+ format.bvolume output
+ format.number.series output
+ format.pages output
+ address empty$
+ { organization publisher new.sentence.checkb
+ organization output
+ publisher "publisher" output.check
+ format.date "year" output.check
+ }
+ { new.sentence
+ organization output
+ publisher "publisher" output.check
+ address output.nonnull
+ format.date "year" output.check
+ }
+ if$
+ }
+ { format.incoll.inproc.crossref output.nonnull
+ format.pages output
+ }
+ if$
+
+ format.coden output
+
+
+ format.isbn output
+
+
+ format.issn output
+
+
+ format.lccn output
+
+
+ format.price output
+
+
+ format.url output
+
+ new.block
+ note output
+ fin.entry
+}
+
+
+FUNCTION {conference} { inproceedings }
+
+
+FUNCTION {manual}
+{ output.bibitem
+ author empty$
+ { organization empty$
+ 'skip$
+ { organization output.nonnull
+ address output
+ }
+ if$
+ }
+ { format.authors output.nonnull }
+ if$
+ new.block
+ format.btitle "title" output.check
+ author empty$
+ { organization empty$
+ { address new.block.checka
+ address output
+ }
+ 'skip$
+ if$
+ }
+ { organization address new.block.checkb
+ organization output
+ address output
+ }
+ if$
+ format.edition output
+ format.date output
+
+ format.book.pages output
+
+
+ format.price output
+
+
+ format.url output
+
+ new.block
+ note output
+ fin.entry
+}
+
+
+FUNCTION {mastersthesis}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.title "title" output.check
+ new.block
+ "Master's thesis" format.thesis.type output.nonnull
+ school "school" output.check
+ address output
+ format.date "year" output.check
+
+ format.book.pages output
+
+
+ format.url output
+
+ new.block
+ note output
+ fin.entry
+}
+
+
+FUNCTION {misc}
+{ output.bibitem
+ format.authors output
+ title howpublished new.block.checkb
+ format.title output
+ howpublished new.block.checka
+ howpublished output
+ format.date output
+
+ format.coden output
+
+
+ format.isbn output
+
+
+ format.issn output
+
+
+ format.price output
+
+
+ format.url output
+
+ new.block
+ note output
+ fin.entry
+ empty.misc.check
+}
+
+
+FUNCTION {phdthesis}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.btitle "title" output.check
+ new.block
+ "PhD thesis" format.thesis.type output.nonnull
+ school "school" output.check
+ address output
+ format.date "year" output.check
+
+ format.book.pages output
+
+
+ format.url output
+
+ new.block
+ note output
+ fin.entry
+}
+
+
+FUNCTION {periodical}
+{ output.bibitem
+ editor empty$
+ { organization output }
+ { format.editors output.nonnull }
+ if$
+ new.block
+ title emphasize "title" output.check
+ format.vol.num.pages output
+ format.date output
+
+ format.coden output
+
+
+ format.isbn output
+
+
+ format.issn output
+
+
+ format.price output
+
+
+ format.url output
+
+ new.sentence
+ publisher output
+ address output
+ howpublished new.block.checka
+ howpublished output
+ new.block
+ note output
+ fin.entry
+}
+
+
+FUNCTION {proceedings}
+{ output.bibitem
+ editor empty$
+ { organization output }
+ { format.editors output.nonnull }
+ if$
+ new.block
+ format.btitle "title" output.check
+ format.bvolume output
+ format.number.series output
+ address empty$
+ { editor empty$
+ { publisher new.sentence.checka }
+ { organization publisher new.sentence.checkb
+ organization output
+ }
+ if$
+ publisher "publisher" output.check %%% <- new check for missing
+ format.date "year" output.check
+ }
+ { new.sentence
+ editor empty$
+ 'skip$
+ { organization output }
+ if$
+ publisher "publisher" output.check
+ address output.nonnull
+ format.date "year" output.check
+ }
+ if$
+
+ format.coden output
+
+
+ format.isbn output
+
+
+ format.issn output
+
+
+ format.lccn output
+
+
+ format.price output
+
+
+ format.url output
+
+ new.block
+ note output
+ fin.entry
+}
+
+
+FUNCTION {techreport}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.title "title" output.check
+ new.block
+ format.tr.number output.nonnull
+ institution "institution" output.check
+ address output
+ format.date "year" output.check
+
+ format.isbn output % NB: TechReports occasionally have ISBNs
+
+
+ format.book.pages output
+
+
+ format.price output
+
+
+ format.url output
+
+ new.block
+ note output
+ fin.entry
+}
+
+
+FUNCTION {unpublished}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.title "title" output.check
+ new.block
+ note "note" output.check
+ format.date output
+
+ format.url output
+
+ fin.entry
+}
+
+
+FUNCTION {default.type} { misc }
+
+
+
+
+MACRO {jan} {"January"}
+
+MACRO {feb} {"February"}
+
+MACRO {mar} {"March"}
+
+MACRO {apr} {"April"}
+
+MACRO {may} {"May"}
+
+MACRO {jun} {"June"}
+
+MACRO {jul} {"July"}
+
+MACRO {aug} {"August"}
+
+MACRO {sep} {"September"}
+
+MACRO {oct} {"October"}
+
+MACRO {nov} {"November"}
+
+MACRO {dec} {"December"}
+
+
+
+
+
+
+MACRO {acmcs} {"ACM Computing Surveys"}
+
+MACRO {acta} {"Acta Informatica"}
+
+MACRO {cacm} {"Communications of the ACM"}
+
+MACRO {ibmjrd} {"IBM Journal of Research and Development"}
+
+MACRO {ibmsj} {"IBM Systems Journal"}
+
+MACRO {ieeese} {"IEEE Transactions on Software Engineering"}
+
+MACRO {ieeetc} {"IEEE Transactions on Computers"}
+
+MACRO {ieeetcad}
+ {"IEEE Transactions on Computer-Aided Design of Integrated Circuits"}
+
+MACRO {ipl} {"Information Processing Letters"}
+
+MACRO {jacm} {"Journal of the ACM"}
+
+MACRO {jcss} {"Journal of Computer and System Sciences"}
+
+MACRO {scp} {"Science of Computer Programming"}
+
+MACRO {sicomp} {"SIAM Journal on Computing"}
+
+MACRO {tocs} {"ACM Transactions on Computer Systems"}
+
+MACRO {tods} {"ACM Transactions on Database Systems"}
+
+MACRO {tog} {"ACM Transactions on Graphics"}
+
+MACRO {toms} {"ACM Transactions on Mathematical Software"}
+
+MACRO {toois} {"ACM Transactions on Office Information Systems"}
+
+MACRO {toplas} {"ACM Transactions on Programming Languages and Systems"}
+
+MACRO {tcs} {"Theoretical Computer Science"}
+
+
+
+
+READ
+
+
+
+
+FUNCTION {sortify}
+{ purify$
+ "l" change.case$
+}
+
+INTEGERS { len }
+
+FUNCTION {chop.word}
+{ 's :=
+ 'len :=
+ s #1 len substring$ =
+ { s len #1 + global.max$ substring$ }
+ 's
+ if$
+}
+
+
+
+
+
+
+INTEGERS { et.al.char.used }
+
+FUNCTION {initialize.et.al.char.used}
+{ #0 'et.al.char.used :=
+}
+
+EXECUTE {initialize.et.al.char.used}
+
+FUNCTION {format.lab.names}
+{ 's :=
+ s num.names$ 'numnames :=
+ numnames #1 >
+ { numnames #4 >
+ { #3 'namesleft := }
+ { numnames 'namesleft := }
+ if$
+ #1 'nameptr :=
+ ""
+ { namesleft #0 > }
+ { nameptr numnames =
+ { s nameptr "{ff }{vv }{ll}{ jj}" format.name$ "others" =
+ { "{\etalchar{+}}" *
+ #1 'et.al.char.used :=
+ }
+ { s nameptr "{v{}}{l{}}" format.name$ * }
+ if$
+ }
+ { s nameptr "{v{}}{l{}}" format.name$ * }
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+ numnames #4 >
+ { "{\etalchar{+}}" *
+ #1 'et.al.char.used :=
+ }
+ 'skip$
+ if$
+ }
+ { s #1 "{v{}}{l{}}" format.name$
+ duplicate$ text.length$ #2 <
+ { pop$ s #1 "{ll}" format.name$ #3 text.prefix$ }
+ 'skip$
+ if$
+ }
+ if$
+}
+
+FUNCTION {author.key.label}
+{ author empty$
+ { key empty$
+
+ { cite$ #1 #3 substring$ }
+
+ { key #3 text.prefix$ }
+ if$
+ }
+ { author format.lab.names }
+ if$
+}
+
+FUNCTION {author.editor.key.label}
+{ author empty$
+ { editor empty$
+ { key empty$
+
+ { cite$ #1 #3 substring$ }
+
+ { key #3 text.prefix$ }
+ if$
+ }
+ { editor format.lab.names }
+ if$
+ }
+ { author format.lab.names }
+ if$
+}
+
+FUNCTION {author.key.organization.label}
+{ author empty$
+ { key empty$
+ { organization empty$
+
+ { cite$ #1 #3 substring$ }
+
+ { "The " #4 organization chop.word #3 text.prefix$ }
+ if$
+ }
+ { key #3 text.prefix$ }
+ if$
+ }
+ { author format.lab.names }
+ if$
+}
+
+FUNCTION {editor.key.organization.label}
+{ editor empty$
+ { key empty$
+ { organization empty$
+
+ { cite$ #1 #3 substring$ }
+
+ { "The " #4 organization chop.word #3 text.prefix$ }
+ if$
+ }
+ { key #3 text.prefix$ }
+ if$
+ }
+ { editor format.lab.names }
+ if$
+}
+
+FUNCTION {calc.label}
+{ type$ "book" =
+ type$ "inbook" =
+ or
+ 'author.editor.key.label
+ { type$ "proceedings" =
+ 'editor.key.organization.label
+ { type$ "manual" =
+ 'author.key.organization.label
+ 'author.key.label
+ if$
+ }
+ if$
+ }
+ if$
+ duplicate$
+ year field.or.null purify$ #-1 #2 substring$
+ *
+ 'label :=
+ year field.or.null purify$ #-1 #4 substring$
+ *
+ sortify 'sort.label :=
+}
+
+
+
+
+
+
+
+
+
+FUNCTION {sort.format.names}
+{ 's :=
+ #1 'nameptr :=
+ ""
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ { nameptr #1 >
+ { " " * }
+ 'skip$
+ if$
+
+ s nameptr "{vv{ } }{ll{ }}{ ff{ }}{ jj{ }}" format.name$ 't :=
+
+ nameptr numnames = t "others" = and
+ { "et al" * }
+ { t sortify * }
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+}
+
+
+FUNCTION {sort.format.title}
+{ 't :=
+ "A " #2
+ "An " #3
+ "The " #4 t chop.word
+ chop.word
+ chop.word
+ sortify
+ #1 global.max$ substring$
+}
+
+
+FUNCTION {author.sort}
+{ author empty$
+ { key empty$
+ { "to sort, need author or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { author sort.format.names }
+ if$
+}
+
+FUNCTION {author.editor.sort}
+{ author empty$
+ { editor empty$
+ { key empty$
+ { "to sort, need author, editor, or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { editor sort.format.names }
+ if$
+ }
+ { author sort.format.names }
+ if$
+}
+
+FUNCTION {author.organization.sort}
+{ author empty$
+ { organization empty$
+ { key empty$
+ { "to sort, need author, organization, or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { "The " #4 organization chop.word sortify }
+ if$
+ }
+ { author sort.format.names }
+ if$
+}
+
+FUNCTION {editor.organization.sort}
+{ editor empty$
+ { organization empty$
+ { key empty$
+ { "to sort, need editor, organization, or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { "The " #4 organization chop.word sortify }
+ if$
+ }
+ { editor sort.format.names }
+ if$
+}
+
+
+FUNCTION {presort}
+
+{ calc.label
+ sort.label
+ " "
+ *
+ type$ "book" =
+
+ type$ "inbook" =
+ or
+ 'author.editor.sort
+ { type$ "proceedings" =
+ 'editor.organization.sort
+ { type$ "manual" =
+ 'author.organization.sort
+ 'author.sort
+ if$
+ }
+ if$
+ }
+ if$
+
+ *
+
+ " "
+ *
+ year field.or.null sortify
+ *
+ " "
+ *
+ title field.or.null
+ sort.format.title
+ *
+ #1 entry.max$ substring$
+ 'sort.key$ :=
+}
+
+ITERATE {presort}
+
+
+SORT
+
+
+
+
+
+
+
+
+STRINGS { longest.label last.sort.label next.extra }
+
+INTEGERS { longest.label.width last.extra.num }
+
+FUNCTION {initialize.longest.label}
+{ "" 'longest.label :=
+ #0 int.to.chr$ 'last.sort.label :=
+ "" 'next.extra :=
+ #0 'longest.label.width :=
+ #0 'last.extra.num :=
+}
+
+FUNCTION {forward.pass}
+{ last.sort.label sort.label =
+ { last.extra.num #1 + 'last.extra.num :=
+
+ last.extra.num "z" chr.to.int$ >
+
+ % Generate -1, -2, ... suffixes
+ { "-" last.extra.num "a" chr.to.int$ - #1 + int.to.str$ * 'extra.label := }
+ % Generate a, b, ..., z suffixes
+ { last.extra.num int.to.chr$ 'extra.label := }
+ if$
+ }
+ { "a" chr.to.int$ 'last.extra.num :=
+ "" 'extra.label :=
+ sort.label 'last.sort.label :=
+ }
+ if$
+}
+
+FUNCTION {reverse.pass}
+{
+
+ next.extra "b" =
+ { "a" 'extra.label := }
+ 'skip$
+ if$
+
+ label extra.label * 'label :=
+ label width$ longest.label.width >
+ { label 'longest.label :=
+ label width$ 'longest.label.width :=
+ }
+ 'skip$
+ if$
+ extra.label 'next.extra :=
+}
+
+EXECUTE {initialize.longest.label}
+
+ITERATE {forward.pass}
+
+REVERSE {reverse.pass}
+
+
+
+
+
+
+FUNCTION {begin.bib}
+
+{ et.al.char.used
+ { "\newcommand{\etalchar}[1]{$^{#1}$}" write$ newline$ }
+ 'skip$
+ if$
+ preamble$ empty$
+
+ 'skip$
+ { preamble$ write$ newline$ }
+ if$
+ "\begin{thebibliography}{" longest.label * "}" * write$ newline$
+
+ "\ifx \showCODEN \undefined \def \showCODEN #1{CODEN #1} \fi" write$ newline$
+
+
+ "\ifx \showISBN \undefined \def \showISBN #1{ISBN #1} \fi" write$ newline$
+
+
+ "\ifx \showISSN \undefined \def \showISSN #1{ISSN #1} \fi" write$ newline$
+
+
+ "\ifx \showLCCN \undefined \def \showLCCN #1{LCCN #1} \fi" write$ newline$
+
+
+ "\ifx \showPRICE \undefined \def \showPRICE #1{#1} \fi" write$ newline$
+
+
+ "\ifx \showURL \undefined \def \showURL {URL } \fi" write$ newline$
+ "\ifx \path \undefined \input path.sty \fi" write$ newline$
+ "\ifx \ifshowURL \undefined" write$ newline$
+ " \newif \ifshowURL" write$ newline$
+ " \showURLtrue" write$ newline$
+ "\fi" write$ newline$
+
+}
+
+EXECUTE {begin.bib}
+
+EXECUTE {init.state.consts}
+
+
+ITERATE {call.type$}
+
+
+FUNCTION {end.bib}
+{ newline$
+ "\end{thebibliography}" write$ newline$
+}
+
+EXECUTE {end.bib}
diff --git a/biblio/bibtex/contrib/is-bst/is-plain.bst b/biblio/bibtex/contrib/is-bst/is-plain.bst
new file mode 100644
index 0000000000..8e044f2cc6
--- /dev/null
+++ b/biblio/bibtex/contrib/is-bst/is-plain.bst
@@ -0,0 +1,1835 @@
+%% =====================================================================
+%% WARNING: Do NOT edit this file. It was produced automatically by
+%% Nelson H. F. Beebe <beebe@plot79.math.utah.edu>
+%% from file://plot79.math.utah.edu/u/sy/beebe/tex/bib/merge/xbtxbst.doc
+%% on Wed May 15 10:36:06 MDT 1996.
+%% =====================================================================
+%%%=====================================================================
+%%% @BibTeX-style-file{
+%%% author = "Nelson H. F. Beebe",
+%%% version = "2.03",
+%%% date = "15 May 1996",
+%%% time = "10:35:51 MDT",
+%%% filename = "is-plain.bst",
+%%% address = "Center for Scientific Computing
+%%% Department of Mathematics
+%%% University of Utah
+%%% Salt Lake City, UT 84112
+%%% USA",
+%%% telephone = "+1 801 581 5254",
+%%% FAX = "+1 801 581 4148",
+%%% URL = "http://www.math.utah.edu/~beebe",
+%%% checksum = "22091 1835 4654 37711",
+%%% email = "beebe@math.utah.edu (Internet)",
+%%% codetable = "ISO/ASCII",
+%%% keywords = "BibTeX, style, bibliography",
+%%% supported = "yes",
+%%% docstring = "This file is a modification of the standard
+%%% BibTeX btxbst.doc file, or is a .bst file
+%%% derived from that modification. It contains
+%%% optional added support for CODEN, ISBN, ISSN,
+%%% LCCN, and PRICE fields, extended PAGES
+%%% fields, the PERIODICAL entry, and extended
+%%% citation label suffixing.
+%%%
+%%% In addition, date formatting supports a day
+%%% keyword, so that bibliography entries can be
+%%% written with
+%%%
+%%% day = {23},
+%%% month = aug,
+%%%
+%%% instead of the language-dependent awkward
+%%% forms required by the standard styles
+%%%
+%%% month = {23~} # aug,
+%%% month = aug # {~23},
+%%%
+%%% These older forms are, of course, still
+%%% handled correctly.
+%%%
+%%% The UNIX C preprocessor can be used to
+%%% extract the standard styles, as follows:
+%%%
+%%% cpp -P -DPLAIN xbtxbst.doc >plain.bst
+%%% cpp -P -DUNSRT xbtxbst.doc >unsrt.bst
+%%% cpp -P -DALPHA xbtxbst.doc >alpha.bst
+%%% cpp -P -DABBRV xbtxbst.doc >abbrv.bst
+%%%
+%%% To obtain correct file header checksums, pipe
+%%% the output through the checksum program, e.g.
+%%%
+%%% cpp -P -DPLAIN xbtxbst.doc | checksum >plain.bst
+%%%
+%%% The accompanying UNIX Makefile automates this
+%%% job, and provides some extra leading comments
+%%% in the generated style files warning the user
+%%% not to modify them.
+%%%
+%%% Additional optional definitions are recognized
+%%% to provide extensions to the standard styles:
+%%%
+%%% -D_CODEN for CODEN output
+%%%
+%%% -D_ISBN for ISBN output
+%%%
+%%% -D_ISSN for ISSN output
+%%%
+%%% -D_LCCN for LCCN output
+%%%
+%%% -D_PRICE for price output,
+%%%
+%%% -D_BOOKPAGES for book, techreport, manual,
+%%% and thesis pages output.
+%%%
+%%% -D_URL to get World-Wide Web Uniform
+%%% Resource Locator (URL) output.
+%%%
+%%% -D_NUMERIC_SUFFIXES to get numeric
+%%% label suffixes -1, -2, ..., -26, instead of
+%%% letters a, b, ..., z, so as to correctly
+%%% handle alpha-style bibliographies with more
+%%% than 26 entries for a single author in one
+%%% year. Change letter suffix code to switch
+%%% to numeric suffixes if more than 26 letters
+%%% are used, so that no matter which scheme is
+%%% selected, correct output will always be
+%%% obtained.
+%%%
+%%% The CODEN, ISBN, ISSN, LCCN, PRICE, and URL
+%%% values are wrapped inside macros \showCODEN{}
+%%% etc. that the user can provide alternate
+%%% definitions of to change the formatting, or
+%%% to suppress their output altogether. That
+%%% way, output identical to that of the four
+%%% standard BibTeX style files can be obtained
+%%% with these extended files, if these macros
+%%% are defined to expand to empty strings.
+%%%
+%%% URL handling is slightly more complex,
+%%% because URLs can contain characters which TeX
+%%% must handle in verbatim mode in a typewriter
+%%% font, and such text cannot readily appear
+%%% inside nested macro arguments. Consequently,
+%%% URLs are formatted in the .bbl file like
+%%% this:
+%%% \ifshowURL {\showURL \path|...|} \fi
+%%% where \showURL takes no argument, and
+%%% normally expands to the 4-character string
+%%% URL<space>. The grouping braces ensure that
+%%% any font changes made by \showURL remain
+%%% localized. Vertical bar is chosen as the
+%%% verbatim path delimiter, because it cannot
+%%% appear in URLs. The other prohibited ISO
+%%% Latin 1 characters are the non-printing
+%%% control characters 0..31, plus those in the
+%%% range 128..255, plus the ten special
+%%% characters
+%%%
+%%% { } [ ] \ ^ ~ < > `
+%%%
+%%% See Internet RFC 1630 (June 1994) for more
+%%% details. (Backquote is not even mentioned
+%%% there.)
+%%%
+%%% As an example of font changes, in LaTeX 2e
+%%% you might define
+%%% \newcommand{\showURL}{URL
+%%% \let \oldtt = \tt
+%%% \renewcommand{\tt}{\oldtt \itshape}}
+%%% to get URLs set in a typewriter italic font.
+%%%
+%%% If desired, a sed script can be used to
+%%% eliminate non-essential comments (this
+%%% reduces the file size by 2/3); a command
+%%% filter step like
+%%% sed -e '/^%$/d' -e '/^%[^%].*$/d'
+%%% will accomplish that job.
+%%%
+%%% The checksum field above contains a CRC-16
+%%% checksum as the first value, followed by the
+%%% equivalent of the standard UNIX wc (word
+%%% count) utility output of lines, words, and
+%%% characters. This is produced by Robert
+%%% Solovay's checksum utility."
+%%% }
+%%% ====================================================================
+%%% Revision history (reverse time order):
+%%%
+%%% 2.03 [15-May-1996]
+%%% Add CODEN support, ISBN and ISSN output for Article entries,
+%%% and ISBN output for TechReport entries (yes, these sometimes
+%%% do have ISBNs).
+%%%
+%%% Add wrapper macros \showXYZ{} (XYZ = CODEN, ISBN, ISSN, LCCN,
+%%% PRICE, and URL) defined inside the thebibliography environment
+%%% to expand to XYZ (except for PRICE) and their arguments,
+%%% PROVIDED they are not already defined. That way, the user can
+%%% provide alternate definitions outside the thebibliography
+%%% environment, for example, to suppress particular ones, or
+%%% to alter the font used.
+%%%
+%%% Substantially revise leading comments to better document the
+%%% extensions.
+%%%
+%%% 2.02 [01-Apr-1996]
+%%% Add day keyword support with new code in format.date function.
+%%% Oren Patashnik will include this new keyword in standard styles
+%%% in BibTeX 1.0.
+%%%
+%%% Add new function collapse.pagerange, and use it to collapse
+%%% page ranges with identical initial and final numbers to a
+%%% single number, so that bibliography files can distinguish
+%%% between one-page documents, and documents missing final page
+%%% numbers.
+%%%
+%%% 2.01 [25-Oct-1994]
+%%% Add URL output support.
+%%%
+%%% 2.00 [12-Oct-1994]
+%%% Add support for pages in theses and manuals, treating them
+%%% like Book and InBook pages.
+%%%
+%%% Correct ISSN support: a typo caused output of ISBN instead of
+%%% ISSN.
+%%%
+%%% Wherever ISBNs are output, also output an ISSN, if one
+%%% exists, and vice versa. The reason is that some periodicals
+%%% (e.g. The X Resource, published by O'Reilly and Associates)
+%%% have both ISSN and ISBN numbers, and can be purchased either
+%%% as journal subscriptions, or as single volumes.
+%%%
+%%% For InProceedings and Proceedings output, issue a warning for
+%%% a missing publisher: even though that field is optional, a
+%%% bibliographic reference without it is incomplete.
+%%%
+%%% Remove harmless, but unneeded, single horizontal space before
+%%% price output added with version 1.03.
+%%%
+%%% Change Proceedings and InProceedings to treat address values
+%%% as publisher addresses, as they are with every other document
+%%% type, rather than as conference addresses, which belong in
+%%% the title field (that is how major libraries, including OCLC
+%%% and Library of Congress, with nearly 60M holdings, represent
+%%% them). The need for this change has been discussed with
+%%% BibTeX's author, Oren Patashnik, and there is a good
+%%% possibility that BibTeX 1.0 will contain the change
+%%% implemented here. This is an INCOMPATIBLE change that will
+%%% produce different .bbl file formatting. However, the TUG and
+%%% BibNet bibliography projects have consistently used address
+%%% to me publisher/organization/institution address, and so
+%%% already conform to the new practice.
+%%%
+%%% 1.05 [30-May-1994]
+%%% Add NUMERIC_SUFFIXES support.
+%%%
+%%% Change all preprocessor statements to put else and endif
+%%% labels inside C-style comments to conform to 1989 ISO/ANSI C
+%%% Standard.
+%%%
+%%% 1.04 [11-Nov-1993]
+%%% Add underscore prefix to new processor symbols to prevent
+%%% substitution in comments
+%%%
+%%% 1.03 [11-Oct-1993]
+%%% Add support for LCCN (Library of Congress Catalog Number)
+%%% and price fields, and make ISBN, ISSN, LCCN, and price
+%%% selectable by preprocessor conditionals.
+%%%
+%%% 1.02 [12-Sep-1991]
+%%% Merge in Barbara N. Beeton's suggestion for hyphen-less
+%%% line breaks around volume(number):page.
+%%%
+%%% 1.01 [10-Sep-1991]
+%%% Update file comment header and use Solovay checksum program.
+%%%
+%%% 1.00 [17-Oct-1990]
+%%% Original version merging hand-edits of is-xxx.bst files into
+%%% this master file, xbtxbst.doc.
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+%% BibTeX `plain' family
+%% version 0.99b for BibTeX versions 0.99a or later, LaTeX version 2.09.
+%% Copyright (C) 1985, all rights reserved.
+%% Copying of this file is authorized only if either
+%% (1) you make absolutely no changes to your copy, including name, or
+%% (2) if you do make changes, you name it something other than
+%% btxbst.doc, plain.bst, unsrt.bst, alpha.bst, and abbrv.bst.
+%% This restriction helps ensure that all standard styles are identical.
+%% The file btxbst.doc has the documentation for this style.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ENTRY
+ { address
+ author
+ booktitle
+ chapter
+
+ coden
+
+ day
+ edition
+ editor
+ howpublished
+ institution
+
+ isbn
+
+
+ issn
+
+ journal
+ key
+
+ lccn
+
+ month
+ note
+ number
+ organization
+ pages
+
+ price
+
+ publisher
+ school
+ series
+ title
+ type
+
+ URL
+
+ volume
+ year
+ }
+ {}
+
+ { label }
+
+
+
+INTEGERS { output.state before.all mid.sentence after.sentence after.block }
+
+FUNCTION {init.state.consts}
+{ #0 'before.all :=
+ #1 'mid.sentence :=
+ #2 'after.sentence :=
+ #3 'after.block :=
+}
+
+
+STRINGS { b e new.pages original.t s t }
+
+FUNCTION {output.nonnull}
+{ 's :=
+ output.state mid.sentence =
+ { ", " * write$ }
+ { output.state after.block =
+ { add.period$ write$
+ newline$
+ "\newblock " write$
+ }
+ { output.state before.all =
+ 'write$
+ { add.period$ " " * write$ }
+ if$
+ }
+ if$
+ mid.sentence 'output.state :=
+ }
+ if$
+ s
+}
+
+FUNCTION {output}
+{ duplicate$ empty$
+ 'pop$
+ 'output.nonnull
+ if$
+}
+
+FUNCTION {output.check}
+{ 't :=
+ duplicate$ empty$
+ { pop$ "empty " t * " in " * cite$ * warning$ }
+ 'output.nonnull
+ if$
+}
+
+FUNCTION {output.bibitem}
+{ newline$
+
+ "\bibitem{" write$
+
+ cite$ write$
+ "}" write$
+ newline$
+ ""
+ before.all 'output.state :=
+}
+
+
+FUNCTION {fin.entry}
+{ add.period$
+ write$
+ newline$
+}
+
+FUNCTION {new.block}
+{ output.state before.all =
+ 'skip$
+ { after.block 'output.state := }
+ if$
+}
+
+FUNCTION {new.sentence}
+{ output.state after.block =
+ 'skip$
+ { output.state before.all =
+ 'skip$
+ { after.sentence 'output.state := }
+ if$
+ }
+ if$
+}
+
+
+FUNCTION {not}
+{ { #0 }
+ { #1 }
+ if$
+}
+
+FUNCTION {and}
+{ 'skip$
+ { pop$ #0 }
+ if$
+}
+
+FUNCTION {or}
+{ { pop$ #1 }
+ 'skip$
+ if$
+}
+
+
+FUNCTION {new.block.checka}
+{ empty$
+ 'skip$
+ 'new.block
+ if$
+}
+
+FUNCTION {new.block.checkb}
+{ empty$
+ swap$ empty$
+ and
+ 'skip$
+ 'new.block
+ if$
+}
+
+
+FUNCTION {new.sentence.checka}
+{ empty$
+ 'skip$
+ 'new.sentence
+ if$
+}
+
+FUNCTION {new.sentence.checkb}
+{ empty$
+ swap$ empty$
+ and
+ 'skip$
+ 'new.sentence
+ if$
+}
+
+
+FUNCTION {field.or.null}
+{ duplicate$ empty$
+ { pop$ "" }
+ 'skip$
+ if$
+}
+
+FUNCTION {emphasize}
+{ duplicate$ empty$
+ { pop$ "" }
+ { "{\em " swap$ * "}" * }
+ if$
+}
+
+INTEGERS { nameptr namesleft numnames }
+
+FUNCTION {format.names}
+{ 's :=
+ #1 'nameptr :=
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+
+ { s nameptr "{ff~}{vv~}{ll}{, jj}" format.name$ 't :=
+
+ nameptr #1 >
+ { namesleft #1 >
+ { ", " * t * }
+ { numnames #2 >
+ { "," * }
+ 'skip$
+ if$
+ t "others" =
+ { " et~al." * }
+ { " and " * t * }
+ if$
+ }
+ if$
+ }
+ 't
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+}
+
+FUNCTION {format.authors}
+{ author empty$
+ { "" }
+ { author format.names }
+ if$
+}
+
+
+FUNCTION {format.coden}
+{ coden empty$
+ { "" }
+ { new.block "\showCODEN{" coden * "}" *}
+ if$
+}
+
+
+FUNCTION {format.editors}
+{ editor empty$
+ { "" }
+ { editor format.names
+ editor num.names$ #1 >
+ { ", editors" * }
+ { ", editor" * }
+ if$
+ }
+ if$
+}
+
+
+FUNCTION {format.isbn}
+{ isbn empty$
+ { "" }
+ { new.block "\showISBN{" isbn * "}" *}
+ if$
+}
+
+
+
+FUNCTION {format.issn}
+{ issn empty$
+ { "" }
+ { new.block "\showISSN{" issn * "}" *}
+ if$
+}
+
+
+
+FUNCTION {format.lccn}
+{ lccn empty$
+ { "" }
+ { new.block "\showLCCN{" lccn * "}" *}
+ if$
+}
+
+
+
+FUNCTION {format.price}
+{ price empty$
+ { "" }
+ { new.block "\showPRICE{" price * "}" *}
+ if$
+}
+
+
+
+FUNCTION {format.url}
+{ url empty$
+ { "" }
+ { new.block "\ifshowURL {\showURL \path|" url * "|}\fi" *}
+ if$
+}
+
+
+
+
+FUNCTION {format.title}
+{ title empty$
+ { "" }
+
+ { title "t" change.case$ }
+
+ if$
+}
+
+
+
+FUNCTION {collapse.pagerange}
+{ 't := % save input page range string
+ t 'original.t := % save original page range
+ "" 'b := % beginning page number
+ "" 'e := % ending page number
+ { t empty$ not } % while-loop Boolean condition
+ { % while-loop body
+ t #1 #2 substring$ "--" = % have we found the en-dash?
+ {
+ t #3 global.max$ substring$ 'e := % yes, save ending page number
+ "" 't := % and set t to empty string to terminate loop
+ }
+ {
+ b t #1 #1 substring$ * 'b := % no, just accumulate this character
+ t #2 global.max$ substring$ 't := % and set t to the remaining string
+ }
+ if$
+ }
+ while$ % on exit, t has ending page number string
+ e b = % are beginning and ending numbers the same?
+ { b } % yes, return the beginning page number string
+ { original.t } % no, return the original page number string
+ if$
+}
+
+
+FUNCTION {n.dashify}
+{ 't :=
+ ""
+ { t empty$ not }
+ { t #1 #1 substring$ "-" =
+ { t #1 #2 substring$ "--" = not
+ { "--" *
+ t #2 global.max$ substring$ 't :=
+ }
+ { { t #1 #1 substring$ "-" = }
+ { "-" *
+ t #2 global.max$ substring$ 't :=
+ }
+ while$
+ }
+ if$
+ }
+ { t #1 #1 substring$ *
+ t #2 global.max$ substring$ 't :=
+ }
+ if$
+ }
+ while$
+}
+
+
+FUNCTION {format.date}
+{ year empty$
+ { month empty$
+ {
+ day empty$
+ { "" }
+ { "there's a day but no month or year in " cite$ * warning$ }
+ if$
+ }
+ { "there's a month but no year in " cite$ * warning$
+ month
+ day empty$
+ { }
+ { " " * day * }
+ if$
+ }
+ if$
+ }
+ { month empty$
+ {
+ day empty$
+ { year }
+ { "there's a day and year but no month in " cite$ * warning$ }
+ if$
+ }
+ {
+ month " " *
+ day empty$
+ { }
+ { day * ", " * }
+ if$
+ year *
+ }
+ if$
+ }
+ if$
+}
+
+
+FUNCTION {format.btitle}
+{ title emphasize
+}
+
+
+FUNCTION {tie.or.space.connect}
+{ duplicate$ text.length$ #3 <
+ { "~" }
+ { " " }
+ if$
+ swap$ * *
+}
+
+
+FUNCTION {either.or.check}
+{ empty$
+ 'pop$
+ { "can't use both " swap$ * " fields in " * cite$ * warning$ }
+ if$
+}
+
+
+FUNCTION {format.bvolume}
+{ volume empty$
+ { "" }
+ { "volume" volume tie.or.space.connect
+ series empty$
+ 'skip$
+ { " of " * series emphasize * }
+ if$
+ "volume and number" number either.or.check
+ }
+ if$
+}
+
+
+FUNCTION {format.number.series}
+{ volume empty$
+ { number empty$
+ { series field.or.null }
+ { output.state mid.sentence =
+ { "number" }
+ { "Number" }
+ if$
+ number tie.or.space.connect
+ series empty$
+ { "there's a number but no series in " cite$ * warning$ }
+ { " in " * series * }
+ if$
+ }
+ if$
+ }
+ { "" }
+ if$
+}
+
+
+FUNCTION {format.edition}
+{ edition empty$
+ { "" }
+ { output.state mid.sentence =
+ { edition "l" change.case$ " edition" * }
+ { edition "t" change.case$ " edition" * }
+ if$
+ }
+ if$
+}
+
+
+INTEGERS { multiresult }
+
+FUNCTION {multi.page.check}
+{ 't :=
+ #0 'multiresult :=
+ { multiresult not
+ t empty$ not
+ and
+ }
+ { t #1 #1 substring$
+ duplicate$ "-" =
+ swap$ duplicate$ "," =
+ swap$ "+" =
+ or or
+ { #1 'multiresult := }
+ { t #2 global.max$ substring$ 't := }
+ if$
+ }
+ while$
+ multiresult
+}
+
+
+FUNCTION {format.book.pages}
+{ pages empty$
+ { "" }
+ { new.block pages " pp." * }
+ if$
+}
+
+
+
+FUNCTION {format.pages}
+{ pages empty$
+ { "" }
+ {
+ pages multi.page.check
+ { pages collapse.pagerange 'new.pages := }
+ { pages 'new.pages := }
+ if$
+ new.pages multi.page.check
+ { "pages" new.pages n.dashify tie.or.space.connect }
+ { "page" new.pages tie.or.space.connect }
+ if$
+ }
+ if$
+}
+
+
+FUNCTION {format.vol.num.pages}
+{ volume field.or.null
+ number empty$
+ 'skip$
+ { "\penalty0 (" number * ")" * *
+ volume empty$
+ { "there's a number but no volume in " cite$ * warning$ }
+ 'skip$
+ if$
+ }
+ if$
+ pages empty$
+ 'skip$
+ { duplicate$ empty$
+ { pop$ format.pages }
+ { ":\penalty0 " * pages collapse.pagerange n.dashify * }
+ if$
+ }
+ if$
+}
+
+
+
+FUNCTION {format.chapter.pages}
+{ chapter empty$
+ 'format.pages
+ { type empty$
+ { "chapter" }
+ { type "l" change.case$ }
+ if$
+ chapter tie.or.space.connect
+ pages empty$
+ 'skip$
+ { ", " * format.pages * }
+ if$
+ }
+ if$
+}
+
+
+FUNCTION {format.in.ed.booktitle}
+{ booktitle empty$
+ { "" }
+ { editor empty$
+ { "In " booktitle emphasize * }
+ { "In " format.editors * ", " * booktitle emphasize * }
+ if$
+ }
+ if$
+}
+
+
+FUNCTION {empty.misc.check}
+{ author empty$ title empty$ howpublished empty$
+ month empty$ year empty$ note empty$
+ and and and and and
+
+ key empty$ not and
+
+ { "all relevant fields are empty in " cite$ * warning$ }
+ 'skip$
+ if$
+}
+
+
+FUNCTION {format.thesis.type}
+{ type empty$
+ 'skip$
+ { pop$
+ type "t" change.case$
+ }
+ if$
+}
+
+
+FUNCTION {format.tr.number}
+{ type empty$
+ { "Technical Report" }
+ 'type
+ if$
+ number empty$
+ { "t" change.case$ }
+ { number tie.or.space.connect }
+ if$
+}
+
+
+FUNCTION {format.article.crossref}
+{ key empty$
+ { journal empty$
+ { "need key or journal for " cite$ * " to crossref " * crossref *
+ warning$
+ ""
+ }
+ { "In {\em " journal * "\/}" * }
+ if$
+ }
+ { "In " key * }
+ if$
+ " \cite{" * crossref * "}" *
+}
+
+
+FUNCTION {format.crossref.editor}
+{ editor #1 "{vv~}{ll}" format.name$
+ editor num.names$ duplicate$
+ #2 >
+ { pop$ " et~al." * }
+ { #2 <
+ 'skip$
+ { editor #2 "{ff }{vv }{ll}{ jj}" format.name$ "others" =
+ { " et~al." * }
+ { " and " * editor #2 "{vv~}{ll}" format.name$ * }
+ if$
+ }
+ if$
+ }
+ if$
+}
+
+
+FUNCTION {format.book.crossref}
+{ volume empty$
+ { "empty volume in " cite$ * "'s crossref of " * crossref * warning$
+ "In "
+ }
+ { "Volume" volume tie.or.space.connect
+ " of " *
+ }
+ if$
+ editor empty$
+ editor field.or.null author field.or.null =
+ or
+ { key empty$
+ { series empty$
+ { "need editor, key, or series for " cite$ * " to crossref " *
+ crossref * warning$
+ "" *
+ }
+ { "{\em " * series * "\/}" * }
+ if$
+ }
+ { key * }
+ if$
+ }
+ { format.crossref.editor * }
+ if$
+ " \cite{" * crossref * "}" *
+}
+
+
+FUNCTION {format.incoll.inproc.crossref}
+{ editor empty$
+ editor field.or.null author field.or.null =
+ or
+ { key empty$
+ { booktitle empty$
+ { "need editor, key, or booktitle for " cite$ * " to crossref " *
+ crossref * warning$
+ ""
+ }
+ { "In {\em " booktitle * "\/}" * }
+ if$
+ }
+ { "In " key * }
+ if$
+ }
+ { "In " format.crossref.editor * }
+ if$
+ " \cite{" * crossref * "}" *
+}
+
+
+FUNCTION {article}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.title "title" output.check
+ new.block
+ crossref missing$
+ { journal emphasize "journal" output.check
+ format.vol.num.pages output
+ format.date "year" output.check
+ }
+ { format.article.crossref output.nonnull
+ format.pages output
+ }
+ if$
+
+ format.coden output
+
+
+ format.isbn output
+
+
+ format.issn output
+
+
+ format.url output
+
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {book}
+{ output.bibitem
+ author empty$
+ { format.editors "author and editor" output.check }
+ { format.authors output.nonnull
+ crossref missing$
+ { "author and editor" editor either.or.check }
+ 'skip$
+ if$
+ }
+ if$
+ new.block
+ format.btitle "title" output.check
+ crossref missing$
+ { format.bvolume output
+ new.block
+ format.number.series output
+ new.sentence
+ publisher "publisher" output.check
+ address output
+ }
+ { new.block
+ format.book.crossref output.nonnull
+ }
+ if$
+ format.edition output
+ format.date "year" output.check
+
+ format.coden output
+
+
+ format.isbn output
+
+
+ format.issn output
+
+
+ format.book.pages output
+
+
+ format.lccn output
+
+
+ format.price output
+
+
+ format.url output
+
+ new.block
+ note output
+ fin.entry
+}
+
+
+FUNCTION {booklet}
+{ output.bibitem
+ format.authors output
+ new.block
+ format.title "title" output.check
+ howpublished address new.block.checkb
+ howpublished output
+ address output
+ format.date output
+
+ format.coden output
+
+
+ format.isbn output
+
+
+ format.issn output
+
+
+ format.book.pages output
+
+
+ format.lccn output
+
+
+ format.price output
+
+
+ format.url output
+
+ new.block
+ note output
+ fin.entry
+}
+
+
+
+FUNCTION {inbook}
+{ output.bibitem
+ author empty$
+ { format.editors "author and editor" output.check }
+ { format.authors output.nonnull
+ crossref missing$
+ { "author and editor" editor either.or.check }
+ 'skip$
+ if$
+ }
+ if$
+ new.block
+ format.btitle "title" output.check
+ crossref missing$
+ { format.bvolume output
+ format.chapter.pages "chapter and pages" output.check
+ new.block
+ format.number.series output
+ new.sentence
+ publisher "publisher" output.check
+ address output
+ }
+ { format.chapter.pages "chapter and pages" output.check
+ new.block
+ format.book.crossref output.nonnull
+ }
+ if$
+ format.edition output
+ format.date "year" output.check
+
+ format.coden output
+
+
+ format.isbn output
+
+
+ format.issn output
+
+
+ format.lccn output
+
+
+ format.price output
+
+
+ format.url output
+
+ new.block
+ note output
+ fin.entry
+}
+
+
+FUNCTION {incollection}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.title "title" output.check
+ new.block
+ crossref missing$
+ { format.in.ed.booktitle "booktitle" output.check
+ format.bvolume output
+ format.number.series output
+ format.chapter.pages output
+ new.sentence
+ publisher "publisher" output.check
+ address output
+ format.edition output
+ format.date "year" output.check
+ }
+ { format.incoll.inproc.crossref output.nonnull
+ format.chapter.pages output
+ }
+ if$
+
+ format.coden output
+
+
+ format.isbn output
+
+
+ format.issn output
+
+
+ format.lccn output
+
+
+ format.price output
+
+
+ format.url output
+
+ new.block
+ note output
+ fin.entry
+}
+
+
+FUNCTION {inproceedings}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.title "title" output.check
+ new.block
+ crossref missing$
+ { format.in.ed.booktitle "booktitle" output.check
+ format.bvolume output
+ format.number.series output
+ format.pages output
+ address empty$
+ { organization publisher new.sentence.checkb
+ organization output
+ publisher "publisher" output.check
+ format.date "year" output.check
+ }
+ { new.sentence
+ organization output
+ publisher "publisher" output.check
+ address output.nonnull
+ format.date "year" output.check
+ }
+ if$
+ }
+ { format.incoll.inproc.crossref output.nonnull
+ format.pages output
+ }
+ if$
+
+ format.coden output
+
+
+ format.isbn output
+
+
+ format.issn output
+
+
+ format.lccn output
+
+
+ format.price output
+
+
+ format.url output
+
+ new.block
+ note output
+ fin.entry
+}
+
+
+FUNCTION {conference} { inproceedings }
+
+
+FUNCTION {manual}
+{ output.bibitem
+ author empty$
+ { organization empty$
+ 'skip$
+ { organization output.nonnull
+ address output
+ }
+ if$
+ }
+ { format.authors output.nonnull }
+ if$
+ new.block
+ format.btitle "title" output.check
+ author empty$
+ { organization empty$
+ { address new.block.checka
+ address output
+ }
+ 'skip$
+ if$
+ }
+ { organization address new.block.checkb
+ organization output
+ address output
+ }
+ if$
+ format.edition output
+ format.date output
+
+ format.book.pages output
+
+
+ format.price output
+
+
+ format.url output
+
+ new.block
+ note output
+ fin.entry
+}
+
+
+FUNCTION {mastersthesis}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.title "title" output.check
+ new.block
+ "Master's thesis" format.thesis.type output.nonnull
+ school "school" output.check
+ address output
+ format.date "year" output.check
+
+ format.book.pages output
+
+
+ format.url output
+
+ new.block
+ note output
+ fin.entry
+}
+
+
+FUNCTION {misc}
+{ output.bibitem
+ format.authors output
+ title howpublished new.block.checkb
+ format.title output
+ howpublished new.block.checka
+ howpublished output
+ format.date output
+
+ format.coden output
+
+
+ format.isbn output
+
+
+ format.issn output
+
+
+ format.price output
+
+
+ format.url output
+
+ new.block
+ note output
+ fin.entry
+ empty.misc.check
+}
+
+
+FUNCTION {phdthesis}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.btitle "title" output.check
+ new.block
+ "PhD thesis" format.thesis.type output.nonnull
+ school "school" output.check
+ address output
+ format.date "year" output.check
+
+ format.book.pages output
+
+
+ format.url output
+
+ new.block
+ note output
+ fin.entry
+}
+
+
+FUNCTION {periodical}
+{ output.bibitem
+ editor empty$
+ { organization output }
+ { format.editors output.nonnull }
+ if$
+ new.block
+ title emphasize "title" output.check
+ format.vol.num.pages output
+ format.date output
+
+ format.coden output
+
+
+ format.isbn output
+
+
+ format.issn output
+
+
+ format.price output
+
+
+ format.url output
+
+ new.sentence
+ publisher output
+ address output
+ howpublished new.block.checka
+ howpublished output
+ new.block
+ note output
+ fin.entry
+}
+
+
+FUNCTION {proceedings}
+{ output.bibitem
+ editor empty$
+ { organization output }
+ { format.editors output.nonnull }
+ if$
+ new.block
+ format.btitle "title" output.check
+ format.bvolume output
+ format.number.series output
+ address empty$
+ { editor empty$
+ { publisher new.sentence.checka }
+ { organization publisher new.sentence.checkb
+ organization output
+ }
+ if$
+ publisher "publisher" output.check %%% <- new check for missing
+ format.date "year" output.check
+ }
+ { new.sentence
+ editor empty$
+ 'skip$
+ { organization output }
+ if$
+ publisher "publisher" output.check
+ address output.nonnull
+ format.date "year" output.check
+ }
+ if$
+
+ format.coden output
+
+
+ format.isbn output
+
+
+ format.issn output
+
+
+ format.lccn output
+
+
+ format.price output
+
+
+ format.url output
+
+ new.block
+ note output
+ fin.entry
+}
+
+
+FUNCTION {techreport}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.title "title" output.check
+ new.block
+ format.tr.number output.nonnull
+ institution "institution" output.check
+ address output
+ format.date "year" output.check
+
+ format.isbn output % NB: TechReports occasionally have ISBNs
+
+
+ format.book.pages output
+
+
+ format.price output
+
+
+ format.url output
+
+ new.block
+ note output
+ fin.entry
+}
+
+
+FUNCTION {unpublished}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.title "title" output.check
+ new.block
+ note "note" output.check
+ format.date output
+
+ format.url output
+
+ fin.entry
+}
+
+
+FUNCTION {default.type} { misc }
+
+
+
+
+MACRO {jan} {"January"}
+
+MACRO {feb} {"February"}
+
+MACRO {mar} {"March"}
+
+MACRO {apr} {"April"}
+
+MACRO {may} {"May"}
+
+MACRO {jun} {"June"}
+
+MACRO {jul} {"July"}
+
+MACRO {aug} {"August"}
+
+MACRO {sep} {"September"}
+
+MACRO {oct} {"October"}
+
+MACRO {nov} {"November"}
+
+MACRO {dec} {"December"}
+
+
+
+
+
+
+MACRO {acmcs} {"ACM Computing Surveys"}
+
+MACRO {acta} {"Acta Informatica"}
+
+MACRO {cacm} {"Communications of the ACM"}
+
+MACRO {ibmjrd} {"IBM Journal of Research and Development"}
+
+MACRO {ibmsj} {"IBM Systems Journal"}
+
+MACRO {ieeese} {"IEEE Transactions on Software Engineering"}
+
+MACRO {ieeetc} {"IEEE Transactions on Computers"}
+
+MACRO {ieeetcad}
+ {"IEEE Transactions on Computer-Aided Design of Integrated Circuits"}
+
+MACRO {ipl} {"Information Processing Letters"}
+
+MACRO {jacm} {"Journal of the ACM"}
+
+MACRO {jcss} {"Journal of Computer and System Sciences"}
+
+MACRO {scp} {"Science of Computer Programming"}
+
+MACRO {sicomp} {"SIAM Journal on Computing"}
+
+MACRO {tocs} {"ACM Transactions on Computer Systems"}
+
+MACRO {tods} {"ACM Transactions on Database Systems"}
+
+MACRO {tog} {"ACM Transactions on Graphics"}
+
+MACRO {toms} {"ACM Transactions on Mathematical Software"}
+
+MACRO {toois} {"ACM Transactions on Office Information Systems"}
+
+MACRO {toplas} {"ACM Transactions on Programming Languages and Systems"}
+
+MACRO {tcs} {"Theoretical Computer Science"}
+
+
+
+
+READ
+
+
+
+
+FUNCTION {sortify}
+{ purify$
+ "l" change.case$
+}
+
+INTEGERS { len }
+
+FUNCTION {chop.word}
+{ 's :=
+ 'len :=
+ s #1 len substring$ =
+ { s len #1 + global.max$ substring$ }
+ 's
+ if$
+}
+
+
+
+
+
+
+
+
+
+FUNCTION {sort.format.names}
+{ 's :=
+ #1 'nameptr :=
+ ""
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ { nameptr #1 >
+ { " " * }
+ 'skip$
+ if$
+
+ s nameptr "{vv{ } }{ll{ }}{ ff{ }}{ jj{ }}" format.name$ 't :=
+
+ nameptr numnames = t "others" = and
+ { "et al" * }
+ { t sortify * }
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+}
+
+
+FUNCTION {sort.format.title}
+{ 't :=
+ "A " #2
+ "An " #3
+ "The " #4 t chop.word
+ chop.word
+ chop.word
+ sortify
+ #1 global.max$ substring$
+}
+
+
+FUNCTION {author.sort}
+{ author empty$
+ { key empty$
+ { "to sort, need author or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { author sort.format.names }
+ if$
+}
+
+FUNCTION {author.editor.sort}
+{ author empty$
+ { editor empty$
+ { key empty$
+ { "to sort, need author, editor, or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { editor sort.format.names }
+ if$
+ }
+ { author sort.format.names }
+ if$
+}
+
+FUNCTION {author.organization.sort}
+{ author empty$
+ { organization empty$
+ { key empty$
+ { "to sort, need author, organization, or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { "The " #4 organization chop.word sortify }
+ if$
+ }
+ { author sort.format.names }
+ if$
+}
+
+FUNCTION {editor.organization.sort}
+{ editor empty$
+ { organization empty$
+ { key empty$
+ { "to sort, need editor, organization, or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { "The " #4 organization chop.word sortify }
+ if$
+ }
+ { editor sort.format.names }
+ if$
+}
+
+
+FUNCTION {presort}
+
+{ type$ "book" =
+
+ type$ "inbook" =
+ or
+ 'author.editor.sort
+ { type$ "proceedings" =
+ 'editor.organization.sort
+ { type$ "manual" =
+ 'author.organization.sort
+ 'author.sort
+ if$
+ }
+ if$
+ }
+ if$
+
+ " "
+ *
+ year field.or.null sortify
+ *
+ " "
+ *
+ title field.or.null
+ sort.format.title
+ *
+ #1 entry.max$ substring$
+ 'sort.key$ :=
+}
+
+ITERATE {presort}
+
+
+SORT
+
+
+
+
+
+
+
+STRINGS { longest.label }
+
+INTEGERS { number.label longest.label.width }
+
+FUNCTION {initialize.longest.label}
+{ "" 'longest.label :=
+ #1 'number.label :=
+ #0 'longest.label.width :=
+}
+
+FUNCTION {longest.label.pass}
+{ number.label int.to.str$ 'label :=
+ number.label #1 + 'number.label :=
+ label width$ longest.label.width >
+ { label 'longest.label :=
+ label width$ 'longest.label.width :=
+ }
+ 'skip$
+ if$
+}
+
+EXECUTE {initialize.longest.label}
+
+ITERATE {longest.label.pass}
+
+
+
+
+FUNCTION {begin.bib}
+
+{ preamble$ empty$
+
+ 'skip$
+ { preamble$ write$ newline$ }
+ if$
+ "\begin{thebibliography}{" longest.label * "}" * write$ newline$
+
+ "\ifx \showCODEN \undefined \def \showCODEN #1{CODEN #1} \fi" write$ newline$
+
+
+ "\ifx \showISBN \undefined \def \showISBN #1{ISBN #1} \fi" write$ newline$
+
+
+ "\ifx \showISSN \undefined \def \showISSN #1{ISSN #1} \fi" write$ newline$
+
+
+ "\ifx \showLCCN \undefined \def \showLCCN #1{LCCN #1} \fi" write$ newline$
+
+
+ "\ifx \showPRICE \undefined \def \showPRICE #1{#1} \fi" write$ newline$
+
+
+ "\ifx \showURL \undefined \def \showURL {URL } \fi" write$ newline$
+ "\ifx \path \undefined \input path.sty \fi" write$ newline$
+ "\ifx \ifshowURL \undefined" write$ newline$
+ " \newif \ifshowURL" write$ newline$
+ " \showURLtrue" write$ newline$
+ "\fi" write$ newline$
+
+}
+
+EXECUTE {begin.bib}
+
+EXECUTE {init.state.consts}
+
+
+ITERATE {call.type$}
+
+
+FUNCTION {end.bib}
+{ newline$
+ "\end{thebibliography}" write$ newline$
+}
+
+EXECUTE {end.bib}
diff --git a/biblio/bibtex/contrib/is-bst/is-unsrt.bst b/biblio/bibtex/contrib/is-bst/is-unsrt.bst
new file mode 100644
index 0000000000..6d7b4dd579
--- /dev/null
+++ b/biblio/bibtex/contrib/is-bst/is-unsrt.bst
@@ -0,0 +1,1673 @@
+%% =====================================================================
+%% WARNING: Do NOT edit this file. It was produced automatically by
+%% Nelson H. F. Beebe <beebe@plot79.math.utah.edu>
+%% from file://plot79.math.utah.edu/u/sy/beebe/tex/bib/merge/xbtxbst.doc
+%% on Wed May 15 10:36:08 MDT 1996.
+%% =====================================================================
+%%%=====================================================================
+%%% @BibTeX-style-file{
+%%% author = "Nelson H. F. Beebe",
+%%% version = "2.03",
+%%% date = "15 May 1996",
+%%% time = "10:35:51 MDT",
+%%% filename = "is-unsrt.bst",
+%%% address = "Center for Scientific Computing
+%%% Department of Mathematics
+%%% University of Utah
+%%% Salt Lake City, UT 84112
+%%% USA",
+%%% telephone = "+1 801 581 5254",
+%%% FAX = "+1 801 581 4148",
+%%% URL = "http://www.math.utah.edu/~beebe",
+%%% checksum = "64263 1673 4293 35112",
+%%% email = "beebe@math.utah.edu (Internet)",
+%%% codetable = "ISO/ASCII",
+%%% keywords = "BibTeX, style, bibliography",
+%%% supported = "yes",
+%%% docstring = "This file is a modification of the standard
+%%% BibTeX btxbst.doc file, or is a .bst file
+%%% derived from that modification. It contains
+%%% optional added support for CODEN, ISBN, ISSN,
+%%% LCCN, and PRICE fields, extended PAGES
+%%% fields, the PERIODICAL entry, and extended
+%%% citation label suffixing.
+%%%
+%%% In addition, date formatting supports a day
+%%% keyword, so that bibliography entries can be
+%%% written with
+%%%
+%%% day = {23},
+%%% month = aug,
+%%%
+%%% instead of the language-dependent awkward
+%%% forms required by the standard styles
+%%%
+%%% month = {23~} # aug,
+%%% month = aug # {~23},
+%%%
+%%% These older forms are, of course, still
+%%% handled correctly.
+%%%
+%%% The UNIX C preprocessor can be used to
+%%% extract the standard styles, as follows:
+%%%
+%%% cpp -P -DPLAIN xbtxbst.doc >plain.bst
+%%% cpp -P -DUNSRT xbtxbst.doc >unsrt.bst
+%%% cpp -P -DALPHA xbtxbst.doc >alpha.bst
+%%% cpp -P -DABBRV xbtxbst.doc >abbrv.bst
+%%%
+%%% To obtain correct file header checksums, pipe
+%%% the output through the checksum program, e.g.
+%%%
+%%% cpp -P -DPLAIN xbtxbst.doc | checksum >plain.bst
+%%%
+%%% The accompanying UNIX Makefile automates this
+%%% job, and provides some extra leading comments
+%%% in the generated style files warning the user
+%%% not to modify them.
+%%%
+%%% Additional optional definitions are recognized
+%%% to provide extensions to the standard styles:
+%%%
+%%% -D_CODEN for CODEN output
+%%%
+%%% -D_ISBN for ISBN output
+%%%
+%%% -D_ISSN for ISSN output
+%%%
+%%% -D_LCCN for LCCN output
+%%%
+%%% -D_PRICE for price output,
+%%%
+%%% -D_BOOKPAGES for book, techreport, manual,
+%%% and thesis pages output.
+%%%
+%%% -D_URL to get World-Wide Web Uniform
+%%% Resource Locator (URL) output.
+%%%
+%%% -D_NUMERIC_SUFFIXES to get numeric
+%%% label suffixes -1, -2, ..., -26, instead of
+%%% letters a, b, ..., z, so as to correctly
+%%% handle alpha-style bibliographies with more
+%%% than 26 entries for a single author in one
+%%% year. Change letter suffix code to switch
+%%% to numeric suffixes if more than 26 letters
+%%% are used, so that no matter which scheme is
+%%% selected, correct output will always be
+%%% obtained.
+%%%
+%%% The CODEN, ISBN, ISSN, LCCN, PRICE, and URL
+%%% values are wrapped inside macros \showCODEN{}
+%%% etc. that the user can provide alternate
+%%% definitions of to change the formatting, or
+%%% to suppress their output altogether. That
+%%% way, output identical to that of the four
+%%% standard BibTeX style files can be obtained
+%%% with these extended files, if these macros
+%%% are defined to expand to empty strings.
+%%%
+%%% URL handling is slightly more complex,
+%%% because URLs can contain characters which TeX
+%%% must handle in verbatim mode in a typewriter
+%%% font, and such text cannot readily appear
+%%% inside nested macro arguments. Consequently,
+%%% URLs are formatted in the .bbl file like
+%%% this:
+%%% \ifshowURL {\showURL \path|...|} \fi
+%%% where \showURL takes no argument, and
+%%% normally expands to the 4-character string
+%%% URL<space>. The grouping braces ensure that
+%%% any font changes made by \showURL remain
+%%% localized. Vertical bar is chosen as the
+%%% verbatim path delimiter, because it cannot
+%%% appear in URLs. The other prohibited ISO
+%%% Latin 1 characters are the non-printing
+%%% control characters 0..31, plus those in the
+%%% range 128..255, plus the ten special
+%%% characters
+%%%
+%%% { } [ ] \ ^ ~ < > `
+%%%
+%%% See Internet RFC 1630 (June 1994) for more
+%%% details. (Backquote is not even mentioned
+%%% there.)
+%%%
+%%% As an example of font changes, in LaTeX 2e
+%%% you might define
+%%% \newcommand{\showURL}{URL
+%%% \let \oldtt = \tt
+%%% \renewcommand{\tt}{\oldtt \itshape}}
+%%% to get URLs set in a typewriter italic font.
+%%%
+%%% If desired, a sed script can be used to
+%%% eliminate non-essential comments (this
+%%% reduces the file size by 2/3); a command
+%%% filter step like
+%%% sed -e '/^%$/d' -e '/^%[^%].*$/d'
+%%% will accomplish that job.
+%%%
+%%% The checksum field above contains a CRC-16
+%%% checksum as the first value, followed by the
+%%% equivalent of the standard UNIX wc (word
+%%% count) utility output of lines, words, and
+%%% characters. This is produced by Robert
+%%% Solovay's checksum utility."
+%%% }
+%%% ====================================================================
+%%% Revision history (reverse time order):
+%%%
+%%% 2.03 [15-May-1996]
+%%% Add CODEN support, ISBN and ISSN output for Article entries,
+%%% and ISBN output for TechReport entries (yes, these sometimes
+%%% do have ISBNs).
+%%%
+%%% Add wrapper macros \showXYZ{} (XYZ = CODEN, ISBN, ISSN, LCCN,
+%%% PRICE, and URL) defined inside the thebibliography environment
+%%% to expand to XYZ (except for PRICE) and their arguments,
+%%% PROVIDED they are not already defined. That way, the user can
+%%% provide alternate definitions outside the thebibliography
+%%% environment, for example, to suppress particular ones, or
+%%% to alter the font used.
+%%%
+%%% Substantially revise leading comments to better document the
+%%% extensions.
+%%%
+%%% 2.02 [01-Apr-1996]
+%%% Add day keyword support with new code in format.date function.
+%%% Oren Patashnik will include this new keyword in standard styles
+%%% in BibTeX 1.0.
+%%%
+%%% Add new function collapse.pagerange, and use it to collapse
+%%% page ranges with identical initial and final numbers to a
+%%% single number, so that bibliography files can distinguish
+%%% between one-page documents, and documents missing final page
+%%% numbers.
+%%%
+%%% 2.01 [25-Oct-1994]
+%%% Add URL output support.
+%%%
+%%% 2.00 [12-Oct-1994]
+%%% Add support for pages in theses and manuals, treating them
+%%% like Book and InBook pages.
+%%%
+%%% Correct ISSN support: a typo caused output of ISBN instead of
+%%% ISSN.
+%%%
+%%% Wherever ISBNs are output, also output an ISSN, if one
+%%% exists, and vice versa. The reason is that some periodicals
+%%% (e.g. The X Resource, published by O'Reilly and Associates)
+%%% have both ISSN and ISBN numbers, and can be purchased either
+%%% as journal subscriptions, or as single volumes.
+%%%
+%%% For InProceedings and Proceedings output, issue a warning for
+%%% a missing publisher: even though that field is optional, a
+%%% bibliographic reference without it is incomplete.
+%%%
+%%% Remove harmless, but unneeded, single horizontal space before
+%%% price output added with version 1.03.
+%%%
+%%% Change Proceedings and InProceedings to treat address values
+%%% as publisher addresses, as they are with every other document
+%%% type, rather than as conference addresses, which belong in
+%%% the title field (that is how major libraries, including OCLC
+%%% and Library of Congress, with nearly 60M holdings, represent
+%%% them). The need for this change has been discussed with
+%%% BibTeX's author, Oren Patashnik, and there is a good
+%%% possibility that BibTeX 1.0 will contain the change
+%%% implemented here. This is an INCOMPATIBLE change that will
+%%% produce different .bbl file formatting. However, the TUG and
+%%% BibNet bibliography projects have consistently used address
+%%% to me publisher/organization/institution address, and so
+%%% already conform to the new practice.
+%%%
+%%% 1.05 [30-May-1994]
+%%% Add NUMERIC_SUFFIXES support.
+%%%
+%%% Change all preprocessor statements to put else and endif
+%%% labels inside C-style comments to conform to 1989 ISO/ANSI C
+%%% Standard.
+%%%
+%%% 1.04 [11-Nov-1993]
+%%% Add underscore prefix to new processor symbols to prevent
+%%% substitution in comments
+%%%
+%%% 1.03 [11-Oct-1993]
+%%% Add support for LCCN (Library of Congress Catalog Number)
+%%% and price fields, and make ISBN, ISSN, LCCN, and price
+%%% selectable by preprocessor conditionals.
+%%%
+%%% 1.02 [12-Sep-1991]
+%%% Merge in Barbara N. Beeton's suggestion for hyphen-less
+%%% line breaks around volume(number):page.
+%%%
+%%% 1.01 [10-Sep-1991]
+%%% Update file comment header and use Solovay checksum program.
+%%%
+%%% 1.00 [17-Oct-1990]
+%%% Original version merging hand-edits of is-xxx.bst files into
+%%% this master file, xbtxbst.doc.
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+%% BibTeX `plain' family
+%% version 0.99b for BibTeX versions 0.99a or later, LaTeX version 2.09.
+%% Copyright (C) 1985, all rights reserved.
+%% Copying of this file is authorized only if either
+%% (1) you make absolutely no changes to your copy, including name, or
+%% (2) if you do make changes, you name it something other than
+%% btxbst.doc, plain.bst, unsrt.bst, alpha.bst, and abbrv.bst.
+%% This restriction helps ensure that all standard styles are identical.
+%% The file btxbst.doc has the documentation for this style.
+
+
+
+
+
+
+
+
+
+
+
+
+
+ENTRY
+ { address
+ author
+ booktitle
+ chapter
+
+ coden
+
+ day
+ edition
+ editor
+ howpublished
+ institution
+
+ isbn
+
+
+ issn
+
+ journal
+ key
+
+ lccn
+
+ month
+ note
+ number
+ organization
+ pages
+
+ price
+
+ publisher
+ school
+ series
+ title
+ type
+
+ URL
+
+ volume
+ year
+ }
+ {}
+
+ { label }
+
+
+
+INTEGERS { output.state before.all mid.sentence after.sentence after.block }
+
+FUNCTION {init.state.consts}
+{ #0 'before.all :=
+ #1 'mid.sentence :=
+ #2 'after.sentence :=
+ #3 'after.block :=
+}
+
+
+STRINGS { b e new.pages original.t s t }
+
+FUNCTION {output.nonnull}
+{ 's :=
+ output.state mid.sentence =
+ { ", " * write$ }
+ { output.state after.block =
+ { add.period$ write$
+ newline$
+ "\newblock " write$
+ }
+ { output.state before.all =
+ 'write$
+ { add.period$ " " * write$ }
+ if$
+ }
+ if$
+ mid.sentence 'output.state :=
+ }
+ if$
+ s
+}
+
+FUNCTION {output}
+{ duplicate$ empty$
+ 'pop$
+ 'output.nonnull
+ if$
+}
+
+FUNCTION {output.check}
+{ 't :=
+ duplicate$ empty$
+ { pop$ "empty " t * " in " * cite$ * warning$ }
+ 'output.nonnull
+ if$
+}
+
+FUNCTION {output.bibitem}
+{ newline$
+
+ "\bibitem{" write$
+
+ cite$ write$
+ "}" write$
+ newline$
+ ""
+ before.all 'output.state :=
+}
+
+
+FUNCTION {fin.entry}
+{ add.period$
+ write$
+ newline$
+}
+
+FUNCTION {new.block}
+{ output.state before.all =
+ 'skip$
+ { after.block 'output.state := }
+ if$
+}
+
+FUNCTION {new.sentence}
+{ output.state after.block =
+ 'skip$
+ { output.state before.all =
+ 'skip$
+ { after.sentence 'output.state := }
+ if$
+ }
+ if$
+}
+
+
+FUNCTION {not}
+{ { #0 }
+ { #1 }
+ if$
+}
+
+FUNCTION {and}
+{ 'skip$
+ { pop$ #0 }
+ if$
+}
+
+FUNCTION {or}
+{ { pop$ #1 }
+ 'skip$
+ if$
+}
+
+
+FUNCTION {new.block.checka}
+{ empty$
+ 'skip$
+ 'new.block
+ if$
+}
+
+FUNCTION {new.block.checkb}
+{ empty$
+ swap$ empty$
+ and
+ 'skip$
+ 'new.block
+ if$
+}
+
+
+FUNCTION {new.sentence.checka}
+{ empty$
+ 'skip$
+ 'new.sentence
+ if$
+}
+
+FUNCTION {new.sentence.checkb}
+{ empty$
+ swap$ empty$
+ and
+ 'skip$
+ 'new.sentence
+ if$
+}
+
+
+FUNCTION {field.or.null}
+{ duplicate$ empty$
+ { pop$ "" }
+ 'skip$
+ if$
+}
+
+FUNCTION {emphasize}
+{ duplicate$ empty$
+ { pop$ "" }
+ { "{\em " swap$ * "}" * }
+ if$
+}
+
+INTEGERS { nameptr namesleft numnames }
+
+FUNCTION {format.names}
+{ 's :=
+ #1 'nameptr :=
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+
+ { s nameptr "{ff~}{vv~}{ll}{, jj}" format.name$ 't :=
+
+ nameptr #1 >
+ { namesleft #1 >
+ { ", " * t * }
+ { numnames #2 >
+ { "," * }
+ 'skip$
+ if$
+ t "others" =
+ { " et~al." * }
+ { " and " * t * }
+ if$
+ }
+ if$
+ }
+ 't
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+}
+
+FUNCTION {format.authors}
+{ author empty$
+ { "" }
+ { author format.names }
+ if$
+}
+
+
+FUNCTION {format.coden}
+{ coden empty$
+ { "" }
+ { new.block "\showCODEN{" coden * "}" *}
+ if$
+}
+
+
+FUNCTION {format.editors}
+{ editor empty$
+ { "" }
+ { editor format.names
+ editor num.names$ #1 >
+ { ", editors" * }
+ { ", editor" * }
+ if$
+ }
+ if$
+}
+
+
+FUNCTION {format.isbn}
+{ isbn empty$
+ { "" }
+ { new.block "\showISBN{" isbn * "}" *}
+ if$
+}
+
+
+
+FUNCTION {format.issn}
+{ issn empty$
+ { "" }
+ { new.block "\showISSN{" issn * "}" *}
+ if$
+}
+
+
+
+FUNCTION {format.lccn}
+{ lccn empty$
+ { "" }
+ { new.block "\showLCCN{" lccn * "}" *}
+ if$
+}
+
+
+
+FUNCTION {format.price}
+{ price empty$
+ { "" }
+ { new.block "\showPRICE{" price * "}" *}
+ if$
+}
+
+
+
+FUNCTION {format.url}
+{ url empty$
+ { "" }
+ { new.block "\ifshowURL {\showURL \path|" url * "|}\fi" *}
+ if$
+}
+
+
+
+
+FUNCTION {format.title}
+{ title empty$
+ { "" }
+
+ { title "t" change.case$ }
+
+ if$
+}
+
+
+
+FUNCTION {collapse.pagerange}
+{ 't := % save input page range string
+ t 'original.t := % save original page range
+ "" 'b := % beginning page number
+ "" 'e := % ending page number
+ { t empty$ not } % while-loop Boolean condition
+ { % while-loop body
+ t #1 #2 substring$ "--" = % have we found the en-dash?
+ {
+ t #3 global.max$ substring$ 'e := % yes, save ending page number
+ "" 't := % and set t to empty string to terminate loop
+ }
+ {
+ b t #1 #1 substring$ * 'b := % no, just accumulate this character
+ t #2 global.max$ substring$ 't := % and set t to the remaining string
+ }
+ if$
+ }
+ while$ % on exit, t has ending page number string
+ e b = % are beginning and ending numbers the same?
+ { b } % yes, return the beginning page number string
+ { original.t } % no, return the original page number string
+ if$
+}
+
+
+FUNCTION {n.dashify}
+{ 't :=
+ ""
+ { t empty$ not }
+ { t #1 #1 substring$ "-" =
+ { t #1 #2 substring$ "--" = not
+ { "--" *
+ t #2 global.max$ substring$ 't :=
+ }
+ { { t #1 #1 substring$ "-" = }
+ { "-" *
+ t #2 global.max$ substring$ 't :=
+ }
+ while$
+ }
+ if$
+ }
+ { t #1 #1 substring$ *
+ t #2 global.max$ substring$ 't :=
+ }
+ if$
+ }
+ while$
+}
+
+
+FUNCTION {format.date}
+{ year empty$
+ { month empty$
+ {
+ day empty$
+ { "" }
+ { "there's a day but no month or year in " cite$ * warning$ }
+ if$
+ }
+ { "there's a month but no year in " cite$ * warning$
+ month
+ day empty$
+ { }
+ { " " * day * }
+ if$
+ }
+ if$
+ }
+ { month empty$
+ {
+ day empty$
+ { year }
+ { "there's a day and year but no month in " cite$ * warning$ }
+ if$
+ }
+ {
+ month " " *
+ day empty$
+ { }
+ { day * ", " * }
+ if$
+ year *
+ }
+ if$
+ }
+ if$
+}
+
+
+FUNCTION {format.btitle}
+{ title emphasize
+}
+
+
+FUNCTION {tie.or.space.connect}
+{ duplicate$ text.length$ #3 <
+ { "~" }
+ { " " }
+ if$
+ swap$ * *
+}
+
+
+FUNCTION {either.or.check}
+{ empty$
+ 'pop$
+ { "can't use both " swap$ * " fields in " * cite$ * warning$ }
+ if$
+}
+
+
+FUNCTION {format.bvolume}
+{ volume empty$
+ { "" }
+ { "volume" volume tie.or.space.connect
+ series empty$
+ 'skip$
+ { " of " * series emphasize * }
+ if$
+ "volume and number" number either.or.check
+ }
+ if$
+}
+
+
+FUNCTION {format.number.series}
+{ volume empty$
+ { number empty$
+ { series field.or.null }
+ { output.state mid.sentence =
+ { "number" }
+ { "Number" }
+ if$
+ number tie.or.space.connect
+ series empty$
+ { "there's a number but no series in " cite$ * warning$ }
+ { " in " * series * }
+ if$
+ }
+ if$
+ }
+ { "" }
+ if$
+}
+
+
+FUNCTION {format.edition}
+{ edition empty$
+ { "" }
+ { output.state mid.sentence =
+ { edition "l" change.case$ " edition" * }
+ { edition "t" change.case$ " edition" * }
+ if$
+ }
+ if$
+}
+
+
+INTEGERS { multiresult }
+
+FUNCTION {multi.page.check}
+{ 't :=
+ #0 'multiresult :=
+ { multiresult not
+ t empty$ not
+ and
+ }
+ { t #1 #1 substring$
+ duplicate$ "-" =
+ swap$ duplicate$ "," =
+ swap$ "+" =
+ or or
+ { #1 'multiresult := }
+ { t #2 global.max$ substring$ 't := }
+ if$
+ }
+ while$
+ multiresult
+}
+
+
+FUNCTION {format.book.pages}
+{ pages empty$
+ { "" }
+ { new.block pages " pp." * }
+ if$
+}
+
+
+
+FUNCTION {format.pages}
+{ pages empty$
+ { "" }
+ {
+ pages multi.page.check
+ { pages collapse.pagerange 'new.pages := }
+ { pages 'new.pages := }
+ if$
+ new.pages multi.page.check
+ { "pages" new.pages n.dashify tie.or.space.connect }
+ { "page" new.pages tie.or.space.connect }
+ if$
+ }
+ if$
+}
+
+
+FUNCTION {format.vol.num.pages}
+{ volume field.or.null
+ number empty$
+ 'skip$
+ { "\penalty0 (" number * ")" * *
+ volume empty$
+ { "there's a number but no volume in " cite$ * warning$ }
+ 'skip$
+ if$
+ }
+ if$
+ pages empty$
+ 'skip$
+ { duplicate$ empty$
+ { pop$ format.pages }
+ { ":\penalty0 " * pages collapse.pagerange n.dashify * }
+ if$
+ }
+ if$
+}
+
+
+
+FUNCTION {format.chapter.pages}
+{ chapter empty$
+ 'format.pages
+ { type empty$
+ { "chapter" }
+ { type "l" change.case$ }
+ if$
+ chapter tie.or.space.connect
+ pages empty$
+ 'skip$
+ { ", " * format.pages * }
+ if$
+ }
+ if$
+}
+
+
+FUNCTION {format.in.ed.booktitle}
+{ booktitle empty$
+ { "" }
+ { editor empty$
+ { "In " booktitle emphasize * }
+ { "In " format.editors * ", " * booktitle emphasize * }
+ if$
+ }
+ if$
+}
+
+
+FUNCTION {empty.misc.check}
+{ author empty$ title empty$ howpublished empty$
+ month empty$ year empty$ note empty$
+ and and and and and
+
+
+
+ { "all relevant fields are empty in " cite$ * warning$ }
+ 'skip$
+ if$
+}
+
+
+FUNCTION {format.thesis.type}
+{ type empty$
+ 'skip$
+ { pop$
+ type "t" change.case$
+ }
+ if$
+}
+
+
+FUNCTION {format.tr.number}
+{ type empty$
+ { "Technical Report" }
+ 'type
+ if$
+ number empty$
+ { "t" change.case$ }
+ { number tie.or.space.connect }
+ if$
+}
+
+
+FUNCTION {format.article.crossref}
+{ key empty$
+ { journal empty$
+ { "need key or journal for " cite$ * " to crossref " * crossref *
+ warning$
+ ""
+ }
+ { "In {\em " journal * "\/}" * }
+ if$
+ }
+ { "In " key * }
+ if$
+ " \cite{" * crossref * "}" *
+}
+
+
+FUNCTION {format.crossref.editor}
+{ editor #1 "{vv~}{ll}" format.name$
+ editor num.names$ duplicate$
+ #2 >
+ { pop$ " et~al." * }
+ { #2 <
+ 'skip$
+ { editor #2 "{ff }{vv }{ll}{ jj}" format.name$ "others" =
+ { " et~al." * }
+ { " and " * editor #2 "{vv~}{ll}" format.name$ * }
+ if$
+ }
+ if$
+ }
+ if$
+}
+
+
+FUNCTION {format.book.crossref}
+{ volume empty$
+ { "empty volume in " cite$ * "'s crossref of " * crossref * warning$
+ "In "
+ }
+ { "Volume" volume tie.or.space.connect
+ " of " *
+ }
+ if$
+ editor empty$
+ editor field.or.null author field.or.null =
+ or
+ { key empty$
+ { series empty$
+ { "need editor, key, or series for " cite$ * " to crossref " *
+ crossref * warning$
+ "" *
+ }
+ { "{\em " * series * "\/}" * }
+ if$
+ }
+ { key * }
+ if$
+ }
+ { format.crossref.editor * }
+ if$
+ " \cite{" * crossref * "}" *
+}
+
+
+FUNCTION {format.incoll.inproc.crossref}
+{ editor empty$
+ editor field.or.null author field.or.null =
+ or
+ { key empty$
+ { booktitle empty$
+ { "need editor, key, or booktitle for " cite$ * " to crossref " *
+ crossref * warning$
+ ""
+ }
+ { "In {\em " booktitle * "\/}" * }
+ if$
+ }
+ { "In " key * }
+ if$
+ }
+ { "In " format.crossref.editor * }
+ if$
+ " \cite{" * crossref * "}" *
+}
+
+
+FUNCTION {article}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.title "title" output.check
+ new.block
+ crossref missing$
+ { journal emphasize "journal" output.check
+ format.vol.num.pages output
+ format.date "year" output.check
+ }
+ { format.article.crossref output.nonnull
+ format.pages output
+ }
+ if$
+
+ format.coden output
+
+
+ format.isbn output
+
+
+ format.issn output
+
+
+ format.url output
+
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {book}
+{ output.bibitem
+ author empty$
+ { format.editors "author and editor" output.check }
+ { format.authors output.nonnull
+ crossref missing$
+ { "author and editor" editor either.or.check }
+ 'skip$
+ if$
+ }
+ if$
+ new.block
+ format.btitle "title" output.check
+ crossref missing$
+ { format.bvolume output
+ new.block
+ format.number.series output
+ new.sentence
+ publisher "publisher" output.check
+ address output
+ }
+ { new.block
+ format.book.crossref output.nonnull
+ }
+ if$
+ format.edition output
+ format.date "year" output.check
+
+ format.coden output
+
+
+ format.isbn output
+
+
+ format.issn output
+
+
+ format.book.pages output
+
+
+ format.lccn output
+
+
+ format.price output
+
+
+ format.url output
+
+ new.block
+ note output
+ fin.entry
+}
+
+
+FUNCTION {booklet}
+{ output.bibitem
+ format.authors output
+ new.block
+ format.title "title" output.check
+ howpublished address new.block.checkb
+ howpublished output
+ address output
+ format.date output
+
+ format.coden output
+
+
+ format.isbn output
+
+
+ format.issn output
+
+
+ format.book.pages output
+
+
+ format.lccn output
+
+
+ format.price output
+
+
+ format.url output
+
+ new.block
+ note output
+ fin.entry
+}
+
+
+
+FUNCTION {inbook}
+{ output.bibitem
+ author empty$
+ { format.editors "author and editor" output.check }
+ { format.authors output.nonnull
+ crossref missing$
+ { "author and editor" editor either.or.check }
+ 'skip$
+ if$
+ }
+ if$
+ new.block
+ format.btitle "title" output.check
+ crossref missing$
+ { format.bvolume output
+ format.chapter.pages "chapter and pages" output.check
+ new.block
+ format.number.series output
+ new.sentence
+ publisher "publisher" output.check
+ address output
+ }
+ { format.chapter.pages "chapter and pages" output.check
+ new.block
+ format.book.crossref output.nonnull
+ }
+ if$
+ format.edition output
+ format.date "year" output.check
+
+ format.coden output
+
+
+ format.isbn output
+
+
+ format.issn output
+
+
+ format.lccn output
+
+
+ format.price output
+
+
+ format.url output
+
+ new.block
+ note output
+ fin.entry
+}
+
+
+FUNCTION {incollection}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.title "title" output.check
+ new.block
+ crossref missing$
+ { format.in.ed.booktitle "booktitle" output.check
+ format.bvolume output
+ format.number.series output
+ format.chapter.pages output
+ new.sentence
+ publisher "publisher" output.check
+ address output
+ format.edition output
+ format.date "year" output.check
+ }
+ { format.incoll.inproc.crossref output.nonnull
+ format.chapter.pages output
+ }
+ if$
+
+ format.coden output
+
+
+ format.isbn output
+
+
+ format.issn output
+
+
+ format.lccn output
+
+
+ format.price output
+
+
+ format.url output
+
+ new.block
+ note output
+ fin.entry
+}
+
+
+FUNCTION {inproceedings}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.title "title" output.check
+ new.block
+ crossref missing$
+ { format.in.ed.booktitle "booktitle" output.check
+ format.bvolume output
+ format.number.series output
+ format.pages output
+ address empty$
+ { organization publisher new.sentence.checkb
+ organization output
+ publisher "publisher" output.check
+ format.date "year" output.check
+ }
+ { new.sentence
+ organization output
+ publisher "publisher" output.check
+ address output.nonnull
+ format.date "year" output.check
+ }
+ if$
+ }
+ { format.incoll.inproc.crossref output.nonnull
+ format.pages output
+ }
+ if$
+
+ format.coden output
+
+
+ format.isbn output
+
+
+ format.issn output
+
+
+ format.lccn output
+
+
+ format.price output
+
+
+ format.url output
+
+ new.block
+ note output
+ fin.entry
+}
+
+
+FUNCTION {conference} { inproceedings }
+
+
+FUNCTION {manual}
+{ output.bibitem
+ author empty$
+ { organization empty$
+ 'skip$
+ { organization output.nonnull
+ address output
+ }
+ if$
+ }
+ { format.authors output.nonnull }
+ if$
+ new.block
+ format.btitle "title" output.check
+ author empty$
+ { organization empty$
+ { address new.block.checka
+ address output
+ }
+ 'skip$
+ if$
+ }
+ { organization address new.block.checkb
+ organization output
+ address output
+ }
+ if$
+ format.edition output
+ format.date output
+
+ format.book.pages output
+
+
+ format.price output
+
+
+ format.url output
+
+ new.block
+ note output
+ fin.entry
+}
+
+
+FUNCTION {mastersthesis}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.title "title" output.check
+ new.block
+ "Master's thesis" format.thesis.type output.nonnull
+ school "school" output.check
+ address output
+ format.date "year" output.check
+
+ format.book.pages output
+
+
+ format.url output
+
+ new.block
+ note output
+ fin.entry
+}
+
+
+FUNCTION {misc}
+{ output.bibitem
+ format.authors output
+ title howpublished new.block.checkb
+ format.title output
+ howpublished new.block.checka
+ howpublished output
+ format.date output
+
+ format.coden output
+
+
+ format.isbn output
+
+
+ format.issn output
+
+
+ format.price output
+
+
+ format.url output
+
+ new.block
+ note output
+ fin.entry
+ empty.misc.check
+}
+
+
+FUNCTION {phdthesis}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.btitle "title" output.check
+ new.block
+ "PhD thesis" format.thesis.type output.nonnull
+ school "school" output.check
+ address output
+ format.date "year" output.check
+
+ format.book.pages output
+
+
+ format.url output
+
+ new.block
+ note output
+ fin.entry
+}
+
+
+FUNCTION {periodical}
+{ output.bibitem
+ editor empty$
+ { organization output }
+ { format.editors output.nonnull }
+ if$
+ new.block
+ title emphasize "title" output.check
+ format.vol.num.pages output
+ format.date output
+
+ format.coden output
+
+
+ format.isbn output
+
+
+ format.issn output
+
+
+ format.price output
+
+
+ format.url output
+
+ new.sentence
+ publisher output
+ address output
+ howpublished new.block.checka
+ howpublished output
+ new.block
+ note output
+ fin.entry
+}
+
+
+FUNCTION {proceedings}
+{ output.bibitem
+ editor empty$
+ { organization output }
+ { format.editors output.nonnull }
+ if$
+ new.block
+ format.btitle "title" output.check
+ format.bvolume output
+ format.number.series output
+ address empty$
+ { editor empty$
+ { publisher new.sentence.checka }
+ { organization publisher new.sentence.checkb
+ organization output
+ }
+ if$
+ publisher "publisher" output.check %%% <- new check for missing
+ format.date "year" output.check
+ }
+ { new.sentence
+ editor empty$
+ 'skip$
+ { organization output }
+ if$
+ publisher "publisher" output.check
+ address output.nonnull
+ format.date "year" output.check
+ }
+ if$
+
+ format.coden output
+
+
+ format.isbn output
+
+
+ format.issn output
+
+
+ format.lccn output
+
+
+ format.price output
+
+
+ format.url output
+
+ new.block
+ note output
+ fin.entry
+}
+
+
+FUNCTION {techreport}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.title "title" output.check
+ new.block
+ format.tr.number output.nonnull
+ institution "institution" output.check
+ address output
+ format.date "year" output.check
+
+ format.isbn output % NB: TechReports occasionally have ISBNs
+
+
+ format.book.pages output
+
+
+ format.price output
+
+
+ format.url output
+
+ new.block
+ note output
+ fin.entry
+}
+
+
+FUNCTION {unpublished}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.title "title" output.check
+ new.block
+ note "note" output.check
+ format.date output
+
+ format.url output
+
+ fin.entry
+}
+
+
+FUNCTION {default.type} { misc }
+
+
+
+
+MACRO {jan} {"January"}
+
+MACRO {feb} {"February"}
+
+MACRO {mar} {"March"}
+
+MACRO {apr} {"April"}
+
+MACRO {may} {"May"}
+
+MACRO {jun} {"June"}
+
+MACRO {jul} {"July"}
+
+MACRO {aug} {"August"}
+
+MACRO {sep} {"September"}
+
+MACRO {oct} {"October"}
+
+MACRO {nov} {"November"}
+
+MACRO {dec} {"December"}
+
+
+
+
+
+
+MACRO {acmcs} {"ACM Computing Surveys"}
+
+MACRO {acta} {"Acta Informatica"}
+
+MACRO {cacm} {"Communications of the ACM"}
+
+MACRO {ibmjrd} {"IBM Journal of Research and Development"}
+
+MACRO {ibmsj} {"IBM Systems Journal"}
+
+MACRO {ieeese} {"IEEE Transactions on Software Engineering"}
+
+MACRO {ieeetc} {"IEEE Transactions on Computers"}
+
+MACRO {ieeetcad}
+ {"IEEE Transactions on Computer-Aided Design of Integrated Circuits"}
+
+MACRO {ipl} {"Information Processing Letters"}
+
+MACRO {jacm} {"Journal of the ACM"}
+
+MACRO {jcss} {"Journal of Computer and System Sciences"}
+
+MACRO {scp} {"Science of Computer Programming"}
+
+MACRO {sicomp} {"SIAM Journal on Computing"}
+
+MACRO {tocs} {"ACM Transactions on Computer Systems"}
+
+MACRO {tods} {"ACM Transactions on Database Systems"}
+
+MACRO {tog} {"ACM Transactions on Graphics"}
+
+MACRO {toms} {"ACM Transactions on Mathematical Software"}
+
+MACRO {toois} {"ACM Transactions on Office Information Systems"}
+
+MACRO {toplas} {"ACM Transactions on Programming Languages and Systems"}
+
+MACRO {tcs} {"Theoretical Computer Science"}
+
+
+
+
+READ
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+STRINGS { longest.label }
+
+INTEGERS { number.label longest.label.width }
+
+FUNCTION {initialize.longest.label}
+{ "" 'longest.label :=
+ #1 'number.label :=
+ #0 'longest.label.width :=
+}
+
+FUNCTION {longest.label.pass}
+{ number.label int.to.str$ 'label :=
+ number.label #1 + 'number.label :=
+ label width$ longest.label.width >
+ { label 'longest.label :=
+ label width$ 'longest.label.width :=
+ }
+ 'skip$
+ if$
+}
+
+EXECUTE {initialize.longest.label}
+
+ITERATE {longest.label.pass}
+
+
+
+
+FUNCTION {begin.bib}
+
+{ preamble$ empty$
+
+ 'skip$
+ { preamble$ write$ newline$ }
+ if$
+ "\begin{thebibliography}{" longest.label * "}" * write$ newline$
+
+ "\ifx \showCODEN \undefined \def \showCODEN #1{CODEN #1} \fi" write$ newline$
+
+
+ "\ifx \showISBN \undefined \def \showISBN #1{ISBN #1} \fi" write$ newline$
+
+
+ "\ifx \showISSN \undefined \def \showISSN #1{ISSN #1} \fi" write$ newline$
+
+
+ "\ifx \showLCCN \undefined \def \showLCCN #1{LCCN #1} \fi" write$ newline$
+
+
+ "\ifx \showPRICE \undefined \def \showPRICE #1{#1} \fi" write$ newline$
+
+
+ "\ifx \showURL \undefined \def \showURL {URL } \fi" write$ newline$
+ "\ifx \path \undefined \input path.sty \fi" write$ newline$
+ "\ifx \ifshowURL \undefined" write$ newline$
+ " \newif \ifshowURL" write$ newline$
+ " \showURLtrue" write$ newline$
+ "\fi" write$ newline$
+
+}
+
+EXECUTE {begin.bib}
+
+EXECUTE {init.state.consts}
+
+
+ITERATE {call.type$}
+
+
+FUNCTION {end.bib}
+{ newline$
+ "\end{thebibliography}" write$ newline$
+}
+
+EXECUTE {end.bib}
diff --git a/biblio/bibtex/contrib/is-bst/xbtxbst.doc b/biblio/bibtex/contrib/is-bst/xbtxbst.doc
new file mode 100644
index 0000000000..05b733c099
--- /dev/null
+++ b/biblio/bibtex/contrib/is-bst/xbtxbst.doc
@@ -0,0 +1,2665 @@
+% /u/sy/beebe/tex/bib/merge/xbtxbst.doc, Thu Sep 12 10:19:13 1991
+% Edit by Nelson H. F. Beebe <beebe@magna.math.utah.edu>
+% /u/sy/beebe/tex/bib/merge/xbtxbst.doc, Wed Oct 17 08:27:24 1990
+% Edit by Nelson H.F. Beebe <beebe@sandy.math.utah.edu>
+
+% NB: Important convention: comment lines beginning with 2 (or
+% more) percents are to be preserved in the derived style
+% files. Comment lines beginning with only 1 percent can be
+% discarded (and are, if the derived files are produced with
+% the UNIX Makefile that accompanies this file.)
+
+%% =====================================================================
+%% @BibTeX-style-file{
+%% author = "Nelson H. F. Beebe",
+%% version = "1.02",
+%% date = "12 September 1991",
+%% filename = "xbtxbst.doc",
+%% address = "Center for Scientific Computing
+%% Department of Mathematics
+%% South Physics Building
+%% University of Utah
+%% Salt Lake City, UT 84112
+%% USA
+%% Tel: (801) 581-5254",
+%% checksum = "50938 2665 11236 78415",
+%% email = "beebe@math.utah.edu (Internet)",
+%% codetable = "ISO/ASCII",
+%% keywords = "BibTeX, style, bibliography",
+%% supported = "yes",
+%% docstring = "This file is a modification of the standard
+%% BibTeX btxbst.doc file, or is a .bst file
+%% derived from that modification. It contains
+%% added support for ISBN and ISSN fields, as
+%% well as for the PERIODICAL entry. The UNIX C
+%% preprocessor can be used to extract the
+%% extensions of the standard styles, as
+%% follows:
+%%
+%% cpp -P -DPLAIN xbtxbst.doc is-plain.txt
+%% cpp -P -DUNSRT xbtxbst.doc is-unsrt.txt
+%% cpp -P -DALPHA xbtxbst.doc is-alpha.txt
+%% cpp -P -DABBRV xbtxbst.doc is-abbrv.txt
+%%
+%% If desired, a sed script can be used to
+%% eliminate non-essential comments (this
+%% reduces the file size by 2/3); a command
+%% filter step like
+%% sed -e '/^%$/d' -e '/^%[^%].*$/d'
+%% will accomplish that job.
+%%
+%% The checksum field above contains a CRC-16
+%% checksum as the first value, followed by the
+%% equivalent of the standard UNIX wc (word
+%% count) utility output of lines, words, and
+%% characters. This is produced by Robert
+%% Solovay's checksum utility."
+%% }
+%% =====================================================================
+%% Revision history (reverse time order):
+%% 1.02 [12-Sep-1991]
+%% Merge in Barbara N. Beeton's suggestion for hyphen-less
+%% line breaks around volume(number):page.
+%% 1.01 [10-Sep-1991]
+%% Update file comment header and use Solovay checksum program.
+%% 1.00 [17-Oct-1990]
+%% Original version merging hand-edits of is-xxx.bst files into
+%% this master file, xbtxbst.doc.
+
+% In the following, only essential changes have been applied; the
+% documentation immediately below referring to the use of cpp on
+% btxbst.doc has not been altered. See the docstring entry above
+% for current information.
+
+%% BibTeX `plain' family
+%% version 0.99b for BibTeX versions 0.99a or later, LaTeX version 2.09.
+%% Copyright (C) 1985, all rights reserved.
+%% Copying of this file is authorized only if either
+%% (1) you make absolutely no changes to your copy, including name, or
+%% (2) if you do make changes, you name it something other than
+%% btxbst.doc, plain.bst, unsrt.bst, alpha.bst, and abbrv.bst.
+%% This restriction helps ensure that all standard styles are identical.
+%% The file btxbst.doc has the documentation for this style.
+%
+% Please notify Oren Patashnik (PATASHNIK@SCORE.STANFORD.EDU) of any bugs in
+% these standard styles or in this documentation file.
+%
+% This is file btxbxt.doc; it helps document bibliography styles,
+% and is also a template file that you can use to make
+% several different style files, if you have access to a C preprocessor.
+% For example, the standard styles were made by doing something like
+% cpp -P -DPLAIN btxbst.doc plain.txt
+% cpp -P -DUNSRT btxbst.doc unsrt.txt
+% cpp -P -DALPHA btxbst.doc alpha.txt
+% cpp -P -DABBRV btxbst.doc abbrv.txt
+% and then renaming after removing unwanted comments and blank lines.
+% If you don't have access,
+% you can edit this file by hand to imitate the preprocessor,
+% with the following explanation of the C preprocessor constructs used here.
+%
+% The output of the preprocessor is the same as the input, except that certain
+% lines will be excluded (and some blank lines will be added). The sequence
+% #if VAR
+% lines to be included when VAR is not zero
+% #else
+% lines to be included when VAR is zero
+% #endif
+% (with the #-signs appearing in column 1) means that one set or the other of
+% the lines are to be included depending on the value of VAR.
+% The #else part is optional. Comments can be added after #else and #endif.
+% Variables can be set by
+% #define VAR value
+% and one can also use #ifdef VAR to see if VAR has any value, and #ifndef
+% to see if it has none.
+% Another #if form used in this file is #if !VAR, which includes the lines
+% after the #if only if VAR is zero.
+%
+% Convention: Use all uppercase identifiers for these preprocessor variables
+% so you can spot them easily
+%
+% The command line to the preprocessor should define one of PLAIN, UNSRT, ALPHA
+% or ABBRV (though PLAIN will be used by default if none is given),
+% and the following lines will set various boolean variables to control the
+% various lines that are chosen from the rest of the file.
+% Each boolean variable should be set true (1) or false (0) in each style.
+% Here are the current variables, and their meanings:
+% LAB_ALPH: an alphabetic label is used (if false then a numeric
+% label is used)
+% SORTED: the entries should be sorted by label (if nonnumeric)
+% and other info, like authors (if false, then
+% entries remain in order of occurrence)
+% NAME_FULL: the authors, editors, etc., get the full names as
+% given in the bibliography file (if false, the first
+% names become initials)
+% ATIT_LOWER: titles of non-"books" (e.g., articles) should be
+% converted to lower-case, except the first letter or
+% first letter after a colon
+% (if false then they appear as in the database)
+% MONTH_FULL: months are spelled out in full (if false, then
+% they're abbreviated)
+% JOUR_FULL: macro journal names are spelled out in full
+% (if false then they are abbreviated, currently
+% as they appear in ACM publications)
+#ifndef UNSRT
+# ifndef ALPHA
+# ifndef ABBRV
+# define PLAIN 1
+# endif
+# endif
+#endif
+#ifdef PLAIN
+% plain style (sorted numbers)
+# define LAB_ALPH 0
+# define SORTED 1
+# define NAME_FULL 1
+# define ATIT_LOWER 1
+# define MONTH_FULL 1
+# define JOUR_FULL 1
+#endif
+#ifdef UNSRT
+% unsrt style (unsorted numbers)
+# define LAB_ALPH 0
+# define SORTED 0
+# define NAME_FULL 1
+# define ATIT_LOWER 1
+# define MONTH_FULL 1
+# define JOUR_FULL 1
+#endif
+#ifdef ALPHA
+% alpha style (sorted short alphabetics)
+# define LAB_ALPH 1
+# define SORTED 1
+# define NAME_FULL 1
+# define ATIT_LOWER 1
+# define MONTH_FULL 1
+# define JOUR_FULL 1
+#endif
+#ifdef ABBRV
+% abbrv style (sorted numbers, with abbreviations)
+# define LAB_ALPH 0
+# define SORTED 1
+# define NAME_FULL 0
+# define ATIT_LOWER 1
+# define MONTH_FULL 0
+# define JOUR_FULL 0
+#endif
+%
+% Entry formatting: Similar to that recommended by Mary-Claire van Leunen
+% in "A Handbook for Scholars". Book-like titles are italicized
+% (emphasized) and non-book titles are converted to sentence
+% capitilization (and not enclosed in quotes).
+% This file outputs a \newblock between major blocks of an entry
+% (the name \newblock is analogous to the names \newline and \newpage)
+% so that the user can obtain an "open" format, which has a line break
+% before each block and lines after the first are indented within blocks,
+% by giving the optional \documentstyle argument `openbib';
+% The default is the "closed" format---blocks runs together.
+%
+% Citation alphabetic label format:
+% [Knu73] for single author (or editor or key)
+% [AHU83] (first letters of last names) for multiple authors
+%
+% Citation label numberic format:
+% [number]
+%
+% Reference list ordering for sorted, alphabetic lables:
+% alphabetical by citation label, then by author(s) or whatever
+% passes for author in the absence of one, then by year,
+% then title
+%
+% Reference list ordering for sorted, numeric lables:
+% alphabetical by author(s) or whatever passes
+% for author in the absence of one, then by year, then title
+%
+% Reference list ordering for unsorted:
+% by the order cited in the text
+%
+% History
+% 12/16/84 (HWT) Original `plain' version, by Howard Trickey.
+% 12/23/84 (LL) Some comments made by Leslie Lamport.
+% 2/16/85 (OP) Changes based on LL's comments, Oren Patashnik.
+% 2/17/85 (HWT) Template file and other standard styles made.
+% 3/28/85 (OP) First release, version 0.98b for BibTeX 0.98f.
+% 5/ 9/85 (OP) Version 0.98c for BibTeX 0.98i:
+% fixed Theoretical Computer Science macro name;
+% fixed the format.vol.num.pages function.
+% 1/24/88 (OP) Version 0.99a for BibTeX 0.99a, main changes:
+% assignment operator (:=) arguments reversed;
+% the preamble$ function outputs the database PREAMBLE;
+% entry.max$ and global.max$ (built-in) variables replace
+% entry.string.max and global.string.max functions;
+% alphabetizing by year then title, not just title;
+% many unnecessary ties removed; \it ==> \em;
+% the `alpha' style uses a superscripted `+' instead of a
+% `*' for unnamed names in constructing the label;
+% the `abbrv' style now uses "Mar." and "Sept.";
+% the functions calc.label and presort now look at just
+% the fields they're supposed to;
+% BOOKLET, MASTERSTHESIS, TECHREPORT use nonbook titles;
+% INBOOK and INCOLLECTION take an optional type (e.g.
+% type = "Section"), overriding the default "chapter";
+% BOOK, INBOOK, INCOLLECTION, and PROCEEDINGS now allow
+% either volume or number, not just volume;
+% INCOLLECTION now allows an edition and series field;
+% PROCEEDINGS and INPROCEEDINGS now use the address field
+% to tell where a conference was held;
+% INPROCEEDINGS and PROCEEDINGS now allow either volume
+% or number, and also a series field;
+% MASTERSTHESIS and PHDTHESIS accept types other than
+% "Master's thesis" and "PhD thesis";
+% UNPUBLISHED now outputs, in one block, note then date;
+% MANUAL now prints out the organization in
+% the first block if the author field is empty;
+% MISC can't be empty---it requires some optional field.
+% 3/23/88 (OP) Version 0.99b for BibTeX 0.99c---changed the three
+% erroneous occurrences of `cite ' to `cite$ '; this
+% change didn't affect the four standard styles, so the
+% 0.99a versions of those styles are still current.
+%
+% The ENTRY declaration
+% Like Scribe's (according to pages 231-2 of the April '84 edition),
+% but no fullauthor or editors fields because BibTeX does name handling.
+% The annote field is commented out here because this family doesn't
+% include an annotated bibliography style. And in addition to the fields
+% listed here, BibTeX has a built-in crossref field, explained later.
+
+ENTRY
+% Fields:
+ { address
+% Usually the address of a publisher or other type of organization.
+% Put information in this field only if it helps the reader find the
+% thing---for example you should omit the address of a major
+% publisher entirely. For a PROCEEDINGS or an INPROCEEDINGS,
+% however, it's the address of the conference; for those two entry
+% types, include the publisher's or organization's address, if
+% necessary, in the publisher or organization field.
+% annote
+% Long annotation---for annotated bibliographies (begins sentence).
+ author
+% Name(s) of author(s), in BibTeX name format.
+ booktitle
+% Book title when the thing being referenced isn't the whole book.
+% For book entries, the title field should be used instead.
+ chapter
+% Chapter (or section or whatever) number.
+ edition
+% Edition of a book---should be an ordinal (e.g., "Second").
+ editor
+% Name(s) of editor(s), in BibTeX name format.
+% If there is also an author field, then the editor field should be
+% for the book or collection that the work appears in.
+ howpublished
+% How something strange has been published (begins sentence).
+ institution
+% Sponsoring institution of a technical report.
+ isbn
+% ISBN book number (a 10-digit number with optional
+% embedded spaces or hyphens, where a `digit' is one of
+% 0123456789X).
+ issn
+% ISSN serial publication number (an 8-digit number with optional
+% embedded spaces or hyphens, where a `digit' is one of
+% 0123456789X).
+ journal
+% Journal name (macros are provided for many).
+ key
+% Alphabetizing, labeling, and cross-referencing key
+% (needed when an entry has no author or editor).
+ month
+% Month (macros are provided).
+ note
+% To help the reader find a reference (begins sentence).
+ number
+% Number of a journal or technical report, or of a work in a series.
+ organization
+% Organization sponsoring a conference (or publishing a manual); if
+% the editor (or author) is empty, and if the organization produces
+% an awkward label or cross reference, you should put appropriately
+% condensed organization information in the key field as well.
+ pages
+% Page number or numbers (use `--' to separate a range, use `+'
+% to indicate pages following that don't form a simple range).
+ publisher
+% Publisher name.
+ school
+% School name (for theses).
+ series
+% The name of a series or set of books.
+% An individual book will will also have it's own title.
+ title
+% The title of the thing you're referred to.
+ type
+% Type of a Techreport (e.g., "Research Note") to be used instead of
+% the default "Technical Report"; or, similarly, the type of a
+% thesis; or of a part of a book.
+ volume
+% The volume number of a journal or multivolume work.
+ year
+% The year should contain only numerals (technically, it should end
+% with four numerals, after purification; doesn't a begin sentence).
+ }
+% There are no integer entry variables
+ {}
+% These string entry variables are used to form the citation label.
+% In a storage pinch, sort.label can be easily computed on the fly.
+#if LAB_ALPH
+#if SORTED
+ { label extra.label sort.label }
+#else !SORTED
+% It doesn't seem like a good idea to use an order-of-citation
+% reference list when using alphabetic labels, but when this happens
+% we do things a little differently
+ { label }
+#endif SORTED
+#else !LAB_ALPH
+ { label }
+#endif LAB_ALPH
+
+% Each entry function starts by calling output.bibitem, to write the
+% \bibitem and its arguments to the .BBL file. Then the various fields
+% are formatted and printed by output or output.check. Those functions
+% handle the writing of separators (commas, periods, \newblock's),
+% taking care not to do so when they are passed a null string.
+% Finally, fin.entry is called to add the final period and finish the
+% entry.
+%
+% A bibliographic reference is formatted into a number of `blocks':
+% in the open format, a block begins on a new line and subsequent
+% lines of the block are indented. A block may contain more than
+% one sentence (well, not a grammatical sentence, but something to
+% be ended with a sentence ending period). The entry functions should
+% call new.block whenever a block other than the first is about to be
+% started. They should call new.sentence whenever a new sentence is
+% to be started. The output functions will ensure that if two
+% new.sentence's occur without any non-null string being output between
+% them then there won't be two periods output. Similarly for two
+% successive new.block's.
+%
+% The output routines don't write their argument immediately.
+% Instead, by convention, that argument is saved on the stack to be
+% output next time (when we'll know what separator needs to come
+% after it). Meanwhile, the output routine has to pop the pending
+% output off the stack, append any needed separator, and write it.
+%
+% To tell which separator is needed, we maintain an output.state.
+% It will be one of these values:
+% before.all just after the \bibitem
+% mid.sentence in the middle of a sentence: comma needed
+% if more sentence is output
+% after.sentence just after a sentence: period needed
+% after.block just after a block (and sentence):
+% period and \newblock needed.
+% Note: These styles don't use after.sentence
+%
+% VAR: output.state : INTEGER -- state variable for output
+%
+% The output.nonnull function saves its argument (assumed to be nonnull)
+% on the stack, and writes the old saved value followed by any needed
+% separator. The ordering of the tests is decreasing frequency of
+% occurrence.
+%
+% output.nonnull(s) ==
+% BEGIN
+% s := argument on stack
+% if output.state = mid.sentence then
+% write$(pop() * ", ")
+% -- "pop" isn't a function: just use stack top
+% else
+% if output.state = after.block then
+% write$(add.period$(pop()))
+% newline$
+% write$("\newblock ")
+% else
+% if output.state = before.all then
+% write$(pop())
+% else -- output.state should be after.sentence
+% write$(add.period$(pop()) * " ")
+% fi
+% fi
+% output.state := mid.sentence
+% fi
+% push s on stack
+% END
+%
+% The output function calls output.nonnull if its argument is non-empty;
+% its argument may be a missing field (thus, not necessarily a string)
+%
+% output(s) ==
+% BEGIN
+% if not empty$(s) then output.nonnull(s)
+% fi
+% END
+%
+% The output.check function is the same as the output function except that, if
+% necessary, output.check warns the user that the t field shouldn't be empty
+% (this is because it probably won't be a good reference without the field;
+% the entry functions try to make the formatting look reasonable even when
+% such fields are empty).
+%
+% output.check(s,t) ==
+% BEGIN
+% if empty$(s) then
+% warning$("empty " * t * " in " * cite$)
+% else output.nonnull(s)
+% fi
+% END
+%
+% The output.bibitem function writes the \bibitem for the current entry
+% (the label should already have been set up), and sets up the separator
+% state for the output functions. And, it leaves a string on the stack
+% as per the output convention.
+%
+% output.bibitem ==
+% BEGIN
+% newline$
+% write$("\bibitem[") % for alphabetic labels,
+% write$(label) % these three lines
+% write$("]{") % are used
+% write$("\bibitem{") % this line for numeric labels
+% write$(cite$)
+% write$("}")
+% push "" on stack
+% output.state := before.all
+% END
+%
+% The fin.entry function finishes off an entry by adding a period to the
+% string remaining on the stack. If the state is still before.all
+% then nothing was produced for this entry, so the result will look bad,
+% but the user deserves it. (We don't omit the whole entry because the
+% entry was cited, and a bibitem is needed to define the citation label.)
+%
+% fin.entry ==
+% BEGIN
+% write$(add.period$(pop()))
+% newline$
+% END
+%
+% The new.block function prepares for a new block to be output, and
+% new.sentence prepares for a new sentence.
+%
+% new.block ==
+% BEGIN
+% if output.state <> before.all then
+% output.state := after.block
+% fi
+% END
+%
+% new.sentence ==
+% BEGIN
+% if output.state <> after.block then
+% if output.state <> before.all then
+% output.state := after.sentence
+% fi
+% fi
+% END
+%
+
+INTEGERS { output.state before.all mid.sentence after.sentence after.block }
+
+FUNCTION {init.state.consts}
+{ #0 'before.all :=
+ #1 'mid.sentence :=
+ #2 'after.sentence :=
+ #3 'after.block :=
+}
+
+% the variables s and t are temporary string holders
+
+STRINGS { s t }
+
+FUNCTION {output.nonnull}
+{ 's :=
+ output.state mid.sentence =
+ { ", " * write$ }
+ { output.state after.block =
+ { add.period$ write$
+ newline$
+ "\newblock " write$
+ }
+ { output.state before.all =
+ 'write$
+ { add.period$ " " * write$ }
+ if$
+ }
+ if$
+ mid.sentence 'output.state :=
+ }
+ if$
+ s
+}
+
+FUNCTION {output}
+{ duplicate$ empty$
+ 'pop$
+ 'output.nonnull
+ if$
+}
+
+FUNCTION {output.check}
+{ 't :=
+ duplicate$ empty$
+ { pop$ "empty " t * " in " * cite$ * warning$ }
+ 'output.nonnull
+ if$
+}
+
+FUNCTION {output.bibitem}
+{ newline$
+#if LAB_ALPH
+ "\bibitem[" write$
+ label write$
+ "]{" write$
+#else
+ "\bibitem{" write$
+#endif LAB_ALPH
+ cite$ write$
+ "}" write$
+ newline$
+ ""
+ before.all 'output.state :=
+}
+
+% This function finishes all entries.
+
+FUNCTION {fin.entry}
+{ add.period$
+ write$
+ newline$
+}
+
+FUNCTION {new.block}
+{ output.state before.all =
+ 'skip$
+ { after.block 'output.state := }
+ if$
+}
+
+FUNCTION {new.sentence}
+{ output.state after.block =
+ 'skip$
+ { output.state before.all =
+ 'skip$
+ { after.sentence 'output.state := }
+ if$
+ }
+ if$
+}
+
+% These three functions pop one or two (integer) arguments from the stack
+% and push a single one, either 0 or 1.
+% The 'skip$ in the `and' and `or' functions are used because
+% the corresponding if$ would be idempotent
+
+FUNCTION {not}
+{ { #0 }
+ { #1 }
+ if$
+}
+
+FUNCTION {and}
+{ 'skip$
+ { pop$ #0 }
+ if$
+}
+
+FUNCTION {or}
+{ { pop$ #1 }
+ 'skip$
+ if$
+}
+
+% Sometimes we begin a new block only if the block will be big enough. The
+% new.block.checka function issues a new.block if its argument is nonempty;
+% new.block.checkb does the same if either of its TWO arguments is nonempty.
+
+FUNCTION {new.block.checka}
+{ empty$
+ 'skip$
+ 'new.block
+ if$
+}
+
+FUNCTION {new.block.checkb}
+{ empty$
+ swap$ empty$
+ and
+ 'skip$
+ 'new.block
+ if$
+}
+
+% The new.sentence.check functions are analogous.
+
+FUNCTION {new.sentence.checka}
+{ empty$
+ 'skip$
+ 'new.sentence
+ if$
+}
+
+FUNCTION {new.sentence.checkb}
+{ empty$
+ swap$ empty$
+ and
+ 'skip$
+ 'new.sentence
+ if$
+}
+
+% Here are some functions for formatting chunks of an entry.
+% By convention they either produce a string that can be followed by
+% a comma or period (using add.period$, so it is OK to end in a period),
+% or they produce the null string.
+%
+% A useful utility is the field.or.null function, which checks if the
+% argument is the result of pushing a `missing' field (one for which no
+% assignment was made when the current entry was read in from the database)
+% or the result of pushing a string having no non-white-space characters.
+% It returns the null string if so, otherwise it returns the field string.
+% Its main (but not only) purpose is to guarantee that what's left on the
+% stack is a string rather than a missing field.
+%
+% field.or.null(s) ==
+% BEGIN
+% if empty$(s) then return ""
+% else return s
+% END
+%
+% Another helper function is emphasize, which returns the argument emphazised,
+% if that is non-empty, otherwise it returns the null string. Italic
+% corrections aren't used, so this function should be used when punctation
+% will follow the result.
+%
+% emphasize(s) ==
+% BEGIN
+% if empty$(s) then return ""
+% else return "{\em " * s * "}"
+%
+% The format.names function formats the argument (which should be in
+% BibTeX name format) into "First Von Last, Junior", separated by commas
+% and with an "and" before the last (but ending with "et~al." if the last
+% of multiple authors is "others"). This function's argument should always
+% contain at least one name.
+%
+% VAR: nameptr, namesleft, numnames: INTEGER
+% pseudoVAR: nameresult: STRING (it's what's accumulated on the stack)
+%
+% format.names(s) ==
+% BEGIN
+% nameptr := 1
+% numnames := num.names$(s)
+% namesleft := numnames
+% while namesleft > 0
+% do
+% % for full names:
+% t := format.name$(s, nameptr, "{ff~}{vv~}{ll}{, jj}")
+% % for abbreviated first names:
+% t := format.name$(s, nameptr, "{f.~}{vv~}{ll}{, jj}")
+% if nameptr > 1 then
+% if namesleft > 1 then nameresult := nameresult * ", " * t
+% else if numnames > 2
+% then nameresult := nameresult * ","
+% fi
+% if t = "others"
+% then nameresult := nameresult * " et~al."
+% else nameresult := nameresult * " and " * t
+% fi
+% fi
+% else nameresult := t
+% fi
+% nameptr := nameptr + 1
+% namesleft := namesleft - 1
+% od
+% return nameresult
+% END
+%
+% The format.authors function returns the result of format.names(author)
+% if the author is present, or else it returns the null string
+%
+% format.authors ==
+% BEGIN
+% if empty$(author) then return ""
+% else return format.names(author)
+% fi
+% END
+%
+% Format.editors is like format.authors, but it uses the editor field,
+% and appends ", editor" or ", editors"
+%
+% format.editors ==
+% BEGIN
+% if empty$(editor) then return ""
+% else
+% if num.names$(editor) > 1 then
+% return format.names(editor) * ", editors"
+% else
+% return format.names(editor) * ", editor"
+% fi
+% fi
+% END
+%
+% Other formatting functions are similar, so no "comment version" will be
+% given for them.
+%
+% The `pop$' in this function gets rid of the duplicate `empty' value and
+% the `skip$' returns the duplicate field value
+
+FUNCTION {field.or.null}
+{ duplicate$ empty$
+ { pop$ "" }
+ 'skip$
+ if$
+}
+
+FUNCTION {emphasize}
+{ duplicate$ empty$
+ { pop$ "" }
+ { "{\em " swap$ * "}" * }
+ if$
+}
+
+INTEGERS { nameptr namesleft numnames }
+
+FUNCTION {format.names}
+{ 's :=
+ #1 'nameptr :=
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+#if NAME_FULL
+ { s nameptr "{ff~}{vv~}{ll}{, jj}" format.name$ 't :=
+#else
+ { s nameptr "{f.~}{vv~}{ll}{, jj}" format.name$ 't :=
+#endif NAME_FULL
+ nameptr #1 >
+ { namesleft #1 >
+ { ", " * t * }
+ { numnames #2 >
+ { "," * }
+ 'skip$
+ if$
+ t "others" =
+ { " et~al." * }
+ { " and " * t * }
+ if$
+ }
+ if$
+ }
+ 't
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+}
+
+FUNCTION {format.authors}
+{ author empty$
+ { "" }
+ { author format.names }
+ if$
+}
+
+FUNCTION {format.editors}
+{ editor empty$
+ { "" }
+ { editor format.names
+ editor num.names$ #1 >
+ { ", editors" * }
+ { ", editor" * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.isbn}
+{ isbn empty$
+ { "" }
+ { new.block "ISBN " isbn * }
+ if$
+}
+
+FUNCTION {format.issn}
+{ issn empty$
+ { "" }
+ { new.block "ISSN " issn * }
+ if$
+}
+
+% The format.title function is used for non-book-like titles.
+% For most styles we convert to lowercase (except for the very first letter,
+% and except for the first one after a colon (followed by whitespace)),
+% and hope the user has brace-surrounded words that need to stay capitilized;
+% for some styles, however, we leave it as it is in the database.
+
+FUNCTION {format.title}
+{ title empty$
+ { "" }
+#if ATIT_LOWER
+ { title "t" change.case$ }
+#else
+ 'title
+#endif ATIT_LOWER
+ if$
+}
+
+% By default, BibTeX sets the global integer variable global.max$ to the BibTeX
+% constant glob_str_size, the maximum length of a global string variable.
+% Analogously, BibTeX sets the global integer variable entry.max$ to
+% ent_str_size, the maximum length of an entry string variable.
+% The style designer may change these if necessary (but this is unlikely)
+
+% The n.dashify function makes each single `-' in a string a double `--'
+% if it's not already
+%
+% pseudoVAR: pageresult: STRING (it's what's accumulated on the stack)
+%
+% n.dashify(s) ==
+% BEGIN
+% t := s
+% pageresult := ""
+% while (not empty$(t))
+% do
+% if (first character of t = "-")
+% then
+% if (next character isn't)
+% then
+% pageresult := pageresult * "--"
+% t := t with the "-" removed
+% else
+% while (first character of t = "-")
+% do
+% pageresult := pageresult * "-"
+% t := t with the "-" removed
+% od
+% fi
+% else
+% pageresult := pageresult * the first character
+% t := t with the first character removed
+% fi
+% od
+% return pageresult
+% END
+
+FUNCTION {n.dashify}
+{ 't :=
+ ""
+ { t empty$ not }
+ { t #1 #1 substring$ "-" =
+ { t #1 #2 substring$ "--" = not
+ { "--" *
+ t #2 global.max$ substring$ 't :=
+ }
+ { { t #1 #1 substring$ "-" = }
+ { "-" *
+ t #2 global.max$ substring$ 't :=
+ }
+ while$
+ }
+ if$
+ }
+ { t #1 #1 substring$ *
+ t #2 global.max$ substring$ 't :=
+ }
+ if$
+ }
+ while$
+}
+
+% The format.date function is for the month and year, but we give a warning if
+% there's an empty year but the month is there, and we return the empty string
+% if they're both empty.
+
+FUNCTION {format.date}
+{ year empty$
+ { month empty$
+ { "" }
+ { "there's a month but no year in " cite$ * warning$
+ month
+ }
+ if$
+ }
+ { month empty$
+ 'year
+ { month " " * year * }
+ if$
+ }
+ if$
+}
+
+% The format.btitle is for formatting the title field when it is a book-like
+% entry---the style used here keeps it in uppers-and-lowers and emphasizes it.
+
+FUNCTION {format.btitle}
+{ title emphasize
+}
+
+% For several functions we'll need to connect two strings with a
+% tie (~) if the second one isn't very long (fewer than 3 characters).
+% The tie.or.space.connect function does that. It concatenates the two
+% strings on top of the stack, along with either a tie or space between
+% them, and puts this concatenation back onto the stack:
+%
+% tie.or.space.connect(str1,str2) ==
+% BEGIN
+% if text.length$(str2) < 3
+% then return the concatenation of str1, "~", and str2
+% else return the concatenation of str1, " ", and str2
+% END
+
+FUNCTION {tie.or.space.connect}
+{ duplicate$ text.length$ #3 <
+ { "~" }
+ { " " }
+ if$
+ swap$ * *
+}
+
+% The either.or.check function complains if both fields or an either-or pair
+% are nonempty.
+%
+% either.or.check(t,s) ==
+% BEGIN
+% if empty$(s) then
+% warning$(can't use both " * t * " fields in " * cite$)
+% fi
+% END
+
+FUNCTION {either.or.check}
+{ empty$
+ 'pop$
+ { "can't use both " swap$ * " fields in " * cite$ * warning$ }
+ if$
+}
+
+% The format.bvolume function is for formatting the volume and perhaps
+% series name of a multivolume work. If both a volume and a series field
+% are there, we assume the series field is the title of the whole multivolume
+% work (the title field should be the title of the thing being referred to),
+% and we add an "of <series>". This function is called in mid-sentence.
+
+FUNCTION {format.bvolume}
+{ volume empty$
+ { "" }
+ { "volume" volume tie.or.space.connect
+ series empty$
+ 'skip$
+ { " of " * series emphasize * }
+ if$
+ "volume and number" number either.or.check
+ }
+ if$
+}
+
+% The format.number.series function is for formatting the series name
+% and perhaps number of a work in a series. This function is similar to
+% format.bvolume, although for this one the series must exist (and the
+% volume must not exist). If the number field is empty we output either
+% the series field unchanged if it exists or else the null string.
+% If both the number and series fields are there we assume the series field
+% gives the name of the whole series (the title field should be the title
+% of the work being one referred to), and we add an "in <series>".
+% We capitilize Number when this function is used at the beginning of a block.
+
+FUNCTION {format.number.series}
+{ volume empty$
+ { number empty$
+ { series field.or.null }
+ { output.state mid.sentence =
+ { "number" }
+ { "Number" }
+ if$
+ number tie.or.space.connect
+ series empty$
+ { "there's a number but no series in " cite$ * warning$ }
+ { " in " * series * }
+ if$
+ }
+ if$
+ }
+ { "" }
+ if$
+}
+
+% The format.edition function appends " edition" to the edition, if present.
+% We lowercase the edition (it should be something like "Third"), because
+% this doesn't start a sentence.
+
+FUNCTION {format.edition}
+{ edition empty$
+ { "" }
+ { output.state mid.sentence =
+ { edition "l" change.case$ " edition" * }
+ { edition "t" change.case$ " edition" * }
+ if$
+ }
+ if$
+}
+
+% The format.pages function is used for formatting a page range in a book
+% (and in rare circumstances, an article).
+%
+% The multi.page.check function examines the page field for a "-" or "," or "+"
+% so that format.pages can use "page" instead of "pages" if none exists.
+% Note: global.max$ here means "take the rest of the string"
+%
+% VAR: multiresult: INTEGER (actually, a boolean)
+%
+% multi.page.check(s) ==
+% BEGIN
+% t := s
+% multiresult := false
+% while ((not multiresult) and (not empty$(t)))
+% do
+% if (first character of t = "-" or "," or "+")
+% then multiresult := true
+% else t := t with the first character removed
+% fi
+% od
+% return multiresult
+% END
+
+INTEGERS { multiresult }
+
+FUNCTION {multi.page.check}
+{ 't :=
+ #0 'multiresult :=
+ { multiresult not
+ t empty$ not
+ and
+ }
+ { t #1 #1 substring$
+ duplicate$ "-" =
+ swap$ duplicate$ "," =
+ swap$ "+" =
+ or or
+ { #1 'multiresult := }
+ { t #2 global.max$ substring$ 't := }
+ if$
+ }
+ while$
+ multiresult
+}
+
+% This function doesn't begin a sentence so "pages" isn't capitalized.
+% Other functions that use this should keep that in mind.
+
+FUNCTION {format.pages}
+{ pages empty$
+ { "" }
+ { pages multi.page.check
+ { "pages" pages n.dashify tie.or.space.connect }
+ { "page" pages tie.or.space.connect }
+ if$
+ }
+ if$
+}
+
+% The format.vol.num.pages function is for the volume, number, and page range
+% of a journal article. We use the format: vol(number):pages, with some
+% variations for empty fields. This doesn't begin a sentence.
+
+FUNCTION {format.vol.num.pages}
+{ volume field.or.null
+ number empty$
+ 'skip$
+ { "\penalty0 (" number * ")" * *
+ volume empty$
+ { "there's a number but no volume in " cite$ * warning$ }
+ 'skip$
+ if$
+ }
+ if$
+ pages empty$
+ 'skip$
+ { duplicate$ empty$
+ { pop$ format.pages }
+ { ":\penalty0 " * pages n.dashify * }
+ if$
+ }
+ if$
+}
+
+
+% The format.chapter.pages, if the chapter is present, puts whatever is in the
+% type field (or else "chapter" if type is empty) in front of a chapter number.
+% It then appends the pages, if present. This doesn't begin a sentence.
+
+FUNCTION {format.chapter.pages}
+{ chapter empty$
+ 'format.pages
+ { type empty$
+ { "chapter" }
+ { type "l" change.case$ }
+ if$
+ chapter tie.or.space.connect
+ pages empty$
+ 'skip$
+ { ", " * format.pages * }
+ if$
+ }
+ if$
+}
+
+% The format.in.ed.booktitle function is used for starting out a sentence
+% that begins "In <booktitle>", putting an editor before the title if one
+% exists.
+
+FUNCTION {format.in.ed.booktitle}
+{ booktitle empty$
+ { "" }
+ { editor empty$
+ { "In " booktitle emphasize * }
+ { "In " format.editors * ", " * booktitle emphasize * }
+ if$
+ }
+ if$
+}
+
+% The function empty.misc.check complains if all six fields are empty, and
+% if there's been no sorting or alphabetic-label complaint.
+
+FUNCTION {empty.misc.check}
+{ author empty$ title empty$ howpublished empty$
+ month empty$ year empty$ note empty$
+ and and and and and
+#if SORTED
+ key empty$ not and
+#else !SORTED
+#if LAB_ALPH
+ key empty$ not and
+#endif LAB_ALPH
+#endif SORTED
+ { "all relevant fields are empty in " cite$ * warning$ }
+ 'skip$
+ if$
+}
+
+% The function format.thesis.type returns either the (case-changed) type field,
+% if it is defined, or else the default string already on the stack
+% (like "Master's thesis" or "PhD thesis").
+
+FUNCTION {format.thesis.type}
+{ type empty$
+ 'skip$
+ { pop$
+ type "t" change.case$
+ }
+ if$
+}
+
+% The function format.tr.number makes a string starting with "Technical Report"
+% (or type, if that field is defined), followed by the number if there is one;
+% it returns the starting part (with a case change) even if there is no number.
+% This is used at the beginning of a sentence.
+
+FUNCTION {format.tr.number}
+{ type empty$
+ { "Technical Report" }
+ 'type
+ if$
+ number empty$
+ { "t" change.case$ }
+ { number tie.or.space.connect }
+ if$
+}
+
+% Now come the cross-referencing functions (these are invoked because
+% one entry in the database file(s) cross-references another, by giving
+% the other entry's database key in a `crossref' field). This feature
+% allows one or more titled things that are part of a larger titled
+% thing to cross-reference the larger thing. These styles allow for
+% five posibilities: (1) an ARTICLE may cross-reference an ARTICLE;
+% (2) a BOOK, (3) INBOOK, or (4) INCOLLECTION may cross-reference a BOOK;
+% or (5) an INPROCEEDINGS may cross-reference a PROCEEDINGS.
+% Each of these is explained in more detail later.
+%
+% An ARTICLE entry type may cross reference another ARTICLE (this is
+% intended for when an entire journal is devoted to a single topic---
+% but since there is no JOURNAL entry type, the journal, too, should be
+% classified as an ARTICLE but without the author and title fields).
+% This will result in two warning messages for the journal's entry
+% if it's included in the reference list, but such is life.
+%
+% format.article.crossref ==
+% BEGIN
+% if empty$(key) then
+% if empty$(journal) then
+% warning$("need key or journal for " * cite$ *
+% " to crossref " * crossref)
+% return(" \cite{" * crossref * "}")
+% else
+% return("In " * emphasize.correct (journal) *
+% " \cite{" * crossref * "}")
+% fi
+% else
+% return("In " * key * " \cite{" * crossref * "}")
+% fi
+% END
+%
+% The other cross-referencing functions are similar, so no "comment version"
+% will be given for them.
+
+FUNCTION {format.article.crossref}
+{ key empty$
+ { journal empty$
+ { "need key or journal for " cite$ * " to crossref " * crossref *
+ warning$
+ ""
+ }
+ { "In {\em " journal * "\/}" * }
+ if$
+ }
+ { "In " key * }
+ if$
+ " \cite{" * crossref * "}" *
+}
+
+% We use just the last names of editors for a cross reference: either
+% "editor", or "editor1 and editor2", or "editor1 et~al." depending on
+% whether there are one, or two, or more than two editors.
+
+FUNCTION {format.crossref.editor}
+{ editor #1 "{vv~}{ll}" format.name$
+ editor num.names$ duplicate$
+ #2 >
+ { pop$ " et~al." * }
+ { #2 <
+ 'skip$
+ { editor #2 "{ff }{vv }{ll}{ jj}" format.name$ "others" =
+ { " et~al." * }
+ { " and " * editor #2 "{vv~}{ll}" format.name$ * }
+ if$
+ }
+ if$
+ }
+ if$
+}
+
+% A BOOK (or INBOOK) entry type (assumed to be for a single volume in a
+% multivolume work) may cross reference another BOOK (the entire multivolume).
+% Usually there will be an editor, in which case we use that to construct the
+% cross reference; otherwise we use a nonempty key field or else the series
+% field (since the series gives the title of the multivolume work).
+
+FUNCTION {format.book.crossref}
+{ volume empty$
+ { "empty volume in " cite$ * "'s crossref of " * crossref * warning$
+ "In "
+ }
+ { "Volume" volume tie.or.space.connect
+ " of " *
+ }
+ if$
+ editor empty$
+ editor field.or.null author field.or.null =
+ or
+ { key empty$
+ { series empty$
+ { "need editor, key, or series for " cite$ * " to crossref " *
+ crossref * warning$
+ "" *
+ }
+ { "{\em " * series * "\/}" * }
+ if$
+ }
+ { key * }
+ if$
+ }
+ { format.crossref.editor * }
+ if$
+ " \cite{" * crossref * "}" *
+}
+
+% An INCOLLECTION entry type may cross reference a BOOK (assumed to be the
+% collection), or an INPROCEEDINGS may cross reference a PROCEEDINGS.
+% Often there will be an editor, in which case we use that to construct
+% the cross reference; otherwise we use a nonempty key field or else
+% the booktitle field (which gives the cross-referenced work's title).
+
+FUNCTION {format.incoll.inproc.crossref}
+{ editor empty$
+ editor field.or.null author field.or.null =
+ or
+ { key empty$
+ { booktitle empty$
+ { "need editor, key, or booktitle for " cite$ * " to crossref " *
+ crossref * warning$
+ ""
+ }
+ { "In {\em " booktitle * "\/}" * }
+ if$
+ }
+ { "In " key * }
+ if$
+ }
+ { "In " format.crossref.editor * }
+ if$
+ " \cite{" * crossref * "}" *
+}
+
+% Now we define the type functions for all entry types that may appear
+% in the .BIB file---e.g., functions like `article' and `book'. These
+% are the routines that actually generate the .BBL-file output for
+% the entry. These must all precede the READ command. In addition, the
+% style designer should have a function `default.type' for unknown types.
+% Note: The fields (within each list) are listed in order of appearance,
+% except as described for an `inbook' or a `proceedings'.
+%
+% The article function is for an article in a journal. An article may
+% CROSSREF another article.
+% Required fields: author, title, journal, year
+% Optional fields: volume, number, pages, month, note
+%
+% article ==
+% BEGIN
+% output.bibitem
+% output.check(format.authors,"author")
+% new.block
+% output.check(format.title,"title")
+% new.block
+% if missing$(crossref) then
+% output.check(emphasize(journal),"journal")
+% output(format.vol.num.pages)
+% output.check(format.date,"year")
+% else
+% output.nonnull(format.article.crossref)
+% output(format.pages)
+% fi
+% new.block
+% output(note)
+% fin.entry
+% END
+%
+% The book function is for a whole book. A book may CROSSREF another book.
+% Required fields: author or editor, title, publisher, year
+% Optional fields: volume or number, series, address, edition, month,
+% note
+%
+% book ==
+% BEGIN
+% if empty$(author) then output.check(format.editors,"author and editor")
+% else output.check(format.authors,"author")
+% if missing$(crossref) then
+% either.or.check("author and editor",editor)
+% fi
+% fi
+% new.block
+% output.check(format.btitle,"title")
+% if missing$(crossref) then
+% output(format.bvolume)
+% new.block
+% output(format.number.series)
+% new.sentence
+% output.check(publisher,"publisher")
+% output(address)
+% else
+% new.block
+% output.nonnull(format.book.crossref)
+% fi
+% output(format.edition)
+% output.check(format.date,"year")
+% new.block
+% output(note)
+% fin.entry
+% END
+%
+% The other entry functions are all quite similar, so no "comment version"
+% will be given for them.
+
+FUNCTION {article}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.title "title" output.check
+ new.block
+ crossref missing$
+ { journal emphasize "journal" output.check
+ format.vol.num.pages output
+ format.date "year" output.check
+ }
+ { format.article.crossref output.nonnull
+ format.pages output
+ }
+ if$
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {book}
+{ output.bibitem
+ author empty$
+ { format.editors "author and editor" output.check }
+ { format.authors output.nonnull
+ crossref missing$
+ { "author and editor" editor either.or.check }
+ 'skip$
+ if$
+ }
+ if$
+ new.block
+ format.btitle "title" output.check
+ crossref missing$
+ { format.bvolume output
+ new.block
+ format.number.series output
+ new.sentence
+ publisher "publisher" output.check
+ address output
+ }
+ { new.block
+ format.book.crossref output.nonnull
+ }
+ if$
+ format.edition output
+ format.date "year" output.check
+ format.isbn output
+ new.block
+ note output
+ fin.entry
+}
+
+% A booklet is a bound thing without a publisher or sponsoring institution.
+% Required: title
+% Optional: author, howpublished, address, month, year, note
+
+FUNCTION {booklet}
+{ output.bibitem
+ format.authors output
+ new.block
+ format.title "title" output.check
+ howpublished address new.block.checkb
+ howpublished output
+ address output
+ format.date output
+ format.isbn output
+ new.block
+ note output
+ fin.entry
+}
+
+% For the conference entry type, see inproceedings.
+
+% An inbook is a piece of a book: either a chapter and/or a page range.
+% It may CROSSREF a book. If there's no volume field, the type field
+% will come before number and series.
+% Required: author or editor, title, chapter and/or pages, publisher,year
+% Optional: volume or number, series, type, address, edition, month, note
+
+FUNCTION {inbook}
+{ output.bibitem
+ author empty$
+ { format.editors "author and editor" output.check }
+ { format.authors output.nonnull
+ crossref missing$
+ { "author and editor" editor either.or.check }
+ 'skip$
+ if$
+ }
+ if$
+ new.block
+ format.btitle "title" output.check
+ crossref missing$
+ { format.bvolume output
+ format.chapter.pages "chapter and pages" output.check
+ new.block
+ format.number.series output
+ new.sentence
+ publisher "publisher" output.check
+ address output
+ }
+ { format.chapter.pages "chapter and pages" output.check
+ new.block
+ format.book.crossref output.nonnull
+ }
+ if$
+ format.edition output
+ format.date "year" output.check
+ format.isbn output
+ new.block
+ note output
+ fin.entry
+}
+
+% An incollection is like inbook, but where there is a separate title
+% for the referenced thing (and perhaps an editor for the whole).
+% An incollection may CROSSREF a book.
+% Required: author, title, booktitle, publisher, year
+% Optional: editor, volume or number, series, type, chapter, pages,
+% address, edition, month, note
+
+FUNCTION {incollection}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.title "title" output.check
+ new.block
+ crossref missing$
+ { format.in.ed.booktitle "booktitle" output.check
+ format.bvolume output
+ format.number.series output
+ format.chapter.pages output
+ new.sentence
+ publisher "publisher" output.check
+ address output
+ format.edition output
+ format.date "year" output.check
+ }
+ { format.incoll.inproc.crossref output.nonnull
+ format.chapter.pages output
+ }
+ if$
+ format.isbn output
+ new.block
+ note output
+ fin.entry
+}
+
+% An inproceedings is an article in a conference proceedings, and it may
+% CROSSREF a proceedings. If there's no address field, the month (& year)
+% will appear just before note.
+% Required: author, title, booktitle, year
+% Optional: editor, volume or number, series, pages, address, month,
+% organization, publisher, note
+
+FUNCTION {inproceedings}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.title "title" output.check
+ new.block
+ crossref missing$
+ { format.in.ed.booktitle "booktitle" output.check
+ format.bvolume output
+ format.number.series output
+ format.pages output
+ address empty$
+ { organization publisher new.sentence.checkb
+ organization output
+ publisher output
+ format.date "year" output.check
+ }
+ { address output.nonnull
+ format.date "year" output.check
+ new.sentence
+ organization output
+ publisher output
+ }
+ if$
+ }
+ { format.incoll.inproc.crossref output.nonnull
+ format.pages output
+ }
+ if$
+ format.isbn output
+ new.block
+ note output
+ fin.entry
+}
+
+% The conference function is included for Scribe compatibility.
+
+FUNCTION {conference} { inproceedings }
+
+% A manual is technical documentation.
+% Required: title
+% Optional: author, organization, address, edition, month, year, note
+
+FUNCTION {manual}
+{ output.bibitem
+ author empty$
+ { organization empty$
+ 'skip$
+ { organization output.nonnull
+ address output
+ }
+ if$
+ }
+ { format.authors output.nonnull }
+ if$
+ new.block
+ format.btitle "title" output.check
+ author empty$
+ { organization empty$
+ { address new.block.checka
+ address output
+ }
+ 'skip$
+ if$
+ }
+ { organization address new.block.checkb
+ organization output
+ address output
+ }
+ if$
+ format.edition output
+ format.date output
+ new.block
+ note output
+ fin.entry
+}
+
+% A mastersthesis is a Master's thesis.
+% Required: author, title, school, year
+% Optional: type, address, month, note
+
+FUNCTION {mastersthesis}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.title "title" output.check
+ new.block
+ "Master's thesis" format.thesis.type output.nonnull
+ school "school" output.check
+ address output
+ format.date "year" output.check
+ new.block
+ note output
+ fin.entry
+}
+
+% A misc is something that doesn't fit elsewhere.
+% Required: at least one of the `optional' fields
+% Optional: author, title, howpublished, month, year, note
+
+FUNCTION {misc}
+{ output.bibitem
+ format.authors output
+ title howpublished new.block.checkb
+ format.title output
+ howpublished new.block.checka
+ howpublished output
+ format.date output
+ format.issn output
+ new.block
+ note output
+ fin.entry
+ empty.misc.check
+}
+
+% A phdthesis is like a mastersthesis.
+% Required: author, title, school, year
+% Optional: type, address, month, note
+
+FUNCTION {phdthesis}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.btitle "title" output.check
+ new.block
+ "PhD thesis" format.thesis.type output.nonnull
+ school "school" output.check
+ address output
+ format.date "year" output.check
+ new.block
+ note output
+ fin.entry
+}
+
+% A periodical is a publication that appears at regular
+% intervals. This includes journals, magazines, and newspapers.
+% If there is an organization but no editor field, the
+% organization will appear as the first optional field (we try to
+% make the first block nonempty); if there's no address field,
+% the month (& year) will appear just before note.
+% Required: title, key
+% Optional: editor, volume, number, series, address, month, year,
+% organization, publisher, note, issn,
+% howpublished
+
+FUNCTION {periodical}
+{ output.bibitem
+ editor empty$
+ { organization output }
+ { format.editors output.nonnull }
+ if$
+ new.block
+ title emphasize "title" output.check
+% format.bvolume output
+% format.number.series output
+ format.vol.num.pages output
+ format.date output
+ format.issn output
+ new.sentence
+ publisher output
+ address output
+ howpublished new.block.checka
+ howpublished output
+ new.block
+ note output
+ fin.entry
+}
+
+% A proceedings is a conference proceedings.
+% If there is an organization but no editor field, the organization will
+% appear as the first optional field (we try to make the first block nonempty);
+% if there's no address field, the month (& year) will appear just before note.
+% Required: title, year
+% Optional: editor, volume or number, series, address, month,
+% organization, publisher, note
+
+FUNCTION {proceedings}
+{ output.bibitem
+ editor empty$
+ { organization output }
+ { format.editors output.nonnull }
+ if$
+ new.block
+ format.btitle "title" output.check
+ format.bvolume output
+ format.number.series output
+ address empty$
+ { editor empty$
+ { publisher new.sentence.checka }
+ { organization publisher new.sentence.checkb
+ organization output
+ }
+ if$
+ publisher output
+ format.date "year" output.check
+ }
+ { address output.nonnull
+ format.date "year" output.check
+ new.sentence
+ editor empty$
+ 'skip$
+ { organization output }
+ if$
+ publisher output
+ }
+ if$
+ format.isbn output
+ new.block
+ note output
+ fin.entry
+}
+
+% A techreport is a technical report.
+% Required: author, title, institution, year
+% Optional: type, number, address, month, note
+
+FUNCTION {techreport}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.title "title" output.check
+ new.block
+ format.tr.number output.nonnull
+ institution "institution" output.check
+ address output
+ format.date "year" output.check
+ new.block
+ note output
+ fin.entry
+}
+
+% An unpublished is something that hasn't been published.
+% Required: author, title, note
+% Optional: month, year
+
+FUNCTION {unpublished}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.title "title" output.check
+ new.block
+ note "note" output.check
+ format.date output
+ fin.entry
+}
+
+% We use entry type `misc' for an unknown type; BibTeX gives a warning.
+
+FUNCTION {default.type} { misc }
+
+% Here are macros for common things that may vary from style to style.
+% Users are encouraged to use these macros.
+%
+% Months are either written out in full or abbreviated
+
+#if MONTH_FULL
+
+MACRO {jan} {"January"}
+
+MACRO {feb} {"February"}
+
+MACRO {mar} {"March"}
+
+MACRO {apr} {"April"}
+
+MACRO {may} {"May"}
+
+MACRO {jun} {"June"}
+
+MACRO {jul} {"July"}
+
+MACRO {aug} {"August"}
+
+MACRO {sep} {"September"}
+
+MACRO {oct} {"October"}
+
+MACRO {nov} {"November"}
+
+MACRO {dec} {"December"}
+
+#else !MONTH_FULL
+
+MACRO {jan} {"Jan."}
+
+MACRO {feb} {"Feb."}
+
+MACRO {mar} {"Mar."}
+
+MACRO {apr} {"Apr."}
+
+MACRO {may} {"May"}
+
+MACRO {jun} {"June"}
+
+MACRO {jul} {"July"}
+
+MACRO {aug} {"Aug."}
+
+MACRO {sep} {"Sept."}
+
+MACRO {oct} {"Oct."}
+
+MACRO {nov} {"Nov."}
+
+MACRO {dec} {"Dec."}
+
+#endif MONTH_FULL
+
+% Journals are either written out in full or abbreviated;
+% the abbreviations are like those found in ACM publications.
+%
+% To get a completely different set of abbreviations, it may be best to make
+% a separate .bib file with nothing but those abbreviations; users could then
+% include that file name as the first argument to the \bibliography command
+
+#if JOUR_FULL
+
+MACRO {acmcs} {"ACM Computing Surveys"}
+
+MACRO {acta} {"Acta Informatica"}
+
+MACRO {cacm} {"Communications of the ACM"}
+
+MACRO {ibmjrd} {"IBM Journal of Research and Development"}
+
+MACRO {ibmsj} {"IBM Systems Journal"}
+
+MACRO {ieeese} {"IEEE Transactions on Software Engineering"}
+
+MACRO {ieeetc} {"IEEE Transactions on Computers"}
+
+MACRO {ieeetcad}
+ {"IEEE Transactions on Computer-Aided Design of Integrated Circuits"}
+
+MACRO {ipl} {"Information Processing Letters"}
+
+MACRO {jacm} {"Journal of the ACM"}
+
+MACRO {jcss} {"Journal of Computer and System Sciences"}
+
+MACRO {scp} {"Science of Computer Programming"}
+
+MACRO {sicomp} {"SIAM Journal on Computing"}
+
+MACRO {tocs} {"ACM Transactions on Computer Systems"}
+
+MACRO {tods} {"ACM Transactions on Database Systems"}
+
+MACRO {tog} {"ACM Transactions on Graphics"}
+
+MACRO {toms} {"ACM Transactions on Mathematical Software"}
+
+MACRO {toois} {"ACM Transactions on Office Information Systems"}
+
+MACRO {toplas} {"ACM Transactions on Programming Languages and Systems"}
+
+MACRO {tcs} {"Theoretical Computer Science"}
+
+#else !JOUR_FULL
+
+MACRO {acmcs} {"ACM Comput. Surv."}
+
+MACRO {acta} {"Acta Inf."}
+
+MACRO {cacm} {"Commun. ACM"}
+
+MACRO {ibmjrd} {"IBM J. Res. Dev."}
+
+MACRO {ibmsj} {"IBM Syst.~J."}
+
+MACRO {ieeese} {"IEEE Trans. Softw. Eng."}
+
+MACRO {ieeetc} {"IEEE Trans. Comput."}
+
+MACRO {ieeetcad}
+ {"IEEE Trans. Comput.-Aided Design Integrated Circuits"}
+
+MACRO {ipl} {"Inf. Process. Lett."}
+
+MACRO {jacm} {"J.~ACM"}
+
+MACRO {jcss} {"J.~Comput. Syst. Sci."}
+
+MACRO {scp} {"Sci. Comput. Programming"}
+
+MACRO {sicomp} {"SIAM J. Comput."}
+
+MACRO {tocs} {"ACM Trans. Comput. Syst."}
+
+MACRO {tods} {"ACM Trans. Database Syst."}
+
+MACRO {tog} {"ACM Trans. Gr."}
+
+MACRO {toms} {"ACM Trans. Math. Softw."}
+
+MACRO {toois} {"ACM Trans. Office Inf. Syst."}
+
+MACRO {toplas} {"ACM Trans. Prog. Lang. Syst."}
+
+MACRO {tcs} {"Theoretical Comput. Sci."}
+
+#endif JOUR_FULL
+
+% Now we read in the .BIB entries.
+
+READ
+
+% The sortify function converts to lower case after purify$ing; it's
+% used in sorting and in computing alphabetic labels after sorting
+%
+% The chop.word(w,len,s) function returns either s or, if the first len
+% letters of s equals w (this comparison is done in the third line of the
+% function's definition), it returns that part of s after w.
+
+#if SORTED
+
+FUNCTION {sortify}
+{ purify$
+ "l" change.case$
+}
+
+INTEGERS { len }
+
+FUNCTION {chop.word}
+{ 's :=
+ 'len :=
+ s #1 len substring$ =
+ { s len #1 + global.max$ substring$ }
+ 's
+ if$
+}
+
+#else !SORTED
+#if LAB_ALPH
+
+% We need the chop.word stuff for the dubious unsorted-list-with-labels case.
+
+INTEGERS { len }
+
+FUNCTION {chop.word}
+{ 's :=
+ 'len :=
+ s #1 len substring$ =
+ { s len #1 + global.max$ substring$ }
+ 's
+ if$
+}
+
+#endif LAB_ALPH
+#endif SORTED
+
+% This long comment applies only to alphabetic labels
+%
+% The format.lab.names function makes a short label by using the initials of
+% the von and Last parts of the names (but if there are more than four names,
+% (i.e., people) it truncates after three and adds a superscripted "+";
+% it also adds such a "+" if the last of multiple authors is "others").
+% If there is only one name, and its von and Last parts combined have just
+% a single name-token ("Knuth" has a single token, "Brinch Hansen" has two),
+% we take the first three letters of the last name. The boolean
+% et.al.char.used tells whether we've used a superscripted "+", so that we
+% know whether to include a LaTeX macro for it.
+%
+% format.lab.names(s) ==
+% BEGIN
+% numnames := num.names$(s)
+% if numnames > 1 then
+% if numnames > 4 then
+% namesleft := 3
+% else
+% namesleft := numnames
+% nameptr := 1
+% nameresult := ""
+% while namesleft > 0
+% do
+% if (name_ptr = numnames) and
+% format.name$(s, nameptr, "{ff }{vv }{ll}{ jj}") = "others"
+% then nameresult := nameresult * "{\etalchar{+}}"
+% et.al.char.used := true
+% else nameresult := nameresult *
+% format.name$(s, nameptr, "{v{}}{l{}}")
+% nameptr := nameptr + 1
+% namesleft := namesleft - 1
+% od
+% if numnames > 4 then
+% nameresult := nameresult * "{\etalchar{+}}"
+% et.al.char.used := true
+% else
+% t := format.name$(s, 1, "{v{}}{l{}}")
+% if text.length$(t) < 2 then % there's just one name-token
+% nameresult := text.prefix$(format.name$(s,1,"{ll}"),3)
+% else
+% nameresult := t
+% fi
+% fi
+% return nameresult
+% END
+%
+% Exactly what fields we look at in constructing the primary part of the label
+% depends on the entry type; this selectivity (as opposed to, say, always
+% looking at author, then editor, then key) helps ensure that "ignored" fields,
+% as described in the LaTeX book, really are ignored. Note that MISC is part
+% of the deepest `else' clause in the nested part of calc.label; thus, any
+% unrecognized entry type in the database is handled correctly.
+%
+% There is one auxiliary function for each of the four different sequences of
+% fields we use. The first of these functions looks at the author field, and
+% then, if necessary, the key field. The other three functions, which might
+% look at two fields and the key field, are similar, except that the key field
+% takes precedence over the organization field (for labels---not for sorting).
+%
+% The calc.label function calculates the preliminary label of an entry, which
+% is formed by taking three letters of information from the author or editor or
+% key or organization field (depending on the entry type and on what's empty,
+% but ignoring a leading "The " in the organization), and appending the last
+% two characters (digits) of the year. It is an error if the appropriate fields
+% among author, editor, organization, and key are missing, and we use
+% the first three letters of the cite$ in desperation when this happens.
+% The resulting label has the year part, but not the name part, purify$ed
+% (purify$ing the year allows some sorting shenanigans by the user).
+%
+% This function also calculates the version of the label to be used in sorting.
+%
+% The final label may need a trailing 'a', 'b', etc., to distinguish it from
+% otherwise identical labels, but we can't calculated those "extra.label"s
+% until after sorting.
+%
+% calc.label ==
+% BEGIN
+% if type$ = "book" or "inbook" then
+% author.editor.key.label
+% else if type$ = "proceedings" then
+% editor.key.organization.label
+% else if type$ = "manual" then
+% author.key.organization.label
+% else
+% author.key.label
+% fi fi fi
+% label := label * substring$(purify$(field.or.null(year)), -1, 2)
+% % assuming we will also sort, we calculate a sort.label
+% sort.label := sortify(label), but use the last four, not two, digits
+% END
+
+#if LAB_ALPH
+
+INTEGERS { et.al.char.used }
+
+FUNCTION {initialize.et.al.char.used}
+{ #0 'et.al.char.used :=
+}
+
+EXECUTE {initialize.et.al.char.used}
+
+FUNCTION {format.lab.names}
+{ 's :=
+ s num.names$ 'numnames :=
+ numnames #1 >
+ { numnames #4 >
+ { #3 'namesleft := }
+ { numnames 'namesleft := }
+ if$
+ #1 'nameptr :=
+ ""
+ { namesleft #0 > }
+ { nameptr numnames =
+ { s nameptr "{ff }{vv }{ll}{ jj}" format.name$ "others" =
+ { "{\etalchar{+}}" *
+ #1 'et.al.char.used :=
+ }
+ { s nameptr "{v{}}{l{}}" format.name$ * }
+ if$
+ }
+ { s nameptr "{v{}}{l{}}" format.name$ * }
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+ numnames #4 >
+ { "{\etalchar{+}}" *
+ #1 'et.al.char.used :=
+ }
+ 'skip$
+ if$
+ }
+ { s #1 "{v{}}{l{}}" format.name$
+ duplicate$ text.length$ #2 <
+ { pop$ s #1 "{ll}" format.name$ #3 text.prefix$ }
+ 'skip$
+ if$
+ }
+ if$
+}
+
+FUNCTION {author.key.label}
+{ author empty$
+ { key empty$
+#if SORTED
+ { cite$ #1 #3 substring$ }
+#else !SORTED % need warning here because we won't give it later
+ { "for label, need author or key in " cite$ * warning$
+ cite$ #1 #3 substring$
+ }
+#endif SORTED
+ { key #3 text.prefix$ }
+ if$
+ }
+ { author format.lab.names }
+ if$
+}
+
+FUNCTION {author.editor.key.label}
+{ author empty$
+ { editor empty$
+ { key empty$
+#if SORTED
+ { cite$ #1 #3 substring$ }
+#else !SORTED % need warning here because we won't give it later
+ { "for label, need author, editor, or key in " cite$ * warning$
+ cite$ #1 #3 substring$
+ }
+#endif SORTED
+ { key #3 text.prefix$ }
+ if$
+ }
+ { editor format.lab.names }
+ if$
+ }
+ { author format.lab.names }
+ if$
+}
+
+FUNCTION {author.key.organization.label}
+{ author empty$
+ { key empty$
+ { organization empty$
+#if SORTED
+ { cite$ #1 #3 substring$ }
+#else !SORTED % need warning here because we won't give it later
+ { "for label, need author, key, or organization in " cite$ *
+ warning$
+ cite$ #1 #3 substring$
+ }
+#endif SORTED
+ { "The " #4 organization chop.word #3 text.prefix$ }
+ if$
+ }
+ { key #3 text.prefix$ }
+ if$
+ }
+ { author format.lab.names }
+ if$
+}
+
+FUNCTION {editor.key.organization.label}
+{ editor empty$
+ { key empty$
+ { organization empty$
+#if SORTED
+ { cite$ #1 #3 substring$ }
+#else !SORTED % need warning here because we won't give it later
+ { "for label, need editor, key, or organization in " cite$ *
+ warning$
+ cite$ #1 #3 substring$
+ }
+#endif SORTED
+ { "The " #4 organization chop.word #3 text.prefix$ }
+ if$
+ }
+ { key #3 text.prefix$ }
+ if$
+ }
+ { editor format.lab.names }
+ if$
+}
+
+FUNCTION {calc.label}
+{ type$ "book" =
+ type$ "inbook" =
+ or
+ 'author.editor.key.label
+ { type$ "proceedings" =
+ 'editor.key.organization.label
+ { type$ "manual" =
+ 'author.key.organization.label
+ 'author.key.label
+ if$
+ }
+ if$
+ }
+ if$
+ duplicate$
+ year field.or.null purify$ #-1 #2 substring$
+ *
+ 'label :=
+ year field.or.null purify$ #-1 #4 substring$
+ *
+ sortify 'sort.label :=
+}
+
+% It doesn't seem like a particularly good idea to use an order-of-citation
+% reference list when using alphabetic labels, but we need to have a
+% special pass to calculate labels when this happens.
+
+#if !SORTED
+
+ITERATE {calc.label}
+
+#endif !SORTED
+
+#endif LAB_ALPH
+
+% When sorting, we compute the sortkey by executing "presort" on each entry.
+% The presort key contains a number of "sortify"ed strings, concatenated
+% with multiple blanks between them. This makes things like "brinch per"
+% come before "brinch hansen per".
+%
+% The fields used here are: the sort.label for alphabetic labels (as set by
+% calc.label), followed by the author names (or editor names or organization
+% (with a leading "The " removed) or key field, depending on entry type and on
+% what's empty), followed by year, followed by the first bit of the title
+% (chopping off a leading "The ", "A ", or "An ").
+% Names are formatted: Von Last First Junior.
+% The names within a part will be separated by a single blank
+% (such as "brinch hansen"), two will separate the name parts themselves
+% (except the von and last), three will separate the names,
+% four will separate the names from year (and from label, if alphabetic),
+% and four will separate year from title.
+%
+% The sort.format.names function takes an argument that should be in
+% BibTeX name format, and returns a string containing " "-separated
+% names in the format described above. The function is almost the same
+% as format.names.
+
+#if SORTED
+
+FUNCTION {sort.format.names}
+{ 's :=
+ #1 'nameptr :=
+ ""
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ { nameptr #1 >
+ { " " * }
+ 'skip$
+ if$
+#if NAME_FULL
+ s nameptr "{vv{ } }{ll{ }}{ ff{ }}{ jj{ }}" format.name$ 't :=
+#else
+ s nameptr "{vv{ } }{ll{ }}{ f{ }}{ jj{ }}" format.name$ 't :=
+#endif NAME_FULL
+ nameptr numnames = t "others" = and
+ { "et al" * }
+ { t sortify * }
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+}
+
+% The sort.format.title function returns the argument,
+% but first any leading "A "'s, "An "'s, or "The "'s are removed.
+% The chop.word function uses s, so we need another string variable, t
+
+FUNCTION {sort.format.title}
+{ 't :=
+ "A " #2
+ "An " #3
+ "The " #4 t chop.word
+ chop.word
+ chop.word
+ sortify
+ #1 global.max$ substring$
+}
+
+% The auxiliary functions here, for the presort function, are analogous to
+% the ones for calc.label; the same comments apply, except that the
+% organization field takes precedence here over the key field. For sorting
+% purposes, we still remove a leading "The " from the organization field.
+
+FUNCTION {author.sort}
+{ author empty$
+ { key empty$
+ { "to sort, need author or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { author sort.format.names }
+ if$
+}
+
+FUNCTION {author.editor.sort}
+{ author empty$
+ { editor empty$
+ { key empty$
+ { "to sort, need author, editor, or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { editor sort.format.names }
+ if$
+ }
+ { author sort.format.names }
+ if$
+}
+
+FUNCTION {author.organization.sort}
+{ author empty$
+ { organization empty$
+ { key empty$
+ { "to sort, need author, organization, or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { "The " #4 organization chop.word sortify }
+ if$
+ }
+ { author sort.format.names }
+ if$
+}
+
+FUNCTION {editor.organization.sort}
+{ editor empty$
+ { organization empty$
+ { key empty$
+ { "to sort, need editor, organization, or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { "The " #4 organization chop.word sortify }
+ if$
+ }
+ { editor sort.format.names }
+ if$
+}
+
+% There is a limit, entry.max$, on the length of an entry string variable
+% (which is what its sort.key$ is), so we take at most that many characters
+% of the constructed key, and hope there aren't many references that match
+% to that many characters!
+
+FUNCTION {presort}
+#if LAB_ALPH
+{ calc.label
+ sort.label
+ " "
+ *
+ type$ "book" =
+#else !LAB_ALPH
+{ type$ "book" =
+#endif LAB_ALPH
+ type$ "inbook" =
+ or
+ 'author.editor.sort
+ { type$ "proceedings" =
+ 'editor.organization.sort
+ { type$ "manual" =
+ 'author.organization.sort
+ 'author.sort
+ if$
+ }
+ if$
+ }
+ if$
+#if LAB_ALPH
+ *
+#endif LAB_ALPH
+ " "
+ *
+ year field.or.null sortify
+ *
+ " "
+ *
+ title field.or.null
+ sort.format.title
+ *
+ #1 entry.max$ substring$
+ 'sort.key$ :=
+}
+
+ITERATE {presort}
+
+% And now we can sort
+
+SORT
+
+#endif SORTED
+
+% This long comment applies only to alphabetic labels, when sorted
+%
+% Now comes the final computation for alphabetic labels, putting in the 'a's
+% and 'b's and so forth if required. This involves two passes: a forward
+% pass to put in the 'b's, 'c's and so on, and a backwards pass
+% to put in the 'a's (we don't want to put in 'a's unless we know there
+% are 'b's).
+% We have to keep track of the longest (in width$ terms) label, for use
+% by the "thebibliography" environment.
+%
+% VAR: longest.label, last.sort.label, next.extra: string
+% longest.label.width, last.extra.num: integer
+%
+% initialize.longest.label ==
+% BEGIN
+% longest.label := ""
+% last.sort.label := int.to.chr$(0)
+% next.extra := ""
+% longest.label.width := 0
+% last.extra.num := 0
+% END
+%
+% forward.pass ==
+% BEGIN
+% if last.sort.label = sort.label then
+% last.extra.num := last.extra.num + 1
+% extra.label := int.to.chr$(last.extra.num)
+% else
+% last.extra.num := chr.to.int$("a")
+% extra.label := ""
+% last.sort.label := sort.label
+% fi
+% END
+%
+% reverse.pass ==
+% BEGIN
+% if next.extra = "b" then
+% extra.label := "a"
+% fi
+% label := label * extra.label
+% if width$(label) > longest.label.width then
+% longest.label := label
+% longest.label.width := width$(label)
+% fi
+% next.extra := extra.label
+% END
+
+#if LAB_ALPH
+
+#if SORTED
+
+STRINGS { longest.label last.sort.label next.extra }
+
+INTEGERS { longest.label.width last.extra.num }
+
+FUNCTION {initialize.longest.label}
+{ "" 'longest.label :=
+ #0 int.to.chr$ 'last.sort.label :=
+ "" 'next.extra :=
+ #0 'longest.label.width :=
+ #0 'last.extra.num :=
+}
+
+FUNCTION {forward.pass}
+{ last.sort.label sort.label =
+ { last.extra.num #1 + 'last.extra.num :=
+ last.extra.num int.to.chr$ 'extra.label :=
+ }
+ { "a" chr.to.int$ 'last.extra.num :=
+ "" 'extra.label :=
+ sort.label 'last.sort.label :=
+ }
+ if$
+}
+
+FUNCTION {reverse.pass}
+{ next.extra "b" =
+ { "a" 'extra.label := }
+ 'skip$
+ if$
+ label extra.label * 'label :=
+ label width$ longest.label.width >
+ { label 'longest.label :=
+ label width$ 'longest.label.width :=
+ }
+ 'skip$
+ if$
+ extra.label 'next.extra :=
+}
+
+EXECUTE {initialize.longest.label}
+
+ITERATE {forward.pass}
+
+REVERSE {reverse.pass}
+
+#else !SORTED
+
+% It still doesn't seem like a good idea to use an order-of-citation
+% reference list when using alphabetic labels, but when this happens we
+% must compute the longest label
+
+STRINGS { longest.label }
+
+INTEGERS { longest.label.width }
+
+FUNCTION {initialize.longest.label}
+{ "" 'longest.label :=
+ #0 'longest.label.width :=
+}
+
+FUNCTION {longest.label.pass}
+{ label width$ longest.label.width >
+ { label 'longest.label :=
+ label width$ 'longest.label.width :=
+ }
+ 'skip$
+ if$
+}
+
+EXECUTE {initialize.longest.label}
+
+ITERATE {longest.label.pass}
+
+#endif SORTED
+
+#else !LAB_ALPH
+
+% Now comes the computation for numeric labels.
+% We use either the sorted order or original order.
+% We still have to keep track of the longest (in width$ terms) label, for use
+% by the "thebibliography" environment.
+
+STRINGS { longest.label }
+
+INTEGERS { number.label longest.label.width }
+
+FUNCTION {initialize.longest.label}
+{ "" 'longest.label :=
+ #1 'number.label :=
+ #0 'longest.label.width :=
+}
+
+FUNCTION {longest.label.pass}
+{ number.label int.to.str$ 'label :=
+ number.label #1 + 'number.label :=
+ label width$ longest.label.width >
+ { label 'longest.label :=
+ label width$ 'longest.label.width :=
+ }
+ 'skip$
+ if$
+}
+
+EXECUTE {initialize.longest.label}
+
+ITERATE {longest.label.pass}
+
+#endif LAB_ALPH
+
+% Now we're ready to start writing the .BBL file.
+% We begin, if necessary, with a LaTeX macro for unnamed names in an alphabetic
+% label; next comes stuff from the `preamble' command in the database files.
+% Then we give an incantation containing the command
+% \begin{thebibliography}{...}
+% where the `...' is the longest label.
+%
+% We also call init.state.consts, for use by the output routines.
+
+FUNCTION {begin.bib}
+#if LAB_ALPH
+{ et.al.char.used
+ { "\newcommand{\etalchar}[1]{$^{#1}$}" write$ newline$ }
+ 'skip$
+ if$
+ preamble$ empty$
+#else !LAB_ALPH
+{ preamble$ empty$
+#endif LAB_ALPH
+ 'skip$
+ { preamble$ write$ newline$ }
+ if$
+ "\begin{thebibliography}{" longest.label * "}" * write$ newline$
+}
+
+EXECUTE {begin.bib}
+
+EXECUTE {init.state.consts}
+
+% Now we produce the output for all the entries
+
+ITERATE {call.type$}
+
+% Finally, we finish up by writing the `\end{thebibliography}' command.
+
+FUNCTION {end.bib}
+{ newline$
+ "\end{thebibliography}" write$ newline$
+}
+
+EXECUTE {end.bib}
diff --git a/biblio/bibtex/contrib/jmb/jmb.bst b/biblio/bibtex/contrib/jmb/jmb.bst
new file mode 100644
index 0000000000..5455f72645
--- /dev/null
+++ b/biblio/bibtex/contrib/jmb/jmb.bst
@@ -0,0 +1,1368 @@
+%%% ====================================================================
+%%% @BibTeX-style-file{
+%%% author = "Tom Schneider",
+%%% version = "1.21",
+%%% date = "29 June 1992",
+%%% time = "17:30:33 MDT",
+%%% filename = "jmb.bst",
+%%% address = "National Cancer Institute
+%%% Laboratory of Mathematical Biology
+%%% Frederick, Maryland 21701-1013
+%%% USA",
+%%% checksum = "11681 1368 4735 33144",
+%%% email = "toms@ncifcrf.gov (Internet)",
+%%% codetable = "ISO/ASCII",
+%%% keywords = "molecular biology, BibTeX",
+%%% supported = "yes",
+%%% docstring = "This BibTeX bibliography style is for the
+%%% Journal of Molecular Biology and Journal of
+%%% Theoretical Biology. This file is available
+%%% by anonymous ftp from ncifcrf.gov in
+%%% pub/delila.
+%%%
+%%% TITLES can be turned on and off! Just nocite
+%%% the reference TitlesOn in the paper (i.e.
+%%% \nocite{TitlesOn}) and have a bibliography
+%%% article in your database with that cite key!
+%%% Without titles is Journal of Molecular
+%%% Biology; With titles is Journal of
+%%% Theoretical Biology.
+%%%
+%%% WARNING: Since I use mostly article, book and
+%%% inproceedings, these are formatted pretty
+%%% closely to the Journal of Theoretical Biology
+%%% style while other things are neglected.
+%%% Also, I can't guarantee that the style is
+%%% exactly right.
+%%%
+%%% The following documentation is identical from
+%%% the source of jmb.bst, which was the
+%%% apalike.bst taken from the Clarkson archive
+%%% on 1989 June 19.
+%%%
+%%% The checksum field above contains a CRC-16
+%%% checksum as the first value, followed by the
+%%% equivalent of the standard UNIX wc (word
+%%% count) utility output of lines, words, and
+%%% characters. This is produced by Robert
+%%% Solovay's checksum utility."
+%%% }
+%%% ====================================================================
+
+% BibTex `jmb' bibliography style
+% version = 1.21 of jmb.bst 1992 June 29
+% Fix format.vol.num.pages to use field.or.null to
+% correctly handle case of missing volume.
+% [Nelson H. F. Beebe <beebe@plot79.math.utah.edu>]
+% version = 1.20 of jmb.bst 1990 November 16
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% BibTeX `apalike' bibliography style (24-Jan-88 version)
+% Adapted from the `alpha' style, version 0.99a; for BibTeX version 0.99a.
+% Copyright (C) 1988, all rights reserved.
+% Copying of this file is allowed, provided that if you make any changes at all
+% you name it something other than `apalike.bst'.
+% This restriction helps ensure that all copies are identical.
+% Differences between this style and `alpha' are generally heralded by a `%'.
+% The file btxbst.doc has the documentation for alpha.bst.
+%
+% This style should be used with the `apalike' LaTeX style (apalike.sty).
+% \cite's come out like "(Jones, 1986)" in the text but there are no labels
+% in the bibliography, and something like "(1986)" comes out immediately
+% after the author. Author (and editor) names appear as last name, comma,
+% initials. A `year' field is required for every entry, and so is either
+% an author (or in some cases, an editor) field or a key field.
+%
+% Editorial note:
+% Many journals require a style like `apalike', but I strongly, strongly,
+% strongly recommend that you not use it if you have a choice---use something
+% like `plain' instead. Mary-Claire van Leunen (A Handbook for Scholars,
+% Knopf, 1979) argues convincingly that a style like `plain' encourages better
+% writing than one like `apalike'. Furthermore the strongest arguments for
+% using an author-date style like `apalike'---that it's "the most practical"
+% (The Chicago Manual of Style, University of Chicago Press, thirteenth
+% edition, 1982, pages 400--401)---fall flat on their face with the new
+% computer-typesetting technology. For instance page 401 anachronistically
+% states "The chief disadvantage of [a style like `plain'] is that additions
+% or deletions cannot be made after the manuscript is typed without changing
+% numbers in both text references and list." LaTeX sidesteps the disadvantage.
+%
+% History:
+% 15-sep-86 (SK,OP) Original version, by Susan King and Oren Patashnik.
+% 10-nov-86 (OP) Truncated the sort.key$ string to the correct length
+% in bib.sort.order to eliminate error message.
+% 24-jan-88 (OP) Updated for BibTeX version 0.99a, from alpha.bst 0.99a;
+% apalike now sorts by author, then year, then title;
+% THIS `apalike' VERSION DOES NOT WORK WITH BIBTEX 0.98i.
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%
+% The program was further modified by Tom Schneider:
+%
+% 1989 June 19 (TDS) Renamed jmb.bst. Items that do not have years were
+% listed in the bibliography without identifiers. However, they
+% have identifiers in the text. The identifier was added.
+% Titles were removed :-(.
+
+% 1989 October 2 (TDS) Made labels in the paper use the & symbol rather
+% than `and', as required by JMB.
+% 1989 October 3 (TDS) Made et~al. be in italics.
+% Removed comma after journal name. (actually, all
+% mid sentence commas go!)
+% Made volume number be bold faced.
+% Converted colon (:) after volume number to a comma (,).
+% If a journal name does NOT end in a period, add
+% a comma after the name.
+% 1989 October 14 (TDS) Without a year the program used to sort on the
+% title. I made it sort on the cite$ if there is no year.
+% 1989 October 18 (TDS) If there is one reference without a year, put
+% an "a" at the end of its label, so that it comes out
+% as (Smith, a) in the text. in FUNCTION {forward.pass}
+% 1989 November 2 (TDS) Unpublished papers now give the title.
+% 1989 November 18 (TDS) TITLES can be turned on and off!
+% Just nocite the reference TitlesOn in the paper
+% and have a bibliography article in your database
+% with that cite key!
+% 1989 December 5 (TDS) I can't stand sorting to fall back on the
+% titles of the article - no control! So in function
+% bib.sort.order the default is now cite$.
+% 1990 November 14 (TDS) Changes to match JTB better:
+% Names in the bibliography are now connected
+% with "\&" instead of "and", since this fits JTB better.
+% "In" is now "In:".
+% "editors" and "editor" are now "eds" and "ed".
+% booktitle follows editors. editors in parenthesis.
+% pp. and p. instead of pages and page.
+% location followed by colon (:) and then publisher.
+
+ENTRY % declare variables that have a value for each entry on the list
+ { address
+ author
+ booktitle
+ chapter
+ edition
+ editor
+ howpublished
+ institution
+ journal
+ key
+% month not used in apalike
+ note
+ number
+ organization
+ pages
+ publisher
+ school
+ series
+ title
+ type
+ volume
+ year
+ }
+ {}
+ { label extra.label sort.label }
+
+INTEGERS { output.state before.all mid.sentence after.sentence after.block
+ docomma givetitles }
+
+FUNCTION {init.state.consts}
+{ #0 'before.all :=
+ #1 'mid.sentence :=
+ #2 'after.sentence :=
+ #3 'after.block :=
+
+ #0 'docomma := % if it is 0 then don't do commas, otherwise do them.
+}
+
+FUNCTION {init.toggle.switches}
+{% set switches for controlling the output!
+ #0 'givetitles := % if it is 0 then don't give titles, otherwise do them.
+}
+
+STRINGS { s t }
+
+FUNCTION {output.nonnull}
+{ 's :=
+ output.state mid.sentence =
+
+% % { ", " * write$ } % the comma here is responsible for every comma!
+% % % But JMB doesn't want commas, so away it goes!
+% { " " * write$ } % That does it!
+
+ { % doing a comma is controlled specifically in JMB using docomma
+ docomma #0 =
+ { " " * write$ }
+ { ", " * write$ }
+ if$
+ }
+ { output.state after.block =
+ { add.period$ write$
+ newline$
+ "\newblock " write$
+ }
+ { output.state before.all =
+ 'write$
+ { add.period$ " " * write$ }
+ if$
+ }
+ if$
+ mid.sentence 'output.state :=
+ }
+ if$
+ s
+}
+
+FUNCTION {output}
+{ duplicate$ empty$
+ 'pop$
+ 'output.nonnull
+ if$
+}
+
+FUNCTION {output.check}
+{ 't :=
+ duplicate$ empty$
+ { t "title" =
+ { pop$ } % jmb ignores titles and does not object if missing
+ { pop$ "empty " t * " in " * cite$ * warning$ }
+ if$
+ }
+ 'output.nonnull % block periods
+ % { pop$ } % don't do anything
+ if$
+}
+
+% t "title" =
+% { "zowie" warning$ }
+% { duplicate$ empty$
+% { pop$ "EmPtY " t * " in " * cite$ * warning$ }
+% 'output.nonnull
+% }
+% if$
+% if$
+%}
+
+% apalike needs this function because
+% the year has special punctuation;
+% apalike ignores the month
+FUNCTION {output.year.check}
+{ year empty$
+ {
+ "empty year in " cite$ ", using label: " extra.label * * * warning$
+ write$
+ " (" extra.label * ")" *
+ mid.sentence 'output.state :=
+ }
+ { write$
+ " (" year * extra.label * ")" *
+ mid.sentence 'output.state :=
+ }
+ if$
+}
+
+FUNCTION {output.bibitem}
+{ newline$
+ "\bibitem[" write$
+ label write$
+ "]{" write$
+ cite$ write$
+ "}" write$
+ newline$
+ ""
+ before.all 'output.state :=
+}
+
+FUNCTION {fin.entry}
+{ add.period$
+ write$
+ newline$
+}
+
+FUNCTION {new.block}
+{ output.state before.all =
+ 'skip$
+ { after.block 'output.state := }
+ if$
+}
+
+FUNCTION {new.sentence}
+{ output.state after.block =
+ 'skip$
+ { output.state before.all =
+ 'skip$
+ { after.sentence 'output.state := }
+ if$
+ }
+ if$
+}
+
+FUNCTION {not}
+{ { #0 }
+ { #1 }
+ if$
+}
+
+FUNCTION {and}
+{ 'skip$
+ { pop$ #0 }
+ if$
+}
+
+FUNCTION {or}
+{ { pop$ #1 }
+ 'skip$
+ if$
+}
+
+FUNCTION {new.block.checkb}
+{ empty$
+ swap$ empty$
+ and
+ 'skip$
+ 'new.block
+ if$
+}
+
+FUNCTION {field.or.null}
+{ duplicate$ empty$
+ { pop$ "" }
+ 'skip$
+ if$
+}
+
+FUNCTION {emphasize}
+{ duplicate$ empty$
+ { pop$ "" }
+ { "{\em " swap$ * "}" * }
+ if$
+}
+
+INTEGERS { nameptr namesleft numnames }
+
+FUNCTION {format.names}
+{ 's :=
+ #1 'nameptr :=
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ { s nameptr "{vv~}{ll}{, jj}{, f.}" format.name$ 't := % last name first
+ nameptr #1 >
+ { namesleft #1 >
+ { ", " * t * }
+ { numnames #2 >
+ { "," * }
+ 'skip$
+ if$
+ t "others" =
+ { " {\em et~al.}" * }
+ { " \& " * t * }
+ if$
+ }
+ if$
+ }
+ 't
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+}
+
+FUNCTION {format.authors}
+{ author empty$
+ { "" }
+ { author format.names }
+ if$
+}
+
+FUNCTION {format.key} % this function is just for apalike
+{ empty$
+ { key field.or.null }
+ { "" }
+ if$
+}
+
+FUNCTION {format.editors}
+{ editor empty$
+ { "" }
+ { editor format.names
+ editor num.names$ #1 >
+ { ", eds" * } % TDS
+ { ", ed" * } % TDS
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.title}
+{ title empty$
+ { "" }
+ { % decide whether to give the title or not
+ givetitles #1 =
+ { title "t" change.case$ } % produce the title
+ { title pop$ "" } % don't produce the title
+ if$
+ }
+ if$
+}
+
+FUNCTION {n.dashify}
+{ 't :=
+ ""
+ { t empty$ not }
+ { t #1 #1 substring$ "-" =
+ { t #1 #2 substring$ "--" = not
+ { "--" *
+ t #2 global.max$ substring$ 't :=
+ }
+ { { t #1 #1 substring$ "-" = }
+ { "-" *
+ t #2 global.max$ substring$ 't :=
+ }
+ while$
+ }
+ if$
+ }
+ { t #1 #1 substring$ *
+ t #2 global.max$ substring$ 't :=
+ }
+ if$
+ }
+ while$
+}
+
+FUNCTION {format.btitle}
+{ title emphasize
+}
+
+FUNCTION {tie.or.space.connect}
+{ duplicate$ text.length$ #3 <
+ { "~" }
+ { " " }
+ if$
+ swap$ * *
+}
+
+FUNCTION {either.or.check}
+{ empty$
+ 'pop$
+ { "can't use both " swap$ * " fields in " * cite$ * warning$ }
+ if$
+}
+
+FUNCTION {format.bvolume}
+{ volume empty$
+ { "" }
+ { "volume" volume tie.or.space.connect
+ series empty$
+ 'skip$
+ { " of " * series emphasize * }
+ if$
+ "volume and number" number either.or.check
+ }
+ if$
+}
+
+FUNCTION {format.number.series}
+{ volume empty$
+ { number empty$
+ { series field.or.null }
+ { output.state mid.sentence =
+ { "number" }
+ { "Number" }
+ if$
+ number tie.or.space.connect
+ series empty$
+ { "there's a number but no series in " cite$ * warning$ }
+ { " in " * series * }
+ if$
+ }
+ if$
+ }
+ { "" }
+ if$
+}
+
+FUNCTION {format.edition}
+{ edition empty$
+ { "" }
+ { output.state mid.sentence =
+ { edition "l" change.case$ " edition" * }
+ { edition "t" change.case$ " edition" * }
+ if$
+ }
+ if$
+}
+
+INTEGERS { multiresult }
+
+FUNCTION {multi.page.check}
+{ 't :=
+ #0 'multiresult :=
+ { multiresult not
+ t empty$ not
+ and
+ }
+ { t #1 #1 substring$
+ duplicate$ "-" =
+ swap$ duplicate$ "," =
+ swap$ "+" =
+ or or
+ { #1 'multiresult := }
+ { t #2 global.max$ substring$ 't := }
+ if$
+ }
+ while$
+ multiresult
+}
+
+FUNCTION {format.pages}
+{ pages empty$
+ { "" }
+ { pages multi.page.check
+ { "pp." pages n.dashify tie.or.space.connect } % TDS
+ { "p." pages tie.or.space.connect } % TDS
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.vol.num.pages}
+{ "{\bf " volume field.or.null * "}" * % make volume bold face
+ number empty$
+ 'skip$
+ { " (" number * ")" * *
+ volume empty$
+ { "there's a number but no volume in " cite$ * warning$ }
+ 'skip$
+ if$
+ }
+ if$
+ pages empty$
+ 'skip$
+ { duplicate$ empty$
+ { pop$ format.pages }
+% { ":" * pages n.dashify * } % no more colons after the volume
+ { ", " * pages n.dashify * } % comma's instead
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.chapter.pages}
+{ chapter empty$
+ 'format.pages
+ { type empty$
+ { "chapter" }
+ { type "l" change.case$ }
+ if$
+ chapter tie.or.space.connect
+ pages empty$
+ 'skip$
+ { ", " * format.pages * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.in.ed.booktitle}
+{ booktitle empty$
+ { "" }
+ { editor empty$
+ { "In: " booktitle emphasize * } % TDS
+ { "In: " booktitle emphasize * ", " *
+ "(" format.editors ")" * * * } % TDS
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.thesis.type}
+{ type empty$
+ 'skip$
+ { pop$
+ type "t" change.case$
+ }
+ if$
+}
+
+FUNCTION {format.tr.number}
+{ type empty$
+ { "Technical Report" }
+ 'type
+ if$
+ number empty$
+ { "t" change.case$ }
+ { number tie.or.space.connect }
+ if$
+}
+
+FUNCTION {format.article.crossref}
+{ "In:" % this is for apalike % TDS
+ " \cite{" * crossref * "}" *
+}
+
+FUNCTION {format.book.crossref}
+{ volume empty$
+ { "empty volume in " cite$ * "'s crossref of " * crossref * warning$
+ "In: " % TDS
+ }
+ { "Volume" volume tie.or.space.connect
+ " of " *
+ }
+ if$
+ "\cite{" * crossref * "}" * % this is for apalike
+}
+
+FUNCTION {format.incoll.inproc.crossref}
+{ "In:" % this is for apalike % TDS
+ " \cite{" * crossref * "}" *
+}
+
+FUNCTION {article}
+{
+ cite$ "TitlesOn" =
+ 'skip$ % Don't write out an article of this kind, it's a toggle switch!
+ {
+ output.bibitem
+ format.authors "author" output.check
+ author format.key output % special for
+ output.year.check % apalike
+ new.block
+ format.title "title" output.check
+ new.block
+ crossref missing$
+ { % figure out the last character of the journal name.
+ % "<<" journal #-1 #1 substring$ ">>" * * % for testing
+ % "<" journal ">" * * % this works ok % for testing
+
+ journal #-1 #1 substring$ "." =
+ { journal } % journal ended in period so don't do anything
+ { journal ", " *} % journal ended without period, so add comma
+ if$
+ emphasize "journal" output.check
+
+% journal * emphasize "journal" output.check % the original method
+
+ format.vol.num.pages output
+ }
+ { format.article.crossref output.nonnull
+ format.pages output
+ }
+ if$
+ new.block
+ note output
+ fin.entry
+ }
+ if$
+}
+
+FUNCTION {book}
+{ output.bibitem
+ author empty$
+ { format.editors "author and editor" output.check
+ editor format.key output
+ }
+ { format.authors output.nonnull
+ crossref missing$
+ { "author and editor" editor either.or.check }
+ 'skip$
+ if$
+ }
+ if$
+ output.year.check % special for apalike
+ new.block
+ format.btitle "title" output.check
+ #1 'docomma := % TURN COMMAS ON FOR JMB
+ crossref missing$
+ {
+ format.bvolume output
+ new.block
+ format.number.series output
+ new.sentence
+ #0 'docomma := % no comma after address
+ address ":" * output % TDS
+ publisher "publisher" output.check % TDS
+ #1 'docomma := % comma back on
+% publisher "publisher" output.check
+% address output
+ }
+ { new.block
+ format.book.crossref output.nonnull
+ }
+ if$
+ format.edition output
+ new.block
+ note output
+ fin.entry
+ #0 'docomma := % TURN COMMAS OFF
+}
+
+FUNCTION {booklet}
+{ output.bibitem
+ format.authors output
+ author format.key output % special for
+ output.year.check % apalike
+ new.block
+ format.title "title" output.check
+ new.block
+ howpublished output
+ address output
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {inbook}
+{ output.bibitem
+ author empty$
+ { format.editors "author and editor" output.check
+ editor format.key output
+ }
+ { format.authors output.nonnull
+ crossref missing$
+ { "author and editor" editor either.or.check }
+ 'skip$
+ if$
+ }
+ if$
+ output.year.check % special for apalike
+ new.block
+ format.btitle "title" output.check
+ crossref missing$
+ { format.bvolume output
+ format.chapter.pages "chapter and pages" output.check
+ new.block
+ format.number.series output
+ new.sentence
+ #0 'docomma := % no comma after address
+ address ":" * output % TDS
+ publisher "publisher" output.check % TDS
+ #1 'docomma := % comma back on
+% publisher "publisher" output.check
+% address output
+ }
+ { format.chapter.pages "chapter and pages" output.check
+ new.block
+ format.book.crossref output.nonnull
+ }
+ if$
+ format.edition output
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {incollection}
+{ output.bibitem
+ format.authors "author" output.check
+ author format.key output % special for
+ output.year.check % apalike
+ new.block
+ format.title "title" output.check
+ new.block
+ crossref missing$
+ { format.in.ed.booktitle "booktitle" output.check
+ format.bvolume output
+ format.number.series output
+ format.chapter.pages output
+ new.sentence
+ publisher "publisher" output.check
+ address output
+ format.edition output
+ }
+ { format.incoll.inproc.crossref output.nonnull
+ format.chapter.pages output
+ }
+ if$
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {inproceedings}
+{ output.bibitem
+ format.authors "author" output.check
+ author format.key output % special for
+ output.year.check % apalike
+ new.block
+ format.title "title" output.check
+ new.block
+ crossref missing$
+ {
+% #1 'docomma := % TURN COMMAS ON FOR JMB, BUT NOT FOR JTB: inconsistent
+ format.in.ed.booktitle "booktitle" output.check
+ format.bvolume output
+ format.number.series output
+ format.pages "," * output % TDS toss in comma instead of period
+% address output % TDS address is below for JTB
+% new.sentence % TDS remove period
+ organization output
+ #0 'docomma := % NO COMMA AFTER ADDRESS
+ address ":" * output % TDS
+ publisher "publisher" output.check % TDS
+ #1 'docomma := % comma back on
+
+% publisher output % are simpler
+ #0 'docomma := % TURN COMMAS OFF
+ }
+ { format.incoll.inproc.crossref output.nonnull
+ format.pages output
+ }
+ if$
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {conference} { inproceedings }
+
+FUNCTION {manual}
+{ output.bibitem
+ format.authors output
+ author format.key output % special for
+ output.year.check % apalike
+ new.block
+ format.btitle "title" output.check
+ organization address new.block.checkb
+ organization output
+ address output
+ format.edition output
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {mastersthesis}
+{ output.bibitem
+ format.authors "author" output.check
+ author format.key output % special for
+ output.year.check % apalike
+ new.block
+ format.title "title" output.check
+ new.block
+ "Master's thesis" format.thesis.type output.nonnull
+ school "school" output.check
+ address output
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {misc}
+{ output.bibitem
+ format.authors output
+ author format.key output % special for
+ output.year.check % apalike
+ new.block
+ format.title output
+ new.block
+ howpublished output
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {phdthesis}
+{ output.bibitem
+ format.authors "author" output.check
+ author format.key output % special for
+ output.year.check % apalike
+ new.block
+ format.btitle "title" output.check
+ new.block
+ "PhD thesis" format.thesis.type output.nonnull
+ school "school" output.check
+ address output
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {proceedings}
+{ output.bibitem
+ format.editors output
+ editor format.key output % special for
+ output.year.check % apalike
+ new.block
+ format.btitle "title" output.check
+ format.bvolume output
+ format.number.series output
+ address output % for apalike
+ new.sentence % we always output
+ organization output % a nonempty organization
+ publisher output % here
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {techreport}
+{ output.bibitem
+ format.authors "author" output.check
+ author format.key output % special for
+ output.year.check % apalike
+ new.block
+ format.title "title" output.check
+ new.block
+ format.tr.number output.nonnull
+ institution "institution" output.check
+ address output
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {unpublished}
+{ output.bibitem
+ format.authors "author" output.check
+ author format.key output % special for
+ output.year.check % apalike
+ new.block
+
+% Since format.title is out of commission, the original method won't work:
+% format.title "title" output.check
+% so do the equivalent of the format.title procedure: (TDS)
+ title empty$
+ { "" }
+ { title "t" change.case$ } % produce the title
+ if$
+ "title" output.check
+
+ new.block
+ note "note" output.check
+ fin.entry
+}
+
+FUNCTION {default.type} { misc }
+
+MACRO {jan} {"January"}
+
+MACRO {feb} {"February"}
+
+MACRO {mar} {"March"}
+
+MACRO {apr} {"April"}
+
+MACRO {may} {"May"}
+
+MACRO {jun} {"June"}
+
+MACRO {jul} {"July"}
+
+MACRO {aug} {"August"}
+
+MACRO {sep} {"September"}
+
+MACRO {oct} {"October"}
+
+MACRO {nov} {"November"}
+
+MACRO {dec} {"December"}
+
+MACRO {acmcs} {"ACM Computing Surveys"}
+
+MACRO {acta} {"Acta Informatica"}
+
+MACRO {cacm} {"Communications of the ACM"}
+
+MACRO {ibmjrd} {"IBM Journal of Research and Development"}
+
+MACRO {ibmsj} {"IBM Systems Journal"}
+
+MACRO {ieeese} {"IEEE Transactions on Software Engineering"}
+
+MACRO {ieeetc} {"IEEE Transactions on Computers"}
+
+MACRO {ieeetcad}
+ {"IEEE Transactions on Computer-Aided Design of Integrated Circuits"}
+
+MACRO {ipl} {"Information Processing Letters"}
+
+MACRO {jacm} {"Journal of the ACM"}
+
+MACRO {jcss} {"Journal of Computer and System Sciences"}
+
+MACRO {scp} {"Science of Computer Programming"}
+
+MACRO {sicomp} {"SIAM Journal on Computing"}
+
+MACRO {tocs} {"ACM Transactions on Computer Systems"}
+
+MACRO {tods} {"ACM Transactions on Database Systems"}
+
+MACRO {tog} {"ACM Transactions on Graphics"}
+
+MACRO {toms} {"ACM Transactions on Mathematical Software"}
+
+MACRO {toois} {"ACM Transactions on Office Information Systems"}
+
+MACRO {toplas} {"ACM Transactions on Programming Languages and Systems"}
+
+MACRO {tcs} {"Theoretical Computer Science"}
+
+READ
+
+% ***********************************************************
+
+FUNCTION {check.for.titlecommand}
+% go through each entry and see if one of them has the key
+% 'TitlesOn'. If this is found, then do titles!
+% 1989 November 18 TDS
+{
+% "|" label "|" * * write$ newline$ % |Arrhenius {\em et~al.}, 1986|
+% "|" cite$ "|" * * write$ newline$ % |Arrhenius1986|
+% so cite$ is the thing I want to detect...
+
+ cite$ "TitlesOn" =
+ { % got it!
+% "FOUND TitlesOn" write$ newline$
+ "Titles Will Be Printed" warning$
+ #1 'givetitles := % give titles!
+ }
+ 'skip$
+ if$
+}
+EXECUTE {init.toggle.switches}
+ITERATE {check.for.titlecommand}
+% ***********************************************************
+
+FUNCTION {sortify}
+{ purify$
+ "l" change.case$
+}
+
+INTEGERS { len }
+
+FUNCTION {chop.word}
+{ 's :=
+ 'len :=
+ s #1 len substring$ =
+ { s len #1 + global.max$ substring$ }
+ 's
+ if$
+}
+
+% There are three apalike cases: one person (Jones),
+% two (Jones and de~Bruijn), and more (Jones et~al.).
+% This function is much like format.crossref.editors.
+%
+FUNCTION {format.lab.names}
+{ 's :=
+ s #1 "{vv~}{ll}" format.name$
+ s num.names$ duplicate$
+ #2 >
+ { pop$ " {\em et~al.}" * }
+ { #2 <
+ 'skip$
+ { s #2 "{ff }{vv }{ll}{ jj}" format.name$ "others" =
+ { " {\em et~al.}" * }
+ { " \& " * s #2 "{vv~}{ll}" format.name$ * }
+ % note new use of & rather than `and'. TDS
+ if$
+ }
+ if$
+ }
+ if$
+}
+
+FUNCTION {author.key.label}
+{ author empty$
+ { key empty$
+ { cite$ #1 #3 substring$ }
+ 'key % apalike uses the whole key
+ if$
+ }
+ { author format.lab.names }
+ if$
+}
+
+FUNCTION {author.editor.key.label}
+{ author empty$
+ { editor empty$
+ { key empty$
+ { cite$ #1 #3 substring$ }
+ 'key % apalike uses the whole key
+ if$
+ }
+ { editor format.lab.names }
+ if$
+ }
+ { author format.lab.names }
+ if$
+}
+
+FUNCTION {editor.key.label}
+{ editor empty$
+ { key empty$
+ { cite$ #1 #3 substring$ }
+ 'key % apalike uses the whole key, no organization
+ if$
+ }
+ { editor format.lab.names }
+ if$
+}
+
+FUNCTION {calc.label}
+{ type$ "book" =
+ type$ "inbook" =
+ or
+ 'author.editor.key.label
+ { type$ "proceedings" =
+ 'editor.key.label % apalike ignores organization
+ 'author.key.label % for labeling and sorting
+ if$
+ }
+ if$
+ ", " % these three lines are
+ * % for apalike, which
+ year field.or.null purify$ #-1 #4 substring$ % uses all four digits
+ *
+ 'label :=
+}
+
+FUNCTION {sort.format.names}
+{ 's :=
+ #1 'nameptr :=
+ ""
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ { nameptr #1 >
+ { " " * }
+ 'skip$
+ if$ % apalike uses initials
+ s nameptr "{vv{ } }{ll{ }}{ f{ }}{ jj{ }}" format.name$ 't := % <= here
+ nameptr numnames = t "others" = and
+ { "{\em et al}" * }
+ { t sortify * }
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+}
+
+FUNCTION {sort.format.title}
+{ 't :=
+ "A " #2
+ "An " #3
+ "The " #4 t chop.word
+ chop.word
+ chop.word
+ sortify
+ #1 global.max$ substring$
+}
+
+FUNCTION {author.sort}
+{ author empty$
+ { key empty$
+ { "to sort, need author or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { author sort.format.names }
+ if$
+}
+
+FUNCTION {author.editor.sort}
+{ author empty$
+ { editor empty$
+ { key empty$
+ { "to sort, need author, editor, or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { editor sort.format.names }
+ if$
+ }
+ { author sort.format.names }
+ if$
+}
+
+FUNCTION {editor.sort}
+{ editor empty$
+ { key empty$
+ { "to sort, need editor or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { editor sort.format.names }
+ if$
+}
+
+% apalike uses two sorting passes; the first one sets the
+% labels so that the `a's, `b's, etc. can be computed;
+% the second pass puts the references in "correct" order.
+% The presort function is for the first pass. It computes
+% label, sort.label, and title, and then concatenates.
+FUNCTION {presort}
+{ calc.label
+ label sortify
+ " "
+ *
+ type$ "book" =
+ type$ "inbook" =
+ or
+ 'author.editor.sort
+ { type$ "proceedings" =
+ 'editor.sort
+ 'author.sort
+ if$
+ }
+ if$
+ #1 entry.max$ substring$ % for
+ 'sort.label := % apalike
+ sort.label % style
+ *
+ " "
+ *
+ title field.or.null
+ sort.format.title
+ *
+ #1 entry.max$ substring$
+ 'sort.key$ :=
+}
+
+ITERATE {presort}
+
+SORT % by label, sort.label, title---for final label calculation
+
+STRINGS { last.label next.extra } % apalike labels are only for the text;
+
+INTEGERS { last.extra.num } % there are none in the bibliography
+
+FUNCTION {initialize.extra.label.stuff} % and hence there is no `longest.label'
+{ #0 int.to.chr$ 'last.label :=
+ "" 'next.extra :=
+ #0 'last.extra.num :=
+}
+
+FUNCTION {forward.pass}
+% pass through the references forward
+{
+%"\\ label=" label "//" * * write$ newline$ % display the label
+%"\\last.label=" last.label "//" * * write$ newline$ % display the label
+
+ last.label label = % if the label repeats the previous label...
+ { % then increment the extra number
+ last.extra.num #1 + 'last.extra.num :=
+ % and convert it to a label
+ last.extra.num int.to.chr$ 'extra.label :=
+ }
+ { % else set things up for the next entry
+ "a" chr.to.int$ 'last.extra.num :=
+
+ % However, if the year was missing, tack on an extra "a". TDS
+ year empty$
+ {"a" 'extra.label :=}
+ {"" 'extra.label :=}
+ if$
+
+% "" 'extra.label := % the original method was not to do anything TDS
+
+ label 'last.label := % capture this label for next time
+ }
+ if$
+%"\\extra.label = " extra.label "//" * * write$ newline$ % display the label
+}
+
+FUNCTION {reverse.pass}
+% pass through the references backwards
+% add extra characters to the end of the label string
+{
+%"{{" label "}}" * * write$ newline$ % display the label
+ next.extra "b" =
+% original logic:
+ { "a" 'extra.label := }
+ 'skip$
+ if$
+
+% next.extra "b" = { "next.extra was = b" write$ newline$} 'skip$ if$
+
+% new as of 1989 Oct 18
+% { "a" 'extra.label := }
+% { % Put on an "a" at the end of the label if the year is missing. TDS
+% year empty$
+% { "a" 'extra.label := }
+% %{ label "a" * 'label := }
+% 'skip$ % otherwise leave it alone (orignial method)
+% if$ }
+% if$
+
+ label extra.label * 'label :=
+ extra.label 'next.extra :=
+%"{{" label "}}" * * write$ newline$ % display the label
+}
+
+FUNCTION {bib.sort.order}
+% Generate the sort.key$ variables for sorting.
+% The sorting is first on the sort.label (ie, author's name), followed
+% by the year then the title. If there is no year, the cite$ is used.
+{
+ sort.label % this is based on the author name
+ " " * % tack on some space
+% original apa command was to use the year or an empty string:
+% year field.or.null sortify
+%
+% Replace that with the use of the cite$, when there is no year:
+ year duplicate$ empty$
+ {pop$ cite$}
+ 'skip$
+ if$
+
+ * " " * % tack on some space
+
+% I CAN'T STAND SORTING ON TITLE!!! TDS 1989 Dec 5
+% title field.or.null
+% sort.format.title
+% * % attach them together
+ cite$
+ * % use cite$ instead!!
+
+ % note: if there is no year, then the cite$ will override the sorting
+ % on the title. Oh well. Title sorting is sorta (ha ha) awful.
+
+ #1 entry.max$ substring$
+ 'sort.key$ :=
+
+ % The following line helps debug the program. It shows what the sort.key$ is.
+ % "%" sort.key$ * write$ newline$
+}
+
+% Here is the place that the actual executions of the labeling and sorting
+% functions are done.
+
+
+EXECUTE {initialize.extra.label.stuff} % initialize variables
+ITERATE {bib.sort.order} % set up the sorting keys
+SORT % by sort.label, year, title---giving final bibliography order
+% Having sorted NOW we apply the extra letters at the end!
+ITERATE {forward.pass}
+REVERSE {reverse.pass}
+
+FUNCTION {begin.bib}
+{ preamble$ empty$ % no \etalchar in apalike
+ 'skip$
+ { preamble$ write$ newline$ }
+ if$
+ "\begin{thebibliography}{}" write$ newline$ % no labels in apalike
+}
+
+EXECUTE {begin.bib}
+
+EXECUTE {init.state.consts}
+
+ITERATE {call.type$}
+
+FUNCTION {end.bib}
+{ newline$
+ "\end{thebibliography}" write$ newline$
+}
+
+EXECUTE {end.bib}
diff --git a/biblio/bibtex/contrib/jmb/jmb.sty b/biblio/bibtex/contrib/jmb/jmb.sty
new file mode 100644
index 0000000000..25e2f2a70a
--- /dev/null
+++ b/biblio/bibtex/contrib/jmb/jmb.sty
@@ -0,0 +1,92 @@
+%%% ====================================================================
+%%% @LaTeX-style-file{
+%%% author = "Tom Schneider",
+%%% version = "1.01",
+%%% date = "10 September 1991",
+%%% filename = "jmb.sty",
+%%% address = "National Cancer Institute
+%%% Laboratory of Mathematical Biology
+%%% Frederick, Maryland 21701-1013
+%%% USA",
+%%% checksum = "38329 92 392 4436",
+%%% email = "toms@ncifcrf.gov (Internet)",
+%%% codetable = "ISO/ASCII",
+%%% keywords = "molecular biology",
+%%% supported = "yes",
+%%% docstring = "This LaTeX style file is for the Journal of
+%%% Molecular Biology, and is identical to
+%%% apalike.sty [19 June 1989]. apalike.sty
+%%% style, used in conjunction with
+%%% apalike.bst, will produce an apa-like
+%%% bibliography style:
+%%% 1) Bibliography entries formatted
+%%% alphabetically, last name first, each entry
+%%% having a hanging indentation and no label.
+%%% 2) References in the following formats:
+%%% (Author, 1986)
+%%% (Author and Author, 1986)
+%%% (Author et al., 1986).
+%%% 3) Multiple references in the form
+%%% (Author1, 1986; Author2, 1987)
+%%%
+%%% It should be used as an optional argument
+%%% to the \documentstyle command; for example,
+%%% \documentstyle[11pt,apalike]{book}
+%%% 16-Sep-1986: original version by Susan King
+%%% and Oren Patashnik.
+%%% 13-Oct-1987 changes:
+%%% Fixed bug in last line by adding the {}
+%%% that disappeard when the \hbox{} was
+%%% removed from the pre-APALIKE definition;
+%%% added club and widow penalties;
+%%% patched the \newblock LaTeX bug from
+%%% `-.07em' to simply `.07em';
+%%% and made this work for document styles that
+%%% don't define `chapter'.
+%%%
+%%% The checksum field above contains a CRC-16
+%%% checksum as the first value, followed by the
+%%% equivalent of the standard UNIX wc (word
+%%% count) utility output of lines, words, and
+%%% characters. This is produced by Robert
+%%% Solovay's checksum utility."
+%%% }
+%%% ====================================================================
+%
+% Use parens instead of brackets for \cite, and no label in the bibliography
+%
+\def\@cite#1#2{(#1\if@tempswa , #2\fi)}
+\def\@biblabel#1{}
+
+% Set length of hanging indentation for bibliography entries
+%
+\newlength{\bibhang}
+\setlength{\bibhang}{2em}
+
+% \thebibliography environment depends on whether or not `chapter's can exist
+%
+\@ifundefined{chapter}{\def\thebibliography#1{\section*{References\@mkboth
+ {REFERENCES}{REFERENCES}}\list
+ {\relax}{\setlength{\labelsep}{0em}
+ \setlength{\itemindent}{-\bibhang}
+ \setlength{\leftmargin}{\bibhang}}
+ \def\newblock{\hskip .11em plus .33em minus .07em}
+ \sloppy\clubpenalty4000\widowpenalty4000
+ \sfcode`\.=1000\relax}}%
+{\def\thebibliography#1{\chapter*{Bibliography\@mkboth
+ {BIBLIOGRAPHY}{BIBLIOGRAPHY}}\list
+ {\relax}{\setlength{\labelsep}{0em}
+ \setlength{\itemindent}{-\bibhang}
+ \setlength{\leftmargin}{\bibhang}}
+ \def\newblock{\hskip .11em plus .33em minus .07em}
+ \sloppy\clubpenalty4000\widowpenalty4000
+ \sfcode`\.=1000\relax}}
+
+% `; ' goes between cites, and there's no \hbox around individual cites
+%
+\def\@citex[#1]#2{\if@filesw\immediate\write\@auxout{\string\citation{#2}}\fi
+ \def\@citea{}\@cite{\@for\@citeb:=#2\do
+ {\@citea\def\@citea{; }\@ifundefined
+ {b@\@citeb}{{\bf ?}\@warning
+ {Citation `\@citeb' on page \thepage \space undefined}}%
+{\csname b@\@citeb\endcsname}}}{#1}}
diff --git a/biblio/bibtex/contrib/jneurosci/README b/biblio/bibtex/contrib/jneurosci/README
new file mode 100644
index 0000000000..9216cd5b8b
--- /dev/null
+++ b/biblio/bibtex/contrib/jneurosci/README
@@ -0,0 +1,46 @@
+This is a slightly modified version of the namedplus style, which fully conforms
+with the Journal of Neuroscience citation style.
+Last modified 2004 April 06 by Matthias Hennig (hennig@cn.stir.ac.uk)
+
+version = 1.00 of jneurosci.bst 2004 April 06
+
+The following citation labels are implemented:
+
+\citeauthoryear{author-info}{year}:
+ these labels are processed by the following commands:
+\cite{key}:
+ which produces citations with both author and year, enclosed in parens.
+\shortcite{key}:
+ which produces citations with year only, enclosed in parens
+\citeauthor{key}:
+ which produces the author information only
+\citeyear{key}:
+ which produces the year information only
+\citetext{key}:
+ which produces Author (Year)
+\citenoparens{key}:
+ which produces Author, Year
+
+The output looks like that:
+\cite{key}:
+ (Strettoi and Masland, 1996; Kolb, 1997; Masland, 2001) and (Fisher et al., 1975)
+\citetext{key}:
+ for reviews, see McNaughton (1990); Mller and Kaupp (1998); Fain et al. (2001).
+
+The bibliography follows J Neurosci conventions, e.g.:
+Koch C (1999) Biophysics of Computation: Information Processing in Single Neurons Oxford University Press.
+Enroth-Cugell C, Robson JG (1966) The contrast sensitivity of retinal ganglion cells of the cat. J Physiol 187:517-552.
+
+This is a modified version of the namedplus style by:
+-----------------------------------------------------
+A. David Redish adr@nsma.arizona.edu
+Post-doc http://www.cs.cmu.edu/~dredish
+Neural Systems, Memory and Aging, Univ of AZ, Tucson AZ
+-----------------------------------------------------
+
+which was in turn modified by:
+Oren Patashnik (PATASHNIK@SCORE.STANFORD.EDU)
+
+and finally modified by:
+Matthias H Hennig, University of Edinburgh, mhennig at inf.ed.ac.uk
+
diff --git a/biblio/bibtex/contrib/jneurosci/jneurosci.bst b/biblio/bibtex/contrib/jneurosci/jneurosci.bst
new file mode 100644
index 0000000000..5cc3d025c1
--- /dev/null
+++ b/biblio/bibtex/contrib/jneurosci/jneurosci.bst
@@ -0,0 +1,1383 @@
+% This is a slightly modified version of the namedplus style, which fully conforms
+% with the Journal of Neuroscience citation style.
+% Last modified 2004 April 06 by Matthias Hennig (hennig@cn.stir.ac.uk)
+%
+% version = 1.00 of jneurosci.bst 2004 April 06
+%
+% The following citation labels are implemented:
+%
+% \citeauthoryear{author-info}{year}:
+% these labels are processed by the following commands:
+% \cite{key}:
+% which produces citations with both author and year, enclosed in parens.
+% \shortcite{key}:
+% which produces citations with year only, enclosed in parens
+% \citeauthor{key}:
+% which produces the author information only
+% \citeyear{key}:
+% which produces the year information only
+% \citetext{key}:
+% which produces Author (Year)
+% \citenoparens{key}:
+% which produces Author, Year
+%
+% The output looks like that:
+% \cite{key}:
+% (Strettoi and Masland, 1996; Kolb, 1997; Masland, 2001) and (Fisher et al., 1975)
+% \citetext{key}:
+% for reviews, see McNaughton (1990); Mller and Kaupp (1998); Fain et al. (2001).
+%
+% The bibliography follows J Neurosci conventions, e.g.:
+% Koch C (1999) Biophysics of Computation: Information Processing in Single Neurons Oxford University Press.
+% Enroth-Cugell C, Robson JG (1966) The contrast sensitivity of retinal ganglion cells of the cat. J Physiol 187:517-552.
+%
+% This is a modified version of the namedplus style by:
+% -----------------------------------------------------
+% A. David Redish adr@nsma.arizona.edu
+% Post-doc http://www.cs.cmu.edu/~dredish
+% Neural Systems, Memory and Aging, Univ of AZ, Tucson AZ
+% -----------------------------------------------------
+%
+% which was in turn modified by:
+% Oren Patashnik (PATASHNIK@SCORE.STANFORD.EDU)
+%
+% and finally modified by:
+% Matthias H Hennig, University of Edinburgh, mhennig at inf.ed.ac.uk
+
+
+ENTRY
+ { address
+ author
+ booktitle
+ chapter
+ edition
+ editor
+ howpublished
+ institution
+ journal
+ key
+ month
+ note
+ number
+ organization
+ pages
+ publisher
+ school
+ series
+ title
+ type
+ volume
+ year
+ }
+ {}
+ { label extra.label sort.label }
+
+INTEGERS { output.state before.all mid.sentence after.sentence after.block }
+
+FUNCTION {init.state.consts}
+{ #0 'before.all :=
+ #1 'mid.sentence :=
+ #2 'after.sentence :=
+ #3 'after.block :=
+}
+
+STRINGS { s t }
+
+FUNCTION {output.nonnull}
+{ 's :=
+ output.state mid.sentence =
+ { ", " * write$ }
+ { output.state after.block =
+ { " " * write$ %add.period$ write$
+ newline$
+ "\newblock " write$
+ }
+ { output.state before.all =
+ 'write$
+ { add.period$ " " * write$ }
+ if$
+ }
+ if$
+ mid.sentence 'output.state :=
+ }
+ if$
+ s
+}
+
+FUNCTION {output.nonnulldot}
+{ 's :=
+ output.state mid.sentence =
+ { ", " * write$ }
+ { output.state after.block =
+ { add.period$ write$
+ newline$
+ "\newblock " write$
+ }
+ { output.state before.all =
+ 'write$
+ { add.period$ " " * write$ }
+ if$
+ }
+ if$
+ mid.sentence 'output.state :=
+ }
+ if$
+ s
+}
+
+
+FUNCTION {output}
+{ duplicate$ empty$
+ 'pop$
+ 'output.nonnull
+ if$
+}
+
+FUNCTION {output.check}
+{ 't :=
+ duplicate$ empty$
+ { pop$ "empty " t * " in " * cite$ * warning$ }
+ 'output.nonnull
+ if$
+}
+
+FUNCTION {output.checkdot}
+{ 't :=
+ duplicate$ empty$
+ { pop$ "empty " t * " in " * cite$ * warning$ }
+ 'output.nonnulldot
+ if$
+}
+
+
+% apalike needs this function because
+% the year has special punctuation;
+% apalike ignores the month
+FUNCTION {output.year.check}
+{ year empty$
+ { "empty year in " cite$ * warning$ }
+ { write$
+ " (" year * extra.label * ")" *
+ mid.sentence 'output.state :=
+ }
+ if$
+}
+
+FUNCTION {output.bibitem}
+{ newline$
+
+ "\bibitem[" write$
+ label write$
+ "]{" write$
+
+ cite$ write$
+ "}" write$
+ newline$
+ ""
+ before.all 'output.state :=
+}
+
+FUNCTION {fin.entry}
+{ add.period$
+ write$
+ newline$
+}
+
+FUNCTION {new.block}
+{ output.state before.all =
+ 'skip$
+ { after.block 'output.state := }
+if$
+}
+
+FUNCTION {new.sentence}
+{ output.state after.block =
+ 'skip$
+ { output.state before.all =
+ 'skip$
+ { after.sentence 'output.state := }
+ if$
+ }
+ if$
+}
+
+FUNCTION {not}
+{ { #0 }
+ { #1 }
+ if$
+}
+
+FUNCTION {and}
+{ 'skip$
+ { pop$ #0 }
+ if$
+}
+
+FUNCTION {or}
+{ { pop$ #1 }
+ 'skip$
+ if$
+}
+
+FUNCTION {new.block.checka}
+{ empty$
+ 'skip$
+ 'new.block
+ if$
+}
+
+FUNCTION {new.block.checkb}
+{ empty$
+ swap$ empty$
+ and
+ 'skip$
+ 'new.block
+ if$
+}
+
+FUNCTION {new.sentence.checka}
+{ empty$
+ 'skip$
+ 'new.sentence
+ if$
+}
+
+FUNCTION {new.sentence.checkb}
+{ empty$
+ swap$ empty$
+ and
+ 'skip$
+ 'new.sentence
+ if$
+}
+
+FUNCTION {field.or.null}
+{ duplicate$ empty$
+ { pop$ "" }
+ 'skip$
+ if$
+}
+
+FUNCTION {emphasize}
+{ duplicate$ empty$
+ { pop$ "" }
+ { "{\em " swap$ * "}" * }
+ if$
+}
+
+INTEGERS { nameptr namesleft numnames }
+STRINGS { lclfrmtstr} % local format string
+
+FUNCTION {format.names}
+{
+ 's := % 1 s = current stack
+ #1 'nameptr := % 2 nameptr = 1
+ s num.names$ 'numnames := % 3 numnames = how many names in stack
+ numnames 'namesleft := % 4 namesleft = numnames
+
+ { namesleft #0 > } % 5 is namesleft > 0?
+
+ {
+ % mhh, 8.7.2002, JNS likes this best!
+ "{vv~}{ll}{ j{}}{ f{}}" 'lclfrmtstr :=
+ s nameptr lclfrmtstr format.name$ 't :=
+
+ nameptr #1 > % 7 is nameptr > 1?
+ { namesleft #1 > % 8 is namesleft > 1?
+ { ", " * t * } % 9 concat(, and t)
+
+ { numnames #2 > % 10 is numnames > 2?
+ { "" * } % 11 concat(current stack and ,)
+ 'skip$ % 12 skip
+ if$ % 13 if (10 is true) then run 11 else 12
+ t "others" = % 14 is t == others?
+ { " et~al." * } % 15 concat (current stack and et~al.)
+ { ", " * t * } % 16 concat (and and t)
+ if$ % 17 if (14 is true) then run 15 else 16
+ } % 18 close 10
+ if$ % 19 if (8 is true) then run 9 else run 10-18
+ } % 20 close 8
+ 't % 21 push t
+ if$ % 22 if (7 is true) then run 8-20 else run 21
+ nameptr #1 + 'nameptr := % 23 nameptr = nameptr + 1
+ namesleft #1 - 'namesleft := % 24 namesleft = namesleft - 1
+ } % 25 close 6
+ while$ % while (5 is true) run 6-25
+}
+
+FUNCTION {format.authors}
+{ author empty$
+ { "" }
+ { author format.names }
+ if$
+}
+
+FUNCTION {format.key} % this function is just for apalike
+{ empty$
+ { key field.or.null }
+ { "" }
+ if$
+}
+
+FUNCTION {format.editors}
+{ editor empty$
+ { "" }
+ { editor format.names
+ editor num.names$ #1 >
+ { ", editors" * }
+ { ", editor" * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.title}
+{ title empty$
+ { "" }
+
+ { title "t" change.case$ }
+
+ if$
+}
+
+FUNCTION {n.dashify}
+{ 't :=
+ ""
+ { t empty$ not }
+ { t #1 #1 substring$ "-" =
+ { t #1 #2 substring$ "--" = not
+ { "--" *
+ t #2 global.max$ substring$ 't :=
+ }
+ { { t #1 #1 substring$ "-" = }
+ { "-" *
+ t #2 global.max$ substring$ 't :=
+ }
+ while$
+ }
+ if$
+ }
+ { t #1 #1 substring$ *
+ t #2 global.max$ substring$ 't :=
+ }
+ if$
+ }
+ while$
+}
+
+FUNCTION {format.date}
+{ year empty$
+ { month empty$
+ { "" }
+ { "there's a month but no year in " cite$ * warning$
+ month
+ }
+ if$
+ }
+ { month empty$
+ 'year
+ { month " " * year * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.btitle}
+{ title emphasize
+}
+
+FUNCTION {tie.or.space.connect}
+{ duplicate$ text.length$ #3 <
+ { "~" }
+ { " " }
+ if$
+ swap$ * *
+}
+
+FUNCTION {either.or.check}
+{ empty$
+ 'pop$
+ { "can't use both " swap$ * " fields in " * cite$ * warning$ }
+ if$
+}
+
+FUNCTION {format.bvolume}
+{ volume empty$
+ { "" }
+ { "Vol.~" volume *
+ series empty$
+ 'skip$
+ { " of " * series emphasize * }
+ if$
+ "volume and number" number either.or.check
+ }
+ if$
+}
+
+FUNCTION {format.number.series}
+{ volume empty$
+ { number empty$
+ { series field.or.null }
+ { output.state mid.sentence =
+ { "number" }
+ { "Number" }
+ if$
+ number tie.or.space.connect
+ series empty$
+ { "there's a number but no series in " cite$ * warning$ }
+ { " in " * series * }
+ if$
+ }
+ if$
+ }
+ { "" }
+ if$
+}
+
+FUNCTION {format.edition}
+{ edition empty$
+ { "" }
+ { output.state mid.sentence =
+ { edition "l" change.case$ " edition" * }
+ { edition "t" change.case$ " edition" * }
+ if$
+ }
+ if$
+}
+
+INTEGERS { multiresult }
+
+FUNCTION {multi.page.check}
+{ 't :=
+ #0 'multiresult :=
+ { multiresult not
+ t empty$ not
+ and
+ }
+ { t #1 #1 substring$
+ duplicate$ "-" =
+ swap$ duplicate$ "," =
+ swap$ "+" =
+ or or
+ { #1 'multiresult := }
+ { t #2 global.max$ substring$ 't := }
+ if$
+ }
+ while$
+ multiresult
+}
+
+FUNCTION {format.pages}
+{ pages empty$
+ { "" }
+ { pages multi.page.check
+ { "\mbox{pp. " pages n.dashify * "}" *}
+ { "\mbox{p. " pages * "}" * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.vol.num.pages}
+{ volume field.or.null
+ number empty$
+ 'skip$
+ { %"(" number * ")" * * % JNS needs no number
+ volume empty$
+ { "there's a number but no volume in " cite$ * warning$ }
+ 'skip$
+ if$
+ }
+ if$
+ pages empty$
+ 'skip$
+ { duplicate$ empty$
+ { pop$ format.pages }
+ { ":\mbox{" * pages n.dashify * "}" *} % ADR 21 DEC 1998 added ":~" and \mbox{pages}
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.chapter.pages}
+{ chapter empty$
+ 'format.pages
+ { type empty$
+ { "chapter" }
+ { type "l" change.case$ }
+ if$
+ chapter tie.or.space.connect
+ pages empty$
+ 'skip$
+ { ", " * format.pages * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.in.ed.booktitle}
+{ booktitle empty$
+ { "" }
+ { editor empty$
+ { "In " booktitle emphasize * }
+ { "In " format.editors * ", " * booktitle emphasize * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {empty.misc.check}
+{ author empty$ title empty$ howpublished empty$
+ month empty$ year empty$ note empty$
+ and and and and and
+
+ key empty$ not and
+
+ { "all relevant fields are empty in " cite$ * warning$ }
+ 'skip$
+ if$
+}
+
+FUNCTION {format.thesis.type}
+{ type empty$
+ 'skip$
+ { pop$
+ type "t" change.case$
+ }
+ if$
+}
+
+FUNCTION {format.tr.number}
+{ type empty$
+ { "Technical report" }
+ 'type
+ if$
+ number empty$
+ { "t" change.case$ }
+ { number tie.or.space.connect }
+ if$
+}
+
+FUNCTION {format.dotarticle.crossref}
+{ key empty$
+ { journal empty$
+ { "need key or journal for " cite$ * " to crossref " * crossref *
+ warning$
+ ""
+ }
+ { "In {\em " journal * "\/}" * }
+ if$
+ }
+ { "In " key * }
+ if$
+ " \shortcite{" * crossref * "}" *
+}
+
+FUNCTION {format.crossref.editor}
+{ editor #1 "{vv~}{ll}" format.name$
+ editor num.names$ duplicate$
+ #2 >
+ { pop$ " et~al." * }
+ { #2 <
+ 'skip$
+ { editor #2 "{ff }{vv }{ll}{ jj}" format.name$ "others" =
+ { " et~al." * }
+ { " and " * editor #2 "{vv~}{ll}" format.name$ * }
+ if$
+ }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.book.crossref}
+{ volume empty$
+ { "empty volume in " cite$ * "'s crossref of " * crossref * warning$
+ "In "
+ }
+ { "Vol." volume tie.or.space.connect
+ " of " *
+ }
+ if$
+ editor empty$
+ editor field.or.null author field.or.null =
+ or
+ { key empty$
+ { series empty$
+ { "need editor, key, or series for " cite$ * " to crossref " *
+ crossref * warning$
+ "" *
+ }
+ { "{\em " * series * "\/}" * }
+ if$
+ }
+ { key * }
+ if$
+ }
+ { format.crossref.editor * }
+ if$
+ " \shortcite{" * crossref * "}" *
+}
+
+FUNCTION {format.incoll.inproc.crossref}
+{ editor empty$
+ editor field.or.null author field.or.null =
+ or
+ { key empty$
+ { booktitle empty$
+ { "need editor, key, or booktitle for " cite$ * " to crossref " *
+ crossref * warning$
+ ""
+ }
+ { "In {\em " booktitle * "\/}" * }
+ if$
+ }
+ { "In " key * }
+ if$
+ }
+ { "In " format.crossref.editor * }
+ if$
+ " \shortcite{" * crossref * "}" *
+}
+
+FUNCTION {format.article.crossref}
+{ key empty$
+ { journal empty$
+ { "need key or journal for " cite$ * " to crossref " * crossref *
+ warning$
+ ""
+ }
+ { "In {\em " journal * "\/}" * }
+ if$
+ }
+ { "In " key * }
+ if$
+ " \shortcite{" * crossref * "}" *
+}
+
+FUNCTION {article}
+{ output.bibitem
+ format.authors "author" output.check
+ author format.key output % special for
+ output.year.check % apalike
+ new.block
+ format.title "title" output.check
+ new.block
+ crossref missing$
+ { journal emphasize "journal" output.checkdot
+ "~" * format.vol.num.pages *
+ }
+ { format.article.crossref output.nonnull
+ format.pages output
+ }
+ if$
+ new.block
+ note output
+ fin.entry
+}
+
+
+FUNCTION {book}
+{ output.bibitem
+ author empty$
+ { format.editors "author and editor" output.check
+ editor format.key output
+ }
+ { format.authors output.nonnull
+ crossref missing$
+ { "author and editor" editor either.or.check }
+ 'skip$
+ if$
+ }
+ if$
+ output.year.check % special for apalike
+ new.block
+ format.btitle "title" output.check
+ crossref missing$
+ { format.bvolume output
+ new.block
+ format.number.series output
+ new.sentence
+ publisher "publisher" output.check
+ address output
+ }
+ { new.block
+ format.book.crossref output.nonnull
+ }
+ if$
+ format.edition output
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {booklet}
+{ output.bibitem
+ format.authors output
+ author format.key output % special for
+ output.year.check % apalike
+ new.block
+ format.title "title" output.check
+ new.block
+ howpublished output
+ address output
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {inbook}
+{ output.bibitem
+ author empty$
+ { format.editors "author and editor" output.check
+ editor format.key output
+ }
+ { format.authors output.nonnull
+ crossref missing$
+ { "author and editor" editor either.or.check }
+ 'skip$
+ if$
+ }
+ if$
+ output.year.check % special for apalike
+ new.block
+ format.btitle "title" output.check
+ crossref missing$
+ { format.bvolume output
+ format.chapter.pages "chapter and pages" output.check
+ new.block
+ format.number.series output
+ new.sentence
+ publisher "publisher" output.check
+ address output
+ }
+ { format.chapter.pages "chapter and pages" output.check
+ new.block
+ format.book.crossref output.nonnull
+ }
+ if$
+ format.edition output
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {incollection}
+{ output.bibitem
+ format.authors "author" output.check
+ author format.key output % special for
+ output.year.check % apalike
+ new.block
+ format.title "title" output.check
+ new.block
+ crossref missing$
+ { format.in.ed.booktitle "booktitle" output.check
+ format.bvolume output
+ format.number.series output
+ format.chapter.pages output
+ new.sentence
+ publisher "publisher" output.check
+ address output
+ format.edition output
+ }
+ { format.incoll.inproc.crossref output.nonnull
+ format.chapter.pages output
+ }
+ if$
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {inproceedings}
+{ output.bibitem
+ format.authors "author" output.check
+ author format.key output % special for
+ output.year.check % apalike
+ new.block
+ format.title "title" output.check
+ new.block
+ crossref missing$
+ { format.in.ed.booktitle "booktitle" output.check
+ format.bvolume output
+ format.number.series output
+ format.pages output
+ address output % for apalike
+ new.sentence % there's no year
+ organization output % here so things
+ publisher output % are simpler
+ }
+ { format.incoll.inproc.crossref output.nonnull
+ format.pages output
+ }
+ if$
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {conference} { inproceedings }
+
+FUNCTION {manual}
+{ output.bibitem
+ format.authors output
+ author format.key output % special for
+ output.year.check % apalike
+ new.block
+ format.btitle "title" output.check
+ organization address new.block.checkb
+ organization output
+ address output
+ format.edition output
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {mastersthesis}
+{ output.bibitem
+ format.authors "author" output.check
+ author format.key output % special for
+ output.year.check % apalike
+ new.block
+ format.title "title" output.check
+ new.block
+ "Master's thesis" format.thesis.type output.nonnull
+ school "school" output.check
+ address output
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {misc}
+{ output.bibitem
+ format.authors output
+ author format.key output % special for
+ output.year.check % apalike
+ new.block
+ format.title output
+ new.block
+ howpublished output
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {phdthesis}
+{ output.bibitem
+ format.authors "author" output.check
+ author format.key output % special for
+ output.year.check % apalike
+ new.block
+ title "title" output.check
+ new.block
+ "Ph.D. diss." format.thesis.type output.nonnull
+ school "school" output.check
+ address output
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {proceedings}
+{ output.bibitem
+ format.editors output
+ editor format.key output % special for
+ output.year.check % apalike
+ new.block
+ format.btitle "title" output.check
+ format.bvolume output
+ format.number.series output
+ address output % for apalike
+ new.sentence % we always output
+ organization output % a nonempty organization
+ publisher output % here
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {techreport}
+{ output.bibitem
+ format.authors "author" output.check
+ author format.key output % special for
+ output.year.check % apalike
+ new.block
+ format.title "title" output.check
+ new.block
+ format.tr.number output.nonnull
+ institution "institution" output.check
+ address output
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {unpublished}
+{ output.bibitem
+ format.authors "author" output.check
+ author format.key output % special for
+ output.year.check % apalike
+ new.block
+ format.title "title" output.check
+ new.block
+ note "note" output.check
+ fin.entry
+}
+
+FUNCTION {default.type} { misc }
+
+MACRO {jan} {"January"}
+
+MACRO {feb} {"February"}
+
+MACRO {mar} {"March"}
+
+MACRO {apr} {"April"}
+
+MACRO {may} {"May"}
+
+MACRO {jun} {"June"}
+
+MACRO {jul} {"July"}
+
+MACRO {aug} {"August"}
+
+MACRO {sep} {"September"}
+
+MACRO {oct} {"October"}
+
+MACRO {nov} {"November"}
+
+MACRO {dec} {"December"}
+
+MACRO {acmcs} {"ACM Computing Surveys"}
+
+MACRO {acta} {"Acta Informatica"}
+
+MACRO {cacm} {"Communications of the ACM"}
+
+MACRO {ibmjrd} {"IBM Journal of Research and Development"}
+
+MACRO {ibmsj} {"IBM Systems Journal"}
+
+MACRO {ieeese} {"IEEE Transactions on Software Engineering"}
+
+MACRO {ieeetc} {"IEEE Transactions on Computers"}
+
+MACRO {ieeetcad}
+ {"IEEE Transactions on Computer-Aided Design of Integrated Circuits"}
+
+MACRO {ipl} {"Information Processing Letters"}
+
+MACRO {jacm} {"Journal of the ACM"}
+
+MACRO {jcss} {"Journal of Computer and System Sciences"}
+
+MACRO {scp} {"Science of Computer Programming"}
+
+MACRO {sicomp} {"SIAM Journal on Computing"}
+
+MACRO {tocs} {"ACM Transactions on Computer Systems"}
+
+MACRO {tods} {"ACM Transactions on Database Systems"}
+
+MACRO {tog} {"ACM Transactions on Graphics"}
+
+MACRO {toms} {"ACM Transactions on Mathematical Software"}
+
+MACRO {toois} {"ACM Transactions on Office Information Systems"}
+
+MACRO {toplas} {"ACM Transactions on Programming Languages and Systems"}
+
+MACRO {tcs} {"Theoretical Computer Science"}
+
+READ
+
+FUNCTION {sortify}
+{ purify$
+ "l" change.case$
+}
+
+INTEGERS { len }
+
+FUNCTION {chop.word}
+{ 's :=
+ 'len :=
+ s #1 len substring$ =
+ { s len #1 + global.max$ substring$ }
+ 's
+ if$
+}
+
+INTEGERS { et.al.char.used }
+
+FUNCTION {initialize.et.al.char.used}
+{ #0 'et.al.char.used :=
+}
+
+EXECUTE {initialize.et.al.char.used}
+
+FUNCTION {format.lab.names}
+{ 's := % 1 s = top of stack
+ s num.names$ 'numnames := % 2 numnames = num names in s
+
+ numnames #1 = % 3 is numnames == 1
+ { s #1 "{vv }{ll}" format.name$ } % 4 format 1 name
+ { numnames #2 = % 5 is numnames == 2
+ { s #1 "{vv }{ll} and " format.name$
+ s #2 "{vv }{ll}" format.name$ *
+ }
+ % 6 format 2 names
+ { numnames #3 = % 7 is numnames == 3
+ { s #1 "{vv }{ll} " format.name$
+ "\bgroup et al.\egroup " * }
+% s #2 "{vv }{ll}, and " format.name$ *
+% s #3 "{vv }{ll}" format.name$ *}
+ % 8 format 3 names
+ { s #1 "{vv }{ll } " format.name$
+ "\bgroup et al.\egroup " * }
+ % 9 format many names
+ if$ % 10 if 7 then 8 else 9
+ } % 11 close 7
+ if$ % 12 if (5) then 6 else 7-11
+ } % 13 close 5
+ if$ % 14 if 3 is true then 4 else 5-13
+
+}
+
+FUNCTION {old.old.old.format.lab.names}
+{ 's := % 1 s = top of stack
+ s num.names$ 'numnames := % 2 numnames = num names in s
+
+ numnames #1 = % 3 is numnames == 1
+ { s #1 "{vv }{ll}" format.name$ } % 4 format 1 name
+ { numnames #2 = % 5 is numnames == 2
+ { s #1 "{vv }{ll }and " format.name$ s #2 "{vv }{ll}" format.name$ *
+ }
+ % 6 format 2 names
+ { s #1 "{vv }{ll }\bgroup \em et al.\egroup " format.name$ }
+ % 7 format many names
+ if$ % 8 if (5) then 6 else 7
+ } % 9 close 5
+ if$ % 10 if 3 is true then 4 else 5-9
+
+}
+
+FUNCTION {author.key.label}
+{ author empty$
+ { key empty$
+
+ { cite$ #1 #3 substring$ }
+
+ { key }
+ if$
+ }
+ { author format.lab.names }
+ if$
+}
+
+FUNCTION {author.editor.key.label}
+{ author empty$
+ { editor empty$
+ { key empty$
+
+ { cite$ #1 #3 substring$ }
+
+ { key }
+ if$
+ }
+ { editor format.lab.names }
+ if$
+ }
+ { author format.lab.names }
+ if$
+}
+
+FUNCTION {author.key.organization.label}
+{ author empty$
+ { key empty$
+ { organization empty$
+
+ { cite$ #1 #3 substring$ }
+
+ { "The " #4 organization chop.word #3 text.prefix$ }
+ if$
+ }
+ { key }
+ if$
+ }
+ { author format.lab.names }
+ if$
+}
+
+FUNCTION {editor.key.organization.label}
+{ editor empty$
+ { key empty$
+ { organization empty$
+
+ { cite$ #1 #3 substring$ }
+
+ { "The " #4 organization chop.word #3 text.prefix$ }
+ if$
+ }
+ { key }
+ if$
+ }
+ { editor format.lab.names }
+ if$
+}
+
+FUNCTION {calc.label}
+{ type$ "book" =
+ type$ "inbook" =
+ or
+ 'author.editor.key.label
+ { type$ "proceedings" =
+ 'editor.key.organization.label
+ { type$ "manual" =
+ 'author.key.organization.label
+ 'author.key.label
+ if$
+ }
+ if$
+ }
+ if$
+ duplicate$
+
+ "\protect\citeauthoryear{" swap$ * "}{" *
+ year field.or.null purify$ * % CHANGED - pfps - 15 Feb 1989
+ 'label :=
+ year field.or.null purify$ *
+
+ sortify 'sort.label :=
+}
+
+FUNCTION {sort.format.names}
+{ 's :=
+ #1 'nameptr :=
+ ""
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+
+ { namesleft #0 > }
+ { nameptr #1 >
+ { " " * }
+ 'skip$
+ if$
+
+ s nameptr "{vv{ } }{ll{ }}{ ff{ }}{ jj{ }}" format.name$ 't :=
+
+ t sortify *
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+}
+
+FUNCTION {old.sort.format.names.old}
+{ 's :=
+ #1 'nameptr :=
+ ""
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ { nameptr #1 >
+ { " " * }
+ 'skip$
+ if$
+
+ s nameptr "{vv{ } }{ll{ }}{ ff{ }}{ jj{ }}" format.name$ 't :=
+
+ nameptr numnames = t "others" = and
+ { "et al" * }
+ { t sortify * }
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+}
+
+FUNCTION {sort.format.title}
+{ 't :=
+ "A " #2
+ "An " #3
+ "The " #4 t chop.word
+ chop.word
+ chop.word
+ sortify
+ #1 global.max$ substring$
+}
+
+FUNCTION {author.sort}
+{ author empty$
+ { key empty$
+ { "to sort, need author or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { author sort.format.names }
+ if$
+}
+
+FUNCTION {author.editor.sort}
+{ author empty$
+ { editor empty$
+ { key empty$
+ { "to sort, need author, editor, or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { editor sort.format.names }
+ if$
+ }
+ { author sort.format.names }
+ if$
+}
+
+FUNCTION {author.organization.sort}
+{ author empty$
+ { organization empty$
+ { key empty$
+ { "to sort, need author, organization, or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { "The " #4 organization chop.word sortify }
+ if$
+ }
+ { author sort.format.names }
+ if$
+}
+
+FUNCTION {editor.organization.sort}
+{ editor empty$
+ { organization empty$
+ { key empty$
+ { "to sort, need editor, organization, or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { "The " #4 organization chop.word sortify }
+ if$
+ }
+ { editor sort.format.names }
+ if$
+}
+
+FUNCTION {presort}
+
+{
+ calc.label
+ type$ "book" =
+ type$ "inbook" =
+ or
+ 'author.editor.sort
+ { type$ "proceedings" =
+ 'editor.organization.sort
+ { type$ "manual" =
+ 'author.organization.sort
+ 'author.sort
+ if$
+ }
+ if$
+ }
+ if$
+ " " *
+ year field.or.null sortify *
+ " " *
+ title field.or.null
+ sort.format.title *
+
+ #1 entry.max$ substring$
+ 'sort.key$ :=
+}
+
+ITERATE {presort}
+
+SORT
+
+STRINGS { longest.label last.sort.label next.extra }
+
+INTEGERS { longest.label.width last.extra.num }
+
+FUNCTION {initialize.longest.label}
+{ "" 'longest.label :=
+ #0 int.to.chr$ 'last.sort.label :=
+ "" 'next.extra :=
+ #0 'longest.label.width :=
+ #0 'last.extra.num :=
+}
+
+FUNCTION {forward.pass}
+{ last.sort.label sort.label =
+ { last.extra.num #1 + 'last.extra.num :=
+ last.extra.num int.to.chr$ 'extra.label :=
+ }
+ { "a" chr.to.int$ 'last.extra.num :=
+ "" 'extra.label :=
+ sort.label 'last.sort.label :=
+ }
+ if$
+}
+
+FUNCTION {reverse.pass}
+{ next.extra "b" =
+ { "a" 'extra.label := }
+ 'skip$
+ if$
+ label extra.label * "}" * 'label := % CHANGED - pfps 15 Feb 1989
+ label width$ longest.label.width >
+ { label 'longest.label :=
+ label width$ 'longest.label.width :=
+ }
+ 'skip$
+ if$
+ extra.label 'next.extra :=
+}
+
+EXECUTE {initialize.longest.label}
+
+ITERATE {forward.pass}
+
+REVERSE {reverse.pass}
+
+FUNCTION {begin.bib}
+
+{ et.al.char.used
+ { "\newcommand{\etalchar}[1]{$^{#1}$}" write$ newline$ }
+ 'skip$
+ if$
+ preamble$ empty$
+
+ 'skip$
+ { preamble$ write$ newline$ }
+ if$
+
+ "\begin{thebibliography}{}" write$ newline$
+
+}
+
+EXECUTE {begin.bib}
+
+EXECUTE {init.state.consts}
+
+ITERATE {call.type$}
+
+FUNCTION {end.bib}
+{ newline$
+ "\end{thebibliography}" write$ newline$
+}
+
+EXECUTE {end.bib}
+
diff --git a/biblio/bibtex/contrib/jneurosci/jneurosci.pdf b/biblio/bibtex/contrib/jneurosci/jneurosci.pdf
new file mode 100644
index 0000000000..d924d01f47
--- /dev/null
+++ b/biblio/bibtex/contrib/jneurosci/jneurosci.pdf
Binary files differ
diff --git a/biblio/bibtex/contrib/jneurosci/jneurosci.sty b/biblio/bibtex/contrib/jneurosci/jneurosci.sty
new file mode 100644
index 0000000000..ef4f766c99
--- /dev/null
+++ b/biblio/bibtex/contrib/jneurosci/jneurosci.sty
@@ -0,0 +1,89 @@
+% This is a slightly modified version of the namedplus style, which fully conforms
+% with the Journal of Neuroscience citation style.
+% Last modified 2004 April 06 by Matthias Hennig (hennig@cn.stir.ac.uk)
+%
+% version = 1.00 of jneurosci.bst 2004 April 06
+%
+% The following citation labels are implemented:
+%
+% \citeauthoryear{author-info}{year}:
+% these labels are processed by the following commands:
+% \cite{key}:
+% which produces citations with both author and year, enclosed in parens.
+% \shortcite{key}:
+% which produces citations with year only, enclosed in parens
+% \citeauthor{key}:
+% which produces the author information only
+% \citeyear{key}:
+% which produces the year information only
+% \citetext{key}:
+% which produces Author (Year)
+% \citenoparens{key}:
+% which produces Author, Year
+%
+% The output looks like that:
+% \cite{key}:
+% (Strettoi and Masland, 1996; Kolb, 1997; Masland, 2001) and (Fisher et al., 1975)
+% \citetext{key}:
+% for reviews, see McNaughton (1990); Mller and Kaupp (1998); Fain et al. (2001).
+%
+% The bibliography follows J Neurosci conventions, e.g.:
+% Koch C (1999) Biophysics of Computation: Information Processing in Single Neurons Oxford University Press.
+% Enroth-Cugell C, Robson JG (1966) The contrast sensitivity of retinal ganglion cells of the cat. J Physiol 187:517-552.
+%
+% This is a modified version of the namedplus style by:
+% -----------------------------------------------------
+% A. David Redish adr@nsma.arizona.edu
+% Post-doc http://www.cs.cmu.edu/~dredish
+% Neural Systems, Memory and Aging, Univ of AZ, Tucson AZ
+% -----------------------------------------------------
+%
+% which was in turn modified by:
+% Oren Patashnik (PATASHNIK@SCORE.STANFORD.EDU)
+%
+% and finally modified by:
+% Matthias H Hennig, University of Edinburgh, mhennig at inf.ed.ac.uk
+
+\def\@biblabel#1{}
+
+\let\@internalcite\cite
+
+\def\cite{\def\@citeseppen{-1000}%
+ \def\@cite##1##2{(\nobreak\hskip 0in{##1\if@tempswa , ##2\fi})}%
+ \def\citeauthoryear##1##2{##1, ##2}\@internalcite}
+
+\def\citetext{\def\@citeseppen{-1000}%
+ \def\@cite##1##2{\nobreak\hskip 0in{##1\if@tempswa , ##2\fi}}%
+ \def\citeauthoryear##1##2{##1~(##2)}\@internalcite}
+
+\def\citenoparens{\def\@citeseppen{-1000}%
+ \def\@cite##1##2{\nobreak\hskip 0in{##1\if@tempswa , ##2\fi}}%
+ \def\citeauthoryear##1##2{##1, ##2}\@internalcite}
+
+\def\shortcite{\def\@citeseppen{1000}%
+ \def\@cite##1##2{({##1\if@tempswa , ##2\fi})}%
+ \def\citeauthoryear##1##2{##2}\@internalcite}
+
+\def\citeauthor#1{\def\@cite##1##2{{##1\if@tempswa , ##2\fi}}%
+ \def\citeauthoryear##1##2{##1}\@citedata{#1}}
+
+\def\citeyear#1{\def\@cite##1##2{{##1\if@tempswa , ##2\fi}}%
+ \def\citeauthoryear##1##2{##2}\@citedata{#1}}
+
+\def\@citedata#1{\@tempswafalse%
+ \if@filesw\immediate\write\@auxout{\string\citation{#1}}\fi
+ \def\@citea{}\@cite{\@for\@citeb:=#1\do
+ {\@citea\def\@citea{;\penalty\@citeseppen\ }\@ifundefined
+ {b@\@citeb}{{\bf ?}\@warning
+ {Citation `\@citeb' on page \thepage \space undefined}}%
+{\csname b@\@citeb\endcsname}}}{}}
+
+% don't box citations, separate with ; and a space
+% also, make the penalty between citations negative: a good place to break
+\def\@citex[#1]#2{\if@filesw\immediate\write\@auxout{\string\citation{#2}}\fi
+ \def\@citea{}\@cite{\@for\@citeb:=#2\do
+ {\@citea\def\@citea{;\penalty\@citeseppen\ }\@ifundefined
+ {b@\@citeb}{{\bf ?}\@warning
+ {Citation `\@citeb' on page \thepage \space undefined}}%
+{\csname b@\@citeb\endcsname}}}{#1}}
+
diff --git a/biblio/bibtex/contrib/jneurosci/jneurosci.tex b/biblio/bibtex/contrib/jneurosci/jneurosci.tex
new file mode 100644
index 0000000000..0e890ffaa9
--- /dev/null
+++ b/biblio/bibtex/contrib/jneurosci/jneurosci.tex
@@ -0,0 +1,81 @@
+\documentclass[DIV=8, parskip=half, pagesize=auto]{scrartcl}
+
+\usepackage{fixltx2e}
+\usepackage{etex}
+\usepackage{xspace}
+\usepackage{lmodern}
+\usepackage[T1]{fontenc}
+\usepackage{textcomp}
+\usepackage[utf8]{inputenc}
+\usepackage{booktabs}
+\usepackage{microtype}
+\usepackage{hyperref}
+
+\newcommand*{\mail}[1]{\href{mailto:#1}{\texttt{#1}}}
+\newcommand*{\pkg}[1]{\textsf{#1}}
+\newcommand*{\cs}[1]{\texttt{\textbackslash#1}}
+\makeatletter
+\newcommand*{\cmd}[1]{\cs{\expandafter\@gobble\string#1}}
+\makeatother
+\newcommand*{\meta}[1]{\textlangle\textsl{#1}\textrangle}
+\newcommand*{\marg}[1]{\texttt{\{}\meta{#1}\texttt{\}}}
+
+\addtokomafont{title}{\rmfamily}
+
+\title{The \pkg{jneurosci} package\thanks{This manual corresponds to \pkg{jneurosci}~v1.00, dated~2004 April 06.}}
+\author{Matthias Hennig (\mail{hennig@cn.stir.ac.uk})}
+\date{2004 April 06}
+
+
+\begin{document}
+
+\maketitle
+
+\noindent
+This is a slightly modified version of the \pkg{namedplus} style, which fully conforms
+with the Journal of Neuroscience citation style.
+
+The following citation labels are implemented:
+%
+\begin{labeling}{\cmd{\citeauthoryear}\marg{author-info}\marg{year}:}
+\item[\cmd{\citeauthoryear}\marg{author-info}\marg{year}:] these labels are processed by the following commands:
+\item[\cmd{\cite}\marg{key}:] which produces citations with both author and year, enclosed in parens.
+\item[\cmd{\shortcite}\marg{key}:] which produces citations with year only, enclosed in parens
+\item[\cmd{\citeauthor}\marg{key}:] which produces the author information only
+\item[\cmd{\citeyear}\marg{key}:] which produces the year information only
+\item[\cmd{\citetext}\marg{key}:] which produces Author (Year)
+\item[\cmd{\citenoparens}\marg{key}:] which produces Author, Year
+\end{labeling}
+
+The output looks like that:
+%
+\begin{labeling}{\cmd{\citetext}\marg{key}:}
+\item[\cmd{\cite}\marg{key}:] (Strettoi and Masland, 1996; Kolb, 1997; Masland, 2001) and (Fisher et al., 1975)
+\item[\cmd{\citetext}\marg{key}:] for reviews, see McNaughton (1990); Müller and Kaupp (1998); Fain et al. (2001).
+\end{labeling}
+
+The bibliography follows J~Neurosci conventions, e.\,g.:
+%
+\begin{itemize}
+\item Koch C (1999) Biophysics of Computation: Information Processing in Single Neurons Oxford University Press.
+\item Enroth-Cugell C, Robson JG (1966) The contrast sensitivity of retinal ganglion cells of the cat. J~Physiol 187:517-552.
+\end{itemize}
+
+This is a modified version of the \pkg{namedplus} style by:
+
+\begin{tabular}{@{}ll@{}}
+ \toprule
+ A. David Redish & \mail{adr@nsma.arizona.edu} \\
+ Post-doc & \url{http://www.cs.cmu.edu/~dredish} \\
+ \multicolumn{2}{@{}l@{}}{Neural Systems, Memory and Aging, Univ of AZ, Tucson AZ} \\
+ \bottomrule
+\end{tabular}
+
+which was in turn modified by:\\
+Oren Patashnik (\mail{PATASHNIK@SCORE.STANFORD.EDU})
+
+and finally modified by:\\
+Matthias H Hennig, University of Edinburgh, \mail{mhennig@inf.ed.ac.uk}
+
+\end{document}
+
diff --git a/biblio/bibtex/contrib/jphysiol/README b/biblio/bibtex/contrib/jphysiol/README
new file mode 100644
index 0000000000..8dced9a729
--- /dev/null
+++ b/biblio/bibtex/contrib/jphysiol/README
@@ -0,0 +1,43 @@
+This is a slightly modified version of the namedplus style, which fully conforms with the Journal of Physiology citation style.
+Last modified 2009 Jan 28 by Matthias Hennig (mhhennig@gmail.com)
+
+version = 1.00 of jphysiol.bst 2009 Jan 28
+
+Use the following citation macros:
+\cite, \citeauthor, \citeyear, \citenoparens, and \citetext \citenoparens
+
+The references are created as a full list of authors (year) and then the standard rest of the stuff, e.g:
+
+Hubel DH & Wiesel TN (1962). Receptive Fields, binocular interaction, and functional architecture in the cat's visual cortex. J Physiol 160, 106-154.
+
+Koch C (1999). Biophysics of Computation: Information Processing in Single Neurons. Oxford University Press.
+
+Ódor G (2004). Universality classes in nonequilibrium lattice systems. Rev Mod Phys 76, 663-724.
+
+The journal/book title is in itaclics, and the journal volume in boldface, as required. This has not been fully checked, let me know if you find errors.
+
+
+This is a modified version of the namedplus style by:
+-----------------------------------------------------
+A. David Redish adr@nsma.arizona.edu
+Post-doc http://www.cs.cmu.edu/~dredish
+Neural Systems, Memory and Aging, Univ of AZ, Tucson AZ
+-----------------------------------------------------
+
+The ``named'' bibliography style creates citations with labels like
+ \citeauthoryear{author-info}{year}
+these labels are processed by the following commands:
+ \cite{key}
+ which produces citations with both author and year,
+ enclosed in parens.
+ \shortcite{key}
+ which produces citations with year only,
+ enclosed in parens
+ \citeauthor{key}
+ which produces the author information only
+ \citeyear{key}
+ which produces the year information only
+ \citetext{key}
+ which produces Author (Year)
+ \citenoparens{key}
+ which produces Author, Year
diff --git a/biblio/bibtex/contrib/jphysiol/jphysiol.bst b/biblio/bibtex/contrib/jphysiol/jphysiol.bst
new file mode 100644
index 0000000000..b2a052c1f4
--- /dev/null
+++ b/biblio/bibtex/contrib/jphysiol/jphysiol.bst
@@ -0,0 +1,1395 @@
+% This is a slightly modified version of the namedplus style, which fully conforms
+% with the Journal of Physiology citation style.
+% Last modified 2009 Jan 28 by Matthias Hennig (mhhennig@gmail.com)
+%
+% version = 1.00 of jphysiol.bst 2009 Jan 28
+%
+% Use the following citation macros:
+% \cite, \citeauthor, \citeyear, \citenoparens, and \citetext \citenoparens
+%
+% The references are created as a full list of authors (year) and then
+% the standard rest of the stuff, e.g:
+%
+% Hubel DH & Wiesel TN (1962). Receptive Fields, binocular interaction, and
+% functional architecture in the cat's visual cortex. J Physiol 160, 106-154.
+%
+% Koch C (1999). Biophysics of Computation: Information Processing in Single
+% Neurons. Oxford University Press.
+%
+% Ódor G (2004). Universality classes in nonequilibrium lattice systems.
+% Rev Mod Phys 76, 663-724.
+%
+% The journal/book title is in itaclics, and the journal volume in boldface,
+% as required. This has not been fully checked, let me know if you find errors.
+%
+%
+% This is a modified version of the namedplus style by:
+% -----------------------------------------------------
+% A. David Redish adr@nsma.arizona.edu
+% Post-doc http://www.cs.cmu.edu/~dredish
+% Neural Systems, Memory and Aging, Univ of AZ, Tucson AZ
+% -----------------------------------------------------
+%
+% The ``named'' bibliography style creates citations with labels like
+% \citeauthoryear{author-info}{year}
+% these labels are processed by the following commands:
+% \cite{key}
+% which produces citations with both author and year,
+% enclosed in parens.
+% \shortcite{key}
+% which produces citations with year only,
+% enclosed in parens
+% \citeauthor{key}
+% which produces the author information only
+% \citeyear{key}
+% which produces the year information only
+% \citetext{key}
+% which produces Author (Year)
+% \citenoparens{key}
+% which produces Author, Year
+
+ENTRY
+ { address
+ author
+ booktitle
+ chapter
+ edition
+ editor
+ howpublished
+ institution
+ journal
+ key
+ month
+ note
+ number
+ organization
+ pages
+ publisher
+ school
+ series
+ title
+ type
+ volume
+ year
+ }
+ {}
+ { label extra.label sort.label }
+
+INTEGERS { output.state before.all mid.sentence after.sentence after.block }
+
+FUNCTION {init.state.consts}
+{ #0 'before.all :=
+ #1 'mid.sentence :=
+ #2 'after.sentence :=
+ #3 'after.block :=
+}
+
+STRINGS { s t }
+
+FUNCTION {output.nonnull}
+{ 's :=
+ output.state mid.sentence =
+ { ", " * write$ }
+ { output.state after.block =
+ { " " * write$ %add.period$ write$
+ newline$
+ "\newblock " write$
+ }
+ { output.state before.all =
+ 'write$
+ { add.period$ " " * write$ }
+ if$
+ }
+ if$
+ mid.sentence 'output.state :=
+ }
+ if$
+ s
+}
+
+FUNCTION {output.nonnulldot}
+{ 's :=
+ output.state mid.sentence =
+ { ", " * write$ }
+ { output.state after.block =
+ { add.period$ write$
+ newline$
+ "\newblock " write$
+ }
+ { output.state before.all =
+ 'write$
+ { add.period$ " " * write$ }
+ if$
+ }
+ if$
+ mid.sentence 'output.state :=
+ }
+ if$
+ s
+}
+
+
+FUNCTION {output}
+{ duplicate$ empty$
+ 'pop$
+ 'output.nonnull
+ if$
+}
+
+FUNCTION {output.check}
+{ 't :=
+ duplicate$ empty$
+ { pop$ "empty " t * " in " * cite$ * warning$ }
+ 'output.nonnull
+ if$
+}
+
+FUNCTION {output.checkdot}
+{ 't :=
+ duplicate$ empty$
+ { pop$ "empty " t * " in " * cite$ * warning$ }
+ 'output.nonnulldot
+ if$
+}
+
+
+% apalike needs this function because
+% the year has special punctuation;
+% apalike ignores the month
+FUNCTION {output.year.check}
+{ year empty$
+ { "empty year in " cite$ * warning$ }
+ { write$
+ " (" year * extra.label * ")." *
+ mid.sentence 'output.state :=
+ }
+ if$
+}
+
+FUNCTION {output.bibitem}
+{ newline$
+
+ "\bibitem[" write$
+ label write$
+ "]{" write$
+
+ cite$ write$
+ "}" write$
+ newline$
+ ""
+ before.all 'output.state :=
+}
+
+FUNCTION {fin.entry}
+{ add.period$
+ write$
+ newline$
+}
+
+FUNCTION {new.block}
+{ output.state before.all =
+ 'skip$
+ { after.block 'output.state := }
+if$
+}
+
+FUNCTION {new.sentence}
+{ output.state after.block =
+ 'skip$
+ { output.state before.all =
+ 'skip$
+ { after.sentence 'output.state := }
+ if$
+ }
+ if$
+}
+
+FUNCTION {not}
+{ { #0 }
+ { #1 }
+ if$
+}
+
+FUNCTION {and}
+{ 'skip$
+ { pop$ #0 }
+ if$
+}
+
+FUNCTION {or}
+{ { pop$ #1 }
+ 'skip$
+ if$
+}
+
+FUNCTION {new.block.checka}
+{ empty$
+ 'skip$
+ 'new.block
+ if$
+}
+
+FUNCTION {new.block.checkb}
+{ empty$
+ swap$ empty$
+ and
+ 'skip$
+ 'new.block
+ if$
+}
+
+FUNCTION {new.sentence.checka}
+{ empty$
+ 'skip$
+ 'new.sentence
+ if$
+}
+
+FUNCTION {new.sentence.checkb}
+{ empty$
+ swap$ empty$
+ and
+ 'skip$
+ 'new.sentence
+ if$
+}
+
+FUNCTION {field.or.null}
+{ duplicate$ empty$
+ { pop$ "" }
+ 'skip$
+ if$
+}
+
+FUNCTION {emphasize}
+{ duplicate$ empty$
+ { pop$ "" }
+ { "{\em " swap$ * "}" * }
+ if$
+}
+
+FUNCTION {bold}
+{ duplicate$ empty$
+ { pop$ "" }
+ { "{\bf " swap$ * "}" * }
+ if$
+}
+
+
+INTEGERS { nameptr namesleft numnames }
+STRINGS { lclfrmtstr} % local format string
+
+FUNCTION {format.names}
+{
+ 's := % 1 s = current stack
+ #1 'nameptr := % 2 nameptr = 1
+ s num.names$ 'numnames := % 3 numnames = how many names in stack
+ numnames 'namesleft := % 4 namesleft = numnames
+
+ { namesleft #0 > } % 5 is namesleft > 0?
+
+ {
+ % mhh, 8.7.2002, JNS likes this best!
+ "{vv~}{ll}{ j{}}{ f{}}" 'lclfrmtstr :=
+ s nameptr lclfrmtstr format.name$ 't :=
+
+ nameptr #1 > % 7 is nameptr > 1?
+ { namesleft #1 > % 8 is namesleft > 1?
+ { ", " * t * } % 9 concat(, and t)
+
+ { numnames #2 > % 10 is numnames > 2?
+ { "" * } % 11 concat(current stack and ,)
+ 'skip$ % 12 skip
+ if$ % 13 if (10 is true) then run 11 else 12
+ t "others" = % 14 is t == others?
+ { " et~al." * } % 15 concat (current stack and et~al.)
+ { " \& " * t * } % 16 concat (and and t) (mhh) 04/02/08 J Physiol style
+ if$ % 17 if (14 is true) then run 15 else 16
+ } % 18 close 10
+ if$ % 19 if (8 is true) then run 9 else run 10-18
+ } % 20 close 8
+ 't % 21 push t
+ if$ % 22 if (7 is true) then run 8-20 else run 21
+ nameptr #1 + 'nameptr := % 23 nameptr = nameptr + 1
+ namesleft #1 - 'namesleft := % 24 namesleft = namesleft - 1
+ } % 25 close 6
+ while$ % while (5 is true) run 6-25
+}
+
+FUNCTION {format.authors}
+{ author empty$
+ { "" }
+ { author format.names }
+ if$
+}
+
+FUNCTION {format.key} % this function is just for apalike
+{ empty$
+ { key field.or.null }
+ { "" }
+ if$
+}
+
+FUNCTION {format.editors}
+{ editor empty$
+ { "" }
+ { editor format.names
+ editor num.names$ #1 >
+ { ", editors" * }
+ { ", editor" * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.title}
+{ title empty$
+ { "" }
+
+ { title "t" change.case$ }
+
+ if$
+}
+
+FUNCTION {n.dashify}
+{ 't :=
+ ""
+ { t empty$ not }
+ { t #1 #1 substring$ "-" =
+ { t #1 #2 substring$ "--" = not
+ { "--" *
+ t #2 global.max$ substring$ 't :=
+ }
+ { { t #1 #1 substring$ "-" = }
+ { "-" *
+ t #2 global.max$ substring$ 't :=
+ }
+ while$
+ }
+ if$
+ }
+ { t #1 #1 substring$ *
+ t #2 global.max$ substring$ 't :=
+ }
+ if$
+ }
+ while$
+}
+
+FUNCTION {format.date}
+{ year empty$
+ { month empty$
+ { "" }
+ { "there's a month but no year in " cite$ * warning$
+ month
+ }
+ if$
+ }
+ { month empty$
+ 'year
+ { month " " * year * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.btitle}
+{ title emphasize
+}
+
+FUNCTION {tie.or.space.connect}
+{ duplicate$ text.length$ #3 <
+ { "~" }
+ { " " }
+ if$
+ swap$ * *
+}
+
+FUNCTION {either.or.check}
+{ empty$
+ 'pop$
+ { "can't use both " swap$ * " fields in " * cite$ * warning$ }
+ if$
+}
+
+FUNCTION {format.bvolume}
+{ volume empty$
+ { "" }
+ { "Vol.~" volume *
+ series empty$
+ 'skip$
+ { " of " * series emphasize * }
+ if$
+ "volume and number" number either.or.check
+ }
+ if$
+}
+
+FUNCTION {format.number.series}
+{ volume empty$
+ { number empty$
+ { series field.or.null }
+ { output.state mid.sentence =
+ { "number" }
+ { "Number" }
+ if$
+ number tie.or.space.connect
+ series empty$
+ { "there's a number but no series in " cite$ * warning$ }
+ { " in " * series * }
+ if$
+ }
+ if$
+ }
+ { "" }
+ if$
+}
+
+FUNCTION {format.edition}
+{ edition empty$
+ { "" }
+ { output.state mid.sentence =
+ { edition "l" change.case$ " edition" * }
+ { edition "t" change.case$ " edition" * }
+ if$
+ }
+ if$
+}
+
+INTEGERS { multiresult }
+
+FUNCTION {multi.page.check}
+{ 't :=
+ #0 'multiresult :=
+ { multiresult not
+ t empty$ not
+ and
+ }
+ { t #1 #1 substring$
+ duplicate$ "-" =
+ swap$ duplicate$ "," =
+ swap$ "+" =
+ or or
+ { #1 'multiresult := }
+ { t #2 global.max$ substring$ 't := }
+ if$
+ }
+ while$
+ multiresult
+}
+
+FUNCTION {format.pages}
+{ pages empty$
+ { "" }
+ { pages multi.page.check
+ { "\mbox{pp. " pages n.dashify * "}" *}
+ { "\mbox{p. " pages * "}" * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.vol.num.pages}
+{ volume bold field.or.null
+ number empty$
+ 'skip$
+ { %"(" bold number * ")" * * % JNS needs no number
+ volume empty$
+ { "there's a number but no volume in " cite$ * warning$ }
+ 'skip$
+ if$
+ }
+ if$
+ pages empty$
+ 'skip$
+ { duplicate$ empty$
+ { pop$ format.pages }
+ { ", \mbox{" * pages n.dashify * "}" *} % ADR 21 DEC 1998 added ":~" and \mbox{pages}
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.chapter.pages}
+{ chapter empty$
+ 'format.pages
+ { type empty$
+ { "chapter" }
+ { type "l" change.case$ }
+ if$
+ chapter tie.or.space.connect
+ pages empty$
+ 'skip$
+ { ", " * format.pages * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.in.ed.booktitle}
+{ booktitle empty$
+ { "" }
+ { editor empty$
+ { "In " booktitle emphasize * }
+ { "In " format.editors * ", " * booktitle emphasize * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {empty.misc.check}
+{ author empty$ title empty$ howpublished empty$
+ month empty$ year empty$ note empty$
+ and and and and and
+
+ key empty$ not and
+
+ { "all relevant fields are empty in " cite$ * warning$ }
+ 'skip$
+ if$
+}
+
+FUNCTION {format.thesis.type}
+{ type empty$
+ 'skip$
+ { pop$
+ type "t" change.case$
+ }
+ if$
+}
+
+FUNCTION {format.tr.number}
+{ type empty$
+ { "Technical report" }
+ 'type
+ if$
+ number empty$
+ { "t" change.case$ }
+ { number tie.or.space.connect }
+ if$
+}
+
+FUNCTION {format.dotarticle.crossref}
+{ key empty$
+ { journal empty$
+ { "need key or journal for " cite$ * " to crossref " * crossref *
+ warning$
+ ""
+ }
+ { "In {\em " journal * "\/}" * }
+ if$
+ }
+ { "In " key * }
+ if$
+ " \shortcite{" * crossref * "}" *
+}
+
+FUNCTION {format.crossref.editor}
+{ editor #1 "{vv~}{ll}" format.name$
+ editor num.names$ duplicate$
+ #2 >
+ { pop$ " et~al." * }
+ { #2 <
+ 'skip$
+ { editor #2 "{ff }{vv }{ll}{ jj}" format.name$ "others" =
+ { " et~al." * }
+ { " and " * editor #2 "{vv~}{ll}" format.name$ * }
+ if$
+ }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.book.crossref}
+{ volume empty$
+ { "empty volume in " cite$ * "'s crossref of " * crossref * warning$
+ "In "
+ }
+ { "Vol." volume tie.or.space.connect
+ " of " *
+ }
+ if$
+ editor empty$
+ editor field.or.null author field.or.null =
+ or
+ { key empty$
+ { series empty$
+ { "need editor, key, or series for " cite$ * " to crossref " *
+ crossref * warning$
+ "" *
+ }
+ { "{\em " * series * "\/}" * }
+ if$
+ }
+ { key * }
+ if$
+ }
+ { format.crossref.editor * }
+ if$
+ " \shortcite{" * crossref * "}" *
+}
+
+FUNCTION {format.incoll.inproc.crossref}
+{ editor empty$
+ editor field.or.null author field.or.null =
+ or
+ { key empty$
+ { booktitle empty$
+ { "need editor, key, or booktitle for " cite$ * " to crossref " *
+ crossref * warning$
+ ""
+ }
+ { "In {\em " booktitle * "\/}" * }
+ if$
+ }
+ { "In " key * }
+ if$
+ }
+ { "In " format.crossref.editor * }
+ if$
+ " \shortcite{" * crossref * "}" *
+}
+
+FUNCTION {format.article.crossref}
+{ key empty$
+ { journal empty$
+ { "need key or journal for " cite$ * " to crossref " * crossref *
+ warning$
+ ""
+ }
+ { "In {\em " journal * "\/}" * }
+ if$
+ }
+ { "In " key * }
+ if$
+ " \shortcite{" * crossref * "}" *
+}
+
+FUNCTION {article}
+{ output.bibitem
+ format.authors "author" output.check
+ author format.key output % special for
+ output.year.check % apalike
+ new.block
+ format.title "title" output.check
+ new.block
+ crossref missing$
+ { journal emphasize "journal" output.checkdot
+ "~" * format.vol.num.pages *
+ }
+ { format.article.crossref output.nonnull
+ format.pages output
+ }
+ if$
+ new.block
+ note output
+ fin.entry
+}
+
+
+FUNCTION {book}
+{ output.bibitem
+ author empty$
+ { format.editors "author and editor" output.check
+ editor format.key output
+ }
+ { format.authors output.nonnull
+ crossref missing$
+ { "author and editor" editor either.or.check }
+ 'skip$
+ if$
+ }
+ if$
+ output.year.check % special for apalike
+ new.block
+ format.btitle "title" output.check
+ new.block
+ crossref missing$
+ { format.bvolume output
+ new.block
+ format.number.series output
+ new.sentence
+ publisher "publisher" output.check
+ address output
+ }
+ { new.block
+ format.book.crossref output.nonnull
+ }
+ if$
+ format.edition output
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {booklet}
+{ output.bibitem
+ format.authors output
+ author format.key output % special for
+ output.year.check % apalike
+ new.block
+ format.title "title" output.check
+ new.block
+ howpublished output
+ address output
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {inbook}
+{ output.bibitem
+ author empty$
+ { format.editors "author and editor" output.check
+ editor format.key output
+ }
+ { format.authors output.nonnull
+ crossref missing$
+ { "author and editor" editor either.or.check }
+ 'skip$
+ if$
+ }
+ if$
+ output.year.check % special for apalike
+ new.block
+ format.btitle "title" output.check
+ crossref missing$
+ { format.bvolume output
+ format.chapter.pages "chapter and pages" output.check
+ new.block
+ format.number.series output
+ new.sentence
+ publisher "publisher" output.check
+ address output
+ }
+ { format.chapter.pages "chapter and pages" output.check
+ new.block
+ format.book.crossref output.nonnull
+ }
+ if$
+ format.edition output
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {incollection}
+{ output.bibitem
+ format.authors "author" output.check
+ author format.key output % special for
+ output.year.check % apalike
+ new.block
+ format.title "title" output.check
+ new.block
+ crossref missing$
+ { format.in.ed.booktitle "booktitle" output.check
+ format.bvolume output
+ format.number.series output
+ format.chapter.pages output
+ new.sentence
+ publisher "publisher" output.check
+ address output
+ format.edition output
+ }
+ { format.incoll.inproc.crossref output.nonnull
+ format.chapter.pages output
+ }
+ if$
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {inproceedings}
+{ output.bibitem
+ format.authors "author" output.check
+ author format.key output % special for
+ output.year.check % apalike
+ new.block
+ format.title "title" output.check
+ new.block
+ crossref missing$
+ { format.in.ed.booktitle "booktitle" output.check
+ format.bvolume output
+ format.number.series output
+ format.pages output
+ address output % for apalike
+ new.sentence % there's no year
+ organization output % here so things
+ publisher output % are simpler
+ }
+ { format.incoll.inproc.crossref output.nonnull
+ format.pages output
+ }
+ if$
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {conference} { inproceedings }
+
+FUNCTION {manual}
+{ output.bibitem
+ format.authors output
+ author format.key output % special for
+ output.year.check % apalike
+ new.block
+ format.btitle "title" output.check
+ organization address new.block.checkb
+ organization output
+ address output
+ format.edition output
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {mastersthesis}
+{ output.bibitem
+ format.authors "author" output.check
+ author format.key output % special for
+ output.year.check % apalike
+ new.block
+ format.title "title" output.check
+ new.block
+ "Master's thesis" format.thesis.type output.nonnull
+ school "school" output.check
+ address output
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {misc}
+{ output.bibitem
+ format.authors output
+ author format.key output % special for
+ output.year.check % apalike
+ new.block
+ format.title output
+ new.block
+ howpublished output
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {phdthesis}
+{ output.bibitem
+ format.authors "author" output.check
+ author format.key output % special for
+ output.year.check % apalike
+ new.block
+ title "title" output.check
+ new.block
+ "Ph.D. diss." format.thesis.type output.nonnull
+ school "school" output.check
+ address output
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {proceedings}
+{ output.bibitem
+ format.editors output
+ editor format.key output % special for
+ output.year.check % apalike
+ new.block
+ format.btitle "title" output.check
+ format.bvolume output
+ format.number.series output
+ address output % for apalike
+ new.sentence % we always output
+ organization output % a nonempty organization
+ publisher output % here
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {techreport}
+{ output.bibitem
+ format.authors "author" output.check
+ author format.key output % special for
+ output.year.check % apalike
+ new.block
+ format.title "title" output.check
+ new.block
+ format.tr.number output.nonnull
+ institution "institution" output.check
+ address output
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {unpublished}
+{ output.bibitem
+ format.authors "author" output.check
+ author format.key output % special for
+ output.year.check % apalike
+ new.block
+ format.title "title" output.check
+ new.block
+ note "note" output.check
+ fin.entry
+}
+
+FUNCTION {default.type} { misc }
+
+MACRO {jan} {"January"}
+
+MACRO {feb} {"February"}
+
+MACRO {mar} {"March"}
+
+MACRO {apr} {"April"}
+
+MACRO {may} {"May"}
+
+MACRO {jun} {"June"}
+
+MACRO {jul} {"July"}
+
+MACRO {aug} {"August"}
+
+MACRO {sep} {"September"}
+
+MACRO {oct} {"October"}
+
+MACRO {nov} {"November"}
+
+MACRO {dec} {"December"}
+
+MACRO {acmcs} {"ACM Computing Surveys"}
+
+MACRO {acta} {"Acta Informatica"}
+
+MACRO {cacm} {"Communications of the ACM"}
+
+MACRO {ibmjrd} {"IBM Journal of Research and Development"}
+
+MACRO {ibmsj} {"IBM Systems Journal"}
+
+MACRO {ieeese} {"IEEE Transactions on Software Engineering"}
+
+MACRO {ieeetc} {"IEEE Transactions on Computers"}
+
+MACRO {ieeetcad}
+ {"IEEE Transactions on Computer-Aided Design of Integrated Circuits"}
+
+MACRO {ipl} {"Information Processing Letters"}
+
+MACRO {jacm} {"Journal of the ACM"}
+
+MACRO {jcss} {"Journal of Computer and System Sciences"}
+
+MACRO {scp} {"Science of Computer Programming"}
+
+MACRO {sicomp} {"SIAM Journal on Computing"}
+
+MACRO {tocs} {"ACM Transactions on Computer Systems"}
+
+MACRO {tods} {"ACM Transactions on Database Systems"}
+
+MACRO {tog} {"ACM Transactions on Graphics"}
+
+MACRO {toms} {"ACM Transactions on Mathematical Software"}
+
+MACRO {toois} {"ACM Transactions on Office Information Systems"}
+
+MACRO {toplas} {"ACM Transactions on Programming Languages and Systems"}
+
+MACRO {tcs} {"Theoretical Computer Science"}
+
+READ
+
+FUNCTION {sortify}
+{ purify$
+ "l" change.case$
+}
+
+INTEGERS { len }
+
+FUNCTION {chop.word}
+{ 's :=
+ 'len :=
+ s #1 len substring$ =
+ { s len #1 + global.max$ substring$ }
+ 's
+ if$
+}
+
+INTEGERS { et.al.char.used }
+
+FUNCTION {initialize.et.al.char.used}
+{ #0 'et.al.char.used :=
+}
+
+EXECUTE {initialize.et.al.char.used}
+
+FUNCTION {format.lab.names}
+{ 's := % 1 s = top of stack
+ s num.names$ 'numnames := % 2 numnames = num names in s
+
+ numnames #1 = % 3 is numnames == 1
+ { s #1 "{vv }{ll}" format.name$ } % 4 format 1 name
+ { numnames #2 = % 5 is numnames == 2
+ { s #1 "{vv }{ll} and " format.name$
+ s #2 "{vv }{ll}" format.name$ *
+ }
+ % 6 format 2 names
+ { numnames #3 = % 7 is numnames == 3
+ { s #1 "{vv }{ll} " format.name$
+ "\bgroup et al.\egroup " * }
+% s #2 "{vv }{ll}, and " format.name$ *
+% s #3 "{vv }{ll}" format.name$ *}
+ % 8 format 3 names
+ { s #1 "{vv }{ll } " format.name$
+ "\bgroup et al.\egroup " * }
+ % 9 format many names
+ if$ % 10 if 7 then 8 else 9
+ } % 11 close 7
+ if$ % 12 if (5) then 6 else 7-11
+ } % 13 close 5
+ if$ % 14 if 3 is true then 4 else 5-13
+
+}
+
+FUNCTION {old.old.old.format.lab.names}
+{ 's := % 1 s = top of stack
+ s num.names$ 'numnames := % 2 numnames = num names in s
+
+ numnames #1 = % 3 is numnames == 1
+ { s #1 "{vv }{ll}" format.name$ } % 4 format 1 name
+ { numnames #2 = % 5 is numnames == 2
+ { s #1 "{vv }{ll }and " format.name$ s #2 "{vv }{ll}" format.name$ *
+ }
+ % 6 format 2 names
+ { s #1 "{vv }{ll }\bgroup \em et al.\egroup " format.name$ }
+ % 7 format many names
+ if$ % 8 if (5) then 6 else 7
+ } % 9 close 5
+ if$ % 10 if 3 is true then 4 else 5-9
+
+}
+
+FUNCTION {author.key.label}
+{ author empty$
+ { key empty$
+
+ { cite$ #1 #3 substring$ }
+
+ { key }
+ if$
+ }
+ { author format.lab.names }
+ if$
+}
+
+FUNCTION {author.editor.key.label}
+{ author empty$
+ { editor empty$
+ { key empty$
+
+ { cite$ #1 #3 substring$ }
+
+ { key }
+ if$
+ }
+ { editor format.lab.names }
+ if$
+ }
+ { author format.lab.names }
+ if$
+}
+
+FUNCTION {author.key.organization.label}
+{ author empty$
+ { key empty$
+ { organization empty$
+
+ { cite$ #1 #3 substring$ }
+
+ { "The " #4 organization chop.word #3 text.prefix$ }
+ if$
+ }
+ { key }
+ if$
+ }
+ { author format.lab.names }
+ if$
+}
+
+FUNCTION {editor.key.organization.label}
+{ editor empty$
+ { key empty$
+ { organization empty$
+
+ { cite$ #1 #3 substring$ }
+
+ { "The " #4 organization chop.word #3 text.prefix$ }
+ if$
+ }
+ { key }
+ if$
+ }
+ { editor format.lab.names }
+ if$
+}
+
+FUNCTION {calc.label}
+{ type$ "book" =
+ type$ "inbook" =
+ or
+ 'author.editor.key.label
+ { type$ "proceedings" =
+ 'editor.key.organization.label
+ { type$ "manual" =
+ 'author.key.organization.label
+ 'author.key.label
+ if$
+ }
+ if$
+ }
+ if$
+ duplicate$
+
+ "\protect\citeauthoryear{" swap$ * "}{" *
+ year field.or.null purify$ * % CHANGED - pfps - 15 Feb 1989
+ 'label :=
+ year field.or.null purify$ *
+
+ sortify 'sort.label :=
+}
+
+FUNCTION {sort.format.names}
+{ 's :=
+ #1 'nameptr :=
+ ""
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+
+ { namesleft #0 > }
+ { nameptr #1 >
+ { " " * }
+ 'skip$
+ if$
+
+ s nameptr "{vv{ } }{ll{ }}{ ff{ }}{ jj{ }}" format.name$ 't :=
+
+ t sortify *
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+}
+
+FUNCTION {old.sort.format.names.old}
+{ 's :=
+ #1 'nameptr :=
+ ""
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ { nameptr #1 >
+ { " " * }
+ 'skip$
+ if$
+
+ s nameptr "{vv{ } }{ll{ }}{ ff{ }}{ jj{ }}" format.name$ 't :=
+
+ nameptr numnames = t "others" = and
+ { "et al" * }
+ { t sortify * }
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+}
+
+FUNCTION {sort.format.title}
+{ 't :=
+ "A " #2
+ "An " #3
+ "The " #4 t chop.word
+ chop.word
+ chop.word
+ sortify
+ #1 global.max$ substring$
+}
+
+FUNCTION {author.sort}
+{ author empty$
+ { key empty$
+ { "to sort, need author or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { author sort.format.names }
+ if$
+}
+
+FUNCTION {author.editor.sort}
+{ author empty$
+ { editor empty$
+ { key empty$
+ { "to sort, need author, editor, or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { editor sort.format.names }
+ if$
+ }
+ { author sort.format.names }
+ if$
+}
+
+FUNCTION {author.organization.sort}
+{ author empty$
+ { organization empty$
+ { key empty$
+ { "to sort, need author, organization, or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { "The " #4 organization chop.word sortify }
+ if$
+ }
+ { author sort.format.names }
+ if$
+}
+
+FUNCTION {editor.organization.sort}
+{ editor empty$
+ { organization empty$
+ { key empty$
+ { "to sort, need editor, organization, or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { "The " #4 organization chop.word sortify }
+ if$
+ }
+ { editor sort.format.names }
+ if$
+}
+
+FUNCTION {presort}
+
+{
+ calc.label
+ type$ "book" =
+ type$ "inbook" =
+ or
+ 'author.editor.sort
+ { type$ "proceedings" =
+ 'editor.organization.sort
+ { type$ "manual" =
+ 'author.organization.sort
+ 'author.sort
+ if$
+ }
+ if$
+ }
+ if$
+ " " *
+ year field.or.null sortify *
+ " " *
+ title field.or.null
+ sort.format.title *
+
+ #1 entry.max$ substring$
+ 'sort.key$ :=
+}
+
+ITERATE {presort}
+
+SORT
+
+STRINGS { longest.label last.sort.label next.extra }
+
+INTEGERS { longest.label.width last.extra.num }
+
+FUNCTION {initialize.longest.label}
+{ "" 'longest.label :=
+ #0 int.to.chr$ 'last.sort.label :=
+ "" 'next.extra :=
+ #0 'longest.label.width :=
+ #0 'last.extra.num :=
+}
+
+FUNCTION {forward.pass}
+{ last.sort.label sort.label =
+ { last.extra.num #1 + 'last.extra.num :=
+ last.extra.num int.to.chr$ 'extra.label :=
+ }
+ { "a" chr.to.int$ 'last.extra.num :=
+ "" 'extra.label :=
+ sort.label 'last.sort.label :=
+ }
+ if$
+}
+
+FUNCTION {reverse.pass}
+{ next.extra "b" =
+ { "a" 'extra.label := }
+ 'skip$
+ if$
+ label extra.label * "}" * 'label := % CHANGED - pfps 15 Feb 1989
+ label width$ longest.label.width >
+ { label 'longest.label :=
+ label width$ 'longest.label.width :=
+ }
+ 'skip$
+ if$
+ extra.label 'next.extra :=
+}
+
+EXECUTE {initialize.longest.label}
+
+ITERATE {forward.pass}
+
+REVERSE {reverse.pass}
+
+FUNCTION {begin.bib}
+
+{ et.al.char.used
+ { "\newcommand{\etalchar}[1]{$^{#1}$}" write$ newline$ }
+ 'skip$
+ if$
+ preamble$ empty$
+
+ 'skip$
+ { preamble$ write$ newline$ }
+ if$
+
+ "\begin{thebibliography}{}" write$ newline$
+
+}
+
+EXECUTE {begin.bib}
+
+EXECUTE {init.state.consts}
+
+ITERATE {call.type$}
+
+FUNCTION {end.bib}
+{ newline$
+ "\end{thebibliography}" write$ newline$
+}
+
+EXECUTE {end.bib}
+
diff --git a/biblio/bibtex/contrib/jphysiol/jphysiol.sty b/biblio/bibtex/contrib/jphysiol/jphysiol.sty
new file mode 100644
index 0000000000..e2ef194162
--- /dev/null
+++ b/biblio/bibtex/contrib/jphysiol/jphysiol.sty
@@ -0,0 +1,93 @@
+% This is a slightly modified version of the namedplus style, which fully conforms
+% with the Journal of Physiology citation style.
+% Last modified 2009 Jan 28 by Matthias Hennig (mhhennig@gmail.com)
+%
+% version = 1.00 of jphysiol.bst 2009 Jan 28
+%
+% Use the following citation macros:
+% \cite, \citeauthor, \citeyear, \citenoparens, and \citetext \citenoparens
+%
+% The references are created as a full list of authors (year) and then
+% the standard rest of the stuff, e.g:
+%
+% Hubel DH & Wiesel TN (1962). Receptive Fields, binocular interaction, and
+% functional architecture in the cat's visual cortex. J Physiol 160, 106-154.
+%
+% Koch C (1999). Biophysics of Computation: Information Processing in Single
+% Neurons. Oxford University Press.
+%
+% Ódor G (2004). Universality classes in nonequilibrium lattice systems.
+% Rev Mod Phys 76, 663-724.
+%
+% The journal/book title is in itaclics, and the journal volume in boldface,
+% as required. This has not been fully checked, let me know if you find errors.
+%
+%
+% This is a modified version of the namedplus style by:
+% -----------------------------------------------------
+% A. David Redish adr@nsma.arizona.edu
+% Post-doc http://www.cs.cmu.edu/~dredish
+% Neural Systems, Memory and Aging, Univ of AZ, Tucson AZ
+% -----------------------------------------------------
+%
+% The ``named'' bibliography style creates citations with labels like
+% \citeauthoryear{author-info}{year}
+% these labels are processed by the following commands:
+% \cite{key}
+% which produces citations with both author and year,
+% enclosed in parens.
+% \shortcite{key}
+% which produces citations with year only,
+% enclosed in parens
+% \citeauthor{key}
+% which produces the author information only
+% \citeyear{key}
+% which produces the year information only
+% \citetext{key}
+% which produces Author (Year)
+% \citenoparens{key}
+% which produces Author, Year
+
+\def\@biblabel#1{}
+
+\let\@internalcite\cite
+
+\def\cite{\def\@citeseppen{-1000}%
+ \def\@cite##1##2{(\nobreak\hskip 0in{##1\if@tempswa , ##2\fi})}%
+ \def\citeauthoryear##1##2{##1, ##2}\@internalcite}
+
+\def\citetext{\def\@citeseppen{-1000}%
+ \def\@cite##1##2{\nobreak\hskip 0in{##1\if@tempswa , ##2\fi}}%
+ \def\citeauthoryear##1##2{##1~(##2)}\@internalcite}
+
+\def\citenoparens{\def\@citeseppen{-1000}%
+ \def\@cite##1##2{\nobreak\hskip 0in{##1\if@tempswa , ##2\fi}}%
+ \def\citeauthoryear##1##2{##1, ##2}\@internalcite}
+
+\def\shortcite{\def\@citeseppen{1000}%
+ \def\@cite##1##2{({##1\if@tempswa , ##2\fi})}%
+ \def\citeauthoryear##1##2{##2}\@internalcite}
+
+\def\citeauthor#1{\def\@cite##1##2{{##1\if@tempswa , ##2\fi}}%
+ \def\citeauthoryear##1##2{##1}\@citedata{#1}}
+
+\def\citeyear#1{\def\@cite##1##2{{##1\if@tempswa , ##2\fi}}%
+ \def\citeauthoryear##1##2{##2}\@citedata{#1}}
+
+\def\@citedata#1{\@tempswafalse%
+ \if@filesw\immediate\write\@auxout{\string\citation{#1}}\fi
+ \def\@citea{}\@cite{\@for\@citeb:=#1\do
+ {\@citea\def\@citea{;\penalty\@citeseppen\ }\@ifundefined
+ {b@\@citeb}{{\bf ?}\@warning
+ {Citation `\@citeb' on page \thepage \space undefined}}%
+{\csname b@\@citeb\endcsname}}}{}}
+
+% don't box citations, separate with ; and a space
+% also, make the penalty between citations negative: a good place to break
+\def\@citex[#1]#2{\if@filesw\immediate\write\@auxout{\string\citation{#2}}\fi
+ \def\@citea{}\@cite{\@for\@citeb:=#2\do
+ {\@citea\def\@citea{;\penalty\@citeseppen\ }\@ifundefined
+ {b@\@citeb}{{\bf ?}\@warning
+ {Citation `\@citeb' on page \thepage \space undefined}}%
+{\csname b@\@citeb\endcsname}}}{#1}}
+
diff --git a/biblio/bibtex/contrib/ksfh_nat/ksfh_nat.bst b/biblio/bibtex/contrib/ksfh_nat/ksfh_nat.bst
new file mode 100644
index 0000000000..ec2dc5c2fa
--- /dev/null
+++ b/biblio/bibtex/contrib/ksfh_nat/ksfh_nat.bst
@@ -0,0 +1,1277 @@
+%%%
+%%% This ksfh_nat.bst file is for proper format
+%%% for KSFH Munich standard.
+%%%
+% Copyright 2011, Matthias Bilger
+% This work may be distributed and/or modified under the
+% conditions of the LaTeX Project Public License, either
+% version 1.3 of this license or (at your option) any
+% later version.
+% The latest version of the license is in
+% http://www.latex-project.org/lppl.txt
+% and version 1.3 or later is part of all distributions of
+% LaTeX version 2005/12/01 or later.
+%
+% This work has the LPPL maintenance status `maintained'.
+%
+% The Current Maintainer of this work is Matthias Bilger,
+% <matthias@bilger.info>
+%
+% Version 1.1 2011/12/06
+%
+%%%
+
+%% Types of entries currently allowed in a BibTeX file:
+%%
+%% ARTICLE -- An article from a journal or magazine.
+%%
+%% BOOK -- A book with an explicit publisher.
+%%
+%% INBOOK -- A part of a book,
+%% which may be a chapter (or section or whatever) and/or a range of pages.
+%%
+%% INCOLLECTION -- A part of a book having its own title.
+%%
+%% MISC -- Use this type when nothing else fits.
+%%
+
+
+ENTRY
+ {
+ abstract
+ address
+ author
+ booktitle
+ edition
+ editor
+ howpublished
+ note
+ number
+ pages
+ publisher
+ title
+ year
+ }
+ {}
+ { label extra.label sort.label short.list }
+INTEGERS { output.state before.all mid.sentence after.sentence after.block }
+FUNCTION {init.state.consts}
+{ #0 'before.all :=
+ #1 'mid.sentence :=
+ #2 'after.sentence :=
+ #3 'after.block :=
+}
+STRINGS { s t}
+FUNCTION {output.nonnull}
+{ 's :=
+ output.state mid.sentence =
+ { ", " * write$ }
+ { output.state after.block =
+ { add.period$ write$
+ newline$
+ "\newblock " write$
+ }
+ { output.state before.all =
+ 'write$
+ { add.period$ " " * write$ }
+ if$
+ }
+ if$
+ mid.sentence 'output.state :=
+ }
+ if$
+ s
+}
+FUNCTION {output.nonnull.nostate}
+{ 's :=
+ output.state after.block =
+ { add.period$ write$
+ newline$
+ "\newblock " write$
+ }
+ 'write$
+ if$
+ s
+}
+FUNCTION {output}
+{ duplicate$ empty$
+ 'pop$
+ 'output.nonnull
+ if$
+}
+FUNCTION {output.check}
+{ 't :=
+ duplicate$ empty$
+ { pop$ "empty " t * " in " * cite$ * warning$ }
+ 'output.nonnull
+ if$
+}
+INTEGERS { nameptr namesleft numnames posothers showetal myint }
+
+FUNCTION {format.full.names}
+{ 's :=
+ #1 'nameptr :=
+ s num.names$ 'numnames :=
+ numnames #4 >
+ {
+ s nameptr
+ "{vv~}{ll}" format.name$
+ " u.a." *
+ }
+ {
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ { s nameptr
+ "{vv~}{ll}" format.name$ 't :=
+ nameptr #1 >
+ { namesleft #1 >
+ { " / " * t * }
+ { t "others" =
+ { " u.a. " * }
+ { " / " * t * }
+ if$
+ }
+ if$
+ }
+ 't
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+ }
+ if$
+}
+
+FUNCTION {create.bibitem.names }
+{
+ type$ "misc" =
+ { author format.full.names }
+ 'skip$
+ if$
+
+ type$ "article" =
+ { author format.full.names }
+ 'skip$
+ if$
+
+ type$ "book" =
+ { author format.full.names }
+ 'skip$
+ if$
+
+ type$ "incollection" =
+ { author format.full.names }
+ 'skip$
+ if$
+
+}
+
+FUNCTION {format.bibitem.first.name}
+{ #1 'nameptr :=
+ nameptr
+ "{vv~}{ll}" format.name$
+ author num.names$ #1 >
+ { " u.a." * }
+ 'skip$
+ if$
+}
+
+FUNCTION {create.bibitem.first.name}
+{
+ type$ "misc" =
+ { author format.bibitem.first.name }
+ 'skip$
+ if$
+
+ type$ "article" =
+ { author format.bibitem.first.name }
+ 'skip$
+ if$
+
+ type$ "book" =
+ { author format.bibitem.first.name }
+ 'skip$
+ if$
+
+ type$ "incollection" =
+ { author format.bibitem.first.name }
+ 'skip$
+ if$
+}
+
+FUNCTION {create.bibitem.year}
+{
+ year
+ "(" swap$ * ")" *
+}
+
+FUNCTION {output.bibitem}
+{ newline$
+ "\bibitem[" write$
+ create.bibitem.first.name
+ write$
+ create.bibitem.year
+ write$
+ create.bibitem.names
+ write$
+ "]{" write$
+ cite$ write$
+ "}" write$
+ newline$
+ ""
+ before.all 'output.state :=
+}
+FUNCTION {bibinfo.check}
+{ swap$
+ duplicate$ missing$
+ {
+ pop$ pop$
+ ""
+ }
+ { duplicate$ empty$
+ {
+ swap$ pop$
+ }
+ { swap$
+ pop$
+ }
+ if$
+ }
+ if$
+}
+FUNCTION {fin.entry}
+{ add.period$
+ write$
+ newline$
+}
+FUNCTION {new.block}
+{ output.state before.all =
+ 'skip$
+ { after.block 'output.state := }
+ if$
+}
+FUNCTION {new.sentence}
+{ output.state after.block =
+ 'skip$
+ { output.state before.all =
+ 'skip$
+ { after.sentence 'output.state := }
+ if$
+ }
+ if$
+}
+FUNCTION {add.blank}
+{ " " * before.all 'output.state :=
+}
+FUNCTION {add.colon}
+{ duplicate$ empty$
+ 'skip$
+ { ":" * add.blank }
+ if$
+}
+FUNCTION {not}
+{ { #0 }
+ { #1 }
+ if$
+}
+FUNCTION {and}
+{ 'skip$
+ { pop$ #0 }
+ if$
+}
+FUNCTION {or}
+{ { pop$ #1 }
+ 'skip$
+ if$
+}
+FUNCTION {field.or.null}
+{ duplicate$ empty$
+ { pop$ "" }
+ 'skip$
+ if$
+}
+FUNCTION {bolden}
+{ duplicate$ empty$
+ { pop$ "" }
+ { "\textbf{" swap$ * "}" * }
+ if$
+}
+FUNCTION {italize}
+{ duplicate$ empty$
+ { pop$ "" }
+ { "\textit{" swap$ * "}" * }
+ if$
+}
+FUNCTION {scaps}
+{ duplicate$ empty$
+ { pop$ "" }
+ { "\textsc{" swap$ * "}" * }
+ if$
+}
+FUNCTION {anglequote}
+{ duplicate$ empty$
+ { pop$ "" }
+ { "<<" swap$ * ">>" * }
+ if$
+}
+FUNCTION {singlequote}
+{ duplicate$ empty$
+ { pop$ "" }
+ { "'{}" swap$ * "'{}" * }
+ if$
+}
+FUNCTION {doublequote}
+{ duplicate$ empty$
+ { pop$ "" }
+ { "``{}" swap$ * "''{}" * }
+ if$
+}
+FUNCTION {format.names.author}
+{
+ 's :=
+
+ #1 'nameptr :=
+ s num.names$ 'numnames :=
+
+ numnames 'namesleft :=
+ #0 'posothers :=
+ { namesleft #0 > }
+ { s nameptr "{ll{ }}{, ff{ }}{ vv }" format.name$ 't :=
+ t "others" =
+ { nameptr 'posothers := }
+ 'skip$
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+
+ #0 'showetal :=
+
+ numnames #8 >
+ { #1 'numnames :=
+ #1 'showetal :=
+ }
+ { numnames #8 =
+ { posothers #0 >
+ { #1 'showetal :=
+ #1 'numnames :=
+ }
+ 'skip$
+ if$
+ }
+ { posothers #0 >
+ { #1 'showetal :=
+ #1 'numnames -
+ }
+ 'skip$
+ if$
+ }
+ if$
+ }
+ if$
+
+ #1 'nameptr :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ { s nameptr "{ll{ }}{, ff{ }}{ vv }" format.name$ 't :=
+ nameptr #1 >
+ { namesleft #1 >
+ { " / " * t * }
+ { showetal #0 >
+ { " / " * t * }
+ { " / " * t * }
+ if$
+ }
+ if$
+ }
+ 't
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+
+ showetal #0 >
+ { " u.a." * }
+ 'skip$
+ if$
+}
+
+FUNCTION {format.names.editor}
+{
+ 's :=
+
+ #1 'nameptr :=
+ s num.names$ 'numnames :=
+
+ numnames 'namesleft :=
+ #0 'posothers :=
+ { namesleft #0 > }
+ { s nameptr "{ll{ }}{, ff{ }}{vv}" format.name$ 't :=
+ t "others" =
+ { nameptr 'posothers := }
+ 'skip$
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+
+ #0 'showetal :=
+
+ numnames #8 >
+ { #1 'numnames :=
+ #1 'showetal :=
+ }
+ { numnames #8 =
+ { posothers #0 >
+ { #1 'showetal :=
+ #1 'numnames :=
+ }
+ 'skip$
+ if$
+ }
+ { posothers #0 >
+ { #1 'showetal :=
+ #1 'numnames -
+ }
+ 'skip$
+ if$
+ }
+ if$
+ }
+ if$
+
+ #1 'nameptr :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ { s nameptr "{ll{ }}{, ff{ }}{vv}" format.name$ 't :=
+ nameptr #1 >
+ { namesleft #1 >
+ { " / " * t * }
+ { showetal #0 >
+ { ", " * t * }
+ { " / " * t * }
+ if$
+ }
+ if$
+ }
+ 't
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+
+ showetal #0 >
+ { " u.a." * }
+ 'skip$
+ if$
+}
+
+FUNCTION {sortify}
+{ purify$
+ "l" change.case$
+}
+
+INTEGERS { len }
+
+
+FUNCTION {chop.word}
+{ 's :=
+ 'len :=
+ s #1 len substring$ =
+ { s len #1 + global.max$ substring$ }
+ 's
+ if$
+}
+
+FUNCTION {format.title.short}
+{ 't :=
+ "A " #2
+ "An " #3
+ "The " #4 t chop.word
+ chop.word
+ chop.word
+ #1 #3 substring$
+}
+FUNCTION {format.misc.author}
+{ author
+ duplicate$ empty$ 'skip$
+ { format.names.author }
+ if$
+ "author" bibinfo.check
+ duplicate$ empty$ 'skip$
+ {
+ }
+ if$
+}
+FUNCTION {format.misc.year}
+{ year
+ "year" bibinfo.check
+ duplicate$ empty$ 'skip$
+ {
+ }
+ if$
+}
+FUNCTION {format.misc.title}
+{ title
+ "title" bibinfo.check
+ duplicate$ empty$ 'skip$
+ {
+ italize
+ }
+ if$
+}
+FUNCTION {format.misc.howpublished}
+{ howpublished
+ "howpublished" bibinfo.check
+ duplicate$ empty$ 'skip$
+ {
+ }
+ if$
+}
+FUNCTION {format.misc.note}
+{ note
+ "note" bibinfo.check
+ duplicate$ empty$ 'skip$
+ {
+ }
+ if$
+}
+FUNCTION {misc}
+{ output.bibitem
+ author empty$
+ 'skip$
+ { format.misc.author
+ output.nonnull.nostate
+ }
+ if$
+ new.block
+ year empty$
+ 'skip$
+ { " ("
+ duplicate$ empty$ 'skip$
+ {
+ }
+ if$
+output.nonnull.nostate format.misc.year
+ output.nonnull.nostate
+ "):"
+ duplicate$ empty$ 'skip$
+ {
+ }
+ if$
+output.nonnull.nostate }
+ if$
+ new.block
+ title empty$
+ 'skip$
+ { format.misc.title
+ output.nonnull.nostate
+ newline$ "\newline "
+ output.nonnull.nostate
+ }
+ if$
+ new.block
+ howpublished empty$
+ 'skip$
+ { format.misc.howpublished
+ output.nonnull.nostate
+ }
+ if$
+ new.block
+ note empty$
+ 'skip$
+ { ", "
+ duplicate$ empty$ 'skip$
+ {
+ }
+ if$
+output.nonnull.nostate format.misc.note
+ output.nonnull.nostate
+ }
+ if$
+ new.block
+ fin.entry
+}
+FUNCTION {format.article.author}
+{ author
+ duplicate$ empty$ 'skip$
+ { format.names.author }
+ if$
+ "author" bibinfo.check
+ duplicate$ empty$ 'skip$
+ {
+ }
+ if$
+}
+FUNCTION {format.article.year}
+{ year
+ "year" bibinfo.check
+ duplicate$ empty$ 'skip$
+ {
+ }
+ if$
+}
+FUNCTION {format.article.title}
+{ title
+ "title" bibinfo.check
+ duplicate$ empty$ 'skip$
+ {
+ italize
+ }
+ if$
+}
+FUNCTION {format.article.booktitle}
+{ booktitle
+ "booktitle" bibinfo.check
+ duplicate$ empty$ 'skip$
+ {
+ }
+ if$
+}
+FUNCTION {format.article.number}
+{ number
+ "number" bibinfo.check
+ duplicate$ empty$ 'skip$
+ {
+ }
+ if$
+}
+FUNCTION {format.article.pages}
+{ pages
+ "pages" bibinfo.check
+ duplicate$ empty$ 'skip$
+ {
+ }
+ if$
+}
+FUNCTION {article}
+{ output.bibitem
+ author empty$
+ 'skip$
+ { format.article.author
+ output.nonnull.nostate
+ }
+ if$
+ new.block
+ year empty$
+ 'skip$
+ { "("
+ duplicate$ empty$ 'skip$
+ {
+ }
+ if$
+output.nonnull.nostate format.article.year
+ output.nonnull.nostate
+ "): "
+ duplicate$ empty$ 'skip$
+ {
+ }
+ if$
+output.nonnull.nostate }
+ if$
+ new.block
+ title empty$
+ 'skip$
+ { format.article.title
+ output.nonnull.nostate
+ }
+ if$
+ new.block
+ booktitle empty$
+ 'skip$
+ { "In: "
+ duplicate$ empty$ 'skip$
+ {
+ }
+ if$
+output.nonnull.nostate format.article.booktitle
+ output.nonnull.nostate
+ }
+ if$
+ new.block
+ number empty$
+ 'skip$
+ { ", "
+ duplicate$ empty$ 'skip$
+ {
+ }
+ if$
+output.nonnull.nostate format.article.number
+ output.nonnull.nostate
+ ": "
+ duplicate$ empty$ 'skip$
+ {
+ }
+ if$
+output.nonnull.nostate }
+ if$
+ new.block
+ pages empty$
+ 'skip$
+ { format.article.pages
+ output.nonnull.nostate
+ }
+ if$
+ new.block
+ fin.entry
+}
+FUNCTION {format.book.author}
+{ author
+ duplicate$ empty$ 'skip$
+ { format.names.author }
+ if$
+ "author" bibinfo.check
+ duplicate$ empty$ 'skip$
+ {
+ }
+ if$
+}
+FUNCTION {format.book.year}
+{ year
+ "year" bibinfo.check
+ duplicate$ empty$ 'skip$
+ {
+ }
+ if$
+}
+FUNCTION {format.book.title}
+{ title
+ "title" bibinfo.check
+ duplicate$ empty$ 'skip$
+ {
+ italize
+ }
+ if$
+}
+FUNCTION {format.book.address}
+{ address
+ "address" bibinfo.check
+ duplicate$ empty$ 'skip$
+ {
+ }
+ if$
+}
+FUNCTION {format.book.publisher}
+{ publisher
+ "publisher" bibinfo.check
+ duplicate$ empty$ 'skip$
+ {
+ }
+ if$
+}
+FUNCTION {format.book.edition}
+{ edition
+ "edition" bibinfo.check
+ duplicate$ empty$ 'skip$
+ {
+ }
+ if$
+}
+FUNCTION {format.book.pages}
+{ pages
+ "pages" bibinfo.check
+ duplicate$ empty$ 'skip$
+ {
+ }
+ if$
+}
+FUNCTION {book}
+{ output.bibitem
+ author empty$
+ 'skip$
+ { format.book.author
+ output.nonnull.nostate
+ " "
+ duplicate$ empty$ 'skip$
+ {
+ }
+ if$
+output.nonnull.nostate }
+ if$
+ new.block
+ year empty$
+ 'skip$
+ { " ("
+ duplicate$ empty$ 'skip$
+ {
+ }
+ if$
+output.nonnull.nostate format.book.year
+ output.nonnull.nostate
+ "): "
+ duplicate$ empty$ 'skip$
+ {
+ }
+ if$
+output.nonnull.nostate }
+ if$
+ new.block
+ title empty$
+ 'skip$
+ { format.book.title
+ output.nonnull.nostate
+ ". "
+ duplicate$ empty$ 'skip$
+ {
+ }
+ if$
+output.nonnull.nostate }
+ if$
+ new.block
+ address empty$
+ 'skip$
+ { format.book.address
+ output.nonnull.nostate
+ }
+ if$
+ new.block
+ publisher empty$
+ 'skip$
+ { ", "
+ duplicate$ empty$ 'skip$
+ {
+ }
+ if$
+output.nonnull.nostate format.book.publisher
+ output.nonnull.nostate
+ }
+ if$
+ new.block
+ edition empty$
+ 'skip$
+ { ", "
+ duplicate$ empty$ 'skip$
+ {
+ }
+ if$
+output.nonnull.nostate format.book.edition
+ output.nonnull.nostate
+ " Auflage"
+ duplicate$ empty$ 'skip$
+ {
+ }
+ if$
+output.nonnull.nostate }
+ if$
+ new.block
+ pages empty$
+ 'skip$
+ { ": "
+ duplicate$ empty$ 'skip$
+ {
+ }
+ if$
+output.nonnull.nostate format.book.pages
+ output.nonnull.nostate
+ }
+ if$
+ new.block
+ fin.entry
+}
+FUNCTION {format.incollection.author}
+{ author
+ duplicate$ empty$ 'skip$
+ { format.names.author }
+ if$
+ "author" bibinfo.check
+ duplicate$ empty$ 'skip$
+ {
+ }
+ if$
+}
+FUNCTION {format.incollection.year}
+{ year
+ "year" bibinfo.check
+ duplicate$ empty$ 'skip$
+ {
+ }
+ if$
+}
+FUNCTION {format.incollection.title}
+{ title
+ "title" bibinfo.check
+ duplicate$ empty$ 'skip$
+ {
+ italize
+ }
+ if$
+}
+FUNCTION {format.incollection.editor}
+{ editor
+ duplicate$ empty$ 'skip$
+ { format.names.editor }
+ if$
+ "editor" bibinfo.check
+ duplicate$ empty$ 'skip$
+ {
+ }
+ if$
+}
+FUNCTION {format.incollection.booktitle}
+{ booktitle
+ "booktitle" bibinfo.check
+ duplicate$ empty$ 'skip$
+ {
+ }
+ if$
+}
+FUNCTION {format.incollection.address}
+{ address
+ "address" bibinfo.check
+ duplicate$ empty$ 'skip$
+ {
+ }
+ if$
+}
+FUNCTION {format.incollection.publisher}
+{ publisher
+ "publisher" bibinfo.check
+ duplicate$ empty$ 'skip$
+ {
+ }
+ if$
+}
+FUNCTION {format.incollection.pages}
+{ pages
+ "pages" bibinfo.check
+ duplicate$ empty$ 'skip$
+ {
+ }
+ if$
+}
+FUNCTION {incollection}
+{ output.bibitem
+ author empty$
+ 'skip$
+ { format.incollection.author
+ output.nonnull.nostate
+ " "
+ duplicate$ empty$ 'skip$
+ {
+ }
+ if$
+output.nonnull.nostate }
+ if$
+ new.block
+ year empty$
+ 'skip$
+ { " ("
+ duplicate$ empty$ 'skip$
+ {
+ }
+ if$
+output.nonnull.nostate format.incollection.year
+ output.nonnull.nostate
+ "): "
+ duplicate$ empty$ 'skip$
+ {
+ }
+ if$
+output.nonnull.nostate }
+ if$
+ new.block
+ title empty$
+ 'skip$
+ { format.incollection.title
+ output.nonnull.nostate
+ ". "
+ duplicate$ empty$ 'skip$
+ {
+ }
+ if$
+output.nonnull.nostate }
+ if$
+ new.block
+ editor empty$
+ 'skip$
+ { "In: "
+ duplicate$ empty$ 'skip$
+ {
+ }
+ if$
+output.nonnull.nostate format.incollection.editor
+ output.nonnull.nostate
+ " (Hg.), "
+ duplicate$ empty$ 'skip$
+ {
+ }
+ if$
+output.nonnull.nostate }
+ if$
+ new.block
+ booktitle empty$
+ 'skip$
+ { format.incollection.booktitle
+ output.nonnull.nostate
+ "."
+ duplicate$ empty$ 'skip$
+ {
+ }
+ if$
+output.nonnull.nostate }
+ if$
+ new.block
+ address empty$
+ 'skip$
+ { " "
+ duplicate$ empty$ 'skip$
+ {
+ }
+ if$
+output.nonnull.nostate format.incollection.address
+ output.nonnull.nostate
+ }
+ if$
+ new.block
+ publisher empty$
+ 'skip$
+ { format.incollection.publisher
+ output.nonnull.nostate
+ }
+ if$
+ new.block
+ pages empty$
+ 'skip$
+ { ": "
+ duplicate$ empty$ 'skip$
+ {
+ }
+ if$
+output.nonnull.nostate format.incollection.pages
+ output.nonnull.nostate
+ }
+ if$
+ new.block
+ fin.entry
+}
+READ
+INTEGERS { et.al.char.used }
+
+FUNCTION {initialize.et.al.char.used}
+{ #0 'et.al.char.used :=
+}
+
+EXECUTE {initialize.et.al.char.used}
+
+FUNCTION {format.lab.names}
+{ 's :=
+ s num.names$ 'numnames :=
+ numnames #1 >
+ { numnames #8 >
+ { #7 'namesleft := }
+ { numnames 'namesleft := }
+ if$
+ #1 'nameptr :=
+ ""
+ { namesleft #0 > }
+ { nameptr numnames =
+ { s nameptr "{ff }{vv }{ll}{ jj}" format.name$ "others" =
+ { "{\etalchar{+}}" *
+ #1 'et.al.char.used :=
+ }
+ { s nameptr "{vv{}}{ll{}}" format.name$ * }
+ if$
+ }
+ { s nameptr "{vv{}}{ll{}}" format.name$ * }
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+ numnames #4 >
+ { "{\etalchar{+}}" *
+ #1 'et.al.char.used :=
+ }
+ 'skip$
+ if$
+ }
+ { s #1 "{vv{}}{ll{}}" format.name$
+ duplicate$ text.length$ #2 <
+ { pop$ s #1 "{ll}" format.name$ #3 text.prefix$ }
+ 'skip$
+ if$
+ }
+ if$
+}
+FUNCTION {author.year.label}
+{ author empty$
+ { year empty$
+ {cite$ #1 #3 substring$ }
+ {year format.title.short }
+ if$
+ }
+ { author format.lab.names }
+ if$
+ duplicate$
+ " " author " " sort.label * * * * warning$
+}
+FUNCTION {calc.label}
+{ type$ "misc" =
+ 'author.year.label
+ 'skip$
+ if$
+ type$ "book" =
+ 'author.year.label
+ 'skip$
+ if$
+ type$ "incollection" =
+ 'author.year.label
+ 'skip$
+ if$
+ duplicate$
+ year field.or.null purify$ #-1 #2 substring$
+ *
+ 'label :=
+ year field.or.null purify$ #1 #4 substring$
+ *
+ sortify 'sort.label :=
+ " " sort.label * warning$
+}
+FUNCTION {sort.format.names}
+{ 's :=
+ #1 'nameptr :=
+ ""
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ { nameptr #1 >
+ { " " * }
+ 'skip$
+ if$
+ s nameptr "{vv{ } }{ll{ }}{ f{ }}{ jj{ }}" format.name$ 't :=
+ nameptr numnames = t "others" = and
+ { "u.a." *}
+ { t sortify * }
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+}
+FUNCTION {sort.format.title}
+{ 't :=
+ "A " #2
+ "An " #3
+ "The " #4 t chop.word
+ chop.word
+ chop.word
+ sortify
+ #1 global.max$ substring$
+}
+FUNCTION {author.year.sort}
+{ author empty$
+ { year empty$
+ { "to sort, need author, oryear in " cite$ * warning$
+ ""
+}
+ {year format.title.short sortify } if$
+ }
+ { author sort.format.names }
+ if$
+}
+FUNCTION {presort}
+{ calc.label
+ sort.label
+ " "
+ *
+ type$ "misc" =
+ 'author.year.sort
+ 'skip$
+ if$
+ type$ "book" =
+ 'author.year.sort
+ 'skip$
+ if$
+ type$ "incollection" =
+ 'author.year.sort
+ 'skip$
+ if$
+ *
+ " "
+ *
+ year field.or.null sortify
+ *
+ " "
+ *
+ title field.or.null
+ sort.format.title
+ *
+ #1 entry.max$ substring$
+ 'sort.key$ :=
+}
+
+ITERATE {presort}
+
+SORT
+
+STRINGS { longest.label last.label next.extra }
+
+INTEGERS { longest.label.width last.extra.num number.label }
+
+FUNCTION { initialize.longest.label }
+{ "" 'longest.label :=
+ #0 int.to.chr$ 'last.label :=
+ "" 'next.extra :=
+ #0 'longest.label.width :=
+ #0 'last.extra.num :=
+ #0 'number.label :=
+}
+
+FUNCTION {forward.pass}
+{ last.label label =
+ { last.extra.num #1 + 'last.extra.num :=
+ last.extra.num int.to.chr$ 'extra.label :=
+ }
+ { "a" chr.to.int$ 'last.extra.num :=
+ "" 'extra.label :=
+ label 'last.label :=
+ }
+ if$
+ number.label #1 + 'number.label :=
+}
+
+FUNCTION {reverse.pass}
+{ next.extra "b" =
+ { "a" 'extra.label := }
+ 'skip$
+ if$
+ extra.label 'next.extra :=
+ extra.label
+ duplicate$ empty$
+ 'skip$
+ { "{\natexlab{" swap$ * "}}" * }
+ if$
+ 'extra.label :=
+ label extra.label * 'label :=
+}
+
+EXECUTE {initialize.longest.label}
+
+ITERATE {forward.pass}
+
+REVERSE {reverse.pass}
+
+FUNCTION {begin.bib}
+{ et.al.char.used
+ { "\newcommand{\etalchar}[1]{$^{#1}$}" write$ newline$ }
+ 'skip$
+ if$
+ preamble$ empty$
+ 'skip$
+ { preamble$ write$ newline$ }
+ if$
+ "\begin{thebibliography}{" number.label int.to.str$ * "}" * write$ newline$
+ "\providecommand{\natexlab}[1]{#1}" write$ newline$
+}
+EXECUTE {begin.bib}
+EXECUTE {init.state.consts}
+ITERATE {call.type$}
+FUNCTION {end.bib}
+{ newline$
+ "\end{thebibliography}" write$ newline$
+}EXECUTE {end.bib} \ No newline at end of file
diff --git a/biblio/bibtex/contrib/misc/IEEEannot.bst b/biblio/bibtex/contrib/misc/IEEEannot.bst
new file mode 100644
index 0000000000..1994d459b3
--- /dev/null
+++ b/biblio/bibtex/contrib/misc/IEEEannot.bst
@@ -0,0 +1,2626 @@
+%%
+%% IEEEannot.bst
+%% BibTeX Bibliography Style file
+%% Sorting version of IEEEtran.bst
+%% *** Not for use with work to be submitted to the IEEE ***
+%% Version 1.11 (2003/04/02)
+%%
+%% Copyright (c) 2003 Michael Shell
+%%
+%% Modified by Titus Barik (titus@barik.net) to support annotated
+%% bibliographies in IEEE citation format. Renamed to IEEEannot.bst.
+%% The latest version of IEEEannot can always be downloaded at:
+%%
+%% http://www.barik.net/sw/ieee/
+%%
+%% This version of IEEEannot is: 2004-15-02
+%%
+%% Original starting code base and algorithms obtained from the output of
+%% Patrick W. Daly's makebst package as well as from prior versions of
+%% IEEE BibTeX styles:
+%%
+%% 1. Howard Trickey and Oren Patashnik's ieeetr.bst (1985/1988)
+%% 2. Silvano Balemi and Richard H. Roy's IEEEbib.bst (1993)
+%%
+%% Added sorting code is from plain.bst.
+%%
+%% See:
+%% http://www.ctan.org/tex-archive/macros/latex/contrib/supported/IEEEtran/
+%% for latest version and current contact information.
+%%
+%% For use with BibTeX version 0.99a or later
+%%
+%% This is a numerical citation style.
+%%
+%%**********************************************************************
+%% Legal Notice:
+%% This code is offered as-is without any warranty either expressed or
+%% implied; without even the implied warranty of MERCHANTABILITY or
+%% FITNESS FOR A PARTICULAR PURPOSE!
+%% User assumes all risk.
+%% In no event shall IEEE or any contributor to this code be liable for
+%% any damages or losses, including, but not limited to, incidental,
+%% consequential, or any other damages, resulting from the use or misuse
+%% of any information contained here.
+%%
+%% This code is distributed under the Perl Artistic License
+%% ( http://language.perl.com/misc/Artistic.html )
+%% and may be freely used, distributed and modified - subject to the
+%% constraints therein.
+%% Retain all contribution notices, credits and disclaimers.
+%%
+%% All comments are the opinions of their respective authors and are not
+%% necessarily endorsed by the IEEE.
+%%**********************************************************************
+%
+%
+% Changelog:
+%
+% 1.10 (2002/09/27) Initial release
+%
+% 1.11 (2003/04/02)
+% 1. Fixed bug with URLs containing underscores when using url.sty. Thanks
+% to Ming Kin Lai for reporting this.
+
+
+
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% DEFAULTS FOR THE CONTROLS OF THE BST STYLE %%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+% These are the defaults for the user adjustable controls. The values used
+% here can be overridden by the user via IEEEtranBSTCTL entry type.
+
+% NOTE: The recommended LaTeX command to invoke a control entry type is:
+%
+%\makeatletter
+%\def\bstctlcite#1{\@bsphack
+% \@for\@citeb:=#1\do{%
+% \edef\@citeb{\expandafter\@firstofone\@citeb}%
+% \if@filesw\immediate\write\@auxout{\string\citation{\@citeb}}\fi}%
+% \@esphack}
+%\makeatother
+%
+% It is called at the start of the document, before the first \cite, like:
+% \bstctlcite{IEEEexample:BSTcontrol}
+%
+% IEEEtran.cls V1.6 and later does provide this command.
+
+
+
+% #0 turns off the display of the number for articles.
+% #1 enables
+FUNCTION {default.is.use.number.for.article} { #1 }
+
+
+% #0 turns off the display of the paper and type fields in @inproceedings.
+% #1 enables
+FUNCTION {default.is.use.paper} { #1 }
+
+
+% #0 turns off the forced use of "et al."
+% #1 enables
+FUNCTION {default.is.forced.et.al} { #0 }
+
+% The maximum number of names that can be present beyond which an "et al."
+% usage is forced. Be sure that num.names.shown.with.forced.et.al (below)
+% is not greater than this value!
+% Note: There are many instances of references in IEEE journals which have
+% a very large number of authors as well as instances in which "et al." is
+% used profusely.
+FUNCTION {default.max.num.names.before.forced.et.al} { #10 }
+
+% The number of names that will be shown with a forced "et al.".
+% Must be less than or equal to max.num.names.before.forced.et.al
+FUNCTION {default.num.names.shown.with.forced.et.al} { #1 }
+
+
+% #0 turns off the alternate interword spacing for entries with URLs.
+% #1 enables
+FUNCTION {default.is.use.alt.interword.spacing} { #1 }
+
+% If alternate interword spacing for entries with URLs is enabled, this is
+% the interword spacing stretch factor that will be used. For example, the
+% default "4" here means that the interword spacing in entries with URLs can
+% stretch to four times normal. Does not have to be an integer. Note that
+% the value specified here can be overridden by the user in their LaTeX
+% code via a command such as:
+% "\providecommand\BIBentryALTinterwordstretchfactor{1.5}" in addition to
+% that via the IEEEtranBSTCTL entry type.
+FUNCTION {default.ALTinterwordstretchfactor} { "4" }
+
+
+% #0 turns off the "dashification" of repeated (i.e., identical to those
+% of the previous entry) names. IEEE normally does this.
+% #1 enables
+FUNCTION {default.is.dash.repeated.names} { #1 }
+
+
+% The default name format control string.
+FUNCTION {default.name.format.string}{ "{f.~}{vv~}{ll}{, jj}" }
+
+
+% The default LaTeX font command for the names.
+FUNCTION {default.name.latex.cmd}{ "" }
+
+
+% Other controls that cannot be accessed via IEEEtranBSTCTL entry type.
+
+% #0 turns off the terminal startup banner/completed message so as to
+% operate more quietly.
+% #1 enables
+FUNCTION {is.print.banners.to.terminal} { #1 }
+
+
+
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% FILE VERSION AND BANNER %%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+FUNCTION{bst.file.version} { "1.11" }
+FUNCTION{bst.file.date} { "2003/04/02" }
+FUNCTION{bst.file.website} { "http://www.ctan.org/tex-archive/macros/latex/contrib/supported/IEEEtran/" }
+
+FUNCTION {banner.message}
+{ is.print.banners.to.terminal
+ { "-- IEEEtranS.bst version" " " * bst.file.version *
+ " (" * bst.file.date * ") " * "by Michael Shell." *
+ top$
+ "-- " bst.file.website *
+ top$
+ "-- See the " quote$ * "IEEEtran_bst_HOWTO.pdf" * quote$ * " manual for usage information." *
+ top$
+ "** Sorting version - not for use with work to be submitted to the IEEE."
+ top$
+ }
+ { skip$ }
+ if$
+}
+
+FUNCTION {completed.message}
+{ is.print.banners.to.terminal
+ { ""
+ top$
+ "Done."
+ top$
+ }
+ { skip$ }
+ if$
+}
+
+
+
+
+%%%%%%%%%%%%%%%%%%%%%%
+%% STRING CONSTANTS %%
+%%%%%%%%%%%%%%%%%%%%%%
+
+FUNCTION {bbl.and}{ "and" }
+FUNCTION {bbl.etal}{ "et~al." }
+FUNCTION {bbl.editors}{ "eds." }
+FUNCTION {bbl.editor}{ "ed." }
+FUNCTION {bbl.edition}{ "ed." }
+FUNCTION {bbl.volume}{ "vol." }
+FUNCTION {bbl.of}{ "of" }
+FUNCTION {bbl.number}{ "no." }
+FUNCTION {bbl.in}{ "in" }
+FUNCTION {bbl.pages}{ "pp." }
+FUNCTION {bbl.page}{ "p." }
+FUNCTION {bbl.chapter}{ "ch." }
+FUNCTION {bbl.paper}{ "paper" }
+FUNCTION {bbl.part}{ "pt." }
+FUNCTION {bbl.patent}{ "Patent" }
+FUNCTION {bbl.patentUS}{ "U.S." }
+FUNCTION {bbl.revision}{ "Rev." }
+FUNCTION {bbl.series}{ "ser." }
+FUNCTION {bbl.standard}{ "Std." }
+FUNCTION {bbl.techrep}{ "Tech. Rep." }
+FUNCTION {bbl.mthesis}{ "Master's thesis" }
+FUNCTION {bbl.phdthesis}{ "Ph.D. dissertation" }
+FUNCTION {bbl.urlprefix}{ "[Online]. Available:" }
+FUNCTION {bbl.st}{ "st" }
+FUNCTION {bbl.nd}{ "nd" }
+FUNCTION {bbl.rd}{ "rd" }
+FUNCTION {bbl.th}{ "th" }
+
+
+% This is the LaTeX spacer that is used when a larger than normal space
+% is called for (such as just before the address:publisher).
+FUNCTION {large.space} { "\hskip 1em plus 0.5em minus 0.4em\relax " }
+
+% The LaTeX code for dashes that are used to represent repeated names.
+% Note: Some older IEEE journals used something like
+% "\rule{0.275in}{0.5pt}\," which is fairly thick and runs right along
+% the baseline. However, IEEE now uses a thinner, above baseline,
+% six dash long sequence.
+FUNCTION {repeated.name.dashes} { "------" }
+
+
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% PREDEFINED STRING MACROS %%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+MACRO {jan} {"Jan."}
+MACRO {feb} {"Feb."}
+MACRO {mar} {"Mar."}
+MACRO {apr} {"Apr."}
+MACRO {may} {"May"}
+MACRO {jun} {"June"}
+MACRO {jul} {"July"}
+MACRO {aug} {"Aug."}
+MACRO {sep} {"Sept."}
+MACRO {oct} {"Oct."}
+MACRO {nov} {"Nov."}
+MACRO {dec} {"Dec."}
+
+
+
+%%%%%%%%%%%%%%%%%%
+%% ENTRY FIELDS %%
+%%%%%%%%%%%%%%%%%%
+
+ENTRY
+ {
+ address
+ annote
+ assignee
+ author
+ booktitle
+ chapter
+ day
+ dayfiled
+ edition
+ editor
+ howpublished
+ institution
+ intype
+ journal
+ key
+ language
+ month
+ monthfiled
+ nationality
+ note
+ number
+ organization
+ pages
+ paper
+ publisher
+ school
+ series
+ revision
+ title
+ type
+ url
+ volume
+ year
+ yearfiled
+ CTLuse_article_number
+ CTLuse_paper
+ CTLuse_forced_etal
+ CTLmax_names_forced_etal
+ CTLnames_show_etal
+ CTLuse_alt_spacing
+ CTLalt_stretch_factor
+ CTLdash_repeated_names
+ CTLname_format_string
+ CTLname_latex_cmd
+ }
+ {}
+ { label }
+
+
+
+
+%%%%%%%%%%%%%%%%%%%%%%%
+%% INTEGER VARIABLES %%
+%%%%%%%%%%%%%%%%%%%%%%%
+
+INTEGERS { prev.status.punct this.status.punct punct.std
+ punct.no punct.comma punct.period
+ prev.status.space this.status.space space.std
+ space.no space.normal space.large
+ prev.status.quote this.status.quote quote.std
+ quote.no quote.close
+ prev.status.nline this.status.nline nline.std
+ nline.no nline.newblock
+ status.cap cap.std
+ cap.no cap.yes}
+
+INTEGERS { longest.label.width multiresult nameptr namesleft number.label numnames }
+
+INTEGERS { is.use.number.for.article
+ is.use.paper
+ is.forced.et.al
+ max.num.names.before.forced.et.al
+ num.names.shown.with.forced.et.al
+ is.use.alt.interword.spacing
+ is.dash.repeated.names}
+
+
+%%%%%%%%%%%%%%%%%%%%%%
+%% STRING VARIABLES %%
+%%%%%%%%%%%%%%%%%%%%%%
+
+STRINGS { bibinfo
+ longest.label
+ oldname
+ s
+ t
+ ALTinterwordstretchfactor
+ name.format.string
+ name.latex.cmd}
+
+
+
+
+%%%%%%%%%%%%%%%%%%%%%%%%%
+%% LOW LEVEL FUNCTIONS %%
+%%%%%%%%%%%%%%%%%%%%%%%%%
+
+FUNCTION {initialize.controls}
+{ default.is.use.number.for.article 'is.use.number.for.article :=
+ default.is.use.paper 'is.use.paper :=
+ default.is.forced.et.al 'is.forced.et.al :=
+ default.max.num.names.before.forced.et.al 'max.num.names.before.forced.et.al :=
+ default.num.names.shown.with.forced.et.al 'num.names.shown.with.forced.et.al :=
+ default.is.use.alt.interword.spacing 'is.use.alt.interword.spacing :=
+ default.is.dash.repeated.names 'is.dash.repeated.names :=
+ default.ALTinterwordstretchfactor 'ALTinterwordstretchfactor :=
+ default.name.format.string 'name.format.string :=
+ default.name.latex.cmd 'name.latex.cmd :=
+}
+
+
+% This IEEEtran.bst features a very powerful and flexible mechanism for
+% controlling the capitalization, punctuation, spacing, quotation, and
+% newlines of the formatted entry fields. (Note: IEEEtran.bst does not need
+% or use the newline/newblock feature, but it has been implemented for
+% possible future use.) The output states of IEEEtran.bst consist of
+% multiple independent attributes and, as such, can be thought of as being
+% vectors, rather than the simple scalar values ("before.all",
+% "mid.sentence", etc.) used in most other .bst files.
+%
+% The more flexible and complex design used here was motivated in part by
+% IEEE's rather unusual bibliography style. For example, IEEE ends the
+% previous field item with a period and large space prior to the publisher
+% address; the @electronic entry types use periods as inter-item punctuation
+% rather than the commas used by the other entry types; and URLs are never
+% followed by periods even though they are the last item in the entry.
+% Although it is possible to accommodate these features with the conventional
+% output state system, the seemingly endless exceptions make for convoluted,
+% unreliable and difficult to maintain code.
+%
+% IEEEtran.bst's output state system can be easily understood via a simple
+% illustration of two most recently formatted entry fields (on the stack):
+%
+% CURRENT_ITEM
+% "PREVIOUS_ITEM
+%
+% which, in this example, is to eventually appear in the bibliography as:
+%
+% "PREVIOUS_ITEM," CURRENT_ITEM
+%
+% It is the job of the output routine to take the previous item off of the
+% stack (while leaving the current item at the top of the stack), apply its
+% trailing punctuation (including closing quote marks) and spacing, and then
+% to write the result to BibTeX's output buffer:
+%
+% "PREVIOUS_ITEM,"
+%
+% Punctuation (and spacing) between items is often determined by both of the
+% items rather than just the first one. The presence of quotation marks
+% further complicates the situation because, in standard English, trailing
+% punctuation marks are supposed to be contained within the quotes.
+%
+% IEEEtran.bst maintains two output state (aka "status") vectors which
+% correspond to the previous and current (aka "this") items. Each vector
+% consists of several independent attributes which track punctuation,
+% spacing, quotation, and newlines. Capitalization status is handled by a
+% separate scalar because the format routines, not the output routine,
+% handle capitalization and, therefore, there is no need to maintain the
+% capitalization attribute for both the "previous" and "this" items.
+%
+% When a format routine adds a new item, it copies the current output status
+% vector to the previous output status vector and (usually) resets the
+% current (this) output status vector to a "standard status" vector. Using a
+% "standard status" vector in this way allows us to redefine what we mean by
+% "standard status" at the start of each entry handler and reuse the same
+% format routines under the various inter-item separation schemes. For
+% example, the standard status vector for the @book entry type may use
+% commas for item separators, while the @electronic type may use periods,
+% yet both entry handlers exploit many of the exact same format routines.
+%
+% Because format routines have write access to the output status vector of
+% the previous item, they can override the punctuation choices of the
+% previous format routine! Therefore, it becomes trivial to implement rules
+% such as "Always use a period and a large space before the publisher." By
+% pushing the generation of the closing quote mark to the output routine, we
+% avoid all the problems caused by having to close a quote before having all
+% the information required to determine what the punctuation should be.
+%
+% The IEEEtran.bst output state system can easily be expanded if needed.
+% For instance, it is easy to add a "space.tie" attribute value if the
+% bibliography rules mandate that two items have to be joined with an
+% unbreakable space.
+
+% Titus Barik Annotation Addition
+
+% annotation addition
+FUNCTION {format.annotate}
+{ annote empty$
+ { "" }
+ { " \begin{quotation}\noindent "
+ annote
+ * " \end{quotation} " *
+ }
+ if$
+}
+
+
+FUNCTION {initialize.status.constants}
+{ #0 'punct.no :=
+ #1 'punct.comma :=
+ #2 'punct.period :=
+ #0 'space.no :=
+ #1 'space.normal :=
+ #2 'space.large :=
+ #0 'quote.no :=
+ #1 'quote.close :=
+ #0 'cap.no :=
+ #1 'cap.yes :=
+ #0 'nline.no :=
+ #1 'nline.newblock :=
+}
+
+FUNCTION {std.status.using.comma}
+{ punct.comma 'punct.std :=
+ space.normal 'space.std :=
+ quote.no 'quote.std :=
+ nline.no 'nline.std :=
+ cap.no 'cap.std :=
+}
+
+FUNCTION {std.status.using.period}
+{ punct.period 'punct.std :=
+ space.normal 'space.std :=
+ quote.no 'quote.std :=
+ nline.no 'nline.std :=
+ cap.yes 'cap.std :=
+}
+
+FUNCTION {initialize.prev.this.status}
+{ punct.no 'prev.status.punct :=
+ space.no 'prev.status.space :=
+ quote.no 'prev.status.quote :=
+ nline.no 'prev.status.nline :=
+ punct.no 'this.status.punct :=
+ space.no 'this.status.space :=
+ quote.no 'this.status.quote :=
+ nline.no 'this.status.nline :=
+ cap.yes 'status.cap :=
+}
+
+FUNCTION {this.status.std}
+{ punct.std 'this.status.punct :=
+ space.std 'this.status.space :=
+ quote.std 'this.status.quote :=
+ nline.std 'this.status.nline :=
+}
+
+FUNCTION {cap.status.std}{ cap.std 'status.cap := }
+
+FUNCTION {this.to.prev.status}
+{ this.status.punct 'prev.status.punct :=
+ this.status.space 'prev.status.space :=
+ this.status.quote 'prev.status.quote :=
+ this.status.nline 'prev.status.nline :=
+}
+
+
+FUNCTION {not}
+{ { #0 }
+ { #1 }
+ if$
+}
+
+FUNCTION {and}
+{ { skip$ }
+ { pop$ #0 }
+ if$
+}
+
+FUNCTION {or}
+{ { pop$ #1 }
+ { skip$ }
+ if$
+}
+
+
+% convert the strings "yes" or "no" to #1 or #0 respectively
+FUNCTION {yes.no.to.int}
+{ "l" change.case$ duplicate$
+ "yes" =
+ { pop$ #1 }
+ { duplicate$ "no" =
+ { pop$ #0 }
+ { "unknown boolean " quote$ * swap$ * quote$ *
+ " in " * cite$ * warning$
+ #0
+ }
+ if$
+ }
+ if$
+}
+
+
+% pushes true if the single char string on the stack is in the
+% range of "0" to "9"
+FUNCTION {is.num}
+{ chr.to.int$
+ duplicate$ "0" chr.to.int$ < not
+ swap$ "9" chr.to.int$ > not and
+}
+
+% multiplies the integer on the stack by a factor of 10
+FUNCTION {bump.int.mag}
+{ #0 'multiresult :=
+ { duplicate$ #0 > }
+ { #1 -
+ multiresult #10 +
+ 'multiresult :=
+ }
+ while$
+pop$
+multiresult
+}
+
+% converts a single character string on the stack to an integer
+FUNCTION {char.to.integer}
+{ duplicate$
+ is.num
+ { chr.to.int$ "0" chr.to.int$ - }
+ {"noninteger character " quote$ * swap$ * quote$ *
+ " in integer field of " * cite$ * warning$
+ #0
+ }
+ if$
+}
+
+% converts a string on the stack to an integer
+FUNCTION {string.to.integer}
+{ duplicate$ text.length$ 'namesleft :=
+ #1 'nameptr :=
+ #0 'numnames :=
+ { nameptr namesleft > not }
+ { duplicate$ nameptr #1 substring$
+ char.to.integer numnames bump.int.mag +
+ 'numnames :=
+ nameptr #1 +
+ 'nameptr :=
+ }
+ while$
+pop$
+numnames
+}
+
+
+
+
+% The output routines write out the *next* to the top (previous) item on the
+% stack, adding punctuation and such as needed. Since IEEEtran.bst maintains
+% the output status for the top two items on the stack, these output
+% routines have to consider the previous output status (which corresponds to
+% the item that is being output). Full independent control of punctuation,
+% closing quote marks, spacing, and newblock is provided.
+%
+% "output.nonnull" does not check for the presence of a previous empty
+% item.
+%
+% "output" does check for the presence of a previous empty item and will
+% remove an empty item rather than outputing it.
+%
+% "output.warn" is like "output", but will issue a warning if it detects
+% an empty item.
+
+FUNCTION {output.nonnull}
+{ swap$
+ prev.status.punct punct.comma =
+ { "," * }
+ { skip$ }
+ if$
+ prev.status.punct punct.period =
+ { add.period$ }
+ { skip$ }
+ if$
+ prev.status.quote quote.close =
+ { "''" * }
+ { skip$ }
+ if$
+ prev.status.space space.normal =
+ { " " * }
+ { skip$ }
+ if$
+ prev.status.space space.large =
+ { large.space * }
+ { skip$ }
+ if$
+ write$
+ prev.status.nline nline.newblock =
+ { newline$ "\newblock " write$ }
+ { skip$ }
+ if$
+}
+
+FUNCTION {output}
+{ duplicate$ empty$
+ 'pop$
+ 'output.nonnull
+ if$
+}
+
+FUNCTION {output.warn}
+{ 't :=
+ duplicate$ empty$
+ { pop$ "empty " t * " in " * cite$ * warning$ }
+ 'output.nonnull
+ if$
+}
+
+% "fin.entry" is the output routine that handles the last item of the entry
+% (which will be on the top of the stack when "fin.entry" is called).
+
+FUNCTION {fin.entry}
+{ this.status.punct punct.no =
+ { skip$ }
+ { add.period$ }
+ if$
+ this.status.quote quote.close =
+ { "''" * }
+ { skip$ }
+ if$
+write$
+newline$
+}
+
+
+FUNCTION {is.last.char.not.punct}
+{ duplicate$
+ "}" * add.period$
+ #-1 #1 substring$ "." =
+}
+
+FUNCTION {is.multiple.pages}
+{ 't :=
+ #0 'multiresult :=
+ { multiresult not
+ t empty$ not
+ and
+ }
+ { t #1 #1 substring$
+ duplicate$ "-" =
+ swap$ duplicate$ "," =
+ swap$ "+" =
+ or or
+ { #1 'multiresult := }
+ { t #2 global.max$ substring$ 't := }
+ if$
+ }
+ while$
+
+ multiresult
+}
+
+FUNCTION {capitalize}{ "u" change.case$ "t" change.case$ }
+
+FUNCTION {emphasize}
+{ duplicate$ empty$
+ { pop$ "" }
+ { "\emph{" swap$ * "}" * }
+ if$
+}
+
+FUNCTION {do.name.latex.cmd}
+{ name.latex.cmd
+ empty$
+ { skip$ }
+ { name.latex.cmd "{" * swap$ * "}" * }
+ if$
+}
+
+% IEEEtran.bst uses its own \BIBforeignlanguage command which directly
+% invokes the TeX hyphenation patterns without the need of the Babel
+% package. Babel does a lot more than switch hyphenation patterns and
+% its loading can cause unintended effects in many class files (such as
+% IEEEtran.cls).
+FUNCTION {select.language}
+{ duplicate$ empty$ 'pop$
+ { language empty$ 'skip$
+ { "\BIBforeignlanguage{" language * "}{" * swap$ * "}" * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {tie.or.space.prefix}
+{ duplicate$ text.length$ #3 <
+ { "~" }
+ { " " }
+ if$
+ swap$
+}
+
+FUNCTION {get.bbl.editor}
+{ editor num.names$ #1 > 'bbl.editors 'bbl.editor if$ }
+
+FUNCTION {space.word}{ " " swap$ * " " * }
+
+
+% Field Conditioners, Converters, Checkers and External Interfaces
+
+FUNCTION {empty.field.to.null.string}
+{ duplicate$ empty$
+ { pop$ "" }
+ { skip$ }
+ if$
+}
+
+FUNCTION {either.or.check}
+{ empty$
+ { pop$ }
+ { "can't use both " swap$ * " fields in " * cite$ * warning$ }
+ if$
+}
+
+FUNCTION {empty.entry.warn}
+{ author empty$ title empty$ howpublished empty$
+ month empty$ year empty$ note empty$ url empty$
+ and and and and and and
+ { "all relevant fields are empty in " cite$ * warning$ }
+ 'skip$
+ if$
+}
+
+
+% The bibinfo system provides a way for the electronic parsing/acquisition
+% of a bibliography's contents as is done by ReVTeX. For example, a field
+% could be entered into the bibliography as:
+% \bibinfo{volume}{2}
+% Only the "2" would show up in the document, but the LaTeX \bibinfo command
+% could do additional things with the information. IEEEtran.bst does provide
+% a \bibinfo command via "\providecommand{\bibinfo}[2]{#2}". However, it is
+% currently not used as the bogus bibinfo functions defined here output the
+% entry values directly without the \bibinfo wrapper. The bibinfo functions
+% themselves (and the calls to them) are retained for possible future use.
+%
+% bibinfo.check avoids acting on missing fields while bibinfo.warn will
+% issue a warning message if a missing field is detected. Prior to calling
+% the bibinfo functions, the user should push the field value and then its
+% name string, in that order.
+
+FUNCTION {bibinfo.check}
+{ swap$ duplicate$ missing$
+ { pop$ pop$ "" }
+ { duplicate$ empty$
+ { swap$ pop$ }
+ { swap$ pop$ }
+ if$
+ }
+ if$
+}
+
+FUNCTION {bibinfo.warn}
+{ swap$ duplicate$ missing$
+ { swap$ "missing " swap$ * " in " * cite$ * warning$ pop$ "" }
+ { duplicate$ empty$
+ { swap$ "empty " swap$ * " in " * cite$ * warning$ }
+ { swap$ pop$ }
+ if$
+ }
+ if$
+}
+
+
+% IEEE separates large numbers with more than 4 digits into groups of
+% three. IEEE uses a small space to separate these number groups.
+% Typical applications include patent and page numbers.
+
+% number of consecutive digits required to trigger the group separation.
+FUNCTION {large.number.trigger}{ #5 }
+
+% For numbers longer than the trigger, this is the blocksize of the groups.
+% The blocksize must be less than the trigger threshold, and 2 * blocksize
+% must be greater than the trigger threshold (can't do more than one
+% separation on the initial trigger).
+FUNCTION {large.number.blocksize}{ #3 }
+
+% What is actually inserted between the number groups.
+FUNCTION {large.number.separator}{ "\," }
+
+% So as to save on integer variables by reusing existing ones, numnames
+% holds the current number of consecutive digits read and nameptr holds
+% the number that will trigger an inserted space.
+FUNCTION {large.number.separate}
+{ 't :=
+ ""
+ #0 'numnames :=
+ large.number.trigger 'nameptr :=
+ { t empty$ not }
+ { t #-1 #1 substring$ is.num
+ { numnames #1 + 'numnames := }
+ { #0 'numnames :=
+ large.number.trigger 'nameptr :=
+ }
+ if$
+ t #-1 #1 substring$ swap$ *
+ t #-2 global.max$ substring$ 't :=
+ numnames nameptr =
+ { duplicate$ #1 nameptr large.number.blocksize - substring$ swap$
+ nameptr large.number.blocksize - #1 + global.max$ substring$
+ large.number.separator swap$ * *
+ nameptr large.number.blocksize - 'numnames :=
+ large.number.blocksize #1 + 'nameptr :=
+ }
+ { skip$ }
+ if$
+ }
+ while$
+}
+
+% Converts all single dashes "-" to double dashes "--".
+FUNCTION {n.dashify}
+{ large.number.separate
+ 't :=
+ ""
+ { t empty$ not }
+ { t #1 #1 substring$ "-" =
+ { t #1 #2 substring$ "--" = not
+ { "--" *
+ t #2 global.max$ substring$ 't :=
+ }
+ { { t #1 #1 substring$ "-" = }
+ { "-" *
+ t #2 global.max$ substring$ 't :=
+ }
+ while$
+ }
+ if$
+ }
+ { t #1 #1 substring$ *
+ t #2 global.max$ substring$ 't :=
+ }
+ if$
+ }
+ while$
+}
+
+
+% This function detects entries with names that are identical to that of
+% the previous entry and replaces the repeated names with dashes (if the
+% "is.dash.repeated.names" user control is nonzero).
+FUNCTION {name.or.dash}
+{ 's :=
+ oldname empty$
+ { s 'oldname := s }
+ { s oldname =
+ { is.dash.repeated.names
+ { repeated.name.dashes }
+ { s 'oldname := s }
+ if$
+ }
+ { s 'oldname := s }
+ if$
+ }
+ if$
+}
+
+% Converts the number string on the top of the stack to
+% "numerical ordinal form" (e.g., "7" to "7th"). There is
+% no artificial limit to the upper bound of the numbers as the
+% least significant digit always determines the ordinal form.
+FUNCTION {num.to.ordinal}
+{ duplicate$ #-1 #1 substring$ "1" =
+ { bbl.st * }
+ { duplicate$ #-1 #1 substring$ "2" =
+ { bbl.nd * }
+ { duplicate$ #-1 #1 substring$ "3" =
+ { bbl.rd * }
+ { bbl.th * }
+ if$
+ }
+ if$
+ }
+ if$
+}
+
+% If the string on the top of the stack begins with a number,
+% (e.g., 11th) then replace the string with the leading number
+% it contains. Otherwise retain the string as-is. s holds the
+% extracted number, t holds the part of the string that remains
+% to be scanned.
+FUNCTION {extract.num}
+{ duplicate$ 't :=
+ "" 's :=
+ { t empty$ not }
+ { t #1 #1 substring$
+ t #2 global.max$ substring$ 't :=
+ duplicate$ is.num
+ { s swap$ * 's := }
+ { pop$ "" 't := }
+ if$
+ }
+ while$
+ s empty$
+ 'skip$
+ { pop$ s }
+ if$
+}
+
+% Converts the word number string on the top of the stack to
+% Arabic string form. Will be successful up to "tenth".
+FUNCTION {word.to.num}
+{ duplicate$ "l" change.case$ 's :=
+ s "first" =
+ { pop$ "1" }
+ { skip$ }
+ if$
+ s "second" =
+ { pop$ "2" }
+ { skip$ }
+ if$
+ s "third" =
+ { pop$ "3" }
+ { skip$ }
+ if$
+ s "fourth" =
+ { pop$ "4" }
+ { skip$ }
+ if$
+ s "fifth" =
+ { pop$ "5" }
+ { skip$ }
+ if$
+ s "sixth" =
+ { pop$ "6" }
+ { skip$ }
+ if$
+ s "seventh" =
+ { pop$ "7" }
+ { skip$ }
+ if$
+ s "eighth" =
+ { pop$ "8" }
+ { skip$ }
+ if$
+ s "ninth" =
+ { pop$ "9" }
+ { skip$ }
+ if$
+ s "tenth" =
+ { pop$ "10" }
+ { skip$ }
+ if$
+}
+
+
+% Converts the string on the top of the stack to numerical
+% ordinal (e.g., "11th") form.
+FUNCTION {convert.edition}
+{ duplicate$ empty$ 'skip$
+ { duplicate$ #1 #1 substring$ is.num
+ { extract.num
+ num.to.ordinal
+ }
+ { word.to.num
+ duplicate$ #1 #1 substring$ is.num
+ { num.to.ordinal }
+ { "edition ordinal word " quote$ * edition * quote$ *
+ " may be too high (or improper) for conversion" * " in " * cite$ * warning$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+}
+
+
+
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% LATEX BIBLIOGRAPHY CODE %%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+FUNCTION {start.entry}
+{ newline$
+ "\bibitem{" write$
+ cite$ write$
+ "}" write$
+ newline$
+ ""
+ initialize.prev.this.status
+}
+
+% Here we write out all the LaTeX code that we will need. The most involved
+% code sequences are those that control the alternate interword spacing and
+% foreign language hyphenation patterns. The heavy use of \providecommand
+% gives users a way to override the defaults. Special thanks to Javier Bezos,
+% Johannes Braams, Robin Fairburns, Heiko Oberdiek, Donald Arseneau and all
+% the other gurus on comp.text.tex for their help and advice on the topic of
+% \selectlanguage, Babel and BibTeX.
+FUNCTION {begin.bib}
+{ preamble$ empty$ 'skip$
+ { preamble$ write$ newline$ }
+ if$
+ "\begin{thebibliography}{" longest.label * "}" *
+ write$ newline$
+ "\providecommand{\url}[1]{#1}"
+ write$ newline$
+ "\csname url@rmstyle\endcsname"
+ write$ newline$
+ "\providecommand{\newblock}{\relax}"
+ write$ newline$
+ "\providecommand{\bibinfo}[2]{#2}"
+ write$ newline$
+ "\providecommand\BIBentrySTDinterwordspacing{\spaceskip=0pt\relax}"
+ write$ newline$
+ "\providecommand\BIBentryALTinterwordstretchfactor{"
+ ALTinterwordstretchfactor * "}" *
+ write$ newline$
+ "\providecommand\BIBentryALTinterwordspacing{\spaceskip=\fontdimen2\font plus "
+ write$ newline$
+ "\BIBentryALTinterwordstretchfactor\fontdimen3\font minus \fontdimen4\font\relax}"
+ write$ newline$
+ "\providecommand\BIBforeignlanguage[2]{{%"
+ write$ newline$
+ "\expandafter\ifx\csname l@#1\endcsname\relax"
+ write$ newline$
+ "\typeout{** WARNING: IEEEtran.bst: No hyphenation pattern has been}%"
+ write$ newline$
+ "\typeout{** loaded for the language `#1'. Using the pattern for}%"
+ write$ newline$
+ "\typeout{** the default language instead.}%"
+ write$ newline$
+ "\else"
+ write$ newline$
+ "\language=\csname l@#1\endcsname"
+ write$ newline$
+ "\fi"
+ write$ newline$
+ "#2}}"
+ write$ newline$
+}
+
+FUNCTION {end.bib}
+{ newline$ "\end{thebibliography}" write$ newline$ }
+
+FUNCTION {if.url.alt.interword.spacing}
+{ is.use.alt.interword.spacing
+ {url empty$ 'skip$ {"\BIBentryALTinterwordspacing" write$ newline$} if$}
+ { skip$ }
+ if$
+}
+
+FUNCTION {if.url.std.interword.spacing}
+{ is.use.alt.interword.spacing
+ {url empty$ 'skip$ {"\BIBentrySTDinterwordspacing" write$ newline$} if$}
+ { skip$ }
+ if$
+}
+
+
+
+
+%%%%%%%%%%%%%%%%%%%%%%%%
+%% LONGEST LABEL PASS %%
+%%%%%%%%%%%%%%%%%%%%%%%%
+
+FUNCTION {initialize.longest.label}
+{ "" 'longest.label :=
+ #1 'number.label :=
+ #0 'longest.label.width :=
+}
+
+FUNCTION {longest.label.pass}
+{ number.label int.to.str$ 'label :=
+ number.label #1 + 'number.label :=
+ label width$ longest.label.width >
+ { label 'longest.label :=
+ label width$ 'longest.label.width :=
+ }
+ 'skip$
+ if$
+}
+
+
+
+
+%%%%%%%%%%%%%%%%%%%%%
+%% FORMAT HANDLERS %%
+%%%%%%%%%%%%%%%%%%%%%
+
+%% Lower Level Formats (used by higher level formats)
+
+FUNCTION {format.address.org.or.pub.date}
+{ 't :=
+ ""
+ year empty$
+ { "empty year in " cite$ * warning$ }
+ { skip$ }
+ if$
+ address empty$ t empty$ and
+ year empty$ and month empty$ and
+ { skip$ }
+ { this.to.prev.status
+ this.status.std
+ cap.status.std
+ address "address" bibinfo.check *
+ t empty$
+ { skip$ }
+ { punct.period 'prev.status.punct :=
+ space.large 'prev.status.space :=
+ address empty$
+ { skip$ }
+ { ": " * }
+ if$
+ t *
+ }
+ if$
+ year empty$ month empty$ and
+ { skip$ }
+ { t empty$ address empty$ and
+ { skip$ }
+ { ", " * }
+ if$
+ month empty$
+ { year empty$
+ { skip$ }
+ { year "year" bibinfo.check * }
+ if$
+ }
+ { month "month" bibinfo.check *
+ year empty$
+ { skip$ }
+ { " " * year "year" bibinfo.check * }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+}
+
+
+FUNCTION {format.names}
+{ 'bibinfo :=
+ duplicate$ empty$ 'skip$ {
+ this.to.prev.status
+ this.status.std
+ 's :=
+ "" 't :=
+ #1 'nameptr :=
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ { s nameptr
+ name.format.string
+ format.name$
+ bibinfo bibinfo.check
+ 't :=
+ nameptr #1 >
+ { nameptr num.names.shown.with.forced.et.al #1 + =
+ numnames max.num.names.before.forced.et.al >
+ is.forced.et.al and and
+ { "others" 't :=
+ #1 'namesleft :=
+ }
+ { skip$ }
+ if$
+ namesleft #1 >
+ { ", " * t do.name.latex.cmd * }
+ {
+ numnames #2 >
+ { "," * }
+ 'skip$
+ if$
+ s nameptr "{ll}" format.name$ duplicate$ "others" =
+ { 't := }
+ { pop$ }
+ if$
+ t "others" =
+ {
+ " " * bbl.etal emphasize *
+ }
+ {
+ bbl.and
+ space.word * t do.name.latex.cmd *
+ }
+ if$
+ }
+ if$
+ }
+ { t do.name.latex.cmd }
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+ cap.status.std
+ } if$
+}
+
+
+
+
+%% Higher Level Formats
+
+%% addresses/locations
+
+FUNCTION {format.address}
+{ address duplicate$ empty$ 'skip$
+ { this.to.prev.status
+ this.status.std
+ cap.status.std
+ }
+ if$
+}
+
+
+
+%% author/editor names
+
+FUNCTION {format.authors}{ author "author" format.names }
+
+FUNCTION {format.editors}
+{ editor "editor" format.names duplicate$ empty$ 'skip$
+ { ", " *
+ get.bbl.editor
+ capitalize
+ *
+ }
+ if$
+}
+
+
+
+%% date
+
+FUNCTION {format.date}
+{
+ month "month" bibinfo.check duplicate$ empty$
+ year "year" bibinfo.check duplicate$ empty$
+ { swap$ 'skip$
+ { this.to.prev.status
+ this.status.std
+ cap.status.std
+ "there's a month but no year in " cite$ * warning$ }
+ if$
+ *
+ }
+ { this.to.prev.status
+ this.status.std
+ cap.status.std
+ swap$ 'skip$
+ {
+ swap$
+ " " * swap$
+ }
+ if$
+ *
+ }
+ if$
+}
+
+FUNCTION {format.date.electronic}
+{ month "month" bibinfo.check duplicate$ empty$
+ year "year" bibinfo.check duplicate$ empty$
+ { swap$
+ { pop$ }
+ { "there's a month but no year in " cite$ * warning$
+ pop$ ")" * "(" swap$ *
+ this.to.prev.status
+ punct.no 'this.status.punct :=
+ space.normal 'this.status.space :=
+ quote.no 'this.status.quote :=
+ cap.yes 'status.cap :=
+ }
+ if$
+ }
+ { swap$
+ { swap$ pop$ ")" * "(" swap$ * }
+ { "(" swap$ * ", " * swap$ * ")" * }
+ if$
+ this.to.prev.status
+ punct.no 'this.status.punct :=
+ space.normal 'this.status.space :=
+ quote.no 'this.status.quote :=
+ cap.yes 'status.cap :=
+ }
+ if$
+}
+
+
+
+%% edition/title
+
+% Note: IEEE considers the edition to be closely associated with
+% the title of a book. So, in IEEEtran.bst the edition is normally handled
+% within the formatting of the title. The format.edition function is
+% retained here for possible future use.
+FUNCTION {format.edition}
+{ edition duplicate$ empty$ 'skip$
+ { this.to.prev.status
+ this.status.std
+ convert.edition
+ status.cap
+ { "t" }
+ { "l" }
+ if$ change.case$
+ "edition" bibinfo.check
+ "~" * bbl.edition *
+ cap.status.std
+ }
+ if$
+}
+
+% This is used to format the booktitle of a conference proceedings.
+% Here we use the "intype" field to provide the user a way to
+% override the word "in" (e.g., with things like "presented at")
+% Use of intype stops the emphasis of the booktitle to indicate that
+% we no longer mean the written conference proceedings, but the
+% conference itself.
+FUNCTION {format.in.booktitle}
+{ booktitle "booktitle" bibinfo.check duplicate$ empty$ 'skip$
+ { this.to.prev.status
+ this.status.std
+ select.language
+ intype missing$
+ { emphasize
+ bbl.in " " *
+ }
+ { intype " " * }
+ if$
+ swap$ *
+ cap.status.std
+ }
+ if$
+}
+
+% This is used to format the booktitle of collection.
+% Here the "intype" field is not supported, but "edition" is.
+FUNCTION {format.in.booktitle.edition}
+{ booktitle "booktitle" bibinfo.check duplicate$ empty$ 'skip$
+ { this.to.prev.status
+ this.status.std
+ select.language
+ emphasize
+ edition empty$ 'skip$
+ { ", " *
+ edition
+ convert.edition
+ "l" change.case$
+ * "~" * bbl.edition *
+ }
+ if$
+ bbl.in " " * swap$ *
+ cap.status.std
+ }
+ if$
+}
+
+FUNCTION {format.article.title}
+{ title duplicate$ empty$ 'skip$
+ { this.to.prev.status
+ this.status.std
+ "t" change.case$
+ }
+ if$
+ "title" bibinfo.check
+ duplicate$ empty$ 'skip$
+ { quote.close 'this.status.quote :=
+ is.last.char.not.punct
+ { punct.std 'this.status.punct := }
+ { punct.no 'this.status.punct := }
+ if$
+ select.language
+ "``" swap$ *
+ cap.status.std
+ }
+ if$
+}
+
+FUNCTION {format.article.title.electronic}
+{ title duplicate$ empty$ 'skip$
+ { this.to.prev.status
+ this.status.std
+ cap.status.std
+ "t" change.case$
+ }
+ if$
+ "title" bibinfo.check
+ duplicate$ empty$
+ { skip$ }
+ { select.language }
+ if$
+}
+
+FUNCTION {format.book.title.edition}
+{ title "title" bibinfo.check
+ duplicate$ empty$
+ { "empty title in " cite$ * warning$ }
+ { this.to.prev.status
+ this.status.std
+ select.language
+ emphasize
+ edition empty$ 'skip$
+ { ", " *
+ edition
+ convert.edition
+ status.cap
+ { "t" }
+ { "l" }
+ if$
+ change.case$
+ * "~" * bbl.edition *
+ }
+ if$
+ cap.status.std
+ }
+ if$
+}
+
+FUNCTION {format.book.title}
+{ title "title" bibinfo.check
+ duplicate$ empty$ 'skip$
+ { this.to.prev.status
+ this.status.std
+ cap.status.std
+ select.language
+ emphasize
+ }
+ if$
+}
+
+
+
+%% journal
+
+FUNCTION {format.journal}
+{ journal duplicate$ empty$ 'skip$
+ { this.to.prev.status
+ this.status.std
+ cap.status.std
+ select.language
+ emphasize
+ }
+ if$
+}
+
+
+
+%% how published
+
+FUNCTION {format.howpublished}
+{ howpublished duplicate$ empty$ 'skip$
+ { this.to.prev.status
+ this.status.std
+ cap.status.std
+ }
+ if$
+}
+
+
+
+%% institutions/organization/publishers/school
+
+FUNCTION {format.institution}
+{ institution duplicate$ empty$ 'skip$
+ { this.to.prev.status
+ this.status.std
+ cap.status.std
+ }
+ if$
+}
+
+FUNCTION {format.organization}
+{ organization duplicate$ empty$ 'skip$
+ { this.to.prev.status
+ this.status.std
+ cap.status.std
+ }
+ if$
+}
+
+FUNCTION {format.address.publisher.date}
+{ publisher "publisher" bibinfo.warn format.address.org.or.pub.date }
+
+FUNCTION {format.address.publisher.date.nowarn}
+{ publisher "publisher" bibinfo.check format.address.org.or.pub.date }
+
+FUNCTION {format.address.organization.date}
+{ organization "organization" bibinfo.check format.address.org.or.pub.date }
+
+FUNCTION {format.school}
+{ school duplicate$ empty$ 'skip$
+ { this.to.prev.status
+ this.status.std
+ cap.status.std
+ }
+ if$
+}
+
+
+
+%% volume/number/series/chapter/pages
+
+FUNCTION {format.volume}
+{ volume empty.field.to.null.string
+ duplicate$ empty$ 'skip$
+ { this.to.prev.status
+ this.status.std
+ bbl.volume
+ status.cap
+ { capitalize }
+ { skip$ }
+ if$
+ swap$ tie.or.space.prefix
+ "volume" bibinfo.check
+ * *
+ cap.status.std
+ }
+ if$
+}
+
+FUNCTION {format.number}
+{ number empty.field.to.null.string
+ duplicate$ empty$ 'skip$
+ { this.to.prev.status
+ this.status.std
+ status.cap
+ { bbl.number capitalize }
+ { bbl.number }
+ if$
+ swap$ tie.or.space.prefix
+ "number" bibinfo.check
+ * *
+ cap.status.std
+ }
+ if$
+}
+
+FUNCTION {format.number.if.use.for.article}
+{ is.use.number.for.article
+ { format.number }
+ { "" }
+ if$
+}
+
+% IEEE does not seem to tie the series so closely with the volume
+% and number as is done in other bibliography styles. Instead the
+% series is treated somewhat like an extension of the title.
+FUNCTION {format.series}
+{ series empty$
+ { "" }
+ { this.to.prev.status
+ this.status.std
+ bbl.series " " *
+ series "series" bibinfo.check *
+ cap.status.std
+ }
+ if$
+}
+
+
+FUNCTION {format.chapter}
+{ chapter empty$
+ { "" }
+ { this.to.prev.status
+ this.status.std
+ type empty$
+ { bbl.chapter }
+ { type "l" change.case$
+ "type" bibinfo.check
+ }
+ if$
+ chapter tie.or.space.prefix
+ "chapter" bibinfo.check
+ * *
+ cap.status.std
+ }
+ if$
+}
+
+
+% The intended use of format.paper is for paper numbers of inproceedings.
+% The paper type can be overridden via the type field.
+% We allow the type to be displayed even if the paper number is absent
+% for things like "postdeadline paper"
+FUNCTION {format.paper}
+{ is.use.paper
+ { paper empty$
+ { type empty$
+ { "" }
+ { this.to.prev.status
+ this.status.std
+ type "type" bibinfo.check
+ cap.status.std
+ }
+ if$
+ }
+ { this.to.prev.status
+ this.status.std
+ type empty$
+ { bbl.paper }
+ { type "type" bibinfo.check }
+ if$
+ " " * paper
+ "paper" bibinfo.check
+ *
+ cap.status.std
+ }
+ if$
+ }
+ { "" }
+ if$
+}
+
+
+FUNCTION {format.pages}
+{ pages duplicate$ empty$ 'skip$
+ { this.to.prev.status
+ this.status.std
+ duplicate$ is.multiple.pages
+ {
+ bbl.pages swap$
+ n.dashify
+ }
+ {
+ bbl.page swap$
+ }
+ if$
+ tie.or.space.prefix
+ "pages" bibinfo.check
+ * *
+ cap.status.std
+ }
+ if$
+}
+
+
+
+%% technical report number
+
+FUNCTION {format.tech.report.number}
+{ number "number" bibinfo.check
+ type duplicate$ empty$
+ { pop$
+ this.to.prev.status
+ this.status.std
+ cap.status.std
+ bbl.techrep
+ }
+ { skip$ }
+ if$
+ "type" bibinfo.check
+ swap$ duplicate$ empty$
+ { pop$ }
+ { this.to.prev.status
+ this.status.std
+ cap.status.std
+ tie.or.space.prefix * * }
+ if$
+}
+
+
+
+%% note
+
+FUNCTION {format.note}
+{ note empty$
+ { "" }
+ { this.to.prev.status
+ this.status.std
+ punct.period 'this.status.punct :=
+ note #1 #1 substring$
+ duplicate$ "{" =
+ { skip$ }
+ { status.cap
+ { "u" }
+ { "l" }
+ if$
+ change.case$
+ }
+ if$
+ note #2 global.max$ substring$ * "note" bibinfo.check
+ cap.yes 'status.cap :=
+ }
+ if$
+}
+
+
+
+%% patent
+
+FUNCTION {format.patent.date}
+{ this.to.prev.status
+ this.status.std
+ year empty$
+ { monthfiled duplicate$ empty$
+ { "monthfiled" bibinfo.check pop$ "" }
+ { "monthfiled" bibinfo.check }
+ if$
+ dayfiled duplicate$ empty$
+ { "dayfiled" bibinfo.check pop$ "" * }
+ { "dayfiled" bibinfo.check
+ monthfiled empty$
+ { "dayfiled without a monthfiled in " cite$ * warning$
+ *
+ }
+ { " " swap$ * * }
+ if$
+ }
+ if$
+ yearfiled empty$
+ { "no year or yearfiled in " cite$ * warning$ }
+ { yearfiled "yearfiled" bibinfo.check
+ swap$
+ duplicate$ empty$
+ { pop$ }
+ { ", " * swap$ * }
+ if$
+ }
+ if$
+ }
+ { month duplicate$ empty$
+ { "month" bibinfo.check pop$ "" }
+ { "month" bibinfo.check }
+ if$
+ day duplicate$ empty$
+ { "day" bibinfo.check pop$ "" * }
+ { "day" bibinfo.check
+ month empty$
+ { "day without a month in " cite$ * warning$
+ *
+ }
+ { " " swap$ * * }
+ if$
+ }
+ if$
+ year "year" bibinfo.check
+ swap$
+ duplicate$ empty$
+ { pop$ }
+ { ", " * swap$ * }
+ if$
+ }
+ if$
+ cap.status.std
+}
+
+FUNCTION {format.patent.nationality.type.number}
+{ this.to.prev.status
+ this.status.std
+ nationality duplicate$ empty$
+ { "nationality" bibinfo.warn pop$ "" }
+ { "nationality" bibinfo.check
+ duplicate$ "l" change.case$ "united states" =
+ { pop$ bbl.patentUS }
+ { skip$ }
+ if$
+ " " *
+ }
+ if$
+ type empty$
+ { bbl.patent "type" bibinfo.check }
+ { type "type" bibinfo.check }
+ if$
+ *
+ number duplicate$ empty$
+ { "number" bibinfo.warn pop$ }
+ { "number" bibinfo.check
+ large.number.separate
+ swap$ " " * swap$ *
+ }
+ if$
+ cap.status.std
+}
+
+
+
+%% standard
+
+FUNCTION {format.organization.institution.standard.type.number}
+{ this.to.prev.status
+ this.status.std
+ organization duplicate$ empty$
+ { pop$
+ institution duplicate$ empty$
+ { "institution" bibinfo.warn }
+ { "institution" bibinfo.warn " " * }
+ if$
+ }
+ { "organization" bibinfo.warn " " * }
+ if$
+ type empty$
+ { bbl.standard "type" bibinfo.check }
+ { type "type" bibinfo.check }
+ if$
+ *
+ number duplicate$ empty$
+ { "number" bibinfo.check pop$ }
+ { "number" bibinfo.check
+ large.number.separate
+ swap$ " " * swap$ *
+ }
+ if$
+ cap.status.std
+}
+
+FUNCTION {format.revision}
+{ revision empty$
+ { "" }
+ { this.to.prev.status
+ this.status.std
+ bbl.revision
+ revision tie.or.space.prefix
+ "revision" bibinfo.check
+ * *
+ cap.status.std
+ }
+ if$
+}
+
+
+%% thesis
+
+FUNCTION {format.master.thesis.type}
+{ this.to.prev.status
+ this.status.std
+ type empty$
+ {
+ bbl.mthesis
+ }
+ {
+ type "type" bibinfo.check
+ }
+ if$
+cap.status.std
+}
+
+FUNCTION {format.phd.thesis.type}
+{ this.to.prev.status
+ this.status.std
+ type empty$
+ {
+ bbl.phdthesis
+ }
+ {
+ type "type" bibinfo.check
+ }
+ if$
+cap.status.std
+}
+
+
+
+%% URL
+
+FUNCTION {format.url}
+{ url empty$
+ { "" }
+ { this.to.prev.status
+ this.status.std
+ cap.yes 'status.cap :=
+ bbl.urlprefix " " *
+ "\url{" * url * "}" *
+ punct.no 'this.status.punct :=
+ punct.period 'prev.status.punct :=
+ space.normal 'this.status.space :=
+ space.normal 'prev.status.space :=
+ quote.no 'this.status.quote :=
+ }
+ if$
+}
+
+
+
+
+%%%%%%%%%%%%%%%%%%%%
+%% ENTRY HANDLERS %%
+%%%%%%%%%%%%%%%%%%%%
+
+
+% Note: In many journals, IEEE (or the authors) tend not to show the number
+% for articles, so the display of the number is controlled here by the
+% switch "is.use.number.for.article"
+FUNCTION {article}
+{ std.status.using.comma
+ start.entry
+ if.url.alt.interword.spacing
+ format.authors "author" output.warn
+ name.or.dash
+ format.article.title "title" output.warn
+ format.journal "journal" bibinfo.check "journal" output.warn
+ format.volume output
+ format.number.if.use.for.article output
+ format.pages output
+ format.date "year" output.warn
+ format.note output
+ format.url output
+ fin.entry
+ if.url.std.interword.spacing
+% TB: added for annotation
+ format.annotate write$
+ newline$
+}
+
+FUNCTION {book}
+{ std.status.using.comma
+ start.entry
+ if.url.alt.interword.spacing
+ author empty$
+ { format.editors "author and editor" output.warn }
+ { format.authors output.nonnull }
+ if$
+ name.or.dash
+ format.book.title.edition output
+ format.series output
+ author empty$
+ { skip$ }
+ { format.editors output }
+ if$
+ format.address.publisher.date output
+ format.volume output
+ format.number output
+ format.note output
+ format.url output
+ fin.entry
+ if.url.std.interword.spacing
+% TB: added for annotation
+ format.annotate write$
+ newline$
+}
+
+FUNCTION {booklet}
+{ std.status.using.comma
+ start.entry
+ if.url.alt.interword.spacing
+ format.authors output
+ name.or.dash
+ format.article.title "title" output.warn
+ format.howpublished "howpublished" bibinfo.check output
+ format.organization "organization" bibinfo.check output
+ format.address "address" bibinfo.check output
+ format.date output
+ format.note output
+ format.url output
+ fin.entry
+ if.url.std.interword.spacing
+% TB: added for annotation
+ format.annotate write$
+ newline$
+}
+
+FUNCTION {electronic}
+{ std.status.using.period
+ start.entry
+ if.url.alt.interword.spacing
+ format.authors output
+ name.or.dash
+ format.date.electronic output
+ format.article.title.electronic output
+ format.howpublished "howpublished" bibinfo.check output
+ format.organization "organization" bibinfo.check output
+ format.address "address" bibinfo.check output
+ format.note output
+ format.url output
+ fin.entry
+ empty.entry.warn
+ if.url.std.interword.spacing
+% TB: added for annotation
+ format.annotate write$
+ newline$
+}
+
+FUNCTION {inbook}
+{ std.status.using.comma
+ start.entry
+ if.url.alt.interword.spacing
+ author empty$
+ { format.editors "author and editor" output.warn }
+ { format.authors output.nonnull }
+ if$
+ name.or.dash
+ format.book.title.edition output
+ format.series output
+ format.address.publisher.date output
+ format.volume output
+ format.number output
+ format.chapter output
+ format.pages output
+ format.note output
+ format.url output
+ fin.entry
+ if.url.std.interword.spacing
+% TB: added for annotation
+ format.annotate write$
+ newline$
+}
+
+FUNCTION {incollection}
+{ std.status.using.comma
+ start.entry
+ if.url.alt.interword.spacing
+ format.authors "author" output.warn
+ name.or.dash
+ format.article.title "title" output.warn
+ format.in.booktitle.edition "booktitle" output.warn
+ format.series output
+ format.editors output
+ format.address.publisher.date.nowarn output
+ format.volume output
+ format.number output
+ format.chapter output
+ format.pages output
+ format.note output
+ format.url output
+ fin.entry
+ if.url.std.interword.spacing
+% TB: added for annotation
+ format.annotate write$
+ newline$
+}
+
+FUNCTION {inproceedings}
+{ std.status.using.comma
+ start.entry
+ if.url.alt.interword.spacing
+ format.authors "author" output.warn
+ name.or.dash
+ format.article.title "title" output.warn
+ format.in.booktitle "booktitle" output.warn
+ format.series output
+ format.editors output
+ format.volume output
+ format.number output
+ publisher empty$
+ { format.address.organization.date output }
+ { format.organization "organization" bibinfo.check output
+ format.address.publisher.date output
+ }
+ if$
+ format.paper output
+ format.pages output
+ format.note output
+ format.url output
+ fin.entry
+ if.url.std.interword.spacing
+% TB: added for annotation
+ format.annotate write$
+ newline$
+}
+
+FUNCTION {manual}
+{ std.status.using.comma
+ start.entry
+ if.url.alt.interword.spacing
+ format.authors output
+ name.or.dash
+ format.book.title.edition "title" output.warn
+ format.howpublished "howpublished" bibinfo.check output
+ format.organization "organization" bibinfo.check output
+ format.address "address" bibinfo.check output
+ format.date output
+ format.note output
+ format.url output
+ fin.entry
+ if.url.std.interword.spacing
+% TB: added for annotation
+ format.annotate write$
+ newline$
+}
+
+FUNCTION {mastersthesis}
+{ std.status.using.comma
+ start.entry
+ if.url.alt.interword.spacing
+ format.authors "author" output.warn
+ name.or.dash
+ format.article.title "title" output.warn
+ format.master.thesis.type output.nonnull
+ format.school "school" bibinfo.warn output
+ format.address "address" bibinfo.check output
+ format.date "year" output.warn
+ format.note output
+ format.url output
+ fin.entry
+ if.url.std.interword.spacing
+% TB: added for annotation
+ format.annotate write$
+ newline$
+}
+
+FUNCTION {misc}
+{ std.status.using.comma
+ start.entry
+ if.url.alt.interword.spacing
+ format.authors output
+ name.or.dash
+ format.article.title output
+ format.howpublished "howpublished" bibinfo.check output
+ format.organization "organization" bibinfo.check output
+ format.address "address" bibinfo.check output
+ format.pages output
+ format.date output
+ format.note output
+ format.url output
+ fin.entry
+ empty.entry.warn
+ if.url.std.interword.spacing
+% TB: added for annotation
+ format.annotate write$
+ newline$
+}
+
+FUNCTION {patent}
+{ std.status.using.comma
+ start.entry
+ if.url.alt.interword.spacing
+ format.authors output
+ name.or.dash
+ format.article.title output
+ format.patent.nationality.type.number output
+ format.patent.date output
+ format.note output
+ format.url output
+ fin.entry
+ empty.entry.warn
+ if.url.std.interword.spacing
+% TB: added for annotation
+ format.annotate write$
+ newline$
+}
+
+FUNCTION {periodical}
+{ std.status.using.comma
+ start.entry
+ if.url.alt.interword.spacing
+ format.editors output
+ name.or.dash
+ format.book.title "title" output.warn
+ format.series output
+ format.volume output
+ format.number output
+ format.organization "organization" bibinfo.check output
+ format.date "year" output.warn
+ format.note output
+ format.url output
+ fin.entry
+ if.url.std.interword.spacing
+% TB: added for annotation
+ format.annotate write$
+ newline$
+}
+
+FUNCTION {phdthesis}
+{ std.status.using.comma
+ start.entry
+ if.url.alt.interword.spacing
+ format.authors "author" output.warn
+ name.or.dash
+ format.article.title "title" output.warn
+ format.phd.thesis.type output.nonnull
+ format.school "school" bibinfo.warn output
+ format.address "address" bibinfo.check output
+ format.date "year" output.warn
+ format.note output
+ format.url output
+ fin.entry
+ if.url.std.interword.spacing
+% TB: added for annotation
+ format.annotate write$
+ newline$
+}
+
+FUNCTION {proceedings}
+{ std.status.using.comma
+ start.entry
+ if.url.alt.interword.spacing
+ format.editors output
+ name.or.dash
+ format.book.title "title" output.warn
+ format.series output
+ format.volume output
+ format.number output
+ publisher empty$
+ { format.address.organization.date output }
+ { format.organization "organization" bibinfo.check output
+ format.address.publisher.date output
+ }
+ if$
+ format.note output
+ format.url output
+ fin.entry
+ if.url.std.interword.spacing
+% TB: added for annotation
+ format.annotate write$
+ newline$
+}
+
+FUNCTION {standard}
+{ std.status.using.comma
+ start.entry
+ if.url.alt.interword.spacing
+ format.authors output
+ name.or.dash
+ format.book.title "title" output.warn
+ format.howpublished "howpublished" bibinfo.check output
+ format.organization.institution.standard.type.number output
+ format.revision output
+ format.date output
+ format.note output
+ format.url output
+ fin.entry
+ if.url.std.interword.spacing
+% TB: added for annotation
+ format.annotate write$
+ newline$
+}
+
+FUNCTION {techreport}
+{ std.status.using.comma
+ start.entry
+ if.url.alt.interword.spacing
+ format.authors "author" output.warn
+ name.or.dash
+ format.article.title "title" output.warn
+ format.howpublished "howpublished" bibinfo.check output
+ format.institution "institution" bibinfo.warn output
+ format.address "address" bibinfo.check output
+ format.tech.report.number output.nonnull
+ format.date "year" output.warn
+ format.note output
+ format.url output
+ fin.entry
+ if.url.std.interword.spacing
+% TB: added for annotation
+ format.annotate write$
+ newline$
+}
+
+FUNCTION {unpublished}
+{ std.status.using.comma
+ start.entry
+ if.url.alt.interword.spacing
+ format.authors "author" output.warn
+ name.or.dash
+ format.article.title "title" output.warn
+ format.date output
+ format.note "note" output.warn
+ format.url output
+ fin.entry
+ if.url.std.interword.spacing
+% TB: added for annotation
+ format.annotate write$
+ newline$
+}
+
+
+% The special entry type which provides the user interface to the
+% BST controls
+FUNCTION {IEEEtranBSTCTL}
+{ is.print.banners.to.terminal
+ { "** IEEEtran BST control entry " quote$ * cite$ * quote$ * " detected." *
+ top$
+ }
+ { skip$ }
+ if$
+ CTLuse_article_number
+ empty$
+ { skip$ }
+ { CTLuse_article_number
+ yes.no.to.int
+ 'is.use.number.for.article :=
+ }
+ if$
+ CTLuse_paper
+ empty$
+ { skip$ }
+ { CTLuse_paper
+ yes.no.to.int
+ 'is.use.paper :=
+ }
+ if$
+ CTLuse_forced_etal
+ empty$
+ { skip$ }
+ { CTLuse_forced_etal
+ yes.no.to.int
+ 'is.forced.et.al :=
+ }
+ if$
+ CTLmax_names_forced_etal
+ empty$
+ { skip$ }
+ { CTLmax_names_forced_etal
+ string.to.integer
+ 'max.num.names.before.forced.et.al :=
+ }
+ if$
+ CTLnames_show_etal
+ empty$
+ { skip$ }
+ { CTLnames_show_etal
+ string.to.integer
+ 'num.names.shown.with.forced.et.al :=
+ }
+ if$
+ CTLuse_alt_spacing
+ empty$
+ { skip$ }
+ { CTLuse_alt_spacing
+ yes.no.to.int
+ 'is.use.alt.interword.spacing :=
+ }
+ if$
+ CTLalt_stretch_factor
+ empty$
+ { skip$ }
+ { CTLalt_stretch_factor
+ 'ALTinterwordstretchfactor :=
+ "\renewcommand\BIBentryALTinterwordstretchfactor{"
+ ALTinterwordstretchfactor * "}" *
+ write$ newline$
+ }
+ if$
+ CTLdash_repeated_names
+ empty$
+ { skip$ }
+ { CTLdash_repeated_names
+ yes.no.to.int
+ 'is.dash.repeated.names :=
+ }
+ if$
+ CTLname_format_string
+ empty$
+ { skip$ }
+ { CTLname_format_string
+ 'name.format.string :=
+ }
+ if$
+ CTLname_latex_cmd
+ empty$
+ { skip$ }
+ { CTLname_latex_cmd
+ 'name.latex.cmd :=
+ }
+ if$
+
+
+ num.names.shown.with.forced.et.al max.num.names.before.forced.et.al >
+ { "CTLnames_show_etal cannot be greater than CTLmax_names_forced_etal in " cite$ * warning$
+ max.num.names.before.forced.et.al 'num.names.shown.with.forced.et.al :=
+ }
+ { skip$ }
+ if$
+}
+
+
+%%%%%%%%%%%%%%%%%%%
+%% ENTRY ALIASES %%
+%%%%%%%%%%%%%%%%%%%
+FUNCTION {conference}{inproceedings}
+FUNCTION {online}{electronic}
+FUNCTION {internet}{electronic}
+FUNCTION {webpage}{electronic}
+FUNCTION {default.type}{misc}
+
+
+
+%%%%%%%%%%%%%%%%%%
+%% MAIN PROGRAM %%
+%%%%%%%%%%%%%%%%%%
+
+READ
+
+EXECUTE {initialize.controls}
+EXECUTE {initialize.status.constants}
+EXECUTE {banner.message}
+
+
+
+% BEGIN sort code based on that of plain.bst
+
+FUNCTION {sortify}
+{ purify$
+ "l" change.case$
+}
+
+INTEGERS { len }
+
+FUNCTION {chop.word}
+{ 's :=
+ 'len :=
+ s #1 len substring$ =
+ { s len #1 + global.max$ substring$ }
+ { s }
+ if$
+}
+
+FUNCTION {sort.format.names}
+{ 's :=
+ #1 'nameptr :=
+ ""
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ { nameptr #1 >
+ { " " * }
+ { skip$ }
+ if$
+ s nameptr "{vv{ } }{ll{ }}{ ff{ }}{ jj{ }}" format.name$ 't :=
+ nameptr numnames = t "others" = and
+ { "et al" * }
+ { t sortify * }
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+}
+
+FUNCTION {sort.format.title}
+{ 't :=
+ "A " #2
+ "An " #3
+ "The " #4 t chop.word
+ chop.word
+ chop.word
+ sortify
+ #1 global.max$ substring$
+}
+
+FUNCTION {author.sort}
+{ author empty$
+ { key empty$
+ { "to sort, need author or key in " cite$ * warning$ "" }
+ { key sortify }
+ if$
+ }
+ { author sort.format.names }
+ if$
+}
+
+FUNCTION {author.editor.sort}
+{ author empty$
+ { editor empty$
+ { key empty$
+ { "to sort, need author, editor, or key in " cite$ * warning$ "" }
+ { key sortify }
+ if$
+ }
+ { editor sort.format.names }
+ if$
+ }
+ { author sort.format.names }
+ if$
+}
+
+FUNCTION {author.organization.sort}
+{ author empty$
+ { organization empty$
+ { key empty$
+ { "to sort, need author, organization, or key in " cite$ * warning$ "" }
+ { key sortify }
+ if$
+ }
+ { "The " #4 organization chop.word sortify }
+ if$
+ }
+ { author sort.format.names }
+ if$
+}
+
+FUNCTION {editor.organization.sort}
+{ editor empty$
+ { organization empty$
+ { key empty$
+ { "to sort, need editor, organization, or key in " cite$ * warning$ "" }
+ { key sortify }
+ if$
+ }
+ { "The " #4 organization chop.word sortify }
+ if$
+ }
+ { editor sort.format.names }
+ if$
+}
+
+FUNCTION {author.organization.institution.sort}
+{ author empty$
+ { organization empty$
+ { institution empty$
+ { key empty$
+ { "to sort, need author, organization, institution or key in " cite$ * warning$ "" }
+ { key sortify }
+ if$
+ }
+ { "The " #4 institution chop.word sortify }
+ if$
+ }
+ { "The " #4 organization chop.word sortify }
+ if$
+ }
+ { author sort.format.names }
+ if$
+}
+
+
+FUNCTION {presort}
+{ type$ "ieeetranbstctl" =
+ { key empty$
+ { "_" }
+ { key sortify }
+ if$
+ }
+ { type$ "book" =
+ type$ "inbook" =
+ or
+ { author.editor.sort }
+ { type$ "proceedings" =
+ type$ "periodical" =
+ or
+ { editor.organization.sort }
+ { type$ "manual" =
+ type$ "electronic" =
+ type$ "misc" =
+ or or
+ { author.organization.sort }
+ { type$ "standard" =
+ { author.organization.institution.sort }
+ { author.sort }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+ " "
+ *
+ year empty.field.to.null.string sortify
+ *
+ " "
+ *
+ title empty.field.to.null.string
+ sort.format.title
+ *
+ }
+ if$
+ #1 entry.max$ substring$
+ 'sort.key$ :=
+}
+
+ITERATE {presort}
+
+SORT
+
+% END sort code based on that of plain.bst
+
+
+
+EXECUTE {initialize.longest.label}
+ITERATE {longest.label.pass}
+
+EXECUTE {begin.bib}
+ITERATE {call.type$}
+EXECUTE {end.bib}
+
+EXECUTE{completed.message}
+
+
+%% That's all folks, mds.
diff --git a/biblio/bibtex/contrib/misc/aaai-named.bst b/biblio/bibtex/contrib/misc/aaai-named.bst
new file mode 100644
index 0000000000..629d472534
--- /dev/null
+++ b/biblio/bibtex/contrib/misc/aaai-named.bst
@@ -0,0 +1,1283 @@
+%NAME: aaai-named.bst
+% BibTeX `aaai-named' style file for BibTeX version 0.99c, LaTeX version 2.09
+% This version was made by modifying the master file made by
+% Oren Patashnik (PATASHNIK@SCORE.STANFORD.EDU)
+
+% Copyright (C) 1985, all rights reserved.
+% Modifications Copyright 1988, Peter F. Patel-Schneider
+% Copying of this file is authorized only if either
+% (1) you make absolutely no changes to your copy, including name, or
+% (2) if you do make changes, you name it something other than
+% btxbst.doc, plain.bst, unsrt.bst, alpha.bst, and abbrv.bst.
+% This restriction helps ensure that all standard styles are identical.
+
+% There are undoubtably bugs in this style. If you make bug fixes,
+% improvements, etc. please let me know. My e-mail address is:
+% pfps@spar.slb.com
+
+% Citation format: [author-last-name, year]
+% [author-last-name and author-last-name, year]
+% [author-last-name {\em et al.}, year]
+%
+% Reference list ordering: alphabetical by author or whatever passes
+% for author in the absence of one.
+%
+% This BibTeX style has support for short (year only) citations. This
+% is done by having the citations actually look like
+% \citename{name-info, }year
+% The LaTeX style has to have the following
+% \let\@internalcite\cite
+% \def\cite{\def\citename##1{##1}\@internalcite}
+% \def\shortcite{\def\citename##1{}\@internalcite}
+% \def\@biblabel#1{\def\citename##1{##1}[#1]\hfill}
+% which makes \shortcite the macro for short citations.
+
+ENTRY
+ { address
+ author
+ booktitle
+ chapter
+ edition
+ editor
+ howpublished
+ institution
+ journal
+ key
+ month
+ note
+ number
+ organization
+ pages
+ publisher
+ school
+ series
+ title
+ type
+ volume
+ year
+ }
+ {}
+ { label extra.label sort.label }
+
+INTEGERS { output.state before.all mid.sentence after.sentence after.block }
+
+FUNCTION {init.state.consts}
+{ #0 'before.all :=
+ #1 'mid.sentence :=
+ #2 'after.sentence :=
+ #3 'after.block :=
+}
+
+STRINGS { s t }
+
+FUNCTION {output.nonnull}
+{ 's :=
+ output.state mid.sentence =
+ { ", " * write$ }
+ { output.state after.block =
+ { add.period$ write$
+ newline$
+ "\newblock " write$
+ }
+ { output.state before.all =
+ 'write$
+ { add.period$ " " * write$ }
+ if$
+ }
+ if$
+ mid.sentence 'output.state :=
+ }
+ if$
+ s
+}
+
+FUNCTION {output}
+{ duplicate$ empty$
+ 'pop$
+ 'output.nonnull
+ if$
+}
+
+FUNCTION {output.check}
+{ 't :=
+ duplicate$ empty$
+ { pop$ "empty " t * " in " * cite$ * warning$ }
+ 'output.nonnull
+ if$
+}
+
+FUNCTION {output.bibitem}
+{ newline$
+
+ "\bibitem[" write$
+ label write$
+ "]{" write$
+
+ cite$ write$
+ "}" write$
+ newline$
+ ""
+ before.all 'output.state :=
+}
+
+FUNCTION {fin.entry}
+{ add.period$
+ write$
+ newline$
+}
+
+FUNCTION {new.block}
+{ output.state before.all =
+ 'skip$
+ { after.block 'output.state := }
+ if$
+}
+
+FUNCTION {new.sentence}
+{ output.state after.block =
+ 'skip$
+ { output.state before.all =
+ 'skip$
+ { after.sentence 'output.state := }
+ if$
+ }
+ if$
+}
+
+FUNCTION {not}
+{ { #0 }
+ { #1 }
+ if$
+}
+
+FUNCTION {and}
+{ 'skip$
+ { pop$ #0 }
+ if$
+}
+
+FUNCTION {or}
+{ { pop$ #1 }
+ 'skip$
+ if$
+}
+
+FUNCTION {new.block.checka}
+{ empty$
+ 'skip$
+ 'new.block
+ if$
+}
+
+FUNCTION {new.block.checkb}
+{ empty$
+ swap$ empty$
+ and
+ 'skip$
+ 'new.block
+ if$
+}
+
+FUNCTION {new.sentence.checka}
+{ empty$
+ 'skip$
+ 'new.sentence
+ if$
+}
+
+FUNCTION {new.sentence.checkb}
+{ empty$
+ swap$ empty$
+ and
+ 'skip$
+ 'new.sentence
+ if$
+}
+
+FUNCTION {field.or.null}
+{ duplicate$ empty$
+ { pop$ "" }
+ 'skip$
+ if$
+}
+
+FUNCTION {emphasize}
+{ duplicate$ empty$
+ { pop$ "" }
+ { "{\em " swap$ * "}" * }
+ if$
+}
+
+INTEGERS { nameptr namesleft numnames }
+
+FUNCTION {format.names}
+{ 's :=
+ #1 'nameptr :=
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+
+ { s nameptr "{ff~}{vv~}{ll}{, jj}" format.name$ 't :=
+
+ nameptr #1 >
+ { namesleft #1 >
+ { ", " * t * }
+ { numnames #2 >
+ { "," * }
+ 'skip$
+ if$
+ t "others" =
+ { " et~al." * }
+ { " and " * t * }
+ if$
+ }
+ if$
+ }
+ 't
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+}
+
+FUNCTION {format.authors}
+{ author empty$
+ { "" }
+ { author format.names }
+ if$
+}
+
+FUNCTION {format.editors}
+{ editor empty$
+ { "" }
+ { editor format.names
+ editor num.names$ #1 >
+ { ", editors" * }
+ { ", editor" * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.title}
+{ title empty$
+ { "" }
+
+ { title "t" change.case$ }
+
+ if$
+}
+
+FUNCTION {n.dashify}
+{ 't :=
+ ""
+ { t empty$ not }
+ { t #1 #1 substring$ "-" =
+ { t #1 #2 substring$ "--" = not
+ { "--" *
+ t #2 global.max$ substring$ 't :=
+ }
+ { { t #1 #1 substring$ "-" = }
+ { "-" *
+ t #2 global.max$ substring$ 't :=
+ }
+ while$
+ }
+ if$
+ }
+ { t #1 #1 substring$ *
+ t #2 global.max$ substring$ 't :=
+ }
+ if$
+ }
+ while$
+}
+
+FUNCTION {format.date}
+{ year empty$
+ { month empty$
+ { "" }
+ { "there's a month but no year in " cite$ * warning$
+ month
+ }
+ if$
+ }
+ { month empty$
+ 'year
+ { month " " * year * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.btitle}
+{ title emphasize
+}
+
+FUNCTION {tie.or.space.connect}
+{ duplicate$ text.length$ #3 <
+ { "~" }
+ { " " }
+ if$
+ swap$ * *
+}
+
+FUNCTION {either.or.check}
+{ empty$
+ 'pop$
+ { "can't use both " swap$ * " fields in " * cite$ * warning$ }
+ if$
+}
+
+FUNCTION {format.bvolume}
+{ volume empty$
+ { "" }
+ { "volume" volume tie.or.space.connect
+ series empty$
+ 'skip$
+ { " of " * series emphasize * }
+ if$
+ "volume and number" number either.or.check
+ }
+ if$
+}
+
+FUNCTION {format.number.series}
+{ volume empty$
+ { number empty$
+ { series field.or.null }
+ { output.state mid.sentence =
+ { "number" }
+ { "Number" }
+ if$
+ number tie.or.space.connect
+ series empty$
+ { "there's a number but no series in " cite$ * warning$ }
+ { " in " * series * }
+ if$
+ }
+ if$
+ }
+ { "" }
+ if$
+}
+
+FUNCTION {format.edition}
+{ edition empty$
+ { "" }
+ { output.state mid.sentence =
+ { edition "l" change.case$ " edition" * }
+ { edition "t" change.case$ " edition" * }
+ if$
+ }
+ if$
+}
+
+INTEGERS { multiresult }
+
+FUNCTION {multi.page.check}
+{ 't :=
+ #0 'multiresult :=
+ { multiresult not
+ t empty$ not
+ and
+ }
+ { t #1 #1 substring$
+ duplicate$ "-" =
+ swap$ duplicate$ "," =
+ swap$ "+" =
+ or or
+ { #1 'multiresult := }
+ { t #2 global.max$ substring$ 't := }
+ if$
+ }
+ while$
+ multiresult
+}
+
+FUNCTION {format.pages}
+{ pages empty$
+ { "" }
+ { pages multi.page.check
+ { "pages" pages n.dashify tie.or.space.connect }
+ { "page" pages tie.or.space.connect }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.vol.num.pages}
+{ volume field.or.null
+ number empty$
+ 'skip$
+ { "(" number * ")" * *
+ volume empty$
+ { "there's a number but no volume in " cite$ * warning$ }
+ 'skip$
+ if$
+ }
+ if$
+ pages empty$
+ 'skip$
+ { duplicate$ empty$
+ { pop$ format.pages }
+ { ":" * pages n.dashify * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.chapter.pages}
+{ chapter empty$
+ 'format.pages
+ { type empty$
+ { "chapter" }
+ { type "l" change.case$ }
+ if$
+ chapter tie.or.space.connect
+ pages empty$
+ 'skip$
+ { ", " * format.pages * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.in.ed.booktitle}
+{ booktitle empty$
+ { "" }
+ { editor empty$
+ { "In " booktitle emphasize * }
+ { "In " format.editors * ", " * booktitle emphasize * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {empty.misc.check}
+{ author empty$ title empty$ howpublished empty$
+ month empty$ year empty$ note empty$
+ and and and and and
+
+ key empty$ not and
+
+ { "all relevant fields are empty in " cite$ * warning$ }
+ 'skip$
+ if$
+}
+
+FUNCTION {format.thesis.type}
+{ type empty$
+ 'skip$
+ { pop$
+ type "t" change.case$
+ }
+ if$
+}
+
+FUNCTION {format.tr.number}
+{ type empty$
+ { "Technical Report" }
+ 'type
+ if$
+ number empty$
+ { "t" change.case$ }
+ { number tie.or.space.connect }
+ if$
+}
+
+FUNCTION {format.article.crossref}
+{ key empty$
+ { journal empty$
+ { "need key or journal for " cite$ * " to crossref " * crossref *
+ warning$
+ ""
+ }
+ { "In {\em " journal * "\/}" * }
+ if$
+ }
+ { "In " key * }
+ if$
+ " \cite{" * crossref * "}" *
+}
+
+FUNCTION {format.crossref.editor}
+{ editor #1 "{vv~}{ll}" format.name$
+ editor num.names$ duplicate$
+ #2 >
+ { pop$ " et~al." * }
+ { #2 <
+ 'skip$
+ { editor #2 "{ff }{vv }{ll}{ jj}" format.name$ "others" =
+ { " et~al." * }
+ { " and " * editor #2 "{vv~}{ll}" format.name$ * }
+ if$
+ }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.book.crossref}
+{ volume empty$
+ { "empty volume in " cite$ * "'s crossref of " * crossref * warning$
+ "In "
+ }
+ { "Volume" volume tie.or.space.connect
+ " of " *
+ }
+ if$
+ editor empty$
+ editor field.or.null author field.or.null =
+ or
+ { key empty$
+ { series empty$
+ { "need editor, key, or series for " cite$ * " to crossref " *
+ crossref * warning$
+ "" *
+ }
+ { "{\em " * series * "\/}" * }
+ if$
+ }
+ { key * }
+ if$
+ }
+ { format.crossref.editor * }
+ if$
+ " \cite{" * crossref * "}" *
+}
+
+FUNCTION {format.incoll.inproc.crossref}
+{ editor empty$
+ editor field.or.null author field.or.null =
+ or
+ { key empty$
+ { booktitle empty$
+ { "need editor, key, or booktitle for " cite$ * " to crossref " *
+ crossref * warning$
+ ""
+ }
+ { "In {\em " booktitle * "\/}" * }
+ if$
+ }
+ { "In " key * }
+ if$
+ }
+ { "In " format.crossref.editor * }
+ if$
+ " \cite{" * crossref * "}" *
+}
+
+FUNCTION {article}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.title "title" output.check
+ new.block
+ crossref missing$
+ { journal emphasize "journal" output.check
+ format.vol.num.pages output
+ format.date "year" output.check
+ }
+ { format.article.crossref output.nonnull
+ format.pages output
+ }
+ if$
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {book}
+{ output.bibitem
+ author empty$
+ { format.editors "author and editor" output.check }
+ { format.authors output.nonnull
+ crossref missing$
+ { "author and editor" editor either.or.check }
+ 'skip$
+ if$
+ }
+ if$
+ new.block
+ format.btitle "title" output.check
+ crossref missing$
+ { format.bvolume output
+ new.block
+ format.number.series output
+ new.sentence
+ publisher "publisher" output.check
+ address output
+ }
+ { new.block
+ format.book.crossref output.nonnull
+ }
+ if$
+ format.edition output
+ format.date "year" output.check
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {booklet}
+{ output.bibitem
+ format.authors output
+ new.block
+ format.title "title" output.check
+ howpublished address new.block.checkb
+ howpublished output
+ address output
+ format.date output
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {inbook}
+{ output.bibitem
+ author empty$
+ { format.editors "author and editor" output.check }
+ { format.authors output.nonnull
+ crossref missing$
+ { "author and editor" editor either.or.check }
+ 'skip$
+ if$
+ }
+ if$
+ new.block
+ format.btitle "title" output.check
+ crossref missing$
+ { format.bvolume output
+ format.chapter.pages "chapter and pages" output.check
+ new.block
+ format.number.series output
+ new.sentence
+ publisher "publisher" output.check
+ address output
+ }
+ { format.chapter.pages "chapter and pages" output.check
+ new.block
+ format.book.crossref output.nonnull
+ }
+ if$
+ format.edition output
+ format.date "year" output.check
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {incollection}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.title "title" output.check
+ new.block
+ crossref missing$
+ { format.in.ed.booktitle "booktitle" output.check
+ format.bvolume output
+ format.number.series output
+ format.chapter.pages output
+ new.sentence
+ publisher "publisher" output.check
+ address output
+ format.edition output
+ format.date "year" output.check
+ }
+ { format.incoll.inproc.crossref output.nonnull
+ format.chapter.pages output
+ }
+ if$
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {inproceedings}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.title "title" output.check
+ new.block
+ crossref missing$
+ { format.in.ed.booktitle "booktitle" output.check
+ format.bvolume output
+ format.number.series output
+ format.pages output
+ address empty$
+ { organization publisher new.sentence.checkb
+ organization output
+ publisher output
+ format.date "year" output.check
+ }
+ { address output.nonnull
+ format.date "year" output.check
+ new.sentence
+ organization output
+ publisher output
+ }
+ if$
+ }
+ { format.incoll.inproc.crossref output.nonnull
+ format.pages output
+ }
+ if$
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {conference} { inproceedings }
+
+FUNCTION {manual}
+{ output.bibitem
+ author empty$
+ { organization empty$
+ 'skip$
+ { organization output.nonnull
+ address output
+ }
+ if$
+ }
+ { format.authors output.nonnull }
+ if$
+ new.block
+ format.btitle "title" output.check
+ author empty$
+ { organization empty$
+ { address new.block.checka
+ address output
+ }
+ 'skip$
+ if$
+ }
+ { organization address new.block.checkb
+ organization output
+ address output
+ }
+ if$
+ format.edition output
+ format.date output
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {mastersthesis}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.title "title" output.check
+ new.block
+ "Master's thesis" format.thesis.type output.nonnull
+ school "school" output.check
+ address output
+ format.date "year" output.check
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {misc}
+{ output.bibitem
+ format.authors output
+ title howpublished new.block.checkb
+ format.title output
+ howpublished new.block.checka
+ howpublished output
+ format.date output
+ new.block
+ note output
+ fin.entry
+ empty.misc.check
+}
+
+FUNCTION {phdthesis}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.btitle "title" output.check
+ new.block
+ "PhD thesis" format.thesis.type output.nonnull
+ school "school" output.check
+ address output
+ format.date "year" output.check
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {proceedings}
+{ output.bibitem
+ editor empty$
+ { organization output }
+ { format.editors output.nonnull }
+ if$
+ new.block
+ format.btitle "title" output.check
+ format.bvolume output
+ format.number.series output
+ address empty$
+ { editor empty$
+ { publisher new.sentence.checka }
+ { organization publisher new.sentence.checkb
+ organization output
+ }
+ if$
+ publisher output
+ format.date "year" output.check
+ }
+ { address output.nonnull
+ format.date "year" output.check
+ new.sentence
+ editor empty$
+ 'skip$
+ { organization output }
+ if$
+ publisher output
+ }
+ if$
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {techreport}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.title "title" output.check
+ new.block
+ format.tr.number output.nonnull
+ institution "institution" output.check
+ address output
+ format.date "year" output.check
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {unpublished}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.title "title" output.check
+ new.block
+ note "note" output.check
+ format.date output
+ fin.entry
+}
+
+FUNCTION {default.type} { misc }
+
+MACRO {jan} {"January"}
+
+MACRO {feb} {"February"}
+
+MACRO {mar} {"March"}
+
+MACRO {apr} {"April"}
+
+MACRO {may} {"May"}
+
+MACRO {jun} {"June"}
+
+MACRO {jul} {"July"}
+
+MACRO {aug} {"August"}
+
+MACRO {sep} {"September"}
+
+MACRO {oct} {"October"}
+
+MACRO {nov} {"November"}
+
+MACRO {dec} {"December"}
+
+MACRO {acmcs} {"ACM Computing Surveys"}
+
+MACRO {acta} {"Acta Informatica"}
+
+MACRO {cacm} {"Communications of the ACM"}
+
+MACRO {ibmjrd} {"IBM Journal of Research and Development"}
+
+MACRO {ibmsj} {"IBM Systems Journal"}
+
+MACRO {ieeese} {"IEEE Transactions on Software Engineering"}
+
+MACRO {ieeetc} {"IEEE Transactions on Computers"}
+
+MACRO {ieeetcad}
+ {"IEEE Transactions on Computer-Aided Design of Integrated Circuits"}
+
+MACRO {ipl} {"Information Processing Letters"}
+
+MACRO {jacm} {"Journal of the ACM"}
+
+MACRO {jcss} {"Journal of Computer and System Sciences"}
+
+MACRO {scp} {"Science of Computer Programming"}
+
+MACRO {sicomp} {"SIAM Journal on Computing"}
+
+MACRO {tocs} {"ACM Transactions on Computer Systems"}
+
+MACRO {tods} {"ACM Transactions on Database Systems"}
+
+MACRO {tog} {"ACM Transactions on Graphics"}
+
+MACRO {toms} {"ACM Transactions on Mathematical Software"}
+
+MACRO {toois} {"ACM Transactions on Office Information Systems"}
+
+MACRO {toplas} {"ACM Transactions on Programming Languages and Systems"}
+
+MACRO {tcs} {"Theoretical Computer Science"}
+
+READ
+
+FUNCTION {sortify}
+{ purify$
+ "l" change.case$
+}
+
+INTEGERS { len }
+
+FUNCTION {chop.word}
+{ 's :=
+ 'len :=
+ s #1 len substring$ =
+ { s len #1 + global.max$ substring$ }
+ 's
+ if$
+}
+
+INTEGERS { et.al.char.used }
+
+FUNCTION {initialize.et.al.char.used}
+{ #0 'et.al.char.used :=
+}
+
+EXECUTE {initialize.et.al.char.used}
+
+FUNCTION {format.lab.names}
+{ 's :=
+ s num.names$ 'numnames :=
+
+ numnames #1 =
+ { s #1 "{vv }{ll}" format.name$ }
+ { numnames #2 =
+ { s #1 "{vv }{ll }and " format.name$ s #2 "{vv }{ll}" format.name$ *
+ }
+ { s #1 "{vv }{ll }\bgroup \em et al.\egroup " format.name$ }
+ if$
+ }
+ if$
+
+}
+
+FUNCTION {author.key.label}
+{ author empty$
+ { key empty$
+
+ { cite$ #1 #3 substring$ }
+
+ { key #3 text.prefix$ }
+ if$
+ }
+ { author format.lab.names }
+ if$
+}
+
+FUNCTION {author.editor.key.label}
+{ author empty$
+ { editor empty$
+ { key empty$
+
+ { cite$ #1 #3 substring$ }
+
+ { key #3 text.prefix$ }
+ if$
+ }
+ { editor format.lab.names }
+ if$
+ }
+ { author format.lab.names }
+ if$
+}
+
+FUNCTION {author.key.organization.label}
+{ author empty$
+ { key empty$
+ { organization empty$
+
+ { cite$ #1 #3 substring$ }
+
+ { "The " #4 organization chop.word #3 text.prefix$ }
+ if$
+ }
+ { key #3 text.prefix$ }
+ if$
+ }
+ { author format.lab.names }
+ if$
+}
+
+FUNCTION {editor.key.organization.label}
+{ editor empty$
+ { key empty$
+ { organization empty$
+
+ { cite$ #1 #3 substring$ }
+
+ { "The " #4 organization chop.word #3 text.prefix$ }
+ if$
+ }
+ { key #3 text.prefix$ }
+ if$
+ }
+ { editor format.lab.names }
+ if$
+}
+
+FUNCTION {calc.label}
+{ type$ "book" =
+ type$ "inbook" =
+ or
+ 'author.editor.key.label
+ { type$ "proceedings" =
+ 'editor.key.organization.label
+ { type$ "manual" =
+ 'author.key.organization.label
+ 'author.key.label
+ if$
+ }
+ if$
+ }
+ if$
+ duplicate$
+
+ "\protect\citename{" swap$ * ", }" *
+ year field.or.null purify$ *
+ 'label :=
+ year field.or.null purify$ *
+
+ sortify 'sort.label :=
+}
+
+FUNCTION {sort.format.names}
+{ 's :=
+ #1 'nameptr :=
+ ""
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ { nameptr #1 >
+ { " " * }
+ 'skip$
+ if$
+
+ s nameptr "{vv{ } }{ll{ }}{ ff{ }}{ jj{ }}" format.name$ 't :=
+
+ nameptr numnames = t "others" = and
+ { "et al" * }
+ { t sortify * }
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+}
+
+FUNCTION {sort.format.title}
+{ 't :=
+ "A " #2
+ "An " #3
+ "The " #4 t chop.word
+ chop.word
+ chop.word
+ sortify
+ #1 global.max$ substring$
+}
+
+FUNCTION {author.sort}
+{ author empty$
+ { key empty$
+ { "to sort, need author or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { author sort.format.names }
+ if$
+}
+
+FUNCTION {author.editor.sort}
+{ author empty$
+ { editor empty$
+ { key empty$
+ { "to sort, need author, editor, or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { editor sort.format.names }
+ if$
+ }
+ { author sort.format.names }
+ if$
+}
+
+FUNCTION {author.organization.sort}
+{ author empty$
+ { organization empty$
+ { key empty$
+ { "to sort, need author, organization, or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { "The " #4 organization chop.word sortify }
+ if$
+ }
+ { author sort.format.names }
+ if$
+}
+
+FUNCTION {editor.organization.sort}
+{ editor empty$
+ { organization empty$
+ { key empty$
+ { "to sort, need editor, organization, or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { "The " #4 organization chop.word sortify }
+ if$
+ }
+ { editor sort.format.names }
+ if$
+}
+
+FUNCTION {presort}
+
+{ calc.label
+ sort.label
+ " "
+ *
+ type$ "book" =
+
+ type$ "inbook" =
+ or
+ 'author.editor.sort
+ { type$ "proceedings" =
+ 'editor.organization.sort
+ { type$ "manual" =
+ 'author.organization.sort
+ 'author.sort
+ if$
+ }
+ if$
+ }
+ if$
+
+ *
+
+ " "
+ *
+ year field.or.null sortify
+ *
+ " "
+ *
+ title field.or.null
+ sort.format.title
+ *
+ #1 entry.max$ substring$
+ 'sort.key$ :=
+}
+
+ITERATE {presort}
+
+SORT
+
+STRINGS { longest.label last.sort.label next.extra }
+
+INTEGERS { longest.label.width last.extra.num }
+
+FUNCTION {initialize.longest.label}
+{ "" 'longest.label :=
+ #0 int.to.chr$ 'last.sort.label :=
+ "" 'next.extra :=
+ #0 'longest.label.width :=
+ #0 'last.extra.num :=
+}
+
+FUNCTION {forward.pass}
+{ last.sort.label sort.label =
+ { last.extra.num #1 + 'last.extra.num :=
+ last.extra.num int.to.chr$ 'extra.label :=
+ }
+ { "a" chr.to.int$ 'last.extra.num :=
+ "" 'extra.label :=
+ sort.label 'last.sort.label :=
+ }
+ if$
+}
+
+FUNCTION {reverse.pass}
+{ next.extra "b" =
+ { "a" 'extra.label := }
+ 'skip$
+ if$
+ label extra.label * 'label :=
+ label width$ longest.label.width >
+ { label 'longest.label :=
+ label width$ 'longest.label.width :=
+ }
+ 'skip$
+ if$
+ extra.label 'next.extra :=
+}
+
+EXECUTE {initialize.longest.label}
+
+ITERATE {forward.pass}
+
+REVERSE {reverse.pass}
+
+FUNCTION {begin.bib}
+
+{ et.al.char.used
+ { "\newcommand{\etalchar}[1]{$^{#1}$}" write$ newline$ }
+ 'skip$
+ if$
+ preamble$ empty$
+
+ 'skip$
+ { preamble$ write$ newline$ }
+ if$
+
+ "\begin{thebibliography}{" "}" * write$ newline$
+
+}
+
+EXECUTE {begin.bib}
+
+EXECUTE {init.state.consts}
+
+ITERATE {call.type$}
+
+FUNCTION {end.bib}
+{ newline$
+ "\end{thebibliography}" write$ newline$
+}
+
+EXECUTE {end.bib}
diff --git a/biblio/bibtex/contrib/misc/abstract.bst b/biblio/bibtex/contrib/misc/abstract.bst
new file mode 120000
index 0000000000..ab05dfee20
--- /dev/null
+++ b/biblio/bibtex/contrib/misc/abstract.bst
@@ -0,0 +1 @@
+../../utils/bibtools/abstract.bst \ No newline at end of file
diff --git a/biblio/bibtex/contrib/misc/achicago.README b/biblio/bibtex/contrib/misc/achicago.README
new file mode 100644
index 0000000000..27238d594b
--- /dev/null
+++ b/biblio/bibtex/contrib/misc/achicago.README
@@ -0,0 +1,25 @@
+
+ ACHICAGO
+
+ Chicago Manual A-style references
+ and
+ author-date citations
+
+
+ To get a LaTeX package and a BibTeX bibstyle producing citations and
+ references in a style recommended by _The Chicago Manual of Style_,
+ please download the entire directory
+
+ tex-archive/macros/latex/contrib/supported/frankenstein
+
+ on CTAN and follow the installation instructions in the file INSTALL
+ in that directory. Full documentation of the BibTeX bibliography
+ style is in the file achicago-bst.dvi in that directory; full
+ documentation of the accompanying LaTeX package is in the file
+ achicago.dvi in that directory.
+
+ Please see the file README in that directory for all further
+ information.
+
+
+ Author: Matt Swift <swift@alum.mit.edu>
diff --git a/biblio/bibtex/contrib/misc/aichej.bst b/biblio/bibtex/contrib/misc/aichej.bst
new file mode 100644
index 0000000000..85035211d2
--- /dev/null
+++ b/biblio/bibtex/contrib/misc/aichej.bst
@@ -0,0 +1,1380 @@
+%%
+%% This is file `aichej.bst',
+%% generated with the docstrip utility using the custom-bib package by
+%% Patrick W. Daly
+%%
+%% Bibliography style file for American Institute of Chemical Engineers Journal
+%% (AIChE Journal). Settings entered by SDS (University of Minnesota)
+%%
+%% BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
+%% FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
+%% OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
+%% PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
+%% OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+%% MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
+%% TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
+%% PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
+%% REPAIR OR CORRECTION. (GNU GPL)
+%%
+%% The original source files were:
+%%
+%% merlin.mbs (with options: `pres,seq-no,nm-rvx,ed-rev,jnrlst,dt-jnl,yr-per,xmth,yrp-semi,yrpp-xsp,atit-u,jxper,thtit-a,trnum-it,num-xser,add-pub,edby,in-col,pp,ed,abr,ednx,ord,jabr,xand,etal-xc,url,url-nl,nfss,')
+%% ----------------------------------------
+%% *** AIChE Journal Bibliography Style File ***
+%%
+%% Copyright 1994-2007 Patrick W Daly
+ % ===============================================================
+ % IMPORTANT NOTICE:
+ % This bibliographic style (bst) file has been generated from one or
+ % more master bibliographic style (mbs) files, listed above.
+ %
+ % This generated file can be redistributed and/or modified under the terms
+ % of the LaTeX Project Public License Distributed from CTAN
+ % archives in directory macros/latex/base/lppl.txt; either
+ % version 1 of the License, or any later version.
+ % ===============================================================
+ % Name and version information of the main mbs file:
+ % \ProvidesFile{merlin.mbs}[2007/04/24 4.20 (PWD, AO, DPC)]
+ % For use with BibTeX version 0.99a or later
+ %-------------------------------------------------------------------
+ % This bibliography style file is intended for texts in ENGLISH
+ % This is a numerical citation style, and as such is standard LaTeX.
+ % It requires no extra package to interface to the main text.
+ % The form of the \bibitem entries is
+ % \bibitem{key}...
+ % Usage of \cite is as follows:
+ % \cite{key} ==>> [#]
+ % \cite[chap. 2]{key} ==>> [#, chap. 2]
+ % where # is a number determined by the ordering in the reference list.
+ % The order in the reference list is that by which the works were originally
+ % cited in the text, or that in the database.
+ %---------------------------------------------------------------------
+
+ENTRY
+ { address
+ author
+ booktitle
+ chapter
+ edition
+ editor
+ eid
+ howpublished
+ institution
+ journal
+ key
+ month
+ note
+ number
+ organization
+ pages
+ publisher
+ school
+ series
+ title
+ type
+ url
+ volume
+ year
+ }
+ {}
+ { label }
+INTEGERS { output.state before.all mid.sentence after.sentence after.block }
+FUNCTION {init.state.consts}
+{ #0 'before.all :=
+ #1 'mid.sentence :=
+ #2 'after.sentence :=
+ #3 'after.block :=
+}
+STRINGS { s t}
+FUNCTION {output.nonnull}
+{ 's :=
+ output.state mid.sentence =
+ { ", " * write$ }
+ { output.state after.block =
+ { add.period$ write$
+ newline$
+ "\newblock " write$
+ }
+ { output.state before.all =
+ 'write$
+ { add.period$ " " * write$ }
+ if$
+ }
+ if$
+ mid.sentence 'output.state :=
+ }
+ if$
+ s
+}
+FUNCTION {output}
+{ duplicate$ empty$
+ 'pop$
+ 'output.nonnull
+ if$
+}
+FUNCTION {output.check}
+{ 't :=
+ duplicate$ empty$
+ { pop$ "empty " t * " in " * cite$ * warning$ }
+ 'output.nonnull
+ if$
+}
+FUNCTION {fin.entry}
+{ add.period$
+ write$
+ newline$
+}
+
+FUNCTION {new.block}
+{ output.state before.all =
+ 'skip$
+ { after.block 'output.state := }
+ if$
+}
+FUNCTION {new.sentence}
+{ output.state after.block =
+ 'skip$
+ { output.state before.all =
+ 'skip$
+ { after.sentence 'output.state := }
+ if$
+ }
+ if$
+}
+FUNCTION {add.blank}
+{ " " * before.all 'output.state :=
+}
+
+FUNCTION {no.blank.or.punct}
+{ "\hspace{0pt}" * before.all 'output.state :=
+}
+
+FUNCTION {date.block}
+{
+ ";" *
+ no.blank.or.punct
+}
+
+FUNCTION {not}
+{ { #0 }
+ { #1 }
+ if$
+}
+FUNCTION {and}
+{ 'skip$
+ { pop$ #0 }
+ if$
+}
+FUNCTION {or}
+{ { pop$ #1 }
+ 'skip$
+ if$
+}
+STRINGS {z}
+FUNCTION {remove.dots}
+{ 'z :=
+ ""
+ { z empty$ not }
+ { z #1 #1 substring$
+ z #2 global.max$ substring$ 'z :=
+ duplicate$ "." = 'pop$
+ { * }
+ if$
+ }
+ while$
+}
+FUNCTION {new.block.checka}
+{ empty$
+ 'skip$
+ 'new.block
+ if$
+}
+FUNCTION {new.block.checkb}
+{ empty$
+ swap$ empty$
+ and
+ 'skip$
+ 'new.block
+ if$
+}
+FUNCTION {new.sentence.checka}
+{ empty$
+ 'skip$
+ 'new.sentence
+ if$
+}
+FUNCTION {new.sentence.checkb}
+{ empty$
+ swap$ empty$
+ and
+ 'skip$
+ 'new.sentence
+ if$
+}
+FUNCTION {field.or.null}
+{ duplicate$ empty$
+ { pop$ "" }
+ 'skip$
+ if$
+}
+FUNCTION {emphasize}
+{ duplicate$ empty$
+ { pop$ "" }
+ { "\emph{" swap$ * "}" * }
+ if$
+}
+FUNCTION {tie.or.space.prefix}
+{ duplicate$ text.length$ #3 <
+ { "~" }
+ { " " }
+ if$
+ swap$
+}
+
+FUNCTION {capitalize}
+{ "u" change.case$ "t" change.case$ }
+
+FUNCTION {space.word}
+{ " " swap$ * " " * }
+ % Here are the language-specific definitions for explicit words.
+ % Each function has a name bbl.xxx where xxx is the English word.
+ % The language selected here is ENGLISH
+FUNCTION {bbl.and}
+{ "and"}
+
+FUNCTION {bbl.etal}
+{ "et~al." }
+
+FUNCTION {bbl.editors}
+{ "eds." }
+
+FUNCTION {bbl.editor}
+{ "ed." }
+
+FUNCTION {bbl.edby}
+{ "edited by" }
+
+FUNCTION {bbl.edition}
+{ "ed." }
+
+FUNCTION {bbl.volume}
+{ "vol." }
+
+FUNCTION {bbl.of}
+{ "of" }
+
+FUNCTION {bbl.number}
+{ "no." }
+
+FUNCTION {bbl.nr}
+{ "no." }
+
+FUNCTION {bbl.in}
+{ "in" }
+
+FUNCTION {bbl.pages}
+{ "pp." }
+
+FUNCTION {bbl.page}
+{ "p." }
+
+FUNCTION {bbl.chapter}
+{ "chap." }
+
+FUNCTION {bbl.techrep}
+{ "Tech. Rep." }
+
+FUNCTION {bbl.mthesis}
+{ "Master's thesis" }
+
+FUNCTION {bbl.phdthesis}
+{ "Ph.D. thesis" }
+
+FUNCTION {bbl.first}
+{ "1st" }
+
+FUNCTION {bbl.second}
+{ "2nd" }
+
+FUNCTION {bbl.third}
+{ "3rd" }
+
+FUNCTION {bbl.fourth}
+{ "4th" }
+
+FUNCTION {bbl.fifth}
+{ "5th" }
+
+FUNCTION {bbl.st}
+{ "st" }
+
+FUNCTION {bbl.nd}
+{ "nd" }
+
+FUNCTION {bbl.rd}
+{ "rd" }
+
+FUNCTION {bbl.th}
+{ "th" }
+
+MACRO {jan} {"Jan."}
+
+MACRO {feb} {"Feb."}
+
+MACRO {mar} {"Mar."}
+
+MACRO {apr} {"Apr."}
+
+MACRO {may} {"May"}
+
+MACRO {jun} {"Jun."}
+
+MACRO {jul} {"Jul."}
+
+MACRO {aug} {"Aug."}
+
+MACRO {sep} {"Sep."}
+
+MACRO {oct} {"Oct."}
+
+MACRO {nov} {"Nov."}
+
+MACRO {dec} {"Dec."}
+
+FUNCTION {eng.ord}
+{ duplicate$ "1" swap$ *
+ #-2 #1 substring$ "1" =
+ { bbl.th * }
+ { duplicate$ #-1 #1 substring$
+ duplicate$ "1" =
+ { pop$ bbl.st * }
+ { duplicate$ "2" =
+ { pop$ bbl.nd * }
+ { "3" =
+ { bbl.rd * }
+ { bbl.th * }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+}
+
+MACRO {acmcs} {"ACM Comput. Surv."}
+
+MACRO {acta} {"Acta Inf."}
+
+MACRO {cacm} {"Commun. ACM"}
+
+MACRO {ibmjrd} {"IBM J. Res. Dev."}
+
+MACRO {ibmsj} {"IBM Syst.~J."}
+
+MACRO {ieeese} {"IEEE Trans. Software Eng."}
+
+MACRO {ieeetc} {"IEEE Trans. Comput."}
+
+MACRO {ieeetcad}
+ {"IEEE Trans. Comput. Aid. Des."}
+
+MACRO {ipl} {"Inf. Process. Lett."}
+
+MACRO {jacm} {"J.~ACM"}
+
+MACRO {jcss} {"J.~Comput. Syst. Sci."}
+
+MACRO {scp} {"Sci. Comput. Program."}
+
+MACRO {sicomp} {"SIAM J. Comput."}
+
+MACRO {tocs} {"ACM Trans. Comput. Syst."}
+
+MACRO {tods} {"ACM Trans. Database Syst."}
+
+MACRO {tog} {"ACM Trans. Graphic."}
+
+MACRO {toms} {"ACM Trans. Math. Software"}
+
+MACRO {toois} {"ACM Trans. Office Inf. Syst."}
+
+MACRO {toplas} {"ACM Trans. Progr. Lang. Syst."}
+
+MACRO {tcs} {"Theor. Comput. Sci."}
+
+FUNCTION {bibinfo.check}
+{ swap$
+ duplicate$ missing$
+ {
+ pop$ pop$
+ ""
+ }
+ { duplicate$ empty$
+ {
+ swap$ pop$
+ }
+ { swap$
+ pop$
+ }
+ if$
+ }
+ if$
+}
+FUNCTION {bibinfo.warn}
+{ swap$
+ duplicate$ missing$
+ {
+ swap$ "missing " swap$ * " in " * cite$ * warning$ pop$
+ ""
+ }
+ { duplicate$ empty$
+ {
+ swap$ "empty " swap$ * " in " * cite$ * warning$
+ }
+ { swap$
+ pop$
+ }
+ if$
+ }
+ if$
+}
+FUNCTION {write.url}
+{ url empty$
+ { skip$ }
+ { "\newline\urlprefix\url{" url * "}" * write$ newline$ }
+ if$
+}
+
+INTEGERS { nameptr namesleft numnames }
+
+
+STRINGS { bibinfo}
+
+FUNCTION {format.names}
+{ 'bibinfo :=
+ duplicate$ empty$ 'skip$ {
+ 's :=
+ "" 't :=
+ #1 'nameptr :=
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ { s nameptr
+ "{vv~}{ll}{ f{}}{ jj}"
+ format.name$
+ remove.dots
+ bibinfo bibinfo.check
+ 't :=
+ nameptr #1 >
+ {
+ namesleft #1 >
+ { ", " * t * }
+ {
+ s nameptr "{ll}" format.name$ duplicate$ "others" =
+ { 't := }
+ { pop$ }
+ if$
+ "," *
+ t "others" =
+ {
+ " " * bbl.etal *
+ }
+ { " " * t * }
+ if$
+ }
+ if$
+ }
+ 't
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+ } if$
+}
+FUNCTION {format.names.ed}
+{
+ format.names
+}
+FUNCTION {format.authors}
+{ author "author" format.names
+}
+FUNCTION {get.bbl.editor}
+{ editor num.names$ #1 > 'bbl.editors 'bbl.editor if$ }
+
+FUNCTION {format.editors}
+{ editor "editor" format.names duplicate$ empty$ 'skip$
+ {
+ "," *
+ " " *
+ get.bbl.editor
+ *
+ }
+ if$
+}
+FUNCTION {format.note}
+{
+ note empty$
+ { "" }
+ { note #1 #1 substring$
+ duplicate$ "{" =
+ 'skip$
+ { output.state mid.sentence =
+ { "l" }
+ { "u" }
+ if$
+ change.case$
+ }
+ if$
+ note #2 global.max$ substring$ * "note" bibinfo.check
+ }
+ if$
+}
+
+FUNCTION {format.title}
+{ title
+ "title" bibinfo.check
+}
+FUNCTION {output.bibitem}
+{ newline$
+ "\bibitem{" write$
+ cite$ write$
+ "}" write$
+ newline$
+ ""
+ before.all 'output.state :=
+}
+
+FUNCTION {n.dashify}
+{
+ 't :=
+ ""
+ { t empty$ not }
+ { t #1 #1 substring$ "-" =
+ { t #1 #2 substring$ "--" = not
+ { "--" *
+ t #2 global.max$ substring$ 't :=
+ }
+ { { t #1 #1 substring$ "-" = }
+ { "-" *
+ t #2 global.max$ substring$ 't :=
+ }
+ while$
+ }
+ if$
+ }
+ { t #1 #1 substring$ *
+ t #2 global.max$ substring$ 't :=
+ }
+ if$
+ }
+ while$
+}
+
+FUNCTION {word.in}
+{ bbl.in capitalize
+ ":" *
+ " " * }
+
+FUNCTION {format.date}
+{
+ ""
+ duplicate$ empty$
+ year "year" bibinfo.check duplicate$ empty$
+ { swap$ 'skip$
+ { "there's a month but no year in " cite$ * warning$ }
+ if$
+ *
+ }
+ { swap$ 'skip$
+ {
+ swap$
+ " " * swap$
+ }
+ if$
+ *
+ }
+ if$
+ duplicate$ empty$
+ 'skip$
+ {
+ before.all 'output.state :=
+ after.sentence 'output.state :=
+ }
+ if$
+}
+FUNCTION {format.btitle}
+{ title "title" bibinfo.check
+ duplicate$ empty$ 'skip$
+ {
+ emphasize
+ }
+ if$
+}
+FUNCTION {either.or.check}
+{ empty$
+ 'pop$
+ { "can't use both " swap$ * " fields in " * cite$ * warning$ }
+ if$
+}
+FUNCTION {format.bvolume}
+{ volume empty$
+ { "" }
+ { bbl.volume volume tie.or.space.prefix
+ "volume" bibinfo.check * *
+ series "series" bibinfo.check
+ duplicate$ empty$ 'pop$
+ { swap$ bbl.of space.word * swap$
+ emphasize * }
+ if$
+ "volume and number" number either.or.check
+ }
+ if$
+}
+FUNCTION {format.number.series}
+{ volume empty$
+ { number empty$
+ { series field.or.null }
+ { series empty$
+ { number "number" bibinfo.check }
+ { output.state mid.sentence =
+ { bbl.number }
+ { bbl.number capitalize }
+ if$
+ number tie.or.space.prefix "number" bibinfo.check * *
+ bbl.in space.word *
+ series "series" bibinfo.check *
+ }
+ if$
+ }
+ if$
+ }
+ { "" }
+ if$
+}
+FUNCTION {is.num}
+{ chr.to.int$
+ duplicate$ "0" chr.to.int$ < not
+ swap$ "9" chr.to.int$ > not and
+}
+
+FUNCTION {extract.num}
+{ duplicate$ 't :=
+ "" 's :=
+ { t empty$ not }
+ { t #1 #1 substring$
+ t #2 global.max$ substring$ 't :=
+ duplicate$ is.num
+ { s swap$ * 's := }
+ { pop$ "" 't := }
+ if$
+ }
+ while$
+ s empty$
+ 'skip$
+ { pop$ s }
+ if$
+}
+
+FUNCTION {convert.edition}
+{ extract.num "l" change.case$ 's :=
+ s "first" = s "1" = or
+ { bbl.first 't := }
+ { s "second" = s "2" = or
+ { bbl.second 't := }
+ { s "third" = s "3" = or
+ { bbl.third 't := }
+ { s "fourth" = s "4" = or
+ { bbl.fourth 't := }
+ { s "fifth" = s "5" = or
+ { bbl.fifth 't := }
+ { s #1 #1 substring$ is.num
+ { s eng.ord 't := }
+ { edition 't := }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+ t
+}
+
+FUNCTION {format.edition}
+{ edition duplicate$ empty$ 'skip$
+ {
+ convert.edition
+ output.state mid.sentence =
+ { "l" }
+ { "t" }
+ if$ change.case$
+ "edition" bibinfo.check
+ " " * bbl.edition *
+ }
+ if$
+}
+INTEGERS { multiresult }
+FUNCTION {multi.page.check}
+{ 't :=
+ #0 'multiresult :=
+ { multiresult not
+ t empty$ not
+ and
+ }
+ { t #1 #1 substring$
+ duplicate$ "-" =
+ swap$ duplicate$ "," =
+ swap$ "+" =
+ or or
+ { #1 'multiresult := }
+ { t #2 global.max$ substring$ 't := }
+ if$
+ }
+ while$
+ multiresult
+}
+FUNCTION {format.pages}
+{ pages duplicate$ empty$ 'skip$
+ { duplicate$ multi.page.check
+ {
+ bbl.pages swap$
+ n.dashify
+ }
+ {
+ bbl.page swap$
+ }
+ if$
+ tie.or.space.prefix
+ "pages" bibinfo.check
+ * *
+ }
+ if$
+}
+FUNCTION {format.journal.pages}
+{ pages duplicate$ empty$ 'pop$
+ { swap$ duplicate$ empty$
+ { pop$ pop$ format.pages }
+ {
+ ":" *
+ swap$
+ n.dashify
+ "pages" bibinfo.check
+ *
+ }
+ if$
+ }
+ if$
+}
+FUNCTION {format.journal.eid}
+{ eid "eid" bibinfo.check
+ duplicate$ empty$ 'pop$
+ { swap$ duplicate$ empty$ 'skip$
+ {
+ ":" *
+ }
+ if$
+ swap$ *
+ }
+ if$
+}
+FUNCTION {format.vol.num.pages}
+{ volume field.or.null
+ duplicate$ empty$ 'skip$
+ {
+ "volume" bibinfo.check
+ }
+ if$
+ number "number" bibinfo.check duplicate$ empty$ 'skip$
+ {
+ swap$ duplicate$ empty$
+ { "there's a number but no volume in " cite$ * warning$ }
+ 'skip$
+ if$
+ swap$
+ "(" swap$ * ")" *
+ }
+ if$ *
+ eid empty$
+ { format.journal.pages }
+ { format.journal.eid }
+ if$
+}
+
+FUNCTION {format.chapter.pages}
+{ chapter empty$
+ 'format.pages
+ { type empty$
+ { bbl.chapter }
+ { type "l" change.case$
+ "type" bibinfo.check
+ }
+ if$
+ chapter tie.or.space.prefix
+ "chapter" bibinfo.check
+ * *
+ pages empty$
+ 'skip$
+ { ", " * format.pages * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.booktitle}
+{
+ booktitle "booktitle" bibinfo.check
+ emphasize
+}
+FUNCTION {format.in.ed.booktitle}
+{ format.booktitle duplicate$ empty$ 'skip$
+ {
+ editor "editor" format.names.ed duplicate$ empty$ 'pop$
+ {
+ bbl.edby
+ " " * swap$ *
+ swap$
+ "," *
+ " " * swap$
+ * }
+ if$
+ word.in swap$ *
+ }
+ if$
+}
+FUNCTION {empty.misc.check}
+{ author empty$ title empty$ howpublished empty$
+ month empty$ year empty$ note empty$
+ and and and and and
+ { "all relevant fields are empty in " cite$ * warning$ }
+ 'skip$
+ if$
+}
+FUNCTION {format.thesis.type}
+{ type duplicate$ empty$
+ 'pop$
+ { swap$ pop$
+ "t" change.case$ "type" bibinfo.check
+ }
+ if$
+}
+FUNCTION {format.tr.number}
+{ number "number" bibinfo.check
+ type duplicate$ empty$
+ { pop$ bbl.techrep }
+ 'skip$
+ if$
+ "type" bibinfo.check
+ swap$ duplicate$ empty$
+ { pop$ "t" change.case$ }
+ { tie.or.space.prefix * * }
+ if$
+}
+FUNCTION {format.article.crossref}
+{
+ key duplicate$ empty$
+ { pop$
+ journal duplicate$ empty$
+ { "need key or journal for " cite$ * " to crossref " * crossref * warning$ }
+ { "journal" bibinfo.check emphasize word.in swap$ * }
+ if$
+ }
+ { word.in swap$ * " " *}
+ if$
+ " \cite{" * crossref * "}" *
+}
+FUNCTION {format.crossref.editor}
+{ editor #1 "{vv~}{ll}" format.name$
+ "editor" bibinfo.check
+ editor num.names$ duplicate$
+ #2 >
+ { pop$
+ "editor" bibinfo.check
+ " " * bbl.etal
+ *
+ }
+ { #2 <
+ 'skip$
+ { editor #2 "{ff }{vv }{ll}{ jj}" format.name$ "others" =
+ {
+ "editor" bibinfo.check
+ " " * bbl.etal
+ *
+ }
+ {
+ bbl.and space.word
+ * editor #2 "{vv~}{ll}" format.name$
+ "editor" bibinfo.check
+ *
+ }
+ if$
+ }
+ if$
+ }
+ if$
+}
+FUNCTION {format.book.crossref}
+{ volume duplicate$ empty$
+ { "empty volume in " cite$ * "'s crossref of " * crossref * warning$
+ pop$ word.in
+ }
+ { bbl.volume
+ capitalize
+ swap$ tie.or.space.prefix "volume" bibinfo.check * * bbl.of space.word *
+ }
+ if$
+ editor empty$
+ editor field.or.null author field.or.null =
+ or
+ { key empty$
+ { series empty$
+ { "need editor, key, or series for " cite$ * " to crossref " *
+ crossref * warning$
+ "" *
+ }
+ { series emphasize * }
+ if$
+ }
+ { key * }
+ if$
+ }
+ { format.crossref.editor * }
+ if$
+ " \cite{" * crossref * "}" *
+}
+FUNCTION {format.incoll.inproc.crossref}
+{
+ editor empty$
+ editor field.or.null author field.or.null =
+ or
+ { key empty$
+ { format.booktitle duplicate$ empty$
+ { "need editor, key, or booktitle for " cite$ * " to crossref " *
+ crossref * warning$
+ }
+ { word.in swap$ * }
+ if$
+ }
+ { word.in key * " " *}
+ if$
+ }
+ { word.in format.crossref.editor * " " *}
+ if$
+ " \cite{" * crossref * "}" *
+}
+FUNCTION {format.org.or.pub}
+{ 't :=
+ ""
+ address empty$ t empty$ and
+ 'skip$
+ {
+ address "address" bibinfo.check *
+ t empty$
+ 'skip$
+ { address empty$
+ 'skip$
+ { ": " * }
+ if$
+ t *
+ }
+ if$
+ }
+ if$
+}
+FUNCTION {format.publisher.address}
+{ publisher "publisher" bibinfo.warn format.org.or.pub
+}
+
+FUNCTION {format.organization.address}
+{ organization "organization" bibinfo.check format.org.or.pub
+}
+
+FUNCTION {article}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.title "title" output.check
+ new.block
+ crossref missing$
+ {
+ journal
+ remove.dots
+ "journal" bibinfo.check
+ emphasize
+ "journal" output.check
+ format.date "year" output.check
+ date.block
+ format.vol.num.pages output
+ }
+ { format.article.crossref output.nonnull
+ format.pages output
+ }
+ if$
+ new.block
+ format.note output
+ fin.entry
+ write.url
+}
+FUNCTION {book}
+{ output.bibitem
+ author empty$
+ { format.editors "author and editor" output.check
+ }
+ { format.authors output.nonnull
+ crossref missing$
+ { "author and editor" editor either.or.check }
+ 'skip$
+ if$
+ }
+ if$
+ new.block
+ format.btitle "title" output.check
+ crossref missing$
+ { format.bvolume output
+ new.block
+ format.number.series output
+ new.sentence
+ format.publisher.address output
+ }
+ {
+ new.block
+ format.book.crossref output.nonnull
+ }
+ if$
+ format.edition output
+ format.date "year" output.check
+ new.block
+ format.note output
+ fin.entry
+ write.url
+}
+FUNCTION {booklet}
+{ output.bibitem
+ format.authors output
+ new.block
+ format.title "title" output.check
+ new.block
+ howpublished "howpublished" bibinfo.check output
+ address "address" bibinfo.check output
+ format.date output
+ new.block
+ format.note output
+ fin.entry
+ write.url
+}
+
+FUNCTION {inbook}
+{ output.bibitem
+ author empty$
+ { format.editors "author and editor" output.check
+ }
+ { format.authors output.nonnull
+ crossref missing$
+ { "author and editor" editor either.or.check }
+ 'skip$
+ if$
+ }
+ if$
+ new.block
+ format.btitle "title" output.check
+ crossref missing$
+ {
+ format.bvolume output
+ format.chapter.pages "chapter and pages" output.check
+ new.block
+ format.number.series output
+ new.sentence
+ format.publisher.address output
+ }
+ {
+ format.chapter.pages "chapter and pages" output.check
+ new.block
+ format.book.crossref output.nonnull
+ }
+ if$
+ format.edition output
+ format.date "year" output.check
+ date.block
+ new.block
+ format.note output
+ fin.entry
+ write.url
+}
+
+FUNCTION {incollection}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.title "title" output.check
+ new.block
+ crossref missing$
+ { format.in.ed.booktitle "booktitle" output.check
+ format.bvolume output
+ format.number.series output
+ format.chapter.pages output
+ new.sentence
+ format.publisher.address output
+ format.edition output
+ }
+ { format.incoll.inproc.crossref output.nonnull
+ format.chapter.pages output
+ }
+ if$
+ format.date "year" output.check
+ date.block
+ new.block
+ format.note output
+ fin.entry
+ write.url
+}
+FUNCTION {inproceedings}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.title "title" output.check
+ new.block
+ crossref missing$
+ { format.in.ed.booktitle "booktitle" output.check
+ format.bvolume output
+ format.number.series output
+ new.sentence
+ publisher empty$
+ { format.organization.address output }
+ { organization "organization" bibinfo.check output
+ format.publisher.address output
+ }
+ if$
+ }
+ { format.incoll.inproc.crossref output.nonnull
+ }
+ if$
+ format.date "year" output.check
+ date.block
+ add.blank
+ format.pages "pages" output.check
+ new.block
+ format.note output
+ fin.entry
+ write.url
+}
+FUNCTION {conference} { inproceedings }
+FUNCTION {manual}
+{ output.bibitem
+ author empty$
+ { organization "organization" bibinfo.check
+ duplicate$ empty$ 'pop$
+ { output
+ address "address" bibinfo.check output
+ }
+ if$
+ }
+ { format.authors output.nonnull }
+ if$
+ new.block
+ format.btitle "title" output.check
+ author empty$
+ { organization empty$
+ {
+ address new.block.checka
+ address "address" bibinfo.check output
+ }
+ 'skip$
+ if$
+ }
+ {
+ organization address new.block.checkb
+ organization "organization" bibinfo.check output
+ address "address" bibinfo.check output
+ }
+ if$
+ format.edition output
+ format.date output
+ new.block
+ format.note output
+ fin.entry
+ write.url
+}
+
+FUNCTION {mastersthesis}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.title
+ "title" output.check
+ new.block
+ bbl.mthesis format.thesis.type output.nonnull
+ school "school" bibinfo.warn output
+ address "address" bibinfo.check output
+ format.date "year" output.check
+ new.block
+ format.note output
+ fin.entry
+ write.url
+}
+
+FUNCTION {misc}
+{ output.bibitem
+ format.authors output
+ title howpublished new.block.checkb
+ format.title output
+ howpublished new.block.checka
+ howpublished "howpublished" bibinfo.check output
+ format.date output
+ new.block
+ format.note output
+ fin.entry
+ write.url
+ empty.misc.check
+}
+FUNCTION {phdthesis}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.title
+ "title" output.check
+ new.block
+ bbl.phdthesis format.thesis.type output.nonnull
+ school "school" bibinfo.warn output
+ address "address" bibinfo.check output
+ format.date "year" output.check
+ new.block
+ format.note output
+ fin.entry
+ write.url
+}
+
+FUNCTION {presentation}
+{ output.bibitem
+ format.authors output
+ new.block
+ format.title output
+ new.block
+ format.organization.address "organization and address" output.check
+ month "month" output.check
+ year "year" output.check
+ new.block
+ format.note output
+ new.sentence
+ type missing$ 'skip$
+ {"(" type capitalize * ")" * output}
+ if$
+ fin.entry
+ write.url
+}
+
+FUNCTION {proceedings}
+{ output.bibitem
+ editor empty$
+ { organization "organization" bibinfo.check output
+ }
+ { format.editors output.nonnull }
+ if$
+ new.block
+ format.btitle "title" output.check
+ format.bvolume output
+ format.number.series output
+ editor empty$
+ { publisher empty$
+ {
+ new.sentence
+ format.publisher.address output
+ }
+ if$
+ }
+ { publisher empty$
+ {
+ new.sentence
+ format.organization.address output }
+ {
+ new.sentence
+ organization "organization" bibinfo.check output
+ format.publisher.address output
+ }
+ if$
+ }
+ if$
+ format.date "year" output.check
+ new.block
+ format.note output
+ fin.entry
+ write.url
+}
+
+FUNCTION {techreport}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.title
+ "title" output.check
+ new.block
+ format.tr.number emphasize output.nonnull
+ institution "institution" bibinfo.warn output
+ address "address" bibinfo.check output
+ format.date "year" output.check
+ new.block
+ format.note output
+ fin.entry
+ write.url
+}
+
+FUNCTION {unpublished}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.title "title" output.check
+ format.date output
+ new.block
+ format.note "note" output.check
+ fin.entry
+ write.url
+}
+
+FUNCTION {default.type} { misc }
+READ
+STRINGS { longest.label }
+INTEGERS { number.label longest.label.width }
+FUNCTION {initialize.longest.label}
+{ "" 'longest.label :=
+ #1 'number.label :=
+ #0 'longest.label.width :=
+}
+FUNCTION {longest.label.pass}
+{ number.label int.to.str$ 'label :=
+ number.label #1 + 'number.label :=
+ label width$ longest.label.width >
+ { label 'longest.label :=
+ label width$ 'longest.label.width :=
+ }
+ 'skip$
+ if$
+}
+EXECUTE {initialize.longest.label}
+ITERATE {longest.label.pass}
+FUNCTION {begin.bib}
+{ preamble$ empty$
+ 'skip$
+ { preamble$ write$ newline$ }
+ if$
+ "\begin{thebibliography}{" longest.label * "}" *
+ write$ newline$
+ "\providecommand{\url}[1]{\texttt{#1}}"
+ write$ newline$
+ "\providecommand{\urlprefix}{URL }"
+ write$ newline$
+}
+EXECUTE {begin.bib}
+EXECUTE {init.state.consts}
+ITERATE {call.type$}
+FUNCTION {end.bib}
+{ newline$
+ "\end{thebibliography}" write$ newline$
+}
+EXECUTE {end.bib}
+%% End of customized bst file
+%%
+%% End of file `aichej.bst'.
diff --git a/biblio/bibtex/contrib/misc/ajl.bst b/biblio/bibtex/contrib/misc/ajl.bst
new file mode 100644
index 0000000000..6d1866343e
--- /dev/null
+++ b/biblio/bibtex/contrib/misc/ajl.bst
@@ -0,0 +1,1557 @@
+%%
+%% This is file `ajl.bst',
+%% generated with the docstrip utility AND THEN manually by David Nash 2014-05-11
+%%
+%% The original source files were:
+%%
+%% merlin.mbs (with options: `ay,har,seq-lab,nm-rvx,nm-rvv,nm-rev1,jnrlst,keyxyr,blkyear,dt-beg,yr-blk,yrp-x,note-yr,tit-qq,qt-s,qx,jxper,pp-last,num-xser,jnm-x,add-pub,pre-pub,doi,edparxc,blk-com,com-blank,pp,ed,xedn,amper,url,url-blk,nfss,')
+%% ----------------------------------------
+%% *** AJL ***
+%%
+%% Copyright 1994-2011 Patrick W Daly
+ % ===============================================================
+ % IMPORTANT NOTICE:
+ % This bibliographic style (bst) file has been generated from one or
+ % more master bibliographic style (mbs) files, listed above.
+ %
+ % This generated file can be redistributed and/or modified under the terms
+ % of the LaTeX Project Public License Distributed from CTAN
+ % archives in directory macros/latex/base/lppl.txt; either
+ % version 1 of the License, or any later version.
+ % ===============================================================
+ % Name and version information of the main mbs file:
+ % \ProvidesFile{merlin.mbs}[2011/11/18 4.33 (PWD, AO, DPC)]
+ % For use with BibTeX version 0.99a or later
+ %-------------------------------------------------------------------
+ % This bibliography style file is intended for texts in ENGLISH
+ % This is an author-year citation style bibliography. As such, it is
+ % non-standard LaTeX, and requires a special package file to function properly.
+ % Such a package is natbib.sty by Patrick W. Daly
+ % or: harvard.sty by Peter Williams and Thorsten Schnier
+ % The form of the bibitem entries is
+ % \harvarditem[Jones et al.]{Jones, Baker, and Smith}{1990}{key}...
+ %---------------------------------------------------------------------
+
+ENTRY
+ { address
+ author
+ booktitle
+ chapter
+ doi
+ edition
+ editor
+ eid
+ howpublished
+ institution
+ journal
+ key
+ month
+ note
+ number
+ organization
+ pages
+ publisher
+ school
+ series
+ title
+ type
+ url
+ volume
+ year
+ }
+ {}
+ { label extra.label sort.label short.list }
+INTEGERS { output.state before.all mid.sentence after.sentence after.block }
+FUNCTION {init.state.consts}
+{ #0 'before.all :=
+ #1 'mid.sentence :=
+ #2 'after.sentence :=
+ #3 'after.block :=
+}
+STRINGS { s t}
+FUNCTION {output.nonnull}
+{ 's :=
+ output.state mid.sentence =
+ { " " * write$ }
+ { output.state after.block =
+ { add.period$ write$
+ newline$
+ "\newblock " write$
+ }
+ { output.state before.all =
+ 'write$
+ { add.period$ " " * write$ }
+ if$
+ }
+ if$
+ mid.sentence 'output.state :=
+ }
+ if$
+ s
+}
+FUNCTION {output}
+{ duplicate$ empty$
+ 'pop$
+ 'output.nonnull
+ if$
+}
+FUNCTION {output.check}
+{ 't :=
+ duplicate$ empty$
+ { pop$ "empty " t * " in " * cite$ * warning$ }
+ 'output.nonnull
+ if$
+}
+FUNCTION {fin.entry}
+{ add.period$
+ write$
+ newline$
+}
+
+FUNCTION {new.block}
+{ output.state before.all =
+ 'skip$
+ { after.block 'output.state := }
+ if$
+}
+FUNCTION {new.sentence}
+{ output.state after.block =
+ 'skip$
+ { output.state before.all =
+ 'skip$
+ { after.sentence 'output.state := }
+ if$
+ }
+ if$
+}
+FUNCTION {add.blank}
+{ " " * before.all 'output.state :=
+}
+
+FUNCTION {date.block}
+{
+ add.blank
+}
+
+FUNCTION {not}
+{ { #0 }
+ { #1 }
+ if$
+}
+FUNCTION {and}
+{ 'skip$
+ { pop$ #0 }
+ if$
+}
+FUNCTION {or}
+{ { pop$ #1 }
+ 'skip$
+ if$
+}
+FUNCTION {non.stop}
+{ duplicate$
+ "}" * add.period$
+ #-1 #1 substring$ "." =
+}
+
+STRINGS {z}
+
+FUNCTION {remove.dots}
+{ 'z :=
+ ""
+ { z empty$ not }
+ { z #1 #2 substring$
+ duplicate$ "\." =
+ { z #3 global.max$ substring$ 'z := * }
+ { pop$
+ z #1 #1 substring$
+ z #2 global.max$ substring$ 'z :=
+ duplicate$ "." = 'pop$
+ { * }
+ if$
+ }
+ if$
+ }
+ while$
+}
+FUNCTION {new.block.checkb}
+{ empty$
+ swap$ empty$
+ and
+ 'skip$
+ 'new.block
+ if$
+}
+FUNCTION {field.or.null}
+{ duplicate$ empty$
+ { pop$ "" }
+ 'skip$
+ if$
+}
+FUNCTION {emphasize}
+{ duplicate$ empty$
+ { pop$ "" }
+ { "\emph{" swap$ * "}" * }
+ if$
+}
+FUNCTION {tie.or.space.prefix}
+{ duplicate$ text.length$ #3 <
+ { "~" }
+ { " " }
+ if$
+ swap$
+}
+
+FUNCTION {capitalize}
+{ "u" change.case$ "t" change.case$ }
+
+FUNCTION {space.word}
+{ " " swap$ * " " * }
+ % Here are the language-specific definitions for explicit words.
+ % Each function has a name bbl.xxx where xxx is the English word.
+ % The language selected here is ENGLISH
+FUNCTION {bbl.and}
+{ "and"}
+
+FUNCTION {bbl.etal}
+{ "et~al." }
+
+FUNCTION {bbl.editors}
+{ "eds" }
+
+FUNCTION {bbl.editor}
+{ "ed." }
+
+FUNCTION {bbl.edby}
+{ "edited by" }
+
+FUNCTION {bbl.edition}
+{ "edition" }
+
+FUNCTION {bbl.volume}
+{ "volume" }
+
+FUNCTION {bbl.of}
+{ "of" }
+
+FUNCTION {bbl.number}
+{ "number" }
+
+FUNCTION {bbl.nr}
+{ "no." }
+
+FUNCTION {bbl.in}
+{ "in" }
+
+FUNCTION {bbl.pages}
+{ "pp." }
+
+FUNCTION {bbl.page}
+{ "p." }
+
+FUNCTION {bbl.chapter}
+{ "chapter" }
+
+FUNCTION {bbl.techrep}
+{ "Technical Report" }
+
+FUNCTION {bbl.mthesis}
+{ "Master's thesis" }
+
+FUNCTION {bbl.phdthesis}
+{ "Ph.D. thesis" }
+
+MACRO {jan} {"January"}
+
+MACRO {feb} {"February"}
+
+MACRO {mar} {"March"}
+
+MACRO {apr} {"April"}
+
+MACRO {may} {"May"}
+
+MACRO {jun} {"June"}
+
+MACRO {jul} {"July"}
+
+MACRO {aug} {"August"}
+
+MACRO {sep} {"September"}
+
+MACRO {oct} {"October"}
+
+MACRO {nov} {"November"}
+
+MACRO {dec} {"December"}
+
+MACRO {acmcs} {"ACM Computing Surveys"}
+
+MACRO {acta} {"Acta Informatica"}
+
+MACRO {cacm} {"Communications of the ACM"}
+
+MACRO {ibmjrd} {"IBM Journal of Research and Development"}
+
+MACRO {ibmsj} {"IBM Systems Journal"}
+
+MACRO {ieeese} {"IEEE Transactions on Software Engineering"}
+
+MACRO {ieeetc} {"IEEE Transactions on Computers"}
+
+MACRO {ieeetcad}
+ {"IEEE Transactions on Computer-Aided Design of Integrated Circuits"}
+
+MACRO {ipl} {"Information Processing Letters"}
+
+MACRO {jacm} {"Journal of the ACM"}
+
+MACRO {jcss} {"Journal of Computer and System Sciences"}
+
+MACRO {scp} {"Science of Computer Programming"}
+
+MACRO {sicomp} {"SIAM Journal on Computing"}
+
+MACRO {tocs} {"ACM Transactions on Computer Systems"}
+
+MACRO {tods} {"ACM Transactions on Database Systems"}
+
+MACRO {tog} {"ACM Transactions on Graphics"}
+
+MACRO {toms} {"ACM Transactions on Mathematical Software"}
+
+MACRO {toois} {"ACM Transactions on Office Information Systems"}
+
+MACRO {toplas} {"ACM Transactions on Programming Languages and Systems"}
+
+MACRO {tcs} {"Theoretical Computer Science"}
+FUNCTION {bibinfo.check}
+{ swap$
+ duplicate$ missing$
+ {
+ pop$ pop$
+ ""
+ }
+ { duplicate$ empty$
+ {
+ swap$ pop$
+ }
+ { swap$
+ pop$
+ }
+ if$
+ }
+ if$
+}
+FUNCTION {bibinfo.warn}
+{ swap$
+ duplicate$ missing$
+ {
+ swap$ "missing " swap$ * " in " * cite$ * warning$ pop$
+ ""
+ }
+ { duplicate$ empty$
+ {
+ swap$ "empty " swap$ * " in " * cite$ * warning$
+ }
+ { swap$
+ pop$
+ }
+ if$
+ }
+ if$
+}
+FUNCTION {format.url}
+{
+ url
+ duplicate$ empty$
+ { pop$ "" }
+ { "\urlprefix\url{" swap$ * "}" * }
+ if$
+}
+
+INTEGERS { nameptr namesleft numnames }
+
+
+STRINGS { bibinfo}
+
+FUNCTION {format.names}
+{ 'bibinfo :=
+ duplicate$ empty$ 'skip$ {
+ 's :=
+ "" 't :=
+ #1 'nameptr :=
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ { s nameptr
+ duplicate$ #1 >
+ { "{ f{}~}{vv~}{ll}{ jj}" }
+ { "{vv~}{ll}{ f{}}{ jj}" }
+ if$
+ format.name$
+ remove.dots
+ bibinfo bibinfo.check
+ 't :=
+ nameptr #1 >
+ {
+ namesleft #1 >
+ { ", " * t * }
+ {
+ s nameptr "{ll}" format.name$ duplicate$ "others" =
+ { 't := }
+ { pop$ }
+ if$
+ numnames #2 >
+ { "," * }
+ 'skip$
+ if$
+ t "others" =
+ {
+ " " * bbl.etal *
+ }
+ {
+ "\&"
+ space.word * t *
+ }
+ if$
+ }
+ if$
+ }
+ 't
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+ } if$
+}
+FUNCTION {format.names.ed}
+{
+ 'bibinfo :=
+ duplicate$ empty$ 'skip$ {
+ 's :=
+ "" 't :=
+ #1 'nameptr :=
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ { s nameptr
+ "{f{}~}{vv~}{ll}{, jj}"
+ format.name$
+ remove.dots
+ bibinfo bibinfo.check
+ 't :=
+ nameptr #1 >
+ {
+ namesleft #1 >
+ { ", " * t * }
+ {
+ s nameptr "{ll}" format.name$ duplicate$ "others" =
+ { 't := }
+ { pop$ }
+ if$
+ numnames #2 >
+ { "," * }
+ 'skip$
+ if$
+ t "others" =
+ {
+
+ " " * bbl.etal *
+ }
+ {
+ "\&"
+ space.word * t *
+ }
+ if$
+ }
+ if$
+ }
+ 't
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+ } if$
+}
+FUNCTION {format.key}
+{ empty$
+ { key field.or.null }
+ { "" }
+ if$
+}
+
+FUNCTION {format.authors}
+{ author "author" format.names
+}
+FUNCTION {get.bbl.editor}
+{ editor num.names$ #1 > 'bbl.editors 'bbl.editor if$ }
+
+FUNCTION {format.editors}
+{ editor "editor" format.names duplicate$ empty$ 'skip$
+ {
+ " " *
+ get.bbl.editor
+ "(" swap$ * ")" *
+ *
+ }
+ if$
+}
+FUNCTION {format.doi}
+{ doi empty$
+ { "" }
+ {
+ "\doi{" doi * "}" *
+ }
+ if$
+}
+FUNCTION {format.note}
+{
+ note empty$
+ { "" }
+ { note #1 #1 substring$
+ duplicate$ "{" =
+ 'skip$
+ { output.state mid.sentence =
+ { "l" }
+ { "u" }
+ if$
+ change.case$
+ }
+ if$
+ note #2 global.max$ substring$ * "note" bibinfo.check
+ }
+ if$
+}
+
+FUNCTION {format.title}
+{ title
+ duplicate$ empty$ 'skip$
+ { "t" change.case$ }
+ if$
+ "title" bibinfo.check
+ duplicate$ empty$ 'skip$
+ {
+ "\enquote{" swap$ *
+ "} " *
+ }
+ if$
+}
+FUNCTION {end.quote.title}
+{ title empty$
+ 'skip$
+ { before.all 'output.state := }
+ if$
+}
+FUNCTION {format.full.names}
+{'s :=
+ "" 't :=
+ #1 'nameptr :=
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ { s nameptr
+ "{vv~}{ll}" format.name$
+ 't :=
+ nameptr #1 >
+ {
+ namesleft #1 >
+ { ", " * t * }
+ {
+ s nameptr "{ll}" format.name$ duplicate$ "others" =
+ { 't := }
+ { pop$ }
+ if$
+ t "others" =
+ {
+ " " * bbl.etal *
+ }
+ {
+ numnames #2 >
+ { "," * }
+ 'skip$
+ if$
+ "\&"
+ space.word * t *
+ }
+ if$
+ }
+ if$
+ }
+ 't
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+}
+
+FUNCTION {author.editor.key.full}
+{ author empty$
+ { editor empty$
+ { key empty$
+ { cite$ #1 #3 substring$ }
+ 'key
+ if$
+ }
+ { editor format.full.names }
+ if$
+ }
+ { author format.full.names }
+ if$
+}
+
+FUNCTION {author.key.full}
+{ author empty$
+ { key empty$
+ { cite$ #1 #3 substring$ }
+ 'key
+ if$
+ }
+ { author format.full.names }
+ if$
+}
+
+FUNCTION {editor.key.full}
+{ editor empty$
+ { key empty$
+ { cite$ #1 #3 substring$ }
+ 'key
+ if$
+ }
+ { editor format.full.names }
+ if$
+}
+
+FUNCTION {make.full.names}
+{ type$ "book" =
+ type$ "inbook" =
+ or
+ 'author.editor.key.full
+ { type$ "proceedings" =
+ 'editor.key.full
+ 'author.key.full
+ if$
+ }
+ if$
+}
+
+FUNCTION {output.bibitem}
+{ newline$
+ "\harvarditem" write$
+ make.full.names duplicate$ label =
+ 'skip$
+ { "[" label * "]" * write$ }
+ if$
+ "{" swap$ * "}{" * write$
+ year duplicate$ empty$
+ { pop$ "" }
+ 'skip$
+ if$
+ extra.label * "}{" * write$
+ cite$ write$
+ "}" write$
+ newline$
+ ""
+ before.all 'output.state :=
+}
+
+FUNCTION {n.dashify}
+{
+ 't :=
+ ""
+ { t empty$ not }
+ { t #1 #1 substring$ "-" =
+ { t #1 #2 substring$ "--" = not
+ { "--" *
+ t #2 global.max$ substring$ 't :=
+ }
+ { { t #1 #1 substring$ "-" = }
+ { "-" *
+ t #2 global.max$ substring$ 't :=
+ }
+ while$
+ }
+ if$
+ }
+ { t #1 #1 substring$ *
+ t #2 global.max$ substring$ 't :=
+ }
+ if$
+ }
+ while$
+}
+
+FUNCTION {word.in}
+{ bbl.in
+ " " * }
+
+FUNCTION {format.date}
+{ year "year" bibinfo.check duplicate$ empty$
+ {
+ }
+ 'skip$
+ if$
+ extra.label *
+ before.all 'output.state :=
+ " " swap$ *
+}
+FUNCTION {format.btitle}
+{ title "title" bibinfo.check
+ duplicate$ empty$ 'skip$
+ {
+ emphasize
+ }
+ if$
+}
+FUNCTION {either.or.check}
+{ empty$
+ 'pop$
+ { "can't use both " swap$ * " fields in " * cite$ * warning$ }
+ if$
+}
+FUNCTION {format.bvolume}
+{ volume empty$
+ { "" }
+ { bbl.volume volume tie.or.space.prefix
+ "volume" bibinfo.check * *
+ series "series" bibinfo.check
+ duplicate$ empty$ 'pop$
+ { swap$ bbl.of space.word * swap$
+ emphasize * }
+ if$
+ "volume and number" number either.or.check
+ }
+ if$
+}
+FUNCTION {format.number.series}
+{ volume empty$
+ { number empty$
+ { series field.or.null }
+ { series empty$
+ { number "number" bibinfo.check }
+ { output.state mid.sentence =
+ { bbl.number }
+ { bbl.number capitalize }
+ if$
+ number tie.or.space.prefix "number" bibinfo.check * *
+ bbl.in space.word *
+ series "series" bibinfo.check *
+ }
+ if$
+ }
+ if$
+ }
+ { "" }
+ if$
+}
+
+FUNCTION {format.edition}
+{ edition duplicate$ empty$ 'skip$
+ {
+ output.state mid.sentence =
+ { "l" }
+ { "t" }
+ if$ change.case$
+ "edition" bibinfo.check
+ " " * bbl.edition *
+ }
+ if$
+}
+INTEGERS { multiresult }
+FUNCTION {multi.page.check}
+{ 't :=
+ #0 'multiresult :=
+ { multiresult not
+ t empty$ not
+ and
+ }
+ { t #1 #1 substring$
+ duplicate$ "-" =
+ swap$ duplicate$ "," =
+ swap$ "+" =
+ or or
+ { #1 'multiresult := }
+ { t #2 global.max$ substring$ 't := }
+ if$
+ }
+ while$
+ multiresult
+}
+FUNCTION {format.pages}
+{ pages duplicate$ empty$ 'skip$
+ { duplicate$ multi.page.check
+ {
+ bbl.pages swap$
+ n.dashify
+ }
+ {
+ bbl.page swap$
+ }
+ if$
+ tie.or.space.prefix
+ "pages" bibinfo.check
+ * *
+ }
+ if$
+}
+FUNCTION {format.journal.pages}
+{ pages duplicate$ empty$ 'pop$
+ { swap$ duplicate$ empty$
+ { pop$ pop$ format.pages }
+ {
+ ":" *
+ swap$
+ n.dashify
+ "pages" bibinfo.check
+ *
+ }
+ if$
+ }
+ if$
+}
+FUNCTION {format.journal.eid}
+{ eid "eid" bibinfo.check
+ duplicate$ empty$ 'pop$
+ { swap$ duplicate$ empty$ 'skip$
+ {
+ ":" *
+ }
+ if$
+ swap$ *
+ }
+ if$
+}
+FUNCTION {format.vol.num.pages}
+{ volume field.or.null
+ duplicate$ empty$ 'skip$
+ {
+ "volume" bibinfo.check
+ }
+ if$
+ number "number" bibinfo.check duplicate$ empty$ 'skip$
+ {
+ swap$ duplicate$ empty$
+ { "there's a number but no volume in " cite$ * warning$ }
+ 'skip$
+ if$
+ swap$
+ "(" swap$ * ")" *
+ }
+ if$ *
+}
+
+FUNCTION {format.chapter.pages}
+{ chapter empty$
+ { "" }
+ { type empty$
+ { bbl.chapter }
+ { type "l" change.case$
+ "type" bibinfo.check
+ }
+ if$
+ chapter tie.or.space.prefix
+ "chapter" bibinfo.check
+ * *
+ }
+ if$
+}
+
+FUNCTION {format.booktitle}
+{
+ booktitle "booktitle" bibinfo.check
+ emphasize
+}
+FUNCTION {format.in.ed.booktitle}
+{ format.booktitle duplicate$ empty$ 'skip$
+ {
+ editor "editor" format.names.ed duplicate$ empty$ 'pop$
+ {
+ " " *
+ get.bbl.editor
+ "(" swap$ * ") " *
+ * swap$
+ * }
+ if$
+ word.in swap$ *
+ }
+ if$
+}
+FUNCTION {format.thesis.type}
+{ type duplicate$ empty$
+ 'pop$
+ { swap$ pop$
+ "t" change.case$ "type" bibinfo.check
+ }
+ if$
+}
+FUNCTION {format.tr.number}
+{ number "number" bibinfo.check
+ type duplicate$ empty$
+ { pop$ bbl.techrep }
+ 'skip$
+ if$
+ "type" bibinfo.check
+ swap$ duplicate$ empty$
+ { pop$ "t" change.case$ }
+ { tie.or.space.prefix * * }
+ if$
+}
+FUNCTION {format.article.crossref}
+{
+ word.in
+ " \cite{" * crossref * "}" *
+}
+FUNCTION {format.book.crossref}
+{ volume duplicate$ empty$
+ { "empty volume in " cite$ * "'s crossref of " * crossref * warning$
+ pop$ word.in
+ }
+ { bbl.volume
+ swap$ tie.or.space.prefix "volume" bibinfo.check * * bbl.of space.word *
+ }
+ if$
+ " \cite{" * crossref * "}" *
+}
+FUNCTION {format.incoll.inproc.crossref}
+{
+ word.in
+ " \cite{" * crossref * "}" *
+}
+FUNCTION {format.org.or.pub}
+{ 't :=
+ ""
+ address empty$ t empty$ and
+ 'skip$
+ {
+ address "address" bibinfo.check *
+ t empty$
+ 'skip$
+ { address empty$
+ 'skip$
+ { ": " * }
+ if$
+ t *
+ }
+ if$
+ }
+ if$
+}
+FUNCTION {format.publisher.address}
+{ publisher "publisher" bibinfo.warn format.org.or.pub
+}
+
+FUNCTION {format.organization.address}
+{ organization "organization" bibinfo.check format.org.or.pub
+}
+
+FUNCTION {article}
+{ output.bibitem
+ format.authors "author" output.check
+ author format.key output
+ format.date "year" output.check
+ date.block
+ format.title "title" output.check
+ end.quote.title
+ crossref missing$
+ {
+ journal
+ remove.dots
+ "journal" bibinfo.check
+ emphasize
+ "journal" output.check
+ add.blank
+ format.vol.num.pages output
+ }
+ { format.article.crossref output.nonnull
+ }
+ if$
+ eid empty$
+ { format.journal.pages }
+ { format.journal.eid }
+ if$
+ format.doi output
+ format.url output
+ format.note output
+ fin.entry
+}
+FUNCTION {book}
+{ output.bibitem
+ author empty$
+ { format.editors "author and editor" output.check
+ editor format.key output
+ add.blank
+ }
+ { format.authors output.nonnull
+ crossref missing$
+ { "author and editor" editor either.or.check }
+ 'skip$
+ if$
+ }
+ if$
+ format.date "year" output.check
+ date.block
+ format.btitle "title" output.check
+ crossref missing$
+ { format.bvolume output
+ format.number.series output
+ format.publisher.address output
+ }
+ {
+ format.book.crossref output.nonnull
+ }
+ if$
+ format.edition output
+ format.doi output
+ format.url output
+ format.note output
+ fin.entry
+}
+FUNCTION {booklet}
+{ output.bibitem
+ format.authors output
+ author format.key output
+ format.date "year" output.check
+ date.block
+ format.title "title" output.check
+ end.quote.title
+ howpublished "howpublished" bibinfo.check output
+ address "address" bibinfo.check output
+ format.doi output
+ format.url output
+ format.note output
+ fin.entry
+}
+
+FUNCTION {inbook}
+{ output.bibitem
+ author empty$
+ { format.editors "author and editor" output.check
+ editor format.key output
+ }
+ { format.authors output.nonnull
+ crossref missing$
+ { "author and editor" editor either.or.check }
+ 'skip$
+ if$
+ }
+ if$
+ format.date "year" output.check
+ date.block
+ format.btitle "title" output.check
+ crossref missing$
+ {
+ format.publisher.address output
+ format.bvolume output
+ format.chapter.pages "chapter and pages" output.check
+ format.number.series output
+ }
+ {
+ format.chapter.pages "chapter and pages" output.check
+ format.book.crossref output.nonnull
+ }
+ if$
+ format.edition output
+ format.pages "pages" output.check
+ format.doi output
+ format.url output
+ format.note output
+ fin.entry
+}
+
+FUNCTION {incollection}
+{ output.bibitem
+ format.authors "author" output.check
+ author format.key output
+ format.date "year" output.check
+ date.block
+ format.title "title" output.check
+ end.quote.title
+ crossref missing$
+ { format.in.ed.booktitle "booktitle" output.check
+ format.publisher.address output
+ format.bvolume output
+ format.number.series output
+ format.chapter.pages output
+ format.edition output
+ }
+ { format.incoll.inproc.crossref output.nonnull
+ format.chapter.pages output
+ }
+ if$
+ format.pages "pages" output.check
+ format.doi output
+ format.url output
+ format.note output
+ fin.entry
+}
+FUNCTION {inproceedings}
+{ output.bibitem
+ format.authors "author" output.check
+ author format.key output
+ format.date "year" output.check
+ date.block
+ format.title "title" output.check
+ end.quote.title
+ crossref missing$
+ { format.in.ed.booktitle "booktitle" output.check
+ publisher empty$
+ { format.organization.address output }
+ { organization "organization" bibinfo.check output
+ format.publisher.address output
+ }
+ if$
+ format.bvolume output
+ format.number.series output
+ }
+ { format.incoll.inproc.crossref output.nonnull
+ }
+ if$
+ format.pages "pages" output.check
+ format.doi output
+ format.url output
+ format.note output
+ fin.entry
+}
+FUNCTION {conference} { inproceedings }
+FUNCTION {manual}
+{ output.bibitem
+ format.authors output
+ author format.key output
+ format.date "year" output.check
+ date.block
+ format.btitle "title" output.check
+ organization "organization" bibinfo.check output
+ address "address" bibinfo.check output
+ format.edition output
+ format.doi output
+ format.url output
+ format.note output
+ fin.entry
+}
+
+FUNCTION {mastersthesis}
+{ output.bibitem
+ format.authors "author" output.check
+ author format.key output
+ format.date "year" output.check
+ date.block
+ format.btitle
+ "title" output.check
+ bbl.mthesis format.thesis.type output.nonnull
+ school "school" bibinfo.warn output
+ address "address" bibinfo.check output
+ format.doi output
+ format.url output
+ format.note output
+ fin.entry
+}
+
+FUNCTION {misc}
+{ output.bibitem
+ format.authors output
+ author format.key output
+ format.date "year" output.check
+ date.block
+ format.title output
+ end.quote.title
+ howpublished "howpublished" bibinfo.check output
+ format.doi output
+ format.url output
+ format.note output
+ fin.entry
+}
+FUNCTION {phdthesis}
+{ output.bibitem
+ format.authors "author" output.check
+ author format.key output
+ format.date "year" output.check
+ date.block
+ format.btitle
+ "title" output.check
+ bbl.phdthesis format.thesis.type output.nonnull
+ school "school" bibinfo.warn output
+ address "address" bibinfo.check output
+ format.doi output
+ format.url output
+ format.note output
+ fin.entry
+}
+
+FUNCTION {proceedings}
+{ output.bibitem
+ format.editors output
+ editor format.key output
+ format.date "year" output.check
+ date.block
+ format.btitle "title" output.check
+ format.bvolume output
+ format.number.series output
+ publisher empty$
+ { format.organization.address output }
+ { organization "organization" bibinfo.check output
+ format.publisher.address output
+ }
+ if$
+ format.doi output
+ format.url output
+ format.note output
+ fin.entry
+}
+
+FUNCTION {techreport}
+{ output.bibitem
+ format.authors "author" output.check
+ author format.key output
+ format.date "year" output.check
+ date.block
+ format.title
+ "title" output.check
+ end.quote.title
+ format.tr.number output.nonnull
+ institution "institution" bibinfo.warn output
+ address "address" bibinfo.check output
+ format.doi output
+ format.url output
+ format.note output
+ fin.entry
+}
+
+FUNCTION {unpublished}
+{ output.bibitem
+ format.authors "author" output.check
+ author format.key output
+ format.date "year" output.check
+ date.block
+ format.title "title" output.check
+ end.quote.title
+ format.doi output
+ format.url output
+ format.note "note" output.check
+ fin.entry
+}
+
+FUNCTION {default.type} { misc }
+READ
+FUNCTION {sortify}
+{ purify$
+ "l" change.case$
+}
+INTEGERS { len }
+FUNCTION {chop.word}
+{ 's :=
+ 'len :=
+ s #1 len substring$ =
+ { s len #1 + global.max$ substring$ }
+ 's
+ if$
+}
+FUNCTION {format.lab.names}
+{ 's :=
+ "" 't :=
+ s #1 "{vv~}{ll}" format.name$
+ s num.names$ duplicate$
+ #2 >
+ { pop$
+ " " * bbl.etal *
+ }
+ { #2 <
+ 'skip$
+ { s #2 "{ff }{vv }{ll}{ jj}" format.name$ "others" =
+ {
+ " " * bbl.etal *
+ }
+ { " \& " * s #2 "{vv~}{ll}" format.name$
+ * }
+ if$
+ }
+ if$
+ }
+ if$
+}
+
+FUNCTION {author.key.label}
+{ author empty$
+ { key empty$
+ { cite$ #1 #3 substring$ }
+ 'key
+ if$
+ }
+ { author format.lab.names }
+ if$
+}
+
+FUNCTION {author.editor.key.label}
+{ author empty$
+ { editor empty$
+ { key empty$
+ { cite$ #1 #3 substring$ }
+ 'key
+ if$
+ }
+ { editor format.lab.names }
+ if$
+ }
+ { author format.lab.names }
+ if$
+}
+
+FUNCTION {editor.key.label}
+{ editor empty$
+ { key empty$
+ { cite$ #1 #3 substring$ }
+ 'key
+ if$
+ }
+ { editor format.lab.names }
+ if$
+}
+
+FUNCTION {calc.short.authors}
+{ type$ "book" =
+ type$ "inbook" =
+ or
+ 'author.editor.key.label
+ { type$ "proceedings" =
+ 'editor.key.label
+ 'author.key.label
+ if$
+ }
+ if$
+ 'short.list :=
+}
+
+FUNCTION {calc.label}
+{ calc.short.authors
+ short.list
+ ", "
+ *
+ year duplicate$ empty$
+ short.list key field.or.null = or
+ { pop$ "" }
+ 'skip$
+ if$
+ *
+ 'label :=
+}
+
+FUNCTION {calc.short.label}
+{ calc.short.authors short.list
+ 'label :=
+}
+FUNCTION {sort.format.names}
+{ 's :=
+ #1 'nameptr :=
+ ""
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ { s nameptr
+ "{vv{ } }{ll{ }}{ f{ }}{ jj{ }}"
+ format.name$ 't :=
+ nameptr #1 >
+ {
+ " " *
+ namesleft #1 = t "others" = and
+ { "zzzzz" 't := }
+ 'skip$
+ if$
+ numnames #2 > nameptr #2 = and
+ { "zz" * year field.or.null * " " *
+ }
+ 'skip$
+ if$
+ t sortify *
+ }
+ { t sortify * }
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+}
+
+FUNCTION {sort.format.title}
+{ 't :=
+ "A " #2
+ "An " #3
+ "The " #4 t chop.word
+ chop.word
+ chop.word
+ sortify
+ #1 global.max$ substring$
+}
+FUNCTION {author.sort}
+{ author empty$
+ { key empty$
+ { "to sort, need author or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { author sort.format.names }
+ if$
+}
+FUNCTION {author.editor.sort}
+{ author empty$
+ { editor empty$
+ { key empty$
+ { "to sort, need author, editor, or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { editor sort.format.names }
+ if$
+ }
+ { author sort.format.names }
+ if$
+}
+FUNCTION {editor.sort}
+{ editor empty$
+ { key empty$
+ { "to sort, need editor or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { editor sort.format.names }
+ if$
+}
+FUNCTION {presort}
+{ calc.label
+ label sortify
+ " "
+ *
+ type$ "book" =
+ type$ "inbook" =
+ or
+ 'author.editor.sort
+ { type$ "proceedings" =
+ 'editor.sort
+ 'author.sort
+ if$
+ }
+ if$
+ #1 entry.max$ substring$
+ 'sort.label :=
+ sort.label
+ *
+ " "
+ *
+ title field.or.null
+ sort.format.title
+ *
+ #1 entry.max$ substring$
+ 'sort.key$ :=
+}
+
+ITERATE {presort}
+SORT
+STRINGS { last.label next.extra }
+INTEGERS { last.extra.num last.extra.num.extended last.extra.num.blank number.label }
+FUNCTION {initialize.extra.label.stuff}
+{ #0 int.to.chr$ 'last.label :=
+ "" 'next.extra :=
+ #0 'last.extra.num :=
+ "a" chr.to.int$ #1 - 'last.extra.num.blank :=
+ last.extra.num.blank 'last.extra.num.extended :=
+ #0 'number.label :=
+}
+FUNCTION {forward.pass}
+{ last.label label =
+ { last.extra.num #1 + 'last.extra.num :=
+ last.extra.num "z" chr.to.int$ >
+ { "a" chr.to.int$ 'last.extra.num :=
+ last.extra.num.extended #1 + 'last.extra.num.extended :=
+ }
+ 'skip$
+ if$
+ last.extra.num.extended last.extra.num.blank >
+ { last.extra.num.extended int.to.chr$
+ last.extra.num int.to.chr$
+ * 'extra.label := }
+ { last.extra.num int.to.chr$ 'extra.label := }
+ if$
+ }
+ { "a" chr.to.int$ 'last.extra.num :=
+ "" 'extra.label :=
+ label 'last.label :=
+ }
+ if$
+ number.label #1 + 'number.label :=
+}
+FUNCTION {reverse.pass}
+{ next.extra "b" =
+ { "a" 'extra.label := }
+ 'skip$
+ if$
+ extra.label 'next.extra :=
+ extra.label
+ duplicate$ empty$
+ 'skip$
+ { "{\natexlab{" swap$ * "}}" * }
+ if$
+ 'extra.label :=
+}
+EXECUTE {initialize.extra.label.stuff}
+ITERATE {forward.pass}
+REVERSE {reverse.pass}
+FUNCTION {bib.sort.order}
+{ sort.label
+ " "
+ *
+ year field.or.null sortify
+ *
+ " "
+ *
+ title field.or.null
+ sort.format.title
+ *
+ #1 entry.max$ substring$
+ 'sort.key$ :=
+ calc.short.label
+}
+ITERATE {bib.sort.order}
+SORT
+FUNCTION {begin.bib}
+{ preamble$ empty$
+ 'skip$
+ { preamble$ write$ newline$ }
+ if$
+ "\begin{thebibliography}{" number.label int.to.str$ * "}" *
+ write$ newline$
+ "\newcommand{\enquote}[1]{`#1'}"
+ write$ newline$
+ "\providecommand{\natexlab}[1]{#1}"
+ write$ newline$
+ "{\catcode`\|=0\catcode`\#=12\catcode`\@=11\catcode`\\=12" write$ newline$
+ "|immediate|write|@auxout{\expandafter\ifx\csname natexlab\endcsname\relax\gdef\natexlab#1{#1}\fi}}"
+ write$ newline$
+ "\providecommand{\url}[1]{\texttt{#1}}"
+ write$ newline$
+ "\providecommand{\urlprefix}{URL }"
+ write$ newline$
+ "\expandafter\ifx\csname urlstyle\endcsname\relax"
+ write$ newline$
+ " \providecommand{\doi}[1]{doi:\discretionary{}{}{}#1}\else"
+ write$ newline$
+ " \providecommand{\doi}{doi:\discretionary{}{}{}\begingroup \urlstyle{rm}\Url}\fi"
+ write$ newline$
+}
+EXECUTE {begin.bib}
+EXECUTE {init.state.consts}
+ITERATE {call.type$}
+FUNCTION {end.bib}
+{ newline$
+ "\end{thebibliography}" write$ newline$
+}
+EXECUTE {end.bib}
+%% End of customized bst file
+%%
+%% End of file `ajl.bst'.
diff --git a/biblio/bibtex/contrib/misc/alphanum.bst b/biblio/bibtex/contrib/misc/alphanum.bst
new file mode 100644
index 0000000000..6ed136bd8d
--- /dev/null
+++ b/biblio/bibtex/contrib/misc/alphanum.bst
@@ -0,0 +1,1265 @@
+% BibTeX bibliography style `alphanum'
+ % Modified from `alpha' by Reuben Thomas (rrt@sc3d.org)
+ % Changes are:
+ % 1. Labels do not contain the year.
+ % 2. Labels which would otherwise be identical have a number
+ % appended, not a letter.
+ % 3. Entries are sorted by month as well as year.
+ % version 0.99a for BibTeX versions 0.99a or later, LaTeX
+ % version 2.09 or 2e.
+ % Copyright (C) 1985, 2001, all rights reserved.
+ % Copying of this file is authorized only if either
+ % (1) you make absolutely no changes to your copy, including
+ % name, or
+ % (2) if you do make changes, you name it something other than
+ % btxbst.doc, plain.bst, unsrt.bst, alpha.bst, and
+ % abbrv.bst. This restriction helps ensure that all
+ % standard styles are identical.
+
+ENTRY
+ { address
+ author
+ booktitle
+ chapter
+ edition
+ editor
+ howpublished
+ institution
+ journal
+ key
+ month
+ note
+ number
+ organization
+ pages
+ publisher
+ school
+ series
+ title
+ type
+ volume
+ year
+ }
+ {}
+ { label extra.label sort.label }
+
+INTEGERS { output.state before.all mid.sentence after.sentence after.block }
+
+FUNCTION {init.state.consts}
+{ #0 'before.all :=
+ #1 'mid.sentence :=
+ #2 'after.sentence :=
+ #3 'after.block :=
+}
+
+STRINGS { s t }
+
+FUNCTION {output.nonnull}
+{ 's :=
+ output.state mid.sentence =
+ { ", " * write$ }
+ { output.state after.block =
+ { add.period$ write$
+ newline$
+ "\newblock " write$
+ }
+ { output.state before.all =
+ 'write$
+ { add.period$ " " * write$ }
+ if$
+ }
+ if$
+ mid.sentence 'output.state :=
+ }
+ if$
+ s
+}
+
+FUNCTION {output}
+{ duplicate$ empty$
+ 'pop$
+ 'output.nonnull
+ if$
+}
+
+FUNCTION {output.check}
+{ 't :=
+ duplicate$ empty$
+ { pop$ "empty " t * " in " * cite$ * warning$ }
+ 'output.nonnull
+ if$
+}
+
+FUNCTION {output.bibitem}
+{ newline$
+ "\bibitem[" write$
+ label write$
+ "]{" write$
+ cite$ write$
+ "}" write$
+ newline$
+ ""
+ before.all 'output.state :=
+}
+
+FUNCTION {fin.entry}
+{ add.period$
+ write$
+ newline$
+}
+
+FUNCTION {new.block}
+{ output.state before.all =
+ 'skip$
+ { after.block 'output.state := }
+ if$
+}
+
+FUNCTION {new.sentence}
+{ output.state after.block =
+ 'skip$
+ { output.state before.all =
+ 'skip$
+ { after.sentence 'output.state := }
+ if$
+ }
+ if$
+}
+
+FUNCTION {not}
+{ { #0 }
+ { #1 }
+ if$
+}
+
+FUNCTION {and}
+{ 'skip$
+ { pop$ #0 }
+ if$
+}
+
+FUNCTION {or}
+{ { pop$ #1 }
+ 'skip$
+ if$
+}
+
+FUNCTION {new.block.checka}
+{ empty$
+ 'skip$
+ 'new.block
+ if$
+}
+
+FUNCTION {new.block.checkb}
+{ empty$
+ swap$ empty$
+ and
+ 'skip$
+ 'new.block
+ if$
+}
+
+FUNCTION {new.sentence.checka}
+{ empty$
+ 'skip$
+ 'new.sentence
+ if$
+}
+
+FUNCTION {new.sentence.checkb}
+{ empty$
+ swap$ empty$
+ and
+ 'skip$
+ 'new.sentence
+ if$
+}
+
+FUNCTION {field.or.null}
+{ duplicate$ empty$
+ { pop$ "" }
+ 'skip$
+ if$
+}
+
+FUNCTION {emphasize}
+{ duplicate$ empty$
+ { pop$ "" }
+ { "{\em " swap$ * "}" * }
+ if$
+}
+
+INTEGERS { nameptr namesleft numnames }
+
+FUNCTION {format.names}
+{ 's :=
+ #1 'nameptr :=
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ { s nameptr "{ff~}{vv~}{ll}{, jj}" format.name$ 't :=
+ nameptr #1 >
+ { namesleft #1 >
+ { ", " * t * }
+ { numnames #2 >
+ { "," * }
+ 'skip$
+ if$
+ t "others" =
+ { " et~al." * }
+ { " and " * t * }
+ if$
+ }
+ if$
+ }
+ 't
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+}
+
+FUNCTION {format.authors}
+{ author empty$
+ { "" }
+ { author format.names }
+ if$
+}
+
+FUNCTION {format.editors}
+{ editor empty$
+ { "" }
+ { editor format.names
+ editor num.names$ #1 >
+ { ", editors" * }
+ { ", editor" * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.title}
+{ title empty$
+ { "" }
+ { title "t" change.case$ }
+ if$
+}
+
+FUNCTION {n.dashify}
+{ 't :=
+ ""
+ { t empty$ not }
+ { t #1 #1 substring$ "-" =
+ { t #1 #2 substring$ "--" = not
+ { "--" *
+ t #2 global.max$ substring$ 't :=
+ }
+ { { t #1 #1 substring$ "-" = }
+ { "-" *
+ t #2 global.max$ substring$ 't :=
+ }
+ while$
+ }
+ if$
+ }
+ { t #1 #1 substring$ *
+ t #2 global.max$ substring$ 't :=
+ }
+ if$
+ }
+ while$
+}
+
+FUNCTION {format.date}
+{ year empty$
+ { month empty$
+ { "" }
+ { "there's a month but no year in " cite$ * warning$
+ month
+ }
+ if$
+ }
+ { month empty$
+ 'year
+ { month " " * year * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.btitle}
+{ title emphasize
+}
+
+FUNCTION {tie.or.space.connect}
+{ duplicate$ text.length$ #3 <
+ { "~" }
+ { " " }
+ if$
+ swap$ * *
+}
+
+FUNCTION {either.or.check}
+{ empty$
+ 'pop$
+ { "can't use both " swap$ * " fields in " * cite$ * warning$ }
+ if$
+}
+
+FUNCTION {format.bvolume}
+{ volume empty$
+ { "" }
+ { "volume" volume tie.or.space.connect
+ series empty$
+ 'skip$
+ { " of " * series emphasize * }
+ if$
+ "volume and number" number either.or.check
+ }
+ if$
+}
+
+FUNCTION {format.number.series}
+{ volume empty$
+ { number empty$
+ { series field.or.null }
+ { output.state mid.sentence =
+ { "number" }
+ { "Number" }
+ if$
+ number tie.or.space.connect
+ series empty$
+ { "there's a number but no series in " cite$ * warning$ }
+ { " in " * series * }
+ if$
+ }
+ if$
+ }
+ { "" }
+ if$
+}
+
+FUNCTION {format.edition}
+{ edition empty$
+ { "" }
+ { output.state mid.sentence =
+ { edition "l" change.case$ " edition" * }
+ { edition "t" change.case$ " edition" * }
+ if$
+ }
+ if$
+}
+
+INTEGERS { multiresult }
+
+FUNCTION {multi.page.check}
+{ 't :=
+ #0 'multiresult :=
+ { multiresult not
+ t empty$ not
+ and
+ }
+ { t #1 #1 substring$
+ duplicate$ "-" =
+ swap$ duplicate$ "," =
+ swap$ "+" =
+ or or
+ { #1 'multiresult := }
+ { t #2 global.max$ substring$ 't := }
+ if$
+ }
+ while$
+ multiresult
+}
+
+FUNCTION {format.pages}
+{ pages empty$
+ { "" }
+ { pages multi.page.check
+ { "pages" pages n.dashify tie.or.space.connect }
+ { "page" pages tie.or.space.connect }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.vol.num.pages}
+{ volume field.or.null
+ number empty$
+ 'skip$
+ { "(" number * ")" * *
+ volume empty$
+ { "there's a number but no volume in " cite$ * warning$ }
+ 'skip$
+ if$
+ }
+ if$
+ pages empty$
+ 'skip$
+ { duplicate$ empty$
+ { pop$ format.pages }
+ { ":" * pages n.dashify * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.chapter.pages}
+{ chapter empty$
+ 'format.pages
+ { type empty$
+ { "chapter" }
+ { type "l" change.case$ }
+ if$
+ chapter tie.or.space.connect
+ pages empty$
+ 'skip$
+ { ", " * format.pages * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.in.ed.booktitle}
+{ booktitle empty$
+ { "" }
+ { editor empty$
+ { "In " booktitle emphasize * }
+ { "In " format.editors * ", " * booktitle emphasize * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {empty.misc.check}
+{ author empty$ title empty$ howpublished empty$
+ month empty$ year empty$ note empty$
+ and and and and and
+ key empty$ not and
+ { "all relevant fields are empty in " cite$ * warning$ }
+ 'skip$
+ if$
+}
+
+FUNCTION {format.thesis.type}
+{ type empty$
+ 'skip$
+ { pop$
+ type "t" change.case$
+ }
+ if$
+}
+
+FUNCTION {format.tr.number}
+{ type empty$
+ { "Technical Report" }
+ 'type
+ if$
+ number empty$
+ { "t" change.case$ }
+ { number tie.or.space.connect }
+ if$
+}
+
+FUNCTION {format.article.crossref}
+{ key empty$
+ { journal empty$
+ { "need key or journal for " cite$ * " to crossref " * crossref *
+ warning$
+ ""
+ }
+ { "In {\em " journal * "\/}" * }
+ if$
+ }
+ { "In " key * }
+ if$
+ " \cite{" * crossref * "}" *
+}
+
+FUNCTION {format.crossref.editor}
+{ editor #1 "{vv~}{ll}" format.name$
+ editor num.names$ duplicate$
+ #2 >
+ { pop$ " et~al." * }
+ { #2 <
+ 'skip$
+ { editor #2 "{ff }{vv }{ll}{ jj}" format.name$ "others" =
+ { " et~al." * }
+ { " and " * editor #2 "{vv~}{ll}" format.name$ * }
+ if$
+ }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.book.crossref}
+{ volume empty$
+ { "empty volume in " cite$ * "'s crossref of " * crossref * warning$
+ "In "
+ }
+ { "Volume" volume tie.or.space.connect
+ " of " *
+ }
+ if$
+ editor empty$
+ editor field.or.null author field.or.null =
+ or
+ { key empty$
+ { series empty$
+ { "need editor, key, or series for " cite$ * " to crossref " *
+ crossref * warning$
+ "" *
+ }
+ { "{\em " * series * "\/}" * }
+ if$
+ }
+ { key * }
+ if$
+ }
+ { format.crossref.editor * }
+ if$
+ " \cite{" * crossref * "}" *
+}
+
+FUNCTION {format.incoll.inproc.crossref}
+{ editor empty$
+ editor field.or.null author field.or.null =
+ or
+ { key empty$
+ { booktitle empty$
+ { "need editor, key, or booktitle for " cite$ * " to crossref " *
+ crossref * warning$
+ ""
+ }
+ { "In {\em " booktitle * "\/}" * }
+ if$
+ }
+ { "In " key * }
+ if$
+ }
+ { "In " format.crossref.editor * }
+ if$
+ " \cite{" * crossref * "}" *
+}
+
+FUNCTION {article}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.title "title" output.check
+ new.block
+ crossref missing$
+ { journal emphasize "journal" output.check
+ format.vol.num.pages output
+ format.date "year" output.check
+ }
+ { format.article.crossref output.nonnull
+ format.pages output
+ }
+ if$
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {book}
+{ output.bibitem
+ author empty$
+ { format.editors "author and editor" output.check }
+ { format.authors output.nonnull
+ crossref missing$
+ { "author and editor" editor either.or.check }
+ 'skip$
+ if$
+ }
+ if$
+ new.block
+ format.btitle "title" output.check
+ crossref missing$
+ { format.bvolume output
+ new.block
+ format.number.series output
+ new.sentence
+ publisher "publisher" output.check
+ address output
+ }
+ { new.block
+ format.book.crossref output.nonnull
+ }
+ if$
+ format.edition output
+ format.date "year" output.check
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {booklet}
+{ output.bibitem
+ format.authors output
+ new.block
+ format.title "title" output.check
+ howpublished address new.block.checkb
+ howpublished output
+ address output
+ format.date output
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {inbook}
+{ output.bibitem
+ author empty$
+ { format.editors "author and editor" output.check }
+ { format.authors output.nonnull
+ crossref missing$
+ { "author and editor" editor either.or.check }
+ 'skip$
+ if$
+ }
+ if$
+ new.block
+ format.btitle "title" output.check
+ crossref missing$
+ { format.bvolume output
+ format.chapter.pages "chapter and pages" output.check
+ new.block
+ format.number.series output
+ new.sentence
+ publisher "publisher" output.check
+ address output
+ }
+ { format.chapter.pages "chapter and pages" output.check
+ new.block
+ format.book.crossref output.nonnull
+ }
+ if$
+ format.edition output
+ format.date "year" output.check
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {incollection}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.title "title" output.check
+ new.block
+ crossref missing$
+ { format.in.ed.booktitle "booktitle" output.check
+ format.bvolume output
+ format.number.series output
+ format.chapter.pages output
+ new.sentence
+ publisher "publisher" output.check
+ address output
+ format.edition output
+ format.date "year" output.check
+ }
+ { format.incoll.inproc.crossref output.nonnull
+ format.chapter.pages output
+ }
+ if$
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {inproceedings}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.title "title" output.check
+ new.block
+ crossref missing$
+ { format.in.ed.booktitle "booktitle" output.check
+ format.bvolume output
+ format.number.series output
+ format.pages output
+ address empty$
+ { organization publisher new.sentence.checkb
+ organization output
+ publisher output
+ format.date "year" output.check
+ }
+ { address output.nonnull
+ format.date "year" output.check
+ new.sentence
+ organization output
+ publisher output
+ }
+ if$
+ }
+ { format.incoll.inproc.crossref output.nonnull
+ format.pages output
+ }
+ if$
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {conference} { inproceedings }
+
+FUNCTION {manual}
+{ output.bibitem
+ author empty$
+ { organization empty$
+ 'skip$
+ { organization output.nonnull
+ address output
+ }
+ if$
+ }
+ { format.authors output.nonnull }
+ if$
+ new.block
+ format.btitle "title" output.check
+ author empty$
+ { organization empty$
+ { address new.block.checka
+ address output
+ }
+ 'skip$
+ if$
+ }
+ { organization address new.block.checkb
+ organization output
+ address output
+ }
+ if$
+ format.edition output
+ format.date output
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {mastersthesis}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.title "title" output.check
+ new.block
+ "Master's thesis" format.thesis.type output.nonnull
+ school "school" output.check
+ address output
+ format.date "year" output.check
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {misc}
+{ output.bibitem
+ format.authors output
+ title howpublished new.block.checkb
+ format.title output
+ howpublished new.block.checka
+ howpublished output
+ format.date output
+ new.block
+ note output
+ fin.entry
+ empty.misc.check
+}
+
+FUNCTION {phdthesis}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.btitle "title" output.check
+ new.block
+ "PhD thesis" format.thesis.type output.nonnull
+ school "school" output.check
+ address output
+ format.date "year" output.check
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {proceedings}
+{ output.bibitem
+ editor empty$
+ { organization output }
+ { format.editors output.nonnull }
+ if$
+ new.block
+ format.btitle "title" output.check
+ format.bvolume output
+ format.number.series output
+ address empty$
+ { editor empty$
+ { publisher new.sentence.checka }
+ { organization publisher new.sentence.checkb
+ organization output
+ }
+ if$
+ publisher output
+ format.date "year" output.check
+ }
+ { address output.nonnull
+ format.date "year" output.check
+ new.sentence
+ editor empty$
+ 'skip$
+ { organization output }
+ if$
+ publisher output
+ }
+ if$
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {techreport}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.title "title" output.check
+ new.block
+ format.tr.number output.nonnull
+ institution "institution" output.check
+ address output
+ format.date "year" output.check
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {unpublished}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.title "title" output.check
+ new.block
+ note "note" output.check
+ format.date output
+ fin.entry
+}
+
+FUNCTION {default.type} { misc }
+
+MACRO {jan} {"January"}
+
+MACRO {feb} {"February"}
+
+MACRO {mar} {"March"}
+
+MACRO {apr} {"April"}
+
+MACRO {may} {"May"}
+
+MACRO {jun} {"June"}
+
+MACRO {jul} {"July"}
+
+MACRO {aug} {"August"}
+
+MACRO {sep} {"September"}
+
+MACRO {oct} {"October"}
+
+MACRO {nov} {"November"}
+
+MACRO {dec} {"December"}
+
+MACRO {acmcs} {"ACM Computing Surveys"}
+
+MACRO {acta} {"Acta Informatica"}
+
+MACRO {cacm} {"Communications of the ACM"}
+
+MACRO {ibmjrd} {"IBM Journal of Research and Development"}
+
+MACRO {ibmsj} {"IBM Systems Journal"}
+
+MACRO {ieeese} {"IEEE Transactions on Software Engineering"}
+
+MACRO {ieeetc} {"IEEE Transactions on Computers"}
+
+MACRO {ieeetcad}
+ {"IEEE Transactions on Computer-Aided Design of Integrated Circuits"}
+
+MACRO {ipl} {"Information Processing Letters"}
+
+MACRO {jacm} {"Journal of the ACM"}
+
+MACRO {jcss} {"Journal of Computer and System Sciences"}
+
+MACRO {scp} {"Science of Computer Programming"}
+
+MACRO {sicomp} {"SIAM Journal on Computing"}
+
+MACRO {tocs} {"ACM Transactions on Computer Systems"}
+
+MACRO {tods} {"ACM Transactions on Database Systems"}
+
+MACRO {tog} {"ACM Transactions on Graphics"}
+
+MACRO {toms} {"ACM Transactions on Mathematical Software"}
+
+MACRO {toois} {"ACM Transactions on Office Information Systems"}
+
+MACRO {toplas} {"ACM Transactions on Programming Languages and Systems"}
+
+MACRO {tcs} {"Theoretical Computer Science"}
+
+READ
+
+FUNCTION {sortify}
+{ purify$
+ "l" change.case$
+}
+
+INTEGERS { len }
+
+FUNCTION {chop.word}
+{ 's :=
+ 'len :=
+ s #1 len substring$ =
+ { s len #1 + global.max$ substring$ }
+ 's
+ if$
+}
+
+INTEGERS { et.al.char.used }
+
+FUNCTION {initialize.et.al.char.used}
+{ #0 'et.al.char.used :=
+}
+
+EXECUTE {initialize.et.al.char.used}
+
+FUNCTION {format.lab.names}
+{ 's :=
+ s num.names$ 'numnames :=
+ numnames #1 >
+ { numnames #4 >
+ { #3 'namesleft := }
+ { numnames 'namesleft := }
+ if$
+ #1 'nameptr :=
+ ""
+ { namesleft #0 > }
+ { nameptr numnames =
+ { s nameptr "{ff }{vv }{ll}{ jj}" format.name$ "others" =
+ { "{\etalchar{+}}" *
+ #1 'et.al.char.used :=
+ }
+ { s nameptr "{v{}}{l{}}" format.name$ * }
+ if$
+ }
+ { s nameptr "{v{}}{l{}}" format.name$ * }
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+ numnames #4 >
+ { "{\etalchar{+}}" *
+ #1 'et.al.char.used :=
+ }
+ 'skip$
+ if$
+ }
+ { s #1 "{v{}}{l{}}" format.name$
+ duplicate$ text.length$ #2 <
+ { pop$ s #1 "{ll}" format.name$ #3 text.prefix$ }
+ 'skip$
+ if$
+ }
+ if$
+}
+
+FUNCTION {author.key.label}
+{ author empty$
+ { key empty$
+ { cite$ #1 #3 substring$ }
+ { key #3 text.prefix$ }
+ if$
+ }
+ { author format.lab.names }
+ if$
+}
+
+FUNCTION {author.editor.key.label}
+{ author empty$
+ { editor empty$
+ { key empty$
+ { cite$ #1 #3 substring$ }
+ { key #3 text.prefix$ }
+ if$
+ }
+ { editor format.lab.names }
+ if$
+ }
+ { author format.lab.names }
+ if$
+}
+
+FUNCTION {author.key.organization.label}
+{ author empty$
+ { key empty$
+ { organization empty$
+ { cite$ #1 #3 substring$ }
+ { "The " #4 organization chop.word #3 text.prefix$ }
+ if$
+ }
+ { key #3 text.prefix$ }
+ if$
+ }
+ { author format.lab.names }
+ if$
+}
+
+FUNCTION {editor.key.organization.label}
+{ editor empty$
+ { key empty$
+ { organization empty$
+ { cite$ #1 #3 substring$ }
+ { "The " #4 organization chop.word #3 text.prefix$ }
+ if$
+ }
+ { key #3 text.prefix$ }
+ if$
+ }
+ { editor format.lab.names }
+ if$
+}
+
+FUNCTION {calc.label}
+{ type$ "book" =
+ type$ "inbook" =
+ or
+ 'author.editor.key.label
+ { type$ "proceedings" =
+ 'editor.key.organization.label
+ { type$ "manual" =
+ 'author.key.organization.label
+ 'author.key.label
+ if$
+ }
+ if$
+ }
+ if$
+ duplicate$
+ 'label :=
+ sortify 'sort.label :=
+}
+
+FUNCTION {sort.format.names}
+{ 's :=
+ #1 'nameptr :=
+ ""
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ { nameptr #1 >
+ { " " * }
+ 'skip$
+ if$
+ s nameptr "{vv{ } }{ll{ }}{ ff{ }}{ jj{ }}" format.name$ 't :=
+ nameptr numnames = t "others" = and
+ { "et al" * }
+ { t sortify * }
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+}
+
+FUNCTION {sort.format.title}
+{ 't :=
+ "A " #2
+ "An " #3
+ "The " #4 t chop.word
+ chop.word
+ chop.word
+ sortify
+ #1 global.max$ substring$
+}
+
+FUNCTION {author.sort}
+{ author empty$
+ { key empty$
+ { "to sort, need author or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { author sort.format.names }
+ if$
+}
+
+FUNCTION {author.editor.sort}
+{ author empty$
+ { editor empty$
+ { key empty$
+ { "to sort, need author, editor, or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { editor sort.format.names }
+ if$
+ }
+ { author sort.format.names }
+ if$
+}
+
+FUNCTION {author.organization.sort}
+{ author empty$
+ { organization empty$
+ { key empty$
+ { "to sort, need author, organization, or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { "The " #4 organization chop.word sortify }
+ if$
+ }
+ { author sort.format.names }
+ if$
+}
+
+FUNCTION {editor.organization.sort}
+{ editor empty$
+ { organization empty$
+ { key empty$
+ { "to sort, need editor, organization, or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { "The " #4 organization chop.word sortify }
+ if$
+ }
+ { editor sort.format.names }
+ if$
+}
+
+FUNCTION {presort}
+{ calc.label
+ sort.label
+ " "
+ *
+ type$ "book" =
+ type$ "inbook" =
+ or
+ 'author.editor.sort
+ { type$ "proceedings" =
+ 'editor.organization.sort
+ { type$ "manual" =
+ 'author.organization.sort
+ 'author.sort
+ if$
+ }
+ if$
+ }
+ if$
+ *
+ " "
+ *
+ year field.or.null sortify
+ *
+ " "
+ *
+ month field.or.null sortify
+ *
+ " "
+ *
+ title field.or.null
+ sort.format.title
+ *
+ #1 entry.max$ substring$
+ 'sort.key$ :=
+}
+
+ITERATE {presort}
+
+SORT
+
+STRINGS { longest.label last.sort.label next.extra }
+
+INTEGERS { longest.label.width last.extra.num }
+
+FUNCTION {initialize.longest.label}
+{ "" 'longest.label :=
+ #0 int.to.chr$ 'last.sort.label :=
+ "" 'next.extra :=
+ #0 'longest.label.width :=
+ #0 'last.extra.num :=
+}
+
+FUNCTION {forward.pass}
+{ last.sort.label sort.label =
+ { last.extra.num #1 + 'last.extra.num :=
+ last.extra.num int.to.str$ 'extra.label :=
+ }
+ { #1 'last.extra.num :=
+ "" 'extra.label :=
+ sort.label 'last.sort.label :=
+ }
+ if$
+}
+
+FUNCTION {reverse.pass}
+{ next.extra "2" =
+ { "1" 'extra.label := }
+ 'skip$
+ if$
+ label extra.label * 'label :=
+ label width$ longest.label.width >
+ { label 'longest.label :=
+ label width$ 'longest.label.width :=
+ }
+ 'skip$
+ if$
+ extra.label 'next.extra :=
+}
+
+EXECUTE {initialize.longest.label}
+
+ITERATE {forward.pass}
+
+REVERSE {reverse.pass}
+
+FUNCTION {begin.bib}
+{ et.al.char.used
+ { "\newcommand{\etalchar}[1]{$^{#1}$}" write$ newline$ }
+ 'skip$
+ if$
+ preamble$ empty$
+ 'skip$
+ { preamble$ write$ newline$ }
+ if$
+ "\begin{thebibliography}{" longest.label * "}" * write$ newline$
+}
+
+EXECUTE {begin.bib}
+
+EXECUTE {init.state.consts}
+
+ITERATE {call.type$}
+
+FUNCTION {end.bib}
+{ newline$
+ "\end{thebibliography}" write$ newline$
+}
+
+EXECUTE {end.bib}
diff --git a/biblio/bibtex/contrib/misc/ama.bst b/biblio/bibtex/contrib/misc/ama.bst
new file mode 100644
index 0000000000..550c5ef0a9
--- /dev/null
+++ b/biblio/bibtex/contrib/misc/ama.bst
@@ -0,0 +1,987 @@
+%
+% THIS IS AN ALPHA VERSION!!!
+%
+% USE AT YOUR OWN RISK
+%
+% This should work for articles...I don't know if it works well for
+% books, etc (give it a try and see!).
+%
+% PLEASE COMPARE RESULTS WITH THE INSTRUCTIONS FOR AUTHORS FOR THE
+% JOURNAL YOU ARE SUBMITTING FOR...I CANNOT ACCEPT RESPONSIBILITY
+% FOR REJECTED MANUSCRIPTS (but I will try to fix it if you point out
+% a bug)
+%
+% AMA Manual of Style (JAMA, Cancer, many others..)
+% -Up to 6 authors, otherwise 3 authors et al.
+% -Title in italics
+% -numeric labels
+% -order-of-reference.
+%
+% Author L, Author S, Author D, et al. Title. Journal.
+% YYYY;VOL(NUM):PPP-PPP.
+%
+%
+% History
+% 9/30/85 (HWT) IEETR Original version, by Howard Trickey.
+% 1/29/88 (OP&HWT) Updated for BibTeX version 0.99a, Oren Patashnik;
+% 3/27/02 IEETR style used as framework. Formats heavily changed by
+% Eric Kort (eric.kort@vai.org)
+%
+% THIS VERSION DOES NOT WORK WITH BIBTEX 0.98i.
+%
+
+ENTRY
+ { address
+ author
+ booktitle
+ chapter
+ edition
+ editor
+ howpublished
+ institution
+ journal
+ key
+ month
+ note
+ number
+ organization
+ pages
+ publisher
+ school
+ series
+ title
+ type
+ volume
+ year
+ }
+ {}
+ { label }
+
+INTEGERS { output.state before.all mid.sentence after.quote after.sentence
+ after.quoted.block after.block }
+
+FUNCTION {init.state.consts}
+{ #0 'before.all :=
+ #1 'mid.sentence :=
+ #2 'after.quote :=
+ #3 'after.sentence :=
+ #4 'after.quoted.block :=
+ #5 'after.block :=
+}
+
+STRINGS { s t }
+
+FUNCTION {output.nonnull}
+{ 's :=
+ output.state mid.sentence =
+ { "" * write$ }
+ { output.state after.quote =
+ { " " * write$ }
+ { output.state after.block =
+ { add.period$ write$
+ newline$
+ "\newblock " write$
+ }
+ { output.state before.all =
+ 'write$
+ { output.state after.quoted.block =
+ { write$
+ newline$
+ "\newblock " write$
+ }
+ { add.period$ " " * write$ }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+ mid.sentence 'output.state :=
+ }
+ if$
+ s
+}
+
+FUNCTION {output}
+{ duplicate$ empty$
+ 'pop$
+ 'output.nonnull
+ if$
+}
+
+FUNCTION {output.check}
+{ 't :=
+ duplicate$ empty$
+ { pop$ "empty " t * " in " * cite$ * warning$ }
+ 'output.nonnull
+ if$
+}
+
+FUNCTION {output.bibitem}
+{ newline$
+ "\bibitem{" write$
+ cite$ write$
+ "}" write$
+ newline$
+ ""
+ before.all 'output.state :=
+}
+
+FUNCTION {blank.sep}
+{ after.quote 'output.state :=
+}
+
+FUNCTION {fin.entry}
+{ output.state after.quoted.block =
+ 'skip$
+ 'add.period$
+ if$
+ write$
+ newline$
+}
+
+FUNCTION {new.block}
+{ output.state before.all =
+ 'skip$
+ { output.state after.quote =
+ { after.quoted.block 'output.state := }
+ { after.block 'output.state := }
+ if$
+ }
+ if$
+}
+
+FUNCTION {new.sentence}
+{ output.state after.block =
+ 'skip$
+ { output.state before.all =
+ 'skip$
+ { after.sentence 'output.state := }
+ if$
+ }
+ if$
+}
+
+FUNCTION {not}
+{ { #0 }
+ { #1 }
+ if$
+}
+
+FUNCTION {and}
+{ 'skip$
+ { pop$ #0 }
+ if$
+}
+
+FUNCTION {or}
+{ { pop$ #1 }
+ 'skip$
+ if$
+}
+
+FUNCTION {new.block.checka}
+{ empty$
+ 'skip$
+ 'new.block
+ if$
+}
+
+FUNCTION {new.block.checkb}
+{ empty$
+ swap$ empty$
+ and
+ 'skip$
+ 'new.block
+ if$
+}
+
+FUNCTION {new.sentence.checka}
+{ empty$
+ 'skip$
+ 'new.sentence
+ if$
+}
+
+FUNCTION {field.or.null}
+{ duplicate$ empty$
+ { pop$ "" }
+ 'skip$
+ if$
+}
+
+FUNCTION {emphasize}
+{ duplicate$ empty$
+ { pop$ "" }
+ { "{\it " swap$ * "}" * }
+ if$
+}
+
+INTEGERS { nameptr namesleft numnames etal}
+
+FUNCTION {format.names}
+{ 's := % push the name s, pop s and author (already on stack), assign author to s
+ #1 'nameptr :=
+ #0 'etal :=
+
+ s num.names$ 'numnames :=
+
+ numnames #6 >
+ {#3 'numnames :=
+ #1 'etal :=
+ }
+ {}
+ %end if
+ if$
+
+ numnames 'namesleft :=
+ { namesleft #0 > }
+
+ {s nameptr "{ll~}{ff}" format.name$ 't :=
+ namesleft #1 >
+ {t * ", " * }
+ {t}
+ %end if
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+
+ etal
+ {", et al. "}
+ {". "}
+ if$
+ *
+}
+
+FUNCTION {format.authors}
+{ author empty$
+ { "" }
+ { author format.names }
+ if$
+}
+
+FUNCTION {format.editors}
+{ editor empty$
+ { "" }
+ { editor format.names
+ editor num.names$ #1 >
+ { ", eds." * }
+ { ", ed." * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.title}
+{ title empty$
+ { "" }
+ { title " " *}
+ if$
+}
+
+FUNCTION {format.journal}
+{ journal empty$
+ { "" }
+ { journal ". " *}
+ if$
+}
+
+FUNCTION {format.title.p}
+{ title empty$
+ { "" }
+ { title " " *}
+ if$
+}
+
+FUNCTION {n.dashify}
+{ 't :=
+ ""
+ { t empty$ not }
+ { t #1 #1 substring$ "-" =
+ { t #1 #2 substring$ "--" = not
+ { "--" *
+ t #2 global.max$ substring$ 't :=
+ }
+ { { t #1 #1 substring$ "-" = }
+ { "-" *
+ t #2 global.max$ substring$ 't :=
+ }
+ while$
+ }
+ if$
+ }
+ { t #1 #1 substring$ *
+ t #2 global.max$ substring$ 't :=
+ }
+ if$
+ }
+ while$
+}
+
+FUNCTION {format.date}
+{ year empty$
+ { "" }
+ { " " * year }
+ if$
+}
+
+FUNCTION {format.btitle}
+{ title emphasize
+}
+
+FUNCTION {tie.or.space.connect}
+{ duplicate$ text.length$ #3 <
+ { "~" }
+ { " " }
+ if$
+ swap$ * *
+}
+
+FUNCTION {either.or.check}
+{ empty$
+ 'pop$
+ { "can't use both " swap$ * " fields in " * cite$ * warning$ }
+ if$
+}
+
+FUNCTION {format.bvolume}
+{ volume empty$
+ { "" }
+ { ";" volume *
+ series empty$
+ 'skip$
+ { " of " * series emphasize * }
+ if$
+ "volume and number" number either.or.check
+ }
+ if$
+}
+
+FUNCTION {format.number.series}
+{ volume empty$
+ { number empty$
+ { series field.or.null }
+ { output.state mid.sentence =
+ { "no.~" }
+ { "No.~" }
+ if$
+ number *
+ series empty$
+ { "there's a number but no series in " cite$ * warning$ }
+ { " in " * series * }
+ if$
+ }
+ if$
+ }
+ { "" }
+ if$
+}
+
+FUNCTION {format.edition}
+{ edition empty$
+ { "" }
+ { edition "l" change.case$ "~ed." * }
+ if$
+}
+
+INTEGERS { multiresult }
+
+FUNCTION {multi.page.check}
+{ 't :=
+ #0 'multiresult :=
+ { multiresult not
+ t empty$ not
+ and
+ }
+ { t #1 #1 substring$
+ duplicate$ "-" =
+ swap$ duplicate$ "," =
+ swap$ "+" =
+ or or
+ { #1 'multiresult := }
+ { t #2 global.max$ substring$ 't := }
+ if$
+ }
+ while$
+ multiresult
+}
+
+FUNCTION {format.pages}
+{ pages empty$
+ { "" }
+ {":" pages *}
+ if$
+}
+
+FUNCTION {format.volume}
+{ volume empty$
+ { "" }
+ { ";" volume * }
+ if$
+}
+
+FUNCTION {format.number}
+{ number empty$
+ { "" }
+ { "(" number * ")" *}
+ if$
+}
+
+FUNCTION {format.chapter.pages}
+{ chapter empty$
+ 'format.pages
+ { type empty$
+ { "ch.~" chapter * }
+ { type "l" change.case$ chapter tie.or.space.connect }
+ if$
+ pages empty$
+ 'skip$
+ { ", " * format.pages * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.in.ed.booktitle}
+{ booktitle empty$
+ { "" }
+ { "in " booktitle emphasize *
+ editor empty$
+ 'skip$
+ { " (" * format.editors * ")" * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.thesis.type}
+{ type empty$
+ 'skip$
+ { pop$
+ output.state after.block =
+ { type "t" change.case$ }
+ { type "l" change.case$ }
+ if$
+ }
+ if$
+}
+
+FUNCTION {empty.misc.check}
+{ author empty$ title empty$ howpublished empty$
+ month empty$ year empty$ note empty$
+ and and and and and
+ { "all relevant fields are empty in " cite$ * warning$ }
+ 'skip$
+ if$
+}
+
+FUNCTION {format.tr.number}
+{ type empty$
+ { "Tech. Rep." }
+ 'type
+ if$
+ number empty$
+ { "l" change.case$ }
+ { number tie.or.space.connect }
+ if$
+}
+
+FUNCTION {format.addr.pub}
+{ publisher empty$
+ { "" }
+ { address empty$
+ { "" }
+ { address ": " * }
+ if$
+ publisher *
+ }
+ if$
+}
+
+FUNCTION {format.paddress}
+{ address empty$
+ { "" }
+ { "(" address * ")" * }
+ if$
+}
+
+FUNCTION {format.article.crossref}
+{ key empty$
+ { journal empty$
+ { "need key or journal for " cite$ * " to crossref " * crossref *
+ warning$
+ ""
+ }
+ { "in {\em " journal * "\/}" * }
+ if$
+ }
+ { "in " key * }
+ if$
+ " \cite{" * crossref * "}" *
+}
+
+FUNCTION {format.crossref.editor}
+{ editor #1 "{vv~}{ll}" format.name$
+ editor num.names$ duplicate$
+ #2 >
+ { pop$ " {\em et~al.}" * }
+ { #2 <
+ 'skip$
+ { editor #2 "{ff }{vv }{ll}{ jj}" format.name$ "others" =
+ { " {\em et~al.}" * }
+ { " and " * editor #2 "{vv~}{ll}" format.name$ * }
+ if$
+ }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.book.crossref}
+{ volume empty$
+ { "empty volume in " cite$ * "'s crossref of " * crossref * warning$
+ "In "
+ }
+ { "Vol.~" volume *
+ " of " *
+ }
+ if$
+ editor empty$
+ editor field.or.null author field.or.null =
+ or
+ { key empty$
+ { series empty$
+ { "need editor, key, or series for " cite$ * " to crossref " *
+ crossref * warning$
+ "" *
+ }
+ { "{\em " * series * "\/}" * }
+ if$
+ }
+ { key * }
+ if$
+ }
+ { format.crossref.editor * }
+ if$
+ " \cite{" * crossref * "}" *
+}
+
+FUNCTION {format.incoll.inproc.crossref}
+{ editor empty$
+ editor field.or.null author field.or.null =
+ or
+ { key empty$
+ { booktitle empty$
+ { "need editor, key, or booktitle for " cite$ * " to crossref " *
+ crossref * warning$
+ ""
+ }
+ { "in {\em " booktitle * "\/}" * }
+ if$
+ }
+ { "in " key * }
+ if$
+ }
+ { "in " format.crossref.editor * }
+ if$
+ " \cite{" * crossref * "}" *
+}
+
+FUNCTION {article}
+{ output.bibitem
+ format.authors "author" output.check
+ format.title "title" output.check
+ blank.sep
+ crossref missing$
+ { format.journal emphasize "journal" output.check
+ format.date "year" output.check
+ format.volume output
+ format.pages output
+ }
+ { format.article.crossref output.nonnull
+ format.pages output
+ }
+ if$
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {book}
+{ output.bibitem
+ author empty$
+ { format.editors "author and editor" output.check }
+ { format.authors output.nonnull
+ crossref missing$
+ { "author and editor" editor either.or.check }
+ 'skip$
+ if$
+ }
+ if$
+ format.btitle "title" output.check
+ crossref missing$
+ { format.bvolume output
+ new.block
+ format.number.series output
+ format.addr.pub "publisher" output.check
+ }
+ { new.block
+ format.book.crossref output.nonnull
+ }
+ if$
+ format.edition output
+ format.date "year" output.check
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {booklet}
+{ output.bibitem
+ format.authors output
+ title empty$
+ { "empty title in " cite$ * warning$
+ howpublished new.sentence.checka
+ }
+ { howpublished empty$ not
+ address empty$ month empty$ year empty$ and and
+ or
+ { format.title.p output.nonnull }
+ { format.title output.nonnull }
+ if$
+ blank.sep
+ }
+ if$
+ howpublished output
+ address output
+ format.date output
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {inbook}
+{ output.bibitem
+ author empty$
+ { format.editors "author and editor" output.check }
+ { format.authors output.nonnull
+ crossref missing$
+ { "author and editor" editor either.or.check }
+ 'skip$
+ if$
+ }
+ if$
+ format.btitle "title" output.check
+ crossref missing$
+ { format.bvolume output
+ format.chapter.pages "chapter and pages" output.check
+ new.block
+ format.number.series output
+ format.addr.pub "publisher" output.check
+ }
+ { format.chapter.pages "chapter and pages" output.check
+ new.block
+ format.book.crossref output.nonnull
+ }
+ if$
+ format.edition output
+ format.date "year" output.check
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {incollection}
+{ output.bibitem
+ format.authors "author" output.check
+ format.title "title" output.check
+ blank.sep
+ crossref missing$
+ { format.in.ed.booktitle "booktitle" output.check
+ format.bvolume output
+ format.number.series output
+ format.chapter.pages output
+ format.addr.pub "publisher" output.check
+ format.edition output
+ format.date "year" output.check
+ }
+ { format.incoll.inproc.crossref output.nonnull
+ format.chapter.pages output
+ }
+ if$
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {inproceedings}
+{ output.bibitem
+ format.authors "author" output.check
+ format.title "title" output.check
+ blank.sep
+ crossref missing$
+ { format.in.ed.booktitle "booktitle" output.check
+ format.bvolume output
+ format.number.series output
+ format.paddress output
+ format.pages output
+ organization output
+ publisher output
+ format.date "year" output.check
+ }
+ { format.incoll.inproc.crossref output.nonnull
+ format.pages output
+ }
+ if$
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {conference} { inproceedings }
+
+FUNCTION {manual}
+{ output.bibitem
+ author empty$
+ { organization empty$
+ 'skip$
+ { organization output.nonnull
+ address output
+ }
+ if$
+ }
+ { format.authors output.nonnull }
+ if$
+ format.btitle "title" output.check
+ author empty$
+ { organization empty$
+ { address new.block.checka
+ address output
+ }
+ 'skip$
+ if$
+ }
+ { organization address new.block.checkb
+ organization output
+ address output
+ }
+ if$
+ format.edition output
+ format.date output
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {mastersthesis}
+{ output.bibitem
+ format.authors "author" output.check
+ format.title "title" output.check
+ blank.sep
+ "Master's thesis" format.thesis.type output.nonnull
+ school "school" output.check
+ address output
+ format.date "year" output.check
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {misc}
+{ output.bibitem
+ format.authors output
+ title empty$
+ { howpublished new.sentence.checka }
+ { howpublished empty$ not
+ month empty$ year empty$ and
+ or
+ { format.title.p output.nonnull }
+ { format.title output.nonnull }
+ if$
+ blank.sep
+ }
+ if$
+ howpublished output
+ format.date output
+ new.block
+ note output
+ fin.entry
+ empty.misc.check
+}
+
+FUNCTION {phdthesis}
+{ output.bibitem
+ format.authors "author" output.check
+ format.btitle "title" output.check
+ new.block
+ "PhD thesis" format.thesis.type output.nonnull
+ school "school" output.check
+ address output
+ format.date "year" output.check
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {proceedings}
+{ output.bibitem
+ editor empty$
+ { organization output }
+ { format.editors output.nonnull }
+ if$
+ format.btitle "title" output.check
+ format.bvolume output
+ format.number.series output
+ format.paddress output
+ editor empty$
+ 'skip$
+ { organization output }
+ if$
+ publisher output
+ format.date "year" output.check
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {techreport}
+{ output.bibitem
+ format.authors "author" output.check
+ format.title "title" output.check
+ blank.sep
+ format.tr.number output.nonnull
+ institution "institution" output.check
+ address output
+ format.date "year" output.check
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {unpublished}
+{ output.bibitem
+ format.authors "author" output.check
+ format.title.p "title" output.check
+ blank.sep
+ note "note" output.check
+ format.date output
+ fin.entry
+}
+
+FUNCTION {default.type} { misc }
+
+MACRO {jan} {"Jan."}
+
+MACRO {feb} {"Feb."}
+
+MACRO {mar} {"Mar."}
+
+MACRO {apr} {"Apr."}
+
+MACRO {may} {"May"}
+
+MACRO {jun} {"June"}
+
+MACRO {jul} {"July"}
+
+MACRO {aug} {"Aug."}
+
+MACRO {sep} {"Sept."}
+
+MACRO {oct} {"Oct."}
+
+MACRO {nov} {"Nov."}
+
+MACRO {dec} {"Dec."}
+
+MACRO {acmcs} {"ACM Computing Surveys"}
+
+MACRO {acta} {"Acta Informatica"}
+
+MACRO {cacm} {"Communications ACM"}
+
+MACRO {ibmjrd} {"IBM J. Research and Development"}
+
+MACRO {ibmsj} {"IBM Systems~J."}
+
+MACRO {ieeese} {"IEEE Trans. Software Engineering"}
+
+MACRO {ieeetc} {"IEEE Trans. Computers"}
+
+MACRO {ieeetcad}
+ {"IEEE Trans. Computer-Aided Design"}
+
+MACRO {ipl} {"Information Processing Letters"}
+
+MACRO {jacm} {"J.~ACM"}
+
+MACRO {jcss} {"J.~Computer and System Sciences"}
+
+MACRO {scp} {"Science of Computer Programming"}
+
+MACRO {sicomp} {"SIAM J. Computing"}
+
+MACRO {tocs} {"ACM Trans. Computer Systems"}
+
+MACRO {tods} {"ACM Trans. Database Systems"}
+
+MACRO {tog} {"ACM Trans. Graphics"}
+
+MACRO {toms} {"ACM Trans. Mathematical Software"}
+
+MACRO {toois} {"ACM Trans. Office Information Systems"}
+
+MACRO {toplas} {"ACM Trans. Programming Languages and Systems"}
+
+MACRO {tcs} {"Theoretical Computer Science"}
+
+READ
+
+STRINGS { longest.label }
+
+INTEGERS { number.label longest.label.width }
+
+FUNCTION {initialize.longest.label}
+{ "" 'longest.label :=
+ #1 'number.label :=
+ #0 'longest.label.width :=
+}
+
+FUNCTION {longest.label.pass}
+{ number.label int.to.str$ 'label :=
+ number.label #1 + 'number.label :=
+ label width$ longest.label.width >
+ { label 'longest.label :=
+ label width$ 'longest.label.width :=
+ }
+ 'skip$
+ if$
+}
+
+EXECUTE {initialize.longest.label}
+
+ITERATE {longest.label.pass}
+
+FUNCTION {begin.bib}
+{ preamble$ empty$
+ 'skip$
+ { preamble$ write$ newline$ }
+ if$
+ "\begin{thebibliography}{" longest.label * "}" * write$ newline$
+}
+
+EXECUTE {begin.bib}
+
+EXECUTE {init.state.consts}
+
+ITERATE {call.type$}
+
+FUNCTION {end.bib}
+{ newline$
+ "\end{thebibliography}" write$ newline$
+}
+
+EXECUTE {end.bib}
diff --git a/biblio/bibtex/contrib/misc/amsalpha.bst b/biblio/bibtex/contrib/misc/amsalpha.bst
new file mode 120000
index 0000000000..a849371efd
--- /dev/null
+++ b/biblio/bibtex/contrib/misc/amsalpha.bst
@@ -0,0 +1 @@
+../../../../macros/latex/required/amscls/amsalpha.bst \ No newline at end of file
diff --git a/biblio/bibtex/contrib/misc/amsplain.bst b/biblio/bibtex/contrib/misc/amsplain.bst
new file mode 120000
index 0000000000..dd92eb32e7
--- /dev/null
+++ b/biblio/bibtex/contrib/misc/amsplain.bst
@@ -0,0 +1 @@
+../../../../macros/latex/required/amscls/amsplain.bst \ No newline at end of file
diff --git a/biblio/bibtex/contrib/misc/annotate.bst b/biblio/bibtex/contrib/misc/annotate.bst
new file mode 100644
index 0000000000..d0ec29f70f
--- /dev/null
+++ b/biblio/bibtex/contrib/misc/annotate.bst
@@ -0,0 +1,1280 @@
+% BibTeX bibliography style `annotate'
+% based on alpha.
+
+ENTRY
+ { address
+ annotate
+ author
+ booktitle
+ chapter
+ edition
+ editor
+ howpublished
+ institution
+ journal
+ key
+ month
+ note
+ number
+ organization
+ pages
+ publisher
+ school
+ series
+ title
+ type
+ volume
+ year
+ }
+ {}
+ { label extra.label sort.label }
+
+INTEGERS { output.state before.all mid.sentence after.sentence after.block }
+
+FUNCTION {init.state.consts}
+{ #0 'before.all :=
+ #1 'mid.sentence :=
+ #2 'after.sentence :=
+ #3 'after.block :=
+}
+
+STRINGS { s t }
+
+FUNCTION {output.nonnull}
+{ 's :=
+ output.state mid.sentence =
+ { ", " * write$ }
+ { output.state after.block =
+ { add.period$ write$
+ newline$
+ "\newblock " write$
+ }
+ { output.state before.all =
+ 'write$
+ { add.period$ " " * write$ }
+ if$
+ }
+ if$
+ mid.sentence 'output.state :=
+ }
+ if$
+ s
+}
+
+FUNCTION {output}
+{ duplicate$ empty$
+ 'pop$
+ 'output.nonnull
+ if$
+}
+
+FUNCTION {output.check}
+{ 't :=
+ duplicate$ empty$
+ { pop$ "empty " t * " in " * cite$ * warning$ }
+ 'output.nonnull
+ if$
+}
+
+FUNCTION {output.bibitem}
+{ newline$
+ "\bibitem[" write$
+ label write$
+ "]{" write$
+ cite$ write$
+ "}" write$
+ newline$
+ ""
+ before.all 'output.state :=
+}
+
+FUNCTION {fin.entry}
+{ add.period$
+ write$
+ newline$
+}
+
+FUNCTION {new.block}
+{ output.state before.all =
+ 'skip$
+ { after.block 'output.state := }
+ if$
+}
+
+FUNCTION {new.sentence}
+{ output.state after.block =
+ 'skip$
+ { output.state before.all =
+ 'skip$
+ { after.sentence 'output.state := }
+ if$
+ }
+ if$
+}
+
+FUNCTION {not}
+{ { #0 }
+ { #1 }
+ if$
+}
+
+FUNCTION {and}
+{ 'skip$
+ { pop$ #0 }
+ if$
+}
+
+FUNCTION {or}
+{ { pop$ #1 }
+ 'skip$
+ if$
+}
+
+FUNCTION {new.block.checka}
+{ empty$
+ 'skip$
+ 'new.block
+ if$
+}
+
+FUNCTION {new.block.checkb}
+{ empty$
+ swap$ empty$
+ and
+ 'skip$
+ 'new.block
+ if$
+}
+
+FUNCTION {new.sentence.checka}
+{ empty$
+ 'skip$
+ 'new.sentence
+ if$
+}
+
+FUNCTION {new.sentence.checkb}
+{ empty$
+ swap$ empty$
+ and
+ 'skip$
+ 'new.sentence
+ if$
+}
+
+FUNCTION {field.or.null}
+{ duplicate$ empty$
+ { pop$ "" }
+ 'skip$
+ if$
+}
+
+FUNCTION {emphasize}
+{ duplicate$ empty$
+ { pop$ "" }
+ { "{\em " swap$ * "}" * }
+ if$
+}
+
+INTEGERS { nameptr namesleft numnames }
+
+FUNCTION {format.names}
+{ 's :=
+ #1 'nameptr :=
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ { s nameptr "{ff~}{vv~}{ll}{, jj}" format.name$ 't :=
+ nameptr #1 >
+ { namesleft #1 >
+ { ", " * t * }
+ { numnames #2 >
+ { "," * }
+ 'skip$
+ if$
+ t "others" =
+ { " et~al." * }
+ { " and " * t * }
+ if$
+ }
+ if$
+ }
+ 't
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+}
+
+FUNCTION {format.authors}
+{ author empty$
+ { "" }
+ { author format.names }
+ if$
+}
+
+FUNCTION {format.annotate}
+{ annotate empty$
+ { "" }
+ { " \begin{quotation}\noindent "
+ annotate
+ * " \end{quotation} " *
+ }
+ if$
+}
+
+FUNCTION {format.editors}
+{ editor empty$
+ { "" }
+ { editor format.names
+ editor num.names$ #1 >
+ { ", editors" * }
+ { ", editor" * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.title}
+{ title empty$
+ { "" }
+ { title "t" change.case$ }
+ if$
+}
+
+FUNCTION {n.dashify}
+{ 't :=
+ ""
+ { t empty$ not }
+ { t #1 #1 substring$ "-" =
+ { t #1 #2 substring$ "--" = not
+ { "--" *
+ t #2 global.max$ substring$ 't :=
+ }
+ { { t #1 #1 substring$ "-" = }
+ { "-" *
+ t #2 global.max$ substring$ 't :=
+ }
+ while$
+ }
+ if$
+ }
+ { t #1 #1 substring$ *
+ t #2 global.max$ substring$ 't :=
+ }
+ if$
+ }
+ while$
+}
+
+FUNCTION {format.date}
+{ year empty$
+ { month empty$
+ { "" }
+ { "there's a month but no year in " cite$ * warning$
+ month
+ }
+ if$
+ }
+ { month empty$
+ 'year
+ { month " " * year * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.btitle}
+{ title emphasize
+}
+
+FUNCTION {tie.or.space.connect}
+{ duplicate$ text.length$ #3 <
+ { "~" }
+ { " " }
+ if$
+ swap$ * *
+}
+
+FUNCTION {either.or.check}
+{ empty$
+ 'pop$
+ { "can't use both " swap$ * " fields in " * cite$ * warning$ }
+ if$
+}
+
+FUNCTION {format.bvolume}
+{ volume empty$
+ { "" }
+ { "volume" volume tie.or.space.connect
+ series empty$
+ 'skip$
+ { " of " * series emphasize * }
+ if$
+ "volume and number" number either.or.check
+ }
+ if$
+}
+
+FUNCTION {format.number.series}
+{ volume empty$
+ { number empty$
+ { series field.or.null }
+ { output.state mid.sentence =
+ { "number" }
+ { "Number" }
+ if$
+ number tie.or.space.connect
+ series empty$
+ { "there's a number but no series in " cite$ * warning$ }
+ { " in " * series * }
+ if$
+ }
+ if$
+ }
+ { "" }
+ if$
+}
+
+FUNCTION {format.edition}
+{ edition empty$
+ { "" }
+ { output.state mid.sentence =
+ { edition "l" change.case$ " edition" * }
+ { edition "t" change.case$ " edition" * }
+ if$
+ }
+ if$
+}
+
+INTEGERS { multiresult }
+
+FUNCTION {multi.page.check}
+{ 't :=
+ #0 'multiresult :=
+ { multiresult not
+ t empty$ not
+ and
+ }
+ { t #1 #1 substring$
+ duplicate$ "-" =
+ swap$ duplicate$ "," =
+ swap$ "+" =
+ or or
+ { #1 'multiresult := }
+ { t #2 global.max$ substring$ 't := }
+ if$
+ }
+ while$
+ multiresult
+}
+
+FUNCTION {format.pages}
+{ pages empty$
+ { "" }
+ { pages multi.page.check
+ { "pages" pages n.dashify tie.or.space.connect }
+ { "page" pages tie.or.space.connect }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.vol.num.pages}
+{ volume field.or.null
+ number empty$
+ 'skip$
+ { "(" number * ")" * *
+ volume empty$
+ { "there's a number but no volume in " cite$ * warning$ }
+ 'skip$
+ if$
+ }
+ if$
+ pages empty$
+ 'skip$
+ { duplicate$ empty$
+ { pop$ format.pages }
+ { ":" * pages n.dashify * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.chapter.pages}
+{ chapter empty$
+ 'format.pages
+ { type empty$
+ { "chapter" }
+ { type "l" change.case$ }
+ if$
+ chapter tie.or.space.connect
+ pages empty$
+ 'skip$
+ { ", " * format.pages * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.in.ed.booktitle}
+{ booktitle empty$
+ { "" }
+ { editor empty$
+ { "In " booktitle emphasize * }
+ { "In " format.editors * ", " * booktitle emphasize * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {empty.misc.check}
+{ author empty$ title empty$ howpublished empty$
+ month empty$ year empty$ note empty$
+ and and and and and
+ key empty$ not and
+ { "all relevant fields are empty in " cite$ * warning$ }
+ 'skip$
+ if$
+}
+
+FUNCTION {format.thesis.type}
+{ type empty$
+ 'skip$
+ { pop$
+ type "t" change.case$
+ }
+ if$
+}
+
+FUNCTION {format.tr.number}
+{ type empty$
+ { "Technical Report" }
+ 'type
+ if$
+ number empty$
+ { "t" change.case$ }
+ { number tie.or.space.connect }
+ if$
+}
+
+FUNCTION {format.article.crossref}
+{ key empty$
+ { journal empty$
+ { "need key or journal for " cite$ * " to crossref " * crossref *
+ warning$
+ ""
+ }
+ { "In {\em " journal * "\/}" * }
+ if$
+ }
+ { "In " key * }
+ if$
+ " \cite{" * crossref * "}" *
+}
+
+FUNCTION {format.crossref.editor}
+{ editor #1 "{vv~}{ll}" format.name$
+ editor num.names$ duplicate$
+ #2 >
+ { pop$ " et~al." * }
+ { #2 <
+ 'skip$
+ { editor #2 "{ff }{vv }{ll}{ jj}" format.name$ "others" =
+ { " et~al." * }
+ { " and " * editor #2 "{vv~}{ll}" format.name$ * }
+ if$
+ }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.book.crossref}
+{ volume empty$
+ { "empty volume in " cite$ * "'s crossref of " * crossref * warning$
+ "In "
+ }
+ { "Volume" volume tie.or.space.connect
+ " of " *
+ }
+ if$
+ editor empty$
+ editor field.or.null author field.or.null =
+ or
+ { key empty$
+ { series empty$
+ { "need editor, key, or series for " cite$ * " to crossref " *
+ crossref * warning$
+ "" *
+ }
+ { "{\em " * series * "\/}" * }
+ if$
+ }
+ { key * }
+ if$
+ }
+ { format.crossref.editor * }
+ if$
+ " \cite{" * crossref * "}" *
+}
+
+FUNCTION {format.incoll.inproc.crossref}
+{ editor empty$
+ editor field.or.null author field.or.null =
+ or
+ { key empty$
+ { booktitle empty$
+ { "need editor, key, or booktitle for " cite$ * " to crossref " *
+ crossref * warning$
+ ""
+ }
+ { "In {\em " booktitle * "\/}" * }
+ if$
+ }
+ { "In " key * }
+ if$
+ }
+ { "In " format.crossref.editor * }
+ if$
+ " \cite{" * crossref * "}" *
+}
+
+FUNCTION {article}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.title "title" output.check
+ new.block
+ crossref missing$
+ { journal emphasize "journal" output.check
+ format.vol.num.pages output
+ format.date "year" output.check
+ }
+ { format.article.crossref output.nonnull
+ format.pages output
+ }
+ if$
+ new.block
+ note output
+ fin.entry
+ format.annotate write$
+ newline$
+}
+
+FUNCTION {book}
+{ output.bibitem
+ author empty$
+ { format.editors "author and editor" output.check }
+ { format.authors output.nonnull
+ crossref missing$
+ { "author and editor" editor either.or.check }
+ 'skip$
+ if$
+ }
+ if$
+ new.block
+ format.btitle "title" output.check
+ crossref missing$
+ { format.bvolume output
+ new.block
+ format.number.series output
+ new.sentence
+ publisher "publisher" output.check
+ address output
+ }
+ { new.block
+ format.book.crossref output.nonnull
+ }
+ if$
+ format.edition output
+ format.date "year" output.check
+ new.block
+ note output
+ fin.entry
+ format.annotate write$
+ newline$
+
+}
+
+FUNCTION {booklet}
+{ output.bibitem
+ format.authors output
+ new.block
+ format.title "title" output.check
+ howpublished address new.block.checkb
+ howpublished output
+ address output
+ format.date output
+ new.block
+ note output
+ fin.entry
+ format.annotate write$
+ newline$
+
+}
+
+FUNCTION {inbook}
+{ output.bibitem
+ author empty$
+ { format.editors "author and editor" output.check }
+ { format.authors output.nonnull
+ crossref missing$
+ { "author and editor" editor either.or.check }
+ 'skip$
+ if$
+ }
+ if$
+ new.block
+ format.btitle "title" output.check
+ crossref missing$
+ { format.bvolume output
+ format.chapter.pages "chapter and pages" output.check
+ new.block
+ format.number.series output
+ new.sentence
+ publisher "publisher" output.check
+ address output
+ }
+ { format.chapter.pages "chapter and pages" output.check
+ new.block
+ format.book.crossref output.nonnull
+ }
+ if$
+ format.edition output
+ format.date "year" output.check
+ new.block
+ note output
+ fin.entry
+ format.annotate write$
+}
+
+FUNCTION {incollection}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.title "title" output.check
+ new.block
+ crossref missing$
+ { format.in.ed.booktitle "booktitle" output.check
+ format.bvolume output
+ format.number.series output
+ format.chapter.pages output
+ new.sentence
+ publisher "publisher" output.check
+ address output
+ format.edition output
+ format.date "year" output.check
+ }
+ { format.incoll.inproc.crossref output.nonnull
+ format.chapter.pages output
+ }
+ if$
+ new.block
+ note output
+ fin.entry
+ format.annotate write$
+}
+
+FUNCTION {inproceedings}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.title "title" output.check
+ new.block
+ crossref missing$
+ { format.in.ed.booktitle "booktitle" output.check
+ format.bvolume output
+ format.number.series output
+ format.pages output
+ address empty$
+ { organization publisher new.sentence.checkb
+ organization output
+ publisher output
+ format.date "year" output.check
+ }
+ { address output.nonnull
+ format.date "year" output.check
+ new.sentence
+ organization output
+ publisher output
+ }
+ if$
+ }
+ { format.incoll.inproc.crossref output.nonnull
+ format.pages output
+ }
+ if$
+ new.block
+ note output
+ fin.entry
+ format.annotate write$
+}
+
+FUNCTION {conference} { inproceedings }
+
+FUNCTION {manual}
+{ output.bibitem
+ author empty$
+ { organization empty$
+ 'skip$
+ { organization output.nonnull
+ address output
+ }
+ if$
+ }
+ { format.authors output.nonnull }
+ if$
+ new.block
+ format.btitle "title" output.check
+ author empty$
+ { organization empty$
+ { address new.block.checka
+ address output
+ }
+ 'skip$
+ if$
+ }
+ { organization address new.block.checkb
+ organization output
+ address output
+ }
+ if$
+ format.edition output
+ format.date output
+ new.block
+ note output
+ fin.entry
+
+ format.annotate write$
+}
+
+FUNCTION {mastersthesis}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.title "title" output.check
+ new.block
+ "Master's thesis" format.thesis.type output.nonnull
+ school "school" output.check
+ address output
+ format.date "year" output.check
+ new.block
+ note output
+ fin.entry
+ format.annotate write$
+}
+
+FUNCTION {misc}
+{ output.bibitem
+ format.authors output
+ title howpublished new.block.checkb
+ format.title output
+ howpublished new.block.checka
+ howpublished output
+ format.date output
+ new.block
+ note output
+ fin.entry
+ format.annotate write$
+ empty.misc.check
+}
+
+FUNCTION {phdthesis}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.btitle "title" output.check
+ new.block
+ "PhD thesis" format.thesis.type output.nonnull
+ school "school" output.check
+ address output
+ format.date "year" output.check
+ new.block
+ note output
+ fin.entry
+ format.annotate write$
+}
+
+FUNCTION {proceedings}
+{ output.bibitem
+ editor empty$
+ { organization output }
+ { format.editors output.nonnull }
+ if$
+ new.block
+ format.btitle "title" output.check
+ format.bvolume output
+ format.number.series output
+ address empty$
+ { editor empty$
+ { publisher new.sentence.checka }
+ { organization publisher new.sentence.checkb
+ organization output
+ }
+ if$
+ publisher output
+ format.date "year" output.check
+ }
+ { address output.nonnull
+ format.date "year" output.check
+ new.sentence
+ editor empty$
+ 'skip$
+ { organization output }
+ if$
+ publisher output
+ }
+ if$
+ new.block
+ note output
+ fin.entry
+ format.annotate write$
+}
+
+FUNCTION {techreport}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.title "title" output.check
+ new.block
+ format.tr.number output.nonnull
+ institution "institution" output.check
+ address output
+ format.date "year" output.check
+ new.block
+ note output
+ fin.entry
+ format.annotate write$
+}
+
+FUNCTION {unpublished}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.title "title" output.check
+ new.block
+ note "note" output.check
+ format.date output
+ fin.entry
+ format.annotate write$
+}
+
+FUNCTION {default.type} { misc }
+
+MACRO {jan} {"January"}
+
+MACRO {feb} {"February"}
+
+MACRO {mar} {"March"}
+
+MACRO {apr} {"April"}
+
+MACRO {may} {"May"}
+
+MACRO {jun} {"June"}
+
+MACRO {jul} {"July"}
+
+MACRO {aug} {"August"}
+
+MACRO {sep} {"September"}
+
+MACRO {oct} {"October"}
+
+MACRO {nov} {"November"}
+
+MACRO {dec} {"December"}
+
+MACRO {acmcs} {"ACM Computing Surveys"}
+
+MACRO {acta} {"Acta Informatica"}
+
+MACRO {cacm} {"Communications of the ACM"}
+
+MACRO {ibmjrd} {"IBM Journal of Research and Development"}
+
+MACRO {ibmsj} {"IBM Systems Journal"}
+
+MACRO {ieeese} {"IEEE Transactions on Software Engineering"}
+
+MACRO {ieeetc} {"IEEE Transactions on Computers"}
+
+MACRO {ieeetcad}
+ {"IEEE Transactions on Computer-Aided Design of Integrated Circuits"}
+
+MACRO {ipl} {"Information Processing Letters"}
+
+MACRO {jacm} {"Journal of the ACM"}
+
+MACRO {jcss} {"Journal of Computer and System Sciences"}
+
+MACRO {scp} {"Science of Computer Programming"}
+
+MACRO {sicomp} {"SIAM Journal on Computing"}
+
+MACRO {tocs} {"ACM Transactions on Computer Systems"}
+
+MACRO {tods} {"ACM Transactions on Database Systems"}
+
+MACRO {tog} {"ACM Transactions on Graphics"}
+
+MACRO {toms} {"ACM Transactions on Mathematical Software"}
+
+MACRO {toois} {"ACM Transactions on Office Information Systems"}
+
+MACRO {toplas} {"ACM Transactions on Programming Languages and Systems"}
+
+MACRO {tcs} {"Theoretical Computer Science"}
+
+READ
+
+FUNCTION {sortify}
+{ purify$
+ "l" change.case$
+}
+
+INTEGERS { len }
+
+FUNCTION {chop.word}
+{ 's :=
+ 'len :=
+ s #1 len substring$ =
+ { s len #1 + global.max$ substring$ }
+ 's
+ if$
+}
+
+INTEGERS { et.al.char.used }
+
+FUNCTION {initialize.et.al.char.used}
+{ #0 'et.al.char.used :=
+}
+
+EXECUTE {initialize.et.al.char.used}
+
+FUNCTION {format.lab.names}
+{ 's :=
+ s num.names$ 'numnames :=
+ numnames #1 >
+ { numnames #4 >
+ { #3 'namesleft := }
+ { numnames 'namesleft := }
+ if$
+ #1 'nameptr :=
+ ""
+ { namesleft #0 > }
+ { nameptr numnames =
+ { s nameptr "{ff }{vv }{ll}{ jj}" format.name$ "others" =
+ { "{\etalchar{+}}" *
+ #1 'et.al.char.used :=
+ }
+ { s nameptr "{v{}}{l{}}" format.name$ * }
+ if$
+ }
+ { s nameptr "{v{}}{l{}}" format.name$ * }
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+ numnames #4 >
+ { "{\etalchar{+}}" *
+ #1 'et.al.char.used :=
+ }
+ 'skip$
+ if$
+ }
+ { s #1 "{v{}}{l{}}" format.name$
+ duplicate$ text.length$ #2 <
+ { pop$ s #1 "{ll}" format.name$ #3 text.prefix$ }
+ 'skip$
+ if$
+ }
+ if$
+}
+
+FUNCTION {author.key.label}
+{ author empty$
+ { key empty$
+ { cite$ #1 #3 substring$ }
+ { key #3 text.prefix$ }
+ if$
+ }
+ { author format.lab.names }
+ if$
+}
+
+FUNCTION {author.editor.key.label}
+{ author empty$
+ { editor empty$
+ { key empty$
+ { cite$ #1 #3 substring$ }
+ { key #3 text.prefix$ }
+ if$
+ }
+ { editor format.lab.names }
+ if$
+ }
+ { author format.lab.names }
+ if$
+}
+
+FUNCTION {author.key.organization.label}
+{ author empty$
+ { key empty$
+ { organization empty$
+ { cite$ #1 #3 substring$ }
+ { "The " #4 organization chop.word #3 text.prefix$ }
+ if$
+ }
+ { key #3 text.prefix$ }
+ if$
+ }
+ { author format.lab.names }
+ if$
+}
+
+FUNCTION {editor.key.organization.label}
+{ editor empty$
+ { key empty$
+ { organization empty$
+ { cite$ #1 #3 substring$ }
+ { "The " #4 organization chop.word #3 text.prefix$ }
+ if$
+ }
+ { key #3 text.prefix$ }
+ if$
+ }
+ { editor format.lab.names }
+ if$
+}
+
+FUNCTION {calc.label}
+{ type$ "book" =
+ type$ "inbook" =
+ or
+ 'author.editor.key.label
+ { type$ "proceedings" =
+ 'editor.key.organization.label
+ { type$ "manual" =
+ 'author.key.organization.label
+ 'author.key.label
+ if$
+ }
+ if$
+ }
+ if$
+ duplicate$
+ year field.or.null purify$ #-1 #2 substring$
+ *
+ 'label :=
+ year field.or.null purify$ #-1 #4 substring$
+ *
+ sortify 'sort.label :=
+}
+
+FUNCTION {sort.format.names}
+{ 's :=
+ #1 'nameptr :=
+ ""
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ { nameptr #1 >
+ { " " * }
+ 'skip$
+ if$
+ s nameptr "{vv{ } }{ll{ }}{ ff{ }}{ jj{ }}" format.name$ 't :=
+ nameptr numnames = t "others" = and
+ { "et al" * }
+ { t sortify * }
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+}
+
+FUNCTION {sort.format.title}
+{ 't :=
+ "A " #2
+ "An " #3
+ "The " #4 t chop.word
+ chop.word
+ chop.word
+ sortify
+ #1 global.max$ substring$
+}
+
+FUNCTION {author.sort}
+{ author empty$
+ { key empty$
+ { "to sort, need author or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { author sort.format.names }
+ if$
+}
+
+FUNCTION {author.editor.sort}
+{ author empty$
+ { editor empty$
+ { key empty$
+ { "to sort, need author, editor, or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { editor sort.format.names }
+ if$
+ }
+ { author sort.format.names }
+ if$
+}
+
+FUNCTION {author.organization.sort}
+{ author empty$
+ { organization empty$
+ { key empty$
+ { "to sort, need author, organization, or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { "The " #4 organization chop.word sortify }
+ if$
+ }
+ { author sort.format.names }
+ if$
+}
+
+FUNCTION {editor.organization.sort}
+{ editor empty$
+ { organization empty$
+ { key empty$
+ { "to sort, need editor, organization, or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { "The " #4 organization chop.word sortify }
+ if$
+ }
+ { editor sort.format.names }
+ if$
+}
+
+FUNCTION {presort}
+{ calc.label
+ sort.label
+ " "
+ *
+ type$ "book" =
+ type$ "inbook" =
+ or
+ 'author.editor.sort
+ { type$ "proceedings" =
+ 'editor.organization.sort
+ { type$ "manual" =
+ 'author.organization.sort
+ 'author.sort
+ if$
+ }
+ if$
+ }
+ if$
+ *
+ " "
+ *
+ year field.or.null sortify
+ *
+ " "
+ *
+ title field.or.null
+ sort.format.title
+ *
+ #1 entry.max$ substring$
+ 'sort.key$ :=
+}
+
+ITERATE {presort}
+
+SORT
+
+STRINGS { longest.label last.sort.label next.extra }
+
+INTEGERS { longest.label.width last.extra.num }
+
+FUNCTION {initialize.longest.label}
+{ "" 'longest.label :=
+ #0 int.to.chr$ 'last.sort.label :=
+ "" 'next.extra :=
+ #0 'longest.label.width :=
+ #0 'last.extra.num :=
+}
+
+FUNCTION {forward.pass}
+{ last.sort.label sort.label =
+ { last.extra.num #1 + 'last.extra.num :=
+ last.extra.num int.to.chr$ 'extra.label :=
+ }
+ { "a" chr.to.int$ 'last.extra.num :=
+ "" 'extra.label :=
+ sort.label 'last.sort.label :=
+ }
+ if$
+}
+
+FUNCTION {reverse.pass}
+{ next.extra "b" =
+ { "a" 'extra.label := }
+ 'skip$
+ if$
+ label extra.label * 'label :=
+ label width$ longest.label.width >
+ { label 'longest.label :=
+ label width$ 'longest.label.width :=
+ }
+ 'skip$
+ if$
+ extra.label 'next.extra :=
+}
+
+EXECUTE {initialize.longest.label}
+
+ITERATE {forward.pass}
+
+REVERSE {reverse.pass}
+
+FUNCTION {begin.bib}
+{ et.al.char.used
+ { "\newcommand{\etalchar}[1]{$^{#1}$}" write$ newline$ }
+ 'skip$
+ if$
+ preamble$ empty$
+ 'skip$
+ { preamble$ write$ newline$ }
+ if$
+ "\begin{thebibliography}{" longest.label * "}" * write$ newline$
+}
+
+EXECUTE {begin.bib}
+
+EXECUTE {init.state.consts}
+
+ITERATE {call.type$}
+
+FUNCTION {end.bib}
+{ newline$
+ "\end{thebibliography}" write$ newline$
+}
+
+EXECUTE {end.bib}
diff --git a/biblio/bibtex/contrib/misc/annotation.bst b/biblio/bibtex/contrib/misc/annotation.bst
new file mode 100644
index 0000000000..0cae6604c7
--- /dev/null
+++ b/biblio/bibtex/contrib/misc/annotation.bst
@@ -0,0 +1,1105 @@
+% BibTeX standard bibliography style `plain'
+ % version 0.99a for BibTeX versions 0.99a or later, LaTeX version 2.09.
+ % Copyright (C) 1985, all rights reserved.
+ % Copying of this file is authorized only if either
+ % (1) you make absolutely no changes to your copy, including name, or
+ % (2) if you do make changes, you name it something other than
+ % btxbst.doc, plain.bst, unsrt.bst, alpha.bst, and abbrv.bst.
+ % This restriction helps ensure that all standard styles are identical.
+ % The file btxbst.doc has the documentation for this style.
+
+ENTRY
+ { address
+ annote
+ author
+ booktitle
+ chapter
+ edition
+ editor
+ howpublished
+ institution
+ journal
+ key
+ month
+ note
+ number
+ organization
+ pages
+ publisher
+ school
+ series
+ title
+ type
+ volume
+ year
+ }
+ {}
+ { label }
+
+INTEGERS { output.state before.all mid.sentence after.sentence after.block }
+
+FUNCTION {init.state.consts}
+{ #0 'before.all :=
+ #1 'mid.sentence :=
+ #2 'after.sentence :=
+ #3 'after.block :=
+}
+
+STRINGS { s t }
+
+FUNCTION {output.nonnull}
+{ 's :=
+ output.state mid.sentence =
+ { ", " * write$ }
+ { output.state after.block =
+ { add.period$ write$
+ newline$
+ "\newblock " write$
+ }
+ { output.state before.all =
+ 'write$
+ { add.period$ " " * write$ }
+ if$
+ }
+ if$
+ mid.sentence 'output.state :=
+ }
+ if$
+ s
+}
+
+FUNCTION {output}
+{ duplicate$ empty$
+ 'pop$
+ 'output.nonnull
+ if$
+}
+
+FUNCTION {output.check}
+{ 't :=
+ duplicate$ empty$
+ { pop$ "empty " t * " in " * cite$ * warning$ }
+ 'output.nonnull
+ if$
+}
+
+FUNCTION {output.bibitem}
+{ newline$
+ "\bibitem{" write$
+ cite$ write$
+ "}" write$
+ newline$
+ ""
+ before.all 'output.state :=
+}
+
+FUNCTION {fin.entry}
+{ add.period$
+ write$
+ newline$
+ "\begin{quotation}\noindent{\sc Key:\ }" cite$ * write$
+ annote missing$
+ 'skip$
+ { "\\{\sc Annotation:\ }" write$ annote write$ }
+ if$
+ "\end{quotation}" write$
+ newline$
+}
+
+FUNCTION {new.block}
+{ output.state before.all =
+ 'skip$
+ { after.block 'output.state := }
+ if$
+}
+
+FUNCTION {new.sentence}
+{ output.state after.block =
+ 'skip$
+ { output.state before.all =
+ 'skip$
+ { after.sentence 'output.state := }
+ if$
+ }
+ if$
+}
+
+FUNCTION {not}
+{ { #0 }
+ { #1 }
+ if$
+}
+
+FUNCTION {and}
+{ 'skip$
+ { pop$ #0 }
+ if$
+}
+
+FUNCTION {or}
+{ { pop$ #1 }
+ 'skip$
+ if$
+}
+
+FUNCTION {new.block.checka}
+{ empty$
+ 'skip$
+ 'new.block
+ if$
+}
+
+FUNCTION {new.block.checkb}
+{ empty$
+ swap$ empty$
+ and
+ 'skip$
+ 'new.block
+ if$
+}
+
+FUNCTION {new.sentence.checka}
+{ empty$
+ 'skip$
+ 'new.sentence
+ if$
+}
+
+FUNCTION {new.sentence.checkb}
+{ empty$
+ swap$ empty$
+ and
+ 'skip$
+ 'new.sentence
+ if$
+}
+
+FUNCTION {field.or.null}
+{ duplicate$ empty$
+ { pop$ "" }
+ 'skip$
+ if$
+}
+
+FUNCTION {emphasize}
+{ duplicate$ empty$
+ { pop$ "" }
+ { "{\em " swap$ * "}" * }
+ if$
+}
+
+INTEGERS { nameptr namesleft numnames }
+
+FUNCTION {format.names}
+{ 's :=
+ #1 'nameptr :=
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ { s nameptr "{ff~}{vv~}{ll}{, jj}" format.name$ 't :=
+ nameptr #1 >
+ { namesleft #1 >
+ { ", " * t * }
+ { numnames #2 >
+ { "," * }
+ 'skip$
+ if$
+ t "others" =
+ { " et~al." * }
+ { " and " * t * }
+ if$
+ }
+ if$
+ }
+ 't
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+}
+
+FUNCTION {format.authors}
+{ author empty$
+ { "" }
+ { author format.names }
+ if$
+}
+
+FUNCTION {format.editors}
+{ editor empty$
+ { "" }
+ { editor format.names
+ editor num.names$ #1 >
+ { ", editors" * }
+ { ", editor" * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.title}
+{ title empty$
+ { "" }
+ { title "t" change.case$ }
+ if$
+}
+
+FUNCTION {n.dashify}
+{ 't :=
+ ""
+ { t empty$ not }
+ { t #1 #1 substring$ "-" =
+ { t #1 #2 substring$ "--" = not
+ { "--" *
+ t #2 global.max$ substring$ 't :=
+ }
+ { { t #1 #1 substring$ "-" = }
+ { "-" *
+ t #2 global.max$ substring$ 't :=
+ }
+ while$
+ }
+ if$
+ }
+ { t #1 #1 substring$ *
+ t #2 global.max$ substring$ 't :=
+ }
+ if$
+ }
+ while$
+}
+
+FUNCTION {format.date}
+{ year empty$
+ { month empty$
+ { "" }
+ { "there's a month but no year in " cite$ * warning$
+ month
+ }
+ if$
+ }
+ { month empty$
+ 'year
+ { month " " * year * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.btitle}
+{ title emphasize
+}
+
+FUNCTION {tie.or.space.connect}
+{ duplicate$ text.length$ #3 <
+ { "~" }
+ { " " }
+ if$
+ swap$ * *
+}
+
+FUNCTION {either.or.check}
+{ empty$
+ 'pop$
+ { "can't use both " swap$ * " fields in " * cite$ * warning$ }
+ if$
+}
+
+FUNCTION {format.bvolume}
+{ volume empty$
+ { "" }
+ { "volume" volume tie.or.space.connect
+ series empty$
+ 'skip$
+ { " of " * series emphasize * }
+ if$
+ "volume and number" number either.or.check
+ }
+ if$
+}
+
+FUNCTION {format.number.series}
+{ volume empty$
+ { number empty$
+ { series field.or.null }
+ { output.state mid.sentence =
+ { "number" }
+ { "Number" }
+ if$
+ number tie.or.space.connect
+ series empty$
+ { "there's a number but no series in " cite$ * warning$ }
+ { " in " * series * }
+ if$
+ }
+ if$
+ }
+ { "" }
+ if$
+}
+
+FUNCTION {format.edition}
+{ edition empty$
+ { "" }
+ { output.state mid.sentence =
+ { edition "l" change.case$ " edition" * }
+ { edition "t" change.case$ " edition" * }
+ if$
+ }
+ if$
+}
+
+INTEGERS { multiresult }
+
+FUNCTION {multi.page.check}
+{ 't :=
+ #0 'multiresult :=
+ { multiresult not
+ t empty$ not
+ and
+ }
+ { t #1 #1 substring$
+ duplicate$ "-" =
+ swap$ duplicate$ "," =
+ swap$ "+" =
+ or or
+ { #1 'multiresult := }
+ { t #2 global.max$ substring$ 't := }
+ if$
+ }
+ while$
+ multiresult
+}
+
+FUNCTION {format.pages}
+{ pages empty$
+ { "" }
+ { pages multi.page.check
+ { "pages" pages n.dashify tie.or.space.connect }
+ { "page" pages tie.or.space.connect }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.vol.num.pages}
+{ volume field.or.null
+ number empty$
+ 'skip$
+ { "(" number * ")" * *
+ volume empty$
+ { "there's a number but no volume in " cite$ * warning$ }
+ 'skip$
+ if$
+ }
+ if$
+ pages empty$
+ 'skip$
+ { duplicate$ empty$
+ { pop$ format.pages }
+ { ":" * pages n.dashify * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.chapter.pages}
+{ chapter empty$
+ 'format.pages
+ { type empty$
+ { "chapter" }
+ { type "l" change.case$ }
+ if$
+ chapter tie.or.space.connect
+ pages empty$
+ 'skip$
+ { ", " * format.pages * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.in.ed.booktitle}
+{ booktitle empty$
+ { "" }
+ { editor empty$
+ { "In " booktitle emphasize * }
+ { "In " format.editors * ", " * booktitle emphasize * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {empty.misc.check}
+{ author empty$ title empty$ howpublished empty$
+ month empty$ year empty$ note empty$
+ and and and and and
+ key empty$ not and
+ { "all relevant fields are empty in " cite$ * warning$ }
+ 'skip$
+ if$
+}
+
+FUNCTION {format.thesis.type}
+{ type empty$
+ 'skip$
+ { pop$
+ type "t" change.case$
+ }
+ if$
+}
+
+FUNCTION {format.tr.number}
+{ type empty$
+ { "Technical Report" }
+ 'type
+ if$
+ number empty$
+ { "t" change.case$ }
+ { number tie.or.space.connect }
+ if$
+}
+
+FUNCTION {format.article.crossref}
+{ key empty$
+ { journal empty$
+ { "need key or journal for " cite$ * " to crossref " * crossref *
+ warning$
+ ""
+ }
+ { "In {\em " journal * "\/}" * }
+ if$
+ }
+ { "In " key * }
+ if$
+ " \cite{" * crossref * "}" *
+}
+
+FUNCTION {format.crossref.editor}
+{ editor #1 "{vv~}{ll}" format.name$
+ editor num.names$ duplicate$
+ #2 >
+ { pop$ " et~al." * }
+ { #2 <
+ 'skip$
+ { editor #2 "{ff }{vv }{ll}{ jj}" format.name$ "others" =
+ { " et~al." * }
+ { " and " * editor #2 "{vv~}{ll}" format.name$ * }
+ if$
+ }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.book.crossref}
+{ volume empty$
+ { "empty volume in " cite$ * "'s crossref of " * crossref * warning$
+ "In "
+ }
+ { "Volume" volume tie.or.space.connect
+ " of " *
+ }
+ if$
+ editor empty$
+ editor field.or.null author field.or.null =
+ or
+ { key empty$
+ { series empty$
+ { "need editor, key, or series for " cite$ * " to crossref " *
+ crossref * warning$
+ "" *
+ }
+ { "{\em " * series * "\/}" * }
+ if$
+ }
+ { key * }
+ if$
+ }
+ { format.crossref.editor * }
+ if$
+ " \cite{" * crossref * "}" *
+}
+
+FUNCTION {format.incoll.inproc.crossref}
+{ editor empty$
+ editor field.or.null author field.or.null =
+ or
+ { key empty$
+ { booktitle empty$
+ { "need editor, key, or booktitle for " cite$ * " to crossref " *
+ crossref * warning$
+ ""
+ }
+ { "In {\em " booktitle * "\/}" * }
+ if$
+ }
+ { "In " key * }
+ if$
+ }
+ { "In " format.crossref.editor * }
+ if$
+ " \cite{" * crossref * "}" *
+}
+
+FUNCTION {article}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.title "title" output.check
+ new.block
+ crossref missing$
+ { journal emphasize "journal" output.check
+ format.vol.num.pages output
+ format.date "year" output.check
+ }
+ { format.article.crossref output.nonnull
+ format.pages output
+ }
+ if$
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {book}
+{ output.bibitem
+ author empty$
+ { format.editors "author and editor" output.check }
+ { format.authors output.nonnull
+ crossref missing$
+ { "author and editor" editor either.or.check }
+ 'skip$
+ if$
+ }
+ if$
+ new.block
+ format.btitle "title" output.check
+ crossref missing$
+ { format.bvolume output
+ new.block
+ format.number.series output
+ new.sentence
+ publisher "publisher" output.check
+ address output
+ }
+ { new.block
+ format.book.crossref output.nonnull
+ }
+ if$
+ format.edition output
+ format.date "year" output.check
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {booklet}
+{ output.bibitem
+ format.authors output
+ new.block
+ format.title "title" output.check
+ howpublished address new.block.checkb
+ howpublished output
+ address output
+ format.date output
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {inbook}
+{ output.bibitem
+ author empty$
+ { format.editors "author and editor" output.check }
+ { format.authors output.nonnull
+ crossref missing$
+ { "author and editor" editor either.or.check }
+ 'skip$
+ if$
+ }
+ if$
+ new.block
+ format.btitle "title" output.check
+ crossref missing$
+ { format.bvolume output
+ format.chapter.pages "chapter and pages" output.check
+ new.block
+ format.number.series output
+ new.sentence
+ publisher "publisher" output.check
+ address output
+ }
+ { format.chapter.pages "chapter and pages" output.check
+ new.block
+ format.book.crossref output.nonnull
+ }
+ if$
+ format.edition output
+ format.date "year" output.check
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {incollection}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.title "title" output.check
+ new.block
+ crossref missing$
+ { format.in.ed.booktitle "booktitle" output.check
+ format.bvolume output
+ format.number.series output
+ format.chapter.pages output
+ new.sentence
+ publisher "publisher" output.check
+ address output
+ format.edition output
+ format.date "year" output.check
+ }
+ { format.incoll.inproc.crossref output.nonnull
+ format.chapter.pages output
+ }
+ if$
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {inproceedings}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.title "title" output.check
+ new.block
+ crossref missing$
+ { format.in.ed.booktitle "booktitle" output.check
+ format.bvolume output
+ format.number.series output
+ format.pages output
+ address empty$
+ { organization publisher new.sentence.checkb
+ organization output
+ publisher output
+ format.date "year" output.check
+ }
+ { address output.nonnull
+ format.date "year" output.check
+ new.sentence
+ organization output
+ publisher output
+ }
+ if$
+ }
+ { format.incoll.inproc.crossref output.nonnull
+ format.pages output
+ }
+ if$
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {conference} { inproceedings }
+
+FUNCTION {manual}
+{ output.bibitem
+ author empty$
+ { organization empty$
+ 'skip$
+ { organization output.nonnull
+ address output
+ }
+ if$
+ }
+ { format.authors output.nonnull }
+ if$
+ new.block
+ format.btitle "title" output.check
+ author empty$
+ { organization empty$
+ { address new.block.checka
+ address output
+ }
+ 'skip$
+ if$
+ }
+ { organization address new.block.checkb
+ organization output
+ address output
+ }
+ if$
+ format.edition output
+ format.date output
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {mastersthesis}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.title "title" output.check
+ new.block
+ "Master's thesis" format.thesis.type output.nonnull
+ school "school" output.check
+ address output
+ format.date "year" output.check
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {misc}
+{ output.bibitem
+ format.authors output
+ title howpublished new.block.checkb
+ format.title output
+ howpublished new.block.checka
+ howpublished output
+ format.date output
+ new.block
+ note output
+ fin.entry
+ empty.misc.check
+}
+
+FUNCTION {phdthesis}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.btitle "title" output.check
+ new.block
+ "PhD thesis" format.thesis.type output.nonnull
+ school "school" output.check
+ address output
+ format.date "year" output.check
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {proceedings}
+{ output.bibitem
+ editor empty$
+ { organization output }
+ { format.editors output.nonnull }
+ if$
+ new.block
+ format.btitle "title" output.check
+ format.bvolume output
+ format.number.series output
+ address empty$
+ { editor empty$
+ { publisher new.sentence.checka }
+ { organization publisher new.sentence.checkb
+ organization output
+ }
+ if$
+ publisher output
+ format.date "year" output.check
+ }
+ { address output.nonnull
+ format.date "year" output.check
+ new.sentence
+ editor empty$
+ 'skip$
+ { organization output }
+ if$
+ publisher output
+ }
+ if$
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {techreport}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.title "title" output.check
+ new.block
+ format.tr.number output.nonnull
+ institution "institution" output.check
+ address output
+ format.date "year" output.check
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {unpublished}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.title "title" output.check
+ new.block
+ note "note" output.check
+ format.date output
+ fin.entry
+}
+
+FUNCTION {default.type} { misc }
+
+MACRO {jan} {"January"}
+
+MACRO {feb} {"February"}
+
+MACRO {mar} {"March"}
+
+MACRO {apr} {"April"}
+
+MACRO {may} {"May"}
+
+MACRO {jun} {"June"}
+
+MACRO {jul} {"July"}
+
+MACRO {aug} {"August"}
+
+MACRO {sep} {"September"}
+
+MACRO {oct} {"October"}
+
+MACRO {nov} {"November"}
+
+MACRO {dec} {"December"}
+
+MACRO {acmcs} {"ACM Computing Surveys"}
+
+MACRO {acta} {"Acta Informatica"}
+
+MACRO {cacm} {"Communications of the ACM"}
+
+MACRO {ibmjrd} {"IBM Journal of Research and Development"}
+
+MACRO {ibmsj} {"IBM Systems Journal"}
+
+MACRO {ieeese} {"IEEE Transactions on Software Engineering"}
+
+MACRO {ieeetc} {"IEEE Transactions on Computers"}
+
+MACRO {ieeetcad}
+ {"IEEE Transactions on Computer-Aided Design of Integrated Circuits"}
+
+MACRO {ipl} {"Information Processing Letters"}
+
+MACRO {jacm} {"Journal of the ACM"}
+
+MACRO {jcss} {"Journal of Computer and System Sciences"}
+
+MACRO {scp} {"Science of Computer Programming"}
+
+MACRO {sicomp} {"SIAM Journal on Computing"}
+
+MACRO {tocs} {"ACM Transactions on Computer Systems"}
+
+MACRO {tods} {"ACM Transactions on Database Systems"}
+
+MACRO {tog} {"ACM Transactions on Graphics"}
+
+MACRO {toms} {"ACM Transactions on Mathematical Software"}
+
+MACRO {toois} {"ACM Transactions on Office Information Systems"}
+
+MACRO {toplas} {"ACM Transactions on Programming Languages and Systems"}
+
+MACRO {tcs} {"Theoretical Computer Science"}
+
+READ
+
+FUNCTION {sortify}
+{ purify$
+ "l" change.case$
+}
+
+INTEGERS { len }
+
+FUNCTION {chop.word}
+{ 's :=
+ 'len :=
+ s #1 len substring$ =
+ { s len #1 + global.max$ substring$ }
+ 's
+ if$
+}
+
+FUNCTION {sort.format.names}
+{ 's :=
+ #1 'nameptr :=
+ ""
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ { nameptr #1 >
+ { " " * }
+ 'skip$
+ if$
+ s nameptr "{vv{ } }{ll{ }}{ ff{ }}{ jj{ }}" format.name$ 't :=
+ nameptr numnames = t "others" = and
+ { "et al" * }
+ { t sortify * }
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+}
+
+FUNCTION {sort.format.title}
+{ 't :=
+ "A " #2
+ "An " #3
+ "The " #4 t chop.word
+ chop.word
+ chop.word
+ sortify
+ #1 global.max$ substring$
+}
+
+FUNCTION {author.sort}
+{ author empty$
+ { key empty$
+ { "to sort, need author or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { author sort.format.names }
+ if$
+}
+
+FUNCTION {author.editor.sort}
+{ author empty$
+ { editor empty$
+ { key empty$
+ { "to sort, need author, editor, or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { editor sort.format.names }
+ if$
+ }
+ { author sort.format.names }
+ if$
+}
+
+FUNCTION {author.organization.sort}
+{ author empty$
+ { organization empty$
+ { key empty$
+ { "to sort, need author, organization, or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { "The " #4 organization chop.word sortify }
+ if$
+ }
+ { author sort.format.names }
+ if$
+}
+
+FUNCTION {editor.organization.sort}
+{ editor empty$
+ { organization empty$
+ { key empty$
+ { "to sort, need editor, organization, or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { "The " #4 organization chop.word sortify }
+ if$
+ }
+ { editor sort.format.names }
+ if$
+}
+
+FUNCTION {presort}
+{ type$ "book" =
+ type$ "inbook" =
+ or
+ 'author.editor.sort
+ { type$ "proceedings" =
+ 'editor.organization.sort
+ { type$ "manual" =
+ 'author.organization.sort
+ 'author.sort
+ if$
+ }
+ if$
+ }
+ if$
+ " "
+ *
+ year field.or.null sortify
+ *
+ " "
+ *
+ title field.or.null
+ sort.format.title
+ *
+ #1 entry.max$ substring$
+ 'sort.key$ :=
+}
+
+ITERATE {presort}
+
+SORT
+
+STRINGS { longest.label }
+
+INTEGERS { number.label longest.label.width }
+
+FUNCTION {initialize.longest.label}
+{ "" 'longest.label :=
+ #1 'number.label :=
+ #0 'longest.label.width :=
+}
+
+FUNCTION {longest.label.pass}
+{ number.label int.to.str$ 'label :=
+ number.label #1 + 'number.label :=
+ label width$ longest.label.width >
+ { label 'longest.label :=
+ label width$ 'longest.label.width :=
+ }
+ 'skip$
+ if$
+}
+
+EXECUTE {initialize.longest.label}
+
+ITERATE {longest.label.pass}
+
+FUNCTION {begin.bib}
+{ preamble$ empty$
+ 'skip$
+ { preamble$ write$ newline$ }
+ if$
+ "\begin{thebibliography}{" longest.label * "}" * write$ newline$
+}
+
+EXECUTE {begin.bib}
+
+EXECUTE {init.state.consts}
+
+ITERATE {call.type$}
+
+FUNCTION {end.bib}
+{ newline$
+ "\end{thebibliography}" write$ newline$
+}
+
+EXECUTE {end.bib}
diff --git a/biblio/bibtex/contrib/misc/apa.bst b/biblio/bibtex/contrib/misc/apa.bst
new file mode 100644
index 0000000000..783d423f61
--- /dev/null
+++ b/biblio/bibtex/contrib/misc/apa.bst
@@ -0,0 +1,1130 @@
+%%% ====================================================================
+%%% @BibTeX-style-file{
+%%% author = "Alan Rogers",
+%%% version = "1.1",
+%%% date = "June 27, 1992",
+%%% filename = "apa.bst",
+%%% address = "Dept of Anthropology, University of Utah,
+%%% Salt Lake City, UT 84112",
+%%% checksum = "21129 1130 3156 23582",
+%%% email = "rogers@anthro.utah.edu",
+%%% supported = "no",
+%%% docstring = "Adapted from apalike.bst.
+%%% Usage: \documentstyle[astron]{...}
+%%% ...
+%%% \bibliographystyle{apa}
+%%% ...
+%%% This file incorporates features of Sake J.
+%%% Hogeveen's `astron.bst' into`apalike.bst'.
+%%% The \documentstyle command above invokes
+%%% Hogeveen's `astron.sty', which must be in
+%%% TeX's search path.
+%%%
+%%% The modifications implement `\cite*{}', which
+%%% generates references in short form. For
+%%% example, `Rogers \cite*{...}' would produce
+%%% `Rogers (1992)'."
+%%% }
+%%% ====================================================================
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% BibTeX `apalike' bibliography style (24-Jan-88 version)
+% Adapted from the `alpha' style, version 0.99a; for BibTeX version 0.99a.
+% Copyright (C) 1988, all rights reserved.
+% Copying of this file is allowed, provided that if you make any changes at all
+% you name it something other than `apalike.bst'.
+% This restriction helps ensure that all copies are identical.
+% Differences between this style and `alpha' are generally heralded by a `%'.
+% The file btxbst.doc has the documentation for alpha.bst.
+%
+% This style should be used with the `apalike' LaTeX style (apalike.sty).
+% \cite's come out like "(Jones, 1986)" in the text but there are no labels
+% in the bibliography, and something like "(1986)" comes out immediately
+% after the author. Author (and editor) names appear as last name, comma,
+% initials. A `year' field is required for every entry, and so is either
+% an author (or in some cases, an editor) field or a key field.
+%
+% Editorial note:
+% Many journals require a style like `apalike', but I strongly, strongly,
+% strongly recommend that you not use it if you have a choice---use something
+% like `plain' instead. Mary-Claire van Leunen (A Handbook for Scholars,
+% Knopf, 1979) argues convincingly that a style like `plain' encourages better
+% writing than one like `apalike'. Furthermore the strongest arguments for
+% using an author-date style like `apalike'---that it's "the most practical"
+% (The Chicago Manual of Style, University of Chicago Press, thirteenth
+% edition, 1982, pages 400--401)---fall flat on their face with the new
+% computer-typesetting technology. For instance page 401 anachronistically
+% states "The chief disadvantage of [a style like `plain'] is that additions
+% or deletions cannot be made after the manuscript is typed without changing
+% numbers in both text references and list." LaTeX sidesteps the disadvantage.
+%
+% History:
+% 15-sep-86 (SK,OP) Original version, by Susan King and Oren Patashnik.
+% 10-nov-86 (OP) Truncated the sort.key$ string to the correct length
+% in bib.sort.order to eliminate error message.
+% 24-jan-88 (OP) Updated for BibTeX version 0.99a, from alpha.bst 0.99a;
+% apalike now sorts by author, then year, then title;
+% THIS `apalike' VERSION DOES NOT WORK WITH BIBTEX 0.98i.
+
+ENTRY
+ { address
+ author
+ booktitle
+ chapter
+ edition
+ editor
+ howpublished
+ institution
+ journal
+ key
+% month not used in apalike
+ note
+ number
+ organization
+ pages
+ publisher
+ school
+ series
+ title
+ type
+ volume
+ year
+ }
+ {}
+ { label extra.label sort.label }
+
+INTEGERS { output.state before.all mid.sentence after.sentence after.block }
+
+FUNCTION {init.state.consts}
+{ #0 'before.all :=
+ #1 'mid.sentence :=
+ #2 'after.sentence :=
+ #3 'after.block :=
+}
+
+STRINGS { s t }
+
+FUNCTION {output.nonnull}
+{ 's :=
+ output.state mid.sentence =
+ { ", " * write$ }
+ { output.state after.block =
+ { add.period$ write$
+ newline$
+ "\newblock " write$
+ }
+ { output.state before.all =
+ 'write$
+ { add.period$ " " * write$ }
+ if$
+ }
+ if$
+ mid.sentence 'output.state :=
+ }
+ if$
+ s
+}
+
+FUNCTION {output}
+{ duplicate$ empty$
+ 'pop$
+ 'output.nonnull
+ if$
+}
+
+FUNCTION {output.check}
+{ 't :=
+ duplicate$ empty$
+ { pop$ "empty " t * " in " * cite$ * warning$ }
+ 'output.nonnull
+ if$
+}
+
+% apalike needs this function because
+% the year has special punctuation;
+% apalike ignores the month
+FUNCTION {output.year.check}
+{ year empty$
+ { "empty year in " cite$ * warning$ }
+ { write$
+ " (" year * extra.label * ")" *
+ mid.sentence 'output.state :=
+ }
+ if$
+}
+
+FUNCTION {output.bibitem}
+{ newline$
+ "\bibitem[" write$
+ label write$
+ "]{" write$
+ cite$ write$
+ "}" write$
+ newline$
+ ""
+ before.all 'output.state :=
+}
+
+FUNCTION {fin.entry}
+{ add.period$
+ write$
+ newline$
+}
+
+FUNCTION {new.block}
+{ output.state before.all =
+ 'skip$
+ { after.block 'output.state := }
+ if$
+}
+
+FUNCTION {new.sentence}
+{ output.state after.block =
+ 'skip$
+ { output.state before.all =
+ 'skip$
+ { after.sentence 'output.state := }
+ if$
+ }
+ if$
+}
+
+FUNCTION {not}
+{ { #0 }
+ { #1 }
+ if$
+}
+
+FUNCTION {and}
+{ 'skip$
+ { pop$ #0 }
+ if$
+}
+
+FUNCTION {or}
+{ { pop$ #1 }
+ 'skip$
+ if$
+}
+
+FUNCTION {new.block.checkb}
+{ empty$
+ swap$ empty$
+ and
+ 'skip$
+ 'new.block
+ if$
+}
+
+FUNCTION {field.or.null}
+{ duplicate$ empty$
+ { pop$ "" }
+ 'skip$
+ if$
+}
+
+FUNCTION {emphasize}
+{ duplicate$ empty$
+ { pop$ "" }
+ { "{\em " swap$ * "}" * }
+ if$
+}
+
+INTEGERS { nameptr namesleft numnames }
+
+FUNCTION {format.names}
+{ 's :=
+ #1 'nameptr :=
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ { s nameptr "{vv~}{ll}{, jj}{, f.}" format.name$ 't := % last name first
+ nameptr #1 >
+ { namesleft #1 >
+ { ", " * t * }
+ { numnames #2 >
+ { "," * }
+ 'skip$
+ if$
+ t "others" =
+ { " et~al." * }
+ { " and " * t * }
+ if$
+ }
+ if$
+ }
+ 't
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+}
+
+FUNCTION {format.authors}
+{ author empty$
+ { "" }
+ { author format.names }
+ if$
+}
+
+FUNCTION {format.key} % this function is just for apalike
+{ empty$
+ { key field.or.null }
+ { "" }
+ if$
+}
+
+FUNCTION {format.editors}
+{ editor empty$
+ { "" }
+ { editor format.names
+ editor num.names$ #1 >
+ { ", editors" * }
+ { ", editor" * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.title}
+{ title empty$
+ { "" }
+ { title "t" change.case$ }
+ if$
+}
+
+FUNCTION {n.dashify}
+{ 't :=
+ ""
+ { t empty$ not }
+ { t #1 #1 substring$ "-" =
+ { t #1 #2 substring$ "--" = not
+ { "--" *
+ t #2 global.max$ substring$ 't :=
+ }
+ { { t #1 #1 substring$ "-" = }
+ { "-" *
+ t #2 global.max$ substring$ 't :=
+ }
+ while$
+ }
+ if$
+ }
+ { t #1 #1 substring$ *
+ t #2 global.max$ substring$ 't :=
+ }
+ if$
+ }
+ while$
+}
+
+FUNCTION {format.btitle}
+{ title emphasize
+}
+
+FUNCTION {tie.or.space.connect}
+{ duplicate$ text.length$ #3 <
+ { "~" }
+ { " " }
+ if$
+ swap$ * *
+}
+
+FUNCTION {either.or.check}
+{ empty$
+ 'pop$
+ { "can't use both " swap$ * " fields in " * cite$ * warning$ }
+ if$
+}
+
+FUNCTION {format.bvolume}
+{ volume empty$
+ { "" }
+ { "volume" volume tie.or.space.connect
+ series empty$
+ 'skip$
+ { " of " * series emphasize * }
+ if$
+ "volume and number" number either.or.check
+ }
+ if$
+}
+
+FUNCTION {format.number.series}
+{ volume empty$
+ { number empty$
+ { series field.or.null }
+ { output.state mid.sentence =
+ { "number" }
+ { "Number" }
+ if$
+ number tie.or.space.connect
+ series empty$
+ { "there's a number but no series in " cite$ * warning$ }
+ { " in " * series * }
+ if$
+ }
+ if$
+ }
+ { "" }
+ if$
+}
+
+FUNCTION {format.edition}
+{ edition empty$
+ { "" }
+ { output.state mid.sentence =
+ { edition "l" change.case$ " edition" * }
+ { edition "t" change.case$ " edition" * }
+ if$
+ }
+ if$
+}
+
+INTEGERS { multiresult }
+
+FUNCTION {multi.page.check}
+{ 't :=
+ #0 'multiresult :=
+ { multiresult not
+ t empty$ not
+ and
+ }
+ { t #1 #1 substring$
+ duplicate$ "-" =
+ swap$ duplicate$ "," =
+ swap$ "+" =
+ or or
+ { #1 'multiresult := }
+ { t #2 global.max$ substring$ 't := }
+ if$
+ }
+ while$
+ multiresult
+}
+
+FUNCTION {format.pages}
+{ pages empty$
+ { "" }
+ { pages multi.page.check
+ { "pages" pages n.dashify tie.or.space.connect }
+ { "page" pages tie.or.space.connect }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.vol.num.pages}
+{ volume field.or.null
+ number empty$
+ 'skip$
+ { "(" number * ")" * *
+ volume empty$
+ { "there's a number but no volume in " cite$ * warning$ }
+ 'skip$
+ if$
+ }
+ if$
+ pages empty$
+ 'skip$
+ { duplicate$ empty$
+ { pop$ format.pages }
+ { ":" * pages n.dashify * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.chapter.pages}
+{ chapter empty$
+ 'format.pages
+ { type empty$
+ { "chapter" }
+ { type "l" change.case$ }
+ if$
+ chapter tie.or.space.connect
+ pages empty$
+ 'skip$
+ { ", " * format.pages * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.in.ed.booktitle}
+{ booktitle empty$
+ { "" }
+ { editor empty$
+ { "In " booktitle emphasize * }
+ { "In " format.editors * ", " * booktitle emphasize * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.thesis.type}
+{ type empty$
+ 'skip$
+ { pop$
+ type "t" change.case$
+ }
+ if$
+}
+
+FUNCTION {format.tr.number}
+{ type empty$
+ { "Technical Report" }
+ 'type
+ if$
+ number empty$
+ { "t" change.case$ }
+ { number tie.or.space.connect }
+ if$
+}
+
+FUNCTION {format.article.crossref}
+{ "In" % this is for apalike
+ " \cite{" * crossref * "}" *
+}
+
+FUNCTION {format.book.crossref}
+{ volume empty$
+ { "empty volume in " cite$ * "'s crossref of " * crossref * warning$
+ "In "
+ }
+ { "Volume" volume tie.or.space.connect
+ " of " *
+ }
+ if$
+ "\cite{" * crossref * "}" * % this is for apalike
+}
+
+FUNCTION {format.incoll.inproc.crossref}
+{ "In" % this is for apalike
+ " \cite{" * crossref * "}" *
+}
+
+FUNCTION {article}
+{ output.bibitem
+ format.authors "author" output.check
+ author format.key output % special for
+ output.year.check % apalike
+ new.block
+ format.title "title" output.check
+ new.block
+ crossref missing$
+ { journal emphasize "journal" output.check
+ format.vol.num.pages output
+ }
+ { format.article.crossref output.nonnull
+ format.pages output
+ }
+ if$
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {book}
+{ output.bibitem
+ author empty$
+ { format.editors "author and editor" output.check
+ editor format.key output
+ }
+ { format.authors output.nonnull
+ crossref missing$
+ { "author and editor" editor either.or.check }
+ 'skip$
+ if$
+ }
+ if$
+ output.year.check % special for apalike
+ new.block
+ format.btitle "title" output.check
+ crossref missing$
+ { format.bvolume output
+ new.block
+ format.number.series output
+ new.sentence
+ publisher "publisher" output.check
+ address output
+ }
+ { new.block
+ format.book.crossref output.nonnull
+ }
+ if$
+ format.edition output
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {booklet}
+{ output.bibitem
+ format.authors output
+ author format.key output % special for
+ output.year.check % apalike
+ new.block
+ format.title "title" output.check
+ new.block
+ howpublished output
+ address output
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {inbook}
+{ output.bibitem
+ author empty$
+ { format.editors "author and editor" output.check
+ editor format.key output
+ }
+ { format.authors output.nonnull
+ crossref missing$
+ { "author and editor" editor either.or.check }
+ 'skip$
+ if$
+ }
+ if$
+ output.year.check % special for apalike
+ new.block
+ format.btitle "title" output.check
+ crossref missing$
+ { format.bvolume output
+ format.chapter.pages "chapter and pages" output.check
+ new.block
+ format.number.series output
+ new.sentence
+ publisher "publisher" output.check
+ address output
+ }
+ { format.chapter.pages "chapter and pages" output.check
+ new.block
+ format.book.crossref output.nonnull
+ }
+ if$
+ format.edition output
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {incollection}
+{ output.bibitem
+ format.authors "author" output.check
+ author format.key output % special for
+ output.year.check % apalike
+ new.block
+ format.title "title" output.check
+ new.block
+ crossref missing$
+ { format.in.ed.booktitle "booktitle" output.check
+ format.bvolume output
+ format.number.series output
+ format.chapter.pages output
+ new.sentence
+ publisher "publisher" output.check
+ address output
+ format.edition output
+ }
+ { format.incoll.inproc.crossref output.nonnull
+ format.chapter.pages output
+ }
+ if$
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {inproceedings}
+{ output.bibitem
+ format.authors "author" output.check
+ author format.key output % special for
+ output.year.check % apalike
+ new.block
+ format.title "title" output.check
+ new.block
+ crossref missing$
+ { format.in.ed.booktitle "booktitle" output.check
+ format.bvolume output
+ format.number.series output
+ format.pages output
+ address output % for apalike
+ new.sentence % there's no year
+ organization output % here so things
+ publisher output % are simpler
+ }
+ { format.incoll.inproc.crossref output.nonnull
+ format.pages output
+ }
+ if$
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {conference} { inproceedings }
+
+FUNCTION {manual}
+{ output.bibitem
+ format.authors output
+ author format.key output % special for
+ output.year.check % apalike
+ new.block
+ format.btitle "title" output.check
+ organization address new.block.checkb
+ organization output
+ address output
+ format.edition output
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {mastersthesis}
+{ output.bibitem
+ format.authors "author" output.check
+ author format.key output % special for
+ output.year.check % apalike
+ new.block
+ format.title "title" output.check
+ new.block
+ "Master's thesis" format.thesis.type output.nonnull
+ school "school" output.check
+ address output
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {misc}
+{ output.bibitem
+ format.authors output
+ author format.key output % special for
+ output.year.check % apalike
+ new.block
+ format.title output
+ new.block
+ howpublished output
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {phdthesis}
+{ output.bibitem
+ format.authors "author" output.check
+ author format.key output % special for
+ output.year.check % apalike
+ new.block
+ format.btitle "title" output.check
+ new.block
+ "PhD thesis" format.thesis.type output.nonnull
+ school "school" output.check
+ address output
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {proceedings}
+{ output.bibitem
+ format.editors output
+ editor format.key output % special for
+ output.year.check % apalike
+ new.block
+ format.btitle "title" output.check
+ format.bvolume output
+ format.number.series output
+ address output % for apalike
+ new.sentence % we always output
+ organization output % a nonempty organization
+ publisher output % here
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {techreport}
+{ output.bibitem
+ format.authors "author" output.check
+ author format.key output % special for
+ output.year.check % apalike
+ new.block
+ format.title "title" output.check
+ new.block
+ format.tr.number output.nonnull
+ institution "institution" output.check
+ address output
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {unpublished}
+{ output.bibitem
+ format.authors "author" output.check
+ author format.key output % special for
+ output.year.check % apalike
+ new.block
+ format.title "title" output.check
+ new.block
+ note "note" output.check
+ fin.entry
+}
+
+FUNCTION {default.type} { misc }
+
+MACRO {jan} {"January"}
+
+MACRO {feb} {"February"}
+
+MACRO {mar} {"March"}
+
+MACRO {apr} {"April"}
+
+MACRO {may} {"May"}
+
+MACRO {jun} {"June"}
+
+MACRO {jul} {"July"}
+
+MACRO {aug} {"August"}
+
+MACRO {sep} {"September"}
+
+MACRO {oct} {"October"}
+
+MACRO {nov} {"November"}
+
+MACRO {dec} {"December"}
+
+MACRO {acmcs} {"ACM Computing Surveys"}
+
+MACRO {acta} {"Acta Informatica"}
+
+MACRO {cacm} {"Communications of the ACM"}
+
+MACRO {ibmjrd} {"IBM Journal of Research and Development"}
+
+MACRO {ibmsj} {"IBM Systems Journal"}
+
+MACRO {ieeese} {"IEEE Transactions on Software Engineering"}
+
+MACRO {ieeetc} {"IEEE Transactions on Computers"}
+
+MACRO {ieeetcad}
+ {"IEEE Transactions on Computer-Aided Design of Integrated Circuits"}
+
+MACRO {ipl} {"Information Processing Letters"}
+
+MACRO {jacm} {"Journal of the ACM"}
+
+MACRO {jcss} {"Journal of Computer and System Sciences"}
+
+MACRO {scp} {"Science of Computer Programming"}
+
+MACRO {sicomp} {"SIAM Journal on Computing"}
+
+MACRO {tocs} {"ACM Transactions on Computer Systems"}
+
+MACRO {tods} {"ACM Transactions on Database Systems"}
+
+MACRO {tog} {"ACM Transactions on Graphics"}
+
+MACRO {toms} {"ACM Transactions on Mathematical Software"}
+
+MACRO {toois} {"ACM Transactions on Office Information Systems"}
+
+MACRO {toplas} {"ACM Transactions on Programming Languages and Systems"}
+
+MACRO {tcs} {"Theoretical Computer Science"}
+
+READ
+
+FUNCTION {sortify}
+{ purify$
+ "l" change.case$
+}
+
+INTEGERS { len }
+
+FUNCTION {chop.word}
+{ 's :=
+ 'len :=
+ s #1 len substring$ =
+ { s len #1 + global.max$ substring$ }
+ 's
+ if$
+}
+
+% There are three apalike cases: one person (Jones),
+% two (Jones and de~Bruijn), and more (Jones et~al.).
+% This function is much like format.crossref.editors.
+%
+FUNCTION {format.lab.names}
+{ 's :=
+ s #1 "{vv~}{ll}" format.name$
+ s num.names$ duplicate$
+ #2 >
+ { pop$ " et~al." * }
+ { #2 <
+ 'skip$
+ { s #2 "{ff }{vv }{ll}{ jj}" format.name$ "others" =
+ { " et~al." * }
+ { " and " * s #2 "{vv~}{ll}" format.name$ * }
+ if$
+ }
+ if$
+ }
+ if$
+}
+
+FUNCTION {author.key.label}
+{ author empty$
+ { key empty$
+ { cite$ #1 #3 substring$ }
+ 'key % apalike uses the whole key
+ if$
+ }
+ { author format.lab.names }
+ if$
+}
+
+FUNCTION {author.editor.key.label}
+{ author empty$
+ { editor empty$
+ { key empty$
+ { cite$ #1 #3 substring$ }
+ 'key % apalike uses the whole key
+ if$
+ }
+ { editor format.lab.names }
+ if$
+ }
+ { author format.lab.names }
+ if$
+}
+
+FUNCTION {editor.key.label}
+{ editor empty$
+ { key empty$
+ { cite$ #1 #3 substring$ }
+ 'key % apalike uses the whole key, no organization
+ if$
+ }
+ { editor format.lab.names }
+ if$
+}
+
+FUNCTION {calc.label} % this function came from ASTRON.BST (ARR)
+{ type$ "book" =
+ type$ "inbook" =
+ or
+ 'author.editor.key.label
+ { type$ "proceedings" =
+ 'editor.key.label % apalike ignores organization
+ 'author.key.label % for labeling and sorting
+ if$
+ }
+ if$
+ "\protect\astroncite{" swap$ * "}{" % these three lines are
+ * % for apalike, which
+ year field.or.null purify$ #-1 #4 substring$ % uses all four digits
+ * % the mathing closing "}" comes in at the reverse.pass
+ 'label :=
+}
+
+FUNCTION {sort.format.names}
+{ 's :=
+ #1 'nameptr :=
+ ""
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ { nameptr #1 >
+ { " " * }
+ 'skip$
+ if$ % apalike uses initials
+ s nameptr "{vv{ } }{ll{ }}{ f{ }}{ jj{ }}" format.name$ 't := % <= here
+ nameptr numnames = t "others" = and
+ { "et al" * }
+ { t sortify * }
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+}
+
+FUNCTION {sort.format.title}
+{ 't :=
+ "A " #2
+ "An " #3
+ "The " #4 t chop.word
+ chop.word
+ chop.word
+ sortify
+ #1 global.max$ substring$
+}
+
+FUNCTION {author.sort}
+{ author empty$
+ { key empty$
+ { "to sort, need author or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { author sort.format.names }
+ if$
+}
+
+FUNCTION {author.editor.sort}
+{ author empty$
+ { editor empty$
+ { key empty$
+ { "to sort, need author, editor, or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { editor sort.format.names }
+ if$
+ }
+ { author sort.format.names }
+ if$
+}
+
+FUNCTION {editor.sort}
+{ editor empty$
+ { key empty$
+ { "to sort, need editor or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { editor sort.format.names }
+ if$
+}
+
+% apalike uses two sorting passes; the first one sets the
+% labels so that the `a's, `b's, etc. can be computed;
+% the second pass puts the references in "correct" order.
+% The presort function is for the first pass. It computes
+% label, sort.label, and title, and then concatenates.
+FUNCTION {presort}
+{ calc.label
+ label sortify
+ " "
+ *
+ type$ "book" =
+ type$ "inbook" =
+ or
+ 'author.editor.sort
+ { type$ "proceedings" =
+ 'editor.sort
+ 'author.sort
+ if$
+ }
+ if$
+ #1 entry.max$ substring$ % for
+ 'sort.label := % apalike
+ sort.label % style
+ *
+ " "
+ *
+ title field.or.null
+ sort.format.title
+ *
+ #1 entry.max$ substring$
+ 'sort.key$ :=
+}
+
+ITERATE {presort}
+
+SORT % by label, sort.label, title---for final label calculation
+
+STRINGS { last.label next.extra } % apalike labels are only for the text;
+
+INTEGERS { last.extra.num } % there are none in the bibliography
+
+FUNCTION {initialize.extra.label.stuff} % and hence there is no `longest.label'
+{ #0 int.to.chr$ 'last.label :=
+ "" 'next.extra :=
+ #0 'last.extra.num :=
+}
+
+FUNCTION {forward.pass}
+{ last.label label =
+ { last.extra.num #1 + 'last.extra.num :=
+ last.extra.num int.to.chr$ 'extra.label :=
+ }
+ { "a" chr.to.int$ 'last.extra.num :=
+ "" 'extra.label :=
+ label 'last.label :=
+ }
+ if$
+}
+
+FUNCTION {reverse.pass} % this function came from ASTRON.BST (ARR)
+{ next.extra "b" =
+ { "a" 'extra.label := }
+ 'skip$
+ if$
+ label extra.label * "}" * 'label :=
+ extra.label 'next.extra :=
+}
+
+EXECUTE {initialize.extra.label.stuff}
+
+ITERATE {forward.pass}
+
+REVERSE {reverse.pass}
+
+% Now that the label is right we sort for real,
+% on sort.label then year then title. This is
+% for the second sorting pass.
+FUNCTION {bib.sort.order}
+{ sort.label
+ " "
+ *
+ year field.or.null sortify
+ *
+ " "
+ *
+ title field.or.null
+ sort.format.title
+ *
+ #1 entry.max$ substring$
+ 'sort.key$ :=
+}
+
+ITERATE {bib.sort.order}
+
+SORT % by sort.label, year, title---giving final bibliography order
+
+FUNCTION {begin.bib}
+{ preamble$ empty$ % no \etalchar in apalike
+ 'skip$
+ { preamble$ write$ newline$ }
+ if$
+ "\begin{thebibliography}{}" write$ newline$ % no labels in apalike
+}
+
+EXECUTE {begin.bib}
+
+EXECUTE {init.state.consts}
+
+ITERATE {call.type$}
+
+FUNCTION {end.bib}
+{ newline$
+ "\end{thebibliography}" write$ newline$
+}
+
+EXECUTE {end.bib}
diff --git a/biblio/bibtex/contrib/misc/apasoft.bst b/biblio/bibtex/contrib/misc/apasoft.bst
new file mode 100644
index 0000000000..03cb405916
--- /dev/null
+++ b/biblio/bibtex/contrib/misc/apasoft.bst
@@ -0,0 +1,1225 @@
+% BibTeX `apa' bibliography style (12-sep-98 version)
+% Adapted from the `apalike' style, version 0.99a; for BibTeX version 0.99a.
+% Copying of this file is allowed, provided that if you make any changes at all
+% you name it something other than `apa.bst'.
+% This restriction helps ensure that all copies are identical.
+%
+% This style should be used with the `apalike' LaTeX style (apalike.sty).
+% \cite's come out like "(Jones, 1986)" in the text but there are no labels
+% in the bibliography, and something like "(1986)" comes out immediately
+% after the author. Author (and editor) names appear as last name, comma,
+% initials. A `year' field is required for every entry, and so is either
+% an author (or in some cases, an editor) field or a key field.
+%
+%
+% This style is used in the master-thesis of Sonja Weiblen in psychology.
+% I use this style also in my master-thesis in communication-science.
+% I hope, that other people in the "soft-sciences" use this style and
+% help to improve it.
+% Bernd Porr (porr@neurop2.ruhr-uni-bochum.de)
+%
+%
+%
+% History:
+% 15-sep-86 (SK,OP) Original version, by Susan King and Oren Patashnik.
+% 10-nov-86 (OP) Truncated the sort.key$ string to the correct length
+% in bib.sort.order to eliminate error message.
+% 24-jan-88 (OP) Updated for BibTeX version 0.99a, from alpha.bst 0.99a;
+% apalike now sorts by author, then year, then title;
+% THIS `apalike' VERSION DOES NOT WORK WITH BIBTEX 0.98i.
+% 15-feb-92 (MW) Updated for use with `bibgerman.sty': things like "and"
+% change with the language. Switch the language using the
+% language field:
+% language = "german" | "USenglish" | "english"
+% Then a `\selectlanguage{...}' command will be pushed just
+% before the `\bibitem...' command for the entry in work.
+% 12-sep-98 (BP) - Editors in braces: Dolittle, D. (Edit.)
+% - Change of the position of country and publisher:
+% e.g.: New York: McGraw-Hill.
+% the publisher has always the last position.
+% - All authors are in inverse order:
+% e.g.: Yussen, S.R., and Kane, P. (1935).
+% - Volume with ",":
+% e.g.: J.exp.psych, 18, 451-460.
+
+
+ENTRY
+ { address
+ author
+ booktitle
+ chapter
+ citelabel
+ edition
+ editor
+ howpublished
+ institution
+ journal
+ key
+ language
+% month not used in apalike
+ note
+ number
+ organization
+ pages
+ publisher
+ school
+ series
+ title
+ type
+ volume
+ year
+ }
+ {}
+ { label extra.label sort.label }
+
+INTEGERS { output.state before.all mid.sentence after.sentence after.block before.title after.address}
+
+STRINGS { s t language.state language.temp }
+
+FUNCTION {init.state.consts}
+{ #0 'before.all :=
+ #1 'mid.sentence :=
+ #2 'after.sentence :=
+ #3 'after.block :=
+ #4 'after.address :=
+ "nostate" 'language.state :=
+}
+
+FUNCTION {language.state.test}
+{
+ 'language.temp :=
+ language.temp language.state =
+ { #1 }
+ { #0 }
+ if$
+}
+
+FUNCTION {output.nonnull}
+{ 's :=
+ output.state mid.sentence =
+ { ", " * write$ }
+ { output.state after.block =
+ { add.period$ write$
+ newline$
+ "\newblock " write$
+ }
+ { output.state before.all =
+ 'write$
+ % next if is for use with `new' FUNCTION {after.authors}
+ { output.state after.address =
+ { ": " * write$ }
+ { add.period$ " " * write$ }
+ if$
+ }
+ if$
+ }
+ if$
+ mid.sentence 'output.state :=
+ }
+ if$
+ s
+}
+
+FUNCTION {output}
+{ duplicate$ empty$
+ 'pop$
+ 'output.nonnull
+ if$
+}
+
+FUNCTION {output.check}
+{ 't :=
+ duplicate$ empty$
+ { pop$ "empty " t * " in " * cite$ * warning$ }
+ 'output.nonnull
+ if$
+}
+
+% apalike needs this function because
+% the year has special punctuation;
+% apalike ignores the month
+FUNCTION {output.year.check}
+{ year empty$
+ { "empty year in " cite$ * warning$ }
+ { write$
+ "\ (" year * extra.label * ")" *
+ mid.sentence 'output.state :=
+ }
+ if$
+}
+
+FUNCTION {output.bibitem}
+{ newline$
+ language empty$
+ 'skip$
+ { language.state language =
+ 'skip$
+ { "\selectlanguage{\" language * "}" * write$
+ newline$
+ }
+ if$
+ language 'language.state :=
+ }
+ if$
+ "\bibitem[" write$
+ label write$
+ "]{" write$
+ cite$ write$
+ "}" write$
+ newline$
+ ""
+ before.all 'output.state :=
+}
+
+FUNCTION {fin.entry}
+{ add.period$
+ write$
+ newline$
+}
+
+FUNCTION {new.block}
+{ output.state before.all =
+ 'skip$
+ { after.block 'output.state := }
+ if$
+}
+
+% new one -> sets what is specified in FUNCTION {output.nonnull}
+% if `before.title 'output.state = ... if$' is true
+FUNCTION {before.publisher}
+{ after.address 'output.state :=
+}
+
+% original -> sets points after (year) and before title
+FUNCTION {after.authors}
+{ new.block }
+
+FUNCTION {new.sentence}
+{ output.state after.block =
+ 'skip$
+ { output.state before.all =
+ 'skip$
+ { after.sentence 'output.state := }
+ if$
+ }
+ if$
+}
+
+FUNCTION {not}
+{ { #0 }
+ { #1 }
+ if$
+}
+
+FUNCTION {and}
+{ 'skip$
+ { pop$ #0 }
+ if$
+}
+
+FUNCTION {or}
+{ { pop$ #1 }
+ 'skip$
+ if$
+}
+
+FUNCTION {new.block.checkb}
+{ empty$
+ swap$ empty$
+ and
+ 'skip$
+ 'new.block
+ if$
+}
+
+FUNCTION {field.or.null}
+{ duplicate$ empty$
+ { pop$ "" }
+ 'skip$
+ if$
+}
+
+FUNCTION {emphasize}
+{ duplicate$ empty$
+ { pop$ "" }
+ { "{\em " swap$ * "\/}" * }
+ if$
+}
+
+FUNCTION {smallcaps}
+{ duplicate$ empty$
+ { pop$ "" }
+ { "{\sc " swap$ * "}" * }
+ if$
+}
+
+INTEGERS { nameptr namesleft numnames }
+
+FUNCTION {format.names}
+{ 's :=
+ #1 'nameptr :=
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ { s nameptr "{vv~}{ll}{, jj}{, f.}" format.name$ 't := % last name first
+ nameptr #1 >
+ { namesleft #1 >
+ { ", " * t * }
+ { numnames #2 >
+ { "," * }
+ 'skip$
+ if$
+ t "others" =
+ { " et~al." * }
+ { " und " * t * }
+ if$
+ }
+ if$
+ }
+ 't
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+}
+
+
+FUNCTION {format.authors}
+{ author empty$
+ { "" }
+ { author format.names }
+ if$
+}
+
+FUNCTION {format.key} % this function is just for apalike
+{ empty$
+ { key field.or.null
+ duplicate$ empty$
+ 'skip$
+ { smallcaps }
+ if$
+ }
+ { "" }
+ if$
+}
+
+FUNCTION {format.editors}
+{ editor empty$
+ { "" }
+ { editor format.names
+ editor num.names$ #1 >
+ { " (\btxeditorsshort{.})" * }
+ { " (\btxeditorshort{.})" * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.title}
+{ title empty$
+ { "" }
+ { "english" language.state.test
+ "USenglish" language.state.test
+ or
+ { title "t" change.case$ emphasize }
+ { title emphasize }
+ if$
+ }
+ if$
+}
+
+FUNCTION {n.dashify}
+{ 't :=
+ ""
+ { t empty$ not }
+ { t #1 #1 substring$ "-" =
+ { t #1 #2 substring$ "--" = not
+ { "--" *
+ t #2 global.max$ substring$ 't :=
+ }
+ { { t #1 #1 substring$ "-" = }
+ { "-" *
+ t #2 global.max$ substring$ 't :=
+ }
+ while$
+ }
+ if$
+ }
+ { t #1 #1 substring$ *
+ t #2 global.max$ substring$ 't :=
+ }
+ if$
+ }
+ while$
+}
+
+FUNCTION {format.btitle}
+{ title emphasize
+}
+
+FUNCTION {tie.or.space.connect}
+{ duplicate$ text.length$ #3 <
+ { "~" }
+ { "\ " }
+ if$
+ swap$ * *
+}
+
+FUNCTION {either.or.check}
+{ empty$
+ 'pop$
+ { "can't use both " swap$ * " fields in " * cite$ * warning$ }
+ if$
+}
+
+FUNCTION {format.bvolume}
+{ volume empty$
+ { "" }
+ { output.state after.block =
+ { "\Btxvolumeshort{.}" }
+ { "\btxvolumeshort{.}" }
+ if$
+ volume tie.or.space.connect
+ series empty$
+ 'skip$
+ { " \btxofseriesshort{.}\ " * series emphasize * }
+ if$
+ "volume and number" number either.or.check
+ }
+ if$
+}
+
+FUNCTION {format.number.series}
+{ volume empty$
+ { number empty$
+ { series field.or.null }
+ { output.state mid.sentence =
+ { "\btxnumbershort{.}" }
+ { "\Btxnumbershort{.}" }
+ if$
+ number tie.or.space.connect
+ series empty$
+ { "there's a number but no series in " cite$ * warning$ }
+ { " \btxinseriesshort{.}\ " * series emphasize * }
+ if$
+ }
+ if$
+ }
+ { "" }
+ if$
+}
+
+FUNCTION {format.edition}
+{ edition empty$
+ { "" }
+ { "english" language.state.test
+ "USenglish" language.state.test
+ or
+ { output.state mid.sentence =
+ { edition "l" change.case$ " \btxeditionshort{.}" * }
+ { edition "t" change.case$ " \btxeditionshort{.}" * }
+ if$
+ }
+ { edition " \btxeditionshort{.}" * }
+ if$
+ }
+ if$
+}
+
+INTEGERS { multiresult }
+
+FUNCTION {multi.page.check}
+{ 't :=
+ #0 'multiresult :=
+ { multiresult not
+ t empty$ not
+ and
+ }
+ { t #1 #1 substring$
+ duplicate$ "-" =
+ swap$ duplicate$ "," =
+ swap$ "+" =
+ or or
+ { #1 'multiresult := }
+ { t #2 global.max$ substring$ 't := }
+ if$
+ }
+ while$
+ multiresult
+}
+
+FUNCTION {format.pages}
+{ pages empty$
+ { "" }
+ { pages multi.page.check
+ { "\btxpagesshort{.}" pages n.dashify tie.or.space.connect }
+ { "\btxpageshort{.}" pages tie.or.space.connect }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.vol.num.pages}
+{ volume field.or.null
+ number empty$
+ 'skip$
+ { "(" number * ")" * *
+ volume empty$
+ { "there's a number but no volume in " cite$ * warning$ }
+ 'skip$
+ if$
+ }
+ if$
+ pages empty$
+ 'skip$
+ { duplicate$ empty$
+ { pop$ format.pages }
+ { ", " * pages n.dashify * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.chapter.pages}
+{ chapter empty$
+ 'format.pages
+ { type empty$
+ { "\btxchaptershort{.}" }
+ { "english" language.state.test
+ "USenglish" language.state.test
+ or
+ { type "l" change.case$ }
+ { type }
+ if$
+ }
+ if$
+ chapter tie.or.space.connect
+ pages empty$
+ 'skip$
+ { ", " * format.pages * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.in.ed.booktitle}
+{ booktitle empty$
+ { "" }
+ { editor empty$
+ { "\Btxinshort{.}\ " booktitle emphasize * }
+ { "\Btxinshort{.}\ " format.editors * ": " * booktitle emphasize * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.thesis.type}
+{ type empty$
+ 'skip$
+ { pop$
+ "english" language.state.test
+ "USenglish" language.state.test
+ or
+ { type "t" change.case$ }
+ { type }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.tr.number}
+{ type empty$
+ { "\Btxtechreplong{.}" }
+ 'type
+ if$
+ number empty$
+ { "english" language.state.test
+ "USenglish" language.state.test
+ or
+ { type empty$
+ { pop$ "\btxtechreplong{.}" }
+ { "t" change.case$ }
+ if$
+ }
+ 'skip$
+ if$
+ }
+ { number tie.or.space.connect }
+ if$
+}
+
+FUNCTION {format.article.crossref}
+{ "In" % this is for apalike
+ " \cite{" * crossref * "}" *
+}
+
+FUNCTION {format.book.crossref}
+{ volume empty$
+ { "empty volume in " cite$ * "'s crossref of " * crossref * warning$
+ "\Btxinshort{.}\ "
+ }
+ { "\Btxvolumeshort{.}" volume tie.or.space.connect
+ " \btxofseriesshort{.}\ " *
+ }
+ if$
+ "\cite{" * crossref * "}" * % this is for apalike
+}
+
+FUNCTION {format.incoll.inproc.crossref}
+{ "\Btxinshort{.}\ " % this is for apalike
+ "\cite{" * crossref * "}" *
+}
+
+FUNCTION {article}
+{ output.bibitem
+ format.authors "author" output.check
+ author format.key output % special for
+ output.year.check % apalike
+ after.authors
+ format.title "title" output.check
+ new.block
+ crossref missing$
+ { journal
+ title missing$
+ { emphasize }
+ 'skip$
+ if$
+ "journal" output.check
+ format.vol.num.pages output
+ }
+ { format.article.crossref output.nonnull
+ format.pages output
+ }
+ if$
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {book}
+{ output.bibitem
+ author empty$
+ { format.editors "author and editor" output.check
+ editor format.key output
+ }
+ { format.authors output.nonnull
+ crossref missing$
+ { "author and editor" editor either.or.check }
+ 'skip$
+ if$
+ }
+ if$
+ output.year.check % special for apalike
+ after.authors
+ format.btitle "title" output.check
+ crossref missing$
+ { format.bvolume output
+ new.block
+ format.number.series output
+ new.sentence
+ address output
+ before.publisher
+ publisher "publisher" output.check
+ }
+ { new.block
+ format.book.crossref output.nonnull
+ }
+ if$
+ format.edition output
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {booklet}
+{ output.bibitem
+ format.authors output
+ author format.key output % special for
+ output.year.check % apalike
+ after.authors
+ format.title "title" output.check
+ new.block
+ howpublished output
+ address output
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {inbook}
+{ output.bibitem
+ author empty$
+ { format.editors "author and editor" output.check
+ editor format.key output
+ }
+ { format.authors output.nonnull
+ crossref missing$
+ { "author and editor" editor either.or.check }
+ 'skip$
+ if$
+ }
+ if$
+ output.year.check % special for apalike
+ after.authors
+ format.btitle "title" output.check
+ crossref missing$
+ { format.bvolume output
+ format.chapter.pages "chapter and pages" output.check
+ new.block
+ format.number.series output
+ new.sentence
+ address output
+ before.publisher
+ publisher "publisher" output.check
+ }
+ { format.chapter.pages "chapter and pages" output.check
+ new.block
+ format.book.crossref output.nonnull
+ }
+ if$
+ format.edition output
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {incollection}
+{ output.bibitem
+ format.authors "author" output.check
+ author format.key output % special for
+ output.year.check % apalike
+ after.authors
+ format.title "title" output.check
+ new.block
+ crossref missing$
+ { format.in.ed.booktitle "booktitle" output.check
+ format.bvolume output
+ format.number.series output
+ format.chapter.pages output
+ new.sentence
+ address output
+ before.publisher
+ publisher "publisher" output.check
+ format.edition output
+ }
+ { format.incoll.inproc.crossref output.nonnull
+ format.chapter.pages output
+ }
+ if$
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {inproceedings}
+{ output.bibitem
+ format.authors "author" output.check
+ author format.key output % special for
+ output.year.check % apalike
+ after.authors
+ format.title "title" output.check
+ new.block
+ crossref missing$
+ { format.in.ed.booktitle "booktitle" output.check
+ format.bvolume output
+ format.number.series output
+ format.pages output
+ address output % for apalike
+ new.sentence % there's no year
+ organization output % here so things
+ before.publisher
+ publisher output % are simpler
+ }
+ { format.incoll.inproc.crossref output.nonnull
+ format.pages output
+ }
+ if$
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {conference} { inproceedings }
+
+FUNCTION {manual}
+{ output.bibitem
+ format.authors output
+ author format.key output % special for
+ output.year.check % apalike
+ after.authors
+ format.btitle "title" output.check
+ organization address new.block.checkb
+ organization output
+ address output
+ format.edition output
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {mastersthesis}
+{ output.bibitem
+ format.authors "author" output.check
+ author format.key output % special for
+ output.year.check % apalike
+ after.authors
+ format.title "title" output.check
+ new.block
+ "\btxmastthesis{.}" format.thesis.type output.nonnull
+ school "school" output.check
+ address output
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {misc}
+{ output.bibitem
+ format.authors output
+ author format.key output % special for
+ output.year.check % apalike
+ after.authors
+ format.title output
+ new.block
+ howpublished output
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {phdthesis}
+{ output.bibitem
+ format.authors "author" output.check
+ author format.key output % special for
+ output.year.check % apalike
+ after.authors
+ format.btitle "title" output.check
+ new.block
+ "\btxphdthesis{.}" format.thesis.type output.nonnull
+ school "school" output.check
+ address output
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {proceedings}
+{ output.bibitem
+ format.editors output
+ editor format.key output % special for
+ output.year.check % apalike
+ after.authors
+ format.btitle "title" output.check
+ format.bvolume output
+ format.number.series output
+ address output % for apalike
+ new.sentence % we always output
+ organization output % a nonempty organization
+ before.publisher
+ publisher output % here
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {techreport}
+{ output.bibitem
+ format.authors "author" output.check
+ author format.key output % special for
+ output.year.check % apalike
+ after.authors
+ format.title "title" output.check
+ new.block
+ format.tr.number output.nonnull
+ institution "institution" output.check
+ address output
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {unpublished}
+{ output.bibitem
+ format.authors "author" output.check
+ author format.key output % special for
+ output.year.check % apalike
+ after.authors
+ format.title "title" output.check
+ new.block
+ note "note" output.check
+ fin.entry
+}
+
+FUNCTION {default.type} { misc }
+
+MACRO {jan} {"\btxmonjanshort{.}"}
+
+MACRO {feb} {"\btxmonfebshort{.}"}
+
+MACRO {mar} {"\btxmonmarshort{.}"}
+
+MACRO {apr} {"\btxmonaprshort{.}"}
+
+MACRO {may} {"\btxmonmayshort{.}"}
+
+MACRO {jun} {"\btxmonjunshort{.}"}
+
+MACRO {jul} {"\btxmonjulshort{.}"}
+
+MACRO {aug} {"\btxmonaugshort{.}"}
+
+MACRO {sep} {"\btxmonsepshort{.}"}
+
+MACRO {oct} {"\btxmonoctshort{.}"}
+
+MACRO {nov} {"\btxmonnovshort{.}"}
+
+MACRO {dec} {"\btxmondecshort{.}"}
+
+MACRO {acmcs} {"ACM Computing Surveys"}
+
+MACRO {acta} {"Acta Informatica"}
+
+MACRO {cacm} {"Communications of the ACM"}
+
+MACRO {ibmjrd} {"IBM Journal of Research and Development"}
+
+MACRO {ibmsj} {"IBM Systems Journal"}
+
+MACRO {ieeese} {"IEEE Transactions on Software Engineering"}
+
+MACRO {ieeetc} {"IEEE Transactions on Computers"}
+
+MACRO {ieeetcad}
+ {"IEEE Transactions on Computer-Aided Design of Integrated Circuits"}
+
+MACRO {ipl} {"Information Processing Letters"}
+
+MACRO {jacm} {"Journal of the ACM"}
+
+MACRO {jcss} {"Journal of Computer and System Sciences"}
+
+MACRO {scp} {"Science of Computer Programming"}
+
+MACRO {sicomp} {"SIAM Journal on Computing"}
+
+MACRO {tocs} {"ACM Transactions on Computer Systems"}
+
+MACRO {tods} {"ACM Transactions on Database Systems"}
+
+MACRO {tog} {"ACM Transactions on Graphics"}
+
+MACRO {toms} {"ACM Transactions on Mathematical Software"}
+
+MACRO {toois} {"ACM Transactions on Office Information Systems"}
+
+MACRO {toplas} {"ACM Transactions on Programming Languages and Systems"}
+
+MACRO {tcs} {"Theoretical Computer Science"}
+
+READ
+
+FUNCTION {sortify}
+{ purify$
+ "l" change.case$
+}
+
+INTEGERS { len }
+
+FUNCTION {chop.word}
+{ 's :=
+ 'len :=
+ s #1 len substring$ =
+ { s len #1 + global.max$ substring$ }
+ 's
+ if$
+}
+
+% There are three apalike cases: one person (Jones),
+% two (Jones and de~Bruijn), and more (Jones et~al.).
+% This function is much like format.crossref.editors.
+%
+FUNCTION {format.lab.names}
+{ 's :=
+ s #1 "{vv~}{ll}" format.name$ smallcaps
+ s num.names$ duplicate$
+ #2 >
+ { pop$ " \btxetalshort{.}" * }
+ { #2 <
+ 'skip$
+ { s #2 "{ff }{vv }{ll}{ jj}" format.name$ "others" =
+ { " \btxetalshort{.}" * }
+ { " \btxandshort{.}\ " * s #2 "{vv~}{ll}" format.name$ smallcaps * }
+ if$
+ }
+ if$
+ }
+ if$
+}
+
+FUNCTION {author.key.label}
+{ citelabel empty$
+ { author empty$
+ { key empty$
+ { cite$ #1 #3 substring$ }
+ 'key % apalike uses the whole key
+ if$
+ }
+ { author format.lab.names }
+ if$
+ }
+ { citelabel smallcaps }
+ if$
+}
+
+FUNCTION {author.editor.key.label}
+{ citelabel empty$
+ { author empty$
+ { editor empty$
+ { key empty$
+ { cite$ #1 #3 substring$ }
+ 'key % apalike uses the whole key
+ if$
+ }
+ { editor format.lab.names }
+ if$
+ }
+ { author format.lab.names }
+ if$
+ }
+ { citelabel smallcaps }
+ if$
+}
+
+FUNCTION {editor.key.label}
+{ citelabel empty$
+ { editor empty$
+ { key empty$
+ { cite$ #1 #3 substring$ }
+ 'key % apalike uses the whole key, no organization
+ if$
+ }
+ { editor format.lab.names }
+ if$
+ }
+ { citelabel smallcaps }
+ if$
+}
+
+FUNCTION {calc.label}
+{ type$ "book" =
+ type$ "inbook" =
+ or
+ 'author.editor.key.label
+ { type$ "proceedings" =
+ 'editor.key.label % apalike ignores organization
+ 'author.key.label % for labeling and sorting
+ if$
+ }
+ if$
+ year empty$
+ {""}
+% {", "} % original
+ {" "} % gendert fr Andreas Diplomarbeit 30/04/92
+ if$ % these three lines are
+ * % for apalike, which
+% year field.or.null purify$ #-1 #4 substring$ % uses all four digits % original
+ year field.or.null % gendert fr Andreas Diplomarbeit 19/09/92 um Jahresangaben wie 1988a, 1988b zu ermglichen
+ *
+ 'label :=
+}
+
+FUNCTION {sort.format.names}
+{ 's :=
+ #1 'nameptr :=
+ ""
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ { nameptr #1 >
+ { " " * }
+ 'skip$
+ if$ % apalike uses initials
+ s nameptr "{ll{ }}{ ff{ }}{vv{ } }{ jj{ }}" format.name$ 't := % <= here
+ nameptr numnames = t "others" = and
+ { "et al" * }
+ { t sortify * }
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+}
+
+FUNCTION {sort.format.title}
+{ 't :=
+ "A " #2
+ "An " #3
+ "The " #4 t chop.word
+ chop.word
+ chop.word
+ sortify
+ #1 global.max$ substring$
+}
+
+FUNCTION {author.sort}
+{ author empty$
+ { key empty$
+ { "to sort, need author or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { author sort.format.names }
+ if$
+}
+
+FUNCTION {author.editor.sort}
+{ author empty$
+ { editor empty$
+ { key empty$
+ { "to sort, need author, editor, or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { editor sort.format.names }
+ if$
+ }
+ { author sort.format.names }
+ if$
+}
+
+FUNCTION {editor.sort}
+{ editor empty$
+ { key empty$
+ { "to sort, need editor or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { editor sort.format.names }
+ if$
+}
+
+% apalike uses two sorting passes; the first one sets the
+% labels so that the `a's, `b's, etc. can be computed;
+% the second pass puts the references in "correct" order.
+% The presort function is for the first pass. It computes
+% label, sort.label, and title, and then concatenates.
+FUNCTION {presort}
+{ calc.label
+ label sortify
+ " "
+ *
+ type$ "book" =
+ type$ "inbook" =
+ or
+ 'author.editor.sort
+ { type$ "proceedings" =
+ 'editor.sort
+ 'author.sort
+ if$
+ }
+ if$
+ #1 entry.max$ substring$ % for
+ 'sort.label := % apalike
+ sort.label % style
+ *
+ " "
+ *
+ title field.or.null
+ sort.format.title
+ *
+ #1 entry.max$ substring$
+ 'sort.key$ :=
+}
+
+ITERATE {presort}
+
+SORT % by label, sort.label, title---for final label calculation
+
+STRINGS { last.label next.extra } % apalike labels are only for the text;
+
+INTEGERS { last.extra.num } % there are none in the bibliography
+
+FUNCTION {initialize.extra.label.stuff} % and hence there is no `longest.label'
+{ #0 int.to.chr$ 'last.label :=
+ "" 'next.extra :=
+ #0 'last.extra.num :=
+}
+
+FUNCTION {forward.pass}
+{ last.label label =
+ { last.extra.num #1 + 'last.extra.num :=
+ last.extra.num int.to.chr$ 'extra.label :=
+ }
+ { "a" chr.to.int$ 'last.extra.num :=
+ "" 'extra.label :=
+ label 'last.label :=
+ }
+ if$
+}
+
+FUNCTION {reverse.pass}
+{ next.extra "b" =
+ { "a" 'extra.label := }
+ 'skip$
+ if$
+ label extra.label * 'label :=
+ extra.label 'next.extra :=
+}
+
+EXECUTE {initialize.extra.label.stuff}
+
+ITERATE {forward.pass}
+
+REVERSE {reverse.pass}
+
+% Now that the label is right we sort for real,
+% on sort.label then year then title. This is
+% for the second sorting pass.
+FUNCTION {bib.sort.order}
+{ sort.label
+ " "
+ *
+ year field.or.null sortify
+ *
+ " "
+ *
+ title field.or.null
+ sort.format.title
+ *
+ #1 entry.max$ substring$
+ 'sort.key$ :=
+}
+
+ITERATE {bib.sort.order}
+
+SORT % by sort.label, year, title---giving final bibliography order
+
+FUNCTION {begin.bib}
+{ preamble$ empty$ % no \etalchar in apalike
+ 'skip$
+ { preamble$ write$ newline$ }
+ if$
+ "\begin{thebibliography}{}" write$ newline$ % no labels in apalike
+}
+
+EXECUTE {begin.bib}
+
+EXECUTE {init.state.consts}
+
+ITERATE {call.type$}
+
+FUNCTION {end.bib}
+{ newline$
+ "\end{thebibliography}" write$ newline$
+}
+
+EXECUTE {end.bib}
+
diff --git a/biblio/bibtex/contrib/misc/automatica.bst b/biblio/bibtex/contrib/misc/automatica.bst
new file mode 100644
index 0000000000..453da76bc6
--- /dev/null
+++ b/biblio/bibtex/contrib/misc/automatica.bst
@@ -0,0 +1,1280 @@
+% BibTeX standard bibliography style `IFACh' (one of the harvard family)
+ % version 0.99a for BibTeX versions 0.99a or later, LaTeX version 2.09.
+ % Copyright (C) 1991, all rights reserved.
+ % Copying of this file is authorized only if either
+ % (1) you make absolutely no changes to your copy, including name, or
+ % (2) if you do make changes, you name it something other than
+ % btxbst.doc, plain.bst, unsrt.bst, alpha.bst, abbrv.bst, agsm.bst,
+ % dcu.bst or kluwer.bst.
+ % This restriction helps ensure that all standard styles are identical.
+ % The file harvard.tex has the documentation for this style.
+
+% ACKNOWLEDGEMENT:
+% This document is a modified version of agsm.bst by
+% Peter Williams, Key Centre for Design Quality, Sydney University
+% e-mail: peterw@archsci.arch.su.oz.au
+% AUTHOR:
+% Silvano Balemi, Automatic Control Laboratory, ETH Zurich
+% e-mail: balemi@aut.ethz.ch
+
+ENTRY
+ { address
+ author
+ booktitle
+ chapter
+ edition
+ editor
+ howpublished
+ institution
+ journal
+ key
+ month
+ note
+ number
+ organization
+ pages
+ publisher
+ school
+ series
+ title
+ type
+ volume
+ year
+ }
+ { field.used }
+ { extra.label sort.label list.year }
+
+INTEGERS { output.state before.all mid.sentence after.sentence after.block }
+
+FUNCTION {init.state.consts}
+{ #0 'before.all :=
+ #1 'mid.sentence :=
+ #2 'after.sentence :=
+ #3 'after.block :=
+}
+
+STRINGS { s t f }
+
+FUNCTION {output.nonnull}
+{ 's :=
+ output.state mid.sentence =
+ { ". " * write$ }
+ { output.state after.block =
+ { add.period$ write$
+ newline$
+ "\newblock " write$
+ }
+ { output.state before.all =
+ 'write$
+ { add.period$ " " * write$ }
+ if$
+ }
+ if$
+ mid.sentence 'output.state :=
+ }
+ if$
+ s
+}
+
+FUNCTION {output.yearnull}
+{ 's :=
+ output.state mid.sentence =
+ { ". " * write$ }
+ { output.state after.block =
+ { add.period$ write$
+ newline$
+ "\newblock " write$
+ }
+ { output.state before.all =
+ 'write$
+ { add.period$ " " * write$ }
+ if$
+ }
+ if$
+ mid.sentence 'output.state :=
+ }
+ if$
+ s
+}
+
+FUNCTION {output}
+{ duplicate$ empty$
+ 'pop$
+ 'output.nonnull
+ if$
+}
+
+FUNCTION {output.check}
+{ 't :=
+ duplicate$ empty$
+ { pop$ "empty " t * " in " * cite$ * warning$ }
+ 'output.nonnull
+ if$
+}
+
+FUNCTION {item.check}
+{ 't :=
+ empty$
+ { "empty " t * " in " * cite$ * warning$ }
+ { skip$ }
+ if$
+}
+
+FUNCTION {fin.entry}
+{ add.period$
+ write$
+ newline$
+}
+
+FUNCTION {new.block}
+{ output.state before.all =
+ 'skip$
+ { after.block 'output.state := }
+ if$
+}
+
+FUNCTION {not}
+{ { #0 }
+ { #1 }
+ if$
+}
+
+FUNCTION {and}
+{ 'skip$
+ { pop$ #0 }
+ if$
+}
+
+FUNCTION {or}
+{ { pop$ #1 }
+ 'skip$
+ if$
+}
+
+FUNCTION {field.or.null}
+{ duplicate$ empty$
+ { pop$ "" }
+ 'skip$
+ if$
+}
+
+FUNCTION {emphasize}
+{ duplicate$ empty$
+ { pop$ "" }
+ { "{\em " swap$ * "}" * }
+ if$
+}
+
+FUNCTION {embolden}
+{ duplicate$ empty$
+ { pop$ "" }
+ { "{\bf " swap$ * "}" * }
+ if$
+}
+
+FUNCTION {quote}
+{ duplicate$ empty$
+ { pop$ "" }
+ { "`" swap$ * "'" * }
+ if$
+}
+
+INTEGERS { nameptr namesleft numnames }
+
+FUNCTION {format.names}
+{ 's :=
+ #1 'nameptr :=
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+% { s nameptr "{ff~}{vv~}{ll}{, jj}" format.name$ 't :=
+ { s nameptr "{vv~}{ll}{, jj}{, f.}" format.name$ 't :=
+ nameptr #1 >
+ { namesleft #1 >
+ s nameptr "{ff~}{vv~}{ll}{, jj}" format.name$ 't :=
+ { ", " * t * }
+ { numnames #2 >
+ { "" * }
+ 'skip$
+ if$
+ t "others" =
+ { " et~al." * }
+ { " and " * t * }
+ if$
+ }
+ if$
+ }
+ 't
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+}
+
+FUNCTION {format.authors}
+{ author empty$
+ { "" }
+ { author format.names }
+ if$
+}
+
+
+FUNCTION {format.editor.names}
+{ 's :=
+ 'f :=
+ #1 'nameptr :=
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ { s nameptr f format.name$ 't :=
+ nameptr #1 >
+ { namesleft #1 >
+ { ", " * t * }
+ { t "others" =
+ { " et~al." * }
+ { " and " * t * }
+ if$
+ }
+ if$
+ }
+ 't
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+}
+
+FUNCTION {format.editors}
+{ editor empty$
+ { "" }
+ { "{vv~}{ll}{, jj}{, f.}" editor format.editor.names
+ editor num.names$ #1 >
+ { " (Eds.)" * }
+ { " (Ed.)" * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.editors.reverse}
+{ editor empty$
+ { "" }
+ { "{f.~}{vv~}{ll}{, jj}" editor format.editor.names
+ editor num.names$ #1 >
+ { " (Eds.)" * }
+ { " (Ed.)" * }
+ if$
+ }
+ if$
+}
+
+
+FUNCTION {format.title}
+{ title empty$
+ { "" }
+ { title "t" change.case$ }
+ if$
+}
+
+FUNCTION {n.dashify}
+{ 't :=
+ ""
+ { t empty$ not }
+ { t #1 #1 substring$ "-" =
+ { t #1 #2 substring$ "--" = not
+ { "--" *
+ t #2 global.max$ substring$ 't :=
+ }
+ { { t #1 #1 substring$ "-" = }
+ { "-" *
+ t #2 global.max$ substring$ 't :=
+ }
+ while$
+ }
+ if$
+ }
+ { t #1 #1 substring$ *
+ t #2 global.max$ substring$ 't :=
+ }
+ if$
+ }
+ while$
+}
+
+FUNCTION {format.btitle}
+{ title emphasize
+}
+
+FUNCTION {tie.or.space.connect}
+{ duplicate$ text.length$ #3 <
+ { "~" }
+ { " " }
+ if$
+ swap$ * *
+}
+
+FUNCTION {either.or.check}
+{ empty$
+ 'pop$
+ { "can't use both " swap$ * " fields in " * cite$ * warning$ }
+ if$
+}
+
+FUNCTION {format.bvolume}
+{ volume empty$
+ { "" }
+ { "Vol." volume tie.or.space.connect
+ series empty$
+ 'skip$
+ { " of " * series emphasize * }
+ if$
+ "volume and number" number either.or.check
+ }
+ if$
+}
+
+FUNCTION {format.number.series}
+{ volume empty$
+ { number empty$
+ { series field.or.null }
+ { output.state mid.sentence =
+ { "number" }
+ { "Number" }
+ if$
+ number tie.or.space.connect
+ series empty$
+ { "there's a number but no series in " cite$ * warning$ }
+ { " In " * series quote * }
+ if$
+ }
+ if$
+ }
+ { "" }
+ if$
+}
+
+FUNCTION {format.edition}
+{ edition empty$
+ { "" }
+ { output.state mid.sentence =
+ { edition "l" change.case$ " edn" * }
+ { edition "t" change.case$ " edn" * }
+ if$
+ }
+ if$
+}
+
+INTEGERS { multiresult }
+
+FUNCTION {multi.page.check}
+{ 't :=
+ #0 'multiresult :=
+ { multiresult not
+ t empty$ not
+ and
+ }
+ { t #1 #1 substring$
+ duplicate$ "-" =
+ swap$ duplicate$ "," =
+ swap$ "+" =
+ or or
+ { #1 'multiresult := }
+ { t #2 global.max$ substring$ 't := }
+ if$
+ }
+ while$
+ multiresult
+}
+
+FUNCTION {format.pages}
+{ pages empty$
+ { "" }
+ { pages multi.page.check
+ { "pp.~" pages n.dashify * }
+ { "p.~" pages * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.vol.num.pages}
+{ volume embolden field.or.null
+ number empty$
+ 'skip$
+ { "(" number * ")" * *
+ volume empty$
+ { "there's a number but no volume in " cite$ * warning$ }
+ 'skip$
+ if$
+ }
+ if$
+ pages empty$
+ 'skip$
+ { duplicate$ empty$
+ { pop$ format.pages }
+ { ",~" * pages n.dashify * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.chapter.pages}
+{ chapter empty$
+ 'format.pages
+ { type empty$
+ { "chapter" }
+ { type "l" change.case$ }
+ if$
+ chapter tie.or.space.connect
+ pages empty$
+ 'skip$
+ { ", " * format.pages * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.in.ed.booktitle}
+{ booktitle empty$
+ { "" }
+ { editor empty$
+ { "In " booktitle quote * }
+ { "In " format.editors.reverse * ". " * booktitle quote * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {empty.misc.check}
+{ author empty$ title empty$ howpublished empty$
+ month empty$ year empty$ note empty$
+ and and and and and
+ key empty$ not and
+ { "all relevant fields are empty in " cite$ * warning$ }
+ 'skip$
+ if$
+}
+
+FUNCTION {format.thesis.type}
+{ type empty$
+ 'skip$
+ { pop$
+ type "t" change.case$
+ }
+ if$
+}
+
+FUNCTION {format.tr.number}
+{ type empty$
+ { "Technical Report" }
+ 'type
+ if$
+ number empty$
+ { "t" change.case$ }
+ { number tie.or.space.connect }
+ if$
+}
+
+FUNCTION {format.article.crossref}
+{ key empty$
+ { journal empty$
+ { "need key or journal for " cite$ * " to crossref " * crossref *
+ warning$
+ ""
+ }
+ { "in {\em " journal * "\/} \cite{" * crossref * "}" *}
+ if$
+ }
+ { "In \citeasnoun{" crossref * "}" * }
+ if$
+
+}
+
+FUNCTION {format.book.crossref}
+{ volume empty$
+ { "empty volume in " cite$ * "'s crossref of " * crossref * warning$
+ "in "
+ }
+ { "Vol." volume tie.or.space.connect
+ " of " *
+ }
+ if$
+ editor empty$
+ editor field.or.null author field.or.null =
+ or
+ { key empty$
+ { series empty$
+ { "need editor, key, or series for " cite$ * " to crossref " *
+ crossref * warning$
+ "" *
+ }
+ { "{\em " * series * "\/} \cite{" * crossref * "}" *}
+ if$
+ }
+ { " \citeasnoun{" * crossref * "}" * }
+ if$
+ }
+ { " \citeasnoun{" * crossref * "}" * }
+ if$
+}
+
+FUNCTION {format.incoll.inproc.crossref}
+{ editor empty$
+ editor field.or.null author field.or.null =
+ or
+ { key empty$
+ { booktitle empty$
+ { "need editor, key, or booktitle for " cite$ * " to crossref " *
+ crossref * warning$
+ ""
+ }
+ { "in {\em " booktitle * "\/}" * " \cite{" * crossref * "}" *}
+ if$
+ }
+ { "In \citeasnoun{" crossref * "}" * }
+ if$
+ }
+ { "In \citeasnoun{" crossref * "}" * }
+ if$
+
+}
+
+INTEGERS { len }
+
+FUNCTION {chop.word}
+{ 's :=
+ 'len :=
+ s #1 len substring$ =
+ { s len #1 + global.max$ substring$ }
+ 's
+ if$
+}
+
+FUNCTION {format.lab.names.abbr}
+{ 's :=
+ s num.names$ 'numnames :=
+ numnames #1 >
+ { numnames #2 >
+ { s #1 "{vv~}{ll}" format.name$ " {\em et al.}" * }
+ { s #2 "{ff }{vv }{ll}{ jj}" format.name$ "others" =
+ { s #1 "{vv~}{ll}" format.name$ " {\em et al.}" * }
+ { s #1 "{vv~}{ll}" format.name$ " and " *
+ s #2 "{vv~}{ll}" format.name$ *
+ }
+ if$
+ }
+ if$
+ }
+ { s #1 "{vv~}{ll}" format.name$ }
+ if$
+}
+
+FUNCTION {format.lab.names.full}
+{ 's :=
+ #1 'nameptr :=
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ { s nameptr "{vv~}{ll}" format.name$ 't :=
+ nameptr #1 >
+ { namesleft #1 >
+ { ", " * t * }
+ { t "others" =
+ { " et~al." * }
+ { " and " * t * }
+ if$
+ }
+ if$
+ }
+ 't
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+}
+
+INTEGERS { author.field editor.field organization.field title.field key.field }
+
+FUNCTION {init.field.constants}
+{ #0 'author.field :=
+ #1 'editor.field :=
+ #2 'organization.field :=
+ #3 'title.field :=
+ #4 'key.field :=
+}
+
+FUNCTION {make.list.label}
+{ author.field field.used =
+ { format.authors }
+ { editor.field field.used =
+ { format.editors }
+ { organization.field field.used =
+ { "The " #4 organization chop.word #3 text.prefix$ }
+ { title.field field.used =
+ { format.btitle }
+ { key.field field.used =
+ { key #3 text.prefix$ }
+ { "Internal error :001 on " cite$ * " label" * warning$ }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+}
+
+FUNCTION {make.full.label}
+{ author.field field.used =
+ { author format.lab.names.full }
+ { editor.field field.used =
+ { editor format.lab.names.full }
+ { organization.field field.used =
+ { "The " #4 organization chop.word #3 text.prefix$ }
+ { title.field field.used =
+ { format.btitle }
+ { key.field field.used =
+ { key #3 text.prefix$ }
+ { "Internal error :001 on " cite$ * " label" * warning$ }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+}
+
+FUNCTION {make.abbr.label}
+{ author.field field.used =
+ { author format.lab.names.abbr }
+ { editor.field field.used =
+ { editor format.lab.names.abbr }
+ { organization.field field.used =
+ { "The " #4 organization chop.word #3 text.prefix$ }
+ { title.field field.used =
+ { format.btitle }
+ { key.field field.used =
+ { key #3 text.prefix$ }
+ { "Internal error :001 on " cite$ * " label" * warning$ }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+}
+
+FUNCTION {output.bibitem}
+{ newline$
+ "\harvarditem[" write$
+ make.abbr.label write$
+ "]{" write$
+ make.abbr.label write$
+ "}{" write$
+ list.year write$
+ "}{" write$
+ cite$ write$
+ "}" write$
+ newline$
+ ""
+ before.all 'output.state :=
+}
+
+FUNCTION {list.label.output}
+{ make.list.label " " * write$
+}
+
+FUNCTION {article}
+{ output.bibitem
+ list.label.output
+ " (" list.year * ")" * output.yearnull
+ author "author" item.check
+ title.field field.used =
+ { skip$ }
+ { format.title quote "title" output.check }
+ if$
+ crossref missing$
+ { journal emphasize "journal" duplicate$ item.check
+ pages empty$
+ {
+ output
+ }
+ {
+ " " *
+ format.vol.num.pages * output
+ }
+ if$
+ }
+ { format.article.crossref output.nonnull
+ format.pages output
+ }
+ if$
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {book}
+{ output.bibitem
+ list.label.output
+ " (" list.year * ")" * output.yearnull
+ author empty$
+ { editor "author and editor" item.check }
+ { crossref missing$
+ { "author and editor" editor either.or.check }
+ 'skip$
+ if$
+ }
+ if$
+ title.field field.used =
+ { skip$ }
+ { format.btitle "title" output.check }
+ if$
+ crossref missing$
+ { format.bvolume output
+ format.number.series output
+ format.edition output
+ publisher "publisher" output.check
+ address output
+ }
+ { format.book.crossref output.nonnull
+ format.edition output
+ }
+ if$
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {booklet}
+{ output.bibitem
+ list.label.output
+ " (" list.year * ")" * output.yearnull
+ title.field field.used =
+ { skip$ }
+ { format.title quote "title" output.check }
+ if$
+ howpublished output
+ address output
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {inbook}
+{ output.bibitem
+ list.label.output
+ " (" list.year * ")" * output.yearnull
+ author empty$
+ { editor "author and editor" item.check }
+ { crossref missing$
+ { "author and editor" editor either.or.check }
+ 'skip$
+ if$
+ }
+ if$
+ title.field field.used =
+ { skip$ }
+ { format.btitle "title" output.check }
+ if$
+ crossref missing$
+ { format.bvolume output
+ format.number.series output
+ format.edition output
+ publisher "publisher" output.check
+ address output
+ }
+ { format.book.crossref output.nonnull
+ format.edition output
+ }
+ if$
+ format.chapter.pages "chapter and pages" output.check
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {incollection}
+{ output.bibitem
+ list.label.output
+ " (" list.year * ")" * output.yearnull
+ title.field field.used =
+ { skip$ }
+ { format.title "title" output.check }
+ if$
+ author "author" item.check
+ crossref missing$
+ { format.in.ed.booktitle "booktitle" output.check
+ format.edition output
+ format.bvolume output
+ format.number.series output
+ publisher "publisher" output.check
+ address output
+ }
+ { format.incoll.inproc.crossref output.nonnull
+ }
+ if$
+ format.chapter.pages output
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {inproceedings}
+{ output.bibitem
+ list.label.output
+ " (" list.year * ")" * output.yearnull
+ title.field field.used =
+ { skip$ }
+ { format.title "title" output.check }
+ if$
+ author "author" item.check
+ crossref missing$
+ { format.in.ed.booktitle "booktitle" output.check
+ format.bvolume output
+ format.number.series output
+ address empty$
+ { organization output
+ publisher output
+ }
+ { organization output
+ publisher output
+ address output.nonnull
+ }
+ if$
+ }
+ { format.incoll.inproc.crossref output.nonnull
+ }
+ if$
+ format.pages output
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {conference} { inproceedings }
+
+FUNCTION {manual}
+{ output.bibitem
+ list.label.output
+ " (" list.year * ")" * output.yearnull
+ title.field field.used =
+ { skip$ }
+ { format.btitle "title" output.check }
+ if$
+ format.edition output
+ author empty$
+ { organization empty$
+ { address output }
+ 'skip$
+ if$
+ }
+ { organization output
+ address output
+ }
+ if$
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {mastersthesis}
+{ output.bibitem
+ list.label.output
+ " (" list.year * ")" * output.yearnull
+ author "author" item.check
+ title.field field.used =
+ { skip$ }
+ { format.title "title" output.check }
+ if$
+ "Master's thesis" format.thesis.type output.nonnull
+ school "school" output.check
+ address output
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {misc}
+{ output.bibitem
+ list.label.output
+ " (" list.year * ")" * output.yearnull
+ title.field field.used =
+ { skip$ }
+ { format.title quote output }
+ if$
+ howpublished output
+ new.block
+ note output
+ fin.entry
+ empty.misc.check
+}
+
+FUNCTION {phdthesis}
+{ output.bibitem
+ list.label.output
+ " (" list.year * ")" * output.yearnull
+ author "author" item.check
+ title.field field.used =
+ { skip$ }
+ { title "title" output.check }
+ if$
+ "PhD thesis" format.thesis.type output.nonnull
+ school "school" output.check
+ address output
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {proceedings}
+{ output.bibitem
+ list.label.output
+ " (" list.year * ")" * output.yearnull
+ title.field field.used =
+ { skip$ }
+ { format.btitle "title" output.check }
+ if$
+ format.bvolume output
+ format.number.series output
+ address empty$
+ { editor empty$
+ { skip$ }
+ { organization output
+ }
+ if$
+ publisher output
+ }
+ { editor empty$
+ 'skip$
+ { organization output }
+ if$
+ publisher output
+ address output.nonnull
+ }
+ if$
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {techreport}
+{ output.bibitem
+ list.label.output
+ " (" list.year * ")" * output.yearnull
+ author "author" item.check
+ title.field field.used =
+ { skip$ }
+ { format.title "title" output.check }
+ if$
+ format.tr.number output.nonnull
+ institution "institution" output.check
+ address output
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {unpublished}
+{ output.bibitem
+ list.label.output
+ " (" list.year * ")" * output.yearnull
+ author "author" item.check
+ title.field field.used =
+ { skip$ }
+ { format.title "title" output.check }
+ if$
+ note "note" output.check
+ fin.entry
+}
+
+FUNCTION {default.type} { misc }
+
+MACRO {jan} {"January"}
+
+MACRO {feb} {"February"}
+
+MACRO {mar} {"March"}
+
+MACRO {apr} {"April"}
+
+MACRO {may} {"May"}
+
+MACRO {jun} {"June"}
+
+MACRO {jul} {"July"}
+
+MACRO {aug} {"August"}
+
+MACRO {sep} {"September"}
+
+MACRO {oct} {"October"}
+
+MACRO {nov} {"November"}
+
+MACRO {dec} {"December"}
+
+MACRO {acmcs} {"ACM Computing Surveys"}
+
+MACRO {acta} {"Acta Informatica"}
+
+MACRO {cacm} {"Communications of the ACM"}
+
+MACRO {ibmjrd} {"IBM Journal of Research and Development"}
+
+MACRO {ibmsj} {"IBM Systems Journal"}
+
+MACRO {ieeese} {"IEEE Transactions on Software Engineering"}
+
+MACRO {ieeetc} {"IEEE Transactions on Computers"}
+
+MACRO {ieeetcad}
+ {"IEEE Transactions on Computer-Aided Design of Integrated Circuits"}
+
+MACRO {ipl} {"Information Processing Letters"}
+
+MACRO {jacm} {"Journal of the ACM"}
+
+MACRO {jcss} {"Journal of Computer and System Sciences"}
+
+MACRO {scp} {"Science of Computer Programming"}
+
+MACRO {sicomp} {"SIAM Journal on Computing"}
+
+MACRO {tocs} {"ACM Transactions on Computer Systems"}
+
+MACRO {tods} {"ACM Transactions on Database Systems"}
+
+MACRO {tog} {"ACM Transactions on Graphics"}
+
+MACRO {toms} {"ACM Transactions on Mathematical Software"}
+
+MACRO {toois} {"ACM Transactions on Office Information Systems"}
+
+MACRO {toplas} {"ACM Transactions on Programming Languages and Systems"}
+
+MACRO {tcs} {"Theoretical Computer Science"}
+
+READ
+
+EXECUTE {init.field.constants}
+
+FUNCTION {sortify}
+{ purify$
+ "l" change.case$
+}
+
+FUNCTION {author.key.label}
+{ author empty$
+ { key empty$
+ { title.field 'field.used := }
+ { key.field 'field.used := }
+ if$
+ }
+ { author.field 'field.used := }
+ if$
+}
+
+FUNCTION {author.editor.key.label}
+{ author empty$
+ { editor empty$
+ { key empty$
+ { title.field 'field.used := }
+ { key.field 'field.used := }
+ if$
+ }
+ { editor.field 'field.used := }
+ if$
+ }
+ { author.field 'field.used := }
+ if$
+}
+
+FUNCTION {author.key.organization.label}
+{ author empty$
+ { key empty$
+ { organization empty$
+ { title.field 'field.used := }
+ { organization.field 'field.used := }
+ if$
+ }
+ { key.field 'field.used := }
+ if$
+ }
+ { author.field 'field.used := }
+ if$
+}
+
+FUNCTION {editor.key.organization.label}
+{ editor empty$
+ { key empty$
+ { organization empty$
+ { title.field 'field.used := }
+ { organization.field 'field.used := }
+ if$
+ }
+ { key.field 'field.used := }
+ if$
+ }
+ { editor.field 'field.used := }
+ if$
+}
+
+FUNCTION {sort.format.title}
+{ 't :=
+ "A " #2
+ "An " #3
+ "The " #4 t chop.word
+ chop.word
+ chop.word
+ sortify
+ #1 global.max$ substring$
+}
+
+FUNCTION {calc.label}
+{ type$ "book" =
+ type$ "inbook" =
+ or
+ 'author.editor.key.label
+ { type$ "proceedings" =
+ 'editor.key.organization.label
+ { type$ "manual" =
+ 'author.key.organization.label
+ 'author.key.label
+ if$
+ }
+ if$
+ }
+ if$
+ make.abbr.label
+ title.field field.used =
+ { sort.format.title }
+ { sortify }
+ if$
+ year field.or.null purify$ #-1 #4 substring$ sortify
+ *
+ 'sort.label :=
+}
+
+FUNCTION {first.presort}
+{ calc.label
+ sort.label
+ title.field field.used =
+ { skip$ }
+ { " "
+ *
+ make.list.label sortify
+ *
+ " "
+ *
+ title field.or.null
+ sort.format.title
+ *
+ }
+ if$
+ #1 entry.max$ substring$
+ 'sort.key$ :=
+}
+
+ITERATE {first.presort}
+
+SORT
+
+STRINGS { last.sort.label next.extra }
+
+INTEGERS { last.extra.num }
+
+FUNCTION {initialize.last.extra.num}
+{ #0 int.to.chr$ 'last.sort.label :=
+ "" 'next.extra :=
+ #0 'last.extra.num :=
+}
+
+FUNCTION {forward.pass}
+{ last.sort.label sort.label =
+ { last.extra.num #1 + 'last.extra.num :=
+ last.extra.num int.to.chr$ 'extra.label :=
+ }
+ { "a" chr.to.int$ 'last.extra.num :=
+ "" 'extra.label :=
+ sort.label 'last.sort.label :=
+ }
+ if$
+}
+
+FUNCTION {reverse.pass}
+{ next.extra "b" =
+ { "a" 'extra.label := }
+ 'skip$
+ if$
+ year empty$
+ { "n.d." extra.label emphasize * 'list.year := }
+ { year extra.label emphasize * 'list.year := }
+ if$
+ extra.label 'next.extra :=
+}
+
+EXECUTE {initialize.last.extra.num}
+
+ITERATE {forward.pass}
+
+REVERSE {reverse.pass}
+
+FUNCTION {second.presort}
+{ make.list.label
+ title.field field.used =
+ { sort.format.title }
+ { sortify }
+ if$
+ " "
+ *
+ list.year field.or.null sortify
+ *
+ " "
+ *
+ title.field field.used =
+ { skip$ }
+ { title field.or.null
+ sort.format.title
+ *
+ }
+ if$
+ #1 entry.max$ substring$
+ 'sort.key$ :=
+}
+
+ITERATE {second.presort}
+
+SORT
+
+FUNCTION {begin.bib}
+{ preamble$ empty$
+ 'skip$
+ { preamble$ write$ newline$ }
+ if$
+ "\begin{thebibliography}{xx}" write$ newline$
+}
+
+EXECUTE {begin.bib}
+
+EXECUTE {init.state.consts}
+
+ITERATE {call.type$}
+
+FUNCTION {end.bib}
+{ newline$
+ "\end{thebibliography}" write$ newline$
+}
+
+EXECUTE {end.bib}
diff --git a/biblio/bibtex/contrib/misc/bbs.bst b/biblio/bibtex/contrib/misc/bbs.bst
new file mode 100644
index 0000000000..ff4df8fdaf
--- /dev/null
+++ b/biblio/bibtex/contrib/misc/bbs.bst
@@ -0,0 +1,1162 @@
+%%% ====================================================================
+%%% @BibTeX-style-file{
+%%% author = "Alan Rogers",
+%%% version = "1.1",
+%%% date = "Feb 15, 1991",
+%%% filename = "bbs.bst",
+%%% address = "Dept of Anthropology, University of Utah,
+%%% Salt Lake City, UT 84112",
+%%% checksum = "63919 1162 3279 24277",
+%%% email = "rogers@anthro.utah.edu",
+%%% supported = "no",
+%%% docstring = "The file produces bibliographies more or
+%%% less in the format of Behavioral and Brain
+%%% Sciences. It was adapted from apalike.bst,
+%%% incorporating features of Sake J.
+%%% Hogeveen's `astron.bst'.
+%%%
+%%% Usage: \documentstyle[astron]{...}
+%%% ...
+%%% \bibliographystyle{bbs}
+%%% ...
+%%%
+%%% The \documentstyle command above invokes
+%%% Hogeveen's `astron.sty', which must be in
+%%% TeX's search path.
+%%%
+%%% The modifications implement `\cite*{}',
+%%% which generates references in short form.
+%%% For example, `Rogers \cite*{...}' would
+%%% produce `Rogers (1992)'."
+%%% }
+%%% ====================================================================
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% BibTeX `apalike' bibliography style (24-Jan-88 version)
+% Adapted from the `alpha' style, version 0.99a; for BibTeX version 0.99a.
+% Copyright (C) 1988, all rights reserved.
+% Copying of this file is allowed, provided that if you make any changes at all
+% you name it something other than `apalike.bst'.
+% This restriction helps ensure that all copies are identical.
+% Differences between this style and `alpha' are generally heralded by a `%'.
+% The file btxbst.doc has the documentation for alpha.bst.
+%
+% This style should be used with the `apalike' LaTeX style (apalike.sty).
+% \cite's come out like "(Jones, 1986)" in the text but there are no labels
+% in the bibliography, and something like "(1986)" comes out immediately
+% after the author. Author (and editor) names appear as last name, comma,
+% initials. A `year' field is required for every entry, and so is either
+% an author (or in some cases, an editor) field or a key field.
+%
+% Editorial note:
+% Many journals require a style like `apalike', but I strongly, strongly,
+% strongly recommend that you not use it if you have a choice---use something
+% like `plain' instead. Mary-Claire van Leunen (A Handbook for Scholars,
+% Knopf, 1979) argues convincingly that a style like `plain' encourages better
+% writing than one like `apalike'. Furthermore the strongest arguments for
+% using an author-date style like `apalike'---that it's "the most practical"
+% (The Chicago Manual of Style, University of Chicago Press, thirteenth
+% edition, 1982, pages 400--401)---fall flat on their face with the new
+% computer-typesetting technology. For instance page 401 anachronistically
+% states "The chief disadvantage of [a style like `plain'] is that additions
+% or deletions cannot be made after the manuscript is typed without changing
+% numbers in both text references and list." LaTeX sidesteps the disadvantage.
+%
+% History:
+% 15-sep-86 (SK,OP) Original version, by Susan King and Oren Patashnik.
+% 10-nov-86 (OP) Truncated the sort.key$ string to the correct length
+% in bib.sort.order to eliminate error message.
+% 24-jan-88 (OP) Updated for BibTeX version 0.99a, from alpha.bst 0.99a;
+% apalike now sorts by author, then year, then title;
+% THIS `apalike' VERSION DOES NOT WORK WITH BIBTEX 0.98i.
+
+ENTRY
+ { address
+ author
+ booktitle
+ chapter
+ edition
+ editor
+ howpublished
+ institution
+ journal
+ key
+% month not used in apalike
+ note
+ number
+ organization
+ pages
+ publisher
+ school
+ series
+ title
+ type
+ volume
+ year
+ }
+ {}
+ { label extra.label sort.label }
+
+INTEGERS { output.state before.all mid.sentence after.sentence after.block }
+
+FUNCTION {init.state.consts}
+{ #0 'before.all :=
+ #1 'mid.sentence :=
+ #2 'after.sentence :=
+ #3 'after.block :=
+}
+
+STRINGS { s t }
+
+FUNCTION {output.nonnull}
+{ 's :=
+ output.state mid.sentence =
+ { ", " * write$ }
+ { output.state after.block =
+ { add.period$ write$
+ newline$
+ "\newblock " write$
+ }
+ { output.state before.all =
+ 'write$
+ { add.period$ " " * write$ }
+ if$
+ }
+ if$
+ mid.sentence 'output.state :=
+ }
+ if$
+ s
+}
+
+FUNCTION {output}
+{ duplicate$ empty$
+ 'pop$
+ 'output.nonnull
+ if$
+}
+
+FUNCTION {output.check}
+{ 't :=
+ duplicate$ empty$
+ { pop$ "empty " t * " in " * cite$ * warning$ }
+ 'output.nonnull
+ if$
+}
+
+% apalike needs this function because
+% the year has special punctuation;
+% apalike ignores the month
+FUNCTION {output.year.check}
+{ year empty$
+ { "empty year in " cite$ * warning$ }
+ { write$
+ " (" year * extra.label * ")" *
+ mid.sentence 'output.state :=
+ }
+ if$
+}
+
+FUNCTION {output.bibitem}
+{ newline$
+ "\bibitem[" write$
+ label write$
+ "]{" write$
+ cite$ write$
+ "}" write$
+ newline$
+ ""
+ before.all 'output.state :=
+}
+
+FUNCTION {fin.entry}
+{ add.period$
+ write$
+ newline$
+}
+
+FUNCTION {new.block}
+{ output.state before.all =
+ 'skip$
+ { after.block 'output.state := }
+ if$
+}
+
+FUNCTION {new.sentence}
+{ output.state after.block =
+ 'skip$
+ { output.state before.all =
+ 'skip$
+ { after.sentence 'output.state := }
+ if$
+ }
+ if$
+}
+
+FUNCTION {not}
+{ { #0 }
+ { #1 }
+ if$
+}
+
+FUNCTION {and}
+{ 'skip$
+ { pop$ #0 }
+ if$
+}
+
+FUNCTION {or}
+{ { pop$ #1 }
+ 'skip$
+ if$
+}
+
+FUNCTION {new.block.checkb}
+{ empty$
+ swap$ empty$
+ and
+ 'skip$
+ 'new.block
+ if$
+}
+
+FUNCTION {field.or.null}
+{ duplicate$ empty$
+ { pop$ "" }
+ 'skip$
+ if$
+}
+
+FUNCTION {emphasize}
+{ duplicate$ empty$
+ { pop$ "" }
+ { "{\em " swap$ * "}" * }
+ if$
+}
+
+INTEGERS { nameptr namesleft numnames }
+
+FUNCTION {format.names}
+{ 's :=
+ #1 'nameptr :=
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ { s nameptr "{vv~}{ll}{, jj}{, f.}" format.name$ 't := % last name first
+ nameptr #1 >
+ { namesleft #1 >
+ { ", " * t * }
+ { numnames #2 >
+ { "," * }
+ 'skip$
+ if$
+ t "others" =
+ { " et~al." * }
+ { " \& " * t * }
+ if$
+ }
+ if$
+ }
+ 't
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+}
+
+FUNCTION {format.ed.names}
+{ 's :=
+ #1 'nameptr :=
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ { s nameptr "{f. }{vv~}{ll}{, jj}" format.name$ 't := % last name first
+ nameptr #1 >
+ { namesleft #1 >
+ { ", " * t * }
+ { numnames #2 >
+ { "," * }
+ 'skip$
+ if$
+ t "others" =
+ { " et~al." * }
+ { " \& " * t * }
+ if$
+ }
+ if$
+ }
+ 't
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+}
+
+FUNCTION {format.authors}
+{ author empty$
+ { "" }
+ { author format.names }
+ if$
+}
+
+FUNCTION {format.key} % this function is just for apalike
+{ empty$
+ { key field.or.null }
+ { "" }
+ if$
+}
+
+FUNCTION {format.editors}
+{ editor empty$
+ { "" }
+ { output.state mid.sentence =
+ {"ed. " editor format.ed.names * }
+ { editor format.ed.names ", ed." * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.title}
+{ title empty$
+ { "" }
+ { title "t" change.case$ }
+ if$
+}
+
+FUNCTION {n.dashify}
+{ 't :=
+ ""
+ { t empty$ not }
+ { t #1 #1 substring$ "-" =
+ { t #1 #2 substring$ "--" = not
+ { "--" *
+ t #2 global.max$ substring$ 't :=
+ }
+ { { t #1 #1 substring$ "-" = }
+ { "-" *
+ t #2 global.max$ substring$ 't :=
+ }
+ while$
+ }
+ if$
+ }
+ { t #1 #1 substring$ *
+ t #2 global.max$ substring$ 't :=
+ }
+ if$
+ }
+ while$
+}
+
+FUNCTION {format.btitle}
+{ title emphasize
+}
+
+FUNCTION {tie.or.space.connect}
+{ duplicate$ text.length$ #3 <
+ { "~" }
+ { " " }
+ if$
+ swap$ * *
+}
+
+FUNCTION {either.or.check}
+{ empty$
+ 'pop$
+ { "can't use both " swap$ * " fields in " * cite$ * warning$ }
+ if$
+}
+
+FUNCTION {format.bvolume}
+{ volume empty$
+ { "" }
+ { "volume" volume tie.or.space.connect
+ series empty$
+ 'skip$
+ { " of " * series emphasize * }
+ if$
+ "volume and number" number either.or.check
+ }
+ if$
+}
+
+FUNCTION {format.number.series}
+{ volume empty$
+ { number empty$
+ { series field.or.null }
+ { output.state mid.sentence =
+ { "number" }
+ { "Number" }
+ if$
+ number tie.or.space.connect
+ series empty$
+ { "there's a number but no series in " cite$ * warning$ }
+ { " in " * series * }
+ if$
+ }
+ if$
+ }
+ { "" }
+ if$
+}
+
+FUNCTION {format.edition}
+{ edition empty$
+ { "" }
+ { output.state mid.sentence =
+ { "(" edition "l" change.case$ * " ed.)" * }
+ { "(" edition "t" change.case$ * " ed.)" * }
+ if$
+ }
+ if$
+}
+
+INTEGERS { multiresult }
+
+FUNCTION {multi.page.check}
+{ 't :=
+ #0 'multiresult :=
+ { multiresult not
+ t empty$ not
+ and
+ }
+ { t #1 #1 substring$
+ duplicate$ "-" =
+ swap$ duplicate$ "," =
+ swap$ "+" =
+ or or
+ { #1 'multiresult := }
+ { t #2 global.max$ substring$ 't := }
+ if$
+ }
+ while$
+ multiresult
+}
+
+FUNCTION {format.pages}
+{ pages empty$
+ { "" }
+ { pages multi.page.check
+ { "pages" pages n.dashify tie.or.space.connect }
+ { "page" pages tie.or.space.connect }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.vol.num.pages}
+{ volume field.or.null
+ number empty$
+ 'skip$
+ { "(" number * ")" * *
+ volume empty$
+ { "there's a number but no volume in " cite$ * warning$ }
+ 'skip$
+ if$
+ }
+ if$
+ pages empty$
+ 'skip$
+ { duplicate$ empty$
+ { pop$ format.pages }
+ { ":" * pages n.dashify * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.chapter.pages}
+{ chapter empty$
+ 'format.pages
+ { type empty$
+ { "chapter" }
+ { type "l" change.case$ }
+ if$
+ chapter tie.or.space.connect
+ pages empty$
+ 'skip$
+ { ", " * format.pages * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.in.ed.booktitle}
+{ booktitle empty$
+ { "" }
+ { editor empty$
+ { "In: " booktitle emphasize * }
+ { "In: " booktitle emphasize * ", " * format.editors * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.thesis.type}
+{ type empty$
+ 'skip$
+ { pop$
+ type "t" change.case$
+ }
+ if$
+}
+
+FUNCTION {format.tr.number}
+{ type empty$
+ { "Technical Report" }
+ 'type
+ if$
+ number empty$
+ { "t" change.case$ }
+ { number tie.or.space.connect }
+ if$
+}
+
+FUNCTION {format.article.crossref}
+{ "In" % this is for apalike
+ " \cite{" * crossref * "}" *
+}
+
+FUNCTION {format.book.crossref}
+{ volume empty$
+ { "empty volume in " cite$ * "'s crossref of " * crossref * warning$
+ "In "
+ }
+ { "Volume" volume tie.or.space.connect
+ " of " *
+ }
+ if$
+ "\cite{" * crossref * "}" * % this is for apalike
+}
+
+FUNCTION {format.incoll.inproc.crossref}
+{ "In" % this is for apalike
+ " \cite{" * crossref * "}" *
+}
+
+FUNCTION {article}
+{ output.bibitem
+ format.authors "author" output.check
+ author format.key output % special for
+ output.year.check % apalike
+ new.block
+ format.title "title" output.check
+ new.block
+ crossref missing$
+ { journal emphasize "journal" output.check
+ format.vol.num.pages output
+ }
+ { format.article.crossref output.nonnull
+ format.pages output
+ }
+ if$
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {book}
+{ output.bibitem
+ author empty$
+ { format.editors "author and editor" output.check
+ editor format.key output
+ }
+ { format.authors output.nonnull
+ crossref missing$
+ { "author and editor" editor either.or.check }
+ 'skip$
+ if$
+ }
+ if$
+ output.year.check % special for apalike
+ new.block
+ format.btitle "title" output.check
+ format.edition output
+ crossref missing$
+ { format.bvolume output
+ new.block
+ format.number.series output
+ new.sentence
+ publisher "publisher" output.check
+% address output
+ }
+ { new.block
+ format.book.crossref output.nonnull
+ }
+ if$
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {booklet}
+{ output.bibitem
+ format.authors output
+ author format.key output % special for
+ output.year.check % apalike
+ new.block
+ format.title "title" output.check
+ new.block
+ howpublished output
+ address output
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {inbook}
+{ output.bibitem
+ author empty$
+ { format.editors "author and editor" output.check
+ editor format.key output
+ }
+ { format.authors output.nonnull
+ crossref missing$
+ { "author and editor" editor either.or.check }
+ 'skip$
+ if$
+ }
+ if$
+ output.year.check % special for apalike
+ new.block
+ format.btitle "title" output.check
+ format.edition output
+ crossref missing$
+ { format.bvolume output
+ format.chapter.pages "chapter and pages" output.check
+ new.block
+ format.number.series output
+ new.sentence
+ publisher "publisher" output.check
+% address output
+ }
+ { format.chapter.pages "chapter and pages" output.check
+ new.block
+ format.book.crossref output.nonnull
+ }
+ if$
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {incollection}
+{ output.bibitem
+ format.authors "author" output.check
+ author format.key output % special for
+ output.year.check % apalike
+ new.block
+ format.title "title" output.check
+ new.block
+ crossref missing$
+ { format.in.ed.booktitle "booktitle" output.check
+ format.edition output
+ format.bvolume output
+ format.number.series output
+ format.chapter.pages output
+ new.sentence
+ publisher "publisher" output.check
+% address output
+ }
+ { format.incoll.inproc.crossref output.nonnull
+ format.chapter.pages output
+ }
+ if$
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {inproceedings}
+{ output.bibitem
+ format.authors "author" output.check
+ author format.key output % special for
+ output.year.check % apalike
+ new.block
+ format.title "title" output.check
+ new.block
+ crossref missing$
+ { format.in.ed.booktitle "booktitle" output.check
+ format.bvolume output
+ format.number.series output
+ format.pages output
+% address output % for apalike
+ new.sentence % there's no year
+ organization output % here so things
+ publisher output % are simpler
+ }
+ { format.incoll.inproc.crossref output.nonnull
+ format.pages output
+ }
+ if$
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {conference} { inproceedings }
+
+FUNCTION {manual}
+{ output.bibitem
+ format.authors output
+ author format.key output % special for
+ output.year.check % apalike
+ new.block
+ format.btitle "title" output.check
+ format.edition output
+ organization address new.block.checkb
+ organization output
+% address output
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {mastersthesis}
+{ output.bibitem
+ format.authors "author" output.check
+ author format.key output % special for
+ output.year.check % apalike
+ new.block
+ format.title "title" output.check
+ new.block
+ "Master's thesis" format.thesis.type output.nonnull
+ school "school" output.check
+% address output
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {misc}
+{ output.bibitem
+ format.authors output
+ author format.key output % special for
+ output.year.check % apalike
+ new.block
+ format.title output
+ new.block
+ howpublished output
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {phdthesis}
+{ output.bibitem
+ format.authors "author" output.check
+ author format.key output % special for
+ output.year.check % apalike
+ new.block
+ format.btitle "title" output.check
+ new.block
+ "PhD thesis" format.thesis.type output.nonnull
+ school "school" output.check
+% address output
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {proceedings}
+{ output.bibitem
+ format.editors output
+ editor format.key output % special for
+ output.year.check % apalike
+ new.block
+ format.btitle "title" output.check
+ format.bvolume output
+ format.number.series output
+% address output % for apalike
+ new.sentence % we always output
+ organization output % a nonempty organization
+ publisher output % here
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {techreport}
+{ output.bibitem
+ format.authors "author" output.check
+ author format.key output % special for
+ output.year.check % apalike
+ new.block
+ format.title "title" output.check
+ new.block
+ format.tr.number output.nonnull
+ institution "institution" output.check
+% address output
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {unpublished}
+{ output.bibitem
+ format.authors "author" output.check
+ author format.key output % special for
+ output.year.check % apalike
+ new.block
+ format.title "title" output.check
+ new.block
+ note "note" output.check
+ fin.entry
+}
+
+FUNCTION {default.type} { misc }
+
+MACRO {jan} {"January"}
+
+MACRO {feb} {"February"}
+
+MACRO {mar} {"March"}
+
+MACRO {apr} {"April"}
+
+MACRO {may} {"May"}
+
+MACRO {jun} {"June"}
+
+MACRO {jul} {"July"}
+
+MACRO {aug} {"August"}
+
+MACRO {sep} {"September"}
+
+MACRO {oct} {"October"}
+
+MACRO {nov} {"November"}
+
+MACRO {dec} {"December"}
+
+MACRO {acmcs} {"ACM Computing Surveys"}
+
+MACRO {acta} {"Acta Informatica"}
+
+MACRO {cacm} {"Communications of the ACM"}
+
+MACRO {ibmjrd} {"IBM Journal of Research and Development"}
+
+MACRO {ibmsj} {"IBM Systems Journal"}
+
+MACRO {ieeese} {"IEEE Transactions on Software Engineering"}
+
+MACRO {ieeetc} {"IEEE Transactions on Computers"}
+
+MACRO {ieeetcad}
+ {"IEEE Transactions on Computer-Aided Design of Integrated Circuits"}
+
+MACRO {ipl} {"Information Processing Letters"}
+
+MACRO {jacm} {"Journal of the ACM"}
+
+MACRO {jcss} {"Journal of Computer and System Sciences"}
+
+MACRO {scp} {"Science of Computer Programming"}
+
+MACRO {sicomp} {"SIAM Journal on Computing"}
+
+MACRO {tocs} {"ACM Transactions on Computer Systems"}
+
+MACRO {tods} {"ACM Transactions on Database Systems"}
+
+MACRO {tog} {"ACM Transactions on Graphics"}
+
+MACRO {toms} {"ACM Transactions on Mathematical Software"}
+
+MACRO {toois} {"ACM Transactions on Office Information Systems"}
+
+MACRO {toplas} {"ACM Transactions on Programming Languages and Systems"}
+
+MACRO {tcs} {"Theoretical Computer Science"}
+
+READ
+
+FUNCTION {sortify}
+{ purify$
+ "l" change.case$
+}
+
+INTEGERS { len }
+
+FUNCTION {chop.word}
+{ 's :=
+ 'len :=
+ s #1 len substring$ =
+ { s len #1 + global.max$ substring$ }
+ 's
+ if$
+}
+
+% There are three apalike cases: one person (Jones),
+% two (Jones and de~Bruijn), and more (Jones et~al.).
+% This function is much like format.crossref.editors.
+%
+FUNCTION {format.lab.names}
+{ 's :=
+ s #1 "{vv~}{ll}" format.name$
+ s num.names$ duplicate$
+ #2 >
+ { pop$ " et~al." * }
+ { #2 <
+ 'skip$
+ { s #2 "{ff }{vv }{ll}{ jj}" format.name$ "others" =
+ { " et~al." * }
+ { " and " * s #2 "{vv~}{ll}" format.name$ * }
+ if$
+ }
+ if$
+ }
+ if$
+}
+
+FUNCTION {author.key.label}
+{ author empty$
+ { key empty$
+ { cite$ #1 #3 substring$ }
+ 'key % apalike uses the whole key
+ if$
+ }
+ { author format.lab.names }
+ if$
+}
+
+FUNCTION {author.editor.key.label}
+{ author empty$
+ { editor empty$
+ { key empty$
+ { cite$ #1 #3 substring$ }
+ 'key % apalike uses the whole key
+ if$
+ }
+ { editor format.lab.names }
+ if$
+ }
+ { author format.lab.names }
+ if$
+}
+
+FUNCTION {editor.key.label}
+{ editor empty$
+ { key empty$
+ { cite$ #1 #3 substring$ }
+ 'key % apalike uses the whole key, no organization
+ if$
+ }
+ { editor format.lab.names }
+ if$
+}
+
+FUNCTION {calc.label} % this function came from ASTRON.BST (ARR)
+{ type$ "book" =
+ type$ "inbook" =
+ or
+ 'author.editor.key.label
+ { type$ "proceedings" =
+ 'editor.key.label % apalike ignores organization
+ 'author.key.label % for labeling and sorting
+ if$
+ }
+ if$
+ "\protect\astroncite{" swap$ * "}{" % these three lines are
+ * % for apalike, which
+ year field.or.null purify$ #-1 #4 substring$ % uses all four digits
+ * % the mathing closing "}" comes in at the reverse.pass
+ 'label :=
+}
+
+FUNCTION {sort.format.names}
+{ 's :=
+ #1 'nameptr :=
+ ""
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ { nameptr #1 >
+ { " " * }
+ 'skip$
+ if$ % apalike uses initials
+ s nameptr "{vv{ } }{ll{ }}{ f{ }}{ jj{ }}" format.name$ 't := % <= here
+ nameptr numnames = t "others" = and
+ { "et al" * }
+ { t sortify * }
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+}
+
+FUNCTION {sort.format.title}
+{ 't :=
+ "A " #2
+ "An " #3
+ "The " #4 t chop.word
+ chop.word
+ chop.word
+ sortify
+ #1 global.max$ substring$
+}
+
+FUNCTION {author.sort}
+{ author empty$
+ { key empty$
+ { "to sort, need author or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { author sort.format.names }
+ if$
+}
+
+FUNCTION {author.editor.sort}
+{ author empty$
+ { editor empty$
+ { key empty$
+ { "to sort, need author, editor, or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { editor sort.format.names }
+ if$
+ }
+ { author sort.format.names }
+ if$
+}
+
+FUNCTION {editor.sort}
+{ editor empty$
+ { key empty$
+ { "to sort, need editor or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { editor sort.format.names }
+ if$
+}
+
+% apalike uses two sorting passes; the first one sets the
+% labels so that the `a's, `b's, etc. can be computed;
+% the second pass puts the references in "correct" order.
+% The presort function is for the first pass. It computes
+% label, sort.label, and title, and then concatenates.
+FUNCTION {presort}
+{ calc.label
+ label sortify
+ " "
+ *
+ type$ "book" =
+ type$ "inbook" =
+ or
+ 'author.editor.sort
+ { type$ "proceedings" =
+ 'editor.sort
+ 'author.sort
+ if$
+ }
+ if$
+ #1 entry.max$ substring$ % for
+ 'sort.label := % apalike
+ sort.label % style
+ *
+ " "
+ *
+ title field.or.null
+ sort.format.title
+ *
+ #1 entry.max$ substring$
+ 'sort.key$ :=
+}
+
+ITERATE {presort}
+
+SORT % by label, sort.label, title---for final label calculation
+
+STRINGS { last.label next.extra } % apalike labels are only for the text;
+
+INTEGERS { last.extra.num } % there are none in the bibliography
+
+FUNCTION {initialize.extra.label.stuff} % and hence there is no `longest.label'
+{ #0 int.to.chr$ 'last.label :=
+ "" 'next.extra :=
+ #0 'last.extra.num :=
+}
+
+FUNCTION {forward.pass}
+{ last.label label =
+ { last.extra.num #1 + 'last.extra.num :=
+ last.extra.num int.to.chr$ 'extra.label :=
+ }
+ { "a" chr.to.int$ 'last.extra.num :=
+ "" 'extra.label :=
+ label 'last.label :=
+ }
+ if$
+}
+
+FUNCTION {reverse.pass} % this function came from ASTRON.BST (ARR)
+{ next.extra "b" =
+ { "a" 'extra.label := }
+ 'skip$
+ if$
+ label extra.label * "}" * 'label :=
+ extra.label 'next.extra :=
+}
+
+EXECUTE {initialize.extra.label.stuff}
+
+ITERATE {forward.pass}
+
+REVERSE {reverse.pass}
+
+% Now that the label is right we sort for real,
+% on sort.label then year then title. This is
+% for the second sorting pass.
+FUNCTION {bib.sort.order}
+{ sort.label
+ " "
+ *
+ year field.or.null sortify
+ *
+ " "
+ *
+ title field.or.null
+ sort.format.title
+ *
+ #1 entry.max$ substring$
+ 'sort.key$ :=
+}
+
+ITERATE {bib.sort.order}
+
+SORT % by sort.label, year, title---giving final bibliography order
+
+FUNCTION {begin.bib}
+{ preamble$ empty$ % no \etalchar in apalike
+ 'skip$
+ { preamble$ write$ newline$ }
+ if$
+ "\begin{thebibliography}{}" write$ newline$ % no labels in apalike
+}
+
+EXECUTE {begin.bib}
+
+EXECUTE {init.state.consts}
+
+ITERATE {call.type$}
+
+FUNCTION {end.bib}
+{ newline$
+ "\end{thebibliography}" write$ newline$
+}
+
+EXECUTE {end.bib}
diff --git a/biblio/bibtex/contrib/misc/cbe.bst b/biblio/bibtex/contrib/misc/cbe.bst
new file mode 100644
index 0000000000..85c176fa86
--- /dev/null
+++ b/biblio/bibtex/contrib/misc/cbe.bst
@@ -0,0 +1,1161 @@
+%%% ====================================================================
+%%% @BibTeX-style-file{
+%%% author = "Alan Rogers",
+%%% version = "1.1",
+%%% date = "1990",
+%%% filename = "cbe.bst",
+%%% address = "Dept of Anthropology, University of Utah,
+%%% Salt Lake City, UT 84112",
+%%% checksum = "13520 1161 3284 24308",
+%%% email = "rogers@anthro.utah.edu",
+%%% supported = "no",
+%%% docstring = "The file produces bibliographies more or
+%%% less in the Council of Biology Editors
+%%% format, which is used by Evolution,
+%%% American Naturalist, & lots of other
+%%% journals. It was adapted from apalike.bst,
+%%% incorporating features of Sake J.
+%%% Hogeveen's `astron.bst'.
+%%%
+%%% Usage: \documentstyle[astron]{...}
+%%% ...
+%%% \bibliographystyle{cbe}
+%%% ...
+%%%
+%%% The \documentstyle command above invokes
+%%% Hogeveen's `astron.sty', which must be in
+%%% TeX's search path.
+%%%
+%%% The modifications implement `\cite*{}',
+%%% which generates references in short form.
+%%% For example, `Rogers \cite*{...}' would
+%%% produce `Rogers (1992)'."
+%%% }
+%%% ====================================================================
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% BibTeX `apalike' bibliography style (24-Jan-88 version)
+% Adapted from the `alpha' style, version 0.99a; for BibTeX version 0.99a.
+% Copyright (C) 1988, all rights reserved.
+% Copying of this file is allowed, provided that if you make any changes at all
+% you name it something other than `apalike.bst'.
+% This restriction helps ensure that all copies are identical.
+% Differences between this style and `alpha' are generally heralded by a `%'.
+% The file btxbst.doc has the documentation for alpha.bst.
+%
+% This style should be used with the `apalike' LaTeX style (apalike.sty).
+% \cite's come out like "(Jones, 1986)" in the text but there are no labels
+% in the bibliography, and something like "(1986)" comes out immediately
+% after the author. Author (and editor) names appear as last name, comma,
+% initials. A `year' field is required for every entry, and so is either
+% an author (or in some cases, an editor) field or a key field.
+%
+% Editorial note:
+% Many journals require a style like `apalike', but I strongly, strongly,
+% strongly recommend that you not use it if you have a choice---use something
+% like `plain' instead. Mary-Claire van Leunen (A Handbook for Scholars,
+% Knopf, 1979) argues convincingly that a style like `plain' encourages better
+% writing than one like `apalike'. Furthermore the strongest arguments for
+% using an author-date style like `apalike'---that it's "the most practical"
+% (The Chicago Manual of Style, University of Chicago Press, thirteenth
+% edition, 1982, pages 400--401)---fall flat on their face with the new
+% computer-typesetting technology. For instance page 401 anachronistically
+% states "The chief disadvantage of [a style like `plain'] is that additions
+% or deletions cannot be made after the manuscript is typed without changing
+% numbers in both text references and list." LaTeX sidesteps the disadvantage.
+%
+% History:
+% 15-sep-86 (SK,OP) Original version, by Susan King and Oren Patashnik.
+% 10-nov-86 (OP) Truncated the sort.key$ string to the correct length
+% in bib.sort.order to eliminate error message.
+% 24-jan-88 (OP) Updated for BibTeX version 0.99a, from alpha.bst 0.99a;
+% apalike now sorts by author, then year, then title;
+% THIS `apalike' VERSION DOES NOT WORK WITH BIBTEX 0.98i.
+
+ENTRY
+ { address
+ author
+ booktitle
+ chapter
+ edition
+ editor
+ howpublished
+ institution
+ journal
+ key
+% month not used in apalike
+ note
+ number
+ organization
+ pages
+ publisher
+ school
+ series
+ title
+ type
+ volume
+ year
+ }
+ {}
+ { label extra.label sort.label }
+
+INTEGERS { output.state before.all mid.sentence after.sentence after.block }
+
+FUNCTION {init.state.consts}
+{ #0 'before.all :=
+ #1 'mid.sentence :=
+ #2 'after.sentence :=
+ #3 'after.block :=
+}
+
+STRINGS { s t }
+
+FUNCTION {output.nonnull}
+{ 's :=
+ output.state mid.sentence =
+ { ", " * write$ }
+ { output.state after.block =
+ { add.period$ write$
+ newline$
+ "\newblock " write$
+ }
+ { output.state before.all =
+ 'write$
+ { add.period$ " " * write$ }
+ if$
+ }
+ if$
+ mid.sentence 'output.state :=
+ }
+ if$
+ s
+}
+
+FUNCTION {output}
+{ duplicate$ empty$
+ 'pop$
+ 'output.nonnull
+ if$
+}
+
+FUNCTION {output.check}
+{ 't :=
+ duplicate$ empty$
+ { pop$ "empty " t * " in " * cite$ * warning$ }
+ 'output.nonnull
+ if$
+}
+
+% apalike needs this function because
+% the year has special punctuation;
+% apalike ignores the month
+FUNCTION {output.year.check}
+{ year empty$
+ { "empty year in " cite$ * warning$ }
+ { write$
+ " " year * extra.label *
+ mid.sentence 'output.state :=
+ }
+ if$
+}
+
+FUNCTION {output.bibitem}
+{ newline$
+ "\bibitem[" write$
+ label write$
+ "]{" write$
+ cite$ write$
+ "}" write$
+ newline$
+ ""
+ before.all 'output.state :=
+}
+
+FUNCTION {fin.entry}
+{ add.period$
+ write$
+ newline$
+}
+
+FUNCTION {new.block}
+{ output.state before.all =
+ 'skip$
+ { after.block 'output.state := }
+ if$
+}
+
+FUNCTION {new.sentence}
+{ output.state after.block =
+ 'skip$
+ { output.state before.all =
+ 'skip$
+ { after.sentence 'output.state := }
+ if$
+ }
+ if$
+}
+
+FUNCTION {not}
+{ { #0 }
+ { #1 }
+ if$
+}
+
+FUNCTION {and}
+{ 'skip$
+ { pop$ #0 }
+ if$
+}
+
+FUNCTION {or}
+{ { pop$ #1 }
+ 'skip$
+ if$
+}
+
+FUNCTION {new.block.checkb}
+{ empty$
+ swap$ empty$
+ and
+ 'skip$
+ 'new.block
+ if$
+}
+
+FUNCTION {field.or.null}
+{ duplicate$ empty$
+ { pop$ "" }
+ 'skip$
+ if$
+}
+
+FUNCTION {emphasize}
+{ duplicate$ empty$
+ { pop$ "" }
+ { "{\em " swap$ * "}" * }
+ if$
+}
+
+FUNCTION {smallcaps}
+{ duplicate$ empty$
+ { pop$ "" }
+ { "{\sc " swap$ * "}" * }
+ if$
+}
+
+INTEGERS { nameptr namesleft numnames }
+
+FUNCTION {format.names}
+{ 's :=
+ #1 'nameptr :=
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ { s nameptr "{vv~}{ll}{, jj}{, f.}" format.name$ 't := % last name first
+ nameptr #1 >
+ { namesleft #1 >
+ { ", " * t * }
+ { numnames #2 >
+ { "," * }
+ 'skip$
+ if$
+ t "others" =
+ { " et~al." * }
+ { " and " * t * }
+ if$
+ }
+ if$
+ }
+ 't
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+}
+
+FUNCTION {format.editor.names}
+{ 's :=
+ #1 'nameptr :=
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ { s nameptr "{f. }{vv~}{ll}{, jj}" format.name$ 't := % last name first
+ nameptr #1 >
+ { namesleft #1 >
+ { ", " * t * }
+ { numnames #2 >
+ { "," * }
+ 'skip$
+ if$
+ t "others" =
+ { " et~al." * }
+ { " and " * t * }
+ if$
+ }
+ if$
+ }
+ 't
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+}
+
+FUNCTION {format.authors}
+{ author empty$
+ { "" }
+ { author format.names smallcaps }
+ if$
+}
+
+FUNCTION {format.key} % this function is just for apalike
+{ empty$
+ { key field.or.null }
+ { "" }
+ if$
+}
+
+FUNCTION {format.editors}
+{ editor empty$
+ { "" }
+ { editor format.editor.names
+ editor num.names$ #1 >
+ { " (eds.)" * }
+ { " (ed.)" * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.title}
+{ title empty$
+ { "" }
+ { title "t" change.case$ }
+ if$
+}
+
+FUNCTION {n.dashify}
+{ 't :=
+ ""
+ { t empty$ not }
+ { t #1 #1 substring$ "-" =
+ { t #1 #2 substring$ "--" = not
+ { "--" *
+ t #2 global.max$ substring$ 't :=
+ }
+ { { t #1 #1 substring$ "-" = }
+ { "-" *
+ t #2 global.max$ substring$ 't :=
+ }
+ while$
+ }
+ if$
+ }
+ { t #1 #1 substring$ *
+ t #2 global.max$ substring$ 't :=
+ }
+ if$
+ }
+ while$
+}
+
+FUNCTION {format.btitle}
+{ title %emphasize
+}
+
+FUNCTION {tie.or.space.connect}
+{ duplicate$ text.length$ #3 <
+ { "~" }
+ { " " }
+ if$
+ swap$ * *
+}
+
+FUNCTION {either.or.check}
+{ empty$
+ 'pop$
+ { "can't use both " swap$ * " fields in " * cite$ * warning$ }
+ if$
+}
+
+FUNCTION {format.bvolume}
+{ volume empty$
+ { "" }
+ { "volume" volume tie.or.space.connect
+ series empty$
+ 'skip$
+ { " of " * series emphasize * }
+ if$
+ "volume and number" number either.or.check
+ }
+ if$
+}
+
+FUNCTION {format.number.series}
+{ volume empty$
+ { number empty$
+ { series field.or.null }
+ { output.state mid.sentence =
+ { "number" }
+ { "Number" }
+ if$
+ number tie.or.space.connect
+ series empty$
+ { "there's a number but no series in " cite$ * warning$ }
+ { " in " * series * }
+ if$
+ }
+ if$
+ }
+ { "" }
+ if$
+}
+
+FUNCTION {format.edition}
+{ edition empty$
+ { "" }
+ { output.state mid.sentence =
+ { edition "l" change.case$ " edition" * }
+ { edition "t" change.case$ " edition" * }
+ if$
+ }
+ if$
+}
+
+INTEGERS { multiresult }
+
+FUNCTION {multi.page.check}
+{ 't :=
+ #0 'multiresult :=
+ { multiresult not
+ t empty$ not
+ and
+ }
+ { t #1 #1 substring$
+ duplicate$ "-" =
+ swap$ duplicate$ "," =
+ swap$ "+" =
+ or or
+ { #1 'multiresult := }
+ { t #2 global.max$ substring$ 't := }
+ if$
+ }
+ while$
+ multiresult
+}
+
+FUNCTION {format.pages}
+{ pages empty$
+ { "" }
+ { pages multi.page.check
+ { "pp." pages n.dashify tie.or.space.connect }
+ { "p." pages tie.or.space.connect }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.vol.num.pages}
+{ volume field.or.null
+ pages empty$
+ 'skip$
+ { duplicate$ empty$
+ { pop$ format.pages }
+ { ":" * pages n.dashify * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.chapter.pages}
+{ chapter empty$
+ { "" }
+ { type empty$
+ { "chapter" }
+ { type "l" change.case$ }
+ if$
+ chapter tie.or.space.connect
+ }
+ if$
+}
+
+FUNCTION {format.in.ed.booktitle}
+{ booktitle empty$
+ { "" }
+ { editor empty$
+% { "{\em In} " booktitle emphasize * }
+% { "{\em In} " format.editors * ", " * booktitle emphasize * }
+ { "{\em In} " booktitle * }
+ { "{\em In} " format.editors * ", " * booktitle * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.thesis.type}
+{ type empty$
+ 'skip$
+ { pop$
+ type "t" change.case$
+ }
+ if$
+}
+
+FUNCTION {format.tr.number}
+{ type empty$
+ { "Technical Report" }
+ 'type
+ if$
+ number empty$
+ { "t" change.case$ }
+ { number tie.or.space.connect }
+ if$
+}
+
+FUNCTION {format.article.crossref}
+{ "In" % this is for apalike
+ " \cite{" * crossref * "}" *
+}
+
+FUNCTION {format.book.crossref}
+{ volume empty$
+ { "empty volume in " cite$ * "'s crossref of " * crossref * warning$
+ "In "
+ }
+ { "Volume" volume tie.or.space.connect
+ " of " *
+ }
+ if$
+ "\cite{" * crossref * "}" * % this is for apalike
+}
+
+FUNCTION {format.incoll.inproc.crossref}
+{ "In" % this is for apalike
+ " \cite{" * crossref * "}" *
+}
+
+FUNCTION {article}
+{ output.bibitem
+ format.authors "author" output.check
+ author format.key output % special for
+ output.year.check % apalike
+ new.block
+ format.title "title" output.check
+ new.block
+ crossref missing$
+ { journal emphasize " " * format.vol.num.pages * output
+ }
+ { format.article.crossref output.nonnull
+ format.pages output
+ }
+ if$
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {book}
+{ output.bibitem
+ author empty$
+ { format.editors "author and editor" output.check
+ editor format.key output
+ }
+ { format.authors output.nonnull
+ crossref missing$
+ { "author and editor" editor either.or.check }
+ 'skip$
+ if$
+ }
+ if$
+ output.year.check % special for apalike
+ new.block
+ format.btitle "title" output.check
+ crossref missing$
+ { format.bvolume output
+ new.block
+ format.number.series output
+ new.sentence
+ publisher "publisher" output.check
+ address output
+ }
+ { new.block
+ format.book.crossref output.nonnull
+ }
+ if$
+ format.edition output
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {booklet}
+{ output.bibitem
+ format.authors output
+ author format.key output % special for
+ output.year.check % apalike
+ new.block
+ format.title "title" output.check
+ new.block
+ howpublished output
+ address output
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {inbook}
+{ output.bibitem
+ author empty$
+ { format.editors "author and editor" output.check
+ editor format.key output
+ }
+ { format.authors output.nonnull
+ crossref missing$
+ { "author and editor" editor either.or.check }
+ 'skip$
+ if$
+ }
+ if$
+ output.year.check % special for apalike
+ new.block
+ format.btitle "title" output.check
+ crossref missing$
+ { format.bvolume output
+ format.chapter.pages "chapter and pages" output.check
+ new.block
+ format.number.series output
+ new.sentence
+ publisher "publisher" output.check
+ address output
+ }
+ { format.chapter.pages "chapter and pages" output.check
+ new.block
+ format.book.crossref output.nonnull
+ }
+ if$
+ format.edition output
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {incollection}
+{ output.bibitem
+ format.authors "author" output.check
+ author format.key output % special for
+ output.year.check % apalike
+ new.block
+ format.title "title" output.check
+ format.pages output
+ new.block
+ crossref missing$
+ { format.in.ed.booktitle "booktitle" output.check
+ format.bvolume output
+ format.number.series output
+ format.chapter.pages output
+ new.sentence
+ publisher "publisher" output.check
+ address output
+ format.edition output
+ }
+ { format.incoll.inproc.crossref output.nonnull
+ format.chapter.pages output
+ }
+ if$
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {inproceedings}
+{ output.bibitem
+ format.authors "author" output.check
+ author format.key output % special for
+ output.year.check % apalike
+ new.block
+ format.title "title" output.check
+ new.block
+ crossref missing$
+ { format.in.ed.booktitle "booktitle" output.check
+ format.bvolume output
+ format.number.series output
+ format.pages output
+ address output % for apalike
+ new.sentence % there's no year
+ organization output % here so things
+ publisher output % are simpler
+ }
+ { format.incoll.inproc.crossref output.nonnull
+ format.pages output
+ }
+ if$
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {conference} { inproceedings }
+
+FUNCTION {manual}
+{ output.bibitem
+ format.authors output
+ author format.key output % special for
+ output.year.check % apalike
+ new.block
+ format.btitle "title" output.check
+ organization address new.block.checkb
+ organization output
+ address output
+ format.edition output
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {mastersthesis}
+{ output.bibitem
+ format.authors "author" output.check
+ author format.key output % special for
+ output.year.check % apalike
+ new.block
+ format.title "title" output.check
+ new.block
+ "Master's thesis" format.thesis.type output.nonnull
+ school "school" output.check
+ address output
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {misc}
+{ output.bibitem
+ format.authors output
+ author format.key output % special for
+ output.year.check % apalike
+ new.block
+ format.title output
+ new.block
+ howpublished output
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {phdthesis}
+{ output.bibitem
+ format.authors "author" output.check
+ author format.key output % special for
+ output.year.check % apalike
+ new.block
+ format.btitle "title" output.check
+ new.block
+ "PhD thesis" format.thesis.type output.nonnull
+ school "school" output.check
+ address output
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {proceedings}
+{ output.bibitem
+ format.editors output
+ editor format.key output % special for
+ output.year.check % apalike
+ new.block
+ format.btitle "title" output.check
+ format.bvolume output
+ format.number.series output
+ address output % for apalike
+ new.sentence % we always output
+ organization output % a nonempty organization
+ publisher output % here
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {techreport}
+{ output.bibitem
+ format.authors "author" output.check
+ author format.key output % special for
+ output.year.check % apalike
+ new.block
+ format.title "title" output.check
+ new.block
+ format.tr.number output.nonnull
+ institution "institution" output.check
+ address output
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {unpublished}
+{ output.bibitem
+ format.authors "author" output.check
+ author format.key output % special for
+ output.year.check % apalike
+ new.block
+ format.title "title" output.check
+ new.block
+ note "note" output.check
+ fin.entry
+}
+
+FUNCTION {default.type} { misc }
+
+MACRO {jan} {"January"}
+
+MACRO {feb} {"February"}
+
+MACRO {mar} {"March"}
+
+MACRO {apr} {"April"}
+
+MACRO {may} {"May"}
+
+MACRO {jun} {"June"}
+
+MACRO {jul} {"July"}
+
+MACRO {aug} {"August"}
+
+MACRO {sep} {"September"}
+
+MACRO {oct} {"October"}
+
+MACRO {nov} {"November"}
+
+MACRO {dec} {"December"}
+
+MACRO {acmcs} {"ACM Computing Surveys"}
+
+MACRO {acta} {"Acta Informatica"}
+
+MACRO {cacm} {"Communications of the ACM"}
+
+MACRO {ibmjrd} {"IBM Journal of Research and Development"}
+
+MACRO {ibmsj} {"IBM Systems Journal"}
+
+MACRO {ieeese} {"IEEE Transactions on Software Engineering"}
+
+MACRO {ieeetc} {"IEEE Transactions on Computers"}
+
+MACRO {ieeetcad}
+ {"IEEE Transactions on Computer-Aided Design of Integrated Circuits"}
+
+MACRO {ipl} {"Information Processing Letters"}
+
+MACRO {jacm} {"Journal of the ACM"}
+
+MACRO {jcss} {"Journal of Computer and System Sciences"}
+
+MACRO {scp} {"Science of Computer Programming"}
+
+MACRO {sicomp} {"SIAM Journal on Computing"}
+
+MACRO {tocs} {"ACM Transactions on Computer Systems"}
+
+MACRO {tods} {"ACM Transactions on Database Systems"}
+
+MACRO {tog} {"ACM Transactions on Graphics"}
+
+MACRO {toms} {"ACM Transactions on Mathematical Software"}
+
+MACRO {toois} {"ACM Transactions on Office Information Systems"}
+
+MACRO {toplas} {"ACM Transactions on Programming Languages and Systems"}
+
+MACRO {tcs} {"Theoretical Computer Science"}
+
+READ
+
+FUNCTION {sortify}
+{ purify$
+ "l" change.case$
+}
+
+INTEGERS { len }
+
+FUNCTION {chop.word}
+{ 's :=
+ 'len :=
+ s #1 len substring$ =
+ { s len #1 + global.max$ substring$ }
+ 's
+ if$
+}
+
+% There are three apalike cases: one person (Jones),
+% two (Jones and de~Bruijn), and more (Jones et~al.).
+% This function is much like format.crossref.editors.
+%
+FUNCTION {format.lab.names}
+{ 's :=
+ s #1 "{vv~}{ll}" format.name$
+ s num.names$ duplicate$
+ #2 >
+ { pop$ " et~al." * }
+ { #2 <
+ 'skip$
+ { s #2 "{ff }{vv }{ll}{ jj}" format.name$ "others" =
+ { " et~al." * }
+ { " and " * s #2 "{vv~}{ll}" format.name$ * }
+ if$
+ }
+ if$
+ }
+ if$
+}
+
+FUNCTION {author.key.label}
+{ author empty$
+ { key empty$
+ { cite$ #1 #3 substring$ }
+ 'key % apalike uses the whole key
+ if$
+ }
+ { author format.lab.names }
+ if$
+}
+
+FUNCTION {author.editor.key.label}
+{ author empty$
+ { editor empty$
+ { key empty$
+ { cite$ #1 #3 substring$ }
+ 'key % apalike uses the whole key
+ if$
+ }
+ { editor format.lab.names }
+ if$
+ }
+ { author format.lab.names }
+ if$
+}
+
+FUNCTION {editor.key.label}
+{ editor empty$
+ { key empty$
+ { cite$ #1 #3 substring$ }
+ 'key % apalike uses the whole key, no organization
+ if$
+ }
+ { editor format.lab.names }
+ if$
+}
+
+FUNCTION {calc.label} % this function came from ASTRON.BST (ARR)
+{ type$ "book" =
+ type$ "inbook" =
+ or
+ 'author.editor.key.label
+ { type$ "proceedings" =
+ 'editor.key.label % apalike ignores organization
+ 'author.key.label % for labeling and sorting
+ if$
+ }
+ if$
+ "\protect\astroncite{" swap$ * "}{" % these three lines are
+ * % for apalike, which
+ year field.or.null purify$ #-1 #4 substring$ % uses all four digits
+ * % the mathing closing "}" comes in at the reverse.pass
+ 'label :=
+}
+
+FUNCTION {sort.format.names}
+{ 's :=
+ #1 'nameptr :=
+ ""
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ { nameptr #1 >
+ { " " * }
+ 'skip$
+ if$ % apalike uses initials
+ s nameptr "{vv{ } }{ll{ }}{ f{ }}{ jj{ }}" format.name$ 't := % <= here
+ nameptr numnames = t "others" = and
+ { "et al" * }
+ { t sortify * }
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+}
+
+FUNCTION {sort.format.title}
+{ 't :=
+ "A " #2
+ "An " #3
+ "The " #4 t chop.word
+ chop.word
+ chop.word
+ sortify
+ #1 global.max$ substring$
+}
+
+FUNCTION {author.sort}
+{ author empty$
+ { key empty$
+ { "to sort, need author or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { author sort.format.names }
+ if$
+}
+
+FUNCTION {author.editor.sort}
+{ author empty$
+ { editor empty$
+ { key empty$
+ { "to sort, need author, editor, or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { editor sort.format.names }
+ if$
+ }
+ { author sort.format.names }
+ if$
+}
+
+FUNCTION {editor.sort}
+{ editor empty$
+ { key empty$
+ { "to sort, need editor or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { editor sort.format.names }
+ if$
+}
+
+% apalike uses two sorting passes; the first one sets the
+% labels so that the `a's, `b's, etc. can be computed;
+% the second pass puts the references in "correct" order.
+% The presort function is for the first pass. It computes
+% label, sort.label, and title, and then concatenates.
+FUNCTION {presort}
+{ calc.label
+ label sortify
+ " "
+ *
+ type$ "book" =
+ type$ "inbook" =
+ or
+ 'author.editor.sort
+ { type$ "proceedings" =
+ 'editor.sort
+ 'author.sort
+ if$
+ }
+ if$
+ #1 entry.max$ substring$ % for
+ 'sort.label := % apalike
+ sort.label % style
+ *
+ " "
+ *
+ title field.or.null
+ sort.format.title
+ *
+ #1 entry.max$ substring$
+ 'sort.key$ :=
+}
+
+ITERATE {presort}
+
+SORT % by label, sort.label, title---for final label calculation
+
+STRINGS { last.label next.extra } % apalike labels are only for the text;
+
+INTEGERS { last.extra.num } % there are none in the bibliography
+
+FUNCTION {initialize.extra.label.stuff} % and hence there is no `longest.label'
+{ #0 int.to.chr$ 'last.label :=
+ "" 'next.extra :=
+ #0 'last.extra.num :=
+}
+
+FUNCTION {forward.pass}
+{ last.label label =
+ { last.extra.num #1 + 'last.extra.num :=
+ last.extra.num int.to.chr$ 'extra.label :=
+ }
+ { "a" chr.to.int$ 'last.extra.num :=
+ "" 'extra.label :=
+ label 'last.label :=
+ }
+ if$
+}
+
+FUNCTION {reverse.pass} % this function came from ASTRON.BST (ARR)
+{ next.extra "b" =
+ { "a" 'extra.label := }
+ 'skip$
+ if$
+ label extra.label * "}" * 'label :=
+ extra.label 'next.extra :=
+}
+
+EXECUTE {initialize.extra.label.stuff}
+
+ITERATE {forward.pass}
+
+REVERSE {reverse.pass}
+
+% Now that the label is right we sort for real,
+% on sort.label then year then title. This is
+% for the second sorting pass.
+FUNCTION {bib.sort.order}
+{ sort.label
+ " "
+ *
+ year field.or.null sortify
+ *
+ " "
+ *
+ title field.or.null
+ sort.format.title
+ *
+ #1 entry.max$ substring$
+ 'sort.key$ :=
+}
+
+ITERATE {bib.sort.order}
+
+SORT % by sort.label, year, title---giving final bibliography order
+
+FUNCTION {begin.bib}
+{ preamble$ empty$ % no \etalchar in apalike
+ 'skip$
+ { preamble$ write$ newline$ }
+ if$
+ "\begin{thebibliography}{}" write$ newline$ % no labels in apalike
+}
+
+EXECUTE {begin.bib}
+
+EXECUTE {init.state.consts}
+
+ITERATE {call.type$}
+
+FUNCTION {end.bib}
+{ newline$
+ "\end{thebibliography}" write$ newline$
+}
+
+EXECUTE {end.bib}
diff --git a/biblio/bibtex/contrib/misc/chicagoa.bst b/biblio/bibtex/contrib/misc/chicagoa.bst
new file mode 100644
index 0000000000..d87ca40299
--- /dev/null
+++ b/biblio/bibtex/contrib/misc/chicagoa.bst
@@ -0,0 +1,1683 @@
+%%% ====================================================================
+%%% @BibTeX-style-file{
+%%% author = "Glenn Paulley",
+%%% version = "4",
+%%% date = "28 August 1992",
+%%% time = "10:24:38 199",
+%%% filename = "chicagoa.bst",
+%%% address = "Data Structuring Group
+%%% Department of Computer Science
+%%% University of Waterloo
+%%% Waterloo, Ontario, Canada
+%%% N2L 3G1",
+%%% telephone = "(519) 885-1211",
+%%% FAX = "(519) 885-1208",
+%%% checksum = "62428 1684 5231 38311",
+%%% email = "gnpaulle@bluebox.uwaterloo.ca",
+%%% codetable = "ISO/ASCII",
+%%% keywords = "",
+%%% supported = "yes",
+%%% abstract = "A BibTeX bibliography style that follows the
+%%% `B' reference style of the 13th Edition of
+%%% the Chicago Manual of Style. Supports annotated
+%%% bibliographies through the BibTeX field
+%%% `annotation'. A detailed feature list is given
+%%% below.",
+%%% docstring = "The checksum field above contains a CRC-16
+%%% checksum as the first value, followed by the
+%%% equivalent of the standard UNIX wc (word
+%%% count) utility output of lines, words, and
+%%% characters. This is produced by Robert
+%%% Solovay's checksum utility.",
+%%% }
+%%% ====================================================================
+%
+% "Chicago" BibTeX style, chicagoa.bst - Chicago style with annotations
+% =====================================================================
+%
+% BibTeX `chicagoa' style file for BibTeX version 0.99c, LaTeX version 2.09
+% Place it in a file called chicagoa.bst in the BibTeX search path.
+% You need to include chicago.sty as a \documentstyle option.
+% (Placing it in the same directory as the LaTeX document should also work.)
+% This "chicago" style is based on newapa.bst (American Psych. Assoc.)
+% found at ymir.claremont.edu. Annotation support added 07/09/92.
+% Modifications are loosely based on Chicago Manual of Style.
+%
+% Citation format: (author-last-name year)
+% (author-last-name and author-last-name year)
+% (author-last-name, author-last-name, and author-last-name year)
+% (author-last-name et al. year)
+% (author-last-name)
+% author-last-name (year)
+% (author-last-name and author-last-name)
+% (author-last-name et al.)
+% (year) or (year,year)
+% year or year,year
+%
+% Reference list ordering: alphabetical by author or whatever passes
+% for author in the absence of one.
+%
+% This BibTeX style has support for abbreviated author lists and for
+% year-only citations. This is done by having the citations
+% actually look like
+%
+% \citeauthoryear{full-author-info}{abbrev-author-info}{year}
+%
+% The LaTeX style has to have the following (or similar)
+%
+% \let\@internalcite\cite
+% \def\fullcite{\def\citeauthoryear##1##2##3{##1, ##3}\@internalcite}
+% \def\fullciteA{\def\citeauthoryear##1##2##3{##1}\@internalcite}
+% \def\shortcite{\def\citeauthoryear##1##2##3{##2, ##3}\@internalcite}
+% \def\shortciteA{\def\citeauthoryear##1##2##3{##2}\@internalcite}
+% \def\citeyear{\def\citeauthoryear##1##2##3{##3}\@internalcite}
+%
+% These TeX macro definitions are found in chicago.sty. Additional
+% commands to manipulate different components of a citation can be defined
+% so that, for example, you can list author's names without parentheses
+% if using a citation as a noun or object in a sentence.
+%
+% This file was originally copied from newapa.bst at ymir.claremont.edu.
+%
+% Features of chicago.bst:
+% =======================
+%
+% - supports an "annotation" field for annotated bibliographies.
+% - full names used in citations, but abbreviated citations are available
+% (see above)
+% - if an entry has a "month", then the month and year are also printed
+% as part of that bibitem.
+% - all conjunctions use "and" instead of "\&"
+% - major modification from Chicago Manual of Style (13th ed.) is that
+% only the first author in a reference appears last name first-
+% additional authors appear as J. Q. Public.
+% - pages are listed as "pp. xx-xx" in all entry types except
+% article entries.
+% - book, inbook, and manual use "location: publisher" (or organization)
+% for address and publisher. All other types list publishers separately.
+% - "pp." are used to identify page numbers for all entry types except
+% articles.
+% - organization is used as a citation label if neither author nor editor
+% is present (for manuals).
+% - "et al." is used for long author and editor lists, or when "others"
+% is used.
+%
+% Modifications and bug fixes from newapa.bst:
+% ===========================================
+%
+% - added month, year to bib entries if month is present
+% - fixed bug with In proceedings, added necessary comma after title
+% - all conjunctions changed to "and" from "\&"
+% - fixed bug with author labels in my.full.label: "et al." now is
+% generated when "others" is an author name
+% - major modification from Chicago Manual of Style (13th ed.) is that
+% only the first author in a reference appears last name first-
+% additional authors appear as J. Q. Public.
+% - pages are listed as "pp. xx-xx" in all entry types except
+% article entries. Unnecessary (IMHO) "()" around page numbers
+% were removed, and page numbers now don't end with a period.
+% - created chicago.sty for use with this bibstyle (required).
+% - fixed bugs in FUNCTION {format.vol.num.pages} for missing volume,
+% number, and /or pages. Renamed to format.jour.vol.
+% - fixed bug in formatting booktitles: additional period an error if
+% book has a volume.
+% - fixed bug: editors usually given redundant period before next clause
+% (format.editors.dot) removed.
+% - added label support for organizations, if both author and editor
+% are missing (from alpha.bst). If organization is too long, then
+% the key field is used for abbreviated citations.
+% - In proceedings or books of several volumes, no comma was written
+% between the "Volume x" and the page numbers (this was intentional
+% in newapa.bst). Fixed.
+% - Some journals may not have volumes/numbers, only month/year (eg.
+% IEEE Computer). Fixed bug in article style that assumed volume/number
+% was always present.
+%
+% Original documentation for newapa.sty:
+% =====================================
+%
+% This version was made by modifying the master file made by
+% Oren Patashnik (PATASHNIK@SCORE.STANFORD.EDU), and the 'named' BibTeX
+% style of Peter F. Patel-Schneider.
+%
+% Copyright (C) 1985, all rights reserved.
+% Copying of this file is authorized only if either
+% (1) you make absolutely no changes to your copy, including name, or
+% (2) if you do make changes, you name it something other than 'newapa.bst'.
+% There are undoubtably bugs in this style. If you make bug fixes,
+% improvements, etc. please let me know. My e-mail address is:
+% spencer@cgrg.ohio.state.edu or 71160.3141@compuserve.com
+%
+% This style was made from 'plain.bst', 'named.bst', and 'apalike.bst',
+% with lots of tweaking to make it look like APA style, along with tips
+% from Young Ryu and Brian Reiser's modifications of 'apalike.bst'.
+
+ENTRY
+ { address
+ annotation
+ author
+ booktitle
+ chapter
+ edition
+ editor
+ howpublished
+ institution
+ journal
+ key
+ month
+ note
+ number
+ organization
+ pages
+ publisher
+ school
+ series
+ title
+ type
+ volume
+ year
+ }
+ {}
+ { label.year extra.label sort.year sort.label }
+
+INTEGERS { output.state before.all mid.sentence after.sentence after.block }
+
+FUNCTION {init.state.consts}
+{ #0 'before.all :=
+ #1 'mid.sentence :=
+ #2 'after.sentence :=
+ #3 'after.block :=
+}
+
+STRINGS { s t u }
+
+FUNCTION {output.nonnull}
+{ 's :=
+ output.state mid.sentence =
+ { ", " * write$ }
+ { output.state after.block =
+ { add.period$ write$
+ newline$
+ "\newblock " write$
+ }
+ { output.state before.all =
+ 'write$
+ { add.period$ " " * write$ }
+ if$
+ }
+ if$
+ mid.sentence 'output.state :=
+ }
+ if$
+ s
+}
+
+% Use a colon to separate output. Used only for address/publisher
+% combination in book/inbook types, address/institution for manuals,
+% and organization:publisher for proceedings (inproceedings).
+%
+FUNCTION {output.nonnull.colon}
+{ 's :=
+ output.state mid.sentence =
+ { ": " * write$ }
+ { output.state after.block =
+ { add.period$ write$
+ newline$
+ "\newblock " write$
+ }
+ { output.state before.all =
+ 'write$
+ { add.period$ " " * write$ }
+ if$
+ }
+ if$
+ mid.sentence 'output.state :=
+ }
+ if$
+ s
+}
+
+FUNCTION {output}
+{ duplicate$ empty$
+ 'pop$
+ 'output.nonnull
+ if$
+}
+
+FUNCTION {output.colon}
+{ duplicate$ empty$
+ 'pop$
+ 'output.nonnull.colon
+ if$
+}
+
+FUNCTION {output.check}
+{ 't :=
+ duplicate$ empty$
+ { pop$ "empty " t * " in " * cite$ * warning$ }
+ 'output.nonnull
+ if$
+}
+
+FUNCTION {output.check.colon}
+{ 't :=
+ duplicate$ empty$
+ { pop$ "empty " t * " in " * cite$ * warning$ }
+ 'output.nonnull.colon
+ if$
+}
+
+FUNCTION {output.year.check}
+{ year empty$
+ { "empty year in " cite$ * warning$ }
+ { write$
+ " (" year * extra.label *
+ month empty$
+ { ")" * }
+ { ", " * month * ")" * }
+ if$
+ mid.sentence 'output.state :=
+ }
+ if$
+}
+
+
+FUNCTION {fin.entry}
+{ add.period$
+ write$
+ newline$
+}
+
+FUNCTION {new.block}
+{ output.state before.all =
+ 'skip$
+ { after.block 'output.state := }
+ if$
+}
+
+FUNCTION {new.sentence}
+{ output.state after.block =
+ 'skip$
+ { output.state before.all =
+ 'skip$
+ { after.sentence 'output.state := }
+ if$
+ }
+ if$
+}
+
+FUNCTION {not}
+{ { #0 }
+ { #1 }
+ if$
+}
+
+FUNCTION {and}
+{ 'skip$
+ { pop$ #0 }
+ if$
+}
+
+FUNCTION {or}
+{ { pop$ #1 }
+ 'skip$
+ if$
+}
+
+FUNCTION {new.block.checka}
+{ empty$
+ 'skip$
+ 'new.block
+ if$
+}
+
+FUNCTION {new.block.checkb}
+{ empty$
+ swap$ empty$
+ and
+ 'skip$
+ 'new.block
+ if$
+}
+
+FUNCTION {new.sentence.checka}
+{ empty$
+ 'skip$
+ 'new.sentence
+ if$
+}
+
+FUNCTION {new.sentence.checkb}
+{ empty$
+ swap$ empty$
+ and
+ 'skip$
+ 'new.sentence
+ if$
+}
+
+FUNCTION {field.or.null}
+{ duplicate$ empty$
+ { pop$ "" }
+ 'skip$
+ if$
+}
+
+%
+% Emphasize the top string on the stack.
+%
+FUNCTION {emphasize}
+{ duplicate$ empty$
+ { pop$ "" }
+ { "{\em " swap$ * "}" * }
+ if$
+}
+
+%
+% Emphasize the top string on the stack, but add a trailing space.
+%
+FUNCTION {emphasize.space}
+{ duplicate$ empty$
+ { pop$ "" }
+ { "{\em " swap$ * "\/}" * }
+ if$
+}
+
+INTEGERS { nameptr namesleft numnames }
+%
+% Format bibliographical entries with the first author last name first,
+% and subsequent authors with initials followed by last name.
+% All names are formatted in this routine.
+%
+FUNCTION {format.names}
+{ 's :=
+ #1 'nameptr := % nameptr = 1;
+ s num.names$ 'numnames := % numnames = num.name$(s);
+ numnames 'namesleft :=
+ { namesleft #0 > }
+
+ { nameptr #1 =
+ {s nameptr "{vv~}{ll}{, jj}{, f.}" format.name$ 't := }
+ {s nameptr "{f.~}{vv~}{ll}{, jj}" format.name$ 't := }
+ if$
+ nameptr #1 >
+ { namesleft #1 >
+ { ", " * t * }
+ { numnames #2 >
+ { "," * }
+ 'skip$
+ if$
+ t "others" =
+ { " et~al." * }
+ { " and " * t * } % from Chicago Manual of Style
+ if$
+ }
+ if$
+ }
+ 't
+ if$
+ nameptr #1 + 'nameptr := % nameptr += 1;
+ namesleft #1 - 'namesleft := % namesleft =- 1;
+ }
+ while$
+}
+
+FUNCTION {my.full.label}
+{ 's :=
+ #1 'nameptr := % nameptr = 1;
+ s num.names$ 'numnames := % numnames = num.name$(s);
+ numnames 'namesleft :=
+ { namesleft #0 > }
+
+ { s nameptr "{vv~}{ll}" format.name$ 't := % get the next name
+ nameptr #1 >
+ { namesleft #1 >
+ { ", " * t * }
+ { numnames #2 >
+ { "," * }
+ 'skip$
+ if$
+ t "others" =
+ { " et~al." * }
+ { " and " * t * } % from Chicago Manual of Style
+ if$
+ }
+ if$
+ }
+ 't
+ if$
+ nameptr #1 + 'nameptr := % nameptr += 1;
+ namesleft #1 - 'namesleft := % namesleft =- 1;
+ }
+ while$
+
+}
+
+FUNCTION {format.names.fml}
+%
+% Format names in "familiar" format, with first initial followed by
+% last name. Like format.names, ALL names are formatted.
+%
+{ 's :=
+ #1 'nameptr := % nameptr = 1;
+ s num.names$ 'numnames := % numnames = num.name$(s);
+ numnames 'namesleft :=
+ { namesleft #0 > }
+
+ { s nameptr "{f.~}{vv~}{ll}{, jj}" format.name$ 't :=
+
+ nameptr #1 >
+ { namesleft #1 >
+ { ", " * t * }
+ { numnames #2 >
+ { "," * }
+ 'skip$
+ if$
+ t "others" =
+ { " et~al." * }
+ { " and " * t * }
+% { " \& " * t * }
+ if$
+ }
+ if$
+ }
+ 't
+ if$
+ nameptr #1 + 'nameptr := % nameptr += 1;
+ namesleft #1 - 'namesleft := % namesleft =- 1;
+ }
+ while$
+}
+
+FUNCTION {format.annotation}
+{ annotation empty$
+ { "" }
+ { " \begin{quotation}\noindent "
+ annotation
+ * " \end{quotation} " *
+ }
+ if$
+}
+
+FUNCTION {format.authors}
+{ author empty$
+ { "" }
+ { author format.names }
+ if$
+}
+
+FUNCTION {format.key}
+{ empty$
+ { key field.or.null }
+ { "" }
+ if$
+}
+
+%
+% Format editor names for use in the "in" types: inbook, incollection,
+% inproceedings: first initial, then last names. When editors are the
+% LABEL for an entry, then format.editor is used which lists editors
+% by last name first.
+%
+FUNCTION {format.editors.fml}
+{ editor empty$
+ { "" }
+ { editor format.names.fml
+ editor num.names$ #1 >
+ { " (Eds.)" * }
+ { " (Ed.)" * }
+ if$
+ }
+ if$
+}
+
+%
+% Format editor names for use in labels, last names first.
+%
+FUNCTION {format.editors}
+{ editor empty$
+ { "" }
+ { editor format.names
+ editor num.names$ #1 >
+ { " (Eds.)" * }
+ { " (Ed.)" * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.title}
+{ title empty$
+ { "" }
+ { title "t" change.case$ }
+ if$
+}
+
+% Note that the APA style requres case changes
+% in article titles. The following does not
+% change cases. If you perfer it, uncomment the
+% following and comment out the above.
+
+%FUNCTION {format.title}
+%{ title empty$
+% { "" }
+% { title }
+% if$
+%}
+
+FUNCTION {n.dashify}
+{ 't :=
+ ""
+ { t empty$ not }
+ { t #1 #1 substring$ "-" =
+ { t #1 #2 substring$ "--" = not
+ { "--" *
+ t #2 global.max$ substring$ 't :=
+ }
+ { { t #1 #1 substring$ "-" = }
+ { "-" *
+ t #2 global.max$ substring$ 't :=
+ }
+ while$
+ }
+ if$
+ }
+ { t #1 #1 substring$ *
+ t #2 global.max$ substring$ 't :=
+ }
+ if$
+ }
+ while$
+}
+
+FUNCTION {format.btitle}
+{ edition empty$
+ { title emphasize }
+ { title empty$
+ { title emphasize }
+ { volume empty$ % gnp - check for volume, then don't need period
+ { "{\em " title * "\/} (" * edition * " ed.)" * "." * }
+ { "{\em " title * "\/} (" * edition * " ed.)" * }
+ if$
+ }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.emphasize.booktitle}
+{ edition empty$
+ { booktitle emphasize }
+ { booktitle empty$
+ { booktitle emphasize }
+ { volume empty$ % gnp - extra period an error if book has a volume
+ { "{\em " booktitle * "\/} (" * edition * " ed.)" * "." *}
+ { "{\em " booktitle * "\/} (" * edition * " ed.)" * }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+
+
+FUNCTION {tie.or.space.connect}
+{ duplicate$ text.length$ #3 <
+ { "~" }
+ { " " }
+ if$
+ swap$ * *
+}
+
+FUNCTION {either.or.check}
+{ empty$
+ 'pop$
+ { "can't use both " swap$ * " fields in " * cite$ * warning$ }
+ if$
+}
+
+FUNCTION {format.bvolume}
+{ volume empty$
+ { "" }
+ { "Volume" volume tie.or.space.connect % gnp - changed to mixed case
+ series empty$
+ 'skip$
+ { " of " * series emphasize * }
+ if$
+ "volume and number" number either.or.check
+ }
+ if$
+}
+
+FUNCTION {format.number.series}
+{ volume empty$
+ { number empty$
+ { series field.or.null }
+ { output.state mid.sentence =
+ { "Number" } % gnp - changed to mixed case always
+ { "Number" }
+ if$
+ number tie.or.space.connect
+ series empty$
+ { "there's a number but no series in " cite$ * warning$ }
+ { " in " * series * }
+ if$
+ }
+ if$
+ }
+ { "" }
+ if$
+}
+
+INTEGERS { multiresult }
+
+FUNCTION {multi.page.check}
+{ 't :=
+ #0 'multiresult :=
+ { multiresult not
+ t empty$ not
+ and
+ }
+ { t #1 #1 substring$
+ duplicate$ "-" =
+ swap$ duplicate$ "," =
+ swap$ "+" =
+ or or
+ { #1 'multiresult := }
+ { t #2 global.max$ substring$ 't := }
+ if$
+ }
+ while$
+ multiresult
+}
+
+FUNCTION {format.pages}
+{ pages empty$
+ { "" }
+ { pages multi.page.check
+ { "pp.\ " pages n.dashify tie.or.space.connect } % gnp - removed ()
+ { "pp.\ " pages tie.or.space.connect }
+ if$
+ }
+ if$
+}
+
+% By Young (and Spencer)
+% GNP - fixed bugs with missing volume, number, and/or pages
+%
+% Format journal, volume, number, pages for article types.
+%
+FUNCTION {format.jour.vol}
+{ journal empty$
+ { "no journal in " cite$ * warning$
+ "" }
+ { journal emphasize.space }
+ if$
+ number empty$
+ { volume empty$
+ { "no number and no volume in " cite$ * warning$
+ "" * }
+ { "~{\em " * Volume * "}" * }
+ if$
+ }
+ { volume empty$
+ {"no volume for " cite$ * warning$
+ "~(" * number * ")" * }
+ { "~" *
+ volume emphasize.space
+ "(" * number * ")" * * }
+ if$
+ }
+ if$
+ pages empty$
+ {"page numbers missing in " cite$ * warning$
+ "" * } % gnp - place a null string on the stack for output
+ { duplicate$ empty$
+ { pop$ format.pages }
+ { ", " * pages n.dashify * } % gnp - removed pp. for articles
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.chapter.pages}
+{ chapter empty$
+ 'format.pages
+ { type empty$
+ { "Chapter" } % gnp - changed to mixed case
+ { type "t" change.case$ }
+ if$
+ chapter tie.or.space.connect
+ pages empty$
+ {"page numbers missing in " cite$ * warning$} % gnp - added check
+ { ", " * format.pages * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.in.ed.booktitle}
+{ booktitle empty$
+ { "" }
+ { editor empty$
+ { "In " format.emphasize.booktitle * }
+ { "In " format.editors.fml * ", " * format.emphasize.booktitle * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.thesis.type}
+{ type empty$
+ 'skip$
+ { pop$
+ type "t" change.case$
+ }
+ if$
+}
+
+FUNCTION {format.tr.number}
+{ type empty$
+ { "Technical Report" }
+ 'type
+ if$
+ number empty$
+ { "t" change.case$ }
+ { number tie.or.space.connect }
+ if$
+}
+
+FUNCTION {format.article.crossref}
+{ "See"
+ "\citeN{" * crossref * "}" *
+}
+
+FUNCTION {format.crossref.editor}
+{ editor #1 "{vv~}{ll}" format.name$
+ editor num.names$ duplicate$
+ #2 >
+ { pop$ " et~al." * }
+ { #2 <
+ 'skip$
+ { editor #2 "{ff }{vv }{ll}{ jj}" format.name$ "others" =
+ { " et~al." * }
+ { " and " * editor #2 "{vv~}{ll}" format.name$ * }
+ if$
+ }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.book.crossref}
+{ volume empty$
+ { "empty volume in " cite$ * "'s crossref of " * crossref * warning$
+ "In "
+ }
+ { "Volume" volume tie.or.space.connect % gnp - changed to mixed case
+ " of " *
+ }
+ if$
+ editor empty$
+ editor field.or.null author field.or.null =
+ or
+ { key empty$
+ { series empty$
+ { "need editor, key, or series for " cite$ * " to crossref " *
+ crossref * warning$
+ "" *
+ }
+ { "{\em " * series * "\/}" * }
+ if$
+ }
+ { key * }
+ if$
+ }
+ { format.crossref.editor * }
+ if$
+ " \citeN{" * crossref * "}" *
+}
+
+FUNCTION {format.incoll.inproc.crossref}
+{ "See"
+ " \citeN{" * crossref * "}" *
+}
+
+% format.lab.names:
+%
+% determines "short" names for the abbreviated author information.
+% "Long" labels are created in calc.label, using the routine my.full.label
+% to format author and editor fields.
+%
+% There are 4 cases for labels. (n=3 in the example)
+% a) one author Foo
+% b) one to n Foo, Bar and Baz
+% c) use of "and others" Foo, Bar et al.
+% d) more than n Foo et al.
+%
+FUNCTION {format.lab.names}
+{ 's :=
+ s num.names$ 'numnames :=
+ numnames #2 > % change number to number of others allowed before
+ % forcing "et al".
+ { s #1 "{vv~}{ll}" format.name$ " et~al." * }
+ {
+ numnames #1 - 'namesleft :=
+ #2 'nameptr :=
+ s #1 "{vv~}{ll}" format.name$
+ { namesleft #0 > }
+ { nameptr numnames =
+ { s nameptr "{ff }{vv }{ll}{ jj}" format.name$ "others" =
+ { " et~al." * }
+ { " and " * s nameptr "{vv~}{ll}" format.name$ * }
+ if$
+ }
+ { ", " * s nameptr "{vv~}{ll}" format.name$ * }
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+ }
+ if$
+}
+
+FUNCTION {author.key.label}
+{ author empty$
+ { key empty$
+ { "no key, author in " cite$ * warning$
+ cite$ #1 #3 substring$ }
+ 'key
+ if$
+ }
+ { author format.lab.names }
+ if$
+}
+
+FUNCTION {editor.key.label}
+{ editor empty$
+ { key empty$
+ { "no key, editor in " cite$ * warning$
+ cite$ #1 #3 substring$ }
+ 'key
+ if$
+ }
+ { editor format.lab.names }
+ if$
+}
+
+FUNCTION {author.key.organization.label}
+%
+% added - gnp. Provide label formatting by organization if author is null.
+%
+{ author empty$
+ { organization empty$
+ { key empty$
+ { "no key, author or organization in " cite$ * warning$
+ cite$ #1 #3 substring$ }
+ 'key
+ if$
+ }
+ { organization }
+ if$
+ }
+ { author format.lab.names }
+ if$
+}
+
+FUNCTION {editor.key.organization.label}
+%
+% added - gnp. Provide label formatting by organization if editor is null.
+%
+{ editor empty$
+ { organization empty$
+ { key empty$
+ { "no key, editor or organization in " cite$ * warning$
+ cite$ #1 #3 substring$ }
+ 'key
+ if$
+ }
+ { organization }
+ if$
+ }
+ { editor format.lab.names }
+ if$
+}
+
+FUNCTION {author.editor.key.label}
+{ author empty$
+ { editor empty$
+ { key empty$
+ { "no key, author, or editor in " cite$ * warning$
+ cite$ #1 #3 substring$ }
+ 'key
+ if$
+ }
+ { editor format.lab.names }
+ if$
+ }
+ { author format.lab.names }
+ if$
+}
+
+FUNCTION {calc.label}
+%
+% Changed - GNP. See also author.organization.sort, editor.organization.sort
+% Form label for BibTeX entry. The classification of which fields are used
+% for which type of entry (book, inbook, etc.) are taken from alpha.bst.
+% The change here from newapa is to also include organization as a
+% citation label if author or editor is missing.
+%
+{ type$ "book" =
+ type$ "inbook" =
+ or
+ 'author.editor.key.label
+ { type$ "proceedings" =
+ 'editor.key.organization.label
+ { type$ "manual" =
+ 'author.key.organization.label
+ 'author.key.label
+ if$
+ }
+ if$
+ }
+ if$
+
+ author empty$ % generate the full label citation information.
+ { editor empty$
+ { organization empty$
+ { "no author, editor, or organization in " cite$ * warning$
+ "??" }
+ { organization }
+ if$
+ }
+ { editor my.full.label }
+ if$
+ }
+ { author my.full.label }
+ if$
+
+% leave label on the stack, to be popped when required.
+
+ "}{" * swap$ * "}{" *
+% year field.or.null purify$ #-1 #4 substring$ *
+%
+% save the year for sort processing afterwards (adding a, b, c, etc.)
+%
+ year field.or.null purify$ #-1 #4 substring$
+ 'label.year :=
+}
+
+FUNCTION {output.bibitem}
+{ newline$
+
+ "\bibitem[\protect\citeauthoryear{" write$
+ calc.label write$
+ sort.year write$
+ "}]{" write$
+
+ cite$ write$
+ "}" write$
+ newline$
+ ""
+ before.all 'output.state :=
+}
+
+FUNCTION {article}
+{ output.bibitem
+ format.authors
+ "author" output.check
+ author format.key output % added
+ output.year.check % added
+ new.block
+ format.title
+ "title" output.check
+ new.block
+ crossref missing$
+ { format.jour.vol output
+ }
+ { format.article.crossref output.nonnull
+ format.pages output
+ }
+ if$
+ new.block
+ note output
+ fin.entry
+ format.annotation write$
+ newline$
+}
+
+FUNCTION {book}
+{ output.bibitem
+ author empty$
+ { format.editors
+ "author and editor" output.check }
+ { format.authors
+ output.nonnull
+ crossref missing$
+ { "author and editor" editor either.or.check }
+ 'skip$
+ if$
+ }
+ if$
+ output.year.check % added
+ new.block
+ format.btitle
+ "title" output.check
+ crossref missing$
+ { format.bvolume output
+ new.block
+ format.number.series output
+ new.sentence
+ address output
+ publisher "publisher" output.check.colon
+ }
+ { new.block
+ format.book.crossref output.nonnull
+ }
+ if$
+ new.block
+ note output
+ fin.entry
+ format.annotation write$
+ newline$
+}
+
+FUNCTION {booklet}
+{ output.bibitem
+ format.authors output
+ author format.key output % added
+ output.year.check % added
+ new.block
+ format.title
+ "title" output.check
+ new.block
+ howpublished output
+ address output
+ new.block
+ note output
+ fin.entry
+ format.annotation write$
+}
+
+FUNCTION {inbook}
+{ output.bibitem
+ author empty$
+ { format.editors
+ "author and editor" output.check
+ }
+ { format.authors output.nonnull
+ crossref missing$
+ { "author and editor" editor either.or.check }
+ 'skip$
+ if$
+ }
+ if$
+ output.year.check % added
+ new.block
+ format.btitle
+ "title" output.check
+ crossref missing$
+ { format.bvolume output
+ format.chapter.pages
+ "chapter and pages" output.check
+ new.block
+ format.number.series output
+ new.sentence
+ address output
+ publisher
+ "publisher" output.check.colon
+ }
+ { format.chapter.pages "chapter and pages" output.check
+ new.block
+ format.book.crossref output.nonnull
+ }
+ if$
+ new.block
+ note output
+ fin.entry
+ format.annotation write$
+}
+
+FUNCTION {incollection}
+{ output.bibitem
+ format.authors
+ "author" output.check
+ author format.key output % added
+ output.year.check % added
+ new.block
+ format.title
+ "title" output.check
+ new.block
+ crossref missing$
+ { format.in.ed.booktitle
+ "booktitle" output.check
+ format.bvolume output
+ format.number.series output
+ format.chapter.pages output % gnp - was special.output.nonnull
+% left out comma before page numbers
+ new.sentence
+ address output
+ publisher "publisher" output.check.colon
+ }
+ { format.incoll.inproc.crossref
+ output.nonnull
+ format.chapter.pages output
+ }
+ if$
+ new.block
+ note output
+ fin.entry
+ format.annotation write$
+}
+
+FUNCTION {inproceedings}
+{ output.bibitem
+ format.authors
+ "author" output.check
+ author format.key output % added
+ output.year.check % added
+ new.block
+ format.title
+ "title" output.check
+ new.block
+ crossref missing$
+ { format.in.ed.booktitle
+ "booktitle" output.check
+ format.bvolume output
+ format.number.series output
+ address output
+ format.pages output
+ new.sentence
+ organization output
+ publisher output.colon
+ }
+ { format.incoll.inproc.crossref output.nonnull
+ format.pages output
+ }
+ if$
+ new.block
+ note output
+ fin.entry
+ format.annotation write$
+}
+
+FUNCTION {conference} { inproceedings }
+
+FUNCTION {manual}
+{ output.bibitem
+ author empty$
+ { editor empty$
+ { organization "organization" output.check
+ organization format.key output } % if all else fails, use key
+ { format.editors "author and editor" output.check }
+ if$
+ }
+ { format.authors output.nonnull }
+ if$
+ output.year.check % added
+ new.block
+ format.btitle
+ "title" output.check
+ organization address new.block.checkb
+% Reversed the order of "address" and "organization", added the ":".
+ address output
+ organization "organization" output.check.colon
+% address output
+% ":" output
+% organization output
+ new.block
+ note output
+ fin.entry
+ format.annotation write$
+}
+
+FUNCTION {mastersthesis}
+{ output.bibitem
+ format.authors
+ "author" output.check
+ author format.key output % added
+ output.year.check % added
+ new.block
+ format.title
+ "title" output.check
+ new.block
+ "Master's thesis" format.thesis.type output.nonnull
+ school "school" output.check
+ address output
+ new.block
+ note output
+ fin.entry
+ format.annotation write$
+}
+
+FUNCTION {misc}
+{ output.bibitem
+ format.authors output
+ author format.key output % added
+ output.year.check % added
+ title howpublished new.block.checkb
+ format.title output
+ new.block
+ howpublished output
+ new.block
+ note output
+ fin.entry
+ format.annotation write$
+}
+
+FUNCTION {phdthesis}
+{ output.bibitem
+ format.authors
+ "author" output.check
+ author format.key output % added
+ output.year.check % added
+ new.block
+ format.btitle
+ "title" output.check
+ new.block
+ "Ph.\ D. thesis" format.thesis.type output.nonnull
+ school "school" output.check
+ address output
+ new.block
+ note output
+ fin.entry
+ format.annotation write$
+}
+
+FUNCTION {proceedings}
+{ output.bibitem
+ editor empty$
+ { organization output
+ organization format.key output } % gnp - changed from author format.key
+ { format.editors output.nonnull }
+ if$
+% author format.key output % gnp - removed (should be either
+% editor or organization
+ output.year.check % added (newapa)
+ new.block
+ format.btitle
+ "title" output.check
+ format.bvolume output
+ format.number.series output
+ address output
+ new.sentence
+ organization output
+ publisher output.colon
+ new.block
+ note output
+ fin.entry
+ format.annotation write$
+}
+
+FUNCTION {techreport}
+{ output.bibitem
+ format.authors
+ "author" output.check
+ author format.key output % added
+ output.year.check % added
+ new.block
+ format.title
+ "title" output.check
+ new.block
+ format.tr.number output.nonnull
+ institution
+ "institution" output.check
+ address output
+ new.block
+ note output
+ fin.entry
+ format.annotation write$
+}
+
+FUNCTION {unpublished}
+{ output.bibitem
+ format.authors
+ "author" output.check
+ author format.key output % added
+ output.year.check % added
+ new.block
+ format.title
+ "title" output.check
+ new.block
+ note "note" output.check
+ fin.entry
+ format.annotation write$
+}
+
+FUNCTION {default.type} { misc }
+
+MACRO {jan} {"January"}
+
+MACRO {feb} {"February"}
+
+MACRO {mar} {"March"}
+
+MACRO {apr} {"April"}
+
+MACRO {may} {"May"}
+
+MACRO {jun} {"June"}
+
+MACRO {jul} {"July"}
+
+MACRO {aug} {"August"}
+
+MACRO {sep} {"September"}
+
+MACRO {oct} {"October"}
+
+MACRO {nov} {"November"}
+
+MACRO {dec} {"December"}
+
+MACRO {acmcs} {"ACM Computing Surveys"}
+
+MACRO {acta} {"Acta Informatica"}
+
+MACRO {ai} {"Artificial Intelligence"}
+
+MACRO {cacm} {"Communications of the ACM"}
+
+MACRO {ibmjrd} {"IBM Journal of Research and Development"}
+
+MACRO {ibmsj} {"IBM Systems Journal"}
+
+MACRO {ieeese} {"IEEE Transactions on Software Engineering"}
+
+MACRO {ieeetc} {"IEEE Transactions on Computers"}
+
+MACRO {ieeetcad}
+ {"IEEE Transactions on Computer-Aided Design of Integrated Circuits"}
+
+MACRO {ipl} {"Information Processing Letters"}
+
+MACRO {jacm} {"Journal of the ACM"}
+
+MACRO {jcss} {"Journal of Computer and System Sciences"}
+
+MACRO {scp} {"Science of Computer Programming"}
+
+MACRO {sicomp} {"SIAM Journal on Computing"}
+
+MACRO {tocs} {"ACM Transactions on Computer Systems"}
+
+MACRO {tods} {"ACM Transactions on Database Systems"}
+
+MACRO {tog} {"ACM Transactions on Graphics"}
+
+MACRO {toms} {"ACM Transactions on Mathematical Software"}
+
+MACRO {toois} {"ACM Transactions on Office Information Systems"}
+
+MACRO {toplas} {"ACM Transactions on Programming Languages and Systems"}
+
+MACRO {tcs} {"Theoretical Computer Science"}
+
+READ
+
+FUNCTION {sortify}
+{ purify$
+ "l" change.case$
+}
+
+INTEGERS { len }
+
+FUNCTION {chop.word}
+{ 's :=
+ 'len :=
+ s #1 len substring$ =
+ { s len #1 + global.max$ substring$ }
+ 's
+ if$
+}
+
+
+
+FUNCTION {sort.format.names}
+{ 's :=
+ #1 'nameptr :=
+ ""
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ { nameptr #1 >
+ { " " * }
+ 'skip$
+ if$
+ s nameptr "{vv{ } }{ll{ }}{ f{ }}{ jj{ }}" format.name$ 't :=
+ nameptr numnames = t "others" = and
+ { " et~al" * }
+ { t sortify * }
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+}
+
+FUNCTION {sort.format.title}
+{ 't :=
+ "A " #2
+ "An " #3
+ "The " #4 t chop.word
+ chop.word
+ chop.word
+ sortify
+ #1 global.max$ substring$
+}
+
+FUNCTION {author.sort}
+{ author empty$
+ { key empty$
+ { "to sort, need author or key in " cite$ * warning$
+ "" }
+ { key sortify }
+ if$
+ }
+ { author sort.format.names }
+ if$
+}
+
+FUNCTION {editor.sort}
+{ editor empty$
+ { key empty$
+ { "to sort, need editor or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { editor sort.format.names }
+ if$
+}
+
+FUNCTION {author.editor.sort}
+{ author empty$
+ { "missing author in " cite$ * warning$
+ editor empty$
+ { key empty$
+ { "to sort, need author, editor, or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { editor sort.format.names }
+ if$
+ }
+ { author sort.format.names }
+ if$
+}
+
+FUNCTION {author.organization.sort}
+%
+% added - GNP. Stack author or organization for sorting (from alpha.bst).
+% Unlike alpha.bst, we need entire names, not abbreviations
+%
+{ author empty$
+ { organization empty$
+ { key empty$
+ { "to sort, need author, organization, or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { organization sortify }
+ if$
+ }
+ { author sort.format.names }
+ if$
+}
+
+FUNCTION {editor.organization.sort}
+%
+% added - GNP. Stack editor or organization for sorting (from alpha.bst).
+% Unlike alpha.bst, we need entire names, not abbreviations
+%
+{ editor empty$
+ { organization empty$
+ { key empty$
+ { "to sort, need editor, organization, or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { organization sortify }
+ if$
+ }
+ { editor sort.format.names }
+ if$
+}
+
+FUNCTION {presort}
+%
+% Presort creates the bibentry's label via a call to calc.label, and then
+% sorts the entries based on entry type. Chicago.bst adds support for
+% including organizations as the sort key; the following is stolen from
+% alpha.bst.
+%
+{ calc.label sortify % recalculate bibitem label
+ year field.or.null purify$ #-1 #4 substring$ * % add year
+ " "
+ *
+ type$ "book" =
+ type$ "inbook" =
+ or
+ 'author.editor.sort
+ { type$ "proceedings" =
+ 'editor.organization.sort
+ { type$ "manual" =
+ 'author.organization.sort
+ 'author.sort
+ if$
+ }
+ if$
+ }
+ if$
+ #1 entry.max$ substring$ % added for newapa
+ 'sort.label := % added for newapa
+ sort.label % added for newapa
+ *
+ " "
+ *
+ title field.or.null
+ sort.format.title
+ *
+ #1 entry.max$ substring$
+ 'sort.key$ :=
+}
+
+ITERATE {presort}
+
+SORT % by label, year, author/editor, title
+
+STRINGS { last.label next.extra }
+
+INTEGERS { last.extra.num }
+
+FUNCTION {initialize.extra.label.stuff}
+{ #0 int.to.chr$ 'last.label :=
+ "" 'next.extra :=
+ #0 'last.extra.num :=
+}
+
+FUNCTION {forward.pass}
+%
+% Pass through all entries, comparing current entry to last one.
+% Need to concatenate year to the stack (done by calc.label) to determine
+% if two entries are the same (see presort)
+%
+{ last.label
+ calc.label year field.or.null purify$ #-1 #4 substring$ * % add year
+ #1 entry.max$ substring$ = % are they equal?
+ { last.extra.num #1 + 'last.extra.num :=
+ last.extra.num int.to.chr$ 'extra.label :=
+ }
+ { "a" chr.to.int$ 'last.extra.num :=
+ "" 'extra.label :=
+ calc.label year field.or.null purify$ #-1 #4 substring$ * % add year
+ #1 entry.max$ substring$ 'last.label := % assign to last.label
+ }
+ if$
+}
+
+FUNCTION {reverse.pass}
+{ next.extra "b" =
+ { "a" 'extra.label := }
+ 'skip$
+ if$
+ label.year extra.label * 'sort.year :=
+ extra.label 'next.extra :=
+}
+
+EXECUTE {initialize.extra.label.stuff}
+
+ITERATE {forward.pass}
+
+REVERSE {reverse.pass}
+
+FUNCTION {bib.sort.order}
+{ sort.label
+ " "
+ *
+ year field.or.null sortify
+ *
+ " "
+ *
+ title field.or.null
+ sort.format.title
+ *
+ #1 entry.max$ substring$
+ 'sort.key$ :=
+}
+
+ITERATE {bib.sort.order}
+
+SORT % by sort.label, year, title --- giving final bib. order.
+
+FUNCTION {begin.bib}
+
+{ preamble$ empty$
+ 'skip$
+ { preamble$ write$ newline$ }
+ if$
+ "\begin{thebibliography}{}" write$ newline$
+}
+
+
+EXECUTE {begin.bib}
+
+EXECUTE {init.state.consts}
+
+ITERATE {call.type$}
+
+FUNCTION {end.bib}
+{ newline$
+ "\end{thebibliography}" write$ newline$
+}
+
+EXECUTE {end.bib}
+
diff --git a/biblio/bibtex/contrib/misc/cj.bst b/biblio/bibtex/contrib/misc/cj.bst
new file mode 100644
index 0000000000..5f49c64367
--- /dev/null
+++ b/biblio/bibtex/contrib/misc/cj.bst
@@ -0,0 +1,1205 @@
+%% Manually added comment by Felix Gaertner <fgaertner@lpdmail.epfl.ch>
+%%
+%% This is cj.bst, an approximation of a Bibtex Style for the Computer
+%% Journal published by the BCS. The core of this file was generated
+%% using the great custom-bib package by Patrick W Daly. I did some
+%% manual updates to fix the output. These lines have been marked with
+%% "hacked FG". The copyright notice below also holds for the updated
+%% file.
+%%
+%% I used this file to format a bibtex generated bibliography for
+%% a successfull submission to The Computer Journal in 2002.
+%%
+%% To use this style, note that the address field of your bibtex file
+%% should contain the location of the conference and not the location
+%% of the publisher. Put the latter into the publisher field, e.g. write
+%%
+%% publisher = "Springer-Verlag, Berlin"
+%%
+%% Originally generated bibtex style file starts after the following line:
+%% ----------------------------------------------------------------------
+%%
+%% This is file `cj.bst',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% merlin.mbs (with options: `seq-no,nm-rev,ed-rev,jnrlst,nmlm,x10,x0,m1,dt-beg,yr-par,xmth,yrp-x,vol-bf,vnum-x,volp-com,numser,edpar,blk-tit,in-x,pp,ed,abr,xedn,jabr')
+%% ----------------------------------------
+%% *** BibTeX style approximation for the Computer Journal. ***
+%%
+%% Copyright 1994-2002 Patrick W Daly
+ % ===============================================================
+ % IMPORTANT NOTICE:
+ % This bibliographic style (bst) file has been generated from one or
+ % more master bibliographic style (mbs) files, listed above.
+ %
+ % This generated file can be redistributed and/or modified under the terms
+ % of the LaTeX Project Public License Distributed from CTAN
+ % archives in directory macros/latex/base/lppl.txt; either
+ % version 1 of the License, or any later version.
+ % ===============================================================
+ % Name and version information of the main mbs file:
+ % \ProvidesFile{merlin.mbs}[2002/01/14 4.03 (PWD, AO, DPC)]
+ % For use with BibTeX version 0.99a or later
+ %-------------------------------------------------------------------
+ % This bibliography style file is intended for texts in ENGLISH
+ % This is a numerical citation style, and as such is standard LaTeX.
+ % It requires no extra package to interface to the main text.
+ % The form of the \bibitem entries is
+ % \bibitem{key}...
+ % Usage of \cite is as follows:
+ % \cite{key} ==>> [#]
+ % \cite[chap. 2]{key} ==>> [#, chap. 2]
+ % where # is a number determined by the ordering in the reference list.
+ % The order in the reference list is that by which the works were originally
+ % cited in the text, or that in the database.
+ %---------------------------------------------------------------------
+
+ENTRY
+ { address
+ author
+ booktitle
+ chapter
+ edition
+ editor
+ howpublished
+ institution
+ journal
+ key
+ month
+ note
+ number
+ organization
+ pages
+ publisher
+ school
+ series
+ title
+ type
+ volume
+ year
+ }
+ {}
+ { label }
+INTEGERS { output.state before.all mid.sentence after.sentence after.block }
+FUNCTION {init.state.consts}
+{ #0 'before.all :=
+ #1 'mid.sentence :=
+ #2 'after.sentence :=
+ #3 'after.block :=
+}
+STRINGS { s t}
+FUNCTION {output.nonnull}
+{ 's :=
+ output.state mid.sentence =
+ { ", " * write$ }
+ { output.state after.block =
+ { add.period$ write$
+ newline$
+ "\newblock " write$
+ }
+ { output.state before.all =
+ 'write$
+ { add.period$ " " * write$ }
+ if$
+ }
+ if$
+ mid.sentence 'output.state :=
+ }
+ if$
+ s
+}
+FUNCTION {output}
+{ duplicate$ empty$
+ 'pop$
+ 'output.nonnull
+ if$
+}
+FUNCTION {output.check}
+{ 't :=
+ duplicate$ empty$
+ { pop$ "empty " t * " in " * cite$ * warning$ }
+ 'output.nonnull
+ if$
+}
+FUNCTION {fin.entry}
+{ add.period$
+ write$
+ newline$
+}
+
+FUNCTION {new.block}
+{ output.state before.all =
+ 'skip$
+ { after.block 'output.state := }
+ if$
+}
+FUNCTION {new.sentence}
+{ output.state after.block =
+ 'skip$
+ { output.state before.all =
+ 'skip$
+ { after.sentence 'output.state := }
+ if$
+ }
+ if$
+}
+FUNCTION {add.blank}
+{ " " * before.all 'output.state :=
+}
+
+FUNCTION {date.block}
+{
+ add.blank
+}
+
+FUNCTION {not}
+{ { #0 }
+ { #1 }
+ if$
+}
+FUNCTION {and}
+{ 'skip$
+ { pop$ #0 }
+ if$
+}
+FUNCTION {or}
+{ { pop$ #1 }
+ 'skip$
+ if$
+}
+FUNCTION {new.block.checka}
+{ empty$
+ 'skip$
+ 'new.block
+ if$
+}
+FUNCTION {new.block.checkb}
+{ empty$
+ swap$ empty$
+ and
+ 'skip$
+ 'new.block
+ if$
+}
+FUNCTION {new.sentence.checka}
+{ empty$
+ 'skip$
+ 'new.sentence
+ if$
+}
+FUNCTION {new.sentence.checkb}
+{ empty$
+ swap$ empty$
+ and
+ 'skip$
+ 'new.sentence
+ if$
+}
+FUNCTION {field.or.null}
+{ duplicate$ empty$
+ { pop$ "" }
+ 'skip$
+ if$
+}
+FUNCTION {emphasize}
+{ duplicate$ empty$
+ { pop$ "" }
+ { "{\em " swap$ * "\/}" * }
+ if$
+}
+FUNCTION {bolden}
+{ duplicate$ empty$
+ { pop$ "" }
+ { "{\bf " swap$ * "}" * }
+ if$
+}
+FUNCTION {tie.or.space.prefix}
+{ duplicate$ text.length$ #3 <
+ { "~" }
+ { " " }
+ if$
+ swap$
+}
+
+FUNCTION {capitalize}
+{ "u" change.case$ "t" change.case$ }
+
+FUNCTION {space.word}
+{ " " swap$ * " " * }
+ % Here are the language-specific definitions for explicit words.
+ % Each function has a name bbl.xxx where xxx is the English word.
+ % The language selected here is ENGLISH
+FUNCTION {bbl.and}
+{ "and"}
+
+FUNCTION {bbl.etal}
+{ "et~al." }
+
+FUNCTION {bbl.editors}
+{ "eds." }
+
+FUNCTION {bbl.editor}
+{ "ed." }
+
+FUNCTION {bbl.edby}
+{ "edited by" }
+
+FUNCTION {bbl.edition}
+{ "edn." }
+
+FUNCTION {bbl.volume}
+{ "vol." }
+
+FUNCTION {bbl.of}
+{ "of" }
+
+FUNCTION {bbl.number}
+{ "no." }
+
+FUNCTION {bbl.nr}
+{ "no." }
+
+FUNCTION {bbl.in}
+{ "in" }
+
+FUNCTION {bbl.pages}
+{ "pp." }
+
+FUNCTION {bbl.page}
+{ "p." }
+
+FUNCTION {bbl.chapter}
+{ "chap." }
+
+FUNCTION {bbl.techrep}
+{ "Tech. Rep." }
+
+FUNCTION {bbl.mthesis}
+{ "Master's thesis" }
+
+FUNCTION {bbl.phdthesis}
+{ "Ph.D. thesis" }
+
+MACRO {jan} {"Jan."}
+
+MACRO {feb} {"Feb."}
+
+MACRO {mar} {"Mar."}
+
+MACRO {apr} {"Apr."}
+
+MACRO {may} {"May"}
+
+MACRO {jun} {"Jun."}
+
+MACRO {jul} {"Jul."}
+
+MACRO {aug} {"Aug."}
+
+MACRO {sep} {"Sep."}
+
+MACRO {oct} {"Oct."}
+
+MACRO {nov} {"Nov."}
+
+MACRO {dec} {"Dec."}
+
+MACRO {acmcs} {"ACM Comput. Surv."}
+
+MACRO {acta} {"Acta Inf."}
+
+MACRO {cacm} {"Commun. ACM"}
+
+MACRO {ibmjrd} {"IBM J. Res. Dev."}
+
+MACRO {ibmsj} {"IBM Syst.~J."}
+
+MACRO {ieeese} {"IEEE Trans. Software Eng."}
+
+MACRO {ieeetc} {"IEEE Trans. Comput."}
+
+MACRO {ieeetcad}
+ {"IEEE Trans. Comput. Aid. Des."}
+
+MACRO {ipl} {"Inf. Process. Lett."}
+
+MACRO {jacm} {"J.~ACM"}
+
+MACRO {jcss} {"J.~Comput. Syst. Sci."}
+
+MACRO {scp} {"Sci. Comput. Program."}
+
+MACRO {sicomp} {"SIAM J. Comput."}
+
+MACRO {tocs} {"ACM Trans. Comput. Syst."}
+
+MACRO {tods} {"ACM Trans. Database Syst."}
+
+MACRO {tog} {"ACM Trans. Graphic."}
+
+MACRO {toms} {"ACM Trans. Math. Software"}
+
+MACRO {toois} {"ACM Trans. Office Inf. Syst."}
+
+MACRO {toplas} {"ACM Trans. Progr. Lang. Syst."}
+
+MACRO {tcs} {"Theor. Comput. Sci."}
+
+FUNCTION {bibinfo.check}
+{ swap$
+ duplicate$ missing$
+ {
+ pop$ pop$
+ ""
+ }
+ { duplicate$ empty$
+ {
+ swap$ pop$
+ }
+ { swap$
+ pop$
+ }
+ if$
+ }
+ if$
+}
+FUNCTION {bibinfo.warn}
+{ swap$
+ duplicate$ missing$
+ {
+ swap$ "missing " swap$ * " in " * cite$ * warning$ pop$
+ ""
+ }
+ { duplicate$ empty$
+ {
+ swap$ "empty " swap$ * " in " * cite$ * warning$
+ }
+ { swap$
+ pop$
+ }
+ if$
+ }
+ if$
+}
+STRINGS { bibinfo}
+INTEGERS { nameptr namesleft numnames }
+
+FUNCTION {format.names}
+{ 'bibinfo :=
+ duplicate$ empty$ 'skip$ {
+ 's :=
+ "" 't :=
+ #1 'nameptr :=
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ { s nameptr
+ "{vv~}{ll}{, f.}{, jj}"
+ format.name$
+ bibinfo bibinfo.check
+ 't :=
+ nameptr #1 >
+ {
+ nameptr #1
+ #1 + =
+ numnames #0
+ #10 +
+ > and
+ { "others" 't :=
+ #1 'namesleft := }
+ 'skip$
+ if$
+ namesleft #1 >
+ { ", " * t * }
+ {
+ numnames #2 >
+ { "," * }
+ 'skip$
+ if$
+ s nameptr "{ll}" format.name$ duplicate$ "others" =
+ { 't := }
+ { pop$ }
+ if$
+ t "others" =
+ {
+ " " * bbl.etal *
+ }
+ {
+ bbl.and
+ space.word * t *
+ }
+ if$
+ }
+ if$
+ }
+ 't
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+ } if$
+}
+FUNCTION {format.names.ed}
+{
+ format.names
+}
+FUNCTION {format.authors}
+{ author "author" format.names
+}
+FUNCTION {get.bbl.editor}
+{ editor num.names$ #1 > 'bbl.editors 'bbl.editor if$ }
+
+FUNCTION {format.editors}
+{ editor "editor" format.names duplicate$ empty$ 'skip$
+ {
+ " " *
+ get.bbl.editor
+ "(" swap$ * ")" *
+ *
+ }
+ if$
+}
+FUNCTION {format.note}
+{
+ note empty$
+ { "" }
+ { note #1 #1 substring$
+ duplicate$ "{" =
+ 'skip$
+ { output.state mid.sentence =
+ { "l" }
+ { "u" }
+ if$
+ change.case$
+ }
+ if$
+ note #2 global.max$ substring$ * "note" bibinfo.check
+ }
+ if$
+}
+
+FUNCTION {format.title}
+{ title
+ duplicate$ empty$ 'skip$
+ { "t" change.case$ }
+ if$
+ "title" bibinfo.check
+}
+FUNCTION {output.bibitem}
+{ newline$
+ "\bibitem{" write$
+ cite$ write$
+ "}" write$
+ newline$
+ ""
+ before.all 'output.state :=
+}
+
+FUNCTION {n.dashify}
+{
+ 't :=
+ ""
+ { t empty$ not }
+ { t #1 #1 substring$ "-" =
+ { t #1 #2 substring$ "--" = not
+ { "--" *
+ t #2 global.max$ substring$ 't :=
+ }
+ { { t #1 #1 substring$ "-" = }
+ { "-" *
+ t #2 global.max$ substring$ 't :=
+ }
+ while$
+ }
+ if$
+ }
+ { t #1 #1 substring$ *
+ t #2 global.max$ substring$ 't :=
+ }
+ if$
+ }
+ while$
+}
+
+FUNCTION {word.in}
+{ "" }
+
+FUNCTION {format.date}
+{
+ ""
+ duplicate$ empty$
+ year "year" bibinfo.check duplicate$ empty$
+ { swap$ 'skip$
+ { "there's a month but no year in " cite$ * warning$ }
+ if$
+ *
+ }
+ { swap$ 'skip$
+ {
+ swap$
+ " " * swap$
+ }
+ if$
+ *
+ }
+ if$
+ duplicate$ empty$
+ 'skip$
+ {
+ before.all 'output.state :=
+ " (" swap$ * ")" *
+ }
+ if$
+}
+%% ------------------------------------------------------------
+%% hacked FG: function to format the month
+FUNCTION {format.month}
+{ month empty$
+ {}
+ {", " * month *}
+ if$
+}
+%% ------------------------------------------------------------
+FUNCTION {format.btitle}
+{ title "title" bibinfo.check
+ duplicate$ empty$ 'skip$
+ {
+ emphasize
+ }
+ if$
+}
+FUNCTION {either.or.check}
+{ empty$
+ 'pop$
+ { "can't use both " swap$ * " fields in " * cite$ * warning$ }
+ if$
+}
+FUNCTION {format.bvolume}
+{ volume empty$
+ { "" }
+ { bbl.volume volume tie.or.space.prefix
+ "volume" bibinfo.check * *
+ series "series" bibinfo.check
+ duplicate$ empty$ 'pop$
+ { swap$ bbl.of space.word * swap$
+ emphasize * }
+ if$
+ "volume and number" number either.or.check
+ }
+ if$
+}
+FUNCTION {format.number.series}
+{ volume empty$
+ { number empty$
+ { series field.or.null }
+ { output.state mid.sentence =
+ { bbl.number }
+ { bbl.number capitalize }
+ if$
+ number tie.or.space.prefix "number" bibinfo.check * *
+ series empty$
+ { "there's a number but no series in " cite$ * warning$ }
+ { bbl.in space.word *
+ series "series" bibinfo.check *
+ }
+ if$
+ }
+ if$
+ }
+ { "" }
+ if$
+}
+
+FUNCTION {format.edition}
+{ edition duplicate$ empty$ 'skip$
+ {
+ output.state mid.sentence =
+ { "l" }
+ { "t" }
+ if$ change.case$
+ "edition" bibinfo.check
+ " " * bbl.edition *
+ }
+ if$
+}
+INTEGERS { multiresult }
+FUNCTION {multi.page.check}
+{ 't :=
+ #0 'multiresult :=
+ { multiresult not
+ t empty$ not
+ and
+ }
+ { t #1 #1 substring$
+ duplicate$ "-" =
+ swap$ duplicate$ "," =
+ swap$ "+" =
+ or or
+ { #1 'multiresult := }
+ { t #2 global.max$ substring$ 't := }
+ if$
+ }
+ while$
+ multiresult
+}
+FUNCTION {format.pages}
+{ pages duplicate$ empty$ 'skip$
+ { duplicate$ multi.page.check
+ {
+ bbl.pages swap$
+ n.dashify
+ }
+ {
+ bbl.page swap$
+ }
+ if$
+ tie.or.space.prefix
+ "pages" bibinfo.check
+ * *
+ }
+ if$
+}
+FUNCTION {format.journal.pages}
+{ pages duplicate$ empty$ 'pop$
+ { swap$ duplicate$ empty$
+ { pop$ pop$ format.pages }
+ {
+ ", " *
+ swap$
+ n.dashify
+ "pages" bibinfo.check
+ *
+ }
+ if$
+ }
+ if$
+}
+FUNCTION {format.vol.num.pages}
+{ volume field.or.null
+ duplicate$ empty$ 'skip$
+ {
+ "volume" bibinfo.check
+ }
+ if$
+ bolden
+ format.journal.pages
+}
+
+FUNCTION {format.chapter.pages}
+{ chapter empty$
+ 'format.pages
+ { type empty$
+ { bbl.chapter }
+ { type "l" change.case$
+ "type" bibinfo.check
+ }
+ if$
+ chapter tie.or.space.prefix
+ "chapter" bibinfo.check
+ * *
+ pages empty$
+ 'skip$
+ { ", " * format.pages * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.booktitle}
+{
+ booktitle "booktitle" bibinfo.check
+ emphasize
+}
+FUNCTION {format.in.ed.booktitle}
+{ format.booktitle duplicate$ empty$ 'skip$
+ {
+ editor "editor" format.names.ed duplicate$ empty$ 'pop$
+ {
+ " " *
+ get.bbl.editor
+ "(" swap$ * "), " *
+ * swap$
+ * }
+ if$
+ word.in swap$ *
+ }
+ if$
+}
+FUNCTION {empty.misc.check}
+{ author empty$ title empty$ howpublished empty$
+ month empty$ year empty$ note empty$
+ and and and and and
+ { "all relevant fields are empty in " cite$ * warning$ }
+ 'skip$
+ if$
+}
+FUNCTION {format.thesis.type}
+{ type duplicate$ empty$
+ 'pop$
+ { swap$ pop$
+ "t" change.case$ "type" bibinfo.check
+ }
+ if$
+}
+FUNCTION {format.tr.number}
+{ number "number" bibinfo.check
+ type duplicate$ empty$
+ { pop$ bbl.techrep }
+ 'skip$
+ if$
+ "type" bibinfo.check
+ swap$ duplicate$ empty$
+ { pop$ "t" change.case$ }
+ { tie.or.space.prefix * * }
+ if$
+}
+FUNCTION {format.article.crossref}
+{
+ key duplicate$ empty$
+ { pop$
+ journal duplicate$ empty$
+ { "need key or journal for " cite$ * " to crossref " * crossref * warning$ }
+ { "journal" bibinfo.check emphasize word.in swap$ * }
+ if$
+ }
+ { word.in swap$ * " " *}
+ if$
+ " \cite{" * crossref * "}" *
+}
+FUNCTION {format.crossref.editor}
+{ editor #1 "{vv~}{ll}" format.name$
+ "editor" bibinfo.check
+ editor num.names$ duplicate$
+ #2 >
+ { pop$
+ "editor" bibinfo.check
+ " " * bbl.etal
+ *
+ }
+ { #2 <
+ 'skip$
+ { editor #2 "{ff }{vv }{ll}{ jj}" format.name$ "others" =
+ {
+ "editor" bibinfo.check
+ " " * bbl.etal
+ *
+ }
+ {
+ bbl.and space.word
+ * editor #2 "{vv~}{ll}" format.name$
+ "editor" bibinfo.check
+ *
+ }
+ if$
+ }
+ if$
+ }
+ if$
+}
+FUNCTION {format.book.crossref}
+{ volume duplicate$ empty$
+ { "empty volume in " cite$ * "'s crossref of " * crossref * warning$
+ pop$ word.in
+ }
+ { bbl.volume
+ capitalize
+ swap$ tie.or.space.prefix "volume" bibinfo.check * * bbl.of space.word *
+ }
+ if$
+ editor empty$
+ editor field.or.null author field.or.null =
+ or
+ { key empty$
+ { series empty$
+ { "need editor, key, or series for " cite$ * " to crossref " *
+ crossref * warning$
+ "" *
+ }
+ { series emphasize * }
+ if$
+ }
+ { key * }
+ if$
+ }
+ { format.crossref.editor * }
+ if$
+ " \cite{" * crossref * "}" *
+}
+FUNCTION {format.incoll.inproc.crossref}
+{
+ editor empty$
+ editor field.or.null author field.or.null =
+ or
+ { key empty$
+ { format.booktitle duplicate$ empty$
+ { "need editor, key, or booktitle for " cite$ * " to crossref " *
+ crossref * warning$
+ }
+ { word.in swap$ * }
+ if$
+ }
+ { word.in key * " " *}
+ if$
+ }
+ { word.in format.crossref.editor * " " *}
+ if$
+ " \cite{" * crossref * "}" *
+}
+FUNCTION {format.org.or.pub}
+{ 't :=
+ ""
+ address empty$ t empty$ and
+ 'skip$
+ {
+ t empty$
+ { address "address" bibinfo.check *
+ }
+ { t *
+ address empty$
+ 'skip$
+ { ", " * address "address" bibinfo.check * }
+ if$
+ }
+ if$
+ }
+ if$
+}
+%% hacked FG: don't output address field behind publisher, address
+%% refers to conference location
+FUNCTION {format.publisher.address}
+{ publisher "publisher" bibinfo.warn %% format.org.or.pub
+}
+%% hacked FG: if a publisher is not present, the organization
+%% field is treated in the same way. Outputting the address
+%% field must be inhibited here too...
+FUNCTION {format.organization.address}
+{ organization "organization" bibinfo.check %% format.org.or.pub
+}
+
+FUNCTION {article}
+{ output.bibitem
+ format.authors "author" output.check
+ format.date "year" output.check
+ date.block
+ format.title "title" output.check
+ new.sentence
+ crossref missing$
+ {
+ journal
+ "journal" bibinfo.check
+ emphasize
+ "journal" output.check
+ format.vol.num.pages output
+ }
+ { format.article.crossref output.nonnull
+ format.pages output
+ }
+ if$
+ format.note output
+ fin.entry
+}
+FUNCTION {book}
+{ output.bibitem
+ author empty$
+ { format.editors "author and editor" output.check
+ }
+ { format.authors output.nonnull
+ crossref missing$
+ { "author and editor" editor either.or.check }
+ 'skip$
+ if$
+ }
+ if$
+ format.date "year" output.check
+ date.block
+ format.btitle "title" output.check
+ crossref missing$
+ { format.bvolume output
+ new.sentence
+ format.number.series output
+ format.publisher.address output
+ }
+ {
+ new.sentence
+ format.book.crossref output.nonnull
+ }
+ if$
+ format.edition output
+ format.note output
+ fin.entry
+}
+FUNCTION {booklet}
+{ output.bibitem
+ format.authors output
+ format.date output
+ date.block
+ format.title "title" output.check
+ new.sentence
+ howpublished "howpublished" bibinfo.check output
+ address "address" bibinfo.check output
+ format.note output
+ fin.entry
+}
+
+FUNCTION {inbook}
+{ output.bibitem
+ author empty$
+ { format.editors "author and editor" output.check
+ }
+ { format.authors output.nonnull
+ crossref missing$
+ { "author and editor" editor either.or.check }
+ 'skip$
+ if$
+ }
+ if$
+ format.date "year" output.check
+ date.block
+ format.btitle "title" output.check
+ crossref missing$
+ {
+ format.bvolume output
+ format.chapter.pages "chapter and pages" output.check
+ new.sentence
+ format.number.series output
+ format.publisher.address output
+ }
+ {
+ format.chapter.pages "chapter and pages" output.check
+ new.sentence
+ format.book.crossref output.nonnull
+ }
+ if$
+ format.edition output
+ format.note output
+ fin.entry
+}
+
+FUNCTION {incollection}
+{ output.bibitem
+ format.authors "author" output.check
+ format.date "year" output.check
+ date.block
+ format.title "title" output.check
+ new.sentence
+ crossref missing$
+ { format.in.ed.booktitle "booktitle" output.check
+ format.bvolume output
+ format.chapter.pages output
+ format.number.series output
+ format.publisher.address output
+ format.edition output
+ }
+ { format.incoll.inproc.crossref output.nonnull
+ format.chapter.pages output
+ }
+ if$
+ format.note output
+ fin.entry
+}
+FUNCTION {inproceedings}
+{ output.bibitem
+ format.authors "author" output.check
+ format.date "year" output.check
+ date.block
+ format.title "title" output.check
+ new.sentence
+ crossref missing$
+%% hacked FG: output address field behind proceedings title and add month
+%% { format.in.ed.booktitle "booktitle" output.check
+ { format.in.ed.booktitle "booktitle" output.check format.org.or.pub format.month
+ format.bvolume output
+ format.pages output
+ format.number.series output
+ publisher empty$
+ { format.organization.address output }
+ { organization "organization" bibinfo.check output
+ format.publisher.address output
+ }
+ if$
+ }
+ { format.incoll.inproc.crossref output.nonnull
+ format.pages output
+ }
+ if$
+ format.note output
+ fin.entry
+}
+FUNCTION {conference} { inproceedings }
+FUNCTION {manual}
+{ output.bibitem
+ author empty$
+ { organization "organization" bibinfo.check
+ duplicate$ empty$ 'pop$
+ { output
+ address "address" bibinfo.check output
+ }
+ if$
+ }
+ { format.authors output.nonnull }
+ if$
+ format.date output
+ date.block
+ format.btitle "title" output.check
+ new.sentence
+ author empty$
+ { organization empty$
+ {
+ address "address" bibinfo.check output
+ }
+ 'skip$
+ if$
+ }
+ {
+ organization "organization" bibinfo.check output
+ address "address" bibinfo.check output
+ }
+ if$
+ format.edition output
+ format.note output
+ fin.entry
+}
+
+FUNCTION {mastersthesis}
+{ output.bibitem
+ format.authors "author" output.check
+ format.date "year" output.check
+ date.block
+ format.btitle
+ "title" output.check
+ new.sentence
+ bbl.mthesis format.thesis.type output.nonnull
+ school "school" bibinfo.warn output
+ address "address" bibinfo.check output
+ format.note output
+ fin.entry
+}
+
+FUNCTION {misc}
+{ output.bibitem
+ format.authors output
+ format.date output
+ format.title output
+ new.sentence
+ howpublished "howpublished" bibinfo.check output
+ format.note output
+ fin.entry
+ empty.misc.check
+}
+FUNCTION {phdthesis}
+{ output.bibitem
+ format.authors "author" output.check
+ format.date "year" output.check
+ date.block
+ format.btitle
+ "title" output.check
+ new.sentence
+ bbl.phdthesis format.thesis.type output.nonnull
+ school "school" bibinfo.warn output
+ address "address" bibinfo.check output
+ format.note output
+ fin.entry
+}
+
+FUNCTION {proceedings}
+{ output.bibitem
+ editor empty$
+ { organization "organization" bibinfo.check output
+ }
+ { format.editors output.nonnull }
+ if$
+ format.date "year" output.check
+ date.block
+ format.btitle "title" output.check
+ format.bvolume output
+ editor empty$
+ { publisher empty$
+ 'skip$
+ {
+ format.number.series output
+ format.publisher.address output
+ }
+ if$
+ }
+ { publisher empty$
+ {
+ format.organization.address output }
+ {
+ organization "organization" bibinfo.check output
+ format.publisher.address output
+ }
+ if$
+ }
+ if$
+ format.note output
+ fin.entry
+}
+
+FUNCTION {techreport}
+{ output.bibitem
+ format.authors "author" output.check
+ format.date "year" output.check
+ date.block
+ format.title
+ "title" output.check
+ new.sentence
+ format.tr.number output.nonnull
+ institution "institution" bibinfo.warn output
+ address "address" bibinfo.check output
+ format.note output
+ fin.entry
+}
+
+FUNCTION {unpublished}
+{ output.bibitem
+ format.authors "author" output.check
+ format.date output
+ date.block
+ format.title "title" output.check
+ format.note "note" output.check
+ fin.entry
+}
+
+FUNCTION {default.type} { misc }
+READ
+STRINGS { longest.label }
+INTEGERS { number.label longest.label.width }
+FUNCTION {initialize.longest.label}
+{ "" 'longest.label :=
+ #1 'number.label :=
+ #0 'longest.label.width :=
+}
+FUNCTION {longest.label.pass}
+{ number.label int.to.str$ 'label :=
+ number.label #1 + 'number.label :=
+ label width$ longest.label.width >
+ { label 'longest.label :=
+ label width$ 'longest.label.width :=
+ }
+ 'skip$
+ if$
+}
+EXECUTE {initialize.longest.label}
+ITERATE {longest.label.pass}
+FUNCTION {begin.bib}
+{ preamble$ empty$
+ 'skip$
+ { preamble$ write$ newline$ }
+ if$
+ "\begin{thebibliography}{" longest.label * "}" *
+ write$ newline$
+}
+EXECUTE {begin.bib}
+EXECUTE {init.state.consts}
+ITERATE {call.type$}
+FUNCTION {end.bib}
+{ newline$
+ "\end{thebibliography}" write$ newline$
+}
+EXECUTE {end.bib}
+%% End of customized bst file
+%%
+%% End of file `cj.bst'.
diff --git a/biblio/bibtex/contrib/misc/decsci.bst b/biblio/bibtex/contrib/misc/decsci.bst
new file mode 100644
index 0000000000..03cd431da5
--- /dev/null
+++ b/biblio/bibtex/contrib/misc/decsci.bst
@@ -0,0 +1,1504 @@
+%%
+%% This is file `decsci.bst',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% merlin.mbs (with options: `ay,nat,nm-rev,jnrlst,keyxyr,dt-beg,yr-par,note-yr,vol-it,volp-com,pp-last,num-xser,add-pub,pre-pub,edpar,bkedcap,ppx,ed,abr,ednx,xedn,amper,etal-it,url,url-blk')
+%% ----------------------------------------
+%%
+%% *** BibTeX style for the journal Decision Sciences ***
+%% Generated by Paul A. Rubin (rubin@msu.edu) 2002/06/24, using
+%% Patrick Daly's custom-bib package.
+%% Decision Sciences is the journal of the Decision Sciences Institute.
+%% Best used with the natbib package. Decision Sciences wants citations
+%% formatted author (year) or (author, year; ...). See comments below
+%% for versions of the \cite command in natbib to do this. This file
+%% (decsci.bst) will format the reference list to Decision Science's
+%% standards.
+%%
+%% No additional copyright restrictions attach beyond what is stated
+%% below.
+%%
+%% Copyright 1994-2000 Patrick W Daly
+ % ===============================================================
+ % IMPORTANT NOTICE:
+ % This bibliographic style (bst) file has been generated from one or
+ % more master bibliographic style (mbs) files, listed above.
+ %
+ % This generated file can be redistributed and/or modified under the terms
+ % of the LaTeX Project Public License Distributed from CTAN
+ % archives in directory macros/latex/base/lppl.txt; either
+ % version 1 of the License, or any later version.
+ % ===============================================================
+ % Name and version information of the main mbs file:
+ % \ProvidesFile{merlin.mbs}[2000/05/04 4.01 (PWD, AO, DPC)]
+ % For use with BibTeX version 0.99a or later
+ %-------------------------------------------------------------------
+ % This bibliography style file is intended for texts in ENGLISH
+ % This is an author-year citation style bibliography. As such, it is
+ % non-standard LaTeX, and requires a special package file to function properly.
+ % Such a package is natbib.sty by Patrick W. Daly
+ % The form of the \bibitem entries is
+ % \bibitem[Jones et al.(1990)]{key}...
+ % \bibitem[Jones et al.(1990)Jones, Baker, and Smith]{key}...
+ % The essential feature is that the label (the part in brackets) consists
+ % of the author names, as they should appear in the citation, with the year
+ % in parentheses following. There must be no space before the opening
+ % parenthesis!
+ % With natbib v5.3, a full list of authors may also follow the year.
+ % In natbib.sty, it is possible to define the type of enclosures that is
+ % really wanted (brackets or parentheses), but in either case, there must
+ % be parentheses in the label.
+ % The \cite command functions as follows:
+ % \citet{key} ==>> Jones et al. (1990)
+ % \citet*{key} ==>> Jones, Baker, and Smith (1990)
+ % \citep{key} ==>> (Jones et al., 1990)
+ % \citep*{key} ==>> (Jones, Baker, and Smith, 1990)
+ % \citep[chap. 2]{key} ==>> (Jones et al., 1990, chap. 2)
+ % \citep[e.g.][]{key} ==>> (e.g. Jones et al., 1990)
+ % \citep[e.g.][p. 32]{key} ==>> (e.g. Jones et al., p. 32)
+ % \citeauthor{key} ==>> Jones et al.
+ % \citeauthor*{key} ==>> Jones, Baker, and Smith
+ % \citeyear{key} ==>> 1990
+ %---------------------------------------------------------------------
+
+ENTRY
+ { address
+ author
+ booktitle
+ chapter
+ edition
+ editor
+ howpublished
+ institution
+ journal
+ key
+ month
+ note
+ number
+ organization
+ pages
+ publisher
+ school
+ series
+ title
+ type
+ url
+ volume
+ year
+ }
+ {}
+ { label extra.label sort.label short.list }
+INTEGERS { output.state before.all mid.sentence after.sentence after.block }
+FUNCTION {init.state.consts}
+{ #0 'before.all :=
+ #1 'mid.sentence :=
+ #2 'after.sentence :=
+ #3 'after.block :=
+}
+STRINGS { s t}
+FUNCTION {output.nonnull}
+{ 's :=
+ output.state mid.sentence =
+ { ", " * write$ }
+ { output.state after.block =
+ { add.period$ write$
+ newline$
+ "\newblock " write$
+ }
+ { output.state before.all =
+ 'write$
+ { add.period$ " " * write$ }
+ if$
+ }
+ if$
+ mid.sentence 'output.state :=
+ }
+ if$
+ s
+}
+FUNCTION {output}
+{ duplicate$ empty$
+ 'pop$
+ 'output.nonnull
+ if$
+}
+FUNCTION {output.check}
+{ 't :=
+ duplicate$ empty$
+ { pop$ "empty " t * " in " * cite$ * warning$ }
+ 'output.nonnull
+ if$
+}
+FUNCTION {fin.entry}
+{ add.period$
+ write$
+ newline$
+}
+
+FUNCTION {new.block}
+{ output.state before.all =
+ 'skip$
+ { after.block 'output.state := }
+ if$
+}
+FUNCTION {new.sentence}
+{ output.state after.block =
+ 'skip$
+ { output.state before.all =
+ 'skip$
+ { after.sentence 'output.state := }
+ if$
+ }
+ if$
+}
+FUNCTION {add.blank}
+{ " " * before.all 'output.state :=
+}
+
+FUNCTION {date.block}
+{
+ new.block
+}
+
+FUNCTION {not}
+{ { #0 }
+ { #1 }
+ if$
+}
+FUNCTION {and}
+{ 'skip$
+ { pop$ #0 }
+ if$
+}
+FUNCTION {or}
+{ { pop$ #1 }
+ 'skip$
+ if$
+}
+FUNCTION {new.block.checkb}
+{ empty$
+ swap$ empty$
+ and
+ 'skip$
+ 'new.block
+ if$
+}
+FUNCTION {field.or.null}
+{ duplicate$ empty$
+ { pop$ "" }
+ 'skip$
+ if$
+}
+FUNCTION {emphasize}
+{ duplicate$ empty$
+ { pop$ "" }
+ { "{\em " swap$ * "\/}" * }
+ if$
+}
+FUNCTION {tie.or.space.prefix}
+{ duplicate$ text.length$ #3 <
+ { "~" }
+ { " " }
+ if$
+ swap$
+}
+
+FUNCTION {capitalize}
+{ "u" change.case$ "t" change.case$ }
+
+FUNCTION {space.word}
+{ " " swap$ * " " * }
+ % Here are the language-specific definitions for explicit words.
+ % Each function has a name bbl.xxx where xxx is the English word.
+ % The language selected here is ENGLISH
+FUNCTION {bbl.and}
+{ "and"}
+
+FUNCTION {bbl.etal}
+{ "et~al." }
+
+FUNCTION {bbl.editors}
+{ "eds." }
+
+FUNCTION {bbl.editor}
+{ "ed." }
+
+FUNCTION {bbl.edby}
+{ "edited by" }
+
+FUNCTION {bbl.edition}
+{ "ed." }
+
+FUNCTION {bbl.volume}
+{ "vol." }
+
+FUNCTION {bbl.of}
+{ "of" }
+
+FUNCTION {bbl.number}
+{ "no." }
+
+FUNCTION {bbl.nr}
+{ "no." }
+
+FUNCTION {bbl.in}
+{ "in" }
+
+FUNCTION {bbl.pages}
+{ "" }
+
+FUNCTION {bbl.page}
+{ "" }
+
+FUNCTION {bbl.chapter}
+{ "chap." }
+
+FUNCTION {bbl.techrep}
+{ "Tech. Rep." }
+
+FUNCTION {bbl.mthesis}
+{ "Master's thesis" }
+
+FUNCTION {bbl.phdthesis}
+{ "Ph.D. thesis" }
+
+MACRO {jan} {"Jan."}
+
+MACRO {feb} {"Feb."}
+
+MACRO {mar} {"Mar."}
+
+MACRO {apr} {"Apr."}
+
+MACRO {may} {"May"}
+
+MACRO {jun} {"Jun."}
+
+MACRO {jul} {"Jul."}
+
+MACRO {aug} {"Aug."}
+
+MACRO {sep} {"Sep."}
+
+MACRO {oct} {"Oct."}
+
+MACRO {nov} {"Nov."}
+
+MACRO {dec} {"Dec."}
+
+MACRO {acmcs} {"ACM Computing Surveys"}
+
+MACRO {acta} {"Acta Informatica"}
+
+MACRO {cacm} {"Communications of the ACM"}
+
+MACRO {ibmjrd} {"IBM Journal of Research and Development"}
+
+MACRO {ibmsj} {"IBM Systems Journal"}
+
+MACRO {ieeese} {"IEEE Transactions on Software Engineering"}
+
+MACRO {ieeetc} {"IEEE Transactions on Computers"}
+
+MACRO {ieeetcad}
+ {"IEEE Transactions on Computer-Aided Design of Integrated Circuits"}
+
+MACRO {ipl} {"Information Processing Letters"}
+
+MACRO {jacm} {"Journal of the ACM"}
+
+MACRO {jcss} {"Journal of Computer and System Sciences"}
+
+MACRO {scp} {"Science of Computer Programming"}
+
+MACRO {sicomp} {"SIAM Journal on Computing"}
+
+MACRO {tocs} {"ACM Transactions on Computer Systems"}
+
+MACRO {tods} {"ACM Transactions on Database Systems"}
+
+MACRO {tog} {"ACM Transactions on Graphics"}
+
+MACRO {toms} {"ACM Transactions on Mathematical Software"}
+
+MACRO {toois} {"ACM Transactions on Office Information Systems"}
+
+MACRO {toplas} {"ACM Transactions on Programming Languages and Systems"}
+
+MACRO {tcs} {"Theoretical Computer Science"}
+FUNCTION {bibinfo.check}
+{ swap$
+ duplicate$ missing$
+ {
+ pop$ pop$
+ ""
+ }
+ { duplicate$ empty$
+ {
+ swap$ pop$
+ }
+ { swap$
+ pop$
+ }
+ if$
+ }
+ if$
+}
+FUNCTION {bibinfo.warn}
+{ swap$
+ duplicate$ missing$
+ {
+ swap$ "missing " swap$ * " in " * cite$ * warning$ pop$
+ ""
+ }
+ { duplicate$ empty$
+ {
+ swap$ "empty " swap$ * " in " * cite$ * warning$
+ }
+ { swap$
+ pop$
+ }
+ if$
+ }
+ if$
+}
+FUNCTION {format.url}
+{ url empty$
+ { "" }
+ { "\urlprefix\url{" url * "}" * }
+ if$
+}
+
+STRINGS { bibinfo}
+INTEGERS { nameptr namesleft numnames }
+
+FUNCTION {format.names}
+{ 'bibinfo :=
+ duplicate$ empty$ 'skip$ {
+ 's :=
+ "" 't :=
+ #1 'nameptr :=
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ { s nameptr
+ "{vv~}{ll}{, f.}{, jj}"
+ format.name$
+ bibinfo bibinfo.check
+ 't :=
+ nameptr #1 >
+ {
+ namesleft #1 >
+ { ", " * t * }
+ {
+ numnames #2 >
+ { "," * }
+ 'skip$
+ if$
+ s nameptr "{ll}" format.name$ duplicate$ "others" =
+ { 't := }
+ { pop$ }
+ if$
+ t "others" =
+ {
+ " " * bbl.etal emphasize *
+ }
+ {
+ "\&"
+ space.word * t *
+ }
+ if$
+ }
+ if$
+ }
+ 't
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+ } if$
+}
+FUNCTION {format.names.ed}
+{
+ 'bibinfo :=
+ duplicate$ empty$ 'skip$ {
+ 's :=
+ "" 't :=
+ #1 'nameptr :=
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ { s nameptr
+ "{f.~}{vv~}{ll}{, jj}"
+ format.name$
+ bibinfo bibinfo.check
+ 't :=
+ nameptr #1 >
+ {
+ namesleft #1 >
+ { ", " * t * }
+ {
+ numnames #2 >
+ { "," * }
+ 'skip$
+ if$
+ s nameptr "{ll}" format.name$ duplicate$ "others" =
+ { 't := }
+ { pop$ }
+ if$
+ t "others" =
+ {
+
+ " " * bbl.etal emphasize *
+ }
+ {
+ "\&"
+ space.word * t *
+ }
+ if$
+ }
+ if$
+ }
+ 't
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+ } if$
+}
+FUNCTION {format.key}
+{ empty$
+ { key field.or.null }
+ { "" }
+ if$
+}
+
+FUNCTION {format.authors}
+{ author "author" format.names
+}
+FUNCTION {get.bbl.editor}
+{ editor num.names$ #1 > 'bbl.editors 'bbl.editor if$ }
+
+FUNCTION {format.editors}
+{ editor "editor" format.names duplicate$ empty$ 'skip$
+ {
+ " " *
+ get.bbl.editor
+ capitalize
+ "(" swap$ * ")" *
+ *
+ }
+ if$
+}
+FUNCTION {format.note}
+{
+ note empty$
+ { "" }
+ { note #1 #1 substring$
+ duplicate$ "{" =
+ 'skip$
+ { output.state mid.sentence =
+ { "l" }
+ { "u" }
+ if$
+ change.case$
+ }
+ if$
+ note #2 global.max$ substring$ * "note" bibinfo.check
+ }
+ if$
+}
+
+FUNCTION {format.title}
+{ title
+ duplicate$ empty$ 'skip$
+ { "t" change.case$ }
+ if$
+ "title" bibinfo.check
+}
+FUNCTION {format.full.names}
+{'s :=
+ "" 't :=
+ #1 'nameptr :=
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ { s nameptr
+ "{vv~}{ll}" format.name$
+ 't :=
+ nameptr #1 >
+ {
+ namesleft #1 >
+ { ", " * t * }
+ {
+ s nameptr "{ll}" format.name$ duplicate$ "others" =
+ { 't := }
+ { pop$ }
+ if$
+ t "others" =
+ {
+ " " * bbl.etal emphasize *
+ }
+ {
+ numnames #2 >
+ { "," * }
+ 'skip$
+ if$
+ "\&"
+ space.word * t *
+ }
+ if$
+ }
+ if$
+ }
+ 't
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+}
+
+FUNCTION {author.editor.key.full}
+{ author empty$
+ { editor empty$
+ { key empty$
+ { cite$ #1 #3 substring$ }
+ 'key
+ if$
+ }
+ { editor format.full.names }
+ if$
+ }
+ { author format.full.names }
+ if$
+}
+
+FUNCTION {author.key.full}
+{ author empty$
+ { key empty$
+ { cite$ #1 #3 substring$ }
+ 'key
+ if$
+ }
+ { author format.full.names }
+ if$
+}
+
+FUNCTION {editor.key.full}
+{ editor empty$
+ { key empty$
+ { cite$ #1 #3 substring$ }
+ 'key
+ if$
+ }
+ { editor format.full.names }
+ if$
+}
+
+FUNCTION {make.full.names}
+{ type$ "book" =
+ type$ "inbook" =
+ or
+ 'author.editor.key.full
+ { type$ "proceedings" =
+ 'editor.key.full
+ 'author.key.full
+ if$
+ }
+ if$
+}
+
+FUNCTION {output.bibitem}
+{ newline$
+ "\bibitem[{" write$
+ label write$
+ ")" make.full.names duplicate$ short.list =
+ { pop$ }
+ { * }
+ if$
+ "}]{" * write$
+ cite$ write$
+ "}" write$
+ newline$
+ ""
+ before.all 'output.state :=
+}
+
+FUNCTION {n.dashify}
+{
+ 't :=
+ ""
+ { t empty$ not }
+ { t #1 #1 substring$ "-" =
+ { t #1 #2 substring$ "--" = not
+ { "--" *
+ t #2 global.max$ substring$ 't :=
+ }
+ { { t #1 #1 substring$ "-" = }
+ { "-" *
+ t #2 global.max$ substring$ 't :=
+ }
+ while$
+ }
+ if$
+ }
+ { t #1 #1 substring$ *
+ t #2 global.max$ substring$ 't :=
+ }
+ if$
+ }
+ while$
+}
+
+FUNCTION {word.in}
+{ bbl.in capitalize
+ " " * }
+
+FUNCTION {format.date}
+{ year "year" bibinfo.check duplicate$ empty$
+ {
+ "empty year in " cite$ * "; set to ????" * warning$
+ pop$ "????"
+ }
+ 'skip$
+ if$
+ extra.label *
+ before.all 'output.state :=
+ " (" swap$ * ")" *
+}
+FUNCTION {format.btitle}
+{ title "title" bibinfo.check
+ duplicate$ empty$ 'skip$
+ {
+ emphasize
+ }
+ if$
+}
+FUNCTION {either.or.check}
+{ empty$
+ 'pop$
+ { "can't use both " swap$ * " fields in " * cite$ * warning$ }
+ if$
+}
+FUNCTION {format.bvolume}
+{ volume empty$
+ { "" }
+ { bbl.volume volume tie.or.space.prefix
+ "volume" bibinfo.check * *
+ series "series" bibinfo.check
+ duplicate$ empty$ 'pop$
+ { swap$ bbl.of space.word * swap$
+ emphasize * }
+ if$
+ "volume and number" number either.or.check
+ }
+ if$
+}
+FUNCTION {format.number.series}
+{ volume empty$
+ { number empty$
+ { series field.or.null }
+ { series empty$
+ { number "number" bibinfo.check }
+ { output.state mid.sentence =
+ { bbl.number }
+ { bbl.number capitalize }
+ if$
+ number tie.or.space.prefix "number" bibinfo.check * *
+ bbl.in space.word *
+ series "series" bibinfo.check *
+ }
+ if$
+ }
+ if$
+ }
+ { "" }
+ if$
+}
+
+FUNCTION {format.edition}
+{ edition duplicate$ empty$ 'skip$
+ {
+ output.state mid.sentence =
+ { "l" }
+ { "t" }
+ if$ change.case$
+ "edition" bibinfo.check
+ " " * bbl.edition *
+ }
+ if$
+}
+INTEGERS { multiresult }
+FUNCTION {multi.page.check}
+{ 't :=
+ #0 'multiresult :=
+ { multiresult not
+ t empty$ not
+ and
+ }
+ { t #1 #1 substring$
+ duplicate$ "-" =
+ swap$ duplicate$ "," =
+ swap$ "+" =
+ or or
+ { #1 'multiresult := }
+ { t #2 global.max$ substring$ 't := }
+ if$
+ }
+ while$
+ multiresult
+}
+FUNCTION {format.pages}
+{ pages duplicate$ empty$ 'skip$
+ { duplicate$ multi.page.check
+ {
+ n.dashify
+ }
+ {
+ }
+ if$
+ "pages" bibinfo.check
+ }
+ if$
+}
+FUNCTION {format.journal.pages}
+{ pages duplicate$ empty$ 'pop$
+ { swap$ duplicate$ empty$
+ { pop$ pop$ format.pages }
+ {
+ ", " *
+ swap$
+ n.dashify
+ "pages" bibinfo.check
+ *
+ }
+ if$
+ }
+ if$
+}
+FUNCTION {format.vol.num.pages}
+{ volume field.or.null
+ duplicate$ empty$ 'skip$
+ {
+ "volume" bibinfo.check
+ }
+ if$
+ emphasize
+ number "number" bibinfo.check duplicate$ empty$ 'skip$
+ {
+ swap$ duplicate$ empty$
+ { "there's a number but no volume in " cite$ * warning$ }
+ 'skip$
+ if$
+ swap$
+ "(" swap$ * ")" *
+ }
+ if$ *
+}
+
+FUNCTION {format.chapter.pages}
+{ chapter empty$
+ { "" }
+ { type empty$
+ { bbl.chapter }
+ { type "l" change.case$
+ "type" bibinfo.check
+ }
+ if$
+ chapter tie.or.space.prefix
+ "chapter" bibinfo.check
+ * *
+ }
+ if$
+}
+
+FUNCTION {format.booktitle}
+{
+ booktitle "booktitle" bibinfo.check
+ emphasize
+}
+FUNCTION {format.in.ed.booktitle}
+{ format.booktitle duplicate$ empty$ 'skip$
+ {
+ editor "editor" format.names.ed duplicate$ empty$ 'pop$
+ {
+ " " *
+ get.bbl.editor
+ capitalize
+ "(" swap$ * "), " *
+ * swap$
+ * }
+ if$
+ word.in swap$ *
+ }
+ if$
+}
+FUNCTION {format.thesis.type}
+{ type duplicate$ empty$
+ 'pop$
+ { swap$ pop$
+ "t" change.case$ "type" bibinfo.check
+ }
+ if$
+}
+FUNCTION {format.tr.number}
+{ number "number" bibinfo.check
+ type duplicate$ empty$
+ { pop$ bbl.techrep }
+ 'skip$
+ if$
+ "type" bibinfo.check
+ swap$ duplicate$ empty$
+ { pop$ "t" change.case$ }
+ { tie.or.space.prefix * * }
+ if$
+}
+FUNCTION {format.article.crossref}
+{
+ word.in
+ " \cite{" * crossref * "}" *
+}
+FUNCTION {format.book.crossref}
+{ volume duplicate$ empty$
+ { "empty volume in " cite$ * "'s crossref of " * crossref * warning$
+ pop$ word.in
+ }
+ { bbl.volume
+ capitalize
+ swap$ tie.or.space.prefix "volume" bibinfo.check * * bbl.of space.word *
+ }
+ if$
+ " \cite{" * crossref * "}" *
+}
+FUNCTION {format.incoll.inproc.crossref}
+{
+ word.in
+ " \cite{" * crossref * "}" *
+}
+FUNCTION {format.org.or.pub}
+{ 't :=
+ ""
+ address empty$ t empty$ and
+ 'skip$
+ {
+ address "address" bibinfo.check *
+ t empty$
+ 'skip$
+ { address empty$
+ 'skip$
+ { ": " * }
+ if$
+ t *
+ }
+ if$
+ }
+ if$
+}
+FUNCTION {format.publisher.address}
+{ publisher "publisher" bibinfo.warn format.org.or.pub
+}
+
+FUNCTION {format.organization.address}
+{ organization "organization" bibinfo.check format.org.or.pub
+}
+
+FUNCTION {article}
+{ output.bibitem
+ format.authors "author" output.check
+ author format.key output
+ format.date "year" output.check
+ date.block
+ format.title "title" output.check
+ new.block
+ crossref missing$
+ {
+ journal
+ "journal" bibinfo.check
+ emphasize
+ "journal" output.check
+ format.vol.num.pages output
+ }
+ { format.article.crossref output.nonnull
+ }
+ if$
+ format.journal.pages
+ new.block
+ format.url output
+ new.block
+ format.note output
+ fin.entry
+}
+FUNCTION {book}
+{ output.bibitem
+ author empty$
+ { format.editors "author and editor" output.check
+ editor format.key output
+ }
+ { format.authors output.nonnull
+ crossref missing$
+ { "author and editor" editor either.or.check }
+ 'skip$
+ if$
+ }
+ if$
+ format.date "year" output.check
+ date.block
+ format.btitle "title" output.check
+ crossref missing$
+ { format.bvolume output
+ new.block
+ format.number.series output
+ new.sentence
+ format.publisher.address output
+ }
+ {
+ new.block
+ format.book.crossref output.nonnull
+ }
+ if$
+ format.edition output
+ new.block
+ format.url output
+ new.block
+ format.note output
+ fin.entry
+}
+FUNCTION {booklet}
+{ output.bibitem
+ format.authors output
+ author format.key output
+ format.date "year" output.check
+ date.block
+ format.title "title" output.check
+ new.block
+ howpublished "howpublished" bibinfo.check output
+ address "address" bibinfo.check output
+ new.block
+ format.url output
+ new.block
+ format.note output
+ fin.entry
+}
+
+FUNCTION {inbook}
+{ output.bibitem
+ author empty$
+ { format.editors "author and editor" output.check
+ editor format.key output
+ }
+ { format.authors output.nonnull
+ crossref missing$
+ { "author and editor" editor either.or.check }
+ 'skip$
+ if$
+ }
+ if$
+ format.date "year" output.check
+ date.block
+ format.btitle "title" output.check
+ crossref missing$
+ {
+ format.publisher.address output
+ format.bvolume output
+ format.chapter.pages "chapter and pages" output.check
+ new.block
+ format.number.series output
+ new.sentence
+ }
+ {
+ format.chapter.pages "chapter and pages" output.check
+ new.block
+ format.book.crossref output.nonnull
+ }
+ if$
+ format.edition output
+ format.pages "pages" output.check
+ new.block
+ format.url output
+ new.block
+ format.note output
+ fin.entry
+}
+
+FUNCTION {incollection}
+{ output.bibitem
+ format.authors "author" output.check
+ author format.key output
+ format.date "year" output.check
+ date.block
+ format.title "title" output.check
+ new.block
+ crossref missing$
+ { format.in.ed.booktitle "booktitle" output.check
+ format.publisher.address output
+ format.bvolume output
+ format.number.series output
+ format.chapter.pages output
+ new.sentence
+ format.edition output
+ }
+ { format.incoll.inproc.crossref output.nonnull
+ format.chapter.pages output
+ }
+ if$
+ format.pages "pages" output.check
+ new.block
+ format.url output
+ new.block
+ format.note output
+ fin.entry
+}
+FUNCTION {inproceedings}
+{ output.bibitem
+ format.authors "author" output.check
+ author format.key output
+ format.date "year" output.check
+ date.block
+ format.title "title" output.check
+ new.block
+ crossref missing$
+ { format.in.ed.booktitle "booktitle" output.check
+ new.sentence
+ publisher empty$
+ { format.organization.address output }
+ { organization "organization" bibinfo.check output
+ format.publisher.address output
+ }
+ if$
+ format.bvolume output
+ format.number.series output
+ format.pages output
+ }
+ { format.incoll.inproc.crossref output.nonnull
+ format.pages output
+ }
+ if$
+ new.block
+ format.url output
+ new.block
+ format.note output
+ fin.entry
+}
+FUNCTION {conference} { inproceedings }
+FUNCTION {manual}
+{ output.bibitem
+ format.authors output
+ author format.key output
+ format.date "year" output.check
+ date.block
+ format.btitle "title" output.check
+ organization address new.block.checkb
+ organization "organization" bibinfo.check output
+ address "address" bibinfo.check output
+ format.edition output
+ new.block
+ format.url output
+ new.block
+ format.note output
+ fin.entry
+}
+
+FUNCTION {mastersthesis}
+{ output.bibitem
+ format.authors "author" output.check
+ author format.key output
+ format.date "year" output.check
+ date.block
+ format.btitle
+ "title" output.check
+ new.block
+ bbl.mthesis format.thesis.type output.nonnull
+ school "school" bibinfo.warn output
+ address "address" bibinfo.check output
+ new.block
+ format.url output
+ new.block
+ format.note output
+ fin.entry
+}
+
+FUNCTION {misc}
+{ output.bibitem
+ format.authors output
+ author format.key output
+ format.date "year" output.check
+ date.block
+ format.title output
+ new.block
+ howpublished "howpublished" bibinfo.check output
+ new.block
+ format.url output
+ new.block
+ format.note output
+ fin.entry
+}
+FUNCTION {phdthesis}
+{ output.bibitem
+ format.authors "author" output.check
+ author format.key output
+ format.date "year" output.check
+ date.block
+ format.btitle
+ "title" output.check
+ new.block
+ bbl.phdthesis format.thesis.type output.nonnull
+ school "school" bibinfo.warn output
+ address "address" bibinfo.check output
+ new.block
+ format.url output
+ new.block
+ format.note output
+ fin.entry
+}
+
+FUNCTION {proceedings}
+{ output.bibitem
+ format.editors output
+ editor format.key output
+ format.date "year" output.check
+ date.block
+ format.btitle "title" output.check
+ format.bvolume output
+ format.number.series output
+ new.sentence
+ publisher empty$
+ { format.organization.address output }
+ { organization "organization" bibinfo.check output
+ format.publisher.address output
+ }
+ if$
+ new.block
+ format.url output
+ new.block
+ format.note output
+ fin.entry
+}
+
+FUNCTION {techreport}
+{ output.bibitem
+ format.authors "author" output.check
+ author format.key output
+ format.date "year" output.check
+ date.block
+ format.title
+ "title" output.check
+ new.block
+ format.tr.number output.nonnull
+ institution "institution" bibinfo.warn output
+ address "address" bibinfo.check output
+ new.block
+ format.url output
+ new.block
+ format.note output
+ fin.entry
+}
+
+FUNCTION {unpublished}
+{ output.bibitem
+ format.authors "author" output.check
+ author format.key output
+ format.date "year" output.check
+ date.block
+ format.title "title" output.check
+ new.block
+ format.url output
+ new.block
+ format.note "note" output.check
+ fin.entry
+}
+
+FUNCTION {default.type} { misc }
+READ
+FUNCTION {sortify}
+{ purify$
+ "l" change.case$
+}
+INTEGERS { len }
+FUNCTION {chop.word}
+{ 's :=
+ 'len :=
+ s #1 len substring$ =
+ { s len #1 + global.max$ substring$ }
+ 's
+ if$
+}
+FUNCTION {format.lab.names}
+{ 's :=
+ "" 't :=
+ s #1 "{vv~}{ll}" format.name$
+ s num.names$ duplicate$
+ #2 >
+ { pop$
+ " " * bbl.etal emphasize *
+ }
+ { #2 <
+ 'skip$
+ { s #2 "{ff }{vv }{ll}{ jj}" format.name$ "others" =
+ {
+ " " * bbl.etal emphasize *
+ }
+ { " \& " * s #2 "{vv~}{ll}" format.name$
+ * }
+ if$
+ }
+ if$
+ }
+ if$
+}
+
+FUNCTION {author.key.label}
+{ author empty$
+ { key empty$
+ { cite$ #1 #3 substring$ }
+ 'key
+ if$
+ }
+ { author format.lab.names }
+ if$
+}
+
+FUNCTION {author.editor.key.label}
+{ author empty$
+ { editor empty$
+ { key empty$
+ { cite$ #1 #3 substring$ }
+ 'key
+ if$
+ }
+ { editor format.lab.names }
+ if$
+ }
+ { author format.lab.names }
+ if$
+}
+
+FUNCTION {editor.key.label}
+{ editor empty$
+ { key empty$
+ { cite$ #1 #3 substring$ }
+ 'key
+ if$
+ }
+ { editor format.lab.names }
+ if$
+}
+
+FUNCTION {calc.short.authors}
+{ type$ "book" =
+ type$ "inbook" =
+ or
+ 'author.editor.key.label
+ { type$ "proceedings" =
+ 'editor.key.label
+ 'author.key.label
+ if$
+ }
+ if$
+ 'short.list :=
+}
+
+FUNCTION {calc.label}
+{ calc.short.authors
+ short.list
+ "("
+ *
+ year duplicate$ empty$
+ short.list key field.or.null = or
+ { pop$ "" }
+ 'skip$
+ if$
+ *
+ 'label :=
+}
+
+FUNCTION {sort.format.names}
+{ 's :=
+ #1 'nameptr :=
+ ""
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ { s nameptr
+ "{vv{ } }{ll{ }}{ f{ }}{ jj{ }}"
+ format.name$ 't :=
+ nameptr #1 >
+ {
+ " " *
+ namesleft #1 = t "others" = and
+ { "zzzzz" * }
+ { t sortify * }
+ if$
+ }
+ { t sortify * }
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+}
+
+FUNCTION {sort.format.title}
+{ 't :=
+ "A " #2
+ "An " #3
+ "The " #4 t chop.word
+ chop.word
+ chop.word
+ sortify
+ #1 global.max$ substring$
+}
+FUNCTION {author.sort}
+{ author empty$
+ { key empty$
+ { "to sort, need author or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { author sort.format.names }
+ if$
+}
+FUNCTION {author.editor.sort}
+{ author empty$
+ { editor empty$
+ { key empty$
+ { "to sort, need author, editor, or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { editor sort.format.names }
+ if$
+ }
+ { author sort.format.names }
+ if$
+}
+FUNCTION {editor.sort}
+{ editor empty$
+ { key empty$
+ { "to sort, need editor or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { editor sort.format.names }
+ if$
+}
+FUNCTION {presort}
+{ calc.label
+ label sortify
+ " "
+ *
+ type$ "book" =
+ type$ "inbook" =
+ or
+ 'author.editor.sort
+ { type$ "proceedings" =
+ 'editor.sort
+ 'author.sort
+ if$
+ }
+ if$
+ #1 entry.max$ substring$
+ 'sort.label :=
+ sort.label
+ *
+ " "
+ *
+ title field.or.null
+ sort.format.title
+ *
+ #1 entry.max$ substring$
+ 'sort.key$ :=
+}
+
+ITERATE {presort}
+SORT
+STRINGS { last.label next.extra }
+INTEGERS { last.extra.num number.label }
+FUNCTION {initialize.extra.label.stuff}
+{ #0 int.to.chr$ 'last.label :=
+ "" 'next.extra :=
+ #0 'last.extra.num :=
+ #0 'number.label :=
+}
+FUNCTION {forward.pass}
+{ last.label label =
+ { last.extra.num #1 + 'last.extra.num :=
+ last.extra.num int.to.chr$ 'extra.label :=
+ }
+ { "a" chr.to.int$ 'last.extra.num :=
+ "" 'extra.label :=
+ label 'last.label :=
+ }
+ if$
+ number.label #1 + 'number.label :=
+}
+FUNCTION {reverse.pass}
+{ next.extra "b" =
+ { "a" 'extra.label := }
+ 'skip$
+ if$
+ extra.label 'next.extra :=
+ extra.label
+ duplicate$ empty$
+ 'skip$
+ { "{\natexlab{" swap$ * "}}" * }
+ if$
+ 'extra.label :=
+ label extra.label * 'label :=
+}
+EXECUTE {initialize.extra.label.stuff}
+ITERATE {forward.pass}
+REVERSE {reverse.pass}
+FUNCTION {bib.sort.order}
+{ sort.label
+ " "
+ *
+ year field.or.null sortify
+ *
+ " "
+ *
+ title field.or.null
+ sort.format.title
+ *
+ #1 entry.max$ substring$
+ 'sort.key$ :=
+}
+ITERATE {bib.sort.order}
+SORT
+FUNCTION {begin.bib}
+{ preamble$ empty$
+ 'skip$
+ { preamble$ write$ newline$ }
+ if$
+ "\begin{thebibliography}{" number.label int.to.str$ * "}" *
+ write$ newline$
+ "\expandafter\ifx\csname natexlab\endcsname\relax\def\natexlab#1{#1}\fi"
+ write$ newline$
+ "\expandafter\ifx\csname url\endcsname\relax"
+ write$ newline$
+ " \def\url#1{{\tt #1}}\fi"
+ write$ newline$
+ "\expandafter\ifx\csname urlprefix\endcsname\relax\def\urlprefix{URL }\fi"
+ write$ newline$
+}
+EXECUTE {begin.bib}
+EXECUTE {init.state.consts}
+ITERATE {call.type$}
+FUNCTION {end.bib}
+{ newline$
+ "\end{thebibliography}" write$ newline$
+}
+EXECUTE {end.bib}
+%% End of customized bst file
+%%
+%% End of file `decsci.bst'.
diff --git a/biblio/bibtex/contrib/misc/development.bst b/biblio/bibtex/contrib/misc/development.bst
new file mode 100644
index 0000000000..329eddd399
--- /dev/null
+++ b/biblio/bibtex/contrib/misc/development.bst
@@ -0,0 +1,1495 @@
+%% Stephen Eglen, Jan 2003. Bibtex style file for the journal
+%% Development -- http://dev.biologists.org
+%% See also http://www.anc.ed.ac.uk/~stephen/development-bibtex for example.
+%%
+%% This package is free software; you can redistribute it and/or modify
+%% it under the terms of the GNU General Public License as published by
+%% the Free Software Foundation; either version 2, or (at your option)
+%% any later version.
+%% This is file `development.bst',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% merlin.mbs (with options: `,ay,nat,nm-rev,nmft,nmft-bf,keyxyr,dt-beg,yr-par,note-yr,vol-bf,vnum-x,volp-com,pp-last,jnm-x,add-pub,isbn,issn,ed,xedn,and-xcom')
+%% ----------------------------------------
+%% *** Example style file for Development journal ***
+%%
+%% Copyright 1994-1999 Patrick W Daly
+ % ===============================================================
+ % IMPORTANT NOTICE:
+ % This bibliographic style (bst) file has been generated from one or
+ % more master bibliographic style (mbs) files, listed above.
+ %
+ % This generated file can be redistributed and/or modified under the terms
+ % of the LaTeX Project Public License Distributed from CTAN
+ % archives in directory macros/latex/base/lppl.txt; either
+ % version 1 of the License, or any later version.
+ % ===============================================================
+ % Name and version information of the main mbs file:
+ % \ProvidesFile{merlin.mbs}[1999/05/28 3.89 (PWD)]
+ % For use with BibTeX version 0.99a or later
+ %-------------------------------------------------------------------
+ % This bibliography style file is intended for texts in ENGLISH
+ % This is an author-year citation style bibliography. As such, it is
+ % non-standard LaTeX, and requires a special package file to function properly.
+ % Such a package is natbib.sty by Patrick W. Daly
+ % The form of the \bibitem entries is
+ % \bibitem[Jones et al.(1990)]{key}...
+ % \bibitem[Jones et al.(1990)Jones, Baker, and Smith]{key}...
+ % The essential feature is that the label (the part in brackets) consists
+ % of the author names, as they should appear in the citation, with the year
+ % in parentheses following. There must be no space before the opening
+ % parenthesis!
+ % With natbib v5.3, a full list of authors may also follow the year.
+ % In natbib.sty, it is possible to define the type of enclosures that is
+ % really wanted (brackets or parentheses), but in either case, there must
+ % be parentheses in the label.
+ % The \cite command functions as follows:
+ % \citet{key} ==>> Jones et al. (1990)
+ % \citet*{key} ==>> Jones, Baker, and Smith (1990)
+ % \citep{key} ==>> (Jones et al., 1990)
+ % \citep*{key} ==>> (Jones, Baker, and Smith, 1990)
+ % \citep[chap. 2]{key} ==>> (Jones et al., 1990, chap. 2)
+ % \citep[e.g.][]{key} ==>> (e.g. Jones et al., 1990)
+ % \citep[e.g.][p. 32]{key} ==>> (e.g. Jones et al., p. 32)
+ % \citeauthor{key} ==>> Jones et al.
+ % \citeauthor*{key} ==>> Jones, Baker, and Smith
+ % \citeyear{key} ==>> 1990
+ %---------------------------------------------------------------------
+
+ENTRY
+ { address
+ author
+ booktitle
+ chapter
+ edition
+ editor
+ howpublished
+ institution
+ isbn
+ issn
+ journal
+ key
+ month
+ note
+ number
+ organization
+ pages
+ publisher
+ school
+ series
+ title
+ type
+ volume
+ year
+ }
+ {}
+ { label extra.label sort.label short.list }
+
+INTEGERS { output.state before.all mid.sentence after.sentence after.block }
+
+FUNCTION {init.state.consts}
+{ #0 'before.all :=
+ #1 'mid.sentence :=
+ #2 'after.sentence :=
+ #3 'after.block :=
+}
+
+STRINGS { s t }
+
+FUNCTION {output.nonnull}
+{ 's :=
+ output.state mid.sentence =
+ { ", " * write$ }
+ { output.state after.block =
+ { add.period$ write$
+ newline$
+ "\newblock " write$
+ }
+ { output.state before.all =
+ 'write$
+ { add.period$ " " * write$ }
+ if$
+ }
+ if$
+ mid.sentence 'output.state :=
+ }
+ if$
+ s
+}
+
+FUNCTION {output}
+{ duplicate$ empty$
+ 'pop$
+ 'output.nonnull
+ if$
+}
+
+FUNCTION {output.check}
+{ 't :=
+ duplicate$ empty$
+ { pop$ "empty " t * " in " * cite$ * warning$ }
+ 'output.nonnull
+ if$
+}
+
+FUNCTION {fin.entry}
+{ add.period$
+ write$
+ newline$
+}
+
+FUNCTION {new.block}
+{ output.state before.all =
+ 'skip$
+ { after.block 'output.state := }
+ if$
+}
+
+FUNCTION {new.sentence}
+{ output.state after.block =
+ 'skip$
+ { output.state before.all =
+ 'skip$
+ { after.sentence 'output.state := }
+ if$
+ }
+ if$
+}
+
+FUNCTION {add.blank}
+{ " " * before.all 'output.state :=
+}
+
+FUNCTION {date.block}
+{
+ new.block
+}
+
+FUNCTION {not}
+{ { #0 }
+ { #1 }
+ if$
+}
+
+FUNCTION {and}
+{ 'skip$
+ { pop$ #0 }
+ if$
+}
+
+FUNCTION {or}
+{ { pop$ #1 }
+ 'skip$
+ if$
+}
+
+FUNCTION {new.block.checkb}
+{ empty$
+ swap$ empty$
+ and
+ 'skip$
+ 'new.block
+ if$
+}
+
+FUNCTION {field.or.null}
+{ duplicate$ empty$
+ { pop$ "" }
+ 'skip$
+ if$
+}
+
+FUNCTION {emphasize}
+{ duplicate$ empty$
+ { pop$ "" }
+ { "{\em " swap$ * "\/}" * }
+ if$
+}
+
+FUNCTION {bolden}
+{ duplicate$ empty$
+ { pop$ "" }
+ { "{\bf " swap$ * "}" * }
+ if$
+}
+
+FUNCTION {bib.name.font}
+{ bolden }
+
+FUNCTION {bib.fname.font}
+{ bib.name.font }
+
+FUNCTION {capitalize}
+{ "u" change.case$ "t" change.case$ }
+
+FUNCTION {space.word}
+{ " " swap$ * " " * }
+
+ % Here are the language-specific definitions for explicit words.
+ % Each function has a name bbl.xxx where xxx is the English word.
+ % The language selected here is ENGLISH
+FUNCTION {bbl.and}
+{ "and"}
+
+FUNCTION {bbl.etal}
+{ "et~al." }
+
+FUNCTION {bbl.editors}
+{ "eds." }
+
+FUNCTION {bbl.editor}
+{ "ed." }
+
+FUNCTION {bbl.edby}
+{ "edited by" }
+
+FUNCTION {bbl.edition}
+{ "edition" }
+
+FUNCTION {bbl.volume}
+{ "volume" }
+
+FUNCTION {bbl.of}
+{ "of" }
+
+FUNCTION {bbl.number}
+{ "number" }
+
+FUNCTION {bbl.nr}
+{ "no." }
+
+FUNCTION {bbl.in}
+{ "in" }
+
+FUNCTION {bbl.pages}
+{ "pages" }
+
+FUNCTION {bbl.page}
+{ "page" }
+
+FUNCTION {bbl.chapter}
+{ "chapter" }
+
+FUNCTION {bbl.techrep}
+{ "Technical Report" }
+
+FUNCTION {bbl.mthesis}
+{ "Master's thesis" }
+
+FUNCTION {bbl.phdthesis}
+{ "Ph.D. thesis" }
+
+MACRO {jan} {"January"}
+
+MACRO {feb} {"February"}
+
+MACRO {mar} {"March"}
+
+MACRO {apr} {"April"}
+
+MACRO {may} {"May"}
+
+MACRO {jun} {"June"}
+
+MACRO {jul} {"July"}
+
+MACRO {aug} {"August"}
+
+MACRO {sep} {"September"}
+
+MACRO {oct} {"October"}
+
+MACRO {nov} {"November"}
+
+MACRO {dec} {"December"}
+
+MACRO {acmcs} {"ACM Computing Surveys"}
+
+MACRO {acta} {"Acta Informatica"}
+
+MACRO {cacm} {"Communications of the ACM"}
+
+MACRO {ibmjrd} {"IBM Journal of Research and Development"}
+
+MACRO {ibmsj} {"IBM Systems Journal"}
+
+MACRO {ieeese} {"IEEE Transactions on Software Engineering"}
+
+MACRO {ieeetc} {"IEEE Transactions on Computers"}
+
+MACRO {ieeetcad}
+ {"IEEE Transactions on Computer-Aided Design of Integrated Circuits"}
+
+MACRO {ipl} {"Information Processing Letters"}
+
+MACRO {jacm} {"Journal of the ACM"}
+
+MACRO {jcss} {"Journal of Computer and System Sciences"}
+
+MACRO {scp} {"Science of Computer Programming"}
+
+MACRO {sicomp} {"SIAM Journal on Computing"}
+
+MACRO {tocs} {"ACM Transactions on Computer Systems"}
+
+MACRO {tods} {"ACM Transactions on Database Systems"}
+
+MACRO {tog} {"ACM Transactions on Graphics"}
+
+MACRO {toms} {"ACM Transactions on Mathematical Software"}
+
+MACRO {toois} {"ACM Transactions on Office Information Systems"}
+
+MACRO {toplas} {"ACM Transactions on Programming Languages and Systems"}
+
+MACRO {tcs} {"Theoretical Computer Science"}
+
+
+INTEGERS { nameptr namesleft numnames }
+
+FUNCTION {format.names}
+{ 's :=
+ "" 't :=
+ #1 'nameptr :=
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ { s nameptr
+ "{vv~}{ll}{, jj}{, f.}" format.name$
+ 't :=
+ nameptr #1 >
+ {
+ namesleft #1 >
+ { ", " * t * }
+ {
+ s nameptr "{ll}" format.name$ duplicate$ "others" =
+ { 't := }
+ { pop$ }
+ if$
+ t "others" =
+ {
+ " " * bbl.etal *
+ bib.name.font
+ }
+ { bbl.and
+ space.word * t *
+ }
+ if$
+ }
+ if$
+ }
+ 't
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+ t "others" =
+ 'skip$
+ { bib.name.font }
+ if$
+}
+
+FUNCTION {format.names.ed}
+{ 's :=
+ "" 't :=
+ #1 'nameptr :=
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ { s nameptr
+ "{f.~}{vv~}{ll}{, jj}"
+ format.name$
+ 't :=
+ nameptr #1 >
+ {
+ namesleft #1 >
+ { ", " * t * }
+ {
+ s nameptr "{ll}" format.name$ duplicate$ "others" =
+ { 't := }
+ { pop$ }
+ if$
+ t "others" =
+ {
+
+ " " * bbl.etal *
+ }
+ { bbl.and
+ space.word * t *
+ }
+ if$
+ }
+ if$
+ }
+ 't
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+}
+
+FUNCTION {format.key}
+{ empty$
+ { key field.or.null }
+ { "" }
+ if$
+}
+
+FUNCTION {format.authors}
+{ author empty$
+ { "" }
+ { author format.names }
+ if$
+}
+
+FUNCTION {format.editors}
+{ editor empty$
+ { "" }
+ { editor format.names
+ ", " *
+ editor num.names$ #1 >
+ 'bbl.editors
+ 'bbl.editor
+ if$
+ *
+ }
+ if$
+}
+
+FUNCTION {format.in.editors}
+{ editor empty$
+ { "" }
+ { editor format.names.ed
+ editor num.names$ #1 >
+ { ", " * bbl.editors * }
+ { ", " * bbl.editor * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.isbn}
+{ isbn empty$
+ { "" }
+ {
+ new.block
+ "ISBN " isbn * }
+ if$
+}
+
+FUNCTION {format.issn}
+{ issn empty$
+ { "" }
+ {
+ new.block
+ "ISSN " issn * }
+ if$
+}
+
+FUNCTION {format.note}
+{
+ note empty$
+ { "" }
+ { note #1 #1 substring$
+ duplicate$ "{" =
+ 'skip$
+ { output.state mid.sentence =
+ { "l" }
+ { "u" }
+ if$
+ change.case$
+ }
+ if$
+ note #2 global.max$ substring$ *
+ }
+ if$
+}
+
+FUNCTION {format.title}
+{ title empty$
+ { "" }
+ { title "t" change.case$
+ }
+ if$
+}
+
+FUNCTION {format.full.names}
+{'s :=
+ "" 't :=
+ #1 'nameptr :=
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ { s nameptr
+ "{vv~}{ll}" format.name$
+ 't :=
+ nameptr #1 >
+ {
+ namesleft #1 >
+ { ", " * t * }
+ {
+ s nameptr "{ll}" format.name$ duplicate$ "others" =
+ { 't := }
+ { pop$ }
+ if$
+ t "others" =
+ {
+ " " * bbl.etal *
+ }
+ {
+ bbl.and
+ space.word * t *
+ }
+ if$
+ }
+ if$
+ }
+ 't
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+}
+
+FUNCTION {author.editor.key.full}
+{ author empty$
+ { editor empty$
+ { key empty$
+ { cite$ #1 #3 substring$ }
+ 'key
+ if$
+ }
+ { editor format.full.names }
+ if$
+ }
+ { author format.full.names }
+ if$
+}
+
+FUNCTION {author.key.full}
+{ author empty$
+ { key empty$
+ { cite$ #1 #3 substring$ }
+ 'key
+ if$
+ }
+ { author format.full.names }
+ if$
+}
+
+FUNCTION {editor.key.full}
+{ editor empty$
+ { key empty$
+ { cite$ #1 #3 substring$ }
+ 'key
+ if$
+ }
+ { editor format.full.names }
+ if$
+}
+
+FUNCTION {make.full.names}
+{ type$ "book" =
+ type$ "inbook" =
+ or
+ 'author.editor.key.full
+ { type$ "proceedings" =
+ 'editor.key.full
+ 'author.key.full
+ if$
+ }
+ if$
+}
+
+FUNCTION {output.bibitem}
+{ newline$
+ "\bibitem[{" write$
+ label write$
+ ")" make.full.names duplicate$ short.list =
+ { pop$ }
+ { * }
+ if$
+ "}]{" * write$
+ cite$ write$
+ "}" write$
+ newline$
+ ""
+ before.all 'output.state :=
+}
+
+FUNCTION {n.dashify}
+{
+ 't :=
+ ""
+ { t empty$ not }
+ { t #1 #1 substring$ "-" =
+ { t #1 #2 substring$ "--" = not
+ { "--" *
+ t #2 global.max$ substring$ 't :=
+ }
+ { { t #1 #1 substring$ "-" = }
+ { "-" *
+ t #2 global.max$ substring$ 't :=
+ }
+ while$
+ }
+ if$
+ }
+ { t #1 #1 substring$ *
+ t #2 global.max$ substring$ 't :=
+ }
+ if$
+ }
+ while$
+}
+
+FUNCTION {word.in}
+{ bbl.in capitalize
+ " " * }
+
+FUNCTION {format.date}
+{ year duplicate$ empty$
+ { "empty year in " cite$ * "; set to ????" * warning$
+ pop$ "????" }
+ 'skip$
+ if$
+ extra.label *
+ before.all 'output.state :=
+ " (" swap$ * ")" *
+}
+
+FUNCTION {format.btitle}
+{ title emphasize
+}
+
+FUNCTION {tie.or.space.connect}
+{ duplicate$ text.length$ #3 <
+ { "~" }
+ { " " }
+ if$
+ swap$ * *
+}
+
+FUNCTION {either.or.check}
+{ empty$
+ 'pop$
+ { "can't use both " swap$ * " fields in " * cite$ * warning$ }
+ if$
+}
+
+FUNCTION {format.bvolume}
+{ volume empty$
+ { "" }
+ { bbl.volume volume tie.or.space.connect
+ series empty$
+ 'skip$
+ { bbl.of space.word * series emphasize * }
+ if$
+ "volume and number" number either.or.check
+ }
+ if$
+}
+
+FUNCTION {format.number.series}
+{ volume empty$
+ { number empty$
+ { series field.or.null }
+ { output.state mid.sentence =
+ { bbl.number }
+ { bbl.number capitalize }
+ if$
+ number tie.or.space.connect
+ series empty$
+ { "there's a number but no series in " cite$ * warning$ }
+ { bbl.in space.word * series * }
+ if$
+ }
+ if$
+ }
+ { "" }
+ if$
+}
+
+
+FUNCTION {format.edition}
+{ edition empty$
+ { "" }
+ { output.state mid.sentence =
+ { edition "l" change.case$ " " * bbl.edition * }
+ { edition "t" change.case$ " " * bbl.edition * }
+ if$
+ }
+ if$
+}
+
+INTEGERS { multiresult }
+
+FUNCTION {multi.page.check}
+{ 't :=
+ #0 'multiresult :=
+ { multiresult not
+ t empty$ not
+ and
+ }
+ { t #1 #1 substring$
+ duplicate$ "-" =
+ swap$ duplicate$ "," =
+ swap$ "+" =
+ or or
+ { #1 'multiresult := }
+ { t #2 global.max$ substring$ 't := }
+ if$
+ }
+ while$
+ multiresult
+}
+
+FUNCTION {format.pages}
+{ pages empty$
+ { "" }
+ { pages multi.page.check
+ { bbl.pages pages n.dashify tie.or.space.connect }
+ { bbl.page pages tie.or.space.connect }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.journal.pages}
+{ pages empty$
+ 'skip$
+ { duplicate$ empty$
+ { pop$ format.pages }
+ {
+ ", " *
+ pages n.dashify *
+ }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.vol.num.pages}
+{ volume field.or.null
+ bolden
+}
+
+FUNCTION {format.chapter.pages}
+{ chapter empty$
+ { "" }
+ { type empty$
+ { bbl.chapter }
+ { type "l" change.case$ }
+ if$
+ chapter tie.or.space.connect
+ }
+ if$
+}
+
+FUNCTION {format.in.ed.booktitle}
+{ booktitle empty$
+ { "" }
+ { editor empty$
+ { word.in booktitle emphasize * }
+ { word.in format.in.editors * ", " *
+ booktitle emphasize * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.thesis.type}
+{ type empty$
+ 'skip$
+ { pop$
+ type "t" change.case$
+ }
+ if$
+}
+
+FUNCTION {format.tr.number}
+{ type empty$
+ { bbl.techrep }
+ 'type
+ if$
+ number empty$
+ { "t" change.case$ }
+ { number tie.or.space.connect }
+ if$
+}
+
+FUNCTION {format.article.crossref}
+{
+ word.in
+ " \cite{" * crossref * "}" *
+}
+
+FUNCTION {format.book.crossref}
+{ volume empty$
+ { "empty volume in " cite$ * "'s crossref of " * crossref * warning$
+ word.in
+ }
+ { bbl.volume capitalize
+ volume tie.or.space.connect
+ bbl.of space.word *
+ }
+ if$
+ " \cite{" * crossref * "}" *
+}
+
+FUNCTION {format.incoll.inproc.crossref}
+{
+ word.in
+ " \cite{" * crossref * "}" *
+}
+
+FUNCTION {format.org.or.pub}
+{ 't :=
+ ""
+ address empty$ t empty$ and
+ 'skip$
+ {
+ address empty$
+ 'skip$
+ { address * }
+ if$
+ t empty$
+ 'skip$
+ { address empty$
+ 'skip$
+ { ": " * }
+ if$
+ t *
+ }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.publisher.address}
+{ publisher empty$
+ { "empty publisher in " cite$ * warning$
+ ""
+ }
+ { publisher }
+ if$
+ format.org.or.pub
+}
+
+FUNCTION {format.organization.address}
+{ organization empty$
+ { "" }
+ { organization }
+ if$
+ format.org.or.pub
+}
+
+FUNCTION {article}
+{ output.bibitem
+ format.authors "author" output.check
+ author format.key output
+ format.date "year" output.check
+ date.block
+ format.title "title" output.check
+ new.block
+ crossref missing$
+ { journal
+ emphasize
+ "journal" output.check
+ add.blank
+ format.vol.num.pages output
+ }
+ { format.article.crossref output.nonnull
+ format.pages output
+ }
+ if$
+ format.journal.pages
+ format.issn output
+ new.block
+ format.note output
+ fin.entry
+}
+
+FUNCTION {book}
+{ output.bibitem
+ author empty$
+ { format.editors "author and editor" output.check
+ editor format.key output
+ }
+ { format.authors output.nonnull
+ crossref missing$
+ { "author and editor" editor either.or.check }
+ 'skip$
+ if$
+ }
+ if$
+ format.date "year" output.check
+ date.block
+ format.btitle "title" output.check
+ crossref missing$
+ { format.bvolume output
+ new.block
+ format.number.series output
+ new.sentence
+ format.publisher.address output
+ }
+ {
+ new.block
+ format.book.crossref output.nonnull
+ }
+ if$
+ format.edition output
+ format.isbn output
+ new.block
+ format.note output
+ fin.entry
+}
+
+FUNCTION {booklet}
+{ output.bibitem
+ format.authors output
+ author format.key output
+ format.date "year" output.check
+ date.block
+ format.title "title" output.check
+ new.block
+ howpublished output
+ address output
+ format.isbn output
+ new.block
+ format.note output
+ fin.entry
+}
+
+FUNCTION {inbook}
+{ output.bibitem
+ author empty$
+ { format.editors "author and editor" output.check
+ editor format.key output
+ }
+ { format.authors output.nonnull
+ crossref missing$
+ { "author and editor" editor either.or.check }
+ 'skip$
+ if$
+ }
+ if$
+ format.date "year" output.check
+ date.block
+ format.btitle "title" output.check
+ crossref missing$
+ {
+ format.bvolume output
+ format.chapter.pages "chapter and pages" output.check
+ new.block
+ format.number.series output
+ new.sentence
+ format.publisher.address output
+ }
+ {
+ format.chapter.pages "chapter and pages" output.check
+ new.block
+ format.book.crossref output.nonnull
+ }
+ if$
+ format.edition output
+ crossref missing$
+ { format.isbn output }
+ 'skip$
+ if$
+ format.pages "pages" output.check
+ new.block
+ format.note output
+ fin.entry
+}
+
+FUNCTION {incollection}
+{ output.bibitem
+ format.authors "author" output.check
+ author format.key output
+ format.date "year" output.check
+ date.block
+ format.title "title" output.check
+ new.block
+ crossref missing$
+ { format.in.ed.booktitle "booktitle" output.check
+ format.bvolume output
+ format.number.series output
+ format.chapter.pages output
+ new.sentence
+ format.publisher.address output
+ format.edition output
+ format.isbn output
+ }
+ { format.incoll.inproc.crossref output.nonnull
+ format.chapter.pages output
+ }
+ if$
+ format.pages "pages" output.check
+ new.block
+ format.note output
+ fin.entry
+}
+
+FUNCTION {inproceedings}
+{ output.bibitem
+ format.authors "author" output.check
+ author format.key output
+ format.date "year" output.check
+ date.block
+ format.title "title" output.check
+ new.block
+ crossref missing$
+ { format.in.ed.booktitle "booktitle" output.check
+ format.bvolume output
+ format.number.series output
+ new.sentence
+ publisher empty$
+ { format.organization.address output }
+ { organization output
+ format.publisher.address output
+ }
+ if$
+ format.isbn output
+ format.issn output
+ }
+ { format.incoll.inproc.crossref output.nonnull
+ format.pages output
+ }
+ if$
+ new.block
+ format.note output
+ fin.entry
+}
+
+FUNCTION {conference} { inproceedings }
+
+FUNCTION {manual}
+{ output.bibitem
+ format.authors output
+ author format.key output
+ format.date "year" output.check
+ date.block
+ format.btitle "title" output.check
+ organization address new.block.checkb
+ organization output
+ address output
+ format.edition output
+ new.block
+ format.note output
+ fin.entry
+}
+
+FUNCTION {mastersthesis}
+{ output.bibitem
+ format.authors "author" output.check
+ author format.key output
+ format.date "year" output.check
+ date.block
+ format.btitle "title" output.check
+ new.block
+ bbl.mthesis format.thesis.type output.nonnull
+ school "school" output.check
+ address output
+ new.block
+ format.note output
+ fin.entry
+}
+
+FUNCTION {misc}
+{ output.bibitem
+ format.authors output
+ author format.key output
+ format.date "year" output.check
+ date.block
+ format.title output
+ new.block
+ howpublished output
+ new.block
+ format.note output
+ fin.entry
+}
+
+FUNCTION {phdthesis}
+{ output.bibitem
+ format.authors "author" output.check
+ author format.key output
+ format.date "year" output.check
+ date.block
+ format.btitle "title" output.check
+ new.block
+ bbl.phdthesis format.thesis.type output.nonnull
+ school "school" output.check
+ address output
+ new.block
+ format.note output
+ fin.entry
+}
+
+FUNCTION {proceedings}
+{ output.bibitem
+ format.editors output
+ editor format.key output
+ format.date "year" output.check
+ date.block
+ format.btitle "title" output.check
+ format.bvolume output
+ format.number.series output
+ new.sentence
+ publisher empty$
+ { format.organization.address output }
+ { organization output
+ format.publisher.address output
+ }
+ if$
+ format.isbn output
+ format.issn output
+ new.block
+ format.note output
+ fin.entry
+}
+
+FUNCTION {techreport}
+{ output.bibitem
+ format.authors "author" output.check
+ author format.key output
+ format.date "year" output.check
+ date.block
+ format.title "title" output.check
+ new.block
+ format.tr.number output.nonnull
+ institution "institution" output.check
+ address output
+ new.block
+ format.note output
+ fin.entry
+}
+
+FUNCTION {unpublished}
+{ output.bibitem
+ format.authors "author" output.check
+ author format.key output
+ format.date "year" output.check
+ date.block
+ format.title "title" output.check
+ new.block
+ format.note "note" output.check
+ fin.entry
+}
+
+FUNCTION {default.type} { misc }
+
+READ
+
+FUNCTION {sortify}
+{ purify$
+ "l" change.case$
+}
+
+INTEGERS { len }
+
+FUNCTION {chop.word}
+{ 's :=
+ 'len :=
+ s #1 len substring$ =
+ { s len #1 + global.max$ substring$ }
+ 's
+ if$
+}
+
+FUNCTION {format.lab.names}
+{ 's :=
+ "" 't :=
+ s #1 "{vv~}{ll}" format.name$
+ s num.names$ duplicate$
+ #2 >
+ { pop$
+ " " * bbl.etal *
+ }
+ { #2 <
+ 'skip$
+ { s #2 "{ff }{vv }{ll}{ jj}" format.name$ "others" =
+ {
+ " " * bbl.etal *
+ }
+ { bbl.and space.word * s #2 "{vv~}{ll}" format.name$
+ * }
+ if$
+ }
+ if$
+ }
+ if$
+}
+
+FUNCTION {author.key.label}
+{ author empty$
+ { key empty$
+ { cite$ #1 #3 substring$ }
+ 'key
+ if$
+ }
+ { author format.lab.names }
+ if$
+}
+
+FUNCTION {author.editor.key.label}
+{ author empty$
+ { editor empty$
+ { key empty$
+ { cite$ #1 #3 substring$ }
+ 'key
+ if$
+ }
+ { editor format.lab.names }
+ if$
+ }
+ { author format.lab.names }
+ if$
+}
+
+FUNCTION {editor.key.label}
+{ editor empty$
+ { key empty$
+ { cite$ #1 #3 substring$ }
+ 'key
+ if$
+ }
+ { editor format.lab.names }
+ if$
+}
+
+FUNCTION {calc.short.authors}
+{ type$ "book" =
+ type$ "inbook" =
+ or
+ 'author.editor.key.label
+ { type$ "proceedings" =
+ 'editor.key.label
+ 'author.key.label
+ if$
+ }
+ if$
+ 'short.list :=
+}
+
+FUNCTION {calc.label}
+{ calc.short.authors
+ short.list
+ "("
+ *
+ year duplicate$ empty$
+ short.list key field.or.null = or
+ { pop$ "????" }
+ 'skip$
+ if$
+ *
+ 'label :=
+}
+
+FUNCTION {sort.format.names}
+{ 's :=
+ #1 'nameptr :=
+ ""
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ { s nameptr
+ "{vv{ } }{ll{ }}{ f{ }}{ jj{ }}"
+ format.name$ 't :=
+ nameptr #1 >
+ {
+ " " *
+ namesleft #1 = t "others" = and
+ { "zzzzz" * }
+ { t sortify * }
+ if$
+ }
+ { t sortify * }
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+}
+
+FUNCTION {sort.format.title}
+{ 't :=
+ "A " #2
+ "An " #3
+ "The " #4 t chop.word
+ chop.word
+ chop.word
+ sortify
+ #1 global.max$ substring$
+}
+
+FUNCTION {author.sort}
+{ author empty$
+ { key empty$
+ { "to sort, need author or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { author sort.format.names }
+ if$
+}
+
+FUNCTION {author.editor.sort}
+{ author empty$
+ { editor empty$
+ { key empty$
+ { "to sort, need author, editor, or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { editor sort.format.names }
+ if$
+ }
+ { author sort.format.names }
+ if$
+}
+
+FUNCTION {editor.sort}
+{ editor empty$
+ { key empty$
+ { "to sort, need editor or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { editor sort.format.names }
+ if$
+}
+
+FUNCTION {presort}
+{ calc.label
+ label sortify
+ " "
+ *
+ type$ "book" =
+ type$ "inbook" =
+ or
+ 'author.editor.sort
+ { type$ "proceedings" =
+ 'editor.sort
+ 'author.sort
+ if$
+ }
+ if$
+ #1 entry.max$ substring$
+ 'sort.label :=
+ sort.label
+ *
+ " "
+ *
+ title field.or.null
+ sort.format.title
+ *
+ #1 entry.max$ substring$
+ 'sort.key$ :=
+}
+
+ITERATE {presort}
+
+SORT
+
+STRINGS { last.label next.extra }
+
+INTEGERS { last.extra.num number.label }
+
+FUNCTION {initialize.extra.label.stuff}
+{ #0 int.to.chr$ 'last.label :=
+ "" 'next.extra :=
+ #0 'last.extra.num :=
+ #0 'number.label :=
+}
+
+FUNCTION {forward.pass}
+{ last.label label =
+ { last.extra.num #1 + 'last.extra.num :=
+ last.extra.num int.to.chr$ 'extra.label :=
+ }
+ { "a" chr.to.int$ 'last.extra.num :=
+ "" 'extra.label :=
+ label 'last.label :=
+ }
+ if$
+ number.label #1 + 'number.label :=
+}
+
+FUNCTION {reverse.pass}
+{ next.extra "b" =
+ { "a" 'extra.label := }
+ 'skip$
+ if$
+ extra.label 'next.extra :=
+ extra.label
+ duplicate$ empty$
+ 'skip$
+ { "{\natexlab{" swap$ * "}}" * }
+ if$
+ 'extra.label :=
+ label extra.label * 'label :=
+}
+
+EXECUTE {initialize.extra.label.stuff}
+
+ITERATE {forward.pass}
+
+REVERSE {reverse.pass}
+
+FUNCTION {bib.sort.order}
+{ sort.label
+ " "
+ *
+ year field.or.null sortify
+ *
+ " "
+ *
+ title field.or.null
+ sort.format.title
+ *
+ #1 entry.max$ substring$
+ 'sort.key$ :=
+}
+
+ITERATE {bib.sort.order}
+
+SORT
+
+FUNCTION {begin.bib}
+{ preamble$ empty$
+ 'skip$
+ { preamble$ write$ newline$ }
+ if$
+ "\begin{thebibliography}{" number.label int.to.str$ * "}" *
+ write$ newline$
+ "\expandafter\ifx\csname natexlab\endcsname\relax\def\natexlab#1{#1}\fi"
+ write$ newline$
+}
+
+EXECUTE {begin.bib}
+
+EXECUTE {init.state.consts}
+
+ITERATE {call.type$}
+
+FUNCTION {end.bib}
+{ newline$
+ "\end{thebibliography}" write$ newline$
+}
+
+EXECUTE {end.bib}
+%% End of customized bst file
+%%
+%% End of file `development1.bst'.
diff --git a/biblio/bibtex/contrib/misc/fbs.bst b/biblio/bibtex/contrib/misc/fbs.bst
new file mode 100644
index 0000000000..4dab47290d
--- /dev/null
+++ b/biblio/bibtex/contrib/misc/fbs.bst
@@ -0,0 +1,1260 @@
+%% ===============================================================
+%% BibTex style for Frontiers in Bioscience (FBS)
+%% ===============================================================
+%%
+%% Lastname, I., Lastname, I.: Title of the journal. Journal title [in italics] 111, 1-2 (2008)
+%%
+%% %% custom made BibTex style file to fit Frontiers in Bioscience requirements:
+%% - all authors, no et al, full author names, initials abbreviated
+%% - only abbreviated journal name italicised, no abbreviation dots
+%% - only year, no month, at end of reference
+%% - DOI excluded, ISSN excluded
+%%
+%%
+%%
+%%
+%% This is file `fbs.bst',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% merlin.mbs (with options: `seq-no,nm-rev,ed-rev,jnrlst,yr-par,xmth,atit-u,jxper,vnum-x,volp-com,num-xser,jnm-x,isbn,au-col,fin-bare,ppx,ed,abr,xedn,jabr,nfss,')
+%% ----------------------------------------
+%% *** Frontiers in Bioscience ***
+%%
+%% Copyright 1994-2005 Patrick W Daly
+ % ===============================================================
+ % IMPORTANT NOTICE:
+ % This bibliographic style (bst) file has been generated from one or
+ % more master bibliographic style (mbs) files, listed above.
+ %
+ % This generated file can be redistributed and/or modified under the terms
+ % of the LaTeX Project Public License Distributed from CTAN
+ % archives in directory macros/latex/base/lppl.txt; either
+ % version 1 of the License, or any later version.
+ % ===============================================================
+ % Name and version information of the main mbs file:
+ % \ProvidesFile{merlin.mbs}[2005/10/17 4.14 (PWD, AO, DPC)]
+ % For use with BibTeX version 0.99a or later
+ %-------------------------------------------------------------------
+ % This bibliography style file is intended for texts in ENGLISH
+ % This is a numerical citation style, and as such is standard LaTeX.
+ % It requires no extra package to interface to the main text.
+ % The form of the \bibitem entries is
+ % \bibitem{key}...
+ % Usage of \cite is as follows:
+ % \cite{key} ==>> [#]
+ % \cite[chap. 2]{key} ==>> [#, chap. 2]
+ % where # is a number determined by the ordering in the reference list.
+ % The order in the reference list is that by which the works were originally
+ % cited in the text, or that in the database.
+ %---------------------------------------------------------------------
+
+ENTRY
+ { address
+ author
+ booktitle
+ chapter
+ edition
+ editor
+ eid
+ howpublished
+ institution
+ isbn
+ journal
+ key
+ month
+ note
+ number
+ organization
+ pages
+ publisher
+ school
+ series
+ title
+ type
+ volume
+ year
+ }
+ {}
+ { label }
+INTEGERS { output.state before.all mid.sentence after.sentence after.block }
+FUNCTION {init.state.consts}
+{ #0 'before.all :=
+ #1 'mid.sentence :=
+ #2 'after.sentence :=
+ #3 'after.block :=
+}
+STRINGS { s t}
+FUNCTION {output.nonnull}
+{ 's :=
+ output.state mid.sentence =
+ { ", " * write$ }
+ { output.state after.block =
+ { add.period$ write$
+ newline$
+ "\newblock " write$
+ }
+ { output.state before.all =
+ 'write$
+ { add.period$ " " * write$ }
+ if$
+ }
+ if$
+ mid.sentence 'output.state :=
+ }
+ if$
+ s
+}
+FUNCTION {output}
+{ duplicate$ empty$
+ 'pop$
+ 'output.nonnull
+ if$
+}
+FUNCTION {output.check}
+{ 't :=
+ duplicate$ empty$
+ { pop$ "empty " t * " in " * cite$ * warning$ }
+ 'output.nonnull
+ if$
+}
+FUNCTION {fin.entry}
+{ duplicate$ empty$
+ 'pop$
+ 'write$
+ if$
+ newline$
+}
+
+FUNCTION {new.block}
+{ output.state before.all =
+ 'skip$
+ { after.block 'output.state := }
+ if$
+}
+FUNCTION {new.sentence}
+{ output.state after.block =
+ 'skip$
+ { output.state before.all =
+ 'skip$
+ { after.sentence 'output.state := }
+ if$
+ }
+ if$
+}
+FUNCTION {add.blank}
+{ " " * before.all 'output.state :=
+}
+
+FUNCTION {add.colon}
+{ duplicate$ empty$
+ 'skip$
+ { ":" * add.blank }
+ if$
+}
+
+FUNCTION {date.block}
+{
+ new.block
+}
+
+FUNCTION {not}
+{ { #0 }
+ { #1 }
+ if$
+}
+FUNCTION {and}
+{ 'skip$
+ { pop$ #0 }
+ if$
+}
+FUNCTION {or}
+{ { pop$ #1 }
+ 'skip$
+ if$
+}
+STRINGS {z}
+FUNCTION {remove.dots}
+{ 'z :=
+ ""
+ { z empty$ not }
+ { z #1 #1 substring$
+ z #2 global.max$ substring$ 'z :=
+ duplicate$ "." = 'pop$
+ { * }
+ if$
+ }
+ while$
+}
+FUNCTION {new.block.checka}
+{ empty$
+ 'skip$
+ 'new.block
+ if$
+}
+FUNCTION {new.block.checkb}
+{ empty$
+ swap$ empty$
+ and
+ 'skip$
+ 'new.block
+ if$
+}
+FUNCTION {new.sentence.checka}
+{ empty$
+ 'skip$
+ 'new.sentence
+ if$
+}
+FUNCTION {new.sentence.checkb}
+{ empty$
+ swap$ empty$
+ and
+ 'skip$
+ 'new.sentence
+ if$
+}
+FUNCTION {field.or.null}
+{ duplicate$ empty$
+ { pop$ "" }
+ 'skip$
+ if$
+}
+FUNCTION {emphasize}
+{ duplicate$ empty$
+ { pop$ "" }
+ { "\emph{" swap$ * "}" * }
+ if$
+}
+FUNCTION {tie.or.space.prefix}
+{ duplicate$ text.length$ #3 <
+ { "~" }
+ { " " }
+ if$
+ swap$
+}
+
+FUNCTION {capitalize}
+{ "u" change.case$ "t" change.case$ }
+
+FUNCTION {space.word}
+{ " " swap$ * " " * }
+ % Here are the language-specific definitions for explicit words.
+ % Each function has a name bbl.xxx where xxx is the English word.
+ % The language selected here is ENGLISH
+FUNCTION {bbl.and}
+{ "and"}
+
+FUNCTION {bbl.etal}
+{ "et~al." }
+
+FUNCTION {bbl.editors}
+{ "eds." }
+
+FUNCTION {bbl.editor}
+{ "ed." }
+
+FUNCTION {bbl.edby}
+{ "edited by" }
+
+FUNCTION {bbl.edition}
+{ "edn." }
+
+FUNCTION {bbl.volume}
+{ "vol." }
+
+FUNCTION {bbl.of}
+{ "of" }
+
+FUNCTION {bbl.number}
+{ "no." }
+
+FUNCTION {bbl.nr}
+{ "no." }
+
+FUNCTION {bbl.in}
+{ "in" }
+
+FUNCTION {bbl.pages}
+{ "" }
+
+FUNCTION {bbl.page}
+{ "" }
+
+FUNCTION {bbl.chapter}
+{ "chap." }
+
+FUNCTION {bbl.techrep}
+{ "Tech. Rep." }
+
+FUNCTION {bbl.mthesis}
+{ "Master's thesis" }
+
+FUNCTION {bbl.phdthesis}
+{ "Ph.D. thesis" }
+
+MACRO {jan} {"Jan."}
+
+MACRO {feb} {"Feb."}
+
+MACRO {mar} {"Mar."}
+
+MACRO {apr} {"Apr."}
+
+MACRO {may} {"May"}
+
+MACRO {jun} {"Jun."}
+
+MACRO {jul} {"Jul."}
+
+MACRO {aug} {"Aug."}
+
+MACRO {sep} {"Sep."}
+
+MACRO {oct} {"Oct."}
+
+MACRO {nov} {"Nov."}
+
+MACRO {dec} {"Dec."}
+
+MACRO {acmcs} {"ACM Comput. Surv."}
+
+MACRO {acta} {"Acta Inf."}
+
+MACRO {cacm} {"Commun. ACM"}
+
+MACRO {ibmjrd} {"IBM J. Res. Dev."}
+
+MACRO {ibmsj} {"IBM Syst.~J."}
+
+MACRO {ieeese} {"IEEE Trans. Software Eng."}
+
+MACRO {ieeetc} {"IEEE Trans. Comput."}
+
+MACRO {ieeetcad}
+ {"IEEE Trans. Comput. Aid. Des."}
+
+MACRO {ipl} {"Inf. Process. Lett."}
+
+MACRO {jacm} {"J.~ACM"}
+
+MACRO {jcss} {"J.~Comput. Syst. Sci."}
+
+MACRO {scp} {"Sci. Comput. Program."}
+
+MACRO {sicomp} {"SIAM J. Comput."}
+
+MACRO {tocs} {"ACM Trans. Comput. Syst."}
+
+MACRO {tods} {"ACM Trans. Database Syst."}
+
+MACRO {tog} {"ACM Trans. Graphic."}
+
+MACRO {toms} {"ACM Trans. Math. Software"}
+
+MACRO {toois} {"ACM Trans. Office Inf. Syst."}
+
+MACRO {toplas} {"ACM Trans. Progr. Lang. Syst."}
+
+MACRO {tcs} {"Theor. Comput. Sci."}
+
+FUNCTION {bibinfo.check}
+{ swap$
+ duplicate$ missing$
+ {
+ pop$ pop$
+ ""
+ }
+ { duplicate$ empty$
+ {
+ swap$ pop$
+ }
+ { swap$
+ pop$
+ }
+ if$
+ }
+ if$
+}
+FUNCTION {bibinfo.warn}
+{ swap$
+ duplicate$ missing$
+ {
+ swap$ "missing " swap$ * " in " * cite$ * warning$ pop$
+ ""
+ }
+ { duplicate$ empty$
+ {
+ swap$ "empty " swap$ * " in " * cite$ * warning$
+ }
+ { swap$
+ pop$
+ }
+ if$
+ }
+ if$
+}
+STRINGS { bibinfo}
+INTEGERS { nameptr namesleft numnames }
+
+FUNCTION {format.names}
+{ 'bibinfo :=
+ duplicate$ empty$ 'skip$ {
+ 's :=
+ "" 't :=
+ #1 'nameptr :=
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ { s nameptr
+ "{vv~}{ll}{, f.}{, jj}"
+ format.name$
+ bibinfo bibinfo.check
+ 't :=
+ nameptr #1 >
+ {
+ namesleft #1 >
+ { ", " * t * }
+ {
+ s nameptr "{ll}" format.name$ duplicate$ "others" =
+ { 't := }
+ { pop$ }
+ if$
+ numnames #2 >
+ { "," * }
+ 'skip$
+ if$
+ t "others" =
+ {
+ " " * bbl.etal *
+ }
+ {
+ bbl.and
+ space.word * t *
+ }
+ if$
+ }
+ if$
+ }
+ 't
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+ } if$
+}
+FUNCTION {format.names.ed}
+{
+ format.names
+}
+FUNCTION {format.authors}
+{ author "author" format.names
+}
+FUNCTION {get.bbl.editor}
+{ editor num.names$ #1 > 'bbl.editors 'bbl.editor if$ }
+
+FUNCTION {format.editors}
+{ editor "editor" format.names duplicate$ empty$ 'skip$
+ {
+ "," *
+ " " *
+ get.bbl.editor
+ *
+ }
+ if$
+}
+FUNCTION {format.isbn}
+{ isbn "isbn" bibinfo.check
+ duplicate$ empty$ 'skip$
+ {
+ new.block
+ "ISBN " swap$ *
+ }
+ if$
+}
+
+FUNCTION {format.note}
+{
+ note empty$
+ { "" }
+ { note #1 #1 substring$
+ duplicate$ "{" =
+ 'skip$
+ { output.state mid.sentence =
+ { "l" }
+ { "u" }
+ if$
+ change.case$
+ }
+ if$
+ note #2 global.max$ substring$ * "note" bibinfo.check
+ }
+ if$
+}
+
+FUNCTION {format.title}
+{ title
+ "title" bibinfo.check
+}
+FUNCTION {output.bibitem}
+{ newline$
+ "\bibitem{" write$
+ cite$ write$
+ "}" write$
+ newline$
+ ""
+ before.all 'output.state :=
+}
+
+FUNCTION {n.dashify}
+{
+ 't :=
+ ""
+ { t empty$ not }
+ { t #1 #1 substring$ "-" =
+ { t #1 #2 substring$ "--" = not
+ { "--" *
+ t #2 global.max$ substring$ 't :=
+ }
+ { { t #1 #1 substring$ "-" = }
+ { "-" *
+ t #2 global.max$ substring$ 't :=
+ }
+ while$
+ }
+ if$
+ }
+ { t #1 #1 substring$ *
+ t #2 global.max$ substring$ 't :=
+ }
+ if$
+ }
+ while$
+}
+
+FUNCTION {word.in}
+{ bbl.in capitalize
+ " " * }
+
+FUNCTION {format.date}
+{
+ ""
+ duplicate$ empty$
+ year "year" bibinfo.check duplicate$ empty$
+ { swap$ 'skip$
+ { "there's a month but no year in " cite$ * warning$ }
+ if$
+ *
+ }
+ { swap$ 'skip$
+ {
+ swap$
+ " " * swap$
+ }
+ if$
+ *
+ }
+ if$
+ duplicate$ empty$
+ 'skip$
+ {
+ before.all 'output.state :=
+ " (" swap$ * ")" *
+ }
+ if$
+}
+FUNCTION {format.btitle}
+{ title "title" bibinfo.check
+ duplicate$ empty$ 'skip$
+ {
+ emphasize
+ }
+ if$
+}
+FUNCTION {either.or.check}
+{ empty$
+ 'pop$
+ { "can't use both " swap$ * " fields in " * cite$ * warning$ }
+ if$
+}
+FUNCTION {format.bvolume}
+{ volume empty$
+ { "" }
+ { bbl.volume volume tie.or.space.prefix
+ "volume" bibinfo.check * *
+ series "series" bibinfo.check
+ duplicate$ empty$ 'pop$
+ { swap$ bbl.of space.word * swap$
+ emphasize * }
+ if$
+ "volume and number" number either.or.check
+ }
+ if$
+}
+FUNCTION {format.number.series}
+{ volume empty$
+ { number empty$
+ { series field.or.null }
+ { series empty$
+ { number "number" bibinfo.check }
+ { output.state mid.sentence =
+ { bbl.number }
+ { bbl.number capitalize }
+ if$
+ number tie.or.space.prefix "number" bibinfo.check * *
+ bbl.in space.word *
+ series "series" bibinfo.check *
+ }
+ if$
+ }
+ if$
+ }
+ { "" }
+ if$
+}
+
+FUNCTION {format.edition}
+{ edition duplicate$ empty$ 'skip$
+ {
+ output.state mid.sentence =
+ { "l" }
+ { "t" }
+ if$ change.case$
+ "edition" bibinfo.check
+ " " * bbl.edition *
+ }
+ if$
+}
+INTEGERS { multiresult }
+FUNCTION {multi.page.check}
+{ 't :=
+ #0 'multiresult :=
+ { multiresult not
+ t empty$ not
+ and
+ }
+ { t #1 #1 substring$
+ duplicate$ "-" =
+ swap$ duplicate$ "," =
+ swap$ "+" =
+ or or
+ { #1 'multiresult := }
+ { t #2 global.max$ substring$ 't := }
+ if$
+ }
+ while$
+ multiresult
+}
+FUNCTION {format.pages}
+{ pages duplicate$ empty$ 'skip$
+ { duplicate$ multi.page.check
+ {
+ n.dashify
+ }
+ {
+ }
+ if$
+ "pages" bibinfo.check
+ }
+ if$
+}
+FUNCTION {format.journal.pages}
+{ pages duplicate$ empty$ 'pop$
+ { swap$ duplicate$ empty$
+ { pop$ pop$ format.pages }
+ {
+ ", " *
+ swap$
+ n.dashify
+ "pages" bibinfo.check
+ *
+ }
+ if$
+ }
+ if$
+}
+FUNCTION {format.journal.eid}
+{ eid "eid" bibinfo.check
+ duplicate$ empty$ 'pop$
+ { swap$ duplicate$ empty$ 'skip$
+ {
+ ", " *
+ }
+ if$
+ swap$ *
+ }
+ if$
+}
+FUNCTION {format.vol.num.pages}
+{ volume field.or.null
+ duplicate$ empty$ 'skip$
+ {
+ "volume" bibinfo.check
+ }
+ if$
+ eid empty$
+ { format.journal.pages }
+ { format.journal.eid }
+ if$
+}
+
+FUNCTION {format.chapter.pages}
+{ chapter empty$
+ 'format.pages
+ { type empty$
+ { bbl.chapter }
+ { type "l" change.case$
+ "type" bibinfo.check
+ }
+ if$
+ chapter tie.or.space.prefix
+ "chapter" bibinfo.check
+ * *
+ pages empty$
+ 'skip$
+ { ", " * format.pages * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.booktitle}
+{
+ booktitle "booktitle" bibinfo.check
+ emphasize
+}
+FUNCTION {format.in.ed.booktitle}
+{ format.booktitle duplicate$ empty$ 'skip$
+ {
+ editor "editor" format.names.ed duplicate$ empty$ 'pop$
+ {
+ "," *
+ " " *
+ get.bbl.editor
+ ", " *
+ * swap$
+ * }
+ if$
+ word.in swap$ *
+ }
+ if$
+}
+FUNCTION {empty.misc.check}
+{ author empty$ title empty$ howpublished empty$
+ month empty$ year empty$ note empty$
+ and and and and and
+ { "all relevant fields are empty in " cite$ * warning$ }
+ 'skip$
+ if$
+}
+FUNCTION {format.thesis.type}
+{ type duplicate$ empty$
+ 'pop$
+ { swap$ pop$
+ "t" change.case$ "type" bibinfo.check
+ }
+ if$
+}
+FUNCTION {format.tr.number}
+{ number "number" bibinfo.check
+ type duplicate$ empty$
+ { pop$ bbl.techrep }
+ 'skip$
+ if$
+ "type" bibinfo.check
+ swap$ duplicate$ empty$
+ { pop$ "t" change.case$ }
+ { tie.or.space.prefix * * }
+ if$
+}
+FUNCTION {format.article.crossref}
+{
+ key duplicate$ empty$
+ { pop$
+ journal duplicate$ empty$
+ { "need key or journal for " cite$ * " to crossref " * crossref * warning$ }
+ { "journal" bibinfo.check emphasize word.in swap$ * }
+ if$
+ }
+ { word.in swap$ * " " *}
+ if$
+ " \cite{" * crossref * "}" *
+}
+FUNCTION {format.crossref.editor}
+{ editor #1 "{vv~}{ll}" format.name$
+ "editor" bibinfo.check
+ editor num.names$ duplicate$
+ #2 >
+ { pop$
+ "editor" bibinfo.check
+ " " * bbl.etal
+ *
+ }
+ { #2 <
+ 'skip$
+ { editor #2 "{ff }{vv }{ll}{ jj}" format.name$ "others" =
+ {
+ "editor" bibinfo.check
+ " " * bbl.etal
+ *
+ }
+ {
+ bbl.and space.word
+ * editor #2 "{vv~}{ll}" format.name$
+ "editor" bibinfo.check
+ *
+ }
+ if$
+ }
+ if$
+ }
+ if$
+}
+FUNCTION {format.book.crossref}
+{ volume duplicate$ empty$
+ { "empty volume in " cite$ * "'s crossref of " * crossref * warning$
+ pop$ word.in
+ }
+ { bbl.volume
+ capitalize
+ swap$ tie.or.space.prefix "volume" bibinfo.check * * bbl.of space.word *
+ }
+ if$
+ editor empty$
+ editor field.or.null author field.or.null =
+ or
+ { key empty$
+ { series empty$
+ { "need editor, key, or series for " cite$ * " to crossref " *
+ crossref * warning$
+ "" *
+ }
+ { series emphasize * }
+ if$
+ }
+ { key * }
+ if$
+ }
+ { format.crossref.editor * }
+ if$
+ " \cite{" * crossref * "}" *
+}
+FUNCTION {format.incoll.inproc.crossref}
+{
+ editor empty$
+ editor field.or.null author field.or.null =
+ or
+ { key empty$
+ { format.booktitle duplicate$ empty$
+ { "need editor, key, or booktitle for " cite$ * " to crossref " *
+ crossref * warning$
+ }
+ { word.in swap$ * }
+ if$
+ }
+ { word.in key * " " *}
+ if$
+ }
+ { word.in format.crossref.editor * " " *}
+ if$
+ " \cite{" * crossref * "}" *
+}
+FUNCTION {format.org.or.pub}
+{ 't :=
+ ""
+ address empty$ t empty$ and
+ 'skip$
+ {
+ t empty$
+ { address "address" bibinfo.check *
+ }
+ { t *
+ address empty$
+ 'skip$
+ { ", " * address "address" bibinfo.check * }
+ if$
+ }
+ if$
+ }
+ if$
+}
+FUNCTION {format.publisher.address}
+{ publisher "publisher" bibinfo.warn format.org.or.pub
+}
+
+FUNCTION {format.organization.address}
+{ organization "organization" bibinfo.check format.org.or.pub
+}
+
+FUNCTION {article}
+{ output.bibitem
+ format.authors "author" output.check
+ add.colon
+ new.block
+ format.title "title" output.check
+ new.block
+ crossref missing$
+ {
+ journal
+ remove.dots
+ "journal" bibinfo.check
+ emphasize
+ "journal" output.check
+ add.blank
+ format.vol.num.pages output
+ format.date "year" output.check
+ }
+ { format.article.crossref output.nonnull
+ format.pages output
+ }
+ if$
+ new.block
+ format.note output
+ fin.entry
+}
+FUNCTION {book}
+{ output.bibitem
+ author empty$
+ { format.editors "author and editor" output.check
+ add.colon
+ }
+ { format.authors output.nonnull
+ add.colon
+ crossref missing$
+ { "author and editor" editor either.or.check }
+ 'skip$
+ if$
+ }
+ if$
+ new.block
+ format.btitle "title" output.check
+ crossref missing$
+ { format.bvolume output
+ new.block
+ format.number.series output
+ new.sentence
+ format.publisher.address output
+ }
+ {
+ new.block
+ format.book.crossref output.nonnull
+ }
+ if$
+ format.edition output
+ format.date "year" output.check
+ format.isbn output
+ new.block
+ format.note output
+ fin.entry
+}
+FUNCTION {booklet}
+{ output.bibitem
+ format.authors output
+ add.colon
+ new.block
+ format.title "title" output.check
+ new.block
+ howpublished "howpublished" bibinfo.check output
+ address "address" bibinfo.check output
+ format.date output
+ format.isbn output
+ new.block
+ format.note output
+ fin.entry
+}
+
+FUNCTION {inbook}
+{ output.bibitem
+ author empty$
+ { format.editors "author and editor" output.check
+ add.colon
+ }
+ { format.authors output.nonnull
+ add.colon
+ crossref missing$
+ { "author and editor" editor either.or.check }
+ 'skip$
+ if$
+ }
+ if$
+ new.block
+ format.btitle "title" output.check
+ crossref missing$
+ {
+ format.bvolume output
+ format.chapter.pages "chapter and pages" output.check
+ new.block
+ format.number.series output
+ new.sentence
+ format.publisher.address output
+ }
+ {
+ format.chapter.pages "chapter and pages" output.check
+ new.block
+ format.book.crossref output.nonnull
+ }
+ if$
+ format.edition output
+ format.date "year" output.check
+ crossref missing$
+ { format.isbn output }
+ 'skip$
+ if$
+ new.block
+ format.note output
+ fin.entry
+}
+
+FUNCTION {incollection}
+{ output.bibitem
+ format.authors "author" output.check
+ add.colon
+ new.block
+ format.title "title" output.check
+ new.block
+ crossref missing$
+ { format.in.ed.booktitle "booktitle" output.check
+ format.bvolume output
+ format.number.series output
+ format.chapter.pages output
+ new.sentence
+ format.publisher.address output
+ format.edition output
+ format.date "year" output.check
+ format.isbn output
+ }
+ { format.incoll.inproc.crossref output.nonnull
+ format.chapter.pages output
+ }
+ if$
+ new.block
+ format.note output
+ fin.entry
+}
+FUNCTION {inproceedings}
+{ output.bibitem
+ format.authors "author" output.check
+ add.colon
+ new.block
+ format.title "title" output.check
+ new.block
+ crossref missing$
+ { format.in.ed.booktitle "booktitle" output.check
+ format.bvolume output
+ format.number.series output
+ format.pages output
+ new.sentence
+ publisher empty$
+ { format.organization.address output }
+ { organization "organization" bibinfo.check output
+ format.publisher.address output
+ }
+ if$
+ format.date "year" output.check
+ format.isbn output
+ }
+ { format.incoll.inproc.crossref output.nonnull
+ format.pages output
+ }
+ if$
+ new.block
+ format.note output
+ fin.entry
+}
+FUNCTION {conference} { inproceedings }
+FUNCTION {manual}
+{ output.bibitem
+ author empty$
+ { organization "organization" bibinfo.check
+ duplicate$ empty$ 'pop$
+ { output
+ address "address" bibinfo.check output
+ }
+ if$
+ }
+ { format.authors output.nonnull }
+ if$
+ add.colon
+ new.block
+ format.btitle "title" output.check
+ author empty$
+ { organization empty$
+ {
+ address new.block.checka
+ address "address" bibinfo.check output
+ }
+ 'skip$
+ if$
+ }
+ {
+ organization address new.block.checkb
+ organization "organization" bibinfo.check output
+ address "address" bibinfo.check output
+ }
+ if$
+ format.edition output
+ format.date output
+ new.block
+ format.note output
+ fin.entry
+}
+
+FUNCTION {mastersthesis}
+{ output.bibitem
+ format.authors "author" output.check
+ add.colon
+ new.block
+ format.btitle
+ "title" output.check
+ new.block
+ bbl.mthesis format.thesis.type output.nonnull
+ school "school" bibinfo.warn output
+ address "address" bibinfo.check output
+ format.date "year" output.check
+ new.block
+ format.note output
+ fin.entry
+}
+
+FUNCTION {misc}
+{ output.bibitem
+ format.authors output
+ add.colon
+ title howpublished new.block.checkb
+ format.title output
+ howpublished new.block.checka
+ howpublished "howpublished" bibinfo.check output
+ format.date output
+ new.block
+ format.note output
+ fin.entry
+ empty.misc.check
+}
+FUNCTION {phdthesis}
+{ output.bibitem
+ format.authors "author" output.check
+ add.colon
+ new.block
+ format.btitle
+ "title" output.check
+ new.block
+ bbl.phdthesis format.thesis.type output.nonnull
+ school "school" bibinfo.warn output
+ address "address" bibinfo.check output
+ format.date "year" output.check
+ new.block
+ format.note output
+ fin.entry
+}
+
+FUNCTION {proceedings}
+{ output.bibitem
+ editor empty$
+ { organization "organization" bibinfo.check output
+ }
+ { format.editors output.nonnull }
+ if$
+ add.colon
+ new.block
+ format.btitle "title" output.check
+ format.bvolume output
+ format.number.series output
+ editor empty$
+ { publisher empty$
+ 'skip$
+ {
+ new.sentence
+ format.publisher.address output
+ }
+ if$
+ }
+ { publisher empty$
+ {
+ new.sentence
+ format.organization.address output }
+ {
+ new.sentence
+ organization "organization" bibinfo.check output
+ format.publisher.address output
+ }
+ if$
+ }
+ if$
+ format.date "year" output.check
+ format.isbn output
+ new.block
+ format.note output
+ fin.entry
+}
+
+FUNCTION {techreport}
+{ output.bibitem
+ format.authors "author" output.check
+ add.colon
+ new.block
+ format.title
+ "title" output.check
+ new.block
+ format.tr.number output.nonnull
+ institution "institution" bibinfo.warn output
+ address "address" bibinfo.check output
+ format.date "year" output.check
+ new.block
+ format.note output
+ fin.entry
+}
+
+FUNCTION {unpublished}
+{ output.bibitem
+ format.authors "author" output.check
+ add.colon
+ new.block
+ format.title "title" output.check
+ format.date output
+ new.block
+ format.note "note" output.check
+ fin.entry
+}
+
+FUNCTION {default.type} { misc }
+READ
+STRINGS { longest.label }
+INTEGERS { number.label longest.label.width }
+FUNCTION {initialize.longest.label}
+{ "" 'longest.label :=
+ #1 'number.label :=
+ #0 'longest.label.width :=
+}
+FUNCTION {longest.label.pass}
+{ number.label int.to.str$ 'label :=
+ number.label #1 + 'number.label :=
+ label width$ longest.label.width >
+ { label 'longest.label :=
+ label width$ 'longest.label.width :=
+ }
+ 'skip$
+ if$
+}
+EXECUTE {initialize.longest.label}
+ITERATE {longest.label.pass}
+FUNCTION {begin.bib}
+{ preamble$ empty$
+ 'skip$
+ { preamble$ write$ newline$ }
+ if$
+ "\begin{thebibliography}{" longest.label * "}" *
+ write$ newline$
+}
+EXECUTE {begin.bib}
+EXECUTE {init.state.consts}
+ITERATE {call.type$}
+FUNCTION {end.bib}
+{ newline$
+ "\end{thebibliography}" write$ newline$
+}
+EXECUTE {end.bib}
+%% End of customized bst file
+%%
+%% End of file `fbs.bst'.
diff --git a/biblio/bibtex/contrib/misc/finplain.bst b/biblio/bibtex/contrib/misc/finplain.bst
new file mode 100644
index 0000000000..645a06ba18
--- /dev/null
+++ b/biblio/bibtex/contrib/misc/finplain.bst
@@ -0,0 +1,1213 @@
+% BibTeX bibliography style 'finplain' release 0.1.0
+% Based on the BibTeX 0.99a standard bibliography style 'plain'
+% $Id: finplain.bst,v 1.3 1998/06/25 14:14:34 antkaij Exp $
+
+% This is the BibTeX 0.99a standard bibliography style 'plain' translated
+% into Finnish. Translation made by Antti-Juhani Kaijanaho <gaia@iki.fi>
+% on June 3, 1998 and June 25, 1998. This file requires LaTeX2e.
+
+% =========================================================================
+% *************************************************************************
+% VAROITUS! Tama suomennos on julkisesti saatavilla lahinna testausta *
+% ja kokeiluja varten. *
+% *
+% WARNING! This translation is made available to the public for *
+% testing and experimentation purposes. It can be used for production *
+% work, but do expect to find some rough edges and bugs. There is *
+% NO WARRANTY. *
+% *
+% There is one known problem: *
+% * There is a comma before "ja" that should not be there in *
+% author and editor lists. *
+% *
+% Bug reports and patches are welcome at <gaia@iki.fi>. Please, indicate *
+% in the subject field of your message that it concerns 'finplain.bst'. *
+% *************************************************************************
+% =========================================================================
+
+
+% The changes from plain to finplain.bst are
+ % Copyright (C) 1998 Antti-Juhani Kaijanaho.
+ % Copying of this file is authorized only if either
+ % (1) you make absolutely no changes to your copy, including name, or
+ % (2) if you do make changes, you name it something other than
+ % finplain.bst, btxbst.doc, plain.bst, unsrt.bst, alpha.bst,
+ % and abbrv.bst.
+
+% This is the copyright message of the original file:
+% 8<----
+% BibTeX standard bibliography style `plain'
+ % version 0.99a for BibTeX versions 0.99a or later, LaTeX version 2.09.
+ % Copyright (C) 1985, all rights reserved.
+ % Copying of this file is authorized only if either
+ % (1) you make absolutely no changes to your copy, including name, or
+ % (2) if you do make changes, you name it something other than
+ % btxbst.doc, plain.bst, unsrt.bst, alpha.bst, and abbrv.bst.
+ % This restriction helps ensure that all standard styles are identical.
+ % The file btxbst.doc has the documentation for this style.
+% 8<----
+
+% All changes have been clearly marked.
+
+ENTRY
+ { address
+ author
+ booktitle
+ chapter
+ edition
+ editor
+ howpublished
+ institution
+ journal
+ key
+ month
+ note
+ number
+ organization
+ pages
+ publisher
+ school
+ series
+ title
+ type
+ volume
+ year
+ }
+ {}
+ { label }
+
+INTEGERS { output.state before.all mid.sentence after.sentence after.block }
+
+FUNCTION {init.state.consts}
+{ #0 'before.all :=
+ #1 'mid.sentence :=
+ #2 'after.sentence :=
+ #3 'after.block :=
+}
+
+STRINGS { s t }
+
+FUNCTION {output.nonnull}
+{ 's :=
+ output.state mid.sentence =
+ { ", " * write$ }
+ { output.state after.block =
+ { add.period$ write$
+ newline$
+ "\newblock " write$
+ }
+ { output.state before.all =
+ 'write$
+ { add.period$ " " * write$ }
+ if$
+ }
+ if$
+ mid.sentence 'output.state :=
+ }
+ if$
+ s
+}
+
+FUNCTION {output}
+{ duplicate$ empty$
+ 'pop$
+ 'output.nonnull
+ if$
+}
+
+FUNCTION {output.check}
+{ 't :=
+ duplicate$ empty$
+ { pop$ "empty " t * " in " * cite$ * warning$ }
+ 'output.nonnull
+ if$
+}
+
+FUNCTION {output.bibitem}
+{ newline$
+ "\bibitem{" write$
+ cite$ write$
+ "}" write$
+ newline$
+ ""
+ before.all 'output.state :=
+}
+
+FUNCTION {fin.entry}
+{ add.period$
+ write$
+ newline$
+}
+
+FUNCTION {new.block}
+{ output.state before.all =
+ 'skip$
+ { after.block 'output.state := }
+ if$
+}
+
+FUNCTION {new.sentence}
+{ output.state after.block =
+ 'skip$
+ { output.state before.all =
+ 'skip$
+ { after.sentence 'output.state := }
+ if$
+ }
+ if$
+}
+
+FUNCTION {not}
+{ { #0 }
+ { #1 }
+ if$
+}
+
+FUNCTION {and}
+{ 'skip$
+ { pop$ #0 }
+ if$
+}
+
+FUNCTION {or}
+{ { pop$ #1 }
+ 'skip$
+ if$
+}
+
+FUNCTION {new.block.checka}
+{ empty$
+ 'skip$
+ 'new.block
+ if$
+}
+
+FUNCTION {new.block.checkb}
+{ empty$
+ swap$ empty$
+ and
+ 'skip$
+ 'new.block
+ if$
+}
+
+FUNCTION {new.sentence.checka}
+{ empty$
+ 'skip$
+ 'new.sentence
+ if$
+}
+
+FUNCTION {new.sentence.checkb}
+{ empty$
+ swap$ empty$
+ and
+ 'skip$
+ 'new.sentence
+ if$
+}
+
+FUNCTION {field.or.null}
+{ duplicate$ empty$
+ { pop$ "" }
+ 'skip$
+ if$
+}
+
+FUNCTION {emphasize}
+{ duplicate$ empty$
+ { pop$ "" }
+ { "\emph{" swap$ * "}" * } % chaged by <gaia@iki.fi> 19980625
+ if$
+}
+
+INTEGERS { nameptr namesleft numnames }
+
+FUNCTION {format.names}
+{ 's :=
+ #1 'nameptr :=
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ { s nameptr "{ff~}{vv~}{ll}{, jj}" format.name$ 't :=
+ nameptr #1 >
+ { namesleft #1 >
+ { ", " * t * }
+ { numnames #2 >
+ { "," * }
+ 'skip$
+ if$
+ t "others" =
+ { " et~al." * }
+ { " ja " * t * } % changed by <gaia@iki.fi> 19980603
+ if$
+ }
+ if$
+ }
+ 't
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+}
+
+FUNCTION {format.authors}
+{ author empty$
+ { "" }
+ { author format.names }
+ if$
+}
+
+FUNCTION {format.editors}
+{ editor empty$
+ { "" }
+ { editor format.names
+ editor num.names$ #1 >
+ { ", toim." * } % changed by <gaia@iki.fi> 19980603
+ { ", toim." * } % changed by <gaia@iki.fi> 19980603
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.title}
+{ title empty$
+ { "" }
+ { title "t" change.case$ }
+ if$
+}
+
+FUNCTION {n.dashify}
+{ 't :=
+ ""
+ { t empty$ not }
+ { t #1 #1 substring$ "-" =
+ { t #1 #2 substring$ "--" = not
+ { "--" *
+ t #2 global.max$ substring$ 't :=
+ }
+ { { t #1 #1 substring$ "-" = }
+ { "-" *
+ t #2 global.max$ substring$ 't :=
+ }
+ while$
+ }
+ if$
+ }
+ { t #1 #1 substring$ *
+ t #2 global.max$ substring$ 't :=
+ }
+ if$
+ }
+ while$
+}
+
+FUNCTION {format.date}
+{ year empty$
+ { month empty$
+ { "" }
+ { "there's a month but no year in " cite$ * warning$
+ month
+ }
+ if$
+ }
+ { month empty$
+ 'year
+ { month " " * year * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.btitle}
+{ title emphasize
+}
+
+FUNCTION {tie.or.space.connect}
+{ duplicate$ text.length$ #3 <
+ { "~" }
+ { "{\ }" } % changed by <gaia@iki.fi> 19980603
+ if$
+ swap$ * *
+}
+
+FUNCTION {either.or.check}
+{ empty$
+ 'pop$
+ { "can't use both " swap$ * " fields in " * cite$ * warning$ }
+ if$
+}
+
+% the following function was rewritten by <gaia@iki.fi> 19980603
+FUNCTION {format.bvolume}
+{
+ volume empty$
+ { % We have no volume
+ series empty$
+ { % We have neither a volume nor a series
+ ""
+ }
+ { % We have a series but no volume
+ "sarjassa " series emphasize *
+ }
+ if$
+ }
+ { % We have a volume
+ series empty$
+ { % We have no series, just volume
+ "osa" volume tie.or.space.connect
+ }
+ { % We have both a series and a volume
+ "sarjan " series emphasize *
+ " osa" volume tie.or.space.connect *
+ }
+ if$
+ % We cannot have both a volume and a number
+ "volume and number" number either.or.check
+ }
+ if$
+}
+
+% the following function was rewritten by <gaia@iki.fi> 19980603
+FUNCTION {format.number.series}
+{
+ volume empty$
+ {
+ number empty$
+ { series field.or.null }
+ {
+ series number tie.or.space.connect
+ }
+ if$
+ }
+ {
+ ""
+ }
+ if$
+}
+
+% The following three functions adapted from a custom-bib style file by
+% <gaia@iki.fi> 19980603
+FUNCTION {is.num}
+{ chr.to.int$
+ duplicate$ "0" chr.to.int$ < not
+ swap$ "9" chr.to.int$ > not and
+}
+
+FUNCTION {extract.num}
+{ duplicate$ 't :=
+ "" 's :=
+ { t empty$ not }
+ { t #1 #1 substring$
+ t #2 global.max$ substring$ 't :=
+ duplicate$ is.num
+ { s swap$ * 's := }
+ { pop$ "" 't := }
+ if$
+ }
+ while$
+ s empty$
+ 'skip$
+ { pop$ s }
+ if$
+}
+
+FUNCTION {format.edition}
+{
+ edition empty$
+ { "" }
+ {
+ edition extract.num "l" change.case$ 's :=
+ s "first" = s "1" = or
+ { "ensimm\^^b{a}inen" 't := }
+ { s "second" = s "2" = or
+ { "toinen" 't := }
+ { s "third" = s "3" = or
+ { "kolmas" 't := }
+ { s "fourth" = s "4" = or
+ { "nelj\^^b{a}s" 't := }
+ { s "fifth" = s "5" = or
+ { "viides" 't := }
+ { s #1 #1 substring$ is.num
+ { s "." * 't := }
+ { edition 't := }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+ t
+
+ output.state mid.sentence =
+ { "l" change.case$ " laitos" * }
+ { "t" change.case$ " laitos" * }
+ if$
+ }
+ if$
+}
+
+INTEGERS { multiresult }
+
+FUNCTION {multi.page.check}
+{ 't :=
+ #0 'multiresult :=
+ { multiresult not
+ t empty$ not
+ and
+ }
+ { t #1 #1 substring$
+ duplicate$ "-" =
+ swap$ duplicate$ "," =
+ swap$ "+" =
+ or or
+ { #1 'multiresult := }
+ { t #2 global.max$ substring$ 't := }
+ if$
+ }
+ while$
+ multiresult
+}
+
+FUNCTION {format.pages}
+{ pages empty$
+ { "" }
+ { pages multi.page.check
+ % the following two lines were changed by <gaia@iki.fi> 19980603
+ { "ss." pages n.dashify tie.or.space.connect }
+ { "s." pages tie.or.space.connect }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.vol.num.pages}
+{ volume field.or.null
+ number empty$
+ 'skip$
+ { "(" number * ")" * *
+ volume empty$
+ { "there's a number but no volume in " cite$ * warning$ }
+ 'skip$
+ if$
+ }
+ if$
+ pages empty$
+ 'skip$
+ { duplicate$ empty$
+ { pop$ format.pages }
+ { ":" * pages n.dashify * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.chapter.pages}
+{ chapter empty$
+ 'format.pages
+ { type empty$
+ { "chapter" }
+ { type "l" change.case$ }
+ if$
+ chapter tie.or.space.connect
+ pages empty$
+ 'skip$
+ { ", " * format.pages * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.in.ed.booktitle}
+{ booktitle empty$
+ { "" }
+ { editor empty$
+ % the following two lines were changed by <gaia@iki.fi> 19980603
+ { "Kirjassa " booktitle emphasize * }
+ { "Kirjassa " format.editors * ", " * booktitle emphasize * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {empty.misc.check}
+{ author empty$ title empty$ howpublished empty$
+ month empty$ year empty$ note empty$
+ and and and and and
+ key empty$ not and
+ { "all relevant fields are empty in " cite$ * warning$ }
+ 'skip$
+ if$
+}
+
+FUNCTION {format.thesis.type}
+{ type empty$
+ 'skip$
+ { pop$
+ type "t" change.case$
+ }
+ if$
+}
+
+FUNCTION {format.tr.number}
+{ type empty$
+ { "Tekninen raportti" } % changed by <gaia@iki.fi> 19980603
+ 'type
+ if$
+ number empty$
+ { "t" change.case$ }
+ { number tie.or.space.connect }
+ if$
+}
+
+FUNCTION {format.article.crossref}
+{ key empty$
+ { journal empty$
+ { "need key or journal for " cite$ * " to crossref " * crossref *
+ warning$
+ ""
+ }
+ { "Lehdess \emph{" journal * "}" * } % changed by <gaia@iki.fi> 19980603
+ if$
+ }
+ { "Ks." key tie.or.space.connect } % changed by <gaia@iki.fi> 19980603
+ if$
+ " \cite{" * crossref * "}" *
+}
+
+FUNCTION {format.crossref.editor}
+{ editor #1 "{vv~}{ll}" format.name$
+ editor num.names$ duplicate$
+ #2 >
+ { pop$ " et~al." * }
+ { #2 <
+ 'skip$
+ { editor #2 "{ff }{vv }{ll}{ jj}" format.name$ "others" =
+ { " et~al." * }
+ % the following line was changed by <gaia@iki.fi> 19980603
+ { " ja " * editor #2 "{vv~}{ll}" format.name$ * }
+ if$
+ }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.book.crossref}
+{ volume empty$
+ { "empty volume in " cite$ * "'s crossref of " * crossref * warning$
+ "Kirjassa" % changed by <gaia@iki.fi> 19980603
+ }
+ { "Osa" volume tie.or.space.connect % changed by <gaia@iki.fi> 19980603
+ " kirjasta " * % changed by <gaia@iki.fi> 19980603
+ }
+ if$
+ editor empty$
+ editor field.or.null author field.or.null =
+ or
+ { key empty$
+ { series empty$
+ { "need editor, key, or series for " cite$ * " to crossref " *
+ crossref * warning$
+ "" *
+ }
+ { "\emph{" * series * "}" * } % changed by <gaia@iki.fi> 19980603
+ if$
+ }
+ { key * }
+ if$
+ }
+ { format.crossref.editor * }
+ if$
+ " \cite{" * crossref * "}" *
+}
+
+FUNCTION {format.incoll.inproc.crossref}
+{ editor empty$
+ editor field.or.null author field.or.null =
+ or
+ { key empty$
+ { booktitle empty$
+ { "need editor, key, or booktitle for " cite$ * " to crossref " *
+ crossref * warning$
+ ""
+ }
+ { "Kirjassa \emph{" booktitle * "}" * } % changed by <gaia@iki.fi> 19980603
+ if$
+ }
+ { "Ks." key tie.or.space.connect } % changed by <gaia@iki.fi> 19980603
+ if$
+ }
+ { "Ks.\ " format.crossref.editor * } % changed by <gaia@iki.fi> 19980603
+ if$
+ " \cite{" * crossref * "}" *
+}
+
+FUNCTION {article}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.title "title" output.check
+ new.block
+ crossref missing$
+ { journal emphasize "journal" output.check
+ format.vol.num.pages output
+ format.date "year" output.check
+ }
+ { format.article.crossref output.nonnull
+ format.pages output
+ }
+ if$
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {book}
+{ output.bibitem
+ author empty$
+ { format.editors "author and editor" output.check }
+ { format.authors output.nonnull
+ crossref missing$
+ { "author and editor" editor either.or.check }
+ 'skip$
+ if$
+ }
+ if$
+ new.block
+ format.btitle "title" output.check
+ crossref missing$
+ { format.bvolume output
+ new.block
+ format.number.series output
+ new.sentence
+ publisher "publisher" output.check
+ address output
+ }
+ { new.block
+ format.book.crossref output.nonnull
+ }
+ if$
+ format.edition output
+ format.date "year" output.check
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {booklet}
+{ output.bibitem
+ format.authors output
+ new.block
+ format.title "title" output.check
+ howpublished address new.block.checkb
+ howpublished output
+ address output
+ format.date output
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {inbook}
+{ output.bibitem
+ author empty$
+ { format.editors "author and editor" output.check }
+ { format.authors output.nonnull
+ crossref missing$
+ { "author and editor" editor either.or.check }
+ 'skip$
+ if$
+ }
+ if$
+ new.block
+ format.btitle "title" output.check
+ crossref missing$
+ { format.bvolume output
+ format.chapter.pages "chapter and pages" output.check
+ new.block
+ format.number.series output
+ new.sentence
+ publisher "publisher" output.check
+ address output
+ }
+ { format.chapter.pages "chapter and pages" output.check
+ new.block
+ format.book.crossref output.nonnull
+ }
+ if$
+ format.edition output
+ format.date "year" output.check
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {incollection}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.title "title" output.check
+ new.block
+ crossref missing$
+ { format.in.ed.booktitle "booktitle" output.check
+ format.bvolume output
+ format.number.series output
+ format.chapter.pages output
+ new.sentence
+ publisher "publisher" output.check
+ address output
+ format.edition output
+ format.date "year" output.check
+ }
+ { format.incoll.inproc.crossref output.nonnull
+ format.chapter.pages output
+ }
+ if$
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {inproceedings}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.title "title" output.check
+ new.block
+ crossref missing$
+ { format.in.ed.booktitle "booktitle" output.check
+ format.bvolume output
+ format.number.series output
+ format.pages output
+ address empty$
+ { organization publisher new.sentence.checkb
+ organization output
+ publisher output
+ format.date "year" output.check
+ }
+ { address output.nonnull
+ format.date "year" output.check
+ new.sentence
+ organization output
+ publisher output
+ }
+ if$
+ }
+ { format.incoll.inproc.crossref output.nonnull
+ format.pages output
+ }
+ if$
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {conference} { inproceedings }
+
+FUNCTION {manual}
+{ output.bibitem
+ author empty$
+ { organization empty$
+ 'skip$
+ { organization output.nonnull
+ address output
+ }
+ if$
+ }
+ { format.authors output.nonnull }
+ if$
+ new.block
+ format.btitle "title" output.check
+ author empty$
+ { organization empty$
+ { address new.block.checka
+ address output
+ }
+ 'skip$
+ if$
+ }
+ { organization address new.block.checkb
+ organization output
+ address output
+ }
+ if$
+ format.edition output
+ format.date output
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {mastersthesis}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.title "title" output.check
+ new.block
+ "Pro~gradu" format.thesis.type output.nonnull
+ school "schools" output.check
+ address output
+ format.date "year" output.check
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {misc}
+{ output.bibitem
+ format.authors output
+ title howpublished new.block.checkb
+ format.title output
+ howpublished new.block.checka
+ howpublished output
+ format.date output
+ new.block
+ note output
+ fin.entry
+ empty.misc.check
+}
+
+FUNCTION {phdthesis}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.btitle "title" output.check
+ new.block
+ "V\^^b{a}it\^^b{o}skirja" format.thesis.type output.nonnull
+ school "school" output.check
+ address output
+ format.date "year" output.check
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {proceedings}
+{ output.bibitem
+ editor empty$
+ { organization output }
+ { format.editors output.nonnull }
+ if$
+ new.block
+ format.btitle "title" output.check
+ format.bvolume output
+ format.number.series output
+ address empty$
+ { editor empty$
+ { publisher new.sentence.checka }
+ { organization publisher new.sentence.checkb
+ organization output
+ }
+ if$
+ publisher output
+ format.date "year" output.check
+ }
+ { address output.nonnull
+ format.date "year" output.check
+ new.sentence
+ editor empty$
+ 'skip$
+ { organization output }
+ if$
+ publisher output
+ }
+ if$
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {techreport}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.title "title" output.check
+ new.block
+ format.tr.number output.nonnull
+ institution "institution" output.check
+ address output
+ format.date "year" output.check
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {unpublished}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.title "title" output.check
+ new.block
+ note "note" output.check
+ format.date output
+ fin.entry
+}
+
+FUNCTION {default.type} { misc }
+
+% The month names were translated by <gaia@iki.fi> 19980603
+
+MACRO {jan} {"tammikuu"}
+
+MACRO {feb} {"helmikuu"}
+
+MACRO {mar} {"maaliskuu"}
+
+MACRO {apr} {"huhtikuu"}
+
+MACRO {may} {"toukokuu"}
+
+MACRO {jun} {"kes\^^b{a}kuu"}
+
+MACRO {jul} {"hein\^^b{a}kuu"}
+
+MACRO {aug} {"elokuu"}
+
+MACRO {sep} {"syyskuu"}
+
+MACRO {oct} {"lokakuu"}
+
+MACRO {nov} {"marraskuu"}
+
+MACRO {dec} {"joulukuu"}
+
+MACRO {acmcs} {"ACM Computing Surveys"}
+
+MACRO {acta} {"Acta Informatica"}
+
+MACRO {cacm} {"Communications of the ACM"}
+
+MACRO {ibmjrd} {"IBM Journal of Research and Development"}
+
+MACRO {ibmsj} {"IBM Systems Journal"}
+
+MACRO {ieeese} {"IEEE Transactions on Software Engineering"}
+
+MACRO {ieeetc} {"IEEE Transactions on Computers"}
+
+MACRO {ieeetcad}
+ {"IEEE Transactions on Computer-Aided Design of Integrated Circuits"}
+
+MACRO {ipl} {"Information Processing Letters"}
+
+MACRO {jacm} {"Journal of the ACM"}
+
+MACRO {jcss} {"Journal of Computer and System Sciences"}
+
+MACRO {scp} {"Science of Computer Programming"}
+
+MACRO {sicomp} {"SIAM Journal on Computing"}
+
+MACRO {tocs} {"ACM Transactions on Computer Systems"}
+
+MACRO {tods} {"ACM Transactions on Database Systems"}
+
+MACRO {tog} {"ACM Transactions on Graphics"}
+
+MACRO {toms} {"ACM Transactions on Mathematical Software"}
+
+MACRO {toois} {"ACM Transactions on Office Information Systems"}
+
+MACRO {toplas} {"ACM Transactions on Programming Languages and Systems"}
+
+MACRO {tcs} {"Theoretical Computer Science"}
+
+READ
+
+FUNCTION {sortify}
+{ purify$
+ "l" change.case$
+}
+
+INTEGERS { len }
+
+FUNCTION {chop.word}
+{ 's :=
+ 'len :=
+ s #1 len substring$ =
+ { s len #1 + global.max$ substring$ }
+ 's
+ if$
+}
+
+FUNCTION {sort.format.names}
+{ 's :=
+ #1 'nameptr :=
+ ""
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ { nameptr #1 >
+ { " " * }
+ 'skip$
+ if$
+ s nameptr "{vv{ } }{ll{ }}{ ff{ }}{ jj{ }}" format.name$ 't :=
+ nameptr numnames = t "others" = and
+ { "et al" * }
+ { t sortify * }
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+}
+
+FUNCTION {sort.format.title}
+{ 't :=
+ "A " #2
+ "An " #3
+ "The " #4 t chop.word
+ chop.word
+ chop.word
+ sortify
+ #1 global.max$ substring$
+}
+
+FUNCTION {author.sort}
+{ author empty$
+ { key empty$
+ { "to sort, need author or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { author sort.format.names }
+ if$
+}
+
+FUNCTION {author.editor.sort}
+{ author empty$
+ { editor empty$
+ { key empty$
+ { "to sort, need author, editor, or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { editor sort.format.names }
+ if$
+ }
+ { author sort.format.names }
+ if$
+}
+
+FUNCTION {author.organization.sort}
+{ author empty$
+ { organization empty$
+ { key empty$
+ { "to sort, need author, organization, or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { "The " #4 organization chop.word sortify }
+ if$
+ }
+ { author sort.format.names }
+ if$
+}
+
+FUNCTION {editor.organization.sort}
+{ editor empty$
+ { organization empty$
+ { key empty$
+ { "to sort, need editor, organization, or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { "The " #4 organization chop.word sortify }
+ if$
+ }
+ { editor sort.format.names }
+ if$
+}
+
+FUNCTION {presort}
+{ type$ "book" =
+ type$ "inbook" =
+ or
+ 'author.editor.sort
+ { type$ "proceedings" =
+ 'editor.organization.sort
+ { type$ "manual" =
+ 'author.organization.sort
+ 'author.sort
+ if$
+ }
+ if$
+ }
+ if$
+ " "
+ *
+ year field.or.null sortify
+ *
+ " "
+ *
+ title field.or.null
+ sort.format.title
+ *
+ #1 entry.max$ substring$
+ 'sort.key$ :=
+}
+
+ITERATE {presort}
+
+SORT
+
+STRINGS { longest.label }
+
+INTEGERS { number.label longest.label.width }
+
+FUNCTION {initialize.longest.label}
+{ "" 'longest.label :=
+ #1 'number.label :=
+ #0 'longest.label.width :=
+}
+
+FUNCTION {longest.label.pass}
+{ number.label int.to.str$ 'label :=
+ number.label #1 + 'number.label :=
+ label width$ longest.label.width >
+ { label 'longest.label :=
+ label width$ 'longest.label.width :=
+ }
+ 'skip$
+ if$
+}
+
+EXECUTE {initialize.longest.label}
+
+ITERATE {longest.label.pass}
+
+FUNCTION {begin.bib}
+{ preamble$ empty$
+ 'skip$
+ { preamble$ write$ newline$ }
+ if$
+ "\begin{thebibliography}{" longest.label * "}" * write$ newline$
+}
+
+EXECUTE {begin.bib}
+
+EXECUTE {init.state.consts}
+
+ITERATE {call.type$}
+
+FUNCTION {end.bib}
+{ newline$
+ "\end{thebibliography}" write$ newline$
+}
+
+EXECUTE {end.bib}
diff --git a/biblio/bibtex/contrib/misc/humanbio.bst b/biblio/bibtex/contrib/misc/humanbio.bst
new file mode 100644
index 0000000000..039498ebd7
--- /dev/null
+++ b/biblio/bibtex/contrib/misc/humanbio.bst
@@ -0,0 +1,1134 @@
+%%% ====================================================================
+%%% @BibTeX-style-file{
+%%% author = "Alan Rogers",
+%%% version = "1.1",
+%%% date = "1990",
+%%% filename = "humanbio.bst",
+%%% address = "Dept of Anthropology, University of Utah,
+%%% Salt Lake City, UT 84112",
+%%% checksum = "32432 1134 3172 23669",
+%%% email = "rogers@anthro.utah.edu",
+%%% supported = "no",
+%%% docstring = "The file produces bibliographies more or
+%%% less in the format of the journal Human
+%%% Biology. It was adapted from apalike.bst,
+%%% incorporating features of Sake J.
+%%% Hogeveen's `astron.bst'.
+%%%
+%%% Usage: \documentstyle[astron]{...}
+%%% ...
+%%% \bibliographystyle{humanbio}
+%%% ...
+%%%
+%%% The \documentstyle command above invokes
+%%% Hogeveen's `astron.sty', which must be in
+%%% TeX's search path.
+%%%
+%%% The modifications implement `\cite*{}',
+%%% which generates references in short form.
+%%% For example, `Rogers \cite*{...}' would
+%%% produce `Rogers (1992)'."
+%%% }
+%%% ====================================================================
+%%%%%%%%%%
+% BibTeX `apalike' bibliography style (24-Jan-88 version)
+% Adapted from the `alpha' style, version 0.99a; for BibTeX version 0.99a.
+% Copyright (C) 1988, all rights reserved.
+% Copying of this file is allowed, provided that if you make any changes at all
+% you name it something other than `apalike.bst'.
+% This restriction helps ensure that all copies are identical.
+% Differences between this style and `alpha' are generally heralded by a `%'.
+% The file btxbst.doc has the documentation for alpha.bst.
+%
+% This style should be used with the `apalike' LaTeX style (apalike.sty).
+% \cite's come out like "(Jones, 1986)" in the text but there are no labels
+% in the bibliography, and something like "(1986)" comes out immediately
+% after the author. Author (and editor) names appear as last name, comma,
+% initials. A `year' field is required for every entry, and so is either
+% an author (or in some cases, an editor) field or a key field.
+%
+% Editorial note:
+% Many journals require a style like `apalike', but I strongly, strongly,
+% strongly recommend that you not use it if you have a choice---use something
+% like `plain' instead. Mary-Claire van Leunen (A Handbook for Scholars,
+% Knopf, 1979) argues convincingly that a style like `plain' encourages better
+% writing than one like `apalike'. Furthermore the strongest arguments for
+% using an author-date style like `apalike'---that it's "the most practical"
+% (The Chicago Manual of Style, University of Chicago Press, thirteenth
+% edition, 1982, pages 400--401)---fall flat on their face with the new
+% computer-typesetting technology. For instance page 401 anachronistically
+% states "The chief disadvantage of [a style like `plain'] is that additions
+% or deletions cannot be made after the manuscript is typed without changing
+% numbers in both text references and list." LaTeX sidesteps the disadvantage.
+%
+% History:
+% 15-sep-86 (SK,OP) Original version, by Susan King and Oren Patashnik.
+% 10-nov-86 (OP) Truncated the sort.key$ string to the correct length
+% in bib.sort.order to eliminate error message.
+% 24-jan-88 (OP) Updated for BibTeX version 0.99a, from alpha.bst 0.99a;
+% apalike now sorts by author, then year, then title;
+% THIS `apalike' VERSION DOES NOT WORK WITH BIBTEX 0.98i.
+
+ENTRY
+ { address
+ author
+ booktitle
+ chapter
+ edition
+ editor
+ howpublished
+ institution
+ journal
+ key
+% month not used in apalike
+ note
+ number
+ organization
+ pages
+ publisher
+ school
+ series
+ title
+ type
+ volume
+ year
+ }
+ {}
+ { label extra.label sort.label }
+
+INTEGERS { output.state before.all mid.sentence after.sentence after.block }
+
+FUNCTION {init.state.consts}
+{ #0 'before.all :=
+ #1 'mid.sentence :=
+ #2 'after.sentence :=
+ #3 'after.block :=
+}
+
+STRINGS { s t }
+
+FUNCTION {output.nonnull}
+{ 's :=
+ output.state mid.sentence =
+ { ", " * write$ }
+ { output.state after.block =
+ { add.period$ write$
+ newline$
+ "\newblock " write$
+ }
+ { output.state before.all =
+ 'write$
+ { add.period$ " " * write$ }
+ if$
+ }
+ if$
+ mid.sentence 'output.state :=
+ }
+ if$
+ s
+}
+
+FUNCTION {output}
+{ duplicate$ empty$
+ 'pop$
+ 'output.nonnull
+ if$
+}
+
+FUNCTION {output.check}
+{ 't :=
+ duplicate$ empty$
+ { pop$ "empty " t * " in " * cite$ * warning$ }
+ 'output.nonnull
+ if$
+}
+
+% apalike needs this function because
+% the year has special punctuation;
+% apalike ignores the month
+FUNCTION {output.year.check}
+{ year empty$
+ { "empty year in " cite$ * warning$ }
+ { write$
+ " " year * extra.label * "" *
+ mid.sentence 'output.state :=
+ }
+ if$
+}
+
+FUNCTION {output.bibitem}
+{ newline$
+ "\bibitem[" write$
+ label write$
+ "]{" write$
+ cite$ write$
+ "}" write$
+ newline$
+ ""
+ before.all 'output.state :=
+}
+
+FUNCTION {fin.entry}
+{ add.period$
+ write$
+ newline$
+}
+
+FUNCTION {new.block}
+{ output.state before.all =
+ 'skip$
+ { after.block 'output.state := }
+ if$
+}
+
+FUNCTION {new.sentence}
+{ output.state after.block =
+ 'skip$
+ { output.state before.all =
+ 'skip$
+ { after.sentence 'output.state := }
+ if$
+ }
+ if$
+}
+
+FUNCTION {not}
+{ { #0 }
+ { #1 }
+ if$
+}
+
+FUNCTION {and}
+{ 'skip$
+ { pop$ #0 }
+ if$
+}
+
+FUNCTION {or}
+{ { pop$ #1 }
+ 'skip$
+ if$
+}
+
+FUNCTION {new.block.checkb}
+{ empty$
+ swap$ empty$
+ and
+ 'skip$
+ 'new.block
+ if$
+}
+
+FUNCTION {field.or.null}
+{ duplicate$ empty$
+ { pop$ "" }
+ 'skip$
+ if$
+}
+
+FUNCTION {emphasize}
+{ duplicate$ empty$
+ { pop$ "" }
+ { "{\em " swap$ * "}" * }
+ if$
+}
+
+INTEGERS { nameptr namesleft numnames }
+
+FUNCTION {format.names}
+{ 's :=
+ #1 'nameptr :=
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ { s nameptr "{vv~}{ll}{, jj}{, f.}" format.name$ 't := % last name first
+ nameptr #1 >
+ { namesleft #1 >
+ { ", " * t * }
+ { numnames #2 >
+ { "," * }
+ 'skip$
+ if$
+ t "others" =
+ { " et~al." * }
+ { " and " * t * }
+ if$
+ }
+ if$
+ }
+ 't
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+}
+
+FUNCTION {format.authors}
+{ author empty$
+ { "" }
+ { author format.names }
+ if$
+}
+
+FUNCTION {format.key} % this function is just for apalike
+{ empty$
+ { key field.or.null }
+ { "" }
+ if$
+}
+
+FUNCTION {format.editors}
+{ editor empty$
+ { "" }
+ { editor format.names
+ editor num.names$ #1 >
+ { ", editors" * }
+ { ", editor" * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.title}
+{ title empty$
+ { "" }
+ { title "t" change.case$ }
+ if$
+}
+
+FUNCTION {n.dashify}
+{ 't :=
+ ""
+ { t empty$ not }
+ { t #1 #1 substring$ "-" =
+ { t #1 #2 substring$ "--" = not
+ { "--" *
+ t #2 global.max$ substring$ 't :=
+ }
+ { { t #1 #1 substring$ "-" = }
+ { "-" *
+ t #2 global.max$ substring$ 't :=
+ }
+ while$
+ }
+ if$
+ }
+ { t #1 #1 substring$ *
+ t #2 global.max$ substring$ 't :=
+ }
+ if$
+ }
+ while$
+}
+
+FUNCTION {format.btitle}
+{ title emphasize
+}
+
+FUNCTION {tie.or.space.connect}
+{ duplicate$ text.length$ #3 <
+ { "~" }
+ { " " }
+ if$
+ swap$ * *
+}
+
+FUNCTION {either.or.check}
+{ empty$
+ 'pop$
+ { "can't use both " swap$ * " fields in " * cite$ * warning$ }
+ if$
+}
+
+FUNCTION {format.bvolume}
+{ volume empty$
+ { "" }
+ { "volume" volume tie.or.space.connect
+ series empty$
+ 'skip$
+ { " of " * series emphasize * }
+ if$
+ "volume and number" number either.or.check
+ }
+ if$
+}
+
+FUNCTION {format.number.series}
+{ volume empty$
+ { number empty$
+ { series field.or.null }
+ { output.state mid.sentence =
+ { "number" }
+ { "Number" }
+ if$
+ number tie.or.space.connect
+ series empty$
+ { "there's a number but no series in " cite$ * warning$ }
+ { " in " * series * }
+ if$
+ }
+ if$
+ }
+ { "" }
+ if$
+}
+
+FUNCTION {format.edition}
+{ edition empty$
+ { "" }
+ { output.state mid.sentence =
+ { edition "l" change.case$ " edition" * }
+ { edition "t" change.case$ " edition" * }
+ if$
+ }
+ if$
+}
+
+INTEGERS { multiresult }
+
+FUNCTION {multi.page.check}
+{ 't :=
+ #0 'multiresult :=
+ { multiresult not
+ t empty$ not
+ and
+ }
+ { t #1 #1 substring$
+ duplicate$ "-" =
+ swap$ duplicate$ "," =
+ swap$ "+" =
+ or or
+ { #1 'multiresult := }
+ { t #2 global.max$ substring$ 't := }
+ if$
+ }
+ while$
+ multiresult
+}
+
+FUNCTION {format.pages}
+{ pages empty$
+ { "" }
+ { pages multi.page.check
+ { "pages" pages n.dashify tie.or.space.connect }
+ { "page" pages tie.or.space.connect }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.vol.num.pages}
+{ volume field.or.null
+ number empty$
+ 'skip$
+ { "(" number * ")" * *
+ volume empty$
+ { "there's a number but no volume in " cite$ * warning$ }
+ 'skip$
+ if$
+ }
+ if$
+ pages empty$
+ 'skip$
+ { duplicate$ empty$
+ { pop$ format.pages }
+ { ":" * pages n.dashify * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.chapter.pages}
+{ chapter empty$
+ 'format.pages
+ { type empty$
+ { "chapter" }
+ { type "l" change.case$ }
+ if$
+ chapter tie.or.space.connect
+ pages empty$
+ 'skip$
+ { ", " * format.pages * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.in.ed.booktitle}
+{ booktitle empty$
+ { "" }
+ { editor empty$
+ { "In " booktitle emphasize * }
+ { "In " format.editors * ", " * booktitle emphasize * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.thesis.type}
+{ type empty$
+ 'skip$
+ { pop$
+ type "t" change.case$
+ }
+ if$
+}
+
+FUNCTION {format.tr.number}
+{ type empty$
+ { "Technical Report" }
+ 'type
+ if$
+ number empty$
+ { "t" change.case$ }
+ { number tie.or.space.connect }
+ if$
+}
+
+FUNCTION {format.article.crossref}
+{ "In" % this is for apalike
+ " \cite{" * crossref * "}" *
+}
+
+FUNCTION {format.book.crossref}
+{ volume empty$
+ { "empty volume in " cite$ * "'s crossref of " * crossref * warning$
+ "In "
+ }
+ { "Volume" volume tie.or.space.connect
+ " of " *
+ }
+ if$
+ "\cite{" * crossref * "}" * % this is for apalike
+}
+
+FUNCTION {format.incoll.inproc.crossref}
+{ "In" % this is for apalike
+ " \cite{" * crossref * "}" *
+}
+
+FUNCTION {article}
+{ output.bibitem
+ format.authors "author" output.check
+ author format.key output % special for
+ output.year.check % apalike
+ new.block
+ format.title "title" output.check
+ new.block
+ crossref missing$
+ { journal emphasize "journal" output.check
+ format.vol.num.pages output
+ }
+ { format.article.crossref output.nonnull
+ format.pages output
+ }
+ if$
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {book}
+{ output.bibitem
+ author empty$
+ { format.editors "author and editor" output.check
+ editor format.key output
+ }
+ { format.authors output.nonnull
+ crossref missing$
+ { "author and editor" editor either.or.check }
+ 'skip$
+ if$
+ }
+ if$
+ output.year.check % special for apalike
+ new.block
+ format.btitle "title" output.check
+ crossref missing$
+ { format.bvolume output
+ new.block
+ format.number.series output
+ new.sentence
+ publisher "publisher" output.check
+ address output
+ }
+ { new.block
+ format.book.crossref output.nonnull
+ }
+ if$
+ format.edition output
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {booklet}
+{ output.bibitem
+ format.authors output
+ author format.key output % special for
+ output.year.check % apalike
+ new.block
+ format.title "title" output.check
+ new.block
+ howpublished output
+ address output
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {inbook}
+{ output.bibitem
+ author empty$
+ { format.editors "author and editor" output.check
+ editor format.key output
+ }
+ { format.authors output.nonnull
+ crossref missing$
+ { "author and editor" editor either.or.check }
+ 'skip$
+ if$
+ }
+ if$
+ output.year.check % special for apalike
+ new.block
+ format.btitle "title" output.check
+ crossref missing$
+ { format.bvolume output
+ format.chapter.pages "chapter and pages" output.check
+ new.block
+ format.number.series output
+ new.sentence
+ publisher "publisher" output.check
+ address output
+ }
+ { format.chapter.pages "chapter and pages" output.check
+ new.block
+ format.book.crossref output.nonnull
+ }
+ if$
+ format.edition output
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {incollection}
+{ output.bibitem
+ format.authors "author" output.check
+ author format.key output % special for
+ output.year.check % apalike
+ new.block
+ format.title "title" output.check
+ new.block
+ crossref missing$
+ { format.in.ed.booktitle "booktitle" output.check
+ format.bvolume output
+ format.number.series output
+ format.chapter.pages output
+ new.sentence
+ publisher "publisher" output.check
+ address output
+ format.edition output
+ }
+ { format.incoll.inproc.crossref output.nonnull
+ format.chapter.pages output
+ }
+ if$
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {inproceedings}
+{ output.bibitem
+ format.authors "author" output.check
+ author format.key output % special for
+ output.year.check % apalike
+ new.block
+ format.title "title" output.check
+ new.block
+ crossref missing$
+ { format.in.ed.booktitle "booktitle" output.check
+ format.bvolume output
+ format.number.series output
+ format.pages output
+ address output % for apalike
+ new.sentence % there's no year
+ organization output % here so things
+ publisher output % are simpler
+ }
+ { format.incoll.inproc.crossref output.nonnull
+ format.pages output
+ }
+ if$
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {conference} { inproceedings }
+
+FUNCTION {manual}
+{ output.bibitem
+ format.authors output
+ author format.key output % special for
+ output.year.check % apalike
+ new.block
+ format.btitle "title" output.check
+ organization address new.block.checkb
+ organization output
+ address output
+ format.edition output
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {mastersthesis}
+{ output.bibitem
+ format.authors "author" output.check
+ author format.key output % special for
+ output.year.check % apalike
+ new.block
+ format.title "title" output.check
+ new.block
+ "Master's thesis" format.thesis.type output.nonnull
+ school "school" output.check
+ address output
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {misc}
+{ output.bibitem
+ format.authors output
+ author format.key output % special for
+ output.year.check % apalike
+ new.block
+ format.title output
+ new.block
+ howpublished output
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {phdthesis}
+{ output.bibitem
+ format.authors "author" output.check
+ author format.key output % special for
+ output.year.check % apalike
+ new.block
+ format.btitle "title" output.check
+ new.block
+ "PhD thesis" format.thesis.type output.nonnull
+ school "school" output.check
+ address output
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {proceedings}
+{ output.bibitem
+ format.editors output
+ editor format.key output % special for
+ output.year.check % apalike
+ new.block
+ format.btitle "title" output.check
+ format.bvolume output
+ format.number.series output
+ address output % for apalike
+ new.sentence % we always output
+ organization output % a nonempty organization
+ publisher output % here
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {techreport}
+{ output.bibitem
+ format.authors "author" output.check
+ author format.key output % special for
+ output.year.check % apalike
+ new.block
+ format.title "title" output.check
+ new.block
+ format.tr.number output.nonnull
+ institution "institution" output.check
+ address output
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {unpublished}
+{ output.bibitem
+ format.authors "author" output.check
+ author format.key output % special for
+ output.year.check % apalike
+ new.block
+ format.title "title" output.check
+ new.block
+ note "note" output.check
+ fin.entry
+}
+
+FUNCTION {default.type} { misc }
+
+MACRO {jan} {"January"}
+
+MACRO {feb} {"February"}
+
+MACRO {mar} {"March"}
+
+MACRO {apr} {"April"}
+
+MACRO {may} {"May"}
+
+MACRO {jun} {"June"}
+
+MACRO {jul} {"July"}
+
+MACRO {aug} {"August"}
+
+MACRO {sep} {"September"}
+
+MACRO {oct} {"October"}
+
+MACRO {nov} {"November"}
+
+MACRO {dec} {"December"}
+
+MACRO {acmcs} {"ACM Computing Surveys"}
+
+MACRO {acta} {"Acta Informatica"}
+
+MACRO {cacm} {"Communications of the ACM"}
+
+MACRO {ibmjrd} {"IBM Journal of Research and Development"}
+
+MACRO {ibmsj} {"IBM Systems Journal"}
+
+MACRO {ieeese} {"IEEE Transactions on Software Engineering"}
+
+MACRO {ieeetc} {"IEEE Transactions on Computers"}
+
+MACRO {ieeetcad}
+ {"IEEE Transactions on Computer-Aided Design of Integrated Circuits"}
+
+MACRO {ipl} {"Information Processing Letters"}
+
+MACRO {jacm} {"Journal of the ACM"}
+
+MACRO {jcss} {"Journal of Computer and System Sciences"}
+
+MACRO {scp} {"Science of Computer Programming"}
+
+MACRO {sicomp} {"SIAM Journal on Computing"}
+
+MACRO {tocs} {"ACM Transactions on Computer Systems"}
+
+MACRO {tods} {"ACM Transactions on Database Systems"}
+
+MACRO {tog} {"ACM Transactions on Graphics"}
+
+MACRO {toms} {"ACM Transactions on Mathematical Software"}
+
+MACRO {toois} {"ACM Transactions on Office Information Systems"}
+
+MACRO {toplas} {"ACM Transactions on Programming Languages and Systems"}
+
+MACRO {tcs} {"Theoretical Computer Science"}
+
+READ
+
+FUNCTION {sortify}
+{ purify$
+ "l" change.case$
+}
+
+INTEGERS { len }
+
+FUNCTION {chop.word}
+{ 's :=
+ 'len :=
+ s #1 len substring$ =
+ { s len #1 + global.max$ substring$ }
+ 's
+ if$
+}
+
+% There are three apalike cases: one person (Jones),
+% two (Jones and de~Bruijn), and more (Jones et~al.).
+% This function is much like format.crossref.editors.
+%
+FUNCTION {format.lab.names}
+{ 's :=
+ s #1 "{vv~}{ll}" format.name$
+ s num.names$ duplicate$
+ #2 >
+ { pop$ " et~al." * }
+ { #2 <
+ 'skip$
+ { s #2 "{ff }{vv }{ll}{ jj}" format.name$ "others" =
+ { " et~al." * }
+ { " and " * s #2 "{vv~}{ll}" format.name$ * }
+ if$
+ }
+ if$
+ }
+ if$
+}
+
+FUNCTION {author.key.label}
+{ author empty$
+ { key empty$
+ { cite$ #1 #3 substring$ }
+ 'key % apalike uses the whole key
+ if$
+ }
+ { author format.lab.names }
+ if$
+}
+
+FUNCTION {author.editor.key.label}
+{ author empty$
+ { editor empty$
+ { key empty$
+ { cite$ #1 #3 substring$ }
+ 'key % apalike uses the whole key
+ if$
+ }
+ { editor format.lab.names }
+ if$
+ }
+ { author format.lab.names }
+ if$
+}
+
+FUNCTION {editor.key.label}
+{ editor empty$
+ { key empty$
+ { cite$ #1 #3 substring$ }
+ 'key % apalike uses the whole key, no organization
+ if$
+ }
+ { editor format.lab.names }
+ if$
+}
+
+FUNCTION {calc.label} % this function came from ASTRON.BST (ARR)
+{ type$ "book" =
+ type$ "inbook" =
+ or
+ 'author.editor.key.label
+ { type$ "proceedings" =
+ 'editor.key.label % apalike ignores organization
+ 'author.key.label % for labeling and sorting
+ if$
+ }
+ if$
+ "\protect\astroncite{" swap$ * "}{" % these three lines are
+ * % for apalike, which
+ year field.or.null purify$ #-1 #4 substring$ % uses all four digits
+ * % the mathing closing "}" comes in at the reverse.pass
+ 'label :=
+}
+
+FUNCTION {sort.format.names}
+{ 's :=
+ #1 'nameptr :=
+ ""
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ { nameptr #1 >
+ { " " * }
+ 'skip$
+ if$ % apalike uses initials
+ s nameptr "{vv{ } }{ll{ }}{ f{ }}{ jj{ }}" format.name$ 't := % <= here
+ nameptr numnames = t "others" = and
+ { "et al" * }
+ { t sortify * }
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+}
+
+FUNCTION {sort.format.title}
+{ 't :=
+ "A " #2
+ "An " #3
+ "The " #4 t chop.word
+ chop.word
+ chop.word
+ sortify
+ #1 global.max$ substring$
+}
+
+FUNCTION {author.sort}
+{ author empty$
+ { key empty$
+ { "to sort, need author or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { author sort.format.names }
+ if$
+}
+
+FUNCTION {author.editor.sort}
+{ author empty$
+ { editor empty$
+ { key empty$
+ { "to sort, need author, editor, or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { editor sort.format.names }
+ if$
+ }
+ { author sort.format.names }
+ if$
+}
+
+FUNCTION {editor.sort}
+{ editor empty$
+ { key empty$
+ { "to sort, need editor or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { editor sort.format.names }
+ if$
+}
+
+% apalike uses two sorting passes; the first one sets the
+% labels so that the `a's, `b's, etc. can be computed;
+% the second pass puts the references in "correct" order.
+% The presort function is for the first pass. It computes
+% label, sort.label, and title, and then concatenates.
+FUNCTION {presort}
+{ calc.label
+ label sortify
+ " "
+ *
+ type$ "book" =
+ type$ "inbook" =
+ or
+ 'author.editor.sort
+ { type$ "proceedings" =
+ 'editor.sort
+ 'author.sort
+ if$
+ }
+ if$
+ #1 entry.max$ substring$ % for
+ 'sort.label := % apalike
+ sort.label % style
+ *
+ " "
+ *
+ title field.or.null
+ sort.format.title
+ *
+ #1 entry.max$ substring$
+ 'sort.key$ :=
+}
+
+ITERATE {presort}
+
+SORT % by label, sort.label, title---for final label calculation
+
+STRINGS { last.label next.extra } % apalike labels are only for the text;
+
+INTEGERS { last.extra.num } % there are none in the bibliography
+
+FUNCTION {initialize.extra.label.stuff} % and hence there is no `longest.label'
+{ #0 int.to.chr$ 'last.label :=
+ "" 'next.extra :=
+ #0 'last.extra.num :=
+}
+
+FUNCTION {forward.pass}
+{ last.label label =
+ { last.extra.num #1 + 'last.extra.num :=
+ last.extra.num int.to.chr$ 'extra.label :=
+ }
+ { "a" chr.to.int$ 'last.extra.num :=
+ "" 'extra.label :=
+ label 'last.label :=
+ }
+ if$
+}
+
+FUNCTION {reverse.pass} % this function came from ASTRON.BST (ARR)
+{ next.extra "b" =
+ { "a" 'extra.label := }
+ 'skip$
+ if$
+ label extra.label * "}" * 'label :=
+ extra.label 'next.extra :=
+}
+
+EXECUTE {initialize.extra.label.stuff}
+
+ITERATE {forward.pass}
+
+REVERSE {reverse.pass}
+
+% Now that the label is right we sort for real,
+% on sort.label then year then title. This is
+% for the second sorting pass.
+FUNCTION {bib.sort.order}
+{ sort.label
+ " "
+ *
+ year field.or.null sortify
+ *
+ " "
+ *
+ title field.or.null
+ sort.format.title
+ *
+ #1 entry.max$ substring$
+ 'sort.key$ :=
+}
+
+ITERATE {bib.sort.order}
+
+SORT % by sort.label, year, title---giving final bibliography order
+
+FUNCTION {begin.bib}
+{ preamble$ empty$ % no \etalchar in apalike
+ 'skip$
+ { preamble$ write$ newline$ }
+ if$
+ "\begin{thebibliography}{}" write$ newline$ % no labels in apalike
+}
+
+EXECUTE {begin.bib}
+
+EXECUTE {init.state.consts}
+
+ITERATE {call.type$}
+
+FUNCTION {end.bib}
+{ newline$
+ "\end{thebibliography}" write$ newline$
+}
+
+EXECUTE {end.bib}
diff --git a/biblio/bibtex/contrib/misc/humannat.bst b/biblio/bibtex/contrib/misc/humannat.bst
new file mode 100644
index 0000000000..425ac08d78
--- /dev/null
+++ b/biblio/bibtex/contrib/misc/humannat.bst
@@ -0,0 +1,1205 @@
+%%% ====================================================================
+%%% @BibTeX-style-file{
+%%% author = "Alan Rogers",
+%%% version = "1.03",
+%%% date = "29 June 1992",
+%%% time = "09:34:02 MDT",
+%%% filename = "humanbio.bst",
+%%% address = "Dept of Anthropology, University of Utah,
+%%% Salt Lake City, UT 84112",
+%%% checksum = "39728 1205 3408 25147",
+%%% email = "rogers@anthro.utah.edu",
+%%% supported = "no",
+%%% docstring = "The file produces bibliographies more or
+%%% less in the format of the journals Human
+%%% Nature and American Anthropologist. It was
+%%% adapted from apalike.bst, incorporating
+%%% features of Sake J. Hogeveen's
+%%% `astron.bst'.
+%%%
+%%% Usage: \documentstyle[astron]{...}
+%%% ...
+%%% \bibliographystyle{humannat}
+%%% ...
+%%%
+%%% The \documentstyle command above invokes
+%%% Hogeveen's `astron.sty', which must be in
+%%% TeX's search path.
+%%%
+%%% The modifications implement `\cite*{}',
+%%% which generates references in short form.
+%%% For example, `Rogers \cite*{...}' would
+%%% produce `Rogers (1992)'."
+%%% }
+%%% ====================================================================
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% BibTeX `apalike' bibliography style (24-Jan-88 version)
+% Adapted from the `alpha' style, version 0.99a; for BibTeX version 0.99a.
+% Copyright (C) 1988, all rights reserved.
+% Copying of this file is allowed, provided that if you make any changes at all
+% you name it something other than `apalike.bst'.
+% This restriction helps ensure that all copies are identical.
+% Differences between this style and `alpha' are generally heralded by a `%'.
+% The file btxbst.doc has the documentation for alpha.bst.
+%
+% This style should be used with the `apalike' LaTeX style (apalike.sty).
+% \cite's come out like "(Jones, 1986)" in the text but there are no labels
+% in the bibliography, and something like "(1986)" comes out immediately
+% after the author. Author (and editor) names appear as last name, comma,
+% initials. A `year' field is required for every entry, and so is either
+% an author (or in some cases, an editor) field or a key field.
+%
+% Editorial note:
+% Many journals require a style like `apalike', but I strongly, strongly,
+% strongly recommend that you not use it if you have a choice---use something
+% like `plain' instead. Mary-Claire van Leunen (A Handbook for Scholars,
+% Knopf, 1979) argues convincingly that a style like `plain' encourages better
+% writing than one like `apalike'. Furthermore the strongest arguments for
+% using an author-date style like `apalike'---that it's "the most practical"
+% (The Chicago Manual of Style, University of Chicago Press, thirteenth
+% edition, 1982, pages 400--401)---fall flat on their face with the new
+% computer-typesetting technology. For instance page 401 anachronistically
+% states "The chief disadvantage of [a style like `plain'] is that additions
+% or deletions cannot be made after the manuscript is typed without changing
+% numbers in both text references and list." LaTeX sidesteps the disadvantage.
+%
+% History:
+% 15-sep-86 (SK,OP) Original version, by Susan King and Oren Patashnik.
+% 10-nov-86 (OP) Truncated the sort.key$ string to the correct length
+% in bib.sort.order to eliminate error message.
+% 24-jan-88 (OP) Updated for BibTeX version 0.99a, from alpha.bst 0.99a;
+% apalike now sorts by author, then year, then title;
+% THIS `apalike' VERSION DOES NOT WORK WITH BIBTEX 0.98i.
+
+ENTRY
+ { address
+ author
+ booktitle
+ chapter
+ edition
+ editor
+ howpublished
+ institution
+ journal
+ key
+% month not used in apalike
+ note
+ number
+ organization
+ pages
+ publisher
+ school
+ series
+ title
+ type
+ volume
+ year
+ }
+ {}
+ { label extra.label sort.label }
+
+INTEGERS { output.state before.all mid.sentence after.sentence after.block }
+
+FUNCTION {init.state.consts}
+{ #0 'before.all :=
+ #1 'mid.sentence :=
+ #2 'after.sentence :=
+ #3 'after.block :=
+}
+
+STRINGS { s t }
+
+FUNCTION {output.nonnull}
+{ 's :=
+ output.state mid.sentence =
+ { ", " * write$ }
+ { output.state after.block =
+ { add.period$ write$
+ newline$
+ "\newblock " write$
+ }
+ { output.state before.all =
+ 'write$
+ { add.period$ " " * write$ }
+ if$
+ }
+ if$
+ mid.sentence 'output.state :=
+ }
+ if$
+ s
+}
+
+FUNCTION {output}
+{ duplicate$ empty$
+ 'pop$
+ 'output.nonnull
+ if$
+}
+
+FUNCTION {output.check}
+{ 't :=
+ duplicate$ empty$
+ { pop$ "empty " t * " in " * cite$ * warning$ }
+ 'output.nonnull
+ if$
+}
+
+% apalike needs this function because
+% the year has special punctuation;
+% apalike ignores the month
+FUNCTION {output.year.check}
+{ year empty$
+ { "empty year in " cite$ * warning$ }
+ { write$
+% " (" year * extra.label * ")" *
+ " " year * extra.label * % for humannature
+ mid.sentence 'output.state :=
+ }
+ if$
+}
+
+FUNCTION {output.bibitem}
+{ newline$
+ "\bibitem[" write$
+ label write$
+ "]{" write$
+ cite$ write$
+ "}" write$
+ newline$
+ ""
+ before.all 'output.state :=
+}
+
+FUNCTION {fin.entry}
+{ add.period$
+ write$
+ newline$
+}
+
+FUNCTION {new.block}
+{ output.state before.all =
+ 'skip$
+ { after.block 'output.state := }
+ if$
+}
+
+FUNCTION {new.sentence}
+{ output.state after.block =
+ 'skip$
+ { output.state before.all =
+ 'skip$
+ { after.sentence 'output.state := }
+ if$
+ }
+ if$
+}
+
+FUNCTION {not}
+{ { #0 }
+ { #1 }
+ if$
+}
+
+FUNCTION {and}
+{ 'skip$
+ { pop$ #0 }
+ if$
+}
+
+FUNCTION {or}
+{ { pop$ #1 }
+ 'skip$
+ if$
+}
+
+FUNCTION {new.block.checkb}
+{ empty$
+ swap$ empty$
+ and
+ 'skip$
+ 'new.block
+ if$
+}
+
+FUNCTION {field.or.null}
+{ duplicate$ empty$
+ { pop$ "" }
+ 'skip$
+ if$
+}
+
+FUNCTION {emphasize}
+{ duplicate$ empty$
+ { pop$ "" }
+ { "{\em " swap$ * "}" * }
+ if$
+}
+
+INTEGERS { nameptr namesleft numnames }
+
+FUNCTION {format.names}
+{ 's :=
+ #1 'nameptr :=
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ s nameptr "{vv~}{ll}{, jj}{, f.}" format.name$ 't := % last name first
+ nameptr #1 >
+ { namesleft #1 >
+ { ", " * t * }
+ { numnames #2 >
+ { "," * }
+ 'skip$
+ if$
+ t "others" =
+ { " et~al." * }
+ { " and " * t * }
+ if$
+ }
+ if$
+ }
+ 't
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ { namesleft #0 > }
+ { s nameptr "{f.~}{vv~}{ll}{, jj}" format.name$ 't := % last name last
+ nameptr #1 >
+ { namesleft #1 >
+ { ", " * t * }
+ { numnames #2 >
+ { "," * }
+ 'skip$
+ if$
+ t "others" =
+ { " et~al." * }
+ { " and " * t * }
+ if$
+ }
+ if$
+ }
+ 't
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+}
+FUNCTION {format.editor.names}
+{ 's :=
+ #1 'nameptr :=
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ { s nameptr "{f.~}{vv~}{ll}{, jj}" format.name$ 't := % last name first
+ nameptr #1 >
+ { namesleft #1 >
+ { ", " * t * }
+ { numnames #2 >
+ { "," * }
+ 'skip$
+ if$
+ t "others" =
+ { " et~al." * }
+ { " and " * t * }
+ if$
+ }
+ if$
+ }
+ 't
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+}
+
+FUNCTION {format.authors}
+{ author empty$
+ { "" }
+ { author format.names }
+ if$
+ "\leavevmode\nopagebreak\newline" * % for humannature
+}
+
+FUNCTION {format.key} % this function is just for apalike
+{ empty$
+ { key field.or.null }
+ { "" }
+ if$
+}
+
+FUNCTION {format.editors}
+{ editor empty$
+ { "" }
+ { author empty$
+ { editor format.names }
+ { editor format.editor.names }
+ if$
+ editor num.names$ #1 >
+ { ", eds." * } % for humannature
+ { ", ed." * } % for humannature
+ if$
+ }
+ if$
+ author empty$
+ { "\leavevmode\nopagebreak\newline" * }
+ { "" * }
+ if$
+}
+
+FUNCTION {format.title}
+{ title empty$
+ { "" }
+ { title "t" change.case$ }
+ if$
+}
+
+FUNCTION {n.dashify}
+{ 't :=
+ ""
+ { t empty$ not }
+ { t #1 #1 substring$ "-" =
+ { t #1 #2 substring$ "--" = not
+ { "--" *
+ t #2 global.max$ substring$ 't :=
+ }
+ { { t #1 #1 substring$ "-" = }
+ { "-" *
+ t #2 global.max$ substring$ 't :=
+ }
+ while$
+ }
+ if$
+ }
+ { t #1 #1 substring$ *
+ t #2 global.max$ substring$ 't :=
+ }
+ if$
+ }
+ while$
+}
+
+FUNCTION {format.btitle}
+{ title emphasize
+}
+
+FUNCTION {tie.or.space.connect}
+{ duplicate$ text.length$ #3 <
+ { "~" }
+ { " " }
+ if$
+ swap$ * *
+}
+
+FUNCTION {either.or.check}
+{ empty$
+ 'pop$
+ { "can't use both " swap$ * " fields in " * cite$ * warning$ }
+ if$
+}
+
+FUNCTION {format.bvolume}
+{ volume empty$
+ { "" }
+ { "volume" volume tie.or.space.connect
+ series empty$
+ 'skip$
+ { " of " * series emphasize * }
+ if$
+ "volume and number" number either.or.check
+ }
+ if$
+}
+
+FUNCTION {format.number.series}
+{ volume empty$
+ { number empty$
+ { series field.or.null }
+ { output.state mid.sentence =
+ { "number" }
+ { "Number" }
+ if$
+ number tie.or.space.connect
+ series empty$
+ { "there's a number but no series in " cite$ * warning$ }
+ { " in " * series * }
+ if$
+ }
+ if$
+ }
+ { "" }
+ if$
+}
+
+FUNCTION {format.address.publisher}
+{ address empty$
+ {
+ publisher empty$
+ { "" }
+ { publisher }
+ if$
+ }
+ {
+ publisher empty$
+ { address ": [publisher unknown]" * }
+ { address ": " * publisher * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.edition}
+{ edition empty$
+ { "" }
+ { output.state mid.sentence =
+ { edition "l" change.case$ " edition" * }
+ { edition "t" change.case$ " edition" * }
+ if$
+ }
+ if$
+}
+
+INTEGERS { multiresult }
+
+FUNCTION {multi.page.check}
+{ 't :=
+ #0 'multiresult :=
+ { multiresult not
+ t empty$ not
+ and
+ }
+ { t #1 #1 substring$
+ duplicate$ "-" =
+ swap$ duplicate$ "," =
+ swap$ "+" =
+ or or
+ { #1 'multiresult := }
+ { t #2 global.max$ substring$ 't := }
+ if$
+ }
+ while$
+ multiresult
+}
+
+FUNCTION {format.pages}
+{ pages empty$
+ { "" }
+ { pages multi.page.check
+ { "Pp.~" pages n.dashify tie.or.space.connect }
+ { "P.~" pages tie.or.space.connect }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.vol.num.pages}
+{ volume field.or.null
+ number empty$
+ 'skip$
+ { "(" number * ")" * *
+ volume empty$
+ { "there's a number but no volume in " cite$ * warning$ }
+ 'skip$
+ if$
+ }
+ if$
+ pages empty$
+ 'skip$
+ { duplicate$ empty$
+ { pop$ format.pages }
+ { ":" * pages n.dashify * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.chapter.pages}
+{ chapter empty$
+ 'format.pages
+ { type empty$
+ { "chapter" }
+ { type "l" change.case$ }
+ if$
+ chapter tie.or.space.connect
+ pages empty$
+ 'skip$
+ { ", " * format.pages * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.in.ed.booktitle}
+{ booktitle empty$
+ { "" }
+ { editor empty$
+ { "In " booktitle emphasize * }
+ { "In " booktitle emphasize * ", " * format.editors * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.thesis.type}
+{ type empty$
+ 'skip$
+ { pop$
+ type "t" change.case$
+ }
+ if$
+}
+
+FUNCTION {format.tr.number}
+{ type empty$
+ { "Technical Report" }
+ 'type
+ if$
+ number empty$
+ { "t" change.case$ }
+ { number tie.or.space.connect }
+ if$
+}
+
+FUNCTION {format.article.crossref}
+{ "In" % this is for apalike
+ " \cite{" * crossref * "}" *
+}
+
+FUNCTION {format.book.crossref}
+{ volume empty$
+ { "empty volume in " cite$ * "'s crossref of " * crossref * warning$
+ "In "
+ }
+ { "Volume" volume tie.or.space.connect
+ " of " *
+ }
+ if$
+ "\cite{" * crossref * "}" * % this is for apalike
+}
+
+FUNCTION {format.incoll.inproc.crossref}
+{ "In" % this is for apalike
+ " \cite{" * crossref * "}" *
+}
+
+FUNCTION {article}
+{ output.bibitem
+ format.authors "author" output.check
+ author format.key output % special for
+ output.year.check % apalike
+ new.block
+ format.title "title" output.check
+ new.block
+ crossref missing$
+ { journal emphasize "journal" output.check
+ format.vol.num.pages output
+ }
+ { format.article.crossref output.nonnull
+ format.pages output
+ }
+ if$
+ new.block
+ note output
+ fin.entry
+}
+
+
+FUNCTION {book}
+{ output.bibitem
+ author empty$
+ { format.editors "author and editor" output.check
+ editor format.key output
+ }
+ { format.authors output.nonnull
+ crossref missing$
+ { "author and editor" editor either.or.check }
+ 'skip$
+ if$
+ }
+ if$
+ output.year.check % special for apalike
+ new.block
+ format.btitle "title" output.check
+ crossref missing$
+ { format.bvolume output
+ format.number.series output
+ format.edition output
+ new.block
+ format.address.publisher output
+ }
+ { new.block
+ format.book.crossref output.nonnull
+ }
+ if$
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {booklet}
+{ output.bibitem
+ format.authors output
+ author format.key output % special for
+ output.year.check % apalike
+ new.block
+ format.title "title" output.check
+ new.block
+ howpublished output
+ address output
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {inbook}
+{ output.bibitem
+ author empty$
+ { format.editors "author and editor" output.check
+ editor format.key output
+ }
+ { format.authors output.nonnull
+ crossref missing$
+ { "author and editor" editor either.or.check }
+ 'skip$
+ if$
+ }
+ if$
+ output.year.check % special for apalike
+ new.block
+ format.btitle "title" output.check
+ crossref missing$
+ { format.bvolume output
+ format.chapter.pages "chapter and pages" output.check
+ new.block
+ format.number.series output
+ new.block
+ format.address.publisher output
+ }
+ { format.chapter.pages "chapter and pages" output.check
+ new.block
+ format.book.crossref output.nonnull
+ }
+ if$
+ format.edition output
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {incollection}
+{ output.bibitem
+ format.authors "author" output.check
+ author format.key output % special for
+ output.year.check % apalike
+ new.block
+ format.title "title" output.check
+ new.block
+ crossref missing$
+ { format.in.ed.booktitle "booktitle" output.check
+ format.bvolume output
+ format.number.series output
+ format.chapter.pages output
+ new.block
+ format.address.publisher output
+ }
+ { format.incoll.inproc.crossref output.nonnull
+ format.chapter.pages output
+ }
+ if$
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {inproceedings}
+{ output.bibitem
+ format.authors "author" output.check
+ author format.key output % special for
+ output.year.check % apalike
+ new.block
+ format.title "title" output.check
+ new.block
+ crossref missing$
+ { format.in.ed.booktitle "booktitle" output.check
+ format.bvolume output
+ format.number.series output
+ format.pages output
+ address output % for apalike
+ new.sentence % there's no year
+ organization output % here so things
+ publisher output % are simpler
+ }
+ { format.incoll.inproc.crossref output.nonnull
+ format.pages output
+ }
+ if$
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {conference} { inproceedings }
+
+FUNCTION {manual}
+{ output.bibitem
+ format.authors output
+ author format.key output % special for
+ output.year.check % apalike
+ new.block
+ format.btitle "title" output.check
+ organization address new.block.checkb
+ organization output
+ address output
+ format.edition output
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {mastersthesis}
+{ output.bibitem
+ format.authors "author" output.check
+ author format.key output % special for
+ output.year.check % apalike
+ new.block
+ format.title "title" output.check
+ new.block
+ "Master's thesis" format.thesis.type output.nonnull
+ school "school" output.check
+ address output
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {misc}
+{ output.bibitem
+ format.authors output
+ author format.key output % special for
+ output.year.check % apalike
+ new.block
+ format.title output
+ new.block
+ howpublished output
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {phdthesis}
+{ output.bibitem
+ format.authors "author" output.check
+ author format.key output % special for
+ output.year.check % apalike
+ new.block
+ format.btitle "title" output.check
+ new.block
+ "PhD thesis" format.thesis.type output.nonnull
+ school "school" output.check
+ address output
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {proceedings}
+{ output.bibitem
+ format.editors output
+ editor format.key output % special for
+ output.year.check % apalike
+ new.block
+ format.btitle "title" output.check
+ format.bvolume output
+ format.number.series output
+ address output % for apalike
+ new.sentence % we always output
+ organization output % a nonempty organization
+ publisher output % here
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {techreport}
+{ output.bibitem
+ format.authors "author" output.check
+ author format.key output % special for
+ output.year.check % apalike
+ new.block
+ format.title "title" output.check
+ new.block
+ format.tr.number output.nonnull
+ institution "institution" output.check
+ address output
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {unpublished}
+{ output.bibitem
+ format.authors "author" output.check
+ author format.key output % special for
+ output.year.check % apalike
+ new.block
+ format.title "title" output.check
+ new.block
+ note "note" output.check
+ fin.entry
+}
+
+FUNCTION {default.type} { misc }
+
+MACRO {jan} {"January"}
+
+MACRO {feb} {"February"}
+
+MACRO {mar} {"March"}
+
+MACRO {apr} {"April"}
+
+MACRO {may} {"May"}
+
+MACRO {jun} {"June"}
+
+MACRO {jul} {"July"}
+
+MACRO {aug} {"August"}
+
+MACRO {sep} {"September"}
+
+MACRO {oct} {"October"}
+
+MACRO {nov} {"November"}
+
+MACRO {dec} {"December"}
+
+MACRO {acmcs} {"ACM Computing Surveys"}
+
+MACRO {acta} {"Acta Informatica"}
+
+MACRO {cacm} {"Communications of the ACM"}
+
+MACRO {ibmjrd} {"IBM Journal of Research and Development"}
+
+MACRO {ibmsj} {"IBM Systems Journal"}
+
+MACRO {ieeese} {"IEEE Transactions on Software Engineering"}
+
+MACRO {ieeetc} {"IEEE Transactions on Computers"}
+
+MACRO {ieeetcad}
+ {"IEEE Transactions on Computer-Aided Design of Integrated Circuits"}
+
+MACRO {ipl} {"Information Processing Letters"}
+
+MACRO {jacm} {"Journal of the ACM"}
+
+MACRO {jcss} {"Journal of Computer and System Sciences"}
+
+MACRO {scp} {"Science of Computer Programming"}
+
+MACRO {sicomp} {"SIAM Journal on Computing"}
+
+MACRO {tocs} {"ACM Transactions on Computer Systems"}
+
+MACRO {tods} {"ACM Transactions on Database Systems"}
+
+MACRO {tog} {"ACM Transactions on Graphics"}
+
+MACRO {toms} {"ACM Transactions on Mathematical Software"}
+
+MACRO {toois} {"ACM Transactions on Office Information Systems"}
+
+MACRO {toplas} {"ACM Transactions on Programming Languages and Systems"}
+
+MACRO {tcs} {"Theoretical Computer Science"}
+
+READ
+
+FUNCTION {sortify}
+{ purify$
+ "l" change.case$
+}
+
+INTEGERS { len }
+
+FUNCTION {chop.word}
+{ 's :=
+ 'len :=
+ s #1 len substring$ =
+ { s len #1 + global.max$ substring$ }
+ 's
+ if$
+}
+
+% There are three apalike cases: one person (Jones),
+% two (Jones and de~Bruijn), and more (Jones et~al.).
+% This function is much like format.crossref.editors.
+%
+FUNCTION {format.lab.names}
+{ 's :=
+ s #1 "{vv~}{ll}" format.name$
+ s num.names$ duplicate$
+ #2 >
+ { pop$ " et~al." * }
+ { #2 <
+ 'skip$
+ { s #2 "{ff }{vv }{ll}{ jj}" format.name$ "others" =
+ { " et~al." * }
+ { " and " * s #2 "{vv~}{ll}" format.name$ * }
+ if$
+ }
+ if$
+ }
+ if$
+}
+
+FUNCTION {author.key.label}
+{ author empty$
+ { key empty$
+ { cite$ #1 #3 substring$ }
+ 'key % apalike uses the whole key
+ if$
+ }
+ { author format.lab.names }
+ if$
+}
+
+FUNCTION {author.editor.key.label}
+{ author empty$
+ { editor empty$
+ { key empty$
+ { cite$ #1 #3 substring$ }
+ 'key % apalike uses the whole key
+ if$
+ }
+ { editor format.lab.names }
+ if$
+ }
+ { author format.lab.names }
+ if$
+}
+
+FUNCTION {editor.key.label}
+{ editor empty$
+ { key empty$
+ { cite$ #1 #3 substring$ }
+ 'key % apalike uses the whole key, no organization
+ if$
+ }
+ { editor format.lab.names }
+ if$
+}
+
+FUNCTION {calc.label} % this function came from ASTRON.BST (ARR)
+{ type$ "book" =
+ type$ "inbook" =
+ or
+ 'author.editor.key.label
+ { type$ "proceedings" =
+ 'editor.key.label % apalike ignores organization
+ 'author.key.label % for labeling and sorting
+ if$
+ }
+ if$
+ "\protect\astroncite{" swap$ * "}{" % these three lines are
+ * % for apalike, which
+ year field.or.null purify$ #-1 #4 substring$ % uses all four digits
+ * % the mathing closing "}" comes in at the reverse.pass
+ 'label :=
+}
+
+FUNCTION {sort.format.names}
+{ 's :=
+ #1 'nameptr :=
+ ""
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ { nameptr #1 >
+ { " " * }
+ 'skip$
+ if$ % apalike uses initials
+ s nameptr "{vv{ } }{ll{ }}{ f{ }}{ jj{ }}" format.name$ 't := % <= here
+ nameptr numnames = t "others" = and
+ { "et al" * }
+ { t sortify * }
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+}
+
+FUNCTION {sort.format.title}
+{ 't :=
+ "A " #2
+ "An " #3
+ "The " #4 t chop.word
+ chop.word
+ chop.word
+ sortify
+ #1 global.max$ substring$
+}
+
+FUNCTION {author.sort}
+{ author empty$
+ { key empty$
+ { "to sort, need author or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { author sort.format.names }
+ if$
+}
+
+FUNCTION {author.editor.sort}
+{ author empty$
+ { editor empty$
+ { key empty$
+ { "to sort, need author, editor, or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { editor sort.format.names }
+ if$
+ }
+ { author sort.format.names }
+ if$
+}
+
+FUNCTION {editor.sort}
+{ editor empty$
+ { key empty$
+ { "to sort, need editor or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { editor sort.format.names }
+ if$
+}
+
+% apalike uses two sorting passes; the first one sets the
+% labels so that the `a's, `b's, etc. can be computed;
+% the second pass puts the references in "correct" order.
+% The presort function is for the first pass. It computes
+% label, sort.label, and title, and then concatenates.
+FUNCTION {presort}
+{ calc.label
+ label sortify
+ " "
+ *
+ type$ "book" =
+ type$ "inbook" =
+ or
+ 'author.editor.sort
+ { type$ "proceedings" =
+ 'editor.sort
+ 'author.sort
+ if$
+ }
+ if$
+ #1 entry.max$ substring$ % for
+ 'sort.label := % apalike
+ sort.label % style
+ *
+ " "
+ *
+ title field.or.null
+ sort.format.title
+ *
+ #1 entry.max$ substring$
+ 'sort.key$ :=
+}
+
+ITERATE {presort}
+
+SORT % by label, sort.label, title---for final label calculation
+
+STRINGS { last.label next.extra } % apalike labels are only for the text;
+
+INTEGERS { last.extra.num } % there are none in the bibliography
+
+FUNCTION {initialize.extra.label.stuff} % and hence there is no `longest.label'
+{ #0 int.to.chr$ 'last.label :=
+ "" 'next.extra :=
+ #0 'last.extra.num :=
+}
+
+FUNCTION {forward.pass}
+{ last.label label =
+ { last.extra.num #1 + 'last.extra.num :=
+ last.extra.num int.to.chr$ 'extra.label :=
+ }
+ { "a" chr.to.int$ 'last.extra.num :=
+ "" 'extra.label :=
+ label 'last.label :=
+ }
+ if$
+}
+
+FUNCTION {reverse.pass} % this function came from ASTRON.BST (ARR)
+{ next.extra "b" =
+ { "a" 'extra.label := }
+ 'skip$
+ if$
+ label extra.label * "}" * 'label :=
+ extra.label 'next.extra :=
+}
+
+EXECUTE {initialize.extra.label.stuff}
+
+ITERATE {forward.pass}
+
+REVERSE {reverse.pass}
+
+% Now that the label is right we sort for real,
+% on sort.label then year then title. This is
+% for the second sorting pass.
+FUNCTION {bib.sort.order}
+{ sort.label
+ " "
+ *
+ year field.or.null sortify
+ *
+ " "
+ *
+ title field.or.null
+ sort.format.title
+ *
+ #1 entry.max$ substring$
+ 'sort.key$ :=
+}
+
+ITERATE {bib.sort.order}
+
+SORT % by sort.label, year, title---giving final bibliography order
+
+FUNCTION {begin.bib}
+{ preamble$ empty$ % no \etalchar in apalike
+ 'skip$
+ { preamble$ write$ newline$ }
+ if$
+ "\begin{thebibliography}{}" write$ newline$ % no labels in apalike
+}
+
+EXECUTE {begin.bib}
+
+EXECUTE {init.state.consts}
+
+ITERATE {call.type$}
+
+FUNCTION {end.bib}
+{ newline$
+ "\end{thebibliography}" write$ newline$
+}
+
+EXECUTE {end.bib}
diff --git a/biblio/bibtex/contrib/misc/jbact.bst b/biblio/bibtex/contrib/misc/jbact.bst
new file mode 100644
index 0000000000..b56b63fbe0
--- /dev/null
+++ b/biblio/bibtex/contrib/misc/jbact.bst
@@ -0,0 +1,1490 @@
+% BibTex `jbact' bibliography style
+% version = 1.30 of jbact.bst 1992 June 29
+% Fix format.vol.num.pages to use field.or.null to
+% correctly handle case of missing volume.
+% [Nelson H. F. Beebe <beebe@plot79.math.utah.edu>]
+% version = 1.29 of jbact.bst 1992 April 21
+% from version = 1.21 of jmb.bst 1991 June 10
+
+% TO BE DONE in inproceedings:
+% 1. editors are not boldface
+% 2. need comma after title, not period
+% 3. don't rearrange editor names
+% 4. no comma after editors
+% (The trouble is that there is only one name function...)
+
+% This program must be used in conjunction with jbact.sty
+
+% Thomas Schneider
+% National Cancer Institute
+% Laboratory of Mathematical Biology
+% Frederick, Maryland 21702-1013
+% toms@ncifcrf.gov
+%
+% This file is available by anonymous ftp from ncifcrf.gov in pub/delila.
+%
+% TITLES can be turned on and off!
+% Just nocite the reference TitlesOn in the paper (i.e. \nocite{TitlesOn})
+% and have a bibliography article in your database with that cite key!
+% Without titles is Journal of Molecular Biology;
+% With titles is Journal of Theoretical Biology.
+%
+% WARNING: Since I use mostly article, book and inproceedings, these
+% are formatted pretty closely to the Journal of Theoretical Biology style
+% while other things are neglected. Also, I can't guarantee that the style
+% is exactly right.
+%
+% The following documentation is identical from the source of jmb.bst,
+% which was the apalike.bst taken from the Clarkson archive on 1989 June 19.
+%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% BibTeX `apalike' bibliography style (24-Jan-88 version)
+% Adapted from the `alpha' style, version 0.99a; for BibTeX version 0.99a.
+% Copyright (C) 1988, all rights reserved.
+% Copying of this file is allowed, provided that if you make any changes at all
+% you name it something other than `apalike.bst'.
+% This restriction helps ensure that all copies are identical.
+% Differences between this style and `alpha' are generally heralded by a `%'.
+% The file btxbst.doc has the documentation for alpha.bst.
+%
+% This style should be used with the `apalike' LaTeX style (apalike.sty).
+% \cite's come out like "(Jones, 1986)" in the text but there are no labels
+% in the bibliography, and something like "(1986)" comes out immediately
+% after the author. Author (and editor) names appear as last name, comma,
+% initials. A `year' field is required for every entry, and so is either
+% an author (or in some cases, an editor) field or a key field.
+%
+% Editorial note:
+% Many journals require a style like `apalike', but I strongly, strongly,
+% strongly recommend that you not use it if you have a choice---use something
+% like `plain' instead. Mary-Claire van Leunen (A Handbook for Scholars,
+% Knopf, 1979) argues convincingly that a style like `plain' encourages better
+% writing than one like `apalike'. Furthermore the strongest arguments for
+% using an author-date style like `apalike'---that it's "the most practical"
+% (The Chicago Manual of Style, University of Chicago Press, thirteenth
+% edition, 1982, pages 400--401)---fall flat on their face with the new
+% computer-typesetting technology. For instance page 401 anachronistically
+% states "The chief disadvantage of [a style like `plain'] is that additions
+% or deletions cannot be made after the manuscript is typed without changing
+% numbers in both text references and list." LaTeX sidesteps the disadvantage.
+%
+% History:
+% 15-sep-86 (SK,OP) Original version, by Susan King and Oren Patashnik.
+% 10-nov-86 (OP) Truncated the sort.key$ string to the correct length
+% in bib.sort.order to eliminate error message.
+% 24-jan-88 (OP) Updated for BibTeX version 0.99a, from alpha.bst 0.99a;
+% apalike now sorts by author, then year, then title;
+% THIS `apalike' VERSION DOES NOT WORK WITH BIBTEX 0.98i.
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%
+% The program was further modified by Tom Schneider:
+%
+% 1989 June 19 (TDS) Renamed jmb.bst. Items that do not have years were
+% listed in the bibliography without identifiers. However, they
+% have identifiers in the text. The identifier was added.
+% Titles were removed :-(.
+
+% 1989 October 2 (TDS) Made labels in the paper use the & symbol rather
+% than `and', as required by JMB.
+% 1989 October 3 (TDS) Made et~al. be in italics.
+% Removed comma after journal name. (actually, all
+% mid sentence commas go!)
+% Made volume number be bold faced.
+% Converted colon (:) after volume number to a comma (,).
+% If a journal name does NOT end in a period, add
+% a comma after the name.
+% 1989 October 14 (TDS) Without a year the program used to sort on the
+% title. I made it sort on the cite$ if there is no year.
+% 1989 October 18 (TDS) If there is one reference without a year, put
+% an "a" at the end of its label, so that it comes out
+% as (Smith, a) in the text. in FUNCTION {forward.pass}
+% 1989 November 2 (TDS) Unpublished papers now give the title.
+% 1989 November 18 (TDS) TITLES can be turned on and off!
+% Just nocite the reference TitlesOn in the paper
+% and have a bibliography article in your database
+% with that cite key!
+% 1989 December 5 (TDS) I can't stand sorting to fall back on the
+% titles of the article - no control! So in function
+% bib.sort.order the default is now cite$.
+% 1990 November 14 (TDS) Changes to match JTB better:
+% Names in the bibliography are now connected
+% with "\&" instead of "and", since this fits JTB better.
+% "In" is now "In:".
+% "editors" and "editor" are now "eds" and "ed".
+% booktitle follows editors. editors in parenthesis.
+% pp. and p. instead of pages and page.
+% location followed by colon (:) and then publisher.
+
+% 1992 April 22 Changes to match J. Bact Proof
+% year is not in parens, ends with period.
+% the first name should be 'last name first',
+% but later ones should be the other way!
+% 'and' rather than &
+% journal name is not emphasized
+% author list is bold face, ends with period
+% comma after first author when there are two authors
+% changes to match J. Bact galley proof markings
+% expand journal titles where required by J. Bact!
+% no comma after title!
+
+ENTRY % declare variables that have a value for each entry on the list
+ { address
+ author
+ booktitle
+ chapter
+ edition
+ editor
+ howpublished
+ institution
+ journal
+ key
+% month not used in apalike
+ note
+ number
+ organization
+ pages
+ publisher
+ school
+ series
+ title
+ type
+ volume
+ year
+ }
+ {}
+ { label extra.label sort.label }
+
+INTEGERS { output.state before.all mid.sentence after.sentence after.block
+ docomma givetitles }
+
+FUNCTION {init.state.consts}
+{ #0 'before.all :=
+ #1 'mid.sentence :=
+ #2 'after.sentence :=
+ #3 'after.block :=
+
+ #0 'docomma := % if it is 0 then don't do commas, otherwise do them.
+}
+
+FUNCTION {init.toggle.switches}
+{% set switches for controlling the output!
+ #0 'givetitles := % if it is 0 then don't give titles, otherwise do them.
+}
+
+STRINGS { s t }
+
+FUNCTION {output.nonnull}
+{ 's :=
+ output.state mid.sentence =
+
+% % { ", " * write$ } % the comma here is responsible for every comma!
+% % % But JMB doesn't want commas, so away it goes!
+% { " " * write$ } % That does it!
+
+ { % doing a comma is controlled specifically in JMB using docomma
+ docomma #0 =
+ { " " * write$ }
+ { ", " * write$ }
+ if$
+ }
+ { output.state after.block =
+ { add.period$ write$
+ newline$
+ "\newblock " write$
+ }
+ { output.state before.all =
+ 'write$
+ { add.period$ " " * write$ }
+ if$
+ }
+ if$
+ mid.sentence 'output.state :=
+ }
+ if$
+ s
+}
+
+FUNCTION {output}
+{ duplicate$ empty$
+ 'pop$
+ 'output.nonnull
+ if$
+}
+
+FUNCTION {output.check}
+{ 't :=
+ duplicate$ empty$
+ { t "title" =
+ { pop$ } % jmb ignores titles and does not object if missing
+ { pop$ "empty " t * " in " * cite$ * warning$ }
+ if$
+ }
+ 'output.nonnull % block periods
+ % { pop$ } % don't do anything
+ if$
+}
+
+% t "title" =
+% { "zowie" warning$ }
+% { duplicate$ empty$
+% { pop$ "EmPtY " t * " in " * cite$ * warning$ }
+% 'output.nonnull
+% }
+% if$
+% if$
+%}
+
+% apalike needs this function because
+% the year has special punctuation;
+% apalike ignores the month
+FUNCTION {output.year.check}
+{ year empty$
+ {
+ "empty year in " cite$ ", using label: " extra.label * * * warning$
+ write$
+% " (" extra.label * ")" * % TDS no parens in jbact
+ " " extra.label * ". " * % period after year
+ mid.sentence 'output.state :=
+ }
+ { write$
+% " (" year * extra.label * ")" *
+ " " year * extra.label * % period after year TDS
+ mid.sentence 'output.state :=
+ }
+ if$
+}
+
+%FUNCTION {output.bibitem}
+%{ newline$
+% "\bibitem[" write$
+% label write$
+% "]{" write$
+% cite$ write$
+% "}" write$
+% newline$
+% ""
+% before.all 'output.state :=
+%}
+
+% do numbers instead: TDS (taken from unsrt.bst
+FUNCTION {output.bibitem}
+{ newline$
+ "\bibitem{" write$
+ cite$ write$
+ "}" write$
+ newline$
+ ""
+ before.all 'output.state :=
+}
+
+FUNCTION {fin.entry}
+{ add.period$
+ write$
+ newline$
+}
+
+FUNCTION {new.block}
+{ output.state before.all =
+ 'skip$
+ { after.block 'output.state := }
+ if$
+}
+
+FUNCTION {new.sentence}
+{ output.state after.block =
+ 'skip$
+ { output.state before.all =
+ 'skip$
+ { after.sentence 'output.state := }
+ if$
+ }
+ if$
+}
+
+FUNCTION {not}
+{ { #0 }
+ { #1 }
+ if$
+}
+
+FUNCTION {and}
+{ 'skip$
+ { pop$ #0 }
+ if$
+}
+
+FUNCTION {or}
+{ { pop$ #1 }
+ 'skip$
+ if$
+}
+
+FUNCTION {new.block.checkb}
+{ empty$
+ swap$ empty$
+ and
+ 'skip$
+ 'new.block
+ if$
+}
+
+FUNCTION {field.or.null}
+{ duplicate$ empty$
+ { pop$ "" }
+ 'skip$
+ if$
+}
+
+FUNCTION {emphasize}
+{ duplicate$ empty$
+ { pop$ "" }
+ { "{\em " swap$ * "}" * }
+ if$
+}
+
+INTEGERS { nameptr namesleft numnames }
+
+FUNCTION {format.names}
+{ 's :=
+
+%"TRY WITH" s * warning$
+
+ #1 'nameptr :=
+ s num.names$ 'numnames :=
+
+%"TRY WITH" numnames * warning$ % this gives a warning
+% the problem is that num.names$ is 1, so the loop
+% doesn't work. Looks like names weren't counted somewhere!
+
+ "{\bf " % start bold face
+
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ {
+% the first name should be 'last name first',
+% but later ones should be the other way!
+ nameptr #1 =
+ {s nameptr "{vv~}{ll}{, jj}{, f.}" format.name$ 't := } % last name first
+ {s nameptr "{ff~}{vv~}{ll}{, jj}" format.name$ 't := } % first name first
+ if$
+
+% nameptr #1 =
+% {"then bbl" t * warning$}
+% {"ELSE bbl" t * warning$}
+% if$
+
+ nameptr #1 >
+ { namesleft #1 >
+ { ", " * t * }
+ { numnames #2 >
+ { "," * }
+ 'skip$
+ if$
+
+% if there are EXACTY two names, put a comma after the first one!
+ numnames #2 =
+ { "," * } % TDS
+ 'skip$
+ if$
+
+ t "others" =
+ { " {\em et~al.}" * }
+ { " and " * t * } % back to 'and' TDS
+% { " \& " * t * }
+ if$
+ }
+ if$
+ }
+ 't
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+
+ % if there is more than one name, then DON'T put a period
+ % at the end of the name list because it looks like Smith, J. K..
+ % otherwise put that period because the last name will end the list
+ % as in Helsberg, M. and R.~Eichenlaub.
+ numnames #1 >
+ {"." *}
+ 'skip$
+ if$
+
+ "} " * * % end bold face end whole thing with period
+}
+
+FUNCTION {format.authors}
+{ author empty$
+ { "" }
+% { author format.names }
+
+% { "{\bf " author ".} " * * format.names } % make bold face, end with .
+% doing the above causes trouble!
+% NOTE: we can't put bf here since it messes up the formatting of names!
+
+ { author format.names } % make bold face, end with .
+ if$
+}
+
+FUNCTION {format.key} % this function is just for apalike
+{ empty$
+ { key field.or.null }
+ { "" }
+ if$
+}
+
+FUNCTION {format.editors}
+{ editor empty$
+ { "" }
+ { editor format.names
+% editor num.names$ #1 >
+% { ", eds" * } % TDS
+% { ", ed" * } % TDS
+% if$
+ ", (ed.)," * % TDS
+ }
+ if$
+}
+
+FUNCTION {format.title}
+{ title empty$
+ { "" }
+ { % decide whether to give the title or not
+ givetitles #1 =
+ { title "t" change.case$ } % produce the title
+ { title pop$ "" } % don't produce the title
+ if$
+ }
+ if$
+}
+
+FUNCTION {n.dashify}
+{ 't :=
+ ""
+ { t empty$ not }
+ { t #1 #1 substring$ "-" =
+ { t #1 #2 substring$ "--" = not
+ { "--" *
+ t #2 global.max$ substring$ 't :=
+ }
+ { { t #1 #1 substring$ "-" = }
+ { "-" *
+ t #2 global.max$ substring$ 't :=
+ }
+ while$
+ }
+ if$
+ }
+ { t #1 #1 substring$ *
+ t #2 global.max$ substring$ 't :=
+ }
+ if$
+ }
+ while$
+}
+
+FUNCTION {format.btitle}
+{ title emphasize
+}
+
+FUNCTION {tie.or.space.connect}
+{ duplicate$ text.length$ #3 <
+ { "~" }
+ { " " }
+ if$
+ swap$ * *
+}
+
+FUNCTION {either.or.check}
+{ empty$
+ 'pop$
+ { "can't use both " swap$ * " fields in " * cite$ * warning$ }
+ if$
+}
+
+FUNCTION {format.bvolume}
+{ volume empty$
+ { "" }
+ { "vol." volume tie.or.space.connect % TDS vol, not volume
+ series empty$
+ 'skip$
+ { " of " * series emphasize * }
+ if$
+ "volume and number" number either.or.check
+ }
+ if$
+}
+
+FUNCTION {format.number.series}
+{ volume empty$
+ { number empty$
+ { series field.or.null }
+ { output.state mid.sentence =
+ { "number" }
+ { "Number" }
+ if$
+ number tie.or.space.connect
+ series empty$
+ { "there's a number but no series in " cite$ * warning$ }
+ { " in " * series * }
+ if$
+ }
+ if$
+ }
+ { "" }
+ if$
+}
+
+FUNCTION {format.edition}
+{ edition empty$
+ { "" }
+ {
+ output.state mid.sentence =
+ { edition "l" change.case$ }
+ { edition "t" change.case$ }
+ if$
+% If the database has the word 'second' replace it with 2nd for J. Bact!
+ "second" =
+ { "2nd"}
+ {
+ if$
+ "third" =
+ { "3nd"}
+ { edition }
+ }
+
+ if$
+
+ " ed." *
+
+% output.state mid.sentence =
+% { edition "l" change.case$ " ed." * }
+% { edition "t" change.case$ " ed." * }
+% if$
+ }
+ if$
+}
+
+INTEGERS { multiresult }
+
+FUNCTION {multi.page.check}
+{ 't :=
+ #0 'multiresult :=
+ { multiresult not
+ t empty$ not
+ and
+ }
+ { t #1 #1 substring$
+ duplicate$ "-" =
+ swap$ duplicate$ "," =
+ swap$ "+" =
+ or or
+ { #1 'multiresult := }
+ { t #2 global.max$ substring$ 't := }
+ if$
+ }
+ while$
+ multiresult
+}
+
+FUNCTION {format.pages}
+{ pages empty$
+ { "" }
+ { pages multi.page.check
+% { "pp." pages n.dashify tie.or.space.connect } % TDS
+% for some crazy reason, J.Bact wants p instead of pp
+ { "p." pages n.dashify tie.or.space.connect } % TDS
+ { "p." pages tie.or.space.connect } % TDS
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.vol.num.pages}
+{ "{\bf " volume field.or.null * "}" * % make volume bold face
+ number empty$
+ 'skip$
+ { " (" number * ")" * *
+ volume empty$
+ { "there's a number but no volume in " cite$ * warning$ }
+ 'skip$
+ if$
+ }
+ if$
+ pages empty$
+ 'skip$
+ { duplicate$ empty$
+ { pop$ format.pages }
+ { ":" * pages n.dashify * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.chapter.pages}
+{ chapter empty$
+ 'format.pages
+ { type empty$
+ { "chapter" }
+ { type "l" change.case$ }
+ if$
+ chapter tie.or.space.connect
+ pages empty$
+ 'skip$
+ { ", " * format.pages * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.in.ed.booktitle}
+{ booktitle empty$
+ { "" }
+ { editor empty$
+ { "In: " emphasize booktitle * } % TDS
+ { "In: " emphasize format.editors " " * *
+ booktitle * ", " *
+ } % TDS
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.thesis.type}
+{ type empty$
+ 'skip$
+ { pop$
+ type "t" change.case$
+ }
+ if$
+}
+
+FUNCTION {format.tr.number}
+{ type empty$
+ { "Technical Report" }
+ 'type
+ if$
+ number empty$
+ { "t" change.case$ }
+ { number tie.or.space.connect }
+ if$
+}
+
+FUNCTION {format.article.crossref}
+{ "In:" % this is for apalike % TDS
+ " \cite{" * crossref * "}" *
+}
+
+FUNCTION {format.book.crossref}
+{ volume empty$
+ { "empty volume in " cite$ * "'s crossref of " * crossref * warning$
+ "In: " % TDS
+ }
+ { "Volume" volume tie.or.space.connect
+ " of " *
+ }
+ if$
+ "\cite{" * crossref * "}" * % this is for apalike
+}
+
+FUNCTION {format.incoll.inproc.crossref}
+{ "In:" % this is for apalike % TDS
+ " \cite{" * crossref * "}" *
+}
+
+FUNCTION {article}
+{
+ cite$ "TitlesOn" =
+ 'skip$ % Don't write out an article of this kind, it's a toggle switch!
+ {
+ output.bibitem
+ format.authors "author" output.check
+ author format.key output % special for
+ output.year.check % apalike
+ new.block
+% zzzz
+ format.title "title" output.check
+ new.block
+ crossref missing$
+ { % figure out the last character of the journal name.
+ % "<<" journal #-1 #1 substring$ ">>" * * % for testing
+ % "<" journal ">" * * % this works ok % for testing
+
+ % from here on the string t will carry the journal title
+ journal 't :=
+
+ % expand journal titles where required by J. Bact! TDS
+ t "Nucl. Acids Res." =
+ { "Nucleic Acids Res." 't := }
+ 'skip$
+ if$
+
+ t "J. Bact." =
+ { "J. Bacteriol." 't := }
+ 'skip$
+ if$
+
+ t "Bell System Tech. J." =
+ { "Bell Syst. Tech. J." 't := }
+ 'skip$
+ if$
+
+ t "Molec. Microb." =
+ { "Molec. Microbiol." 't := }
+ 'skip$
+ if$
+
+ % deal with periods at the ends of titles
+ t #-1 #1 substring$ "." =
+ { t } % journal ended in period so don't do anything
+ { t " " *} % NO COMMAS AFTER THE JOURNAL NAME IN J. BACT!
+% { t ", " *} % journal ended without period, so add comma
+ if$
+
+ %journal #-1 #1 substring$ "." =
+ %{ journal } % journal ended in period so don't do anything
+ %{ journal ", " *} % journal ended without period, so add comma
+ %if$
+
+% emphasize "journal" output.check % TDS
+ "journal" output.check % not emphasized any more
+
+% journal * emphasize "journal" output.check % the original method
+
+ format.vol.num.pages output
+ }
+ { format.article.crossref output.nonnull
+ format.pages output
+ }
+ if$
+ new.block
+ note output
+ fin.entry
+ }
+ if$
+}
+
+FUNCTION {book}
+{ output.bibitem
+ author empty$
+ { format.editors "author and editor" output.check
+ editor format.key output
+ }
+ { format.authors output.nonnull
+ crossref missing$
+ { "author and editor" editor either.or.check }
+ 'skip$
+ if$
+ }
+ if$
+ output.year.check % special for apalike
+ new.block
+ format.btitle "title" output.check
+ #1 'docomma := % TURN COMMAS ON FOR JMB
+ crossref missing$
+ {
+ format.bvolume output
+ new.block
+ format.number.series output
+ format.edition output
+ new.sentence
+ #0 'docomma := % no comma after address
+% publisher "publisher" % TDS
+% address output output.check % TDS
+ #1 'docomma := % comma back on
+ publisher "publisher" output.check
+ address output
+ }
+ { new.block
+ format.book.crossref output.nonnull
+ }
+ if$
+% format.edition output
+ new.block
+ note output
+ fin.entry
+ #0 'docomma := % TURN COMMAS OFF
+}
+
+FUNCTION {booklet}
+{ output.bibitem
+ format.authors output
+ author format.key output % special for
+ output.year.check % apalike
+ new.block
+ format.title "title" output.check
+ new.block
+ howpublished output
+ address output
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {inbook}
+{ output.bibitem
+ author empty$
+ { format.editors "author and editor" output.check
+ editor format.key output
+ }
+ { format.authors output.nonnull
+ crossref missing$
+ { "author and editor" editor either.or.check }
+ 'skip$
+ if$
+ }
+ if$
+ output.year.check % special for apalike
+ new.block
+ format.btitle "title" output.check
+ crossref missing$
+ { format.bvolume output
+ format.chapter.pages "chapter and pages" output.check
+ new.block
+ format.number.series output
+ new.sentence
+ #0 'docomma := % no comma after address
+ address ":" * output % TDS
+ publisher "publisher" output.check % TDS
+ #1 'docomma := % comma back on
+% publisher "publisher" output.check
+% address output
+ }
+ { format.chapter.pages "chapter and pages" output.check
+ new.block
+ format.book.crossref output.nonnull
+ }
+ if$
+ format.edition output
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {incollection}
+{ output.bibitem
+ format.authors "author" output.check
+ author format.key output % special for
+ output.year.check % apalike
+ new.block
+ format.title "title" output.check
+ new.block
+ crossref missing$
+ { format.in.ed.booktitle "booktitle" output.check
+ format.bvolume output
+ format.number.series output
+ format.chapter.pages output
+ new.sentence
+ publisher "publisher" output.check
+ address output
+ format.edition output
+ }
+ { format.incoll.inproc.crossref output.nonnull
+ format.chapter.pages output
+ }
+ if$
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {inproceedings}
+{ output.bibitem
+ format.authors "author" output.check
+ author format.key output % special for
+ output.year.check % apalike
+ new.block
+% NOTE: they want a comma after the title, but that would mess
+% up the period after other titles.
+ format.title "title" output.check
+ new.block
+ crossref missing$
+ {
+% #1 'docomma := % TURN COMMAS ON FOR JMB, BUT NOT FOR JTB: inconsistent
+
+ format.pages
+ pages empty$
+ { output }
+ { "." * output } % TDS toss in period
+ if$
+
+ format.in.ed.booktitle "booktitle" output.check
+ format.bvolume "." * output
+ format.number.series output
+
+% address output % TDS address is below for JTB
+% new.sentence % TDS remove period
+ organization output
+ #0 'docomma := % NO COMMA AFTER ADDRESS
+ publisher "," * output % TDS
+% publisher "publisher" output % TDS
+ address output % TDS
+ #1 'docomma := % comma back on
+
+% publisher output % are simpler
+ #0 'docomma := % TURN COMMAS OFF
+ }
+ { format.incoll.inproc.crossref output.nonnull
+ format.pages output
+ }
+ if$
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {conference} { inproceedings }
+
+FUNCTION {manual}
+{ output.bibitem
+ format.authors output
+ author format.key output % special for
+ output.year.check % apalike
+ new.block
+ format.btitle "title" output.check
+ organization address new.block.checkb
+ organization output
+ address output
+ format.edition output
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {mastersthesis}
+{ output.bibitem
+ format.authors "author" output.check
+ author format.key output % special for
+ output.year.check % apalike
+ new.block
+ format.title "title" output.check
+ new.block
+ "Master's thesis" format.thesis.type output.nonnull
+ school "school" output.check
+ address output
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {misc}
+{ output.bibitem
+ format.authors output
+ author format.key output % special for
+ output.year.check % apalike
+ new.block
+ format.title output
+ new.block
+ howpublished output
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {phdthesis}
+{ output.bibitem
+ format.authors "author" output.check
+ author format.key output % special for
+ output.year.check % apalike
+ new.block
+ format.btitle "title" output.check
+ new.block
+ "PhD thesis" format.thesis.type output.nonnull
+ school "school" output.check
+ address output
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {proceedings}
+{ output.bibitem
+ format.editors output
+ editor format.key output % special for
+ output.year.check % apalike
+ new.block
+ format.btitle "title" output.check
+ format.bvolume output
+ format.number.series output
+ address output % for apalike
+ new.sentence % we always output
+ organization output % a nonempty organization
+ publisher output % here
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {techreport}
+{ output.bibitem
+ format.authors "author" output.check
+ author format.key output % special for
+ output.year.check % apalike
+ new.block
+ format.title "title" output.check
+ new.block
+ format.tr.number output.nonnull
+ institution "institution" output.check
+ address output
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {unpublished}
+{ output.bibitem
+ format.authors "author" output.check
+ author format.key output % special for
+ output.year.check % apalike
+ new.block
+
+% Since format.title is out of commission, the original method won't work:
+% format.title "title" output.check
+% so do the equivalent of the format.title procedure: (TDS)
+ title empty$
+ { "" }
+ { title "t" change.case$ } % produce the title
+ if$
+ "title" output.check
+
+ new.block
+ note "note" output.check
+ fin.entry
+}
+
+FUNCTION {default.type} { misc }
+
+MACRO {jan} {"January"}
+
+MACRO {feb} {"February"}
+
+MACRO {mar} {"March"}
+
+MACRO {apr} {"April"}
+
+MACRO {may} {"May"}
+
+MACRO {jun} {"June"}
+
+MACRO {jul} {"July"}
+
+MACRO {aug} {"August"}
+
+MACRO {sep} {"September"}
+
+MACRO {oct} {"October"}
+
+MACRO {nov} {"November"}
+
+MACRO {dec} {"December"}
+
+MACRO {acmcs} {"ACM Computing Surveys"}
+
+MACRO {acta} {"Acta Informatica"}
+
+MACRO {cacm} {"Communications of the ACM"}
+
+MACRO {ibmjrd} {"IBM Journal of Research and Development"}
+
+MACRO {ibmsj} {"IBM Systems Journal"}
+
+MACRO {ieeese} {"IEEE Transactions on Software Engineering"}
+
+MACRO {ieeetc} {"IEEE Transactions on Computers"}
+
+MACRO {ieeetcad}
+ {"IEEE Transactions on Computer-Aided Design of Integrated Circuits"}
+
+MACRO {ipl} {"Information Processing Letters"}
+
+MACRO {jacm} {"Journal of the ACM"}
+
+MACRO {jcss} {"Journal of Computer and System Sciences"}
+
+MACRO {scp} {"Science of Computer Programming"}
+
+MACRO {sicomp} {"SIAM Journal on Computing"}
+
+MACRO {tocs} {"ACM Transactions on Computer Systems"}
+
+MACRO {tods} {"ACM Transactions on Database Systems"}
+
+MACRO {tog} {"ACM Transactions on Graphics"}
+
+MACRO {toms} {"ACM Transactions on Mathematical Software"}
+
+MACRO {toois} {"ACM Transactions on Office Information Systems"}
+
+MACRO {toplas} {"ACM Transactions on Programming Languages and Systems"}
+
+MACRO {tcs} {"Theoretical Computer Science"}
+
+READ
+
+% ***********************************************************
+
+FUNCTION {check.for.titlecommand}
+% go through each entry and see if one of them has the key
+% 'TitlesOn'. If this is found, then do titles!
+% 1989 November 18 TDS
+{
+% "|" label "|" * * write$ newline$ % |Arrhenius {\em et~al.}, 1986|
+% "|" cite$ "|" * * write$ newline$ % |Arrhenius1986|
+% so cite$ is the thing I want to detect...
+
+ cite$ "TitlesOn" =
+ { % got it!
+% "FOUND TitlesOn" write$ newline$
+ "Titles Will Be Printed" warning$
+ #1 'givetitles := % give titles!
+ }
+ 'skip$
+ if$
+}
+EXECUTE {init.toggle.switches}
+ITERATE {check.for.titlecommand}
+% ***********************************************************
+
+FUNCTION {sortify}
+{ purify$
+ "l" change.case$
+}
+
+INTEGERS { len }
+
+FUNCTION {chop.word}
+{ 's :=
+ 'len :=
+ s #1 len substring$ =
+ { s len #1 + global.max$ substring$ }
+ 's
+ if$
+}
+
+% There are three apalike cases: one person (Jones),
+% two (Jones and de~Bruijn), and more (Jones et~al.).
+% This function is much like format.crossref.editors.
+%
+FUNCTION {format.lab.names}
+{ 's :=
+ s #1 "{vv~}{ll}" format.name$
+ s num.names$ duplicate$
+ #2 >
+ { pop$ " {\em et~al.}" * }
+ { #2 <
+ 'skip$
+ { s #2 "{ff }{vv }{ll}{ jj}" format.name$ "others" =
+ { " {\em et~al.}" * }
+ { " and " * s #2 "{vv~}{ll}" format.name$ * } % TDS
+% well, back to 'and'!
+% { " \& " * s #2 "{vv~}{ll}" format.name$ * }
+ % note new use of & rather than `and'. TDS
+ if$
+ }
+ if$
+ }
+ if$
+}
+
+FUNCTION {author.key.label}
+{ author empty$
+ { key empty$
+ { cite$ #1 #3 substring$ }
+ 'key % apalike uses the whole key
+ if$
+ }
+ { author format.lab.names }
+ if$
+}
+
+FUNCTION {author.editor.key.label}
+{ author empty$
+ { editor empty$
+ { key empty$
+ { cite$ #1 #3 substring$ }
+ 'key % apalike uses the whole key
+ if$
+ }
+ { editor format.lab.names }
+ if$
+ }
+ { author format.lab.names }
+ if$
+}
+
+FUNCTION {editor.key.label}
+{ editor empty$
+ { key empty$
+ { cite$ #1 #3 substring$ }
+ 'key % apalike uses the whole key, no organization
+ if$
+ }
+ { editor format.lab.names }
+ if$
+}
+
+FUNCTION {calc.label}
+{ type$ "book" =
+ type$ "inbook" =
+ or
+ 'author.editor.key.label
+ { type$ "proceedings" =
+ 'editor.key.label % apalike ignores organization
+ 'author.key.label % for labeling and sorting
+ if$
+ }
+ if$
+ ", " % these three lines are
+ * % for apalike, which
+ year field.or.null purify$ #-1 #4 substring$ % uses all four digits
+ *
+ 'label :=
+}
+
+FUNCTION {sort.format.names}
+{ 's :=
+ #1 'nameptr :=
+ ""
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ { nameptr #1 >
+ { " " * }
+ 'skip$
+ if$ % apalike uses initials
+ s nameptr "{vv{ } }{ll{ }}{ f{ }}{ jj{ }}" format.name$ 't := % <= here
+ nameptr numnames = t "others" = and
+ { "{\em et al}" * }
+ { t sortify * }
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+}
+
+FUNCTION {sort.format.title}
+{ 't :=
+ "A " #2
+ "An " #3
+ "The " #4 t chop.word
+ chop.word
+ chop.word
+ sortify
+ #1 global.max$ substring$
+}
+
+FUNCTION {author.sort}
+{ author empty$
+ { key empty$
+ { "to sort, need author or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { author sort.format.names }
+ if$
+}
+
+FUNCTION {author.editor.sort}
+{ author empty$
+ { editor empty$
+ { key empty$
+ { "to sort, need author, editor, or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { editor sort.format.names }
+ if$
+ }
+ { author sort.format.names }
+ if$
+}
+
+FUNCTION {editor.sort}
+{ editor empty$
+ { key empty$
+ { "to sort, need editor or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { editor sort.format.names }
+ if$
+}
+
+% apalike uses two sorting passes; the first one sets the
+% labels so that the `a's, `b's, etc. can be computed;
+% the second pass puts the references in "correct" order.
+% The presort function is for the first pass. It computes
+% label, sort.label, and title, and then concatenates.
+FUNCTION {presort}
+{ calc.label
+ label sortify
+ " "
+ *
+ type$ "book" =
+ type$ "inbook" =
+ or
+ 'author.editor.sort
+ { type$ "proceedings" =
+ 'editor.sort
+ 'author.sort
+ if$
+ }
+ if$
+ #1 entry.max$ substring$ % for
+ 'sort.label := % apalike
+ sort.label % style
+ *
+ " "
+ *
+ title field.or.null
+ sort.format.title
+ *
+ #1 entry.max$ substring$
+ 'sort.key$ :=
+}
+
+ITERATE {presort}
+
+SORT % by label, sort.label, title---for final label calculation
+
+STRINGS { last.label next.extra } % apalike labels are only for the text;
+
+INTEGERS { last.extra.num } % there are none in the bibliography
+
+FUNCTION {initialize.extra.label.stuff} % and hence there is no `longest.label'
+{ #0 int.to.chr$ 'last.label :=
+ "" 'next.extra :=
+ #0 'last.extra.num :=
+}
+
+FUNCTION {forward.pass}
+% pass through the references forward
+{
+%"\\ label=" label "//" * * write$ newline$ % display the label
+%"\\last.label=" last.label "//" * * write$ newline$ % display the label
+
+ last.label label = % if the label repeats the previous label...
+ { % then increment the extra number
+ last.extra.num #1 + 'last.extra.num :=
+ % and convert it to a label
+ last.extra.num int.to.chr$ 'extra.label :=
+ }
+ { % else set things up for the next entry
+ "a" chr.to.int$ 'last.extra.num :=
+
+ % However, if the year was missing, tack on an extra "a". TDS
+ year empty$
+ {"a" 'extra.label :=}
+ {"" 'extra.label :=}
+ if$
+
+% "" 'extra.label := % the original method was not to do anything TDS
+
+ label 'last.label := % capture this label for next time
+ }
+ if$
+%"\\extra.label = " extra.label "//" * * write$ newline$ % display the label
+}
+
+FUNCTION {reverse.pass}
+% pass through the references backwards
+% add extra characters to the end of the label string
+{
+%"{{" label "}}" * * write$ newline$ % display the label
+ next.extra "b" =
+% original logic:
+ { "a" 'extra.label := }
+ 'skip$
+ if$
+
+% next.extra "b" = { "next.extra was = b" write$ newline$} 'skip$ if$
+
+% new as of 1989 Oct 18
+% { "a" 'extra.label := }
+% { % Put on an "a" at the end of the label if the year is missing. TDS
+% year empty$
+% { "a" 'extra.label := }
+% %{ label "a" * 'label := }
+% 'skip$ % otherwise leave it alone (orignial method)
+% if$ }
+% if$
+
+ label extra.label * 'label :=
+ extra.label 'next.extra :=
+%"{{" label "}}" * * write$ newline$ % display the label
+}
+
+FUNCTION {bib.sort.order}
+% Generate the sort.key$ variables for sorting.
+% The sorting is first on the sort.label (ie, author's name), followed
+% by the year then the title. If there is no year, the cite$ is used.
+{
+ sort.label % this is based on the author name
+ " " * % tack on some space
+% original apa command was to use the year or an empty string:
+% year field.or.null sortify
+%
+% Replace that with the use of the cite$, when there is no year:
+ year duplicate$ empty$
+ {pop$ cite$}
+ 'skip$
+ if$
+
+ * " " * % tack on some space
+
+% I CAN'T STAND SORTING ON TITLE!!! TDS 1989 Dec 5
+% title field.or.null
+% sort.format.title
+% * % attach them together
+ cite$
+ * % use cite$ instead!!
+
+ % note: if there is no year, then the cite$ will override the sorting
+ % on the title. Oh well. Title sorting is sorta (ha ha) awful.
+
+ #1 entry.max$ substring$
+ 'sort.key$ :=
+
+ % The following line helps debug the program. It shows what the sort.key$ is.
+ % "%" sort.key$ * write$ newline$
+}
+
+% Here is the place that the actual executions of the labeling and sorting
+% functions are done.
+
+
+EXECUTE {initialize.extra.label.stuff} % initialize variables
+ITERATE {bib.sort.order} % set up the sorting keys
+SORT % by sort.label, year, title---giving final bibliography order
+% Having sorted NOW we apply the extra letters at the end!
+ITERATE {forward.pass}
+REVERSE {reverse.pass}
+
+FUNCTION {begin.bib}
+{ preamble$ empty$ % no \etalchar in apalike
+ 'skip$
+ { preamble$ write$ newline$ }
+ if$
+ "\begin{thebibliography}{}" write$ newline$ % no labels in apalike
+}
+
+EXECUTE {begin.bib}
+
+EXECUTE {init.state.consts}
+
+ITERATE {call.type$}
+
+FUNCTION {end.bib}
+{ newline$
+ "\end{thebibliography}" write$ newline$
+}
+
+EXECUTE {end.bib}
diff --git a/biblio/bibtex/contrib/misc/jqt1999.bst b/biblio/bibtex/contrib/misc/jqt1999.bst
new file mode 100644
index 0000000000..0953b46c3e
--- /dev/null
+++ b/biblio/bibtex/contrib/misc/jqt1999.bst
@@ -0,0 +1,1142 @@
+%NAME: jqt1999.bst
+% adapted from 'apalike' bibliography style to work for
+% The Journal of Quality Technology
+%
+% I use it with natbib.sty, but it works with apalike.sty
+%
+% Dave Forrest, drf5n@virginia.edu, 2 June 1999
+% http://www.people.virginia.edu/~drf5n/
+% you can get this file for a limited time from:
+% http://www.people.virginia.edu/~drf5n/extras/jqt1999.bst
+% but I think it belongs at:
+% ftp://www.ctan.org/ctan/biblio/bibtex/contrib/jqt1999.bst
+%
+% Changes: (marked with 'drf5n')
+% Pages marked with ", pp. " instead of ":"
+% Multiple authors separated with semicolons instead of commas
+% Article titles quoted
+% Article titles not lowercased
+%
+% Bugs:
+% page marking insensitive to single pages
+%
+% My thanks to :
+% Oren Pataschnik's February 8 1998 "Designing BibTeX styles" from:
+% ftp://ftp.cdrom.com/pub/tex/ctan/bibliography/bibtex/distribs/doc/btxhak.tex
+% Patrick W. Daly's 1996/07/03 natbib v6.3 from:
+% ftp://ftp.cdrom.com/pub/tex/ctan/macros/latex2e/contrib/supported/natbib/
+%
+% This was modified from:
+%
+% BibTeX `apalike' bibliography style (24-Jan-88 version)
+% Adapted from the `alpha' style, version 0.99a; for BibTeX version 0.99a.
+% Copyright (C) 1988, all rights reserved.
+% Copying of this file is allowed, provided that if you make any changes at all
+% you name it something other than `apalike.bst'.
+% This restriction helps ensure that all copies are identical.
+% Differences between this style and `alpha' are generally heralded by a `%'.
+% The file btxbst.doc has the documentation for alpha.bst.
+%
+% This style should be used with the `apalike' LaTeX style (apalike.sty).
+% \cite's come out like "(Jones, 1986)" in the text but there are no labels
+% in the bibliography, and something like "(1986)" comes out immediately
+% after the author. Author (and editor) names appear as last name, comma,
+% initials. A `year' field is required for every entry, and so is either
+% an author (or in some cases, an editor) field or a key field.
+%
+% Editorial note:
+% Many journals require a style like `apalike', but I strongly, strongly,
+% strongly recommend that you not use it if you have a choice---use something
+% like `plain' instead. Mary-Claire van Leunen (A Handbook for Scholars,
+% Knopf, 1979) argues convincingly that a style like `plain' encourages better
+% writing than one like `apalike'. Furthermore the strongest arguments for
+% using an author-date style like `apalike'---that it's "the most practical"
+% (The Chicago Manual of Style, University of Chicago Press, thirteenth
+% edition, 1982, pages 400--401)---fall flat on their face with the new
+% computer-typesetting technology. For instance page 401 anachronistically
+% states "The chief disadvantage of [a style like `plain'] is that additions
+% or deletions cannot be made after the manuscript is typed without changing
+% numbers in both text references and list." LaTeX sidesteps the disadvantage.
+%
+% History:
+% 15-sep-86 (SK,OP) Original version, by Susan King and Oren Patashnik.
+% 10-nov-86 (OP) Truncated the sort.key$ string to the correct length
+% in bib.sort.order to eliminate error message.
+% 24-jan-88 (OP) Updated for BibTeX version 0.99a, from alpha.bst 0.99a;
+% apalike now sorts by author, then year, then title;
+% THIS `apalike' VERSION DOES NOT WORK WITH BIBTEX 0.98i.
+
+ENTRY
+ { address
+ author
+ booktitle
+ chapter
+ edition
+ editor
+ howpublished
+ institution
+ journal
+ key
+% month not used in apalike
+ note
+ number
+ organization
+ pages
+ publisher
+ school
+ series
+ title
+ type
+ volume
+ year
+ }
+ {}
+ { label extra.label sort.label }
+
+INTEGERS { output.state before.all mid.sentence after.sentence after.block }
+
+FUNCTION {init.state.consts}
+{ #0 'before.all :=
+ #1 'mid.sentence :=
+ #2 'after.sentence :=
+ #3 'after.block :=
+}
+
+STRINGS { s t }
+
+FUNCTION {output.nonnull}
+{ 's :=
+ output.state mid.sentence =
+ { ", " * write$ }
+ { output.state after.block =
+ { add.period$ write$
+ newline$
+ "\newblock " write$
+ }
+ { output.state before.all =
+ 'write$
+ { add.period$ " " * write$ }
+ if$
+ }
+ if$
+ mid.sentence 'output.state :=
+ }
+ if$
+ s
+}
+
+FUNCTION {output}
+{ duplicate$ empty$
+ 'pop$
+ 'output.nonnull
+ if$
+}
+
+FUNCTION {output.check}
+{ 't :=
+ duplicate$ empty$
+ { pop$ "empty " t * " in " * cite$ * warning$ }
+ 'output.nonnull
+ if$
+}
+
+% apalike needs this function because
+% the year has special punctuation;
+% apalike ignores the month
+FUNCTION {output.year.check}
+{ year empty$
+ { "empty year in " cite$ * warning$ }
+ { write$
+ " (" year * extra.label * ")" *
+ mid.sentence 'output.state :=
+ }
+ if$
+}
+
+FUNCTION {output.bibitem}
+{ newline$
+ "\bibitem[" write$
+ label write$
+ "]{" write$
+ cite$ write$
+ "}" write$
+ newline$
+ ""
+ before.all 'output.state :=
+}
+
+FUNCTION {fin.entry}
+{ add.period$
+ write$
+ newline$
+}
+
+FUNCTION {new.block}
+{ output.state before.all =
+ 'skip$
+ { after.block 'output.state := }
+ if$
+}
+
+FUNCTION {new.sentence}
+{ output.state after.block =
+ 'skip$
+ { output.state before.all =
+ 'skip$
+ { after.sentence 'output.state := }
+ if$
+ }
+ if$
+}
+
+FUNCTION {not}
+{ { #0 }
+ { #1 }
+ if$
+}
+
+FUNCTION {and}
+{ 'skip$
+ { pop$ #0 }
+ if$
+}
+
+FUNCTION {or}
+{ { pop$ #1 }
+ 'skip$
+ if$
+}
+
+FUNCTION {new.block.checkb}
+{ empty$
+ swap$ empty$
+ and
+ 'skip$
+ 'new.block
+ if$
+}
+
+FUNCTION {field.or.null}
+{ duplicate$ empty$
+ { pop$ "" }
+ 'skip$
+ if$
+}
+
+FUNCTION {emphasize}
+{ duplicate$ empty$
+ { pop$ "" }
+ { "{\em " swap$ * "}" * }
+ if$
+}
+
+INTEGERS { nameptr namesleft numnames }
+
+FUNCTION {format.names}
+{ 's :=
+ #1 'nameptr :=
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ { s nameptr "{vv~}{ll}{, jj}{, f.}" format.name$ 't := % last name first
+ nameptr #1 >
+ { namesleft #1 >
+% drf5n { ", " * t * }
+ { "; " * t * } %%% drf5n
+ { numnames #2 >
+% drf5n { "," * }
+ { ";" * } %%% drf5n
+ 'skip$
+ if$
+ t "others" =
+ { " et~al." * }
+ { " and " * t * }
+ if$
+ }
+ if$
+ }
+ 't
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+}
+
+FUNCTION {format.authors}
+{ author empty$
+ { "" }
+ { author format.names }
+ if$
+}
+
+FUNCTION {format.key} % this function is just for apalike
+{ empty$
+ { key field.or.null }
+ { "" }
+ if$
+}
+
+FUNCTION {format.editors}
+{ editor empty$
+ { "" }
+ { editor format.names
+ editor num.names$ #1 >
+ { ", editors" * }
+ { ", editor" * }
+ if$
+ }
+ if$
+}
+
+%FUNCTION {format.title} %%% drf5n
+%{ title empty$
+% { "" }
+% { title "t" change.case$ }
+% if$
+%}
+
+FUNCTION {format.title} % put quotes around a title, if it exists
+{ title empty$
+ { "" }
+ { "''" title "''" * * } % put on the quotes, and don't change it
+ if$
+}
+
+
+FUNCTION {n.dashify}
+{ 't :=
+ ""
+ { t empty$ not }
+ { t #1 #1 substring$ "-" =
+ { t #1 #2 substring$ "--" = not
+ { "--" *
+ t #2 global.max$ substring$ 't :=
+ }
+ { { t #1 #1 substring$ "-" = }
+ { "-" *
+ t #2 global.max$ substring$ 't :=
+ }
+ while$
+ }
+ if$
+ }
+ { t #1 #1 substring$ *
+ t #2 global.max$ substring$ 't :=
+ }
+ if$
+ }
+ while$
+}
+
+FUNCTION {format.btitle}
+{ title emphasize
+}
+
+FUNCTION {tie.or.space.connect}
+{ duplicate$ text.length$ #3 <
+ { "~" }
+ { " " }
+ if$
+ swap$ * *
+}
+
+FUNCTION {either.or.check}
+{ empty$
+ 'pop$
+ { "can't use both " swap$ * " fields in " * cite$ * warning$ }
+ if$
+}
+
+FUNCTION {format.bvolume}
+{ volume empty$
+ { "" }
+ { "volume" volume tie.or.space.connect
+ series empty$
+ 'skip$
+ { " of " * series emphasize * }
+ if$
+ "volume and number" number either.or.check
+ }
+ if$
+}
+
+FUNCTION {format.number.series}
+{ volume empty$
+ { number empty$
+ { series field.or.null }
+ { output.state mid.sentence =
+ { "number" }
+ { "Number" }
+ if$
+ number tie.or.space.connect
+ series empty$
+ { "there's a number but no series in " cite$ * warning$ }
+ { " in " * series * }
+ if$
+ }
+ if$
+ }
+ { "" }
+ if$
+}
+
+FUNCTION {format.edition}
+{ edition empty$
+ { "" }
+ { output.state mid.sentence =
+ { edition "l" change.case$ " edition" * }
+ { edition "t" change.case$ " edition" * }
+ if$
+ }
+ if$
+}
+
+INTEGERS { multiresult }
+
+FUNCTION {multi.page.check}
+{ 't :=
+ #0 'multiresult :=
+ { multiresult not
+ t empty$ not
+ and
+ }
+ { t #1 #1 substring$
+ duplicate$ "-" =
+ swap$ duplicate$ "," =
+ swap$ "+" =
+ or or
+ { #1 'multiresult := }
+ { t #2 global.max$ substring$ 't := }
+ if$
+ }
+ while$
+ multiresult
+}
+
+FUNCTION {format.pages}
+{ pages empty$
+ { "" }
+ { pages multi.page.check
+ { "pages" pages n.dashify tie.or.space.connect }
+ { "page" pages tie.or.space.connect }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.vol.num.pages}
+{ volume field.or.null
+ number empty$
+ 'skip$
+ { "(" number * ")" * *
+ volume empty$
+ { "there's a number but no volume in " cite$ * warning$ }
+ 'skip$
+ if$
+ }
+ if$
+ pages empty$
+ 'skip$
+ { duplicate$ empty$
+ { pop$ format.pages }
+% drf5n { ":" * pages n.dashify * } %%% drf5n
+ { ", pp. " * pages n.dashify * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.chapter.pages}
+{ chapter empty$
+ 'format.pages
+ { type empty$
+ { "chapter" }
+ { type "l" change.case$ }
+ if$
+ chapter tie.or.space.connect
+ pages empty$
+ 'skip$
+ { ", " * format.pages * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.in.ed.booktitle}
+{ booktitle empty$
+ { "" }
+ { editor empty$
+ { "In " booktitle emphasize * }
+ { "In " format.editors * ", " * booktitle emphasize * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.thesis.type}
+{ type empty$
+ 'skip$
+ { pop$
+ type "t" change.case$
+ }
+ if$
+}
+
+FUNCTION {format.tr.number}
+{ type empty$
+ { "Technical Report" }
+ 'type
+ if$
+ number empty$
+ { "t" change.case$ }
+ { number tie.or.space.connect }
+ if$
+}
+
+FUNCTION {format.article.crossref}
+{ "In" % this is for apalike
+ " \cite{" * crossref * "}" *
+}
+
+FUNCTION {format.book.crossref}
+{ volume empty$
+ { "empty volume in " cite$ * "'s crossref of " * crossref * warning$
+ "In "
+ }
+ { "Volume" volume tie.or.space.connect
+ " of " *
+ }
+ if$
+ "\cite{" * crossref * "}" * % this is for apalike
+}
+
+FUNCTION {format.incoll.inproc.crossref}
+{ "In" % this is for apalike
+ " \cite{" * crossref * "}" *
+}
+
+FUNCTION {article}
+{ output.bibitem
+ format.authors "author" output.check
+ author format.key output % special for
+ output.year.check % apalike
+ new.block
+ format.title "title" output.check
+ new.block
+ crossref missing$
+ { journal emphasize "journal" output.check
+ format.vol.num.pages output
+ }
+ { format.article.crossref output.nonnull
+ format.pages output
+ }
+ if$
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {book}
+{ output.bibitem
+ author empty$
+ { format.editors "author and editor" output.check
+ editor format.key output
+ }
+ { format.authors output.nonnull
+ crossref missing$
+ { "author and editor" editor either.or.check }
+ 'skip$
+ if$
+ }
+ if$
+ output.year.check % special for apalike
+ new.block
+ format.btitle "title" output.check
+ crossref missing$
+ { format.bvolume output
+ new.block
+ format.number.series output
+ new.sentence
+ publisher "publisher" output.check
+ address output
+ }
+ { new.block
+ format.book.crossref output.nonnull
+ }
+ if$
+ format.edition output
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {booklet}
+{ output.bibitem
+ format.authors output
+ author format.key output % special for
+ output.year.check % apalike
+ new.block
+ format.title "title" output.check
+ new.block
+ howpublished output
+ address output
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {inbook}
+{ output.bibitem
+ author empty$
+ { format.editors "author and editor" output.check
+ editor format.key output
+ }
+ { format.authors output.nonnull
+ crossref missing$
+ { "author and editor" editor either.or.check }
+ 'skip$
+ if$
+ }
+ if$
+ output.year.check % special for apalike
+ new.block
+ format.btitle "title" output.check
+ crossref missing$
+ { format.bvolume output
+ format.chapter.pages "chapter and pages" output.check
+ new.block
+ format.number.series output
+ new.sentence
+ publisher "publisher" output.check
+ address output
+ }
+ { format.chapter.pages "chapter and pages" output.check
+ new.block
+ format.book.crossref output.nonnull
+ }
+ if$
+ format.edition output
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {incollection}
+{ output.bibitem
+ format.authors "author" output.check
+ author format.key output % special for
+ output.year.check % apalike
+ new.block
+ format.title "title" output.check
+ new.block
+ crossref missing$
+ { format.in.ed.booktitle "booktitle" output.check
+ format.bvolume output
+ format.number.series output
+ format.chapter.pages output
+ new.sentence
+ publisher "publisher" output.check
+ address output
+ format.edition output
+ }
+ { format.incoll.inproc.crossref output.nonnull
+ format.chapter.pages output
+ }
+ if$
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {inproceedings}
+{ output.bibitem
+ format.authors "author" output.check
+ author format.key output % special for
+ output.year.check % apalike
+ new.block
+ format.title "title" output.check
+ new.block
+ crossref missing$
+ { format.in.ed.booktitle "booktitle" output.check
+ format.bvolume output
+ format.number.series output
+ format.pages output
+ address output % for apalike
+ new.sentence % there's no year
+ organization output % here so things
+ publisher output % are simpler
+ }
+ { format.incoll.inproc.crossref output.nonnull
+ format.pages output
+ }
+ if$
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {conference} { inproceedings }
+
+FUNCTION {manual}
+{ output.bibitem
+ format.authors output
+ author format.key output % special for
+ output.year.check % apalike
+ new.block
+ format.btitle "title" output.check
+ organization address new.block.checkb
+ organization output
+ address output
+ format.edition output
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {mastersthesis}
+{ output.bibitem
+ format.authors "author" output.check
+ author format.key output % special for
+ output.year.check % apalike
+ new.block
+ format.title "title" output.check
+ new.block
+ "Master's thesis" format.thesis.type output.nonnull
+ school "school" output.check
+ address output
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {misc}
+{ output.bibitem
+ format.authors output
+ author format.key output % special for
+ output.year.check % apalike
+ new.block
+ format.title output
+ new.block
+ howpublished output
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {phdthesis}
+{ output.bibitem
+ format.authors "author" output.check
+ author format.key output % special for
+ output.year.check % apalike
+ new.block
+ format.btitle "title" output.check
+ new.block
+ "PhD thesis" format.thesis.type output.nonnull
+ school "school" output.check
+ address output
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {proceedings}
+{ output.bibitem
+ format.editors output
+ editor format.key output % special for
+ output.year.check % apalike
+ new.block
+ format.btitle "title" output.check
+ format.bvolume output
+ format.number.series output
+ address output % for apalike
+ new.sentence % we always output
+ organization output % a nonempty organization
+ publisher output % here
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {techreport}
+{ output.bibitem
+ format.authors "author" output.check
+ author format.key output % special for
+ output.year.check % apalike
+ new.block
+ format.title "title" output.check
+ new.block
+ format.tr.number output.nonnull
+ institution "institution" output.check
+ address output
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {unpublished}
+{ output.bibitem
+ format.authors "author" output.check
+ author format.key output % special for
+ output.year.check % apalike
+ new.block
+ format.title "title" output.check
+ new.block
+ note "note" output.check
+ fin.entry
+}
+
+FUNCTION {default.type} { misc }
+
+MACRO {jan} {"January"}
+
+MACRO {feb} {"February"}
+
+MACRO {mar} {"March"}
+
+MACRO {apr} {"April"}
+
+MACRO {may} {"May"}
+
+MACRO {jun} {"June"}
+
+MACRO {jul} {"July"}
+
+MACRO {aug} {"August"}
+
+MACRO {sep} {"September"}
+
+MACRO {oct} {"October"}
+
+MACRO {nov} {"November"}
+
+MACRO {dec} {"December"}
+
+MACRO {acmcs} {"ACM Computing Surveys"}
+
+MACRO {acta} {"Acta Informatica"}
+
+MACRO {cacm} {"Communications of the ACM"}
+
+MACRO {ibmjrd} {"IBM Journal of Research and Development"}
+
+MACRO {ibmsj} {"IBM Systems Journal"}
+
+MACRO {ieeese} {"IEEE Transactions on Software Engineering"}
+
+MACRO {ieeetc} {"IEEE Transactions on Computers"}
+
+MACRO {ieeetcad}
+ {"IEEE Transactions on Computer-Aided Design of Integrated Circuits"}
+
+MACRO {ipl} {"Information Processing Letters"}
+
+MACRO {jacm} {"Journal of the ACM"}
+
+MACRO {jcss} {"Journal of Computer and System Sciences"}
+
+MACRO {scp} {"Science of Computer Programming"}
+
+MACRO {sicomp} {"SIAM Journal on Computing"}
+
+MACRO {tocs} {"ACM Transactions on Computer Systems"}
+
+MACRO {tods} {"ACM Transactions on Database Systems"}
+
+MACRO {tog} {"ACM Transactions on Graphics"}
+
+MACRO {toms} {"ACM Transactions on Mathematical Software"}
+
+MACRO {toois} {"ACM Transactions on Office Information Systems"}
+
+MACRO {toplas} {"ACM Transactions on Programming Languages and Systems"}
+
+MACRO {tcs} {"Theoretical Computer Science"}
+
+READ
+
+FUNCTION {sortify}
+{ purify$
+ "l" change.case$
+}
+
+INTEGERS { len }
+
+FUNCTION {chop.word}
+{ 's :=
+ 'len :=
+ s #1 len substring$ =
+ { s len #1 + global.max$ substring$ }
+ 's
+ if$
+}
+
+% There are three apalike cases: one person (Jones),
+% two (Jones and de~Bruijn), and more (Jones et~al.).
+% This function is much like format.crossref.editors.
+%
+FUNCTION {format.lab.names}
+{ 's :=
+ s #1 "{vv~}{ll}" format.name$
+ s num.names$ duplicate$
+ #2 >
+ { pop$ " et~al." * }
+ { #2 <
+ 'skip$
+ { s #2 "{ff }{vv }{ll}{ jj}" format.name$ "others" =
+ { " et~al." * }
+ { " and " * s #2 "{vv~}{ll}" format.name$ * }
+ if$
+ }
+ if$
+ }
+ if$
+}
+
+FUNCTION {author.key.label}
+{ author empty$
+ { key empty$
+ { cite$ #1 #3 substring$ }
+ 'key % apalike uses the whole key
+ if$
+ }
+ { author format.lab.names }
+ if$
+}
+
+FUNCTION {author.editor.key.label}
+{ author empty$
+ { editor empty$
+ { key empty$
+ { cite$ #1 #3 substring$ }
+ 'key % apalike uses the whole key
+ if$
+ }
+ { editor format.lab.names }
+ if$
+ }
+ { author format.lab.names }
+ if$
+}
+
+FUNCTION {editor.key.label}
+{ editor empty$
+ { key empty$
+ { cite$ #1 #3 substring$ }
+ 'key % apalike uses the whole key, no organization
+ if$
+ }
+ { editor format.lab.names }
+ if$
+}
+
+FUNCTION {calc.label}
+{ type$ "book" =
+ type$ "inbook" =
+ or
+ 'author.editor.key.label
+ { type$ "proceedings" =
+ 'editor.key.label % apalike ignores organization
+ 'author.key.label % for labeling and sorting
+ if$
+ }
+ if$
+ ", " % these three lines are
+ * % for apalike, which
+ year field.or.null purify$ #-1 #4 substring$ % uses all four digits
+ *
+ 'label :=
+}
+
+FUNCTION {sort.format.names}
+{ 's :=
+ #1 'nameptr :=
+ ""
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ { nameptr #1 >
+ { " " * }
+ 'skip$
+ if$ % apalike uses initials
+ s nameptr "{vv{ } }{ll{ }}{ f{ }}{ jj{ }}" format.name$ 't := % <= here
+ nameptr numnames = t "others" = and
+ { "et al" * }
+ { t sortify * }
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+}
+
+FUNCTION {sort.format.title}
+{ 't :=
+ "A " #2
+ "An " #3
+ "The " #4 t chop.word
+ chop.word
+ chop.word
+ sortify
+ #1 global.max$ substring$
+}
+
+FUNCTION {author.sort}
+{ author empty$
+ { key empty$
+ { "to sort, need author or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { author sort.format.names }
+ if$
+}
+
+FUNCTION {author.editor.sort}
+{ author empty$
+ { editor empty$
+ { key empty$
+ { "to sort, need author, editor, or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { editor sort.format.names }
+ if$
+ }
+ { author sort.format.names }
+ if$
+}
+
+FUNCTION {editor.sort}
+{ editor empty$
+ { key empty$
+ { "to sort, need editor or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { editor sort.format.names }
+ if$
+}
+
+% apalike uses two sorting passes; the first one sets the
+% labels so that the `a's, `b's, etc. can be computed;
+% the second pass puts the references in "correct" order.
+% The presort function is for the first pass. It computes
+% label, sort.label, and title, and then concatenates.
+FUNCTION {presort}
+{ calc.label
+ label sortify
+ " "
+ *
+ type$ "book" =
+ type$ "inbook" =
+ or
+ 'author.editor.sort
+ { type$ "proceedings" =
+ 'editor.sort
+ 'author.sort
+ if$
+ }
+ if$
+ #1 entry.max$ substring$ % for
+ 'sort.label := % apalike
+ sort.label % style
+ *
+ " "
+ *
+ title field.or.null
+ sort.format.title
+ *
+ #1 entry.max$ substring$
+ 'sort.key$ :=
+}
+
+ITERATE {presort}
+
+SORT % by label, sort.label, title---for final label calculation
+
+STRINGS { last.label next.extra } % apalike labels are only for the text;
+
+INTEGERS { last.extra.num } % there are none in the bibliography
+
+FUNCTION {initialize.extra.label.stuff} % and hence there is no `longest.label'
+{ #0 int.to.chr$ 'last.label :=
+ "" 'next.extra :=
+ #0 'last.extra.num :=
+}
+
+FUNCTION {forward.pass}
+{ last.label label =
+ { last.extra.num #1 + 'last.extra.num :=
+ last.extra.num int.to.chr$ 'extra.label :=
+ }
+ { "a" chr.to.int$ 'last.extra.num :=
+ "" 'extra.label :=
+ label 'last.label :=
+ }
+ if$
+}
+
+FUNCTION {reverse.pass}
+{ next.extra "b" =
+ { "a" 'extra.label := }
+ 'skip$
+ if$
+ label extra.label * 'label :=
+ extra.label 'next.extra :=
+}
+
+EXECUTE {initialize.extra.label.stuff}
+
+ITERATE {forward.pass}
+
+REVERSE {reverse.pass}
+
+% Now that the label is right we sort for real,
+% on sort.label then year then title. This is
+% for the second sorting pass.
+FUNCTION {bib.sort.order}
+{ sort.label
+ " "
+ *
+ year field.or.null sortify
+ *
+ " "
+ *
+ title field.or.null
+ sort.format.title
+ *
+ #1 entry.max$ substring$
+ 'sort.key$ :=
+}
+
+ITERATE {bib.sort.order}
+
+SORT % by sort.label, year, title---giving final bibliography order
+
+FUNCTION {begin.bib}
+{ preamble$ empty$ % no \etalchar in apalike
+ 'skip$
+ { preamble$ write$ newline$ }
+ if$
+ "\begin{thebibliography}{}" write$ newline$ % no labels in apalike
+}
+
+EXECUTE {begin.bib}
+
+EXECUTE {init.state.consts}
+
+ITERATE {call.type$}
+
+FUNCTION {end.bib}
+{ newline$
+ "\end{thebibliography}" write$ newline$
+}
+
+EXECUTE {end.bib}
diff --git a/biblio/bibtex/contrib/misc/jtb.bst b/biblio/bibtex/contrib/misc/jtb.bst
new file mode 100644
index 0000000000..20abbcc2f9
--- /dev/null
+++ b/biblio/bibtex/contrib/misc/jtb.bst
@@ -0,0 +1,1202 @@
+%%% ====================================================================
+%%% @BibTeX-style-file{
+%%% author = "Alan Rogers",
+%%% version = "1.1",
+%%% date = "1990",
+%%% filename = "humanbio.bst",
+%%% address = "Dept of Anthropology, University of Utah,
+%%% Salt Lake City, UT 84112",
+%%% checksum = "29497 1202 3234 26025",
+%%% email = "rogers@anthro.utah.edu",
+%%% supported = "no",
+%%% docstring = "The file produces bibliographies more or
+%%% less in the format of the Journal of
+%%% Theoretical Biology. It was adapted from
+%%% Sake J. Hogeveen's `astron.bst'.
+%%%
+%%% Usage: \documentstyle[astron]{...}
+%%% ...
+%%% \bibliographystyle{jtb}
+%%% ...
+%%%
+%%% The \documentstyle command above invokes
+%%% Hogeveen's `astron.sty', which must be in
+%%% TeX's search path.
+%%%
+%%% The modifications implement `\cite*{}',
+%%% which generates references in short form.
+%%% For example, `Rogers \cite*{...}' would
+%%% produce `Rogers (1992)'."
+%%% }
+%%% ====================================================================
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% Copyright (C) 1990 Sake J. Hogeveen.
+
+% This is ASTRON.BST, a BibTeX style for use with BibTeX version 0.99c.
+% ASTRON.BST has to be used in conjunction with the LaTeX style ASTRON.STY.
+% The use of both styles is documented in ASTDOC.TEX.
+
+% ASTRON.BST is an adaptation of APALIKE.BST by Oren Patashnik and Suzan King.
+
+% This style produces citations in the `author-year' format, which is widely
+% used among astronomical journals.
+% It supports two forms of citation: the \cite command produces: (Author, year)
+% in the text; the \cite* command only: (year) .
+
+% The long an short citation trickery is adapted from NAMED.BST by
+% Peter F. Patel-Schneider.
+
+% Copyright Notice:
+% The files ASTRON.BST, ASTRON.STY, ASTDOC.TEX, ASTDOC.BIB, EXAMPLE.TEX,
+% EXAMPLE.BIB, MNEMONIC.BIB, and TEMPLATE.BIB are a package.
+% You may copy and distribute them freely for non-commercial purposes,
+% provided that you keep the package together and this copyright notice
+% in tact.
+% You may not alter or modify the files; this helps to ensure that all
+% distributions of ASTRON.BST and related files are the same.
+% If you make any modifications, then you must give the files new names,
+% other than the present.
+% The author bears no responsibilities for errors in this document or
+% the software it describes; and shall not be held liable for any indirect,
+% incidental, or consequential damages.
+
+ENTRY
+ { address
+ author
+ booktitle
+ chapter
+ edition
+ editor
+ howpublished
+ institution
+ journal
+ key
+% month not used in apalike
+ note
+ number
+ organization
+ pages
+ publisher
+ school
+ series
+ title
+ type
+ volume
+ year
+ }
+ {}
+ { label extra.label sort.label }
+
+INTEGERS { output.state before.all mid.sentence after.sentence after.block }
+
+FUNCTION {init.state.consts}
+{ #0 'before.all :=
+ #1 'mid.sentence :=
+ #2 'after.sentence :=
+ #3 'after.block :=
+}
+
+STRINGS { s t }
+
+FUNCTION {output.nonnull}
+{ 's :=
+ output.state mid.sentence =
+ { ", " * write$ }
+ { output.state after.block =
+ { ", " * write$
+ newline$
+ "\newblock " write$
+ }
+ { output.state before.all =
+ 'write$
+ { ", " * write$ }
+ if$
+ }
+ if$
+ mid.sentence 'output.state :=
+ }
+ if$
+ s
+}
+
+FUNCTION {output.nonnull.extra}
+{ 's :=
+ output.state mid.sentence =
+ { " " * write$ }
+ { output.state after.block =
+ { ", " * write$
+ newline$
+ "\newblock " write$
+ }
+ { output.state before.all =
+ 'write$
+ { ", " * write$ }
+ if$
+ }
+ if$
+ mid.sentence 'output.state :=
+ }
+ if$
+ s
+}
+
+FUNCTION {output}
+{ duplicate$ empty$
+ 'pop$
+ 'output.nonnull
+ if$
+}
+
+FUNCTION {output.extra}
+{ duplicate$ empty$
+ 'pop$
+ 'output.nonnull.extra
+ if$
+}
+
+FUNCTION {output.check}
+{ 't :=
+ duplicate$ empty$
+ { pop$ "empty " t * " in " * cite$ * warning$ }
+ 'output.nonnull
+ if$
+}
+
+FUNCTION {output.check.extra}
+{ 't :=
+ duplicate$ empty$
+ { pop$ "empty " t * " in " * cite$ * warning$ }
+ 'output.nonnull.extra
+ if$
+}
+
+% apalike needs this function because
+% the year has special punctuation;
+% apalike ignores the month
+FUNCTION {output.year.check}
+{ year empty$
+ { "empty year in " cite$ * warning$ }
+ { write$
+ " (" year * extra.label * ") " *
+ mid.sentence 'output.state :=
+ }
+ if$
+}
+
+FUNCTION {output.bibitem}
+{ newline$
+ "\bibitem[" write$
+ label write$
+ "]{" write$
+ cite$ write$
+ "}" write$
+ newline$
+ ""
+ before.all 'output.state :=
+}
+
+FUNCTION {fin.entry}
+{ write$
+ newline$
+}
+
+FUNCTION {new.block}
+{ output.state before.all =
+ 'skip$
+ { after.block 'output.state := }
+ if$
+}
+
+FUNCTION {new.sentence}
+{ output.state after.block =
+ 'skip$
+ { output.state before.all =
+ 'skip$
+ { after.sentence 'output.state := }
+ if$
+ }
+ if$
+}
+
+FUNCTION {not}
+{ { #0 }
+ { #1 }
+ if$
+}
+
+FUNCTION {and}
+{ 'skip$
+ { pop$ #0 }
+ if$
+}
+
+FUNCTION {or}
+{ { pop$ #1 }
+ 'skip$
+ if$
+}
+
+FUNCTION {new.block.checkb}
+{ empty$
+ swap$ empty$
+ and
+ 'skip$
+ 'new.block
+ if$
+}
+
+FUNCTION {field.or.null}
+{ duplicate$ empty$
+ { pop$ "" }
+ 'skip$
+ if$
+}
+
+FUNCTION {boldface}
+{ duplicate$ empty$
+ { pop$ "" }
+ { "{\bf " swap$ * "}" * }
+ if$
+}
+
+FUNCTION {emphasize}
+{ duplicate$ empty$
+ { pop$ "" }
+ { "{\em " swap$ * "}" * }
+ if$
+}
+
+INTEGERS { nameptr namesleft numnames }
+
+FUNCTION {format.names}
+{ 's :=
+ #1 'nameptr :=
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ { s nameptr "{vv~}{ll}{, jj}{, f.}" format.name$ 't := % last name first
+ nameptr #1 >
+ { namesleft #1 >
+ { ", " * t * }
+ { numnames #2 >
+ { "," * }
+ 'skip$
+ if$
+ t "others" =
+ { " et~al." * }
+ { " and " * t * }
+ if$
+ }
+ if$
+ }
+ 't
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+}
+
+FUNCTION {format.ed.names}
+{ 's :=
+ #1 'nameptr :=
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ { s nameptr "{f. }{vv~}{ll}{, jj}" format.name$ 't :=
+ nameptr #1 >
+ { namesleft #1 >
+ { ", " * t * }
+ { numnames #2 >
+ { "," * }
+ 'skip$
+ if$
+ t "others" =
+ { " et~al." * }
+ { " and " * t * }
+ if$
+ }
+ if$
+ }
+ 't
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+}
+
+FUNCTION {format.authors}
+{ author empty$
+ { "" }
+ { author format.names }
+ if$
+}
+
+FUNCTION {format.key} % this function is just for apalike
+{ empty$
+ { key field.or.null }
+ { "" }
+ if$
+}
+
+FUNCTION {format.editors}
+{ editor empty$
+ { "" }
+ {" (" * editor format.names
+ editor num.names$ #1 >
+ { " eds.)" * }
+ { " ed.)" * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.editors.extra}
+{ editor empty$
+ { "" }
+ {" (" * editor format.ed.names
+ editor num.names$ #1 >
+ { " eds.)" * }
+ { " ed.)" * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.title}
+{ title empty$
+ { "" }
+ { title "t" change.case$ }
+ if$
+}
+
+FUNCTION {n.dashify}
+{ 't :=
+ ""
+ { t empty$ not }
+ { t #1 #1 substring$ "-" =
+ { t #1 #2 substring$ "--" = not
+ { "--" *
+ t #2 global.max$ substring$ 't :=
+ }
+ { { t #1 #1 substring$ "-" = }
+ { "-" *
+ t #2 global.max$ substring$ 't :=
+ }
+ while$
+ }
+ if$
+ }
+ { t #1 #1 substring$ *
+ t #2 global.max$ substring$ 't :=
+ }
+ if$
+ }
+ while$
+}
+
+FUNCTION {first.page.number}
+{ 't :=
+ ""
+ { t "" =
+ { #0 }
+ { t #1 #1 substring$ "-" = not }
+ if$
+ }
+ { t #1 #1 substring$ *
+ t #2 global.max$ substring$ 't :=
+ }
+ while$
+}
+
+FUNCTION {format.btitle}
+{ title emphasize
+}
+
+FUNCTION {tie.or.space.connect}
+{ duplicate$ text.length$ #3 <
+ { "~" }
+ { " " }
+ if$
+ swap$ * *
+}
+
+FUNCTION {either.or.check}
+{ empty$
+ 'pop$
+ { "can't use both " swap$ * " fields in " * cite$ * warning$ }
+ if$
+}
+
+FUNCTION {format.bvolume}
+{ volume empty$
+ { "" }
+ { "Vol." volume tie.or.space.connect
+ series empty$
+ 'skip$
+ { " of " * series emphasize * }
+ if$
+ "volume and number" number either.or.check
+ }
+ if$
+}
+
+FUNCTION {format.number.series}
+{ volume empty$
+ { number empty$
+ { series field.or.null }
+ { output.state mid.sentence =
+ { "No." }
+ { "No." }
+ if$
+ number tie.or.space.connect
+ series empty$
+ { "there's a number but no series in " cite$ * warning$ }
+ { " in " * series * }
+ if$
+ }
+ if$
+ }
+ { "" }
+ if$
+}
+
+FUNCTION {format.edition}
+{ edition empty$
+ { "" }
+ { output.state mid.sentence =
+ { edition "l" change.case$ " edition" * }
+ { edition "t" change.case$ " edition" * }
+ if$
+ }
+ if$
+}
+
+INTEGERS { multiresult }
+
+FUNCTION {multi.page.check}
+{ 't :=
+ #0 'multiresult :=
+ { multiresult not
+ t empty$ not
+ and
+ }
+ { t #1 #1 substring$
+ duplicate$ "-" =
+ swap$ duplicate$ "," =
+ swap$ "+" =
+ or or
+ { #1 'multiresult := }
+ { t #2 global.max$ substring$ 't := }
+ if$
+ }
+ while$
+ multiresult
+}
+
+FUNCTION {format.pages}
+{ pages empty$
+ { "" }
+ { pages multi.page.check
+ { "pp." pages n.dashify tie.or.space.connect }
+ { "p." pages tie.or.space.connect }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.page}
+{ pages empty$
+ { "" }
+ { "p.~" pages first.page.number * }
+ if$
+}
+
+FUNCTION {format.vol.num.pages}
+{ volume field.or.null
+ number empty$
+ 'skip$
+ { "(" number * ")" * *
+ volume empty$
+ { "there's a number but no volume in " cite$ * warning$ }
+ 'skip$
+ if$
+ }
+ if$
+ pages empty$
+ 'skip$
+ { duplicate$ empty$
+ { pop$ format.pages }
+ { boldface ", " * pages n.dashify * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.vol.num.page}
+{ volume field.or.null
+ number empty$
+ 'skip$
+ { "(" number * ")" * *
+ volume empty$
+ { "there's a number but no volume in " cite$ * warning$ }
+ 'skip$
+ if$
+ }
+ if$
+ pages empty$
+ 'skip$
+ { duplicate$ empty$
+ { pop$ format.pages }
+ { boldface ", " * pages first.page.number * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.chapter.pages}
+{ chapter empty$
+ 'format.pages
+ { type empty$
+ { "Chapt." }
+ { type "l" change.case$ }
+ if$
+ chapter tie.or.space.connect
+ pages empty$
+ 'skip$
+ { ", " * format.pages * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.in.ed.booktitle}
+{ booktitle empty$
+ { "" }
+ { editor empty$
+ { "In " booktitle emphasize * }
+ { "In " booktitle emphasize * ". " * format.editors.extra * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.thesis.type}
+{ type empty$
+ 'skip$
+ { pop$
+ type "t" change.case$
+ }
+ if$
+}
+
+FUNCTION {format.tr.number}
+{ type empty$
+ { "Technical Report" }
+ 'type
+ if$
+ number empty$
+ { "t" change.case$ }
+ { number tie.or.space.connect }
+ if$
+}
+
+FUNCTION {format.article.crossref}
+{ "In" % this is for apalike
+ " \cite{" * crossref * "}" *
+}
+
+FUNCTION {format.book.crossref}
+{ volume empty$
+ { "empty volume in " cite$ * "'s crossref of " * crossref * warning$
+ "In "
+ }
+ { "Vol." volume tie.or.space.connect
+ " of " *
+ }
+ if$
+ "\cite{" * crossref * "}" * % this is for apalike
+}
+
+FUNCTION {format.incoll.inproc.crossref}
+{ "In" % this is for apalike
+ " \cite{" * crossref * "}" *
+}
+
+FUNCTION {article}
+{ output.bibitem
+ format.authors "author" output.check
+ author format.key output % special for
+ output.year.check % apalike
+ new.block
+ crossref missing$
+ { journal emphasize "journal" output.check.extra
+ format.vol.num.page output.extra
+ }
+ { format.article.crossref output.nonnull
+ format.page output
+ }
+ if$
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {book}
+{ output.bibitem
+ author empty$
+ { format.editors "author and editor" output.check
+ editor format.key output
+ }
+ { format.authors output.nonnull
+ crossref missing$
+ { "author and editor" editor either.or.check }
+ 'skip$
+ if$
+ }
+ if$
+ output.year.check % special for apalike
+ new.block
+ format.btitle "title" output.check
+ crossref missing$
+ { format.bvolume output
+ new.block
+ format.number.series output
+ new.sentence
+ address ": " * publisher * output
+ }
+ { new.block
+ format.book.crossref output.nonnull
+ }
+ if$
+ format.edition output
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {booklet}
+{ output.bibitem
+ format.authors output
+ author format.key output % special for
+ output.year.check % apalike
+ new.block
+ format.btitle "title" output.check
+ new.block
+ howpublished output
+ address output
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {inbook}
+{ output.bibitem
+ author empty$
+ { format.editors "author and editor" output.check
+ editor format.key output
+ }
+ { format.authors output.nonnull
+ crossref missing$
+ { "author and editor" editor either.or.check }
+ 'skip$
+ if$
+ }
+ if$
+ output.year.check % special for apalike
+ new.block
+ format.btitle "title" output.check
+ crossref missing$
+ { format.bvolume output
+ format.chapter.pages "chapter and pages" output.check
+ new.block
+ format.number.series output
+ new.sentence
+ address ": " * publisher * output
+ }
+ { format.chapter.pages "chapter and pages" output.check
+ new.block
+ format.book.crossref output.nonnull
+ }
+ if$
+ format.edition output
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {incollection}
+{ output.bibitem
+ format.authors "author" output.check
+ author format.key output % special for
+ output.year.check % apalike
+ new.block
+% format.title "title" output.check
+% new.block
+ crossref missing$
+ { format.in.ed.booktitle "booktitle" output.check
+ format.bvolume output
+ format.number.series output
+ format.chapter.pages output
+ new.sentence
+ address ": " * publisher * output
+ format.edition output
+ }
+ { format.incoll.inproc.crossref output.nonnull
+ format.chapter.pages output
+ }
+ if$
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {inproceedings}
+{ output.bibitem
+ format.authors "author" output.check
+ author format.key output % special for
+ output.year.check % apalike
+ new.block
+% format.title "title" output.check
+% new.block
+ crossref missing$
+ { format.in.ed.booktitle "booktitle" output.check
+ format.bvolume output
+ format.number.series output
+ format.pages output
+ new.sentence % there's no year
+ organization output % here so things
+ address ": " * publisher * output
+ }
+ { format.incoll.inproc.crossref output.nonnull
+ format.pages output
+ }
+ if$
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {conference} { inproceedings }
+
+FUNCTION {manual}
+{ output.bibitem
+ format.authors output
+ author format.key output % special for
+ output.year.check % apalike
+ new.block
+ format.btitle "title" output.check
+ organization address new.block.checkb
+ organization output
+ address output
+ format.edition output
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {mastersthesis}
+{ output.bibitem
+ format.authors "author" output.check
+ author format.key output % special for
+ output.year.check % apalike
+ new.block
+% format.title "title" output.check
+% new.block
+ "Master's thesis" emphasize format.thesis.type output.nonnull
+ school "school" output.check
+ address output
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {misc}
+{ output.bibitem
+ format.authors output
+ author format.key output % special for
+ output.year.check % apalike
+ new.block
+ format.btitle output
+ new.block
+ howpublished output
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {phdthesis}
+{ output.bibitem
+ format.authors "author" output.check
+ author format.key output % special for
+ output.year.check % apalike
+ new.block
+% format.btitle "title" output.check
+% new.block
+ "Ph.D. thesis" emphasize format.thesis.type output.nonnull
+ school "school" output.check
+ address output
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {proceedings}
+{ output.bibitem
+ format.editors output
+ editor format.key output % special for
+ output.year.check % apalike
+ new.block
+ format.btitle "title" output.check
+ format.bvolume output
+ format.number.series output
+ address output % for apalike
+ new.sentence % we always output
+ organization output % a nonempty organization
+ publisher output % here
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {techreport}
+{ output.bibitem
+ format.authors "author" output.check
+ author format.key output % special for
+ output.year.check % apalike
+ new.block
+ format.btitle "title" output.check
+ new.block
+ format.tr.number output.nonnull
+ address ": " * institution * output
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {unpublished}
+{ output.bibitem
+ format.authors "author" output.check
+ author format.key output % special for
+ output.year.check % apalike
+ new.block
+ format.btitle "title" output.check
+ new.block
+ note "note" output.check
+ fin.entry
+}
+
+FUNCTION {default.type} { misc }
+
+MACRO {jan} {"Jan."}
+
+MACRO {feb} {"Feb."}
+
+MACRO {mar} {"Mar."}
+
+MACRO {apr} {"Apr,"}
+
+MACRO {may} {"May"}
+
+MACRO {jun} {"June"}
+
+MACRO {jul} {"July"}
+
+MACRO {aug} {"Aug."}
+
+MACRO {sep} {"Sept."}
+
+MACRO {oct} {"Oct."}
+
+MACRO {nov} {"Nov."}
+
+MACRO {dec} {"Dec."}
+
+READ
+
+FUNCTION {sortify}
+{ purify$
+ "l" change.case$
+}
+
+INTEGERS { len }
+
+FUNCTION {chop.word}
+{ 's :=
+ 'len :=
+ s #1 len substring$ =
+ { s len #1 + global.max$ substring$ }
+ 's
+ if$
+}
+
+% There are three apalike cases: one person (Jones),
+% two (Jones and de~Bruijn), and more (Jones et~al.).
+% This function is much like format.crossref.editors.
+%
+FUNCTION {format.lab.names}
+{ 's :=
+ s #1 "{vv~}{ll}" format.name$
+ s num.names$ duplicate$
+ #2 >
+ { pop$ " et~al." * }
+ { #2 <
+ 'skip$
+ { s #2 "{ff }{vv }{ll}{ jj}" format.name$ "others" =
+ { " et~al." * }
+ { " and " * s #2 "{vv~}{ll}" format.name$ * }
+ if$
+ }
+ if$
+ }
+ if$
+}
+
+FUNCTION {author.key.label}
+{ author empty$
+ { key empty$
+ { cite$ #1 #3 substring$ }
+ 'key % apalike uses the whole key
+ if$
+ }
+ { author format.lab.names }
+ if$
+}
+
+FUNCTION {author.editor.key.label}
+{ author empty$
+ { editor empty$
+ { key empty$
+ { cite$ #1 #3 substring$ }
+ 'key % apalike uses the whole key
+ if$
+ }
+ { editor format.lab.names }
+ if$
+ }
+ { author format.lab.names }
+ if$
+}
+
+FUNCTION {editor.key.label}
+{ editor empty$
+ { key empty$
+ { cite$ #1 #3 substring$ }
+ 'key % apalike uses the whole key, no organization
+ if$
+ }
+ { editor format.lab.names }
+ if$
+}
+
+FUNCTION {calc.label}
+{ type$ "book" =
+ type$ "inbook" =
+ or
+ 'author.editor.key.label
+ { type$ "proceedings" =
+ 'editor.key.label % apalike ignores organization
+ 'author.key.label % for labeling and sorting
+ if$
+ }
+ if$
+ "\protect\astroncite{" swap$ * "}{" % these three lines are
+ * % for apalike, which
+ year field.or.null purify$ #-1 #4 substring$ % uses all four digits
+ * % the mathing closing "}" comes in at the reverse.pass
+ 'label :=
+}
+
+FUNCTION {sort.format.names}
+{ 's :=
+ #1 'nameptr :=
+ ""
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ { nameptr #1 >
+ { " " * }
+ 'skip$
+ if$ % apalike uses initials
+ s nameptr "{vv{ } }{ll{ }}{ f{ }}{ jj{ }}" format.name$ 't := % <= here
+ nameptr numnames = t "others" = and
+ { "et al" * }
+ { t sortify * }
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+}
+
+FUNCTION {sort.format.title}
+{ 't :=
+ "A " #2
+ "An " #3
+ "The " #4 t chop.word
+ chop.word
+ chop.word
+ sortify
+ #1 global.max$ substring$
+}
+
+FUNCTION {author.sort}
+{ author empty$
+ { key empty$
+ { "to sort, need author or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { author sort.format.names }
+ if$
+}
+
+FUNCTION {author.editor.sort}
+{ author empty$
+ { editor empty$
+ { key empty$
+ { "to sort, need author, editor, or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { editor sort.format.names }
+ if$
+ }
+ { author sort.format.names }
+ if$
+}
+
+FUNCTION {editor.sort}
+{ editor empty$
+ { key empty$
+ { "to sort, need editor or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { editor sort.format.names }
+ if$
+}
+
+% apalike uses two sorting passes; the first one sets the
+% labels so that the `a's, `b's, etc. can be computed;
+% the second pass puts the references in "correct" order.
+% The presort function is for the first pass. It computes
+% label, sort.label, and title, and then concatenates.
+FUNCTION {presort}
+{ calc.label
+ label sortify
+ " "
+ *
+ type$ "book" =
+ type$ "inbook" =
+ or
+ 'author.editor.sort
+ { type$ "proceedings" =
+ 'editor.sort
+ 'author.sort
+ if$
+ }
+ if$
+ #1 entry.max$ substring$ % for
+ 'sort.label := % apalike
+ sort.label % style
+ *
+ " "
+ *
+ title field.or.null
+ sort.format.title
+ *
+ #1 entry.max$ substring$
+ 'sort.key$ :=
+}
+
+ITERATE {presort}
+
+SORT % by label, sort.label, title---for final label calculation
+
+STRINGS { last.label next.extra } % apalike labels are only for the text;
+
+INTEGERS { last.extra.num } % there are none in the bibliography
+
+FUNCTION {initialize.extra.label.stuff} % and hence there is no `longest.label'
+{ #0 int.to.chr$ 'last.label :=
+ "" 'next.extra :=
+ #0 'last.extra.num :=
+}
+
+FUNCTION {forward.pass}
+{ last.label label =
+ { last.extra.num #1 + 'last.extra.num :=
+ last.extra.num int.to.chr$ 'extra.label :=
+ }
+ { "a" chr.to.int$ 'last.extra.num :=
+ "" 'extra.label :=
+ label 'last.label :=
+ }
+ if$
+}
+
+FUNCTION {reverse.pass}
+{ next.extra "b" =
+ { "a" 'extra.label := }
+ 'skip$
+ if$
+ label extra.label * "}" * 'label :=
+ extra.label 'next.extra :=
+}
+
+EXECUTE {initialize.extra.label.stuff}
+
+ITERATE {forward.pass}
+
+REVERSE {reverse.pass}
+
+% Now that the label is right we sort for real,
+% on sort.label then year then title. This is
+% for the second sorting pass.
+FUNCTION {bib.sort.order}
+{ sort.label
+ " "
+ *
+ year field.or.null sortify
+ *
+ " "
+ *
+ title field.or.null
+ sort.format.title
+ *
+ #1 entry.max$ substring$
+ 'sort.key$ :=
+}
+
+ITERATE {bib.sort.order}
+
+SORT % by sort.label, year, title---giving final bibliography order
+
+FUNCTION {begin.bib}
+{ preamble$ empty$ % no \etalchar in apalike
+ 'skip$
+ { preamble$ write$ newline$ }
+ if$
+ "\begin{thebibliography}{}" write$ newline$ % no labels in apalike
+}
+
+EXECUTE {begin.bib}
+
+EXECUTE {init.state.consts}
+
+ITERATE {call.type$}
+
+FUNCTION {end.bib}
+{ newline$
+ "\end{thebibliography}" write$ newline$
+}
+
+EXECUTE {end.bib}
diff --git a/biblio/bibtex/contrib/misc/jtbnew.bst b/biblio/bibtex/contrib/misc/jtbnew.bst
new file mode 100644
index 0000000000..c1f2929e6b
--- /dev/null
+++ b/biblio/bibtex/contrib/misc/jtbnew.bst
@@ -0,0 +1,1493 @@
+%%
+%% This is file `jtbnew.bst',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% merlin.mbs (with options: `,ay,nat,lang,nm-rev,ed-rev,jnrlst,nmft,nmft-sc,keyxyr,blkyear,dt-beg,yr-par,yrp-per,note-yr,vol-bf,volp-com,pp-last,num-xser,jnm-x,add-pub,edparxc,edby-par,edbyy,in-col,pp,ed,abr,ednx,xedn,jabr,amper,and-xcom,etal-it,url,url-blk,nfss')
+%% -- afterwards edited by hand (Yuri Robbers August 31st, 2000)
+%%
+%% ----------------------------------------
+%% *** This stylefile is for the Journal of Theoretical Biology, new style. ***
+%% *** ***
+%% *** Created by Yuri Robbers <yuri@rulbii.leidenuniv.nl> August 31st 2000 ***
+%% *** ***
+%% *** ***
+%% *** Using makebst by Patrick W Daly (1994--2000) ***
+%% *** ***
+%%
+%% Copyright 1994-2000 Patrick W Daly
+ % ===============================================================
+ % IMPORTANT NOTICE:
+ % This bibliographic style (bst) file has been generated from one or
+ % more master bibliographic style (mbs) files, listed above.
+ %
+ % This generated file can be redistributed and/or modified under the terms
+ % of the LaTeX Project Public License Distributed from CTAN
+ % archives in directory macros/latex/base/lppl.txt; either
+ % version 1 of the License, or any later version.
+ % ===============================================================
+ % Name and version information of the main mbs file:
+ % \ProvidesFile{merlin.mbs}[2000/05/04 4.01 (PWD, AO, DPC)]
+ % For use with BibTeX version 0.99a or later
+ %-------------------------------------------------------------------
+ % This bibliography style file is intended for texts in ENGLISH
+ % This is an author-year citation style bibliography. As such, it is
+ % non-standard LaTeX, and requires a special package file to function properly.
+ % Such a package is natbib.sty by Patrick W. Daly
+ % The form of the \bibitem entries is
+ % \bibitem[Jones et al.(1990)]{key}...
+ % \bibitem[Jones et al.(1990)Jones, Baker, and Smith]{key}...
+ % The essential feature is that the label (the part in brackets) consists
+ % of the author names, as they should appear in the citation, with the year
+ % in parentheses following. There must be no space before the opening
+ % parenthesis!
+ % With natbib v5.3, a full list of authors may also follow the year.
+ % In natbib.sty, it is possible to define the type of enclosures that is
+ % really wanted (brackets or parentheses), but in either case, there must
+ % be parentheses in the label.
+ % The \cite command functions as follows:
+ % \citet{key} ==>> Jones et al. (1990)
+ % \citet*{key} ==>> Jones, Baker, and Smith (1990)
+ % \citep{key} ==>> (Jones et al., 1990)
+ % \citep*{key} ==>> (Jones, Baker, and Smith, 1990)
+ % \citep[chap. 2]{key} ==>> (Jones et al., 1990, chap. 2)
+ % \citep[e.g.][]{key} ==>> (e.g. Jones et al., 1990)
+ % \citep[e.g.][p. 32]{key} ==>> (e.g. Jones et al., p. 32)
+ % \citeauthor{key} ==>> Jones et al.
+ % \citeauthor*{key} ==>> Jones, Baker, and Smith
+ % \citeyear{key} ==>> 1990
+ %---------------------------------------------------------------------
+
+ENTRY
+ { address
+ author
+ booktitle
+ chapter
+ edition
+ editor
+ howpublished
+ institution
+ journal
+ key
+ language
+ month
+ note
+ number
+ organization
+ pages
+ publisher
+ school
+ series
+ title
+ type
+ url
+ volume
+ year
+ }
+ {}
+ { label extra.label sort.label short.list }
+INTEGERS { output.state before.all mid.sentence after.sentence after.block }
+FUNCTION {init.state.consts}
+{ #0 'before.all :=
+ #1 'mid.sentence :=
+ #2 'after.sentence :=
+ #3 'after.block :=
+}
+STRINGS { s t}
+FUNCTION {output.nonnull}
+{ 's :=
+ output.state mid.sentence =
+ { ", " * write$ }
+ { output.state after.block =
+ { add.period$ write$
+ newline$
+ "\newblock " write$
+ }
+ { output.state before.all =
+ 'write$
+ { add.period$ " " * write$ }
+ if$
+ }
+ if$
+ mid.sentence 'output.state :=
+ }
+ if$
+ s
+}
+FUNCTION {output}
+{ duplicate$ empty$
+ 'pop$
+ 'output.nonnull
+ if$
+}
+FUNCTION {output.check}
+{ 't :=
+ duplicate$ empty$
+ { pop$ "empty " t * " in " * cite$ * warning$ }
+ 'output.nonnull
+ if$
+}
+FUNCTION {fin.entry}
+{ add.period$
+ write$
+ newline$
+}
+
+FUNCTION {new.block}
+{ output.state before.all =
+ 'skip$
+ { after.block 'output.state := }
+ if$
+}
+FUNCTION {new.sentence}
+{ output.state after.block =
+ 'skip$
+ { output.state before.all =
+ 'skip$
+ { after.sentence 'output.state := }
+ if$
+ }
+ if$
+}
+FUNCTION {add.blank}
+{ " " * before.all 'output.state :=
+}
+
+FUNCTION {date.block}
+{
+ new.block
+}
+
+FUNCTION {not}
+{ { #0 }
+ { #1 }
+ if$
+}
+FUNCTION {and}
+{ 'skip$
+ { pop$ #0 }
+ if$
+}
+FUNCTION {or}
+{ { pop$ #1 }
+ 'skip$
+ if$
+}
+FUNCTION {new.block.checkb}
+{ empty$
+ swap$ empty$
+ and
+ 'skip$
+ 'new.block
+ if$
+}
+FUNCTION {field.or.null}
+{ duplicate$ empty$
+ { pop$ "" }
+ 'skip$
+ if$
+}
+FUNCTION {emphasize}
+{ duplicate$ empty$
+ { pop$ "" }
+ { "\emph{" swap$ * "}" * }
+ if$
+}
+FUNCTION {bolden}
+{ duplicate$ empty$
+ { pop$ "" }
+ { "\textbf{" swap$ * "}" * }
+ if$
+}
+FUNCTION {scaps}
+{ duplicate$ empty$
+ { pop$ "" }
+ { "\textsc{" swap$ * "}" * }
+ if$
+}
+FUNCTION {bib.name.font}
+{ scaps }
+FUNCTION {bib.fname.font}
+{ bib.name.font }
+FUNCTION {tie.or.space.prefix}
+{ duplicate$ text.length$ #3 <
+ { "~" }
+ { " " }
+ if$
+ swap$
+}
+
+FUNCTION {capitalize}
+{ "u" change.case$ "t" change.case$ }
+
+FUNCTION {space.word}
+{ " " swap$ * " " * }
+ % Here are the language-specific definitions for explicit words.
+ % Each function has a name bbl.xxx where xxx is the English word.
+ % The language selected here is ENGLISH
+FUNCTION {bbl.and}
+{ "and"}
+
+FUNCTION {bbl.etal}
+{ "et~al." }
+
+FUNCTION {bbl.editors}
+{ "eds." }
+
+FUNCTION {bbl.editor}
+{ "ed." }
+
+FUNCTION {bbl.edby}
+{ "edited by" }
+
+FUNCTION {bbl.edition}
+{ "ed." }
+
+FUNCTION {bbl.volume}
+{ "vol." }
+
+FUNCTION {bbl.of}
+{ "of" }
+
+FUNCTION {bbl.number}
+{ "no." }
+
+FUNCTION {bbl.nr}
+{ "no." }
+
+FUNCTION {bbl.in}
+{ "in" }
+
+FUNCTION {bbl.pages}
+{ "pp." }
+
+FUNCTION {bbl.page}
+{ "p." }
+
+FUNCTION {bbl.chapter}
+{ "chap." }
+
+FUNCTION {bbl.techrep}
+{ "Tech. Rep." }
+
+FUNCTION {bbl.mthesis}
+{ "Master's thesis" }
+
+FUNCTION {bbl.phdthesis}
+{ "Ph.D. thesis" }
+
+MACRO {jan} {"Jan."}
+
+MACRO {feb} {"Feb."}
+
+MACRO {mar} {"Mar."}
+
+MACRO {apr} {"Apr."}
+
+MACRO {may} {"May"}
+
+MACRO {jun} {"Jun."}
+
+MACRO {jul} {"Jul."}
+
+MACRO {aug} {"Aug."}
+
+MACRO {sep} {"Sep."}
+
+MACRO {oct} {"Oct."}
+
+MACRO {nov} {"Nov."}
+
+MACRO {dec} {"Dec."}
+
+MACRO {acmcs} {"ACM Comput. Surv."}
+
+MACRO {acta} {"Acta Inf."}
+
+MACRO {cacm} {"Commun. ACM"}
+
+MACRO {ibmjrd} {"IBM J. Res. Dev."}
+
+MACRO {ibmsj} {"IBM Syst.~J."}
+
+MACRO {ieeese} {"IEEE Trans. Software Eng."}
+
+MACRO {ieeetc} {"IEEE Trans. Comput."}
+
+MACRO {ieeetcad}
+ {"IEEE Trans. Comput. Aid. Des."}
+
+MACRO {ipl} {"Inf. Process. Lett."}
+
+MACRO {jacm} {"J.~ACM"}
+
+MACRO {jcss} {"J.~Comput. Syst. Sci."}
+
+MACRO {scp} {"Sci. Comput. Program."}
+
+MACRO {sicomp} {"SIAM J. Comput."}
+
+MACRO {tocs} {"ACM Trans. Comput. Syst."}
+
+MACRO {tods} {"ACM Trans. Database Syst."}
+
+MACRO {tog} {"ACM Trans. Graphic."}
+
+MACRO {toms} {"ACM Trans. Math. Software"}
+
+MACRO {toois} {"ACM Trans. Office Inf. Syst."}
+
+MACRO {toplas} {"ACM Trans. Progr. Lang. Syst."}
+
+MACRO {tcs} {"Theor. Comput. Sci."}
+
+FUNCTION {bibinfo.check}
+{ swap$
+ duplicate$ missing$
+ {
+ pop$ pop$
+ ""
+ }
+ { duplicate$ empty$
+ {
+ swap$ pop$
+ }
+ { swap$
+ pop$
+ }
+ if$
+ }
+ if$
+}
+FUNCTION {bibinfo.warn}
+{ swap$
+ duplicate$ missing$
+ {
+ swap$ "missing " swap$ * " in " * cite$ * warning$ pop$
+ ""
+ }
+ { duplicate$ empty$
+ {
+ swap$ "empty " swap$ * " in " * cite$ * warning$
+ }
+ { swap$
+ pop$
+ }
+ if$
+ }
+ if$
+}
+FUNCTION {format.url}
+{ url empty$
+ { "" }
+ { "\urlprefix\url{" url * "}" * }
+ if$
+}
+
+STRINGS { bibinfo}
+INTEGERS { nameptr namesleft numnames }
+
+FUNCTION {format.names}
+{ 'bibinfo :=
+ duplicate$ empty$ 'skip$ {
+ 's :=
+ "" 't :=
+ #1 'nameptr :=
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ { s nameptr
+ "{vv~}{ll}{, f.}{, jj}"
+ format.name$
+ bibinfo bibinfo.check
+ 't :=
+ nameptr #1 >
+ {
+ namesleft #1 >
+ { ", " * t * }
+ {
+ s nameptr "{ll}" format.name$ duplicate$ "others" =
+ { 't := }
+ { pop$ }
+ if$
+ t "others" =
+ {
+ bib.name.font
+ " " * bbl.etal emphasize *
+ }
+ {
+ "\&"
+ space.word * t *
+ }
+ if$
+ }
+ if$
+ }
+ 't
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+ t "others" =
+ 'skip$
+ { bib.name.font }
+ if$
+ } if$
+}
+FUNCTION {format.names.ed}
+{
+ format.names
+}
+FUNCTION {format.key}
+{ empty$
+ { key field.or.null }
+ { "" }
+ if$
+}
+
+FUNCTION {format.authors}
+{ author "author" format.names
+}
+FUNCTION {get.bbl.editor}
+{ editor num.names$ #1 > 'bbl.editors 'bbl.editor if$ }
+
+FUNCTION {format.editors}
+{ editor "editor" format.names duplicate$ empty$ 'skip$
+ {
+ " " *
+ get.bbl.editor
+ "(" swap$ * ")" *
+ *
+ }
+ if$
+}
+FUNCTION {select.language}
+{ duplicate$ empty$
+ 'pop$
+ { language empty$
+ 'skip$
+ { "{\selectlanguage{" language * "}" * swap$ * "}" * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.note}
+{
+ note empty$
+ { "" }
+ { note #1 #1 substring$
+ duplicate$ "{" =
+ 'skip$
+ { output.state mid.sentence =
+ { "l" }
+ { "u" }
+ if$
+ change.case$
+ }
+ if$
+ note #2 global.max$ substring$ * "note" bibinfo.check
+ }
+ if$
+}
+
+FUNCTION {format.title}
+{ title
+ duplicate$ empty$ 'skip$
+ { "t" change.case$ }
+ if$
+ "title" bibinfo.check
+ duplicate$ empty$ 'skip$
+ {
+ select.language
+ }
+ if$
+}
+FUNCTION {format.full.names}
+{'s :=
+ "" 't :=
+ #1 'nameptr :=
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ { s nameptr
+ "{vv~}{ll}" format.name$
+ 't :=
+ nameptr #1 >
+ {
+ namesleft #1 >
+ { ", " * t * }
+ {
+ s nameptr "{ll}" format.name$ duplicate$ "others" =
+ { 't := }
+ { pop$ }
+ if$
+ t "others" =
+ {
+ " " * bbl.etal emphasize *
+ }
+ {
+ "\&"
+ space.word * t *
+ }
+ if$
+ }
+ if$
+ }
+ 't
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+}
+
+FUNCTION {author.editor.key.full}
+{ author empty$
+ { editor empty$
+ { key empty$
+ { cite$ #1 #3 substring$ }
+ 'key
+ if$
+ }
+ { editor format.full.names }
+ if$
+ }
+ { author format.full.names }
+ if$
+}
+
+FUNCTION {author.key.full}
+{ author empty$
+ { key empty$
+ { cite$ #1 #3 substring$ }
+ 'key
+ if$
+ }
+ { author format.full.names }
+ if$
+}
+
+FUNCTION {editor.key.full}
+{ editor empty$
+ { key empty$
+ { cite$ #1 #3 substring$ }
+ 'key
+ if$
+ }
+ { editor format.full.names }
+ if$
+}
+
+FUNCTION {make.full.names}
+{ type$ "book" =
+ type$ "inbook" =
+ or
+ 'author.editor.key.full
+ { type$ "proceedings" =
+ 'editor.key.full
+ 'author.key.full
+ if$
+ }
+ if$
+}
+
+FUNCTION {output.bibitem}
+{ newline$
+ "\bibitem[{" write$
+ label write$
+ ")" make.full.names duplicate$ short.list =
+ { pop$ }
+ { * }
+ if$
+ "}]{" * write$
+ cite$ write$
+ "}" write$
+ newline$
+ ""
+ before.all 'output.state :=
+}
+
+FUNCTION {n.dashify}
+{
+ 't :=
+ ""
+ { t empty$ not }
+ { t #1 #1 substring$ "-" =
+ { t #1 #2 substring$ "--" = not
+ { "--" *
+ t #2 global.max$ substring$ 't :=
+ }
+ { { t #1 #1 substring$ "-" = }
+ { "-" *
+ t #2 global.max$ substring$ 't :=
+ }
+ while$
+ }
+ if$
+ }
+ { t #1 #1 substring$ *
+ t #2 global.max$ substring$ 't :=
+ }
+ if$
+ }
+ while$
+}
+
+FUNCTION {word.in}
+{ bbl.in capitalize
+ ":" *
+ " " * }
+
+FUNCTION {format.date}
+{ year "year" bibinfo.check duplicate$ empty$
+ {
+ }
+ 'skip$
+ if$
+ extra.label *
+ before.all 'output.state :=
+ " (" swap$ * ")" *
+}
+FUNCTION {format.btitle}
+{ title "title" bibinfo.check
+ duplicate$ empty$ 'skip$
+ {
+ emphasize
+ select.language
+ }
+ if$
+}
+FUNCTION {either.or.check}
+{ empty$
+ 'pop$
+ { "can't use both " swap$ * " fields in " * cite$ * warning$ }
+ if$
+}
+FUNCTION {format.bvolume}
+{ volume empty$
+ { "" }
+ { bbl.volume volume tie.or.space.prefix
+ "volume" bibinfo.check * *
+ series "series" bibinfo.check
+ duplicate$ empty$ 'pop$
+ { swap$ bbl.of space.word * swap$
+ emphasize * }
+ if$
+ "volume and number" number either.or.check
+ }
+ if$
+}
+FUNCTION {format.number.series}
+{ volume empty$
+ { number empty$
+ { series field.or.null }
+ { series empty$
+ { number "number" bibinfo.check }
+ { output.state mid.sentence =
+ { bbl.number }
+ { bbl.number capitalize }
+ if$
+ number tie.or.space.prefix "number" bibinfo.check * *
+ bbl.in space.word *
+ series "series" bibinfo.check *
+ }
+ if$
+ }
+ if$
+ }
+ { "" }
+ if$
+}
+
+FUNCTION {format.edition}
+{ edition duplicate$ empty$ 'skip$
+ {
+ output.state mid.sentence =
+ { "l" }
+ { "t" }
+ if$ change.case$
+ "edition" bibinfo.check
+ " " * bbl.edition *
+ }
+ if$
+}
+INTEGERS { multiresult }
+FUNCTION {multi.page.check}
+{ 't :=
+ #0 'multiresult :=
+ { multiresult not
+ t empty$ not
+ and
+ }
+ { t #1 #1 substring$
+ duplicate$ "-" =
+ swap$ duplicate$ "," =
+ swap$ "+" =
+ or or
+ { #1 'multiresult := }
+ { t #2 global.max$ substring$ 't := }
+ if$
+ }
+ while$
+ multiresult
+}
+FUNCTION {format.pages}
+{ pages duplicate$ empty$ 'skip$
+ { duplicate$ multi.page.check
+ {
+ bbl.pages swap$
+ n.dashify
+ }
+ {
+ bbl.page swap$
+ }
+ if$
+ tie.or.space.prefix
+ "pages" bibinfo.check
+ * *
+ }
+ if$
+}
+FUNCTION {format.journal.pages}
+{ pages duplicate$ empty$ 'pop$
+ { swap$ duplicate$ empty$
+ { pop$ pop$ format.pages }
+ {
+ ", " *
+ swap$
+ n.dashify
+ "pages" bibinfo.check
+ *
+ }
+ if$
+ }
+ if$
+}
+FUNCTION {format.vol.num.pages}
+{ volume field.or.null
+ duplicate$ empty$ 'skip$
+ {
+ "volume" bibinfo.check
+ }
+ if$
+ bolden
+ number "number" bibinfo.check duplicate$ empty$ 'skip$
+ {
+ swap$ duplicate$ empty$
+ { "there's a number but no volume in " cite$ * warning$ }
+ 'skip$
+ if$
+ swap$
+ "(" swap$ * ")" *
+ }
+ if$ *
+}
+
+FUNCTION {format.chapter.pages}
+{ chapter empty$
+ { "" }
+ { type empty$
+ { bbl.chapter }
+ { type "l" change.case$
+ "type" bibinfo.check
+ }
+ if$
+ chapter tie.or.space.prefix
+ "chapter" bibinfo.check
+ * *
+ }
+ if$
+}
+
+FUNCTION {format.booktitle}
+{
+ booktitle "booktitle" bibinfo.check
+ emphasize
+}
+FUNCTION {format.in.ed.booktitle}
+{ format.booktitle duplicate$ empty$ 'skip$
+ {
+ editor "editor" format.names.ed duplicate$ empty$ 'pop$
+ {
+ get.bbl.editor
+ swap$ "," *
+ " " * swap$ *
+ "(" swap$ * ")" *
+ swap$
+ " " * swap$
+ * }
+ if$
+ word.in swap$ *
+ }
+ if$
+}
+FUNCTION {format.thesis.type}
+{ type duplicate$ empty$
+ 'pop$
+ { swap$ pop$
+ "t" change.case$ "type" bibinfo.check
+ }
+ if$
+}
+FUNCTION {format.tr.number}
+{ number "number" bibinfo.check
+ type duplicate$ empty$
+ { pop$ bbl.techrep }
+ 'skip$
+ if$
+ "type" bibinfo.check
+ swap$ duplicate$ empty$
+ { pop$ "t" change.case$ }
+ { tie.or.space.prefix * * }
+ if$
+}
+FUNCTION {format.article.crossref}
+{
+ word.in
+ " \cite{" * crossref * "}" *
+}
+FUNCTION {format.book.crossref}
+{ volume duplicate$ empty$
+ { "empty volume in " cite$ * "'s crossref of " * crossref * warning$
+ pop$ word.in
+ }
+ { bbl.volume
+ capitalize
+ swap$ tie.or.space.prefix "volume" bibinfo.check * * bbl.of space.word *
+ }
+ if$
+ " \cite{" * crossref * "}" *
+}
+FUNCTION {format.incoll.inproc.crossref}
+{
+ word.in
+ " \cite{" * crossref * "}" *
+}
+FUNCTION {format.org.or.pub}
+{ 't :=
+ ""
+ address empty$ t empty$ and
+ 'skip$
+ {
+ address "address" bibinfo.check *
+ t empty$
+ 'skip$
+ { address empty$
+ 'skip$
+ { ": " * }
+ if$
+ t *
+ }
+ if$
+ }
+ if$
+}
+FUNCTION {format.publisher.address}
+{ publisher "publisher" bibinfo.warn format.org.or.pub
+}
+
+FUNCTION {format.organization.address}
+{ organization "organization" bibinfo.check format.org.or.pub
+}
+
+FUNCTION {article}
+{ output.bibitem
+ format.authors "author" output.check
+ author format.key output
+ format.date "year" output.check
+ date.block
+ format.title "title" output.check
+ new.block
+ crossref missing$
+ {
+ journal
+ "journal" bibinfo.check
+ emphasize
+ "journal" output.check
+ add.blank
+ format.vol.num.pages output
+ }
+ { format.article.crossref output.nonnull
+ }
+ if$
+ format.journal.pages
+ new.block
+ format.url output
+ new.block
+ format.note output
+ fin.entry
+}
+FUNCTION {book}
+{ output.bibitem
+ author empty$
+ { format.editors "author and editor" output.check
+ editor format.key output
+ add.blank
+ }
+ { format.authors output.nonnull
+ crossref missing$
+ { "author and editor" editor either.or.check }
+ 'skip$
+ if$
+ }
+ if$
+ format.date "year" output.check
+ date.block
+ format.btitle "title" output.check
+ crossref missing$
+ { format.bvolume output
+ new.block
+ format.number.series output
+ new.sentence
+ format.publisher.address output
+ }
+ {
+ new.block
+ format.book.crossref output.nonnull
+ }
+ if$
+ format.edition output
+ new.block
+ format.url output
+ new.block
+ format.note output
+ fin.entry
+}
+FUNCTION {booklet}
+{ output.bibitem
+ format.authors output
+ author format.key output
+ format.date "year" output.check
+ date.block
+ format.title "title" output.check
+ new.block
+ howpublished "howpublished" bibinfo.check output
+ address "address" bibinfo.check output
+ new.block
+ format.url output
+ new.block
+ format.note output
+ fin.entry
+}
+
+FUNCTION {inbook}
+{ output.bibitem
+ author empty$
+ { format.editors "author and editor" output.check
+ editor format.key output
+ }
+ { format.authors output.nonnull
+ crossref missing$
+ { "author and editor" editor either.or.check }
+ 'skip$
+ if$
+ }
+ if$
+ format.date "year" output.check
+ date.block
+ format.btitle "title" output.check
+ crossref missing$
+ {
+ format.bvolume output
+ format.chapter.pages "chapter and pages" output.check
+ new.block
+ format.number.series output
+ new.sentence
+ format.publisher.address output
+ }
+ {
+ format.chapter.pages "chapter and pages" output.check
+ new.block
+ format.book.crossref output.nonnull
+ }
+ if$
+ format.edition output
+ format.pages "pages" output.check
+ new.block
+ format.url output
+ new.block
+ format.note output
+ fin.entry
+}
+
+FUNCTION {incollection}
+{ output.bibitem
+ format.authors "author" output.check
+ author format.key output
+ format.date "year" output.check
+ date.block
+ format.title "title" output.check
+ new.block
+ crossref missing$
+ { format.in.ed.booktitle "booktitle" output.check
+ format.bvolume output
+ format.number.series output
+ format.chapter.pages output
+ new.sentence
+ format.publisher.address output
+ format.edition output
+ }
+ { format.incoll.inproc.crossref output.nonnull
+ format.chapter.pages output
+ }
+ if$
+ format.pages "pages" output.check
+ new.block
+ format.url output
+ new.block
+ format.note output
+ fin.entry
+}
+FUNCTION {inproceedings}
+{ output.bibitem
+ format.authors "author" output.check
+ author format.key output
+ format.date "year" output.check
+ date.block
+ format.title "title" output.check
+ new.block
+ crossref missing$
+ { format.in.ed.booktitle "booktitle" output.check
+ format.bvolume output
+ format.number.series output
+ new.sentence
+ publisher empty$
+ { format.organization.address output }
+ { organization "organization" bibinfo.check output
+ format.publisher.address output
+ }
+ if$
+ }
+ { format.incoll.inproc.crossref output.nonnull
+ format.pages output
+ }
+ if$
+ new.block
+ format.url output
+ new.block
+ format.note output
+ fin.entry
+}
+FUNCTION {conference} { inproceedings }
+FUNCTION {manual}
+{ output.bibitem
+ format.authors output
+ author format.key output
+ format.date "year" output.check
+ date.block
+ format.btitle "title" output.check
+ organization address new.block.checkb
+ organization "organization" bibinfo.check output
+ address "address" bibinfo.check output
+ format.edition output
+ new.block
+ format.url output
+ new.block
+ format.note output
+ fin.entry
+}
+
+FUNCTION {mastersthesis}
+{ output.bibitem
+ format.authors "author" output.check
+ author format.key output
+ format.date "year" output.check
+ date.block
+ format.btitle
+ "title" output.check
+ new.block
+ bbl.mthesis format.thesis.type output.nonnull
+ school "school" bibinfo.warn output
+ address "address" bibinfo.check output
+ new.block
+ format.url output
+ new.block
+ format.note output
+ fin.entry
+}
+
+FUNCTION {misc}
+{ output.bibitem
+ format.authors output
+ author format.key output
+ format.date "year" output.check
+ date.block
+ format.title output
+ new.block
+ howpublished "howpublished" bibinfo.check output
+ new.block
+ format.url output
+ new.block
+ format.note output
+ fin.entry
+}
+FUNCTION {phdthesis}
+{ output.bibitem
+ format.authors "author" output.check
+ author format.key output
+ format.date "year" output.check
+ date.block
+ format.btitle
+ "title" output.check
+ new.block
+ bbl.phdthesis format.thesis.type output.nonnull
+ school "school" bibinfo.warn output
+ address "address" bibinfo.check output
+ new.block
+ format.url output
+ new.block
+ format.note output
+ fin.entry
+}
+
+FUNCTION {proceedings}
+{ output.bibitem
+ format.editors output
+ editor format.key output
+ format.date "year" output.check
+ date.block
+ format.btitle "title" output.check
+ format.bvolume output
+ format.number.series output
+ new.sentence
+ publisher empty$
+ { format.organization.address output }
+ { organization "organization" bibinfo.check output
+ format.publisher.address output
+ }
+ if$
+ new.block
+ format.url output
+ new.block
+ format.note output
+ fin.entry
+}
+
+FUNCTION {techreport}
+{ output.bibitem
+ format.authors "author" output.check
+ author format.key output
+ format.date "year" output.check
+ date.block
+ format.title
+ "title" output.check
+ new.block
+ format.tr.number output.nonnull
+ institution "institution" bibinfo.warn output
+ address "address" bibinfo.check output
+ new.block
+ format.url output
+ new.block
+ format.note output
+ fin.entry
+}
+
+FUNCTION {unpublished}
+{ output.bibitem
+ format.authors "author" output.check
+ author format.key output
+ format.date "year" output.check
+ date.block
+ format.title "title" output.check
+ new.block
+ format.url output
+ new.block
+ format.note "note" output.check
+ fin.entry
+}
+
+FUNCTION {default.type} { misc }
+READ
+FUNCTION {sortify}
+{ purify$
+ "l" change.case$
+}
+INTEGERS { len }
+FUNCTION {chop.word}
+{ 's :=
+ 'len :=
+ s #1 len substring$ =
+ { s len #1 + global.max$ substring$ }
+ 's
+ if$
+}
+FUNCTION {format.lab.names}
+{ 's :=
+ "" 't :=
+ s #1 "{vv~}{ll}" format.name$
+ s num.names$ duplicate$
+ #2 >
+ { pop$
+ " " * bbl.etal emphasize *
+ }
+ { #2 <
+ 'skip$
+ { s #2 "{ff }{vv }{ll}{ jj}" format.name$ "others" =
+ {
+ " " * bbl.etal emphasize *
+ }
+ { " \& " * s #2 "{vv~}{ll}" format.name$
+ * }
+ if$
+ }
+ if$
+ }
+ if$
+}
+
+FUNCTION {author.key.label}
+{ author empty$
+ { key empty$
+ { cite$ #1 #3 substring$ }
+ 'key
+ if$
+ }
+ { author format.lab.names }
+ if$
+}
+
+FUNCTION {author.editor.key.label}
+{ author empty$
+ { editor empty$
+ { key empty$
+ { cite$ #1 #3 substring$ }
+ 'key
+ if$
+ }
+ { editor format.lab.names }
+ if$
+ }
+ { author format.lab.names }
+ if$
+}
+
+FUNCTION {editor.key.label}
+{ editor empty$
+ { key empty$
+ { cite$ #1 #3 substring$ }
+ 'key
+ if$
+ }
+ { editor format.lab.names }
+ if$
+}
+
+FUNCTION {calc.short.authors}
+{ type$ "book" =
+ type$ "inbook" =
+ or
+ 'author.editor.key.label
+ { type$ "proceedings" =
+ 'editor.key.label
+ 'author.key.label
+ if$
+ }
+ if$
+ 'short.list :=
+}
+
+FUNCTION {calc.label}
+{ calc.short.authors
+ short.list
+ "("
+ *
+ year duplicate$ empty$
+ short.list key field.or.null = or
+ { pop$ "" }
+ 'skip$
+ if$
+ *
+ 'label :=
+}
+
+FUNCTION {sort.format.names}
+{ 's :=
+ #1 'nameptr :=
+ ""
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ { s nameptr
+ "{vv{ } }{ll{ }}{ f{ }}{ jj{ }}"
+ format.name$ 't :=
+ nameptr #1 >
+ {
+ " " *
+ namesleft #1 = t "others" = and
+ { "zzzzz" * }
+ { t sortify * }
+ if$
+ }
+ { t sortify * }
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+}
+
+FUNCTION {sort.format.title}
+{ 't :=
+ "A " #2
+ "An " #3
+ "The " #4 t chop.word
+ chop.word
+ chop.word
+ sortify
+ #1 global.max$ substring$
+}
+FUNCTION {author.sort}
+{ author empty$
+ { key empty$
+ { "to sort, need author or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { author sort.format.names }
+ if$
+}
+FUNCTION {author.editor.sort}
+{ author empty$
+ { editor empty$
+ { key empty$
+ { "to sort, need author, editor, or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { editor sort.format.names }
+ if$
+ }
+ { author sort.format.names }
+ if$
+}
+FUNCTION {editor.sort}
+{ editor empty$
+ { key empty$
+ { "to sort, need editor or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { editor sort.format.names }
+ if$
+}
+FUNCTION {presort}
+{ calc.label
+ label sortify
+ " "
+ *
+ type$ "book" =
+ type$ "inbook" =
+ or
+ 'author.editor.sort
+ { type$ "proceedings" =
+ 'editor.sort
+ 'author.sort
+ if$
+ }
+ if$
+ #1 entry.max$ substring$
+ 'sort.label :=
+ sort.label
+ *
+ " "
+ *
+ title field.or.null
+ sort.format.title
+ *
+ #1 entry.max$ substring$
+ 'sort.key$ :=
+}
+
+ITERATE {presort}
+SORT
+STRINGS { last.label next.extra }
+INTEGERS { last.extra.num number.label }
+FUNCTION {initialize.extra.label.stuff}
+{ #0 int.to.chr$ 'last.label :=
+ "" 'next.extra :=
+ #0 'last.extra.num :=
+ #0 'number.label :=
+}
+FUNCTION {forward.pass}
+{ last.label label =
+ { last.extra.num #1 + 'last.extra.num :=
+ last.extra.num int.to.chr$ 'extra.label :=
+ }
+ { "a" chr.to.int$ 'last.extra.num :=
+ "" 'extra.label :=
+ label 'last.label :=
+ }
+ if$
+ number.label #1 + 'number.label :=
+}
+FUNCTION {reverse.pass}
+{ next.extra "b" =
+ { "a" 'extra.label := }
+ 'skip$
+ if$
+ extra.label 'next.extra :=
+ extra.label
+ duplicate$ empty$
+ 'skip$
+ { "{\natexlab{" swap$ * "}}" * }
+ if$
+ 'extra.label :=
+ label extra.label * 'label :=
+}
+EXECUTE {initialize.extra.label.stuff}
+ITERATE {forward.pass}
+REVERSE {reverse.pass}
+FUNCTION {bib.sort.order}
+{ sort.label
+ " "
+ *
+ year field.or.null sortify
+ *
+ " "
+ *
+ title field.or.null
+ sort.format.title
+ *
+ #1 entry.max$ substring$
+ 'sort.key$ :=
+}
+ITERATE {bib.sort.order}
+SORT
+FUNCTION {begin.bib}
+{ preamble$ empty$
+ 'skip$
+ { preamble$ write$ newline$ }
+ if$
+ "\begin{thebibliography}{" number.label int.to.str$ * "}" *
+ write$ newline$
+ "\expandafter\ifx\csname natexlab\endcsname\relax\def\natexlab#1{#1}\fi"
+ write$ newline$
+ "\expandafter\ifx\csname url\endcsname\relax"
+ write$ newline$
+ " \def\url#1{\texttt{#1}}\fi"
+ write$ newline$
+ "\expandafter\ifx\csname urlprefix\endcsname\relax\def\urlprefix{URL }\fi"
+ write$ newline$
+ "\providecommand{\selectlanguage}[1]{\relax}"
+ write$ newline$
+}
+EXECUTE {begin.bib}
+EXECUTE {init.state.consts}
+ITERATE {call.type$}
+FUNCTION {end.bib}
+{ newline$
+ "\end{thebibliography}" write$ newline$
+}
+EXECUTE {end.bib}
+%% End of customized bst file
+%%
+%% End of file `jtbnew.bst'.
diff --git a/biblio/bibtex/contrib/misc/namunsrt.bst b/biblio/bibtex/contrib/misc/namunsrt.bst
new file mode 100644
index 0000000000..8c04e10fbc
--- /dev/null
+++ b/biblio/bibtex/contrib/misc/namunsrt.bst
@@ -0,0 +1,949 @@
+% BibTeX standard bibliography style `unsrt'
+ % version 0.99a for BibTeX versions 0.99a or later, LaTeX version 2.09.
+ % Copyright (C) 1985, all rights reserved.
+ % Copying of this file is authorized only if either
+ % (1) you make absolutely no changes to your copy, including name, or
+ % (2) if you do make changes, you name it something other than
+ % btxbst.doc, plain.bst, unsrt.bst, alpha.bst, and abbrv.bst.
+ % This restriction helps ensure that all standard styles are identical.
+ % The file btxbst.doc has the documentation for this style.
+
+ENTRY
+ { address
+ author
+ booktitle
+ chapter
+ edition
+ editor
+ howpublished
+ institution
+ journal
+ key
+ month
+ nam
+ note
+ number
+ organization
+ pages
+ publisher
+ school
+ series
+ title
+ type
+ volume
+ year
+ }
+ {}
+ { label }
+
+INTEGERS { output.state before.all mid.sentence after.sentence after.block }
+
+FUNCTION {init.state.consts}
+{ #0 'before.all :=
+ #1 'mid.sentence :=
+ #2 'after.sentence :=
+ #3 'after.block :=
+}
+
+STRINGS { s t }
+
+FUNCTION {output.nonnull}
+{ 's :=
+ output.state mid.sentence =
+ { ", " * write$ }
+ { output.state after.block =
+ { add.period$ write$
+ newline$
+ "\newblock " write$
+ }
+ { output.state before.all =
+ 'write$
+ { add.period$ " " * write$ }
+ if$
+ }
+ if$
+ mid.sentence 'output.state :=
+ }
+ if$
+ s
+}
+
+FUNCTION {output}
+{ duplicate$ empty$
+ 'pop$
+ 'output.nonnull
+ if$
+}
+
+FUNCTION {output.check}
+{ 't :=
+ duplicate$ empty$
+ { pop$ "empty " t * " in " * cite$ * warning$ }
+ 'output.nonnull
+ if$
+}
+
+FUNCTION {output.bibitem}
+{ newline$
+ "\bibitem[" write$
+ nam write$
+ "]{" write$
+ cite$ write$
+ "}" write$
+ newline$
+ ""
+ before.all 'output.state :=
+}
+
+FUNCTION {fin.entry}
+{ add.period$
+ write$
+ newline$
+}
+
+FUNCTION {new.block}
+{ output.state before.all =
+ 'skip$
+ { after.block 'output.state := }
+ if$
+}
+
+FUNCTION {new.sentence}
+{ output.state after.block =
+ 'skip$
+ { output.state before.all =
+ 'skip$
+ { after.sentence 'output.state := }
+ if$
+ }
+ if$
+}
+
+FUNCTION {not}
+{ { #0 }
+ { #1 }
+ if$
+}
+
+FUNCTION {and}
+{ 'skip$
+ { pop$ #0 }
+ if$
+}
+
+FUNCTION {or}
+{ { pop$ #1 }
+ 'skip$
+ if$
+}
+
+FUNCTION {new.block.checka}
+{ empty$
+ 'skip$
+ 'new.block
+ if$
+}
+
+FUNCTION {new.block.checkb}
+{ empty$
+ swap$ empty$
+ and
+ 'skip$
+ 'new.block
+ if$
+}
+
+FUNCTION {new.sentence.checka}
+{ empty$
+ 'skip$
+ 'new.sentence
+ if$
+}
+
+FUNCTION {new.sentence.checkb}
+{ empty$
+ swap$ empty$
+ and
+ 'skip$
+ 'new.sentence
+ if$
+}
+
+FUNCTION {field.or.null}
+{ duplicate$ empty$
+ { pop$ "" }
+ 'skip$
+ if$
+}
+
+FUNCTION {emphasize}
+{ duplicate$ empty$
+ { pop$ "" }
+ { "{\em " swap$ * "}" * }
+ if$
+}
+
+INTEGERS { nameptr namesleft numnames }
+
+FUNCTION {format.names}
+{ 's :=
+ #1 'nameptr :=
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ { s nameptr "{ff~}{vv~}{ll}{, jj}" format.name$ 't :=
+ nameptr #1 >
+ { namesleft #1 >
+ { ", " * t * }
+ { numnames #2 >
+ { "," * }
+ 'skip$
+ if$
+ t "others" =
+ { " et~al." * }
+ { " and " * t * }
+ if$
+ }
+ if$
+ }
+ 't
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+}
+
+FUNCTION {format.authors}
+{ author empty$
+ { "" }
+ { author format.names }
+ if$
+}
+
+FUNCTION {format.editors}
+{ editor empty$
+ { "" }
+ { editor format.names
+ editor num.names$ #1 >
+ { ", editors" * }
+ { ", editor" * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.title}
+{ title empty$
+ { "" }
+ { title "t" change.case$ }
+ if$
+}
+
+FUNCTION {n.dashify}
+{ 't :=
+ ""
+ { t empty$ not }
+ { t #1 #1 substring$ "-" =
+ { t #1 #2 substring$ "--" = not
+ { "--" *
+ t #2 global.max$ substring$ 't :=
+ }
+ { { t #1 #1 substring$ "-" = }
+ { "-" *
+ t #2 global.max$ substring$ 't :=
+ }
+ while$
+ }
+ if$
+ }
+ { t #1 #1 substring$ *
+ t #2 global.max$ substring$ 't :=
+ }
+ if$
+ }
+ while$
+}
+
+FUNCTION {format.date}
+{ year empty$
+ { month empty$
+ { "" }
+ { "there's a month but no year in " cite$ * warning$
+ month
+ }
+ if$
+ }
+ { month empty$
+ 'year
+ { month " " * year * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.btitle}
+{ title emphasize
+}
+
+FUNCTION {tie.or.space.connect}
+{ duplicate$ text.length$ #3 <
+ { "~" }
+ { " " }
+ if$
+ swap$ * *
+}
+
+FUNCTION {either.or.check}
+{ empty$
+ 'pop$
+ { "can't use both " swap$ * " fields in " * cite$ * warning$ }
+ if$
+}
+
+FUNCTION {format.bvolume}
+{ volume empty$
+ { "" }
+ { "volume" volume tie.or.space.connect
+ series empty$
+ 'skip$
+ { " of " * series emphasize * }
+ if$
+ "volume and number" number either.or.check
+ }
+ if$
+}
+
+FUNCTION {format.number.series}
+{ volume empty$
+ { number empty$
+ { series field.or.null }
+ { output.state mid.sentence =
+ { "number" }
+ { "Number" }
+ if$
+ number tie.or.space.connect
+ series empty$
+ { "there's a number but no series in " cite$ * warning$ }
+ { " in " * series * }
+ if$
+ }
+ if$
+ }
+ { "" }
+ if$
+}
+
+FUNCTION {format.edition}
+{ edition empty$
+ { "" }
+ { output.state mid.sentence =
+ { edition "l" change.case$ " edition" * }
+ { edition "t" change.case$ " edition" * }
+ if$
+ }
+ if$
+}
+
+INTEGERS { multiresult }
+
+FUNCTION {multi.page.check}
+{ 't :=
+ #0 'multiresult :=
+ { multiresult not
+ t empty$ not
+ and
+ }
+ { t #1 #1 substring$
+ duplicate$ "-" =
+ swap$ duplicate$ "," =
+ swap$ "+" =
+ or or
+ { #1 'multiresult := }
+ { t #2 global.max$ substring$ 't := }
+ if$
+ }
+ while$
+ multiresult
+}
+
+FUNCTION {format.pages}
+{ pages empty$
+ { "" }
+ { pages multi.page.check
+ { "pages" pages n.dashify tie.or.space.connect }
+ { "page" pages tie.or.space.connect }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.vol.num.pages}
+{ volume field.or.null
+ number empty$
+ 'skip$
+ { "(" number * ")" * *
+ volume empty$
+ { "there's a number but no volume in " cite$ * warning$ }
+ 'skip$
+ if$
+ }
+ if$
+ pages empty$
+ 'skip$
+ { duplicate$ empty$
+ { pop$ format.pages }
+ { ":" * pages n.dashify * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.chapter.pages}
+{ chapter empty$
+ 'format.pages
+ { type empty$
+ { "chapter" }
+ { type "l" change.case$ }
+ if$
+ chapter tie.or.space.connect
+ pages empty$
+ 'skip$
+ { ", " * format.pages * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.in.ed.booktitle}
+{ booktitle empty$
+ { "" }
+ { editor empty$
+ { "In " booktitle emphasize * }
+ { "In " format.editors * ", " * booktitle emphasize * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {empty.misc.check}
+{ author empty$ title empty$ howpublished empty$
+ month empty$ year empty$ note empty$
+ and and and and and
+ { "all relevant fields are empty in " cite$ * warning$ }
+ 'skip$
+ if$
+}
+
+FUNCTION {format.thesis.type}
+{ type empty$
+ 'skip$
+ { pop$
+ type "t" change.case$
+ }
+ if$
+}
+
+FUNCTION {format.tr.number}
+{ type empty$
+ { "NAM" }
+ 'type
+ if$
+ number empty$
+ { "t" change.case$ }
+ { number tie.or.space.connect }
+ if$
+}
+
+FUNCTION {format.article.crossref}
+{ key empty$
+ { journal empty$
+ { "need key or journal for " cite$ * " to crossref " * crossref *
+ warning$
+ ""
+ }
+ { "In {\em " journal * "\/}" * }
+ if$
+ }
+ { "In " key * }
+ if$
+ " \cite{" * crossref * "}" *
+}
+
+FUNCTION {format.crossref.editor}
+{ editor #1 "{vv~}{ll}" format.name$
+ editor num.names$ duplicate$
+ #2 >
+ { pop$ " et~al." * }
+ { #2 <
+ 'skip$
+ { editor #2 "{ff }{vv }{ll}{ jj}" format.name$ "others" =
+ { " et~al." * }
+ { " and " * editor #2 "{vv~}{ll}" format.name$ * }
+ if$
+ }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.book.crossref}
+{ volume empty$
+ { "empty volume in " cite$ * "'s crossref of " * crossref * warning$
+ "In "
+ }
+ { "Volume" volume tie.or.space.connect
+ " of " *
+ }
+ if$
+ editor empty$
+ editor field.or.null author field.or.null =
+ or
+ { key empty$
+ { series empty$
+ { "need editor, key, or series for " cite$ * " to crossref " *
+ crossref * warning$
+ "" *
+ }
+ { "{\em " * series * "\/}" * }
+ if$
+ }
+ { key * }
+ if$
+ }
+ { format.crossref.editor * }
+ if$
+ " \cite{" * crossref * "}" *
+}
+
+FUNCTION {format.incoll.inproc.crossref}
+{ editor empty$
+ editor field.or.null author field.or.null =
+ or
+ { key empty$
+ { booktitle empty$
+ { "need editor, key, or booktitle for " cite$ * " to crossref " *
+ crossref * warning$
+ ""
+ }
+ { "In {\em " booktitle * "\/}" * }
+ if$
+ }
+ { "In " key * }
+ if$
+ }
+ { "In " format.crossref.editor * }
+ if$
+ " \cite{" * crossref * "}" *
+}
+
+FUNCTION {article}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.title "title" output.check
+ new.block
+ crossref missing$
+ { journal emphasize "journal" output.check
+ format.vol.num.pages output
+ format.date "year" output.check
+ }
+ { format.article.crossref output.nonnull
+ format.pages output
+ }
+ if$
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {book}
+{ output.bibitem
+ author empty$
+ { format.editors "author and editor" output.check }
+ { format.authors output.nonnull
+ crossref missing$
+ { "author and editor" editor either.or.check }
+ 'skip$
+ if$
+ }
+ if$
+ new.block
+ format.btitle "title" output.check
+ crossref missing$
+ { format.bvolume output
+ new.block
+ format.number.series output
+ new.sentence
+ publisher "publisher" output.check
+ address output
+ }
+ { new.block
+ format.book.crossref output.nonnull
+ }
+ if$
+ format.edition output
+ format.date "year" output.check
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {booklet}
+{ output.bibitem
+ format.authors output
+ new.block
+ format.title "title" output.check
+ howpublished address new.block.checkb
+ howpublished output
+ address output
+ format.date output
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {inbook}
+{ output.bibitem
+ author empty$
+ { format.editors "author and editor" output.check }
+ { format.authors output.nonnull
+ crossref missing$
+ { "author and editor" editor either.or.check }
+ 'skip$
+ if$
+ }
+ if$
+ new.block
+ format.btitle "title" output.check
+ crossref missing$
+ { format.bvolume output
+ format.chapter.pages "chapter and pages" output.check
+ new.block
+ format.number.series output
+ new.sentence
+ publisher "publisher" output.check
+ address output
+ }
+ { format.chapter.pages "chapter and pages" output.check
+ new.block
+ format.book.crossref output.nonnull
+ }
+ if$
+ format.edition output
+ format.date "year" output.check
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {incollection}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.title "title" output.check
+ new.block
+ crossref missing$
+ { format.in.ed.booktitle "booktitle" output.check
+ format.bvolume output
+ format.number.series output
+ format.chapter.pages output
+ new.sentence
+ publisher "publisher" output.check
+ address output
+ format.edition output
+ format.date "year" output.check
+ }
+ { format.incoll.inproc.crossref output.nonnull
+ format.chapter.pages output
+ }
+ if$
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {inproceedings}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.title "title" output.check
+ new.block
+ crossref missing$
+ { format.in.ed.booktitle "booktitle" output.check
+ format.bvolume output
+ format.number.series output
+ format.pages output
+ address empty$
+ { organization publisher new.sentence.checkb
+ organization output
+ publisher output
+ format.date "year" output.check
+ }
+ { address output.nonnull
+ format.date "year" output.check
+ new.sentence
+ organization output
+ publisher output
+ }
+ if$
+ }
+ { format.incoll.inproc.crossref output.nonnull
+ format.pages output
+ }
+ if$
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {conference} { inproceedings }
+
+FUNCTION {manual}
+{ output.bibitem
+ author empty$
+ { organization empty$
+ 'skip$
+ { organization output.nonnull
+ address output
+ }
+ if$
+ }
+ { format.authors output.nonnull }
+ if$
+ new.block
+ format.btitle "title" output.check
+ author empty$
+ { organization empty$
+ { address new.block.checka
+ address output
+ }
+ 'skip$
+ if$
+ }
+ { organization address new.block.checkb
+ organization output
+ address output
+ }
+ if$
+ format.edition output
+ format.date output
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {mastersthesis}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.title "title" output.check
+ new.block
+ "Master's thesis" format.thesis.type output.nonnull
+ school "school" output.check
+ address output
+ format.date "year" output.check
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {misc}
+{ output.bibitem
+ format.authors output
+ title howpublished new.block.checkb
+ format.title output
+ howpublished new.block.checka
+ howpublished output
+ format.date output
+ new.block
+ note output
+ fin.entry
+ empty.misc.check
+}
+
+FUNCTION {phdthesis}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.btitle "title" output.check
+ new.block
+ "PhD thesis" format.thesis.type output.nonnull
+ school "school" output.check
+ address output
+ format.date "year" output.check
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {proceedings}
+{ output.bibitem
+ editor empty$
+ { organization output }
+ { format.editors output.nonnull }
+ if$
+ new.block
+ format.btitle "title" output.check
+ format.bvolume output
+ format.number.series output
+ address empty$
+ { editor empty$
+ { publisher new.sentence.checka }
+ { organization publisher new.sentence.checkb
+ organization output
+ }
+ if$
+ publisher output
+ format.date "year" output.check
+ }
+ { address output.nonnull
+ format.date "year" output.check
+ new.sentence
+ editor empty$
+ 'skip$
+ { organization output }
+ if$
+ publisher output
+ }
+ if$
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {techreport}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.title "title" output.check
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {unpublished}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.title "title" output.check
+ new.block
+ note "note" output.check
+ format.date output
+ fin.entry
+}
+
+FUNCTION {default.type} { misc }
+
+MACRO {jan} {"January"}
+
+MACRO {feb} {"February"}
+
+MACRO {mar} {"March"}
+
+MACRO {apr} {"April"}
+
+MACRO {may} {"May"}
+
+MACRO {jun} {"June"}
+
+MACRO {jul} {"July"}
+
+MACRO {aug} {"August"}
+
+MACRO {sep} {"September"}
+
+MACRO {oct} {"October"}
+
+MACRO {nov} {"November"}
+
+MACRO {dec} {"December"}
+
+MACRO {acmcs} {"ACM Computing Surveys"}
+
+MACRO {acta} {"Acta Informatica"}
+
+MACRO {cacm} {"Communications of the ACM"}
+
+MACRO {ibmjrd} {"IBM Journal of Research and Development"}
+
+MACRO {ibmsj} {"IBM Systems Journal"}
+
+MACRO {ieeese} {"IEEE Transactions on Software Engineering"}
+
+MACRO {ieeetc} {"IEEE Transactions on Computers"}
+
+MACRO {ieeetcad}
+ {"IEEE Transactions on Computer-Aided Design of Integrated Circuits"}
+
+MACRO {ipl} {"Information Processing Letters"}
+
+MACRO {jacm} {"Journal of the ACM"}
+
+MACRO {jcss} {"Journal of Computer and System Sciences"}
+
+MACRO {scp} {"Science of Computer Programming"}
+
+MACRO {sicomp} {"SIAM Journal on Computing"}
+
+MACRO {tocs} {"ACM Transactions on Computer Systems"}
+
+MACRO {tods} {"ACM Transactions on Database Systems"}
+
+MACRO {tog} {"ACM Transactions on Graphics"}
+
+MACRO {toms} {"ACM Transactions on Mathematical Software"}
+
+MACRO {toois} {"ACM Transactions on Office Information Systems"}
+
+MACRO {toplas} {"ACM Transactions on Programming Languages and Systems"}
+
+MACRO {tcs} {"Theoretical Computer Science"}
+
+READ
+
+STRINGS { longest.label }
+
+INTEGERS { number.label longest.label.width }
+
+FUNCTION {initialize.longest.label}
+{ "" 'longest.label :=
+ #1 'number.label :=
+ #0 'longest.label.width :=
+}
+
+FUNCTION {longest.label.pass}
+{ number.label int.to.str$ 'label :=
+ number.label #1 + 'number.label :=
+ label width$ longest.label.width >
+ { label 'longest.label :=
+ label width$ 'longest.label.width :=
+ }
+ 'skip$
+ if$
+}
+
+EXECUTE {initialize.longest.label}
+
+ITERATE {longest.label.pass}
+
+FUNCTION {begin.bib}
+{ preamble$ empty$
+ 'skip$
+ { preamble$ write$ newline$ }
+ if$
+ "\begin{thebibliography}{" longest.label * "}" * write$ newline$
+}
+
+EXECUTE {begin.bib}
+
+EXECUTE {init.state.consts}
+
+ITERATE {call.type$}
+
+FUNCTION {end.bib}
+{ newline$
+ "\end{thebibliography}" write$ newline$
+}
+
+EXECUTE {end.bib}
diff --git a/biblio/bibtex/contrib/misc/nar.bst b/biblio/bibtex/contrib/misc/nar.bst
new file mode 100644
index 0000000000..2a26a5190d
--- /dev/null
+++ b/biblio/bibtex/contrib/misc/nar.bst
@@ -0,0 +1,1144 @@
+% nar.bst was created by Tom Schneider from unsrt.bst
+% version = 3.19 of nar.bst 2011 Dec 23
+% 2011 Dec 23, 3.19 correct year
+% 2011 Dec 23, 3.18 inproceedings bug, line 555 needs another '*'
+% thanks to David Koes dkoes
+% 2010 Dec 05, 3.17 for incollection bug
+% format bvolume needed a '*'
+% 2010 Mar 11, 3.16 techreport - add commas after author and number
+% 2010 Mar 11, 3.15 make unpublished not have two titles ... & date at start
+% 2010 Mar 07, 3.14 Changes from Wolfgang Langer!
+% 2001 Nov 12, 3.13 volume just before pages for inproceedings
+% 2001 Nov 12, 3.12 editor names reversed again...
+% 2001 Jun 15, 3.11 period after title (was comma)
+% 2000 Sep 13, 3.10 introduction of titles as per new NAR instructions
+% 1994 November 30, 3.09 previous version
+
+% Dr. Thomas D. Schneider, Ph.D.
+% National Institutes of Health
+% schneidt@mail.nih.gov
+% toms@alum.mit.edu (permanent)
+% http://alum.mit.edu/www/toms (permanent)
+
+% This is the bibliography definition for
+% Nucleic Acids Research
+% http://nar.oupjournals.org/
+
+% The instructions for authors are at
+% http://www3.oup.co.uk/nar/instauth/
+
+% about titles:
+
+% http://www3.oup.co.uk/nar/instauth/editorial_28_17.html
+% This first appeared in NAR Volume 28, Issue 17, September 1 2000.
+%
+% Titles in References; Papers Longer than 10
+% Printed Pages
+%
+% At the recent Editors' Meeting it was decided that in future all
+% papers, not just Surveys and Summaries, will have titles
+% included in their reference lists. Starting immediately, all
+% authors will be encouraged to include titles, and this will
+% become mandatory for all papers published after January 1 st
+% 2001. The suggested page limit of 8 pages will be relaxed to
+% accommodate this. Some papers require extra space, and so in
+% future all papers longer than 10 pages will incur a per excess
+% printed page charge of euro 20/$200 to help offset the increased
+% costs of production. This charge for pages in excess of 10 will
+% be applied to all printed papers published after January 1st
+% 2001. Note that the charge will not apply to papers published
+% solely in NAR Methods Online, nor to data published online as
+% `Supplementary Material'. Also, the journal will continue to
+% offer free colour printing.
+
+% BibTeX standard bibliography style `unsrt'
+ % version 0.99a for BibTeX versions 0.99a or later, LaTeX version 2.09.
+ % Copyright (C) 1985, all rights reserved.
+ % Copying of this file is authorized only if either
+ % (1) you make absolutely no changes to your copy, including name, or
+ % (2) if you do make changes, you name it something other than
+ % btxbst.doc, plain.bst, unsrt.bst, alpha.bst, and abbrv.bst.
+ % This restriction helps ensure that all standard styles are identical.
+ % The file btxbst.doc has the documentation for this style.
+
+ENTRY
+ { address
+ author
+ booktitle
+ chapter
+ edition
+ editor
+ howpublished
+ institution
+ journal
+ key
+ month
+ note
+ number
+ organization
+ pages
+ publisher
+ school
+ series
+ title
+ type
+ volume
+ year
+ url
+ }
+ {}
+ { label }
+
+INTEGERS { output.state before.all mid.sentence after.sentence after.block
+ doblank straightnames}
+
+FUNCTION {init.state.consts}
+{ #0 'before.all :=
+ #1 'mid.sentence :=
+ #2 'after.sentence :=
+ #3 'after.block :=
+
+ #0 'doblank := % put a blanks in output.nonnul if not zero
+ #0 'straightnames := % force names to be J. B. Smith if not zero
+ % otherwise they are Smith, J. B.
+ % 2001 Nov 12: NAR changed back to the unstraight ...
+}
+
+STRINGS { s t }
+
+FUNCTION {between}
+{ % what to do between output items TDS (AVOID COMMAS)
+ doblank #0 =
+ {" " * write$}
+ {write$}
+ if$
+}
+
+FUNCTION {output.nonnull}
+{ 's :=
+ output.state mid.sentence =
+% { ", " * write$ } % TDS NO COMMAS!!!
+ {
+ between
+ }
+
+ { output.state after.block =
+ {
+% new as of 2001 jun 15:
+% zzz
+% add.period$ write$ % TDS PERIODS!
+ write$ % TDS PERIODS!
+
+% prior to 2001 jun 15:
+%% add.period$ write$ % TDS NO PERIODS!
+% write$ % TDS NO PERIODS!
+
+ newline$
+% "\newblock " write$ % TDS NO NEWBLOCKS: makes for a cleaner file
+ }
+ { output.state before.all =
+ 'write$
+% { add.period$ " " * write$ } % TDS NO PERIODS!!!
+% { " " * write$ } % TDS NO PERIODS!!!
+ {between}
+ if$
+ }
+ if$
+ mid.sentence 'output.state :=
+ }
+ if$
+ s
+}
+
+FUNCTION {output}
+{ duplicate$ empty$
+ 'pop$
+ 'output.nonnull
+ if$
+}
+
+FUNCTION {output.check}
+{ 't :=
+ duplicate$ empty$
+ { pop$ "empty " t * " in " * cite$ * warning$ }
+ 'output.nonnull
+ if$
+}
+
+FUNCTION {output.bibitem}
+{ newline$
+ "\bibitem{" write$
+ cite$ write$
+ "}" write$
+ newline$
+ ""
+ before.all 'output.state :=
+}
+
+FUNCTION {fin.entry}
+{ add.period$
+ write$
+ newline$
+}
+
+FUNCTION {new.block}
+{ output.state before.all =
+ 'skip$
+ { after.block 'output.state := }
+ if$
+}
+
+FUNCTION {new.sentence}
+{ output.state after.block =
+ 'skip$
+ { output.state before.all =
+ 'skip$
+ { after.sentence 'output.state := }
+ if$
+ }
+ if$
+}
+
+FUNCTION {not}
+{ { #0 }
+ { #1 }
+ if$
+}
+
+FUNCTION {and}
+{ 'skip$
+ { pop$ #0 }
+ if$
+}
+
+FUNCTION {or}
+{ { pop$ #1 }
+ 'skip$
+ if$
+}
+
+FUNCTION {new.block.checka}
+{ empty$
+ 'skip$
+ 'new.block
+ if$
+}
+
+FUNCTION {new.block.checkb}
+{ empty$
+ swap$ empty$
+ and
+ 'skip$
+ 'new.block
+ if$
+}
+
+FUNCTION {new.sentence.checka}
+{ empty$
+ 'skip$
+ 'new.sentence
+ if$
+}
+
+FUNCTION {new.sentence.checkb}
+{ empty$
+ swap$ empty$
+ and
+ 'skip$
+ 'new.sentence
+ if$
+}
+
+FUNCTION {field.or.null}
+{ duplicate$ empty$
+ { pop$ "" }
+ 'skip$
+ if$
+}
+
+FUNCTION {emphasize}
+{ duplicate$ empty$
+ { pop$ "" }
+ { "{\em " swap$ * "}" * }
+ if$
+}
+
+INTEGERS { nameptr namesleft numnames }
+
+FUNCTION {format.names}
+{ 's :=
+ #1 'nameptr :=
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ {
+% the original format line: makes "J. D. Smith". TDS
+% s nameptr "{ff~}{vv~}{ll}{, jj}" format.name$ 't := % TDS old formatting
+% the new format line: makes "Smith, J. D.". TDS
+% s nameptr "{vv}{ll}{, jj}{, f.}" format.name$ 't := % TDS new formatting
+% note, no ~ so that the format is straight for NAR.
+
+ straightnames #0 =
+ { s nameptr "{vv~}{ll}{, jj}{, f.}" format.name$ 't := }% TDS; Langer
+ % added blank after vv. 01.03.2010 Wolfram Langer
+ { s nameptr "{ff{ }}{vv}{ ll}{, jj}" format.name$ 't := }% TDS
+ if$
+
+ nameptr #1 >
+ { namesleft #1 >
+ { ", " * t * }
+ { numnames #2 >
+ { "," * }
+ 'skip$
+ if$
+ t "others" =
+% { " et~al." * } % TDS
+ { " et al." * } % TDS no ~
+ { " and " * t * }
+ if$
+ }
+ if$
+ }
+ 't
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+}
+
+FUNCTION {format.authors}
+{ author empty$
+ { "" }
+ { author format.names }
+ if$
+}
+
+FUNCTION {format.editors}
+{
+% #1 'straightnames := % names go as J. B. Smith for editors
+% NAR Changed back!! 2001 Nov 12 TDS
+ editor empty$
+ { "" }
+ { editor format.names
+ editor num.names$ #1 >
+ { ", (eds.)" * } % 2001 Nov 12 TDS
+ { ", (ed.)" * }
+% { ", editors" * }
+% { ", editor" * }
+ if$
+ }
+ if$
+% #0 'straightnames := % names go as Smith, J. B. again
+}
+
+FUNCTION {format.title}
+{ title empty$
+ { "" }
+% { title "t" change.case$ }
+% 2000 Sep 13 TDS put comma after title:
+% { title "," * "t" change.case$ }
+% 2001 Jun 15 TDS put period after title!
+% { title "." * "t" change.case$ }
+% Wolfram Langer, 15.12.2009: No dot after title, no change of the case.
+% TDS: 2010 Mar 07: No, there is a dot after the title, see:
+% http://nar.oxfordjournals.org/cgi/content/full/38/4/1182
+ { title "." * }
+ if$
+}
+
+FUNCTION {n.dashify}
+{ 't :=
+ ""
+ { t empty$ not }
+ { t #1 #1 substring$ "-" =
+ { t #1 #2 substring$ "--" = not
+ { "--" *
+ t #2 global.max$ substring$ 't :=
+ }
+ { { t #1 #1 substring$ "-" = }
+ { "-" *
+ t #2 global.max$ substring$ 't :=
+ }
+ while$
+ }
+ if$
+ }
+ { t #1 #1 substring$ *
+ t #2 global.max$ substring$ 't :=
+ }
+ if$
+ }
+ while$
+}
+
+FUNCTION {format.date}
+{ year empty$
+ { month empty$
+ { "" }
+ { "there's a month but no year in " cite$ * warning$
+ month
+ }
+ if$
+ }
+ { month empty$
+% 'year originally
+ {"(" year ")" * * } % TDS
+ {"(" month ", " year ")" * * * * } % TDS
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.btitle}
+{ title %emphasize not for NAR! TDS
+}
+
+FUNCTION {tie.or.space.connect}
+{ duplicate$ text.length$ #3 <
+ { "~" }
+ { " " }
+ if$
+ swap$ * *
+}
+
+FUNCTION {either.or.check}
+{ empty$
+ 'pop$
+ { "can't use both " swap$ * " fields in " * cite$ * warning$ }
+ if$
+}
+
+FUNCTION {format.bvolume}
+{ volume empty$
+ { "" }
+% { "volume" volume tie.or.space.connect % TDS
+ % TDS add a comma and bold
+% { "volume" "{\bf " volume "}, " * * tie.or.space.connect
+% 2001 Nov 12 no longer bold!!
+% { "volume" volume ", " * tie.or.space.connect
+% 2001 nov 12 now "Vol."
+% { "Vol." volume ", " * tie.or.space.connect
+ { "Vol." volume tie.or.space.connect % TDS 2011 Dec 05 No comma yet!
+ series empty$
+% 'skip$
+% PUT COMMA HERE INSTEAD OF SKIP! REMOVE COMMA ABOVE % TDS 2011 Dec 05
+ {", " *} % TDS
+ %{ " of " * series emphasize * } TDS
+ { " of " * series * ", " * } % TDS book titles not emphasized for NAR
+ % TDS add comma 2011 Dec 05
+ if$
+ "volume and number" number either.or.check
+ }
+ if$
+}
+
+FUNCTION {format.number.series}
+{ volume empty$
+ { number empty$
+ { series field.or.null }
+ { output.state mid.sentence =
+ { "number" }
+ { "Number" }
+ if$
+ number tie.or.space.connect
+ series empty$
+ { "there's a number but no series in " cite$ * warning$ }
+ { " in " * series * }
+ if$
+ }
+ if$
+ }
+ { "" }
+ if$
+}
+
+FUNCTION {format.edition}
+{ edition empty$
+ { "" }
+ { output.state mid.sentence =
+ { " " edition * "l" change.case$ " edition" * } % TDS add space before
+ { " " edition * "t" change.case$ " edition" * } % TDS add space before
+ if$
+ }
+ if$
+}
+
+INTEGERS { multiresult }
+
+FUNCTION {multi.page.check}
+{ 't :=
+ #0 'multiresult :=
+ { multiresult not
+ t empty$ not
+ and
+ }
+ { t #1 #1 substring$
+ duplicate$ "-" =
+ swap$ duplicate$ "," =
+ swap$ "+" =
+ or or
+ { #1 'multiresult := }
+ { t #2 global.max$ substring$ 't := }
+ if$
+ }
+ while$
+ multiresult
+}
+
+FUNCTION {format.pages}
+{ pages empty$
+ { "" }
+ { pages multi.page.check
+% { "pages" pages n.dashify tie.or.space.connect } % TDS
+% { "page" pages tie.or.space.connect } % TDS
+ { "pp." pages n.dashify tie.or.space.connect } % TDS
+ { "p." pages tie.or.space.connect } % TDS
+ if$
+ }
+ if$
+}
+
+
+FUNCTION {format.vol.num.pages}
+%{ volume * field.or.null
+{
+ volume empty$
+ { "" }
+ {"{\bf " volume * field.or.null "}" *} % TDS add boldface
+ if$
+
+ number empty$
+ 'skip$
+ { "(" number * ")" * *
+ volume empty$
+ { "there's a number but no volume in " cite$ * warning$ }
+ 'skip$
+ if$
+ }
+ if$
+ pages empty$
+ 'skip$
+ { duplicate$ empty$
+ { pop$ format.pages }
+% { ":" * pages n.dashify * } % TDS remove colon!
+ { ", " * pages n.dashify * } % TDS replace colon with a comma
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.chapter.pages}
+{ chapter empty$
+ 'format.pages
+ { type empty$
+ { "chapter" }
+ { type "l" change.case$ }
+ if$
+ chapter tie.or.space.connect
+ pages empty$
+ 'skip$
+ { ", " * format.pages * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.in.ed.booktitle}
+{ booktitle empty$
+ { "" }
+ { editor empty$
+ % add colon after "In"
+ %{ "In " booktitle emphasize * } % TDS
+ %{ "In " format.editors * ", " * booktitle emphasize *
+% { "In " booktitle *} % TDS no emphasis in nar!
+% 2001 Nov 12 Now Nar wants emph!!
+ { "In "
+"\emph{"
+booktitle
+"}" * * * % 2011 Dec 23 thanks to dkoes - a * was missing
+} % TDS now emphasis in nar!
+ { "In " format.editors * ", " *
+"\emph{"
+booktitle
+"}" * *
+* % TDS now emphasis in nar!
+ ", " * } % TDS and tack on a comma
+ if$
+ }
+ if$
+}
+
+FUNCTION {empty.misc.check}
+{ author empty$ title empty$ howpublished empty$
+ month empty$ year empty$ note empty$
+ and and and and and
+ { "all relevant fields are empty in " cite$ * warning$ }
+ 'skip$
+ if$
+}
+
+FUNCTION {format.thesis.type}
+{ type empty$
+ 'skip$
+ { pop$
+ type "t" change.case$
+ }
+ if$
+}
+
+FUNCTION {format.tr.number}
+{ type empty$
+ { "Technical Report" }
+ 'type
+ if$
+ number empty$
+ { "t" change.case$ }
+ { number tie.or.space.connect }
+ if$
+}
+
+FUNCTION {format.article.crossref}
+{ key empty$
+ { journal empty$
+ { "need key or journal for " cite$ * " to crossref " * crossref *
+ warning$
+ ""
+ }
+ { "In {\em " journal * "\/}" * } % TDS
+ if$
+ }
+ { "In " key * } % TDS
+ if$
+ " \cite{" * crossref * "}" *
+}
+
+FUNCTION {format.crossref.editor}
+{ editor #1 "{vv~}{ll}" format.name$
+ editor num.names$ duplicate$
+ #2 >
+ { pop$ " et~al." * }
+ { #2 <
+ 'skip$
+ { editor #2 "{ff }{vv }{ll}{ jj}" format.name$ "others" =
+ { " et~al." * }
+ { " and " * editor #2 "{vv~}{ll}" format.name$ * }
+ if$
+ }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.book.crossref}
+{ volume empty$
+ { "empty volume in " cite$ * "'s crossref of " * crossref * warning$
+ "In " % TDS
+ }
+ { "Volume" volume tie.or.space.connect
+ " of " *
+ }
+ if$
+ editor empty$
+ editor field.or.null author field.or.null =
+ or
+ { key empty$
+ { series empty$
+ { "need editor, key, or series for " cite$ * " to crossref " *
+ crossref * warning$
+ "" *
+ }
+ { "{\em " * series * "\/}" * }
+ if$
+ }
+ { key * }
+ if$
+ }
+ { format.crossref.editor * }
+ if$
+ " \cite{" * crossref * "}" *
+}
+
+FUNCTION {format.incoll.inproc.crossref}
+{ editor empty$
+ editor field.or.null author field.or.null =
+ or
+ { key empty$
+ { booktitle empty$
+ { "need editor, key, or booktitle for " cite$ * " to crossref " *
+ crossref * warning$
+ ""
+ }
+ { "In " booktitle * } % TDS
+ if$
+ }
+ { "In " key * } % TDS
+ if$
+ }
+ { "In " format.crossref.editor * } % TDS
+ if$
+ " \cite{" * crossref * "}" *
+}
+
+% Wolfram Langer, 15.12.2009
+FUNCTION {format.url}
+{ url empty$
+ { "" }
+ {"\url{" url * "}" *}
+ if$
+}
+
+FUNCTION {article}
+{ output.bibitem
+ format.authors "author" output.check
+ format.date "year" output.check % TDS move date to here
+ new.block
+% format.title "title" output.check % TDS NO TITLES
+ format.title "title" output.check % TDS NO TITLES; titles as of 2000 Sep 13
+ new.block
+% zzz
+ crossref missing$
+ { journal "," * emphasize "journal" output.check %TDS add ,
+ format.vol.num.pages output
+% format.date "year" output.check % TDS move date
+ }
+ { format.article.crossref output.nonnull
+ format.pages output
+ }
+ if$
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {book}
+{ output.bibitem
+ author empty$
+ { format.editors "author and editor" output.check }
+ { format.authors output.nonnull
+ crossref missing$
+ { "author and editor" editor either.or.check }
+ 'skip$
+ if$
+ }
+ if$
+
+ format.date "year" output.check % TDS new location
+ new.block
+ #1 'doblank := % remove blanks TDS
+ format.btitle "title" output.check
+ ", " output % give it a comma after the title TDS
+ crossref missing$
+ { format.bvolume output
+ new.block
+ format.number.series output
+ new.sentence
+ publisher "publisher" output.check
+ ", " output % give it a comma after the publisher TDS
+ address output
+ }
+ { new.block
+ format.book.crossref output.nonnull
+ }
+ if$
+ format.edition output
+% format.date "year" output.check % TDS former location
+ new.block
+ note output
+ fin.entry
+ #0 'doblank := % blanks again TDS
+}
+
+FUNCTION {booklet}
+{ output.bibitem
+ format.authors output
+ new.block
+ format.title "title" output.check
+ howpublished address new.block.checkb
+ howpublished output
+ address output
+ format.date output
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {inbook}
+{ output.bibitem
+ author empty$
+ { format.editors "author and editor" output.check }
+ { format.authors output.nonnull
+ crossref missing$
+ { "author and editor" editor either.or.check }
+ 'skip$
+ if$
+ }
+ if$
+ new.block
+ format.btitle "title" output.check
+ crossref missing$
+ { format.bvolume output
+ format.chapter.pages "chapter and pages" output.check
+ new.block
+ format.number.series output
+ new.sentence
+ publisher "publisher" output.check
+ address output
+ }
+ { format.chapter.pages "chapter and pages" output.check
+ new.block
+ format.book.crossref output.nonnull
+ }
+ if$
+ format.edition output
+ format.date "year" output.check
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {incollection}
+{ output.bibitem
+ format.authors "author" output.check
+ format.date "year" output.check % TDS
+ new.block
+ format.title "title" output.check
+ new.block
+ crossref missing$
+ { format.in.ed.booktitle "booktitle" output.check
+ format.bvolume output
+ format.number.series output
+ format.chapter.pages output
+ new.sentence
+ publisher "publisher" output.check
+ address output
+ format.edition output
+% format.date "year" output.check % TDS
+ }
+ { format.incoll.inproc.crossref output.nonnull
+ format.chapter.pages output
+ }
+ if$
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {inproceedings}
+{ output.bibitem
+ format.authors "author" output.check
+ format.date "year" output.check % TDS
+ new.block
+ format.title "title" output.check % TDS NO TITLE, titles 2000 Sep 13
+% 2001 Nov 12 Now make this title emph!!
+% TDS NO TITLE, titles 2000 Sep 13
+ new.block
+ crossref missing$
+ {
+ format.in.ed.booktitle "booktitle"
+%"\emph{"
+% "}" * *
+output.check
+% qqq
+% format.bvolume output
+% format.number.series output
+% format.pages output % TDS pages go at the end
+ address empty$
+ { organization publisher new.sentence.checkb
+ organization output
+% 2001 nov 12: no longer colon! TDS
+% ": " output % TDS put a colon
+ publisher output
+% format.date "year" output.check
+ }
+ { address output.nonnull
+% format.date "year" output.check
+ new.sentence
+ #1 'doblank := % remove blanks
+ organization output
+ ": " output % TDS put a colon after the location
+ publisher output
+% ". " output % TDS put a period after the publisher
+ #0 'doblank := % put back blanks
+ }
+ if$
+ }
+ { format.incoll.inproc.crossref output.nonnull
+% format.pages output % TDS pages go at the end
+ }
+ if$
+ new.block
+ note output
+ format.bvolume output % TDS goes at end
+ format.number.series output % TDS goes at end
+ format.pages output % TDS pages go at the end
+ fin.entry
+}
+
+FUNCTION {conference} { inproceedings }
+
+FUNCTION {manual}
+{ output.bibitem
+ author empty$
+ { organization empty$
+ 'skip$
+ { organization output.nonnull
+ address output
+ }
+ if$
+ }
+ { format.authors output.nonnull }
+ if$
+ new.block
+ format.btitle "title" output.check
+ author empty$
+ { organization empty$
+ { address new.block.checka
+ address output
+ }
+ 'skip$
+ if$
+ }
+ { organization address new.block.checkb
+ organization output
+ address output
+ }
+ if$
+ format.edition output
+ format.date output
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {mastersthesis}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.title "title" output.check
+ new.block
+ "Master's thesis" format.thesis.type output.nonnull
+ school "school" output.check
+ address output
+ format.date "year" output.check
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {misc}
+{ output.bibitem
+ format.authors output
+ title howpublished new.block.checkb
+ format.title output
+ howpublished new.block.checka
+ howpublished output
+ format.date output
+ new.block
+ note output
+ fin.entry
+ empty.misc.check
+}
+
+% Wolfram Langer, 15.12.2009
+FUNCTION {electronic}
+{ output.bibitem
+ format.authors "author" output.check
+ note output
+ format.date "year" output.check
+ new.block
+ title ", available: " * format.url * "title" output.check
+ fin.entry
+}
+
+FUNCTION {phdthesis}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.btitle "title" output.check
+ new.block
+ "PhD thesis" format.thesis.type output.nonnull
+ school "school" output.check
+ address output
+ format.date "year" output.check
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {proceedings}
+{ output.bibitem
+ editor empty$
+ { organization output }
+ { format.editors output.nonnull }
+ if$
+ new.block
+ format.btitle "title" output.check
+ format.bvolume output
+ format.number.series output
+ address empty$
+ { editor empty$
+ { publisher new.sentence.checka }
+ { organization publisher new.sentence.checkb
+ organization output
+ }
+ if$
+ publisher output
+ format.date "year" output.check
+ }
+ { address output.nonnull
+ format.date "year" output.check
+ new.sentence
+ editor empty$
+ 'skip$
+ { organization output }
+ if$
+ publisher output
+ }
+ if$
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {techreport}
+{ output.bibitem
+ format.authors ", " * "author" output.check
+ new.block
+ format.title "title" output.check
+ new.block
+ format.tr.number ", " * output.nonnull
+ institution "institution" output.check
+ address output
+ format.date "year" output.check
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {unpublished}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.date output
+ format.title "title" output.check % titles as of 2000 Sep 13
+% format.title ", " * "title" output.check
+ new.block
+ note "note" output.check
+ fin.entry
+}
+
+FUNCTION {default.type} { misc }
+
+MACRO {jan} {"January"}
+
+MACRO {feb} {"February"}
+
+MACRO {mar} {"March"}
+
+MACRO {apr} {"April"}
+
+MACRO {may} {"May"}
+
+MACRO {jun} {"June"}
+
+MACRO {jul} {"July"}
+
+MACRO {aug} {"August"}
+
+MACRO {sep} {"September"}
+
+MACRO {oct} {"October"}
+
+MACRO {nov} {"November"}
+
+MACRO {dec} {"December"}
+
+MACRO {acmcs} {"ACM Computing Surveys"}
+
+MACRO {acta} {"Acta Informatica"}
+
+MACRO {cacm} {"Communications of the ACM"}
+
+MACRO {ibmjrd} {"IBM Journal of Research and Development"}
+
+MACRO {ibmsj} {"IBM Systems Journal"}
+
+MACRO {ieeese} {"IEEE Transactions on Software Engineering"}
+
+MACRO {ieeetc} {"IEEE Transactions on Computers"}
+
+MACRO {ieeetcad}
+ {"IEEE Transactions on Computer-Aided Design of Integrated Circuits"}
+
+MACRO {ipl} {"Information Processing Letters"}
+
+MACRO {jacm} {"Journal of the ACM"}
+
+MACRO {jcss} {"Journal of Computer and System Sciences"}
+
+MACRO {scp} {"Science of Computer Programming"}
+
+MACRO {sicomp} {"SIAM Journal on Computing"}
+
+MACRO {tocs} {"ACM Transactions on Computer Systems"}
+
+MACRO {tods} {"ACM Transactions on Database Systems"}
+
+MACRO {tog} {"ACM Transactions on Graphics"}
+
+MACRO {toms} {"ACM Transactions on Mathematical Software"}
+
+MACRO {toois} {"ACM Transactions on Office Information Systems"}
+
+MACRO {toplas} {"ACM Transactions on Programming Languages and Systems"}
+
+MACRO {tcs} {"Theoretical Computer Science"}
+
+READ
+
+STRINGS { longest.label }
+
+INTEGERS { number.label longest.label.width }
+
+FUNCTION {initialize.longest.label}
+{ "" 'longest.label :=
+ #1 'number.label :=
+ #0 'longest.label.width :=
+}
+
+FUNCTION {longest.label.pass}
+{ number.label int.to.str$ 'label :=
+ number.label #1 + 'number.label :=
+ label width$ longest.label.width >
+ { label 'longest.label :=
+ label width$ 'longest.label.width :=
+ }
+ 'skip$
+ if$
+}
+
+EXECUTE {initialize.longest.label}
+
+ITERATE {longest.label.pass}
+
+FUNCTION {begin.bib}
+{ preamble$ empty$
+ 'skip$
+ { preamble$ write$ newline$ }
+ if$
+ "\begin{thebibliography}{" longest.label * "}" * write$ newline$
+}
+
+EXECUTE {begin.bib}
+
+EXECUTE {init.state.consts}
+
+ITERATE {call.type$}
+
+FUNCTION {end.bib}
+{ newline$
+ "\end{thebibliography}" write$ newline$
+}
+
+EXECUTE {end.bib}
diff --git a/biblio/bibtex/contrib/misc/neuron.bst b/biblio/bibtex/contrib/misc/neuron.bst
new file mode 100644
index 0000000000..a1d2618465
--- /dev/null
+++ b/biblio/bibtex/contrib/misc/neuron.bst
@@ -0,0 +1,1481 @@
+%%
+%% This is file `neuron.bst', created 06/28/01
+%% by Dan Rizzuto (rizzuto@brandeis.edu)
+%%
+%% This will format your manuscript bibliography for submission
+%% to the journal Neuron (www.neuron.org).
+%%
+%%
+%%
+ %-------------------------------------------------------------------
+ % The original source file contains the following version information:
+ % \ProvidesFile{merlin.mbs}[1996/12/16 3.82 (PWD)]
+ %
+ % NOTICE:
+ % This file may be used for non-profit purposes.
+ % It may not be distributed in exchange for money,
+ % other than distribution costs.
+ %
+ % The author provides it `as is' and does not guarantee it in any way.
+ %
+ % Copyright (C) 1994, 1995, 1996 Patrick W. Daly
+ %-------------------------------------------------------------------
+ % For use with BibTeX version 0.99a or later
+ %-------------------------------------------------------------------
+ % This bibliography style file is intended for texts in ENGLISH
+ % This is an author-year citation style bibliography. As such, it is
+ % non-standard LaTeX, and requires a special package file to function properly.
+ % Such a package is natbib.sty by Patrick W. Daly
+ % The form of the \bibitem entries is
+ % \bibitem[Jones et al.(1990)]{key}...
+ % \bibitem[Jones et al.(1990)Jones, Baker, and Smith]{key}...
+ % The essential feature is that the label (the part in brackets) consists
+ % of the author names, as they should appear in the citation, with the year
+ % in parentheses following. There must be no space before the opening
+ % parenthesis!
+ % With natbib v5.3, a full list of authors may also follow the year.
+ % In natbib.sty, it is possible to define the type of enclosures that is
+ % really wanted (brackets or parentheses), but in either case, there must
+ % be parentheses in the label.
+ % The \cite command functions as follows:
+ % \cite{key} ==>> Jones et al. (1990)
+ % \cite[]{key} ==>> (Jones et al., 1990)
+ % \cite[chap. 2]{key} ==>> (Jones et al., 1990, chap. 2)
+ % \cite[e.g.][]{key} ==>> (e.g. Jones et al., 1990)
+ % \cite[e.g.][p. 32]{key} ==>> (e.g. Jones et al., p. 32)
+ % \citeauthor{key} Jones et al.
+ % \citefullauthor{key} Jones, Baker, and Smith
+ % \citeyear{key} 1990
+ %---------------------------------------------------------------------
+
+ENTRY
+ { address
+ author
+ booktitle
+ chapter
+ edition
+ editor
+ howpublished
+ institution
+ journal
+ key
+ month
+ note
+ number
+ organization
+ pages
+ publisher
+ school
+ series
+ title
+ type
+ volume
+ year
+ }
+ {}
+ { label extra.label sort.label short.list }
+
+INTEGERS { output.state before.all mid.sentence after.sentence after.block }
+
+FUNCTION {init.state.consts}
+{ #0 'before.all :=
+ #1 'mid.sentence :=
+ #2 'after.sentence :=
+ #3 'after.block :=
+}
+
+STRINGS { s t }
+
+FUNCTION {output.nonnull}
+{ 's :=
+ output.state mid.sentence =
+ { ", " * write$ }
+ { output.state after.block =
+ { add.period$ write$
+ newline$
+ "\newblock " write$
+ }
+ { output.state before.all =
+ 'write$
+ { add.period$ " " * write$ }
+ if$
+ }
+ if$
+ mid.sentence 'output.state :=
+ }
+ if$
+ s
+}
+
+FUNCTION {output}
+{ duplicate$ empty$
+ 'pop$
+ 'output.nonnull
+ if$
+}
+
+FUNCTION {output.check}
+{ 't :=
+ duplicate$ empty$
+ { pop$ "empty " t * " in " * cite$ * warning$ }
+ 'output.nonnull
+ if$
+}
+
+FUNCTION {fin.entry}
+{ add.period$
+ write$
+ newline$
+}
+
+FUNCTION {new.block}
+{ output.state before.all =
+ 'skip$
+ { after.block 'output.state := }
+ if$
+}
+
+FUNCTION {new.sentence}
+{ output.state after.block =
+ 'skip$
+ { output.state before.all =
+ 'skip$
+ { after.sentence 'output.state := }
+ if$
+ }
+ if$
+}
+
+FUNCTION {add.blank}
+{ " " * before.all 'output.state :=
+}
+
+FUNCTION {date.block}
+{
+ new.block
+}
+
+FUNCTION {not}
+{ { #0 }
+ { #1 }
+ if$
+}
+
+FUNCTION {and}
+{ 'skip$
+ { pop$ #0 }
+ if$
+}
+
+FUNCTION {or}
+{ { pop$ #1 }
+ 'skip$
+ if$
+}
+
+FUNCTION {non.stop}
+{ duplicate$
+ "}" * add.period$
+ #-1 #1 substring$ "." =
+}
+
+FUNCTION {new.block.checkb}
+{ empty$
+ swap$ empty$
+ and
+ 'skip$
+ 'new.block
+ if$
+}
+
+FUNCTION {field.or.null}
+{ duplicate$ empty$
+ { pop$ "" }
+ 'skip$
+ if$
+}
+
+FUNCTION {emphasize}
+{ duplicate$ empty$
+ { pop$ "" }
+ { "\emph{" swap$ * "}" * }
+ if$
+}
+
+FUNCTION {bolden}
+{ duplicate$ empty$
+ { pop$ "" }
+ { "\textbf{" swap$ * "}" * }
+ if$
+}
+
+FUNCTION {capitalize}
+{ "u" change.case$ "t" change.case$ }
+
+FUNCTION {space.word}
+{ " " swap$ * " " * }
+
+ % Here are the language-specific definitions for explicit words.
+ % Each function has a name bbl.xxx where xxx is the English word.
+ % The language selected here is ENGLISH
+FUNCTION {bbl.and}
+{ "and"}
+
+FUNCTION {bbl.editors}
+{ "eds." }
+
+FUNCTION {bbl.editor}
+{ "ed." }
+
+FUNCTION {bbl.edby}
+{ "edited by" }
+
+FUNCTION {bbl.edition}
+{ "edn." }
+
+FUNCTION {bbl.volume}
+{ "vol." }
+
+FUNCTION {bbl.of}
+{ "of" }
+
+FUNCTION {bbl.number}
+{ "no." }
+
+FUNCTION {bbl.nr}
+{ "no." }
+
+FUNCTION {bbl.in}
+{ "in" }
+
+FUNCTION {bbl.pages}
+{ "pp." }
+
+FUNCTION {bbl.page}
+{ "p." }
+
+FUNCTION {bbl.chapter}
+{ "chap." }
+
+FUNCTION {bbl.techrep}
+{ "Tech. Rep." }
+
+FUNCTION {bbl.mthesis}
+{ "Master's thesis" }
+
+FUNCTION {bbl.phdthesis}
+{ "Ph.D. thesis" }
+
+FUNCTION {bbl.first}
+{ "1st" }
+
+FUNCTION {bbl.second}
+{ "2nd" }
+
+FUNCTION {bbl.third}
+{ "3rd" }
+
+FUNCTION {bbl.fourth}
+{ "4th" }
+
+FUNCTION {bbl.fifth}
+{ "5th" }
+
+FUNCTION {bbl.st}
+{ "st" }
+
+FUNCTION {bbl.nd}
+{ "nd" }
+
+FUNCTION {bbl.rd}
+{ "rd" }
+
+FUNCTION {bbl.th}
+{ "th" }
+
+MACRO {jan} {"Jan."}
+
+MACRO {feb} {"Feb."}
+
+MACRO {mar} {"Mar."}
+
+MACRO {apr} {"Apr."}
+
+MACRO {may} {"May"}
+
+MACRO {jun} {"Jun."}
+
+MACRO {jul} {"Jul."}
+
+MACRO {aug} {"Aug."}
+
+MACRO {sep} {"Sep."}
+
+MACRO {oct} {"Oct."}
+
+MACRO {nov} {"Nov."}
+
+MACRO {dec} {"Dec."}
+
+FUNCTION {eng.ord}
+{ duplicate$ "1" swap$ *
+ #-2 #1 substring$ "1" =
+ { bbl.th * }
+ { duplicate$ #-1 #1 substring$
+ duplicate$ "1" =
+ { pop$ bbl.st * }
+ { duplicate$ "2" =
+ { pop$ bbl.nd * }
+ { "3" =
+ { bbl.rd * }
+ { bbl.th * }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+}
+
+MACRO {acmcs} {"ACM Computing Surveys"}
+
+MACRO {acta} {"Acta Informatica"}
+
+MACRO {cacm} {"Communications of the ACM"}
+
+MACRO {ibmjrd} {"IBM Journal of Research and Development"}
+
+MACRO {ibmsj} {"IBM Systems Journal"}
+
+MACRO {ieeese} {"IEEE Transactions on Software Engineering"}
+
+MACRO {ieeetc} {"IEEE Transactions on Computers"}
+
+MACRO {ieeetcad}
+ {"IEEE Transactions on Computer-Aided Design of Integrated Circuits"}
+
+MACRO {ipl} {"Information Processing Letters"}
+
+MACRO {jacm} {"Journal of the ACM"}
+
+MACRO {jcss} {"Journal of Computer and System Sciences"}
+
+MACRO {scp} {"Science of Computer Programming"}
+
+MACRO {sicomp} {"SIAM Journal on Computing"}
+
+MACRO {tocs} {"ACM Transactions on Computer Systems"}
+
+MACRO {tods} {"ACM Transactions on Database Systems"}
+
+MACRO {tog} {"ACM Transactions on Graphics"}
+
+MACRO {toms} {"ACM Transactions on Mathematical Software"}
+
+MACRO {toois} {"ACM Transactions on Office Information Systems"}
+
+MACRO {toplas} {"ACM Transactions on Programming Languages and Systems"}
+
+MACRO {tcs} {"Theoretical Computer Science"}
+
+INTEGERS { nameptr namesleft numnames }
+
+FUNCTION {format.names}
+{ 's :=
+ #1 'nameptr :=
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ { s nameptr
+ "{vv~}{ll}{, jj}{, f.}" format.name$ 't :=
+ nameptr #1 >
+ {
+ namesleft #1 >
+ { ", " * t * }
+ {
+ numnames #2 >
+ { "," * }
+ 'skip$
+ if$
+ t "others" =
+ { " et~al." * }
+ { " \& " * t * }
+ if$
+ }
+ if$
+ }
+ 't
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+}
+
+FUNCTION {format.names.ed}
+{ 's :=
+ #1 'nameptr :=
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ { s nameptr
+ "{f.~}{vv~}{ll}{, jj}"
+ format.name$ 't :=
+ nameptr #1 >
+ {
+ namesleft #1 >
+ { ", " * t * }
+ {
+ numnames #2 >
+ { "," * }
+ 'skip$
+ if$
+ t "others" =
+ { " et~al." * }
+ { " \& " * t * }
+ if$
+ }
+ if$
+ }
+ 't
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+}
+
+FUNCTION {format.key}
+{ empty$
+ { key field.or.null }
+ { "" }
+ if$
+}
+
+FUNCTION {format.authors}
+{ author empty$
+ { "" }
+ {
+ author format.names
+ }
+ if$
+}
+
+FUNCTION {format.editors}
+{ editor empty$
+ { "" }
+ {
+ editor format.names
+ editor num.names$ #1 >
+ { " " * bbl.editors * }
+ { " " * bbl.editor * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.in.editors}
+{ editor empty$
+ { "" }
+ { editor format.names.ed
+ editor num.names$ #1 >
+ { ", " * bbl.editors * }
+ { ", " * bbl.editor * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.title}
+{ title empty$
+ { "" }
+ { title "t" change.case$
+ }
+ if$
+}
+
+FUNCTION {format.full.names}
+{'s :=
+ #1 'nameptr :=
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ { s nameptr
+ "{vv~}{ll}" format.name$ 't :=
+ nameptr #1 >
+ {
+ namesleft #1 >
+ { ", " * t * }
+ {
+ numnames #2 >
+ { "," * }
+ 'skip$
+ if$
+ t "others" =
+ { " et~al." * }
+ { " \& " * t * }
+ if$
+ }
+ if$
+ }
+ 't
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+}
+
+FUNCTION {author.editor.key.full}
+{ author empty$
+ { editor empty$
+ { key empty$
+ { cite$ #1 #3 substring$ }
+ 'key
+ if$
+ }
+ { editor format.full.names }
+ if$
+ }
+ { author format.full.names }
+ if$
+}
+
+FUNCTION {author.key.full}
+{ author empty$
+ { key empty$
+ { cite$ #1 #3 substring$ }
+ 'key
+ if$
+ }
+ { author format.full.names }
+ if$
+}
+
+FUNCTION {editor.key.full}
+{ editor empty$
+ { key empty$
+ { cite$ #1 #3 substring$ }
+ 'key
+ if$
+ }
+ { editor format.full.names }
+ if$
+}
+
+FUNCTION {make.full.names}
+{ type$ "book" =
+ type$ "inbook" =
+ or
+ 'author.editor.key.full
+ { type$ "proceedings" =
+ 'editor.key.full
+ 'author.key.full
+ if$
+ }
+ if$
+}
+
+FUNCTION {output.bibitem}
+{ newline$
+ "\bibitem[" write$
+ label write$
+ ")" make.full.names duplicate$ short.list =
+ { pop$ }
+ { * }
+ if$
+ "]{" * write$
+ cite$ write$
+ "}" write$
+ newline$
+ ""
+ before.all 'output.state :=
+}
+
+FUNCTION {n.dashify}
+{ 't :=
+ ""
+ { t empty$ not }
+ { t #1 #1 substring$ "-" =
+ { t #1 #2 substring$ "--" = not
+ { "--" *
+ t #2 global.max$ substring$ 't :=
+ }
+ { { t #1 #1 substring$ "-" = }
+ { "-" *
+ t #2 global.max$ substring$ 't :=
+ }
+ while$
+ }
+ if$
+ }
+ { t #1 #1 substring$ *
+ t #2 global.max$ substring$ 't :=
+ }
+ if$
+ }
+ while$
+}
+
+FUNCTION {word.in}
+{ bbl.in capitalize
+ " " * }
+
+FUNCTION {format.date}
+{ year duplicate$ empty$
+ { "empty year in " cite$ * "; set to ????" * warning$
+ pop$ "????" }
+ 'skip$
+ if$
+ extra.label *
+ before.all 'output.state :=
+ " (" swap$ * ")" *
+}
+
+FUNCTION {format.btitle}
+{ title }
+
+FUNCTION {tie.or.space.connect}
+{ duplicate$ text.length$ #3 <
+ { "~" }
+ { " " }
+ if$
+ swap$ * *
+}
+
+FUNCTION {either.or.check}
+{ empty$
+ 'pop$
+ { "can't use both " swap$ * " fields in " * cite$ * warning$ }
+ if$
+}
+
+FUNCTION {format.bvolume}
+{ volume empty$
+ { "" }
+ { bbl.volume volume tie.or.space.connect
+ series empty$
+ 'skip$
+ { bbl.of space.word * series emphasize * }
+ if$
+ "volume and number" number either.or.check
+ }
+ if$
+}
+
+FUNCTION {format.number.series}
+{ volume empty$
+ { number empty$
+ { series field.or.null }
+ { output.state mid.sentence =
+ { bbl.number }
+ { bbl.number capitalize }
+ if$
+ number tie.or.space.connect
+ series empty$
+ { "there's a number but no series in " cite$ * warning$ }
+ { bbl.in space.word * series * }
+ if$
+ }
+ if$
+ }
+ { "" }
+ if$
+}
+
+FUNCTION {is.num}
+{ chr.to.int$
+ duplicate$ "0" chr.to.int$ < not
+ swap$ "9" chr.to.int$ > not and
+}
+
+FUNCTION {extract.num}
+{ duplicate$ 't :=
+ "" 's :=
+ { t empty$ not }
+ { t #1 #1 substring$
+ t #2 global.max$ substring$ 't :=
+ duplicate$ is.num
+ { s swap$ * 's := }
+ { pop$ "" 't := }
+ if$
+ }
+ while$
+ s empty$
+ 'skip$
+ { pop$ s }
+ if$
+}
+
+FUNCTION {convert.edition}
+{ edition extract.num "l" change.case$ 's :=
+ s "first" = s "1" = or
+ { bbl.first 't := }
+ { s "second" = s "2" = or
+ { bbl.second 't := }
+ { s "third" = s "3" = or
+ { bbl.third 't := }
+ { s "fourth" = s "4" = or
+ { bbl.fourth 't := }
+ { s "fifth" = s "5" = or
+ { bbl.fifth 't := }
+ { s #1 #1 substring$ is.num
+ { s eng.ord 't := }
+ { edition 't := }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+ t
+}
+
+FUNCTION {format.edition}
+{ edition empty$
+ { "" }
+ { output.state mid.sentence =
+ { convert.edition "l" change.case$ " " * bbl.edition * }
+ { convert.edition "t" change.case$ " " * bbl.edition * }
+ if$
+ }
+ if$
+}
+
+INTEGERS { multiresult }
+
+FUNCTION {multi.page.check}
+{ 't :=
+ #0 'multiresult :=
+ { multiresult not
+ t empty$ not
+ and
+ }
+ { t #1 #1 substring$
+ duplicate$ "-" =
+ swap$ duplicate$ "," =
+ swap$ "+" =
+ or or
+ { #1 'multiresult := }
+ { t #2 global.max$ substring$ 't := }
+ if$
+ }
+ while$
+ multiresult
+}
+
+FUNCTION {format.pages}
+{ pages empty$
+ { "" }
+ { pages multi.page.check
+ { bbl.pages pages n.dashify tie.or.space.connect }
+ { bbl.page pages tie.or.space.connect }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.journal.pages}
+{
+ pages empty$
+ 'skip$
+ { duplicate$ empty$
+ { pop$ format.pages }
+ { ", " * pages n.dashify * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.vol.num.pages}
+{ volume field.or.null
+ format.journal.pages
+}
+
+FUNCTION {format.chapter.pages}
+{ chapter empty$
+ 'format.pages
+ { type empty$
+ { bbl.chapter }
+ { type "l" change.case$ }
+ if$
+ chapter tie.or.space.connect
+ pages empty$
+ 'skip$
+ { ", " * format.pages * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.in.ed.booktitle}
+{ booktitle empty$
+ { "" }
+ { editor empty$
+ { word.in booktitle * }
+ { word.in booktitle * ", " * format.in.editors *}
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.thesis.type}
+{ type empty$
+ 'skip$
+ { pop$
+ type "t" change.case$
+ }
+ if$
+}
+
+FUNCTION {format.tr.number}
+{ type empty$
+ { bbl.techrep }
+ 'type
+ if$
+ number empty$
+ { "t" change.case$ }
+ { number tie.or.space.connect }
+ if$
+}
+
+FUNCTION {format.article.crossref}
+{
+ word.in
+ " \cite{" * crossref * "}" *
+}
+
+FUNCTION {format.book.crossref}
+{ volume empty$
+ { "empty volume in " cite$ * "'s crossref of " * crossref * warning$
+ word.in
+ }
+ { bbl.volume capitalize
+ volume tie.or.space.connect
+ bbl.of space.word *
+ }
+ if$
+ " \cite{" * crossref * "}" *
+}
+
+FUNCTION {format.incoll.inproc.crossref}
+{
+ word.in
+ " \cite{" * crossref * "}" *
+}
+
+FUNCTION {format.publisher}
+{ publisher empty$
+ { "empty publisher in " cite$ * warning$ }
+ 'skip$
+ if$
+ ""
+ address empty$ publisher empty$ and
+ 'skip$
+ {
+ "(" *
+ address empty$
+ 'skip$
+ { address * }
+ if$
+ publisher empty$
+ 'skip$
+ { address empty$
+ 'skip$
+ { ": " * }
+ if$
+ publisher *
+ }
+ if$
+ ")" *
+ }
+ if$
+ output
+}
+
+FUNCTION {article}
+{ output.bibitem
+ format.authors "author" output.check
+ author format.key output
+ format.date "year" output.check
+ date.block
+ format.title "title" output.check
+ new.block
+ crossref missing$
+ { journal
+ "journal" output.check
+ format.vol.num.pages output
+ }
+ { format.article.crossref output.nonnull
+ format.pages output
+ }
+ if$
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {book}
+{ output.bibitem
+ author empty$
+ { format.editors "author and editor" output.check
+ editor format.key output
+ }
+ { format.authors output.nonnull
+ crossref missing$
+ { "author and editor" editor either.or.check }
+ 'skip$
+ if$
+ }
+ if$
+ format.date "year" output.check
+ date.block
+ format.btitle "title" output.check
+ crossref missing$
+ { format.bvolume output
+ new.block
+ format.number.series output
+ new.sentence
+ format.publisher
+ }
+ {
+ new.block
+ format.book.crossref output.nonnull
+ }
+ if$
+ format.edition output
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {booklet}
+{ output.bibitem
+ format.authors output
+ author format.key output
+ format.date "year" output.check
+ date.block
+ format.title "title" output.check
+ new.block
+ howpublished output
+ address output
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {inbook}
+{ output.bibitem
+ author empty$
+ { format.editors "author and editor" output.check
+ editor format.key output
+ }
+ { format.authors output.nonnull
+ crossref missing$
+ { "author and editor" editor either.or.check }
+ 'skip$
+ if$
+ }
+ if$
+ format.date "year" output.check
+ date.block
+ format.btitle "title" output.check
+ crossref missing$
+ {
+ format.bvolume output
+ format.chapter.pages "chapter and pages" output.check
+ new.block
+ format.number.series output
+ new.sentence
+ format.publisher
+ }
+ {
+ format.chapter.pages "chapter and pages" output.check
+ new.block
+ format.book.crossref output.nonnull
+ }
+ if$
+ format.edition output
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {incollection}
+{ output.bibitem
+ format.authors "author" output.check
+ author format.key output
+ format.date "year" output.check
+ date.block
+ format.title "title" output.check
+ new.block
+ crossref missing$
+ { format.in.ed.booktitle "booktitle" output.check
+ format.bvolume output
+ format.number.series output
+ new.sentence
+ format.publisher
+ format.edition output
+ format.chapter.pages output
+ }
+ { format.incoll.inproc.crossref output.nonnull
+ format.chapter.pages output
+ }
+ if$
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {inproceedings}
+{ output.bibitem
+ format.authors "author" output.check
+ author format.key output
+ format.date "year" output.check
+ date.block
+ format.title "title" output.check
+ new.block
+ crossref missing$
+ { format.in.ed.booktitle "booktitle" output.check
+ format.bvolume output
+ format.number.series output
+ format.pages output
+ new.sentence
+ publisher empty$
+ { organization output
+ address output
+ }
+ { organization output
+ format.publisher
+ }
+ if$
+ }
+ { format.incoll.inproc.crossref output.nonnull
+ format.pages output
+ }
+ if$
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {conference} { inproceedings }
+
+FUNCTION {manual}
+{ output.bibitem
+ format.authors output
+ author format.key output
+ format.date "year" output.check
+ date.block
+ format.btitle "title" output.check
+ organization address new.block.checkb
+ organization output
+ address output
+ format.edition output
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {mastersthesis}
+{ output.bibitem
+ format.authors "author" output.check
+ author format.key output
+ format.date "year" output.check
+ date.block
+ format.btitle "title" output.check
+ new.block
+ bbl.mthesis format.thesis.type output.nonnull
+ school "school" output.check
+ address output
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {misc}
+{ output.bibitem
+ format.authors output
+ author format.key output
+ format.date "year" output.check
+ date.block
+ format.title output
+ new.block
+ howpublished output
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {phdthesis}
+{ output.bibitem
+ format.authors "author" output.check
+ author format.key output
+ format.date "year" output.check
+ date.block
+ format.btitle "title" output.check
+ new.block
+ bbl.phdthesis format.thesis.type output.nonnull
+ school "school" output.check
+ address output
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {proceedings}
+{ output.bibitem
+ format.editors output
+ editor format.key output
+ format.date "year" output.check
+ date.block
+ format.btitle "title" output.check
+ format.bvolume output
+ format.number.series output
+ address output
+ new.sentence
+ organization output
+ publisher output
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {techreport}
+{ output.bibitem
+ format.authors "author" output.check
+ author format.key output
+ format.date "year" output.check
+ date.block
+ format.title "title" output.check
+ new.block
+ format.tr.number output.nonnull
+ institution "institution" output.check
+ address output
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {unpublished}
+{ output.bibitem
+ format.authors "author" output.check
+ author format.key output
+ format.date "year" output.check
+ date.block
+ format.title "title" output.check
+ new.block
+ note "note" output.check
+ fin.entry
+}
+
+FUNCTION {default.type} { misc }
+
+READ
+
+FUNCTION {sortify}
+{ purify$
+ "l" change.case$
+}
+
+INTEGERS { len }
+
+FUNCTION {chop.word}
+{ 's :=
+ 'len :=
+ s #1 len substring$ =
+ { s len #1 + global.max$ substring$ }
+ 's
+ if$
+}
+
+FUNCTION {format.lab.names}
+{ 's :=
+ s #1 "{vv~}{ll}" format.name$
+ s num.names$ duplicate$
+ #2 >
+ { pop$ " et~al." * }
+ { #2 <
+ 'skip$
+ { s #2 "{ff }{vv }{ll}{ jj}" format.name$ "others" =
+ { " et~al." * }
+ { " \& " * s #2 "{vv~}{ll}" format.name$ * }
+ if$
+ }
+ if$
+ }
+ if$
+}
+
+FUNCTION {author.key.label}
+{ author empty$
+ { key empty$
+ { cite$ #1 #3 substring$ }
+ 'key
+ if$
+ }
+ { author format.lab.names }
+ if$
+}
+
+FUNCTION {author.editor.key.label}
+{ author empty$
+ { editor empty$
+ { key empty$
+ { cite$ #1 #3 substring$ }
+ 'key
+ if$
+ }
+ { editor format.lab.names }
+ if$
+ }
+ { author format.lab.names }
+ if$
+}
+
+FUNCTION {editor.key.label}
+{ editor empty$
+ { key empty$
+ { cite$ #1 #3 substring$ }
+ 'key
+ if$
+ }
+ { editor format.lab.names }
+ if$
+}
+
+FUNCTION {calc.short.authors}
+{ type$ "book" =
+ type$ "inbook" =
+ or
+ 'author.editor.key.label
+ { type$ "proceedings" =
+ 'editor.key.label
+ 'author.key.label
+ if$
+ }
+ if$
+ 'short.list :=
+}
+
+FUNCTION {calc.label}
+{ calc.short.authors
+ short.list
+ "("
+ *
+ year duplicate$ empty$
+ { pop$ "????" }
+ 'skip$
+ if$
+ *
+ 'label :=
+}
+
+FUNCTION {sort.format.names}
+{ 's :=
+ #1 'nameptr :=
+ ""
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ { s nameptr
+ "{vv{ } }{ll{ }}{ f{ }}{ jj{ }}"
+ format.name$ 't :=
+ nameptr #1 >
+ {
+ " " *
+ namesleft #1 = t "others" = and
+ { "aaaaa" * }
+ { t sortify * }
+ if$
+ }
+ { t sortify * }
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+}
+
+FUNCTION {sort.format.title}
+{ 't :=
+ "A " #2
+ "An " #3
+ "The " #4 t chop.word
+ chop.word
+ chop.word
+ sortify
+ #1 global.max$ substring$
+}
+
+FUNCTION {author.sort}
+{ author empty$
+ { key empty$
+ { "to sort, need author or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { author sort.format.names }
+ if$
+}
+
+FUNCTION {author.editor.sort}
+{ author empty$
+ { editor empty$
+ { key empty$
+ { "to sort, need author, editor, or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { editor sort.format.names }
+ if$
+ }
+ { author sort.format.names }
+ if$
+}
+
+FUNCTION {editor.sort}
+{ editor empty$
+ { key empty$
+ { "to sort, need editor or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { editor sort.format.names }
+ if$
+}
+
+FUNCTION {presort}
+{ calc.label
+ label sortify
+ " "
+ *
+ type$ "book" =
+ type$ "inbook" =
+ or
+ 'author.editor.sort
+ { type$ "proceedings" =
+ 'editor.sort
+ 'author.sort
+ if$
+ }
+ if$
+ #1 entry.max$ substring$
+ 'sort.label :=
+ sort.label
+ *
+ " "
+ *
+ title field.or.null
+ sort.format.title
+ *
+ #1 entry.max$ substring$
+ 'sort.key$ :=
+}
+
+ITERATE {presort}
+
+SORT
+
+STRINGS { last.label next.extra }
+
+INTEGERS { last.extra.num number.label }
+
+FUNCTION {initialize.extra.label.stuff}
+{ #0 int.to.chr$ 'last.label :=
+ "" 'next.extra :=
+ #0 'last.extra.num :=
+ #0 'number.label :=
+}
+
+FUNCTION {forward.pass}
+{ last.label label =
+ { last.extra.num #1 + 'last.extra.num :=
+ last.extra.num int.to.chr$ 'extra.label :=
+ }
+ { "a" chr.to.int$ 'last.extra.num :=
+ "" 'extra.label :=
+ label 'last.label :=
+ }
+ if$
+ number.label #1 + 'number.label :=
+}
+
+FUNCTION {reverse.pass}
+{ next.extra "b" =
+ { "a" 'extra.label := }
+ 'skip$
+ if$
+ extra.label 'next.extra :=
+ extra.label
+ duplicate$ empty$
+ 'skip$
+ { "{\natexlab{" swap$ * "}}" * }
+ if$
+ 'extra.label :=
+ label extra.label * 'label :=
+}
+
+EXECUTE {initialize.extra.label.stuff}
+
+ITERATE {forward.pass}
+
+REVERSE {reverse.pass}
+
+FUNCTION {bib.sort.order}
+{ sort.label
+ " "
+ *
+ year field.or.null sortify
+ *
+ " "
+ *
+ title field.or.null
+ sort.format.title
+ *
+ #1 entry.max$ substring$
+ 'sort.key$ :=
+}
+
+ITERATE {bib.sort.order}
+
+SORT
+
+FUNCTION {begin.bib}
+{ preamble$ empty$
+ 'skip$
+ { preamble$ write$ newline$ }
+ if$
+ "\begin{thebibliography}{" number.label int.to.str$ * "}" *
+ write$ newline$
+ "\expandafter\ifx\csname natexlab\endcsname\relax\def\natexlab#1{#1}\fi"
+ write$ newline$
+}
+
+EXECUTE {begin.bib}
+
+EXECUTE {init.state.consts}
+
+ITERATE {call.type$}
+
+FUNCTION {end.bib}
+{ newline$
+ "\end{thebibliography}" write$ newline$
+}
+
+EXECUTE {end.bib}
+%% End of customized bst file
+%%
+%% End of file `myapa.bst'.
diff --git a/biblio/bibtex/contrib/misc/plainyr.bst b/biblio/bibtex/contrib/misc/plainyr.bst
new file mode 100644
index 0000000000..f3afc319c2
--- /dev/null
+++ b/biblio/bibtex/contrib/misc/plainyr.bst
@@ -0,0 +1,1144 @@
+%% /usr/local/lib/tex/bibtex/plainyr.bst, Mon Jun 29 08:06:48 1992
+%% Edit by Nelson H. F. Beebe <beebe@plot79.math.utah.edu>
+%% I've called this posting plainyr instead of the author's datasort
+%% because the latter is uninformative.
+
+% Newsgroups: comp.text.tex
+% Path: math.utah.edu!hellgate.utah.edu!cs.utexas.edu!uunet!brunix!cs.brown.edu!mpp
+% From: mpp@cns.brown.edu (Michael P. Perrone)
+% Subject: Re: bibtex sorting by year
+% Message-ID: <1992Jun26.075302.21206@cs.brown.edu>
+% Sender: mpp@cs.brown.edu (Michael P. Perrone)
+% Organization: Center for Neural Science, Brown University
+% References: <1992Jun26.065942.20721@cs.brown.edu>
+% Date: Fri, 26 Jun 1992 07:53:02 GMT
+% Lines: 1128
+%
+% i figured out the bibtex problem.
+% the following bibstyle file will sort by year, author, title (in that order)
+% with the usual editor, organization (etc.) substitutions
+%
+% % ----- cut here -------------------------------
+%
+%-------------------------------------------------------------------------
+% DATASORT.BST --- created: 92.6.26 (Michael P. Perrone, Brown University)
+%
+% this is a simple hack of the plain.bst bibtex style file
+% which processes bibliography entries in chronological order
+% by year. within a year things are sort by author, title, etc.
+%
+% DISCLAIMER: if this doesn't work - sorry!
+%-------------------------------------------------------------------------
+%
+%
+% [MODIFIED] BibTeX standard bibliography style `plain'
+ % version 0.99a for BibTeX versions 0.99a or later, LaTeX version 2.09.
+ % Copyright (C) 1985, all rights reserved.
+ % Copying of this file is authorized only if either
+ % (1) you make absolutely no changes to your copy, including name, or
+ % (2) if you do make changes, you name it something other than
+ % btxbst.doc, plain.bst, unsrt.bst, alpha.bst, and abbrv.bst.
+ % This restriction helps ensure that all standard styles are identical.
+ % The file btxbst.doc has the documentation for this style.
+
+ENTRY
+ { address
+ author
+ booktitle
+ chapter
+ edition
+ editor
+ howpublished
+ institution
+ journal
+ key
+ month
+ note
+ number
+ organization
+ pages
+ publisher
+ school
+ series
+ title
+ type
+ volume
+ year
+ }
+ {}
+ { label }
+
+INTEGERS { output.state before.all mid.sentence after.sentence after.block }
+
+FUNCTION {init.state.consts}
+{ #0 'before.all :=
+ #1 'mid.sentence :=
+ #2 'after.sentence :=
+ #3 'after.block :=
+}
+
+STRINGS { s t }
+
+FUNCTION {output.nonnull}
+{ 's :=
+ output.state mid.sentence =
+ { ", " * write$ }
+ { output.state after.block =
+ { add.period$ write$
+ newline$
+ "\newblock " write$
+ }
+ { output.state before.all =
+ 'write$
+ { add.period$ " " * write$ }
+ if$
+ }
+ if$
+ mid.sentence 'output.state :=
+ }
+ if$
+ s
+}
+
+FUNCTION {output}
+{ duplicate$ empty$
+ 'pop$
+ 'output.nonnull
+ if$
+}
+
+FUNCTION {output.check}
+{ 't :=
+ duplicate$ empty$
+ { pop$ "empty " t * " in " * cite$ * warning$ }
+ 'output.nonnull
+ if$
+}
+
+FUNCTION {output.bibitem}
+{ newline$
+ "\bibitem{" write$
+ cite$ write$
+ "}" write$
+ newline$
+ ""
+ before.all 'output.state :=
+}
+
+FUNCTION {fin.entry}
+{ add.period$
+ write$
+ newline$
+}
+
+FUNCTION {new.block}
+{ output.state before.all =
+ 'skip$
+ { after.block 'output.state := }
+ if$
+}
+
+FUNCTION {new.sentence}
+{ output.state after.block =
+ 'skip$
+ { output.state before.all =
+ 'skip$
+ { after.sentence 'output.state := }
+ if$
+ }
+ if$
+}
+
+FUNCTION {not}
+{ { #0 }
+ { #1 }
+ if$
+}
+
+FUNCTION {and}
+{ 'skip$
+ { pop$ #0 }
+ if$
+}
+
+FUNCTION {or}
+{ { pop$ #1 }
+ 'skip$
+ if$
+}
+
+FUNCTION {new.block.checka}
+{ empty$
+ 'skip$
+ 'new.block
+ if$
+}
+
+FUNCTION {new.block.checkb}
+{ empty$
+ swap$ empty$
+ and
+ 'skip$
+ 'new.block
+ if$
+}
+
+FUNCTION {new.sentence.checka}
+{ empty$
+ 'skip$
+ 'new.sentence
+ if$
+}
+
+FUNCTION {new.sentence.checkb}
+{ empty$
+ swap$ empty$
+ and
+ 'skip$
+ 'new.sentence
+ if$
+}
+
+FUNCTION {field.or.null}
+{ duplicate$ empty$
+ { pop$ "" }
+ 'skip$
+ if$
+}
+
+FUNCTION {emphasize}
+{ duplicate$ empty$
+ { pop$ "" }
+ { "{\em " swap$ * "}" * }
+ if$
+}
+
+INTEGERS { nameptr namesleft numnames }
+
+FUNCTION {format.names}
+{ 's :=
+ #1 'nameptr :=
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ { s nameptr "{ff~}{vv~}{ll}{, jj}" format.name$ 't :=
+ nameptr #1 >
+ { namesleft #1 >
+ { ", " * t * }
+ { numnames #2 >
+ { "," * }
+ 'skip$
+ if$
+ t "others" =
+ { " et~al." * }
+ { " and " * t * }
+ if$
+ }
+ if$
+ }
+ 't
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+}
+
+FUNCTION {format.authors}
+{ author empty$
+ { "" }
+ { author format.names }
+ if$
+}
+
+FUNCTION {format.editors}
+{ editor empty$
+ { "" }
+ { editor format.names
+ editor num.names$ #1 >
+ { ", editors" * }
+ { ", editor" * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.title}
+{ title empty$
+ { "" }
+ { title "t" change.case$ }
+ if$
+}
+
+FUNCTION {n.dashify}
+{ 't :=
+ ""
+ { t empty$ not }
+ { t #1 #1 substring$ "-" =
+ { t #1 #2 substring$ "--" = not
+ { "--" *
+ t #2 global.max$ substring$ 't :=
+ }
+ { { t #1 #1 substring$ "-" = }
+ { "-" *
+ t #2 global.max$ substring$ 't :=
+ }
+ while$
+ }
+ if$
+ }
+ { t #1 #1 substring$ *
+ t #2 global.max$ substring$ 't :=
+ }
+ if$
+ }
+ while$
+}
+
+FUNCTION {format.date}
+{ year empty$
+ { month empty$
+ { "" }
+ { "there's a month but no year in " cite$ * warning$
+ month
+ }
+ if$
+ }
+ { month empty$
+ 'year
+ { month " " * year * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.btitle}
+{ title emphasize
+}
+
+FUNCTION {tie.or.space.connect}
+{ duplicate$ text.length$ #3 <
+ { "~" }
+ { " " }
+ if$
+ swap$ * *
+}
+
+FUNCTION {either.or.check}
+{ empty$
+ 'pop$
+ { "can't use both " swap$ * " fields in " * cite$ * warning$ }
+ if$
+}
+
+FUNCTION {format.bvolume}
+{ volume empty$
+ { "" }
+ { "volume" volume tie.or.space.connect
+ series empty$
+ 'skip$
+ { " of " * series emphasize * }
+ if$
+ "volume and number" number either.or.check
+ }
+ if$
+}
+
+FUNCTION {format.number.series}
+{ volume empty$
+ { number empty$
+ { series field.or.null }
+ { output.state mid.sentence =
+ { "number" }
+ { "Number" }
+ if$
+ number tie.or.space.connect
+ series empty$
+ { "there's a number but no series in " cite$ * warning$ }
+ { " in " * series * }
+ if$
+ }
+ if$
+ }
+ { "" }
+ if$
+}
+
+FUNCTION {format.edition}
+{ edition empty$
+ { "" }
+ { output.state mid.sentence =
+ { edition "l" change.case$ " edition" * }
+ { edition "t" change.case$ " edition" * }
+ if$
+ }
+ if$
+}
+
+INTEGERS { multiresult }
+
+FUNCTION {multi.page.check}
+{ 't :=
+ #0 'multiresult :=
+ { multiresult not
+ t empty$ not
+ and
+ }
+ { t #1 #1 substring$
+ duplicate$ "-" =
+ swap$ duplicate$ "," =
+ swap$ "+" =
+ or or
+ { #1 'multiresult := }
+ { t #2 global.max$ substring$ 't := }
+ if$
+ }
+ while$
+ multiresult
+}
+
+FUNCTION {format.pages}
+{ pages empty$
+ { "" }
+ { pages multi.page.check
+ { "pages" pages n.dashify tie.or.space.connect }
+ { "page" pages tie.or.space.connect }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.vol.num.pages}
+{ volume field.or.null
+ number empty$
+ 'skip$
+ { "(" number * ")" * *
+ volume empty$
+ { "there's a number but no volume in " cite$ * warning$ }
+ 'skip$
+ if$
+ }
+ if$
+ pages empty$
+ 'skip$
+ { duplicate$ empty$
+ { pop$ format.pages }
+ { ":" * pages n.dashify * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.chapter.pages}
+{ chapter empty$
+ 'format.pages
+ { type empty$
+ { "chapter" }
+ { type "l" change.case$ }
+ if$
+ chapter tie.or.space.connect
+ pages empty$
+ 'skip$
+ { ", " * format.pages * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.in.ed.booktitle}
+{ booktitle empty$
+ { "" }
+ { editor empty$
+ { "In " booktitle emphasize * }
+ { "In " format.editors * ", " * booktitle emphasize * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {empty.misc.check}
+{ author empty$ title empty$ howpublished empty$
+ month empty$ year empty$ note empty$
+ and and and and and
+ key empty$ not and
+ { "all relevant fields are empty in " cite$ * warning$ }
+ 'skip$
+ if$
+}
+
+FUNCTION {format.thesis.type}
+{ type empty$
+ 'skip$
+ { pop$
+ type "t" change.case$
+ }
+ if$
+}
+
+FUNCTION {format.tr.number}
+{ type empty$
+ { "Technical Report" }
+ 'type
+ if$
+ number empty$
+ { "t" change.case$ }
+ { number tie.or.space.connect }
+ if$
+}
+
+FUNCTION {format.article.crossref}
+{ key empty$
+ { journal empty$
+ { "need key or journal for " cite$ * " to crossref " * crossref *
+ warning$
+ ""
+ }
+ { "In {\em " journal * "\/}" * }
+ if$
+ }
+ { "In " key * }
+ if$
+ " \cite{" * crossref * "}" *
+}
+
+FUNCTION {format.crossref.editor}
+{ editor #1 "{vv~}{ll}" format.name$
+ editor num.names$ duplicate$
+ #2 >
+ { pop$ " et~al." * }
+ { #2 <
+ 'skip$
+ { editor #2 "{ff }{vv }{ll}{ jj}" format.name$ "others" =
+ { " et~al." * }
+ { " and " * editor #2 "{vv~}{ll}" format.name$ * }
+ if$
+ }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.book.crossref}
+{ volume empty$
+ { "empty volume in " cite$ * "'s crossref of " * crossref * warning$
+ "In "
+ }
+ { "Volume" volume tie.or.space.connect
+ " of " *
+ }
+ if$
+ editor empty$
+ editor field.or.null author field.or.null =
+ or
+ { key empty$
+ { series empty$
+ { "need editor, key, or series for " cite$ * " to crossref " *
+ crossref * warning$
+ "" *
+ }
+ { "{\em " * series * "\/}" * }
+ if$
+ }
+ { key * }
+ if$
+ }
+ { format.crossref.editor * }
+ if$
+ " \cite{" * crossref * "}" *
+}
+
+FUNCTION {format.incoll.inproc.crossref}
+{ editor empty$
+ editor field.or.null author field.or.null =
+ or
+ { key empty$
+ { booktitle empty$
+ { "need editor, key, or booktitle for " cite$ * " to crossref " *
+ crossref * warning$
+ ""
+ }
+ { "In {\em " booktitle * "\/}" * }
+ if$
+ }
+ { "In " key * }
+ if$
+ }
+ { "In " format.crossref.editor * }
+ if$
+ " \cite{" * crossref * "}" *
+}
+
+FUNCTION {article}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.title "title" output.check
+ new.block
+ crossref missing$
+ { journal emphasize "journal" output.check
+ format.vol.num.pages output
+ format.date "year" output.check
+ }
+ { format.article.crossref output.nonnull
+ format.pages output
+ }
+ if$
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {book}
+{ output.bibitem
+ author empty$
+ { format.editors "author and editor" output.check }
+ { format.authors output.nonnull
+ crossref missing$
+ { "author and editor" editor either.or.check }
+ 'skip$
+ if$
+ }
+ if$
+ new.block
+ format.btitle "title" output.check
+ crossref missing$
+ { format.bvolume output
+ new.block
+ format.number.series output
+ new.sentence
+ publisher "publisher" output.check
+ address output
+ }
+ { new.block
+ format.book.crossref output.nonnull
+ }
+ if$
+ format.edition output
+ format.date "year" output.check
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {booklet}
+{ output.bibitem
+ format.authors output
+ new.block
+ format.title "title" output.check
+ howpublished address new.block.checkb
+ howpublished output
+ address output
+ format.date output
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {inbook}
+{ output.bibitem
+ author empty$
+ { format.editors "author and editor" output.check }
+ { format.authors output.nonnull
+ crossref missing$
+ { "author and editor" editor either.or.check }
+ 'skip$
+ if$
+ }
+ if$
+ new.block
+ format.btitle "title" output.check
+ crossref missing$
+ { format.bvolume output
+ format.chapter.pages "chapter and pages" output.check
+ new.block
+ format.number.series output
+ new.sentence
+ publisher "publisher" output.check
+ address output
+ }
+ { format.chapter.pages "chapter and pages" output.check
+ new.block
+ format.book.crossref output.nonnull
+ }
+ if$
+ format.edition output
+ format.date "year" output.check
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {incollection}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.title "title" output.check
+ new.block
+ crossref missing$
+ { format.in.ed.booktitle "booktitle" output.check
+ format.bvolume output
+ format.number.series output
+ format.chapter.pages output
+ new.sentence
+ publisher "publisher" output.check
+ address output
+ format.edition output
+ format.date "year" output.check
+ }
+ { format.incoll.inproc.crossref output.nonnull
+ format.chapter.pages output
+ }
+ if$
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {inproceedings}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.title "title" output.check
+ new.block
+ crossref missing$
+ { format.in.ed.booktitle "booktitle" output.check
+ format.bvolume output
+ format.number.series output
+ format.pages output
+ address empty$
+ { organization publisher new.sentence.checkb
+ organization output
+ publisher output
+ format.date "year" output.check
+ }
+ { address output.nonnull
+ format.date "year" output.check
+ new.sentence
+ organization output
+ publisher output
+ }
+ if$
+ }
+ { format.incoll.inproc.crossref output.nonnull
+ format.pages output
+ }
+ if$
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {conference} { inproceedings }
+
+FUNCTION {manual}
+{ output.bibitem
+ author empty$
+ { organization empty$
+ 'skip$
+ { organization output.nonnull
+ address output
+ }
+ if$
+ }
+ { format.authors output.nonnull }
+ if$
+ new.block
+ format.btitle "title" output.check
+ author empty$
+ { organization empty$
+ { address new.block.checka
+ address output
+ }
+ 'skip$
+ if$
+ }
+ { organization address new.block.checkb
+ organization output
+ address output
+ }
+ if$
+ format.edition output
+ format.date output
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {mastersthesis}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.title "title" output.check
+ new.block
+ "Master's thesis" format.thesis.type output.nonnull
+ school "school" output.check
+ address output
+ format.date "year" output.check
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {misc}
+{ output.bibitem
+ format.authors output
+ title howpublished new.block.checkb
+ format.title output
+ howpublished new.block.checka
+ howpublished output
+ format.date output
+ new.block
+ note output
+ fin.entry
+ empty.misc.check
+}
+
+FUNCTION {phdthesis}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.btitle "title" output.check
+ new.block
+ "PhD thesis" format.thesis.type output.nonnull
+ school "school" output.check
+ address output
+ format.date "year" output.check
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {proceedings}
+{ output.bibitem
+ editor empty$
+ { organization output }
+ { format.editors output.nonnull }
+ if$
+ new.block
+ format.btitle "title" output.check
+ format.bvolume output
+ format.number.series output
+ address empty$
+ { editor empty$
+ { publisher new.sentence.checka }
+ { organization publisher new.sentence.checkb
+ organization output
+ }
+ if$
+ publisher output
+ format.date "year" output.check
+ }
+ { address output.nonnull
+ format.date "year" output.check
+ new.sentence
+ editor empty$
+ 'skip$
+ { organization output }
+ if$
+ publisher output
+ }
+ if$
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {techreport}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.title "title" output.check
+ new.block
+ format.tr.number output.nonnull
+ institution "institution" output.check
+ address output
+ format.date "year" output.check
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {unpublished}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.title "title" output.check
+ new.block
+ note "note" output.check
+ format.date output
+ fin.entry
+}
+
+FUNCTION {default.type} { misc }
+
+MACRO {jan} {"January"}
+
+MACRO {feb} {"February"}
+
+MACRO {mar} {"March"}
+
+MACRO {apr} {"April"}
+
+MACRO {may} {"May"}
+
+MACRO {jun} {"June"}
+
+MACRO {jul} {"July"}
+
+MACRO {aug} {"August"}
+
+MACRO {sep} {"September"}
+
+MACRO {oct} {"October"}
+
+MACRO {nov} {"November"}
+
+MACRO {dec} {"December"}
+
+MACRO {acmcs} {"ACM Computing Surveys"}
+
+MACRO {acta} {"Acta Informatica"}
+
+MACRO {cacm} {"Communications of the ACM"}
+
+MACRO {ibmjrd} {"IBM Journal of Research and Development"}
+
+MACRO {ibmsj} {"IBM Systems Journal"}
+
+MACRO {ieeese} {"IEEE Transactions on Software Engineering"}
+
+MACRO {ieeetc} {"IEEE Transactions on Computers"}
+
+MACRO {ieeetcad}
+ {"IEEE Transactions on Computer-Aided Design of Integrated Circuits"}
+
+MACRO {ipl} {"Information Processing Letters"}
+
+MACRO {jacm} {"Journal of the ACM"}
+
+MACRO {jcss} {"Journal of Computer and System Sciences"}
+
+MACRO {scp} {"Science of Computer Programming"}
+
+MACRO {sicomp} {"SIAM Journal on Computing"}
+
+MACRO {tocs} {"ACM Transactions on Computer Systems"}
+
+MACRO {tods} {"ACM Transactions on Database Systems"}
+
+MACRO {tog} {"ACM Transactions on Graphics"}
+
+MACRO {toms} {"ACM Transactions on Mathematical Software"}
+
+MACRO {toois} {"ACM Transactions on Office Information Systems"}
+
+MACRO {toplas} {"ACM Transactions on Programming Languages and Systems"}
+
+MACRO {tcs} {"Theoretical Computer Science"}
+
+READ
+
+FUNCTION {sortify}
+{ purify$
+ "l" change.case$
+}
+
+INTEGERS { len }
+
+FUNCTION {chop.word}
+{ 's :=
+ 'len :=
+ s #1 len substring$ =
+ { s len #1 + global.max$ substring$ }
+ 's
+ if$
+}
+
+FUNCTION {sort.format.names}
+{ 's :=
+ #1 'nameptr :=
+ ""
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ { nameptr #1 >
+ { " " * }
+ 'skip$
+ if$
+ s nameptr "{vv{ } }{ll{ }}{ ff{ }}{ jj{ }}" format.name$ 't :=
+ nameptr numnames = t "others" = and
+ { "et al" * }
+ { t sortify * }
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+}
+
+FUNCTION {sort.format.title}
+{ 't :=
+ "A " #2
+ "An " #3
+ "The " #4 t chop.word
+ chop.word
+ chop.word
+ sortify
+ #1 global.max$ substring$
+}
+
+FUNCTION {year.sort}
+{ year empty$
+ { key empty$
+ { "to sort, need year or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { year sort.format.names }
+ if$
+}
+
+FUNCTION {author.sort}
+{ author empty$
+ { key empty$
+ { "to sort, need author or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { author sort.format.names }
+ if$
+}
+
+FUNCTION {author.editor.sort}
+{ author empty$
+ { editor empty$
+ { key empty$
+ { "to sort, need author, editor, or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { editor sort.format.names }
+ if$
+ }
+ { author sort.format.names }
+ if$
+}
+
+FUNCTION {author.organization.sort}
+{ author empty$
+ { organization empty$
+ { key empty$
+ { "to sort, need author, organization, or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { "The " #4 organization chop.word sortify }
+ if$
+ }
+ { author sort.format.names }
+ if$
+}
+
+FUNCTION {editor.organization.sort}
+{ editor empty$
+ { organization empty$
+ { key empty$
+ { "to sort, need editor, organization, or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { "The " #4 organization chop.word sortify }
+ if$
+ }
+ { editor sort.format.names }
+ if$
+}
+
+FUNCTION {presort}
+{ type$ "book" =
+ type$ "inbook" =
+ or
+ 'author.editor.sort
+ { type$ "proceedings" =
+ 'editor.organization.sort
+ { type$ "manual" =
+ 'author.organization.sort
+ 'year.sort
+ if$
+ }
+ if$
+ }
+ if$
+ " "
+ *
+ author field.or.null
+ sort.format.names
+ *
+ " "
+ *
+ title field.or.null
+ sort.format.title
+ *
+ #1 entry.max$ substring$
+ 'sort.key$ :=
+}
+
+ITERATE {presort}
+
+SORT
+
+STRINGS { longest.label }
+
+INTEGERS { number.label longest.label.width }
+
+FUNCTION {initialize.longest.label}
+{ "" 'longest.label :=
+ #1 'number.label :=
+ #0 'longest.label.width :=
+}
+
+FUNCTION {longest.label.pass}
+{ number.label int.to.str$ 'label :=
+ number.label #1 + 'number.label :=
+ label width$ longest.label.width >
+ { label 'longest.label :=
+ label width$ 'longest.label.width :=
+ }
+ 'skip$
+ if$
+}
+
+EXECUTE {initialize.longest.label}
+
+ITERATE {longest.label.pass}
+
+FUNCTION {begin.bib}
+{ preamble$ empty$
+ 'skip$
+ { preamble$ write$ newline$ }
+ if$
+ "\begin{thebibliography}{" longest.label * "}" * write$ newline$
+}
+
+EXECUTE {begin.bib}
+
+EXECUTE {init.state.consts}
+
+ITERATE {call.type$}
+
+FUNCTION {end.bib}
+{ newline$
+ "\end{thebibliography}" write$ newline$
+}
+
+EXECUTE {end.bib}
diff --git a/biblio/bibtex/contrib/misc/pnas.bst b/biblio/bibtex/contrib/misc/pnas.bst
new file mode 100644
index 0000000000..e81a317dad
--- /dev/null
+++ b/biblio/bibtex/contrib/misc/pnas.bst
@@ -0,0 +1,967 @@
+%%% ====================================================================
+%%% @BibTeX-style-file{
+%%% author = "Alan R. Rogers",
+%%% version = "1.0",
+%%% date = "12 November 1992",
+%%% time = "16:07:20 MST",
+%%% filename = "pnas.bst",
+%%% address = "Department of Anthropology
+%%% University of Utah
+%%% Salt Lake City, UT 84112
+%%% USA",
+%%% telephone = "+1 801 581 5529",
+%%% FAX = "+1 801 581 6252",
+%%% checksum = "37034 967 2316 17724",
+%%% email = "rogers@anthro.utah.edu (Internet)",
+%%% codetable = "ISO/ASCII",
+%%% keywords = "",
+%%% supported = "yes",
+%%% abstract = "",
+%%% docstring = "This file produces bibliographies in the
+%%% format of ``Proceedings of the National
+%%% Academy of Sciences, USA.''",
+%%% }
+%%% ====================================================================
+% This is "pnas.bst", modified from "unsrt.bst"
+% BibTeX standard bibliography style `unsrt'
+ % version 0.99a for BibTeX versions 0.99a or later, LaTeX version 2.09.
+ % Copyright (C) 1985, all rights reserved.
+ % Copying of this file is authorized only if either
+ % (1) you make absolutely no changes to your copy, including name, or
+ % (2) if you do make changes, you name it something other than
+ % btxbst.doc, plain.bst, unsrt.bst, alpha.bst, and abbrv.bst.
+ % This restriction helps ensure that all standard styles are identical.
+ % The file btxbst.doc has the documentation for this style.
+
+ENTRY
+ { address
+ author
+ booktitle
+ chapter
+ edition
+ editor
+ howpublished
+ institution
+ journal
+ key
+ month
+ note
+ number
+ organization
+ pages
+ publisher
+ school
+ series
+ title
+ type
+ volume
+ year
+ }
+ {}
+ { label }
+
+INTEGERS { output.state before.all mid.sentence after.sentence after.block }
+
+FUNCTION {init.state.consts}
+{ #0 'before.all :=
+ #1 'mid.sentence :=
+ #2 'after.sentence :=
+ #3 'after.block :=
+}
+
+STRINGS { s t }
+
+FUNCTION {output.nonnull}
+{ 's :=
+ output.state mid.sentence =
+% { ", " * write$ }
+ { " " * write$ }
+ { output.state after.block =
+ { add.period$ write$
+ newline$
+ "\newblock " write$
+ }
+ { output.state before.all =
+ 'write$
+% { add.period$ " " * write$ }
+ { ", " * write$ }
+ if$
+ }
+ if$
+ mid.sentence 'output.state :=
+ }
+ if$
+ s
+}
+
+FUNCTION {output}
+{ duplicate$ empty$
+ 'pop$
+ 'output.nonnull
+ if$
+}
+
+FUNCTION {output.check}
+{ 't :=
+ duplicate$ empty$
+ { pop$ "empty " t * " in " * cite$ * warning$ }
+ 'output.nonnull
+ if$
+}
+
+FUNCTION {output.bibitem}
+{ newline$
+ "\bibitem{" write$
+ cite$ write$
+ "}" write$
+ newline$
+ ""
+ before.all 'output.state :=
+}
+
+FUNCTION {fin.entry}
+{ add.period$
+ write$
+ newline$
+}
+
+FUNCTION {new.block}
+{ output.state before.all =
+ 'skip$
+ { after.block 'output.state := }
+ if$
+}
+
+FUNCTION {new.sentence}
+{ output.state after.block =
+ 'skip$
+ { output.state before.all =
+ 'skip$
+ { after.sentence 'output.state := }
+ if$
+ }
+ if$
+}
+
+FUNCTION {not}
+{ { #0 }
+ { #1 }
+ if$
+}
+
+FUNCTION {and}
+{ 'skip$
+ { pop$ #0 }
+ if$
+}
+
+FUNCTION {or}
+{ { pop$ #1 }
+ 'skip$
+ if$
+}
+
+FUNCTION {new.block.checka}
+{ empty$
+ 'skip$
+ 'new.block
+ if$
+}
+
+FUNCTION {new.block.checkb}
+{ empty$
+ swap$ empty$
+ and
+ 'skip$
+ 'new.block
+ if$
+}
+
+FUNCTION {new.sentence.checka}
+{ empty$
+ 'skip$
+ 'new.sentence
+ if$
+}
+
+FUNCTION {new.sentence.checkb}
+{ empty$
+ swap$ empty$
+ and
+ 'skip$
+ 'new.sentence
+ if$
+}
+
+FUNCTION {field.or.null}
+{ duplicate$ empty$
+ { pop$ "" }
+ 'skip$
+ if$
+}
+
+FUNCTION {emphasize}
+{ duplicate$ empty$
+ { pop$ "" }
+ { "{\em " swap$ * "}" * }
+ if$
+}
+
+FUNCTION {parenthesize}
+{ duplicate$ empty$
+ { pop$ "" }
+ { "(" swap$ * ")" * }
+ if$
+}
+
+FUNCTION {boldface}
+{ duplicate$ empty$
+ { pop$ "" }
+ { "{\bf " swap$ * "}" * }
+ if$
+}
+
+INTEGERS { nameptr namesleft numnames }
+
+FUNCTION {format.names}
+{ 's :=
+ #1 'nameptr :=
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ { s nameptr "{vv~}{ll}{, jj}{, f}" format.name$ 't :=
+ nameptr #1 >
+ { namesleft #1 >
+ { ", " * t * }
+ { numnames #2 >
+ { ", " * }
+ 'skip$
+ if$
+ t "others" =
+ { " et~al." * }
+ { " \& " * t * }
+ if$
+ }
+ if$
+ }
+ 't
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+}
+
+FUNCTION {format.publisher}
+{ publisher empty$
+ { address empty$
+ { "" }
+ { address }
+ if$
+ }
+ { address empty$
+ { publisher}
+ { publisher ", " * address * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.editors.as.authors}
+{ editor empty$
+ { organization }
+ { editor format.names
+ editor num.names$ #1 >
+ { ", eds." * }
+ { ", ed." * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.authors}
+{ author empty$
+ { editor empty$
+ { "" }
+ { editor format.names
+ editor num.names$ #1 >
+ { ", eds." * }
+ { ", ed." * }
+ if$
+ }
+ if$
+ }
+ { author format.names }
+ if$
+}
+
+FUNCTION {format.editors}
+{ editor empty$
+ { "" }
+ { author empty$ %in this case, see format.authors
+ { "" }
+ { editor num.names$ #1 >
+ { "eds.{} " }
+ { "ed.{} " }
+ if$
+ editor format.names *
+ }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.title}
+{ title "t" change.case$
+}
+
+FUNCTION {n.dashify}
+{ 't :=
+ ""
+ { t empty$ not }
+ { t #1 #1 substring$ "-" =
+ { t #1 #2 substring$ "--" = not
+ { "--" *
+ t #2 global.max$ substring$ 't :=
+ }
+ { { t #1 #1 substring$ "-" = }
+ { "-" *
+ t #2 global.max$ substring$ 't :=
+ }
+ while$
+ }
+ if$
+ }
+ { t #1 #1 substring$ *
+ t #2 global.max$ substring$ 't :=
+ }
+ if$
+ }
+ while$
+}
+
+FUNCTION {format.date}
+{ year empty$
+ { "year?" parenthesize }
+ { year parenthesize }
+ if$
+}
+
+FUNCTION {format.btitle.series}
+{ title empty$
+ { "" }
+ { title emphasize }
+ if$
+ series empty$
+ { "" * }
+ { ", " * series * }
+ if$
+}
+
+FUNCTION {tie.or.space.connect}
+{ duplicate$ text.length$ #3 <
+ { "~" }
+ { " " }
+ if$
+ swap$ * *
+}
+
+FUNCTION {comma.connect}
+{ duplicate$ empty$
+ { pop$ }
+ { swap$
+ duplicate$ empty$
+ { pop$ }
+ { swap$ ", " swap$ * * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {either.or.check}
+{ empty$
+ 'pop$
+ { "can't use both " swap$ * " fields in " * cite$ * warning$ }
+ if$
+}
+
+FUNCTION {format.bvolume.number}
+{ volume empty$
+ { number empty$
+ { "" }
+ { "No.{}" number tie.or.space.connect }
+ if$
+ }
+ { "Vol.{}" volume tie.or.space.connect
+ "volume and number" number either.or.check
+ }
+ if$
+}
+
+FUNCTION {format.number}
+{ volume empty$
+ { number empty$
+ { "" }
+ { "No.{}" number tie.or.space.connect }
+ if$
+ }
+ { "" }
+ if$
+}
+
+FUNCTION {format.edition}
+{ edition empty$
+ { "" }
+ { output.state mid.sentence =
+ { edition "l" change.case$ " edition" * }
+ { edition "t" change.case$ " edition" * }
+ if$
+ }
+ if$
+}
+
+INTEGERS { multiresult }
+
+FUNCTION {multi.page.check}
+{ 't :=
+ #0 'multiresult :=
+ { multiresult not
+ t empty$ not
+ and
+ }
+ { t #1 #1 substring$
+ duplicate$ "-" =
+ swap$ duplicate$ "," =
+ swap$ "+" =
+ or or
+ { #1 'multiresult := }
+ { t #2 global.max$ substring$ 't := }
+ if$
+ }
+ while$
+ multiresult
+}
+
+FUNCTION {format.pages}
+{ pages empty$
+ { "" }
+ { pages multi.page.check
+ { "pp." pages n.dashify tie.or.space.connect }
+ { "p." pages tie.or.space.connect }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.vol.num.pages}
+{ volume boldface
+ pages empty$
+ 'skip$
+ { duplicate$ empty$
+ { pop$ format.pages }
+ { ", " * pages n.dashify * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.chapter.pages}
+{ chapter empty$
+ 'format.pages
+ { type empty$
+ { "chapter" }
+ { type "l" change.case$ }
+ if$
+ chapter tie.or.space.connect
+ pages empty$
+ 'skip$
+ { ", " * format.pages * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.in.ed.booktitle}
+{ booktitle empty$
+ { "" }
+ { "in " booktitle emphasize * }
+ if$
+ series empty$
+ { "" * }
+ { booktitle empty$
+ { "XXmissing booktitle \& seriesXX" * }
+ { ", " * }
+ if$
+ series *
+ }
+ if$
+}
+
+FUNCTION {empty.misc.check}
+{ author empty$ title empty$ howpublished empty$
+ month empty$ year empty$ note empty$
+ and and and and and
+ { "all relevant fields are empty in " cite$ * warning$ }
+ 'skip$
+ if$
+}
+
+FUNCTION {format.thesis.type}
+{ type empty$
+ 'skip$
+ { pop$
+ type "t" change.case$
+ }
+ if$
+}
+
+FUNCTION {format.tr.number}
+{ type empty$
+ { "Technical Report" }
+ 'type
+ if$
+ number empty$
+ { "t" change.case$ }
+ { number tie.or.space.connect }
+ if$
+}
+
+FUNCTION {format.article.crossref}
+{ key empty$
+ { journal empty$
+ { "need key or journal for " cite$ * " to crossref " * crossref *
+ warning$
+ ""
+ }
+ { "In {\em " journal * "\/}" * }
+ if$
+ }
+ { "In " key * }
+ if$
+ " \cite{" * crossref * "}" *
+}
+
+FUNCTION {format.crossref.editor}
+{ editor #1 "{vv~}{ll}" format.name$
+ editor num.names$ duplicate$
+ #2 >
+ { pop$ " et~al." * }
+ { #2 <
+ 'skip$
+ { editor #2 "{vv }{ll}{ jj}{, f}" format.name$ "others" =
+ { " et~al." * }
+ { " and " * editor #2 "{vv~}{ll}" format.name$ * }
+ if$
+ }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.book.crossref}
+{ volume empty$
+ { "empty volume in " cite$ * "'s crossref of " * crossref * warning$
+ "In "
+ }
+ { "Vol.{}" volume tie.or.space.connect
+ " of " *
+ }
+ if$
+ editor empty$
+ editor field.or.null author field.or.null =
+ or
+ { key empty$
+ { series empty$
+ { "need editor, key, or series for " cite$ * " to crossref " *
+ crossref * warning$
+ "" *
+ }
+ { "{\em " * series * "\/}" * }
+ if$
+ }
+ { key * }
+ if$
+ }
+ { format.crossref.editor * }
+ if$
+ " \cite{" * crossref * "}" *
+}
+
+FUNCTION {format.incoll.inproc.crossref}
+{ editor empty$
+ editor field.or.null author field.or.null =
+ or
+ { key empty$
+ { booktitle empty$
+ { "need editor, key, or booktitle for " cite$ * " to crossref " *
+ crossref * warning$
+ ""
+ }
+ { "in {\em " booktitle * "\/}" * }
+ if$
+ }
+ { "in " key * }
+ if$
+ }
+ { "in " format.crossref.editor * }
+ if$
+ " \cite{" * crossref * "}" *
+}
+
+FUNCTION {article}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.date "year" output.check
+ crossref missing$
+ { journal emphasize "journal" output.check
+ format.vol.num.pages output
+ }
+ { format.article.crossref output.nonnull
+ format.pages output
+ }
+ if$
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {book}
+{ output.bibitem
+ format.authors output.nonnull
+ crossref missing$
+ { "author and editor" editor either.or.check }
+ 'skip$
+ if$
+ new.block
+ format.date "year" output.check
+ format.btitle.series "title" output.check
+ crossref missing$
+ { format.editors output
+ new.block
+ format.publisher parenthesize output
+ format.bvolume.number output
+ new.sentence
+ }
+ { new.block
+ format.book.crossref output.nonnull
+ }
+ if$
+ format.edition output
+ new.sentence
+ format.pages output
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {booklet}
+{ output.bibitem
+ format.authors output
+ new.block
+ format.date output
+ format.title "title" output.check
+ howpublished address comma.connect parenthesize output
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {inbook}
+{ output.bibitem
+ format.authors output.nonnull
+ new.block
+ format.date "year" output.check
+ format.btitle.series "title" output.check
+ new.sentence
+ crossref missing$
+ { format.editors output
+ new.block
+ format.publisher parenthesize output
+ format.bvolume.number output
+ new.sentence
+ }
+ { format.chapter.pages "chapter and pages" output.check
+ new.block
+ format.book.crossref output.nonnull
+ }
+ if$
+ format.edition output
+ new.sentence
+ format.pages output
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {incollection}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.date "year" output.check
+ format.in.ed.booktitle "title" output.check
+ new.sentence
+ crossref missing$
+ { format.editors output
+ new.block
+ format.publisher parenthesize output
+ format.bvolume.number output
+ new.sentence
+ }
+ { format.incoll.inproc.crossref output.nonnull
+ format.chapter.pages output
+ }
+ if$
+ format.edition output
+ new.sentence
+ format.pages output
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {inproceedings}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.date "year" output.check
+ crossref missing$
+ { format.btitle.series "title" output.check
+ format.editors output
+ new.block
+ organization publisher comma.connect
+ address comma.connect
+ parenthesize output
+ new.sentence
+ format.bvolume.number output
+ new.sentence
+ }
+ { format.incoll.inproc.crossref output.nonnull
+ }
+ if$
+ format.pages output
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {conference} { inproceedings }
+
+FUNCTION {manual}
+{ output.bibitem
+ author empty$
+ { organization empty$
+ 'skip$
+ { organization output.nonnull }
+ if$
+ }
+ { format.authors output.nonnull }
+ if$
+ new.block
+ format.date "year" output.check
+ format.btitle.series "title" output.check
+ author empty$
+ { "" }
+ { organization }
+ if$
+ publisher comma.connect address comma.connect parenthesize output
+ new.sentence
+ format.edition output
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {mastersthesis}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.date "year" output.check
+ "Master's thesis" format.thesis.type output.nonnull
+ school address comma.connect parenthesize output
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {misc}
+{ output.bibitem
+ format.authors output
+ new.block
+ format.date output
+ format.title output
+ howpublished parenthesize output
+ new.block
+ note output
+ fin.entry
+ empty.misc.check
+}
+
+FUNCTION {phdthesis}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.date "year" output.check
+ "Ph.D. thesis" format.thesis.type output.nonnull
+ school address comma.connect parenthesize output
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {proceedings}
+{ output.bibitem
+ format.editors.as.authors output
+ new.block
+ format.date output
+ format.btitle.series "title" output.check
+ organization publisher comma.connect
+ address comma.connect parenthesize output
+ format.bvolume.number output
+ new.sentence
+ format.pages output
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {techreport}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.date output
+ format.title "title" output.check
+ new.sentence
+ institution address comma.connect parenthesize output
+ new.sentence
+ format.tr.number output.nonnull
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {unpublished}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.date output
+ format.title "title" output.check
+ new.block
+ note "note" output.check
+ fin.entry
+}
+
+FUNCTION {default.type} { misc }
+
+MACRO {jan} {"January"}
+
+MACRO {feb} {"February"}
+
+MACRO {mar} {"March"}
+
+MACRO {apr} {"April"}
+
+MACRO {may} {"May"}
+
+MACRO {jun} {"June"}
+
+MACRO {jul} {"July"}
+
+MACRO {aug} {"August"}
+
+MACRO {sep} {"September"}
+
+MACRO {oct} {"October"}
+
+MACRO {nov} {"November"}
+
+MACRO {dec} {"December"}
+
+MACRO {acmcs} {"ACM Computing Surveys"}
+
+MACRO {acta} {"Acta Informatica"}
+
+MACRO {cacm} {"Communications of the ACM"}
+
+MACRO {ibmjrd} {"IBM Journal of Research and Development"}
+
+MACRO {ibmsj} {"IBM Systems Journal"}
+
+MACRO {ieeese} {"IEEE Transactions on Software Engineering"}
+
+MACRO {ieeetc} {"IEEE Transactions on Computers"}
+
+MACRO {ieeetcad}
+ {"IEEE Transactions on Computer-Aided Design of Integrated Circuits"}
+
+MACRO {ipl} {"Information Processing Letters"}
+
+MACRO {jacm} {"Journal of the ACM"}
+
+MACRO {jcss} {"Journal of Computer and System Sciences"}
+
+MACRO {scp} {"Science of Computer Programming"}
+
+MACRO {sicomp} {"SIAM Journal on Computing"}
+
+MACRO {tocs} {"ACM Transactions on Computer Systems"}
+
+MACRO {tods} {"ACM Transactions on Database Systems"}
+
+MACRO {tog} {"ACM Transactions on Graphics"}
+
+MACRO {toms} {"ACM Transactions on Mathematical Software"}
+
+MACRO {toois} {"ACM Transactions on Office Information Systems"}
+
+MACRO {toplas} {"ACM Transactions on Programming Languages and Systems"}
+
+MACRO {tcs} {"Theoretical Computer Science"}
+
+READ
+
+STRINGS { longest.label }
+
+INTEGERS { number.label longest.label.width }
+
+FUNCTION {initialize.longest.label}
+{ "" 'longest.label :=
+ #1 'number.label :=
+ #0 'longest.label.width :=
+}
+
+FUNCTION {longest.label.pass}
+{ number.label int.to.str$ 'label :=
+ number.label #1 + 'number.label :=
+ label width$ longest.label.width >
+ { label 'longest.label :=
+ label width$ 'longest.label.width :=
+ }
+ 'skip$
+ if$
+}
+
+EXECUTE {initialize.longest.label}
+
+ITERATE {longest.label.pass}
+
+FUNCTION {begin.bib}
+{ preamble$ empty$
+ 'skip$
+ { preamble$ write$ newline$ }
+ if$
+ "\begin{thebibliography}{" longest.label * "}" * write$ newline$
+}
+
+EXECUTE {begin.bib}
+
+EXECUTE {init.state.consts}
+
+ITERATE {call.type$}
+
+FUNCTION {end.bib}
+{ newline$
+ "\end{thebibliography}" write$ newline$
+}
+
+EXECUTE {end.bib}
diff --git a/biblio/bibtex/contrib/misc/pnas2009.bst b/biblio/bibtex/contrib/misc/pnas2009.bst
new file mode 100644
index 0000000000..e6b531a9e7
--- /dev/null
+++ b/biblio/bibtex/contrib/misc/pnas2009.bst
@@ -0,0 +1,950 @@
+%%% ====================================================================
+%%% @BibTeX-style-file{
+%%% author = "Russell Standish"
+%%% }
+%%% ====================================================================
+% This is "pnas2009.bst", adapted from "pnas.bst", modified from "unsrt.bst"
+% BibTeX standard bibliography style `unsrt'
+ % version 0.99a for BibTeX versions 0.99a or later, LaTeX version 2.09.
+ % Copyright (C) 1985, all rights reserved.
+ % Copying of this file is authorized only if either
+ % (1) you make absolutely no changes to your copy, including name, or
+ % (2) if you do make changes, you name it something other than
+ % btxbst.doc, plain.bst, unsrt.bst, alpha.bst, and abbrv.bst.
+ % This restriction helps ensure that all standard styles are identical.
+ % The file btxbst.doc has the documentation for this style.
+
+ENTRY
+ { address
+ author
+ booktitle
+ chapter
+ edition
+ editor
+ howpublished
+ institution
+ journal
+ key
+ month
+ note
+ number
+ organization
+ pages
+ publisher
+ school
+ series
+ title
+ type
+ volume
+ year
+ }
+ {}
+ { label }
+
+INTEGERS { output.state before.all mid.sentence after.sentence after.block }
+
+FUNCTION {init.state.consts}
+{ #0 'before.all :=
+ #1 'mid.sentence :=
+ #2 'after.sentence :=
+ #3 'after.block :=
+}
+
+STRINGS { s t }
+
+FUNCTION {output.nonnull}
+{ 's :=
+ output.state mid.sentence =
+% { ", " * write$ }
+ { " " * write$ }
+ { output.state after.block =
+ { add.period$ write$
+ newline$
+ "\newblock " write$
+ }
+ { output.state before.all =
+ 'write$
+% { add.period$ " " * write$ }
+ { ", " * write$ }
+ if$
+ }
+ if$
+ mid.sentence 'output.state :=
+ }
+ if$
+ s
+}
+
+FUNCTION {output}
+{ duplicate$ empty$
+ 'pop$
+ 'output.nonnull
+ if$
+}
+
+FUNCTION {output.check}
+{ 't :=
+ duplicate$ empty$
+ { pop$ "empty " t * " in " * cite$ * warning$ }
+ 'output.nonnull
+ if$
+}
+
+FUNCTION {output.bibitem}
+{ newline$
+ "\bibitem{" write$
+ cite$ write$
+ "}" write$
+ newline$
+ ""
+ before.all 'output.state :=
+}
+
+FUNCTION {fin.entry}
+{ add.period$
+ write$
+ newline$
+}
+
+FUNCTION {new.block}
+{ output.state before.all =
+ 'skip$
+ { after.block 'output.state := }
+ if$
+}
+
+FUNCTION {new.sentence}
+{ output.state after.block =
+ 'skip$
+ { output.state before.all =
+ 'skip$
+ { after.sentence 'output.state := }
+ if$
+ }
+ if$
+}
+
+FUNCTION {not}
+{ { #0 }
+ { #1 }
+ if$
+}
+
+FUNCTION {and}
+{ 'skip$
+ { pop$ #0 }
+ if$
+}
+
+FUNCTION {or}
+{ { pop$ #1 }
+ 'skip$
+ if$
+}
+
+FUNCTION {new.block.checka}
+{ empty$
+ 'skip$
+ 'new.block
+ if$
+}
+
+FUNCTION {new.block.checkb}
+{ empty$
+ swap$ empty$
+ and
+ 'skip$
+ 'new.block
+ if$
+}
+
+FUNCTION {new.sentence.checka}
+{ empty$
+ 'skip$
+ 'new.sentence
+ if$
+}
+
+FUNCTION {new.sentence.checkb}
+{ empty$
+ swap$ empty$
+ and
+ 'skip$
+ 'new.sentence
+ if$
+}
+
+FUNCTION {field.or.null}
+{ duplicate$ empty$
+ { pop$ "" }
+ 'skip$
+ if$
+}
+
+FUNCTION {emphasize}
+{ duplicate$ empty$
+ { pop$ "" }
+ { "{\em " swap$ * "}" * }
+ if$
+}
+
+FUNCTION {parenthesize}
+{ duplicate$ empty$
+ { pop$ "" }
+ { "(" swap$ * ")" * }
+ if$
+}
+
+FUNCTION {boldface}
+{ duplicate$ empty$
+ { pop$ "" }
+ { "{\bf " swap$ * "}" * }
+ if$
+}
+
+INTEGERS { nameptr namesleft numnames }
+
+FUNCTION {format.names}
+{ 's :=
+ #1 'nameptr :=
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ { s nameptr "{vv~}{ll}{, jj}{, f}" format.name$ 't :=
+ nameptr #1 >
+ { namesleft #1 >
+ { ", " * t * }
+ { numnames #2 >
+ { ", " * }
+ 'skip$
+ if$
+ t "others" =
+ { " et~al." * }
+ { " \& " * t * }
+ if$
+ }
+ if$
+ }
+ 't
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+}
+
+FUNCTION {format.publisher}
+{ publisher empty$
+ { address empty$
+ { "" }
+ { address }
+ if$
+ }
+ { address empty$
+ { publisher}
+ { publisher ", " * address * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.editors.as.authors}
+{ editor empty$
+ { organization }
+ { editor format.names
+ editor num.names$ #1 >
+ { ", eds." * }
+ { ", ed." * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.authors}
+{ author empty$
+ { editor empty$
+ { "" }
+ { editor format.names
+ editor num.names$ #1 >
+ { ", eds." * }
+ { ", ed." * }
+ if$
+ }
+ if$
+ }
+ { author format.names }
+ if$
+}
+
+FUNCTION {format.editors}
+{ editor empty$
+ { "" }
+ { author empty$ %in this case, see format.authors
+ { "" }
+ { editor num.names$ #1 >
+ { "eds.{} " }
+ { "ed.{} " }
+ if$
+ editor format.names *
+ }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.title}
+{ title "t" change.case$
+}
+
+FUNCTION {n.dashify}
+{ 't :=
+ ""
+ { t empty$ not }
+ { t #1 #1 substring$ "-" =
+ { t #1 #2 substring$ "--" = not
+ { "--" *
+ t #2 global.max$ substring$ 't :=
+ }
+ { { t #1 #1 substring$ "-" = }
+ { "-" *
+ t #2 global.max$ substring$ 't :=
+ }
+ while$
+ }
+ if$
+ }
+ { t #1 #1 substring$ *
+ t #2 global.max$ substring$ 't :=
+ }
+ if$
+ }
+ while$
+}
+
+FUNCTION {format.date}
+{ year empty$
+ { "year?" parenthesize }
+ { year parenthesize }
+ if$
+}
+
+FUNCTION {format.btitle.series}
+{ title empty$
+ { "" }
+ { title emphasize }
+ if$
+ series empty$
+ { "" * }
+ { ", " * series * }
+ if$
+}
+
+FUNCTION {tie.or.space.connect}
+{ duplicate$ text.length$ #3 <
+ { "~" }
+ { " " }
+ if$
+ swap$ * *
+}
+
+FUNCTION {comma.connect}
+{ duplicate$ empty$
+ { pop$ }
+ { swap$
+ duplicate$ empty$
+ { pop$ }
+ { swap$ ", " swap$ * * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {either.or.check}
+{ empty$
+ 'pop$
+ { "can't use both " swap$ * " fields in " * cite$ * warning$ }
+ if$
+}
+
+FUNCTION {format.bvolume.number}
+{ volume empty$
+ { number empty$
+ { "" }
+ { "No.{}" number tie.or.space.connect }
+ if$
+ }
+ { "Vol.{}" volume tie.or.space.connect
+ "volume and number" number either.or.check
+ }
+ if$
+}
+
+FUNCTION {format.number}
+{ volume empty$
+ { number empty$
+ { "" }
+ { "No.{}" number tie.or.space.connect }
+ if$
+ }
+ { "" }
+ if$
+}
+
+FUNCTION {format.edition}
+{ edition empty$
+ { "" }
+ { output.state mid.sentence =
+ { edition "l" change.case$ " edition" * }
+ { edition "t" change.case$ " edition" * }
+ if$
+ }
+ if$
+}
+
+INTEGERS { multiresult }
+
+FUNCTION {multi.page.check}
+{ 't :=
+ #0 'multiresult :=
+ { multiresult not
+ t empty$ not
+ and
+ }
+ { t #1 #1 substring$
+ duplicate$ "-" =
+ swap$ duplicate$ "," =
+ swap$ "+" =
+ or or
+ { #1 'multiresult := }
+ { t #2 global.max$ substring$ 't := }
+ if$
+ }
+ while$
+ multiresult
+}
+
+FUNCTION {format.pages}
+{ pages empty$
+ { "" }
+ { pages multi.page.check
+ { "pp." pages n.dashify tie.or.space.connect }
+ { "p." pages tie.or.space.connect }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.vol.num.pages}
+{ volume boldface
+ pages empty$
+ 'skip$
+ { duplicate$ empty$
+ { pop$ format.pages }
+ { ", " * pages n.dashify * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.chapter.pages}
+{ chapter empty$
+ 'format.pages
+ { type empty$
+ { "chapter" }
+ { type "l" change.case$ }
+ if$
+ chapter tie.or.space.connect
+ pages empty$
+ 'skip$
+ { ", " * format.pages * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.in.ed.booktitle}
+{ booktitle empty$
+ { "" }
+ { "in " booktitle emphasize * }
+ if$
+ series empty$
+ { "" * }
+ { booktitle empty$
+ { "XXmissing booktitle \& seriesXX" * }
+ { ", " * }
+ if$
+ series *
+ }
+ if$
+}
+
+FUNCTION {empty.misc.check}
+{ author empty$ title empty$ howpublished empty$
+ month empty$ year empty$ note empty$
+ and and and and and
+ { "all relevant fields are empty in " cite$ * warning$ }
+ 'skip$
+ if$
+}
+
+FUNCTION {format.thesis.type}
+{ type empty$
+ 'skip$
+ { pop$
+ type "t" change.case$
+ }
+ if$
+}
+
+FUNCTION {format.tr.number}
+{ type empty$
+ { "Technical Report" }
+ 'type
+ if$
+ number empty$
+ { "t" change.case$ }
+ { number tie.or.space.connect }
+ if$
+}
+
+FUNCTION {format.article.crossref}
+{ key empty$
+ { journal empty$
+ { "need key or journal for " cite$ * " to crossref " * crossref *
+ warning$
+ ""
+ }
+ { "In {\em " journal * "\/}" * }
+ if$
+ }
+ { "In " key * }
+ if$
+ " \cite{" * crossref * "}" *
+}
+
+FUNCTION {format.crossref.editor}
+{ editor #1 "{vv~}{ll}" format.name$
+ editor num.names$ duplicate$
+ #2 >
+ { pop$ " et~al." * }
+ { #2 <
+ 'skip$
+ { editor #2 "{vv }{ll}{ jj}{, f}" format.name$ "others" =
+ { " et~al." * }
+ { " and " * editor #2 "{vv~}{ll}" format.name$ * }
+ if$
+ }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.book.crossref}
+{ volume empty$
+ { "empty volume in " cite$ * "'s crossref of " * crossref * warning$
+ "In "
+ }
+ { "Vol.{}" volume tie.or.space.connect
+ " of " *
+ }
+ if$
+ editor empty$
+ editor field.or.null author field.or.null =
+ or
+ { key empty$
+ { series empty$
+ { "need editor, key, or series for " cite$ * " to crossref " *
+ crossref * warning$
+ "" *
+ }
+ { "{\em " * series * "\/}" * }
+ if$
+ }
+ { key * }
+ if$
+ }
+ { format.crossref.editor * }
+ if$
+ " \cite{" * crossref * "}" *
+}
+
+FUNCTION {format.incoll.inproc.crossref}
+{ editor empty$
+ editor field.or.null author field.or.null =
+ or
+ { key empty$
+ { booktitle empty$
+ { "need editor, key, or booktitle for " cite$ * " to crossref " *
+ crossref * warning$
+ ""
+ }
+ { "in {\em " booktitle * "\/}" * }
+ if$
+ }
+ { "in " key * }
+ if$
+ }
+ { "in " format.crossref.editor * }
+ if$
+ " \cite{" * crossref * "}" *
+}
+
+FUNCTION {article}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.date "year" output.check
+ format.title "title" output.check
+ new.block
+ crossref missing$
+ { journal emphasize "journal" output.check
+ format.vol.num.pages output
+ }
+ { format.article.crossref output.nonnull
+ format.pages output
+ }
+ if$
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {book}
+{ output.bibitem
+ format.authors output.nonnull
+ crossref missing$
+ { "author and editor" editor either.or.check }
+ 'skip$
+ if$
+ new.block
+ format.date "year" output.check
+ format.btitle.series "title" output.check
+ crossref missing$
+ { format.editors output
+ new.block
+ format.publisher parenthesize output
+ format.bvolume.number output
+ new.sentence
+ }
+ { new.block
+ format.book.crossref output.nonnull
+ }
+ if$
+ format.edition output
+ new.sentence
+ format.pages output
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {booklet}
+{ output.bibitem
+ format.authors output
+ new.block
+ format.date output
+ format.title "title" output.check
+ howpublished address comma.connect parenthesize output
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {inbook}
+{ output.bibitem
+ format.authors output.nonnull
+ new.block
+ format.date "year" output.check
+ format.btitle.series "title" output.check
+ new.sentence
+ crossref missing$
+ { format.editors output
+ new.block
+ format.publisher parenthesize output
+ format.bvolume.number output
+ new.sentence
+ }
+ { format.chapter.pages "chapter and pages" output.check
+ new.block
+ format.book.crossref output.nonnull
+ }
+ if$
+ format.edition output
+ new.sentence
+ format.pages output
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {incollection}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.date "year" output.check
+ format.in.ed.booktitle "title" output.check
+ new.sentence
+ crossref missing$
+ { format.editors output
+ new.block
+ format.publisher parenthesize output
+ format.bvolume.number output
+ new.sentence
+ }
+ { format.incoll.inproc.crossref output.nonnull
+ format.chapter.pages output
+ }
+ if$
+ format.edition output
+ new.sentence
+ format.pages output
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {inproceedings}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.date "year" output.check
+ crossref missing$
+ { format.btitle.series "title" output.check
+ format.editors output
+ new.block
+ organization publisher comma.connect
+ address comma.connect
+ parenthesize output
+ new.sentence
+ format.bvolume.number output
+ new.sentence
+ }
+ { format.incoll.inproc.crossref output.nonnull
+ }
+ if$
+ format.pages output
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {conference} { inproceedings }
+
+FUNCTION {manual}
+{ output.bibitem
+ author empty$
+ { organization empty$
+ 'skip$
+ { organization output.nonnull }
+ if$
+ }
+ { format.authors output.nonnull }
+ if$
+ new.block
+ format.date "year" output.check
+ format.btitle.series "title" output.check
+ author empty$
+ { "" }
+ { organization }
+ if$
+ publisher comma.connect address comma.connect parenthesize output
+ new.sentence
+ format.edition output
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {mastersthesis}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.date "year" output.check
+ "Master's thesis" format.thesis.type output.nonnull
+ school address comma.connect parenthesize output
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {misc}
+{ output.bibitem
+ format.authors output
+ new.block
+ format.date output
+ format.title output
+ howpublished parenthesize output
+ new.block
+ note output
+ fin.entry
+ empty.misc.check
+}
+
+FUNCTION {phdthesis}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.date "year" output.check
+ "Ph.D. thesis" format.thesis.type output.nonnull
+ school address comma.connect parenthesize output
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {proceedings}
+{ output.bibitem
+ format.editors.as.authors output
+ new.block
+ format.date output
+ format.btitle.series "title" output.check
+ organization publisher comma.connect
+ address comma.connect parenthesize output
+ format.bvolume.number output
+ new.sentence
+ format.pages output
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {techreport}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.date output
+ format.title "title" output.check
+ new.sentence
+ institution address comma.connect parenthesize output
+ new.sentence
+ format.tr.number output.nonnull
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {unpublished}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.date output
+ format.title "title" output.check
+ new.block
+ note "note" output.check
+ fin.entry
+}
+
+FUNCTION {default.type} { misc }
+
+MACRO {jan} {"January"}
+
+MACRO {feb} {"February"}
+
+MACRO {mar} {"March"}
+
+MACRO {apr} {"April"}
+
+MACRO {may} {"May"}
+
+MACRO {jun} {"June"}
+
+MACRO {jul} {"July"}
+
+MACRO {aug} {"August"}
+
+MACRO {sep} {"September"}
+
+MACRO {oct} {"October"}
+
+MACRO {nov} {"November"}
+
+MACRO {dec} {"December"}
+
+MACRO {acmcs} {"ACM Computing Surveys"}
+
+MACRO {acta} {"Acta Informatica"}
+
+MACRO {cacm} {"Communications of the ACM"}
+
+MACRO {ibmjrd} {"IBM Journal of Research and Development"}
+
+MACRO {ibmsj} {"IBM Systems Journal"}
+
+MACRO {ieeese} {"IEEE Transactions on Software Engineering"}
+
+MACRO {ieeetc} {"IEEE Transactions on Computers"}
+
+MACRO {ieeetcad}
+ {"IEEE Transactions on Computer-Aided Design of Integrated Circuits"}
+
+MACRO {ipl} {"Information Processing Letters"}
+
+MACRO {jacm} {"Journal of the ACM"}
+
+MACRO {jcss} {"Journal of Computer and System Sciences"}
+
+MACRO {scp} {"Science of Computer Programming"}
+
+MACRO {sicomp} {"SIAM Journal on Computing"}
+
+MACRO {tocs} {"ACM Transactions on Computer Systems"}
+
+MACRO {tods} {"ACM Transactions on Database Systems"}
+
+MACRO {tog} {"ACM Transactions on Graphics"}
+
+MACRO {toms} {"ACM Transactions on Mathematical Software"}
+
+MACRO {toois} {"ACM Transactions on Office Information Systems"}
+
+MACRO {toplas} {"ACM Transactions on Programming Languages and Systems"}
+
+MACRO {tcs} {"Theoretical Computer Science"}
+
+READ
+
+STRINGS { longest.label }
+
+INTEGERS { number.label longest.label.width }
+
+FUNCTION {initialize.longest.label}
+{ "" 'longest.label :=
+ #1 'number.label :=
+ #0 'longest.label.width :=
+}
+
+FUNCTION {longest.label.pass}
+{ number.label int.to.str$ 'label :=
+ number.label #1 + 'number.label :=
+ label width$ longest.label.width >
+ { label 'longest.label :=
+ label width$ 'longest.label.width :=
+ }
+ 'skip$
+ if$
+}
+
+EXECUTE {initialize.longest.label}
+
+ITERATE {longest.label.pass}
+
+FUNCTION {begin.bib}
+{ preamble$ empty$
+ 'skip$
+ { preamble$ write$ newline$ }
+ if$
+ "\begin{thebibliography}{" longest.label * "}" * write$ newline$
+}
+
+EXECUTE {begin.bib}
+
+EXECUTE {init.state.consts}
+
+ITERATE {call.type$}
+
+FUNCTION {end.bib}
+{ newline$
+ "\end{thebibliography}" write$ newline$
+}
+
+EXECUTE {end.bib}
diff --git a/biblio/bibtex/contrib/misc/refer.bst b/biblio/bibtex/contrib/misc/refer.bst
new file mode 100644
index 0000000000..02fae7f6df
--- /dev/null
+++ b/biblio/bibtex/contrib/misc/refer.bst
@@ -0,0 +1,166 @@
+%
+% 8/4/'90
+%Ciaran McHale
+%Department of Computer Science, Trinity College, Dublin 2, Ireland.
+%Telephone: +353-1-772941 ext 1538 FAX: +353-1-772204 Telex: 93782 TCD EI
+%email: cjmchale@cs.tcd.ie or cjmchale%cs.tcd.ie@cunyvm.cuny.edu
+% Hacked together by Ciaran McHale (cjmchale@cs.tcd.ie) to translate
+% BibTeX bibliographies into refer format
+% Based on a bib style file by Kannan Varadhan
+%
+
+
+ENTRY
+ { % entry fields
+ abstract % non standard
+ address
+ annote % non standard
+ author
+ booktitle
+ chapter
+ edition
+ editor
+ howpublished
+ institution
+ journal
+ key
+ keywords % non standard
+ month
+ note
+ number
+ organization
+ pages
+ publisher
+ school
+ series
+ title
+ type
+ volume
+ year
+ }
+ {} % no integer entry variables
+ { label extra.label sort.label } % label entry variables
+
+
+STRINGS { s t a.name }
+
+
+FUNCTION {not}
+{ { #0 }
+ { #1 }
+ if$
+}
+
+FUNCTION {and}
+{ 'skip$
+ { pop$ #0 }
+ if$
+}
+
+FUNCTION {or}
+{ { pop$ #1 }
+ 'skip$
+ if$
+}
+
+INTEGERS { nameptr namesleft numnames }
+
+FUNCTION {handle.names}
+{ 't := % type e.g. "A" for authors, "E" for editors
+ 's := % the string containing the names
+ #1 'nameptr :=
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+
+ { s nameptr "{ff~}{vv~}{ll}{, jj}" format.name$ 'a.name :=
+
+ a.name "others" =
+ 'skip$ % don't print out "%A others"
+ { "%" t * " " * a.name * write$ newline$ }
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+}
+
+FUNCTION {handle.maybe.empty}
+{
+ 't :=
+ duplicate$
+ empty$
+ 'pop$
+ { "%" t * " " * swap$ * write$ newline$ }
+ if$
+}
+
+FUNCTION {translate}
+{
+ newline$ % get a blank line between each entry
+
+ title "T" handle.maybe.empty
+ booktitle "B" handle.maybe.empty
+
+ % there may be multiple authors so handle it differently
+ author empty$
+ { " empty author in " cite$ * warning$ }
+ { author "A" handle.names }
+ if$
+ editor "E" handle.maybe.empty
+ journal "J" handle.maybe.empty
+ keywords "K" handle.maybe.empty
+ cite$ "L" handle.maybe.empty
+ volume "V" handle.maybe.empty
+ abstract "X" handle.maybe.empty
+
+ % The date, if present may be just the year or both the month and year
+ % or might even be just the month
+ month empty$ year empty$ and
+ 'skip$ % no date of publication so nothing to do
+ {
+ month empty$ % I'm using the if statement because I'm not
+ { "" } % sure that--- month " " year * --- would work.
+ { month " " * } % (The manual doesn't mention anything about
+ if$ % this so I'm playing safe)
+ year empty$
+ { "" }
+ { year }
+ if$
+ *
+ "D" handle.maybe.empty
+ }
+ if$
+ pages "P" handle.maybe.empty
+ note "O" handle.maybe.empty
+ number "N" handle.maybe.empty
+ series "S" handle.maybe.empty
+ annote "Y" handle.maybe.empty
+ address "C" handle.maybe.empty
+
+}
+
+
+FUNCTION {article} { translate }
+FUNCTION {book} { translate }
+FUNCTION {booklet} { translate }
+FUNCTION {inbook} { translate }
+FUNCTION {incollection} { translate }
+FUNCTION {inproceedings} { translate }
+FUNCTION {manual} { translate }
+FUNCTION {mastersthesis} { translate }
+FUNCTION {misc} { translate }
+FUNCTION {phdthesis} { translate }
+FUNCTION {proceedings} { translate }
+FUNCTION {techreport} { translate }
+FUNCTION {unpublished} { translate }
+FUNCTION {default.type} { translate }
+
+
+READ
+
+ITERATE {call.type$}
+
+
+
+
diff --git a/biblio/bibtex/contrib/misc/these.bst b/biblio/bibtex/contrib/misc/these.bst
new file mode 100644
index 0000000000..3789b6352c
--- /dev/null
+++ b/biblio/bibtex/contrib/misc/these.bst
@@ -0,0 +1,1252 @@
+%
+% Style de bibliographie pour the`se - d'apres alpha.bst
+%
+% Matthieu Herrb (matthieu@laas.fr) - Juillet 89, Octobre 90
+%
+% Les references seront designees tant dans le texte que dans
+% la liste recapitulative (ordonnee suivant l'ordre alphabetique du nom
+% du premier auteur), par le nom du premier auteur suivi des deux
+% derniers chiffres de l'annee de publication, le tout entre crochets.
+% Si deux references du meme auteur se rapportent a la meme annee, elles
+% seront differenciees par des lettres minuscules (a, b, etc.)
+%
+
+ % version 0.99a for BibTeX versions 0.99a or later, LaTeX version 2.09.
+ % Copyright (C) 1985, all rights reserved.
+ % Copying of this file is authorized only if either
+ % (1) you make absolutely no changes to your copy, including name, or
+ % (2) if you do make changes, you name it something other than
+ % btxbst.doc, plain.bst, unsrt.bst, alpha.bst, and abbrv.bst.
+ % This restriction helps ensure that all standard styles are identical.
+
+ENTRY
+ { address
+ author
+ booktitle
+ chapter
+ edition
+ editor
+ howpublished
+ institution
+ journal
+ key
+ month
+ note
+ number
+ organization
+ pages
+ publisher
+ school
+ series
+ title
+ type
+ volume
+ year
+ }
+ {}
+ { label extra.label sort.label }
+
+INTEGERS { output.state before.all mid.sentence after.sentence after.block }
+
+FUNCTION {init.state.consts}
+{ #0 'before.all :=
+ #1 'mid.sentence :=
+ #2 'after.sentence :=
+ #3 'after.block :=
+}
+
+STRINGS { s t }
+
+FUNCTION {output.nonnull}
+{ 's :=
+ output.state mid.sentence =
+ { ", " * write$ }
+ { output.state after.block =
+ { add.period$ write$
+ newline$
+ "\newblock " write$
+ }
+ { output.state before.all =
+ 'write$
+ { add.period$ " " * write$ }
+ if$
+ }
+ if$
+ mid.sentence 'output.state :=
+ }
+ if$
+ s
+}
+
+FUNCTION {output}
+{ duplicate$ empty$
+ 'pop$
+ 'output.nonnull
+ if$
+}
+
+FUNCTION {output.check}
+{ 't :=
+ duplicate$ empty$
+ { pop$ "empty " t * " in " * cite$ * warning$ }
+ 'output.nonnull
+ if$
+}
+
+FUNCTION {output.bibitem}
+{ newline$
+ "\bibitem[" write$
+ label write$
+ "]{" write$
+ cite$ write$
+ "}" write$
+ newline$
+ ""
+ before.all 'output.state :=
+}
+
+FUNCTION {fin.entry}
+{ add.period$
+ write$
+ newline$
+}
+
+FUNCTION {new.block}
+{ output.state before.all =
+ 'skip$
+ { after.block 'output.state := }
+ if$
+}
+
+FUNCTION {new.sentence}
+{ output.state after.block =
+ 'skip$
+ { output.state before.all =
+ 'skip$
+ { after.sentence 'output.state := }
+ if$
+ }
+ if$
+}
+
+FUNCTION {not}
+{ { #0 }
+ { #1 }
+ if$
+}
+
+FUNCTION {and}
+{ 'skip$
+ { pop$ #0 }
+ if$
+}
+
+FUNCTION {or}
+{ { pop$ #1 }
+ 'skip$
+ if$
+}
+
+FUNCTION {new.block.checka}
+{ empty$
+ 'skip$
+ 'new.block
+ if$
+}
+
+FUNCTION {new.block.checkb}
+{ empty$
+ swap$ empty$
+ and
+ 'skip$
+ 'new.block
+ if$
+}
+
+FUNCTION {new.sentence.checka}
+{ empty$
+ 'skip$
+ 'new.sentence
+ if$
+}
+
+FUNCTION {new.sentence.checkb}
+{ empty$
+ swap$ empty$
+ and
+ 'skip$
+ 'new.sentence
+ if$
+}
+
+FUNCTION {field.or.null}
+{ duplicate$ empty$
+ { pop$ "" }
+ 'skip$
+ if$
+}
+
+FUNCTION {emphasize}
+{ duplicate$ empty$
+ { pop$ "" }
+ { "{\em " swap$ * "}" * }
+ if$
+}
+
+FUNCTION {scapify}
+{ duplicate$ empty$
+ { pop$ "" }
+ { "{\sc " swap$ * "}" * }
+ if$
+}
+
+FUNCTION {underline}
+{ duplicate$ empty$
+ { pop$ "" }
+ { "{\ul " swap$ * "}" * }
+ if$
+}
+
+INTEGERS { nameptr namesleft numnames }
+
+FUNCTION {format.names}
+{ 's :=
+ #1 'nameptr :=
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ { s nameptr "{ff~}{vv~}{ll}{~jj}" format.name$ 't :=
+ nameptr #1 >
+ { namesleft #1 >
+ { ", " * t * }
+ { numnames #2 >
+ { "" * }
+ 'skip$
+ if$
+ t "others" =
+ { " et~al." emphasize * }
+ { " \& " * t * }
+ if$
+ }
+ if$
+ }
+ 't
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+}
+
+FUNCTION {format.authors}
+{ author empty$
+ { "" }
+ { author format.names }
+ if$
+}
+
+FUNCTION {format.editors}
+{ editor empty$
+ { "" }
+ { editor format.names
+ editor num.names$ #1 >
+ { ", editeurs" * }
+ { ", editeur" * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.title}
+{ title empty$
+ { "" }
+ { title "t" change.case$ }
+ if$
+}
+
+FUNCTION {n.dashify}
+{ 't :=
+ ""
+ { t empty$ not }
+ { t #1 #1 substring$ "-" =
+ { t #1 #2 substring$ "--" = not
+ { "--" *
+ t #2 global.max$ substring$ 't :=
+ }
+ { { t #1 #1 substring$ "-" = }
+ { "-" *
+ t #2 global.max$ substring$ 't :=
+ }
+ while$
+ }
+ if$
+ }
+ { t #1 #1 substring$ *
+ t #2 global.max$ substring$ 't :=
+ }
+ if$
+ }
+ while$
+}
+
+FUNCTION {format.date}
+{ year empty$
+ { month empty$
+ { "" }
+ { "there's a month but no year in " cite$ * warning$
+ month
+ }
+ if$
+ }
+ { month empty$
+ 'year
+ { month " " * year * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.btitle}
+{ title emphasize
+}
+
+FUNCTION {format.utitle}
+{ title emphasize
+}
+
+FUNCTION {tie.or.space.connect}
+{ duplicate$ text.length$ #3 <
+ { "~" }
+ { " " }
+ if$
+ swap$ * *
+}
+
+FUNCTION {either.or.check}
+{ empty$
+ 'pop$
+ { "can't use both " swap$ * " fields in " * cite$ * warning$ }
+ if$
+}
+
+FUNCTION {format.bvolume}
+{ volume empty$
+ { "" }
+ { "volume" volume tie.or.space.connect
+ series empty$
+ 'skip$
+ { " of " * series emphasize * }
+ if$
+ "volume and number" number either.or.check
+ }
+ if$
+}
+
+FUNCTION {format.number.series}
+{ volume empty$
+ { number empty$
+ { series field.or.null }
+ { output.state mid.sentence =
+ { "num\'ero" }
+ { "Nume\'ero" }
+ if$
+ number tie.or.space.connect
+ series empty$
+ { "there's a number but no series in " cite$ * warning$ }
+ { " in " * series * }
+ if$
+ }
+ if$
+ }
+ { "" }
+ if$
+}
+
+FUNCTION {format.edition}
+{ edition empty$
+ { "" }
+ { output.state mid.sentence =
+ { edition "l" change.case$ " edition" * }
+ { edition "t" change.case$ " edition" * }
+ if$
+ }
+ if$
+}
+
+INTEGERS { multiresult }
+
+FUNCTION {multi.page.check}
+{ 't :=
+ #0 'multiresult :=
+ { multiresult not
+ t empty$ not
+ and
+ }
+ { t #1 #1 substring$
+ duplicate$ "-" =
+ swap$ duplicate$ "," =
+ swap$ "+" =
+ or or
+ { #1 'multiresult := }
+ { t #2 global.max$ substring$ 't := }
+ if$
+ }
+ while$
+ multiresult
+}
+
+FUNCTION {format.pages}
+{ pages empty$
+ { "" }
+ { pages multi.page.check
+ { "pages" pages n.dashify tie.or.space.connect }
+ { "page" pages tie.or.space.connect }
+ if$
+ }
+ if$
+}
+
+
+FUNCTION {format.volume}
+{ volume empty$
+ { "" }
+ { "vol.~" volume * }
+ if$
+}
+
+FUNCTION {format.number}
+{ number empty$
+ { "" }
+ { "no.~" number * }
+ if$
+}
+
+FUNCTION {format.chapter.pages}
+{ chapter empty$
+ 'format.pages
+ { type empty$
+ { "chapitre" }
+ { type "l" change.case$ }
+ if$
+ chapter tie.or.space.connect
+ pages empty$
+ 'skip$
+ { ", " * format.pages * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.in.ed.booktitle}
+{ booktitle empty$
+ { "" }
+ { editor empty$
+ { "In " booktitle * }
+ { "In " format.editors * ", " * booktitle * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {empty.misc.check}
+{ author empty$ title empty$ howpublished empty$
+ month empty$ year empty$ note empty$
+ and and and and and
+ key empty$ not and
+ { "all relevant fields are empty in " cite$ * warning$ }
+ 'skip$
+ if$
+}
+
+FUNCTION {format.thesis.type}
+{ type empty$
+ 'skip$
+ { pop$
+ type "t" change.case$
+ }
+ if$
+}
+
+FUNCTION {format.tr.number}
+{ type empty$
+ { "Rapport technique" }
+ 'type
+ if$
+ number empty$
+ { "t" change.case$ }
+ { number tie.or.space.connect }
+ if$
+}
+
+FUNCTION {format.article.crossref}
+{ key empty$
+ { journal empty$
+ { "need key or journal for " cite$ * " to crossref " * crossref *
+ warning$
+ ""
+ }
+ { "In {\em " journal * "\/}" * }
+ if$
+ }
+ { "In " key * }
+ if$
+ " \cite{" * crossref * "}" *
+}
+
+FUNCTION {format.crossref.editor}
+{ editor #1 "{vv~}{ll}" format.name$
+ editor num.names$ duplicate$
+ #2 >
+ { pop$ " et~al." * }
+ { #2 <
+ 'skip$
+ { editor #2 "{ff }{vv }{ll}{ jj}" format.name$ "others" =
+ { " et~al." * }
+ { " \& " * editor #2 "{vv~}{ll}" format.name$ * }
+ if$
+ }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.book.crossref}
+{ volume empty$
+ { "empty volume in " cite$ * "'s crossref of " * crossref * warning$
+ "In "
+ }
+ { "Volume" volume tie.or.space.connect
+ " of " *
+ }
+ if$
+ editor empty$
+ editor field.or.null author field.or.null =
+ or
+ { key empty$
+ { series empty$
+ { "need editor, key, or series for " cite$ * " to crossref " *
+ crossref * warning$
+ "" *
+ }
+ { "{\em " * series * "\/}" * }
+ if$
+ }
+ { key * }
+ if$
+ }
+ { format.crossref.editor * }
+ if$
+ " \cite{" * crossref * "}" *
+}
+
+FUNCTION {format.incoll.inproc.crossref}
+{ editor empty$
+ editor field.or.null author field.or.null =
+ or
+ { booktitle empty$
+ { key empty$
+ { "need editor, key, or booktitle for " cite$ * " to crossref " *
+ crossref * warning$
+ ""
+ }
+ { "In " key * }
+ if$
+ }
+ { "In " booktitle * }
+ if$
+ }
+ { "In " format.crossref.editor * }
+ if$
+ " \cite{" * crossref * "}" *
+}
+
+FUNCTION {article}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.utitle "title" output.check
+ new.block
+ crossref missing$
+ { journal "journal" output.check
+ format.volume output
+ format.number output
+ format.pages output
+ format.date "year" output.check
+ }
+ { format.article.crossref output.nonnull
+ format.pages output
+ }
+ if$
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {book}
+{ output.bibitem
+ author empty$
+ { format.editors "author and editor" output.check }
+ { format.authors output.nonnull
+ crossref missing$
+ { "author and editor" editor either.or.check }
+ 'skip$
+ if$
+ }
+ if$
+ new.block
+ format.title "title" output.check
+ crossref missing$
+ { format.bvolume output
+ new.block
+ format.number.series output
+ new.sentence
+ publisher "publisher" output.check
+ address output
+ }
+ { new.block
+ format.book.crossref output.nonnull
+ }
+ if$
+ format.edition output
+ format.date "year" output.check
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {booklet}
+{ output.bibitem
+ format.authors output
+ new.block
+ format.title "title" output.check
+ howpublished address new.block.checkb
+ howpublished output
+ address output
+ format.date output
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {inbook}
+{ output.bibitem
+ author empty$
+ { format.editors "author and editor" output.check }
+ { format.authors output.nonnull
+ crossref missing$
+ { "author and editor" editor either.or.check }
+ 'skip$
+ if$
+ }
+ if$
+ new.block
+ format.title "title" output.check
+ crossref missing$
+ { format.bvolume output
+ format.chapter.pages "chapter and pages" output.check
+ new.block
+ format.number.series output
+ new.sentence
+ publisher "publisher" output.check
+ address output
+ }
+ { format.chapter.pages "chapter and pages" output.check
+ new.block
+ format.book.crossref output.nonnull
+ }
+ if$
+ format.edition output
+ format.date "year" output.check
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {incollection}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.utitle "title" output.check
+ new.block
+ crossref missing$
+ { format.in.ed.booktitle "booktitle" output.check
+ format.bvolume output
+ format.number.series output
+ format.chapter.pages output
+ new.sentence
+ publisher "publisher" output.check
+ address output
+ format.edition output
+ format.date "year" output.check
+ }
+ { format.incoll.inproc.crossref output.nonnull
+ format.chapter.pages output
+ }
+ if$
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {inproceedings}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.utitle "title" output.check
+ new.block
+ crossref missing$
+ { format.in.ed.booktitle "booktitle" output.check
+ format.bvolume output
+ format.number.series output
+ format.pages output
+ address empty$
+ { organization publisher new.sentence.checkb
+ organization output
+ publisher output
+ format.date "year" output.check
+ }
+ { address output.nonnull
+ format.date "year" output.check
+ new.sentence
+ organization output
+ publisher output
+ }
+ if$
+ }
+ { format.incoll.inproc.crossref output.nonnull
+ format.pages output
+ }
+ if$
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {conference} { inproceedings }
+
+FUNCTION {manual}
+{ output.bibitem
+ author empty$
+ { organization empty$
+ 'skip$
+ { organization output.nonnull
+ address output
+ }
+ if$
+ }
+ { format.authors output.nonnull }
+ if$
+ new.block
+ format.utitle "title" output.check
+ author empty$
+ { organization empty$
+ { address new.block.checka
+ address output
+ }
+ 'skip$
+ if$
+ }
+ { organization address new.block.checkb
+ organization output
+ address output
+ }
+ if$
+ format.edition output
+ format.date output
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {mastersthesis}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.title "title" output.check
+ new.block
+ "Master's thesis" format.thesis.type output.nonnull
+ school "school" output.check
+ address output
+ format.date "year" output.check
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {misc}
+{ output.bibitem
+ format.authors output
+ title howpublished new.block.checkb
+ format.utitle output
+ howpublished new.block.checka
+ howpublished output
+ format.date output
+ new.block
+ note output
+ fin.entry
+ empty.misc.check
+}
+
+FUNCTION {phdthesis}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.btitle "title" output.check
+ new.block
+ "PhD thesis" format.thesis.type output.nonnull
+ school "school" output.check
+ address output
+ format.date "year" output.check
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {proceedings}
+{ output.bibitem
+ editor empty$
+ { organization output }
+ { format.editors output.nonnull }
+ if$
+ new.block
+ format.title "title" output.check
+ format.bvolume output
+ format.number.series output
+ address empty$
+ { editor empty$
+ { publisher new.sentence.checka }
+ { organization publisher new.sentence.checkb
+ organization output
+ }
+ if$
+ publisher output
+ format.date "year" output.check
+ }
+ { address output.nonnull
+ format.date "year" output.check
+ new.sentence
+ editor empty$
+ 'skip$
+ { organization output }
+ if$
+ publisher output
+ }
+ if$
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {techreport}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.utitle "title" output.check
+ new.block
+ format.tr.number output.nonnull
+ institution "institution" output.check
+ address output
+ format.date "year" output.check
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {unpublished}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.title "title" output.check
+ new.block
+ note "note" output.check
+ format.date output
+ fin.entry
+}
+
+FUNCTION {default.type} { misc }
+
+MACRO {jan} {"January"}
+
+MACRO {feb} {"February"}
+
+MACRO {mar} {"March"}
+
+MACRO {apr} {"April"}
+
+MACRO {may} {"May"}
+
+MACRO {jun} {"June"}
+
+MACRO {jul} {"July"}
+
+MACRO {aug} {"August"}
+
+MACRO {sep} {"September"}
+
+MACRO {oct} {"October"}
+
+MACRO {nov} {"November"}
+
+MACRO {dec} {"December"}
+
+MACRO {acmcs} {"ACM Computing Surveys"}
+
+MACRO {acta} {"Acta Informatica"}
+
+MACRO {cacm} {"Communications of the ACM"}
+
+MACRO {ibmjrd} {"IBM Journal of Research and Development"}
+
+MACRO {ibmsj} {"IBM Systems Journal"}
+
+MACRO {ieeese} {"IEEE Transactions on Software Engineering"}
+
+MACRO {ieeetc} {"IEEE Transactions on Computers"}
+
+MACRO {ieeetcad}
+ {"IEEE Transactions on Computer-Aided Design of Integrated Circuits"}
+
+MACRO {ipl} {"Information Processing Letters"}
+
+MACRO {jacm} {"Journal of the ACM"}
+
+MACRO {jcss} {"Journal of Computer and System Sciences"}
+
+MACRO {scp} {"Science of Computer Programming"}
+
+MACRO {sicomp} {"SIAM Journal on Computing"}
+
+MACRO {tocs} {"ACM Transactions on Computer Systems"}
+
+MACRO {tods} {"ACM Transactions on Database Systems"}
+
+MACRO {tog} {"ACM Transactions on Graphics"}
+
+MACRO {toms} {"ACM Transactions on Mathematical Software"}
+
+MACRO {toois} {"ACM Transactions on Office Information Systems"}
+
+MACRO {toplas} {"ACM Transactions on Programming Languages and Systems"}
+
+MACRO {tcs} {"Theoretical Computer Science"}
+
+READ
+
+FUNCTION {sortify}
+{ purify$
+ "l" change.case$
+}
+
+INTEGERS { len }
+
+FUNCTION {chop.word}
+{ 's :=
+ 'len :=
+ s #1 len substring$ =
+ { s len #1 + global.max$ substring$ }
+ 's
+ if$
+}
+
+INTEGERS { et.al.char.used }
+
+FUNCTION {initialize.et.al.char.used}
+{ #0 'et.al.char.used :=
+}
+
+EXECUTE {initialize.et.al.char.used}
+
+%
+% Cette function produit le label avec le nom du premier auteur
+%
+FUNCTION {format.lab.names}
+{ 's :=
+ s #1 "{vv }{ll}" format.name$
+}
+
+FUNCTION {author.key.label}
+{ author empty$
+ { key empty$
+ { cite$ #1 #3 substring$ }
+ { key #3 }
+ if$
+ }
+ { author format.lab.names }
+ if$
+}
+
+FUNCTION {author.editor.key.label}
+{ author empty$
+ { editor empty$
+ { key empty$
+ { cite$ #1 #3 substring$ }
+ { key }
+ if$
+ }
+ { editor format.lab.names }
+ if$
+ }
+ { author format.lab.names }
+ if$
+}
+
+FUNCTION {author.key.organization.label}
+{ author empty$
+ { key empty$
+ { organization empty$
+ { cite$ #1 #3 substring$ }
+ { "The " #4 organization chop.word #3 text.prefix$ }
+ if$
+ }
+ { key }
+ if$
+ }
+ { author format.lab.names }
+ if$
+}
+
+FUNCTION {editor.key.organization.label}
+{ editor empty$
+ { key empty$
+ { organization empty$
+ { cite$ #1 #3 substring$ }
+ { "The " #4 organization chop.word #3 text.prefix$ }
+ if$
+ }
+ { key }
+ if$
+ }
+ { editor format.lab.names }
+ if$
+}
+
+%
+% Fonction modifiee pour generer les bons labels
+FUNCTION {calc.label}
+{ type$ "book" =
+ type$ "inbook" =
+ or
+ 'author.editor.key.label
+ { type$ "proceedings" =
+ 'editor.key.organization.label
+ { type$ "manual" =
+ 'author.key.organization.label
+ 'author.key.label
+ if$
+ }
+ if$
+ }
+ if$
+ duplicate$
+ "~" *
+ year #-1 #2 substring$ field.or.null purify$ *
+ 'label :=
+ year #-1 #4 substring$ field.or.null purify$
+ *
+ sortify 'sort.label :=
+}
+
+FUNCTION {sort.format.names}
+{ 's :=
+ #1 'nameptr :=
+ ""
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ { nameptr #1 >
+ { " " * }
+ 'skip$
+ if$
+ s nameptr "{vv{ } }{ll{ }}{ ff{ }}{ jj{ }}" format.name$ 't :=
+ nameptr numnames = t "others" = and
+ { "et al" * }
+ { t sortify * }
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+}
+
+FUNCTION {sort.format.title}
+{ 't :=
+ "A " #2
+ "An " #3
+ "The " #4 t chop.word
+ chop.word
+ chop.word
+ sortify
+ #1 global.max$ substring$
+}
+
+FUNCTION {author.sort}
+{ author empty$
+ { key empty$
+ { "to sort, need author or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { author sort.format.names }
+ if$
+}
+
+FUNCTION {author.editor.sort}
+{ author empty$
+ { editor empty$
+ { key empty$
+ { "to sort, need author, editor, or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { editor sort.format.names }
+ if$
+ }
+ { author sort.format.names }
+ if$
+}
+
+FUNCTION {author.organization.sort}
+{ author empty$
+ { organization empty$
+ { key empty$
+ { "to sort, need author, organization, or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { "The " #4 organization chop.word sortify }
+ if$
+ }
+ { author sort.format.names }
+ if$
+}
+
+FUNCTION {editor.organization.sort}
+{ editor empty$
+ { organization empty$
+ { key empty$
+ { "to sort, need editor, organization, or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { "The " #4 organization chop.word sortify }
+ if$
+ }
+ { editor sort.format.names }
+ if$
+}
+
+FUNCTION {presort}
+{ calc.label
+ sort.label
+ " "
+ *
+ type$ "book" =
+ type$ "inbook" =
+ or
+ 'author.editor.sort
+ { type$ "proceedings" =
+ 'editor.organization.sort
+ { type$ "manual" =
+ 'author.organization.sort
+ 'author.sort
+ if$
+ }
+ if$
+ }
+ if$
+ *
+ " "
+ *
+ year field.or.null sortify
+ *
+ " "
+ *
+ title field.or.null
+ sort.format.title
+ *
+ #1 entry.max$ substring$
+ 'sort.key$ :=
+}
+
+ITERATE {presort}
+
+SORT
+
+STRINGS { longest.label last.sort.label next.extra }
+
+INTEGERS { longest.label.width last.extra.num }
+
+FUNCTION {initialize.longest.label}
+{ "" 'longest.label :=
+ #0 int.to.chr$ 'last.sort.label :=
+ "" 'next.extra :=
+ #0 'longest.label.width :=
+ #0 'last.extra.num :=
+}
+
+FUNCTION {forward.pass}
+{ last.sort.label sort.label =
+ { last.extra.num #1 + 'last.extra.num :=
+ last.extra.num int.to.chr$ 'extra.label :=
+ }
+ { "a" chr.to.int$ 'last.extra.num :=
+ "" 'extra.label :=
+ sort.label 'last.sort.label :=
+ }
+ if$
+}
+
+FUNCTION {reverse.pass}
+{ next.extra "b" =
+ { "a" 'extra.label := }
+ 'skip$
+ if$
+ label extra.label * 'label :=
+ label width$ longest.label.width >
+ { label 'longest.label :=
+ label width$ 'longest.label.width :=
+ }
+ 'skip$
+ if$
+ extra.label 'next.extra :=
+}
+
+EXECUTE {initialize.longest.label}
+
+ITERATE {forward.pass}
+
+REVERSE {reverse.pass}
+
+FUNCTION {begin.bib}
+{ et.al.char.used
+ { "\newcommand{\etalchar}[1]{$^{#1}$}" write$ newline$ }
+ 'skip$
+ if$
+ preamble$ empty$
+ 'skip$
+ { preamble$ write$ newline$ }
+ if$
+ "\begin{thebibliography}{" longest.label * "}" * write$ newline$
+% "\begin{thebibliography}{xxxxx}" write$ newline$
+}
+
+EXECUTE {begin.bib}
+
+EXECUTE {init.state.consts}
+
+ITERATE {call.type$}
+
+FUNCTION {end.bib}
+{ newline$
+ "\end{thebibliography}" write$ newline$
+}
+
+EXECUTE {end.bib}
diff --git a/biblio/bibtex/contrib/misc/wmaainf.bst b/biblio/bibtex/contrib/misc/wmaainf.bst
new file mode 100644
index 0000000000..8b75fd6e3d
--- /dev/null
+++ b/biblio/bibtex/contrib/misc/wmaainf.bst
@@ -0,0 +1,825 @@
+% This is WMAAINF.BST in text format, as of Jan 31, 1988.
+% Abteilung f"ur Angewandte Informatik bibliography style
+% alphanumeric labels, aphabetical order,
+% journals not abbreviated,
+% quotes around article titles,
+% much like the "plain" and IEEE family, from which this is adapted.
+%
+% History
+% 1/31/88 (WM) Original version, by Walter M"ulner,
+% Institute of Statistics and Computer Science, Univ. Vienna,
+% Dept. of Applied Inf. Science
+%
+% 05/22/89 (WM) something curious happened: our well working
+% Bibstyle wasn't accepted by this hirngespinstig
+% new version of BIBTEX from Oren Patashnig.
+% --> change all postfix notations (ha ha!)
+% DO NOT MAKE ANY!! changes to this style without consulting the author
+%
+ENTRY
+ { address
+ author
+ booktitle
+ chapter
+ edition
+ editor
+ howpublished
+ institution
+ journal
+ key
+ month
+ note
+ number
+ organization
+ pages
+ publisher
+ school
+ series
+ title
+ type
+ volume
+ year
+ }
+ {}
+ {label extra.label sort.label}
+
+
+
+INTEGERS { output.state before.all mid.sentence mid.sentenceb
+ after.sentence after.block }
+
+FUNCTION {init.state.consts}
+{ #0 'before.all :=
+ #1 'mid.sentence :=
+ #2 'mid.sentenceb :=
+ #3 'after.sentence :=
+ #4 'after.block :=
+}
+
+STRINGS { s t }
+FUNCTION {output.nonnull}
+{ 's :=
+ output.state mid.sentence =
+ { ", " * write$ }
+ { output.state mid.sentenceb =
+ { " " * write$ }
+ { output.state after.block =
+ { add.period$ write$
+ newline$
+ "\newblock " write$
+ }
+ { output.state before.all =
+ 'write$
+ { add.period$ " " * write$ }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+ mid.sentence 'output.state :=
+ s
+}
+
+FUNCTION {output}
+{ 's :=
+ s "" =
+ 'skip$
+ { s output.nonnull }
+ if$
+}
+
+FUNCTION {output.check}
+{ 's :=
+ 't :=
+ s "" =
+ { "Warning: the " t * " shouldn't be empty in " * cite$ * top$ }
+ { s output.nonnull }
+ if$
+}
+
+FUNCTION {output.bibitem}
+{ newline$
+
+ "\bibitem[" write$
+ label write$
+ "]{" write$
+ cite$ write$
+ "}" write$
+ newline$
+ ""
+ before.all 'output.state :=
+}
+
+% FUNCTION {blank.sep}
+% { mid.sentenceb 'output.state :=
+% }
+
+FUNCTION {fin.entry}
+{ add.period$
+ write$
+ newline$
+}
+
+FUNCTION {new.block}
+{ output.state before.all =
+ 'skip$
+ { after.block 'output.state := }
+ if$
+}
+
+FUNCTION {new.sentence}
+{ output.state after.block =
+ 'skip$
+ { output.state before.all =
+ 'skip$
+ { after.sentence 'output.state := }
+ if$
+ }
+ if$
+}
+
+FUNCTION {not}
+{ { #0 }
+ { #1 }
+ if$
+}
+
+FUNCTION {and}
+{ 'skip$
+ { pop$ #0 }
+ if$
+}
+
+FUNCTION {or}
+{ { pop$ #1 }
+ 'skip$
+ if$
+}
+
+FUNCTION {field.or.null}
+{ duplicate$
+ missing$
+ { pop$ "" }
+ 'skip$
+ if$
+}
+
+FUNCTION {italicize}
+{ 's :=
+ s "" =
+ { "" }
+ { "{\it " s * "}" * }
+ if$
+}
+
+INTEGERS { nameptr namesleft numnames }
+STRINGS {nameresult}
+FUNCTION {format.names}
+{ 's :=
+ #1 'nameptr :=
+ "" 'nameresult :=
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ {
+
+ s nameptr "{f.~}{vv~}{ll}{,~jj}" format.name$ 't :=
+
+ nameptr #1 >
+ { namesleft #1 >
+ { nameresult ", " * t * 'nameresult := }
+ { numnames #2 >
+ { nameresult "," * 'nameresult := }
+ 'skip$
+ if$
+ t "others" = t "et.al." = or t "et. al." = or
+ { nameresult " {\it et al.}" * 'nameresult := }
+ { nameresult " and " * t * 'nameresult := }
+ if$
+ }
+ if$
+ }
+ { nameresult t * 'nameresult := }
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+ nameresult
+}
+
+FUNCTION {format.authors}
+{ author missing$
+ { "" }
+ { author format.names }
+ if$
+}
+
+FUNCTION {format.editors}
+{ editor missing$
+ { "" }
+ { editor num.names$ #1 >
+ { editor format.names ", Eds." * }
+ { editor format.names ", Ed." * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.title}
+
+{ title missing$
+ { "" }
+ { "``" title * "''" * }
+ if$
+
+}
+
+FUNCTION {entry.string.max} { #100 }
+
+FUNCTION {global.string.max} { #300 }
+
+STRINGS {pageresult}
+
+FUNCTION {n.dashify}
+{ 't :=
+ "" 'pageresult :=
+ { t "" = not }
+ { t #1 #1 substring$ "-" =
+ { t #1 #2 substring$ "--" = not
+ { pageresult "--" * 'pageresult :=
+ t #2 global.string.max substring$ 't :=
+ }
+ { { t #1 #1 substring$ "-" = }
+ { pageresult "-" * 'pageresult :=
+ t #2 global.string.max substring$ 't :=
+ }
+ while$
+ }
+ if$
+ }
+ { pageresult t #1 #1 substring$ * 'pageresult :=
+ t #2 global.string.max substring$ 't :=
+ }
+ if$
+ }
+ while$
+ pageresult
+}
+
+FUNCTION {format.date}
+{ year missing$
+ { month missing$
+ { "" }
+ { "Warning: there's a month but no year in " cite$ * top$
+ month
+ }
+ if$
+ }
+ { month missing$
+ { year }
+ { month " " * year * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.btitle}
+{ title field.or.null
+ italicize
+}
+
+FUNCTION {format.bvolume}
+{ volume missing$
+ { series missing$
+ { "" }
+ { series italicize }
+ if$
+ }
+ { "Vol.~" volume *
+ series missing$
+ 'skip$
+ { " of " * series italicize * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.edition}
+{ edition missing$
+ { "" }
+ { edition "l" change.case$ " Ed." * }
+ if$
+}
+
+INTEGERS {multiresult}
+FUNCTION {multi.page.check}
+{ 't :=
+ #0 'multiresult :=
+ { multiresult not
+ t "" = not
+ and
+ }
+ { t #1 #1 substring$ "-" =
+ t #1 #1 substring$ "," =
+ or
+ { #1 'multiresult := }
+ { t #2 global.string.max substring$ 't := }
+ if$
+ }
+ while$
+ multiresult
+}
+
+FUNCTION {format.pages}
+{ pages missing$
+ { "" }
+ { pages multi.page.check
+ { "pp.~" pages n.dashify * }
+ { "p.~" pages n.dashify * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.volume}
+{ volume missing$
+ { "" }
+ { "Vol.~" volume * }
+ if$
+}
+
+FUNCTION {format.number}
+{ number missing$
+ { "" }
+ { "No.~" number * }
+ if$
+}
+
+FUNCTION {format.chapter.pages}
+{ chapter missing$
+ 'format.pages
+ { "Chap.~" chapter *
+ pages missing$
+ 'skip$
+ { ", " * format.pages * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.in.ed.booktitle}
+{ booktitle missing$
+ { "" }
+ { format.editors 't :=
+ t "" =
+ { "In: " booktitle italicize * }
+ { "In: " t * ", " * booktitle italicize * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.tr.number}
+{ type missing$
+ { "Tech. Rep." }
+ { type }
+ if$
+ number missing$
+ 'skip$
+ { "~" * number * }
+ if$
+}
+
+FUNCTION {article}
+{ output.bibitem
+ "author" format.authors output.check
+ new.block
+ "title" format.title output.check
+ new.block
+ "journal" journal field.or.null italicize output.check
+ format.volume output
+ format.number output
+ format.pages output
+ "year" format.date output.check
+ new.block
+ note field.or.null output
+ fin.entry
+}
+
+FUNCTION {book}
+{ output.bibitem
+ author missing$
+ { "author and editor" format.editors output.check }
+ { "author" format.authors output.check }
+ if$
+ new.block
+ "title" format.btitle output.check
+ new.block
+ format.bvolume output
+ "publisher" publisher field.or.null output.check
+ address field.or.null output
+ format.edition output
+ "year" format.date output.check
+ new.block
+ note field.or.null output
+ fin.entry
+}
+
+FUNCTION {booklet}
+{ output.bibitem
+ format.authors output
+ new.block
+ "title" format.btitle output.check
+ new.block
+ howpublished field.or.null output
+ address field.or.null output
+ format.date output
+ new.block
+ note field.or.null output
+ fin.entry
+}
+
+FUNCTION {inbook}
+{ output.bibitem
+ author missing$
+ { "author and editor" format.editors output.check }
+ { "author" format.authors output.check }
+ if$
+ new.block
+ "title" format.btitle output.check
+ "chapter and pages" format.chapter.pages output.check
+ new.block
+ format.bvolume output
+ "publisher" publisher field.or.null output.check
+ address field.or.null output
+ format.edition output
+ "year" format.date output.check
+ new.block
+ note field.or.null output
+ fin.entry
+}
+
+FUNCTION {incollection}
+{ output.bibitem
+ "author" format.authors output.check
+ new.block
+ "title" format.title output.check
+ new.block
+ "booktitle" format.in.ed.booktitle output.check
+ format.chapter.pages output
+ "publisher" publisher field.or.null output.check
+ address field.or.null output
+ "year" format.date output.check
+ new.block
+ note field.or.null output
+ fin.entry
+}
+
+FUNCTION {inproceedings}
+{ output.bibitem
+ "author" format.authors output.check
+ new.block
+ "title" format.title output.check
+ new.block
+ "booktitle" format.in.ed.booktitle output.check
+ format.pages output
+ organization field.or.null output
+ publisher field.or.null output
+ address field.or.null output
+ "year" format.date output.check
+ new.block
+ note field.or.null output
+ fin.entry
+}
+
+FUNCTION {conference} { inproceedings }
+
+FUNCTION {manual}
+{ output.bibitem
+ format.authors output
+ new.block
+ "title" format.btitle output.check
+ new.block
+ organization field.or.null output
+ address field.or.null output
+ format.edition output
+ format.date output
+ new.block
+ note field.or.null output
+ fin.entry
+}
+
+FUNCTION {mastersthesis}
+{ output.bibitem
+ "author" format.authors output.check
+ new.block
+ "title" format.btitle output.check
+ new.block
+ "Master's thesis" output
+ "school" school field.or.null output.check
+ address field.or.null output
+ "year" format.date output.check
+ new.block
+ note field.or.null output
+ fin.entry
+}
+
+FUNCTION {misc}
+{ output.bibitem
+ format.authors output
+ new.block
+ format.title output
+ new.block
+ howpublished field.or.null output
+ format.date output
+ new.block
+ note field.or.null output
+ fin.entry
+}
+
+FUNCTION {phdthesis}
+{ output.bibitem
+ "author" format.authors output.check
+ new.block
+ "title" format.btitle output.check
+ new.block
+ "PhD thesis" output
+ "school" school field.or.null output.check
+ address field.or.null output
+ "year" format.date output.check
+ new.block
+ note field.or.null output
+ fin.entry
+}
+
+FUNCTION {proceedings}
+{ output.bibitem
+ editor missing$
+ { organization missing$
+ 'skip$
+ { organization field.or.null output }
+ if$
+ }
+ { format.editors output }
+ if$
+ new.block
+ "title" format.btitle output.check
+ editor missing$
+ 'skip$
+ { organization field.or.null output }
+ if$
+ publisher field.or.null output
+ address field.or.null output
+ "year" format.date output.check
+ new.block
+ note field.or.null output
+ fin.entry
+}
+
+FUNCTION {techreport}
+{ output.bibitem
+ "author" format.authors output.check
+ new.block
+ "title" format.title output.check
+ new.block
+ format.tr.number output
+ "institution" institution field.or.null output.check
+ address field.or.null output
+ "year" format.date output.check
+ new.block
+ note field.or.null output
+ fin.entry
+}
+
+FUNCTION {unpublished}
+{ output.bibitem
+ "author" format.authors output.check
+ new.block
+ "title" format.title output.check
+ new.block
+ format.date output
+ new.block
+ "note" note field.or.null output.check
+ fin.entry
+}
+
+FUNCTION {default.type}
+{ "Warning: unknown entry: " type$ * " in " * cite$ * top$ }
+
+MACRO {jan} {"Jan."}
+MACRO {feb} {"Feb."}
+MACRO {mar} {"March"}
+MACRO {apr} {"Apr."}
+MACRO {may} {"May"}
+MACRO {jun} {"June"}
+MACRO {jul} {"July"}
+MACRO {aug} {"Aug."}
+MACRO {sep} {"Sep."}
+MACRO {oct} {"Oct."}
+MACRO {nov} {"Nov."}
+MACRO {dec} {"Dec."}
+MACRO {acmcs} {"ACM Computing Surveys"}
+MACRO {acta} {"Acta Informatica"}
+MACRO {cacm} {"Communications ACM"}
+MACRO {ibmjrd} {"IBM Journal of Research and Development"}
+MACRO {ibmsj} {"IBM Systems Journal"}
+MACRO {ieeese} {"IEEE Transactions on Software Engineering"}
+MACRO {ieeetc} {"IEEE Transactions on Computers"}
+MACRO {ieeetcad}
+ {"IEEE Transactions on Computer-Aided Design of Integrated Circuits"}
+MACRO {ipl} {"Information Processing Letters"}
+MACRO {jacm} {"Journal of the ACM"}
+MACRO {jcss} {"Journal of Computer and System Sciences"}
+MACRO {scp} {"Science of Computer Programming"}
+MACRO {sicomp} {"SIAM Journal on Computing"}
+MACRO {tocs} {"ACM Transactions on Computer Systems"}
+MACRO {tods} {"ACM Transactions on Database Systems"}
+MACRO {tog} {"ACM Transactions on Graphics"}
+MACRO {toms} {"ACM Transactions on Mathematical Software"}
+MACRO {toois} {"ACM Transactions on Office Information Systems"}
+MACRO {toplas} {"ACM Transactions on Programming Languages and Systems"}
+MACRO {tcs} {"Theoretical Computer Science"}
+
+READ
+
+FUNCTION {sortify}
+{ purify$
+ "l" change.case$
+}
+
+FUNCTION {format.lab.names}
+{ #1 "{ll}" format.name$
+ duplicate$ duplicate$ " -> " swap$
+ purify$ * * top$
+ purify$
+ #1 #4 substring$
+ % nur erste 4 Zeichen des Namens als Citation-Key
+}
+
+FUNCTION {calc.label}
+{
+ author missing$
+ { editor missing$
+ { key missing$
+ { "Warning: need a key to make a label in " cite$ * top$
+ title field.or.null purify$ #1 #4 substring$
+ }
+ { key purify$
+ #1 #8 substring$}
+ if$
+ }
+ { editor format.lab.names}
+ if$
+ }
+ { author format.lab.names}
+ if$
+ year field.or.null purify$ #-1 #2 substring$ 'sort.label :=
+ sort.label "" =
+ { skip$ }
+ { "~" * sort.label * }
+ if$
+
+ 'label
+ :=
+ label sortify 'sort.label :=
+}
+
+FUNCTION {sort.format.names}
+{ 's :=
+ #1 'nameptr :=
+ "" 'nameresult :=
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ { nameptr #1 >
+ { nameresult " " * 'nameresult := }
+ 'skip$
+ if$
+ s nameptr "{vv{ } }{ll{ }}{ ff{ }}{ jj{ }}" format.name$ 't :=
+ nameptr numnames = t "others" = t "et.al." = or t "et. al." = or and
+ { nameresult "et al" * 'nameresult := }
+ { nameresult t sortify * 'nameresult := }
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+ nameresult
+}
+
+INTEGERS {len}
+
+FUNCTION {chop.word}
+{ 's :=
+ 'len :=
+ s #1 len substring$ =
+ { s len #1 + global.string.max substring$ }
+ { s }
+ if$
+}
+
+FUNCTION {sort.format.title}
+{ 't :=
+ "A " #2
+ "An " #3
+ "The " #4 t chop.word
+ chop.word
+ chop.word
+ #1 global.string.max substring$
+ sortify
+}
+
+FUNCTION {presort}
+{
+ calc.label
+ sort.label
+ " "
+ *
+ author missing$
+ { editor missing$
+ { key field.or.null sortify }
+ { editor sort.format.names }
+ if$
+ }
+ { author sort.format.names }
+ if$
+ *
+ " "
+ *
+ title field.or.null
+ sort.format.title
+ *
+ #1 entry.string.max substring$
+ 'sort.key$ :=
+}
+
+ITERATE {presort}
+
+SORT
+
+STRINGS { longest.label last.sort.label next.extra }
+
+INTEGERS { longest.label.width last.extra.num }
+
+FUNCTION {initialize.longest.label}
+{ "" 'longest.label :=
+ "" 'last.sort.label :=
+ "" 'next.extra :=
+ #0 'longest.label.width :=
+ #0 'last.extra.num :=
+}
+
+FUNCTION {forward.pass}
+{ last.sort.label sort.label =
+ { last.extra.num #1 + 'last.extra.num :=
+ last.extra.num int.to.chr$ 'extra.label :=
+ }
+ { "a" chr.to.int$ 'last.extra.num :=
+ "" 'extra.label :=
+ sort.label 'last.sort.label :=
+ }
+ if$
+}
+
+FUNCTION {reverse.pass}
+{ next.extra "b" =
+ { "a" 'extra.label := }
+ 'skip$
+ if$
+ label extra.label * 'label :=
+ label width$ longest.label.width >
+ { label 'longest.label :=
+ label width$ 'longest.label.width :=
+ }
+ 'skip$
+ if$
+ extra.label 'next.extra :=
+}
+
+EXECUTE {initialize.longest.label}
+
+ITERATE {forward.pass}
+
+REVERSE {reverse.pass}
+
+FUNCTION {preamble}
+{
+ preamble$ duplicate$ empty$
+ 'pop$
+ { write$ newline$ }
+ if$
+ "\begin{thebibliography}{" longest.label * "}" * write$ newline$
+}
+
+EXECUTE {preamble}
+
+EXECUTE {init.state.consts}
+
+ITERATE {call.type$}
+
+FUNCTION {finish.up} { newline$ "\end{thebibliography}" write$ newline$ }
+
+EXECUTE {finish.up}
diff --git a/biblio/bibtex/contrib/mla/hum2.bst b/biblio/bibtex/contrib/mla/hum2.bst
new file mode 100644
index 0000000000..c6dcea4f0a
--- /dev/null
+++ b/biblio/bibtex/contrib/mla/hum2.bst
@@ -0,0 +1,1641 @@
+%%% ====================================================================
+%%% @BibTeX-style-file{
+%%% author = "Caitlin Shaw",
+%%% version = "1",
+%%% date = "13 April 1997",
+%%% filename = "hum2.bst",
+%%% email = "cmshaw@princeton.edu",
+%%% abstract = "A BibTeX bibliography style that follows the
+%%% MLA bibliography and author-title citation."
+%%% }
+%%% ====================================================================
+%
+%This file was originally named chicago.bst.
+%
+%Documentation: see hum2.sty. (Includes note on citation hack which
+%will look odd if you examine the file below.)
+%
+%Bibliographic changes: article titles are set in double quotes with the
+%ending period inside the block. Format is approximately
+% Last, First, F. Last, and F. Last. Title. Journal/Collection-Title,
+% Ed. Vol.No. Address: Publisher. Year.
+%as MLA standard for books, articles, and incollections.
+%
+%Known bibliography bugs: crossreferencing title format. You should
+%also doublecheck the more obscure types against the MLA Handbook.
+%
+%See hum2.sty for information on nonstandard .bib formatting.
+%
+%
+%Original information on chicago, no longer valid:
+%
+% "Chicago" BibTeX style, chicago.bst
+% ===================================
+%
+% BibTeX `chicago' style file for BibTeX version 0.99c, LaTeX version 2.09
+% Place it in a file called chicago.bst in the BibTeX search path.
+% You need to include chicago.sty as a \documentstyle option.
+% (Placing it in the same directory as the LaTeX document should also work.)
+% This "chicago" style is based on newapa.bst (American Psych. Assoc.)
+% found at ymir.claremont.edu.
+%
+% Citation format: (author-last-name year)
+% (author-last-name and author-last-name year)
+% (author-last-name, author-last-name, and author-last-name year)
+% (author-last-name et al. year)
+% (author-last-name)
+% author-last-name (year)
+% (author-last-name and author-last-name)
+% (author-last-name et al.)
+% (year) or (year,year)
+% year or year,year
+%
+% Reference list ordering: alphabetical by author or whatever passes
+% for author in the absence of one.
+%
+% This BibTeX style has support for abbreviated author lists and for
+% year-only citations. This is done by having the citations
+% actually look like
+%
+% \citeauthoryear{full-author-info}{abbrev-author-info}{year}
+%
+% The LaTeX style has to have the following (or similar)
+%
+% \let\@internalcite\cite
+% \def\fullcite{\def\citeauthoryear##1##2##3{##1, ##3}\@internalcite}
+% \def\fullciteA{\def\citeauthoryear##1##2##3{##1}\@internalcite}
+% \def\shortcite{\def\citeauthoryear##1##2##3{##2, ##3}\@internalcite}
+% \def\shortciteA{\def\citeauthoryear##1##2##3{##2}\@internalcite}
+% \def\citeyear{\def\citeauthoryear##1##2##3{##3}\@internalcite}
+%
+% These TeX macro definitions are found in chicago.sty. Additional
+% commands to manipulate different components of a citation can be defined
+% so that, for example, you can list author's names without parentheses
+% if using a citation as a noun or object in a sentence.
+%
+% This file was originally copied from newapa.bst at ymir.claremont.edu.
+%
+% Features of chicago.bst:
+% =======================
+%
+% - full names used in citations, but abbreviated citations are available
+% (see above)
+% - if an entry has a "month", then the month and year are also printed
+% as part of that bibitem.
+% - all conjunctions use "and" instead of "\&"
+% - major modification from Chicago Manual of Style (13th ed.) is that
+% only the first author in a reference appears last name first-
+% additional authors appear as J. Q. Public.
+% - pages are listed as "pp. xx-xx" in all entry types except
+% article entries.
+% - book, inbook, and manual use "location: publisher" (or organization)
+% for address and publisher. All other types list publishers separately.
+% - "pp." are used to identify page numbers for all entry types except
+% articles.
+% - organization is used as a citation label if neither author nor editor
+% is present (for manuals).
+% - "et al." is used for long author and editor lists, or when "others"
+% is used.
+%
+% Modifications and bug fixes from newapa.bst:
+% ===========================================
+%
+% - added month, year to bib entries if month is present
+% - fixed bug with In proceedings, added necessary comma after title
+% - all conjunctions changed to "and" from "\&"
+% - fixed bug with author labels in my.full.label: "et al." now is
+% generated when "others" is an author name
+% - major modification from Chicago Manual of Style (13th ed.) is that
+% only the first author in a reference appears last name first-
+% additional authors appear as J. Q. Public.
+% - pages are listed as "pp. xx-xx" in all entry types except
+% article entries. Unnecessary (IMHO) "()" around page numbers
+% were removed, and page numbers now don't end with a period.
+% - created chicago.sty for use with this bibstyle (required).
+% - fixed bugs in FUNCTION {format.vol.num.pages} for missing volume,
+% number, and /or pages. Renamed to format.jour.vol.
+% - fixed bug in formatting booktitles: additional period an error if
+% book has a volume.
+% - fixed bug: editors usually given redundant period before next clause
+% (format.editors.dot) removed.
+% - added label support for organizations, if both author and editor
+% are missing (from alpha.bst). If organization is too long, then
+% the key field is used for abbreviated citations.
+% - In proceedings or books of several volumes, no comma was written
+% between the "Volume x" and the page numbers (this was intentional
+% in newapa.bst). Fixed.
+% - Some journals may not have volumes/numbers, only month/year (eg.
+% IEEE Computer). Fixed bug in article style that assumed volume/number
+% was always present.
+%
+% Original documentation for newapa.sty:
+% =====================================
+%
+% This version was made by modifying the master file made by
+% Oren Patashnik (PATASHNIK@SCORE.STANFORD.EDU), and the 'named' BibTeX
+% style of Peter F. Patel-Schneider.
+%
+% Copyright (C) 1985, all rights reserved.
+% Copying of this file is authorized only if either
+% (1) you make absolutely no changes to your copy, including name, or
+% (2) if you do make changes, you name it something other than 'newapa.bst'.
+% There are undoubtably bugs in this style. If you make bug fixes,
+% improvements, etc. please let me know. My e-mail address is:
+% spencer@cgrg.ohio.state.edu or 71160.3141@compuserve.com
+%
+% This style was made from 'plain.bst', 'named.bst', and 'apalike.bst',
+% with lots of tweaking to make it look like APA style, along with tips
+% from Young Ryu and Brian Reiser's modifications of 'apalike.bst'.
+
+ENTRY
+ { address
+ author
+ booktitle
+ chapter
+ edition
+ editor
+ howpublished
+ institution
+ journal
+ key
+ month
+ note
+ number
+ organization
+ pages
+ publisher
+ school
+ series
+ title
+ type
+ volume
+ year
+ }
+ {}
+ { label.year extra.label sort.year sort.label }
+
+INTEGERS { output.state before.all mid.sentence after.sentence after.block }
+
+FUNCTION {init.state.consts}
+{ #0 'before.all :=
+ #1 'mid.sentence :=
+ #2 'after.sentence :=
+ #3 'after.block :=
+}
+
+STRINGS { s t u }
+
+FUNCTION {output.nonnull}
+{ 's :=
+ output.state mid.sentence =
+ { ", " * write$ }
+ { output.state after.block =
+ { add.period$ write$
+ newline$
+ "\newblock " write$
+ }
+ { output.state before.all =
+ 'write$
+ { add.period$ " " * write$ }
+ if$
+ }
+ if$
+ mid.sentence 'output.state :=
+ }
+ if$
+ s
+}
+
+% Use a colon to separate output. Used only for address/publisher
+% combination in book/inbook types, address/institution for manuals,
+% and organization:publisher for proceedings (inproceedings).
+%
+FUNCTION {output.nonnull.colon}
+{ 's :=
+ output.state mid.sentence =
+ { ": " * write$ }
+ { output.state after.block =
+ { add.period$ write$
+ newline$
+ "\newblock " write$
+ }
+ { output.state before.all =
+ 'write$
+ { add.period$ " " * write$ }
+ if$
+ }
+ if$
+ mid.sentence 'output.state :=
+ }
+ if$
+ s
+}
+
+FUNCTION {output}
+{ duplicate$ empty$
+ 'pop$
+ 'output.nonnull
+ if$
+}
+
+FUNCTION {output.colon}
+{ duplicate$ empty$
+ 'pop$
+ 'output.nonnull.colon
+ if$
+}
+
+FUNCTION {output.check}
+{ 't :=
+ duplicate$ empty$
+ { pop$ "empty " t * " in " * cite$ * warning$ }
+ 'output.nonnull
+ if$
+}
+
+FUNCTION {output.check.colon}
+{ 't :=
+ duplicate$ empty$
+ { pop$ "empty " t * " in " * cite$ * warning$ }
+ 'output.nonnull.colon
+ if$
+}
+
+FUNCTION {output.year.check}
+{ year empty$
+ { "empty year in " cite$ * warning$ }
+ { write$
+ " (" year * extra.label *
+ month empty$
+ { ")" * }
+ { ", " * month * ")" * }
+ if$
+ mid.sentence 'output.state :=
+ }
+ if$
+}
+
+
+FUNCTION {fin.entry}
+{ add.period$
+ write$
+ newline$
+}
+
+FUNCTION {new.block}
+{ output.state before.all =
+ 'skip$
+ { after.block 'output.state := }
+ if$
+}
+
+FUNCTION {new.block.article}
+{ output.state before.all =
+ 'skip$
+ { before.all 'output.state := }
+ if$
+}
+
+FUNCTION {new.sentence}
+{ output.state after.block =
+ 'skip$
+ { output.state before.all =
+ 'skip$
+ { after.sentence 'output.state := }
+ if$
+ }
+ if$
+}
+
+FUNCTION {not}
+{ { #0 }
+ { #1 }
+ if$
+}
+
+FUNCTION {and}
+{ 'skip$
+ { pop$ #0 }
+ if$
+}
+
+FUNCTION {or}
+{ { pop$ #1 }
+ 'skip$
+ if$
+}
+
+FUNCTION {new.block.checka}
+{ empty$
+ 'skip$
+ 'new.block
+ if$
+}
+
+FUNCTION {new.block.checkb}
+{ empty$
+ swap$ empty$
+ and
+ 'skip$
+ 'new.block
+ if$
+}
+
+FUNCTION {new.sentence.checka}
+{ empty$
+ 'skip$
+ 'new.sentence
+ if$
+}
+
+FUNCTION {new.sentence.checkb}
+{ empty$
+ swap$ empty$
+ and
+ 'skip$
+ 'new.sentence
+ if$
+}
+
+FUNCTION {field.or.null}
+{ duplicate$ empty$
+ { pop$ "" }
+ 'skip$
+ if$
+}
+
+%
+% Emphasize the top string on the stack.
+%
+FUNCTION {emphasize}
+{ duplicate$ empty$
+ { pop$ "" }
+ { "{\em " swap$ * "}" * }
+ if$
+}
+
+%
+% Emphasize the top string on the stack, but add a trailing space.
+%
+FUNCTION {emphasize.space}
+{ duplicate$ empty$
+ { pop$ "" }
+ { "{\em " swap$ * "\/}" * }
+ if$
+}
+
+INTEGERS { one nameptr namesleft numnames }
+%
+% Format bibliographical entries with the first author last name first,
+% and subsequent authors with initials followed by last name.
+% All names are formatted in this routine.
+%
+FUNCTION {format.names}
+{ 's :=
+ #1 'nameptr := % nameptr = 1;
+ s num.names$ 'numnames := % numnames = num.name$(s);
+ numnames 'namesleft :=
+ { namesleft #0 > }
+
+ { nameptr #1 =
+ {s nameptr "{vv~}{ll}{, jj}{, ff}" format.name$ 't := }
+ {s nameptr "{f.~}{vv~}{ll}{, jj}" format.name$ 't := }
+ if$
+ nameptr #1 >
+ { namesleft #1 >
+ { ", " * t * }
+ { numnames #2 >
+ { "," * }
+ 'skip$
+ if$
+ t "others" =
+ { " et~al." * }
+ { " and " * t * } % from Chicago Manual of Style
+ if$
+ }
+ if$
+ }
+ 't
+ if$
+ nameptr #1 + 'nameptr := % nameptr += 1;
+ namesleft #1 - 'namesleft := % namesleft =- 1;
+ }
+ while$
+}
+
+FUNCTION {my.title.label}
+{ 's :=
+ #1 'one :=
+ s one "{ff }{vv }{ll}" format.name$
+}
+
+FUNCTION {my.full.label}
+{ 's :=
+ #1 'nameptr := % nameptr = 1;
+ s num.names$ 'numnames := % numnames = num.name$(s);
+ numnames 'namesleft :=
+ { namesleft #0 > }
+
+ { s nameptr "{vv~}{ll}" format.name$ 't := % get the next name
+ nameptr #1 >
+ { namesleft #1 >
+ { ", " * t * }
+ { numnames #2 >
+ { "," * }
+ 'skip$
+ if$
+ t "others" =
+ { " et~al." * }
+ { " and " * t * } % from Chicago Manual of Style
+ if$
+ }
+ if$
+ }
+ 't
+ if$
+ nameptr #1 + 'nameptr := % nameptr += 1;
+ namesleft #1 - 'namesleft := % namesleft =- 1;
+ }
+ while$
+
+}
+
+FUNCTION {format.names.fml}
+%
+% Format names in "familiar" format, with first initial followed by
+% last name. Like format.names, ALL names are formatted.
+%
+{ 's :=
+ #1 'nameptr := % nameptr = 1;
+ s num.names$ 'numnames := % numnames = num.name$(s);
+ numnames 'namesleft :=
+ { namesleft #0 > }
+
+ { s nameptr "{f.~}{vv~}{ll}{, jj}" format.name$ 't :=
+
+ nameptr #1 >
+ { namesleft #1 >
+ { ", " * t * }
+ { numnames #2 >
+ { "," * }
+ 'skip$
+ if$
+ t "others" =
+ { " et~al." * }
+ { " and " * t * }
+% { " \& " * t * }
+ if$
+ }
+ if$
+ }
+ 't
+ if$
+ nameptr #1 + 'nameptr := % nameptr += 1;
+ namesleft #1 - 'namesleft := % namesleft =- 1;
+ }
+ while$
+}
+
+FUNCTION {format.authors}
+{ author empty$
+ { "" }
+ { author format.names }
+ if$
+}
+
+FUNCTION {format.key}
+{ empty$
+ { key field.or.null }
+ { "" }
+ if$
+}
+
+%
+% Format editor names for use in the "in" types: inbook, incollection,
+% inproceedings: first initial, then last names. When editors are the
+% LABEL for an entry, then format.editor is used which lists editors
+% by last name first.
+%
+FUNCTION {format.editors.fml}
+{ editor empty$
+ { "" }
+ { editor format.names.fml
+ editor num.names$ #1 >
+ { " Eds." * }
+ { " Ed." * }
+ if$
+ }
+ if$
+}
+
+%
+% Format editor names for use in labels, last names first.
+%
+FUNCTION {format.editors}
+{ editor empty$
+ { "" }
+ { editor format.names
+ editor num.names$ #1 >
+ { " Eds." * }
+ { " Ed." * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.title}
+{ title empty$
+ { "" }
+ { title
+% "\enquote{" swap$ *
+% add.period$ "}" *
+ "``" swap$ * add.period$ "'' " *
+ }
+ if$
+}
+
+% Note that the APA style requres case changes
+% in article titles. The following does not
+% change cases. If you perfer it, uncomment the
+% following and comment out the above.
+
+%FUNCTION {format.title}
+%{ title empty$
+% { "" }
+% { title }
+% if$
+%}
+
+FUNCTION {n.dashify}
+{ 't :=
+ ""
+ { t empty$ not }
+ { t #1 #1 substring$ "-" =
+ { t #1 #2 substring$ "--" = not
+ { "--" *
+ t #2 global.max$ substring$ 't :=
+ }
+ { { t #1 #1 substring$ "-" = }
+ { "-" *
+ t #2 global.max$ substring$ 't :=
+ }
+ while$
+ }
+ if$
+ }
+ { t #1 #1 substring$ *
+ t #2 global.max$ substring$ 't :=
+ }
+ if$
+ }
+ while$
+}
+
+FUNCTION {format.btitle}
+{ edition empty$
+ { title emphasize }
+ { title empty$
+ { title emphasize }
+ { volume empty$ % gnp - check for volume, then don't need period
+ { "{\em " title * "\/} (" * edition * " ed.)" * "." * }
+ { "{\em " title * "\/} (" * edition * " ed.)" * }
+ if$
+ }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.emphasize.booktitle}
+{ edition empty$
+ { booktitle emphasize }
+ { booktitle empty$
+ { booktitle emphasize }
+ { volume empty$ % gnp - extra period an error if book has a volume
+ { "{\em " booktitle * "\/} (" * edition * " ed.)" * "." *}
+ { "{\em " booktitle * "\/} (" * edition * " ed.)" * }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+
+
+FUNCTION {tie.or.space.connect}
+{ duplicate$ text.length$ #3 <
+ { "~" }
+ { " " }
+ if$
+ swap$ * *
+}
+
+FUNCTION {either.or.check}
+{ empty$
+ 'pop$
+ { "can't use both " swap$ * " fields in " * cite$ * warning$ }
+ if$
+}
+
+FUNCTION {format.bvolume}
+{ volume empty$
+ { "" }
+ { "Volume" volume tie.or.space.connect % gnp - changed to mixed case
+ series empty$
+ 'skip$
+ { " of " * series emphasize * }
+ if$
+ "volume and number" number either.or.check
+ }
+ if$
+}
+
+FUNCTION {format.number.series}
+{ volume empty$
+ { number empty$
+ { series field.or.null }
+ { output.state mid.sentence =
+ { "Number" } % gnp - changed to mixed case always
+ { "Number" }
+ if$
+ number tie.or.space.connect
+ series empty$
+ { "there's a number but no series in " cite$ * warning$ }
+ { " in " * series * }
+ if$
+ }
+ if$
+ }
+ { "" }
+ if$
+}
+
+INTEGERS { multiresult }
+
+FUNCTION {multi.page.check}
+{ 't :=
+ #0 'multiresult :=
+ { multiresult not
+ t empty$ not
+ and
+ }
+ { t #1 #1 substring$
+ duplicate$ "-" =
+ swap$ duplicate$ "," =
+ swap$ "+" =
+ or or
+ { #1 'multiresult := }
+ { t #2 global.max$ substring$ 't := }
+ if$
+ }
+ while$
+ multiresult
+}
+
+FUNCTION {format.pages}
+{ pages empty$
+ { "" }
+ { pages multi.page.check
+ { "pp.\ " pages n.dashify tie.or.space.connect } % gnp - removed ()
+ { "pp.\ " pages tie.or.space.connect }
+ if$
+ }
+ if$
+}
+
+% By Young (and Spencer)
+% GNP - fixed bugs with missing volume, number, and/or pages
+%
+% Format journal, volume, number, pages for article types.
+%
+FUNCTION {format.jour.vol}
+{ journal empty$
+ { "no journal in " cite$ * warning$
+ "" }
+ { journal emphasize.space }
+ if$
+ number empty$
+ { volume empty$
+ { "no number and no volume in " cite$ * warning$
+ "" * }
+ { "~" * Volume * "" * }
+ if$
+ }
+ { volume empty$
+ {"no volume for " cite$ * warning$
+ "~(" * number * ")" * }
+ { "~" *
+ volume emphasize.space
+ "." * number * "" * * }
+ if$
+ }
+ if$
+ pages empty$
+ {"page numbers missing in " cite$ * warning$
+ "" * } % gnp - place a null string on the stack for output
+ { duplicate$ empty$
+ { pop$ format.pages }
+ { ", " * pages n.dashify * } % gnp - removed pp. for articles
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.chapter.pages}
+{ chapter empty$
+ 'format.pages
+ { type empty$
+ { "Chapter" } % gnp - changed to mixed case
+ { type "t" change.case$ }
+ if$
+ chapter tie.or.space.connect
+ pages empty$
+ {"page numbers missing in " cite$ * warning$} % gnp - added check
+ { ", " * format.pages * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.in.ed.booktitle}
+{ booktitle empty$
+ { "" }
+ { editor empty$
+ { "" format.emphasize.booktitle * }
+ { "" format.editors.fml * ", " * format.emphasize.booktitle * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.thesis.type}
+{ type empty$
+ 'skip$
+ { pop$
+ type "t" change.case$
+ }
+ if$
+}
+
+FUNCTION {format.tr.number}
+{ type empty$
+ { "Technical Report" }
+ 'type
+ if$
+ number empty$
+ { "t" change.case$ }
+ { number tie.or.space.connect }
+ if$
+}
+
+FUNCTION {format.article.crossref}
+{ "See"
+ "\citeN{" * crossref * "}" *
+}
+
+FUNCTION {format.crossref.editor}
+{ editor #1 "{vv~}{ll}" format.name$
+ editor num.names$ duplicate$
+ #2 >
+ { pop$ " et~al." * }
+ { #2 <
+ 'skip$
+ { editor #2 "{ff }{vv }{ll}{ jj}" format.name$ "others" =
+ { " et~al." * }
+ { " and " * editor #2 "{vv~}{ll}" format.name$ * }
+ if$
+ }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.book.crossref}
+{ volume empty$
+ { "empty volume in " cite$ * "'s crossref of " * crossref * warning$
+ "In "
+ }
+ { "Volume" volume tie.or.space.connect % gnp - changed to mixed case
+ " of " *
+ }
+ if$
+ editor empty$
+ editor field.or.null author field.or.null =
+ or
+ { key empty$
+ { series empty$
+ { "need editor, key, or series for " cite$ * " to crossref " *
+ crossref * warning$
+ "" *
+ }
+ { "{\em " * series * "\/}" * }
+ if$
+ }
+ { key * }
+ if$
+ }
+ { format.crossref.editor * }
+ if$
+ " \citeN{" * crossref * "}" *
+}
+
+FUNCTION {format.incoll.inproc.crossref}
+{ "See"
+ " \citeN{" * crossref * "}" *
+}
+
+% format.lab.names:
+%
+% determines "short" names for the abbreviated author information.
+% "Long" labels are created in calc.label, using the routine my.full.label
+% to format author and editor fields.
+%
+% There are 4 cases for labels. (n=3 in the example)
+% a) one author Foo
+% b) one to n Foo, Bar and Baz
+% c) use of "and others" Foo, Bar et al.
+% d) more than n Foo et al.
+%
+FUNCTION {format.lab.names}
+{ 's :=
+ s num.names$ 'numnames :=
+ numnames #2 > % change number to number of others allowed before
+ % forcing "et al".
+ { s #1 "{vv~}{ll}" format.name$ " et~al." * }
+ {
+ numnames #1 - 'namesleft :=
+ #2 'nameptr :=
+ s #1 "{vv~}{ll}" format.name$
+ { namesleft #0 > }
+ { nameptr numnames =
+ { s nameptr "{ff }{vv }{ll}{ jj}" format.name$ "others" =
+ { " et~al." * }
+ { " and " * s nameptr "{vv~}{ll}" format.name$ * }
+ if$
+ }
+ { ", " * s nameptr "{vv~}{ll}" format.name$ * }
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+ }
+ if$
+}
+
+FUNCTION {author.key.label}
+{ author empty$
+ { key empty$
+ { "no key, author in " cite$ * warning$
+ cite$ #1 #3 substring$ }
+ 'key
+ if$
+ }
+ { author format.lab.names }
+ if$
+}
+
+FUNCTION {editor.key.label}
+{ editor empty$
+ { key empty$
+ { "no key, editor in " cite$ * warning$
+ cite$ #1 #3 substring$ }
+ 'key
+ if$
+ }
+ { editor format.lab.names }
+ if$
+}
+
+FUNCTION {author.key.organization.label}
+%
+% added - gnp. Provide label formatting by organization if author is null.
+%
+{ author empty$
+ { organization empty$
+ { key empty$
+ { "no key, author or organization in " cite$ * warning$
+ cite$ #1 #3 substring$ }
+ 'key
+ if$
+ }
+ { organization }
+ if$
+ }
+ { author format.lab.names }
+ if$
+}
+
+FUNCTION {editor.key.organization.label}
+%
+% added - gnp. Provide label formatting by organization if editor is null.
+%
+{ editor empty$
+ { organization empty$
+ { key empty$
+ { "no key, editor or organization in " cite$ * warning$
+ cite$ #1 #3 substring$ }
+ 'key
+ if$
+ }
+ { organization }
+ if$
+ }
+ { editor format.lab.names }
+ if$
+}
+
+FUNCTION {author.editor.key.label}
+{ author empty$
+ { editor empty$
+ { key empty$
+ { "no key, author, or editor in " cite$ * warning$
+ cite$ #1 #3 substring$ }
+ 'key
+ if$
+ }
+ { editor format.lab.names }
+ if$
+ }
+ { author format.lab.names }
+ if$
+}
+
+FUNCTION {calc.label}
+%
+% Changed - GNP. See also author.organization.sort, editor.organization.sort
+% Form label for BibTeX entry. The classification of which fields are used
+% for which type of entry (book, inbook, etc.) are taken from alpha.bst.
+% The change here from newapa is to also include organization as a
+% citation label if author or editor is missing.
+%
+{ type$ "book" =
+ type$ "inbook" =
+ or
+ 'author.editor.key.label
+ { type$ "proceedings" =
+ 'editor.key.organization.label
+ { type$ "manual" =
+ 'author.key.organization.label
+ 'author.key.label
+ if$
+ }
+ if$
+ }
+ if$
+
+ author empty$ % generate the full label citation information.
+ { editor empty$
+ { organization empty$
+ { "no author, editor, or organization in " cite$ * warning$
+ "??" }
+ { organization }
+ if$
+ }
+ { title my.title.label }
+ if$
+ }
+ { title my.title.label }
+ if$
+
+% leave label on the stack, to be popped when required.
+
+ "}{" * swap$ * "}{" *
+% year field.or.null purify$ #-1 #4 substring$ *
+%
+% save the year for sort processing afterwards (adding a, b, c, etc.)
+%
+ year field.or.null purify$ #-1 #4 substring$
+ 'label.year :=
+}
+
+FUNCTION {output.bibitem}
+{ newline$
+
+ "\bibitem[\protect\citeauthoryear{" write$
+ calc.label write$
+ sort.year write$
+ "}]{" write$
+
+ cite$ write$
+ "}" write$
+ newline$
+ ""
+ before.all 'output.state :=
+}
+
+FUNCTION {article}
+{ output.bibitem
+ format.authors
+ "author" output.check
+ author format.key output % added
+ new.block
+ format.title
+ "title" output.check
+ new.block.article
+ crossref missing$
+ { format.jour.vol output
+ }
+ { format.article.crossref output.nonnull
+ format.pages output
+ }
+ if$
+ new.block
+ output.year.check % added
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {book}
+{ output.bibitem
+ author empty$
+ { format.editors
+ "author and editor" output.check }
+ { format.authors
+ output.nonnull
+ crossref missing$
+ { "author and editor" editor either.or.check }
+ 'skip$
+ if$
+ }
+ if$
+ new.block
+ format.btitle
+ "title" output.check
+ crossref missing$
+ { format.bvolume output
+ new.block
+ format.number.series output
+ new.sentence
+ address output
+ publisher "publisher" output.check.colon
+ }
+ { new.block
+ format.book.crossref output.nonnull
+ }
+ if$
+ new.block
+ output.year.check % added
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {booklet}
+{ output.bibitem
+ format.authors output
+ author format.key output % added
+ new.block
+ format.title
+ "title" output.check
+ new.block.article
+ howpublished output
+ address output
+ new.block
+ output.year.check % added
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {inbook}
+{ output.bibitem
+ author empty$
+ { format.editors
+ "author and editor" output.check
+ }
+ { format.authors output.nonnull
+ crossref missing$
+ { "author and editor" editor either.or.check }
+ 'skip$
+ if$
+ }
+ if$
+ new.block
+ format.btitle
+ "title" output.check
+ crossref missing$
+ { format.bvolume output
+ format.chapter.pages
+ "chapter and pages" output.check
+ new.block
+ format.number.series output
+ new.sentence
+ address output
+ publisher
+ "publisher" output.check.colon
+ }
+ { format.chapter.pages "chapter and pages" output.check
+ new.block
+ format.book.crossref output.nonnull
+ }
+ if$
+ new.block
+ output.year.check % added
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {incollection}
+{ output.bibitem
+ format.authors
+ "author" output.check
+ author format.key output % added
+ new.block
+ format.title
+ "title" output.check
+ new.block.article
+ crossref missing$
+ { format.in.ed.booktitle
+ "booktitle" output.check
+ format.bvolume output
+ format.number.series output
+ format.chapter.pages output % gnp - was special.output.nonnull
+% left out comma before page numbers
+ new.sentence
+ address output
+ publisher "publisher" output.check.colon
+ }
+ { format.incoll.inproc.crossref
+ output.nonnull
+ format.chapter.pages output
+ }
+ if$
+ new.block
+ output.year.check % added
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {inproceedings}
+{ output.bibitem
+ format.authors
+ "author" output.check
+ author format.key output % added
+ new.block
+ format.title
+ "title" output.check
+ new.block.article
+ crossref missing$
+ { format.in.ed.booktitle
+ "booktitle" output.check
+ format.bvolume output
+ format.number.series output
+ address output
+ format.pages output
+ new.sentence
+ organization output
+ publisher output.colon
+ }
+ { format.incoll.inproc.crossref output.nonnull
+ format.pages output
+ }
+ if$
+ new.block
+ output.year.check % added
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {conference} { inproceedings }
+
+FUNCTION {manual}
+{ output.bibitem
+ author empty$
+ { editor empty$
+ { organization "organization" output.check
+ organization format.key output } % if all else fails, use key
+ { format.editors "author and editor" output.check }
+ if$
+ }
+ { format.authors output.nonnull }
+ if$
+ new.block
+ format.btitle
+ "title" output.check
+ organization address new.block.checkb
+% Reversed the order of "address" and "organization", added the ":".
+ address output
+ organization "organization" output.check.colon
+% address output
+% ":" output
+% organization output
+ new.block
+ output.year.check % added
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {mastersthesis}
+{ output.bibitem
+ format.authors
+ "author" output.check
+ author format.key output % added
+ new.block
+ format.title
+ "title" output.check
+ new.block.article
+ "Master's thesis" format.thesis.type output.nonnull
+ school "school" output.check
+ address output
+ new.block
+ output.year.check % added
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {misc}
+{ output.bibitem
+ format.authors output
+ author format.key output % added
+ title howpublished new.block.checkb
+ format.title output
+ new.block.article
+ howpublished output
+ new.block
+ output.year.check % added
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {phdthesis}
+{ output.bibitem
+ format.authors
+ "author" output.check
+ author format.key output % added
+ new.block
+ format.btitle
+ "title" output.check
+ new.block
+ "Ph.\ D. thesis" format.thesis.type output.nonnull
+ school "school" output.check
+ address output
+ new.block
+ output.year.check % added
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {proceedings}
+{ output.bibitem
+ editor empty$
+ { organization output
+ organization format.key output } % gnp - changed from author format.key
+ { format.editors output.nonnull }
+ if$
+% author format.key output % gnp - removed (should be either
+% editor or organization
+ new.block
+ format.btitle
+ "title" output.check
+ format.bvolume output
+ format.number.series output
+ address output
+ new.sentence
+ organization output
+ publisher output.colon
+ new.block
+ output.year.check % added (newapa)
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {techreport}
+{ output.bibitem
+ format.authors
+ "author" output.check
+ author format.key output % added
+ new.block
+ format.title
+ "title" output.check
+ new.block.article
+ format.tr.number output.nonnull
+ institution
+ "institution" output.check
+ address output
+ new.block
+ output.year.check % added
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {unpublished}
+{ output.bibitem
+ format.authors
+ "author" output.check
+ author format.key output % added
+ new.block
+ format.title
+ "title" output.check
+ new.block.article
+ output.year.check % added
+ new.block
+ note "note" output.check
+ fin.entry
+}
+
+FUNCTION {default.type} { misc }
+
+MACRO {jan} {"January"}
+
+MACRO {feb} {"February"}
+
+MACRO {mar} {"March"}
+
+MACRO {apr} {"April"}
+
+MACRO {may} {"May"}
+
+MACRO {jun} {"June"}
+
+MACRO {jul} {"July"}
+
+MACRO {aug} {"August"}
+
+MACRO {sep} {"September"}
+
+MACRO {oct} {"October"}
+
+MACRO {nov} {"November"}
+
+MACRO {dec} {"December"}
+
+READ
+
+FUNCTION {sortify}
+{ purify$
+ "l" change.case$
+}
+
+INTEGERS { len }
+
+FUNCTION {chop.word}
+{ 's :=
+ 'len :=
+ s #1 len substring$ =
+ { s len #1 + global.max$ substring$ }
+ 's
+ if$
+}
+
+
+
+FUNCTION {sort.format.names}
+{ 's :=
+ #1 'nameptr :=
+ ""
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ { nameptr #1 >
+ { " " * }
+ 'skip$
+ if$
+ s nameptr "{vv{ } }{ll{ }}{ ff{ }}{ jj{ }}" format.name$ 't :=
+ nameptr numnames = t "others" = and
+ { " et~al" * }
+ { t sortify * }
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+}
+
+FUNCTION {sort.format.title}
+{ 't :=
+ "A " #2
+ "An " #3
+ "The " #4 t chop.word
+ chop.word
+ chop.word
+ sortify
+ #1 global.max$ substring$
+}
+
+FUNCTION {author.sort}
+{ author empty$
+ { key empty$
+ { "to sort, need author or key in " cite$ * warning$
+ "" }
+ { key sortify }
+ if$
+ }
+ { author sort.format.names }
+ if$
+}
+
+FUNCTION {editor.sort}
+{ editor empty$
+ { key empty$
+ { "to sort, need editor or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { editor sort.format.names }
+ if$
+}
+
+FUNCTION {author.editor.sort}
+{ author empty$
+ { "missing author in " cite$ * warning$
+ editor empty$
+ { key empty$
+ { "to sort, need author, editor, or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { editor sort.format.names }
+ if$
+ }
+ { author sort.format.names }
+ if$
+}
+
+FUNCTION {author.organization.sort}
+%
+% added - GNP. Stack author or organization for sorting (from alpha.bst).
+% Unlike alpha.bst, we need entire names, not abbreviations
+%
+{ author empty$
+ { organization empty$
+ { key empty$
+ { "to sort, need author, organization, or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { organization sortify }
+ if$
+ }
+ { author sort.format.names }
+ if$
+}
+
+FUNCTION {editor.organization.sort}
+%
+% added - GNP. Stack editor or organization for sorting (from alpha.bst).
+% Unlike alpha.bst, we need entire names, not abbreviations
+%
+{ editor empty$
+ { organization empty$
+ { key empty$
+ { "to sort, need editor, organization, or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { organization sortify }
+ if$
+ }
+ { editor sort.format.names }
+ if$
+}
+
+FUNCTION {presort}
+%
+% Presort creates the bibentry's label via a call to calc.label, and then
+% sorts the entries based on entry type. Chicago.bst adds support for
+% including organizations as the sort key; the following is stolen from
+% alpha.bst.
+%
+{ calc.label sortify % recalculate bibitem label
+ year field.or.null purify$ #-1 #4 substring$ * % add year
+ " "
+ *
+ type$ "book" =
+ type$ "inbook" =
+ or
+ 'author.editor.sort
+ { type$ "proceedings" =
+ 'editor.organization.sort
+ { type$ "manual" =
+ 'author.organization.sort
+ 'author.sort
+ if$
+ }
+ if$
+ }
+ if$
+ #1 entry.max$ substring$ % added for newapa
+ 'sort.label := % added for newapa
+ sort.label % added for newapa
+ *
+ " "
+ *
+ title field.or.null
+ sort.format.title
+ *
+ #1 entry.max$ substring$
+ 'sort.key$ :=
+}
+
+ITERATE {presort}
+
+SORT % by label, year, author/editor, title
+
+STRINGS { last.label next.extra }
+
+INTEGERS { last.extra.num }
+
+FUNCTION {initialize.extra.label.stuff}
+{ #0 int.to.chr$ 'last.label :=
+ "" 'next.extra :=
+ #0 'last.extra.num :=
+}
+
+FUNCTION {forward.pass}
+%
+% Pass through all entries, comparing current entry to last one.
+% Need to concatenate year to the stack (done by calc.label) to determine
+% if two entries are the same (see presort)
+%
+{ last.label
+ calc.label year field.or.null purify$ #-1 #4 substring$ * % add year
+ #1 entry.max$ substring$ = % are they equal?
+ { last.extra.num #1 + 'last.extra.num :=
+ last.extra.num int.to.chr$ 'extra.label :=
+ }
+ { "a" chr.to.int$ 'last.extra.num :=
+ "" 'extra.label :=
+ calc.label year field.or.null purify$ #-1 #4 substring$ * % add year
+ #1 entry.max$ substring$ 'last.label := % assign to last.label
+ }
+ if$
+}
+
+FUNCTION {reverse.pass}
+{ next.extra "b" =
+ { "a" 'extra.label := }
+ 'skip$
+ if$
+ label.year extra.label * 'sort.year :=
+ extra.label 'next.extra :=
+}
+
+EXECUTE {initialize.extra.label.stuff}
+
+ITERATE {forward.pass}
+
+REVERSE {reverse.pass}
+
+FUNCTION {bib.sort.order}
+{ sort.label
+ " "
+ *
+ year field.or.null sortify
+ *
+ " "
+ *
+ title field.or.null
+ sort.format.title
+ *
+ #1 entry.max$ substring$
+ 'sort.key$ :=
+}
+
+ITERATE {bib.sort.order}
+
+SORT % by sort.label, year, title --- giving final bib. order.
+
+FUNCTION {begin.bib}
+
+{ preamble$ empty$
+ 'skip$
+ { preamble$ write$ newline$ }
+ if$
+ "\begin{thebibliography}{}" write$ newline$
+ "\newcommand{\enquote}[1]{``#1''}"
+ write$ newline$
+}
+
+
+EXECUTE {begin.bib}
+
+EXECUTE {init.state.consts}
+
+ITERATE {call.type$}
+
+FUNCTION {end.bib}
+{ newline$
+ "\end{thebibliography}" write$ newline$
+}
+
+EXECUTE {end.bib}
+
diff --git a/biblio/bibtex/contrib/mla/hum2.sty b/biblio/bibtex/contrib/mla/hum2.sty
new file mode 100644
index 0000000000..037bc134fc
--- /dev/null
+++ b/biblio/bibtex/contrib/mla/hum2.sty
@@ -0,0 +1,310 @@
+% -*- LaTeX -*-
+%%% ====================================================================
+%%% @LaTeX-style-file{
+%%% author = "Caitlin Shaw",
+%%% version = "1",
+%%% date = "13 April 1997",
+%%% filename = "hum2.sty",
+%%% email = "cmshaw@princeton.edu",
+%%% abstract = "Contains the LaTeX2e style command
+%%% definitions for the BibTeX style hum2.bst."
+%%% }
+%%% ====================================================================
+%
+%
+%hum2.sty: Style file for use with bibtex style hum2.bst, for
+%bibliographies formatted according the handbook of the Modern Language
+%Association (MLA) and citations of the form footnote(Author, Title,
+%Page). Repeated Author/Title will be replaced with Ibid. In addition,
+%the article will be doublespaced and margins will be set to 1" standard.
+%
+%The following packages must be used in addition to hum2.sty:
+% ifthen.sty
+% doublespace2.sty
+%
+%This file is a jury-rig of the chicago bst and sty files. It utilizes
+%the fact that chicago.bst passes two types of author fields to the
+%citation command: full and abbreviated. hum2 replaces the full author
+%field with the title (see below for important .bib note) and reformats
+%the \cite command (see the bottom of hum2.sty).
+%
+%IMPORTANT NOTICE
+%You must enclose your title in braces in your .bib file, ie,
+% title = "{My Book of Computers}",
+%
+%IMPORTANT NOTICE
+%You need to replace (or start using) the command \note instead of \cite
+%(see next notice for format).
+%
+%IMPORTANT NOTICE
+%You must pass two commands to \note: first the page number and then the
+%citation key. If you do not have a page number, give 'nopage' as the
+%first option, ie,
+% So she said ``okay.''\cite{nopage}{aB99} Then it
+% hit\cite{pages~12--13}{cD88}.
+%
+%
+%Details: it assumes you want a first page numbered 0. Reset
+%counter page to 1 if this is not the case. If all you want are the
+%citations, the important modifications are the first two lines (\cite
+%and \citeNP) and last three lines (\newcommand, \newboolean, and
+%\newcommand{\note}). (In fact, I don't know everything that the rest
+%of the old chicago.sty file is doing, and didn't change it.)
+%
+%
+% THE FOLLOWING INFORMATION (between the lines) IS MOSTLY OUTDATED
+% AND CONTAINS THE ORIGINAL chicago.sty DOCUMENTATION
+% ----------------------------------------------------------------------
+% chicago.sty: Style file for use with bibtex style chicago.bst, for
+% bibliographies formatted according to the 13th Edition of the Chicago
+% Manual of Style.
+%
+% 'newapa.bst' was made from 'plain.bst', 'named.bst', and 'apalike.bst',
+% with lots of tweaking to make it look like APA style, along with tips
+% from Young Ryu and Brian Reiser's modifications of 'apalike.bst'.
+% newapa.sty formed the basis of this style, chicago.sty. Author-date
+% references in newapa.bst formed the basis for chicago.bst. Chicagoa.bst
+% supports annotations.
+%
+% Version 4 (August, 1992):
+% - fixed chicago.bst and chicagoa.bst to handle long author lists in
+% sorting
+% - fixed chicago.bst and chicagoa.bst so that missing page numbers in
+% ``article'' entries are handled correctly
+% - modified chicago.sty to format entries with 2nd and subsequent lines
+% indented.
+%
+% Citation format: (author-last-name year)
+% (author-last-name and author-last-name year)
+% (author-last-name et al. year)
+% (author-last-name)
+% author-last-name
+% author-last-name (year)
+% (author-last-name and author-last-name)
+% (author-last-name et al.)
+% (year) or (year,year)
+% year or year,year
+%
+% Reference list ordering: alphabetical by author or whatever passes
+% for author in the absence of one.
+%
+% This BibTeX style has support for abbreviated author lists and for
+% year-only citations. This is done by having the citations
+% actually look like
+%
+% \citeauthoryear{full-author-info}{abbrev-author-info}{year}
+%
+% The LaTeX style has to have the following (or similar)
+%
+% \let\@internalcite\cite
+% \def\fullcite{\def\citeauthoryear##1##2##3{##1, ##3}\@internalcite}
+% \def\fullciteA{\def\citeauthoryear##1##2##3{##1}\@internalcite}
+% \def\shortcite{\def\citeauthoryear##1##2##3{##2, ##3}\@internalcite}
+% \def\shortciteA{\def\citeauthoryear##1##2##3{##2}\@internalcite}
+% \def\citeyear{\def\citeauthoryear##1##2##3{##3}\@internalcite}
+%
+% -------------------------------------------------------------------------
+% This file implements citations for the ``chicago'' bibliography style.
+% Place it in a file called chicago.sty in the TeX search path.
+%(Placing it in the same directory as the LaTeX document should also work.)
+%
+% This file is a modification of the ``newapa'' LaTeX style,
+% originally adapted by Steven Spencer from the ``apalike'' LaTeX style.
+% It was originally modified by Stephen N. Spencer, with further
+% modifications by Young U. Ryu.
+%
+% The ``chicago'' BibTeX bibliography style creates citations with labels:
+% \citeauthoryear{author-info}{abbrev. author-info}{year}
+%
+% These labels are processed by the following LaTeX commands:
+%
+% \cite{key}
+% which produces citations with full author list and year.
+% eg. (Brown 1978; Jarke, Turner, Stohl, et al. 1985)
+% \citeNP{key}
+% which produces citations with full author list and year, but without
+% enclosing parentheses:
+% eg. Brown 1978; Jarke, Turner and Stohl 1985
+% \citeA{key}
+% which produces citations with only the full author list.
+% eg. (Brown; Jarke, Turner and Stohl)
+% \citeANP{key}
+% which produces citations with only the full author list, without
+% parentheses eg. Brown; Jarke, Turner and Stohl
+% \citeN{key}
+% which produces citations with the full author list and year, but
+% can be used as nouns in a sentence; no parentheses appear around
+% the author names, but only around the year.
+% eg. Shneiderman (1978) states that......
+% \citeN should only be used for a single citation.
+% \shortcite{key}
+% which produces citations with abbreviated author list and year.
+% \shortciteNP{key}
+% which produces citations with abbreviated author list and year.
+% \shortciteA{key}
+% which produces only the abbreviated author list.
+% \shortciteANP{key}
+% which produces only the abbreviated author list.
+% \shortciteN{key}
+% which produces the abbreviated author list and year, with only the
+% year in parentheses. Use with only one citation.
+% \citeyear{key}
+% which produces the year information only, within parentheses.
+% \citeyearNP{key}
+% which produces the year information only.
+%
+% Abbreviated author lists use the ``et al.'' construct.
+%
+% `NP' means `no parentheses'.
+%
+% This LaTeX style file must be used with the ``chicago'' or ``chicagoa''
+% (annotated chicago style) BibTeX styles.
+%
+%\typeout{Using Chicago Manual of Style bibliography: 31 August 1992}
+%
+% -------------------------------------------------------------------------
+%
+% Citation macros.
+%
+\let\@internalcite\cite
+%
+\def\cite{\def\@citeseppen{-1000}%
+ \def\@cite##1##2{(##1\if@tempswa , ##2\fi)}%
+ \def\citeauthoryear##1##2##3{##2, { \em ##1}.}\@internalcite}
+\def\citeNP{\def\@citeseppen{-1000}%
+ \def\@cite##1##2{##1\if@tempswa , ##2\fi}%
+ \def\citeauthoryear##1##2##3{##2, { \em ##1}}\@internalcite}
+%\def\cite{\def\@citeseppen{-1000}%
+% \def\@cite##1##2{(##1\if@tempswa , ##2\fi)}%
+% \def\citeauthoryear##1##2##3{\footnote{##2, { \em ##1}.}}\@internalcite}
+%\def\citeNP{\def\@citeseppen{-1000}%
+% \def\@cite##1##2{##1\if@tempswa , ##2\fi}%
+% \def\citeauthoryear##1##2##3{\footnote{##2, { \em ##1}}}\@internalcite}
+\def\citeN{\def\@citeseppen{-1000}%
+ \def\@cite##1##2{##1\if@tempswa , ##2)\else{)}\fi}%
+ \def\citeauthoryear##1##2##3{##1 (##3}\@citedata}
+\def\citeA{\def\@citeseppen{-1000}%
+ \def\@cite##1##2{(##1\if@tempswa , ##2\fi)}%
+ \def\citeauthoryear##1##2##3{##1}\@internalcite}
+\def\citeANP{\def\@citeseppen{-1000}%
+ \def\@cite##1##2{##1\if@tempswa , ##2\fi}%
+ \def\citeauthoryear##1##2##3{##1}\@internalcite}
+%
+\def\shortcite{\def\@citeseppen{-1000}%
+ \def\@cite##1##2{(##1\if@tempswa , ##2\fi)}%
+ \def\citeauthoryear##1##2##3{##2 ##3}\@internalcite}
+\def\shortciteNP{\def\@citeseppen{-1000}%
+ \def\@cite##1##2{##1\if@tempswa , ##2\fi}%
+ \def\citeauthoryear##1##2##3{##2 ##3}\@internalcite}
+\def\shortciteN{\def\@citeseppen{-1000}%
+ \def\@cite##1##2{##1\if@tempswa , ##2)\else{)}\fi}%
+ \def\citeauthoryear##1##2##3{##2 (##3}\@citedata}
+\def\shortciteA{\def\@citeseppen{-1000}%
+ \def\@cite##1##2{(##1\if@tempswa , ##2\fi)}%
+ \def\citeauthoryear##1##2##3{##2}\@internalcite}
+\def\shortciteANP{\def\@citeseppen{-1000}%
+ \def\@cite##1##2{##1\if@tempswa , ##2\fi}%
+ \def\citeauthoryear##1##2##3{##2}\@internalcite}
+%
+\def\citeyear{\def\@citeseppen{-1000}%
+ \def\@cite##1##2{(##1\if@tempswa , ##2\fi)}%
+ \def\citeauthoryear##1##2##3{##3}\@citedata}
+\def\citeyearNP{\def\@citeseppen{-1000}%
+ \def\@cite##1##2{##1\if@tempswa , ##2\fi}%
+ \def\citeauthoryear##1##2##3{##3}\@citedata}
+
+%
+% \@citedata and \@citedatax:
+%
+% Place commas in-between citations in the same \citeyear, \citeyearNP,
+% \citeN, or \shortciteN command.
+% Use something like \citeN{ref1,ref2,ref3} and \citeN{ref4} for a list.
+%
+\def\@citedata{%
+ \@ifnextchar [{\@tempswatrue\@citedatax}%
+ {\@tempswafalse\@citedatax[]}%
+}
+
+\def\@citedatax[#1]#2{%
+\if@filesw\immediate\write\@auxout{\string\citation{#2}}\fi%
+ \def\@citea{}\@cite{\@for\@citeb:=#2\do%
+ {\@citea\def\@citea{, }\@ifundefined% by Young
+ {b@\@citeb}{{\bf ?}%
+ \@warning{Citation `\@citeb' on page \thepage \space undefined}}%
+{\csname b@\@citeb\endcsname}}}{#1}}%
+
+% don't box citations, separate with ; and a space
+% also, make the penalty between citations negative: a good place to break.
+%
+\def\@citex[#1]#2{%
+\if@filesw\immediate\write\@auxout{\string\citation{#2}}\fi%
+ \def\@citea{}\@cite{\@for\@citeb:=#2\do%
+ {\@citea\def\@citea{; }\@ifundefined% by Young
+ {b@\@citeb}{{\bf ?}%
+ \@warning{Citation `\@citeb' on page \thepage \space undefined}}%
+{\csname b@\@citeb\endcsname}}}{#1}}%
+
+% (from apalike.sty)
+% No labels in the bibliography.
+%
+\def\@biblabel#1{}
+
+% (from apalike.sty)
+% Set length of hanging indentation for bibliography entries.
+%
+\newlength{\bibhang}
+\setlength{\bibhang}{2em}
+
+% Indent second and subsequent lines of bibliographic entries. Stolen
+% from openbib.sty: \newblock is set to {}.
+
+\newdimen\bibindent
+\bibindent=1.5em
+\@ifundefined{refname}%
+ {\@ifundefined{chapter}%
+ {\newcommand{\refname}{References}}%
+ {\newcommand{\refname}{Bibliography}}%
+ }%
+ {}%
+\@ifundefined{chapter}%
+ {\def\thebibliography#1{\section*{\refname\@mkboth
+ {\uppercase{\refname}}{\uppercase{\refname}}}\list
+ {[\arabic{enumi}]}{\settowidth\labelwidth{[#1]}
+ \leftmargin\labelwidth
+ \advance\leftmargin\labelsep
+ \advance\leftmargin\bibindent
+ \itemindent -\bibindent
+ \listparindent \itemindent
+ \parsep \z@
+ \usecounter{enumi}}
+ \def\newblock{}
+ \sloppy
+ \sfcode`\.=1000\relax}}
+ {\def\thebibliography#1{\chapter*{\refname\@mkboth
+ {\uppercase{\refname}}{\uppercase{\refname}}}\list
+ {[\arabic{enumi}]}{\settowidth\labelwidth{[#1]}
+ \leftmargin\labelwidth
+ \advance\leftmargin\labelsep
+ \advance\leftmargin\bibindent
+ \itemindent -\bibindent
+ \listparindent \itemindent
+ \parsep \z@
+ \usecounter{enumi}}
+ \def\newblock{}
+ \sloppy
+ \sfcode`\.=1000\relax}}
+%
+% hum2 central modifications below
+%
+\setstretch{1.7}
+\setlength{\voffset}{0pt}
+\setlength{\oddsidemargin}{0pt}
+\setlength{\headheight}{0pt}
+\setlength{\headsep}{0pt}
+\setlength{\textheight}{8.5in}
+\setlength{\textwidth}{6.5in}
+\renewcommand{\refname}{Bibliography}
+\setcounter{page}{0}
+\newcommand{\oldcite}{aaaa}
+\newboolean{two}
+\newcommand{\note}[2]{\ifthenelse{\equal{#1}{nopage}}{\setboolean{two}{false}}{\setboolean{two}{true}}\footnote{\ifthenelse{\equal{#2}{\oldcite}}{\ifthenelse{\boolean{two}}{{\it Ibid},~#1.}{{\it Ibid}.}}{\ifthenelse{\boolean{two}}{\citeNP[#1]{#2}.}{\citeNP{#2}.}}}\renewcommand{\oldcite}{#2}}
diff --git a/biblio/bibtex/contrib/mla/mla.bst b/biblio/bibtex/contrib/mla/mla.bst
new file mode 100644
index 0000000000..c5762e9dac
--- /dev/null
+++ b/biblio/bibtex/contrib/mla/mla.bst
@@ -0,0 +1,1533 @@
+% BibTeX bibliography style `MLA' to conform to the MLA stylesheet
+% 3/23/97 minor changes to @inproceedings
+% modified on 10/21/95 copied much of the tricks of chicago.bst
+% now need use use chicago.sty when using this bibstyle
+% modified on 3/13/94 converted note3 to "comment" field
+% Modified from BibTeX standard bibliography style `plain' by Tom Weissert
+% BibTeX standard bibliography style `plain'
+ % version 0.99a for BibTeX versions 0.99a or later, LaTeX version 2.09.
+ % Copyright (C) 1985, all rights reserved.
+ % Copying of this file is authorized only if either
+ % (1) you make absolutely no changes to your copy, including name, or
+ % (2) if you do make changes, you name it something other than
+ % btxbst.doc, plain.bst, unsrt.bst, alpha.bst, and abbrv.bst.
+ % This restriction helps ensure that all standard styles are identical.
+ % The file btxbst.doc has the documentation for this style.
+% The following text is the header for chicago.bst:
+% "Chicago" BibTeX style, chicago.bst
+% ===================================
+%
+% BibTeX `chicago' style file for BibTeX version 0.99c, LaTeX version 2.09
+% Place it in a file called chicago.bst in the BibTeX search path.
+% You need to include chicago.sty as a \documentstyle option.
+% (Placing it in the same directory as the LaTeX document should also work.)
+% This "chicago" style is based on newapa.bst (American Psych. Assoc.)
+% found at ymir.claremont.edu.
+%
+% Citation format: (author-last-name year)
+% (author-last-name and author-last-name year)
+% (author-last-name, author-last-name, and author-last-name year)
+% (author-last-name et al. year)
+% (author-last-name)
+% author-last-name (year)
+% (author-last-name and author-last-name)
+% (author-last-name et al.)
+% (year) or (year,year)
+% year or year,year
+%
+% Reference list ordering: alphabetical by author or whatever passes
+% for author in the absence of one.
+%
+% This BibTeX style has support for abbreviated author lists and for
+% year-only citations. This is done by having the citations
+% actually look like
+%
+% \citeauthoryear{full-author-info}{abbrev-author-info}{year}
+%
+% The LaTeX style has to have the following (or similar)
+%
+% \let\@internalcite\cite
+% \def\fullcite{\def\citeauthoryear##1##2##3{##1, ##3}\@internalcite}
+% \def\fullciteA{\def\citeauthoryear##1##2##3{##1}\@internalcite}
+% \def\shortcite{\def\citeauthoryear##1##2##3{##2, ##3}\@internalcite}
+% \def\shortciteA{\def\citeauthoryear##1##2##3{##2}\@internalcite}
+% \def\citeyear{\def\citeauthoryear##1##2##3{##3}\@internalcite}
+%
+% These TeX macro definitions are found in chicago.sty. Additional
+% commands to manipulate different components of a citation can be defined
+% so that, for example, you can list author's names without parentheses
+% if using a citation as a noun or object in a sentence.
+%
+% This file was originally copied from newapa.bst at ymir.claremont.edu.
+%
+% Features of chicago.bst:
+% =======================
+%
+% - full names used in citations, but abbreviated citations are available
+% (see above)
+% - if an entry has a "month", then the month and year are also printed
+% as part of that bibitem.
+% - all conjunctions use "and" instead of "\&"
+% - major modification from Chicago Manual of Style (13th ed.) is that
+% only the first author in a reference appears last name first-
+% additional authors appear as J. Q. Public.
+% - pages are listed as "pp. xx-xx" in all entry types except
+% article entries.
+% - book, inbook, and manual use "location: publisher" (or organization)
+% for address and publisher. All other types list publishers separately.
+% - "pp." are used to identify page numbers for all entry types except
+% articles.
+% - organization is used as a citation label if neither author nor editor
+% is present (for manuals).
+% - "et al." is used for long author and editor lists, or when "others"
+% is used.
+%
+% Modifications and bug fixes from newapa.bst:
+% ===========================================
+%
+% - added month, year to bib entries if month is present
+% - fixed bug with In proceedings, added necessary comma after title
+% - all conjunctions changed to "and" from "\&"
+% - fixed bug with author labels in my.full.label: "et al." now is
+% generated when "others" is an author name
+% - major modification from Chicago Manual of Style (13th ed.) is that
+% only the first author in a reference appears last name first-
+% additional authors appear as J. Q. Public.
+% - pages are listed as "pp. xx-xx" in all entry types except
+% article entries. Unnecessary (IMHO) "()" around page numbers
+% were removed, and page numbers now don't end with a period.
+% - created chicago.sty for use with this bibstyle (required).
+% - fixed bugs in FUNCTION {format.vol.num.pages} for missing volume,
+% number, and /or pages. Renamed to format.jour.vol.
+% - fixed bug in formatting booktitles: additional period an error if
+% book has a volume.
+% - fixed bug: editors usually given redundant period before next clause
+% (format.editors.dot) removed.
+% - added label support for organizations, if both author and editor
+% are missing (from alpha.bst). If organization is too long, then
+% the key field is used for abbreviated citations.
+% - In proceedings or books of several volumes, no comma was written
+% between the "Volume x" and the page numbers (this was intentional
+% in newapa.bst). Fixed.
+% - Some journals may not have volumes/numbers, only month/year (eg.
+% IEEE Computer). Fixed bug in article style that assumed volume/number
+% was always present.
+%
+% Original documentation for newapa.sty:
+% =====================================
+%
+% This version was made by modifying the master file made by
+% Oren Patashnik (PATASHNIK@SCORE.STANFORD.EDU), and the 'named' BibTeX
+% style of Peter F. Patel-Schneider.
+%
+% Copyright (C) 1985, all rights reserved.
+% Copying of this file is authorized only if either
+% (1) you make absolutely no changes to your copy, including name, or
+% (2) if you do make changes, you name it something other than 'newapa.bst'.
+% There are undoubtably bugs in this style. If you make bug fixes,
+% improvements, etc. please let me know. My e-mail address is:
+% spencer@cgrg.ohio.state.edu or 71160.3141@compuserve.com
+%
+% This style was made from 'plain.bst', 'named.bst', and 'apalike.bst',
+% with lots of tweaking to make it look like APA style, along with tips
+% from Young Ryu and Brian Reiser's modifications of 'apalike.bst'.
+%
+%
+ENTRY
+ { address
+ author
+ booktitle
+ chapter
+ comment
+ edition
+ editor
+ howpublished
+ institution
+ journal
+ key
+ month
+ note
+ number
+ organization
+ pages
+ publisher
+ school
+ series
+ title
+ type
+ volume
+ year
+ }
+ {}
+% copied labels from Chicago
+ { label.year extra.label sort.year sort.label }
+% added "post.title" to integers
+% just.space to integers
+INTEGERS { output.state before.all mid.sentence after.sentence after.block
+ post.title}
+% added #4 below
+FUNCTION {init.state.consts}
+{ #0 'before.all :=
+ #1 'mid.sentence :=
+ #2 'after.sentence :=
+ #3 'after.block :=
+ #4 'post.title :=
+}
+% added u from chicago:
+STRINGS { s t u }
+% added outer if loop
+FUNCTION {output.nonnull}
+{ 's :=
+ output.state post.title =
+ { " " * write$
+ newline$
+ "\newblock " write$
+ mid.sentence 'output.state :=
+ }
+ { output.state mid.sentence =
+ { ", " * write$ }
+ { output.state after.block =
+ { add.period$ write$
+ newline$
+ "\newblock " write$
+ }
+ { output.state before.all =
+ 'write$
+ { add.period$ " " * write$ }
+ if$
+ }
+ if$
+ mid.sentence 'output.state :=
+ }
+ if$
+ }
+ if$
+ s
+}
+
+FUNCTION {output}
+{ duplicate$ empty$
+ 'pop$
+ 'output.nonnull
+ if$
+}
+FUNCTION {putnodot}
+{post.title 'output.state :=}
+
+FUNCTION {output.check}
+{ 't :=
+ duplicate$ empty$
+ { pop$ "empty " t * " in " * cite$ * warning$ }
+ 'output.nonnull
+ if$
+}
+% removed original bibitem from here
+% added the chicago version later in file
+%FUNCTION {output.bibitem}
+%{ newline$
+% "\bibitem{" write$
+% cite$ write$
+% "}" write$
+% newline$
+% ""
+% before.all 'output.state :=
+%}
+%
+FUNCTION {fin.entry}
+{ add.period$
+ write$
+ newline$
+}
+FUNCTION {new.block}
+{ output.state before.all =
+ 'skip$
+ { after.block 'output.state := }
+ if$
+}
+FUNCTION {new.sentence}
+{ output.state after.block =
+ 'skip$
+ { output.state before.all =
+ 'skip$
+ { after.sentence 'output.state := }
+ if$
+ }
+ if$
+}
+FUNCTION {not}
+{ { #0 }
+ { #1 }
+ if$
+}
+FUNCTION {and}
+{ 'skip$
+ { pop$ #0 }
+ if$
+}
+FUNCTION {or}
+{ { pop$ #1 }
+ 'skip$
+ if$
+}
+FUNCTION {new.block.checka}
+{ empty$
+ 'skip$
+ 'new.block
+ if$
+}
+FUNCTION {new.block.checkb}
+{ empty$
+ swap$ empty$
+ and
+ 'skip$
+ 'new.block
+ if$
+}
+FUNCTION {new.sentence.checka}
+{ empty$
+ 'skip$
+ 'new.sentence
+ if$
+}
+FUNCTION {new.sentence.checkb}
+{ empty$
+ swap$ empty$
+ and
+ 'skip$
+ 'new.sentence
+ if$
+}
+FUNCTION {field.or.null}
+{ duplicate$ empty$
+ { pop$ "" }
+ 'skip$
+ if$
+}
+FUNCTION {emphasize}
+{ duplicate$ empty$
+ { pop$ "" }
+ { "\emph{" swap$ * "}" * }
+ if$
+}
+% moved format.date function to here for sort
+FUNCTION {format.date}
+{ year empty$
+ { month empty$
+ { "" }
+ { "there's a month but no year in " cite$ * warning$
+ month
+ }
+ if$
+ }
+ { month empty$
+ 'year
+ { month " " * year * }
+ if$
+ }
+ if$
+}
+
+INTEGERS { nameptr namesleft numnames }
+%
+% This new function is a modified version of the old function
+% the old function has been renamed format.names.alt below
+% added if nameptr=1 option and changed format for first
+% author to last name first.
+FUNCTION {format.names}
+{ 's :=
+ #1 'nameptr :=
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ { nameptr #1 =
+ { s nameptr "{ll}{, ff}{vv~}{,jj}" format.name$ 't := }
+ { s nameptr "{ff~}{vv~}{ll}{, jj}" format.name$ 't := }
+ if$
+ nameptr #1 >
+ { namesleft #1 >
+ { ", " * t * }
+ { numnames #2 >
+ { "," * }
+ 'skip$
+ if$
+ t "others" =
+ { " et~al." * }
+ { " and " * t * }
+ if$
+ }
+ if$
+ }
+ 't
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+}
+
+% this is the original format.names function
+FUNCTION {format.names.alt}
+{ 's :=
+ #1 'nameptr :=
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ { s nameptr "{ff~}{vv~}{ll}{, jj}" format.name$ 't :=
+ nameptr #1 >
+ { namesleft #1 >
+ { ", " * t * }
+ { numnames #2 >
+ { "," * }
+ 'skip$
+ if$
+ t "others" =
+ { " et~al." * }
+ { " and " * t * }
+ if$
+ }
+ if$
+ }
+ 't
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+}
+% copied the following two from chicago
+FUNCTION {my.full.label}
+{ 's :=
+ #1 'nameptr := % nameptr = 1;
+ s num.names$ 'numnames := % numnames = num.name$(s);
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ { s nameptr "{vv~}{ll}" format.name$ 't := % get the next name
+ nameptr #1 >
+ { namesleft #1 >
+ { ", " * t * }
+ { numnames #2 >
+ { "," * }
+ 'skip$
+ if$
+ t "others" =
+ { " et~al." * }
+ { " and " * t * } % from Chicago Manual of Style
+ if$
+ }
+ if$
+ }
+ 't
+ if$
+ nameptr #1 + 'nameptr := % nameptr += 1;
+ namesleft #1 - 'namesleft := % namesleft =- 1;
+ }
+ while$
+}
+FUNCTION {format.names.fml}
+%
+% Format names in "familiar" format, with first initial followed by
+% last name. Like format.names, ALL names are formatted.
+%
+{ 's :=
+ #1 'nameptr := % nameptr = 1;
+ s num.names$ 'numnames := % numnames = num.name$(s);
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ { s nameptr "{f.~}{vv~}{ll}{, jj}" format.name$ 't :=
+ nameptr #1 >
+ { namesleft #1 >
+ { ", " * t * }
+ { numnames #2 >
+ { "," * }
+ 'skip$
+ if$
+ t "others" =
+ { " et~al." * }
+ { " and " * t * }
+% { " \& " * t * }
+ if$
+ }
+ if$
+ }
+ 't
+ if$
+ nameptr #1 + 'nameptr := % nameptr += 1;
+ namesleft #1 - 'namesleft := % namesleft =- 1;
+ }
+ while$
+}
+FUNCTION {format.authors}
+{ author empty$
+ { "" }
+ { author format.names }
+ if$
+}
+FUNCTION {format.key}
+{ empty$
+ { key field.or.null }
+ { "" }
+ if$
+}
+FUNCTION {format.editors}
+{ editor empty$
+ { "" }
+ { editor format.names
+ editor num.names$ #1 >
+ { ", editors" * }
+ { ", editor" * }
+ if$
+ }
+ if$
+}
+% from chicago:
+% Format editor names for use in the "in" types: inbook, incollection,
+% inproceedings: first initial, then last names. When editors are the
+% LABEL for an entry, then format.editor is used which lists editors
+% by last name first.
+%
+FUNCTION {format.editors.fml}
+{ editor empty$
+ { "" }
+ { editor format.names.fml
+ editor num.names$ #1 >
+ { " (Eds.)" * }
+ { " (Ed.)" * }
+ if$
+ }
+ if$
+}
+%
+% this new function is a modified version of the original above
+% with the additional use of format.names.alt when the editor
+% is not the first name in the entry.
+FUNCTION {format.editors.alt}
+{ editor empty$
+ { "" }
+ { "Ed. " editor format.names.alt
+ editor num.names$ #1 >
+ { * }
+ { * }
+ if$
+ }
+ if$
+}
+
+% removed change.case$ operation on title
+FUNCTION {format.title}
+{ title empty$
+ { "" }
+ { title }
+% { title "t" change.case$ }
+ if$
+}
+% new function copied from above added quote marks and
+% period inside quotes for articles
+FUNCTION {format.title.article}
+{ title empty$
+ { "" }
+ { "``" title * ".''" * }
+ if$
+}
+% new function copied from above added quote marks and
+% period inside quotes for chapter title in type INBOOK
+FUNCTION {format.chapter.inbook}
+{ chapter empty$
+ { "" }
+ { "``" chapter * ".''" * }
+ if$
+}
+
+
+FUNCTION {n.dashify}
+{ 't :=
+ ""
+ { t empty$ not }
+ { t #1 #1 substring$ "-" =
+ { t #1 #2 substring$ "--" = not
+ { "--" *
+ t #2 global.max$ substring$ 't :=
+ }
+ { { t #1 #1 substring$ "-" = }
+ { "-" *
+ t #2 global.max$ substring$ 't :=
+ }
+ while$
+ }
+ if$
+ }
+ { t #1 #1 substring$ *
+ t #2 global.max$ substring$ 't :=
+ }
+ if$
+ }
+ while$
+}
+% moved format.data function from here
+FUNCTION {format.btitle}
+{ title emphasize }
+
+FUNCTION {tie.or.space.connect}
+{ duplicate$ text.length$ #3 <
+ { "~" }
+ { " " }
+ if$
+ swap$ * *
+}
+FUNCTION {either.or.check}
+{ empty$
+ 'pop$
+ { "can't use both " swap$ * " fields in " * cite$ * warning$ }
+ if$
+}
+FUNCTION {format.bvolume}
+{ volume empty$
+ { series empty$
+ { "" }
+ { series }
+ if$
+ }
+ { "Volume" volume tie.or.space.connect
+ series empty$
+ {" " * }
+ { " of " * series * }
+ if$
+ "volume and number" number either.or.check
+ }
+ if$
+}
+FUNCTION {format.number.series}
+{ volume empty$
+ { number empty$
+ { series field.or.null }
+ { output.state mid.sentence =
+ { "number" }
+ { "Number" }
+ if$
+ number tie.or.space.connect
+ series empty$
+ { "there's a number but no series in " cite$ * warning$ }
+ { " in " * series * }
+ if$
+ }
+ if$
+ }
+ { "" }
+ if$
+}
+FUNCTION {format.edition}
+{ edition empty$
+ { "" }
+ { output.state mid.sentence =
+ { edition "l" change.case$ " edition" * }
+ { edition "t" change.case$ " edition" * }
+ if$
+ }
+ if$
+}
+INTEGERS { multiresult }
+FUNCTION {multi.page.check}
+{ 't :=
+ #0 'multiresult :=
+ { multiresult not
+ t empty$ not
+ and
+ }
+ { t #1 #1 substring$
+ duplicate$ "-" =
+ swap$ duplicate$ "," =
+ swap$ "+" =
+ or or
+ { #1 'multiresult := }
+ { t #2 global.max$ substring$ 't := }
+ if$
+ }
+ while$
+ multiresult
+}
+FUNCTION {format.pages}
+{ pages empty$
+ { "" }
+ { pages multi.page.check
+ { " " pages n.dashify tie.or.space.connect }
+ { " " pages tie.or.space.connect }
+ if$
+ }
+ if$
+}
+% added the if year empty block to below
+FUNCTION {format.vol.num.pages}
+{ volume field.or.null
+ year empty$
+ { month empty$
+ { "" *}
+ { "there's a month but no year in " cite$ * warning$ }
+ if$
+ }
+ { month empty$
+ { " (" year * ")" * * }
+ { " (" month * " " * year * ")" * * }
+ if$
+ }
+ if$
+ pages empty$
+ 'skip$
+ { duplicate$ empty$
+ { pop$ format.pages }
+ { ": " * pages n.dashify * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.vol.num.pages.mag}
+{ volume field.or.null
+ year empty$
+ { month empty$
+ { "" *}
+ { "there's a month but no year in " cite$ * warning$ }
+ if$
+ }
+ { month empty$
+ { " " year " " * * }
+ { " " month * ". " * year * " " * * }
+ if$
+ }
+ if$
+ pages empty$
+ {'skip$}
+ { duplicate$ empty$
+ { pop$ format.pages }
+ { ": " * pages n.dashify * }
+ if$
+ }
+ if$
+}
+FUNCTION {format.chapter.pages}
+{ chapter empty$
+ 'format.pages
+ { type empty$
+ { "chapter" }
+ { type "l" change.case$ }
+ if$
+ chapter tie.or.space.connect
+ pages empty$
+ 'skip$
+ { ", " * format.pages * }
+ if$
+ }
+ if$
+}
+% modified to use format.editors.alt instead of format.editors
+FUNCTION {format.in.ed.booktitle}
+{ booktitle empty$
+ { "" }
+ { editor empty$
+ { " " booktitle emphasize * ". " * }
+ { " " booktitle emphasize * ". " * format.editors.alt * }
+ if$
+ }
+ if$
+}
+FUNCTION {empty.misc.check}
+{ author empty$ title empty$ howpublished empty$
+ month empty$ year empty$ note empty$
+ and and and and and
+ key empty$ not and
+ { "all relevant fields are empty in " cite$ * warning$ }
+ 'skip$
+ if$
+}
+FUNCTION {format.thesis.type}
+{ type empty$
+ 'skip$
+ { pop$
+ type "t" change.case$
+ }
+ if$
+}
+FUNCTION {format.tr.number}
+{ type empty$
+ { "Technical Report" }
+ 'type
+ if$
+ number empty$
+ { "t" change.case$ }
+ { number tie.or.space.connect }
+ if$
+}
+FUNCTION {format.article.crossref}
+{ "See"
+ "\citeN{" * crossref * "}" *
+}
+FUNCTION {format.crossref.editor}
+{ editor #1 "{vv~}{ll}" format.name$
+ editor num.names$ duplicate$
+ #2 >
+ { pop$ " et~al." * }
+ { #2 <
+ 'skip$
+ { editor #2 "{ff }{vv }{ll}{ jj}" format.name$ "others" =
+ { " et~al." * }
+ { " and " * editor #2 "{vv~}{ll}" format.name$ * }
+ if$
+ }
+ if$
+ }
+ if$
+}
+FUNCTION {format.book.crossref}
+{ volume empty$
+ { "empty volume in " cite$ * "'s crossref of " * crossref * warning$
+ "In "
+ }
+ { "Volume" volume tie.or.space.connect
+ " of " *
+ }
+ if$
+ editor empty$
+ editor field.or.null author field.or.null =
+ or
+ { key empty$
+ { series empty$
+ { "need editor, key, or series for " cite$ * " to crossref " *
+ crossref * warning$
+ "" *
+ }
+ { "\emph{" * series * "}" * }
+ if$
+ }
+ { key * }
+ if$
+ }
+ { format.crossref.editor * }
+ if$
+ " \citeN{" * crossref * "}" *
+}
+FUNCTION {format.incoll.inproc.crossref}
+{"See" " \citeN{" * crossref * "}" * }
+%
+% created this function
+FUNCTION {format.publishing}
+{ address empty$
+ {publisher}
+ {address ": " * publisher * }
+ if$
+}
+%
+% Stole the following label generation
+% routines for chicago-like labels in
+% the bbl file:
+FUNCTION {format.lab.names}
+{ 's :=
+ s num.names$ 'numnames :=
+ numnames #2 > % change number to number of others allowed before
+ % forcing "et al".
+ { s #1 "{vv~}{ll}" format.name$ " et~al." * }
+ {
+ numnames #1 - 'namesleft :=
+ #2 'nameptr :=
+ s #1 "{vv~}{ll}" format.name$
+ { namesleft #0 > }
+ { nameptr numnames =
+ { s nameptr "{ff }{vv }{ll}{ jj}" format.name$ "others" =
+ { " et~al." * }
+ { " and " * s nameptr "{vv~}{ll}" format.name$ * }
+ if$
+ }
+ { ", " * s nameptr "{vv~}{ll}" format.name$ * }
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+ }
+ if$
+}
+FUNCTION {author.key.label}
+{ author empty$
+ { key empty$
+ { "no key, author in " cite$ * warning$
+ cite$ #1 #3 substring$ }
+ 'key
+ if$
+ }
+ { author format.lab.names }
+ if$
+}
+FUNCTION {editor.key.label}
+{ editor empty$
+ { key empty$
+ { "no key, editor in " cite$ * warning$
+ cite$ #1 #3 substring$ }
+ 'key
+ if$
+ }
+ { editor format.lab.names }
+ if$
+}
+FUNCTION {author.key.organization.label}
+%
+% added - gnp. Provide label formatting by organization if author is null.
+%
+{ author empty$
+ { organization empty$
+ { key empty$
+ { "no key, author or organization in " cite$ * warning$
+ cite$ #1 #3 substring$ }
+ 'key
+ if$
+ }
+ { organization }
+ if$
+ }
+ { author format.lab.names }
+ if$
+}
+FUNCTION {editor.key.organization.label}
+%
+% added - gnp. Provide label formatting by organization if editor is null.
+%
+{ editor empty$
+ { organization empty$
+ { key empty$
+ { "no key, editor or organization in " cite$ * warning$
+ cite$ #1 #3 substring$ }
+ 'key
+ if$
+ }
+ { organization }
+ if$
+ }
+ { editor format.lab.names }
+ if$
+}
+FUNCTION {author.editor.key.label}
+{ author empty$
+ { editor empty$
+ { key empty$
+ { "no key, author, or editor in " cite$ * warning$
+ cite$ #1 #3 substring$ }
+ 'key
+ if$
+ }
+ { editor format.lab.names }
+ if$
+ }
+ { author format.lab.names }
+ if$
+}
+FUNCTION {calc.label}
+%
+% Changed - GNP. See also author.organization.sort, editor.organization.sort
+% Form label for BibTeX entry. The classification of which fields are used
+% for which type of entry (book, inbook, etc.) are taken from alpha.bst.
+% The change here from newapa is to also include organization as a
+% citation label if author or editor is missing.
+%
+{ type$ "book" =
+ type$ "inbook" =
+ or
+ 'author.editor.key.label
+ { type$ "proceedings" =
+ 'editor.key.organization.label
+ { type$ "manual" =
+ 'author.key.organization.label
+ 'author.key.label
+ if$
+ }
+ if$
+ }
+ if$
+ author empty$ % generate the full label citation information.
+ { editor empty$
+ { organization empty$
+ { "no author, editor, or organization in " cite$ * warning$
+ "??" }
+ { organization }
+ if$
+ }
+ { editor my.full.label }
+ if$
+ }
+ { author my.full.label }
+ if$
+% leave label on the stack, to be popped when required.
+ "}{" * swap$ * "}{" *
+% year field.or.null purify$ #-1 #4 substring$ *
+%
+% save the year for sort processing afterwards (adding a, b, c, etc.)
+%
+ year field.or.null purify$ #-1 #4 substring$
+ 'label.year :=
+}
+FUNCTION {output.bibitem}
+{ newline$
+ "\bibitem[\protect\citeauthoryear{" write$
+ calc.label write$
+ sort.year write$
+ "}]{" write$
+ cite$ write$
+ "}" write$
+ newline$
+ ""
+ before.all 'output.state :=
+}
+%
+% changes to article:
+% format.title to format.title.article
+FUNCTION {article}
+{ output.bibitem
+ format.authors
+ "author" output.check
+ author format.key output % from chicago
+ new.block
+ format.title.article
+ "title" output.check
+ putnodot
+ note empty$
+ {}
+ { note output
+ new.block
+ }
+ if$
+% Added from chicago:
+ crossref missing$
+ { journal emphasize "journal" output.check
+ putnodot
+ }
+ { format.article.crossref output.nonnull
+ format.pages output
+ }
+ if$
+ format.vol.num.pages output
+ new.block
+ comment output
+ fin.entry
+}
+FUNCTION {book}
+{ output.bibitem
+ author empty$
+ { format.editors "editor" output.check
+ new.block
+ crossref missing$
+ { format.btitle "title" output.check }
+ { format.book.crossref output.nonnull }
+ if$
+ }
+ { format.authors output.nonnull
+ new.block
+ crossref missing$
+ { format.btitle "title" output.check }
+ { format.book.crossref output.nonnull }
+ if$
+ new.block
+ format.editors.alt output
+ }
+ if$
+ new.block
+ note output
+ new.block
+ format.edition output
+ new.block
+ format.bvolume output
+ new.block
+ format.publishing "address and publisher" output.check
+ format.date "year" output.check
+ new.block
+ comment output
+ fin.entry
+}
+FUNCTION {booklet}
+{ output.bibitem
+ format.authors output
+ author format.key output %from chicago
+ new.block
+ format.title "title" output.check
+ new.block
+ howpublished address new.block.checkb
+ howpublished output
+ address output
+ format.date output
+ note output
+ new.block
+ comment output
+ fin.entry
+}
+FUNCTION {inbook}
+{ output.bibitem
+ author empty$
+ { format.editors "author and editor" output.check }
+ { format.authors output.nonnull
+ crossref missing$
+ { "author and editor" editor either.or.check }
+ 'skip$
+ if$
+ }
+ if$
+ new.block
+ format.chapter.inbook output
+ putnodot
+ format.btitle
+ "title" output.check
+ crossref missing$
+ { format.edition output
+ new.block
+ format.bvolume output
+ new.block
+ format.publishing "address and publisher" output.check
+ }
+ { format.chapter.pages "chapter and pages" output.check
+ new.block
+ format.book.crossref output.nonnull
+ }
+ if$
+ new.block
+ note output
+ format.date "year" output.check
+ comment output
+ new.block
+ format.pages output
+ fin.entry
+}
+FUNCTION {incollection}
+{ output.bibitem
+ format.authors
+ "author" output.check
+ author format.key output %from chicago
+ new.block
+ format.title.article
+ "title" output.check
+ putnodot
+ crossref missing$
+ {format.in.ed.booktitle
+ "booktitle" output.check
+ new.block
+ format.edition output
+ new.block
+ note output
+ format.bvolume output
+ new.block
+ format.publishing "address and publisher" output.check
+ format.date output
+ new.block
+ format.chapter.pages output
+ }
+ { format.incoll.inproc.crossref
+ output.nonnull
+ format.date output
+ new.block
+ format.chapter.pages output
+ }
+ if$
+ new.block
+ comment output
+ fin.entry
+}
+FUNCTION {inproceedings}
+{ output.bibitem
+ format.authors
+ "author" output.check
+ author format.key output %chicago
+ new.block
+ format.title.article
+ "title" output.check
+ putnodot
+ crossref missing$
+ { format.in.ed.booktitle "booktitle" output.check
+% organization missing$
+% {}
+% {" Proceedings of " organization * output}
+% if$
+ new.block
+ putnodot
+ note output
+ format.publishing "address and publisher" output.check
+ }
+ { format.incoll.inproc.crossref output.nonnull}
+ if$
+ format.date "year" output.check
+ format.pages output
+ new.block
+ comment output
+ fin.entry
+}
+FUNCTION {conference} { inproceedings }
+FUNCTION {manual}
+{ output.bibitem
+ author empty$
+ { organization empty$
+ 'skip$
+ { organization output.nonnull
+ address output
+ }
+ if$
+ }
+ { format.authors output.nonnull }
+ if$
+ new.block
+ format.btitle "title" output.check
+ author empty$
+ { organization empty$
+ { address new.block.checka
+ address output
+ }
+ 'skip$
+ if$
+ }
+ { organization address new.block.checkb
+ organization output
+ address output
+ }
+ if$
+ format.edition output
+ format.date output
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {mastersthesis}
+{ output.bibitem
+ format.authors
+ "author" output.check
+ author format.key output
+ new.block
+ format.title
+ "title" output.check
+ new.block
+ "Master's thesis" format.thesis.type output.nonnull
+ school "school" output.check
+ address output
+ format.date "year" output.check
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {misc}
+{ output.bibitem
+ format.authors
+ "author" output.check
+ author format.key output
+ new.block
+ format.title.article
+ "title" output.check
+ putnodot
+ journal emphasize
+ "journal" output.check
+ putnodot
+ format.vol.num.pages.mag output
+ new.block
+ note output
+ new.block
+ comment output
+ fin.entry
+}
+FUNCTION {phdthesis}
+{ output.bibitem
+ format.authors
+ "author" output.check
+ author format.key output
+ new.block
+ format.btitle
+ "title" output.check
+ new.block
+ "PhD thesis" format.thesis.type output.nonnull
+ school "school" output.check
+ address output
+ format.date "year" output.check
+ new.block
+ note output
+ fin.entry
+}
+FUNCTION {proceedings}
+{ output.bibitem
+ editor empty$
+ { organization output
+ organization format.key output }
+ { format.editors output.nonnull }
+ if$
+ new.block
+ format.btitle
+ "title" output.check
+ note output
+ format.publishing
+ "address and publisher" output.check
+ format.date
+ "year" output.check
+ format.bvolume output
+ format.number.series output
+ new.block
+ comment output
+ fin.entry
+}
+FUNCTION {techreport}
+{ output.bibitem
+ format.authors
+ "author" output.check
+ author format.key output
+ new.block
+ format.title
+ "title" output.check
+ new.block
+ format.tr.number output.nonnull
+ institution
+ "institution" output.check
+ address output
+ format.date
+ "year" output.check
+ new.block
+ note output
+ fin.entry
+}
+FUNCTION {unpublished}
+{ output.bibitem
+ format.authors
+ "author" output.check
+ author format.key output
+ new.block
+ format.title
+ "title" output.check
+ new.block
+ note "note" output.check
+ format.date output
+ new.block
+ comment output
+ fin.entry
+}
+FUNCTION {default.type} { book }
+MACRO {jan} {"January"}
+MACRO {feb} {"February"}
+MACRO {mar} {"March"}
+MACRO {apr} {"April"}
+MACRO {may} {"May"}
+MACRO {jun} {"June"}
+MACRO {jul} {"July"}
+MACRO {aug} {"August"}
+MACRO {sep} {"September"}
+MACRO {oct} {"October"}
+MACRO {nov} {"November"}
+MACRO {dec} {"December"}
+READ
+FUNCTION {sortify}
+{ purify$
+ "l" change.case$
+}
+INTEGERS { len }
+FUNCTION {chop.word}
+{ 's :=
+ 'len :=
+ s #1 len substring$ =
+ { s len #1 + global.max$ substring$ }
+ 's
+ if$
+}
+
+FUNCTION {sort.format.names}
+{ 's :=
+ #1 'nameptr :=
+ ""
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ { nameptr #1 >
+ { " " * }
+ 'skip$
+ if$
+ s nameptr "{vv{ } }{ll{ }}{ ff{ }}{ jj{ }}" format.name$ 't :=
+ nameptr numnames = t "others" = and
+ { "et al" * }
+ { t sortify * }
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+}
+FUNCTION {sort.format.title}
+{ 't :=
+ "A " #2
+ "An " #3
+ "The " #4 t chop.word
+ chop.word
+ chop.word
+ sortify
+ #1 global.max$ substring$
+}
+FUNCTION {author.sort}
+{ author empty$
+ { key empty$
+ { "to sort, need author or key in " cite$ * warning$
+ "" }
+ { key sortify }
+ if$
+ }
+ { author sort.format.names }
+ if$
+}
+FUNCTION {editor.sort}
+{ editor empty$
+ { key empty$
+ { "to sort, need editor or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { editor sort.format.names }
+ if$
+}
+FUNCTION {author.editor.sort}
+{ author empty$
+ { "missing author in " cite$ * warning$
+ editor empty$
+ { key empty$
+ { "to sort, need author, editor, or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { editor sort.format.names }
+ if$
+ }
+ { author sort.format.names }
+ if$
+}
+FUNCTION {author.organization.sort}
+{ author empty$
+ { organization empty$
+ { key empty$
+ { "to sort, need author, organization, or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { "The " #4 organization chop.word sortify }
+ if$
+ }
+ { author sort.format.names }
+ if$
+}
+FUNCTION {editor.organization.sort}
+{ editor empty$
+ { organization empty$
+ { key empty$
+ { "to sort, need editor, organization, or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { "The " #4 organization chop.word sortify }
+ if$
+ }
+ { editor sort.format.names }
+ if$
+}
+FUNCTION {presort}
+% added first 4 lines from chicago for labels:
+{ calc.label sortify % recalculate bibitem label
+ year field.or.null purify$ #-1 #4 substring$ * % add year
+ " "
+ *
+ type$ "book" =
+ type$ "inbook" =
+ or
+ 'author.editor.sort
+ { type$ "proceedings" =
+ 'editor.organization.sort
+ { type$ "manual" =
+ 'author.organization.sort
+ 'author.sort
+ if$
+ }
+ if$
+ }
+ if$
+ #1 entry.max$ substring$ % added for newapa
+ 'sort.label := % added for newapa
+ sort.label % added for newapa
+ *
+ " "
+ *
+ title field.or.null
+ sort.format.title
+ *
+ #1 entry.max$ substring$
+ 'sort.key$ :=
+}
+ITERATE {presort}
+% replace entire sort procedure with the one from chicago:
+SORT % by label, year, author/editor, title
+STRINGS { last.label next.extra }
+INTEGERS { last.extra.num }
+FUNCTION {initialize.extra.label.stuff}
+{ #0 int.to.chr$ 'last.label :=
+ "" 'next.extra :=
+ #0 'last.extra.num :=
+}
+FUNCTION {forward.pass}
+%
+% Pass through all entries, comparing current entry to last one.
+% Need to concatenate year to the stack (done by calc.label) to determine
+% if two entries are the same (see presort)
+%
+{ last.label
+ calc.label year field.or.null purify$ #-1 #4 substring$ * % add year
+ #1 entry.max$ substring$ = % are they equal?
+ { last.extra.num #1 + 'last.extra.num :=
+ last.extra.num int.to.chr$ 'extra.label :=
+ }
+ { "a" chr.to.int$ 'last.extra.num :=
+ "" 'extra.label :=
+ calc.label year field.or.null purify$ #-1 #4 substring$ * % add year
+ #1 entry.max$ substring$ 'last.label := % assign to last.label
+ }
+ if$
+}
+FUNCTION {reverse.pass}
+{ next.extra "b" =
+ { "a" 'extra.label := }
+ 'skip$
+ if$
+ label.year extra.label * 'sort.year :=
+ extra.label 'next.extra :=
+}
+EXECUTE {initialize.extra.label.stuff}
+ITERATE {forward.pass}
+REVERSE {reverse.pass}
+FUNCTION {bib.sort.order}
+{ sort.label
+ " "
+ *
+ year field.or.null sortify
+ *
+ " "
+ *
+ title field.or.null
+ sort.format.title
+ *
+ #1 entry.max$ substring$
+ 'sort.key$ :=
+}
+ITERATE {bib.sort.order}
+SORT % by sort.label, year, title --- giving final bib. order.
+
+FUNCTION {begin.bib}
+{ preamble$ empty$
+ 'skip$
+ { preamble$ write$ newline$ }
+ if$
+ "\begin{thebibliography}{}" write$ newline$
+}
+
+EXECUTE {begin.bib}
+EXECUTE {init.state.consts}
+ITERATE {call.type$}
+FUNCTION {end.bib}
+{ newline$
+ "\end{thebibliography}" write$ newline$
+}
+EXECUTE {end.bib}
diff --git a/biblio/bibtex/contrib/mla/mla.sty b/biblio/bibtex/contrib/mla/mla.sty
new file mode 100644
index 0000000000..7122a508c0
--- /dev/null
+++ b/biblio/bibtex/contrib/mla/mla.sty
@@ -0,0 +1,292 @@
+% Latex style file MLA for use with MLA.bst
+% taken completely from the file chicago.sty and
+% modified slightly as documented.
+% 3/25/97 added functions for the MLAnnote.BST Annotated bibliography
+% Thomas_Weissert@irwins.pvt.k12.pa.us on 10/22/95
+%%% ====================================================================
+%%% @LaTeX-style-file{
+%%% author = "Glenn Paulley",
+%%% version = "4",
+%%% date = "31 August 1992",
+%%% time = "09:42:44 199",
+%%% filename = "chicago.sty",
+%%% address = "Data Structuring Group
+%%% Department of Computer Science
+%%% University of Waterloo
+%%% Waterloo, Ontario, Canada
+%%% N2L 3G1",
+%%% telephone = "(519) 885-1211",
+%%% FAX = "(519) 885-1208",
+%%% checksum = "44674 264 1050 10394",
+%%% email = "gnpaulle@bluebox.uwaterloo.ca",
+%%% codetable = "ISO/ASCII",
+%%% keywords = "",
+%%% supported = "yes",
+%%% abstract = "Contains the LaTeX style command definitions
+%%% for the Chicago BibTeX styles chicago.bst and
+%%% chicagoa.bst. For details, see below.",
+%%% docstring = "The checksum field above contains a CRC-16
+%%% checksum as the first value, followed by the
+%%% equivalent of the standard UNIX wc (word
+%%% count) utility output of lines, words, and
+%%% characters. This is produced by Robert
+%%% Solovay's checksum utility.",
+%%% }
+%%% ====================================================================
+%
+% chicago.sty: Style file for use with bibtex style chicago.bst, for
+% bibliographies formatted according to the 13th Edition of the Chicago
+% Manual of Style.
+%
+% 'newapa.bst' was made from 'plain.bst', 'named.bst', and 'apalike.bst',
+% with lots of tweaking to make it look like APA style, along with tips
+% from Young Ryu and Brian Reiser's modifications of 'apalike.bst'.
+% newapa.sty formed the basis of this style, chicago.sty. Author-date
+% references in newapa.bst formed the basis for chicago.bst. Chicagoa.bst
+% supports annotations.
+%
+% Version 4 (August, 1992):
+% - fixed chicago.bst and chicagoa.bst to handle long author lists in
+% sorting
+% - fixed chicago.bst and chicagoa.bst so that missing page numbers in
+% ``article'' entries are handled correctly
+% - modified chicago.sty to format entries with 2nd and subsequent lines
+% indented.
+%
+% Citation format: (author-last-name year)
+% (author-last-name and author-last-name year)
+% (author-last-name et al. year)
+% (author-last-name)
+% author-last-name
+% author-last-name (year)
+% (author-last-name and author-last-name)
+% (author-last-name et al.)
+% (year) or (year,year)
+% year or year,year
+%
+% Reference list ordering: alphabetical by author or whatever passes
+% for author in the absence of one.
+%
+% This BibTeX style has support for abbreviated author lists and for
+% year-only citations. This is done by having the citations
+% actually look like
+%
+% \citeauthoryear{full-author-info}{abbrev-author-info}{year}
+%
+% The LaTeX style has to have the following (or similar)
+%
+% \let\@internalcite\cite
+% \def\fullcite{\def\citeauthoryear##1##2##3{##1, ##3}\@internalcite}
+% \def\fullciteA{\def\citeauthoryear##1##2##3{##1}\@internalcite}
+% \def\shortcite{\def\citeauthoryear##1##2##3{##2, ##3}\@internalcite}
+% \def\shortciteA{\def\citeauthoryear##1##2##3{##2}\@internalcite}
+% \def\citeyear{\def\citeauthoryear##1##2##3{##3}\@internalcite}
+%
+% -------------------------------------------------------------------------
+% This file implements citations for the ``chicago'' bibliography style.
+% Place it in a file called chicago.sty in the TeX search path.
+%(Placing it in the same directory as the LaTeX document should also work.)
+%
+% This file is a modification of the ``newapa'' LaTeX style,
+% originally adapted by Steven Spencer from the ``apalike'' LaTeX style.
+% It was originally modified by Stephen N. Spencer, with further
+% modifications by Young U. Ryu.
+%
+% The ``chicago'' BibTeX bibliography style creates citations with labels:
+% \citeauthoryear{author-info}{abbrev. author-info}{year}
+%
+% These labels are processed by the following LaTeX commands:
+%
+% \cite{key}
+% which produces citations with full author list and year.
+% eg. (Brown 1978; Jarke, Turner, Stohl, et al. 1985)
+% \citeNP{key}
+% which produces citations with full author list and year, but without
+% enclosing parentheses:
+% eg. Brown 1978; Jarke, Turner and Stohl 1985
+% \citeA{key}
+% which produces citations with only the full author list.
+% eg. (Brown; Jarke, Turner and Stohl)
+% \citeANP{key}
+% which produces citations with only the full author list, without
+% parentheses eg. Brown; Jarke, Turner and Stohl
+% \citeN{key}
+% which produces citations with the full author list and year, but
+% can be used as nouns in a sentence; no parentheses appear around
+% the author names, but only around the year.
+% eg. Shneiderman (1978) states that......
+% \citeN should only be used for a single citation.
+% \shortcite{key}
+% which produces citations with abbreviated author list and year.
+% \shortciteNP{key}
+% which produces citations with abbreviated author list and year.
+% \shortciteA{key}
+% which produces only the abbreviated author list.
+% \shortciteANP{key}
+% which produces only the abbreviated author list.
+% \shortciteN{key}
+% which produces the abbreviated author list and year, with only the
+% year in parentheses. Use with only one citation.
+% \citeyear{key}
+% which produces the year information only, within parentheses.
+% \citeyearNP{key}
+% which produces the year information only.
+%
+% Abbreviated author lists use the ``et al.'' construct.
+%
+% `NP' means `no parentheses'.
+%
+% This LaTeX style file must be used with the ``chicago'' or ``chicagoa''
+% (annotated chicago style) BibTeX styles.
+%
+\typeout{Using MLA Manual of Style bibliography: 23 MAR 1997}
+% any definitions or changes are so marked as MLA
+% The bibliography in MLA Style is called "Works Cited"
+% new commands are defined at the end:
+%
+% \workscited{bibfile}{style}{nocite}
+% bibfile is the bibfile.bib
+% style is the style.bst file: either MLA or MLAA (annotated)
+% nocite is the list of keys or * to issue nocite commands
+%
+% -------------------------------------------------------------------------
+%
+% Citation macros.
+%
+\let\@internalcite\cite
+%
+\def\cite{\def\@citeseppen{-1000}%
+ \def\@cite##1##2{(##1\if@tempswa , ##2\fi)}%
+ \def\citeauthoryear##1##2##3{##1 ##3}\@internalcite}
+\def\citeNP{\def\@citeseppen{-1000}%
+ \def\@cite##1##2{##1\if@tempswa , ##2\fi}%
+ \def\citeauthoryear##1##2##3{##1 ##3}\@internalcite}
+\def\citeN{\def\@citeseppen{-1000}%
+ \def\@cite##1##2{##1\if@tempswa , ##2)\else{)}\fi}%
+ \def\citeauthoryear##1##2##3{##1 (##3}\@citedata}
+\def\citeA{\def\@citeseppen{-1000}%
+ \def\@cite##1##2{(##1\if@tempswa , ##2\fi)}%
+ \def\citeauthoryear##1##2##3{##1}\@internalcite}
+\def\citeANP{\def\@citeseppen{-1000}%
+ \def\@cite##1##2{##1\if@tempswa , ##2\fi}%
+ \def\citeauthoryear##1##2##3{##1}\@internalcite}
+%
+\def\shortcite{\def\@citeseppen{-1000}%
+ \def\@cite##1##2{(##1\if@tempswa , ##2\fi)}%
+ \def\citeauthoryear##1##2##3{##2 ##3}\@internalcite}
+\def\shortciteNP{\def\@citeseppen{-1000}%
+ \def\@cite##1##2{##1\if@tempswa , ##2\fi}%
+ \def\citeauthoryear##1##2##3{##2 ##3}\@internalcite}
+\def\shortciteN{\def\@citeseppen{-1000}%
+ \def\@cite##1##2{##1\if@tempswa , ##2)\else{)}\fi}%
+ \def\citeauthoryear##1##2##3{##2 (##3}\@citedata}
+\def\shortciteA{\def\@citeseppen{-1000}%
+ \def\@cite##1##2{(##1\if@tempswa , ##2\fi)}%
+ \def\citeauthoryear##1##2##3{##2}\@internalcite}
+\def\shortciteANP{\def\@citeseppen{-1000}%
+ \def\@cite##1##2{##1\if@tempswa , ##2\fi}%
+ \def\citeauthoryear##1##2##3{##2}\@internalcite}
+%
+\def\citeyear{\def\@citeseppen{-1000}%
+ \def\@cite##1##2{(##1\if@tempswa , ##2\fi)}%
+ \def\citeauthoryear##1##2##3{##3}\@citedata}
+\def\citeyearNP{\def\@citeseppen{-1000}%
+ \def\@cite##1##2{##1\if@tempswa , ##2\fi}%
+ \def\citeauthoryear##1##2##3{##3}\@citedata}
+%
+% \@citedata and \@citedatax:
+%
+% Place commas in-between citations in the same \citeyear, \citeyearNP,
+% \citeN, or \shortciteN command.
+% Use something like \citeN{ref1,ref2,ref3} and \citeN{ref4} for a list.
+%
+\def\@citedata{%
+ \@ifnextchar [{\@tempswatrue\@citedatax}%
+ {\@tempswafalse\@citedatax[]}%
+}
+\def\@citedatax[#1]#2{%
+\if@filesw\immediate\write\@auxout{\string\citation{#2}}\fi%
+ \def\@citea{}\@cite{\@for\@citeb:=#2\do%
+ {\@citea\def\@citea{, }\@ifundefined% by Young
+ {b@\@citeb}{{\bf ?}%
+ \@warning{Citation `\@citeb' on page \thepage \space undefined}}%
+{\csname b@\@citeb\endcsname}}}{#1}}%
+% don't box citations, separate with ; and a space
+% also, make the penalty between citations negative: a good place to break.
+%
+\def\@citex[#1]#2{%
+\if@filesw\immediate\write\@auxout{\string\citation{#2}}\fi%
+ \def\@citea{}\@cite{\@for\@citeb:=#2\do%
+ {\@citea\def\@citea{; }\@ifundefined% by Young
+ {b@\@citeb}{{\bf ?}%
+ \@warning{Citation `\@citeb' on page \thepage \space undefined}}%
+{\csname b@\@citeb\endcsname}}}{#1}}%
+% (from apalike.sty)
+% No labels in the bibliography.
+%
+\def\@biblabel#1{}
+% (from apalike.sty)
+% Set length of hanging indentation for bibliography entries.
+%
+\newlength{\bibhang}
+\setlength{\bibhang}{2em}
+% Indent second and subsequent lines of bibliographic entries. Stolen
+% from openbib.sty: \newblock is set to {}.
+\newdimen\bibindent
+\bibindent=1.5em
+\@ifundefined{refname}%
+ {\@ifundefined{chapter}%
+ {\newcommand{\refname}{References}}%
+ {\newcommand{\refname}{Bibliography}}%
+ }%
+ {}%
+\@ifundefined{chapter}%
+ {\def\thebibliography#1{\section*{\refname\@mkboth
+ {\uppercase{\refname}}{\uppercase{\refname}}}\list
+ {[\arabic{enumi}]}{\settowidth\labelwidth{[#1]}
+ \leftmargin\labelwidth
+ \advance\leftmargin\labelsep
+ \advance\leftmargin\bibindent
+ \itemindent -\bibindent
+ \listparindent \itemindent
+ \parsep \z@
+ \usecounter{enumi}}
+ \def\newblock{}
+ \sloppy
+ \sfcode`\.=1000\relax}}
+ {\def\thebibliography#1{\chapter*{\refname\@mkboth
+ {\uppercase{\refname}}{\uppercase{\refname}}}\list
+ {[\arabic{enumi}]}{\settowidth\labelwidth{[#1]}
+ \leftmargin\labelwidth
+ \advance\leftmargin\labelsep
+ \advance\leftmargin\bibindent
+ \itemindent -\bibindent
+ \listparindent \itemindent
+ \parsep \z@
+ \usecounter{enumi}}
+ \def\newblock{}
+ \sloppy
+ \sfcode`\.=1000\relax}}
+%
+% any new definitions for MLA are below
+%
+\ifx\chapter\@undefined%
+ \renewcommand{\bibname}{Works Cited}% report style
+\else
+ \renewcommand{\refname}{Works Cited}% Article style
+\fi
+% Define the command \workscited{bib}{style}{nocite}
+\newcommand{\workscited}[3]{%
+ \ifx\chapter\@undefined%
+ \addcontentsline{toc}{chapter}{\bfseries\bibname}% report style
+ \else
+ \addcontentsline{toc}{section}{\bfseries\refname}% Article style
+ \fi
+ \bibliography{#1}\bibliographystyle{#2}\nocite{#3}}
+%
+% defined the following for the annotated bibliography style
+\newcommand{\annote}[1]{\begin{list}{}{%
+ \setlength{\labelwidth}{0pt}
+ \addtolength{\leftmargin}{\parindent}
+ \setlength{\labelsep}{0pt}}%
+ \item #1 \end{list}}
diff --git a/biblio/bibtex/contrib/mla/mlaa.bst b/biblio/bibtex/contrib/mla/mlaa.bst
new file mode 100644
index 0000000000..3a6db32cf4
--- /dev/null
+++ b/biblio/bibtex/contrib/mla/mlaa.bst
@@ -0,0 +1,1563 @@
+% BibTeX bibliography style `MLAA' to conform to the MLA stylesheet
+% for annotated bibliography. Created on 3/23/97 from MLA.bst
+% adds two new bibtex fields called ANNOTATION and ANNOTE
+% to be compatible with chicago ANNOTATION is looked for first,
+% then ANNOTE is used if the other is absent.
+% by Thomas_Weissert@irwins.pvt.k12.pa.us
+%
+% 3/23/97 minor changes to @inproceedings
+% modified on 10/21/95 copied much of the tricks of chicago.bst
+% now need use use chicago.sty when using this bibstyle
+% modified on 3/13/94 converted note3 to "comment" field
+% Modified from BibTeX standard bibliography style `plain' by Tom Weissert
+% BibTeX standard bibliography style `plain'
+ % version 0.99a for BibTeX versions 0.99a or later, LaTeX version 2.09.
+ % Copyright (C) 1985, all rights reserved.
+ % Copying of this file is authorized only if either
+ % (1) you make absolutely no changes to your copy, including name, or
+ % (2) if you do make changes, you name it something other than
+ % btxbst.doc, plain.bst, unsrt.bst, alpha.bst, and abbrv.bst.
+ % This restriction helps ensure that all standard styles are identical.
+ % The file btxbst.doc has the documentation for this style.
+% The following text is the header for chicago.bst:
+% "Chicago" BibTeX style, chicago.bst
+% ===================================
+%
+% BibTeX `chicago' style file for BibTeX version 0.99c, LaTeX version 2.09
+% Place it in a file called chicago.bst in the BibTeX search path.
+% You need to include chicago.sty as a \documentstyle option.
+% (Placing it in the same directory as the LaTeX document should also work.)
+% This "chicago" style is based on newapa.bst (American Psych. Assoc.)
+% found at ymir.claremont.edu.
+%
+% Citation format: (author-last-name year)
+% (author-last-name and author-last-name year)
+% (author-last-name, author-last-name, and author-last-name year)
+% (author-last-name et al. year)
+% (author-last-name)
+% author-last-name (year)
+% (author-last-name and author-last-name)
+% (author-last-name et al.)
+% (year) or (year,year)
+% year or year,year
+%
+% Reference list ordering: alphabetical by author or whatever passes
+% for author in the absence of one.
+%
+% This BibTeX style has support for abbreviated author lists and for
+% year-only citations. This is done by having the citations
+% actually look like
+%
+% \citeauthoryear{full-author-info}{abbrev-author-info}{year}
+%
+% The LaTeX style has to have the following (or similar)
+%
+% \let\@internalcite\cite
+% \def\fullcite{\def\citeauthoryear##1##2##3{##1, ##3}\@internalcite}
+% \def\fullciteA{\def\citeauthoryear##1##2##3{##1}\@internalcite}
+% \def\shortcite{\def\citeauthoryear##1##2##3{##2, ##3}\@internalcite}
+% \def\shortciteA{\def\citeauthoryear##1##2##3{##2}\@internalcite}
+% \def\citeyear{\def\citeauthoryear##1##2##3{##3}\@internalcite}
+%
+% These TeX macro definitions are found in chicago.sty. Additional
+% commands to manipulate different components of a citation can be defined
+% so that, for example, you can list author's names without parentheses
+% if using a citation as a noun or object in a sentence.
+%
+% This file was originally copied from newapa.bst at ymir.claremont.edu.
+%
+% Features of chicago.bst:
+% =======================
+%
+% - full names used in citations, but abbreviated citations are available
+% (see above)
+% - if an entry has a "month", then the month and year are also printed
+% as part of that bibitem.
+% - all conjunctions use "and" instead of "\&"
+% - major modification from Chicago Manual of Style (13th ed.) is that
+% only the first author in a reference appears last name first-
+% additional authors appear as J. Q. Public.
+% - pages are listed as "pp. xx-xx" in all entry types except
+% article entries.
+% - book, inbook, and manual use "location: publisher" (or organization)
+% for address and publisher. All other types list publishers separately.
+% - "pp." are used to identify page numbers for all entry types except
+% articles.
+% - organization is used as a citation label if neither author nor editor
+% is present (for manuals).
+% - "et al." is used for long author and editor lists, or when "others"
+% is used.
+%
+% Modifications and bug fixes from newapa.bst:
+% ===========================================
+%
+% - added month, year to bib entries if month is present
+% - fixed bug with In proceedings, added necessary comma after title
+% - all conjunctions changed to "and" from "\&"
+% - fixed bug with author labels in my.full.label: "et al." now is
+% generated when "others" is an author name
+% - major modification from Chicago Manual of Style (13th ed.) is that
+% only the first author in a reference appears last name first-
+% additional authors appear as J. Q. Public.
+% - pages are listed as "pp. xx-xx" in all entry types except
+% article entries. Unnecessary (IMHO) "()" around page numbers
+% were removed, and page numbers now don't end with a period.
+% - created chicago.sty for use with this bibstyle (required).
+% - fixed bugs in FUNCTION {format.vol.num.pages} for missing volume,
+% number, and /or pages. Renamed to format.jour.vol.
+% - fixed bug in formatting booktitles: additional period an error if
+% book has a volume.
+% - fixed bug: editors usually given redundant period before next clause
+% (format.editors.dot) removed.
+% - added label support for organizations, if both author and editor
+% are missing (from alpha.bst). If organization is too long, then
+% the key field is used for abbreviated citations.
+% - In proceedings or books of several volumes, no comma was written
+% between the "Volume x" and the page numbers (this was intentional
+% in newapa.bst). Fixed.
+% - Some journals may not have volumes/numbers, only month/year (eg.
+% IEEE Computer). Fixed bug in article style that assumed volume/number
+% was always present.
+%
+% Original documentation for newapa.sty:
+% =====================================
+%
+% This version was made by modifying the master file made by
+% Oren Patashnik (PATASHNIK@SCORE.STANFORD.EDU), and the 'named' BibTeX
+% style of Peter F. Patel-Schneider.
+%
+% Copyright (C) 1985, all rights reserved.
+% Copying of this file is authorized only if either
+% (1) you make absolutely no changes to your copy, including name, or
+% (2) if you do make changes, you name it something other than 'newapa.bst'.
+% There are undoubtably bugs in this style. If you make bug fixes,
+% improvements, etc. please let me know. My e-mail address is:
+% spencer@cgrg.ohio.state.edu or 71160.3141@compuserve.com
+%
+% This style was made from 'plain.bst', 'named.bst', and 'apalike.bst',
+% with lots of tweaking to make it look like APA style, along with tips
+% from Young Ryu and Brian Reiser's modifications of 'apalike.bst'.
+%
+%
+ENTRY
+ { address
+ annote
+ annotation
+ author
+ booktitle
+ chapter
+ comment
+ edition
+ editor
+ howpublished
+ institution
+ journal
+ key
+ month
+ note
+ number
+ organization
+ pages
+ publisher
+ school
+ series
+ title
+ type
+ volume
+ year
+ }
+ {}
+% copied labels from Chicago
+ { label.year extra.label sort.year sort.label }
+% added "post.title" to integers
+% just.space to integers
+INTEGERS { output.state before.all mid.sentence after.sentence after.block
+ post.title}
+% added #4 below
+FUNCTION {init.state.consts}
+{ #0 'before.all :=
+ #1 'mid.sentence :=
+ #2 'after.sentence :=
+ #3 'after.block :=
+ #4 'post.title :=
+}
+% added u from chicago:
+% added ann for annotation
+STRINGS { s t u ann}
+% added outer if loop
+FUNCTION {output.nonnull}
+{ 's :=
+ output.state post.title =
+ { " " * write$
+ newline$
+ "\newblock " write$
+ mid.sentence 'output.state :=
+ }
+ { output.state mid.sentence =
+ { ", " * write$ }
+ { output.state after.block =
+ { add.period$ write$
+ newline$
+ "\newblock " write$
+ }
+ { output.state before.all =
+ 'write$
+ { add.period$ " " * write$ }
+ if$
+ }
+ if$
+ mid.sentence 'output.state :=
+ }
+ if$
+ }
+ if$
+ s
+}
+
+FUNCTION {output}
+{ duplicate$ empty$
+ 'pop$
+ 'output.nonnull
+ if$
+}
+% created the following function to put not dot in the output function
+FUNCTION {putnodot}
+{post.title 'output.state :=}
+
+FUNCTION {output.check}
+{ 't :=
+ duplicate$ empty$
+ { pop$ "empty " t * " in " * cite$ * warning$ }
+ 'output.nonnull
+ if$
+}
+% removed original bibitem from here
+% added the chicago version later in file
+%FUNCTION {output.bibitem}
+%{ newline$
+% "\bibitem{" write$
+% cite$ write$
+% "}" write$
+% newline$
+% ""
+% before.all 'output.state :=
+%}
+%
+FUNCTION {fin.entry}
+{ add.period$
+ write$
+ newline$
+}
+FUNCTION {new.block}
+{ output.state before.all =
+ 'skip$
+ { after.block 'output.state := }
+ if$
+}
+FUNCTION {new.sentence}
+{ output.state after.block =
+ 'skip$
+ { output.state before.all =
+ 'skip$
+ { after.sentence 'output.state := }
+ if$
+ }
+ if$
+}
+FUNCTION {not}
+{ { #0 }
+ { #1 }
+ if$
+}
+FUNCTION {and}
+{ 'skip$
+ { pop$ #0 }
+ if$
+}
+FUNCTION {or}
+{ { pop$ #1 }
+ 'skip$
+ if$
+}
+FUNCTION {new.block.checka}
+{ empty$
+ 'skip$
+ 'new.block
+ if$
+}
+FUNCTION {new.block.checkb}
+{ empty$
+ swap$ empty$
+ and
+ 'skip$
+ 'new.block
+ if$
+}
+FUNCTION {new.sentence.checka}
+{ empty$
+ 'skip$
+ 'new.sentence
+ if$
+}
+FUNCTION {new.sentence.checkb}
+{ empty$
+ swap$ empty$
+ and
+ 'skip$
+ 'new.sentence
+ if$
+}
+FUNCTION {field.or.null}
+{ duplicate$ empty$
+ { pop$ "" }
+ 'skip$
+ if$
+}
+FUNCTION {emphasize}
+{ duplicate$ empty$
+ { pop$ "" }
+ { "\emph{" swap$ * "}" * }
+ if$
+}
+% moved format.date function to here for sort
+FUNCTION {format.date}
+{ year empty$
+ { month empty$
+ { "" }
+ { "there's a month but no year in " cite$ * warning$
+ month
+ }
+ if$
+ }
+ { month empty$
+ 'year
+ { month " " * year * }
+ if$
+ }
+ if$
+}
+
+INTEGERS { nameptr namesleft numnames }
+%
+% This new function is a modified version of the old function
+% the old function has been renamed format.names.alt below
+% added if nameptr=1 option and changed format for first
+% author to last name first.
+FUNCTION {format.names}
+{ 's :=
+ #1 'nameptr :=
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ { nameptr #1 =
+ { s nameptr "{ll}{, ff}{vv~}{,jj}" format.name$ 't := }
+ { s nameptr "{ff~}{vv~}{ll}{, jj}" format.name$ 't := }
+ if$
+ nameptr #1 >
+ { namesleft #1 >
+ { ", " * t * }
+ { numnames #2 >
+ { "," * }
+ 'skip$
+ if$
+ t "others" =
+ { " et~al." * }
+ { " and " * t * }
+ if$
+ }
+ if$
+ }
+ 't
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+}
+
+% this is the original format.names function
+FUNCTION {format.names.alt}
+{ 's :=
+ #1 'nameptr :=
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ { s nameptr "{ff~}{vv~}{ll}{, jj}" format.name$ 't :=
+ nameptr #1 >
+ { namesleft #1 >
+ { ", " * t * }
+ { numnames #2 >
+ { "," * }
+ 'skip$
+ if$
+ t "others" =
+ { " et~al." * }
+ { " and " * t * }
+ if$
+ }
+ if$
+ }
+ 't
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+}
+% copied the following two from chicago
+FUNCTION {my.full.label}
+{ 's :=
+ #1 'nameptr := % nameptr = 1;
+ s num.names$ 'numnames := % numnames = num.name$(s);
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ { s nameptr "{vv~}{ll}" format.name$ 't := % get the next name
+ nameptr #1 >
+ { namesleft #1 >
+ { ", " * t * }
+ { numnames #2 >
+ { "," * }
+ 'skip$
+ if$
+ t "others" =
+ { " et~al." * }
+ { " and " * t * } % from Chicago Manual of Style
+ if$
+ }
+ if$
+ }
+ 't
+ if$
+ nameptr #1 + 'nameptr := % nameptr += 1;
+ namesleft #1 - 'namesleft := % namesleft =- 1;
+ }
+ while$
+}
+FUNCTION {format.names.fml}
+%
+% Format names in "familiar" format, with first initial followed by
+% last name. Like format.names, ALL names are formatted.
+%
+{ 's :=
+ #1 'nameptr := % nameptr = 1;
+ s num.names$ 'numnames := % numnames = num.name$(s);
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ { s nameptr "{f.~}{vv~}{ll}{, jj}" format.name$ 't :=
+ nameptr #1 >
+ { namesleft #1 >
+ { ", " * t * }
+ { numnames #2 >
+ { "," * }
+ 'skip$
+ if$
+ t "others" =
+ { " et~al." * }
+ { " and " * t * }
+% { " \& " * t * }
+ if$
+ }
+ if$
+ }
+ 't
+ if$
+ nameptr #1 + 'nameptr := % nameptr += 1;
+ namesleft #1 - 'namesleft := % namesleft =- 1;
+ }
+ while$
+}
+FUNCTION {format.authors}
+{ author empty$
+ { "" }
+ { author format.names }
+ if$
+}
+FUNCTION {format.key}
+{ empty$
+ { key field.or.null }
+ { "" }
+ if$
+}
+FUNCTION {format.editors}
+{ editor empty$
+ { "" }
+ { editor format.names
+ editor num.names$ #1 >
+ { ", editors" * }
+ { ", editor" * }
+ if$
+ }
+ if$
+}
+% from chicago:
+% Format editor names for use in the "in" types: inbook, incollection,
+% inproceedings: first initial, then last names. When editors are the
+% LABEL for an entry, then format.editor is used which lists editors
+% by last name first.
+%
+FUNCTION {format.editors.fml}
+{ editor empty$
+ { "" }
+ { editor format.names.fml
+ editor num.names$ #1 >
+ { " (Eds.)" * }
+ { " (Ed.)" * }
+ if$
+ }
+ if$
+}
+%
+% this new function is a modified version of the original above
+% with the additional use of format.names.alt when the editor
+% is not the first name in the entry.
+FUNCTION {format.editors.alt}
+{ editor empty$
+ { "" }
+ { "Ed. " editor format.names.alt
+ editor num.names$ #1 >
+ { * }
+ { * }
+ if$
+ }
+ if$
+}
+
+% removed change.case$ operation on title
+FUNCTION {format.title}
+{ title empty$
+ { "" }
+ { title }
+% { title "t" change.case$ }
+ if$
+}
+% new function copied from above added quote marks and
+% period inside quotes for articles
+FUNCTION {format.title.article}
+{ title empty$
+ { "" }
+ { "``" title * ".''" * }
+ if$
+}
+% new function copied from above added quote marks and
+% period inside quotes for chapter title in type INBOOK
+FUNCTION {format.chapter.inbook}
+{ chapter empty$
+ { "" }
+ { "``" chapter * ".''" * }
+ if$
+}
+
+
+FUNCTION {n.dashify}
+{ 't :=
+ ""
+ { t empty$ not }
+ { t #1 #1 substring$ "-" =
+ { t #1 #2 substring$ "--" = not
+ { "--" *
+ t #2 global.max$ substring$ 't :=
+ }
+ { { t #1 #1 substring$ "-" = }
+ { "-" *
+ t #2 global.max$ substring$ 't :=
+ }
+ while$
+ }
+ if$
+ }
+ { t #1 #1 substring$ *
+ t #2 global.max$ substring$ 't :=
+ }
+ if$
+ }
+ while$
+}
+% moved format.data function from here
+FUNCTION {format.btitle}
+{ title emphasize }
+
+FUNCTION {tie.or.space.connect}
+{ duplicate$ text.length$ #3 <
+ { "~" }
+ { " " }
+ if$
+ swap$ * *
+}
+FUNCTION {either.or.check}
+{ empty$
+ 'pop$
+ { "can't use both " swap$ * " fields in " * cite$ * warning$ }
+ if$
+}
+FUNCTION {format.bvolume}
+{ volume empty$
+ { series empty$
+ { "" }
+ { series }
+ if$
+ }
+ { "Volume" volume tie.or.space.connect
+ series empty$
+ {" " * }
+ { " of " * series * }
+ if$
+ "volume and number" number either.or.check
+ }
+ if$
+}
+FUNCTION {format.number.series}
+{ volume empty$
+ { number empty$
+ { series field.or.null }
+ { output.state mid.sentence =
+ { "number" }
+ { "Number" }
+ if$
+ number tie.or.space.connect
+ series empty$
+ { "there's a number but no series in " cite$ * warning$ }
+ { " in " * series * }
+ if$
+ }
+ if$
+ }
+ { "" }
+ if$
+}
+FUNCTION {format.edition}
+{ edition empty$
+ { "" }
+ { output.state mid.sentence =
+ { edition "l" change.case$ " edition" * }
+ { edition "t" change.case$ " edition" * }
+ if$
+ }
+ if$
+}
+INTEGERS { multiresult }
+FUNCTION {multi.page.check}
+{ 't :=
+ #0 'multiresult :=
+ { multiresult not
+ t empty$ not
+ and
+ }
+ { t #1 #1 substring$
+ duplicate$ "-" =
+ swap$ duplicate$ "," =
+ swap$ "+" =
+ or or
+ { #1 'multiresult := }
+ { t #2 global.max$ substring$ 't := }
+ if$
+ }
+ while$
+ multiresult
+}
+FUNCTION {format.pages}
+{ pages empty$
+ { "" }
+ { pages multi.page.check
+ { " " pages n.dashify tie.or.space.connect }
+ { " " pages tie.or.space.connect }
+ if$
+ }
+ if$
+}
+% added the if year empty block to below
+FUNCTION {format.vol.num.pages}
+{ volume field.or.null
+ year empty$
+ { month empty$
+ { "" *}
+ { "there's a month but no year in " cite$ * warning$ }
+ if$
+ }
+ { month empty$
+ { " (" year * ")" * * }
+ { " (" month * " " * year * ")" * * }
+ if$
+ }
+ if$
+ pages empty$
+ 'skip$
+ { duplicate$ empty$
+ { pop$ format.pages }
+ { ": " * pages n.dashify * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.vol.num.pages.mag}
+{ volume field.or.null
+ year empty$
+ { month empty$
+ { "" *}
+ { "there's a month but no year in " cite$ * warning$ }
+ if$
+ }
+ { month empty$
+ { " " year " " * * }
+ { " " month * ". " * year * " " * * }
+ if$
+ }
+ if$
+ pages empty$
+ {'skip$}
+ { duplicate$ empty$
+ { pop$ format.pages }
+ { ": " * pages n.dashify * }
+ if$
+ }
+ if$
+}
+FUNCTION {format.chapter.pages}
+{ chapter empty$
+ 'format.pages
+ { type empty$
+ { "chapter" }
+ { type "l" change.case$ }
+ if$
+ chapter tie.or.space.connect
+ pages empty$
+ 'skip$
+ { ", " * format.pages * }
+ if$
+ }
+ if$
+}
+% modified to use format.editors.alt instead of format.editors
+FUNCTION {format.in.ed.booktitle}
+{ booktitle empty$
+ { "" }
+ { editor empty$
+ { " " booktitle emphasize * ". " * }
+ { " " booktitle emphasize * ". " * format.editors.alt * }
+ if$
+ }
+ if$
+}
+FUNCTION {empty.misc.check}
+{ author empty$ title empty$ howpublished empty$
+ month empty$ year empty$ note empty$
+ and and and and and
+ key empty$ not and
+ { "all relevant fields are empty in " cite$ * warning$ }
+ 'skip$
+ if$
+}
+FUNCTION {format.thesis.type}
+{ type empty$
+ 'skip$
+ { pop$
+ type "t" change.case$
+ }
+ if$
+}
+FUNCTION {format.tr.number}
+{ type empty$
+ { "Technical Report" }
+ 'type
+ if$
+ number empty$
+ { "t" change.case$ }
+ { number tie.or.space.connect }
+ if$
+}
+FUNCTION {format.article.crossref}
+{ "See"
+ "\citeN{" * crossref * "}" *
+}
+FUNCTION {format.crossref.editor}
+{ editor #1 "{vv~}{ll}" format.name$
+ editor num.names$ duplicate$
+ #2 >
+ { pop$ " et~al." * }
+ { #2 <
+ 'skip$
+ { editor #2 "{ff }{vv }{ll}{ jj}" format.name$ "others" =
+ { " et~al." * }
+ { " and " * editor #2 "{vv~}{ll}" format.name$ * }
+ if$
+ }
+ if$
+ }
+ if$
+}
+FUNCTION {format.book.crossref}
+{ volume empty$
+ { "empty volume in " cite$ * "'s crossref of " * crossref * warning$
+ "In "
+ }
+ { "Volume" volume tie.or.space.connect
+ " of " *
+ }
+ if$
+ editor empty$
+ editor field.or.null author field.or.null =
+ or
+ { key empty$
+ { series empty$
+ { "need editor, key, or series for " cite$ * " to crossref " *
+ crossref * warning$
+ "" *
+ }
+ { "\emph{" * series * "}" * }
+ if$
+ }
+ { key * }
+ if$
+ }
+ { format.crossref.editor * }
+ if$
+ " \citeN{" * crossref * "}" *
+}
+FUNCTION {format.incoll.inproc.crossref}
+{"See" " \citeN{" * crossref * "}" * }
+%
+% created this function
+FUNCTION {format.publishing}
+{ address empty$
+ {publisher}
+ {address ": " * publisher * }
+ if$
+}
+%
+% Stole the following label generation
+% routines for chicago-like labels in
+% the bbl file:
+FUNCTION {format.lab.names}
+{ 's :=
+ s num.names$ 'numnames :=
+ numnames #2 > % change number to number of others allowed before
+ % forcing "et al".
+ { s #1 "{vv~}{ll}" format.name$ " et~al." * }
+ {
+ numnames #1 - 'namesleft :=
+ #2 'nameptr :=
+ s #1 "{vv~}{ll}" format.name$
+ { namesleft #0 > }
+ { nameptr numnames =
+ { s nameptr "{ff }{vv }{ll}{ jj}" format.name$ "others" =
+ { " et~al." * }
+ { " and " * s nameptr "{vv~}{ll}" format.name$ * }
+ if$
+ }
+ { ", " * s nameptr "{vv~}{ll}" format.name$ * }
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+ }
+ if$
+}
+FUNCTION {author.key.label}
+{ author empty$
+ { key empty$
+ { "no key, author in " cite$ * warning$
+ cite$ #1 #3 substring$ }
+ 'key
+ if$
+ }
+ { author format.lab.names }
+ if$
+}
+FUNCTION {editor.key.label}
+{ editor empty$
+ { key empty$
+ { "no key, editor in " cite$ * warning$
+ cite$ #1 #3 substring$ }
+ 'key
+ if$
+ }
+ { editor format.lab.names }
+ if$
+}
+FUNCTION {author.key.organization.label}
+%
+% added - gnp. Provide label formatting by organization if author is null.
+%
+{ author empty$
+ { organization empty$
+ { key empty$
+ { "no key, author or organization in " cite$ * warning$
+ cite$ #1 #3 substring$ }
+ 'key
+ if$
+ }
+ { organization }
+ if$
+ }
+ { author format.lab.names }
+ if$
+}
+FUNCTION {editor.key.organization.label}
+%
+% added - gnp. Provide label formatting by organization if editor is null.
+%
+{ editor empty$
+ { organization empty$
+ { key empty$
+ { "no key, editor or organization in " cite$ * warning$
+ cite$ #1 #3 substring$ }
+ 'key
+ if$
+ }
+ { organization }
+ if$
+ }
+ { editor format.lab.names }
+ if$
+}
+FUNCTION {author.editor.key.label}
+{ author empty$
+ { editor empty$
+ { key empty$
+ { "no key, author, or editor in " cite$ * warning$
+ cite$ #1 #3 substring$ }
+ 'key
+ if$
+ }
+ { editor format.lab.names }
+ if$
+ }
+ { author format.lab.names }
+ if$
+}
+FUNCTION {calc.label}
+%
+% Changed - GNP. See also author.organization.sort, editor.organization.sort
+% Form label for BibTeX entry. The classification of which fields are used
+% for which type of entry (book, inbook, etc.) are taken from alpha.bst.
+% The change here from newapa is to also include organization as a
+% citation label if author or editor is missing.
+%
+{ type$ "book" =
+ type$ "inbook" =
+ or
+ 'author.editor.key.label
+ { type$ "proceedings" =
+ 'editor.key.organization.label
+ { type$ "manual" =
+ 'author.key.organization.label
+ 'author.key.label
+ if$
+ }
+ if$
+ }
+ if$
+ author empty$ % generate the full label citation information.
+ { editor empty$
+ { organization empty$
+ { "no author, editor, or organization in " cite$ * warning$
+ "??" }
+ { organization }
+ if$
+ }
+ { editor my.full.label }
+ if$
+ }
+ { author my.full.label }
+ if$
+% leave label on the stack, to be popped when required.
+ "}{" * swap$ * "}{" *
+% year field.or.null purify$ #-1 #4 substring$ *
+%
+% save the year for sort processing afterwards (adding a, b, c, etc.)
+%
+ year field.or.null purify$ #-1 #4 substring$
+ 'label.year :=
+}
+FUNCTION {output.bibitem}
+{ newline$
+ "\bibitem[\protect\citeauthoryear{" write$
+ calc.label write$
+ sort.year write$
+ "}]{" write$
+ cite$ write$
+ "}" write$
+ newline$
+ ""
+ before.all 'output.state :=
+}
+FUNCTION {place.annote}
+{annote missing$
+ {annotation missing$
+ {}
+ { "\annote{" annotation * "}" * output putnodot}
+ if$ }
+ { "\annote{" annote * "}" * output putnodot}
+ if$
+}
+%
+% changes to article:
+% format.title to format.title.article
+FUNCTION {article}
+{ output.bibitem
+ format.authors
+ "author" output.check
+ author format.key output % from chicago
+ new.block
+ format.title.article
+ "title" output.check
+ putnodot
+ note empty$
+ {}
+ { note output
+ new.block
+ }
+ if$
+% Added from chicago:
+ crossref missing$
+ { journal emphasize "journal" output.check
+ putnodot
+ }
+ { format.article.crossref output.nonnull
+ format.pages output
+ }
+ if$
+ format.vol.num.pages output
+ new.block
+ comment output
+ place.annote
+ fin.entry
+}
+FUNCTION {book}
+{ output.bibitem
+ author empty$
+ { format.editors "editor" output.check
+ new.block
+ crossref missing$
+ { format.btitle "title" output.check }
+ { format.book.crossref output.nonnull }
+ if$
+ }
+ { format.authors output.nonnull
+ new.block
+ crossref missing$
+ { format.btitle "title" output.check }
+ { format.book.crossref output.nonnull }
+ if$
+ new.block
+ format.editors.alt output
+ }
+ if$
+ new.block
+ note output
+ new.block
+ format.edition output
+ new.block
+ format.bvolume output
+ new.block
+ format.publishing "address and publisher" output.check
+ format.date "year" output.check
+ new.block
+ comment output
+ place.annote
+ fin.entry
+}
+FUNCTION {booklet}
+{ output.bibitem
+ format.authors output
+ author format.key output %from chicago
+ new.block
+ format.title "title" output.check
+ new.block
+ howpublished address new.block.checkb
+ howpublished output
+ address output
+ format.date output
+ note output
+ new.block
+ comment output
+ place.annote
+ fin.entry
+}
+FUNCTION {inbook}
+{ output.bibitem
+ author empty$
+ { format.editors "author and editor" output.check }
+ { format.authors output.nonnull
+ crossref missing$
+ { "author and editor" editor either.or.check }
+ 'skip$
+ if$
+ }
+ if$
+ new.block
+ format.chapter.inbook output
+ putnodot
+ format.btitle
+ "title" output.check
+ crossref missing$
+ { format.edition output
+ new.block
+ format.bvolume output
+ new.block
+ format.publishing "address and publisher" output.check
+ }
+ { format.chapter.pages "chapter and pages" output.check
+ new.block
+ format.book.crossref output.nonnull
+ }
+ if$
+ new.block
+ note output
+ format.date "year" output.check
+ comment output
+ new.block
+ format.pages output
+ place.annote
+ fin.entry
+}
+FUNCTION {incollection}
+{ output.bibitem
+ format.authors
+ "author" output.check
+ author format.key output %from chicago
+ new.block
+ format.title.article
+ "title" output.check
+ putnodot
+ crossref missing$
+ {format.in.ed.booktitle
+ "booktitle" output.check
+ new.block
+ format.edition output
+ new.block
+ note output
+ format.bvolume output
+ new.block
+ format.publishing "address and publisher" output.check
+ format.date output
+ new.block
+ format.chapter.pages output
+ }
+ { format.incoll.inproc.crossref
+ output.nonnull
+ format.date output
+ new.block
+ format.chapter.pages output
+ }
+ if$
+ new.block
+ comment output
+ place.annote
+ fin.entry
+}
+FUNCTION {inproceedings}
+{ output.bibitem
+ format.authors "author" output.check
+ author format.key output %chicago
+ new.block
+ format.title.article "title" output.check
+ putnodot
+ crossref missing$
+ { format.in.ed.booktitle "booktitle" output.check
+% organization missing$
+% {}
+% {" Proceedings of " organization * output }
+% if$
+ new.block
+ putnodot
+ note output
+ format.publishing "address and publisher" output.check
+ }
+ { format.incoll.inproc.crossref output.nonnull}
+ if$
+ format.date "year" output.check
+ format.pages output
+ new.block
+ comment output
+ place.annote
+ fin.entry
+}
+FUNCTION {conference} { inproceedings }
+FUNCTION {manual}
+{ output.bibitem
+ author empty$
+ { organization empty$
+ 'skip$
+ { organization output.nonnull
+ address output
+ }
+ if$
+ }
+ { format.authors output.nonnull }
+ if$
+ new.block
+ format.btitle "title" output.check
+ author empty$
+ { organization empty$
+ { address new.block.checka
+ address output
+ }
+ 'skip$
+ if$
+ }
+ { organization address new.block.checkb
+ organization output
+ address output
+ }
+ if$
+ format.edition output
+ format.date output
+ new.block
+ note output
+ place.annote
+ fin.entry
+}
+
+FUNCTION {mastersthesis}
+{ output.bibitem
+ format.authors
+ "author" output.check
+ author format.key output
+ new.block
+ format.title
+ "title" output.check
+ new.block
+ "Master's thesis" format.thesis.type output.nonnull
+ school "school" output.check
+ address output
+ format.date "year" output.check
+ new.block
+ note output
+ place.annote
+ fin.entry
+}
+
+FUNCTION {misc}
+{ output.bibitem
+ format.authors
+ "author" output.check
+ author format.key output
+ new.block
+ format.title.article
+ "title" output.check
+ putnodot
+ journal emphasize
+ "journal" output.check
+ putnodot
+ format.vol.num.pages.mag output
+ new.block
+ note output
+ new.block
+ comment output
+ place.annote
+ fin.entry
+}
+FUNCTION {phdthesis}
+{ output.bibitem
+ format.authors
+ "author" output.check
+ author format.key output
+ new.block
+ format.btitle
+ "title" output.check
+ new.block
+ "PhD thesis" format.thesis.type output.nonnull
+ school "school" output.check
+ address output
+ format.date "year" output.check
+ new.block
+ note output
+ place.annote
+ fin.entry
+}
+FUNCTION {proceedings}
+{ output.bibitem
+ editor empty$
+ { organization output
+ organization format.key output }
+ { format.editors output.nonnull }
+ if$
+ new.block
+ format.btitle
+ "title" output.check
+ note output
+ format.publishing
+ "address and publisher" output.check
+ format.date
+ "year" output.check
+ format.bvolume output
+ format.number.series output
+ new.block
+ comment output
+ place.annote
+ fin.entry
+}
+FUNCTION {techreport}
+{ output.bibitem
+ format.authors
+ "author" output.check
+ author format.key output
+ new.block
+ format.title
+ "title" output.check
+ new.block
+ format.tr.number output.nonnull
+ institution
+ "institution" output.check
+ address output
+ format.date
+ "year" output.check
+ new.block
+ note output
+ place.annote
+ fin.entry
+}
+FUNCTION {unpublished}
+{ output.bibitem
+ format.authors
+ "author" output.check
+ author format.key output
+ new.block
+ format.title
+ "title" output.check
+ new.block
+ note "note" output.check
+ format.date output
+ new.block
+ comment output
+ place.annote
+ fin.entry
+}
+FUNCTION {default.type} { book }
+MACRO {jan} {"January"}
+MACRO {feb} {"February"}
+MACRO {mar} {"March"}
+MACRO {apr} {"April"}
+MACRO {may} {"May"}
+MACRO {jun} {"June"}
+MACRO {jul} {"July"}
+MACRO {aug} {"August"}
+MACRO {sep} {"September"}
+MACRO {oct} {"October"}
+MACRO {nov} {"November"}
+MACRO {dec} {"December"}
+READ
+FUNCTION {sortify}
+{ purify$
+ "l" change.case$
+}
+INTEGERS { len }
+FUNCTION {chop.word}
+{ 's :=
+ 'len :=
+ s #1 len substring$ =
+ { s len #1 + global.max$ substring$ }
+ 's
+ if$
+}
+
+FUNCTION {sort.format.names}
+{ 's :=
+ #1 'nameptr :=
+ ""
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ { nameptr #1 >
+ { " " * }
+ 'skip$
+ if$
+ s nameptr "{vv{ } }{ll{ }}{ ff{ }}{ jj{ }}" format.name$ 't :=
+ nameptr numnames = t "others" = and
+ { "et al" * }
+ { t sortify * }
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+}
+FUNCTION {sort.format.title}
+{ 't :=
+ "A " #2
+ "An " #3
+ "The " #4 t chop.word
+ chop.word
+ chop.word
+ sortify
+ #1 global.max$ substring$
+}
+FUNCTION {author.sort}
+{ author empty$
+ { key empty$
+ { "to sort, need author or key in " cite$ * warning$
+ "" }
+ { key sortify }
+ if$
+ }
+ { author sort.format.names }
+ if$
+}
+FUNCTION {editor.sort}
+{ editor empty$
+ { key empty$
+ { "to sort, need editor or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { editor sort.format.names }
+ if$
+}
+FUNCTION {author.editor.sort}
+{ author empty$
+ { "missing author in " cite$ * warning$
+ editor empty$
+ { key empty$
+ { "to sort, need author, editor, or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { editor sort.format.names }
+ if$
+ }
+ { author sort.format.names }
+ if$
+}
+FUNCTION {author.organization.sort}
+{ author empty$
+ { organization empty$
+ { key empty$
+ { "to sort, need author, organization, or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { "The " #4 organization chop.word sortify }
+ if$
+ }
+ { author sort.format.names }
+ if$
+}
+FUNCTION {editor.organization.sort}
+{ editor empty$
+ { organization empty$
+ { key empty$
+ { "to sort, need editor, organization, or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { "The " #4 organization chop.word sortify }
+ if$
+ }
+ { editor sort.format.names }
+ if$
+}
+FUNCTION {presort}
+% added first 4 lines from chicago for labels:
+{ calc.label sortify % recalculate bibitem label
+ year field.or.null purify$ #-1 #4 substring$ * % add year
+ " "
+ *
+ type$ "book" =
+ type$ "inbook" =
+ or
+ 'author.editor.sort
+ { type$ "proceedings" =
+ 'editor.organization.sort
+ { type$ "manual" =
+ 'author.organization.sort
+ 'author.sort
+ if$
+ }
+ if$
+ }
+ if$
+ #1 entry.max$ substring$ % added for newapa
+ 'sort.label := % added for newapa
+ sort.label % added for newapa
+ *
+ " "
+ *
+ title field.or.null
+ sort.format.title
+ *
+ #1 entry.max$ substring$
+ 'sort.key$ :=
+}
+ITERATE {presort}
+% replace entire sort procedure with the one from chicago:
+SORT % by label, year, author/editor, title
+STRINGS { last.label next.extra }
+INTEGERS { last.extra.num }
+FUNCTION {initialize.extra.label.stuff}
+{ #0 int.to.chr$ 'last.label :=
+ "" 'next.extra :=
+ #0 'last.extra.num :=
+}
+FUNCTION {forward.pass}
+%
+% Pass through all entries, comparing current entry to last one.
+% Need to concatenate year to the stack (done by calc.label) to determine
+% if two entries are the same (see presort)
+%
+{ last.label
+ calc.label year field.or.null purify$ #-1 #4 substring$ * % add year
+ #1 entry.max$ substring$ = % are they equal?
+ { last.extra.num #1 + 'last.extra.num :=
+ last.extra.num int.to.chr$ 'extra.label :=
+ }
+ { "a" chr.to.int$ 'last.extra.num :=
+ "" 'extra.label :=
+ calc.label year field.or.null purify$ #-1 #4 substring$ * % add year
+ #1 entry.max$ substring$ 'last.label := % assign to last.label
+ }
+ if$
+}
+FUNCTION {reverse.pass}
+{ next.extra "b" =
+ { "a" 'extra.label := }
+ 'skip$
+ if$
+ label.year extra.label * 'sort.year :=
+ extra.label 'next.extra :=
+}
+EXECUTE {initialize.extra.label.stuff}
+ITERATE {forward.pass}
+REVERSE {reverse.pass}
+FUNCTION {bib.sort.order}
+{ sort.label
+ " "
+ *
+ year field.or.null sortify
+ *
+ " "
+ *
+ title field.or.null
+ sort.format.title
+ *
+ #1 entry.max$ substring$
+ 'sort.key$ :=
+}
+ITERATE {bib.sort.order}
+SORT % by sort.label, year, title --- giving final bib. order.
+
+FUNCTION {begin.bib}
+{ preamble$ empty$
+ 'skip$
+ { preamble$ write$ newline$ }
+ if$
+ "\begin{thebibliography}{}" write$ newline$
+}
+
+EXECUTE {begin.bib}
+EXECUTE {init.state.consts}
+ITERATE {call.type$}
+FUNCTION {end.bib}
+{ newline$
+ "\end{thebibliography}" write$ newline$
+}
+EXECUTE {end.bib}
diff --git a/biblio/bibtex/contrib/munich/README b/biblio/bibtex/contrib/munich/README
new file mode 100644
index 0000000000..b04f9046ab
--- /dev/null
+++ b/biblio/bibtex/contrib/munich/README
@@ -0,0 +1,22 @@
+This material is subject to the LaTeX Project Public License.
+See http://www.ctan.org/tex-archive/help/Catalogue/licenses.lppl.html for the details of that license.
+
+****************
+Bibtex style
+munich.bst
+****************
+
+Munich.bst was created as a Bibtex style that complements the existing Bibtex
+styles for name (year) citations. In most cases the popular Harvard Bibtex
+style (http://www.tug.org/tex-archive/help/Catalogue/entries/
+harvard-latex.html) or the Oxford Bibtex style (http://www.tug.org/
+tex-archive/help/Catalogue/entries/oxford.html) lead to good results.
+Yet I found them not entirely suitable to create a bibliography for a German/
+continental Europe academic paper.
+
+If your are looking for an alternative name (year) Bibtex style munich.bst might be just what
+you are looking for.
+
+For examples see example_munich_Bibtex_style.pdf.
+
+ \ No newline at end of file
diff --git a/biblio/bibtex/contrib/munich/documenation_munich_Bibtex_style.pdf b/biblio/bibtex/contrib/munich/documenation_munich_Bibtex_style.pdf
new file mode 100644
index 0000000000..d877fc32f0
--- /dev/null
+++ b/biblio/bibtex/contrib/munich/documenation_munich_Bibtex_style.pdf
Binary files differ
diff --git a/biblio/bibtex/contrib/munich/documenation_munich_Bibtex_style.tex b/biblio/bibtex/contrib/munich/documenation_munich_Bibtex_style.tex
new file mode 100644
index 0000000000..6c0051b606
--- /dev/null
+++ b/biblio/bibtex/contrib/munich/documenation_munich_Bibtex_style.tex
@@ -0,0 +1,88 @@
+
+\documentclass[12pt,a4paper]{article}
+\usepackage[latin1]{inputenc}
+\usepackage[T1]{fontenc}
+\usepackage[ngerman]{babel}
+\usepackage{url}
+\usepackage{parskip}
+
+\title{munich.bst -- A Name (Year) Bibtex Style \newline --Documentation--}
+
+\author{Martin Brixner}
+\date{10. August 2006}
+\begin{document}
+
+\maketitle%
+\newpage%
+\section{Introduction}
+Munich.bst was created as a Bibtex style that complements the existing Bibtex styles for name
+(year) citations. In most cases the popular Harvard Bibtex style
+(\url{http://www.tug.org/tex-archive/help/Catalogue/entries/harvard-latex.html}) or the Oxford
+Bibtex style (\url{http://www.tug.org/tex-archive/help/Catalogue/entries/oxford.html}) lead to good
+results. Yet I found them not entirely suitable to create a bibliography for a German/continental
+Europe academic paper. Namely three aspects were not satisfactory:
+%
+\begin{itemize}
+\item Multiple authors are to be separated with a slash only; no additional spaces should be
+inserted. %
+\item With the existing styles the city, in which the work was published, is omitted or not
+positioned at the end of the biography entry.%
+\item The existing styles use punctuation and italics/bold face in rather untypical way for a
+German/continental Europe bibliography.
+\end{itemize}
+%
+\section{Description}
+Munich.bst is based on the result of a custom-bib
+(\url{http://www.tug.org/tex-archive/help/Catalogue/entries/custom-bib.html}) query. Various
+changes have been made to the resulting Bibtex style. Munich.bst is designed to work with the natbib package.
+(\url{http://www.tug.org/tex-archive/help/Catalogue/entries/natbib.html})\\
+For further reference you should find in the same directory where you found this document a .tex
+file example\_munich\_bibtex\_style.tex and the respective .pdf document
+example\_munich\_bibtex\_style.pdf. These files will give you an idea how to work with munich.bst
+and what to expect from using this Bibtex style. It also contains a set of new commands that work
+well in conjunction with natbib and offer new citation formats. In particular, citations with a
+page reference are not completely put between brackets but only the page reference itself. Please
+note that the ifthen package
+(\url{http://www.tug.org/tex-archive/help/Catalogue/entries/ifthen.html}) must be installed to use
+these customized commands.
+
+\section{Contact}
+Feel free to use munich.bst and the customized commands with your LaTex document. For comments you
+can contact me at: \url{brixner_m@yahoo.de}.
+
+Please note that I will not be able to offer support for your particular document or to debug your
+biography.
+
+I hope you enjoy using munich.bst.\\[0.5cm]%
+%
+\hspace{1cm}M.\,Brixner\\%
+%
+\section{Reference -- Customized commands}
+\begin{verbatim}
+% Customized commands*****
+% Additional commands, not needed but they come in
+% handy if you want to include page numbers and do
+% not want the whole entry to be put between brackets.
+%*************************
+\newcommand{\ct}[2][]
+{%
+\citet{#2}%
+\ifthenelse{\equal{}{#1}}{.}{, S.\,#1.}%
+}
+%*************************
+\newcommand{\fct}[2][]
+{%
+\footnote{
+\citet{#2}%
+\ifthenelse{\equal{}{#1}}{.}{, S.\,#1.}%
+}}
+%*************************
+\newcommand{\fctv}[2][]
+{%
+\footnote{Vgl.\ %
+\citet{#2}%
+\ifthenelse{\equal{}{#1}}{.}{, S.\,#1.}%
+}}
+%*************************
+\end{verbatim}
+\end{document}
diff --git a/biblio/bibtex/contrib/munich/example_DB.bib b/biblio/bibtex/contrib/munich/example_DB.bib
new file mode 100644
index 0000000000..78f3a43012
--- /dev/null
+++ b/biblio/bibtex/contrib/munich/example_DB.bib
@@ -0,0 +1,45 @@
+%munich.bst test bibliography
+
+@BOOK{2003_achleitner,
+ title = {Allgemeine Betriebswirtschaftslehre -- Umfassende Einf\"uhrung aus managementorientierter Sicht},
+ publisher = {Gabler Verlag},
+ year = {2003},
+ editor = { },
+ author = {Achleitner, Ann-Kristin and Thommen, Jean-Paul},
+ address = {Wiesbaden},
+ edition = {4},
+ owner = {brixnerm},}
+
+@INCOLLECTION{2004_Sartoris,
+ author = {Ansgar V\"olker and Joachim Sartoris},
+ title = {Ausfinanzierung von Direktzusagen: Bilanzielle und steuerliche Sicht},
+ booktitle = {Bilanzielle Auslagerung von Pensionsverpflichtungen},
+ publisher = {Sch\"affer-Poeschel Verlag},
+ year = {2004},
+ address = {Stuttgart},
+ editor = {Kolvenbach, Paulgerd and Sartoris, Joachim},
+ pages = {42-63},}
+
+@INTERNET{2006_Dt_Boer,
+ author = {{Deutsche B\"orse AG}},
+ title = {Leitfaden zu den Aktienindizes der Deutschen B\"orse, Version 5.9},
+ url = {http://www.deutsche-boerse.com},
+ year = {2006},
+ note = {betrachtet am: 20.03.2006},}
+
+@BOOK{2002_Bamberg,
+ author = {Bamberg, G\"unter and Baur, Franz},
+ title = {Statistik},
+ editor = { },
+ publisher = {Oldenbourg Verlag},
+ address = {M\"unchen},
+ year = {2002},
+ edition = {12},}
+
+@ARTICLE{2005_Heidemann,
+ author = {Heidemann, J\"org },
+ title = {Finanzierungsl\"ucken bei Pensionszusagen},
+ journal = {Versicherungs Praxis},
+ year = {2005},
+ volume = {4},
+ pages = {74-75},}
diff --git a/biblio/bibtex/contrib/munich/example_munich_Bibtex_style.pdf b/biblio/bibtex/contrib/munich/example_munich_Bibtex_style.pdf
new file mode 100644
index 0000000000..b1e6104285
--- /dev/null
+++ b/biblio/bibtex/contrib/munich/example_munich_Bibtex_style.pdf
Binary files differ
diff --git a/biblio/bibtex/contrib/munich/example_munich_Bibtex_style.tex b/biblio/bibtex/contrib/munich/example_munich_Bibtex_style.tex
new file mode 100644
index 0000000000..b8343f691b
--- /dev/null
+++ b/biblio/bibtex/contrib/munich/example_munich_Bibtex_style.tex
@@ -0,0 +1,81 @@
+\documentclass[12pt,a4paper]{article}
+\usepackage[latin1]{inputenc}
+\usepackage[T1]{fontenc}
+\usepackage[ngerman]{babel}
+\usepackage{parskip}
+\usepackage{natbib}%
+\usepackage{ifthen}
+
+\bibliographystyle{munich}
+
+\title{munich.bst -- A Name (Year) Bibtex Style \newline --Examples--}
+\author{Martin Brixner}
+\date{10. August 2006}
+
+
+\begin{document}
+% Customized commands*****
+% Additional commands, not needed but they come in handy if you want to include
+% page numbers and do not want the whole entry to be put between brackets.
+%*************************
+\newcommand{\ct}[2][]
+{%
+\citet{#2}%
+\ifthenelse{\equal{}{#1}}{.}{, S.\,#1.}%
+}
+%*************************
+\newcommand{\fct}[2][]
+{%
+\footnote{
+\citet{#2}%
+\ifthenelse{\equal{}{#1}}{.}{, S.\,#1.}%
+}}
+%*************************
+\newcommand{\fctv}[2][]
+{%
+\footnote{Vgl.\ %
+\citet{#2}%
+\ifthenelse{\equal{}{#1}}{.}{, S.\,#1.}%
+}}
+%*************************
+
+
+
+\maketitle%
+\newpage%
+\section*{Examples}
+Please put the example\_DB.bib in the same directory as this file.\\[0.4cm]
+
+\textbf{Native commands} \\[0.2cm]
+%
+Book entry I\footnote{\cite{2003_achleitner}.} \\
+Command: \verb+\footnote{\cite{2003_achleitner}.}+ \\[0.2cm]
+%
+Book entry II\footnote{\cite{2002_Bamberg}.} \\
+Command: \verb+\footnote{\cite{2002_Bamberg}.}+ \\[0.2cm]
+%
+Incollection entry\footnote{\cite[42-63]{2004_Sartoris}.}\\
+Command: \verb+\footnote{\cite[42-63]{2004_Sartoris}.}+ \\[0.2cm]
+%
+Article entry\footnote{\cite[74-75]{2005_Heidemann}.} \\
+Command: \verb+\footnote{\cite[74-75]{2005_Heidemann}.}+ \\[0.2cm]
+%
+Internet entry\footnote{\cite{2006_Dt_Boer}.} \\
+Command: \verb+\footnote{\cite{2006_Dt_Boer}.}+ \\[0.4cm]
+%
+\textbf{Customized commands} \\[0.2cm]
+Article entry II \ct[74-75]{2005_Heidemann} \\
+Command: \verb+\ct[74-75]{2005_Heidemann} + \\[0.2cm]
+%
+Article entry III\fct[74-75]{2005_Heidemann} \\
+Command: \verb+\fct[74-75]{2005_Heidemann}+ \\[0.2cm]
+%
+Article entry IV\fctv[74-75]{2005_Heidemann} \\
+Command: \verb+\fctv[74-75]{2005_Heidemann}+ \\
+
+\newpage
+
+\bibliography{example_DB}
+
+
+\end{document}
diff --git a/biblio/bibtex/contrib/munich/munich.bst b/biblio/bibtex/contrib/munich/munich.bst
new file mode 100644
index 0000000000..f7aaafdb3a
--- /dev/null
+++ b/biblio/bibtex/contrib/munich/munich.bst
@@ -0,0 +1,1599 @@
+%%
+%% This is file `muc.bst',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% merlin.mbs (with options: `head,exlang,ay,nat,vonx,nm-rev,ed-rev,jnrlst,aunm-sl,nmft,nmft-sc,nmfted,lab,lab-sc,keyxyr,blkyear,dt-beg,yr-par,yrp-col,note-yr,atit-u,jttl-rm,vnum-nr,volp-com,pgsep-p,jwdpg,jwdvol,num-xser,btit-rm,bt-rm,isbn,issn,doi,edpar,bkedcap,blk-com,in-col,german,pp,ed,abr,ord,and-xcom,xand,url,url-nt,em-x,nfss,,{}')
+%% german.mbs (with options: `exlang,ay,nat,vonx,nm-rev,ed-rev,jnrlst,aunm-sl,nmft,nmft-sc,nmfted,lab,lab-sc,keyxyr,blkyear,dt-beg,yr-par,yrp-col,note-yr,atit-u,jttl-rm,vnum-nr,volp-com,pgsep-p,jwdpg,jwdvol,num-xser,btit-rm,bt-rm,isbn,issn,doi,edpar,bkedcap,blk-com,in-col,german,pp,ed,abr,ord,and-xcom,xand,url,url-nt,em-x,nfss,,{}')
+%% merlin.mbs (with options: `tail,exlang,ay,nat,vonx,nm-rev,ed-rev,jnrlst,aunm-sl,nmft,nmft-sc,nmfted,lab,lab-sc,keyxyr,blkyear,dt-beg,yr-par,yrp-col,note-yr,atit-u,jttl-rm,vnum-nr,volp-com,pgsep-p,jwdpg,jwdvol,num-xser,btit-rm,bt-rm,isbn,issn,doi,edpar,bkedcap,blk-com,in-col,german,pp,ed,abr,ord,and-xcom,xand,url,url-nt,em-x,nfss,,{}')
+%% ----------------------------------------
+%% *** Martin Brixner / brixner_m@yahoo.de ***
+%% *** Modifications leading to munich.bst ***
+%% *** Thank you Patrick for your great tool! ***
+%%
+%% Copyright 1994-2004 Patrick W Daly
+ % ===============================================================
+ % IMPORTANT NOTICE:
+ % This bibliographic style (bst) file has been generated from one or
+ % more master bibliographic style (mbs) files, listed above.
+ %
+ % This generated file can be redistributed and/or modified under the terms
+ % of the LaTeX Project Public License Distributed from CTAN
+ % archives in directory macros/latex/base/lppl.txt; either
+ % version 1 of the License, or any later version.
+ % ===============================================================
+ % Name and version information of the main mbs file:
+ % \ProvidesFile{merlin.mbs}[2004/02/09 4.13 (PWD, AO, DPC)]
+ % For use with BibTeX version 0.99a or later
+ %-------------------------------------------------------------------
+ % This bibliography style file is intended for texts in
+ % GERMAN
+ % This is an author-year citation style bibliography. As such, it is
+ % non-standard LaTeX, and requires a special package file to function properly.
+ % Such a package is natbib.sty by Patrick W. Daly
+ % The form of the \bibitem entries is
+ % \bibitem[Jones et al.(1990)]{key}...
+ % \bibitem[Jones et al.(1990)Jones, Baker, and Smith]{key}...
+ % The essential feature is that the label (the part in brackets) consists
+ % of the author names, as they should appear in the citation, with the year
+ % in parentheses following. There must be no space before the opening
+ % parenthesis!
+ % With natbib v5.3, a full list of authors may also follow the year.
+ % In natbib.sty, it is possible to define the type of enclosures that is
+ % really wanted (brackets or parentheses), but in either case, there must
+ % be parentheses in the label.
+ % The \cite command functions as follows:
+ % \citet{key} ==>> Jones et al. (1990)
+ % \citet*{key} ==>> Jones, Baker, and Smith (1990)
+ % \citep{key} ==>> (Jones et al., 1990)
+ % \citep*{key} ==>> (Jones, Baker, and Smith, 1990)
+ % \citep[chap. 2]{key} ==>> (Jones et al., 1990, chap. 2)
+ % \citep[e.g.][]{key} ==>> (e.g. Jones et al., 1990)
+ % \citep[e.g.][p. 32]{key} ==>> (e.g. Jones et al., p. 32)
+ % \citeauthor{key} ==>> Jones et al.
+ % \citeauthor*{key} ==>> Jones, Baker, and Smith
+ % \citeyear{key} ==>> 1990
+ %---------------------------------------------------------------------
+
+ENTRY
+ { address
+ author
+ booktitle
+ chapter
+ doi
+ edition
+ editor
+ eid
+ howpublished
+ institution
+ isbn
+ issn
+ journal
+ key
+ month
+ note
+ number
+ organization
+ pages
+ publisher
+ school
+ series
+ title
+ type
+ url
+ volume
+ year
+ }
+ {}
+ { label extra.label sort.label short.list }
+INTEGERS { output.state before.all mid.sentence after.sentence after.block }
+FUNCTION {init.state.consts}
+{ #0 'before.all :=
+ #1 'mid.sentence :=
+ #2 'after.sentence :=
+ #3 'after.block :=
+}
+STRINGS { s t}
+FUNCTION {output.nonnull}
+{ 's :=
+ output.state mid.sentence =
+ { ", " * write$ }
+ { output.state after.block =
+ { add.period$ write$
+ newline$
+ "\newblock " write$
+ }
+ { output.state before.all =
+ 'write$
+ { add.period$ " " * write$ }
+ if$
+ }
+ if$
+ mid.sentence 'output.state :=
+ }
+ if$
+ s
+}
+FUNCTION {output}
+{ duplicate$ empty$
+ 'pop$
+ 'output.nonnull
+ if$
+}
+FUNCTION {output.check}
+{ 't :=
+ duplicate$ empty$
+ { pop$ "empty " t * " in " * cite$ * warning$ }
+ 'output.nonnull
+ if$
+}
+FUNCTION {fin.entry}
+{ add.period$
+ write$
+ newline$
+}
+
+FUNCTION {new.block}
+{ output.state before.all =
+ 'skip$
+ { after.block 'output.state := }
+ if$
+}
+FUNCTION {new.sentence}
+{ output.state after.block =
+ 'skip$
+ { output.state before.all =
+ 'skip$
+ { after.sentence 'output.state := }
+ if$
+ }
+ if$
+}
+FUNCTION {add.blank}
+{ " " * before.all 'output.state :=
+}
+
+FUNCTION {date.block}
+{
+ ":" *
+ add.blank
+}
+
+FUNCTION {not}
+{ { #0 }
+ { #1 }
+ if$
+}
+FUNCTION {and}
+{ 'skip$
+ { pop$ #0 }
+ if$
+}
+FUNCTION {or}
+{ { pop$ #1 }
+ 'skip$
+ if$
+}
+FUNCTION {new.block.checkb}
+{ empty$
+ swap$ empty$
+ and
+ 'skip$
+ 'new.block
+ if$
+}
+FUNCTION {field.or.null}
+{ duplicate$ empty$
+ { pop$ "" }
+ 'skip$
+ if$
+}
+FUNCTION {emphasize}
+{ skip$ }
+FUNCTION {scaps}
+{ duplicate$ empty$
+ { pop$ "" }
+ { "\textsc{" swap$ * "}" * }
+ if$
+}
+FUNCTION {bib.name.font}
+{ scaps }
+FUNCTION {bib.fname.font}
+{ bib.name.font }
+FUNCTION {cite.name.font}
+{ scaps }
+FUNCTION {tie.or.space.prefix}
+{ duplicate$ text.length$ #3 <
+ { "~" }
+ { " " }
+ if$
+ swap$
+}
+
+FUNCTION {capitalize}
+{ "u" change.case$ "t" change.case$ }
+
+FUNCTION {space.word}
+{ "" swap$ * "" * }
+ % Here are the language-specific definitions for explicit words.
+ % Each function has a name bbl.xxx where xxx is the English word.
+ %-------------------------------------------------------------------
+ % Begin module:
+ % \ProvidesFile{german.mbs}[2003/11/06 4.2 (PWD)]
+
+ % The language selected here is GERMAN
+FUNCTION {bbl.and}
+{ "/"}
+
+FUNCTION {bbl.etal}
+{ "et~al." }
+
+FUNCTION {bbl.editors}
+{ "Hrsg." }
+
+FUNCTION {bbl.editor}
+{ "Hrsg." }
+
+FUNCTION {bbl.edby}
+{ "herausgegeben von" }
+
+FUNCTION {bbl.edition}
+{ "Aufl." }
+
+FUNCTION {bbl.volume}
+{ "Bd." }
+
+FUNCTION {bbl.of}
+{ "von" }
+
+FUNCTION {bbl.number}
+{ "Nr." }
+
+FUNCTION {bbl.nr}
+{ "Nr." }
+
+FUNCTION {bbl.in}
+{ "in" }
+
+FUNCTION {bbl.pages}
+{ "S." }
+
+FUNCTION {bbl.page}
+{ "S." }
+
+FUNCTION {bbl.chapter}
+{ "Kap." }
+
+FUNCTION {bbl.techrep}
+{ "{Techn.\ Ber.}" }
+
+FUNCTION {bbl.mthesis}
+{ "Diplomarbeit" }
+
+FUNCTION {bbl.phdthesis}
+{ "Dissertation" }
+
+FUNCTION {bbl.first}
+{ "1." }
+
+FUNCTION {bbl.second}
+{ "2." }
+
+FUNCTION {bbl.third}
+{ "3." }
+
+FUNCTION {bbl.fourth}
+{ "4." }
+
+FUNCTION {bbl.fifth}
+{ "5." }
+
+FUNCTION {bbl.th}
+{ "." }
+
+MACRO {jan} {"Jan."}
+
+MACRO {feb} {"Febr."}
+
+MACRO {mar} {"M\^^b{a}rz"}
+
+MACRO {apr} {"Apr."}
+
+MACRO {may} {"Mai"}
+
+MACRO {jun} {"Juni"}
+
+MACRO {jul} {"Juli"}
+
+MACRO {aug} {"Aug."}
+
+MACRO {sep} {"Sept."}
+
+MACRO {oct} {"Okt."}
+
+MACRO {nov} {"Nov."}
+
+MACRO {dec} {"Dez."}
+
+ % End module: german.mbs
+%% Copyright 1994-2004 Patrick W Daly
+MACRO {acmcs} {"ACM Computing Surveys"}
+
+MACRO {acta} {"Acta Informatica"}
+
+MACRO {cacm} {"Communications of the ACM"}
+
+MACRO {ibmjrd} {"IBM Journal of Research and Development"}
+
+MACRO {ibmsj} {"IBM Systems Journal"}
+
+MACRO {ieeese} {"IEEE Transactions on Software Engineering"}
+
+MACRO {ieeetc} {"IEEE Transactions on Computers"}
+
+MACRO {ieeetcad}
+ {"IEEE Transactions on Computer-Aided Design of Integrated Circuits"}
+
+MACRO {ipl} {"Information Processing Letters"}
+
+MACRO {jacm} {"Journal of the ACM"}
+
+MACRO {jcss} {"Journal of Computer and System Sciences"}
+
+MACRO {scp} {"Science of Computer Programming"}
+
+MACRO {sicomp} {"SIAM Journal on Computing"}
+
+MACRO {tocs} {"ACM Transactions on Computer Systems"}
+
+MACRO {tods} {"ACM Transactions on Database Systems"}
+
+MACRO {tog} {"ACM Transactions on Graphics"}
+
+MACRO {toms} {"ACM Transactions on Mathematical Software"}
+
+MACRO {toois} {"ACM Transactions on Office Information Systems"}
+
+MACRO {toplas} {"ACM Transactions on Programming Languages and Systems"}
+
+MACRO {tcs} {"Theoretical Computer Science"}
+FUNCTION {bibinfo.check}
+{ swap$
+ duplicate$ missing$
+ {
+ pop$ pop$
+ ""
+ }
+ { duplicate$ empty$
+ {
+ swap$ pop$
+ }
+ { swap$
+ pop$
+ }
+ if$
+ }
+ if$
+}
+FUNCTION {bibinfo.warn}
+{ swap$
+ duplicate$ missing$
+ {
+ swap$ "missing " swap$ * " in " * cite$ * warning$ pop$
+ ""
+ }
+ { duplicate$ empty$
+ {
+ swap$ "empty " swap$ * " in " * cite$ * warning$
+ }
+ { swap$
+ pop$
+ }
+ if$
+ }
+ if$
+}
+STRINGS { bibinfo}
+INTEGERS { nameptr namesleft numnames }
+
+FUNCTION {format.names}
+{ 'bibinfo :=
+ duplicate$ empty$ 'skip$ {
+ 's :=
+ "" 't :=
+ #1 'nameptr :=
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ { s nameptr
+ "{vv~}{ll}{, f.}{, jj}"
+ format.name$
+ bibinfo bibinfo.check
+ 't :=
+ nameptr #1 >
+ {
+ namesleft #1 >
+ { "/" * t * }
+ {
+ "/" *
+ s nameptr "{ll}" format.name$ duplicate$ "others" =
+ { 't := }
+ { pop$ }
+ if$
+ t "others" =
+ {
+ " " * bbl.etal *
+ bib.name.font
+ }
+ { "" * t * }
+ if$
+ }
+ if$
+ }
+ 't
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+ t "others" =
+ 'skip$
+ { bib.name.font }
+ if$
+ } if$
+}
+FUNCTION {format.names.ed}
+{
+ format.names
+}
+FUNCTION {format.key}
+{ empty$
+ { key field.or.null }
+ { "" }
+ if$
+}
+
+FUNCTION {format.authors}
+{ author "author" format.names
+}
+FUNCTION {get.bbl.editor}
+{ editor num.names$ #1 > 'bbl.editors 'bbl.editor if$ }
+
+FUNCTION {format.editors}
+{ editor "editor" format.names duplicate$ empty$ 'skip$
+ {
+ " " *
+ get.bbl.editor
+ capitalize
+ "(" swap$ * ")" *
+ *
+ }
+ if$
+}
+FUNCTION {format.isbn}
+{ isbn "isbn" bibinfo.check
+ duplicate$ empty$ 'skip$
+ {
+ "ISBN " swap$ *
+ }
+ if$
+}
+
+FUNCTION {format.issn}
+{ issn "issn" bibinfo.check
+ duplicate$ empty$ 'skip$
+ {
+ "ISSN " swap$ *
+ }
+ if$
+}
+
+FUNCTION {format.doi}
+{ doi "doi" bibinfo.check
+ duplicate$ empty$ 'skip$
+ {
+ "\doi{" swap$ * "}" *
+ }
+ if$
+}
+FUNCTION {format.note}
+{
+ url empty$
+ 'skip$
+ { "\urlprefix\url{" url * "}" * output }
+ if$
+ note empty$
+ { "" }
+ { note #1 #1 substring$
+ duplicate$ "{" =
+ 'skip$
+ { output.state mid.sentence =
+ { "l" }
+ { "u" }
+ if$
+ change.case$
+ }
+ if$
+ note #2 global.max$ substring$ * "note" bibinfo.check
+ }
+ if$
+}
+
+FUNCTION {format.title}
+{ title
+ "title" bibinfo.check
+}
+FUNCTION {format.full.names}
+{'s :=
+ "" 't :=
+ #1 'nameptr :=
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ { s nameptr
+ "{vv~}{ll}" format.name$
+ 't :=
+ nameptr #1 >
+ {
+ namesleft #1 >
+ { ", " * t * }
+ {
+ s nameptr "{ll}" format.name$ duplicate$ "others" =
+ { 't := }
+ { pop$ }
+ if$
+ t "others" =
+ {
+ " " * bbl.etal *
+ cite.name.font
+ }
+ {
+ bbl.and
+ space.word * t *
+ }
+ if$
+ }
+ if$
+ }
+ 't
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+ t "others" =
+ 'skip$
+ { cite.name.font }
+ if$
+}
+
+FUNCTION {author.editor.key.full}
+{ author empty$
+ { editor empty$
+ { key empty$
+ { cite$ #1 #3 substring$ }
+ 'key
+ if$
+ }
+ { editor format.full.names }
+ if$
+ }
+ { author format.full.names }
+ if$
+}
+
+FUNCTION {author.key.full}
+{ author empty$
+ { key empty$
+ { cite$ #1 #3 substring$ }
+ 'key
+ if$
+ }
+ { author format.full.names }
+ if$
+}
+
+FUNCTION {editor.key.full}
+{ editor empty$
+ { key empty$
+ { cite$ #1 #3 substring$ }
+ 'key
+ if$
+ }
+ { editor format.full.names }
+ if$
+}
+
+FUNCTION {make.full.names}
+{ type$ "book" =
+ type$ "inbook" =
+ or
+ 'author.editor.key.full
+ { type$ "proceedings" =
+ 'editor.key.full
+ 'author.key.full
+ if$
+ }
+ if$
+}
+
+FUNCTION {output.bibitem}
+{ newline$
+ "\bibitem[{" write$
+ label write$
+ ")" make.full.names duplicate$ short.list =
+ { pop$ }
+ { * }
+ if$
+ "}]{" * write$
+ cite$ write$
+ "}" write$
+ newline$
+ ""
+ before.all 'output.state :=
+}
+
+FUNCTION {if.digit}
+{ duplicate$ "0" =
+ swap$ duplicate$ "1" =
+ swap$ duplicate$ "2" =
+ swap$ duplicate$ "3" =
+ swap$ duplicate$ "4" =
+ swap$ duplicate$ "5" =
+ swap$ duplicate$ "6" =
+ swap$ duplicate$ "7" =
+ swap$ duplicate$ "8" =
+ swap$ "9" = or or or or or or or or or
+}
+FUNCTION {n.separate}
+{ 't :=
+ ""
+ #0 'numnames :=
+ { t empty$ not }
+ { t #-1 #1 substring$ if.digit
+ { numnames #1 + 'numnames := }
+ { #0 'numnames := }
+ if$
+ t #-1 #1 substring$ swap$ *
+ t #-2 global.max$ substring$ 't :=
+ numnames #5 =
+ { duplicate$ #1 #2 substring$ swap$
+ #3 global.max$ substring$
+ "." swap$ * *
+ }
+ 'skip$
+ if$
+ }
+ while$
+}
+FUNCTION {n.dashify}
+{
+ n.separate
+ 't :=
+ ""
+ { t empty$ not }
+ { t #1 #1 substring$ "-" =
+ { t #1 #2 substring$ "--" = not
+ { "--" *
+ t #2 global.max$ substring$ 't :=
+ }
+ { { t #1 #1 substring$ "-" = }
+ { "-" *
+ t #2 global.max$ substring$ 't :=
+ }
+ while$
+ }
+ if$
+ }
+ { t #1 #1 substring$ *
+ t #2 global.max$ substring$ 't :=
+ }
+ if$
+ }
+ while$
+}
+
+FUNCTION {word.in}
+{ bbl.in
+ ":" *
+ " " * }
+
+FUNCTION {format.date}
+{ year "year" bibinfo.check duplicate$ empty$
+ {
+ }
+ 'skip$
+ if$
+ extra.label *
+ before.all 'output.state :=
+ " (" swap$ * ")" *
+}
+FUNCTION {format.btitle}
+{ title "title" bibinfo.check
+ duplicate$ empty$ 'skip$
+ {
+ }
+ if$
+}
+FUNCTION {either.or.check}
+{ empty$
+ 'pop$
+ { "can't use both " swap$ * " fields in " * cite$ * warning$ }
+ if$
+}
+FUNCTION {format.bvolume}
+{ volume empty$
+ { "" }
+ { bbl.volume volume tie.or.space.prefix
+ "volume" bibinfo.check * *
+ series "series" bibinfo.check
+ duplicate$ empty$ 'pop$
+ { swap$ bbl.of space.word * swap$
+ emphasize * }
+ if$
+ "volume and number" number either.or.check
+ }
+ if$
+}
+FUNCTION {format.number.series}
+{ volume empty$
+ { number empty$
+ { series field.or.null }
+ { series empty$
+ { number "number" bibinfo.check }
+ { output.state mid.sentence =
+ { bbl.number }
+ { bbl.number capitalize }
+ if$
+ number tie.or.space.prefix "number" bibinfo.check * *
+ bbl.in space.word *
+ series "series" bibinfo.check *
+ }
+ if$
+ }
+ if$
+ }
+ { "" }
+ if$
+}
+FUNCTION {is.num}
+{ chr.to.int$
+ duplicate$ "0" chr.to.int$ < not
+ swap$ "9" chr.to.int$ > not and
+}
+
+FUNCTION {extract.num}
+{ duplicate$ 't :=
+ "" 's :=
+ { t empty$ not }
+ { t #1 #1 substring$
+ t #2 global.max$ substring$ 't :=
+ duplicate$ is.num
+ { s swap$ * 's := }
+ { pop$ "" 't := }
+ if$
+ }
+ while$
+ s empty$
+ 'skip$
+ { pop$ s }
+ if$
+}
+
+FUNCTION {convert.edition}
+{ extract.num "l" change.case$ 's :=
+ s "first" = s "1" = or
+ { bbl.first 't := }
+ { s "second" = s "2" = or
+ { bbl.second 't := }
+ { s "third" = s "3" = or
+ { bbl.third 't := }
+ { s "fourth" = s "4" = or
+ { bbl.fourth 't := }
+ { s "fifth" = s "5" = or
+ { bbl.fifth 't := }
+ { s #1 #1 substring$ is.num
+ { s bbl.th * 't := }
+ { edition 't := }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+ t
+}
+
+FUNCTION {format.edition}
+{ edition duplicate$ empty$ 'skip$
+ {
+ convert.edition
+ output.state mid.sentence =
+ { "l" }
+ { "t" }
+ if$ change.case$
+ "edition" bibinfo.check
+ " " * bbl.edition *
+ }
+ if$
+}
+INTEGERS { multiresult }
+FUNCTION {multi.page.check}
+{ 't :=
+ #0 'multiresult :=
+ { multiresult not
+ t empty$ not
+ and
+ }
+ { t #1 #1 substring$
+ duplicate$ "-" =
+ swap$ duplicate$ "," =
+ swap$ "+" =
+ or or
+ { #1 'multiresult := }
+ { t #2 global.max$ substring$ 't := }
+ if$
+ }
+ while$
+ multiresult
+}
+FUNCTION {format.pages}
+{ pages duplicate$ empty$ 'skip$
+ { duplicate$ multi.page.check
+ {
+ bbl.pages swap$
+ n.dashify
+ }
+ {
+ bbl.page swap$
+ }
+ if$
+ tie.or.space.prefix
+ "pages" bibinfo.check
+ * *
+ }
+ if$
+}
+FUNCTION {format.journal.pages}
+{ pages duplicate$ empty$ 'pop$
+ { swap$ duplicate$ empty$
+ { pop$ pop$ format.pages }
+ {
+ ", " *
+ swap$
+ n.dashify
+ pages multi.page.check
+ 'bbl.pages
+ 'bbl.page
+ if$
+ swap$ tie.or.space.prefix
+ "pages" bibinfo.check
+ * *
+ *
+ }
+ if$
+ }
+ if$
+}
+FUNCTION {format.journal.eid}
+{ eid "eid" bibinfo.check
+ duplicate$ empty$ 'pop$
+ { swap$ duplicate$ empty$ 'skip$
+ {
+ ", " *
+ }
+ if$
+ swap$ *
+ }
+ if$
+}
+FUNCTION {format.vol.num.pages}
+{ volume field.or.null
+ duplicate$ empty$ 'skip$
+ {
+ "volume" bibinfo.check
+ }
+ if$
+ number "number" bibinfo.check duplicate$ empty$ 'skip$
+ {
+ swap$ duplicate$ empty$
+ { "there's a number but no volume in " cite$ * warning$ }
+ 'skip$
+ if$
+ swap$
+ "(" swap$ * ")" *
+ }
+ if$ *
+ eid empty$
+ { format.journal.pages }
+ { format.journal.eid }
+ if$
+}
+
+FUNCTION {format.chapter.pages}
+{ chapter empty$
+ 'format.pages
+ { type empty$
+ { bbl.chapter }
+ { type "l" change.case$
+ "type" bibinfo.check
+ }
+ if$
+ chapter tie.or.space.prefix
+ "chapter" bibinfo.check
+ * *
+ pages empty$
+ 'skip$
+ { ", " * format.pages * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.booktitle}
+{
+ booktitle "booktitle" bibinfo.check
+}
+FUNCTION {format.in.ed.booktitle}
+{ format.booktitle duplicate$ empty$ 'skip$
+ {
+ editor "editor" format.names.ed duplicate$ empty$ 'pop$
+ {
+ " " *
+ get.bbl.editor
+ capitalize
+ "(" swap$ * "), " *
+ * swap$
+ * }
+ if$
+ word.in swap$ *
+ }
+ if$
+}
+FUNCTION {format.thesis.type}
+{ type duplicate$ empty$
+ 'pop$
+ { swap$ pop$
+ "t" change.case$ "type" bibinfo.check
+ }
+ if$
+}
+FUNCTION {format.tr.number}
+{ number "number" bibinfo.check
+ type duplicate$ empty$
+ { pop$ bbl.techrep }
+ 'skip$
+ if$
+ "type" bibinfo.check
+ swap$ duplicate$ empty$
+ { pop$ "t" change.case$ }
+ { tie.or.space.prefix * * }
+ if$
+}
+FUNCTION {format.article.crossref}
+{
+ word.in
+ " \cite{" * crossref * "}" *
+}
+FUNCTION {format.book.crossref}
+{ volume duplicate$ empty$
+ { "empty volume in " cite$ * "'s crossref of " * crossref * warning$
+ pop$ word.in
+ }
+ { bbl.volume
+ swap$ tie.or.space.prefix "volume" bibinfo.check * * bbl.of space.word *
+ }
+ if$
+ " \cite{" * crossref * "}" *
+}
+FUNCTION {format.incoll.inproc.crossref}
+{
+ word.in
+ " \cite{" * crossref * "}" *
+}
+FUNCTION {format.org.or.pub}
+{ 't :=
+ ""
+ address empty$ t empty$ and
+ 'skip$
+ {
+ t empty$
+ { address "address" bibinfo.check *
+ }
+ { t *
+ address empty$
+ 'skip$
+ { ", " * address "address" bibinfo.check * }
+ if$
+ }
+ if$
+ }
+ if$
+}
+FUNCTION {format.publisher.address}
+{ publisher "publisher" bibinfo.warn format.org.or.pub
+}
+
+FUNCTION {format.organization.address}
+{ organization "organization" bibinfo.check format.org.or.pub
+}
+
+FUNCTION {article}
+{ output.bibitem
+ format.authors "author" output.check
+ author format.key output
+ format.date "year" output.check
+ date.block
+ format.title "title" output.check
+ crossref missing$
+ {
+ journal
+ "journal" bibinfo.check
+ word.in swap$ *
+ "journal" output.check
+ format.vol.num.pages output
+ }
+ { format.article.crossref output.nonnull
+ format.pages output
+ }
+ if$
+ format.issn output
+ format.doi output
+ format.note output
+ fin.entry
+}
+FUNCTION {book}
+{ output.bibitem
+ author empty$
+ { format.editors "author and editor" output.check
+ editor format.key output
+ }
+ { format.authors output.nonnull
+ crossref missing$
+ { "author and editor" editor either.or.check }
+ 'skip$
+ if$
+ }
+ if$
+ format.date "year" output.check
+ date.block
+ format.btitle "title" output.check
+ crossref missing$
+ { format.bvolume output
+ format.number.series output
+ format.edition output
+ format.publisher.address output
+ }
+ {
+ format.book.crossref output.nonnull
+ }
+ if$
+ format.isbn output
+ format.doi output
+ format.note output
+ fin.entry
+}
+FUNCTION {booklet}
+{ output.bibitem
+ format.authors output
+ author format.key output
+ format.date "year" output.check
+ date.block
+ format.title "title" output.check
+ howpublished "howpublished" bibinfo.check output
+ address "address" bibinfo.check output
+ format.isbn output
+ format.doi output
+ format.note output
+ fin.entry
+}
+
+FUNCTION {inbook}
+{ output.bibitem
+ author empty$
+ { format.editors "author and editor" output.check
+ editor format.key output
+ }
+ { format.authors output.nonnull
+ crossref missing$
+ { "author and editor" editor either.or.check }
+ 'skip$
+ if$
+ }
+ if$
+ format.date "year" output.check
+ date.block
+ format.btitle "title" output.check
+ crossref missing$
+ {
+ format.bvolume output
+ format.chapter.pages "chapter and pages" output.check
+ format.number.series output
+ format.edition output
+ format.publisher.address output
+ }
+ {
+ format.chapter.pages "chapter and pages" output.check
+ format.book.crossref output.nonnull
+ }
+ if$
+ crossref missing$
+ { format.isbn output }
+ 'skip$
+ if$
+ format.doi output
+ format.note output
+ fin.entry
+}
+
+FUNCTION {incollection}
+{ output.bibitem
+ format.authors "author" output.check
+ author format.key output
+ format.date "year" output.check
+ date.block
+ format.title "title" output.check
+ crossref missing$
+ { format.in.ed.booktitle "booktitle" output.check
+ format.bvolume output
+ format.number.series output
+ format.chapter.pages output
+ format.edition output
+ format.publisher.address output
+ format.isbn output
+ }
+ { format.incoll.inproc.crossref output.nonnull
+ format.chapter.pages output
+ }
+ if$
+ format.doi output
+ format.note output
+ fin.entry
+}
+FUNCTION {inproceedings}
+{ output.bibitem
+ format.authors "author" output.check
+ author format.key output
+ format.date "year" output.check
+ date.block
+ format.title "title" output.check
+ crossref missing$
+ { format.in.ed.booktitle "booktitle" output.check
+ format.bvolume output
+ format.number.series output
+ format.pages output
+ publisher empty$
+ { format.organization.address output }
+ { organization "organization" bibinfo.check output
+ format.publisher.address output
+ }
+ if$
+ format.isbn output
+ format.issn output
+ }
+ { format.incoll.inproc.crossref output.nonnull
+ format.pages output
+ }
+ if$
+ format.doi output
+ format.note output
+ fin.entry
+}
+FUNCTION {conference} { inproceedings }
+FUNCTION {manual}
+{ output.bibitem
+ format.authors output
+ author format.key output
+ format.date "year" output.check
+ date.block
+ format.btitle "title" output.check
+ organization "organization" bibinfo.check output
+ address "address" bibinfo.check output
+ format.edition output
+ format.doi output
+ format.note output
+ fin.entry
+}
+
+FUNCTION {mastersthesis}
+{ output.bibitem
+ format.authors "author" output.check
+ author format.key output
+ format.date "year" output.check
+ date.block
+ format.btitle
+ "title" output.check
+ bbl.mthesis format.thesis.type output.nonnull
+ school "school" bibinfo.warn output
+ address "address" bibinfo.check output
+ format.doi output
+ format.note output
+ fin.entry
+}
+
+FUNCTION {misc}
+{ output.bibitem
+ format.authors output
+ author format.key output
+ format.date "year" output.check
+ date.block
+ format.title output
+ howpublished "howpublished" bibinfo.check output
+ format.doi output
+ format.note output
+ fin.entry
+}
+FUNCTION {phdthesis}
+{ output.bibitem
+ format.authors "author" output.check
+ author format.key output
+ format.date "year" output.check
+ date.block
+ format.btitle
+ "title" output.check
+ bbl.phdthesis format.thesis.type output.nonnull
+ school "school" bibinfo.warn output
+ address "address" bibinfo.check output
+ format.doi output
+ format.note output
+ fin.entry
+}
+
+FUNCTION {proceedings}
+{ output.bibitem
+ format.editors output
+ editor format.key output
+ format.date "year" output.check
+ date.block
+ format.btitle "title" output.check
+ format.bvolume output
+ format.number.series output
+ publisher empty$
+ { format.organization.address output }
+ { organization "organization" bibinfo.check output
+ format.publisher.address output
+ }
+ if$
+ format.isbn output
+ format.issn output
+ format.doi output
+ format.note output
+ fin.entry
+}
+
+FUNCTION {techreport}
+{ output.bibitem
+ format.authors "author" output.check
+ author format.key output
+ format.date "year" output.check
+ date.block
+ format.title
+ "title" output.check
+ format.tr.number output.nonnull
+ institution "institution" bibinfo.warn output
+ address "address" bibinfo.check output
+ format.doi output
+ format.note output
+ fin.entry
+}
+
+FUNCTION {unpublished}
+{ output.bibitem
+ format.authors "author" output.check
+ author format.key output
+ format.date "year" output.check
+ date.block
+ format.title "title" output.check
+ format.doi output
+ format.note "note" output.check
+ fin.entry
+}
+
+FUNCTION {default.type} { misc }
+READ
+FUNCTION {sortify}
+{ purify$
+ "l" change.case$
+}
+INTEGERS { len }
+FUNCTION {chop.word}
+{ 's :=
+ 'len :=
+ s #1 len substring$ =
+ { s len #1 + global.max$ substring$ }
+ 's
+ if$
+}
+FUNCTION {format.lab.names}
+{ 's :=
+ "" 't :=
+ s #1 "{vv~}{ll}" format.name$
+ s num.names$ duplicate$
+ #2 >
+ { pop$
+ " " * bbl.etal *
+ cite.name.font
+ "others" 't :=
+ }
+ { #2 <
+ 'skip$
+ { s #2 "{ff }{vv }{ll}{ jj}" format.name$ "others" =
+ {
+ " " * bbl.etal *
+ cite.name.font
+ "others" 't :=
+ }
+ { bbl.and space.word * s #2 "{vv~}{ll}" format.name$
+ * }
+ if$
+ }
+ if$
+ }
+ if$
+ t "others" =
+ 'skip$
+ { cite.name.font }
+ if$
+}
+
+FUNCTION {author.key.label}
+{ author empty$
+ { key empty$
+ { cite$ #1 #3 substring$ }
+ 'key
+ if$
+ }
+ { author format.lab.names }
+ if$
+}
+
+FUNCTION {author.editor.key.label}
+{ author empty$
+ { editor empty$
+ { key empty$
+ { cite$ #1 #3 substring$ }
+ 'key
+ if$
+ }
+ { editor format.lab.names }
+ if$
+ }
+ { author format.lab.names }
+ if$
+}
+
+FUNCTION {editor.key.label}
+{ editor empty$
+ { key empty$
+ { cite$ #1 #3 substring$ }
+ 'key
+ if$
+ }
+ { editor format.lab.names }
+ if$
+}
+
+FUNCTION {calc.short.authors}
+{ type$ "book" =
+ type$ "inbook" =
+ or
+ 'author.editor.key.label
+ { type$ "proceedings" =
+ 'editor.key.label
+ 'author.key.label
+ if$
+ }
+ if$
+ 'short.list :=
+}
+
+FUNCTION {calc.label}
+{ calc.short.authors
+ short.list
+ "("
+ *
+ year duplicate$ empty$
+ short.list key field.or.null = or
+ { pop$ "" }
+ 'skip$
+ if$
+ *
+ 'label :=
+}
+
+FUNCTION {sort.format.names}
+{ 's :=
+ #1 'nameptr :=
+ ""
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ { s nameptr
+ "{ll{ }}{ f{ }}{ jj{ }}"
+ format.name$ 't :=
+ nameptr #1 >
+ {
+ " " *
+ namesleft #1 = t "others" = and
+ { "zzzzz" * }
+ { t sortify * }
+ if$
+ }
+ { t sortify * }
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+}
+
+FUNCTION {sort.format.title}
+{ 't :=
+ "A " #2
+ "An " #3
+ "The " #4 t chop.word
+ chop.word
+ chop.word
+ sortify
+ #1 global.max$ substring$
+}
+FUNCTION {author.sort}
+{ author empty$
+ { key empty$
+ { "to sort, need author or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { author sort.format.names }
+ if$
+}
+FUNCTION {author.editor.sort}
+{ author empty$
+ { editor empty$
+ { key empty$
+ { "to sort, need author, editor, or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { editor sort.format.names }
+ if$
+ }
+ { author sort.format.names }
+ if$
+}
+FUNCTION {editor.sort}
+{ editor empty$
+ { key empty$
+ { "to sort, need editor or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { editor sort.format.names }
+ if$
+}
+FUNCTION {presort}
+{ calc.label
+ label sortify
+ " "
+ *
+ type$ "book" =
+ type$ "inbook" =
+ or
+ 'author.editor.sort
+ { type$ "proceedings" =
+ 'editor.sort
+ 'author.sort
+ if$
+ }
+ if$
+ #1 entry.max$ substring$
+ 'sort.label :=
+ sort.label
+ *
+ " "
+ *
+ title field.or.null
+ sort.format.title
+ *
+ #1 entry.max$ substring$
+ 'sort.key$ :=
+}
+
+ITERATE {presort}
+SORT
+STRINGS { last.label next.extra }
+INTEGERS { last.extra.num number.label }
+FUNCTION {initialize.extra.label.stuff}
+{ #0 int.to.chr$ 'last.label :=
+ "" 'next.extra :=
+ #0 'last.extra.num :=
+ #0 'number.label :=
+}
+FUNCTION {forward.pass}
+{ last.label label =
+ { last.extra.num #1 + 'last.extra.num :=
+ last.extra.num int.to.chr$ 'extra.label :=
+ }
+ { "a" chr.to.int$ 'last.extra.num :=
+ "" 'extra.label :=
+ label 'last.label :=
+ }
+ if$
+ number.label #1 + 'number.label :=
+}
+FUNCTION {reverse.pass}
+{ next.extra "b" =
+ { "a" 'extra.label := }
+ 'skip$
+ if$
+ extra.label 'next.extra :=
+ extra.label
+ duplicate$ empty$
+ 'skip$
+ { "{\natexlab{" swap$ * "}}" * }
+ if$
+ 'extra.label :=
+ label extra.label * 'label :=
+}
+EXECUTE {initialize.extra.label.stuff}
+ITERATE {forward.pass}
+REVERSE {reverse.pass}
+FUNCTION {bib.sort.order}
+{ sort.label
+ " "
+ *
+ year field.or.null sortify
+ *
+ " "
+ *
+ title field.or.null
+ sort.format.title
+ *
+ #1 entry.max$ substring$
+ 'sort.key$ :=
+}
+ITERATE {bib.sort.order}
+SORT
+FUNCTION {begin.bib}
+{ preamble$ empty$
+ 'skip$
+ { preamble$ write$ newline$ }
+ if$
+ "\begin{thebibliography}{" number.label int.to.str$ * "}" *
+ write$ newline$
+ "\providecommand{\natexlab}[1]{#1}"
+ write$ newline$
+ "\providecommand{\url}[1]{\texttt{#1}}"
+ write$ newline$
+ "\providecommand{\urlprefix}{URL: }"
+ write$ newline$
+ "\expandafter\ifx\csname urlstyle\endcsname\relax"
+ write$ newline$
+ " \providecommand{\doi}[1]{doi:\discretionary{}{}{}#1}\else"
+ write$ newline$
+ " \providecommand{\doi}{doi:\discretionary{}{}{}\begingroup \urlstyle{rm}\Url}\fi"
+ write$ newline$
+}
+EXECUTE {begin.bib}
+EXECUTE {init.state.consts}
+ITERATE {call.type$}
+FUNCTION {end.bib}
+{ newline$
+ "\end{thebibliography}" write$ newline$
+}
+EXECUTE {end.bib}
+%% End of customized bst file
+%%
+%% End of file `MBXCEFS.bst'.
diff --git a/biblio/bibtex/contrib/named/named.bst b/biblio/bibtex/contrib/named/named.bst
new file mode 100644
index 0000000000..78b6bb6eb3
--- /dev/null
+++ b/biblio/bibtex/contrib/named/named.bst
@@ -0,0 +1,1287 @@
+%NAME: named.bst
+% BibTeX `named' style file for BibTeX version 0.99c, LaTeX version 2.09
+% Place it in a file called named.bst in the BibTeX search path. (Placing it
+% in the same directory as the LaTeX document should also work.)
+% Support for named citations is provided by named.sty
+
+% This version was made by modifying the master file made by
+% Oren Patashnik (PATASHNIK@SCORE.STANFORD.EDU)
+
+% Copyright (C) 1985, all rights reserved.
+% Modifications Copyright 1988, Peter F. Patel-Schneider
+% Copying of this file is authorized only if either
+% (1) you make absolutely no changes to your copy, including name, or
+% (2) if you do make changes, you name it something other than
+% btxbst.doc, plain.bst, unsrt.bst, alpha.bst, and abbrv.bst.
+% This restriction helps ensure that all standard styles are identical.
+
+% There are undoubtably bugs in this style. If you make bug fixes,
+% improvements, etc. please let me know. My e-mail address is:
+% pfps@research.att.com
+
+% Citation format: [author-last-name, year]
+% [author-last-name and author-last-name, year]
+% [author-last-name {\em et al.}, year]
+%
+% Reference list ordering: alphabetical by author or whatever passes
+% for author in the absence of one.
+%
+% This BibTeX style has support for short (year only) citations. This
+% is done by having the citations actually look like
+% \citeauthoryear{author-info}{year}
+% The LaTeX style has to have the following (or similar)
+% \let\@internalcite\cite
+% \def\cite{\def\citeauthoryear##1##2{##1, ##2}\@internalcite}
+% \def\shortcite{\def\citeauthoryear##1{##2}\@internalcite}
+% \def\@biblabel#1{\def\citeauthoryear##1##2{##1, ##2}[#1]\hfill}
+% which makes \shortcite the macro for short citations.
+
+ENTRY
+ { address
+ author
+ booktitle
+ chapter
+ edition
+ editor
+ howpublished
+ institution
+ journal
+ key
+ month
+ note
+ number
+ organization
+ pages
+ publisher
+ school
+ series
+ title
+ type
+ volume
+ year
+ }
+ {}
+ { label extra.label sort.label }
+
+INTEGERS { output.state before.all mid.sentence after.sentence after.block }
+
+FUNCTION {init.state.consts}
+{ #0 'before.all :=
+ #1 'mid.sentence :=
+ #2 'after.sentence :=
+ #3 'after.block :=
+}
+
+STRINGS { s t }
+
+FUNCTION {output.nonnull}
+{ 's :=
+ output.state mid.sentence =
+ { ", " * write$ }
+ { output.state after.block =
+ { add.period$ write$
+ newline$
+ "\newblock " write$
+ }
+ { output.state before.all =
+ 'write$
+ { add.period$ " " * write$ }
+ if$
+ }
+ if$
+ mid.sentence 'output.state :=
+ }
+ if$
+ s
+}
+
+FUNCTION {output}
+{ duplicate$ empty$
+ 'pop$
+ 'output.nonnull
+ if$
+}
+
+FUNCTION {output.check}
+{ 't :=
+ duplicate$ empty$
+ { pop$ "empty " t * " in " * cite$ * warning$ }
+ 'output.nonnull
+ if$
+}
+
+FUNCTION {output.bibitem}
+{ newline$
+
+ "\bibitem[" write$
+ label write$
+ "]{" write$
+
+ cite$ write$
+ "}" write$
+ newline$
+ ""
+ before.all 'output.state :=
+}
+
+FUNCTION {fin.entry}
+{ add.period$
+ write$
+ newline$
+}
+
+FUNCTION {new.block}
+{ output.state before.all =
+ 'skip$
+ { after.block 'output.state := }
+ if$
+}
+
+FUNCTION {new.sentence}
+{ output.state after.block =
+ 'skip$
+ { output.state before.all =
+ 'skip$
+ { after.sentence 'output.state := }
+ if$
+ }
+ if$
+}
+
+FUNCTION {not}
+{ { #0 }
+ { #1 }
+ if$
+}
+
+FUNCTION {and}
+{ 'skip$
+ { pop$ #0 }
+ if$
+}
+
+FUNCTION {or}
+{ { pop$ #1 }
+ 'skip$
+ if$
+}
+
+FUNCTION {new.block.checka}
+{ empty$
+ 'skip$
+ 'new.block
+ if$
+}
+
+FUNCTION {new.block.checkb}
+{ empty$
+ swap$ empty$
+ and
+ 'skip$
+ 'new.block
+ if$
+}
+
+FUNCTION {new.sentence.checka}
+{ empty$
+ 'skip$
+ 'new.sentence
+ if$
+}
+
+FUNCTION {new.sentence.checkb}
+{ empty$
+ swap$ empty$
+ and
+ 'skip$
+ 'new.sentence
+ if$
+}
+
+FUNCTION {field.or.null}
+{ duplicate$ empty$
+ { pop$ "" }
+ 'skip$
+ if$
+}
+
+FUNCTION {emphasize}
+{ duplicate$ empty$
+ { pop$ "" }
+ { "{\em " swap$ * "}" * }
+ if$
+}
+
+INTEGERS { nameptr namesleft numnames }
+
+FUNCTION {format.names}
+{ 's :=
+ #1 'nameptr :=
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+
+ { s nameptr "{ff~}{vv~}{ll}{, jj}" format.name$ 't :=
+
+ nameptr #1 >
+ { namesleft #1 >
+ { ", " * t * }
+ { numnames #2 >
+ { "," * }
+ 'skip$
+ if$
+ t "others" =
+ { " et~al." * }
+ { " and " * t * }
+ if$
+ }
+ if$
+ }
+ 't
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+}
+
+FUNCTION {format.authors}
+{ author empty$
+ { "" }
+ { author format.names }
+ if$
+}
+
+FUNCTION {format.editors}
+{ editor empty$
+ { "" }
+ { editor format.names
+ editor num.names$ #1 >
+ { ", editors" * }
+ { ", editor" * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.title}
+{ title empty$
+ { "" }
+
+ { title "t" change.case$ }
+
+ if$
+}
+
+FUNCTION {n.dashify}
+{ 't :=
+ ""
+ { t empty$ not }
+ { t #1 #1 substring$ "-" =
+ { t #1 #2 substring$ "--" = not
+ { "--" *
+ t #2 global.max$ substring$ 't :=
+ }
+ { { t #1 #1 substring$ "-" = }
+ { "-" *
+ t #2 global.max$ substring$ 't :=
+ }
+ while$
+ }
+ if$
+ }
+ { t #1 #1 substring$ *
+ t #2 global.max$ substring$ 't :=
+ }
+ if$
+ }
+ while$
+}
+
+FUNCTION {format.date}
+{ year empty$
+ { month empty$
+ { "" }
+ { "there's a month but no year in " cite$ * warning$
+ month
+ }
+ if$
+ }
+ { month empty$
+ 'year
+ { month " " * year * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.btitle}
+{ title emphasize
+}
+
+FUNCTION {tie.or.space.connect}
+{ duplicate$ text.length$ #3 <
+ { "~" }
+ { " " }
+ if$
+ swap$ * *
+}
+
+FUNCTION {either.or.check}
+{ empty$
+ 'pop$
+ { "can't use both " swap$ * " fields in " * cite$ * warning$ }
+ if$
+}
+
+FUNCTION {format.bvolume}
+{ volume empty$
+ { "" }
+ { "volume" volume tie.or.space.connect
+ series empty$
+ 'skip$
+ { " of " * series emphasize * }
+ if$
+ "volume and number" number either.or.check
+ }
+ if$
+}
+
+FUNCTION {format.number.series}
+{ volume empty$
+ { number empty$
+ { series field.or.null }
+ { output.state mid.sentence =
+ { "number" }
+ { "Number" }
+ if$
+ number tie.or.space.connect
+ series empty$
+ { "there's a number but no series in " cite$ * warning$ }
+ { " in " * series * }
+ if$
+ }
+ if$
+ }
+ { "" }
+ if$
+}
+
+FUNCTION {format.edition}
+{ edition empty$
+ { "" }
+ { output.state mid.sentence =
+ { edition "l" change.case$ " edition" * }
+ { edition "t" change.case$ " edition" * }
+ if$
+ }
+ if$
+}
+
+INTEGERS { multiresult }
+
+FUNCTION {multi.page.check}
+{ 't :=
+ #0 'multiresult :=
+ { multiresult not
+ t empty$ not
+ and
+ }
+ { t #1 #1 substring$
+ duplicate$ "-" =
+ swap$ duplicate$ "," =
+ swap$ "+" =
+ or or
+ { #1 'multiresult := }
+ { t #2 global.max$ substring$ 't := }
+ if$
+ }
+ while$
+ multiresult
+}
+
+FUNCTION {format.pages}
+{ pages empty$
+ { "" }
+ { pages multi.page.check
+ { "pages" pages n.dashify tie.or.space.connect }
+ { "page" pages tie.or.space.connect }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.vol.num.pages}
+{ volume field.or.null
+ number empty$
+ 'skip$
+ { "(" number * ")" * *
+ volume empty$
+ { "there's a number but no volume in " cite$ * warning$ }
+ 'skip$
+ if$
+ }
+ if$
+ pages empty$
+ 'skip$
+ { duplicate$ empty$
+ { pop$ format.pages }
+ { ":" * pages n.dashify * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.chapter.pages}
+{ chapter empty$
+ 'format.pages
+ { type empty$
+ { "chapter" }
+ { type "l" change.case$ }
+ if$
+ chapter tie.or.space.connect
+ pages empty$
+ 'skip$
+ { ", " * format.pages * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.in.ed.booktitle}
+{ booktitle empty$
+ { "" }
+ { editor empty$
+ { "In " booktitle emphasize * }
+ { "In " format.editors * ", " * booktitle emphasize * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {empty.misc.check}
+{ author empty$ title empty$ howpublished empty$
+ month empty$ year empty$ note empty$
+ and and and and and
+
+ key empty$ not and
+
+ { "all relevant fields are empty in " cite$ * warning$ }
+ 'skip$
+ if$
+}
+
+FUNCTION {format.thesis.type}
+{ type empty$
+ 'skip$
+ { pop$
+ type "t" change.case$
+ }
+ if$
+}
+
+FUNCTION {format.tr.number}
+{ type empty$
+ { "Technical Report" }
+ 'type
+ if$
+ number empty$
+ { "t" change.case$ }
+ { number tie.or.space.connect }
+ if$
+}
+
+FUNCTION {format.article.crossref}
+{ key empty$
+ { journal empty$
+ { "need key or journal for " cite$ * " to crossref " * crossref *
+ warning$
+ ""
+ }
+ { "In {\em " journal * "\/}" * }
+ if$
+ }
+ { "In " key * }
+ if$
+ " \shortcite{" * crossref * "}" *
+}
+
+FUNCTION {format.crossref.editor}
+{ editor #1 "{vv~}{ll}" format.name$
+ editor num.names$ duplicate$
+ #2 >
+ { pop$ " et~al." * }
+ { #2 <
+ 'skip$
+ { editor #2 "{ff }{vv }{ll}{ jj}" format.name$ "others" =
+ { " et~al." * }
+ { " and " * editor #2 "{vv~}{ll}" format.name$ * }
+ if$
+ }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.book.crossref}
+{ volume empty$
+ { "empty volume in " cite$ * "'s crossref of " * crossref * warning$
+ "In "
+ }
+ { "Volume" volume tie.or.space.connect
+ " of " *
+ }
+ if$
+ editor empty$
+ editor field.or.null author field.or.null =
+ or
+ { key empty$
+ { series empty$
+ { "need editor, key, or series for " cite$ * " to crossref " *
+ crossref * warning$
+ "" *
+ }
+ { "{\em " * series * "\/}" * }
+ if$
+ }
+ { key * }
+ if$
+ }
+ { format.crossref.editor * }
+ if$
+ " \shortcite{" * crossref * "}" *
+}
+
+FUNCTION {format.incoll.inproc.crossref}
+{ editor empty$
+ editor field.or.null author field.or.null =
+ or
+ { key empty$
+ { booktitle empty$
+ { "need editor, key, or booktitle for " cite$ * " to crossref " *
+ crossref * warning$
+ ""
+ }
+ { "In {\em " booktitle * "\/}" * }
+ if$
+ }
+ { "In " key * }
+ if$
+ }
+ { "In " format.crossref.editor * }
+ if$
+ " \shortcite{" * crossref * "}" *
+}
+
+FUNCTION {article}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.title "title" output.check
+ new.block
+ crossref missing$
+ { journal emphasize "journal" output.check
+ format.vol.num.pages output
+ format.date "year" output.check
+ }
+ { format.article.crossref output.nonnull
+ format.pages output
+ }
+ if$
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {book}
+{ output.bibitem
+ author empty$
+ { format.editors "author and editor" output.check }
+ { format.authors output.nonnull
+ crossref missing$
+ { "author and editor" editor either.or.check }
+ 'skip$
+ if$
+ }
+ if$
+ new.block
+ format.btitle "title" output.check
+ crossref missing$
+ { format.bvolume output
+ new.block
+ format.number.series output
+ new.sentence
+ publisher "publisher" output.check
+ address output
+ }
+ { new.block
+ format.book.crossref output.nonnull
+ }
+ if$
+ format.edition output
+ format.date "year" output.check
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {booklet}
+{ output.bibitem
+ format.authors output
+ new.block
+ format.title "title" output.check
+ howpublished address new.block.checkb
+ howpublished output
+ address output
+ format.date output
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {inbook}
+{ output.bibitem
+ author empty$
+ { format.editors "author and editor" output.check }
+ { format.authors output.nonnull
+ crossref missing$
+ { "author and editor" editor either.or.check }
+ 'skip$
+ if$
+ }
+ if$
+ new.block
+ format.btitle "title" output.check
+ crossref missing$
+ { format.bvolume output
+ format.chapter.pages "chapter and pages" output.check
+ new.block
+ format.number.series output
+ new.sentence
+ publisher "publisher" output.check
+ address output
+ }
+ { format.chapter.pages "chapter and pages" output.check
+ new.block
+ format.book.crossref output.nonnull
+ }
+ if$
+ format.edition output
+ format.date "year" output.check
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {incollection}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.title "title" output.check
+ new.block
+ crossref missing$
+ { format.in.ed.booktitle "booktitle" output.check
+ format.bvolume output
+ format.number.series output
+ format.chapter.pages output
+ new.sentence
+ publisher "publisher" output.check
+ address output
+ format.edition output
+ format.date "year" output.check
+ }
+ { format.incoll.inproc.crossref output.nonnull
+ format.chapter.pages output
+ }
+ if$
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {inproceedings}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.title "title" output.check
+ new.block
+ crossref missing$
+ { format.in.ed.booktitle "booktitle" output.check
+ format.bvolume output
+ format.number.series output
+ format.pages output
+ address empty$
+ { organization publisher new.sentence.checkb
+ organization output
+ publisher output
+ format.date "year" output.check
+ }
+ { address output.nonnull
+ format.date "year" output.check
+ new.sentence
+ organization output
+ publisher output
+ }
+ if$
+ }
+ { format.incoll.inproc.crossref output.nonnull
+ format.pages output
+ }
+ if$
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {conference} { inproceedings }
+
+FUNCTION {manual}
+{ output.bibitem
+ author empty$
+ { organization empty$
+ 'skip$
+ { organization output.nonnull
+ address output
+ }
+ if$
+ }
+ { format.authors output.nonnull }
+ if$
+ new.block
+ format.btitle "title" output.check
+ author empty$
+ { organization empty$
+ { address new.block.checka
+ address output
+ }
+ 'skip$
+ if$
+ }
+ { organization address new.block.checkb
+ organization output
+ address output
+ }
+ if$
+ format.edition output
+ format.date output
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {mastersthesis}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.title "title" output.check
+ new.block
+ "Master's thesis" format.thesis.type output.nonnull
+ school "school" output.check
+ address output
+ format.date "year" output.check
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {misc}
+{ output.bibitem
+ format.authors output
+ title howpublished new.block.checkb
+ format.title output
+ howpublished new.block.checka
+ howpublished output
+ format.date output
+ new.block
+ note output
+ fin.entry
+ empty.misc.check
+}
+
+FUNCTION {phdthesis}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.btitle "title" output.check
+ new.block
+ "PhD thesis" format.thesis.type output.nonnull
+ school "school" output.check
+ address output
+ format.date "year" output.check
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {proceedings}
+{ output.bibitem
+ editor empty$
+ { organization output }
+ { format.editors output.nonnull }
+ if$
+ new.block
+ format.btitle "title" output.check
+ format.bvolume output
+ format.number.series output
+ address empty$
+ { editor empty$
+ { publisher new.sentence.checka }
+ { organization publisher new.sentence.checkb
+ organization output
+ }
+ if$
+ publisher output
+ format.date "year" output.check
+ }
+ { address output.nonnull
+ format.date "year" output.check
+ new.sentence
+ editor empty$
+ 'skip$
+ { organization output }
+ if$
+ publisher output
+ }
+ if$
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {techreport}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.title "title" output.check
+ new.block
+ format.tr.number output.nonnull
+ institution "institution" output.check
+ address output
+ format.date "year" output.check
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {unpublished}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.title "title" output.check
+ new.block
+ note "note" output.check
+ format.date output
+ fin.entry
+}
+
+FUNCTION {default.type} { misc }
+
+MACRO {jan} {"January"}
+
+MACRO {feb} {"February"}
+
+MACRO {mar} {"March"}
+
+MACRO {apr} {"April"}
+
+MACRO {may} {"May"}
+
+MACRO {jun} {"June"}
+
+MACRO {jul} {"July"}
+
+MACRO {aug} {"August"}
+
+MACRO {sep} {"September"}
+
+MACRO {oct} {"October"}
+
+MACRO {nov} {"November"}
+
+MACRO {dec} {"December"}
+
+MACRO {acmcs} {"ACM Computing Surveys"}
+
+MACRO {acta} {"Acta Informatica"}
+
+MACRO {cacm} {"Communications of the ACM"}
+
+MACRO {ibmjrd} {"IBM Journal of Research and Development"}
+
+MACRO {ibmsj} {"IBM Systems Journal"}
+
+MACRO {ieeese} {"IEEE Transactions on Software Engineering"}
+
+MACRO {ieeetc} {"IEEE Transactions on Computers"}
+
+MACRO {ieeetcad}
+ {"IEEE Transactions on Computer-Aided Design of Integrated Circuits"}
+
+MACRO {ipl} {"Information Processing Letters"}
+
+MACRO {jacm} {"Journal of the ACM"}
+
+MACRO {jcss} {"Journal of Computer and System Sciences"}
+
+MACRO {scp} {"Science of Computer Programming"}
+
+MACRO {sicomp} {"SIAM Journal on Computing"}
+
+MACRO {tocs} {"ACM Transactions on Computer Systems"}
+
+MACRO {tods} {"ACM Transactions on Database Systems"}
+
+MACRO {tog} {"ACM Transactions on Graphics"}
+
+MACRO {toms} {"ACM Transactions on Mathematical Software"}
+
+MACRO {toois} {"ACM Transactions on Office Information Systems"}
+
+MACRO {toplas} {"ACM Transactions on Programming Languages and Systems"}
+
+MACRO {tcs} {"Theoretical Computer Science"}
+
+READ
+
+FUNCTION {sortify}
+{ purify$
+ "l" change.case$
+}
+
+INTEGERS { len }
+
+FUNCTION {chop.word}
+{ 's :=
+ 'len :=
+ s #1 len substring$ =
+ { s len #1 + global.max$ substring$ }
+ 's
+ if$
+}
+
+INTEGERS { et.al.char.used }
+
+FUNCTION {initialize.et.al.char.used}
+{ #0 'et.al.char.used :=
+}
+
+EXECUTE {initialize.et.al.char.used}
+
+FUNCTION {format.lab.names}
+{ 's :=
+ s num.names$ 'numnames :=
+
+ numnames #1 =
+ { s #1 "{vv }{ll}" format.name$ }
+ { numnames #2 =
+ { s #1 "{vv }{ll }and " format.name$ s #2 "{vv }{ll}" format.name$ *
+ }
+ { s #1 "{vv }{ll }\bgroup \em et al.\egroup " format.name$ }
+ if$
+ }
+ if$
+
+}
+
+FUNCTION {author.key.label}
+{ author empty$
+ { key empty$
+
+ { cite$ #1 #3 substring$ }
+
+ { key }
+ if$
+ }
+ { author format.lab.names }
+ if$
+}
+
+FUNCTION {author.editor.key.label}
+{ author empty$
+ { editor empty$
+ { key empty$
+
+ { cite$ #1 #3 substring$ }
+
+ { key }
+ if$
+ }
+ { editor format.lab.names }
+ if$
+ }
+ { author format.lab.names }
+ if$
+}
+
+FUNCTION {author.key.organization.label}
+{ author empty$
+ { key empty$
+ { organization empty$
+
+ { cite$ #1 #3 substring$ }
+
+ { "The " #4 organization chop.word #3 text.prefix$ }
+ if$
+ }
+ { key }
+ if$
+ }
+ { author format.lab.names }
+ if$
+}
+
+FUNCTION {editor.key.organization.label}
+{ editor empty$
+ { key empty$
+ { organization empty$
+
+ { cite$ #1 #3 substring$ }
+
+ { "The " #4 organization chop.word #3 text.prefix$ }
+ if$
+ }
+ { key }
+ if$
+ }
+ { editor format.lab.names }
+ if$
+}
+
+FUNCTION {calc.label}
+{ type$ "book" =
+ type$ "inbook" =
+ or
+ 'author.editor.key.label
+ { type$ "proceedings" =
+ 'editor.key.organization.label
+ { type$ "manual" =
+ 'author.key.organization.label
+ 'author.key.label
+ if$
+ }
+ if$
+ }
+ if$
+ duplicate$
+
+ "\protect\citeauthoryear{" swap$ * "}{" *
+ year field.or.null purify$ * % CHANGED - pfps - 15 Feb 1989
+ 'label :=
+ year field.or.null purify$ *
+
+ sortify 'sort.label :=
+}
+
+FUNCTION {sort.format.names}
+{ 's :=
+ #1 'nameptr :=
+ ""
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ { nameptr #1 >
+ { " " * }
+ 'skip$
+ if$
+
+ s nameptr "{vv{ } }{ll{ }}{ ff{ }}{ jj{ }}" format.name$ 't :=
+
+ nameptr numnames = t "others" = and
+ { "et al" * }
+ { t sortify * }
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+}
+
+FUNCTION {sort.format.title}
+{ 't :=
+ "A " #2
+ "An " #3
+ "The " #4 t chop.word
+ chop.word
+ chop.word
+ sortify
+ #1 global.max$ substring$
+}
+
+FUNCTION {author.sort}
+{ author empty$
+ { key empty$
+ { "to sort, need author or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { author sort.format.names }
+ if$
+}
+
+FUNCTION {author.editor.sort}
+{ author empty$
+ { editor empty$
+ { key empty$
+ { "to sort, need author, editor, or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { editor sort.format.names }
+ if$
+ }
+ { author sort.format.names }
+ if$
+}
+
+FUNCTION {author.organization.sort}
+{ author empty$
+ { organization empty$
+ { key empty$
+ { "to sort, need author, organization, or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { "The " #4 organization chop.word sortify }
+ if$
+ }
+ { author sort.format.names }
+ if$
+}
+
+FUNCTION {editor.organization.sort}
+{ editor empty$
+ { organization empty$
+ { key empty$
+ { "to sort, need editor, organization, or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { "The " #4 organization chop.word sortify }
+ if$
+ }
+ { editor sort.format.names }
+ if$
+}
+
+FUNCTION {presort}
+
+{ calc.label
+ sort.label
+ " "
+ *
+ type$ "book" =
+
+ type$ "inbook" =
+ or
+ 'author.editor.sort
+ { type$ "proceedings" =
+ 'editor.organization.sort
+ { type$ "manual" =
+ 'author.organization.sort
+ 'author.sort
+ if$
+ }
+ if$
+ }
+ if$
+
+ *
+
+ " "
+ *
+ year field.or.null sortify
+ *
+ " "
+ *
+ title field.or.null
+ sort.format.title
+ *
+ #1 entry.max$ substring$
+ 'sort.key$ :=
+}
+
+ITERATE {presort}
+
+SORT
+
+STRINGS { longest.label last.sort.label next.extra }
+
+INTEGERS { longest.label.width last.extra.num }
+
+FUNCTION {initialize.longest.label}
+{ "" 'longest.label :=
+ #0 int.to.chr$ 'last.sort.label :=
+ "" 'next.extra :=
+ #0 'longest.label.width :=
+ #0 'last.extra.num :=
+}
+
+FUNCTION {forward.pass}
+{ last.sort.label sort.label =
+ { last.extra.num #1 + 'last.extra.num :=
+ last.extra.num int.to.chr$ 'extra.label :=
+ }
+ { "a" chr.to.int$ 'last.extra.num :=
+ "" 'extra.label :=
+ sort.label 'last.sort.label :=
+ }
+ if$
+}
+
+FUNCTION {reverse.pass}
+{ next.extra "b" =
+ { "a" 'extra.label := }
+ 'skip$
+ if$
+ label extra.label * "}" * 'label := % CHANGED - pfps 15 Feb 1989
+ label width$ longest.label.width >
+ { label 'longest.label :=
+ label width$ 'longest.label.width :=
+ }
+ 'skip$
+ if$
+ extra.label 'next.extra :=
+}
+
+EXECUTE {initialize.longest.label}
+
+ITERATE {forward.pass}
+
+REVERSE {reverse.pass}
+
+FUNCTION {begin.bib}
+
+{ et.al.char.used
+ { "\newcommand{\etalchar}[1]{$^{#1}$}" write$ newline$ }
+ 'skip$
+ if$
+ preamble$ empty$
+
+ 'skip$
+ { preamble$ write$ newline$ }
+ if$
+
+ "\begin{thebibliography}{}" write$ newline$
+
+}
+
+EXECUTE {begin.bib}
+
+EXECUTE {init.state.consts}
+
+ITERATE {call.type$}
+
+FUNCTION {end.bib}
+{ newline$
+ "\end{thebibliography}" write$ newline$
+}
+
+EXECUTE {end.bib}
diff --git a/biblio/bibtex/contrib/named/named.sty b/biblio/bibtex/contrib/named/named.sty
new file mode 100644
index 0000000000..ae3e153e3b
--- /dev/null
+++ b/biblio/bibtex/contrib/named/named.sty
@@ -0,0 +1,10 @@
+% /usr/local/lib/tex/bibtex/named.sty, Mon Jun 29 13:16:46 1992
+% Edit by Nelson H. F. Beebe <beebe@plot79.math.utah.edu>
+%
+% This LaTeX option file is for use with bibliographies produced with
+% named.bst.
+%
+\let\@internalcite\cite
+\def\cite{\def\citeauthoryear##1##2{##1, ##2}\@internalcite}
+\def\shortcite{\def\citeauthoryear##1##2{##2}\@internalcite}
+\def\@biblabel#1{\def\citeauthoryear##1##2{##1, ##2}[#1]\hfill}
diff --git a/biblio/bibtex/contrib/newapa/newapa.bst b/biblio/bibtex/contrib/newapa/newapa.bst
new file mode 100644
index 0000000000..2a0d148139
--- /dev/null
+++ b/biblio/bibtex/contrib/newapa/newapa.bst
@@ -0,0 +1,1468 @@
+%$$$ newapa.bst $$$
+% BibTeX `newapa' style file for BibTeX version 0.99c, LaTeX version 2.09
+% Place it in a file called newapa.bst in the BibTeX search path.
+%(Placing it in the same directory as the LaTeX document should also work.)
+% Support for named citations is provided by named.sty
+
+% This version was made by modifying the master file made by
+% Oren Patashnik (PATASHNIK@SCORE.STANFORD.EDU), and the 'named' BibTeX
+% style of Peter F. Patel-Schneider.
+
+% Copyright (C) 1985, all rights reserved.
+% Copying of this file is authorized only if either
+% (1) you make absolutely no changes to your copy, including name, or
+% (2) if you do make changes, you name it something other than 'newapa.bst'.
+% There are undoubtably bugs in this style. If you make bug fixes,
+% improvements, etc. please let me know. My e-mail address is:
+% spencer@cgrg.ohio.state.edu or 71160.3141@compuserve.com
+%
+% This style was made from 'plain.bst', 'named.bst', and 'apalike.bst',
+% with lots of tweaking to make it look like APA style, along with tips
+% from Young Ryu and Brian Reiser's modifications of 'apalike.bst'.
+%
+% Citation format: (author-last-name, year)
+% (author-last-name and author-last-name, year)
+% (author-last-name {\em et al.}, year)
+% (author-last-name)
+% (author-last-name and author-last-name)
+% (author-last-name {\em et al.})
+% (year)
+%
+% Reference list ordering: alphabetical by author or whatever passes
+% for author in the absence of one.
+%
+% This BibTeX style has support for abbreviated author lists and for
+% year-only citations. This is done by having the citations
+% actually look like
+%
+% \citeauthoryear{full-author-info}{abbrev-author-info}{year}
+%
+% The LaTeX style has to have the following (or similar)
+%
+% \let\@internalcite\cite
+% \def\fullcite{\def\citeauthoryear##1##2##3{##1, ##3}\@internalcite}
+% \def\fullciteA{\def\citeauthoryear##1##2##3{##1}\@internalcite}
+% \def\shortcite{\def\citeauthoryear##1##2##3{##2, ##3}\@internalcite}
+% \def\shortciteA{\def\citeauthoryear##1##2##3{##2}\@internalcite}
+% \def\citeyear{\def\citeauthoryear##1##2##3{##3}\@internalcite}
+%
+
+ENTRY
+ { address
+ author
+ booktitle
+ chapter
+ edition
+ editor
+ howpublished
+ institution
+ journal
+ key
+% month
+ note
+ number
+ organization
+ pages
+ publisher
+ school
+ series
+ title
+ type
+ volume
+ year
+ }
+ {}
+ { label extra.label sort.label }
+
+INTEGERS { output.state before.all mid.sentence after.sentence after.block }
+
+FUNCTION {init.state.consts}
+{ #0 'before.all :=
+ #1 'mid.sentence :=
+ #2 'after.sentence :=
+ #3 'after.block :=
+}
+
+STRINGS { s t u }
+
+FUNCTION {output.nonnull}
+{ 's :=
+ output.state mid.sentence =
+ { ", " * write$ }
+ { output.state after.block =
+ { add.period$ write$
+ newline$
+ "\newblock " write$
+ }
+ { output.state before.all =
+ 'write$
+ { add.period$ " " * write$ }
+ if$
+ }
+ if$
+ mid.sentence 'output.state :=
+ }
+ if$
+ s
+}
+
+FUNCTION {special.output.nonnull}
+{ 's :=
+ output.state mid.sentence =
+ { " " * write$ }
+ { output.state after.block =
+ { ": " write$
+ newline$
+ "\newblock " write$
+ }
+ { output.state before.all =
+ 'write$
+ { ": " * write$
+ }
+ if$
+ }
+ if$
+ mid.sentence 'output.state :=
+ }
+ if$
+ s
+}
+
+FUNCTION {output.nonnull.colon}
+{ 's :=
+ output.state mid.sentence =
+ { ": " * write$ }
+ { output.state after.block =
+ { add.period$ write$
+ newline$
+ "\newblock " write$
+ }
+ { output.state before.all =
+ 'write$
+ { add.period$ " " * write$ }
+ if$
+ }
+ if$
+ mid.sentence 'output.state :=
+ }
+ if$
+ s
+}
+
+FUNCTION {output.nonnull.space}
+{ 's :=
+ output.state mid.sentence =
+ { "\ " * write$ }
+ { output.state after.block =
+ { add.period$ write$
+ newline$
+ "\newblock " write$
+ }
+ { output.state before.all =
+ 'write$
+ { add.period$ " " * write$ }
+ if$
+ }
+ if$
+ mid.sentence 'output.state :=
+ }
+ if$
+ s
+}
+
+FUNCTION {special.output}
+{ duplicate$ empty$
+ 'pop$
+ 'special.output.nonnull
+ if$
+}
+
+FUNCTION {output}
+{ duplicate$ empty$
+ 'pop$
+ 'output.nonnull
+ if$
+}
+
+FUNCTION {output.check}
+{ 't :=
+ duplicate$ empty$
+ { pop$ "empty " t * " in " * cite$ * warning$ }
+ 'output.nonnull
+ if$
+}
+
+FUNCTION {output.check.colon}
+{ 't :=
+ duplicate$ empty$
+ { pop$ "empty " t * " in " * cite$ * warning$ }
+ 'output.nonnull.colon
+ if$
+}
+
+FUNCTION {output.check.space}
+{ 't :=
+ duplicate$ empty$
+ { pop$ "empty " t * " in " * cite$ * warning$ }
+ 'output.nonnull.space
+ if$
+}
+
+FUNCTION {output.year.check}
+{ year empty$
+ { "empty year in " cite$ * warning$ }
+ { write$
+ " (" year * extra.label * ")" *
+ mid.sentence 'output.state :=
+ }
+ if$
+}
+
+FUNCTION {output.bibitem}
+{ newline$
+
+ "\bibitem[" write$
+ label write$
+ "]{" write$
+
+ cite$ write$
+ "}" write$
+ newline$
+ ""
+ before.all 'output.state :=
+}
+
+FUNCTION {fin.entry}
+{ add.period$
+ write$
+ newline$
+}
+
+FUNCTION {new.block}
+{ output.state before.all =
+ 'skip$
+ { after.block 'output.state := }
+ if$
+}
+
+FUNCTION {new.sentence}
+{ output.state after.block =
+ 'skip$
+ { output.state before.all =
+ 'skip$
+ { after.sentence 'output.state := }
+ if$
+ }
+ if$
+}
+
+FUNCTION {not}
+{ { #0 }
+ { #1 }
+ if$
+}
+
+FUNCTION {and}
+{ 'skip$
+ { pop$ #0 }
+ if$
+}
+
+FUNCTION {or}
+{ { pop$ #1 }
+ 'skip$
+ if$
+}
+
+FUNCTION {new.block.checka}
+{ empty$
+ 'skip$
+ 'new.block
+ if$
+}
+
+FUNCTION {new.block.checkb}
+{ empty$
+ swap$ empty$
+ and
+ 'skip$
+ 'new.block
+ if$
+}
+
+FUNCTION {new.sentence.checka}
+{ empty$
+ 'skip$
+ 'new.sentence
+ if$
+}
+
+FUNCTION {new.sentence.checkb}
+{ empty$
+ swap$ empty$
+ and
+ 'skip$
+ 'new.sentence
+ if$
+}
+
+FUNCTION {field.or.null}
+{ duplicate$ empty$
+ { pop$ "" }
+ 'skip$
+ if$
+}
+
+FUNCTION {underline}
+{ duplicate$ empty$
+ { pop$ "" }
+ { "\underline{" swap$ * "}" * }
+ if$
+}
+
+FUNCTION {emphasize}
+{ duplicate$ empty$
+ { pop$ "" }
+ { "{\em " swap$ * "}" * }
+ if$
+}
+
+FUNCTION {emphasize.space}
+{ duplicate$ empty$
+ { pop$ "" }
+ { "{\em " swap$ * "\/}" * }
+ if$
+}
+
+INTEGERS { nameptr namesleft numnames }
+
+FUNCTION {format.names}
+{ 's :=
+ #1 'nameptr := % nameptr = 1;
+ s num.names$ 'numnames := % numnames = num.name$(s);
+ numnames 'namesleft :=
+ { namesleft #0 > }
+
+ { s nameptr "{vv~}{ll}{, jj}{, f.}" format.name$ 't :=
+
+ nameptr #1 >
+ { namesleft #1 >
+ { ", " * t * }
+ { numnames #2 >
+ { "," * }
+ 'skip$
+ if$
+ t "others" =
+ { " et~al." * }
+% { " and " * t * }
+% { ", \& " * t * }
+ { " \& " * t * }
+ if$
+ }
+ if$
+ }
+ 't
+ if$
+ nameptr #1 + 'nameptr := % nameptr += 1;
+ namesleft #1 - 'namesleft := % namesleft =- 1;
+ }
+ while$
+}
+
+FUNCTION {format.names.fml}
+{ 's :=
+ #1 'nameptr := % nameptr = 1;
+ s num.names$ 'numnames := % numnames = num.name$(s);
+ numnames 'namesleft :=
+ { namesleft #0 > }
+
+ { s nameptr "{f.~}{vv~}{ll}{, jj}" format.name$ 't :=
+
+ nameptr #1 >
+ { namesleft #1 >
+ { ", " * t * }
+ { numnames #2 >
+ { "," * }
+ 'skip$
+ if$
+ t "others" =
+ { " et~al." * }
+% { " and " * t * }
+ { " \& " * t * }
+ if$
+ }
+ if$
+ }
+ 't
+ if$
+ nameptr #1 + 'nameptr := % nameptr += 1;
+ namesleft #1 - 'namesleft := % namesleft =- 1;
+ }
+ while$
+}
+
+FUNCTION {format.authors}
+{ author empty$
+ { "" }
+ { author format.names }
+ if$
+}
+
+FUNCTION {format.key}
+{ empty$
+ { key field.or.null }
+ { "" }
+ if$
+}
+
+FUNCTION {format.editors.fml}
+{ editor empty$
+ { "" }
+ { editor format.names.fml
+ editor num.names$ #1 >
+ { " (Eds.)" * }
+ { " (Ed.)" * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.editors}
+{ editor empty$
+ { "" }
+ { editor format.names
+ editor num.names$ #1 >
+ { " (Eds.)" * }
+ { " (Ed.)" * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.editors.dot}
+{ editor empty$
+ { "" }
+ { editor format.names
+ editor num.names$ #1 >
+ { " (Eds.)." * }
+ { " (Ed.)." * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.title}
+{ title empty$
+ { "" }
+ { title "t" change.case$ }
+ if$
+}
+
+% Note that the APA style requres case changes
+% in article titles. The following does not
+% change cases. If you perfer it, uncomment the
+% following and comment out the above.
+
+%FUNCTION {format.title}
+%{ title empty$
+% { "" }
+% { title }
+% if$
+%}
+
+FUNCTION {n.dashify}
+{ 't :=
+ ""
+ { t empty$ not }
+ { t #1 #1 substring$ "-" =
+ { t #1 #2 substring$ "--" = not
+ { "--" *
+ t #2 global.max$ substring$ 't :=
+ }
+ { { t #1 #1 substring$ "-" = }
+ { "-" *
+ t #2 global.max$ substring$ 't :=
+ }
+ while$
+ }
+ if$
+ }
+ { t #1 #1 substring$ *
+ t #2 global.max$ substring$ 't :=
+ }
+ if$
+ }
+ while$
+}
+
+FUNCTION {format.btitle}
+{ edition empty$
+ { title emphasize }
+ { title empty$
+ { title emphasize }
+ { "{\em " title * "\/} (" * edition * " ed.)" * "." * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.emphasize.booktitle}
+{ edition empty$
+ { booktitle emphasize }
+ { booktitle empty$
+ { booktitle emphasize }
+ { "{\em " booktitle * "\/} (" * edition * " ed.)" * "." * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {tie.or.space.connect}
+{ duplicate$ text.length$ #3 <
+ { "~" }
+ { " " }
+ if$
+ swap$ * *
+}
+
+FUNCTION {either.or.check}
+{ empty$
+ 'pop$
+ { "can't use both " swap$ * " fields in " * cite$ * warning$ }
+ if$
+}
+
+FUNCTION {format.bvolume}
+{ volume empty$
+ { "" }
+ { "volume" volume tie.or.space.connect
+ series empty$
+ 'skip$
+ { " of " * series emphasize * }
+ if$
+ "volume and number" number either.or.check
+ }
+ if$
+}
+
+FUNCTION {format.number.series}
+{ volume empty$
+ { number empty$
+ { series field.or.null }
+ { output.state mid.sentence =
+ { "number" }
+ { "Number" }
+ if$
+ number tie.or.space.connect
+ series empty$
+ { "there's a number but no series in " cite$ * warning$ }
+ { " in " * series * }
+ if$
+ }
+ if$
+ }
+ { "" }
+ if$
+}
+
+FUNCTION {format.edition}
+{ edition empty$
+ { "" }
+ { output.state mid.sentence =
+ { edition "l" change.case$ " edition" * }
+ { edition "t" change.case$ " edition" * }
+ if$
+ }
+ if$
+}
+
+INTEGERS { multiresult }
+
+FUNCTION {multi.page.check}
+{ 't :=
+ #0 'multiresult :=
+ { multiresult not
+ t empty$ not
+ and
+ }
+ { t #1 #1 substring$
+ duplicate$ "-" =
+ swap$ duplicate$ "," =
+ swap$ "+" =
+ or or
+ { #1 'multiresult := }
+ { t #2 global.max$ substring$ 't := }
+ if$
+ }
+ while$
+ multiresult
+}
+
+FUNCTION {format.pages}
+{ pages empty$
+ { "" }
+ { pages multi.page.check
+% { "pages" pages n.dashify tie.or.space.connect }
+% { "page" pages tie.or.space.connect }
+ { "(pp.\" pages n.dashify tie.or.space.connect }
+ { "(pp.\" pages tie.or.space.connect }
+ if$
+ ")." *
+ }
+ if$
+}
+
+% By Young (and Spencer)
+FUNCTION {format.vol.num.pages}
+{ number empty$
+ { volume empty$
+ 'skip$
+ { "{\em " volume * "}" * }
+% { "\underline{" volume * "}" * }
+ if$
+ }
+ { volume emphasize.space
+ number empty$
+ {"there's a number but no volume in " cite$ * warning$ }
+ { "(" number * ")" * * }
+ if$
+ }
+ if$
+ pages empty$
+ 'skip$
+ { duplicate$ empty$
+ { pop$ format.pages }
+ { ", " * pages n.dashify * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.chapter.pages}
+{ chapter empty$
+ 'format.pages
+ { type empty$
+ { "chapter" }
+ { type "l" change.case$ }
+ if$
+ chapter tie.or.space.connect
+ pages empty$
+ 'skip$
+ { ", " * format.pages * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.chapter.pages.incoll}
+{ chapter empty$
+ 'format.pages
+ { type empty$
+ { "chapter" }
+ { type "l" change.case$ }
+ if$
+ chapter tie.or.space.connect
+ pages empty$
+ 'skip$
+ { " " * format.pages * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.in.ed.booktitle}
+{ booktitle empty$
+ { "" }
+ { editor empty$
+ { "In " format.emphasize.booktitle * }
+ { "In " format.editors * ", " * format.emphasize.booktitle * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.in.ed.booktitle.incoll}
+{ booktitle empty$
+ { "" }
+ { editor empty$
+ { "In " format.emphasize.booktitle * }
+ { "In " format.editors.fml * ", " * format.emphasize.booktitle * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.thesis.type}
+{ type empty$
+ 'skip$
+ { pop$
+ type "t" change.case$
+ }
+ if$
+}
+
+FUNCTION {format.tr.number}
+{ type empty$
+ { "Technical Report" }
+ 'type
+ if$
+ number empty$
+ { "t" change.case$ }
+ { number tie.or.space.connect }
+ if$
+}
+
+FUNCTION {format.article.crossref}
+{ "In"
+ "\cite{" * crossref * "}" *
+}
+
+FUNCTION {format.crossref.editor}
+{ editor #1 "{vv~}{ll}" format.name$
+ editor num.names$ duplicate$
+ #2 >
+ { pop$ " et~al." * }
+ { #2 <
+ 'skip$
+ { editor #2 "{ff }{vv }{ll}{ jj}" format.name$ "others" =
+ { " et~al." * }
+ { " and " * editor #2 "{vv~}{ll}" format.name$ * }
+ if$
+ }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.book.crossref}
+{ volume empty$
+ { "empty volume in " cite$ * "'s crossref of " * crossref * warning$
+ "In "
+ }
+ { "Volume" volume tie.or.space.connect
+ " of " *
+ }
+ if$
+ editor empty$
+ editor field.or.null author field.or.null =
+ or
+ { key empty$
+ { series empty$
+ { "need editor, key, or series for " cite$ * " to crossref " *
+ crossref * warning$
+ "" *
+ }
+ { "{\em " * series * "\/}" * }
+ if$
+ }
+ { key * }
+ if$
+ }
+ { format.crossref.editor * }
+ if$
+ " \cite{" * crossref * "}" *
+}
+
+FUNCTION {format.incoll.inproc.crossref}
+{ "In"
+ " \cite{" * crossref * "}" *
+}
+
+FUNCTION {article}
+{ output.bibitem
+ format.authors
+ "author" output.check
+ author format.key output % added
+ output.year.check % added
+ new.block
+ format.title
+ "title" output.check
+ new.block
+ crossref missing$
+ { journal emphasize "journal" output.check
+ format.vol.num.pages output
+ }
+ { format.article.crossref output.nonnull
+ format.pages output
+ }
+ if$
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {book}
+{ output.bibitem
+ author empty$
+ { format.editors.dot
+ "author and editor" output.check }
+ { format.authors
+ output.nonnull
+ crossref missing$
+ { "author and editor" editor either.or.check }
+ 'skip$
+ if$
+ }
+ if$
+ output.year.check % added
+ new.block
+ format.btitle
+ "title" output.check
+ crossref missing$
+ { format.bvolume output
+ new.block
+ format.number.series output
+ new.sentence
+ address output
+ publisher "publisher" output.check.colon
+ }
+ { new.block
+ format.book.crossref output.nonnull
+ }
+ if$
+% format.edition output
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {booklet}
+{ output.bibitem
+ format.authors output
+ author format.key output % added
+ output.year.check % added
+ new.block
+ format.title
+ "title" output.check
+ new.block
+ howpublished output
+ address output
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {inbook}
+{ output.bibitem
+ author empty$
+ { format.editors.dot
+ "author and editor" output.check
+ }
+ { format.authors output.nonnull
+ crossref missing$
+ { "author and editor" editor either.or.check }
+ 'skip$
+ if$
+ }
+ if$
+ output.year.check % added
+ new.block
+ format.btitle
+ "title" output.check
+ crossref missing$
+ { format.bvolume output
+ format.chapter.pages
+ "chapter and pages" output.check
+ new.block
+ format.number.series output
+ new.sentence
+ address output
+ publisher
+ "publisher" output.check.colon
+ }
+ { format.chapter.pages "chapter and pages" output.check
+ new.block
+ format.book.crossref output.nonnull
+ }
+ if$
+% format.edition output
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {incollection}
+{ output.bibitem
+ format.authors
+ "author" output.check
+ author format.key output % added
+ output.year.check % added
+ new.block
+ format.title
+ "title" output.check
+ new.block
+ crossref missing$
+ { format.in.ed.booktitle.incoll
+ "booktitle" output.check.colon
+ format.bvolume output
+ format.number.series output
+ format.chapter.pages special.output
+ new.sentence
+ address output
+ publisher "publisher" output.check.colon
+ }
+ { format.incoll.inproc.crossref
+ output.nonnull
+ format.chapter.pages output
+ }
+ if$
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {inproceedings}
+{ output.bibitem
+ format.authors
+ "author" output.check
+ author format.key output % added
+ output.year.check % added
+ new.block
+ format.title
+ "title" output.check
+ new.block
+ crossref missing$
+ { format.in.ed.booktitle
+ "booktitle" output.check
+ format.bvolume output
+ format.number.series output
+ format.pages output
+ address output
+ new.sentence
+ organization output
+ publisher output
+ }
+ { format.incoll.inproc.crossref output.nonnull
+ format.pages output
+ }
+ if$
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {conference} { inproceedings }
+
+FUNCTION {manual}
+{ output.bibitem
+ format.authors output
+ author format.key output % added
+ output.year.check % added
+ new.block
+ format.btitle
+ "title" output.check
+ organization address new.block.checkb
+% Reversed the order of "address" and "organization", added the ":".
+ address output
+ organization "organization" output.check.colon
+% address output
+% ":" output
+% organization output
+% format.edition output
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {mastersthesis}
+{ output.bibitem
+ format.authors
+ "author" output.check
+ author format.key output % added
+ output.year.check % added
+ new.block
+ format.title
+ "title" output.check
+ new.block
+ "Master's thesis" format.thesis.type output.nonnull
+ school "school" output.check
+ address output
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {misc}
+{ output.bibitem
+ format.authors output
+ author format.key output % added
+ output.year.check % added
+ title howpublished new.block.checkb
+ format.title output
+ new.block
+ howpublished output
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {phdthesis}
+{ output.bibitem
+ format.authors
+ "author" output.check
+ author format.key output % added
+ output.year.check % added
+ new.block
+ format.btitle
+ "title" output.check
+ new.block
+ "PhD thesis" format.thesis.type output.nonnull
+ school "school" output.check
+ address output
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {proceedings}
+{ output.bibitem
+ editor empty$
+ { organization output }
+ { format.editors.dot output.nonnull }
+ if$
+ author format.key output % added
+ output.year.check % added
+ new.block
+ format.btitle
+ "title" output.check
+ format.bvolume output
+ format.number.series output
+ address output
+ new.sentence
+ organization output
+ publisher output
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {techreport}
+{ output.bibitem
+ format.authors
+ "author" output.check
+ author format.key output % added
+ output.year.check % added
+ new.block
+ format.title
+ "title" output.check
+ new.block
+ format.tr.number output.nonnull
+ institution
+ "institution" output.check
+ address output
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {unpublished}
+{ output.bibitem
+ format.authors
+ "author" output.check
+ author format.key output % added
+ output.year.check % added
+ new.block
+ format.title
+ "title" output.check
+ new.block
+ note "note" output.check
+ fin.entry
+}
+
+FUNCTION {default.type} { misc }
+
+MACRO {jan} {"January"}
+
+MACRO {feb} {"February"}
+
+MACRO {mar} {"March"}
+
+MACRO {apr} {"April"}
+
+MACRO {may} {"May"}
+
+MACRO {jun} {"June"}
+
+MACRO {jul} {"July"}
+
+MACRO {aug} {"August"}
+
+MACRO {sep} {"September"}
+
+MACRO {oct} {"October"}
+
+MACRO {nov} {"November"}
+
+MACRO {dec} {"December"}
+
+MACRO {acmcs} {"ACM Computing Surveys"}
+
+MACRO {acta} {"Acta Informatica"}
+
+MACRO {ai} {"Artificial Intelligence"}
+
+MACRO {cacm} {"Communications of the ACM"}
+
+MACRO {ibmjrd} {"IBM Journal of Research and Development"}
+
+MACRO {ibmsj} {"IBM Systems Journal"}
+
+MACRO {ieeese} {"IEEE Transactions on Software Engineering"}
+
+MACRO {ieeetc} {"IEEE Transactions on Computers"}
+
+MACRO {ieeetcad}
+ {"IEEE Transactions on Computer-Aided Design of Integrated Circuits"}
+
+MACRO {ipl} {"Information Processing Letters"}
+
+MACRO {jacm} {"Journal of the ACM"}
+
+MACRO {jcss} {"Journal of Computer and System Sciences"}
+
+MACRO {scp} {"Science of Computer Programming"}
+
+MACRO {sicomp} {"SIAM Journal on Computing"}
+
+MACRO {tocs} {"ACM Transactions on Computer Systems"}
+
+MACRO {tods} {"ACM Transactions on Database Systems"}
+
+MACRO {tog} {"ACM Transactions on Graphics"}
+
+MACRO {toms} {"ACM Transactions on Mathematical Software"}
+
+MACRO {toois} {"ACM Transactions on Office Information Systems"}
+
+MACRO {toplas} {"ACM Transactions on Programming Languages and Systems"}
+
+MACRO {tcs} {"Theoretical Computer Science"}
+
+READ
+
+FUNCTION {sortify}
+{ purify$
+ "l" change.case$
+}
+
+INTEGERS { len }
+
+FUNCTION {chop.word}
+{ 's :=
+ 'len :=
+ s #1 len substring$ =
+ { s len #1 + global.max$ substring$ }
+ 's
+ if$
+}
+
+INTEGERS { fullptr numfull fullsleft }
+
+STRINGS { u1 u2 }
+
+FUNCTION {my.full.label}
+{
+% Initialize 'u1','u2','s'.
+ "" 'u1 :=
+ "" 'u2 :=
+ 's :=
+
+% Initialize 'fullptr','numfull','fullsleft'.
+ #1 'fullptr :=
+ s num.names$ 'numfull :=
+ numfull 'fullsleft :=
+
+% enter the while loop which generates the first-citation information.
+% while we have names left,
+% format the next name
+% if this is the next-to-last name, tack the ampersand on the end
+% else if this isn't the last name, tack the comma on the end.
+% concatenate the next name onto the first-citation string.
+% update the counters.
+
+ { fullsleft #0 > }
+ { s fullptr "{vv~}{ll}" format.name$ 'u1 :=
+ fullsleft #2 =
+ { u1 " \& " * 'u1 := }
+ { fullsleft #2 >
+ { u1 ", " * 'u1 := }
+ 'skip$
+ if$
+ }
+ if$
+ u2 u1 * 'u2 :=
+ fullptr #1 + 'fullptr :=
+ fullsleft #1 - 'fullsleft :=
+ }
+ while$
+
+% push 'u2' onto the stack -- our first-citation information.
+ u2
+}
+
+FUNCTION {format.lab.names}
+{ 's :=
+ s #1 "{vv~}{ll}" format.name$
+ s num.names$ duplicate$
+ #2 >
+ { pop$ " et~al." * }
+ { #2 <
+ 'skip$
+ { s #2 "{ff }{vv }{ll}{ jj}" format.name$ "others" =
+ { "et~al. " * }
+% { " and " * s #2 "{vv~}{ll}" format.name$ * }
+ { " \& " * s #2 "{vv~}{ll}" format.name$ * }
+ if$
+ }
+ if$
+ }
+ if$
+}
+
+FUNCTION {author.key.label}
+{ author empty$
+ { key empty$
+ { cite$ #1 #3 substring$ }
+ 'key
+ if$
+ }
+ { author format.lab.names }
+ if$
+}
+
+FUNCTION {editor.key.label}
+{ editor empty$
+ { key empty$
+ { cite$ #1 #3 substring$ }
+ 'key
+ if$
+ }
+ { editor format.lab.names }
+ if$
+}
+
+FUNCTION {author.editor.key.label}
+{ author empty$
+ { editor empty$
+ { key empty$
+ { cite$ #1 #3 substring$ }
+ 'key
+ if$
+ }
+ { editor format.lab.names }
+ if$
+ }
+ { author format.lab.names }
+ if$
+}
+
+FUNCTION {calc.label}
+{ type$ "book" =
+ type$ "inbook" =
+ or
+ 'author.editor.key.label
+ { type$ "proceedings" =
+ 'editor.key.label
+ 'author.key.label
+ if$
+ }
+ if$
+ duplicate$
+
+ author my.full.label % generate the first-citation information.
+
+ "\protect\citeauthoryear{" swap$ * "}{" * swap$ * "}{" *
+ year field.or.null purify$ #-1 #4 substring$ *
+ 'label :=
+ year field.or.null purify$ #-1 #4 substring$ *
+ sortify 'sort.label :=
+}
+
+FUNCTION {sort.format.names}
+{ 's :=
+ #1 'nameptr :=
+ ""
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ { nameptr #1 >
+ { " " * }
+ 'skip$
+ if$
+ s nameptr "{vv{ } }{ll{ }}{ f{ }}{ jj{ }}" format.name$ 't :=
+ nameptr numnames = t "others" = and
+ { "et al" * }
+ { t sortify * }
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+}
+
+FUNCTION {sort.format.title}
+{ 't :=
+ "A " #2
+ "An " #3
+ "The " #4 t chop.word
+ chop.word
+ chop.word
+ sortify
+ #1 global.max$ substring$
+}
+
+FUNCTION {author.sort}
+{ author empty$
+ { key empty$
+ { "to sort, need author or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { author sort.format.names }
+ if$
+}
+
+FUNCTION {editor.sort}
+{ editor empty$
+ { key empty$
+ { "to sort, need editor or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { editor sort.format.names }
+ if$
+}
+
+FUNCTION {author.editor.sort}
+{ author empty$
+ { editor empty$
+ { key empty$
+ { "to sort, need author, editor, or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { editor sort.format.names }
+ if$
+ }
+ { author sort.format.names }
+ if$
+}
+
+FUNCTION {presort}
+{ calc.label
+ label sortify
+ " "
+ *
+ type$ "book" =
+ type$ "inbook" =
+ or
+ 'author.editor.sort
+ { type$ "proceedings" =
+ 'editor.sort
+ 'author.sort
+ if$
+ }
+ if$
+ #1 entry.max$ substring$ % added for newapa
+ 'sort.label := % added for newapa
+ sort.label % added for newapa
+ *
+ " "
+ *
+ title field.or.null
+ sort.format.title
+ *
+ #1 entry.max$ substring$
+ 'sort.key$ :=
+}
+
+ITERATE {presort}
+
+SORT % by label, sort.label, title --- for final label calculation
+
+STRINGS { last.label next.extra }
+
+INTEGERS { last.extra.num }
+
+FUNCTION {initialize.extra.label.stuff}
+{ #0 int.to.chr$ 'last.label :=
+ "" 'next.extra :=
+ #0 'last.extra.num :=
+}
+
+FUNCTION {forward.pass}
+{ last.label label =
+ { last.extra.num #1 + 'last.extra.num :=
+ last.extra.num int.to.chr$ 'extra.label :=
+ }
+ { "a" chr.to.int$ 'last.extra.num :=
+ "" 'extra.label :=
+ label 'last.label :=
+ }
+ if$
+}
+
+FUNCTION {reverse.pass}
+{ next.extra "b" =
+ { "a" 'extra.label := }
+ 'skip$
+ if$
+ label extra.label * "}" * 'label :=
+ extra.label 'next.extra :=
+}
+
+EXECUTE {initialize.extra.label.stuff}
+
+ITERATE {forward.pass}
+
+REVERSE {reverse.pass}
+
+FUNCTION {bib.sort.order}
+{ sort.label
+ " "
+ *
+ year field.or.null sortify
+ *
+ " "
+ *
+ title field.or.null
+ sort.format.title
+ *
+ #1 entry.max$ substring$
+ 'sort.key$ :=
+}
+
+ITERATE {bib.sort.order}
+
+SORT % by sort.label, year, title --- giving final bib. order.
+
+FUNCTION {begin.bib}
+
+{ preamble$ empty$
+ 'skip$
+ { preamble$ write$ newline$ }
+ if$
+ "\begin{thebibliography}{}" write$ newline$
+}
+
+
+EXECUTE {begin.bib}
+
+EXECUTE {init.state.consts}
+
+ITERATE {call.type$}
+
+FUNCTION {end.bib}
+{ newline$
+ "\end{thebibliography}" write$ newline$
+}
+
+EXECUTE {end.bib}
+
+
diff --git a/biblio/bibtex/contrib/newapa/newapa.sty b/biblio/bibtex/contrib/newapa/newapa.sty
new file mode 100644
index 0000000000..b00953e932
--- /dev/null
+++ b/biblio/bibtex/contrib/newapa/newapa.sty
@@ -0,0 +1,265 @@
+%$$$ newapa.sty $$$ --- June 13, 1991 (Version 2.0)
+% - Version No. has not been kept, but let's say uh uh ... Version 2.0.
+%
+% This file implements citations for the ``newapa'' bibliography style.
+%
+% Stephen N. Spencer
+% modified the ``apalike'' LaTeX style
+% Young U. Ryu
+% further modified
+%
+% SEE THE FOLLOWING COMMENTS. THEY CONSISTS OF 4 SECTIONS
+% 1 - newapa.bst and \bibitem entry
+% 2 - citation formats
+% 3 - changing citation functions (if you want)
+% 4 - enforcing APA style section heading (if you want)
+%
+%%%%%
+% [1] newapa.bst and \bibitem entry
+%
+% The ``newapa.bst'' BibTeX bibliography style creates citations with labels:
+% \citeauthoryear{author-info}{abbrev. author-info}{year}
+%
+%%%%%
+% [2] Citation Formats
+%
+% The citations are enclosed within parentheses. ``(,)''
+% as default. But one may change them.
+% Short author lists use the ``et al.'' construct.
+% These labels are processed by the following LaTeX commands:
+%
+% \cite[optional notes]{Key(s)}
+% -> (Authors1, Year1; Authors2, Year2; ..., optional notes)
+% \citeA[optional notes]{key}
+% -> Authors (Year, optional notes)
+% Note: ONE AND ONLY ONE KEY.
+% \citeA[pp.~3--5]{Apt88,Lloyd87} does not make sense at all.
+% In this case, the outcome will look aweful.
+% \citeB{keys}
+% -> Authors1 (Year1), Authors2 (Year2), ...
+% Note: \citeB[Notes]{keys} are given, notes will be ingored,
+% because it does not make sense at all.
+% \citeauthor[optional notes]{key}
+% -> Authors1, Authors2, ..., optional notes
+%
+% The difference between `\shortciteXXX' and `\citeXXX':
+% is that `\shortciteXXX' gives `First author et al.'
+% if no. authors >= 3.
+%
+% \shortcite[optional notes]{Key(s)}
+% -> (Short Authors1, Year1; Short Authors2, Year2; ..., optional notes)
+% \shortciteA[optional notes]{key}
+% -> Short Authors (Year, optional notes)
+% Note: ONE AND ONLY ONE KEY.
+% \shortciteA[pp.~3--5]{Apt88,Lloyd87} does not make sense at all.
+% In this case, the outcome will look aweful.
+% \shortciteB{keys}
+% -> Authors1 (Year1), Authors2 (Year2), ...
+% Note: \citeB[Notes]{keys} are given, notes will be ingored,
+% because it does not make sense at all.
+% \shortciteauthor[optional notes]{key}
+% -> Short Authors1, Short Authors2, ..., optional notes
+%
+% \citeyear[optional notes]{key}
+% -> (Year, optional notes)
+%
+%%%%%
+% [3] Changing Citation Punctuations
+%
+% However, you may change citation punctuations.
+% \citepunct{open paren}%
+% {between authors}%
+% {between author year}%
+% {between citations}%
+% {before notes}%
+% {closing paren}
+%
+% For example,
+% \citepunct{[}{and}{ }{, }{: }{]}
+% - use square brackets
+% `and' between authors
+% space between author and year
+% comma between citations
+% comma before notes
+% e.g. [Apt and van Emden 1986, Lloyd 1985: Notes]
+%
+% The default is:
+% \citepunct{(}{\&}{, }{; }{, }{)}
+%
+% Notice spaces around punctuations in \citepunct!!!
+%
+%%%%%
+% [4] Enforcing APA Style Section Heading
+%
+% \newapasectioning redefines section headings as described
+% by the APA Publication Manual
+% \section - level 1 (toc entry, paageheading)
+% \subsection - level 2 (toc entry)
+% \subsection - level 3 (toc entry)
+% \paragraph - level 4
+% \subparagraph - level 3
+%
+% if place * after \section, \subsection, \subsubsection
+% section headings are not listed in the table of contents
+%
+\def\citestarts{(}
+\def\betweenauthors{\&}
+\def\betweenauthoryear{, }
+\def\betweencites{; }
+\def\beforenote{, }
+\def\citeends{)}
+%
+\def\citepunct#1#2#3#4#5#6{%
+ \def\citestarts{#1}
+ \def\betweenauthors{#2}
+ \def\betweenauthoryear{#3}
+ \def\betweencites{#4}
+ \def\beforenote{#5}
+ \def\citeends{#6} }
+%
+\let\@internalcite\cite
+%
+%
+\def\cite{\def\@citeseppen{-1000}%
+ \def\@cite##1##2{%
+ \citestarts##1\if@tempswa \beforenote##2\fi\citeends}%
+ \def\citeauthoryear##1##2##3{##1\betweenauthoryear##3}\@internalcite}
+\def\citeA{\def\@citeseppen{-1000}%
+ \def\@cite##1##2{%
+ ##1\if@tempswa \beforenote##2\fi\citeends}%
+ \def\citeauthoryear##1##2##3{##1 \citestarts##3}\@citedata}
+\def\citeB{\def\@citeseppen{-1000}%
+ \def\@cite##1##2{##1}%
+ \def\citeauthoryear##1##2##3{##1 \citestarts##3\citeends}\@citedata}
+\def\citeauthor{\def\@citeseppen{-1000}%
+ \def\@cite##1##2{%
+ ##1\if@tempswa \beforenote##2\fi}%
+ \def\citeauthoryear##1##2##3{##1}\@citedata}
+%
+%
+\def\shortcite{\def\@citeseppen{-1000}%
+ \def\@cite##1##2{%
+ \citestarts##1\if@tempswa \beforenote##2\fi\citeends}%
+ \def\citeauthoryear##1##2##3{##2\betweenauthoryear##3}\@internalcite}
+\def\shortciteA{\def\@citeseppen{-1000}%
+ \def\@cite##1##2{%
+ ##1\if@tempswa \beforenote##2\fi\citeends}%
+ \def\citeauthoryear##1##2##3{##2 \citestarts##3}\@citedata}
+\def\shortciteB{\def\@citeseppen{-1000}%
+ \def\@cite##1##2{##1}%
+ \def\citeauthoryear##1##2##3{##2 \citestarts##3\citeends}\@citedata}
+\def\shortciteauthor{\def\@citeseppen{-1000}%
+ \def\@cite##1##2{%
+ ##1\if@tempswa \beforenote##2\fi}%
+ \def\citeauthoryear##1##2##3{##2}\@citedata}
+%
+\def\citeyear{\def\@citeseppen{-1000}%
+ \def\@cite##1##2{%
+ \citestarts##1\if@tempswa \beforenote##2\fi\citeends}%
+ \def\citeauthoryear##1##2##3{##3}\@citedata}
+%
+\def\@citedata{\@ifnextchar[{\@tempswatrue\@citedatax}{\@tempswafalse\@citedatax[]}}
+%
+\def\@citedatax[#1]#2{%
+\if@filesw\immediate\write\@auxout{\string\citation{#2}}\fi
+ \def\@citea{}\@cite{\@for\@citeb:=#2\do
+ {\@citea\def\@citea{\betweencites}\@ifundefined
+ {b@\@citeb}{{\bf ?}\@warning
+ {Citation `\@citeb' on page \thepage \space undefined}}
+{\csname b@\@citeb\endcsname}}}{#1}}
+%
+\def\@citex[#1]#2{%
+\if@filesw\immediate\write\@auxout{\string\citation{#2}}\fi
+ \def\@citea{}\@cite{\@for\@citeb:=#2\do
+ {\@citea\def\@citea{\betweencites}\@ifundefined
+ {b@\@citeb}{{\bf ?}\@warning
+ {Citation `\@citeb' on page \thepage \space undefined}}%
+{\csname b@\@citeb\endcsname}}}{#1}}
+%
+% (from apalike.sty)
+% No labels in the bibliography.
+% Set length of hanging indentation for bibliography entries.
+\def\@biblabel#1{}
+\newlength{\bibhang}
+\setlength{\bibhang}{2em}
+%
+\def\thebibliography#1{\section*{References}
+ \addcontentsline{toc}{section}{References}
+ \list
+ {\relax}{\setlength{\labelsep}{0em}
+ \setlength{\itemindent}{-\bibhang}
+ \setlength{\leftmargin}{\bibhang}}
+ \def\newblock{\hskip .11em plus .33em minus .07em}
+ \sloppy\clubpenalty4000\widowpenalty4000
+ \sfcode`\.=1000\relax}
+%
+%
+%
+%%% Sectioning
+
+\def\newapasectioning{
+ \newlength{\sectionheadwidth}
+ \setlength{\sectionheadwidth}{\textwidth}
+ \addtolength{\sectionheadwidth}{-8em}
+ \let\@internalsection\section
+ \let\@internalsubsection\subsection
+ \let\@internalsubsubsection\subsubsection
+ \let\@internalparagraph\paragraph
+ \let\@internalsubparagraph\subparagraph
+ % Level 1
+ \def\section{\@ifnextchar *{\a@sections}{\a@section}}
+ \def\a@sections##1##2{%
+ \@internalsection*{%
+ \centering\parbox{%
+ \sectionheadwidth}{%
+ \centering\normalsize\bf\uppercase{##2}}\@mkboth{##2}{##2}}}
+ \def\a@section##1{%
+ \addcontentsline{toc}{section}{##1}
+ \@internalsection*{%
+ \centering\parbox{%
+ \sectionheadwidth}{%
+ \centering\normalsize\bf\uppercase{##1}}\@mkboth{##1}{##1}}}
+ % Level 2
+ \def\subsection{\@ifnextchar *{\a@subsections}{\a@subsection}}
+ \def\a@subsections##1##2{%
+ \@internalsubsection*{%
+ \centering\parbox{\sectionheadwidth}{\centering\normalsize\bf##2}}}
+ \def\a@subsection##1{%
+ \addcontentsline{toc}{subsection}{##1}
+ \@internalsubsection*{%
+ \centering\parbox{\sectionheadwidth}{\centering\normalsize\bf##1}}}
+ % Level 3
+ \def\subsubsection{\@ifnextchar *{\a@subsubsections}{\a@subsubsection}}
+ \def\a@subsubsections##1##2{%
+ \@internalsubsubsection*{%
+ \centering\parbox{%
+ \sectionheadwidth}{\centering\normalsize\underbar{##2}}}}
+ \def\a@subsubsection##1{%
+ \addcontentsline{toc}{subsubsection}{##1}
+ \@internalsubsubsection*{%
+ \centering\parbox{%
+ \sectionheadwidth}{\centering\normalsize\underbar{##1}}}}
+ % Level 4
+ \def\a@paragraph##1{%
+ \@internalsubsubsection*{\normalsize\underbar{##1}}}
+ % Level 5
+ \def\a@subparagraph##1{%
+ \@internalsubparagraph*{\normalsize\underbar{##1}.}}
+ % table of contents
+ \def\tableofcontents{%
+ \section*{Contents}\@starttoc{toc}}
+ % list of figures
+ \def\listoffigures{%
+ \section*{List of Figures}\@starttoc{lof}}
+ % list of tables
+ \def\listoftables{%
+ \section*{List of Tables}\@starttoc{lot}}
+ % Change : to . in Figure/Table Caption
+ \long\def\@makecaption##1##2{
+ \vskip 10pt
+ \setbox\@tempboxa\hbox{##1. ##2}
+ \ifdim \wd\@tempboxa >\hsize ##1. ##2\par \else \hbox
+ to\hsize{\hfil\box\@tempboxa\hfil}
+ \fi}
+}
+
diff --git a/biblio/bibtex/contrib/norbib/norabbrv.bst b/biblio/bibtex/contrib/norbib/norabbrv.bst
new file mode 100644
index 0000000000..ab353527bc
--- /dev/null
+++ b/biblio/bibtex/contrib/norbib/norabbrv.bst
@@ -0,0 +1,1096 @@
+% BibTeX standard bibliography style `abbrv'
+ % version 0.99a for BibTeX versions 0.99a or later, LaTeX version 2.09.
+ % Copyright (C) 1985, all rights reserved.
+ % Copying of this file is authorized only if either
+ % (1) you make absolutely no changes to your copy, including name, or
+ % (2) if you do make changes, you name it something other than
+ % btxbst.doc, plain.bst, unsrt.bst, alpha.bst, and abbrv.bst.
+ % This restriction helps ensure that all standard styles are identical.
+ % The file btxbst.doc has the documentation for this style.
+
+% "Translated" into Norwegian by dag@ifi.uio.no, July 1997.
+% Now called `nabbrv'.
+
+ENTRY
+ { address
+ author
+ booktitle
+ chapter
+ edition
+ editor
+ howpublished
+ institution
+ journal
+ key
+ month
+ note
+ number
+ organization
+ pages
+ publisher
+ school
+ series
+ title
+ type
+ volume
+ year
+ }
+ {}
+ { label }
+
+INTEGERS { output.state before.all mid.sentence after.sentence after.block }
+
+FUNCTION {init.state.consts}
+{ #0 'before.all :=
+ #1 'mid.sentence :=
+ #2 'after.sentence :=
+ #3 'after.block :=
+}
+
+STRINGS { s t }
+
+FUNCTION {output.nonnull}
+{ 's :=
+ output.state mid.sentence =
+ { ", " * write$ }
+ { output.state after.block =
+ { add.period$ write$
+ newline$
+ "\newblock " write$
+ }
+ { output.state before.all =
+ 'write$
+ { add.period$ " " * write$ }
+ if$
+ }
+ if$
+ mid.sentence 'output.state :=
+ }
+ if$
+ s
+}
+
+FUNCTION {output}
+{ duplicate$ empty$
+ 'pop$
+ 'output.nonnull
+ if$
+}
+
+FUNCTION {output.check}
+{ 't :=
+ duplicate$ empty$
+ { pop$ "empty " t * " in " * cite$ * warning$ }
+ 'output.nonnull
+ if$
+}
+
+FUNCTION {output.bibitem}
+{ newline$
+ "\bibitem{" write$
+ cite$ write$
+ "}" write$
+ newline$
+ ""
+ before.all 'output.state :=
+}
+
+FUNCTION {fin.entry}
+{ add.period$
+ write$
+ newline$
+}
+
+FUNCTION {new.block}
+{ output.state before.all =
+ 'skip$
+ { after.block 'output.state := }
+ if$
+}
+
+FUNCTION {new.sentence}
+{ output.state after.block =
+ 'skip$
+ { output.state before.all =
+ 'skip$
+ { after.sentence 'output.state := }
+ if$
+ }
+ if$
+}
+
+FUNCTION {not}
+{ { #0 }
+ { #1 }
+ if$
+}
+
+FUNCTION {and}
+{ 'skip$
+ { pop$ #0 }
+ if$
+}
+
+FUNCTION {or}
+{ { pop$ #1 }
+ 'skip$
+ if$
+}
+
+FUNCTION {new.block.checka}
+{ empty$
+ 'skip$
+ 'new.block
+ if$
+}
+
+FUNCTION {new.block.checkb}
+{ empty$
+ swap$ empty$
+ and
+ 'skip$
+ 'new.block
+ if$
+}
+
+FUNCTION {new.sentence.checka}
+{ empty$
+ 'skip$
+ 'new.sentence
+ if$
+}
+
+FUNCTION {new.sentence.checkb}
+{ empty$
+ swap$ empty$
+ and
+ 'skip$
+ 'new.sentence
+ if$
+}
+
+FUNCTION {field.or.null}
+{ duplicate$ empty$
+ { pop$ "" }
+ 'skip$
+ if$
+}
+
+FUNCTION {emphasize}
+{ duplicate$ empty$
+ { pop$ "" }
+ { "{\em " swap$ * "}" * }
+ if$
+}
+
+INTEGERS { nameptr namesleft numnames }
+
+FUNCTION {format.names}
+{ 's :=
+ #1 'nameptr :=
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ { s nameptr "{f.~}{v }{ll}{~jj}" format.name$ 't :=
+ nameptr #1 >
+ { namesleft #1 >
+ { ", " * t * }
+ { t "others" =
+ { " et~al." * }
+ { " og " * t * }
+ if$
+ }
+ if$
+ }
+ 't
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+}
+
+FUNCTION {format.authors}
+{ author empty$
+ { "" }
+ { author format.names }
+ if$
+}
+
+FUNCTION {format.editors}
+{ editor empty$
+ { "" }
+ { editor format.names
+ editor num.names$ #1 >
+ { ", redakt\o{}rer" * }
+ { ", redakt\o{}r" * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.title}
+{ title empty$
+ { "" }
+ { title "t" change.case$ }
+ if$
+}
+
+FUNCTION {n.dashify}
+{ 't :=
+ ""
+ { t empty$ not }
+ { t #1 #1 substring$ "-" =
+ { t #1 #2 substring$ "--" = not
+ { "--" *
+ t #2 global.max$ substring$ 't :=
+ }
+ { { t #1 #1 substring$ "-" = }
+ { "-" *
+ t #2 global.max$ substring$ 't :=
+ }
+ while$
+ }
+ if$
+ }
+ { t #1 #1 substring$ *
+ t #2 global.max$ substring$ 't :=
+ }
+ if$
+ }
+ while$
+}
+
+FUNCTION {format.date}
+{ year empty$
+ { month empty$
+ { "" }
+ { "there's a month but no year in " cite$ * warning$
+ month
+ }
+ if$
+ }
+ { month empty$
+ 'year
+ { month " " * year * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.btitle}
+{ title emphasize
+}
+
+FUNCTION {tie.or.space.connect}
+{ duplicate$ text.length$ #3 <
+ { "~" }
+ { " " }
+ if$
+ swap$ * *
+}
+
+FUNCTION {either.or.check}
+{ empty$
+ 'pop$
+ { "can't use both " swap$ * " fields in " * cite$ * warning$ }
+ if$
+}
+
+FUNCTION {format.bvolume}
+{ volume empty$
+ { "" }
+ { "bind" volume tie.or.space.connect
+ series empty$
+ 'skip$
+ { " av " * series emphasize * }
+ if$
+ "volume and number" number either.or.check
+ }
+ if$
+}
+
+FUNCTION {format.number.series}
+{ volume empty$
+ { number empty$
+ { series field.or.null }
+ { output.state mid.sentence =
+ { "nr" }
+ { "Nr" }
+ if$
+ number tie.or.space.connect
+ series empty$
+ { "there's a number but no series in " cite$ * warning$ }
+ { " i " * series * }
+ if$
+ }
+ if$
+ }
+ { "" }
+ if$
+}
+
+FUNCTION {format.edition}
+{ edition empty$
+ { "" }
+ { output.state mid.sentence =
+ { edition "l" change.case$ " utgave" * }
+ { edition "t" change.case$ " utgave" * }
+ if$
+ }
+ if$
+}
+
+INTEGERS { multiresult }
+
+FUNCTION {multi.page.check}
+{ 't :=
+ #0 'multiresult :=
+ { multiresult not
+ t empty$ not
+ and
+ }
+ { t #1 #1 substring$
+ duplicate$ "-" =
+ swap$ duplicate$ "," =
+ swap$ "+" =
+ or or
+ { #1 'multiresult := }
+ { t #2 global.max$ substring$ 't := }
+ if$
+ }
+ while$
+ multiresult
+}
+
+FUNCTION {format.pages}
+{ pages empty$
+ { "" }
+ { pages multi.page.check
+ { "side" pages n.dashify tie.or.space.connect }
+ { "side" pages tie.or.space.connect }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.vol.num.pages}
+{ volume field.or.null
+ number empty$
+ 'skip$
+ { "(" number * ")" * *
+ volume empty$
+ { "there's a number but no volume in " cite$ * warning$ }
+ 'skip$
+ if$
+ }
+ if$
+ pages empty$
+ 'skip$
+ { duplicate$ empty$
+ { pop$ format.pages }
+ { ":" * pages n.dashify * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.chapter.pages}
+{ chapter empty$
+ 'format.pages
+ { type empty$
+ { "kapittel" }
+ { type "l" change.case$ }
+ if$
+ chapter tie.or.space.connect
+ pages empty$
+ 'skip$
+ { ", " * format.pages * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.in.ed.booktitle}
+{ booktitle empty$
+ { "" }
+ { editor empty$
+ { "I " booktitle emphasize * }
+ { "I " format.editors * ", " * booktitle emphasize * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {empty.misc.check}
+{ author empty$ title empty$ howpublished empty$
+ month empty$ year empty$ note empty$
+ and and and and and
+ key empty$ not and
+ { "all relevant fields are empty in " cite$ * warning$ }
+ 'skip$
+ if$
+}
+
+FUNCTION {format.thesis.type}
+{ type empty$
+ 'skip$
+ { pop$
+ type "t" change.case$
+ }
+ if$
+}
+
+FUNCTION {format.tr.number}
+{ type empty$
+ { "Rapport" }
+ 'type
+ if$
+ number empty$
+ { "t" change.case$ }
+ { number tie.or.space.connect }
+ if$
+}
+
+FUNCTION {format.article.crossref}
+{ key empty$
+ { journal empty$
+ { "need key or journal for " cite$ * " to crossref " * crossref *
+ warning$
+ ""
+ }
+ { "I {\em " journal * "\/}" * }
+ if$
+ }
+ { "I " key * }
+ if$
+ " \cite{" * crossref * "}" *
+}
+
+FUNCTION {format.crossref.editor}
+{ editor #1 "{vv }{ll}" format.name$
+ editor num.names$ duplicate$
+ #2 >
+ { pop$ " et~al." * }
+ { #2 <
+ 'skip$
+ { editor #2 "{ff~}{vv }{ll}{~jj}" format.name$ "others" =
+ { " et~al." * }
+ { " og " * editor #2 "{vv }{ll}" format.name$ * }
+ if$
+ }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.book.crossref}
+{ volume empty$
+ { "empty volume in " cite$ * "'s crossref of " * crossref * warning$
+ "In "
+ }
+ { "Bind" volume tie.or.space.connect
+ " av " *
+ }
+ if$
+ editor empty$
+ editor field.or.null author field.or.null =
+ or
+ { key empty$
+ { series empty$
+ { "need editor, key, or series for " cite$ * " to crossref " *
+ crossref * warning$
+ "" *
+ }
+ { "{\em " * series * "\/}" * }
+ if$
+ }
+ { key * }
+ if$
+ }
+ { format.crossref.editor * }
+ if$
+ " \cite{" * crossref * "}" *
+}
+
+FUNCTION {format.incoll.inproc.crossref}
+{ editor empty$
+ editor field.or.null author field.or.null =
+ or
+ { key empty$
+ { booktitle empty$
+ { "need editor, key, or booktitle for " cite$ * " to crossref " *
+ crossref * warning$
+ ""
+ }
+ { "I {\em " booktitle * "\/}" * }
+ if$
+ }
+ { "I " key * }
+ if$
+ }
+ { "I " format.crossref.editor * }
+ if$
+ " \cite{" * crossref * "}" *
+}
+
+FUNCTION {article}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.title "title" output.check
+ new.block
+ crossref missing$
+ { journal emphasize "journal" output.check
+ format.vol.num.pages output
+ format.date "year" output.check
+ }
+ { format.article.crossref output.nonnull
+ format.pages output
+ }
+ if$
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {book}
+{ output.bibitem
+ author empty$
+ { format.editors "author and editor" output.check }
+ { format.authors output.nonnull
+ crossref missing$
+ { "author and editor" editor either.or.check }
+ 'skip$
+ if$
+ }
+ if$
+ new.block
+ format.btitle "title" output.check
+ crossref missing$
+ { format.bvolume output
+ new.block
+ format.number.series output
+ new.sentence
+ publisher "publisher" output.check
+ address output
+ }
+ { new.block
+ format.book.crossref output.nonnull
+ }
+ if$
+ format.edition output
+ format.date "year" output.check
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {booklet}
+{ output.bibitem
+ format.authors output
+ new.block
+ format.title "title" output.check
+ howpublished address new.block.checkb
+ howpublished output
+ address output
+ format.date output
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {inbook}
+{ output.bibitem
+ author empty$
+ { format.editors "author and editor" output.check }
+ { format.authors output.nonnull
+ crossref missing$
+ { "author and editor" editor either.or.check }
+ 'skip$
+ if$
+ }
+ if$
+ new.block
+ format.btitle "title" output.check
+ crossref missing$
+ { format.bvolume output
+ format.chapter.pages "chapter and pages" output.check
+ new.block
+ format.number.series output
+ new.sentence
+ publisher "publisher" output.check
+ address output
+ }
+ { format.chapter.pages "chapter and pages" output.check
+ new.block
+ format.book.crossref output.nonnull
+ }
+ if$
+ format.edition output
+ format.date "year" output.check
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {incollection}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.title "title" output.check
+ new.block
+ crossref missing$
+ { format.in.ed.booktitle "booktitle" output.check
+ format.bvolume output
+ format.number.series output
+ format.chapter.pages output
+ new.sentence
+ publisher "publisher" output.check
+ address output
+ format.edition output
+ format.date "year" output.check
+ }
+ { format.incoll.inproc.crossref output.nonnull
+ format.chapter.pages output
+ }
+ if$
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {inproceedings}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.title "title" output.check
+ new.block
+ crossref missing$
+ { format.in.ed.booktitle "booktitle" output.check
+ format.bvolume output
+ format.number.series output
+ format.pages output
+ address empty$
+ { organization publisher new.sentence.checkb
+ organization output
+ publisher output
+ format.date "year" output.check
+ }
+ { address output.nonnull
+ format.date "year" output.check
+ new.sentence
+ organization output
+ publisher output
+ }
+ if$
+ }
+ { format.incoll.inproc.crossref output.nonnull
+ format.pages output
+ }
+ if$
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {conference} { inproceedings }
+
+FUNCTION {manual}
+{ output.bibitem
+ author empty$
+ { organization empty$
+ 'skip$
+ { organization output.nonnull
+ address output
+ }
+ if$
+ }
+ { format.authors output.nonnull }
+ if$
+ new.block
+ format.btitle "title" output.check
+ author empty$
+ { organization empty$
+ { address new.block.checka
+ address output
+ }
+ 'skip$
+ if$
+ }
+ { organization address new.block.checkb
+ organization output
+ address output
+ }
+ if$
+ format.edition output
+ format.date output
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {mastersthesis}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.title "title" output.check
+ new.block
+ "Hovedfagsoppgave" format.thesis.type output.nonnull
+ school "school" output.check
+ address output
+ format.date "year" output.check
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {misc}
+{ output.bibitem
+ format.authors output
+ title howpublished new.block.checkb
+ format.title output
+ howpublished new.block.checka
+ howpublished output
+ format.date output
+ new.block
+ note output
+ fin.entry
+ empty.misc.check
+}
+
+FUNCTION {phdthesis}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.btitle "title" output.check
+ new.block
+ "Doktorgradsoppgave" format.thesis.type output.nonnull
+ school "school" output.check
+ address output
+ format.date "year" output.check
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {proceedings}
+{ output.bibitem
+ editor empty$
+ { organization output }
+ { format.editors output.nonnull }
+ if$
+ new.block
+ format.btitle "title" output.check
+ format.bvolume output
+ format.number.series output
+ address empty$
+ { editor empty$
+ { publisher new.sentence.checka }
+ { organization publisher new.sentence.checkb
+ organization output
+ }
+ if$
+ publisher output
+ format.date "year" output.check
+ }
+ { address output.nonnull
+ format.date "year" output.check
+ new.sentence
+ editor empty$
+ 'skip$
+ { organization output }
+ if$
+ publisher output
+ }
+ if$
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {techreport}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.title "title" output.check
+ new.block
+ format.tr.number output.nonnull
+ institution "institution" output.check
+ address output
+ format.date "year" output.check
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {unpublished}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.title "title" output.check
+ new.block
+ note "note" output.check
+ format.date output
+ fin.entry
+}
+
+FUNCTION {default.type} { misc }
+
+MACRO {jan} {"jan"}
+
+MACRO {feb} {"feb"}
+
+MACRO {mar} {"mar"}
+
+MACRO {apr} {"apr"}
+
+MACRO {may} {"mai"}
+
+MACRO {jun} {"jun"}
+
+MACRO {jul} {"jul"}
+
+MACRO {aug} {"aug"}
+
+MACRO {sep} {"sep"}
+
+MACRO {oct} {"okt"}
+
+MACRO {nov} {"nov"}
+
+MACRO {dec} {"des"}
+
+MACRO {acmcs} {"ACM Comput. Surv."}
+
+MACRO {acta} {"Acta Inf."}
+
+MACRO {cacm} {"Commun. ACM"}
+
+MACRO {ibmjrd} {"IBM J. Res. Dev."}
+
+MACRO {ibmsj} {"IBM Syst.~J."}
+
+MACRO {ieeese} {"IEEE Trans. Softw. Eng."}
+
+MACRO {ieeetc} {"IEEE Trans. Comput."}
+
+MACRO {ieeetcad}
+ {"IEEE Trans. Comput.-Aided Design Integrated Circuits"}
+
+MACRO {ipl} {"Inf. Process. Lett."}
+
+MACRO {jacm} {"J.~ACM"}
+
+MACRO {jcss} {"J.~Comput. Syst. Sci."}
+
+MACRO {scp} {"Sci. Comput. Programming"}
+
+MACRO {sicomp} {"SIAM J. Comput."}
+
+MACRO {tocs} {"ACM Trans. Comput. Syst."}
+
+MACRO {tods} {"ACM Trans. Database Syst."}
+
+MACRO {tog} {"ACM Trans. Gr."}
+
+MACRO {toms} {"ACM Trans. Math. Softw."}
+
+MACRO {toois} {"ACM Trans. Office Inf. Syst."}
+
+MACRO {toplas} {"ACM Trans. Prog. Lang. Syst."}
+
+MACRO {tcs} {"Theoretical Comput. Sci."}
+
+READ
+
+FUNCTION {sortify}
+{ purify$
+ "l" change.case$
+}
+
+INTEGERS { len }
+
+FUNCTION {chop.word}
+{ 's :=
+ 'len :=
+ s #1 len substring$ =
+ { s len #1 + global.max$ substring$ }
+ 's
+ if$
+}
+
+FUNCTION {sort.format.names}
+{ 's :=
+ #1 'nameptr :=
+ ""
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ { nameptr #1 >
+ { " " * }
+ 'skip$
+ if$
+ s nameptr "{ll{ }}{ f{ }}{ vv{ }}{ jj{ }}" format.name$ 't :=
+ nameptr numnames = t "others" = and
+ { "et al" * }
+ { t sortify * }
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+}
+
+FUNCTION {sort.format.title}
+{ 't :=
+ "A " #2
+ "An " #3
+ "The " #4 t chop.word
+ chop.word
+ chop.word
+ sortify
+ #1 global.max$ substring$
+}
+
+FUNCTION {author.sort}
+{ author empty$
+ { key empty$
+ { "to sort, need author or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { author sort.format.names }
+ if$
+}
+
+FUNCTION {author.editor.sort}
+{ author empty$
+ { editor empty$
+ { key empty$
+ { "to sort, need author, editor, or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { editor sort.format.names }
+ if$
+ }
+ { author sort.format.names }
+ if$
+}
+
+FUNCTION {author.organization.sort}
+{ author empty$
+ { organization empty$
+ { key empty$
+ { "to sort, need author, organization, or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { "The " #4 organization chop.word sortify }
+ if$
+ }
+ { author sort.format.names }
+ if$
+}
+
+FUNCTION {editor.organization.sort}
+{ editor empty$
+ { organization empty$
+ { key empty$
+ { "to sort, need editor, organization, or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { organization sortify }
+ if$
+ }
+ { editor sort.format.names }
+ if$
+}
+
+FUNCTION {presort}
+{ type$ "book" =
+ type$ "inbook" =
+ or
+ 'author.editor.sort
+ { type$ "proceedings" =
+ 'editor.organization.sort
+ { type$ "manual" =
+ 'author.organization.sort
+ 'author.sort
+ if$
+ }
+ if$
+ }
+ if$
+ " "
+ *
+ year field.or.null sortify
+ *
+ " "
+ *
+ title field.or.null
+ sort.format.title
+ *
+ #1 entry.max$ substring$
+ 'sort.key$ :=
+}
+
+ITERATE {presort}
+
+SORT
+
+STRINGS { longest.label }
+
+INTEGERS { number.label longest.label.width }
+
+FUNCTION {initialize.longest.label}
+{ "" 'longest.label :=
+ #1 'number.label :=
+ #0 'longest.label.width :=
+}
+
+FUNCTION {longest.label.pass}
+{ number.label int.to.str$ 'label :=
+ number.label #1 + 'number.label :=
+ label width$ longest.label.width >
+ { label 'longest.label :=
+ label width$ 'longest.label.width :=
+ }
+ 'skip$
+ if$
+}
+
+EXECUTE {initialize.longest.label}
+
+ITERATE {longest.label.pass}
+
+FUNCTION {begin.bib}
+{ preamble$ empty$
+ 'skip$
+ { preamble$ write$ newline$ }
+ if$
+ "\begin{thebibliography}{" longest.label * "}" * write$ newline$
+}
+
+EXECUTE {begin.bib}
+
+EXECUTE {init.state.consts}
+
+ITERATE {call.type$}
+
+FUNCTION {end.bib}
+{ newline$
+ "\end{thebibliography}" write$ newline$
+}
+
+EXECUTE {end.bib}
diff --git a/biblio/bibtex/contrib/norbib/noralpha.bst b/biblio/bibtex/contrib/norbib/noralpha.bst
new file mode 100644
index 0000000000..5b3528185d
--- /dev/null
+++ b/biblio/bibtex/contrib/norbib/noralpha.bst
@@ -0,0 +1,1250 @@
+% BibTeX standard bibliography style `alpha'
+ % version 0.99a for BibTeX versions 0.99a or later, LaTeX version 2.09.
+ % Copyright (C) 1985, all rights reserved.
+ % Copying of this file is authorized only if either
+ % (1) you make absolutely no changes to your copy, including name, or
+ % (2) if you do make changes, you name it something other than
+ % btxbst.doc, plain.bst, unsrt.bst, alpha.bst, and abbrv.bst.
+ % This restriction helps ensure that all standard styles are identical.
+ % The file btxbst.doc has the documentation for this style.
+
+% "Translated" into Norwegian by dag@ifi.uio.no, January 1997.
+% Now called `nalpha'.
+
+ENTRY
+ { address
+ author
+ booktitle
+ chapter
+ edition
+ editor
+ howpublished
+ institution
+ journal
+ key
+ month
+ note
+ number
+ organization
+ pages
+ publisher
+ school
+ series
+ title
+ type
+ volume
+ year
+ }
+ {}
+ { label extra.label sort.label }
+
+INTEGERS { output.state before.all mid.sentence after.sentence after.block }
+
+FUNCTION {init.state.consts}
+{ #0 'before.all :=
+ #1 'mid.sentence :=
+ #2 'after.sentence :=
+ #3 'after.block :=
+}
+
+STRINGS { s t }
+
+FUNCTION {output.nonnull}
+{ 's :=
+ output.state mid.sentence =
+ { ", " * write$ }
+ { output.state after.block =
+ { add.period$ write$
+ newline$
+ "\newblock " write$
+ }
+ { output.state before.all =
+ 'write$
+ { add.period$ " " * write$ }
+ if$
+ }
+ if$
+ mid.sentence 'output.state :=
+ }
+ if$
+ s
+}
+
+FUNCTION {output}
+{ duplicate$ empty$
+ 'pop$
+ 'output.nonnull
+ if$
+}
+
+FUNCTION {output.check}
+{ 't :=
+ duplicate$ empty$
+ { pop$ "empty " t * " in " * cite$ * warning$ }
+ 'output.nonnull
+ if$
+}
+
+FUNCTION {output.bibitem}
+{ newline$
+ "\bibitem[" write$
+ label write$
+ "]{" write$
+ cite$ write$
+ "}" write$
+ newline$
+ ""
+ before.all 'output.state :=
+}
+
+FUNCTION {fin.entry}
+{ add.period$
+ write$
+ newline$
+}
+
+FUNCTION {new.block}
+{ output.state before.all =
+ 'skip$
+ { after.block 'output.state := }
+ if$
+}
+
+FUNCTION {new.sentence}
+{ output.state after.block =
+ 'skip$
+ { output.state before.all =
+ 'skip$
+ { after.sentence 'output.state := }
+ if$
+ }
+ if$
+}
+
+FUNCTION {not}
+{ { #0 }
+ { #1 }
+ if$
+}
+
+FUNCTION {and}
+{ 'skip$
+ { pop$ #0 }
+ if$
+}
+
+FUNCTION {or}
+{ { pop$ #1 }
+ 'skip$
+ if$
+}
+
+FUNCTION {new.block.checka}
+{ empty$
+ 'skip$
+ 'new.block
+ if$
+}
+
+FUNCTION {new.block.checkb}
+{ empty$
+ swap$ empty$
+ and
+ 'skip$
+ 'new.block
+ if$
+}
+
+FUNCTION {new.sentence.checka}
+{ empty$
+ 'skip$
+ 'new.sentence
+ if$
+}
+
+FUNCTION {new.sentence.checkb}
+{ empty$
+ swap$ empty$
+ and
+ 'skip$
+ 'new.sentence
+ if$
+}
+
+FUNCTION {field.or.null}
+{ duplicate$ empty$
+ { pop$ "" }
+ 'skip$
+ if$
+}
+
+FUNCTION {emphasize}
+{ duplicate$ empty$
+ { pop$ "" }
+ { "{\em " swap$ * "}" * }
+ if$
+}
+
+INTEGERS { nameptr namesleft numnames }
+
+FUNCTION {format.names}
+{ 's :=
+ #1 'nameptr :=
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ { s nameptr "{ff~}{vv }{ll}{~jj}" format.name$ 't :=
+ nameptr #1 >
+ { namesleft #1 >
+ { ", " * t * }
+ { t "others" =
+ { " et~al." * }
+ { " og " * t * }
+ if$
+ }
+ if$
+ }
+ 't
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+}
+
+FUNCTION {format.authors}
+{ author empty$
+ { "" }
+ { author format.names }
+ if$
+}
+
+FUNCTION {format.editors}
+{ editor empty$
+ { "" }
+ { editor format.names
+ editor num.names$ #1 >
+ { ", redakt\o{}rer" * }
+ { ", redakt\o{}r" * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.title}
+{ title empty$
+ { "" }
+ { title "t" change.case$ }
+ if$
+}
+
+FUNCTION {n.dashify}
+{ 't :=
+ ""
+ { t empty$ not }
+ { t #1 #1 substring$ "-" =
+ { t #1 #2 substring$ "--" = not
+ { "--" *
+ t #2 global.max$ substring$ 't :=
+ }
+ { { t #1 #1 substring$ "-" = }
+ { "-" *
+ t #2 global.max$ substring$ 't :=
+ }
+ while$
+ }
+ if$
+ }
+ { t #1 #1 substring$ *
+ t #2 global.max$ substring$ 't :=
+ }
+ if$
+ }
+ while$
+}
+
+FUNCTION {format.date}
+{ year empty$
+ { month empty$
+ { "" }
+ { "there's a month but no year in " cite$ * warning$
+ month
+ }
+ if$
+ }
+ { month empty$
+ 'year
+ { month " " * year * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.btitle}
+{ title emphasize
+}
+
+FUNCTION {tie.or.space.connect}
+{ duplicate$ text.length$ #3 <
+ { "~" }
+ { " " }
+ if$
+ swap$ * *
+}
+
+FUNCTION {either.or.check}
+{ empty$
+ 'pop$
+ { "can't use both " swap$ * " fields in " * cite$ * warning$ }
+ if$
+}
+
+FUNCTION {format.bvolume}
+{ volume empty$
+ { "" }
+ { "bind" volume tie.or.space.connect
+ series empty$
+ 'skip$
+ { " av " * series emphasize * }
+ if$
+ "volume and number" number either.or.check
+ }
+ if$
+}
+
+FUNCTION {format.number.series}
+{ volume empty$
+ { number empty$
+ { series field.or.null }
+ { output.state mid.sentence =
+ { "nr" }
+ { "Nr" }
+ if$
+ number tie.or.space.connect
+ series empty$
+ { "there's a number but no series in " cite$ * warning$ }
+ { " i " * series * }
+ if$
+ }
+ if$
+ }
+ { "" }
+ if$
+}
+
+FUNCTION {format.edition}
+{ edition empty$
+ { "" }
+ { output.state mid.sentence =
+ { edition "l" change.case$ " utgave" * }
+ { edition "t" change.case$ " utgave" * }
+ if$
+ }
+ if$
+}
+
+INTEGERS { multiresult }
+
+FUNCTION {multi.page.check}
+{ 't :=
+ #0 'multiresult :=
+ { multiresult not
+ t empty$ not
+ and
+ }
+ { t #1 #1 substring$
+ duplicate$ "-" =
+ swap$ duplicate$ "," =
+ swap$ "+" =
+ or or
+ { #1 'multiresult := }
+ { t #2 global.max$ substring$ 't := }
+ if$
+ }
+ while$
+ multiresult
+}
+
+FUNCTION {format.pages}
+{ pages empty$
+ { "" }
+ { pages multi.page.check
+ { "side" pages n.dashify tie.or.space.connect }
+ { "side" pages tie.or.space.connect }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.vol.num.pages}
+{ volume field.or.null
+ number empty$
+ 'skip$
+ { "(" number * ")" * *
+ volume empty$
+ { "there's a number but no volume in " cite$ * warning$ }
+ 'skip$
+ if$
+ }
+ if$
+ pages empty$
+ 'skip$
+ { duplicate$ empty$
+ { pop$ format.pages }
+ { ":" * pages n.dashify * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.chapter.pages}
+{ chapter empty$
+ 'format.pages
+ { type empty$
+ { "kapittel" }
+ { type "l" change.case$ }
+ if$
+ chapter tie.or.space.connect
+ pages empty$
+ 'skip$
+ { ", " * format.pages * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.in.ed.booktitle}
+{ booktitle empty$
+ { "" }
+ { editor empty$
+ { "I " booktitle emphasize * }
+ { "I " format.editors * ", " * booktitle emphasize * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {empty.misc.check}
+{ author empty$ title empty$ howpublished empty$
+ month empty$ year empty$ note empty$
+ and and and and and
+ key empty$ not and
+ { "all relevant fields are empty in " cite$ * warning$ }
+ 'skip$
+ if$
+}
+
+FUNCTION {format.thesis.type}
+{ type empty$
+ 'skip$
+ { pop$
+ type "t" change.case$
+ }
+ if$
+}
+
+FUNCTION {format.tr.number}
+{ type empty$
+ { "Rapport" }
+ 'type
+ if$
+ number empty$
+ { "t" change.case$ }
+ { number tie.or.space.connect }
+ if$
+}
+
+FUNCTION {format.article.crossref}
+{ key empty$
+ { journal empty$
+ { "need key or journal for " cite$ * " to crossref " * crossref *
+ warning$
+ ""
+ }
+ { "I {\em " journal * "\/}" * }
+ if$
+ }
+ { "I " key * }
+ if$
+ " \cite{" * crossref * "}" *
+}
+
+FUNCTION {format.crossref.editor}
+{ editor #1 "{vv }{ll}" format.name$
+ editor num.names$ duplicate$
+ #2 >
+ { pop$ " et~al." * }
+ { #2 <
+ 'skip$
+ { editor #2 "{ff~}{vv }{ll}{~jj}" format.name$ "others" =
+ { " et~al." * }
+ { " og " * editor #2 "{vv }{ll}" format.name$ * }
+ if$
+ }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.book.crossref}
+{ volume empty$
+ { "empty volume in " cite$ * "'s crossref of " * crossref * warning$
+ "I "
+ }
+ { "Bind" volume tie.or.space.connect
+ " av " *
+ }
+ if$
+ editor empty$
+ editor field.or.null author field.or.null =
+ or
+ { key empty$
+ { series empty$
+ { "need editor, key, or series for " cite$ * " to crossref " *
+ crossref * warning$
+ "" *
+ }
+ { "{\em " * series * "\/}" * }
+ if$
+ }
+ { key * }
+ if$
+ }
+ { format.crossref.editor * }
+ if$
+ " \cite{" * crossref * "}" *
+}
+
+FUNCTION {format.incoll.inproc.crossref}
+{ editor empty$
+ editor field.or.null author field.or.null =
+ or
+ { key empty$
+ { booktitle empty$
+ { "need editor, key, or booktitle for " cite$ * " to crossref " *
+ crossref * warning$
+ ""
+ }
+ { "I {\em " booktitle * "\/}" * }
+ if$
+ }
+ { "I " key * }
+ if$
+ }
+ { "I " format.crossref.editor * }
+ if$
+ " \cite{" * crossref * "}" *
+}
+
+FUNCTION {article}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.title "title" output.check
+ new.block
+ crossref missing$
+ { journal emphasize "journal" output.check
+ format.vol.num.pages output
+ format.date "year" output.check
+ }
+ { format.article.crossref output.nonnull
+ format.pages output
+ }
+ if$
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {book}
+{ output.bibitem
+ author empty$
+ { format.editors "author and editor" output.check }
+ { format.authors output.nonnull
+ crossref missing$
+ { "author and editor" editor either.or.check }
+ 'skip$
+ if$
+ }
+ if$
+ new.block
+ format.btitle "title" output.check
+ crossref missing$
+ { format.bvolume output
+ new.block
+ format.number.series output
+ new.sentence
+ publisher "publisher" output.check
+ address output
+ }
+ { new.block
+ format.book.crossref output.nonnull
+ }
+ if$
+ format.edition output
+ format.date "year" output.check
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {booklet}
+{ output.bibitem
+ format.authors output
+ new.block
+ format.title "title" output.check
+ howpublished address new.block.checkb
+ howpublished output
+ address output
+ format.date output
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {inbook}
+{ output.bibitem
+ author empty$
+ { format.editors "author and editor" output.check }
+ { format.authors output.nonnull
+ crossref missing$
+ { "author and editor" editor either.or.check }
+ 'skip$
+ if$
+ }
+ if$
+ new.block
+ format.btitle "title" output.check
+ crossref missing$
+ { format.bvolume output
+ format.chapter.pages "chapter and pages" output.check
+ new.block
+ format.number.series output
+ new.sentence
+ publisher "publisher" output.check
+ address output
+ }
+ { format.chapter.pages "chapter and pages" output.check
+ new.block
+ format.book.crossref output.nonnull
+ }
+ if$
+ format.edition output
+ format.date "year" output.check
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {incollection}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.title "title" output.check
+ new.block
+ crossref missing$
+ { format.in.ed.booktitle "booktitle" output.check
+ format.bvolume output
+ format.number.series output
+ format.chapter.pages output
+ new.sentence
+ publisher "publisher" output.check
+ address output
+ format.edition output
+ format.date "year" output.check
+ }
+ { format.incoll.inproc.crossref output.nonnull
+ format.chapter.pages output
+ }
+ if$
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {inproceedings}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.title "title" output.check
+ new.block
+ crossref missing$
+ { format.in.ed.booktitle "booktitle" output.check
+ format.bvolume output
+ format.number.series output
+ format.pages output
+ address empty$
+ { organization publisher new.sentence.checkb
+ organization output
+ publisher output
+ format.date "year" output.check
+ }
+ { address output.nonnull
+ format.date "year" output.check
+ new.sentence
+ organization output
+ publisher output
+ }
+ if$
+ }
+ { format.incoll.inproc.crossref output.nonnull
+ format.pages output
+ }
+ if$
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {conference} { inproceedings }
+
+FUNCTION {manual}
+{ output.bibitem
+ author empty$
+ { organization empty$
+ 'skip$
+ { organization output.nonnull
+ address output
+ }
+ if$
+ }
+ { format.authors output.nonnull }
+ if$
+ new.block
+ format.btitle "title" output.check
+ author empty$
+ { organization empty$
+ { address new.block.checka
+ address output
+ }
+ 'skip$
+ if$
+ }
+ { organization address new.block.checkb
+ organization output
+ address output
+ }
+ if$
+ format.edition output
+ format.date output
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {mastersthesis}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.title "title" output.check
+ new.block
+ "Hovedfagsoppgave" format.thesis.type output.nonnull
+ school "school" output.check
+ address output
+ format.date "year" output.check
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {misc}
+{ output.bibitem
+ format.authors output
+ title howpublished new.block.checkb
+ format.title output
+ howpublished new.block.checka
+ howpublished output
+ format.date output
+ new.block
+ note output
+ fin.entry
+ empty.misc.check
+}
+
+FUNCTION {phdthesis}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.btitle "title" output.check
+ new.block
+ "Doktorgradsoppgave" format.thesis.type output.nonnull
+ school "school" output.check
+ address output
+ format.date "year" output.check
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {proceedings}
+{ output.bibitem
+ editor empty$
+ { organization output }
+ { format.editors output.nonnull }
+ if$
+ new.block
+ format.btitle "title" output.check
+ format.bvolume output
+ format.number.series output
+ address empty$
+ { editor empty$
+ { publisher new.sentence.checka }
+ { organization publisher new.sentence.checkb
+ organization output
+ }
+ if$
+ publisher output
+ format.date "year" output.check
+ }
+ { address output.nonnull
+ format.date "year" output.check
+ new.sentence
+ editor empty$
+ 'skip$
+ { organization output }
+ if$
+ publisher output
+ }
+ if$
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {techreport}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.title "title" output.check
+ new.block
+ format.tr.number output.nonnull
+ institution "institution" output.check
+ address output
+ format.date "year" output.check
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {unpublished}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.title "title" output.check
+ new.block
+ note "note" output.check
+ format.date output
+ fin.entry
+}
+
+FUNCTION {default.type} { misc }
+
+MACRO {jan} {"januar"}
+
+MACRO {feb} {"februar"}
+
+MACRO {mar} {"mars"}
+
+MACRO {apr} {"april"}
+
+MACRO {may} {"mai"}
+
+MACRO {jun} {"juni"}
+
+MACRO {jul} {"juli"}
+
+MACRO {aug} {"august"}
+
+MACRO {sep} {"september"}
+
+MACRO {oct} {"oktober"}
+
+MACRO {nov} {"november"}
+
+MACRO {dec} {"desember"}
+
+MACRO {acmcs} {"ACM Computing Surveys"}
+
+MACRO {acta} {"Acta Informatica"}
+
+MACRO {cacm} {"Communications of the ACM"}
+
+MACRO {ibmjrd} {"IBM Journal of Research and Development"}
+
+MACRO {ibmsj} {"IBM Systems Journal"}
+
+MACRO {ieeese} {"IEEE Transactions on Software Engineering"}
+
+MACRO {ieeetc} {"IEEE Transactions on Computers"}
+
+MACRO {ieeetcad}
+ {"IEEE Transactions on Computer-Aided Design of Integrated Circuits"}
+
+MACRO {ipl} {"Information Processing Letters"}
+
+MACRO {jacm} {"Journal of the ACM"}
+
+MACRO {jcss} {"Journal of Computer and System Sciences"}
+
+MACRO {scp} {"Science of Computer Programming"}
+
+MACRO {sicomp} {"SIAM Journal on Computing"}
+
+MACRO {tocs} {"ACM Transactions on Computer Systems"}
+
+MACRO {tods} {"ACM Transactions on Database Systems"}
+
+MACRO {tog} {"ACM Transactions on Graphics"}
+
+MACRO {toms} {"ACM Transactions on Mathematical Software"}
+
+MACRO {toois} {"ACM Transactions on Office Information Systems"}
+
+MACRO {toplas} {"ACM Transactions on Programming Languages and Systems"}
+
+MACRO {tcs} {"Theoretical Computer Science"}
+
+READ
+
+FUNCTION {sortify}
+{ purify$
+ "l" change.case$
+}
+
+INTEGERS { len }
+
+FUNCTION {chop.word}
+{ 's :=
+ 'len :=
+ s #1 len substring$ =
+ { s len #1 + global.max$ substring$ }
+ 's
+ if$
+}
+
+INTEGERS { et.al.char.used }
+
+FUNCTION {initialize.et.al.char.used}
+{ #0 'et.al.char.used :=
+}
+
+EXECUTE {initialize.et.al.char.used}
+
+FUNCTION {format.lab.names}
+{ 's :=
+ s num.names$ 'numnames :=
+ numnames #1 >
+ { numnames #4 >
+ { #3 'namesleft := }
+ { numnames 'namesleft := }
+ if$
+ #1 'nameptr :=
+ ""
+ { namesleft #0 > }
+ { nameptr numnames =
+ { s nameptr "{ff }{vv }{ll}{ jj}" format.name$ "others" =
+ { "{\etalchar{+}}" *
+ #1 'et.al.char.used :=
+ }
+ { s nameptr "{v{}}{l{}}" format.name$ * }
+ if$
+ }
+ { s nameptr "{v{}}{l{}}" format.name$ * }
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+ numnames #4 >
+ { "{\etalchar{+}}" *
+ #1 'et.al.char.used :=
+ }
+ 'skip$
+ if$
+ }
+ { s #1 "{v{}}{l{}}" format.name$
+ duplicate$ text.length$ #2 <
+ { pop$ s #1 "{ll}" format.name$ #3 text.prefix$ }
+ 'skip$
+ if$
+ }
+ if$
+}
+
+FUNCTION {author.key.label}
+{ author empty$
+ { key empty$
+ { cite$ #1 #3 substring$ }
+ { key #3 text.prefix$ }
+ if$
+ }
+ { author format.lab.names }
+ if$
+}
+
+FUNCTION {author.editor.key.label}
+{ author empty$
+ { editor empty$
+ { key empty$
+ { cite$ #1 #3 substring$ }
+ { key #3 text.prefix$ }
+ if$
+ }
+ { editor format.lab.names }
+ if$
+ }
+ { author format.lab.names }
+ if$
+}
+
+FUNCTION {author.key.organization.label}
+{ author empty$
+ { key empty$
+ { organization empty$
+ { cite$ #1 #3 substring$ }
+ { "The " #4 organization chop.word #3 text.prefix$ }
+ if$
+ }
+ { key #3 text.prefix$ }
+ if$
+ }
+ { author format.lab.names }
+ if$
+}
+
+FUNCTION {editor.key.organization.label}
+{ editor empty$
+ { key empty$
+ { organization empty$
+ { cite$ #1 #3 substring$ }
+ { organization #3 text.prefix$ }
+ if$
+ }
+ { key #3 text.prefix$ }
+ if$
+ }
+ { editor format.lab.names }
+ if$
+}
+
+FUNCTION {calc.label}
+{ type$ "book" =
+ type$ "inbook" =
+ or
+ 'author.editor.key.label
+ { type$ "proceedings" =
+ 'editor.key.organization.label
+ { type$ "manual" =
+ 'author.key.organization.label
+ 'author.key.label
+ if$
+ }
+ if$
+ }
+ if$
+ duplicate$
+ year field.or.null purify$ #-1 #2 substring$
+ *
+ 'label :=
+ year field.or.null purify$ #-1 #4 substring$
+ *
+ sortify 'sort.label :=
+}
+
+FUNCTION {sort.format.names}
+{ 's :=
+ #1 'nameptr :=
+ ""
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ { nameptr #1 >
+ { " " * }
+ 'skip$
+ if$
+ s nameptr "{ll{ }}{ ff{ }}{ vv{ }}{ jj{ }}" format.name$ 't :=
+ nameptr numnames = t "others" = and
+ { "et al" * }
+ { t sortify * }
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+}
+
+FUNCTION {sort.format.title}
+{ sortify
+ #1 global.max$ substring$
+}
+
+FUNCTION {author.sort}
+{ author empty$
+ { key empty$
+ { "to sort, need author or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { author sort.format.names }
+ if$
+}
+
+FUNCTION {author.editor.sort}
+{ author empty$
+ { editor empty$
+ { key empty$
+ { "to sort, need author, editor, or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { editor sort.format.names }
+ if$
+ }
+ { author sort.format.names }
+ if$
+}
+
+FUNCTION {author.organization.sort}
+{ author empty$
+ { organization empty$
+ { key empty$
+ { "to sort, need author, organization, or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { "The " #4 organization chop.word sortify }
+ if$
+ }
+ { author sort.format.names }
+ if$
+}
+
+FUNCTION {editor.organization.sort}
+{ editor empty$
+ { organization empty$
+ { key empty$
+ { "to sort, need editor, organization, or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { "The " #4 organization chop.word sortify }
+ if$
+ }
+ { editor sort.format.names }
+ if$
+}
+
+FUNCTION {presort}
+{ calc.label
+ sort.label
+ " "
+ *
+ type$ "book" =
+ type$ "inbook" =
+ or
+ 'author.editor.sort
+ { type$ "proceedings" =
+ 'editor.organization.sort
+ { type$ "manual" =
+ 'author.organization.sort
+ 'author.sort
+ if$
+ }
+ if$
+ }
+ if$
+ *
+ " "
+ *
+ year field.or.null sortify
+ *
+ " "
+ *
+ title field.or.null
+ sort.format.title
+ *
+ #1 entry.max$ substring$
+ 'sort.key$ :=
+}
+
+ITERATE {presort}
+
+SORT
+
+STRINGS { longest.label last.sort.label next.extra }
+
+INTEGERS { longest.label.width last.extra.num }
+
+FUNCTION {initialize.longest.label}
+{ "" 'longest.label :=
+ #0 int.to.chr$ 'last.sort.label :=
+ "" 'next.extra :=
+ #0 'longest.label.width :=
+ #0 'last.extra.num :=
+}
+
+FUNCTION {forward.pass}
+{ last.sort.label sort.label =
+ { last.extra.num #1 + 'last.extra.num :=
+ last.extra.num int.to.chr$ 'extra.label :=
+ }
+ { "a" chr.to.int$ 'last.extra.num :=
+ "" 'extra.label :=
+ sort.label 'last.sort.label :=
+ }
+ if$
+}
+
+FUNCTION {reverse.pass}
+{ next.extra "b" =
+ { "a" 'extra.label := }
+ 'skip$
+ if$
+ label extra.label * 'label :=
+ label width$ longest.label.width >
+ { label 'longest.label :=
+ label width$ 'longest.label.width :=
+ }
+ 'skip$
+ if$
+ extra.label 'next.extra :=
+}
+
+EXECUTE {initialize.longest.label}
+
+ITERATE {forward.pass}
+
+REVERSE {reverse.pass}
+
+FUNCTION {begin.bib}
+{ et.al.char.used
+ { "\newcommand{\etalchar}[1]{$^{#1}$}" write$ newline$ }
+ 'skip$
+ if$
+ preamble$ empty$
+ 'skip$
+ { preamble$ write$ newline$ }
+ if$
+ "\begin{thebibliography}{" longest.label * "}" * write$ newline$
+}
+
+EXECUTE {begin.bib}
+
+EXECUTE {init.state.consts}
+
+ITERATE {call.type$}
+
+FUNCTION {end.bib}
+{ newline$
+ "\end{thebibliography}" write$ newline$
+}
+
+EXECUTE {end.bib}
diff --git a/biblio/bibtex/contrib/norbib/norplain.bst b/biblio/bibtex/contrib/norbib/norplain.bst
new file mode 100644
index 0000000000..9d96a164c3
--- /dev/null
+++ b/biblio/bibtex/contrib/norbib/norplain.bst
@@ -0,0 +1,1096 @@
+% BibTeX standard bibliography style `plain'
+ % version 0.99a for BibTeX versions 0.99a or later, LaTeX version 2.09.
+ % Copyright (C) 1985, all rights reserved.
+ % Copying of this file is authorized only if either
+ % (1) you make absolutely no changes to your copy, including name, or
+ % (2) if you do make changes, you name it something other than
+ % btxbst.doc, plain.bst, unsrt.bst, alpha.bst, and abbrv.bst.
+ % This restriction helps ensure that all standard styles are identical.
+ % The file btxbst.doc has the documentation for this style.
+
+% "Translated" into Norwegian by dag@ifi.uio.no, July 1997.
+% Now called `nplain'.
+
+ENTRY
+ { address
+ author
+ booktitle
+ chapter
+ edition
+ editor
+ howpublished
+ institution
+ journal
+ key
+ month
+ note
+ number
+ organization
+ pages
+ publisher
+ school
+ series
+ title
+ type
+ volume
+ year
+ }
+ {}
+ { label }
+
+INTEGERS { output.state before.all mid.sentence after.sentence after.block }
+
+FUNCTION {init.state.consts}
+{ #0 'before.all :=
+ #1 'mid.sentence :=
+ #2 'after.sentence :=
+ #3 'after.block :=
+}
+
+STRINGS { s t }
+
+FUNCTION {output.nonnull}
+{ 's :=
+ output.state mid.sentence =
+ { ", " * write$ }
+ { output.state after.block =
+ { add.period$ write$
+ newline$
+ "\newblock " write$
+ }
+ { output.state before.all =
+ 'write$
+ { add.period$ " " * write$ }
+ if$
+ }
+ if$
+ mid.sentence 'output.state :=
+ }
+ if$
+ s
+}
+
+FUNCTION {output}
+{ duplicate$ empty$
+ 'pop$
+ 'output.nonnull
+ if$
+}
+
+FUNCTION {output.check}
+{ 't :=
+ duplicate$ empty$
+ { pop$ "empty " t * " i " * cite$ * warning$ }
+ 'output.nonnull
+ if$
+}
+
+FUNCTION {output.bibitem}
+{ newline$
+ "\bibitem{" write$
+ cite$ write$
+ "}" write$
+ newline$
+ ""
+ before.all 'output.state :=
+}
+
+FUNCTION {fin.entry}
+{ add.period$
+ write$
+ newline$
+}
+
+FUNCTION {new.block}
+{ output.state before.all =
+ 'skip$
+ { after.block 'output.state := }
+ if$
+}
+
+FUNCTION {new.sentence}
+{ output.state after.block =
+ 'skip$
+ { output.state before.all =
+ 'skip$
+ { after.sentence 'output.state := }
+ if$
+ }
+ if$
+}
+
+FUNCTION {not}
+{ { #0 }
+ { #1 }
+ if$
+}
+
+FUNCTION {and}
+{ 'skip$
+ { pop$ #0 }
+ if$
+}
+
+FUNCTION {or}
+{ { pop$ #1 }
+ 'skip$
+ if$
+}
+
+FUNCTION {new.block.checka}
+{ empty$
+ 'skip$
+ 'new.block
+ if$
+}
+
+FUNCTION {new.block.checkb}
+{ empty$
+ swap$ empty$
+ and
+ 'skip$
+ 'new.block
+ if$
+}
+
+FUNCTION {new.sentence.checka}
+{ empty$
+ 'skip$
+ 'new.sentence
+ if$
+}
+
+FUNCTION {new.sentence.checkb}
+{ empty$
+ swap$ empty$
+ and
+ 'skip$
+ 'new.sentence
+ if$
+}
+
+FUNCTION {field.or.null}
+{ duplicate$ empty$
+ { pop$ "" }
+ 'skip$
+ if$
+}
+
+FUNCTION {emphasize}
+{ duplicate$ empty$
+ { pop$ "" }
+ { "{\em " swap$ * "}" * }
+ if$
+}
+
+INTEGERS { nameptr namesleft numnames }
+
+FUNCTION {format.names}
+{ 's :=
+ #1 'nameptr :=
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ { s nameptr "{ff~}{vv }{ll}{~jj}" format.name$ 't :=
+ nameptr #1 >
+ { namesleft #1 >
+ { ", " * t * }
+ { t "others" =
+ { " et~al." * }
+ { " og " * t * }
+ if$
+ }
+ if$
+ }
+ 't
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+}
+
+FUNCTION {format.authors}
+{ author empty$
+ { "" }
+ { author format.names }
+ if$
+}
+
+FUNCTION {format.editors}
+{ editor empty$
+ { "" }
+ { editor format.names
+ editor num.names$ #1 >
+ { ", redakt\o{}rer" * }
+ { ", redakt\o{}r" * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.title}
+{ title empty$
+ { "" }
+ { title "t" change.case$ }
+ if$
+}
+
+FUNCTION {n.dashify}
+{ 't :=
+ ""
+ { t empty$ not }
+ { t #1 #1 substring$ "-" =
+ { t #1 #2 substring$ "--" = not
+ { "--" *
+ t #2 global.max$ substring$ 't :=
+ }
+ { { t #1 #1 substring$ "-" = }
+ { "-" *
+ t #2 global.max$ substring$ 't :=
+ }
+ while$
+ }
+ if$
+ }
+ { t #1 #1 substring$ *
+ t #2 global.max$ substring$ 't :=
+ }
+ if$
+ }
+ while$
+}
+
+FUNCTION {format.date}
+{ year empty$
+ { month empty$
+ { "" }
+ { "there's a month but no year in " cite$ * warning$
+ month
+ }
+ if$
+ }
+ { month empty$
+ 'year
+ { month " " * year * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.btitle}
+{ title emphasize
+}
+
+FUNCTION {tie.or.space.connect}
+{ duplicate$ text.length$ #3 <
+ { "~" }
+ { " " }
+ if$
+ swap$ * *
+}
+
+FUNCTION {either.or.check}
+{ empty$
+ 'pop$
+ { "can't use both " swap$ * " fields in " * cite$ * warning$ }
+ if$
+}
+
+FUNCTION {format.bvolume}
+{ volume empty$
+ { "" }
+ { "bind" volume tie.or.space.connect
+ series empty$
+ 'skip$
+ { " av " * series emphasize * }
+ if$
+ "volume and number" number either.or.check
+ }
+ if$
+}
+
+FUNCTION {format.number.series}
+{ volume empty$
+ { number empty$
+ { series field.or.null }
+ { output.state mid.sentence =
+ { "nr" }
+ { "Nr" }
+ if$
+ number tie.or.space.connect
+ series empty$
+ { "there's a number but no series in " cite$ * warning$ }
+ { " i " * series * }
+ if$
+ }
+ if$
+ }
+ { "" }
+ if$
+}
+
+FUNCTION {format.edition}
+{ edition empty$
+ { "" }
+ { output.state mid.sentence =
+ { edition "l" change.case$ " utgave" * }
+ { edition "t" change.case$ " utgave" * }
+ if$
+ }
+ if$
+}
+
+INTEGERS { multiresult }
+
+FUNCTION {multi.page.check}
+{ 't :=
+ #0 'multiresult :=
+ { multiresult not
+ t empty$ not
+ and
+ }
+ { t #1 #1 substring$
+ duplicate$ "-" =
+ swap$ duplicate$ "," =
+ swap$ "+" =
+ or or
+ { #1 'multiresult := }
+ { t #2 global.max$ substring$ 't := }
+ if$
+ }
+ while$
+ multiresult
+}
+
+FUNCTION {format.pages}
+{ pages empty$
+ { "" }
+ { pages multi.page.check
+ { "side" pages n.dashify tie.or.space.connect }
+ { "side" pages tie.or.space.connect }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.vol.num.pages}
+{ volume field.or.null
+ number empty$
+ 'skip$
+ { "(" number * ")" * *
+ volume empty$
+ { "there's a number but no volume in " cite$ * warning$ }
+ 'skip$
+ if$
+ }
+ if$
+ pages empty$
+ 'skip$
+ { duplicate$ empty$
+ { pop$ format.pages }
+ { ":" * pages n.dashify * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.chapter.pages}
+{ chapter empty$
+ 'format.pages
+ { type empty$
+ { "kapittel" }
+ { type "l" change.case$ }
+ if$
+ chapter tie.or.space.connect
+ pages empty$
+ 'skip$
+ { ", " * format.pages * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.in.ed.booktitle}
+{ booktitle empty$
+ { "" }
+ { editor empty$
+ { "I " booktitle emphasize * }
+ { "I " format.editors * ", " * booktitle emphasize * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {empty.misc.check}
+{ author empty$ title empty$ howpublished empty$
+ month empty$ year empty$ note empty$
+ and and and and and
+ key empty$ not and
+ { "all relevant fields are empty in " cite$ * warning$ }
+ 'skip$
+ if$
+}
+
+FUNCTION {format.thesis.type}
+{ type empty$
+ 'skip$
+ { pop$
+ type "t" change.case$
+ }
+ if$
+}
+
+FUNCTION {format.tr.number}
+{ type empty$
+ { "Rapport" }
+ 'type
+ if$
+ number empty$
+ { "t" change.case$ }
+ { number tie.or.space.connect }
+ if$
+}
+
+FUNCTION {format.article.crossref}
+{ key empty$
+ { journal empty$
+ { "need key or journal for " cite$ * " to crossref " * crossref *
+ warning$
+ ""
+ }
+ { "I {\em " journal * "\/}" * }
+ if$
+ }
+ { "I " key * }
+ if$
+ " \cite{" * crossref * "}" *
+}
+
+FUNCTION {format.crossref.editor}
+{ editor #1 "{vv }{ll}" format.name$
+ editor num.names$ duplicate$
+ #2 >
+ { pop$ " et~al." * }
+ { #2 <
+ 'skip$
+ { editor #2 "{ff~}{vv }{ll}{~jj}" format.name$ "others" =
+ { " et~al." * }
+ { " og " * editor #2 "{vv }{ll}" format.name$ * }
+ if$
+ }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.book.crossref}
+{ volume empty$
+ { "empty volume in " cite$ * "'s crossref of " * crossref * warning$
+ "I "
+ }
+ { "Bind" volume tie.or.space.connect
+ " av " *
+ }
+ if$
+ editor empty$
+ editor field.or.null author field.or.null =
+ or
+ { key empty$
+ { series empty$
+ { "need editor, key, or series for " cite$ * " to crossref " *
+ crossref * warning$
+ "" *
+ }
+ { "{\em " * series * "\/}" * }
+ if$
+ }
+ { key * }
+ if$
+ }
+ { format.crossref.editor * }
+ if$
+ " \cite{" * crossref * "}" *
+}
+
+FUNCTION {format.incoll.inproc.crossref}
+{ editor empty$
+ editor field.or.null author field.or.null =
+ or
+ { key empty$
+ { booktitle empty$
+ { "need editor, key, or booktitle for " cite$ * " to crossref " *
+ crossref * warning$
+ ""
+ }
+ { "I {\em " booktitle * "\/}" * }
+ if$
+ }
+ { "I " key * }
+ if$
+ }
+ { "I " format.crossref.editor * }
+ if$
+ " \cite{" * crossref * "}" *
+}
+
+FUNCTION {article}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.title "title" output.check
+ new.block
+ crossref missing$
+ { journal emphasize "journal" output.check
+ format.vol.num.pages output
+ format.date "year" output.check
+ }
+ { format.article.crossref output.nonnull
+ format.pages output
+ }
+ if$
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {book}
+{ output.bibitem
+ author empty$
+ { format.editors "author and editor" output.check }
+ { format.authors output.nonnull
+ crossref missing$
+ { "author and editor" editor either.or.check }
+ 'skip$
+ if$
+ }
+ if$
+ new.block
+ format.btitle "title" output.check
+ crossref missing$
+ { format.bvolume output
+ new.block
+ format.number.series output
+ new.sentence
+ publisher "publisher" output.check
+ address output
+ }
+ { new.block
+ format.book.crossref output.nonnull
+ }
+ if$
+ format.edition output
+ format.date "year" output.check
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {booklet}
+{ output.bibitem
+ format.authors output
+ new.block
+ format.title "title" output.check
+ howpublished address new.block.checkb
+ howpublished output
+ address output
+ format.date output
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {inbook}
+{ output.bibitem
+ author empty$
+ { format.editors "author and editor" output.check }
+ { format.authors output.nonnull
+ crossref missing$
+ { "author and editor" editor either.or.check }
+ 'skip$
+ if$
+ }
+ if$
+ new.block
+ format.btitle "title" output.check
+ crossref missing$
+ { format.bvolume output
+ format.chapter.pages "chapter and pages" output.check
+ new.block
+ format.number.series output
+ new.sentence
+ publisher "publisher" output.check
+ address output
+ }
+ { format.chapter.pages "chapter and pages" output.check
+ new.block
+ format.book.crossref output.nonnull
+ }
+ if$
+ format.edition output
+ format.date "year" output.check
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {incollection}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.title "title" output.check
+ new.block
+ crossref missing$
+ { format.in.ed.booktitle "booktitle" output.check
+ format.bvolume output
+ format.number.series output
+ format.chapter.pages output
+ new.sentence
+ publisher "publisher" output.check
+ address output
+ format.edition output
+ format.date "year" output.check
+ }
+ { format.incoll.inproc.crossref output.nonnull
+ format.chapter.pages output
+ }
+ if$
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {inproceedings}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.title "title" output.check
+ new.block
+ crossref missing$
+ { format.in.ed.booktitle "booktitle" output.check
+ format.bvolume output
+ format.number.series output
+ format.pages output
+ address empty$
+ { organization publisher new.sentence.checkb
+ organization output
+ publisher output
+ format.date "year" output.check
+ }
+ { address output.nonnull
+ format.date "year" output.check
+ new.sentence
+ organization output
+ publisher output
+ }
+ if$
+ }
+ { format.incoll.inproc.crossref output.nonnull
+ format.pages output
+ }
+ if$
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {conference} { inproceedings }
+
+FUNCTION {manual}
+{ output.bibitem
+ author empty$
+ { organization empty$
+ 'skip$
+ { organization output.nonnull
+ address output
+ }
+ if$
+ }
+ { format.authors output.nonnull }
+ if$
+ new.block
+ format.btitle "title" output.check
+ author empty$
+ { organization empty$
+ { address new.block.checka
+ address output
+ }
+ 'skip$
+ if$
+ }
+ { organization address new.block.checkb
+ organization output
+ address output
+ }
+ if$
+ format.edition output
+ format.date output
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {mastersthesis}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.title "title" output.check
+ new.block
+ "Hovedfagsoppgave" format.thesis.type output.nonnull
+ school "school" output.check
+ address output
+ format.date "year" output.check
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {misc}
+{ output.bibitem
+ format.authors output
+ title howpublished new.block.checkb
+ format.title output
+ howpublished new.block.checka
+ howpublished output
+ format.date output
+ new.block
+ note output
+ fin.entry
+ empty.misc.check
+}
+
+FUNCTION {phdthesis}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.btitle "title" output.check
+ new.block
+ "Doktorgradsoppgave" format.thesis.type output.nonnull
+ school "school" output.check
+ address output
+ format.date "year" output.check
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {proceedings}
+{ output.bibitem
+ editor empty$
+ { organization output }
+ { format.editors output.nonnull }
+ if$
+ new.block
+ format.btitle "title" output.check
+ format.bvolume output
+ format.number.series output
+ address empty$
+ { editor empty$
+ { publisher new.sentence.checka }
+ { organization publisher new.sentence.checkb
+ organization output
+ }
+ if$
+ publisher output
+ format.date "year" output.check
+ }
+ { address output.nonnull
+ format.date "year" output.check
+ new.sentence
+ editor empty$
+ 'skip$
+ { organization output }
+ if$
+ publisher output
+ }
+ if$
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {techreport}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.title "title" output.check
+ new.block
+ format.tr.number output.nonnull
+ institution "institution" output.check
+ address output
+ format.date "year" output.check
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {unpublished}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.title "title" output.check
+ new.block
+ note "note" output.check
+ format.date output
+ fin.entry
+}
+
+FUNCTION {default.type} { misc }
+
+MACRO {jan} {"januar"}
+
+MACRO {feb} {"februar"}
+
+MACRO {mar} {"mars"}
+
+MACRO {apr} {"april"}
+
+MACRO {may} {"mai"}
+
+MACRO {jun} {"juni"}
+
+MACRO {jul} {"juli"}
+
+MACRO {aug} {"august"}
+
+MACRO {sep} {"september"}
+
+MACRO {oct} {"oktober"}
+
+MACRO {nov} {"november"}
+
+MACRO {dec} {"desember"}
+
+MACRO {acmcs} {"ACM Computing Surveys"}
+
+MACRO {acta} {"Acta Informatica"}
+
+MACRO {cacm} {"Communications of the ACM"}
+
+MACRO {ibmjrd} {"IBM Journal of Research and Development"}
+
+MACRO {ibmsj} {"IBM Systems Journal"}
+
+MACRO {ieeese} {"IEEE Transactions on Software Engineering"}
+
+MACRO {ieeetc} {"IEEE Transactions on Computers"}
+
+MACRO {ieeetcad}
+ {"IEEE Transactions on Computer-Aided Design of Integrated Circuits"}
+
+MACRO {ipl} {"Information Processing Letters"}
+
+MACRO {jacm} {"Journal of the ACM"}
+
+MACRO {jcss} {"Journal of Computer and System Sciences"}
+
+MACRO {scp} {"Science of Computer Programming"}
+
+MACRO {sicomp} {"SIAM Journal on Computing"}
+
+MACRO {tocs} {"ACM Transactions on Computer Systems"}
+
+MACRO {tods} {"ACM Transactions on Database Systems"}
+
+MACRO {tog} {"ACM Transactions on Graphics"}
+
+MACRO {toms} {"ACM Transactions on Mathematical Software"}
+
+MACRO {toois} {"ACM Transactions on Office Information Systems"}
+
+MACRO {toplas} {"ACM Transactions on Programming Languages and Systems"}
+
+MACRO {tcs} {"Theoretical Computer Science"}
+
+READ
+
+FUNCTION {sortify}
+{ purify$
+ "l" change.case$
+}
+
+INTEGERS { len }
+
+FUNCTION {chop.word}
+{ 's :=
+ 'len :=
+ s #1 len substring$ =
+ { s len #1 + global.max$ substring$ }
+ 's
+ if$
+}
+
+FUNCTION {sort.format.names}
+{ 's :=
+ #1 'nameptr :=
+ ""
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ { nameptr #1 >
+ { " " * }
+ 'skip$
+ if$
+ s nameptr "{ll{ }}{ ff{ }}{ vv{ }}{ jj{ }}" format.name$ 't :=
+ nameptr numnames = t "others" = and
+ { "et al" * }
+ { t sortify * }
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+}
+
+FUNCTION {sort.format.title}
+{ 't :=
+ "A " #2
+ "An " #3
+ "The " #4 t chop.word
+ chop.word
+ chop.word
+ sortify
+ #1 global.max$ substring$
+}
+
+FUNCTION {author.sort}
+{ author empty$
+ { key empty$
+ { "to sort, need author or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { author sort.format.names }
+ if$
+}
+
+FUNCTION {author.editor.sort}
+{ author empty$
+ { editor empty$
+ { key empty$
+ { "to sort, need author, editor, or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { editor sort.format.names }
+ if$
+ }
+ { author sort.format.names }
+ if$
+}
+
+FUNCTION {author.organization.sort}
+{ author empty$
+ { organization empty$
+ { key empty$
+ { "to sort, need author, organization, or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { "The " #4 organization chop.word sortify }
+ if$
+ }
+ { author sort.format.names }
+ if$
+}
+
+FUNCTION {editor.organization.sort}
+{ editor empty$
+ { organization empty$
+ { key empty$
+ { "to sort, need editor, organization, or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { "The " #4 organization chop.word sortify }
+ if$
+ }
+ { editor sort.format.names }
+ if$
+}
+
+FUNCTION {presort}
+{ type$ "book" =
+ type$ "inbook" =
+ or
+ 'author.editor.sort
+ { type$ "proceedings" =
+ 'editor.organization.sort
+ { type$ "manual" =
+ 'author.organization.sort
+ 'author.sort
+ if$
+ }
+ if$
+ }
+ if$
+ " "
+ *
+ year field.or.null sortify
+ *
+ " "
+ *
+ title field.or.null
+ sort.format.title
+ *
+ #1 entry.max$ substring$
+ 'sort.key$ :=
+}
+
+ITERATE {presort}
+
+SORT
+
+STRINGS { longest.label }
+
+INTEGERS { number.label longest.label.width }
+
+FUNCTION {initialize.longest.label}
+{ "" 'longest.label :=
+ #1 'number.label :=
+ #0 'longest.label.width :=
+}
+
+FUNCTION {longest.label.pass}
+{ number.label int.to.str$ 'label :=
+ number.label #1 + 'number.label :=
+ label width$ longest.label.width >
+ { label 'longest.label :=
+ label width$ 'longest.label.width :=
+ }
+ 'skip$
+ if$
+}
+
+EXECUTE {initialize.longest.label}
+
+ITERATE {longest.label.pass}
+
+FUNCTION {begin.bib}
+{ preamble$ empty$
+ 'skip$
+ { preamble$ write$ newline$ }
+ if$
+ "\begin{thebibliography}{" longest.label * "}" * write$ newline$
+}
+
+EXECUTE {begin.bib}
+
+EXECUTE {init.state.consts}
+
+ITERATE {call.type$}
+
+FUNCTION {end.bib}
+{ newline$
+ "\end{thebibliography}" write$ newline$
+}
+
+EXECUTE {end.bib}
diff --git a/biblio/bibtex/contrib/norbib/norunsrt.bst b/biblio/bibtex/contrib/norbib/norunsrt.bst
new file mode 100644
index 0000000000..844401b2c3
--- /dev/null
+++ b/biblio/bibtex/contrib/norbib/norunsrt.bst
@@ -0,0 +1,950 @@
+% BibTeX standard bibliography style `unsrt'
+ % version 0.99a for BibTeX versions 0.99a or later, LaTeX version 2.09.
+ % Copyright (C) 1985, all rights reserved.
+ % Copying of this file is authorized only if either
+ % (1) you make absolutely no changes to your copy, including name, or
+ % (2) if you do make changes, you name it something other than
+ % btxbst.doc, plain.bst, unsrt.bst, alpha.bst, and abbrv.bst.
+ % This restriction helps ensure that all standard styles are identical.
+ % The file btxbst.doc has the documentation for this style.
+
+% "Translated" into Norwegian by dag@ifi.uio.no, July 1997.
+% Now called `nunsrt'.
+
+ENTRY
+ { address
+ author
+ booktitle
+ chapter
+ edition
+ editor
+ howpublished
+ institution
+ journal
+ key
+ month
+ note
+ number
+ organization
+ pages
+ publisher
+ school
+ series
+ title
+ type
+ volume
+ year
+ }
+ {}
+ { label }
+
+INTEGERS { output.state before.all mid.sentence after.sentence after.block }
+
+FUNCTION {init.state.consts}
+{ #0 'before.all :=
+ #1 'mid.sentence :=
+ #2 'after.sentence :=
+ #3 'after.block :=
+}
+
+STRINGS { s t }
+
+FUNCTION {output.nonnull}
+{ 's :=
+ output.state mid.sentence =
+ { ", " * write$ }
+ { output.state after.block =
+ { add.period$ write$
+ newline$
+ "\newblock " write$
+ }
+ { output.state before.all =
+ 'write$
+ { add.period$ " " * write$ }
+ if$
+ }
+ if$
+ mid.sentence 'output.state :=
+ }
+ if$
+ s
+}
+
+FUNCTION {output}
+{ duplicate$ empty$
+ 'pop$
+ 'output.nonnull
+ if$
+}
+
+FUNCTION {output.check}
+{ 't :=
+ duplicate$ empty$
+ { pop$ "empty " t * " in " * cite$ * warning$ }
+ 'output.nonnull
+ if$
+}
+
+FUNCTION {output.bibitem}
+{ newline$
+ "\bibitem{" write$
+ cite$ write$
+ "}" write$
+ newline$
+ ""
+ before.all 'output.state :=
+}
+
+FUNCTION {fin.entry}
+{ add.period$
+ write$
+ newline$
+}
+
+FUNCTION {new.block}
+{ output.state before.all =
+ 'skip$
+ { after.block 'output.state := }
+ if$
+}
+
+FUNCTION {new.sentence}
+{ output.state after.block =
+ 'skip$
+ { output.state before.all =
+ 'skip$
+ { after.sentence 'output.state := }
+ if$
+ }
+ if$
+}
+
+FUNCTION {not}
+{ { #0 }
+ { #1 }
+ if$
+}
+
+FUNCTION {and}
+{ 'skip$
+ { pop$ #0 }
+ if$
+}
+
+FUNCTION {or}
+{ { pop$ #1 }
+ 'skip$
+ if$
+}
+
+FUNCTION {new.block.checka}
+{ empty$
+ 'skip$
+ 'new.block
+ if$
+}
+
+FUNCTION {new.block.checkb}
+{ empty$
+ swap$ empty$
+ and
+ 'skip$
+ 'new.block
+ if$
+}
+
+FUNCTION {new.sentence.checka}
+{ empty$
+ 'skip$
+ 'new.sentence
+ if$
+}
+
+FUNCTION {new.sentence.checkb}
+{ empty$
+ swap$ empty$
+ and
+ 'skip$
+ 'new.sentence
+ if$
+}
+
+FUNCTION {field.or.null}
+{ duplicate$ empty$
+ { pop$ "" }
+ 'skip$
+ if$
+}
+
+FUNCTION {emphasize}
+{ duplicate$ empty$
+ { pop$ "" }
+ { "{\em " swap$ * "}" * }
+ if$
+}
+
+INTEGERS { nameptr namesleft numnames }
+
+FUNCTION {format.names}
+{ 's :=
+ #1 'nameptr :=
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ { s nameptr "{ff~}{vv }{ll}{~jj}" format.name$ 't :=
+ nameptr #1 >
+ { namesleft #1 >
+ { ", " * t * }
+ { t "others" =
+ { " et~al." * }
+ { " og " * t * }
+ if$
+ }
+ if$
+ }
+ 't
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+}
+
+FUNCTION {format.authors}
+{ author empty$
+ { "" }
+ { author format.names }
+ if$
+}
+
+FUNCTION {format.editors}
+{ editor empty$
+ { "" }
+ { editor format.names
+ editor num.names$ #1 >
+ { ", redakt\o{}rer" * }
+ { ", redakt\o{}r" * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.title}
+{ title empty$
+ { "" }
+ { title "t" change.case$ }
+ if$
+}
+
+FUNCTION {n.dashify}
+{ 't :=
+ ""
+ { t empty$ not }
+ { t #1 #1 substring$ "-" =
+ { t #1 #2 substring$ "--" = not
+ { "--" *
+ t #2 global.max$ substring$ 't :=
+ }
+ { { t #1 #1 substring$ "-" = }
+ { "-" *
+ t #2 global.max$ substring$ 't :=
+ }
+ while$
+ }
+ if$
+ }
+ { t #1 #1 substring$ *
+ t #2 global.max$ substring$ 't :=
+ }
+ if$
+ }
+ while$
+}
+
+FUNCTION {format.date}
+{ year empty$
+ { month empty$
+ { "" }
+ { "there's a month but no year in " cite$ * warning$
+ month
+ }
+ if$
+ }
+ { month empty$
+ 'year
+ { month " " * year * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.btitle}
+{ title emphasize
+}
+
+FUNCTION {tie.or.space.connect}
+{ duplicate$ text.length$ #3 <
+ { "~" }
+ { " " }
+ if$
+ swap$ * *
+}
+
+FUNCTION {either.or.check}
+{ empty$
+ 'pop$
+ { "can't use both " swap$ * " fields in " * cite$ * warning$ }
+ if$
+}
+
+FUNCTION {format.bvolume}
+{ volume empty$
+ { "" }
+ { "bind" volume tie.or.space.connect
+ series empty$
+ 'skip$
+ { " av " * series emphasize * }
+ if$
+ "volume and number" number either.or.check
+ }
+ if$
+}
+
+FUNCTION {format.number.series}
+{ volume empty$
+ { number empty$
+ { series field.or.null }
+ { output.state mid.sentence =
+ { "nr" }
+ { "Nr" }
+ if$
+ number tie.or.space.connect
+ series empty$
+ { "there's a number but no series in " cite$ * warning$ }
+ { " i " * series * }
+ if$
+ }
+ if$
+ }
+ { "" }
+ if$
+}
+
+FUNCTION {format.edition}
+{ edition empty$
+ { "" }
+ { output.state mid.sentence =
+ { edition "l" change.case$ " utgave" * }
+ { edition "t" change.case$ " utgave" * }
+ if$
+ }
+ if$
+}
+
+INTEGERS { multiresult }
+
+FUNCTION {multi.page.check}
+{ 't :=
+ #0 'multiresult :=
+ { multiresult not
+ t empty$ not
+ and
+ }
+ { t #1 #1 substring$
+ duplicate$ "-" =
+ swap$ duplicate$ "," =
+ swap$ "+" =
+ or or
+ { #1 'multiresult := }
+ { t #2 global.max$ substring$ 't := }
+ if$
+ }
+ while$
+ multiresult
+}
+
+FUNCTION {format.pages}
+{ pages empty$
+ { "" }
+ { pages multi.page.check
+ { "side" pages n.dashify tie.or.space.connect }
+ { "side" pages tie.or.space.connect }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.vol.num.pages}
+{ volume field.or.null
+ number empty$
+ 'skip$
+ { "(" number * ")" * *
+ volume empty$
+ { "there's a number but no volume in " cite$ * warning$ }
+ 'skip$
+ if$
+ }
+ if$
+ pages empty$
+ 'skip$
+ { duplicate$ empty$
+ { pop$ format.pages }
+ { ":" * pages n.dashify * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.chapter.pages}
+{ chapter empty$
+ 'format.pages
+ { type empty$
+ { "kapittel" }
+ { type "l" change.case$ }
+ if$
+ chapter tie.or.space.connect
+ pages empty$
+ 'skip$
+ { ", " * format.pages * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.in.ed.booktitle}
+{ booktitle empty$
+ { "" }
+ { editor empty$
+ { "I " booktitle emphasize * }
+ { "I " format.editors * ", " * booktitle emphasize * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {empty.misc.check}
+{ author empty$ title empty$ howpublished empty$
+ month empty$ year empty$ note empty$
+ and and and and and
+ { "all relevant fields are empty in " cite$ * warning$ }
+ 'skip$
+ if$
+}
+
+FUNCTION {format.thesis.type}
+{ type empty$
+ 'skip$
+ { pop$
+ type "t" change.case$
+ }
+ if$
+}
+
+FUNCTION {format.tr.number}
+{ type empty$
+ { "Rapport" }
+ 'type
+ if$
+ number empty$
+ { "t" change.case$ }
+ { number tie.or.space.connect }
+ if$
+}
+
+FUNCTION {format.article.crossref}
+{ key empty$
+ { journal empty$
+ { "need key or journal for " cite$ * " to crossref " * crossref *
+ warning$
+ ""
+ }
+ { "I {\em " journal * "\/}" * }
+ if$
+ }
+ { "I " key * }
+ if$
+ " \cite{" * crossref * "}" *
+}
+
+FUNCTION {format.crossref.editor}
+{ editor #1 "{vv }{ll}" format.name$
+ editor num.names$ duplicate$
+ #2 >
+ { pop$ " et~al." * }
+ { #2 <
+ 'skip$
+ { editor #2 "{ff~}{vv }{ll}{~jj}" format.name$ "others" =
+ { " et~al." * }
+ { " og " * editor #2 "{vv }{ll}" format.name$ * }
+ if$
+ }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.book.crossref}
+{ volume empty$
+ { "empty volume in " cite$ * "'s crossref of " * crossref * warning$
+ "I "
+ }
+ { "Bind" volume tie.or.space.connect
+ " av " *
+ }
+ if$
+ editor empty$
+ editor field.or.null author field.or.null =
+ or
+ { key empty$
+ { series empty$
+ { "need editor, key, or series for " cite$ * " to crossref " *
+ crossref * warning$
+ "" *
+ }
+ { "{\em " * series * "\/}" * }
+ if$
+ }
+ { key * }
+ if$
+ }
+ { format.crossref.editor * }
+ if$
+ " \cite{" * crossref * "}" *
+}
+
+FUNCTION {format.incoll.inproc.crossref}
+{ editor empty$
+ editor field.or.null author field.or.null =
+ or
+ { key empty$
+ { booktitle empty$
+ { "need editor, key, or booktitle for " cite$ * " to crossref " *
+ crossref * warning$
+ ""
+ }
+ { "I {\em " booktitle * "\/}" * }
+ if$
+ }
+ { "I " key * }
+ if$
+ }
+ { "I " format.crossref.editor * }
+ if$
+ " \cite{" * crossref * "}" *
+}
+
+FUNCTION {article}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.title "title" output.check
+ new.block
+ crossref missing$
+ { journal emphasize "journal" output.check
+ format.vol.num.pages output
+ format.date "year" output.check
+ }
+ { format.article.crossref output.nonnull
+ format.pages output
+ }
+ if$
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {book}
+{ output.bibitem
+ author empty$
+ { format.editors "author and editor" output.check }
+ { format.authors output.nonnull
+ crossref missing$
+ { "author and editor" editor either.or.check }
+ 'skip$
+ if$
+ }
+ if$
+ new.block
+ format.btitle "title" output.check
+ crossref missing$
+ { format.bvolume output
+ new.block
+ format.number.series output
+ new.sentence
+ publisher "publisher" output.check
+ address output
+ }
+ { new.block
+ format.book.crossref output.nonnull
+ }
+ if$
+ format.edition output
+ format.date "year" output.check
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {booklet}
+{ output.bibitem
+ format.authors output
+ new.block
+ format.title "title" output.check
+ howpublished address new.block.checkb
+ howpublished output
+ address output
+ format.date output
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {inbook}
+{ output.bibitem
+ author empty$
+ { format.editors "author and editor" output.check }
+ { format.authors output.nonnull
+ crossref missing$
+ { "author and editor" editor either.or.check }
+ 'skip$
+ if$
+ }
+ if$
+ new.block
+ format.btitle "title" output.check
+ crossref missing$
+ { format.bvolume output
+ format.chapter.pages "chapter and pages" output.check
+ new.block
+ format.number.series output
+ new.sentence
+ publisher "publisher" output.check
+ address output
+ }
+ { format.chapter.pages "chapter and pages" output.check
+ new.block
+ format.book.crossref output.nonnull
+ }
+ if$
+ format.edition output
+ format.date "year" output.check
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {incollection}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.title "title" output.check
+ new.block
+ crossref missing$
+ { format.in.ed.booktitle "booktitle" output.check
+ format.bvolume output
+ format.number.series output
+ format.chapter.pages output
+ new.sentence
+ publisher "publisher" output.check
+ address output
+ format.edition output
+ format.date "year" output.check
+ }
+ { format.incoll.inproc.crossref output.nonnull
+ format.chapter.pages output
+ }
+ if$
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {inproceedings}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.title "title" output.check
+ new.block
+ crossref missing$
+ { format.in.ed.booktitle "booktitle" output.check
+ format.bvolume output
+ format.number.series output
+ format.pages output
+ address empty$
+ { organization publisher new.sentence.checkb
+ organization output
+ publisher output
+ format.date "year" output.check
+ }
+ { address output.nonnull
+ format.date "year" output.check
+ new.sentence
+ organization output
+ publisher output
+ }
+ if$
+ }
+ { format.incoll.inproc.crossref output.nonnull
+ format.pages output
+ }
+ if$
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {conference} { inproceedings }
+
+FUNCTION {manual}
+{ output.bibitem
+ author empty$
+ { organization empty$
+ 'skip$
+ { organization output.nonnull
+ address output
+ }
+ if$
+ }
+ { format.authors output.nonnull }
+ if$
+ new.block
+ format.btitle "title" output.check
+ author empty$
+ { organization empty$
+ { address new.block.checka
+ address output
+ }
+ 'skip$
+ if$
+ }
+ { organization address new.block.checkb
+ organization output
+ address output
+ }
+ if$
+ format.edition output
+ format.date output
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {mastersthesis}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.title "title" output.check
+ new.block
+ "Hovedfagsoppgave" format.thesis.type output.nonnull
+ school "school" output.check
+ address output
+ format.date "year" output.check
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {misc}
+{ output.bibitem
+ format.authors output
+ title howpublished new.block.checkb
+ format.title output
+ howpublished new.block.checka
+ howpublished output
+ format.date output
+ new.block
+ note output
+ fin.entry
+ empty.misc.check
+}
+
+FUNCTION {phdthesis}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.btitle "title" output.check
+ new.block
+ "Doktorgradsoppgave" format.thesis.type output.nonnull
+ school "school" output.check
+ address output
+ format.date "year" output.check
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {proceedings}
+{ output.bibitem
+ editor empty$
+ { organization output }
+ { format.editors output.nonnull }
+ if$
+ new.block
+ format.btitle "title" output.check
+ format.bvolume output
+ format.number.series output
+ address empty$
+ { editor empty$
+ { publisher new.sentence.checka }
+ { organization publisher new.sentence.checkb
+ organization output
+ }
+ if$
+ publisher output
+ format.date "year" output.check
+ }
+ { address output.nonnull
+ format.date "year" output.check
+ new.sentence
+ editor empty$
+ 'skip$
+ { organization output }
+ if$
+ publisher output
+ }
+ if$
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {techreport}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.title "title" output.check
+ new.block
+ format.tr.number output.nonnull
+ institution "institution" output.check
+ address output
+ format.date "year" output.check
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {unpublished}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.title "title" output.check
+ new.block
+ note "note" output.check
+ format.date output
+ fin.entry
+}
+
+FUNCTION {default.type} { misc }
+
+MACRO {jan} {"januar"}
+
+MACRO {feb} {"februar"}
+
+MACRO {mar} {"mars"}
+
+MACRO {apr} {"april"}
+
+MACRO {may} {"mai"}
+
+MACRO {jun} {"juni"}
+
+MACRO {jul} {"juli"}
+
+MACRO {aug} {"august"}
+
+MACRO {sep} {"september"}
+
+MACRO {oct} {"oktober"}
+
+MACRO {nov} {"november"}
+
+MACRO {dec} {"desember"}
+
+MACRO {acmcs} {"ACM Computing Surveys"}
+
+MACRO {acta} {"Acta Informatica"}
+
+MACRO {cacm} {"Communications of the ACM"}
+
+MACRO {ibmjrd} {"IBM Journal of Research and Development"}
+
+MACRO {ibmsj} {"IBM Systems Journal"}
+
+MACRO {ieeese} {"IEEE Transactions on Software Engineering"}
+
+MACRO {ieeetc} {"IEEE Transactions on Computers"}
+
+MACRO {ieeetcad}
+ {"IEEE Transactions on Computer-Aided Design of Integrated Circuits"}
+
+MACRO {ipl} {"Information Processing Letters"}
+
+MACRO {jacm} {"Journal of the ACM"}
+
+MACRO {jcss} {"Journal of Computer and System Sciences"}
+
+MACRO {scp} {"Science of Computer Programming"}
+
+MACRO {sicomp} {"SIAM Journal on Computing"}
+
+MACRO {tocs} {"ACM Transactions on Computer Systems"}
+
+MACRO {tods} {"ACM Transactions on Database Systems"}
+
+MACRO {tog} {"ACM Transactions on Graphics"}
+
+MACRO {toms} {"ACM Transactions on Mathematical Software"}
+
+MACRO {toois} {"ACM Transactions on Office Information Systems"}
+
+MACRO {toplas} {"ACM Transactions on Programming Languages and Systems"}
+
+MACRO {tcs} {"Theoretical Computer Science"}
+
+READ
+
+STRINGS { longest.label }
+
+INTEGERS { number.label longest.label.width }
+
+FUNCTION {initialize.longest.label}
+{ "" 'longest.label :=
+ #1 'number.label :=
+ #0 'longest.label.width :=
+}
+
+FUNCTION {longest.label.pass}
+{ number.label int.to.str$ 'label :=
+ number.label #1 + 'number.label :=
+ label width$ longest.label.width >
+ { label 'longest.label :=
+ label width$ 'longest.label.width :=
+ }
+ 'skip$
+ if$
+}
+
+EXECUTE {initialize.longest.label}
+
+ITERATE {longest.label.pass}
+
+FUNCTION {begin.bib}
+{ preamble$ empty$
+ 'skip$
+ { preamble$ write$ newline$ }
+ if$
+ "\begin{thebibliography}{" longest.label * "}" * write$ newline$
+}
+
+EXECUTE {begin.bib}
+
+EXECUTE {init.state.consts}
+
+ITERATE {call.type$}
+
+FUNCTION {end.bib}
+{ newline$
+ "\end{thebibliography}" write$ newline$
+}
+
+EXECUTE {end.bib}
diff --git a/biblio/bibtex/contrib/other/README b/biblio/bibtex/contrib/other/README
new file mode 100644
index 0000000000..c5b871c15d
--- /dev/null
+++ b/biblio/bibtex/contrib/other/README
@@ -0,0 +1,7 @@
+The files in this directory were left after a concerted effort to move
+.bst (and similar) files from biblio/bibtex/contrib to directories "of
+their own" or to biblio/bibtex/contrib/misc
+
+These files seem all to be minor variations of similarly-named files
+in other areas of the biblio/bibtex/contrib tree
+
diff --git a/biblio/bibtex/contrib/other/phjcp.bst b/biblio/bibtex/contrib/other/phjcp.bst
new file mode 100644
index 0000000000..f3f804a6c7
--- /dev/null
+++ b/biblio/bibtex/contrib/other/phjcp.bst
@@ -0,0 +1,1888 @@
+% BibTeX styles for various physics journals (27-Feb-1990).
+% This file, physics.btx, is based on the file btxbst.doc.
+ % Please notify Charles Karney (Karney@Princeton.EDU)
+ % of any bugs, improvements, etc.
+% Run this file through cpp to get specific versions. I have written
+% a version of cpp within Emacs. To access it put
+% (autoload 'cpp "tex$bibtex:cpp" ; Use cpp for BibTeX styles
+% "C preprocessor"
+% t)
+% into your .emacs file. Read in this file with
+% emacs tex$bibtex:physics.btx
+% and run cpp with e.g.,
+% M-x cpp <ret> aip <ret>
+% Save the resulting file to tex$latex:aip.bst.
+% To accomodate the variations we need (in addition to the definitions below)
+% ATIT_SUPPRESS: do not include the titles of journal articles
+% NAME_INVERT: put the initials last
+% NAME_UPPER: convert names to all caps.
+% MONTH_SUPPRESS: do not include months in journal articles
+% PAREN_DATE: dates go in parens in journal articles
+% DATE_FIRST: dates go before page numbers
+% VOLUME_SPACE: volume set off with space (not colon)
+% NUM_SUPPRESS: do not include numbers in journal articles
+% BOLD_VOL: volume numbers in bold face in journal articles
+% BRACKET_NOTE: notes in brackets
+% PAGE_START_J: include only starting page for journal articles
+% PAGE_START_O: include only starting page for other entries
+% PAGE_ABBREV: abbreviate page to p. and pages to pp.
+% PHYSICS_JOUR: include abbreviations for Physics journals
+% COMMA_DELIMIT: use comma (instead of period) to divide a citation
+% NOTE_SUPPRESS: suppress the note
+% MAX_NAMES: max number of authors before using et al (0 = infinity)
+% MIN_NAMES: number of authors to list with et al.
+% EDIT_VAR: use "edited by ..." instead of "..., editors"
+% RMP_LABELS: create RMP-style labels
+% KEY_CITE: use key as label
+% NAMED_REFS: use (Smith, 1988) style of citations
+% CSC_NAMES: names set in caps and small caps
+% JOUR_DEEMPH: don't emphasize journal name
+% ETAL_EMPH: emphasize et al.
+% ALT_INCOLL alternate ordering of fields in incollections
+% These are all boolean (0 or 1) except for MAX_NAMES and MIN_NAMES.
+% These need to satisfy 0 <= MIN_NAMES <= MAX_NAMES.
+% The rule here is that if all these are defined to be zero, we revert to
+% the standard styles. For that reason we initialize them all to 0.
+% These are the original macros
+ % For Journal of Computational Physics
+ % Cris Barnes and Dave Mikkelson, 9/25/89
+% This is the start of btxbst.doc
+% BibTeX `plain' family
+ % version 0.99b for BibTeX versions 0.99a or later, LaTeX version 2.09.
+ % Copyright (C) 1985, all rights reserved.
+ % Copying of this file is authorized only if either
+ % (1) you make absolutely no changes to your copy, including name, or
+ % (2) if you do make changes, you name it something other than
+ % btxbst.doc, plain.bst, unsrt.bst, alpha.bst, and abbrv.bst.
+ % This restriction helps ensure that all standard styles are identical.
+ % The file btxbst.doc has the documentation for this style.
+% Please notify Oren Patashnik (PATASHNIK@SCORE.STANFORD.EDU) of any bugs in
+% these standard styles or in this documentation file.
+%
+% This is file btxbxt.doc; it helps document bibliography styles,
+% and is also a template file that you can use to make
+% several different style files, if you have access to a C preprocessor.
+% For example, the standard styles were made by doing something like
+% cpp -P -DPLAIN btxbst.doc plain.txt
+% cpp -P -DUNSRT btxbst.doc unsrt.txt
+% cpp -P -DALPHA btxbst.doc alpha.txt
+% cpp -P -DABBRV btxbst.doc abbrv.txt
+% and then renaming after removing unwanted comments and blank lines.
+% If you don't have access,
+% you can edit this file by hand to imitate the preprocessor,
+% with the following explanation of the C preprocessor constructs used here.
+%
+% The output of the preprocessor is the same as the input, except that certain
+% lines will be excluded (and some blank lines will be added). The sequence
+% #if VAR
+% lines to be included when VAR is not zero
+% #else
+% lines to be included when VAR is zero
+% #endif
+% (with the #-signs appearing in column 1) means that one set or the other of
+% the lines are to be included depending on the value of VAR.
+% The #else part is optional. Comments can be added after #else and #endif.
+% Variables can be set by
+% #define VAR value
+% and one can also use #ifdef VAR to see if VAR has any value, and #ifndef
+% to see if it has none.
+% Another #if form used in this file is #if !VAR, which includes the lines
+% after the #if only if VAR is zero.
+%
+% Convention: Use all uppercase identifiers for these preprocessor variables
+% so you can spot them easily
+%
+% The command line to the preprocessor should define one of PLAIN, UNSRT, ALPHA
+% or ABBRV (though PLAIN will be used by default if none is given),
+% and the following lines will set various boolean variables to control the
+% various lines that are chosen from the rest of the file.
+% Each boolean variable should be set true (1) or false (0) in each style.
+% Here are the current variables, and their meanings:
+% 0: an alphabetic label is used (if false then a numeric
+% label is used)
+% 0: the entries should be sorted by label (if nonnumeric)
+% and other info, like authors (if false, then
+% entries remain in order of occurrence)
+% 0: the authors, editors, etc., get the full names as
+% given in the bibliography file (if false, the first
+% names become initials)
+% 0: titles of non-"books" (e.g., articles) should be
+% converted to lower-case, except the first letter or
+% first letter after a colon
+% (if false then they appear as in the database)
+% 0: months are spelled out in full (if false, then
+% they're abbreviated)
+% 0: macro journal names are spelled out in full
+% (if false then they are abbreviated, currently
+% as they appear in ACM publications)
+%# define PLAIN 1
+%
+% Entry formatting: Similar to that recommended by Mary-Claire van Leunen
+% in "A Handbook for Scholars". Book-like titles are italicized
+% (emphasized) and non-book titles are converted to sentence
+% capitilization (and not enclosed in quotes).
+% This file outputs a \newblock between major blocks of an entry
+% (the name \newblock is analogous to the names \newline and \newpage)
+% so that the user can obtain an "open" format, which has a line break
+% before each block and lines after the first are indented within blocks,
+% by giving the optional \documentstyle argument `openbib';
+% The default is the "closed" format---blocks runs together.
+%
+% Citation alphabetic label format:
+% [Knu73] for single author (or editor or key)
+% [AHU83] (first letters of last names) for multiple authors
+%
+% Citation label numberic format:
+% [number]
+%
+% Reference list ordering for sorted, alphabetic lables:
+% alphabetical by citation label, then by author(s) or whatever
+% passes for author in the absence of one, then by year,
+% then title
+%
+% Reference list ordering for sorted, numeric lables:
+% alphabetical by author(s) or whatever passes
+% for author in the absence of one, then by year, then title
+%
+% Reference list ordering for unsorted:
+% by the order cited in the text
+%
+% History
+% 12/16/84 (HWT) Original `plain' version, by Howard Trickey.
+% 12/23/84 (LL) Some comments made by Leslie Lamport.
+% 2/16/85 (OP) Changes based on LL's comments, Oren Patashnik.
+% 2/17/85 (HWT) Template file and other standard styles made.
+% 3/28/85 (OP) First release, version 0.98b for BibTeX 0.98f.
+% 5/ 9/85 (OP) Version 0.98c for BibTeX 0.98i:
+% fixed Theoretical Computer Science macro name;
+% fixed the format.vol.num.pages function.
+% 1/24/88 (OP) Version 0.99a for BibTeX 0.99a, main changes:
+% assignment operator (:=) arguments reversed;
+% the preamble$ function outputs the database PREAMBLE;
+% entry.max$ and global.max$ (built-in) variables replace
+% entry.string.max and global.string.max functions;
+% alphabetizing by year then title, not just title;
+% many unnecessary ties removed; \it ==> \em;
+% the `alpha' style uses a superscripted `+' instead of a
+% `*' for unnamed names in constructing the label;
+% the `abbrv' style now uses "Mar." and "Sept.";
+% the functions calc.label and presort now look at just
+% the fields they're supposed to;
+% BOOKLET, MASTERSTHESIS, TECHREPORT use nonbook titles;
+% INBOOK and INCOLLECTION take an optional type (e.g.
+% type = "Section"), overriding the default "chapter";
+% BOOK, INBOOK, INCOLLECTION, and PROCEEDINGS now allow
+% either volume or number, not just volume;
+% INCOLLECTION now allows an edition and series field;
+% PROCEEDINGS and INPROCEEDINGS now use the address field
+% to tell where a conference was held;
+% INPROCEEDINGS and PROCEEDINGS now allow either volume
+% or number, and also a series field;
+% MASTERSTHESIS and PHDTHESIS accept types other than
+% "Master's thesis" and "PhD thesis";
+% UNPUBLISHED now outputs, in one block, note then date;
+% MANUAL now prints out the organization in
+% the first block if the author field is empty;
+% MISC can't be empty---it requires some optional field.
+% 3/23/88 (OP) Version 0.99b for BibTeX 0.99c---changed the three
+% erroneous occurrences of `cite ' to `cite$ '; this
+% change didn't affect the four standard styles, so the
+% 0.99a versions of those styles are still current.
+%
+% The ENTRY declaration
+% Like Scribe's (according to pages 231-2 of the April '84 edition),
+% but no fullauthor or editors fields because BibTeX does name handling.
+% The annote field is commented out here because this family doesn't
+% include an annotated bibliography style. And in addition to the fields
+% listed here, BibTeX has a built-in crossref field, explained later.
+ENTRY
+% Fields:
+ { address
+% Usually the address of a publisher or other type of organization.
+% Put information in this field only if it helps the reader find the
+% thing---for example you should omit the address of a major
+% publisher entirely. For a PROCEEDINGS or an INPROCEEDINGS,
+% however, it's the address of the conference; for those two entry
+% types, include the publisher's or organization's address, if
+% necessary, in the publisher or organization field.
+% annote
+% Long annotation---for annotated bibliographies (begins sentence).
+ author
+% Name(s) of author(s), in BibTeX name format.
+ booktitle
+% Book title when the thing being referenced isn't the whole book.
+% For book entries, the title field should be used instead.
+ chapter
+% Chapter (or section or whatever) number.
+ edition
+% Edition of a book---should be an ordinal (e.g., "Second").
+ editor
+% Name(s) of editor(s), in BibTeX name format.
+% If there is also an author field, then the editor field should be
+% for the book or collection that the work appears in.
+ howpublished
+% How something strange has been published (begins sentence).
+ institution
+% Sponsoring institution of a technical report.
+ journal
+% Journal name (macros are provided for many).
+ key
+% Alphabetizing, labeling, and cross-referencing key
+% (needed when an entry has no author or editor).
+ month
+% Month (macros are provided).
+ note
+% To help the reader find a reference (begins sentence).
+ number
+% Number of a journal or technical report, or of a work in a series.
+ organization
+% Organization sponsoring a conference (or publishing a manual); if
+% the editor (or author) is empty, and if the organization produces
+% an awkward label or cross reference, you should put appropriately
+% condensed organization information in the key field as well.
+ pages
+% Page number or numbers (use `--' to separate a range, use `+'
+% to indicate pages following that don't form a simple range).
+ publisher
+% Publisher name.
+ school
+% School name (for theses).
+ series
+% The name of a series or set of books.
+% An individual book will will also have it's own title.
+ title
+% The title of the thing you're referred to.
+ type
+% Type of a Techreport (e.g., "Research Note") to be used instead of
+% the default "Technical Report"; or, similarly, the type of a
+% thesis; or of a part of a book.
+ volume
+% The volume number of a journal or multivolume work.
+ year
+% The year should contain only numerals (technically, it should end
+% with four numerals, after purification; doesn't a begin sentence).
+ }
+% There are no integer entry variables
+ {}
+% These string entry variables are used to form the citation label.
+% In a storage pinch, sort.label can be easily computed on the fly.
+ { label }
+% Each entry function starts by calling output.bibitem, to write the
+% \bibitem and its arguments to the .BBL file. Then the various fields
+% are formatted and printed by output or output.check. Those functions
+% handle the writing of separators (commas, periods, \newblock's),
+% taking care not to do so when they are passed a null string.
+% Finally, fin.entry is called to add the final period and finish the
+% entry.
+%
+% A bibliographic reference is formatted into a number of `blocks':
+% in the open format, a block begins on a new line and subsequent
+% lines of the block are indented. A block may contain more than
+% one sentence (well, not a grammatical sentence, but something to
+% be ended with a sentence ending period). The entry functions should
+% call new.block whenever a block other than the first is about to be
+% started. They should call new.sentence whenever a new sentence is
+% to be started. The output functions will ensure that if two
+% new.sentence's occur without any non-null string being output between
+% them then there won't be two periods output. Similarly for two
+% successive new.block's.
+%
+% The output routines don't write their argument immediately.
+% Instead, by convention, that argument is saved on the stack to be
+% output next time (when we'll know what separator needs to come
+% after it). Meanwhile, the output routine has to pop the pending
+% output off the stack, append any needed separator, and write it.
+%
+% To tell which separator is needed, we maintain an output.state.
+% It will be one of these values:
+% before.all just after the \bibitem
+% mid.sentence in the middle of a sentence: comma needed
+% if more sentence is output
+% after.sentence just after a sentence: period needed
+% after.block just after a block (and sentence):
+% period and \newblock needed.
+% Note: These styles don't use after.sentence
+%
+% VAR: output.state : INTEGER -- state variable for output
+%
+% The output.nonnull function saves its argument (assumed to be nonnull)
+% on the stack, and writes the old saved value followed by any needed
+% separator. The ordering of the tests is decreasing frequency of
+% occurrence.
+%
+% output.nonnull(s) ==
+% BEGIN
+% s := argument on stack
+% if output.state = mid.sentence then
+% write$(pop() * ", ")
+% -- "pop" isn't a function: just use stack top
+% else
+% if output.state = after.block then
+% write$(add.period$(pop()))
+% newline$
+% write$("\newblock ")
+% else
+% if output.state = before.all then
+% write$(pop())
+% else -- output.state should be after.sentence
+% write$(add.period$(pop()) * " ")
+% fi
+% fi
+% output.state := mid.sentence
+% fi
+% push s on stack
+% END
+%
+% The output function calls output.nonnull if its argument is non-empty;
+% its argument may be a missing field (thus, not necessarily a string)
+%
+% output(s) ==
+% BEGIN
+% if not empty$(s) then output.nonnull(s)
+% fi
+% END
+%
+% The output.check function is the same as the output function except that, if
+% necessary, output.check warns the user that the t field shouldn't be empty
+% (this is because it probably won't be a good reference without the field;
+% the entry functions try to make the formatting look reasonable even when
+% such fields are empty).
+%
+% output.check(s,t) ==
+% BEGIN
+% if empty$(s) then
+% warning$("empty " * t * " in " * cite$)
+% else output.nonnull(s)
+% fi
+% END
+%
+% The output.bibitem function writes the \bibitem for the current entry
+% (the label should already have been set up), and sets up the separator
+% state for the output functions. And, it leaves a string on the stack
+% as per the output convention.
+%
+% output.bibitem ==
+% BEGIN
+% newline$
+% write$("\bibitem[") % for alphabetic labels,
+% write$(label) % these three lines
+% write$("]{") % are used
+% write$("\bibitem{") % this line for numeric labels
+% write$(cite$)
+% write$("}")
+% push "" on stack
+% output.state := before.all
+% END
+%
+% The fin.entry function finishes off an entry by adding a period to the
+% string remaining on the stack. If the state is still before.all
+% then nothing was produced for this entry, so the result will look bad,
+% but the user deserves it. (We don't omit the whole entry because the
+% entry was cited, and a bibitem is needed to define the citation label.)
+%
+% fin.entry ==
+% BEGIN
+% write$(add.period$(pop()))
+% newline$
+% END
+%
+% The new.block function prepares for a new block to be output, and
+% new.sentence prepares for a new sentence.
+%
+% new.block ==
+% BEGIN
+% if output.state <> before.all then
+% output.state := after.block
+% fi
+% END
+%
+% new.sentence ==
+% BEGIN
+% if output.state <> after.block then
+% if output.state <> before.all then
+% output.state := after.sentence
+% fi
+% fi
+% END
+%
+INTEGERS { output.state before.all mid.sentence after.sentence after.block }
+FUNCTION {init.state.consts}
+{ #0 'before.all :=
+ #1 'mid.sentence :=
+ #2 'after.sentence :=
+ #3 'after.block :=
+}
+% the variables s and t are temporary string holders
+STRINGS { s t }
+FUNCTION {output.nonnull}
+{ 's :=
+ output.state mid.sentence =
+ { ", " * write$ }
+ { output.state after.block =
+ { "," * write$
+ newline$
+ "\newblock " write$
+ }
+ { output.state before.all =
+ 'write$
+ { add.period$ " " * write$ }
+ if$
+ }
+ if$
+ mid.sentence 'output.state :=
+ }
+ if$
+ s
+}
+FUNCTION {output}
+{ duplicate$ empty$
+ 'pop$
+ 'output.nonnull
+ if$
+}
+FUNCTION {output.check}
+{ 't :=
+ duplicate$ empty$
+ { pop$ "empty " t * " in " * cite$ * warning$ }
+ 'output.nonnull
+ if$
+}
+FUNCTION {output.bibitem}
+{ newline$
+ "\bibitem{" write$
+ cite$ write$
+ "}" write$
+ newline$
+ ""
+ before.all 'output.state :=
+}
+% This function finishes all entries.
+FUNCTION {fin.entry}
+{ add.period$
+ write$
+ newline$
+}
+FUNCTION {new.block}
+{ output.state before.all =
+ 'skip$
+ { after.block 'output.state := }
+ if$
+}
+FUNCTION {new.sentence}
+{ skip$
+}
+% These three functions pop one or two (integer) arguments from the stack
+% and push a single one, either 0 or 1.
+% The 'skip$ in the `and' and `or' functions are used because
+% the corresponding if$ would be idempotent
+FUNCTION {not}
+{ { #0 }
+ { #1 }
+ if$
+}
+FUNCTION {and}
+{ 'skip$
+ { pop$ #0 }
+ if$
+}
+FUNCTION {or}
+{ { pop$ #1 }
+ 'skip$
+ if$
+}
+% Sometimes we begin a new block only if the block will be big enough. The
+% new.block.checka function issues a new.block if its argument is nonempty;
+% new.block.checkb does the same if either of its TWO arguments is nonempty.
+FUNCTION {new.block.checka}
+{ empty$
+ 'skip$
+ 'new.block
+ if$
+}
+FUNCTION {new.block.checkb}
+{ empty$
+ swap$ empty$
+ and
+ 'skip$
+ 'new.block
+ if$
+}
+% The new.sentence.check functions are analogous.
+FUNCTION {new.sentence.checka}
+{ empty$
+ 'skip$
+ 'new.sentence
+ if$
+}
+FUNCTION {new.sentence.checkb}
+{ empty$
+ swap$ empty$
+ and
+ 'skip$
+ 'new.sentence
+ if$
+}
+% Here are some functions for formatting chunks of an entry.
+% By convention they either produce a string that can be followed by
+% a comma or period (using add.period$, so it is OK to end in a period),
+% or they produce the null string.
+%
+% A useful utility is the field.or.null function, which checks if the
+% argument is the result of pushing a `missing' field (one for which no
+% assignment was made when the current entry was read in from the database)
+% or the result of pushing a string having no non-white-space characters.
+% It returns the null string if so, otherwise it returns the field string.
+% Its main (but not only) purpose is to guarantee that what's left on the
+% stack is a string rather than a missing field.
+%
+% field.or.null(s) ==
+% BEGIN
+% if empty$(s) then return ""
+% else return s
+% END
+%
+% Another helper function is emphasize, which returns the argument emphazised,
+% if that is non-empty, otherwise it returns the null string. Italic
+% corrections aren't used, so this function should be used when punctation
+% will follow the result.
+%
+% emphasize(s) ==
+% BEGIN
+% if empty$(s) then return ""
+% else return "{\em " * s * "}"
+%
+% The format.names function formats the argument (which should be in
+% BibTeX name format) into "First Von Last, Junior", separated by commas
+% and with an "and" before the last (but ending with "et~al." if the last
+% of multiple authors is "others"). This function's argument should always
+% contain at least one name.
+%
+% VAR: nameptr, namesleft, numnames: INTEGER
+% pseudoVAR: nameresult: STRING (it's what's accumulated on the stack)
+%
+% format.names(s) ==
+% BEGIN
+% nameptr := 1
+% numnames := num.names$(s)
+% namesleft := numnames
+% while namesleft > 0
+% do
+% % for full names:
+% t := format.name$(s, nameptr, "{ff~}{vv~}{ll}{, jj}")
+% % for abbreviated first names:
+% t := format.name$(s, nameptr, "{f.~}{vv~}{ll}{, jj}")
+% if nameptr > 1 then
+% if namesleft > 1 then nameresult := nameresult * ", " * t
+% else if numnames > 2
+% then nameresult := nameresult * ","
+% fi
+% if t = "others"
+% then nameresult := nameresult * " et~al."
+% else nameresult := nameresult * " and " * t
+% fi
+% fi
+% else nameresult := t
+% fi
+% nameptr := nameptr + 1
+% namesleft := namesleft - 1
+% od
+% return nameresult
+% END
+%
+% The format.authors function returns the result of format.names(author)
+% if the author is present, or else it returns the null string
+%
+% format.authors ==
+% BEGIN
+% if empty$(author) then return ""
+% else return format.names(author)
+% fi
+% END
+%
+% Format.editors is like format.authors, but it uses the editor field,
+% and appends ", editor" or ", editors"
+%
+% format.editors ==
+% BEGIN
+% if empty$(editor) then return ""
+% else
+% if num.names$(editor) > 1 then
+% return format.names(editor) * ", editors"
+% else
+% return format.names(editor) * ", editor"
+% fi
+% fi
+% END
+%
+% Other formatting functions are similar, so no "comment version" will be
+% given for them.
+%
+% The `pop$' in this function gets rid of the duplicate `empty' value and
+% the `skip$' returns the duplicate field value
+FUNCTION {field.or.null}
+{ duplicate$ empty$
+ { pop$ "" }
+ 'skip$
+ if$
+}
+FUNCTION {emphasize}
+{ duplicate$ empty$
+ { pop$ "" }
+ { "{\em " swap$ * "}" * }
+ if$
+}
+FUNCTION {caps}
+{ duplicate$ empty$
+ { pop$ "" }
+ { "{\sc " swap$ * "}" * }
+ if$
+}
+FUNCTION {embolden}
+{ duplicate$ empty$
+ { pop$ "" }
+ { "{\bf " swap$ * "}" * }
+ if$
+}
+FUNCTION {paren}
+{ duplicate$ empty$
+ { pop$ "" }
+ { "(" swap$ * ")" * }
+ if$
+}
+INTEGERS { nameptr namesleft numnames }
+FUNCTION {format.names}
+{ 's :=
+ #1 'nameptr :=
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ { s nameptr "{f.~}{vv~}{ll}{, jj}" format.name$ 't :=
+ t "others" =
+ 'skip$
+ { t caps 't := }
+ if$
+ nameptr #1 >
+ { namesleft #1 >
+ { ", " * t * }
+ { numnames #2 >
+ { "," * }
+ 'skip$
+ if$
+ t "others" =
+ { " et~al." * }
+ { " and " * t * }
+ if$
+ }
+ if$
+ }
+ 't
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+}
+FUNCTION {format.authors}
+{ author empty$
+ { "" }
+ { author format.names }
+ if$
+}
+FUNCTION {format.editors}
+{ editor empty$
+ { "" }
+ { editor format.names
+ editor num.names$ #1 >
+ { ", editors" * }
+ { ", editor" * }
+ if$
+ }
+ if$
+}
+FUNCTION {format.edited}
+{ editor empty$
+ { "" }
+ { "edited by " editor format.names * }
+ if$
+}
+% The format.title function is used for non-book-like titles.
+% For most styles we convert to lowercase (except for the very first letter,
+% and except for the first one after a colon (followed by whitespace)),
+% and hope the user has brace-surrounded words that need to stay capitilized;
+% for some styles, however, we leave it as it is in the database.
+FUNCTION {format.title}
+{ title empty$
+ { "" }
+ 'title
+ if$
+}
+% By default, BibTeX sets the global integer variable global.max$ to the BibTeX
+% constant glob_str_size, the maximum length of a global string variable.
+% Analogously, BibTeX sets the global integer variable entry.max$ to
+% ent_str_size, the maximum length of an entry string variable.
+% The style designer may change these if necessary (but this is unlikely)
+% The n.dashify function makes each single `-' in a string a double `--'
+% if it's not already
+%
+% pseudoVAR: pageresult: STRING (it's what's accumulated on the stack)
+%
+% n.dashify(s) ==
+% BEGIN
+% t := s
+% pageresult := ""
+% while (not empty$(t))
+% do
+% if (first character of t = "-")
+% then
+% if (next character isn't)
+% then
+% pageresult := pageresult * "--"
+% t := t with the "-" removed
+% else
+% while (first character of t = "-")
+% do
+% pageresult := pageresult * "-"
+% t := t with the "-" removed
+% od
+% fi
+% else
+% pageresult := pageresult * the first character
+% t := t with the first character removed
+% fi
+% od
+% return pageresult
+% END
+FUNCTION {n.dashify}
+{ 't :=
+ ""
+ { t empty$ not }
+ { t #1 #1 substring$ "-" =
+ { t #1 #2 substring$ "--" = not
+ { "--" *
+ t #2 global.max$ substring$ 't :=
+ }
+ { { t #1 #1 substring$ "-" = }
+ { "-" *
+ t #2 global.max$ substring$ 't :=
+ }
+ while$
+ }
+ if$
+ }
+ { t #1 #1 substring$ *
+ t #2 global.max$ substring$ 't :=
+ }
+ if$
+ }
+ while$
+}
+FUNCTION {first.page}
+{ 't :=
+ ""
+ { t empty$ not t #1 #1 substring$ "-" = not and }
+ { t #1 #1 substring$ *
+ t #2 global.max$ substring$ 't :=
+ }
+ while$
+}
+% The format.date function is for the month and year, but we give a warning if
+% there's an empty year but the month is there, and we return the empty string
+% if they're both empty.
+FUNCTION {format.date}
+{ year empty$
+ { "" }
+ 'year
+ if$
+}
+% The format.btitle is for formatting the title field when it is a book-like
+% entry---the style used here keeps it in uppers-and-lowers and emphasizes it.
+FUNCTION {format.btitle}
+{ title emphasize
+}
+% For several functions we'll need to connect two strings with a
+% tie (~) if the second one isn't very long (fewer than 3 characters).
+% The tie.or.space.connect function does that. It concatenates the two
+% strings on top of the stack, along with either a tie or space between
+% them, and puts this concatenation back onto the stack:
+%
+% tie.or.space.connect(str1,str2) ==
+% BEGIN
+% if text.length$(str2) < 3
+% then return the concatenation of str1, "~", and str2
+% else return the concatenation of str1, " ", and str2
+% END
+FUNCTION {tie.or.space.connect}
+{ duplicate$ text.length$ #3 <
+ { "~" }
+ { " " }
+ if$
+ swap$ * *
+}
+% The either.or.check function complains if both fields or an either-or pair
+% are nonempty.
+%
+% either.or.check(t,s) ==
+% BEGIN
+% if empty$(s) then
+% warning$(can't use both " * t * " fields in " * cite$)
+% fi
+% END
+FUNCTION {either.or.check}
+{ empty$
+ 'pop$
+ { "can't use both " swap$ * " fields in " * cite$ * warning$ }
+ if$
+}
+% The format.bvolume function is for formatting the volume and perhaps
+% series name of a multivolume work. If both a volume and a series field
+% are there, we assume the series field is the title of the whole multivolume
+% work (the title field should be the title of the thing being referred to),
+% and we add an "of <series>". This function is called in mid-sentence.
+FUNCTION {format.bvolume}
+{ volume empty$
+ { "" }
+ { "volume" volume tie.or.space.connect
+ series empty$
+ 'skip$
+ { " of " * series emphasize * }
+ if$
+ "volume and number" number either.or.check
+ }
+ if$
+}
+% The format.number.series function is for formatting the series name
+% and perhaps number of a work in a series. This function is similar to
+% format.bvolume, although for this one the series must exist (and the
+% volume must not exist). If the number field is empty we output either
+% the series field unchanged if it exists or else the null string.
+% If both the number and series fields are there we assume the series field
+% gives the name of the whole series (the title field should be the title
+% of the work being one referred to), and we add an "in <series>".
+% We capitilize Number when this function is used at the beginning of a block.
+FUNCTION {format.number.series}
+{ volume empty$
+ { number empty$
+ { series field.or.null }
+ { output.state mid.sentence =
+ { "number" }
+ { "Number" }
+ if$
+ number tie.or.space.connect
+ series empty$
+ { "there's a number but no series in " cite$ * warning$ }
+ { " in " * series * }
+ if$
+ }
+ if$
+ }
+ { "" }
+ if$
+}
+% The format.edition function appends " edition" to the edition, if present.
+% We lowercase the edition (it should be something like "Third"), because
+% this doesn't start a sentence.
+FUNCTION {format.edition}
+{ edition empty$
+ { "" }
+ { output.state mid.sentence =
+ { edition "l" change.case$ " edition" * }
+ { edition "t" change.case$ " edition" * }
+ if$
+ }
+ if$
+}
+% The format.pages function is used for formatting a page range in a book
+% (and in rare circumstances, an article).
+%
+% The multi.page.check function examines the page field for a "-" or "," or "+"
+% so that format.pages can use "page" instead of "pages" if none exists.
+% Note: global.max$ here means "take the rest of the string"
+%
+% VAR: multiresult: INTEGER (actually, a boolean)
+%
+% multi.page.check(s) ==
+% BEGIN
+% t := s
+% multiresult := false
+% while ((not multiresult) and (not empty$(t)))
+% do
+% if (first character of t = "-" or "," or "+")
+% then multiresult := true
+% else t := t with the first character removed
+% fi
+% od
+% return multiresult
+% END
+INTEGERS { multiresult }
+FUNCTION {multi.page.check}
+{ 't :=
+ #0 'multiresult :=
+ { multiresult not
+ t empty$ not
+ and
+ }
+ { t #1 #1 substring$
+ duplicate$ "-" =
+ swap$ duplicate$ "," =
+ swap$ "+" =
+ or or
+ { #1 'multiresult := }
+ { t #2 global.max$ substring$ 't := }
+ if$
+ }
+ while$
+ multiresult
+}
+% This function doesn't begin a sentence so "pages" isn't capitalized.
+% Other functions that use this should keep that in mind.
+FUNCTION {format.pages}
+{ pages empty$
+ { "" }
+ { pages multi.page.check
+ { "pp." pages n.dashify tie.or.space.connect }
+ { "p." pages tie.or.space.connect }
+ if$
+ }
+ if$
+}
+FUNCTION {format.pages.a}
+{ pages empty$
+ { "" }
+ { "p." pages first.page tie.or.space.connect }
+ if$
+}
+% The format.vol.num.pages function is for the volume, number, and page range
+% of a journal article. We use the format: vol(number):pages, with some
+% variations for empty fields. This doesn't begin a sentence.
+FUNCTION {format.vol.num.pages}
+{ volume field.or.null embolden
+ " " swap$ * *
+ pages empty$
+ 'skip$
+ { duplicate$ empty$
+ { pop$ format.pages.a }
+ { ", " * pages first.page * }
+ if$
+ }
+ if$
+}
+% The format.chapter.pages, if the chapter is present, puts whatever is in the
+% type field (or else "chapter" if type is empty) in front of a chapter number.
+% It then appends the pages, if present. This doesn't begin a sentence.
+FUNCTION {format.chapter.pages}
+{ chapter empty$
+ 'format.pages
+ { type empty$
+ { "chapter" }
+ { type "l" change.case$ }
+ if$
+ chapter tie.or.space.connect
+ pages empty$
+ 'skip$
+ { ", " * format.pages * }
+ if$
+ }
+ if$
+}
+% The format.in.ed.booktitle function is used for starting out a sentence
+% that begins "In <booktitle>", putting an editor before the title if one
+% exists.
+FUNCTION {format.in.ed.booktitle}
+{ booktitle empty$
+ { "" }
+ { editor empty$
+ { "in " booktitle emphasize * }
+ { "in " booktitle emphasize * ", " * format.edited * }
+ if$
+ }
+ if$
+}
+% The function empty.misc.check complains if all six fields are empty, and
+% if there's been no sorting or alphabetic-label complaint.
+FUNCTION {empty.misc.check}
+{ author empty$ title empty$ howpublished empty$
+ month empty$ year empty$ note empty$
+ and and and and and
+ { "all relevant fields are empty in " cite$ * warning$ }
+ 'skip$
+ if$
+}
+% The function format.thesis.type returns either the (case-changed) type field,
+% if it is defined, or else the default string already on the stack
+% (like "Master's thesis" or "PhD thesis").
+FUNCTION {format.thesis.type}
+{ type empty$
+ 'skip$
+ { pop$
+ type "t" change.case$
+ }
+ if$
+}
+% The function format.tr.number makes a string starting with "Technical Report"
+% (or type, if that field is defined), followed by the number if there is one;
+% it returns the starting part (with a case change) even if there is no number.
+% This is used at the beginning of a sentence.
+FUNCTION {format.tr.number}
+{ type empty$
+ { "Technical Report" }
+ 'type
+ if$
+ number empty$
+ { "t" change.case$ }
+ { number tie.or.space.connect }
+ if$
+}
+% Now come the cross-referencing functions (these are invoked because
+% one entry in the database file(s) cross-references another, by giving
+% the other entry's database key in a `crossref' field). This feature
+% allows one or more titled things that are part of a larger titled
+% thing to cross-reference the larger thing. These styles allow for
+% five posibilities: (1) an ARTICLE may cross-reference an ARTICLE;
+% (2) a BOOK, (3) INBOOK, or (4) INCOLLECTION may cross-reference a BOOK;
+% or (5) an INPROCEEDINGS may cross-reference a PROCEEDINGS.
+% Each of these is explained in more detail later.
+%
+% An ARTICLE entry type may cross reference another ARTICLE (this is
+% intended for when an entire journal is devoted to a single topic---
+% but since there is no JOURNAL entry type, the journal, too, should be
+% classified as an ARTICLE but without the author and title fields).
+% This will result in two warning messages for the journal's entry
+% if it's included in the reference list, but such is life.
+%
+% format.article.crossref ==
+% BEGIN
+% if empty$(key) then
+% if empty$(journal) then
+% warning$("need key or journal for " * cite$ *
+% " to crossref " * crossref)
+% return(" \cite{" * crossref * "}")
+% else
+% return("In " * emphazise.correct (journal) *
+% " \cite{" * crossref * "}")
+% fi
+% else
+% return("In " * key * " \cite{" * crossref * "}")
+% fi
+% END
+%
+% The other cross-referencing functions are similar, so no "comment version"
+% will be given for them.
+FUNCTION {format.article.crossref}
+{ key empty$
+ { journal empty$
+ { "need key or journal for " cite$ * " to crossref " * crossref *
+ warning$
+ ""
+ }
+ { "In {\em " journal * "\/}" * }
+ if$
+ }
+ { "In " key * }
+ if$
+ " \cite{" * crossref * "}" *
+}
+% We use just the last names of editors for a cross reference: either
+% "editor", or "editor1 and editor2", or "editor1 et~al." depending on
+% whether there are one, or two, or more than two editors.
+FUNCTION {format.crossref.editor}
+{ editor #1 "{vv~}{ll}" format.name$ caps
+ editor num.names$ duplicate$
+ #2 >
+ { pop$ " et~al." * }
+ { #2 <
+ 'skip$
+ { editor #2 "{ff }{vv }{ll}{ jj}" format.name$ "others" =
+ { " et~al." * }
+ { " and " * editor #2 "{vv~}{ll}" format.name$ caps * }
+ if$
+ }
+ if$
+ }
+ if$
+}
+% A BOOK (or INBOOK) entry type (assumed to be for a single volume in a
+% multivolume work) may cross reference another BOOK (the entire multivolume).
+% Usually there will be an editor, in which case we use that to construct the
+% cross reference; otherwise we use a nonempty key field or else the series
+% field (since the series gives the title of the multivolume work).
+FUNCTION {format.book.crossref}
+{ volume empty$
+ { "empty volume in " cite$ * "'s crossref of " * crossref * warning$
+ "In "
+ }
+ { "Volume" volume tie.or.space.connect
+ " of " *
+ }
+ if$
+ editor empty$
+ editor field.or.null author field.or.null =
+ or
+ { key empty$
+ { series empty$
+ { "need editor, key, or series for " cite$ * " to crossref " *
+ crossref * warning$
+ "" *
+ }
+ { "{\em " * series * "\/}" * }
+ if$
+ }
+ { key * }
+ if$
+ }
+ { format.crossref.editor * }
+ if$
+ " \cite{" * crossref * "}" *
+}
+% An INCOLLECTION entry type may cross reference a BOOK (assumed to be the
+% collection), or an INPROCEEDINGS may cross reference a PROCEEDINGS.
+% Often there will be an editor, in which case we use that to construct
+% the cross reference; otherwise we use a nonempty key field or else
+% the booktitle field (which gives the cross-referenced work's title).
+FUNCTION {format.incoll.inproc.crossref}
+{ editor empty$
+ editor field.or.null author field.or.null =
+ or
+ { key empty$
+ { booktitle empty$
+ { "need editor, key, or booktitle for " cite$ * " to crossref " *
+ crossref * warning$
+ ""
+ }
+ { "In {\em " booktitle * "\/}" * }
+ if$
+ }
+ { "In " key * }
+ if$
+ }
+ { "In " format.crossref.editor * }
+ if$
+ " \cite{" * crossref * "}" *
+}
+% Now we define the type functions for all entry types that may appear
+% in the .BIB file---e.g., functions like `article' and `book'. These
+% are the routines that actually generate the .BBL-file output for
+% the entry. These must all precede the READ command. In addition, the
+% style designer should have a function `default.type' for unknown types.
+% Note: The fields (within each list) are listed in order of appearance,
+% except as described for an `inbook' or a `proceedings'.
+%
+% The article function is for an article in a journal. An article may
+% CROSSREF another article.
+% Required fields: author, title, journal, year
+% Optional fields: volume, number, pages, month, note
+%
+% article ==
+% BEGIN
+% output.bibitem
+% output.check(format.authors,"author")
+% new.block
+% output.check(format.title,"title")
+% new.block
+% if missing$(crossref) then
+% output.check(emphasize(journal),"journal")
+% output(format.vol.num.pages)
+% output.check(format.date,"year")
+% else
+% output.nonnull(format.article.crossref)
+% output(format.pages)
+% fi
+% new.block
+% output(note)
+% fin.entry
+% END
+%
+% The book function is for a whole book. A book may CROSSREF another book.
+% Required fields: author or editor, title, publisher, year
+% Optional fields: volume or number, series, address, edition, month,
+% note
+%
+% book ==
+% BEGIN
+% if empty$(author) then output.check(format.editors,"author and editor")
+% else output.check(format.authors,"author")
+% if missing$(crossref) then
+% either.or.check("author and editor",editor)
+% fi
+% fi
+% new.block
+% output.check(format.btitle,"title")
+% if missing$(crossref) then
+% output(format.bvolume)
+% new.block
+% output(format.number.series)
+% new.sentence
+% output.check(publisher,"publisher")
+% output(address)
+% else
+% new.block
+% output.nonnull(format.book.crossref)
+% fi
+% output(format.edition)
+% output.check(format.date,"year")
+% new.block
+% output(note)
+% fin.entry
+% END
+%
+% The other entry functions are all quite similar, so no "comment version"
+% will be given for them.
+FUNCTION {article}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ crossref missing$
+ { journal emphasize
+ format.vol.num.pages
+ format.date empty$
+ 'skip$
+ { duplicate$ empty$
+ { pop$ format.date paren }
+ { " " * format.date paren * }
+ if$
+ }
+ if$
+ output
+ }
+ { format.article.crossref output.nonnull
+ format.pages output
+ }
+ if$
+ new.block
+ note output
+ fin.entry
+}
+FUNCTION {book}
+{ output.bibitem
+ author empty$
+ { format.editors "author and editor" output.check }
+ { format.authors output.nonnull
+ crossref missing$
+ { "author and editor" editor either.or.check }
+ 'skip$
+ if$
+ }
+ if$
+ new.block
+ format.btitle "title" output.check
+ crossref missing$
+ { format.bvolume output
+ new.block
+ format.number.series output
+ new.sentence
+ publisher "publisher" output.check
+ address output
+ }
+ { new.block
+ format.book.crossref output.nonnull
+ }
+ if$
+ format.edition output
+ format.date "year" output.check
+ new.block
+ note output
+ fin.entry
+}
+% A booklet is a bound thing without a publisher or sponsoring institution.
+% Required: title
+% Optional: author, howpublished, address, month, year, note
+FUNCTION {booklet}
+{ output.bibitem
+ format.authors output
+ new.block
+ format.title "title" output.check
+ howpublished address new.block.checkb
+ howpublished output
+ address output
+ format.date output
+ new.block
+ note output
+ fin.entry
+}
+% For the conference entry type, see inproceedings.
+% An inbook is a piece of a book: either a chapter and/or a page range.
+% It may CROSSREF a book. If there's no volume field, the type field
+% will come before number and series.
+% Required: author or editor, title, chapter and/or pages, publisher,year
+% Optional: volume or number, series, type, address, edition, month, note
+FUNCTION {inbook}
+{ output.bibitem
+ author empty$
+ { format.editors "author and editor" output.check }
+ { format.authors output.nonnull
+ crossref missing$
+ { "author and editor" editor either.or.check }
+ 'skip$
+ if$
+ }
+ if$
+ new.block
+ format.btitle "title" output.check
+ crossref missing$
+ { format.bvolume output
+ format.chapter.pages "chapter and pages" output.check
+ new.block
+ format.number.series output
+ new.sentence
+ publisher "publisher" output.check
+ address output
+ }
+ { format.chapter.pages "chapter and pages" output.check
+ new.block
+ format.book.crossref output.nonnull
+ }
+ if$
+ format.edition output
+ format.date "year" output.check
+ new.block
+ note output
+ fin.entry
+}
+% An incollection is like inbook, but where there is a separate title
+% for the referenced thing (and perhaps an editor for the whole).
+% An incollection may CROSSREF a book.
+% Required: author, title, booktitle, publisher, year
+% Optional: editor, volume or number, series, type, chapter, pages,
+% address, edition, month, note
+FUNCTION {incollection}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.title "title" output.check
+ new.block
+ crossref missing$
+ { format.in.ed.booktitle "booktitle" output.check
+ format.bvolume output
+ format.number.series output
+ format.chapter.pages output
+ new.sentence
+ publisher "publisher" output.check
+ address output
+ format.edition output
+ format.date "year" output.check
+ }
+ { format.incoll.inproc.crossref output.nonnull
+ format.chapter.pages output
+ }
+ if$
+ new.block
+ note output
+ fin.entry
+}
+% An inproceedings is an article in a conference proceedings, and it may
+% CROSSREF a proceedings. If there's no address field, the month (& year)
+% will appear just before note.
+% Required: author, title, booktitle, year
+% Optional: editor, volume or number, series, pages, address, month,
+% organization, publisher, note
+FUNCTION {inproceedings}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.title "title" output.check
+ new.block
+ crossref missing$
+ { format.in.ed.booktitle "booktitle" output.check
+ format.bvolume output
+ format.number.series output
+ format.pages output
+ address empty$
+ { organization publisher new.sentence.checkb
+ organization output
+ publisher output
+ format.date "year" output.check
+ }
+ { address output.nonnull
+ format.date "year" output.check
+ new.sentence
+ organization output
+ publisher output
+ }
+ if$
+ }
+ { format.incoll.inproc.crossref output.nonnull
+ format.pages output
+ }
+ if$
+ new.block
+ note output
+ fin.entry
+}
+% The conference function is included for Scribe compatibility.
+FUNCTION {conference} { inproceedings }
+% A manual is technical documentation.
+% Required: title
+% Optional: author, organization, address, edition, month, year, note
+FUNCTION {manual}
+{ output.bibitem
+ author empty$
+ { organization empty$
+ 'skip$
+ { organization output.nonnull
+ address output
+ }
+ if$
+ }
+ { format.authors output.nonnull }
+ if$
+ new.block
+ format.btitle "title" output.check
+ author empty$
+ { organization empty$
+ { address new.block.checka
+ address output
+ }
+ 'skip$
+ if$
+ }
+ { organization address new.block.checkb
+ organization output
+ address output
+ }
+ if$
+ format.edition output
+ format.date output
+ new.block
+ note output
+ fin.entry
+}
+% A mastersthesis is a Master's thesis.
+% Required: author, title, school, year
+% Optional: type, address, month, note
+FUNCTION {mastersthesis}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.title "title" output.check
+ new.block
+ "Master's thesis" format.thesis.type output.nonnull
+ school "school" output.check
+ address output
+ format.date "year" output.check
+ new.block
+ note output
+ fin.entry
+}
+% A misc is something that doesn't fit elsewhere.
+% Required: at least one of the `optional' fields
+% Optional: author, title, howpublished, month, year, note
+FUNCTION {misc}
+{ output.bibitem
+ format.authors output
+ title howpublished new.block.checkb
+ format.title output
+ howpublished new.block.checka
+ howpublished output
+ format.date output
+ new.block
+ note output
+ fin.entry
+ empty.misc.check
+}
+% A phdthesis is like a mastersthesis.
+% Required: author, title, school, year
+% Optional: type, address, month, note
+FUNCTION {phdthesis}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.btitle "title" output.check
+ new.block
+ "PhD thesis" format.thesis.type output.nonnull
+ school "school" output.check
+ address output
+ format.date "year" output.check
+ new.block
+ note output
+ fin.entry
+}
+% A proceedings is a conference proceedings.
+% If there is an organization but no editor field, the organization will
+% appear as the first optional field (we try to make the first block nonempty);
+% if there's no address field, the month (& year) will appear just before note.
+% Required: title, year
+% Optional: editor, volume or number, series, address, month,
+% organization, publisher, note
+FUNCTION {proceedings}
+{ output.bibitem
+ editor empty$
+ { organization output }
+ { format.editors output.nonnull }
+ if$
+ new.block
+ format.btitle "title" output.check
+ format.bvolume output
+ format.number.series output
+ address empty$
+ { editor empty$
+ { publisher new.sentence.checka }
+ { organization publisher new.sentence.checkb
+ organization output
+ }
+ if$
+ publisher output
+ format.date "year" output.check
+ }
+ { address output.nonnull
+ format.date "year" output.check
+ new.sentence
+ editor empty$
+ 'skip$
+ { organization output }
+ if$
+ publisher output
+ }
+ if$
+ new.block
+ note output
+ fin.entry
+}
+% A techreport is a technical report.
+% Required: author, title, institution, year
+% Optional: type, number, address, month, note
+FUNCTION {techreport}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.title "title" output.check
+ new.block
+ format.tr.number output.nonnull
+ institution "institution" output.check
+ address output
+ format.date "year" output.check
+ new.block
+ note output
+ fin.entry
+}
+% An unpublished is something that hasn't been published.
+% Required: author, title, note
+% Optional: month, year
+FUNCTION {unpublished}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.title "title" output.check
+ new.block
+ note "note" output.check
+ format.date output
+ fin.entry
+}
+% We use entry type `misc' for an unknown type; BibTeX gives a warning.
+FUNCTION {default.type} { misc }
+% Here are macros for common things that may vary from style to style.
+% Users are encouraged to use these macros.
+%
+% Months are either written out in full or abbreviated
+MACRO {jan} {"Jan."}
+MACRO {feb} {"Feb."}
+MACRO {mar} {"Mar."}
+MACRO {apr} {"Apr."}
+MACRO {may} {"May"}
+MACRO {jun} {"June"}
+MACRO {jul} {"July"}
+MACRO {aug} {"Aug."}
+MACRO {sep} {"Sept."}
+MACRO {oct} {"Oct."}
+MACRO {nov} {"Nov."}
+MACRO {dec} {"Dec."}
+% Journals are either written out in full or abbreviated;
+% the abbreviations are like those found in ACM publications.
+%
+% To get a completely different set of abbreviations, it may be best to make
+% a separate .bib file with nothing but those abbreviations; users could then
+% include that file name as the first argument to the \bibliography command
+MACRO {acmcs} {"ACM Comput. Surv."}
+MACRO {acta} {"Acta Inf."}
+MACRO {cacm} {"Commun. ACM"}
+MACRO {ibmjrd} {"IBM J. Res. Dev."}
+MACRO {ibmsj} {"IBM Syst.~J."}
+MACRO {ieeese} {"IEEE Trans. Softw. Eng."}
+MACRO {ieeetc} {"IEEE Trans. Comput."}
+MACRO {ieeetcad}
+ {"IEEE Trans. Comput.-Aided Design Integrated Circuits"}
+MACRO {ipl} {"Inf. Process. Lett."}
+MACRO {jacm} {"J.~ACM"}
+MACRO {jcss} {"J.~Comput. Syst. Sci."}
+MACRO {scp} {"Sci. Comput. Programming"}
+MACRO {sicomp} {"SIAM J. Comput."}
+MACRO {tocs} {"ACM Trans. Comput. Syst."}
+MACRO {tods} {"ACM Trans. Database Syst."}
+MACRO {tog} {"ACM Trans. Gr."}
+MACRO {toms} {"ACM Trans. Math. Softw."}
+MACRO {toois} {"ACM Trans. Office Inf. Syst."}
+MACRO {toplas} {"ACM Trans. Prog. Lang. Syst."}
+MACRO {tcs} {"Theoretical Comput. Sci."}
+%% /usr/local/lib/tex/bibtex/phyjfull.btx, Tue Jun 30 08:37:48 1992
+%% Edit by Nelson H. F. Beebe <beebe@alfred.math.utah.edu>
+%% Change file names in leading comment
+% Journal Title Abbreviations from the Physical Review Style and Notation
+% Guide, July, 1983, in BAPS Vol. 28.
+% Selected by Cris Barnes and Charles Karney, March 1988
+% IMPORTANT!! Don't make changes to this file without making the
+% corresponding changes to
+% phyjabb.bib
+% phyjabb.btx
+MACRO {advp} {"Advances in Physics"}
+MACRO {ajp} {"American Journal of Physics"}
+MACRO {ao} {"Applied Optics"}
+MACRO {apl} {"Applied Physics Letters"}
+MACRO {apj} {"Astrophysical Journal"}
+MACRO {baps} {"Bulletin of the American Physical Society"}
+MACRO {cpc} {"Computer Physics Communications"}
+MACRO {cppcf} {"Comments on Plasma Physics and Controlled Fusion"}
+MACRO {fed} {"Fusion Engineering and Design"}
+MACRO {ft} {"Fusion Technology"}
+MACRO {ieeens} {"IEEE Transactions on Nuclear Science"}
+MACRO {ieeeps} {"IEEE Transactions on Plasma Science"}
+MACRO {ijimw} {"International Journal of Infrared and Millimeter Waves"}
+MACRO {ip} {"Infrared Physics"}
+MACRO {jap} {"Journal of Applied Physics"}
+MACRO {jcp} {"Journal of Computational Physics"}
+MACRO {jetp} {"Soviet Physics-JETP"}
+MACRO {jfe} {"Journal of Fusion Energy"}
+MACRO {jfm} {"Journal of Fluid Mechanics"}
+MACRO {jgr} {"Journal of Geophysical Research"}
+MACRO {jmp} {"Journal of Mathematical Physics"}
+MACRO {jne} {"Journal of Nuclear Energy"}
+MACRO {jnec} {"Journal of Nuclear Energy, Part C: Plasma Physics, Accelerators, Thermonuclear Research"}
+MACRO {jnm} {"Journal of Nuclear Materials"}
+MACRO {josa} {"Journal of the Optical Society of America"}
+MACRO {jpp} {"Journal of Plasma Physics"}
+MACRO {jpsj} {"Journal of the Physical Society of Japan"}
+MACRO {jvst} {"Journal of Vacuum Science and Technology"}
+MACRO {nedf} {"Nuclear Engineering and Design/Fusion"}
+MACRO {nf} {"Nuclear Fusion"}
+MACRO {nim} {"Nuclear Instruments and Methods"}
+MACRO {nimpr} {"Nuclear Instruments and Methods in Physics Research"}
+MACRO {nt/f} {"Nuclear Technology/Fusion"}
+MACRO {pf} {"Physics of Fluids"}
+MACRO {pfa} {"Physics of Fluids A: Fluid Dynamics"}
+MACRO {pfb} {"Physics of Fluids B: Plasma Physics"}
+MACRO {pl} {"Physics Letters"}
+MACRO {pla} {"Physics Letters A"}
+MACRO {pnas} {"Proceedings of the National Academy of Sciences of the USA"}
+MACRO {pp} {"Plasma Physics"}
+MACRO {ppcf} {"Plasma Physics and Controlled Fusion"}
+MACRO {prl} {"Physical Review Letters"}
+MACRO {pr} {"Physical Review"}
+MACRO {pra} {"Physical Review A: General Physics"}
+MACRO {ps} {"Physica Scripta"}
+MACRO {rmp} {"Reviews of Modern Physics"}
+MACRO {rsi} {"Review of Scientific Instruments"}
+MACRO {sjpp} {"Soviet Journal of Plasma Phys."}
+MACRO {spd} {"Soviet Physics-Doklady"}
+MACRO {sptp} {"Soviet Physics-Technical Physics"}
+MACRO {spu} {"Soviet Physics-Uspeki"}
+% Now we read in the .BIB entries.
+READ
+% The sortify function converts to lower case after purify$ing; it's
+% used in sorting and in computing alphabetic labels after sorting
+%
+% The chop.word(w,len,s) function returns either s or, if the first len
+% letters of s equals w (this comparison is done in the third line of the
+% function's definition), it returns that part of s after w.
+% This long comment applies only to alphabetic labels
+%
+% The format.lab.names function makes a short label by using the initials of
+% the von and Last parts of the names (but if there are more than four names,
+% (i.e., people) it truncates after three and adds a superscripted "+";
+% it also adds such a "+" if the last of multiple authors is "others").
+% If there is only one name, and its von and Last parts combined have just
+% a single name-token ("Knuth" has a single token, "Brinch Hansen" has two),
+% we take the first three letters of the last name. The boolean
+% et.al.char.used tells whether we've used a superscripted "+", so that we
+% know whether to include a LaTeX macro for it.
+%
+% format.lab.names(s) ==
+% BEGIN
+% numnames := num.names$(s)
+% if numnames > 1 then
+% if numnames > 4 then
+% namesleft := 3
+% else
+% namesleft := numnames
+% nameptr := 1
+% nameresult := ""
+% while namesleft > 0
+% do
+% if (name_ptr = numnames) and
+% format.name$(s, nameptr, "{ff }{vv }{ll}{ jj}") = "others"
+% then nameresult := nameresult * "{\etalchar{+}}"
+% et.al.char.used := true
+% else nameresult := nameresult *
+% format.name$(s, nameptr, "{v{}}{l{}}")
+% nameptr := nameptr + 1
+% namesleft := namesleft - 1
+% od
+% if numnames > 4 then
+% nameresult := nameresult * "{\etalchar{+}}"
+% et.al.char.used := true
+% else
+% t := format.name$(s, 1, "{v{}}{l{}}")
+% if text.length$(t) < 2 then % there's just one name-token
+% nameresult := text.prefix$(format.name$(s,1,"{ll}"),3)
+% else
+% nameresult := t
+% fi
+% fi
+% return nameresult
+% END
+%
+% Exactly what fields we look at in constructing the primary part of the label
+% depends on the entry type; this selectivity (as opposed to, say, always
+% looking at author, then editor, then key) helps ensure that "ignored" fields,
+% as described in the LaTeX book, really are ignored. Note that MISC is part
+% of the deepest `else' clause in the nested part of calc.label; thus, any
+% unrecognized entry type in the database is handled correctly.
+%
+% There is one auxiliary function for each of the four different sequences of
+% fields we use. The first of these functions looks at the author field, and
+% then, if necessary, the key field. The other three functions, which might
+% look at two fields and the key field, are similar, except that the key field
+% takes precedence over the organization field (for labels---not for sorting).
+%
+% The calc.label function calculates the preliminary label of an entry, which
+% is formed by taking three letters of information from the author or editor or
+% key or organization field (depending on the entry type and on what's empty,
+% but ignoring a leading "The " in the organization), and appending the last
+% two characters (digits) of the year. It is an error if the appropriate fields
+% among author, editor, organization, and key are missing, and we use
+% the first three letters of the cite$ in desperation when this happens.
+% The resulting label has the year part, but not the name part, purify$ed
+% (purify$ing the year allows some sorting shenanigans by the user).
+%
+% This function also calculates the version of the label to be used in sorting.
+%
+% The final label may need a trailing 'a', 'b', etc., to distinguish it from
+% otherwise identical labels, but we can't calculated those "extra.label"s
+% until after sorting.
+%
+% calc.label ==
+% BEGIN
+% if type$ = "book" or "inbook" then
+% author.editor.key.label
+% else if type$ = "proceedings" then
+% editor.key.organization.label
+% else if type$ = "manual" then
+% author.key.organization.label
+% else
+% author.key.label
+% fi fi fi
+% label := label * substring$(purify$(field.or.null(year)), -1, 2)
+% % assuming we will also sort, we calculate a sort.label
+% sort.label := sortify(label), but use the last four, not two, digits
+% END
+% When sorting, we compute the sortkey by executing "presort" on each entry.
+% The presort key contains a number of "sortify"ed strings, concatenated
+% with multiple blanks between them. This makes things like "brinch per"
+% come before "brinch hansen per".
+%
+% The fields used here are: the sort.label for alphabetic labels (as set by
+% calc.label), followed by the author names (or editor names or organization
+% (with a leading "The " removed) or key field, depending on entry type and on
+% what's empty), followed by year, followed by the first bit of the title
+% (chopping off a leading "The ", "A ", or "An ").
+% Names are formatted: Von Last First Junior.
+% The names within a part will be separated by a single blank
+% (such as "brinch hansen"), two will separate the name parts themselves
+% (except the von and last), three will separate the names,
+% four will separate the names from year (and from label, if alphabetic),
+% and four will separate year from title.
+%
+% The sort.format.names function takes an argument that should be in
+% BibTeX name format, and returns a string containing " "-separated
+% names in the format described above. The function is almost the same
+% as format.names.
+% This long comment applies only to alphabetic labels, when sorted
+%
+% Now comes the final computation for alphabetic labels, putting in the 'a's
+% and 'b's and so forth if required. This involves two passes: a forward
+% pass to put in the 'b's, 'c's and so on, and a backwards pass
+% to put in the 'a's (we don't want to put in 'a's unless we know there
+% are 'b's).
+% We have to keep track of the longest (in width$ terms) label, for use
+% by the "thebibliography" environment.
+%
+% VAR: longest.label, last.sort.label, next.extra: string
+% longest.label.width, last.extra.num: integer
+%
+% initialize.longest.label ==
+% BEGIN
+% longest.label := ""
+% last.sort.label := int.to.chr$(0)
+% next.extra := ""
+% longest.label.width := 0
+% last.extra.num := 0
+% END
+%
+% forward.pass ==
+% BEGIN
+% if last.sort.label = sort.label then
+% last.extra.num := last.extra.num + 1
+% extra.label := int.to.chr$(last.extra.num)
+% else
+% last.extra.num := chr.to.int$("a")
+% extra.label := ""
+% last.sort.label := sort.label
+% fi
+% END
+%
+% reverse.pass ==
+% BEGIN
+% if next.extra = "b" then
+% extra.label := "a"
+% fi
+% label := label * extra.label
+% if width$(label) > longest.label.width then
+% longest.label := label
+% longest.label.width := width$(label)
+% fi
+% next.extra := extra.label
+% END
+% Now comes the computation for numeric labels.
+% We use either the sorted order or original order.
+% We still have to keep track of the longest (in width$ terms) label, for use
+% by the "thebibliography" environment.
+STRINGS { longest.label }
+INTEGERS { number.label longest.label.width }
+FUNCTION {initialize.longest.label}
+{ "" 'longest.label :=
+ #1 'number.label :=
+ #0 'longest.label.width :=
+}
+FUNCTION {longest.label.pass}
+{ number.label int.to.str$ 'label :=
+ number.label #1 + 'number.label :=
+ label width$ longest.label.width >
+ { label 'longest.label :=
+ label width$ 'longest.label.width :=
+ }
+ 'skip$
+ if$
+}
+EXECUTE {initialize.longest.label}
+ITERATE {longest.label.pass}
+% Now we're ready to start writing the .BBL file.
+% We begin, if necessary, with a LaTeX macro for unnamed names in an alphabetic
+% label; next comes stuff from the `preamble' command in the database files.
+% Then we give an incantation containing the command
+% \begin{thebibliography}{...}
+% where the `...' is the longest label.
+%
+% We also call init.state.consts, for use by the output routines.
+FUNCTION {begin.bib}
+{ preamble$ empty$
+ 'skip$
+ { preamble$ write$ newline$ }
+ if$
+ "\begin{thebibliography}{" longest.label * "}" * write$ newline$
+}
+EXECUTE {begin.bib}
+EXECUTE {init.state.consts}
+% Now we produce the output for all the entries
+ITERATE {call.type$}
+% Finally, we finish up by writing the `\end{thebibliography}' command.
+FUNCTION {end.bib}
+{ newline$
+ "\end{thebibliography}" write$ newline$
+}
+EXECUTE {end.bib}
diff --git a/biblio/bibtex/contrib/other/phyjabb.bib b/biblio/bibtex/contrib/other/phyjabb.bib
new file mode 100644
index 0000000000..9163997d9c
--- /dev/null
+++ b/biblio/bibtex/contrib/other/phyjabb.bib
@@ -0,0 +1,60 @@
+%% /usr/local/lib/tex/bibtex/phyjabb.bib, Tue Jun 30 08:35:39 1992
+%% Edit by Nelson H. F. Beebe <beebe at alfred.math.utah.edu>
+%% Change file names in leading comment
+
+IMPORTANT!! Don't make changes to this file without making the
+ corresponding changes to
+ phyjabb.btx
+ phyjfull.btx
+
+@string{advp = {Adv. Phys.}}
+@string{ajp = {Am. J. Phys.}}
+@string{ao = {Appl. Opt.}}
+@string{apl = {Appl. Phys. Lett.}}
+@string{apj = {Astrophys. J.}}
+@string{baps = {Bull. Am. Phys. Soc.}}
+@string{cpc = {Computer Phys. Comm.}}
+@string{cppcf = {Comments Plasma Phys. Controlled Fusion}}
+@string{fed = {Fusion Eng. Design}}
+@string{ft = {Fusion Tech.}}
+@string{ieeens = {IEEE Trans. Nucl. Sci.}}
+@string{ieeeps = {IEEE Trans. Plasma Sci.}}
+@string{ijimw = {Int. J. Infrared Millimeter Waves}}
+@string{ip = {Infrared Phys.}}
+@string{jap = {J. Appl. Phys.}}
+@string{jcp = {J. Comput. Phys.}}
+@string{jetp = {Sov. Phys.-JETP}}
+@string{jfe = {J. Fusion Energy}}
+@string{jfm = {J. Fluid Mech.}}
+@string{jgr = {J. Geophys. Res.}}
+@string{jmp = {J. Math. Phys.}}
+@string{jne = {J. Nucl. Energy}}
+@string{jnec = {J. Nucl. Energy, Part C}}
+@string{jnm = {J. Nucl. Mater.}}
+@string{josa = {J. Opt. Soc. Am.}}
+@string{jpp = {J. Plasma Phys.}}
+@string{jpsj = {J. Phys. Soc. Jpn}}
+@string{jvst = {J. Vac. Sci. Technol.}}
+@string{nedf = {Nucl. Eng. Design/Fusion}}
+@string{nf = {Nucl. Fusion}}
+@string{nim = {Nucl. Instrum. Methods}}
+@string{nimpr = {Nucl. Instrum. Methods Phys. Research}}
+@string{nt/f = {Nucl. Tech./Fusion}}
+@string{pf = {Phys. Fluids}}
+@string{pfa = {Phys. Fluids A}}
+@string{pfb = {Phys. Fluids B}}
+@string{pl = {Phys. Lett.}}
+@string{pla = {Phys. Lett. A}}
+@string{pnas = {Proc. Nat. Acad. Sci. USA}}
+@string{pp = {Plasma Phys.}}
+@string{ppcf = {Plasma Phys. Controlled Fusion}}
+@string{prl = {Phys. Rev. Lett.}}
+@string{pr = {Phys. Rev.}}
+@string{pra = {Phys. Rev. A}}
+@string{ps = {Physica Scripta}}
+@string{rmp = {Rev. Mod. Phys.}}
+@string{rsi = {Rev. Sci. Instrum.}}
+@string{sjpp = {Sov. J. Plasma Phys.}}
+@string{spd = {Sov. Phys.-Dokl.}}
+@string{sptp = {Sov. Phys.-Tech. Phys.}}
+@string{spu = {Sov. Phys.-Usp.}}
diff --git a/biblio/bibtex/contrib/other/phyjabb.btx b/biblio/bibtex/contrib/other/phyjabb.btx
new file mode 100644
index 0000000000..71d758d301
--- /dev/null
+++ b/biblio/bibtex/contrib/other/phyjabb.btx
@@ -0,0 +1,63 @@
+%% /usr/local/lib/tex/bibtex/phyjabb.btx, Tue Jun 30 08:36:41 1992
+%% Edit by Nelson H. F. Beebe <beebe@alfred.math.utah.edu>
+%% Change file names in leading comment
+% Journal Title Abbreviations from the Physical Review Style and Notation
+% Guide, July, 1983, in BAPS Vol. 28.
+% Selected by Cris Barnes and Charles Karney, March 1988
+
+% IMPORTANT!! Don't make changes to this file without making the
+% corresponding changes to
+% phyjabb.bib
+% phyjfull.btx
+
+MACRO {advp} {"Adv. Phys."}
+MACRO {ajp} {"Am. J. Phys."}
+MACRO {ao} {"Appl. Opt."}
+MACRO {apl} {"Appl. Phys. Lett."}
+MACRO {apj} {"Astrophys. J."}
+MACRO {baps} {"Bull. Am. Phys. Soc."}
+MACRO {cpc} {"Computer Phys. Comm."}
+MACRO {cppcf} {"Comments Plasma Phys. Controlled Fusion"}
+MACRO {fed} {"Fusion Eng. Design"}
+MACRO {ft} {"Fusion Tech."}
+MACRO {ieeens} {"IEEE Trans. Nucl. Sci."}
+MACRO {ieeeps} {"IEEE Trans. Plasma Sci."}
+MACRO {ijimw} {"Int. J. Infrared Millimeter Waves"}
+MACRO {ip} {"Infrared Phys."}
+MACRO {jap} {"J. Appl. Phys."}
+MACRO {jcp} {"J. Comput. Phys."}
+MACRO {jetp} {"Sov. Phys.-JETP"}
+MACRO {jfe} {"J. Fusion Energy"}
+MACRO {jfm} {"J. Fluid Mech."}
+MACRO {jgr} {"J. Geophys. Res."}
+MACRO {jmp} {"J. Math. Phys."}
+MACRO {jne} {"J. Nucl. Energy"}
+MACRO {jnec} {"J. Nucl. Energy, Part C"}
+MACRO {jnm} {"J. Nucl. Mater."}
+MACRO {josa} {"J. Opt. Soc. Am."}
+MACRO {jpp} {"J. Plasma Phys."}
+MACRO {jpsj} {"J. Phys. Soc. Jpn"}
+MACRO {jvst} {"J. Vac. Sci. Technol."}
+MACRO {nedf} {"Nucl. Eng. Design/Fusion"}
+MACRO {nf} {"Nucl. Fusion"}
+MACRO {nim} {"Nucl. Instrum. Methods"}
+MACRO {nimpr} {"Nucl. Instrum. Methods Phys. Research"}
+MACRO {nt/f} {"Nucl. Tech./Fusion"}
+MACRO {pf} {"Phys. Fluids"}
+MACRO {pfa} {"Phys. Fluids A"}
+MACRO {pfb} {"Phys. Fluids B"}
+MACRO {pl} {"Phys. Lett."}
+MACRO {pla} {"Phys. Lett. A"}
+MACRO {pnas} {"Proc. Nat. Acad. Sci. USA"}
+MACRO {pp} {"Plasma Phys."}
+MACRO {ppcf} {"Plasma Phys. Controlled Fusion"}
+MACRO {prl} {"Phys. Rev. Lett."}
+MACRO {pr} {"Phys. Rev."}
+MACRO {pra} {"Phys. Rev. A"}
+MACRO {ps} {"Physica Scripta"}
+MACRO {rmp} {"Rev. Mod. Phys."}
+MACRO {rsi} {"Rev. Sci. Instrum."}
+MACRO {sjpp} {"Sov. J. Plasma Phys."}
+MACRO {spd} {"Sov. Phys.-Dokl."}
+MACRO {sptp} {"Sov. Phys.-Tech. Phys."}
+MACRO {spu} {"Sov. Phys.-Usp."}
diff --git a/biblio/bibtex/contrib/other/phyjfull.btx b/biblio/bibtex/contrib/other/phyjfull.btx
new file mode 100644
index 0000000000..31ae9e5d65
--- /dev/null
+++ b/biblio/bibtex/contrib/other/phyjfull.btx
@@ -0,0 +1,64 @@
+%% /usr/local/lib/tex/bibtex/phyjfull.btx, Tue Jun 30 08:37:48 1992
+%% Edit by Nelson H. F. Beebe <beebe@alfred.math.utah.edu>
+%% Change file names in leading comment
+
+% Journal Title Abbreviations from the Physical Review Style and Notation
+% Guide, July, 1983, in BAPS Vol. 28.
+% Selected by Cris Barnes and Charles Karney, March 1988
+
+% IMPORTANT!! Don't make changes to this file without making the
+% corresponding changes to
+% phyjabb.bib
+% phyjabb.btx
+
+MACRO {advp} {"Advances in Physics"}
+MACRO {ajp} {"American Journal of Physics"}
+MACRO {ao} {"Applied Optics"}
+MACRO {apl} {"Applied Physics Letters"}
+MACRO {apj} {"Astrophysical Journal"}
+MACRO {baps} {"Bulletin of the American Physical Society"}
+MACRO {cpc} {"Computer Physics Communications"}
+MACRO {cppcf} {"Comments on Plasma Physics and Controlled Fusion"}
+MACRO {fed} {"Fusion Engineering and Design"}
+MACRO {ft} {"Fusion Technology"}
+MACRO {ieeens} {"IEEE Transactions on Nuclear Science"}
+MACRO {ieeeps} {"IEEE Transactions on Plasma Science"}
+MACRO {ijimw} {"International Journal of Infrared and Millimeter Waves"}
+MACRO {ip} {"Infrared Physics"}
+MACRO {jap} {"Journal of Applied Physics"}
+MACRO {jcp} {"Journal of Computational Physics"}
+MACRO {jetp} {"Soviet Physics-JETP"}
+MACRO {jfe} {"Journal of Fusion Energy"}
+MACRO {jfm} {"Journal of Fluid Mechanics"}
+MACRO {jgr} {"Journal of Geophysical Research"}
+MACRO {jmp} {"Journal of Mathematical Physics"}
+MACRO {jne} {"Journal of Nuclear Energy"}
+MACRO {jnec} {"Journal of Nuclear Energy, Part C: Plasma Physics, Accelerators, Thermonuclear Research"}
+MACRO {jnm} {"Journal of Nuclear Materials"}
+MACRO {josa} {"Journal of the Optical Society of America"}
+MACRO {jpp} {"Journal of Plasma Physics"}
+MACRO {jpsj} {"Journal of the Physical Society of Japan"}
+MACRO {jvst} {"Journal of Vacuum Science and Technology"}
+MACRO {nedf} {"Nuclear Engineering and Design/Fusion"}
+MACRO {nf} {"Nuclear Fusion"}
+MACRO {nim} {"Nuclear Instruments and Methods"}
+MACRO {nimpr} {"Nuclear Instruments and Methods in Physics Research"}
+MACRO {nt/f} {"Nuclear Technology/Fusion"}
+MACRO {pf} {"Physics of Fluids"}
+MACRO {pfa} {"Physics of Fluids A: Fluid Dynamics"}
+MACRO {pfb} {"Physics of Fluids B: Plasma Physics"}
+MACRO {pl} {"Physics Letters"}
+MACRO {pla} {"Physics Letters A"}
+MACRO {pnas} {"Proceedings of the National Academy of Sciences of the USA"}
+MACRO {pp} {"Plasma Physics"}
+MACRO {ppcf} {"Plasma Physics and Controlled Fusion"}
+MACRO {prl} {"Physical Review Letters"}
+MACRO {pr} {"Physical Review"}
+MACRO {pra} {"Physical Review A: General Physics"}
+MACRO {ps} {"Physica Scripta"}
+MACRO {rmp} {"Reviews of Modern Physics"}
+MACRO {rsi} {"Review of Scientific Instruments"}
+MACRO {sjpp} {"Soviet Journal of Plasma Phys."}
+MACRO {spd} {"Soviet Physics-Doklady"}
+MACRO {sptp} {"Soviet Physics-Technical Physics"}
+MACRO {spu} {"Soviet Physics-Uspeki"}
diff --git a/biblio/bibtex/contrib/other/physics.btx b/biblio/bibtex/contrib/other/physics.btx
new file mode 100644
index 0000000000..c4041cc8b6
--- /dev/null
+++ b/biblio/bibtex/contrib/other/physics.btx
@@ -0,0 +1,3569 @@
+% BibTeX styles for various physics journals (27-Feb-1990).
+% This file, physics.btx, is based on the file btxbst.doc.
+ % Please notify Charles Karney (Karney@Princeton.EDU)
+ % of any bugs, improvements, etc.
+
+% Run this file through cpp to get specific versions. I have written
+% a version of cpp within Emacs. To access it put
+% (autoload 'cpp "tex$bibtex:cpp" ; Use cpp for BibTeX styles
+% "C preprocessor"
+% t)
+% into your .emacs file. Read in this file with
+% emacs tex$bibtex:physics.btx
+% and run cpp with e.g.,
+% M-x cpp <ret> aip <ret>
+% Save the resulting file to tex$latex:aip.bst.
+
+% To accomodate the variations we need (in addition to the definitions below)
+% ATIT_SUPPRESS: do not include the titles of journal articles
+% NAME_INVERT: put the initials last
+% NAME_UPPER: convert names to all caps.
+% MONTH_SUPPRESS: do not include months in journal articles
+% PAREN_DATE: dates go in parens in journal articles
+% DATE_FIRST: dates go before page numbers
+% VOLUME_SPACE: volume set off with space (not colon)
+% NUM_SUPPRESS: do not include numbers in journal articles
+% BOLD_VOL: volume numbers in bold face in journal articles
+% BRACKET_NOTE: notes in brackets
+% PAGE_START_J: include only starting page for journal articles
+% PAGE_START_O: include only starting page for other entries
+% PAGE_ABBREV: abbreviate page to p. and pages to pp.
+% PHYSICS_JOUR: include abbreviations for Physics journals
+% COMMA_DELIMIT: use comma (instead of period) to divide a citation
+% NOTE_SUPPRESS: suppress the note
+% MAX_NAMES: max number of authors before using et al (0 = infinity)
+% MIN_NAMES: number of authors to list with et al.
+% EDIT_VAR: use "edited by ..." instead of "..., editors"
+% RMP_LABELS: create RMP-style labels
+% KEY_CITE: use key as label
+% NAMED_REFS: use (Smith, 1988) style of citations
+% CSC_NAMES: names set in caps and small caps
+% JOUR_DEEMPH: don't emphasize journal name
+% ETAL_EMPH: emphasize et al.
+% ALT_INCOLL alternate ordering of fields in incollections
+
+% These are all boolean (0 or 1) except for MAX_NAMES and MIN_NAMES.
+% These need to satisfy 0 <= MIN_NAMES <= MAX_NAMES.
+% The rule here is that if all these are defined to be zero, we revert to
+% the standard styles. For that reason we initialize them all to 0.
+
+# define ATIT_SUPPRESS 0
+# define NAME_INVERT 0
+# define NAME_UPPER 0
+# define MONTH_SUPPRESS 0
+# define PAREN_DATE 0
+# define DATE_FIRST 0
+# define VOLUME_SPACE 0
+# define NUM_SUPPRESS 0
+# define BOLD_VOL 0
+# define BRACKET_NOTE 0
+# define PAGE_START_J 0
+# define PAGE_START_O 0
+# define PAGE_ABBREV 0
+# define PHYSICS_JOUR 0
+# define COMMA_DELIMIT 0
+# define NOTE_SUPPRESS 0
+# define MAX_NAMES 0
+# define MIN_NAMES 0
+# define EDIT_VAR 0
+# define RMP_LABELS 0
+# define KEY_CITE 0
+# define NAMED_REFS 0
+# define CSC_NAMES 0
+# define JOUR_DEEMPH 0
+# define ETAL_EMPH 0
+# define ALT_INCOLL 0
+
+% These are the original macros
+# define LAB_ALPH 0
+# define SORTED 0
+# define NAME_FULL 0
+# define ATIT_LOWER 0
+# define MONTH_FULL 0
+# define JOUR_FULL 0
+
+#ifdef AIP
+ % For American Institute of Physics Journals
+# define ATIT_SUPPRESS 1
+# define PAGE_START_J 1
+# define PHYSICS_JOUR 1
+# define MAX_NAMES 5
+# define MIN_NAMES 1
+# define EDIT_VAR 1
+# define ATIT_LOWER 1
+# define COMMA_DELIMIT 1
+# define VOLUME_SPACE 1
+# define MONTH_SUPPRESS 1
+# define PAREN_DATE 1
+# define NUM_SUPPRESS 1
+# define BOLD_VOL 1
+# define JOUR_DEEMPH 1
+#endif
+
+#ifdef PF
+ % For Physics of Fluids, which now wants ALL the authors
+ % (Same as AIP but infinite names, abbreviate pages, and
+ % alternate incollection)
+# define ATIT_SUPPRESS 1
+# define PAGE_START_J 1
+# define PHYSICS_JOUR 1
+# define EDIT_VAR 1
+# define ATIT_LOWER 1
+# define COMMA_DELIMIT 1
+# define VOLUME_SPACE 1
+# define MONTH_SUPPRESS 1
+# define PAREN_DATE 1
+# define NUM_SUPPRESS 1
+# define BOLD_VOL 1
+# define JOUR_DEEMPH 1
+# define PAGE_ABBREV 1
+# define ALT_INCOLL 1
+#endif
+
+#ifdef NF
+ % For Nuclear Fusion
+ % see Nuclear Fusion Vol. 28, No. 2 (1988),
+ % "Announcement [of] Guidelines for Bibliographical Citations"
+% same as AIP except for NAME_INVERT, NAME_UPPER, DATE_FIRST and
+% MIN_NAMES and MAX_NAMES set to use only three names if there are
+% 6 or more. Also, no EDIT_VAR, and use PAGE_START_O and PAGE_ABBREV.
+% There are still some nits to be picked (years in parentheses for
+% other than journals, volumes having Vol. before them and pages not
+% having p.)
+# define ATIT_SUPPRESS 1
+# define PAGE_START_J 1
+# define PAGE_START_O 1
+# define PAGE_ABBREV 1
+# define PHYSICS_JOUR 1
+# define ATIT_LOWER 1
+# define COMMA_DELIMIT 1
+# define VOLUME_SPACE 1
+# define MONTH_SUPPRESS 1
+# define PAREN_DATE 1
+# define NUM_SUPPRESS 1
+# define BOLD_VOL 1
+# define NAME_INVERT 1
+# define NAME_UPPER 1
+# define DATE_FIRST 1
+# define JOUR_DEEMPH 1
+# define MAX_NAMES 5
+# define MIN_NAMES 3
+#endif
+#ifdef NFLET
+ % For Nuclear Fusion Letters
+% same as NF except for MIN_NAMES and MAX_NAMES set to 5
+# define ATIT_SUPPRESS 1
+# define PAGE_START_J 1
+# define PAGE_START_O 1
+# define PAGE_ABBREV 1
+# define PHYSICS_JOUR 1
+# define ATIT_LOWER 1
+# define COMMA_DELIMIT 1
+# define VOLUME_SPACE 1
+# define MONTH_SUPPRESS 1
+# define PAREN_DATE 1
+# define NUM_SUPPRESS 1
+# define BOLD_VOL 1
+# define NAME_INVERT 1
+# define NAME_UPPER 1
+# define DATE_FIRST 1
+# define MAX_NAMES 5
+# define MIN_NAMES 5
+# define JOUR_DEEMPH 1
+#endif
+#ifdef IAEA
+ % For IAEA Conferences
+% same as NF except for MIN_NAMES and MAX_NAMES set to 1
+# define ATIT_SUPPRESS 1
+# define PAGE_START_J 1
+# define PHYSICS_JOUR 1
+# define EDIT_VAR 1
+# define ATIT_LOWER 1
+# define COMMA_DELIMIT 1
+# define VOLUME_SPACE 1
+# define MONTH_SUPPRESS 1
+# define PAREN_DATE 1
+# define NUM_SUPPRESS 1
+# define BOLD_VOL 1
+# define NAME_INVERT 1
+# define NAME_UPPER 1
+# define DATE_FIRST 1
+# define MAX_NAMES 1
+# define MIN_NAMES 1
+# define JOUR_DEEMPH 1
+#endif
+#ifdef CPC
+ % For Computer Physics Communications
+% same as AIP except for NAME_INVERT, DATE_FIRST
+# define ATIT_SUPPRESS 1
+# define PAGE_START_J 1
+# define PHYSICS_JOUR 1
+# define MAX_NAMES 5
+# define MIN_NAMES 1
+# define EDIT_VAR 1
+# define ATIT_LOWER 1
+# define COMMA_DELIMIT 1
+# define VOLUME_SPACE 1
+# define MONTH_SUPPRESS 1
+# define PAREN_DATE 1
+# define NUM_SUPPRESS 1
+# define BOLD_VOL 1
+# define NAME_INVERT 1
+# define DATE_FIRST 1
+# define JOUR_DEEMPH 1
+#endif
+#ifdef RMP
+ % For Reviews of Modern Physics,
+% except first name not inverted yet and order of fields not hacked
+# define LAB_ALPH 1
+# define SORTED 1
+# define RMP_LABELS 1
+# define ATIT_SUPPRESS 1
+# define ATIT_LOWER 1
+# define MONTH_SUPRESS 1
+# define NUM_SUPPRESS 1
+# define VOL_SUPPRESS 1
+# define BOLD_VOL 1
+# define BRACKET_NOTE 1
+# define PAGE_START_J 1
+# define PAGE_START_O 1
+# define PAGE_ABBREV 1
+# define PHYSICS_JOUR 1
+# define COMMA_DELIMIT 1
+# define EDIT_VAR 1
+# define JOUR_DEEMPH 1
+#endif
+#ifdef REPORT
+ % For internal reports
+% same as AIP except for ATIT_SUPPRESS, MONTH_SUPPRESS, PAGE_START_J,
+% NUM_SUPPRESS, MAX_NAMES, MIN_NAMES
+# define PHYSICS_JOUR 1
+# define EDIT_VAR 1
+# define ATIT_LOWER 0
+# define COMMA_DELIMIT 1
+# define VOLUME_SPACE 1
+# define PAREN_DATE 1
+# define BOLD_VOL 1
+# define JOUR_DEEMPH 1
+#endif
+#ifdef APALIKE
+ % For American Psychological Association
+ % (same as ALPHA but with NAMED_REFS set and NAME_FULL unset)
+# define LAB_ALPH 1
+# define SORTED 1
+# define NAME_FULL 0
+# define ATIT_LOWER 1
+# define MONTH_FULL 1
+# define JOUR_FULL 1
+# define NAMED_REFS 1
+# define NAME_INVERT 1
+#endif
+#ifdef PPCF
+ % A physics version of APALIKE
+# define PHYSICS_JOUR 1
+# define LAB_ALPH 1
+# define SORTED 1
+# define NAME_FULL 0
+# define ATIT_LOWER 0
+# define ATIT_SUPPRESS 1
+# define MONTH_FULL 1
+# define JOUR_FULL 0
+# define NAMED_REFS 1
+# define NAME_INVERT 1
+# define ETAL_EMPH 1
+# define CSC_NAMES 1
+# define NUM_SUPPRESS 1
+# define BOLD_VOL 1
+# define VOLUME_SPACE 1
+#endif
+#ifdef JCP
+ % For Journal of Computational Physics
+ % Cris Barnes and Dave Mikkelson, 9/25/89
+# define ATIT_SUPPRESS 1
+# define MONTH_SUPPRESS 1
+# define PAREN_DATE 1
+# define VOLUME_SPACE 1
+# define NUM_SUPPRESS 1
+# define BOLD_VOL 1
+# define PAGE_START_J 1
+# define PAGE_START_O 1
+# define PAGE_ABBREV 1
+# define PHYSICS_JOUR 1
+# define COMMA_DELIMIT 1
+# define NOTE_SUPPRESS 1
+# define EDIT_VAR 1
+# define CSC_NAMES 1
+#endif
+% This is the start of btxbst.doc
+
+% BibTeX `plain' family
+ % version 0.99b for BibTeX versions 0.99a or later, LaTeX version 2.09.
+ % Copyright (C) 1985, all rights reserved.
+ % Copying of this file is authorized only if either
+ % (1) you make absolutely no changes to your copy, including name, or
+ % (2) if you do make changes, you name it something other than
+ % btxbst.doc, plain.bst, unsrt.bst, alpha.bst, and abbrv.bst.
+ % This restriction helps ensure that all standard styles are identical.
+ % The file btxbst.doc has the documentation for this style.
+#if NAMED_REFS
+% BibTeX `apalike' bibliography style (24-Jan-88 version)
+% Adapted from the `alpha' style, version 0.99a; for BibTeX version 0.99a.
+% Copyright (C) 1988, all rights reserved.
+% Copying of this file is allowed, provided that if you make any changes at all
+% you name it something other than `apalike.bst'.
+% This restriction helps ensure that all copies are identical.
+% Differences between this style and `alpha' are generally heralded by a `%'.
+% The file btxbst.doc has the documentation for alpha.bst.
+%
+% This style should be used with the `apalike' LaTeX style (apalike.sty).
+% \cite's come out like "(Jones, 1986)" in the text but there are no labels
+% in the bibliography, and something like "(1986)" comes out immediately
+% after the author. Author (and editor) names appear as last name, comma,
+% initials. A `year' field is required for every entry, and so is either
+% an author (or in some cases, an editor) field or a key field.
+%
+% Editorial note:
+% Many journals require a style like `apalike', but I strongly, strongly,
+% strongly recommend that you not use it if you have a choice---use something
+% like `plain' instead. Mary-Claire van Leunen (A Handbook for Scholars,
+% Knopf, 1979) argues convincingly that a style like `plain' encourages better
+% writing than one like `apalike'. Furthermore the strongest arguments for
+% using an author-date style like `apalike'---that it's "the most practical"
+% (The Chicago Manual of Style, University of Chicago Press, thirteenth
+% edition, 1982, pages 400--401)---fall flat on their face with the new
+% computer-typesetting technology. For instance page 401 anachronistically
+% states "The chief disadvantage of [a style like `plain'] is that additions
+% or deletions cannot be made after the manuscript is typed without changing
+% numbers in both text references and list." LaTeX sidesteps the disadvantage.
+%
+% History:
+% 15-sep-86 (SK,OP) Original version, by Susan King and Oren Patashnik.
+% 10-nov-86 (OP) Truncated the sort.key$ string to the correct length
+% in bib.sort.order to eliminate error message.
+% 24-jan-88 (OP) Updated for BibTeX version 0.99a, from alpha.bst 0.99a;
+% apalike now sorts by author, then year, then title;
+% THIS `apalike' VERSION DOES NOT WORK WITH BIBTEX 0.98i.
+#endif APALIKE
+% Please notify Oren Patashnik (PATASHNIK@SCORE.STANFORD.EDU) of any bugs in
+% these standard styles or in this documentation file.
+%
+% This is file btxbxt.doc; it helps document bibliography styles,
+% and is also a template file that you can use to make
+% several different style files, if you have access to a C preprocessor.
+% For example, the standard styles were made by doing something like
+% cpp -P -DPLAIN btxbst.doc plain.txt
+% cpp -P -DUNSRT btxbst.doc unsrt.txt
+% cpp -P -DALPHA btxbst.doc alpha.txt
+% cpp -P -DABBRV btxbst.doc abbrv.txt
+% and then renaming after removing unwanted comments and blank lines.
+% If you don't have access,
+% you can edit this file by hand to imitate the preprocessor,
+% with the following explanation of the C preprocessor constructs used here.
+%
+% The output of the preprocessor is the same as the input, except that certain
+% lines will be excluded (and some blank lines will be added). The sequence
+% #if VAR
+% lines to be included when VAR is not zero
+% #else
+% lines to be included when VAR is zero
+% #endif
+% (with the #-signs appearing in column 1) means that one set or the other of
+% the lines are to be included depending on the value of VAR.
+% The #else part is optional. Comments can be added after #else and #endif.
+% Variables can be set by
+% #define VAR value
+% and one can also use #ifdef VAR to see if VAR has any value, and #ifndef
+% to see if it has none.
+% Another #if form used in this file is #if !VAR, which includes the lines
+% after the #if only if VAR is zero.
+%
+% Convention: Use all uppercase identifiers for these preprocessor variables
+% so you can spot them easily
+%
+% The command line to the preprocessor should define one of PLAIN, UNSRT, ALPHA
+% or ABBRV (though PLAIN will be used by default if none is given),
+% and the following lines will set various boolean variables to control the
+% various lines that are chosen from the rest of the file.
+% Each boolean variable should be set true (1) or false (0) in each style.
+% Here are the current variables, and their meanings:
+% LAB_ALPH: an alphabetic label is used (if false then a numeric
+% label is used)
+% SORTED: the entries should be sorted by label (if nonnumeric)
+% and other info, like authors (if false, then
+% entries remain in order of occurrence)
+% NAME_FULL: the authors, editors, etc., get the full names as
+% given in the bibliography file (if false, the first
+% names become initials)
+% ATIT_LOWER: titles of non-"books" (e.g., articles) should be
+% converted to lower-case, except the first letter or
+% first letter after a colon
+% (if false then they appear as in the database)
+% MONTH_FULL: months are spelled out in full (if false, then
+% they're abbreviated)
+% JOUR_FULL: macro journal names are spelled out in full
+% (if false then they are abbreviated, currently
+% as they appear in ACM publications)
+#ifndef UNSRT
+# ifndef ALPHA
+# ifndef ABBRV
+%# define PLAIN 1
+# endif
+# endif
+#endif
+#ifdef PLAIN
+% plain style (sorted numbers)
+# define LAB_ALPH 0
+# define SORTED 1
+# define NAME_FULL 1
+# define ATIT_LOWER 1
+# define MONTH_FULL 1
+# define JOUR_FULL 1
+#endif
+#ifdef UNSRT
+% unsrt style (unsorted numbers)
+# define LAB_ALPH 0
+# define SORTED 0
+# define NAME_FULL 1
+# define ATIT_LOWER 1
+# define MONTH_FULL 1
+# define JOUR_FULL 1
+#endif
+#ifdef ALPHA
+% alpha style (sorted short alphabetics)
+# define LAB_ALPH 1
+# define SORTED 1
+# define NAME_FULL 1
+# define ATIT_LOWER 1
+# define MONTH_FULL 1
+# define JOUR_FULL 1
+#endif
+#ifdef ABBRV
+% abbrv style (sorted numbers, with abbreviations)
+# define LAB_ALPH 0
+# define SORTED 1
+# define NAME_FULL 0
+# define ATIT_LOWER 1
+# define MONTH_FULL 0
+# define JOUR_FULL 0
+#endif
+%
+% Entry formatting: Similar to that recommended by Mary-Claire van Leunen
+% in "A Handbook for Scholars". Book-like titles are italicized
+% (emphasized) and non-book titles are converted to sentence
+% capitilization (and not enclosed in quotes).
+% This file outputs a \newblock between major blocks of an entry
+% (the name \newblock is analogous to the names \newline and \newpage)
+% so that the user can obtain an "open" format, which has a line break
+% before each block and lines after the first are indented within blocks,
+% by giving the optional \documentstyle argument `openbib';
+% The default is the "closed" format---blocks runs together.
+%
+% Citation alphabetic label format:
+% [Knu73] for single author (or editor or key)
+% [AHU83] (first letters of last names) for multiple authors
+%
+% Citation label numberic format:
+% [number]
+%
+% Reference list ordering for sorted, alphabetic lables:
+% alphabetical by citation label, then by author(s) or whatever
+% passes for author in the absence of one, then by year,
+% then title
+%
+% Reference list ordering for sorted, numeric lables:
+% alphabetical by author(s) or whatever passes
+% for author in the absence of one, then by year, then title
+%
+% Reference list ordering for unsorted:
+% by the order cited in the text
+%
+% History
+% 12/16/84 (HWT) Original `plain' version, by Howard Trickey.
+% 12/23/84 (LL) Some comments made by Leslie Lamport.
+% 2/16/85 (OP) Changes based on LL's comments, Oren Patashnik.
+% 2/17/85 (HWT) Template file and other standard styles made.
+% 3/28/85 (OP) First release, version 0.98b for BibTeX 0.98f.
+% 5/ 9/85 (OP) Version 0.98c for BibTeX 0.98i:
+% fixed Theoretical Computer Science macro name;
+% fixed the format.vol.num.pages function.
+% 1/24/88 (OP) Version 0.99a for BibTeX 0.99a, main changes:
+% assignment operator (:=) arguments reversed;
+% the preamble$ function outputs the database PREAMBLE;
+% entry.max$ and global.max$ (built-in) variables replace
+% entry.string.max and global.string.max functions;
+% alphabetizing by year then title, not just title;
+% many unnecessary ties removed; \it ==> \em;
+% the `alpha' style uses a superscripted `+' instead of a
+% `*' for unnamed names in constructing the label;
+% the `abbrv' style now uses "Mar." and "Sept.";
+% the functions calc.label and presort now look at just
+% the fields they're supposed to;
+% BOOKLET, MASTERSTHESIS, TECHREPORT use nonbook titles;
+% INBOOK and INCOLLECTION take an optional type (e.g.
+% type = "Section"), overriding the default "chapter";
+% BOOK, INBOOK, INCOLLECTION, and PROCEEDINGS now allow
+% either volume or number, not just volume;
+% INCOLLECTION now allows an edition and series field;
+% PROCEEDINGS and INPROCEEDINGS now use the address field
+% to tell where a conference was held;
+% INPROCEEDINGS and PROCEEDINGS now allow either volume
+% or number, and also a series field;
+% MASTERSTHESIS and PHDTHESIS accept types other than
+% "Master's thesis" and "PhD thesis";
+% UNPUBLISHED now outputs, in one block, note then date;
+% MANUAL now prints out the organization in
+% the first block if the author field is empty;
+% MISC can't be empty---it requires some optional field.
+% 3/23/88 (OP) Version 0.99b for BibTeX 0.99c---changed the three
+% erroneous occurrences of `cite ' to `cite$ '; this
+% change didn't affect the four standard styles, so the
+% 0.99a versions of those styles are still current.
+%
+% The ENTRY declaration
+% Like Scribe's (according to pages 231-2 of the April '84 edition),
+% but no fullauthor or editors fields because BibTeX does name handling.
+% The annote field is commented out here because this family doesn't
+% include an annotated bibliography style. And in addition to the fields
+% listed here, BibTeX has a built-in crossref field, explained later.
+
+ENTRY
+% Fields:
+ { address
+% Usually the address of a publisher or other type of organization.
+% Put information in this field only if it helps the reader find the
+% thing---for example you should omit the address of a major
+% publisher entirely. For a PROCEEDINGS or an INPROCEEDINGS,
+% however, it's the address of the conference; for those two entry
+% types, include the publisher's or organization's address, if
+% necessary, in the publisher or organization field.
+% annote
+% Long annotation---for annotated bibliographies (begins sentence).
+ author
+% Name(s) of author(s), in BibTeX name format.
+ booktitle
+% Book title when the thing being referenced isn't the whole book.
+% For book entries, the title field should be used instead.
+ chapter
+% Chapter (or section or whatever) number.
+ edition
+% Edition of a book---should be an ordinal (e.g., "Second").
+ editor
+% Name(s) of editor(s), in BibTeX name format.
+% If there is also an author field, then the editor field should be
+% for the book or collection that the work appears in.
+ howpublished
+% How something strange has been published (begins sentence).
+ institution
+% Sponsoring institution of a technical report.
+ journal
+% Journal name (macros are provided for many).
+ key
+% Alphabetizing, labeling, and cross-referencing key
+% (needed when an entry has no author or editor).
+#if !NAMED_REFS
+ month
+#else NAMED_REFS
+% month not used in apalike
+#endif
+% Month (macros are provided).
+ note
+% To help the reader find a reference (begins sentence).
+ number
+% Number of a journal or technical report, or of a work in a series.
+ organization
+% Organization sponsoring a conference (or publishing a manual); if
+% the editor (or author) is empty, and if the organization produces
+% an awkward label or cross reference, you should put appropriately
+% condensed organization information in the key field as well.
+ pages
+% Page number or numbers (use `--' to separate a range, use `+'
+% to indicate pages following that don't form a simple range).
+ publisher
+% Publisher name.
+ school
+% School name (for theses).
+ series
+% The name of a series or set of books.
+% An individual book will will also have it's own title.
+ title
+% The title of the thing you're referred to.
+ type
+% Type of a Techreport (e.g., "Research Note") to be used instead of
+% the default "Technical Report"; or, similarly, the type of a
+% thesis; or of a part of a book.
+ volume
+% The volume number of a journal or multivolume work.
+ year
+% The year should contain only numerals (technically, it should end
+% with four numerals, after purification; doesn't a begin sentence).
+ }
+% There are no integer entry variables
+ {}
+% These string entry variables are used to form the citation label.
+% In a storage pinch, sort.label can be easily computed on the fly.
+#if LAB_ALPH
+#if SORTED
+ { label extra.label sort.label }
+#else !SORTED
+% It doesn't seem like a good idea to use an order-of-citation
+% reference list when using alphabetic labels, but when this happens
+% we do things a little differently
+ { label }
+#endif SORTED
+#else !LAB_ALPH
+ { label }
+#endif LAB_ALPH
+
+% Each entry function starts by calling output.bibitem, to write the
+% \bibitem and its arguments to the .BBL file. Then the various fields
+% are formatted and printed by output or output.check. Those functions
+% handle the writing of separators (commas, periods, \newblock's),
+% taking care not to do so when they are passed a null string.
+% Finally, fin.entry is called to add the final period and finish the
+% entry.
+%
+% A bibliographic reference is formatted into a number of `blocks':
+% in the open format, a block begins on a new line and subsequent
+% lines of the block are indented. A block may contain more than
+% one sentence (well, not a grammatical sentence, but something to
+% be ended with a sentence ending period). The entry functions should
+% call new.block whenever a block other than the first is about to be
+% started. They should call new.sentence whenever a new sentence is
+% to be started. The output functions will ensure that if two
+% new.sentence's occur without any non-null string being output between
+% them then there won't be two periods output. Similarly for two
+% successive new.block's.
+%
+% The output routines don't write their argument immediately.
+% Instead, by convention, that argument is saved on the stack to be
+% output next time (when we'll know what separator needs to come
+% after it). Meanwhile, the output routine has to pop the pending
+% output off the stack, append any needed separator, and write it.
+%
+% To tell which separator is needed, we maintain an output.state.
+% It will be one of these values:
+% before.all just after the \bibitem
+% mid.sentence in the middle of a sentence: comma needed
+% if more sentence is output
+% after.sentence just after a sentence: period needed
+% after.block just after a block (and sentence):
+% period and \newblock needed.
+% Note: These styles don't use after.sentence
+%
+% VAR: output.state : INTEGER -- state variable for output
+%
+% The output.nonnull function saves its argument (assumed to be nonnull)
+% on the stack, and writes the old saved value followed by any needed
+% separator. The ordering of the tests is decreasing frequency of
+% occurrence.
+%
+% output.nonnull(s) ==
+% BEGIN
+% s := argument on stack
+% if output.state = mid.sentence then
+% write$(pop() * ", ")
+% -- "pop" isn't a function: just use stack top
+% else
+% if output.state = after.block then
+% write$(add.period$(pop()))
+% newline$
+% write$("\newblock ")
+% else
+% if output.state = before.all then
+% write$(pop())
+% else -- output.state should be after.sentence
+% write$(add.period$(pop()) * " ")
+% fi
+% fi
+% output.state := mid.sentence
+% fi
+% push s on stack
+% END
+%
+% The output function calls output.nonnull if its argument is non-empty;
+% its argument may be a missing field (thus, not necessarily a string)
+%
+% output(s) ==
+% BEGIN
+% if not empty$(s) then output.nonnull(s)
+% fi
+% END
+%
+% The output.check function is the same as the output function except that, if
+% necessary, output.check warns the user that the t field shouldn't be empty
+% (this is because it probably won't be a good reference without the field;
+% the entry functions try to make the formatting look reasonable even when
+% such fields are empty).
+%
+% output.check(s,t) ==
+% BEGIN
+% if empty$(s) then
+% warning$("empty " * t * " in " * cite$)
+% else output.nonnull(s)
+% fi
+% END
+%
+% The output.bibitem function writes the \bibitem for the current entry
+% (the label should already have been set up), and sets up the separator
+% state for the output functions. And, it leaves a string on the stack
+% as per the output convention.
+%
+% output.bibitem ==
+% BEGIN
+% newline$
+% write$("\bibitem[") % for alphabetic labels,
+% write$(label) % these three lines
+% write$("]{") % are used
+% write$("\bibitem{") % this line for numeric labels
+% write$(cite$)
+% write$("}")
+% push "" on stack
+% output.state := before.all
+% END
+%
+% The fin.entry function finishes off an entry by adding a period to the
+% string remaining on the stack. If the state is still before.all
+% then nothing was produced for this entry, so the result will look bad,
+% but the user deserves it. (We don't omit the whole entry because the
+% entry was cited, and a bibitem is needed to define the citation label.)
+%
+% fin.entry ==
+% BEGIN
+% write$(add.period$(pop()))
+% newline$
+% END
+%
+% The new.block function prepares for a new block to be output, and
+% new.sentence prepares for a new sentence.
+%
+% new.block ==
+% BEGIN
+% if output.state <> before.all then
+% output.state := after.block
+% fi
+% END
+%
+% new.sentence ==
+% BEGIN
+% if output.state <> after.block then
+% if output.state <> before.all then
+% output.state := after.sentence
+% fi
+% fi
+% END
+%
+
+INTEGERS { output.state before.all mid.sentence after.sentence after.block }
+
+FUNCTION {init.state.consts}
+{ #0 'before.all :=
+ #1 'mid.sentence :=
+ #2 'after.sentence :=
+ #3 'after.block :=
+}
+
+% the variables s and t are temporary string holders
+
+STRINGS { s t }
+
+FUNCTION {output.nonnull}
+{ 's :=
+ output.state mid.sentence =
+ { ", " * write$ }
+ { output.state after.block =
+#if !COMMA_DELIMIT
+ { add.period$ write$
+#else COMMA_DELIMIT
+ { "," * write$
+#endif
+ newline$
+ "\newblock " write$
+ }
+ { output.state before.all =
+ 'write$
+ { add.period$ " " * write$ }
+ if$
+ }
+ if$
+ mid.sentence 'output.state :=
+ }
+ if$
+ s
+}
+
+FUNCTION {output}
+{ duplicate$ empty$
+ 'pop$
+ 'output.nonnull
+ if$
+}
+
+FUNCTION {output.check}
+{ 't :=
+ duplicate$ empty$
+ { pop$ "empty " t * " in " * cite$ * warning$ }
+ 'output.nonnull
+ if$
+}
+
+#if NAMED_REFS
+% apalike needs this function because
+% the year has special punctuation;
+% apalike ignores the month
+FUNCTION {output.year.check}
+{ year empty$
+ { "empty year in " cite$ * warning$ }
+ { write$
+ " (" year * extra.label * ")" *
+ mid.sentence 'output.state :=
+ }
+ if$
+}
+#endif NAMED_REFS
+
+FUNCTION {output.bibitem}
+{ newline$
+#if LAB_ALPH
+ "\bibitem[" write$
+ label write$
+ "]{" write$
+#else
+ "\bibitem{" write$
+#endif LAB_ALPH
+ cite$ write$
+ "}" write$
+ newline$
+ ""
+ before.all 'output.state :=
+}
+
+% This function finishes all entries.
+
+FUNCTION {fin.entry}
+{ add.period$
+ write$
+ newline$
+}
+
+FUNCTION {new.block}
+{ output.state before.all =
+ 'skip$
+ { after.block 'output.state := }
+ if$
+}
+
+FUNCTION {new.sentence}
+#if !COMMA_DELIMIT
+{ output.state after.block =
+ 'skip$
+ { output.state before.all =
+ 'skip$
+ { after.sentence 'output.state := }
+ if$
+ }
+ if$
+#else COMMA_DELIMIT
+{ skip$
+#endif
+}
+
+% These three functions pop one or two (integer) arguments from the stack
+% and push a single one, either 0 or 1.
+% The 'skip$ in the `and' and `or' functions are used because
+% the corresponding if$ would be idempotent
+
+FUNCTION {not}
+{ { #0 }
+ { #1 }
+ if$
+}
+
+FUNCTION {and}
+{ 'skip$
+ { pop$ #0 }
+ if$
+}
+
+FUNCTION {or}
+{ { pop$ #1 }
+ 'skip$
+ if$
+}
+
+% Sometimes we begin a new block only if the block will be big enough. The
+% new.block.checka function issues a new.block if its argument is nonempty;
+% new.block.checkb does the same if either of its TWO arguments is nonempty.
+
+#if !NAMED_REFS
+FUNCTION {new.block.checka}
+{ empty$
+ 'skip$
+ 'new.block
+ if$
+}
+#endif !NAMED_REFS
+
+FUNCTION {new.block.checkb}
+{ empty$
+ swap$ empty$
+ and
+ 'skip$
+ 'new.block
+ if$
+}
+
+#if !NAMED_REFS
+% The new.sentence.check functions are analogous.
+
+FUNCTION {new.sentence.checka}
+{ empty$
+ 'skip$
+ 'new.sentence
+ if$
+}
+
+FUNCTION {new.sentence.checkb}
+{ empty$
+ swap$ empty$
+ and
+ 'skip$
+ 'new.sentence
+ if$
+}
+#endif !NAMED_REFS
+
+% Here are some functions for formatting chunks of an entry.
+% By convention they either produce a string that can be followed by
+% a comma or period (using add.period$, so it is OK to end in a period),
+% or they produce the null string.
+%
+% A useful utility is the field.or.null function, which checks if the
+% argument is the result of pushing a `missing' field (one for which no
+% assignment was made when the current entry was read in from the database)
+% or the result of pushing a string having no non-white-space characters.
+% It returns the null string if so, otherwise it returns the field string.
+% Its main (but not only) purpose is to guarantee that what's left on the
+% stack is a string rather than a missing field.
+%
+% field.or.null(s) ==
+% BEGIN
+% if empty$(s) then return ""
+% else return s
+% END
+%
+% Another helper function is emphasize, which returns the argument emphazised,
+% if that is non-empty, otherwise it returns the null string. Italic
+% corrections aren't used, so this function should be used when punctation
+% will follow the result.
+%
+% emphasize(s) ==
+% BEGIN
+% if empty$(s) then return ""
+% else return "{\em " * s * "}"
+%
+% The format.names function formats the argument (which should be in
+% BibTeX name format) into "First Von Last, Junior", separated by commas
+% and with an "and" before the last (but ending with "et~al." if the last
+% of multiple authors is "others"). This function's argument should always
+% contain at least one name.
+%
+% VAR: nameptr, namesleft, numnames: INTEGER
+% pseudoVAR: nameresult: STRING (it's what's accumulated on the stack)
+%
+% format.names(s) ==
+% BEGIN
+% nameptr := 1
+% numnames := num.names$(s)
+% namesleft := numnames
+% while namesleft > 0
+% do
+% % for full names:
+% t := format.name$(s, nameptr, "{ff~}{vv~}{ll}{, jj}")
+% % for abbreviated first names:
+% t := format.name$(s, nameptr, "{f.~}{vv~}{ll}{, jj}")
+% if nameptr > 1 then
+% if namesleft > 1 then nameresult := nameresult * ", " * t
+% else if numnames > 2
+% then nameresult := nameresult * ","
+% fi
+% if t = "others"
+% then nameresult := nameresult * " et~al."
+% else nameresult := nameresult * " and " * t
+% fi
+% fi
+% else nameresult := t
+% fi
+% nameptr := nameptr + 1
+% namesleft := namesleft - 1
+% od
+% return nameresult
+% END
+%
+% The format.authors function returns the result of format.names(author)
+% if the author is present, or else it returns the null string
+%
+% format.authors ==
+% BEGIN
+% if empty$(author) then return ""
+% else return format.names(author)
+% fi
+% END
+%
+% Format.editors is like format.authors, but it uses the editor field,
+% and appends ", editor" or ", editors"
+%
+% format.editors ==
+% BEGIN
+% if empty$(editor) then return ""
+% else
+% if num.names$(editor) > 1 then
+% return format.names(editor) * ", editors"
+% else
+% return format.names(editor) * ", editor"
+% fi
+% fi
+% END
+%
+% Other formatting functions are similar, so no "comment version" will be
+% given for them.
+%
+% The `pop$' in this function gets rid of the duplicate `empty' value and
+% the `skip$' returns the duplicate field value
+
+FUNCTION {field.or.null}
+{ duplicate$ empty$
+ { pop$ "" }
+ 'skip$
+ if$
+}
+
+FUNCTION {emphasize}
+{ duplicate$ empty$
+ { pop$ "" }
+ { "{\em " swap$ * "}" * }
+ if$
+}
+
+#if CSC_NAMES
+FUNCTION {caps}
+{ duplicate$ empty$
+ { pop$ "" }
+ { "{\sc " swap$ * "}" * }
+ if$
+}
+#endif
+
+#if BOLD_VOL
+FUNCTION {embolden}
+{ duplicate$ empty$
+ { pop$ "" }
+ { "{\bf " swap$ * "}" * }
+ if$
+}
+#endif
+
+#if BRACKET_NOTE
+FUNCTION {bracket}
+{ duplicate$ empty$
+ { pop$ "" }
+ { "[" swap$ * "]" * }
+ if$
+}
+#endif
+
+#if PAREN_DATE
+FUNCTION {paren}
+{ duplicate$ empty$
+ { pop$ "" }
+ { "(" swap$ * ")" * }
+ if$
+}
+#endif
+
+INTEGERS { nameptr namesleft numnames }
+
+#if MAX_NAMES
+INTEGERS { etal }
+#endif
+
+FUNCTION {format.names}
+{ 's :=
+ #1 'nameptr :=
+ s num.names$ 'numnames :=
+#if !MAX_NAMES
+ numnames 'namesleft :=
+#else MAX_NAMES
+ numnames #MAX_NAMES >
+ s numnames "{ll}" format.name$ "others" = numnames #MIN_NAMES > and
+ or 'etal :=
+ etal
+ { #MIN_NAMES #1 + 'namesleft := }
+ { numnames 'namesleft := }
+ if$
+#endif
+ { namesleft #0 > }
+#if NAME_FULL
+#if !NAME_INVERT
+ { s nameptr "{ff~}{vv~}{ll}{, jj}" format.name$ 't :=
+#else NAME_INVERT
+ { s nameptr "{vv~}{ll}{, jj}{, ff}" format.name$ 't :=
+#endif
+#else
+#if !NAME_INVERT
+ { s nameptr "{f.~}{vv~}{ll}{, jj}" format.name$ 't :=
+#else NAME_INVERT
+ { s nameptr "{vv~}{ll}{, jj}{, f.}" format.name$ 't := % last name first
+#endif
+#endif NAME_FULL
+#if NAME_UPPER
+ t "others" =
+ 'skip$
+ { t "u" change.case$ 't := }
+ if$
+#endif
+#if CSC_NAMES
+ t "others" =
+ 'skip$
+ { t caps 't := }
+ if$
+#endif
+ nameptr #1 >
+ { namesleft #1 >
+ { ", " * t * }
+#if !MAX_NAMES
+ { numnames #2 >
+ { "," * }
+ 'skip$
+ if$
+ t "others" =
+#if !ETAL_EMPH
+ { " et~al." * }
+#else ETAL_EMPH
+ { " {\em et~al.}" * }
+#endif ETAL_EMPH
+ { " and " * t * }
+ if$
+ }
+#else MAX_NAMES
+ { nameptr #2 >
+ { "," * }
+ 'skip$
+ if$
+ t "others" =
+ etal or
+#if !ETAL_EMPH
+ { " et~al." * }
+#else ETAL_EMPH
+ { " {\em et~al.}" * }
+#endif ETAL_EMPH
+ { " and " * t * }
+ if$
+ }
+#endif
+ if$
+ }
+ 't
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+}
+
+FUNCTION {format.authors}
+{ author empty$
+ { "" }
+ { author format.names }
+ if$
+}
+
+#if NAMED_REFS
+FUNCTION {format.key} % this function is just for apalike
+{ empty$
+ { key field.or.null }
+ { "" }
+ if$
+}
+#endif NAMED_REFS
+
+FUNCTION {format.editors}
+{ editor empty$
+ { "" }
+ { editor format.names
+ editor num.names$ #1 >
+ { ", editors" * }
+ { ", editor" * }
+ if$
+ }
+ if$
+}
+
+#if EDIT_VAR
+FUNCTION {format.edited}
+{ editor empty$
+ { "" }
+ { "edited by " editor format.names * }
+ if$
+}
+#endif
+
+% The format.title function is used for non-book-like titles.
+% For most styles we convert to lowercase (except for the very first letter,
+% and except for the first one after a colon (followed by whitespace)),
+% and hope the user has brace-surrounded words that need to stay capitilized;
+% for some styles, however, we leave it as it is in the database.
+
+FUNCTION {format.title}
+{ title empty$
+ { "" }
+#if ATIT_LOWER
+ { title "t" change.case$ }
+#else
+ 'title
+#endif ATIT_LOWER
+ if$
+}
+
+% By default, BibTeX sets the global integer variable global.max$ to the BibTeX
+% constant glob_str_size, the maximum length of a global string variable.
+% Analogously, BibTeX sets the global integer variable entry.max$ to
+% ent_str_size, the maximum length of an entry string variable.
+% The style designer may change these if necessary (but this is unlikely)
+
+% The n.dashify function makes each single `-' in a string a double `--'
+% if it's not already
+%
+% pseudoVAR: pageresult: STRING (it's what's accumulated on the stack)
+%
+% n.dashify(s) ==
+% BEGIN
+% t := s
+% pageresult := ""
+% while (not empty$(t))
+% do
+% if (first character of t = "-")
+% then
+% if (next character isn't)
+% then
+% pageresult := pageresult * "--"
+% t := t with the "-" removed
+% else
+% while (first character of t = "-")
+% do
+% pageresult := pageresult * "-"
+% t := t with the "-" removed
+% od
+% fi
+% else
+% pageresult := pageresult * the first character
+% t := t with the first character removed
+% fi
+% od
+% return pageresult
+% END
+
+FUNCTION {n.dashify}
+{ 't :=
+ ""
+ { t empty$ not }
+ { t #1 #1 substring$ "-" =
+ { t #1 #2 substring$ "--" = not
+ { "--" *
+ t #2 global.max$ substring$ 't :=
+ }
+ { { t #1 #1 substring$ "-" = }
+ { "-" *
+ t #2 global.max$ substring$ 't :=
+ }
+ while$
+ }
+ if$
+ }
+ { t #1 #1 substring$ *
+ t #2 global.max$ substring$ 't :=
+ }
+ if$
+ }
+ while$
+}
+
+#define TEMP 0
+#if PAGE_START_J
+#define TEMP 1
+#endif
+#if PAGE_START_O
+#define TEMP 1
+#endif
+
+#if TEMP
+FUNCTION {first.page}
+{ 't :=
+ ""
+ { t empty$ not t #1 #1 substring$ "-" = not and }
+ { t #1 #1 substring$ *
+ t #2 global.max$ substring$ 't :=
+ }
+ while$
+}
+#endif
+
+#if !NAMED_REFS
+% The format.date function is for the month and year, but we give a warning if
+% there's an empty year but the month is there, and we return the empty string
+% if they're both empty.
+
+FUNCTION {format.date}
+{ year empty$
+#if !MONTH_SUPPRESS
+ { month empty$
+ { "" }
+ { "there's a month but no year in " cite$ * warning$
+ month
+ }
+ if$
+ }
+ { month empty$
+ 'year
+ { month " " * year * }
+ if$
+ }
+#else MONTH_SUPPRESS
+ { "" }
+ 'year
+#endif
+ if$
+}
+#endif !NAMED_REFS
+
+% The format.btitle is for formatting the title field when it is a book-like
+% entry---the style used here keeps it in uppers-and-lowers and emphasizes it.
+
+FUNCTION {format.btitle}
+{ title emphasize
+}
+
+% For several functions we'll need to connect two strings with a
+% tie (~) if the second one isn't very long (fewer than 3 characters).
+% The tie.or.space.connect function does that. It concatenates the two
+% strings on top of the stack, along with either a tie or space between
+% them, and puts this concatenation back onto the stack:
+%
+% tie.or.space.connect(str1,str2) ==
+% BEGIN
+% if text.length$(str2) < 3
+% then return the concatenation of str1, "~", and str2
+% else return the concatenation of str1, " ", and str2
+% END
+
+FUNCTION {tie.or.space.connect}
+{ duplicate$ text.length$ #3 <
+ { "~" }
+ { " " }
+ if$
+ swap$ * *
+}
+
+% The either.or.check function complains if both fields or an either-or pair
+% are nonempty.
+%
+% either.or.check(t,s) ==
+% BEGIN
+% if empty$(s) then
+% warning$(can't use both " * t * " fields in " * cite$)
+% fi
+% END
+
+FUNCTION {either.or.check}
+{ empty$
+ 'pop$
+ { "can't use both " swap$ * " fields in " * cite$ * warning$ }
+ if$
+}
+
+% The format.bvolume function is for formatting the volume and perhaps
+% series name of a multivolume work. If both a volume and a series field
+% are there, we assume the series field is the title of the whole multivolume
+% work (the title field should be the title of the thing being referred to),
+% and we add an "of <series>". This function is called in mid-sentence.
+
+FUNCTION {format.bvolume}
+{ volume empty$
+ { "" }
+ { "volume" volume tie.or.space.connect
+ series empty$
+ 'skip$
+ { " of " * series emphasize * }
+ if$
+ "volume and number" number either.or.check
+ }
+ if$
+}
+
+% The format.number.series function is for formatting the series name
+% and perhaps number of a work in a series. This function is similar to
+% format.bvolume, although for this one the series must exist (and the
+% volume must not exist). If the number field is empty we output either
+% the series field unchanged if it exists or else the null string.
+% If both the number and series fields are there we assume the series field
+% gives the name of the whole series (the title field should be the title
+% of the work being one referred to), and we add an "in <series>".
+% We capitilize Number when this function is used at the beginning of a block.
+
+FUNCTION {format.number.series}
+{ volume empty$
+ { number empty$
+ { series field.or.null }
+ { output.state mid.sentence =
+ { "number" }
+ { "Number" }
+ if$
+ number tie.or.space.connect
+ series empty$
+ { "there's a number but no series in " cite$ * warning$ }
+ { " in " * series * }
+ if$
+ }
+ if$
+ }
+ { "" }
+ if$
+}
+
+% The format.edition function appends " edition" to the edition, if present.
+% We lowercase the edition (it should be something like "Third"), because
+% this doesn't start a sentence.
+
+FUNCTION {format.edition}
+{ edition empty$
+ { "" }
+ { output.state mid.sentence =
+ { edition "l" change.case$ " edition" * }
+ { edition "t" change.case$ " edition" * }
+ if$
+ }
+ if$
+}
+
+% The format.pages function is used for formatting a page range in a book
+% (and in rare circumstances, an article).
+%
+% The multi.page.check function examines the page field for a "-" or "," or "+"
+% so that format.pages can use "page" instead of "pages" if none exists.
+% Note: global.max$ here means "take the rest of the string"
+%
+% VAR: multiresult: INTEGER (actually, a boolean)
+%
+% multi.page.check(s) ==
+% BEGIN
+% t := s
+% multiresult := false
+% while ((not multiresult) and (not empty$(t)))
+% do
+% if (first character of t = "-" or "," or "+")
+% then multiresult := true
+% else t := t with the first character removed
+% fi
+% od
+% return multiresult
+% END
+
+INTEGERS { multiresult }
+
+FUNCTION {multi.page.check}
+{ 't :=
+ #0 'multiresult :=
+ { multiresult not
+ t empty$ not
+ and
+ }
+ { t #1 #1 substring$
+ duplicate$ "-" =
+ swap$ duplicate$ "," =
+ swap$ "+" =
+ or or
+ { #1 'multiresult := }
+ { t #2 global.max$ substring$ 't := }
+ if$
+ }
+ while$
+ multiresult
+}
+
+% This function doesn't begin a sentence so "pages" isn't capitalized.
+% Other functions that use this should keep that in mind.
+
+FUNCTION {format.pages}
+{ pages empty$
+ { "" }
+ { pages multi.page.check
+#if !PAGE_ABBREV
+ { "pages" pages n.dashify tie.or.space.connect }
+ { "page" pages tie.or.space.connect }
+#else PAGE_ABBREV
+ { "pp." pages n.dashify tie.or.space.connect }
+ { "p." pages tie.or.space.connect }
+#endif
+ if$
+ }
+ if$
+}
+
+#if TEMP
+FUNCTION {format.pages.a}
+{ pages empty$
+ { "" }
+#if !PAGE_ABBREV
+ { "page" pages first.page tie.or.space.connect }
+#else PAGE_ABBREV
+ { "p." pages first.page tie.or.space.connect }
+#endif
+ if$
+}
+#endif
+
+% The format.vol.num.pages function is for the volume, number, and page range
+% of a journal article. We use the format: vol(number):pages, with some
+% variations for empty fields. This doesn't begin a sentence.
+
+FUNCTION {format.vol.num.pages}
+#if !BOLD_VOL
+{ volume field.or.null
+#else BOLD_VOL
+{ volume field.or.null embolden
+#endif
+#if VOLUME_SPACE
+ " " swap$ * *
+#endif
+#if !NUM_SUPPRESS
+ number empty$
+ 'skip$
+ { "(" number * ")" * *
+ volume empty$
+ { "there's a number but no volume in " cite$ * warning$ }
+ 'skip$
+ if$
+ }
+ if$
+#endif
+#if DATE_FIRST
+ format.date empty$
+ 'skip$
+ { duplicate$ empty$
+ { pop$ format.date paren }
+ { " " * format.date paren * }
+ if$
+ }
+ if$
+#endif
+ pages empty$
+ 'skip$
+ { duplicate$ empty$
+#if !PAGE_START_J
+ { pop$ format.pages }
+#else PAGE_START_J
+ { pop$ format.pages.a }
+#endif
+#if !PAGE_START_J
+#if !DATE_FIRST
+#if !VOLUME_SPACE
+ { ":" * pages n.dashify * }
+#else VOLUME_SPACE
+ { ", " * pages n.dashify * }
+#endif
+#else DATE_FIRST
+ { " " * pages n.dashify *}
+#endif
+#else PAGE_START_J
+#if !DATE_FIRST
+#if !VOLUME_SPACE
+ { ":" * pages first.page * }
+#else VOLUME_SPACE
+ { ", " * pages first.page * }
+#endif
+#else DATE_FIRST
+ { " " * pages first.page *}
+#endif
+#endif
+ if$
+ }
+ if$
+}
+
+
+% The format.chapter.pages, if the chapter is present, puts whatever is in the
+% type field (or else "chapter" if type is empty) in front of a chapter number.
+% It then appends the pages, if present. This doesn't begin a sentence.
+
+FUNCTION {format.chapter.pages}
+{ chapter empty$
+ 'format.pages
+ { type empty$
+ { "chapter" }
+ { type "l" change.case$ }
+ if$
+ chapter tie.or.space.connect
+ pages empty$
+ 'skip$
+ { ", " * format.pages * }
+ if$
+ }
+ if$
+}
+
+% The format.in.ed.booktitle function is used for starting out a sentence
+% that begins "In <booktitle>", putting an editor before the title if one
+% exists.
+
+FUNCTION {format.in.ed.booktitle}
+{ booktitle empty$
+ { "" }
+ { editor empty$
+#if !COMMA_DELIMIT
+ { "In " booktitle emphasize * }
+#if !EDIT_VAR
+ { "In " format.editors * ", " * booktitle emphasize * }
+#else EDIT_VAR
+ { "In " booktitle emphasize * ", " * format.edited * }
+#endif
+#else COMMA_DELIMIT
+ { "in " booktitle emphasize * }
+#if !EDIT_VAR
+ { "in " format.editors * ", " * booktitle emphasize * }
+#else EDIT_VAR
+ { "in " booktitle emphasize * ", " * format.edited * }
+#endif
+#endif
+ if$
+ }
+ if$
+}
+
+#if !NAMED_REFS
+% The function empty.misc.check complains if all six fields are empty, and
+% if there's been no sorting or alphabetic-label complaint.
+
+FUNCTION {empty.misc.check}
+{ author empty$ title empty$ howpublished empty$
+ month empty$ year empty$ note empty$
+ and and and and and
+#if SORTED
+ key empty$ not and
+#else !SORTED
+#if LAB_ALPH
+ key empty$ not and
+#endif LAB_ALPH
+#endif SORTED
+ { "all relevant fields are empty in " cite$ * warning$ }
+ 'skip$
+ if$
+}
+#endif
+
+% The function format.thesis.type returns either the (case-changed) type field,
+% if it is defined, or else the default string already on the stack
+% (like "Master's thesis" or "PhD thesis").
+
+FUNCTION {format.thesis.type}
+{ type empty$
+ 'skip$
+ { pop$
+ type "t" change.case$
+ }
+ if$
+}
+
+% The function format.tr.number makes a string starting with "Technical Report"
+% (or type, if that field is defined), followed by the number if there is one;
+% it returns the starting part (with a case change) even if there is no number.
+% This is used at the beginning of a sentence.
+
+FUNCTION {format.tr.number}
+{ type empty$
+ { "Technical Report" }
+ 'type
+ if$
+ number empty$
+ { "t" change.case$ }
+ { number tie.or.space.connect }
+ if$
+}
+
+% Now come the cross-referencing functions (these are invoked because
+% one entry in the database file(s) cross-references another, by giving
+% the other entry's database key in a `crossref' field). This feature
+% allows one or more titled things that are part of a larger titled
+% thing to cross-reference the larger thing. These styles allow for
+% five posibilities: (1) an ARTICLE may cross-reference an ARTICLE;
+% (2) a BOOK, (3) INBOOK, or (4) INCOLLECTION may cross-reference a BOOK;
+% or (5) an INPROCEEDINGS may cross-reference a PROCEEDINGS.
+% Each of these is explained in more detail later.
+%
+% An ARTICLE entry type may cross reference another ARTICLE (this is
+% intended for when an entire journal is devoted to a single topic---
+% but since there is no JOURNAL entry type, the journal, too, should be
+% classified as an ARTICLE but without the author and title fields).
+% This will result in two warning messages for the journal's entry
+% if it's included in the reference list, but such is life.
+%
+% format.article.crossref ==
+% BEGIN
+% if empty$(key) then
+% if empty$(journal) then
+% warning$("need key or journal for " * cite$ *
+% " to crossref " * crossref)
+% return(" \cite{" * crossref * "}")
+% else
+% return("In " * emphazise.correct (journal) *
+% " \cite{" * crossref * "}")
+% fi
+% else
+% return("In " * key * " \cite{" * crossref * "}")
+% fi
+% END
+%
+% The other cross-referencing functions are similar, so no "comment version"
+% will be given for them.
+
+#if !NAMED_REFS
+FUNCTION {format.article.crossref}
+{ key empty$
+ { journal empty$
+ { "need key or journal for " cite$ * " to crossref " * crossref *
+ warning$
+ ""
+ }
+#if !JOUR_DEEMPH
+ { "In {\em " journal * "\/}" * }
+#else JOUR_DEEMPH
+ { "In " journal * }
+#endif
+ if$
+ }
+ { "In " key * }
+ if$
+ " \cite{" * crossref * "}" *
+}
+#else NAMED_REFS
+FUNCTION {format.article.crossref}
+{ "In" % this is for apalike
+ " \cite{" * crossref * "}" *
+}
+#endif NAMED_REFS
+
+#if !NAMED_REFS
+% We use just the last names of editors for a cross reference: either
+% "editor", or "editor1 and editor2", or "editor1 et~al." depending on
+% whether there are one, or two, or more than two editors.
+
+FUNCTION {format.crossref.editor}
+#if !CSC_NAMES
+{ editor #1 "{vv~}{ll}" format.name$
+#else CSC_NAMES
+{ editor #1 "{vv~}{ll}" format.name$ caps
+#endif
+ editor num.names$ duplicate$
+ #2 >
+#if !ETAL_EMPH
+ { pop$ " et~al." * }
+#else ETAL_EMPH
+ { pop$ " {\em et~al.}" * }
+#endif ETAL_EMPH
+ { #2 <
+ 'skip$
+ { editor #2 "{ff }{vv }{ll}{ jj}" format.name$ "others" =
+#if !ETAL_EMPH
+ { " et~al." * }
+#else ETAL_EMPH
+ { " {\em et~al.}" * }
+#endif ETAL_EMPH
+#if !CSC_NAMES
+ { " and " * editor #2 "{vv~}{ll}" format.name$ * }
+#else CSC_NAMES
+ { " and " * editor #2 "{vv~}{ll}" format.name$ caps * }
+#endif
+ if$
+ }
+ if$
+ }
+ if$
+}
+#endif
+
+% A BOOK (or INBOOK) entry type (assumed to be for a single volume in a
+% multivolume work) may cross reference another BOOK (the entire multivolume).
+% Usually there will be an editor, in which case we use that to construct the
+% cross reference; otherwise we use a nonempty key field or else the series
+% field (since the series gives the title of the multivolume work).
+
+FUNCTION {format.book.crossref}
+{ volume empty$
+ { "empty volume in " cite$ * "'s crossref of " * crossref * warning$
+ "In "
+ }
+ { "Volume" volume tie.or.space.connect
+ " of " *
+ }
+ if$
+#if !NAMED_REFS
+ editor empty$
+ editor field.or.null author field.or.null =
+ or
+ { key empty$
+ { series empty$
+ { "need editor, key, or series for " cite$ * " to crossref " *
+ crossref * warning$
+ "" *
+ }
+ { "{\em " * series * "\/}" * }
+ if$
+ }
+ { key * }
+ if$
+ }
+ { format.crossref.editor * }
+ if$
+ " \cite{" * crossref * "}" *
+#else NAMED_REFS
+ "\cite{" * crossref * "}" * % this is for apalike
+#endif
+}
+
+% An INCOLLECTION entry type may cross reference a BOOK (assumed to be the
+% collection), or an INPROCEEDINGS may cross reference a PROCEEDINGS.
+% Often there will be an editor, in which case we use that to construct
+% the cross reference; otherwise we use a nonempty key field or else
+% the booktitle field (which gives the cross-referenced work's title).
+
+#if !NAMED_REFS
+FUNCTION {format.incoll.inproc.crossref}
+{ editor empty$
+ editor field.or.null author field.or.null =
+ or
+ { key empty$
+ { booktitle empty$
+ { "need editor, key, or booktitle for " cite$ * " to crossref " *
+ crossref * warning$
+ ""
+ }
+ { "In {\em " booktitle * "\/}" * }
+ if$
+ }
+ { "In " key * }
+ if$
+ }
+ { "In " format.crossref.editor * }
+ if$
+ " \cite{" * crossref * "}" *
+}
+#else NAMED_REFS
+FUNCTION {format.incoll.inproc.crossref}
+{ "In" % this is for apalike
+ " \cite{" * crossref * "}" *
+}
+#endif NAMED_REFS
+
+% Now we define the type functions for all entry types that may appear
+% in the .BIB file---e.g., functions like `article' and `book'. These
+% are the routines that actually generate the .BBL-file output for
+% the entry. These must all precede the READ command. In addition, the
+% style designer should have a function `default.type' for unknown types.
+% Note: The fields (within each list) are listed in order of appearance,
+% except as described for an `inbook' or a `proceedings'.
+%
+% The article function is for an article in a journal. An article may
+% CROSSREF another article.
+% Required fields: author, title, journal, year
+% Optional fields: volume, number, pages, month, note
+%
+% article ==
+% BEGIN
+% output.bibitem
+% output.check(format.authors,"author")
+% new.block
+% output.check(format.title,"title")
+% new.block
+% if missing$(crossref) then
+% output.check(emphasize(journal),"journal")
+% output(format.vol.num.pages)
+% output.check(format.date,"year")
+% else
+% output.nonnull(format.article.crossref)
+% output(format.pages)
+% fi
+% new.block
+% output(note)
+% fin.entry
+% END
+%
+% The book function is for a whole book. A book may CROSSREF another book.
+% Required fields: author or editor, title, publisher, year
+% Optional fields: volume or number, series, address, edition, month,
+% note
+%
+% book ==
+% BEGIN
+% if empty$(author) then output.check(format.editors,"author and editor")
+% else output.check(format.authors,"author")
+% if missing$(crossref) then
+% either.or.check("author and editor",editor)
+% fi
+% fi
+% new.block
+% output.check(format.btitle,"title")
+% if missing$(crossref) then
+% output(format.bvolume)
+% new.block
+% output(format.number.series)
+% new.sentence
+% output.check(publisher,"publisher")
+% output(address)
+% else
+% new.block
+% output.nonnull(format.book.crossref)
+% fi
+% output(format.edition)
+% output.check(format.date,"year")
+% new.block
+% output(note)
+% fin.entry
+% END
+%
+% The other entry functions are all quite similar, so no "comment version"
+% will be given for them.
+
+FUNCTION {article}
+{ output.bibitem
+ format.authors "author" output.check
+#if NAMED_REFS
+ author format.key output % special for
+ output.year.check % apalike
+#endif NAMED_REFS
+#if !ATIT_SUPPRESS
+ new.block
+ format.title "title" output.check
+#endif
+ new.block
+ crossref missing$
+#if !VOLUME_SPACE
+#if !JOUR_DEEMPH
+ { journal emphasize "journal" output.check
+#else JOUR_DEEMPH
+ { journal "journal" output.check
+#endif
+#else VOLUME_SPACE
+#if !JOUR_DEEMPH
+ { journal emphasize
+#else JOUR_DEEMPH
+ { journal field.or.null
+#endif
+#endif
+#if !NAMED_REFS
+#if !DATE_FIRST
+#if !PAREN_DATE
+ format.vol.num.pages output
+ format.date "year" output.check
+#else PAREN_DATE
+ format.vol.num.pages
+ format.date empty$
+ 'skip$
+ { duplicate$ empty$
+ { pop$ format.date paren }
+ { " " * format.date paren * }
+ if$
+ }
+ if$
+ output
+#endif
+#else DATE_FIRST
+ format.vol.num.pages output
+#endif DATE_FIRST
+#else NAMED_REFS
+ format.vol.num.pages output
+#endif NAMED_REFS
+ }
+ { format.article.crossref output.nonnull
+ format.pages output
+ }
+ if$
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {book}
+{ output.bibitem
+ author empty$
+#if !NAMED_REFS
+ { format.editors "author and editor" output.check }
+#else NAMED_REFS
+ { format.editors "author and editor" output.check
+ editor format.key output
+ }
+#endif NAMED_REFS
+ { format.authors output.nonnull
+ crossref missing$
+ { "author and editor" editor either.or.check }
+ 'skip$
+ if$
+ }
+ if$
+#if NAMED_REFS
+ output.year.check % special for apalike
+#endif
+ new.block
+ format.btitle "title" output.check
+ crossref missing$
+ { format.bvolume output
+ new.block
+ format.number.series output
+ new.sentence
+ publisher "publisher" output.check
+ address output
+ }
+ { new.block
+ format.book.crossref output.nonnull
+ }
+ if$
+ format.edition output
+#if !NAMED_REFS
+ format.date "year" output.check
+#endif
+ new.block
+ note output
+ fin.entry
+}
+
+% A booklet is a bound thing without a publisher or sponsoring institution.
+% Required: title
+% Optional: author, howpublished, address, month, year, note
+
+FUNCTION {booklet}
+{ output.bibitem
+ format.authors output
+#if !NAMED_REFS
+ new.block
+ format.title "title" output.check
+ howpublished address new.block.checkb
+ howpublished output
+ address output
+ format.date output
+#else NAMED_REFS
+ author format.key output % special for
+ output.year.check % apalike
+ new.block
+ format.title "title" output.check
+ new.block
+ howpublished output
+ address output
+#endif NAMED_REFS
+ new.block
+ note output
+ fin.entry
+}
+
+% For the conference entry type, see inproceedings.
+
+% An inbook is a piece of a book: either a chapter and/or a page range.
+% It may CROSSREF a book. If there's no volume field, the type field
+% will come before number and series.
+% Required: author or editor, title, chapter and/or pages, publisher,year
+% Optional: volume or number, series, type, address, edition, month, note
+
+FUNCTION {inbook}
+{ output.bibitem
+ author empty$
+#if !NAMED_REFS
+ { format.editors "author and editor" output.check }
+#else NAMED_REFS
+ { format.editors "author and editor" output.check
+ editor format.key output
+ }
+#endif
+ { format.authors output.nonnull
+ crossref missing$
+ { "author and editor" editor either.or.check }
+ 'skip$
+ if$
+ }
+ if$
+#if NAMED_REFS
+ output.year.check % special for apalike
+#endif
+ new.block
+ format.btitle "title" output.check
+ crossref missing$
+ { format.bvolume output
+ format.chapter.pages "chapter and pages" output.check
+ new.block
+ format.number.series output
+ new.sentence
+ publisher "publisher" output.check
+ address output
+ }
+ { format.chapter.pages "chapter and pages" output.check
+ new.block
+ format.book.crossref output.nonnull
+ }
+ if$
+ format.edition output
+#if !NAMED_REFS
+ format.date "year" output.check
+#endif
+ new.block
+ note output
+ fin.entry
+}
+
+% An incollection is like inbook, but where there is a separate title
+% for the referenced thing (and perhaps an editor for the whole).
+% An incollection may CROSSREF a book.
+% Required: author, title, booktitle, publisher, year
+% Optional: editor, volume or number, series, type, chapter, pages,
+% address, edition, month, note
+
+FUNCTION {incollection}
+{ output.bibitem
+ format.authors "author" output.check
+#if NAMED_REFS
+ author format.key output % special for
+ output.year.check % apalike
+#endif NAMED_REFS
+#if !ATIT_SUPPRESS
+ new.block
+ format.title "title" output.check
+#else
+#if !ALT_INCOLL
+ new.block
+ format.title "title" output.check
+#endif !ALT_INCOLL
+#endif !ATIT_SUPPRESS
+ new.block
+ crossref missing$
+ { format.in.ed.booktitle "booktitle" output.check
+#if !ALT_INCOLL
+ format.bvolume output
+ format.number.series output
+ format.chapter.pages output
+#endif !ALT_INCOLL
+ new.sentence
+ publisher "publisher" output.check
+ address output
+ format.edition output
+#if !NAMED_REFS
+ format.date "year" output.check
+#endif !NAMED_REFS
+#if ALT_INCOLL
+ format.bvolume output
+ format.number.series output
+ format.chapter.pages output
+#endif ALT_INCOLL
+ }
+ { format.incoll.inproc.crossref output.nonnull
+ format.chapter.pages output
+ }
+ if$
+ new.block
+ note output
+ fin.entry
+}
+
+% An inproceedings is an article in a conference proceedings, and it may
+% CROSSREF a proceedings. If there's no address field, the month (& year)
+% will appear just before note.
+% Required: author, title, booktitle, year
+% Optional: editor, volume or number, series, pages, address, month,
+% organization, publisher, note
+
+FUNCTION {inproceedings}
+{ output.bibitem
+ format.authors "author" output.check
+#if NAMED_REFS
+ author format.key output % special for
+ output.year.check % apalike
+#endif NAMED_REFS
+ new.block
+ format.title "title" output.check
+ new.block
+ crossref missing$
+ { format.in.ed.booktitle "booktitle" output.check
+ format.bvolume output
+ format.number.series output
+ format.pages output
+#if !NAMED_REFS
+ address empty$
+ { organization publisher new.sentence.checkb
+ organization output
+ publisher output
+ format.date "year" output.check
+ }
+ { address output.nonnull
+ format.date "year" output.check
+ new.sentence
+ organization output
+ publisher output
+ }
+ if$
+#else NAMED_REFS
+ address output % for apalike
+ new.sentence % there's no year
+ organization output % here so things
+ publisher output % are simpler
+#endif NAMED_REFS
+ }
+ { format.incoll.inproc.crossref output.nonnull
+ format.pages output
+ }
+ if$
+ new.block
+ note output
+ fin.entry
+}
+
+% The conference function is included for Scribe compatibility.
+
+FUNCTION {conference} { inproceedings }
+
+% A manual is technical documentation.
+% Required: title
+% Optional: author, organization, address, edition, month, year, note
+
+FUNCTION {manual}
+{ output.bibitem
+#if !NAMED_REFS
+ author empty$
+ { organization empty$
+ 'skip$
+ { organization output.nonnull
+ address output
+ }
+ if$
+ }
+ { format.authors output.nonnull }
+ if$
+ new.block
+ format.btitle "title" output.check
+ author empty$
+ { organization empty$
+ { address new.block.checka
+ address output
+ }
+ 'skip$
+ if$
+ }
+ { organization address new.block.checkb
+ organization output
+ address output
+ }
+ if$
+ format.edition output
+ format.date output
+#else NAMED_REFS
+ format.authors output
+ author format.key output % special for
+ output.year.check % apalike
+ new.block
+ format.btitle "title" output.check
+ organization address new.block.checkb
+ organization output
+ address output
+ format.edition output
+#endif NAMED_REFS
+ new.block
+ note output
+ fin.entry
+}
+
+% A mastersthesis is a Master's thesis.
+% Required: author, title, school, year
+% Optional: type, address, month, note
+
+FUNCTION {mastersthesis}
+{ output.bibitem
+ format.authors "author" output.check
+#if NAMED_REFS
+ author format.key output % special for
+ output.year.check % apalike
+#endif NAMED_REFS
+ new.block
+ format.title "title" output.check
+ new.block
+ "Master's thesis" format.thesis.type output.nonnull
+ school "school" output.check
+ address output
+#if !NAMED_REFS
+ format.date "year" output.check
+#endif !NAMED_REFS
+ new.block
+ note output
+ fin.entry
+}
+
+% A misc is something that doesn't fit elsewhere.
+% Required: at least one of the `optional' fields
+% Optional: author, title, howpublished, month, year, note
+
+FUNCTION {misc}
+{ output.bibitem
+ format.authors output
+#if !NAMED_REFS
+ title howpublished new.block.checkb
+ format.title output
+ howpublished new.block.checka
+ howpublished output
+ format.date output
+#else NAMED_REFS
+ author format.key output % special for
+ output.year.check % apalike
+ new.block
+ format.title output
+ new.block
+ howpublished output
+#endif NAMED_REFS
+ new.block
+ note output
+ fin.entry
+#if !NAMED_REFS
+ empty.misc.check
+#endif
+}
+
+% A phdthesis is like a mastersthesis.
+% Required: author, title, school, year
+% Optional: type, address, month, note
+
+FUNCTION {phdthesis}
+{ output.bibitem
+ format.authors "author" output.check
+#if NAMED_REFS
+ author format.key output % special for
+ output.year.check % apalike
+#endif NAMED_REFS
+ new.block
+ format.btitle "title" output.check
+ new.block
+ "PhD thesis" format.thesis.type output.nonnull
+ school "school" output.check
+ address output
+#if !NAMED_REFS
+ format.date "year" output.check
+#endif !NAMED_REFS
+ new.block
+ note output
+ fin.entry
+}
+
+% A proceedings is a conference proceedings.
+% If there is an organization but no editor field, the organization will
+% appear as the first optional field (we try to make the first block nonempty);
+% if there's no address field, the month (& year) will appear just before note.
+% Required: title, year
+% Optional: editor, volume or number, series, address, month,
+% organization, publisher, note
+
+FUNCTION {proceedings}
+{ output.bibitem
+#if !NAMED_REFS
+ editor empty$
+ { organization output }
+ { format.editors output.nonnull }
+ if$
+#else NAMED_REFS
+ format.editors output
+ editor format.key output % special for
+ output.year.check % apalike
+#endif NAMED_REFS
+ new.block
+ format.btitle "title" output.check
+ format.bvolume output
+ format.number.series output
+#if !NAMED_REFS
+ address empty$
+ { editor empty$
+ { publisher new.sentence.checka }
+ { organization publisher new.sentence.checkb
+ organization output
+ }
+ if$
+ publisher output
+ format.date "year" output.check
+ }
+ { address output.nonnull
+ format.date "year" output.check
+ new.sentence
+ editor empty$
+ 'skip$
+ { organization output }
+ if$
+ publisher output
+ }
+ if$
+#else NAMED_REFS
+ address output % for apalike
+ new.sentence % we always output
+ organization output % a nonempty organization
+ publisher output % here
+#endif NAMED_REFS
+ new.block
+ note output
+ fin.entry
+}
+
+% A techreport is a technical report.
+% Required: author, title, institution, year
+% Optional: type, number, address, month, note
+
+FUNCTION {techreport}
+{ output.bibitem
+ format.authors "author" output.check
+#if NAMED_REFS
+ author format.key output % special for
+ output.year.check % apalike
+#endif NAMED_REFS
+ new.block
+ format.title "title" output.check
+ new.block
+ format.tr.number output.nonnull
+ institution "institution" output.check
+ address output
+#if !NAMED_REFS
+ format.date "year" output.check
+#endif !NAMED_REFS
+ new.block
+ note output
+ fin.entry
+}
+
+% An unpublished is something that hasn't been published.
+% Required: author, title, note
+% Optional: month, year
+
+FUNCTION {unpublished}
+{ output.bibitem
+ format.authors "author" output.check
+#if NAMED_REFS
+ author format.key output % special for
+ output.year.check % apalike
+#endif NAMED_REFS
+ new.block
+ format.title "title" output.check
+ new.block
+ note "note" output.check
+#if !NAMED_REFS
+ format.date output
+#endif
+ fin.entry
+}
+
+% We use entry type `misc' for an unknown type; BibTeX gives a warning.
+
+FUNCTION {default.type} { misc }
+
+% Here are macros for common things that may vary from style to style.
+% Users are encouraged to use these macros.
+%
+% Months are either written out in full or abbreviated
+
+#if MONTH_FULL
+
+MACRO {jan} {"January"}
+
+MACRO {feb} {"February"}
+
+MACRO {mar} {"March"}
+
+MACRO {apr} {"April"}
+
+MACRO {may} {"May"}
+
+MACRO {jun} {"June"}
+
+MACRO {jul} {"July"}
+
+MACRO {aug} {"August"}
+
+MACRO {sep} {"September"}
+
+MACRO {oct} {"October"}
+
+MACRO {nov} {"November"}
+
+MACRO {dec} {"December"}
+
+#else !MONTH_FULL
+
+MACRO {jan} {"Jan."}
+
+MACRO {feb} {"Feb."}
+
+MACRO {mar} {"Mar."}
+
+MACRO {apr} {"Apr."}
+
+MACRO {may} {"May"}
+
+MACRO {jun} {"June"}
+
+MACRO {jul} {"July"}
+
+MACRO {aug} {"Aug."}
+
+MACRO {sep} {"Sept."}
+
+MACRO {oct} {"Oct."}
+
+MACRO {nov} {"Nov."}
+
+MACRO {dec} {"Dec."}
+
+#endif MONTH_FULL
+
+% Journals are either written out in full or abbreviated;
+% the abbreviations are like those found in ACM publications.
+%
+% To get a completely different set of abbreviations, it may be best to make
+% a separate .bib file with nothing but those abbreviations; users could then
+% include that file name as the first argument to the \bibliography command
+
+#if JOUR_FULL
+
+MACRO {acmcs} {"ACM Computing Surveys"}
+
+MACRO {acta} {"Acta Informatica"}
+
+MACRO {cacm} {"Communications of the ACM"}
+
+MACRO {ibmjrd} {"IBM Journal of Research and Development"}
+
+MACRO {ibmsj} {"IBM Systems Journal"}
+
+MACRO {ieeese} {"IEEE Transactions on Software Engineering"}
+
+MACRO {ieeetc} {"IEEE Transactions on Computers"}
+
+MACRO {ieeetcad}
+ {"IEEE Transactions on Computer-Aided Design of Integrated Circuits"}
+
+MACRO {ipl} {"Information Processing Letters"}
+
+MACRO {jacm} {"Journal of the ACM"}
+
+MACRO {jcss} {"Journal of Computer and System Sciences"}
+
+MACRO {scp} {"Science of Computer Programming"}
+
+MACRO {sicomp} {"SIAM Journal on Computing"}
+
+MACRO {tocs} {"ACM Transactions on Computer Systems"}
+
+MACRO {tods} {"ACM Transactions on Database Systems"}
+
+MACRO {tog} {"ACM Transactions on Graphics"}
+
+MACRO {toms} {"ACM Transactions on Mathematical Software"}
+
+MACRO {toois} {"ACM Transactions on Office Information Systems"}
+
+MACRO {toplas} {"ACM Transactions on Programming Languages and Systems"}
+
+MACRO {tcs} {"Theoretical Computer Science"}
+
+#else !JOUR_FULL
+
+MACRO {acmcs} {"ACM Comput. Surv."}
+
+MACRO {acta} {"Acta Inf."}
+
+MACRO {cacm} {"Commun. ACM"}
+
+MACRO {ibmjrd} {"IBM J. Res. Dev."}
+
+MACRO {ibmsj} {"IBM Syst.~J."}
+
+MACRO {ieeese} {"IEEE Trans. Softw. Eng."}
+
+MACRO {ieeetc} {"IEEE Trans. Comput."}
+
+MACRO {ieeetcad}
+ {"IEEE Trans. Comput.-Aided Design Integrated Circuits"}
+
+MACRO {ipl} {"Inf. Process. Lett."}
+
+MACRO {jacm} {"J.~ACM"}
+
+MACRO {jcss} {"J.~Comput. Syst. Sci."}
+
+MACRO {scp} {"Sci. Comput. Programming"}
+
+MACRO {sicomp} {"SIAM J. Comput."}
+
+MACRO {tocs} {"ACM Trans. Comput. Syst."}
+
+MACRO {tods} {"ACM Trans. Database Syst."}
+
+MACRO {tog} {"ACM Trans. Gr."}
+
+MACRO {toms} {"ACM Trans. Math. Softw."}
+
+MACRO {toois} {"ACM Trans. Office Inf. Syst."}
+
+MACRO {toplas} {"ACM Trans. Prog. Lang. Syst."}
+
+MACRO {tcs} {"Theoretical Comput. Sci."}
+
+#if PHYSICS_JOUR
+#include "phyjfull.btx"
+#endif PHYSICS_JOUR
+
+#endif JOUR_FULL
+
+% Now we read in the .BIB entries.
+
+READ
+
+% The sortify function converts to lower case after purify$ing; it's
+% used in sorting and in computing alphabetic labels after sorting
+%
+% The chop.word(w,len,s) function returns either s or, if the first len
+% letters of s equals w (this comparison is done in the third line of the
+% function's definition), it returns that part of s after w.
+
+#if SORTED
+
+FUNCTION {sortify}
+{ purify$
+ "l" change.case$
+}
+
+INTEGERS { len }
+
+FUNCTION {chop.word}
+{ 's :=
+ 'len :=
+ s #1 len substring$ =
+ { s len #1 + global.max$ substring$ }
+ 's
+ if$
+}
+
+#else !SORTED
+#if LAB_ALPH
+
+% We need the chop.word stuff for the dubious unsorted-list-with-labels case.
+
+INTEGERS { len }
+
+FUNCTION {chop.word}
+{ 's :=
+ 'len :=
+ s #1 len substring$ =
+ { s len #1 + global.max$ substring$ }
+ 's
+ if$
+}
+
+#endif LAB_ALPH
+#endif SORTED
+
+% This long comment applies only to alphabetic labels
+%
+% The format.lab.names function makes a short label by using the initials of
+% the von and Last parts of the names (but if there are more than four names,
+% (i.e., people) it truncates after three and adds a superscripted "+";
+% it also adds such a "+" if the last of multiple authors is "others").
+% If there is only one name, and its von and Last parts combined have just
+% a single name-token ("Knuth" has a single token, "Brinch Hansen" has two),
+% we take the first three letters of the last name. The boolean
+% et.al.char.used tells whether we've used a superscripted "+", so that we
+% know whether to include a LaTeX macro for it.
+%
+% format.lab.names(s) ==
+% BEGIN
+% numnames := num.names$(s)
+% if numnames > 1 then
+% if numnames > 4 then
+% namesleft := 3
+% else
+% namesleft := numnames
+% nameptr := 1
+% nameresult := ""
+% while namesleft > 0
+% do
+% if (name_ptr = numnames) and
+% format.name$(s, nameptr, "{ff }{vv }{ll}{ jj}") = "others"
+% then nameresult := nameresult * "{\etalchar{+}}"
+% et.al.char.used := true
+% else nameresult := nameresult *
+% format.name$(s, nameptr, "{v{}}{l{}}")
+% nameptr := nameptr + 1
+% namesleft := namesleft - 1
+% od
+% if numnames > 4 then
+% nameresult := nameresult * "{\etalchar{+}}"
+% et.al.char.used := true
+% else
+% t := format.name$(s, 1, "{v{}}{l{}}")
+% if text.length$(t) < 2 then % there's just one name-token
+% nameresult := text.prefix$(format.name$(s,1,"{ll}"),3)
+% else
+% nameresult := t
+% fi
+% fi
+% return nameresult
+% END
+%
+% Exactly what fields we look at in constructing the primary part of the label
+% depends on the entry type; this selectivity (as opposed to, say, always
+% looking at author, then editor, then key) helps ensure that "ignored" fields,
+% as described in the LaTeX book, really are ignored. Note that MISC is part
+% of the deepest `else' clause in the nested part of calc.label; thus, any
+% unrecognized entry type in the database is handled correctly.
+%
+% There is one auxiliary function for each of the four different sequences of
+% fields we use. The first of these functions looks at the author field, and
+% then, if necessary, the key field. The other three functions, which might
+% look at two fields and the key field, are similar, except that the key field
+% takes precedence over the organization field (for labels---not for sorting).
+%
+% The calc.label function calculates the preliminary label of an entry, which
+% is formed by taking three letters of information from the author or editor or
+% key or organization field (depending on the entry type and on what's empty,
+% but ignoring a leading "The " in the organization), and appending the last
+% two characters (digits) of the year. It is an error if the appropriate fields
+% among author, editor, organization, and key are missing, and we use
+% the first three letters of the cite$ in desperation when this happens.
+% The resulting label has the year part, but not the name part, purify$ed
+% (purify$ing the year allows some sorting shenanigans by the user).
+%
+% This function also calculates the version of the label to be used in sorting.
+%
+% The final label may need a trailing 'a', 'b', etc., to distinguish it from
+% otherwise identical labels, but we can't calculated those "extra.label"s
+% until after sorting.
+%
+% calc.label ==
+% BEGIN
+% if type$ = "book" or "inbook" then
+% author.editor.key.label
+% else if type$ = "proceedings" then
+% editor.key.organization.label
+% else if type$ = "manual" then
+% author.key.organization.label
+% else
+% author.key.label
+% fi fi fi
+% label := label * substring$(purify$(field.or.null(year)), -1, 2)
+% % assuming we will also sort, we calculate a sort.label
+% sort.label := sortify(label), but use the last four, not two, digits
+% END
+
+#if LAB_ALPH
+
+#if !NAMED_REFS
+INTEGERS { et.al.char.used }
+
+FUNCTION {initialize.et.al.char.used}
+{ #0 'et.al.char.used :=
+}
+
+EXECUTE {initialize.et.al.char.used}
+#endif !NAMED_REFS
+
+#if !NAMED_REFS
+FUNCTION {format.lab.names}
+#if !RMP_LABELS
+{ 's :=
+ s num.names$ 'numnames :=
+ numnames #1 >
+ { numnames #4 >
+ { #3 'namesleft := }
+ { numnames 'namesleft := }
+ if$
+ #1 'nameptr :=
+ ""
+ { namesleft #0 > }
+ { nameptr numnames =
+ { s nameptr "{ff }{vv }{ll}{ jj}" format.name$ "others" =
+ { "{\etalchar{+}}" *
+ #1 'et.al.char.used :=
+ }
+ { s nameptr "{v{}}{l{}}" format.name$ * }
+ if$
+ }
+ { s nameptr "{v{}}{l{}}" format.name$ * }
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+ numnames #4 >
+ { "{\etalchar{+}}" *
+ #1 'et.al.char.used :=
+ }
+ 'skip$
+ if$
+ }
+ { s #1 "{v{}}{l{}}" format.name$
+ duplicate$ text.length$ #2 <
+ { pop$ s #1 "{ll}" format.name$ #3 text.prefix$ }
+ 'skip$
+ if$
+ }
+ if$
+}
+#else RMP_LABELS
+{ 's :=
+ s num.names$ 'numnames :=
+ numnames #1 >
+ { numnames #2 >
+#if !CSC_NAMES
+#if !ETAL_EMPH
+ { s #1 "{vv }{ll}" format.name$ " et~al." * }
+#else ETAL_EMPH
+ { s #1 "{vv }{ll}" format.name$ " {\em et~al.}" * }
+#endif ETAL_EMPH
+ { s #1 "{vv }{ll}" format.name$
+#else CSC_NAMES
+#if !ETAL_EMPH
+ { s #1 "{vv }{ll}" format.name$ caps " et~al." * }
+#else ETAL_EMPH
+ { s #1 "{vv }{ll}" format.name$ caps " {\em et~al.}" * }
+#endif ETAL_EMPH
+ { s #1 "{vv }{ll}" format.name$ caps
+#endif CSC_NAMES
+ s #2 "{ff }{vv }{ll}{ jj}" format.name$ "others" =
+#if !ETAL_EMPH
+ { " et~al." * }
+#else ETAL_EMPH
+ { " {\em et~al.}" * }
+#endif ETAL_EMPH
+#if !CSC_NAMES
+ { " and " * s #2 "{vv }{ll}" format.name$ * }
+#else CSC_NAMES
+ { " and " * s #2 "{vv }{ll}" format.name$ caps * }
+#endif CSC_NAMES
+ if$
+ }
+ if$
+ }
+#if !CSC_NAMES
+ { s #1 "{vv }{ll}" format.name$ }
+#else CSC_NAMES
+ { s #1 "{vv }{ll}" format.name$ caps }
+#endif
+ if$
+}
+#endif
+#else NAMED_REFS
+% There are three apalike cases: one person (Jones),
+% two (Jones and de~Bruijn), and more (Jones et~al.).
+% This function is much like format.crossref.editors.
+%
+FUNCTION {format.lab.names}
+{ 's :=
+#if !CSC_NAMES
+ s #1 "{vv~}{ll}" format.name$
+#else CSC_NAMES
+ s #1 "{vv~}{ll}" format.name$ caps
+#endif CSC_NAMES
+ s num.names$ duplicate$
+ #2 >
+#if !ETAL_EMPH
+ { pop$ " et~al." * }
+#else ETAL_EMPH
+ { pop$ " {\em et~al.}" * }
+#endif ETAL_EMPH
+ { #2 <
+ 'skip$
+ { s #2 "{ff }{vv }{ll}{ jj}" format.name$ "others" =
+#if !ETAL_EMPH
+ { " et~al." * }
+#else ETAL_EMPH
+ { " {\em et~al.}" * }
+#endif ETAL_EMPH
+#if !CSC_NAMES
+ { " and " * s #2 "{vv~}{ll}" format.name$ * }
+#else CSC_NAMES
+ { " and " * s #2 "{vv~}{ll}" format.name$ caps * }
+#endif
+ if$
+ }
+ if$
+ }
+ if$
+}
+#endif NAMED_REFS
+
+FUNCTION {author.key.label}
+{ author empty$
+ { key empty$
+#if SORTED
+ { cite$ #1 #3 substring$ }
+#else !SORTED % need warning here because we won't give it later
+ { "for label, need author or key in " cite$ * warning$
+ cite$ #1 #3 substring$
+ }
+#endif SORTED
+#if !NAMED_REFS
+ { key #3 text.prefix$ }
+#else NAMED_REFS
+ 'key % apalike uses the whole key
+#endif NAMED_REFS
+ if$
+ }
+ { author format.lab.names }
+ if$
+}
+
+FUNCTION {author.editor.key.label}
+{ author empty$
+ { editor empty$
+ { key empty$
+#if SORTED
+ { cite$ #1 #3 substring$ }
+#else !SORTED % need warning here because we won't give it later
+ { "for label, need author, editor, or key in " cite$ * warning$
+ cite$ #1 #3 substring$
+ }
+#endif SORTED
+#if !NAMED_REFS
+ { key #3 text.prefix$ }
+#else NAMED_REFS
+ 'key % apalike uses the whole key
+#endif NAMED_REFS
+ if$
+ }
+ { editor format.lab.names }
+ if$
+ }
+ { author format.lab.names }
+ if$
+}
+
+#if !NAMED_REFS
+FUNCTION {author.key.organization.label}
+{ author empty$
+ { key empty$
+ { organization empty$
+#if SORTED
+ { cite$ #1 #3 substring$ }
+#else !SORTED % need warning here because we won't give it later
+ { "for label, need author, key, or organization in " cite$ *
+ warning$
+ cite$ #1 #3 substring$
+ }
+#endif SORTED
+#if !RMP_LABELS
+ { "The " #4 organization chop.word #3 text.prefix$ }
+#else RMP_LABELS
+ { "The " #4 organization chop.word #9 text.prefix$ }
+#endif
+ if$
+ }
+ { key #3 text.prefix$ }
+ if$
+ }
+ { author format.lab.names }
+ if$
+}
+
+FUNCTION {editor.key.organization.label}
+{ editor empty$
+ { key empty$
+ { organization empty$
+#if SORTED
+ { cite$ #1 #3 substring$ }
+#else !SORTED % need warning here because we won't give it later
+ { "for label, need editor, key, or organization in " cite$ *
+ warning$
+ cite$ #1 #3 substring$
+ }
+#endif SORTED
+#if !RMP_LABELS
+ { "The " #4 organization chop.word #3 text.prefix$ }
+#else RMP_LABELS
+ { "The " #4 organization chop.word #9 text.prefix$ }
+#endif
+ if$
+ }
+ { key #3 text.prefix$ }
+ if$
+ }
+ { editor format.lab.names }
+ if$
+}
+#else NAMED_REFS
+FUNCTION {editor.key.label}
+{ editor empty$
+ { key empty$
+ { cite$ #1 #3 substring$ }
+ 'key % apalike uses the whole key, no organization
+ if$
+ }
+ { editor format.lab.names }
+ if$
+}
+#endif NAMED_REFS
+
+FUNCTION {calc.label}
+#if !KEY_CITE
+{ type$ "book" =
+ type$ "inbook" =
+ or
+ 'author.editor.key.label
+ { type$ "proceedings" =
+#if !NAMED_REFS
+ 'editor.key.organization.label
+ { type$ "manual" =
+ 'author.key.organization.label
+ 'author.key.label
+ if$
+ }
+#else NAMED_REFS
+ 'editor.key.label % apalike ignores organization
+ 'author.key.label % for labeling and sorting
+#endif NAMED_REFS
+ if$
+ }
+ if$
+#if !NAMED_REFS
+ duplicate$
+#if !RMP_LABELS
+ year field.or.null purify$ #-1 #2 substring$
+#else RMP_LABELS
+ " " * year field.or.null purify$ #-1 #4 substring$
+#endif
+ *
+ 'label :=
+ year field.or.null purify$ #-1 #4 substring$
+ *
+ sortify 'sort.label :=
+#else NAMED_REFS
+ ", " % these three lines are
+ * % for apalike, which
+ year field.or.null purify$ #-1 #4 substring$ % uses all four digits
+ *
+ 'label :=
+#endif NAMED_REFS
+}
+#else KEY_CITE
+{ cite$ 'label :=
+label sortify 'sort.label :=
+}
+#endif
+
+% It doesn't seem like a particularly good idea to use an order-of-citation
+% reference list when using alphabetic labels, but we need to have a
+% special pass to calculate labels when this happens.
+
+#if !SORTED
+
+ITERATE {calc.label}
+
+#endif !SORTED
+
+#endif LAB_ALPH
+
+% When sorting, we compute the sortkey by executing "presort" on each entry.
+% The presort key contains a number of "sortify"ed strings, concatenated
+% with multiple blanks between them. This makes things like "brinch per"
+% come before "brinch hansen per".
+%
+% The fields used here are: the sort.label for alphabetic labels (as set by
+% calc.label), followed by the author names (or editor names or organization
+% (with a leading "The " removed) or key field, depending on entry type and on
+% what's empty), followed by year, followed by the first bit of the title
+% (chopping off a leading "The ", "A ", or "An ").
+% Names are formatted: Von Last First Junior.
+% The names within a part will be separated by a single blank
+% (such as "brinch hansen"), two will separate the name parts themselves
+% (except the von and last), three will separate the names,
+% four will separate the names from year (and from label, if alphabetic),
+% and four will separate year from title.
+%
+% The sort.format.names function takes an argument that should be in
+% BibTeX name format, and returns a string containing " "-separated
+% names in the format described above. The function is almost the same
+% as format.names.
+
+#if SORTED
+
+FUNCTION {sort.format.names}
+{ 's :=
+ #1 'nameptr :=
+ ""
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ { nameptr #1 >
+ { " " * }
+ 'skip$
+#if NAME_FULL
+ if$
+ s nameptr "{vv{ } }{ll{ }}{ ff{ }}{ jj{ }}" format.name$ 't :=
+#else
+ if$ % apalike uses initials
+ s nameptr "{vv{ } }{ll{ }}{ f{ }}{ jj{ }}" format.name$ 't := % <= here
+#endif NAME_FULL
+ nameptr numnames = t "others" = and
+ { "et al" * }
+ { t sortify * }
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+}
+
+% The sort.format.title function returns the argument,
+% but first any leading "A "'s, "An "'s, or "The "'s are removed.
+% The chop.word function uses s, so we need another string variable, t
+
+FUNCTION {sort.format.title}
+{ 't :=
+ "A " #2
+ "An " #3
+ "The " #4 t chop.word
+ chop.word
+ chop.word
+ sortify
+ #1 global.max$ substring$
+}
+
+% The auxiliary functions here, for the presort function, are analogous to
+% the ones for calc.label; the same comments apply, except that the
+% organization field takes precedence here over the key field. For sorting
+% purposes, we still remove a leading "The " from the organization field.
+
+FUNCTION {author.sort}
+{ author empty$
+ { key empty$
+ { "to sort, need author or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { author sort.format.names }
+ if$
+}
+
+FUNCTION {author.editor.sort}
+{ author empty$
+ { editor empty$
+ { key empty$
+ { "to sort, need author, editor, or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { editor sort.format.names }
+ if$
+ }
+ { author sort.format.names }
+ if$
+}
+
+#if !NAMED_REFS
+FUNCTION {author.organization.sort}
+{ author empty$
+ { organization empty$
+ { key empty$
+ { "to sort, need author, organization, or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { "The " #4 organization chop.word sortify }
+ if$
+ }
+ { author sort.format.names }
+ if$
+}
+
+FUNCTION {editor.organization.sort}
+{ editor empty$
+ { organization empty$
+ { key empty$
+ { "to sort, need editor, organization, or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { "The " #4 organization chop.word sortify }
+ if$
+ }
+ { editor sort.format.names }
+ if$
+}
+#else NAMED_REFS
+FUNCTION {editor.sort}
+{ editor empty$
+ { key empty$
+ { "to sort, need editor or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { editor sort.format.names }
+ if$
+}
+#endif NAMED_REFS
+
+#if !NAMED_REFS
+% There is a limit, entry.max$, on the length of an entry string variable
+% (which is what its sort.key$ is), so we take at most that many characters
+% of the constructed key, and hope there aren't many references that match
+% to that many characters!
+
+FUNCTION {presort}
+#if LAB_ALPH
+{ calc.label
+ sort.label
+ " "
+ *
+ type$ "book" =
+#else !LAB_ALPH
+{ type$ "book" =
+#endif LAB_ALPH
+ type$ "inbook" =
+ or
+ 'author.editor.sort
+ { type$ "proceedings" =
+ 'editor.organization.sort
+ { type$ "manual" =
+ 'author.organization.sort
+ 'author.sort
+ if$
+ }
+ if$
+ }
+ if$
+#if LAB_ALPH
+ *
+#endif LAB_ALPH
+ " "
+ *
+ year field.or.null sortify
+ *
+ " "
+ *
+ title field.or.null
+ sort.format.title
+ *
+ #1 entry.max$ substring$
+ 'sort.key$ :=
+}
+#else NAMED_REFS
+% apalike uses two sorting passes; the first one sets the
+% labels so that the `a's, `b's, etc. can be computed;
+% the second pass puts the references in "correct" order.
+% The presort function is for the first pass. It computes
+% label, sort.label, and title, and then concatenates.
+FUNCTION {presort}
+{ calc.label
+ label sortify
+ " "
+ *
+ type$ "book" =
+ type$ "inbook" =
+ or
+ 'author.editor.sort
+ { type$ "proceedings" =
+ 'editor.sort
+ 'author.sort
+ if$
+ }
+ if$
+ #1 entry.max$ substring$ % for
+ 'sort.label := % apalike
+ sort.label % style
+ *
+ " "
+ *
+ title field.or.null
+ sort.format.title
+ *
+ #1 entry.max$ substring$
+ 'sort.key$ :=
+}
+#endif NAMED_REFS
+
+ITERATE {presort}
+
+% And now we can sort
+
+#if !NAMED_REFS
+SORT
+#else NAMED_REFS
+SORT % by label, sort.label, title---for final label calculation
+#endif
+
+#endif SORTED
+
+% This long comment applies only to alphabetic labels, when sorted
+%
+% Now comes the final computation for alphabetic labels, putting in the 'a's
+% and 'b's and so forth if required. This involves two passes: a forward
+% pass to put in the 'b's, 'c's and so on, and a backwards pass
+% to put in the 'a's (we don't want to put in 'a's unless we know there
+% are 'b's).
+% We have to keep track of the longest (in width$ terms) label, for use
+% by the "thebibliography" environment.
+%
+% VAR: longest.label, last.sort.label, next.extra: string
+% longest.label.width, last.extra.num: integer
+%
+% initialize.longest.label ==
+% BEGIN
+% longest.label := ""
+% last.sort.label := int.to.chr$(0)
+% next.extra := ""
+% longest.label.width := 0
+% last.extra.num := 0
+% END
+%
+% forward.pass ==
+% BEGIN
+% if last.sort.label = sort.label then
+% last.extra.num := last.extra.num + 1
+% extra.label := int.to.chr$(last.extra.num)
+% else
+% last.extra.num := chr.to.int$("a")
+% extra.label := ""
+% last.sort.label := sort.label
+% fi
+% END
+%
+% reverse.pass ==
+% BEGIN
+% if next.extra = "b" then
+% extra.label := "a"
+% fi
+% label := label * extra.label
+% if width$(label) > longest.label.width then
+% longest.label := label
+% longest.label.width := width$(label)
+% fi
+% next.extra := extra.label
+% END
+
+#if LAB_ALPH
+
+#if SORTED
+
+#if !NAMED_REFS
+STRINGS { longest.label last.sort.label next.extra }
+
+INTEGERS { longest.label.width last.extra.num }
+
+FUNCTION {initialize.longest.label}
+{ "" 'longest.label :=
+ #0 int.to.chr$ 'last.sort.label :=
+ "" 'next.extra :=
+ #0 'longest.label.width :=
+ #0 'last.extra.num :=
+}
+
+FUNCTION {forward.pass}
+{ last.sort.label sort.label =
+ { last.extra.num #1 + 'last.extra.num :=
+ last.extra.num int.to.chr$ 'extra.label :=
+ }
+ { "a" chr.to.int$ 'last.extra.num :=
+ "" 'extra.label :=
+ sort.label 'last.sort.label :=
+ }
+ if$
+}
+#else NAMED_REFS
+STRINGS { last.label next.extra } % apalike labels are only for the text;
+
+INTEGERS { last.extra.num } % there are none in the bibliography
+
+FUNCTION {initialize.extra.label.stuff} % and hence there is no `longest.label'
+{ #0 int.to.chr$ 'last.label :=
+ "" 'next.extra :=
+ #0 'last.extra.num :=
+}
+
+FUNCTION {forward.pass}
+{ last.label label =
+ { last.extra.num #1 + 'last.extra.num :=
+ last.extra.num int.to.chr$ 'extra.label :=
+ }
+ { "a" chr.to.int$ 'last.extra.num :=
+ "" 'extra.label :=
+ label 'last.label :=
+ }
+ if$
+}
+#endif NAMED_REFS
+
+FUNCTION {reverse.pass}
+{ next.extra "b" =
+ { "a" 'extra.label := }
+ 'skip$
+ if$
+ label extra.label * 'label :=
+#if !NAMED_REFS
+ label width$ longest.label.width >
+ { label 'longest.label :=
+ label width$ 'longest.label.width :=
+ }
+ 'skip$
+ if$
+#endif !NAMED_REFS
+ extra.label 'next.extra :=
+}
+
+#if !NAMED_REFS
+EXECUTE {initialize.longest.label}
+#else NAMED_REFS
+EXECUTE {initialize.extra.label.stuff}
+#endif NAMED_REFS
+
+ITERATE {forward.pass}
+
+REVERSE {reverse.pass}
+
+#if NAMED_REFS
+% Now that the label is right we sort for real,
+% on sort.label then year then title. This is
+% for the second sorting pass.
+FUNCTION {bib.sort.order}
+{ sort.label
+ " "
+ *
+ year field.or.null sortify
+ *
+ " "
+ *
+ title field.or.null
+ sort.format.title
+ *
+ #1 entry.max$ substring$
+ 'sort.key$ :=
+}
+
+ITERATE {bib.sort.order}
+
+SORT % by sort.label, year, title---giving final bibliography order
+#endif NAMED_REFS
+#else !SORTED
+
+% It still doesn't seem like a good idea to use an order-of-citation
+% reference list when using alphabetic labels, but when this happens we
+% must compute the longest label
+
+STRINGS { longest.label }
+
+INTEGERS { longest.label.width }
+
+FUNCTION {initialize.longest.label}
+{ "" 'longest.label :=
+ #0 'longest.label.width :=
+}
+
+FUNCTION {longest.label.pass}
+{ label width$ longest.label.width >
+ { label 'longest.label :=
+ label width$ 'longest.label.width :=
+ }
+ 'skip$
+ if$
+}
+
+EXECUTE {initialize.longest.label}
+
+ITERATE {longest.label.pass}
+
+#endif SORTED
+
+#else !LAB_ALPH
+
+% Now comes the computation for numeric labels.
+% We use either the sorted order or original order.
+% We still have to keep track of the longest (in width$ terms) label, for use
+% by the "thebibliography" environment.
+
+STRINGS { longest.label }
+
+INTEGERS { number.label longest.label.width }
+
+FUNCTION {initialize.longest.label}
+{ "" 'longest.label :=
+ #1 'number.label :=
+ #0 'longest.label.width :=
+}
+
+FUNCTION {longest.label.pass}
+{ number.label int.to.str$ 'label :=
+ number.label #1 + 'number.label :=
+ label width$ longest.label.width >
+ { label 'longest.label :=
+ label width$ 'longest.label.width :=
+ }
+ 'skip$
+ if$
+}
+
+EXECUTE {initialize.longest.label}
+
+ITERATE {longest.label.pass}
+
+#endif LAB_ALPH
+
+% Now we're ready to start writing the .BBL file.
+% We begin, if necessary, with a LaTeX macro for unnamed names in an alphabetic
+% label; next comes stuff from the `preamble' command in the database files.
+% Then we give an incantation containing the command
+% \begin{thebibliography}{...}
+% where the `...' is the longest label.
+%
+% We also call init.state.consts, for use by the output routines.
+
+FUNCTION {begin.bib}
+#if !NAMED_REFS
+#if LAB_ALPH
+{ et.al.char.used
+ { "\newcommand{\etalchar}[1]{$^{#1}$}" write$ newline$ }
+ 'skip$
+ if$
+ preamble$ empty$
+#else !LAB_ALPH
+{ preamble$ empty$
+#endif LAB_ALPH
+ 'skip$
+ { preamble$ write$ newline$ }
+ if$
+ "\begin{thebibliography}{" longest.label * "}" * write$ newline$
+}
+#else NAMED_REFS
+{ preamble$ empty$ % no \etalchar in apalike
+ 'skip$
+ { preamble$ write$ newline$ }
+ if$
+ "\begin{thebibliography}{}" write$ newline$ % no labels in apalike
+}
+#endif NAMED_REFS
+
+EXECUTE {begin.bib}
+
+EXECUTE {init.state.consts}
+
+% Now we produce the output for all the entries
+
+ITERATE {call.type$}
+
+% Finally, we finish up by writing the `\end{thebibliography}' command.
+
+FUNCTION {end.bib}
+{ newline$
+ "\end{thebibliography}" write$ newline$
+}
+
+EXECUTE {end.bib}
diff --git a/biblio/bibtex/contrib/oxford/README b/biblio/bibtex/contrib/oxford/README
new file mode 100644
index 0000000000..9a6133cd9d
--- /dev/null
+++ b/biblio/bibtex/contrib/oxford/README
@@ -0,0 +1,112 @@
+ OXFORD STYLE PACKAGE
+
+This is the oxford bst style package, version 0.4. It is a bibtex style geared
+at citations for the humanities.
+
+ STYLE
+The oxford style implements the oxford style interpreted through the eye of
+a swede working in the fields of the history of ideas.
+
+The style is based on Harvard.sty and a heavily hacked bst-file generated with
+custom-bib. It currently only supports
+
+\cite[]{}
+
+and
+
+\cite{}
+
+and only in abrevation mode.
+
+The form of the bibitem entries is
+\harvarditem[Jones, STITLE]{Jones, TITLE .... (PUBLISH:ADRESS, YEAR)}{1990}{key}
+ Brian Jones, TITLE ... (PUBLISH:ADRESS, YEAR).
+
+The style gives the full reference att the first citation and then an
+abrevated one.
+
+The file suports an additional entry in the bib-file, stitle (short title). It
+is used in the abrevated citation.
+
+The abrevated citation follows these rules:
+
+If (lastname == UNIQ) {
+ lastname
+} elsif (stitle == EXIST) {
+ lastname, stitle
+} else {
+ lastname, title
+}
+
+oxford.sty also inserts an "ibid." if the current citation is the same
+as the last one.
+
+
+ USAGE
+
+\usepackage[default, none]{oxford}
+.
+.
+.
+\bibliographystyle{oxford_xx}
+
+where xx stands for chosen language
+
+
+ INSTALL
+
+In the distibution there are only two languages directly supported:
+swedish
+english
+
+You install the oxford package either by putting the files in places you alreday
+know are supported by latex, eg.:
+
+cp oxford.sty /usr/lib/texfm/texfm/tex/latex/base
+cp oxford_se.bst /usr/lib/texfm/texfm/bibtex/bst/base
+cp oxford_en.bst /usr/lib/texfm/texfm/bibtex/bst/base
+
+Or you shose another location and then has to set som environmental variables,
+eg.:
+
+The place you put oxford.sty have to be exported with TEXINPUTS:
+export TEXINPUTS=/usr/lib/texmf/texmf/tex/latex/local:
+
+The place where you put the bst-files have to be exported with BSTINPUTS:
+
+BSTINPUTS=/usr/lib/texmf/texmf/bibtex/bst/oxford:
+
+(Dont forget the trailing colon (:)
+
+ LANGUAGE
+
+The oxford_in.bst has support for any kind of languages. But you have to create
+a language version of oxford_in.bst yourself. In the directory "lang" there are
+translations for english, finnish, german, norsk, svenska,
+esperant, french, italian and spanish.
+
+All you have to do is open "oxford_in.bst" and substitute all bbl.CODE and MACRO
+entries with the right translations (which can be found in the mbs-files) and
+name the file oxford_LANG.bst
+
+
+ BUGS
+None known of.
+
+ COPYRIGHT
+The copyrigt is Peter Antman, 1997, where marked in the files. These parts are
+distributed under GNU/GPL. All other copyright is hold by the respective authors
+mentioned in the files.
+
+ THANKS
+Thanks to Oren Patashnik for helping me solve the pop$ bug in version 0.3
+
+Send comments and bugreports to:
+peter antman@abc.se
+
+oxford can be found at:
+
+ftp.mc.hik.se/pub/users/mia95anp/tex/
+http://www.abc.se/~m9339/prog/oxford-0.4.tar.gz
+
+
diff --git a/biblio/bibtex/contrib/oxford/lang/english.mbs b/biblio/bibtex/contrib/oxford/lang/english.mbs
new file mode 100644
index 0000000000..e5bde87206
--- /dev/null
+++ b/biblio/bibtex/contrib/oxford/lang/english.mbs
@@ -0,0 +1,330 @@
+%\iffalse THIS IS A META COMMENT
+%====================================================================
+% A Language Definition File: ENGLISH
+% to be included with other master bibliography style files
+%--------------------------------------------------------------------
+% (See version and date in the \ProvidesFile command below)
+%--------------------------------------------------------------------
+% This file is self-documenting: simply LaTeX it!
+%====================================================================
+%
+ %-------------------------------------------------------------------
+ % The original source file contains the following version information:
+%\fi
+ % \ProvidesFile{english.mbs}[1995/05/04 1.1 (PWD)]
+%\iffalse
+%-------------------------------------------------------------------
+% NOTICE:
+% This file may be used for non-profit purposes.
+% It may not be distributed in exchange for money,
+% other than distribution costs.
+%
+% The author provides it `as is' and does not guarantee it in any way.
+%
+ % Copyright (C) 1994, 1995 Patrick W. Daly
+% Max-Planck-Institut f\"ur Aeronomie
+% Postfach 20
+% D-37189 Katlenburg-Lindau
+% Germany
+%
+% E-mail: daly@linmpi.mpae.gwdg.de
+ %-------------------------------------------------------------------
+%<*a&!a>
+% The following ensures that the driver part is not seen by makebst
+% The driver part must not contain any \end other than \end{document} !
+\ifx\endoptions\undefined\let\tempx=\relax\else
+ \long\def\tempx#1\end#2{}\fi\tempx
+%</a&!a>
+%<*driver>
+ \NeedsTeXFormat{LaTeX2e}%
+ \documentclass[a4paper,10pt,twoside]{article}%
+ \usepackage{doc}%
+ \raggedbottom
+ \CodelineNumbered
+ \RecordChanges
+ % Comment out next line to print coding
+ \OnlyDescription
+ \setlength{\oddsidemargin}{0.5\paperwidth}
+ \addtolength{\oddsidemargin}{-0.5\textwidth}
+ \addtolength{\oddsidemargin}{-1in}
+ \setlength{\evensidemargin}{\oddsidemargin}
+
+\begin{document}
+ \DocInput{english.mbs}
+\end{document}
+%</driver>
+% END OF META COMMENT \fi
+% \CharacterTable
+% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z
+% Lower-case \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z
+% Digits \0\1\2\3\4\5\6\7\8\9
+% Exclamation \! Double quote \" Hash (number) \#
+% Dollar \$ Percent \% Ampersand \&
+% Acute accent \' Left paren \( Right paren \)
+% Asterisk \* Plus \+ Comma \,
+% Minus \- Point \. Solidus \/
+% Colon \: Semicolon \; Less than \<
+% Equals \= Greater than \> Question mark \?
+% Commercial at \@ Left bracket \[ Backslash \\
+% Right bracket \] Circumflex \^ Underscore \_
+% Grave accent \` Left brace \{ Vertical bar \|
+% Right brace \} Tilde \~}
+%
+% \setcounter{StandardModuleDepth}{1}
+% \setcounter{IndexColumns}{2}
+% \setlength{\IndexMin}{10cm}
+%
+% \changes{1.0}{1995 Mar 15}{Initial version}
+% \changes{1.1}{1995 May 4}{Do no abbreviate `edited by'}
+%
+% \pagestyle{myheadings}
+% \markboth{P. W. Daly}{English Bibliographies}
+%
+% \title{{\bfseries English Language Definition File}\\
+% for master bibliographic style files}
+%
+% \author{Patrick W. Daly}
+%
+% \GetFileInfo{english.mbs}
+% \date{This paper describes file \texttt{\filename},\\
+% version \fileversion{} from \filedate}
+%
+% \maketitle
+%
+% \MakeShortVerb{\|}
+%
+% \parskip=1ex \parindent=0pt
+%
+% \newcommand{\btx}{{\sc Bib}\TeX}
+% \newcommand{\dtx}{\textsf{docstrip}}
+%
+% \section{Introduction}
+% This file is to be used as a language definition file with master
+% bibliographic files. The language it defines is
+% \begin{quote}\bfseries English\end{quote}
+%
+% This is not a self-sufficient \texttt{.mbs} file, but rather may
+% be used together with one that contains language support via
+% external definition files.
+%
+% See the documentation for \texttt{makebst} for formatting details.
+%
+% \section{The Menu Information}
+%
+% All the menu information is nested between \dtx{} guard options
+% |%<*options>| \dots\ |%</options>|, and the last command is
+% |\endoptions|. The rest of the file is nested between |%<*!options&!driver>|
+% \dots\ |%</!options&!driver>| in order to exclude it if \dtx{} is used to
+% extract only the menu information or the documentation driver.
+%
+% \begin{macrocode}
+%<*options>
+\mes{^^JOptions for ENGLISH}
+\wr{\spsp\spsp\sep english\pc: English language}
+
+\mes{^^JABBREVIATE WORD `PAGES':}
+\optdef{*}{}{`Page(s)'}{(no abbreviation)}
+\optdef{a}{pp}{`Page' abbreviated}{as p. or pp.}
+\getans
+
+\mes{^^JABBREVIATE WORD `EDITORS':}
+\optdef{*}{}{`Editor(s)'}{(no abbreviation)}
+\optdef{a}{ed}{`Editor' abbreviated}{as ed. or eds.}
+\getans
+
+\mes{^^JOTHER ABBREVIATIONS:}
+\optdef{*}{}{No abbreviations}{of volume, edition, chapter, etc}
+\optdef{a}{abr}{Abbreviations}{of such words}
+\getans
+
+\mes{^^JEDITION NUMBERS:}
+\optdef{*}{}{Write out editions}{as first, second, third, etc}
+\optdef{n}{ord}{Numerical editions}{as 1st, 2nd, 3rd, etc}
+\getans
+
+\endoptions
+%</options>
+% \end{macrocode}
+%
+% \StopEventually{\PrintChanges}
+%
+% \section{The Coding}
+% \begin{macrocode}
+%<*!options&!driver>
+
+ % The language selected here is ENGLISH
+FUNCTION {bbl.and}
+{ "and"}
+
+FUNCTION {bbl.editors}
+%<!ed>{ "editors" }
+%<ed>{ "eds." }
+
+FUNCTION {bbl.editor}
+%<!ed>{ "editor" }
+%<ed>{ "ed." }
+
+FUNCTION {bbl.edby}
+{ "edited by" }
+
+FUNCTION {bbl.edition}
+%<!abr>{ "edition" }
+%<abr>{ "edn." }
+
+FUNCTION {bbl.volume}
+%<!abr>{ "volume" }
+%<abr>{ "vol." }
+
+FUNCTION {bbl.of}
+{ "of" }
+
+FUNCTION {bbl.number}
+%<!abr>{ "number" }
+%<abr>{ "no." }
+
+FUNCTION {bbl.nr}
+{ "no." }
+
+FUNCTION {bbl.in}
+{ "in" }
+
+FUNCTION {bbl.pages}
+%<!pp>{ "pages" }
+%<pp>{ "pp." }
+
+FUNCTION {bbl.page}
+%<!pp>{ "page" }
+%<pp>{ "p." }
+
+FUNCTION {bbl.chapter}
+%<!abr>{ "chapter" }
+%<abr>{ "chap." }
+
+FUNCTION {bbl.techrep}
+%<!abr>{ "Technical Report" }
+%<abr>{ "Tech. Rep." }
+
+FUNCTION {bbl.mthesis}
+{ "Master's thesis" }
+
+FUNCTION {bbl.phdthesis}
+{ "Ph.D. thesis" }
+
+FUNCTION {bbl.first}
+%<!ord>{ "First" }
+%<ord>{ "1st" }
+
+FUNCTION {bbl.second}
+%<!ord>{ "Second" }
+%<ord>{ "2nd" }
+
+FUNCTION {bbl.third}
+%<!ord>{ "Third" }
+%<ord>{ "3rd" }
+
+FUNCTION {bbl.fourth}
+%<!ord>{ "Fourth" }
+%<ord>{ "4th" }
+
+FUNCTION {bbl.fifth}
+%<!ord>{ "Fifth" }
+%<ord>{ "5th" }
+
+FUNCTION {bbl.st}
+{ "st" }
+
+FUNCTION {bbl.nd}
+{ "nd" }
+
+FUNCTION {bbl.rd}
+{ "rd" }
+
+FUNCTION {bbl.th}
+{ "th" }
+
+% \end{macrocode}
+% This function adds English endings for ordinals 1, 2, 3. However, if
+% the second last digit is 1, then the ending is `th' for all last digits.
+% So far, all other languages included do not have this problem, and it is
+% sufficient to add the \textsl{th} equivalent. This might change with further
+% languages.
+%
+% \begin{macrocode}
+FUNCTION {eng.ord}
+{ duplicate$ "1" swap$ *
+ #-2 #1 substring$ "1" =
+ { bbl.th * }
+ { duplicate$ #-1 #1 substring$
+ duplicate$ "1" =
+ { pop$ bbl.st * }
+ { duplicate$ "2" =
+ { pop$ bbl.nd * }
+ { "3" =
+ { bbl.rd * }
+ { bbl.th * }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+}
+
+%<*!abr>
+MACRO {jan} {"January"}
+
+MACRO {feb} {"February"}
+
+MACRO {mar} {"March"}
+
+MACRO {apr} {"April"}
+
+MACRO {may} {"May"}
+
+MACRO {jun} {"June"}
+
+MACRO {jul} {"July"}
+
+MACRO {aug} {"August"}
+
+MACRO {sep} {"September"}
+
+MACRO {oct} {"October"}
+
+MACRO {nov} {"November"}
+
+MACRO {dec} {"December"}
+
+%</!abr>
+%<*abr>
+MACRO {jan} {"Jan."}
+
+MACRO {feb} {"Feb."}
+
+MACRO {mar} {"Mar."}
+
+MACRO {apr} {"Apr."}
+
+MACRO {may} {"May"}
+
+MACRO {jun} {"Jun."}
+
+MACRO {jul} {"Jul."}
+
+MACRO {aug} {"Aug."}
+
+MACRO {sep} {"Sep."}
+
+MACRO {oct} {"Oct."}
+
+MACRO {nov} {"Nov."}
+
+MACRO {dec} {"Dec."}
+
+%</abr>
+%</!options&!driver>
+ % End of language definition file
+
+% \end{macrocode}
+% \Finale
diff --git a/biblio/bibtex/contrib/oxford/lang/esperant.mbs b/biblio/bibtex/contrib/oxford/lang/esperant.mbs
new file mode 100644
index 0000000000..7405e94011
--- /dev/null
+++ b/biblio/bibtex/contrib/oxford/lang/esperant.mbs
@@ -0,0 +1,292 @@
+%\iffalse THIS IS A META COMMENT
+%====================================================================
+% A Language Definition File: ESPERANTO
+% to be included with other master bibliography style files
+%--------------------------------------------------------------------
+% (See version and date in the \ProvidesFile command below)
+%--------------------------------------------------------------------
+% This file is self-documenting: simply LaTeX it!
+%====================================================================
+%
+ %-------------------------------------------------------------------
+ % The original source file contains the following version information:
+%\fi
+ % \ProvidesFile{esperant.mbs}[1995/05/04 1.1 (PWD)]
+%\iffalse
+%-------------------------------------------------------------------
+% NOTICE:
+% This file may be used for non-profit purposes.
+% It may not be distributed in exchange for money,
+% other than distribution costs.
+%
+% The author provides it `as is' and does not guarantee it in any way.
+%
+ % Copyright (C) 1994, 1995 Patrick W. Daly
+% Max-Planck-Institut f\"ur Aeronomie
+% Postfach 20
+% D-37189 Katlenburg-Lindau
+% Germany
+%
+% E-mail: daly@linmpi.mpae.gwdg.de
+ %-------------------------------------------------------------------
+%<*a&!a>
+% The following ensures that the driver part is not seen by makebst
+% The driver part must not contain any \end other than \end{document} !
+\ifx\endoptions\undefined\let\tempx=\relax\else
+ \long\def\tempx#1\end#2{}\fi\tempx
+%</a&!a>
+%<*driver>
+ \NeedsTeXFormat{LaTeX2e}%
+ \documentclass[a4paper,10pt,twoside]{article}%
+ \usepackage{doc}%
+ \raggedbottom
+ \CodelineNumbered
+ \RecordChanges
+ % Comment out next line to print coding
+ \OnlyDescription
+ \setlength{\oddsidemargin}{0.5\paperwidth}
+ \addtolength{\oddsidemargin}{-0.5\textwidth}
+ \addtolength{\oddsidemargin}{-1in}
+ \setlength{\evensidemargin}{\oddsidemargin}
+
+\begin{document}
+ \DocInput{esperant.mbs}
+\end{document}
+%</driver>
+% END OF META COMMENT \fi
+% \CharacterTable
+% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z
+% Lower-case \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z
+% Digits \0\1\2\3\4\5\6\7\8\9
+% Exclamation \! Double quote \" Hash (number) \#
+% Dollar \$ Percent \% Ampersand \&
+% Acute accent \' Left paren \( Right paren \)
+% Asterisk \* Plus \+ Comma \,
+% Minus \- Point \. Solidus \/
+% Colon \: Semicolon \; Less than \<
+% Equals \= Greater than \> Question mark \?
+% Commercial at \@ Left bracket \[ Backslash \\
+% Right bracket \] Circumflex \^ Underscore \_
+% Grave accent \` Left brace \{ Vertical bar \|
+% Right brace \} Tilde \~}
+%
+% \setcounter{StandardModuleDepth}{1}
+% \setcounter{IndexColumns}{2}
+% \setlength{\IndexMin}{10cm}
+%
+% \changes{1.0}{1995 Mar 15}{Initial version}
+% \changes{1.1}{1995 May 4}{Do no abbreviate `edited by'}
+%
+% \pagestyle{myheadings}
+% \markboth{P. W. Daly}{Esperanto Bibliographies}
+%
+% \title{{\bfseries Esperanto Language Definition File}\\
+% for master bibliographic style files}
+%
+% \author{Patrick W. Daly}
+%
+% \GetFileInfo{esperant.mbs}
+% \date{This paper describes file \texttt{\filename},\\
+% version \fileversion{} from \filedate}
+%
+% \maketitle
+%
+% \MakeShortVerb{\|}
+%
+% \parskip=1ex \parindent=0pt
+%
+% \newcommand{\btx}{{\sc Bib}\TeX}
+% \newcommand{\dtx}{\textsf{docstrip}}
+%
+% \section{Introduction}
+% This file is to be used as a language definition file with master
+% bibliographic files. The language it defines is
+% \begin{quote}\bfseries Esperanto\end{quote}
+%
+% This is not a self-sufficient \texttt{.mbs} file, but rather may
+% be used together with one that contains language support via
+% external definition files.
+%
+% See the documentation for \texttt{makebst} for formatting details.
+%
+% \section{The Menu Information}
+%
+% All the menu information is nested between \dtx{} guard options
+% |%<*options>| \dots\ |%</options>|, and the last command is
+% |\endoptions|. The rest of the file is nested between |%<*!options&!driver>|
+% \dots\ |%</!options&!driver>| in order to exclude it if \dtx{} is used to
+% extract only the menu information or the documentation driver.
+%
+% \begin{macrocode}
+%<*options>
+\mes{^^JOptions for ESPERANTO}
+\wr{\spsp\spsp\sep esperanto\pc: Esperanto language}
+
+\mes{^^JABBREVIATE WORD `PAGES':}
+\optdef{*}{}{`Page(s)'}{(no abbreviation)}
+\optdef{a}{pp}{`Page' abbreviated}{as p. or pp.}
+\getans
+
+\mes{^^JABBREVIATE WORD `EDITORS':}
+\optdef{*}{}{`Editor(s)'}{(no abbreviation)}
+\optdef{a}{ed}{`Editor' abbreviated}{as ed. or eds.}
+\getans
+
+\mes{^^JOTHER ABBREVIATIONS:}
+\optdef{*}{}{No abbreviations}{of volume, edition, chapter, etc}
+\optdef{a}{abr}{Abbreviations}{of such words}
+\getans
+
+\mes{^^JEDITION NUMBERS:}
+\optdef{*}{}{Write out editions}{as first, second, third, etc}
+\optdef{n}{ord}{Numerical editions}{as 1st, 2nd, 3rd, etc}
+\getans
+
+\endoptions
+%</options>
+% \end{macrocode}
+%
+% \StopEventually{\PrintChanges}
+%
+% \section{The Coding}
+% \begin{macrocode}
+%<*!options&!driver>
+
+ % The language selected here is ESPERANTO
+FUNCTION {bbl.and}
+{ "kaj"}
+
+FUNCTION {bbl.editors}
+%<!ed>{ "redaktoroj" }
+%<ed>{ "red-oj" }
+
+FUNCTION {bbl.editor}
+%<!ed>{ "redaktoro" }
+%<ed>{ "red." }
+
+FUNCTION {bbl.edby}
+{ "redaktita de" }
+
+FUNCTION {bbl.edition}
+%<!abr>{ "eldono" }
+%<abr>{ "eld." }
+
+FUNCTION {bbl.volume}
+%<!abr>{ "volumo" }
+%<abr>{ "vol." }
+
+FUNCTION {bbl.of}
+{ "el" }
+
+FUNCTION {bbl.number}
+%<!abr>{ "numero" }
+%<abr>{ "n-ro" }
+
+FUNCTION {bbl.nr}
+{ "n-ro" }
+
+FUNCTION {bbl.in}
+{ "en" }
+
+FUNCTION {bbl.pages}
+%<!pp>{ "pa\^goj" }
+%<pp>{ "pp." }
+
+FUNCTION {bbl.page}
+%<!pp>{ "pa\^go" }
+%<pp>{ "p\^g" }
+
+FUNCTION {bbl.chapter}
+%<!abr>{ "\^capitro" }
+%<abr>{ "\^cap." }
+
+FUNCTION {bbl.techrep}
+%<!abr>{ "Teknica Raporto" }
+%<abr>{ "Tek. Rap." }
+
+FUNCTION {bbl.mthesis}
+{ "Magistra tezo" }
+
+FUNCTION {bbl.phdthesis}
+{ "Doktora tezo" }
+
+FUNCTION {bbl.first}
+%<!ord>{ "Unua" }
+%<ord>{ "1-a" }
+
+FUNCTION {bbl.second}
+%<!ord>{ "Dua" }
+%<ord>{ "2-a" }
+
+FUNCTION {bbl.third}
+%<!ord>{ "Tria" }
+%<ord>{ "3-a" }
+
+FUNCTION {bbl.fourth}
+%<!ord>{ "Kvara" }
+%<ord>{ "4-a" }
+
+FUNCTION {bbl.fifth}
+%<!ord>{ "Kvina" }
+%<ord>{ "5-a" }
+
+FUNCTION {bbl.th}
+{ "-a" }
+
+%<*!abr>
+MACRO {jan} {"januaro"}
+
+MACRO {feb} {"februaro"}
+
+MACRO {mar} {"marto"}
+
+MACRO {apr} {"aprilo"}
+
+MACRO {may} {"majo"}
+
+MACRO {jun} {"junio"}
+
+MACRO {jul} {"julio"}
+
+MACRO {aug} {"a\u{u}gusto"}
+
+MACRO {sep} {"septembro"}
+
+MACRO {oct} {"oktobro"}
+
+MACRO {nov} {"novembro"}
+
+MACRO {dec} {"decembro"}
+
+%</!abr>
+%<*abr>
+MACRO {jan} {"jan."}
+
+MACRO {feb} {"feb."}
+
+MACRO {mar} {"mar."}
+
+MACRO {apr} {"apr."}
+
+MACRO {may} {"maj."}
+
+MACRO {jun} {"jun."}
+
+MACRO {jul} {"jul."}
+
+MACRO {aug} {"a\u{u}g."}
+
+MACRO {sep} {"sep."}
+
+MACRO {oct} {"okt."}
+
+MACRO {nov} {"nov."}
+
+MACRO {dec} {"dec."}
+
+%</abr>
+%</!options&!driver>
+ % End of language definition file
+
+% \end{macrocode}
+% \Finale
diff --git a/biblio/bibtex/contrib/oxford/lang/finnish.mbs b/biblio/bibtex/contrib/oxford/lang/finnish.mbs
new file mode 100644
index 0000000000..f7126310ab
--- /dev/null
+++ b/biblio/bibtex/contrib/oxford/lang/finnish.mbs
@@ -0,0 +1,281 @@
+%\iffalse THIS IS A META COMMENT
+%====================================================================
+% A Language Definition File: FINNISH
+% to be included with other master bibliography style files
+%--------------------------------------------------------------------
+% (See version and date in the \ProvidesFile command below)
+%--------------------------------------------------------------------
+% This file is self-documenting: simply LaTeX it!
+%====================================================================
+%
+ %-------------------------------------------------------------------
+ % The original source file contains the following version information:
+%\fi
+ % \ProvidesFile{finnish.mbs}[1995/10/25 1.2 (PWD)]
+%\iffalse
+%-------------------------------------------------------------------
+% NOTICE:
+% This file may be used for non-profit purposes.
+% It may not be distributed in exchange for money,
+% other than distribution costs.
+%
+% The author provides it `as is' and does not guarantee it in any way.
+%
+ % Copyright (C) 1994, 1995 Patrick W. Daly
+% Max-Planck-Institut f\"ur Aeronomie
+% Postfach 20
+% D-37189 Katlenburg-Lindau
+% Germany
+%
+% E-mail: daly@linmpi.mpae.gwdg.de
+ %-------------------------------------------------------------------
+%<*a&!a>
+% The following ensures that the driver part is not seen by makebst
+% The driver part must not contain any \end other than \end{document} !
+\ifx\endoptions\undefined\let\tempx=\relax\else
+ \long\def\tempx#1\end#2{}\fi\tempx
+%</a&!a>
+%<*driver>
+ \NeedsTeXFormat{LaTeX2e}%
+ \documentclass[a4paper,10pt,twoside]{article}%
+ \usepackage{doc}%
+ \raggedbottom
+ \CodelineNumbered
+ \RecordChanges
+ % Comment out next line to print coding
+ \OnlyDescription
+ \setlength{\oddsidemargin}{0.5\paperwidth}
+ \addtolength{\oddsidemargin}{-0.5\textwidth}
+ \addtolength{\oddsidemargin}{-1in}
+ \setlength{\evensidemargin}{\oddsidemargin}
+
+\begin{document}
+ \DocInput{finnish.mbs}
+\end{document}
+%</driver>
+% END OF META COMMENT \fi
+% \CharacterTable
+% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z
+% Lower-case \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z
+% Digits \0\1\2\3\4\5\6\7\8\9
+% Exclamation \! Double quote \" Hash (number) \#
+% Dollar \$ Percent \% Ampersand \&
+% Acute accent \' Left paren \( Right paren \)
+% Asterisk \* Plus \+ Comma \,
+% Minus \- Point \. Solidus \/
+% Colon \: Semicolon \; Less than \<
+% Equals \= Greater than \> Question mark \?
+% Commercial at \@ Left bracket \[ Backslash \\
+% Right bracket \] Circumflex \^ Underscore \_
+% Grave accent \` Left brace \{ Vertical bar \|
+% Right brace \} Tilde \~}
+%
+% \setcounter{StandardModuleDepth}{1}
+% \setcounter{IndexColumns}{2}
+% \setlength{\IndexMin}{10cm}
+%
+% \changes{1.0}{1995 Mar 15}{Initial version}
+% \changes{1.1}{1995 May 4}{Do no abbreviate `edited by'}
+% \changes{1.1a}{1995 May 11}{Correct \texttt{bbl.phdthesis}}
+% \changes{1.2}{1995 Oct 25}{Remove \texttt{umlaut} option and \cs{qq},
+% replace with Raichle's trick}
+%
+% \pagestyle{myheadings}
+% \markboth{P. W. Daly}{Finnish Bibliographies}
+%
+% \title{{\bfseries Finnish Language Definition File}\\
+% for master bibliographic style files}
+%
+% \author{Patrick W. Daly}
+%
+% \GetFileInfo{finnish.mbs}
+% \date{This paper describes file \texttt{\filename},\\
+% version \fileversion{} from \filedate}
+%
+% \maketitle
+%
+% \MakeShortVerb{\|}
+%
+% \parskip=1ex \parindent=0pt
+%
+% \newcommand{\btx}{{\sc Bib}\TeX}
+% \newcommand{\dtx}{\textsf{docstrip}}
+%
+% \section{Introduction}
+% This file is to be used as a language definition file with master
+% bibliographic files. The language it defines is
+% \begin{quote}\bfseries Finnish\end{quote}
+%
+% The translations for Finnish were supplied by
+% \begin{quote}\ttfamily "Niilo.Siljamo@Helsinki.FI"\end{quote}
+
+% This is not a self-sufficient \texttt{.mbs} file, but rather may
+% be used together with one that contains language support via
+% external definition files.
+%
+% Bernd Raichle points out that |\^^b| can be used in place of |\"|
+% within \btx{} code. One can thus replace |Nelj\^^b{a}s| with |Nelj\^^b{a}s|
+% and do away with the \texttt{umlaut} option.
+%
+% See the documentation for \texttt{makebst} for formatting details.
+%
+% \section{The Menu Information}
+%
+% All the menu information is nested between \dtx{} guard options
+% |%<*options>| \dots\ |%</options>|, and the last command is
+% |\endoptions|. The rest of the file is nested between |%<*!options&!driver>|
+% \dots\ |%</!options&!driver>| in order to exclude it if \dtx{} is used to
+% extract only the menu information or the documentation driver.
+%
+% \begin{macrocode}
+%<*options>
+\mes{^^JOptions for FINNISH}
+\wr{\spsp\spsp\sep finnish\pc: Finnish language}
+
+\mes{^^JABBREVIATE WORD `SIVUT':} % `Pages'
+\optdef{*}{}{`Sivu(t)'}{(no abbreviation)}
+\optdef{a}{pp}{`Sivu' abbreviated}{as s. or ss.}
+\getans
+
+\mes{^^JABBREVIATE WORD `TOIMITTAJAT':} % `Editors'
+\optdef{*}{}{`Toimittaja(t)'}{(no abbreviation)}
+\optdef{a}{ed}{`Toimittaja' abbreviated}{as toim.}
+\getans
+
+\mes{^^JOTHER ABBREVIATIONS:}
+\optdef{*}{}{No abbreviations}{of other words}
+\optdef{a}{abr}{Abbreviations}{of such words}
+\getans
+
+\mes{^^JEDITION NUMBERS:}
+\optdef{*}{}{Write out editions}{as emsimm\string\"ainen, toinen, etc}
+\optdef{n}{ord}{Numerical editions}{as 1., 2., etc}
+\getans
+
+\endoptions
+%</options>
+% \end{macrocode}
+%
+% \StopEventually{\PrintChanges}
+%
+% \section{The Coding}
+% \begin{macrocode}
+%<*!options&!driver>
+
+ % The language selected here is FINNISH
+FUNCTION {bbl.and}
+{ "ja"}
+
+FUNCTION {bbl.editors}
+%<!ed>{ "toimittajat" }
+%<ed>{ "toim." }
+
+FUNCTION {bbl.editor}
+%<!ed>{ "toimittaja" }
+%<ed>{ "toim." }
+
+FUNCTION {bbl.edby}
+{ "toimittanut" }
+
+FUNCTION {bbl.edition}
+%<!abr>{ "painos" }
+%<abr>{ "painos" }
+
+FUNCTION {bbl.volume}
+{ "osa" }
+
+FUNCTION {bbl.of}
+{ "sarjasta" }
+
+FUNCTION {bbl.number}
+%<!abr>{ "numero" }
+%<abr>{ "no." }
+
+FUNCTION {bbl.nr}
+{ "no." }
+
+FUNCTION {bbl.in}
+{ "teoksessa" }
+
+FUNCTION {bbl.pages}
+%<!pp>{ "sivut" }
+%<pp>{ "ss." }
+
+FUNCTION {bbl.page}
+%<!pp>{ "sivu" }
+%<pp>{ "s." }
+
+FUNCTION {bbl.chapter}
+{ "luku" }
+
+FUNCTION {bbl.techrep}
+%<!abr>{ "Tekninen Raportti" }
+%<abr>{ "Tekn. Rap." }
+
+FUNCTION {bbl.mthesis}
+{ "pro gradu" }
+
+FUNCTION {bbl.phdthesis}
+{ "v\^^b{a}it\^^b{o}skirja" }
+
+FUNCTION {bbl.first}
+%<!ord>{ "Ensimm\^^b{a}inen" }
+%<ord>{ "1." }
+
+FUNCTION {bbl.second}
+%<!ord>{ "Toinen" }
+%<ord>{ "2." }
+
+FUNCTION {bbl.third}
+%<!ord>{ "Kolmas" }
+%<ord>{ "3." }
+
+FUNCTION {bbl.fourth}
+%<!ord>{ "Nelj\^^b{a}s" }
+%<ord>{ "4." }
+
+FUNCTION {bbl.fifth}
+%<!ord>{ "Viides" }
+%<ord>{ "5." }
+
+FUNCTION {bbl.st}
+{ "." }
+
+FUNCTION {bbl.nd}
+{ "." }
+
+FUNCTION {bbl.rd}
+{ "." }
+
+FUNCTION {bbl.th}
+{ "." }
+
+MACRO {jan} {"tammikuu"}
+
+MACRO {feb} {"helmikuu"}
+
+MACRO {mar} {"maaliskuu"}
+
+MACRO {apr} {"huhtikuu"}
+
+MACRO {may} {"toukokuu"}
+
+MACRO {jun} {"kes\^^b{a}kuu"}
+
+MACRO {jul} {"hein\^^b{a}kuu"}
+
+MACRO {aug} {"elokuu"}
+
+MACRO {sep} {"syyskuu"}
+
+MACRO {oct} {"lokakuu"}
+
+MACRO {nov} {"marraskuu"}
+
+MACRO {dec} {"joulukuu"}
+
+%</!options&!driver>
+ % End of language definition file
+
+% \end{macrocode}
+% \Finale
diff --git a/biblio/bibtex/contrib/oxford/lang/french.mbs b/biblio/bibtex/contrib/oxford/lang/french.mbs
new file mode 100644
index 0000000000..616d69238e
--- /dev/null
+++ b/biblio/bibtex/contrib/oxford/lang/french.mbs
@@ -0,0 +1,292 @@
+%\iffalse THIS IS A META COMMENT
+%====================================================================
+% A Language Definition File: FRENCH
+% to be included with other master bibliography style files
+%--------------------------------------------------------------------
+% (See version and date in the \ProvidesFile command below)
+%--------------------------------------------------------------------
+% This file is self-documenting: simply LaTeX it!
+%====================================================================
+%
+ %-------------------------------------------------------------------
+ % The original source file contains the following version information:
+%\fi
+ % \ProvidesFile{french.mbs}[1995/05/04 1.1 (PWD)]
+%\iffalse
+%-------------------------------------------------------------------
+% NOTICE:
+% This file may be used for non-profit purposes.
+% It may not be distributed in exchange for money,
+% other than distribution costs.
+%
+% The author provides it `as is' and does not guarantee it in any way.
+%
+ % Copyright (C) 1994, 1995 Patrick W. Daly
+% Max-Planck-Institut f\"ur Aeronomie
+% Postfach 20
+% D-37189 Katlenburg-Lindau
+% Germany
+%
+% E-mail: daly@linmpi.mpae.gwdg.de
+ %-------------------------------------------------------------------
+%<*a&!a>
+% The following ensures that the driver part is not seen by makebst
+% The driver part must not contain any \end other than \end{document} !
+\ifx\endoptions\undefined\let\tempx=\relax\else
+ \long\def\tempx#1\end#2{}\fi\tempx
+%</a&!a>
+%<*driver>
+ \NeedsTeXFormat{LaTeX2e}%
+ \documentclass[a4paper,10pt,twoside]{article}%
+ \usepackage{doc}%
+ \raggedbottom
+ \CodelineNumbered
+ \RecordChanges
+ % Comment out next line to print coding
+ \OnlyDescription
+ \setlength{\oddsidemargin}{0.5\paperwidth}
+ \addtolength{\oddsidemargin}{-0.5\textwidth}
+ \addtolength{\oddsidemargin}{-1in}
+ \setlength{\evensidemargin}{\oddsidemargin}
+
+\begin{document}
+ \DocInput{french.mbs}
+\end{document}
+%</driver>
+% END OF META COMMENT \fi
+% \CharacterTable
+% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z
+% Lower-case \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z
+% Digits \0\1\2\3\4\5\6\7\8\9
+% Exclamation \! Double quote \" Hash (number) \#
+% Dollar \$ Percent \% Ampersand \&
+% Acute accent \' Left paren \( Right paren \)
+% Asterisk \* Plus \+ Comma \,
+% Minus \- Point \. Solidus \/
+% Colon \: Semicolon \; Less than \<
+% Equals \= Greater than \> Question mark \?
+% Commercial at \@ Left bracket \[ Backslash \\
+% Right bracket \] Circumflex \^ Underscore \_
+% Grave accent \` Left brace \{ Vertical bar \|
+% Right brace \} Tilde \~}
+%
+% \setcounter{StandardModuleDepth}{1}
+% \setcounter{IndexColumns}{2}
+% \setlength{\IndexMin}{10cm}
+%
+% \changes{1.0}{1995 Mar 15}{Initial version}
+% \changes{1.1}{1995 May 4}{Do no abbreviate `edited by'}
+%
+% \pagestyle{myheadings}
+% \markboth{P. W. Daly}{French Bibliographies}
+%
+% \title{{\bfseries French Language Definition File}\\
+% for master bibliographic style files}
+%
+% \author{Patrick W. Daly}
+%
+% \GetFileInfo{french.mbs}
+% \date{This paper describes file \texttt{\filename},\\
+% version \fileversion{} from \filedate}
+%
+% \maketitle
+%
+% \MakeShortVerb{\|}
+%
+% \parskip=1ex \parindent=0pt
+%
+% \newcommand{\btx}{{\sc Bib}\TeX}
+% \newcommand{\dtx}{\textsf{docstrip}}
+%
+% \section{Introduction}
+% This file is to be used as a language definition file with master
+% bibliographic files. The language it defines is
+% \begin{quote}\bfseries French\end{quote}
+%
+% This is not a self-sufficient \texttt{.mbs} file, but rather may
+% be used together with one that contains language support via
+% external definition files.
+%
+% See the documentation for \texttt{makebst} for formatting details.
+%
+% \section{The Menu Information}
+%
+% All the menu information is nested between \dtx{} guard options
+% |%<*options>| \dots\ |%</options>|, and the last command is
+% |\endoptions|. The rest of the file is nested between |%<*!options&!driver>|
+% \dots\ |%</!options&!driver>| in order to exclude it if \dtx{} is used to
+% extract only the menu information or the documentation driver.
+%
+% \begin{macrocode}
+%<*options>
+\mes{^^JOptions for FRENCH}
+\wr{\spsp\spsp\sep french\pc: French language}
+
+\mes{^^JABBREVIATE WORD `PAGES':}
+\optdef{*}{}{`Page(s)'}{(no abbreviation)}
+\optdef{a}{pp}{`Page' abbreviated}{as p. or pp.}
+\getans
+
+\mes{^^JABBREVIATE WORD `REDAKTEUR':}
+\optdef{*}{}{`R\string\'edakteur(s)'}{(no abbreviation)}
+\optdef{a}{ed}{`R\string\'edakteur' abbreviated}{as R\string\'ed.}
+\getans
+
+\mes{^^JOTHER ABBREVIATIONS:}
+\optdef{*}{}{No abbreviations}{of Tome, \string\'edition, chapitre}
+\optdef{a}{abr}{Abbreviations}{of such words}
+\getans
+
+\mes{^^JEDITION NUMBERS:}
+\optdef{*}{}{Write out editions}{as primi\string\`ere, deuxi\string\`eme,...}
+\optdef{n}{ord}{Numerical editions}{as 1re, 2e, 3e, etc}
+\getans
+
+\endoptions
+%</options>
+% \end{macrocode}
+%
+% \StopEventually{\PrintChanges}
+%
+% \section{The Coding}
+% \begin{macrocode}
+%<*!options&!driver>
+
+ % The language selected here is FRENCH
+FUNCTION {bbl.and}
+{ "et"}
+
+FUNCTION {bbl.editors}
+%<!ed>{ "r\'edacteurs" }
+%<ed>{ "r\'eds." }
+
+FUNCTION {bbl.editor}
+%<!ed>{ "r\'edacteur" }
+%<ed>{ "r\'ed." }
+
+FUNCTION {bbl.edby}
+{ "edit\'e par" }
+
+FUNCTION {bbl.edition}
+%<!abr>{ "\'edition" }
+%<abr>{ "\'edn." }
+
+FUNCTION {bbl.volume}
+%<!abr>{ "tome" }
+%<abr>{ "tm." }
+
+FUNCTION {bbl.of}
+{ "de" }
+
+FUNCTION {bbl.number}
+%<!abr>{ "num\'ero" }
+%<abr>{ "no." }
+
+FUNCTION {bbl.nr}
+{ "no." }
+
+FUNCTION {bbl.in}
+{ "dans" }
+
+FUNCTION {bbl.pages}
+%<!pp>{ "pages" }
+%<pp>{ "pp." }
+
+FUNCTION {bbl.page}
+%<!pp>{ "page" }
+%<pp>{ "p." }
+
+FUNCTION {bbl.chapter}
+%<!abr>{ "chapitre" }
+%<abr>{ "chap." }
+
+FUNCTION {bbl.techrep}
+%<!abr>{ "Rapport technique" }
+%<abr>{ "Rap. tech." }
+
+FUNCTION {bbl.mthesis}
+{ "Th\`ese de ma\^itre" }
+
+FUNCTION {bbl.phdthesis}
+{ "Th\`ese de doctorat" }
+
+FUNCTION {bbl.first}
+%<!ord>{ "Premi\`ere" }
+%<ord>{ "1$^{\mbox{\scriptsize re}}$" }
+
+FUNCTION {bbl.second}
+%<!ord>{ "Deuxi\`eme" }
+%<ord>{ "2$^{\mbox{\scriptsize e}}$" }
+
+FUNCTION {bbl.third}
+%<!ord>{ "Troisi\`eme" }
+%<ord>{ "3$^{\mbox{\scriptsize e}}$" }
+
+FUNCTION {bbl.fourth}
+%<!ord>{ "Quatri\`eme" }
+%<ord>{ "4$^{\mbox{\scriptsize e}}$" }
+
+FUNCTION {bbl.fifth}
+%<!ord>{ "Cinqui\`eme" }
+%<ord>{ "5$^{\mbox{\scriptsize e}}$" }
+
+FUNCTION {bbl.th}
+{ "$^{\mbox{\scriptsize e}}$" }
+
+%<*!abr>
+MACRO {jan} {"janvier"}
+
+MACRO {feb} {"f\'evrier"}
+
+MACRO {mar} {"mars"}
+
+MACRO {apr} {"avril"}
+
+MACRO {may} {"mai"}
+
+MACRO {jun} {"juin"}
+
+MACRO {jul} {"juillet"}
+
+MACRO {aug} {"ao\^ut"}
+
+MACRO {sep} {"septembre"}
+
+MACRO {oct} {"octobre"}
+
+MACRO {nov} {"novembre"}
+
+MACRO {dec} {"d\'ecembre"}
+
+%</!abr>
+%<*abr>
+MACRO {jan} {"jan."}
+
+MACRO {feb} {"f\'ev."}
+
+MACRO {mar} {"mars"}
+
+MACRO {apr} {"avr."}
+
+MACRO {may} {"mai"}
+
+MACRO {jun} {"juin"}
+
+MACRO {jul} {"juil."}
+
+MACRO {aug} {"ao\^ut"}
+
+MACRO {sep} {"sept."}
+
+MACRO {oct} {"oct."}
+
+MACRO {nov} {"nov."}
+
+MACRO {dec} {"d\'ec."}
+
+%</abr>
+%</!options&!driver>
+ % End of language definition file
+
+% \end{macrocode}
+% \Finale
diff --git a/biblio/bibtex/contrib/oxford/lang/german.mbs b/biblio/bibtex/contrib/oxford/lang/german.mbs
new file mode 100644
index 0000000000..0e7ef4c328
--- /dev/null
+++ b/biblio/bibtex/contrib/oxford/lang/german.mbs
@@ -0,0 +1,317 @@
+%\iffalse THIS IS A META COMMENT
+%====================================================================
+% A Language Definition File: GERMAN
+% to be included with other master bibliography style files
+%--------------------------------------------------------------------
+% (See version and date in the \ProvidesFile command below)
+%--------------------------------------------------------------------
+% This file is self-documenting: simply LaTeX it!
+%====================================================================
+%
+%\fi
+ %-------------------------------------------------------------------
+ % The original source file contains the following version information:
+ % \ProvidesFile{german.mbs}[1995/11/02 1.5 (PWD)]
+%\iffalse
+%-------------------------------------------------------------------
+% NOTICE:
+% This file may be used for non-profit purposes.
+% It may not be distributed in exchange for money,
+% other than distribution costs.
+%
+% The author provides it `as is' and does not guarantee it in any way.
+%
+ % Copyright (C) 1994, 1995 Patrick W. Daly
+% Max-Planck-Institut f\"ur Aeronomie
+% Postfach 20
+% D-37189 Katlenburg-Lindau
+% Germany
+%
+% E-mail: daly@linmpi.mpae.gwdg.de
+ %-------------------------------------------------------------------
+%<*a&!a>
+% The following ensures that the driver part is not seen by makebst
+% The driver part must not contain any \end other than \end{document} !
+\ifx\endoptions\undefined\let\tempx=\relax\else
+ \long\def\tempx#1\end#2{}\fi\tempx
+%</a&!a>
+%<*driver>
+ \NeedsTeXFormat{LaTeX2e}%
+ \documentclass[a4paper,10pt,twoside]{article}%
+ \usepackage{doc}%
+ \raggedbottom
+ \CodelineNumbered
+ \RecordChanges
+ % Comment out next line to print coding
+ \OnlyDescription
+ \setlength{\oddsidemargin}{0.5\paperwidth}
+ \addtolength{\oddsidemargin}{-0.5\textwidth}
+ \addtolength{\oddsidemargin}{-1in}
+ \setlength{\evensidemargin}{\oddsidemargin}
+
+\begin{document}
+ \DocInput{german.mbs}
+\end{document}
+%</driver>
+% END OF META COMMENT \fi
+% \CharacterTable
+% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z
+% Lower-case \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z
+% Digits \0\1\2\3\4\5\6\7\8\9
+% Exclamation \! Double quote \" Hash (number) \#
+% Dollar \$ Percent \% Ampersand \&
+% Acute accent \' Left paren \( Right paren \)
+% Asterisk \* Plus \+ Comma \,
+% Minus \- Point \. Solidus \/
+% Colon \: Semicolon \; Less than \<
+% Equals \= Greater than \> Question mark \?
+% Commercial at \@ Left bracket \[ Backslash \\
+% Right bracket \] Circumflex \^ Underscore \_
+% Grave accent \` Left brace \{ Vertical bar \|
+% Right brace \} Tilde \~}
+%
+% \setcounter{StandardModuleDepth}{1}
+% \setcounter{IndexColumns}{2}
+% \setlength{\IndexMin}{10cm}
+%
+% \changes{1.0}{1995 Mar 15}{Initial version}
+% \changes{1.1}{1995 May 4}{Do no abbreviate `edited by'}
+% \changes{1.2}{1995 Jun 7}{Revisions suggested by Sven Hartrumpf}
+% \changes{1.3}{1995 Aug 2}{Revisions suggested by Gerd Neugebauer,
+% dissertation option, `Techn. Ber.'}
+% \changes{1.3}{1995 Aug 2}{Techn. Ber. in braces to preserve case}
+% \changes{1.3a}{1995 Aug 3}{Herausgeber abbreviated as Hg, sing and plural}
+% \changes{1.4}{1995 Oct 25}{Remove \texttt{umlaut} option and \cs{qq},
+% replace with Raichle's trick}
+% \changes{1.5}{1995 Nov 2}{Some bugs removed}
+%
+% \pagestyle{myheadings}
+% \markboth{P. W. Daly}{German Bibliographies}
+%
+% \title{{\bfseries German Language Definition File}\\
+% for master bibliographic style files}
+%
+% \author{Patrick W. Daly}
+%
+% \GetFileInfo{german.mbs}
+% \date{This paper describes file \texttt{\filename},\\
+% version \fileversion{} from \filedate}
+%
+% \maketitle
+%
+% \MakeShortVerb{\|}
+%
+% \parskip=1ex \parindent=0pt
+%
+% \newcommand{\btx}{{\sc Bib}\TeX}
+% \newcommand{\dtx}{\textsf{docstrip}}
+%
+% \section{Introduction}
+% This file is to be used as a language definition file with master
+% bibliographic files. The language it defines is
+% \begin{quote}\bfseries German\end{quote}
+%
+% This is not a self-sufficient \texttt{.mbs} file, but rather may
+% be used together with one that contains language support via
+% external definition files.
+%
+% See the documentation for \texttt{makebst} for formatting details.
+%
+% Some improvements to the translations have been contributed by
+% Sven Hartrumpf of the Universit\"at Koblenz-Landau.
+%
+% Bernd Raichle points out that |\^^b| can be used in place of |\"|
+% within \btx{} code. One can thus replace |M\qq{a}rz| with |M\^^b arz|
+% and do away with the \texttt{umlaut} option.
+%
+% Some bugs have been removed on the advice of Gerd Neugebauer, Universit\"at
+% Koblenz.
+%
+% \section{The Menu Information}
+%
+% All the menu information is nested between \dtx{} guard options
+% |%<*options>| \dots\ |%</options>|, and the last command is
+% |\endoptions|. The rest of the file is nested between |%<*!options&!driver>|
+% \dots\ |%</!options&!driver>| in order to exclude it if \dtx{} is used to
+% extract only the menu information or the documentation driver.
+%
+% \begin{macrocode}
+%<*options>
+\mes{^^JOptions for GERMAN}
+\wr{\spsp\spsp\sep german\pc: German language}
+
+
+\mes{^^JABBREVIATE WORD `SEITEN':}
+\optdef{*}{}{`Seite(n)'}{(no abbreviation)}
+\optdef{a}{pp}{`Seite' abbreviated}{as S.}
+\getans
+
+\mes{^^JABBREVIATE WORD `HERAUSGEBER':}
+\optdef{*}{}{`Herausgeber'}{(no abbreviation)}
+\optdef{a}{ed}{`Herausgeber' abbreviated}{as Hg.}
+\getans
+
+\mes{^^JOTHER ABBREVIATIONS:}
+\optdef{*}{}{No abbreviations}{of Band, Auflage, Kapitel}
+\optdef{a}{abr}{Abbreviations}{of such words}
+\getans
+
+\mes{^^JEDITION NUMBERS:}
+\optdef{*}{}{Write out editions}{as erste, zweite, dritte, etc}
+\optdef{n}{ord}{Numerical editions}{as 1., 2., 3., etc}
+\getans
+
+\mes{^^JALTERNATIVE FOR PHD THESIS:}
+\optdef{*}{ger-phd}{PhD as `Doktorarbeit}{}
+\optdef{d}{}{PhD as `Dissertation'}{}
+\getans
+
+\endoptions
+%</options>
+% \end{macrocode}
+%
+% \StopEventually{\PrintChanges}
+%
+% \section{The Coding}
+% \begin{macrocode}
+%<*!options&!driver>
+
+ % The language selected here is GERMAN
+FUNCTION {bbl.and}
+{ "und"}
+
+FUNCTION {bbl.editors}
+%<!ed>{ "Herausgeber" }
+%<ed>{ "Hg." }
+
+FUNCTION {bbl.editor}
+%<!ed>{ "Herausgeber" }
+%<ed>{ "Hg." }
+
+FUNCTION {bbl.edby}
+{ "herausgegeben von" }
+
+FUNCTION {bbl.edition}
+%<!abr>{ "Auf\/lage" }
+%<abr>{ "Aufl." }
+
+FUNCTION {bbl.volume}
+%<!abr>{ "Band" }
+%<abr>{ "Bd." }
+
+FUNCTION {bbl.of}
+{ "von" }
+
+FUNCTION {bbl.number}
+%<!abr>{ "Nummer" }
+%<abr>{ "Nr." }
+
+FUNCTION {bbl.nr}
+{ "Nr." }
+
+FUNCTION {bbl.in}
+{ "in" }
+
+FUNCTION {bbl.pages}
+%<!pp>{ "Seiten" }
+%<pp>{ "S." }
+
+FUNCTION {bbl.page}
+%<!pp>{ "Seite" }
+%<pp>{ "S." }
+
+FUNCTION {bbl.chapter}
+%<!abr>{ "Kapitel" }
+%<abr>{ "Kap." }
+
+FUNCTION {bbl.techrep}
+%<!abr>{ "{Technischer Bericht}" }
+%<abr>{ "{Techn.\ Ber.}" }
+
+FUNCTION {bbl.mthesis}
+{ "Diplomarbeit" }
+
+FUNCTION {bbl.phdthesis}
+%<ger-phd>{ "Doktorarbeit" }
+%<!ger-phd>{ "Dissertation" }
+
+FUNCTION {bbl.first}
+%<!ord>{ "Erste" }
+%<ord>{ "1." }
+
+FUNCTION {bbl.second}
+%<!ord>{ "Zweite" }
+%<ord>{ "2." }
+
+FUNCTION {bbl.third}
+%<!ord>{ "Dritte" }
+%<ord>{ "3." }
+
+FUNCTION {bbl.fourth}
+%<!ord>{ "Vierte" }
+%<ord>{ "4." }
+
+FUNCTION {bbl.fifth}
+%<!ord>{ "F\^^b{u}nfte" }
+%<ord>{ "5." }
+
+FUNCTION {bbl.th}
+{ "." }
+
+%<*!abr>
+MACRO {jan} {"Januar"}
+
+MACRO {feb} {"Februar"}
+
+MACRO {mar} {"M\^^b{a}rz"}
+
+MACRO {apr} {"April"}
+
+MACRO {may} {"Mai"}
+
+MACRO {jun} {"Juni"}
+
+MACRO {jul} {"Juli"}
+
+MACRO {aug} {"August"}
+
+MACRO {sep} {"September"}
+
+MACRO {oct} {"Oktober"}
+
+MACRO {nov} {"November"}
+
+MACRO {dec} {"Dezember"}
+
+%</!abr>
+%<*abr>
+MACRO {jan} {"Jan."}
+
+MACRO {feb} {"Febr."}
+
+MACRO {mar} {"M\^^b{a}rz"}
+
+MACRO {apr} {"Apr."}
+
+MACRO {may} {"Mai"}
+
+MACRO {jun} {"Juni"}
+
+MACRO {jul} {"Juli"}
+
+MACRO {aug} {"Aug."}
+
+MACRO {sep} {"Sept."}
+
+MACRO {oct} {"Okt."}
+
+MACRO {nov} {"Nov."}
+
+MACRO {dec} {"Dez."}
+
+%</abr>
+%</!options&!driver>
+ % End of language definition file
+
+% \end{macrocode}
+% \Finale
diff --git a/biblio/bibtex/contrib/oxford/lang/italian.mbs b/biblio/bibtex/contrib/oxford/lang/italian.mbs
new file mode 100644
index 0000000000..1081cfa8b2
--- /dev/null
+++ b/biblio/bibtex/contrib/oxford/lang/italian.mbs
@@ -0,0 +1,297 @@
+%\iffalse THIS IS A META COMMENT
+%====================================================================
+% A Language Definition File: ITALIAN
+% to be included with other master bibliography style files
+%--------------------------------------------------------------------
+% (See version and date in the \ProvidesFile command below)
+%--------------------------------------------------------------------
+% This file is self-documenting: simply LaTeX it!
+%====================================================================
+%
+ %-------------------------------------------------------------------
+ % The original source file contains the following version information:
+%\fi
+ % \ProvidesFile{italian.mbs}[1995/07/20 1.0 (GP)]
+%\iffalse
+%-------------------------------------------------------------------
+% NOTICE:
+% This file may be used for non-profit purposes.
+% It may not be distributed in exchange for money,
+% other than distribution costs.
+%
+% The author provides it `as is' and does not guarantee it in any way.
+%
+% Original (and REAL) author:
+%% Copyright (C) 1994, 1995 Patrick W. Daly
+%% Max-Planck-Institut f\"ur Aeronomie
+%% Postfach 20
+%% D-37189 Katlenburg-Lindau
+%% Germany
+%% E-mail: daly@linmpi.mpae.gwdg.de
+%
+% This file hacked by
+% Giovanni Pensa (pensa@dsi.unimi.it)
+% iTeXnici, (Unofficial) Italian TeX User Group
+% http://www.dsi.unimi.it/Users/Students/pensa/tex/uitug.html
+% todo: abbrevs, ordinal (m/f?), edizione/curatori, pag./p.
+%-------------------------------------------------------------------
+%<*a&!a>
+% The following ensures that the driver part is not seen by makebst
+% The driver part must not contain any \end other than \end{document} !
+\ifx\endoptions\undefined\let\tempx=\relax\else
+ \long\def\tempx#1\end#2{}\fi\tempx
+%</a&!a>
+%<*driver>
+ \NeedsTeXFormat{LaTeX2e}%
+ \documentclass[a4paper,10pt,twoside]{article}%
+ \usepackage{doc}%
+ \raggedbottom
+ \CodelineNumbered
+ \RecordChanges
+ % Comment out next line to print coding
+ \OnlyDescription
+ \setlength{\oddsidemargin}{0.5\paperwidth}
+ \addtolength{\oddsidemargin}{-0.5\textwidth}
+ \addtolength{\oddsidemargin}{-1in}
+ \setlength{\evensidemargin}{\oddsidemargin}
+
+\begin{document}
+ \DocInput{italian.mbs}
+\end{document}
+%</driver>
+% END OF META COMMENT \fi
+% \CharacterTable
+% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z
+% Lower-case \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z
+% Digits \0\1\2\3\4\5\6\7\8\9
+% Exclamation \! Double quote \" Hash (number) \#
+% Dollar \$ Percent \% Ampersand \&
+% Acute accent \' Left paren \( Right paren \)
+% Asterisk \* Plus \+ Comma \,
+% Minus \- Point \. Solidus \/
+% Colon \: Semicolon \; Less than \<
+% Equals \= Greater than \> Question mark \?
+% Commercial at \@ Left bracket \[ Backslash \\
+% Right bracket \] Circumflex \^ Underscore \_
+% Grave accent \` Left brace \{ Vertical bar \|
+% Right brace \} Tilde \~}
+%
+% \setcounter{StandardModuleDepth}{1}
+% \setcounter{IndexColumns}{2}
+% \setlength{\IndexMin}{10cm}
+%
+% \changes{0.1}{1995 Sep 20}{Initial version}
+%
+% \pagestyle{myheadings}
+% \markboth{Giovanni Pensa}{Italian Bibliographies}
+%
+% \title{{\bfseries Italian Language Definition File}\\
+% for master bibliographic style files}
+%
+% \author{Patrick W. Daly \and Giovanni Pensa}
+%
+% \GetFileInfo{italian.mbs}
+% \date{This paper describes file \texttt{\filename},\\
+% version \fileversion{} from \filedate}
+%
+% \maketitle
+%
+% \MakeShortVerb{\|}
+%
+% \parskip=1ex \parindent=0pt
+%
+% \newcommand{\btx}{{\sc Bib}\TeX}
+% \newcommand{\dtx}{\textsf{docstrip}}
+%
+% \section{Introduction}
+% This file is to be used as a language definition file with master
+% bibliographic files. The language it defines is
+% \begin{quote}\bfseries Italian\end{quote}
+%
+% This is not a self-sufficient \texttt{.mbs} file, but rather may
+% be used together with one that contains language support via
+% external definition files.
+%
+% See the documentation for \texttt{makebst} for formatting details.
+%
+% \section{The Menu Information}
+%
+% All the menu information is nested between \dtx{} guard options
+% |%<*options>| \dots\ |%</options>|, and the last command is
+% |\endoptions|. The rest of the file is nested between |%<*!options&!driver>|
+% \dots\ |%</!options&!driver>| in order to exclude it if \dtx{} is used to
+% extract only the menu information or the documentation driver.
+%
+% \begin{macrocode}
+%<*options>
+\mes{^^JOptions for ITALIAN}
+\wr{\spsp\spsp\sep italian\pc: Italian language}
+
+\mes{^^JABBREVIATE WORD `PAGINE':}
+\optdef{*}{}{`Pagina/e'}{(no abbreviation)}
+\optdef{a}{pp}{`Pagina' abbreviated}{as pag.}
+\getans
+
+\mes{^^JABBREVIATE WORD `CURATORI':}
+\optdef{*}{}{`Curatore/i'}{(no abbreviation)}
+\optdef{a}{ed}{`Curatore' abbreviated}{as cur.}
+\getans
+
+\mes{^^JOTHER ABBREVIATIONS:}
+\optdef{*}{}{No abbreviations}{of volume, edizione, capitolo, etc}
+\optdef{a}{abr}{Abbreviations}{of such words}
+\getans
+
+\mes{^^JEDITION NUMBERS:}
+\optdef{*}{}{Write out editions}{as prima, seconda, terza, etc}
+\optdef{n}{ord}{Numerical editions}{as 1a, 2a, 3a, etc}
+\getans
+
+\endoptions
+%</options>
+% \end{macrocode}
+%
+% \StopEventually{\PrintChanges}
+%
+% \section{The Coding}
+% \begin{macrocode}
+%<*!options&!driver>
+
+ % The language selected here is ITALIAN
+FUNCTION {bbl.and}
+{ "e" }
+
+FUNCTION {bbl.editors}
+%<!ed>{ "curatori" }
+%<ed>{ "cur." }
+
+FUNCTION {bbl.editor}
+%<!ed>{ "curatore" }
+%<ed>{ "cur." }
+
+FUNCTION {bbl.edby}
+{ "curato da" }
+
+FUNCTION {bbl.edition}
+%<!abr>{ "edizione" }
+%<abr>{ "ed." }
+
+FUNCTION {bbl.volume}
+%<!abr>{ "volume" }
+%<abr>{ "vol." }
+
+FUNCTION {bbl.of}
+{ "di" }
+
+FUNCTION {bbl.number}
+%<!abr>{ "numero" }
+%<abr>{ "no." }
+
+FUNCTION {bbl.nr}
+{ "no." }
+
+FUNCTION {bbl.in}
+{ "in" }
+
+FUNCTION {bbl.pages}
+%<!pp>{ "pagine" }
+%<pp>{ "pp." }
+
+FUNCTION {bbl.page}
+%<!pp>{ "pagina" }
+%<pp>{ "p." }
+
+FUNCTION {bbl.chapter}
+%<!abr>{ "capitolo" }
+%<abr>{ "cap." }
+
+FUNCTION {bbl.techrep}
+%<!abr>{ "Rapporto Tecnico" }
+%<abr>{ "Rap. Tecn." }
+
+FUNCTION {bbl.mthesis}
+{ "Tesi di laurea" }
+
+FUNCTION {bbl.phdthesis}
+{ "Tesi di dottorato" }
+
+FUNCTION {bbl.first}
+%<!ord>{ "Prima" }
+%<ord>{ "1a" }
+
+FUNCTION {bbl.second}
+%<!ord>{ "Seconda" }
+%<ord>{ "2a" }
+
+FUNCTION {bbl.third}
+%<!ord>{ "Terza" }
+%<ord>{ "3a" }
+
+FUNCTION {bbl.fourth}
+%<!ord>{ "Quarta" }
+%<ord>{ "4a" }
+
+FUNCTION {bbl.fifth}
+%<!ord>{ "Quinta" }
+%<ord>{ "5a" }
+
+FUNCTION {bbl.th}
+{ "a" }
+
+%<*!abr>
+MACRO {jan} {"gennaio"}
+
+MACRO {feb} {"febbraio"}
+
+MACRO {mar} {"marzo"}
+
+MACRO {apr} {"aprile"}
+
+MACRO {may} {"maggio"}
+
+MACRO {jun} {"giugno"}
+
+MACRO {jul} {"luglio"}
+
+MACRO {aug} {"agosto"}
+
+MACRO {sep} {"settembre"}
+
+MACRO {oct} {"ottobre"}
+
+MACRO {nov} {"novembre"}
+
+MACRO {dec} {"dicembre"}
+
+%</!abr>
+%<*abr>
+MACRO {jan} {"gen."}
+
+MACRO {feb} {"feb."}
+
+MACRO {mar} {"mar."}
+
+MACRO {apr} {"apr."}
+
+MACRO {may} {"mag"}
+
+MACRO {jun} {"giu."}
+
+MACRO {jul} {"lug."}
+
+MACRO {aug} {"ago."}
+
+MACRO {sep} {"set."}
+
+MACRO {oct} {"ott."}
+
+MACRO {nov} {"nov."}
+
+MACRO {dec} {"dic."}
+
+%</abr>
+%</!options&!driver>
+ % End of language definition file
+
+% \end{macrocode}
+% \Finale
diff --git a/biblio/bibtex/contrib/oxford/lang/norsk.mbs b/biblio/bibtex/contrib/oxford/lang/norsk.mbs
new file mode 100644
index 0000000000..d50cae9366
--- /dev/null
+++ b/biblio/bibtex/contrib/oxford/lang/norsk.mbs
@@ -0,0 +1,299 @@
+%\iffalse THIS IS A META COMMENT
+%====================================================================
+% A Language Definition File: NORWEGIAN
+% to be included with other master bibliography style files
+%--------------------------------------------------------------------
+% (See version and date in the \ProvidesFile command below)
+%--------------------------------------------------------------------
+% This file is self-documenting: simply LaTeX it!
+%====================================================================
+%
+ %-------------------------------------------------------------------
+ % The original source file contains the following version information:
+%\fi
+ % \ProvidesFile{norsk.mbs}[1995/08/07 1.0 (RL/PWD)]
+%\iffalse
+%-------------------------------------------------------------------
+% NOTICE:
+% This file may be used for non-profit purposes.
+% It may not be distributed in exchange for money,
+% other than distribution costs.
+%
+% The author provides it `as is' and does not guarantee it in any way.
+%
+% This file is modelled on english.mbs version 1.1 1995/05/04 by
+% Patrick W. Daly
+%
+ % Copyright (C) 1995, Rolf Lindgren, OPERATOR
+% Universitetes Senter for Informasjonsteknologi
+% Pb 1059 Blindern
+% 0316 OSLO
+%
+% E-mail: rolf.lindgren@usit.uio.no
+ %-------------------------------------------------------------------
+%<*a&!a>
+% The following ensures that the driver part is not seen by makebst
+% The driver part must not contain any \end other than \end{document} !
+\ifx\endoptions\undefined\let\tempx=\relax\else
+ \long\def\tempx#1\end#2{}\fi\tempx
+%</a&!a>
+%<*driver>
+ \NeedsTeXFormat{LaTeX2e}%
+ \documentclass[a4paper,10pt,twoside]{article}%
+ \usepackage{doc}%
+ \raggedbottom
+ \CodelineNumbered
+ \RecordChanges
+ % Comment out next line to print coding
+ \OnlyDescription
+ \setlength{\oddsidemargin}{0.5\paperwidth}
+ \addtolength{\oddsidemargin}{-0.5\textwidth}
+ \addtolength{\oddsidemargin}{-1in}
+ \setlength{\evensidemargin}{\oddsidemargin}
+
+\begin{document}
+ \DocInput{norsk.mbs}
+\end{document}
+%</driver>
+% END OF META COMMENT \fi
+% \CharacterTable
+% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z
+% Lower-case \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z
+% Digits \0\1\2\3\4\5\6\7\8\9
+% Exclamation \! Double quote \" Hash (number) \#
+% Dollar \$ Percent \% Ampersand \&
+% Acute accent \' Left paren \( Right paren \)
+% Asterisk \* Plus \+ Comma \,
+% Minus \- Point \. Solidus \/
+% Colon \: Semicolon \; Less than \<
+% Equals \= Greater than \> Question mark \?
+% Commercial at \@ Left bracket \[ Backslash \\
+% Right bracket \] Circumflex \^ Underscore \_
+% Grave accent \` Left brace \{ Vertical bar \|
+% Right brace \} Tilde \~}
+%
+% \setcounter{StandardModuleDepth}{1}
+% \setcounter{IndexColumns}{2}
+% \setlength{\IndexMin}{10cm}
+%
+% \markboth{Rolf Lindgren}{Norwegian bibliographies}
+%
+% \title{{\bfseries Norwegian Language Definition File}\\
+% for master bibliographic style files}
+%
+% \author{Rolf Lindgren}
+%
+% \GetFileInfo{norsk.mbs}
+% \date{This paper describes file \texttt{\filename},\\
+% version \fileversion{} from \filedate}
+%
+% \maketitle
+%
+% \MakeShortVerb{\|}
+%
+% \parskip=1ex \parindent=0pt
+%
+% \newcommand{\btx}{{\sc Bib}\TeX}
+% \newcommand{\dtx}{\textsf{docstrip}}
+%
+% \section{Introduction}
+% This file is to be used as a language definition file with master
+% bibliographic files. The language it defines is
+% \begin{quote}\bfseries Norsk\end{quote}
+%
+% This is not a self-sufficient \texttt{.mbs} file, but rather may
+% be used together with one that contains language support via
+% external definition files.
+%
+% See the documentation for \texttt{makebst} for formatting details.
+%
+% \section{The Menu Information}
+%
+% All the menu information is nested between \dtx{} guard options
+% |%<*options>| \dots\ |%</options>|, and the last command is
+% |\endoptions|. The rest of the file is nested between |%<*!options&!driver>|
+% \dots\ |%</!options&!driver>| in order to exclude it if \dtx{} is used to
+% extract only the menu information or the documentation driver.
+%
+% \begin{macrocode}
+%<*options>
+\mes{^^JOptions for NORSK}
+\wr{\spsp\spsp\sep norsk\pc: Norwegian language}
+
+\mes{^^JABBREVIATE WORD `PAGES':}
+\optdef{*}{}{`Sider(r)'}{(no abbreviation)}
+\optdef{a}{pp}{`Side' abbreviated}{as s. or ss.}
+\getans
+
+\mes{^^JABBREVIATE WORD `EDITORS':}
+\optdef{*}{}{`Redakt{\string\o}r(er)'}{(no abbreviation)}
+\optdef{a}{ed}{`Redakt{\string\o}r' abbreviated}{as red.}
+\getans
+
+\mes{^^JOTHER ABBREVIATIONS:}
+\optdef{*}{}{No abbreviations}{of bind, utgave, kapitel, osv.}
+\optdef{a}{abr}{Abbreviations}{of such words}
+\getans
+
+\mes{^^JEDITION NUMBERS:}
+\optdef{*}{}{Write out editions}{as f{string\o}rste, annen, tredje, osv}
+\optdef{n}{ord}{Numerical editions}{as 1., 2., 3., osv}
+\getans
+
+\endoptions
+%</options>
+% \end{macrocode}
+%
+% \StopEventually{\PrintChanges}
+%
+% \section{The Coding}
+% \begin{macrocode}
+%<*!options&!driver>
+
+ % The language selected here is NORSK
+
+FUNCTION {bbl.and}
+{ "og"}
+
+FUNCTION {bbl.editors}
+%<!ed>{ "redakt{\o}rer" }
+%<ed>{ "red." }
+
+FUNCTION {bbl.editor}
+%<!ed>{ "redakt{\o}r" }
+%<ed>{ "red." }
+
+FUNCTION {bbl.edby}
+{ "redigert av" }
+
+FUNCTION {bbl.edition}
+%<!abr>{ "utgave" }
+%<abr>{ "utg." }
+
+FUNCTION {bbl.volume}
+%<!abr>{ "bind" }
+%<abr>{ "bd." }
+
+FUNCTION {bbl.of}
+{ "av" }
+
+FUNCTION {bbl.number}
+%<!abr>{ "nummer" }
+%<abr>{ "nr." }
+
+FUNCTION {bbl.nr}
+{ "nr." }
+
+FUNCTION {bbl.in}
+{ "i" }
+
+FUNCTION {bbl.pages}
+%<!pp>{ "sider" }
+%<pp>{ "ss." }
+
+FUNCTION {bbl.page}
+%<!pp>{ "side" }
+%<pp>{ "s." }
+
+FUNCTION {bbl.chapter}
+%<!abr>{ "kapitel" }
+%<abr>{ "kap." }
+
+FUNCTION {bbl.techrep}
+%<!abr>{ "Teknisk rapport" }
+%<abr>{ "Tekn. rap." }
+
+FUNCTION {bbl.mthesis}
+{ "Hovedoppgave" }
+
+FUNCTION {bbl.phdthesis}
+{ "Doktorgradsavhandling" }
+
+FUNCTION {bbl.first}
+%<!ord>{ "F{\o}rste" }
+%<ord>{ "1." }
+
+FUNCTION {bbl.second}
+%<!ord>{ "Annen" }
+%<ord>{ "2." }
+
+FUNCTION {bbl.third}
+%<!ord>{ "Tredje" }
+%<ord>{ "3." }
+
+FUNCTION {bbl.fourth}
+%<!ord>{ "Fjerde" }
+%<ord>{ "4." }
+
+FUNCTION {bbl.fifth}
+%<!ord>{ "Femte" }
+%<ord>{ "5." }
+
+FUNCTION {bbl.th}
+{ "." }
+
+% \end{macrocode}
+% This function adds English endings for ordinals 1, 2, 3. However, if
+% the second last digit is 1, then the ending is `th' for all last digits.
+% So far, all other languages included do not have this problem, and it is
+% sufficient to add the \textsl{th} equivalent. This might change with further
+% languages.
+%
+% \begin{macrocode}
+%<*!abr>
+MACRO {jan} {"Januar"}
+
+MACRO {feb} {"Februar"}
+
+MACRO {mar} {"Mars"}
+
+MACRO {apr} {"April"}
+
+MACRO {may} {"Mai"}
+
+MACRO {jun} {"Juni"}
+
+MACRO {jul} {"Juli"}
+
+MACRO {aug} {"August"}
+
+MACRO {sep} {"September"}
+
+MACRO {oct} {"Oktober"}
+
+MACRO {nov} {"November"}
+
+MACRO {dec} {"Desember"}
+
+%</!abr>
+%<*abr>
+MACRO {jan} {"Jan."}
+
+MACRO {feb} {"Feb."}
+
+MACRO {mar} {"Mar."}
+
+MACRO {apr} {"Apr."}
+
+MACRO {may} {"Mai"}
+
+MACRO {jun} {"Jun."}
+
+MACRO {jul} {"Jul."}
+
+MACRO {aug} {"Aug."}
+
+MACRO {sep} {"Sep."}
+
+MACRO {oct} {"Oct."}
+
+MACRO {nov} {"Nov."}
+
+MACRO {dec} {"Des."}
+
+%</abr>
+%</!options&!driver>
+ % End of language definition file
+
+% \end{macrocode}
+% \Finale
diff --git a/biblio/bibtex/contrib/oxford/lang/spanish.mbs b/biblio/bibtex/contrib/oxford/lang/spanish.mbs
new file mode 100644
index 0000000000..4d7b9dd132
--- /dev/null
+++ b/biblio/bibtex/contrib/oxford/lang/spanish.mbs
@@ -0,0 +1,301 @@
+%\iffalse THIS IS A META COMMENT
+%====================================================================
+% A Language Definition File: SPANISH
+% to be included with other master bibliography style files
+%--------------------------------------------------------------------
+% (See version and date in the \ProvidesFile command below)
+%--------------------------------------------------------------------
+% This file is self-documenting: simply LaTeX it!
+%====================================================================
+%
+%\fi
+ %-------------------------------------------------------------------
+ % The original source file contains the following version information:
+ % \ProvidesFile{spanish.mbs}[1995/06/01 1.0 (PWD/TB)]
+%\iffalse
+%-------------------------------------------------------------------
+% NOTICE:
+% This file may be used for non-profit purposes.
+% It may not be distributed in exchange for money,
+% other than distribution costs.
+%
+% The author provides it `as is' and does not guarantee it in any way.
+%
+ % Copyright (C) 1994, 1995 Patrick W. Daly
+% Max-Planck-Institut f\"ur Aeronomie
+% Postfach 20
+% D-37189 Katlenburg-Lindau
+% Germany
+%
+% E-mail: daly@linmpi.mpae.gwdg.de
+%
+ % Copyright (C) 1995 Tom\'as Bautista
+% Divisi\'on de CAD del Centro de Microelectr\'onica Aplicada
+% Campus Universitario de Tafira, pab.\ A
+% E-35017 Las Palmas de Gran Canaria
+% Canary Islands
+%
+% E-mail: bautista@cma.ulpgc.es
+
+
+ %-------------------------------------------------------------------
+%<*a&!a>
+% The following ensures that the driver part is not seen by makebst
+% The driver part must not contain any \end other than \end{document} !
+\ifx\endoptions\undefined\let\tempx=\relax\else
+ \long\def\tempx#1\end#2{}\fi\tempx
+%</a&!a>
+%<*driver>
+ \NeedsTeXFormat{LaTeX2e}%
+ \documentclass[a4paper,10pt,twoside]{article}%
+ \usepackage{doc}%
+ \raggedbottom
+ \CodelineNumbered
+ \RecordChanges
+ % Comment out next line to print coding
+ \OnlyDescription
+ \setlength{\oddsidemargin}{0.5\paperwidth}
+ \addtolength{\oddsidemargin}{-0.5\textwidth}
+ \addtolength{\oddsidemargin}{-1in}
+ \setlength{\evensidemargin}{\oddsidemargin}
+
+\begin{document}
+ \DocInput{spanish.mbs}
+\end{document}
+%</driver>
+% END OF META COMMENT \fi
+% \CharacterTable
+% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z
+% Lower-case \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z
+% Digits \0\1\2\3\4\5\6\7\8\9
+% Exclamation \! Double quote \" Hash (number) \#
+% Dollar \$ Percent \% Ampersand \&
+% Acute accent \' Left paren \( Right paren \)
+% Asterisk \* Plus \+ Comma \,
+% Minus \- Point \. Solidus \/
+% Colon \: Semicolon \; Less than \<
+% Equals \= Greater than \> Question mark \?
+% Commercial at \@ Left bracket \[ Backslash \\
+% Right bracket \] Circumflex \^ Underscore \_
+% Grave accent \` Left brace \{ Vertical bar \|
+% Right brace \} Tilde \~}
+%
+% \setcounter{StandardModuleDepth}{1}
+% \setcounter{IndexColumns}{2}
+% \setlength{\IndexMin}{10cm}
+%
+% \changes{1.0}{1995 June 01}{Initial version}
+%
+% \pagestyle{myheadings}
+% \markboth{T. Bautista}{Spanish Bibliographies}
+%
+% \title{{\bfseries Spanish Language Definition File}\\
+% for master bibliographic style files}
+%
+% \author{Tom\'as Bautista}
+%
+% \GetFileInfo{spanish.mbs}
+% \date{This paper describes file \texttt{\filename},\\
+% version \fileversion{} from \filedate}
+%
+% \maketitle
+%
+% \MakeShortVerb{\|}
+%
+% \parskip=1ex \parindent=0pt
+%
+% \newcommand{\btx}{{\sc Bib}\TeX}
+% \newcommand{\dtx}{\textsf{docstrip}}
+%
+% \section{Introduction}
+% This file is to be used as a language definition file with master
+% bibliographic files. The language it defines is
+% \begin{quote}\bfseries Spanish\end{quote}
+%
+% This is not a self-sufficient \texttt{.mbs} file, but rather may
+% be used together with one that contains language support via
+% external definition files.
+%
+% See the documentation for \texttt{makebst} for formatting details.
+%
+% \section{The Menu Information}
+%
+% All the menu information is nested between \dtx{} guard options
+% |%<*options>| \dots\ |%</options>|, and the last command is
+% |\endoptions|. The rest of the file is nested between |%<*!options&!driver>|
+% \dots\ |%</!options&!driver>| in order to exclude it if \dtx{} is used to
+% extract only the menu information or the documentation driver.
+%
+% \begin{macrocode}
+%<*options>
+\mes{^^JOptions for SPANISH}
+\wr{\spsp\spsp\sep spanish\pc: Spanish language}
+
+
+\mes{^^JABBREVIATE WORD `PAGINAS':}
+\optdef{*}{}{`P'agina(s)'}{(no abbreviation)}
+\optdef{a}{pp}{`P'agina' abbreviated}{as p'ag.}
+\getans
+
+\mes{^^JABBREVIATE WORD `EDITOR':}
+\optdef{*}{}{`Editor(es)'}{(no abbreviation)}
+\optdef{a}{ed}{`Editor' abbreviated}{as Ed.}
+\getans
+
+\mes{^^JOTHER ABBREVIATIONS:}
+\optdef{*}{}{No abbreviations}{of Tomo, \string Edici'on, \string Cap'itulo}
+\optdef{a}{abr}{Abbreviations}{of such words}
+\getans
+
+\mes{^^JEDITION NUMBERS:}
+\optdef{*}{}{Write out editions}{as primera, segunda, tercera, etc}
+\optdef{n}{ord}{Numerical editions}{as 1a, 2a, 3a, etc}
+\getans
+
+\endoptions
+%</options>
+% \end{macrocode}
+%
+% \StopEventually{\PrintChanges}
+%
+% \section{The Coding}
+% \begin{macrocode}
+%<*!options&!driver>
+
+ % The language selected here is SPANISH
+FUNCTION {bbl.and}
+{ "y"}
+
+FUNCTION {bbl.editors}
+%<!ed>{ "editores" }
+%<ed>{ "eds." }
+
+FUNCTION {bbl.editor}
+%<!ed>{ "editor" }
+%<ed>{ "ed." }
+
+FUNCTION {bbl.edby}
+{ "editado por" }
+
+FUNCTION {bbl.edition}
+%<!abr>{ "edici\'on" }
+%<abr>{ "ed\raise1ex\hbox{\underbar{\scriptsize \'on}}." }
+
+FUNCTION {bbl.volume}
+{ "tomo" }
+
+FUNCTION {bbl.of}
+{ "de" }
+
+FUNCTION {bbl.number}
+%<!abr>{ "n\'umero" }
+%<abr>{ "n\raise1ex\hbox{\underbar{\scriptsize o}}" }
+
+FUNCTION {bbl.nr}
+{ "n\raise1ex\hbox{\underbar{\scriptsize o}}" }
+
+FUNCTION {bbl.in}
+{ "en" }
+
+FUNCTION {bbl.pages}
+%<!pp>{ "p\'aginas" }
+%<pp>{ "p\'ags." }
+
+FUNCTION {bbl.page}
+%<!pp>{ "p\'agina" }
+%<pp>{ "p\'ag." }
+
+FUNCTION {bbl.chapter}
+%<!abr>{ "cap\'{\i}tulo" }
+%<abr>{ "cap." }
+
+FUNCTION {bbl.techrep}
+%<!abr>{ "Informe T\'ecnico" }
+%<abr>{ "Inf.\ T\'ec." }
+
+FUNCTION {bbl.mthesis}
+{ "Proyecto Fin de Carrera" }
+
+FUNCTION {bbl.phdthesis}
+{ "Tesis Doctoral" }
+
+FUNCTION {bbl.first}
+%<!ord>{ "primera" }
+%<ord>{ "1\raise1ex\hbox{\underbar{\scriptsize a}}" }
+
+FUNCTION {bbl.second}
+%<!ord>{ "segunda" }
+%<ord>{ "2\raise1ex\hbox{\underbar{\scriptsize a}}" }
+
+FUNCTION {bbl.third}
+%<!ord>{ "tercera" }
+%<ord>{ "3\raise1ex\hbox{\underbar{\scriptsize a}}" }
+
+FUNCTION {bbl.fourth}
+%<!ord>{ "cuarta" }
+%<ord>{ "4\raise1ex\hbox{\underbar{\scriptsize a}}" }
+
+FUNCTION {bbl.fifth}
+%<!ord>{ "quinta" }
+%<ord>{ "5\raise1ex\hbox{\underbar{\scriptsize a}}" }
+
+FUNCTION {bbl.th}
+{ "\raise1ex\hbox{\underbar{\scriptsize a}}" }
+
+%<*!abr>
+MACRO {jan} {"enero"}
+
+MACRO {feb} {"febrero"}
+
+MACRO {mar} {"marzo"}
+
+MACRO {apr} {"abril"}
+
+MACRO {may} {"mayo"}
+
+MACRO {jun} {"junio"}
+
+MACRO {jul} {"julio"}
+
+MACRO {aug} {"agosto"}
+
+MACRO {sep} {"septiembre"}
+
+MACRO {oct} {"octubre"}
+
+MACRO {nov} {"noviembre"}
+
+MACRO {dec} {"diciembre"}
+
+%</!abr>
+%<*abr>
+MACRO {jan} {"ene."}
+
+MACRO {feb} {"feb."}
+
+MACRO {mar} {"mar."}
+
+MACRO {apr} {"abr."}
+
+MACRO {may} {"mayo"}
+
+MACRO {jun} {"jun."}
+
+MACRO {jul} {"jul."}
+
+MACRO {aug} {"ago."}
+
+MACRO {sep} {"sep."}
+
+MACRO {oct} {"oct."}
+
+MACRO {nov} {"nov."}
+
+MACRO {dec} {"dic."}
+
+%</abr>
+%</!options&!driver>
+ % End of language definition file
+
+% \end{macrocode}
+% \Finale
diff --git a/biblio/bibtex/contrib/oxford/lang/svenska.mbs b/biblio/bibtex/contrib/oxford/lang/svenska.mbs
new file mode 100644
index 0000000000..05684c199c
--- /dev/null
+++ b/biblio/bibtex/contrib/oxford/lang/svenska.mbs
@@ -0,0 +1,297 @@
+%\iffalse THIS IS A META COMMENT
+%====================================================================
+% A Language Definition File: SWEDISH
+% to be included with other master bibliography style files
+%--------------------------------------------------------------------
+% (See version and date in the \ProvidesFile command below)
+%--------------------------------------------------------------------
+% This file is self-documenting: simply LaTeX it!
+%====================================================================
+%
+ %-------------------------------------------------------------------
+ % The original source file contains the following version information:
+%\fi
+ % \ProvidesFile{svenska.mbs}[1995/08/07 1.0 (RL/PWD)]
+%\iffalse
+%-------------------------------------------------------------------
+% NOTICE:
+% This file may be used for non-profit purposes.
+% It may not be distributed in exchange for money,
+% other than distribution costs.
+%
+% The author provides it `as is' and does not guarantee it in any way.
+%
+% This file is modelled on english.mbs version 1.1 1995/05/04 by
+% Patrick W. Daly
+%
+ % Copyright (C) 1997, Peter Antman
+% Forskningsassistent Centrum fr vlfrdsforskning
+%
+% E-mail: peter.antman@abc.se
+ %-------------------------------------------------------------------
+%<*a&!a>
+% The following ensures that the driver part is not seen by makebst
+% The driver part must not contain any \end other than \end{document} !
+\ifx\endoptions\undefined\let\tempx=\relax\else
+ \long\def\tempx#1\end#2{}\fi\tempx
+%</a&!a>
+%<*driver>
+ \NeedsTeXFormat{LaTeX2e}%
+ \documentclass[a4paper,10pt,twoside]{article}%
+ \usepackage{doc}%
+ \raggedbottom
+ \CodelineNumbered
+ \RecordChanges
+ % Comment out next line to print coding
+ \OnlyDescription
+ \setlength{\oddsidemargin}{0.5\paperwidth}
+ \addtolength{\oddsidemargin}{-0.5\textwidth}
+ \addtolength{\oddsidemargin}{-1in}
+ \setlength{\evensidemargin}{\oddsidemargin}
+
+\begin{document}
+ \DocInput{svenska.mbs}
+\end{document}
+%</driver>
+% END OF META COMMENT \fi
+% \CharacterTable
+% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z
+% Lower-case \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z
+% Digits \0\1\2\3\4\5\6\7\8\9
+% Exclamation \! Double quote \" Hash (number) \#
+% Dollar \$ Percent \% Ampersand \&
+% Acute accent \' Left paren \( Right paren \)
+% Asterisk \* Plus \+ Comma \,
+% Minus \- Point \. Solidus \/
+% Colon \: Semicolon \; Less than \<
+% Equals \= Greater than \> Question mark \?
+% Commercial at \@ Left bracket \[ Backslash \\
+% Right bracket \] Circumflex \^ Underscore \_
+% Grave accent \` Left brace \{ Vertical bar \|
+% Right brace \} Tilde \~}
+%
+% \setcounter{StandardModuleDepth}{1}
+% \setcounter{IndexColumns}{2}
+% \setlength{\IndexMin}{10cm}
+%
+% \markboth{Peter Antman}{Swedish bibliographies}
+%
+% \title{{\bfseries Swedish Language Definition File}\\
+% for master bibliographic style files}
+%
+% \author{Peter Antman}
+%
+% \GetFileInfo{svenska.mbs}
+% \date{This paper describes file \texttt{\filename},\\
+% version \fileversion{} from \filedate}
+%
+% \maketitle
+%
+% \MakeShortVerb{\|}
+%
+% \parskip=1ex \parindent=0pt
+%
+% \newcommand{\btx}{{\sc Bib}\TeX}
+% \newcommand{\dtx}{\textsf{docstrip}}
+%
+% \section{Introduction}
+% This file is to be used as a language definition file with master
+% bibliographic files. The language it defines is
+% \begin{quote}\bfseries Svenska\end{quote}
+%
+% This is not a self-sufficient \texttt{.mbs} file, but rather may
+% be used together with one that contains language support via
+% external definition files.
+%
+% See the documentation for \texttt{makebst} for formatting details.
+%
+% \section{The Menu Information}
+%
+% All the menu information is nested between \dtx{} guard options
+% |%<*options>| \dots\ |%</options>|, and the last command is
+% |\endoptions|. The rest of the file is nested between |%<*!options&!driver>|
+% \dots\ |%</!options&!driver>| in order to exclude it if \dtx{} is used to
+% extract only the menu information or the documentation driver.
+%
+% \begin{macrocode}
+%<*options>
+\mes{^^JOptions for SVENSKA}
+\wr{\spsp\spsp\sep svenska\pc: SWEDISH language}
+
+\mes{^^JABBREVIATE WORD `PAGES':}
+\optdef{*}{}{`Sidor(r)'}{(no abbreviation)}
+\optdef{a}{pp}{`Sida' abbreviated}{as s. or ss.}
+\getans
+
+\mes{^^JABBREVIATE WORD `EDITORS':}
+\optdef{*}{}{`Redaktr(er)'}{(no abbreviation)}
+\optdef{a}{ed}{`Redaktr' abbreviated}{as red.}
+\getans
+
+\mes{^^JOTHER ABBREVIATIONS:}
+\optdef{*}{}{No abbreviations}{of volym, utgva, kapitel, osv.}
+\optdef{a}{abr}{Abbreviations}{of such words}
+\getans
+
+\mes{^^JEDITION NUMBERS:}
+\optdef{*}{}{Write out editions}{as frsta, andra, tredje, osv}
+\optdef{n}{ord}{Numerical editions}{as 1., 2., 3., osv}
+\getans
+
+\endoptions
+%</options>
+% \end{macrocode}
+%
+% \StopEventually{\PrintChanges}
+%
+% \section{The Coding}
+% \begin{macrocode}
+%<*!options&!driver>
+
+ % The language selected here is SVENSKA
+
+FUNCTION {bbl.and}
+{ "och"}
+
+FUNCTION {bbl.editors}
+%<!ed>{ "redaktrer" }
+%<ed>{ "red." }
+
+FUNCTION {bbl.editor}
+%<!ed>{ "redaktr" }
+%<ed>{ "red." }
+
+FUNCTION {bbl.edby}
+{ "redigerad av" }
+
+FUNCTION {bbl.edition}
+%<!abr>{ "utgva" }
+%<abr>{ "utg." }
+
+FUNCTION {bbl.volume}
+%<!abr>{ "volym" }
+%<abr>{ "vol." }
+
+FUNCTION {bbl.of}
+{ "av" }
+
+FUNCTION {bbl.number}
+%<!abr>{ "nummer" }
+%<abr>{ "nr." }
+
+FUNCTION {bbl.nr}
+{ "nr." }
+
+FUNCTION {bbl.in}
+{ "i" }
+
+FUNCTION {bbl.pages}
+%<!pp>{ "sidor" }
+%<pp>{ "ss." }
+
+FUNCTION {bbl.page}
+%<!pp>{ "sida" }
+%<pp>{ "s." }
+
+FUNCTION {bbl.chapter}
+%<!abr>{ "kapitel" }
+%<abr>{ "kap." }
+
+FUNCTION {bbl.techrep}
+%<!abr>{ "Teknisk rapport" }
+%<abr>{ "Tekn. rap." }
+
+FUNCTION {bbl.mthesis}
+{ "Licenciatavgandling" }
+
+FUNCTION {bbl.phdthesis}
+{ "Doktorgradsavhandling" }
+
+FUNCTION {bbl.first}
+%<!ord>{ "Frsta" }
+%<ord>{ "1." }
+
+FUNCTION {bbl.second}
+%<!ord>{ "Andra" }
+%<ord>{ "2." }
+
+FUNCTION {bbl.third}
+%<!ord>{ "Tredje" }
+%<ord>{ "3." }
+
+FUNCTION {bbl.fourth}
+%<!ord>{ "Fjrde" }
+%<ord>{ "4." }
+
+FUNCTION {bbl.fifth}
+%<!ord>{ "Femte" }
+%<ord>{ "5." }
+
+FUNCTION {bbl.th}
+{ "." }
+
+% \end{macrocode}
+% This function adds English endings for ordinals 1, 2, 3. However, if
+% the second last digit is 1, then the ending is `th' for all last digits.
+% So far, all other languages included do not have this problem, and it is
+% sufficient to add the \textsl{th} equivalent. This might change with further
+% languages.
+%
+% \begin{macrocode}
+%<*!abr>
+MACRO {jan} {"Januari"}
+
+MACRO {feb} {"Februari"}
+
+MACRO {mar} {"Mars"}
+
+MACRO {apr} {"April"}
+
+MACRO {may} {"Maj"}
+
+MACRO {jun} {"Juni"}
+
+MACRO {jul} {"Juli"}
+
+MACRO {aug} {"Augusti"}
+
+MACRO {sep} {"September"}
+
+MACRO {oct} {"Oktober"}
+
+MACRO {nov} {"November"}
+
+MACRO {dec} {"December"}
+
+%</!abr>
+%<*abr>
+MACRO {jan} {"Jan."}
+
+MACRO {feb} {"Feb."}
+
+MACRO {mar} {"Mar."}
+
+MACRO {apr} {"Apr."}
+
+MACRO {may} {"Maj"}
+
+MACRO {jun} {"Jun."}
+
+MACRO {jul} {"Jul."}
+
+MACRO {aug} {"Aug."}
+
+MACRO {sep} {"Sep."}
+
+MACRO {oct} {"Oct."}
+
+MACRO {nov} {"Nov."}
+
+MACRO {dec} {"Dec."}
+
+%</abr>
+%</!options&!driver>
+ % End of language definition file
+
+% \end{macrocode}
+% \Finale
diff --git a/biblio/bibtex/contrib/oxford/oxford.sty b/biblio/bibtex/contrib/oxford/oxford.sty
new file mode 100644
index 0000000000..2df98cd845
--- /dev/null
+++ b/biblio/bibtex/contrib/oxford/oxford.sty
@@ -0,0 +1,303 @@
+%% oxford.sty - oxford bibliography style Version 0.1
+%% Author: Peter Antman peter.antman@abc.se
+%% Changes Copyright: Peter Antman, 1997
+%%
+%% Based on:
+%% harvard.sty - harvard bibliography style Version 2.0.5
+%% Author: Peter Williams peterw@archsci.arch.su.edu.au
+%% Copyright: Peter Williams 1994
+%%
+%% This is the oxford style support. It has to be run together
+%% whith style oxford_xx.bbs, where xx stands for the language code
+%% (se acompanying README). A new entry in the bib-file is supported
+%% in the stylefile, namely stitle. This is a short title to be
+%% used in the abbr citations, when a title is nedded.
+%%
+%% Currrently is only the \cite command supported, and only in
+%% abbrevation mode. You should not use parathesis mode.
+%% the best is to use this command in the tex-file:
+%% \usepackage[default, none]{oxford}
+%% and as bibcommand:
+%% \bibliographystyle{oxford_xx}
+\NeedsTeXFormat{LaTeX2e}
+\ProvidesPackage{oxford}
+\RequirePackage{ifthen}
+\IfFileExists{html.sty}{\RequirePackage{html}
+\newcommand{\harvardurl}[1]{\htmladdnormallink*{\textbf{URL:} \textit{##1}}{##1}}
+}{
+\newcommand{\harvardurl}[1]{\textbf{URL:} \textit{##1}}
+}
+\DeclareOption{full}{\citationmode{full}}
+\DeclareOption{abbr}{\citationmode{abbr}}
+\DeclareOption{default}{\citationmode{default}}
+\DeclareOption{agsmcite}{\citationstyle{agsm}}
+\DeclareOption{dcucite}{\citationstyle{dcu}}
+\DeclareOption{round}{\harvardparenthesis{round}\harvardyearparenthesis{round}}
+\DeclareOption{curly}{\harvardparenthesis{curly}\harvardyearparenthesis{curly}}
+\DeclareOption{angle}{\harvardparenthesis{angle}\harvardyearparenthesis{angle}}
+\DeclareOption{square}{\harvardparenthesis{square}\harvardyearparenthesis{square}}
+\DeclareOption{none}{\harvardparenthesis{none}\harvardyearparenthesis{none}}
+\DeclareOption*{
+ \global\edef\HAR@tmp{\CurrentOption}
+%% Berwin A. Turlach <berwin@alphasun.anu.edu.au>
+ \AtEndDocument{\bibliographystyle{\HAR@tmp}}
+}
+
+%% Kristoffer H. Rose <kris@diku.dk> 1995/03/01:
+%% do not expand macros in citations: put definitions on .aux file instead.
+{\catcode`\:=12 \catcode`\-=12 \catcode`\>=12 \catcode`\<=12 %
+ \gdef\codeof#1{\expandafter\codeof@\meaning#1<-:}%
+ \gdef\codeof@#1:->#2<-:{#2}}
+
+\def\harvardpreambletext{\catcode`\#=12 \harvardpreambletext@}
+\def\harvardpreambletext@#1{\def\next{#1}\catcode`\#=6 %
+ \immediate\write\@auxout{\string\harvardpreambledefs{%
+ \string\AtBeginDocument{\codeof\next}}}}
+
+\def\harvardpreambledefs#1{#1\gdef\harvardpreambledefs##1{}}
+
+\newcommand{\harvarditem}[4][\null]{\item[]%
+\if@filesw{ \def\protect##1{\string ##1\space}%
+\ifthenelse{\equal{#1}{\null}}
+ {\def\next{{#4}{#2}{#2}{#3}}}
+ {\def\next{{#4}{#2}{#1}{#3}}}
+\immediate\write\@auxout{\string\harvardcite\codeof\next}%
+}\fi%
+\protect\hspace*{-\labelwidth}\protect\hspace*{-\labelsep}\ignorespaces%
+}
+
+\newcommand{\harvardcite}[4]{
+ \global\@namedef{HAR@fn@#1}{#2}
+ \global\@namedef{HAR@an@#1}{#3}
+ \global\@namedef{HAR@yr@#1}{#4}
+ \global\@namedef{HAR@df@#1}{\csname HAR@fn@#1\endcsname}
+}
+
+\newcommand{\citationmode}[1]{
+ \renewcommand{\HAR@citemode}{\csname HAR@cite@#1\endcsname}
+}
+
+\newcommand{\HAR@cite@full}{HAR@fn@}
+\newcommand{\HAR@cite@abbr}{HAR@an@}
+\newcommand{\HAR@cite@default}{HAR@df@}
+\newcommand{\HAR@citemode}{\HAR@cite@default}
+
+\newcommand{\HAR@citetoaux}[1]{%
+ \if@filesw\immediate\write\@auxout{\string\citation{#1}}\fi%
+}
+
+\newcommand{\HAR@checkdef}[2]{\@ifundefined{HAR@df@#1}%
+ {\textbf{?}\@warning{Citation '#1' on page \thepage \space undefined}}%
+ {#2}%
+}
+
+% By Peter Antman, 1997, command changed, year excluded and
+% the blank sep betweb author and year removed
+\newcommand{\HAR@dolist}[2]{\def\@citea{\null}\@for\@citeb:=#1\do%
+{\@citea\def\@citea{\HAR@hisep\penalty\@m\ }\HAR@checkdef{\@citeb}%
+%{#2{@citeb} %
+{#2{\@citeb}\HAR@hysep\penalty\@m%
+%\HAR@year{\@citeb}\HAR@setd{\@citeb}}}%
+\HAR@setd{\@citeb}}}%
+}
+
+% added by Peter Antman to support ibid.
+\global\@namedef{HAR@lastname}{}
+
+\def\@enamedef#1{\expandafter\def\csname #1\expandafter\endcsname\expandafter}
+\newcommand{\HAR@name}[1]{\csname \HAR@citemode#1\endcsname}
+\newcommand{\HAR@fname}[1]{\csname HAR@fn@#1\endcsname}
+\newcommand{\HAR@aname}[1]{\csname HAR@an@#1\endcsname}
+\newcommand{\HAR@year}[1]{\csname HAR@yr@#1\endcsname}
+\newcommand{\HAR@setd}[1]{%
+\global\@enamedef{HAR@df@#1}{\csname HAR@an@#1\endcsname}%
+% added by Peter Antman
+\global\@enamedef{HAR@lastname}{#1}%
+}
+
+%% Berwin A. Turlach <berwin@alphasun.anu.edu.au>
+\global\@namedef{HAR@df@*}{\csname HAR@fn@*\endcsname}
+\renewcommand{\nocite}[1]{\HAR@citetoaux{#1}%
+\@for\@citeb:=#1\do%
+{\HAR@checkdef{\@citeb}{}}}%
+
+\renewcommand{\cite}{\@ifstar{\@ifstar{\HAR@acite}{\HAR@fcite}}{\HAR@dcite}}
+
+% dcite is changed to generate citations conforming to the oxford style
+% this is currently the only working oxford cite-style.
+\newcommand{\HAR@dcite}[2][\null]{\HAR@citetoaux{#2}%
+\ifthenelse{\equal{#2}{\HAR@lastname}}%
+{\HAR@ibid\HAR@hisep\penalty\@m\, #1}%
+{\harvardleft\HAR@dolist{#2}{\HAR@name}\ifthenelse{\equal{#1}{\null}}%
+ {}{, #1}\harvardright}%
+}
+
+\newcommand{\HAR@acite}[2][\null]{\HAR@citetoaux{#2}%
+{\harvardleft\HAR@dolist{#2}{\HAR@aname}\ifthenelse{\equal{#1}{\null}}%
+ {}{, #1}\harvardright}%
+}
+
+\newcommand{\HAR@fcite}[2][\null]{\HAR@citetoaux{#2}%
+{\harvardleft\HAR@dolist{#2}{\HAR@fname}\ifthenelse{\equal{#1}{\null}}%
+ {}{, #1}\harvardright}%
+}
+
+\newcommand{\citeaffixed}{\@ifstar{\@ifstar{\HAR@aciteaff}{\HAR@fciteaff}}%
+{\HAR@dciteaff}%
+}
+
+\newcommand{\HAR@fciteaff}[3][\null]{\HAR@citetoaux{#2}%
+{\harvardleft#3\ \HAR@dolist{#2}{\HAR@fname}\ifthenelse{\equal{#1}{\null}}%
+ {}{, #1}\harvardright}%
+}
+
+\newcommand{\HAR@aciteaff}[3][\null]{\HAR@citetoaux{#2}%
+{\harvardleft#3\ \HAR@dolist{#2}{\HAR@aname}\ifthenelse{\equal{#1}{\null}}%
+ {}{, #1}\harvardright}%
+}
+
+\newcommand{\HAR@dciteaff}[3][\null]{\HAR@citetoaux{#2}%
+{\harvardleft#3\ \HAR@dolist{#2}{\HAR@name}\ifthenelse{\equal{#1}{\null}}%
+ {}{, #1}\harvardright}%
+}
+
+\newcommand{\citeasnoun}{\@ifstar{\@ifstar{\HAR@aciteasn}{\HAR@fciteasn}}%
+{\HAR@dciteasn}%
+}
+
+\newcommand{\HAR@fciteasn}[2][\null]{\HAR@citetoaux{#2}\HAR@checkdef{#2}{%
+{\HAR@fname{#2}\ \harvardyearleft\HAR@year{#2}\ifthenelse{\equal{#1}{\null}}
+ {}{, #1}\harvardyearright}\HAR@setd{#2}}%
+}
+
+\newcommand{\HAR@aciteasn}[2][\null]{\HAR@citetoaux{#2}\HAR@checkdef{#2}{%
+{\HAR@aname{#2}\ \harvardyearleft\HAR@year{#2}\ifthenelse{\equal{#1}{\null}}
+ {}{, #1}\harvardyearright}\HAR@setd{#2}}%
+}
+
+\newcommand{\HAR@dciteasn}[2][\null]{\HAR@citetoaux{#2}\HAR@checkdef{#2}{%
+{\HAR@name{#2}\ \harvardyearleft\HAR@year{#2}\ifthenelse{\equal{#1}{\null}}
+ {}{, #1}\harvardyearright}\HAR@setd{#2}}%
+}
+
+\newcommand{\possessivecite}{\@ifstar{\@ifstar{\HAR@acitepos}{\HAR@fcitepos}}%
+{\HAR@dcitepos}%
+}
+
+\newcommand{\HAR@fcitepos}[2][\null]{\HAR@citetoaux{#2}\HAR@checkdef{#2}{%
+{\HAR@fname{#2}'s \harvardyearleft\HAR@year{#2}\ifthenelse{\equal{#1}{\null}}
+ {}{, #1}\harvardyearright}\HAR@setd{#2}}%
+}
+
+\newcommand{\HAR@acitepos}[2][\null]{\HAR@citetoaux{#2}\HAR@checkdef{#2}{%
+{\HAR@aname{#2}'s \harvardyearleft\HAR@year{#2}\ifthenelse{\equal{#1}{\null}}
+ {}{, #1}\harvardyearright}\HAR@setd{#2}}%
+}
+
+\newcommand{\HAR@dcitepos}[2][\null]{\HAR@citetoaux{#2}\HAR@checkdef{#2}{%
+{\HAR@name{#2}'s \harvardyearleft\HAR@year{#2}\ifthenelse{\equal{#1}{\null}}
+ {}{, #1}\harvardyearright}\HAR@setd{#2}}%
+}
+
+\newcommand{\citename}{\@ifstar{\@ifstar{\HAR@acitenam}\HAR@fcitenam}%
+{\HAR@dcitenam}%
+}
+
+\newcommand{\HAR@fcitenam}[2][\null]{\HAR@citetoaux{#2}\HAR@checkdef{#2}{%
+{\HAR@fname{#2}\ifthenelse{\equal{#1}{\null}}
+ {}{\ \harvardleft#1\harvardright}}}%
+}
+
+\newcommand{\HAR@acitenam}[2][\null]{\HAR@citetoaux{#2}\HAR@checkdef{#2}{%
+{\HAR@aname{#2}\ifthenelse{\equal{#1}{\null}}
+ {}{\ \harvardleft#1\harvardright}}}%
+}
+
+\newcommand{\HAR@dcitenam}[2][\null]{\HAR@citetoaux{#2}\HAR@checkdef{#2}{%
+{\HAR@name{#2}\ifthenelse{\equal{#1}{\null}}
+ {}{\ \harvardleft#1\harvardright}}}%
+}
+
+\newcommand{\citeyear}{\@ifstar{\HAR@citeyrnb}{\HAR@citeyr}}
+
+\newcommand{\HAR@citeyrnb}[2][\null]{\HAR@citetoaux{#2}%
+{\def\@citea{\null}\@for\@citeb:=#2\do%
+{\@citea\def\@citea{\HAR@hisep\penalty\@m\ }\HAR@checkdef{\@citeb}%
+{\HAR@year{\@citeb}}}\ifthenelse{\equal{#1}{\null}}%
+{}{, #1}}%
+}
+
+\newcommand{\HAR@citeyr}[2][\null]{\HAR@citetoaux{#2}%
+{\harvardleft\def\@citea{\null}\@for\@citeb:=#2\do%
+{\@citea\def\@citea{\HAR@hisep\penalty\@m\ }\HAR@checkdef{\@citeb}%
+{\HAR@year{\@citeb}}}\ifthenelse{\equal{#1}{\null}}%
+{}{, #1}\harvardright}%
+}
+
+% ibid added by Peter Antman
+\newcommand{\HAR@ibid}{ibid.}
+\newcommand{\HAR@hysep@apsr}{\null}
+\newcommand{\HAR@hisep@apsr}{;}
+\newcommand{\HAR@hysep@agsm}{\null}
+\newcommand{\HAR@hisep@agsm}{,}
+\newcommand{\HAR@hysep@dcu}{,}
+\newcommand{\HAR@hisep@dcu}{;}
+\newcommand{\HAR@and@agsm}{\&}
+\newcommand{\HAR@and@dcu}{and}
+\newcommand{\HAR@and@apsr}{and}
+\newcommand{\HAR@hysep}{\HAR@hysep@agsm}
+\newcommand{\HAR@hisep}{\HAR@hisep@agsm}
+\newcommand{\harvardand}{\HAR@and@agsm}
+\newcommand{\citationstyle}[1]{%
+ \renewcommand{\HAR@hysep}{\csname HAR@hysep@#1\endcsname}
+ \renewcommand{\HAR@hisep}{\csname HAR@hisep@#1\endcsname}
+ \renewcommand{\harvardand}{\csname HAR@and@#1\endcsname}
+}
+
+\newcommand{\HAR@bl@round}{(}
+\newcommand{\HAR@br@round}{)}
+\newcommand{\HAR@bl@square}{[}
+\newcommand{\HAR@br@square}{]}
+\newcommand{\HAR@bl@curly}{\{}
+\newcommand{\HAR@br@curly}{\}}
+\newcommand{\HAR@bl@angle}{$<$}
+\newcommand{\HAR@br@angle}{$>$}
+\newcommand{\HAR@bl@none}{}
+\newcommand{\HAR@br@none}{}
+\newcommand{\harvardleft}{\HAR@bl@round}
+\newcommand{\harvardright}{\HAR@br@round}
+\newcommand{\harvardparenthesis}[1]{
+ \renewcommand{\harvardleft}{\csname HAR@bl@#1\endcsname}
+ \renewcommand{\harvardright}{\csname HAR@br@#1\endcsname}
+ \harvardyearparenthesis{#1}
+}
+
+\newcommand{\harvardyearleft}{\HAR@bl@round}
+\newcommand{\harvardyearright}{\HAR@br@round}
+\newcommand{\harvardyearparenthesis}[1]{
+ \renewcommand{\harvardyearleft}{\csname HAR@bl@#1\endcsname}
+ \renewcommand{\harvardyearright}{\csname HAR@br@#1\endcsname}
+}
+
+\newcommand{\HAR@checkcitations}[4]{
+ \def\HAR@tempa{#2}\expandafter
+ \ifx \csname HAR@fn@#1\endcsname \HAR@tempa
+ \def\HAR@tempa{#3}\expandafter
+ \ifx \csname HAR@an@#1\endcsname \HAR@tempa
+ \def\HAR@tempa{#4}\expandafter
+ \ifx \csname HAR@yr@#1\endcsname \HAR@tempa
+ \else
+ \@tempswatrue
+ \fi
+ \else
+ \@tempswatrue
+ \fi
+ \else
+ \@tempswatrue
+ \fi
+}
+
+\AtEndDocument{\renewcommand{\harvardcite}{\HAR@checkcitations}}
+
+\ExecuteOptions{agsm,agsmcite,default,round}
+\ProcessOptions*
diff --git a/biblio/bibtex/contrib/oxford/oxford_en.bst b/biblio/bibtex/contrib/oxford/oxford_en.bst
new file mode 100644
index 0000000000..b586d121e8
--- /dev/null
+++ b/biblio/bibtex/contrib/oxford/oxford_en.bst
@@ -0,0 +1,1889 @@
+%%
+%% This is file `oxford_se.bst', version 0.4
+%% It was first generated with the docstrip utility in custom-bib
+%% and then heavily hacked by Peter Antman.
+%%
+%% This file must still bee considered beta.
+%%
+%% This version is for swedish citation, to get other languages to work
+%% rename it and insert the right bbl.xxx funcions and MACROS from
+%% the right mbd-file, availible with custom-bib. There are two new such
+%% commands, bbl.lq (leftquote) and bbl.rq (rightquote). Here you give
+%% your languages way of quoting titles.
+%%
+%% The original source files were:
+%%
+%% merlin.mbs (with options: `head,exlang,ay,har,harnm,vonx,nm-revf,ed-rev,dt-end,yr-col,note-yr,tit-qq,atit-u,vnum-nr,volp-com,jwdvol,add-pub,pub-date,pre-edn,edpar,blk-com,svenska,pp,ed,abr,amper,and-xcom,etal-it,{}')
+%% svenska.mbs (with options: `exlang,ay,har,harnm,vonx,nm-revf,ed-rev,dt-end,yr-col,note-yr,tit-qq,atit-u,vnum-nr,volp-com,jwdvol,add-pub,pub-date,pre-edn,edpar,blk-com,svenska,pp,ed,abr,amper,and-xcom,etal-it,{}')
+%% merlin.mbs (with options: `tail,exlang,ay,har,harnm,vonx,nm-revf,ed-rev,dt-end,yr-col,note-yr,tit-qq,atit-u,vnum-nr,volp-com,jwdvol,add-pub,pub-date,pre-edn,edpar,blk-com,svenska,pp,ed,abr,amper,and-xcom,etal-it,{}')
+%% ----------------------------------------
+%% *** ***
+%%
+ %-------------------------------------------------------------------
+ % The original source file contains the following version information:
+ % \ProvidesFile{merlin.mbs}[1996/12/16 3.82 (PWD)]
+ %
+ % NOTICE:
+ % This file may be used for non-profit purposes.
+ % It may not be distributed in exchange for money,
+ % other than distribution costs.
+ %
+ % The author provides it `as is' and does not guarantee it in any way.
+ %
+ % Copyright (C) 1994, 1995, 1996 Patrick W. Daly
+ % Copyright (C) 1997 Peter Antman, peter.antman@abc.se
+ %-------------------------------------------------------------------
+ % For use with BibTeX version 0.99a or later
+ %-------------------------------------------------------------------
+ %
+ % This is an Oxford style bibliography. As such, it is
+ % non-standard LaTeX, and requires a special package file to function properly.
+ % Such a package is oxford.sty by Peter Antman
+ %
+ % The form of the bibitem entries is
+ % \harvarditem[Jones, New thesis]{Howard Jones, FULL ENTRY}{1990}{key}
+ % Jones, Howard, FULL ENTRY
+ %
+ % The style gives the full reference att the first citation and then a
+ % abrevated one.
+ %
+ % The file suports an additional entry in the bib-file, stitle. It is
+ % for all but the first citation, when only lastname, and if there are
+ % more lastnames that are the same, title (and if there is a stitle that
+ % instead).
+ %
+ % oxford.sty also inserts an ibid. if the current citation is the same
+ % as the last one.
+ %---------------------------------------------------------------------
+ %
+ % Hacked by Peter Antman to provide Oxford citation style.
+ % FIX: Year cite not correct everywhere ???
+ % changes version 0.2:
+ % moved note in article
+ % editor and key right in short.ref
+ % changes version 0.3:
+ % fixed editors in cite, now orde Firstname Lastname
+ % removed ( and ) around ed.
+ % removed comma before nr. if volume empty
+ % removed comma before year in article, misc and unpub
+ % changes version 0.4
+ % fixed ", " error produced in ouput.bibitem (thanks to
+ % Oren Patashnik for telling me how to do it)
+
+ENTRY
+ { address
+ author
+ booktitle
+ chapter
+ edition
+ editor
+ howpublished
+ institution
+ journal
+ key
+ month
+ note
+ number
+ organization
+ pages
+ publisher
+ school
+ series
+ stitle
+ title
+ type
+ URL
+ volume
+ year
+ }
+ {}
+ { label extra.label sort.label short.list }
+
+INTEGERS { output.state before.all mid.sentence after.sentence after.block }
+
+FUNCTION {init.state.consts}
+{ #0 'before.all :=
+ #1 'mid.sentence :=
+ #2 'after.sentence :=
+ #3 'after.block :=
+}
+
+STRINGS { s t }
+
+FUNCTION {output.nonnull}
+{ 's :=
+ output.state mid.sentence =
+ { ", " * write$ }
+ { output.state after.block =
+ { add.period$ write$
+ newline$
+ "\newblock " write$
+ }
+ { output.state before.all =
+ 'write$
+ { add.period$ " " * write$ }
+ if$
+ }
+ if$
+ mid.sentence 'output.state :=
+ }
+ if$
+ s
+}
+
+% BY Peter Antman, special function to get rid of comma before
+% year in article, misc and unpub, se also output.check.special
+FUNCTION {output.nonnull.special}
+{ 's :=
+ output.state mid.sentence =
+ { " " * write$ }
+ { output.state after.block =
+ { add.period$ write$
+ newline$
+ "\newblock " write$
+ }
+ { output.state before.all =
+ 'write$
+ { add.period$ " " * write$ }
+ if$
+ }
+ if$
+ mid.sentence 'output.state :=
+ }
+ if$
+ s
+}
+FUNCTION {output}
+{ duplicate$ empty$
+ 'pop$
+ 'output.nonnull
+ if$
+}
+
+FUNCTION {output.check.special}
+{ 't :=
+ duplicate$ empty$
+ { pop$ "empty " t * " in " * cite$ * warning$ }
+ 'output.nonnull.special
+ if$
+}
+
+
+FUNCTION {output.check}
+{ 't :=
+ duplicate$ empty$
+ { pop$ "empty " t * " in " * cite$ * warning$ }
+ 'output.nonnull
+ if$
+}
+
+FUNCTION {fin.entry}
+{ add.period$
+ write$
+ newline$
+}
+
+FUNCTION {new.block}
+{ output.state before.all =
+ 'skip$
+ { after.block 'output.state := }
+ if$
+}
+
+FUNCTION {new.sentence}
+{ output.state after.block =
+ 'skip$
+ { output.state before.all =
+ 'skip$
+ { after.sentence 'output.state := }
+ if$
+ }
+ if$
+}
+
+FUNCTION {add.blank}
+{ " " * before.all 'output.state :=
+}
+
+FUNCTION {date.block}
+{
+ skip$
+}
+
+FUNCTION {not}
+{ { #0 }
+ { #1 }
+ if$
+}
+
+FUNCTION {and}
+{ 'skip$
+ { pop$ #0 }
+ if$
+}
+
+FUNCTION {or}
+{ { pop$ #1 }
+ 'skip$
+ if$
+}
+
+FUNCTION {non.stop}
+{ duplicate$
+ "}" * add.period$
+ #-1 #1 substring$ "." =
+}
+
+FUNCTION {new.block.checkb}
+{ empty$
+ swap$ empty$
+ and
+ 'skip$
+ 'new.block
+ if$
+}
+
+FUNCTION {field.or.null}
+{ duplicate$ empty$
+ { pop$ "" }
+ 'skip$
+ if$
+}
+
+FUNCTION {emphasize}
+{ duplicate$ empty$
+ { pop$ "" }
+ { "{\em " swap$ * "\/}" * }
+ if$
+}
+
+FUNCTION {capitalize}
+{ "u" change.case$ "t" change.case$ }
+
+FUNCTION {space.word}
+{ " " swap$ * " " * }
+
+ % Here are the language-specific definitions for explicit words.
+ % Each function has a name bbl.xxx where xxx is the English word.
+ %-------------------------------------------------------------------
+ % The original source file contains the following version information:
+ % \ProvidesFile{english.mbs}[1995/05/04 1.1 (PWD)]
+ % Copyright (C) 1994, 1995 Patrick W. Dal
+ %-------------------------------------------------------------------
+
+ % The language selected here is ENGLISH
+
+FUNCTION {bbl.and}
+{ "and"}
+
+FUNCTION {bbl.editors}
+{ "eds." }
+
+FUNCTION {bbl.editor}
+{ "ed." }
+
+FUNCTION {bbl.edby}
+{ "edited by" }
+
+FUNCTION {bbl.edition}
+{ "edn." }
+
+FUNCTION {bbl.volume}
+{ "vol." }
+
+FUNCTION {bbl.of}
+{ "of" }
+
+FUNCTION {bbl.number}
+{ "no." }
+
+FUNCTION {bbl.nr}
+{ "no." }
+
+FUNCTION {bbl.in}
+{ "in" }
+
+FUNCTION {bbl.pages}
+{ "pp." }
+
+FUNCTION {bbl.page}
+{ "p." }
+
+FUNCTION {bbl.chapter}
+{ "chap." }
+
+FUNCTION {bbl.techrep}
+{ "Tech Rep." }
+
+FUNCTION {bbl.mthesis}
+{ "Master's thesis" }
+
+FUNCTION {bbl.phdthesis}
+{ "Ph.D. thesis"}
+
+FUNCTION {bbl.first}
+{ "1st" }
+
+FUNCTION {bbl.second}
+{ "2nd" }
+
+FUNCTION {bbl.third}
+{ "3rd" }
+
+FUNCTION {bbl.fourth}
+{ "4th" }
+
+FUNCTION {bbl.fifth}
+{ "5th" }
+
+FUNCTION {bbl.th}
+{ "th" }
+
+% BY Peter Antman, new functions bbl.lq bbl.rq
+FUNCTION {bbl.lq}
+{ "'" }
+
+FUNCTION {bbl.rq}
+{ "'" }
+
+MACRO {jan} {"Jan."}
+
+MACRO {feb} {"Feb."}
+
+MACRO {mar} {"Mar."}
+
+MACRO {apr} {"Apr."}
+
+MACRO {may} {"May"}
+
+MACRO {jun} {"Jun."}
+
+MACRO {jul} {"Jul."}
+
+MACRO {aug} {"Aug."}
+
+MACRO {sep} {"Sep."}
+
+MACRO {oct} {"Oct."}
+
+MACRO {nov} {"Nov."}
+
+MACRO {dec} {"Dec."}
+ % End of language definition file
+
+MACRO {acmcs} {"ACM Computing Surveys"}
+
+MACRO {acta} {"Acta Informatica"}
+
+MACRO {cacm} {"Communications of the ACM"}
+
+MACRO {ibmjrd} {"IBM Journal of Research and Development"}
+
+MACRO {ibmsj} {"IBM Systems Journal"}
+
+MACRO {ieeese} {"IEEE Transactions on Software Engineering"}
+
+MACRO {ieeetc} {"IEEE Transactions on Computers"}
+
+MACRO {ieeetcad}
+ {"IEEE Transactions on Computer-Aided Design of Integrated Circuits"}
+
+MACRO {ipl} {"Information Processing Letters"}
+
+MACRO {jacm} {"Journal of the ACM"}
+
+MACRO {jcss} {"Journal of Computer and System Sciences"}
+
+MACRO {scp} {"Science of Computer Programming"}
+
+MACRO {sicomp} {"SIAM Journal on Computing"}
+
+MACRO {tocs} {"ACM Transactions on Computer Systems"}
+
+MACRO {tods} {"ACM Transactions on Database Systems"}
+
+MACRO {tog} {"ACM Transactions on Graphics"}
+
+MACRO {toms} {"ACM Transactions on Mathematical Software"}
+
+MACRO {toois} {"ACM Transactions on Office Information Systems"}
+
+MACRO {toplas} {"ACM Transactions on Programming Languages and Systems"}
+
+MACRO {tcs} {"Theoretical Computer Science"}
+
+FUNCTION {write.url}
+{ URL empty$
+ { skip$ }
+ { "\newline\harvardurl{" URL * "}" * write$ newline$ }
+ if$
+}
+
+INTEGERS { nameptr namesleft numnames }
+
+FUNCTION {format.names}
+{ 's :=
+ #1 'nameptr :=
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ { s nameptr
+ "{vv~}{ll}{, jj}{, ff}" format.name$ 't :=
+ nameptr #1 >
+ {
+ namesleft #1 >
+ { ", " * t * }
+ {
+ t "others" =
+ { " " * "et~al." emphasize * }
+ { " \harvardand\ " * t * }
+ if$
+ }
+ if$
+ }
+ 't
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+}
+
+FUNCTION {format.names.ed}
+{ format.names }
+
+FUNCTION {format.key}
+{ empty$
+ { key field.or.null }
+ { "" }
+ if$
+}
+
+FUNCTION {format.authors}
+{ author empty$
+ { "" }
+ {
+ author format.names
+ }
+ if$
+}
+
+FUNCTION {format.editors}
+{ editor empty$
+ { "" }
+ {
+ editor format.names
+ editor num.names$ #1 >
+ { " " * bbl.editors * "" * }
+ { " " * bbl.editor * "" * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.in.editors}
+{ editor empty$
+ { "" }
+ { editor format.names.ed
+ editor num.names$ #1 >
+ { " " * bbl.editors * "" * }
+ { " " * bbl.editor * "" * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.title}
+{ title empty$
+ { "" }
+ { title
+ bbl.lq swap$ * % BY Peter Antman, uses bbl.lq
+ non.stop
+ { bbl.rq * ", " * } % BY Peter Antman, uses bbl.rq
+ { bbl.rq * " " * } % PROBLEM: comma after title in book
+ if$
+ }
+ if$
+}
+
+FUNCTION {end.quote.title}
+{ title empty$
+ 'skip$
+ { before.all 'output.state := }
+ if$
+}
+
+FUNCTION {format.full.names}
+{'s :=
+ #1 'nameptr :=
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ { s nameptr
+ "{vv~}{ll}" format.name$ 't :=
+ nameptr #1 >
+ {
+ namesleft #1 >
+ { ", " * t * }
+ {
+ t "others" =
+ { " " * "et~al." emphasize * }
+ { " \harvardand\ " * t * }
+ if$
+ }
+ if$
+ }
+ 't
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+}
+
+FUNCTION {author.editor.key.full}
+{ author empty$
+ { editor empty$
+ { key empty$
+ { cite$ #1 #3 substring$ }
+ 'key
+ if$
+ }
+ { editor format.full.names }
+ if$
+ }
+ { author format.full.names }
+ if$
+}
+
+FUNCTION {author.key.full}
+{ author empty$
+ { key empty$
+ { cite$ #1 #3 substring$ }
+ 'key
+ if$
+ }
+ { author format.full.names }
+ if$
+}
+
+FUNCTION {editor.key.full}
+{ editor empty$
+ { key empty$
+ { cite$ #1 #3 substring$ }
+ 'key
+ if$
+ }
+ { editor format.full.names }
+ if$
+}
+
+FUNCTION {make.full.names}
+{ type$ "book" =
+ type$ "inbook" =
+ or
+ 'author.editor.key.full
+ { type$ "proceedings" =
+ 'editor.key.full
+ 'author.key.full
+ if$
+ }
+ if$
+}
+
+% BY Peter Antman, function to format long cite
+FUNCTION {format.firstname}
+{ 's :=
+ #1 'nameptr :=
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ { s nameptr
+ "{ff }{jj }{vv }{ll}" format.name$ 't :=
+ nameptr #1 >
+ {
+ namesleft #1 >
+ { ", " * t * }
+ {
+ t "others" =
+ { " " * "et~al." emphasize * }
+ { " \harvardand\ " * t * }
+ if$
+ }
+ if$
+ }
+ 't
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+}
+
+% BY Peter Antman, function to format lastname
+FUNCTION {format.lastname}
+{ 's :=
+ #1 'nameptr :=
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ { s nameptr
+ "{ll}{}{}{}" format.name$ 't :=
+ nameptr #1 >
+ {
+ namesleft #1 >
+ { ", " * t * }
+ {
+ t "others" =
+ { " " * "et~al." emphasize * }
+ { " \harvardand\ " * t * }
+ if$
+ }
+ if$
+ }
+ 't
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+}
+
+% By Peter Antman, to format eds as Firstname Lastname
+FUNCTION {format.r.editors}
+{ editor empty$
+ { "" }
+ {
+ editor format.firstname
+ editor num.names$ #1 >
+ { " " * bbl.editors * "" * }
+ { " " * bbl.editor * "" * }
+ if$
+ }
+ if$
+}
+
+% BY Peter Antman, editors in Firstname Lastname
+FUNCTION {format.in.r.editors}
+{ editor empty$
+ { "" }
+ { editor format.firstname
+ editor num.names$ #1 >
+ { " " * bbl.editors * "" * }
+ { " " * bbl.editor * "" * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.au}
+{ author empty$
+ { "" }
+ {
+ author format.firstname
+ }
+ if$
+}
+FUNCTION {format.auth}
+{ author empty$
+ { editor empty$
+ {author format.key}
+ {editor format.lastname}
+ if$
+ }
+ {
+ author format.lastname
+ }
+ if$
+}
+
+% BY Peter Antman, the repeated
+% should contain name if no other name of the same
+% if more names of the same, then stitle
+% if no stitle, then title
+FUNCTION {short.ref}
+{
+% format.auth
+% ", " *
+% extra.label write$
+ extra.label "" =
+ {
+% format.auth
+ short.list % PANIC this is a bad bypas of not having solved ed.
+ "" * extra.label
+ }
+ { stitle empty$
+ {
+ format.auth
+ ", " * title
+ }
+ {
+ format.auth
+ ", " * stitle
+ }
+ if$
+ }
+ if$
+}
+
+FUNCTION {output.bibitem}
+{ newline$
+ "\harvarditem[" write$
+% short.ref duplicate$ label =
+ "" short.ref * "]" * write$
+ pop$ ""
+ "{" write$
+% pop$ % ERROR, does the right thing but produces error
+ before.all 'output.state :=
+}
+
+FUNCTION {end.bibitem}
+{ "}{" * write$
+ year duplicate$ empty$
+ { pop$ "????" }
+ 'skip$
+ if$
+ extra.label * "}{" * write$
+ cite$ write$
+ "}" write$
+ newline$
+ ""
+ before.all 'output.state :=
+}
+
+FUNCTION {n.dashify}
+{ 't :=
+ ""
+ { t empty$ not }
+ { t #1 #1 substring$ "-" =
+ { t #1 #2 substring$ "--" = not
+ { "--" *
+ t #2 global.max$ substring$ 't :=
+ }
+ { { t #1 #1 substring$ "-" = }
+ { "-" *
+ t #2 global.max$ substring$ 't :=
+ }
+ while$
+ }
+ if$
+ }
+ { t #1 #1 substring$ *
+ t #2 global.max$ substring$ 't :=
+ }
+ if$
+ }
+ while$
+}
+
+FUNCTION {word.in}
+{ bbl.in
+ " " * }
+
+FUNCTION {format.date}
+{ year duplicate$ empty$
+ { "empty year in " cite$ * "; set to ????" * warning$
+ pop$ "????" }
+ 'skip$
+ if$
+% extra.label * % BY Peter Antman, removed, not needed in Oxford
+ " (" swap$ * ")" *
+}
+
+FUNCTION {format.btitle}
+{ title emphasize
+}
+
+FUNCTION {tie.or.space.connect}
+{ duplicate$ text.length$ #3 <
+ { "~" }
+ { " " }
+ if$
+ swap$ * *
+}
+
+FUNCTION {either.or.check}
+{ empty$
+ 'pop$
+ { "can't use both " swap$ * " fields in " * cite$ * warning$ }
+ if$
+}
+
+FUNCTION {format.bvolume}
+{ volume empty$
+ { "" }
+ { bbl.volume volume tie.or.space.connect
+ series empty$
+ 'skip$
+ { bbl.of space.word * series emphasize * }
+ if$
+ "volume and number" number either.or.check
+ }
+ if$
+}
+
+FUNCTION {format.number.series}
+{ volume empty$
+ { number empty$
+ { series field.or.null }
+ { output.state mid.sentence =
+ { bbl.number }
+ { bbl.number capitalize }
+ if$
+ number tie.or.space.connect
+ series empty$
+ { "there's a number but no series in " cite$ * warning$ }
+ { bbl.in space.word * series * }
+ if$
+ }
+ if$
+ }
+ { "" }
+ if$
+}
+
+FUNCTION {is.num}
+{ chr.to.int$
+ duplicate$ "0" chr.to.int$ < not
+ swap$ "9" chr.to.int$ > not and
+}
+
+FUNCTION {extract.num}
+{ duplicate$ 't :=
+ "" 's :=
+ { t empty$ not }
+ { t #1 #1 substring$
+ t #2 global.max$ substring$ 't :=
+ duplicate$ is.num
+ { s swap$ * 's := }
+ { pop$ "" 't := }
+ if$
+ }
+ while$
+ s empty$
+ 'skip$
+ { pop$ s }
+ if$
+}
+
+FUNCTION {convert.edition}
+{ edition extract.num "l" change.case$ 's :=
+ s "first" = s "1" = or
+ { bbl.first 't := }
+ { s "second" = s "2" = or
+ { bbl.second 't := }
+ { s "third" = s "3" = or
+ { bbl.third 't := }
+ { s "fourth" = s "4" = or
+ { bbl.fourth 't := }
+ { s "fifth" = s "5" = or
+ { bbl.fifth 't := }
+ { s #1 #1 substring$ is.num
+ { s bbl.th * 't := }
+ { edition 't := }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+ t
+}
+
+FUNCTION {format.edition}
+{ edition empty$
+ { "" }
+ { output.state mid.sentence =
+ { convert.edition "l" change.case$ " " * bbl.edition * }
+ { convert.edition "t" change.case$ " " * bbl.edition * }
+ if$
+ }
+ if$
+}
+
+INTEGERS { multiresult }
+
+FUNCTION {multi.page.check}
+{ 't :=
+ #0 'multiresult :=
+ { multiresult not
+ t empty$ not
+ and
+ }
+ { t #1 #1 substring$
+ duplicate$ "-" =
+ swap$ duplicate$ "," =
+ swap$ "+" =
+ or or
+ { #1 'multiresult := }
+ { t #2 global.max$ substring$ 't := }
+ if$
+ }
+ while$
+ multiresult
+}
+
+FUNCTION {format.pages}
+{ pages empty$
+ { "" }
+ { pages multi.page.check
+ { bbl.pages pages n.dashify tie.or.space.connect }
+ { bbl.page pages tie.or.space.connect }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.journal.pages}
+{
+ pages empty$
+ 'skip$
+ { duplicate$ empty$
+ { pop$ format.pages }
+ { ", " * pages n.dashify * }
+ if$
+ }
+ if$
+}
+
+% BY Peter Antman, removed comma before bbl.nr if volume empty
+FUNCTION {format.vol.num.pages}
+{ volume field.or.null
+ volume empty$
+ 'skip$
+ { bbl.volume "~" * swap$ * }
+ if$
+ number empty$
+ 'skip$
+ {
+% " " bbl.nr * number tie.or.space.connect *
+ volume empty$
+ { " " bbl.nr * number tie.or.space.connect * }
+ { ", " bbl.nr * number tie.or.space.connect * }
+ if$
+ }
+ if$
+ format.journal.pages
+}
+
+FUNCTION {format.chapter.pages}
+{ chapter empty$
+ 'format.pages
+ { type empty$
+ { bbl.chapter }
+ { type "l" change.case$ }
+ if$
+ chapter tie.or.space.connect
+ pages empty$
+ 'skip$
+ { ", " * format.pages * }
+ if$
+ }
+ if$
+}
+
+% By Peter Antman, editors in Firstname Lastname order
+FUNCTION {format.in.r.ed.booktitle}
+{ booktitle empty$
+ { "" }
+ { editor empty$
+ { word.in booktitle emphasize * }
+ { word.in format.in.r.editors * ", " *
+ booktitle emphasize * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.in.ed.booktitle}
+{ booktitle empty$
+ { "" }
+ { editor empty$
+ { word.in booktitle emphasize * }
+ { word.in format.in.editors * ", " *
+ booktitle emphasize * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.thesis.type}
+{ type empty$
+ 'skip$
+ { pop$
+ type "t" change.case$
+ }
+ if$
+}
+
+FUNCTION {format.tr.number}
+{ type empty$
+ { bbl.techrep }
+ 'type
+ if$
+ number empty$
+ { "t" change.case$ }
+ { number tie.or.space.connect }
+ if$
+}
+
+FUNCTION {format.article.crossref}
+{
+ word.in
+ " \cite{" * crossref * "}" *
+}
+
+FUNCTION {format.book.crossref}
+{ volume empty$
+ { "empty volume in " cite$ * "'s crossref of " * crossref * warning$
+ word.in
+ }
+ { bbl.volume volume tie.or.space.connect
+ bbl.of space.word *
+ }
+ if$
+ " \cite{" * crossref * "}" *
+}
+
+FUNCTION {format.incoll.inproc.crossref}
+{
+ word.in
+ " \cite{" * crossref * "}" *
+}
+
+FUNCTION {format.publisher}
+{ publisher empty$
+ % "empty publisher in " cite$ * warning$ %dont like this warning
+ 'skip$
+ 'skip$
+ if$
+ ""
+ add.blank "(" *
+ address empty$
+ 'skip$
+ { address * }
+ if$
+ publisher empty$
+ 'skip$
+ { address empty$
+ 'skip$
+ { ": " * }
+ if$
+ publisher *
+ }
+ if$
+ year duplicate$ empty$
+ { "empty year in " cite$ * "; set to ????" * warning$
+ pop$ "????" }
+ 'skip$
+ if$
+ publisher empty$ address empty$ and
+ { * }
+ { ", " swap$ * * }
+ if$
+ ")" *
+ output
+}
+
+% BY Peter Antman, all types includes full ref
+FUNCTION {article}
+{ output.bibitem
+% pop$ % to get rid of ,
+ format.au "author" output.check % output instead of output check
+ author format.key output
+ format.title "title" output.check
+ end.quote.title
+ crossref missing$
+ { journal
+ emphasize
+ "journal" output.check
+ format.vol.num.pages output
+ }
+ { format.article.crossref output.nonnull
+ format.pages output
+ }
+ if$
+ format.date "year" output.check.special
+ note output
+ end.bibitem
+ format.authors "author" output.check
+ author format.key output
+ format.title "title" output.check
+ end.quote.title
+ crossref missing$
+ { journal
+ emphasize
+ "journal" output.check
+ format.vol.num.pages output
+ }
+ { format.article.crossref output.nonnull
+ format.pages output
+ }
+ if$
+ format.date "year" output.check.special
+ note output
+ fin.entry
+ write.url
+}
+
+FUNCTION {book}
+{ output.bibitem
+ author empty$
+ { format.r.editors "author and editor" output.check
+ editor format.key output
+ }
+ { format.au output.nonnull
+ crossref missing$
+ { "author and editor" editor either.or.check }
+ 'skip$
+ if$
+ }
+ if$
+ format.btitle "title" output.check
+ crossref missing$
+ { format.bvolume output
+ format.number.series output
+ format.edition output
+ note output
+ format.publisher
+ }
+ {
+ format.book.crossref output.nonnull
+ }
+ if$
+ end.bibitem
+ author empty$
+ { format.editors "author and editor" output.check
+ editor format.key output
+ }
+ { format.authors output.nonnull
+ crossref missing$
+ { "author and editor" editor either.or.check }
+ 'skip$
+ if$
+ }
+ if$
+ format.btitle "title" output.check
+ crossref missing$
+ { format.bvolume output
+ format.number.series output
+ format.edition output
+ note output
+ format.publisher
+ }
+ {
+ format.book.crossref output.nonnull
+ }
+ if$
+% note output
+ fin.entry
+ write.url
+}
+
+FUNCTION {booklet}
+{ output.bibitem
+ format.au output
+ author format.key output
+ format.title "title" output.check
+ end.quote.title
+ howpublished output
+% address output
+ note output
+% format.date "year" output.check
+ format.publisher
+ end.bibitem
+ format.authors output
+ author format.key output
+ format.title "title" output.check
+ end.quote.title
+ howpublished output
+% address output
+ note output
+% format.date "year" output.check
+ format.publisher
+ fin.entry
+ write.url
+}
+
+FUNCTION {inbook}
+{ output.bibitem
+ author empty$
+ { format.r.editors "author and editor" output.check
+ editor format.key output
+ }
+ { format.au output.nonnull
+ crossref missing$
+ { "author and editor" editor either.or.check }
+ 'skip$
+ if$
+ }
+ if$
+ format.btitle "title" output.check
+ crossref missing$
+ {
+ format.bvolume output
+ format.chapter.pages "chapter and pages" output.check
+ format.number.series output
+ format.edition output
+ note output
+ format.publisher
+ }
+ {
+ format.chapter.pages "chapter and pages" output.check
+ format.book.crossref output.nonnull
+ }
+ if$
+ end.bibitem
+ author empty$
+ { format.editors "author and editor" output.check
+ editor format.key output
+ }
+ { format.authors output.nonnull
+ crossref missing$
+ { "author and editor" editor either.or.check }
+ 'skip$
+ if$
+ }
+ if$
+ format.btitle "title" output.check
+ crossref missing$
+ {
+ format.bvolume output
+ format.chapter.pages "chapter and pages" output.check
+ format.number.series output
+ format.edition output
+ note output
+ format.publisher
+ }
+ {
+ format.chapter.pages "chapter and pages" output.check
+ format.book.crossref output.nonnull
+ }
+ if$
+% note output %note moved
+ fin.entry
+ write.url
+}
+
+FUNCTION {incollection}
+{ output.bibitem
+ format.au "author" output.check
+ author format.key output
+ format.title "title" output.check
+ end.quote.title
+ crossref missing$
+ { format.in.r.ed.booktitle "booktitle" output.check
+ format.bvolume output
+ format.number.series output
+ format.edition output
+ format.chapter.pages output
+ note output
+ format.publisher
+ }
+ { format.incoll.inproc.crossref output.nonnull
+ format.chapter.pages output
+ }
+ if$
+ end.bibitem
+ format.authors "author" output.check
+ author format.key output
+ format.title "title" output.check
+ end.quote.title
+ crossref missing$
+ { format.in.ed.booktitle "booktitle" output.check
+ format.bvolume output
+ format.number.series output
+ format.edition output
+ format.chapter.pages output
+ note output
+ format.publisher
+ }
+ { format.incoll.inproc.crossref output.nonnull
+ format.chapter.pages output
+ }
+ if$
+% note output %note moved
+ fin.entry
+ write.url
+}
+
+FUNCTION {inproceedings}
+{ output.bibitem
+ format.au "author" output.check
+ author format.key output
+ format.title "title" output.check
+ end.quote.title
+ crossref missing$
+ { format.in.r.ed.booktitle "booktitle" output.check
+ format.bvolume output
+ format.number.series output
+ format.pages output
+ note output
+ publisher empty$
+ { organization output
+% address output
+% format.date "year" output.check
+ format.publisher
+ }
+ { organization output
+ format.publisher
+ }
+ if$
+ }
+ { format.incoll.inproc.crossref output.nonnull
+ format.pages output
+ }
+ if$
+ end.bibitem
+ format.authors "author" output.check
+ author format.key output
+ format.title "title" output.check
+ end.quote.title
+ crossref missing$
+ { format.in.ed.booktitle "booktitle" output.check
+ format.bvolume output
+ format.number.series output
+ format.pages output
+ note output
+ publisher empty$
+ { organization output
+% address output
+% format.date "year" output.check
+ format.publisher
+ }
+ { organization output
+ format.publisher
+ }
+ if$
+ }
+ { format.incoll.inproc.crossref output.nonnull
+ format.pages output
+ }
+ if$
+% note output % note moved
+ fin.entry
+ write.url
+}
+
+FUNCTION {conference} { inproceedings }
+
+FUNCTION {manual}
+{ output.bibitem
+ format.au output
+ author format.key output
+ format.btitle "title" output.check
+ organization output
+% address output
+ format.edition output
+ note output
+% format.date "year" output.check
+ format.publisher
+ end.bibitem
+ format.authors output
+ author format.key output
+ format.btitle "title" output.check
+ organization output
+% address output
+ format.edition output
+ note output
+% format.date "year" output.check
+ format.publisher
+ fin.entry
+ write.url
+}
+
+FUNCTION {mastersthesis}
+{ output.bibitem
+ format.au "author" output.check
+ author format.key output
+ format.btitle "title" output.check
+ bbl.mthesis format.thesis.type output.nonnull
+ school "school" output.check
+% address output
+ note output
+% format.date "year" output.check
+ format.publisher
+ end.bibitem
+ format.authors "author" output.check
+ author format.key output
+ format.btitle "title" output.check
+ bbl.mthesis format.thesis.type output.nonnull
+ school "school" output.check
+% address output
+ note output
+% format.date "year" output.check
+ format.publisher
+ fin.entry
+ write.url
+}
+
+FUNCTION {misc}
+{ output.bibitem
+ format.au output
+ author format.key output
+ format.title output
+ end.quote.title
+ howpublished output
+ note output
+ format.date "year" output.check.special
+ end.bibitem
+ format.authors output
+ author format.key output
+ format.title output
+ end.quote.title
+ howpublished output
+ note output
+ format.date "year" output.check.special
+ fin.entry
+ write.url
+}
+
+FUNCTION {phdthesis}
+{ output.bibitem
+ format.au "author" output.check
+ author format.key output
+ format.btitle "title" output.check
+ bbl.phdthesis format.thesis.type output.nonnull
+ school "school" output.check
+% address output
+ note output
+% format.date "year" output.check
+ format.publisher
+ end.bibitem
+ format.authors "author" output.check
+ author format.key output
+ format.btitle "title" output.check
+ bbl.phdthesis format.thesis.type output.nonnull
+ school "school" output.check
+% address output
+ note output
+% format.date "year" output.check
+ format.publisher
+ fin.entry
+ write.url
+}
+
+FUNCTION {proceedings}
+{ output.bibitem
+ format.r.editors output
+ editor format.key output
+ format.btitle "title" output.check
+ format.bvolume output
+ format.number.series output
+% address output
+ organization output
+% publisher output
+ note output
+% format.date "year" output.check
+ format.publisher
+ end.bibitem
+ format.editors output
+ editor format.key output
+ format.btitle "title" output.check
+ format.bvolume output
+ format.number.series output
+% address output
+ organization output
+% publisher output
+ note output
+% format.date "year" output.check
+ format.publisher
+ fin.entry
+ write.url
+}
+
+FUNCTION {techreport}
+{ output.bibitem
+ format.au "author" output.check
+ author format.key output
+ format.title "title" output.check
+ end.quote.title
+ format.tr.number output.nonnull
+ institution "institution" output.check
+% address output
+ note output
+% format.date "year" output.check
+ format.publisher
+ end.bibitem
+ format.authors "author" output.check
+ author format.key output
+ format.title "title" output.check
+ end.quote.title
+ format.tr.number output.nonnull
+ institution "institution" output.check
+% address output
+ note output
+% format.date "year" output.check
+ format.publisher
+ fin.entry
+ write.url
+}
+
+FUNCTION {unpublished}
+{ output.bibitem
+ format.au "author" output.check
+ author format.key output
+ format.title "title" output.check
+ end.quote.title
+ note "note" output.check
+ format.date "year" output.check.special
+ end.bibitem
+ format.authors "author" output.check
+ author format.key output
+ format.title "title" output.check
+ end.quote.title
+ note "note" output.check
+ format.date "year" output.check.special
+ fin.entry
+ write.url
+}
+
+FUNCTION {default.type} { misc }
+
+READ
+
+FUNCTION {sortify}
+{ purify$
+ "l" change.case$
+}
+
+INTEGERS { len }
+
+FUNCTION {chop.word}
+{ 's :=
+ 'len :=
+ s #1 len substring$ =
+ { s len #1 + global.max$ substring$ }
+ 's
+ if$
+}
+
+FUNCTION {format.lab.names}
+{ 's :=
+ s #1 "{vv~}{ll}" format.name$
+ s num.names$ duplicate$
+ #2 >
+ { pop$ " " * "et~al." emphasize * }
+ { #2 <
+ 'skip$
+ { s #2 "{ff }{vv }{ll}{ jj}" format.name$ "others" =
+ { " " * "et~al." emphasize * }
+ { " \harvardand\ " * s #2 "{vv~}{ll}" format.name$ * }
+ if$
+ }
+ if$
+ }
+ if$
+}
+
+FUNCTION {author.key.label}
+{ author empty$
+ { key empty$
+ { cite$ #1 #3 substring$ }
+ 'key
+ if$
+ }
+ { author format.lab.names }
+ if$
+}
+
+FUNCTION {author.editor.key.label}
+{ author empty$
+ { editor empty$
+ { key empty$
+ { cite$ #1 #3 substring$ }
+ 'key
+ if$
+ }
+ { editor format.lab.names }
+ if$
+ }
+ { author format.lab.names }
+ if$
+}
+
+FUNCTION {editor.key.label}
+{ editor empty$
+ { key empty$
+ { cite$ #1 #3 substring$ }
+ 'key
+ if$
+ }
+ { editor format.lab.names }
+ if$
+}
+
+FUNCTION {calc.short.authors}
+{ type$ "book" =
+ type$ "inbook" =
+ or
+ 'author.editor.key.label
+ { type$ "proceedings" =
+ 'editor.key.label
+ 'author.key.label
+ if$
+ }
+ if$
+ 'short.list :=
+}
+
+FUNCTION {calc.label}
+{ calc.short.authors
+ short.list
+ ", "
+ *
+ year duplicate$ empty$
+ { pop$ "????" }
+ 'skip$
+ if$
+ *
+ 'label :=
+}
+
+FUNCTION {calc.short.label}
+{ calc.short.authors short.list
+ 'label :=
+}
+
+FUNCTION {sort.format.names}
+{ 's :=
+ #1 'nameptr :=
+ ""
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ { s nameptr
+ "{ll{ }}{ ff{ }}{ jj{ }}"
+ format.name$ 't :=
+ nameptr #1 >
+ {
+ " " *
+ namesleft #1 = t "others" = and
+ { "aaaaa" * }
+ { t sortify * }
+ if$
+ }
+ { t sortify * }
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+}
+
+FUNCTION {sort.format.title}
+{ 't :=
+ "A " #2
+ "An " #3
+ "The " #4 t chop.word
+ chop.word
+ chop.word
+ sortify
+ #1 global.max$ substring$
+}
+
+FUNCTION {author.sort}
+{ author empty$
+ { key empty$
+ { "to sort, need author or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { author sort.format.names }
+ if$
+}
+
+FUNCTION {author.editor.sort}
+{ author empty$
+ { editor empty$
+ { key empty$
+ { "to sort, need author, editor, or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { editor sort.format.names }
+ if$
+ }
+ { author sort.format.names }
+ if$
+}
+
+FUNCTION {editor.sort}
+{ editor empty$
+ { key empty$
+ { "to sort, need editor or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { editor sort.format.names }
+ if$
+}
+
+FUNCTION {presort}
+{ calc.label
+ label sortify
+ " "
+ *
+ type$ "book" =
+ type$ "inbook" =
+ or
+ 'author.editor.sort
+ { type$ "proceedings" =
+ 'editor.sort
+ 'author.sort
+ if$
+ }
+ if$
+ #1 entry.max$ substring$
+ 'sort.label :=
+ sort.label
+ *
+ " "
+ *
+ title field.or.null
+ sort.format.title
+ *
+ #1 entry.max$ substring$
+ 'sort.key$ :=
+}
+
+ITERATE {presort}
+
+SORT
+
+STRINGS { last.label next.extra }
+
+INTEGERS { last.extra.num number.label }
+
+FUNCTION {initialize.extra.label.stuff}
+{ #0 int.to.chr$ 'last.label :=
+ "" 'next.extra :=
+ #0 'last.extra.num :=
+ #0 'number.label :=
+}
+
+FUNCTION {not.uniq.forw}
+{ last.label short.list =
+ { last.extra.num #1 + 'last.extra.num :=
+ last.extra.num int.to.chr$ 'extra.label :=
+ }
+ { "a" chr.to.int$ 'last.extra.num :=
+ "" 'extra.label :=
+ short.list 'last.label :=
+ }
+ if$
+ number.label #1 + 'number.label :=
+% label write$
+}
+
+FUNCTION {not.uniq.rew}
+{ next.extra "b" =
+ { "a" 'extra.label := }
+ 'skip$
+ if$
+ extra.label 'next.extra :=
+ extra.label
+ duplicate$ empty$
+ 'skip$
+ { "" swap$ * "" * }
+ if$
+ 'extra.label :=
+}
+
+FUNCTION {forward.pass}
+{ last.label label =
+ { last.extra.num #1 + 'last.extra.num :=
+ last.extra.num int.to.chr$ 'extra.label :=
+ }
+ { "a" chr.to.int$ 'last.extra.num :=
+ "" 'extra.label :=
+ label 'last.label :=
+ }
+ if$
+ number.label #1 + 'number.label :=
+% label write$
+}
+
+FUNCTION {reverse.pass}
+{ next.extra "b" =
+ { "a" 'extra.label := }
+ 'skip$
+ if$
+ extra.label 'next.extra :=
+ extra.label
+ duplicate$ empty$
+ 'skip$
+ { "" swap$ * "" * }
+ if$
+ 'extra.label :=
+}
+
+EXECUTE {initialize.extra.label.stuff}
+
+%ITERATE {forward.pass}
+
+ITERATE {not.uniq.forw}
+
+REVERSE {not.uniq.rew}
+
+%REVERSE {reverse.pass}
+
+FUNCTION {bib.sort.order}
+{ sort.label
+ " "
+ *
+ year field.or.null sortify
+ *
+ " "
+ *
+ title field.or.null
+ sort.format.title
+ *
+ #1 entry.max$ substring$
+ 'sort.key$ :=
+ calc.short.label
+}
+
+ITERATE {bib.sort.order}
+
+SORT
+
+FUNCTION {begin.bib}
+{ preamble$ empty$
+ 'skip$
+ { preamble$ write$ newline$ }
+ if$
+ "\begin{thebibliography}{" number.label int.to.str$ * "}" *
+ write$ newline$
+% "\newcommand{\enquote}[1]{``#1''}"
+% write$ newline$
+% "\expandafter\ifx\csname natexlab\endcsname\relax\def\natexlab#1{#1}\fi"
+% write$ newline$
+}
+
+EXECUTE {begin.bib}
+
+EXECUTE {init.state.consts}
+
+ITERATE {call.type$}
+
+FUNCTION {end.bib}
+{ newline$
+ "\end{thebibliography}" write$ newline$
+}
+
+EXECUTE {end.bib}
+%% End of customized bst file
+%%
+%% End of file `svenska.bst'.
diff --git a/biblio/bibtex/contrib/oxford/oxford_in.bst b/biblio/bibtex/contrib/oxford/oxford_in.bst
new file mode 100644
index 0000000000..b586d121e8
--- /dev/null
+++ b/biblio/bibtex/contrib/oxford/oxford_in.bst
@@ -0,0 +1,1889 @@
+%%
+%% This is file `oxford_se.bst', version 0.4
+%% It was first generated with the docstrip utility in custom-bib
+%% and then heavily hacked by Peter Antman.
+%%
+%% This file must still bee considered beta.
+%%
+%% This version is for swedish citation, to get other languages to work
+%% rename it and insert the right bbl.xxx funcions and MACROS from
+%% the right mbd-file, availible with custom-bib. There are two new such
+%% commands, bbl.lq (leftquote) and bbl.rq (rightquote). Here you give
+%% your languages way of quoting titles.
+%%
+%% The original source files were:
+%%
+%% merlin.mbs (with options: `head,exlang,ay,har,harnm,vonx,nm-revf,ed-rev,dt-end,yr-col,note-yr,tit-qq,atit-u,vnum-nr,volp-com,jwdvol,add-pub,pub-date,pre-edn,edpar,blk-com,svenska,pp,ed,abr,amper,and-xcom,etal-it,{}')
+%% svenska.mbs (with options: `exlang,ay,har,harnm,vonx,nm-revf,ed-rev,dt-end,yr-col,note-yr,tit-qq,atit-u,vnum-nr,volp-com,jwdvol,add-pub,pub-date,pre-edn,edpar,blk-com,svenska,pp,ed,abr,amper,and-xcom,etal-it,{}')
+%% merlin.mbs (with options: `tail,exlang,ay,har,harnm,vonx,nm-revf,ed-rev,dt-end,yr-col,note-yr,tit-qq,atit-u,vnum-nr,volp-com,jwdvol,add-pub,pub-date,pre-edn,edpar,blk-com,svenska,pp,ed,abr,amper,and-xcom,etal-it,{}')
+%% ----------------------------------------
+%% *** ***
+%%
+ %-------------------------------------------------------------------
+ % The original source file contains the following version information:
+ % \ProvidesFile{merlin.mbs}[1996/12/16 3.82 (PWD)]
+ %
+ % NOTICE:
+ % This file may be used for non-profit purposes.
+ % It may not be distributed in exchange for money,
+ % other than distribution costs.
+ %
+ % The author provides it `as is' and does not guarantee it in any way.
+ %
+ % Copyright (C) 1994, 1995, 1996 Patrick W. Daly
+ % Copyright (C) 1997 Peter Antman, peter.antman@abc.se
+ %-------------------------------------------------------------------
+ % For use with BibTeX version 0.99a or later
+ %-------------------------------------------------------------------
+ %
+ % This is an Oxford style bibliography. As such, it is
+ % non-standard LaTeX, and requires a special package file to function properly.
+ % Such a package is oxford.sty by Peter Antman
+ %
+ % The form of the bibitem entries is
+ % \harvarditem[Jones, New thesis]{Howard Jones, FULL ENTRY}{1990}{key}
+ % Jones, Howard, FULL ENTRY
+ %
+ % The style gives the full reference att the first citation and then a
+ % abrevated one.
+ %
+ % The file suports an additional entry in the bib-file, stitle. It is
+ % for all but the first citation, when only lastname, and if there are
+ % more lastnames that are the same, title (and if there is a stitle that
+ % instead).
+ %
+ % oxford.sty also inserts an ibid. if the current citation is the same
+ % as the last one.
+ %---------------------------------------------------------------------
+ %
+ % Hacked by Peter Antman to provide Oxford citation style.
+ % FIX: Year cite not correct everywhere ???
+ % changes version 0.2:
+ % moved note in article
+ % editor and key right in short.ref
+ % changes version 0.3:
+ % fixed editors in cite, now orde Firstname Lastname
+ % removed ( and ) around ed.
+ % removed comma before nr. if volume empty
+ % removed comma before year in article, misc and unpub
+ % changes version 0.4
+ % fixed ", " error produced in ouput.bibitem (thanks to
+ % Oren Patashnik for telling me how to do it)
+
+ENTRY
+ { address
+ author
+ booktitle
+ chapter
+ edition
+ editor
+ howpublished
+ institution
+ journal
+ key
+ month
+ note
+ number
+ organization
+ pages
+ publisher
+ school
+ series
+ stitle
+ title
+ type
+ URL
+ volume
+ year
+ }
+ {}
+ { label extra.label sort.label short.list }
+
+INTEGERS { output.state before.all mid.sentence after.sentence after.block }
+
+FUNCTION {init.state.consts}
+{ #0 'before.all :=
+ #1 'mid.sentence :=
+ #2 'after.sentence :=
+ #3 'after.block :=
+}
+
+STRINGS { s t }
+
+FUNCTION {output.nonnull}
+{ 's :=
+ output.state mid.sentence =
+ { ", " * write$ }
+ { output.state after.block =
+ { add.period$ write$
+ newline$
+ "\newblock " write$
+ }
+ { output.state before.all =
+ 'write$
+ { add.period$ " " * write$ }
+ if$
+ }
+ if$
+ mid.sentence 'output.state :=
+ }
+ if$
+ s
+}
+
+% BY Peter Antman, special function to get rid of comma before
+% year in article, misc and unpub, se also output.check.special
+FUNCTION {output.nonnull.special}
+{ 's :=
+ output.state mid.sentence =
+ { " " * write$ }
+ { output.state after.block =
+ { add.period$ write$
+ newline$
+ "\newblock " write$
+ }
+ { output.state before.all =
+ 'write$
+ { add.period$ " " * write$ }
+ if$
+ }
+ if$
+ mid.sentence 'output.state :=
+ }
+ if$
+ s
+}
+FUNCTION {output}
+{ duplicate$ empty$
+ 'pop$
+ 'output.nonnull
+ if$
+}
+
+FUNCTION {output.check.special}
+{ 't :=
+ duplicate$ empty$
+ { pop$ "empty " t * " in " * cite$ * warning$ }
+ 'output.nonnull.special
+ if$
+}
+
+
+FUNCTION {output.check}
+{ 't :=
+ duplicate$ empty$
+ { pop$ "empty " t * " in " * cite$ * warning$ }
+ 'output.nonnull
+ if$
+}
+
+FUNCTION {fin.entry}
+{ add.period$
+ write$
+ newline$
+}
+
+FUNCTION {new.block}
+{ output.state before.all =
+ 'skip$
+ { after.block 'output.state := }
+ if$
+}
+
+FUNCTION {new.sentence}
+{ output.state after.block =
+ 'skip$
+ { output.state before.all =
+ 'skip$
+ { after.sentence 'output.state := }
+ if$
+ }
+ if$
+}
+
+FUNCTION {add.blank}
+{ " " * before.all 'output.state :=
+}
+
+FUNCTION {date.block}
+{
+ skip$
+}
+
+FUNCTION {not}
+{ { #0 }
+ { #1 }
+ if$
+}
+
+FUNCTION {and}
+{ 'skip$
+ { pop$ #0 }
+ if$
+}
+
+FUNCTION {or}
+{ { pop$ #1 }
+ 'skip$
+ if$
+}
+
+FUNCTION {non.stop}
+{ duplicate$
+ "}" * add.period$
+ #-1 #1 substring$ "." =
+}
+
+FUNCTION {new.block.checkb}
+{ empty$
+ swap$ empty$
+ and
+ 'skip$
+ 'new.block
+ if$
+}
+
+FUNCTION {field.or.null}
+{ duplicate$ empty$
+ { pop$ "" }
+ 'skip$
+ if$
+}
+
+FUNCTION {emphasize}
+{ duplicate$ empty$
+ { pop$ "" }
+ { "{\em " swap$ * "\/}" * }
+ if$
+}
+
+FUNCTION {capitalize}
+{ "u" change.case$ "t" change.case$ }
+
+FUNCTION {space.word}
+{ " " swap$ * " " * }
+
+ % Here are the language-specific definitions for explicit words.
+ % Each function has a name bbl.xxx where xxx is the English word.
+ %-------------------------------------------------------------------
+ % The original source file contains the following version information:
+ % \ProvidesFile{english.mbs}[1995/05/04 1.1 (PWD)]
+ % Copyright (C) 1994, 1995 Patrick W. Dal
+ %-------------------------------------------------------------------
+
+ % The language selected here is ENGLISH
+
+FUNCTION {bbl.and}
+{ "and"}
+
+FUNCTION {bbl.editors}
+{ "eds." }
+
+FUNCTION {bbl.editor}
+{ "ed." }
+
+FUNCTION {bbl.edby}
+{ "edited by" }
+
+FUNCTION {bbl.edition}
+{ "edn." }
+
+FUNCTION {bbl.volume}
+{ "vol." }
+
+FUNCTION {bbl.of}
+{ "of" }
+
+FUNCTION {bbl.number}
+{ "no." }
+
+FUNCTION {bbl.nr}
+{ "no." }
+
+FUNCTION {bbl.in}
+{ "in" }
+
+FUNCTION {bbl.pages}
+{ "pp." }
+
+FUNCTION {bbl.page}
+{ "p." }
+
+FUNCTION {bbl.chapter}
+{ "chap." }
+
+FUNCTION {bbl.techrep}
+{ "Tech Rep." }
+
+FUNCTION {bbl.mthesis}
+{ "Master's thesis" }
+
+FUNCTION {bbl.phdthesis}
+{ "Ph.D. thesis"}
+
+FUNCTION {bbl.first}
+{ "1st" }
+
+FUNCTION {bbl.second}
+{ "2nd" }
+
+FUNCTION {bbl.third}
+{ "3rd" }
+
+FUNCTION {bbl.fourth}
+{ "4th" }
+
+FUNCTION {bbl.fifth}
+{ "5th" }
+
+FUNCTION {bbl.th}
+{ "th" }
+
+% BY Peter Antman, new functions bbl.lq bbl.rq
+FUNCTION {bbl.lq}
+{ "'" }
+
+FUNCTION {bbl.rq}
+{ "'" }
+
+MACRO {jan} {"Jan."}
+
+MACRO {feb} {"Feb."}
+
+MACRO {mar} {"Mar."}
+
+MACRO {apr} {"Apr."}
+
+MACRO {may} {"May"}
+
+MACRO {jun} {"Jun."}
+
+MACRO {jul} {"Jul."}
+
+MACRO {aug} {"Aug."}
+
+MACRO {sep} {"Sep."}
+
+MACRO {oct} {"Oct."}
+
+MACRO {nov} {"Nov."}
+
+MACRO {dec} {"Dec."}
+ % End of language definition file
+
+MACRO {acmcs} {"ACM Computing Surveys"}
+
+MACRO {acta} {"Acta Informatica"}
+
+MACRO {cacm} {"Communications of the ACM"}
+
+MACRO {ibmjrd} {"IBM Journal of Research and Development"}
+
+MACRO {ibmsj} {"IBM Systems Journal"}
+
+MACRO {ieeese} {"IEEE Transactions on Software Engineering"}
+
+MACRO {ieeetc} {"IEEE Transactions on Computers"}
+
+MACRO {ieeetcad}
+ {"IEEE Transactions on Computer-Aided Design of Integrated Circuits"}
+
+MACRO {ipl} {"Information Processing Letters"}
+
+MACRO {jacm} {"Journal of the ACM"}
+
+MACRO {jcss} {"Journal of Computer and System Sciences"}
+
+MACRO {scp} {"Science of Computer Programming"}
+
+MACRO {sicomp} {"SIAM Journal on Computing"}
+
+MACRO {tocs} {"ACM Transactions on Computer Systems"}
+
+MACRO {tods} {"ACM Transactions on Database Systems"}
+
+MACRO {tog} {"ACM Transactions on Graphics"}
+
+MACRO {toms} {"ACM Transactions on Mathematical Software"}
+
+MACRO {toois} {"ACM Transactions on Office Information Systems"}
+
+MACRO {toplas} {"ACM Transactions on Programming Languages and Systems"}
+
+MACRO {tcs} {"Theoretical Computer Science"}
+
+FUNCTION {write.url}
+{ URL empty$
+ { skip$ }
+ { "\newline\harvardurl{" URL * "}" * write$ newline$ }
+ if$
+}
+
+INTEGERS { nameptr namesleft numnames }
+
+FUNCTION {format.names}
+{ 's :=
+ #1 'nameptr :=
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ { s nameptr
+ "{vv~}{ll}{, jj}{, ff}" format.name$ 't :=
+ nameptr #1 >
+ {
+ namesleft #1 >
+ { ", " * t * }
+ {
+ t "others" =
+ { " " * "et~al." emphasize * }
+ { " \harvardand\ " * t * }
+ if$
+ }
+ if$
+ }
+ 't
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+}
+
+FUNCTION {format.names.ed}
+{ format.names }
+
+FUNCTION {format.key}
+{ empty$
+ { key field.or.null }
+ { "" }
+ if$
+}
+
+FUNCTION {format.authors}
+{ author empty$
+ { "" }
+ {
+ author format.names
+ }
+ if$
+}
+
+FUNCTION {format.editors}
+{ editor empty$
+ { "" }
+ {
+ editor format.names
+ editor num.names$ #1 >
+ { " " * bbl.editors * "" * }
+ { " " * bbl.editor * "" * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.in.editors}
+{ editor empty$
+ { "" }
+ { editor format.names.ed
+ editor num.names$ #1 >
+ { " " * bbl.editors * "" * }
+ { " " * bbl.editor * "" * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.title}
+{ title empty$
+ { "" }
+ { title
+ bbl.lq swap$ * % BY Peter Antman, uses bbl.lq
+ non.stop
+ { bbl.rq * ", " * } % BY Peter Antman, uses bbl.rq
+ { bbl.rq * " " * } % PROBLEM: comma after title in book
+ if$
+ }
+ if$
+}
+
+FUNCTION {end.quote.title}
+{ title empty$
+ 'skip$
+ { before.all 'output.state := }
+ if$
+}
+
+FUNCTION {format.full.names}
+{'s :=
+ #1 'nameptr :=
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ { s nameptr
+ "{vv~}{ll}" format.name$ 't :=
+ nameptr #1 >
+ {
+ namesleft #1 >
+ { ", " * t * }
+ {
+ t "others" =
+ { " " * "et~al." emphasize * }
+ { " \harvardand\ " * t * }
+ if$
+ }
+ if$
+ }
+ 't
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+}
+
+FUNCTION {author.editor.key.full}
+{ author empty$
+ { editor empty$
+ { key empty$
+ { cite$ #1 #3 substring$ }
+ 'key
+ if$
+ }
+ { editor format.full.names }
+ if$
+ }
+ { author format.full.names }
+ if$
+}
+
+FUNCTION {author.key.full}
+{ author empty$
+ { key empty$
+ { cite$ #1 #3 substring$ }
+ 'key
+ if$
+ }
+ { author format.full.names }
+ if$
+}
+
+FUNCTION {editor.key.full}
+{ editor empty$
+ { key empty$
+ { cite$ #1 #3 substring$ }
+ 'key
+ if$
+ }
+ { editor format.full.names }
+ if$
+}
+
+FUNCTION {make.full.names}
+{ type$ "book" =
+ type$ "inbook" =
+ or
+ 'author.editor.key.full
+ { type$ "proceedings" =
+ 'editor.key.full
+ 'author.key.full
+ if$
+ }
+ if$
+}
+
+% BY Peter Antman, function to format long cite
+FUNCTION {format.firstname}
+{ 's :=
+ #1 'nameptr :=
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ { s nameptr
+ "{ff }{jj }{vv }{ll}" format.name$ 't :=
+ nameptr #1 >
+ {
+ namesleft #1 >
+ { ", " * t * }
+ {
+ t "others" =
+ { " " * "et~al." emphasize * }
+ { " \harvardand\ " * t * }
+ if$
+ }
+ if$
+ }
+ 't
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+}
+
+% BY Peter Antman, function to format lastname
+FUNCTION {format.lastname}
+{ 's :=
+ #1 'nameptr :=
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ { s nameptr
+ "{ll}{}{}{}" format.name$ 't :=
+ nameptr #1 >
+ {
+ namesleft #1 >
+ { ", " * t * }
+ {
+ t "others" =
+ { " " * "et~al." emphasize * }
+ { " \harvardand\ " * t * }
+ if$
+ }
+ if$
+ }
+ 't
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+}
+
+% By Peter Antman, to format eds as Firstname Lastname
+FUNCTION {format.r.editors}
+{ editor empty$
+ { "" }
+ {
+ editor format.firstname
+ editor num.names$ #1 >
+ { " " * bbl.editors * "" * }
+ { " " * bbl.editor * "" * }
+ if$
+ }
+ if$
+}
+
+% BY Peter Antman, editors in Firstname Lastname
+FUNCTION {format.in.r.editors}
+{ editor empty$
+ { "" }
+ { editor format.firstname
+ editor num.names$ #1 >
+ { " " * bbl.editors * "" * }
+ { " " * bbl.editor * "" * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.au}
+{ author empty$
+ { "" }
+ {
+ author format.firstname
+ }
+ if$
+}
+FUNCTION {format.auth}
+{ author empty$
+ { editor empty$
+ {author format.key}
+ {editor format.lastname}
+ if$
+ }
+ {
+ author format.lastname
+ }
+ if$
+}
+
+% BY Peter Antman, the repeated
+% should contain name if no other name of the same
+% if more names of the same, then stitle
+% if no stitle, then title
+FUNCTION {short.ref}
+{
+% format.auth
+% ", " *
+% extra.label write$
+ extra.label "" =
+ {
+% format.auth
+ short.list % PANIC this is a bad bypas of not having solved ed.
+ "" * extra.label
+ }
+ { stitle empty$
+ {
+ format.auth
+ ", " * title
+ }
+ {
+ format.auth
+ ", " * stitle
+ }
+ if$
+ }
+ if$
+}
+
+FUNCTION {output.bibitem}
+{ newline$
+ "\harvarditem[" write$
+% short.ref duplicate$ label =
+ "" short.ref * "]" * write$
+ pop$ ""
+ "{" write$
+% pop$ % ERROR, does the right thing but produces error
+ before.all 'output.state :=
+}
+
+FUNCTION {end.bibitem}
+{ "}{" * write$
+ year duplicate$ empty$
+ { pop$ "????" }
+ 'skip$
+ if$
+ extra.label * "}{" * write$
+ cite$ write$
+ "}" write$
+ newline$
+ ""
+ before.all 'output.state :=
+}
+
+FUNCTION {n.dashify}
+{ 't :=
+ ""
+ { t empty$ not }
+ { t #1 #1 substring$ "-" =
+ { t #1 #2 substring$ "--" = not
+ { "--" *
+ t #2 global.max$ substring$ 't :=
+ }
+ { { t #1 #1 substring$ "-" = }
+ { "-" *
+ t #2 global.max$ substring$ 't :=
+ }
+ while$
+ }
+ if$
+ }
+ { t #1 #1 substring$ *
+ t #2 global.max$ substring$ 't :=
+ }
+ if$
+ }
+ while$
+}
+
+FUNCTION {word.in}
+{ bbl.in
+ " " * }
+
+FUNCTION {format.date}
+{ year duplicate$ empty$
+ { "empty year in " cite$ * "; set to ????" * warning$
+ pop$ "????" }
+ 'skip$
+ if$
+% extra.label * % BY Peter Antman, removed, not needed in Oxford
+ " (" swap$ * ")" *
+}
+
+FUNCTION {format.btitle}
+{ title emphasize
+}
+
+FUNCTION {tie.or.space.connect}
+{ duplicate$ text.length$ #3 <
+ { "~" }
+ { " " }
+ if$
+ swap$ * *
+}
+
+FUNCTION {either.or.check}
+{ empty$
+ 'pop$
+ { "can't use both " swap$ * " fields in " * cite$ * warning$ }
+ if$
+}
+
+FUNCTION {format.bvolume}
+{ volume empty$
+ { "" }
+ { bbl.volume volume tie.or.space.connect
+ series empty$
+ 'skip$
+ { bbl.of space.word * series emphasize * }
+ if$
+ "volume and number" number either.or.check
+ }
+ if$
+}
+
+FUNCTION {format.number.series}
+{ volume empty$
+ { number empty$
+ { series field.or.null }
+ { output.state mid.sentence =
+ { bbl.number }
+ { bbl.number capitalize }
+ if$
+ number tie.or.space.connect
+ series empty$
+ { "there's a number but no series in " cite$ * warning$ }
+ { bbl.in space.word * series * }
+ if$
+ }
+ if$
+ }
+ { "" }
+ if$
+}
+
+FUNCTION {is.num}
+{ chr.to.int$
+ duplicate$ "0" chr.to.int$ < not
+ swap$ "9" chr.to.int$ > not and
+}
+
+FUNCTION {extract.num}
+{ duplicate$ 't :=
+ "" 's :=
+ { t empty$ not }
+ { t #1 #1 substring$
+ t #2 global.max$ substring$ 't :=
+ duplicate$ is.num
+ { s swap$ * 's := }
+ { pop$ "" 't := }
+ if$
+ }
+ while$
+ s empty$
+ 'skip$
+ { pop$ s }
+ if$
+}
+
+FUNCTION {convert.edition}
+{ edition extract.num "l" change.case$ 's :=
+ s "first" = s "1" = or
+ { bbl.first 't := }
+ { s "second" = s "2" = or
+ { bbl.second 't := }
+ { s "third" = s "3" = or
+ { bbl.third 't := }
+ { s "fourth" = s "4" = or
+ { bbl.fourth 't := }
+ { s "fifth" = s "5" = or
+ { bbl.fifth 't := }
+ { s #1 #1 substring$ is.num
+ { s bbl.th * 't := }
+ { edition 't := }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+ t
+}
+
+FUNCTION {format.edition}
+{ edition empty$
+ { "" }
+ { output.state mid.sentence =
+ { convert.edition "l" change.case$ " " * bbl.edition * }
+ { convert.edition "t" change.case$ " " * bbl.edition * }
+ if$
+ }
+ if$
+}
+
+INTEGERS { multiresult }
+
+FUNCTION {multi.page.check}
+{ 't :=
+ #0 'multiresult :=
+ { multiresult not
+ t empty$ not
+ and
+ }
+ { t #1 #1 substring$
+ duplicate$ "-" =
+ swap$ duplicate$ "," =
+ swap$ "+" =
+ or or
+ { #1 'multiresult := }
+ { t #2 global.max$ substring$ 't := }
+ if$
+ }
+ while$
+ multiresult
+}
+
+FUNCTION {format.pages}
+{ pages empty$
+ { "" }
+ { pages multi.page.check
+ { bbl.pages pages n.dashify tie.or.space.connect }
+ { bbl.page pages tie.or.space.connect }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.journal.pages}
+{
+ pages empty$
+ 'skip$
+ { duplicate$ empty$
+ { pop$ format.pages }
+ { ", " * pages n.dashify * }
+ if$
+ }
+ if$
+}
+
+% BY Peter Antman, removed comma before bbl.nr if volume empty
+FUNCTION {format.vol.num.pages}
+{ volume field.or.null
+ volume empty$
+ 'skip$
+ { bbl.volume "~" * swap$ * }
+ if$
+ number empty$
+ 'skip$
+ {
+% " " bbl.nr * number tie.or.space.connect *
+ volume empty$
+ { " " bbl.nr * number tie.or.space.connect * }
+ { ", " bbl.nr * number tie.or.space.connect * }
+ if$
+ }
+ if$
+ format.journal.pages
+}
+
+FUNCTION {format.chapter.pages}
+{ chapter empty$
+ 'format.pages
+ { type empty$
+ { bbl.chapter }
+ { type "l" change.case$ }
+ if$
+ chapter tie.or.space.connect
+ pages empty$
+ 'skip$
+ { ", " * format.pages * }
+ if$
+ }
+ if$
+}
+
+% By Peter Antman, editors in Firstname Lastname order
+FUNCTION {format.in.r.ed.booktitle}
+{ booktitle empty$
+ { "" }
+ { editor empty$
+ { word.in booktitle emphasize * }
+ { word.in format.in.r.editors * ", " *
+ booktitle emphasize * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.in.ed.booktitle}
+{ booktitle empty$
+ { "" }
+ { editor empty$
+ { word.in booktitle emphasize * }
+ { word.in format.in.editors * ", " *
+ booktitle emphasize * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.thesis.type}
+{ type empty$
+ 'skip$
+ { pop$
+ type "t" change.case$
+ }
+ if$
+}
+
+FUNCTION {format.tr.number}
+{ type empty$
+ { bbl.techrep }
+ 'type
+ if$
+ number empty$
+ { "t" change.case$ }
+ { number tie.or.space.connect }
+ if$
+}
+
+FUNCTION {format.article.crossref}
+{
+ word.in
+ " \cite{" * crossref * "}" *
+}
+
+FUNCTION {format.book.crossref}
+{ volume empty$
+ { "empty volume in " cite$ * "'s crossref of " * crossref * warning$
+ word.in
+ }
+ { bbl.volume volume tie.or.space.connect
+ bbl.of space.word *
+ }
+ if$
+ " \cite{" * crossref * "}" *
+}
+
+FUNCTION {format.incoll.inproc.crossref}
+{
+ word.in
+ " \cite{" * crossref * "}" *
+}
+
+FUNCTION {format.publisher}
+{ publisher empty$
+ % "empty publisher in " cite$ * warning$ %dont like this warning
+ 'skip$
+ 'skip$
+ if$
+ ""
+ add.blank "(" *
+ address empty$
+ 'skip$
+ { address * }
+ if$
+ publisher empty$
+ 'skip$
+ { address empty$
+ 'skip$
+ { ": " * }
+ if$
+ publisher *
+ }
+ if$
+ year duplicate$ empty$
+ { "empty year in " cite$ * "; set to ????" * warning$
+ pop$ "????" }
+ 'skip$
+ if$
+ publisher empty$ address empty$ and
+ { * }
+ { ", " swap$ * * }
+ if$
+ ")" *
+ output
+}
+
+% BY Peter Antman, all types includes full ref
+FUNCTION {article}
+{ output.bibitem
+% pop$ % to get rid of ,
+ format.au "author" output.check % output instead of output check
+ author format.key output
+ format.title "title" output.check
+ end.quote.title
+ crossref missing$
+ { journal
+ emphasize
+ "journal" output.check
+ format.vol.num.pages output
+ }
+ { format.article.crossref output.nonnull
+ format.pages output
+ }
+ if$
+ format.date "year" output.check.special
+ note output
+ end.bibitem
+ format.authors "author" output.check
+ author format.key output
+ format.title "title" output.check
+ end.quote.title
+ crossref missing$
+ { journal
+ emphasize
+ "journal" output.check
+ format.vol.num.pages output
+ }
+ { format.article.crossref output.nonnull
+ format.pages output
+ }
+ if$
+ format.date "year" output.check.special
+ note output
+ fin.entry
+ write.url
+}
+
+FUNCTION {book}
+{ output.bibitem
+ author empty$
+ { format.r.editors "author and editor" output.check
+ editor format.key output
+ }
+ { format.au output.nonnull
+ crossref missing$
+ { "author and editor" editor either.or.check }
+ 'skip$
+ if$
+ }
+ if$
+ format.btitle "title" output.check
+ crossref missing$
+ { format.bvolume output
+ format.number.series output
+ format.edition output
+ note output
+ format.publisher
+ }
+ {
+ format.book.crossref output.nonnull
+ }
+ if$
+ end.bibitem
+ author empty$
+ { format.editors "author and editor" output.check
+ editor format.key output
+ }
+ { format.authors output.nonnull
+ crossref missing$
+ { "author and editor" editor either.or.check }
+ 'skip$
+ if$
+ }
+ if$
+ format.btitle "title" output.check
+ crossref missing$
+ { format.bvolume output
+ format.number.series output
+ format.edition output
+ note output
+ format.publisher
+ }
+ {
+ format.book.crossref output.nonnull
+ }
+ if$
+% note output
+ fin.entry
+ write.url
+}
+
+FUNCTION {booklet}
+{ output.bibitem
+ format.au output
+ author format.key output
+ format.title "title" output.check
+ end.quote.title
+ howpublished output
+% address output
+ note output
+% format.date "year" output.check
+ format.publisher
+ end.bibitem
+ format.authors output
+ author format.key output
+ format.title "title" output.check
+ end.quote.title
+ howpublished output
+% address output
+ note output
+% format.date "year" output.check
+ format.publisher
+ fin.entry
+ write.url
+}
+
+FUNCTION {inbook}
+{ output.bibitem
+ author empty$
+ { format.r.editors "author and editor" output.check
+ editor format.key output
+ }
+ { format.au output.nonnull
+ crossref missing$
+ { "author and editor" editor either.or.check }
+ 'skip$
+ if$
+ }
+ if$
+ format.btitle "title" output.check
+ crossref missing$
+ {
+ format.bvolume output
+ format.chapter.pages "chapter and pages" output.check
+ format.number.series output
+ format.edition output
+ note output
+ format.publisher
+ }
+ {
+ format.chapter.pages "chapter and pages" output.check
+ format.book.crossref output.nonnull
+ }
+ if$
+ end.bibitem
+ author empty$
+ { format.editors "author and editor" output.check
+ editor format.key output
+ }
+ { format.authors output.nonnull
+ crossref missing$
+ { "author and editor" editor either.or.check }
+ 'skip$
+ if$
+ }
+ if$
+ format.btitle "title" output.check
+ crossref missing$
+ {
+ format.bvolume output
+ format.chapter.pages "chapter and pages" output.check
+ format.number.series output
+ format.edition output
+ note output
+ format.publisher
+ }
+ {
+ format.chapter.pages "chapter and pages" output.check
+ format.book.crossref output.nonnull
+ }
+ if$
+% note output %note moved
+ fin.entry
+ write.url
+}
+
+FUNCTION {incollection}
+{ output.bibitem
+ format.au "author" output.check
+ author format.key output
+ format.title "title" output.check
+ end.quote.title
+ crossref missing$
+ { format.in.r.ed.booktitle "booktitle" output.check
+ format.bvolume output
+ format.number.series output
+ format.edition output
+ format.chapter.pages output
+ note output
+ format.publisher
+ }
+ { format.incoll.inproc.crossref output.nonnull
+ format.chapter.pages output
+ }
+ if$
+ end.bibitem
+ format.authors "author" output.check
+ author format.key output
+ format.title "title" output.check
+ end.quote.title
+ crossref missing$
+ { format.in.ed.booktitle "booktitle" output.check
+ format.bvolume output
+ format.number.series output
+ format.edition output
+ format.chapter.pages output
+ note output
+ format.publisher
+ }
+ { format.incoll.inproc.crossref output.nonnull
+ format.chapter.pages output
+ }
+ if$
+% note output %note moved
+ fin.entry
+ write.url
+}
+
+FUNCTION {inproceedings}
+{ output.bibitem
+ format.au "author" output.check
+ author format.key output
+ format.title "title" output.check
+ end.quote.title
+ crossref missing$
+ { format.in.r.ed.booktitle "booktitle" output.check
+ format.bvolume output
+ format.number.series output
+ format.pages output
+ note output
+ publisher empty$
+ { organization output
+% address output
+% format.date "year" output.check
+ format.publisher
+ }
+ { organization output
+ format.publisher
+ }
+ if$
+ }
+ { format.incoll.inproc.crossref output.nonnull
+ format.pages output
+ }
+ if$
+ end.bibitem
+ format.authors "author" output.check
+ author format.key output
+ format.title "title" output.check
+ end.quote.title
+ crossref missing$
+ { format.in.ed.booktitle "booktitle" output.check
+ format.bvolume output
+ format.number.series output
+ format.pages output
+ note output
+ publisher empty$
+ { organization output
+% address output
+% format.date "year" output.check
+ format.publisher
+ }
+ { organization output
+ format.publisher
+ }
+ if$
+ }
+ { format.incoll.inproc.crossref output.nonnull
+ format.pages output
+ }
+ if$
+% note output % note moved
+ fin.entry
+ write.url
+}
+
+FUNCTION {conference} { inproceedings }
+
+FUNCTION {manual}
+{ output.bibitem
+ format.au output
+ author format.key output
+ format.btitle "title" output.check
+ organization output
+% address output
+ format.edition output
+ note output
+% format.date "year" output.check
+ format.publisher
+ end.bibitem
+ format.authors output
+ author format.key output
+ format.btitle "title" output.check
+ organization output
+% address output
+ format.edition output
+ note output
+% format.date "year" output.check
+ format.publisher
+ fin.entry
+ write.url
+}
+
+FUNCTION {mastersthesis}
+{ output.bibitem
+ format.au "author" output.check
+ author format.key output
+ format.btitle "title" output.check
+ bbl.mthesis format.thesis.type output.nonnull
+ school "school" output.check
+% address output
+ note output
+% format.date "year" output.check
+ format.publisher
+ end.bibitem
+ format.authors "author" output.check
+ author format.key output
+ format.btitle "title" output.check
+ bbl.mthesis format.thesis.type output.nonnull
+ school "school" output.check
+% address output
+ note output
+% format.date "year" output.check
+ format.publisher
+ fin.entry
+ write.url
+}
+
+FUNCTION {misc}
+{ output.bibitem
+ format.au output
+ author format.key output
+ format.title output
+ end.quote.title
+ howpublished output
+ note output
+ format.date "year" output.check.special
+ end.bibitem
+ format.authors output
+ author format.key output
+ format.title output
+ end.quote.title
+ howpublished output
+ note output
+ format.date "year" output.check.special
+ fin.entry
+ write.url
+}
+
+FUNCTION {phdthesis}
+{ output.bibitem
+ format.au "author" output.check
+ author format.key output
+ format.btitle "title" output.check
+ bbl.phdthesis format.thesis.type output.nonnull
+ school "school" output.check
+% address output
+ note output
+% format.date "year" output.check
+ format.publisher
+ end.bibitem
+ format.authors "author" output.check
+ author format.key output
+ format.btitle "title" output.check
+ bbl.phdthesis format.thesis.type output.nonnull
+ school "school" output.check
+% address output
+ note output
+% format.date "year" output.check
+ format.publisher
+ fin.entry
+ write.url
+}
+
+FUNCTION {proceedings}
+{ output.bibitem
+ format.r.editors output
+ editor format.key output
+ format.btitle "title" output.check
+ format.bvolume output
+ format.number.series output
+% address output
+ organization output
+% publisher output
+ note output
+% format.date "year" output.check
+ format.publisher
+ end.bibitem
+ format.editors output
+ editor format.key output
+ format.btitle "title" output.check
+ format.bvolume output
+ format.number.series output
+% address output
+ organization output
+% publisher output
+ note output
+% format.date "year" output.check
+ format.publisher
+ fin.entry
+ write.url
+}
+
+FUNCTION {techreport}
+{ output.bibitem
+ format.au "author" output.check
+ author format.key output
+ format.title "title" output.check
+ end.quote.title
+ format.tr.number output.nonnull
+ institution "institution" output.check
+% address output
+ note output
+% format.date "year" output.check
+ format.publisher
+ end.bibitem
+ format.authors "author" output.check
+ author format.key output
+ format.title "title" output.check
+ end.quote.title
+ format.tr.number output.nonnull
+ institution "institution" output.check
+% address output
+ note output
+% format.date "year" output.check
+ format.publisher
+ fin.entry
+ write.url
+}
+
+FUNCTION {unpublished}
+{ output.bibitem
+ format.au "author" output.check
+ author format.key output
+ format.title "title" output.check
+ end.quote.title
+ note "note" output.check
+ format.date "year" output.check.special
+ end.bibitem
+ format.authors "author" output.check
+ author format.key output
+ format.title "title" output.check
+ end.quote.title
+ note "note" output.check
+ format.date "year" output.check.special
+ fin.entry
+ write.url
+}
+
+FUNCTION {default.type} { misc }
+
+READ
+
+FUNCTION {sortify}
+{ purify$
+ "l" change.case$
+}
+
+INTEGERS { len }
+
+FUNCTION {chop.word}
+{ 's :=
+ 'len :=
+ s #1 len substring$ =
+ { s len #1 + global.max$ substring$ }
+ 's
+ if$
+}
+
+FUNCTION {format.lab.names}
+{ 's :=
+ s #1 "{vv~}{ll}" format.name$
+ s num.names$ duplicate$
+ #2 >
+ { pop$ " " * "et~al." emphasize * }
+ { #2 <
+ 'skip$
+ { s #2 "{ff }{vv }{ll}{ jj}" format.name$ "others" =
+ { " " * "et~al." emphasize * }
+ { " \harvardand\ " * s #2 "{vv~}{ll}" format.name$ * }
+ if$
+ }
+ if$
+ }
+ if$
+}
+
+FUNCTION {author.key.label}
+{ author empty$
+ { key empty$
+ { cite$ #1 #3 substring$ }
+ 'key
+ if$
+ }
+ { author format.lab.names }
+ if$
+}
+
+FUNCTION {author.editor.key.label}
+{ author empty$
+ { editor empty$
+ { key empty$
+ { cite$ #1 #3 substring$ }
+ 'key
+ if$
+ }
+ { editor format.lab.names }
+ if$
+ }
+ { author format.lab.names }
+ if$
+}
+
+FUNCTION {editor.key.label}
+{ editor empty$
+ { key empty$
+ { cite$ #1 #3 substring$ }
+ 'key
+ if$
+ }
+ { editor format.lab.names }
+ if$
+}
+
+FUNCTION {calc.short.authors}
+{ type$ "book" =
+ type$ "inbook" =
+ or
+ 'author.editor.key.label
+ { type$ "proceedings" =
+ 'editor.key.label
+ 'author.key.label
+ if$
+ }
+ if$
+ 'short.list :=
+}
+
+FUNCTION {calc.label}
+{ calc.short.authors
+ short.list
+ ", "
+ *
+ year duplicate$ empty$
+ { pop$ "????" }
+ 'skip$
+ if$
+ *
+ 'label :=
+}
+
+FUNCTION {calc.short.label}
+{ calc.short.authors short.list
+ 'label :=
+}
+
+FUNCTION {sort.format.names}
+{ 's :=
+ #1 'nameptr :=
+ ""
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ { s nameptr
+ "{ll{ }}{ ff{ }}{ jj{ }}"
+ format.name$ 't :=
+ nameptr #1 >
+ {
+ " " *
+ namesleft #1 = t "others" = and
+ { "aaaaa" * }
+ { t sortify * }
+ if$
+ }
+ { t sortify * }
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+}
+
+FUNCTION {sort.format.title}
+{ 't :=
+ "A " #2
+ "An " #3
+ "The " #4 t chop.word
+ chop.word
+ chop.word
+ sortify
+ #1 global.max$ substring$
+}
+
+FUNCTION {author.sort}
+{ author empty$
+ { key empty$
+ { "to sort, need author or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { author sort.format.names }
+ if$
+}
+
+FUNCTION {author.editor.sort}
+{ author empty$
+ { editor empty$
+ { key empty$
+ { "to sort, need author, editor, or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { editor sort.format.names }
+ if$
+ }
+ { author sort.format.names }
+ if$
+}
+
+FUNCTION {editor.sort}
+{ editor empty$
+ { key empty$
+ { "to sort, need editor or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { editor sort.format.names }
+ if$
+}
+
+FUNCTION {presort}
+{ calc.label
+ label sortify
+ " "
+ *
+ type$ "book" =
+ type$ "inbook" =
+ or
+ 'author.editor.sort
+ { type$ "proceedings" =
+ 'editor.sort
+ 'author.sort
+ if$
+ }
+ if$
+ #1 entry.max$ substring$
+ 'sort.label :=
+ sort.label
+ *
+ " "
+ *
+ title field.or.null
+ sort.format.title
+ *
+ #1 entry.max$ substring$
+ 'sort.key$ :=
+}
+
+ITERATE {presort}
+
+SORT
+
+STRINGS { last.label next.extra }
+
+INTEGERS { last.extra.num number.label }
+
+FUNCTION {initialize.extra.label.stuff}
+{ #0 int.to.chr$ 'last.label :=
+ "" 'next.extra :=
+ #0 'last.extra.num :=
+ #0 'number.label :=
+}
+
+FUNCTION {not.uniq.forw}
+{ last.label short.list =
+ { last.extra.num #1 + 'last.extra.num :=
+ last.extra.num int.to.chr$ 'extra.label :=
+ }
+ { "a" chr.to.int$ 'last.extra.num :=
+ "" 'extra.label :=
+ short.list 'last.label :=
+ }
+ if$
+ number.label #1 + 'number.label :=
+% label write$
+}
+
+FUNCTION {not.uniq.rew}
+{ next.extra "b" =
+ { "a" 'extra.label := }
+ 'skip$
+ if$
+ extra.label 'next.extra :=
+ extra.label
+ duplicate$ empty$
+ 'skip$
+ { "" swap$ * "" * }
+ if$
+ 'extra.label :=
+}
+
+FUNCTION {forward.pass}
+{ last.label label =
+ { last.extra.num #1 + 'last.extra.num :=
+ last.extra.num int.to.chr$ 'extra.label :=
+ }
+ { "a" chr.to.int$ 'last.extra.num :=
+ "" 'extra.label :=
+ label 'last.label :=
+ }
+ if$
+ number.label #1 + 'number.label :=
+% label write$
+}
+
+FUNCTION {reverse.pass}
+{ next.extra "b" =
+ { "a" 'extra.label := }
+ 'skip$
+ if$
+ extra.label 'next.extra :=
+ extra.label
+ duplicate$ empty$
+ 'skip$
+ { "" swap$ * "" * }
+ if$
+ 'extra.label :=
+}
+
+EXECUTE {initialize.extra.label.stuff}
+
+%ITERATE {forward.pass}
+
+ITERATE {not.uniq.forw}
+
+REVERSE {not.uniq.rew}
+
+%REVERSE {reverse.pass}
+
+FUNCTION {bib.sort.order}
+{ sort.label
+ " "
+ *
+ year field.or.null sortify
+ *
+ " "
+ *
+ title field.or.null
+ sort.format.title
+ *
+ #1 entry.max$ substring$
+ 'sort.key$ :=
+ calc.short.label
+}
+
+ITERATE {bib.sort.order}
+
+SORT
+
+FUNCTION {begin.bib}
+{ preamble$ empty$
+ 'skip$
+ { preamble$ write$ newline$ }
+ if$
+ "\begin{thebibliography}{" number.label int.to.str$ * "}" *
+ write$ newline$
+% "\newcommand{\enquote}[1]{``#1''}"
+% write$ newline$
+% "\expandafter\ifx\csname natexlab\endcsname\relax\def\natexlab#1{#1}\fi"
+% write$ newline$
+}
+
+EXECUTE {begin.bib}
+
+EXECUTE {init.state.consts}
+
+ITERATE {call.type$}
+
+FUNCTION {end.bib}
+{ newline$
+ "\end{thebibliography}" write$ newline$
+}
+
+EXECUTE {end.bib}
+%% End of customized bst file
+%%
+%% End of file `svenska.bst'.
diff --git a/biblio/bibtex/contrib/oxford/oxford_se.bst b/biblio/bibtex/contrib/oxford/oxford_se.bst
new file mode 100644
index 0000000000..fcb3d408bc
--- /dev/null
+++ b/biblio/bibtex/contrib/oxford/oxford_se.bst
@@ -0,0 +1,1890 @@
+%%
+%% This is file `oxford_se.bst', version 0.4
+%% It was first generated with the docstrip utility in custom-bib
+%% and then heavily hacked by Peter Antman.
+%%
+%% This file must still bee considered beta.
+%%
+%% This version is for swedish citation, to get other languages to work
+%% rename it and insert the right bbl.xxx funcions and MACROS from
+%% the right mbd-file, availible with custom-bib. There are two new such
+%% commands, bbl.lq (leftquote) and bbl.rq (rightquote). Here you give
+%% your languages way of quoting titles.
+%%
+%% The original source files were:
+%%
+%% merlin.mbs (with options: `head,exlang,ay,har,harnm,vonx,nm-revf,ed-rev,dt-end,yr-col,note-yr,tit-qq,atit-u,vnum-nr,volp-com,jwdvol,add-pub,pub-date,pre-edn,edpar,blk-com,svenska,pp,ed,abr,amper,and-xcom,etal-it,{}')
+%% svenska.mbs (with options: `exlang,ay,har,harnm,vonx,nm-revf,ed-rev,dt-end,yr-col,note-yr,tit-qq,atit-u,vnum-nr,volp-com,jwdvol,add-pub,pub-date,pre-edn,edpar,blk-com,svenska,pp,ed,abr,amper,and-xcom,etal-it,{}')
+%% merlin.mbs (with options: `tail,exlang,ay,har,harnm,vonx,nm-revf,ed-rev,dt-end,yr-col,note-yr,tit-qq,atit-u,vnum-nr,volp-com,jwdvol,add-pub,pub-date,pre-edn,edpar,blk-com,svenska,pp,ed,abr,amper,and-xcom,etal-it,{}')
+%% ----------------------------------------
+%% *** ***
+%%
+ %-------------------------------------------------------------------
+ % The original source file contains the following version information:
+ % \ProvidesFile{merlin.mbs}[1996/12/16 3.82 (PWD)]
+ %
+ % NOTICE:
+ % This file may be used for non-profit purposes.
+ % It may not be distributed in exchange for money,
+ % other than distribution costs.
+ %
+ % The author provides it `as is' and does not guarantee it in any way.
+ %
+ % Copyright (C) 1994, 1995, 1996 Patrick W. Daly
+ % Copyright (C) 1997 Peter Antman, peter.antman@abc.se
+ %-------------------------------------------------------------------
+ % For use with BibTeX version 0.99a or later
+ %-------------------------------------------------------------------
+ %
+ % This is an Oxford style bibliography. As such, it is
+ % non-standard LaTeX, and requires a special package file to function properly.
+ % Such a package is oxford.sty by Peter Antman
+ %
+ % The form of the bibitem entries is
+ % \harvarditem[Jones, New thesis]{Howard Jones, FULL ENTRY}{1990}{key}
+ % Jones, Howard, FULL ENTRY
+ %
+ % The style gives the full reference att the first citation and then a
+ % abrevated one.
+ %
+ % The file suports an additional entry in the bib-file, stitle. It is
+ % for all but the first citation, when only lastname, and if there are
+ % more lastnames that are the same, title (and if there is a stitle that
+ % instead).
+ %
+ % oxford.sty also inserts an ibid. if the current citation is the same
+ % as the last one.
+ %---------------------------------------------------------------------
+ %
+ % Hacked by Peter Antman to provide Oxford citation style.
+ % FIX: Year cite not correct everywhere ???
+ % changes version 0.2:
+ % moved note in article
+ % editor and key right in short.ref
+ % changes version 0.3:
+ % fixed editors in cite, now orde Firstname Lastname
+ % removed ( and ) around ed.
+ % removed comma before nr. if volume empty
+ % removed comma before year in article, misc and unpub
+ % changes version 0.4
+ % fixed ", " error produced in ouput.bibitem (thanks to
+ % Oren Patashnik for telling me how to do it)
+
+ENTRY
+ { address
+ author
+ booktitle
+ chapter
+ edition
+ editor
+ howpublished
+ institution
+ journal
+ key
+ month
+ note
+ number
+ organization
+ pages
+ publisher
+ school
+ series
+ stitle
+ title
+ type
+ URL
+ volume
+ year
+ }
+ {}
+ { label extra.label sort.label short.list }
+
+INTEGERS { output.state before.all mid.sentence after.sentence after.block }
+
+FUNCTION {init.state.consts}
+{ #0 'before.all :=
+ #1 'mid.sentence :=
+ #2 'after.sentence :=
+ #3 'after.block :=
+}
+
+STRINGS { s t }
+
+FUNCTION {output.nonnull}
+{ 's :=
+ output.state mid.sentence =
+ { ", " * write$ }
+ { output.state after.block =
+ { add.period$ write$
+ newline$
+ "\newblock " write$
+ }
+ { output.state before.all =
+ 'write$
+ { add.period$ " " * write$ }
+ if$
+ }
+ if$
+ mid.sentence 'output.state :=
+ }
+ if$
+ s
+}
+
+% BY Peter Antman, special function to get rid of comma before
+% year in article, misc and unpub, se also output.check.special
+FUNCTION {output.nonnull.special}
+{ 's :=
+ output.state mid.sentence =
+ { " " * write$ }
+ { output.state after.block =
+ { add.period$ write$
+ newline$
+ "\newblock " write$
+ }
+ { output.state before.all =
+ 'write$
+ { add.period$ " " * write$ }
+ if$
+ }
+ if$
+ mid.sentence 'output.state :=
+ }
+ if$
+ s
+}
+FUNCTION {output}
+{ duplicate$ empty$
+ 'pop$
+ 'output.nonnull
+ if$
+}
+
+FUNCTION {output.check.special}
+{ 't :=
+ duplicate$ empty$
+ { pop$ "empty " t * " in " * cite$ * warning$ }
+ 'output.nonnull.special
+ if$
+}
+
+
+FUNCTION {output.check}
+{ 't :=
+ duplicate$ empty$
+ { pop$ "empty " t * " in " * cite$ * warning$ }
+ 'output.nonnull
+ if$
+}
+
+FUNCTION {fin.entry}
+{ add.period$
+ write$
+ newline$
+}
+
+FUNCTION {new.block}
+{ output.state before.all =
+ 'skip$
+ { after.block 'output.state := }
+ if$
+}
+
+FUNCTION {new.sentence}
+{ output.state after.block =
+ 'skip$
+ { output.state before.all =
+ 'skip$
+ { after.sentence 'output.state := }
+ if$
+ }
+ if$
+}
+
+FUNCTION {add.blank}
+{ " " * before.all 'output.state :=
+}
+
+FUNCTION {date.block}
+{
+ skip$
+}
+
+FUNCTION {not}
+{ { #0 }
+ { #1 }
+ if$
+}
+
+FUNCTION {and}
+{ 'skip$
+ { pop$ #0 }
+ if$
+}
+
+FUNCTION {or}
+{ { pop$ #1 }
+ 'skip$
+ if$
+}
+
+FUNCTION {non.stop}
+{ duplicate$
+ "}" * add.period$
+ #-1 #1 substring$ "." =
+}
+
+FUNCTION {new.block.checkb}
+{ empty$
+ swap$ empty$
+ and
+ 'skip$
+ 'new.block
+ if$
+}
+
+FUNCTION {field.or.null}
+{ duplicate$ empty$
+ { pop$ "" }
+ 'skip$
+ if$
+}
+
+FUNCTION {emphasize}
+{ duplicate$ empty$
+ { pop$ "" }
+ { "{\em " swap$ * "\/}" * }
+ if$
+}
+
+FUNCTION {capitalize}
+{ "u" change.case$ "t" change.case$ }
+
+FUNCTION {space.word}
+{ " " swap$ * " " * }
+
+ % Here are the language-specific definitions for explicit words.
+ % Each function has a name bbl.xxx where xxx is the English word.
+ %-------------------------------------------------------------------
+ % The original source file contains the following version information:
+ % \ProvidesFile{svenska.mbs}[1995/08/07 1.0 (RL/PWD)]
+ % Copyright (C) 1997, Peter Antman
+ %-------------------------------------------------------------------
+
+ % The language selected here is SVENSKA
+
+FUNCTION {bbl.and}
+{ "och"}
+
+FUNCTION {bbl.editors}
+{ "red." }
+
+FUNCTION {bbl.editor}
+{ "red." }
+
+FUNCTION {bbl.edby}
+{ "redigerad av" }
+
+FUNCTION {bbl.edition}
+{ "uppl." }
+
+FUNCTION {bbl.volume}
+{ "vol." }
+
+FUNCTION {bbl.of}
+{ "av" }
+
+FUNCTION {bbl.number}
+{ "nr." }
+
+FUNCTION {bbl.nr}
+{ "nr." }
+
+FUNCTION {bbl.in}
+{ "i" }
+
+FUNCTION {bbl.pages}
+{ "ss." }
+
+FUNCTION {bbl.page}
+{ "s." }
+
+FUNCTION {bbl.chapter}
+{ "kap." }
+
+FUNCTION {bbl.techrep}
+{ "Tekn. rap." }
+
+FUNCTION {bbl.mthesis}
+{ "Licenciatavgandling" }
+
+FUNCTION {bbl.phdthesis}
+{ "Doktorgradsavhandling" }
+
+FUNCTION {bbl.first}
+{ "F^^f6rsta" }
+
+FUNCTION {bbl.second}
+{ "Andra" }
+
+FUNCTION {bbl.third}
+{ "Tredje" }
+
+FUNCTION {bbl.fourth}
+{ "Fj^^e4rde" }
+
+FUNCTION {bbl.fifth}
+{ "Femte" }
+
+FUNCTION {bbl.th}
+{ "." }
+
+% BY Peter Antman, new functions bbl.lq bbl.rq
+FUNCTION {bbl.lq}
+{ "''" }
+
+FUNCTION {bbl.rq}
+{ "''" }
+
+MACRO {jan} {"Jan."}
+
+MACRO {feb} {"Feb."}
+
+MACRO {mar} {"Mar."}
+
+MACRO {apr} {"Apr."}
+
+MACRO {may} {"Maj"}
+
+MACRO {jun} {"Jun."}
+
+MACRO {jul} {"Jul."}
+
+MACRO {aug} {"Aug."}
+
+MACRO {sep} {"Sep."}
+
+MACRO {oct} {"Oct."}
+
+MACRO {nov} {"Nov."}
+
+MACRO {dec} {"Dec."}
+
+ % End of language definition file
+
+MACRO {acmcs} {"ACM Computing Surveys"}
+
+MACRO {acta} {"Acta Informatica"}
+
+MACRO {cacm} {"Communications of the ACM"}
+
+MACRO {ibmjrd} {"IBM Journal of Research and Development"}
+
+MACRO {ibmsj} {"IBM Systems Journal"}
+
+MACRO {ieeese} {"IEEE Transactions on Software Engineering"}
+
+MACRO {ieeetc} {"IEEE Transactions on Computers"}
+
+MACRO {ieeetcad}
+ {"IEEE Transactions on Computer-Aided Design of Integrated Circuits"}
+
+MACRO {ipl} {"Information Processing Letters"}
+
+MACRO {jacm} {"Journal of the ACM"}
+
+MACRO {jcss} {"Journal of Computer and System Sciences"}
+
+MACRO {scp} {"Science of Computer Programming"}
+
+MACRO {sicomp} {"SIAM Journal on Computing"}
+
+MACRO {tocs} {"ACM Transactions on Computer Systems"}
+
+MACRO {tods} {"ACM Transactions on Database Systems"}
+
+MACRO {tog} {"ACM Transactions on Graphics"}
+
+MACRO {toms} {"ACM Transactions on Mathematical Software"}
+
+MACRO {toois} {"ACM Transactions on Office Information Systems"}
+
+MACRO {toplas} {"ACM Transactions on Programming Languages and Systems"}
+
+MACRO {tcs} {"Theoretical Computer Science"}
+
+FUNCTION {write.url}
+{ URL empty$
+ { skip$ }
+ { "\newline\harvardurl{" URL * "}" * write$ newline$ }
+ if$
+}
+
+INTEGERS { nameptr namesleft numnames }
+
+FUNCTION {format.names}
+{ 's :=
+ #1 'nameptr :=
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ { s nameptr
+ "{vv~}{ll}{, jj}{, ff}" format.name$ 't :=
+ nameptr #1 >
+ {
+ namesleft #1 >
+ { ", " * t * }
+ {
+ t "others" =
+ { " " * "et~al." emphasize * }
+ { " \harvardand\ " * t * }
+ if$
+ }
+ if$
+ }
+ 't
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+}
+
+FUNCTION {format.names.ed}
+{ format.names }
+
+FUNCTION {format.key}
+{ empty$
+ { key field.or.null }
+ { "" }
+ if$
+}
+
+FUNCTION {format.authors}
+{ author empty$
+ { "" }
+ {
+ author format.names
+ }
+ if$
+}
+
+FUNCTION {format.editors}
+{ editor empty$
+ { "" }
+ {
+ editor format.names
+ editor num.names$ #1 >
+ { " " * bbl.editors * "" * }
+ { " " * bbl.editor * "" * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.in.editors}
+{ editor empty$
+ { "" }
+ { editor format.names.ed
+ editor num.names$ #1 >
+ { " " * bbl.editors * "" * }
+ { " " * bbl.editor * "" * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.title}
+{ title empty$
+ { "" }
+ { title
+ bbl.lq swap$ * % BY Peter Antman, uses bbl.lq
+ non.stop
+ { bbl.rq * ", " * } % BY Peter Antman, uses bbl.rq
+ { bbl.rq * " " * } % PROBLEM: comma after title in book
+ if$
+ }
+ if$
+}
+
+FUNCTION {end.quote.title}
+{ title empty$
+ 'skip$
+ { before.all 'output.state := }
+ if$
+}
+
+FUNCTION {format.full.names}
+{'s :=
+ #1 'nameptr :=
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ { s nameptr
+ "{vv~}{ll}" format.name$ 't :=
+ nameptr #1 >
+ {
+ namesleft #1 >
+ { ", " * t * }
+ {
+ t "others" =
+ { " " * "et~al." emphasize * }
+ { " \harvardand\ " * t * }
+ if$
+ }
+ if$
+ }
+ 't
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+}
+
+FUNCTION {author.editor.key.full}
+{ author empty$
+ { editor empty$
+ { key empty$
+ { cite$ #1 #3 substring$ }
+ 'key
+ if$
+ }
+ { editor format.full.names }
+ if$
+ }
+ { author format.full.names }
+ if$
+}
+
+FUNCTION {author.key.full}
+{ author empty$
+ { key empty$
+ { cite$ #1 #3 substring$ }
+ 'key
+ if$
+ }
+ { author format.full.names }
+ if$
+}
+
+FUNCTION {editor.key.full}
+{ editor empty$
+ { key empty$
+ { cite$ #1 #3 substring$ }
+ 'key
+ if$
+ }
+ { editor format.full.names }
+ if$
+}
+
+FUNCTION {make.full.names}
+{ type$ "book" =
+ type$ "inbook" =
+ or
+ 'author.editor.key.full
+ { type$ "proceedings" =
+ 'editor.key.full
+ 'author.key.full
+ if$
+ }
+ if$
+}
+
+% BY Peter Antman, function to format long cite
+FUNCTION {format.firstname}
+{ 's :=
+ #1 'nameptr :=
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ { s nameptr
+ "{ff }{jj }{vv }{ll}" format.name$ 't :=
+ nameptr #1 >
+ {
+ namesleft #1 >
+ { ", " * t * }
+ {
+ t "others" =
+ { " " * "et~al." emphasize * }
+ { " \harvardand\ " * t * }
+ if$
+ }
+ if$
+ }
+ 't
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+}
+
+% BY Peter Antman, function to format lastname
+FUNCTION {format.lastname}
+{ 's :=
+ #1 'nameptr :=
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ { s nameptr
+ "{ll}{}{}{}" format.name$ 't :=
+ nameptr #1 >
+ {
+ namesleft #1 >
+ { ", " * t * }
+ {
+ t "others" =
+ { " " * "et~al." emphasize * }
+ { " \harvardand\ " * t * }
+ if$
+ }
+ if$
+ }
+ 't
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+}
+
+% By Peter Antman, to format eds as Firstname Lastname
+FUNCTION {format.r.editors}
+{ editor empty$
+ { "" }
+ {
+ editor format.firstname
+ editor num.names$ #1 >
+ { " " * bbl.editors * "" * }
+ { " " * bbl.editor * "" * }
+ if$
+ }
+ if$
+}
+
+% BY Peter Antman, editors in Firstname Lastname
+FUNCTION {format.in.r.editors}
+{ editor empty$
+ { "" }
+ { editor format.firstname
+ editor num.names$ #1 >
+ { " " * bbl.editors * "" * }
+ { " " * bbl.editor * "" * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.au}
+{ author empty$
+ { "" }
+ {
+ author format.firstname
+ }
+ if$
+}
+FUNCTION {format.auth}
+{ author empty$
+ { editor empty$
+ {author format.key}
+ {editor format.lastname}
+ if$
+ }
+ {
+ author format.lastname
+ }
+ if$
+}
+
+% BY Peter Antman, the repeated
+% should contain name if no other name of the same
+% if more names of the same, then stitle
+% if no stitle, then title
+FUNCTION {short.ref}
+{
+% format.auth
+% ", " *
+% extra.label write$
+ extra.label "" =
+ {
+% format.auth
+ short.list % PANIC this is a bad bypas of not having solved ed.
+ "" * extra.label
+ }
+ { stitle empty$
+ {
+ format.auth
+ ", " * title
+ }
+ {
+ format.auth
+ ", " * stitle
+ }
+ if$
+ }
+ if$
+}
+
+FUNCTION {output.bibitem}
+{ newline$
+ "\harvarditem[" write$
+% short.ref duplicate$ label =
+ "" short.ref * "]" * write$
+ pop$ ""
+ "{" write$
+% pop$ % ERROR, does the right thing but produces error
+ before.all 'output.state :=
+}
+
+FUNCTION {end.bibitem}
+{ "}{" * write$
+ year duplicate$ empty$
+ { pop$ "????" }
+ 'skip$
+ if$
+ extra.label * "}{" * write$
+ cite$ write$
+ "}" write$
+ newline$
+ ""
+ before.all 'output.state :=
+}
+
+FUNCTION {n.dashify}
+{ 't :=
+ ""
+ { t empty$ not }
+ { t #1 #1 substring$ "-" =
+ { t #1 #2 substring$ "--" = not
+ { "--" *
+ t #2 global.max$ substring$ 't :=
+ }
+ { { t #1 #1 substring$ "-" = }
+ { "-" *
+ t #2 global.max$ substring$ 't :=
+ }
+ while$
+ }
+ if$
+ }
+ { t #1 #1 substring$ *
+ t #2 global.max$ substring$ 't :=
+ }
+ if$
+ }
+ while$
+}
+
+FUNCTION {word.in}
+{ bbl.in
+ " " * }
+
+FUNCTION {format.date}
+{ year duplicate$ empty$
+ { "empty year in " cite$ * "; set to ????" * warning$
+ pop$ "????" }
+ 'skip$
+ if$
+% extra.label * % BY Peter Antman, removed, not needed in Oxford
+ " (" swap$ * ")" *
+}
+
+FUNCTION {format.btitle}
+{ title emphasize
+}
+
+FUNCTION {tie.or.space.connect}
+{ duplicate$ text.length$ #3 <
+ { "~" }
+ { " " }
+ if$
+ swap$ * *
+}
+
+FUNCTION {either.or.check}
+{ empty$
+ 'pop$
+ { "can't use both " swap$ * " fields in " * cite$ * warning$ }
+ if$
+}
+
+FUNCTION {format.bvolume}
+{ volume empty$
+ { "" }
+ { bbl.volume volume tie.or.space.connect
+ series empty$
+ 'skip$
+ { bbl.of space.word * series emphasize * }
+ if$
+ "volume and number" number either.or.check
+ }
+ if$
+}
+
+FUNCTION {format.number.series}
+{ volume empty$
+ { number empty$
+ { series field.or.null }
+ { output.state mid.sentence =
+ { bbl.number }
+ { bbl.number capitalize }
+ if$
+ number tie.or.space.connect
+ series empty$
+ { "there's a number but no series in " cite$ * warning$ }
+ { bbl.in space.word * series * }
+ if$
+ }
+ if$
+ }
+ { "" }
+ if$
+}
+
+FUNCTION {is.num}
+{ chr.to.int$
+ duplicate$ "0" chr.to.int$ < not
+ swap$ "9" chr.to.int$ > not and
+}
+
+FUNCTION {extract.num}
+{ duplicate$ 't :=
+ "" 's :=
+ { t empty$ not }
+ { t #1 #1 substring$
+ t #2 global.max$ substring$ 't :=
+ duplicate$ is.num
+ { s swap$ * 's := }
+ { pop$ "" 't := }
+ if$
+ }
+ while$
+ s empty$
+ 'skip$
+ { pop$ s }
+ if$
+}
+
+FUNCTION {convert.edition}
+{ edition extract.num "l" change.case$ 's :=
+ s "first" = s "1" = or
+ { bbl.first 't := }
+ { s "second" = s "2" = or
+ { bbl.second 't := }
+ { s "third" = s "3" = or
+ { bbl.third 't := }
+ { s "fourth" = s "4" = or
+ { bbl.fourth 't := }
+ { s "fifth" = s "5" = or
+ { bbl.fifth 't := }
+ { s #1 #1 substring$ is.num
+ { s bbl.th * 't := }
+ { edition 't := }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+ t
+}
+
+FUNCTION {format.edition}
+{ edition empty$
+ { "" }
+ { output.state mid.sentence =
+ { convert.edition "l" change.case$ " " * bbl.edition * }
+ { convert.edition "t" change.case$ " " * bbl.edition * }
+ if$
+ }
+ if$
+}
+
+INTEGERS { multiresult }
+
+FUNCTION {multi.page.check}
+{ 't :=
+ #0 'multiresult :=
+ { multiresult not
+ t empty$ not
+ and
+ }
+ { t #1 #1 substring$
+ duplicate$ "-" =
+ swap$ duplicate$ "," =
+ swap$ "+" =
+ or or
+ { #1 'multiresult := }
+ { t #2 global.max$ substring$ 't := }
+ if$
+ }
+ while$
+ multiresult
+}
+
+FUNCTION {format.pages}
+{ pages empty$
+ { "" }
+ { pages multi.page.check
+ { bbl.pages pages n.dashify tie.or.space.connect }
+ { bbl.page pages tie.or.space.connect }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.journal.pages}
+{
+ pages empty$
+ 'skip$
+ { duplicate$ empty$
+ { pop$ format.pages }
+ { ", " * pages n.dashify * }
+ if$
+ }
+ if$
+}
+
+% BY Peter Antman, removed comma before bbl.nr if volume empty
+FUNCTION {format.vol.num.pages}
+{ volume field.or.null
+ volume empty$
+ 'skip$
+ { bbl.volume "~" * swap$ * }
+ if$
+ number empty$
+ 'skip$
+ {
+% " " bbl.nr * number tie.or.space.connect *
+ volume empty$
+ { " " bbl.nr * number tie.or.space.connect * }
+ { ", " bbl.nr * number tie.or.space.connect * }
+ if$
+ }
+ if$
+ format.journal.pages
+}
+
+FUNCTION {format.chapter.pages}
+{ chapter empty$
+ 'format.pages
+ { type empty$
+ { bbl.chapter }
+ { type "l" change.case$ }
+ if$
+ chapter tie.or.space.connect
+ pages empty$
+ 'skip$
+ { ", " * format.pages * }
+ if$
+ }
+ if$
+}
+
+% By Peter Antman, editors in Firstname Lastname order
+FUNCTION {format.in.r.ed.booktitle}
+{ booktitle empty$
+ { "" }
+ { editor empty$
+ { word.in booktitle emphasize * }
+ { word.in format.in.r.editors * ", " *
+ booktitle emphasize * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.in.ed.booktitle}
+{ booktitle empty$
+ { "" }
+ { editor empty$
+ { word.in booktitle emphasize * }
+ { word.in format.in.editors * ", " *
+ booktitle emphasize * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.thesis.type}
+{ type empty$
+ 'skip$
+ { pop$
+ type "t" change.case$
+ }
+ if$
+}
+
+FUNCTION {format.tr.number}
+{ type empty$
+ { bbl.techrep }
+ 'type
+ if$
+ number empty$
+ { "t" change.case$ }
+ { number tie.or.space.connect }
+ if$
+}
+
+FUNCTION {format.article.crossref}
+{
+ word.in
+ " \cite{" * crossref * "}" *
+}
+
+FUNCTION {format.book.crossref}
+{ volume empty$
+ { "empty volume in " cite$ * "'s crossref of " * crossref * warning$
+ word.in
+ }
+ { bbl.volume volume tie.or.space.connect
+ bbl.of space.word *
+ }
+ if$
+ " \cite{" * crossref * "}" *
+}
+
+FUNCTION {format.incoll.inproc.crossref}
+{
+ word.in
+ " \cite{" * crossref * "}" *
+}
+
+FUNCTION {format.publisher}
+{ publisher empty$
+ % "empty publisher in " cite$ * warning$ %dont like this warning
+ 'skip$
+ 'skip$
+ if$
+ ""
+ add.blank "(" *
+ address empty$
+ 'skip$
+ { address * }
+ if$
+ publisher empty$
+ 'skip$
+ { address empty$
+ 'skip$
+ { ": " * }
+ if$
+ publisher *
+ }
+ if$
+ year duplicate$ empty$
+ { "empty year in " cite$ * "; set to ????" * warning$
+ pop$ "????" }
+ 'skip$
+ if$
+ publisher empty$ address empty$ and
+ { * }
+ { ", " swap$ * * }
+ if$
+ ")" *
+ output
+}
+
+% BY Peter Antman, all types includes full ref
+FUNCTION {article}
+{ output.bibitem
+% pop$ % to get rid of ,
+ format.au "author" output.check % output instead of output check
+ author format.key output
+ format.title "title" output.check
+ end.quote.title
+ crossref missing$
+ { journal
+ emphasize
+ "journal" output.check
+ format.vol.num.pages output
+ }
+ { format.article.crossref output.nonnull
+ format.pages output
+ }
+ if$
+ format.date "year" output.check.special
+ note output
+ end.bibitem
+ format.authors "author" output.check
+ author format.key output
+ format.title "title" output.check
+ end.quote.title
+ crossref missing$
+ { journal
+ emphasize
+ "journal" output.check
+ format.vol.num.pages output
+ }
+ { format.article.crossref output.nonnull
+ format.pages output
+ }
+ if$
+ format.date "year" output.check.special
+ note output
+ fin.entry
+ write.url
+}
+
+FUNCTION {book}
+{ output.bibitem
+ author empty$
+ { format.r.editors "author and editor" output.check
+ editor format.key output
+ }
+ { format.au output.nonnull
+ crossref missing$
+ { "author and editor" editor either.or.check }
+ 'skip$
+ if$
+ }
+ if$
+ format.btitle "title" output.check
+ crossref missing$
+ { format.bvolume output
+ format.number.series output
+ format.edition output
+ note output
+ format.publisher
+ }
+ {
+ format.book.crossref output.nonnull
+ }
+ if$
+ end.bibitem
+ author empty$
+ { format.editors "author and editor" output.check
+ editor format.key output
+ }
+ { format.authors output.nonnull
+ crossref missing$
+ { "author and editor" editor either.or.check }
+ 'skip$
+ if$
+ }
+ if$
+ format.btitle "title" output.check
+ crossref missing$
+ { format.bvolume output
+ format.number.series output
+ format.edition output
+ note output
+ format.publisher
+ }
+ {
+ format.book.crossref output.nonnull
+ }
+ if$
+% note output
+ fin.entry
+ write.url
+}
+
+FUNCTION {booklet}
+{ output.bibitem
+ format.au output
+ author format.key output
+ format.title "title" output.check
+ end.quote.title
+ howpublished output
+% address output
+ note output
+% format.date "year" output.check
+ format.publisher
+ end.bibitem
+ format.authors output
+ author format.key output
+ format.title "title" output.check
+ end.quote.title
+ howpublished output
+% address output
+ note output
+% format.date "year" output.check
+ format.publisher
+ fin.entry
+ write.url
+}
+
+FUNCTION {inbook}
+{ output.bibitem
+ author empty$
+ { format.r.editors "author and editor" output.check
+ editor format.key output
+ }
+ { format.au output.nonnull
+ crossref missing$
+ { "author and editor" editor either.or.check }
+ 'skip$
+ if$
+ }
+ if$
+ format.btitle "title" output.check
+ crossref missing$
+ {
+ format.bvolume output
+ format.chapter.pages "chapter and pages" output.check
+ format.number.series output
+ format.edition output
+ note output
+ format.publisher
+ }
+ {
+ format.chapter.pages "chapter and pages" output.check
+ format.book.crossref output.nonnull
+ }
+ if$
+ end.bibitem
+ author empty$
+ { format.editors "author and editor" output.check
+ editor format.key output
+ }
+ { format.authors output.nonnull
+ crossref missing$
+ { "author and editor" editor either.or.check }
+ 'skip$
+ if$
+ }
+ if$
+ format.btitle "title" output.check
+ crossref missing$
+ {
+ format.bvolume output
+ format.chapter.pages "chapter and pages" output.check
+ format.number.series output
+ format.edition output
+ note output
+ format.publisher
+ }
+ {
+ format.chapter.pages "chapter and pages" output.check
+ format.book.crossref output.nonnull
+ }
+ if$
+% note output %note moved
+ fin.entry
+ write.url
+}
+
+FUNCTION {incollection}
+{ output.bibitem
+ format.au "author" output.check
+ author format.key output
+ format.title "title" output.check
+ end.quote.title
+ crossref missing$
+ { format.in.r.ed.booktitle "booktitle" output.check
+ format.bvolume output
+ format.number.series output
+ format.edition output
+ format.chapter.pages output
+ note output
+ format.publisher
+ }
+ { format.incoll.inproc.crossref output.nonnull
+ format.chapter.pages output
+ }
+ if$
+ end.bibitem
+ format.authors "author" output.check
+ author format.key output
+ format.title "title" output.check
+ end.quote.title
+ crossref missing$
+ { format.in.ed.booktitle "booktitle" output.check
+ format.bvolume output
+ format.number.series output
+ format.edition output
+ format.chapter.pages output
+ note output
+ format.publisher
+ }
+ { format.incoll.inproc.crossref output.nonnull
+ format.chapter.pages output
+ }
+ if$
+% note output %note moved
+ fin.entry
+ write.url
+}
+
+FUNCTION {inproceedings}
+{ output.bibitem
+ format.au "author" output.check
+ author format.key output
+ format.title "title" output.check
+ end.quote.title
+ crossref missing$
+ { format.in.r.ed.booktitle "booktitle" output.check
+ format.bvolume output
+ format.number.series output
+ format.pages output
+ note output
+ publisher empty$
+ { organization output
+% address output
+% format.date "year" output.check
+ format.publisher
+ }
+ { organization output
+ format.publisher
+ }
+ if$
+ }
+ { format.incoll.inproc.crossref output.nonnull
+ format.pages output
+ }
+ if$
+ end.bibitem
+ format.authors "author" output.check
+ author format.key output
+ format.title "title" output.check
+ end.quote.title
+ crossref missing$
+ { format.in.ed.booktitle "booktitle" output.check
+ format.bvolume output
+ format.number.series output
+ format.pages output
+ note output
+ publisher empty$
+ { organization output
+% address output
+% format.date "year" output.check
+ format.publisher
+ }
+ { organization output
+ format.publisher
+ }
+ if$
+ }
+ { format.incoll.inproc.crossref output.nonnull
+ format.pages output
+ }
+ if$
+% note output % note moved
+ fin.entry
+ write.url
+}
+
+FUNCTION {conference} { inproceedings }
+
+FUNCTION {manual}
+{ output.bibitem
+ format.au output
+ author format.key output
+ format.btitle "title" output.check
+ organization output
+% address output
+ format.edition output
+ note output
+% format.date "year" output.check
+ format.publisher
+ end.bibitem
+ format.authors output
+ author format.key output
+ format.btitle "title" output.check
+ organization output
+% address output
+ format.edition output
+ note output
+% format.date "year" output.check
+ format.publisher
+ fin.entry
+ write.url
+}
+
+FUNCTION {mastersthesis}
+{ output.bibitem
+ format.au "author" output.check
+ author format.key output
+ format.btitle "title" output.check
+ bbl.mthesis format.thesis.type output.nonnull
+ school "school" output.check
+% address output
+ note output
+% format.date "year" output.check
+ format.publisher
+ end.bibitem
+ format.authors "author" output.check
+ author format.key output
+ format.btitle "title" output.check
+ bbl.mthesis format.thesis.type output.nonnull
+ school "school" output.check
+% address output
+ note output
+% format.date "year" output.check
+ format.publisher
+ fin.entry
+ write.url
+}
+
+FUNCTION {misc}
+{ output.bibitem
+ format.au output
+ author format.key output
+ format.title output
+ end.quote.title
+ howpublished output
+ note output
+ format.date "year" output.check.special
+ end.bibitem
+ format.authors output
+ author format.key output
+ format.title output
+ end.quote.title
+ howpublished output
+ note output
+ format.date "year" output.check.special
+ fin.entry
+ write.url
+}
+
+FUNCTION {phdthesis}
+{ output.bibitem
+ format.au "author" output.check
+ author format.key output
+ format.btitle "title" output.check
+ bbl.phdthesis format.thesis.type output.nonnull
+ school "school" output.check
+% address output
+ note output
+% format.date "year" output.check
+ format.publisher
+ end.bibitem
+ format.authors "author" output.check
+ author format.key output
+ format.btitle "title" output.check
+ bbl.phdthesis format.thesis.type output.nonnull
+ school "school" output.check
+% address output
+ note output
+% format.date "year" output.check
+ format.publisher
+ fin.entry
+ write.url
+}
+
+FUNCTION {proceedings}
+{ output.bibitem
+ format.r.editors output
+ editor format.key output
+ format.btitle "title" output.check
+ format.bvolume output
+ format.number.series output
+% address output
+ organization output
+% publisher output
+ note output
+% format.date "year" output.check
+ format.publisher
+ end.bibitem
+ format.editors output
+ editor format.key output
+ format.btitle "title" output.check
+ format.bvolume output
+ format.number.series output
+% address output
+ organization output
+% publisher output
+ note output
+% format.date "year" output.check
+ format.publisher
+ fin.entry
+ write.url
+}
+
+FUNCTION {techreport}
+{ output.bibitem
+ format.au "author" output.check
+ author format.key output
+ format.title "title" output.check
+ end.quote.title
+ format.tr.number output.nonnull
+ institution "institution" output.check
+% address output
+ note output
+% format.date "year" output.check
+ format.publisher
+ end.bibitem
+ format.authors "author" output.check
+ author format.key output
+ format.title "title" output.check
+ end.quote.title
+ format.tr.number output.nonnull
+ institution "institution" output.check
+% address output
+ note output
+% format.date "year" output.check
+ format.publisher
+ fin.entry
+ write.url
+}
+
+FUNCTION {unpublished}
+{ output.bibitem
+ format.au "author" output.check
+ author format.key output
+ format.title "title" output.check
+ end.quote.title
+ note "note" output.check
+ format.date "year" output.check.special
+ end.bibitem
+ format.authors "author" output.check
+ author format.key output
+ format.title "title" output.check
+ end.quote.title
+ note "note" output.check
+ format.date "year" output.check.special
+ fin.entry
+ write.url
+}
+
+FUNCTION {default.type} { misc }
+
+READ
+
+FUNCTION {sortify}
+{ purify$
+ "l" change.case$
+}
+
+INTEGERS { len }
+
+FUNCTION {chop.word}
+{ 's :=
+ 'len :=
+ s #1 len substring$ =
+ { s len #1 + global.max$ substring$ }
+ 's
+ if$
+}
+
+FUNCTION {format.lab.names}
+{ 's :=
+ s #1 "{vv~}{ll}" format.name$
+ s num.names$ duplicate$
+ #2 >
+ { pop$ " " * "et~al." emphasize * }
+ { #2 <
+ 'skip$
+ { s #2 "{ff }{vv }{ll}{ jj}" format.name$ "others" =
+ { " " * "et~al." emphasize * }
+ { " \harvardand\ " * s #2 "{vv~}{ll}" format.name$ * }
+ if$
+ }
+ if$
+ }
+ if$
+}
+
+FUNCTION {author.key.label}
+{ author empty$
+ { key empty$
+ { cite$ #1 #3 substring$ }
+ 'key
+ if$
+ }
+ { author format.lab.names }
+ if$
+}
+
+FUNCTION {author.editor.key.label}
+{ author empty$
+ { editor empty$
+ { key empty$
+ { cite$ #1 #3 substring$ }
+ 'key
+ if$
+ }
+ { editor format.lab.names }
+ if$
+ }
+ { author format.lab.names }
+ if$
+}
+
+FUNCTION {editor.key.label}
+{ editor empty$
+ { key empty$
+ { cite$ #1 #3 substring$ }
+ 'key
+ if$
+ }
+ { editor format.lab.names }
+ if$
+}
+
+FUNCTION {calc.short.authors}
+{ type$ "book" =
+ type$ "inbook" =
+ or
+ 'author.editor.key.label
+ { type$ "proceedings" =
+ 'editor.key.label
+ 'author.key.label
+ if$
+ }
+ if$
+ 'short.list :=
+}
+
+FUNCTION {calc.label}
+{ calc.short.authors
+ short.list
+ ", "
+ *
+ year duplicate$ empty$
+ { pop$ "????" }
+ 'skip$
+ if$
+ *
+ 'label :=
+}
+
+FUNCTION {calc.short.label}
+{ calc.short.authors short.list
+ 'label :=
+}
+
+FUNCTION {sort.format.names}
+{ 's :=
+ #1 'nameptr :=
+ ""
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ { s nameptr
+ "{ll{ }}{ ff{ }}{ jj{ }}"
+ format.name$ 't :=
+ nameptr #1 >
+ {
+ " " *
+ namesleft #1 = t "others" = and
+ { "aaaaa" * }
+ { t sortify * }
+ if$
+ }
+ { t sortify * }
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+}
+
+FUNCTION {sort.format.title}
+{ 't :=
+ "A " #2
+ "An " #3
+ "The " #4 t chop.word
+ chop.word
+ chop.word
+ sortify
+ #1 global.max$ substring$
+}
+
+FUNCTION {author.sort}
+{ author empty$
+ { key empty$
+ { "to sort, need author or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { author sort.format.names }
+ if$
+}
+
+FUNCTION {author.editor.sort}
+{ author empty$
+ { editor empty$
+ { key empty$
+ { "to sort, need author, editor, or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { editor sort.format.names }
+ if$
+ }
+ { author sort.format.names }
+ if$
+}
+
+FUNCTION {editor.sort}
+{ editor empty$
+ { key empty$
+ { "to sort, need editor or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { editor sort.format.names }
+ if$
+}
+
+FUNCTION {presort}
+{ calc.label
+ label sortify
+ " "
+ *
+ type$ "book" =
+ type$ "inbook" =
+ or
+ 'author.editor.sort
+ { type$ "proceedings" =
+ 'editor.sort
+ 'author.sort
+ if$
+ }
+ if$
+ #1 entry.max$ substring$
+ 'sort.label :=
+ sort.label
+ *
+ " "
+ *
+ title field.or.null
+ sort.format.title
+ *
+ #1 entry.max$ substring$
+ 'sort.key$ :=
+}
+
+ITERATE {presort}
+
+SORT
+
+STRINGS { last.label next.extra }
+
+INTEGERS { last.extra.num number.label }
+
+FUNCTION {initialize.extra.label.stuff}
+{ #0 int.to.chr$ 'last.label :=
+ "" 'next.extra :=
+ #0 'last.extra.num :=
+ #0 'number.label :=
+}
+
+FUNCTION {not.uniq.forw}
+{ last.label short.list =
+ { last.extra.num #1 + 'last.extra.num :=
+ last.extra.num int.to.chr$ 'extra.label :=
+ }
+ { "a" chr.to.int$ 'last.extra.num :=
+ "" 'extra.label :=
+ short.list 'last.label :=
+ }
+ if$
+ number.label #1 + 'number.label :=
+% label write$
+}
+
+FUNCTION {not.uniq.rew}
+{ next.extra "b" =
+ { "a" 'extra.label := }
+ 'skip$
+ if$
+ extra.label 'next.extra :=
+ extra.label
+ duplicate$ empty$
+ 'skip$
+ { "" swap$ * "" * }
+ if$
+ 'extra.label :=
+}
+
+FUNCTION {forward.pass}
+{ last.label label =
+ { last.extra.num #1 + 'last.extra.num :=
+ last.extra.num int.to.chr$ 'extra.label :=
+ }
+ { "a" chr.to.int$ 'last.extra.num :=
+ "" 'extra.label :=
+ label 'last.label :=
+ }
+ if$
+ number.label #1 + 'number.label :=
+% label write$
+}
+
+FUNCTION {reverse.pass}
+{ next.extra "b" =
+ { "a" 'extra.label := }
+ 'skip$
+ if$
+ extra.label 'next.extra :=
+ extra.label
+ duplicate$ empty$
+ 'skip$
+ { "" swap$ * "" * }
+ if$
+ 'extra.label :=
+}
+
+EXECUTE {initialize.extra.label.stuff}
+
+%ITERATE {forward.pass}
+
+ITERATE {not.uniq.forw}
+
+REVERSE {not.uniq.rew}
+
+%REVERSE {reverse.pass}
+
+FUNCTION {bib.sort.order}
+{ sort.label
+ " "
+ *
+ year field.or.null sortify
+ *
+ " "
+ *
+ title field.or.null
+ sort.format.title
+ *
+ #1 entry.max$ substring$
+ 'sort.key$ :=
+ calc.short.label
+}
+
+ITERATE {bib.sort.order}
+
+SORT
+
+FUNCTION {begin.bib}
+{ preamble$ empty$
+ 'skip$
+ { preamble$ write$ newline$ }
+ if$
+ "\begin{thebibliography}{" number.label int.to.str$ * "}" *
+ write$ newline$
+% "\newcommand{\enquote}[1]{``#1''}"
+% write$ newline$
+% "\expandafter\ifx\csname natexlab\endcsname\relax\def\natexlab#1{#1}\fi"
+% write$ newline$
+}
+
+EXECUTE {begin.bib}
+
+EXECUTE {init.state.consts}
+
+ITERATE {call.type$}
+
+FUNCTION {end.bib}
+{ newline$
+ "\end{thebibliography}" write$ newline$
+}
+
+EXECUTE {end.bib}
+%% End of customized bst file
+%%
+%% End of file `svenska.bst'.
diff --git a/biblio/bibtex/contrib/perception/README b/biblio/bibtex/contrib/perception/README
new file mode 100644
index 0000000000..a6c165d7b3
--- /dev/null
+++ b/biblio/bibtex/contrib/perception/README
@@ -0,0 +1,4 @@
+This is just a .bst for the journal Perception. Maybe it will save
+someone else a little time.
+
+Jed Singer
diff --git a/biblio/bibtex/contrib/perception/perception.bst b/biblio/bibtex/contrib/perception/perception.bst
new file mode 100644
index 0000000000..63ad81d0cb
--- /dev/null
+++ b/biblio/bibtex/contrib/perception/perception.bst
@@ -0,0 +1,1584 @@
+%%
+%% This is file `perception.bst',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% merlin.mbs (with options: `,ay,nat,nm-rv,keyxyr,dt-beg,yr-com,yrp-x,note-yr,tit-qq,qx,bt-qq,vol-bf,vnum-x,volp-blk,pp-last,jnm-x,add-pub,pub-par,pre-edn,url,url-nl,blk-com,com-blank,fin-bare,pp,ed,ord,amper,xand')
+%% ----------------------------------------
+%% *** for the Pion journal Perception ***
+%%
+%% Copyright 1994-1999 Patrick W Daly
+ % ===============================================================
+ % IMPORTANT NOTICE:
+ % This bibliographic style (bst) file has been generated from one or
+ % more master bibliographic style (mbs) files, listed above.
+ %
+ % This generated file can be redistributed and/or modified under the terms
+ % of the LaTeX Project Public License Distributed from CTAN
+ % archives in directory macros/latex/base/lppl.txt; either
+ % version 1 of the License, or any later version.
+ % ===============================================================
+ % Name and version information of the main mbs file:
+ % \ProvidesFile{merlin.mbs}[1999/05/28 3.89 (PWD)]
+ % For use with BibTeX version 0.99a or later
+ %-------------------------------------------------------------------
+ % This bibliography style file is intended for texts in ENGLISH
+ % This is an author-year citation style bibliography. As such, it is
+ % non-standard LaTeX, and requires a special package file to function properly.
+ % Such a package is natbib.sty by Patrick W. Daly
+ % The form of the \bibitem entries is
+ % \bibitem[Jones et al.(1990)]{key}...
+ % \bibitem[Jones et al.(1990)Jones, Baker, and Smith]{key}...
+ % The essential feature is that the label (the part in brackets) consists
+ % of the author names, as they should appear in the citation, with the year
+ % in parentheses following. There must be no space before the opening
+ % parenthesis!
+ % With natbib v5.3, a full list of authors may also follow the year.
+ % In natbib.sty, it is possible to define the type of enclosures that is
+ % really wanted (brackets or parentheses), but in either case, there must
+ % be parentheses in the label.
+ % The \cite command functions as follows:
+ % \citet{key} ==>> Jones et al. (1990)
+ % \citet*{key} ==>> Jones, Baker, and Smith (1990)
+ % \citep{key} ==>> (Jones et al., 1990)
+ % \citep*{key} ==>> (Jones, Baker, and Smith, 1990)
+ % \citep[chap. 2]{key} ==>> (Jones et al., 1990, chap. 2)
+ % \citep[e.g.][]{key} ==>> (e.g. Jones et al., 1990)
+ % \citep[e.g.][p. 32]{key} ==>> (e.g. Jones et al., p. 32)
+ % \citeauthor{key} ==>> Jones et al.
+ % \citeauthor*{key} ==>> Jones, Baker, and Smith
+ % \citeyear{key} ==>> 1990
+ %---------------------------------------------------------------------
+
+ENTRY
+ { address
+ author
+ booktitle
+ chapter
+ edition
+ editor
+ howpublished
+ institution
+ journal
+ key
+ month
+ note
+ number
+ organization
+ pages
+ publisher
+ school
+ series
+ title
+ type
+ url
+ volume
+ year
+ }
+ {}
+ { label extra.label sort.label short.list }
+
+INTEGERS { output.state before.all mid.sentence after.sentence after.block }
+
+FUNCTION {init.state.consts}
+{ #0 'before.all :=
+ #1 'mid.sentence :=
+ #2 'after.sentence :=
+ #3 'after.block :=
+}
+
+STRINGS { s t }
+
+FUNCTION {output.nonnull}
+{ 's :=
+ output.state mid.sentence =
+ { " " * write$ }
+ { output.state after.block =
+ { add.period$ write$
+ newline$
+ "\newblock " write$
+ }
+ { output.state before.all =
+ 'write$
+ { add.period$ " " * write$ }
+ if$
+ }
+ if$
+ mid.sentence 'output.state :=
+ }
+ if$
+ s
+}
+
+FUNCTION {output}
+{ duplicate$ empty$
+ 'pop$
+ 'output.nonnull
+ if$
+}
+
+FUNCTION {output.check}
+{ 't :=
+ duplicate$ empty$
+ { pop$ "empty " t * " in " * cite$ * warning$ }
+ 'output.nonnull
+ if$
+}
+
+FUNCTION {fin.entry}
+{ duplicate$ empty$
+ 'pop$
+ 'write$
+ if$
+ newline$
+}
+
+FUNCTION {new.block}
+{ output.state before.all =
+ 'skip$
+ { after.block 'output.state := }
+ if$
+}
+
+FUNCTION {new.sentence}
+{ output.state after.block =
+ 'skip$
+ { output.state before.all =
+ 'skip$
+ { after.sentence 'output.state := }
+ if$
+ }
+ if$
+}
+
+FUNCTION {add.blank}
+{ " " * before.all 'output.state :=
+}
+
+FUNCTION {date.block}
+{
+ add.blank
+}
+
+FUNCTION {not}
+{ { #0 }
+ { #1 }
+ if$
+}
+
+FUNCTION {and}
+{ 'skip$
+ { pop$ #0 }
+ if$
+}
+
+FUNCTION {or}
+{ { pop$ #1 }
+ 'skip$
+ if$
+}
+
+FUNCTION {non.stop}
+{ duplicate$
+ "}" * add.period$
+ #-1 #1 substring$ "." =
+}
+
+FUNCTION {new.block.checkb}
+{ empty$
+ swap$ empty$
+ and
+ 'skip$
+ 'new.block
+ if$
+}
+
+FUNCTION {field.or.null}
+{ duplicate$ empty$
+ { pop$ "" }
+ 'skip$
+ if$
+}
+
+FUNCTION {emphasize}
+{ duplicate$ empty$
+ { pop$ "" }
+ { "{\em " swap$ * "\/}" * }
+ if$
+}
+
+FUNCTION {bolden}
+{ duplicate$ empty$
+ { pop$ "" }
+ { "{\bf " swap$ * "}" * }
+ if$
+}
+
+
+FUNCTION {capitalize}
+{ "u" change.case$ "t" change.case$ }
+
+FUNCTION {space.word}
+{ " " swap$ * " " * }
+
+ % Here are the language-specific definitions for explicit words.
+ % Each function has a name bbl.xxx where xxx is the English word.
+ % The language selected here is ENGLISH
+FUNCTION {bbl.and}
+{ "and"}
+
+FUNCTION {bbl.etal}
+{ "et~al." }
+
+FUNCTION {bbl.editors}
+{ "eds." }
+
+FUNCTION {bbl.editor}
+{ "ed." }
+
+FUNCTION {bbl.edby}
+{ "edited by" }
+
+FUNCTION {bbl.edition}
+{ "edition" }
+
+FUNCTION {bbl.volume}
+{ "volume" }
+
+FUNCTION {bbl.of}
+{ "of" }
+
+FUNCTION {bbl.number}
+{ "number" }
+
+FUNCTION {bbl.nr}
+{ "no." }
+
+FUNCTION {bbl.in}
+{ "in" }
+
+FUNCTION {bbl.pages}
+{ "pp." }
+
+FUNCTION {bbl.page}
+{ "p." }
+
+FUNCTION {bbl.chapter}
+{ "chapter" }
+
+FUNCTION {bbl.techrep}
+{ "Technical Report" }
+
+FUNCTION {bbl.mthesis}
+{ "Master's thesis" }
+
+FUNCTION {bbl.phdthesis}
+{ "Ph.D. thesis" }
+
+FUNCTION {bbl.first}
+{ "1st" }
+
+FUNCTION {bbl.second}
+{ "2nd" }
+
+FUNCTION {bbl.third}
+{ "3rd" }
+
+FUNCTION {bbl.fourth}
+{ "4th" }
+
+FUNCTION {bbl.fifth}
+{ "5th" }
+
+FUNCTION {bbl.st}
+{ "st" }
+
+FUNCTION {bbl.nd}
+{ "nd" }
+
+FUNCTION {bbl.rd}
+{ "rd" }
+
+FUNCTION {bbl.th}
+{ "th" }
+
+MACRO {jan} {"January"}
+
+MACRO {feb} {"February"}
+
+MACRO {mar} {"March"}
+
+MACRO {apr} {"April"}
+
+MACRO {may} {"May"}
+
+MACRO {jun} {"June"}
+
+MACRO {jul} {"July"}
+
+MACRO {aug} {"August"}
+
+MACRO {sep} {"September"}
+
+MACRO {oct} {"October"}
+
+MACRO {nov} {"November"}
+
+MACRO {dec} {"December"}
+
+FUNCTION {eng.ord}
+{ duplicate$ "1" swap$ *
+ #-2 #1 substring$ "1" =
+ { bbl.th * }
+ { duplicate$ #-1 #1 substring$
+ duplicate$ "1" =
+ { pop$ bbl.st * }
+ { duplicate$ "2" =
+ { pop$ bbl.nd * }
+ { "3" =
+ { bbl.rd * }
+ { bbl.th * }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+}
+
+MACRO {acmcs} {"ACM Computing Surveys"}
+
+MACRO {acta} {"Acta Informatica"}
+
+MACRO {cacm} {"Communications of the ACM"}
+
+MACRO {ibmjrd} {"IBM Journal of Research and Development"}
+
+MACRO {ibmsj} {"IBM Systems Journal"}
+
+MACRO {ieeese} {"IEEE Transactions on Software Engineering"}
+
+MACRO {ieeetc} {"IEEE Transactions on Computers"}
+
+MACRO {ieeetcad}
+ {"IEEE Transactions on Computer-Aided Design of Integrated Circuits"}
+
+MACRO {ipl} {"Information Processing Letters"}
+
+MACRO {jacm} {"Journal of the ACM"}
+
+MACRO {jcss} {"Journal of Computer and System Sciences"}
+
+MACRO {scp} {"Science of Computer Programming"}
+
+MACRO {sicomp} {"SIAM Journal on Computing"}
+
+MACRO {tocs} {"ACM Transactions on Computer Systems"}
+
+MACRO {tods} {"ACM Transactions on Database Systems"}
+
+MACRO {tog} {"ACM Transactions on Graphics"}
+
+MACRO {toms} {"ACM Transactions on Mathematical Software"}
+
+MACRO {toois} {"ACM Transactions on Office Information Systems"}
+
+MACRO {toplas} {"ACM Transactions on Programming Languages and Systems"}
+
+MACRO {tcs} {"Theoretical Computer Science"}
+
+FUNCTION {write.url}
+{ url empty$
+ { skip$ }
+ { "\newline\urlprefix\url{" url * "}" * write$ newline$ }
+ if$
+}
+
+
+INTEGERS { nameptr namesleft numnames }
+
+FUNCTION {format.names}
+{ 's :=
+ "" 't :=
+ #1 'nameptr :=
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ { s nameptr
+ "{vv~}{ll}{ jj}{ f{~}}" format.name$
+ 't :=
+ nameptr #1 >
+ {
+ namesleft #1 >
+ { ", " * t * }
+ {
+ "," *
+ s nameptr "{ll}" format.name$ duplicate$ "others" =
+ { 't := }
+ { pop$ }
+ if$
+ t "others" =
+ {
+ " " * bbl.etal *
+ }
+ { " " * t * }
+ if$
+ }
+ if$
+ }
+ 't
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+}
+
+FUNCTION {format.names.ed}
+{ 's :=
+ "" 't :=
+ #1 'nameptr :=
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ { s nameptr
+ "{f{~}~}{vv~}{ll}{ jj}"
+ format.name$
+ 't :=
+ nameptr #1 >
+ {
+ namesleft #1 >
+ { ", " * t * }
+ {
+ "," *
+ s nameptr "{ll}" format.name$ duplicate$ "others" =
+ { 't := }
+ { pop$ }
+ if$
+ t "others" =
+ {
+
+ " " * bbl.etal *
+ }
+ { " " * t * }
+ if$
+ }
+ if$
+ }
+ 't
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+}
+
+FUNCTION {format.key}
+{ empty$
+ { key field.or.null }
+ { "" }
+ if$
+}
+
+FUNCTION {format.authors}
+{ author empty$
+ { "" }
+ { author format.names }
+ if$
+}
+
+FUNCTION {format.editors}
+{ editor empty$
+ { "" }
+ { editor format.names
+ ", " *
+ editor num.names$ #1 >
+ 'bbl.editors
+ 'bbl.editor
+ if$
+ *
+ }
+ if$
+}
+
+FUNCTION {format.in.editors}
+{ editor empty$
+ { "" }
+ { editor format.names.ed
+ editor num.names$ #1 >
+ { ", " * bbl.editors * }
+ { ", " * bbl.editor * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.note}
+{
+ note empty$
+ { "" }
+ { note #1 #1 substring$
+ duplicate$ "{" =
+ 'skip$
+ { output.state mid.sentence =
+ { "l" }
+ { "u" }
+ if$
+ change.case$
+ }
+ if$
+ note #2 global.max$ substring$ *
+ }
+ if$
+}
+
+FUNCTION {format.title}
+{ title empty$
+ { "" }
+ { title "t" change.case$
+ "\enquote{" swap$ *
+ "} " *
+ }
+ if$
+}
+
+FUNCTION {end.quote.title}
+{ title empty$
+ 'skip$
+ { before.all 'output.state := }
+ if$
+}
+
+FUNCTION {end.quote.btitle}
+{ booktitle empty$
+ 'skip$
+ { before.all 'output.state := }
+ if$
+}
+
+FUNCTION {format.full.names}
+{'s :=
+ "" 't :=
+ #1 'nameptr :=
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ { s nameptr
+ "{vv~}{ll}" format.name$
+ 't :=
+ nameptr #1 >
+ {
+ namesleft #1 >
+ { ", " * t * }
+ {
+ s nameptr "{ll}" format.name$ duplicate$ "others" =
+ { 't := }
+ { pop$ }
+ if$
+ t "others" =
+ {
+ " " * bbl.etal *
+ }
+ {
+ numnames #2 >
+ { "," * }
+ 'skip$
+ if$
+ "\&"
+ space.word * t *
+ }
+ if$
+ }
+ if$
+ }
+ 't
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+}
+
+FUNCTION {author.editor.key.full}
+{ author empty$
+ { editor empty$
+ { key empty$
+ { cite$ #1 #3 substring$ }
+ 'key
+ if$
+ }
+ { editor format.full.names }
+ if$
+ }
+ { author format.full.names }
+ if$
+}
+
+FUNCTION {author.key.full}
+{ author empty$
+ { key empty$
+ { cite$ #1 #3 substring$ }
+ 'key
+ if$
+ }
+ { author format.full.names }
+ if$
+}
+
+FUNCTION {editor.key.full}
+{ editor empty$
+ { key empty$
+ { cite$ #1 #3 substring$ }
+ 'key
+ if$
+ }
+ { editor format.full.names }
+ if$
+}
+
+FUNCTION {make.full.names}
+{ type$ "book" =
+ type$ "inbook" =
+ or
+ 'author.editor.key.full
+ { type$ "proceedings" =
+ 'editor.key.full
+ 'author.key.full
+ if$
+ }
+ if$
+}
+
+FUNCTION {output.bibitem}
+{ newline$
+ "\bibitem[{" write$
+ label write$
+ ")" make.full.names duplicate$ short.list =
+ { pop$ }
+ { * }
+ if$
+ "}]{" * write$
+ cite$ write$
+ "}" write$
+ newline$
+ ""
+ before.all 'output.state :=
+}
+
+FUNCTION {n.dashify}
+{
+ 't :=
+ ""
+ { t empty$ not }
+ { t #1 #1 substring$ "-" =
+ { t #1 #2 substring$ "--" = not
+ { "--" *
+ t #2 global.max$ substring$ 't :=
+ }
+ { { t #1 #1 substring$ "-" = }
+ { "-" *
+ t #2 global.max$ substring$ 't :=
+ }
+ while$
+ }
+ if$
+ }
+ { t #1 #1 substring$ *
+ t #2 global.max$ substring$ 't :=
+ }
+ if$
+ }
+ while$
+}
+
+FUNCTION {word.in}
+{ bbl.in
+ " " * }
+
+FUNCTION {format.date}
+{ year duplicate$ empty$
+ { "empty year in " cite$ * "; set to ????" * warning$
+ pop$ "????" }
+ 'skip$
+ if$
+ extra.label *
+ before.all 'output.state :=
+ ", " swap$ *
+}
+
+FUNCTION {format.btitle}
+{ title emphasize
+}
+
+FUNCTION {tie.or.space.connect}
+{ duplicate$ text.length$ #3 <
+ { "~" }
+ { " " }
+ if$
+ swap$ * *
+}
+
+FUNCTION {either.or.check}
+{ empty$
+ 'pop$
+ { "can't use both " swap$ * " fields in " * cite$ * warning$ }
+ if$
+}
+
+FUNCTION {format.bvolume}
+{ volume empty$
+ { "" }
+ { bbl.volume volume tie.or.space.connect
+ series empty$
+ 'skip$
+ { bbl.of space.word * series emphasize * }
+ if$
+ "volume and number" number either.or.check
+ }
+ if$
+}
+
+FUNCTION {format.number.series}
+{ volume empty$
+ { number empty$
+ { series field.or.null }
+ { output.state mid.sentence =
+ { bbl.number }
+ { bbl.number capitalize }
+ if$
+ number tie.or.space.connect
+ series empty$
+ { "there's a number but no series in " cite$ * warning$ }
+ { bbl.in space.word * series * }
+ if$
+ }
+ if$
+ }
+ { "" }
+ if$
+}
+
+FUNCTION {is.num}
+{ chr.to.int$
+ duplicate$ "0" chr.to.int$ < not
+ swap$ "9" chr.to.int$ > not and
+}
+
+FUNCTION {extract.num}
+{ duplicate$ 't :=
+ "" 's :=
+ { t empty$ not }
+ { t #1 #1 substring$
+ t #2 global.max$ substring$ 't :=
+ duplicate$ is.num
+ { s swap$ * 's := }
+ { pop$ "" 't := }
+ if$
+ }
+ while$
+ s empty$
+ 'skip$
+ { pop$ s }
+ if$
+}
+
+FUNCTION {convert.edition}
+{ edition extract.num "l" change.case$ 's :=
+ s "first" = s "1" = or
+ { bbl.first 't := }
+ { s "second" = s "2" = or
+ { bbl.second 't := }
+ { s "third" = s "3" = or
+ { bbl.third 't := }
+ { s "fourth" = s "4" = or
+ { bbl.fourth 't := }
+ { s "fifth" = s "5" = or
+ { bbl.fifth 't := }
+ { s #1 #1 substring$ is.num
+ { s eng.ord 't := }
+ { edition 't := }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+ t
+}
+
+FUNCTION {format.edition}
+{ edition empty$
+ { "" }
+ { output.state mid.sentence =
+ { convert.edition "l" change.case$ " " * bbl.edition * }
+ { convert.edition "t" change.case$ " " * bbl.edition * }
+ if$
+ }
+ if$
+}
+
+INTEGERS { multiresult }
+
+FUNCTION {multi.page.check}
+{ 't :=
+ #0 'multiresult :=
+ { multiresult not
+ t empty$ not
+ and
+ }
+ { t #1 #1 substring$
+ duplicate$ "-" =
+ swap$ duplicate$ "," =
+ swap$ "+" =
+ or or
+ { #1 'multiresult := }
+ { t #2 global.max$ substring$ 't := }
+ if$
+ }
+ while$
+ multiresult
+}
+
+FUNCTION {format.pages}
+{ pages empty$
+ { "" }
+ { pages multi.page.check
+ { bbl.pages pages n.dashify tie.or.space.connect }
+ { bbl.page pages tie.or.space.connect }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.journal.pages}
+{ pages empty$
+ 'skip$
+ { duplicate$ empty$
+ { pop$ format.pages }
+ {
+ " " *
+ pages n.dashify *
+ }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.vol.num.pages}
+{ volume field.or.null
+ bolden
+}
+
+FUNCTION {format.chapter.pages}
+{ chapter empty$
+ { "" }
+ { type empty$
+ { bbl.chapter }
+ { type "l" change.case$ }
+ if$
+ chapter tie.or.space.connect
+ }
+ if$
+}
+
+FUNCTION {bt.enquote}
+{ "\enquote{" swap$ *
+ "}, " *
+}
+FUNCTION {format.in.ed.booktitle}
+{ booktitle empty$
+ { "" }
+ { editor empty$
+ { word.in booktitle bt.enquote * }
+ { word.in format.in.editors * ", " *
+ booktitle bt.enquote * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.thesis.type}
+{ type empty$
+ 'skip$
+ { pop$
+ type "t" change.case$
+ }
+ if$
+}
+
+FUNCTION {format.tr.number}
+{ type empty$
+ { bbl.techrep }
+ 'type
+ if$
+ number empty$
+ { "t" change.case$ }
+ { number tie.or.space.connect }
+ if$
+}
+
+FUNCTION {format.article.crossref}
+{
+ word.in
+ " \cite{" * crossref * "}" *
+}
+
+FUNCTION {format.book.crossref}
+{ volume empty$
+ { "empty volume in " cite$ * "'s crossref of " * crossref * warning$
+ word.in
+ }
+ { bbl.volume volume tie.or.space.connect
+ bbl.of space.word *
+ }
+ if$
+ " \cite{" * crossref * "}" *
+}
+
+FUNCTION {format.incoll.inproc.crossref}
+{
+ word.in
+ " \cite{" * crossref * "}" *
+}
+
+FUNCTION {format.org.or.pub}
+{ 't :=
+ ""
+ address empty$ t empty$ and
+ 'skip$
+ {
+ add.blank "(" *
+ address empty$
+ 'skip$
+ { address * }
+ if$
+ t empty$
+ 'skip$
+ { address empty$
+ 'skip$
+ { ": " * }
+ if$
+ t *
+ }
+ if$
+ ")" *
+ }
+ if$
+}
+
+FUNCTION {format.publisher.address}
+{ publisher empty$
+ { "empty publisher in " cite$ * warning$
+ ""
+ }
+ { publisher }
+ if$
+ format.org.or.pub
+}
+
+FUNCTION {format.organization.address}
+{ organization empty$
+ { "" }
+ { organization }
+ if$
+ format.org.or.pub
+}
+
+FUNCTION {article}
+{ output.bibitem
+ format.authors "author" output.check
+ author format.key output
+ format.date "year" output.check
+ date.block
+ format.title "title" output.check
+ end.quote.title
+ crossref missing$
+ { journal
+ emphasize
+ "journal" output.check
+ add.blank
+ format.vol.num.pages output
+ }
+ { format.article.crossref output.nonnull
+ format.pages output
+ }
+ if$
+ format.journal.pages
+ format.note output
+ fin.entry
+ write.url
+}
+
+FUNCTION {book}
+{ output.bibitem
+ author empty$
+ { format.editors "author and editor" output.check
+ editor format.key output
+ }
+ { format.authors output.nonnull
+ crossref missing$
+ { "author and editor" editor either.or.check }
+ 'skip$
+ if$
+ }
+ if$
+ format.date "year" output.check
+ date.block
+ format.btitle "title" output.check
+ crossref missing$
+ { format.bvolume output
+ format.number.series output
+ format.edition output
+ format.publisher.address output
+ }
+ {
+ format.book.crossref output.nonnull
+ }
+ if$
+ format.note output
+ fin.entry
+ write.url
+}
+
+FUNCTION {booklet}
+{ output.bibitem
+ format.authors output
+ author format.key output
+ format.date "year" output.check
+ date.block
+ format.title "title" output.check
+ end.quote.title
+ howpublished output
+ address output
+ format.note output
+ fin.entry
+ write.url
+}
+
+FUNCTION {inbook}
+{ output.bibitem
+ author empty$
+ { format.editors "author and editor" output.check
+ editor format.key output
+ }
+ { format.authors output.nonnull
+ crossref missing$
+ { "author and editor" editor either.or.check }
+ 'skip$
+ if$
+ }
+ if$
+ format.date "year" output.check
+ date.block
+ format.btitle "title" output.check
+ crossref missing$
+ {
+ format.bvolume output
+ format.chapter.pages "chapter and pages" output.check
+ format.number.series output
+ format.edition output
+ format.publisher.address output
+ }
+ {
+ format.chapter.pages "chapter and pages" output.check
+ format.book.crossref output.nonnull
+ }
+ if$
+ format.pages "pages" output.check
+ format.note output
+ fin.entry
+ write.url
+}
+
+FUNCTION {incollection}
+{ output.bibitem
+ format.authors "author" output.check
+ author format.key output
+ format.date "year" output.check
+ date.block
+ format.title "title" output.check
+ end.quote.title
+ crossref missing$
+ { format.in.ed.booktitle "booktitle" output.check
+ end.quote.btitle
+ format.bvolume output
+ format.number.series output
+ format.edition output
+ format.chapter.pages output
+ format.publisher.address output
+ }
+ { format.incoll.inproc.crossref output.nonnull
+ format.chapter.pages output
+ }
+ if$
+ format.pages "pages" output.check
+ format.note output
+ fin.entry
+ write.url
+}
+
+FUNCTION {inproceedings}
+{ output.bibitem
+ format.authors "author" output.check
+ author format.key output
+ format.date "year" output.check
+ date.block
+ format.title "title" output.check
+ end.quote.title
+ crossref missing$
+ { format.in.ed.booktitle "booktitle" output.check
+ end.quote.btitle
+ format.bvolume output
+ format.number.series output
+ publisher empty$
+ { format.organization.address output }
+ { organization output
+ format.publisher.address output
+ }
+ if$
+ }
+ { format.incoll.inproc.crossref output.nonnull
+ format.pages output
+ }
+ if$
+ format.note output
+ fin.entry
+ write.url
+}
+
+FUNCTION {conference} { inproceedings }
+
+FUNCTION {manual}
+{ output.bibitem
+ format.authors output
+ author format.key output
+ format.date "year" output.check
+ date.block
+ format.btitle "title" output.check
+ organization output
+ address output
+ format.edition output
+ format.note output
+ fin.entry
+ write.url
+}
+
+FUNCTION {mastersthesis}
+{ output.bibitem
+ format.authors "author" output.check
+ author format.key output
+ format.date "year" output.check
+ date.block
+ format.btitle "title" output.check
+ bbl.mthesis format.thesis.type output.nonnull
+ school "school" output.check
+ address output
+ format.note output
+ fin.entry
+ write.url
+}
+
+FUNCTION {misc}
+{ output.bibitem
+ format.authors output
+ author format.key output
+ format.date "year" output.check
+ date.block
+ format.title output
+ end.quote.title
+ howpublished output
+ format.note output
+ fin.entry
+ write.url
+}
+
+FUNCTION {phdthesis}
+{ output.bibitem
+ format.authors "author" output.check
+ author format.key output
+ format.date "year" output.check
+ date.block
+ format.btitle "title" output.check
+ bbl.phdthesis format.thesis.type output.nonnull
+ school "school" output.check
+ address output
+ format.note output
+ fin.entry
+ write.url
+}
+
+FUNCTION {proceedings}
+{ output.bibitem
+ format.editors output
+ editor format.key output
+ format.date "year" output.check
+ date.block
+ format.btitle "title" output.check
+ format.bvolume output
+ format.number.series output
+ publisher empty$
+ { format.organization.address output }
+ { organization output
+ format.publisher.address output
+ }
+ if$
+ format.note output
+ fin.entry
+ write.url
+}
+
+FUNCTION {techreport}
+{ output.bibitem
+ format.authors "author" output.check
+ author format.key output
+ format.date "year" output.check
+ date.block
+ format.title "title" output.check
+ end.quote.title
+ format.tr.number output.nonnull
+ institution "institution" output.check
+ address output
+ format.note output
+ fin.entry
+ write.url
+}
+
+FUNCTION {unpublished}
+{ output.bibitem
+ format.authors "author" output.check
+ author format.key output
+ format.date "year" output.check
+ date.block
+ format.title "title" output.check
+ end.quote.title
+ format.note "note" output.check
+ fin.entry
+ write.url
+}
+
+FUNCTION {default.type} { misc }
+
+READ
+
+FUNCTION {sortify}
+{ purify$
+ "l" change.case$
+}
+
+INTEGERS { len }
+
+FUNCTION {chop.word}
+{ 's :=
+ 'len :=
+ s #1 len substring$ =
+ { s len #1 + global.max$ substring$ }
+ 's
+ if$
+}
+
+FUNCTION {format.lab.names}
+{ 's :=
+ "" 't :=
+ s #1 "{vv~}{ll}" format.name$
+ s num.names$ duplicate$
+ #2 >
+ { pop$
+ " " * bbl.etal *
+ }
+ { #2 <
+ 'skip$
+ { s #2 "{ff }{vv }{ll}{ jj}" format.name$ "others" =
+ {
+ " " * bbl.etal *
+ }
+ { " \& " * s #2 "{vv~}{ll}" format.name$
+ * }
+ if$
+ }
+ if$
+ }
+ if$
+}
+
+FUNCTION {author.key.label}
+{ author empty$
+ { key empty$
+ { cite$ #1 #3 substring$ }
+ 'key
+ if$
+ }
+ { author format.lab.names }
+ if$
+}
+
+FUNCTION {author.editor.key.label}
+{ author empty$
+ { editor empty$
+ { key empty$
+ { cite$ #1 #3 substring$ }
+ 'key
+ if$
+ }
+ { editor format.lab.names }
+ if$
+ }
+ { author format.lab.names }
+ if$
+}
+
+FUNCTION {editor.key.label}
+{ editor empty$
+ { key empty$
+ { cite$ #1 #3 substring$ }
+ 'key
+ if$
+ }
+ { editor format.lab.names }
+ if$
+}
+
+FUNCTION {calc.short.authors}
+{ type$ "book" =
+ type$ "inbook" =
+ or
+ 'author.editor.key.label
+ { type$ "proceedings" =
+ 'editor.key.label
+ 'author.key.label
+ if$
+ }
+ if$
+ 'short.list :=
+}
+
+FUNCTION {calc.label}
+{ calc.short.authors
+ short.list
+ "("
+ *
+ year duplicate$ empty$
+ short.list key field.or.null = or
+ { pop$ "????" }
+ 'skip$
+ if$
+ *
+ 'label :=
+}
+
+FUNCTION {sort.format.names}
+{ 's :=
+ #1 'nameptr :=
+ ""
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ { s nameptr
+ "{vv{ } }{ll{ }}{ f{ }}{ jj{ }}"
+ format.name$ 't :=
+ nameptr #1 >
+ {
+ " " *
+ namesleft #1 = t "others" = and
+ { "zzzzz" * }
+ { t sortify * }
+ if$
+ }
+ { t sortify * }
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+}
+
+FUNCTION {sort.format.title}
+{ 't :=
+ "A " #2
+ "An " #3
+ "The " #4 t chop.word
+ chop.word
+ chop.word
+ sortify
+ #1 global.max$ substring$
+}
+
+FUNCTION {author.sort}
+{ author empty$
+ { key empty$
+ { "to sort, need author or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { author sort.format.names }
+ if$
+}
+
+FUNCTION {author.editor.sort}
+{ author empty$
+ { editor empty$
+ { key empty$
+ { "to sort, need author, editor, or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { editor sort.format.names }
+ if$
+ }
+ { author sort.format.names }
+ if$
+}
+
+FUNCTION {editor.sort}
+{ editor empty$
+ { key empty$
+ { "to sort, need editor or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { editor sort.format.names }
+ if$
+}
+
+FUNCTION {presort}
+{ calc.label
+ label sortify
+ " "
+ *
+ type$ "book" =
+ type$ "inbook" =
+ or
+ 'author.editor.sort
+ { type$ "proceedings" =
+ 'editor.sort
+ 'author.sort
+ if$
+ }
+ if$
+ #1 entry.max$ substring$
+ 'sort.label :=
+ sort.label
+ *
+ " "
+ *
+ title field.or.null
+ sort.format.title
+ *
+ #1 entry.max$ substring$
+ 'sort.key$ :=
+}
+
+ITERATE {presort}
+
+SORT
+
+STRINGS { last.label next.extra }
+
+INTEGERS { last.extra.num number.label }
+
+FUNCTION {initialize.extra.label.stuff}
+{ #0 int.to.chr$ 'last.label :=
+ "" 'next.extra :=
+ #0 'last.extra.num :=
+ #0 'number.label :=
+}
+
+FUNCTION {forward.pass}
+{ last.label label =
+ { last.extra.num #1 + 'last.extra.num :=
+ last.extra.num int.to.chr$ 'extra.label :=
+ }
+ { "a" chr.to.int$ 'last.extra.num :=
+ "" 'extra.label :=
+ label 'last.label :=
+ }
+ if$
+ number.label #1 + 'number.label :=
+}
+
+FUNCTION {reverse.pass}
+{ next.extra "b" =
+ { "a" 'extra.label := }
+ 'skip$
+ if$
+ extra.label 'next.extra :=
+ extra.label
+ duplicate$ empty$
+ 'skip$
+ { "{\natexlab{" swap$ * "}}" * }
+ if$
+ 'extra.label :=
+ label extra.label * 'label :=
+}
+
+EXECUTE {initialize.extra.label.stuff}
+
+ITERATE {forward.pass}
+
+REVERSE {reverse.pass}
+
+FUNCTION {bib.sort.order}
+{ sort.label
+ " "
+ *
+ year field.or.null sortify
+ *
+ " "
+ *
+ title field.or.null
+ sort.format.title
+ *
+ #1 entry.max$ substring$
+ 'sort.key$ :=
+}
+
+ITERATE {bib.sort.order}
+
+SORT
+
+FUNCTION {begin.bib}
+{ preamble$ empty$
+ 'skip$
+ { preamble$ write$ newline$ }
+ if$
+ "\begin{thebibliography}{" number.label int.to.str$ * "}" *
+ write$ newline$
+ "\newcommand{\enquote}[1]{``#1''}"
+ write$ newline$
+ "\expandafter\ifx\csname natexlab\endcsname\relax\def\natexlab#1{#1}\fi"
+ write$ newline$
+ "\expandafter\ifx\csname url\endcsname\relax"
+ write$ newline$
+ " \def\url#1{{\tt #1}}\fi"
+ write$ newline$
+ "\expandafter\ifx\csname urlprefix\endcsname\relax\def\urlprefix{URL }\fi"
+ write$ newline$
+}
+
+EXECUTE {begin.bib}
+
+EXECUTE {init.state.consts}
+
+ITERATE {call.type$}
+
+FUNCTION {end.bib}
+{ newline$
+ "\end{thebibliography}" write$ newline$
+}
+
+EXECUTE {end.bib}
+%% End of customized bst file
+%%
+%% End of file `perception.bst'. \ No newline at end of file
diff --git a/biblio/bibtex/contrib/persian-bib/MyReferences.bib b/biblio/bibtex/contrib/persian-bib/MyReferences.bib
new file mode 100644
index 0000000000..08dd679392
--- /dev/null
+++ b/biblio/bibtex/contrib/persian-bib/MyReferences.bib
@@ -0,0 +1,147 @@
+@ARTICLE{Vahedi87,
+ AUTHOR = {واحدی, مصطفی},
+ TITLE = {درختان پوشای کمینه دورنگی مسطح},
+ JOURNAL = {مجله فارسی نمونه},
+ VOLUME = {1},
+ YEAR = {1387},
+ NUMBER = {2},
+ MONTH = {آبان},
+ PAGES = {22-30},
+ LANGUAGE = {Persian}
+}
+
+@CONFERENCE{Amintoosi09regional,
+ author = {M. Amintoosi and M. Fathy and N. Mozayani},
+ authorfa = {م. امین‌طوسی and م. فتحی and م.مزینی},
+ title = {Regional Varying Image Super-Resolution},
+ booktitle = {IEEE International Joint Conference on Computational Sciences and Optimization},
+ year = {2009},
+ month = {April 23-26},
+ address = {Sanya, China},
+ volume = {1},
+ pages = {913-917}
+}
+
+@CONFERENCE{Amintoosi09video,
+ author = {M. Amintoosi and M. Fathy },
+ authorfa = {م. امین‌طوسی and م. فتحی },
+ title = {Video Resolution Enhancement in the Presence of Moving Objects},
+ booktitle = {International Conference on Image Processing, Computer Vision, and Pattern Recognition},
+ year = {2009},
+ address = {Las Vegas, USA},
+ month = {July}
+}
+
+@ARTICLE{Amintoosi09precise,
+ AUTHOR = {M. Amintoosi and M. Fathy and N. Mozayani},
+ authorfa = {م. امین‌طوسی and م. فتحی and م.مزینی},
+ TITLE = {Precise Image Registration with Structural Similarity Error Measurement Applied to Super-Resolution},
+ JOURNAL = {{EURASIP} {J}ournal on {A}dvances in {S}ignal {P}rocessing},
+ Volume = {2009},
+ YEAR = {2009},
+ pages = {7 pages},
+ note = {{A}rticle ID 305479},
+ url = {http://www.hindawi.com/journals/asp/2009/305479.html}
+}
+
+@CONFERENCE{Amintoosi87afzayesh,
+ AUTHOR = {امین‌طوسی,محمود and مزینی,ناصر and فتحی,محمود},
+ TITLE = {افزایش وضوح ناحیه‌ای},
+ BOOKTITLE = {چهاردهمین کنفرانس ملی سالانه انجمن کامپیوتر ایران},
+ YEAR = {1387},
+ ORGANIZATION = {دانشگاه امیرکبیر},
+ ADDRESS = {تهران، ایران},
+ month = {اسفند},
+ pages = {101--108},
+ LANGUAGE = {Persian}
+}
+
+@article{Baker02limits,
+ author = {Baker,, Simon and Kanade,, Takeo},
+ title = {Limits on Super-Resolution and How to Break Them},
+ journal = {IEEE Trans. Pattern Anal. Mach. Intell.},
+ volume = {24},
+ number = {9},
+ year = {2002},
+ issn = {0162-8828},
+ pages = {1167--1183},
+ publisher = {IEEE Computer Society},
+ address = {Washington, DC, USA}
+ }
+
+@BOOK{Gonzalez02book,
+ AUTHOR = {Gonzalez,, Rafael C. and Woods,, Richard E.},
+ authorfa = {ر. گنزالس and ر. وودس },
+ TITLE = {Digital Image Processing},
+ PUBLISHER = {Prentice-Hall, Inc.},
+ YEAR = {2006},
+ ISBN = {013168728X},
+ EDITION = {3rd},
+ ADDRESS = {Upper Saddle River, NJ, USA},
+}
+
+@MASTERSTHESIS{Khalighi07MscThesis,
+ AUTHOR = {Vafa Khalighi},
+ AUTHORFA = {خلیقی,وفا},
+ TITLE = {Category Theory},
+ SCHOOL = {Sydny Univ.},
+ YEAR = {2007},
+ MONTH = {April}
+}
+
+@MISC{Khalighi87xepersian,
+ AUTHOR = {خلیقی,وفا},
+ TITLE = {زی‌پرشین (\lr{\XePersian}): بسته فارسی برای حروف‌چینی در \lr{\LaTeXe}},
+ HOWPUBLISHED = {\lr{\href{http://ctan.org/pkg/xepersian}{http://ctan.org/pkg/xepersian}}},
+ YEAR = {۱۳۸۷},
+ LANGUAGE = {Persian}
+ }
+
+@PHDTHESIS{Omidali82phdThesis,
+ AUTHOR = {امیدعلی, مهدی},
+ TITLE = {خم‌های تک‌جمله‌ای تعریف شده توسط دنباله‌های تقریباً حسابی},
+ SCHOOL = {دانشکده ریاضی، دانشگاه امیرکبیر},
+ YEAR = {1385},
+ MONTH = {تیر},
+ LANGUAGE = {Persian}
+}
+
+@BOOK{Pedram80osool,
+ AUTHOR = {استالینگ, ویلیام},
+ EDITOR = {برنجکوب, محمود},
+ translator = { صدیقی‌ مشکنانی, محسن and پدرام,حسین },
+ TITLE = {اصول طراحی و ویژگیهای داخلی سیستم‌های عامل},
+ PUBLISHER = {نشر شیخ بهایی},
+ YEAR = {۱۳۸۰},
+ ADDRESS = {اصفهان},
+ edition = {سوم},
+ MONTH = {بهار},
+ LANGUAGE = {Persian}
+}
+
+@MASTERSTHESIS{Pourmousa88mscThesis,
+ AUTHOR = {پورموسی , امیرمسعود},
+ TITLE = {بررسی رویدادهای ریزهمگرایی گرانشی تکراری در راستای مرکز کهکشان و ابرهای ماژلانی},
+ SCHOOL = {دانشکده فیزیک، دانشگاه صنعتی‌شریف},
+ YEAR = {۱۳۸۸},
+ LANGUAGE = {Persian}
+}
+
+@PhdThesis{Borman04thesis,
+ author = {Sean Borman},
+ authorfa = {بورمن,سین},
+ title = {Topics in Multiframe Superresolution Restoration},
+ school = {University of Notre Dame},
+ year = {2004},
+ address = {Notre Dame, IN},
+ month = may,
+}
+
+@PROCEEDINGS {conference06,
+ editor = {Farhad Shokoohi},
+ authorfa = {فرهاد شکوهی},
+ title = {Proceedings of the Xth Conference on XYZ},
+ booktitle = {Proceedings of the Xth Conference on XYZ},
+ year = {2006},
+ month = {October}
+} \ No newline at end of file
diff --git a/biblio/bibtex/contrib/persian-bib/Persian-bib-userguide.pdf b/biblio/bibtex/contrib/persian-bib/Persian-bib-userguide.pdf
new file mode 100644
index 0000000000..21fa1539a6
--- /dev/null
+++ b/biblio/bibtex/contrib/persian-bib/Persian-bib-userguide.pdf
Binary files differ
diff --git a/biblio/bibtex/contrib/persian-bib/Persian-bib-userguide.tex b/biblio/bibtex/contrib/persian-bib/Persian-bib-userguide.tex
new file mode 100644
index 0000000000..356e4b72be
--- /dev/null
+++ b/biblio/bibtex/contrib/persian-bib/Persian-bib-userguide.tex
@@ -0,0 +1,370 @@
+\documentclass[a4paper]{article}
+% محمود امین‌طوسی، http://profs.hsu.ac.ir/mamintoosi
+% To do
+
+%\versionnumber{0.9}
+
+\usepackage{verbatim}
+\usepackage{color}
+\usepackage{amsthm}
+\usepackage[linktocpage=true,colorlinks,citecolor=blue,pagebackref=true]{hyperref}%
+\usepackage[nonamebreak,square]{natbib}%nonamebreak,numbers,
+\usepackage[top=30mm, bottom=30mm, left=30mm, right=30mm]{geometry}
+\usepackage{listings}
+
+\usepackage{xepersian}
+\settextfont[Scale=1]{XB Zar}%{XB Niloofar}
+\setlatintextfont[Scale=1]{Linux Libertine}
+%\setdigitfont[Scale=1]{XB Zar}
+\defpersianfont\Sayeh[Scale=1]{XB Kayhan Sayeh}
+
+\theoremstyle{plain}\newtheorem{question}{پرسش}
+\newcommand{\answer}{{\noindent \Sayeh پاسخ: }}
+\newcommand\SLASH{\char`\\}
+
+
+\title{\vspace{-2cm}
+{\small بسم الله الرحمن الرحيم\\}
+\vspace{2cm}
+ راهنمای استفاده از سبک‌های فارسی برای \textcolor{red}{\lr{\textsc{Bib}\TeX}}\\
+ در \textcolor{blue}{زی‌پرشین}\\
+\lr{(Persian-bib User Guide)}
+}
+\author{محمود امین‌طوسی\\
+\href{http://profs.hsu.ac.ir/mamintoosi}{دانشگاه حکیم سبزواری}
+\href{http://www.parsilatex.com}{گروه پارسی‌لاتک}
+%\lr{m.amintoosi at gmail.com}
+}
+%\date{}
+
+\begin{document}
+\maketitle
+%\vspace{2cm}
+\tableofcontents
+
+\section{مقدمه}
+
+یکی از روش‌های قدرتمند و انعطاف‌پذیر برای نوشتن مراجع مقالات و مدیریت مراجع در لاتک، استفاده از بسته‌ی \lr{BibTeX} است.
+اگر این بسته را به کار نبریم (و از ویژگی‌های پیش‌فرض لاتک برای مدیریت مراجع استفاده کنیم)، باید مراجع هر مقاله را در پایان همان مقاله بنویسیم
+و در متن نوشته به آن‌ها ارجاع دهیم. ولی روش کار با بسته‌ی \lr{BibTeX} به این صورت است که مجموعه‌ی همه‌ی مراجعی را که در نوشتن مقاله‌هایمان به کارمان می‌آید،
+در پرونده‌ی جداگانه‌ای نوشته و از آن در مقالات مختلف‌مان استفاده می‌کنیم. این روش ممکن است در آغاز کمی کار بیشتری بخواهد، ولی در پایان به سرعت کار می‌افزاید.
+گذشته از این، اگر کنفرانس‌ها یا مجله‌های گوناگون برای نوشتن مراجع، قالب‌ها یا قراردادهای متفاوتی داشته باشند
+ (مثلاً در ترتیب مراجع، ترتیب نام نویسنده‌های هر مرجع، بزرگی و کوچکی حروف و نحوه‌ی چینش اجزاء مرجع) و شما می‌خواهید مقالاتی در یک موضوع را آماده نمایید،
+ لازم نیست قالب مراجع را در هر سند خود به صورت جداگانه تغییر دهید.
+ در این حالت به کمک سبک‌های \lr{BibTeX} خواهید توانست تنها با تغییر یک پارامتر در پرونده‌ی ورودی خود، مراجع را مطابق قالب موردنظر تنظیم کنید.
+ بیشتر مجلات و کنفرانس‌های معتبر یک پرونده‌ی سبک (\lr{BibTeX Style}) با پسوند \lr{bst} در وب‌گاه خود می‌گذارند که برای همین منظور طراحی شده است.
+
+به جز نوشتن مقالات این سبک‌ها کمک بسیار خوبی برای تهیه‌ی مستندات علمی همچون پایان‌نامه‌هاست که فرد می‌تواند هر قسمت از کارش را که نوشت مراجع مربوطه
+را به بانک مراجع خود اضافه نماید. با داشتن چنین بانکی از مراجع، وی خواهد توانست به راحتی یک یا چند ارجاع به مراجع و یا یک یا چند بخش را حذف یا اضافه ‌نماید؛
+مراجع به صورت خودکار مرتب شده و فقط مراجع ارجاع داده شده در قسمت کتاب‌نامه خواهندآمد. قالب مراجع به صورت یکدست مطابق سبک داده شده بوده و نیازی نیست
+که کاربر درگیر قالب‌دهی به مراجع باشد.
+در این جا مجموعه‌ای از سبک‌های \lr{BibTeX} که برای بسته‌ی زی‌پرشین تنظیم شده‌اند معرفی شده و روش کار با آن‌ها گفته می‌شود.
+
+
+\section{سبک‌های فعلی قابل استفاده در زی‌پرشین}
+در حال حاضر فایلهای سبک زیر برای استفاده در زی‌پرشین آماده شده‌اند\footnote{برای دیدن و مقایسه‌ی خروجی سبک‌های مورد استفاده در اسناد فارسی، کافیست برنامه‌ی پرل \lr{gen\_pdf} را -- که همراه با بسته‌ی \lr{Persian-bib} است -- اجرا کنید تا به صورت خودکار نمونه خروجی‌هایی با تمام این سبک‌ها تولید نماید و یا به ویکی پارسی‌لاتک
+ (\url{http://wiki.parsilatex.com})
+ مراجعه فرمایید.}:
+\begin{description}
+\item [unsrt-fa.bst] این سبک متناظر با \lr{unsrt.bst} می‌باشد. مراجع به ترتیب ارجاع در متن ظاهر می‌شوند.
+\item [plain-fa.bst] این سبک متناظر با \lr{plain.bst} می‌باشد. مراجع بر اساس نام‌خانوادگی نویسندگان، به ترتیب صعودی مرتب می‌شوند.
+ همچنین ابتدا مراجع فارسی و سپس مراجع انگلیسی خواهند آمد.
+\item [acm-fa.bst] این سبک متناظر با \lr{acm.bst} می‌باشد. شبیه \lr{plain-fa.bst} است. قالب مراجع کمی متفاوت است. اسامی نویسندگان انگلیسی با حروف بزرگ انگلیسی نمایش داده می‌شوند. (مراجع مرتب می‌شوند)
+\item [ieeetr-fa.bst] این سبک متناظر با \lr{ieeetr.bst} می‌باشد. (مراجع مرتب نمی‌شوند)
+%\item [persia-unsorted.bst] این سبک شبیه \lr{ieeetr-fa.bst} می‌باشد با این تفاوت که برخی نامها با حروف توپر نوشته شده‌اند.
+\item [plainnat-fa.bst] این سبک متناظر با \lr{plainnat.bst} می‌باشد. نیاز به بستهٔ \lr{natbib} دارد. (مراجع مرتب می‌شوند)
+\item [chicago-fa.bst] این سبک متناظر با \lr{chicago.bst} می‌باشد. نیاز به بستهٔ \lr{natbib} دارد. (مراجع مرتب می‌شوند)
+\item [asa-fa.bst] این سبک متناظر با \lr{asa.bst} می‌باشد. نیاز به بستهٔ \lr{natbib} دارد. (مراجع مرتب می‌شوند)
+\item[plain-fa-inLTR]
+این سبک همان سبک
+\lr{plain-fa}
+می‌باشد ولی برای اسناد چپ به راست می‌تواند مورد استفاده قرار گیرد. منظور حالتی است که به عنوان مثال کل سند لاتین است و مایلیم یک یا چند مرجع فارسی هم داشته باشیم.
+\item[plain-fa-inLTR-beamer]
+این سبک مشابه سبک
+\lr{plain-fa-inLTR}
+است با این تفاوت که شامل اصلاحاتی جزیی برای استفاده در اسناد چپ به راست طبقه نوشتاری
+\lr{beamer}
+می‌باشد.
+\end{description}
+
+
+\section{ نحوه استفاده از سبک‌های فارسی}
+ %با مطالعه و اجرای مثال ارائه شده با زی‌پرشین (فایل \lr{bibtex\_example.tex}) با نحوه‌ی استفاده از سبک‌های فارسی آشنا خواهید شد.
+ مراحل اصلی برای استفاده از این سبک‌ها در ذیل آمده است:
+\begin{enumerate}
+\item در ابتدا باید یک بانک از مراجع خود همانند فایل \lr{MyReferences.bib} تهیه نمایید. اغلب انواع مراجع معمول مورد استفاده در آن آمده است. این فایل را در هر زمان می‌توانید ویرایش نموده، مراجعی را حذف یا اضافه نمایید.
+\item برای هر مدخل فارسی بایستی فیلدی با نام \lr{language} و با مقدار \lr{persian} داشته باشید.
+\item اگر مرجع شما دارای مترجم است، فیلدی به نام \lr{translator} حاوی نام(های) مترجم ایجاد کنید.
+\item در محلی از سورس زی‌پرشین خود که می‌خواهید لیست مراجع قرار بگیرد (معمولاً آخر سند) دستورات زیر را قرار دهید:
+\begin{LTR}
+\begin{verbatim}
+\bibliographystyle{style-file-name}% such as plain-fa
+\bibliography{bib-file-name} %such as MyReferences
+\end{verbatim}
+\end{LTR}
+\item فرض کنید نام فایل شما \lr{`myfile.tex'} باشد. دنباله پردازشهای زیر را برای حصول به نتیجه نهایی انجام دهید:
+
+\begin{LTR}
+\begin{verbatim}
+xelatex myfile
+bibtex myfile
+xelatex myfile
+xelatex myfile
+\end{verbatim}
+\end{LTR}
+\end{enumerate}
+نکته: در روش فوق مراجع فارسی در استیل‌هایی که مراجع را به صورت مرتب شده چاپ می‌کنند، ترتیب کاملاً درستی نخواهند داشت. برای توضیحات بیشتر بخش‌ \ref{Sec:sorting} را ببینید.
+
+\section{یک فایل \texorpdfstring{\lr{bib}}{bib} شامل چیست؟}
+یک فایل \lr{bib} در واقع یک پایگاه داده از مراجع\LTRfootnote{Bibliography Database} شماست که هر مرجع در آن به عنوان یک رکورد از این پایگاه داده
+با قالبی خاص ذخیره می‌شود. به هر رکورد یک مدخل\LTRfootnote{Entry} گفته می‌شود. یک نمونه مدخل برای معرفی کتاب \lr{Digital Image Processing} در ادامه آمده است:
+\begin{LTR}
+\begin{verbatim}
+@BOOK{Gonzalez02book,
+ AUTHOR = {Rafael Gonzalez and Richard Woods},
+ TITLE = {Digital Image Processing},
+ PUBLISHER = {Prentice-Hall, Inc.},
+ YEAR = {2006},
+ EDITION = {3rd},
+ ADDRESS = {Upper Saddle River, NJ, USA}
+}
+\end{verbatim}
+\end{LTR}
+در مثال فوق، \lr{@BOOK} مشخصه‌ی شروع یک مدخل مربوط به یک کتاب و \lr{Gonzalez02book} برچسبی است که به این مرجع منتسب شده است.
+ این برچسب بایستی یکتا باشد. برای آنکه فرد به راحتی بتواند برچسب
+مراجع خود را به خاطر بسپارد و حتی‌الامکان برچسب‌ها متفاوت با هم باشند معمولاً از قوانین خاصی به این منظور استفاده می‌شود. یک قانون می‌تواند فامیل نویسنده‌ی
+اول+دورقم سال نشر+اولین کلمه‌ی عنوان اثر باشد. به \lr{AUTHOR} و $\dots$ و \lr{ADDRESS} فیلدهای این مدخل گفته می‌شود؛ که هر یک با مقادیر مربوط
+به مرجع مقدار گرفته‌اند. ترتیب فیلدها مهم نیست.
+
+انواع متنوعی از مدخل‌ها برای اقسام مختلف مراجع همچون کتاب، مقاله‌ی کنفرانس و مقاله‌ی ژورنال وجود دارد که برخی فیلدهای آنها با هم متفاوت است.
+نام فیلدها بیانگر نوع اطلاعات آن می‌باشد. مثالهای ذکر شده در فایل \lr{MyReferences.bib} کمک خوبی به شما خواهد بود.
+این فایل یک فایل متنی بوده و با ویرایشگرهای معمول همچون \lr{Notepad++} قابل ویرایش می‌باشد. برنامه‌هایی همچون
+\lr{TeXMaker} امکاناتی برای نوشتن این مدخل‌ها دارند و به صورت خودکار فیلدهای مربوطه را در فایل \lr{bib} شما قرار می‌دهند.
+با استفاده از سبک‌های فارسی آماده شده، محتویات هر فیلد می‌تواند به فارسی نوشته شود، ترتیب مراجع و نحوه‌ی چینش فیلدهای هر مرجع را سبک مورد استفاده
+مشخص خواهد کرد.
+
+
+\section{استفاده از \texorpdfstring{\lr{natbib}}{natbib}}\label{Sec:natbib}
+برخی مایلند که مراجع خود را با قالب نویسنده-سال داشته باشند. برای لاتین استیلهایی نظیر \lr{plainnat} وجود دارند که خروجی آنها به اینگونه است؛ ولی برای فارسی چنین استیلهایی نداریم.
+بعلاوه معمولاً در مستندات فارسی خواسته می‌شود که نام‌های لاتین مؤلفین در متن به صورت فارسی نوشته شود ولی در لیست مراجع به صورت انگلیسی ظاهر شوند.
+%اگر از استیلهای \lr{plainnat} یا \lr{chicago} در مستندات زی‌پرشین استفاده کنیم با مشکلاتی مواجه هستیم.
+با استفاده از استیل‌های جدید \lr{plainnat-fa.bst}، \lr{asa-fa.bst} و \lr{chicago-fa.bst} می‌توانید در زمانیکه متن شما فارسی و مراجعتان لاتین است از قالب مراجع به صورت «نویسنده-سال» استفاده کنید. به این منظور باید در هر مدخل مراجع خود یک فیلد جدید به نام \lr{AUTHORFA} تعریف نموده و معادل فارسی نام مؤلفین را در آن قید کنید.
+دنباله عملیات لازم برای تولید خروجی در بخش \ref{Sec:sorting} آمده است.
+
+تا آنجا که بررسی شده است، سه استیل آماده شده با فرامین معمول بستهٔ \lr{natbib} که در راهنمای آن آمده است (مانند \lr{cite,citet,citep}) به خوبی کار می‌کند. در ادامه مثالهای متنوعی از انواع مختلف مراجع و برخی دستورات ارجاع‌دهی در \lr{natbib} آمده است. دقت داشته باشید که برای استفاده از فایل‌های استیل فارسی فوق‌الذکر باید بستهٔ \lr{natbib} نصب شده باشد و آنرا فراخوانی نموده باشید. در این بسته به صورت پیش‌فرض در ارجاع به مراجع، از پرانتز استفاده می‌شود، لیکن از آنجا که در این سند این بسته با گزینه‌ی \lr{square} فراخوانی شده است، مراجع با کروشه مشخص شده‌اند.
+
+\subsection{مثالها}\label{Sec:examples}
+
+\citet{Borman04thesis}\LTRfootnote{\citeauthor*{Borman04thesis}} در پایان‌نامهٔ دکترای خود به موضوع وضوح برتر پرداخته است.
+\citet{Amintoosi09precise}\LTRfootnote{\citeauthor*{Amintoosi09precise}} یک روش افزایش وضوح تصویر ارائه دادند. این روش توسط \citet{Amintoosi09video} برای ویدئو بکار گرفته شد.همانگونه که می‌بینید در این مرجع که دو مؤلف داریم فامیل هر دو آمده است. ضمناً هر دو مرجع لاتین هستند که در فیلد \lr{authorfa} معادل فارسی آنها ذکر شده بوده است.
+
+خوب حالا ببینیم با مرجع \citep{Amintoosi09regional} چکار می‌کند. از آنجا که مؤلفین این مقاله و مقاله اول و سال نشر هر دو یکی است در کنار سال، \lr{a,b,c,...} قرار می‌گیرد. این یکی را تبدیل به الف و ب نمی‌کنیم چرا که در لیست مراجع به همین صورت ظاهر می‌شوند.
+
+و حالا چند مرجع از انواع مختلف را با هم ببینیم: \citet{Omidali82phdThesis} یک نمونه پروژه دکترا و مرجع \citep{Vahedi87} یک نمونه مقاله مجله فارسی است که با \lr{citep} به آن ارجاع داده شده و لذا کلاً داخل کروشه قرار گرفته است.
+
+مرجع \citep{Pedram80osool} یک نمونه کتاب فارسی با ذکر مترجمان و ویراستاران فارسی است. مرجع \citep{Khalighi07MscThesis} یک نمونه پروژه کارشناسی ارشد انگلیسی و \citet{Khalighi87xepersian} هم یک نمونه متفرقه می‌باشند.\citet{Gonzalez02book} یک کتاب لاتین است.
+
+ مرجع \citet[فصل ۲]{Pourmousa88mscThesis} یک نمونه پروژه کارشناسی ارشد فارسی است که به فصل دوم آن ارجاع داده شده و مرجع \citep[قضیه‌ی ۲،][]{Amintoosi87afzayesh} یک نمونه مقاله کنفرانس فارسی با ارجاع به یک قضیه به آن است که قضیه‌ی مربوطه قبل از نام مرجع آمده است (برخلاف مثال پیشین).
+
+ اگر به مرجع قبل با استفاده از \lr{citealp*} ارجاع دهیم به صورت \citealp*{Amintoosi87afzayesh} نشان داده می‌شود که همانگونه که مشاهده می‌کنید نام تمام مؤلفین نشان داده شده است؛ برخلاف مورد قبلی که مؤلفین دوم به بعد با «ودیگران» جایگزین می‌شد. البته در حال حاضر این مورد فقط برای مراجع فارسی بدرستی عمل می‌نماید.
+%همانگونه که دیده می‌شود، مراجع فارسی و لاتین هم در متن و هم در لیست مراجع به صورت درست نمایش داده شده اند.
+%تست چندمرجعی زیرنویس \LTRfootnote{\citeauthor*{Amintoosi09precise,Gonzalez02book}}\citet{Amintoosi09precise,Gonzalez02book}
+
+اگر اسامی مؤلفان چند مرجع یکسان باشد (فارسی یا معادل فارسی آنها) و به آنها پشت سرهم ارجاع دهیم، اسامی فقط یک بار ظاهر خواهند شد. مثلاً \citet{Amintoosi09precise,Amintoosi87afzayesh} دو مقاله از نویسندگان یکسان ولی اولی به لاتین و دومی به فارسی است که سال نشر آنها مؤید این مطلب است.
+ البته یک نقطه ضعف کوچک هم دارد و آن این است که برای تست یکسان بودن مراجع همین برچسب مورد عمل قرار می‌گیرد. به عنوان مثال از آنجا که برای هر دو مقاله «امین‌طوسی و دیگران» آمده است، بدون توجه به اینکه سایر همکاران ممکن است متفاوت باشند در یک دسته قرار می‌گیرند.
+
+%مثالی از کنفرانس بدون نویسنده: \citep{conference06}
+
+\section{مرتب‌سازی مراجع بر اساس نام نویسنده}\label{Sec:sorting}
+اگر در نام خانوادگی نویسنده‌ یکی از حروف 'گچپژ` و یا کاف فارسی باشد مرتب‌سازی با مشکل مواجه خواهد شد. برای مشخص کردن ترتیب درست حروف، فایلی با نام \lr{`cp1256fa.csf'} آماده شده است که باید آنرا به همراه \lr{bibtex8} بکار ببرید. همچنین از آنجا که در بسیاری از قوانین مربوط به درج مراجع در ایران خواسته می‌شود که ابتدا مراجع فارسی و سپس مراجع لاتین قید شوند، در فایل مذکور حروف فارسی قبل از حروف لاتین آمده‌اند.
+فرض کنید نام فایل شما \lr{`myfile.tex'} و نام فایل حاوی مراجع شما \lr{ `SomeReferences.bib'} باشد. این فایل و فایل \lr{`cp1256fa.csf'} باید در همان شاخه فایل اصلی شما یا در مسیر سیستم باشند.
+%برای آشنایی با ساختار فایل \lr{`SomeReferences.bib'} به همین فایل که همراه این فایل است مراجعه قرمایید.
+دنباله کارهای زیر را برای حصول به نتیجه باید انجام دهید:
+\begin{LTR}
+\begin{verbatim}
+xelatex myfile
+bibtex8 -W -c cp1256fa myfile
+xelatex myfile
+xelatex myfile
+\end{verbatim}
+\end{LTR}
+می‌توانید به جای \lr{bibtex8} از {\lr{bibtex}} و بدون هیچ گزینهٔ اضافه‌ای استفاده کنید ولی در این حالت مراجع فارسی شما مرتب نخواهند بود، مگر آنکه به نحو مناسبی از \lr{noopsort} استفاده کنید.
+
+
+
+\section{چند نکته در مورد استفاده از سبک‌های فارسی}
+\begin{itemize}
+\item همانگونه که مشاهده کردید با استفاده از فیلد \lr{AUTHORFA} می‌توان معادل فارسی نام نویسندگان مقالات لاتین را در متن داشت. معمولاً در اسناد فارسی خواسته می‌شود که پس از ذکر معادل فارسی نام نویسنده، نام لاتین نویسنده(ها) به عنوان پاورقی درج شود. به این منظور کافیست پس از ارجاع به مرجع، در دستور زیر نویس از فرم ارجاع نویسنده-سال استفاده کنید، مثلاً به صورت زیر:
+\begin{latin}
+\begin{verbatim}
+\citep{referenceTag}\LTRfootnote{\citeauthor*{referenceTag}}
+\end{verbatim}
+\end{latin}
+ نام مؤلفینِ اولین دو نمونه ارجاعِ بخش مثالها (بخش \ref{Sec:examples}) به همین‌ صورت در پاورقی ظاهر شده است.
+
+\item همانگونه که مشاهده می‌کنید با بستهٔ \lr{hyperref} مشکلی وجود ندارد، البته به شرط داشتن بستهٔ \lr{bidi}نسخهٔ ۱.۰.۴ (\lr{revision} ۱۹۰ به بعد) . فقط یک استثناءوجود دارد و آن هم رنگ مرجع در هنگامی است که قسمتی از اسامی مؤلفین یک مرجع درانتهای یک خط و قسمتی دیگر در ابتدای خط بعد قرار گیرد. در این حالت کل دو خط رنگی می‌شوند. راه حلی نسبی برای آن با گزینه \lr{nonamebreak} از بستهٔ \lr{natbib} و گزینه کشیده \lr{(Kashida)} از بستهٔ زی‌پرشین وجود دارد.
+%در \lr{LuaPersian} که سبک فارسی در حال گسترشی توسط آقای خلیقی است این مشکل وجود ندارد.
+
+%یک مثال را ببینیم:در اینجا چند مرجع پشت سر هم داریم که از یک خط بیشتر شده‌اند: \citet{Omidali82phdThesis} و \citealp*{Khalighi87xepersian} و \citet{Amintoosi09precise,Amintoosi87afzayesh} اگر گزینه \lr{nonamebreak} را استفاده نکنید هر دو خط آبی خواهند شد. با استفاده از گزینهٔ مذکور که مربوط به بستهٔ \lr{natbib} است، این مشکل رنگی شدن دو خط برطرف می‌شود ولی ممکن است تنظیم خط به هم بخورد،‌ کمتر از طول خط شود و یا از حد خارج شود. این مشکل بسیاری از اوقات توسط گزینهٔ کشیده \lr{(Kashida)} در بستهٔ زی‌پرشین قابل حل است.
+
+\item متاسفانه \lr{bibtex} قادر به جداسازی حرف اول نامهای فارسی نیست، لذا در استیل‌‌هایی که حرف اول نامهای لاتین ظاهر می‌شوند، نامهای فارسی به صورت کامل نشان داده می‌شوند. اگر نیاز به این حالت دارید، باید خودتان به صورت دستی نامها را در مراجع فارسی اصلاح نمایید.
+
+\item رمزینه فایل \lr{.bib} شما باید یونیکد یا \lr{UTF-8} باشد، در غیراینصورت (مثلاً اگر \lr{UTF-8 without BOM} باشد) در لینوکس با مشکل مواجه خواهید شد. به جای ایجاد فایل \lr{bib} جدید برای خود، فایل \lr{MyReferences.bib} که با رمزینه‌ی \lr{UTF-8} ذخیره شده است را تغییر داده در صورت نیاز با نامی دیگر ذخیره نمایید.
+\item برای فونت فارسی از فونت‌های سری \lr{XB} یا قلم مناسب دیگری که حروف لاتین را هم داشته باشد استفاده نمایید.
+\item برچسب‌ هر مرجع می‌تواند به فارسی نوشته شود، اما در آن نباید فاصله بکار برده شده باشد.
+به عنوان مثال به جای 'امین طوسی` بایستی از نیم فاصله استفاده نمود و آنرا به صورت 'امین‌طوسی` نوشت. دقت داشته باشید که در این حالت با بستهٔ \lr{hyperref} مشکل خواهید داشت.
+\item مراجع فارسی نیازی به فیلد \lr{authorfa} ندارند.
+\item دقت داشته باشید که اگر اول فامیل و سپس اسم را می‌نویسید، اسم و فامیل را با کامای انگلیسی از هم جدا کنید. اگر حروف اول اسم را می‌نویسید، پس از آن نقطه و بعد حتماً یک فاصله و سپس فامیل را بنویسید.
+%\item اگر مایلید که همچون این مثال، خط دوم هر مرجع کمی جلوتر برده شود فایل \lr{mybib.sty} را با دستور \lr{usepackage} پس از زی‌پرشین فراخوانی نمایید.
+\item در مرجع \cite{Baker02limits}، فیلد \lr{authorfa} را نداریم، اسامی به صورت لاتین و برعکس نوشته شده‌اند و سال هم به فارسی نوشته شده است. اگر آنرا به صورت لاتین می‌خواهید، در نسخه‌های جدید زی‌پرشین و \lr{bidi} می‌توانید به راحتی از دستور \lr{Latincite} استفاده کنید.
+حالا مرجع \Latincite{Baker02limits} درست نمایش داده می‌شود. از دستور فوق‌الذکر برای درج شماره مراجع به صورت لاتین در متن نیز می‌توان استفاده نمود. اگر مایل باشید از دیگر دستورات ارجاع مانند citealp استفاده کنید باید آنرا به صورت زیربکار ببرید:
+\begin{latin} \LRE{\verb+\LRE{\lr{\citealp{referenceTag}}}+} \end{latin}
+%\newcommand\LRcite[1]{\LRE{\lr{\cite{#1}}}}
+
+\item
+در طبقه نوشتاری
+\lr{biditufte-book}
+ از سبک‌های
+\lr{plainnat-fa}، \lr{chicago-fa} و \lr{asa-fa}
+و دستورات
+\verb!\LTRcite{}!
+\verb!\RTLcite{}!
+ استفاده فرمایید.
+
+\item برای گزارش مشکل به سایت پرسش و پاسخ پارسی‌لاتک
+ (\url{http://qa.parsilatex.com})
+ مراجعه فرمایید.
+
+\end{itemize}
+
+\section{مراجع فارسی در اسناد لاتین}
+برای داشتن مراجع فارسی در اسناد لاتین می‌توانید از سبک‌های
+\lr{plain-fa-inLTR}
+\lr{plain-fa-inLTR-beamer}
+استفاده فرمایید. از آنجا که به احتمال زیاد کاربران این بخش با زبان انگلیسی راحت‌تر هستند، نحوه استفاده از آن به انگلیسی بیان می‌شود.
+\begin{latin}
+Suppose that you want to have Persian or Arabic references in your Left-to-Right document. In this case plain-fa-inLTR.bst in Persian-bib package is the right solution.
+You should insert the following codes in the premable of your document and use a the aforementioned style in your documnet:
+
+\begin{lstlisting}[language=tex,breaklines=true, basicstyle=\ttfamily, numberstyle=\footnotesize, numbersep=10pt, captionpos=b, frame=single, breakatwhitespace=false]
+\usepackage{fontspec}
+\newfontfamily\Persianfont[Script=Arabic,Scale=1]{A font with Persian glifs such az XB Zar}
+\makeatletter
+\TeXXeTstate=1
+\def\Persiantext#1{\begingroup\beginR\Persianfont#1\endR\endgroup}
+\makeatother
+\end{lstlisting}
+
+Note that the encoding of your .bib file should be UTF-8. As you know, your bibliography section should be as follow:
+\begin{verbatim}
+\bibliographystyle{plain-fa-inLTR}
+\bibliography{SomeReferences}
+\end{verbatim}
+
+If you have Persian references in your beamer presentation, please use `plain-fa-inLTR-beamer' and insert the following code in the premable of your document:
+
+\begin{lstlisting}[language=tex,breaklines=true, basicstyle=\ttfamily, numberstyle=\footnotesize, numbersep=10pt, captionpos=b, frame=single, breakatwhitespace=false]
+\usepackage{fontspec}
+\newfontfamily\Persianfont[Script=Arabic,Scale=1]{A font with Persian glifs such az XB Zar}
+\makeatletter
+\TeXXeTstate=1
+\def\Persiantext#1{\begingroup\beginR\Persianfont#1\hfill\endR\endgroup}
+\def\newRAblock#1{#1\hfill}
+\makeatother\end{lstlisting}
+%
+
+\end{latin}
+
+\section{پرسش و پاسخ}
+\begin{question}
+ آیا برای داشتن مراجع، استفاده از استیلهای فارسی الزامی است؟
+\end{question}
+\answer
+هم بله و هم خیر. استیلهای فارسی کارهای مختلفی انجام می‌دهند؛ به جز استفاده از معادل فارسی برخی اصطلاحات، دستورات موردنیاز را در جای مناسب خود درج می‌کنند. در \lr{bidi} دستورات خاصی برای مراجع در محیطهای راست به چپ و چپ به راست وجود دارند که برای آشنایی با آنها باید به راهنمای این سبک مراجعه شود. از جمله این موارد، محیط \lr{LTRbibitems} است که برای درج مراجع لاتین در یک محیط راست به چپ استفاده می‌شود و در استیلهای فارسی از آن استفاده شده است. اگر از استیلهای فارسی استفاده نکنید، وظیفه درج این دستورات به عهده خود شما خواهد بود.
+
+\begin{question} آیا می‌توان شماره صفحات ارجاعی به هر مرجع را در انتهای هر مرجع داشت؟ این حالت مخصوصاً هنگام‌ داوری یک مقاله یا پروژه
+خیلی مفید است.
+\end{question}
+\answer
+بله، با دو روش:
+\begin{enumerate}
+\item
+اگر از بستهٔ \lr{hyperref} استفاده می‌کنید کافیست آنرا با گزینهٔ \lr{pagebackref=true} فراخوانی نمایید.
+\item
+با استفاده از بسته‌ی \lr{backref} نیز می‌توان این کار را انجام داد.
+\end{enumerate}
+
+\begin{question} گاهی اوقات اخطار \lr{Underfull \SLASH hbox} را دریافت می‌کنیم. مشکل از چیست؟ \end{question}
+\answer در برخی حالات به دلیل عدم توانایی تک در تنظیم بهینه‌ی محل شکستن خطوط این اخطار داده می‌شود که مهم نیست.
+
+\begin{question} چرا به جای خط فاصله در بین شماره صفحات مراجع فارسی یک مربع چاپ می‌شود؟ \end{question}
+\answer شما از فونت‌ مناسبی برای فارسی استفاده نکرده‌اید. از فونت‌های مانند فونت‌های سری \lr{XB} استفاده نمایید.
+
+\begin{question} چرا در سبک \lr{ieeetr-fa} شماره‌ی مجله (\lr{number}) در مراجع از نوع \lr{article} نمایش داده نمی‌شود؟ \end{question}
+\answer در سبک اصلی \lr{ieeetr} اگر ماه نشر مجله مشخص باشد، شماره‌ی آن نمایش داده نخواهد شد.
+ همچنین دقت داشته باشید که این سبک کاملاً مطابق با سبک جدید \lr{IEEEtran} نیست.
+
+\begin{question} حروف فارسی در لیست مراجع من به‌هم ریخته و ناخوانا است. مشکل از چیست؟ \end{question}
+\answer همان‌گونه که قبلاً اشاره شد فایل \lr{bib} بایستی با رمزینه‌ی \lr{UTF-8} ذخیره شده باشد. به جای ایجاد فایل \lr{bib} جدید برای خود،
+فایل \lr{MyReferences.bib} را که با رمزینه‌ی \lr{UTF-8} ذخیره شده است را تغییر داده در صورت نیاز با نامی دیگر ذخیره نمایید.
+
+\begin{question} عبارت \lr{OPT} که در \lr{TeXMaker} در ابتدای نام برخی از فیلدها گذاشته می‌شود چیست؟ \end{question}
+\answer این عبارت به منزله‌ٔ اختیاری بودن آن فیلد است. اگر از آن فیلد استفاده می‌کنید باید \lr{OPT} را حذف کنید.
+
+\begin{question} چرا در هنگام استفاده از دستورات \lr{\SLASH Persian} و \lr{\SLASH Latin} با خطا مواجه می‌شوم؟ \end{question}
+\answer این دستورات منسوخ شده و در نسخه‌‌ی فعلی زی‌پرشین پشتیبانی نمی‌شوند. محیط پیش فرض مراجع، فارسی است و برای درج مراجع لاتین باید آنرا داخل محیط \lr{LTRbibitems} قرار دهید.
+
+\begin{question} اگر خواسته باشیم شماره مراجع لاتین در بخش مراجع، فارسی باشد چکار کنیم؟ \end{question}
+\answer برای این منظور کافیست دستور \lr{\SLASH resetlatinfont} را به پس از \lr{\SLASH bibitem} منتقل کنید.
+ استیلهای فارسی فعلی به نحوی آماده شده‌اند که شماره مراجع لاتین به انگلیسی و شماره مراجع فارسی به فارسی ظاهر می‌شود و اگر خواسته باشید این کار را انجام دهید باید تغییر فوق‌الذکر را به صورت دستی در فایل \lr{bbl} خود اعمال نمایید (که البته با اجرای \lr{bibtex} بعدی از بین خواهند رفت).
+\begin{question} اگر خواسته باشیم شماره مراجع لاتین در داخل متن، انگلیسی باشد چکار کنیم؟ \end{question}
+\answer به جای دستور \lr{\SLASH cite} از دستور \lr{\SLASH Latincite} استفاده کنید.
+
+\begin{question} اگر هنگامی‌که به چندین مرجع پشت سر هم ارجاع می‌دهیم خواسته باشیم به صورت خودکار شماره مراجع اولی و آخری با یک خط تیره از هم جدا شوند چه کنیم؟
+(به عبارت دیگر مایلیم [۲و۳و۴و۵و۶] به صورت [۲-۶] نمایش داده شود).
+ \end{question}
+\answer اگر از بسته‌ی \lr{natbib} استفاده می‌کنید، آنرا به همراه گزینه‌ی \lr{sort\&compress} بکار ببرید. درغیر این‌صورت از بسته‌ی \lr{cite} استفاده کنید.
+
+\begin{question} آیا ابزاری برای مدیریت مراجع وجود دارد که از قالب نوشتن مراجع در \lr{Bib\TeX} پشتیبانی کند؟ \end{question}
+\answer بله، بسیاری از نرم‌افزارهای مدیریت مراجع قادر به \lr{import} و \lr{export} کردن مراجع به فرم مورد نیاز \lr{Bib\TeX} هستند. یک نمونه نرم‌افزار مجانی مدیریت مراجع \lr{Mendeley\LTRfootnote{\url{http://www.Mendeley.com}}} است که امکانات بسیار خوبی برای مدیریت مراجع دارد.
+
+\begin{question} وقتی از یکی از چهار استیل \lr{usrt-fa}،\lr{plain-fa}، \lr{acm-fa} و یا \lr{ieeetr-fa} را با همین سند بکار می‌برم خطا دریافت می‌کنم. علت چیست؟
+ \end{question}
+\answer استیل استفاده شده در این فایل راهنما، \lr{asa-fa} است که نیاز به بسته‌ی \lr{natbib} دارد، درحالیکه برای استفاده از چهار استیل مذکور نباید این بسته را فراخوانی نمود.
+
+\begin{question} چگونه می‌توانم هنگامی‌که از بسته‌ی \lr{natbib} استفاده می‌کنم مراجع را نیز شماره‌گذاری نمایم؟
+ \end{question}
+\answer بسته‌ی \lr{natbib} را با گزینه‌ی \lr{numbers} فراخوانی نمایید.
+
+
+
+\begin{question}اگر سند من فارسی و مراجع من انگلیسی باشد و قصد از استیلهای انگلیسی استفاده داشته باشم چگونه عمل کنم؟
+ \end{question}
+\answer
+\begin{LTR}
+\begin{verbatim}
+ \setLTRbibitems
+ \makeatletter
+ \bidi@AtBeginEnvironment{thebibliography}{\latinfont}
+ \makeatother
+ \bibliographystyle{STYLE_FILE_NAME} % such as plain
+ \bibliography{BIB_FILE_NAME} %such as MyReferences
+\end{verbatim}
+\end{LTR}
+
+\begin{question} آخرین نسخه‌های استیلهای فارسی را از کجا تهیه کنیم؟
+ \end{question}
+\answer آخرین نسخه‌ی پایدار استیلهای فارسی با دانلود بسته‌ی \lr{Persian-bib} از آدرس:\\
+\lr{\url{http://mirror.ctan.org/biblio/bibtex/contrib/persian-bib.zip}\hfill}\\
+ قابل استفاده است. آخرین نسخه‌ی در دست توسعه‌ی این استیلها نیز از سایت زیر قابل برداشت است:\\ \lr{\url{https://bitbucket.org/mamintoosi/persian-bib/}\hfill}
+
+\section*{قدردانی}
+در اینجا لازم است از آقای \textcolor{blue}{وفا خلیقی} به خاطر زحمات بسیار ایشان در تولید بستهٔ \XePersian، نگهداری از بستهٔ \lr{bidi} و پاسخگویی به سؤالات بسیار کاربران و آقایان دکتر مهدی امیدعلی و مصطفی واحدی که با تلاشهای خود روحی تازه در کالبد لاتک فارسی دمیدند تشکر نمایم. همچنین از سایر دوستانمان مخصوصاً آقایان وحید دامن‌افشان، فرشاد ترابی، هادی صفی‌اقدم، سیداحمد موسوی، ابوالفضل دیانت، امیرمسعود پورموسی و سیدرضی علوی‌زاده، که زحمات زیادی در سایت پارسی‌لاتک و در جهت توسعه‌ی زی‌پرشین کشیدند قدردانی می‌نمایم. از جناب عینیان نیز برای نکته مربوط به زیرنویس نام لاتین نویسندگان سپاس‌گزاری می‌کنم.
+
+\bibliographystyle{asa-fa}%{chicago-fa}%{plainnat-fa}%
+\bibliography{MyReferences}
+
+\end{document} \ No newline at end of file
diff --git a/biblio/bibtex/contrib/persian-bib/README b/biblio/bibtex/contrib/persian-bib/README
new file mode 100644
index 0000000000..3c581fca81
--- /dev/null
+++ b/biblio/bibtex/contrib/persian-bib/README
@@ -0,0 +1,58 @@
+Persian-bib, V0.9 2015/05/09
+Persian translations of some BibTeX styles
+Author: Mahmood Amintoosi, http://profs.hsu.ac.ir/mamintoosi
+Copyright 20092016
+It may be distributed and/or modified under the LaTeX Project Public License,
+version 1.3c or higher (your choice). The latest version of
+this license is at: http://www.latex-project.org/lppl.txt
+
+This work is author-maintained (as per LPPL maintenance status)
+by Mahmood Amintoosi
+------------------------------------------------------------------------------
+
+These files are Persian translations of some of the classical BibTeX style files.
+Unlike bib-fr package which can be used only for French references, the Persian
+.bst files simultaneously handle both Latin and Persian references.
+
+File 'cp1256fa.csf' is prepared for correct sorting of Persian references and
+three fields named 'LANGUAGE', 'TRANSLATOR' and 'AUTHORFA' are defined. This
+file has a bit modification with respect to its previous version (0.6) according
+to PersianAcademy: http://www.persianacademy.ir
+
+Setting 'LNAGUAGE' to 'Persian' makes the reference direction Left-to-Right and
+makes BibTeX to use Persian translations of keywords such as 'et al.'.
+Also some other modifications has been done. for example in Persian references,
+instead of Latin references, the book edition appears before the edition number.
+If this field is omitted or contains a word other than 'Persian', the reference
+considered as Left-to-Right reference.
+
+'TRANSLATOR' field is used when a reference is translated by someone.
+His or her name appears in the reference in the proper location.
+
+'AUTHORFA' is used with Asa-fa.bst, chicago-fa.bst and plainnat-fa.bst.
+The user should mention the Persian equivalent of the author(s) name(S),
+for proper referencing in the text. If this field is omitted, the original
+author name, in 'AUTHOR' will be used.
+
+Currently 7 files unsrt-fa.bst, acm-fa.bst, ieeetr-fa.bst, plain-fa.bst,
+Asa-fa.bst, chicago-fa.bst and plainnat-fa.bst are modified for Persian
+documents prepared with XePersian (a Persian typesetting package over XeTeX).
+Hence this package is dependent to XePersian Package.
+
+Current Persian bst files work fine with hyperref and natbib packages.
+
+Persian translations of key-words such as 'et al.' can be changed with other
+translations.
+If you modify anything, however, please change the name of the file.
+
+Change Log:
+Version 0.8 : two other styles 'plain-fa-inLTR' and 'plain-fa-inLTR-beamer'
+are added to the package. These styles are prepared for inserting Persian
+references in LTR documents which are dependent to bidi package.
+
+Version 0.9: Debug plain*.bst styles: change "ed. " -> "edition",
+"vol" -> "volume" or "Volume, "p."->"page", "pp."->"pages" and some others.
+
+Mahmood Amintoosi <m.amintoosi@gmail.com>
+http://profs.hsu.ac.ir/mamintoosi
+http://www.parsilatex.com/ \ No newline at end of file
diff --git a/biblio/bibtex/contrib/persian-bib/acm-fa.bst b/biblio/bibtex/contrib/persian-bib/acm-fa.bst
new file mode 100644
index 0000000000..6b6a799d46
--- /dev/null
+++ b/biblio/bibtex/contrib/persian-bib/acm-fa.bst
@@ -0,0 +1,1435 @@
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% Bib. style "acm-fa", Persian (farsi) version of acm.bst
+%%
+%% by: Mahmood Amintoosi and Mostafa Vahedi, m.amintoosi@gmail.com
+%% For XePersian, a Persian Typesetting Package in XeTeX
+%% It may be distributed and/or modified under the
+%% conditions of the LaTeX Project Public License (version 1.3c),
+%% either this version of this license or (at your option) any later version.
+%%
+%%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%%
+%% Original Copyright of acm.bst
+
+
+ENTRY
+ { address
+ author
+ booktitle
+ chapter
+ edition
+ editor
+ howpublished
+ institution
+ journal
+ key
+ language
+ month
+ note
+ number
+ organization
+ pages
+ publisher
+ school
+ series
+ title
+ translator
+ type
+ volume
+ year
+ }
+ {}
+ { label }
+
+INTEGERS { output.state before.all mid.sentence after.sentence after.block }
+FUNCTION {is.print.banners.to.terminal} { #1 }
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% FILE VERSION AND BANNER %%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+FUNCTION{bst.file.version} { "0.9" }
+FUNCTION{bst.file.date} { "2015/05/09" }
+FUNCTION{bst.file.website} { "http://www.parsilatex.com" }
+FUNCTION{bst.file.authors} {"M.Amintoosi and M.Vahedi" }
+
+FUNCTION {banner.message}
+{ is.print.banners.to.terminal
+ { "-- acm-fa.bst version" " " * bst.file.version *
+ " (" * bst.file.date * ") " * %"by " * bst.file.authors *
+ top$
+ "-- This is a BibTeX style for XePersian: " bst.file.website *
+ %top$
+ %"-- See the " quote$ * "Persian-bib-userguide.pdf" * quote$ * " manual for usage information." *
+ top$
+ }
+ { skip$ }
+ if$
+}
+
+FUNCTION {completed.message}
+{ is.print.banners.to.terminal
+ { ""
+ top$
+ "Done."
+ top$
+ }
+ { skip$ }
+ if$
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% Persian Functions %%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+
+FUNCTION {fa.isPersianLanguage}
+{
+ language missing$
+ {#0}
+ {language "l" change.case$ "persian" =}
+ if$
+}
+
+ % Here are the language-specific definitions for explicit words.
+ % Each function has a name bbl.xxx where xxx is the English word.
+ % The languages selected here is ENGLISH and Farsi
+FUNCTION {bbl.and}
+{
+ fa.isPersianLanguage
+ {" و "}
+ {" and "}
+ if$
+}
+
+FUNCTION {bbl.editors}
+{
+fa.isPersianLanguage
+ { " ویراستاران "}
+ {" eds. "}
+if$
+}
+
+FUNCTION {bbl.editor}
+{
+fa.isPersianLanguage
+ { " ویراستار "}
+ {" ed. " }
+if$
+}
+
+FUNCTION {bbl.edby}
+{
+fa.isPersianLanguage
+ { " ویراسته‌ی "}
+ { " edited by " }
+if$
+}
+
+FUNCTION {bbl.edition}
+{
+fa.isPersianLanguage
+ {" ویرایش "}
+ {" ed. " }
+if$
+}
+
+FUNCTION {bbl.volume}
+{
+fa.isPersianLanguage
+ {" جلد "}
+ { " vol."}
+if$
+}
+
+FUNCTION {bbl.of}
+{
+fa.isPersianLanguage
+ { " از "}
+ { " of " }
+if$
+}
+
+FUNCTION {bbl.number}
+{
+fa.isPersianLanguage
+ {" شماره " }
+ { " no." }
+if$
+}
+
+FUNCTION {bbl.nr}
+{
+fa.isPersianLanguage
+ {" شماره "}
+ { " no." }
+if$
+}
+
+FUNCTION {bbl.in}
+{
+fa.isPersianLanguage
+ {" در "}
+ { " in " }
+if$
+}
+
+FUNCTION {bbl.pages}
+{
+fa.isPersianLanguage
+ {" صفحات "}
+ { " pp." }
+if$
+}
+
+FUNCTION {bbl.page}
+{
+fa.isPersianLanguage
+ {" ص." }
+ { " p." }
+if$
+}
+
+FUNCTION {bbl.chapter}
+{
+fa.isPersianLanguage
+ { " فصل " }
+ {" chap." }
+if$
+}
+
+FUNCTION {bbl.techrep}
+{
+fa.isPersianLanguage
+ { " گزارش طرح تحقیقی"}
+ { " Tech. Rep." }
+if$
+}
+
+FUNCTION {bbl.mthesis}
+{
+fa.isPersianLanguage
+ {" پایان‌نامه کارشناسی‌ارشد"}
+ { " Master's thesis" }
+if$
+}
+
+FUNCTION {bbl.phdthesis}
+{
+fa.isPersianLanguage
+ {" پایان‌نامه دکترا" }
+ { " Ph.D. thesis" }
+if$
+}
+
+FUNCTION {bbl.etal}
+{
+ fa.isPersianLanguage
+ {" و دیگران"}
+ {" et~al."}
+ if$
+}
+
+FUNCTION {bbl.translator}
+{
+ fa.isPersianLanguage
+ {"ترجمه‌ی "}
+ {"Translator "}
+ if$
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% End of Persian Functions %%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+FUNCTION {init.state.consts}
+{ #0 'before.all :=
+ #1 'mid.sentence :=
+ #2 'after.sentence :=
+ #3 'after.block :=
+}
+
+STRINGS { s t }
+
+FUNCTION {output.nonnull}
+{ 's :=
+ output.state mid.sentence =
+ { ", " * write$ }
+ { output.state after.block =
+{ add.period$ write$
+ newline$
+ "\newblock " write$
+}
+{ output.state before.all =
+ 'write$
+ { add.period$ " " * write$ }
+ if$
+}
+ if$
+ mid.sentence 'output.state :=
+ }
+ if$
+ s
+}
+
+FUNCTION {output}
+{ duplicate$ empty$
+ 'pop$
+ 'output.nonnull
+ if$
+}
+
+FUNCTION {output.check}
+{ 't :=
+ duplicate$ empty$
+ { pop$ "empty " t * " in " * cite$ * warning$ }
+ 'output.nonnull
+ if$
+}
+
+FUNCTION {output.bibitem}
+{
+ newline$
+ fa.isPersianLanguage
+ { skip$ }
+ {
+ "\begin{LTRbibitems}" write$
+ newline$
+ "\resetlatinfont " write$
+ }
+ if$
+ newline$
+ "\bibitem{" write$
+ cite$ write$
+ "}" write$
+ newline$
+ ""
+ before.all 'output.state :=
+}
+
+FUNCTION {fin.entry}
+{ add.period$
+ write$
+ newline$
+ fa.isPersianLanguage
+ {skip$}
+ { newline$
+ "\end{LTRbibitems}" write$
+ newline$
+ }
+ if$
+}
+
+FUNCTION {new.block}
+{ output.state before.all =
+ 'skip$
+ { after.block 'output.state := }
+ if$
+}
+
+FUNCTION {new.sentence}
+{ output.state after.block =
+ 'skip$
+ { output.state before.all =
+'skip$
+{ after.sentence 'output.state := }
+ if$
+ }
+ if$
+}
+
+FUNCTION {not}
+{ { #0 }
+ { #1 }
+ if$
+}
+
+FUNCTION {and}
+{ 'skip$
+ { pop$ #0 }
+ if$
+}
+
+FUNCTION {or}
+{ { pop$ #1 }
+ 'skip$
+ if$
+}
+
+FUNCTION {new.block.checka}
+{ empty$
+ 'skip$
+ 'new.block
+ if$
+}
+
+FUNCTION {new.block.checkb}
+{ empty$
+ swap$ empty$
+ and
+ 'skip$
+ 'new.block
+ if$
+}
+
+FUNCTION {new.sentence.checka}
+{ empty$
+ 'skip$
+ 'new.sentence
+ if$
+}
+
+FUNCTION {new.sentence.checkb}
+{ empty$
+ swap$ empty$
+ and
+ 'skip$
+ 'new.sentence
+ if$
+}
+
+FUNCTION {field.or.null}
+{ duplicate$ empty$
+ { pop$ "" }
+ 'skip$
+ if$
+}
+
+FUNCTION {emphasize}
+{ duplicate$ empty$
+ { pop$ "" }
+ { "{\em " swap$ * "}" * }
+ if$
+}
+
+FUNCTION {emphasizeic}
+{ duplicate$ empty$
+ { pop$ "" }
+ { "{\em " swap$ * "\/}" * }
+ if$
+}
+
+FUNCTION {scapify}
+{ duplicate$ empty$
+ { pop$ "" }
+ { "\textsc{ " swap$ * "}" * }
+ if$
+}
+
+INTEGERS { nameptr namesleft numnames }
+
+FUNCTION {format.names}
+{ 's :=
+ #1 'nameptr :=
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ {fa.isPersianLanguage
+ { s nameptr "{vv~}{ll}{, jj}{, ff}" format.name$ 't :=}
+ { s nameptr "{vv~}{ll}{, jj}{, f.}" format.name$ 't :=}
+ if$
+ nameptr #1 >
+{ namesleft #1 >
+ { ", " * t * }
+ { t "others" =
+{ "," bbl.etal * * }
+{ "," bbl.and * * t * }
+ if$
+ }
+ if$
+}
+'t
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+}
+
+FUNCTION {format.innames}
+{ 's :=
+ #1 'nameptr :=
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ {fa.isPersianLanguage
+ {s nameptr "{ff}{vv~}{ll}{, jj}" format.name$ 't :=}
+ {s nameptr "{f.~}{vv~}{ll}{, jj}" format.name$ 't :=}
+ if$
+ nameptr #1 >
+{ namesleft #1 >
+ { ", " * t * }
+ { numnames #2 >
+{ "," * }
+'skip$
+ if$
+ t "others" =
+{ bbl.etal * }
+{ bbl.and * t * }
+ if$
+ }
+ if$
+}
+'t
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+}
+
+FUNCTION {format.authors}
+{ author empty$
+ { "" }
+ { author format.names scapify}
+ if$
+}
+
+FUNCTION {format.editors}
+{ editor empty$
+ { "" }
+ { fa.isPersianLanguage
+ {
+editor num.names$ #1 >
+{bbl.editors editor format.names * }
+{bbl.editor editor format.names * }
+if$
+}
+{
+ editor format.names scapify
+editor num.names$ #1 >
+{ ", " bbl.editors * *}
+{ ", " bbl.editor * *}
+if$
+}
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.ineditors}
+{ editor empty$
+ { "" }
+ { editor format.innames
+ editor num.names$ #1 >
+{ ", " * bbl.editors *}
+{ ", " * bbl.editor *}
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.translators}
+{ translator empty$
+ { "" }
+ { fa.isPersianLanguage
+ {
+bbl.translator translator format.names *
+}
+{
+ translator format.names
+", " bbl.translator * *
+}
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.title}
+{ title empty$
+ { "" }
+ { title "t" change.case$ }
+ if$
+}
+
+FUNCTION {n.dashify}
+{ 't :=
+ ""
+ { t empty$ not }
+ { t #1 #1 substring$ "-" =
+{ t #1 #2 substring$ "--" = not
+ { "--" *
+ t #2 global.max$ substring$ 't :=
+ }
+ { { t #1 #1 substring$ "-" = }
+{ "-" *
+ t #2 global.max$ substring$ 't :=
+}
+ while$
+ }
+ if$
+}
+{ t #1 #1 substring$ *
+ t #2 global.max$ substring$ 't :=
+}
+ if$
+ }
+ while$
+}
+
+FUNCTION {format.date}
+{ year empty$
+ { month empty$
+{ "" }
+{ "there's a month but no year in " cite$ * warning$
+ month
+}
+ if$
+ }
+ { month empty$
+'year
+{ month " " * year * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.btitle}
+{ title emphasize
+}
+
+FUNCTION {tie.or.space.connect}
+{ duplicate$ text.length$ #3 <
+ { "~" }
+ { " " }
+ if$
+ swap$ * *
+}
+
+FUNCTION {either.or.check}
+{ empty$
+ 'pop$
+ { "can't use both " swap$ * " fields in " * cite$ * warning$ }
+ if$
+}
+
+FUNCTION {format.bvolume}
+{ volume empty$
+ { "" }
+ { "volume" volume tie.or.space.connect
+ series empty$
+'skip$
+{ " of " * series emphasize * }
+ if$
+ "volume and number" number either.or.check
+ }
+ if$
+}
+
+FUNCTION {format.number.series}
+{ volume empty$
+ { number empty$
+{ series field.or.null }
+{ output.state mid.sentence =
+ { bbl.number }
+ { bbl.number "t" change.case$ }
+ if$
+ number tie.or.space.connect
+ series empty$
+ { "there's a number but no series in " cite$ * warning$ }
+ { bbl.in * series * }
+ if$
+}
+ if$
+ }
+ { "" }
+ if$
+}
+
+FUNCTION {format.edition}
+{ edition empty$
+ { "" }
+ { fa.isPersianLanguage
+ {
+ bbl.edition edition *
+}
+{
+ output.state mid.sentence =
+ { edition "l" change.case$ bbl.edition * }
+ { edition "t" change.case$ bbl.edition * }
+ if$
+}
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.pages}
+{ pages empty$
+ { "" }
+ { pages n.dashify }
+ if$
+}
+
+INTEGERS { multiresult }
+
+FUNCTION {multi.page.check}
+{ 't :=
+ #0 'multiresult :=
+ { multiresult not
+ t empty$ not
+ and
+ }
+ { t #1 #1 substring$
+ duplicate$ "-" =
+ swap$ duplicate$ "," =
+ swap$ "+" =
+ or or
+{ #1 'multiresult := }
+{ t #2 global.max$ substring$ 't := }
+ if$
+ }
+ while$
+ multiresult
+}
+
+FUNCTION {format.pp.pages}
+{ pages empty$
+ { "" }
+ { pages multi.page.check
+ { bbl.pages pages n.dashify tie.or.space.connect }
+ { bbl.page pages tie.or.space.connect }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.journal.vol.num.date}
+{ journal empty$
+ { "empty journal in " cite$ * warning$
+ ""
+ }
+ { journal
+ volume empty$
+'skip$
+{ " " * volume * }
+ if$
+ number empty$
+'emphasizeic
+{ emphasize ", " * number * }
+ if$
+ year empty$
+{ "empty year in " cite$ * warning$ }
+{ " (" * format.date * ")" * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.chapter.pages}
+{ chapter empty$
+ 'format.pp.pages
+ { type empty$
+{ bbl.chapter }
+{ type "l" change.case$ }
+ if$
+ chapter tie.or.space.connect
+ pages empty$
+'skip$
+{ ", " * format.pp.pages * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.in.ed.booktitle}
+{
+ booktitle empty$
+ { "" }
+ {bbl.in booktitle emphasize *
+ editor empty$
+'skip$
+{ ", " * format.ineditors * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.proc.date}
+{ duplicate$ empty$
+ { pop$ "" }
+ { year empty$
+{ "empty year in " cite$ * warning$
+ address empty$
+ 'emphasize
+ { emphasizeic
+ " (" * address * ")" *
+ }
+ if$
+}
+{ emphasizeic
+ " (" *
+ address empty$
+ 'skip$
+ { address * ", " * }
+ if$
+ format.date *
+ ")" *
+}
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.in.proc.date}
+{ booktitle empty$
+ { "" }
+ { bbl.in booktitle format.proc.date * }
+ if$
+}
+FUNCTION {empty.misc.check}
+{ author empty$ title empty$ howpublished empty$
+ month empty$ year empty$ note empty$
+ and and and and and
+ key empty$ not and
+ { "all relevant fields are empty in " cite$ * warning$ }
+ 'skip$
+ if$
+}
+
+FUNCTION {format.thesis.type}
+{ type empty$
+ 'skip$
+ { pop$
+ type "t" change.case$
+ }
+ if$
+}
+
+FUNCTION {format.tr.number}
+{ type empty$
+ { bbl.techrep }
+ 'type
+ if$
+ number empty$
+ { "t" change.case$ }
+ { number tie.or.space.connect }
+ if$
+}
+
+FUNCTION {format.article.crossref}
+{ key empty$
+ { journal empty$
+{ "need key or journal for " cite$ * " to crossref " * crossref *
+ warning$
+ ""
+}
+{ bbl.in "{\em " * journal * "\/}" * }
+ if$
+ }
+ { bbl.in key * }
+ if$
+ " \cite{" * crossref * "}" *
+}
+
+FUNCTION {format.crossref.editor}
+{ editor #1 "{vv~}{ll}" format.name$
+ editor num.names$ duplicate$ #2 >
+ { pop$ bbl.etal * }
+ { #2 < 'skip$
+ { editor #2 "{ff }{vv }{ll}{ jj}" format.name$ "others" =
+ { bbl.etal * }
+ { bbl.and * editor #2 "{vv~}{ll}" format.name$ * }
+ if$
+ }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.book.crossref}
+{ volume empty$
+ { "empty volume in " cite$ * "'s crossref of " * crossref * warning$
+ bbl.in
+ }
+ { bbl.volume volume tie.or.space.connect
+ bbl.of *
+ }
+ if$
+ editor empty$
+ editor field.or.null author field.or.null =
+ or
+ { key empty$
+{ series empty$
+ { "need editor, key, or series for " cite$ * " to crossref " *
+ crossref * warning$
+ "" *
+ }
+ { "{\em " * series * "\/}" * }
+ if$
+}
+{ key * }
+ if$
+ }
+ { format.crossref.editor * }
+ if$
+ " \cite{" * crossref * "}" *
+}
+
+FUNCTION {format.incoll.inproc.crossref}
+{ editor empty$
+ editor field.or.null author field.or.null =
+ or
+ { key empty$
+{ booktitle empty$
+ { "need editor, key, or booktitle for " cite$ * " to crossref " *
+ crossref * warning$
+ ""
+ }
+ { bbl.in " {\em " * booktitle * "\/}" * }
+ if$
+}
+{ bbl.in key * }
+ if$
+ }
+ { bbl.in format.crossref.editor * }
+ if$
+ " \cite{" * crossref * "}" *
+}
+
+FUNCTION {article}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.title "title" output.check
+ new.block
+ crossref missing$
+ { format.journal.vol.num.date output
+ format.pages output
+ }
+ { format.article.crossref output.nonnull
+ format.pp.pages output
+ }
+ if$
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {book}
+{ output.bibitem
+ fa.isPersianLanguage
+ {
+ format.authors output
+ new.block
+ format.btitle "title" output.check
+ format.edition output
+ new.block
+ format.translators output
+ format.editors output
+ }
+ { author empty$
+ { format.editors "author and editor" output.check }
+ { format.authors output.nonnull
+ crossref missing$
+ { "author and editor" editor either.or.check }
+ 'skip$
+ if$
+ }
+ if$
+ new.block
+ format.btitle "title" output.check
+ format.edition output
+ }
+ if$
+ crossref missing$
+ { format.bvolume output
+ new.block
+ format.number.series output
+ new.sentence
+ publisher "publisher" output.check
+ address output
+ }
+ { new.block
+ format.book.crossref output.nonnull
+ }
+ if$
+ format.date "year" output.check
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {booklet}
+{ output.bibitem
+ format.authors output
+ new.block
+ format.title "title" output.check
+ howpublished address new.block.checkb
+ howpublished output
+ address output
+ format.date output
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {inbook}
+{ output.bibitem
+ author empty$
+ { format.editors "author and editor" output.check }
+ { format.authors output.nonnull
+ crossref missing$
+{ "author and editor" editor either.or.check }
+'skip$
+ if$
+ }
+ if$
+ new.block
+ format.btitle "title" output.check
+ format.edition output
+ crossref missing$
+ { format.bvolume output
+ new.block
+ format.number.series output
+ new.sentence
+ publisher "publisher" output.check
+ address output
+ }
+ {
+ new.block
+ format.book.crossref output.nonnull
+ }
+ if$
+ format.date "year" output.check
+ format.chapter.pages "chapter and pages" output.check
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {incollection}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.title "title" output.check
+ new.block
+ crossref missing$
+ { format.in.ed.booktitle "booktitle" output.check
+ format.edition output
+ format.bvolume output
+ format.number.series output
+ new.sentence
+ publisher "publisher" output.check
+ address output
+ format.date "year" output.check
+ }
+ { format.incoll.inproc.crossref output.nonnull
+ }
+ if$
+ format.chapter.pages output
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {inproceedings}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.title "title" output.check
+ new.block
+ crossref missing$
+ { format.in.proc.date "booktitle" output.check
+ format.ineditors output
+ format.bvolume output
+ format.number.series output
+ organization output
+ publisher output
+}
+ { format.incoll.inproc.crossref output.nonnull }
+ if$
+ format.pp.pages output
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {conference} { inproceedings }
+
+FUNCTION {manual}
+{ output.bibitem
+ author empty$
+ { organization scapify output }
+ { format.authors output.nonnull }
+ if$
+ new.block
+ format.btitle "title" output.check
+ format.edition output
+ author empty$
+{ address new.block.checka }
+ { organization address new.block.checkb
+ organization output
+ }
+ if$
+ address output
+ format.date output
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {mastersthesis}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.title "title" output.check
+ new.block
+ bbl.mthesis
+ format.thesis.type output.nonnull
+ school "school" output.check
+ address output
+ format.date "year" output.check
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {misc}
+{ output.bibitem
+ format.authors output
+ title howpublished new.block.checkb
+ format.title output
+ howpublished new.block.checka
+ howpublished output
+ format.date output
+ new.block
+ note output
+ fin.entry
+ empty.misc.check
+}
+
+FUNCTION {phdthesis}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.btitle "title" output.check
+ new.block
+ bbl.phdthesis
+ format.thesis.type output.nonnull
+ school "school" output.check
+ address output
+ format.date "year" output.check
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {proceedings}
+{ output.bibitem
+ editor empty$
+ { organization scapify output }
+ { format.editors output.nonnull }
+ if$
+ new.block
+ title format.proc.date "title" output.check
+ format.bvolume output
+ format.number.series output
+ editor empty$
+'skip$
+{ organization output }
+ if$
+ publisher output
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {techreport}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.title "title" output.check
+ new.block
+ format.tr.number output.nonnull
+ institution "institution" output.check
+ address output
+ format.date "year" output.check
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {unpublished}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.title "title" output.check
+ new.block
+ note "note" output.check
+ format.date output
+ fin.entry
+}
+
+FUNCTION {default.type} { misc }
+
+MACRO {jan} {"Jan."}
+
+MACRO {feb} {"Feb."}
+
+MACRO {mar} {"Mar."}
+
+MACRO {apr} {"Apr."}
+
+MACRO {may} {"May"}
+
+MACRO {jun} {"June"}
+
+MACRO {jul} {"July"}
+
+MACRO {aug} {"Aug."}
+
+MACRO {sep} {"Sept."}
+
+MACRO {oct} {"Oct."}
+
+MACRO {nov} {"Nov."}
+
+MACRO {dec} {"Dec."}
+
+MACRO {acmcs} {"ACM Comput. Surv."}
+
+MACRO {acta} {"Acta Inf."}
+
+MACRO {cacm} {"Commun. ACM"}
+
+MACRO {ibmjrd} {"IBM J. Res. Dev."}
+
+MACRO {ibmsj} {"IBM Syst.~J."}
+
+MACRO {ieeese} {"IEEE Trans. Softw. Eng."}
+
+MACRO {ieeetc} {"IEEE Trans. Comput."}
+
+MACRO {ieeetcad}
+ {"IEEE Trans. Comput.-Aided Design Integrated Circuits"}
+
+MACRO {ipl} {"Inf. Process. Lett."}
+
+MACRO {jacm} {"J.~ACM"}
+
+MACRO {jcss} {"J.~Comput. Syst. Sci."}
+
+MACRO {scp} {"Sci. Comput. Programming"}
+
+MACRO {sicomp} {"SIAM J. Comput."}
+
+MACRO {tocs} {"ACM Trans. Comput. Syst."}
+
+MACRO {tods} {"ACM Trans. Database Syst."}
+
+MACRO {tog} {"ACM Trans. Gr."}
+
+MACRO {toms} {"ACM Trans. Math. Softw."}
+
+MACRO {toois} {"ACM Trans. Office Inf. Syst."}
+
+MACRO {toplas} {"ACM Trans. Program. Lang. Syst."}
+
+MACRO {tcs} {"Theoretical Comput. Sci."}
+
+READ
+
+FUNCTION {sortify}
+{
+ fa.isPersianLanguage
+ { "l" change.case$}
+ {purify$ "l" change.case$}
+ if$
+ %duplicate$ write$
+}
+
+INTEGERS { len }
+
+FUNCTION {chop.word}
+{ 's :=
+ 'len :=
+ s #1 len substring$ =
+ { s len #1 + global.max$ substring$ }
+ 's
+ if$
+}
+
+FUNCTION {sort.format.names}
+{ 's :=
+ #1 'nameptr :=
+ ""
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ { nameptr #1 >
+ { " " * }
+ 'skip$
+ if$
+ s nameptr "{vv{ } }{ll{ }}{ ff{ }}{ jj{ }}" format.name$ 't :=
+ nameptr numnames = t "others" = and
+ { bbl.etal * }
+ { t sortify * }
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+}
+
+FUNCTION {sort.format.title}
+{ 't :=
+ "A " #2
+ "An " #3
+ "The " #4 t chop.word
+ chop.word
+ chop.word
+ sortify
+ #1 global.max$ substring$
+}
+
+FUNCTION {author.sort}
+{ author empty$
+ { key empty$
+ { "to sort, need author or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { author sort.format.names }
+ if$
+}
+
+FUNCTION {author.editor.sort}
+{ author empty$
+ { editor empty$
+{ key empty$
+ { "to sort, need author, editor, or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+}
+{ editor sort.format.names }
+ if$
+ }
+ { author sort.format.names }
+ if$
+}
+
+FUNCTION {author.organization.sort}
+{ author empty$
+ { organization empty$
+{ key empty$
+ { "to sort, need author, organization, or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+}
+{ "The " #4 organization chop.word sortify }
+ if$
+ }
+ { author sort.format.names }
+ if$
+}
+
+FUNCTION {editor.organization.sort}
+{ editor empty$
+ { organization empty$
+{ key empty$
+ { "to sort, need editor, organization, or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+}
+{ "The " #4 organization chop.word sortify }
+ if$
+ }
+ { editor sort.format.names }
+ if$
+}
+
+FUNCTION {presort}
+{ type$ "book" =
+ type$ "inbook" =
+ or
+ 'author.editor.sort
+ { type$ "proceedings" =
+'editor.organization.sort
+{ type$ "manual" =
+ 'author.organization.sort
+ 'author.sort
+ if$
+}
+ if$
+ }
+ if$
+ " "
+ *
+ year field.or.null sortify
+ *
+ " "
+ *
+ title field.or.null
+ sort.format.title
+ *
+ #1 entry.max$ substring$
+ 'sort.key$ :=
+}
+
+ITERATE {presort}
+
+SORT
+
+STRINGS { longest.label }
+
+INTEGERS { number.label longest.label.width }
+
+FUNCTION {initialize.longest.label}
+{ "" 'longest.label :=
+ #1 'number.label :=
+ #0 'longest.label.width :=
+}
+
+FUNCTION {longest.label.pass}
+{ number.label int.to.str$ 'label :=
+ number.label #1 + 'number.label :=
+ label width$ longest.label.width >
+ { label 'longest.label :=
+ label width$ 'longest.label.width :=
+ }
+ 'skip$
+ if$
+}
+
+EXECUTE {banner.message}
+EXECUTE {initialize.longest.label}
+
+ITERATE {longest.label.pass}
+
+FUNCTION {begin.bib}
+{
+ "% Generated by acm-fa.bst, version: " bst.file.version * " (" * bst.file.date * "), for XePersian Package" *
+ write$ newline$
+ "% Authors: " bst.file.authors *
+ write$ newline$
+ "\providecommand{\noopsort}[1]{}"
+ write$ newline$
+ preamble$ empty$
+ 'skip$
+ { preamble$ write$ newline$ }
+ if$
+ "\begin{thebibliography}{" longest.label * "}" * write$ newline$
+}
+
+EXECUTE {begin.bib}
+
+EXECUTE {init.state.consts}
+
+ITERATE {call.type$}
+
+FUNCTION {end.bib}
+{ newline$
+ "\end{thebibliography}" write$ newline$
+}
+
+EXECUTE {end.bib}
+EXECUTE{completed.message}
diff --git a/biblio/bibtex/contrib/persian-bib/asa-fa.bst b/biblio/bibtex/contrib/persian-bib/asa-fa.bst
new file mode 100644
index 0000000000..d52f9be82b
--- /dev/null
+++ b/biblio/bibtex/contrib/persian-bib/asa-fa.bst
@@ -0,0 +1,1774 @@
+%% This is file `asa-fa.bst',
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% Bib. style "asa-fa", Persian (farsi) version of asa.bst
+%%
+%% by: Mahmood Amintoosi, m.amintoosi@gmail.com, www.parsilatex.com
+%% For XePersian, a Persian Typesetting Package in XeTeX
+%% It may be distributed and/or modified under the
+%% conditions of the LaTeX Project Public License (version 1.3c),
+%% either this version of this license or (at your option) any later version.
+%%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+%% Original Copyright
+
+%% ----------------------------------------
+%% *** BibTeX Style for ASA Journals ***
+%% (Brett Presnell, 24 August 1998)
+%%
+ %-------------------------------------------------------------------
+ % The original source file contains the following version information:
+ % \ProvidesFile{merlin.mbs}[1998/02/25 3.85a (PWD)]
+ %
+ % NOTICE:
+ % This file may be used for non-profit purposes.
+ % It may not be distributed in exchange for money,
+ % other than distribution costs.
+ %
+ % The author provides it `as is' and does not guarantee it in any way.
+ %
+ % Copyright (C) 1994-98 Patrick W. Daly
+ %-------------------------------------------------------------------
+ % For use with BibTeX version 0.99a or later
+ %-------------------------------------------------------------------
+ % This bibliography style file is intended for texts in ENGLISH
+ % This is an author-year citation style bibliography. As such, it is
+ % non-standard LaTeX, and requires a special package file to function properly.
+ % Such a package is natbib.sty by Patrick W. Daly
+ % The form of the \bibitem entries is
+ % \bibitem[Jones et al.(1990)]{key}...
+ % \bibitem[Jones et al.(1990)Jones, Baker, and Smith]{key}...
+ % The essential feature is that the label (the part in brackets) consists
+ % of the author names, as they should appear in the citation, with the year
+ % in parentheses following. There must be no space before the opening
+ % parenthesis!
+ % With natbib v5.3, a full list of authors may also follow the year.
+ % In natbib.sty, it is possible to define the type of enclosures that is
+ % really wanted (brackets or parentheses), but in either case, there must
+ % be parentheses in the label.
+ % The \cite command functions as follows:
+ % \citet{key} ==>> Jones et al. (1990)
+ % \citet*{key} ==>> Jones, Baker, and Smith (1990)
+ % \citep{key} ==>> (Jones et al., 1990)
+ % \citep*{key} ==>> (Jones, Baker, and Smith, 1990)
+ % \citep[chap. 2]{key} ==>> (Jones et al., 1990, chap. 2)
+ % \citep[e.g.][]{key} ==>> (e.g. Jones et al., 1990)
+ % \citep[e.g.][p. 32]{key} ==>> (e.g. Jones et al., p. 32)
+ % \citeauthor{key} ==>> Jones et al.
+ % \citeauthor*{key} ==>> Jones, Baker, and Smith
+ % \citeyear{key} ==>> 1990
+ %---------------------------------------------------------------------
+
+ENTRY
+ { address
+ author
+ authorfa
+ booktitle
+ chapter
+ edition
+ editor
+ howpublished
+ institution
+ journal
+ key
+ language
+ month
+ note
+ number
+ organization
+ pages
+ publisher
+ school
+ series
+ title
+ translator
+ type
+ volume
+ year
+ }
+ {}
+ { label extra.label sort.label short.list }
+
+INTEGERS { output.state before.all mid.sentence after.sentence after.block fa.isInLabel}
+% fa.isInLabel is set in format.lab.names
+
+FUNCTION {is.print.banners.to.terminal} { #1 }
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% FILE VERSION AND BANNER %%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+FUNCTION{bst.file.version} { "0.9" }
+FUNCTION{bst.file.date} { "2015/05/09" }
+FUNCTION{bst.file.website} { "http://www.parsilatex.com" }
+FUNCTION{bst.file.authors} {"M.Amintoosi" }
+
+FUNCTION {banner.message}
+{ is.print.banners.to.terminal
+ { "-- asa-fa.bst version" " " * bst.file.version *
+ " (" * bst.file.date * ") " * %"by " * bst.file.authors *
+ top$
+ "-- This is a BibTeX style for XePersian: " bst.file.website *
+ %top$
+ %"-- See the " quote$ * "Persian-bib-userguide.pdf" * quote$ * " manual for usage information." *
+ top$
+ }
+ { skip$ }
+ if$
+}
+
+FUNCTION {completed.message}
+{ is.print.banners.to.terminal
+ { ""
+ top$
+ "Done."
+ top$
+ }
+ { skip$ }
+ if$
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% Persian Functions %%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+
+FUNCTION {fa.isPersianLanguage}
+{
+ language missing$
+ {#0}
+ {language "l" change.case$ "persian" =}
+ if$
+}
+
+ % Here are the language-specific definitions for explicit words.
+ % Each function has a name bbl.xxx where xxx is the English word.
+ % The languages selected here is ENGLISH and Farsi
+FUNCTION {bbl.and}
+{
+fa.isInLabel
+{" و "}% If authorfa exists
+{
+ fa.isPersianLanguage
+ {" و "}
+ {" and "}
+ if$
+}
+if$
+}
+
+FUNCTION {bbl.editors}
+{
+fa.isPersianLanguage
+ { "ویراستاران"}
+ { "eds."}
+if$
+}
+
+FUNCTION {bbl.editor}
+{
+fa.isPersianLanguage
+ { "ویراستار"}
+ { "ed." }
+if$
+}
+
+FUNCTION {bbl.edby}
+{
+fa.isPersianLanguage
+ { " ویراسته‌ی "}
+ { " edited by " }
+if$
+}
+
+FUNCTION {bbl.edition}
+{
+fa.isPersianLanguage
+ {" ویرایش "}
+ {" ed. " }
+if$
+}
+
+FUNCTION {bbl.volume}
+{
+fa.isPersianLanguage
+ {" جلد "}
+ { " vol."}
+if$
+}
+
+FUNCTION {bbl.of}
+{
+fa.isPersianLanguage
+ { " از "}
+ { " of " }
+if$
+}
+
+FUNCTION {bbl.number}
+{
+fa.isPersianLanguage
+ {" شماره " }
+ { " no." }
+if$
+}
+
+FUNCTION {bbl.nr}
+{
+fa.isPersianLanguage
+ {" شماره "}
+ { " no." }
+if$
+}
+
+FUNCTION {bbl.in}
+{
+fa.isPersianLanguage
+ {" در "}
+ { " in " }
+if$
+}
+
+FUNCTION {bbl.pages}
+{
+fa.isPersianLanguage
+ {" صفحات "}
+ { " pp." }
+if$
+}
+
+FUNCTION {bbl.page}
+{
+fa.isPersianLanguage
+ {" ص." }
+ { " p." }
+if$
+}
+
+FUNCTION {bbl.chapter}
+{
+fa.isPersianLanguage
+ { " فصل " }
+ {" chap." }
+if$
+}
+
+FUNCTION {bbl.techrep}
+{
+fa.isPersianLanguage
+ { " گزارش طرح تحقیقی"}
+ { " Tech. Rep." }
+if$
+}
+
+FUNCTION {bbl.mthesis}
+{
+fa.isPersianLanguage
+ {" پایان‌نامه کارشناسی‌ارشد"}
+ { " Master's thesis" }
+if$
+}
+
+FUNCTION {bbl.phdthesis}
+{
+fa.isPersianLanguage
+ {" پایان‌نامه دکترا" }
+ { " Ph.D. thesis" }
+if$
+}
+
+FUNCTION {bbl.first}
+{ "1st" }
+
+FUNCTION {bbl.second}
+{ "2nd" }
+
+FUNCTION {bbl.third}
+{ "3rd" }
+
+FUNCTION {bbl.fourth}
+{ "4th" }
+
+FUNCTION {bbl.fifth}
+{ "5th" }
+
+FUNCTION {bbl.st}
+{ "st" }
+
+FUNCTION {bbl.nd}
+{ "nd" }
+
+FUNCTION {bbl.rd}
+{ "rd" }
+
+FUNCTION {bbl.th}
+{ "th" }
+
+% Added by M.Amintoosi
+FUNCTION {bbl.etal}
+{
+fa.isInLabel
+{" و دیگران"}% If authorfa exists
+{
+ fa.isPersianLanguage
+ {" و دیگران"}
+ {" et~al."}
+ if$
+}
+if$
+}
+
+FUNCTION {bbl.translator}
+{
+fa.isPersianLanguage
+ { " ترجمه‌ی "}
+ {" Translated by "}
+if$
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% End of Persian Functions %%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+
+FUNCTION {init.state.consts}
+{ #0 'before.all :=
+ #1 'mid.sentence :=
+ #2 'after.sentence :=
+ #3 'after.block :=
+}
+
+STRINGS { s t }
+
+FUNCTION {output.nonnull}
+{ 's :=
+ output.state mid.sentence =
+ { ", " * write$ }
+ { output.state after.block =
+ { add.period$ write$
+ newline$
+ "\newblock " write$
+ }
+ { output.state before.all =
+ 'write$
+ { add.period$ " " * write$ }
+ if$
+ }
+ if$
+ mid.sentence 'output.state :=
+ }
+ if$
+ s
+}
+
+FUNCTION {output}
+{ duplicate$ empty$
+ 'pop$
+ 'output.nonnull
+ if$
+}
+
+FUNCTION {output.check}
+{ 't :=
+ duplicate$ empty$
+ { pop$ "empty " t * " in " * cite$ * warning$ }
+ 'output.nonnull
+ if$
+}
+
+FUNCTION {fin.entry}
+{ add.period$
+ write$
+ newline$
+ fa.isPersianLanguage
+ {skip$}
+ { newline$
+ "\end{LTRbibitems}" write$
+ newline$
+ }
+ if$
+}
+
+FUNCTION {new.block}
+{ output.state before.all =
+ 'skip$
+ { after.block 'output.state := }
+ if$
+}
+
+FUNCTION {new.sentence}
+{ output.state after.block =
+ 'skip$
+ { output.state before.all =
+ 'skip$
+ { after.sentence 'output.state := }
+ if$
+ }
+ if$
+}
+
+FUNCTION {add.blank}
+{ " " * before.all 'output.state :=
+}
+
+FUNCTION {date.block}
+{
+ skip$
+}
+
+FUNCTION {not}
+{ { #0 }
+ { #1 }
+ if$
+}
+
+FUNCTION {and}
+{ 'skip$
+ { pop$ #0 }
+ if$
+}
+
+FUNCTION {or}
+{ { pop$ #1 }
+ 'skip$
+ if$
+}
+
+FUNCTION {non.stop}
+{ duplicate$
+ "}" * add.period$
+ #-1 #1 substring$ "." =
+}
+
+FUNCTION {new.block.checkb}
+{ empty$
+ swap$ empty$
+ and
+ 'skip$
+ 'new.block
+ if$
+}
+
+FUNCTION {field.or.null}
+{ duplicate$ empty$
+ { pop$ "" }
+ 'skip$
+ if$
+}
+
+FUNCTION {emphasize}
+{ duplicate$ empty$
+ { pop$ "" }
+ { "\textit{" swap$ * "}" * }
+ if$
+}
+
+FUNCTION {capitalize}
+{ "u" change.case$ "t" change.case$ }
+
+FUNCTION {space.word}
+{ " " swap$ * " " * }
+
+
+MACRO {jan} {"Jan."}
+
+MACRO {feb} {"Feb."}
+
+MACRO {mar} {"Mar."}
+
+MACRO {apr} {"Apr."}
+
+MACRO {may} {"May"}
+
+MACRO {jun} {"Jun."}
+
+MACRO {jul} {"Jul."}
+
+MACRO {aug} {"Aug."}
+
+MACRO {sep} {"Sep."}
+
+MACRO {oct} {"Oct."}
+
+MACRO {nov} {"Nov."}
+
+MACRO {dec} {"Dec."}
+
+FUNCTION {eng.ord}
+{ duplicate$ "1" swap$ *
+ #-2 #1 substring$ "1" =
+ { bbl.th * }
+ { duplicate$ #-1 #1 substring$
+ duplicate$ "1" =
+ { pop$ bbl.st * }
+ { duplicate$ "2" =
+ { pop$ bbl.nd * }
+ { "3" =
+ { bbl.rd * }
+ { bbl.th * }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+}
+
+MACRO {acmcs} {"ACM Computing Surveys"}
+
+MACRO {acta} {"Acta Informatica"}
+
+MACRO {cacm} {"Communications of the ACM"}
+
+MACRO {ibmjrd} {"IBM Journal of Research and Development"}
+
+MACRO {ibmsj} {"IBM Systems Journal"}
+
+MACRO {ieeese} {"IEEE Transactions on Software Engineering"}
+
+MACRO {ieeetc} {"IEEE Transactions on Computers"}
+
+MACRO {ieeetcad}
+ {"IEEE Transactions on Computer-Aided Design of Integrated Circuits"}
+
+MACRO {ipl} {"Information Processing Letters"}
+
+MACRO {jacm} {"Journal of the ACM"}
+
+MACRO {jcss} {"Journal of Computer and System Sciences"}
+
+MACRO {scp} {"Science of Computer Programming"}
+
+MACRO {sicomp} {"SIAM Journal on Computing"}
+
+MACRO {tocs} {"ACM Transactions on Computer Systems"}
+
+MACRO {tods} {"ACM Transactions on Database Systems"}
+
+MACRO {tog} {"ACM Transactions on Graphics"}
+
+MACRO {toms} {"ACM Transactions on Mathematical Software"}
+
+MACRO {toois} {"ACM Transactions on Office Information Systems"}
+
+MACRO {toplas} {"ACM Transactions on Programming Languages and Systems"}
+
+MACRO {tcs} {"Theoretical Computer Science"}
+
+INTEGERS { nameptr namesleft numnames }
+
+FUNCTION {format.names}
+{ 's :=
+ #1 'nameptr :=
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ {
+ fa.isPersianLanguage
+ {s nameptr "{vv~}{ll}{, jj}{, ff}" format.name$ 't := }
+ {s nameptr "{vv~}{ll}{, jj}{, f.}" format.name$ 't := }
+ if$
+
+
+ nameptr #1 >
+ {
+ namesleft #1 >
+ { ", " * t * }
+ {
+ numnames #2 >
+ { "," * }
+ 'skip$
+ if$
+ s nameptr "{ll}" format.name$ duplicate$ "others" =
+ { 't := }
+ { pop$ }
+ if$
+ t "others" =
+ {
+ bbl.etal *
+ }
+ { bbl.and space.word * t * }
+ if$
+ }
+ if$
+ }
+ 't
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+}
+FUNCTION {format.names.ed}
+{ format.names }
+FUNCTION {format.key}
+{ empty$
+ { key field.or.null }
+ { "" }
+ if$
+}
+
+FUNCTION {format.authors}
+{ author empty$
+ { "" }
+ { author format.names }
+ if$
+}
+
+FUNCTION {format.editors}
+{ editor empty$
+ { "" }
+ {
+ fa.isPersianLanguage
+ {
+ editor num.names$ #1 >
+ { " (" bbl.editors * ")" * editor format.names *}
+ { " (" bbl.editor * ")" * editor format.names *}
+ if$
+ }
+ { editor format.names
+ editor num.names$ #1 >
+ { " (" * bbl.editors * ")" * }
+ { " (" * bbl.editor * ")" * }
+ if$
+ }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.translators}
+{ translator empty$
+ { "" }
+ { fa.isPersianLanguage
+ {
+ bbl.translator translator format.names *
+ }
+ {
+ translator format.names
+ bbl.translator *
+ }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.in.editors}
+{ editor empty$
+ { "" }
+ { editor format.names.ed
+ }
+ if$
+}
+
+FUNCTION {format.note}
+{ note empty$
+ { "" }
+ { note #1 #1 substring$
+ duplicate$ "{" =
+ 'skip$
+ { output.state mid.sentence =
+ { "l" }
+ { "u" }
+ if$
+ change.case$
+ }
+ if$
+ note #2 global.max$ substring$ *
+ }
+ if$
+}
+
+FUNCTION {format.title}
+{ title empty$
+ { "" }
+ { title
+ fa.isPersianLanguage
+ {"\faquote{" swap$ *}
+ {"\enquote{" swap$ *}
+ if$
+ non.stop
+ { ",} " * }
+ { "} " * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {end.quote.title}
+{ title empty$
+ 'skip$
+ { before.all 'output.state := }
+ if$
+}
+
+FUNCTION {format.full.names}
+{'s :=
+ #1 'nameptr :=
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ { s nameptr
+ "{vv~}{ll}" format.name$
+ 't :=
+ nameptr #1 >
+ {
+ namesleft #1 >
+ { ", " * t * }
+ {
+ numnames #2 >
+ { "," * }
+ 'skip$
+ if$
+ s nameptr "{ll}" format.name$ duplicate$ "others" =
+ { 't := }
+ { pop$ }
+ if$
+ t "others" =
+ {
+ bbl.etal *
+ }
+ { bbl.and space.word * t * }
+ if$
+ }
+ if$
+ }
+ 't
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+}
+
+FUNCTION {author.editor.key.full}
+{ author empty$
+ { editor empty$
+ { key empty$
+ { cite$ #1 #3 substring$ }
+ 'key
+ if$
+ }
+ { editor format.full.names }
+ if$
+ }
+ { author format.full.names }
+ if$
+}
+
+FUNCTION {author.key.full}
+{ author empty$
+ { key empty$
+ { cite$ #1 #3 substring$ }
+ 'key
+ if$
+ }
+ { author format.full.names }
+ if$
+}
+
+FUNCTION {editor.key.full}
+{ editor empty$
+ { key empty$
+ { cite$ #1 #3 substring$ }
+ 'key
+ if$
+ }
+ { editor format.full.names }
+ if$
+}
+
+FUNCTION {make.full.names}
+{ type$ "book" =
+ type$ "inbook" =
+ or
+ 'author.editor.key.full
+ { type$ "proceedings" =
+ 'editor.key.full
+ 'author.key.full
+ if$
+ }
+ if$
+}
+
+FUNCTION {output.bibitem}
+{
+ #0 'fa.isInLabel := %Initialize fa.isInLabel
+ newline$
+ fa.isPersianLanguage
+ { skip$ }
+ {
+ "\begin{LTRbibitems}" write$
+ newline$
+ "\resetlatinfont " write$
+ }
+ if$
+ newline$
+ "\bibitem[{" write$
+ label write$
+ ")" make.full.names duplicate$ short.list =
+ { pop$ }
+ { * }
+ if$
+ "}]{" * write$
+ cite$ write$
+ "}" write$
+ newline$
+ ""
+ before.all 'output.state :=
+}
+
+FUNCTION {n.dashify}
+{
+ 't :=
+ ""
+ { t empty$ not }
+ { t #1 #1 substring$ "-" =
+ { t #1 #2 substring$ "--" = not
+ { "--" *
+ t #2 global.max$ substring$ 't :=
+ }
+ { { t #1 #1 substring$ "-" = }
+ { "-" *
+ t #2 global.max$ substring$ 't :=
+ }
+ while$
+ }
+ if$
+ }
+ { t #1 #1 substring$ *
+ t #2 global.max$ substring$ 't :=
+ }
+ if$
+ }
+ while$
+}
+
+FUNCTION {word.in}
+{ bbl.in
+ " " * }
+
+FUNCTION {format.date}
+{ year duplicate$ empty$
+ { "empty year in " cite$ * "; set to ????" * warning$
+ pop$ "????" }
+ 'skip$
+ if$
+ extra.label *
+ before.all 'output.state :=
+ " (" swap$ * ")" *
+}
+
+FUNCTION {format.btitle}
+{ title emphasize
+}
+
+FUNCTION {tie.or.space.connect}
+{ duplicate$ text.length$ #3 <
+ { "~" }
+ { " " }
+ if$
+ swap$ * *
+}
+
+FUNCTION {either.or.check}
+{ empty$
+ 'pop$
+ { "can't use both " swap$ * " fields in " * cite$ * warning$ }
+ if$
+}
+
+FUNCTION {format.bvolume}
+{ volume empty$
+ { "" }
+ { bbl.volume volume tie.or.space.connect
+ series empty$
+ 'skip$
+ { bbl.of space.word * series emphasize * }
+ if$
+ "volume and number" number either.or.check
+ }
+ if$
+}
+
+FUNCTION {format.number.series}
+{ volume empty$
+ { number empty$
+ { series field.or.null }
+ { output.state mid.sentence =
+ { bbl.number }
+ { bbl.number capitalize }
+ if$
+ number tie.or.space.connect
+ series empty$
+ { "there's a number but no series in " cite$ * warning$ }
+ { bbl.in space.word * series * }
+ if$
+ }
+ if$
+ }
+ { "" }
+ if$
+}
+
+FUNCTION {is.num}
+{ chr.to.int$
+ duplicate$ "0" chr.to.int$ < not
+ swap$ "9" chr.to.int$ > not and
+}
+
+FUNCTION {extract.num}
+{ duplicate$ 't :=
+ "" 's :=
+ { t empty$ not }
+ { t #1 #1 substring$
+ t #2 global.max$ substring$ 't :=
+ duplicate$ is.num
+ { s swap$ * 's := }
+ { pop$ "" 't := }
+ if$
+ }
+ while$
+ s empty$
+ 'skip$
+ { pop$ s }
+ if$
+}
+
+FUNCTION {convert.edition}
+{ edition extract.num "l" change.case$ 's :=
+ s "first" = s "1" = or
+ { bbl.first 't := }
+ { s "second" = s "2" = or
+ { bbl.second 't := }
+ { s "third" = s "3" = or
+ { bbl.third 't := }
+ { s "fourth" = s "4" = or
+ { bbl.fourth 't := }
+ { s "fifth" = s "5" = or
+ { bbl.fifth 't := }
+ { s #1 #1 substring$ is.num
+ { s eng.ord 't := }
+ { edition 't := }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+ t
+}
+
+FUNCTION {format.edition}
+{ edition empty$
+ { "" }
+ {
+ fa.isPersianLanguage
+ {
+ bbl.edition edition *
+ }
+ {
+ output.state mid.sentence =
+ { convert.edition "l" change.case$ " " * bbl.edition * }
+ { convert.edition "t" change.case$ " " * bbl.edition * }
+ if$
+ }
+ if$
+ }
+ if$
+}
+
+INTEGERS { multiresult }
+
+FUNCTION {multi.page.check}
+{ 't :=
+ #0 'multiresult :=
+ { multiresult not
+ t empty$ not
+ and
+ }
+ { t #1 #1 substring$
+ duplicate$ "-" =
+ swap$ duplicate$ "," =
+ swap$ "+" =
+ or or
+ { #1 'multiresult := }
+ { t #2 global.max$ substring$ 't := }
+ if$
+ }
+ while$
+ multiresult
+}
+
+FUNCTION {format.pages}
+{ pages empty$
+ { "" }
+ { pages multi.page.check
+ { bbl.pages pages n.dashify tie.or.space.connect }
+ { bbl.page pages tie.or.space.connect }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.journal.pages}
+{ pages empty$
+ 'skip$
+ { duplicate$ empty$
+ { pop$ format.pages }
+ {
+ ", " *
+ pages n.dashify *
+ }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.vol.num.pages}
+{ volume field.or.null
+}
+
+FUNCTION {format.chapter.pages}
+{ chapter empty$
+ { "" }
+ { type empty$
+ { bbl.chapter }
+ { type "l" change.case$ }
+ if$
+ chapter tie.or.space.connect
+ }
+ if$
+}
+
+FUNCTION {format.in.ed.booktitle}
+{ booktitle empty$
+ { "" }
+ { editor empty$
+ { word.in booktitle emphasize * }
+ { word.in booktitle emphasize *
+ ", " *
+ editor num.names$ #1 >
+ { bbl.editors }
+ { bbl.editor }
+ if$
+ * " " *
+ format.in.editors *
+ }
+ if$
+ }
+ if$
+}
+
+
+FUNCTION {format.thesis.type}
+{ type empty$
+ 'skip$
+ { pop$
+ type "t" change.case$
+ }
+ if$
+}
+
+FUNCTION {format.tr.number}
+{ type empty$
+ { bbl.techrep }
+ 'type
+ if$
+ number empty$
+ { "t" change.case$ }
+ { number tie.or.space.connect }
+ if$
+}
+
+FUNCTION {format.article.crossref}
+{
+ word.in
+ " \cite{" * crossref * "}" *
+}
+
+FUNCTION {format.book.crossref}
+{ volume empty$
+ { "empty volume in " cite$ * "'s crossref of " * crossref * warning$
+ word.in
+ }
+ { bbl.volume volume tie.or.space.connect
+ bbl.of space.word *
+ }
+ if$
+ " \cite{" * crossref * "}" *
+}
+
+FUNCTION {format.incoll.inproc.crossref}
+{
+ word.in
+ " \cite{" * crossref * "}" *
+}
+
+FUNCTION {format.publisher}
+{ publisher empty$
+ { "empty publisher in " cite$ * warning$ }
+ 'skip$
+ if$
+ ""
+ address empty$ publisher empty$ and
+ 'skip$
+ {
+ address empty$
+ 'skip$
+ { address * }
+ if$
+ publisher empty$
+ 'skip$
+ { address empty$
+ 'skip$
+ { ": " * }
+ if$
+ publisher *
+ }
+ if$
+ }
+ if$
+ output
+}
+
+STRINGS {oldname}
+
+FUNCTION {name.or.dash}
+{ 's :=
+ oldname empty$
+ { s 'oldname := s }
+ { s oldname =
+ { "---" }
+ { s 'oldname := s }
+ if$
+ }
+ if$
+}
+
+FUNCTION {article}
+{ output.bibitem
+ format.authors "author" output.check
+ author format.key output
+ name.or.dash
+ format.date "year" output.check
+ date.block
+ format.title "title" output.check
+ end.quote.title
+ crossref missing$
+ { journal
+ emphasize
+ "journal" output.check
+ format.vol.num.pages output
+ }
+ { format.article.crossref output.nonnull
+ format.pages output
+ }
+ if$
+ format.journal.pages
+ format.note output
+ fin.entry
+}
+
+FUNCTION {book}
+{ output.bibitem
+ fa.isPersianLanguage
+ {
+ format.authors output.nonnull
+ format.date "year" output.check
+ date.block
+ %new.block
+ format.btitle
+ "title" output.check
+ %format.edition output
+ new.block
+ format.translators output
+ format.editors "author and editor" output.check%output
+ }
+ {
+ author empty$
+ { format.editors "author and editor" output.check
+ editor format.key output
+ name.or.dash
+ }
+ { format.authors output.nonnull
+ name.or.dash
+ crossref missing$
+ { "author and editor" editor either.or.check }
+ 'skip$
+ if$
+ }
+ if$
+ format.date "year" output.check
+ date.block
+ format.btitle "title" output.check
+ }
+if$
+
+ crossref missing$
+ { format.bvolume output
+ format.number.series output
+ format.publisher
+ }
+ {
+ format.book.crossref output.nonnull
+ }
+ if$
+ format.edition output
+ format.note output
+ fin.entry
+}
+
+FUNCTION {booklet}
+{ output.bibitem
+ format.authors output
+ author format.key output
+ name.or.dash
+ format.date "year" output.check
+ date.block
+ format.title "title" output.check
+ end.quote.title
+ howpublished output
+ address output
+ format.note output
+ fin.entry
+}
+
+FUNCTION {inbook}
+{ output.bibitem
+ author empty$
+ { format.editors "author and editor" output.check
+ editor format.key output
+ name.or.dash
+ }
+ { format.authors output.nonnull
+ name.or.dash
+ crossref missing$
+ { "author and editor" editor either.or.check }
+ 'skip$
+ if$
+ }
+ if$
+ format.date "year" output.check
+ date.block
+ format.btitle "title" output.check
+ crossref missing$
+ {
+ format.publisher
+ format.bvolume output
+ format.chapter.pages "chapter and pages" output.check
+ format.number.series output
+ }
+ {
+ format.chapter.pages "chapter and pages" output.check
+ format.book.crossref output.nonnull
+ }
+ if$
+ format.edition output
+ format.pages "pages" output.check
+ format.note output
+ fin.entry
+}
+
+FUNCTION {incollection}
+{ output.bibitem
+ format.authors "author" output.check
+ author format.key output
+ name.or.dash
+ format.date "year" output.check
+ date.block
+ format.title "title" output.check
+ end.quote.title
+ crossref missing$
+ { format.in.ed.booktitle "booktitle" output.check
+ format.publisher
+ format.bvolume output
+ format.number.series output
+ format.chapter.pages output
+ format.edition output
+ }
+ { format.incoll.inproc.crossref output.nonnull
+ format.chapter.pages output
+ }
+ if$
+ format.pages "pages" output.check
+ format.note output
+ fin.entry
+}
+
+FUNCTION {inproceedings}
+{ output.bibitem
+ format.authors "author" output.check
+ author format.key output
+ name.or.dash
+ format.date "year" output.check
+ date.block
+ format.title "title" output.check
+ end.quote.title
+ crossref missing$
+ { format.in.ed.booktitle "booktitle" output.check
+ publisher empty$
+ { organization output
+ address output
+ }
+ { organization output
+ format.publisher
+ }
+ if$
+ format.bvolume output
+ format.number.series output
+ format.pages output
+ }
+ { format.incoll.inproc.crossref output.nonnull
+ format.pages output
+ }
+ if$
+ format.note output
+ fin.entry
+}
+
+FUNCTION {conference} { inproceedings }
+
+FUNCTION {manual}
+{ output.bibitem
+ format.authors output
+ author format.key output
+ name.or.dash
+ format.date "year" output.check
+ date.block
+ format.btitle "title" output.check
+ organization output
+ address output
+ format.edition output
+ format.note output
+ fin.entry
+}
+
+FUNCTION {mastersthesis}
+{ output.bibitem
+ format.authors "author" output.check
+ author format.key output
+ name.or.dash
+ format.date "year" output.check
+ date.block
+ format.title "title" output.check
+ end.quote.title
+ bbl.mthesis format.thesis.type output.nonnull
+ school "school" output.check
+ address output
+ format.note output
+ fin.entry
+}
+
+FUNCTION {misc}
+{ output.bibitem
+ format.authors output
+ author format.key output
+ name.or.dash
+ format.date "year" output.check
+ date.block
+ format.title output
+ end.quote.title
+ howpublished output
+ format.note output
+ fin.entry
+}
+
+FUNCTION {phdthesis}
+{ output.bibitem
+ format.authors "author" output.check
+ author format.key output
+ name.or.dash
+ format.date "year" output.check
+ date.block
+ format.title "title" output.check
+ end.quote.title
+ bbl.phdthesis format.thesis.type output.nonnull
+ school "school" output.check
+ address output
+ format.note output
+ fin.entry
+}
+
+FUNCTION {proceedings}
+{ output.bibitem
+ format.editors output
+ editor format.key output
+ name.or.dash
+ format.date "year" output.check
+ date.block
+ format.btitle "title" output.check
+ format.bvolume output
+ format.number.series output
+ address output
+ organization output
+ publisher output
+ format.note output
+ fin.entry
+}
+
+FUNCTION {techreport}
+{ output.bibitem
+ format.authors "author" output.check
+ author format.key output
+ name.or.dash
+ format.date "year" output.check
+ date.block
+ format.title "title" output.check
+ end.quote.title
+ format.tr.number output.nonnull
+ institution "institution" output.check
+ address output
+ format.note output
+ fin.entry
+}
+
+FUNCTION {unpublished}
+{ output.bibitem
+ format.authors "author" output.check
+ author format.key output
+ name.or.dash
+ format.date "year" output.check
+ date.block
+ format.title "title" output.check
+ end.quote.title
+ format.note "note" output.check
+ fin.entry
+}
+
+FUNCTION {default.type} { misc }
+
+READ
+
+FUNCTION {sortify}
+{ purify$
+ "l" change.case$
+}
+
+INTEGERS { len }
+
+FUNCTION {chop.word}
+{ 's :=
+ 'len :=
+ s #1 len substring$ =
+ { s len #1 + global.max$ substring$ }
+ 's
+ if$
+}
+
+FUNCTION {format.lab.names}
+{
+ 's :=
+ authorfa empty$
+ {
+ %skip$
+ #0 'fa.isInLabel :=
+ }
+ {% If authorfa exists
+ authorfa 's :=
+ #1 'fa.isInLabel :=
+ }
+ if$
+
+ s #1 "{vv~}{ll}" format.name$
+ s num.names$ duplicate$
+ #2 >
+ { pop$
+ bbl.etal *
+ }
+ { #2 <
+ 'skip$
+ { s #2 "{ff }{vv }{ll}{ jj}" format.name$ "others" =
+ {
+ bbl.etal *
+ }
+ { bbl.and space.word * s #2 "{vv~}{ll}" format.name$
+ * }
+ if$
+ }
+ if$
+ }
+ if$
+ #0 'fa.isInLabel := %reset fa.isInLabel
+}
+
+FUNCTION {author.key.label}
+{ author empty$
+ { key empty$
+ { cite$ #1 #3 substring$ }
+ 'key
+ if$
+ }
+ { author format.lab.names }
+ if$
+}
+
+FUNCTION {author.editor.key.label}
+{ author empty$
+ { editor empty$
+ { key empty$
+ { cite$ #1 #3 substring$ }
+ 'key
+ if$
+ }
+ { editor format.lab.names }
+ if$
+ }
+ { author format.lab.names }
+ if$
+}
+
+FUNCTION {editor.key.label}
+{ editor empty$
+ { key empty$
+ { cite$ #1 #3 substring$ }
+ 'key
+ if$
+ }
+ { editor format.lab.names }
+ if$
+}
+
+FUNCTION {calc.short.authors}
+{ type$ "book" =
+ type$ "inbook" =
+ or
+ 'author.editor.key.label
+ { type$ "proceedings" =
+ 'editor.key.label
+ 'author.key.label
+ if$
+ }
+ if$
+ 'short.list :=
+}
+
+FUNCTION {calc.label}
+{ calc.short.authors
+ short.list
+ "("
+ *
+ year duplicate$ empty$
+ { pop$ "????" }
+ 'skip$
+ if$
+ *
+ 'label :=
+}
+
+FUNCTION {sort.format.names}
+{ 's :=
+ #1 'nameptr :=
+ ""
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ { s nameptr
+ "{vv{ } }{ll{ }}{ f{ }}{ jj{ }}"
+ format.name$ 't :=
+ nameptr #1 >
+ {
+ " " *
+ namesleft #1 = t "others" = and
+ { "zzzzz" * }
+ { t sortify * }
+ if$
+ }
+ { t sortify * }
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+}
+
+FUNCTION {sort.format.title}
+{ 't :=
+ "A " #2
+ "An " #3
+ "The " #4 t chop.word
+ chop.word
+ chop.word
+ sortify
+ #1 global.max$ substring$
+}
+
+FUNCTION {author.sort}
+{ author empty$
+ { key empty$
+ { "to sort, need author or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { author sort.format.names }
+ if$
+}
+
+FUNCTION {author.editor.sort}
+{ author empty$
+ { editor empty$
+ { key empty$
+ { "to sort, need author, editor, or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { editor sort.format.names }
+ if$
+ }
+ { author sort.format.names }
+ if$
+}
+
+FUNCTION {editor.sort}
+{ editor empty$
+ { key empty$
+ { "to sort, need editor or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { editor sort.format.names }
+ if$
+}
+
+FUNCTION {presort}
+{ calc.label
+ label sortify
+ " "
+ *
+ type$ "book" =
+ type$ "inbook" =
+ or
+ 'author.editor.sort
+ { type$ "proceedings" =
+ 'editor.sort
+ 'author.sort
+ if$
+ }
+ if$
+ #1 entry.max$ substring$
+ 'sort.label :=
+ sort.label
+ *
+ " "
+ *
+ title field.or.null
+ sort.format.title
+ *
+ #1 entry.max$ substring$
+ 'sort.key$ :=
+}
+
+ITERATE {presort}
+
+SORT
+
+STRINGS { last.label next.extra }
+
+INTEGERS { last.extra.num number.label }
+
+FUNCTION {initialize.extra.label.stuff}
+{ #0 int.to.chr$ 'last.label :=
+ "" 'next.extra :=
+ #0 'last.extra.num :=
+ #0 'number.label :=
+}
+
+FUNCTION {forward.pass}
+{ last.label label =
+ { last.extra.num #1 + 'last.extra.num :=
+ last.extra.num int.to.chr$ 'extra.label :=
+ }
+ { "a" chr.to.int$ 'last.extra.num :=
+ "" 'extra.label :=
+ label 'last.label :=
+ }
+ if$
+ number.label #1 + 'number.label :=
+}
+
+FUNCTION {reverse.pass}
+{ next.extra "b" =
+ { "a" 'extra.label := }
+ 'skip$
+ if$
+ extra.label 'next.extra :=
+ extra.label
+ duplicate$ empty$
+ 'skip$
+ { "{\natexlab{" swap$ * "}}" * }
+ if$
+ 'extra.label :=
+ label extra.label * 'label :=
+}
+
+EXECUTE {initialize.extra.label.stuff}
+
+ITERATE {forward.pass}
+
+REVERSE {reverse.pass}
+
+FUNCTION {bib.sort.order}
+{ sort.label
+ " "
+ *
+ year field.or.null sortify
+ *
+ " "
+ *
+ title field.or.null
+ sort.format.title
+ *
+ #1 entry.max$ substring$
+ 'sort.key$ :=
+}
+
+ITERATE {bib.sort.order}
+
+SORT
+
+FUNCTION {begin.bib}
+{
+ "% Generated by asa-fa.bst, version: " bst.file.version * " (" * bst.file.date * "), for XePersian" *
+ write$ newline$
+ "% Author: " bst.file.authors *
+ write$ newline$
+ preamble$ empty$
+ 'skip$
+ { preamble$ write$ newline$ }
+ if$
+ "\begin{thebibliography}{" number.label int.to.str$ * "}" *
+ write$ newline$
+ "\newcommand{\faquote}[1]{''#1``}"
+ write$ newline$
+ "\newcommand{\enquote}[1]{``#1''}"
+ write$ newline$
+ "\expandafter\ifx\csname natexlab\endcsname\relax\def\natexlab#1{#1}\fi"
+ write$ newline$
+}
+
+EXECUTE {begin.bib}
+
+EXECUTE {init.state.consts}
+
+ITERATE {call.type$}
+
+FUNCTION {end.bib}
+{ newline$
+ "\end{thebibliography}" write$ newline$
+}
+
+EXECUTE {end.bib}
+EXECUTE{completed.message}
+%% End of file `asa-fa.bst'.
diff --git a/biblio/bibtex/contrib/persian-bib/bibtex-example.tex b/biblio/bibtex/contrib/persian-bib/bibtex-example.tex
new file mode 100644
index 0000000000..c09c93b229
--- /dev/null
+++ b/biblio/bibtex/contrib/persian-bib/bibtex-example.tex
@@ -0,0 +1,30 @@
+\documentclass[11pt,a4paper]{article}
+
+% استفاده از بسته‌ی زیر الزامی نیست ولی با استفاده از آن می‌توانید لینکهای رنگی به مراجع خود داشته باشید.
+\usepackage[colorlinks,citecolor=blue]{hyperref}
+
+\usepackage{xepersian}
+\settextfont{XB Zar}
+\setlatintextfont[Scale=1]{Linux Libertine}
+
+\title{نمونه خروجی با استیل فارسی \lr{acm-fa} برای \lr{BibTeX} در زی‌پرشین}
+\author{محمود امین‌طوسی}\date{}
+\begin{document}
+\maketitle
+
+مرجع \cite{Omidali82phdThesis} یک نمونه پروژه دکترا و مرجع \cite{Vahedi87} یک نمونه مقاله مجله فارسی است.
+مرجع \cite{Amintoosi87afzayesh} یک نمونه مقاله کنفرانس فارسی و
+مرجع \cite{Pedram80osool} یک نمونه کتاب فارسی با ذکر مترجمان و ویراستاران فارسی است. مرجع \cite{Khalighi07MscThesis} یک نمونه پروژه کارشناسی ارشد انگلیسی و
+\cite{Khalighi87xepersian} هم یک نمونه متفرقه می‌باشند.
+
+مرجع \cite{Gonzalez02book} یک نمونه کتاب لاتین است که از آنجا که دارای فیلد \lr{authorfa} است، نام نویسندگان آن در استیلهای \lr{asa-fa}، \lr{plainnat-fa} و \lr{chicago-fa} به فارسی دیده می‌شود. مرجع \cite{Baker02limits} مقاله انگلیسی است که معادل فارسی نام نویسندگان آن ذکر نشده بوده است.
+
+
+{\small
+% در اینجا می‌توانید سبک‌های مختلف را گذاشته و تفاوت خروجی را ببینید
+\bibliographystyle{acm-fa}
+
+\bibliography{MyReferences}
+}
+
+\end{document}
diff --git a/biblio/bibtex/contrib/persian-bib/chicago-fa.bst b/biblio/bibtex/contrib/persian-bib/chicago-fa.bst
new file mode 100644
index 0000000000..211da261dc
--- /dev/null
+++ b/biblio/bibtex/contrib/persian-bib/chicago-fa.bst
@@ -0,0 +1,2223 @@
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% Bib. style "chicago-fa", Persian (farsi) version of chicago.bst
+%%
+%% by: Mahmood Amintoosi, m.amintoosi@gmail.com, www.parsilatex.com
+%% For XePersian, a Persian Typesetting Package in XeTeX
+%% It may be distributed and/or modified under the
+%% conditions of the LaTeX Project Public License (version 1.3c),
+%% either this version of this license or (at your option) any later version.
+%%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% Original Copyright
+
+%%% ====================================================================
+%%% @BibTeX-style-file{
+%%% author = "Glenn Paulley",
+%%% version = "4",
+%%% date = "28 August 1992",
+%%% time = "10:23:39 199",
+%%% filename = "chicago.bst",
+%%% address = "Data Structuring Group
+%%% Department of Computer Science
+%%% University of Waterloo
+%%% Waterloo, Ontario, Canada
+%%% N2L 3G1",
+%%% telephone = "(519) 885-1211",
+%%% FAX = "(519) 885-1208",
+%%% checksum = "26323 1654 5143 37417",
+%%% email = "gnpaulle@bluebox.uwaterloo.ca",
+%%% codetable = "ISO/ASCII",
+%%% keywords = "",
+%%% supported = "yes",
+%%% abstract = "A BibTeX bibliography style that follows the
+%%% `B' reference style of the 13th Edition of
+%%% the Chicago Manual of Style. A detailed
+%%% feature list is given below.",
+%%% docstring = "The checksum field above contains a CRC-16
+%%% checksum as the first value, followed by the
+%%% equivalent of the standard UNIX wc (word
+%%% count) utility output of lines, words, and
+%%% characters. This is produced by Robert
+%%% Solovay's checksum utility.",
+%%% }
+%%% ====================================================================
+%
+% "Chicago" BibTeX style, chicago.bst
+% ===================================
+%
+% BibTeX `chicago' style file for BibTeX version 0.99c, LaTeX version 2.09
+% Place it in a file called chicago.bst in the BibTeX search path.
+% You need to include chicago.sty as a \documentstyle option.
+% (Placing it in the same directory as the LaTeX document should also work.)
+% This "chicago" style is based on newapa.bst (American Psych. Assoc.)
+% found at ymir.claremont.edu.
+%
+% Citation format: (author-last-name year)
+% (author-last-name and author-last-name year)
+% (author-last-name, author-last-name, and author-last-name year)
+% (author-last-name et al. year)
+% (author-last-name)
+% author-last-name (year)
+% (author-last-name and author-last-name)
+% (author-last-name et al.)
+% (year) or (year,year)
+% year or year,year
+%
+% Reference list ordering: alphabetical by author or whatever passes
+% for author in the absence of one.
+%
+% This BibTeX style has support for abbreviated author lists and for
+% year-only citations. This is done by having the citations
+% actually look like
+%
+% \citeauthoryear{full-author-info}{abbrev-author-info}{year}
+%
+% The LaTeX style has to have the following (or similar)
+%
+% \let\@internalcite\cite
+% \def\fullcite{\def\citeauthoryear##1##2##3{##1, ##3}\@internalcite}
+% \def\fullciteA{\def\citeauthoryear##1##2##3{##1}\@internalcite}
+% \def\shortcite{\def\citeauthoryear##1##2##3{##2, ##3}\@internalcite}
+% \def\shortciteA{\def\citeauthoryear##1##2##3{##2}\@internalcite}
+% \def\citeyear{\def\citeauthoryear##1##2##3{##3}\@internalcite}
+%
+% These TeX macro definitions are found in chicago.sty. Additional
+% commands to manipulate different components of a citation can be defined
+% so that, for example, you can list author's names without parentheses
+% if using a citation as a noun or object in a sentence.
+%
+% This file was originally copied from newapa.bst at ymir.claremont.edu.
+%
+% Features of chicago.bst:
+% =======================
+%
+% - full names used in citations, but abbreviated citations are available
+% (see above)
+% - if an entry has a "month", then the month and year are also printed
+% as part of that bibitem.
+% - all conjunctions use "and" instead of "\&"
+% - major modification from Chicago Manual of Style (13th ed.) is that
+% only the first author in a reference appears last name first-
+% additional authors appear as J. Q. Public.
+% - pages are listed as "pp. xx-xx" in all entry types except
+% article entries.
+% - book, inbook, and manual use "location: publisher" (or organization)
+% for address and publisher. All other types list publishers separately.
+% - "pp." are used to identify page numbers for all entry types except
+% articles.
+% - organization is used as a citation label if neither author nor editor
+% is present (for manuals).
+% - "et al." is used for long author and editor lists, or when "others"
+% is used.
+%
+% Modifications and bug fixes from newapa.bst:
+% ===========================================
+%
+% - added month, year to bib entries if month is present
+% - fixed bug with In proceedings, added necessary comma after title
+% - all conjunctions changed to "and" from "\&"
+% - fixed bug with author labels in my.full.label: "et al." now is
+% generated when "others" is an author name
+% - major modification from Chicago Manual of Style (13th ed.) is that
+% only the first author in a reference appears last name first-
+% additional authors appear as J. Q. Public.
+% - pages are listed as "pp. xx-xx" in all entry types except
+% article entries. Unnecessary (IMHO) "()" around page numbers
+% were removed, and page numbers now don't end with a period.
+% - created chicago.sty for use with this bibstyle (required).
+% - fixed bugs in FUNCTION {format.vol.num.pages} for missing volume,
+% number, and /or pages. Renamed to format.jour.vol.
+% - fixed bug in formatting booktitles: additional period an error if
+% book has a volume.
+% - fixed bug: editors usually given redundant period before next clause
+% (format.editors.dot) removed.
+% - added label support for organizations, if both author and editor
+% are missing (from alpha.bst). If organization is too long, then
+% the key field is used for abbreviated citations.
+% - In proceedings or books of several volumes, no comma was written
+% between the "Volume x" and the page numbers (this was intentional
+% in newapa.bst). Fixed.
+% - Some journals may not have volumes/numbers, only month/year (eg.
+% IEEE Computer). Fixed bug in article style that assumed volume/number
+% was always present.
+%
+% Original documentation for newapa.sty:
+% =====================================
+%
+% This version was made by modifying the master file made by
+% Oren Patashnik (PATASHNIK@SCORE.STANFORD.EDU), and the 'named' BibTeX
+% style of Peter F. Patel-Schneider.
+%
+% Copyright (C) 1985, all rights reserved.
+% Copying of this file is authorized only if either
+% (1) you make absolutely no changes to your copy, including name, or
+% (2) if you do make changes, you name it something other than 'newapa.bst'.
+% There are undoubtably bugs in this style. If you make bug fixes,
+% improvements, etc. please let me know. My e-mail address is:
+% spencer@cgrg.ohio.state.edu or 71160.3141@compuserve.com
+%
+% This style was made from 'plain.bst', 'named.bst', and 'apalike.bst',
+% with lots of tweaking to make it look like APA style, along with tips
+% from Young Ryu and Brian Reiser's modifications of 'apalike.bst'.
+
+ENTRY
+ { address
+ author
+ authorfa
+ booktitle
+ chapter
+ edition
+ editor
+ howpublished
+ institution
+ journal
+ key
+ language
+ month
+ note
+ number
+ organization
+ pages
+ publisher
+ school
+ series
+ title
+ translator
+ type
+ volume
+ year
+ }
+ {}
+ { label.year extra.label sort.year sort.label }
+
+INTEGERS { output.state before.all mid.sentence after.sentence after.block fa.isInLabel}
+
+FUNCTION {is.print.banners.to.terminal} { #1 }
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% FILE VERSION AND BANNER %%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+FUNCTION{bst.file.version} { "0.9" }
+FUNCTION{bst.file.date} { "2015/05/09" }
+FUNCTION{bst.file.website} { "http://www.parsilatex.com" }
+FUNCTION{bst.file.authors} {"M.Amintoosi" }
+
+FUNCTION {banner.message}
+{ is.print.banners.to.terminal
+ { "-- chicago-fa.bst version" " " * bst.file.version *
+ " (" * bst.file.date * ") " * %"by " * bst.file.authors *
+ top$
+ "-- This is a BibTeX style for XePersian: " bst.file.website *
+ %top$
+ %"-- See the " quote$ * "Persian-bib-userguide.pdf" * quote$ * " manual for usage information." *
+ top$
+ }
+ { skip$ }
+ if$
+}
+
+FUNCTION {completed.message}
+{ is.print.banners.to.terminal
+ { ""
+ top$
+ "Done."
+ top$
+ }
+ { skip$ }
+ if$
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% Persian Functions %%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+FUNCTION {fa.isPersianLanguage}
+{
+ language missing$
+ {#0}
+ {language "l" change.case$ "persian" =}
+ if$
+}
+
+ % Here are the language-specific definitions for explicit words.
+ % Each function has a name bbl.xxx where xxx is the English word.
+ % The languages selected here is ENGLISH and Farsi
+FUNCTION {bbl.and}
+{
+fa.isInLabel
+{" و "}% If authorfa exists
+{
+ fa.isPersianLanguage
+ {" و "}
+ {" and "}
+ if$
+}
+if$
+}
+
+FUNCTION {bbl.editors}
+{
+fa.isPersianLanguage
+ { " ویراستاران "}
+ {" eds. "}
+if$
+}
+
+FUNCTION {bbl.editor}
+{
+fa.isPersianLanguage
+ { " ویراستار "}
+ {" ed. " }
+if$
+}
+
+FUNCTION {bbl.edby}
+{
+fa.isPersianLanguage
+ { " ویراسته‌ی "}
+ { " edited by " }
+if$
+}
+
+FUNCTION {bbl.edition}
+{
+fa.isPersianLanguage
+ {" ویرایش "}
+ {" ed." }
+if$
+}
+
+FUNCTION {bbl.volume}
+{
+fa.isPersianLanguage
+ {" جلد "}
+ { " Volume "}
+if$
+}
+
+FUNCTION {bbl.of}
+{
+fa.isPersianLanguage
+ { " از "}
+ { " of " }
+if$
+}
+
+FUNCTION {bbl.number}
+{
+fa.isPersianLanguage
+ {" شماره " }
+ { " Number " }
+if$
+}
+
+% FUNCTION {bbl.nr}
+% {
+% fa.isPersianLanguage
+ % {" شماره "}
+ % { " no." }
+% if$
+% }
+
+FUNCTION {bbl.in}
+{
+fa.isPersianLanguage
+ {" در "}
+ { " In " }
+if$
+}
+
+FUNCTION {bbl.pages}
+{
+fa.isPersianLanguage
+ {" صفحات "}
+ { " pp." }
+if$
+}
+
+FUNCTION {bbl.page}
+{
+fa.isPersianLanguage
+ {" ص." }
+ { " p." }
+if$
+}
+
+FUNCTION {bbl.chapter}
+{
+fa.isPersianLanguage
+ { " فصل " }
+ {" chap." }
+if$
+}
+
+FUNCTION {bbl.techrep}
+{
+fa.isPersianLanguage
+ { " گزارش طرح تحقیقی"}
+ { " Tech. Rep." }
+if$
+}
+
+FUNCTION {bbl.mthesis}
+{
+fa.isPersianLanguage
+ {" پایان‌نامه کارشناسی‌ارشد"}
+ { " Master's thesis" }
+if$
+}
+
+FUNCTION {bbl.phdthesis}
+{
+fa.isPersianLanguage
+ {" پایان‌نامه دکترا" }
+ { " Ph.D. thesis" }
+if$
+}
+
+FUNCTION {bbl.first}
+{ "1st" }
+
+FUNCTION {bbl.second}
+{ "2nd" }
+
+FUNCTION {bbl.third}
+{ "3rd" }
+
+FUNCTION {bbl.fourth}
+{ "4th" }
+
+FUNCTION {bbl.fifth}
+{ "5th" }
+
+FUNCTION {bbl.st}
+{ "st" }
+
+FUNCTION {bbl.nd}
+{ "nd" }
+
+FUNCTION {bbl.rd}
+{ "rd" }
+
+FUNCTION {bbl.th}
+{ "th" }
+
+% Added by M.Amintoosi
+FUNCTION {bbl.etal}
+{
+fa.isInLabel
+{" و دیگران"}% If authorfa exists
+{
+ fa.isPersianLanguage
+ {" و دیگران"}
+ {" et~al."}
+ if$
+}
+if$
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% End of Persian Functions %%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+
+FUNCTION {init.state.consts}
+{ #0 'before.all :=
+ #1 'mid.sentence :=
+ #2 'after.sentence :=
+ #3 'after.block :=
+}
+
+STRINGS { s t u }
+
+FUNCTION {output.nonnull}
+{ 's :=
+ output.state mid.sentence =
+ { ", " * write$ }
+ { output.state after.block =
+ { add.period$ write$
+ newline$
+ "\newblock " write$
+ }
+ { output.state before.all =
+ 'write$
+ { add.period$ " " * write$ }
+ if$
+ }
+ if$
+ mid.sentence 'output.state :=
+ }
+ if$
+ s
+}
+
+% Use a colon to separate output. Used only for address/publisher
+% combination in book/inbook types, address/institution for manuals,
+% and organization:publisher for proceedings (inproceedings).
+%
+FUNCTION {output.nonnull.colon}
+{ 's :=
+ output.state mid.sentence =
+ { ": " * write$ }
+ { output.state after.block =
+ { add.period$ write$
+ newline$
+ "\newblock " write$
+ }
+ { output.state before.all =
+ 'write$
+ { add.period$ " " * write$ }
+ if$
+ }
+ if$
+ mid.sentence 'output.state :=
+ }
+ if$
+ s
+}
+
+FUNCTION {output}
+{ duplicate$ empty$
+ 'pop$
+ 'output.nonnull
+ if$
+}
+
+FUNCTION {output.colon}
+{ duplicate$ empty$
+ 'pop$
+ 'output.nonnull.colon
+ if$
+}
+
+FUNCTION {output.check}
+{ 't :=
+ duplicate$ empty$
+ { pop$ "empty " t * " in " * cite$ * warning$ }
+ 'output.nonnull
+ if$
+}
+
+
+FUNCTION {output.check.colon}
+{ 't :=
+ duplicate$ empty$
+ { pop$ "empty " t * " in " * cite$ * warning$ }
+ 'output.nonnull.colon
+ if$
+}
+
+FUNCTION {output.year.check}
+{ year empty$
+ { "empty year in " cite$ * warning$ }
+ { write$
+ " (" year * extra.label *
+ month empty$
+ { ")" * }
+ { ", " * month * ")" * }
+ if$
+ mid.sentence 'output.state :=
+ }
+ if$
+}
+
+
+FUNCTION {fin.entry}
+{ add.period$
+ write$
+ newline$
+ fa.isPersianLanguage
+ {skip$}
+ {newline$
+ "\end{LTRbibitems}" write$
+ newline$
+ }
+ if$
+}
+
+FUNCTION {new.block}
+{ output.state before.all =
+ 'skip$
+ { after.block 'output.state := }
+ if$
+}
+
+FUNCTION {new.sentence}
+{ output.state after.block =
+ 'skip$
+ { output.state before.all =
+ 'skip$
+ { after.sentence 'output.state := }
+ if$
+ }
+ if$
+}
+
+FUNCTION {not}
+{ { #0 }
+ { #1 }
+ if$
+}
+
+FUNCTION {and}
+{ 'skip$
+ { pop$ #0 }
+ if$
+}
+
+FUNCTION {or}
+{ { pop$ #1 }
+ 'skip$
+ if$
+}
+
+FUNCTION {new.block.checka}
+{ empty$
+ 'skip$
+ 'new.block
+ if$
+}
+
+FUNCTION {new.block.checkb}
+{ empty$
+ swap$ empty$
+ and
+ 'skip$
+ 'new.block
+ if$
+}
+
+FUNCTION {new.sentence.checka}
+{ empty$
+ 'skip$
+ 'new.sentence
+ if$
+}
+
+FUNCTION {new.sentence.checkb}
+{ empty$
+ swap$ empty$
+ and
+ 'skip$
+ 'new.sentence
+ if$
+}
+
+FUNCTION {field.or.null}
+{ duplicate$ empty$
+ { pop$ "" }
+ 'skip$
+ if$
+}
+
+%
+% Emphasize the top string on the stack.
+%
+FUNCTION {emphasize}
+{ duplicate$ empty$
+ { pop$ "" }
+ { "{\em " swap$ * "}" * }
+ if$
+}
+
+
+%
+% Emphasize the top string on the stack, but add a trailing space.
+%
+FUNCTION {emphasize.space}
+{ duplicate$ empty$
+ { pop$ "" }
+ { "{\em " swap$ * "\/}" * }
+ if$
+}
+
+INTEGERS { nameptr namesleft numnames }
+%
+% Format bibliographical entries with the first author last name first,
+% and subsequent authors with initials followed by last name.
+% All names are formatted in this routine.
+%
+FUNCTION {format.names}
+{ 's :=
+ #1 'nameptr := % nameptr = 1;
+
+ s num.names$ 'numnames := % numnames = num.name$(s);
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ { nameptr #1 =
+ {
+ fa.isPersianLanguage
+ {s nameptr "{vv~}{ll}{, jj}{, ff}" format.name$ 't := }
+ {s nameptr "{vv~}{ll}{, jj}{, f.}" format.name$ 't := }
+ if$
+ }
+ {
+ fa.isPersianLanguage
+ {s nameptr "{ff~}{vv~}{ll}{, jj}" format.name$ 't := }
+ {s nameptr "{f.~}{vv~}{ll}{, jj}" format.name$ 't := }
+ if$
+ }
+ if$
+ nameptr #1 >
+ { namesleft #1 >
+ { ", " * t * }
+ { numnames #2 >
+ { "," * }
+ 'skip$
+ if$
+ t "others" =
+ { bbl.etal * }
+ { bbl.and * t * } % from Chicago Manual of Style
+ if$
+ }
+ if$
+ }
+ 't
+ if$
+ nameptr #1 + 'nameptr := % nameptr += 1;
+ namesleft #1 - 'namesleft := % namesleft =- 1;
+ }
+ while$
+}
+
+FUNCTION {my.full.label}
+{ 's :=
+
+ #1 'nameptr := % nameptr = 1;
+ s num.names$ 'numnames := % numnames = num.name$(s);
+ numnames 'namesleft :=
+ { namesleft #0 > }
+
+ { s nameptr "{vv~}{ll}" format.name$ 't := % get the next name
+ nameptr #1 >
+ { namesleft #1 >
+ { ", " * t * }
+ { numnames #2 >
+ { "," * }
+ 'skip$
+ if$
+ t "others" =
+ { bbl.etal * }
+ { bbl.and * t * } % from Chicago Manual of Style
+ if$
+ }
+ if$
+ }
+ 't
+ if$
+ nameptr #1 + 'nameptr := % nameptr += 1;
+ namesleft #1 - 'namesleft := % namesleft =- 1;
+ }
+ while$
+
+}
+
+FUNCTION {format.names.fml}
+%
+% Format names in "familiar" format, with first initial followed by
+% last name. Like format.names, ALL names are formatted.
+%
+{ 's :=
+ #1 'nameptr := % nameptr = 1;
+ s num.names$ 'numnames := % numnames = num.name$(s);
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ {
+ fa.isPersianLanguage
+ {s nameptr "{ff~}{vv~}{ll}{, jj}" format.name$ 't := }
+ {s nameptr "{f.~}{vv~}{ll}{, jj}" format.name$ 't := }
+ if$
+ nameptr #1 >
+ { namesleft #1 >
+ { ", " * t * }
+ { numnames #2 >
+ { "," * }
+ 'skip$
+ if$
+ t "others" =
+ { bbl.etal * }
+ { bbl.and * t * }
+% { " \& " * t * }
+ if$
+ }
+ if$
+ }
+ 't
+ if$
+ nameptr #1 + 'nameptr := % nameptr += 1;
+ namesleft #1 - 'namesleft := % namesleft =- 1;
+ }
+ while$
+}
+
+FUNCTION {format.authors}
+{ author empty$
+ { "" }
+ { author format.names }
+ if$
+}
+
+
+
+FUNCTION {format.key}
+{ empty$
+ { key field.or.null }
+ { "" }
+ if$
+}
+
+%
+% Format editor names for use in the "in" types: inbook, incollection,
+% inproceedings: first initial, then last names. When editors are the
+% LABEL for an entry, then format.editor is used which lists editors
+% by last name first.
+%
+FUNCTION {format.editors.fml}
+{ editor empty$
+ { "" }
+ {
+ fa.isPersianLanguage
+ {
+ editor num.names$ #1 >
+ {bbl.editors editor format.names.fml * }
+ {bbl.editor editor format.names.fml * }
+ if$
+ }
+ { editor format.names.fml
+ editor num.names$ #1 >
+ { " (Eds.)" * }
+ { " (Ed.)" * }
+ if$
+ }
+ if$
+ }
+ if$
+}
+
+
+%
+% Format editor names for use in labels, last names first.
+%
+FUNCTION {format.editors}
+{ editor empty$
+ { "" }
+ {
+ fa.isPersianLanguage
+ {
+ editor num.names$ #1 >
+ {bbl.editors editor format.names * }
+ {bbl.editor editor format.names * }
+ if$
+ }
+ {
+ editor format.names
+ editor num.names$ #1 >
+ { bbl.editors * }
+ { bbl.editor * }
+ if$
+ }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.translators}
+{ translator empty$
+ { "" }
+ { fa.isPersianLanguage
+ {
+ " ترجمه‌ی " translator format.names *
+ }
+ {
+ translator format.names
+ ", translated by: " *
+ }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.title}
+{ title empty$
+ { "" }
+ { title "t" change.case$ }
+ if$
+}
+
+% Note that the APA style requres case changes
+% in article titles. The following does not
+% change cases. If you perfer it, uncomment the
+% following and comment out the above.
+
+%FUNCTION {format.title}
+%{ title empty$
+% { "" }
+% { title }
+% if$
+%}
+
+FUNCTION {n.dashify}
+{ 't :=
+ ""
+ { t empty$ not }
+ { t #1 #1 substring$ "-" =
+ { t #1 #2 substring$ "--" = not
+ { "--" *
+
+ t #2 global.max$ substring$ 't :=
+ }
+ { { t #1 #1 substring$ "-" = }
+ { "-" *
+ t #2 global.max$ substring$ 't :=
+ }
+ while$
+ }
+ if$
+ }
+ { t #1 #1 substring$ *
+ t #2 global.max$ substring$ 't :=
+ }
+ if$
+ }
+ while$
+}
+
+
+FUNCTION {format.btitle}
+{ edition empty$
+ { title emphasize }
+ { title empty$
+ { title emphasize }
+ { volume empty$ % gnp - check for volume, then don't need period
+ {
+ fa.isPersianLanguage
+ { "{\em " title * "\/} (" * bbl.edition * edition * ")" * "." * }
+ { "{\em " title * "\/} (" * edition * bbl.edition * ")" * "." * }
+ if$
+ }
+ {
+ fa.isPersianLanguage
+ { "{\em " title * "\/} (" * bbl.edition * edition * ")" * }
+ { "{\em " title * "\/} (" * edition * bbl.edition * ")" * }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.emphasize.booktitle}
+{ edition empty$
+ { booktitle emphasize }
+ { booktitle empty$
+ { booktitle emphasize }
+ { volume empty$ % gnp - extra period an error if book has a volume
+ {
+ fa.isPersianLanguage
+ { "{\em " booktitle * "\/} (" * bbl.edition * edition * ")" * "." * }
+ { "{\em " booktitle * "\/} (" * edition * bbl.edition * ")" * "." * }
+ if$
+ }
+ {
+ fa.isPersianLanguage
+ { "{\em " booktitle * "\/} (" * bbl.edition * edition * ")" * }
+ { "{\em " booktitle * "\/} (" * edition * bbl.edition * ")" * }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+
+FUNCTION {tie.or.space.connect}
+{ duplicate$ text.length$ #3 <
+ { "~" }
+ { " " }
+ if$
+ swap$ * *
+}
+
+FUNCTION {either.or.check}
+{ empty$
+ 'pop$
+ { "can't use both " swap$ * " fields in " * cite$ * warning$ }
+ if$
+}
+
+FUNCTION {format.bvolume}
+{ volume empty$
+ { "" }
+ { bbl.volume volume tie.or.space.connect % gnp - changed to mixed case
+ series empty$
+ 'skip$
+ { bbl.of * series emphasize * }
+ if$
+ "volume and number" number either.or.check
+ }
+ if$
+}
+
+FUNCTION {format.number.series}
+{ volume empty$
+ { number empty$
+ { series field.or.null }
+ { output.state mid.sentence =
+ { bbl.number } % gnp - changed to mixed case always
+ { bbl.number }
+ if$
+ number tie.or.space.connect
+ series empty$
+ { "there's a number but no series in " cite$ * warning$ }
+ { bbl.in * series * }
+ if$
+ }
+ if$
+ }
+ { "" }
+ if$
+}
+
+INTEGERS { multiresult }
+
+FUNCTION {multi.page.check}
+{ 't :=
+ #0 'multiresult :=
+ { multiresult not
+ t empty$ not
+ and
+ }
+ { t #1 #1 substring$
+ duplicate$ "-" =
+ swap$ duplicate$ "," =
+ swap$ "+" =
+ or or
+ { #1 'multiresult := }
+ { t #2 global.max$ substring$ 't := }
+ if$
+ }
+ while$
+ multiresult
+}
+
+FUNCTION {format.pages}
+{ pages empty$
+ { "" }
+ { pages multi.page.check
+ { bbl.pages pages n.dashify tie.or.space.connect } % gnp - removed ()
+ { bbl.page pages tie.or.space.connect }
+ if$
+ }
+ if$
+}
+
+% By Young (and Spencer)
+% GNP - fixed bugs with missing volume, number, and/or pages
+%
+% Format journal, volume, number, pages for article types.
+%
+FUNCTION {format.jour.vol}
+
+{ journal empty$
+ { "no journal in " cite$ * warning$
+ "" }
+ { journal emphasize.space }
+ if$
+ number empty$
+ { volume empty$
+ { "no number and no volume in " cite$ * warning$
+
+ "" * }
+ { "~{\em " * Volume * "}" * }
+ if$
+ }
+ { volume empty$
+ {"no volume for " cite$ * warning$
+ "~(" * number * ")" * }
+ { "~" *
+ volume %emphasize.space
+ "(" * number * ")" * * }
+ if$
+ }
+ if$
+ pages empty$
+
+ {"page numbers missing in " cite$ * warning$
+ "" * } % gnp - place a null string on the stack for output
+ { duplicate$ empty$
+ { pop$ format.pages }
+ { ", " * pages n.dashify * } % gnp - removed pp. for articles
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.chapter.pages}
+{ chapter empty$
+ 'format.pages
+ { type empty$
+
+ { bbl.chapter } % gnp - changed to mixed case
+ { type "t" change.case$ }
+ if$
+ chapter tie.or.space.connect
+ pages empty$
+
+ {"page numbers missing in " cite$ * warning$} % gnp - added check
+ { ", " * format.pages * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.in.ed.booktitle}
+{ booktitle empty$
+ { "" }
+ { editor empty$
+
+ { bbl.in format.emphasize.booktitle * }
+ { bbl.in format.editors.fml * ", " * format.emphasize.booktitle * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.thesis.type}
+{ type empty$
+ 'skip$
+ { pop$
+ type "t" change.case$
+ }
+ if$
+}
+
+FUNCTION {format.tr.number}
+{ type empty$
+
+ { bbl.techrep }
+ 'type
+ if$
+ number empty$
+ { "t" change.case$ }
+ { number tie.or.space.connect }
+ if$
+}
+
+FUNCTION {format.article.crossref}
+{ "See"
+ "\citeN{" * crossref * "}" *
+}
+
+FUNCTION {format.crossref.editor}
+{ editor #1 "{vv~}{ll}" format.name$
+ editor num.names$ duplicate$
+ #2 >
+ { pop$ bbl.etal * }
+ { #2 <
+ 'skip$
+ { editor #2 "{ff }{vv }{ll}{ jj}" format.name$ "others" =
+
+ { bbl.etal * }
+ { bbl.and * editor #2 "{vv~}{ll}" format.name$ * }
+ if$
+ }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.book.crossref}
+{ volume empty$
+ { "empty volume in " cite$ * "'s crossref of " * crossref * warning$
+
+ bbl.in
+ }
+ { bbl.volume volume tie.or.space.connect % gnp - changed to mixed case
+
+ bbl.of *
+ }
+ if$
+ editor empty$
+ editor field.or.null author field.or.null =
+ or
+ { key empty$
+ { series empty$
+ { "need editor, key, or series for " cite$ * " to crossref " *
+ crossref * warning$
+
+ "" *
+ }
+ { "{\em " * series * "\/}" * }
+ if$
+ }
+ { key * }
+ if$
+ }
+ { format.crossref.editor * }
+ if$
+ " \citeN{" * crossref * "}" *
+}
+
+FUNCTION {format.incoll.inproc.crossref}
+{ "See"
+ " \citeN{" * crossref * "}" *
+}
+
+% format.lab.names:
+%
+% determines "short" names for the abbreviated author information.
+% "Long" labels are created in calc.label, using the routine my.full.label
+% to format author and editor fields.
+%
+% There are 4 cases for labels. (n=3 in the example)
+% a) one author Foo
+% b) one to n Foo, Bar and Baz
+% c) use of "and others" Foo, Bar et al.
+% d) more than n Foo et al.
+%
+FUNCTION {format.lab.names}
+{ 's :=
+ authorfa empty$
+ {
+ %skip$
+ #0 'fa.isInLabel :=
+ }
+ {% If authorfa exists
+ authorfa 's :=
+ #1 'fa.isInLabel :=
+ }
+ if$
+
+ s num.names$ 'numnames :=
+ numnames #2 > % change number to number of others allowed before
+ % forcing "et al".
+ { s #1 "{vv~}{ll}" format.name$ bbl.etal * }
+ {
+ numnames #1 - 'namesleft :=
+ #2 'nameptr :=
+ s #1 "{vv~}{ll}" format.name$
+ { namesleft #0 > }
+ { nameptr numnames =
+ { s nameptr "{ff }{vv }{ll}{ jj}" format.name$ "others" =
+ { bbl.etal * }
+ { bbl.and * s nameptr "{vv~}{ll}" format.name$ * }
+ if$
+ }
+ { ", " * s nameptr "{vv~}{ll}" format.name$ * }
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+ }
+ if$
+ #0 'fa.isInLabel := %reset fa.isInLabel
+}
+
+FUNCTION {author.key.label}
+{
+ author empty$
+ { key empty$
+ {
+ "no key, author in " cite$ * warning$
+ cite$ #1 #3 substring$ }
+ 'key
+ if$
+ }
+ { author format.lab.names }
+ if$
+%
+% % Push the two variables onto the stack
+% bbl.etal
+% bbl.and
+% authorfa empty$
+% {
+% fa.isPersianLanguage
+% {
+% " و دیگران" 'bbl.etal :=
+% " و " 'bbl.and :=
+% }
+% {
+% bbl.etal 'bbl.etal :=
+% " and " 'bbl.and :=
+% }
+% if$
+%
+% author empty$
+% { key empty$
+% {
+% "no key, author in " cite$ * warning$
+% cite$ #1 #3 substring$ }
+% 'key
+% if$
+% }
+% { author format.lab.names }
+% if$
+% }
+% {
+% " و دیگران" 'bbl.etal :=
+% " و " 'bbl.and :=
+% authorfa format.lab.names
+% }
+% if$
+%
+% % Pop the function result and store it on s
+% 's :=
+% % Push the two variables onto the stack
+% 'bbl.and :=
+% 'bbl.etal :=
+% % push the result into stack
+% s
+}
+
+FUNCTION {editor.key.label}
+{
+ editor empty$
+ { key empty$
+ { "no key, editor in " cite$ * warning$
+ cite$ #1 #3 substring$ }
+ 'key
+ if$
+ }
+ { editor format.lab.names }
+ if$
+% % Push the two variables onto the stack
+% bbl.etal
+% bbl.and
+% authorfa empty$
+% {
+% fa.isPersianLanguage
+% {
+% " و دیگران" 'bbl.etal :=
+% " و " 'bbl.and :=
+% }
+% {
+% bbl.etal 'bbl.etal :=
+% " and " 'bbl.and :=
+% }
+% if$
+%
+%
+% editor empty$
+% { key empty$
+% { "no key, editor in " cite$ * warning$
+% cite$ #1 #3 substring$ }
+% 'key
+% if$
+% }
+% { editor format.lab.names }
+% if$
+%
+% }
+% {
+% " و دیگران" 'bbl.etal :=
+% " و " 'bbl.and :=
+% authorfa format.lab.names
+% }
+% if$
+%
+% % Pop the function result and store it on s
+% 's :=
+% % Push the two variables onto the stack
+% 'bbl.and :=
+% 'bbl.etal :=
+% % push the result into stack
+% s
+}
+
+FUNCTION {author.key.organization.label}
+%
+% added - gnp. Provide label formatting by organization if author is null.
+%
+{ author empty$
+ { organization empty$
+ { key empty$
+ { "no key, author or organization in " cite$ * warning$
+ cite$ #1 #3 substring$ }
+ 'key
+ if$
+ }
+ { organization }
+ if$
+ }
+
+ { author format.lab.names }
+ if$
+}
+
+
+FUNCTION {editor.key.organization.label}
+%
+% added - gnp. Provide label formatting by organization if editor is null.
+%
+{ editor empty$
+ { organization empty$
+ { key empty$
+ { "no key, editor or organization in " cite$ * warning$
+ cite$ #1 #3 substring$ }
+ 'key
+ if$
+ }
+ { organization }
+ if$
+ }
+
+ { editor format.lab.names }
+ if$
+
+}
+
+FUNCTION {author.editor.key.label}
+{
+ author empty$
+ { editor empty$
+ { key empty$
+ { "no key, author, or editor in " cite$ * warning$
+ cite$ #1 #3 substring$ }
+ 'key
+ if$
+ }
+ { editor format.lab.names }
+ if$
+ }
+ { author format.lab.names }
+ if$
+
+%
+% % Push the two variables onto the stack
+% bbl.etal
+% bbl.and
+% authorfa empty$
+% {
+% fa.isPersianLanguage
+% {
+% " و دیگران" 'bbl.etal :=
+% " و " 'bbl.and :=
+% }
+% {
+% bbl.etal 'bbl.etal :=
+% " and " 'bbl.and :=
+% }
+% if$
+%
+% author empty$
+% { editor empty$
+% { key empty$
+% { "no key, author, or editor in " cite$ * warning$
+% cite$ #1 #3 substring$ }
+% 'key
+% if$
+% }
+% { editor format.lab.names }
+% if$
+% }
+% { author format.lab.names }
+% if$
+%
+% }
+% {
+% " و دیگران" 'bbl.etal :=
+% " و " 'bbl.and :=
+% authorfa format.lab.names
+% }
+% if$
+%
+% % Pop the function result and store it on s
+% 's :=
+% % Push the two variables onto the stack
+% 'bbl.and :=
+% 'bbl.etal :=
+% % push the result into stack
+% s
+}
+
+FUNCTION {calc.label}
+%
+% Changed - GNP. See also author.organization.sort, editor.organization.sort
+% Form label for BibTeX entry. The classification of which fields are used
+% for which type of entry (book, inbook, etc.) are taken from alpha.bst.
+% The change here from newapa is to also include organization as a
+% citation label if author or editor is missing.
+%
+{
+ type$ "book" =
+ type$ "inbook" =
+ or
+ 'author.editor.key.label
+ { type$ "proceedings" =
+ 'editor.key.organization.label
+ { type$ "manual" =
+ 'author.key.organization.label
+ 'author.key.label
+ if$
+ }
+ if$
+ }
+ if$
+
+ author empty$ % generate the full label citation information.
+ { editor empty$
+ { organization empty$
+ { "no author, editor, or organization in " cite$ * warning$
+ "??" }
+ { organization }
+ if$
+ }
+ { editor my.full.label }
+ if$
+ }
+ { author my.full.label }
+ if$
+
+% leave label on the stack, to be popped when required.
+
+ "}{" * swap$ * "}{" *
+% year field.or.null purify$ #-1 #4 substring$ *
+%
+% save the year for sort processing afterwards (adding a, b, c, etc.)
+%
+ year field.or.null purify$ #-1 #4 substring$
+ 'label.year :=
+}
+
+FUNCTION {output.bibitem}
+{
+ #0 'fa.isInLabel := %Initialize fa.isInLabel
+ newline$
+ fa.isPersianLanguage
+ { skip$ }
+ {
+ "\begin{LTRbibitems}" write$
+ newline$
+ "\resetlatinfont " write$
+ }
+ if$
+ newline$
+
+ "\bibitem[\protect\citeauthoryear{" write$
+ calc.label write$
+ sort.year write$
+ "}]{" write$
+
+ cite$ write$
+ "}" write$
+ newline$
+ ""
+ before.all 'output.state :=
+}
+
+FUNCTION {article}
+{ output.bibitem
+ format.authors
+ "author" output.check
+ author format.key output % added
+ output.year.check % added
+ new.block
+ format.title
+ "title" output.check
+ new.block
+ crossref missing$
+ { format.jour.vol output
+ }
+ { format.article.crossref output.nonnull
+ format.pages output
+ }
+ if$
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {book}
+{ output.bibitem
+ fa.isPersianLanguage
+ {
+ format.authors output.nonnull
+ output.year.check
+ new.block
+ format.btitle
+ "title" output.check
+ %format.edition output
+ new.block
+ format.translators output
+ format.editors "author and editor" output.check%output
+ }
+ {
+ author empty$
+ { format.editors
+ "author and editor" output.check }
+ { format.authors
+ output.nonnull
+ crossref missing$
+ { "author and editor" editor either.or.check }
+ 'skip$
+ if$
+ }
+ if$
+ output.year.check % added
+ new.block
+ format.btitle
+ "title" output.check
+ }
+ if$
+
+
+ crossref missing$
+ { format.bvolume output
+ new.block
+ format.number.series output
+ new.sentence
+ address output
+ publisher "publisher" output.check.colon
+ }
+ { new.block
+ format.book.crossref output.nonnull
+ }
+ if$
+
+
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {booklet}
+{ output.bibitem
+ format.authors output
+ author format.key output % added
+ output.year.check % added
+ new.block
+ format.title
+ "title" output.check
+
+ new.block
+ howpublished output
+ address output
+
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {inbook}
+{ output.bibitem
+ author empty$
+ { format.editors
+ "author and editor" output.check
+ }
+ { format.authors output.nonnull
+ crossref missing$
+ { "author and editor" editor either.or.check }
+ 'skip$
+ if$
+ }
+ if$
+ output.year.check % added
+ new.block
+ format.btitle
+ "title" output.check
+ crossref missing$
+ { format.bvolume output
+ format.chapter.pages
+ "chapter and pages" output.check
+ new.block
+ format.number.series output
+ new.sentence
+
+ address output
+ publisher
+ "publisher" output.check.colon
+ }
+ { format.chapter.pages "chapter and pages" output.check
+ new.block
+ format.book.crossref output.nonnull
+ }
+ if$
+
+
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {incollection}
+{ output.bibitem
+ format.authors
+ "author" output.check
+ author format.key output % added
+ output.year.check % added
+ new.block
+ format.title
+ "title" output.check
+ new.block
+ crossref missing$
+ { format.in.ed.booktitle
+ "booktitle" output.check
+ format.bvolume output
+ format.number.series output
+ format.chapter.pages output % gnp - was special.output.nonnull
+% left out comma before page numbers
+ new.sentence
+ address output
+ publisher "publisher" output.check.colon
+
+ }
+ { format.incoll.inproc.crossref
+ output.nonnull
+ format.chapter.pages output
+
+ }
+ if$
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {inproceedings}
+{ output.bibitem
+ format.authors
+ "author" output.check
+ author format.key output % added
+ output.year.check % added
+ new.block
+ format.title
+ "title" output.check
+ new.block
+ crossref missing$
+ { format.in.ed.booktitle
+ "booktitle" output.check
+ format.bvolume output
+ format.number.series output
+ address output
+ format.pages output
+ new.sentence
+ organization output
+ publisher output.colon
+ }
+ { format.incoll.inproc.crossref output.nonnull
+ format.pages output
+ }
+ if$
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {conference} { inproceedings }
+
+FUNCTION {manual}
+{ output.bibitem
+ author empty$
+ { editor empty$
+ { organization "organization" output.check
+ organization format.key output } % if all else fails, use key
+ { format.editors "author and editor" output.check }
+ if$
+ }
+ { format.authors output.nonnull }
+ if$
+ output.year.check % added
+ new.block
+ format.btitle
+ "title" output.check
+
+ organization address new.block.checkb
+
+% Reversed the order of "address" and "organization", added the ":".
+ address output
+ organization "organization" output.check.colon
+% address output
+% ":" output
+% organization output
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {mastersthesis}
+{ output.bibitem
+ format.authors
+ "author" output.check
+ author format.key output % added
+ output.year.check % added
+ new.block
+ format.title
+ "title" output.check
+ new.block
+ fa.isPersianLanguage
+ {" پایان‌نامه کارشناسی‌ارشد" format.thesis.type output.nonnull}
+ {" Master's thesis" format.thesis.type output.nonnull}
+ if$
+ school "school" output.check
+ address output
+
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {misc}
+{ output.bibitem
+ format.authors output
+ author format.key output % added
+ output.year.check % added
+ title howpublished new.block.checkb
+ format.title output
+
+ new.block
+ howpublished output
+
+ new.block
+ note output
+ fin.entry
+
+}
+
+FUNCTION {phdthesis}
+{ output.bibitem
+ format.authors
+ "author" output.check
+ author format.key output % added
+ output.year.check % added
+ new.block
+ format.btitle
+ "title" output.check
+ new.block
+ fa.isPersianLanguage
+ {" پایان‌نامه دکترا" format.thesis.type output.nonnull}
+ {" Ph.D. disseration " format.thesis.type output.nonnull}
+ if$
+ school "school" output.check
+ address output
+
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {proceedings}
+{ output.bibitem
+ editor empty$
+
+ { organization output
+ organization format.key output } % gnp - changed from author format.key
+ { format.editors output.nonnull }
+ if$
+% author format.key output % gnp - removed (should be either
+% editor or organization
+ output.year.check % added (newapa)
+ new.block
+ format.btitle
+ "title" output.check
+ format.bvolume output
+ format.number.series output
+ address output
+ new.sentence
+ organization output
+ publisher output.colon
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {techreport}
+{ output.bibitem
+ format.authors
+ "author" output.check
+ author format.key output % added
+ output.year.check % added
+ new.block
+ format.title
+ "title" output.check
+ new.block
+ format.tr.number output.nonnull
+ institution
+ "institution" output.check
+ address output
+
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {unpublished}
+{ output.bibitem
+ format.authors
+ "author" output.check
+ author format.key output % added
+ output.year.check % added
+ new.block
+ format.title
+ "title" output.check
+ new.block
+ note "note" output.check
+ fin.entry
+}
+
+FUNCTION {default.type} { misc }
+
+MACRO {jan} {"January"}
+
+MACRO {feb} {"February"}
+
+MACRO {mar} {"March"}
+
+MACRO {apr} {"April"}
+
+MACRO {may} {"May"}
+
+MACRO {jun} {"June"}
+
+MACRO {jul} {"July"}
+
+MACRO {aug} {"August"}
+
+MACRO {sep} {"September"}
+
+MACRO {oct} {"October"}
+
+MACRO {nov} {"November"}
+
+MACRO {dec} {"December"}
+
+MACRO {acmcs} {"ACM Computing Surveys"}
+
+MACRO {acta} {"Acta Informatica"}
+
+MACRO {ai} {"Artificial Intelligence"}
+
+MACRO {cacm} {"Communications of the ACM"}
+
+MACRO {ibmjrd} {"IBM Journal of Research and Development"}
+
+MACRO {ibmsj} {"IBM Systems Journal"}
+
+MACRO {ieeese} {"IEEE Transactions on Software Engineering"}
+
+MACRO {ieeetc} {"IEEE Transactions on Computers"}
+
+MACRO {ieeetcad}
+ {"IEEE Transactions on Computer-Aided Design of Integrated Circuits"}
+
+MACRO {ipl} {"Information Processing Letters"}
+
+MACRO {jacm} {"Journal of the ACM"}
+
+MACRO {jcss} {"Journal of Computer and System Sciences"}
+
+MACRO {scp} {"Science of Computer Programming"}
+
+MACRO {sicomp} {"SIAM Journal on Computing"}
+
+MACRO {tocs} {"ACM Transactions on Computer Systems"}
+
+MACRO {tods} {"ACM Transactions on Database Systems"}
+
+MACRO {tog} {"ACM Transactions on Graphics"}
+
+MACRO {toms} {"ACM Transactions on Mathematical Software"}
+
+MACRO {toois} {"ACM Transactions on Office Information Systems"}
+
+MACRO {toplas} {"ACM Transactions on Programming Languages and Systems"}
+
+MACRO {tcs} {"Theoretical Computer Science"}
+
+READ
+
+FUNCTION {sortify}
+
+
+
+{ purify$
+ "l" change.case$
+
+
+}
+
+INTEGERS { len }
+
+FUNCTION {chop.word}
+{ 's :=
+ 'len :=
+ s #1 len substring$ =
+ { s len #1 + global.max$ substring$ }
+ 's
+ if$
+}
+
+
+
+FUNCTION {sort.format.names}
+{ 's :=
+ #1 'nameptr :=
+ ""
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ { nameptr #1 >
+
+ { " " * }
+ 'skip$
+ if$
+ s nameptr "{vv{ } }{ll{ }}{ f{ }}{ jj{ }}" format.name$ 't :=
+ nameptr numnames = t "others" = and
+
+
+ { bbl.etal * }
+ { t sortify * }
+ if$
+
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+}
+
+FUNCTION {sort.format.title}
+{ 't :=
+ "A " #2
+ "An " #3
+ "The " #4 t chop.word
+ chop.word
+ chop.word
+ sortify
+ #1 global.max$ substring$
+}
+
+FUNCTION {author.sort}
+{ author empty$
+ { key empty$
+ { "to sort, need author or key in " cite$ * warning$
+
+
+ "" }
+ { key sortify }
+ if$
+ }
+ { author sort.format.names }
+ if$
+}
+
+
+
+FUNCTION {editor.sort}
+{ editor empty$
+ { key empty$
+ { "to sort, need editor or key in " cite$ * warning$
+
+ ""
+ }
+ { key sortify }
+ if$
+ }
+
+ { editor sort.format.names }
+ if$
+}
+
+FUNCTION {author.editor.sort}
+{ author empty$
+ { "missing author in " cite$ * warning$
+ editor empty$
+ { key empty$
+ { "to sort, need author, editor, or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { editor sort.format.names }
+ if$
+ }
+ { author sort.format.names }
+ if$
+}
+
+FUNCTION {author.organization.sort}
+%
+% added - GNP. Stack author or organization for sorting (from alpha.bst).
+% Unlike alpha.bst, we need entire names, not abbreviations
+%
+{ author empty$
+ { organization empty$
+ { key empty$
+ { "to sort, need author, organization, or key in " cite$ * warning$
+
+
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { organization sortify }
+ if$
+ }
+ { author sort.format.names }
+ if$
+}
+
+FUNCTION {editor.organization.sort}
+%
+% added - GNP. Stack editor or organization for sorting (from alpha.bst).
+% Unlike alpha.bst, we need entire names, not abbreviations
+%
+{ editor empty$
+ { organization empty$
+ { key empty$
+ { "to sort, need editor, organization, or key in " cite$ * warning$
+
+
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { organization sortify }
+ if$
+ }
+ { editor sort.format.names }
+ if$
+}
+
+FUNCTION {presort}
+
+%
+% Presort creates the bibentry's label via a call to calc.label, and then
+% sorts the entries based on entry type. Chicago.bst adds support for
+% including organizations as the sort key; the following is stolen from
+% alpha.bst.
+%
+{ calc.label sortify % recalculate bibitem label
+ year field.or.null purify$ #-1 #4 substring$ * % add year
+ " "
+ *
+ type$ "book" =
+ type$ "inbook" =
+ or
+ 'author.editor.sort
+ { type$ "proceedings" =
+ 'editor.organization.sort
+ { type$ "manual" =
+ 'author.organization.sort
+ 'author.sort
+ if$
+ }
+ if$
+ }
+ if$
+
+ #1 entry.max$ substring$ % added for newapa
+ 'sort.label := % added for newapa
+ sort.label % added for newapa
+ *
+ " "
+ *
+ title field.or.null
+ sort.format.title
+ *
+ #1 entry.max$ substring$
+ 'sort.key$ :=
+}
+
+ITERATE {presort}
+
+SORT % by label, year, author/editor, title
+
+STRINGS { last.label next.extra }
+
+
+INTEGERS { last.extra.num }
+
+FUNCTION {initialize.extra.label.stuff}
+{ #0 int.to.chr$ 'last.label :=
+ "" 'next.extra :=
+ #0 'last.extra.num :=
+}
+
+FUNCTION {forward.pass}
+%
+% Pass through all entries, comparing current entry to last one.
+% Need to concatenate year to the stack (done by calc.label) to determine
+% if two entries are the same (see presort)
+%
+{ last.label
+ calc.label year field.or.null purify$ #-1 #4 substring$ * % add year
+ #1 entry.max$ substring$ = % are they equal?
+ { last.extra.num #1 + 'last.extra.num :=
+ last.extra.num int.to.chr$ 'extra.label :=
+ }
+ { "a" chr.to.int$ 'last.extra.num :=
+ "" 'extra.label :=
+ calc.label year field.or.null purify$ #-1 #4 substring$ * % add year
+ #1 entry.max$ substring$ 'last.label := % assign to last.label
+ }
+ if$
+}
+
+FUNCTION {reverse.pass}
+{ next.extra "b" =
+ { "a" 'extra.label := }
+ 'skip$
+ if$
+ label.year extra.label * 'sort.year :=
+ extra.label 'next.extra :=
+}
+
+EXECUTE {initialize.extra.label.stuff}
+
+ITERATE {forward.pass}
+
+REVERSE {reverse.pass}
+
+FUNCTION {bib.sort.order}
+{ sort.label
+ " "
+ *
+ year field.or.null sortify
+ *
+ " "
+ *
+ title field.or.null
+ sort.format.title
+ *
+ #1 entry.max$ substring$
+ 'sort.key$ :=
+}
+
+ITERATE {bib.sort.order}
+
+SORT % by sort.label, year, title --- giving final bib. order.
+
+FUNCTION {begin.bib}
+{
+ "% Generated by chicago-fa.bst, version: " bst.file.version * " (" * bst.file.date * "), for XePersian" *
+ write$ newline$
+ "% Author: " bst.file.authors *
+ write$ newline$
+% "\providecommand{\noopsort}[1]{}"
+% write$ newline$
+ preamble$ empty$
+ 'skip$
+ { preamble$ write$ newline$ }
+ if$
+ "\begin{thebibliography}{}" write$ newline$
+}
+
+
+EXECUTE {begin.bib}
+
+EXECUTE {init.state.consts}
+
+ITERATE {call.type$}
+
+FUNCTION {end.bib}
+{ newline$
+ "\end{thebibliography}" write$ newline$
+}
+
+EXECUTE {end.bib}
+EXECUTE{completed.message}
diff --git a/biblio/bibtex/contrib/persian-bib/cp1256fa.csf b/biblio/bibtex/contrib/persian-bib/cp1256fa.csf
new file mode 100644
index 0000000000..56a9dce97a
--- /dev/null
+++ b/biblio/bibtex/contrib/persian-bib/cp1256fa.csf
@@ -0,0 +1,262 @@
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%%
+%% FILE: $RCSfile: cp1256fa.csf,v $
+%%
+%% Date: 2015/05/09
+%% Author:-) Mahmood Amintoosi, m.amintoosi@gmail.com
+%%
+%% CHARACTER SET: Farsi (Persian) (CP 1256)
+%%
+%% SORTING ORDER: Farsi
+%%
+%% WARNING
+%%
+%% This is a BibTeX Codepage and Sort definition file (CSF). It is
+%% used to define the 8-bit character set used by BibTeX and the
+%% order in which those characters should be sorted. The file
+%% format is documented below this header section.
+%%
+%% This file will only work with the 8-bit implementation of BibTeX
+%% written by Niel Kempson and Alejandro Aguilar-Sierra. It is
+%% available by anonymous FTP from these Comprehensive TeX Archive
+%% Network (CTAN) sites:
+%%
+%% http://mirror.ctan.org/biblio/bibtex/8-bit
+%%
+%% CHANGE LOG
+%%
+%% $Log: cp1256fa.csf,v $
+%% Initial Version 2009/12/17
+%%
+%% Version 0.9 2015/05/09
+%% Reorder همزه (Move Up), adding ة and separating آ from ا
+%% http://www.persianacademy.ir/UserFiles/File/D_Final.zip
+%%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%%
+%% FILE FORMAT
+%%
+%% The codepage and sorting order (CS) file defines how BibTeX will treat an
+%% 8-bit character set, specifically which characters are to be treated as
+%% letters, the upper/lower case relationships between characters, and the
+%% sorting order of characters.
+%%
+%% The CS file may contain a number of sections, each presented in the
+%% form of a TeX macro:
+%%
+%% \section-name{
+%% <section definitions>
+%% }
+%%
+%% Four sections are currently supported: \lowupcase, \lowercase, \uppercase
+%% and \order. The syntax of the four supported sections is summarised below.
+%%
+%% 8-bit characters may be entered naturally, but to avoid problems with
+%% character set translation or corruption, they can also be entered using
+%% the TeX-style portable notation for character codes, i.e. ^^XX, where XX
+%% is the hexadecimal value ofthe character code.
+%%
+%% Reading of the sections ends when the first '}' character is reached, so
+%% '}' can't be included in a section. You can't use ^^7d either.
+%%
+%% The percent sign ('%') is used to introduce a trailing comment - it and
+%% all remaining characters on a line are ignored. ^^25 has the same effect.
+%%
+%%
+%% \lowupcase section
+%%
+%% The \lowupcase section of the CS file is used to define the lower
+%% /upper and upper/lower case relationship of pairs of specified
+%% characters. It is only used if the relationship is symmetrical - use
+%% \lowercase or \upcase if it isn't.
+%%
+%% The syntax of the \lowupcase section is:
+%%
+%% \lowupcase{
+%% <LC-1> <UC-1> % Comment begins with a percent sign
+%% <LC-2> <UC-2>
+%% ...
+%% <LC-N> <UC-N>
+%% }
+%%
+%% Each <LC-n> <UC-n> pair of characters defines that the upper case
+%% equivalent of <LC-n> is <UC-n> *and* the lower case equivalent of
+%% <UC-n> is <LC-n>.
+%%
+%% You cannot redefine the lower or upper case equivalent of an ASCII
+%% character (code < 128), so all instances of <LC-n> and <UC-n>
+%% (i.e. both sides of the relationship) must have codes > 127.
+%%
+%%
+%% \lowercase section
+%%
+%% The \lowercase section of the CS file is used to define the lower case
+%% equivalent of specified characters. It should normally only be used
+%% if the relationship isn't symmetrical - use \lowupcase if it is.
+%%
+%% The syntax of the \lowercase section is:
+%%
+%% \lowercase{
+%% <UC-1> <LC-1> % Comment begins with a percent sign
+%% <UC-2> <LC-2>
+%% ...
+%% <UC-N> <LC-N>
+%% }
+%%
+%% Each <LC-n> <UC-n> pair of characters defines that the lower case
+%% equivalent of <UC-n> is <LC-n>.
+%%
+%% You cannot redefine the lower case equivalent of an ASCII character
+%% (code < 128), so all instances of <UC-n> (i.e. the left hand side
+%% of the relationship) must have codes > 127.
+%%
+%%
+%% \uppercase section
+%%
+%% The \uppercase section of the CS file is used to define the upper case
+%% equivalent of specified characters. It should normally only be used
+%% if the relationship isn't symmetrical - use \lowupcase if it is.
+%%
+%% The syntax of the \uppercase section is:
+%%
+%% \uppercase{
+%% <LC-1> <UC-1> % Comment begins with a percent sign
+%% <LC-2> <UC-2>
+%% ...
+%% <LC-N> <UC-N>
+%% }
+%%
+%% Each <LC-n> <UC-n> pair of characters defines that the upper case
+%% case equivalent of <LC-n> is <UC-n>.
+%%
+%% You cannot redefine the upper case equivalent of an ASCII character
+%% (code < 128), so all instances of <LC-n> (i.e. the left hand side
+%% of the relationship) must have codes > 127.
+%%
+%%
+%% \order section
+%%
+%% The \order section of the CS file is used to define the order in which
+%% characters are sorted.
+%%
+%% The syntax of the \order section is:
+%%
+%% \order{
+%% <char-1> % Comment begins with a percent sign
+%% <char-2> <char-3> % whitespace between the chars
+%% <char-4> - <char-5> % a hyphen between the chars
+%% <char-4> _ <char-5> % an underscore between the chars
+%% ...
+%% <char-n>
+%% }
+%%
+%% All characters on the same line are given the same sorting weight.
+%%
+%% The construct <char-1> <underscore> <char-2> is used to denote that
+%% all characters in the range <char-1> to <char-2> should be given the
+%% same sorting weight. For example, "A _ Z" would cause all ASCII
+%% upper case alphabetical characters to have the same sorting weight
+%% and would be equivalent to placing all 26 characters on the same line.
+%%
+%% The construct <char-1> <hyphen> <char-2> is used to denote that all
+%% characters in the range <char-1> to <char-2> should be given an
+%% ascending set of sorting weights, starting with <char-1> and ending
+%% with <char-2>. For example, "A - Z" would cause all upper case ASCII
+%% alphabetical characters to be sorted in ascending order and would be
+%% equivalent to placing 'A' on the first line, 'B' on the second,
+%% through to 'Z' on the 26th line.
+%%
+%% The characters at the beginning of the order section are given a lower
+%% sorting weight than characters occuring later. When sorting
+%% alphabetically, characters with the lowest weight come first.
+%%
+%% All characters not in the \order section (including ASCII characters)
+%% are given the same very high sorting weight to ensure that they come
+%% last when sorting alphabetically.
+%%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+
+
+%%
+%% CHARACTER SET
+%%
+
+
+
+%%
+%% SORTING ORDER
+%%
+%%
+\order{
+۰-۹
+ أ إ ؤ ئ ء
+ آ
+ ا
+ ب
+ پ
+ ت ة
+ ث
+ ج
+ چ
+ ح
+ خ
+ د
+ ذ
+ ر
+ ز
+ ژ
+ س
+ ش
+ ص
+ ض
+ ط
+ ظ
+ ع
+ غ
+ ف
+ ق
+ ک ك
+ گ
+ ل
+ م
+ ن
+ و
+ ه
+ ی ي
+ 0-9
+ A a
+ B b
+ C c
+ D d
+ E e
+ F f
+ G g
+ H h
+ I i
+ J j
+ K k
+ L l
+ M m
+ N n
+ O o
+ P p
+ Q q
+ R r
+ S s
+ T t
+ U u
+ V v
+ W w
+ X x
+ Y y
+ Z z
+ }
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% END OF FILE %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
diff --git a/biblio/bibtex/contrib/persian-bib/gen_pdf.pl b/biblio/bibtex/contrib/persian-bib/gen_pdf.pl
new file mode 100644
index 0000000000..5e2e56a944
--- /dev/null
+++ b/biblio/bibtex/contrib/persian-bib/gen_pdf.pl
@@ -0,0 +1,55 @@
+##########################################################
+# Author: Mahmood Amintoosi #
+# Date: 10 Feb 2011 #
+# Version: .10 #
+# Application: Produce pdf files of Persian-bib styles #
+##########################################################
+
+use File::Copy;
+
+open(INFILE,"bibtex-example.tex");
+
+@styleList = ("acm-fa","plain-fa","unsrt-fa","ieeetr-fa","asa-fa","chicago-fa","plainnat-fa");
+@natbibStyles = ("asa-fa","chicago-fa","plainnat-fa");
+
+@lines = <INFILE>;
+foreach $style (@styleList)
+{
+ $fileName = $style.".pdf";
+ $tmpFile = "tmp";
+ open(OUTFILE,">".$tmpFile.".tex");
+ print $fileName;
+ foreach $line(@lines)
+ {
+
+ $a = $line;
+ #Checking wether natbib package is required or not
+ $natbibRequired = 0;
+ foreach $natbibStyle(@natbibStyles)
+ {
+ if($style eq $natbibStyle)
+ {
+ $natbibRequired = 1;
+ #last;
+ }
+ }
+# print $natbibRequired;
+ if ($natbibRequired==1 && $a =~ /usepackage{xepersian}/)
+ {
+ print OUTFILE "\\usepackage{natbib}\n";
+ }
+ $a =~ s/acm-fa/$style/;
+ print OUTFILE $a;
+ }
+
+ close (OUTFILE);
+ system("xelatex",$tmpFile);
+ system("bibtex8","-W","-c","cp1256fa",$tmpFile);
+ system("xelatex",$tmpFile);
+ system("xelatex",$tmpFile);
+ copy($tmpFile.".pdf",$fileName) or die "Copy failed: $!";
+ unlink <tmp.*>;
+ #seek(INFILE,0,SEEK_SET);
+ }
+ close (INFILE);
+
diff --git a/biblio/bibtex/contrib/persian-bib/ieeetr-fa.bst b/biblio/bibtex/contrib/persian-bib/ieeetr-fa.bst
new file mode 100644
index 0000000000..bbb6efa18d
--- /dev/null
+++ b/biblio/bibtex/contrib/persian-bib/ieeetr-fa.bst
@@ -0,0 +1,1257 @@
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% Bib. style "ieeetr-fa", Persian (farsi) version of ieeetr.bst
+%%
+%% by: Mahmood Amintoosi and Mostafa Vahedi, m.amintoosi@gmail.com
+%% For XePersian, a Persian Typesetting Package in XeTeX
+%% It may be distributed and/or modified under the
+%% conditions of the LaTeX Project Public License (version 1.3c),
+%% either this version of this license or (at your option) any later version.
+%%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%%
+%% Original Copyright
+
+ENTRY
+ { address
+ author
+ booktitle
+ chapter
+ edition
+ editor
+ howpublished
+ institution
+ journal
+ key
+ language
+ month
+ note
+ number
+ organization
+ pages
+ publisher
+ school
+ series
+ title
+ translator
+ type
+ volume
+ year
+ }
+ {}
+ { label }
+
+INTEGERS { output.state before.all mid.sentence after.quote after.sentence
+after.quoted.block after.block }
+FUNCTION {is.print.banners.to.terminal} { #1 }
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% FILE VERSION AND BANNER %%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+FUNCTION{bst.file.version} { "0.9" }
+FUNCTION{bst.file.date} { "2015/05/09" }
+FUNCTION{bst.file.website} { "http://www.parsilatex.com" }
+FUNCTION{bst.file.authors} {"M.Amintoosi and M.Vahedi" }
+
+FUNCTION {banner.message}
+{ is.print.banners.to.terminal
+ { "-- ieeetr-fa.bst version" " " * bst.file.version *
+ " (" * bst.file.date * ") " * %"by " * bst.file.authors *
+ top$
+ "-- This is a BibTeX style for XePersian: " bst.file.website *
+ %top$
+ %"-- See the " quote$ * "Persian-bib-userguide.pdf" * quote$ * " manual for usage information." *
+ top$
+ }
+ { skip$ }
+ if$
+}
+
+FUNCTION {completed.message}
+{ is.print.banners.to.terminal
+ { ""
+ top$
+ "Done."
+ top$
+ }
+ { skip$ }
+ if$
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% Persian Functions %%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+FUNCTION {fa.isPersianLanguage}
+{
+ language missing$
+ {#0}
+ {language "l" change.case$ "persian" =}
+ if$
+}
+
+ % Here are the language-specific definitions for explicit words.
+ % Each function has a name bbl.xxx where xxx is the English word.
+ % The languages selected here is ENGLISH and Farsi
+FUNCTION {bbl.and}
+{
+ fa.isPersianLanguage
+ {" و "}
+ {" and "}
+ if$
+}
+
+FUNCTION {bbl.editors}
+{
+fa.isPersianLanguage
+ { " ویراستاران "}
+ {" eds. "}
+if$
+}
+
+FUNCTION {bbl.editor}
+{
+fa.isPersianLanguage
+ { " ویراستار "}
+ {" ed. " }
+if$
+}
+
+FUNCTION {bbl.edby}
+{
+fa.isPersianLanguage
+ { " ویراسته‌ی "}
+ { " edited by " }
+if$
+}
+
+FUNCTION {bbl.edition}
+{
+fa.isPersianLanguage
+ {" ویرایش "}
+ {" ed. " }
+if$
+}
+
+FUNCTION {bbl.volume}
+{
+fa.isPersianLanguage
+ {" جلد "}
+ { " vol."}
+if$
+}
+
+FUNCTION {bbl.of}
+{
+fa.isPersianLanguage
+ { " از "}
+ { " of " }
+if$
+}
+
+FUNCTION {bbl.number}
+{
+fa.isPersianLanguage
+ {" شماره " }
+ { " no." }
+if$
+}
+
+FUNCTION {bbl.nr}
+{
+fa.isPersianLanguage
+ {" شماره "}
+ { " no." }
+if$
+}
+
+FUNCTION {bbl.in}
+{
+fa.isPersianLanguage
+ {" در "}
+ { " in " }
+if$
+}
+
+FUNCTION {bbl.pages}
+{
+fa.isPersianLanguage
+ {" صفحات "}
+ { " pp." }
+if$
+}
+
+FUNCTION {bbl.page}
+{
+fa.isPersianLanguage
+ {" ص." }
+ { " p." }
+if$
+}
+
+FUNCTION {bbl.chapter}
+{
+fa.isPersianLanguage
+ { " فصل " }
+ {" chap." }
+if$
+}
+
+FUNCTION {bbl.techrep}
+{
+fa.isPersianLanguage
+ { " گزارش طرح تحقیقی"}
+ { " Tech. Rep." }
+if$
+}
+
+FUNCTION {bbl.mthesis}
+{
+fa.isPersianLanguage
+ {" پایان‌نامه کارشناسی‌ارشد"}
+ { " Master's thesis" }
+if$
+}
+
+FUNCTION {bbl.phdthesis}
+{
+fa.isPersianLanguage
+ {" پایان‌نامه دکترا" }
+ { " Ph.D. thesis" }
+if$
+}
+
+FUNCTION {bbl.etal}
+{
+ fa.isPersianLanguage
+ {" و دیگران"}
+ {" et~al."}
+ if$
+}
+
+FUNCTION {bbl.translator}
+{
+ fa.isPersianLanguage
+ {"ترجمه‌ی "}
+ {"Translator "}
+ if$
+}
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% End of Persian Functions %%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+FUNCTION {init.state.consts}
+{ #0 'before.all :=
+ #1 'mid.sentence :=
+ #2 'after.quote :=
+ #3 'after.sentence :=
+ #4 'after.quoted.block :=
+ #5 'after.block :=
+}
+
+STRINGS { s t }
+
+FUNCTION {output.nonnull}
+{ 's :=
+ output.state mid.sentence =
+ { ", " * write$ }
+ { output.state after.quote =
+{ " " * write$ }
+{ output.state after.block =
+ { add.period$ write$
+ newline$
+ "\newblock " write$
+ }
+ { output.state before.all =
+'write$
+{ output.state after.quoted.block =
+ { write$
+ newline$
+ "\newblock " write$
+ }
+ { add.period$ " " * write$ }
+ if$
+}
+ if$
+ }
+ if$
+}
+ if$
+ mid.sentence 'output.state :=
+ }
+ if$
+ s
+}
+
+FUNCTION {output}
+{ duplicate$ empty$
+ 'pop$
+ 'output.nonnull
+ if$
+}
+
+FUNCTION {output.check}
+{ 't :=
+ duplicate$ empty$
+ { pop$ "empty " t * " in " * cite$ * warning$ }
+ 'output.nonnull
+ if$
+}
+
+FUNCTION {output.bibitem}
+{
+ newline$
+ fa.isPersianLanguage
+ { skip$ }
+ {
+ "\begin{LTRbibitems}" write$
+ newline$
+ "\resetlatinfont " write$
+ }
+ if$
+ newline$
+ "\bibitem{" write$
+ cite$ write$
+ "}" write$
+ newline$
+ ""
+ before.all 'output.state :=
+}
+
+FUNCTION {blank.sep}
+{ after.quote 'output.state :=
+}
+
+FUNCTION {fin.entry}
+{ output.state after.quoted.block =
+ 'skip$
+ 'add.period$
+ if$
+ write$
+ newline$
+ fa.isPersianLanguage
+ {skip$}
+ { newline$
+ "\end{LTRbibitems}" write$
+ newline$
+ }
+ if$
+}
+
+FUNCTION {new.block}
+{ output.state before.all =
+ 'skip$
+ { output.state after.quote =
+{ after.quoted.block 'output.state := }
+{ after.block 'output.state := }
+ if$
+ }
+ if$
+}
+
+FUNCTION {new.sentence}
+{ output.state after.block =
+ 'skip$
+ { output.state before.all =
+'skip$
+{ after.sentence 'output.state := }
+ if$
+ }
+ if$
+}
+
+FUNCTION {not}
+{ { #0 }
+ { #1 }
+ if$
+}
+
+FUNCTION {and}
+{ 'skip$
+ { pop$ #0 }
+ if$
+}
+
+FUNCTION {or}
+{ { pop$ #1 }
+ 'skip$
+ if$
+}
+
+FUNCTION {new.block.checka}
+{ empty$
+ 'skip$
+ 'new.block
+ if$
+}
+
+FUNCTION {new.block.checkb}
+{ empty$
+ swap$ empty$
+ and
+ 'skip$
+ 'new.block
+ if$
+}
+
+FUNCTION {new.sentence.checka}
+{ empty$
+ 'skip$
+ 'new.sentence
+ if$
+}
+
+FUNCTION {field.or.null}
+{ duplicate$ empty$
+ { pop$ "" }
+ 'skip$
+ if$
+}
+
+FUNCTION {emphasize}
+{ duplicate$ empty$
+ { pop$ "" }
+ { "{\em " swap$ * "}" * }
+ if$
+}
+
+INTEGERS { nameptr namesleft numnames }
+
+FUNCTION {format.names}
+{ 's :=
+ #1 'nameptr :=
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ { %s nameptr "{f.~}{vv~}{ll}{, jj}" format.name$ 't :=
+ fa.isPersianLanguage
+ { s nameptr "{ff~}{vv~}{ll}{, jj}" format.name$ 't :=}
+ { s nameptr "{f.~}{vv~}{ll}{, jj}" format.name$ 't :=}
+ if$
+ nameptr #1 >
+{ namesleft #1 >
+ { ", " * t * }
+ { numnames #2 >
+{ "," * }
+'skip$
+ if$
+ t "others" =
+{ " {\em" * bbl.etal * "}" * }
+{ bbl.and * t * }
+ if$
+ }
+ if$
+}
+'t
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+}
+
+FUNCTION {format.authors}
+{ author empty$
+ { "" }
+ { author format.names }
+ if$
+}
+
+FUNCTION {format.editors}
+{ editor empty$
+ { "" }
+ { fa.isPersianLanguage
+ {
+editor num.names$ #1 >
+{bbl.editors editor format.names * }
+{bbl.editor editor format.names * }
+if$
+}
+{
+ editor format.names
+editor num.names$ #1 >
+{ ", " bbl.editors * *}
+{ ", " bbl.editor * *}
+if$
+}
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.translators}
+{ translator empty$
+ { "" }
+ { fa.isPersianLanguage
+ {
+bbl.translator translator format.names *
+}
+{
+ translator format.names
+", " bbl.translator * *
+}
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.title}
+{ title empty$
+ { "" }
+{ fa.isPersianLanguage
+ { "''" title * ",``" * }
+ { "``" title "t" change.case$ * ",''" * }
+ if$
+}
+ if$
+}
+
+FUNCTION {format.title.p}
+{ title empty$
+ { "" }
+{ fa.isPersianLanguage
+ { "''" title * ",``" * }
+ { "``" title "t" change.case$ * ",''" * }
+ if$
+}
+ if$
+}
+
+FUNCTION {n.dashify}
+{ 't :=
+ ""
+ { t empty$ not }
+ { t #1 #1 substring$ "-" =
+{ t #1 #2 substring$ "--" = not
+ { "--" *
+ t #2 global.max$ substring$ 't :=
+ }
+ { { t #1 #1 substring$ "-" = }
+{ "-" *
+ t #2 global.max$ substring$ 't :=
+}
+ while$
+ }
+ if$
+}
+{ t #1 #1 substring$ *
+ t #2 global.max$ substring$ 't :=
+}
+ if$
+ }
+ while$
+}
+
+FUNCTION {format.date}
+{ year empty$
+ { month empty$
+{ "" }
+{ "there's a month but no year in " cite$ * warning$
+ month
+}
+ if$
+ }
+ { month empty$
+'year
+{ month " " * year * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.btitle}
+{ title emphasize
+}
+
+FUNCTION {tie.or.space.connect}
+{ duplicate$ text.length$ #3 <
+ { "~" }
+ { " " }
+ if$
+ swap$ * *
+}
+
+FUNCTION {either.or.check}
+{ empty$
+ 'pop$
+ { "can't use both " swap$ * " fields in " * cite$ * warning$ }
+ if$
+}
+
+FUNCTION {format.bvolume}
+{ volume empty$
+ { "" }
+ { bbl.volume volume *
+ series empty$
+'skip$
+{ bbl.of * series emphasize * }
+ if$
+ "volume and number" number either.or.check
+ }
+ if$
+}
+
+FUNCTION {format.number.series}
+{ volume empty$
+ { number empty$
+{ series field.or.null }
+{ output.state mid.sentence =
+ { bbl.number }
+ { bbl.number "t" change.case$ }
+ if$
+ number tie.or.space.connect
+ series empty$
+ { "there's a number but no series in " cite$ * warning$ }
+ { bbl.in * series * }
+ if$
+}
+ if$
+ }
+ { "" }
+ if$
+}
+
+FUNCTION {format.edition}
+{ edition empty$
+ { "" }
+ { fa.isPersianLanguage
+ {
+ bbl.edition edition *
+}
+{
+ output.state mid.sentence =
+ { edition "l" change.case$ bbl.edition * }
+ { edition "t" change.case$ bbl.edition * }
+ if$
+}
+ if$
+ }
+ if$
+}
+
+INTEGERS { multiresult }
+
+FUNCTION {multi.page.check}
+{ 't :=
+ #0 'multiresult :=
+ { multiresult not
+ t empty$ not
+ and
+ }
+ { t #1 #1 substring$
+ duplicate$ "-" =
+ swap$ duplicate$ "," =
+ swap$ "+" =
+ or or
+{ #1 'multiresult := }
+{ t #2 global.max$ substring$ 't := }
+ if$
+ }
+ while$
+ multiresult
+}
+
+FUNCTION {format.pages}
+{ pages empty$
+ { "" }
+ { pages multi.page.check
+{ bbl.pages pages n.dashify * }
+{ bbl.page pages * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.volume}
+{ volume empty$
+ { "" }
+ { bbl.volume volume * }%M.Amintoosi "vol.~"
+ if$
+}
+
+FUNCTION {format.number}
+{ number empty$
+ { "" }
+ { bbl.number number * }%M.Amintoosi "no.~"
+ if$
+}
+
+FUNCTION {format.chapter.pages}
+{ chapter empty$
+ 'format.pages
+ { type empty$
+{ bbl.chapter }
+{ type "l" change.case$ }
+ if$
+ chapter tie.or.space.connect
+ pages empty$
+'skip$
+{ ", " * format.pages * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.in.ed.booktitle}
+{ booktitle empty$
+ { "" }
+ { bbl.in booktitle emphasize *
+ editor empty$
+ 'skip$
+ { " (" * format.editors * ")" * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.thesis.type}
+{ type empty$
+ 'skip$
+ { pop$
+ output.state after.block =
+{ type "t" change.case$ }
+{ type "l" change.case$ }
+ if$
+ }
+ if$
+}
+
+FUNCTION {empty.misc.check}
+{ author empty$ title empty$ howpublished empty$
+ month empty$ year empty$ note empty$
+ and and and and and
+ { "all relevant fields are empty in " cite$ * warning$ }
+ 'skip$
+ if$
+}
+
+FUNCTION {format.tr.number}
+{ type empty$
+ { bbl.techrep }
+ 'type
+ if$
+ number empty$
+ { "l" change.case$ }
+ { number tie.or.space.connect }
+ if$
+}
+
+FUNCTION {format.addr.pub}
+{ publisher empty$
+ { "" }
+ { address empty$
+{ "" }
+{ address ": " * }
+ if$
+ publisher *
+ }
+ if$
+}
+
+FUNCTION {format.paddress}
+{ address empty$
+ { "" }
+ { "(" address * ")" * }
+ if$
+}
+
+FUNCTION {format.article.crossref}
+{ key empty$
+ { journal empty$
+{ "need key or journal for " cite$ * " to crossref " * crossref *
+ warning$
+ ""
+}
+{ bbl.in "{\em " * journal * "\/}" * }
+ if$
+ }
+ { bbl.in key * }
+ if$
+ " \cite{" * crossref * "}" *
+}
+
+FUNCTION {format.crossref.editor}
+{ editor #1 "{vv~}{ll}" format.name$
+ editor num.names$ duplicate$
+ #2 >
+ { pop$ " {\em" * bbl.etal * "}" * }
+ { #2 <
+'skip$
+{ editor #2 "{ff }{vv }{ll}{ jj}" format.name$ "others" =
+ { " {\em" bbl.etal * "}" * }
+ { bbl.and * editor #2 "{vv~}{ll}" format.name$ * }
+ if$
+}
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.book.crossref}
+{ volume empty$
+ { "empty volume in " cite$ * "'s crossref of " * crossref * warning$
+ bbl.in
+ }
+ { bbl.volume volume tie.or.space.connect
+ bbl.of *
+ }
+ if$
+ editor empty$
+ editor field.or.null author field.or.null =
+ or
+ { key empty$
+{ series empty$
+ { "need editor, key, or series for " cite$ * " to crossref " *
+ crossref * warning$
+ "" *
+ }
+ { "{\em " * series * "\/}" * }
+ if$
+}
+{ key * }
+ if$
+ }
+ { format.crossref.editor * }
+ if$
+ " \cite{" * crossref * "}" *
+}
+
+FUNCTION {format.incoll.inproc.crossref}
+{ editor empty$
+ editor field.or.null author field.or.null =
+ or
+ { key empty$
+{ booktitle empty$
+ { "need editor, key, or booktitle for " cite$ * " to crossref " *
+ crossref * warning$
+ ""
+ }
+ { bbl.in "{\em " * booktitle * "\/}" * }
+ if$
+}
+{ bbl.in key * }
+ if$
+ }
+ { bbl.in format.crossref.editor * }
+ if$
+ " \cite{" * crossref * "}" *
+}
+
+FUNCTION {article}
+{ output.bibitem
+ format.authors "author" output.check
+ format.title "title" output.check
+ blank.sep
+ crossref missing$
+ { journal emphasize "journal" output.check
+ format.volume output
+ month empty$
+{ format.number output }
+'skip$
+ if$
+ format.pages output
+ format.date "year" output.check
+ }
+ { format.article.crossref output.nonnull
+ format.pages output
+ }
+ if$
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {book}
+{ output.bibitem
+ fa.isPersianLanguage
+ {
+format.authors output
+ new.block
+ format.btitle "title" output.check
+new.block
+ format.translators output
+format.editors output
+ }
+ { author empty$
+ { format.editors "author and editor" output.check }
+ { format.authors output.nonnull
+ crossref missing$
+ { "author and editor" editor either.or.check }
+ 'skip$
+ if$
+ }
+ if$
+ new.block
+ format.btitle "title" output.check
+ }
+ if$
+ crossref missing$
+ { format.bvolume output
+ new.block
+ format.number.series output
+ format.addr.pub "publisher" output.check
+ }
+ { new.block
+ format.book.crossref output.nonnull
+ }
+ if$
+ format.edition output
+ format.date "year" output.check
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {booklet}
+{ output.bibitem
+ format.authors output
+ title empty$
+ { "empty title in " cite$ * warning$
+ howpublished new.sentence.checka
+ }
+ { howpublished empty$ not
+ address empty$ month empty$ year empty$ and and
+ or
+{ format.title.p output.nonnull }
+{ format.title output.nonnull }
+ if$
+ blank.sep
+ }
+ if$
+ howpublished output
+ address output
+ format.date output
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {inbook}
+{ output.bibitem
+ author empty$
+ { format.editors "author and editor" output.check }
+ { format.authors output.nonnull
+ crossref missing$
+{ "author and editor" editor either.or.check }
+'skip$
+ if$
+ }
+ if$
+ format.btitle "title" output.check
+ crossref missing$
+ { format.bvolume output
+ format.chapter.pages "chapter and pages" output.check
+ new.block
+ format.number.series output
+ format.addr.pub "publisher" output.check
+ }
+ { format.chapter.pages "chapter and pages" output.check
+ new.block
+ format.book.crossref output.nonnull
+ }
+ if$
+ format.edition output
+ format.date "year" output.check
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {incollection}
+{ output.bibitem
+ format.authors "author" output.check
+ format.title "title" output.check
+ blank.sep
+ crossref missing$
+ { format.in.ed.booktitle "booktitle" output.check
+ format.bvolume output
+ format.number.series output
+ format.chapter.pages output
+ format.addr.pub "publisher" output.check
+ format.edition output
+ format.date "year" output.check
+ }
+ { format.incoll.inproc.crossref output.nonnull
+ format.chapter.pages output
+ }
+ if$
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {inproceedings}
+{ output.bibitem
+ format.authors "author" output.check
+ format.title "title" output.check
+ blank.sep
+ crossref missing$
+ { format.in.ed.booktitle "booktitle" output.check
+ format.bvolume output
+ format.number.series output
+ format.paddress output
+ format.pages output
+ organization output
+ publisher output
+ format.date "year" output.check
+ }
+ { format.incoll.inproc.crossref output.nonnull
+ format.pages output
+ }
+ if$
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {conference} { inproceedings }
+
+FUNCTION {manual}
+{ output.bibitem
+ author empty$
+ { organization empty$
+'skip$
+{ organization output.nonnull
+ address output
+}
+ if$
+ }
+ { format.authors output.nonnull }
+ if$
+ format.btitle "title" output.check
+ author empty$
+ { organization empty$
+{ address new.block.checka
+ address output
+}
+'skip$
+ if$
+ }
+ { organization address new.block.checkb
+ organization output
+ address output
+ }
+ if$
+ format.edition output
+ format.date output
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {mastersthesis}
+{ output.bibitem
+ format.authors "author" output.check
+ format.title "title" output.check
+ blank.sep
+ bbl.mthesis format.thesis.type output.nonnull
+ school "school" output.check
+ address output
+ format.date "year" output.check
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {misc}
+{ output.bibitem
+ format.authors output
+ title empty$
+ { howpublished new.sentence.checka }
+ { howpublished empty$ not
+ month empty$ year empty$ and
+ or
+{ format.title.p output.nonnull }
+{ format.title output.nonnull }
+ if$
+ blank.sep
+ }
+ if$
+ howpublished output
+ format.date output
+ new.block
+ note output
+ fin.entry
+ empty.misc.check
+}
+
+FUNCTION {phdthesis}
+{ output.bibitem
+ format.authors "author" output.check
+ format.btitle "title" output.check
+ new.block
+ bbl.phdthesis format.thesis.type output.nonnull
+ school "school" output.check
+ address output
+ format.date "year" output.check
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {proceedings}
+{ output.bibitem
+ editor empty$
+ { organization output }
+ { format.editors output.nonnull }
+ if$
+ format.btitle "title" output.check
+ format.bvolume output
+ format.number.series output
+ format.paddress output
+ editor empty$
+ 'skip$
+ { organization output }
+ if$
+ publisher output
+ format.date "year" output.check
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {techreport}
+{ output.bibitem
+ format.authors "author" output.check
+ format.title "title" output.check
+ blank.sep
+ format.tr.number output.nonnull
+ institution "institution" output.check
+ address output
+ format.date "year" output.check
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {unpublished}
+{ output.bibitem
+ format.authors "author" output.check
+ format.title.p "title" output.check
+ blank.sep
+ note "note" output.check
+ format.date output
+ fin.entry
+}
+
+FUNCTION {default.type} { misc }
+
+MACRO {jan} {"Jan."}
+
+MACRO {feb} {"Feb."}
+
+MACRO {mar} {"Mar."}
+
+MACRO {apr} {"Apr."}
+
+MACRO {may} {"May"}
+
+MACRO {jun} {"June"}
+
+MACRO {jul} {"July"}
+
+MACRO {aug} {"Aug."}
+
+MACRO {sep} {"Sept."}
+
+MACRO {oct} {"Oct."}
+
+MACRO {nov} {"Nov."}
+
+MACRO {dec} {"Dec."}
+
+MACRO {acmcs} {"ACM Computing Surveys"}
+
+MACRO {acta} {"Acta Informatica"}
+
+MACRO {cacm} {"Communications ACM"}
+
+MACRO {ibmjrd} {"IBM J. Research and Development"}
+
+MACRO {ibmsj} {"IBM Systems~J."}
+
+MACRO {ieeese} {"IEEE Trans. Software Engineering"}
+
+MACRO {ieeetc} {"IEEE Trans. Computers"}
+
+MACRO {ieeetcad}
+ {"IEEE Trans. Computer-Aided Design"}
+
+MACRO {ipl} {"Information Processing Letters"}
+
+MACRO {jacm} {"J.~ACM"}
+
+MACRO {jcss} {"J.~Computer and System Sciences"}
+
+MACRO {scp} {"Science of Computer Programming"}
+
+MACRO {sicomp} {"SIAM J. Computing"}
+
+MACRO {tocs} {"ACM Trans. Computer Systems"}
+
+MACRO {tods} {"ACM Trans. Database Systems"}
+
+MACRO {tog} {"ACM Trans. Graphics"}
+
+MACRO {toms} {"ACM Trans. Mathematical Software"}
+
+MACRO {toois} {"ACM Trans. Office Information Systems"}
+
+MACRO {toplas} {"ACM Trans. Programming Languages and Systems"}
+
+MACRO {tcs} {"Theoretical Computer Science"}
+
+READ
+
+STRINGS { longest.label }
+
+INTEGERS { number.label longest.label.width }
+
+FUNCTION {initialize.longest.label}
+{ "" 'longest.label :=
+ #1 'number.label :=
+ #0 'longest.label.width :=
+}
+
+FUNCTION {longest.label.pass}
+{ number.label int.to.str$ 'label :=
+ number.label #1 + 'number.label :=
+ label width$ longest.label.width >
+ { label 'longest.label :=
+ label width$ 'longest.label.width :=
+ }
+ 'skip$
+ if$
+}
+
+EXECUTE {banner.message}
+EXECUTE {initialize.longest.label}
+
+ITERATE {longest.label.pass}
+FUNCTION {begin.bib}
+{
+ "% Generated by ieeetr-fa.bst, version: " bst.file.version * " (" * bst.file.date * "), for XePersian Package" *
+ write$ newline$
+ "% Authors: " bst.file.authors *
+ write$ newline$
+ "\providecommand{\noopsort}[1]{}"
+ write$ newline$
+ preamble$ empty$
+ 'skip$
+ { preamble$ write$ newline$ }
+ if$
+ "\begin{thebibliography}{" longest.label * "}" * write$ newline$
+}
+
+EXECUTE {begin.bib}
+
+EXECUTE {init.state.consts}
+
+ITERATE {call.type$}
+
+FUNCTION {end.bib}
+{ newline$
+ "\end{thebibliography}" write$ newline$
+}
+
+EXECUTE {end.bib}
+EXECUTE{completed.message}
diff --git a/biblio/bibtex/contrib/persian-bib/plain-fa-inLTR-beamer.bst b/biblio/bibtex/contrib/persian-bib/plain-fa-inLTR-beamer.bst
new file mode 100644
index 0000000000..51c9e42cb6
--- /dev/null
+++ b/biblio/bibtex/contrib/persian-bib/plain-fa-inLTR-beamer.bst
@@ -0,0 +1,1404 @@
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% Bib. style "plain-fa-inLTR-beamer", Persian (farsi) version of plain.bst
+%%
+%% by: Mahmood Amintoosi, m.amintoosi@gmail.com, www.parsilatex.com
+%% For XePersian, a Persian Typesetting Package in XeTeX
+%% It may be distributed and/or modified under the
+%% conditions of the LaTeX Project Public License (version 1.3c),
+%% either this version of this license or (at your option) any later version.
+%%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%%
+%% Original Copyright
+
+ENTRY
+ { address
+ author
+ booktitle
+ chapter
+ edition
+ editor
+ howpublished
+ institution
+ journal
+ key
+ language
+ month
+ note
+ number
+ organization
+ pages
+ publisher
+ school
+ series
+ title
+ translator
+ type
+ volume
+ year
+ }
+ {}
+ { label }
+
+INTEGERS { output.state before.all mid.sentence after.sentence after.block }
+FUNCTION {is.print.banners.to.terminal} { #1 }
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% FILE VERSION AND BANNER %%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+FUNCTION{bst.file.version} { "0.9" }
+FUNCTION{bst.file.date} { "2015/05/09" }
+FUNCTION{bst.file.website} { "http://www.parsilatex.com" }
+FUNCTION{bst.file.authors} {"M.Amintoosi" }
+
+FUNCTION {banner.message}
+{ is.print.banners.to.terminal
+ { "-- plain-fa-inLTR-beamer.bst version" " " * bst.file.version *
+ " (" * bst.file.date * ") " * %"by " * bst.file.authors *
+ top$
+ "-- This is a BibTeX style for XePersian: " bst.file.website *
+ %top$
+ %"-- See the " quote$ * "Persian-bib-userguide.pdf" * quote$ * " manual for usage information." *
+ top$
+ }
+ { skip$ }
+ if$
+}
+
+FUNCTION {completed.message}
+{ is.print.banners.to.terminal
+ { ""
+ top$
+ "Done."
+ top$
+ }
+ { skip$ }
+ if$
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% Persian Functions %%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+FUNCTION {fa.isPersianLanguage}
+{
+ language missing$
+ {#0}
+ {language "l" change.case$ "persian" =}
+ if$
+}
+
+ % Here are the language-specific definitions for explicit words.
+ % Each function has a name bbl.xxx where xxx is the English word.
+ % The languages selected here is ENGLISH and Farsi
+FUNCTION {bbl.and}
+{
+ fa.isPersianLanguage
+ {" و "}
+ {" and "}
+ if$
+}
+
+FUNCTION {bbl.editors}
+{
+fa.isPersianLanguage
+ { " ویراستاران "}
+ {" editors"}
+if$
+}
+
+FUNCTION {bbl.editor}
+{
+fa.isPersianLanguage
+ { " ویراستار "}
+ {" editor" }
+if$
+}
+
+FUNCTION {bbl.edby}
+{
+fa.isPersianLanguage
+ { " ویراسته‌ی "}
+ { " edited by " }
+if$
+}
+
+FUNCTION {bbl.edition}
+{
+fa.isPersianLanguage
+ {" ویرایش "}
+ {" edition" }
+if$
+}
+
+FUNCTION {bbl.bvolume}
+{
+fa.isPersianLanguage
+ {" جلد "}
+ { "volume"}
+if$
+}
+
+FUNCTION {bbl.volume}
+{
+fa.isPersianLanguage
+ {" جلد "}
+ { "Volume"}
+if$
+}
+
+FUNCTION {bbl.of}
+{
+fa.isPersianLanguage
+ { " از "}
+ { " of " }
+if$
+}
+
+FUNCTION {bbl.number}
+{
+fa.isPersianLanguage
+ {" شماره " }
+ { "number" }
+if$
+}
+
+FUNCTION {bbl.in}
+{
+fa.isPersianLanguage
+ {" در "}
+ { "In " }
+if$
+}
+
+FUNCTION {bbl.inInMid}
+{
+fa.isPersianLanguage
+ {" در "}
+ { " in " }
+if$
+}
+
+FUNCTION {bbl.pages}
+{
+fa.isPersianLanguage
+ {" صفحات "}
+ { "pages" }
+if$
+}
+
+FUNCTION {bbl.page}
+{
+fa.isPersianLanguage
+ {" صفحه " }
+ { "page" }
+if$
+}
+
+FUNCTION {bbl.chapter}
+{
+fa.isPersianLanguage
+ { " فصل " }
+ {"chapter" }
+if$
+}
+
+FUNCTION {bbl.techrep}
+{
+fa.isPersianLanguage
+ { " گزارش طرح تحقیقی"}
+ { "Technical Report" }
+if$
+}
+
+FUNCTION {bbl.mthesis}
+{
+fa.isPersianLanguage
+ {" پایان‌نامه کارشناسی‌ارشد"}
+ { " Master's thesis" }
+if$
+}
+
+FUNCTION {bbl.phdthesis}
+{
+fa.isPersianLanguage
+ {" پایان‌نامه دکترا" }
+ { "PhD thesis" }
+if$
+}
+
+FUNCTION {bbl.etal}
+{
+ fa.isPersianLanguage
+ {" و دیگران"}
+ {" et~al."}
+ if$
+}
+
+FUNCTION {bbl.translator}
+{
+ fa.isPersianLanguage
+ {"ترجمه‌ی "}
+ {"Translator "}
+ if$
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% End of Persian Functions %%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+FUNCTION {init.state.consts}
+{ #0 'before.all :=
+ #1 'mid.sentence :=
+ #2 'after.sentence :=
+ #3 'after.block :=
+}
+
+STRINGS { s t }
+
+FUNCTION {output.nonnull}
+{ 's :=
+ output.state mid.sentence =
+ { ", " * write$ }
+ { output.state after.block =
+{ add.period$ write$
+ newline$
+ fa.isPersianLanguage
+ {"\newRAblock {}" write$ }
+ {"\newblock " write$}
+ if$
+}
+{ output.state before.all =
+ 'write$
+ { add.period$ " " * write$ }
+ if$
+}
+ if$
+ mid.sentence 'output.state :=
+ }
+ if$
+ s
+}
+
+FUNCTION {output}
+{ duplicate$ empty$
+ 'pop$
+ 'output.nonnull
+ if$
+}
+
+FUNCTION {output.check}
+{ 't :=
+ duplicate$ empty$
+ { pop$ "empty " t * " in " * cite$ * warning$ }
+ 'output.nonnull
+ if$
+}
+
+FUNCTION {output.bibitem}
+{
+ newline$
+ fa.isPersianLanguage
+ {
+ "\begin{RTLbibitems}" write$
+ newline$
+ }
+ { skip$ }
+ if$
+ newline$
+ "\bibitem{" write$
+ cite$ write$
+ "}" write$
+ newline$
+ fa.isPersianLanguage
+ {
+ "\Persiantext{" write$
+ newline$
+ }
+ {
+ skip$
+ }
+ if$
+ ""
+ before.all 'output.state :=
+}
+
+FUNCTION {fin.entry}
+{ add.period$
+ write$
+ newline$
+ fa.isPersianLanguage
+ {
+ "}" write$
+ newline$
+ newline$
+ "\end{RTLbibitems}" write$
+ newline$
+ }
+ {skip$}
+ if$
+}
+
+FUNCTION {new.block}
+{ output.state before.all =
+ 'skip$
+ { after.block 'output.state := }
+ if$
+}
+
+FUNCTION {new.sentence}
+{ output.state after.block =
+ 'skip$
+ { output.state before.all =
+'skip$
+{ after.sentence 'output.state := }
+ if$
+ }
+ if$
+}
+
+FUNCTION {not}
+{ { #0 }
+ { #1 }
+ if$
+}
+
+FUNCTION {and}
+{ 'skip$
+ { pop$ #0 }
+ if$
+}
+
+FUNCTION {or}
+{ { pop$ #1 }
+ 'skip$
+ if$
+}
+
+FUNCTION {new.block.checka}
+{ empty$
+ 'skip$
+ 'new.block
+ if$
+}
+
+FUNCTION {new.block.checkb}
+{ empty$
+ swap$ empty$
+ and
+ 'skip$
+ 'new.block
+ if$
+}
+
+FUNCTION {new.sentence.checka}
+{ empty$
+ 'skip$
+ 'new.sentence
+ if$
+}
+
+FUNCTION {new.sentence.checkb}
+{ empty$
+ swap$ empty$
+ and
+ 'skip$
+ 'new.sentence
+ if$
+}
+
+FUNCTION {field.or.null}
+{ duplicate$ empty$
+ { pop$ "" }
+ 'skip$
+ if$
+}
+
+FUNCTION {emphasize}
+{ duplicate$ empty$
+ { pop$ "" }
+ { "{\em " swap$ * "}" * }
+ if$
+}
+
+INTEGERS { nameptr namesleft numnames }
+
+FUNCTION {format.names}
+{ 's :=
+ #1 'nameptr :=
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ {
+ s nameptr "{vv~}{ll}{, jj}{, ff}" format.name$ 't := %{ff~}{vv~}{ll}{, jj}
+ %fa.isPersianLanguage
+ % {s nameptr "{vv~}{ll}{, jj}{, ff}" format.name$ 't := %{ff~}{vv~}{ll}{, jj}
+ % }
+ % {s nameptr "{vv~}{ll}{, jj}{, f.}" format.name$ 't :=
+ %if$
+ nameptr #1 >
+{ namesleft #1 >
+ { ", " * t * }
+ { numnames #2 >
+ { "," * }
+ 'skip$
+ if$
+ t "others" =
+ { bbl.etal * }
+ { bbl.and * t * }
+ if$
+ }
+ if$
+}
+'t
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+}
+
+FUNCTION {format.authors}
+{ author empty$
+ { "" }
+ { author format.names }
+ if$
+}
+
+FUNCTION {format.editors}
+{ editor empty$
+ { "" }
+ { fa.isPersianLanguage
+ {
+editor num.names$ #1 >
+{bbl.editors editor format.names * }
+{bbl.editor editor format.names * }
+if$
+}
+{
+ editor format.names
+editor num.names$ #1 >
+{ ", " bbl.editors * *}
+{ ", " bbl.editor * *}
+if$
+}
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.translators}
+{ translator empty$
+ { "" }
+ { fa.isPersianLanguage
+ {
+bbl.translator translator format.names *
+}
+{
+ translator format.names
+", " bbl.translator * *
+}
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.title}
+{ title empty$
+ { "" }
+ { title "t" change.case$ }
+ if$
+}
+
+FUNCTION {n.dashify}
+{ 't :=
+ ""
+ { t empty$ not }
+ { t #1 #1 substring$ "-" =
+{ t #1 #2 substring$ "--" = not
+ { "--" *
+ t #2 global.max$ substring$ 't :=
+ }
+ { { t #1 #1 substring$ "-" = }
+{ "-" *
+ t #2 global.max$ substring$ 't :=
+}
+ while$
+ }
+ if$
+}
+{ t #1 #1 substring$ *
+ t #2 global.max$ substring$ 't :=
+}
+ if$
+ }
+ while$
+}
+
+FUNCTION {format.date}
+{ year empty$
+ { month empty$
+{ "" }
+{ "there's a month but no year in " cite$ * warning$
+ month
+}
+ if$
+ }
+ { month empty$
+'year
+{ month " " * year * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.btitle}
+{ title emphasize
+}
+
+FUNCTION {tie.or.space.connect}
+{ duplicate$ text.length$ #3 <
+ { "~" }
+ { " " }
+ if$
+ swap$ * *
+}
+
+FUNCTION {either.or.check}
+{ empty$
+ 'pop$
+ { "can't use both " swap$ * " fields in " * cite$ * warning$ }
+ if$
+}
+
+FUNCTION {format.bvolume}
+{ volume empty$
+ { "" }
+ { bbl.bvolume volume tie.or.space.connect
+ series empty$
+'skip$
+{ bbl.of * series emphasize * }
+ if$
+ "volume and number" number either.or.check
+ }
+ if$
+}
+
+FUNCTION {format.number.series}
+{ volume empty$
+ { number empty$
+{ series field.or.null }
+{ output.state mid.sentence =
+ { bbl.number }
+ { bbl.number "t" change.case$ }
+ if$
+ number tie.or.space.connect
+ series empty$
+ { "there's a number but no series in " cite$ * warning$ }
+ { bbl.inInMid * series * }
+ if$
+}
+ if$
+ }
+ { "" }
+ if$
+}
+
+FUNCTION {format.edition}
+{ edition empty$
+ { "" }
+ { fa.isPersianLanguage
+ {
+ bbl.edition edition *
+}
+{
+ output.state mid.sentence =
+ { edition "l" change.case$ bbl.edition * }
+ { edition "t" change.case$ bbl.edition * }
+ if$
+}
+ if$
+ }
+ if$
+}
+
+INTEGERS { multiresult }
+
+FUNCTION {multi.page.check}
+{ 't :=
+ #0 'multiresult :=
+ { multiresult not
+ t empty$ not
+ and
+ }
+ { t #1 #1 substring$
+ duplicate$ "-" =
+ swap$ duplicate$ "," =
+ swap$ "+" =
+ or or
+{ #1 'multiresult := }
+{ t #2 global.max$ substring$ 't := }
+ if$
+ }
+ while$
+ multiresult
+}
+
+FUNCTION {format.pages}
+{ pages empty$
+ { "" }
+ { pages multi.page.check
+ { bbl.pages pages n.dashify tie.or.space.connect }
+ { bbl.page pages tie.or.space.connect }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.vol.num.pages}
+{ volume field.or.null
+ number empty$
+ 'skip$
+ { "(" number * ")" * *
+ volume empty$
+{ "there's a number but no volume in " cite$ * warning$ }
+'skip$
+ if$
+ }
+ if$
+ pages empty$
+ 'skip$
+ { duplicate$ empty$
+{ pop$ format.pages }
+{ ":" * pages n.dashify * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.chapter.pages}
+{ chapter empty$
+ 'format.pages
+ { type empty$
+{ bbl.chapter }
+{ type "l" change.case$ }
+ if$
+ chapter tie.or.space.connect
+ pages empty$
+'skip$
+{ ", " * format.pages * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.in.ed.booktitle}
+{
+ booktitle empty$
+ { "" }
+ { editor empty$
+ { bbl.in booktitle emphasize * }
+ { bbl.in format.editors * ", " * booktitle emphasize * }
+ if$
+}
+ if$
+}
+
+FUNCTION {empty.misc.check}
+{ author empty$ title empty$ howpublished empty$
+ month empty$ year empty$ note empty$
+ and and and and and
+ key empty$ not and
+ { "all relevant fields are empty in " cite$ * warning$ }
+ 'skip$
+ if$
+}
+
+FUNCTION {format.thesis.type}
+{ type empty$
+ 'skip$
+ { pop$
+ type "t" change.case$
+ }
+ if$
+}
+
+FUNCTION {format.tr.number}
+{ type empty$
+ { bbl.techrep }
+ 'type
+ if$
+ number empty$
+ { "t" change.case$ }
+ { number tie.or.space.connect }
+ if$
+}
+
+FUNCTION {format.article.crossref}
+{ key empty$
+ { journal empty$
+{ "need key or journal for " cite$ * " to crossref " * crossref *
+ warning$
+ ""
+}
+{ bbl.in "{\em " * journal * "\/}" * }
+ if$
+ }
+ { bbl.in key * }
+ if$
+ " \cite{" * crossref * "}" *
+}
+
+FUNCTION {format.crossref.editor}
+{ editor #1 "{vv~}{ll}" format.name$
+ editor num.names$ duplicate$ #2 >
+ { pop$ bbl.etal * }
+ { #2 < 'skip$
+ { editor #2 "{ff }{vv }{ll}{ jj}" format.name$ "others" =%"{ff }{vv }{ll}{ jj}"
+ { bbl.etal * }
+ { bbl.and * editor #2 "{vv~}{ll}" format.name$ * }
+ if$
+ }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.book.crossref}
+{ volume empty$
+ { "empty volume in " cite$ * "'s crossref of " * crossref * warning$
+ bbl.in
+ }
+ { bbl.volume volume tie.or.space.connect
+ bbl.of *
+ }
+ if$
+ editor empty$
+ editor field.or.null author field.or.null =
+ or
+ { key empty$
+{ series empty$
+ { "need editor, key, or series for " cite$ * " to crossref " *
+ crossref * warning$
+ "" *
+ }
+ { "{\em " * series * "\/}" * }
+ if$
+}
+{ key * }
+ if$
+ }
+ { format.crossref.editor * }
+ if$
+ " \cite{" * crossref * "}" *
+}
+
+FUNCTION {format.incoll.inproc.crossref}
+{ editor empty$
+ editor field.or.null author field.or.null =
+ or
+ { key empty$
+{ booktitle empty$
+ { "need editor, key, or booktitle for " cite$ * " to crossref " *
+ crossref * warning$
+ ""
+ }
+ { bbl.in " {\em " * booktitle * "\/}" * }
+ if$
+}
+{ bbl.in key * }
+ if$
+ }
+ { bbl.in format.crossref.editor * }
+ if$
+ " \cite{" * crossref * "}" *
+}
+
+FUNCTION {article}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.title "title" output.check
+ new.block
+ crossref missing$
+ { journal emphasize "journal" output.check
+ format.vol.num.pages output
+ format.date "year" output.check
+ }
+ { format.article.crossref output.nonnull
+ format.pages output
+ }
+ if$
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {book}
+{ output.bibitem
+ fa.isPersianLanguage
+ {
+format.authors output
+ new.block
+ format.btitle "title" output.check
+new.block
+ format.translators output
+format.editors output
+ }
+ { author empty$
+ { format.editors "author and editor" output.check }
+ { format.authors output.nonnull
+ crossref missing$
+ { "author and editor" editor either.or.check }
+ 'skip$
+ if$
+ }
+ if$
+ new.block
+ format.btitle "title" output.check
+ }
+ if$
+ crossref missing$
+ { format.bvolume output
+ new.block
+ format.number.series output
+ new.sentence
+ publisher "publisher" output.check
+ address output
+ }
+ { new.block
+ format.book.crossref output.nonnull
+ }
+ if$
+ format.edition output
+ format.date "year" output.check
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {booklet}
+{ output.bibitem
+ format.authors output
+ new.block
+ format.title "title" output.check
+ howpublished address new.block.checkb
+ howpublished output
+ address output
+ format.date output
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {inbook}
+{ output.bibitem
+ author empty$
+ { format.editors "author and editor" output.check }
+ { format.authors output.nonnull
+ crossref missing$
+{ "author and editor" editor either.or.check }
+'skip$
+ if$
+ }
+ if$
+ new.block
+ format.btitle "title" output.check
+ crossref missing$
+ { format.bvolume output
+ format.chapter.pages "chapter and pages" output.check
+ new.block
+ format.number.series output
+ new.sentence
+ publisher "publisher" output.check
+ address output
+ }
+ { format.chapter.pages "chapter and pages" output.check
+ new.block
+ format.book.crossref output.nonnull
+ }
+ if$
+ format.edition output
+ format.date "year" output.check
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {incollection}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.title "title" output.check
+ new.block
+ crossref missing$
+ { format.in.ed.booktitle "booktitle" output.check
+ format.bvolume output
+ format.number.series output
+ format.chapter.pages output
+ new.sentence
+ publisher "publisher" output.check
+ address output
+ format.edition output
+ format.date "year" output.check
+ }
+ { format.incoll.inproc.crossref output.nonnull
+ format.chapter.pages output
+ }
+ if$
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {inproceedings}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.title "title" output.check
+ new.block
+ crossref missing$
+ { format.in.ed.booktitle "booktitle" output.check
+ format.bvolume output
+ format.number.series output
+ format.pages output
+ address empty$
+{ organization publisher new.sentence.checkb
+ organization output
+ publisher output
+ format.date "year" output.check
+}
+{ address output.nonnull
+ format.date "year" output.check
+ new.sentence
+ organization output
+ publisher output
+}
+ if$
+ }
+ { format.incoll.inproc.crossref output.nonnull
+ format.pages output
+ }
+ if$
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {conference} { inproceedings }
+
+FUNCTION {manual}
+{ output.bibitem
+ author empty$
+ { organization empty$
+'skip$
+{ organization output.nonnull
+ address output
+}
+ if$
+ }
+ { format.authors output.nonnull }
+ if$
+ new.block
+ format.btitle "title" output.check
+ author empty$
+ { organization empty$
+{ address new.block.checka
+ address output
+}
+'skip$
+ if$
+ }
+ { organization address new.block.checkb
+ organization output
+ address output
+ }
+ if$
+ format.edition output
+ format.date output
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {mastersthesis}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.title "title" output.check
+ new.block
+ bbl.mthesis
+ format.thesis.type output.nonnull
+ school "school" output.check
+ address output
+ format.date "year" output.check
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {misc}
+{ output.bibitem
+ format.authors output
+ title howpublished new.block.checkb
+ format.title output
+ howpublished new.block.checka
+ howpublished output
+ format.date output
+ new.block
+ note output
+ fin.entry
+ empty.misc.check
+}
+
+FUNCTION {phdthesis}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.btitle "title" output.check
+ new.block
+ bbl.phdthesis
+ format.thesis.type output.nonnull
+ school "school" output.check
+ address output
+ format.date "year" output.check
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {proceedings}
+{ output.bibitem
+ editor empty$
+ { organization output }
+ { format.editors output.nonnull }
+ if$
+ new.block
+ format.btitle "title" output.check
+ format.bvolume output
+ format.number.series output
+ address empty$
+ { editor empty$
+{ publisher new.sentence.checka }
+{ organization publisher new.sentence.checkb
+ organization output
+}
+ if$
+ publisher output
+ format.date "year" output.check
+ }
+ { address output.nonnull
+ format.date "year" output.check
+ new.sentence
+ editor empty$
+'skip$
+{ organization output }
+ if$
+ publisher output
+ }
+ if$
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {techreport}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.title "title" output.check
+ new.block
+ format.tr.number output.nonnull
+ institution "institution" output.check
+ address output
+ format.date "year" output.check
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {unpublished}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.title "title" output.check
+ new.block
+ note "note" output.check
+ format.date output
+ fin.entry
+}
+
+FUNCTION {default.type} { misc }
+
+MACRO {jan} {"January"}
+
+MACRO {feb} {"February"}
+
+MACRO {mar} {"March"}
+
+MACRO {apr} {"April"}
+
+MACRO {may} {"May"}
+
+MACRO {jun} {"June"}
+
+MACRO {jul} {"July"}
+
+MACRO {aug} {"August"}
+
+MACRO {sep} {"September"}
+
+MACRO {oct} {"October"}
+
+MACRO {nov} {"November"}
+
+MACRO {dec} {"December"}
+
+MACRO {acmcs} {"ACM Computing Surveys"}
+
+MACRO {acta} {"Acta Informatica"}
+
+MACRO {cacm} {"Communications of the ACM"}
+
+MACRO {ibmjrd} {"IBM Journal of Research and Development"}
+
+MACRO {ibmsj} {"IBM Systems Journal"}
+
+MACRO {ieeese} {"IEEE Transactions on Software Engineering"}
+
+MACRO {ieeetc} {"IEEE Transactions on Computers"}
+
+MACRO {ieeetcad}
+ {"IEEE Transactions on Computer-Aided Design of Integrated Circuits"}
+
+MACRO {ipl} {"Information Processing Letters"}
+
+MACRO {jacm} {"Journal of the ACM"}
+
+MACRO {jcss} {"Journal of Computer and System Sciences"}
+
+MACRO {scp} {"Science of Computer Programming"}
+
+MACRO {sicomp} {"SIAM Journal on Computing"}
+
+MACRO {tocs} {"ACM Transactions on Computer Systems"}
+
+MACRO {tods} {"ACM Transactions on Database Systems"}
+
+MACRO {tog} {"ACM Transactions on Graphics"}
+
+MACRO {toms} {"ACM Transactions on Mathematical Software"}
+
+MACRO {toois} {"ACM Transactions on Office Information Systems"}
+
+MACRO {toplas} {"ACM Transactions on Programming Languages and Systems"}
+
+MACRO {tcs} {"Theoretical Computer Science"}
+
+READ
+
+FUNCTION {sortify}
+{
+ fa.isPersianLanguage
+ { "l" change.case$}
+ {purify$ "l" change.case$}
+ if$
+ %duplicate$ write$
+}
+
+INTEGERS { len }
+
+FUNCTION {chop.word}
+{ 's :=
+ 'len :=
+ s #1 len substring$ =
+ { s len #1 + global.max$ substring$ }
+ 's
+ if$
+}
+
+FUNCTION {sort.format.names}
+{ 's :=
+ #1 'nameptr :=
+ ""
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ { nameptr #1 >
+ { " " * }
+ 'skip$
+ if$
+ s nameptr "{vv{ } }{ll{ }}{ ff{ }}{ jj{ }}" format.name$ 't :=
+ nameptr numnames = t "others" = and
+ { bbl.etal * }
+ %{ t write$ t sortify * t write$ }
+ { t sortify * }
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+}
+
+FUNCTION {sort.format.title}
+{ 't :=
+ "A " #2
+ "An " #3
+ "The " #4 t chop.word
+ chop.word
+ chop.word
+ sortify
+ #1 global.max$ substring$
+}
+
+FUNCTION {author.sort}
+{ author empty$
+ { key empty$
+ { "to sort, need author or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { author sort.format.names }
+ if$
+}
+
+FUNCTION {author.editor.sort}
+{ author empty$
+ { editor empty$
+{ key empty$
+ { "to sort, need author, editor, or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+}
+{ editor sort.format.names }
+ if$
+ }
+ { author sort.format.names }
+ if$
+}
+
+FUNCTION {author.organization.sort}
+{ author empty$
+ { organization empty$
+{ key empty$
+ { "to sort, need author, organization, or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+}
+{ "The " #4 organization chop.word sortify }
+ if$
+ }
+ { author sort.format.names }
+ if$
+}
+
+FUNCTION {editor.organization.sort}
+{ editor empty$
+ { organization empty$
+{ key empty$
+ { "to sort, need editor, organization, or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+}
+{ "The " #4 organization chop.word sortify }
+ if$
+ }
+ { editor sort.format.names }
+ if$
+}
+
+FUNCTION {presort}
+{ type$ "book" =
+ type$ "inbook" =
+ or
+ 'author.editor.sort
+ { type$ "proceedings" =
+'editor.organization.sort
+{ type$ "manual" =
+ 'author.organization.sort
+ 'author.sort
+ if$
+}
+ if$
+ }
+ if$
+ " "
+ *
+ year field.or.null sortify
+ *
+ " "
+ *
+ title field.or.null
+ sort.format.title
+ *
+ #1 entry.max$ substring$
+ 'sort.key$ :=
+}
+
+ITERATE {presort}
+
+SORT
+
+STRINGS { longest.label }
+
+INTEGERS { number.label longest.label.width }
+
+FUNCTION {initialize.longest.label}
+{ "" 'longest.label :=
+ #1 'number.label :=
+ #0 'longest.label.width :=
+}
+
+FUNCTION {longest.label.pass}
+{ number.label int.to.str$ 'label :=
+ number.label #1 + 'number.label :=
+ label width$ longest.label.width >
+ { label 'longest.label :=
+ label width$ 'longest.label.width :=
+ }
+ 'skip$
+ if$
+}
+
+EXECUTE {banner.message}
+EXECUTE {initialize.longest.label}
+
+ITERATE {longest.label.pass}
+
+FUNCTION {begin.bib}
+{
+ "% Generated by plain-fa-inLTR-beamer.bst, version: " bst.file.version * " (" * bst.file.date * ")" *
+ write$ newline$
+ "% Authors: " bst.file.authors *
+ write$ newline$
+ "\providecommand{\noopsort}[1]{}"
+ write$ newline$
+ preamble$ empty$
+ 'skip$
+ { preamble$ write$ newline$ }
+ if$
+ "\begin{thebibliography}{" longest.label * "}" * write$ newline$
+}
+
+EXECUTE {begin.bib}
+
+EXECUTE {init.state.consts}
+
+ITERATE {call.type$}
+
+FUNCTION {end.bib}
+{ newline$
+ "\end{thebibliography}" write$ newline$
+}
+
+EXECUTE {end.bib}
+EXECUTE{completed.message}
+%% End of file `plain-fa-inLTR-beamer.bst'.
diff --git a/biblio/bibtex/contrib/persian-bib/plain-fa-inLTR.bst b/biblio/bibtex/contrib/persian-bib/plain-fa-inLTR.bst
new file mode 100644
index 0000000000..2afb5a4d96
--- /dev/null
+++ b/biblio/bibtex/contrib/persian-bib/plain-fa-inLTR.bst
@@ -0,0 +1,1401 @@
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% Bib. style "plain-fa-inLTR", Persian (farsi) version of plain.bst
+%%
+%% by: Mahmood Amintoosi, m.amintoosi@gmail.com, www.parsilatex.com
+%% For XePersian, a Persian Typesetting Package in XeTeX
+%% It may be distributed and/or modified under the
+%% conditions of the LaTeX Project Public License (version 1.3c),
+%% either this version of this license or (at your option) any later version.
+%%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%%
+%% Original Copyright
+
+ENTRY
+ { address
+ author
+ booktitle
+ chapter
+ edition
+ editor
+ howpublished
+ institution
+ journal
+ key
+ language
+ month
+ note
+ number
+ organization
+ pages
+ publisher
+ school
+ series
+ title
+ translator
+ type
+ volume
+ year
+ }
+ {}
+ { label }
+
+INTEGERS { output.state before.all mid.sentence after.sentence after.block }
+FUNCTION {is.print.banners.to.terminal} { #1 }
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% FILE VERSION AND BANNER %%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+FUNCTION{bst.file.version} { "0.9" }
+FUNCTION{bst.file.date} { "2015/05/09" }
+FUNCTION{bst.file.website} { "http://www.parsilatex.com" }
+FUNCTION{bst.file.authors} {"M.Amintoosi" }
+
+FUNCTION {banner.message}
+{ is.print.banners.to.terminal
+ { "-- plain-fa-inLTR.bst version" " " * bst.file.version *
+ " (" * bst.file.date * ") " * %"by " * bst.file.authors *
+ top$
+ "-- This is a BibTeX style for XePersian: " bst.file.website *
+ %top$
+ %"-- See the " quote$ * "Persian-bib-userguide.pdf" * quote$ * " manual for usage information." *
+ top$
+ }
+ { skip$ }
+ if$
+}
+
+FUNCTION {completed.message}
+{ is.print.banners.to.terminal
+ { ""
+ top$
+ "Done."
+ top$
+ }
+ { skip$ }
+ if$
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% Persian Functions %%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+FUNCTION {fa.isPersianLanguage}
+{
+ language missing$
+ {#0}
+ {language "l" change.case$ "persian" =}
+ if$
+}
+
+ % Here are the language-specific definitions for explicit words.
+ % Each function has a name bbl.xxx where xxx is the English word.
+ % The languages selected here is ENGLISH and Farsi
+FUNCTION {bbl.and}
+{
+ fa.isPersianLanguage
+ {" و "}
+ {" and "}
+ if$
+}
+
+FUNCTION {bbl.editors}
+{
+fa.isPersianLanguage
+ { " ویراستاران "}
+ {" editors"}
+if$
+}
+
+FUNCTION {bbl.editor}
+{
+fa.isPersianLanguage
+ { " ویراستار "}
+ {" editor" }
+if$
+}
+
+FUNCTION {bbl.edby}
+{
+fa.isPersianLanguage
+ { " ویراسته‌ی "}
+ { " edited by " }
+if$
+}
+
+FUNCTION {bbl.edition}
+{
+fa.isPersianLanguage
+ {" ویرایش "}
+ {" edition" }
+if$
+}
+
+FUNCTION {bbl.bvolume}
+{
+fa.isPersianLanguage
+ {" جلد "}
+ { "volume"}
+if$
+}
+
+FUNCTION {bbl.volume}
+{
+fa.isPersianLanguage
+ {" جلد "}
+ { "Volume"}
+if$
+}
+
+FUNCTION {bbl.of}
+{
+fa.isPersianLanguage
+ { " از "}
+ { " of " }
+if$
+}
+
+FUNCTION {bbl.number}
+{
+fa.isPersianLanguage
+ {" شماره " }
+ { "number" }
+if$
+}
+
+FUNCTION {bbl.in}
+{
+fa.isPersianLanguage
+ {" در "}
+ { "In " }
+if$
+}
+
+FUNCTION {bbl.inInMid}
+{
+fa.isPersianLanguage
+ {" در "}
+ { " in " }
+if$
+}
+
+FUNCTION {bbl.pages}
+{
+fa.isPersianLanguage
+ {" صفحات "}
+ { "pages" }
+if$
+}
+
+FUNCTION {bbl.page}
+{
+fa.isPersianLanguage
+ {" صفحه " }
+ { "page" }
+if$
+}
+
+FUNCTION {bbl.chapter}
+{
+fa.isPersianLanguage
+ { " فصل " }
+ {"chapter" }
+if$
+}
+
+FUNCTION {bbl.techrep}
+{
+fa.isPersianLanguage
+ { " گزارش طرح تحقیقی"}
+ { "Technical Report" }
+if$
+}
+
+FUNCTION {bbl.mthesis}
+{
+fa.isPersianLanguage
+ {" پایان‌نامه کارشناسی‌ارشد"}
+ { " Master's thesis" }
+if$
+}
+
+FUNCTION {bbl.phdthesis}
+{
+fa.isPersianLanguage
+ {" پایان‌نامه دکترا" }
+ { "PhD thesis" }
+if$
+}
+
+FUNCTION {bbl.etal}
+{
+ fa.isPersianLanguage
+ {" و دیگران"}
+ {" et~al."}
+ if$
+}
+
+FUNCTION {bbl.translator}
+{
+ fa.isPersianLanguage
+ {"ترجمه‌ی "}
+ {"Translator "}
+ if$
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% End of Persian Functions %%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+FUNCTION {init.state.consts}
+{ #0 'before.all :=
+ #1 'mid.sentence :=
+ #2 'after.sentence :=
+ #3 'after.block :=
+}
+
+STRINGS { s t }
+
+FUNCTION {output.nonnull}
+{ 's :=
+ output.state mid.sentence =
+ { ", " * write$ }
+ { output.state after.block =
+{ add.period$ write$
+ newline$
+ "\newblock " write$
+}
+{ output.state before.all =
+ 'write$
+ { add.period$ " " * write$ }
+ if$
+}
+ if$
+ mid.sentence 'output.state :=
+ }
+ if$
+ s
+}
+
+FUNCTION {output}
+{ duplicate$ empty$
+ 'pop$
+ 'output.nonnull
+ if$
+}
+
+FUNCTION {output.check}
+{ 't :=
+ duplicate$ empty$
+ { pop$ "empty " t * " in " * cite$ * warning$ }
+ 'output.nonnull
+ if$
+}
+
+FUNCTION {output.bibitem}
+{
+ newline$
+ fa.isPersianLanguage
+ {
+ "\begin{RTLbibitems}" write$
+ newline$
+ }
+ { skip$ }
+ if$
+ newline$
+ "\bibitem{" write$
+ cite$ write$
+ "}" write$
+ newline$
+ fa.isPersianLanguage
+ {
+ "\Persiantext{" write$
+ newline$
+ }
+ {
+ skip$
+ }
+ if$
+ ""
+ before.all 'output.state :=
+}
+
+FUNCTION {fin.entry}
+{ add.period$
+ write$
+ newline$
+ fa.isPersianLanguage
+ {
+ "}" write$
+ newline$
+ newline$
+ "\end{RTLbibitems}" write$
+ newline$
+ }
+ {skip$}
+ if$
+}
+
+FUNCTION {new.block}
+{ output.state before.all =
+ 'skip$
+ { after.block 'output.state := }
+ if$
+}
+
+FUNCTION {new.sentence}
+{ output.state after.block =
+ 'skip$
+ { output.state before.all =
+'skip$
+{ after.sentence 'output.state := }
+ if$
+ }
+ if$
+}
+
+FUNCTION {not}
+{ { #0 }
+ { #1 }
+ if$
+}
+
+FUNCTION {and}
+{ 'skip$
+ { pop$ #0 }
+ if$
+}
+
+FUNCTION {or}
+{ { pop$ #1 }
+ 'skip$
+ if$
+}
+
+FUNCTION {new.block.checka}
+{ empty$
+ 'skip$
+ 'new.block
+ if$
+}
+
+FUNCTION {new.block.checkb}
+{ empty$
+ swap$ empty$
+ and
+ 'skip$
+ 'new.block
+ if$
+}
+
+FUNCTION {new.sentence.checka}
+{ empty$
+ 'skip$
+ 'new.sentence
+ if$
+}
+
+FUNCTION {new.sentence.checkb}
+{ empty$
+ swap$ empty$
+ and
+ 'skip$
+ 'new.sentence
+ if$
+}
+
+FUNCTION {field.or.null}
+{ duplicate$ empty$
+ { pop$ "" }
+ 'skip$
+ if$
+}
+
+FUNCTION {emphasize}
+{ duplicate$ empty$
+ { pop$ "" }
+ { "{\em " swap$ * "}" * }
+ if$
+}
+
+INTEGERS { nameptr namesleft numnames }
+
+FUNCTION {format.names}
+{ 's :=
+ #1 'nameptr :=
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ {
+ s nameptr "{vv~}{ll}{, jj}{, ff}" format.name$ 't := %{ff~}{vv~}{ll}{, jj}
+ %fa.isPersianLanguage
+ % {s nameptr "{vv~}{ll}{, jj}{, ff}" format.name$ 't := %{ff~}{vv~}{ll}{, jj}
+ % }
+ % {s nameptr "{vv~}{ll}{, jj}{, f.}" format.name$ 't :=
+ %if$
+ nameptr #1 >
+{ namesleft #1 >
+ { ", " * t * }
+ { numnames #2 >
+ { "," * }
+ 'skip$
+ if$
+ t "others" =
+ { bbl.etal * }
+ { bbl.and * t * }
+ if$
+ }
+ if$
+}
+'t
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+}
+
+FUNCTION {format.authors}
+{ author empty$
+ { "" }
+ { author format.names }
+ if$
+}
+
+FUNCTION {format.editors}
+{ editor empty$
+ { "" }
+ { fa.isPersianLanguage
+ {
+editor num.names$ #1 >
+{bbl.editors editor format.names * }
+{bbl.editor editor format.names * }
+if$
+}
+{
+ editor format.names
+editor num.names$ #1 >
+{ ", " bbl.editors * *}
+{ ", " bbl.editor * *}
+if$
+}
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.translators}
+{ translator empty$
+ { "" }
+ { fa.isPersianLanguage
+ {
+bbl.translator translator format.names *
+}
+{
+ translator format.names
+", " bbl.translator * *
+}
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.title}
+{ title empty$
+ { "" }
+ { title "t" change.case$ }
+ if$
+}
+
+FUNCTION {n.dashify}
+{ 't :=
+ ""
+ { t empty$ not }
+ { t #1 #1 substring$ "-" =
+{ t #1 #2 substring$ "--" = not
+ { "--" *
+ t #2 global.max$ substring$ 't :=
+ }
+ { { t #1 #1 substring$ "-" = }
+{ "-" *
+ t #2 global.max$ substring$ 't :=
+}
+ while$
+ }
+ if$
+}
+{ t #1 #1 substring$ *
+ t #2 global.max$ substring$ 't :=
+}
+ if$
+ }
+ while$
+}
+
+FUNCTION {format.date}
+{ year empty$
+ { month empty$
+{ "" }
+{ "there's a month but no year in " cite$ * warning$
+ month
+}
+ if$
+ }
+ { month empty$
+'year
+{ month " " * year * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.btitle}
+{ title emphasize
+}
+
+FUNCTION {tie.or.space.connect}
+{ duplicate$ text.length$ #3 <
+ { "~" }
+ { " " }
+ if$
+ swap$ * *
+}
+
+FUNCTION {either.or.check}
+{ empty$
+ 'pop$
+ { "can't use both " swap$ * " fields in " * cite$ * warning$ }
+ if$
+}
+
+FUNCTION {format.bvolume}
+{ volume empty$
+ { "" }
+ { bbl.bvolume volume tie.or.space.connect
+ series empty$
+'skip$
+{ bbl.of * series emphasize * }
+ if$
+ "volume and number" number either.or.check
+ }
+ if$
+}
+
+FUNCTION {format.number.series}
+{ volume empty$
+ { number empty$
+{ series field.or.null }
+{ output.state mid.sentence =
+ { bbl.number }
+ { bbl.number "t" change.case$ }
+ if$
+ number tie.or.space.connect
+ series empty$
+ { "there's a number but no series in " cite$ * warning$ }
+ { bbl.inInMid * series * }
+ if$
+}
+ if$
+ }
+ { "" }
+ if$
+}
+
+FUNCTION {format.edition}
+{ edition empty$
+ { "" }
+ { fa.isPersianLanguage
+ {
+ bbl.edition edition *
+}
+{
+ output.state mid.sentence =
+ { edition "l" change.case$ bbl.edition * }
+ { edition "t" change.case$ bbl.edition * }
+ if$
+}
+ if$
+ }
+ if$
+}
+
+INTEGERS { multiresult }
+
+FUNCTION {multi.page.check}
+{ 't :=
+ #0 'multiresult :=
+ { multiresult not
+ t empty$ not
+ and
+ }
+ { t #1 #1 substring$
+ duplicate$ "-" =
+ swap$ duplicate$ "," =
+ swap$ "+" =
+ or or
+{ #1 'multiresult := }
+{ t #2 global.max$ substring$ 't := }
+ if$
+ }
+ while$
+ multiresult
+}
+
+FUNCTION {format.pages}
+{ pages empty$
+ { "" }
+ { pages multi.page.check
+ { bbl.pages pages n.dashify tie.or.space.connect }
+ { bbl.page pages tie.or.space.connect }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.vol.num.pages}
+{ volume field.or.null
+ number empty$
+ 'skip$
+ { "(" number * ")" * *
+ volume empty$
+{ "there's a number but no volume in " cite$ * warning$ }
+'skip$
+ if$
+ }
+ if$
+ pages empty$
+ 'skip$
+ { duplicate$ empty$
+{ pop$ format.pages }
+{ ":" * pages n.dashify * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.chapter.pages}
+{ chapter empty$
+ 'format.pages
+ { type empty$
+{ bbl.chapter }
+{ type "l" change.case$ }
+ if$
+ chapter tie.or.space.connect
+ pages empty$
+'skip$
+{ ", " * format.pages * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.in.ed.booktitle}
+{
+ booktitle empty$
+ { "" }
+ { editor empty$
+ { bbl.in booktitle emphasize * }
+ { bbl.in format.editors * ", " * booktitle emphasize * }
+ if$
+}
+ if$
+}
+
+FUNCTION {empty.misc.check}
+{ author empty$ title empty$ howpublished empty$
+ month empty$ year empty$ note empty$
+ and and and and and
+ key empty$ not and
+ { "all relevant fields are empty in " cite$ * warning$ }
+ 'skip$
+ if$
+}
+
+FUNCTION {format.thesis.type}
+{ type empty$
+ 'skip$
+ { pop$
+ type "t" change.case$
+ }
+ if$
+}
+
+FUNCTION {format.tr.number}
+{ type empty$
+ { bbl.techrep }
+ 'type
+ if$
+ number empty$
+ { "t" change.case$ }
+ { number tie.or.space.connect }
+ if$
+}
+
+FUNCTION {format.article.crossref}
+{ key empty$
+ { journal empty$
+{ "need key or journal for " cite$ * " to crossref " * crossref *
+ warning$
+ ""
+}
+{ bbl.in "{\em " * journal * "\/}" * }
+ if$
+ }
+ { bbl.in key * }
+ if$
+ " \cite{" * crossref * "}" *
+}
+
+FUNCTION {format.crossref.editor}
+{ editor #1 "{vv~}{ll}" format.name$
+ editor num.names$ duplicate$ #2 >
+ { pop$ bbl.etal * }
+ { #2 < 'skip$
+ { editor #2 "{ff }{vv }{ll}{ jj}" format.name$ "others" =%"{ff }{vv }{ll}{ jj}"
+ { bbl.etal * }
+ { bbl.and * editor #2 "{vv~}{ll}" format.name$ * }
+ if$
+ }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.book.crossref}
+{ volume empty$
+ { "empty volume in " cite$ * "'s crossref of " * crossref * warning$
+ bbl.in
+ }
+ { bbl.volume volume tie.or.space.connect
+ bbl.of *
+ }
+ if$
+ editor empty$
+ editor field.or.null author field.or.null =
+ or
+ { key empty$
+{ series empty$
+ { "need editor, key, or series for " cite$ * " to crossref " *
+ crossref * warning$
+ "" *
+ }
+ { "{\em " * series * "\/}" * }
+ if$
+}
+{ key * }
+ if$
+ }
+ { format.crossref.editor * }
+ if$
+ " \cite{" * crossref * "}" *
+}
+
+FUNCTION {format.incoll.inproc.crossref}
+{ editor empty$
+ editor field.or.null author field.or.null =
+ or
+ { key empty$
+{ booktitle empty$
+ { "need editor, key, or booktitle for " cite$ * " to crossref " *
+ crossref * warning$
+ ""
+ }
+ { bbl.in " {\em " * booktitle * "\/}" * }
+ if$
+}
+{ bbl.in key * }
+ if$
+ }
+ { bbl.in format.crossref.editor * }
+ if$
+ " \cite{" * crossref * "}" *
+}
+
+FUNCTION {article}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.title "title" output.check
+ new.block
+ crossref missing$
+ { journal emphasize "journal" output.check
+ format.vol.num.pages output
+ format.date "year" output.check
+ }
+ { format.article.crossref output.nonnull
+ format.pages output
+ }
+ if$
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {book}
+{ output.bibitem
+ fa.isPersianLanguage
+ {
+format.authors output
+ new.block
+ format.btitle "title" output.check
+new.block
+ format.translators output
+format.editors output
+ }
+ { author empty$
+ { format.editors "author and editor" output.check }
+ { format.authors output.nonnull
+ crossref missing$
+ { "author and editor" editor either.or.check }
+ 'skip$
+ if$
+ }
+ if$
+ new.block
+ format.btitle "title" output.check
+ }
+ if$
+ crossref missing$
+ { format.bvolume output
+ new.block
+ format.number.series output
+ new.sentence
+ publisher "publisher" output.check
+ address output
+ }
+ { new.block
+ format.book.crossref output.nonnull
+ }
+ if$
+ format.edition output
+ format.date "year" output.check
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {booklet}
+{ output.bibitem
+ format.authors output
+ new.block
+ format.title "title" output.check
+ howpublished address new.block.checkb
+ howpublished output
+ address output
+ format.date output
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {inbook}
+{ output.bibitem
+ author empty$
+ { format.editors "author and editor" output.check }
+ { format.authors output.nonnull
+ crossref missing$
+{ "author and editor" editor either.or.check }
+'skip$
+ if$
+ }
+ if$
+ new.block
+ format.btitle "title" output.check
+ crossref missing$
+ { format.bvolume output
+ format.chapter.pages "chapter and pages" output.check
+ new.block
+ format.number.series output
+ new.sentence
+ publisher "publisher" output.check
+ address output
+ }
+ { format.chapter.pages "chapter and pages" output.check
+ new.block
+ format.book.crossref output.nonnull
+ }
+ if$
+ format.edition output
+ format.date "year" output.check
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {incollection}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.title "title" output.check
+ new.block
+ crossref missing$
+ { format.in.ed.booktitle "booktitle" output.check
+ format.bvolume output
+ format.number.series output
+ format.chapter.pages output
+ new.sentence
+ publisher "publisher" output.check
+ address output
+ format.edition output
+ format.date "year" output.check
+ }
+ { format.incoll.inproc.crossref output.nonnull
+ format.chapter.pages output
+ }
+ if$
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {inproceedings}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.title "title" output.check
+ new.block
+ crossref missing$
+ { format.in.ed.booktitle "booktitle" output.check
+ format.bvolume output
+ format.number.series output
+ format.pages output
+ address empty$
+{ organization publisher new.sentence.checkb
+ organization output
+ publisher output
+ format.date "year" output.check
+}
+{ address output.nonnull
+ format.date "year" output.check
+ new.sentence
+ organization output
+ publisher output
+}
+ if$
+ }
+ { format.incoll.inproc.crossref output.nonnull
+ format.pages output
+ }
+ if$
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {conference} { inproceedings }
+
+FUNCTION {manual}
+{ output.bibitem
+ author empty$
+ { organization empty$
+'skip$
+{ organization output.nonnull
+ address output
+}
+ if$
+ }
+ { format.authors output.nonnull }
+ if$
+ new.block
+ format.btitle "title" output.check
+ author empty$
+ { organization empty$
+{ address new.block.checka
+ address output
+}
+'skip$
+ if$
+ }
+ { organization address new.block.checkb
+ organization output
+ address output
+ }
+ if$
+ format.edition output
+ format.date output
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {mastersthesis}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.title "title" output.check
+ new.block
+ bbl.mthesis
+ format.thesis.type output.nonnull
+ school "school" output.check
+ address output
+ format.date "year" output.check
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {misc}
+{ output.bibitem
+ format.authors output
+ title howpublished new.block.checkb
+ format.title output
+ howpublished new.block.checka
+ howpublished output
+ format.date output
+ new.block
+ note output
+ fin.entry
+ empty.misc.check
+}
+
+FUNCTION {phdthesis}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.btitle "title" output.check
+ new.block
+ bbl.phdthesis
+ format.thesis.type output.nonnull
+ school "school" output.check
+ address output
+ format.date "year" output.check
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {proceedings}
+{ output.bibitem
+ editor empty$
+ { organization output }
+ { format.editors output.nonnull }
+ if$
+ new.block
+ format.btitle "title" output.check
+ format.bvolume output
+ format.number.series output
+ address empty$
+ { editor empty$
+{ publisher new.sentence.checka }
+{ organization publisher new.sentence.checkb
+ organization output
+}
+ if$
+ publisher output
+ format.date "year" output.check
+ }
+ { address output.nonnull
+ format.date "year" output.check
+ new.sentence
+ editor empty$
+'skip$
+{ organization output }
+ if$
+ publisher output
+ }
+ if$
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {techreport}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.title "title" output.check
+ new.block
+ format.tr.number output.nonnull
+ institution "institution" output.check
+ address output
+ format.date "year" output.check
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {unpublished}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.title "title" output.check
+ new.block
+ note "note" output.check
+ format.date output
+ fin.entry
+}
+
+FUNCTION {default.type} { misc }
+
+MACRO {jan} {"January"}
+
+MACRO {feb} {"February"}
+
+MACRO {mar} {"March"}
+
+MACRO {apr} {"April"}
+
+MACRO {may} {"May"}
+
+MACRO {jun} {"June"}
+
+MACRO {jul} {"July"}
+
+MACRO {aug} {"August"}
+
+MACRO {sep} {"September"}
+
+MACRO {oct} {"October"}
+
+MACRO {nov} {"November"}
+
+MACRO {dec} {"December"}
+
+MACRO {acmcs} {"ACM Computing Surveys"}
+
+MACRO {acta} {"Acta Informatica"}
+
+MACRO {cacm} {"Communications of the ACM"}
+
+MACRO {ibmjrd} {"IBM Journal of Research and Development"}
+
+MACRO {ibmsj} {"IBM Systems Journal"}
+
+MACRO {ieeese} {"IEEE Transactions on Software Engineering"}
+
+MACRO {ieeetc} {"IEEE Transactions on Computers"}
+
+MACRO {ieeetcad}
+ {"IEEE Transactions on Computer-Aided Design of Integrated Circuits"}
+
+MACRO {ipl} {"Information Processing Letters"}
+
+MACRO {jacm} {"Journal of the ACM"}
+
+MACRO {jcss} {"Journal of Computer and System Sciences"}
+
+MACRO {scp} {"Science of Computer Programming"}
+
+MACRO {sicomp} {"SIAM Journal on Computing"}
+
+MACRO {tocs} {"ACM Transactions on Computer Systems"}
+
+MACRO {tods} {"ACM Transactions on Database Systems"}
+
+MACRO {tog} {"ACM Transactions on Graphics"}
+
+MACRO {toms} {"ACM Transactions on Mathematical Software"}
+
+MACRO {toois} {"ACM Transactions on Office Information Systems"}
+
+MACRO {toplas} {"ACM Transactions on Programming Languages and Systems"}
+
+MACRO {tcs} {"Theoretical Computer Science"}
+
+READ
+
+FUNCTION {sortify}
+{
+ fa.isPersianLanguage
+ { "l" change.case$}
+ {purify$ "l" change.case$}
+ if$
+ %duplicate$ write$
+}
+
+INTEGERS { len }
+
+FUNCTION {chop.word}
+{ 's :=
+ 'len :=
+ s #1 len substring$ =
+ { s len #1 + global.max$ substring$ }
+ 's
+ if$
+}
+
+FUNCTION {sort.format.names}
+{ 's :=
+ #1 'nameptr :=
+ ""
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ { nameptr #1 >
+ { " " * }
+ 'skip$
+ if$
+ s nameptr "{vv{ } }{ll{ }}{ ff{ }}{ jj{ }}" format.name$ 't :=
+ nameptr numnames = t "others" = and
+ { bbl.etal * }
+ %{ t write$ t sortify * t write$ }
+ { t sortify * }
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+}
+
+FUNCTION {sort.format.title}
+{ 't :=
+ "A " #2
+ "An " #3
+ "The " #4 t chop.word
+ chop.word
+ chop.word
+ sortify
+ #1 global.max$ substring$
+}
+
+FUNCTION {author.sort}
+{ author empty$
+ { key empty$
+ { "to sort, need author or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { author sort.format.names }
+ if$
+}
+
+FUNCTION {author.editor.sort}
+{ author empty$
+ { editor empty$
+{ key empty$
+ { "to sort, need author, editor, or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+}
+{ editor sort.format.names }
+ if$
+ }
+ { author sort.format.names }
+ if$
+}
+
+FUNCTION {author.organization.sort}
+{ author empty$
+ { organization empty$
+{ key empty$
+ { "to sort, need author, organization, or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+}
+{ "The " #4 organization chop.word sortify }
+ if$
+ }
+ { author sort.format.names }
+ if$
+}
+
+FUNCTION {editor.organization.sort}
+{ editor empty$
+ { organization empty$
+{ key empty$
+ { "to sort, need editor, organization, or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+}
+{ "The " #4 organization chop.word sortify }
+ if$
+ }
+ { editor sort.format.names }
+ if$
+}
+
+FUNCTION {presort}
+{ type$ "book" =
+ type$ "inbook" =
+ or
+ 'author.editor.sort
+ { type$ "proceedings" =
+'editor.organization.sort
+{ type$ "manual" =
+ 'author.organization.sort
+ 'author.sort
+ if$
+}
+ if$
+ }
+ if$
+ " "
+ *
+ year field.or.null sortify
+ *
+ " "
+ *
+ title field.or.null
+ sort.format.title
+ *
+ #1 entry.max$ substring$
+ 'sort.key$ :=
+}
+
+ITERATE {presort}
+
+SORT
+
+STRINGS { longest.label }
+
+INTEGERS { number.label longest.label.width }
+
+FUNCTION {initialize.longest.label}
+{ "" 'longest.label :=
+ #1 'number.label :=
+ #0 'longest.label.width :=
+}
+
+FUNCTION {longest.label.pass}
+{ number.label int.to.str$ 'label :=
+ number.label #1 + 'number.label :=
+ label width$ longest.label.width >
+ { label 'longest.label :=
+ label width$ 'longest.label.width :=
+ }
+ 'skip$
+ if$
+}
+
+EXECUTE {banner.message}
+EXECUTE {initialize.longest.label}
+
+ITERATE {longest.label.pass}
+
+FUNCTION {begin.bib}
+{
+ "% Generated by plain-fa-inLTR.bst, version: " bst.file.version * " (" * bst.file.date * ")" *
+ write$ newline$
+ "% Authors: " bst.file.authors *
+ write$ newline$
+ "\providecommand{\noopsort}[1]{}"
+ write$ newline$
+ preamble$ empty$
+ 'skip$
+ { preamble$ write$ newline$ }
+ if$
+ "\begin{thebibliography}{" longest.label * "}" * write$ newline$
+}
+
+EXECUTE {begin.bib}
+
+EXECUTE {init.state.consts}
+
+ITERATE {call.type$}
+
+FUNCTION {end.bib}
+{ newline$
+ "\end{thebibliography}" write$ newline$
+}
+
+EXECUTE {end.bib}
+EXECUTE{completed.message}
+%% End of file `plain-fa-inLTR.bst'.
diff --git a/biblio/bibtex/contrib/persian-bib/plain-fa.bst b/biblio/bibtex/contrib/persian-bib/plain-fa.bst
new file mode 100644
index 0000000000..79e2f09d84
--- /dev/null
+++ b/biblio/bibtex/contrib/persian-bib/plain-fa.bst
@@ -0,0 +1,1390 @@
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% Bib. style "plain-fa", Persian (farsi) version of plain.bst
+%%
+%% by: Mahmood Amintoosi and Mostafa Vahedi
+%% For XePersian, a Persian Typesetting Package in XeTeX
+%% It may be distributed and/or modified under the
+%% conditions of the LaTeX Project Public License (version 1.3c),
+%% either this version of this license or (at your option) any later version.
+%%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%%
+%% Original Copyright
+
+ENTRY
+ { address
+ author
+ booktitle
+ chapter
+ edition
+ editor
+ howpublished
+ institution
+ journal
+ key
+ language
+ month
+ note
+ number
+ organization
+ pages
+ publisher
+ school
+ series
+ title
+ translator
+ type
+ volume
+ year
+ }
+ {}
+ { label }
+
+INTEGERS { output.state before.all mid.sentence after.sentence after.block }
+FUNCTION {is.print.banners.to.terminal} { #1 }
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% FILE VERSION AND BANNER %%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+FUNCTION{bst.file.version} { "0.9" }
+FUNCTION{bst.file.date} { "2015/05/09" }
+FUNCTION{bst.file.website} { "http://www.parsilatex.com" }
+FUNCTION{bst.file.authors} {"M.Amintoosi and M.Vahedi" }
+
+FUNCTION {banner.message}
+{ is.print.banners.to.terminal
+ { "-- plain-fa.bst version" " " * bst.file.version *
+ " (" * bst.file.date * ") " * %"by " * bst.file.authors *
+ top$
+ "-- This is a BibTeX style for XePersian: " bst.file.website *
+ %top$
+ %"-- See the " quote$ * "Persian-bib-userguide.pdf" * quote$ * " manual for usage information." *
+ top$
+ }
+ { skip$ }
+ if$
+}
+
+FUNCTION {completed.message}
+{ is.print.banners.to.terminal
+ { ""
+ top$
+ "Done."
+ top$
+ }
+ { skip$ }
+ if$
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% Persian Functions %%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+FUNCTION {fa.isPersianLanguage}
+{
+ language missing$
+ {#0}
+ {language "l" change.case$ "persian" =}
+ if$
+}
+
+ % Here are the language-specific definitions for explicit words.
+ % Each function has a name bbl.xxx where xxx is the English word.
+ % The languages selected here is ENGLISH and Farsi
+FUNCTION {bbl.and}
+{
+ fa.isPersianLanguage
+ {" و "}
+ {" and "}
+ if$
+}
+
+FUNCTION {bbl.editors}
+{
+fa.isPersianLanguage
+ { " ویراستاران "}
+ {" editors"}
+if$
+}
+
+FUNCTION {bbl.editor}
+{
+fa.isPersianLanguage
+ { " ویراستار "}
+ {" editor" }
+if$
+}
+
+FUNCTION {bbl.edby}
+{
+fa.isPersianLanguage
+ { " ویراسته‌ی "}
+ { " edited by " }
+if$
+}
+
+FUNCTION {bbl.edition}
+{
+fa.isPersianLanguage
+ {" ویرایش "}
+ {" edition" }
+if$
+}
+
+FUNCTION {bbl.bvolume}
+{
+fa.isPersianLanguage
+ {" جلد "}
+ { "volume"}
+if$
+}
+
+FUNCTION {bbl.volume}
+{
+fa.isPersianLanguage
+ {" جلد "}
+ { "Volume"}
+if$
+}
+
+FUNCTION {bbl.of}
+{
+fa.isPersianLanguage
+ { " از "}
+ { " of " }
+if$
+}
+
+FUNCTION {bbl.number}
+{
+fa.isPersianLanguage
+ {" شماره " }
+ { "number" }
+if$
+}
+
+FUNCTION {bbl.in}
+{
+fa.isPersianLanguage
+ {" در "}
+ { "In " }
+if$
+}
+
+FUNCTION {bbl.inInMid}
+{
+fa.isPersianLanguage
+ {" در "}
+ { " in " }
+if$
+}
+
+FUNCTION {bbl.pages}
+{
+fa.isPersianLanguage
+ {" صفحات "}
+ { "pages" }
+if$
+}
+
+FUNCTION {bbl.page}
+{
+fa.isPersianLanguage
+ {" صفحه " }
+ { "page" }
+if$
+}
+
+FUNCTION {bbl.chapter}
+{
+fa.isPersianLanguage
+ { " فصل " }
+ {"chapter" }
+if$
+}
+
+FUNCTION {bbl.techrep}
+{
+fa.isPersianLanguage
+ { " گزارش طرح تحقیقی"}
+ { "Technical Report" }
+if$
+}
+
+FUNCTION {bbl.mthesis}
+{
+fa.isPersianLanguage
+ {" پایان‌نامه کارشناسی‌ارشد"}
+ { "Master's thesis" }
+if$
+}
+
+FUNCTION {bbl.phdthesis}
+{
+fa.isPersianLanguage
+ {" پایان‌نامه دکترا" }
+ { "PhD thesis" }
+if$
+}
+
+FUNCTION {bbl.etal}
+{
+ fa.isPersianLanguage
+ {" و دیگران"}
+ {" et~al."}
+ if$
+}
+
+FUNCTION {bbl.translator}
+{
+ fa.isPersianLanguage
+ {"ترجمه‌ی "}
+ {"Translator "}
+ if$
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% End of Persian Functions %%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+FUNCTION {init.state.consts}
+{ #0 'before.all :=
+ #1 'mid.sentence :=
+ #2 'after.sentence :=
+ #3 'after.block :=
+}
+
+STRINGS { s t }
+
+FUNCTION {output.nonnull}
+{ 's :=
+ output.state mid.sentence =
+ { ", " * write$ }
+ { output.state after.block =
+{ add.period$ write$
+ newline$
+ "\newblock " write$
+}
+{ output.state before.all =
+ 'write$
+ { add.period$ " " * write$ }
+ if$
+}
+ if$
+ mid.sentence 'output.state :=
+ }
+ if$
+ s
+}
+
+FUNCTION {output}
+{ duplicate$ empty$
+ 'pop$
+ 'output.nonnull
+ if$
+}
+
+FUNCTION {output.check}
+{ 't :=
+ duplicate$ empty$
+ { pop$ "empty " t * " in " * cite$ * warning$ }
+ 'output.nonnull
+ if$
+}
+
+FUNCTION {output.bibitem}
+{
+ newline$
+ fa.isPersianLanguage
+ { skip$ }
+ {
+ "\begin{LTRbibitems}" write$
+ newline$
+ "\resetlatinfont " write$
+ }
+ if$
+ newline$
+ "\bibitem{" write$
+ cite$ write$
+ "}" write$
+ newline$
+ ""
+ before.all 'output.state :=
+}
+
+FUNCTION {fin.entry}
+{ add.period$
+ write$
+ newline$
+ fa.isPersianLanguage
+ {skip$}
+ { newline$
+ "\end{LTRbibitems}" write$
+ newline$
+ }
+ if$
+}
+
+FUNCTION {new.block}
+{ output.state before.all =
+ 'skip$
+ { after.block 'output.state := }
+ if$
+}
+
+FUNCTION {new.sentence}
+{ output.state after.block =
+ 'skip$
+ { output.state before.all =
+'skip$
+{ after.sentence 'output.state := }
+ if$
+ }
+ if$
+}
+
+FUNCTION {not}
+{ { #0 }
+ { #1 }
+ if$
+}
+
+FUNCTION {and}
+{ 'skip$
+ { pop$ #0 }
+ if$
+}
+
+FUNCTION {or}
+{ { pop$ #1 }
+ 'skip$
+ if$
+}
+
+FUNCTION {new.block.checka}
+{ empty$
+ 'skip$
+ 'new.block
+ if$
+}
+
+FUNCTION {new.block.checkb}
+{ empty$
+ swap$ empty$
+ and
+ 'skip$
+ 'new.block
+ if$
+}
+
+FUNCTION {new.sentence.checka}
+{ empty$
+ 'skip$
+ 'new.sentence
+ if$
+}
+
+FUNCTION {new.sentence.checkb}
+{ empty$
+ swap$ empty$
+ and
+ 'skip$
+ 'new.sentence
+ if$
+}
+
+FUNCTION {field.or.null}
+{ duplicate$ empty$
+ { pop$ "" }
+ 'skip$
+ if$
+}
+
+FUNCTION {emphasize}
+{ duplicate$ empty$
+ { pop$ "" }
+ { "{\em " swap$ * "}" * }
+ if$
+}
+
+INTEGERS { nameptr namesleft numnames }
+
+FUNCTION {format.names}
+{ 's :=
+ #1 'nameptr :=
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ {
+ s nameptr "{vv~}{ll}{, jj}{, ff}" format.name$ 't := %{ff~}{vv~}{ll}{, jj}
+ %fa.isPersianLanguage
+ % {s nameptr "{vv~}{ll}{, jj}{, ff}" format.name$ 't := %{ff~}{vv~}{ll}{, jj}
+ % }
+ % {s nameptr "{vv~}{ll}{, jj}{, f.}" format.name$ 't :=
+ %if$
+ nameptr #1 >
+{ namesleft #1 >
+ { ", " * t * }
+ { numnames #2 >
+ { "," * }
+ 'skip$
+ if$
+ t "others" =
+ { bbl.etal * }
+ { bbl.and * t * }
+ if$
+ }
+ if$
+}
+'t
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+}
+
+FUNCTION {format.authors}
+{ author empty$
+ { "" }
+ { author format.names }
+ if$
+}
+
+FUNCTION {format.editors}
+{ editor empty$
+ { "" }
+ { fa.isPersianLanguage
+ {
+editor num.names$ #1 >
+{bbl.editors editor format.names * }
+{bbl.editor editor format.names * }
+if$
+}
+{
+ editor format.names
+editor num.names$ #1 >
+{ ", " bbl.editors * *}
+{ ", " bbl.editor * *}
+if$
+}
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.translators}
+{ translator empty$
+ { "" }
+ { fa.isPersianLanguage
+ {
+bbl.translator translator format.names *
+}
+{
+ translator format.names
+", " bbl.translator * *
+}
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.title}
+{ title empty$
+ { "" }
+ { title "t" change.case$ }
+ if$
+}
+
+FUNCTION {n.dashify}
+{ 't :=
+ ""
+ { t empty$ not }
+ { t #1 #1 substring$ "-" =
+{ t #1 #2 substring$ "--" = not
+ { "--" *
+ t #2 global.max$ substring$ 't :=
+ }
+ { { t #1 #1 substring$ "-" = }
+{ "-" *
+ t #2 global.max$ substring$ 't :=
+}
+ while$
+ }
+ if$
+}
+{ t #1 #1 substring$ *
+ t #2 global.max$ substring$ 't :=
+}
+ if$
+ }
+ while$
+}
+
+FUNCTION {format.date}
+{ year empty$
+ { month empty$
+{ "" }
+{ "there's a month but no year in " cite$ * warning$
+ month
+}
+ if$
+ }
+ { month empty$
+'year
+{ month " " * year * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.btitle}
+{ title emphasize
+}
+
+FUNCTION {tie.or.space.connect}
+{ duplicate$ text.length$ #3 <
+ { "~" }
+ { " " }
+ if$
+ swap$ * *
+}
+
+FUNCTION {either.or.check}
+{ empty$
+ 'pop$
+ { "can't use both " swap$ * " fields in " * cite$ * warning$ }
+ if$
+}
+
+FUNCTION {format.bvolume}
+{ volume empty$
+ { "" }
+ { bbl.bvolume volume tie.or.space.connect
+ series empty$
+ 'skip$
+ { bbl.of * series emphasize * }
+ if$
+ "volume and number" number either.or.check
+ }
+ if$
+}
+
+FUNCTION {format.number.series}
+{ volume empty$
+ { number empty$
+{ series field.or.null }
+{ output.state mid.sentence =
+ { bbl.number }
+ { bbl.number "t" change.case$ }
+ if$
+ number tie.or.space.connect
+ series empty$
+ { "there's a number but no series in " cite$ * warning$ }
+ { bbl.inInMid * series * }
+ if$
+}
+ if$
+ }
+ { "" }
+ if$
+}
+
+FUNCTION {format.edition}
+{ edition empty$
+ { "" }
+ { fa.isPersianLanguage
+ {
+ bbl.edition edition *
+}
+{
+ output.state mid.sentence =
+ { edition "l" change.case$ bbl.edition * }
+ { edition "t" change.case$ bbl.edition * }
+ if$
+}
+ if$
+ }
+ if$
+}
+
+INTEGERS { multiresult }
+
+FUNCTION {multi.page.check}
+{ 't :=
+ #0 'multiresult :=
+ { multiresult not
+ t empty$ not
+ and
+ }
+ { t #1 #1 substring$
+ duplicate$ "-" =
+ swap$ duplicate$ "," =
+ swap$ "+" =
+ or or
+{ #1 'multiresult := }
+{ t #2 global.max$ substring$ 't := }
+ if$
+ }
+ while$
+ multiresult
+}
+
+FUNCTION {format.pages}
+{ pages empty$
+ { "" }
+ { pages multi.page.check
+ { bbl.pages pages n.dashify tie.or.space.connect }
+ { bbl.page pages tie.or.space.connect }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.vol.num.pages}
+{ volume field.or.null
+ number empty$
+ 'skip$
+ { "(" number * ")" * *
+ volume empty$
+{ "there's a number but no volume in " cite$ * warning$ }
+'skip$
+ if$
+ }
+ if$
+ pages empty$
+ 'skip$
+ { duplicate$ empty$
+{ pop$ format.pages }
+{ ":" * pages n.dashify * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.chapter.pages}
+{ chapter empty$
+ 'format.pages
+ { type empty$
+{ bbl.chapter }
+{ type "l" change.case$ }
+ if$
+ chapter tie.or.space.connect
+ pages empty$
+'skip$
+{ ", " * format.pages * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.in.ed.booktitle}
+{
+ booktitle empty$
+ { "" }
+ { editor empty$
+ { bbl.in booktitle emphasize * }
+ { bbl.in format.editors * ", " * booktitle emphasize * }
+ if$
+}
+ if$
+}
+
+FUNCTION {empty.misc.check}
+{ author empty$ title empty$ howpublished empty$
+ month empty$ year empty$ note empty$
+ and and and and and
+ key empty$ not and
+ { "all relevant fields are empty in " cite$ * warning$ }
+ 'skip$
+ if$
+}
+
+FUNCTION {format.thesis.type}
+{ type empty$
+ 'skip$
+ { pop$
+ type "t" change.case$
+ }
+ if$
+}
+
+FUNCTION {format.tr.number}
+{ type empty$
+ { bbl.techrep }
+ 'type
+ if$
+ number empty$
+ { "t" change.case$ }
+ { number tie.or.space.connect }
+ if$
+}
+
+FUNCTION {format.article.crossref}
+{ key empty$
+ { journal empty$
+{ "need key or journal for " cite$ * " to crossref " * crossref *
+ warning$
+ ""
+}
+{ bbl.in "{\em " * journal * "\/}" * }
+ if$
+ }
+ { bbl.in key * }
+ if$
+ " \cite{" * crossref * "}" *
+}
+
+FUNCTION {format.crossref.editor}
+{ editor #1 "{vv~}{ll}" format.name$
+ editor num.names$ duplicate$ #2 >
+ { pop$ bbl.etal * }
+ { #2 < 'skip$
+ { editor #2 "{ff }{vv }{ll}{ jj}" format.name$ "others" =%"{ff }{vv }{ll}{ jj}"
+ { bbl.etal * }
+ { bbl.and * editor #2 "{vv~}{ll}" format.name$ * }
+ if$
+ }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.book.crossref}
+{ volume empty$
+ { "empty volume in " cite$ * "'s crossref of " * crossref * warning$
+ bbl.in
+ }
+ { bbl.volume volume tie.or.space.connect
+ bbl.of *
+ }
+ if$
+ editor empty$
+ editor field.or.null author field.or.null =
+ or
+ { key empty$
+{ series empty$
+ { "need editor, key, or series for " cite$ * " to crossref " *
+ crossref * warning$
+ "" *
+ }
+ { "{\em " * series * "\/}" * }
+ if$
+}
+{ key * }
+ if$
+ }
+ { format.crossref.editor * }
+ if$
+ " \cite{" * crossref * "}" *
+}
+
+FUNCTION {format.incoll.inproc.crossref}
+{ editor empty$
+ editor field.or.null author field.or.null =
+ or
+ { key empty$
+{ booktitle empty$
+ { "need editor, key, or booktitle for " cite$ * " to crossref " *
+ crossref * warning$
+ ""
+ }
+ { bbl.in " {\em " * booktitle * "\/}" * }
+ if$
+}
+{ bbl.in key * }
+ if$
+ }
+ { bbl.in format.crossref.editor * }
+ if$
+ " \cite{" * crossref * "}" *
+}
+
+FUNCTION {article}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.title "title" output.check
+ new.block
+ crossref missing$
+ { journal emphasize "journal" output.check
+ format.vol.num.pages output
+ format.date "year" output.check
+ }
+ { format.article.crossref output.nonnull
+ format.pages output
+ }
+ if$
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {book}
+{ output.bibitem
+ fa.isPersianLanguage
+ {
+format.authors output
+ new.block
+ format.btitle "title" output.check
+new.block
+ format.translators output
+format.editors output
+ }
+ { author empty$
+ { format.editors "author and editor" output.check }
+ { format.authors output.nonnull
+ crossref missing$
+ { "author and editor" editor either.or.check }
+ 'skip$
+ if$
+ }
+ if$
+ new.block
+ format.btitle "title" output.check
+ }
+ if$
+ crossref missing$
+ { format.bvolume output
+ new.block
+ format.number.series output
+ new.sentence
+ publisher "publisher" output.check
+ address output
+ }
+ { new.block
+ format.book.crossref output.nonnull
+ }
+ if$
+ format.edition output
+ format.date "year" output.check
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {booklet}
+{ output.bibitem
+ format.authors output
+ new.block
+ format.title "title" output.check
+ howpublished address new.block.checkb
+ howpublished output
+ address output
+ format.date output
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {inbook}
+{ output.bibitem
+ author empty$
+ { format.editors "author and editor" output.check }
+ { format.authors output.nonnull
+ crossref missing$
+{ "author and editor" editor either.or.check }
+'skip$
+ if$
+ }
+ if$
+ new.block
+ format.btitle "title" output.check
+ crossref missing$
+ { format.bvolume output
+ format.chapter.pages "chapter and pages" output.check
+ new.block
+ format.number.series output
+ new.sentence
+ publisher "publisher" output.check
+ address output
+ }
+ { format.chapter.pages "chapter and pages" output.check
+ new.block
+ format.book.crossref output.nonnull
+ }
+ if$
+ format.edition output
+ format.date "year" output.check
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {incollection}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.title "title" output.check
+ new.block
+ crossref missing$
+ { format.in.ed.booktitle "booktitle" output.check
+ format.bvolume output
+ format.number.series output
+ format.chapter.pages output
+ new.sentence
+ publisher "publisher" output.check
+ address output
+ format.edition output
+ format.date "year" output.check
+ }
+ { format.incoll.inproc.crossref output.nonnull
+ format.chapter.pages output
+ }
+ if$
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {inproceedings}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.title "title" output.check
+ new.block
+ crossref missing$
+ { format.in.ed.booktitle "booktitle" output.check
+ format.bvolume output
+ format.number.series output
+ format.pages output
+ address empty$
+{ organization publisher new.sentence.checkb
+ organization output
+ publisher output
+ format.date "year" output.check
+}
+{ address output.nonnull
+ format.date "year" output.check
+ new.sentence
+ organization output
+ publisher output
+}
+ if$
+ }
+ { format.incoll.inproc.crossref output.nonnull
+ format.pages output
+ }
+ if$
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {conference} { inproceedings }
+
+FUNCTION {manual}
+{ output.bibitem
+ author empty$
+ { organization empty$
+'skip$
+{ organization output.nonnull
+ address output
+}
+ if$
+ }
+ { format.authors output.nonnull }
+ if$
+ new.block
+ format.btitle "title" output.check
+ author empty$
+ { organization empty$
+{ address new.block.checka
+ address output
+}
+'skip$
+ if$
+ }
+ { organization address new.block.checkb
+ organization output
+ address output
+ }
+ if$
+ format.edition output
+ format.date output
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {mastersthesis}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.title "title" output.check
+ new.block
+ bbl.mthesis
+ format.thesis.type output.nonnull
+ school "school" output.check
+ address output
+ format.date "year" output.check
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {misc}
+{ output.bibitem
+ format.authors output
+ title howpublished new.block.checkb
+ format.title output
+ howpublished new.block.checka
+ howpublished output
+ format.date output
+ new.block
+ note output
+ fin.entry
+ empty.misc.check
+}
+
+FUNCTION {phdthesis}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.btitle "title" output.check
+ new.block
+ bbl.phdthesis
+ format.thesis.type output.nonnull
+ school "school" output.check
+ address output
+ format.date "year" output.check
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {proceedings}
+{ output.bibitem
+ editor empty$
+ { organization output }
+ { format.editors output.nonnull }
+ if$
+ new.block
+ format.btitle "title" output.check
+ format.bvolume output
+ format.number.series output
+ address empty$
+ { editor empty$
+{ publisher new.sentence.checka }
+{ organization publisher new.sentence.checkb
+ organization output
+}
+ if$
+ publisher output
+ format.date "year" output.check
+ }
+ { address output.nonnull
+ format.date "year" output.check
+ new.sentence
+ editor empty$
+'skip$
+{ organization output }
+ if$
+ publisher output
+ }
+ if$
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {techreport}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.title "title" output.check
+ new.block
+ format.tr.number output.nonnull
+ institution "institution" output.check
+ address output
+ format.date "year" output.check
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {unpublished}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.title "title" output.check
+ new.block
+ note "note" output.check
+ format.date output
+ fin.entry
+}
+
+FUNCTION {default.type} { misc }
+
+MACRO {jan} {"January"}
+
+MACRO {feb} {"February"}
+
+MACRO {mar} {"March"}
+
+MACRO {apr} {"April"}
+
+MACRO {may} {"May"}
+
+MACRO {jun} {"June"}
+
+MACRO {jul} {"July"}
+
+MACRO {aug} {"August"}
+
+MACRO {sep} {"September"}
+
+MACRO {oct} {"October"}
+
+MACRO {nov} {"November"}
+
+MACRO {dec} {"December"}
+
+MACRO {acmcs} {"ACM Computing Surveys"}
+
+MACRO {acta} {"Acta Informatica"}
+
+MACRO {cacm} {"Communications of the ACM"}
+
+MACRO {ibmjrd} {"IBM Journal of Research and Development"}
+
+MACRO {ibmsj} {"IBM Systems Journal"}
+
+MACRO {ieeese} {"IEEE Transactions on Software Engineering"}
+
+MACRO {ieeetc} {"IEEE Transactions on Computers"}
+
+MACRO {ieeetcad}
+ {"IEEE Transactions on Computer-Aided Design of Integrated Circuits"}
+
+MACRO {ipl} {"Information Processing Letters"}
+
+MACRO {jacm} {"Journal of the ACM"}
+
+MACRO {jcss} {"Journal of Computer and System Sciences"}
+
+MACRO {scp} {"Science of Computer Programming"}
+
+MACRO {sicomp} {"SIAM Journal on Computing"}
+
+MACRO {tocs} {"ACM Transactions on Computer Systems"}
+
+MACRO {tods} {"ACM Transactions on Database Systems"}
+
+MACRO {tog} {"ACM Transactions on Graphics"}
+
+MACRO {toms} {"ACM Transactions on Mathematical Software"}
+
+MACRO {toois} {"ACM Transactions on Office Information Systems"}
+
+MACRO {toplas} {"ACM Transactions on Programming Languages and Systems"}
+
+MACRO {tcs} {"Theoretical Computer Science"}
+
+READ
+
+FUNCTION {sortify}
+{
+ fa.isPersianLanguage
+ { "l" change.case$}
+ {purify$ "l" change.case$}
+ if$
+ %duplicate$ write$
+}
+
+INTEGERS { len }
+
+FUNCTION {chop.word}
+{ 's :=
+ 'len :=
+ s #1 len substring$ =
+ { s len #1 + global.max$ substring$ }
+ 's
+ if$
+}
+
+FUNCTION {sort.format.names}
+{ 's :=
+ #1 'nameptr :=
+ ""
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ { nameptr #1 >
+ { " " * }
+ 'skip$
+ if$
+ s nameptr "{vv{ } }{ll{ }}{ ff{ }}{ jj{ }}" format.name$ 't :=
+ nameptr numnames = t "others" = and
+ { bbl.etal * }
+ %{ t write$ t sortify * t write$ }
+ { t sortify * }
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+}
+
+FUNCTION {sort.format.title}
+{ 't :=
+ "A " #2
+ "An " #3
+ "The " #4 t chop.word
+ chop.word
+ chop.word
+ sortify
+ #1 global.max$ substring$
+}
+
+FUNCTION {author.sort}
+{ author empty$
+ { key empty$
+ { "to sort, need author or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { author sort.format.names }
+ if$
+}
+
+FUNCTION {author.editor.sort}
+{ author empty$
+ { editor empty$
+{ key empty$
+ { "to sort, need author, editor, or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+}
+{ editor sort.format.names }
+ if$
+ }
+ { author sort.format.names }
+ if$
+}
+
+FUNCTION {author.organization.sort}
+{ author empty$
+ { organization empty$
+{ key empty$
+ { "to sort, need author, organization, or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+}
+{ "The " #4 organization chop.word sortify }
+ if$
+ }
+ { author sort.format.names }
+ if$
+}
+
+FUNCTION {editor.organization.sort}
+{ editor empty$
+ { organization empty$
+{ key empty$
+ { "to sort, need editor, organization, or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+}
+{ "The " #4 organization chop.word sortify }
+ if$
+ }
+ { editor sort.format.names }
+ if$
+}
+
+FUNCTION {presort}
+{ type$ "book" =
+ type$ "inbook" =
+ or
+ 'author.editor.sort
+ { type$ "proceedings" =
+'editor.organization.sort
+{ type$ "manual" =
+ 'author.organization.sort
+ 'author.sort
+ if$
+}
+ if$
+ }
+ if$
+ " "
+ *
+ year field.or.null sortify
+ *
+ " "
+ *
+ title field.or.null
+ sort.format.title
+ *
+ #1 entry.max$ substring$
+ 'sort.key$ :=
+}
+
+ITERATE {presort}
+
+SORT
+
+STRINGS { longest.label }
+
+INTEGERS { number.label longest.label.width }
+
+FUNCTION {initialize.longest.label}
+{ "" 'longest.label :=
+ #1 'number.label :=
+ #0 'longest.label.width :=
+}
+
+FUNCTION {longest.label.pass}
+{ number.label int.to.str$ 'label :=
+ number.label #1 + 'number.label :=
+ label width$ longest.label.width >
+ { label 'longest.label :=
+ label width$ 'longest.label.width :=
+ }
+ 'skip$
+ if$
+}
+
+EXECUTE {banner.message}
+EXECUTE {initialize.longest.label}
+
+ITERATE {longest.label.pass}
+
+FUNCTION {begin.bib}
+{
+ "% Generated by plain-fa.bst, version: " bst.file.version * " (" * bst.file.date * "), for XePersian Package" *
+ write$ newline$
+ "% Authors: " bst.file.authors *
+ write$ newline$
+ "\providecommand{\noopsort}[1]{}"
+ write$ newline$
+ preamble$ empty$
+ 'skip$
+ { preamble$ write$ newline$ }
+ if$
+ "\begin{thebibliography}{" longest.label * "}" * write$ newline$
+}
+
+EXECUTE {begin.bib}
+
+EXECUTE {init.state.consts}
+
+ITERATE {call.type$}
+
+FUNCTION {end.bib}
+{ newline$
+ "\end{thebibliography}" write$ newline$
+}
+
+EXECUTE {end.bib}
+EXECUTE{completed.message}
+%% End of file `plain-fa.bst'.
diff --git a/biblio/bibtex/contrib/persian-bib/plainnat-fa.bst b/biblio/bibtex/contrib/persian-bib/plainnat-fa.bst
new file mode 100644
index 0000000000..115a67fa47
--- /dev/null
+++ b/biblio/bibtex/contrib/persian-bib/plainnat-fa.bst
@@ -0,0 +1,1917 @@
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% Bib. style "plainnat-fa", Persian (farsi) version of plainnat.bst
+%%
+%% by: Mahmood Amintoosi, m.amintoosi@gmail.com, www.parsilatex.com
+
+%% For XePersian, a Persian Typesetting Package in XeTeX
+%% It may be distributed and/or modified under the
+%% conditions of the LaTeX Project Public License (version 1.3c),
+%% either this version of this license or (at your option) any later version.
+%%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%%
+%% Original Copyright
+%% File: `plainnat.bst'
+%% A modification of `plain.bst' for use with natbib package
+%%
+%% Copyright 1993-2007 Patrick W Daly
+%% Max-Planck-Institut f\"ur Sonnensystemforschung
+%% Max-Planck-Str. 2
+%% D-37191 Katlenburg-Lindau
+%% Germany
+%% E-mail: daly@mps.mpg.de
+%%
+%% This program can be redistributed and/or modified under the terms
+%% of the LaTeX Project Public License Distributed from CTAN
+%% archives in directory macros/latex/base/lppl.txt; either
+%% version 1 of the License, or any later version.
+%%
+ % Version and source file information:
+ % \ProvidesFile{natbst.mbs}[2007/11/26 1.93 (PWD)]
+ %
+ % BibTeX `plainnat' family
+ % version 0.99b for BibTeX versions 0.99a or later,
+ % for LaTeX versions 2.09 and 2e.
+ %
+ % For use with the `natbib.sty' package; emulates the corresponding
+ % member of the `plain' family, but with author-year citations.
+ %
+ % With version 6.0 of `natbib.sty', it may also be used for numerical
+ % citations, while retaining the commands \citeauthor, \citefullauthor,
+ % and \citeyear to print the corresponding information.
+ %
+ % For version 7.0 of `natbib.sty', the KEY field replaces missing
+ % authors/editors, and the date is left blank in \bibitem.
+ %
+ % Includes field EID for the sequence/citation number of electronic journals
+ % which is used instead of page numbers.
+ %
+ % Includes fields ISBN and ISSN.
+ %
+ % Includes field URL for Internet addresses.
+ %
+ % Includes field DOI for Digital Object Idenfifiers.
+ %
+ % Works best with the url.sty package of Donald Arseneau.
+ %
+ % Works with identical authors and year are further sorted by
+ % citation key, to preserve any natural sequence.
+ %
+
+ENTRY
+ { address
+ author
+ authorfa
+ booktitle
+ chapter
+ doi
+ eid
+ edition
+ editor
+ howpublished
+ institution
+ isbn
+ issn
+ journal
+ key
+ language
+ month
+ note
+ number
+ organization
+ pages
+ publisher
+ school
+ series
+ title
+ translator
+ type
+ url
+ volume
+ year
+ }
+ {}
+ { label extra.label sort.label short.list }
+
+
+INTEGERS { output.state before.all mid.sentence after.sentence after.block fa.isInLabel}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% Persian Functions %%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+FUNCTION {fa.isPersianLanguage}
+{
+ language missing$
+ {#0}
+ {language "l" change.case$ "persian" =}
+ if$
+}
+
+% Here are the language-specific definitions for explicit words.
+ % Each function has a name bbl.xxx where xxx is the English word.
+ % The languages selected here is ENGLISH and Farsi
+FUNCTION {bbl.and}
+{
+fa.isInLabel
+{" و "}% If authorfa exists
+{
+ fa.isPersianLanguage
+ {" و "}
+ {" and "}
+ if$
+}
+if$
+}
+
+FUNCTION {bbl.editors}
+{
+fa.isPersianLanguage
+ { " ویراستاران "}
+ { " editors"}
+if$
+}
+
+FUNCTION {bbl.editor}
+{
+fa.isPersianLanguage
+ { "ویراستار "}
+ { " editor" }
+if$
+}
+
+FUNCTION {bbl.edby}
+{
+fa.isPersianLanguage
+ { " ویراسته‌ی "}
+ { " edited by " }
+if$
+}
+
+FUNCTION {bbl.edition}
+{
+fa.isPersianLanguage
+ {" ویرایش "}
+ {" edition" }
+if$
+}
+
+FUNCTION {bbl.bvolume}
+{
+fa.isPersianLanguage
+ {" جلد "}
+ { "volume"}
+if$
+}
+
+FUNCTION {bbl.volume}
+{
+fa.isPersianLanguage
+ {" جلد "}
+ { "Volume"}
+if$
+}
+
+FUNCTION {bbl.of}
+{
+fa.isPersianLanguage
+ { " از "}
+ { " of " }
+if$
+}
+
+FUNCTION {bbl.number}
+{
+fa.isPersianLanguage
+ {" شماره " }
+ { "number" }
+if$
+}
+
+FUNCTION {bbl.in}
+{
+fa.isPersianLanguage
+ {" در "}
+ { " in " }
+
+if$
+}
+
+FUNCTION {bbl.inInMid}
+{
+fa.isPersianLanguage
+ {" در "}
+ { "In " }
+
+if$
+}
+
+FUNCTION {bbl.pages}
+{
+fa.isPersianLanguage
+ {" صفحات "}
+ { "pages" }
+if$
+}
+
+FUNCTION {bbl.page}
+{
+fa.isPersianLanguage
+ {" صفحه " }
+ { "page" }
+if$
+}
+
+FUNCTION {bbl.chapter}
+{
+fa.isPersianLanguage
+ { " فصل " }
+ {"chapter" }
+if$
+}
+
+FUNCTION {bbl.techrep}
+{
+fa.isPersianLanguage
+ { " گزارش طرح تحقیقی"}
+ { "Technical Report" }
+if$
+}
+
+FUNCTION {bbl.mthesis}
+{
+fa.isPersianLanguage
+ {" پایان‌نامه کارشناسی‌ارشد"}
+ { " Master's thesis" }
+if$
+}
+
+FUNCTION {bbl.phdthesis}
+{
+fa.isPersianLanguage
+ {" پایان‌نامه دکترا" }
+ { " PhD thesis" }
+if$
+}
+
+FUNCTION {bbl.first}
+{ "1st" }
+
+FUNCTION {bbl.second}
+{ "2nd" }
+
+FUNCTION {bbl.third}
+{ "3rd" }
+
+FUNCTION {bbl.fourth}
+{ "4th" }
+
+FUNCTION {bbl.fifth}
+{ "5th" }
+
+FUNCTION {bbl.st}
+{ "st" }
+
+FUNCTION {bbl.nd}
+{ "nd" }
+
+FUNCTION {bbl.rd}
+{ "rd" }
+
+FUNCTION {bbl.th}
+{ "th" }
+
+% Added by M.Amintoosi
+FUNCTION {bbl.etal}
+{
+fa.isInLabel
+{" و دیگران"}% If authorfa exists
+{
+ fa.isPersianLanguage
+ {" و دیگران"}
+ {" et~al."}
+ if$
+}
+if$
+}
+
+FUNCTION {bbl.translator}
+{
+fa.isPersianLanguage
+ { " ترجمه‌ی "}
+ {" Translated by "}
+
+if$
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% End of Persian Functions %%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+FUNCTION {init.state.consts}
+{ #0 'before.all :=
+ #1 'mid.sentence :=
+ #2 'after.sentence :=
+ #3 'after.block :=
+}
+
+STRINGS { s t }
+
+FUNCTION {output.nonnull}
+{ 's :=
+ output.state mid.sentence =
+ { ", " * write$ }
+ { output.state after.block =
+ { add.period$ write$
+ newline$
+ "\newblock " write$
+ }
+ { output.state before.all =
+ 'write$
+ { add.period$ " " * write$ }
+ if$
+ }
+ if$
+ mid.sentence 'output.state :=
+ }
+ if$
+ s
+}
+
+FUNCTION {output}
+{ duplicate$ empty$
+ 'pop$
+ 'output.nonnull
+ if$
+}
+
+FUNCTION {output.check}
+{ 't :=
+ duplicate$ empty$
+ { pop$ "empty " t * " in " * cite$ * warning$ }
+ 'output.nonnull
+ if$
+}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+FUNCTION {fin.entry}
+{ add.period$
+ write$
+ newline$
+ fa.isPersianLanguage
+ {skip$}
+ { newline$
+ "\end{LTRbibitems}" write$
+ newline$
+ }
+ if$
+}
+
+FUNCTION {new.block}
+{ output.state before.all =
+ 'skip$
+ { after.block 'output.state := }
+ if$
+}
+
+FUNCTION {new.sentence}
+{ output.state after.block =
+ 'skip$
+ { output.state before.all =
+ 'skip$
+ { after.sentence 'output.state := }
+ if$
+ }
+ if$
+}
+
+FUNCTION {not}
+{ { #0 }
+ { #1 }
+ if$
+}
+
+FUNCTION {and}
+{ 'skip$
+ { pop$ #0 }
+ if$
+}
+
+FUNCTION {or}
+{ { pop$ #1 }
+ 'skip$
+ if$
+}
+
+FUNCTION {new.block.checka}
+{ empty$
+ 'skip$
+ 'new.block
+ if$
+}
+
+FUNCTION {new.block.checkb}
+{ empty$
+ swap$ empty$
+ and
+ 'skip$
+ 'new.block
+ if$
+}
+
+FUNCTION {new.sentence.checka}
+{ empty$
+ 'skip$
+ 'new.sentence
+ if$
+}
+
+FUNCTION {new.sentence.checkb}
+{ empty$
+ swap$ empty$
+ and
+ 'skip$
+ 'new.sentence
+ if$
+}
+
+FUNCTION {field.or.null}
+{ duplicate$ empty$
+ { pop$ "" }
+ 'skip$
+ if$
+}
+
+FUNCTION {emphasize}
+{ duplicate$ empty$
+ { pop$ "" }
+ { "\emph{" swap$ * "}" * }
+ if$
+}
+
+INTEGERS { nameptr namesleft numnames }
+
+FUNCTION {format.names}
+{ 's :=
+ #1 'nameptr :=
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+
+
+
+ { s nameptr "{ff~}{vv~}{ll}{, jj}" format.name$ 't :=
+
+
+
+ nameptr #1 >
+ { namesleft #1 >
+ { ", " * t * }
+ { numnames #2 >
+ { "," * }
+ 'skip$
+ if$
+ t "others" =
+ { bbl.etal * }
+ { bbl.and * t * }
+ if$
+ }
+ if$
+ }
+ 't
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+}
+
+FUNCTION {format.key}
+{ empty$
+ { key field.or.null }
+ { "" }
+ if$
+}
+
+FUNCTION {format.authors}
+{ author empty$
+ { "" }
+ { author format.names }
+ if$
+}
+
+FUNCTION {format.editors}
+{ editor empty$
+ { "" }
+ {fa.isPersianLanguage
+ {editor num.names$ #1 >
+
+
+ {bbl.editors editor format.names * }
+ {bbl.editor editor format.names * }
+ if$
+ }
+ {
+ editor format.names
+ editor num.names$ #1 >
+ { ", " bbl.editors * *}
+ { ", " bbl.editor * *}
+ if$
+ }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.translators}
+{ translator empty$
+ { "" }
+ { fa.isPersianLanguage
+ {
+ bbl.translator translator format.names *
+ }
+ {
+ translator format.names
+ ", " bbl.translator * *
+ }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.isbn}
+{ isbn empty$
+ { "" }
+ { new.block "ISBN " isbn * }
+ if$
+}
+
+FUNCTION {format.issn}
+{ issn empty$
+ { "" }
+ { new.block "ISSN " issn * }
+ if$
+}
+
+FUNCTION {format.url}
+{ url empty$
+ { "" }
+ {
+ fa.isPersianLanguage
+ {new.block "\url{" url * "}" * }
+ {new.block "URL \url{" url * "}" * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.doi}
+{ doi empty$
+ { "" }
+ { new.block "\doi{" doi * "}" * }
+ if$
+}
+
+FUNCTION {format.title}
+{ title empty$
+ { "" }
+ { title "t" change.case$ }
+ if$
+}
+
+FUNCTION {format.full.names}
+{'s :=
+ #1 'nameptr :=
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ { s nameptr
+ "{vv~}{ll}" format.name$ 't :=
+ nameptr #1 >
+ {
+ namesleft #1 >
+ { ", " * t * }
+ {
+ numnames #2 >
+ { "," * }
+ 'skip$
+ if$
+ t "others" =
+ { bbl.etal * }
+ { bbl.and * t * }
+ if$
+ }
+ if$
+ }
+ 't
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+}
+
+FUNCTION {author.editor.full}
+{ author empty$
+ { editor empty$
+ { "" }
+ { editor format.full.names }
+ if$
+ }
+ { author format.full.names }
+ if$
+}
+
+FUNCTION {author.full}
+{ author empty$
+ { "" }
+ { author format.full.names }
+ if$
+}
+
+FUNCTION {editor.full}
+{ editor empty$
+ { "" }
+ { editor format.full.names }
+ if$
+}
+
+FUNCTION {make.full.names}
+{ type$ "book" =
+ type$ "inbook" =
+ or
+ 'author.editor.full
+ { type$ "proceedings" =
+ 'editor.full
+ 'author.full
+ if$
+ }
+ if$
+}
+
+FUNCTION {output.bibitem}
+{
+ #0 'fa.isInLabel := %Initialize fa.isInLabel
+ newline$
+ fa.isPersianLanguage
+ { skip$ }
+ {
+ "\begin{LTRbibitems}" write$
+ newline$
+ "\resetlatinfont " write$
+ }
+ if$
+ newline$
+ "\bibitem[" write$
+ label write$
+ ")" make.full.names duplicate$ short.list =
+ { pop$ }
+ { * }
+ if$
+ "]{" * write$
+ cite$ write$
+ "}" write$
+ newline$
+ ""
+ before.all 'output.state :=
+}
+
+FUNCTION {n.dashify}
+{ 't :=
+ ""
+ { t empty$ not }
+ { t #1 #1 substring$ "-" =
+ { t #1 #2 substring$ "--" = not
+ { "--" *
+ t #2 global.max$ substring$ 't :=
+ }
+ { { t #1 #1 substring$ "-" = }
+ { "-" *
+ t #2 global.max$ substring$ 't :=
+ }
+ while$
+ }
+ if$
+ }
+ { t #1 #1 substring$ *
+ t #2 global.max$ substring$ 't :=
+ }
+ if$
+ }
+ while$
+}
+
+FUNCTION {format.date}
+{ year duplicate$ empty$
+
+
+
+ { "empty year in " cite$ * warning$
+ pop$ "" }
+ 'skip$
+
+
+ if$
+ month empty$
+ 'skip$
+ { month
+ " " * swap$ *
+ }
+
+
+
+ if$
+ extra.label *
+}
+
+
+
+FUNCTION {format.btitle}
+{ title emphasize
+}
+
+FUNCTION {tie.or.space.connect}
+{ duplicate$ text.length$ #3 <
+ { "~" }
+ { " " }
+ if$
+ swap$ * *
+}
+
+FUNCTION {either.or.check}
+{ empty$
+ 'pop$
+ { "can't use both " swap$ * " fields in " * cite$ * warning$ }
+ if$
+}
+
+FUNCTION {format.bvolume}
+{ volume empty$
+ { "" }
+ { bbl.bvolume volume tie.or.space.connect
+ series empty$
+ 'skip$
+ { bbl.of * series emphasize * }
+ if$
+ "volume and number" number either.or.check
+ }
+ if$
+}
+
+FUNCTION {format.number.series}
+{ volume empty$
+ { number empty$
+ { series field.or.null }
+ { output.state mid.sentence =
+ { bbl.number }
+ { bbl.number "t" change.case$ }
+
+ if$
+ number tie.or.space.connect
+ series empty$
+ { "there's a number but no series in " cite$ * warning$ }
+ { bbl.inInMid * series * }
+ if$
+ }
+ if$
+ }
+ { "" }
+ if$
+}
+
+FUNCTION {format.edition}
+{edition empty$
+ { "" }
+
+ { fa.isPersianLanguage
+ {
+ bbl.edition edition *
+}
+{
+ output.state mid.sentence =
+ { edition "l" change.case$ bbl.edition * }
+ { edition "t" change.case$ bbl.edition * }
+ if$
+}
+ if$
+ }
+ if$
+}
+
+INTEGERS { multiresult }
+
+FUNCTION {multi.page.check}
+{ 't :=
+ #0 'multiresult :=
+ { multiresult not
+ t empty$ not
+ and
+ }
+ { t #1 #1 substring$
+ duplicate$ "-" =
+ swap$ duplicate$ "," =
+ swap$ "+" =
+ or or
+ { #1 'multiresult := }
+ { t #2 global.max$ substring$ 't := }
+ if$
+ }
+ while$
+ multiresult
+}
+
+FUNCTION {format.pages}
+{ pages empty$
+ { "" }
+ { pages multi.page.check
+ { bbl.pages pages n.dashify tie.or.space.connect }
+ { bbl.page pages tie.or.space.connect }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.eid}
+{ eid empty$
+ { "" }
+ { "art." eid tie.or.space.connect }
+ if$
+}
+
+FUNCTION {format.vol.num.pages}
+{ volume field.or.null
+ number empty$
+ 'skip$
+ { "\penalty0 (" number * ")" * *
+ volume empty$
+ { "there's a number but no volume in " cite$ * warning$ }
+ 'skip$
+ if$
+ }
+ if$
+ pages empty$
+ 'skip$
+ { duplicate$ empty$
+ { pop$ format.pages }
+ { ":\penalty0 " * pages n.dashify * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.vol.num.eid}
+{ volume field.or.null
+ number empty$
+ 'skip$
+ { "\penalty0 (" number * ")" * *
+ volume empty$
+ { "there's a number but no volume in " cite$ * warning$ }
+ 'skip$
+ if$
+ }
+ if$
+ eid empty$
+ 'skip$
+ { duplicate$ empty$
+ { pop$ format.eid }
+ { ":\penalty0 " * eid * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.chapter.pages}
+{ chapter empty$
+ 'format.pages
+ { type empty$
+ { bbl.chapter }
+ { type "l" change.case$ }
+ if$
+ chapter tie.or.space.connect
+ pages empty$
+ 'skip$
+ { ", " * format.pages * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.in.ed.booktitle}
+{ booktitle empty$
+
+
+ { "" }
+ { editor empty$
+ { bbl.in booktitle emphasize * }
+ { bbl.in format.editors * ", " * booktitle emphasize * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {empty.misc.check}
+{ author empty$ title empty$ howpublished empty$
+ month empty$ year empty$ note empty$
+ and and and and and
+ key empty$ not and
+ { "all relevant fields are empty in " cite$ * warning$ }
+ 'skip$
+ if$
+}
+
+FUNCTION {format.thesis.type}
+{ type empty$
+ 'skip$
+ { pop$
+ type "t" change.case$
+ }
+ if$
+}
+
+FUNCTION {format.tr.number}
+{ type empty$
+ { bbl.techrep }
+ 'type
+ if$
+ number empty$
+ { "t" change.case$ }
+ { number tie.or.space.connect }
+ if$
+}
+
+FUNCTION {format.article.crossref}
+{ key empty$
+ { journal empty$
+ { "need key or journal for " cite$ * " to crossref " * crossref *
+ warning$
+ ""
+ }
+ { bbl.in "\emph{" * journal * "}" * }
+ if$
+ }
+ { bbl.in }
+ if$
+ " \citet{" * crossref * "}" *
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+}
+
+FUNCTION {format.book.crossref}
+{ volume empty$
+ { "empty volume in " cite$ * "'s crossref of " * crossref * warning$
+ bbl.in
+ }
+ { bbl.volume volume tie.or.space.connect
+ bbl.of *
+ }
+ if$
+ editor empty$
+ editor field.or.null author field.or.null =
+ or
+ { key empty$
+ { series empty$
+ { "need editor, key, or series for " cite$ * " to crossref " *
+ crossref * warning$
+ "" *
+ }
+ { "\emph{" * series * "}" * }
+
+ if$
+ }
+ 'skip$
+
+ if$
+ }
+ 'skip$
+
+ if$
+ " \citet{" * crossref * "}" *
+}
+
+FUNCTION {format.incoll.inproc.crossref}
+{ editor empty$
+ editor field.or.null author field.or.null =
+ or
+ { key empty$
+ { booktitle empty$
+ { "need editor, key, or booktitle for " cite$ * " to crossref " *
+ crossref * warning$
+ ""
+ }
+ { bbl.in "\emph{" * booktitle * "}" * }
+ if$
+ }
+ { bbl.in }
+ if$
+ }
+ { bbl.in }
+ if$
+ " \citet{" * crossref * "}" *
+}
+
+FUNCTION {article}
+{ output.bibitem
+ format.authors "author" output.check
+ author format.key output
+ new.block
+ format.title "title" output.check
+ new.block
+ crossref missing$
+ { journal emphasize "journal" output.check
+ eid empty$
+ { format.vol.num.pages output }
+ { format.vol.num.eid output }
+ if$
+ format.date "year" output.check
+ }
+ { format.article.crossref output.nonnull
+ eid empty$
+ { format.pages output }
+ { format.eid output }
+ if$
+ }
+ if$
+ format.issn output
+ format.doi output
+ format.url output
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {book}
+{ output.bibitem
+
+fa.isPersianLanguage
+ {
+ format.authors output
+ author format.key output
+ new.block
+ format.btitle "title" output.check
+ new.block
+ format.translators output
+ format.editors output
+ }
+ { author empty$
+ { format.editors "author and editor" output.check
+ editor format.key output
+ }
+
+ { format.authors output.nonnull
+ crossref missing$
+ { "author and editor" editor either.or.check }
+ 'skip$
+ if$
+ }
+ if$
+ new.block
+ format.btitle "title" output.check
+ }
+ if$
+
+ crossref missing$
+ { format.bvolume output
+ new.block
+ format.number.series output
+ new.sentence
+ publisher "publisher" output.check
+ address output
+ }
+ { new.block
+ format.book.crossref output.nonnull
+ }
+ if$
+ format.edition output
+ format.date "year" output.check
+ format.isbn output
+ format.doi output
+ format.url output
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {booklet}
+{ output.bibitem
+ format.authors output
+ author format.key output
+ new.block
+ format.title "title" output.check
+ howpublished address new.block.checkb
+ howpublished output
+ address output
+ format.date output
+ format.isbn output
+ format.doi output
+ format.url output
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {inbook}
+{ output.bibitem
+ author empty$
+ { format.editors "author and editor" output.check
+ editor format.key output
+ }
+
+ { format.authors output.nonnull
+ crossref missing$
+ { "author and editor" editor either.or.check }
+ 'skip$
+ if$
+ }
+ if$
+ new.block
+ format.btitle "title" output.check
+ crossref missing$
+ { format.bvolume output
+ format.chapter.pages "chapter and pages" output.check
+ new.block
+ format.number.series output
+ new.sentence
+ publisher "publisher" output.check
+ address output
+ }
+ { format.chapter.pages "chapter and pages" output.check
+ new.block
+ format.book.crossref output.nonnull
+ }
+ if$
+ format.edition output
+ format.date "year" output.check
+ format.isbn output
+ format.doi output
+ format.url output
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {incollection}
+{ output.bibitem
+ format.authors "author" output.check
+ author format.key output
+ new.block
+ format.title "title" output.check
+ new.block
+ crossref missing$
+ { format.in.ed.booktitle "booktitle" output.check
+ format.bvolume output
+ format.number.series output
+ format.chapter.pages output
+ new.sentence
+ publisher "publisher" output.check
+ address output
+ format.edition output
+ format.date "year" output.check
+ }
+ { format.incoll.inproc.crossref output.nonnull
+ format.chapter.pages output
+ }
+ if$
+ format.isbn output
+ format.doi output
+ format.url output
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {inproceedings}
+{ output.bibitem
+ format.authors "author" output.check
+ author format.key output
+ new.block
+ format.title "title" output.check
+ new.block
+ crossref missing$
+ { format.in.ed.booktitle "booktitle" output.check
+ format.bvolume output
+ format.number.series output
+ format.pages output
+ address empty$
+ { organization publisher new.sentence.checkb
+ organization output
+ publisher output
+ format.date "year" output.check
+ }
+ { address output.nonnull
+ format.date "year" output.check
+ new.sentence
+ organization output
+ publisher output
+ }
+ if$
+ }
+ { format.incoll.inproc.crossref output.nonnull
+ format.pages output
+ }
+ if$
+ format.isbn output
+ format.doi output
+ format.url output
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {conference} { inproceedings }
+
+FUNCTION {manual}
+{ output.bibitem
+ format.authors output
+
+
+
+
+
+
+
+
+ author format.key output
+
+ new.block
+ format.btitle "title" output.check
+
+
+
+
+
+
+
+
+ organization address new.block.checkb
+ organization output
+ address output
+
+
+ format.edition output
+ format.date output
+ format.url output
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {mastersthesis}
+{ output.bibitem
+ format.authors "author" output.check
+ author format.key output
+ new.block
+ format.title "title" output.check
+ new.block
+ bbl.mthesis
+ format.thesis.type output.nonnull
+ school "school" output.check
+ address output
+ format.date "year" output.check
+ format.url output
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {misc}
+{ output.bibitem
+ format.authors output
+ author format.key output
+ title howpublished new.block.checkb
+ format.title output
+ howpublished new.block.checka
+ howpublished output
+ format.date output
+ format.issn output
+ format.url output
+ new.block
+ note output
+ fin.entry
+ empty.misc.check
+}
+
+FUNCTION {phdthesis}
+{ output.bibitem
+ format.authors "author" output.check
+ author format.key output
+ new.block
+ format.btitle "title" output.check
+ new.block
+ bbl.phdthesis
+ format.thesis.type output.nonnull
+
+ school "school" output.check
+ address output
+ format.date "year" output.check
+ format.url output
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {proceedings}
+{ output.bibitem
+
+
+ format.editors output
+ editor format.key output
+
+ new.block
+ format.btitle "title" output.check
+ format.bvolume output
+ format.number.series output
+ address output
+
+
+
+
+
+
+
+ format.date "year" output.check
+
+
+
+ new.sentence
+ organization output
+
+
+
+
+ publisher output
+ format.isbn output
+ format.doi output
+ format.url output
+
+
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {techreport}
+{ output.bibitem
+ format.authors "author" output.check
+ author format.key output
+ new.block
+ format.title "title" output.check
+ new.block
+ format.tr.number output.nonnull
+ institution "institution" output.check
+ address output
+ format.date "year" output.check
+ format.url output
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {unpublished}
+{ output.bibitem
+ format.authors "author" output.check
+ author format.key output
+ new.block
+ format.title "title" output.check
+ new.block
+ note "note" output.check
+ format.date output
+ format.url output
+ fin.entry
+}
+
+FUNCTION {default.type} { misc }
+
+
+MACRO {jan} {"January"}
+
+MACRO {feb} {"February"}
+
+MACRO {mar} {"March"}
+
+MACRO {apr} {"April"}
+
+MACRO {may} {"May"}
+
+MACRO {jun} {"June"}
+
+MACRO {jul} {"July"}
+
+MACRO {aug} {"August"}
+
+MACRO {sep} {"September"}
+
+MACRO {oct} {"October"}
+
+MACRO {nov} {"November"}
+
+MACRO {dec} {"December"}
+
+
+
+MACRO {acmcs} {"ACM Computing Surveys"}
+
+MACRO {acta} {"Acta Informatica"}
+
+MACRO {cacm} {"Communications of the ACM"}
+
+MACRO {ibmjrd} {"IBM Journal of Research and Development"}
+
+MACRO {ibmsj} {"IBM Systems Journal"}
+
+MACRO {ieeese} {"IEEE Transactions on Software Engineering"}
+
+MACRO {ieeetc} {"IEEE Transactions on Computers"}
+
+MACRO {ieeetcad}
+ {"IEEE Transactions on Computer-Aided Design of Integrated Circuits"}
+
+MACRO {ipl} {"Information Processing Letters"}
+
+MACRO {jacm} {"Journal of the ACM"}
+
+MACRO {jcss} {"Journal of Computer and System Sciences"}
+
+MACRO {scp} {"Science of Computer Programming"}
+
+MACRO {sicomp} {"SIAM Journal on Computing"}
+
+MACRO {tocs} {"ACM Transactions on Computer Systems"}
+
+MACRO {tods} {"ACM Transactions on Database Systems"}
+
+MACRO {tog} {"ACM Transactions on Graphics"}
+
+MACRO {toms} {"ACM Transactions on Mathematical Software"}
+
+MACRO {toois} {"ACM Transactions on Office Information Systems"}
+
+MACRO {toplas} {"ACM Transactions on Programming Languages and Systems"}
+
+MACRO {tcs} {"Theoretical Computer Science"}
+
+
+READ
+
+FUNCTION {sortify}
+{
+ fa.isPersianLanguage
+ { "l" change.case$}
+ {purify$ "l" change.case$}
+
+ if$
+ %duplicate$ write$
+}
+
+INTEGERS { len }
+
+FUNCTION {chop.word}
+{ 's :=
+ 'len :=
+ s #1 len substring$ =
+ { s len #1 + global.max$ substring$ }
+ 's
+ if$
+}
+
+FUNCTION {format.lab.names}
+{ 's :=
+ authorfa empty$
+ {
+ %skip$
+ #0 'fa.isInLabel :=
+ }
+ {% If authorfa exists
+ authorfa 's :=
+ #1 'fa.isInLabel :=
+ }
+ if$
+
+ s #1 "{vv~}{ll}" format.name$
+ s num.names$ duplicate$
+ #2 >
+ { pop$ bbl.etal * }
+ { #2 <
+ 'skip$
+ { s #2 "{ff }{vv }{ll}{ jj}" format.name$ "others" =
+ { bbl.etal * }
+ { bbl.and * s #2 "{vv~}{ll}" format.name$ * }
+ if$
+ }
+ if$
+ }
+ if$
+ #0 'fa.isInLabel := %reset fa.isInLabel
+}
+
+FUNCTION {author.key.label}
+{
+ author empty$
+ { key empty$
+ { cite$ #1 #3 substring$ }
+ 'key
+ if$
+ }
+ { author format.lab.names }
+ if$
+}
+
+FUNCTION {author.editor.key.label}
+{
+ author empty$
+ { editor empty$
+ { key empty$
+ { "no key, author, or editor in " cite$ * warning$
+ cite$ #1 #3 substring$ }
+ 'key
+ if$
+ }
+ { editor format.lab.names }
+ if$
+ }
+ { author format.lab.names }
+ if$
+}
+
+FUNCTION {author.key.organization.label}
+{ author empty$
+ { key empty$
+ { organization empty$
+ { cite$ #1 #3 substring$ }
+ { "The " #4 organization chop.word #3 text.prefix$ }
+ if$
+ }
+ 'key
+ if$
+ }
+ { author format.lab.names }
+ if$
+}
+
+FUNCTION {editor.key.organization.label}
+{ editor empty$
+ { key empty$
+ { organization empty$
+ { cite$ #1 #3 substring$ }
+ { "The " #4 organization chop.word #3 text.prefix$ }
+ if$
+ }
+ 'key
+ if$
+ }
+ { editor format.lab.names }
+ if$
+}
+
+FUNCTION {calc.short.authors}
+{ type$ "book" =
+ type$ "inbook" =
+ or
+ 'author.editor.key.label
+ { type$ "proceedings" =
+ 'editor.key.organization.label
+ { type$ "manual" =
+ 'author.key.organization.label
+ 'author.key.label
+ if$
+ }
+ if$
+ }
+ if$
+ 'short.list :=
+}
+
+FUNCTION {calc.label}
+{ calc.short.authors
+ short.list
+ "("
+ *
+ year duplicate$ empty$
+ short.list key field.or.null = or
+ { pop$ "" }
+ 'skip$
+ if$
+ *
+ 'label :=
+}
+
+FUNCTION {sort.format.names}
+{ 's :=
+ #1 'nameptr :=
+ ""
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ {
+ s nameptr "{vv{ } }{ll{ }}{ ff{ }}{ jj{ }}" format.name$ 't :=
+ nameptr #1 >
+ {
+ " " *
+ namesleft #1 = t "others" = and
+ { "zzzzz" * }
+ { numnames #2 > nameptr #2 = and
+ { "zz" * year field.or.null * " " * }
+
+ 'skip$
+ if$
+ t sortify *
+ }
+ if$
+ }
+
+
+
+
+ { t sortify * }
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+}
+
+FUNCTION {sort.format.title}
+{ 't :=
+ "A " #2
+ "An " #3
+ "The " #4 t chop.word
+ chop.word
+ chop.word
+ sortify
+ #1 global.max$ substring$
+}
+
+FUNCTION {author.sort}
+{ author empty$
+ { key empty$
+ { "to sort, need author or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { author sort.format.names }
+ if$
+}
+
+FUNCTION {author.editor.sort}
+{ author empty$
+ { editor empty$
+ { key empty$
+ { "to sort, need author, editor, or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { editor sort.format.names }
+ if$
+ }
+ { author sort.format.names }
+ if$
+}
+
+FUNCTION {author.organization.sort}
+{ author empty$
+ { organization empty$
+ { key empty$
+ { "to sort, need author, organization, or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { "The " #4 organization chop.word sortify }
+ if$
+ }
+ { author sort.format.names }
+ if$
+}
+
+FUNCTION {editor.organization.sort}
+{ editor empty$
+ { organization empty$
+ { key empty$
+ { "to sort, need editor, organization, or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { "The " #4 organization chop.word sortify }
+ if$
+ }
+ { editor sort.format.names }
+ if$
+}
+
+
+FUNCTION {presort}
+{ calc.label
+ label sortify
+ " "
+ *
+ type$ "book" =
+
+ type$ "inbook" =
+ or
+ 'author.editor.sort
+ { type$ "proceedings" =
+ 'editor.organization.sort
+ { type$ "manual" =
+ 'author.organization.sort
+ 'author.sort
+ if$
+ }
+ if$
+ }
+ if$
+ " "
+ *
+ year field.or.null sortify
+ *
+ " "
+ *
+ cite$
+
+
+ *
+ #1 entry.max$ substring$
+ 'sort.label :=
+ sort.label *
+ #1 entry.max$ substring$
+ 'sort.key$ :=
+}
+
+ITERATE {presort}
+
+SORT
+
+STRINGS { longest.label last.label next.extra }
+
+INTEGERS { longest.label.width last.extra.num number.label }
+
+FUNCTION {initialize.longest.label}
+{ "" 'longest.label :=
+ #0 int.to.chr$ 'last.label :=
+ "" 'next.extra :=
+
+ #0 'longest.label.width :=
+ #0 'last.extra.num :=
+ #0 'number.label :=
+}
+
+FUNCTION {forward.pass}
+{ last.label label =
+ { last.extra.num #1 + 'last.extra.num :=
+ last.extra.num int.to.chr$ 'extra.label :=
+ }
+ { "a" chr.to.int$ 'last.extra.num :=
+ "" 'extra.label :=
+ label 'last.label :=
+ }
+ if$
+ number.label #1 + 'number.label :=
+
+
+
+}
+
+FUNCTION {reverse.pass}
+{ next.extra "b" =
+ { "a" 'extra.label := }
+ 'skip$
+ if$
+ extra.label 'next.extra :=
+ extra.label
+ duplicate$ empty$
+ 'skip$
+ { "{\natexlab{" swap$ * "}}" * }
+ if$
+ 'extra.label :=
+ label extra.label * 'label :=
+}
+
+
+EXECUTE {initialize.longest.label}
+
+ITERATE {forward.pass}
+
+REVERSE {reverse.pass}
+
+FUNCTION {bib.sort.order}
+{ sort.label 'sort.key$ :=
+}
+
+ITERATE {bib.sort.order}
+
+SORT
+
+
+FUNCTION {begin.bib}
+{ preamble$ empty$
+ 'skip$
+ { preamble$ write$ newline$ }
+ if$
+ "\begin{thebibliography}{" number.label int.to.str$ * "}" *
+ write$ newline$
+ "\providecommand{\natexlab}[1]{#1}"
+ write$ newline$
+ "\providecommand{\url}[1]{\texttt{#1}}"
+ write$ newline$
+ "\expandafter\ifx\csname urlstyle\endcsname\relax"
+
+
+ write$ newline$
+ " \providecommand{\doi}[1]{doi: #1}\else"
+
+ write$ newline$
+ " \providecommand{\doi}{doi: \begingroup \urlstyle{rm}\Url}\fi"
+
+ write$ newline$
+
+
+
+
+
+}
+
+EXECUTE {begin.bib}
+
+EXECUTE {init.state.consts}
+
+ITERATE {call.type$}
+
+FUNCTION {end.bib}
+{ newline$
+ "\end{thebibliography}" write$ newline$
+}
+
+EXECUTE {end.bib}
+
+
diff --git a/biblio/bibtex/contrib/persian-bib/unsrt-fa.bst b/biblio/bibtex/contrib/persian-bib/unsrt-fa.bst
new file mode 100644
index 0000000000..167a333665
--- /dev/null
+++ b/biblio/bibtex/contrib/persian-bib/unsrt-fa.bst
@@ -0,0 +1,1225 @@
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% Bib. style "usrt-fa", Persian (farsi) version of unsrt.bst
+%%
+%% by: Mahmood Amintoosi and Mostafa Vahedi, m.amintoosi@gmail.com
+%% For XePersian, a Persian Typesetting Package in XeTeX
+%% It may be distributed and/or modified under the
+%% conditions of the LaTeX Project Public License (version 1.3c),
+%% either this version of this license or (at your option) any later version.
+%%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% Original Copyright
+
+ENTRY
+ { address
+ author
+ booktitle
+ chapter
+ edition
+ editor
+ howpublished
+ institution
+ journal
+ key
+language
+ month
+ note
+ number
+ organization
+ pages
+ publisher
+ school
+ series
+ title
+translator
+ type
+ volume
+ year
+ }
+ {}
+ { label }
+
+INTEGERS { output.state before.all mid.sentence after.sentence after.block }
+FUNCTION {is.print.banners.to.terminal} { #1 }
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% FILE VERSION AND BANNER %%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+FUNCTION{bst.file.version} { "0.9" }
+FUNCTION{bst.file.date} { "2015/05/09" }
+FUNCTION{bst.file.website} { "http://www.parsilatex.com" }
+FUNCTION{bst.file.authors} {"M.Amintoosi and M.Vahedi" }
+
+FUNCTION {banner.message}
+{ is.print.banners.to.terminal
+ { "-- unsrt-fa.bst version" " " * bst.file.version *
+ " (" * bst.file.date * ") " * %"by " * bst.file.authors *
+ top$
+ "-- This is a BibTeX style for XePersian: " bst.file.website *
+ %top$
+ %"-- See the " quote$ * "Persian-bib-userguide.pdf" * quote$ * " manual for usage information." *
+ top$
+ }
+ { skip$ }
+ if$
+}
+
+FUNCTION {completed.message}
+{ is.print.banners.to.terminal
+ { ""
+ top$
+ "Done."
+ top$
+ }
+ { skip$ }
+ if$
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% Persian Functions %%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+FUNCTION {fa.isPersianLanguage}
+{
+ language missing$
+ {#0}
+ {language "l" change.case$ "persian" =}
+ if$
+}
+
+ % Here are the language-specific definitions for explicit words.
+ % Each function has a name bbl.xxx where xxx is the English word.
+ % The languages selected here is ENGLISH and Farsi
+FUNCTION {bbl.and}
+{
+ fa.isPersianLanguage
+ {" و "}
+ {" and "}
+ if$
+}
+
+FUNCTION {bbl.editors}
+{
+fa.isPersianLanguage
+ { " ویراستاران "}
+ {" eds. "}
+if$
+}
+
+FUNCTION {bbl.editor}
+{
+fa.isPersianLanguage
+ { " ویراستار "}
+ {" ed. " }
+if$
+}
+
+FUNCTION {bbl.edby}
+{
+fa.isPersianLanguage
+ { " ویراسته‌ی "}
+ { " edited by " }
+if$
+}
+
+FUNCTION {bbl.edition}
+{
+fa.isPersianLanguage
+ {" ویرایش "}
+ {" ed. " }
+if$
+}
+
+FUNCTION {bbl.volume}
+{
+fa.isPersianLanguage
+ {" جلد "}
+ { " vol."}
+if$
+}
+
+FUNCTION {bbl.of}
+{
+fa.isPersianLanguage
+ { " از "}
+ { " of " }
+if$
+}
+
+FUNCTION {bbl.number}
+{
+fa.isPersianLanguage
+ {" شماره " }
+ { " no." }
+if$
+}
+
+FUNCTION {bbl.nr}
+{
+fa.isPersianLanguage
+ {" شماره "}
+ { " no." }
+if$
+}
+
+FUNCTION {bbl.in}
+{
+fa.isPersianLanguage
+ {" در "}
+ { " in " }
+if$
+}
+
+FUNCTION {bbl.pages}
+{
+fa.isPersianLanguage
+ {" صفحات "}
+ { " pp." }
+if$
+}
+
+FUNCTION {bbl.page}
+{
+fa.isPersianLanguage
+ {" ص." }
+ { " p." }
+if$
+}
+
+FUNCTION {bbl.chapter}
+{
+fa.isPersianLanguage
+ { " فصل " }
+ {" chap." }
+if$
+}
+
+FUNCTION {bbl.techrep}
+{
+fa.isPersianLanguage
+ { " گزارش طرح تحقیقی"}
+ { " Tech. Rep." }
+if$
+}
+
+FUNCTION {bbl.mthesis}
+{
+fa.isPersianLanguage
+ {" پایان‌نامه کارشناسی‌ارشد"}
+ { " Master's thesis" }
+if$
+}
+
+FUNCTION {bbl.phdthesis}
+{
+fa.isPersianLanguage
+ {" پایان‌نامه دکترا" }
+ { " Ph.D. thesis" }
+if$
+}
+
+FUNCTION {bbl.etal}
+{
+ fa.isPersianLanguage
+ {" و دیگران"}
+ {" et~al."}
+ if$
+}
+
+FUNCTION {bbl.translator}
+{
+ fa.isPersianLanguage
+ {"ترجمه‌ی "}
+ {"Translator "}
+ if$
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% End of Persian Functions %%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+FUNCTION {init.state.consts}
+{ #0 'before.all :=
+ #1 'mid.sentence :=
+ #2 'after.sentence :=
+ #3 'after.block :=
+}
+
+STRINGS { s t }
+
+FUNCTION {output.nonnull}
+{ 's :=
+ output.state mid.sentence =
+ { ", " * write$ }
+ { output.state after.block =
+{ add.period$ write$
+ newline$
+ "\newblock " write$
+}
+{ output.state before.all =
+ 'write$
+ { add.period$ " " * write$ }
+ if$
+}
+ if$
+ mid.sentence 'output.state :=
+ }
+ if$
+ s
+}
+
+FUNCTION {output}
+{ duplicate$ empty$
+ 'pop$
+ 'output.nonnull
+ if$
+}
+
+FUNCTION {output.check}
+{ 't :=
+ duplicate$ empty$
+ { pop$ "empty " t * " in " * cite$ * warning$ }
+ 'output.nonnull
+ if$
+}
+
+FUNCTION {output.bibitem}
+{ newline$
+ fa.isPersianLanguage
+ { skip$ }
+ {
+ "\begin{LTRbibitems}" write$
+ newline$
+ "\resetlatinfont " write$
+ }
+ if$
+ newline$
+ "\bibitem{" write$
+ cite$ write$
+ "}" write$
+ newline$
+ ""
+ before.all 'output.state :=
+}
+
+FUNCTION {fin.entry}
+{ add.period$
+ write$
+ newline$
+ fa.isPersianLanguage
+ {skip$}
+ { newline$
+ "\end{LTRbibitems}" write$
+ newline$
+ }
+ if$
+}
+
+FUNCTION {new.block}
+{ output.state before.all =
+ 'skip$
+ { after.block 'output.state := }
+ if$
+}
+
+FUNCTION {new.sentence}
+{ output.state after.block =
+ 'skip$
+ { output.state before.all =
+'skip$
+{ after.sentence 'output.state := }
+ if$
+ }
+ if$
+}
+
+FUNCTION {not}
+{ { #0 }
+ { #1 }
+ if$
+}
+
+FUNCTION {and}
+{ 'skip$
+ { pop$ #0 }
+ if$
+}
+
+FUNCTION {or}
+{ { pop$ #1 }
+ 'skip$
+ if$
+}
+
+FUNCTION {new.block.checka}
+{ empty$
+ 'skip$
+ 'new.block
+ if$
+}
+
+FUNCTION {new.block.checkb}
+{ empty$
+ swap$ empty$
+ and
+ 'skip$
+ 'new.block
+ if$
+}
+
+FUNCTION {new.sentence.checka}
+{ empty$
+ 'skip$
+ 'new.sentence
+ if$
+}
+
+FUNCTION {new.sentence.checkb}
+{ empty$
+ swap$ empty$
+ and
+ 'skip$
+ 'new.sentence
+ if$
+}
+
+FUNCTION {field.or.null}
+{ duplicate$ empty$
+ { pop$ "" }
+ 'skip$
+ if$
+}
+
+
+FUNCTION {emphasize}
+{ duplicate$ empty$
+ { pop$ "" }
+ { "{\em " swap$ * "}" * }
+ if$
+}
+
+
+INTEGERS { nameptr namesleft numnames }
+
+FUNCTION {format.names}
+{ 's :=
+ #1 'nameptr :=
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ { s nameptr "{vv~}{ll}{, jj}{, ff}" format.name$ 't := %{ff}{vv~}{ll}{, jj}
+ nameptr #1 >
+{ namesleft #1 >
+ { ", " * t * }
+ { numnames #2 >
+{ "," * }
+'skip$
+ if$
+ t "others" =
+ { bbl.etal * }
+ { bbl.and * t * }
+ if$
+}
+ if$
+}
+'t
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+}
+
+FUNCTION {format.authors}
+{ author empty$
+ { "" }
+ { author format.names }
+ if$
+}
+
+FUNCTION {format.editors}
+{ editor empty$
+ { "" }
+ { fa.isPersianLanguage
+ {
+editor num.names$ #1 >
+{bbl.editors editor format.names * }
+{bbl.editor editor format.names * }
+if$
+}
+{
+ editor format.names
+editor num.names$ #1 >
+{ ", " bbl.editors * *}
+{ ", " bbl.editor * *}
+if$
+}
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.translators}
+{ translator empty$
+ { "" }
+ { fa.isPersianLanguage
+ {
+bbl.translator translator format.names *
+}
+{
+ translator format.names
+", " bbl.translator * *
+}
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.title}
+{ title empty$
+ { "" }
+ { title "t" change.case$ }
+ if$
+}
+
+FUNCTION {n.dashify}
+{ 't :=
+ ""
+ { t empty$ not }
+ { t #1 #1 substring$ "-" =
+{ t #1 #2 substring$ "--" = not
+ { "--" *
+ t #2 global.max$ substring$ 't :=
+ }
+ { { t #1 #1 substring$ "-" = }
+{ "-" *
+ t #2 global.max$ substring$ 't :=
+}
+ while$
+ }
+ if$
+}
+{ t #1 #1 substring$ *
+ t #2 global.max$ substring$ 't :=
+}
+ if$
+ }
+ while$
+}
+
+FUNCTION {format.date}
+{ year empty$
+ { month empty$
+{ "" }
+{ "there's a month but no year in " cite$ * warning$
+ month
+}
+ if$
+ }
+ { month empty$
+'year
+{ month " " * year * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.btitle}
+{ title emphasize
+}
+
+FUNCTION {tie.or.space.connect}
+{ duplicate$ text.length$ #3 <
+ { "~" }
+ { " " }
+ if$
+ swap$ * *
+}
+
+FUNCTION {either.or.check}
+{ empty$
+ 'pop$
+ { "can't use both " swap$ * " fields in " * cite$ * warning$ }
+ if$
+}
+
+FUNCTION {format.bvolume}
+{ volume empty$
+ { "" }
+ { bbl.volume volume tie.or.space.connect
+ series empty$
+ 'skip$
+ { bbl.of * series emphasize * }
+ if$
+ "volume and number" number either.or.check
+ }
+ if$
+}
+
+FUNCTION {format.number.series}
+{ volume empty$
+ { number empty$
+{ series field.or.null }
+{ output.state mid.sentence =
+ { bbl.number }
+ { bbl.number "t" change.case$ }
+ if$
+ number tie.or.space.connect
+ series empty$
+ { "there's a number but no series in " cite$ * warning$ }
+ { bbl.in * series * }
+ if$
+}
+ if$
+ }
+ { "" }
+ if$
+}
+
+FUNCTION {format.edition}
+{ edition empty$
+ { "" }
+ { fa.isPersianLanguage
+ {
+ bbl.edition edition *
+}
+{
+ output.state mid.sentence =
+ { edition "l" change.case$ bbl.edition * }
+ { edition "t" change.case$ bbl.edition * }
+ if$
+}
+ if$
+ }
+ if$
+}
+
+INTEGERS { multiresult }
+
+FUNCTION {multi.page.check}
+{ 't :=
+ #0 'multiresult :=
+ { multiresult not
+ t empty$ not
+ and
+ }
+ { t #1 #1 substring$
+ duplicate$ "-" =
+ swap$ duplicate$ "," =
+ swap$ "+" =
+ or or
+{ #1 'multiresult := }
+{ t #2 global.max$ substring$ 't := }
+ if$
+ }
+ while$
+ multiresult
+}
+
+FUNCTION {format.pages}
+{ pages empty$
+ { "" }
+{ pages multi.page.check
+ { bbl.pages pages n.dashify tie.or.space.connect }
+ { bbl.page pages tie.or.space.connect }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.vol.num.pages}
+{ volume field.or.null
+ number empty$
+ 'skip$
+ { "(" number * ")" * *
+ volume empty$
+ { "there's a number but no volume in " cite$ * warning$ }
+ 'skip$
+ if$
+ }
+ if$
+ pages empty$
+ 'skip$
+ { duplicate$ empty$
+ { pop$ format.pages }
+ { ":" * pages n.dashify * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.chapter.pages}
+{ chapter empty$
+ 'format.pages
+ { type empty$
+{ bbl.chapter }
+{ type "l" change.case$ }
+ if$
+ chapter tie.or.space.connect
+ pages empty$
+'skip$
+{ ", " * format.pages * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.in.ed.booktitle}
+{
+ booktitle empty$
+ { "" }
+ { editor empty$
+ { bbl.in booktitle emphasize * }
+ { bbl.in format.editors * ", " * booktitle emphasize * }
+ if$
+}
+ if$
+}
+
+FUNCTION {empty.misc.check}
+{ author empty$ title empty$ howpublished empty$
+ month empty$ year empty$ note empty$
+ and and and and and
+ { "all relevant fields are empty in " cite$ * warning$ }
+ 'skip$
+ if$
+}
+
+FUNCTION {format.thesis.type}
+{ type empty$
+ 'skip$
+ { pop$
+ type "t" change.case$
+ }
+ if$
+}
+
+FUNCTION {format.tr.number}
+{ type empty$
+ { bbl.techrep }
+ 'type
+ if$
+ number empty$
+ { "t" change.case$ }
+ { number tie.or.space.connect }
+ if$
+}
+
+FUNCTION {format.article.crossref}
+{ key empty$
+ { journal empty$
+{ "need key or journal for " cite$ * " to crossref " * crossref *
+ warning$
+ ""
+}
+{ bbl.in "{\em " * journal * "\/}" * }
+ if$
+ }
+ { bbl.in key * }
+ if$
+ " \cite{" * crossref * "}" *
+}
+
+FUNCTION {format.crossref.editor}
+{ editor #1 "{vv~}{ll}" format.name$
+ editor num.names$ duplicate$ #2 >
+ { pop$ bbl.etal * }
+ { #2 < 'skip$
+ { editor #2 "{ff }{vv }{ll}{ jj}" format.name$ "others" =
+ { bbl.etal * }
+ { bbl.and * editor #2 "{vv~}{ll}" format.name$ * }
+ if$
+ }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.book.crossref}
+{ volume empty$
+ { "empty volume in " cite$ * "'s crossref of " * crossref * warning$
+ bbl.in
+ }
+ { bbl.volume volume tie.or.space.connect
+ bbl.of *
+ }
+ if$
+ editor empty$
+ editor field.or.null author field.or.null =
+ or
+ { key empty$
+{ series empty$
+ { "need editor, key, or series for " cite$ * " to crossref " *
+ crossref * warning$
+ "" *
+ }
+ { "{\em " * series * "\/}" * }
+ if$
+}
+{ key * }
+ if$
+ }
+ { format.crossref.editor * }
+ if$
+ " \cite{" * crossref * "}" *
+}
+
+FUNCTION {format.incoll.inproc.crossref}
+{ editor empty$
+ editor field.or.null author field.or.null =
+ or
+ { key empty$
+{ booktitle empty$
+ { "need editor, key, or booktitle for " cite$ * " to crossref " *
+ crossref * warning$
+ ""
+ }
+ { bbl.in " {\em " * booktitle * "\/}" * }
+ if$
+}
+{ bbl.in key * }
+ if$
+ }
+ { bbl.in format.crossref.editor * }
+ if$
+ " \cite{" * crossref * "}" *
+}
+
+FUNCTION {article}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.title "title" output.check
+ new.block
+ crossref missing$
+ { journal emphasize "journal" output.check
+ format.vol.num.pages output
+ format.date "year" output.check
+ }
+ { format.article.crossref output.nonnull
+ format.pages output
+ }
+ if$
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {book}
+{ output.bibitem
+ fa.isPersianLanguage
+ {
+format.authors output
+ new.block
+ format.btitle "title" output.check
+new.block
+ format.translators output
+format.editors output
+ }
+ { author empty$
+ { format.editors "author and editor" output.check }
+ { format.authors output.nonnull
+ crossref missing$
+ { "author and editor" editor either.or.check }
+ 'skip$
+ if$
+ }
+ if$
+ new.block
+ format.btitle "title" output.check
+ }
+ if$
+ crossref missing$
+ { format.bvolume output
+ new.block
+ format.number.series output
+ new.sentence
+ publisher "publisher" output.check
+ address output
+ }
+ { new.block
+ format.book.crossref output.nonnull
+ }
+ if$
+ format.edition output
+ format.date "year" output.check
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {booklet}
+{ output.bibitem
+ format.authors output
+ new.block
+ format.title "title" output.check
+ howpublished address new.block.checkb
+ howpublished output
+ address output
+ format.date output
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {inbook}
+{ output.bibitem
+ author empty$
+ { format.editors "author and editor" output.check }
+ { format.authors output.nonnull
+ crossref missing$
+{ "author and editor" editor either.or.check }
+'skip$
+ if$
+ }
+ if$
+ new.block
+ format.btitle "title" output.check
+ crossref missing$
+ { format.bvolume output
+ format.chapter.pages "chapter and pages" output.check
+ new.block
+ format.number.series output
+ new.sentence
+ publisher "publisher" output.check
+ address output
+ }
+ { format.chapter.pages "chapter and pages" output.check
+ new.block
+ format.book.crossref output.nonnull
+ }
+ if$
+ format.edition output
+ format.date "year" output.check
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {incollection}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.title "title" output.check
+ new.block
+ crossref missing$
+ { format.in.ed.booktitle "booktitle" output.check
+ format.bvolume output
+ format.number.series output
+ format.chapter.pages output
+ new.sentence
+ publisher "publisher" output.check
+ address output
+ format.edition output
+ format.date "year" output.check
+ }
+ { format.incoll.inproc.crossref output.nonnull
+ format.chapter.pages output
+ }
+ if$
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {inproceedings}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.title "title" output.check
+ new.block
+ crossref missing$
+ { format.in.ed.booktitle "booktitle" output.check
+ format.bvolume output
+ format.number.series output
+ format.pages output
+ address empty$
+{ organization publisher new.sentence.checkb
+ organization output
+ publisher output
+ format.date "year" output.check
+}
+{ address output.nonnull
+ format.date "year" output.check
+ new.sentence
+ organization output
+ publisher output
+}
+ if$
+ }
+ { format.incoll.inproc.crossref output.nonnull
+ format.pages output
+ }
+ if$
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {conference} { inproceedings }
+
+FUNCTION {manual}
+{ output.bibitem
+ author empty$
+ { organization empty$
+'skip$
+{ organization output.nonnull
+ address output
+}
+ if$
+ }
+ { format.authors output.nonnull }
+ if$
+ new.block
+ format.btitle "title" output.check
+ author empty$
+ { organization empty$
+{ address new.block.checka
+ address output
+}
+'skip$
+ if$
+ }
+ { organization address new.block.checkb
+ organization output
+ address output
+ }
+ if$
+ format.edition output
+ format.date output
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {mastersthesis}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.title "title" output.check
+ new.block
+ bbl.mthesis
+ format.thesis.type output.nonnull
+ school "school" output.check
+ address output
+ format.date "year" output.check
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {misc}
+{ output.bibitem
+ format.authors output
+ title howpublished new.block.checkb
+ format.title output
+ howpublished new.block.checka
+ howpublished output
+ format.date output
+ new.block
+ note output
+ fin.entry
+ empty.misc.check
+}
+
+FUNCTION {phdthesis}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.btitle "title" output.check
+ new.block
+ bbl.phdthesis
+ format.thesis.type output.nonnull
+ school "school" output.check
+ address output
+ format.date "year" output.check
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {proceedings}
+{ output.bibitem
+ editor empty$
+ { organization output }
+ { format.editors output.nonnull }
+ if$
+ new.block
+ format.btitle "title" output.check
+ format.bvolume output
+ format.number.series output
+ address empty$
+ { editor empty$
+{ publisher new.sentence.checka }
+{ organization publisher new.sentence.checkb
+ organization output
+}
+ if$
+ publisher output
+ format.date "year" output.check
+ }
+ { address output.nonnull
+ format.date "year" output.check
+ new.sentence
+ editor empty$
+'skip$
+{ organization output }
+ if$
+ publisher output
+ }
+ if$
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {techreport}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.title "title" output.check
+ new.block
+ format.tr.number output.nonnull
+ institution "institution" output.check
+ address output
+ format.date "year" output.check
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {unpublished}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.title "title" output.check
+ new.block
+ note "note" output.check
+ format.date output
+ fin.entry
+}
+
+FUNCTION {default.type} { misc }
+
+MACRO {jan} {"January"}
+
+MACRO {feb} {"February"}
+
+MACRO {mar} {"March"}
+
+MACRO {apr} {"April"}
+
+MACRO {may} {"May"}
+
+MACRO {jun} {"June"}
+
+MACRO {jul} {"July"}
+
+MACRO {aug} {"August"}
+
+MACRO {sep} {"September"}
+
+MACRO {oct} {"October"}
+
+MACRO {nov} {"November"}
+
+MACRO {dec} {"December"}
+
+MACRO {acmcs} {"ACM Computing Surveys"}
+
+MACRO {acta} {"Acta Informatica"}
+
+MACRO {cacm} {"Communications of the ACM"}
+
+MACRO {ibmjrd} {"IBM Journal of Research and Development"}
+
+MACRO {ibmsj} {"IBM Systems Journal"}
+
+MACRO {ieeese} {"IEEE Transactions on Software Engineering"}
+
+MACRO {ieeetc} {"IEEE Transactions on Computers"}
+
+MACRO {ieeetcad}
+ {"IEEE Transactions on Computer-Aided Design of Integrated Circuits"}
+
+MACRO {ipl} {"Information Processing Letters"}
+
+MACRO {jacm} {"Journal of the ACM"}
+
+MACRO {jcss} {"Journal of Computer and System Sciences"}
+
+MACRO {scp} {"Science of Computer Programming"}
+
+MACRO {sicomp} {"SIAM Journal on Computing"}
+
+MACRO {tocs} {"ACM Transactions on Computer Systems"}
+
+MACRO {tods} {"ACM Transactions on Database Systems"}
+
+MACRO {tog} {"ACM Transactions on Graphics"}
+
+MACRO {toms} {"ACM Transactions on Mathematical Software"}
+
+MACRO {toois} {"ACM Transactions on Office Information Systems"}
+
+MACRO {toplas} {"ACM Transactions on Programming Languages and Systems"}
+
+MACRO {tcs} {"Theoretical Computer Science"}
+
+READ
+
+STRINGS { longest.label }
+
+INTEGERS { number.label longest.label.width }
+
+FUNCTION {initialize.longest.label}
+{ "" 'longest.label :=
+ #1 'number.label :=
+ #0 'longest.label.width :=
+}
+
+FUNCTION {longest.label.pass}
+{ number.label int.to.str$ 'label :=
+ number.label #1 + 'number.label :=
+ label width$ longest.label.width >
+ { label 'longest.label :=
+ label width$ 'longest.label.width :=
+ }
+ 'skip$
+ if$
+}
+
+EXECUTE {banner.message}
+EXECUTE {initialize.longest.label}
+
+ITERATE {longest.label.pass}
+
+FUNCTION {begin.bib}
+{
+ "% Generated by unsrt-fa.bst, version: " bst.file.version * " (" * bst.file.date * "), for XePersian Package" *
+ write$ newline$
+ "% Authors: " bst.file.authors *
+ write$ newline$
+ "\providecommand{\noopsort}[1]{}"
+ write$ newline$
+ preamble$ empty$
+ 'skip$
+ { preamble$ write$ newline$ }
+ if$
+ "\begin{thebibliography}{" longest.label * "}" * write$ newline$
+}
+
+EXECUTE {begin.bib}
+
+EXECUTE {init.state.consts}
+
+ITERATE {call.type$}
+
+FUNCTION {end.bib}
+{ newline$
+ "\end{thebibliography}" write$ newline$
+}
+
+EXECUTE {end.bib}
+EXECUTE{completed.message}
+%% End of file `unsrt-fa.bst'.
diff --git a/biblio/bibtex/contrib/phy-bstyles/README b/biblio/bibtex/contrib/phy-bstyles/README
new file mode 100644
index 0000000000..773d88d0cf
--- /dev/null
+++ b/biblio/bibtex/contrib/phy-bstyles/README
@@ -0,0 +1,46 @@
+This directory contains a collection of BibTeX style files for various
+physics journals due to Charles Karney (Karney@Princeton.EDU). The
+compilation of this archive and some extensions to the physj* files were
+done by Hans-Hermann Bode (HHBODE@DOSUNI1.BITNET).
+
+Herein are the following files:
+
+./README this file
+./physics.btx master file for creating the bst files
+./physjful.btx full journal names, to be included in physics.btx
+./physjabb.btx abbreviated journal names, to be included in physics.btx
+./physjful.bib full journal names, for use with other BibTeX styles
+./physjabb.bib abbreviated journal names, for use with other BibTeX styles
+./cpp.el preprocessor for GNU-Emacs to generate the bst files from
+ physics.btx
+./aip.bst BibTeX style for American Institute of Physics journals
+./aip.sty associated LaTeX document style
+./cpc.bst BibTeX style for Computer Physics Communications
+./iaea.bst BibTeX style for IAEA conferences
+./jcp.bst BibTeX style for the Journal of Computational Physics
+./nf.bst BibTeX style for Nuclear Fusion
+./nf.sty associated LaTeX document style
+./nflet.bst BibTeX style for Nuclear Fusion Letters
+./pf.bst BibTeX style for Physics of Fluids
+./ppcf.bst a physics version of the apalike BibTeX style
+./report.bst BibTeX style for internal reports
+./rmp.bst BibTeX style for Reviews of Modern Physics
+
+To use the styles, copy all *.bst files needed into a directory where BibTeX
+looks for style files. This will usually be a directory in the TEXINPUT(S)
+path, i.e., in the same path where TeX looks for its input files.
+
+In addition, if appropriate, copy the *.sty files into a directory where TeX
+looks for its input files, see above.
+
+For use of the physj*.bib files with other BibTeX styles, copy them into a
+directory where BibTeX looks for bibliography databases. This will usually
+be a directory in the BIBINPUT(S) path.
+
+If you want to re-generate the *.bst files from physics.btx, change the line
+
+#include "physics-journal-abbrev.btx"
+
+to include one of the physj*.btx files.
+
+ --H2B
diff --git a/biblio/bibtex/contrib/phy-bstyles/aip.bst b/biblio/bibtex/contrib/phy-bstyles/aip.bst
new file mode 100644
index 0000000000..b56fa526c7
--- /dev/null
+++ b/biblio/bibtex/contrib/phy-bstyles/aip.bst
@@ -0,0 +1,1037 @@
+%% #define AIP 1 % Fri Jun 15 10:51:17 1990
+%% #include "TEX$ROOT:[BIBTEX]PHYSICS.BTX"
+ % Please notify Charles Karney (Karney@Princeton.EDU)
+ % of any bugs, improvements, etc.
+
+ % For American Institute of Physics Journals
+
+ % version 0.99b for BibTeX versions 0.99a or later, LaTeX version 2.09.
+ % Copyright (C) 1985, all rights reserved.
+ % Copying of this file is authorized only if either
+ % (1) you make absolutely no changes to your copy, including name, or
+ % (2) if you do make changes, you name it something other than
+ % btxbst.doc, plain.bst, unsrt.bst, alpha.bst, and abbrv.bst.
+ % This restriction helps ensure that all standard styles are identical.
+ % The file btxbst.doc has the documentation for this style.
+
+ENTRY
+ { address
+ author
+ booktitle
+ chapter
+ edition
+ editor
+ howpublished
+ institution
+ journal
+ key
+ month
+ note
+ number
+ organization
+ pages
+ publisher
+ school
+ series
+ title
+ type
+ volume
+ year
+ }
+ {}
+ { label }
+
+INTEGERS { output.state before.all mid.sentence after.sentence after.block }
+
+FUNCTION {init.state.consts}
+{ #0 'before.all :=
+ #1 'mid.sentence :=
+ #2 'after.sentence :=
+ #3 'after.block :=
+}
+
+STRINGS { s t }
+
+FUNCTION {output.nonnull}
+{ 's :=
+ output.state mid.sentence =
+ { ", " * write$ }
+ { output.state after.block =
+ { "," * write$
+ newline$
+ "\newblock " write$
+ }
+ { output.state before.all =
+ 'write$
+ { add.period$ " " * write$ }
+ if$
+ }
+ if$
+ mid.sentence 'output.state :=
+ }
+ if$
+ s
+}
+
+FUNCTION {output}
+{ duplicate$ empty$
+ 'pop$
+ 'output.nonnull
+ if$
+}
+
+FUNCTION {output.check}
+{ 't :=
+ duplicate$ empty$
+ { pop$ "empty " t * " in " * cite$ * warning$ }
+ 'output.nonnull
+ if$
+}
+
+FUNCTION {output.bibitem}
+{ newline$
+ "\bibitem{" write$
+ cite$ write$
+ "}" write$
+ newline$
+ ""
+ before.all 'output.state :=
+}
+
+FUNCTION {fin.entry}
+{ add.period$
+ write$
+ newline$
+}
+
+FUNCTION {new.block}
+{ output.state before.all =
+ 'skip$
+ { after.block 'output.state := }
+ if$
+}
+
+FUNCTION {new.sentence}
+{ skip$
+}
+
+FUNCTION {not}
+{ { #0 }
+ { #1 }
+ if$
+}
+
+FUNCTION {and}
+{ 'skip$
+ { pop$ #0 }
+ if$
+}
+
+FUNCTION {or}
+{ { pop$ #1 }
+ 'skip$
+ if$
+}
+
+FUNCTION {new.block.checka}
+{ empty$
+ 'skip$
+ 'new.block
+ if$
+}
+
+FUNCTION {new.block.checkb}
+{ empty$
+ swap$ empty$
+ and
+ 'skip$
+ 'new.block
+ if$
+}
+
+FUNCTION {new.sentence.checka}
+{ empty$
+ 'skip$
+ 'new.sentence
+ if$
+}
+
+FUNCTION {new.sentence.checkb}
+{ empty$
+ swap$ empty$
+ and
+ 'skip$
+ 'new.sentence
+ if$
+}
+
+FUNCTION {field.or.null}
+{ duplicate$ empty$
+ { pop$ "" }
+ 'skip$
+ if$
+}
+
+FUNCTION {emphasize}
+{ duplicate$ empty$
+ { pop$ "" }
+ { "{\em " swap$ * "}" * }
+ if$
+}
+
+FUNCTION {embolden}
+{ duplicate$ empty$
+ { pop$ "" }
+ { "{\bf " swap$ * "}" * }
+ if$
+}
+
+FUNCTION {paren}
+{ duplicate$ empty$
+ { pop$ "" }
+ { "(" swap$ * ")" * }
+ if$
+}
+
+INTEGERS { nameptr namesleft numnames }
+
+INTEGERS { etal }
+
+FUNCTION {format.names}
+{ 's :=
+ #1 'nameptr :=
+ s num.names$ 'numnames :=
+ numnames #5 >
+ s numnames "{ll}" format.name$ "others" = numnames #1 > and
+ or 'etal :=
+ etal
+ { #1 #1 + 'namesleft := }
+ { numnames 'namesleft := }
+ if$
+ { namesleft #0 > }
+ { s nameptr "{f.~}{vv~}{ll}{, jj}" format.name$ 't :=
+ nameptr #1 >
+ { namesleft #1 >
+ { ", " * t * }
+ { nameptr #2 >
+ { "," * }
+ 'skip$
+ if$
+ t "others" =
+ etal or
+ { " et~al." * }
+ { " and " * t * }
+ if$
+ }
+ if$
+ }
+ 't
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+}
+
+FUNCTION {format.authors}
+{ author empty$
+ { "" }
+ { author format.names }
+ if$
+}
+
+FUNCTION {format.editors}
+{ editor empty$
+ { "" }
+ { editor format.names
+ editor num.names$ #1 >
+ { ", editors" * }
+ { ", editor" * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.edited}
+{ editor empty$
+ { "" }
+ { "edited by " editor format.names * }
+ if$
+}
+
+FUNCTION {format.title}
+{ title empty$
+ { "" }
+ { title "t" change.case$ }
+ if$
+}
+
+FUNCTION {n.dashify}
+{ 't :=
+ ""
+ { t empty$ not }
+ { t #1 #1 substring$ "-" =
+ { t #1 #2 substring$ "--" = not
+ { "--" *
+ t #2 global.max$ substring$ 't :=
+ }
+ { { t #1 #1 substring$ "-" = }
+ { "-" *
+ t #2 global.max$ substring$ 't :=
+ }
+ while$
+ }
+ if$
+ }
+ { t #1 #1 substring$ *
+ t #2 global.max$ substring$ 't :=
+ }
+ if$
+ }
+ while$
+}
+
+FUNCTION {first.page}
+{ 't :=
+ ""
+ { t empty$ not t #1 #1 substring$ "-" = not and }
+ { t #1 #1 substring$ *
+ t #2 global.max$ substring$ 't :=
+ }
+ while$
+}
+
+FUNCTION {format.date}
+{ year empty$
+ { "" }
+ 'year
+ if$
+}
+
+FUNCTION {format.btitle}
+{ title emphasize
+}
+
+FUNCTION {tie.or.space.connect}
+{ duplicate$ text.length$ #3 <
+ { "~" }
+ { " " }
+ if$
+ swap$ * *
+}
+
+FUNCTION {either.or.check}
+{ empty$
+ 'pop$
+ { "can't use both " swap$ * " fields in " * cite$ * warning$ }
+ if$
+}
+
+FUNCTION {format.bvolume}
+{ volume empty$
+ { "" }
+ { "volume" volume tie.or.space.connect
+ series empty$
+ 'skip$
+ { " of " * series emphasize * }
+ if$
+ "volume and number" number either.or.check
+ }
+ if$
+}
+
+FUNCTION {format.number.series}
+{ volume empty$
+ { number empty$
+ { series field.or.null }
+ { output.state mid.sentence =
+ { "number" }
+ { "Number" }
+ if$
+ number tie.or.space.connect
+ series empty$
+ { "there's a number but no series in " cite$ * warning$ }
+ { " in " * series * }
+ if$
+ }
+ if$
+ }
+ { "" }
+ if$
+}
+
+FUNCTION {format.edition}
+{ edition empty$
+ { "" }
+ { output.state mid.sentence =
+ { edition "l" change.case$ " edition" * }
+ { edition "t" change.case$ " edition" * }
+ if$
+ }
+ if$
+}
+
+INTEGERS { multiresult }
+
+FUNCTION {multi.page.check}
+{ 't :=
+ #0 'multiresult :=
+ { multiresult not
+ t empty$ not
+ and
+ }
+ { t #1 #1 substring$
+ duplicate$ "-" =
+ swap$ duplicate$ "," =
+ swap$ "+" =
+ or or
+ { #1 'multiresult := }
+ { t #2 global.max$ substring$ 't := }
+ if$
+ }
+ while$
+ multiresult
+}
+
+FUNCTION {format.pages}
+{ pages empty$
+ { "" }
+ { pages multi.page.check
+ { "pages" pages n.dashify tie.or.space.connect }
+ { "page" pages tie.or.space.connect }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.pages.a}
+{ pages empty$
+ { "" }
+ { "page" pages first.page tie.or.space.connect }
+ if$
+}
+
+FUNCTION {format.vol.num.pages}
+{ volume field.or.null embolden
+ " " swap$ * *
+ pages empty$
+ 'skip$
+ { duplicate$ empty$
+ { pop$ format.pages.a }
+ { ", " * pages first.page * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.chapter.pages}
+{ chapter empty$
+ 'format.pages
+ { type empty$
+ { "chapter" }
+ { type "l" change.case$ }
+ if$
+ chapter tie.or.space.connect
+ pages empty$
+ 'skip$
+ { ", " * format.pages * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.in.ed.booktitle}
+{ booktitle empty$
+ { "" }
+ { editor empty$
+ { "in " booktitle emphasize * }
+ { "in " booktitle emphasize * ", " * format.edited * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {empty.misc.check}
+{ author empty$ title empty$ howpublished empty$
+ month empty$ year empty$ note empty$
+ and and and and and
+ { "all relevant fields are empty in " cite$ * warning$ }
+ 'skip$
+ if$
+}
+
+FUNCTION {format.thesis.type}
+{ type empty$
+ 'skip$
+ { pop$
+ type "t" change.case$
+ }
+ if$
+}
+
+FUNCTION {format.tr.number}
+{ type empty$
+ { "Technical Report" }
+ 'type
+ if$
+ number empty$
+ { "t" change.case$ }
+ { number tie.or.space.connect }
+ if$
+}
+
+FUNCTION {format.article.crossref}
+{ key empty$
+ { journal empty$
+ { "need key or journal for " cite$ * " to crossref " * crossref *
+ warning$
+ ""
+ }
+ { "In " journal * }
+ if$
+ }
+ { "In " key * }
+ if$
+ " \cite{" * crossref * "}" *
+}
+
+FUNCTION {format.crossref.editor}
+{ editor #1 "{vv~}{ll}" format.name$
+ editor num.names$ duplicate$
+ #2 >
+ { pop$ " et~al." * }
+ { #2 <
+ 'skip$
+ { editor #2 "{ff }{vv }{ll}{ jj}" format.name$ "others" =
+ { " et~al." * }
+ { " and " * editor #2 "{vv~}{ll}" format.name$ * }
+ if$
+ }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.book.crossref}
+{ volume empty$
+ { "empty volume in " cite$ * "'s crossref of " * crossref * warning$
+ "In "
+ }
+ { "Volume" volume tie.or.space.connect
+ " of " *
+ }
+ if$
+ editor empty$
+ editor field.or.null author field.or.null =
+ or
+ { key empty$
+ { series empty$
+ { "need editor, key, or series for " cite$ * " to crossref " *
+ crossref * warning$
+ "" *
+ }
+ { "{\em " * series * "\/}" * }
+ if$
+ }
+ { key * }
+ if$
+ }
+ { format.crossref.editor * }
+ if$
+ " \cite{" * crossref * "}" *
+}
+
+FUNCTION {format.incoll.inproc.crossref}
+{ editor empty$
+ editor field.or.null author field.or.null =
+ or
+ { key empty$
+ { booktitle empty$
+ { "need editor, key, or booktitle for " cite$ * " to crossref " *
+ crossref * warning$
+ ""
+ }
+ { "In {\em " booktitle * "\/}" * }
+ if$
+ }
+ { "In " key * }
+ if$
+ }
+ { "In " format.crossref.editor * }
+ if$
+ " \cite{" * crossref * "}" *
+}
+
+FUNCTION {article}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ crossref missing$
+ { journal field.or.null
+ format.vol.num.pages
+ format.date empty$
+ 'skip$
+ { duplicate$ empty$
+ { pop$ format.date paren }
+ { " " * format.date paren * }
+ if$
+ }
+ if$
+ output
+ }
+ { format.article.crossref output.nonnull
+ format.pages output
+ }
+ if$
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {book}
+{ output.bibitem
+ author empty$
+ { format.editors "author and editor" output.check }
+ { format.authors output.nonnull
+ crossref missing$
+ { "author and editor" editor either.or.check }
+ 'skip$
+ if$
+ }
+ if$
+ new.block
+ format.btitle "title" output.check
+ crossref missing$
+ { format.bvolume output
+ new.block
+ format.number.series output
+ new.sentence
+ publisher "publisher" output.check
+ address output
+ }
+ { new.block
+ format.book.crossref output.nonnull
+ }
+ if$
+ format.edition output
+ format.date "year" output.check
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {booklet}
+{ output.bibitem
+ format.authors output
+ new.block
+ format.title "title" output.check
+ howpublished address new.block.checkb
+ howpublished output
+ address output
+ format.date output
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {inbook}
+{ output.bibitem
+ author empty$
+ { format.editors "author and editor" output.check }
+ { format.authors output.nonnull
+ crossref missing$
+ { "author and editor" editor either.or.check }
+ 'skip$
+ if$
+ }
+ if$
+ new.block
+ format.btitle "title" output.check
+ crossref missing$
+ { format.bvolume output
+ format.chapter.pages "chapter and pages" output.check
+ new.block
+ format.number.series output
+ new.sentence
+ publisher "publisher" output.check
+ address output
+ }
+ { format.chapter.pages "chapter and pages" output.check
+ new.block
+ format.book.crossref output.nonnull
+ }
+ if$
+ format.edition output
+ format.date "year" output.check
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {incollection}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.title "title" output.check
+ new.block
+ crossref missing$
+ { format.in.ed.booktitle "booktitle" output.check
+ format.bvolume output
+ format.number.series output
+ format.chapter.pages output
+ new.sentence
+ publisher "publisher" output.check
+ address output
+ format.edition output
+ format.date "year" output.check
+ }
+ { format.incoll.inproc.crossref output.nonnull
+ format.chapter.pages output
+ }
+ if$
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {inproceedings}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.title "title" output.check
+ new.block
+ crossref missing$
+ { format.in.ed.booktitle "booktitle" output.check
+ format.bvolume output
+ format.number.series output
+ format.pages output
+ address empty$
+ { organization publisher new.sentence.checkb
+ organization output
+ publisher output
+ format.date "year" output.check
+ }
+ { address output.nonnull
+ format.date "year" output.check
+ new.sentence
+ organization output
+ publisher output
+ }
+ if$
+ }
+ { format.incoll.inproc.crossref output.nonnull
+ format.pages output
+ }
+ if$
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {conference} { inproceedings }
+
+FUNCTION {manual}
+{ output.bibitem
+ author empty$
+ { organization empty$
+ 'skip$
+ { organization output.nonnull
+ address output
+ }
+ if$
+ }
+ { format.authors output.nonnull }
+ if$
+ new.block
+ format.btitle "title" output.check
+ author empty$
+ { organization empty$
+ { address new.block.checka
+ address output
+ }
+ 'skip$
+ if$
+ }
+ { organization address new.block.checkb
+ organization output
+ address output
+ }
+ if$
+ format.edition output
+ format.date output
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {mastersthesis}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.title "title" output.check
+ new.block
+ "Master's thesis" format.thesis.type output.nonnull
+ school "school" output.check
+ address output
+ format.date "year" output.check
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {misc}
+{ output.bibitem
+ format.authors output
+ title howpublished new.block.checkb
+ format.title output
+ howpublished new.block.checka
+ howpublished output
+ format.date output
+ new.block
+ note output
+ fin.entry
+ empty.misc.check
+}
+
+FUNCTION {phdthesis}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.btitle "title" output.check
+ new.block
+ "PhD thesis" format.thesis.type output.nonnull
+ school "school" output.check
+ address output
+ format.date "year" output.check
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {proceedings}
+{ output.bibitem
+ editor empty$
+ { organization output }
+ { format.editors output.nonnull }
+ if$
+ new.block
+ format.btitle "title" output.check
+ format.bvolume output
+ format.number.series output
+ address empty$
+ { editor empty$
+ { publisher new.sentence.checka }
+ { organization publisher new.sentence.checkb
+ organization output
+ }
+ if$
+ publisher output
+ format.date "year" output.check
+ }
+ { address output.nonnull
+ format.date "year" output.check
+ new.sentence
+ editor empty$
+ 'skip$
+ { organization output }
+ if$
+ publisher output
+ }
+ if$
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {techreport}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.title "title" output.check
+ new.block
+ format.tr.number output.nonnull
+ institution "institution" output.check
+ address output
+ format.date "year" output.check
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {unpublished}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.title "title" output.check
+ new.block
+ note "note" output.check
+ format.date output
+ fin.entry
+}
+
+FUNCTION {default.type} { misc }
+
+MACRO {jan} {"Jan."}
+
+MACRO {feb} {"Feb."}
+
+MACRO {mar} {"Mar."}
+
+MACRO {apr} {"Apr."}
+
+MACRO {may} {"May"}
+
+MACRO {jun} {"June"}
+
+MACRO {jul} {"July"}
+
+MACRO {aug} {"Aug."}
+
+MACRO {sep} {"Sept."}
+
+MACRO {oct} {"Oct."}
+
+MACRO {nov} {"Nov."}
+
+MACRO {dec} {"Dec."}
+
+MACRO {acmcs} {"ACM Comput. Surv."}
+
+MACRO {acta} {"Acta Inf."}
+
+MACRO {cacm} {"Commun. ACM"}
+
+MACRO {ibmjrd} {"IBM J. Res. Dev."}
+
+MACRO {ibmsj} {"IBM Syst.~J."}
+
+MACRO {ieeese} {"IEEE Trans. Softw. Eng."}
+
+MACRO {ieeetc} {"IEEE Trans. Comput."}
+
+MACRO {ieeetcad}
+ {"IEEE Trans. Comput.-Aided Design Integrated Circuits"}
+
+MACRO {ipl} {"Inf. Process. Lett."}
+
+MACRO {jacm} {"J.~ACM"}
+
+MACRO {jcss} {"J.~Comput. Syst. Sci."}
+
+MACRO {scp} {"Sci. Comput. Programming"}
+
+MACRO {sicomp} {"SIAM J. Comput."}
+
+MACRO {tocs} {"ACM Trans. Comput. Syst."}
+
+MACRO {tods} {"ACM Trans. Database Syst."}
+
+MACRO {tog} {"ACM Trans. Gr."}
+
+MACRO {toms} {"ACM Trans. Math. Softw."}
+
+MACRO {toois} {"ACM Trans. Office Inf. Syst."}
+
+MACRO {toplas} {"ACM Trans. Prog. Lang. Syst."}
+
+MACRO {tcs} {"Theoretical Comput. Sci."}
+
+MACRO {advp} {"Adv. Phys."}
+MACRO {ajp} {"Am. J. Phys."}
+MACRO {ao} {"Appl. Opt."}
+MACRO {apl} {"Appl. Phys. Lett."}
+MACRO {apj} {"Astrophys. J."}
+MACRO {baps} {"Bull. Am. Phys. Soc."}
+MACRO {cpc} {"Computer Phys. Comm."}
+MACRO {cppcf} {"Comments Plasma Phys. Controlled Fusion"}
+MACRO {fed} {"Fusion Eng. Design"}
+MACRO {ft} {"Fusion Tech."}
+MACRO {ieeens} {"IEEE Trans. Nucl. Sci."}
+MACRO {ieeeps} {"IEEE Trans. Plasma Sci."}
+MACRO {ijimw} {"Int. J. Infrared Millimeter Waves"}
+MACRO {ip} {"Infrared Phys."}
+MACRO {jap} {"J. Appl. Phys."}
+MACRO {jcp} {"J. Comput. Phys."}
+MACRO {jetp} {"Sov. Phys.-JETP"}
+MACRO {jfe} {"J. Fusion Energy"}
+MACRO {jfm} {"J. Fluid Mech."}
+MACRO {jgr} {"J. Geophys. Res."}
+MACRO {jmp} {"J. Math. Phys."}
+MACRO {jne} {"J. Nucl. Energy"}
+MACRO {jnec} {"J. Nucl. Energy, Part C"}
+MACRO {jnm} {"J. Nucl. Mater."}
+MACRO {josa} {"J. Opt. Soc. Am."}
+MACRO {jpp} {"J. Plasma Phys."}
+MACRO {jpsj} {"J. Phys. Soc. Jpn"}
+MACRO {jvst} {"J. Vac. Sci. Technol."}
+MACRO {nedf} {"Nucl. Eng. Design/Fusion"}
+MACRO {nf} {"Nucl. Fusion"}
+MACRO {nim} {"Nucl. Instrum. Methods"}
+MACRO {nimpr} {"Nucl. Instrum. Methods Phys. Research"}
+MACRO {nt/f} {"Nucl. Tech./Fusion"}
+MACRO {pf} {"Phys. Fluids"}
+MACRO {pfa} {"Phys. Fluids A"}
+MACRO {pfb} {"Phys. Fluids B"}
+MACRO {pl} {"Phys. Lett."}
+MACRO {pla} {"Phys. Lett. A"}
+MACRO {pnas} {"Proc. Nat. Acad. Sci. USA"}
+MACRO {pp} {"Plasma Phys."}
+MACRO {ppcf} {"Plasma Phys. Controlled Fusion"}
+MACRO {prl} {"Phys. Rev. Lett."}
+MACRO {pr} {"Phys. Rev."}
+MACRO {pra} {"Phys. Rev. A"}
+MACRO {ps} {"Physica Scripta"}
+MACRO {rmp} {"Rev. Mod. Phys."}
+MACRO {rsi} {"Rev. Sci. Instrum."}
+MACRO {sjpp} {"Sov. J. Plasma Phys."}
+MACRO {spd} {"Sov. Phys.-Dokl."}
+MACRO {sptp} {"Sov. Phys.-Tech. Phys."}
+MACRO {spu} {"Sov. Phys.-Usp."}
+
+READ
+
+STRINGS { longest.label }
+
+INTEGERS { number.label longest.label.width }
+
+FUNCTION {initialize.longest.label}
+{ "" 'longest.label :=
+ #1 'number.label :=
+ #0 'longest.label.width :=
+}
+
+FUNCTION {longest.label.pass}
+{ number.label int.to.str$ 'label :=
+ number.label #1 + 'number.label :=
+ label width$ longest.label.width >
+ { label 'longest.label :=
+ label width$ 'longest.label.width :=
+ }
+ 'skip$
+ if$
+}
+
+EXECUTE {initialize.longest.label}
+
+ITERATE {longest.label.pass}
+
+FUNCTION {begin.bib}
+{ preamble$ empty$
+ 'skip$
+ { preamble$ write$ newline$ }
+ if$
+ "\begin{thebibliography}{" longest.label * "}" * write$ newline$
+}
+
+EXECUTE {begin.bib}
+
+EXECUTE {init.state.consts}
+
+ITERATE {call.type$}
+
+FUNCTION {end.bib}
+{ newline$
+ "\end{thebibliography}" write$ newline$
+}
+
+EXECUTE {end.bib}
diff --git a/biblio/bibtex/contrib/phy-bstyles/aip.sty b/biblio/bibtex/contrib/phy-bstyles/aip.sty
new file mode 100644
index 0000000000..537aca058b
--- /dev/null
+++ b/biblio/bibtex/contrib/phy-bstyles/aip.sty
@@ -0,0 +1,234 @@
+% AIP (style option to ARTICLE) for American Institute of Physics journals
+% AIP DOCUMENT SUBSTYLE -- released 17 January 1989
+% Written by Charles Karney (Karney@ccc.nmfecc.gov).
+
+% This document style is designed for manuscripts to be submitted to
+% one of the journals published by the Americal Institute of Physics.
+% To use this give AIP as an optional argument to \documentstyle. The
+% main style should be ARTICLE. E.g.,
+% \documentstyle[12pt,aip]{article}
+% This provides
+
+% (1) Section numbering for AIP journals (e.g., II.B.2.)
+
+% (2) Superscript reference numbers in citation and bibliography. You
+% should put the references in the logically correct place, e.g., "... as
+% is given by Landau \cite{landau}. Next sentence ..." \cite takes care
+% of removing the preceding spaces and putting the reference after the
+% punctuation (e.g, "... Landau.$^7$ ...").
+
+% (3) Three or more consecutive reference numbers are represented as a
+% range. Thus 1,3,4,5,6,8,9 is printed as 1,3--6,8,9. No sorting is
+% performed; i.e., 1,3,2 is printed as such.
+
+% (4) \citenum and \citea give you more control over the appearance of
+% the citations. \citenum emits the plain citation number without
+% ornament as in "... as shown in Ref.~\citenum{foo}.". \citea puts it's
+% argument into the ornamentation for citations. Thus \cite{foo} is
+% equivalent to \citea{\citenum{foo}}.
+
+% (5) The \maketitle command puts the "date" at the top. Typical usage is
+% \begin{document}
+% \date{PPPL--2128 (1984)}
+% \title{Efficiency of Current Drive by Fast Waves}
+% \author{Charles F. F. Karney and Nathaniel J. Fisch\\
+% Plasma Physics Laboratory, Princeton University\\Princeton, NJ 08543}
+% \maketitle
+% \begin{abstract}
+% etc.
+
+% (6) Abstract appears full size. Abstract is labeled ``Abstract'' unless
+% the ``abstract*'' environment is used. Section I begins on a new page.
+
+% (7) First paragraph of sections, etc., is normally indented.
+
+% (8) In appendices equations are numbered as B2 etc.
+
+% (9) Appendix appears in the section title for appendices. A period is
+% put after the section or appendix number. E.g., I. Introduction.
+
+% (10) The ``thefigures'' and ``thetables'' environments are defined
+% analogously to ``thebibliography''. This allows you the put the figure
+% captions and tables at the end of the document. The entries are
+% preceded by \figitem{<label>} and \tableitem{<label>} respectively.
+% (This doesn't interfer with LaTeX's figure and table environments for
+% inserting figures within the text.) ``thefigures'' is used as follows:
+% \begin{thefigures}{99}
+% \figitem{coords} The coordinate system used in this work.
+% etc.
+% \end{thefigures}
+% Figures and tables are refered to by the \ref mechanism. E.g.,
+% Fig.~\ref{coords}.
+% The starred versions of these environments, e.g., ``thefigures*'' causes
+% the heading to appear in the singular, i.e., ``Figure'' instead of
+% ``Figures''.
+
+% (11) The first appendix, the references, figure captions, and tables
+% all start on on new pages.
+
+% (12) \appendix* causes the appendices to be unnumbered. This is normally
+% only sensible if you have just one appendix. It is labeled ``Appendix.''
+% instead of ``Appendix A.'' The equation numbered are still labeled A3 etc.
+
+\typeout{Document Substyle 'AIP'. Released 17 January 1989}
+
+\def\thesection {\Roman{section}}
+\def\thesubsection {\Alph{subsection}}
+\def\thesubsubsection {\arabic{subsubsection}}
+
+\def\thebibliography#1{\par\clearpage\section*{References\@mkboth
+ {REFERENCES}{REFERENCES}}\list
+ {$\m@th^{\arabic{enumi}}$}{\settowidth\labelwidth{$\m@th^{#1}$}%
+ \labelsep0pt\leftmargin\parindent
+ \itemindent-\leftmargin\advance\itemindent\labelwidth
+ \usecounter{enumi}}
+ \def\newblock{\hskip .11em plus .33em minus -.07em}
+ \sloppy
+ \sfcode`\.=1000\relax}
+
+% Superscript citations -- skip optional arg to \cite
+% Move citation after period and comma.
+\def\@cite#1#2{\unskip\nobreak\relax
+ \def\@tempa{$\m@th^{\hbox{\the\scriptfont0 #1}}$}%
+ \futurelet\@tempc\@citexx}
+\def\@citexx{\ifx.\@tempc\let\@tempd=\@citepunct\else
+ \ifx,\@tempc\let\@tempd=\@citepunct\else
+ \let\@tempd=\@tempa\fi\fi\@tempd}
+\def\@citepunct{\@tempc\edef\@sf{\spacefactor=\the\spacefactor\relax}\@tempa
+ \@sf\@gobble}
+
+% \citenum emits the plain citation number without ornament
+% \citea puts it's argument into the ornamentation for citations
+% thus \cite{foo} is equivalent to \citea{\citenum{foo}}
+\def\citenum#1{{\def\@cite##1##2{##1}\cite{#1}}}
+\def\citea#1{\@cite{#1}{}}
+
+% Collapse citation numbers to ranges. Non-numeric and undefined labels
+% are handled. No sorting is done. E.g., 1,3,2,3,4,5,foo,1,2,3,?,4,5
+% gives 1,3,2-5,foo,1-3,?,4,5
+\newcount\@tempcntc
+\def\@citex[#1]#2{\if@filesw\immediate\write\@auxout{\string\citation{#2}}\fi
+ \@tempcnta\z@\@tempcntb\m@ne\def\@citea{}\@cite{\@for\@citeb:=#2\do
+ {\@ifundefined
+ {b@\@citeb}{\@citeo\@tempcntb\m@ne\@citea\def\@citea{,}{\bf ?}\@warning
+ {Citation `\@citeb' on page \thepage \space undefined}}%
+ {\setbox\z@\hbox{\global\@tempcntc0\csname b@\@citeb\endcsname\relax}%
+ \ifnum\@tempcntc=\z@ \@citeo\@tempcntb\m@ne
+ \@citea\def\@citea{,}\hbox{\csname b@\@citeb\endcsname}%
+ \else
+ \advance\@tempcntb\@ne
+ \ifnum\@tempcntb=\@tempcntc
+ \else\advance\@tempcntb\m@ne\@citeo
+ \@tempcnta\@tempcntc\@tempcntb\@tempcntc\fi\fi}}\@citeo}{#1}}
+\def\@citeo{\ifnum\@tempcnta>\@tempcntb\else\@citea\def\@citea{,}%
+ \ifnum\@tempcnta=\@tempcntb\the\@tempcnta\else
+ {\advance\@tempcnta\@ne\ifnum\@tempcnta=\@tempcntb \else \def\@citea{--}\fi
+ \advance\@tempcnta\m@ne\the\@tempcnta\@citea\the\@tempcntb}\fi\fi}
+
+% Title page
+\def\@maketitle{\newpage
+ \null
+ \vskip 1em plus 2em minus 1em % Vertical space before date.
+ \ifx\@date\@empty\else
+ \begin{flushright}
+ {\normalsize \@date} % Date set in \large size.
+ \end{flushright}
+ \vskip 2em plus 2em minus 1em % Vertical space above title.
+ \fi
+ \begin{center}
+ {\Large\bf \@title \par} % Title set in \Large size.
+ \vskip 1.5em plus 0em minus .5em % Vertical space after title.
+ {\large % each author set in \large, in a
+ \lineskip .5em plus 0em minus .3em % tabular environment
+ \begin{tabular}[t]{c}\@author
+ \end{tabular}\par}
+\end{center}
+ \par
+ \vskip 1.5em plus .5em minus .5em} % Vertical space after author.
+
+\newif\if@starvariant \@starvariantfalse
+
+\def\abstract{\if@starvariant\else\section*{Abstract}\fi}
+\def\endabstract{\par\clearpage}
+
+\@namedef{abstract*}{\@starvarianttrue\abstract}
+\@namedef{endabstract*}{\endabstract}
+
+\parskip 1.5pt plus 1.5pt % Extra vertical space between paragraphs.
+\tabcolsep 12pt % Double column separation in tables
+
+\def\section{\@startsection {section}{1}{\z@}{3.5ex plus 1ex minus
+ .2ex}{2.3ex plus .2ex}{\large\bf}}
+\def\subsection{\@startsection{subsection}{2}{\z@}{3.25ex plus 1ex minus
+ .2ex}{1.5ex plus .2ex}{\large\bf}}
+\def\subsubsection{\@startsection{subsubsection}{3}{\z@}{3.25ex plus
+1ex minus .2ex}{1.5ex plus .2ex}{\normalsize\bf}}
+
+\newif\if@numbersec \@numbersectrue
+\def\appendix{\par\clearpage
+ \setcounter{section}{0}
+ \setcounter{subsection}{0}
+ \@addtoreset{equation}{section}
+ \def\theequation{\thesection\arabic{equation}}
+ \def\thesection{\Alph{section}}
+ \def\thesubsection{\arabic{subsection}}
+ \@ifstar{\def\@sectname{Appendix}\@numbersecfalse}
+ {\def\@sectname{Appendix~}\@numbersectrue}}
+
+% Figures
+\def\thefigures#1{\par\clearpage
+ \if@starvariant\section*{Figure\@mkboth
+ {FIGURE}{FIGURE}}\else
+ \section*{Figures\@mkboth
+ {FIGURES}{FIGURES}}\fi
+ \list
+ {FIG.~\arabic{enumi}.}{\labelwidth\parindent\advance\labelwidth -\labelsep
+ \leftmargin\parindent\usecounter{enumi}}}
+\def\figitem#1{\item\label{#1}}
+\let\endthefigures=\endlist
+
+\@namedef{thefigures*}{\@starvarianttrue\thefigures}
+\@namedef{endthefigures*}{\endthefigures}
+
+% Tables
+\def\thetables#1{\par\clearpage
+ \if@starvariant\section*{Table\@mkboth
+ {TABLE}{TABLE}}\else
+ \section*{Tables\@mkboth
+ {TABLES}{TABLES}}\fi
+ \list
+ {TABLE~\Roman{enumi}.}{\labelwidth-\labelsep
+ \leftmargin0pt\usecounter{enumi}%
+ \def\theenumi{\Roman{enumi}}}}
+\def\tableitem#1{\item\label{#1}}
+\let\endthetables=\endlist
+
+\@namedef{thetables*}{\@starvarianttrue\thetables}
+\@namedef{endthetables*}{\endthetables}
+
+% Put period after section number and allow for APPENDIX prefix.
+\def\@sect#1#2#3#4#5#6[#7]#8{\ifnum #2>\c@secnumdepth
+ \def\@svsec{}\else
+ \refstepcounter{#1}\edef\@svsec{\ifnum #2=1 \@sectname
+ \if@numbersec\csname the#1\endcsname\fi.\else
+ \csname the#1\endcsname.\fi
+ \hskip 1em }\fi
+ \@tempskipa #5\relax
+ \ifdim \@tempskipa>\z@
+ \begingroup #6\relax
+ \@hangfrom{\hskip #3\relax\@svsec}{\interlinepenalty \@M #8\par}
+ \endgroup
+ \csname #1mark\endcsname{#7}\addcontentsline
+ {toc}{#1}{\ifnum #2>\c@secnumdepth \else
+ \protect\numberline{\csname the#1\endcsname}\fi
+ #7}\else
+ \def\@svsechd{#6\hskip #3\@svsec #8\csname #1mark\endcsname
+ {#7}\addcontentsline
+ {toc}{#1}{\ifnum #2>\c@secnumdepth \else
+ \protect\numberline{\csname the#1\endcsname}\fi
+ #7}}\fi
+ \@xsect{#5}}
+
+\def\@sectname{}
+
+\endinput
diff --git a/biblio/bibtex/contrib/phy-bstyles/cpc.bst b/biblio/bibtex/contrib/phy-bstyles/cpc.bst
new file mode 100644
index 0000000000..f4cd703c24
--- /dev/null
+++ b/biblio/bibtex/contrib/phy-bstyles/cpc.bst
@@ -0,0 +1,1036 @@
+%% #define CPC 1 % Thu Jun 14 13:25:20 1990
+%% #include "TEX$ROOT:[BIBTEX]PHYSICS.BTX"
+ % Please notify Charles Karney (Karney@Princeton.EDU)
+ % of any bugs, improvements, etc.
+
+ % For Computer Physics Communications
+
+ % version 0.99b for BibTeX versions 0.99a or later, LaTeX version 2.09.
+ % Copyright (C) 1985, all rights reserved.
+ % Copying of this file is authorized only if either
+ % (1) you make absolutely no changes to your copy, including name, or
+ % (2) if you do make changes, you name it something other than
+ % btxbst.doc, plain.bst, unsrt.bst, alpha.bst, and abbrv.bst.
+ % This restriction helps ensure that all standard styles are identical.
+ % The file btxbst.doc has the documentation for this style.
+
+ENTRY
+ { address
+ author
+ booktitle
+ chapter
+ edition
+ editor
+ howpublished
+ institution
+ journal
+ key
+ month
+ note
+ number
+ organization
+ pages
+ publisher
+ school
+ series
+ title
+ type
+ volume
+ year
+ }
+ {}
+ { label }
+
+INTEGERS { output.state before.all mid.sentence after.sentence after.block }
+
+FUNCTION {init.state.consts}
+{ #0 'before.all :=
+ #1 'mid.sentence :=
+ #2 'after.sentence :=
+ #3 'after.block :=
+}
+
+STRINGS { s t }
+
+FUNCTION {output.nonnull}
+{ 's :=
+ output.state mid.sentence =
+ { ", " * write$ }
+ { output.state after.block =
+ { "," * write$
+ newline$
+ "\newblock " write$
+ }
+ { output.state before.all =
+ 'write$
+ { add.period$ " " * write$ }
+ if$
+ }
+ if$
+ mid.sentence 'output.state :=
+ }
+ if$
+ s
+}
+
+FUNCTION {output}
+{ duplicate$ empty$
+ 'pop$
+ 'output.nonnull
+ if$
+}
+
+FUNCTION {output.check}
+{ 't :=
+ duplicate$ empty$
+ { pop$ "empty " t * " in " * cite$ * warning$ }
+ 'output.nonnull
+ if$
+}
+
+FUNCTION {output.bibitem}
+{ newline$
+ "\bibitem{" write$
+ cite$ write$
+ "}" write$
+ newline$
+ ""
+ before.all 'output.state :=
+}
+
+FUNCTION {fin.entry}
+{ add.period$
+ write$
+ newline$
+}
+
+FUNCTION {new.block}
+{ output.state before.all =
+ 'skip$
+ { after.block 'output.state := }
+ if$
+}
+
+FUNCTION {new.sentence}
+{ skip$
+}
+
+FUNCTION {not}
+{ { #0 }
+ { #1 }
+ if$
+}
+
+FUNCTION {and}
+{ 'skip$
+ { pop$ #0 }
+ if$
+}
+
+FUNCTION {or}
+{ { pop$ #1 }
+ 'skip$
+ if$
+}
+
+FUNCTION {new.block.checka}
+{ empty$
+ 'skip$
+ 'new.block
+ if$
+}
+
+FUNCTION {new.block.checkb}
+{ empty$
+ swap$ empty$
+ and
+ 'skip$
+ 'new.block
+ if$
+}
+
+FUNCTION {new.sentence.checka}
+{ empty$
+ 'skip$
+ 'new.sentence
+ if$
+}
+
+FUNCTION {new.sentence.checkb}
+{ empty$
+ swap$ empty$
+ and
+ 'skip$
+ 'new.sentence
+ if$
+}
+
+FUNCTION {field.or.null}
+{ duplicate$ empty$
+ { pop$ "" }
+ 'skip$
+ if$
+}
+
+FUNCTION {emphasize}
+{ duplicate$ empty$
+ { pop$ "" }
+ { "{\em " swap$ * "}" * }
+ if$
+}
+
+FUNCTION {embolden}
+{ duplicate$ empty$
+ { pop$ "" }
+ { "{\bf " swap$ * "}" * }
+ if$
+}
+
+FUNCTION {paren}
+{ duplicate$ empty$
+ { pop$ "" }
+ { "(" swap$ * ")" * }
+ if$
+}
+
+INTEGERS { nameptr namesleft numnames }
+
+INTEGERS { etal }
+
+FUNCTION {format.names}
+{ 's :=
+ #1 'nameptr :=
+ s num.names$ 'numnames :=
+ numnames #5 >
+ s numnames "{ll}" format.name$ "others" = numnames #1 > and
+ or 'etal :=
+ etal
+ { #1 #1 + 'namesleft := }
+ { numnames 'namesleft := }
+ if$
+ { namesleft #0 > }
+ { s nameptr "{vv~}{ll}{, jj}{, f.}" format.name$ 't := % last name first
+ nameptr #1 >
+ { namesleft #1 >
+ { ", " * t * }
+ { nameptr #2 >
+ { "," * }
+ 'skip$
+ if$
+ t "others" =
+ etal or
+ { " et~al." * }
+ { " and " * t * }
+ if$
+ }
+ if$
+ }
+ 't
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+}
+
+FUNCTION {format.authors}
+{ author empty$
+ { "" }
+ { author format.names }
+ if$
+}
+
+FUNCTION {format.editors}
+{ editor empty$
+ { "" }
+ { editor format.names
+ editor num.names$ #1 >
+ { ", editors" * }
+ { ", editor" * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.edited}
+{ editor empty$
+ { "" }
+ { "edited by " editor format.names * }
+ if$
+}
+
+FUNCTION {format.title}
+{ title empty$
+ { "" }
+ { title "t" change.case$ }
+ if$
+}
+
+FUNCTION {n.dashify}
+{ 't :=
+ ""
+ { t empty$ not }
+ { t #1 #1 substring$ "-" =
+ { t #1 #2 substring$ "--" = not
+ { "--" *
+ t #2 global.max$ substring$ 't :=
+ }
+ { { t #1 #1 substring$ "-" = }
+ { "-" *
+ t #2 global.max$ substring$ 't :=
+ }
+ while$
+ }
+ if$
+ }
+ { t #1 #1 substring$ *
+ t #2 global.max$ substring$ 't :=
+ }
+ if$
+ }
+ while$
+}
+
+FUNCTION {first.page}
+{ 't :=
+ ""
+ { t empty$ not t #1 #1 substring$ "-" = not and }
+ { t #1 #1 substring$ *
+ t #2 global.max$ substring$ 't :=
+ }
+ while$
+}
+
+FUNCTION {format.date}
+{ year empty$
+ { "" }
+ 'year
+ if$
+}
+
+FUNCTION {format.btitle}
+{ title emphasize
+}
+
+FUNCTION {tie.or.space.connect}
+{ duplicate$ text.length$ #3 <
+ { "~" }
+ { " " }
+ if$
+ swap$ * *
+}
+
+FUNCTION {either.or.check}
+{ empty$
+ 'pop$
+ { "can't use both " swap$ * " fields in " * cite$ * warning$ }
+ if$
+}
+
+FUNCTION {format.bvolume}
+{ volume empty$
+ { "" }
+ { "volume" volume tie.or.space.connect
+ series empty$
+ 'skip$
+ { " of " * series emphasize * }
+ if$
+ "volume and number" number either.or.check
+ }
+ if$
+}
+
+FUNCTION {format.number.series}
+{ volume empty$
+ { number empty$
+ { series field.or.null }
+ { output.state mid.sentence =
+ { "number" }
+ { "Number" }
+ if$
+ number tie.or.space.connect
+ series empty$
+ { "there's a number but no series in " cite$ * warning$ }
+ { " in " * series * }
+ if$
+ }
+ if$
+ }
+ { "" }
+ if$
+}
+
+FUNCTION {format.edition}
+{ edition empty$
+ { "" }
+ { output.state mid.sentence =
+ { edition "l" change.case$ " edition" * }
+ { edition "t" change.case$ " edition" * }
+ if$
+ }
+ if$
+}
+
+INTEGERS { multiresult }
+
+FUNCTION {multi.page.check}
+{ 't :=
+ #0 'multiresult :=
+ { multiresult not
+ t empty$ not
+ and
+ }
+ { t #1 #1 substring$
+ duplicate$ "-" =
+ swap$ duplicate$ "," =
+ swap$ "+" =
+ or or
+ { #1 'multiresult := }
+ { t #2 global.max$ substring$ 't := }
+ if$
+ }
+ while$
+ multiresult
+}
+
+FUNCTION {format.pages}
+{ pages empty$
+ { "" }
+ { pages multi.page.check
+ { "pages" pages n.dashify tie.or.space.connect }
+ { "page" pages tie.or.space.connect }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.pages.a}
+{ pages empty$
+ { "" }
+ { "page" pages first.page tie.or.space.connect }
+ if$
+}
+
+FUNCTION {format.vol.num.pages}
+{ volume field.or.null embolden
+ " " swap$ * *
+ format.date empty$
+ 'skip$
+ { duplicate$ empty$
+ { pop$ format.date paren }
+ { " " * format.date paren * }
+ if$
+ }
+ if$
+ pages empty$
+ 'skip$
+ { duplicate$ empty$
+ { pop$ format.pages.a }
+ { " " * pages first.page *}
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.chapter.pages}
+{ chapter empty$
+ 'format.pages
+ { type empty$
+ { "chapter" }
+ { type "l" change.case$ }
+ if$
+ chapter tie.or.space.connect
+ pages empty$
+ 'skip$
+ { ", " * format.pages * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.in.ed.booktitle}
+{ booktitle empty$
+ { "" }
+ { editor empty$
+ { "in " booktitle emphasize * }
+ { "in " booktitle emphasize * ", " * format.edited * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {empty.misc.check}
+{ author empty$ title empty$ howpublished empty$
+ month empty$ year empty$ note empty$
+ and and and and and
+ { "all relevant fields are empty in " cite$ * warning$ }
+ 'skip$
+ if$
+}
+
+FUNCTION {format.thesis.type}
+{ type empty$
+ 'skip$
+ { pop$
+ type "t" change.case$
+ }
+ if$
+}
+
+FUNCTION {format.tr.number}
+{ type empty$
+ { "Technical Report" }
+ 'type
+ if$
+ number empty$
+ { "t" change.case$ }
+ { number tie.or.space.connect }
+ if$
+}
+
+FUNCTION {format.article.crossref}
+{ key empty$
+ { journal empty$
+ { "need key or journal for " cite$ * " to crossref " * crossref *
+ warning$
+ ""
+ }
+ { "In " journal * }
+ if$
+ }
+ { "In " key * }
+ if$
+ " \cite{" * crossref * "}" *
+}
+
+FUNCTION {format.crossref.editor}
+{ editor #1 "{vv~}{ll}" format.name$
+ editor num.names$ duplicate$
+ #2 >
+ { pop$ " et~al." * }
+ { #2 <
+ 'skip$
+ { editor #2 "{ff }{vv }{ll}{ jj}" format.name$ "others" =
+ { " et~al." * }
+ { " and " * editor #2 "{vv~}{ll}" format.name$ * }
+ if$
+ }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.book.crossref}
+{ volume empty$
+ { "empty volume in " cite$ * "'s crossref of " * crossref * warning$
+ "In "
+ }
+ { "Volume" volume tie.or.space.connect
+ " of " *
+ }
+ if$
+ editor empty$
+ editor field.or.null author field.or.null =
+ or
+ { key empty$
+ { series empty$
+ { "need editor, key, or series for " cite$ * " to crossref " *
+ crossref * warning$
+ "" *
+ }
+ { "{\em " * series * "\/}" * }
+ if$
+ }
+ { key * }
+ if$
+ }
+ { format.crossref.editor * }
+ if$
+ " \cite{" * crossref * "}" *
+}
+
+FUNCTION {format.incoll.inproc.crossref}
+{ editor empty$
+ editor field.or.null author field.or.null =
+ or
+ { key empty$
+ { booktitle empty$
+ { "need editor, key, or booktitle for " cite$ * " to crossref " *
+ crossref * warning$
+ ""
+ }
+ { "In {\em " booktitle * "\/}" * }
+ if$
+ }
+ { "In " key * }
+ if$
+ }
+ { "In " format.crossref.editor * }
+ if$
+ " \cite{" * crossref * "}" *
+}
+
+FUNCTION {article}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ crossref missing$
+ { journal field.or.null
+ format.vol.num.pages output
+ }
+ { format.article.crossref output.nonnull
+ format.pages output
+ }
+ if$
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {book}
+{ output.bibitem
+ author empty$
+ { format.editors "author and editor" output.check }
+ { format.authors output.nonnull
+ crossref missing$
+ { "author and editor" editor either.or.check }
+ 'skip$
+ if$
+ }
+ if$
+ new.block
+ format.btitle "title" output.check
+ crossref missing$
+ { format.bvolume output
+ new.block
+ format.number.series output
+ new.sentence
+ publisher "publisher" output.check
+ address output
+ }
+ { new.block
+ format.book.crossref output.nonnull
+ }
+ if$
+ format.edition output
+ format.date "year" output.check
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {booklet}
+{ output.bibitem
+ format.authors output
+ new.block
+ format.title "title" output.check
+ howpublished address new.block.checkb
+ howpublished output
+ address output
+ format.date output
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {inbook}
+{ output.bibitem
+ author empty$
+ { format.editors "author and editor" output.check }
+ { format.authors output.nonnull
+ crossref missing$
+ { "author and editor" editor either.or.check }
+ 'skip$
+ if$
+ }
+ if$
+ new.block
+ format.btitle "title" output.check
+ crossref missing$
+ { format.bvolume output
+ format.chapter.pages "chapter and pages" output.check
+ new.block
+ format.number.series output
+ new.sentence
+ publisher "publisher" output.check
+ address output
+ }
+ { format.chapter.pages "chapter and pages" output.check
+ new.block
+ format.book.crossref output.nonnull
+ }
+ if$
+ format.edition output
+ format.date "year" output.check
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {incollection}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.title "title" output.check
+ new.block
+ crossref missing$
+ { format.in.ed.booktitle "booktitle" output.check
+ format.bvolume output
+ format.number.series output
+ format.chapter.pages output
+ new.sentence
+ publisher "publisher" output.check
+ address output
+ format.edition output
+ format.date "year" output.check
+ }
+ { format.incoll.inproc.crossref output.nonnull
+ format.chapter.pages output
+ }
+ if$
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {inproceedings}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.title "title" output.check
+ new.block
+ crossref missing$
+ { format.in.ed.booktitle "booktitle" output.check
+ format.bvolume output
+ format.number.series output
+ format.pages output
+ address empty$
+ { organization publisher new.sentence.checkb
+ organization output
+ publisher output
+ format.date "year" output.check
+ }
+ { address output.nonnull
+ format.date "year" output.check
+ new.sentence
+ organization output
+ publisher output
+ }
+ if$
+ }
+ { format.incoll.inproc.crossref output.nonnull
+ format.pages output
+ }
+ if$
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {conference} { inproceedings }
+
+FUNCTION {manual}
+{ output.bibitem
+ author empty$
+ { organization empty$
+ 'skip$
+ { organization output.nonnull
+ address output
+ }
+ if$
+ }
+ { format.authors output.nonnull }
+ if$
+ new.block
+ format.btitle "title" output.check
+ author empty$
+ { organization empty$
+ { address new.block.checka
+ address output
+ }
+ 'skip$
+ if$
+ }
+ { organization address new.block.checkb
+ organization output
+ address output
+ }
+ if$
+ format.edition output
+ format.date output
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {mastersthesis}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.title "title" output.check
+ new.block
+ "Master's thesis" format.thesis.type output.nonnull
+ school "school" output.check
+ address output
+ format.date "year" output.check
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {misc}
+{ output.bibitem
+ format.authors output
+ title howpublished new.block.checkb
+ format.title output
+ howpublished new.block.checka
+ howpublished output
+ format.date output
+ new.block
+ note output
+ fin.entry
+ empty.misc.check
+}
+
+FUNCTION {phdthesis}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.btitle "title" output.check
+ new.block
+ "PhD thesis" format.thesis.type output.nonnull
+ school "school" output.check
+ address output
+ format.date "year" output.check
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {proceedings}
+{ output.bibitem
+ editor empty$
+ { organization output }
+ { format.editors output.nonnull }
+ if$
+ new.block
+ format.btitle "title" output.check
+ format.bvolume output
+ format.number.series output
+ address empty$
+ { editor empty$
+ { publisher new.sentence.checka }
+ { organization publisher new.sentence.checkb
+ organization output
+ }
+ if$
+ publisher output
+ format.date "year" output.check
+ }
+ { address output.nonnull
+ format.date "year" output.check
+ new.sentence
+ editor empty$
+ 'skip$
+ { organization output }
+ if$
+ publisher output
+ }
+ if$
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {techreport}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.title "title" output.check
+ new.block
+ format.tr.number output.nonnull
+ institution "institution" output.check
+ address output
+ format.date "year" output.check
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {unpublished}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.title "title" output.check
+ new.block
+ note "note" output.check
+ format.date output
+ fin.entry
+}
+
+FUNCTION {default.type} { misc }
+
+MACRO {jan} {"Jan."}
+
+MACRO {feb} {"Feb."}
+
+MACRO {mar} {"Mar."}
+
+MACRO {apr} {"Apr."}
+
+MACRO {may} {"May"}
+
+MACRO {jun} {"June"}
+
+MACRO {jul} {"July"}
+
+MACRO {aug} {"Aug."}
+
+MACRO {sep} {"Sept."}
+
+MACRO {oct} {"Oct."}
+
+MACRO {nov} {"Nov."}
+
+MACRO {dec} {"Dec."}
+
+MACRO {acmcs} {"ACM Comput. Surv."}
+
+MACRO {acta} {"Acta Inf."}
+
+MACRO {cacm} {"Commun. ACM"}
+
+MACRO {ibmjrd} {"IBM J. Res. Dev."}
+
+MACRO {ibmsj} {"IBM Syst.~J."}
+
+MACRO {ieeese} {"IEEE Trans. Softw. Eng."}
+
+MACRO {ieeetc} {"IEEE Trans. Comput."}
+
+MACRO {ieeetcad}
+ {"IEEE Trans. Comput.-Aided Design Integrated Circuits"}
+
+MACRO {ipl} {"Inf. Process. Lett."}
+
+MACRO {jacm} {"J.~ACM"}
+
+MACRO {jcss} {"J.~Comput. Syst. Sci."}
+
+MACRO {scp} {"Sci. Comput. Programming"}
+
+MACRO {sicomp} {"SIAM J. Comput."}
+
+MACRO {tocs} {"ACM Trans. Comput. Syst."}
+
+MACRO {tods} {"ACM Trans. Database Syst."}
+
+MACRO {tog} {"ACM Trans. Gr."}
+
+MACRO {toms} {"ACM Trans. Math. Softw."}
+
+MACRO {toois} {"ACM Trans. Office Inf. Syst."}
+
+MACRO {toplas} {"ACM Trans. Prog. Lang. Syst."}
+
+MACRO {tcs} {"Theoretical Comput. Sci."}
+
+MACRO {advp} {"Adv. Phys."}
+MACRO {ajp} {"Am. J. Phys."}
+MACRO {ao} {"Appl. Opt."}
+MACRO {apl} {"Appl. Phys. Lett."}
+MACRO {apj} {"Astrophys. J."}
+MACRO {baps} {"Bull. Am. Phys. Soc."}
+MACRO {cpc} {"Computer Phys. Comm."}
+MACRO {cppcf} {"Comments Plasma Phys. Controlled Fusion"}
+MACRO {fed} {"Fusion Eng. Design"}
+MACRO {ft} {"Fusion Tech."}
+MACRO {ieeens} {"IEEE Trans. Nucl. Sci."}
+MACRO {ieeeps} {"IEEE Trans. Plasma Sci."}
+MACRO {ijimw} {"Int. J. Infrared Millimeter Waves"}
+MACRO {ip} {"Infrared Phys."}
+MACRO {jap} {"J. Appl. Phys."}
+MACRO {jcp} {"J. Comput. Phys."}
+MACRO {jetp} {"Sov. Phys.-JETP"}
+MACRO {jfe} {"J. Fusion Energy"}
+MACRO {jfm} {"J. Fluid Mech."}
+MACRO {jgr} {"J. Geophys. Res."}
+MACRO {jmp} {"J. Math. Phys."}
+MACRO {jne} {"J. Nucl. Energy"}
+MACRO {jnec} {"J. Nucl. Energy, Part C"}
+MACRO {jnm} {"J. Nucl. Mater."}
+MACRO {josa} {"J. Opt. Soc. Am."}
+MACRO {jpp} {"J. Plasma Phys."}
+MACRO {jpsj} {"J. Phys. Soc. Jpn"}
+MACRO {jvst} {"J. Vac. Sci. Technol."}
+MACRO {nedf} {"Nucl. Eng. Design/Fusion"}
+MACRO {nf} {"Nucl. Fusion"}
+MACRO {nim} {"Nucl. Instrum. Methods"}
+MACRO {nimpr} {"Nucl. Instrum. Methods Phys. Research"}
+MACRO {nt/f} {"Nucl. Tech./Fusion"}
+MACRO {pf} {"Phys. Fluids"}
+MACRO {pfa} {"Phys. Fluids A"}
+MACRO {pfb} {"Phys. Fluids B"}
+MACRO {pl} {"Phys. Lett."}
+MACRO {pla} {"Phys. Lett. A"}
+MACRO {pnas} {"Proc. Nat. Acad. Sci. USA"}
+MACRO {pp} {"Plasma Phys."}
+MACRO {ppcf} {"Plasma Phys. Controlled Fusion"}
+MACRO {prl} {"Phys. Rev. Lett."}
+MACRO {pr} {"Phys. Rev."}
+MACRO {pra} {"Phys. Rev. A"}
+MACRO {ps} {"Physica Scripta"}
+MACRO {rmp} {"Rev. Mod. Phys."}
+MACRO {rsi} {"Rev. Sci. Instrum."}
+MACRO {sjpp} {"Sov. J. Plasma Phys."}
+MACRO {spd} {"Sov. Phys.-Dokl."}
+MACRO {sptp} {"Sov. Phys.-Tech. Phys."}
+MACRO {spu} {"Sov. Phys.-Usp."}
+
+READ
+
+STRINGS { longest.label }
+
+INTEGERS { number.label longest.label.width }
+
+FUNCTION {initialize.longest.label}
+{ "" 'longest.label :=
+ #1 'number.label :=
+ #0 'longest.label.width :=
+}
+
+FUNCTION {longest.label.pass}
+{ number.label int.to.str$ 'label :=
+ number.label #1 + 'number.label :=
+ label width$ longest.label.width >
+ { label 'longest.label :=
+ label width$ 'longest.label.width :=
+ }
+ 'skip$
+ if$
+}
+
+EXECUTE {initialize.longest.label}
+
+ITERATE {longest.label.pass}
+
+FUNCTION {begin.bib}
+{ preamble$ empty$
+ 'skip$
+ { preamble$ write$ newline$ }
+ if$
+ "\begin{thebibliography}{" longest.label * "}" * write$ newline$
+}
+
+EXECUTE {begin.bib}
+
+EXECUTE {init.state.consts}
+
+ITERATE {call.type$}
+
+FUNCTION {end.bib}
+{ newline$
+ "\end{thebibliography}" write$ newline$
+}
+
+EXECUTE {end.bib}
diff --git a/biblio/bibtex/contrib/phy-bstyles/cpp.el b/biblio/bibtex/contrib/phy-bstyles/cpp.el
new file mode 100644
index 0000000000..3725c45f62
--- /dev/null
+++ b/biblio/bibtex/contrib/phy-bstyles/cpp.el
@@ -0,0 +1,199 @@
+;; A C preprocessor written for GnuEmacs for use in generating BibTeX style
+;; files from a master file. In addition it removes whole-line comments (with
+;; "%" in the first column) and collapses multiple blank lines to a single
+;; blank line.
+
+;; Charles Karney
+;; Plasma Physics Laboratory Phone: +1 609 243 2607
+;; Princeton University E-mail: Karney@Princeton.EDU
+;; PO Box 451
+;; Princeton, NJ 08543-0451
+
+;; RESTRICTIONS:
+
+;; Recognizes only a subset of C precessor symbols:
+;; #include, #ifdef, #ifndef, #define, #undef, #if, #else, #endif.
+
+;; Macro values can only be numbers.
+
+;; Expressions are not allowed, except for !MACRO. Thus
+;; "#if FOO" and "#if !FOO" work OK
+;; "#if (FOO | BAR)" and "#if FOO == 4" do not work
+
+;; Value substitution is done in a separate pass through the file at the end.
+;; This means that the value substituted for a particular macro is the last
+;; one defined. Thus
+;; #define FOO 4
+;; FOO
+;; #define FOO 10
+;; FOO
+;; produces
+;; 10
+;; 10
+
+(defvar cpp-macros nil "currently defined macros")
+(defvar cpp-values nil "values for currently defined macros")
+
+(defun cpp (init)
+ "Run C preprocessor on current buffer. Argument is single macro to
+get defined before processing begins.
+Recognizes a subset of C precessor symbols:
+ #include, #ifdef, #ifndef, #define, #if, #else, #endif.
+Also strips out any comments starting with % in the first column."
+ (interactive "sRun cpp defining: ")
+ (goto-char (point-min))
+ (setq init (upcase init))
+ (let (verb)
+ (setq cpp-macros nil cpp-values nil)
+ (cond ((> (length init) 0)
+ (cpp-define init 1)
+ (insert (concat "%% #define " init
+ " 1\t\t% " (current-time-string) "\n"))))
+ (insert (concat "%% #include \"" (buffer-file-name) "\"\n"))
+ (while (re-search-forward "^#" nil t)
+ (save-excursion (beginning-of-line) (insert "%% "))
+ (setq verb (cpp-next-word))
+ (cond ((equal verb "include") (cpp-include (cpp-next-word)))
+ ((equal verb "define")
+ (cpp-define (cpp-next-word) (cpp-eval (cpp-next-word))))
+ ((equal verb "undef")
+ (cpp-undef (cpp-next-word)))
+ ((equal verb "ifdef")
+ (cond ((zerop (cpp-ifdef (cpp-next-word))) (cpp-skip))))
+ ((equal verb "ifndef")
+ (cond ((not (zerop (cpp-ifdef (cpp-next-word)))) (cpp-skip))))
+ ((equal verb "if")
+ (cond ((zerop (cpp-eval (cpp-next-word))) (cpp-skip))))
+ ((equal verb "else")
+ (cpp-skip))
+ ((equal verb "endif"))
+ (t (error "Unknown preprocessor directive: %s" verb)))))
+ (goto-char (point-min))
+ (forward-line 2)
+ (while (re-search-forward "^%" nil t)
+ (beginning-of-line)
+ (delete-region (point) (progn (forward-line 1) (point))))
+ (goto-char (point-min))
+ (while (re-search-forward "\n\n\n" nil t)
+ (backward-char 3)
+ (delete-char 1))
+ (let ((macros cpp-macros) (values cpp-values) (case-fold-search nil))
+ (while macros
+ (goto-char (point-min))
+ (forward-line 2)
+ (while (re-search-forward (concat "\\b" (car macros) "\\b") nil t)
+ (delete-region (match-beginning 0) (match-end 0))
+ (insert (int-to-string (car values))))
+ (setq macros (cdr macros) values (cdr values)))))
+
+(defun cpp-include (file)
+ "Include a file"
+ (forward-line 1)
+ (insert-file (substring file 1 -1)))
+
+(defun cpp-eval (macro)
+ "Returns the value of a macro"
+ (cond ((equal (substring macro 0 1) "!")
+ (if (eq (cpp-eval (substring macro 1 nil)) 0)
+ 1
+ 0))
+ ((or (equal (substring macro 0 1) "0")
+ (not (eq (string-to-int macro) 0)))
+ (string-to-int macro))
+ (t (let ((macros cpp-macros) (values cpp-values))
+ (while (not (or (null macros)
+ (equal (car macros) macro)))
+ (setq macros (cdr macros)
+ values (cdr values)))
+ (if (null macros)
+ (error "Undefined macro %s",macro)
+ (car values))))))
+
+(defun cpp-define (macro value)
+ "Make a definition"
+ (let ((macros cpp-macros) (values cpp-values))
+ (while (not (or (null macros)
+ (equal (car macros) macro)))
+ (setq macros (cdr macros)
+ values (cdr values)))
+ (if (null macros) (setq cpp-macros (cons macro cpp-macros)
+ cpp-values (cons value cpp-values))
+ (rplaca values value))))
+
+(defun cpp-undef (macro)
+ "Remove a definition"
+ (let ((macros cpp-macros) (values cpp-values) macrosa valuesa)
+ (cond ((null macros))
+ ((equal (car macros) macro)
+ (setq cpp-macros (cdr macros)
+ cpp-values (cdr values)))
+ (t (setq macrosa (cdr macros) valuesa (cdr values))
+ (while (not (or (null macrosa)
+ (equal (car macrosa) macro)))
+ (setq macros macrosa
+ values valuesa
+ macrosa (cdr macrosa)
+ valuesa (cdr valuesa)))
+ (cond ((null macros))
+ (t (rplacd macros (cdr macrosa))
+ (rplacd values (cdr valuesa))))))))
+
+(defun cpp-ifdef (macro)
+ "Returns 1 if macro is defined, 0 otherwise"
+ (let ((macros cpp-macros) (values cpp-values))
+ (while (not (or (null macros)
+ (equal (car macros) macro)))
+ (setq macros (cdr macros)
+ values (cdr values)))
+ (if (null macros) 0 1)))
+
+(defun cpp-next-word ()
+ "Return next blank-delimited word in buffer"
+ (skip-chars-forward " \t")
+ (buffer-substring (point)
+ (progn (re-search-forward " \\|\t\\|$")
+ (match-beginning 0))))
+
+(defun cpp-skip ()
+ "Skips to next endif or else"
+ (forward-line 1)
+ (delete-region
+ (point)
+ (let ((count 1))
+ (while (> count 0)
+ (re-search-forward "^#[ \t]*\\(if\\|else\\|endif\\)")
+ (goto-char (match-beginning 1))
+ (cond ((looking-at "if") (setq count (1+ count)))
+ ((looking-at "else") (if (eq count 1) (setq count 0)))
+ ((looking-at "endif") (setq count (1- count)))))
+ (beginning-of-line)
+ (point)))
+ (insert "%% "))
+
+(defun cpp-file (name)
+ "Run C preprocessor on physics.btx. Argument is single macro to
+get defined before processing begins and this is used in the filename
+that the results get written to."
+ (interactive "sRun cpp-file defining: ")
+ (let ((indir "tex$root:[bibtex]")
+ (outdir "tex$root:[latex]"))
+ (find-file (concat indir "physics.btx"))
+ (cpp name)
+ (write-file (concat outdir name ".bst"))))
+
+(defun cpp-everything ()
+ "Runs cpp on physics.btx to produce all standard styles"
+ (interactive)
+ (let ((macros (append
+ (list "aip" "pf" "nf" "nflet" "iaea" "cpc" "rmp"
+ "report" "ppcf" "jcp")
+; (list "apalike")
+; (list "plain" "unsrt" "alpha" "abbrv")
+ )))
+ ; The standard styles are
+ ; "plain" "unsrt" "abbrv" "alpha"
+ ; A semi-standard style is "apalike"
+ (while macros
+ (cpp-file (car macros))
+ (kill-buffer (buffer-name))
+ (setq macros (cdr macros)))))
diff --git a/biblio/bibtex/contrib/phy-bstyles/iaea.bst b/biblio/bibtex/contrib/phy-bstyles/iaea.bst
new file mode 100644
index 0000000000..5b4c3b9a59
--- /dev/null
+++ b/biblio/bibtex/contrib/phy-bstyles/iaea.bst
@@ -0,0 +1,1040 @@
+%% #define IAEA 1 % Thu Jun 14 13:24:41 1990
+%% #include "TEX$ROOT:[BIBTEX]PHYSICS.BTX"
+ % Please notify Charles Karney (Karney@Princeton.EDU)
+ % of any bugs, improvements, etc.
+
+ % For 1 Conferences
+
+ % version 0.99b for BibTeX versions 0.99a or later, LaTeX version 2.09.
+ % Copyright (C) 1985, all rights reserved.
+ % Copying of this file is authorized only if either
+ % (1) you make absolutely no changes to your copy, including name, or
+ % (2) if you do make changes, you name it something other than
+ % btxbst.doc, plain.bst, unsrt.bst, alpha.bst, and abbrv.bst.
+ % This restriction helps ensure that all standard styles are identical.
+ % The file btxbst.doc has the documentation for this style.
+
+ENTRY
+ { address
+ author
+ booktitle
+ chapter
+ edition
+ editor
+ howpublished
+ institution
+ journal
+ key
+ month
+ note
+ number
+ organization
+ pages
+ publisher
+ school
+ series
+ title
+ type
+ volume
+ year
+ }
+ {}
+ { label }
+
+INTEGERS { output.state before.all mid.sentence after.sentence after.block }
+
+FUNCTION {init.state.consts}
+{ #0 'before.all :=
+ #1 'mid.sentence :=
+ #2 'after.sentence :=
+ #3 'after.block :=
+}
+
+STRINGS { s t }
+
+FUNCTION {output.nonnull}
+{ 's :=
+ output.state mid.sentence =
+ { ", " * write$ }
+ { output.state after.block =
+ { "," * write$
+ newline$
+ "\newblock " write$
+ }
+ { output.state before.all =
+ 'write$
+ { add.period$ " " * write$ }
+ if$
+ }
+ if$
+ mid.sentence 'output.state :=
+ }
+ if$
+ s
+}
+
+FUNCTION {output}
+{ duplicate$ empty$
+ 'pop$
+ 'output.nonnull
+ if$
+}
+
+FUNCTION {output.check}
+{ 't :=
+ duplicate$ empty$
+ { pop$ "empty " t * " in " * cite$ * warning$ }
+ 'output.nonnull
+ if$
+}
+
+FUNCTION {output.bibitem}
+{ newline$
+ "\bibitem{" write$
+ cite$ write$
+ "}" write$
+ newline$
+ ""
+ before.all 'output.state :=
+}
+
+FUNCTION {fin.entry}
+{ add.period$
+ write$
+ newline$
+}
+
+FUNCTION {new.block}
+{ output.state before.all =
+ 'skip$
+ { after.block 'output.state := }
+ if$
+}
+
+FUNCTION {new.sentence}
+{ skip$
+}
+
+FUNCTION {not}
+{ { #0 }
+ { #1 }
+ if$
+}
+
+FUNCTION {and}
+{ 'skip$
+ { pop$ #0 }
+ if$
+}
+
+FUNCTION {or}
+{ { pop$ #1 }
+ 'skip$
+ if$
+}
+
+FUNCTION {new.block.checka}
+{ empty$
+ 'skip$
+ 'new.block
+ if$
+}
+
+FUNCTION {new.block.checkb}
+{ empty$
+ swap$ empty$
+ and
+ 'skip$
+ 'new.block
+ if$
+}
+
+FUNCTION {new.sentence.checka}
+{ empty$
+ 'skip$
+ 'new.sentence
+ if$
+}
+
+FUNCTION {new.sentence.checkb}
+{ empty$
+ swap$ empty$
+ and
+ 'skip$
+ 'new.sentence
+ if$
+}
+
+FUNCTION {field.or.null}
+{ duplicate$ empty$
+ { pop$ "" }
+ 'skip$
+ if$
+}
+
+FUNCTION {emphasize}
+{ duplicate$ empty$
+ { pop$ "" }
+ { "{\em " swap$ * "}" * }
+ if$
+}
+
+FUNCTION {embolden}
+{ duplicate$ empty$
+ { pop$ "" }
+ { "{\bf " swap$ * "}" * }
+ if$
+}
+
+FUNCTION {paren}
+{ duplicate$ empty$
+ { pop$ "" }
+ { "(" swap$ * ")" * }
+ if$
+}
+
+INTEGERS { nameptr namesleft numnames }
+
+INTEGERS { etal }
+
+FUNCTION {format.names}
+{ 's :=
+ #1 'nameptr :=
+ s num.names$ 'numnames :=
+ numnames #1 >
+ s numnames "{ll}" format.name$ "others" = numnames #1 > and
+ or 'etal :=
+ etal
+ { #1 #1 + 'namesleft := }
+ { numnames 'namesleft := }
+ if$
+ { namesleft #0 > }
+ { s nameptr "{vv~}{ll}{, jj}{, f.}" format.name$ 't := % last name first
+ t "others" =
+ 'skip$
+ { t "u" change.case$ 't := }
+ if$
+ nameptr #1 >
+ { namesleft #1 >
+ { ", " * t * }
+ { nameptr #2 >
+ { "," * }
+ 'skip$
+ if$
+ t "others" =
+ etal or
+ { " et~al." * }
+ { " and " * t * }
+ if$
+ }
+ if$
+ }
+ 't
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+}
+
+FUNCTION {format.authors}
+{ author empty$
+ { "" }
+ { author format.names }
+ if$
+}
+
+FUNCTION {format.editors}
+{ editor empty$
+ { "" }
+ { editor format.names
+ editor num.names$ #1 >
+ { ", editors" * }
+ { ", editor" * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.edited}
+{ editor empty$
+ { "" }
+ { "edited by " editor format.names * }
+ if$
+}
+
+FUNCTION {format.title}
+{ title empty$
+ { "" }
+ { title "t" change.case$ }
+ if$
+}
+
+FUNCTION {n.dashify}
+{ 't :=
+ ""
+ { t empty$ not }
+ { t #1 #1 substring$ "-" =
+ { t #1 #2 substring$ "--" = not
+ { "--" *
+ t #2 global.max$ substring$ 't :=
+ }
+ { { t #1 #1 substring$ "-" = }
+ { "-" *
+ t #2 global.max$ substring$ 't :=
+ }
+ while$
+ }
+ if$
+ }
+ { t #1 #1 substring$ *
+ t #2 global.max$ substring$ 't :=
+ }
+ if$
+ }
+ while$
+}
+
+FUNCTION {first.page}
+{ 't :=
+ ""
+ { t empty$ not t #1 #1 substring$ "-" = not and }
+ { t #1 #1 substring$ *
+ t #2 global.max$ substring$ 't :=
+ }
+ while$
+}
+
+FUNCTION {format.date}
+{ year empty$
+ { "" }
+ 'year
+ if$
+}
+
+FUNCTION {format.btitle}
+{ title emphasize
+}
+
+FUNCTION {tie.or.space.connect}
+{ duplicate$ text.length$ #3 <
+ { "~" }
+ { " " }
+ if$
+ swap$ * *
+}
+
+FUNCTION {either.or.check}
+{ empty$
+ 'pop$
+ { "can't use both " swap$ * " fields in " * cite$ * warning$ }
+ if$
+}
+
+FUNCTION {format.bvolume}
+{ volume empty$
+ { "" }
+ { "volume" volume tie.or.space.connect
+ series empty$
+ 'skip$
+ { " of " * series emphasize * }
+ if$
+ "volume and number" number either.or.check
+ }
+ if$
+}
+
+FUNCTION {format.number.series}
+{ volume empty$
+ { number empty$
+ { series field.or.null }
+ { output.state mid.sentence =
+ { "number" }
+ { "Number" }
+ if$
+ number tie.or.space.connect
+ series empty$
+ { "there's a number but no series in " cite$ * warning$ }
+ { " in " * series * }
+ if$
+ }
+ if$
+ }
+ { "" }
+ if$
+}
+
+FUNCTION {format.edition}
+{ edition empty$
+ { "" }
+ { output.state mid.sentence =
+ { edition "l" change.case$ " edition" * }
+ { edition "t" change.case$ " edition" * }
+ if$
+ }
+ if$
+}
+
+INTEGERS { multiresult }
+
+FUNCTION {multi.page.check}
+{ 't :=
+ #0 'multiresult :=
+ { multiresult not
+ t empty$ not
+ and
+ }
+ { t #1 #1 substring$
+ duplicate$ "-" =
+ swap$ duplicate$ "," =
+ swap$ "+" =
+ or or
+ { #1 'multiresult := }
+ { t #2 global.max$ substring$ 't := }
+ if$
+ }
+ while$
+ multiresult
+}
+
+FUNCTION {format.pages}
+{ pages empty$
+ { "" }
+ { pages multi.page.check
+ { "pages" pages n.dashify tie.or.space.connect }
+ { "page" pages tie.or.space.connect }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.pages.a}
+{ pages empty$
+ { "" }
+ { "page" pages first.page tie.or.space.connect }
+ if$
+}
+
+FUNCTION {format.vol.num.pages}
+{ volume field.or.null embolden
+ " " swap$ * *
+ format.date empty$
+ 'skip$
+ { duplicate$ empty$
+ { pop$ format.date paren }
+ { " " * format.date paren * }
+ if$
+ }
+ if$
+ pages empty$
+ 'skip$
+ { duplicate$ empty$
+ { pop$ format.pages.a }
+ { " " * pages first.page *}
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.chapter.pages}
+{ chapter empty$
+ 'format.pages
+ { type empty$
+ { "chapter" }
+ { type "l" change.case$ }
+ if$
+ chapter tie.or.space.connect
+ pages empty$
+ 'skip$
+ { ", " * format.pages * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.in.ed.booktitle}
+{ booktitle empty$
+ { "" }
+ { editor empty$
+ { "in " booktitle emphasize * }
+ { "in " booktitle emphasize * ", " * format.edited * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {empty.misc.check}
+{ author empty$ title empty$ howpublished empty$
+ month empty$ year empty$ note empty$
+ and and and and and
+ { "all relevant fields are empty in " cite$ * warning$ }
+ 'skip$
+ if$
+}
+
+FUNCTION {format.thesis.type}
+{ type empty$
+ 'skip$
+ { pop$
+ type "t" change.case$
+ }
+ if$
+}
+
+FUNCTION {format.tr.number}
+{ type empty$
+ { "Technical Report" }
+ 'type
+ if$
+ number empty$
+ { "t" change.case$ }
+ { number tie.or.space.connect }
+ if$
+}
+
+FUNCTION {format.article.crossref}
+{ key empty$
+ { journal empty$
+ { "need key or journal for " cite$ * " to crossref " * crossref *
+ warning$
+ ""
+ }
+ { "In " journal * }
+ if$
+ }
+ { "In " key * }
+ if$
+ " \cite{" * crossref * "}" *
+}
+
+FUNCTION {format.crossref.editor}
+{ editor #1 "{vv~}{ll}" format.name$
+ editor num.names$ duplicate$
+ #2 >
+ { pop$ " et~al." * }
+ { #2 <
+ 'skip$
+ { editor #2 "{ff }{vv }{ll}{ jj}" format.name$ "others" =
+ { " et~al." * }
+ { " and " * editor #2 "{vv~}{ll}" format.name$ * }
+ if$
+ }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.book.crossref}
+{ volume empty$
+ { "empty volume in " cite$ * "'s crossref of " * crossref * warning$
+ "In "
+ }
+ { "Volume" volume tie.or.space.connect
+ " of " *
+ }
+ if$
+ editor empty$
+ editor field.or.null author field.or.null =
+ or
+ { key empty$
+ { series empty$
+ { "need editor, key, or series for " cite$ * " to crossref " *
+ crossref * warning$
+ "" *
+ }
+ { "{\em " * series * "\/}" * }
+ if$
+ }
+ { key * }
+ if$
+ }
+ { format.crossref.editor * }
+ if$
+ " \cite{" * crossref * "}" *
+}
+
+FUNCTION {format.incoll.inproc.crossref}
+{ editor empty$
+ editor field.or.null author field.or.null =
+ or
+ { key empty$
+ { booktitle empty$
+ { "need editor, key, or booktitle for " cite$ * " to crossref " *
+ crossref * warning$
+ ""
+ }
+ { "In {\em " booktitle * "\/}" * }
+ if$
+ }
+ { "In " key * }
+ if$
+ }
+ { "In " format.crossref.editor * }
+ if$
+ " \cite{" * crossref * "}" *
+}
+
+FUNCTION {article}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ crossref missing$
+ { journal field.or.null
+ format.vol.num.pages output
+ }
+ { format.article.crossref output.nonnull
+ format.pages output
+ }
+ if$
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {book}
+{ output.bibitem
+ author empty$
+ { format.editors "author and editor" output.check }
+ { format.authors output.nonnull
+ crossref missing$
+ { "author and editor" editor either.or.check }
+ 'skip$
+ if$
+ }
+ if$
+ new.block
+ format.btitle "title" output.check
+ crossref missing$
+ { format.bvolume output
+ new.block
+ format.number.series output
+ new.sentence
+ publisher "publisher" output.check
+ address output
+ }
+ { new.block
+ format.book.crossref output.nonnull
+ }
+ if$
+ format.edition output
+ format.date "year" output.check
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {booklet}
+{ output.bibitem
+ format.authors output
+ new.block
+ format.title "title" output.check
+ howpublished address new.block.checkb
+ howpublished output
+ address output
+ format.date output
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {inbook}
+{ output.bibitem
+ author empty$
+ { format.editors "author and editor" output.check }
+ { format.authors output.nonnull
+ crossref missing$
+ { "author and editor" editor either.or.check }
+ 'skip$
+ if$
+ }
+ if$
+ new.block
+ format.btitle "title" output.check
+ crossref missing$
+ { format.bvolume output
+ format.chapter.pages "chapter and pages" output.check
+ new.block
+ format.number.series output
+ new.sentence
+ publisher "publisher" output.check
+ address output
+ }
+ { format.chapter.pages "chapter and pages" output.check
+ new.block
+ format.book.crossref output.nonnull
+ }
+ if$
+ format.edition output
+ format.date "year" output.check
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {incollection}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.title "title" output.check
+ new.block
+ crossref missing$
+ { format.in.ed.booktitle "booktitle" output.check
+ format.bvolume output
+ format.number.series output
+ format.chapter.pages output
+ new.sentence
+ publisher "publisher" output.check
+ address output
+ format.edition output
+ format.date "year" output.check
+ }
+ { format.incoll.inproc.crossref output.nonnull
+ format.chapter.pages output
+ }
+ if$
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {inproceedings}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.title "title" output.check
+ new.block
+ crossref missing$
+ { format.in.ed.booktitle "booktitle" output.check
+ format.bvolume output
+ format.number.series output
+ format.pages output
+ address empty$
+ { organization publisher new.sentence.checkb
+ organization output
+ publisher output
+ format.date "year" output.check
+ }
+ { address output.nonnull
+ format.date "year" output.check
+ new.sentence
+ organization output
+ publisher output
+ }
+ if$
+ }
+ { format.incoll.inproc.crossref output.nonnull
+ format.pages output
+ }
+ if$
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {conference} { inproceedings }
+
+FUNCTION {manual}
+{ output.bibitem
+ author empty$
+ { organization empty$
+ 'skip$
+ { organization output.nonnull
+ address output
+ }
+ if$
+ }
+ { format.authors output.nonnull }
+ if$
+ new.block
+ format.btitle "title" output.check
+ author empty$
+ { organization empty$
+ { address new.block.checka
+ address output
+ }
+ 'skip$
+ if$
+ }
+ { organization address new.block.checkb
+ organization output
+ address output
+ }
+ if$
+ format.edition output
+ format.date output
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {mastersthesis}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.title "title" output.check
+ new.block
+ "Master's thesis" format.thesis.type output.nonnull
+ school "school" output.check
+ address output
+ format.date "year" output.check
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {misc}
+{ output.bibitem
+ format.authors output
+ title howpublished new.block.checkb
+ format.title output
+ howpublished new.block.checka
+ howpublished output
+ format.date output
+ new.block
+ note output
+ fin.entry
+ empty.misc.check
+}
+
+FUNCTION {phdthesis}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.btitle "title" output.check
+ new.block
+ "PhD thesis" format.thesis.type output.nonnull
+ school "school" output.check
+ address output
+ format.date "year" output.check
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {proceedings}
+{ output.bibitem
+ editor empty$
+ { organization output }
+ { format.editors output.nonnull }
+ if$
+ new.block
+ format.btitle "title" output.check
+ format.bvolume output
+ format.number.series output
+ address empty$
+ { editor empty$
+ { publisher new.sentence.checka }
+ { organization publisher new.sentence.checkb
+ organization output
+ }
+ if$
+ publisher output
+ format.date "year" output.check
+ }
+ { address output.nonnull
+ format.date "year" output.check
+ new.sentence
+ editor empty$
+ 'skip$
+ { organization output }
+ if$
+ publisher output
+ }
+ if$
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {techreport}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.title "title" output.check
+ new.block
+ format.tr.number output.nonnull
+ institution "institution" output.check
+ address output
+ format.date "year" output.check
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {unpublished}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.title "title" output.check
+ new.block
+ note "note" output.check
+ format.date output
+ fin.entry
+}
+
+FUNCTION {default.type} { misc }
+
+MACRO {jan} {"Jan."}
+
+MACRO {feb} {"Feb."}
+
+MACRO {mar} {"Mar."}
+
+MACRO {apr} {"Apr."}
+
+MACRO {may} {"May"}
+
+MACRO {jun} {"June"}
+
+MACRO {jul} {"July"}
+
+MACRO {aug} {"Aug."}
+
+MACRO {sep} {"Sept."}
+
+MACRO {oct} {"Oct."}
+
+MACRO {nov} {"Nov."}
+
+MACRO {dec} {"Dec."}
+
+MACRO {acmcs} {"ACM Comput. Surv."}
+
+MACRO {acta} {"Acta Inf."}
+
+MACRO {cacm} {"Commun. ACM"}
+
+MACRO {ibmjrd} {"IBM J. Res. Dev."}
+
+MACRO {ibmsj} {"IBM Syst.~J."}
+
+MACRO {ieeese} {"IEEE Trans. Softw. Eng."}
+
+MACRO {ieeetc} {"IEEE Trans. Comput."}
+
+MACRO {ieeetcad}
+ {"IEEE Trans. Comput.-Aided Design Integrated Circuits"}
+
+MACRO {ipl} {"Inf. Process. Lett."}
+
+MACRO {jacm} {"J.~ACM"}
+
+MACRO {jcss} {"J.~Comput. Syst. Sci."}
+
+MACRO {scp} {"Sci. Comput. Programming"}
+
+MACRO {sicomp} {"SIAM J. Comput."}
+
+MACRO {tocs} {"ACM Trans. Comput. Syst."}
+
+MACRO {tods} {"ACM Trans. Database Syst."}
+
+MACRO {tog} {"ACM Trans. Gr."}
+
+MACRO {toms} {"ACM Trans. Math. Softw."}
+
+MACRO {toois} {"ACM Trans. Office Inf. Syst."}
+
+MACRO {toplas} {"ACM Trans. Prog. Lang. Syst."}
+
+MACRO {tcs} {"Theoretical Comput. Sci."}
+
+MACRO {advp} {"Adv. Phys."}
+MACRO {ajp} {"Am. J. Phys."}
+MACRO {ao} {"Appl. Opt."}
+MACRO {apl} {"Appl. Phys. Lett."}
+MACRO {apj} {"Astrophys. J."}
+MACRO {baps} {"Bull. Am. Phys. Soc."}
+MACRO {cpc} {"Computer Phys. Comm."}
+MACRO {cppcf} {"Comments Plasma Phys. Controlled Fusion"}
+MACRO {fed} {"Fusion Eng. Design"}
+MACRO {ft} {"Fusion Tech."}
+MACRO {ieeens} {"IEEE Trans. Nucl. Sci."}
+MACRO {ieeeps} {"IEEE Trans. Plasma Sci."}
+MACRO {ijimw} {"Int. J. Infrared Millimeter Waves"}
+MACRO {ip} {"Infrared Phys."}
+MACRO {jap} {"J. Appl. Phys."}
+MACRO {jcp} {"J. Comput. Phys."}
+MACRO {jetp} {"Sov. Phys.-JETP"}
+MACRO {jfe} {"J. Fusion Energy"}
+MACRO {jfm} {"J. Fluid Mech."}
+MACRO {jgr} {"J. Geophys. Res."}
+MACRO {jmp} {"J. Math. Phys."}
+MACRO {jne} {"J. Nucl. Energy"}
+MACRO {jnec} {"J. Nucl. Energy, Part C"}
+MACRO {jnm} {"J. Nucl. Mater."}
+MACRO {josa} {"J. Opt. Soc. Am."}
+MACRO {jpp} {"J. Plasma Phys."}
+MACRO {jpsj} {"J. Phys. Soc. Jpn"}
+MACRO {jvst} {"J. Vac. Sci. Technol."}
+MACRO {nedf} {"Nucl. Eng. Design/Fusion"}
+MACRO {nf} {"Nucl. Fusion"}
+MACRO {nim} {"Nucl. Instrum. Methods"}
+MACRO {nimpr} {"Nucl. Instrum. Methods Phys. Research"}
+MACRO {nt/f} {"Nucl. Tech./Fusion"}
+MACRO {pf} {"Phys. Fluids"}
+MACRO {pfa} {"Phys. Fluids A"}
+MACRO {pfb} {"Phys. Fluids B"}
+MACRO {pl} {"Phys. Lett."}
+MACRO {pla} {"Phys. Lett. A"}
+MACRO {pnas} {"Proc. Nat. Acad. Sci. USA"}
+MACRO {pp} {"Plasma Phys."}
+MACRO {ppcf} {"Plasma Phys. Controlled Fusion"}
+MACRO {prl} {"Phys. Rev. Lett."}
+MACRO {pr} {"Phys. Rev."}
+MACRO {pra} {"Phys. Rev. A"}
+MACRO {ps} {"Physica Scripta"}
+MACRO {rmp} {"Rev. Mod. Phys."}
+MACRO {rsi} {"Rev. Sci. Instrum."}
+MACRO {sjpp} {"Sov. J. Plasma Phys."}
+MACRO {spd} {"Sov. Phys.-Dokl."}
+MACRO {sptp} {"Sov. Phys.-Tech. Phys."}
+MACRO {spu} {"Sov. Phys.-Usp."}
+
+READ
+
+STRINGS { longest.label }
+
+INTEGERS { number.label longest.label.width }
+
+FUNCTION {initialize.longest.label}
+{ "" 'longest.label :=
+ #1 'number.label :=
+ #0 'longest.label.width :=
+}
+
+FUNCTION {longest.label.pass}
+{ number.label int.to.str$ 'label :=
+ number.label #1 + 'number.label :=
+ label width$ longest.label.width >
+ { label 'longest.label :=
+ label width$ 'longest.label.width :=
+ }
+ 'skip$
+ if$
+}
+
+EXECUTE {initialize.longest.label}
+
+ITERATE {longest.label.pass}
+
+FUNCTION {begin.bib}
+{ preamble$ empty$
+ 'skip$
+ { preamble$ write$ newline$ }
+ if$
+ "\begin{thebibliography}{" longest.label * "}" * write$ newline$
+}
+
+EXECUTE {begin.bib}
+
+EXECUTE {init.state.consts}
+
+ITERATE {call.type$}
+
+FUNCTION {end.bib}
+{ newline$
+ "\end{thebibliography}" write$ newline$
+}
+
+EXECUTE {end.bib}
diff --git a/biblio/bibtex/contrib/phy-bstyles/jcp.bst b/biblio/bibtex/contrib/phy-bstyles/jcp.bst
new file mode 100644
index 0000000000..9fe98745af
--- /dev/null
+++ b/biblio/bibtex/contrib/phy-bstyles/jcp.bst
@@ -0,0 +1,1040 @@
+%% #define JCP 1 % Thu Jun 14 13:28:38 1990
+%% #include "TEX$ROOT:[BIBTEX]PHYSICS.BTX"
+ % Please notify Charles Karney (Karney@Princeton.EDU)
+ % of any bugs, improvements, etc.
+
+ % For Journal of Computational Physics
+ % Cris Barnes and Dave Mikkelson, 9/25/89
+
+ % version 0.99b for BibTeX versions 0.99a or later, LaTeX version 2.09.
+ % Copyright (C) 1985, all rights reserved.
+ % Copying of this file is authorized only if either
+ % (1) you make absolutely no changes to your copy, including name, or
+ % (2) if you do make changes, you name it something other than
+ % btxbst.doc, plain.bst, unsrt.bst, alpha.bst, and abbrv.bst.
+ % This restriction helps ensure that all standard styles are identical.
+ % The file btxbst.doc has the documentation for this style.
+
+ENTRY
+ { address
+ author
+ booktitle
+ chapter
+ edition
+ editor
+ howpublished
+ institution
+ journal
+ key
+ month
+ note
+ number
+ organization
+ pages
+ publisher
+ school
+ series
+ title
+ type
+ volume
+ year
+ }
+ {}
+ { label }
+
+INTEGERS { output.state before.all mid.sentence after.sentence after.block }
+
+FUNCTION {init.state.consts}
+{ #0 'before.all :=
+ #1 'mid.sentence :=
+ #2 'after.sentence :=
+ #3 'after.block :=
+}
+
+STRINGS { s t }
+
+FUNCTION {output.nonnull}
+{ 's :=
+ output.state mid.sentence =
+ { ", " * write$ }
+ { output.state after.block =
+ { "," * write$
+ newline$
+ "\newblock " write$
+ }
+ { output.state before.all =
+ 'write$
+ { add.period$ " " * write$ }
+ if$
+ }
+ if$
+ mid.sentence 'output.state :=
+ }
+ if$
+ s
+}
+
+FUNCTION {output}
+{ duplicate$ empty$
+ 'pop$
+ 'output.nonnull
+ if$
+}
+
+FUNCTION {output.check}
+{ 't :=
+ duplicate$ empty$
+ { pop$ "empty " t * " in " * cite$ * warning$ }
+ 'output.nonnull
+ if$
+}
+
+FUNCTION {output.bibitem}
+{ newline$
+ "\bibitem{" write$
+ cite$ write$
+ "}" write$
+ newline$
+ ""
+ before.all 'output.state :=
+}
+
+FUNCTION {fin.entry}
+{ add.period$
+ write$
+ newline$
+}
+
+FUNCTION {new.block}
+{ output.state before.all =
+ 'skip$
+ { after.block 'output.state := }
+ if$
+}
+
+FUNCTION {new.sentence}
+{ skip$
+}
+
+FUNCTION {not}
+{ { #0 }
+ { #1 }
+ if$
+}
+
+FUNCTION {and}
+{ 'skip$
+ { pop$ #0 }
+ if$
+}
+
+FUNCTION {or}
+{ { pop$ #1 }
+ 'skip$
+ if$
+}
+
+FUNCTION {new.block.checka}
+{ empty$
+ 'skip$
+ 'new.block
+ if$
+}
+
+FUNCTION {new.block.checkb}
+{ empty$
+ swap$ empty$
+ and
+ 'skip$
+ 'new.block
+ if$
+}
+
+FUNCTION {new.sentence.checka}
+{ empty$
+ 'skip$
+ 'new.sentence
+ if$
+}
+
+FUNCTION {new.sentence.checkb}
+{ empty$
+ swap$ empty$
+ and
+ 'skip$
+ 'new.sentence
+ if$
+}
+
+FUNCTION {field.or.null}
+{ duplicate$ empty$
+ { pop$ "" }
+ 'skip$
+ if$
+}
+
+FUNCTION {emphasize}
+{ duplicate$ empty$
+ { pop$ "" }
+ { "{\em " swap$ * "}" * }
+ if$
+}
+
+FUNCTION {caps}
+{ duplicate$ empty$
+ { pop$ "" }
+ { "{\sc " swap$ * "}" * }
+ if$
+}
+
+FUNCTION {embolden}
+{ duplicate$ empty$
+ { pop$ "" }
+ { "{\bf " swap$ * "}" * }
+ if$
+}
+
+FUNCTION {paren}
+{ duplicate$ empty$
+ { pop$ "" }
+ { "(" swap$ * ")" * }
+ if$
+}
+
+INTEGERS { nameptr namesleft numnames }
+
+FUNCTION {format.names}
+{ 's :=
+ #1 'nameptr :=
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ { s nameptr "{f.~}{vv~}{ll}{, jj}" format.name$ 't :=
+ t "others" =
+ 'skip$
+ { t caps 't := }
+ if$
+ nameptr #1 >
+ { namesleft #1 >
+ { ", " * t * }
+ { numnames #2 >
+ { "," * }
+ 'skip$
+ if$
+ t "others" =
+ { " et~al." * }
+ { " and " * t * }
+ if$
+ }
+ if$
+ }
+ 't
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+}
+
+FUNCTION {format.authors}
+{ author empty$
+ { "" }
+ { author format.names }
+ if$
+}
+
+FUNCTION {format.editors}
+{ editor empty$
+ { "" }
+ { editor format.names
+ editor num.names$ #1 >
+ { ", editors" * }
+ { ", editor" * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.edited}
+{ editor empty$
+ { "" }
+ { "edited by " editor format.names * }
+ if$
+}
+
+FUNCTION {format.title}
+{ title empty$
+ { "" }
+ 'title
+ if$
+}
+
+FUNCTION {n.dashify}
+{ 't :=
+ ""
+ { t empty$ not }
+ { t #1 #1 substring$ "-" =
+ { t #1 #2 substring$ "--" = not
+ { "--" *
+ t #2 global.max$ substring$ 't :=
+ }
+ { { t #1 #1 substring$ "-" = }
+ { "-" *
+ t #2 global.max$ substring$ 't :=
+ }
+ while$
+ }
+ if$
+ }
+ { t #1 #1 substring$ *
+ t #2 global.max$ substring$ 't :=
+ }
+ if$
+ }
+ while$
+}
+
+FUNCTION {first.page}
+{ 't :=
+ ""
+ { t empty$ not t #1 #1 substring$ "-" = not and }
+ { t #1 #1 substring$ *
+ t #2 global.max$ substring$ 't :=
+ }
+ while$
+}
+
+FUNCTION {format.date}
+{ year empty$
+ { "" }
+ 'year
+ if$
+}
+
+FUNCTION {format.btitle}
+{ title emphasize
+}
+
+FUNCTION {tie.or.space.connect}
+{ duplicate$ text.length$ #3 <
+ { "~" }
+ { " " }
+ if$
+ swap$ * *
+}
+
+FUNCTION {either.or.check}
+{ empty$
+ 'pop$
+ { "can't use both " swap$ * " fields in " * cite$ * warning$ }
+ if$
+}
+
+FUNCTION {format.bvolume}
+{ volume empty$
+ { "" }
+ { "volume" volume tie.or.space.connect
+ series empty$
+ 'skip$
+ { " of " * series emphasize * }
+ if$
+ "volume and number" number either.or.check
+ }
+ if$
+}
+
+FUNCTION {format.number.series}
+{ volume empty$
+ { number empty$
+ { series field.or.null }
+ { output.state mid.sentence =
+ { "number" }
+ { "Number" }
+ if$
+ number tie.or.space.connect
+ series empty$
+ { "there's a number but no series in " cite$ * warning$ }
+ { " in " * series * }
+ if$
+ }
+ if$
+ }
+ { "" }
+ if$
+}
+
+FUNCTION {format.edition}
+{ edition empty$
+ { "" }
+ { output.state mid.sentence =
+ { edition "l" change.case$ " edition" * }
+ { edition "t" change.case$ " edition" * }
+ if$
+ }
+ if$
+}
+
+INTEGERS { multiresult }
+
+FUNCTION {multi.page.check}
+{ 't :=
+ #0 'multiresult :=
+ { multiresult not
+ t empty$ not
+ and
+ }
+ { t #1 #1 substring$
+ duplicate$ "-" =
+ swap$ duplicate$ "," =
+ swap$ "+" =
+ or or
+ { #1 'multiresult := }
+ { t #2 global.max$ substring$ 't := }
+ if$
+ }
+ while$
+ multiresult
+}
+
+FUNCTION {format.pages}
+{ pages empty$
+ { "" }
+ { pages multi.page.check
+ { "pp." pages n.dashify tie.or.space.connect }
+ { "p." pages tie.or.space.connect }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.pages.a}
+{ pages empty$
+ { "" }
+ { "p." pages first.page tie.or.space.connect }
+ if$
+}
+
+FUNCTION {format.vol.num.pages}
+{ volume field.or.null embolden
+ " " swap$ * *
+ pages empty$
+ 'skip$
+ { duplicate$ empty$
+ { pop$ format.pages.a }
+ { ", " * pages first.page * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.chapter.pages}
+{ chapter empty$
+ 'format.pages
+ { type empty$
+ { "chapter" }
+ { type "l" change.case$ }
+ if$
+ chapter tie.or.space.connect
+ pages empty$
+ 'skip$
+ { ", " * format.pages * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.in.ed.booktitle}
+{ booktitle empty$
+ { "" }
+ { editor empty$
+ { "in " booktitle emphasize * }
+ { "in " booktitle emphasize * ", " * format.edited * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {empty.misc.check}
+{ author empty$ title empty$ howpublished empty$
+ month empty$ year empty$ note empty$
+ and and and and and
+ { "all relevant fields are empty in " cite$ * warning$ }
+ 'skip$
+ if$
+}
+
+FUNCTION {format.thesis.type}
+{ type empty$
+ 'skip$
+ { pop$
+ type "t" change.case$
+ }
+ if$
+}
+
+FUNCTION {format.tr.number}
+{ type empty$
+ { "Technical Report" }
+ 'type
+ if$
+ number empty$
+ { "t" change.case$ }
+ { number tie.or.space.connect }
+ if$
+}
+
+FUNCTION {format.article.crossref}
+{ key empty$
+ { journal empty$
+ { "need key or journal for " cite$ * " to crossref " * crossref *
+ warning$
+ ""
+ }
+ { "In {\em " journal * "\/}" * }
+ if$
+ }
+ { "In " key * }
+ if$
+ " \cite{" * crossref * "}" *
+}
+
+FUNCTION {format.crossref.editor}
+{ editor #1 "{vv~}{ll}" format.name$ caps
+ editor num.names$ duplicate$
+ #2 >
+ { pop$ " et~al." * }
+ { #2 <
+ 'skip$
+ { editor #2 "{ff }{vv }{ll}{ jj}" format.name$ "others" =
+ { " et~al." * }
+ { " and " * editor #2 "{vv~}{ll}" format.name$ caps * }
+ if$
+ }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.book.crossref}
+{ volume empty$
+ { "empty volume in " cite$ * "'s crossref of " * crossref * warning$
+ "In "
+ }
+ { "Volume" volume tie.or.space.connect
+ " of " *
+ }
+ if$
+ editor empty$
+ editor field.or.null author field.or.null =
+ or
+ { key empty$
+ { series empty$
+ { "need editor, key, or series for " cite$ * " to crossref " *
+ crossref * warning$
+ "" *
+ }
+ { "{\em " * series * "\/}" * }
+ if$
+ }
+ { key * }
+ if$
+ }
+ { format.crossref.editor * }
+ if$
+ " \cite{" * crossref * "}" *
+}
+
+FUNCTION {format.incoll.inproc.crossref}
+{ editor empty$
+ editor field.or.null author field.or.null =
+ or
+ { key empty$
+ { booktitle empty$
+ { "need editor, key, or booktitle for " cite$ * " to crossref " *
+ crossref * warning$
+ ""
+ }
+ { "In {\em " booktitle * "\/}" * }
+ if$
+ }
+ { "In " key * }
+ if$
+ }
+ { "In " format.crossref.editor * }
+ if$
+ " \cite{" * crossref * "}" *
+}
+
+FUNCTION {article}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ crossref missing$
+ { journal emphasize
+ format.vol.num.pages
+ format.date empty$
+ 'skip$
+ { duplicate$ empty$
+ { pop$ format.date paren }
+ { " " * format.date paren * }
+ if$
+ }
+ if$
+ output
+ }
+ { format.article.crossref output.nonnull
+ format.pages output
+ }
+ if$
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {book}
+{ output.bibitem
+ author empty$
+ { format.editors "author and editor" output.check }
+ { format.authors output.nonnull
+ crossref missing$
+ { "author and editor" editor either.or.check }
+ 'skip$
+ if$
+ }
+ if$
+ new.block
+ format.btitle "title" output.check
+ crossref missing$
+ { format.bvolume output
+ new.block
+ format.number.series output
+ new.sentence
+ publisher "publisher" output.check
+ address output
+ }
+ { new.block
+ format.book.crossref output.nonnull
+ }
+ if$
+ format.edition output
+ format.date "year" output.check
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {booklet}
+{ output.bibitem
+ format.authors output
+ new.block
+ format.title "title" output.check
+ howpublished address new.block.checkb
+ howpublished output
+ address output
+ format.date output
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {inbook}
+{ output.bibitem
+ author empty$
+ { format.editors "author and editor" output.check }
+ { format.authors output.nonnull
+ crossref missing$
+ { "author and editor" editor either.or.check }
+ 'skip$
+ if$
+ }
+ if$
+ new.block
+ format.btitle "title" output.check
+ crossref missing$
+ { format.bvolume output
+ format.chapter.pages "chapter and pages" output.check
+ new.block
+ format.number.series output
+ new.sentence
+ publisher "publisher" output.check
+ address output
+ }
+ { format.chapter.pages "chapter and pages" output.check
+ new.block
+ format.book.crossref output.nonnull
+ }
+ if$
+ format.edition output
+ format.date "year" output.check
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {incollection}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.title "title" output.check
+ new.block
+ crossref missing$
+ { format.in.ed.booktitle "booktitle" output.check
+ format.bvolume output
+ format.number.series output
+ format.chapter.pages output
+ new.sentence
+ publisher "publisher" output.check
+ address output
+ format.edition output
+ format.date "year" output.check
+ }
+ { format.incoll.inproc.crossref output.nonnull
+ format.chapter.pages output
+ }
+ if$
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {inproceedings}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.title "title" output.check
+ new.block
+ crossref missing$
+ { format.in.ed.booktitle "booktitle" output.check
+ format.bvolume output
+ format.number.series output
+ format.pages output
+ address empty$
+ { organization publisher new.sentence.checkb
+ organization output
+ publisher output
+ format.date "year" output.check
+ }
+ { address output.nonnull
+ format.date "year" output.check
+ new.sentence
+ organization output
+ publisher output
+ }
+ if$
+ }
+ { format.incoll.inproc.crossref output.nonnull
+ format.pages output
+ }
+ if$
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {conference} { inproceedings }
+
+FUNCTION {manual}
+{ output.bibitem
+ author empty$
+ { organization empty$
+ 'skip$
+ { organization output.nonnull
+ address output
+ }
+ if$
+ }
+ { format.authors output.nonnull }
+ if$
+ new.block
+ format.btitle "title" output.check
+ author empty$
+ { organization empty$
+ { address new.block.checka
+ address output
+ }
+ 'skip$
+ if$
+ }
+ { organization address new.block.checkb
+ organization output
+ address output
+ }
+ if$
+ format.edition output
+ format.date output
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {mastersthesis}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.title "title" output.check
+ new.block
+ "Master's thesis" format.thesis.type output.nonnull
+ school "school" output.check
+ address output
+ format.date "year" output.check
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {misc}
+{ output.bibitem
+ format.authors output
+ title howpublished new.block.checkb
+ format.title output
+ howpublished new.block.checka
+ howpublished output
+ format.date output
+ new.block
+ note output
+ fin.entry
+ empty.misc.check
+}
+
+FUNCTION {phdthesis}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.btitle "title" output.check
+ new.block
+ "PhD thesis" format.thesis.type output.nonnull
+ school "school" output.check
+ address output
+ format.date "year" output.check
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {proceedings}
+{ output.bibitem
+ editor empty$
+ { organization output }
+ { format.editors output.nonnull }
+ if$
+ new.block
+ format.btitle "title" output.check
+ format.bvolume output
+ format.number.series output
+ address empty$
+ { editor empty$
+ { publisher new.sentence.checka }
+ { organization publisher new.sentence.checkb
+ organization output
+ }
+ if$
+ publisher output
+ format.date "year" output.check
+ }
+ { address output.nonnull
+ format.date "year" output.check
+ new.sentence
+ editor empty$
+ 'skip$
+ { organization output }
+ if$
+ publisher output
+ }
+ if$
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {techreport}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.title "title" output.check
+ new.block
+ format.tr.number output.nonnull
+ institution "institution" output.check
+ address output
+ format.date "year" output.check
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {unpublished}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.title "title" output.check
+ new.block
+ note "note" output.check
+ format.date output
+ fin.entry
+}
+
+FUNCTION {default.type} { misc }
+
+MACRO {jan} {"Jan."}
+
+MACRO {feb} {"Feb."}
+
+MACRO {mar} {"Mar."}
+
+MACRO {apr} {"Apr."}
+
+MACRO {may} {"May"}
+
+MACRO {jun} {"June"}
+
+MACRO {jul} {"July"}
+
+MACRO {aug} {"Aug."}
+
+MACRO {sep} {"Sept."}
+
+MACRO {oct} {"Oct."}
+
+MACRO {nov} {"Nov."}
+
+MACRO {dec} {"Dec."}
+
+MACRO {acmcs} {"ACM Comput. Surv."}
+
+MACRO {acta} {"Acta Inf."}
+
+MACRO {cacm} {"Commun. ACM"}
+
+MACRO {ibmjrd} {"IBM J. Res. Dev."}
+
+MACRO {ibmsj} {"IBM Syst.~J."}
+
+MACRO {ieeese} {"IEEE Trans. Softw. Eng."}
+
+MACRO {ieeetc} {"IEEE Trans. Comput."}
+
+MACRO {ieeetcad}
+ {"IEEE Trans. Comput.-Aided Design Integrated Circuits"}
+
+MACRO {ipl} {"Inf. Process. Lett."}
+
+MACRO {jacm} {"J.~ACM"}
+
+MACRO {jcss} {"J.~Comput. Syst. Sci."}
+
+MACRO {scp} {"Sci. Comput. Programming"}
+
+MACRO {sicomp} {"SIAM J. Comput."}
+
+MACRO {tocs} {"ACM Trans. Comput. Syst."}
+
+MACRO {tods} {"ACM Trans. Database Syst."}
+
+MACRO {tog} {"ACM Trans. Gr."}
+
+MACRO {toms} {"ACM Trans. Math. Softw."}
+
+MACRO {toois} {"ACM Trans. Office Inf. Syst."}
+
+MACRO {toplas} {"ACM Trans. Prog. Lang. Syst."}
+
+MACRO {tcs} {"Theoretical Comput. Sci."}
+
+MACRO {advp} {"Adv. Phys."}
+MACRO {ajp} {"Am. J. Phys."}
+MACRO {ao} {"Appl. Opt."}
+MACRO {apl} {"Appl. Phys. Lett."}
+MACRO {apj} {"Astrophys. J."}
+MACRO {baps} {"Bull. Am. Phys. Soc."}
+MACRO {cpc} {"Computer Phys. Comm."}
+MACRO {cppcf} {"Comments Plasma Phys. Controlled Fusion"}
+MACRO {fed} {"Fusion Eng. Design"}
+MACRO {ft} {"Fusion Tech."}
+MACRO {ieeens} {"IEEE Trans. Nucl. Sci."}
+MACRO {ieeeps} {"IEEE Trans. Plasma Sci."}
+MACRO {ijimw} {"Int. J. Infrared Millimeter Waves"}
+MACRO {ip} {"Infrared Phys."}
+MACRO {jap} {"J. Appl. Phys."}
+MACRO {jcp} {"J. Comput. Phys."}
+MACRO {jetp} {"Sov. Phys.-JETP"}
+MACRO {jfe} {"J. Fusion Energy"}
+MACRO {jfm} {"J. Fluid Mech."}
+MACRO {jgr} {"J. Geophys. Res."}
+MACRO {jmp} {"J. Math. Phys."}
+MACRO {jne} {"J. Nucl. Energy"}
+MACRO {jnec} {"J. Nucl. Energy, Part C"}
+MACRO {jnm} {"J. Nucl. Mater."}
+MACRO {josa} {"J. Opt. Soc. Am."}
+MACRO {jpp} {"J. Plasma Phys."}
+MACRO {jpsj} {"J. Phys. Soc. Jpn"}
+MACRO {jvst} {"J. Vac. Sci. Technol."}
+MACRO {nedf} {"Nucl. Eng. Design/Fusion"}
+MACRO {nf} {"Nucl. Fusion"}
+MACRO {nim} {"Nucl. Instrum. Methods"}
+MACRO {nimpr} {"Nucl. Instrum. Methods Phys. Research"}
+MACRO {nt/f} {"Nucl. Tech./Fusion"}
+MACRO {pf} {"Phys. Fluids"}
+MACRO {pfa} {"Phys. Fluids A"}
+MACRO {pfb} {"Phys. Fluids B"}
+MACRO {pl} {"Phys. Lett."}
+MACRO {pla} {"Phys. Lett. A"}
+MACRO {pnas} {"Proc. Nat. Acad. Sci. USA"}
+MACRO {pp} {"Plasma Phys."}
+MACRO {ppcf} {"Plasma Phys. Controlled Fusion"}
+MACRO {prl} {"Phys. Rev. Lett."}
+MACRO {pr} {"Phys. Rev."}
+MACRO {pra} {"Phys. Rev. A"}
+MACRO {ps} {"Physica Scripta"}
+MACRO {rmp} {"Rev. Mod. Phys."}
+MACRO {rsi} {"Rev. Sci. Instrum."}
+MACRO {sjpp} {"Sov. J. Plasma Phys."}
+MACRO {spd} {"Sov. Phys.-Dokl."}
+MACRO {sptp} {"Sov. Phys.-Tech. Phys."}
+MACRO {spu} {"Sov. Phys.-Usp."}
+
+READ
+
+STRINGS { longest.label }
+
+INTEGERS { number.label longest.label.width }
+
+FUNCTION {initialize.longest.label}
+{ "" 'longest.label :=
+ #1 'number.label :=
+ #0 'longest.label.width :=
+}
+
+FUNCTION {longest.label.pass}
+{ number.label int.to.str$ 'label :=
+ number.label #1 + 'number.label :=
+ label width$ longest.label.width >
+ { label 'longest.label :=
+ label width$ 'longest.label.width :=
+ }
+ 'skip$
+ if$
+}
+
+EXECUTE {initialize.longest.label}
+
+ITERATE {longest.label.pass}
+
+FUNCTION {begin.bib}
+{ preamble$ empty$
+ 'skip$
+ { preamble$ write$ newline$ }
+ if$
+ "\begin{thebibliography}{" longest.label * "}" * write$ newline$
+}
+
+EXECUTE {begin.bib}
+
+EXECUTE {init.state.consts}
+
+ITERATE {call.type$}
+
+FUNCTION {end.bib}
+{ newline$
+ "\end{thebibliography}" write$ newline$
+}
+
+EXECUTE {end.bib}
diff --git a/biblio/bibtex/contrib/phy-bstyles/nf.bst b/biblio/bibtex/contrib/phy-bstyles/nf.bst
new file mode 100644
index 0000000000..07cca978fe
--- /dev/null
+++ b/biblio/bibtex/contrib/phy-bstyles/nf.bst
@@ -0,0 +1,1035 @@
+%% #define NF 1 % Thu Jun 14 13:23:18 1990
+%% #include "TEX$ROOT:[BIBTEX]PHYSICS.BTX"
+ % Please notify Charles Karney (Karney@Princeton.EDU)
+ % of any bugs, improvements, etc.
+
+ % For Nuclear Fusion
+ % see Nuclear Fusion Vol. 28, No. 2 (1988),
+ % "Announcement [of] Guidelines for Bibliographical Citations"
+
+ % version 0.99b for BibTeX versions 0.99a or later, LaTeX version 2.09.
+ % Copyright (C) 1985, all rights reserved.
+ % Copying of this file is authorized only if either
+ % (1) you make absolutely no changes to your copy, including name, or
+ % (2) if you do make changes, you name it something other than
+ % btxbst.doc, plain.bst, unsrt.bst, alpha.bst, and abbrv.bst.
+ % This restriction helps ensure that all standard styles are identical.
+ % The file btxbst.doc has the documentation for this style.
+
+ENTRY
+ { address
+ author
+ booktitle
+ chapter
+ edition
+ editor
+ howpublished
+ institution
+ journal
+ key
+ month
+ note
+ number
+ organization
+ pages
+ publisher
+ school
+ series
+ title
+ type
+ volume
+ year
+ }
+ {}
+ { label }
+
+INTEGERS { output.state before.all mid.sentence after.sentence after.block }
+
+FUNCTION {init.state.consts}
+{ #0 'before.all :=
+ #1 'mid.sentence :=
+ #2 'after.sentence :=
+ #3 'after.block :=
+}
+
+STRINGS { s t }
+
+FUNCTION {output.nonnull}
+{ 's :=
+ output.state mid.sentence =
+ { ", " * write$ }
+ { output.state after.block =
+ { "," * write$
+ newline$
+ "\newblock " write$
+ }
+ { output.state before.all =
+ 'write$
+ { add.period$ " " * write$ }
+ if$
+ }
+ if$
+ mid.sentence 'output.state :=
+ }
+ if$
+ s
+}
+
+FUNCTION {output}
+{ duplicate$ empty$
+ 'pop$
+ 'output.nonnull
+ if$
+}
+
+FUNCTION {output.check}
+{ 't :=
+ duplicate$ empty$
+ { pop$ "empty " t * " in " * cite$ * warning$ }
+ 'output.nonnull
+ if$
+}
+
+FUNCTION {output.bibitem}
+{ newline$
+ "\bibitem{" write$
+ cite$ write$
+ "}" write$
+ newline$
+ ""
+ before.all 'output.state :=
+}
+
+FUNCTION {fin.entry}
+{ add.period$
+ write$
+ newline$
+}
+
+FUNCTION {new.block}
+{ output.state before.all =
+ 'skip$
+ { after.block 'output.state := }
+ if$
+}
+
+FUNCTION {new.sentence}
+{ skip$
+}
+
+FUNCTION {not}
+{ { #0 }
+ { #1 }
+ if$
+}
+
+FUNCTION {and}
+{ 'skip$
+ { pop$ #0 }
+ if$
+}
+
+FUNCTION {or}
+{ { pop$ #1 }
+ 'skip$
+ if$
+}
+
+FUNCTION {new.block.checka}
+{ empty$
+ 'skip$
+ 'new.block
+ if$
+}
+
+FUNCTION {new.block.checkb}
+{ empty$
+ swap$ empty$
+ and
+ 'skip$
+ 'new.block
+ if$
+}
+
+FUNCTION {new.sentence.checka}
+{ empty$
+ 'skip$
+ 'new.sentence
+ if$
+}
+
+FUNCTION {new.sentence.checkb}
+{ empty$
+ swap$ empty$
+ and
+ 'skip$
+ 'new.sentence
+ if$
+}
+
+FUNCTION {field.or.null}
+{ duplicate$ empty$
+ { pop$ "" }
+ 'skip$
+ if$
+}
+
+FUNCTION {emphasize}
+{ duplicate$ empty$
+ { pop$ "" }
+ { "{\em " swap$ * "}" * }
+ if$
+}
+
+FUNCTION {embolden}
+{ duplicate$ empty$
+ { pop$ "" }
+ { "{\bf " swap$ * "}" * }
+ if$
+}
+
+FUNCTION {paren}
+{ duplicate$ empty$
+ { pop$ "" }
+ { "(" swap$ * ")" * }
+ if$
+}
+
+INTEGERS { nameptr namesleft numnames }
+
+INTEGERS { etal }
+
+FUNCTION {format.names}
+{ 's :=
+ #1 'nameptr :=
+ s num.names$ 'numnames :=
+ numnames #5 >
+ s numnames "{ll}" format.name$ "others" = numnames #3 > and
+ or 'etal :=
+ etal
+ { #3 #1 + 'namesleft := }
+ { numnames 'namesleft := }
+ if$
+ { namesleft #0 > }
+ { s nameptr "{vv~}{ll}{, jj}{, f.}" format.name$ 't := % last name first
+ t "others" =
+ 'skip$
+ { t "u" change.case$ 't := }
+ if$
+ nameptr #1 >
+ { namesleft #1 >
+ { ", " * t * }
+ { nameptr #2 >
+ { "," * }
+ 'skip$
+ if$
+ t "others" =
+ etal or
+ { " et~al." * }
+ { " and " * t * }
+ if$
+ }
+ if$
+ }
+ 't
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+}
+
+FUNCTION {format.authors}
+{ author empty$
+ { "" }
+ { author format.names }
+ if$
+}
+
+FUNCTION {format.editors}
+{ editor empty$
+ { "" }
+ { editor format.names
+ editor num.names$ #1 >
+ { ", editors" * }
+ { ", editor" * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.title}
+{ title empty$
+ { "" }
+ { title "t" change.case$ }
+ if$
+}
+
+FUNCTION {n.dashify}
+{ 't :=
+ ""
+ { t empty$ not }
+ { t #1 #1 substring$ "-" =
+ { t #1 #2 substring$ "--" = not
+ { "--" *
+ t #2 global.max$ substring$ 't :=
+ }
+ { { t #1 #1 substring$ "-" = }
+ { "-" *
+ t #2 global.max$ substring$ 't :=
+ }
+ while$
+ }
+ if$
+ }
+ { t #1 #1 substring$ *
+ t #2 global.max$ substring$ 't :=
+ }
+ if$
+ }
+ while$
+}
+
+FUNCTION {first.page}
+{ 't :=
+ ""
+ { t empty$ not t #1 #1 substring$ "-" = not and }
+ { t #1 #1 substring$ *
+ t #2 global.max$ substring$ 't :=
+ }
+ while$
+}
+
+FUNCTION {format.date}
+{ year empty$
+ { "" }
+ 'year
+ if$
+}
+
+FUNCTION {format.btitle}
+{ title emphasize
+}
+
+FUNCTION {tie.or.space.connect}
+{ duplicate$ text.length$ #3 <
+ { "~" }
+ { " " }
+ if$
+ swap$ * *
+}
+
+FUNCTION {either.or.check}
+{ empty$
+ 'pop$
+ { "can't use both " swap$ * " fields in " * cite$ * warning$ }
+ if$
+}
+
+FUNCTION {format.bvolume}
+{ volume empty$
+ { "" }
+ { "volume" volume tie.or.space.connect
+ series empty$
+ 'skip$
+ { " of " * series emphasize * }
+ if$
+ "volume and number" number either.or.check
+ }
+ if$
+}
+
+FUNCTION {format.number.series}
+{ volume empty$
+ { number empty$
+ { series field.or.null }
+ { output.state mid.sentence =
+ { "number" }
+ { "Number" }
+ if$
+ number tie.or.space.connect
+ series empty$
+ { "there's a number but no series in " cite$ * warning$ }
+ { " in " * series * }
+ if$
+ }
+ if$
+ }
+ { "" }
+ if$
+}
+
+FUNCTION {format.edition}
+{ edition empty$
+ { "" }
+ { output.state mid.sentence =
+ { edition "l" change.case$ " edition" * }
+ { edition "t" change.case$ " edition" * }
+ if$
+ }
+ if$
+}
+
+INTEGERS { multiresult }
+
+FUNCTION {multi.page.check}
+{ 't :=
+ #0 'multiresult :=
+ { multiresult not
+ t empty$ not
+ and
+ }
+ { t #1 #1 substring$
+ duplicate$ "-" =
+ swap$ duplicate$ "," =
+ swap$ "+" =
+ or or
+ { #1 'multiresult := }
+ { t #2 global.max$ substring$ 't := }
+ if$
+ }
+ while$
+ multiresult
+}
+
+FUNCTION {format.pages}
+{ pages empty$
+ { "" }
+ { pages multi.page.check
+ { "pp." pages n.dashify tie.or.space.connect }
+ { "p." pages tie.or.space.connect }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.pages.a}
+{ pages empty$
+ { "" }
+ { "p." pages first.page tie.or.space.connect }
+ if$
+}
+
+FUNCTION {format.vol.num.pages}
+{ volume field.or.null embolden
+ " " swap$ * *
+ format.date empty$
+ 'skip$
+ { duplicate$ empty$
+ { pop$ format.date paren }
+ { " " * format.date paren * }
+ if$
+ }
+ if$
+ pages empty$
+ 'skip$
+ { duplicate$ empty$
+ { pop$ format.pages.a }
+ { " " * pages first.page *}
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.chapter.pages}
+{ chapter empty$
+ 'format.pages
+ { type empty$
+ { "chapter" }
+ { type "l" change.case$ }
+ if$
+ chapter tie.or.space.connect
+ pages empty$
+ 'skip$
+ { ", " * format.pages * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.in.ed.booktitle}
+{ booktitle empty$
+ { "" }
+ { editor empty$
+ { "in " booktitle emphasize * }
+ { "in " format.editors * ", " * booktitle emphasize * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {empty.misc.check}
+{ author empty$ title empty$ howpublished empty$
+ month empty$ year empty$ note empty$
+ and and and and and
+ { "all relevant fields are empty in " cite$ * warning$ }
+ 'skip$
+ if$
+}
+
+FUNCTION {format.thesis.type}
+{ type empty$
+ 'skip$
+ { pop$
+ type "t" change.case$
+ }
+ if$
+}
+
+FUNCTION {format.tr.number}
+{ type empty$
+ { "Technical Report" }
+ 'type
+ if$
+ number empty$
+ { "t" change.case$ }
+ { number tie.or.space.connect }
+ if$
+}
+
+FUNCTION {format.article.crossref}
+{ key empty$
+ { journal empty$
+ { "need key or journal for " cite$ * " to crossref " * crossref *
+ warning$
+ ""
+ }
+ { "In " journal * }
+ if$
+ }
+ { "In " key * }
+ if$
+ " \cite{" * crossref * "}" *
+}
+
+FUNCTION {format.crossref.editor}
+{ editor #1 "{vv~}{ll}" format.name$
+ editor num.names$ duplicate$
+ #2 >
+ { pop$ " et~al." * }
+ { #2 <
+ 'skip$
+ { editor #2 "{ff }{vv }{ll}{ jj}" format.name$ "others" =
+ { " et~al." * }
+ { " and " * editor #2 "{vv~}{ll}" format.name$ * }
+ if$
+ }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.book.crossref}
+{ volume empty$
+ { "empty volume in " cite$ * "'s crossref of " * crossref * warning$
+ "In "
+ }
+ { "Volume" volume tie.or.space.connect
+ " of " *
+ }
+ if$
+ editor empty$
+ editor field.or.null author field.or.null =
+ or
+ { key empty$
+ { series empty$
+ { "need editor, key, or series for " cite$ * " to crossref " *
+ crossref * warning$
+ "" *
+ }
+ { "{\em " * series * "\/}" * }
+ if$
+ }
+ { key * }
+ if$
+ }
+ { format.crossref.editor * }
+ if$
+ " \cite{" * crossref * "}" *
+}
+
+FUNCTION {format.incoll.inproc.crossref}
+{ editor empty$
+ editor field.or.null author field.or.null =
+ or
+ { key empty$
+ { booktitle empty$
+ { "need editor, key, or booktitle for " cite$ * " to crossref " *
+ crossref * warning$
+ ""
+ }
+ { "In {\em " booktitle * "\/}" * }
+ if$
+ }
+ { "In " key * }
+ if$
+ }
+ { "In " format.crossref.editor * }
+ if$
+ " \cite{" * crossref * "}" *
+}
+
+FUNCTION {article}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ crossref missing$
+ { journal field.or.null
+ format.vol.num.pages output
+ }
+ { format.article.crossref output.nonnull
+ format.pages output
+ }
+ if$
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {book}
+{ output.bibitem
+ author empty$
+ { format.editors "author and editor" output.check }
+ { format.authors output.nonnull
+ crossref missing$
+ { "author and editor" editor either.or.check }
+ 'skip$
+ if$
+ }
+ if$
+ new.block
+ format.btitle "title" output.check
+ crossref missing$
+ { format.bvolume output
+ new.block
+ format.number.series output
+ new.sentence
+ publisher "publisher" output.check
+ address output
+ }
+ { new.block
+ format.book.crossref output.nonnull
+ }
+ if$
+ format.edition output
+ format.date "year" output.check
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {booklet}
+{ output.bibitem
+ format.authors output
+ new.block
+ format.title "title" output.check
+ howpublished address new.block.checkb
+ howpublished output
+ address output
+ format.date output
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {inbook}
+{ output.bibitem
+ author empty$
+ { format.editors "author and editor" output.check }
+ { format.authors output.nonnull
+ crossref missing$
+ { "author and editor" editor either.or.check }
+ 'skip$
+ if$
+ }
+ if$
+ new.block
+ format.btitle "title" output.check
+ crossref missing$
+ { format.bvolume output
+ format.chapter.pages "chapter and pages" output.check
+ new.block
+ format.number.series output
+ new.sentence
+ publisher "publisher" output.check
+ address output
+ }
+ { format.chapter.pages "chapter and pages" output.check
+ new.block
+ format.book.crossref output.nonnull
+ }
+ if$
+ format.edition output
+ format.date "year" output.check
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {incollection}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.title "title" output.check
+ new.block
+ crossref missing$
+ { format.in.ed.booktitle "booktitle" output.check
+ format.bvolume output
+ format.number.series output
+ format.chapter.pages output
+ new.sentence
+ publisher "publisher" output.check
+ address output
+ format.edition output
+ format.date "year" output.check
+ }
+ { format.incoll.inproc.crossref output.nonnull
+ format.chapter.pages output
+ }
+ if$
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {inproceedings}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.title "title" output.check
+ new.block
+ crossref missing$
+ { format.in.ed.booktitle "booktitle" output.check
+ format.bvolume output
+ format.number.series output
+ format.pages output
+ address empty$
+ { organization publisher new.sentence.checkb
+ organization output
+ publisher output
+ format.date "year" output.check
+ }
+ { address output.nonnull
+ format.date "year" output.check
+ new.sentence
+ organization output
+ publisher output
+ }
+ if$
+ }
+ { format.incoll.inproc.crossref output.nonnull
+ format.pages output
+ }
+ if$
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {conference} { inproceedings }
+
+FUNCTION {manual}
+{ output.bibitem
+ author empty$
+ { organization empty$
+ 'skip$
+ { organization output.nonnull
+ address output
+ }
+ if$
+ }
+ { format.authors output.nonnull }
+ if$
+ new.block
+ format.btitle "title" output.check
+ author empty$
+ { organization empty$
+ { address new.block.checka
+ address output
+ }
+ 'skip$
+ if$
+ }
+ { organization address new.block.checkb
+ organization output
+ address output
+ }
+ if$
+ format.edition output
+ format.date output
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {mastersthesis}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.title "title" output.check
+ new.block
+ "Master's thesis" format.thesis.type output.nonnull
+ school "school" output.check
+ address output
+ format.date "year" output.check
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {misc}
+{ output.bibitem
+ format.authors output
+ title howpublished new.block.checkb
+ format.title output
+ howpublished new.block.checka
+ howpublished output
+ format.date output
+ new.block
+ note output
+ fin.entry
+ empty.misc.check
+}
+
+FUNCTION {phdthesis}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.btitle "title" output.check
+ new.block
+ "PhD thesis" format.thesis.type output.nonnull
+ school "school" output.check
+ address output
+ format.date "year" output.check
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {proceedings}
+{ output.bibitem
+ editor empty$
+ { organization output }
+ { format.editors output.nonnull }
+ if$
+ new.block
+ format.btitle "title" output.check
+ format.bvolume output
+ format.number.series output
+ address empty$
+ { editor empty$
+ { publisher new.sentence.checka }
+ { organization publisher new.sentence.checkb
+ organization output
+ }
+ if$
+ publisher output
+ format.date "year" output.check
+ }
+ { address output.nonnull
+ format.date "year" output.check
+ new.sentence
+ editor empty$
+ 'skip$
+ { organization output }
+ if$
+ publisher output
+ }
+ if$
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {techreport}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.title "title" output.check
+ new.block
+ format.tr.number output.nonnull
+ institution "institution" output.check
+ address output
+ format.date "year" output.check
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {unpublished}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.title "title" output.check
+ new.block
+ note "note" output.check
+ format.date output
+ fin.entry
+}
+
+FUNCTION {default.type} { misc }
+
+MACRO {jan} {"Jan."}
+
+MACRO {feb} {"Feb."}
+
+MACRO {mar} {"Mar."}
+
+MACRO {apr} {"Apr."}
+
+MACRO {may} {"May"}
+
+MACRO {jun} {"June"}
+
+MACRO {jul} {"July"}
+
+MACRO {aug} {"Aug."}
+
+MACRO {sep} {"Sept."}
+
+MACRO {oct} {"Oct."}
+
+MACRO {nov} {"Nov."}
+
+MACRO {dec} {"Dec."}
+
+MACRO {acmcs} {"ACM Comput. Surv."}
+
+MACRO {acta} {"Acta Inf."}
+
+MACRO {cacm} {"Commun. ACM"}
+
+MACRO {ibmjrd} {"IBM J. Res. Dev."}
+
+MACRO {ibmsj} {"IBM Syst.~J."}
+
+MACRO {ieeese} {"IEEE Trans. Softw. Eng."}
+
+MACRO {ieeetc} {"IEEE Trans. Comput."}
+
+MACRO {ieeetcad}
+ {"IEEE Trans. Comput.-Aided Design Integrated Circuits"}
+
+MACRO {ipl} {"Inf. Process. Lett."}
+
+MACRO {jacm} {"J.~ACM"}
+
+MACRO {jcss} {"J.~Comput. Syst. Sci."}
+
+MACRO {scp} {"Sci. Comput. Programming"}
+
+MACRO {sicomp} {"SIAM J. Comput."}
+
+MACRO {tocs} {"ACM Trans. Comput. Syst."}
+
+MACRO {tods} {"ACM Trans. Database Syst."}
+
+MACRO {tog} {"ACM Trans. Gr."}
+
+MACRO {toms} {"ACM Trans. Math. Softw."}
+
+MACRO {toois} {"ACM Trans. Office Inf. Syst."}
+
+MACRO {toplas} {"ACM Trans. Prog. Lang. Syst."}
+
+MACRO {tcs} {"Theoretical Comput. Sci."}
+
+MACRO {advp} {"Adv. Phys."}
+MACRO {ajp} {"Am. J. Phys."}
+MACRO {ao} {"Appl. Opt."}
+MACRO {apl} {"Appl. Phys. Lett."}
+MACRO {apj} {"Astrophys. J."}
+MACRO {baps} {"Bull. Am. Phys. Soc."}
+MACRO {cpc} {"Computer Phys. Comm."}
+MACRO {cppcf} {"Comments Plasma Phys. Controlled Fusion"}
+MACRO {fed} {"Fusion Eng. Design"}
+MACRO {ft} {"Fusion Tech."}
+MACRO {ieeens} {"IEEE Trans. Nucl. Sci."}
+MACRO {ieeeps} {"IEEE Trans. Plasma Sci."}
+MACRO {ijimw} {"Int. J. Infrared Millimeter Waves"}
+MACRO {ip} {"Infrared Phys."}
+MACRO {jap} {"J. Appl. Phys."}
+MACRO {jcp} {"J. Comput. Phys."}
+MACRO {jetp} {"Sov. Phys.-JETP"}
+MACRO {jfe} {"J. Fusion Energy"}
+MACRO {jfm} {"J. Fluid Mech."}
+MACRO {jgr} {"J. Geophys. Res."}
+MACRO {jmp} {"J. Math. Phys."}
+MACRO {jne} {"J. Nucl. Energy"}
+MACRO {jnec} {"J. Nucl. Energy, Part C"}
+MACRO {jnm} {"J. Nucl. Mater."}
+MACRO {josa} {"J. Opt. Soc. Am."}
+MACRO {jpp} {"J. Plasma Phys."}
+MACRO {jpsj} {"J. Phys. Soc. Jpn"}
+MACRO {jvst} {"J. Vac. Sci. Technol."}
+MACRO {nedf} {"Nucl. Eng. Design/Fusion"}
+MACRO {nf} {"Nucl. Fusion"}
+MACRO {nim} {"Nucl. Instrum. Methods"}
+MACRO {nimpr} {"Nucl. Instrum. Methods Phys. Research"}
+MACRO {nt/f} {"Nucl. Tech./Fusion"}
+MACRO {pf} {"Phys. Fluids"}
+MACRO {pfa} {"Phys. Fluids A"}
+MACRO {pfb} {"Phys. Fluids B"}
+MACRO {pl} {"Phys. Lett."}
+MACRO {pla} {"Phys. Lett. A"}
+MACRO {pnas} {"Proc. Nat. Acad. Sci. USA"}
+MACRO {pp} {"Plasma Phys."}
+MACRO {ppcf} {"Plasma Phys. Controlled Fusion"}
+MACRO {prl} {"Phys. Rev. Lett."}
+MACRO {pr} {"Phys. Rev."}
+MACRO {pra} {"Phys. Rev. A"}
+MACRO {ps} {"Physica Scripta"}
+MACRO {rmp} {"Rev. Mod. Phys."}
+MACRO {rsi} {"Rev. Sci. Instrum."}
+MACRO {sjpp} {"Sov. J. Plasma Phys."}
+MACRO {spd} {"Sov. Phys.-Dokl."}
+MACRO {sptp} {"Sov. Phys.-Tech. Phys."}
+MACRO {spu} {"Sov. Phys.-Usp."}
+
+READ
+
+STRINGS { longest.label }
+
+INTEGERS { number.label longest.label.width }
+
+FUNCTION {initialize.longest.label}
+{ "" 'longest.label :=
+ #1 'number.label :=
+ #0 'longest.label.width :=
+}
+
+FUNCTION {longest.label.pass}
+{ number.label int.to.str$ 'label :=
+ number.label #1 + 'number.label :=
+ label width$ longest.label.width >
+ { label 'longest.label :=
+ label width$ 'longest.label.width :=
+ }
+ 'skip$
+ if$
+}
+
+EXECUTE {initialize.longest.label}
+
+ITERATE {longest.label.pass}
+
+FUNCTION {begin.bib}
+{ preamble$ empty$
+ 'skip$
+ { preamble$ write$ newline$ }
+ if$
+ "\begin{thebibliography}{" longest.label * "}" * write$ newline$
+}
+
+EXECUTE {begin.bib}
+
+EXECUTE {init.state.consts}
+
+ITERATE {call.type$}
+
+FUNCTION {end.bib}
+{ newline$
+ "\end{thebibliography}" write$ newline$
+}
+
+EXECUTE {end.bib}
diff --git a/biblio/bibtex/contrib/phy-bstyles/nf.sty b/biblio/bibtex/contrib/phy-bstyles/nf.sty
new file mode 100644
index 0000000000..3c54c9ad22
--- /dev/null
+++ b/biblio/bibtex/contrib/phy-bstyles/nf.sty
@@ -0,0 +1,166 @@
+% NF (style option to ARTICLE) for Nuclear Fusion
+% NF DOCUMENT SUBSTYLE -- released 17 January 1989
+% Written by Charles Karney (Karney@Princeton.EDU).
+
+% This document style is designed for manuscripts to be submitted to
+% Nuclear Fusion.
+% To use this give NF as an optional argument to \documentstyle. The
+% main style should be ARTICLE. E.g.,
+% \documentstyle[12pt,nf]{article}
+% This provides all the same facilities as the AIP style, except:
+
+% (1) Sections are numbered with arabic numerals, e.g., 2.3.1 (the
+% ARTICLE default).
+
+% (2) Reference numbers in citation and bibliography are enclosed in []'s
+% (the ARTICLE default).
+
+% (3) The style of the subsections, etc. is different.
+
+% (4) Use Fig. instead of FIG. in figure captions, etc.
+
+\typeout{Document Substyle 'NF'. Released 17 January 1989}
+
+\def\thebibliography#1{\par\clearpage\section*{References\@mkboth
+ {REFERENCES}{REFERENCES}}\list
+ {[\arabic{enumi}]}{\settowidth\labelwidth{[#1]}\leftmargin\labelwidth
+ \advance\leftmargin\labelsep
+ \usecounter{enumi}}
+ \def\newblock{\hskip .11em plus .33em minus -.07em}
+ \sloppy
+ \sfcode`\.=1000\relax}
+
+% \citenum emits the plain citation number without ornament
+% \citea puts it's argument into the ornamentation for citations
+% thus \cite{foo} is equivalent to \citea{\citenum{foo}}
+\def\citenum#1{{\def\@cite##1##2{##1}\cite{#1}}}
+\def\citea#1{\@cite{#1}{}}
+
+% Collapse citation numbers to ranges. Non-numeric and undefined labels
+% are handled. No sorting is done. E.g., 1,3,2,3,4,5,foo,1,2,3,?,4,5
+% gives 1,3,2-5,foo,1-3,?,4,5
+\newcount\@tempcntc
+\def\@citex[#1]#2{\if@filesw\immediate\write\@auxout{\string\citation{#2}}\fi
+ \@tempcnta\z@\@tempcntb\m@ne\def\@citea{}\@cite{\@for\@citeb:=#2\do
+ {\@ifundefined
+ {b@\@citeb}{\@citeo\@tempcntb\m@ne\@citea\def\@citea{,}{\bf ?}\@warning
+ {Citation `\@citeb' on page \thepage \space undefined}}%
+ {\setbox\z@\hbox{\global\@tempcntc0\csname b@\@citeb\endcsname\relax}%
+ \ifnum\@tempcntc=\z@ \@citeo\@tempcntb\m@ne
+ \@citea\def\@citea{,}\hbox{\csname b@\@citeb\endcsname}%
+ \else
+ \advance\@tempcntb\@ne
+ \ifnum\@tempcntb=\@tempcntc
+ \else\advance\@tempcntb\m@ne\@citeo
+ \@tempcnta\@tempcntc\@tempcntb\@tempcntc\fi\fi}}\@citeo}{#1}}
+\def\@citeo{\ifnum\@tempcnta>\@tempcntb\else\@citea\def\@citea{,}%
+ \ifnum\@tempcnta=\@tempcntb\the\@tempcnta\else
+ {\advance\@tempcnta\@ne\ifnum\@tempcnta=\@tempcntb \else \def\@citea{--}\fi
+ \advance\@tempcnta\m@ne\the\@tempcnta\@citea\the\@tempcntb}\fi\fi}
+
+% Title page
+\def\@maketitle{\newpage
+ \null
+ \vskip 1em plus 2em minus 1em % Vertical space before date.
+ \ifx\@date\@empty\else
+ \begin{flushright}
+ {\normalsize \@date} % Date set in \large size.
+ \end{flushright}
+ \vskip 2em plus 2em minus 1em % Vertical space above title.
+ \fi
+ \begin{center}
+ {\Large\bf \@title \par} % Title set in \Large size.
+ \vskip 1.5em plus 0em minus .5em % Vertical space after title.
+ {\large % each author set in \large, in a
+ \lineskip .5em plus 0em minus .3em % tabular environment
+ \begin{tabular}[t]{c}\@author
+ \end{tabular}\par}
+\end{center}
+ \par
+ \vskip 1.5em plus .5em minus .5em} % Vertical space after author.
+
+\newif\if@starvariant \@starvariantfalse
+
+\def\abstract{\if@starvariant\else\section*{Abstract}\fi}
+\def\endabstract{\par\clearpage}
+
+\@namedef{abstract*}{\@starvarianttrue\abstract}
+\@namedef{endabstract*}{\endabstract}
+
+\parskip 1.5pt plus 1.5pt % Extra vertical space between paragraphs.
+\tabcolsep 12pt % Double column separation in tables
+
+\def\section{\@startsection {section}{1}{\z@}{3.5ex plus 1ex minus
+ .2ex}{2.3ex plus .2ex}{\large\bf}}
+\def\subsection{\@startsection{subsection}{2}{\z@}{3.25ex plus 1ex minus
+ .2ex}{1.5ex plus .2ex}{\large\sl}}
+\def\subsubsection{\@startsection{subsubsection}{3}{\z@}{3.25ex plus
+1ex minus .2ex}{1.5ex plus .2ex}{\normalsize\sl}}
+
+\newif\if@numbersec \@numbersectrue
+\def\appendix{\par\clearpage
+ \setcounter{section}{0}
+ \setcounter{subsection}{0}
+ \@addtoreset{equation}{section}
+ \def\theequation{\thesection\arabic{equation}}
+ \def\thesection{\Alph{section}}
+ \def\thesubsection{\arabic{subsection}}
+ \@ifstar{\def\@sectname{Appendix}\@numbersecfalse}
+ {\def\@sectname{Appendix~}\@numbersectrue}}
+
+% Figures
+\def\thefigures#1{\par\clearpage
+ \if@starvariant\section*{Figure\@mkboth
+ {FIGURE}{FIGURE}}\else
+ \section*{Figures\@mkboth
+ {FIGURES}{FIGURES}}\fi
+ \list
+ {Fig.~\arabic{enumi}.}{\labelwidth\parindent\advance\labelwidth -\labelsep
+ \leftmargin\parindent\usecounter{enumi}}}
+\def\figitem#1{\item\label{#1}}
+\let\endthefigures=\endlist
+
+\@namedef{thefigures*}{\@starvarianttrue\thefigures}
+\@namedef{endthefigures*}{\endthefigures}
+
+% Tables
+\def\thetables#1{\par\clearpage
+ \if@starvariant\section*{Table\@mkboth
+ {TABLE}{TABLE}}\else
+ \section*{Tables\@mkboth
+ {TABLES}{TABLES}}\fi
+ \list
+ {Table~\Roman{enumi}.}{\labelwidth-\labelsep
+ \leftmargin0pt\usecounter{enumi}}}
+\def\tableitem#1{\item\label{#1}}
+\let\endthetables=\endlist
+
+\@namedef{thetables*}{\@starvarianttrue\thetables}
+\@namedef{endthetables*}{\endthetables}
+
+% Put period after section number and allow for APPENDIX prefix.
+\def\@sect#1#2#3#4#5#6[#7]#8{\ifnum #2>\c@secnumdepth
+ \def\@svsec{}\else
+ \refstepcounter{#1}\edef\@svsec{\ifnum #2=1 \@sectname
+ \if@numbersec\csname the#1\endcsname\fi.\else
+ \csname the#1\endcsname.\fi
+ \hskip 1em }\fi
+ \@tempskipa #5\relax
+ \ifdim \@tempskipa>\z@
+ \begingroup #6\relax
+ \@hangfrom{\hskip #3\relax\@svsec}{\interlinepenalty \@M #8\par}
+ \endgroup
+ \csname #1mark\endcsname{#7}\addcontentsline
+ {toc}{#1}{\ifnum #2>\c@secnumdepth \else
+ \protect\numberline{\csname the#1\endcsname}\fi
+ #7}\else
+ \def\@svsechd{#6\hskip #3\@svsec #8\csname #1mark\endcsname
+ {#7}\addcontentsline
+ {toc}{#1}{\ifnum #2>\c@secnumdepth \else
+ \protect\numberline{\csname the#1\endcsname}\fi
+ #7}}\fi
+ \@xsect{#5}}
+
+\def\@sectname{}
+
+\endinput
diff --git a/biblio/bibtex/contrib/phy-bstyles/nflet.bst b/biblio/bibtex/contrib/phy-bstyles/nflet.bst
new file mode 100644
index 0000000000..1b2dbf1bc0
--- /dev/null
+++ b/biblio/bibtex/contrib/phy-bstyles/nflet.bst
@@ -0,0 +1,1033 @@
+%% #define NFLET 1 % Thu Jun 14 13:24:01 1990
+%% #include "TEX$ROOT:[BIBTEX]PHYSICS.BTX"
+ % Please notify Charles Karney (Karney@Princeton.EDU)
+ % of any bugs, improvements, etc.
+
+ % For Nuclear Fusion Letters
+
+ % version 0.99b for BibTeX versions 0.99a or later, LaTeX version 2.09.
+ % Copyright (C) 1985, all rights reserved.
+ % Copying of this file is authorized only if either
+ % (1) you make absolutely no changes to your copy, including name, or
+ % (2) if you do make changes, you name it something other than
+ % btxbst.doc, plain.bst, unsrt.bst, alpha.bst, and abbrv.bst.
+ % This restriction helps ensure that all standard styles are identical.
+ % The file btxbst.doc has the documentation for this style.
+
+ENTRY
+ { address
+ author
+ booktitle
+ chapter
+ edition
+ editor
+ howpublished
+ institution
+ journal
+ key
+ month
+ note
+ number
+ organization
+ pages
+ publisher
+ school
+ series
+ title
+ type
+ volume
+ year
+ }
+ {}
+ { label }
+
+INTEGERS { output.state before.all mid.sentence after.sentence after.block }
+
+FUNCTION {init.state.consts}
+{ #0 'before.all :=
+ #1 'mid.sentence :=
+ #2 'after.sentence :=
+ #3 'after.block :=
+}
+
+STRINGS { s t }
+
+FUNCTION {output.nonnull}
+{ 's :=
+ output.state mid.sentence =
+ { ", " * write$ }
+ { output.state after.block =
+ { "," * write$
+ newline$
+ "\newblock " write$
+ }
+ { output.state before.all =
+ 'write$
+ { add.period$ " " * write$ }
+ if$
+ }
+ if$
+ mid.sentence 'output.state :=
+ }
+ if$
+ s
+}
+
+FUNCTION {output}
+{ duplicate$ empty$
+ 'pop$
+ 'output.nonnull
+ if$
+}
+
+FUNCTION {output.check}
+{ 't :=
+ duplicate$ empty$
+ { pop$ "empty " t * " in " * cite$ * warning$ }
+ 'output.nonnull
+ if$
+}
+
+FUNCTION {output.bibitem}
+{ newline$
+ "\bibitem{" write$
+ cite$ write$
+ "}" write$
+ newline$
+ ""
+ before.all 'output.state :=
+}
+
+FUNCTION {fin.entry}
+{ add.period$
+ write$
+ newline$
+}
+
+FUNCTION {new.block}
+{ output.state before.all =
+ 'skip$
+ { after.block 'output.state := }
+ if$
+}
+
+FUNCTION {new.sentence}
+{ skip$
+}
+
+FUNCTION {not}
+{ { #0 }
+ { #1 }
+ if$
+}
+
+FUNCTION {and}
+{ 'skip$
+ { pop$ #0 }
+ if$
+}
+
+FUNCTION {or}
+{ { pop$ #1 }
+ 'skip$
+ if$
+}
+
+FUNCTION {new.block.checka}
+{ empty$
+ 'skip$
+ 'new.block
+ if$
+}
+
+FUNCTION {new.block.checkb}
+{ empty$
+ swap$ empty$
+ and
+ 'skip$
+ 'new.block
+ if$
+}
+
+FUNCTION {new.sentence.checka}
+{ empty$
+ 'skip$
+ 'new.sentence
+ if$
+}
+
+FUNCTION {new.sentence.checkb}
+{ empty$
+ swap$ empty$
+ and
+ 'skip$
+ 'new.sentence
+ if$
+}
+
+FUNCTION {field.or.null}
+{ duplicate$ empty$
+ { pop$ "" }
+ 'skip$
+ if$
+}
+
+FUNCTION {emphasize}
+{ duplicate$ empty$
+ { pop$ "" }
+ { "{\em " swap$ * "}" * }
+ if$
+}
+
+FUNCTION {embolden}
+{ duplicate$ empty$
+ { pop$ "" }
+ { "{\bf " swap$ * "}" * }
+ if$
+}
+
+FUNCTION {paren}
+{ duplicate$ empty$
+ { pop$ "" }
+ { "(" swap$ * ")" * }
+ if$
+}
+
+INTEGERS { nameptr namesleft numnames }
+
+INTEGERS { etal }
+
+FUNCTION {format.names}
+{ 's :=
+ #1 'nameptr :=
+ s num.names$ 'numnames :=
+ numnames #5 >
+ s numnames "{ll}" format.name$ "others" = numnames #5 > and
+ or 'etal :=
+ etal
+ { #5 #1 + 'namesleft := }
+ { numnames 'namesleft := }
+ if$
+ { namesleft #0 > }
+ { s nameptr "{vv~}{ll}{, jj}{, f.}" format.name$ 't := % last name first
+ t "others" =
+ 'skip$
+ { t "u" change.case$ 't := }
+ if$
+ nameptr #1 >
+ { namesleft #1 >
+ { ", " * t * }
+ { nameptr #2 >
+ { "," * }
+ 'skip$
+ if$
+ t "others" =
+ etal or
+ { " et~al." * }
+ { " and " * t * }
+ if$
+ }
+ if$
+ }
+ 't
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+}
+
+FUNCTION {format.authors}
+{ author empty$
+ { "" }
+ { author format.names }
+ if$
+}
+
+FUNCTION {format.editors}
+{ editor empty$
+ { "" }
+ { editor format.names
+ editor num.names$ #1 >
+ { ", editors" * }
+ { ", editor" * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.title}
+{ title empty$
+ { "" }
+ { title "t" change.case$ }
+ if$
+}
+
+FUNCTION {n.dashify}
+{ 't :=
+ ""
+ { t empty$ not }
+ { t #1 #1 substring$ "-" =
+ { t #1 #2 substring$ "--" = not
+ { "--" *
+ t #2 global.max$ substring$ 't :=
+ }
+ { { t #1 #1 substring$ "-" = }
+ { "-" *
+ t #2 global.max$ substring$ 't :=
+ }
+ while$
+ }
+ if$
+ }
+ { t #1 #1 substring$ *
+ t #2 global.max$ substring$ 't :=
+ }
+ if$
+ }
+ while$
+}
+
+FUNCTION {first.page}
+{ 't :=
+ ""
+ { t empty$ not t #1 #1 substring$ "-" = not and }
+ { t #1 #1 substring$ *
+ t #2 global.max$ substring$ 't :=
+ }
+ while$
+}
+
+FUNCTION {format.date}
+{ year empty$
+ { "" }
+ 'year
+ if$
+}
+
+FUNCTION {format.btitle}
+{ title emphasize
+}
+
+FUNCTION {tie.or.space.connect}
+{ duplicate$ text.length$ #3 <
+ { "~" }
+ { " " }
+ if$
+ swap$ * *
+}
+
+FUNCTION {either.or.check}
+{ empty$
+ 'pop$
+ { "can't use both " swap$ * " fields in " * cite$ * warning$ }
+ if$
+}
+
+FUNCTION {format.bvolume}
+{ volume empty$
+ { "" }
+ { "volume" volume tie.or.space.connect
+ series empty$
+ 'skip$
+ { " of " * series emphasize * }
+ if$
+ "volume and number" number either.or.check
+ }
+ if$
+}
+
+FUNCTION {format.number.series}
+{ volume empty$
+ { number empty$
+ { series field.or.null }
+ { output.state mid.sentence =
+ { "number" }
+ { "Number" }
+ if$
+ number tie.or.space.connect
+ series empty$
+ { "there's a number but no series in " cite$ * warning$ }
+ { " in " * series * }
+ if$
+ }
+ if$
+ }
+ { "" }
+ if$
+}
+
+FUNCTION {format.edition}
+{ edition empty$
+ { "" }
+ { output.state mid.sentence =
+ { edition "l" change.case$ " edition" * }
+ { edition "t" change.case$ " edition" * }
+ if$
+ }
+ if$
+}
+
+INTEGERS { multiresult }
+
+FUNCTION {multi.page.check}
+{ 't :=
+ #0 'multiresult :=
+ { multiresult not
+ t empty$ not
+ and
+ }
+ { t #1 #1 substring$
+ duplicate$ "-" =
+ swap$ duplicate$ "," =
+ swap$ "+" =
+ or or
+ { #1 'multiresult := }
+ { t #2 global.max$ substring$ 't := }
+ if$
+ }
+ while$
+ multiresult
+}
+
+FUNCTION {format.pages}
+{ pages empty$
+ { "" }
+ { pages multi.page.check
+ { "pp." pages n.dashify tie.or.space.connect }
+ { "p." pages tie.or.space.connect }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.pages.a}
+{ pages empty$
+ { "" }
+ { "p." pages first.page tie.or.space.connect }
+ if$
+}
+
+FUNCTION {format.vol.num.pages}
+{ volume field.or.null embolden
+ " " swap$ * *
+ format.date empty$
+ 'skip$
+ { duplicate$ empty$
+ { pop$ format.date paren }
+ { " " * format.date paren * }
+ if$
+ }
+ if$
+ pages empty$
+ 'skip$
+ { duplicate$ empty$
+ { pop$ format.pages.a }
+ { " " * pages first.page *}
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.chapter.pages}
+{ chapter empty$
+ 'format.pages
+ { type empty$
+ { "chapter" }
+ { type "l" change.case$ }
+ if$
+ chapter tie.or.space.connect
+ pages empty$
+ 'skip$
+ { ", " * format.pages * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.in.ed.booktitle}
+{ booktitle empty$
+ { "" }
+ { editor empty$
+ { "in " booktitle emphasize * }
+ { "in " format.editors * ", " * booktitle emphasize * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {empty.misc.check}
+{ author empty$ title empty$ howpublished empty$
+ month empty$ year empty$ note empty$
+ and and and and and
+ { "all relevant fields are empty in " cite$ * warning$ }
+ 'skip$
+ if$
+}
+
+FUNCTION {format.thesis.type}
+{ type empty$
+ 'skip$
+ { pop$
+ type "t" change.case$
+ }
+ if$
+}
+
+FUNCTION {format.tr.number}
+{ type empty$
+ { "Technical Report" }
+ 'type
+ if$
+ number empty$
+ { "t" change.case$ }
+ { number tie.or.space.connect }
+ if$
+}
+
+FUNCTION {format.article.crossref}
+{ key empty$
+ { journal empty$
+ { "need key or journal for " cite$ * " to crossref " * crossref *
+ warning$
+ ""
+ }
+ { "In " journal * }
+ if$
+ }
+ { "In " key * }
+ if$
+ " \cite{" * crossref * "}" *
+}
+
+FUNCTION {format.crossref.editor}
+{ editor #1 "{vv~}{ll}" format.name$
+ editor num.names$ duplicate$
+ #2 >
+ { pop$ " et~al." * }
+ { #2 <
+ 'skip$
+ { editor #2 "{ff }{vv }{ll}{ jj}" format.name$ "others" =
+ { " et~al." * }
+ { " and " * editor #2 "{vv~}{ll}" format.name$ * }
+ if$
+ }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.book.crossref}
+{ volume empty$
+ { "empty volume in " cite$ * "'s crossref of " * crossref * warning$
+ "In "
+ }
+ { "Volume" volume tie.or.space.connect
+ " of " *
+ }
+ if$
+ editor empty$
+ editor field.or.null author field.or.null =
+ or
+ { key empty$
+ { series empty$
+ { "need editor, key, or series for " cite$ * " to crossref " *
+ crossref * warning$
+ "" *
+ }
+ { "{\em " * series * "\/}" * }
+ if$
+ }
+ { key * }
+ if$
+ }
+ { format.crossref.editor * }
+ if$
+ " \cite{" * crossref * "}" *
+}
+
+FUNCTION {format.incoll.inproc.crossref}
+{ editor empty$
+ editor field.or.null author field.or.null =
+ or
+ { key empty$
+ { booktitle empty$
+ { "need editor, key, or booktitle for " cite$ * " to crossref " *
+ crossref * warning$
+ ""
+ }
+ { "In {\em " booktitle * "\/}" * }
+ if$
+ }
+ { "In " key * }
+ if$
+ }
+ { "In " format.crossref.editor * }
+ if$
+ " \cite{" * crossref * "}" *
+}
+
+FUNCTION {article}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ crossref missing$
+ { journal field.or.null
+ format.vol.num.pages output
+ }
+ { format.article.crossref output.nonnull
+ format.pages output
+ }
+ if$
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {book}
+{ output.bibitem
+ author empty$
+ { format.editors "author and editor" output.check }
+ { format.authors output.nonnull
+ crossref missing$
+ { "author and editor" editor either.or.check }
+ 'skip$
+ if$
+ }
+ if$
+ new.block
+ format.btitle "title" output.check
+ crossref missing$
+ { format.bvolume output
+ new.block
+ format.number.series output
+ new.sentence
+ publisher "publisher" output.check
+ address output
+ }
+ { new.block
+ format.book.crossref output.nonnull
+ }
+ if$
+ format.edition output
+ format.date "year" output.check
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {booklet}
+{ output.bibitem
+ format.authors output
+ new.block
+ format.title "title" output.check
+ howpublished address new.block.checkb
+ howpublished output
+ address output
+ format.date output
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {inbook}
+{ output.bibitem
+ author empty$
+ { format.editors "author and editor" output.check }
+ { format.authors output.nonnull
+ crossref missing$
+ { "author and editor" editor either.or.check }
+ 'skip$
+ if$
+ }
+ if$
+ new.block
+ format.btitle "title" output.check
+ crossref missing$
+ { format.bvolume output
+ format.chapter.pages "chapter and pages" output.check
+ new.block
+ format.number.series output
+ new.sentence
+ publisher "publisher" output.check
+ address output
+ }
+ { format.chapter.pages "chapter and pages" output.check
+ new.block
+ format.book.crossref output.nonnull
+ }
+ if$
+ format.edition output
+ format.date "year" output.check
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {incollection}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.title "title" output.check
+ new.block
+ crossref missing$
+ { format.in.ed.booktitle "booktitle" output.check
+ format.bvolume output
+ format.number.series output
+ format.chapter.pages output
+ new.sentence
+ publisher "publisher" output.check
+ address output
+ format.edition output
+ format.date "year" output.check
+ }
+ { format.incoll.inproc.crossref output.nonnull
+ format.chapter.pages output
+ }
+ if$
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {inproceedings}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.title "title" output.check
+ new.block
+ crossref missing$
+ { format.in.ed.booktitle "booktitle" output.check
+ format.bvolume output
+ format.number.series output
+ format.pages output
+ address empty$
+ { organization publisher new.sentence.checkb
+ organization output
+ publisher output
+ format.date "year" output.check
+ }
+ { address output.nonnull
+ format.date "year" output.check
+ new.sentence
+ organization output
+ publisher output
+ }
+ if$
+ }
+ { format.incoll.inproc.crossref output.nonnull
+ format.pages output
+ }
+ if$
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {conference} { inproceedings }
+
+FUNCTION {manual}
+{ output.bibitem
+ author empty$
+ { organization empty$
+ 'skip$
+ { organization output.nonnull
+ address output
+ }
+ if$
+ }
+ { format.authors output.nonnull }
+ if$
+ new.block
+ format.btitle "title" output.check
+ author empty$
+ { organization empty$
+ { address new.block.checka
+ address output
+ }
+ 'skip$
+ if$
+ }
+ { organization address new.block.checkb
+ organization output
+ address output
+ }
+ if$
+ format.edition output
+ format.date output
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {mastersthesis}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.title "title" output.check
+ new.block
+ "Master's thesis" format.thesis.type output.nonnull
+ school "school" output.check
+ address output
+ format.date "year" output.check
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {misc}
+{ output.bibitem
+ format.authors output
+ title howpublished new.block.checkb
+ format.title output
+ howpublished new.block.checka
+ howpublished output
+ format.date output
+ new.block
+ note output
+ fin.entry
+ empty.misc.check
+}
+
+FUNCTION {phdthesis}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.btitle "title" output.check
+ new.block
+ "PhD thesis" format.thesis.type output.nonnull
+ school "school" output.check
+ address output
+ format.date "year" output.check
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {proceedings}
+{ output.bibitem
+ editor empty$
+ { organization output }
+ { format.editors output.nonnull }
+ if$
+ new.block
+ format.btitle "title" output.check
+ format.bvolume output
+ format.number.series output
+ address empty$
+ { editor empty$
+ { publisher new.sentence.checka }
+ { organization publisher new.sentence.checkb
+ organization output
+ }
+ if$
+ publisher output
+ format.date "year" output.check
+ }
+ { address output.nonnull
+ format.date "year" output.check
+ new.sentence
+ editor empty$
+ 'skip$
+ { organization output }
+ if$
+ publisher output
+ }
+ if$
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {techreport}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.title "title" output.check
+ new.block
+ format.tr.number output.nonnull
+ institution "institution" output.check
+ address output
+ format.date "year" output.check
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {unpublished}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.title "title" output.check
+ new.block
+ note "note" output.check
+ format.date output
+ fin.entry
+}
+
+FUNCTION {default.type} { misc }
+
+MACRO {jan} {"Jan."}
+
+MACRO {feb} {"Feb."}
+
+MACRO {mar} {"Mar."}
+
+MACRO {apr} {"Apr."}
+
+MACRO {may} {"May"}
+
+MACRO {jun} {"June"}
+
+MACRO {jul} {"July"}
+
+MACRO {aug} {"Aug."}
+
+MACRO {sep} {"Sept."}
+
+MACRO {oct} {"Oct."}
+
+MACRO {nov} {"Nov."}
+
+MACRO {dec} {"Dec."}
+
+MACRO {acmcs} {"ACM Comput. Surv."}
+
+MACRO {acta} {"Acta Inf."}
+
+MACRO {cacm} {"Commun. ACM"}
+
+MACRO {ibmjrd} {"IBM J. Res. Dev."}
+
+MACRO {ibmsj} {"IBM Syst.~J."}
+
+MACRO {ieeese} {"IEEE Trans. Softw. Eng."}
+
+MACRO {ieeetc} {"IEEE Trans. Comput."}
+
+MACRO {ieeetcad}
+ {"IEEE Trans. Comput.-Aided Design Integrated Circuits"}
+
+MACRO {ipl} {"Inf. Process. Lett."}
+
+MACRO {jacm} {"J.~ACM"}
+
+MACRO {jcss} {"J.~Comput. Syst. Sci."}
+
+MACRO {scp} {"Sci. Comput. Programming"}
+
+MACRO {sicomp} {"SIAM J. Comput."}
+
+MACRO {tocs} {"ACM Trans. Comput. Syst."}
+
+MACRO {tods} {"ACM Trans. Database Syst."}
+
+MACRO {tog} {"ACM Trans. Gr."}
+
+MACRO {toms} {"ACM Trans. Math. Softw."}
+
+MACRO {toois} {"ACM Trans. Office Inf. Syst."}
+
+MACRO {toplas} {"ACM Trans. Prog. Lang. Syst."}
+
+MACRO {tcs} {"Theoretical Comput. Sci."}
+
+MACRO {advp} {"Adv. Phys."}
+MACRO {ajp} {"Am. J. Phys."}
+MACRO {ao} {"Appl. Opt."}
+MACRO {apl} {"Appl. Phys. Lett."}
+MACRO {apj} {"Astrophys. J."}
+MACRO {baps} {"Bull. Am. Phys. Soc."}
+MACRO {cpc} {"Computer Phys. Comm."}
+MACRO {cppcf} {"Comments Plasma Phys. Controlled Fusion"}
+MACRO {fed} {"Fusion Eng. Design"}
+MACRO {ft} {"Fusion Tech."}
+MACRO {ieeens} {"IEEE Trans. Nucl. Sci."}
+MACRO {ieeeps} {"IEEE Trans. Plasma Sci."}
+MACRO {ijimw} {"Int. J. Infrared Millimeter Waves"}
+MACRO {ip} {"Infrared Phys."}
+MACRO {jap} {"J. Appl. Phys."}
+MACRO {jcp} {"J. Comput. Phys."}
+MACRO {jetp} {"Sov. Phys.-JETP"}
+MACRO {jfe} {"J. Fusion Energy"}
+MACRO {jfm} {"J. Fluid Mech."}
+MACRO {jgr} {"J. Geophys. Res."}
+MACRO {jmp} {"J. Math. Phys."}
+MACRO {jne} {"J. Nucl. Energy"}
+MACRO {jnec} {"J. Nucl. Energy, Part C"}
+MACRO {jnm} {"J. Nucl. Mater."}
+MACRO {josa} {"J. Opt. Soc. Am."}
+MACRO {jpp} {"J. Plasma Phys."}
+MACRO {jpsj} {"J. Phys. Soc. Jpn"}
+MACRO {jvst} {"J. Vac. Sci. Technol."}
+MACRO {nedf} {"Nucl. Eng. Design/Fusion"}
+MACRO {nf} {"Nucl. Fusion"}
+MACRO {nim} {"Nucl. Instrum. Methods"}
+MACRO {nimpr} {"Nucl. Instrum. Methods Phys. Research"}
+MACRO {nt/f} {"Nucl. Tech./Fusion"}
+MACRO {pf} {"Phys. Fluids"}
+MACRO {pfa} {"Phys. Fluids A"}
+MACRO {pfb} {"Phys. Fluids B"}
+MACRO {pl} {"Phys. Lett."}
+MACRO {pla} {"Phys. Lett. A"}
+MACRO {pnas} {"Proc. Nat. Acad. Sci. USA"}
+MACRO {pp} {"Plasma Phys."}
+MACRO {ppcf} {"Plasma Phys. Controlled Fusion"}
+MACRO {prl} {"Phys. Rev. Lett."}
+MACRO {pr} {"Phys. Rev."}
+MACRO {pra} {"Phys. Rev. A"}
+MACRO {ps} {"Physica Scripta"}
+MACRO {rmp} {"Rev. Mod. Phys."}
+MACRO {rsi} {"Rev. Sci. Instrum."}
+MACRO {sjpp} {"Sov. J. Plasma Phys."}
+MACRO {spd} {"Sov. Phys.-Dokl."}
+MACRO {sptp} {"Sov. Phys.-Tech. Phys."}
+MACRO {spu} {"Sov. Phys.-Usp."}
+
+READ
+
+STRINGS { longest.label }
+
+INTEGERS { number.label longest.label.width }
+
+FUNCTION {initialize.longest.label}
+{ "" 'longest.label :=
+ #1 'number.label :=
+ #0 'longest.label.width :=
+}
+
+FUNCTION {longest.label.pass}
+{ number.label int.to.str$ 'label :=
+ number.label #1 + 'number.label :=
+ label width$ longest.label.width >
+ { label 'longest.label :=
+ label width$ 'longest.label.width :=
+ }
+ 'skip$
+ if$
+}
+
+EXECUTE {initialize.longest.label}
+
+ITERATE {longest.label.pass}
+
+FUNCTION {begin.bib}
+{ preamble$ empty$
+ 'skip$
+ { preamble$ write$ newline$ }
+ if$
+ "\begin{thebibliography}{" longest.label * "}" * write$ newline$
+}
+
+EXECUTE {begin.bib}
+
+EXECUTE {init.state.consts}
+
+ITERATE {call.type$}
+
+FUNCTION {end.bib}
+{ newline$
+ "\end{thebibliography}" write$ newline$
+}
+
+EXECUTE {end.bib}
diff --git a/biblio/bibtex/contrib/phy-bstyles/pf.bst b/biblio/bibtex/contrib/phy-bstyles/pf.bst
new file mode 100644
index 0000000000..0ef2d0614c
--- /dev/null
+++ b/biblio/bibtex/contrib/phy-bstyles/pf.bst
@@ -0,0 +1,1028 @@
+%% #define PF 1 % Thu Jun 14 13:22:41 1990
+%% #include "TEX$ROOT:[BIBTEX]PHYSICS.BTX"
+ % Please notify Charles Karney (Karney@Princeton.EDU)
+ % of any bugs, improvements, etc.
+
+ % For Physics of Fluids, which now wants ALL the authors
+ % (Same as AIP but infinite names, abbreviate pages, and
+ % alternate incollection)
+
+ % version 0.99b for BibTeX versions 0.99a or later, LaTeX version 2.09.
+ % Copyright (C) 1985, all rights reserved.
+ % Copying of this file is authorized only if either
+ % (1) you make absolutely no changes to your copy, including name, or
+ % (2) if you do make changes, you name it something other than
+ % btxbst.doc, plain.bst, unsrt.bst, alpha.bst, and abbrv.bst.
+ % This restriction helps ensure that all standard styles are identical.
+ % The file btxbst.doc has the documentation for this style.
+
+ENTRY
+ { address
+ author
+ booktitle
+ chapter
+ edition
+ editor
+ howpublished
+ institution
+ journal
+ key
+ month
+ note
+ number
+ organization
+ pages
+ publisher
+ school
+ series
+ title
+ type
+ volume
+ year
+ }
+ {}
+ { label }
+
+INTEGERS { output.state before.all mid.sentence after.sentence after.block }
+
+FUNCTION {init.state.consts}
+{ #0 'before.all :=
+ #1 'mid.sentence :=
+ #2 'after.sentence :=
+ #3 'after.block :=
+}
+
+STRINGS { s t }
+
+FUNCTION {output.nonnull}
+{ 's :=
+ output.state mid.sentence =
+ { ", " * write$ }
+ { output.state after.block =
+ { "," * write$
+ newline$
+ "\newblock " write$
+ }
+ { output.state before.all =
+ 'write$
+ { add.period$ " " * write$ }
+ if$
+ }
+ if$
+ mid.sentence 'output.state :=
+ }
+ if$
+ s
+}
+
+FUNCTION {output}
+{ duplicate$ empty$
+ 'pop$
+ 'output.nonnull
+ if$
+}
+
+FUNCTION {output.check}
+{ 't :=
+ duplicate$ empty$
+ { pop$ "empty " t * " in " * cite$ * warning$ }
+ 'output.nonnull
+ if$
+}
+
+FUNCTION {output.bibitem}
+{ newline$
+ "\bibitem{" write$
+ cite$ write$
+ "}" write$
+ newline$
+ ""
+ before.all 'output.state :=
+}
+
+FUNCTION {fin.entry}
+{ add.period$
+ write$
+ newline$
+}
+
+FUNCTION {new.block}
+{ output.state before.all =
+ 'skip$
+ { after.block 'output.state := }
+ if$
+}
+
+FUNCTION {new.sentence}
+{ skip$
+}
+
+FUNCTION {not}
+{ { #0 }
+ { #1 }
+ if$
+}
+
+FUNCTION {and}
+{ 'skip$
+ { pop$ #0 }
+ if$
+}
+
+FUNCTION {or}
+{ { pop$ #1 }
+ 'skip$
+ if$
+}
+
+FUNCTION {new.block.checka}
+{ empty$
+ 'skip$
+ 'new.block
+ if$
+}
+
+FUNCTION {new.block.checkb}
+{ empty$
+ swap$ empty$
+ and
+ 'skip$
+ 'new.block
+ if$
+}
+
+FUNCTION {new.sentence.checka}
+{ empty$
+ 'skip$
+ 'new.sentence
+ if$
+}
+
+FUNCTION {new.sentence.checkb}
+{ empty$
+ swap$ empty$
+ and
+ 'skip$
+ 'new.sentence
+ if$
+}
+
+FUNCTION {field.or.null}
+{ duplicate$ empty$
+ { pop$ "" }
+ 'skip$
+ if$
+}
+
+FUNCTION {emphasize}
+{ duplicate$ empty$
+ { pop$ "" }
+ { "{\em " swap$ * "}" * }
+ if$
+}
+
+FUNCTION {embolden}
+{ duplicate$ empty$
+ { pop$ "" }
+ { "{\bf " swap$ * "}" * }
+ if$
+}
+
+FUNCTION {paren}
+{ duplicate$ empty$
+ { pop$ "" }
+ { "(" swap$ * ")" * }
+ if$
+}
+
+INTEGERS { nameptr namesleft numnames }
+
+FUNCTION {format.names}
+{ 's :=
+ #1 'nameptr :=
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ { s nameptr "{f.~}{vv~}{ll}{, jj}" format.name$ 't :=
+ nameptr #1 >
+ { namesleft #1 >
+ { ", " * t * }
+ { numnames #2 >
+ { "," * }
+ 'skip$
+ if$
+ t "others" =
+ { " et~al." * }
+ { " and " * t * }
+ if$
+ }
+ if$
+ }
+ 't
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+}
+
+FUNCTION {format.authors}
+{ author empty$
+ { "" }
+ { author format.names }
+ if$
+}
+
+FUNCTION {format.editors}
+{ editor empty$
+ { "" }
+ { editor format.names
+ editor num.names$ #1 >
+ { ", editors" * }
+ { ", editor" * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.edited}
+{ editor empty$
+ { "" }
+ { "edited by " editor format.names * }
+ if$
+}
+
+FUNCTION {format.title}
+{ title empty$
+ { "" }
+ { title "t" change.case$ }
+ if$
+}
+
+FUNCTION {n.dashify}
+{ 't :=
+ ""
+ { t empty$ not }
+ { t #1 #1 substring$ "-" =
+ { t #1 #2 substring$ "--" = not
+ { "--" *
+ t #2 global.max$ substring$ 't :=
+ }
+ { { t #1 #1 substring$ "-" = }
+ { "-" *
+ t #2 global.max$ substring$ 't :=
+ }
+ while$
+ }
+ if$
+ }
+ { t #1 #1 substring$ *
+ t #2 global.max$ substring$ 't :=
+ }
+ if$
+ }
+ while$
+}
+
+FUNCTION {first.page}
+{ 't :=
+ ""
+ { t empty$ not t #1 #1 substring$ "-" = not and }
+ { t #1 #1 substring$ *
+ t #2 global.max$ substring$ 't :=
+ }
+ while$
+}
+
+FUNCTION {format.date}
+{ year empty$
+ { "" }
+ 'year
+ if$
+}
+
+FUNCTION {format.btitle}
+{ title emphasize
+}
+
+FUNCTION {tie.or.space.connect}
+{ duplicate$ text.length$ #3 <
+ { "~" }
+ { " " }
+ if$
+ swap$ * *
+}
+
+FUNCTION {either.or.check}
+{ empty$
+ 'pop$
+ { "can't use both " swap$ * " fields in " * cite$ * warning$ }
+ if$
+}
+
+FUNCTION {format.bvolume}
+{ volume empty$
+ { "" }
+ { "volume" volume tie.or.space.connect
+ series empty$
+ 'skip$
+ { " of " * series emphasize * }
+ if$
+ "volume and number" number either.or.check
+ }
+ if$
+}
+
+FUNCTION {format.number.series}
+{ volume empty$
+ { number empty$
+ { series field.or.null }
+ { output.state mid.sentence =
+ { "number" }
+ { "Number" }
+ if$
+ number tie.or.space.connect
+ series empty$
+ { "there's a number but no series in " cite$ * warning$ }
+ { " in " * series * }
+ if$
+ }
+ if$
+ }
+ { "" }
+ if$
+}
+
+FUNCTION {format.edition}
+{ edition empty$
+ { "" }
+ { output.state mid.sentence =
+ { edition "l" change.case$ " edition" * }
+ { edition "t" change.case$ " edition" * }
+ if$
+ }
+ if$
+}
+
+INTEGERS { multiresult }
+
+FUNCTION {multi.page.check}
+{ 't :=
+ #0 'multiresult :=
+ { multiresult not
+ t empty$ not
+ and
+ }
+ { t #1 #1 substring$
+ duplicate$ "-" =
+ swap$ duplicate$ "," =
+ swap$ "+" =
+ or or
+ { #1 'multiresult := }
+ { t #2 global.max$ substring$ 't := }
+ if$
+ }
+ while$
+ multiresult
+}
+
+FUNCTION {format.pages}
+{ pages empty$
+ { "" }
+ { pages multi.page.check
+ { "pp." pages n.dashify tie.or.space.connect }
+ { "p." pages tie.or.space.connect }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.pages.a}
+{ pages empty$
+ { "" }
+ { "p." pages first.page tie.or.space.connect }
+ if$
+}
+
+FUNCTION {format.vol.num.pages}
+{ volume field.or.null embolden
+ " " swap$ * *
+ pages empty$
+ 'skip$
+ { duplicate$ empty$
+ { pop$ format.pages.a }
+ { ", " * pages first.page * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.chapter.pages}
+{ chapter empty$
+ 'format.pages
+ { type empty$
+ { "chapter" }
+ { type "l" change.case$ }
+ if$
+ chapter tie.or.space.connect
+ pages empty$
+ 'skip$
+ { ", " * format.pages * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.in.ed.booktitle}
+{ booktitle empty$
+ { "" }
+ { editor empty$
+ { "in " booktitle emphasize * }
+ { "in " booktitle emphasize * ", " * format.edited * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {empty.misc.check}
+{ author empty$ title empty$ howpublished empty$
+ month empty$ year empty$ note empty$
+ and and and and and
+ { "all relevant fields are empty in " cite$ * warning$ }
+ 'skip$
+ if$
+}
+
+FUNCTION {format.thesis.type}
+{ type empty$
+ 'skip$
+ { pop$
+ type "t" change.case$
+ }
+ if$
+}
+
+FUNCTION {format.tr.number}
+{ type empty$
+ { "Technical Report" }
+ 'type
+ if$
+ number empty$
+ { "t" change.case$ }
+ { number tie.or.space.connect }
+ if$
+}
+
+FUNCTION {format.article.crossref}
+{ key empty$
+ { journal empty$
+ { "need key or journal for " cite$ * " to crossref " * crossref *
+ warning$
+ ""
+ }
+ { "In " journal * }
+ if$
+ }
+ { "In " key * }
+ if$
+ " \cite{" * crossref * "}" *
+}
+
+FUNCTION {format.crossref.editor}
+{ editor #1 "{vv~}{ll}" format.name$
+ editor num.names$ duplicate$
+ #2 >
+ { pop$ " et~al." * }
+ { #2 <
+ 'skip$
+ { editor #2 "{ff }{vv }{ll}{ jj}" format.name$ "others" =
+ { " et~al." * }
+ { " and " * editor #2 "{vv~}{ll}" format.name$ * }
+ if$
+ }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.book.crossref}
+{ volume empty$
+ { "empty volume in " cite$ * "'s crossref of " * crossref * warning$
+ "In "
+ }
+ { "Volume" volume tie.or.space.connect
+ " of " *
+ }
+ if$
+ editor empty$
+ editor field.or.null author field.or.null =
+ or
+ { key empty$
+ { series empty$
+ { "need editor, key, or series for " cite$ * " to crossref " *
+ crossref * warning$
+ "" *
+ }
+ { "{\em " * series * "\/}" * }
+ if$
+ }
+ { key * }
+ if$
+ }
+ { format.crossref.editor * }
+ if$
+ " \cite{" * crossref * "}" *
+}
+
+FUNCTION {format.incoll.inproc.crossref}
+{ editor empty$
+ editor field.or.null author field.or.null =
+ or
+ { key empty$
+ { booktitle empty$
+ { "need editor, key, or booktitle for " cite$ * " to crossref " *
+ crossref * warning$
+ ""
+ }
+ { "In {\em " booktitle * "\/}" * }
+ if$
+ }
+ { "In " key * }
+ if$
+ }
+ { "In " format.crossref.editor * }
+ if$
+ " \cite{" * crossref * "}" *
+}
+
+FUNCTION {article}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ crossref missing$
+ { journal field.or.null
+ format.vol.num.pages
+ format.date empty$
+ 'skip$
+ { duplicate$ empty$
+ { pop$ format.date paren }
+ { " " * format.date paren * }
+ if$
+ }
+ if$
+ output
+ }
+ { format.article.crossref output.nonnull
+ format.pages output
+ }
+ if$
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {book}
+{ output.bibitem
+ author empty$
+ { format.editors "author and editor" output.check }
+ { format.authors output.nonnull
+ crossref missing$
+ { "author and editor" editor either.or.check }
+ 'skip$
+ if$
+ }
+ if$
+ new.block
+ format.btitle "title" output.check
+ crossref missing$
+ { format.bvolume output
+ new.block
+ format.number.series output
+ new.sentence
+ publisher "publisher" output.check
+ address output
+ }
+ { new.block
+ format.book.crossref output.nonnull
+ }
+ if$
+ format.edition output
+ format.date "year" output.check
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {booklet}
+{ output.bibitem
+ format.authors output
+ new.block
+ format.title "title" output.check
+ howpublished address new.block.checkb
+ howpublished output
+ address output
+ format.date output
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {inbook}
+{ output.bibitem
+ author empty$
+ { format.editors "author and editor" output.check }
+ { format.authors output.nonnull
+ crossref missing$
+ { "author and editor" editor either.or.check }
+ 'skip$
+ if$
+ }
+ if$
+ new.block
+ format.btitle "title" output.check
+ crossref missing$
+ { format.bvolume output
+ format.chapter.pages "chapter and pages" output.check
+ new.block
+ format.number.series output
+ new.sentence
+ publisher "publisher" output.check
+ address output
+ }
+ { format.chapter.pages "chapter and pages" output.check
+ new.block
+ format.book.crossref output.nonnull
+ }
+ if$
+ format.edition output
+ format.date "year" output.check
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {incollection}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ crossref missing$
+ { format.in.ed.booktitle "booktitle" output.check
+ new.sentence
+ publisher "publisher" output.check
+ address output
+ format.edition output
+ format.date "year" output.check
+ format.bvolume output
+ format.number.series output
+ format.chapter.pages output
+ }
+ { format.incoll.inproc.crossref output.nonnull
+ format.chapter.pages output
+ }
+ if$
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {inproceedings}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.title "title" output.check
+ new.block
+ crossref missing$
+ { format.in.ed.booktitle "booktitle" output.check
+ format.bvolume output
+ format.number.series output
+ format.pages output
+ address empty$
+ { organization publisher new.sentence.checkb
+ organization output
+ publisher output
+ format.date "year" output.check
+ }
+ { address output.nonnull
+ format.date "year" output.check
+ new.sentence
+ organization output
+ publisher output
+ }
+ if$
+ }
+ { format.incoll.inproc.crossref output.nonnull
+ format.pages output
+ }
+ if$
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {conference} { inproceedings }
+
+FUNCTION {manual}
+{ output.bibitem
+ author empty$
+ { organization empty$
+ 'skip$
+ { organization output.nonnull
+ address output
+ }
+ if$
+ }
+ { format.authors output.nonnull }
+ if$
+ new.block
+ format.btitle "title" output.check
+ author empty$
+ { organization empty$
+ { address new.block.checka
+ address output
+ }
+ 'skip$
+ if$
+ }
+ { organization address new.block.checkb
+ organization output
+ address output
+ }
+ if$
+ format.edition output
+ format.date output
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {mastersthesis}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.title "title" output.check
+ new.block
+ "Master's thesis" format.thesis.type output.nonnull
+ school "school" output.check
+ address output
+ format.date "year" output.check
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {misc}
+{ output.bibitem
+ format.authors output
+ title howpublished new.block.checkb
+ format.title output
+ howpublished new.block.checka
+ howpublished output
+ format.date output
+ new.block
+ note output
+ fin.entry
+ empty.misc.check
+}
+
+FUNCTION {phdthesis}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.btitle "title" output.check
+ new.block
+ "PhD thesis" format.thesis.type output.nonnull
+ school "school" output.check
+ address output
+ format.date "year" output.check
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {proceedings}
+{ output.bibitem
+ editor empty$
+ { organization output }
+ { format.editors output.nonnull }
+ if$
+ new.block
+ format.btitle "title" output.check
+ format.bvolume output
+ format.number.series output
+ address empty$
+ { editor empty$
+ { publisher new.sentence.checka }
+ { organization publisher new.sentence.checkb
+ organization output
+ }
+ if$
+ publisher output
+ format.date "year" output.check
+ }
+ { address output.nonnull
+ format.date "year" output.check
+ new.sentence
+ editor empty$
+ 'skip$
+ { organization output }
+ if$
+ publisher output
+ }
+ if$
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {techreport}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.title "title" output.check
+ new.block
+ format.tr.number output.nonnull
+ institution "institution" output.check
+ address output
+ format.date "year" output.check
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {unpublished}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.title "title" output.check
+ new.block
+ note "note" output.check
+ format.date output
+ fin.entry
+}
+
+FUNCTION {default.type} { misc }
+
+MACRO {jan} {"Jan."}
+
+MACRO {feb} {"Feb."}
+
+MACRO {mar} {"Mar."}
+
+MACRO {apr} {"Apr."}
+
+MACRO {may} {"May"}
+
+MACRO {jun} {"June"}
+
+MACRO {jul} {"July"}
+
+MACRO {aug} {"Aug."}
+
+MACRO {sep} {"Sept."}
+
+MACRO {oct} {"Oct."}
+
+MACRO {nov} {"Nov."}
+
+MACRO {dec} {"Dec."}
+
+MACRO {acmcs} {"ACM Comput. Surv."}
+
+MACRO {acta} {"Acta Inf."}
+
+MACRO {cacm} {"Commun. ACM"}
+
+MACRO {ibmjrd} {"IBM J. Res. Dev."}
+
+MACRO {ibmsj} {"IBM Syst.~J."}
+
+MACRO {ieeese} {"IEEE Trans. Softw. Eng."}
+
+MACRO {ieeetc} {"IEEE Trans. Comput."}
+
+MACRO {ieeetcad}
+ {"IEEE Trans. Comput.-Aided Design Integrated Circuits"}
+
+MACRO {ipl} {"Inf. Process. Lett."}
+
+MACRO {jacm} {"J.~ACM"}
+
+MACRO {jcss} {"J.~Comput. Syst. Sci."}
+
+MACRO {scp} {"Sci. Comput. Programming"}
+
+MACRO {sicomp} {"SIAM J. Comput."}
+
+MACRO {tocs} {"ACM Trans. Comput. Syst."}
+
+MACRO {tods} {"ACM Trans. Database Syst."}
+
+MACRO {tog} {"ACM Trans. Gr."}
+
+MACRO {toms} {"ACM Trans. Math. Softw."}
+
+MACRO {toois} {"ACM Trans. Office Inf. Syst."}
+
+MACRO {toplas} {"ACM Trans. Prog. Lang. Syst."}
+
+MACRO {tcs} {"Theoretical Comput. Sci."}
+
+MACRO {advp} {"Adv. Phys."}
+MACRO {ajp} {"Am. J. Phys."}
+MACRO {ao} {"Appl. Opt."}
+MACRO {apl} {"Appl. Phys. Lett."}
+MACRO {apj} {"Astrophys. J."}
+MACRO {baps} {"Bull. Am. Phys. Soc."}
+MACRO {cpc} {"Computer Phys. Comm."}
+MACRO {cppcf} {"Comments Plasma Phys. Controlled Fusion"}
+MACRO {fed} {"Fusion Eng. Design"}
+MACRO {ft} {"Fusion Tech."}
+MACRO {ieeens} {"IEEE Trans. Nucl. Sci."}
+MACRO {ieeeps} {"IEEE Trans. Plasma Sci."}
+MACRO {ijimw} {"Int. J. Infrared Millimeter Waves"}
+MACRO {ip} {"Infrared Phys."}
+MACRO {jap} {"J. Appl. Phys."}
+MACRO {jcp} {"J. Comput. Phys."}
+MACRO {jetp} {"Sov. Phys.-JETP"}
+MACRO {jfe} {"J. Fusion Energy"}
+MACRO {jfm} {"J. Fluid Mech."}
+MACRO {jgr} {"J. Geophys. Res."}
+MACRO {jmp} {"J. Math. Phys."}
+MACRO {jne} {"J. Nucl. Energy"}
+MACRO {jnec} {"J. Nucl. Energy, Part C"}
+MACRO {jnm} {"J. Nucl. Mater."}
+MACRO {josa} {"J. Opt. Soc. Am."}
+MACRO {jpp} {"J. Plasma Phys."}
+MACRO {jpsj} {"J. Phys. Soc. Jpn"}
+MACRO {jvst} {"J. Vac. Sci. Technol."}
+MACRO {nedf} {"Nucl. Eng. Design/Fusion"}
+MACRO {nf} {"Nucl. Fusion"}
+MACRO {nim} {"Nucl. Instrum. Methods"}
+MACRO {nimpr} {"Nucl. Instrum. Methods Phys. Research"}
+MACRO {nt/f} {"Nucl. Tech./Fusion"}
+MACRO {pf} {"Phys. Fluids"}
+MACRO {pfa} {"Phys. Fluids A"}
+MACRO {pfb} {"Phys. Fluids B"}
+MACRO {pl} {"Phys. Lett."}
+MACRO {pla} {"Phys. Lett. A"}
+MACRO {pnas} {"Proc. Nat. Acad. Sci. USA"}
+MACRO {pp} {"Plasma Phys."}
+MACRO {ppcf} {"Plasma Phys. Controlled Fusion"}
+MACRO {prl} {"Phys. Rev. Lett."}
+MACRO {pr} {"Phys. Rev."}
+MACRO {pra} {"Phys. Rev. A"}
+MACRO {ps} {"Physica Scripta"}
+MACRO {rmp} {"Rev. Mod. Phys."}
+MACRO {rsi} {"Rev. Sci. Instrum."}
+MACRO {sjpp} {"Sov. J. Plasma Phys."}
+MACRO {spd} {"Sov. Phys.-Dokl."}
+MACRO {sptp} {"Sov. Phys.-Tech. Phys."}
+MACRO {spu} {"Sov. Phys.-Usp."}
+
+READ
+
+STRINGS { longest.label }
+
+INTEGERS { number.label longest.label.width }
+
+FUNCTION {initialize.longest.label}
+{ "" 'longest.label :=
+ #1 'number.label :=
+ #0 'longest.label.width :=
+}
+
+FUNCTION {longest.label.pass}
+{ number.label int.to.str$ 'label :=
+ number.label #1 + 'number.label :=
+ label width$ longest.label.width >
+ { label 'longest.label :=
+ label width$ 'longest.label.width :=
+ }
+ 'skip$
+ if$
+}
+
+EXECUTE {initialize.longest.label}
+
+ITERATE {longest.label.pass}
+
+FUNCTION {begin.bib}
+{ preamble$ empty$
+ 'skip$
+ { preamble$ write$ newline$ }
+ if$
+ "\begin{thebibliography}{" longest.label * "}" * write$ newline$
+}
+
+EXECUTE {begin.bib}
+
+EXECUTE {init.state.consts}
+
+ITERATE {call.type$}
+
+FUNCTION {end.bib}
+{ newline$
+ "\end{thebibliography}" write$ newline$
+}
+
+EXECUTE {end.bib}
diff --git a/biblio/bibtex/contrib/phy-bstyles/physics.btx b/biblio/bibtex/contrib/phy-bstyles/physics.btx
new file mode 100644
index 0000000000..650715fb8c
--- /dev/null
+++ b/biblio/bibtex/contrib/phy-bstyles/physics.btx
@@ -0,0 +1,3569 @@
+% BibTeX styles for various physics journals (27-Feb-1990).
+% This file, physics.btx, is based on the file btxbst.doc.
+ % Please notify Charles Karney (Karney@Princeton.EDU)
+ % of any bugs, improvements, etc.
+
+% Run this file through cpp to get specific versions. I have written
+% a version of cpp within Emacs. To access it put
+% (autoload 'cpp "tex$bibtex:cpp" ; Use cpp for BibTeX styles
+% "C preprocessor"
+% t)
+% into your .emacs file. Read in this file with
+% emacs tex$bibtex:physics.btx
+% and run cpp with e.g.,
+% M-x cpp <ret> aip <ret>
+% Save the resulting file to tex$latex:aip.bst.
+
+% To accomodate the variations we need (in addition to the definitions below)
+% ATIT_SUPPRESS: do not include the titles of journal articles
+% NAME_INVERT: put the initials last
+% NAME_UPPER: convert names to all caps.
+% MONTH_SUPPRESS: do not include months in journal articles
+% PAREN_DATE: dates go in parens in journal articles
+% DATE_FIRST: dates go before page numbers
+% VOLUME_SPACE: volume set off with space (not colon)
+% NUM_SUPPRESS: do not include numbers in journal articles
+% BOLD_VOL: volume numbers in bold face in journal articles
+% BRACKET_NOTE: notes in brackets
+% PAGE_START_J: include only starting page for journal articles
+% PAGE_START_O: include only starting page for other entries
+% PAGE_ABBREV: abbreviate page to p. and pages to pp.
+% PHYSICS_JOUR: include abbreviations for Physics journals
+% COMMA_DELIMIT: use comma (instead of period) to divide a citation
+% NOTE_SUPPRESS: suppress the note
+% MAX_NAMES: max number of authors before using et al (0 = infinity)
+% MIN_NAMES: number of authors to list with et al.
+% EDIT_VAR: use "edited by ..." instead of "..., editors"
+% RMP_LABELS: create RMP-style labels
+% KEY_CITE: use key as label
+% NAMED_REFS: use (Smith, 1988) style of citations
+% CSC_NAMES: names set in caps and small caps
+% JOUR_DEEMPH: don't emphasize journal name
+% ETAL_EMPH: emphasize et al.
+% ALT_INCOLL alternate ordering of fields in incollections
+
+% These are all boolean (0 or 1) except for MAX_NAMES and MIN_NAMES.
+% These need to satisfy 0 <= MIN_NAMES <= MAX_NAMES.
+% The rule here is that if all these are defined to be zero, we revert to
+% the standard styles. For that reason we initialize them all to 0.
+
+# define ATIT_SUPPRESS 0
+# define NAME_INVERT 0
+# define NAME_UPPER 0
+# define MONTH_SUPPRESS 0
+# define PAREN_DATE 0
+# define DATE_FIRST 0
+# define VOLUME_SPACE 0
+# define NUM_SUPPRESS 0
+# define BOLD_VOL 0
+# define BRACKET_NOTE 0
+# define PAGE_START_J 0
+# define PAGE_START_O 0
+# define PAGE_ABBREV 0
+# define PHYSICS_JOUR 0
+# define COMMA_DELIMIT 0
+# define NOTE_SUPPRESS 0
+# define MAX_NAMES 0
+# define MIN_NAMES 0
+# define EDIT_VAR 0
+# define RMP_LABELS 0
+# define KEY_CITE 0
+# define NAMED_REFS 0
+# define CSC_NAMES 0
+# define JOUR_DEEMPH 0
+# define ETAL_EMPH 0
+# define ALT_INCOLL 0
+
+% These are the original macros
+# define LAB_ALPH 0
+# define SORTED 0
+# define NAME_FULL 0
+# define ATIT_LOWER 0
+# define MONTH_FULL 0
+# define JOUR_FULL 0
+
+#ifdef AIP
+ % For American Institute of Physics Journals
+# define ATIT_SUPPRESS 1
+# define PAGE_START_J 1
+# define PHYSICS_JOUR 1
+# define MAX_NAMES 5
+# define MIN_NAMES 1
+# define EDIT_VAR 1
+# define ATIT_LOWER 1
+# define COMMA_DELIMIT 1
+# define VOLUME_SPACE 1
+# define MONTH_SUPPRESS 1
+# define PAREN_DATE 1
+# define NUM_SUPPRESS 1
+# define BOLD_VOL 1
+# define JOUR_DEEMPH 1
+#endif
+
+#ifdef PF
+ % For Physics of Fluids, which now wants ALL the authors
+ % (Same as AIP but infinite names, abbreviate pages, and
+ % alternate incollection)
+# define ATIT_SUPPRESS 1
+# define PAGE_START_J 1
+# define PHYSICS_JOUR 1
+# define EDIT_VAR 1
+# define ATIT_LOWER 1
+# define COMMA_DELIMIT 1
+# define VOLUME_SPACE 1
+# define MONTH_SUPPRESS 1
+# define PAREN_DATE 1
+# define NUM_SUPPRESS 1
+# define BOLD_VOL 1
+# define JOUR_DEEMPH 1
+# define PAGE_ABBREV 1
+# define ALT_INCOLL 1
+#endif
+
+#ifdef NF
+ % For Nuclear Fusion
+ % see Nuclear Fusion Vol. 28, No. 2 (1988),
+ % "Announcement [of] Guidelines for Bibliographical Citations"
+% same as AIP except for NAME_INVERT, NAME_UPPER, DATE_FIRST and
+% MIN_NAMES and MAX_NAMES set to use only three names if there are
+% 6 or more. Also, no EDIT_VAR, and use PAGE_START_O and PAGE_ABBREV.
+% There are still some nits to be picked (years in parentheses for
+% other than journals, volumes having Vol. before them and pages not
+% having p.)
+# define ATIT_SUPPRESS 1
+# define PAGE_START_J 1
+# define PAGE_START_O 1
+# define PAGE_ABBREV 1
+# define PHYSICS_JOUR 1
+# define ATIT_LOWER 1
+# define COMMA_DELIMIT 1
+# define VOLUME_SPACE 1
+# define MONTH_SUPPRESS 1
+# define PAREN_DATE 1
+# define NUM_SUPPRESS 1
+# define BOLD_VOL 1
+# define NAME_INVERT 1
+# define NAME_UPPER 1
+# define DATE_FIRST 1
+# define JOUR_DEEMPH 1
+# define MAX_NAMES 5
+# define MIN_NAMES 3
+#endif
+#ifdef NFLET
+ % For Nuclear Fusion Letters
+% same as NF except for MIN_NAMES and MAX_NAMES set to 5
+# define ATIT_SUPPRESS 1
+# define PAGE_START_J 1
+# define PAGE_START_O 1
+# define PAGE_ABBREV 1
+# define PHYSICS_JOUR 1
+# define ATIT_LOWER 1
+# define COMMA_DELIMIT 1
+# define VOLUME_SPACE 1
+# define MONTH_SUPPRESS 1
+# define PAREN_DATE 1
+# define NUM_SUPPRESS 1
+# define BOLD_VOL 1
+# define NAME_INVERT 1
+# define NAME_UPPER 1
+# define DATE_FIRST 1
+# define MAX_NAMES 5
+# define MIN_NAMES 5
+# define JOUR_DEEMPH 1
+#endif
+#ifdef IAEA
+ % For IAEA Conferences
+% same as NF except for MIN_NAMES and MAX_NAMES set to 1
+# define ATIT_SUPPRESS 1
+# define PAGE_START_J 1
+# define PHYSICS_JOUR 1
+# define EDIT_VAR 1
+# define ATIT_LOWER 1
+# define COMMA_DELIMIT 1
+# define VOLUME_SPACE 1
+# define MONTH_SUPPRESS 1
+# define PAREN_DATE 1
+# define NUM_SUPPRESS 1
+# define BOLD_VOL 1
+# define NAME_INVERT 1
+# define NAME_UPPER 1
+# define DATE_FIRST 1
+# define MAX_NAMES 1
+# define MIN_NAMES 1
+# define JOUR_DEEMPH 1
+#endif
+#ifdef CPC
+ % For Computer Physics Communications
+% same as AIP except for NAME_INVERT, DATE_FIRST
+# define ATIT_SUPPRESS 1
+# define PAGE_START_J 1
+# define PHYSICS_JOUR 1
+# define MAX_NAMES 5
+# define MIN_NAMES 1
+# define EDIT_VAR 1
+# define ATIT_LOWER 1
+# define COMMA_DELIMIT 1
+# define VOLUME_SPACE 1
+# define MONTH_SUPPRESS 1
+# define PAREN_DATE 1
+# define NUM_SUPPRESS 1
+# define BOLD_VOL 1
+# define NAME_INVERT 1
+# define DATE_FIRST 1
+# define JOUR_DEEMPH 1
+#endif
+#ifdef RMP
+ % For Reviews of Modern Physics,
+% except first name not inverted yet and order of fields not hacked
+# define LAB_ALPH 1
+# define SORTED 1
+# define RMP_LABELS 1
+# define ATIT_SUPPRESS 1
+# define ATIT_LOWER 1
+# define MONTH_SUPRESS 1
+# define NUM_SUPPRESS 1
+# define VOL_SUPPRESS 1
+# define BOLD_VOL 1
+# define BRACKET_NOTE 1
+# define PAGE_START_J 1
+# define PAGE_START_O 1
+# define PAGE_ABBREV 1
+# define PHYSICS_JOUR 1
+# define COMMA_DELIMIT 1
+# define EDIT_VAR 1
+# define JOUR_DEEMPH 1
+#endif
+#ifdef REPORT
+ % For internal reports
+% same as AIP except for ATIT_SUPPRESS, MONTH_SUPPRESS, PAGE_START_J,
+% NUM_SUPPRESS, MAX_NAMES, MIN_NAMES
+# define PHYSICS_JOUR 1
+# define EDIT_VAR 1
+# define ATIT_LOWER 0
+# define COMMA_DELIMIT 1
+# define VOLUME_SPACE 1
+# define PAREN_DATE 1
+# define BOLD_VOL 1
+# define JOUR_DEEMPH 1
+#endif
+#ifdef APALIKE
+ % For American Psychological Association
+ % (same as ALPHA but with NAMED_REFS set and NAME_FULL unset)
+# define LAB_ALPH 1
+# define SORTED 1
+# define NAME_FULL 0
+# define ATIT_LOWER 1
+# define MONTH_FULL 1
+# define JOUR_FULL 1
+# define NAMED_REFS 1
+# define NAME_INVERT 1
+#endif
+#ifdef PPCF
+ % A physics version of APALIKE
+# define PHYSICS_JOUR 1
+# define LAB_ALPH 1
+# define SORTED 1
+# define NAME_FULL 0
+# define ATIT_LOWER 0
+# define ATIT_SUPPRESS 1
+# define MONTH_FULL 1
+# define JOUR_FULL 0
+# define NAMED_REFS 1
+# define NAME_INVERT 1
+# define ETAL_EMPH 1
+# define CSC_NAMES 1
+# define NUM_SUPPRESS 1
+# define BOLD_VOL 1
+# define VOLUME_SPACE 1
+#endif
+#ifdef JCP
+ % For Journal of Computational Physics
+ % Cris Barnes and Dave Mikkelson, 9/25/89
+# define ATIT_SUPPRESS 1
+# define MONTH_SUPPRESS 1
+# define PAREN_DATE 1
+# define VOLUME_SPACE 1
+# define NUM_SUPPRESS 1
+# define BOLD_VOL 1
+# define PAGE_START_J 1
+# define PAGE_START_O 1
+# define PAGE_ABBREV 1
+# define PHYSICS_JOUR 1
+# define COMMA_DELIMIT 1
+# define NOTE_SUPPRESS 1
+# define EDIT_VAR 1
+# define CSC_NAMES 1
+#endif
+% This is the start of btxbst.doc
+
+% BibTeX `plain' family
+ % version 0.99b for BibTeX versions 0.99a or later, LaTeX version 2.09.
+ % Copyright (C) 1985, all rights reserved.
+ % Copying of this file is authorized only if either
+ % (1) you make absolutely no changes to your copy, including name, or
+ % (2) if you do make changes, you name it something other than
+ % btxbst.doc, plain.bst, unsrt.bst, alpha.bst, and abbrv.bst.
+ % This restriction helps ensure that all standard styles are identical.
+ % The file btxbst.doc has the documentation for this style.
+#if NAMED_REFS
+% BibTeX `apalike' bibliography style (24-Jan-88 version)
+% Adapted from the `alpha' style, version 0.99a; for BibTeX version 0.99a.
+% Copyright (C) 1988, all rights reserved.
+% Copying of this file is allowed, provided that if you make any changes at all
+% you name it something other than `apalike.bst'.
+% This restriction helps ensure that all copies are identical.
+% Differences between this style and `alpha' are generally heralded by a `%'.
+% The file btxbst.doc has the documentation for alpha.bst.
+%
+% This style should be used with the `apalike' LaTeX style (apalike.sty).
+% \cite's come out like "(Jones, 1986)" in the text but there are no labels
+% in the bibliography, and something like "(1986)" comes out immediately
+% after the author. Author (and editor) names appear as last name, comma,
+% initials. A `year' field is required for every entry, and so is either
+% an author (or in some cases, an editor) field or a key field.
+%
+% Editorial note:
+% Many journals require a style like `apalike', but I strongly, strongly,
+% strongly recommend that you not use it if you have a choice---use something
+% like `plain' instead. Mary-Claire van Leunen (A Handbook for Scholars,
+% Knopf, 1979) argues convincingly that a style like `plain' encourages better
+% writing than one like `apalike'. Furthermore the strongest arguments for
+% using an author-date style like `apalike'---that it's "the most practical"
+% (The Chicago Manual of Style, University of Chicago Press, thirteenth
+% edition, 1982, pages 400--401)---fall flat on their face with the new
+% computer-typesetting technology. For instance page 401 anachronistically
+% states "The chief disadvantage of [a style like `plain'] is that additions
+% or deletions cannot be made after the manuscript is typed without changing
+% numbers in both text references and list." LaTeX sidesteps the disadvantage.
+%
+% History:
+% 15-sep-86 (SK,OP) Original version, by Susan King and Oren Patashnik.
+% 10-nov-86 (OP) Truncated the sort.key$ string to the correct length
+% in bib.sort.order to eliminate error message.
+% 24-jan-88 (OP) Updated for BibTeX version 0.99a, from alpha.bst 0.99a;
+% apalike now sorts by author, then year, then title;
+% THIS `apalike' VERSION DOES NOT WORK WITH BIBTEX 0.98i.
+#endif APALIKE
+% Please notify Oren Patashnik (PATASHNIK@SCORE.STANFORD.EDU) of any bugs in
+% these standard styles or in this documentation file.
+%
+% This is file btxbxt.doc; it helps document bibliography styles,
+% and is also a template file that you can use to make
+% several different style files, if you have access to a C preprocessor.
+% For example, the standard styles were made by doing something like
+% cpp -P -DPLAIN btxbst.doc plain.txt
+% cpp -P -DUNSRT btxbst.doc unsrt.txt
+% cpp -P -DALPHA btxbst.doc alpha.txt
+% cpp -P -DABBRV btxbst.doc abbrv.txt
+% and then renaming after removing unwanted comments and blank lines.
+% If you don't have access,
+% you can edit this file by hand to imitate the preprocessor,
+% with the following explanation of the C preprocessor constructs used here.
+%
+% The output of the preprocessor is the same as the input, except that certain
+% lines will be excluded (and some blank lines will be added). The sequence
+% #if VAR
+% lines to be included when VAR is not zero
+% #else
+% lines to be included when VAR is zero
+% #endif
+% (with the #-signs appearing in column 1) means that one set or the other of
+% the lines are to be included depending on the value of VAR.
+% The #else part is optional. Comments can be added after #else and #endif.
+% Variables can be set by
+% #define VAR value
+% and one can also use #ifdef VAR to see if VAR has any value, and #ifndef
+% to see if it has none.
+% Another #if form used in this file is #if !VAR, which includes the lines
+% after the #if only if VAR is zero.
+%
+% Convention: Use all uppercase identifiers for these preprocessor variables
+% so you can spot them easily
+%
+% The command line to the preprocessor should define one of PLAIN, UNSRT, ALPHA
+% or ABBRV (though PLAIN will be used by default if none is given),
+% and the following lines will set various boolean variables to control the
+% various lines that are chosen from the rest of the file.
+% Each boolean variable should be set true (1) or false (0) in each style.
+% Here are the current variables, and their meanings:
+% LAB_ALPH: an alphabetic label is used (if false then a numeric
+% label is used)
+% SORTED: the entries should be sorted by label (if nonnumeric)
+% and other info, like authors (if false, then
+% entries remain in order of occurrence)
+% NAME_FULL: the authors, editors, etc., get the full names as
+% given in the bibliography file (if false, the first
+% names become initials)
+% ATIT_LOWER: titles of non-"books" (e.g., articles) should be
+% converted to lower-case, except the first letter or
+% first letter after a colon
+% (if false then they appear as in the database)
+% MONTH_FULL: months are spelled out in full (if false, then
+% they're abbreviated)
+% JOUR_FULL: macro journal names are spelled out in full
+% (if false then they are abbreviated, currently
+% as they appear in ACM publications)
+#ifndef UNSRT
+# ifndef ALPHA
+# ifndef ABBRV
+%# define PLAIN 1
+# endif
+# endif
+#endif
+#ifdef PLAIN
+% plain style (sorted numbers)
+# define LAB_ALPH 0
+# define SORTED 1
+# define NAME_FULL 1
+# define ATIT_LOWER 1
+# define MONTH_FULL 1
+# define JOUR_FULL 1
+#endif
+#ifdef UNSRT
+% unsrt style (unsorted numbers)
+# define LAB_ALPH 0
+# define SORTED 0
+# define NAME_FULL 1
+# define ATIT_LOWER 1
+# define MONTH_FULL 1
+# define JOUR_FULL 1
+#endif
+#ifdef ALPHA
+% alpha style (sorted short alphabetics)
+# define LAB_ALPH 1
+# define SORTED 1
+# define NAME_FULL 1
+# define ATIT_LOWER 1
+# define MONTH_FULL 1
+# define JOUR_FULL 1
+#endif
+#ifdef ABBRV
+% abbrv style (sorted numbers, with abbreviations)
+# define LAB_ALPH 0
+# define SORTED 1
+# define NAME_FULL 0
+# define ATIT_LOWER 1
+# define MONTH_FULL 0
+# define JOUR_FULL 0
+#endif
+%
+% Entry formatting: Similar to that recommended by Mary-Claire van Leunen
+% in "A Handbook for Scholars". Book-like titles are italicized
+% (emphasized) and non-book titles are converted to sentence
+% capitilization (and not enclosed in quotes).
+% This file outputs a \newblock between major blocks of an entry
+% (the name \newblock is analogous to the names \newline and \newpage)
+% so that the user can obtain an "open" format, which has a line break
+% before each block and lines after the first are indented within blocks,
+% by giving the optional \documentstyle argument `openbib';
+% The default is the "closed" format---blocks runs together.
+%
+% Citation alphabetic label format:
+% [Knu73] for single author (or editor or key)
+% [AHU83] (first letters of last names) for multiple authors
+%
+% Citation label numberic format:
+% [number]
+%
+% Reference list ordering for sorted, alphabetic lables:
+% alphabetical by citation label, then by author(s) or whatever
+% passes for author in the absence of one, then by year,
+% then title
+%
+% Reference list ordering for sorted, numeric lables:
+% alphabetical by author(s) or whatever passes
+% for author in the absence of one, then by year, then title
+%
+% Reference list ordering for unsorted:
+% by the order cited in the text
+%
+% History
+% 12/16/84 (HWT) Original `plain' version, by Howard Trickey.
+% 12/23/84 (LL) Some comments made by Leslie Lamport.
+% 2/16/85 (OP) Changes based on LL's comments, Oren Patashnik.
+% 2/17/85 (HWT) Template file and other standard styles made.
+% 3/28/85 (OP) First release, version 0.98b for BibTeX 0.98f.
+% 5/ 9/85 (OP) Version 0.98c for BibTeX 0.98i:
+% fixed Theoretical Computer Science macro name;
+% fixed the format.vol.num.pages function.
+% 1/24/88 (OP) Version 0.99a for BibTeX 0.99a, main changes:
+% assignment operator (:=) arguments reversed;
+% the preamble$ function outputs the database PREAMBLE;
+% entry.max$ and global.max$ (built-in) variables replace
+% entry.string.max and global.string.max functions;
+% alphabetizing by year then title, not just title;
+% many unnecessary ties removed; \it ==> \em;
+% the `alpha' style uses a superscripted `+' instead of a
+% `*' for unnamed names in constructing the label;
+% the `abbrv' style now uses "Mar." and "Sept.";
+% the functions calc.label and presort now look at just
+% the fields they're supposed to;
+% BOOKLET, MASTERSTHESIS, TECHREPORT use nonbook titles;
+% INBOOK and INCOLLECTION take an optional type (e.g.
+% type = "Section"), overriding the default "chapter";
+% BOOK, INBOOK, INCOLLECTION, and PROCEEDINGS now allow
+% either volume or number, not just volume;
+% INCOLLECTION now allows an edition and series field;
+% PROCEEDINGS and INPROCEEDINGS now use the address field
+% to tell where a conference was held;
+% INPROCEEDINGS and PROCEEDINGS now allow either volume
+% or number, and also a series field;
+% MASTERSTHESIS and PHDTHESIS accept types other than
+% "Master's thesis" and "PhD thesis";
+% UNPUBLISHED now outputs, in one block, note then date;
+% MANUAL now prints out the organization in
+% the first block if the author field is empty;
+% MISC can't be empty---it requires some optional field.
+% 3/23/88 (OP) Version 0.99b for BibTeX 0.99c---changed the three
+% erroneous occurrences of `cite ' to `cite$ '; this
+% change didn't affect the four standard styles, so the
+% 0.99a versions of those styles are still current.
+%
+% The ENTRY declaration
+% Like Scribe's (according to pages 231-2 of the April '84 edition),
+% but no fullauthor or editors fields because BibTeX does name handling.
+% The annote field is commented out here because this family doesn't
+% include an annotated bibliography style. And in addition to the fields
+% listed here, BibTeX has a built-in crossref field, explained later.
+
+ENTRY
+% Fields:
+ { address
+% Usually the address of a publisher or other type of organization.
+% Put information in this field only if it helps the reader find the
+% thing---for example you should omit the address of a major
+% publisher entirely. For a PROCEEDINGS or an INPROCEEDINGS,
+% however, it's the address of the conference; for those two entry
+% types, include the publisher's or organization's address, if
+% necessary, in the publisher or organization field.
+% annote
+% Long annotation---for annotated bibliographies (begins sentence).
+ author
+% Name(s) of author(s), in BibTeX name format.
+ booktitle
+% Book title when the thing being referenced isn't the whole book.
+% For book entries, the title field should be used instead.
+ chapter
+% Chapter (or section or whatever) number.
+ edition
+% Edition of a book---should be an ordinal (e.g., "Second").
+ editor
+% Name(s) of editor(s), in BibTeX name format.
+% If there is also an author field, then the editor field should be
+% for the book or collection that the work appears in.
+ howpublished
+% How something strange has been published (begins sentence).
+ institution
+% Sponsoring institution of a technical report.
+ journal
+% Journal name (macros are provided for many).
+ key
+% Alphabetizing, labeling, and cross-referencing key
+% (needed when an entry has no author or editor).
+#if !NAMED_REFS
+ month
+#else NAMED_REFS
+% month not used in apalike
+#endif
+% Month (macros are provided).
+ note
+% To help the reader find a reference (begins sentence).
+ number
+% Number of a journal or technical report, or of a work in a series.
+ organization
+% Organization sponsoring a conference (or publishing a manual); if
+% the editor (or author) is empty, and if the organization produces
+% an awkward label or cross reference, you should put appropriately
+% condensed organization information in the key field as well.
+ pages
+% Page number or numbers (use `--' to separate a range, use `+'
+% to indicate pages following that don't form a simple range).
+ publisher
+% Publisher name.
+ school
+% School name (for theses).
+ series
+% The name of a series or set of books.
+% An individual book will will also have it's own title.
+ title
+% The title of the thing you're referred to.
+ type
+% Type of a Techreport (e.g., "Research Note") to be used instead of
+% the default "Technical Report"; or, similarly, the type of a
+% thesis; or of a part of a book.
+ volume
+% The volume number of a journal or multivolume work.
+ year
+% The year should contain only numerals (technically, it should end
+% with four numerals, after purification; doesn't a begin sentence).
+ }
+% There are no integer entry variables
+ {}
+% These string entry variables are used to form the citation label.
+% In a storage pinch, sort.label can be easily computed on the fly.
+#if LAB_ALPH
+#if SORTED
+ { label extra.label sort.label }
+#else !SORTED
+% It doesn't seem like a good idea to use an order-of-citation
+% reference list when using alphabetic labels, but when this happens
+% we do things a little differently
+ { label }
+#endif SORTED
+#else !LAB_ALPH
+ { label }
+#endif LAB_ALPH
+
+% Each entry function starts by calling output.bibitem, to write the
+% \bibitem and its arguments to the .BBL file. Then the various fields
+% are formatted and printed by output or output.check. Those functions
+% handle the writing of separators (commas, periods, \newblock's),
+% taking care not to do so when they are passed a null string.
+% Finally, fin.entry is called to add the final period and finish the
+% entry.
+%
+% A bibliographic reference is formatted into a number of `blocks':
+% in the open format, a block begins on a new line and subsequent
+% lines of the block are indented. A block may contain more than
+% one sentence (well, not a grammatical sentence, but something to
+% be ended with a sentence ending period). The entry functions should
+% call new.block whenever a block other than the first is about to be
+% started. They should call new.sentence whenever a new sentence is
+% to be started. The output functions will ensure that if two
+% new.sentence's occur without any non-null string being output between
+% them then there won't be two periods output. Similarly for two
+% successive new.block's.
+%
+% The output routines don't write their argument immediately.
+% Instead, by convention, that argument is saved on the stack to be
+% output next time (when we'll know what separator needs to come
+% after it). Meanwhile, the output routine has to pop the pending
+% output off the stack, append any needed separator, and write it.
+%
+% To tell which separator is needed, we maintain an output.state.
+% It will be one of these values:
+% before.all just after the \bibitem
+% mid.sentence in the middle of a sentence: comma needed
+% if more sentence is output
+% after.sentence just after a sentence: period needed
+% after.block just after a block (and sentence):
+% period and \newblock needed.
+% Note: These styles don't use after.sentence
+%
+% VAR: output.state : INTEGER -- state variable for output
+%
+% The output.nonnull function saves its argument (assumed to be nonnull)
+% on the stack, and writes the old saved value followed by any needed
+% separator. The ordering of the tests is decreasing frequency of
+% occurrence.
+%
+% output.nonnull(s) ==
+% BEGIN
+% s := argument on stack
+% if output.state = mid.sentence then
+% write$(pop() * ", ")
+% -- "pop" isn't a function: just use stack top
+% else
+% if output.state = after.block then
+% write$(add.period$(pop()))
+% newline$
+% write$("\newblock ")
+% else
+% if output.state = before.all then
+% write$(pop())
+% else -- output.state should be after.sentence
+% write$(add.period$(pop()) * " ")
+% fi
+% fi
+% output.state := mid.sentence
+% fi
+% push s on stack
+% END
+%
+% The output function calls output.nonnull if its argument is non-empty;
+% its argument may be a missing field (thus, not necessarily a string)
+%
+% output(s) ==
+% BEGIN
+% if not empty$(s) then output.nonnull(s)
+% fi
+% END
+%
+% The output.check function is the same as the output function except that, if
+% necessary, output.check warns the user that the t field shouldn't be empty
+% (this is because it probably won't be a good reference without the field;
+% the entry functions try to make the formatting look reasonable even when
+% such fields are empty).
+%
+% output.check(s,t) ==
+% BEGIN
+% if empty$(s) then
+% warning$("empty " * t * " in " * cite$)
+% else output.nonnull(s)
+% fi
+% END
+%
+% The output.bibitem function writes the \bibitem for the current entry
+% (the label should already have been set up), and sets up the separator
+% state for the output functions. And, it leaves a string on the stack
+% as per the output convention.
+%
+% output.bibitem ==
+% BEGIN
+% newline$
+% write$("\bibitem[") % for alphabetic labels,
+% write$(label) % these three lines
+% write$("]{") % are used
+% write$("\bibitem{") % this line for numeric labels
+% write$(cite$)
+% write$("}")
+% push "" on stack
+% output.state := before.all
+% END
+%
+% The fin.entry function finishes off an entry by adding a period to the
+% string remaining on the stack. If the state is still before.all
+% then nothing was produced for this entry, so the result will look bad,
+% but the user deserves it. (We don't omit the whole entry because the
+% entry was cited, and a bibitem is needed to define the citation label.)
+%
+% fin.entry ==
+% BEGIN
+% write$(add.period$(pop()))
+% newline$
+% END
+%
+% The new.block function prepares for a new block to be output, and
+% new.sentence prepares for a new sentence.
+%
+% new.block ==
+% BEGIN
+% if output.state <> before.all then
+% output.state := after.block
+% fi
+% END
+%
+% new.sentence ==
+% BEGIN
+% if output.state <> after.block then
+% if output.state <> before.all then
+% output.state := after.sentence
+% fi
+% fi
+% END
+%
+
+INTEGERS { output.state before.all mid.sentence after.sentence after.block }
+
+FUNCTION {init.state.consts}
+{ #0 'before.all :=
+ #1 'mid.sentence :=
+ #2 'after.sentence :=
+ #3 'after.block :=
+}
+
+% the variables s and t are temporary string holders
+
+STRINGS { s t }
+
+FUNCTION {output.nonnull}
+{ 's :=
+ output.state mid.sentence =
+ { ", " * write$ }
+ { output.state after.block =
+#if !COMMA_DELIMIT
+ { add.period$ write$
+#else COMMA_DELIMIT
+ { "," * write$
+#endif
+ newline$
+ "\newblock " write$
+ }
+ { output.state before.all =
+ 'write$
+ { add.period$ " " * write$ }
+ if$
+ }
+ if$
+ mid.sentence 'output.state :=
+ }
+ if$
+ s
+}
+
+FUNCTION {output}
+{ duplicate$ empty$
+ 'pop$
+ 'output.nonnull
+ if$
+}
+
+FUNCTION {output.check}
+{ 't :=
+ duplicate$ empty$
+ { pop$ "empty " t * " in " * cite$ * warning$ }
+ 'output.nonnull
+ if$
+}
+
+#if NAMED_REFS
+% apalike needs this function because
+% the year has special punctuation;
+% apalike ignores the month
+FUNCTION {output.year.check}
+{ year empty$
+ { "empty year in " cite$ * warning$ }
+ { write$
+ " (" year * extra.label * ")" *
+ mid.sentence 'output.state :=
+ }
+ if$
+}
+#endif NAMED_REFS
+
+FUNCTION {output.bibitem}
+{ newline$
+#if LAB_ALPH
+ "\bibitem[" write$
+ label write$
+ "]{" write$
+#else
+ "\bibitem{" write$
+#endif LAB_ALPH
+ cite$ write$
+ "}" write$
+ newline$
+ ""
+ before.all 'output.state :=
+}
+
+% This function finishes all entries.
+
+FUNCTION {fin.entry}
+{ add.period$
+ write$
+ newline$
+}
+
+FUNCTION {new.block}
+{ output.state before.all =
+ 'skip$
+ { after.block 'output.state := }
+ if$
+}
+
+FUNCTION {new.sentence}
+#if !COMMA_DELIMIT
+{ output.state after.block =
+ 'skip$
+ { output.state before.all =
+ 'skip$
+ { after.sentence 'output.state := }
+ if$
+ }
+ if$
+#else COMMA_DELIMIT
+{ skip$
+#endif
+}
+
+% These three functions pop one or two (integer) arguments from the stack
+% and push a single one, either 0 or 1.
+% The 'skip$ in the `and' and `or' functions are used because
+% the corresponding if$ would be idempotent
+
+FUNCTION {not}
+{ { #0 }
+ { #1 }
+ if$
+}
+
+FUNCTION {and}
+{ 'skip$
+ { pop$ #0 }
+ if$
+}
+
+FUNCTION {or}
+{ { pop$ #1 }
+ 'skip$
+ if$
+}
+
+% Sometimes we begin a new block only if the block will be big enough. The
+% new.block.checka function issues a new.block if its argument is nonempty;
+% new.block.checkb does the same if either of its TWO arguments is nonempty.
+
+#if !NAMED_REFS
+FUNCTION {new.block.checka}
+{ empty$
+ 'skip$
+ 'new.block
+ if$
+}
+#endif !NAMED_REFS
+
+FUNCTION {new.block.checkb}
+{ empty$
+ swap$ empty$
+ and
+ 'skip$
+ 'new.block
+ if$
+}
+
+#if !NAMED_REFS
+% The new.sentence.check functions are analogous.
+
+FUNCTION {new.sentence.checka}
+{ empty$
+ 'skip$
+ 'new.sentence
+ if$
+}
+
+FUNCTION {new.sentence.checkb}
+{ empty$
+ swap$ empty$
+ and
+ 'skip$
+ 'new.sentence
+ if$
+}
+#endif !NAMED_REFS
+
+% Here are some functions for formatting chunks of an entry.
+% By convention they either produce a string that can be followed by
+% a comma or period (using add.period$, so it is OK to end in a period),
+% or they produce the null string.
+%
+% A useful utility is the field.or.null function, which checks if the
+% argument is the result of pushing a `missing' field (one for which no
+% assignment was made when the current entry was read in from the database)
+% or the result of pushing a string having no non-white-space characters.
+% It returns the null string if so, otherwise it returns the field string.
+% Its main (but not only) purpose is to guarantee that what's left on the
+% stack is a string rather than a missing field.
+%
+% field.or.null(s) ==
+% BEGIN
+% if empty$(s) then return ""
+% else return s
+% END
+%
+% Another helper function is emphasize, which returns the argument emphazised,
+% if that is non-empty, otherwise it returns the null string. Italic
+% corrections aren't used, so this function should be used when punctation
+% will follow the result.
+%
+% emphasize(s) ==
+% BEGIN
+% if empty$(s) then return ""
+% else return "{\em " * s * "}"
+%
+% The format.names function formats the argument (which should be in
+% BibTeX name format) into "First Von Last, Junior", separated by commas
+% and with an "and" before the last (but ending with "et~al." if the last
+% of multiple authors is "others"). This function's argument should always
+% contain at least one name.
+%
+% VAR: nameptr, namesleft, numnames: INTEGER
+% pseudoVAR: nameresult: STRING (it's what's accumulated on the stack)
+%
+% format.names(s) ==
+% BEGIN
+% nameptr := 1
+% numnames := num.names$(s)
+% namesleft := numnames
+% while namesleft > 0
+% do
+% % for full names:
+% t := format.name$(s, nameptr, "{ff~}{vv~}{ll}{, jj}")
+% % for abbreviated first names:
+% t := format.name$(s, nameptr, "{f.~}{vv~}{ll}{, jj}")
+% if nameptr > 1 then
+% if namesleft > 1 then nameresult := nameresult * ", " * t
+% else if numnames > 2
+% then nameresult := nameresult * ","
+% fi
+% if t = "others"
+% then nameresult := nameresult * " et~al."
+% else nameresult := nameresult * " and " * t
+% fi
+% fi
+% else nameresult := t
+% fi
+% nameptr := nameptr + 1
+% namesleft := namesleft - 1
+% od
+% return nameresult
+% END
+%
+% The format.authors function returns the result of format.names(author)
+% if the author is present, or else it returns the null string
+%
+% format.authors ==
+% BEGIN
+% if empty$(author) then return ""
+% else return format.names(author)
+% fi
+% END
+%
+% Format.editors is like format.authors, but it uses the editor field,
+% and appends ", editor" or ", editors"
+%
+% format.editors ==
+% BEGIN
+% if empty$(editor) then return ""
+% else
+% if num.names$(editor) > 1 then
+% return format.names(editor) * ", editors"
+% else
+% return format.names(editor) * ", editor"
+% fi
+% fi
+% END
+%
+% Other formatting functions are similar, so no "comment version" will be
+% given for them.
+%
+% The `pop$' in this function gets rid of the duplicate `empty' value and
+% the `skip$' returns the duplicate field value
+
+FUNCTION {field.or.null}
+{ duplicate$ empty$
+ { pop$ "" }
+ 'skip$
+ if$
+}
+
+FUNCTION {emphasize}
+{ duplicate$ empty$
+ { pop$ "" }
+ { "{\em " swap$ * "}" * }
+ if$
+}
+
+#if CSC_NAMES
+FUNCTION {caps}
+{ duplicate$ empty$
+ { pop$ "" }
+ { "{\sc " swap$ * "}" * }
+ if$
+}
+#endif
+
+#if BOLD_VOL
+FUNCTION {embolden}
+{ duplicate$ empty$
+ { pop$ "" }
+ { "{\bf " swap$ * "}" * }
+ if$
+}
+#endif
+
+#if BRACKET_NOTE
+FUNCTION {bracket}
+{ duplicate$ empty$
+ { pop$ "" }
+ { "[" swap$ * "]" * }
+ if$
+}
+#endif
+
+#if PAREN_DATE
+FUNCTION {paren}
+{ duplicate$ empty$
+ { pop$ "" }
+ { "(" swap$ * ")" * }
+ if$
+}
+#endif
+
+INTEGERS { nameptr namesleft numnames }
+
+#if MAX_NAMES
+INTEGERS { etal }
+#endif
+
+FUNCTION {format.names}
+{ 's :=
+ #1 'nameptr :=
+ s num.names$ 'numnames :=
+#if !MAX_NAMES
+ numnames 'namesleft :=
+#else MAX_NAMES
+ numnames #MAX_NAMES >
+ s numnames "{ll}" format.name$ "others" = numnames #MIN_NAMES > and
+ or 'etal :=
+ etal
+ { #MIN_NAMES #1 + 'namesleft := }
+ { numnames 'namesleft := }
+ if$
+#endif
+ { namesleft #0 > }
+#if NAME_FULL
+#if !NAME_INVERT
+ { s nameptr "{ff~}{vv~}{ll}{, jj}" format.name$ 't :=
+#else NAME_INVERT
+ { s nameptr "{vv~}{ll}{, jj}{, ff}" format.name$ 't :=
+#endif
+#else
+#if !NAME_INVERT
+ { s nameptr "{f.~}{vv~}{ll}{, jj}" format.name$ 't :=
+#else NAME_INVERT
+ { s nameptr "{vv~}{ll}{, jj}{, f.}" format.name$ 't := % last name first
+#endif
+#endif NAME_FULL
+#if NAME_UPPER
+ t "others" =
+ 'skip$
+ { t "u" change.case$ 't := }
+ if$
+#endif
+#if CSC_NAMES
+ t "others" =
+ 'skip$
+ { t caps 't := }
+ if$
+#endif
+ nameptr #1 >
+ { namesleft #1 >
+ { ", " * t * }
+#if !MAX_NAMES
+ { numnames #2 >
+ { "," * }
+ 'skip$
+ if$
+ t "others" =
+#if !ETAL_EMPH
+ { " et~al." * }
+#else ETAL_EMPH
+ { " {\em et~al.}" * }
+#endif ETAL_EMPH
+ { " and " * t * }
+ if$
+ }
+#else MAX_NAMES
+ { nameptr #2 >
+ { "," * }
+ 'skip$
+ if$
+ t "others" =
+ etal or
+#if !ETAL_EMPH
+ { " et~al." * }
+#else ETAL_EMPH
+ { " {\em et~al.}" * }
+#endif ETAL_EMPH
+ { " and " * t * }
+ if$
+ }
+#endif
+ if$
+ }
+ 't
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+}
+
+FUNCTION {format.authors}
+{ author empty$
+ { "" }
+ { author format.names }
+ if$
+}
+
+#if NAMED_REFS
+FUNCTION {format.key} % this function is just for apalike
+{ empty$
+ { key field.or.null }
+ { "" }
+ if$
+}
+#endif NAMED_REFS
+
+FUNCTION {format.editors}
+{ editor empty$
+ { "" }
+ { editor format.names
+ editor num.names$ #1 >
+ { ", editors" * }
+ { ", editor" * }
+ if$
+ }
+ if$
+}
+
+#if EDIT_VAR
+FUNCTION {format.edited}
+{ editor empty$
+ { "" }
+ { "edited by " editor format.names * }
+ if$
+}
+#endif
+
+% The format.title function is used for non-book-like titles.
+% For most styles we convert to lowercase (except for the very first letter,
+% and except for the first one after a colon (followed by whitespace)),
+% and hope the user has brace-surrounded words that need to stay capitilized;
+% for some styles, however, we leave it as it is in the database.
+
+FUNCTION {format.title}
+{ title empty$
+ { "" }
+#if ATIT_LOWER
+ { title "t" change.case$ }
+#else
+ 'title
+#endif ATIT_LOWER
+ if$
+}
+
+% By default, BibTeX sets the global integer variable global.max$ to the BibTeX
+% constant glob_str_size, the maximum length of a global string variable.
+% Analogously, BibTeX sets the global integer variable entry.max$ to
+% ent_str_size, the maximum length of an entry string variable.
+% The style designer may change these if necessary (but this is unlikely)
+
+% The n.dashify function makes each single `-' in a string a double `--'
+% if it's not already
+%
+% pseudoVAR: pageresult: STRING (it's what's accumulated on the stack)
+%
+% n.dashify(s) ==
+% BEGIN
+% t := s
+% pageresult := ""
+% while (not empty$(t))
+% do
+% if (first character of t = "-")
+% then
+% if (next character isn't)
+% then
+% pageresult := pageresult * "--"
+% t := t with the "-" removed
+% else
+% while (first character of t = "-")
+% do
+% pageresult := pageresult * "-"
+% t := t with the "-" removed
+% od
+% fi
+% else
+% pageresult := pageresult * the first character
+% t := t with the first character removed
+% fi
+% od
+% return pageresult
+% END
+
+FUNCTION {n.dashify}
+{ 't :=
+ ""
+ { t empty$ not }
+ { t #1 #1 substring$ "-" =
+ { t #1 #2 substring$ "--" = not
+ { "--" *
+ t #2 global.max$ substring$ 't :=
+ }
+ { { t #1 #1 substring$ "-" = }
+ { "-" *
+ t #2 global.max$ substring$ 't :=
+ }
+ while$
+ }
+ if$
+ }
+ { t #1 #1 substring$ *
+ t #2 global.max$ substring$ 't :=
+ }
+ if$
+ }
+ while$
+}
+
+#define TEMP 0
+#if PAGE_START_J
+#define TEMP 1
+#endif
+#if PAGE_START_O
+#define TEMP 1
+#endif
+
+#if TEMP
+FUNCTION {first.page}
+{ 't :=
+ ""
+ { t empty$ not t #1 #1 substring$ "-" = not and }
+ { t #1 #1 substring$ *
+ t #2 global.max$ substring$ 't :=
+ }
+ while$
+}
+#endif
+
+#if !NAMED_REFS
+% The format.date function is for the month and year, but we give a warning if
+% there's an empty year but the month is there, and we return the empty string
+% if they're both empty.
+
+FUNCTION {format.date}
+{ year empty$
+#if !MONTH_SUPPRESS
+ { month empty$
+ { "" }
+ { "there's a month but no year in " cite$ * warning$
+ month
+ }
+ if$
+ }
+ { month empty$
+ 'year
+ { month " " * year * }
+ if$
+ }
+#else MONTH_SUPPRESS
+ { "" }
+ 'year
+#endif
+ if$
+}
+#endif !NAMED_REFS
+
+% The format.btitle is for formatting the title field when it is a book-like
+% entry---the style used here keeps it in uppers-and-lowers and emphasizes it.
+
+FUNCTION {format.btitle}
+{ title emphasize
+}
+
+% For several functions we'll need to connect two strings with a
+% tie (~) if the second one isn't very long (fewer than 3 characters).
+% The tie.or.space.connect function does that. It concatenates the two
+% strings on top of the stack, along with either a tie or space between
+% them, and puts this concatenation back onto the stack:
+%
+% tie.or.space.connect(str1,str2) ==
+% BEGIN
+% if text.length$(str2) < 3
+% then return the concatenation of str1, "~", and str2
+% else return the concatenation of str1, " ", and str2
+% END
+
+FUNCTION {tie.or.space.connect}
+{ duplicate$ text.length$ #3 <
+ { "~" }
+ { " " }
+ if$
+ swap$ * *
+}
+
+% The either.or.check function complains if both fields or an either-or pair
+% are nonempty.
+%
+% either.or.check(t,s) ==
+% BEGIN
+% if empty$(s) then
+% warning$(can't use both " * t * " fields in " * cite$)
+% fi
+% END
+
+FUNCTION {either.or.check}
+{ empty$
+ 'pop$
+ { "can't use both " swap$ * " fields in " * cite$ * warning$ }
+ if$
+}
+
+% The format.bvolume function is for formatting the volume and perhaps
+% series name of a multivolume work. If both a volume and a series field
+% are there, we assume the series field is the title of the whole multivolume
+% work (the title field should be the title of the thing being referred to),
+% and we add an "of <series>". This function is called in mid-sentence.
+
+FUNCTION {format.bvolume}
+{ volume empty$
+ { "" }
+ { "volume" volume tie.or.space.connect
+ series empty$
+ 'skip$
+ { " of " * series emphasize * }
+ if$
+ "volume and number" number either.or.check
+ }
+ if$
+}
+
+% The format.number.series function is for formatting the series name
+% and perhaps number of a work in a series. This function is similar to
+% format.bvolume, although for this one the series must exist (and the
+% volume must not exist). If the number field is empty we output either
+% the series field unchanged if it exists or else the null string.
+% If both the number and series fields are there we assume the series field
+% gives the name of the whole series (the title field should be the title
+% of the work being one referred to), and we add an "in <series>".
+% We capitilize Number when this function is used at the beginning of a block.
+
+FUNCTION {format.number.series}
+{ volume empty$
+ { number empty$
+ { series field.or.null }
+ { output.state mid.sentence =
+ { "number" }
+ { "Number" }
+ if$
+ number tie.or.space.connect
+ series empty$
+ { "there's a number but no series in " cite$ * warning$ }
+ { " in " * series * }
+ if$
+ }
+ if$
+ }
+ { "" }
+ if$
+}
+
+% The format.edition function appends " edition" to the edition, if present.
+% We lowercase the edition (it should be something like "Third"), because
+% this doesn't start a sentence.
+
+FUNCTION {format.edition}
+{ edition empty$
+ { "" }
+ { output.state mid.sentence =
+ { edition "l" change.case$ " edition" * }
+ { edition "t" change.case$ " edition" * }
+ if$
+ }
+ if$
+}
+
+% The format.pages function is used for formatting a page range in a book
+% (and in rare circumstances, an article).
+%
+% The multi.page.check function examines the page field for a "-" or "," or "+"
+% so that format.pages can use "page" instead of "pages" if none exists.
+% Note: global.max$ here means "take the rest of the string"
+%
+% VAR: multiresult: INTEGER (actually, a boolean)
+%
+% multi.page.check(s) ==
+% BEGIN
+% t := s
+% multiresult := false
+% while ((not multiresult) and (not empty$(t)))
+% do
+% if (first character of t = "-" or "," or "+")
+% then multiresult := true
+% else t := t with the first character removed
+% fi
+% od
+% return multiresult
+% END
+
+INTEGERS { multiresult }
+
+FUNCTION {multi.page.check}
+{ 't :=
+ #0 'multiresult :=
+ { multiresult not
+ t empty$ not
+ and
+ }
+ { t #1 #1 substring$
+ duplicate$ "-" =
+ swap$ duplicate$ "," =
+ swap$ "+" =
+ or or
+ { #1 'multiresult := }
+ { t #2 global.max$ substring$ 't := }
+ if$
+ }
+ while$
+ multiresult
+}
+
+% This function doesn't begin a sentence so "pages" isn't capitalized.
+% Other functions that use this should keep that in mind.
+
+FUNCTION {format.pages}
+{ pages empty$
+ { "" }
+ { pages multi.page.check
+#if !PAGE_ABBREV
+ { "pages" pages n.dashify tie.or.space.connect }
+ { "page" pages tie.or.space.connect }
+#else PAGE_ABBREV
+ { "pp." pages n.dashify tie.or.space.connect }
+ { "p." pages tie.or.space.connect }
+#endif
+ if$
+ }
+ if$
+}
+
+#if TEMP
+FUNCTION {format.pages.a}
+{ pages empty$
+ { "" }
+#if !PAGE_ABBREV
+ { "page" pages first.page tie.or.space.connect }
+#else PAGE_ABBREV
+ { "p." pages first.page tie.or.space.connect }
+#endif
+ if$
+}
+#endif
+
+% The format.vol.num.pages function is for the volume, number, and page range
+% of a journal article. We use the format: vol(number):pages, with some
+% variations for empty fields. This doesn't begin a sentence.
+
+FUNCTION {format.vol.num.pages}
+#if !BOLD_VOL
+{ volume field.or.null
+#else BOLD_VOL
+{ volume field.or.null embolden
+#endif
+#if VOLUME_SPACE
+ " " swap$ * *
+#endif
+#if !NUM_SUPPRESS
+ number empty$
+ 'skip$
+ { "(" number * ")" * *
+ volume empty$
+ { "there's a number but no volume in " cite$ * warning$ }
+ 'skip$
+ if$
+ }
+ if$
+#endif
+#if DATE_FIRST
+ format.date empty$
+ 'skip$
+ { duplicate$ empty$
+ { pop$ format.date paren }
+ { " " * format.date paren * }
+ if$
+ }
+ if$
+#endif
+ pages empty$
+ 'skip$
+ { duplicate$ empty$
+#if !PAGE_START_J
+ { pop$ format.pages }
+#else PAGE_START_J
+ { pop$ format.pages.a }
+#endif
+#if !PAGE_START_J
+#if !DATE_FIRST
+#if !VOLUME_SPACE
+ { ":" * pages n.dashify * }
+#else VOLUME_SPACE
+ { ", " * pages n.dashify * }
+#endif
+#else DATE_FIRST
+ { " " * pages n.dashify *}
+#endif
+#else PAGE_START_J
+#if !DATE_FIRST
+#if !VOLUME_SPACE
+ { ":" * pages first.page * }
+#else VOLUME_SPACE
+ { ", " * pages first.page * }
+#endif
+#else DATE_FIRST
+ { " " * pages first.page *}
+#endif
+#endif
+ if$
+ }
+ if$
+}
+
+
+% The format.chapter.pages, if the chapter is present, puts whatever is in the
+% type field (or else "chapter" if type is empty) in front of a chapter number.
+% It then appends the pages, if present. This doesn't begin a sentence.
+
+FUNCTION {format.chapter.pages}
+{ chapter empty$
+ 'format.pages
+ { type empty$
+ { "chapter" }
+ { type "l" change.case$ }
+ if$
+ chapter tie.or.space.connect
+ pages empty$
+ 'skip$
+ { ", " * format.pages * }
+ if$
+ }
+ if$
+}
+
+% The format.in.ed.booktitle function is used for starting out a sentence
+% that begins "In <booktitle>", putting an editor before the title if one
+% exists.
+
+FUNCTION {format.in.ed.booktitle}
+{ booktitle empty$
+ { "" }
+ { editor empty$
+#if !COMMA_DELIMIT
+ { "In " booktitle emphasize * }
+#if !EDIT_VAR
+ { "In " format.editors * ", " * booktitle emphasize * }
+#else EDIT_VAR
+ { "In " booktitle emphasize * ", " * format.edited * }
+#endif
+#else COMMA_DELIMIT
+ { "in " booktitle emphasize * }
+#if !EDIT_VAR
+ { "in " format.editors * ", " * booktitle emphasize * }
+#else EDIT_VAR
+ { "in " booktitle emphasize * ", " * format.edited * }
+#endif
+#endif
+ if$
+ }
+ if$
+}
+
+#if !NAMED_REFS
+% The function empty.misc.check complains if all six fields are empty, and
+% if there's been no sorting or alphabetic-label complaint.
+
+FUNCTION {empty.misc.check}
+{ author empty$ title empty$ howpublished empty$
+ month empty$ year empty$ note empty$
+ and and and and and
+#if SORTED
+ key empty$ not and
+#else !SORTED
+#if LAB_ALPH
+ key empty$ not and
+#endif LAB_ALPH
+#endif SORTED
+ { "all relevant fields are empty in " cite$ * warning$ }
+ 'skip$
+ if$
+}
+#endif
+
+% The function format.thesis.type returns either the (case-changed) type field,
+% if it is defined, or else the default string already on the stack
+% (like "Master's thesis" or "PhD thesis").
+
+FUNCTION {format.thesis.type}
+{ type empty$
+ 'skip$
+ { pop$
+ type "t" change.case$
+ }
+ if$
+}
+
+% The function format.tr.number makes a string starting with "Technical Report"
+% (or type, if that field is defined), followed by the number if there is one;
+% it returns the starting part (with a case change) even if there is no number.
+% This is used at the beginning of a sentence.
+
+FUNCTION {format.tr.number}
+{ type empty$
+ { "Technical Report" }
+ 'type
+ if$
+ number empty$
+ { "t" change.case$ }
+ { number tie.or.space.connect }
+ if$
+}
+
+% Now come the cross-referencing functions (these are invoked because
+% one entry in the database file(s) cross-references another, by giving
+% the other entry's database key in a `crossref' field). This feature
+% allows one or more titled things that are part of a larger titled
+% thing to cross-reference the larger thing. These styles allow for
+% five posibilities: (1) an ARTICLE may cross-reference an ARTICLE;
+% (2) a BOOK, (3) INBOOK, or (4) INCOLLECTION may cross-reference a BOOK;
+% or (5) an INPROCEEDINGS may cross-reference a PROCEEDINGS.
+% Each of these is explained in more detail later.
+%
+% An ARTICLE entry type may cross reference another ARTICLE (this is
+% intended for when an entire journal is devoted to a single topic---
+% but since there is no JOURNAL entry type, the journal, too, should be
+% classified as an ARTICLE but without the author and title fields).
+% This will result in two warning messages for the journal's entry
+% if it's included in the reference list, but such is life.
+%
+% format.article.crossref ==
+% BEGIN
+% if empty$(key) then
+% if empty$(journal) then
+% warning$("need key or journal for " * cite$ *
+% " to crossref " * crossref)
+% return(" \cite{" * crossref * "}")
+% else
+% return("In " * emphazise.correct (journal) *
+% " \cite{" * crossref * "}")
+% fi
+% else
+% return("In " * key * " \cite{" * crossref * "}")
+% fi
+% END
+%
+% The other cross-referencing functions are similar, so no "comment version"
+% will be given for them.
+
+#if !NAMED_REFS
+FUNCTION {format.article.crossref}
+{ key empty$
+ { journal empty$
+ { "need key or journal for " cite$ * " to crossref " * crossref *
+ warning$
+ ""
+ }
+#if !JOUR_DEEMPH
+ { "In {\em " journal * "\/}" * }
+#else JOUR_DEEMPH
+ { "In " journal * }
+#endif
+ if$
+ }
+ { "In " key * }
+ if$
+ " \cite{" * crossref * "}" *
+}
+#else NAMED_REFS
+FUNCTION {format.article.crossref}
+{ "In" % this is for apalike
+ " \cite{" * crossref * "}" *
+}
+#endif NAMED_REFS
+
+#if !NAMED_REFS
+% We use just the last names of editors for a cross reference: either
+% "editor", or "editor1 and editor2", or "editor1 et~al." depending on
+% whether there are one, or two, or more than two editors.
+
+FUNCTION {format.crossref.editor}
+#if !CSC_NAMES
+{ editor #1 "{vv~}{ll}" format.name$
+#else CSC_NAMES
+{ editor #1 "{vv~}{ll}" format.name$ caps
+#endif
+ editor num.names$ duplicate$
+ #2 >
+#if !ETAL_EMPH
+ { pop$ " et~al." * }
+#else ETAL_EMPH
+ { pop$ " {\em et~al.}" * }
+#endif ETAL_EMPH
+ { #2 <
+ 'skip$
+ { editor #2 "{ff }{vv }{ll}{ jj}" format.name$ "others" =
+#if !ETAL_EMPH
+ { " et~al." * }
+#else ETAL_EMPH
+ { " {\em et~al.}" * }
+#endif ETAL_EMPH
+#if !CSC_NAMES
+ { " and " * editor #2 "{vv~}{ll}" format.name$ * }
+#else CSC_NAMES
+ { " and " * editor #2 "{vv~}{ll}" format.name$ caps * }
+#endif
+ if$
+ }
+ if$
+ }
+ if$
+}
+#endif
+
+% A BOOK (or INBOOK) entry type (assumed to be for a single volume in a
+% multivolume work) may cross reference another BOOK (the entire multivolume).
+% Usually there will be an editor, in which case we use that to construct the
+% cross reference; otherwise we use a nonempty key field or else the series
+% field (since the series gives the title of the multivolume work).
+
+FUNCTION {format.book.crossref}
+{ volume empty$
+ { "empty volume in " cite$ * "'s crossref of " * crossref * warning$
+ "In "
+ }
+ { "Volume" volume tie.or.space.connect
+ " of " *
+ }
+ if$
+#if !NAMED_REFS
+ editor empty$
+ editor field.or.null author field.or.null =
+ or
+ { key empty$
+ { series empty$
+ { "need editor, key, or series for " cite$ * " to crossref " *
+ crossref * warning$
+ "" *
+ }
+ { "{\em " * series * "\/}" * }
+ if$
+ }
+ { key * }
+ if$
+ }
+ { format.crossref.editor * }
+ if$
+ " \cite{" * crossref * "}" *
+#else NAMED_REFS
+ "\cite{" * crossref * "}" * % this is for apalike
+#endif
+}
+
+% An INCOLLECTION entry type may cross reference a BOOK (assumed to be the
+% collection), or an INPROCEEDINGS may cross reference a PROCEEDINGS.
+% Often there will be an editor, in which case we use that to construct
+% the cross reference; otherwise we use a nonempty key field or else
+% the booktitle field (which gives the cross-referenced work's title).
+
+#if !NAMED_REFS
+FUNCTION {format.incoll.inproc.crossref}
+{ editor empty$
+ editor field.or.null author field.or.null =
+ or
+ { key empty$
+ { booktitle empty$
+ { "need editor, key, or booktitle for " cite$ * " to crossref " *
+ crossref * warning$
+ ""
+ }
+ { "In {\em " booktitle * "\/}" * }
+ if$
+ }
+ { "In " key * }
+ if$
+ }
+ { "In " format.crossref.editor * }
+ if$
+ " \cite{" * crossref * "}" *
+}
+#else NAMED_REFS
+FUNCTION {format.incoll.inproc.crossref}
+{ "In" % this is for apalike
+ " \cite{" * crossref * "}" *
+}
+#endif NAMED_REFS
+
+% Now we define the type functions for all entry types that may appear
+% in the .BIB file---e.g., functions like `article' and `book'. These
+% are the routines that actually generate the .BBL-file output for
+% the entry. These must all precede the READ command. In addition, the
+% style designer should have a function `default.type' for unknown types.
+% Note: The fields (within each list) are listed in order of appearance,
+% except as described for an `inbook' or a `proceedings'.
+%
+% The article function is for an article in a journal. An article may
+% CROSSREF another article.
+% Required fields: author, title, journal, year
+% Optional fields: volume, number, pages, month, note
+%
+% article ==
+% BEGIN
+% output.bibitem
+% output.check(format.authors,"author")
+% new.block
+% output.check(format.title,"title")
+% new.block
+% if missing$(crossref) then
+% output.check(emphasize(journal),"journal")
+% output(format.vol.num.pages)
+% output.check(format.date,"year")
+% else
+% output.nonnull(format.article.crossref)
+% output(format.pages)
+% fi
+% new.block
+% output(note)
+% fin.entry
+% END
+%
+% The book function is for a whole book. A book may CROSSREF another book.
+% Required fields: author or editor, title, publisher, year
+% Optional fields: volume or number, series, address, edition, month,
+% note
+%
+% book ==
+% BEGIN
+% if empty$(author) then output.check(format.editors,"author and editor")
+% else output.check(format.authors,"author")
+% if missing$(crossref) then
+% either.or.check("author and editor",editor)
+% fi
+% fi
+% new.block
+% output.check(format.btitle,"title")
+% if missing$(crossref) then
+% output(format.bvolume)
+% new.block
+% output(format.number.series)
+% new.sentence
+% output.check(publisher,"publisher")
+% output(address)
+% else
+% new.block
+% output.nonnull(format.book.crossref)
+% fi
+% output(format.edition)
+% output.check(format.date,"year")
+% new.block
+% output(note)
+% fin.entry
+% END
+%
+% The other entry functions are all quite similar, so no "comment version"
+% will be given for them.
+
+FUNCTION {article}
+{ output.bibitem
+ format.authors "author" output.check
+#if NAMED_REFS
+ author format.key output % special for
+ output.year.check % apalike
+#endif NAMED_REFS
+#if !ATIT_SUPPRESS
+ new.block
+ format.title "title" output.check
+#endif
+ new.block
+ crossref missing$
+#if !VOLUME_SPACE
+#if !JOUR_DEEMPH
+ { journal emphasize "journal" output.check
+#else JOUR_DEEMPH
+ { journal "journal" output.check
+#endif
+#else VOLUME_SPACE
+#if !JOUR_DEEMPH
+ { journal emphasize
+#else JOUR_DEEMPH
+ { journal field.or.null
+#endif
+#endif
+#if !NAMED_REFS
+#if !DATE_FIRST
+#if !PAREN_DATE
+ format.vol.num.pages output
+ format.date "year" output.check
+#else PAREN_DATE
+ format.vol.num.pages
+ format.date empty$
+ 'skip$
+ { duplicate$ empty$
+ { pop$ format.date paren }
+ { " " * format.date paren * }
+ if$
+ }
+ if$
+ output
+#endif
+#else DATE_FIRST
+ format.vol.num.pages output
+#endif DATE_FIRST
+#else NAMED_REFS
+ format.vol.num.pages output
+#endif NAMED_REFS
+ }
+ { format.article.crossref output.nonnull
+ format.pages output
+ }
+ if$
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {book}
+{ output.bibitem
+ author empty$
+#if !NAMED_REFS
+ { format.editors "author and editor" output.check }
+#else NAMED_REFS
+ { format.editors "author and editor" output.check
+ editor format.key output
+ }
+#endif NAMED_REFS
+ { format.authors output.nonnull
+ crossref missing$
+ { "author and editor" editor either.or.check }
+ 'skip$
+ if$
+ }
+ if$
+#if NAMED_REFS
+ output.year.check % special for apalike
+#endif
+ new.block
+ format.btitle "title" output.check
+ crossref missing$
+ { format.bvolume output
+ new.block
+ format.number.series output
+ new.sentence
+ publisher "publisher" output.check
+ address output
+ }
+ { new.block
+ format.book.crossref output.nonnull
+ }
+ if$
+ format.edition output
+#if !NAMED_REFS
+ format.date "year" output.check
+#endif
+ new.block
+ note output
+ fin.entry
+}
+
+% A booklet is a bound thing without a publisher or sponsoring institution.
+% Required: title
+% Optional: author, howpublished, address, month, year, note
+
+FUNCTION {booklet}
+{ output.bibitem
+ format.authors output
+#if !NAMED_REFS
+ new.block
+ format.title "title" output.check
+ howpublished address new.block.checkb
+ howpublished output
+ address output
+ format.date output
+#else NAMED_REFS
+ author format.key output % special for
+ output.year.check % apalike
+ new.block
+ format.title "title" output.check
+ new.block
+ howpublished output
+ address output
+#endif NAMED_REFS
+ new.block
+ note output
+ fin.entry
+}
+
+% For the conference entry type, see inproceedings.
+
+% An inbook is a piece of a book: either a chapter and/or a page range.
+% It may CROSSREF a book. If there's no volume field, the type field
+% will come before number and series.
+% Required: author or editor, title, chapter and/or pages, publisher,year
+% Optional: volume or number, series, type, address, edition, month, note
+
+FUNCTION {inbook}
+{ output.bibitem
+ author empty$
+#if !NAMED_REFS
+ { format.editors "author and editor" output.check }
+#else NAMED_REFS
+ { format.editors "author and editor" output.check
+ editor format.key output
+ }
+#endif
+ { format.authors output.nonnull
+ crossref missing$
+ { "author and editor" editor either.or.check }
+ 'skip$
+ if$
+ }
+ if$
+#if NAMED_REFS
+ output.year.check % special for apalike
+#endif
+ new.block
+ format.btitle "title" output.check
+ crossref missing$
+ { format.bvolume output
+ format.chapter.pages "chapter and pages" output.check
+ new.block
+ format.number.series output
+ new.sentence
+ publisher "publisher" output.check
+ address output
+ }
+ { format.chapter.pages "chapter and pages" output.check
+ new.block
+ format.book.crossref output.nonnull
+ }
+ if$
+ format.edition output
+#if !NAMED_REFS
+ format.date "year" output.check
+#endif
+ new.block
+ note output
+ fin.entry
+}
+
+% An incollection is like inbook, but where there is a separate title
+% for the referenced thing (and perhaps an editor for the whole).
+% An incollection may CROSSREF a book.
+% Required: author, title, booktitle, publisher, year
+% Optional: editor, volume or number, series, type, chapter, pages,
+% address, edition, month, note
+
+FUNCTION {incollection}
+{ output.bibitem
+ format.authors "author" output.check
+#if NAMED_REFS
+ author format.key output % special for
+ output.year.check % apalike
+#endif NAMED_REFS
+#if !ATIT_SUPPRESS
+ new.block
+ format.title "title" output.check
+#else
+#if !ALT_INCOLL
+ new.block
+ format.title "title" output.check
+#endif !ALT_INCOLL
+#endif !ATIT_SUPPRESS
+ new.block
+ crossref missing$
+ { format.in.ed.booktitle "booktitle" output.check
+#if !ALT_INCOLL
+ format.bvolume output
+ format.number.series output
+ format.chapter.pages output
+#endif !ALT_INCOLL
+ new.sentence
+ publisher "publisher" output.check
+ address output
+ format.edition output
+#if !NAMED_REFS
+ format.date "year" output.check
+#endif !NAMED_REFS
+#if ALT_INCOLL
+ format.bvolume output
+ format.number.series output
+ format.chapter.pages output
+#endif ALT_INCOLL
+ }
+ { format.incoll.inproc.crossref output.nonnull
+ format.chapter.pages output
+ }
+ if$
+ new.block
+ note output
+ fin.entry
+}
+
+% An inproceedings is an article in a conference proceedings, and it may
+% CROSSREF a proceedings. If there's no address field, the month (& year)
+% will appear just before note.
+% Required: author, title, booktitle, year
+% Optional: editor, volume or number, series, pages, address, month,
+% organization, publisher, note
+
+FUNCTION {inproceedings}
+{ output.bibitem
+ format.authors "author" output.check
+#if NAMED_REFS
+ author format.key output % special for
+ output.year.check % apalike
+#endif NAMED_REFS
+ new.block
+ format.title "title" output.check
+ new.block
+ crossref missing$
+ { format.in.ed.booktitle "booktitle" output.check
+ format.bvolume output
+ format.number.series output
+ format.pages output
+#if !NAMED_REFS
+ address empty$
+ { organization publisher new.sentence.checkb
+ organization output
+ publisher output
+ format.date "year" output.check
+ }
+ { address output.nonnull
+ format.date "year" output.check
+ new.sentence
+ organization output
+ publisher output
+ }
+ if$
+#else NAMED_REFS
+ address output % for apalike
+ new.sentence % there's no year
+ organization output % here so things
+ publisher output % are simpler
+#endif NAMED_REFS
+ }
+ { format.incoll.inproc.crossref output.nonnull
+ format.pages output
+ }
+ if$
+ new.block
+ note output
+ fin.entry
+}
+
+% The conference function is included for Scribe compatibility.
+
+FUNCTION {conference} { inproceedings }
+
+% A manual is technical documentation.
+% Required: title
+% Optional: author, organization, address, edition, month, year, note
+
+FUNCTION {manual}
+{ output.bibitem
+#if !NAMED_REFS
+ author empty$
+ { organization empty$
+ 'skip$
+ { organization output.nonnull
+ address output
+ }
+ if$
+ }
+ { format.authors output.nonnull }
+ if$
+ new.block
+ format.btitle "title" output.check
+ author empty$
+ { organization empty$
+ { address new.block.checka
+ address output
+ }
+ 'skip$
+ if$
+ }
+ { organization address new.block.checkb
+ organization output
+ address output
+ }
+ if$
+ format.edition output
+ format.date output
+#else NAMED_REFS
+ format.authors output
+ author format.key output % special for
+ output.year.check % apalike
+ new.block
+ format.btitle "title" output.check
+ organization address new.block.checkb
+ organization output
+ address output
+ format.edition output
+#endif NAMED_REFS
+ new.block
+ note output
+ fin.entry
+}
+
+% A mastersthesis is a Master's thesis.
+% Required: author, title, school, year
+% Optional: type, address, month, note
+
+FUNCTION {mastersthesis}
+{ output.bibitem
+ format.authors "author" output.check
+#if NAMED_REFS
+ author format.key output % special for
+ output.year.check % apalike
+#endif NAMED_REFS
+ new.block
+ format.title "title" output.check
+ new.block
+ "Master's thesis" format.thesis.type output.nonnull
+ school "school" output.check
+ address output
+#if !NAMED_REFS
+ format.date "year" output.check
+#endif !NAMED_REFS
+ new.block
+ note output
+ fin.entry
+}
+
+% A misc is something that doesn't fit elsewhere.
+% Required: at least one of the `optional' fields
+% Optional: author, title, howpublished, month, year, note
+
+FUNCTION {misc}
+{ output.bibitem
+ format.authors output
+#if !NAMED_REFS
+ title howpublished new.block.checkb
+ format.title output
+ howpublished new.block.checka
+ howpublished output
+ format.date output
+#else NAMED_REFS
+ author format.key output % special for
+ output.year.check % apalike
+ new.block
+ format.title output
+ new.block
+ howpublished output
+#endif NAMED_REFS
+ new.block
+ note output
+ fin.entry
+#if !NAMED_REFS
+ empty.misc.check
+#endif
+}
+
+% A phdthesis is like a mastersthesis.
+% Required: author, title, school, year
+% Optional: type, address, month, note
+
+FUNCTION {phdthesis}
+{ output.bibitem
+ format.authors "author" output.check
+#if NAMED_REFS
+ author format.key output % special for
+ output.year.check % apalike
+#endif NAMED_REFS
+ new.block
+ format.btitle "title" output.check
+ new.block
+ "PhD thesis" format.thesis.type output.nonnull
+ school "school" output.check
+ address output
+#if !NAMED_REFS
+ format.date "year" output.check
+#endif !NAMED_REFS
+ new.block
+ note output
+ fin.entry
+}
+
+% A proceedings is a conference proceedings.
+% If there is an organization but no editor field, the organization will
+% appear as the first optional field (we try to make the first block nonempty);
+% if there's no address field, the month (& year) will appear just before note.
+% Required: title, year
+% Optional: editor, volume or number, series, address, month,
+% organization, publisher, note
+
+FUNCTION {proceedings}
+{ output.bibitem
+#if !NAMED_REFS
+ editor empty$
+ { organization output }
+ { format.editors output.nonnull }
+ if$
+#else NAMED_REFS
+ format.editors output
+ editor format.key output % special for
+ output.year.check % apalike
+#endif NAMED_REFS
+ new.block
+ format.btitle "title" output.check
+ format.bvolume output
+ format.number.series output
+#if !NAMED_REFS
+ address empty$
+ { editor empty$
+ { publisher new.sentence.checka }
+ { organization publisher new.sentence.checkb
+ organization output
+ }
+ if$
+ publisher output
+ format.date "year" output.check
+ }
+ { address output.nonnull
+ format.date "year" output.check
+ new.sentence
+ editor empty$
+ 'skip$
+ { organization output }
+ if$
+ publisher output
+ }
+ if$
+#else NAMED_REFS
+ address output % for apalike
+ new.sentence % we always output
+ organization output % a nonempty organization
+ publisher output % here
+#endif NAMED_REFS
+ new.block
+ note output
+ fin.entry
+}
+
+% A techreport is a technical report.
+% Required: author, title, institution, year
+% Optional: type, number, address, month, note
+
+FUNCTION {techreport}
+{ output.bibitem
+ format.authors "author" output.check
+#if NAMED_REFS
+ author format.key output % special for
+ output.year.check % apalike
+#endif NAMED_REFS
+ new.block
+ format.title "title" output.check
+ new.block
+ format.tr.number output.nonnull
+ institution "institution" output.check
+ address output
+#if !NAMED_REFS
+ format.date "year" output.check
+#endif !NAMED_REFS
+ new.block
+ note output
+ fin.entry
+}
+
+% An unpublished is something that hasn't been published.
+% Required: author, title, note
+% Optional: month, year
+
+FUNCTION {unpublished}
+{ output.bibitem
+ format.authors "author" output.check
+#if NAMED_REFS
+ author format.key output % special for
+ output.year.check % apalike
+#endif NAMED_REFS
+ new.block
+ format.title "title" output.check
+ new.block
+ note "note" output.check
+#if !NAMED_REFS
+ format.date output
+#endif
+ fin.entry
+}
+
+% We use entry type `misc' for an unknown type; BibTeX gives a warning.
+
+FUNCTION {default.type} { misc }
+
+% Here are macros for common things that may vary from style to style.
+% Users are encouraged to use these macros.
+%
+% Months are either written out in full or abbreviated
+
+#if MONTH_FULL
+
+MACRO {jan} {"January"}
+
+MACRO {feb} {"February"}
+
+MACRO {mar} {"March"}
+
+MACRO {apr} {"April"}
+
+MACRO {may} {"May"}
+
+MACRO {jun} {"June"}
+
+MACRO {jul} {"July"}
+
+MACRO {aug} {"August"}
+
+MACRO {sep} {"September"}
+
+MACRO {oct} {"October"}
+
+MACRO {nov} {"November"}
+
+MACRO {dec} {"December"}
+
+#else !MONTH_FULL
+
+MACRO {jan} {"Jan."}
+
+MACRO {feb} {"Feb."}
+
+MACRO {mar} {"Mar."}
+
+MACRO {apr} {"Apr."}
+
+MACRO {may} {"May"}
+
+MACRO {jun} {"June"}
+
+MACRO {jul} {"July"}
+
+MACRO {aug} {"Aug."}
+
+MACRO {sep} {"Sept."}
+
+MACRO {oct} {"Oct."}
+
+MACRO {nov} {"Nov."}
+
+MACRO {dec} {"Dec."}
+
+#endif MONTH_FULL
+
+% Journals are either written out in full or abbreviated;
+% the abbreviations are like those found in ACM publications.
+%
+% To get a completely different set of abbreviations, it may be best to make
+% a separate .bib file with nothing but those abbreviations; users could then
+% include that file name as the first argument to the \bibliography command
+
+#if JOUR_FULL
+
+MACRO {acmcs} {"ACM Computing Surveys"}
+
+MACRO {acta} {"Acta Informatica"}
+
+MACRO {cacm} {"Communications of the ACM"}
+
+MACRO {ibmjrd} {"IBM Journal of Research and Development"}
+
+MACRO {ibmsj} {"IBM Systems Journal"}
+
+MACRO {ieeese} {"IEEE Transactions on Software Engineering"}
+
+MACRO {ieeetc} {"IEEE Transactions on Computers"}
+
+MACRO {ieeetcad}
+ {"IEEE Transactions on Computer-Aided Design of Integrated Circuits"}
+
+MACRO {ipl} {"Information Processing Letters"}
+
+MACRO {jacm} {"Journal of the ACM"}
+
+MACRO {jcss} {"Journal of Computer and System Sciences"}
+
+MACRO {scp} {"Science of Computer Programming"}
+
+MACRO {sicomp} {"SIAM Journal on Computing"}
+
+MACRO {tocs} {"ACM Transactions on Computer Systems"}
+
+MACRO {tods} {"ACM Transactions on Database Systems"}
+
+MACRO {tog} {"ACM Transactions on Graphics"}
+
+MACRO {toms} {"ACM Transactions on Mathematical Software"}
+
+MACRO {toois} {"ACM Transactions on Office Information Systems"}
+
+MACRO {toplas} {"ACM Transactions on Programming Languages and Systems"}
+
+MACRO {tcs} {"Theoretical Computer Science"}
+
+#else !JOUR_FULL
+
+MACRO {acmcs} {"ACM Comput. Surv."}
+
+MACRO {acta} {"Acta Inf."}
+
+MACRO {cacm} {"Commun. ACM"}
+
+MACRO {ibmjrd} {"IBM J. Res. Dev."}
+
+MACRO {ibmsj} {"IBM Syst.~J."}
+
+MACRO {ieeese} {"IEEE Trans. Softw. Eng."}
+
+MACRO {ieeetc} {"IEEE Trans. Comput."}
+
+MACRO {ieeetcad}
+ {"IEEE Trans. Comput.-Aided Design Integrated Circuits"}
+
+MACRO {ipl} {"Inf. Process. Lett."}
+
+MACRO {jacm} {"J.~ACM"}
+
+MACRO {jcss} {"J.~Comput. Syst. Sci."}
+
+MACRO {scp} {"Sci. Comput. Programming"}
+
+MACRO {sicomp} {"SIAM J. Comput."}
+
+MACRO {tocs} {"ACM Trans. Comput. Syst."}
+
+MACRO {tods} {"ACM Trans. Database Syst."}
+
+MACRO {tog} {"ACM Trans. Gr."}
+
+MACRO {toms} {"ACM Trans. Math. Softw."}
+
+MACRO {toois} {"ACM Trans. Office Inf. Syst."}
+
+MACRO {toplas} {"ACM Trans. Prog. Lang. Syst."}
+
+MACRO {tcs} {"Theoretical Comput. Sci."}
+
+#if PHYSICS_JOUR
+#include "physics-journal-abbrev.btx"
+#endif PHYSICS_JOUR
+
+#endif JOUR_FULL
+
+% Now we read in the .BIB entries.
+
+READ
+
+% The sortify function converts to lower case after purify$ing; it's
+% used in sorting and in computing alphabetic labels after sorting
+%
+% The chop.word(w,len,s) function returns either s or, if the first len
+% letters of s equals w (this comparison is done in the third line of the
+% function's definition), it returns that part of s after w.
+
+#if SORTED
+
+FUNCTION {sortify}
+{ purify$
+ "l" change.case$
+}
+
+INTEGERS { len }
+
+FUNCTION {chop.word}
+{ 's :=
+ 'len :=
+ s #1 len substring$ =
+ { s len #1 + global.max$ substring$ }
+ 's
+ if$
+}
+
+#else !SORTED
+#if LAB_ALPH
+
+% We need the chop.word stuff for the dubious unsorted-list-with-labels case.
+
+INTEGERS { len }
+
+FUNCTION {chop.word}
+{ 's :=
+ 'len :=
+ s #1 len substring$ =
+ { s len #1 + global.max$ substring$ }
+ 's
+ if$
+}
+
+#endif LAB_ALPH
+#endif SORTED
+
+% This long comment applies only to alphabetic labels
+%
+% The format.lab.names function makes a short label by using the initials of
+% the von and Last parts of the names (but if there are more than four names,
+% (i.e., people) it truncates after three and adds a superscripted "+";
+% it also adds such a "+" if the last of multiple authors is "others").
+% If there is only one name, and its von and Last parts combined have just
+% a single name-token ("Knuth" has a single token, "Brinch Hansen" has two),
+% we take the first three letters of the last name. The boolean
+% et.al.char.used tells whether we've used a superscripted "+", so that we
+% know whether to include a LaTeX macro for it.
+%
+% format.lab.names(s) ==
+% BEGIN
+% numnames := num.names$(s)
+% if numnames > 1 then
+% if numnames > 4 then
+% namesleft := 3
+% else
+% namesleft := numnames
+% nameptr := 1
+% nameresult := ""
+% while namesleft > 0
+% do
+% if (name_ptr = numnames) and
+% format.name$(s, nameptr, "{ff }{vv }{ll}{ jj}") = "others"
+% then nameresult := nameresult * "{\etalchar{+}}"
+% et.al.char.used := true
+% else nameresult := nameresult *
+% format.name$(s, nameptr, "{v{}}{l{}}")
+% nameptr := nameptr + 1
+% namesleft := namesleft - 1
+% od
+% if numnames > 4 then
+% nameresult := nameresult * "{\etalchar{+}}"
+% et.al.char.used := true
+% else
+% t := format.name$(s, 1, "{v{}}{l{}}")
+% if text.length$(t) < 2 then % there's just one name-token
+% nameresult := text.prefix$(format.name$(s,1,"{ll}"),3)
+% else
+% nameresult := t
+% fi
+% fi
+% return nameresult
+% END
+%
+% Exactly what fields we look at in constructing the primary part of the label
+% depends on the entry type; this selectivity (as opposed to, say, always
+% looking at author, then editor, then key) helps ensure that "ignored" fields,
+% as described in the LaTeX book, really are ignored. Note that MISC is part
+% of the deepest `else' clause in the nested part of calc.label; thus, any
+% unrecognized entry type in the database is handled correctly.
+%
+% There is one auxiliary function for each of the four different sequences of
+% fields we use. The first of these functions looks at the author field, and
+% then, if necessary, the key field. The other three functions, which might
+% look at two fields and the key field, are similar, except that the key field
+% takes precedence over the organization field (for labels---not for sorting).
+%
+% The calc.label function calculates the preliminary label of an entry, which
+% is formed by taking three letters of information from the author or editor or
+% key or organization field (depending on the entry type and on what's empty,
+% but ignoring a leading "The " in the organization), and appending the last
+% two characters (digits) of the year. It is an error if the appropriate fields
+% among author, editor, organization, and key are missing, and we use
+% the first three letters of the cite$ in desperation when this happens.
+% The resulting label has the year part, but not the name part, purify$ed
+% (purify$ing the year allows some sorting shenanigans by the user).
+%
+% This function also calculates the version of the label to be used in sorting.
+%
+% The final label may need a trailing 'a', 'b', etc., to distinguish it from
+% otherwise identical labels, but we can't calculated those "extra.label"s
+% until after sorting.
+%
+% calc.label ==
+% BEGIN
+% if type$ = "book" or "inbook" then
+% author.editor.key.label
+% else if type$ = "proceedings" then
+% editor.key.organization.label
+% else if type$ = "manual" then
+% author.key.organization.label
+% else
+% author.key.label
+% fi fi fi
+% label := label * substring$(purify$(field.or.null(year)), -1, 2)
+% % assuming we will also sort, we calculate a sort.label
+% sort.label := sortify(label), but use the last four, not two, digits
+% END
+
+#if LAB_ALPH
+
+#if !NAMED_REFS
+INTEGERS { et.al.char.used }
+
+FUNCTION {initialize.et.al.char.used}
+{ #0 'et.al.char.used :=
+}
+
+EXECUTE {initialize.et.al.char.used}
+#endif !NAMED_REFS
+
+#if !NAMED_REFS
+FUNCTION {format.lab.names}
+#if !RMP_LABELS
+{ 's :=
+ s num.names$ 'numnames :=
+ numnames #1 >
+ { numnames #4 >
+ { #3 'namesleft := }
+ { numnames 'namesleft := }
+ if$
+ #1 'nameptr :=
+ ""
+ { namesleft #0 > }
+ { nameptr numnames =
+ { s nameptr "{ff }{vv }{ll}{ jj}" format.name$ "others" =
+ { "{\etalchar{+}}" *
+ #1 'et.al.char.used :=
+ }
+ { s nameptr "{v{}}{l{}}" format.name$ * }
+ if$
+ }
+ { s nameptr "{v{}}{l{}}" format.name$ * }
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+ numnames #4 >
+ { "{\etalchar{+}}" *
+ #1 'et.al.char.used :=
+ }
+ 'skip$
+ if$
+ }
+ { s #1 "{v{}}{l{}}" format.name$
+ duplicate$ text.length$ #2 <
+ { pop$ s #1 "{ll}" format.name$ #3 text.prefix$ }
+ 'skip$
+ if$
+ }
+ if$
+}
+#else RMP_LABELS
+{ 's :=
+ s num.names$ 'numnames :=
+ numnames #1 >
+ { numnames #2 >
+#if !CSC_NAMES
+#if !ETAL_EMPH
+ { s #1 "{vv }{ll}" format.name$ " et~al." * }
+#else ETAL_EMPH
+ { s #1 "{vv }{ll}" format.name$ " {\em et~al.}" * }
+#endif ETAL_EMPH
+ { s #1 "{vv }{ll}" format.name$
+#else CSC_NAMES
+#if !ETAL_EMPH
+ { s #1 "{vv }{ll}" format.name$ caps " et~al." * }
+#else ETAL_EMPH
+ { s #1 "{vv }{ll}" format.name$ caps " {\em et~al.}" * }
+#endif ETAL_EMPH
+ { s #1 "{vv }{ll}" format.name$ caps
+#endif CSC_NAMES
+ s #2 "{ff }{vv }{ll}{ jj}" format.name$ "others" =
+#if !ETAL_EMPH
+ { " et~al." * }
+#else ETAL_EMPH
+ { " {\em et~al.}" * }
+#endif ETAL_EMPH
+#if !CSC_NAMES
+ { " and " * s #2 "{vv }{ll}" format.name$ * }
+#else CSC_NAMES
+ { " and " * s #2 "{vv }{ll}" format.name$ caps * }
+#endif CSC_NAMES
+ if$
+ }
+ if$
+ }
+#if !CSC_NAMES
+ { s #1 "{vv }{ll}" format.name$ }
+#else CSC_NAMES
+ { s #1 "{vv }{ll}" format.name$ caps }
+#endif
+ if$
+}
+#endif
+#else NAMED_REFS
+% There are three apalike cases: one person (Jones),
+% two (Jones and de~Bruijn), and more (Jones et~al.).
+% This function is much like format.crossref.editors.
+%
+FUNCTION {format.lab.names}
+{ 's :=
+#if !CSC_NAMES
+ s #1 "{vv~}{ll}" format.name$
+#else CSC_NAMES
+ s #1 "{vv~}{ll}" format.name$ caps
+#endif CSC_NAMES
+ s num.names$ duplicate$
+ #2 >
+#if !ETAL_EMPH
+ { pop$ " et~al." * }
+#else ETAL_EMPH
+ { pop$ " {\em et~al.}" * }
+#endif ETAL_EMPH
+ { #2 <
+ 'skip$
+ { s #2 "{ff }{vv }{ll}{ jj}" format.name$ "others" =
+#if !ETAL_EMPH
+ { " et~al." * }
+#else ETAL_EMPH
+ { " {\em et~al.}" * }
+#endif ETAL_EMPH
+#if !CSC_NAMES
+ { " and " * s #2 "{vv~}{ll}" format.name$ * }
+#else CSC_NAMES
+ { " and " * s #2 "{vv~}{ll}" format.name$ caps * }
+#endif
+ if$
+ }
+ if$
+ }
+ if$
+}
+#endif NAMED_REFS
+
+FUNCTION {author.key.label}
+{ author empty$
+ { key empty$
+#if SORTED
+ { cite$ #1 #3 substring$ }
+#else !SORTED % need warning here because we won't give it later
+ { "for label, need author or key in " cite$ * warning$
+ cite$ #1 #3 substring$
+ }
+#endif SORTED
+#if !NAMED_REFS
+ { key #3 text.prefix$ }
+#else NAMED_REFS
+ 'key % apalike uses the whole key
+#endif NAMED_REFS
+ if$
+ }
+ { author format.lab.names }
+ if$
+}
+
+FUNCTION {author.editor.key.label}
+{ author empty$
+ { editor empty$
+ { key empty$
+#if SORTED
+ { cite$ #1 #3 substring$ }
+#else !SORTED % need warning here because we won't give it later
+ { "for label, need author, editor, or key in " cite$ * warning$
+ cite$ #1 #3 substring$
+ }
+#endif SORTED
+#if !NAMED_REFS
+ { key #3 text.prefix$ }
+#else NAMED_REFS
+ 'key % apalike uses the whole key
+#endif NAMED_REFS
+ if$
+ }
+ { editor format.lab.names }
+ if$
+ }
+ { author format.lab.names }
+ if$
+}
+
+#if !NAMED_REFS
+FUNCTION {author.key.organization.label}
+{ author empty$
+ { key empty$
+ { organization empty$
+#if SORTED
+ { cite$ #1 #3 substring$ }
+#else !SORTED % need warning here because we won't give it later
+ { "for label, need author, key, or organization in " cite$ *
+ warning$
+ cite$ #1 #3 substring$
+ }
+#endif SORTED
+#if !RMP_LABELS
+ { "The " #4 organization chop.word #3 text.prefix$ }
+#else RMP_LABELS
+ { "The " #4 organization chop.word #9 text.prefix$ }
+#endif
+ if$
+ }
+ { key #3 text.prefix$ }
+ if$
+ }
+ { author format.lab.names }
+ if$
+}
+
+FUNCTION {editor.key.organization.label}
+{ editor empty$
+ { key empty$
+ { organization empty$
+#if SORTED
+ { cite$ #1 #3 substring$ }
+#else !SORTED % need warning here because we won't give it later
+ { "for label, need editor, key, or organization in " cite$ *
+ warning$
+ cite$ #1 #3 substring$
+ }
+#endif SORTED
+#if !RMP_LABELS
+ { "The " #4 organization chop.word #3 text.prefix$ }
+#else RMP_LABELS
+ { "The " #4 organization chop.word #9 text.prefix$ }
+#endif
+ if$
+ }
+ { key #3 text.prefix$ }
+ if$
+ }
+ { editor format.lab.names }
+ if$
+}
+#else NAMED_REFS
+FUNCTION {editor.key.label}
+{ editor empty$
+ { key empty$
+ { cite$ #1 #3 substring$ }
+ 'key % apalike uses the whole key, no organization
+ if$
+ }
+ { editor format.lab.names }
+ if$
+}
+#endif NAMED_REFS
+
+FUNCTION {calc.label}
+#if !KEY_CITE
+{ type$ "book" =
+ type$ "inbook" =
+ or
+ 'author.editor.key.label
+ { type$ "proceedings" =
+#if !NAMED_REFS
+ 'editor.key.organization.label
+ { type$ "manual" =
+ 'author.key.organization.label
+ 'author.key.label
+ if$
+ }
+#else NAMED_REFS
+ 'editor.key.label % apalike ignores organization
+ 'author.key.label % for labeling and sorting
+#endif NAMED_REFS
+ if$
+ }
+ if$
+#if !NAMED_REFS
+ duplicate$
+#if !RMP_LABELS
+ year field.or.null purify$ #-1 #2 substring$
+#else RMP_LABELS
+ " " * year field.or.null purify$ #-1 #4 substring$
+#endif
+ *
+ 'label :=
+ year field.or.null purify$ #-1 #4 substring$
+ *
+ sortify 'sort.label :=
+#else NAMED_REFS
+ ", " % these three lines are
+ * % for apalike, which
+ year field.or.null purify$ #-1 #4 substring$ % uses all four digits
+ *
+ 'label :=
+#endif NAMED_REFS
+}
+#else KEY_CITE
+{ cite$ 'label :=
+label sortify 'sort.label :=
+}
+#endif
+
+% It doesn't seem like a particularly good idea to use an order-of-citation
+% reference list when using alphabetic labels, but we need to have a
+% special pass to calculate labels when this happens.
+
+#if !SORTED
+
+ITERATE {calc.label}
+
+#endif !SORTED
+
+#endif LAB_ALPH
+
+% When sorting, we compute the sortkey by executing "presort" on each entry.
+% The presort key contains a number of "sortify"ed strings, concatenated
+% with multiple blanks between them. This makes things like "brinch per"
+% come before "brinch hansen per".
+%
+% The fields used here are: the sort.label for alphabetic labels (as set by
+% calc.label), followed by the author names (or editor names or organization
+% (with a leading "The " removed) or key field, depending on entry type and on
+% what's empty), followed by year, followed by the first bit of the title
+% (chopping off a leading "The ", "A ", or "An ").
+% Names are formatted: Von Last First Junior.
+% The names within a part will be separated by a single blank
+% (such as "brinch hansen"), two will separate the name parts themselves
+% (except the von and last), three will separate the names,
+% four will separate the names from year (and from label, if alphabetic),
+% and four will separate year from title.
+%
+% The sort.format.names function takes an argument that should be in
+% BibTeX name format, and returns a string containing " "-separated
+% names in the format described above. The function is almost the same
+% as format.names.
+
+#if SORTED
+
+FUNCTION {sort.format.names}
+{ 's :=
+ #1 'nameptr :=
+ ""
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ { nameptr #1 >
+ { " " * }
+ 'skip$
+#if NAME_FULL
+ if$
+ s nameptr "{vv{ } }{ll{ }}{ ff{ }}{ jj{ }}" format.name$ 't :=
+#else
+ if$ % apalike uses initials
+ s nameptr "{vv{ } }{ll{ }}{ f{ }}{ jj{ }}" format.name$ 't := % <= here
+#endif NAME_FULL
+ nameptr numnames = t "others" = and
+ { "et al" * }
+ { t sortify * }
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+}
+
+% The sort.format.title function returns the argument,
+% but first any leading "A "'s, "An "'s, or "The "'s are removed.
+% The chop.word function uses s, so we need another string variable, t
+
+FUNCTION {sort.format.title}
+{ 't :=
+ "A " #2
+ "An " #3
+ "The " #4 t chop.word
+ chop.word
+ chop.word
+ sortify
+ #1 global.max$ substring$
+}
+
+% The auxiliary functions here, for the presort function, are analogous to
+% the ones for calc.label; the same comments apply, except that the
+% organization field takes precedence here over the key field. For sorting
+% purposes, we still remove a leading "The " from the organization field.
+
+FUNCTION {author.sort}
+{ author empty$
+ { key empty$
+ { "to sort, need author or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { author sort.format.names }
+ if$
+}
+
+FUNCTION {author.editor.sort}
+{ author empty$
+ { editor empty$
+ { key empty$
+ { "to sort, need author, editor, or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { editor sort.format.names }
+ if$
+ }
+ { author sort.format.names }
+ if$
+}
+
+#if !NAMED_REFS
+FUNCTION {author.organization.sort}
+{ author empty$
+ { organization empty$
+ { key empty$
+ { "to sort, need author, organization, or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { "The " #4 organization chop.word sortify }
+ if$
+ }
+ { author sort.format.names }
+ if$
+}
+
+FUNCTION {editor.organization.sort}
+{ editor empty$
+ { organization empty$
+ { key empty$
+ { "to sort, need editor, organization, or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { "The " #4 organization chop.word sortify }
+ if$
+ }
+ { editor sort.format.names }
+ if$
+}
+#else NAMED_REFS
+FUNCTION {editor.sort}
+{ editor empty$
+ { key empty$
+ { "to sort, need editor or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { editor sort.format.names }
+ if$
+}
+#endif NAMED_REFS
+
+#if !NAMED_REFS
+% There is a limit, entry.max$, on the length of an entry string variable
+% (which is what its sort.key$ is), so we take at most that many characters
+% of the constructed key, and hope there aren't many references that match
+% to that many characters!
+
+FUNCTION {presort}
+#if LAB_ALPH
+{ calc.label
+ sort.label
+ " "
+ *
+ type$ "book" =
+#else !LAB_ALPH
+{ type$ "book" =
+#endif LAB_ALPH
+ type$ "inbook" =
+ or
+ 'author.editor.sort
+ { type$ "proceedings" =
+ 'editor.organization.sort
+ { type$ "manual" =
+ 'author.organization.sort
+ 'author.sort
+ if$
+ }
+ if$
+ }
+ if$
+#if LAB_ALPH
+ *
+#endif LAB_ALPH
+ " "
+ *
+ year field.or.null sortify
+ *
+ " "
+ *
+ title field.or.null
+ sort.format.title
+ *
+ #1 entry.max$ substring$
+ 'sort.key$ :=
+}
+#else NAMED_REFS
+% apalike uses two sorting passes; the first one sets the
+% labels so that the `a's, `b's, etc. can be computed;
+% the second pass puts the references in "correct" order.
+% The presort function is for the first pass. It computes
+% label, sort.label, and title, and then concatenates.
+FUNCTION {presort}
+{ calc.label
+ label sortify
+ " "
+ *
+ type$ "book" =
+ type$ "inbook" =
+ or
+ 'author.editor.sort
+ { type$ "proceedings" =
+ 'editor.sort
+ 'author.sort
+ if$
+ }
+ if$
+ #1 entry.max$ substring$ % for
+ 'sort.label := % apalike
+ sort.label % style
+ *
+ " "
+ *
+ title field.or.null
+ sort.format.title
+ *
+ #1 entry.max$ substring$
+ 'sort.key$ :=
+}
+#endif NAMED_REFS
+
+ITERATE {presort}
+
+% And now we can sort
+
+#if !NAMED_REFS
+SORT
+#else NAMED_REFS
+SORT % by label, sort.label, title---for final label calculation
+#endif
+
+#endif SORTED
+
+% This long comment applies only to alphabetic labels, when sorted
+%
+% Now comes the final computation for alphabetic labels, putting in the 'a's
+% and 'b's and so forth if required. This involves two passes: a forward
+% pass to put in the 'b's, 'c's and so on, and a backwards pass
+% to put in the 'a's (we don't want to put in 'a's unless we know there
+% are 'b's).
+% We have to keep track of the longest (in width$ terms) label, for use
+% by the "thebibliography" environment.
+%
+% VAR: longest.label, last.sort.label, next.extra: string
+% longest.label.width, last.extra.num: integer
+%
+% initialize.longest.label ==
+% BEGIN
+% longest.label := ""
+% last.sort.label := int.to.chr$(0)
+% next.extra := ""
+% longest.label.width := 0
+% last.extra.num := 0
+% END
+%
+% forward.pass ==
+% BEGIN
+% if last.sort.label = sort.label then
+% last.extra.num := last.extra.num + 1
+% extra.label := int.to.chr$(last.extra.num)
+% else
+% last.extra.num := chr.to.int$("a")
+% extra.label := ""
+% last.sort.label := sort.label
+% fi
+% END
+%
+% reverse.pass ==
+% BEGIN
+% if next.extra = "b" then
+% extra.label := "a"
+% fi
+% label := label * extra.label
+% if width$(label) > longest.label.width then
+% longest.label := label
+% longest.label.width := width$(label)
+% fi
+% next.extra := extra.label
+% END
+
+#if LAB_ALPH
+
+#if SORTED
+
+#if !NAMED_REFS
+STRINGS { longest.label last.sort.label next.extra }
+
+INTEGERS { longest.label.width last.extra.num }
+
+FUNCTION {initialize.longest.label}
+{ "" 'longest.label :=
+ #0 int.to.chr$ 'last.sort.label :=
+ "" 'next.extra :=
+ #0 'longest.label.width :=
+ #0 'last.extra.num :=
+}
+
+FUNCTION {forward.pass}
+{ last.sort.label sort.label =
+ { last.extra.num #1 + 'last.extra.num :=
+ last.extra.num int.to.chr$ 'extra.label :=
+ }
+ { "a" chr.to.int$ 'last.extra.num :=
+ "" 'extra.label :=
+ sort.label 'last.sort.label :=
+ }
+ if$
+}
+#else NAMED_REFS
+STRINGS { last.label next.extra } % apalike labels are only for the text;
+
+INTEGERS { last.extra.num } % there are none in the bibliography
+
+FUNCTION {initialize.extra.label.stuff} % and hence there is no `longest.label'
+{ #0 int.to.chr$ 'last.label :=
+ "" 'next.extra :=
+ #0 'last.extra.num :=
+}
+
+FUNCTION {forward.pass}
+{ last.label label =
+ { last.extra.num #1 + 'last.extra.num :=
+ last.extra.num int.to.chr$ 'extra.label :=
+ }
+ { "a" chr.to.int$ 'last.extra.num :=
+ "" 'extra.label :=
+ label 'last.label :=
+ }
+ if$
+}
+#endif NAMED_REFS
+
+FUNCTION {reverse.pass}
+{ next.extra "b" =
+ { "a" 'extra.label := }
+ 'skip$
+ if$
+ label extra.label * 'label :=
+#if !NAMED_REFS
+ label width$ longest.label.width >
+ { label 'longest.label :=
+ label width$ 'longest.label.width :=
+ }
+ 'skip$
+ if$
+#endif !NAMED_REFS
+ extra.label 'next.extra :=
+}
+
+#if !NAMED_REFS
+EXECUTE {initialize.longest.label}
+#else NAMED_REFS
+EXECUTE {initialize.extra.label.stuff}
+#endif NAMED_REFS
+
+ITERATE {forward.pass}
+
+REVERSE {reverse.pass}
+
+#if NAMED_REFS
+% Now that the label is right we sort for real,
+% on sort.label then year then title. This is
+% for the second sorting pass.
+FUNCTION {bib.sort.order}
+{ sort.label
+ " "
+ *
+ year field.or.null sortify
+ *
+ " "
+ *
+ title field.or.null
+ sort.format.title
+ *
+ #1 entry.max$ substring$
+ 'sort.key$ :=
+}
+
+ITERATE {bib.sort.order}
+
+SORT % by sort.label, year, title---giving final bibliography order
+#endif NAMED_REFS
+#else !SORTED
+
+% It still doesn't seem like a good idea to use an order-of-citation
+% reference list when using alphabetic labels, but when this happens we
+% must compute the longest label
+
+STRINGS { longest.label }
+
+INTEGERS { longest.label.width }
+
+FUNCTION {initialize.longest.label}
+{ "" 'longest.label :=
+ #0 'longest.label.width :=
+}
+
+FUNCTION {longest.label.pass}
+{ label width$ longest.label.width >
+ { label 'longest.label :=
+ label width$ 'longest.label.width :=
+ }
+ 'skip$
+ if$
+}
+
+EXECUTE {initialize.longest.label}
+
+ITERATE {longest.label.pass}
+
+#endif SORTED
+
+#else !LAB_ALPH
+
+% Now comes the computation for numeric labels.
+% We use either the sorted order or original order.
+% We still have to keep track of the longest (in width$ terms) label, for use
+% by the "thebibliography" environment.
+
+STRINGS { longest.label }
+
+INTEGERS { number.label longest.label.width }
+
+FUNCTION {initialize.longest.label}
+{ "" 'longest.label :=
+ #1 'number.label :=
+ #0 'longest.label.width :=
+}
+
+FUNCTION {longest.label.pass}
+{ number.label int.to.str$ 'label :=
+ number.label #1 + 'number.label :=
+ label width$ longest.label.width >
+ { label 'longest.label :=
+ label width$ 'longest.label.width :=
+ }
+ 'skip$
+ if$
+}
+
+EXECUTE {initialize.longest.label}
+
+ITERATE {longest.label.pass}
+
+#endif LAB_ALPH
+
+% Now we're ready to start writing the .BBL file.
+% We begin, if necessary, with a LaTeX macro for unnamed names in an alphabetic
+% label; next comes stuff from the `preamble' command in the database files.
+% Then we give an incantation containing the command
+% \begin{thebibliography}{...}
+% where the `...' is the longest label.
+%
+% We also call init.state.consts, for use by the output routines.
+
+FUNCTION {begin.bib}
+#if !NAMED_REFS
+#if LAB_ALPH
+{ et.al.char.used
+ { "\newcommand{\etalchar}[1]{$^{#1}$}" write$ newline$ }
+ 'skip$
+ if$
+ preamble$ empty$
+#else !LAB_ALPH
+{ preamble$ empty$
+#endif LAB_ALPH
+ 'skip$
+ { preamble$ write$ newline$ }
+ if$
+ "\begin{thebibliography}{" longest.label * "}" * write$ newline$
+}
+#else NAMED_REFS
+{ preamble$ empty$ % no \etalchar in apalike
+ 'skip$
+ { preamble$ write$ newline$ }
+ if$
+ "\begin{thebibliography}{}" write$ newline$ % no labels in apalike
+}
+#endif NAMED_REFS
+
+EXECUTE {begin.bib}
+
+EXECUTE {init.state.consts}
+
+% Now we produce the output for all the entries
+
+ITERATE {call.type$}
+
+% Finally, we finish up by writing the `\end{thebibliography}' command.
+
+FUNCTION {end.bib}
+{ newline$
+ "\end{thebibliography}" write$ newline$
+}
+
+EXECUTE {end.bib}
diff --git a/biblio/bibtex/contrib/phy-bstyles/physjabb.bib b/biblio/bibtex/contrib/phy-bstyles/physjabb.bib
new file mode 100644
index 0000000000..876c4ea4a9
--- /dev/null
+++ b/biblio/bibtex/contrib/phy-bstyles/physjabb.bib
@@ -0,0 +1,66 @@
+IMPORTANT!! Don't make changes to this file without making the
+ corresponding changes to
+ physjabb.btx
+ physjful.btx
+ physjful.bib
+
+@STRING{advp="Adv. Phys."}
+@STRING{ajp="Am. J. Phys."}
+@STRING{ao="Appl. Opt."}
+@STRING{ap="Ann. Phys."}
+@STRING{apj="Astrophys. J."}
+@STRING{apl="Appl. Phys. Lett."}
+@STRING{baps="Bull. Am. Phys. Soc."}
+@STRING{cpc="Computer Phys. Comm."}
+@STRING{cppcf="Comments Plasma Phys. Controlled Fusion"}
+@STRING{el="Europhys. Lett."}
+@STRING{fed="Fusion Eng. Design"}
+@STRING{ft="Fusion Tech."}
+@STRING{ieeens="IEEE Trans. Nucl. Sci."}
+@STRING{ieeeps="IEEE Trans. Plasma Sci."}
+@STRING{ijimw="Int. J. Infrared Millimeter Waves"}
+@STRING{ip="Infrared Phys."}
+@STRING{jap="J. Appl. Phys."}
+@STRING{jchp="J. Chem. Phys."}
+@STRING{jcop="J. Comput. Phys."}
+@STRING{jcp="J. Comput. Phys."}
+@STRING{jetp="Sov. Phys.-JETP"}
+@STRING{jfe="J. Fusion Energy"}
+@STRING{jfm="J. Fluid Mech."}
+@STRING{jgr="J. Geophys. Res."}
+@STRING{jmp="J. Math. Phys."}
+@STRING{jne="J. Nucl. Energy"}
+@STRING{jnec="J. Nucl. Energy, Part~C"}
+@STRING{jnm="J. Nucl. Mater."}
+@STRING{josa="J. Opt. Soc. Am."}
+@STRING{jpa="J. Phys.~A: Math. Gen."}
+@STRING{jpp="J. Plasma Phys."}
+@STRING{jpsj="J. Phys. Soc. Jpn"}
+@STRING{jsp="J. Stat. Phys."}
+@STRING{jvst="J. Vac. Sci. Technol."}
+@STRING{nedf="Nucl. Eng. Design/Fusion"}
+@STRING{nf="Nucl. Fusion"}
+@STRING{nim="Nucl. Instrum. Methods"}
+@STRING{nimpr="Nucl. Instrum. Methods Phys. Research"}
+@STRING{nt/f="Nucl. Tech./Fusion"}
+@STRING{phy="Physica"}
+@STRING{phya="Physica~A"}
+@STRING{phyd="Physica~D"}
+@STRING{pf="Phys. Fluids"}
+@STRING{pfa="Phys. Fluids~A"}
+@STRING{pfb="Phys. Fluids~B"}
+@STRING{pl="Phys. Lett."}
+@STRING{pla="Phys. Lett.~A"}
+@STRING{pnas="Proc. Nat. Acad. Sci. USA"}
+@STRING{pp="Plasma Phys."}
+@STRING{ppcf="Plasma Phys. Controlled Fusion"}
+@STRING{pr="Phys. Rev."}
+@STRING{pra="Phys. Rev.~A"}
+@STRING{prl="Phys. Rev. Lett."}
+@STRING{ps="Physica Scripta"}
+@STRING{rmp="Rev. Mod. Phys."}
+@STRING{rsi="Rev. Sci. Instrum."}
+@STRING{sjpp="Sov. J. Plasma Phys."}
+@STRING{spd="Sov. Phys.-Dokl."}
+@STRING{sptp="Sov. Phys.-Tech. Phys."}
+@STRING{spu="Sov. Phys.-Usp."}
diff --git a/biblio/bibtex/contrib/phy-bstyles/physjabb.btx b/biblio/bibtex/contrib/phy-bstyles/physjabb.btx
new file mode 100644
index 0000000000..1b898eca5c
--- /dev/null
+++ b/biblio/bibtex/contrib/phy-bstyles/physjabb.btx
@@ -0,0 +1,71 @@
+% Journal Title Abbreviations from the Physical Review Style and Notation
+% Guide, July, 1983, in BAPS Vol. 28.
+% Selected by Cris Barnes and Charles Karney, March 1988
+% Extended by Hans-Hermann Bode, June 1992
+
+% IMPORTANT!! Don't make changes to this file without making the
+% corresponding changes to
+% physjful.btx
+% physjabb.bib
+% physjful.bib
+
+MACRO {advp} {"Adv. Phys."}
+MACRO {ajp} {"Am. J. Phys."}
+MACRO {ao} {"Appl. Opt."}
+MACRO {ap} {"Ann. Phys."}
+MACRO {apj} {"Astrophys. J."}
+MACRO {apl} {"Appl. Phys. Lett."}
+MACRO {baps} {"Bull. Am. Phys. Soc."}
+MACRO {cpc} {"Computer Phys. Comm."}
+MACRO {cppcf} {"Comments Plasma Phys. Controlled Fusion"}
+MACRO {el} {"Europhys. Lett."}
+MACRO {fed} {"Fusion Eng. Design"}
+MACRO {ft} {"Fusion Tech."}
+MACRO {ieeens} {"IEEE Trans. Nucl. Sci."}
+MACRO {ieeeps} {"IEEE Trans. Plasma Sci."}
+MACRO {ijimw} {"Int. J. Infrared Millimeter Waves"}
+MACRO {ip} {"Infrared Phys."}
+MACRO {jap} {"J. Appl. Phys."}
+MACRO {jchp} {"J. Chem. Phys."}
+MACRO {jcop} {"J. Comput. Phys."}
+MACRO {jcp} {"J. Comput. Phys."}
+MACRO {jetp} {"Sov. Phys.-JETP"}
+MACRO {jfe} {"J. Fusion Energy"}
+MACRO {jfm} {"J. Fluid Mech."}
+MACRO {jgr} {"J. Geophys. Res."}
+MACRO {jmp} {"J. Math. Phys."}
+MACRO {jne} {"J. Nucl. Energy"}
+MACRO {jnec} {"J. Nucl. Energy, Part~C"}
+MACRO {jnm} {"J. Nucl. Mater."}
+MACRO {josa} {"J. Opt. Soc. Am."}
+MACRO {jpa} {"J. Phys.~A: Math. Gen."}
+MACRO {jpp} {"J. Plasma Phys."}
+MACRO {jpsj} {"J. Phys. Soc. Jpn"}
+MACRO {jsp} {"J. Stat. Phys."}
+MACRO {jvst} {"J. Vac. Sci. Technol."}
+MACRO {nedf} {"Nucl. Eng. Design/Fusion"}
+MACRO {nf} {"Nucl. Fusion"}
+MACRO {nim} {"Nucl. Instrum. Methods"}
+MACRO {nimpr} {"Nucl. Instrum. Methods Phys. Research"}
+MACRO {nt/f} {"Nucl. Tech./Fusion"}
+MACRO {phy} {"Physica"}
+MACRO {phya} {"Physica~A"}
+MACRO {phyd} {"Physica~D"}
+MACRO {pf} {"Phys. Fluids"}
+MACRO {pfa} {"Phys. Fluids~A"}
+MACRO {pfb} {"Phys. Fluids~B"}
+MACRO {pl} {"Phys. Lett."}
+MACRO {pla} {"Phys. Lett.~A"}
+MACRO {pnas} {"Proc. Nat. Acad. Sci. USA"}
+MACRO {pp} {"Plasma Phys."}
+MACRO {ppcf} {"Plasma Phys. Controlled Fusion"}
+MACRO {pr} {"Phys. Rev."}
+MACRO {pra} {"Phys. Rev.~A"}
+MACRO {prl} {"Phys. Rev. Lett."}
+MACRO {ps} {"Physica Scripta"}
+MACRO {rmp} {"Rev. Mod. Phys."}
+MACRO {rsi} {"Rev. Sci. Instrum."}
+MACRO {sjpp} {"Sov. J. Plasma Phys."}
+MACRO {spd} {"Sov. Phys.-Dokl."}
+MACRO {sptp} {"Sov. Phys.-Tech. Phys."}
+MACRO {spu} {"Sov. Phys.-Usp."}
diff --git a/biblio/bibtex/contrib/phy-bstyles/physjful.bib b/biblio/bibtex/contrib/phy-bstyles/physjful.bib
new file mode 100644
index 0000000000..aa43714c5e
--- /dev/null
+++ b/biblio/bibtex/contrib/phy-bstyles/physjful.bib
@@ -0,0 +1,67 @@
+IMPORTANT!! Don't make changes to this file without making the
+ corresponding changes to
+ physjabb.btx
+ physjful.btx
+ physjabb.bib
+
+@STRING{advp="Advances in Physics"}
+@STRING{ajp="American Journal of Physics"}
+@STRING{ao="Applied Optics"}
+@STRING{ap="Annals of Physics"}
+@STRING{apj="Astrophysical Journal"}
+@STRING{apl="Applied Physics Letters"}
+@STRING{baps="Bulletin of the American Physical Society"}
+@STRING{cpc="Computer Physics Communications"}
+@STRING{cppcf="Comments on Plasma Physics and Controlled Fusion"}
+@STRING{el="Europhysics Letters"}
+@STRING{fed="Fusion Engineering and Design"}
+@STRING{ft="Fusion Technology"}
+@STRING{ieeens="IEEE Transactions on Nuclear Science"}
+@STRING{ieeeps="IEEE Transactions on Plasma Science"}
+@STRING{ijimw="International Journal of Infrared and Millimeter Waves"}
+@STRING{ip="Infrared Physics"}
+@STRING{jap="Journal of Applied Physics"}
+@STRING{jchp="The Journal of Chemical Physics"}
+@STRING{jcop="Journal of Computational Physics"}
+@STRING{jcp="Journal of Computational Physics"}
+@STRING{jetp="Soviet Physics-JETP"}
+@STRING{jfe="Journal of Fusion Energy"}
+@STRING{jfm="Journal of Fluid Mechanics"}
+@STRING{jgr="Journal of Geophysical Research"}
+@STRING{jmp="Journal of Mathematical Physics"}
+@STRING{jne="Journal of Nuclear Energy"}
+@STRING{jnec="Journal of Nuclear Energy, Part~C:
+ Plasma Physics, Accelerators, Thermonuclear Research"}
+@STRING{jnm="Journal of Nuclear Materials"}
+@STRING{josa="Journal of the Optical Society of America"}
+@STRING{jpa="Journal of Physics~A: Mathematical and General"}
+@STRING{jpp="Journal of Plasma Physics"}
+@STRING{jpsj="Journal of the Physical Society of Japan"}
+@STRING{jsp="Journal of Statistical Physics"}
+@STRING{jvst="Journal of Vacuum Science and Technology"}
+@STRING{nedf="Nuclear Engineering and Design/Fusion"}
+@STRING{nf="Nuclear Fusion"}
+@STRING{nim="Nuclear Instruments and Methods"}
+@STRING{nimpr="Nuclear Instruments and Methods in Physics Research"}
+@STRING{nt/f="Nuclear Technology/Fusion"}
+@STRING{phy="Physica"}
+@STRING{phya="Physica~A"}
+@STRING{phyd="Physica~D"}
+@STRING{pf="Physics of Fluids"}
+@STRING{pfa="Physics of Fluids~A: Fluid Dynamics"}
+@STRING{pfb="Physics of Fluids~B: Plasma Physics"}
+@STRING{pl="Physics Letters"}
+@STRING{pla="Physics Letters~A"}
+@STRING{pnas="Proceedings of the National Academy of Sciences of the USA"}
+@STRING{pp="Plasma Physics"}
+@STRING{ppcf="Plasma Physics and Controlled Fusion"}
+@STRING{pr="Physical Review"}
+@STRING{pra="Physical Review~A: General Physics"}
+@STRING{prl="Physical Review Letters"}
+@STRING{ps="Physica Scripta"}
+@STRING{rmp="Reviews of Modern Physics"}
+@STRING{rsi="Review of Scientific Instruments"}
+@STRING{sjpp="Soviet Journal of Plasma Phys."}
+@STRING{spd="Soviet Physics-Doklady"}
+@STRING{sptp="Soviet Physics-Technical Physics"}
+@STRING{spu="Soviet Physics-Uspeki"}
diff --git a/biblio/bibtex/contrib/phy-bstyles/physjful.btx b/biblio/bibtex/contrib/phy-bstyles/physjful.btx
new file mode 100644
index 0000000000..9e691a8ed3
--- /dev/null
+++ b/biblio/bibtex/contrib/phy-bstyles/physjful.btx
@@ -0,0 +1,73 @@
+% Journal Title Abbreviations from the Physical Review Style and Notation
+% Guide, July, 1983, in BAPS Vol. 28.
+% Selected by Cris Barnes and Charles Karney, March 1988
+% Extended by Hans-Hermann Bode, June 1992
+
+% IMPORTANT!! Don't make changes to this file without making the
+% corresponding changes to
+% physjabb.btx
+% physjabb.bib
+% physjful.bib
+
+MACRO {advp} {"Advances in Physics"}
+MACRO {ajp} {"American Journal of Physics"}
+MACRO {ao} {"Applied Optics"}
+MACRO {ap} {"Annals of Physics"}
+MACRO {apj} {"Astrophysical Journal"}
+MACRO {apl} {"Applied Physics Letters"}
+MACRO {baps} {"Bulletin of the American Physical Society"}
+MACRO {cpc} {"Computer Physics Communications"}
+MACRO {cppcf} {"Comments on Plasma Physics and Controlled Fusion"}
+MACRO {el} {"Europhysics Letters"}
+MACRO {fed} {"Fusion Engineering and Design"}
+MACRO {ft} {"Fusion Technology"}
+MACRO {ieeens} {"IEEE Transactions on Nuclear Science"}
+MACRO {ieeeps} {"IEEE Transactions on Plasma Science"}
+MACRO {ijimw} {"International Journal of Infrared and Millimeter Waves"}
+MACRO {ip} {"Infrared Physics"}
+MACRO {jap} {"Journal of Applied Physics"}
+MACRO {jchp} {"The Journal of Chemical Physics"}
+MACRO {jcop} {"Journal of Computational Physics"}
+MACRO {jcp} {"Journal of Computational Physics"}
+MACRO {jetp} {"Soviet Physics-JETP"}
+MACRO {jfe} {"Journal of Fusion Energy"}
+MACRO {jfm} {"Journal of Fluid Mechanics"}
+MACRO {jgr} {"Journal of Geophysical Research"}
+MACRO {jmp} {"Journal of Mathematical Physics"}
+MACRO {jne} {"Journal of Nuclear Energy"}
+MACRO {jnec}
+{"Journal of Nuclear Energy, Part~C: Plasma Physics, Accelerators,
+Thermonuclear Research"}
+MACRO {jnm} {"Journal of Nuclear Materials"}
+MACRO {josa} {"Journal of the Optical Society of America"}
+MACRO {jpa} {"Journal of Physics~A: Mathematical and General"}
+MACRO {jpp} {"Journal of Plasma Physics"}
+MACRO {jpsj} {"Journal of the Physical Society of Japan"}
+MACRO {jsp} {"Journal of Statistical Physics"}
+MACRO {jvst} {"Journal of Vacuum Science and Technology"}
+MACRO {nedf} {"Nuclear Engineering and Design/Fusion"}
+MACRO {nf} {"Nuclear Fusion"}
+MACRO {nim} {"Nuclear Instruments and Methods"}
+MACRO {nimpr} {"Nuclear Instruments and Methods in Physics Research"}
+MACRO {nt/f} {"Nuclear Technology/Fusion"}
+MACRO {phy} {"Physica"}
+MACRO {phya} {"Physica~A"}
+MACRO {phyd} {"Physica~D"}
+MACRO {pf} {"Physics of Fluids"}
+MACRO {pfa} {"Physics of Fluids~A: Fluid Dynamics"}
+MACRO {pfb} {"Physics of Fluids~B: Plasma Physics"}
+MACRO {pl} {"Physics Letters"}
+MACRO {pla} {"Physics Letters~A"}
+MACRO {pnas} {"Proceedings of the National Academy of Sciences of the USA"}
+MACRO {pp} {"Plasma Physics"}
+MACRO {ppcf} {"Plasma Physics and Controlled Fusion"}
+MACRO {pr} {"Physical Review"}
+MACRO {pra} {"Physical Review~A: General Physics"}
+MACRO {prl} {"Physical Review Letters"}
+MACRO {ps} {"Physica Scripta"}
+MACRO {rmp} {"Reviews of Modern Physics"}
+MACRO {rsi} {"Review of Scientific Instruments"}
+MACRO {sjpp} {"Soviet Journal of Plasma Phys."}
+MACRO {spd} {"Soviet Physics-Doklady"}
+MACRO {sptp} {"Soviet Physics-Technical Physics"}
+MACRO {spu} {"Soviet Physics-Uspeki"}
diff --git a/biblio/bibtex/contrib/phy-bstyles/ppcf.bst b/biblio/bibtex/contrib/phy-bstyles/ppcf.bst
new file mode 100644
index 0000000000..d129fbf303
--- /dev/null
+++ b/biblio/bibtex/contrib/phy-bstyles/ppcf.bst
@@ -0,0 +1,1123 @@
+%% #define PPCF 1 % Thu Jun 14 13:27:54 1990
+%% #include "TEX$ROOT:[BIBTEX]PHYSICS.BTX"
+ % Please notify Charles Karney (Karney@Princeton.EDU)
+ % of any bugs, improvements, etc.
+
+ % A physics version of APALIKE
+
+ % version 0.99b for BibTeX versions 0.99a or later, LaTeX version 2.09.
+ % Copyright (C) 1985, all rights reserved.
+ % Copying of this file is authorized only if either
+ % (1) you make absolutely no changes to your copy, including name, or
+ % (2) if you do make changes, you name it something other than
+ % btxbst.doc, plain.bst, unsrt.bst, alpha.bst, and abbrv.bst.
+ % This restriction helps ensure that all standard styles are identical.
+ % The file btxbst.doc has the documentation for this style.
+
+ENTRY
+ { address
+ author
+ booktitle
+ chapter
+ edition
+ editor
+ howpublished
+ institution
+ journal
+ key
+ note
+ number
+ organization
+ pages
+ publisher
+ school
+ series
+ title
+ type
+ volume
+ year
+ }
+ {}
+ { label extra.label sort.label }
+
+INTEGERS { output.state before.all mid.sentence after.sentence after.block }
+
+FUNCTION {init.state.consts}
+{ #0 'before.all :=
+ #1 'mid.sentence :=
+ #2 'after.sentence :=
+ #3 'after.block :=
+}
+
+STRINGS { s t }
+
+FUNCTION {output.nonnull}
+{ 's :=
+ output.state mid.sentence =
+ { ", " * write$ }
+ { output.state after.block =
+ { add.period$ write$
+ newline$
+ "\newblock " write$
+ }
+ { output.state before.all =
+ 'write$
+ { add.period$ " " * write$ }
+ if$
+ }
+ if$
+ mid.sentence 'output.state :=
+ }
+ if$
+ s
+}
+
+FUNCTION {output}
+{ duplicate$ empty$
+ 'pop$
+ 'output.nonnull
+ if$
+}
+
+FUNCTION {output.check}
+{ 't :=
+ duplicate$ empty$
+ { pop$ "empty " t * " in " * cite$ * warning$ }
+ 'output.nonnull
+ if$
+}
+
+FUNCTION {output.year.check}
+{ year empty$
+ { "empty year in " cite$ * warning$ }
+ { write$
+ " (" year * extra.label * ")" *
+ mid.sentence 'output.state :=
+ }
+ if$
+}
+
+FUNCTION {output.bibitem}
+{ newline$
+ "\bibitem[" write$
+ label write$
+ "]{" write$
+ cite$ write$
+ "}" write$
+ newline$
+ ""
+ before.all 'output.state :=
+}
+
+FUNCTION {fin.entry}
+{ add.period$
+ write$
+ newline$
+}
+
+FUNCTION {new.block}
+{ output.state before.all =
+ 'skip$
+ { after.block 'output.state := }
+ if$
+}
+
+FUNCTION {new.sentence}
+{ output.state after.block =
+ 'skip$
+ { output.state before.all =
+ 'skip$
+ { after.sentence 'output.state := }
+ if$
+ }
+ if$
+}
+
+FUNCTION {not}
+{ { #0 }
+ { #1 }
+ if$
+}
+
+FUNCTION {and}
+{ 'skip$
+ { pop$ #0 }
+ if$
+}
+
+FUNCTION {or}
+{ { pop$ #1 }
+ 'skip$
+ if$
+}
+
+FUNCTION {new.block.checkb}
+{ empty$
+ swap$ empty$
+ and
+ 'skip$
+ 'new.block
+ if$
+}
+
+FUNCTION {field.or.null}
+{ duplicate$ empty$
+ { pop$ "" }
+ 'skip$
+ if$
+}
+
+FUNCTION {emphasize}
+{ duplicate$ empty$
+ { pop$ "" }
+ { "{\em " swap$ * "}" * }
+ if$
+}
+
+FUNCTION {caps}
+{ duplicate$ empty$
+ { pop$ "" }
+ { "{\sc " swap$ * "}" * }
+ if$
+}
+
+FUNCTION {embolden}
+{ duplicate$ empty$
+ { pop$ "" }
+ { "{\bf " swap$ * "}" * }
+ if$
+}
+
+INTEGERS { nameptr namesleft numnames }
+
+FUNCTION {format.names}
+{ 's :=
+ #1 'nameptr :=
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ { s nameptr "{vv~}{ll}{, jj}{, f.}" format.name$ 't := % last name first
+ t "others" =
+ 'skip$
+ { t caps 't := }
+ if$
+ nameptr #1 >
+ { namesleft #1 >
+ { ", " * t * }
+ { numnames #2 >
+ { "," * }
+ 'skip$
+ if$
+ t "others" =
+ { " {\em et~al.}" * }
+ { " and " * t * }
+ if$
+ }
+ if$
+ }
+ 't
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+}
+
+FUNCTION {format.authors}
+{ author empty$
+ { "" }
+ { author format.names }
+ if$
+}
+
+FUNCTION {format.key} % this function is just for apalike
+{ empty$
+ { key field.or.null }
+ { "" }
+ if$
+}
+
+FUNCTION {format.editors}
+{ editor empty$
+ { "" }
+ { editor format.names
+ editor num.names$ #1 >
+ { ", editors" * }
+ { ", editor" * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.title}
+{ title empty$
+ { "" }
+ 'title
+ if$
+}
+
+FUNCTION {n.dashify}
+{ 't :=
+ ""
+ { t empty$ not }
+ { t #1 #1 substring$ "-" =
+ { t #1 #2 substring$ "--" = not
+ { "--" *
+ t #2 global.max$ substring$ 't :=
+ }
+ { { t #1 #1 substring$ "-" = }
+ { "-" *
+ t #2 global.max$ substring$ 't :=
+ }
+ while$
+ }
+ if$
+ }
+ { t #1 #1 substring$ *
+ t #2 global.max$ substring$ 't :=
+ }
+ if$
+ }
+ while$
+}
+
+FUNCTION {format.btitle}
+{ title emphasize
+}
+
+FUNCTION {tie.or.space.connect}
+{ duplicate$ text.length$ #3 <
+ { "~" }
+ { " " }
+ if$
+ swap$ * *
+}
+
+FUNCTION {either.or.check}
+{ empty$
+ 'pop$
+ { "can't use both " swap$ * " fields in " * cite$ * warning$ }
+ if$
+}
+
+FUNCTION {format.bvolume}
+{ volume empty$
+ { "" }
+ { "volume" volume tie.or.space.connect
+ series empty$
+ 'skip$
+ { " of " * series emphasize * }
+ if$
+ "volume and number" number either.or.check
+ }
+ if$
+}
+
+FUNCTION {format.number.series}
+{ volume empty$
+ { number empty$
+ { series field.or.null }
+ { output.state mid.sentence =
+ { "number" }
+ { "Number" }
+ if$
+ number tie.or.space.connect
+ series empty$
+ { "there's a number but no series in " cite$ * warning$ }
+ { " in " * series * }
+ if$
+ }
+ if$
+ }
+ { "" }
+ if$
+}
+
+FUNCTION {format.edition}
+{ edition empty$
+ { "" }
+ { output.state mid.sentence =
+ { edition "l" change.case$ " edition" * }
+ { edition "t" change.case$ " edition" * }
+ if$
+ }
+ if$
+}
+
+INTEGERS { multiresult }
+
+FUNCTION {multi.page.check}
+{ 't :=
+ #0 'multiresult :=
+ { multiresult not
+ t empty$ not
+ and
+ }
+ { t #1 #1 substring$
+ duplicate$ "-" =
+ swap$ duplicate$ "," =
+ swap$ "+" =
+ or or
+ { #1 'multiresult := }
+ { t #2 global.max$ substring$ 't := }
+ if$
+ }
+ while$
+ multiresult
+}
+
+FUNCTION {format.pages}
+{ pages empty$
+ { "" }
+ { pages multi.page.check
+ { "pages" pages n.dashify tie.or.space.connect }
+ { "page" pages tie.or.space.connect }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.vol.num.pages}
+{ volume field.or.null embolden
+ " " swap$ * *
+ pages empty$
+ 'skip$
+ { duplicate$ empty$
+ { pop$ format.pages }
+ { ", " * pages n.dashify * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.chapter.pages}
+{ chapter empty$
+ 'format.pages
+ { type empty$
+ { "chapter" }
+ { type "l" change.case$ }
+ if$
+ chapter tie.or.space.connect
+ pages empty$
+ 'skip$
+ { ", " * format.pages * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.in.ed.booktitle}
+{ booktitle empty$
+ { "" }
+ { editor empty$
+ { "In " booktitle emphasize * }
+ { "In " format.editors * ", " * booktitle emphasize * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.thesis.type}
+{ type empty$
+ 'skip$
+ { pop$
+ type "t" change.case$
+ }
+ if$
+}
+
+FUNCTION {format.tr.number}
+{ type empty$
+ { "Technical Report" }
+ 'type
+ if$
+ number empty$
+ { "t" change.case$ }
+ { number tie.or.space.connect }
+ if$
+}
+
+FUNCTION {format.article.crossref}
+{ "In" % this is for apalike
+ " \cite{" * crossref * "}" *
+}
+
+FUNCTION {format.book.crossref}
+{ volume empty$
+ { "empty volume in " cite$ * "'s crossref of " * crossref * warning$
+ "In "
+ }
+ { "Volume" volume tie.or.space.connect
+ " of " *
+ }
+ if$
+ "\cite{" * crossref * "}" * % this is for apalike
+}
+
+FUNCTION {format.incoll.inproc.crossref}
+{ "In" % this is for apalike
+ " \cite{" * crossref * "}" *
+}
+
+FUNCTION {article}
+{ output.bibitem
+ format.authors "author" output.check
+ author format.key output % special for
+ output.year.check % apalike
+ new.block
+ crossref missing$
+ { journal emphasize
+ format.vol.num.pages output
+ }
+ { format.article.crossref output.nonnull
+ format.pages output
+ }
+ if$
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {book}
+{ output.bibitem
+ author empty$
+ { format.editors "author and editor" output.check
+ editor format.key output
+ }
+ { format.authors output.nonnull
+ crossref missing$
+ { "author and editor" editor either.or.check }
+ 'skip$
+ if$
+ }
+ if$
+ output.year.check % special for apalike
+ new.block
+ format.btitle "title" output.check
+ crossref missing$
+ { format.bvolume output
+ new.block
+ format.number.series output
+ new.sentence
+ publisher "publisher" output.check
+ address output
+ }
+ { new.block
+ format.book.crossref output.nonnull
+ }
+ if$
+ format.edition output
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {booklet}
+{ output.bibitem
+ format.authors output
+ author format.key output % special for
+ output.year.check % apalike
+ new.block
+ format.title "title" output.check
+ new.block
+ howpublished output
+ address output
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {inbook}
+{ output.bibitem
+ author empty$
+ { format.editors "author and editor" output.check
+ editor format.key output
+ }
+ { format.authors output.nonnull
+ crossref missing$
+ { "author and editor" editor either.or.check }
+ 'skip$
+ if$
+ }
+ if$
+ output.year.check % special for apalike
+ new.block
+ format.btitle "title" output.check
+ crossref missing$
+ { format.bvolume output
+ format.chapter.pages "chapter and pages" output.check
+ new.block
+ format.number.series output
+ new.sentence
+ publisher "publisher" output.check
+ address output
+ }
+ { format.chapter.pages "chapter and pages" output.check
+ new.block
+ format.book.crossref output.nonnull
+ }
+ if$
+ format.edition output
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {incollection}
+{ output.bibitem
+ format.authors "author" output.check
+ author format.key output % special for
+ output.year.check % apalike
+ new.block
+ format.title "title" output.check
+ new.block
+ crossref missing$
+ { format.in.ed.booktitle "booktitle" output.check
+ format.bvolume output
+ format.number.series output
+ format.chapter.pages output
+ new.sentence
+ publisher "publisher" output.check
+ address output
+ format.edition output
+ }
+ { format.incoll.inproc.crossref output.nonnull
+ format.chapter.pages output
+ }
+ if$
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {inproceedings}
+{ output.bibitem
+ format.authors "author" output.check
+ author format.key output % special for
+ output.year.check % apalike
+ new.block
+ format.title "title" output.check
+ new.block
+ crossref missing$
+ { format.in.ed.booktitle "booktitle" output.check
+ format.bvolume output
+ format.number.series output
+ format.pages output
+ address output % for apalike
+ new.sentence % there's no year
+ organization output % here so things
+ publisher output % are simpler
+ }
+ { format.incoll.inproc.crossref output.nonnull
+ format.pages output
+ }
+ if$
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {conference} { inproceedings }
+
+FUNCTION {manual}
+{ output.bibitem
+ format.authors output
+ author format.key output % special for
+ output.year.check % apalike
+ new.block
+ format.btitle "title" output.check
+ organization address new.block.checkb
+ organization output
+ address output
+ format.edition output
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {mastersthesis}
+{ output.bibitem
+ format.authors "author" output.check
+ author format.key output % special for
+ output.year.check % apalike
+ new.block
+ format.title "title" output.check
+ new.block
+ "Master's thesis" format.thesis.type output.nonnull
+ school "school" output.check
+ address output
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {misc}
+{ output.bibitem
+ format.authors output
+ author format.key output % special for
+ output.year.check % apalike
+ new.block
+ format.title output
+ new.block
+ howpublished output
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {phdthesis}
+{ output.bibitem
+ format.authors "author" output.check
+ author format.key output % special for
+ output.year.check % apalike
+ new.block
+ format.btitle "title" output.check
+ new.block
+ "PhD thesis" format.thesis.type output.nonnull
+ school "school" output.check
+ address output
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {proceedings}
+{ output.bibitem
+ format.editors output
+ editor format.key output % special for
+ output.year.check % apalike
+ new.block
+ format.btitle "title" output.check
+ format.bvolume output
+ format.number.series output
+ address output % for apalike
+ new.sentence % we always output
+ organization output % a nonempty organization
+ publisher output % here
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {techreport}
+{ output.bibitem
+ format.authors "author" output.check
+ author format.key output % special for
+ output.year.check % apalike
+ new.block
+ format.title "title" output.check
+ new.block
+ format.tr.number output.nonnull
+ institution "institution" output.check
+ address output
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {unpublished}
+{ output.bibitem
+ format.authors "author" output.check
+ author format.key output % special for
+ output.year.check % apalike
+ new.block
+ format.title "title" output.check
+ new.block
+ note "note" output.check
+ fin.entry
+}
+
+FUNCTION {default.type} { misc }
+
+MACRO {jan} {"January"}
+
+MACRO {feb} {"February"}
+
+MACRO {mar} {"March"}
+
+MACRO {apr} {"April"}
+
+MACRO {may} {"May"}
+
+MACRO {jun} {"June"}
+
+MACRO {jul} {"July"}
+
+MACRO {aug} {"August"}
+
+MACRO {sep} {"September"}
+
+MACRO {oct} {"October"}
+
+MACRO {nov} {"November"}
+
+MACRO {dec} {"December"}
+
+MACRO {acmcs} {"ACM Comput. Surv."}
+
+MACRO {acta} {"Acta Inf."}
+
+MACRO {cacm} {"Commun. ACM"}
+
+MACRO {ibmjrd} {"IBM J. Res. Dev."}
+
+MACRO {ibmsj} {"IBM Syst.~J."}
+
+MACRO {ieeese} {"IEEE Trans. Softw. Eng."}
+
+MACRO {ieeetc} {"IEEE Trans. Comput."}
+
+MACRO {ieeetcad}
+ {"IEEE Trans. Comput.-Aided Design Integrated Circuits"}
+
+MACRO {ipl} {"Inf. Process. Lett."}
+
+MACRO {jacm} {"J.~ACM"}
+
+MACRO {jcss} {"J.~Comput. Syst. Sci."}
+
+MACRO {scp} {"Sci. Comput. Programming"}
+
+MACRO {sicomp} {"SIAM J. Comput."}
+
+MACRO {tocs} {"ACM Trans. Comput. Syst."}
+
+MACRO {tods} {"ACM Trans. Database Syst."}
+
+MACRO {tog} {"ACM Trans. Gr."}
+
+MACRO {toms} {"ACM Trans. Math. Softw."}
+
+MACRO {toois} {"ACM Trans. Office Inf. Syst."}
+
+MACRO {toplas} {"ACM Trans. Prog. Lang. Syst."}
+
+MACRO {tcs} {"Theoretical Comput. Sci."}
+
+MACRO {advp} {"Adv. Phys."}
+MACRO {ajp} {"Am. J. Phys."}
+MACRO {ao} {"Appl. Opt."}
+MACRO {apl} {"Appl. Phys. Lett."}
+MACRO {apj} {"Astrophys. J."}
+MACRO {baps} {"Bull. Am. Phys. Soc."}
+MACRO {cpc} {"Computer Phys. Comm."}
+MACRO {cppcf} {"Comments Plasma Phys. Controlled Fusion"}
+MACRO {fed} {"Fusion Eng. Design"}
+MACRO {ft} {"Fusion Tech."}
+MACRO {ieeens} {"IEEE Trans. Nucl. Sci."}
+MACRO {ieeeps} {"IEEE Trans. Plasma Sci."}
+MACRO {ijimw} {"Int. J. Infrared Millimeter Waves"}
+MACRO {ip} {"Infrared Phys."}
+MACRO {jap} {"J. Appl. Phys."}
+MACRO {jcp} {"J. Comput. Phys."}
+MACRO {jetp} {"Sov. Phys.-JETP"}
+MACRO {jfe} {"J. Fusion Energy"}
+MACRO {jfm} {"J. Fluid Mech."}
+MACRO {jgr} {"J. Geophys. Res."}
+MACRO {jmp} {"J. Math. Phys."}
+MACRO {jne} {"J. Nucl. Energy"}
+MACRO {jnec} {"J. Nucl. Energy, Part C"}
+MACRO {jnm} {"J. Nucl. Mater."}
+MACRO {josa} {"J. Opt. Soc. Am."}
+MACRO {jpp} {"J. Plasma Phys."}
+MACRO {jpsj} {"J. Phys. Soc. Jpn"}
+MACRO {jvst} {"J. Vac. Sci. Technol."}
+MACRO {nedf} {"Nucl. Eng. Design/Fusion"}
+MACRO {nf} {"Nucl. Fusion"}
+MACRO {nim} {"Nucl. Instrum. Methods"}
+MACRO {nimpr} {"Nucl. Instrum. Methods Phys. Research"}
+MACRO {nt/f} {"Nucl. Tech./Fusion"}
+MACRO {pf} {"Phys. Fluids"}
+MACRO {pfa} {"Phys. Fluids A"}
+MACRO {pfb} {"Phys. Fluids B"}
+MACRO {pl} {"Phys. Lett."}
+MACRO {pla} {"Phys. Lett. A"}
+MACRO {pnas} {"Proc. Nat. Acad. Sci. USA"}
+MACRO {pp} {"Plasma Phys."}
+MACRO {ppcf} {"Plasma Phys. Controlled Fusion"}
+MACRO {prl} {"Phys. Rev. Lett."}
+MACRO {pr} {"Phys. Rev."}
+MACRO {pra} {"Phys. Rev. A"}
+MACRO {ps} {"Physica Scripta"}
+MACRO {rmp} {"Rev. Mod. Phys."}
+MACRO {rsi} {"Rev. Sci. Instrum."}
+MACRO {sjpp} {"Sov. J. Plasma Phys."}
+MACRO {spd} {"Sov. Phys.-Dokl."}
+MACRO {sptp} {"Sov. Phys.-Tech. Phys."}
+MACRO {spu} {"Sov. Phys.-Usp."}
+
+READ
+
+FUNCTION {sortify}
+{ purify$
+ "l" change.case$
+}
+
+INTEGERS { len }
+
+FUNCTION {chop.word}
+{ 's :=
+ 'len :=
+ s #1 len substring$ =
+ { s len #1 + global.max$ substring$ }
+ 's
+ if$
+}
+
+FUNCTION {format.lab.names}
+{ 's :=
+ s #1 "{vv~}{ll}" format.name$ caps
+ s num.names$ duplicate$
+ #2 >
+ { pop$ " {\em et~al.}" * }
+ { #2 <
+ 'skip$
+ { s #2 "{ff }{vv }{ll}{ jj}" format.name$ "others" =
+ { " {\em et~al.}" * }
+ { " and " * s #2 "{vv~}{ll}" format.name$ caps * }
+ if$
+ }
+ if$
+ }
+ if$
+}
+
+FUNCTION {author.key.label}
+{ author empty$
+ { key empty$
+ { cite$ #1 #3 substring$ }
+ 'key % apalike uses the whole key
+ if$
+ }
+ { author format.lab.names }
+ if$
+}
+
+FUNCTION {author.editor.key.label}
+{ author empty$
+ { editor empty$
+ { key empty$
+ { cite$ #1 #3 substring$ }
+ 'key % apalike uses the whole key
+ if$
+ }
+ { editor format.lab.names }
+ if$
+ }
+ { author format.lab.names }
+ if$
+}
+
+FUNCTION {editor.key.label}
+{ editor empty$
+ { key empty$
+ { cite$ #1 #3 substring$ }
+ 'key % apalike uses the whole key, no organization
+ if$
+ }
+ { editor format.lab.names }
+ if$
+}
+
+FUNCTION {calc.label}
+{ type$ "book" =
+ type$ "inbook" =
+ or
+ 'author.editor.key.label
+ { type$ "proceedings" =
+ 'editor.key.label % apalike ignores organization
+ 'author.key.label % for labeling and sorting
+ if$
+ }
+ if$
+ ", " % these three lines are
+ * % for apalike, which
+ year field.or.null purify$ #-1 #4 substring$ % uses all four digits
+ *
+ 'label :=
+}
+
+FUNCTION {sort.format.names}
+{ 's :=
+ #1 'nameptr :=
+ ""
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ { nameptr #1 >
+ { " " * }
+ 'skip$
+ if$ % apalike uses initials
+ s nameptr "{vv{ } }{ll{ }}{ f{ }}{ jj{ }}" format.name$ 't := % <= here
+ nameptr numnames = t "others" = and
+ { "et al" * }
+ { t sortify * }
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+}
+
+FUNCTION {sort.format.title}
+{ 't :=
+ "A " #2
+ "An " #3
+ "The " #4 t chop.word
+ chop.word
+ chop.word
+ sortify
+ #1 global.max$ substring$
+}
+
+FUNCTION {author.sort}
+{ author empty$
+ { key empty$
+ { "to sort, need author or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { author sort.format.names }
+ if$
+}
+
+FUNCTION {author.editor.sort}
+{ author empty$
+ { editor empty$
+ { key empty$
+ { "to sort, need author, editor, or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { editor sort.format.names }
+ if$
+ }
+ { author sort.format.names }
+ if$
+}
+
+FUNCTION {editor.sort}
+{ editor empty$
+ { key empty$
+ { "to sort, need editor or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { editor sort.format.names }
+ if$
+}
+
+FUNCTION {presort}
+{ calc.label
+ label sortify
+ " "
+ *
+ type$ "book" =
+ type$ "inbook" =
+ or
+ 'author.editor.sort
+ { type$ "proceedings" =
+ 'editor.sort
+ 'author.sort
+ if$
+ }
+ if$
+ #1 entry.max$ substring$ % for
+ 'sort.label := % apalike
+ sort.label % style
+ *
+ " "
+ *
+ title field.or.null
+ sort.format.title
+ *
+ #1 entry.max$ substring$
+ 'sort.key$ :=
+}
+
+ITERATE {presort}
+
+SORT % by label, sort.label, title---for final label calculation
+
+STRINGS { last.label next.extra } % apalike labels are only for the text;
+
+INTEGERS { last.extra.num } % there are none in the bibliography
+
+FUNCTION {initialize.extra.label.stuff} % and hence there is no `longest.label'
+{ #0 int.to.chr$ 'last.label :=
+ "" 'next.extra :=
+ #0 'last.extra.num :=
+}
+
+FUNCTION {forward.pass}
+{ last.label label =
+ { last.extra.num #1 + 'last.extra.num :=
+ last.extra.num int.to.chr$ 'extra.label :=
+ }
+ { "a" chr.to.int$ 'last.extra.num :=
+ "" 'extra.label :=
+ label 'last.label :=
+ }
+ if$
+}
+
+FUNCTION {reverse.pass}
+{ next.extra "b" =
+ { "a" 'extra.label := }
+ 'skip$
+ if$
+ label extra.label * 'label :=
+ extra.label 'next.extra :=
+}
+
+EXECUTE {initialize.extra.label.stuff}
+
+ITERATE {forward.pass}
+
+REVERSE {reverse.pass}
+
+FUNCTION {bib.sort.order}
+{ sort.label
+ " "
+ *
+ year field.or.null sortify
+ *
+ " "
+ *
+ title field.or.null
+ sort.format.title
+ *
+ #1 entry.max$ substring$
+ 'sort.key$ :=
+}
+
+ITERATE {bib.sort.order}
+
+SORT % by sort.label, year, title---giving final bibliography order
+
+FUNCTION {begin.bib}
+{ preamble$ empty$ % no \etalchar in apalike
+ 'skip$
+ { preamble$ write$ newline$ }
+ if$
+ "\begin{thebibliography}{}" write$ newline$ % no labels in apalike
+}
+
+EXECUTE {begin.bib}
+
+EXECUTE {init.state.consts}
+
+ITERATE {call.type$}
+
+FUNCTION {end.bib}
+{ newline$
+ "\end{thebibliography}" write$ newline$
+}
+
+EXECUTE {end.bib}
diff --git a/biblio/bibtex/contrib/phy-bstyles/report.bst b/biblio/bibtex/contrib/phy-bstyles/report.bst
new file mode 100644
index 0000000000..7d2bd8ef0b
--- /dev/null
+++ b/biblio/bibtex/contrib/phy-bstyles/report.bst
@@ -0,0 +1,1032 @@
+%% #define REPORT 1 % Thu Jun 14 13:27:16 1990
+%% #include "TEX$ROOT:[BIBTEX]PHYSICS.BTX"
+ % Please notify Charles Karney (Karney@Princeton.EDU)
+ % of any bugs, improvements, etc.
+
+ % For internal reports
+
+ % version 0.99b for BibTeX versions 0.99a or later, LaTeX version 2.09.
+ % Copyright (C) 1985, all rights reserved.
+ % Copying of this file is authorized only if either
+ % (1) you make absolutely no changes to your copy, including name, or
+ % (2) if you do make changes, you name it something other than
+ % btxbst.doc, plain.bst, unsrt.bst, alpha.bst, and abbrv.bst.
+ % This restriction helps ensure that all standard styles are identical.
+ % The file btxbst.doc has the documentation for this style.
+
+ENTRY
+ { address
+ author
+ booktitle
+ chapter
+ edition
+ editor
+ howpublished
+ institution
+ journal
+ key
+ month
+ note
+ number
+ organization
+ pages
+ publisher
+ school
+ series
+ title
+ type
+ volume
+ year
+ }
+ {}
+ { label }
+
+INTEGERS { output.state before.all mid.sentence after.sentence after.block }
+
+FUNCTION {init.state.consts}
+{ #0 'before.all :=
+ #1 'mid.sentence :=
+ #2 'after.sentence :=
+ #3 'after.block :=
+}
+
+STRINGS { s t }
+
+FUNCTION {output.nonnull}
+{ 's :=
+ output.state mid.sentence =
+ { ", " * write$ }
+ { output.state after.block =
+ { "," * write$
+ newline$
+ "\newblock " write$
+ }
+ { output.state before.all =
+ 'write$
+ { add.period$ " " * write$ }
+ if$
+ }
+ if$
+ mid.sentence 'output.state :=
+ }
+ if$
+ s
+}
+
+FUNCTION {output}
+{ duplicate$ empty$
+ 'pop$
+ 'output.nonnull
+ if$
+}
+
+FUNCTION {output.check}
+{ 't :=
+ duplicate$ empty$
+ { pop$ "empty " t * " in " * cite$ * warning$ }
+ 'output.nonnull
+ if$
+}
+
+FUNCTION {output.bibitem}
+{ newline$
+ "\bibitem{" write$
+ cite$ write$
+ "}" write$
+ newline$
+ ""
+ before.all 'output.state :=
+}
+
+FUNCTION {fin.entry}
+{ add.period$
+ write$
+ newline$
+}
+
+FUNCTION {new.block}
+{ output.state before.all =
+ 'skip$
+ { after.block 'output.state := }
+ if$
+}
+
+FUNCTION {new.sentence}
+{ skip$
+}
+
+FUNCTION {not}
+{ { #0 }
+ { #1 }
+ if$
+}
+
+FUNCTION {and}
+{ 'skip$
+ { pop$ #0 }
+ if$
+}
+
+FUNCTION {or}
+{ { pop$ #1 }
+ 'skip$
+ if$
+}
+
+FUNCTION {new.block.checka}
+{ empty$
+ 'skip$
+ 'new.block
+ if$
+}
+
+FUNCTION {new.block.checkb}
+{ empty$
+ swap$ empty$
+ and
+ 'skip$
+ 'new.block
+ if$
+}
+
+FUNCTION {new.sentence.checka}
+{ empty$
+ 'skip$
+ 'new.sentence
+ if$
+}
+
+FUNCTION {new.sentence.checkb}
+{ empty$
+ swap$ empty$
+ and
+ 'skip$
+ 'new.sentence
+ if$
+}
+
+FUNCTION {field.or.null}
+{ duplicate$ empty$
+ { pop$ "" }
+ 'skip$
+ if$
+}
+
+FUNCTION {emphasize}
+{ duplicate$ empty$
+ { pop$ "" }
+ { "{\em " swap$ * "}" * }
+ if$
+}
+
+FUNCTION {embolden}
+{ duplicate$ empty$
+ { pop$ "" }
+ { "{\bf " swap$ * "}" * }
+ if$
+}
+
+FUNCTION {paren}
+{ duplicate$ empty$
+ { pop$ "" }
+ { "(" swap$ * ")" * }
+ if$
+}
+
+INTEGERS { nameptr namesleft numnames }
+
+FUNCTION {format.names}
+{ 's :=
+ #1 'nameptr :=
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ { s nameptr "{f.~}{vv~}{ll}{, jj}" format.name$ 't :=
+ nameptr #1 >
+ { namesleft #1 >
+ { ", " * t * }
+ { numnames #2 >
+ { "," * }
+ 'skip$
+ if$
+ t "others" =
+ { " et~al." * }
+ { " and " * t * }
+ if$
+ }
+ if$
+ }
+ 't
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+}
+
+FUNCTION {format.authors}
+{ author empty$
+ { "" }
+ { author format.names }
+ if$
+}
+
+FUNCTION {format.editors}
+{ editor empty$
+ { "" }
+ { editor format.names
+ editor num.names$ #1 >
+ { ", editors" * }
+ { ", editor" * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.edited}
+{ editor empty$
+ { "" }
+ { "edited by " editor format.names * }
+ if$
+}
+
+FUNCTION {format.title}
+{ title empty$
+ { "" }
+ 'title
+ if$
+}
+
+FUNCTION {n.dashify}
+{ 't :=
+ ""
+ { t empty$ not }
+ { t #1 #1 substring$ "-" =
+ { t #1 #2 substring$ "--" = not
+ { "--" *
+ t #2 global.max$ substring$ 't :=
+ }
+ { { t #1 #1 substring$ "-" = }
+ { "-" *
+ t #2 global.max$ substring$ 't :=
+ }
+ while$
+ }
+ if$
+ }
+ { t #1 #1 substring$ *
+ t #2 global.max$ substring$ 't :=
+ }
+ if$
+ }
+ while$
+}
+
+FUNCTION {format.date}
+{ year empty$
+ { month empty$
+ { "" }
+ { "there's a month but no year in " cite$ * warning$
+ month
+ }
+ if$
+ }
+ { month empty$
+ 'year
+ { month " " * year * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.btitle}
+{ title emphasize
+}
+
+FUNCTION {tie.or.space.connect}
+{ duplicate$ text.length$ #3 <
+ { "~" }
+ { " " }
+ if$
+ swap$ * *
+}
+
+FUNCTION {either.or.check}
+{ empty$
+ 'pop$
+ { "can't use both " swap$ * " fields in " * cite$ * warning$ }
+ if$
+}
+
+FUNCTION {format.bvolume}
+{ volume empty$
+ { "" }
+ { "volume" volume tie.or.space.connect
+ series empty$
+ 'skip$
+ { " of " * series emphasize * }
+ if$
+ "volume and number" number either.or.check
+ }
+ if$
+}
+
+FUNCTION {format.number.series}
+{ volume empty$
+ { number empty$
+ { series field.or.null }
+ { output.state mid.sentence =
+ { "number" }
+ { "Number" }
+ if$
+ number tie.or.space.connect
+ series empty$
+ { "there's a number but no series in " cite$ * warning$ }
+ { " in " * series * }
+ if$
+ }
+ if$
+ }
+ { "" }
+ if$
+}
+
+FUNCTION {format.edition}
+{ edition empty$
+ { "" }
+ { output.state mid.sentence =
+ { edition "l" change.case$ " edition" * }
+ { edition "t" change.case$ " edition" * }
+ if$
+ }
+ if$
+}
+
+INTEGERS { multiresult }
+
+FUNCTION {multi.page.check}
+{ 't :=
+ #0 'multiresult :=
+ { multiresult not
+ t empty$ not
+ and
+ }
+ { t #1 #1 substring$
+ duplicate$ "-" =
+ swap$ duplicate$ "," =
+ swap$ "+" =
+ or or
+ { #1 'multiresult := }
+ { t #2 global.max$ substring$ 't := }
+ if$
+ }
+ while$
+ multiresult
+}
+
+FUNCTION {format.pages}
+{ pages empty$
+ { "" }
+ { pages multi.page.check
+ { "pages" pages n.dashify tie.or.space.connect }
+ { "page" pages tie.or.space.connect }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.vol.num.pages}
+{ volume field.or.null embolden
+ " " swap$ * *
+ number empty$
+ 'skip$
+ { "(" number * ")" * *
+ volume empty$
+ { "there's a number but no volume in " cite$ * warning$ }
+ 'skip$
+ if$
+ }
+ if$
+ pages empty$
+ 'skip$
+ { duplicate$ empty$
+ { pop$ format.pages }
+ { ", " * pages n.dashify * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.chapter.pages}
+{ chapter empty$
+ 'format.pages
+ { type empty$
+ { "chapter" }
+ { type "l" change.case$ }
+ if$
+ chapter tie.or.space.connect
+ pages empty$
+ 'skip$
+ { ", " * format.pages * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.in.ed.booktitle}
+{ booktitle empty$
+ { "" }
+ { editor empty$
+ { "in " booktitle emphasize * }
+ { "in " booktitle emphasize * ", " * format.edited * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {empty.misc.check}
+{ author empty$ title empty$ howpublished empty$
+ month empty$ year empty$ note empty$
+ and and and and and
+ { "all relevant fields are empty in " cite$ * warning$ }
+ 'skip$
+ if$
+}
+
+FUNCTION {format.thesis.type}
+{ type empty$
+ 'skip$
+ { pop$
+ type "t" change.case$
+ }
+ if$
+}
+
+FUNCTION {format.tr.number}
+{ type empty$
+ { "Technical Report" }
+ 'type
+ if$
+ number empty$
+ { "t" change.case$ }
+ { number tie.or.space.connect }
+ if$
+}
+
+FUNCTION {format.article.crossref}
+{ key empty$
+ { journal empty$
+ { "need key or journal for " cite$ * " to crossref " * crossref *
+ warning$
+ ""
+ }
+ { "In " journal * }
+ if$
+ }
+ { "In " key * }
+ if$
+ " \cite{" * crossref * "}" *
+}
+
+FUNCTION {format.crossref.editor}
+{ editor #1 "{vv~}{ll}" format.name$
+ editor num.names$ duplicate$
+ #2 >
+ { pop$ " et~al." * }
+ { #2 <
+ 'skip$
+ { editor #2 "{ff }{vv }{ll}{ jj}" format.name$ "others" =
+ { " et~al." * }
+ { " and " * editor #2 "{vv~}{ll}" format.name$ * }
+ if$
+ }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.book.crossref}
+{ volume empty$
+ { "empty volume in " cite$ * "'s crossref of " * crossref * warning$
+ "In "
+ }
+ { "Volume" volume tie.or.space.connect
+ " of " *
+ }
+ if$
+ editor empty$
+ editor field.or.null author field.or.null =
+ or
+ { key empty$
+ { series empty$
+ { "need editor, key, or series for " cite$ * " to crossref " *
+ crossref * warning$
+ "" *
+ }
+ { "{\em " * series * "\/}" * }
+ if$
+ }
+ { key * }
+ if$
+ }
+ { format.crossref.editor * }
+ if$
+ " \cite{" * crossref * "}" *
+}
+
+FUNCTION {format.incoll.inproc.crossref}
+{ editor empty$
+ editor field.or.null author field.or.null =
+ or
+ { key empty$
+ { booktitle empty$
+ { "need editor, key, or booktitle for " cite$ * " to crossref " *
+ crossref * warning$
+ ""
+ }
+ { "In {\em " booktitle * "\/}" * }
+ if$
+ }
+ { "In " key * }
+ if$
+ }
+ { "In " format.crossref.editor * }
+ if$
+ " \cite{" * crossref * "}" *
+}
+
+FUNCTION {article}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.title "title" output.check
+ new.block
+ crossref missing$
+ { journal field.or.null
+ format.vol.num.pages
+ format.date empty$
+ 'skip$
+ { duplicate$ empty$
+ { pop$ format.date paren }
+ { " " * format.date paren * }
+ if$
+ }
+ if$
+ output
+ }
+ { format.article.crossref output.nonnull
+ format.pages output
+ }
+ if$
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {book}
+{ output.bibitem
+ author empty$
+ { format.editors "author and editor" output.check }
+ { format.authors output.nonnull
+ crossref missing$
+ { "author and editor" editor either.or.check }
+ 'skip$
+ if$
+ }
+ if$
+ new.block
+ format.btitle "title" output.check
+ crossref missing$
+ { format.bvolume output
+ new.block
+ format.number.series output
+ new.sentence
+ publisher "publisher" output.check
+ address output
+ }
+ { new.block
+ format.book.crossref output.nonnull
+ }
+ if$
+ format.edition output
+ format.date "year" output.check
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {booklet}
+{ output.bibitem
+ format.authors output
+ new.block
+ format.title "title" output.check
+ howpublished address new.block.checkb
+ howpublished output
+ address output
+ format.date output
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {inbook}
+{ output.bibitem
+ author empty$
+ { format.editors "author and editor" output.check }
+ { format.authors output.nonnull
+ crossref missing$
+ { "author and editor" editor either.or.check }
+ 'skip$
+ if$
+ }
+ if$
+ new.block
+ format.btitle "title" output.check
+ crossref missing$
+ { format.bvolume output
+ format.chapter.pages "chapter and pages" output.check
+ new.block
+ format.number.series output
+ new.sentence
+ publisher "publisher" output.check
+ address output
+ }
+ { format.chapter.pages "chapter and pages" output.check
+ new.block
+ format.book.crossref output.nonnull
+ }
+ if$
+ format.edition output
+ format.date "year" output.check
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {incollection}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.title "title" output.check
+ new.block
+ crossref missing$
+ { format.in.ed.booktitle "booktitle" output.check
+ format.bvolume output
+ format.number.series output
+ format.chapter.pages output
+ new.sentence
+ publisher "publisher" output.check
+ address output
+ format.edition output
+ format.date "year" output.check
+ }
+ { format.incoll.inproc.crossref output.nonnull
+ format.chapter.pages output
+ }
+ if$
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {inproceedings}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.title "title" output.check
+ new.block
+ crossref missing$
+ { format.in.ed.booktitle "booktitle" output.check
+ format.bvolume output
+ format.number.series output
+ format.pages output
+ address empty$
+ { organization publisher new.sentence.checkb
+ organization output
+ publisher output
+ format.date "year" output.check
+ }
+ { address output.nonnull
+ format.date "year" output.check
+ new.sentence
+ organization output
+ publisher output
+ }
+ if$
+ }
+ { format.incoll.inproc.crossref output.nonnull
+ format.pages output
+ }
+ if$
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {conference} { inproceedings }
+
+FUNCTION {manual}
+{ output.bibitem
+ author empty$
+ { organization empty$
+ 'skip$
+ { organization output.nonnull
+ address output
+ }
+ if$
+ }
+ { format.authors output.nonnull }
+ if$
+ new.block
+ format.btitle "title" output.check
+ author empty$
+ { organization empty$
+ { address new.block.checka
+ address output
+ }
+ 'skip$
+ if$
+ }
+ { organization address new.block.checkb
+ organization output
+ address output
+ }
+ if$
+ format.edition output
+ format.date output
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {mastersthesis}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.title "title" output.check
+ new.block
+ "Master's thesis" format.thesis.type output.nonnull
+ school "school" output.check
+ address output
+ format.date "year" output.check
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {misc}
+{ output.bibitem
+ format.authors output
+ title howpublished new.block.checkb
+ format.title output
+ howpublished new.block.checka
+ howpublished output
+ format.date output
+ new.block
+ note output
+ fin.entry
+ empty.misc.check
+}
+
+FUNCTION {phdthesis}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.btitle "title" output.check
+ new.block
+ "PhD thesis" format.thesis.type output.nonnull
+ school "school" output.check
+ address output
+ format.date "year" output.check
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {proceedings}
+{ output.bibitem
+ editor empty$
+ { organization output }
+ { format.editors output.nonnull }
+ if$
+ new.block
+ format.btitle "title" output.check
+ format.bvolume output
+ format.number.series output
+ address empty$
+ { editor empty$
+ { publisher new.sentence.checka }
+ { organization publisher new.sentence.checkb
+ organization output
+ }
+ if$
+ publisher output
+ format.date "year" output.check
+ }
+ { address output.nonnull
+ format.date "year" output.check
+ new.sentence
+ editor empty$
+ 'skip$
+ { organization output }
+ if$
+ publisher output
+ }
+ if$
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {techreport}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.title "title" output.check
+ new.block
+ format.tr.number output.nonnull
+ institution "institution" output.check
+ address output
+ format.date "year" output.check
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {unpublished}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.title "title" output.check
+ new.block
+ note "note" output.check
+ format.date output
+ fin.entry
+}
+
+FUNCTION {default.type} { misc }
+
+MACRO {jan} {"Jan."}
+
+MACRO {feb} {"Feb."}
+
+MACRO {mar} {"Mar."}
+
+MACRO {apr} {"Apr."}
+
+MACRO {may} {"May"}
+
+MACRO {jun} {"June"}
+
+MACRO {jul} {"July"}
+
+MACRO {aug} {"Aug."}
+
+MACRO {sep} {"Sept."}
+
+MACRO {oct} {"Oct."}
+
+MACRO {nov} {"Nov."}
+
+MACRO {dec} {"Dec."}
+
+MACRO {acmcs} {"ACM Comput. Surv."}
+
+MACRO {acta} {"Acta Inf."}
+
+MACRO {cacm} {"Commun. ACM"}
+
+MACRO {ibmjrd} {"IBM J. Res. Dev."}
+
+MACRO {ibmsj} {"IBM Syst.~J."}
+
+MACRO {ieeese} {"IEEE Trans. Softw. Eng."}
+
+MACRO {ieeetc} {"IEEE Trans. Comput."}
+
+MACRO {ieeetcad}
+ {"IEEE Trans. Comput.-Aided Design Integrated Circuits"}
+
+MACRO {ipl} {"Inf. Process. Lett."}
+
+MACRO {jacm} {"J.~ACM"}
+
+MACRO {jcss} {"J.~Comput. Syst. Sci."}
+
+MACRO {scp} {"Sci. Comput. Programming"}
+
+MACRO {sicomp} {"SIAM J. Comput."}
+
+MACRO {tocs} {"ACM Trans. Comput. Syst."}
+
+MACRO {tods} {"ACM Trans. Database Syst."}
+
+MACRO {tog} {"ACM Trans. Gr."}
+
+MACRO {toms} {"ACM Trans. Math. Softw."}
+
+MACRO {toois} {"ACM Trans. Office Inf. Syst."}
+
+MACRO {toplas} {"ACM Trans. Prog. Lang. Syst."}
+
+MACRO {tcs} {"Theoretical Comput. Sci."}
+
+MACRO {advp} {"Adv. Phys."}
+MACRO {ajp} {"Am. J. Phys."}
+MACRO {ao} {"Appl. Opt."}
+MACRO {apl} {"Appl. Phys. Lett."}
+MACRO {apj} {"Astrophys. J."}
+MACRO {baps} {"Bull. Am. Phys. Soc."}
+MACRO {cpc} {"Computer Phys. Comm."}
+MACRO {cppcf} {"Comments Plasma Phys. Controlled Fusion"}
+MACRO {fed} {"Fusion Eng. Design"}
+MACRO {ft} {"Fusion Tech."}
+MACRO {ieeens} {"IEEE Trans. Nucl. Sci."}
+MACRO {ieeeps} {"IEEE Trans. Plasma Sci."}
+MACRO {ijimw} {"Int. J. Infrared Millimeter Waves"}
+MACRO {ip} {"Infrared Phys."}
+MACRO {jap} {"J. Appl. Phys."}
+MACRO {jcp} {"J. Comput. Phys."}
+MACRO {jetp} {"Sov. Phys.-JETP"}
+MACRO {jfe} {"J. Fusion Energy"}
+MACRO {jfm} {"J. Fluid Mech."}
+MACRO {jgr} {"J. Geophys. Res."}
+MACRO {jmp} {"J. Math. Phys."}
+MACRO {jne} {"J. Nucl. Energy"}
+MACRO {jnec} {"J. Nucl. Energy, Part C"}
+MACRO {jnm} {"J. Nucl. Mater."}
+MACRO {josa} {"J. Opt. Soc. Am."}
+MACRO {jpp} {"J. Plasma Phys."}
+MACRO {jpsj} {"J. Phys. Soc. Jpn"}
+MACRO {jvst} {"J. Vac. Sci. Technol."}
+MACRO {nedf} {"Nucl. Eng. Design/Fusion"}
+MACRO {nf} {"Nucl. Fusion"}
+MACRO {nim} {"Nucl. Instrum. Methods"}
+MACRO {nimpr} {"Nucl. Instrum. Methods Phys. Research"}
+MACRO {nt/f} {"Nucl. Tech./Fusion"}
+MACRO {pf} {"Phys. Fluids"}
+MACRO {pfa} {"Phys. Fluids A"}
+MACRO {pfb} {"Phys. Fluids B"}
+MACRO {pl} {"Phys. Lett."}
+MACRO {pla} {"Phys. Lett. A"}
+MACRO {pnas} {"Proc. Nat. Acad. Sci. USA"}
+MACRO {pp} {"Plasma Phys."}
+MACRO {ppcf} {"Plasma Phys. Controlled Fusion"}
+MACRO {prl} {"Phys. Rev. Lett."}
+MACRO {pr} {"Phys. Rev."}
+MACRO {pra} {"Phys. Rev. A"}
+MACRO {ps} {"Physica Scripta"}
+MACRO {rmp} {"Rev. Mod. Phys."}
+MACRO {rsi} {"Rev. Sci. Instrum."}
+MACRO {sjpp} {"Sov. J. Plasma Phys."}
+MACRO {spd} {"Sov. Phys.-Dokl."}
+MACRO {sptp} {"Sov. Phys.-Tech. Phys."}
+MACRO {spu} {"Sov. Phys.-Usp."}
+
+READ
+
+STRINGS { longest.label }
+
+INTEGERS { number.label longest.label.width }
+
+FUNCTION {initialize.longest.label}
+{ "" 'longest.label :=
+ #1 'number.label :=
+ #0 'longest.label.width :=
+}
+
+FUNCTION {longest.label.pass}
+{ number.label int.to.str$ 'label :=
+ number.label #1 + 'number.label :=
+ label width$ longest.label.width >
+ { label 'longest.label :=
+ label width$ 'longest.label.width :=
+ }
+ 'skip$
+ if$
+}
+
+EXECUTE {initialize.longest.label}
+
+ITERATE {longest.label.pass}
+
+FUNCTION {begin.bib}
+{ preamble$ empty$
+ 'skip$
+ { preamble$ write$ newline$ }
+ if$
+ "\begin{thebibliography}{" longest.label * "}" * write$ newline$
+}
+
+EXECUTE {begin.bib}
+
+EXECUTE {init.state.consts}
+
+ITERATE {call.type$}
+
+FUNCTION {end.bib}
+{ newline$
+ "\end{thebibliography}" write$ newline$
+}
+
+EXECUTE {end.bib}
diff --git a/biblio/bibtex/contrib/phy-bstyles/rmp.bst b/biblio/bibtex/contrib/phy-bstyles/rmp.bst
new file mode 100644
index 0000000000..49d331b4cb
--- /dev/null
+++ b/biblio/bibtex/contrib/phy-bstyles/rmp.bst
@@ -0,0 +1,1312 @@
+%% #define RMP 1 % Thu Jun 14 13:26:15 1990
+%% #include "TEX$ROOT:[BIBTEX]PHYSICS.BTX"
+ % Please notify Charles Karney (Karney@Princeton.EDU)
+ % of any bugs, improvements, etc.
+
+ % For Reviews of Modern Physics,
+
+ % version 0.99b for BibTeX versions 0.99a or later, LaTeX version 2.09.
+ % Copyright (C) 1985, all rights reserved.
+ % Copying of this file is authorized only if either
+ % (1) you make absolutely no changes to your copy, including name, or
+ % (2) if you do make changes, you name it something other than
+ % btxbst.doc, plain.bst, unsrt.bst, alpha.bst, and abbrv.bst.
+ % This restriction helps ensure that all standard styles are identical.
+ % The file btxbst.doc has the documentation for this style.
+
+ENTRY
+ { address
+ author
+ booktitle
+ chapter
+ edition
+ editor
+ howpublished
+ institution
+ journal
+ key
+ month
+ note
+ number
+ organization
+ pages
+ publisher
+ school
+ series
+ title
+ type
+ volume
+ year
+ }
+ {}
+ { label extra.label sort.label }
+
+INTEGERS { output.state before.all mid.sentence after.sentence after.block }
+
+FUNCTION {init.state.consts}
+{ #0 'before.all :=
+ #1 'mid.sentence :=
+ #2 'after.sentence :=
+ #3 'after.block :=
+}
+
+STRINGS { s t }
+
+FUNCTION {output.nonnull}
+{ 's :=
+ output.state mid.sentence =
+ { ", " * write$ }
+ { output.state after.block =
+ { "," * write$
+ newline$
+ "\newblock " write$
+ }
+ { output.state before.all =
+ 'write$
+ { add.period$ " " * write$ }
+ if$
+ }
+ if$
+ mid.sentence 'output.state :=
+ }
+ if$
+ s
+}
+
+FUNCTION {output}
+{ duplicate$ empty$
+ 'pop$
+ 'output.nonnull
+ if$
+}
+
+FUNCTION {output.check}
+{ 't :=
+ duplicate$ empty$
+ { pop$ "empty " t * " in " * cite$ * warning$ }
+ 'output.nonnull
+ if$
+}
+
+FUNCTION {output.bibitem}
+{ newline$
+ "\bibitem[" write$
+ label write$
+ "]{" write$
+ cite$ write$
+ "}" write$
+ newline$
+ ""
+ before.all 'output.state :=
+}
+
+FUNCTION {fin.entry}
+{ add.period$
+ write$
+ newline$
+}
+
+FUNCTION {new.block}
+{ output.state before.all =
+ 'skip$
+ { after.block 'output.state := }
+ if$
+}
+
+FUNCTION {new.sentence}
+{ skip$
+}
+
+FUNCTION {not}
+{ { #0 }
+ { #1 }
+ if$
+}
+
+FUNCTION {and}
+{ 'skip$
+ { pop$ #0 }
+ if$
+}
+
+FUNCTION {or}
+{ { pop$ #1 }
+ 'skip$
+ if$
+}
+
+FUNCTION {new.block.checka}
+{ empty$
+ 'skip$
+ 'new.block
+ if$
+}
+
+FUNCTION {new.block.checkb}
+{ empty$
+ swap$ empty$
+ and
+ 'skip$
+ 'new.block
+ if$
+}
+
+FUNCTION {new.sentence.checka}
+{ empty$
+ 'skip$
+ 'new.sentence
+ if$
+}
+
+FUNCTION {new.sentence.checkb}
+{ empty$
+ swap$ empty$
+ and
+ 'skip$
+ 'new.sentence
+ if$
+}
+
+FUNCTION {field.or.null}
+{ duplicate$ empty$
+ { pop$ "" }
+ 'skip$
+ if$
+}
+
+FUNCTION {emphasize}
+{ duplicate$ empty$
+ { pop$ "" }
+ { "{\em " swap$ * "}" * }
+ if$
+}
+
+FUNCTION {embolden}
+{ duplicate$ empty$
+ { pop$ "" }
+ { "{\bf " swap$ * "}" * }
+ if$
+}
+
+FUNCTION {bracket}
+{ duplicate$ empty$
+ { pop$ "" }
+ { "[" swap$ * "]" * }
+ if$
+}
+
+INTEGERS { nameptr namesleft numnames }
+
+FUNCTION {format.names}
+{ 's :=
+ #1 'nameptr :=
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ { s nameptr "{f.~}{vv~}{ll}{, jj}" format.name$ 't :=
+ nameptr #1 >
+ { namesleft #1 >
+ { ", " * t * }
+ { numnames #2 >
+ { "," * }
+ 'skip$
+ if$
+ t "others" =
+ { " et~al." * }
+ { " and " * t * }
+ if$
+ }
+ if$
+ }
+ 't
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+}
+
+FUNCTION {format.authors}
+{ author empty$
+ { "" }
+ { author format.names }
+ if$
+}
+
+FUNCTION {format.editors}
+{ editor empty$
+ { "" }
+ { editor format.names
+ editor num.names$ #1 >
+ { ", editors" * }
+ { ", editor" * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.edited}
+{ editor empty$
+ { "" }
+ { "edited by " editor format.names * }
+ if$
+}
+
+FUNCTION {format.title}
+{ title empty$
+ { "" }
+ { title "t" change.case$ }
+ if$
+}
+
+FUNCTION {n.dashify}
+{ 't :=
+ ""
+ { t empty$ not }
+ { t #1 #1 substring$ "-" =
+ { t #1 #2 substring$ "--" = not
+ { "--" *
+ t #2 global.max$ substring$ 't :=
+ }
+ { { t #1 #1 substring$ "-" = }
+ { "-" *
+ t #2 global.max$ substring$ 't :=
+ }
+ while$
+ }
+ if$
+ }
+ { t #1 #1 substring$ *
+ t #2 global.max$ substring$ 't :=
+ }
+ if$
+ }
+ while$
+}
+
+FUNCTION {first.page}
+{ 't :=
+ ""
+ { t empty$ not t #1 #1 substring$ "-" = not and }
+ { t #1 #1 substring$ *
+ t #2 global.max$ substring$ 't :=
+ }
+ while$
+}
+
+FUNCTION {format.date}
+{ year empty$
+ { month empty$
+ { "" }
+ { "there's a month but no year in " cite$ * warning$
+ month
+ }
+ if$
+ }
+ { month empty$
+ 'year
+ { month " " * year * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.btitle}
+{ title emphasize
+}
+
+FUNCTION {tie.or.space.connect}
+{ duplicate$ text.length$ #3 <
+ { "~" }
+ { " " }
+ if$
+ swap$ * *
+}
+
+FUNCTION {either.or.check}
+{ empty$
+ 'pop$
+ { "can't use both " swap$ * " fields in " * cite$ * warning$ }
+ if$
+}
+
+FUNCTION {format.bvolume}
+{ volume empty$
+ { "" }
+ { "volume" volume tie.or.space.connect
+ series empty$
+ 'skip$
+ { " of " * series emphasize * }
+ if$
+ "volume and number" number either.or.check
+ }
+ if$
+}
+
+FUNCTION {format.number.series}
+{ volume empty$
+ { number empty$
+ { series field.or.null }
+ { output.state mid.sentence =
+ { "number" }
+ { "Number" }
+ if$
+ number tie.or.space.connect
+ series empty$
+ { "there's a number but no series in " cite$ * warning$ }
+ { " in " * series * }
+ if$
+ }
+ if$
+ }
+ { "" }
+ if$
+}
+
+FUNCTION {format.edition}
+{ edition empty$
+ { "" }
+ { output.state mid.sentence =
+ { edition "l" change.case$ " edition" * }
+ { edition "t" change.case$ " edition" * }
+ if$
+ }
+ if$
+}
+
+INTEGERS { multiresult }
+
+FUNCTION {multi.page.check}
+{ 't :=
+ #0 'multiresult :=
+ { multiresult not
+ t empty$ not
+ and
+ }
+ { t #1 #1 substring$
+ duplicate$ "-" =
+ swap$ duplicate$ "," =
+ swap$ "+" =
+ or or
+ { #1 'multiresult := }
+ { t #2 global.max$ substring$ 't := }
+ if$
+ }
+ while$
+ multiresult
+}
+
+FUNCTION {format.pages}
+{ pages empty$
+ { "" }
+ { pages multi.page.check
+ { "pp." pages n.dashify tie.or.space.connect }
+ { "p." pages tie.or.space.connect }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.pages.a}
+{ pages empty$
+ { "" }
+ { "p." pages first.page tie.or.space.connect }
+ if$
+}
+
+FUNCTION {format.vol.num.pages}
+{ volume field.or.null embolden
+ pages empty$
+ 'skip$
+ { duplicate$ empty$
+ { pop$ format.pages.a }
+ { ":" * pages first.page * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.chapter.pages}
+{ chapter empty$
+ 'format.pages
+ { type empty$
+ { "chapter" }
+ { type "l" change.case$ }
+ if$
+ chapter tie.or.space.connect
+ pages empty$
+ 'skip$
+ { ", " * format.pages * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.in.ed.booktitle}
+{ booktitle empty$
+ { "" }
+ { editor empty$
+ { "in " booktitle emphasize * }
+ { "in " booktitle emphasize * ", " * format.edited * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {empty.misc.check}
+{ author empty$ title empty$ howpublished empty$
+ month empty$ year empty$ note empty$
+ and and and and and
+ key empty$ not and
+ { "all relevant fields are empty in " cite$ * warning$ }
+ 'skip$
+ if$
+}
+
+FUNCTION {format.thesis.type}
+{ type empty$
+ 'skip$
+ { pop$
+ type "t" change.case$
+ }
+ if$
+}
+
+FUNCTION {format.tr.number}
+{ type empty$
+ { "Technical Report" }
+ 'type
+ if$
+ number empty$
+ { "t" change.case$ }
+ { number tie.or.space.connect }
+ if$
+}
+
+FUNCTION {format.article.crossref}
+{ key empty$
+ { journal empty$
+ { "need key or journal for " cite$ * " to crossref " * crossref *
+ warning$
+ ""
+ }
+ { "In " journal * }
+ if$
+ }
+ { "In " key * }
+ if$
+ " \cite{" * crossref * "}" *
+}
+
+FUNCTION {format.crossref.editor}
+{ editor #1 "{vv~}{ll}" format.name$
+ editor num.names$ duplicate$
+ #2 >
+ { pop$ " et~al." * }
+ { #2 <
+ 'skip$
+ { editor #2 "{ff }{vv }{ll}{ jj}" format.name$ "others" =
+ { " et~al." * }
+ { " and " * editor #2 "{vv~}{ll}" format.name$ * }
+ if$
+ }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.book.crossref}
+{ volume empty$
+ { "empty volume in " cite$ * "'s crossref of " * crossref * warning$
+ "In "
+ }
+ { "Volume" volume tie.or.space.connect
+ " of " *
+ }
+ if$
+ editor empty$
+ editor field.or.null author field.or.null =
+ or
+ { key empty$
+ { series empty$
+ { "need editor, key, or series for " cite$ * " to crossref " *
+ crossref * warning$
+ "" *
+ }
+ { "{\em " * series * "\/}" * }
+ if$
+ }
+ { key * }
+ if$
+ }
+ { format.crossref.editor * }
+ if$
+ " \cite{" * crossref * "}" *
+}
+
+FUNCTION {format.incoll.inproc.crossref}
+{ editor empty$
+ editor field.or.null author field.or.null =
+ or
+ { key empty$
+ { booktitle empty$
+ { "need editor, key, or booktitle for " cite$ * " to crossref " *
+ crossref * warning$
+ ""
+ }
+ { "In {\em " booktitle * "\/}" * }
+ if$
+ }
+ { "In " key * }
+ if$
+ }
+ { "In " format.crossref.editor * }
+ if$
+ " \cite{" * crossref * "}" *
+}
+
+FUNCTION {article}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ crossref missing$
+ { journal "journal" output.check
+ format.vol.num.pages output
+ format.date "year" output.check
+ }
+ { format.article.crossref output.nonnull
+ format.pages output
+ }
+ if$
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {book}
+{ output.bibitem
+ author empty$
+ { format.editors "author and editor" output.check }
+ { format.authors output.nonnull
+ crossref missing$
+ { "author and editor" editor either.or.check }
+ 'skip$
+ if$
+ }
+ if$
+ new.block
+ format.btitle "title" output.check
+ crossref missing$
+ { format.bvolume output
+ new.block
+ format.number.series output
+ new.sentence
+ publisher "publisher" output.check
+ address output
+ }
+ { new.block
+ format.book.crossref output.nonnull
+ }
+ if$
+ format.edition output
+ format.date "year" output.check
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {booklet}
+{ output.bibitem
+ format.authors output
+ new.block
+ format.title "title" output.check
+ howpublished address new.block.checkb
+ howpublished output
+ address output
+ format.date output
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {inbook}
+{ output.bibitem
+ author empty$
+ { format.editors "author and editor" output.check }
+ { format.authors output.nonnull
+ crossref missing$
+ { "author and editor" editor either.or.check }
+ 'skip$
+ if$
+ }
+ if$
+ new.block
+ format.btitle "title" output.check
+ crossref missing$
+ { format.bvolume output
+ format.chapter.pages "chapter and pages" output.check
+ new.block
+ format.number.series output
+ new.sentence
+ publisher "publisher" output.check
+ address output
+ }
+ { format.chapter.pages "chapter and pages" output.check
+ new.block
+ format.book.crossref output.nonnull
+ }
+ if$
+ format.edition output
+ format.date "year" output.check
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {incollection}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.title "title" output.check
+ new.block
+ crossref missing$
+ { format.in.ed.booktitle "booktitle" output.check
+ format.bvolume output
+ format.number.series output
+ format.chapter.pages output
+ new.sentence
+ publisher "publisher" output.check
+ address output
+ format.edition output
+ format.date "year" output.check
+ }
+ { format.incoll.inproc.crossref output.nonnull
+ format.chapter.pages output
+ }
+ if$
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {inproceedings}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.title "title" output.check
+ new.block
+ crossref missing$
+ { format.in.ed.booktitle "booktitle" output.check
+ format.bvolume output
+ format.number.series output
+ format.pages output
+ address empty$
+ { organization publisher new.sentence.checkb
+ organization output
+ publisher output
+ format.date "year" output.check
+ }
+ { address output.nonnull
+ format.date "year" output.check
+ new.sentence
+ organization output
+ publisher output
+ }
+ if$
+ }
+ { format.incoll.inproc.crossref output.nonnull
+ format.pages output
+ }
+ if$
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {conference} { inproceedings }
+
+FUNCTION {manual}
+{ output.bibitem
+ author empty$
+ { organization empty$
+ 'skip$
+ { organization output.nonnull
+ address output
+ }
+ if$
+ }
+ { format.authors output.nonnull }
+ if$
+ new.block
+ format.btitle "title" output.check
+ author empty$
+ { organization empty$
+ { address new.block.checka
+ address output
+ }
+ 'skip$
+ if$
+ }
+ { organization address new.block.checkb
+ organization output
+ address output
+ }
+ if$
+ format.edition output
+ format.date output
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {mastersthesis}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.title "title" output.check
+ new.block
+ "Master's thesis" format.thesis.type output.nonnull
+ school "school" output.check
+ address output
+ format.date "year" output.check
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {misc}
+{ output.bibitem
+ format.authors output
+ title howpublished new.block.checkb
+ format.title output
+ howpublished new.block.checka
+ howpublished output
+ format.date output
+ new.block
+ note output
+ fin.entry
+ empty.misc.check
+}
+
+FUNCTION {phdthesis}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.btitle "title" output.check
+ new.block
+ "PhD thesis" format.thesis.type output.nonnull
+ school "school" output.check
+ address output
+ format.date "year" output.check
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {proceedings}
+{ output.bibitem
+ editor empty$
+ { organization output }
+ { format.editors output.nonnull }
+ if$
+ new.block
+ format.btitle "title" output.check
+ format.bvolume output
+ format.number.series output
+ address empty$
+ { editor empty$
+ { publisher new.sentence.checka }
+ { organization publisher new.sentence.checkb
+ organization output
+ }
+ if$
+ publisher output
+ format.date "year" output.check
+ }
+ { address output.nonnull
+ format.date "year" output.check
+ new.sentence
+ editor empty$
+ 'skip$
+ { organization output }
+ if$
+ publisher output
+ }
+ if$
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {techreport}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.title "title" output.check
+ new.block
+ format.tr.number output.nonnull
+ institution "institution" output.check
+ address output
+ format.date "year" output.check
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {unpublished}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.title "title" output.check
+ new.block
+ note "note" output.check
+ format.date output
+ fin.entry
+}
+
+FUNCTION {default.type} { misc }
+
+MACRO {jan} {"Jan."}
+
+MACRO {feb} {"Feb."}
+
+MACRO {mar} {"Mar."}
+
+MACRO {apr} {"Apr."}
+
+MACRO {may} {"May"}
+
+MACRO {jun} {"June"}
+
+MACRO {jul} {"July"}
+
+MACRO {aug} {"Aug."}
+
+MACRO {sep} {"Sept."}
+
+MACRO {oct} {"Oct."}
+
+MACRO {nov} {"Nov."}
+
+MACRO {dec} {"Dec."}
+
+MACRO {acmcs} {"ACM Comput. Surv."}
+
+MACRO {acta} {"Acta Inf."}
+
+MACRO {cacm} {"Commun. ACM"}
+
+MACRO {ibmjrd} {"IBM J. Res. Dev."}
+
+MACRO {ibmsj} {"IBM Syst.~J."}
+
+MACRO {ieeese} {"IEEE Trans. Softw. Eng."}
+
+MACRO {ieeetc} {"IEEE Trans. Comput."}
+
+MACRO {ieeetcad}
+ {"IEEE Trans. Comput.-Aided Design Integrated Circuits"}
+
+MACRO {ipl} {"Inf. Process. Lett."}
+
+MACRO {jacm} {"J.~ACM"}
+
+MACRO {jcss} {"J.~Comput. Syst. Sci."}
+
+MACRO {scp} {"Sci. Comput. Programming"}
+
+MACRO {sicomp} {"SIAM J. Comput."}
+
+MACRO {tocs} {"ACM Trans. Comput. Syst."}
+
+MACRO {tods} {"ACM Trans. Database Syst."}
+
+MACRO {tog} {"ACM Trans. Gr."}
+
+MACRO {toms} {"ACM Trans. Math. Softw."}
+
+MACRO {toois} {"ACM Trans. Office Inf. Syst."}
+
+MACRO {toplas} {"ACM Trans. Prog. Lang. Syst."}
+
+MACRO {tcs} {"Theoretical Comput. Sci."}
+
+MACRO {advp} {"Adv. Phys."}
+MACRO {ajp} {"Am. J. Phys."}
+MACRO {ao} {"Appl. Opt."}
+MACRO {apl} {"Appl. Phys. Lett."}
+MACRO {apj} {"Astrophys. J."}
+MACRO {baps} {"Bull. Am. Phys. Soc."}
+MACRO {cpc} {"Computer Phys. Comm."}
+MACRO {cppcf} {"Comments Plasma Phys. Controlled Fusion"}
+MACRO {fed} {"Fusion Eng. Design"}
+MACRO {ft} {"Fusion Tech."}
+MACRO {ieeens} {"IEEE Trans. Nucl. Sci."}
+MACRO {ieeeps} {"IEEE Trans. Plasma Sci."}
+MACRO {ijimw} {"Int. J. Infrared Millimeter Waves"}
+MACRO {ip} {"Infrared Phys."}
+MACRO {jap} {"J. Appl. Phys."}
+MACRO {jcp} {"J. Comput. Phys."}
+MACRO {jetp} {"Sov. Phys.-JETP"}
+MACRO {jfe} {"J. Fusion Energy"}
+MACRO {jfm} {"J. Fluid Mech."}
+MACRO {jgr} {"J. Geophys. Res."}
+MACRO {jmp} {"J. Math. Phys."}
+MACRO {jne} {"J. Nucl. Energy"}
+MACRO {jnec} {"J. Nucl. Energy, Part C"}
+MACRO {jnm} {"J. Nucl. Mater."}
+MACRO {josa} {"J. Opt. Soc. Am."}
+MACRO {jpp} {"J. Plasma Phys."}
+MACRO {jpsj} {"J. Phys. Soc. Jpn"}
+MACRO {jvst} {"J. Vac. Sci. Technol."}
+MACRO {nedf} {"Nucl. Eng. Design/Fusion"}
+MACRO {nf} {"Nucl. Fusion"}
+MACRO {nim} {"Nucl. Instrum. Methods"}
+MACRO {nimpr} {"Nucl. Instrum. Methods Phys. Research"}
+MACRO {nt/f} {"Nucl. Tech./Fusion"}
+MACRO {pf} {"Phys. Fluids"}
+MACRO {pfa} {"Phys. Fluids A"}
+MACRO {pfb} {"Phys. Fluids B"}
+MACRO {pl} {"Phys. Lett."}
+MACRO {pla} {"Phys. Lett. A"}
+MACRO {pnas} {"Proc. Nat. Acad. Sci. USA"}
+MACRO {pp} {"Plasma Phys."}
+MACRO {ppcf} {"Plasma Phys. Controlled Fusion"}
+MACRO {prl} {"Phys. Rev. Lett."}
+MACRO {pr} {"Phys. Rev."}
+MACRO {pra} {"Phys. Rev. A"}
+MACRO {ps} {"Physica Scripta"}
+MACRO {rmp} {"Rev. Mod. Phys."}
+MACRO {rsi} {"Rev. Sci. Instrum."}
+MACRO {sjpp} {"Sov. J. Plasma Phys."}
+MACRO {spd} {"Sov. Phys.-Dokl."}
+MACRO {sptp} {"Sov. Phys.-Tech. Phys."}
+MACRO {spu} {"Sov. Phys.-Usp."}
+
+READ
+
+FUNCTION {sortify}
+{ purify$
+ "l" change.case$
+}
+
+INTEGERS { len }
+
+FUNCTION {chop.word}
+{ 's :=
+ 'len :=
+ s #1 len substring$ =
+ { s len #1 + global.max$ substring$ }
+ 's
+ if$
+}
+
+INTEGERS { et.al.char.used }
+
+FUNCTION {initialize.et.al.char.used}
+{ #0 'et.al.char.used :=
+}
+
+EXECUTE {initialize.et.al.char.used}
+
+FUNCTION {format.lab.names}
+{ 's :=
+ s num.names$ 'numnames :=
+ numnames #1 >
+ { numnames #2 >
+ { s #1 "{vv }{ll}" format.name$ " et~al." * }
+ { s #1 "{vv }{ll}" format.name$
+ s #2 "{ff }{vv }{ll}{ jj}" format.name$ "others" =
+ { " et~al." * }
+ { " and " * s #2 "{vv }{ll}" format.name$ * }
+ if$
+ }
+ if$
+ }
+ { s #1 "{vv }{ll}" format.name$ }
+ if$
+}
+
+FUNCTION {author.key.label}
+{ author empty$
+ { key empty$
+ { cite$ #1 #3 substring$ }
+ { key #3 text.prefix$ }
+ if$
+ }
+ { author format.lab.names }
+ if$
+}
+
+FUNCTION {author.editor.key.label}
+{ author empty$
+ { editor empty$
+ { key empty$
+ { cite$ #1 #3 substring$ }
+ { key #3 text.prefix$ }
+ if$
+ }
+ { editor format.lab.names }
+ if$
+ }
+ { author format.lab.names }
+ if$
+}
+
+FUNCTION {author.key.organization.label}
+{ author empty$
+ { key empty$
+ { organization empty$
+ { cite$ #1 #3 substring$ }
+ { "The " #4 organization chop.word #9 text.prefix$ }
+ if$
+ }
+ { key #3 text.prefix$ }
+ if$
+ }
+ { author format.lab.names }
+ if$
+}
+
+FUNCTION {editor.key.organization.label}
+{ editor empty$
+ { key empty$
+ { organization empty$
+ { cite$ #1 #3 substring$ }
+ { "The " #4 organization chop.word #9 text.prefix$ }
+ if$
+ }
+ { key #3 text.prefix$ }
+ if$
+ }
+ { editor format.lab.names }
+ if$
+}
+
+FUNCTION {calc.label}
+{ type$ "book" =
+ type$ "inbook" =
+ or
+ 'author.editor.key.label
+ { type$ "proceedings" =
+ 'editor.key.organization.label
+ { type$ "manual" =
+ 'author.key.organization.label
+ 'author.key.label
+ if$
+ }
+ if$
+ }
+ if$
+ duplicate$
+ " " * year field.or.null purify$ #-1 #4 substring$
+ *
+ 'label :=
+ year field.or.null purify$ #-1 #4 substring$
+ *
+ sortify 'sort.label :=
+}
+
+FUNCTION {sort.format.names}
+{ 's :=
+ #1 'nameptr :=
+ ""
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ { nameptr #1 >
+ { " " * }
+ 'skip$
+ if$ % apalike uses initials
+ s nameptr "{vv{ } }{ll{ }}{ f{ }}{ jj{ }}" format.name$ 't := % <= here
+ nameptr numnames = t "others" = and
+ { "et al" * }
+ { t sortify * }
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+}
+
+FUNCTION {sort.format.title}
+{ 't :=
+ "A " #2
+ "An " #3
+ "The " #4 t chop.word
+ chop.word
+ chop.word
+ sortify
+ #1 global.max$ substring$
+}
+
+FUNCTION {author.sort}
+{ author empty$
+ { key empty$
+ { "to sort, need author or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { author sort.format.names }
+ if$
+}
+
+FUNCTION {author.editor.sort}
+{ author empty$
+ { editor empty$
+ { key empty$
+ { "to sort, need author, editor, or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { editor sort.format.names }
+ if$
+ }
+ { author sort.format.names }
+ if$
+}
+
+FUNCTION {author.organization.sort}
+{ author empty$
+ { organization empty$
+ { key empty$
+ { "to sort, need author, organization, or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { "The " #4 organization chop.word sortify }
+ if$
+ }
+ { author sort.format.names }
+ if$
+}
+
+FUNCTION {editor.organization.sort}
+{ editor empty$
+ { organization empty$
+ { key empty$
+ { "to sort, need editor, organization, or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { "The " #4 organization chop.word sortify }
+ if$
+ }
+ { editor sort.format.names }
+ if$
+}
+
+FUNCTION {presort}
+{ calc.label
+ sort.label
+ " "
+ *
+ type$ "book" =
+ type$ "inbook" =
+ or
+ 'author.editor.sort
+ { type$ "proceedings" =
+ 'editor.organization.sort
+ { type$ "manual" =
+ 'author.organization.sort
+ 'author.sort
+ if$
+ }
+ if$
+ }
+ if$
+ *
+ " "
+ *
+ year field.or.null sortify
+ *
+ " "
+ *
+ title field.or.null
+ sort.format.title
+ *
+ #1 entry.max$ substring$
+ 'sort.key$ :=
+}
+
+ITERATE {presort}
+
+SORT
+
+STRINGS { longest.label last.sort.label next.extra }
+
+INTEGERS { longest.label.width last.extra.num }
+
+FUNCTION {initialize.longest.label}
+{ "" 'longest.label :=
+ #0 int.to.chr$ 'last.sort.label :=
+ "" 'next.extra :=
+ #0 'longest.label.width :=
+ #0 'last.extra.num :=
+}
+
+FUNCTION {forward.pass}
+{ last.sort.label sort.label =
+ { last.extra.num #1 + 'last.extra.num :=
+ last.extra.num int.to.chr$ 'extra.label :=
+ }
+ { "a" chr.to.int$ 'last.extra.num :=
+ "" 'extra.label :=
+ sort.label 'last.sort.label :=
+ }
+ if$
+}
+
+FUNCTION {reverse.pass}
+{ next.extra "b" =
+ { "a" 'extra.label := }
+ 'skip$
+ if$
+ label extra.label * 'label :=
+ label width$ longest.label.width >
+ { label 'longest.label :=
+ label width$ 'longest.label.width :=
+ }
+ 'skip$
+ if$
+ extra.label 'next.extra :=
+}
+
+EXECUTE {initialize.longest.label}
+
+ITERATE {forward.pass}
+
+REVERSE {reverse.pass}
+
+FUNCTION {begin.bib}
+{ et.al.char.used
+ { "\newcommand{\etalchar}[1]{$^{#1}$}" write$ newline$ }
+ 'skip$
+ if$
+ preamble$ empty$
+ 'skip$
+ { preamble$ write$ newline$ }
+ if$
+ "\begin{thebibliography}{" longest.label * "}" * write$ newline$
+}
+
+EXECUTE {begin.bib}
+
+EXECUTE {init.state.consts}
+
+ITERATE {call.type$}
+
+FUNCTION {end.bib}
+{ newline$
+ "\end{thebibliography}" write$ newline$
+}
+
+EXECUTE {end.bib}
diff --git a/biblio/bibtex/contrib/sort-by-letters/README b/biblio/bibtex/contrib/sort-by-letters/README
new file mode 100644
index 0000000000..c66f58e3bf
--- /dev/null
+++ b/biblio/bibtex/contrib/sort-by-letters/README
@@ -0,0 +1,62 @@
+This is an archive for bibliography style files:
+abbrv-letters.bst
+alpha-letters.bst
+apalike-letters.bst
+frplainnat-letters.bst
+plain-letters.bst
+plainnat-letters.bst
+siam-letters.bst
+
+(sort-by-letters v2)
+
+(C) 2006-2012 - Thomas van Oudenhove <vanouden @ enstimac \dot fr>
+Copying of this file is authorized only if either
+ (1) you make absolutely no changes to your copy, including name, or
+ (2) if you do make changes, you name it something other than all standard
+ styles' names (for consistency reasons).
+
+\alphabibitem is from Mael Hill\'ereau <mael \dot hillereau @ free \dot fr>;
+many thanks to him.
+
+These styles do the same stuff as the original files, but they write in the bbl
+file the first letter of the first author or editor name. the references in the
+bibliography are thus sorted by letter, like this :
+A___
+Aamport,...
+K___
+Knuth, ...
+
+WARNINGS (for frplainnat-letters.bst):
+- You MUST use this style with babel package (french).
+- You MUST define these commands for all kinds of citations to work :
+ \andname, \editorname, \editornames, \volumename, \ofname, \numbername,
+ \Numbername, \inname, \pagesname, \pagename, \chaptername, \Inname,
+ \technicalreportname, \Volumename, \janname, \febname, \marname, \aprname,
+ \mayname, \junname, \julname, \augname, \sepname, \octname, \novname,
+ \decname.
+- Bibentries MUST have an 'author', 'editor' or 'organization' attribute.
+
+AVERTISSEMENTS (pour frplainnat-letters.bst):
+- Vous DEVEZ utiliser le package babel (option french) avec ce style.
+- Pour que tous les types de citations fonctionnent correctement, vous DEVEZ
+ d\'efinir ces commandes :
+ \andname, \editorname, \editornames, \volumename, \ofname, \numbername,
+ \Numbername, \inname, \pagesname, \pagename, \chaptername, \Inname,
+ \technicalreportname, \Volumename, \janname, \febname, \marname, \aprname,
+ \mayname, \junname, \julname, \augname, \sepname, \octname, \novname,
+ \decname.
+- Les entr\'ees DOIVENT avoir un 'author', un 'editor' ou une 'organization'.
+
+Known bugs:
+ - sorting doesn't work with 'organization'
+ - 'odd encoding' are not supported, especially with accents (e.g. \"U will go
+ with the U, but will not be supported... and may go with the next letter)
+
+Workarounded or solved bugs:
+ - problems with frplainnat-letters.bst: this style uses several commands to
+ allow customization of dates and some labels of citation; the warnings
+ above will be more explicit for the user. Example, with xspace package:
+ \newcommand*{\technicalreportname}{Rapport Technique\xspace}
+ - some characters were latin1 encoded, they are now typed with ascii only
+
+Enjoy !
diff --git a/biblio/bibtex/contrib/sort-by-letters/abbrv-letters.bst b/biblio/bibtex/contrib/sort-by-letters/abbrv-letters.bst
new file mode 100644
index 0000000000..fd2f514fb9
--- /dev/null
+++ b/biblio/bibtex/contrib/sort-by-letters/abbrv-letters.bst
@@ -0,0 +1,1217 @@
+% BibTeX bibliography style `abbrv-letters'
+%% adapted from standard style `abbrv'
+%% (C) 2006 - Thomas van Oudenhove
+%% when sorting by letter, write the first letter of author
+%% or editor - bug with organization...
+
+ENTRY
+ { address
+ author
+ booktitle
+ chapter
+ edition
+ editor
+ howpublished
+ institution
+ journal
+ key
+ month
+ note
+ number
+ organization
+ pages
+ publisher
+ school
+ series
+ title
+ type
+ volume
+ year
+ }
+ {}
+ { label }
+
+INTEGERS { output.state before.all mid.sentence after.sentence after.block }
+
+FUNCTION {init.state.consts}
+{ #0 'before.all :=
+ #1 'mid.sentence :=
+ #2 'after.sentence :=
+ #3 'after.block :=
+}
+
+STRINGS { s t cur.letter first.letter }
+INTEGERS { first.letter.place first.letter.ascii }
+
+FUNCTION {output.nonnull}
+{ 's :=
+ output.state mid.sentence =
+ { ", " * write$ }
+ { output.state after.block =
+ { add.period$ write$
+ newline$
+ "\newblock " write$
+ }
+ { output.state before.all =
+ 'write$
+ { add.period$ " " * write$ }
+ if$
+ }
+ if$
+ mid.sentence 'output.state :=
+ }
+ if$
+ s
+}
+
+FUNCTION {output}
+{ duplicate$ empty$
+ 'pop$
+ 'output.nonnull
+ if$
+}
+
+FUNCTION {output.check}
+{ 't :=
+ duplicate$ empty$
+ { pop$ "empty " t * " in " * cite$ * warning$ }
+ 'output.nonnull
+ if$
+}
+
+FUNCTION {output.letter}
+{ first.letter cur.letter =
+ { skip$ }
+ { newline$
+ "\alphabibitem{" first.letter * "}" * write$
+ newline$
+ first.letter 'cur.letter := }
+ if$
+ cur.letter "\" =
+ { first.letter 'cur.letter := }
+ { skip$ }
+ if$
+}
+
+FUNCTION {output.bibitem}
+{ newline$
+ "\bibitem{" write$
+ cite$ write$
+ "}" write$
+ newline$
+ ""
+ before.all 'output.state :=
+}
+
+FUNCTION {fin.entry}
+{ add.period$
+ write$
+ newline$
+}
+
+FUNCTION {new.block}
+{ output.state before.all =
+ 'skip$
+ { after.block 'output.state := }
+ if$
+}
+
+FUNCTION {new.sentence}
+{ output.state after.block =
+ 'skip$
+ { output.state before.all =
+ 'skip$
+ { after.sentence 'output.state := }
+ if$
+ }
+ if$
+}
+
+FUNCTION {not}
+{ { #0 }
+ { #1 }
+ if$
+}
+
+FUNCTION {and}
+{ 'skip$
+ { pop$ #0 }
+ if$
+}
+
+FUNCTION {or}
+{ { pop$ #1 }
+ 'skip$
+ if$
+}
+
+FUNCTION {new.block.checka}
+{ empty$
+ 'skip$
+ 'new.block
+ if$
+}
+
+FUNCTION {new.block.checkb}
+{ empty$
+ swap$ empty$
+ and
+ 'skip$
+ 'new.block
+ if$
+}
+
+FUNCTION {new.sentence.checka}
+{ empty$
+ 'skip$
+ 'new.sentence
+ if$
+}
+
+FUNCTION {new.sentence.checkb}
+{ empty$
+ swap$ empty$
+ and
+ 'skip$
+ 'new.sentence
+ if$
+}
+
+FUNCTION {field.or.null}
+{ duplicate$ empty$
+ { pop$ "" }
+ 'skip$
+ if$
+}
+
+FUNCTION {emphasize}
+{ duplicate$ empty$
+ { pop$ "" }
+ { "{\em " swap$ * "}" * }
+ if$
+}
+
+FUNCTION { author.find.first.letter }
+{ author #1 "{vv }{ll }{ff }, {jj }" format.name$ "u" change.case$
+ purify$ first.letter.place #1 substring$ 'first.letter :=
+ first.letter chr.to.int$ 'first.letter.ascii :=
+}
+
+FUNCTION { editor.find.first.letter }
+{ editor #1 "{vv }{ll }{ff }, {jj }" format.name$ "u" change.case$
+ purify$ first.letter.place #1 substring$ 'first.letter :=
+ first.letter chr.to.int$ 'first.letter.ascii :=
+}
+
+FUNCTION { organization.find.first.letter }
+{ organization "u" change.case$
+ purify$ first.letter.place #1 substring$ 'first.letter :=
+ first.letter chr.to.int$ 'first.letter.ascii :=
+}
+
+FUNCTION { find.firstletter }
+{ author empty$
+ { editor empty$
+% { organization empty$
+ { "Nor author, editor neither organization for entry " cite$ * warning$ }
+% { organization.find.first.letter
+% { first.letter.ascii #64 > first.letter.ascii #91 < and
+% first.letter.ascii #96 > first.letter.ascii #123 < and or not }
+% { first.letter.place #1 + 'first.letter.place :=
+% organization.find.first.letter }
+% while$ }
+% if$ }
+ { editor.find.first.letter
+ { first.letter.ascii #64 > first.letter.ascii #91 < and
+ first.letter.ascii #96 > first.letter.ascii #123 < and or not }
+ { first.letter.place #1 + 'first.letter.place :=
+ editor.find.first.letter }
+ while$
+ }
+ if$
+ }
+ { author.find.first.letter
+ { first.letter.ascii #64 > first.letter.ascii #91 < and
+ first.letter.ascii #96 > first.letter.ascii #123 < and or not }
+ { first.letter.place #1 + 'first.letter.place :=
+ author.find.first.letter }
+ while$
+ }
+ if$
+ #1 'first.letter.place :=
+}
+
+INTEGERS { nameptr namesleft numnames }
+
+FUNCTION {format.names}
+{ 's :=
+ #1 'nameptr :=
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ { s nameptr "{f.~}{vv~}{ll}{, jj}" format.name$ 't :=
+ nameptr #1 >
+ { namesleft #1 >
+ { ", " * t * }
+ { numnames #2 >
+ { "," * }
+ 'skip$
+ if$
+ t "others" =
+ { " et~al." * }
+ { " and " * t * }
+ if$
+ }
+ if$
+ }
+ 't
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+}
+
+FUNCTION {format.authors}
+{ author empty$
+ { "" }
+ { author format.names }
+ if$
+}
+
+FUNCTION {format.editors}
+{ editor empty$
+ { "" }
+ { editor format.names
+ editor num.names$ #1 >
+ { ", editors" * }
+ { ", editor" * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.title}
+{ title empty$
+ { "" }
+ { title "t" change.case$ }
+ if$
+}
+
+FUNCTION {n.dashify}
+{ 't :=
+ ""
+ { t empty$ not }
+ { t #1 #1 substring$ "-" =
+ { t #1 #2 substring$ "--" = not
+ { "--" *
+ t #2 global.max$ substring$ 't :=
+ }
+ { { t #1 #1 substring$ "-" = }
+ { "-" *
+ t #2 global.max$ substring$ 't :=
+ }
+ while$
+ }
+ if$
+ }
+ { t #1 #1 substring$ *
+ t #2 global.max$ substring$ 't :=
+ }
+ if$
+ }
+ while$
+}
+
+FUNCTION {format.date}
+{ year empty$
+ { month empty$
+ { "" }
+ { "there's a month but no year in " cite$ * warning$
+ month
+ }
+ if$
+ }
+ { month empty$
+ 'year
+ { month " " * year * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.btitle}
+{ title emphasize
+}
+
+FUNCTION {tie.or.space.connect}
+{ duplicate$ text.length$ #3 <
+ { "~" }
+ { " " }
+ if$
+ swap$ * *
+}
+
+FUNCTION {either.or.check}
+{ empty$
+ 'pop$
+ { "can't use both " swap$ * " fields in " * cite$ * warning$ }
+ if$
+}
+
+FUNCTION {format.bvolume}
+{ volume empty$
+ { "" }
+ { "volume" volume tie.or.space.connect
+ series empty$
+ 'skip$
+ { " of " * series emphasize * }
+ if$
+ "volume and number" number either.or.check
+ }
+ if$
+}
+
+FUNCTION {format.number.series}
+{ volume empty$
+ { number empty$
+ { series field.or.null }
+ { output.state mid.sentence =
+ { "number" }
+ { "Number" }
+ if$
+ number tie.or.space.connect
+ series empty$
+ { "there's a number but no series in " cite$ * warning$ }
+ { " in " * series * }
+ if$
+ }
+ if$
+ }
+ { "" }
+ if$
+}
+
+FUNCTION {format.edition}
+{ edition empty$
+ { "" }
+ { output.state mid.sentence =
+ { edition "l" change.case$ " edition" * }
+ { edition "t" change.case$ " edition" * }
+ if$
+ }
+ if$
+}
+
+INTEGERS { multiresult }
+
+FUNCTION {multi.page.check}
+{ 't :=
+ #0 'multiresult :=
+ { multiresult not
+ t empty$ not
+ and
+ }
+ { t #1 #1 substring$
+ duplicate$ "-" =
+ swap$ duplicate$ "," =
+ swap$ "+" =
+ or or
+ { #1 'multiresult := }
+ { t #2 global.max$ substring$ 't := }
+ if$
+ }
+ while$
+ multiresult
+}
+
+FUNCTION {format.pages}
+{ pages empty$
+ { "" }
+ { pages multi.page.check
+ { "pages" pages n.dashify tie.or.space.connect }
+ { "page" pages tie.or.space.connect }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.vol.num.pages}
+{ volume field.or.null
+ number empty$
+ 'skip$
+ { "(" number * ")" * *
+ volume empty$
+ { "there's a number but no volume in " cite$ * warning$ }
+ 'skip$
+ if$
+ }
+ if$
+ pages empty$
+ 'skip$
+ { duplicate$ empty$
+ { pop$ format.pages }
+ { ":" * pages n.dashify * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.chapter.pages}
+{ chapter empty$
+ 'format.pages
+ { type empty$
+ { "chapter" }
+ { type "l" change.case$ }
+ if$
+ chapter tie.or.space.connect
+ pages empty$
+ 'skip$
+ { ", " * format.pages * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.in.ed.booktitle}
+{ booktitle empty$
+ { "" }
+ { editor empty$
+ { "In " booktitle emphasize * }
+ { "In " format.editors * ", " * booktitle emphasize * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {empty.misc.check}
+{ author empty$ title empty$ howpublished empty$
+ month empty$ year empty$ note empty$
+ and and and and and
+ key empty$ not and
+ { "all relevant fields are empty in " cite$ * warning$ }
+ 'skip$
+ if$
+}
+
+FUNCTION {format.thesis.type}
+{ type empty$
+ 'skip$
+ { pop$
+ type "t" change.case$
+ }
+ if$
+}
+
+FUNCTION {format.tr.number}
+{ type empty$
+ { "Technical Report" }
+ 'type
+ if$
+ number empty$
+ { "t" change.case$ }
+ { number tie.or.space.connect }
+ if$
+}
+
+FUNCTION {format.article.crossref}
+{ key empty$
+ { journal empty$
+ { "need key or journal for " cite$ * " to crossref " * crossref *
+ warning$
+ ""
+ }
+ { "In {\em " journal * "\/}" * }
+ if$
+ }
+ { "In " key * }
+ if$
+ " \cite{" * crossref * "}" *
+}
+
+FUNCTION {format.crossref.editor}
+{ editor #1 "{vv~}{ll}" format.name$
+ editor num.names$ duplicate$
+ #2 >
+ { pop$ " et~al." * }
+ { #2 <
+ 'skip$
+ { editor #2 "{ff }{vv }{ll}{ jj}" format.name$ "others" =
+ { " et~al." * }
+ { " and " * editor #2 "{vv~}{ll}" format.name$ * }
+ if$
+ }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.book.crossref}
+{ volume empty$
+ { "empty volume in " cite$ * "'s crossref of " * crossref * warning$
+ "In "
+ }
+ { "Volume" volume tie.or.space.connect
+ " of " *
+ }
+ if$
+ editor empty$
+ editor field.or.null author field.or.null =
+ or
+ { key empty$
+ { series empty$
+ { "need editor, key, or series for " cite$ * " to crossref " *
+ crossref * warning$
+ "" *
+ }
+ { "{\em " * series * "\/}" * }
+ if$
+ }
+ { key * }
+ if$
+ }
+ { format.crossref.editor * }
+ if$
+ " \cite{" * crossref * "}" *
+}
+
+FUNCTION {format.incoll.inproc.crossref}
+{ editor empty$
+ editor field.or.null author field.or.null =
+ or
+ { key empty$
+ { booktitle empty$
+ { "need editor, key, or booktitle for " cite$ * " to crossref " *
+ crossref * warning$
+ ""
+ }
+ { "In {\em " booktitle * "\/}" * }
+ if$
+ }
+ { "In " key * }
+ if$
+ }
+ { "In " format.crossref.editor * }
+ if$
+ " \cite{" * crossref * "}" *
+}
+
+FUNCTION {article}
+{ find.firstletter
+ output.letter
+ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.title "title" output.check
+ new.block
+ crossref missing$
+ { journal emphasize "journal" output.check
+ format.vol.num.pages output
+ format.date "year" output.check
+ }
+ { format.article.crossref output.nonnull
+ format.pages output
+ }
+ if$
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {book}
+{ find.firstletter
+ output.letter
+ output.bibitem
+ author empty$
+ { format.editors "author and editor" output.check }
+ { format.authors output.nonnull
+ crossref missing$
+ { "author and editor" editor either.or.check }
+ 'skip$
+ if$
+ }
+ if$
+ new.block
+ format.btitle "title" output.check
+ crossref missing$
+ { format.bvolume output
+ new.block
+ format.number.series output
+ new.sentence
+ publisher "publisher" output.check
+ address output
+ }
+ { new.block
+ format.book.crossref output.nonnull
+ }
+ if$
+ format.edition output
+ format.date "year" output.check
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {booklet}
+{ find.firstletter
+ output.letter
+ output.bibitem
+ format.authors output
+ new.block
+ format.title "title" output.check
+ howpublished address new.block.checkb
+ howpublished output
+ address output
+ format.date output
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {inbook}
+{ find.firstletter
+ output.letter
+ output.bibitem
+ author empty$
+ { format.editors "author and editor" output.check }
+ { format.authors output.nonnull
+ crossref missing$
+ { "author and editor" editor either.or.check }
+ 'skip$
+ if$
+ }
+ if$
+ new.block
+ format.btitle "title" output.check
+ crossref missing$
+ { format.bvolume output
+ format.chapter.pages "chapter and pages" output.check
+ new.block
+ format.number.series output
+ new.sentence
+ publisher "publisher" output.check
+ address output
+ }
+ { format.chapter.pages "chapter and pages" output.check
+ new.block
+ format.book.crossref output.nonnull
+ }
+ if$
+ format.edition output
+ format.date "year" output.check
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {incollection}
+{ find.firstletter
+ output.letter
+ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.title "title" output.check
+ new.block
+ crossref missing$
+ { format.in.ed.booktitle "booktitle" output.check
+ format.bvolume output
+ format.number.series output
+ format.chapter.pages output
+ new.sentence
+ publisher "publisher" output.check
+ address output
+ format.edition output
+ format.date "year" output.check
+ }
+ { format.incoll.inproc.crossref output.nonnull
+ format.chapter.pages output
+ }
+ if$
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {inproceedings}
+{ find.firstletter
+ output.letter
+ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.title "title" output.check
+ new.block
+ crossref missing$
+ { format.in.ed.booktitle "booktitle" output.check
+ format.bvolume output
+ format.number.series output
+ format.pages output
+ address empty$
+ { organization publisher new.sentence.checkb
+ organization output
+ publisher output
+ format.date "year" output.check
+ }
+ { address output.nonnull
+ format.date "year" output.check
+ new.sentence
+ organization output
+ publisher output
+ }
+ if$
+ }
+ { format.incoll.inproc.crossref output.nonnull
+ format.pages output
+ }
+ if$
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {conference} { inproceedings }
+
+FUNCTION {manual}
+{ find.firstletter
+ output.letter
+ output.bibitem
+ author empty$
+ { organization empty$
+ 'skip$
+ { organization output.nonnull
+ address output
+ }
+ if$
+ }
+ { format.authors output.nonnull }
+ if$
+ new.block
+ format.btitle "title" output.check
+ author empty$
+ { organization empty$
+ { address new.block.checka
+ address output
+ }
+ 'skip$
+ if$
+ }
+ { organization address new.block.checkb
+ organization output
+ address output
+ }
+ if$
+ format.edition output
+ format.date output
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {mastersthesis}
+{ find.firstletter
+ output.letter
+ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.title "title" output.check
+ new.block
+ "Master's thesis" format.thesis.type output.nonnull
+ school "school" output.check
+ address output
+ format.date "year" output.check
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {misc}
+{ find.firstletter
+ output.letter
+ output.bibitem
+ format.authors output
+ title howpublished new.block.checkb
+ format.title output
+ howpublished new.block.checka
+ howpublished output
+ format.date output
+ new.block
+ note output
+ fin.entry
+ empty.misc.check
+}
+
+FUNCTION {phdthesis}
+{ find.firstletter
+ output.letter
+ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.btitle "title" output.check
+ new.block
+ "PhD thesis" format.thesis.type output.nonnull
+ school "school" output.check
+ address output
+ format.date "year" output.check
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {proceedings}
+{ find.firstletter
+ output.letter
+ output.bibitem
+ editor empty$
+ { organization output }
+ { format.editors output.nonnull }
+ if$
+ new.block
+ format.btitle "title" output.check
+ format.bvolume output
+ format.number.series output
+ address empty$
+ { editor empty$
+ { publisher new.sentence.checka }
+ { organization publisher new.sentence.checkb
+ organization output
+ }
+ if$
+ publisher output
+ format.date "year" output.check
+ }
+ { address output.nonnull
+ format.date "year" output.check
+ new.sentence
+ editor empty$
+ 'skip$
+ { organization output }
+ if$
+ publisher output
+ }
+ if$
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {techreport}
+{ find.firstletter
+ output.letter
+ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.title "title" output.check
+ new.block
+ format.tr.number output.nonnull
+ institution "institution" output.check
+ address output
+ format.date "year" output.check
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {unpublished}
+{ find.firstletter
+ output.letter
+ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.title "title" output.check
+ new.block
+ note "note" output.check
+ format.date output
+ fin.entry
+}
+
+FUNCTION {default.type} { misc }
+
+MACRO {jan} {"Jan."}
+
+MACRO {feb} {"Feb."}
+
+MACRO {mar} {"Mar."}
+
+MACRO {apr} {"Apr."}
+
+MACRO {may} {"May"}
+
+MACRO {jun} {"June"}
+
+MACRO {jul} {"July"}
+
+MACRO {aug} {"Aug."}
+
+MACRO {sep} {"Sept."}
+
+MACRO {oct} {"Oct."}
+
+MACRO {nov} {"Nov."}
+
+MACRO {dec} {"Dec."}
+
+MACRO {acmcs} {"ACM Comput. Surv."}
+
+MACRO {acta} {"Acta Inf."}
+
+MACRO {cacm} {"Commun. ACM"}
+
+MACRO {ibmjrd} {"IBM J. Res. Dev."}
+
+MACRO {ibmsj} {"IBM Syst.~J."}
+
+MACRO {ieeese} {"IEEE Trans. Softw. Eng."}
+
+MACRO {ieeetc} {"IEEE Trans. Comput."}
+
+MACRO {ieeetcad}
+ {"IEEE Trans. Comput.-Aided Design Integrated Circuits"}
+
+MACRO {ipl} {"Inf. Process. Lett."}
+
+MACRO {jacm} {"J.~ACM"}
+
+MACRO {jcss} {"J.~Comput. Syst. Sci."}
+
+MACRO {scp} {"Sci. Comput. Programming"}
+
+MACRO {sicomp} {"SIAM J. Comput."}
+
+MACRO {tocs} {"ACM Trans. Comput. Syst."}
+
+MACRO {tods} {"ACM Trans. Database Syst."}
+
+MACRO {tog} {"ACM Trans. Gr."}
+
+MACRO {toms} {"ACM Trans. Math. Softw."}
+
+MACRO {toois} {"ACM Trans. Office Inf. Syst."}
+
+MACRO {toplas} {"ACM Trans. Prog. Lang. Syst."}
+
+MACRO {tcs} {"Theoretical Comput. Sci."}
+
+READ
+
+FUNCTION {sortify}
+{ purify$
+ "l" change.case$
+}
+
+INTEGERS { len }
+
+FUNCTION {chop.word}
+{ 's :=
+ 'len :=
+ s #1 len substring$ =
+ { s len #1 + global.max$ substring$ }
+ 's
+ if$
+}
+
+FUNCTION {sort.format.names}
+{ 's :=
+ #1 'nameptr :=
+ ""
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ { nameptr #1 >
+ { " " * }
+ 'skip$
+ if$
+ s nameptr "{vv{ } }{ll{ }}{ f{ }}{ jj{ }}" format.name$ 't :=
+ nameptr numnames = t "others" = and
+ { "et al" * }
+ { t sortify * }
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+}
+
+FUNCTION {sort.format.title}
+{ 't :=
+ "A " #2
+ "An " #3
+ "The " #4 t chop.word
+ chop.word
+ chop.word
+ sortify
+ #1 global.max$ substring$
+}
+
+FUNCTION {author.sort}
+{ author empty$
+ { key empty$
+ { "to sort, need author or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { author sort.format.names }
+ if$
+}
+
+FUNCTION {author.editor.sort}
+{ author empty$
+ { editor empty$
+ { key empty$
+ { "to sort, need author, editor, or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { editor sort.format.names }
+ if$
+ }
+ { author sort.format.names }
+ if$
+}
+
+FUNCTION {author.organization.sort}
+{ author empty$
+ { organization empty$
+ { key empty$
+ { "to sort, need author, organization, or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { "The " #4 organization chop.word sortify }
+ if$
+ }
+ { author sort.format.names }
+ if$
+}
+
+FUNCTION {editor.organization.sort}
+{ editor empty$
+ { organization empty$
+ { key empty$
+ { "to sort, need editor, organization, or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { "The " #4 organization chop.word sortify }
+ if$
+ }
+ { editor sort.format.names }
+ if$
+}
+
+FUNCTION {presort}
+{ type$ "book" =
+ type$ "inbook" =
+ or
+ 'author.editor.sort
+ { type$ "proceedings" =
+ 'editor.organization.sort
+ { type$ "manual" =
+ 'author.organization.sort
+ 'author.sort
+ if$
+ }
+ if$
+ }
+ if$
+ " "
+ *
+ year field.or.null sortify
+ *
+ " "
+ *
+ title field.or.null
+ sort.format.title
+ *
+ #1 entry.max$ substring$
+ 'sort.key$ :=
+}
+
+ITERATE {presort}
+
+SORT
+
+STRINGS { longest.label }
+
+INTEGERS { number.label longest.label.width }
+
+FUNCTION {initialize.longest.label}
+{ "" 'longest.label :=
+ "\" 'cur.letter :=
+ #1 'first.letter.place :=
+ #1 'number.label :=
+ #0 'longest.label.width :=
+}
+
+FUNCTION { def.alphabibitem }
+{ "\def\alphabibitem#1{%" write$ newline$
+ "\expandafter\ifx\csname firstalphabibitem\endcsname" write$ newline$
+ "\relax\def\firstalphabibitem{}" write$ newline$
+ "\else\expandafter" write$ newline$
+ "\ifx\csname alphabibitemskip\endcsname" write$ newline$
+ "\relax\bigskip" write$ newline$
+ "\else\alphabibitemskip" write$ newline$
+ "\fi" write$ newline$
+ "\fi" write$ newline$
+ "\penalty-200\expandafter" write$ newline$
+ "\ifx\csname alphabibitemlabel\endcsname" write$ newline$
+ "\relax\expandafter" write$ newline$
+ "\ifx\csname alphabibitemcontent\endcsname\relax" write$ newline$
+ "\item[\LARGE\bfseries\MakeUppercase{#1}]" write$ newline$
+ "\hfill\vskip 1ex\hrule\medskip" write$ newline$
+ "\else\item[\Large\bfseries\MakeUppercase{#1}]" write$ newline$
+ "\alphabibitemcontent{\MakeUppercase{#1}}%" write$ newline$
+ "\fi" write$ newline$
+ "\else\expandafter" write$ newline$
+ "\ifx\csname alphabibitemcontent\endcsname\relax" write$ newline$
+ "\item[\alphabibitemlabel{\MakeUppercase{#1}}]" write$ newline$
+ "\vskip 1ex\hrule\medskip" write$ newline$
+ "\else\item[\alphabibitemlabel{\MakeUppercase{#1}}]" write$ newline$
+ "\alphabibitemcontent{\MakeUppercase{#1}}%" write$ newline$
+ "\fi" write$ newline$
+ "\fi}" write$ newline$
+ newline$
+}
+
+FUNCTION {longest.label.pass}
+{ number.label int.to.str$ 'label :=
+ number.label #1 + 'number.label :=
+ label width$ longest.label.width >
+ { label 'longest.label :=
+ label width$ 'longest.label.width :=
+ }
+ 'skip$
+ if$
+}
+
+EXECUTE {initialize.longest.label}
+
+ITERATE {longest.label.pass}
+
+FUNCTION {begin.bib}
+{ preamble$ empty$
+ 'skip$
+ { preamble$ write$ newline$ }
+ if$
+ def.alphabibitem
+ "\begin{thebibliography}{" longest.label * "}" * write$ newline$
+}
+
+EXECUTE {begin.bib}
+
+EXECUTE {init.state.consts}
+
+ITERATE {call.type$}
+
+FUNCTION {end.bib}
+{ newline$
+ "\end{thebibliography}" write$ newline$
+}
+
+EXECUTE {end.bib}
diff --git a/biblio/bibtex/contrib/sort-by-letters/alpha-letters.bst b/biblio/bibtex/contrib/sort-by-letters/alpha-letters.bst
new file mode 100644
index 0000000000..59e833c672
--- /dev/null
+++ b/biblio/bibtex/contrib/sort-by-letters/alpha-letters.bst
@@ -0,0 +1,1377 @@
+% BibTeX bibliography style `alpha-letters'
+%% adapted from standard style `alpha'
+%% (C) 2006 - Thomas van Oudenhove
+%% when sorting by letter, write the first letter of author
+%% or editor - bug with organization...
+
+ENTRY
+ { address
+ author
+ booktitle
+ chapter
+ edition
+ editor
+ howpublished
+ institution
+ journal
+ key
+ month
+ note
+ number
+ organization
+ pages
+ publisher
+ school
+ series
+ title
+ type
+ volume
+ year
+ }
+ {}
+ { label extra.label sort.label }
+
+INTEGERS { output.state before.all mid.sentence after.sentence after.block }
+
+FUNCTION {init.state.consts}
+{ #0 'before.all :=
+ #1 'mid.sentence :=
+ #2 'after.sentence :=
+ #3 'after.block :=
+}
+
+STRINGS { s t cur.letter first.letter }
+INTEGERS { first.letter.place first.letter.ascii }
+
+FUNCTION {output.nonnull}
+{ 's :=
+ output.state mid.sentence =
+ { ", " * write$ }
+ { output.state after.block =
+ { add.period$ write$
+ newline$
+ "\newblock " write$
+ }
+ { output.state before.all =
+ 'write$
+ { add.period$ " " * write$ }
+ if$
+ }
+ if$
+ mid.sentence 'output.state :=
+ }
+ if$
+ s
+}
+
+FUNCTION {output}
+{ duplicate$ empty$
+ 'pop$
+ 'output.nonnull
+ if$
+}
+
+FUNCTION {output.check}
+{ 't :=
+ duplicate$ empty$
+ { pop$ "empty " t * " in " * cite$ * warning$ }
+ 'output.nonnull
+ if$
+}
+
+FUNCTION {output.letter}
+{ first.letter cur.letter =
+ { skip$ }
+ { newline$
+ "\alphabibitem{" first.letter * "}" * write$
+ newline$
+ first.letter 'cur.letter := }
+ if$
+ cur.letter "\" =
+ { first.letter 'cur.letter := }
+ { skip$ }
+ if$
+}
+
+FUNCTION {output.bibitem}
+{ newline$
+ "\bibitem[" write$
+ label write$
+ "]{" write$
+ cite$ write$
+ "}" write$
+ newline$
+ ""
+ before.all 'output.state :=
+}
+
+FUNCTION {fin.entry}
+{ add.period$
+ write$
+ newline$
+}
+
+FUNCTION {new.block}
+{ output.state before.all =
+ 'skip$
+ { after.block 'output.state := }
+ if$
+}
+
+FUNCTION {new.sentence}
+{ output.state after.block =
+ 'skip$
+ { output.state before.all =
+ 'skip$
+ { after.sentence 'output.state := }
+ if$
+ }
+ if$
+}
+
+FUNCTION {not}
+{ { #0 }
+ { #1 }
+ if$
+}
+
+FUNCTION {and}
+{ 'skip$
+ { pop$ #0 }
+ if$
+}
+
+FUNCTION {or}
+{ { pop$ #1 }
+ 'skip$
+ if$
+}
+
+FUNCTION {new.block.checka}
+{ empty$
+ 'skip$
+ 'new.block
+ if$
+}
+
+FUNCTION {new.block.checkb}
+{ empty$
+ swap$ empty$
+ and
+ 'skip$
+ 'new.block
+ if$
+}
+
+FUNCTION {new.sentence.checka}
+{ empty$
+ 'skip$
+ 'new.sentence
+ if$
+}
+
+FUNCTION {new.sentence.checkb}
+{ empty$
+ swap$ empty$
+ and
+ 'skip$
+ 'new.sentence
+ if$
+}
+
+FUNCTION {field.or.null}
+{ duplicate$ empty$
+ { pop$ "" }
+ 'skip$
+ if$
+}
+
+FUNCTION {emphasize}
+{ duplicate$ empty$
+ { pop$ "" }
+ { "{\em " swap$ * "}" * }
+ if$
+}
+
+FUNCTION { author.find.first.letter }
+{ author #1 "{vv }{ll }{ff }, {jj }" format.name$ "u" change.case$
+ purify$ first.letter.place #1 substring$ 'first.letter :=
+ first.letter chr.to.int$ 'first.letter.ascii :=
+}
+
+FUNCTION { editor.find.first.letter }
+{ editor #1 "{vv }{ll }{ff }, {jj }" format.name$ "u" change.case$
+ purify$ first.letter.place #1 substring$ 'first.letter :=
+ first.letter chr.to.int$ 'first.letter.ascii :=
+}
+
+FUNCTION { organization.find.first.letter }
+{ organization #1 "{vv }{ll }{ff }, {jj }" format.name$ "u" change.case$
+ purify$ first.letter.place #1 substring$ 'first.letter :=
+ first.letter chr.to.int$ 'first.letter.ascii :=
+}
+
+FUNCTION { find.firstletter }
+{ author empty$
+ { editor empty$
+% { organization empty$
+ { "Nor author, editor neither organization for entry " cite$ * warning$ }
+% { organization.find.first.letter
+% { first.letter.ascii #64 > first.letter.ascii #91 < and
+% first.letter.ascii #96 > first.letter.ascii #123 < and or not }
+% { first.letter.place #1 + 'first.letter.place :=
+% organization.find.first.letter }
+% while$ }
+% if$ }
+ { editor.find.first.letter
+ { first.letter.ascii #64 > first.letter.ascii #91 < and
+ first.letter.ascii #96 > first.letter.ascii #123 < and or not }
+ { first.letter.place #1 + 'first.letter.place :=
+ editor.find.first.letter }
+ while$
+ }
+ if$
+ }
+ { author.find.first.letter
+ { first.letter.ascii #64 > first.letter.ascii #91 < and
+ first.letter.ascii #96 > first.letter.ascii #123 < and or not }
+ { first.letter.place #1 + 'first.letter.place :=
+ author.find.first.letter }
+ while$
+ }
+ if$
+ #1 'first.letter.place :=
+}
+
+INTEGERS { nameptr namesleft numnames }
+
+FUNCTION {format.names}
+{ 's :=
+ #1 'nameptr :=
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ { s nameptr "{ff~}{vv~}{ll}{, jj}" format.name$ 't :=
+ nameptr #1 >
+ { namesleft #1 >
+ { ", " * t * }
+ { numnames #2 >
+ { "," * }
+ 'skip$
+ if$
+ t "others" =
+ { " et~al." * }
+ { " and " * t * }
+ if$
+ }
+ if$
+ }
+ 't
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+}
+
+FUNCTION {format.authors}
+{ author empty$
+ { "" }
+ { author format.names }
+ if$
+}
+
+FUNCTION {format.editors}
+{ editor empty$
+ { "" }
+ { editor format.names
+ editor num.names$ #1 >
+ { ", editors" * }
+ { ", editor" * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.title}
+{ title empty$
+ { "" }
+ { title "t" change.case$ }
+ if$
+}
+
+FUNCTION {n.dashify}
+{ 't :=
+ ""
+ { t empty$ not }
+ { t #1 #1 substring$ "-" =
+ { t #1 #2 substring$ "--" = not
+ { "--" *
+ t #2 global.max$ substring$ 't :=
+ }
+ { { t #1 #1 substring$ "-" = }
+ { "-" *
+ t #2 global.max$ substring$ 't :=
+ }
+ while$
+ }
+ if$
+ }
+ { t #1 #1 substring$ *
+ t #2 global.max$ substring$ 't :=
+ }
+ if$
+ }
+ while$
+}
+
+FUNCTION {format.date}
+{ year empty$
+ { month empty$
+ { "" }
+ { "there's a month but no year in " cite$ * warning$
+ month
+ }
+ if$
+ }
+ { month empty$
+ 'year
+ { month " " * year * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.btitle}
+{ title emphasize
+}
+
+FUNCTION {tie.or.space.connect}
+{ duplicate$ text.length$ #3 <
+ { "~" }
+ { " " }
+ if$
+ swap$ * *
+}
+
+FUNCTION {either.or.check}
+{ empty$
+ 'pop$
+ { "can't use both " swap$ * " fields in " * cite$ * warning$ }
+ if$
+}
+
+FUNCTION {format.bvolume}
+{ volume empty$
+ { "" }
+ { "volume" volume tie.or.space.connect
+ series empty$
+ 'skip$
+ { " of " * series emphasize * }
+ if$
+ "volume and number" number either.or.check
+ }
+ if$
+}
+
+FUNCTION {format.number.series}
+{ volume empty$
+ { number empty$
+ { series field.or.null }
+ { output.state mid.sentence =
+ { "number" }
+ { "Number" }
+ if$
+ number tie.or.space.connect
+ series empty$
+ { "there's a number but no series in " cite$ * warning$ }
+ { " in " * series * }
+ if$
+ }
+ if$
+ }
+ { "" }
+ if$
+}
+
+FUNCTION {format.edition}
+{ edition empty$
+ { "" }
+ { output.state mid.sentence =
+ { edition "l" change.case$ " edition" * }
+ { edition "t" change.case$ " edition" * }
+ if$
+ }
+ if$
+}
+
+INTEGERS { multiresult }
+
+FUNCTION {multi.page.check}
+{ 't :=
+ #0 'multiresult :=
+ { multiresult not
+ t empty$ not
+ and
+ }
+ { t #1 #1 substring$
+ duplicate$ "-" =
+ swap$ duplicate$ "," =
+ swap$ "+" =
+ or or
+ { #1 'multiresult := }
+ { t #2 global.max$ substring$ 't := }
+ if$
+ }
+ while$
+ multiresult
+}
+
+FUNCTION {format.pages}
+{ pages empty$
+ { "" }
+ { pages multi.page.check
+ { "pages" pages n.dashify tie.or.space.connect }
+ { "page" pages tie.or.space.connect }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.vol.num.pages}
+{ volume field.or.null
+ number empty$
+ 'skip$
+ { "(" number * ")" * *
+ volume empty$
+ { "there's a number but no volume in " cite$ * warning$ }
+ 'skip$
+ if$
+ }
+ if$
+ pages empty$
+ 'skip$
+ { duplicate$ empty$
+ { pop$ format.pages }
+ { ":" * pages n.dashify * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.chapter.pages}
+{ chapter empty$
+ 'format.pages
+ { type empty$
+ { "chapter" }
+ { type "l" change.case$ }
+ if$
+ chapter tie.or.space.connect
+ pages empty$
+ 'skip$
+ { ", " * format.pages * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.in.ed.booktitle}
+{ booktitle empty$
+ { "" }
+ { editor empty$
+ { "In " booktitle emphasize * }
+ { "In " format.editors * ", " * booktitle emphasize * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {empty.misc.check}
+{ author empty$ title empty$ howpublished empty$
+ month empty$ year empty$ note empty$
+ and and and and and
+ key empty$ not and
+ { "all relevant fields are empty in " cite$ * warning$ }
+ 'skip$
+ if$
+}
+
+FUNCTION {format.thesis.type}
+{ type empty$
+ 'skip$
+ { pop$
+ type "t" change.case$
+ }
+ if$
+}
+
+FUNCTION {format.tr.number}
+{ type empty$
+ { "Technical Report" }
+ 'type
+ if$
+ number empty$
+ { "t" change.case$ }
+ { number tie.or.space.connect }
+ if$
+}
+
+FUNCTION {format.article.crossref}
+{ key empty$
+ { journal empty$
+ { "need key or journal for " cite$ * " to crossref " * crossref *
+ warning$
+ ""
+ }
+ { "In {\em " journal * "\/}" * }
+ if$
+ }
+ { "In " key * }
+ if$
+ " \cite{" * crossref * "}" *
+}
+
+FUNCTION {format.crossref.editor}
+{ editor #1 "{vv~}{ll}" format.name$
+ editor num.names$ duplicate$
+ #2 >
+ { pop$ " et~al." * }
+ { #2 <
+ 'skip$
+ { editor #2 "{ff }{vv }{ll}{ jj}" format.name$ "others" =
+ { " et~al." * }
+ { " and " * editor #2 "{vv~}{ll}" format.name$ * }
+ if$
+ }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.book.crossref}
+{ volume empty$
+ { "empty volume in " cite$ * "'s crossref of " * crossref * warning$
+ "In "
+ }
+ { "Volume" volume tie.or.space.connect
+ " of " *
+ }
+ if$
+ editor empty$
+ editor field.or.null author field.or.null =
+ or
+ { key empty$
+ { series empty$
+ { "need editor, key, or series for " cite$ * " to crossref " *
+ crossref * warning$
+ "" *
+ }
+ { "{\em " * series * "\/}" * }
+ if$
+ }
+ { key * }
+ if$
+ }
+ { format.crossref.editor * }
+ if$
+ " \cite{" * crossref * "}" *
+}
+
+FUNCTION {format.incoll.inproc.crossref}
+{ editor empty$
+ editor field.or.null author field.or.null =
+ or
+ { key empty$
+ { booktitle empty$
+ { "need editor, key, or booktitle for " cite$ * " to crossref " *
+ crossref * warning$
+ ""
+ }
+ { "In {\em " booktitle * "\/}" * }
+ if$
+ }
+ { "In " key * }
+ if$
+ }
+ { "In " format.crossref.editor * }
+ if$
+ " \cite{" * crossref * "}" *
+}
+
+FUNCTION {article}
+{ find.firstletter
+ output.letter
+ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.title "title" output.check
+ new.block
+ crossref missing$
+ { journal emphasize "journal" output.check
+ format.vol.num.pages output
+ format.date "year" output.check
+ }
+ { format.article.crossref output.nonnull
+ format.pages output
+ }
+ if$
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {book}
+{ find.firstletter
+ output.letter
+ output.bibitem
+ author empty$
+ { format.editors "author and editor" output.check }
+ { format.authors output.nonnull
+ crossref missing$
+ { "author and editor" editor either.or.check }
+ 'skip$
+ if$
+ }
+ if$
+ new.block
+ format.btitle "title" output.check
+ crossref missing$
+ { format.bvolume output
+ new.block
+ format.number.series output
+ new.sentence
+ publisher "publisher" output.check
+ address output
+ }
+ { new.block
+ format.book.crossref output.nonnull
+ }
+ if$
+ format.edition output
+ format.date "year" output.check
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {booklet}
+{ find.firstletter
+ output.letter
+ output.bibitem
+ format.authors output
+ new.block
+ format.title "title" output.check
+ howpublished address new.block.checkb
+ howpublished output
+ address output
+ format.date output
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {inbook}
+{ find.firstletter
+ output.letter
+ output.bibitem
+ author empty$
+ { format.editors "author and editor" output.check }
+ { format.authors output.nonnull
+ crossref missing$
+ { "author and editor" editor either.or.check }
+ 'skip$
+ if$
+ }
+ if$
+ new.block
+ format.btitle "title" output.check
+ crossref missing$
+ { format.bvolume output
+ format.chapter.pages "chapter and pages" output.check
+ new.block
+ format.number.series output
+ new.sentence
+ publisher "publisher" output.check
+ address output
+ }
+ { format.chapter.pages "chapter and pages" output.check
+ new.block
+ format.book.crossref output.nonnull
+ }
+ if$
+ format.edition output
+ format.date "year" output.check
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {incollection}
+{ find.firstletter
+ output.letter
+ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.title "title" output.check
+ new.block
+ crossref missing$
+ { format.in.ed.booktitle "booktitle" output.check
+ format.bvolume output
+ format.number.series output
+ format.chapter.pages output
+ new.sentence
+ publisher "publisher" output.check
+ address output
+ format.edition output
+ format.date "year" output.check
+ }
+ { format.incoll.inproc.crossref output.nonnull
+ format.chapter.pages output
+ }
+ if$
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {inproceedings}
+{ find.firstletter
+ output.letter
+ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.title "title" output.check
+ new.block
+ crossref missing$
+ { format.in.ed.booktitle "booktitle" output.check
+ format.bvolume output
+ format.number.series output
+ format.pages output
+ address empty$
+ { organization publisher new.sentence.checkb
+ organization output
+ publisher output
+ format.date "year" output.check
+ }
+ { address output.nonnull
+ format.date "year" output.check
+ new.sentence
+ organization output
+ publisher output
+ }
+ if$
+ }
+ { format.incoll.inproc.crossref output.nonnull
+ format.pages output
+ }
+ if$
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {conference} { inproceedings }
+
+FUNCTION {manual}
+{ find.firstletter
+ output.letter
+ output.bibitem
+ author empty$
+ { organization empty$
+ 'skip$
+ { organization output.nonnull
+ address output
+ }
+ if$
+ }
+ { format.authors output.nonnull }
+ if$
+ new.block
+ format.btitle "title" output.check
+ author empty$
+ { organization empty$
+ { address new.block.checka
+ address output
+ }
+ 'skip$
+ if$
+ }
+ { organization address new.block.checkb
+ organization output
+ address output
+ }
+ if$
+ format.edition output
+ format.date output
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {mastersthesis}
+{ find.firstletter
+ output.letter
+ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.title "title" output.check
+ new.block
+ "Master's thesis" format.thesis.type output.nonnull
+ school "school" output.check
+ address output
+ format.date "year" output.check
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {misc}
+{ find.firstletter
+ output.letter
+ output.bibitem
+ format.authors output
+ title howpublished new.block.checkb
+ format.title output
+ howpublished new.block.checka
+ howpublished output
+ format.date output
+ new.block
+ note output
+ fin.entry
+ empty.misc.check
+}
+
+FUNCTION {phdthesis}
+{ find.firstletter
+ output.letter
+ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.btitle "title" output.check
+ new.block
+ "PhD thesis" format.thesis.type output.nonnull
+ school "school" output.check
+ address output
+ format.date "year" output.check
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {proceedings}
+{ find.firstletter
+ output.letter
+ output.bibitem
+ editor empty$
+ { organization output }
+ { format.editors output.nonnull }
+ if$
+ new.block
+ format.btitle "title" output.check
+ format.bvolume output
+ format.number.series output
+ address empty$
+ { editor empty$
+ { publisher new.sentence.checka }
+ { organization publisher new.sentence.checkb
+ organization output
+ }
+ if$
+ publisher output
+ format.date "year" output.check
+ }
+ { address output.nonnull
+ format.date "year" output.check
+ new.sentence
+ editor empty$
+ 'skip$
+ { organization output }
+ if$
+ publisher output
+ }
+ if$
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {techreport}
+{ find.firstletter
+ output.letter
+ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.title "title" output.check
+ new.block
+ format.tr.number output.nonnull
+ institution "institution" output.check
+ address output
+ format.date "year" output.check
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {unpublished}
+{ find.firstletter
+ output.letter
+ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.title "title" output.check
+ new.block
+ note "note" output.check
+ format.date output
+ fin.entry
+}
+
+FUNCTION {default.type} { misc }
+
+MACRO {jan} {"January"}
+
+MACRO {feb} {"February"}
+
+MACRO {mar} {"March"}
+
+MACRO {apr} {"April"}
+
+MACRO {may} {"May"}
+
+MACRO {jun} {"June"}
+
+MACRO {jul} {"July"}
+
+MACRO {aug} {"August"}
+
+MACRO {sep} {"September"}
+
+MACRO {oct} {"October"}
+
+MACRO {nov} {"November"}
+
+MACRO {dec} {"December"}
+
+MACRO {acmcs} {"ACM Computing Surveys"}
+
+MACRO {acta} {"Acta Informatica"}
+
+MACRO {cacm} {"Communications of the ACM"}
+
+MACRO {ibmjrd} {"IBM Journal of Research and Development"}
+
+MACRO {ibmsj} {"IBM Systems Journal"}
+
+MACRO {ieeese} {"IEEE Transactions on Software Engineering"}
+
+MACRO {ieeetc} {"IEEE Transactions on Computers"}
+
+MACRO {ieeetcad}
+ {"IEEE Transactions on Computer-Aided Design of Integrated Circuits"}
+
+MACRO {ipl} {"Information Processing Letters"}
+
+MACRO {jacm} {"Journal of the ACM"}
+
+MACRO {jcss} {"Journal of Computer and System Sciences"}
+
+MACRO {scp} {"Science of Computer Programming"}
+
+MACRO {sicomp} {"SIAM Journal on Computing"}
+
+MACRO {tocs} {"ACM Transactions on Computer Systems"}
+
+MACRO {tods} {"ACM Transactions on Database Systems"}
+
+MACRO {tog} {"ACM Transactions on Graphics"}
+
+MACRO {toms} {"ACM Transactions on Mathematical Software"}
+
+MACRO {toois} {"ACM Transactions on Office Information Systems"}
+
+MACRO {toplas} {"ACM Transactions on Programming Languages and Systems"}
+
+MACRO {tcs} {"Theoretical Computer Science"}
+
+READ
+
+FUNCTION {sortify}
+{ purify$
+ "l" change.case$
+}
+
+INTEGERS { len }
+
+FUNCTION {chop.word}
+{ 's :=
+ 'len :=
+ s #1 len substring$ =
+ { s len #1 + global.max$ substring$ }
+ 's
+ if$
+}
+
+INTEGERS { et.al.char.used }
+
+FUNCTION {initialize.et.al.char.used}
+{ #0 'et.al.char.used :=
+}
+
+EXECUTE {initialize.et.al.char.used}
+
+FUNCTION {format.lab.names}
+{ 's :=
+ s num.names$ 'numnames :=
+ numnames #1 >
+ { numnames #4 >
+ { #3 'namesleft := }
+ { numnames 'namesleft := }
+ if$
+ #1 'nameptr :=
+ ""
+ { namesleft #0 > }
+ { nameptr numnames =
+ { s nameptr "{ff }{vv }{ll}{ jj}" format.name$ "others" =
+ { "{\etalchar{+}}" *
+ #1 'et.al.char.used :=
+ }
+ { s nameptr "{v{}}{l{}}" format.name$ * }
+ if$
+ }
+ { s nameptr "{v{}}{l{}}" format.name$ * }
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+ numnames #4 >
+ { "{\etalchar{+}}" *
+ #1 'et.al.char.used :=
+ }
+ 'skip$
+ if$
+ }
+ { s #1 "{v{}}{l{}}" format.name$
+ duplicate$ text.length$ #2 <
+ { pop$ s #1 "{ll}" format.name$ #3 text.prefix$ }
+ 'skip$
+ if$
+ }
+ if$
+}
+
+FUNCTION {author.key.label}
+{ author empty$
+ { key empty$
+ { cite$ #1 #3 substring$ }
+ { key #3 text.prefix$ }
+ if$
+ }
+ { author format.lab.names }
+ if$
+}
+
+FUNCTION {author.editor.key.label}
+{ author empty$
+ { editor empty$
+ { key empty$
+ { cite$ #1 #3 substring$ }
+ { key #3 text.prefix$ }
+ if$
+ }
+ { editor format.lab.names }
+ if$
+ }
+ { author format.lab.names }
+ if$
+}
+
+FUNCTION {author.key.organization.label}
+{ author empty$
+ { key empty$
+ { organization empty$
+ { cite$ #1 #3 substring$ }
+ { "The " #4 organization chop.word #3 text.prefix$ }
+ if$
+ }
+ { key #3 text.prefix$ }
+ if$
+ }
+ { author format.lab.names }
+ if$
+}
+
+FUNCTION {editor.key.organization.label}
+{ editor empty$
+ { key empty$
+ { organization empty$
+ { cite$ #1 #3 substring$ }
+ { "The " #4 organization chop.word #3 text.prefix$ }
+ if$
+ }
+ { key #3 text.prefix$ }
+ if$
+ }
+ { editor format.lab.names }
+ if$
+}
+
+FUNCTION {calc.label}
+{ type$ "book" =
+ type$ "inbook" =
+ or
+ 'author.editor.key.label
+ { type$ "proceedings" =
+ 'editor.key.organization.label
+ { type$ "manual" =
+ 'author.key.organization.label
+ 'author.key.label
+ if$
+ }
+ if$
+ }
+ if$
+ duplicate$
+ year field.or.null purify$ #-1 #2 substring$
+ *
+ 'label :=
+ year field.or.null purify$ #-1 #4 substring$
+ *
+ sortify 'sort.label :=
+}
+
+FUNCTION {sort.format.names}
+{ 's :=
+ #1 'nameptr :=
+ ""
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ { nameptr #1 >
+ { " " * }
+ 'skip$
+ if$
+ s nameptr "{vv{ } }{ll{ }}{ ff{ }}{ jj{ }}" format.name$ 't :=
+ nameptr numnames = t "others" = and
+ { "et al" * }
+ { t sortify * }
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+}
+
+FUNCTION {sort.format.title}
+{ 't :=
+ "A " #2
+ "An " #3
+ "The " #4 t chop.word
+ chop.word
+ chop.word
+ sortify
+ #1 global.max$ substring$
+}
+
+FUNCTION {author.sort}
+{ author empty$
+ { key empty$
+ { "to sort, need author or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { author sort.format.names }
+ if$
+}
+
+FUNCTION {author.editor.sort}
+{ author empty$
+ { editor empty$
+ { key empty$
+ { "to sort, need author, editor, or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { editor sort.format.names }
+ if$
+ }
+ { author sort.format.names }
+ if$
+}
+
+FUNCTION {author.organization.sort}
+{ author empty$
+ { organization empty$
+ { key empty$
+ { "to sort, need author, organization, or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { "The " #4 organization chop.word sortify }
+ if$
+ }
+ { author sort.format.names }
+ if$
+}
+
+FUNCTION {editor.organization.sort}
+{ editor empty$
+ { organization empty$
+ { key empty$
+ { "to sort, need editor, organization, or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { "The " #4 organization chop.word sortify }
+ if$
+ }
+ { editor sort.format.names }
+ if$
+}
+
+FUNCTION {presort}
+{ calc.label
+ sort.label
+ " "
+ *
+ type$ "book" =
+ type$ "inbook" =
+ or
+ 'author.editor.sort
+ { type$ "proceedings" =
+ 'editor.organization.sort
+ { type$ "manual" =
+ 'author.organization.sort
+ 'author.sort
+ if$
+ }
+ if$
+ }
+ if$
+ *
+ " "
+ *
+ year field.or.null sortify
+ *
+ " "
+ *
+ title field.or.null
+ sort.format.title
+ *
+ #1 entry.max$ substring$
+ 'sort.key$ :=
+}
+
+ITERATE {presort}
+
+SORT
+
+STRINGS { longest.label last.sort.label next.extra }
+
+INTEGERS { longest.label.width last.extra.num }
+
+FUNCTION {initialize.longest.label}
+{ "" 'longest.label :=
+ "\" 'cur.letter :=
+ #1 'first.letter.place :=
+ #0 int.to.chr$ 'last.sort.label :=
+ "" 'next.extra :=
+ #0 'longest.label.width :=
+ #0 'last.extra.num :=
+}
+
+FUNCTION { def.alphabibitem }
+{ "\def\alphabibitem#1{%" write$ newline$
+ "\expandafter\ifx\csname firstalphabibitem\endcsname" write$ newline$
+ "\relax\def\firstalphabibitem{}" write$ newline$
+ "\else\expandafter" write$ newline$
+ "\ifx\csname alphabibitemskip\endcsname" write$ newline$
+ "\relax\bigskip" write$ newline$
+ "\else\alphabibitemskip" write$ newline$
+ "\fi" write$ newline$
+ "\fi" write$ newline$
+ "\penalty-200\expandafter" write$ newline$
+ "\ifx\csname alphabibitemlabel\endcsname" write$ newline$
+ "\relax\expandafter" write$ newline$
+ "\ifx\csname alphabibitemcontent\endcsname\relax" write$ newline$
+ "\item[\LARGE\bfseries\MakeUppercase{#1}]" write$ newline$
+ "\hfill\vskip 1ex\hrule\medskip" write$ newline$
+ "\else\item[\Large\bfseries\MakeUppercase{#1}]" write$ newline$
+ "\alphabibitemcontent{\MakeUppercase{#1}}%" write$ newline$
+ "\fi" write$ newline$
+ "\else\expandafter" write$ newline$
+ "\ifx\csname alphabibitemcontent\endcsname\relax" write$ newline$
+ "\item[\alphabibitemlabel{\MakeUppercase{#1}}]" write$ newline$
+ "\vskip 1ex\hrule\medskip" write$ newline$
+ "\else\item[\alphabibitemlabel{\MakeUppercase{#1}}]" write$ newline$
+ "\alphabibitemcontent{\MakeUppercase{#1}}%" write$ newline$
+ "\fi" write$ newline$
+ "\fi}" write$ newline$
+ newline$
+}
+
+FUNCTION {forward.pass}
+{ last.sort.label sort.label =
+ { last.extra.num #1 + 'last.extra.num :=
+ last.extra.num int.to.chr$ 'extra.label :=
+ }
+ { "a" chr.to.int$ 'last.extra.num :=
+ "" 'extra.label :=
+ sort.label 'last.sort.label :=
+ }
+ if$
+}
+
+FUNCTION {reverse.pass}
+{ next.extra "b" =
+ { "a" 'extra.label := }
+ 'skip$
+ if$
+ label extra.label * 'label :=
+ label width$ longest.label.width >
+ { label 'longest.label :=
+ label width$ 'longest.label.width :=
+ }
+ 'skip$
+ if$
+ extra.label 'next.extra :=
+}
+
+EXECUTE {initialize.longest.label}
+
+ITERATE {forward.pass}
+
+REVERSE {reverse.pass}
+
+FUNCTION {begin.bib}
+{ et.al.char.used
+ { "\newcommand{\etalchar}[1]{$^{#1}$}" write$ newline$ }
+ 'skip$
+ if$
+ preamble$ empty$
+ 'skip$
+ { preamble$ write$ newline$ }
+ if$
+ def.alphabibitem
+ "\begin{thebibliography}{" longest.label * "}" * write$ newline$
+}
+
+EXECUTE {begin.bib}
+
+EXECUTE {init.state.consts}
+
+ITERATE {call.type$}
+
+FUNCTION {end.bib}
+{ newline$
+ "\end{thebibliography}" write$ newline$
+}
+
+EXECUTE {end.bib}
diff --git a/biblio/bibtex/contrib/sort-by-letters/apalike-letters.bst b/biblio/bibtex/contrib/sort-by-letters/apalike-letters.bst
new file mode 100644
index 0000000000..ca7742ac80
--- /dev/null
+++ b/biblio/bibtex/contrib/sort-by-letters/apalike-letters.bst
@@ -0,0 +1,1213 @@
+% BibTeX bibliography style `apalike-letters'
+%% adapted from `apalike' bibliography style (24-Jan-88 version)
+%% (C) 2006 - Thomas van Oudenhove
+%% when sorting by letter, write the first letter of author
+%% or editor - bug with organization...
+% This style should be used with the `apalike' LaTeX style (apalike.sty).
+% \cite's come out like "(Jones, 1986)" in the text but there are no labels
+% in the bibliography, and something like "(1986)" comes out immediately
+% after the author. Author (and editor) names appear as last name, comma,
+% initials. A `year' field is required for every entry, and so is either
+% an author (or in some cases, an editor) field or a key field.
+%
+% Editorial note:
+% Many journals require a style like `apalike', but I strongly, strongly,
+% strongly recommend that you not use it if you have a choice---use something
+% like `plain' instead. Mary-Claire van Leunen (A Handbook for Scholars,
+% Knopf, 1979) argues convincingly that a style like `plain' encourages better
+% writing than one like `apalike'. Furthermore the strongest arguments for
+% using an author-date style like `apalike'---that it's "the most practical"
+% (The Chicago Manual of Style, University of Chicago Press, thirteenth
+% edition, 1982, pages 400--401)---fall flat on their face with the new
+% computer-typesetting technology. For instance page 401 anachronistically
+% states "The chief disadvantage of [a style like `plain'] is that additions
+% or deletions cannot be made after the manuscript is typed without changing
+% numbers in both text references and list." LaTeX sidesteps the disadvantage.
+
+ENTRY
+ { address
+ author
+ booktitle
+ chapter
+ edition
+ editor
+ howpublished
+ institution
+ journal
+ key
+% month not used in apalike
+ note
+ number
+ organization
+ pages
+ publisher
+ school
+ series
+ title
+ type
+ volume
+ year
+ }
+ {}
+ { label extra.label sort.label }
+
+INTEGERS { output.state before.all mid.sentence after.sentence after.block }
+
+FUNCTION {init.state.consts}
+{ #0 'before.all :=
+ #1 'mid.sentence :=
+ #2 'after.sentence :=
+ #3 'after.block :=
+}
+
+STRINGS { s t cur.letter first.letter }
+INTEGERS { first.letter.place first.letter.ascii }
+
+FUNCTION {output.nonnull}
+{ 's :=
+ output.state mid.sentence =
+ { ", " * write$ }
+ { output.state after.block =
+ { add.period$ write$
+ newline$
+ "\newblock " write$
+ }
+ { output.state before.all =
+ 'write$
+ { add.period$ " " * write$ }
+ if$
+ }
+ if$
+ mid.sentence 'output.state :=
+ }
+ if$
+ s
+}
+
+FUNCTION {output}
+{ duplicate$ empty$
+ 'pop$
+ 'output.nonnull
+ if$
+}
+
+FUNCTION {output.check}
+{ 't :=
+ duplicate$ empty$
+ { pop$ "empty " t * " in " * cite$ * warning$ }
+ 'output.nonnull
+ if$
+}
+
+% apalike needs this function because
+% the year has special punctuation;
+% apalike ignores the month
+FUNCTION {output.year.check}
+{ year empty$
+ { "empty year in " cite$ * warning$ }
+ { write$
+ " (" year * extra.label * ")" *
+ mid.sentence 'output.state :=
+ }
+ if$
+}
+
+FUNCTION {output.letter}
+{ first.letter cur.letter =
+ { skip$ }
+ { newline$
+ "\alphabibitem{" first.letter * "}" * write$
+ newline$
+ first.letter 'cur.letter := }
+ if$
+ cur.letter "\" =
+ { first.letter 'cur.letter := }
+ { skip$ }
+ if$
+}
+
+FUNCTION {output.bibitem}
+{ newline$
+ "\bibitem[" write$
+ label write$
+ "]{" write$
+ cite$ write$
+ "}" write$
+ newline$
+ ""
+ before.all 'output.state :=
+}
+
+FUNCTION {fin.entry}
+{ add.period$
+ write$
+ newline$
+}
+
+FUNCTION {new.block}
+{ output.state before.all =
+ 'skip$
+ { after.block 'output.state := }
+ if$
+}
+
+FUNCTION {new.sentence}
+{ output.state after.block =
+ 'skip$
+ { output.state before.all =
+ 'skip$
+ { after.sentence 'output.state := }
+ if$
+ }
+ if$
+}
+
+FUNCTION {not}
+{ { #0 }
+ { #1 }
+ if$
+}
+
+FUNCTION {and}
+{ 'skip$
+ { pop$ #0 }
+ if$
+}
+
+FUNCTION {or}
+{ { pop$ #1 }
+ 'skip$
+ if$
+}
+
+FUNCTION {new.block.checkb}
+{ empty$
+ swap$ empty$
+ and
+ 'skip$
+ 'new.block
+ if$
+}
+
+FUNCTION {field.or.null}
+{ duplicate$ empty$
+ { pop$ "" }
+ 'skip$
+ if$
+}
+
+FUNCTION {emphasize}
+{ duplicate$ empty$
+ { pop$ "" }
+ { "{\em " swap$ * "}" * }
+ if$
+}
+
+FUNCTION { author.find.first.letter }
+{ author #1 "{vv }{ll }{ff }, {jj }" format.name$ "u" change.case$
+ purify$ first.letter.place #1 substring$ 'first.letter :=
+ first.letter chr.to.int$ 'first.letter.ascii :=
+}
+
+FUNCTION { editor.find.first.letter }
+{ editor #1 "{vv }{ll }{ff }, {jj }" format.name$ "u" change.case$
+ purify$ first.letter.place #1 substring$ 'first.letter :=
+ first.letter chr.to.int$ 'first.letter.ascii :=
+}
+
+FUNCTION { organization.find.first.letter }
+{ organization #1 "{vv }{ll }{ff }, {jj }" format.name$ "u" change.case$
+ purify$ first.letter.place #1 substring$ 'first.letter :=
+ first.letter chr.to.int$ 'first.letter.ascii :=
+}
+
+FUNCTION { find.firstletter }
+{ author empty$
+ { editor empty$
+% { organization empty$
+ { "Nor author, editor neither organization for entry " cite$ * warning$ }
+% { organization.find.first.letter
+% { first.letter.ascii #64 > first.letter.ascii #91 < and
+% first.letter.ascii #96 > first.letter.ascii #123 < and or not }
+% { first.letter.place #1 + 'first.letter.place :=
+% organization.find.first.letter }
+% while$ }
+% if$ }
+ { editor.find.first.letter
+ { first.letter.ascii #64 > first.letter.ascii #91 < and
+ first.letter.ascii #96 > first.letter.ascii #123 < and or not }
+ { first.letter.place #1 + 'first.letter.place :=
+ editor.find.first.letter }
+ while$
+ }
+ if$
+ }
+ { author.find.first.letter
+ { first.letter.ascii #64 > first.letter.ascii #91 < and
+ first.letter.ascii #96 > first.letter.ascii #123 < and or not }
+ { first.letter.place #1 + 'first.letter.place :=
+ author.find.first.letter }
+ while$
+ }
+ if$
+ #1 'first.letter.place :=
+}
+
+INTEGERS { nameptr namesleft numnames }
+
+FUNCTION {format.names}
+{ 's :=
+ #1 'nameptr :=
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ { s nameptr "{vv~}{ll}{, jj}{, f.}" format.name$ 't := % last name first
+ nameptr #1 >
+ { namesleft #1 >
+ { ", " * t * }
+ { numnames #2 >
+ { "," * }
+ 'skip$
+ if$
+ t "others" =
+ { " et~al." * }
+ { " and " * t * }
+ if$
+ }
+ if$
+ }
+ 't
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+}
+
+FUNCTION {format.authors}
+{ author empty$
+ { "" }
+ { author format.names }
+ if$
+}
+
+FUNCTION {format.key} % this function is just for apalike
+{ empty$
+ { key field.or.null }
+ { "" }
+ if$
+}
+
+FUNCTION {format.editors}
+{ editor empty$
+ { "" }
+ { editor format.names
+ editor num.names$ #1 >
+ { ", editors" * }
+ { ", editor" * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.title}
+{ title empty$
+ { "" }
+ { title "t" change.case$ }
+ if$
+}
+
+FUNCTION {n.dashify}
+{ 't :=
+ ""
+ { t empty$ not }
+ { t #1 #1 substring$ "-" =
+ { t #1 #2 substring$ "--" = not
+ { "--" *
+ t #2 global.max$ substring$ 't :=
+ }
+ { { t #1 #1 substring$ "-" = }
+ { "-" *
+ t #2 global.max$ substring$ 't :=
+ }
+ while$
+ }
+ if$
+ }
+ { t #1 #1 substring$ *
+ t #2 global.max$ substring$ 't :=
+ }
+ if$
+ }
+ while$
+}
+
+FUNCTION {format.btitle}
+{ title emphasize
+}
+
+FUNCTION {tie.or.space.connect}
+{ duplicate$ text.length$ #3 <
+ { "~" }
+ { " " }
+ if$
+ swap$ * *
+}
+
+FUNCTION {either.or.check}
+{ empty$
+ 'pop$
+ { "can't use both " swap$ * " fields in " * cite$ * warning$ }
+ if$
+}
+
+FUNCTION {format.bvolume}
+{ volume empty$
+ { "" }
+ { "volume" volume tie.or.space.connect
+ series empty$
+ 'skip$
+ { " of " * series emphasize * }
+ if$
+ "volume and number" number either.or.check
+ }
+ if$
+}
+
+FUNCTION {format.number.series}
+{ volume empty$
+ { number empty$
+ { series field.or.null }
+ { output.state mid.sentence =
+ { "number" }
+ { "Number" }
+ if$
+ number tie.or.space.connect
+ series empty$
+ { "there's a number but no series in " cite$ * warning$ }
+ { " in " * series * }
+ if$
+ }
+ if$
+ }
+ { "" }
+ if$
+}
+
+FUNCTION {format.edition}
+{ edition empty$
+ { "" }
+ { output.state mid.sentence =
+ { edition "l" change.case$ " edition" * }
+ { edition "t" change.case$ " edition" * }
+ if$
+ }
+ if$
+}
+
+INTEGERS { multiresult }
+
+FUNCTION {multi.page.check}
+{ 't :=
+ #0 'multiresult :=
+ { multiresult not
+ t empty$ not
+ and
+ }
+ { t #1 #1 substring$
+ duplicate$ "-" =
+ swap$ duplicate$ "," =
+ swap$ "+" =
+ or or
+ { #1 'multiresult := }
+ { t #2 global.max$ substring$ 't := }
+ if$
+ }
+ while$
+ multiresult
+}
+
+FUNCTION {format.pages}
+{ pages empty$
+ { "" }
+ { pages multi.page.check
+ { "pages" pages n.dashify tie.or.space.connect }
+ { "page" pages tie.or.space.connect }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.vol.num.pages}
+{ volume field.or.null
+ number empty$
+ 'skip$
+ { "(" number * ")" * *
+ volume empty$
+ { "there's a number but no volume in " cite$ * warning$ }
+ 'skip$
+ if$
+ }
+ if$
+ pages empty$
+ 'skip$
+ { duplicate$ empty$
+ { pop$ format.pages }
+ { ":" * pages n.dashify * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.chapter.pages}
+{ chapter empty$
+ 'format.pages
+ { type empty$
+ { "chapter" }
+ { type "l" change.case$ }
+ if$
+ chapter tie.or.space.connect
+ pages empty$
+ 'skip$
+ { ", " * format.pages * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.in.ed.booktitle}
+{ booktitle empty$
+ { "" }
+ { editor empty$
+ { "In " booktitle emphasize * }
+ { "In " format.editors * ", " * booktitle emphasize * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.thesis.type}
+{ type empty$
+ 'skip$
+ { pop$
+ type "t" change.case$
+ }
+ if$
+}
+
+FUNCTION {format.tr.number}
+{ type empty$
+ { "Technical Report" }
+ 'type
+ if$
+ number empty$
+ { "t" change.case$ }
+ { number tie.or.space.connect }
+ if$
+}
+
+FUNCTION {format.article.crossref}
+{ "In" % this is for apalike
+ " \cite{" * crossref * "}" *
+}
+
+FUNCTION {format.book.crossref}
+{ volume empty$
+ { "empty volume in " cite$ * "'s crossref of " * crossref * warning$
+ "In "
+ }
+ { "Volume" volume tie.or.space.connect
+ " of " *
+ }
+ if$
+ "\cite{" * crossref * "}" * % this is for apalike
+}
+
+FUNCTION {format.incoll.inproc.crossref}
+{ "In" % this is for apalike
+ " \cite{" * crossref * "}" *
+}
+
+FUNCTION {article}
+{ find.firstletter
+ output.letter
+ output.bibitem
+ format.authors "author" output.check
+ author format.key output % special for
+ output.year.check % apalike
+ new.block
+ format.title "title" output.check
+ new.block
+ crossref missing$
+ { journal emphasize "journal" output.check
+ format.vol.num.pages output
+ }
+ { format.article.crossref output.nonnull
+ format.pages output
+ }
+ if$
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {book}
+{ find.firstletter
+ output.letter
+ output.bibitem
+ author empty$
+ { format.editors "author and editor" output.check
+ editor format.key output
+ }
+ { format.authors output.nonnull
+ crossref missing$
+ { "author and editor" editor either.or.check }
+ 'skip$
+ if$
+ }
+ if$
+ output.year.check % special for apalike
+ new.block
+ format.btitle "title" output.check
+ crossref missing$
+ { format.bvolume output
+ new.block
+ format.number.series output
+ new.sentence
+ publisher "publisher" output.check
+ address output
+ }
+ { new.block
+ format.book.crossref output.nonnull
+ }
+ if$
+ format.edition output
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {booklet}
+{ find.firstletter
+ output.letter
+ output.bibitem
+ format.authors output
+ author format.key output % special for
+ output.year.check % apalike
+ new.block
+ format.title "title" output.check
+ new.block
+ howpublished output
+ address output
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {inbook}
+{ find.firstletter
+ output.letter
+ output.bibitem
+ author empty$
+ { format.editors "author and editor" output.check
+ editor format.key output
+ }
+ { format.authors output.nonnull
+ crossref missing$
+ { "author and editor" editor either.or.check }
+ 'skip$
+ if$
+ }
+ if$
+ output.year.check % special for apalike
+ new.block
+ format.btitle "title" output.check
+ crossref missing$
+ { format.bvolume output
+ format.chapter.pages "chapter and pages" output.check
+ new.block
+ format.number.series output
+ new.sentence
+ publisher "publisher" output.check
+ address output
+ }
+ { format.chapter.pages "chapter and pages" output.check
+ new.block
+ format.book.crossref output.nonnull
+ }
+ if$
+ format.edition output
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {incollection}
+{ find.firstletter
+ output.letter
+ output.bibitem
+ format.authors "author" output.check
+ author format.key output % special for
+ output.year.check % apalike
+ new.block
+ format.title "title" output.check
+ new.block
+ crossref missing$
+ { format.in.ed.booktitle "booktitle" output.check
+ format.bvolume output
+ format.number.series output
+ format.chapter.pages output
+ new.sentence
+ publisher "publisher" output.check
+ address output
+ format.edition output
+ }
+ { format.incoll.inproc.crossref output.nonnull
+ format.chapter.pages output
+ }
+ if$
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {inproceedings}
+{ find.firstletter
+ output.letter
+ output.bibitem
+ format.authors "author" output.check
+ author format.key output % special for
+ output.year.check % apalike
+ new.block
+ format.title "title" output.check
+ new.block
+ crossref missing$
+ { format.in.ed.booktitle "booktitle" output.check
+ format.bvolume output
+ format.number.series output
+ format.pages output
+ address output % for apalike
+ new.sentence % there's no year
+ organization output % here so things
+ publisher output % are simpler
+ }
+ { format.incoll.inproc.crossref output.nonnull
+ format.pages output
+ }
+ if$
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {conference} { inproceedings }
+
+FUNCTION {manual}
+{ find.firstletter
+ output.letter
+ output.bibitem
+ format.authors output
+ author format.key output % special for
+ output.year.check % apalike
+ new.block
+ format.btitle "title" output.check
+ organization address new.block.checkb
+ organization output
+ address output
+ format.edition output
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {mastersthesis}
+{ find.firstletter
+ output.letter
+ output.bibitem
+ format.authors "author" output.check
+ author format.key output % special for
+ output.year.check % apalike
+ new.block
+ format.title "title" output.check
+ new.block
+ "Master's thesis" format.thesis.type output.nonnull
+ school "school" output.check
+ address output
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {misc}
+{ find.firstletter
+ output.letter
+ output.bibitem
+ format.authors output
+ author format.key output % special for
+ output.year.check % apalike
+ new.block
+ format.title output
+ new.block
+ howpublished output
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {phdthesis}
+{ find.firstletter
+ output.letter
+ output.bibitem
+ format.authors "author" output.check
+ author format.key output % special for
+ output.year.check % apalike
+ new.block
+ format.btitle "title" output.check
+ new.block
+ "PhD thesis" format.thesis.type output.nonnull
+ school "school" output.check
+ address output
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {proceedings}
+{ find.firstletter
+ output.letter
+ output.bibitem
+ format.editors output
+ editor format.key output % special for
+ output.year.check % apalike
+ new.block
+ format.btitle "title" output.check
+ format.bvolume output
+ format.number.series output
+ address output % for apalike
+ new.sentence % we always output
+ organization output % a nonempty organization
+ publisher output % here
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {techreport}
+{ find.firstletter
+ output.letter
+ output.bibitem
+ format.authors "author" output.check
+ author format.key output % special for
+ output.year.check % apalike
+ new.block
+ format.title "title" output.check
+ new.block
+ format.tr.number output.nonnull
+ institution "institution" output.check
+ address output
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {unpublished}
+{ find.firstletter
+ output.letter
+ output.bibitem
+ format.authors "author" output.check
+ author format.key output % special for
+ output.year.check % apalike
+ new.block
+ format.title "title" output.check
+ new.block
+ note "note" output.check
+ fin.entry
+}
+
+FUNCTION {default.type} { misc }
+
+MACRO {jan} {"January"}
+
+MACRO {feb} {"February"}
+
+MACRO {mar} {"March"}
+
+MACRO {apr} {"April"}
+
+MACRO {may} {"May"}
+
+MACRO {jun} {"June"}
+
+MACRO {jul} {"July"}
+
+MACRO {aug} {"August"}
+
+MACRO {sep} {"September"}
+
+MACRO {oct} {"October"}
+
+MACRO {nov} {"November"}
+
+MACRO {dec} {"December"}
+
+MACRO {acmcs} {"ACM Computing Surveys"}
+
+MACRO {acta} {"Acta Informatica"}
+
+MACRO {cacm} {"Communications of the ACM"}
+
+MACRO {ibmjrd} {"IBM Journal of Research and Development"}
+
+MACRO {ibmsj} {"IBM Systems Journal"}
+
+MACRO {ieeese} {"IEEE Transactions on Software Engineering"}
+
+MACRO {ieeetc} {"IEEE Transactions on Computers"}
+
+MACRO {ieeetcad}
+ {"IEEE Transactions on Computer-Aided Design of Integrated Circuits"}
+
+MACRO {ipl} {"Information Processing Letters"}
+
+MACRO {jacm} {"Journal of the ACM"}
+
+MACRO {jcss} {"Journal of Computer and System Sciences"}
+
+MACRO {scp} {"Science of Computer Programming"}
+
+MACRO {sicomp} {"SIAM Journal on Computing"}
+
+MACRO {tocs} {"ACM Transactions on Computer Systems"}
+
+MACRO {tods} {"ACM Transactions on Database Systems"}
+
+MACRO {tog} {"ACM Transactions on Graphics"}
+
+MACRO {toms} {"ACM Transactions on Mathematical Software"}
+
+MACRO {toois} {"ACM Transactions on Office Information Systems"}
+
+MACRO {toplas} {"ACM Transactions on Programming Languages and Systems"}
+
+MACRO {tcs} {"Theoretical Computer Science"}
+
+READ
+
+FUNCTION {sortify}
+{ purify$
+ "l" change.case$
+}
+
+INTEGERS { len }
+
+FUNCTION {chop.word}
+{ 's :=
+ 'len :=
+ s #1 len substring$ =
+ { s len #1 + global.max$ substring$ }
+ 's
+ if$
+}
+
+% There are three apalike cases: one person (Jones),
+% two (Jones and de~Bruijn), and more (Jones et~al.).
+% This function is much like format.crossref.editors.
+%
+FUNCTION {format.lab.names}
+{ 's :=
+ s #1 "{vv~}{ll}" format.name$
+ s num.names$ duplicate$
+ #2 >
+ { pop$ " et~al." * }
+ { #2 <
+ 'skip$
+ { s #2 "{ff }{vv }{ll}{ jj}" format.name$ "others" =
+ { " et~al." * }
+ { " and " * s #2 "{vv~}{ll}" format.name$ * }
+ if$
+ }
+ if$
+ }
+ if$
+}
+
+FUNCTION {author.key.label}
+{ author empty$
+ { key empty$
+ { cite$ #1 #3 substring$ }
+ 'key % apalike uses the whole key
+ if$
+ }
+ { author format.lab.names }
+ if$
+}
+
+FUNCTION {author.editor.key.label}
+{ author empty$
+ { editor empty$
+ { key empty$
+ { cite$ #1 #3 substring$ }
+ 'key % apalike uses the whole key
+ if$
+ }
+ { editor format.lab.names }
+ if$
+ }
+ { author format.lab.names }
+ if$
+}
+
+FUNCTION {editor.key.label}
+{ editor empty$
+ { key empty$
+ { cite$ #1 #3 substring$ }
+ 'key % apalike uses the whole key, no organization
+ if$
+ }
+ { editor format.lab.names }
+ if$
+}
+
+FUNCTION {calc.label}
+{ type$ "book" =
+ type$ "inbook" =
+ or
+ 'author.editor.key.label
+ { type$ "proceedings" =
+ 'editor.key.label % apalike ignores organization
+ 'author.key.label % for labeling and sorting
+ if$
+ }
+ if$
+ ", " % these three lines are
+ * % for apalike, which
+ year field.or.null purify$ #-1 #4 substring$ % uses all four digits
+ *
+ 'label :=
+}
+
+FUNCTION {sort.format.names}
+{ 's :=
+ #1 'nameptr :=
+ ""
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ { nameptr #1 >
+ { " " * }
+ 'skip$
+ if$ % apalike uses initials
+ s nameptr "{vv{ } }{ll{ }}{ f{ }}{ jj{ }}" format.name$ 't := % <= here
+ nameptr numnames = t "others" = and
+ { "et al" * }
+ { t sortify * }
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+}
+
+FUNCTION {sort.format.title}
+{ 't :=
+ "A " #2
+ "An " #3
+ "The " #4 t chop.word
+ chop.word
+ chop.word
+ sortify
+ #1 global.max$ substring$
+}
+
+FUNCTION {author.sort}
+{ author empty$
+ { key empty$
+ { "to sort, need author or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { author sort.format.names }
+ if$
+}
+
+FUNCTION {author.editor.sort}
+{ author empty$
+ { editor empty$
+ { key empty$
+ { "to sort, need author, editor, or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { editor sort.format.names }
+ if$
+ }
+ { author sort.format.names }
+ if$
+}
+
+FUNCTION {editor.sort}
+{ editor empty$
+ { key empty$
+ { "to sort, need editor or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { editor sort.format.names }
+ if$
+}
+
+% apalike uses two sorting passes; the first one sets the
+% labels so that the `a's, `b's, etc. can be computed;
+% the second pass puts the references in "correct" order.
+% The presort function is for the first pass. It computes
+% label, sort.label, and title, and then concatenates.
+FUNCTION {presort}
+{ calc.label
+ label sortify
+ " "
+ *
+ type$ "book" =
+ type$ "inbook" =
+ or
+ 'author.editor.sort
+ { type$ "proceedings" =
+ 'editor.sort
+ 'author.sort
+ if$
+ }
+ if$
+ #1 entry.max$ substring$ % for
+ 'sort.label := % apalike
+ sort.label % style
+ *
+ " "
+ *
+ title field.or.null
+ sort.format.title
+ *
+ #1 entry.max$ substring$
+ 'sort.key$ :=
+}
+
+ITERATE {presort}
+
+SORT % by label, sort.label, title---for final label calculation
+
+STRINGS { last.label next.extra } % apalike labels are only for the text;
+
+INTEGERS { last.extra.num } % there are none in the bibliography
+
+FUNCTION {initialize.extra.label.stuff} % and hence there is no `longest.label'
+{ #0 int.to.chr$ 'last.label :=
+ "\" 'cur.letter :=
+ #1 'first.letter.place :=
+ "" 'next.extra :=
+ #0 'last.extra.num :=
+}
+
+FUNCTION { def.alphabibitem }
+{ "\def\alphabibitem#1{%" write$ newline$
+ "\expandafter\ifx\csname firstalphabibitem\endcsname" write$ newline$
+ "\relax\def\firstalphabibitem{}" write$ newline$
+ "\else\expandafter" write$ newline$
+ "\ifx\csname alphabibitemskip\endcsname" write$ newline$
+ "\relax\bigskip" write$ newline$
+ "\else\alphabibitemskip" write$ newline$
+ "\fi" write$ newline$
+ "\fi" write$ newline$
+ "\penalty-200\expandafter" write$ newline$
+ "\ifx\csname alphabibitemlabel\endcsname" write$ newline$
+ "\relax\expandafter" write$ newline$
+ "\ifx\csname alphabibitemcontent\endcsname\relax" write$ newline$
+ "\item[\LARGE\bfseries\MakeUppercase{#1}]" write$ newline$
+ "\hfill\vskip 1ex\hrule\medskip" write$ newline$
+ "\else\item[\Large\bfseries\MakeUppercase{#1}]" write$ newline$
+ "\alphabibitemcontent{\MakeUppercase{#1}}%" write$ newline$
+ "\fi" write$ newline$
+ "\else\expandafter" write$ newline$
+ "\ifx\csname alphabibitemcontent\endcsname\relax" write$ newline$
+ "\item[\alphabibitemlabel{\MakeUppercase{#1}}]" write$ newline$
+ "\vskip 1ex\hrule\medskip" write$ newline$
+ "\else\item[\alphabibitemlabel{\MakeUppercase{#1}}]" write$ newline$
+ "\alphabibitemcontent{\MakeUppercase{#1}}%" write$ newline$
+ "\fi" write$ newline$
+ "\fi}" write$ newline$
+ newline$
+}
+
+FUNCTION {forward.pass}
+{ last.label label =
+ { last.extra.num #1 + 'last.extra.num :=
+ last.extra.num int.to.chr$ 'extra.label :=
+ }
+ { "a" chr.to.int$ 'last.extra.num :=
+ "" 'extra.label :=
+ label 'last.label :=
+ }
+ if$
+}
+
+FUNCTION {reverse.pass}
+{ next.extra "b" =
+ { "a" 'extra.label := }
+ 'skip$
+ if$
+ label extra.label * 'label :=
+ extra.label 'next.extra :=
+}
+
+EXECUTE {initialize.extra.label.stuff}
+
+ITERATE {forward.pass}
+
+REVERSE {reverse.pass}
+
+% Now that the label is right we sort for real,
+% on sort.label then year then title. This is
+% for the second sorting pass.
+FUNCTION {bib.sort.order}
+{ sort.label
+ " "
+ *
+ year field.or.null sortify
+ *
+ " "
+ *
+ title field.or.null
+ sort.format.title
+ *
+ #1 entry.max$ substring$
+ 'sort.key$ :=
+}
+
+ITERATE {bib.sort.order}
+
+SORT % by sort.label, year, title---giving final bibliography order
+
+FUNCTION {begin.bib}
+{ preamble$ empty$ % no \etalchar in apalike
+ 'skip$
+ { preamble$ write$ newline$ }
+ if$
+ def.alphabibitem
+ "\begin{thebibliography}{}" write$ newline$ % no labels in apalike
+}
+
+EXECUTE {begin.bib}
+
+EXECUTE {init.state.consts}
+
+ITERATE {call.type$}
+
+FUNCTION {end.bib}
+{ newline$
+ "\end{thebibliography}" write$ newline$
+}
+
+EXECUTE {end.bib}
diff --git a/biblio/bibtex/contrib/sort-by-letters/frplainnat-letters.bst b/biblio/bibtex/contrib/sort-by-letters/frplainnat-letters.bst
new file mode 100644
index 0000000000..519b1bda80
--- /dev/null
+++ b/biblio/bibtex/contrib/sort-by-letters/frplainnat-letters.bst
@@ -0,0 +1,1448 @@
+%% File: `frplainnat-letters.bst'
+%%
+%% This program can be redistributed and/or modified under the terms
+%% of the LaTeX Project Public License Distributed from CTAN
+%% archives in directory macros/latex/base/lppl.txt; either
+%% version 1 of the License, or any later version.
+%%
+%% A modification of `plain.bst' for use with natbib package
+%% Copyright 1993-2005 Patrick W Daly
+%% Max-Planck-Institut f\"ur Sonnensystemforschung
+%% Max-Planck-Str. 2
+%% D-37191 Katlenburg-Lindau
+%% Germany
+%% E-mail: daly @ mps \dot mpg \dot de
+%%
+%% Modification de `plainnat.bst' du package natbib (citations
+%% "auteur-ann\'ee") pour tre utilis\'e avec le package french (incluant
+%% l'ancien frbib.sty)
+%%
+%% - francisation des termes de la bibliographie via le package french ;
+%% - les noms d'auteurs sont en "small caps" ;
+%% - dans les citations le "et al." est en italique ;
+%%
+%% Olivier Andrieu <andrieu @ oxygene \dot ijm \dot jussieu \dot fr>
+%%
+%% 02-11-2000
+%%
+ENTRY
+ { address
+ author
+ booktitle
+ chapter
+ edition
+ editor
+ howpublished
+ institution
+ isbn
+ issn
+ journal
+ key
+ month
+ note
+ number
+ organization
+ pages
+ publisher
+ school
+ series
+ title
+ type
+ url
+ volume
+ year
+ }
+ {}
+ { label extra.label sort.label short.list }
+
+INTEGERS { output.state before.all mid.sentence after.sentence after.block }
+
+FUNCTION {init.state.consts}
+{ #0 'before.all :=
+ #1 'mid.sentence :=
+ #2 'after.sentence :=
+ #3 'after.block :=
+}
+
+STRINGS { s t cur.letter first.letter }
+INTEGERS { first.letter.place first.letter.ascii }
+
+FUNCTION {output.nonnull}
+{ 's :=
+ output.state mid.sentence =
+ { ", " * write$ }
+ { output.state after.block =
+ { add.period$ write$
+ newline$
+ "\newblock " write$
+ }
+ { output.state before.all =
+ 'write$
+ { add.period$ " " * write$ }
+ if$
+ }
+ if$
+ mid.sentence 'output.state :=
+ }
+ if$
+ s
+}
+
+FUNCTION {output}
+{ duplicate$ empty$
+ 'pop$
+ 'output.nonnull
+ if$
+}
+
+FUNCTION {output.check}
+{ 't :=
+ duplicate$ empty$
+ { pop$ "empty " t * " in " * cite$ * warning$ }
+ 'output.nonnull
+ if$
+}
+
+FUNCTION {fin.entry}
+{ add.period$
+ write$
+ newline$
+}
+
+FUNCTION {new.block}
+{ output.state before.all =
+ 'skip$
+ { after.block 'output.state := }
+ if$
+}
+
+FUNCTION {new.sentence}
+{ output.state after.block =
+ 'skip$
+ { output.state before.all =
+ 'skip$
+ { after.sentence 'output.state := }
+ if$
+ }
+ if$
+}
+
+FUNCTION {not}
+{ { #0 }
+ { #1 }
+ if$
+}
+
+FUNCTION {and}
+{ 'skip$
+ { pop$ #0 }
+ if$
+}
+
+FUNCTION {or}
+{ { pop$ #1 }
+ 'skip$
+ if$
+}
+
+FUNCTION {new.block.checka}
+{ empty$
+ 'skip$
+ 'new.block
+ if$
+}
+
+FUNCTION {new.block.checkb}
+{ empty$
+ swap$ empty$
+ and
+ 'skip$
+ 'new.block
+ if$
+}
+
+FUNCTION {new.sentence.checka}
+{ empty$
+ 'skip$
+ 'new.sentence
+ if$
+}
+
+FUNCTION {new.sentence.checkb}
+{ empty$
+ swap$ empty$
+ and
+ 'skip$
+ 'new.sentence
+ if$
+}
+
+FUNCTION {field.or.null}
+{ duplicate$ empty$
+ { pop$ "" }
+ 'skip$
+ if$
+}
+
+FUNCTION {emphasize}
+{ duplicate$ empty$
+ { pop$ "" }
+ { "{\em " swap$ * "}" * }
+ if$
+}
+
+INTEGERS { nameptr namesleft numnames }
+
+FUNCTION { author.find.first.letter }
+{ author #1 "{vv }{ll }{ff }, {jj }" format.name$ "u" change.case$
+ purify$ first.letter.place #1 substring$ 'first.letter :=
+ first.letter chr.to.int$ 'first.letter.ascii :=
+}
+
+FUNCTION { editor.find.first.letter }
+{ editor #1 "{vv }{ll }{ff }, {jj }" format.name$ "u" change.case$
+ purify$ first.letter.place #1 substring$ 'first.letter :=
+ first.letter chr.to.int$ 'first.letter.ascii :=
+}
+
+FUNCTION { organization.find.first.letter }
+{ organization #1 "{vv }{ll }{ff }, {jj }" format.name$ "u" change.case$
+ purify$ first.letter.place #1 substring$ 'first.letter :=
+ first.letter chr.to.int$ 'first.letter.ascii :=
+}
+
+FUNCTION { find.firstletter }
+{ author empty$
+ { editor empty$
+% { organization empty$
+ { "Nor author, editor neither organization for entry " cite$ * warning$ }
+% { organization.find.first.letter
+% { first.letter.ascii #64 > first.letter.ascii #91 < and
+% first.letter.ascii #96 > first.letter.ascii #123 < and or not }
+% { first.letter.place #1 + 'first.letter.place :=
+% organization.find.first.letter }
+% while$ }
+% if$ }
+ { editor.find.first.letter
+ { first.letter.ascii #64 > first.letter.ascii #91 < and
+ first.letter.ascii #96 > first.letter.ascii #123 < and or not }
+ { first.letter.place #1 + 'first.letter.place :=
+ editor.find.first.letter }
+ while$
+ }
+ if$
+ }
+ { author.find.first.letter
+ { first.letter.ascii #64 > first.letter.ascii #91 < and
+ first.letter.ascii #96 > first.letter.ascii #123 < and or not }
+ { first.letter.place #1 + 'first.letter.place :=
+ author.find.first.letter }
+ while$
+ }
+ if$
+ #1 'first.letter.place :=
+}
+
+FUNCTION {format.names}
+{ 's :=
+ #1 'nameptr :=
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ { s nameptr "{ff~}\bsc\bgroup {vv~}{ll}\egroup{{}}{, jj}" format.name$ 't :=
+ nameptr #1 >
+ { namesleft #1 >
+ { ", " * t * }
+ { namesleft #2 >
+ { ", " * }
+ 'skip$
+ if$
+ t "others" =
+ { " \emph{et~al.}" * }
+ { " \andname{} " * t * }
+ if$
+ }
+ if$
+ }
+ 't
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+}
+
+FUNCTION {format.key}
+{ empty$
+ { key field.or.null }
+ { "" }
+ if$
+}
+
+FUNCTION {format.authors}
+{ author empty$
+ { "" }
+ { author format.names }
+ if$
+}
+
+FUNCTION {format.editors}
+{ editor empty$
+ { "" }
+ { editor format.names
+ editor num.names$ #1 >
+ { ", \editornames{}" * }
+ { ", \editorname{}" * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.isbn}
+{ isbn empty$
+ { "" }
+ { new.block "ISBN " isbn * }
+ if$
+}
+
+FUNCTION {format.issn}
+{ issn empty$
+ { "" }
+ { new.block "ISSN " issn * }
+ if$
+}
+
+%%FUNCTION {format.url}
+%%{ url empty$
+%% { "" }
+%% { new.block "URL " url * }
+%% if$
+%%}
+
+FUNCTION {format.title}
+{ title empty$
+ { "" }
+ { title "t" change.case$ }
+ if$
+}
+
+FUNCTION {format.full.names}
+{'s :=
+ #1 'nameptr :=
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ { s nameptr
+ "\bsc\bgroup {vv~}{ll}\egroup{{}}" format.name$ 't :=
+ nameptr #1 >
+ {
+ namesleft #1 >
+ { ", " * t * }
+ {
+ numnames #2 >
+ { "," * }
+ 'skip$
+ if$
+ t "others" =
+ { " \emph{et~al.}" * }
+ { " \andname{} " * t * }
+ if$
+ }
+ if$
+ }
+ 't
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+}
+
+FUNCTION {author.editor.full}
+{ author empty$
+ { editor empty$
+ { "" }
+ { editor format.full.names }
+ if$
+ }
+ { author format.full.names }
+ if$
+}
+
+FUNCTION {author.full}
+{ author empty$
+ { "" }
+ { author format.full.names }
+ if$
+}
+
+FUNCTION {editor.full}
+{ editor empty$
+ { "" }
+ { editor format.full.names }
+ if$
+}
+
+FUNCTION {make.full.names}
+{ type$ "book" =
+ type$ "inbook" =
+ or
+ 'author.editor.full
+ { type$ "proceedings" =
+ 'editor.full
+ 'author.full
+ if$
+ }
+ if$
+}
+
+FUNCTION {output.bibitem}
+{ newline$
+ "\bibitem[" write$
+ label write$
+ ")" make.full.names duplicate$ short.list =
+ { pop$ }
+ { * }
+ if$
+ "]{" * write$
+ cite$ write$
+ "}" write$
+ newline$
+ ""
+ before.all 'output.state :=
+}
+
+FUNCTION {output.letter}
+{ first.letter cur.letter =
+ { skip$ }
+ { newline$
+ "\alphabibitem{" first.letter * "}" * write$
+ newline$
+ first.letter 'cur.letter := }
+ if$
+
+ cur.letter "\" =
+ { first.letter 'cur.letter := }
+ { skip$ }
+ if$
+
+}
+
+FUNCTION {n.dashify}
+{ 't :=
+ ""
+ { t empty$ not }
+ { t #1 #1 substring$ "-" =
+ { t #1 #2 substring$ "--" = not
+ { "--" *
+ t #2 global.max$ substring$ 't :=
+ }
+ { { t #1 #1 substring$ "-" = }
+ { "-" *
+ t #2 global.max$ substring$ 't :=
+ }
+ while$
+ }
+ if$
+ }
+ { t #1 #1 substring$ *
+ t #2 global.max$ substring$ 't :=
+ }
+ if$
+ }
+ while$
+}
+
+FUNCTION {format.date}
+{ year duplicate$ empty$
+ { "empty year in " cite$ * warning$
+ pop$ "" }
+ 'skip$
+ if$
+ month empty$
+ 'skip$
+ { month
+ " " * swap$ *
+ }
+ if$
+ extra.label *
+}
+
+FUNCTION {format.btitle}
+{ title emphasize
+}
+
+FUNCTION {tie.or.space.connect}
+{ duplicate$ text.length$ #3 <
+ { "~" }
+ { " " }
+ if$
+ swap$ * *
+}
+
+FUNCTION {either.or.check}
+{ empty$
+ 'pop$
+ { "can't use both " swap$ * " fields in " * cite$ * warning$ }
+ if$
+}
+
+FUNCTION {format.bvolume}
+{ volume empty$
+ { "" }
+ { "\volumename{}" volume tie.or.space.connect
+ series empty$
+ 'skip$
+ { " \ofname{} " * series emphasize * }
+ if$
+ "\volumename{} \andname{} \numbername{}" number either.or.check
+ }
+ if$
+}
+
+FUNCTION {format.number.series}
+{ volume empty$
+ { number empty$
+ { series field.or.null }
+ { output.state mid.sentence =
+ { "\numbername{}" }
+ { "\Numbername{}" }
+ if$
+ number tie.or.space.connect
+ series empty$
+ { "there's a number but no series in " cite$ * warning$ }
+ { " \inname{} " * series * }
+ if$
+ }
+ if$
+ }
+ { "" }
+ if$
+}
+
+FUNCTION {format.edition}
+{ edition empty$
+ { "" }
+ { output.state mid.sentence =
+ { edition "l" change.case$ " \editionname{}" * }
+ { edition "t" change.case$ " \editionname{}" * }
+ if$
+ }
+ if$
+}
+
+INTEGERS { multiresult }
+
+FUNCTION {multi.page.check}
+{ 't :=
+ #0 'multiresult :=
+ { multiresult not
+ t empty$ not
+ and
+ }
+ { t #1 #1 substring$
+ duplicate$ "-" =
+ swap$ duplicate$ "," =
+ swap$ "+" =
+ or or
+ { #1 'multiresult := }
+ { t #2 global.max$ substring$ 't := }
+ if$
+ }
+ while$
+ multiresult
+}
+
+FUNCTION {format.pages}
+{ pages empty$
+ { "" }
+ { pages multi.page.check
+ { "\pagesname{}" pages n.dashify tie.or.space.connect }
+ { "\pagename{}" pages tie.or.space.connect }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.vol.num.pages}
+{ volume field.or.null
+ number empty$
+ 'skip$
+ { "\penalty0 (" number * ")" * *
+ volume empty$
+ { "there's a number but no volume in " cite$ * warning$ }
+ 'skip$
+ if$
+ }
+ if$
+ pages empty$
+ 'skip$
+ { duplicate$ empty$
+ { pop$ format.pages }
+ { "\string:\penalty0 " * pages n.dashify * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.chapter.pages}
+{ chapter empty$
+ 'format.pages
+ { type empty$
+ { "\chaptername{}" }
+ { type "l" change.case$ }
+ if$
+ chapter tie.or.space.connect
+ pages empty$
+ 'skip$
+ { ", " * format.pages * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.in.ed.booktitle}
+{ booktitle empty$
+ { "" }
+ { editor empty$
+ { "\Inname{} " booktitle emphasize * }
+ { "\Inname{} " format.editors * ", " * booktitle emphasize * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {empty.misc.check}
+{ author empty$ title empty$ howpublished empty$
+ month empty$ year empty$ note empty$
+ and and and and and
+ key empty$ not and
+ { "all relevant fields are empty in " cite$ * warning$ }
+ 'skip$
+ if$
+}
+
+FUNCTION {format.thesis.type}
+{ type empty$
+ 'skip$
+ { pop$
+ type "t" change.case$
+ }
+ if$
+}
+
+FUNCTION {format.tr.number}
+{ type empty$
+ { "\technicalreportname{}" }
+ 'type
+ if$
+ number empty$
+ { "t" change.case$ }
+ { number tie.or.space.connect }
+ if$
+}
+
+FUNCTION {format.article.crossref}
+{ key empty$
+ { journal empty$
+ { "need key or journal for " cite$ * " to crossref " * crossref *
+ warning$
+ ""
+ }
+ { "\Inname{} {\em " journal * "\/}" * }
+ if$
+ }
+ { "\Inname{} " key * }
+ if$
+ " \citep{" * crossref * "}" *
+}
+
+FUNCTION {format.book.crossref}
+{ volume empty$
+ { "empty volume in " cite$ * "'s crossref of " * crossref * warning$
+ "\Inname{} "
+ }
+ { "\Volumename{}" volume tie.or.space.connect
+ " of " *
+ }
+ if$
+ editor empty$
+ editor field.or.null author field.or.null =
+ or
+ { key empty$
+ { series empty$
+ { "need editor, key, or series for " cite$ * " to crossref " *
+ crossref * warning$
+ "" *
+ }
+ { "{\em " * series * "\/}" * }
+ if$
+ }
+ { key * }
+ if$
+ }
+ 'skip$
+ if$
+ " \citet{" * crossref * "}" *
+}
+
+FUNCTION {format.incoll.inproc.crossref}
+{ editor empty$
+ editor field.or.null author field.or.null =
+ or
+ { key empty$
+ { booktitle empty$
+ { "need editor, key, or booktitle for " cite$ * " to crossref " *
+ crossref * warning$
+ ""
+ }
+ { "\Inname{} {\em " booktitle * "\/}" * }
+ if$
+ }
+ { "\Inname{} " key * }
+ if$
+ }
+ { "\Inname{} " }
+ if$
+ " \citet{" * crossref * "}" *
+}
+
+FUNCTION {article}
+{ find.firstletter
+ output.letter
+ output.bibitem
+ format.authors "author" output.check
+ author format.key output
+ new.block
+ format.title "title" output.check
+ new.block
+ crossref missing$
+ { journal emphasize "journal" output.check
+ format.vol.num.pages output
+ format.date "year" output.check
+ }
+ { format.article.crossref output.nonnull
+ format.pages output
+ }
+ if$
+ format.issn output
+% url output
+ fin.entry
+}
+
+FUNCTION {book}
+{ find.firstletter
+ output.letter
+ output.bibitem
+ author empty$
+ { format.editors "author and editor" output.check
+ editor format.key output
+ }
+ { format.authors output.nonnull
+ crossref missing$
+ { "author and editor" editor either.or.check }
+ 'skip$
+ if$
+ }
+ if$
+ new.block
+ format.btitle "title" output.check
+ crossref missing$
+ { format.bvolume output
+ new.block
+ format.number.series output
+ new.sentence
+ publisher "publisher" output.check
+ address output
+ }
+ { new.block
+ format.book.crossref output.nonnull
+ }
+ if$
+ format.edition output
+ format.date "year" output.check
+ format.isbn output
+% url output
+ fin.entry
+}
+
+FUNCTION {booklet}
+{ find.firstletter
+ output.letter
+ output.bibitem
+ format.authors output
+ author format.key output
+ new.block
+ format.title "title" output.check
+ howpublished address new.block.checkb
+ howpublished output
+ address output
+ format.date output
+ format.isbn output
+% url output
+ fin.entry
+}
+
+FUNCTION {inbook}
+{ find.firstletter
+ output.letter
+ output.bibitem
+ author empty$
+ { format.editors "author and editor" output.check
+ editor format.key output
+ }
+ { format.authors output.nonnull
+ crossref missing$
+ { "author and editor" editor either.or.check }
+ 'skip$
+ if$
+ }
+ if$
+ new.block
+ format.btitle "title" output.check
+ crossref missing$
+ { format.bvolume output
+ format.chapter.pages "chapter and pages" output.check
+ new.block
+ format.number.series output
+ new.sentence
+ publisher "publisher" output.check
+ address output
+ }
+ { format.chapter.pages "chapter and pages" output.check
+ new.block
+ format.book.crossref output.nonnull
+ }
+ if$
+ format.edition output
+ format.date "year" output.check
+ format.isbn output
+% url output
+ fin.entry
+}
+
+FUNCTION {incollection}
+{ find.firstletter
+ output.letter
+ output.bibitem
+ format.authors "author" output.check
+ author format.key output
+ new.block
+ format.title "title" output.check
+ new.block
+ crossref missing$
+ { format.in.ed.booktitle "booktitle" output.check
+ format.bvolume output
+ format.number.series output
+ format.chapter.pages output
+ new.sentence
+ publisher "publisher" output.check
+ address output
+ format.edition output
+ format.date "year" output.check
+ }
+ { format.incoll.inproc.crossref output.nonnull
+ format.chapter.pages output
+ }
+ if$
+ format.isbn output
+% url output
+ fin.entry
+}
+
+FUNCTION {inproceedings}
+{ find.firstletter
+ output.letter
+ output.bibitem
+ format.authors "author" output.check
+ author format.key output
+ new.block
+ format.title "title" output.check
+ new.block
+ crossref missing$
+ { format.in.ed.booktitle "booktitle" output.check
+ format.bvolume output
+ format.number.series output
+ format.pages output
+ address empty$
+ { organization publisher new.sentence.checkb
+ organization output
+ publisher output
+ format.date "year" output.check
+ }
+ { address output.nonnull
+ format.date "year" output.check
+ new.sentence
+ organization output
+ publisher output
+ }
+ if$
+ }
+ { format.incoll.inproc.crossref output.nonnull
+ format.pages output
+ }
+ if$
+ format.isbn output
+% url output
+ fin.entry
+}
+
+FUNCTION {conference} { inproceedings }
+
+FUNCTION {manual}
+{ find.firstletter
+ output.letter
+ output.bibitem
+ format.authors output
+ author format.key output
+ new.block
+ format.btitle "title" output.check
+ organization address new.block.checkb
+ organization output
+ address output
+ format.edition output
+ format.date output
+% url output
+ fin.entry
+}
+
+FUNCTION {mastersthesis}
+{ find.firstletter
+ output.letter
+ output.bibitem
+ format.authors "author" output.check
+ author format.key output
+ new.block
+ format.title "title" output.check
+ new.block
+ "M\'emoire" format.thesis.type output.nonnull
+ school "school" output.check
+ address output
+ format.date "year" output.check
+% url output
+ fin.entry
+}
+
+FUNCTION {misc}
+{ find.firstletter
+ output.letter
+ output.bibitem
+ format.authors output
+ author format.key output
+ title howpublished new.block.checkb
+ format.title output
+ howpublished new.block.checka
+ howpublished output
+ format.date output
+ format.issn output
+% url output
+ fin.entry
+ empty.misc.check
+}
+
+FUNCTION {phdthesis}
+{ find.firstletter
+ output.letter
+ output.bibitem
+ format.authors "author" output.check
+ author format.key output
+ new.block
+ format.btitle "title" output.check
+ new.block
+ "Th\`ese de doctorat" format.thesis.type output.nonnull
+ school "school" output.check
+ address output
+ format.date "year" output.check
+ fin.entry
+}
+
+FUNCTION {proceedings}
+{ find.firstletter
+ output.letter
+ output.bibitem
+ format.editors output
+ editor format.key output
+ new.block
+ format.btitle "title" output.check
+ format.bvolume output
+ format.number.series output
+ address output
+ format.date "year" output.check
+ new.sentence
+ organization output
+ publisher output
+ format.isbn output
+% url output
+ fin.entry
+}
+
+FUNCTION {techreport}
+{ find.firstletter
+ output.letter
+ output.bibitem
+ format.authors "author" output.check
+ author format.key output
+ new.block
+ format.title "title" output.check
+ new.block
+ format.tr.number output.nonnull
+ institution "institution" output.check
+ address output
+ format.date "year" output.check
+% url output
+ fin.entry
+}
+
+FUNCTION {unpublished}
+{ find.firstletter
+ output.letter
+ output.bibitem
+ format.authors "author" output.check
+ author format.key output
+ new.block
+ format.title "title" output.check
+% url output
+ format.date output
+ fin.entry
+}
+
+FUNCTION {default.type} { misc }
+
+MACRO {jan} {"\janname{}"}
+
+MACRO {feb} {"\febname{}"}
+
+MACRO {mar} {"\marname{}"}
+
+MACRO {apr} {"\aprname{}"}
+
+MACRO {may} {"\mayname{}"}
+
+MACRO {jun} {"\junname{}"}
+
+MACRO {jul} {"\julname{}"}
+
+MACRO {aug} {"\augname{}"}
+
+MACRO {sep} {"\sepname{}"}
+
+MACRO {oct} {"\octname{}"}
+
+MACRO {nov} {"\novname{}"}
+
+MACRO {dec} {"\decname{}"}
+
+MACRO {acmcs} {"ACM Computing Surveys"}
+
+MACRO {acta} {"Acta Informatica"}
+
+MACRO {cacm} {"Communications of the ACM"}
+
+MACRO {ibmjrd} {"IBM Journal of Research and Development"}
+
+MACRO {ibmsj} {"IBM Systems Journal"}
+
+MACRO {ieeese} {"IEEE Transactions on Software Engineering"}
+
+MACRO {ieeetc} {"IEEE Transactions on Computers"}
+
+MACRO {ieeetcad}
+ {"IEEE Transactions on Computer-Aided Design of Integrated Circuits"}
+
+MACRO {ipl} {"Information Processing Letters"}
+
+MACRO {jacm} {"Journal of the ACM"}
+
+MACRO {jcss} {"Journal of Computer and System Sciences"}
+
+MACRO {scp} {"Science of Computer Programming"}
+
+MACRO {sicomp} {"SIAM Journal on Computing"}
+
+MACRO {tocs} {"ACM Transactions on Computer Systems"}
+
+MACRO {tods} {"ACM Transactions on Database Systems"}
+
+MACRO {tog} {"ACM Transactions on Graphics"}
+
+MACRO {toms} {"ACM Transactions on Mathematical Software"}
+
+MACRO {toois} {"ACM Transactions on Office Information Systems"}
+
+MACRO {toplas} {"ACM Transactions on Programming Languages and Systems"}
+
+MACRO {tcs} {"Theoretical Computer Science"}
+
+READ
+
+FUNCTION {sortify}
+{ purify$
+ "l" change.case$
+}
+
+INTEGERS { len }
+
+FUNCTION {chop.word}
+{ 's :=
+ 'len :=
+ s #1 len substring$ =
+ { s len #1 + global.max$ substring$ }
+ 's
+ if$
+}
+
+FUNCTION {format.lab.names}
+{ 's :=
+ s #1 "\bsc\bgroup {vv~}{ll}\egroup{{}}" format.name$
+ s num.names$ duplicate$
+ #2 >
+ { pop$ " \emph{et~al.}" * }
+ { #2 <
+ 'skip$
+ { s #2 "{ff }\bsc\bgroup {vv }{ll}\egroup{{}}{ jj}" format.name$ "others" =
+ { " \emph{et~al.}" * }
+ { " \andname{} " * s #2 "\bsc\bgroup {vv~}{ll}\egroup{{}}" format.name$ * }
+ if$
+ }
+ if$
+ }
+ if$
+}
+
+FUNCTION {author.key.label}
+{ author empty$
+ { key empty$
+ { cite$ #1 #3 substring$ }
+ 'key
+ if$
+ }
+ { author format.lab.names }
+ if$
+}
+
+FUNCTION {author.editor.key.label}
+{ author empty$
+ { editor empty$
+ { key empty$
+ { cite$ #1 #3 substring$ }
+ 'key
+ if$
+ }
+ { editor format.lab.names }
+ if$
+ }
+ { author format.lab.names }
+ if$
+}
+
+FUNCTION {author.key.organization.label}
+{ author empty$
+ { key empty$
+ { organization empty$
+ { cite$ #1 #3 substring$ }
+ { "The " #4 organization chop.word #3 text.prefix$ }
+ if$
+ }
+ 'key
+ if$
+ }
+ { author format.lab.names }
+ if$
+}
+
+FUNCTION {editor.key.organization.label}
+{ editor empty$
+ { key empty$
+ { organization empty$
+ { cite$ #1 #3 substring$ }
+ { "The " #4 organization chop.word #3 text.prefix$ }
+ if$
+ }
+ 'key
+ if$
+ }
+ { editor format.lab.names }
+ if$
+}
+
+FUNCTION {calc.short.authors}
+{ type$ "book" =
+ type$ "inbook" =
+ or
+ 'author.editor.key.label
+ { type$ "proceedings" =
+ 'editor.key.organization.label
+ { type$ "manual" =
+ 'author.key.organization.label
+ 'author.key.label
+ if$
+ }
+ if$
+ }
+ if$
+ 'short.list :=
+}
+
+FUNCTION {calc.label}
+{ calc.short.authors
+ short.list
+ "("
+ *
+ year duplicate$ empty$
+ short.list key field.or.null = or
+ { pop$ "" }
+ 'skip$
+ if$
+ *
+ 'label :=
+}
+
+FUNCTION {sort.format.names}
+{ 's :=
+ #1 'nameptr :=
+ ""
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ { nameptr #1 >
+ { " " * }
+ 'skip$
+ if$
+ s nameptr "{vv{ } }{ll{ }}{ ff{ }}{ jj{ }}" format.name$ 't :=
+ nameptr numnames = t "others" = and
+ { "\emph{et~al}" * }
+ { t sortify * }
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+}
+
+FUNCTION {sort.format.title}
+{ 't :=
+ "A " #2
+ "An " #3
+ "The " #4 t chop.word
+ chop.word
+ chop.word
+ sortify
+ #1 global.max$ substring$
+}
+
+FUNCTION {author.sort}
+{ author empty$
+ { key empty$
+ { "to sort, need author or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { author sort.format.names }
+ if$
+}
+
+FUNCTION {author.editor.sort}
+{ author empty$
+ { editor empty$
+ { key empty$
+ { "to sort, need author, editor, or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { editor sort.format.names }
+ if$
+ }
+ { author sort.format.names }
+ if$
+}
+
+FUNCTION {author.organization.sort}
+{ author empty$
+ { organization empty$
+ { key empty$
+ { "to sort, need author, organization, or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { "The " #4 organization chop.word sortify }
+ if$
+ }
+ { author sort.format.names }
+ if$
+}
+
+FUNCTION {editor.organization.sort}
+{ editor empty$
+ { organization empty$
+ { key empty$
+ { "to sort, need editor, organization, or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { "The " #4 organization chop.word sortify }
+ if$
+ }
+ { editor sort.format.names }
+ if$
+}
+
+FUNCTION {presort}
+{ calc.label
+ label sortify
+ " "
+ *
+ type$ "book" =
+ type$ "inbook" =
+ or
+ 'author.editor.sort
+ { type$ "proceedings" =
+ 'editor.organization.sort
+ { type$ "manual" =
+ 'author.organization.sort
+ 'author.sort
+ if$
+ }
+ if$
+ }
+ if$
+ " "
+ *
+ year field.or.null sortify
+ *
+ " "
+ *
+ title field.or.null
+ sort.format.title
+ *
+ #1 entry.max$ substring$
+ 'sort.label :=
+ sort.label *
+ #1 entry.max$ substring$
+ 'sort.key$ :=
+}
+
+ITERATE {presort}
+
+SORT
+
+STRINGS { longest.label last.label next.extra }
+
+INTEGERS { longest.label.width last.extra.num number.label }
+
+FUNCTION {initialize.longest.label}
+{ "" 'longest.label :=
+ "\" 'cur.letter :=
+ #1 'first.letter.place :=
+ #0 int.to.chr$ 'last.label :=
+ "" 'next.extra :=
+ #0 'longest.label.width :=
+ #0 'last.extra.num :=
+ #0 'number.label :=
+}
+
+FUNCTION {forward.pass}
+{ last.label label =
+ { last.extra.num #1 + 'last.extra.num :=
+ last.extra.num int.to.chr$ 'extra.label :=
+ }
+ { "a" chr.to.int$ 'last.extra.num :=
+ "" 'extra.label :=
+ label 'last.label :=
+ }
+ if$
+ number.label #1 + 'number.label :=
+}
+
+FUNCTION {reverse.pass}
+{ next.extra "b" =
+ { "a" 'extra.label := }
+ 'skip$
+ if$
+ extra.label 'next.extra :=
+ extra.label
+ duplicate$ empty$
+ 'skip$
+ { "{\natexlab{" swap$ * "}}" * }
+ if$
+ 'extra.label :=
+ label extra.label * 'label :=
+}
+
+FUNCTION { def.alphabibitem }
+{ "\def\alphabibitem#1{%" write$ newline$
+ "\expandafter\ifx\csname firstalphabibitem\endcsname" write$ newline$
+ "\relax\def\firstalphabibitem{}" write$ newline$
+ "\else\expandafter" write$ newline$
+ "\ifx\csname alphabibitemskip\endcsname" write$ newline$
+ "\relax\bigskip" write$ newline$
+ "\else\alphabibitemskip" write$ newline$
+ "\fi" write$ newline$
+ "\fi" write$ newline$
+ "\penalty-200\expandafter" write$ newline$
+ "\ifx\csname alphabibitemlabel\endcsname" write$ newline$
+ "\relax\expandafter" write$ newline$
+ "\ifx\csname alphabibitemcontent\endcsname\relax" write$ newline$
+ "\item[\LARGE\bfseries\MakeUppercase{#1}]" write$ newline$
+ "\hfill\vskip 1ex\hrule\medskip" write$ newline$
+ "\else\item[\Large\bfseries\MakeUppercase{#1}]" write$ newline$
+ "\alphabibitemcontent{\MakeUppercase{#1}}%" write$ newline$
+ "\fi" write$ newline$
+ "\else\expandafter" write$ newline$
+ "\ifx\csname alphabibitemcontent\endcsname\relax" write$ newline$
+ "\item[\alphabibitemlabel{\MakeUppercase{#1}}]" write$ newline$
+ "\vskip 1ex\hrule\medskip" write$ newline$
+ "\else\item[\alphabibitemlabel{\MakeUppercase{#1}}]" write$ newline$
+ "\alphabibitemcontent{\MakeUppercase{#1}}%" write$ newline$
+ "\fi" write$ newline$
+ "\fi}" write$ newline$
+ newline$
+}
+
+EXECUTE {initialize.longest.label}
+
+ITERATE {forward.pass}
+
+REVERSE {reverse.pass}
+
+FUNCTION {bib.sort.order}
+{ sort.label 'sort.key$ :=
+}
+
+ITERATE {bib.sort.order}
+
+SORT
+
+FUNCTION {begin.bib}
+{ preamble$ empty$
+ 'skip$
+ { preamble$ write$ newline$ }
+ if$
+ def.alphabibitem
+ "\begin{thebibliography}{" number.label int.to.str$ * "}" *
+ write$ newline$
+ "\expandafter\ifx\csname natexlab\endcsname\relax\def\natexlab#1{#1}\fi"
+ write$ newline$
+ "\expandafter\ifx\csname url\endcsname\relax" write$ newline$
+ " \def\url#1{{\tt #1}}\fi" write$ newline$
+}
+
+EXECUTE {begin.bib}
+
+EXECUTE {init.state.consts}
+
+ITERATE {call.type$}
+
+FUNCTION {end.bib}
+{ newline$
+ "\end{thebibliography}" write$ newline$
+}
+
+EXECUTE {end.bib}
diff --git a/biblio/bibtex/contrib/sort-by-letters/plain-letters.bst b/biblio/bibtex/contrib/sort-by-letters/plain-letters.bst
new file mode 100644
index 0000000000..47dd3d1906
--- /dev/null
+++ b/biblio/bibtex/contrib/sort-by-letters/plain-letters.bst
@@ -0,0 +1,1217 @@
+% BibTeX bibliography style `plain-letters'
+%% adapted from standard style `plain'
+%% (C) 2006 - Thomas van Oudenhove
+%% when sorting by letter, write the first letter of author
+%% or editor - bug with organization...
+
+ENTRY
+ { address
+ author
+ booktitle
+ chapter
+ edition
+ editor
+ howpublished
+ institution
+ journal
+ key
+ month
+ note
+ number
+ organization
+ pages
+ publisher
+ school
+ series
+ title
+ type
+ volume
+ year
+ }
+ {}
+ { label }
+
+INTEGERS { output.state before.all mid.sentence after.sentence after.block }
+
+FUNCTION {init.state.consts}
+{ #0 'before.all :=
+ #1 'mid.sentence :=
+ #2 'after.sentence :=
+ #3 'after.block :=
+}
+
+STRINGS { s t cur.letter first.letter }
+INTEGERS { first.letter.place first.letter.ascii }
+
+FUNCTION {output.nonnull}
+{ 's :=
+ output.state mid.sentence =
+ { ", " * write$ }
+ { output.state after.block =
+ { add.period$ write$
+ newline$
+ "\newblock " write$
+ }
+ { output.state before.all =
+ 'write$
+ { add.period$ " " * write$ }
+ if$
+ }
+ if$
+ mid.sentence 'output.state :=
+ }
+ if$
+ s
+}
+
+FUNCTION {output}
+{ duplicate$ empty$
+ 'pop$
+ 'output.nonnull
+ if$
+}
+
+FUNCTION {output.check}
+{ 't :=
+ duplicate$ empty$
+ { pop$ "empty " t * " in " * cite$ * warning$ }
+ 'output.nonnull
+ if$
+}
+
+FUNCTION {output.letter}
+{ first.letter cur.letter =
+ { skip$ }
+ { newline$
+ "\alphabibitem{" first.letter * "}" * write$
+ newline$
+ first.letter 'cur.letter := }
+ if$
+ cur.letter "\" =
+ { first.letter 'cur.letter := }
+ { skip$ }
+ if$
+}
+
+FUNCTION {output.bibitem}
+{ newline$
+ "\bibitem{" write$
+ cite$ write$
+ "}" write$
+ newline$
+ ""
+ before.all 'output.state :=
+}
+
+FUNCTION {fin.entry}
+{ add.period$
+ write$
+ newline$
+}
+
+FUNCTION {new.block}
+{ output.state before.all =
+ 'skip$
+ { after.block 'output.state := }
+ if$
+}
+
+FUNCTION {new.sentence}
+{ output.state after.block =
+ 'skip$
+ { output.state before.all =
+ 'skip$
+ { after.sentence 'output.state := }
+ if$
+ }
+ if$
+}
+
+FUNCTION {not}
+{ { #0 }
+ { #1 }
+ if$
+}
+
+FUNCTION {and}
+{ 'skip$
+ { pop$ #0 }
+ if$
+}
+
+FUNCTION {or}
+{ { pop$ #1 }
+ 'skip$
+ if$
+}
+
+FUNCTION {new.block.checka}
+{ empty$
+ 'skip$
+ 'new.block
+ if$
+}
+
+FUNCTION {new.block.checkb}
+{ empty$
+ swap$ empty$
+ and
+ 'skip$
+ 'new.block
+ if$
+}
+
+FUNCTION {new.sentence.checka}
+{ empty$
+ 'skip$
+ 'new.sentence
+ if$
+}
+
+FUNCTION {new.sentence.checkb}
+{ empty$
+ swap$ empty$
+ and
+ 'skip$
+ 'new.sentence
+ if$
+}
+
+FUNCTION {field.or.null}
+{ duplicate$ empty$
+ { pop$ "" }
+ 'skip$
+ if$
+}
+
+FUNCTION {emphasize}
+{ duplicate$ empty$
+ { pop$ "" }
+ { "{\em " swap$ * "}" * }
+ if$
+}
+
+FUNCTION { author.find.first.letter }
+{ author #1 "{vv }{ll }{ff }, {jj }" format.name$ "u" change.case$
+ purify$ first.letter.place #1 substring$ 'first.letter :=
+ first.letter chr.to.int$ 'first.letter.ascii :=
+}
+
+FUNCTION { editor.find.first.letter }
+{ editor #1 "{vv }{ll }{ff }, {jj }" format.name$ "u" change.case$
+ purify$ first.letter.place #1 substring$ 'first.letter :=
+ first.letter chr.to.int$ 'first.letter.ascii :=
+}
+
+FUNCTION { organization.find.first.letter }
+{ organization #1 "{vv }{ll }{ff }, {jj }" format.name$ "u" change.case$
+ purify$ first.letter.place #1 substring$ 'first.letter :=
+ first.letter chr.to.int$ 'first.letter.ascii :=
+}
+
+FUNCTION { find.firstletter }
+{ author empty$
+ { editor empty$
+% { organization empty$
+ { "Nor author, editor neither organization for entry " cite$ * warning$ }
+% { organization.find.first.letter
+% { first.letter.ascii #64 > first.letter.ascii #91 < and
+% first.letter.ascii #96 > first.letter.ascii #123 < and or not }
+% { first.letter.place #1 + 'first.letter.place :=
+% organization.find.first.letter }
+% while$ }
+% if$ }
+ { editor.find.first.letter
+ { first.letter.ascii #64 > first.letter.ascii #91 < and
+ first.letter.ascii #96 > first.letter.ascii #123 < and or not }
+ { first.letter.place #1 + 'first.letter.place :=
+ editor.find.first.letter }
+ while$
+ }
+ if$
+ }
+ { author.find.first.letter
+ { first.letter.ascii #64 > first.letter.ascii #91 < and
+ first.letter.ascii #96 > first.letter.ascii #123 < and or not }
+ { first.letter.place #1 + 'first.letter.place :=
+ author.find.first.letter }
+ while$
+ }
+ if$
+ #1 'first.letter.place :=
+}
+
+INTEGERS { nameptr namesleft numnames }
+
+FUNCTION {format.names}
+{ 's :=
+ #1 'nameptr :=
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ { s nameptr "{ff~}{vv~}{ll}{, jj}" format.name$ 't :=
+ nameptr #1 >
+ { namesleft #1 >
+ { ", " * t * }
+ { numnames #2 >
+ { "," * }
+ 'skip$
+ if$
+ t "others" =
+ { " et~al." * }
+ { " and " * t * }
+ if$
+ }
+ if$
+ }
+ 't
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+}
+
+FUNCTION {format.authors}
+{ author empty$
+ { "" }
+ { author format.names }
+ if$
+}
+
+FUNCTION {format.editors}
+{ editor empty$
+ { "" }
+ { editor format.names
+ editor num.names$ #1 >
+ { ", editors" * }
+ { ", editor" * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.title}
+{ title empty$
+ { "" }
+ { title "t" change.case$ }
+ if$
+}
+
+FUNCTION {n.dashify}
+{ 't :=
+ ""
+ { t empty$ not }
+ { t #1 #1 substring$ "-" =
+ { t #1 #2 substring$ "--" = not
+ { "--" *
+ t #2 global.max$ substring$ 't :=
+ }
+ { { t #1 #1 substring$ "-" = }
+ { "-" *
+ t #2 global.max$ substring$ 't :=
+ }
+ while$
+ }
+ if$
+ }
+ { t #1 #1 substring$ *
+ t #2 global.max$ substring$ 't :=
+ }
+ if$
+ }
+ while$
+}
+
+FUNCTION {format.date}
+{ year empty$
+ { month empty$
+ { "" }
+ { "there's a month but no year in " cite$ * warning$
+ month
+ }
+ if$
+ }
+ { month empty$
+ 'year
+ { month " " * year * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.btitle}
+{ title emphasize
+}
+
+FUNCTION {tie.or.space.connect}
+{ duplicate$ text.length$ #3 <
+ { "~" }
+ { " " }
+ if$
+ swap$ * *
+}
+
+FUNCTION {either.or.check}
+{ empty$
+ 'pop$
+ { "can't use both " swap$ * " fields in " * cite$ * warning$ }
+ if$
+}
+
+FUNCTION {format.bvolume}
+{ volume empty$
+ { "" }
+ { "volume" volume tie.or.space.connect
+ series empty$
+ 'skip$
+ { " of " * series emphasize * }
+ if$
+ "volume and number" number either.or.check
+ }
+ if$
+}
+
+FUNCTION {format.number.series}
+{ volume empty$
+ { number empty$
+ { series field.or.null }
+ { output.state mid.sentence =
+ { "number" }
+ { "Number" }
+ if$
+ number tie.or.space.connect
+ series empty$
+ { "there's a number but no series in " cite$ * warning$ }
+ { " in " * series * }
+ if$
+ }
+ if$
+ }
+ { "" }
+ if$
+}
+
+FUNCTION {format.edition}
+{ edition empty$
+ { "" }
+ { output.state mid.sentence =
+ { edition "l" change.case$ " edition" * }
+ { edition "t" change.case$ " edition" * }
+ if$
+ }
+ if$
+}
+
+INTEGERS { multiresult }
+
+FUNCTION {multi.page.check}
+{ 't :=
+ #0 'multiresult :=
+ { multiresult not
+ t empty$ not
+ and
+ }
+ { t #1 #1 substring$
+ duplicate$ "-" =
+ swap$ duplicate$ "," =
+ swap$ "+" =
+ or or
+ { #1 'multiresult := }
+ { t #2 global.max$ substring$ 't := }
+ if$
+ }
+ while$
+ multiresult
+}
+
+FUNCTION {format.pages}
+{ pages empty$
+ { "" }
+ { pages multi.page.check
+ { "pages" pages n.dashify tie.or.space.connect }
+ { "page" pages tie.or.space.connect }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.vol.num.pages}
+{ volume field.or.null
+ number empty$
+ 'skip$
+ { "(" number * ")" * *
+ volume empty$
+ { "there's a number but no volume in " cite$ * warning$ }
+ 'skip$
+ if$
+ }
+ if$
+ pages empty$
+ 'skip$
+ { duplicate$ empty$
+ { pop$ format.pages }
+ { ":" * pages n.dashify * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.chapter.pages}
+{ chapter empty$
+ 'format.pages
+ { type empty$
+ { "chapter" }
+ { type "l" change.case$ }
+ if$
+ chapter tie.or.space.connect
+ pages empty$
+ 'skip$
+ { ", " * format.pages * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.in.ed.booktitle}
+{ booktitle empty$
+ { "" }
+ { editor empty$
+ { "In " booktitle emphasize * }
+ { "In " format.editors * ", " * booktitle emphasize * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {empty.misc.check}
+{ author empty$ title empty$ howpublished empty$
+ month empty$ year empty$ note empty$
+ and and and and and
+ key empty$ not and
+ { "all relevant fields are empty in " cite$ * warning$ }
+ 'skip$
+ if$
+}
+
+FUNCTION {format.thesis.type}
+{ type empty$
+ 'skip$
+ { pop$
+ type "t" change.case$
+ }
+ if$
+}
+
+FUNCTION {format.tr.number}
+{ type empty$
+ { "Technical Report" }
+ 'type
+ if$
+ number empty$
+ { "t" change.case$ }
+ { number tie.or.space.connect }
+ if$
+}
+
+FUNCTION {format.article.crossref}
+{ key empty$
+ { journal empty$
+ { "need key or journal for " cite$ * " to crossref " * crossref *
+ warning$
+ ""
+ }
+ { "In {\em " journal * "\/}" * }
+ if$
+ }
+ { "In " key * }
+ if$
+ " \cite{" * crossref * "}" *
+}
+
+FUNCTION {format.crossref.editor}
+{ editor #1 "{vv~}{ll}" format.name$
+ editor num.names$ duplicate$
+ #2 >
+ { pop$ " et~al." * }
+ { #2 <
+ 'skip$
+ { editor #2 "{ff }{vv }{ll}{ jj}" format.name$ "others" =
+ { " et~al." * }
+ { " and " * editor #2 "{vv~}{ll}" format.name$ * }
+ if$
+ }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.book.crossref}
+{ volume empty$
+ { "empty volume in " cite$ * "'s crossref of " * crossref * warning$
+ "In "
+ }
+ { "Volume" volume tie.or.space.connect
+ " of " *
+ }
+ if$
+ editor empty$
+ editor field.or.null author field.or.null =
+ or
+ { key empty$
+ { series empty$
+ { "need editor, key, or series for " cite$ * " to crossref " *
+ crossref * warning$
+ "" *
+ }
+ { "{\em " * series * "\/}" * }
+ if$
+ }
+ { key * }
+ if$
+ }
+ { format.crossref.editor * }
+ if$
+ " \cite{" * crossref * "}" *
+}
+
+FUNCTION {format.incoll.inproc.crossref}
+{ editor empty$
+ editor field.or.null author field.or.null =
+ or
+ { key empty$
+ { booktitle empty$
+ { "need editor, key, or booktitle for " cite$ * " to crossref " *
+ crossref * warning$
+ ""
+ }
+ { "In {\em " booktitle * "\/}" * }
+ if$
+ }
+ { "In " key * }
+ if$
+ }
+ { "In " format.crossref.editor * }
+ if$
+ " \cite{" * crossref * "}" *
+}
+
+FUNCTION {article}
+{ find.firstletter
+ output.letter
+ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.title "title" output.check
+ new.block
+ crossref missing$
+ { journal emphasize "journal" output.check
+ format.vol.num.pages output
+ format.date "year" output.check
+ }
+ { format.article.crossref output.nonnull
+ format.pages output
+ }
+ if$
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {book}
+{ find.firstletter
+ output.letter
+ output.bibitem
+ author empty$
+ { format.editors "author and editor" output.check }
+ { format.authors output.nonnull
+ crossref missing$
+ { "author and editor" editor either.or.check }
+ 'skip$
+ if$
+ }
+ if$
+ new.block
+ format.btitle "title" output.check
+ crossref missing$
+ { format.bvolume output
+ new.block
+ format.number.series output
+ new.sentence
+ publisher "publisher" output.check
+ address output
+ }
+ { new.block
+ format.book.crossref output.nonnull
+ }
+ if$
+ format.edition output
+ format.date "year" output.check
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {booklet}
+{ find.firstletter
+ output.letter
+ output.bibitem
+ format.authors output
+ new.block
+ format.title "title" output.check
+ howpublished address new.block.checkb
+ howpublished output
+ address output
+ format.date output
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {inbook}
+{ find.firstletter
+ output.letter
+ output.bibitem
+ author empty$
+ { format.editors "author and editor" output.check }
+ { format.authors output.nonnull
+ crossref missing$
+ { "author and editor" editor either.or.check }
+ 'skip$
+ if$
+ }
+ if$
+ new.block
+ format.btitle "title" output.check
+ crossref missing$
+ { format.bvolume output
+ format.chapter.pages "chapter and pages" output.check
+ new.block
+ format.number.series output
+ new.sentence
+ publisher "publisher" output.check
+ address output
+ }
+ { format.chapter.pages "chapter and pages" output.check
+ new.block
+ format.book.crossref output.nonnull
+ }
+ if$
+ format.edition output
+ format.date "year" output.check
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {incollection}
+{ find.firstletter
+ output.letter
+ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.title "title" output.check
+ new.block
+ crossref missing$
+ { format.in.ed.booktitle "booktitle" output.check
+ format.bvolume output
+ format.number.series output
+ format.chapter.pages output
+ new.sentence
+ publisher "publisher" output.check
+ address output
+ format.edition output
+ format.date "year" output.check
+ }
+ { format.incoll.inproc.crossref output.nonnull
+ format.chapter.pages output
+ }
+ if$
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {inproceedings}
+{ find.firstletter
+ output.letter
+ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.title "title" output.check
+ new.block
+ crossref missing$
+ { format.in.ed.booktitle "booktitle" output.check
+ format.bvolume output
+ format.number.series output
+ format.pages output
+ address empty$
+ { organization publisher new.sentence.checkb
+ organization output
+ publisher output
+ format.date "year" output.check
+ }
+ { address output.nonnull
+ format.date "year" output.check
+ new.sentence
+ organization output
+ publisher output
+ }
+ if$
+ }
+ { format.incoll.inproc.crossref output.nonnull
+ format.pages output
+ }
+ if$
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {conference} { inproceedings }
+
+FUNCTION {manual}
+{ find.firstletter
+ output.letter
+ output.bibitem
+ author empty$
+ { organization empty$
+ 'skip$
+ { organization output.nonnull
+ address output
+ }
+ if$
+ }
+ { format.authors output.nonnull }
+ if$
+ new.block
+ format.btitle "title" output.check
+ author empty$
+ { organization empty$
+ { address new.block.checka
+ address output
+ }
+ 'skip$
+ if$
+ }
+ { organization address new.block.checkb
+ organization output
+ address output
+ }
+ if$
+ format.edition output
+ format.date output
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {mastersthesis}
+{ find.firstletter
+ output.letter
+ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.title "title" output.check
+ new.block
+ "Master's thesis" format.thesis.type output.nonnull
+ school "school" output.check
+ address output
+ format.date "year" output.check
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {misc}
+{ find.firstletter
+ output.letter
+ output.bibitem
+ format.authors output
+ title howpublished new.block.checkb
+ format.title output
+ howpublished new.block.checka
+ howpublished output
+ format.date output
+ new.block
+ note output
+ fin.entry
+ empty.misc.check
+}
+
+FUNCTION {phdthesis}
+{ find.firstletter
+ output.letter
+ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.btitle "title" output.check
+ new.block
+ "PhD thesis" format.thesis.type output.nonnull
+ school "school" output.check
+ address output
+ format.date "year" output.check
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {proceedings}
+{ find.firstletter
+ output.letter
+ output.bibitem
+ editor empty$
+ { organization output }
+ { format.editors output.nonnull }
+ if$
+ new.block
+ format.btitle "title" output.check
+ format.bvolume output
+ format.number.series output
+ address empty$
+ { editor empty$
+ { publisher new.sentence.checka }
+ { organization publisher new.sentence.checkb
+ organization output
+ }
+ if$
+ publisher output
+ format.date "year" output.check
+ }
+ { address output.nonnull
+ format.date "year" output.check
+ new.sentence
+ editor empty$
+ 'skip$
+ { organization output }
+ if$
+ publisher output
+ }
+ if$
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {techreport}
+{ find.firstletter
+ output.letter
+ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.title "title" output.check
+ new.block
+ format.tr.number output.nonnull
+ institution "institution" output.check
+ address output
+ format.date "year" output.check
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {unpublished}
+{ find.firstletter
+ output.letter
+ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.title "title" output.check
+ new.block
+ note "note" output.check
+ format.date output
+ fin.entry
+}
+
+FUNCTION {default.type} { misc }
+
+MACRO {jan} {"January"}
+
+MACRO {feb} {"February"}
+
+MACRO {mar} {"March"}
+
+MACRO {apr} {"April"}
+
+MACRO {may} {"May"}
+
+MACRO {jun} {"June"}
+
+MACRO {jul} {"July"}
+
+MACRO {aug} {"August"}
+
+MACRO {sep} {"September"}
+
+MACRO {oct} {"October"}
+
+MACRO {nov} {"November"}
+
+MACRO {dec} {"December"}
+
+MACRO {acmcs} {"ACM Computing Surveys"}
+
+MACRO {acta} {"Acta Informatica"}
+
+MACRO {cacm} {"Communications of the ACM"}
+
+MACRO {ibmjrd} {"IBM Journal of Research and Development"}
+
+MACRO {ibmsj} {"IBM Systems Journal"}
+
+MACRO {ieeese} {"IEEE Transactions on Software Engineering"}
+
+MACRO {ieeetc} {"IEEE Transactions on Computers"}
+
+MACRO {ieeetcad}
+ {"IEEE Transactions on Computer-Aided Design of Integrated Circuits"}
+
+MACRO {ipl} {"Information Processing Letters"}
+
+MACRO {jacm} {"Journal of the ACM"}
+
+MACRO {jcss} {"Journal of Computer and System Sciences"}
+
+MACRO {scp} {"Science of Computer Programming"}
+
+MACRO {sicomp} {"SIAM Journal on Computing"}
+
+MACRO {tocs} {"ACM Transactions on Computer Systems"}
+
+MACRO {tods} {"ACM Transactions on Database Systems"}
+
+MACRO {tog} {"ACM Transactions on Graphics"}
+
+MACRO {toms} {"ACM Transactions on Mathematical Software"}
+
+MACRO {toois} {"ACM Transactions on Office Information Systems"}
+
+MACRO {toplas} {"ACM Transactions on Programming Languages and Systems"}
+
+MACRO {tcs} {"Theoretical Computer Science"}
+
+READ
+
+FUNCTION {sortify}
+{ purify$
+ "l" change.case$
+}
+
+INTEGERS { len }
+
+FUNCTION {chop.word}
+{ 's :=
+ 'len :=
+ s #1 len substring$ =
+ { s len #1 + global.max$ substring$ }
+ 's
+ if$
+}
+
+FUNCTION {sort.format.names}
+{ 's :=
+ #1 'nameptr :=
+ ""
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ { nameptr #1 >
+ { " " * }
+ 'skip$
+ if$
+ s nameptr "{vv{ } }{ll{ }}{ ff{ }}{ jj{ }}" format.name$ 't :=
+ nameptr numnames = t "others" = and
+ { "et al" * }
+ { t sortify * }
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+}
+
+FUNCTION {sort.format.title}
+{ 't :=
+ "A " #2
+ "An " #3
+ "The " #4 t chop.word
+ chop.word
+ chop.word
+ sortify
+ #1 global.max$ substring$
+}
+
+FUNCTION {author.sort}
+{ author empty$
+ { key empty$
+ { "to sort, need author or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { author sort.format.names }
+ if$
+}
+
+FUNCTION {author.editor.sort}
+{ author empty$
+ { editor empty$
+ { key empty$
+ { "to sort, need author, editor, or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { editor sort.format.names }
+ if$
+ }
+ { author sort.format.names }
+ if$
+}
+
+FUNCTION {author.organization.sort}
+{ author empty$
+ { organization empty$
+ { key empty$
+ { "to sort, need author, organization, or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { "The " #4 organization chop.word sortify }
+ if$
+ }
+ { author sort.format.names }
+ if$
+}
+
+FUNCTION {editor.organization.sort}
+{ editor empty$
+ { organization empty$
+ { key empty$
+ { "to sort, need editor, organization, or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { "The " #4 organization chop.word sortify }
+ if$
+ }
+ { editor sort.format.names }
+ if$
+}
+
+FUNCTION {presort}
+{ type$ "book" =
+ type$ "inbook" =
+ or
+ 'author.editor.sort
+ { type$ "proceedings" =
+ 'editor.organization.sort
+ { type$ "manual" =
+ 'author.organization.sort
+ 'author.sort
+ if$
+ }
+ if$
+ }
+ if$
+ " "
+ *
+ year field.or.null sortify
+ *
+ " "
+ *
+ title field.or.null
+ sort.format.title
+ *
+ #1 entry.max$ substring$
+ 'sort.key$ :=
+}
+
+ITERATE {presort}
+
+SORT
+
+STRINGS { longest.label }
+
+INTEGERS { number.label longest.label.width }
+
+FUNCTION {initialize.longest.label}
+{ "" 'longest.label :=
+ "\" 'cur.letter :=
+ #1 'first.letter.place :=
+ #1 'number.label :=
+ #0 'longest.label.width :=
+}
+
+FUNCTION { def.alphabibitem }
+{ "\def\alphabibitem#1{%" write$ newline$
+ "\expandafter\ifx\csname firstalphabibitem\endcsname" write$ newline$
+ "\relax\def\firstalphabibitem{}" write$ newline$
+ "\else\expandafter" write$ newline$
+ "\ifx\csname alphabibitemskip\endcsname" write$ newline$
+ "\relax\bigskip" write$ newline$
+ "\else\alphabibitemskip" write$ newline$
+ "\fi" write$ newline$
+ "\fi" write$ newline$
+ "\penalty-200\expandafter" write$ newline$
+ "\ifx\csname alphabibitemlabel\endcsname" write$ newline$
+ "\relax\expandafter" write$ newline$
+ "\ifx\csname alphabibitemcontent\endcsname\relax" write$ newline$
+ "\item[\LARGE\bfseries\MakeUppercase{#1}]" write$ newline$
+ "\hfill\vskip 1ex\hrule\medskip" write$ newline$
+ "\else\item[\Large\bfseries\MakeUppercase{#1}]" write$ newline$
+ "\alphabibitemcontent{\MakeUppercase{#1}}%" write$ newline$
+ "\fi" write$ newline$
+ "\else\expandafter" write$ newline$
+ "\ifx\csname alphabibitemcontent\endcsname\relax" write$ newline$
+ "\item[\alphabibitemlabel{\MakeUppercase{#1}}]" write$ newline$
+ "\vskip 1ex\hrule\medskip" write$ newline$
+ "\else\item[\alphabibitemlabel{\MakeUppercase{#1}}]" write$ newline$
+ "\alphabibitemcontent{\MakeUppercase{#1}}%" write$ newline$
+ "\fi" write$ newline$
+ "\fi}" write$ newline$
+ newline$
+}
+
+FUNCTION {longest.label.pass}
+{ number.label int.to.str$ 'label :=
+ number.label #1 + 'number.label :=
+ label width$ longest.label.width >
+ { label 'longest.label :=
+ label width$ 'longest.label.width :=
+ }
+ 'skip$
+ if$
+}
+
+EXECUTE {initialize.longest.label}
+
+ITERATE {longest.label.pass}
+
+FUNCTION {begin.bib}
+{ preamble$ empty$
+ 'skip$
+ { preamble$ write$ newline$ }
+ if$
+ def.alphabibitem
+ "\begin{thebibliography}{" longest.label * "}" * write$ newline$
+}
+
+EXECUTE {begin.bib}
+
+EXECUTE {init.state.consts}
+
+ITERATE {call.type$}
+
+FUNCTION {end.bib}
+{ newline$
+ "\end{thebibliography}" write$ newline$
+}
+
+EXECUTE {end.bib}
diff --git a/biblio/bibtex/contrib/sort-by-letters/plainnat-letters.bst b/biblio/bibtex/contrib/sort-by-letters/plainnat-letters.bst
new file mode 100644
index 0000000000..cbe91a2386
--- /dev/null
+++ b/biblio/bibtex/contrib/sort-by-letters/plainnat-letters.bst
@@ -0,0 +1,1529 @@
+%% File: `plainnat-letters.bst'
+%% A modification of `plain.bst' for use with natbib package
+%% add: generation of letters-group for authors
+%%
+%% Copyright 1993-2005 Patrick W Daly
+%% Max-Planck-Institut f\"ur Sonnensystemforschung
+%% Max-Planck-Str. 2
+%% D-37191 Katlenburg-Lindau
+%% Germany
+%% E-mail: daly @ mps \dot mpg \dot de
+%%
+%% This program can be redistributed and/or modified under the terms
+%% of the LaTeX Project Public License Distributed from CTAN
+%% archives in directory macros/latex/base/lppl.txt; either
+%% version 1 of the License, or any later version.
+%%
+%% Thomas van Oudenhove <vanouden @ enstimac \dot fr>
+%%
+ENTRY
+ { address
+ author
+ booktitle
+ chapter
+ doi
+ eid
+ edition
+ editor
+ howpublished
+ institution
+ isbn
+ issn
+ journal
+ key
+ month
+ note
+ number
+ organization
+ pages
+ publisher
+ school
+ series
+ title
+ type
+ url
+ volume
+ year
+ }
+ {}
+ { label extra.label sort.label short.list }
+
+INTEGERS { output.state before.all mid.sentence after.sentence after.block }
+
+FUNCTION {init.state.consts}
+{ #0 'before.all :=
+ #1 'mid.sentence :=
+ #2 'after.sentence :=
+ #3 'after.block :=
+}
+
+STRINGS { s t cur.letter first.letter }
+INTEGERS { first.letter.place first.letter.ascii }
+
+FUNCTION {output.nonnull}
+{ 's :=
+ output.state mid.sentence =
+ { ", " * write$ }
+ { output.state after.block =
+ { add.period$ write$
+ newline$
+ "\newblock " write$
+ }
+ { output.state before.all =
+ 'write$
+ { add.period$ " " * write$ }
+ if$
+ }
+ if$
+ mid.sentence 'output.state :=
+ }
+ if$
+ s
+}
+
+FUNCTION {output}
+{ duplicate$ empty$
+ 'pop$
+ 'output.nonnull
+ if$
+}
+
+FUNCTION {output.check}
+{ 't :=
+ duplicate$ empty$
+ { pop$ "empty " t * " in " * cite$ * warning$ }
+ 'output.nonnull
+ if$
+}
+
+FUNCTION {fin.entry}
+{ add.period$
+ write$
+ newline$
+}
+
+FUNCTION {new.block}
+{ output.state before.all =
+ 'skip$
+ { after.block 'output.state := }
+ if$
+}
+
+FUNCTION {new.sentence}
+{ output.state after.block =
+ 'skip$
+ { output.state before.all =
+ 'skip$
+ { after.sentence 'output.state := }
+ if$
+ }
+ if$
+}
+
+FUNCTION {not}
+{ { #0 }
+ { #1 }
+ if$
+}
+
+FUNCTION {and}
+{ 'skip$
+ { pop$ #0 }
+ if$
+}
+
+FUNCTION {or}
+{ { pop$ #1 }
+ 'skip$
+ if$
+}
+
+FUNCTION {new.block.checka}
+{ empty$
+ 'skip$
+ 'new.block
+ if$
+}
+
+FUNCTION {new.block.checkb}
+{ empty$
+ swap$ empty$
+ and
+ 'skip$
+ 'new.block
+ if$
+}
+
+FUNCTION {new.sentence.checka}
+{ empty$
+ 'skip$
+ 'new.sentence
+ if$
+}
+
+FUNCTION {new.sentence.checkb}
+{ empty$
+ swap$ empty$
+ and
+ 'skip$
+ 'new.sentence
+ if$
+}
+
+FUNCTION {field.or.null}
+{ duplicate$ empty$
+ { pop$ "" }
+ 'skip$
+ if$
+}
+
+FUNCTION {emphasize}
+{ duplicate$ empty$
+ { pop$ "" }
+ { "\emph{" swap$ * "}" * }
+ if$
+}
+
+FUNCTION { author.find.first.letter }
+{ author #1 "{vv }{ll }{ff }, {jj }" format.name$ "u" change.case$
+ purify$ first.letter.place #1 substring$ 'first.letter :=
+ first.letter chr.to.int$ 'first.letter.ascii :=
+}
+
+FUNCTION { editor.find.first.letter }
+{ editor #1 "{vv }{ll }{ff }, {jj }" format.name$ "u" change.case$
+ purify$ first.letter.place #1 substring$ 'first.letter :=
+ first.letter chr.to.int$ 'first.letter.ascii :=
+}
+
+FUNCTION { organization.find.first.letter }
+{ organization #1 "{vv }{ll }{ff }, {jj }" format.name$ "u" change.case$
+ purify$ first.letter.place #1 substring$ 'first.letter :=
+ first.letter chr.to.int$ 'first.letter.ascii :=
+}
+
+FUNCTION { find.firstletter }
+{ author empty$
+ { editor empty$
+% { organization empty$
+ { "Nor author, editor neither organization for entry " cite$ * warning$ }
+% { organization.find.first.letter
+% { first.letter.ascii #64 > first.letter.ascii #91 < and
+% first.letter.ascii #96 > first.letter.ascii #123 < and or not }
+% { first.letter.place #1 + 'first.letter.place :=
+% organization.find.first.letter }
+% while$ }
+% if$ }
+ { editor.find.first.letter
+ { first.letter.ascii #64 > first.letter.ascii #91 < and
+ first.letter.ascii #96 > first.letter.ascii #123 < and or not }
+ { first.letter.place #1 + 'first.letter.place :=
+ editor.find.first.letter }
+ while$
+ }
+ if$
+ }
+ { author.find.first.letter
+ { first.letter.ascii #64 > first.letter.ascii #91 < and
+ first.letter.ascii #96 > first.letter.ascii #123 < and or not }
+ { first.letter.place #1 + 'first.letter.place :=
+ author.find.first.letter }
+ while$
+ }
+ if$
+ #1 'first.letter.place :=
+}
+
+INTEGERS { nameptr namesleft numnames }
+
+FUNCTION {format.names}
+{ 's :=
+ #1 'nameptr :=
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ { s nameptr "{ff~}{vv~}{ll}{, jj}" format.name$ 't :=
+ nameptr #1 >
+ { namesleft #1 >
+ { ", " * t * }
+ { numnames #2 >
+ { "," * }
+ 'skip$
+ if$
+ t "others" =
+ { " et~al." * }
+ { " and " * t * }
+ if$
+ }
+ if$
+ }
+ 't
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+}
+
+FUNCTION {format.key}
+{ empty$
+ { key field.or.null }
+ { "" }
+ if$
+}
+
+FUNCTION {format.authors}
+{ author empty$
+ { "" }
+ { author format.names }
+ if$
+}
+
+FUNCTION {format.editors}
+{ editor empty$
+ { "" }
+ { editor format.names
+ editor num.names$ #1 >
+ { ", editors" * }
+ { ", editor" * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.isbn}
+{ isbn empty$
+ { "" }
+ { new.block "ISBN " isbn * }
+ if$
+}
+
+FUNCTION {format.issn}
+{ issn empty$
+ { "" }
+ { new.block "ISSN " issn * }
+ if$
+}
+
+FUNCTION {format.url}
+{ url empty$
+ { "" }
+ { new.block "URL \url{" url * "}" * }
+ if$
+}
+
+FUNCTION {format.doi}
+{ doi empty$
+ { "" }
+ { new.block "\doi{" doi * "}" * }
+ if$
+}
+
+FUNCTION {format.title}
+{ title empty$
+ { "" }
+ { title "t" change.case$ }
+ if$
+}
+
+FUNCTION {format.full.names}
+{'s :=
+ #1 'nameptr :=
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ { s nameptr
+ "{vv~}{ll}" format.name$ 't :=
+ nameptr #1 >
+ {
+ namesleft #1 >
+ { ", " * t * }
+ {
+ numnames #2 >
+ { "," * }
+ 'skip$
+ if$
+ t "others" =
+ { " et~al." * }
+ { " and " * t * }
+ if$
+ }
+ if$
+ }
+ 't
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+}
+
+FUNCTION {author.editor.full}
+{ author empty$
+ { editor empty$
+ { "" }
+ { editor format.full.names }
+ if$
+ }
+ { author format.full.names }
+ if$
+}
+
+FUNCTION {author.full}
+{ author empty$
+ { "" }
+ { author format.full.names }
+ if$
+}
+
+FUNCTION {editor.full}
+{ editor empty$
+ { "" }
+ { editor format.full.names }
+ if$
+}
+
+FUNCTION {make.full.names}
+{ type$ "book" =
+ type$ "inbook" =
+ or
+ 'author.editor.full
+ { type$ "proceedings" =
+ 'editor.full
+ 'author.full
+ if$
+ }
+ if$
+}
+
+FUNCTION {output.bibitem}
+{ newline$
+ "\bibitem[" write$
+ label write$
+ ")" make.full.names duplicate$ short.list =
+ { pop$ }
+ { * }
+ if$
+ "]{" * write$
+ cite$ write$
+ "}" write$
+ newline$
+ ""
+ before.all 'output.state :=
+}
+
+FUNCTION {output.letter}
+{ first.letter cur.letter =
+ { skip$ }
+ { newline$
+ "\alphabibitem{" first.letter * "}" * write$
+ newline$
+ first.letter 'cur.letter := }
+ if$
+ cur.letter "\" =
+ { first.letter 'cur.letter := }
+ { skip$ }
+ if$
+}
+
+
+FUNCTION {n.dashify}
+{ 't :=
+ ""
+ { t empty$ not }
+ { t #1 #1 substring$ "-" =
+ { t #1 #2 substring$ "--" = not
+ { "--" *
+ t #2 global.max$ substring$ 't :=
+ }
+ { { t #1 #1 substring$ "-" = }
+ { "-" *
+ t #2 global.max$ substring$ 't :=
+ }
+ while$
+ }
+ if$
+ }
+ { t #1 #1 substring$ *
+ t #2 global.max$ substring$ 't :=
+ }
+ if$
+ }
+ while$
+}
+
+FUNCTION {format.date}
+{ year duplicate$ empty$
+ { "empty year in " cite$ * warning$
+ pop$ "" }
+ 'skip$
+ if$
+ month empty$
+ 'skip$
+ { month
+ " " * swap$ *
+ }
+ if$
+ extra.label *
+}
+
+FUNCTION {format.btitle}
+{ title emphasize
+}
+
+FUNCTION {tie.or.space.connect}
+{ duplicate$ text.length$ #3 <
+ { "~" }
+ { " " }
+ if$
+ swap$ * *
+}
+
+FUNCTION {either.or.check}
+{ empty$
+ 'pop$
+ { "can't use both " swap$ * " fields in " * cite$ * warning$ }
+ if$
+}
+
+FUNCTION {format.bvolume}
+{ volume empty$
+ { "" }
+ { "volume" volume tie.or.space.connect
+ series empty$
+ 'skip$
+ { " of " * series emphasize * }
+ if$
+ "volume and number" number either.or.check
+ }
+ if$
+}
+
+FUNCTION {format.number.series}
+{ volume empty$
+ { number empty$
+ { series field.or.null }
+ { output.state mid.sentence =
+ { "number" }
+ { "Number" }
+ if$
+ number tie.or.space.connect
+ series empty$
+ { "there's a number but no series in " cite$ * warning$ }
+ { " in " * series * }
+ if$
+ }
+ if$
+ }
+ { "" }
+ if$
+}
+
+FUNCTION {format.edition}
+{ edition empty$
+ { "" }
+ { output.state mid.sentence =
+ { edition "l" change.case$ " edition" * }
+ { edition "t" change.case$ " edition" * }
+ if$
+ }
+ if$
+}
+
+INTEGERS { multiresult }
+
+FUNCTION {multi.page.check}
+{ 't :=
+ #0 'multiresult :=
+ { multiresult not
+ t empty$ not
+ and
+ }
+ { t #1 #1 substring$
+ duplicate$ "-" =
+ swap$ duplicate$ "," =
+ swap$ "+" =
+ or or
+ { #1 'multiresult := }
+ { t #2 global.max$ substring$ 't := }
+ if$
+ }
+ while$
+ multiresult
+}
+
+FUNCTION {format.pages}
+{ pages empty$
+ { "" }
+ { pages multi.page.check
+ { "pages" pages n.dashify tie.or.space.connect }
+ { "page" pages tie.or.space.connect }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.eid}
+{ eid empty$
+ { "" }
+ { "art." eid tie.or.space.connect }
+ if$
+}
+
+FUNCTION {format.vol.num.pages}
+{ volume field.or.null
+ number empty$
+ 'skip$
+ { "\penalty0 (" number * ")" * *
+ volume empty$
+ { "there's a number but no volume in " cite$ * warning$ }
+ 'skip$
+ if$
+ }
+ if$
+ pages empty$
+ 'skip$
+ { duplicate$ empty$
+ { pop$ format.pages }
+ { ":\penalty0 " * pages n.dashify * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.vol.num.eid}
+{ volume field.or.null
+ number empty$
+ 'skip$
+ { "\penalty0 (" number * ")" * *
+ volume empty$
+ { "there's a number but no volume in " cite$ * warning$ }
+ 'skip$
+ if$
+ }
+ if$
+ eid empty$
+ 'skip$
+ { duplicate$ empty$
+ { pop$ format.eid }
+ { ":\penalty0 " * eid * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.chapter.pages}
+{ chapter empty$
+ 'format.pages
+ { type empty$
+ { "chapter" }
+ { type "l" change.case$ }
+ if$
+ chapter tie.or.space.connect
+ pages empty$
+ 'skip$
+ { ", " * format.pages * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.in.ed.booktitle}
+{ booktitle empty$
+ { "" }
+ { editor empty$
+ { "In " booktitle emphasize * }
+ { "In " format.editors * ", " * booktitle emphasize * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {empty.misc.check}
+{ author empty$ title empty$ howpublished empty$
+ month empty$ year empty$ note empty$
+ and and and and and
+ key empty$ not and
+ { "all relevant fields are empty in " cite$ * warning$ }
+ 'skip$
+ if$
+}
+
+FUNCTION {format.thesis.type}
+{ type empty$
+ 'skip$
+ { pop$
+ type "t" change.case$
+ }
+ if$
+}
+
+FUNCTION {format.tr.number}
+{ type empty$
+ { "Technical Report" }
+ 'type
+ if$
+ number empty$
+ { "t" change.case$ }
+ { number tie.or.space.connect }
+ if$
+}
+
+FUNCTION {format.article.crossref}
+{ key empty$
+ { journal empty$
+ { "need key or journal for " cite$ * " to crossref " * crossref *
+ warning$
+ ""
+ }
+ { "In \emph{" journal * "}" * }
+ if$
+ }
+ { "In " key * }
+ if$
+ " \citep{" * crossref * "}" *
+}
+
+FUNCTION {format.book.crossref}
+{ volume empty$
+ { "empty volume in " cite$ * "'s crossref of " * crossref * warning$
+ "In "
+ }
+ { "Volume" volume tie.or.space.connect
+ " of " *
+ }
+ if$
+ editor empty$
+ editor field.or.null author field.or.null =
+ or
+ { key empty$
+ { series empty$
+ { "need editor, key, or series for " cite$ * " to crossref " *
+ crossref * warning$
+ "" *
+ }
+ { "\emph{" * series * "}" * }
+ if$
+ }
+ { key * }
+ if$
+ }
+ 'skip$
+ if$
+ ", \citet{" * crossref * "}" *
+}
+
+FUNCTION {format.incoll.inproc.crossref}
+{ editor empty$
+ editor field.or.null author field.or.null =
+ or
+ { key empty$
+ { booktitle empty$
+ { "need editor, key, or booktitle for " cite$ * " to crossref " *
+ crossref * warning$
+ ""
+ }
+ { "In \emph{" booktitle * "}" * }
+ if$
+ }
+ { "In " key * }
+ if$
+ }
+ { "In " }
+ if$
+ " \citet{" * crossref * "}" *
+}
+
+FUNCTION {article}
+{ find.firstletter
+ output.letter
+ output.bibitem
+ format.authors "author" output.check
+ author format.key output
+ new.block
+ format.title "title" output.check
+ new.block
+ crossref missing$
+ { journal emphasize "journal" output.check
+ eid empty$
+ { format.vol.num.pages output }
+ { format.vol.num.eid output }
+ if$
+ format.date "year" output.check
+ }
+ { format.article.crossref output.nonnull
+ eid empty$
+ { format.pages output }
+ { format.eid output }
+ if$
+ }
+ if$
+ format.issn output
+ format.doi output
+ format.url output
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {book}
+{ find.firstletter
+ output.letter
+ output.bibitem
+ author empty$
+ { format.editors "author and editor" output.check
+ editor format.key output
+ }
+ { format.authors output.nonnull
+ crossref missing$
+ { "author and editor" editor either.or.check }
+ 'skip$
+ if$
+ }
+ if$
+ new.block
+ format.btitle "title" output.check
+ crossref missing$
+ { format.bvolume output
+ new.block
+ format.number.series output
+ new.sentence
+ publisher "publisher" output.check
+ address output
+ }
+ { new.block
+ format.book.crossref output.nonnull
+ }
+ if$
+ format.edition output
+ format.date "year" output.check
+ format.isbn output
+ format.doi output
+ format.url output
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {booklet}
+{ find.firstletter
+ output.letter
+ output.bibitem
+ format.authors output
+ author format.key output
+ new.block
+ format.title "title" output.check
+ howpublished address new.block.checkb
+ howpublished output
+ address output
+ format.date output
+ format.isbn output
+ format.doi output
+ format.url output
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {inbook}
+{ find.firstletter
+ output.letter
+ output.bibitem
+ author empty$
+ { format.editors "author and editor" output.check
+ editor format.key output
+ }
+ { format.authors output.nonnull
+ crossref missing$
+ { "author and editor" editor either.or.check }
+ 'skip$
+ if$
+ }
+ if$
+ new.block
+ format.btitle "title" output.check
+ crossref missing$
+ { format.bvolume output
+ format.chapter.pages "chapter and pages" output.check
+ new.block
+ format.number.series output
+ new.sentence
+ publisher "publisher" output.check
+ address output
+ }
+ { format.chapter.pages "chapter and pages" output.check
+ new.block
+ format.book.crossref output.nonnull
+ }
+ if$
+ format.edition output
+ format.date "year" output.check
+ format.isbn output
+ format.doi output
+ format.url output
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {incollection}
+{ find.firstletter
+ output.letter
+ output.bibitem
+ format.authors "author" output.check
+ author format.key output
+ new.block
+ format.title "title" output.check
+ new.block
+ crossref missing$
+ { format.in.ed.booktitle "booktitle" output.check
+ format.bvolume output
+ format.number.series output
+ format.chapter.pages output
+ new.sentence
+ publisher "publisher" output.check
+ address output
+ format.edition output
+ format.date "year" output.check
+ }
+ { format.incoll.inproc.crossref output.nonnull
+ format.chapter.pages output
+ }
+ if$
+ format.isbn output
+ format.doi output
+ format.url output
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {inproceedings}
+{ find.firstletter
+ output.letter
+ output.bibitem
+ format.authors "author" output.check
+ author format.key output
+ new.block
+ format.title "title" output.check
+ new.block
+ crossref missing$
+ { format.in.ed.booktitle "booktitle" output.check
+ format.bvolume output
+ format.number.series output
+ format.pages output
+ address empty$
+ { organization publisher new.sentence.checkb
+ organization output
+ publisher output
+ format.date "year" output.check
+ }
+ { address output.nonnull
+ format.date "year" output.check
+ new.sentence
+ organization output
+ publisher output
+ }
+ if$
+ }
+ { format.incoll.inproc.crossref output.nonnull
+ format.pages output
+ }
+ if$
+ format.isbn output
+ format.doi output
+ format.url output
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {conference} { inproceedings }
+
+FUNCTION {manual}
+{ find.firstletter
+ output.letter
+ output.bibitem
+ format.authors output
+ author format.key output
+ new.block
+ format.btitle "title" output.check
+ organization address new.block.checkb
+ organization output
+ address output
+ format.edition output
+ format.date output
+ format.url output
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {mastersthesis}
+{ find.firstletter
+ output.letter
+ output.bibitem
+ format.authors "author" output.check
+ author format.key output
+ new.block
+ format.title "title" output.check
+ new.block
+ "Master's thesis" format.thesis.type output.nonnull
+ school "school" output.check
+ address output
+ format.date "year" output.check
+ format.url output
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {misc}
+{ find.firstletter
+ output.letter
+ output.bibitem
+ format.authors output
+ author format.key output
+ title howpublished new.block.checkb
+ format.title output
+ howpublished new.block.checka
+ howpublished output
+ format.date output
+ format.issn output
+ format.url output
+ new.block
+ note output
+ fin.entry
+ empty.misc.check
+}
+
+FUNCTION {phdthesis}
+{ find.firstletter
+ output.letter
+ output.bibitem
+ format.authors "author" output.check
+ author format.key output
+ new.block
+ format.btitle "title" output.check
+ new.block
+ "PhD thesis" format.thesis.type output.nonnull
+ school "school" output.check
+ address output
+ format.date "year" output.check
+ format.url output
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {proceedings}
+{ find.firstletter
+ output.letter
+ output.bibitem
+ format.editors output
+ editor format.key output
+ new.block
+ format.btitle "title" output.check
+ format.bvolume output
+ format.number.series output
+ address output
+ format.date "year" output.check
+ new.sentence
+ organization output
+ publisher output
+ format.isbn output
+ format.doi output
+ format.url output
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {techreport}
+{ find.firstletter
+ output.letter
+ output.bibitem
+ format.authors "author" output.check
+ author format.key output
+ new.block
+ format.title "title" output.check
+ new.block
+ format.tr.number output.nonnull
+ institution "institution" output.check
+ address output
+ format.date "year" output.check
+ format.url output
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {unpublished}
+{ find.firstletter
+ output.letter
+ output.bibitem
+ format.authors "author" output.check
+ author format.key output
+ new.block
+ format.title "title" output.check
+ format.url output
+ new.block
+ note "note" output.check
+ format.date output
+ fin.entry
+}
+
+FUNCTION {default.type} { misc }
+
+
+MACRO {jan} {"January"}
+
+MACRO {feb} {"February"}
+
+MACRO {mar} {"March"}
+
+MACRO {apr} {"April"}
+
+MACRO {may} {"May"}
+
+MACRO {jun} {"June"}
+
+MACRO {jul} {"July"}
+
+MACRO {aug} {"August"}
+
+MACRO {sep} {"September"}
+
+MACRO {oct} {"October"}
+
+MACRO {nov} {"November"}
+
+MACRO {dec} {"December"}
+
+
+
+MACRO {acmcs} {"ACM Computing Surveys"}
+
+MACRO {acta} {"Acta Informatica"}
+
+MACRO {cacm} {"Communications of the ACM"}
+
+MACRO {ibmjrd} {"IBM Journal of Research and Development"}
+
+MACRO {ibmsj} {"IBM Systems Journal"}
+
+MACRO {ieeese} {"IEEE Transactions on Software Engineering"}
+
+MACRO {ieeetc} {"IEEE Transactions on Computers"}
+
+MACRO {ieeetcad}
+ {"IEEE Transactions on Computer-Aided Design of Integrated Circuits"}
+
+MACRO {ipl} {"Information Processing Letters"}
+
+MACRO {jacm} {"Journal of the ACM"}
+
+MACRO {jcss} {"Journal of Computer and System Sciences"}
+
+MACRO {scp} {"Science of Computer Programming"}
+
+MACRO {sicomp} {"SIAM Journal on Computing"}
+
+MACRO {tocs} {"ACM Transactions on Computer Systems"}
+
+MACRO {tods} {"ACM Transactions on Database Systems"}
+
+MACRO {tog} {"ACM Transactions on Graphics"}
+
+MACRO {toms} {"ACM Transactions on Mathematical Software"}
+
+MACRO {toois} {"ACM Transactions on Office Information Systems"}
+
+MACRO {toplas} {"ACM Transactions on Programming Languages and Systems"}
+
+MACRO {tcs} {"Theoretical Computer Science"}
+
+
+READ
+
+FUNCTION {sortify}
+{ purify$
+ "l" change.case$
+}
+
+INTEGERS { len }
+
+FUNCTION {chop.word}
+{ 's :=
+ 'len :=
+ s #1 len substring$ =
+ { s len #1 + global.max$ substring$ }
+ 's
+ if$
+}
+
+FUNCTION {format.lab.names}
+{ 's :=
+ s #1 "{vv~}{ll}" format.name$
+ s num.names$ duplicate$
+ #2 >
+ { pop$ " et~al." * }
+ { #2 <
+ 'skip$
+ { s #2 "{ff }{vv }{ll}{ jj}" format.name$ "others" =
+ { " et~al." * }
+ { " and " * s #2 "{vv~}{ll}" format.name$ * }
+ if$
+ }
+ if$
+ }
+ if$
+}
+
+FUNCTION {author.key.label}
+{ author empty$
+ { key empty$
+ { cite$ #1 #3 substring$ }
+ 'key
+ if$
+ }
+ { author format.lab.names }
+ if$
+}
+
+FUNCTION {author.editor.key.label}
+{ author empty$
+ { editor empty$
+ { key empty$
+ { cite$ #1 #3 substring$ }
+ 'key
+ if$
+ }
+ { editor format.lab.names }
+ if$
+ }
+ { author format.lab.names }
+ if$
+}
+
+FUNCTION {author.key.organization.label}
+{ author empty$
+ { key empty$
+ { organization empty$
+ { cite$ #1 #3 substring$ }
+ { "The " #4 organization chop.word #3 text.prefix$ }
+ if$
+ }
+ 'key
+ if$
+ }
+ { author format.lab.names }
+ if$
+}
+
+FUNCTION {editor.key.organization.label}
+{ editor empty$
+ { key empty$
+ { organization empty$
+ { cite$ #1 #3 substring$ }
+ { "The " #4 organization chop.word #3 text.prefix$ }
+ if$
+ }
+ 'key
+ if$
+ }
+ { editor format.lab.names }
+ if$
+}
+
+FUNCTION {calc.short.authors}
+{ type$ "book" =
+ type$ "inbook" =
+ or
+ 'author.editor.key.label
+ { type$ "proceedings" =
+ 'editor.key.organization.label
+ { type$ "manual" =
+ 'author.key.organization.label
+ 'author.key.label
+ if$
+ }
+ if$
+ }
+ if$
+ 'short.list :=
+}
+
+FUNCTION {calc.label}
+{ calc.short.authors
+ short.list
+ "("
+ *
+ year duplicate$ empty$
+ short.list key field.or.null = or
+ { pop$ "" }
+ 'skip$
+ if$
+ *
+ 'label :=
+}
+
+FUNCTION {sort.format.names}
+{ 's :=
+ #1 'nameptr :=
+ ""
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ {
+ s nameptr "{vv{ } }{ll{ }}{ ff{ }}{ jj{ }}" format.name$ 't :=
+ nameptr #1 >
+ {
+ " " *
+ namesleft #1 = t "others" = and
+ { "zzzzz" * }
+ { numnames #2 > nameptr #2 = and
+ { "zz" * year field.or.null * " " * }
+ 'skip$
+ if$
+ t sortify *
+ }
+ if$
+ }
+ { t sortify * }
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+}
+
+FUNCTION {sort.format.title}
+{ 't :=
+ "A " #2
+ "An " #3
+ "The " #4 t chop.word
+ chop.word
+ chop.word
+ sortify
+ #1 global.max$ substring$
+}
+
+FUNCTION {author.sort}
+{ author empty$
+ { key empty$
+ { "to sort, need author or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { author sort.format.names }
+ if$
+}
+
+FUNCTION {author.editor.sort}
+{ author empty$
+ { editor empty$
+ { key empty$
+ { "to sort, need author, editor, or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { editor sort.format.names }
+ if$
+ }
+ { author sort.format.names }
+ if$
+}
+
+FUNCTION {author.organization.sort}
+{ author empty$
+ { organization empty$
+ { key empty$
+ { "to sort, need author, organization, or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { "The " #4 organization chop.word sortify }
+ if$
+ }
+ { author sort.format.names }
+ if$
+}
+
+FUNCTION {editor.organization.sort}
+{ editor empty$
+ { organization empty$
+ { key empty$
+ { "to sort, need editor, organization, or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { "The " #4 organization chop.word sortify }
+ if$
+ }
+ { editor sort.format.names }
+ if$
+}
+
+
+FUNCTION {presort}
+{ calc.label
+ label sortify
+ " "
+ *
+ type$ "book" =
+ type$ "inbook" =
+ or
+ 'author.editor.sort
+ { type$ "proceedings" =
+ 'editor.organization.sort
+ { type$ "manual" =
+ 'author.organization.sort
+ 'author.sort
+ if$
+ }
+ if$
+ }
+ if$
+ " "
+ *
+ cite$
+ *
+ #1 entry.max$ substring$
+ 'sort.label :=
+ sort.label *
+ #1 entry.max$ substring$
+ 'sort.key$ :=
+}
+
+ITERATE {presort}
+
+SORT
+
+STRINGS { longest.label last.label next.extra }
+
+INTEGERS { longest.label.width last.extra.num number.label }
+
+FUNCTION {initialize.longest.label}
+{ "" 'longest.label :=
+ "\" 'cur.letter :=
+ #1 'first.letter.place :=
+ #0 int.to.chr$ 'last.label :=
+ "" 'next.extra :=
+ #0 'longest.label.width :=
+ #0 'last.extra.num :=
+ #0 'number.label :=
+}
+
+FUNCTION {forward.pass}
+{ last.label label =
+ { last.extra.num #1 + 'last.extra.num :=
+ last.extra.num int.to.chr$ 'extra.label :=
+ }
+ { "a" chr.to.int$ 'last.extra.num :=
+ "" 'extra.label :=
+ label 'last.label :=
+ }
+ if$
+ number.label #1 + 'number.label :=
+}
+
+FUNCTION {reverse.pass}
+{ next.extra "b" =
+ { "a" 'extra.label := }
+ 'skip$
+ if$
+ extra.label 'next.extra :=
+ extra.label
+ duplicate$ empty$
+ 'skip$
+ { "{\natexlab{" swap$ * "}}" * }
+ if$
+ 'extra.label :=
+ label extra.label * 'label :=
+}
+
+FUNCTION { def.alphabibitem }
+{ "\def\alphabibitem#1{%" write$ newline$
+ "\expandafter\ifx\csname firstalphabibitem\endcsname" write$ newline$
+ "\relax\def\firstalphabibitem{}" write$ newline$
+ "\else\expandafter" write$ newline$
+ "\ifx\csname alphabibitemskip\endcsname" write$ newline$
+ "\relax\bigskip" write$ newline$
+ "\else\alphabibitemskip" write$ newline$
+ "\fi" write$ newline$
+ "\fi" write$ newline$
+ "\penalty-200\expandafter" write$ newline$
+ "\ifx\csname alphabibitemlabel\endcsname" write$ newline$
+ "\relax\expandafter" write$ newline$
+ "\ifx\csname alphabibitemcontent\endcsname\relax" write$ newline$
+ "\item[\LARGE\bfseries\MakeUppercase{#1}]" write$ newline$
+ "\hfill\vskip 1ex\hrule\medskip" write$ newline$
+ "\else\item[\Large\bfseries\MakeUppercase{#1}]" write$ newline$
+ "\alphabibitemcontent{\MakeUppercase{#1}}%" write$ newline$
+ "\fi" write$ newline$
+ "\else\expandafter" write$ newline$
+ "\ifx\csname alphabibitemcontent\endcsname\relax" write$ newline$
+ "\item[\alphabibitemlabel{\MakeUppercase{#1}}]" write$ newline$
+ "\vskip 1ex\hrule\medskip" write$ newline$
+ "\else\item[\alphabibitemlabel{\MakeUppercase{#1}}]" write$ newline$
+ "\alphabibitemcontent{\MakeUppercase{#1}}%" write$ newline$
+ "\fi" write$ newline$
+ "\fi}" write$ newline$
+ newline$
+}
+
+EXECUTE {initialize.longest.label}
+
+ITERATE {forward.pass}
+
+REVERSE {reverse.pass}
+
+FUNCTION {bib.sort.order}
+{ sort.label 'sort.key$ :=
+}
+
+ITERATE {bib.sort.order}
+
+SORT
+
+FUNCTION {begin.bib}
+{ preamble$ empty$
+ 'skip$
+ { preamble$ write$ newline$ }
+ if$
+ def.alphabibitem
+ "\begin{thebibliography}{" number.label int.to.str$ * "}" *
+ write$ newline$
+ "\providecommand{\natexlab}[1]{#1}"
+ write$ newline$
+ "\providecommand{\url}[1]{\texttt{#1}}"
+ write$ newline$
+ "\expandafter\ifx\csname urlstyle\endcsname\relax"
+ write$ newline$
+ " \providecommand{\doi}[1]{doi: #1}\else"
+ write$ newline$
+ " \providecommand{\doi}{doi: \begingroup \urlstyle{rm}\Url}\fi"
+ write$ newline$
+}
+
+EXECUTE {begin.bib}
+
+EXECUTE {init.state.consts}
+
+ITERATE {call.type$}
+
+FUNCTION {end.bib}
+{ newline$
+ "\end{thebibliography}" write$ newline$
+}
+
+EXECUTE {end.bib}
diff --git a/biblio/bibtex/contrib/sort-by-letters/siam-letters.bst b/biblio/bibtex/contrib/sort-by-letters/siam-letters.bst
new file mode 100644
index 0000000000..c1ddcdf4c2
--- /dev/null
+++ b/biblio/bibtex/contrib/sort-by-letters/siam-letters.bst
@@ -0,0 +1,1154 @@
+% BibTeX bibliography style `siam-letters'
+%% adapted from SIAM bibliography style (29-Jan-88 version)
+%% (C) 2006 - Thomas van Oudenhove
+%% when sorting by letter, write the first letter of author
+%% or editor - bug with organization...
+
+ENTRY
+ { address
+ author
+ booktitle
+ chapter
+ edition
+ editor
+ howpublished
+ institution
+ journal
+ key
+ month
+ note
+ number
+ organization
+ pages
+ publisher
+ school
+ series
+ title
+ type
+ volume
+ year
+ }
+ {}
+ { label }
+
+INTEGERS { output.state before.all mid.sentence after.block }
+
+FUNCTION {init.state.consts}
+{ #0 'before.all :=
+ #1 'mid.sentence :=
+ #2 'after.block :=
+}
+
+STRINGS { s t cur.letter first.letter }
+INTEGERS { first.letter.place first.letter.ascii }
+
+FUNCTION {output.nonnull}
+{ 's :=
+ output.state mid.sentence =
+ { ", " * write$ }
+ { output.state after.block =
+ { add.period$ write$
+ newline$
+ "\newblock " write$
+ }
+ 'write$
+ if$
+ mid.sentence 'output.state :=
+ }
+ if$
+ s
+}
+
+FUNCTION {output}
+{ duplicate$ empty$
+ 'pop$
+ 'output.nonnull
+ if$
+}
+
+FUNCTION {output.check}
+{ 't :=
+ duplicate$ empty$
+ { pop$ "empty " t * " in " * cite$ * warning$ }
+ 'output.nonnull
+ if$
+}
+
+FUNCTION {output.letter}
+{ first.letter cur.letter =
+ { skip$ }
+ { newline$
+ "\alphabibitem{" first.letter * "}" * write$
+ newline$
+ first.letter 'cur.letter := }
+ if$
+ cur.letter "\" =
+ { first.letter 'cur.letter := }
+ { skip$ }
+ if$
+}
+
+FUNCTION {output.bibitem}
+{ newline$
+ "\bibitem{" write$
+ cite$ write$
+ "}" write$
+ newline$
+ ""
+ before.all 'output.state :=
+}
+
+FUNCTION {fin.entry}
+{ add.period$
+ write$
+ newline$
+}
+
+FUNCTION {new.block}
+{ output.state before.all =
+ 'skip$
+ { after.block 'output.state := }
+ if$
+}
+
+FUNCTION {not}
+{ { #0 }
+ { #1 }
+ if$
+}
+
+FUNCTION {and}
+{ 'skip$
+ { pop$ #0 }
+ if$
+}
+
+FUNCTION {or}
+{ { pop$ #1 }
+ 'skip$
+ if$
+}
+
+FUNCTION {new.block.checka}
+{ empty$
+ 'skip$
+ 'new.block
+ if$
+}
+
+FUNCTION {field.or.null}
+{ duplicate$ empty$
+ { pop$ "" }
+ 'skip$
+ if$
+}
+
+FUNCTION {emphasize}
+{ duplicate$ empty$
+ { pop$ "" }
+ { "{\em " swap$ * "}" * }
+ if$
+}
+
+FUNCTION {scapify}
+{ duplicate$ empty$
+ { pop$ "" }
+ { "{\sc " swap$ * "}" * }
+ if$
+}
+
+FUNCTION { author.find.first.letter }
+{ author #1 "{vv }{ll }{ff }, {jj }" format.name$ "u" change.case$
+ purify$ first.letter.place #1 substring$ 'first.letter :=
+ first.letter chr.to.int$ 'first.letter.ascii :=
+}
+
+FUNCTION { editor.find.first.letter }
+{ editor #1 "{vv }{ll }{ff }, {jj }" format.name$ "u" change.case$
+ purify$ first.letter.place #1 substring$ 'first.letter :=
+ first.letter chr.to.int$ 'first.letter.ascii :=
+}
+
+FUNCTION { organization.find.first.letter }
+{ organization #1 "{vv }{ll }{ff }, {jj }" format.name$ "u" change.case$
+ purify$ first.letter.place #1 substring$ 'first.letter :=
+ first.letter chr.to.int$ 'first.letter.ascii :=
+}
+
+FUNCTION { find.firstletter }
+{ author empty$
+ { editor empty$
+% { organization empty$
+ { "Nor author, editor neither organization for entry " cite$ * warning$ }
+% { organization.find.first.letter
+% { first.letter.ascii #64 > first.letter.ascii #91 < and
+% first.letter.ascii #96 > first.letter.ascii #123 < and or not }
+% { first.letter.place #1 + 'first.letter.place :=
+% organization.find.first.letter }
+% while$ }
+% if$ }
+ { editor.find.first.letter
+ { first.letter.ascii #64 > first.letter.ascii #91 < and
+ first.letter.ascii #96 > first.letter.ascii #123 < and or not }
+ { first.letter.place #1 + 'first.letter.place :=
+ editor.find.first.letter }
+ while$
+ }
+ if$
+ }
+ { author.find.first.letter
+ { first.letter.ascii #64 > first.letter.ascii #91 < and
+ first.letter.ascii #96 > first.letter.ascii #123 < and or not }
+ { first.letter.place #1 + 'first.letter.place :=
+ author.find.first.letter }
+ while$
+ }
+ if$
+ #1 'first.letter.place :=
+}
+
+INTEGERS { nameptr namesleft numnames }
+
+FUNCTION {format.names}
+{ 's :=
+ #1 'nameptr :=
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ { s nameptr "{f.~}{vv~}{ll}{, jj}" format.name$ 't :=
+ nameptr #1 >
+ { namesleft #1 >
+ { ", " * t * }
+ { numnames #2 >
+ { "," * }
+ 'skip$
+ if$
+ t "others" =
+ { " et~al." * }
+ { " and " * t * }
+ if$
+ }
+ if$
+ }
+ 't
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+}
+
+STRINGS { last.authors }
+
+FUNCTION {init.last.authors}
+{ "" 'last.authors :=
+}
+
+FUNCTION {format.authors}
+{ author empty$
+ { "" 'last.authors :=
+ ""
+ }
+ { author last.authors =
+ { "\leavevmode\vrule height 2pt depth -1.6pt width 23pt" }
+ { author format.names scapify }
+ if$
+ author 'last.authors :=
+ }
+ if$
+}
+
+FUNCTION {format.organization}
+{ organization empty$
+ { "" 'last.authors :=
+ ""
+ }
+ { organization last.authors =
+ { "\leavevmode\vrule height 2pt depth -1.6pt width 23pt" }
+ { organization scapify }
+ if$
+ organization 'last.authors :=
+ }
+ if$
+}
+
+FUNCTION {format.editors}
+{ editor empty$
+ { "" 'last.authors :=
+ ""
+ }
+ { editor last.authors =
+ { "\leavevmode\vrule height 2pt depth -1.6pt width 23pt" }
+ { editor format.names scapify }
+ if$
+ editor num.names$ #1 >
+ { ", eds." * }
+ { ", ed." * }
+ if$
+ editor 'last.authors :=
+ }
+ if$
+}
+
+FUNCTION {format.ineditors}
+{ editor empty$
+ { "" }
+ { editor format.names
+ editor num.names$ #1 >
+ { ", eds." * }
+ { ", ed." * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.title}
+{ title empty$
+ { "" }
+ { title "t" change.case$ emphasize }
+ if$
+}
+
+FUNCTION {n.dashify}
+{ 't :=
+ ""
+ { t empty$ not }
+ { t #1 #1 substring$ "-" =
+ { t #1 #2 substring$ "--" = not
+ { "--" *
+ t #2 global.max$ substring$ 't :=
+ }
+ { { t #1 #1 substring$ "-" = }
+ { "-" *
+ t #2 global.max$ substring$ 't :=
+ }
+ while$
+ }
+ if$
+ }
+ { t #1 #1 substring$ *
+ t #2 global.max$ substring$ 't :=
+ }
+ if$
+ }
+ while$
+}
+
+FUNCTION {format.date}
+{ year empty$
+ { month empty$
+ { "" }
+ { "there's a month but no year in " cite$ * warning$
+ month
+ }
+ if$
+ }
+ { month empty$
+ 'year
+ { month " " * year * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.btitle}
+{ title emphasize
+}
+
+FUNCTION {tie.or.space.connect}
+{ duplicate$ text.length$ #3 <
+ { "~" }
+ { " " }
+ if$
+ swap$ * *
+}
+
+FUNCTION {either.or.check}
+{ empty$
+ 'pop$
+ { "can't use both " swap$ * " fields in " * cite$ * warning$ }
+ if$
+}
+
+FUNCTION {format.bvolume}
+{ volume empty$
+ { "" }
+ { "vol.~" volume *
+ series empty$
+ 'skip$
+ { " of " * series * }
+ if$
+ "volume and number" number either.or.check
+ }
+ if$
+}
+
+FUNCTION {format.number.series}
+{ volume empty$
+ { number empty$
+ { series field.or.null }
+ { "no.~" number *
+ series empty$
+ { "there's a number but no series in " cite$ * warning$ }
+ { " in " * series * }
+ if$
+ }
+ if$
+ }
+ { "" }
+ if$
+}
+
+FUNCTION {format.edition}
+{ edition empty$
+ { "" }
+ { edition "l" change.case$ "~ed." * }
+ if$
+}
+
+INTEGERS { multiresult }
+
+FUNCTION {multi.page.check}
+{ 't :=
+ #0 'multiresult :=
+ { multiresult not
+ t empty$ not
+ and
+ }
+ { t #1 #1 substring$
+ duplicate$ "-" =
+ swap$ duplicate$ "," =
+ swap$ "+" =
+ or or
+ { #1 'multiresult := }
+ { t #2 global.max$ substring$ 't := }
+ if$
+ }
+ while$
+ multiresult
+}
+
+FUNCTION {format.pages}
+{ pages empty$
+ { "" }
+ { pages multi.page.check
+ { "pp.~" pages n.dashify * }
+ { "p.~" pages * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.vol.year}
+{ volume field.or.null
+ year empty$
+ { "empty year in " cite$ * warning$ }
+ { " (" year * ")" * * }
+ if$
+}
+
+FUNCTION {format.chapter.pages}
+{ chapter empty$
+ 'format.pages
+ { type empty$
+ { "ch.~" chapter * }
+ { type "l" change.case$ chapter tie.or.space.connect }
+ if$
+ pages empty$
+ 'skip$
+ { ", " * format.pages * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.in.ed.booktitle}
+{ booktitle empty$
+ { "" }
+ { editor empty$
+ { "in " booktitle * }
+ { "in " booktitle * ", " * format.ineditors * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {empty.misc.check}
+{ author empty$ title empty$ howpublished empty$
+ month empty$ year empty$ note empty$
+ and and and and and
+ key empty$ not and
+ { "all relevant fields are empty in " cite$ * warning$ }
+ 'skip$
+ if$
+}
+
+FUNCTION {format.thesis.type}
+{ type empty$
+ 'skip$
+ { pop$
+ type "l" change.case$
+ }
+ if$
+}
+
+FUNCTION {format.tr.number}
+{ type empty$
+ { "Tech. Rep." }
+ 'type
+ if$
+ number empty$
+ { "l" change.case$ }
+ { number tie.or.space.connect }
+ if$
+}
+
+FUNCTION {format.article.crossref}
+{ key empty$
+ { journal empty$
+ { "need key or journal for " cite$ * " to crossref " * crossref *
+ warning$
+ ""
+ }
+ { "in " journal * }
+ if$
+ }
+ { "in " key * }
+ if$
+ " \cite{" * crossref * "}" *
+}
+
+FUNCTION {format.crossref.editor}
+{ editor #1 "{vv~}{ll}" format.name$
+ editor num.names$ duplicate$
+ #2 >
+ { pop$ " et~al." * }
+ { #2 <
+ 'skip$
+ { editor #2 "{ff }{vv }{ll}{ jj}" format.name$ "others" =
+ { " et~al." * }
+ { " and " * editor #2 "{vv~}{ll}" format.name$ * }
+ if$
+ }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.book.crossref}
+{ volume empty$
+ { "empty volume in " cite$ * "'s crossref of " * crossref * warning$
+ "in "
+ }
+ { "vol.~" volume *
+ " of " *
+ }
+ if$
+ editor empty$
+ editor field.or.null author field.or.null =
+ or
+ { key empty$
+ { series empty$
+ { "need editor, key, or series for " cite$ * " to crossref " *
+ crossref * warning$
+ "" *
+ }
+ { series * }
+ if$
+ }
+ { key * }
+ if$
+ }
+ { format.crossref.editor * }
+ if$
+ " \cite{" * crossref * "}" *
+}
+
+FUNCTION {format.incoll.inproc.crossref}
+{ editor empty$
+ editor field.or.null author field.or.null =
+ or
+ { key empty$
+ { booktitle empty$
+ { "need editor, key, or booktitle for " cite$ * " to crossref " *
+ crossref * warning$
+ ""
+ }
+ { "in " booktitle * }
+ if$
+ }
+ { "in " key * }
+ if$
+ }
+ { "in " format.crossref.editor * }
+ if$
+ " \cite{" * crossref * "}" *
+}
+
+FUNCTION {article}
+{ find.firstletter
+ output.letter
+ output.bibitem
+ format.authors "author" output.check
+ format.title "title" output.check
+ crossref missing$
+ { journal "journal" output.check
+ format.vol.year output
+ }
+ { format.article.crossref output.nonnull }
+ if$
+ format.pages output
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {book}
+{ find.firstletter
+ output.letter
+ output.bibitem
+ author empty$
+ { format.editors "author and editor" output.check }
+ { format.authors output.nonnull
+ crossref missing$
+ { "author and editor" editor either.or.check }
+ 'skip$
+ if$
+ }
+ if$
+ format.btitle "title" output.check
+ crossref missing$
+ { format.bvolume output
+ format.number.series output
+ publisher "publisher" output.check
+ address output
+ }
+ { format.book.crossref output.nonnull }
+ if$
+ format.edition output
+ format.date "year" output.check
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {booklet}
+{ find.firstletter
+ output.letter
+ output.bibitem
+ format.authors output
+ format.title "title" output.check
+ howpublished new.block.checka
+ howpublished output
+ address output
+ format.date output
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {inbook}
+{ find.firstletter
+ output.letter
+ output.bibitem
+ author empty$
+ { format.editors "author and editor" output.check }
+ { format.authors output.nonnull
+ crossref missing$
+ { "author and editor" editor either.or.check }
+ 'skip$
+ if$
+ }
+ if$
+ format.btitle "title" output.check
+ crossref missing$
+ { format.bvolume output
+ format.number.series output
+ publisher "publisher" output.check
+ address output
+ }
+ { format.book.crossref output.nonnull }
+ if$
+ format.edition output
+ format.date "year" output.check
+ format.chapter.pages "chapter and pages" output.check
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {incollection}
+{ find.firstletter
+ output.letter
+ output.bibitem
+ format.authors "author" output.check
+ format.title "title" output.check
+ crossref missing$
+ { format.in.ed.booktitle "booktitle" output.check
+ format.bvolume output
+ format.number.series output
+ publisher "publisher" output.check
+ address output
+ format.edition output
+ format.date "year" output.check
+ }
+ { format.incoll.inproc.crossref output.nonnull }
+ if$
+ format.chapter.pages output
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {inproceedings}
+{ find.firstletter
+ output.letter
+ output.bibitem
+ format.authors "author" output.check
+ format.title "title" output.check
+ crossref missing$
+ { format.in.ed.booktitle "booktitle" output.check
+ format.bvolume output
+ format.number.series output
+ address empty$
+ { organization output
+ publisher output
+ format.date "year" output.check
+ }
+ { address output.nonnull
+ format.date "year" output.check
+ organization output
+ publisher output
+ }
+ if$
+ }
+ { format.incoll.inproc.crossref output.nonnull }
+ if$
+ format.pages output
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {conference} { inproceedings }
+
+FUNCTION {manual}
+{ find.firstletter
+ output.letter
+ output.bibitem
+ author empty$
+ { format.organization output }
+ { format.authors output.nonnull }
+ if$
+ format.btitle "title" output.check
+ author empty$
+ 'skip$
+ { organization output }
+ if$
+ address output
+ format.edition output
+ format.date output
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {mastersthesis}
+{ find.firstletter
+ output.letter
+ output.bibitem
+ format.authors "author" output.check
+ format.title "title" output.check
+ "Master's thesis" format.thesis.type output.nonnull
+ school "school" output.check
+ address output
+ format.date "year" output.check
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {misc}
+{ find.firstletter
+ output.letter
+ output.bibitem
+ format.authors output
+ format.title output
+ howpublished new.block.checka
+ howpublished output
+ format.date output
+ new.block
+ note output
+ fin.entry
+ empty.misc.check
+}
+
+FUNCTION {phdthesis}
+{ find.firstletter
+ output.letter
+ output.bibitem
+ format.authors "author" output.check
+ format.btitle "title" output.check
+ "PhD thesis" format.thesis.type output.nonnull
+ school "school" output.check
+ address output
+ format.date "year" output.check
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {proceedings}
+{ find.firstletter
+ output.letter
+ output.bibitem
+ editor empty$
+ { format.organization output }
+ { format.editors output.nonnull }
+ if$
+ format.btitle "title" output.check
+ format.bvolume output
+ format.number.series output
+ address empty$
+ { editor empty$
+ 'skip$
+ { organization output }
+ if$
+ publisher output
+ format.date "year" output.check
+ }
+ { address output.nonnull
+ format.date "year" output.check
+ editor empty$
+ 'skip$
+ { organization output }
+ if$
+ publisher output
+ }
+ if$
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {techreport}
+{ find.firstletter
+ output.letter
+ output.bibitem
+ format.authors "author" output.check
+ format.title "title" output.check
+ format.tr.number output.nonnull
+ institution "institution" output.check
+ address output
+ format.date "year" output.check
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {unpublished}
+{ find.firstletter
+ output.letter
+ output.bibitem
+ format.authors "author" output.check
+ format.title "title" output.check
+ new.block
+ note "note" output.check
+ format.date output
+ fin.entry
+}
+
+FUNCTION {default.type} { misc }
+
+MACRO {jan} {"Jan."}
+
+MACRO {feb} {"Feb."}
+
+MACRO {mar} {"Mar."}
+
+MACRO {apr} {"Apr."}
+
+MACRO {may} {"May"}
+
+MACRO {jun} {"June"}
+
+MACRO {jul} {"July"}
+
+MACRO {aug} {"Aug."}
+
+MACRO {sep} {"Sept."}
+
+MACRO {oct} {"Oct."}
+
+MACRO {nov} {"Nov."}
+
+MACRO {dec} {"Dec."}
+
+MACRO {acmcs} {"ACM Comput. Surveys"}
+
+MACRO {acta} {"Acta Inf."}
+
+MACRO {cacm} {"Comm. ACM"}
+
+MACRO {ibmjrd} {"IBM J. Res. Dev."}
+
+MACRO {ibmsj} {"IBM Syst.~J."}
+
+MACRO {ieeese} {"IEEE Trans. Softw. Eng."}
+
+MACRO {ieeetc} {"IEEE Trans. Comput."}
+
+MACRO {ieeetcad}
+ {"IEEE Trans. Comput.-Aided Design Integrated Circuits"}
+
+MACRO {ipl} {"Inf. Process. Lett."}
+
+MACRO {jacm} {"J.~Assoc. Comput. Mach."}
+
+MACRO {jcss} {"J.~Comput. System Sci."}
+
+MACRO {scp} {"Sci. Comput. Programming"}
+
+MACRO {sicomp} {"SIAM J. Comput."}
+
+MACRO {tocs} {"ACM Trans. Comput. Syst."}
+
+MACRO {tods} {"ACM Trans. Database Syst."}
+
+MACRO {tog} {"ACM Trans. Gr."}
+
+MACRO {toms} {"ACM Trans. Math. Softw."}
+
+MACRO {toois} {"ACM Trans. Office Inf. Syst."}
+
+MACRO {toplas} {"ACM Trans. Prog. Lang. Syst."}
+
+MACRO {tcs} {"Theoretical Comput. Sci."}
+
+READ
+
+FUNCTION {sortify}
+{ purify$
+ "l" change.case$
+}
+
+INTEGERS { len }
+
+FUNCTION {chop.word}
+{ 's :=
+ 'len :=
+ s #1 len substring$ =
+ { s len #1 + global.max$ substring$ }
+ 's
+ if$
+}
+
+FUNCTION {sort.format.names}
+{ 's :=
+ #1 'nameptr :=
+ ""
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ { nameptr #1 >
+ { " " * }
+ 'skip$
+ if$
+ s nameptr "{vv{ } }{ll{ }}{ f{ }}{ jj{ }}" format.name$ 't :=
+ nameptr numnames = t "others" = and
+ { "et al" * }
+ { t sortify * }
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+}
+
+FUNCTION {sort.format.title}
+{ 't :=
+ "A " #2
+ "An " #3
+ "The " #4 t chop.word
+ chop.word
+ chop.word
+ sortify
+ #1 global.max$ substring$
+}
+
+FUNCTION {author.sort}
+{ author empty$
+ { key empty$
+ { "to sort, need author or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { author sort.format.names }
+ if$
+}
+
+FUNCTION {author.editor.sort}
+{ author empty$
+ { editor empty$
+ { key empty$
+ { "to sort, need author, editor, or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { editor sort.format.names }
+ if$
+ }
+ { author sort.format.names }
+ if$
+}
+
+FUNCTION {author.organization.sort}
+{ author empty$
+ { organization empty$
+ { key empty$
+ { "to sort, need author, organization, or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { "The " #4 organization chop.word sortify }
+ if$
+ }
+ { author sort.format.names }
+ if$
+}
+
+FUNCTION {editor.organization.sort}
+{ editor empty$
+ { organization empty$
+ { key empty$
+ { "to sort, need editor, organization, or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { "The " #4 organization chop.word sortify }
+ if$
+ }
+ { editor sort.format.names }
+ if$
+}
+
+FUNCTION {presort}
+{ type$ "book" =
+ type$ "inbook" =
+ or
+ 'author.editor.sort
+ { type$ "proceedings" =
+ 'editor.organization.sort
+ { type$ "manual" =
+ 'author.organization.sort
+ 'author.sort
+ if$
+ }
+ if$
+ }
+ if$
+ " "
+ *
+ year field.or.null sortify
+ *
+ " "
+ *
+ title field.or.null
+ sort.format.title
+ *
+ #1 entry.max$ substring$
+ 'sort.key$ :=
+}
+
+ITERATE {presort}
+
+SORT
+
+STRINGS { longest.label }
+
+INTEGERS { number.label longest.label.width }
+
+FUNCTION {initialize.longest.label}
+{ "" 'longest.label :=
+ "\" 'cur.letter :=
+ #1 'first.letter.place :=
+ #1 'number.label :=
+ #0 'longest.label.width :=
+}
+
+FUNCTION { def.alphabibitem }
+{ "\def\alphabibitem#1{%" write$ newline$
+ "\expandafter\ifx\csname firstalphabibitem\endcsname" write$ newline$
+ "\relax\def\firstalphabibitem{}" write$ newline$
+ "\else\expandafter" write$ newline$
+ "\ifx\csname alphabibitemskip\endcsname" write$ newline$
+ "\relax\bigskip" write$ newline$
+ "\else\alphabibitemskip" write$ newline$
+ "\fi" write$ newline$
+ "\fi" write$ newline$
+ "\penalty-200\expandafter" write$ newline$
+ "\ifx\csname alphabibitemlabel\endcsname" write$ newline$
+ "\relax\expandafter" write$ newline$
+ "\ifx\csname alphabibitemcontent\endcsname\relax" write$ newline$
+ "\item[\LARGE\bfseries\MakeUppercase{#1}]" write$ newline$
+ "\hfill\vskip 1ex\hrule\medskip" write$ newline$
+ "\else\item[\Large\bfseries\MakeUppercase{#1}]" write$ newline$
+ "\alphabibitemcontent{\MakeUppercase{#1}}%" write$ newline$
+ "\fi" write$ newline$
+ "\else\expandafter" write$ newline$
+ "\ifx\csname alphabibitemcontent\endcsname\relax" write$ newline$
+ "\item[\alphabibitemlabel{\MakeUppercase{#1}}]" write$ newline$
+ "\vskip 1ex\hrule\medskip" write$ newline$
+ "\else\item[\alphabibitemlabel{\MakeUppercase{#1}}]" write$ newline$
+ "\alphabibitemcontent{\MakeUppercase{#1}}%" write$ newline$
+ "\fi" write$ newline$
+ "\fi}" write$ newline$
+ newline$
+}
+
+FUNCTION {longest.label.pass}
+{ number.label int.to.str$ 'label :=
+ number.label #1 + 'number.label :=
+ label width$ longest.label.width >
+ { label 'longest.label :=
+ label width$ 'longest.label.width :=
+ }
+ 'skip$
+ if$
+}
+
+EXECUTE {initialize.longest.label}
+
+ITERATE {longest.label.pass}
+
+FUNCTION {begin.bib}
+{ preamble$ empty$
+ 'skip$
+ { preamble$ write$ newline$ }
+ if$
+ def.alphabibitem
+ "\begin{thebibliography}{" longest.label * "}" * write$ newline$
+}
+
+EXECUTE {begin.bib}
+
+EXECUTE {init.state.consts}
+
+EXECUTE {init.last.authors}
+
+ITERATE {call.type$}
+
+FUNCTION {end.bib}
+{ newline$
+ "\end{thebibliography}" write$ newline$
+}
+
+EXECUTE {end.bib}
diff --git a/biblio/bibtex/contrib/spain/README b/biblio/bibtex/contrib/spain/README
new file mode 100644
index 0000000000..375ebb5f78
--- /dev/null
+++ b/biblio/bibtex/contrib/spain/README
@@ -0,0 +1,5 @@
+spain.bst and spain.dbj files for bibliography.
+
+It follows the traditional bibliographic style in
+Spain, as shown in the "Diccionario de ortografa
+tcnica" of J. Martnez de Sousa (1999) \ No newline at end of file
diff --git a/biblio/bibtex/contrib/spain/spain.bst b/biblio/bibtex/contrib/spain/spain.bst
new file mode 100644
index 0000000000..ad0c23a9f9
--- /dev/null
+++ b/biblio/bibtex/contrib/spain/spain.bst
@@ -0,0 +1 @@
+%% %% This is file `sousa4.bst', %% generated with the docstrip utility. %% %% The original source files were: %% %% merlin.mbs (with options: `head,exlang,cite,lang,annote,vonx,nm-revv1,jnrlst,nmdash,nmft,nmft-sc,fnm-rm,nmand-rm,dt-jnl,yr-com,yrpp-xsp,tit-qq,qt-g,atit-u,trnum-it,vnum-nr,volp-com,jdt-pc,pp-last,num-xser,pub-date,pub-xpar,pre-pub,edparxc,edby-par,edbyy,spanish,ppx,ed,abr,xedn,and-com,and-com-ed,etal-it,revdata,eprint,url,url-blk,em-it,nfss,{}') %% spanish.mbs (with options: `exlang,cite,lang,annote,vonx,nm-revv1,jnrlst,nmdash,nmft,nmft-sc,fnm-rm,nmand-rm,dt-jnl,yr-com,yrpp-xsp,tit-qq,qt-g,atit-u,trnum-it,vnum-nr,volp-com,jdt-pc,pp-last,num-xser,pub-date,pub-xpar,pre-pub,edparxc,edby-par,edbyy,spanish,ppx,ed,abr,xedn,and-com,and-com-ed,etal-it,revdata,eprint,url,url-blk,em-it,nfss,{}') %% physjour.mbs (with options: `exlang,cite,lang,annote,vonx,nm-revv1,jnrlst,nmdash,nmft,nmft-sc,fnm-rm,nmand-rm,dt-jnl,yr-com,yrpp-xsp,tit-qq,qt-g,atit-u,trnum-it,vnum-nr,volp-com,jdt-pc,pp-last,num-xser,pub-date,pub-xpar,pre-pub,edparxc,edby-par,edbyy,spanish,ppx,ed,abr,xedn,and-com,and-com-ed,etal-it,revdata,eprint,url,url-blk,em-it,nfss,{}') %% geojour.mbs (with options: `exlang,cite,lang,annote,vonx,nm-revv1,jnrlst,nmdash,nmft,nmft-sc,fnm-rm,nmand-rm,dt-jnl,yr-com,yrpp-xsp,tit-qq,qt-g,atit-u,trnum-it,vnum-nr,volp-com,jdt-pc,pp-last,num-xser,pub-date,pub-xpar,pre-pub,edparxc,edby-par,edbyy,spanish,ppx,ed,abr,xedn,and-com,and-com-ed,etal-it,revdata,eprint,url,url-blk,em-it,nfss,{}') %% photjour.mbs (with options: `exlang,cite,lang,annote,vonx,nm-revv1,jnrlst,nmdash,nmft,nmft-sc,fnm-rm,nmand-rm,dt-jnl,yr-com,yrpp-xsp,tit-qq,qt-g,atit-u,trnum-it,vnum-nr,volp-com,jdt-pc,pp-last,num-xser,pub-date,pub-xpar,pre-pub,edparxc,edby-par,edbyy,spanish,ppx,ed,abr,xedn,and-com,and-com-ed,etal-it,revdata,eprint,url,url-blk,em-it,nfss,{}') %% merlin.mbs (with options: `tail,exlang,cite,lang,annote,vonx,nm-revv1,jnrlst,nmdash,nmft,nmft-sc,fnm-rm,nmand-rm,dt-jnl,yr-com,yrpp-xsp,tit-qq,qt-g,atit-u,trnum-it,vnum-nr,volp-com,jdt-pc,pp-last,num-xser,pub-date,pub-xpar,pre-pub,edparxc,edby-par,edbyy,spanish,ppx,ed,abr,xedn,and-com,and-com-ed,etal-it,revdata,eprint,url,url-blk,em-it,nfss,{}') %% ---------------------------------------- %% *** bibliografia de JoseRa para escribir en castellano *** %% %% Copyright 1994-2000 Patrick W Daly % =============================================================== % IMPORTANT NOTICE: % This bibliographic style (bst) file has been generated from one or % more master bibliographic style (mbs) files, listed above. % % This generated file can be redistributed and/or modified under the terms % of the LaTeX Project Public License Distributed from CTAN % archives in directory macros/latex/base/lppl.txt; either % version 1 of the License, or any later version. % =============================================================== % Name and version information of the main mbs file: % \ProvidesFile{merlin.mbs}[2000/05/04 4.01 (PWD, AO, DPC)] % For use with BibTeX version 0.99a or later %------------------------------------------------------------------- % This bibliography style file is intended for texts in % SPANISH % This is a special pseudo-numerical bibliography style, intended to be % used to list all the entries in a bib database % It requires no extra package to interface to the main text. % The form of the \bibitem entries is % \bibitem[key]{key}... %--------------------------------------------------------------------- ENTRY { address annote archive author booktitle chapter collaboration edition editor eid eprint howpublished institution journal key language month note number numpages organization pages publisher school series title type url volume year } {} { label } INTEGERS { output.state before.all mid.sentence after.sentence after.block } FUNCTION {init.state.consts} { #0 'before.all := #1 'mid.sentence := #2 'after.sentence := #3 'after.block := } STRINGS { s t} FUNCTION {output.nonnull} { 's := output.state mid.sentence = { ", " * write$ } { output.state after.block = { add.period$ write$ newline$ "\newblock " write$ } { output.state before.all = 'write$ { add.period$ " " * write$ } if$ } if$ mid.sentence 'output.state := } if$ s } FUNCTION {output} { duplicate$ empty$ 'pop$ 'output.nonnull if$ } FUNCTION {output.check} { 't := duplicate$ empty$ { pop$ "empty " t * " in " * cite$ * warning$ } 'output.nonnull if$ } FUNCTION {fin.entry} { add.period$ write$ newline$ annote missing$ { "\bibAnnoteFile{" cite$ * "}" * write$ newline$ } { "\bibAnnote{" cite$ * "}{" * annote * "}" * write$ newline$ } if$ } FUNCTION {new.block} { output.state before.all = 'skip$ { after.block 'output.state := } if$ } FUNCTION {new.sentence} { output.state after.block = 'skip$ { output.state before.all = 'skip$ { after.sentence 'output.state := } if$ } if$ } FUNCTION {add.blank} { " " * before.all 'output.state := } FUNCTION {no.blank.or.punct} { "\hspace{0pt}" * before.all 'output.state := } FUNCTION {date.block} { new.block } FUNCTION {not} { { #0 } { #1 } if$ } FUNCTION {and} { 'skip$ { pop$ #0 } if$ } FUNCTION {or} { { pop$ #1 } 'skip$ if$ } FUNCTION {non.stop} { duplicate$ "}" * add.period$ #-1 #1 substring$ "." = } FUNCTION {new.block.checka} { empty$ 'skip$ 'new.block if$ } FUNCTION {new.block.checkb} { empty$ swap$ empty$ and 'skip$ 'new.block if$ } FUNCTION {new.sentence.checka} { empty$ 'skip$ 'new.sentence if$ } FUNCTION {new.sentence.checkb} { empty$ swap$ empty$ and 'skip$ 'new.sentence if$ } FUNCTION {field.or.null} { duplicate$ empty$ { pop$ "" } 'skip$ if$ } FUNCTION {emphasize} { duplicate$ empty$ { pop$ "" } { "\textit{" swap$ * "}" * } if$ } FUNCTION {scaps} { duplicate$ empty$ { pop$ "" } { "\textsc{" swap$ * "}" * } if$ } FUNCTION {bib.name.font} { scaps } FUNCTION {bib.fname.font} { skip$ } FUNCTION {tie.or.space.prefix} { duplicate$ text.length$ #3 < { "~" } { " " } if$ swap$ } FUNCTION {capitalize} { "u" change.case$ "t" change.case$ } FUNCTION {space.word} { " " swap$ * " " * } % Here are the language-specific definitions for explicit words. % Each function has a name bbl.xxx where xxx is the English word. %------------------------------------------------------------------- % Begin module: % \ProvidesFile{spanish.mbs}[2000/03/15 4.0 (PWD/TB)] % The language selected here is SPANISH FUNCTION {bbl.and} { "y"} FUNCTION {bbl.etal} { "et~al." } FUNCTION {bbl.editors} { "eds." } FUNCTION {bbl.editor} { "ed." } FUNCTION {bbl.edby} { "editado por" } FUNCTION {bbl.edition} { "ed\raise1ex\hbox{\underbar{\scriptsize \'on}}." } FUNCTION {bbl.volume} { "tomo" } FUNCTION {bbl.of} { "de" } FUNCTION {bbl.number} { "n\raise1ex\hbox{\underbar{\scriptsize o}}" } FUNCTION {bbl.nr} { "n\raise1ex\hbox{\underbar{\scriptsize o}}" } FUNCTION {bbl.in} { "en" } FUNCTION {bbl.pages} { "p\'aginas" } FUNCTION {bbl.page} { "p\'agina" } FUNCTION {bbl.eidpp} { "p\'aginas" } FUNCTION {bbl.chapter} { "cap." } FUNCTION {bbl.techrep} { "Inf.\ T\'ec." } FUNCTION {bbl.mthesis} { "Proyecto Fin de Carrera" } FUNCTION {bbl.phdthesis} { "Tesis Doctoral" } MACRO {jan} {"ene."} MACRO {feb} {"feb."} MACRO {mar} {"mar."} MACRO {apr} {"abr."} MACRO {may} {"mayo"} MACRO {jun} {"jun."} MACRO {jul} {"jul."} MACRO {aug} {"ago."} MACRO {sep} {"sep."} MACRO {oct} {"oct."} MACRO {nov} {"nov."} MACRO {dec} {"dic."} % End module: spanish.mbs %------------------------------------------------------------------- % Begin module: % \ProvidesFile{physjour.mbs}[1999/10/05 2.1 (PWD)] MACRO {aa}{"Astronomy and Astrophysics"} MACRO {aasup}{"Astronomy and Astrophysics, Supplement Series"} MACRO {aj}{"Astronomical Journal"} MACRO {aph} {"Acta Physica"} MACRO {advp} {"Advances in Physics"} MACRO {ajp} {"American Journal of Physics"} MACRO {ajm} {"American Journal of Mathematics"} MACRO {amsci} {"American Scientist"} MACRO {anofd} {"Annals of Fluid Dynamics"} MACRO {am} {"Annals of Mathematics"} MACRO {ap} {"Annals of Physics"} MACRO {adp} {"Annalen der Physik"} MACRO {ao} {"Applied Optics"} MACRO {apl} {"Applied Physics Letters"} MACRO {app} {"Astroparticle Physics"} MACRO {apj} {"Astrophysical Journal"} MACRO {apjsup} {"Astrophysical Journal Supplement"} MACRO {apss} {"Astrophysics and Space Science"} MACRO {araa} {"Annual Review of Astronomy and Astrophysics"} MACRO {baas} {"Bulletin of the American Astronomical Society"} MACRO {baps} {"Bulletin of the American Physical Society"} MACRO {cmp} {"Communications in Mathematical Physics"} MACRO {cpam} {"Communications on Pure and Applied Mathematics"} MACRO {cppcf} {"Comments on Plasma Physics and Controlled Fusion"} MACRO {cpc} {"Computer Physics Communications"} MACRO {cqg} {"Classical and Quantum Gravity"} MACRO {cra} {"Comptes Rendus des S{\'e}ances de l'Acad{\'e}mie des Sciences A"} MACRO {fed} {"Fusion Engineering and Design"} MACRO {ft} {"Fusion Technology"} MACRO {grg} {"General Relativity and Gravitation"} MACRO {ieeens} {"IEEE Transactions on Nuclear Science"} MACRO {ieeeps} {"IEEE Transactions on Plasma Science"} MACRO {ijimw} {"International Journal of Infrared and Millimeter Waves"} MACRO {ip} {"Infrared Physics"} MACRO {irp} {"Infrared Physics"} MACRO {jap} {"Journal of Applied Physics"} MACRO {jasa} {"Journal of the Acoustical Society of America"} MACRO {jcp} {"Journal of Computational Physics"} MACRO {jetp} {"Soviet Physics--JETP"} MACRO {jfe} {"Journal of Fusion Energy"} MACRO {jfm} {"Journal of Fluid Mechanics"} MACRO {jmp} {"Journal of Mathematical Physics"} MACRO {jne} {"Journal of Nuclear Energy"} MACRO {jnec} {"Journal of Nuclear Energy, Part C: Plasma Physics, Accelerators, Thermonuclear Research"} MACRO {jnm} {"Journal of Nuclear Materials"} MACRO {jpc} {"Journal of Physical Chemistry"} MACRO {jpp} {"Journal of Plasma Physics"} MACRO {jpsj} {"Journal of the Physical Society of Japan"} MACRO {jsi} {"Journal of Scientific Instruments"} MACRO {jvst} {"Journal of Vacuum Science and Technology"} MACRO {nat} {"Nature"} MACRO {nature} {"Nature"} MACRO {nedf} {"Nuclear Engineering and Design/Fusion"} MACRO {nf} {"Nuclear Fusion"} MACRO {nim} {"Nuclear Instruments and Methods"} MACRO {nimpr} {"Nuclear Instruments and Methods in Physics Research"} MACRO {np} {"Nuclear Physics"} MACRO {npb} {"Nuclear Physics B"} MACRO {nt/f} {"Nuclear Technology/Fusion"} MACRO {npbpc} {"Nuclear Physics B (Proceedings Suppluments)"} MACRO {inc} {"Il Nuovo Cimento"} MACRO {nc} {"Nuovo Cimento"} MACRO {pf} {"Physics of Fluids"} MACRO {pfa} {"Physics of Fluids A: Fluid Dynamics"} MACRO {pfb} {"Physics of Fluids B: Plasma Physics"} MACRO {pl} {"Physics Letters"} MACRO {pla} {"Physics Letters A"} MACRO {plb} {"Physics Letters B"} MACRO {prep} {"Physics Reports"} MACRO {pnas} {"Proceedings of the National Academy of Sciences of the USA"} MACRO {pp} {"Physics of Plasmas"} MACRO {ppcf} {"Plasma Physics and Controlled Fusion"} MACRO {phitrsl} {"Philosophical Transactions of the Royal Society of London"} MACRO {prl} {"Physical Review Letters"} MACRO {pr} {"Physical Review"} MACRO {physrev} {"Physical Review"} MACRO {pra} {"Physical Review A"} MACRO {prb} {"Physical Review B"} MACRO {prc} {"Physical Review C"} MACRO {prd} {"Physical Review D"} MACRO {pre} {"Physical Review E"} MACRO {ps} {"Physica Scripta"} MACRO {procrsl} {"Proceedings of the Royal Society of London"} MACRO {rmp} {"Reviews of Modern Physics"} MACRO {rsi} {"Review of Scientific Instruments"} MACRO {science} {"Science"} MACRO {sciam} {"Scientific American"} MACRO {sam} {"Studies in Applied Mathematics"} MACRO {sjpp} {"Soviet Journal of Plasma Physics"} MACRO {spd} {"Soviet Physics--Doklady"} MACRO {sptp} {"Soviet Physics--Technical Physics"} MACRO {spu} {"Soviet Physics--Uspeki"} MACRO {st} {"Sky and Telescope"} % End module: physjour.mbs %------------------------------------------------------------------- % Begin module: % \ProvidesFile{geojour.mbs}[1999/11/16 2.0g (PWD)] MACRO {aisr} {"Advances in Space Research"} MACRO {ag} {"Annales Geophysic\ae"} MACRO {anigeo} {"Annali di Geofisica"} MACRO {angl} {"Annals of Glaciology"} MACRO {andmet} {"Annalen der Meteorologie"} MACRO {andgeo} {"Annales de Geophysique"} MACRO {andphy} {"Annales de Physique"} MACRO {afmgb} {"Archiv f\^^b{u}r Meteorologie, Geophysik und Bioklimatologie"} MACRO {ass}{"Astrophysics and Space Science"} MACRO {atph} {"Atm\'osphera"} MACRO {aao} {"Atmosphere-Ocean"} MACRO {atenv} {"Atmospheric Environment"} MACRO {aujag} {"Australian Journal of Agricultural Research"} MACRO {aumet} {"Australian Meteorological Magazine"} MACRO {blmet} {"Boundary-Layer Meteorology"} MACRO {bams} {"Bulletin of the American Meteorological Society"} MACRO {cch} {"Climatic Change"} MACRO {cdyn} {"Climate Dynamics"} MACRO {cbul} {"Climatological Bulletin"} MACRO {cap} {"Contributions to Atmospheric Physics"} MACRO {dsr} {"Deep-Sea Research"} MACRO {dhz} {"Deutsche Hydrographische Zeitschrift"} MACRO {dao} {"Dynamics of Atmospheres and Oceans"} MACRO {eco} {"Ecology"} MACRO {empl}{"Earth, Moon and Planets"} MACRO {envres} {"Environmental Research"} MACRO {envst} {"Environmental Science and Technology"} MACRO {ecms} {"Estuarine and Coastal Marine Science"} MACRO {expa}{"Experimental Astronomy"} MACRO {geoint} {"Geofisica Internationale"} MACRO {geopub} {"Geofysiske Publikasjoner"} MACRO {geogeo} {"Geologiya i Geofizika"} MACRO {gafd} {"Geophysical and Astrophysical Fluid Dynamics"} MACRO {gfd} {"Geophysical Fluid Dynamics"} MACRO {geomag} {"Geophysical Magazine"} MACRO {georl} {"Geophysical Research Letters"} MACRO {grl} {"Geophysical Research Letters"} MACRO {ga} {"Geophysica"} MACRO {gs} {"Geophysics"} MACRO {ieeetap} {"IEEE Transactions on Antennas and Propagation"} MACRO {ijawp} {"International Journal of Air and Water Pollution"} MACRO {ijc} {"International Journal of Climatology"} MACRO {ijrs} {"International Journal of Remote Sensing"} MACRO {jam} {"Journal of Applied Meteorology"} MACRO {jaot} {"Journal of Atmospheric and Oceanic Technology"} MACRO {jatp} {"Journal of Atmospheric and Terrestrial Physics"} MACRO {jce} {"Journal of Climate"} MACRO {jcam} {"Journal of Climate and Applied Meteorology"} MACRO {jcm} {"Journal of Climate Meteorology"} MACRO {jcy} {"journal of Climatology"} MACRO {jgr} {"Journal of Geophysical Research"} MACRO {jga} {"Journal of Glaciology"} MACRO {jh} {"Journal of Hydrology"} MACRO {jmr} {"Journal of Marine Research"} MACRO {jmrj} {"Journal of Meteorological Research, Japan"} MACRO {jm} {"Journal of Meteorology"} MACRO {jpo} {"Journal of Physical Oceanography"} MACRO {jra} {"Journal de Recherches Atmospheriques"} MACRO {jaes} {"Journal of the Aeronautical Sciences"} MACRO {japca} {"Journal of the Air Pollution Control Association"} MACRO {jas} {"Journal of the Atmospheric Sciences"} MACRO {jmts} {"Journal of the Marine Technology Society"} MACRO {jmsj} {"Journal of Meteorological Society of Japan"} MACRO {josj} {"Journal of the Oceanographical Society of Japan"} MACRO {jwm} {"Journal of Weather Modification"} MACRO {lao} {"Limnology and Oceanography"} MACRO {mwl} {"Mariners Weather Log"} MACRO {mau} {"Mausam"} MACRO {meteor} {"``Meteor'' Forschungsergebnisse"} MACRO {map} {"Meteorology and Atmospheric Physics"} MACRO {metmag} {"Meteorological Magazine"} MACRO {metmon} {"Meteorological Monographs"} MACRO {metrun} {"Meteorologische Rundschau"} MACRO {metzeit} {"Meteorologische Zeitschrift"} MACRO {metgid} {"Meteorologiya i Gidrologiya"} MACRO {mwr} {"Monthly Weather Review"} MACRO {nwd} {"National Weather Digest"} MACRO {nzjmfr} {"New Zealand Journal of Marine and Freshwater Research"} MACRO {npg} {"Nonlinear Processes in Geophysics"} MACRO {om} {"Oceanography and Meteorology"} MACRO {ocac} {"Oceanologica Acta"} MACRO {oceanus} {"Oceanus"} MACRO {paleoc} {"Paleoceanography"} MACRO {pce} {"Physics and Chemistry of the Earth"} MACRO {pmg} {"Papers in Meteorology and Geophysics"} MACRO {ppom} {"Papers in Physical Oceanography and Meteorology"} MACRO {physzeit} {"Physikalische Zeitschrift"} MACRO {pps} {"Planetary and Space Science"} MACRO {pss} {"Planetary and Space Science"} MACRO {pag} {"Pure and Applied Geophysics"} MACRO {qjrms} {"Quarterly Journal of the Royal Meteorological Society"} MACRO {quatres} {"Quaternary Research"} MACRO {rsci} {"Radio Science"} MACRO {rse} {"Remote Sensing of the Environment"} MACRO {rgeo} {"Reviews of Geophysics"} MACRO {rgsp} {"Reviews of Geophysics and Space Physics"} MACRO {rdgeo} {"Revista de Geofisica"} MACRO {revmeta} {"Revista Meteorologica"} MACRO {sgp}{"Surveys in Geophysics"} MACRO {sp} {"Solar Phys."} MACRO {ssr} {"Space Science Review"} MACRO {tellus} {"Tellus"} MACRO {tac} {"Theoretical and Applied Climatology"} MACRO {tagu} {"Transactions, American Geophysical Union (EOS)"} MACRO {wrr} {"Water Resources Research"} MACRO {weather} {"Weather"} MACRO {wafc} {"Weather and Forecasting"} MACRO {ww} {"Weatherwise"} MACRO {wmob} {"World Meteorological Organization Bulletin"} MACRO {zeitmet} {"Zeitschrift f\^^b{u}r Meteorologie"} % End module: geojour.mbs %------------------------------------------------------------------- % Begin module: % \ProvidesFile{photjour.mbs}[1999/02/24 2.0b (PWD)] MACRO {appopt} {"Applied Optics"} MACRO {bell} {"Bell Systems Technical Journal"} MACRO {ell} {"Electronics Letters"} MACRO {jasp} {"Journal of Applied Spectroscopy"} MACRO {jqe} {"IEEE Journal of Quantum Electronics"} MACRO {jlwt} {"Journal of Lightwave Technology"} MACRO {jmo} {"Journal of Modern Optics"} MACRO {josa} {"Journal of the Optical Society of America"} MACRO {josaa} {"Journal of the Optical Society of America~A"} MACRO {josab} {"Journal of the Optical Society of America~B"} MACRO {jdp} {"Journal de Physique"} MACRO {oc} {"Optics Communications"} MACRO {ol} {"Optics Letters"} MACRO {phtl} {"IEEE Photonics Technology Letters"} MACRO {pspie} {"Proceedings of the Society for Photo-Optical Instruments Engineers"} MACRO {sse} {"Solid-State Electronics"} MACRO {sjot} {"Soviet Journal of Optical Technology"} MACRO {sjqe} {"Soviet Journal of Quantum Electronics"} MACRO {sleb} {"Soviet Physics--Lebedev Institute Reports"} MACRO {stph} {"Soviet Physics--Technical Physics"} MACRO {stphl} {"Soviet Technical Physics Letters"} MACRO {vr} {"Vision Research"} MACRO {zph} {"Zeitschrift f\^^b{u}r Physik"} MACRO {zphb} {"Zeitschrift f\^^b{u}r Physik~B"} MACRO {zphd} {"Zeitschrift f\^^b{u}r Physik~D"} MACRO {CLEO} {"Conf. on Lasers and Electro-Optics"} MACRO {ASSL} {"Advanced Solid State Lasers"} MACRO {OSA} {"Optical Society of America"} % End module: photjour.mbs %% Copyright 1994-2000 Patrick W Daly MACRO {acmcs} {"ACM Computing Surveys"} MACRO {acta} {"Acta Informatica"} MACRO {cacm} {"Communications of the ACM"} MACRO {ibmjrd} {"IBM Journal of Research and Development"} MACRO {ibmsj} {"IBM Systems Journal"} MACRO {ieeese} {"IEEE Transactions on Software Engineering"} MACRO {ieeetc} {"IEEE Transactions on Computers"} MACRO {ieeetcad} {"IEEE Transactions on Computer-Aided Design of Integrated Circuits"} MACRO {ipl} {"Information Processing Letters"} MACRO {jacm} {"Journal of the ACM"} MACRO {jcss} {"Journal of Computer and System Sciences"} MACRO {scp} {"Science of Computer Programming"} MACRO {sicomp} {"SIAM Journal on Computing"} MACRO {tocs} {"ACM Transactions on Computer Systems"} MACRO {tods} {"ACM Transactions on Database Systems"} MACRO {tog} {"ACM Transactions on Graphics"} MACRO {toms} {"ACM Transactions on Mathematical Software"} MACRO {toois} {"ACM Transactions on Office Information Systems"} MACRO {toplas} {"ACM Transactions on Programming Languages and Systems"} MACRO {tcs} {"Theoretical Computer Science"} FUNCTION {bibinfo.check} { swap$ duplicate$ missing$ { pop$ pop$ "" } { duplicate$ empty$ { swap$ pop$ } { swap$ pop$ } if$ } if$ } FUNCTION {bibinfo.warn} { swap$ duplicate$ missing$ { swap$ "missing " swap$ * " in " * cite$ * warning$ pop$ "" } { duplicate$ empty$ { swap$ "empty " swap$ * " in " * cite$ * warning$ } { swap$ pop$ } if$ } if$ } FUNCTION {format.eprint} { eprint duplicate$ empty$ 'skip$ { "\eprint" archive empty$ 'skip$ { "[" * archive * "]" * } if$ "{" * swap$ * "}" * } if$ } FUNCTION {format.url} { url empty$ { "" } { "\urlprefix\url{" url * "}" * } if$ } STRINGS { bibinfo} INTEGERS { nameptr namesleft numnames } FUNCTION {format.names} { 'bibinfo := duplicate$ empty$ 'skip$ { 's := "" 't := #1 'nameptr := s num.names$ 'numnames := numnames 'namesleft := { namesleft #0 > } { s nameptr nameptr #1 > { "{ff}" format.name$ duplicate$ empty$ 'skip$ { tie.or.space.prefix bib.fname.font swap$ * } if$ s nameptr "{vv~}{ll}" format.name$ bib.name.font * s nameptr "{jj}" format.name$ duplicate$ empty$ 'skip$ { bib.fname.font ", " swap$ * } if$ } { "{vv~}{ll}" format.name$ bib.name.font s nameptr "{ff}{, jj}" format.name$ duplicate$ empty$ 'skip$ { bib.fname.font ", " swap$ * } if$ } if$ * bibinfo bibinfo.check 't := nameptr #1 > { namesleft #1 > { ", " * t * } { "," * s nameptr "{ll}" format.name$ duplicate$ "others" = { 't := } { pop$ } if$ t "others" = { " " * bbl.etal emphasize * } { bbl.and space.word * t * } if$ } if$ } 't if$ nameptr #1 + 'nameptr := namesleft #1 - 'namesleft := } while$ } if$ } FUNCTION {format.names.ed} { 'bibinfo := duplicate$ empty$ 'skip$ { 's := "" 't := #1 'nameptr := s num.names$ 'numnames := numnames 'namesleft := { namesleft #0 > } { s nameptr "{ff~}{vv~}{ll}{, jj}" format.name$ bibinfo bibinfo.check 't := nameptr #1 > { namesleft #1 > { ", " * t * } { "," * s nameptr "{ll}" format.name$ duplicate$ "others" = { 't := } { pop$ } if$ t "others" = { " " * bbl.etal emphasize * } { bbl.and space.word * t * } if$ } if$ } 't if$ nameptr #1 + 'nameptr := namesleft #1 - 'namesleft := } while$ } if$ } FUNCTION {format.authors} { author "author" format.names duplicate$ empty$ 'skip$ { collaboration "collaboration" bibinfo.check duplicate$ empty$ 'skip$ { " (" swap$ * ")" * } if$ * } if$ } FUNCTION {get.bbl.editor} { editor num.names$ #1 > 'bbl.editors 'bbl.editor if$ } FUNCTION {format.editors} { editor "editor" format.names duplicate$ empty$ 'skip$ { " " * get.bbl.editor "(" swap$ * ")" * * } if$ } FUNCTION {select.language} { duplicate$ empty$ 'pop$ { language empty$ 'skip$ { "{\selectlanguage{" language * "}" * swap$ * "}" * } if$ } if$ } FUNCTION {format.note} { note empty$ { "" } { note #1 #1 substring$ duplicate$ "{" = 'skip$ { output.state mid.sentence = { "l" } { "u" } if$ change.case$ } if$ note #2 global.max$ substring$ * "note" bibinfo.check } if$ } FUNCTION {format.title} { title "title" bibinfo.check duplicate$ empty$ 'skip$ { "\enquote{" swap$ * add.period$ "}" * select.language } if$ } FUNCTION {output.bibitem} { newline$ "\bibitem[" label * "]{" * write$ cite$ write$ "}" write$ newline$ "" before.all 'output.state := } FUNCTION {n.dashify} { 't := "" { t empty$ not } { t #1 #1 substring$ "-" = { t #1 #2 substring$ "--" = not { "--" * t #2 global.max$ substring$ 't := } { { t #1 #1 substring$ "-" = } { "-" * t #2 global.max$ substring$ 't := } while$ } if$ } { t #1 #1 substring$ * t #2 global.max$ substring$ 't := } if$ } while$ } FUNCTION {word.in} { bbl.in capitalize " " * } FUNCTION {format.date} { month "month" bibinfo.check duplicate$ empty$ year "year" bibinfo.check duplicate$ empty$ { swap$ 'skip$ { "there's a month but no year in " cite$ * warning$ } if$ * } { swap$ 'skip$ { swap$ " " * swap$ } if$ * } if$ duplicate$ empty$ 'skip$ { before.all 'output.state := ", " swap$ * } if$ } FUNCTION{format.year} { year "year" bibinfo.check duplicate$ empty$ { "empty year in " cite$ * warning$ } { "(" swap$ * ")" * } if$ } FUNCTION {format.btitle} { title "title" bibinfo.check duplicate$ empty$ 'skip$ { emphasize select.language } if$ } FUNCTION {either.or.check} { empty$ 'pop$ { "can't use both " swap$ * " fields in " * cite$ * warning$ } if$ } FUNCTION {format.bvolume} { volume empty$ { "" } { bbl.volume volume tie.or.space.prefix "volume" bibinfo.check * * series "series" bibinfo.check duplicate$ empty$ 'pop$ { swap$ bbl.of space.word * swap$ emphasize * } if$ "volume and number" number either.or.check } if$ } FUNCTION {format.number.series} { volume empty$ { number empty$ { series field.or.null } { series empty$ { number "number" bibinfo.check } { output.state mid.sentence = { bbl.number } { bbl.number capitalize } if$ number tie.or.space.prefix "number" bibinfo.check * * bbl.in space.word * series "series" bibinfo.check * } if$ } if$ } { "" } if$ } FUNCTION {format.edition} { edition duplicate$ empty$ 'skip$ { output.state mid.sentence = { "l" } { "t" } if$ change.case$ "edition" bibinfo.check " " * bbl.edition * } if$ } INTEGERS { multiresult } FUNCTION {multi.page.check} { 't := #0 'multiresult := { multiresult not t empty$ not and } { t #1 #1 substring$ duplicate$ "-" = swap$ duplicate$ "," = swap$ "+" = or or { #1 'multiresult := } { t #2 global.max$ substring$ 't := } if$ } while$ multiresult } FUNCTION {format.pages} { pages duplicate$ empty$ 'skip$ { duplicate$ multi.page.check { n.dashify } { } if$ "pages" bibinfo.check } if$ } FUNCTION {format.journal.pages} { pages duplicate$ empty$ 'pop$ { swap$ duplicate$ empty$ { pop$ pop$ format.pages } { ", " * format.year * ", " * swap$ n.dashify "pages" bibinfo.check * } if$ } if$ } FUNCTION {format.journal.eid} { eid "eid" bibinfo.check duplicate$ empty$ 'skip$ { swap$ duplicate$ empty$ 'skip$ { ", " * } if$ swap$ numpages empty$ 'skip$ { bbl.eidpp numpages tie.or.space.prefix "numpages" bibinfo.check * * " (" swap$ * ")" * * } if$ } if$ * } FUNCTION {format.vol.num.pages} { volume field.or.null duplicate$ empty$ 'skip$ { "volume" bibinfo.check } if$ number "number" bibinfo.check duplicate$ empty$ 'skip$ { swap$ duplicate$ empty$ { "there's a number but no volume in " cite$ * warning$ } 'skip$ if$ swap$ ", " bbl.nr * number tie.or.space.prefix pop$ * swap$ * } if$ * } FUNCTION {format.chapter.pages} { chapter empty$ { "" } { type empty$ { bbl.chapter } { type "l" change.case$ "type" bibinfo.check } if$ chapter tie.or.space.prefix "chapter" bibinfo.check * * } if$ } FUNCTION {format.booktitle} { booktitle "booktitle" bibinfo.check emphasize } FUNCTION {format.in.ed.booktitle} { format.booktitle duplicate$ empty$ 'skip$ { editor "editor" format.names.ed duplicate$ empty$ 'pop$ { get.bbl.editor swap$ "," * " " * swap$ * "(" swap$ * ")" * swap$ " " * swap$ * } if$ word.in swap$ * } if$ } FUNCTION {empty.misc.check} { author empty$ title empty$ howpublished empty$ month empty$ year empty$ note empty$ and and and and and key empty$ not and { "all relevant fields are empty in " cite$ * warning$ } 'skip$ if$ } FUNCTION {format.thesis.type} { type duplicate$ empty$ 'pop$ { swap$ pop$ "t" change.case$ "type" bibinfo.check } if$ } FUNCTION {format.tr.number} { number "number" bibinfo.check type duplicate$ empty$ { pop$ bbl.techrep } 'skip$ if$ "type" bibinfo.check swap$ duplicate$ empty$ { pop$ "t" change.case$ } { tie.or.space.prefix * * } if$ } FUNCTION {format.article.crossref} { key duplicate$ empty$ { pop$ journal duplicate$ empty$ { "need key or journal for " cite$ * " to crossref " * crossref * warning$ } { "journal" bibinfo.check emphasize word.in swap$ * } if$ } { word.in swap$ * " " *} if$ " \cite{" * crossref * "}" * } FUNCTION {format.crossref.editor} { editor #1 "{vv~}{ll}" format.name$ "editor" bibinfo.check editor num.names$ duplicate$ #2 > { pop$ "editor" bibinfo.check " " * bbl.etal emphasize * } { #2 < 'skip$ { editor #2 "{ff }{vv }{ll}{ jj}" format.name$ "others" = { "editor" bibinfo.check " " * bbl.etal emphasize * } { bbl.and space.word * editor #2 "{vv~}{ll}" format.name$ "editor" bibinfo.check * } if$ } if$ } if$ } FUNCTION {format.book.crossref} { volume duplicate$ empty$ { "empty volume in " cite$ * "'s crossref of " * crossref * warning$ pop$ word.in } { bbl.volume capitalize swap$ tie.or.space.prefix "volume" bibinfo.check * * bbl.of space.word * } if$ editor empty$ editor field.or.null author field.or.null = or { key empty$ { series empty$ { "need editor, key, or series for " cite$ * " to crossref " * crossref * warning$ "" * } { series emphasize * } if$ } { key * } if$ } { format.crossref.editor * } if$ " \cite{" * crossref * "}" * } FUNCTION {format.incoll.inproc.crossref} { editor empty$ editor field.or.null author field.or.null = or { key empty$ { format.booktitle duplicate$ empty$ { "need editor, key, or booktitle for " cite$ * " to crossref " * crossref * warning$ } { word.in swap$ * } if$ } { word.in key * " " *} if$ } { word.in format.crossref.editor * " " *} if$ " \cite{" * crossref * "}" * } FUNCTION {format.org.or.pub} { 't := "" year empty$ { "empty year in " cite$ * warning$ } 'skip$ if$ address empty$ t empty$ and year empty$ and 'skip$ { t empty$ { address "address" bibinfo.check * } { t * address empty$ 'skip$ { ", " * address "address" bibinfo.check * } if$ } if$ year empty$ 'skip$ { t empty$ address empty$ and 'skip$ { ", " * } if$ year "year" bibinfo.check * } if$ } if$ } FUNCTION {format.publisher.address} { publisher "publisher" bibinfo.warn format.org.or.pub } FUNCTION {format.organization.address} { organization "organization" bibinfo.check format.org.or.pub } STRINGS {oldname} FUNCTION {name.or.dash} { 's := oldname empty$ { s 'oldname := s } { s oldname = { "---" } { s 'oldname := s } if$ } if$ } FUNCTION {article} { output.bibitem format.authors "author" output.check name.or.dash new.block format.title "title" output.check new.block crossref missing$ { journal "journal" bibinfo.check emphasize "journal" output.check format.vol.num.pages output } { format.article.crossref output.nonnull } if$ eid empty$ { format.journal.pages } { format.journal.eid } if$ new.block format.note output format.eprint output format.url output fin.entry } FUNCTION {book} { output.bibitem author empty$ { format.editors "author and editor" output.check add.blank name.or.dash } { format.authors output.nonnull name.or.dash crossref missing$ { "author and editor" editor either.or.check } 'skip$ if$ } if$ new.block format.btitle "title" output.check crossref missing$ { format.bvolume output new.block format.number.series output new.sentence format.publisher.address output } { new.block format.book.crossref output.nonnull format.date "year" output.check } if$ format.edition output new.block format.note output format.eprint output format.url output fin.entry } FUNCTION {booklet} { output.bibitem format.authors output name.or.dash new.block format.title "title" output.check new.block howpublished "howpublished" bibinfo.check output address "address" bibinfo.check output format.date output new.block format.note output format.eprint output format.url output fin.entry } FUNCTION {inbook} { output.bibitem author empty$ { format.editors "author and editor" output.check name.or.dash } { format.authors output.nonnull name.or.dash crossref missing$ { "author and editor" editor either.or.check } 'skip$ if$ } if$ new.block format.btitle "title" output.check crossref missing$ { format.publisher.address output format.bvolume output new.block format.number.series output new.sentence } { new.block format.book.crossref output.nonnull } if$ format.edition output add.blank format.pages "pages" output.check new.block format.note output format.eprint output format.url output fin.entry } FUNCTION {incollection} { output.bibitem format.authors "author" output.check name.or.dash new.block format.title "title" output.check new.block crossref missing$ { format.in.ed.booktitle "booktitle" output.check format.publisher.address output format.bvolume output format.number.series output new.sentence format.edition output } { format.incoll.inproc.crossref output.nonnull } if$ format.pages "pages" output.check new.block format.note output format.eprint output format.url output fin.entry } FUNCTION {inproceedings} { output.bibitem format.authors "author" output.check name.or.dash new.block format.title "title" output.check new.block crossref missing$ { format.in.ed.booktitle "booktitle" output.check new.sentence publisher empty$ { format.organization.address output } { organization "organization" bibinfo.check output format.publisher.address output } if$ format.bvolume output format.number.series output } { format.incoll.inproc.crossref output.nonnull } if$ format.pages "pages" output.check new.block format.note output format.eprint output format.url output fin.entry } FUNCTION {conference} { inproceedings } FUNCTION {manual} { output.bibitem author empty$ { organization "organization" bibinfo.check duplicate$ empty$ 'pop$ { output address "address" bibinfo.check output } if$ } { format.authors output.nonnull } if$ name.or.dash new.block format.btitle "title" output.check author empty$ { organization empty$ { address new.block.checka address "address" bibinfo.check output } 'skip$ if$ } { organization address new.block.checkb organization "organization" bibinfo.check output address "address" bibinfo.check output } if$ format.edition output format.date output new.block format.note output format.eprint output format.url output fin.entry } FUNCTION {mastersthesis} { output.bibitem format.authors "author" output.check name.or.dash new.block format.btitle "title" output.check new.block bbl.mthesis format.thesis.type output.nonnull school "school" bibinfo.warn output address "address" bibinfo.check output format.date "year" output.check new.block format.note output format.eprint output format.url output fin.entry } FUNCTION {misc} { output.bibitem format.authors output name.or.dash title howpublished new.block.checkb format.title output howpublished new.block.checka howpublished "howpublished" bibinfo.check output format.date output new.block format.note output format.eprint output format.url output fin.entry empty.misc.check } FUNCTION {phdthesis} { output.bibitem format.authors "author" output.check name.or.dash new.block format.btitle "title" output.check new.block bbl.phdthesis format.thesis.type output.nonnull school "school" bibinfo.warn output address "address" bibinfo.check output format.date "year" output.check new.block format.note output format.eprint output format.url output fin.entry } FUNCTION {proceedings} { output.bibitem editor empty$ { organization "organization" bibinfo.check output } { format.editors output.nonnull } if$ name.or.dash new.block format.btitle "title" output.check format.bvolume output format.number.series output editor empty$ { publisher empty$ 'skip$ { new.sentence format.publisher.address output } if$ } { publisher empty$ { new.sentence format.organization.address output } { new.sentence organization "organization" bibinfo.check output format.publisher.address output } if$ } if$ new.block format.note output format.eprint output format.url output fin.entry } FUNCTION {techreport} { output.bibitem format.authors "author" output.check name.or.dash new.block format.title "title" output.check new.block format.tr.number emphasize output.nonnull institution "institution" bibinfo.warn output address "address" bibinfo.check output format.date "year" output.check new.block format.note output format.eprint output format.url output fin.entry } FUNCTION {unpublished} { output.bibitem format.authors "author" output.check name.or.dash new.block format.title "title" output.check format.date output new.block format.note "note" output.check format.eprint output format.url output fin.entry } FUNCTION {default.type} { misc } READ FUNCTION {sortify} { purify$ "l" change.case$ } INTEGERS { len } FUNCTION {chop.word} { 's := 'len := s #1 len substring$ = { s len #1 + global.max$ substring$ } 's if$ } FUNCTION {sort.format.names} { 's := #1 'nameptr := "" s num.names$ 'numnames := numnames 'namesleft := { namesleft #0 > } { s nameptr "{ll{ }}{ ff{ }}{ jj{ }}" format.name$ 't := nameptr #1 > { " " * namesleft #1 = t "others" = and { "zzzzz" * } { t sortify * } if$ } { t sortify * } if$ nameptr #1 + 'nameptr := namesleft #1 - 'namesleft := } while$ } FUNCTION {sort.format.title} { 't := "A " #2 "An " #3 "The " #4 t chop.word chop.word chop.word sortify #1 global.max$ substring$ } FUNCTION {author.sort} { author empty$ { key empty$ { "to sort, need author or key in " cite$ * warning$ "" } { key sortify } if$ } { author sort.format.names } if$ } FUNCTION {author.editor.sort} { author empty$ { editor empty$ { key empty$ { "to sort, need author, editor, or key in " cite$ * warning$ "" } { key sortify } if$ } { editor sort.format.names } if$ } { author sort.format.names } if$ } FUNCTION {author.organization.sort} { author empty$ { organization empty$ { key empty$ { "to sort, need author, organization, or key in " cite$ * warning$ "" } { key sortify } if$ } { "The " #4 organization chop.word sortify } if$ } { author sort.format.names } if$ } FUNCTION {editor.organization.sort} { editor empty$ { organization empty$ { key empty$ { "to sort, need editor, organization, or key in " cite$ * warning$ "" } { key sortify } if$ } { "The " #4 organization chop.word sortify } if$ } { editor sort.format.names } if$ } FUNCTION {presort} { type$ "book" = type$ "inbook" = or 'author.editor.sort { type$ "proceedings" = 'editor.organization.sort { type$ "manual" = 'author.organization.sort 'author.sort if$ } if$ } if$ " " * year field.or.null sortify * " " * title field.or.null sort.format.title * #1 entry.max$ substring$ 'sort.key$ := } ITERATE {presort} SORT STRINGS { longest.label } INTEGERS { number.label longest.label.width } FUNCTION {initialize.longest.label} { "" 'longest.label := #1 'number.label := #0 'longest.label.width := } FUNCTION {longest.label.pass} { cite$ 'label := label width$ longest.label.width > { label 'longest.label := label width$ 'longest.label.width := } 'skip$ if$ } EXECUTE {initialize.longest.label} ITERATE {longest.label.pass} FUNCTION {begin.bib} { preamble$ empty$ 'skip$ { preamble$ write$ newline$ } if$ "\begin{thebibliography}{" longest.label * "}" * write$ newline$ "\ProvideTextCommand{\guillemotleft}{OT1}{%" write$ newline$ " \leavevmode\raise .27ex\hbox{$\scriptscriptstyle\ll$}}" write$ newline$ "\ProvideTextCommand{\guillemotright}{OT1}{%" write$ newline$ " \leavevmode\raise .27ex\hbox{$\scriptscriptstyle\gg$}}" write$ newline$ "\newcommand{\enquote}[1]{\guillemotleft#1\guillemotright}" write$ newline$ "\expandafter\ifx\csname url\endcsname\relax" write$ newline$ " \def\url#1{\texttt{#1}}\fi" write$ newline$ "\expandafter\ifx\csname urlprefix\endcsname\relax\def\urlprefix{URL }\fi" write$ newline$ "\providecommand{\selectlanguage}[1]{\relax}" write$ newline$ "\providecommand{\bibAnnoteFile}[1]{%" write$ newline$ " \IfFileExists{#1}{\begin{quotation}\noindent\textsc{Key:} #1\\" write$ newline$ " \textsc{Annotation:}\ \input{#1}\end{quotation}}{}}" write$ newline$ "\providecommand{\bibAnnote}[2]{%" write$ newline$ " \begin{quotation}\noindent\textsc{Key:} #1\\" write$ newline$ " \textsc{Annotation:}\ #2\end{quotation}}" write$ newline$ "\providecommand{\eprint}[2][]{\url{#2}}" write$ newline$ } EXECUTE {begin.bib} EXECUTE {init.state.consts} ITERATE {call.type$} FUNCTION {end.bib} { newline$ "\end{thebibliography}" write$ newline$ } EXECUTE {end.bib} %% End of customized bst file %% %% End of file `sousa4.bst'. \ No newline at end of file
diff --git a/biblio/bibtex/contrib/spain/spain.dbj b/biblio/bibtex/contrib/spain/spain.dbj
new file mode 100644
index 0000000000..58a8122fb9
--- /dev/null
+++ b/biblio/bibtex/contrib/spain/spain.dbj
@@ -0,0 +1 @@
+%% Driver file to produce iso690.bst from merlin.mbs %% Generated with makebst, version 3.2 (1999/02/24) %% Produced on 2000/01/17 at 19:51 %% \input docstrip \preamble ---------------------------------------- *** *** \endpreamble \postamble End of customized bst file \endpostamble \keepsilent \askforoverwritefalse \def\MBopts{\from{merlin.mbs}{% head,\MBopta} \from{spanish.mbs}{\MBopta} \from{merlin.mbs}{tail,\MBopta}} \def\MBopta{% exlang%: External language file ,cite%: Cite key % ,alfph,alf-f%: Alpha style, Jones90 % ,alph,alf-1%: Alpha style, Jon90 % ,alph%: Alpha style, Jon90 or JWB90 % ,ay%: Author-year % %(def) Numerical %-------------------- % ,html,htdes%: Hypertext with keys % ,html,htlist%: Hypertext list % ,html%: Hypertext %: (def) Normal LaTeX %-------------------- ,lang%: Add language field % %(def) No language field %-------------------- ,annote%: Annotations % %(def) No annotations %-------------------- % ,seq-yr%: Year ordered % ,seq-no%: Citation order %: (def) Alphabetical %-------------------- ,vonx%: Sort without von part % %(def) Sort on von part %-------------------- ,nm-revv1%: First name reversed, with full names % ,nm-rev1%: Only first name reversed, initials % ,nm-rvv%: Surname + spaceless initials % ,nm-rvx%: Surname + pure initials % ,nm-rv%: Surname + dotless initials % ,nm-rev%: Surname + initials % ,nm-init,ed-au%: Initials + surname % ,nm-revf%: Full, surname first % ,ed-au%: Full, surname last %-------------------- % ,ed-rev%: Editor names reversed %: (def) Editor names NOT reversed %-------------------- % ,aunm-sl%: Names separated by slash % ,aunm-semi%: Names separated by semi-colon %: (def) Author names separated by commas %-------------------- ,nmdash%: Repeated author/editor names replaced by dash % %(def) Author/editor names always present %-------------------- % ,nmlm%: Limited authors %: (def) All authors %-------------------- % ,nmft,nmft-def%: User defined author font % ,nmft,nmft-bf%: Bold authors % ,nmft,nmft-it%: Italic authors ,nmft,nmft-sc%: Small caps authors % %(def) Normal font for author names %-------------------- % ,fnm-def%: First names in user defined font ,fnm-rm%: First names in normal font % %(def) First names same font as surnames %-------------------- ,nmfted%: Editors incollection like authors % %(def) Editors incollection normal font %-------------------- ,nmand-rm%: `And' in normal font % %(def) `And' in author font %-------------------- % ,dt-end%: Date at very end % ,dt-jnl%: Date part of journal spec. % ,dt-beg%: Date after authors %: (def) Date at end %-------------------- % ,yr-blk%: Date preceded by space % ,yr-com%: Date preceded by comma % ,yr-per%: Date preceded by period % ,yr-col%: Date preceded by colon % ,yr-brk%: Date in brackets % ,yr-par%: Date in parentheses %: (def) Plain month and year %-------------------- % ,xmth%: Date is year only %: (def) Date is month and year %-------------------- % ,dtrev%: Date as year month %: (def) Date as month year %-------------------- % ,dtbf%: Date in bold face %: (def) Date in normal font %-------------------- ,tit-qq,qt-g,qx%: Title in guillemets % ,tit-qq,qx%: Title in double quotes % ,tit-qq,qt-s,qx%: Title in single quotes % ,tit-qq,qt-g%: Title and punctuation in guillemets % ,tit-qq%: Title and punctuation in double quotes % ,tit-qq,qt-s%: Title and punctuation in single quotes % ,tit-it%: Title italic % %(def) Title plain %-------------------- % %(def) Collection and proceedings titles not in quotes ,bt-qq%: Quote collection and proceedings titles %-------------------- ,atit-u%: Title style % %(def) Sentence style %-------------------- % ,jtit-x%: No article title %: (def) Article title present %-------------------- % ,jxper%: Dotless journal names %: (def) Periods in journal names %-------------------- % ,jttl-rm%: Journal title normal %: (def) Journal title italics %-------------------- % ,thtit-a%: Thesis title like article %: (def) Thesis titles like books %-------------------- ,trtit-b%: Tech. report title like books % %(def) Tech. report title like articles %-------------------- % ,trnum-it%: Tech. report and number italic %: (def) Tech. report and number plain %-------------------- % ,vol-2bf%: Volume and number bold % ,vol-bf%: Volume bold % ,vol-it%: Volume italic %: (def) Volume plain %-------------------- % ,vnum-x%: Journal vol, without number % ,vnum-b%: Journal vol number % ,vnum-h%: Journal vol, \# number ,vnum-nr%: Journal vol, no. num % ,vnum-cm%: Journal vol, num % ,vnum-sp%: Journal vol (num) % %(def) Journal vol(num) %-------------------- % ,volp-blk%: Volume with blank ,volp-com%: Volume with comma % ,volp-semi%: Volume with semi-colon % ,volp-sp%: Volume with colon and space % %(def) Volume with colon %-------------------- % ,jdt-pc%: Year, comma, pages % ,jdt-p%: Year with pages ,jdt-vs%: Journal vol (year) % ,jdt-v%: Journal vol(year) % %(def) Journal year like others %-------------------- % ,jpg-1%: Only start page number %: (def) Start and stop page numbers %-------------------- % ,pgsep-p%: Period inserted over 9999 % ,pgsep-s%: Thin space inserted over 9999 % ,pgsep-c%: Comma inserted over 9999 %: (def) No separators for large page numbers %-------------------- % ,jwdpg%: Include `page' in articles %: (def) Article pages numbers only %-------------------- ,pp-last%: Pages at end % %(def) Pages given mid text %-------------------- % ,jwdvol%: Include `volume' in articles %: (def) Article volume as number only %-------------------- ,num-xser%: Allows number without series % %(def) Standard BibTeX %-------------------- % ,numser%: Just before publisher %: (def) After chapter and pages %-------------------- % ,jnm-x%: Space after journal %: (def) Comma after journal %-------------------- % ,btit-rm,bt-rm%: Book title plain %: (def) Book title italic %-------------------- ,bkpg-x%: Pages in book bare % ,bkpg-par%: Pages in book in parentheses % %(def) Pages in book plain %-------------------- % ,pg-bk%: For book: 345 pages %: (def) Total book pages not printed %-------------------- % ,add-pub%: Address: Publisher %: (def) Publisher, address %-------------------- % ,pub-date,pub-xpar,pub-xc%: Publisher and date, no parentheses, no comma % ,pub-date,pub-xpar%: Publisher and date without parentheses % ,pub-date,pub-xc%: Publisher and date in parentheses, no comma % ,pub-date%: Publisher and date in parentheses % ,pub-par%: Publisher in parentheses %: (def) Publisher as normal block %-------------------- % ,pre-edn%: Publisher after edition ,pre-pub%: Publisher before chapter, pages % %(def) Publisher after chapter, pages %-------------------- %: (def) No ISBN % ,isbn%: Include ISBN %-------------------- %: (def) No ISSN % ,issn%: Include ISSN %-------------------- % ,url,url-nl%: URL on new line % ,url,url-nt%: URL as note ,url,url-blk%: Include URL % %(def) No URL %-------------------- % ,edparc,bkedcap%: `Name, (Editor)' % ,edparc%: `Name, (editor)' % ,edpar,bkedcap%: `Name (Editor),' ,edpar%: `Name (editor),' % %(def) Word `editor' after name %-------------------- % ,edby-par,edbyy%: Booktitle (.., editor) % ,edby,edbyy%: Booktitle, .., editor % ,edby-parc,edbyx%: Booktitle, (editor..) % ,edby-par,edbyx%: Booktitle (editor..) ,edby,edbyw%: Booktitle, (editor) .. % ,edby,edbyx%: Booktitle, editor .. % ,edby-parc%: Booktitle, (edited by ..) % ,edby-par%: Booktitle (edited by ..) % ,edby%: Booktitle, edited by .. % %(def) .., editor, booktitle %-------------------- % ,edcap%: `(Editor,..)' or `(Edited by..)' %: (def) `(editor,..)' or `(edited by..)' %-------------------- % ,blk-tita%: Period after titles of articles % ,blk-tit%: Period after titles of articles, books, etc % ,blk-com,com-blank%: Blanks between blocks % ,blk-com,com-semi%: Semi-colon between blocks ,blk-com%: Comma between blocks % %(def) \newblock after blocks %-------------------- % ,blknt%: Notes preceded by period %: (def) Notes have regular punctuation %-------------------- ,au-col%: Author block with colon % %(def) Author block normal %-------------------- % ,in-x%: No word `in' % ,in-col%: Colon after `in' %: (def) Space after `in' %-------------------- % ,injnl%: Add `in' before journal name %: (def) No `in' before journal name %-------------------- % ,fin-bare%: No period at end %: (def) Period at very end %-------------------- ,spanish%: Spanish language ,pp%: `P\'agina' abbreviated % %(def) `P\'agina(s)' %-------------------- ,ed%: `Editor' abbreviated % %(def) `Editor(es)' %-------------------- ,abr%: Abbreviations % %(def) No abbreviations %-------------------- % ,ord%: Numerical editions % %(def) Write out editions ,xedn%: Editions as in database %-------------------- % ,jabr%: Abbreviated journal names %: (def) Full journal names %-------------------- % ,varand%: Use \BIBand % ,amper%: Use ampersand %: (def) Use word `and' %-------------------- ,and-com%: Comma even with 2 authors % ,and-xcom%: No comma before `and' % %(def) Comma before `and' %-------------------- % %(def) Two editors without comma ,and-com-ed%: Comma with 2 editors %-------------------- % ,xand%: No `and' %: (def) With `and' %-------------------- % ,etal-rm%: Roman et al % ,etal-it%: Italic et al %: (def) Plain et al %-------------------- % ,em-ul%: Underlining % ,em-x%: No italics ,em-it%: Use true italics % %(def) Use emphasis %-------------------- ,nfss%: NFSS % %(def) No NFSS %-------------------- ,{% }} \generate{\file{iso690.bst}{\MBopts}} \endbatchfile \ No newline at end of file
diff --git a/biblio/bibtex/contrib/swebib/README b/biblio/bibtex/contrib/swebib/README
new file mode 100644
index 0000000000..187560ff88
--- /dev/null
+++ b/biblio/bibtex/contrib/swebib/README
@@ -0,0 +1,4 @@
+The files swe*.bst are Swedish versions of the standard bibliography
+styles, and of the style plainnat. The styles should be funtionally
+equivalent to the corresponding original styles, apart from the
+Swedish translations. The styles do not implement Swedish collation.
diff --git a/biblio/bibtex/contrib/swebib/sweabbrv.bst b/biblio/bibtex/contrib/swebib/sweabbrv.bst
new file mode 100644
index 0000000000..a700ab7752
--- /dev/null
+++ b/biblio/bibtex/contrib/swebib/sweabbrv.bst
@@ -0,0 +1,1097 @@
+%% sweabbrv.bst (Swedish version of BibTeX standard bibliography style `abbrv')
+%% Copyright 2003 Lars Engebretsen
+%
+% This program may be distributed and/or modified under the
+% conditions of the LaTeX Project Public License, either version 1.2
+% of this license or (at your option) any later version.
+% The latest version of this license is in
+% http://www.latex-project.org/lppl.txt
+% and version 1.2 or later is part of all distributions of LaTeX
+% version 1999/12/01 or later.
+%
+% This program consists of the files sweabbrv.bst, swealpha.bst,
+% sweplain.bst, sweplnat.bst, and sweunsrt.bst
+
+ENTRY
+ { address
+ author
+ booktitle
+ chapter
+ edition
+ editor
+ howpublished
+ institution
+ journal
+ key
+ month
+ note
+ number
+ organization
+ pages
+ publisher
+ school
+ series
+ title
+ type
+ volume
+ year
+ }
+ {}
+ { label }
+
+INTEGERS { output.state before.all mid.sentence after.sentence after.block }
+
+FUNCTION {init.state.consts}
+{ #0 'before.all :=
+ #1 'mid.sentence :=
+ #2 'after.sentence :=
+ #3 'after.block :=
+}
+
+STRINGS { s t }
+
+FUNCTION {output.nonnull}
+{ 's :=
+ output.state mid.sentence =
+ { ", " * write$ }
+ { output.state after.block =
+ { add.period$ write$
+ newline$
+ "\newblock " write$
+ }
+ { output.state before.all =
+ 'write$
+ { add.period$ " " * write$ }
+ if$
+ }
+ if$
+ mid.sentence 'output.state :=
+ }
+ if$
+ s
+}
+
+FUNCTION {output}
+{ duplicate$ empty$
+ 'pop$
+ 'output.nonnull
+ if$
+}
+
+FUNCTION {output.check}
+{ 't :=
+ duplicate$ empty$
+ { pop$ "empty " t * " in " * cite$ * warning$ }
+ 'output.nonnull
+ if$
+}
+
+FUNCTION {output.bibitem}
+{ newline$
+ "\bibitem{" write$
+ cite$ write$
+ "}" write$
+ newline$
+ ""
+ before.all 'output.state :=
+}
+
+FUNCTION {fin.entry}
+{ add.period$
+ write$
+ newline$
+}
+
+FUNCTION {new.block}
+{ output.state before.all =
+ 'skip$
+ { after.block 'output.state := }
+ if$
+}
+
+FUNCTION {new.sentence}
+{ output.state after.block =
+ 'skip$
+ { output.state before.all =
+ 'skip$
+ { after.sentence 'output.state := }
+ if$
+ }
+ if$
+}
+
+FUNCTION {not}
+{ { #0 }
+ { #1 }
+ if$
+}
+
+FUNCTION {and}
+{ 'skip$
+ { pop$ #0 }
+ if$
+}
+
+FUNCTION {or}
+{ { pop$ #1 }
+ 'skip$
+ if$
+}
+
+FUNCTION {new.block.checka}
+{ empty$
+ 'skip$
+ 'new.block
+ if$
+}
+
+FUNCTION {new.block.checkb}
+{ empty$
+ swap$ empty$
+ and
+ 'skip$
+ 'new.block
+ if$
+}
+
+FUNCTION {new.sentence.checka}
+{ empty$
+ 'skip$
+ 'new.sentence
+ if$
+}
+
+FUNCTION {new.sentence.checkb}
+{ empty$
+ swap$ empty$
+ and
+ 'skip$
+ 'new.sentence
+ if$
+}
+
+FUNCTION {field.or.null}
+{ duplicate$ empty$
+ { pop$ "" }
+ 'skip$
+ if$
+}
+
+FUNCTION {emphasize}
+{ duplicate$ empty$
+ { pop$ "" }
+ { "{\em " swap$ * "}" * }
+ if$
+}
+
+INTEGERS { nameptr namesleft numnames }
+
+FUNCTION {format.names}
+{ 's :=
+ #1 'nameptr :=
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ { s nameptr "{f.~}{vv~}{ll}{, jj}" format.name$ 't :=
+ nameptr #1 >
+ { namesleft #1 >
+ { ", " * t * }
+ { t "others" =
+ { " m.fl." * }
+ { " och " * t * }
+ if$
+ }
+ if$
+ }
+ 't
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+}
+
+FUNCTION {format.authors}
+{ author empty$
+ { "" }
+ { author format.names }
+ if$
+}
+
+FUNCTION {format.editors}
+{ editor empty$
+ { "" }
+ { editor format.names
+ editor num.names$ #1 >
+ { ", red." * }
+ { ", red." * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.title}
+{ title empty$
+ { "" }
+ { title "t" change.case$ }
+ if$
+}
+
+FUNCTION {n.dashify}
+{ 't :=
+ ""
+ { t empty$ not }
+ { t #1 #1 substring$ "-" =
+ { t #1 #2 substring$ "--" = not
+ { "--" *
+ t #2 global.max$ substring$ 't :=
+ }
+ { { t #1 #1 substring$ "-" = }
+ { "-" *
+ t #2 global.max$ substring$ 't :=
+ }
+ while$
+ }
+ if$
+ }
+ { t #1 #1 substring$ *
+ t #2 global.max$ substring$ 't :=
+ }
+ if$
+ }
+ while$
+}
+
+FUNCTION {format.date}
+{ year empty$
+ { month empty$
+ { "" }
+ { "there's a month but no year in " cite$ * warning$
+ month
+ }
+ if$
+ }
+ { month empty$
+ 'year
+ { month " " * year * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.btitle}
+{ title emphasize
+}
+
+FUNCTION {tie.or.space.connect}
+{ duplicate$ text.length$ #3 <
+ { "~" }
+ { " " }
+ if$
+ swap$ * *
+}
+
+FUNCTION {either.or.check}
+{ empty$
+ 'pop$
+ { "can't use both " swap$ * " fields in " * cite$ * warning$ }
+ if$
+}
+
+FUNCTION {format.bvolume}
+{ volume empty$
+ { "" }
+ { "band" volume tie.or.space.connect
+ series empty$
+ 'skip$
+ { " av " * series emphasize * }
+ if$
+ "volume and number" number either.or.check
+ }
+ if$
+}
+
+FUNCTION {format.number.series}
+{ volume empty$
+ { number empty$
+ { series field.or.null }
+ { output.state mid.sentence =
+ { "nummer" }
+ { "Nummer" }
+ if$
+ number tie.or.space.connect
+ series empty$
+ { "there's a number but no series in " cite$ * warning$ }
+ { " i " * series * }
+ if$
+ }
+ if$
+ }
+ { "" }
+ if$
+}
+
+FUNCTION {format.edition}
+{ edition empty$
+ { "" }
+ { output.state mid.sentence =
+ { edition "l" change.case$ " utg." * }
+ { edition "t" change.case$ " utg." * }
+ if$
+ }
+ if$
+}
+
+INTEGERS { multiresult }
+
+FUNCTION {multi.page.check}
+{ 't :=
+ #0 'multiresult :=
+ { multiresult not
+ t empty$ not
+ and
+ }
+ { t #1 #1 substring$
+ duplicate$ "-" =
+ swap$ duplicate$ "," =
+ swap$ "+" =
+ or or
+ { #1 'multiresult := }
+ { t #2 global.max$ substring$ 't := }
+ if$
+ }
+ while$
+ multiresult
+}
+
+FUNCTION {format.pages}
+{ pages empty$
+ { "" }
+ { pages multi.page.check
+ { "ss" pages n.dashify tie.or.space.connect }
+ { "s" pages tie.or.space.connect }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.vol.num.pages}
+{ volume field.or.null
+ number empty$
+ 'skip$
+ { "(" number * ")" * *
+ volume empty$
+ { "there's a number but no volume in " cite$ * warning$ }
+ 'skip$
+ if$
+ }
+ if$
+ pages empty$
+ 'skip$
+ { duplicate$ empty$
+ { pop$ format.pages }
+ { ":" * pages n.dashify * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.chapter.pages}
+{ chapter empty$
+ 'format.pages
+ { type empty$
+ { "kapitel" }
+ { type "l" change.case$ }
+ if$
+ chapter tie.or.space.connect
+ pages empty$
+ 'skip$
+ { ", " * format.pages * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.in.ed.booktitle}
+{ booktitle empty$
+ { "" }
+ { editor empty$
+ { "I: " booktitle emphasize * }
+ { "I: " format.editors * ", " * booktitle emphasize * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {empty.misc.check}
+{ author empty$ title empty$ howpublished empty$
+ month empty$ year empty$ note empty$
+ and and and and and
+ key empty$ not and
+ { "all relevant fields are empty in " cite$ * warning$ }
+ 'skip$
+ if$
+}
+
+FUNCTION {format.thesis.type}
+{ type empty$
+ 'skip$
+ { pop$
+ type "t" change.case$
+ }
+ if$
+}
+
+FUNCTION {format.tr.number}
+{ type empty$
+ { "Teknisk rapport" }
+ 'type
+ if$
+ number empty$
+ { "t" change.case$ }
+ { number tie.or.space.connect }
+ if$
+}
+
+FUNCTION {format.article.crossref}
+{ key empty$
+ { journal empty$
+ { "need key or journal for " cite$ * " to crossref " * crossref *
+ warning$
+ ""
+ }
+ { "I: {\em " journal * "\/}" * }
+ if$
+ }
+ { "I: " key * }
+ if$
+ " \cite{" * crossref * "}" *
+}
+
+FUNCTION {format.crossref.editor}
+{ editor #1 "{vv~}{ll}" format.name$
+ editor num.names$ duplicate$
+ #2 >
+ { pop$ " m.fl." * }
+ { #2 <
+ 'skip$
+ { editor #2 "{ff }{vv }{ll}{ jj}" format.name$ "others" =
+ { " m.fl." * }
+ { " och " * editor #2 "{vv~}{ll}" format.name$ * }
+ if$
+ }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.book.crossref}
+{ volume empty$
+ { "empty volume in " cite$ * "'s crossref of " * crossref * warning$
+ "I: "
+ }
+ { "Band" volume tie.or.space.connect
+ " av " *
+ }
+ if$
+ editor empty$
+ editor field.or.null author field.or.null =
+ or
+ { key empty$
+ { series empty$
+ { "need editor, key, or series for " cite$ * " to crossref " *
+ crossref * warning$
+ "" *
+ }
+ { "{\em " * series * "\/}" * }
+ if$
+ }
+ { key * }
+ if$
+ }
+ { format.crossref.editor * }
+ if$
+ " \cite{" * crossref * "}" *
+}
+
+FUNCTION {format.incoll.inproc.crossref}
+{ editor empty$
+ editor field.or.null author field.or.null =
+ or
+ { key empty$
+ { booktitle empty$
+ { "need editor, key, or booktitle for " cite$ * " to crossref " *
+ crossref * warning$
+ ""
+ }
+ { "I: {\em " booktitle * "\/}" * }
+ if$
+ }
+ { "I: " key * }
+ if$
+ }
+ { "I: " format.crossref.editor * }
+ if$
+ " \cite{" * crossref * "}" *
+}
+
+FUNCTION {article}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.title "title" output.check
+ new.block
+ crossref missing$
+ { journal emphasize "journal" output.check
+ format.vol.num.pages output
+ format.date "year" output.check
+ }
+ { format.article.crossref output.nonnull
+ format.pages output
+ }
+ if$
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {book}
+{ output.bibitem
+ author empty$
+ { format.editors "author and editor" output.check }
+ { format.authors output.nonnull
+ crossref missing$
+ { "author and editor" editor either.or.check }
+ 'skip$
+ if$
+ }
+ if$
+ new.block
+ format.btitle "title" output.check
+ crossref missing$
+ { format.bvolume output
+ new.block
+ format.number.series output
+ new.sentence
+ publisher "publisher" output.check
+ address output
+ }
+ { new.block
+ format.book.crossref output.nonnull
+ }
+ if$
+ format.edition output
+ format.date "year" output.check
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {booklet}
+{ output.bibitem
+ format.authors output
+ new.block
+ format.title "title" output.check
+ howpublished address new.block.checkb
+ howpublished output
+ address output
+ format.date output
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {inbook}
+{ output.bibitem
+ author empty$
+ { format.editors "author and editor" output.check }
+ { format.authors output.nonnull
+ crossref missing$
+ { "author and editor" editor either.or.check }
+ 'skip$
+ if$
+ }
+ if$
+ new.block
+ format.btitle "title" output.check
+ crossref missing$
+ { format.bvolume output
+ format.chapter.pages "chapter and pages" output.check
+ new.block
+ format.number.series output
+ new.sentence
+ publisher "publisher" output.check
+ address output
+ }
+ { format.chapter.pages "chapter and pages" output.check
+ new.block
+ format.book.crossref output.nonnull
+ }
+ if$
+ format.edition output
+ format.date "year" output.check
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {incollection}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.title "title" output.check
+ new.block
+ crossref missing$
+ { format.in.ed.booktitle "booktitle" output.check
+ format.bvolume output
+ format.number.series output
+ format.chapter.pages output
+ new.sentence
+ publisher "publisher" output.check
+ address output
+ format.edition output
+ format.date "year" output.check
+ }
+ { format.incoll.inproc.crossref output.nonnull
+ format.chapter.pages output
+ }
+ if$
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {inproceedings}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.title "title" output.check
+ new.block
+ crossref missing$
+ { format.in.ed.booktitle "booktitle" output.check
+ format.bvolume output
+ format.number.series output
+ format.pages output
+ address empty$
+ { organization publisher new.sentence.checkb
+ organization output
+ publisher output
+ format.date "year" output.check
+ }
+ { address output.nonnull
+ format.date "year" output.check
+ new.sentence
+ organization output
+ publisher output
+ }
+ if$
+ }
+ { format.incoll.inproc.crossref output.nonnull
+ format.pages output
+ }
+ if$
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {conference} { inproceedings }
+
+FUNCTION {manual}
+{ output.bibitem
+ author empty$
+ { organization empty$
+ 'skip$
+ { organization output.nonnull
+ address output
+ }
+ if$
+ }
+ { format.authors output.nonnull }
+ if$
+ new.block
+ format.btitle "title" output.check
+ author empty$
+ { organization empty$
+ { address new.block.checka
+ address output
+ }
+ 'skip$
+ if$
+ }
+ { organization address new.block.checkb
+ organization output
+ address output
+ }
+ if$
+ format.edition output
+ format.date output
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {mastersthesis}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.title "title" output.check
+ new.block
+ "Examensarbete" format.thesis.type output.nonnull
+ school "school" output.check
+ address output
+ format.date "year" output.check
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {misc}
+{ output.bibitem
+ format.authors output
+ title howpublished new.block.checkb
+ format.title output
+ howpublished new.block.checka
+ howpublished output
+ format.date output
+ new.block
+ note output
+ fin.entry
+ empty.misc.check
+}
+
+FUNCTION {phdthesis}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.btitle "title" output.check
+ new.block
+ "Doktorsavhandling" format.thesis.type output.nonnull
+ school "school" output.check
+ address output
+ format.date "year" output.check
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {proceedings}
+{ output.bibitem
+ editor empty$
+ { organization output }
+ { format.editors output.nonnull }
+ if$
+ new.block
+ format.btitle "title" output.check
+ format.bvolume output
+ format.number.series output
+ address empty$
+ { editor empty$
+ { publisher new.sentence.checka }
+ { organization publisher new.sentence.checkb
+ organization output
+ }
+ if$
+ publisher output
+ format.date "year" output.check
+ }
+ { address output.nonnull
+ format.date "year" output.check
+ new.sentence
+ editor empty$
+ 'skip$
+ { organization output }
+ if$
+ publisher output
+ }
+ if$
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {techreport}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.title "title" output.check
+ new.block
+ format.tr.number output.nonnull
+ institution "institution" output.check
+ address output
+ format.date "year" output.check
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {unpublished}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.title "title" output.check
+ new.block
+ note "note" output.check
+ format.date output
+ fin.entry
+}
+
+FUNCTION {default.type} { misc }
+
+MACRO {jan} {"jan."}
+
+MACRO {feb} {"febr."}
+
+MACRO {mar} {"mars"}
+
+MACRO {apr} {"april"}
+
+MACRO {may} {"maj"}
+
+MACRO {jun} {"juni"}
+
+MACRO {jul} {"juli"}
+
+MACRO {aug} {"aug."}
+
+MACRO {sep} {"sept."}
+
+MACRO {oct} {"okt."}
+
+MACRO {nov} {"nov."}
+
+MACRO {dec} {"dec."}
+
+MACRO {acmcs} {"ACM Comput. Surv."}
+
+MACRO {acta} {"Acta Inf."}
+
+MACRO {cacm} {"Commun. ACM"}
+
+MACRO {ibmjrd} {"IBM J. Res. Dev."}
+
+MACRO {ibmsj} {"IBM Syst.~J."}
+
+MACRO {ieeese} {"IEEE Trans. Softw. Eng."}
+
+MACRO {ieeetc} {"IEEE Trans. Comput."}
+
+MACRO {ieeetcad}
+ {"IEEE Trans. Comput.-Aided Design Integrated Circuits"}
+
+MACRO {ipl} {"Inf. Process. Lett."}
+
+MACRO {jacm} {"J.~ACM"}
+
+MACRO {jcss} {"J.~Comput. Syst. Sci."}
+
+MACRO {scp} {"Sci. Comput. Programming"}
+
+MACRO {sicomp} {"SIAM J. Comput."}
+
+MACRO {tocs} {"ACM Trans. Comput. Syst."}
+
+MACRO {tods} {"ACM Trans. Database Syst."}
+
+MACRO {tog} {"ACM Trans. Gr."}
+
+MACRO {toms} {"ACM Trans. Math. Softw."}
+
+MACRO {toois} {"ACM Trans. Office Inf. Syst."}
+
+MACRO {toplas} {"ACM Trans. Prog. Lang. Syst."}
+
+MACRO {tcs} {"Theoretical Comput. Sci."}
+
+READ
+
+FUNCTION {sortify}
+{ purify$
+ "l" change.case$
+}
+
+INTEGERS { len }
+
+FUNCTION {chop.word}
+{ 's :=
+ 'len :=
+ s #1 len substring$ =
+ { s len #1 + global.max$ substring$ }
+ 's
+ if$
+}
+
+FUNCTION {sort.format.names}
+{ 's :=
+ #1 'nameptr :=
+ ""
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ { nameptr #1 >
+ { " " * }
+ 'skip$
+ if$
+ s nameptr "{vv{ } }{ll{ }}{ f{ }}{ jj{ }}" format.name$ 't :=
+ nameptr numnames = t "others" = and
+ { "et al" * }
+ { t sortify * }
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+}
+
+FUNCTION {sort.format.title}
+{ 't :=
+ "A " #2
+ "An " #3
+ "The " #4 t chop.word
+ chop.word
+ chop.word
+ sortify
+ #1 global.max$ substring$
+}
+
+FUNCTION {author.sort}
+{ author empty$
+ { key empty$
+ { "to sort, need author or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { author sort.format.names }
+ if$
+}
+
+FUNCTION {author.editor.sort}
+{ author empty$
+ { editor empty$
+ { key empty$
+ { "to sort, need author, editor, or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { editor sort.format.names }
+ if$
+ }
+ { author sort.format.names }
+ if$
+}
+
+FUNCTION {author.organization.sort}
+{ author empty$
+ { organization empty$
+ { key empty$
+ { "to sort, need author, organization, or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { "The " #4 organization chop.word sortify }
+ if$
+ }
+ { author sort.format.names }
+ if$
+}
+
+FUNCTION {editor.organization.sort}
+{ editor empty$
+ { organization empty$
+ { key empty$
+ { "to sort, need editor, organization, or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { "The " #4 organization chop.word sortify }
+ if$
+ }
+ { editor sort.format.names }
+ if$
+}
+
+FUNCTION {presort}
+{ type$ "book" =
+ type$ "inbook" =
+ or
+ 'author.editor.sort
+ { type$ "proceedings" =
+ 'editor.organization.sort
+ { type$ "manual" =
+ 'author.organization.sort
+ 'author.sort
+ if$
+ }
+ if$
+ }
+ if$
+ " "
+ *
+ year field.or.null sortify
+ *
+ " "
+ *
+ title field.or.null
+ sort.format.title
+ *
+ #1 entry.max$ substring$
+ 'sort.key$ :=
+}
+
+ITERATE {presort}
+
+SORT
+
+STRINGS { longest.label }
+
+INTEGERS { number.label longest.label.width }
+
+FUNCTION {initialize.longest.label}
+{ "" 'longest.label :=
+ #1 'number.label :=
+ #0 'longest.label.width :=
+}
+
+FUNCTION {longest.label.pass}
+{ number.label int.to.str$ 'label :=
+ number.label #1 + 'number.label :=
+ label width$ longest.label.width >
+ { label 'longest.label :=
+ label width$ 'longest.label.width :=
+ }
+ 'skip$
+ if$
+}
+
+EXECUTE {initialize.longest.label}
+
+ITERATE {longest.label.pass}
+
+FUNCTION {begin.bib}
+{ preamble$ empty$
+ 'skip$
+ { preamble$ write$ newline$ }
+ if$
+ "\begin{thebibliography}{" longest.label * "}" * write$ newline$
+}
+
+EXECUTE {begin.bib}
+
+EXECUTE {init.state.consts}
+
+ITERATE {call.type$}
+
+FUNCTION {end.bib}
+{ newline$
+ "\end{thebibliography}" write$ newline$
+}
+
+EXECUTE {end.bib}
diff --git a/biblio/bibtex/contrib/swebib/swealpha.bst b/biblio/bibtex/contrib/swebib/swealpha.bst
new file mode 100644
index 0000000000..bf42b0794e
--- /dev/null
+++ b/biblio/bibtex/contrib/swebib/swealpha.bst
@@ -0,0 +1,1257 @@
+%% swealpha.bst (Swedish version of BibTeX standard bibliography style `alpha')
+%% Copyright 2003 Lars Engebretsen
+%
+% This program may be distributed and/or modified under the
+% conditions of the LaTeX Project Public License, either version 1.2
+% of this license or (at your option) any later version.
+% The latest version of this license is in
+% http://www.latex-project.org/lppl.txt
+% and version 1.2 or later is part of all distributions of LaTeX
+% version 1999/12/01 or later.
+%
+% This program consists of the files sweabbrv.bst, swealpha.bst,
+% sweplain.bst, sweplnat.bst, and sweunsrt.bst
+
+ENTRY
+ { address
+ author
+ booktitle
+ chapter
+ edition
+ editor
+ howpublished
+ institution
+ journal
+ key
+ month
+ note
+ number
+ organization
+ pages
+ publisher
+ school
+ series
+ title
+ type
+ volume
+ year
+ }
+ {}
+ { label extra.label sort.label }
+
+INTEGERS { output.state before.all mid.sentence after.sentence after.block }
+
+FUNCTION {init.state.consts}
+{ #0 'before.all :=
+ #1 'mid.sentence :=
+ #2 'after.sentence :=
+ #3 'after.block :=
+}
+
+STRINGS { s t }
+
+FUNCTION {output.nonnull}
+{ 's :=
+ output.state mid.sentence =
+ { ", " * write$ }
+ { output.state after.block =
+ { add.period$ write$
+ newline$
+ "\newblock " write$
+ }
+ { output.state before.all =
+ 'write$
+ { add.period$ " " * write$ }
+ if$
+ }
+ if$
+ mid.sentence 'output.state :=
+ }
+ if$
+ s
+}
+
+FUNCTION {output}
+{ duplicate$ empty$
+ 'pop$
+ 'output.nonnull
+ if$
+}
+
+FUNCTION {output.check}
+{ 't :=
+ duplicate$ empty$
+ { pop$ "empty " t * " in " * cite$ * warning$ }
+ 'output.nonnull
+ if$
+}
+
+FUNCTION {output.bibitem}
+{ newline$
+ "\bibitem[" write$
+ label write$
+ "]{" write$
+ cite$ write$
+ "}" write$
+ newline$
+ ""
+ before.all 'output.state :=
+}
+
+FUNCTION {fin.entry}
+{ add.period$
+ write$
+ newline$
+}
+
+FUNCTION {new.block}
+{ output.state before.all =
+ 'skip$
+ { after.block 'output.state := }
+ if$
+}
+
+FUNCTION {new.sentence}
+{ output.state after.block =
+ 'skip$
+ { output.state before.all =
+ 'skip$
+ { after.sentence 'output.state := }
+ if$
+ }
+ if$
+}
+
+FUNCTION {not}
+{ { #0 }
+ { #1 }
+ if$
+}
+
+FUNCTION {and}
+{ 'skip$
+ { pop$ #0 }
+ if$
+}
+
+FUNCTION {or}
+{ { pop$ #1 }
+ 'skip$
+ if$
+}
+
+FUNCTION {new.block.checka}
+{ empty$
+ 'skip$
+ 'new.block
+ if$
+}
+
+FUNCTION {new.block.checkb}
+{ empty$
+ swap$ empty$
+ and
+ 'skip$
+ 'new.block
+ if$
+}
+
+FUNCTION {new.sentence.checka}
+{ empty$
+ 'skip$
+ 'new.sentence
+ if$
+}
+
+FUNCTION {new.sentence.checkb}
+{ empty$
+ swap$ empty$
+ and
+ 'skip$
+ 'new.sentence
+ if$
+}
+
+FUNCTION {field.or.null}
+{ duplicate$ empty$
+ { pop$ "" }
+ 'skip$
+ if$
+}
+
+FUNCTION {emphasize}
+{ duplicate$ empty$
+ { pop$ "" }
+ { "{\em " swap$ * "}" * }
+ if$
+}
+
+INTEGERS { nameptr namesleft numnames }
+
+FUNCTION {format.names}
+{ 's :=
+ #1 'nameptr :=
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ { s nameptr "{ff~}{vv~}{ll}{, jj}" format.name$ 't :=
+ nameptr #1 >
+ { namesleft #1 >
+ { ", " * t * }
+ { t "others" =
+ { " m.fl." * }
+ { " och " * t * }
+ if$
+ }
+ if$
+ }
+ 't
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+}
+
+FUNCTION {format.authors}
+{ author empty$
+ { "" }
+ { author format.names }
+ if$
+}
+
+FUNCTION {format.editors}
+{ editor empty$
+ { "" }
+ { editor format.names
+ editor num.names$ #1 >
+ { ", redakt\" * quote$ * "orer" * }
+ { ", redakt\" * quote$ * "or" * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.title}
+{ title empty$
+ { "" }
+ { title "t" change.case$ }
+ if$
+}
+
+FUNCTION {n.dashify}
+{ 't :=
+ ""
+ { t empty$ not }
+ { t #1 #1 substring$ "-" =
+ { t #1 #2 substring$ "--" = not
+ { "--" *
+ t #2 global.max$ substring$ 't :=
+ }
+ { { t #1 #1 substring$ "-" = }
+ { "-" *
+ t #2 global.max$ substring$ 't :=
+ }
+ while$
+ }
+ if$
+ }
+ { t #1 #1 substring$ *
+ t #2 global.max$ substring$ 't :=
+ }
+ if$
+ }
+ while$
+}
+
+FUNCTION {format.date}
+{ year empty$
+ { month empty$
+ { "" }
+ { "there's a month but no year in " cite$ * warning$
+ month
+ }
+ if$
+ }
+ { month empty$
+ 'year
+ { month " " * year * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.btitle}
+{ title emphasize
+}
+
+FUNCTION {tie.or.space.connect}
+{ duplicate$ text.length$ #3 <
+ { "~" }
+ { " " }
+ if$
+ swap$ * *
+}
+
+FUNCTION {either.or.check}
+{ empty$
+ 'pop$
+ { "can't use both " swap$ * " fields in " * cite$ * warning$ }
+ if$
+}
+
+FUNCTION {format.bvolume}
+{ volume empty$
+ { "" }
+ { "band" volume tie.or.space.connect
+ series empty$
+ 'skip$
+ { " av " * series emphasize * }
+ if$
+ "volume and number" number either.or.check
+ }
+ if$
+}
+
+FUNCTION {format.number.series}
+{ volume empty$
+ { number empty$
+ { series field.or.null }
+ { output.state mid.sentence =
+ { "nummer" }
+ { "Nummer" }
+ if$
+ number tie.or.space.connect
+ series empty$
+ { "there's a number but no series in " cite$ * warning$ }
+ { " i " * series * }
+ if$
+ }
+ if$
+ }
+ { "" }
+ if$
+}
+
+FUNCTION {format.edition}
+{ edition empty$
+ { "" }
+ { output.state mid.sentence =
+ { edition "l" change.case$ " utg\aa van" * }
+ { edition "t" change.case$ " utg\aa van" * }
+ if$
+ }
+ if$
+}
+
+INTEGERS { multiresult }
+
+FUNCTION {multi.page.check}
+{ 't :=
+ #0 'multiresult :=
+ { multiresult not
+ t empty$ not
+ and
+ }
+ { t #1 #1 substring$
+ duplicate$ "-" =
+ swap$ duplicate$ "," =
+ swap$ "+" =
+ or or
+ { #1 'multiresult := }
+ { t #2 global.max$ substring$ 't := }
+ if$
+ }
+ while$
+ multiresult
+}
+
+FUNCTION {format.pages}
+{ pages empty$
+ { "" }
+ { pages multi.page.check
+ { "ss" pages n.dashify tie.or.space.connect }
+ { "s" pages tie.or.space.connect }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.vol.num.pages}
+{ volume field.or.null
+ number empty$
+ 'skip$
+ { "(" number * ")" * *
+ volume empty$
+ { "there's a number but no volume in " cite$ * warning$ }
+ 'skip$
+ if$
+ }
+ if$
+ pages empty$
+ 'skip$
+ { duplicate$ empty$
+ { pop$ format.pages }
+ { ":" * pages n.dashify * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.chapter.pages}
+{ chapter empty$
+ 'format.pages
+ { type empty$
+ { "kapitel" }
+ { type "l" change.case$ }
+ if$
+ chapter tie.or.space.connect
+ pages empty$
+ 'skip$
+ { ", " * format.pages * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.in.ed.booktitle}
+{ booktitle empty$
+ { "" }
+ { editor empty$
+ { "I: " booktitle emphasize * }
+ { "I: " format.editors * ", " * booktitle emphasize * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {empty.misc.check}
+{ author empty$ title empty$ howpublished empty$
+ month empty$ year empty$ note empty$
+ and and and and and
+ key empty$ not and
+ { "all relevant fields are empty in " cite$ * warning$ }
+ 'skip$
+ if$
+}
+
+FUNCTION {format.thesis.type}
+{ type empty$
+ 'skip$
+ { pop$
+ type "t" change.case$
+ }
+ if$
+}
+
+FUNCTION {format.tr.number}
+{ type empty$
+ { "Teknisk rapport" }
+ 'type
+ if$
+ number empty$
+ { "t" change.case$ }
+ { number tie.or.space.connect }
+ if$
+}
+
+FUNCTION {format.article.crossref}
+{ key empty$
+ { journal empty$
+ { "need key or journal for " cite$ * " to crossref " * crossref *
+ warning$
+ ""
+ }
+ { "I: {\em " journal * "\/}" * }
+ if$
+ }
+ { "I: " key * }
+ if$
+ " \cite{" * crossref * "}" *
+}
+
+FUNCTION {format.crossref.editor}
+{ editor #1 "{vv~}{ll}" format.name$
+ editor num.names$ duplicate$
+ #2 >
+ { pop$ " et~al." * }
+ { #2 <
+ 'skip$
+ { editor #2 "{ff }{vv }{ll}{ jj}" format.name$ "others" =
+ { " m.fl." * }
+ { " och " * editor #2 "{vv~}{ll}" format.name$ * }
+ if$
+ }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.book.crossref}
+{ volume empty$
+ { "empty volume in " cite$ * "'s crossref of " * crossref * warning$
+ "I: "
+ }
+ { "Band" volume tie.or.space.connect
+ " av " *
+ }
+ if$
+ editor empty$
+ editor field.or.null author field.or.null =
+ or
+ { key empty$
+ { series empty$
+ { "need editor, key, or series for " cite$ * " to crossref " *
+ crossref * warning$
+ "" *
+ }
+ { "{\em " * series * "\/}" * }
+ if$
+ }
+ { key * }
+ if$
+ }
+ { format.crossref.editor * }
+ if$
+ " \cite{" * crossref * "}" *
+}
+
+FUNCTION {format.incoll.inproc.crossref}
+{ editor empty$
+ editor field.or.null author field.or.null =
+ or
+ { key empty$
+ { booktitle empty$
+ { "need editor, key, or booktitle for " cite$ * " to crossref " *
+ crossref * warning$
+ ""
+ }
+ { "I: {\em " booktitle * "\/}" * }
+ if$
+ }
+ { "I: " key * }
+ if$
+ }
+ { "I: " format.crossref.editor * }
+ if$
+ " \cite{" * crossref * "}" *
+}
+
+FUNCTION {article}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.title "title" output.check
+ new.block
+ crossref missing$
+ { journal emphasize "journal" output.check
+ format.vol.num.pages output
+ format.date "year" output.check
+ }
+ { format.article.crossref output.nonnull
+ format.pages output
+ }
+ if$
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {book}
+{ output.bibitem
+ author empty$
+ { format.editors "author and editor" output.check }
+ { format.authors output.nonnull
+ crossref missing$
+ { "author and editor" editor either.or.check }
+ 'skip$
+ if$
+ }
+ if$
+ new.block
+ format.btitle "title" output.check
+ crossref missing$
+ { format.bvolume output
+ new.block
+ format.number.series output
+ new.sentence
+ publisher "publisher" output.check
+ address output
+ }
+ { new.block
+ format.book.crossref output.nonnull
+ }
+ if$
+ format.edition output
+ format.date "year" output.check
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {booklet}
+{ output.bibitem
+ format.authors output
+ new.block
+ format.title "title" output.check
+ howpublished address new.block.checkb
+ howpublished output
+ address output
+ format.date output
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {inbook}
+{ output.bibitem
+ author empty$
+ { format.editors "author and editor" output.check }
+ { format.authors output.nonnull
+ crossref missing$
+ { "author and editor" editor either.or.check }
+ 'skip$
+ if$
+ }
+ if$
+ new.block
+ format.btitle "title" output.check
+ crossref missing$
+ { format.bvolume output
+ format.chapter.pages "chapter and pages" output.check
+ new.block
+ format.number.series output
+ new.sentence
+ publisher "publisher" output.check
+ address output
+ }
+ { format.chapter.pages "chapter and pages" output.check
+ new.block
+ format.book.crossref output.nonnull
+ }
+ if$
+ format.edition output
+ format.date "year" output.check
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {incollection}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.title "title" output.check
+ new.block
+ crossref missing$
+ { format.in.ed.booktitle "booktitle" output.check
+ format.bvolume output
+ format.number.series output
+ format.chapter.pages output
+ new.sentence
+ publisher "publisher" output.check
+ address output
+ format.edition output
+ format.date "year" output.check
+ }
+ { format.incoll.inproc.crossref output.nonnull
+ format.chapter.pages output
+ }
+ if$
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {inproceedings}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.title "title" output.check
+ new.block
+ crossref missing$
+ { format.in.ed.booktitle "booktitle" output.check
+ format.bvolume output
+ format.number.series output
+ format.pages output
+ address empty$
+ { organization publisher new.sentence.checkb
+ organization output
+ publisher output
+ format.date "year" output.check
+ }
+ { address output.nonnull
+ format.date "year" output.check
+ new.sentence
+ organization output
+ publisher output
+ }
+ if$
+ }
+ { format.incoll.inproc.crossref output.nonnull
+ format.pages output
+ }
+ if$
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {conference} { inproceedings }
+
+FUNCTION {manual}
+{ output.bibitem
+ author empty$
+ { organization empty$
+ 'skip$
+ { organization output.nonnull
+ address output
+ }
+ if$
+ }
+ { format.authors output.nonnull }
+ if$
+ new.block
+ format.btitle "title" output.check
+ author empty$
+ { organization empty$
+ { address new.block.checka
+ address output
+ }
+ 'skip$
+ if$
+ }
+ { organization address new.block.checkb
+ organization output
+ address output
+ }
+ if$
+ format.edition output
+ format.date output
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {mastersthesis}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.title "title" output.check
+ new.block
+ "Examensarbete" format.thesis.type output.nonnull
+ school "school" output.check
+ address output
+ format.date "year" output.check
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {misc}
+{ output.bibitem
+ format.authors output
+ title howpublished new.block.checkb
+ format.title output
+ howpublished new.block.checka
+ howpublished output
+ format.date output
+ new.block
+ note output
+ fin.entry
+ empty.misc.check
+}
+
+FUNCTION {phdthesis}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.btitle "title" output.check
+ new.block
+ "Doktorsavhandling" format.thesis.type output.nonnull
+ school "school" output.check
+ address output
+ format.date "year" output.check
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {proceedings}
+{ output.bibitem
+ editor empty$
+ { organization output }
+ { format.editors output.nonnull }
+ if$
+ new.block
+ format.btitle "title" output.check
+ format.bvolume output
+ format.number.series output
+ address empty$
+ { editor empty$
+ { publisher new.sentence.checka }
+ { organization publisher new.sentence.checkb
+ organization output
+ }
+ if$
+ publisher output
+ format.date "year" output.check
+ }
+ { address output.nonnull
+ format.date "year" output.check
+ new.sentence
+ editor empty$
+ 'skip$
+ { organization output }
+ if$
+ publisher output
+ }
+ if$
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {techreport}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.title "title" output.check
+ new.block
+ format.tr.number output.nonnull
+ institution "institution" output.check
+ address output
+ format.date "year" output.check
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {unpublished}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.title "title" output.check
+ new.block
+ note "note" output.check
+ format.date output
+ fin.entry
+}
+
+FUNCTION {default.type} { misc }
+
+MACRO {jan} {"januari"}
+
+MACRO {feb} {"februari"}
+
+MACRO {mar} {"mars"}
+
+MACRO {apr} {"april"}
+
+MACRO {may} {"maj"}
+
+MACRO {jun} {"juni"}
+
+MACRO {jul} {"juli"}
+
+MACRO {aug} {"augusti"}
+
+MACRO {sep} {"september"}
+
+MACRO {oct} {"oktober"}
+
+MACRO {nov} {"november"}
+
+MACRO {dec} {"december"}
+
+MACRO {acmcs} {"ACM Computing Surveys"}
+
+MACRO {acta} {"Acta Informatica"}
+
+MACRO {cacm} {"Communications of the ACM"}
+
+MACRO {ibmjrd} {"IBM Journal of Research and Development"}
+
+MACRO {ibmsj} {"IBM Systems Journal"}
+
+MACRO {ieeese} {"IEEE Transactions on Software Engineering"}
+
+MACRO {ieeetc} {"IEEE Transactions on Computers"}
+
+MACRO {ieeetcad}
+ {"IEEE Transactions on Computer-Aided Design of Integrated Circuits"}
+
+MACRO {ipl} {"Information Processing Letters"}
+
+MACRO {jacm} {"Journal of the ACM"}
+
+MACRO {jcss} {"Journal of Computer and System Sciences"}
+
+MACRO {scp} {"Science of Computer Programming"}
+
+MACRO {sicomp} {"SIAM Journal on Computing"}
+
+MACRO {tocs} {"ACM Transactions on Computer Systems"}
+
+MACRO {tods} {"ACM Transactions on Database Systems"}
+
+MACRO {tog} {"ACM Transactions on Graphics"}
+
+MACRO {toms} {"ACM Transactions on Mathematical Software"}
+
+MACRO {toois} {"ACM Transactions on Office Information Systems"}
+
+MACRO {toplas} {"ACM Transactions on Programming Languages and Systems"}
+
+MACRO {tcs} {"Theoretical Computer Science"}
+
+READ
+
+FUNCTION {sortify}
+{ purify$
+ "l" change.case$
+}
+
+INTEGERS { len }
+
+FUNCTION {chop.word}
+{ 's :=
+ 'len :=
+ s #1 len substring$ =
+ { s len #1 + global.max$ substring$ }
+ 's
+ if$
+}
+
+INTEGERS { et.al.char.used }
+
+FUNCTION {initialize.et.al.char.used}
+{ #0 'et.al.char.used :=
+}
+
+EXECUTE {initialize.et.al.char.used}
+
+FUNCTION {format.lab.names}
+{ 's :=
+ s num.names$ 'numnames :=
+ numnames #1 >
+ { numnames #4 >
+ { #3 'namesleft := }
+ { numnames 'namesleft := }
+ if$
+ #1 'nameptr :=
+ ""
+ { namesleft #0 > }
+ { nameptr numnames =
+ { s nameptr "{ff }{vv }{ll}{ jj}" format.name$ "others" =
+ { "{\etalchar{+}}" *
+ #1 'et.al.char.used :=
+ }
+ { s nameptr "{v{}}{l{}}" format.name$ * }
+ if$
+ }
+ { s nameptr "{v{}}{l{}}" format.name$ * }
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+ numnames #4 >
+ { "{\etalchar{+}}" *
+ #1 'et.al.char.used :=
+ }
+ 'skip$
+ if$
+ }
+ { s #1 "{v{}}{l{}}" format.name$
+ duplicate$ text.length$ #2 <
+ { pop$ s #1 "{ll}" format.name$ #3 text.prefix$ }
+ 'skip$
+ if$
+ }
+ if$
+}
+
+FUNCTION {author.key.label}
+{ author empty$
+ { key empty$
+ { cite$ #1 #3 substring$ }
+ { key #3 text.prefix$ }
+ if$
+ }
+ { author format.lab.names }
+ if$
+}
+
+FUNCTION {author.editor.key.label}
+{ author empty$
+ { editor empty$
+ { key empty$
+ { cite$ #1 #3 substring$ }
+ { key #3 text.prefix$ }
+ if$
+ }
+ { editor format.lab.names }
+ if$
+ }
+ { author format.lab.names }
+ if$
+}
+
+FUNCTION {author.key.organization.label}
+{ author empty$
+ { key empty$
+ { organization empty$
+ { cite$ #1 #3 substring$ }
+ { "The " #4 organization chop.word #3 text.prefix$ }
+ if$
+ }
+ { key #3 text.prefix$ }
+ if$
+ }
+ { author format.lab.names }
+ if$
+}
+
+FUNCTION {editor.key.organization.label}
+{ editor empty$
+ { key empty$
+ { organization empty$
+ { cite$ #1 #3 substring$ }
+ { "The " #4 organization chop.word #3 text.prefix$ }
+ if$
+ }
+ { key #3 text.prefix$ }
+ if$
+ }
+ { editor format.lab.names }
+ if$
+}
+
+FUNCTION {calc.label}
+{ type$ "book" =
+ type$ "inbook" =
+ or
+ 'author.editor.key.label
+ { type$ "proceedings" =
+ 'editor.key.organization.label
+ { type$ "manual" =
+ 'author.key.organization.label
+ 'author.key.label
+ if$
+ }
+ if$
+ }
+ if$
+ duplicate$
+ year field.or.null purify$ #-1 #2 substring$
+ *
+ 'label :=
+ year field.or.null purify$ #-1 #4 substring$
+ *
+ sortify 'sort.label :=
+}
+
+FUNCTION {sort.format.names}
+{ 's :=
+ #1 'nameptr :=
+ ""
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ { nameptr #1 >
+ { " " * }
+ 'skip$
+ if$
+ s nameptr "{vv{ } }{ll{ }}{ ff{ }}{ jj{ }}" format.name$ 't :=
+ nameptr numnames = t "others" = and
+ { "et al" * }
+ { t sortify * }
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+}
+
+FUNCTION {sort.format.title}
+{ 't :=
+ "A " #2
+ "An " #3
+ "The " #4 t chop.word
+ chop.word
+ chop.word
+ sortify
+ #1 global.max$ substring$
+}
+
+FUNCTION {author.sort}
+{ author empty$
+ { key empty$
+ { "to sort, need author or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { author sort.format.names }
+ if$
+}
+
+FUNCTION {author.editor.sort}
+{ author empty$
+ { editor empty$
+ { key empty$
+ { "to sort, need author, editor, or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { editor sort.format.names }
+ if$
+ }
+ { author sort.format.names }
+ if$
+}
+
+FUNCTION {author.organization.sort}
+{ author empty$
+ { organization empty$
+ { key empty$
+ { "to sort, need author, organization, or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { "The " #4 organization chop.word sortify }
+ if$
+ }
+ { author sort.format.names }
+ if$
+}
+
+FUNCTION {editor.organization.sort}
+{ editor empty$
+ { organization empty$
+ { key empty$
+ { "to sort, need editor, organization, or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { "The " #4 organization chop.word sortify }
+ if$
+ }
+ { editor sort.format.names }
+ if$
+}
+
+FUNCTION {presort}
+{ calc.label
+ sort.label
+ " "
+ *
+ type$ "book" =
+ type$ "inbook" =
+ or
+ 'author.editor.sort
+ { type$ "proceedings" =
+ 'editor.organization.sort
+ { type$ "manual" =
+ 'author.organization.sort
+ 'author.sort
+ if$
+ }
+ if$
+ }
+ if$
+ *
+ " "
+ *
+ year field.or.null sortify
+ *
+ " "
+ *
+ title field.or.null
+ sort.format.title
+ *
+ #1 entry.max$ substring$
+ 'sort.key$ :=
+}
+
+ITERATE {presort}
+
+SORT
+
+STRINGS { longest.label last.sort.label next.extra }
+
+INTEGERS { longest.label.width last.extra.num }
+
+FUNCTION {initialize.longest.label}
+{ "" 'longest.label :=
+ #0 int.to.chr$ 'last.sort.label :=
+ "" 'next.extra :=
+ #0 'longest.label.width :=
+ #0 'last.extra.num :=
+}
+
+FUNCTION {forward.pass}
+{ last.sort.label sort.label =
+ { last.extra.num #1 + 'last.extra.num :=
+ last.extra.num int.to.chr$ 'extra.label :=
+ }
+ { "a" chr.to.int$ 'last.extra.num :=
+ "" 'extra.label :=
+ sort.label 'last.sort.label :=
+ }
+ if$
+}
+
+FUNCTION {reverse.pass}
+{ next.extra "b" =
+ { "a" 'extra.label := }
+ 'skip$
+ if$
+ label extra.label * 'label :=
+ label width$ longest.label.width >
+ { label 'longest.label :=
+ label width$ 'longest.label.width :=
+ }
+ 'skip$
+ if$
+ extra.label 'next.extra :=
+}
+
+EXECUTE {initialize.longest.label}
+
+ITERATE {forward.pass}
+
+REVERSE {reverse.pass}
+
+FUNCTION {begin.bib}
+{ et.al.char.used
+ { "\newcommand{\etalchar}[1]{$^{#1}$}" write$ newline$ }
+ 'skip$
+ if$
+ preamble$ empty$
+ 'skip$
+ { preamble$ write$ newline$ }
+ if$
+ "\begin{thebibliography}{" longest.label * "}" * write$ newline$
+}
+
+EXECUTE {begin.bib}
+
+EXECUTE {init.state.consts}
+
+ITERATE {call.type$}
+
+FUNCTION {end.bib}
+{ newline$
+ "\end{thebibliography}" write$ newline$
+}
+
+EXECUTE {end.bib}
diff --git a/biblio/bibtex/contrib/swebib/sweplain.bst b/biblio/bibtex/contrib/swebib/sweplain.bst
new file mode 100644
index 0000000000..575a1564d8
--- /dev/null
+++ b/biblio/bibtex/contrib/swebib/sweplain.bst
@@ -0,0 +1,1097 @@
+%% sweplain.bst (Swedish version of BibTeX standard bibliography style `plain')
+%% Copyright 2003 Lars Engebretsen
+%
+% This program may be distributed and/or modified under the
+% conditions of the LaTeX Project Public License, either version 1.2
+% of this license or (at your option) any later version.
+% The latest version of this license is in
+% http://www.latex-project.org/lppl.txt
+% and version 1.2 or later is part of all distributions of LaTeX
+% version 1999/12/01 or later.
+%
+% This program consists of the files sweabbrv.bst, swealpha.bst,
+% sweplain.bst, sweplnat.bst, and sweunsrt.bst
+
+ENTRY
+ { address
+ author
+ booktitle
+ chapter
+ edition
+ editor
+ howpublished
+ institution
+ journal
+ key
+ month
+ note
+ number
+ organization
+ pages
+ publisher
+ school
+ series
+ title
+ type
+ volume
+ year
+ }
+ {}
+ { label }
+
+INTEGERS { output.state before.all mid.sentence after.sentence after.block }
+
+FUNCTION {init.state.consts}
+{ #0 'before.all :=
+ #1 'mid.sentence :=
+ #2 'after.sentence :=
+ #3 'after.block :=
+}
+
+STRINGS { s t }
+
+FUNCTION {output.nonnull}
+{ 's :=
+ output.state mid.sentence =
+ { ", " * write$ }
+ { output.state after.block =
+ { add.period$ write$
+ newline$
+ "\newblock " write$
+ }
+ { output.state before.all =
+ 'write$
+ { add.period$ " " * write$ }
+ if$
+ }
+ if$
+ mid.sentence 'output.state :=
+ }
+ if$
+ s
+}
+
+FUNCTION {output}
+{ duplicate$ empty$
+ 'pop$
+ 'output.nonnull
+ if$
+}
+
+FUNCTION {output.check}
+{ 't :=
+ duplicate$ empty$
+ { pop$ "empty " t * " in " * cite$ * warning$ }
+ 'output.nonnull
+ if$
+}
+
+FUNCTION {output.bibitem}
+{ newline$
+ "\bibitem{" write$
+ cite$ write$
+ "}" write$
+ newline$
+ ""
+ before.all 'output.state :=
+}
+
+FUNCTION {fin.entry}
+{ add.period$
+ write$
+ newline$
+}
+
+FUNCTION {new.block}
+{ output.state before.all =
+ 'skip$
+ { after.block 'output.state := }
+ if$
+}
+
+FUNCTION {new.sentence}
+{ output.state after.block =
+ 'skip$
+ { output.state before.all =
+ 'skip$
+ { after.sentence 'output.state := }
+ if$
+ }
+ if$
+}
+
+FUNCTION {not}
+{ { #0 }
+ { #1 }
+ if$
+}
+
+FUNCTION {and}
+{ 'skip$
+ { pop$ #0 }
+ if$
+}
+
+FUNCTION {or}
+{ { pop$ #1 }
+ 'skip$
+ if$
+}
+
+FUNCTION {new.block.checka}
+{ empty$
+ 'skip$
+ 'new.block
+ if$
+}
+
+FUNCTION {new.block.checkb}
+{ empty$
+ swap$ empty$
+ and
+ 'skip$
+ 'new.block
+ if$
+}
+
+FUNCTION {new.sentence.checka}
+{ empty$
+ 'skip$
+ 'new.sentence
+ if$
+}
+
+FUNCTION {new.sentence.checkb}
+{ empty$
+ swap$ empty$
+ and
+ 'skip$
+ 'new.sentence
+ if$
+}
+
+FUNCTION {field.or.null}
+{ duplicate$ empty$
+ { pop$ "" }
+ 'skip$
+ if$
+}
+
+FUNCTION {emphasize}
+{ duplicate$ empty$
+ { pop$ "" }
+ { "{\em " swap$ * "}" * }
+ if$
+}
+
+INTEGERS { nameptr namesleft numnames }
+
+FUNCTION {format.names}
+{ 's :=
+ #1 'nameptr :=
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ { s nameptr "{ff~}{vv~}{ll}{, jj}" format.name$ 't :=
+ nameptr #1 >
+ { namesleft #1 >
+ { ", " * t * }
+ { t "others" =
+ { " m.fl." * }
+ { " och " * t * }
+ if$
+ }
+ if$
+ }
+ 't
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+}
+
+FUNCTION {format.authors}
+{ author empty$
+ { "" }
+ { author format.names }
+ if$
+}
+
+FUNCTION {format.editors}
+{ editor empty$
+ { "" }
+ { editor format.names
+ editor num.names$ #1 >
+ { ", redakt\" * quote$ * "orer" * }
+ { ", redakt\" * quote$ * "or" * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.title}
+{ title empty$
+ { "" }
+ { title "t" change.case$ }
+ if$
+}
+
+FUNCTION {n.dashify}
+{ 't :=
+ ""
+ { t empty$ not }
+ { t #1 #1 substring$ "-" =
+ { t #1 #2 substring$ "--" = not
+ { "--" *
+ t #2 global.max$ substring$ 't :=
+ }
+ { { t #1 #1 substring$ "-" = }
+ { "-" *
+ t #2 global.max$ substring$ 't :=
+ }
+ while$
+ }
+ if$
+ }
+ { t #1 #1 substring$ *
+ t #2 global.max$ substring$ 't :=
+ }
+ if$
+ }
+ while$
+}
+
+FUNCTION {format.date}
+{ year empty$
+ { month empty$
+ { "" }
+ { "there's a month but no year in " cite$ * warning$
+ month
+ }
+ if$
+ }
+ { month empty$
+ 'year
+ { month " " * year * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.btitle}
+{ title emphasize
+}
+
+FUNCTION {tie.or.space.connect}
+{ duplicate$ text.length$ #3 <
+ { "~" }
+ { " " }
+ if$
+ swap$ * *
+}
+
+FUNCTION {either.or.check}
+{ empty$
+ 'pop$
+ { "can't use both " swap$ * " fields in " * cite$ * warning$ }
+ if$
+}
+
+FUNCTION {format.bvolume}
+{ volume empty$
+ { "" }
+ { "band" volume tie.or.space.connect
+ series empty$
+ 'skip$
+ { " av " * series emphasize * }
+ if$
+ "volume and number" number either.or.check
+ }
+ if$
+}
+
+FUNCTION {format.number.series}
+{ volume empty$
+ { number empty$
+ { series field.or.null }
+ { output.state mid.sentence =
+ { "nummer" }
+ { "Nummer" }
+ if$
+ number tie.or.space.connect
+ series empty$
+ { "there's a number but no series in " cite$ * warning$ }
+ { " i " * series * }
+ if$
+ }
+ if$
+ }
+ { "" }
+ if$
+}
+
+FUNCTION {format.edition}
+{ edition empty$
+ { "" }
+ { output.state mid.sentence =
+ { edition "l" change.case$ " utg\aa van" * }
+ { edition "t" change.case$ " utg\aa van" * }
+ if$
+ }
+ if$
+}
+
+INTEGERS { multiresult }
+
+FUNCTION {multi.page.check}
+{ 't :=
+ #0 'multiresult :=
+ { multiresult not
+ t empty$ not
+ and
+ }
+ { t #1 #1 substring$
+ duplicate$ "-" =
+ swap$ duplicate$ "," =
+ swap$ "+" =
+ or or
+ { #1 'multiresult := }
+ { t #2 global.max$ substring$ 't := }
+ if$
+ }
+ while$
+ multiresult
+}
+
+FUNCTION {format.pages}
+{ pages empty$
+ { "" }
+ { pages multi.page.check
+ { "ss" pages n.dashify tie.or.space.connect }
+ { "s" pages tie.or.space.connect }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.vol.num.pages}
+{ volume field.or.null
+ number empty$
+ 'skip$
+ { "(" number * ")" * *
+ volume empty$
+ { "there's a number but no volume in " cite$ * warning$ }
+ 'skip$
+ if$
+ }
+ if$
+ pages empty$
+ 'skip$
+ { duplicate$ empty$
+ { pop$ format.pages }
+ { ":" * pages n.dashify * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.chapter.pages}
+{ chapter empty$
+ 'format.pages
+ { type empty$
+ { "kapitel" }
+ { type "l" change.case$ }
+ if$
+ chapter tie.or.space.connect
+ pages empty$
+ 'skip$
+ { ", " * format.pages * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.in.ed.booktitle}
+{ booktitle empty$
+ { "" }
+ { editor empty$
+ { "I: " booktitle emphasize * }
+ { "I: " format.editors * ", " * booktitle emphasize * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {empty.misc.check}
+{ author empty$ title empty$ howpublished empty$
+ month empty$ year empty$ note empty$
+ and and and and and
+ key empty$ not and
+ { "all relevant fields are empty in " cite$ * warning$ }
+ 'skip$
+ if$
+}
+
+FUNCTION {format.thesis.type}
+{ type empty$
+ 'skip$
+ { pop$
+ type "t" change.case$
+ }
+ if$
+}
+
+FUNCTION {format.tr.number}
+{ type empty$
+ { "Teknisk rapport" }
+ 'type
+ if$
+ number empty$
+ { "t" change.case$ }
+ { number tie.or.space.connect }
+ if$
+}
+
+FUNCTION {format.article.crossref}
+{ key empty$
+ { journal empty$
+ { "need key or journal for " cite$ * " to crossref " * crossref *
+ warning$
+ ""
+ }
+ { "I: {\em " journal * "\/}" * }
+ if$
+ }
+ { "I: " key * }
+ if$
+ " \cite{" * crossref * "}" *
+}
+
+FUNCTION {format.crossref.editor}
+{ editor #1 "{vv~}{ll}" format.name$
+ editor num.names$ duplicate$
+ #2 >
+ { pop$ " m.fl." * }
+ { #2 <
+ 'skip$
+ { editor #2 "{ff }{vv }{ll}{ jj}" format.name$ "others" =
+ { " m.fl." * }
+ { " och " * editor #2 "{vv~}{ll}" format.name$ * }
+ if$
+ }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.book.crossref}
+{ volume empty$
+ { "empty volume in " cite$ * "'s crossref of " * crossref * warning$
+ "I: "
+ }
+ { "Band" volume tie.or.space.connect
+ " av " *
+ }
+ if$
+ editor empty$
+ editor field.or.null author field.or.null =
+ or
+ { key empty$
+ { series empty$
+ { "need editor, key, or series for " cite$ * " to crossref " *
+ crossref * warning$
+ "" *
+ }
+ { "{\em " * series * "\/}" * }
+ if$
+ }
+ { key * }
+ if$
+ }
+ { format.crossref.editor * }
+ if$
+ " \cite{" * crossref * "}" *
+}
+
+FUNCTION {format.incoll.inproc.crossref}
+{ editor empty$
+ editor field.or.null author field.or.null =
+ or
+ { key empty$
+ { booktitle empty$
+ { "need editor, key, or booktitle for " cite$ * " to crossref " *
+ crossref * warning$
+ ""
+ }
+ { "I: {\em " booktitle * "\/}" * }
+ if$
+ }
+ { "I: " key * }
+ if$
+ }
+ { "I: " format.crossref.editor * }
+ if$
+ " \cite{" * crossref * "}" *
+}
+
+FUNCTION {article}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.title "title" output.check
+ new.block
+ crossref missing$
+ { journal emphasize "journal" output.check
+ format.vol.num.pages output
+ format.date "year" output.check
+ }
+ { format.article.crossref output.nonnull
+ format.pages output
+ }
+ if$
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {book}
+{ output.bibitem
+ author empty$
+ { format.editors "author and editor" output.check }
+ { format.authors output.nonnull
+ crossref missing$
+ { "author and editor" editor either.or.check }
+ 'skip$
+ if$
+ }
+ if$
+ new.block
+ format.btitle "title" output.check
+ crossref missing$
+ { format.bvolume output
+ new.block
+ format.number.series output
+ new.sentence
+ publisher "publisher" output.check
+ address output
+ }
+ { new.block
+ format.book.crossref output.nonnull
+ }
+ if$
+ format.edition output
+ format.date "year" output.check
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {booklet}
+{ output.bibitem
+ format.authors output
+ new.block
+ format.title "title" output.check
+ howpublished address new.block.checkb
+ howpublished output
+ address output
+ format.date output
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {inbook}
+{ output.bibitem
+ author empty$
+ { format.editors "author and editor" output.check }
+ { format.authors output.nonnull
+ crossref missing$
+ { "author and editor" editor either.or.check }
+ 'skip$
+ if$
+ }
+ if$
+ new.block
+ format.btitle "title" output.check
+ crossref missing$
+ { format.bvolume output
+ format.chapter.pages "chapter and pages" output.check
+ new.block
+ format.number.series output
+ new.sentence
+ publisher "publisher" output.check
+ address output
+ }
+ { format.chapter.pages "chapter and pages" output.check
+ new.block
+ format.book.crossref output.nonnull
+ }
+ if$
+ format.edition output
+ format.date "year" output.check
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {incollection}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.title "title" output.check
+ new.block
+ crossref missing$
+ { format.in.ed.booktitle "booktitle" output.check
+ format.bvolume output
+ format.number.series output
+ format.chapter.pages output
+ new.sentence
+ publisher "publisher" output.check
+ address output
+ format.edition output
+ format.date "year" output.check
+ }
+ { format.incoll.inproc.crossref output.nonnull
+ format.chapter.pages output
+ }
+ if$
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {inproceedings}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.title "title" output.check
+ new.block
+ crossref missing$
+ { format.in.ed.booktitle "booktitle" output.check
+ format.bvolume output
+ format.number.series output
+ format.pages output
+ address empty$
+ { organization publisher new.sentence.checkb
+ organization output
+ publisher output
+ format.date "year" output.check
+ }
+ { address output.nonnull
+ format.date "year" output.check
+ new.sentence
+ organization output
+ publisher output
+ }
+ if$
+ }
+ { format.incoll.inproc.crossref output.nonnull
+ format.pages output
+ }
+ if$
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {conference} { inproceedings }
+
+FUNCTION {manual}
+{ output.bibitem
+ author empty$
+ { organization empty$
+ 'skip$
+ { organization output.nonnull
+ address output
+ }
+ if$
+ }
+ { format.authors output.nonnull }
+ if$
+ new.block
+ format.btitle "title" output.check
+ author empty$
+ { organization empty$
+ { address new.block.checka
+ address output
+ }
+ 'skip$
+ if$
+ }
+ { organization address new.block.checkb
+ organization output
+ address output
+ }
+ if$
+ format.edition output
+ format.date output
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {mastersthesis}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.title "title" output.check
+ new.block
+ "Examensarbete" format.thesis.type output.nonnull
+ school "school" output.check
+ address output
+ format.date "year" output.check
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {misc}
+{ output.bibitem
+ format.authors output
+ title howpublished new.block.checkb
+ format.title output
+ howpublished new.block.checka
+ howpublished output
+ format.date output
+ new.block
+ note output
+ fin.entry
+ empty.misc.check
+}
+
+FUNCTION {phdthesis}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.btitle "title" output.check
+ new.block
+ "Doktorsavhandling" format.thesis.type output.nonnull
+ school "school" output.check
+ address output
+ format.date "year" output.check
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {proceedings}
+{ output.bibitem
+ editor empty$
+ { organization output }
+ { format.editors output.nonnull }
+ if$
+ new.block
+ format.btitle "title" output.check
+ format.bvolume output
+ format.number.series output
+ address empty$
+ { editor empty$
+ { publisher new.sentence.checka }
+ { organization publisher new.sentence.checkb
+ organization output
+ }
+ if$
+ publisher output
+ format.date "year" output.check
+ }
+ { address output.nonnull
+ format.date "year" output.check
+ new.sentence
+ editor empty$
+ 'skip$
+ { organization output }
+ if$
+ publisher output
+ }
+ if$
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {techreport}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.title "title" output.check
+ new.block
+ format.tr.number output.nonnull
+ institution "institution" output.check
+ address output
+ format.date "year" output.check
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {unpublished}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.title "title" output.check
+ new.block
+ note "note" output.check
+ format.date output
+ fin.entry
+}
+
+FUNCTION {default.type} { misc }
+
+MACRO {jan} {"januari"}
+
+MACRO {feb} {"februari"}
+
+MACRO {mar} {"mars"}
+
+MACRO {apr} {"april"}
+
+MACRO {may} {"maj"}
+
+MACRO {jun} {"juni"}
+
+MACRO {jul} {"juli"}
+
+MACRO {aug} {"augusti"}
+
+MACRO {sep} {"september"}
+
+MACRO {oct} {"oktober"}
+
+MACRO {nov} {"november"}
+
+MACRO {dec} {"december"}
+
+MACRO {acmcs} {"ACM Computing Surveys"}
+
+MACRO {acta} {"Acta Informatica"}
+
+MACRO {cacm} {"Communications of the ACM"}
+
+MACRO {ibmjrd} {"IBM Journal of Research and Development"}
+
+MACRO {ibmsj} {"IBM Systems Journal"}
+
+MACRO {ieeese} {"IEEE Transactions on Software Engineering"}
+
+MACRO {ieeetc} {"IEEE Transactions on Computers"}
+
+MACRO {ieeetcad}
+ {"IEEE Transactions on Computer-Aided Design of Integrated Circuits"}
+
+MACRO {ipl} {"Information Processing Letters"}
+
+MACRO {jacm} {"Journal of the ACM"}
+
+MACRO {jcss} {"Journal of Computer and System Sciences"}
+
+MACRO {scp} {"Science of Computer Programming"}
+
+MACRO {sicomp} {"SIAM Journal on Computing"}
+
+MACRO {tocs} {"ACM Transactions on Computer Systems"}
+
+MACRO {tods} {"ACM Transactions on Database Systems"}
+
+MACRO {tog} {"ACM Transactions on Graphics"}
+
+MACRO {toms} {"ACM Transactions on Mathematical Software"}
+
+MACRO {toois} {"ACM Transactions on Office Information Systems"}
+
+MACRO {toplas} {"ACM Transactions on Programming Languages and Systems"}
+
+MACRO {tcs} {"Theoretical Computer Science"}
+
+READ
+
+FUNCTION {sortify}
+{ purify$
+ "l" change.case$
+}
+
+INTEGERS { len }
+
+FUNCTION {chop.word}
+{ 's :=
+ 'len :=
+ s #1 len substring$ =
+ { s len #1 + global.max$ substring$ }
+ 's
+ if$
+}
+
+FUNCTION {sort.format.names}
+{ 's :=
+ #1 'nameptr :=
+ ""
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ { nameptr #1 >
+ { " " * }
+ 'skip$
+ if$
+ s nameptr "{vv{ } }{ll{ }}{ ff{ }}{ jj{ }}" format.name$ 't :=
+ nameptr numnames = t "others" = and
+ { "et al" * }
+ { t sortify * }
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+}
+
+FUNCTION {sort.format.title}
+{ 't :=
+ "A " #2
+ "An " #3
+ "The " #4 t chop.word
+ chop.word
+ chop.word
+ sortify
+ #1 global.max$ substring$
+}
+
+FUNCTION {author.sort}
+{ author empty$
+ { key empty$
+ { "to sort, need author or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { author sort.format.names }
+ if$
+}
+
+FUNCTION {author.editor.sort}
+{ author empty$
+ { editor empty$
+ { key empty$
+ { "to sort, need author, editor, or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { editor sort.format.names }
+ if$
+ }
+ { author sort.format.names }
+ if$
+}
+
+FUNCTION {author.organization.sort}
+{ author empty$
+ { organization empty$
+ { key empty$
+ { "to sort, need author, organization, or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { "The " #4 organization chop.word sortify }
+ if$
+ }
+ { author sort.format.names }
+ if$
+}
+
+FUNCTION {editor.organization.sort}
+{ editor empty$
+ { organization empty$
+ { key empty$
+ { "to sort, need editor, organization, or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { "The " #4 organization chop.word sortify }
+ if$
+ }
+ { editor sort.format.names }
+ if$
+}
+
+FUNCTION {presort}
+{ type$ "book" =
+ type$ "inbook" =
+ or
+ 'author.editor.sort
+ { type$ "proceedings" =
+ 'editor.organization.sort
+ { type$ "manual" =
+ 'author.organization.sort
+ 'author.sort
+ if$
+ }
+ if$
+ }
+ if$
+ " "
+ *
+ year field.or.null sortify
+ *
+ " "
+ *
+ title field.or.null
+ sort.format.title
+ *
+ #1 entry.max$ substring$
+ 'sort.key$ :=
+}
+
+ITERATE {presort}
+
+SORT
+
+STRINGS { longest.label }
+
+INTEGERS { number.label longest.label.width }
+
+FUNCTION {initialize.longest.label}
+{ "" 'longest.label :=
+ #1 'number.label :=
+ #0 'longest.label.width :=
+}
+
+FUNCTION {longest.label.pass}
+{ number.label int.to.str$ 'label :=
+ number.label #1 + 'number.label :=
+ label width$ longest.label.width >
+ { label 'longest.label :=
+ label width$ 'longest.label.width :=
+ }
+ 'skip$
+ if$
+}
+
+EXECUTE {initialize.longest.label}
+
+ITERATE {longest.label.pass}
+
+FUNCTION {begin.bib}
+{ preamble$ empty$
+ 'skip$
+ { preamble$ write$ newline$ }
+ if$
+ "\begin{thebibliography}{" longest.label * "}" * write$ newline$
+}
+
+EXECUTE {begin.bib}
+
+EXECUTE {init.state.consts}
+
+ITERATE {call.type$}
+
+FUNCTION {end.bib}
+{ newline$
+ "\end{thebibliography}" write$ newline$
+}
+
+EXECUTE {end.bib}
diff --git a/biblio/bibtex/contrib/swebib/sweplnat.bst b/biblio/bibtex/contrib/swebib/sweplnat.bst
new file mode 100644
index 0000000000..1631024fdc
--- /dev/null
+++ b/biblio/bibtex/contrib/swebib/sweplnat.bst
@@ -0,0 +1,1336 @@
+%% sweplnat.bst (Swedish version of BibTeX bibliography style `plainnat')
+%% Copyright 2004 Lars Engebretsen
+%
+% This program may be distributed and/or modified under the
+% conditions of the LaTeX Project Public License, either version 1.2
+% of this license or (at your option) any later version.
+% The latest version of this license is in
+% http://www.latex-project.org/lppl.txt
+% and version 1.2 or later is part of all distributions of LaTeX
+% version 1999/12/01 or later.
+%
+% This program consists of the files sweabbrv.bst, swealpha.bst,
+% sweplain.bst, sweplnat.bst, and sweunsrt.bst
+
+ENTRY
+ { address
+ author
+ booktitle
+ chapter
+ edition
+ editor
+ howpublished
+ institution
+ isbn
+ issn
+ journal
+ key
+ month
+ note
+ number
+ organization
+ pages
+ publisher
+ school
+ series
+ title
+ type
+ url
+ volume
+ year
+ }
+ {}
+ { label extra.label sort.label short.list }
+
+INTEGERS { output.state before.all mid.sentence after.sentence after.block }
+
+FUNCTION {init.state.consts}
+{ #0 'before.all :=
+ #1 'mid.sentence :=
+ #2 'after.sentence :=
+ #3 'after.block :=
+}
+
+STRINGS { s t }
+
+FUNCTION {output.nonnull}
+{ 's :=
+ output.state mid.sentence =
+ { ", " * write$ }
+ { output.state after.block =
+ { add.period$ write$
+ newline$
+ "\newblock " write$
+ }
+ { output.state before.all =
+ 'write$
+ { add.period$ " " * write$ }
+ if$
+ }
+ if$
+ mid.sentence 'output.state :=
+ }
+ if$
+ s
+}
+
+FUNCTION {output}
+{ duplicate$ empty$
+ 'pop$
+ 'output.nonnull
+ if$
+}
+
+FUNCTION {output.check}
+{ 't :=
+ duplicate$ empty$
+ { pop$ "empty " t * " in " * cite$ * warning$ }
+ 'output.nonnull
+ if$
+}
+
+FUNCTION {fin.entry}
+{ add.period$
+ write$
+ newline$
+}
+
+FUNCTION {new.block}
+{ output.state before.all =
+ 'skip$
+ { after.block 'output.state := }
+ if$
+}
+
+FUNCTION {new.sentence}
+{ output.state after.block =
+ 'skip$
+ { output.state before.all =
+ 'skip$
+ { after.sentence 'output.state := }
+ if$
+ }
+ if$
+}
+
+FUNCTION {not}
+{ { #0 }
+ { #1 }
+ if$
+}
+
+FUNCTION {and}
+{ 'skip$
+ { pop$ #0 }
+ if$
+}
+
+FUNCTION {or}
+{ { pop$ #1 }
+ 'skip$
+ if$
+}
+
+FUNCTION {new.block.checka}
+{ empty$
+ 'skip$
+ 'new.block
+ if$
+}
+
+FUNCTION {new.block.checkb}
+{ empty$
+ swap$ empty$
+ and
+ 'skip$
+ 'new.block
+ if$
+}
+
+FUNCTION {new.sentence.checka}
+{ empty$
+ 'skip$
+ 'new.sentence
+ if$
+}
+
+FUNCTION {new.sentence.checkb}
+{ empty$
+ swap$ empty$
+ and
+ 'skip$
+ 'new.sentence
+ if$
+}
+
+FUNCTION {field.or.null}
+{ duplicate$ empty$
+ { pop$ "" }
+ 'skip$
+ if$
+}
+
+FUNCTION {emphasize}
+{ duplicate$ empty$
+ { pop$ "" }
+ { "\emph{" swap$ * "}" * }
+ if$
+}
+
+INTEGERS { nameptr namesleft numnames }
+
+FUNCTION {format.names}
+{ 's :=
+ #1 'nameptr :=
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ { s nameptr "{vv~}{ll}{~jj}{, ff}" format.name$ 't :=
+ nameptr #1 >
+ { namesleft #1 >
+ { ", " * t * }
+ { numnames #2 >
+ { "," * }
+ 'skip$
+ if$
+ t "others" =
+ { " m.fl." * }
+ { " och " * t * }
+ if$
+ }
+ if$
+ }
+ 't
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+}
+
+FUNCTION {format.key}
+{ empty$
+ { key field.or.null }
+ { "" }
+ if$
+}
+
+FUNCTION {format.authors}
+{ author empty$
+ { "" }
+ { author format.names }
+ if$
+}
+
+FUNCTION {format.editors}
+{ editor empty$
+ { "" }
+ { editor format.names
+ editor num.names$ #1 >
+ { ", redakt\" * quote$ * "orer" * }
+ { ", redakt\" * quote$ * "or" * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.isbn}
+{ isbn empty$
+ { "" }
+ { new.block "ISBN " isbn * }
+ if$
+}
+
+FUNCTION {format.issn}
+{ issn empty$
+ { "" }
+ { new.block "ISSN " issn * }
+ if$
+}
+
+FUNCTION {format.url}
+{ url empty$
+ { "" }
+ { new.block "URL \url{" url * "}" * }
+ if$
+}
+
+FUNCTION {format.title}
+{ title empty$
+ { "" }
+ { title "t" change.case$ }
+ if$
+}
+
+FUNCTION {format.full.names}
+{'s :=
+ #1 'nameptr :=
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ { s nameptr
+ "{vv~}{ll}" format.name$ 't :=
+ nameptr #1 >
+ {
+ namesleft #1 >
+ { ", " * t * }
+ {
+ numnames #2 >
+ { "," * }
+ 'skip$
+ if$
+ t "others" =
+ { " m.fl." * }
+ { " och " * t * }
+ if$
+ }
+ if$
+ }
+ 't
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+}
+
+FUNCTION {author.editor.full}
+{ author empty$
+ { editor empty$
+ { "" }
+ { editor format.full.names }
+ if$
+ }
+ { author format.full.names }
+ if$
+}
+
+FUNCTION {author.full}
+{ author empty$
+ { "" }
+ { author format.full.names }
+ if$
+}
+
+FUNCTION {editor.full}
+{ editor empty$
+ { "" }
+ { editor format.full.names }
+ if$
+}
+
+FUNCTION {make.full.names}
+{ type$ "book" =
+ type$ "inbook" =
+ or
+ 'author.editor.full
+ { type$ "proceedings" =
+ 'editor.full
+ 'author.full
+ if$
+ }
+ if$
+}
+
+FUNCTION {output.bibitem}
+{ newline$
+ "\bibitem[" write$
+ label write$
+ ")" make.full.names duplicate$ short.list =
+ { pop$ }
+ { * }
+ if$
+ "]{" * write$
+ cite$ write$
+ "}" write$
+ newline$
+ ""
+ before.all 'output.state :=
+}
+
+FUNCTION {n.dashify}
+{ 't :=
+ ""
+ { t empty$ not }
+ { t #1 #1 substring$ "-" =
+ { t #1 #2 substring$ "--" = not
+ { "--" *
+ t #2 global.max$ substring$ 't :=
+ }
+ { { t #1 #1 substring$ "-" = }
+ { "-" *
+ t #2 global.max$ substring$ 't :=
+ }
+ while$
+ }
+ if$
+ }
+ { t #1 #1 substring$ *
+ t #2 global.max$ substring$ 't :=
+ }
+ if$
+ }
+ while$
+}
+
+FUNCTION {format.date}
+{ year duplicate$ empty$
+ { "empty year in " cite$ * warning$
+ pop$ "" }
+ 'skip$
+ if$
+ month empty$
+ 'skip$
+ { month
+ " " * swap$ *
+ }
+ if$
+ extra.label *
+}
+
+FUNCTION {format.btitle}
+{ title emphasize
+}
+
+FUNCTION {tie.or.space.connect}
+{ duplicate$ text.length$ #3 <
+ { "~" }
+ { " " }
+ if$
+ swap$ * *
+}
+
+FUNCTION {either.or.check}
+{ empty$
+ 'pop$
+ { "can't use both " swap$ * " fields in " * cite$ * warning$ }
+ if$
+}
+
+FUNCTION {format.bvolume}
+{ volume empty$
+ { "" }
+ { "band" volume tie.or.space.connect
+ series empty$
+ 'skip$
+ { " av " * series emphasize * }
+ if$
+ "volume and number" number either.or.check
+ }
+ if$
+}
+
+FUNCTION {format.number.series}
+{ volume empty$
+ { number empty$
+ { series field.or.null }
+ { output.state mid.sentence =
+ { "nummer" }
+ { "Nummer" }
+ if$
+ number tie.or.space.connect
+ series empty$
+ { "there's a number but no series in " cite$ * warning$ }
+ { " i " * series * }
+ if$
+ }
+ if$
+ }
+ { "" }
+ if$
+}
+
+FUNCTION {format.edition}
+{ edition empty$
+ { "" }
+ { output.state mid.sentence =
+ { edition "l" change.case$ " utg\aa van" * }
+ { edition "t" change.case$ " utg\aa van" * }
+ if$
+ }
+ if$
+}
+
+INTEGERS { multiresult }
+
+FUNCTION {multi.page.check}
+{ 't :=
+ #0 'multiresult :=
+ { multiresult not
+ t empty$ not
+ and
+ }
+ { t #1 #1 substring$
+ duplicate$ "-" =
+ swap$ duplicate$ "," =
+ swap$ "+" =
+ or or
+ { #1 'multiresult := }
+ { t #2 global.max$ substring$ 't := }
+ if$
+ }
+ while$
+ multiresult
+}
+
+FUNCTION {format.pages}
+{ pages empty$
+ { "" }
+ { pages multi.page.check
+ { "ss" pages n.dashify tie.or.space.connect }
+ { "s" pages tie.or.space.connect }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.vol.num.pages}
+{ volume field.or.null
+ number empty$
+ 'skip$
+ { "\penalty0 (" number * ")" * *
+ volume empty$
+ { "there's a number but no volume in " cite$ * warning$ }
+ 'skip$
+ if$
+ }
+ if$
+ pages empty$
+ 'skip$
+ { duplicate$ empty$
+ { pop$ format.pages }
+ { ":\penalty0 " * pages n.dashify * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.chapter.pages}
+{ chapter empty$
+ 'format.pages
+ { type empty$
+ { "kapitel" }
+ { type "l" change.case$ }
+ if$
+ chapter tie.or.space.connect
+ pages empty$
+ 'skip$
+ { ", " * format.pages * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.in.ed.booktitle}
+{ booktitle empty$
+ { "" }
+ { editor empty$
+ { "I: " booktitle emphasize * }
+ { "I: " format.editors * ", " * booktitle emphasize * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {empty.misc.check}
+{ author empty$ title empty$ howpublished empty$
+ month empty$ year empty$ note empty$
+ and and and and and
+ key empty$ not and
+ { "all relevant fields are empty in " cite$ * warning$ }
+ 'skip$
+ if$
+}
+
+FUNCTION {format.thesis.type}
+{ type empty$
+ 'skip$
+ { pop$
+ type "t" change.case$
+ }
+ if$
+}
+
+FUNCTION {format.tr.number}
+{ type empty$
+ { "Teknisk rapport" }
+ 'type
+ if$
+ number empty$
+ { "t" change.case$ }
+ { number tie.or.space.connect }
+ if$
+}
+
+FUNCTION {format.article.crossref}
+{ key empty$
+ { journal empty$
+ { "need key or journal for " cite$ * " to crossref " * crossref *
+ warning$
+ ""
+ }
+ { "I: {\em " journal * "\/}" * }
+ if$
+ }
+ { "I: " key * }
+ if$
+ " \citep{" * crossref * "}" *
+}
+
+FUNCTION {format.book.crossref}
+{ volume empty$
+ { "empty volume in " cite$ * "'s crossref of " * crossref * warning$
+ "I: "
+ }
+ { "Band" volume tie.or.space.connect
+ " av " *
+ }
+ if$
+ editor empty$
+ editor field.or.null author field.or.null =
+ or
+ { key empty$
+ { series empty$
+ { "need editor, key, or series for " cite$ * " to crossref " *
+ crossref * warning$
+ "" *
+ }
+ { "{\em " * series * "\/}" * }
+ if$
+ }
+ { key * }
+ if$
+ }
+ 'skip$
+ if$
+ ", \citet{" * crossref * "}" *
+}
+
+FUNCTION {format.incoll.inproc.crossref}
+{ editor empty$
+ editor field.or.null author field.or.null =
+ or
+ { key empty$
+ { booktitle empty$
+ { "need editor, key, or booktitle for " cite$ * " to crossref " *
+ crossref * warning$
+ ""
+ }
+ { "I: {\em " booktitle * "\/}" * }
+ if$
+ }
+ { "I: " key * }
+ if$
+ }
+ { "I: " }
+ if$
+ " \citet{" * crossref * "}" *
+}
+
+FUNCTION {article}
+{ output.bibitem
+ format.authors "author" output.check
+ author format.key output
+ new.block
+ format.title "title" output.check
+ new.block
+ crossref missing$
+ { journal emphasize "journal" output.check
+ format.vol.num.pages output
+ format.date "year" output.check
+ }
+ { format.article.crossref output.nonnull
+ format.pages output
+ }
+ if$
+ format.issn output
+ format.url output
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {book}
+{ output.bibitem
+ author empty$
+ { format.editors "author and editor" output.check
+ editor format.key output
+ }
+ { format.authors output.nonnull
+ crossref missing$
+ { "author and editor" editor either.or.check }
+ 'skip$
+ if$
+ }
+ if$
+ new.block
+ format.btitle "title" output.check
+ crossref missing$
+ { format.bvolume output
+ new.block
+ format.number.series output
+ new.sentence
+ publisher "publisher" output.check
+ address output
+ }
+ { new.block
+ format.book.crossref output.nonnull
+ }
+ if$
+ format.edition output
+ format.date "year" output.check
+ format.isbn output
+ format.url output
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {booklet}
+{ output.bibitem
+ format.authors output
+ author format.key output
+ new.block
+ format.title "title" output.check
+ howpublished address new.block.checkb
+ howpublished output
+ address output
+ format.date output
+ format.isbn output
+ format.url output
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {inbook}
+{ output.bibitem
+ author empty$
+ { format.editors "author and editor" output.check
+ editor format.key output
+ }
+ { format.authors output.nonnull
+ crossref missing$
+ { "author and editor" editor either.or.check }
+ 'skip$
+ if$
+ }
+ if$
+ new.block
+ format.btitle "title" output.check
+ crossref missing$
+ { format.bvolume output
+ format.chapter.pages "chapter and pages" output.check
+ new.block
+ format.number.series output
+ new.sentence
+ publisher "publisher" output.check
+ address output
+ }
+ { format.chapter.pages "chapter and pages" output.check
+ new.block
+ format.book.crossref output.nonnull
+ }
+ if$
+ format.edition output
+ format.date "year" output.check
+ format.isbn output
+ format.url output
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {incollection}
+{ output.bibitem
+ format.authors "author" output.check
+ author format.key output
+ new.block
+ format.title "title" output.check
+ new.block
+ crossref missing$
+ { format.in.ed.booktitle "booktitle" output.check
+ format.bvolume output
+ format.number.series output
+ format.chapter.pages output
+ new.sentence
+ publisher "publisher" output.check
+ address output
+ format.edition output
+ format.date "year" output.check
+ }
+ { format.incoll.inproc.crossref output.nonnull
+ format.chapter.pages output
+ }
+ if$
+ format.isbn output
+ format.url output
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {inproceedings}
+{ output.bibitem
+ format.authors "author" output.check
+ author format.key output
+ new.block
+ format.title "title" output.check
+ new.block
+ crossref missing$
+ { format.in.ed.booktitle "booktitle" output.check
+ format.bvolume output
+ format.number.series output
+ format.pages output
+ address empty$
+ { organization publisher new.sentence.checkb
+ organization output
+ publisher output
+ format.date "year" output.check
+ }
+ { address output.nonnull
+ format.date "year" output.check
+ new.sentence
+ organization output
+ publisher output
+ }
+ if$
+ }
+ { format.incoll.inproc.crossref output.nonnull
+ format.pages output
+ }
+ if$
+ format.isbn output
+ format.url output
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {conference} { inproceedings }
+
+FUNCTION {manual}
+{ output.bibitem
+ format.authors output
+ author format.key output
+ new.block
+ format.btitle "title" output.check
+ organization address new.block.checkb
+ organization output
+ address output
+ format.edition output
+ format.date output
+ format.url output
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {mastersthesis}
+{ output.bibitem
+ format.authors "author" output.check
+ author format.key output
+ new.block
+ format.title "title" output.check
+ new.block
+ "Examensarbete" format.thesis.type output.nonnull
+ school "school" output.check
+ address output
+ format.date "year" output.check
+ format.url output
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {misc}
+{ output.bibitem
+ format.authors output
+ author format.key output
+ title howpublished new.block.checkb
+ format.title output
+ howpublished new.block.checka
+ howpublished output
+ format.date output
+ format.issn output
+ format.url output
+ new.block
+ note output
+ fin.entry
+ empty.misc.check
+}
+
+FUNCTION {phdthesis}
+{ output.bibitem
+ format.authors "author" output.check
+ author format.key output
+ new.block
+ format.btitle "title" output.check
+ new.block
+ "Doktorsavhandling" format.thesis.type output.nonnull
+ school "school" output.check
+ address output
+ format.date "year" output.check
+ format.url output
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {proceedings}
+{ output.bibitem
+ format.editors output
+ editor format.key output
+ new.block
+ format.btitle "title" output.check
+ format.bvolume output
+ format.number.series output
+ address output
+ format.date "year" output.check
+ new.sentence
+ organization output
+ publisher output
+ format.isbn output
+ format.url output
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {techreport}
+{ output.bibitem
+ format.authors "author" output.check
+ author format.key output
+ new.block
+ format.title "title" output.check
+ new.block
+ format.tr.number output.nonnull
+ institution "institution" output.check
+ address output
+ format.date "year" output.check
+ format.url output
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {unpublished}
+{ output.bibitem
+ format.authors "author" output.check
+ author format.key output
+ new.block
+ format.title "title" output.check
+ format.url output
+ new.block
+ note "note" output.check
+ format.date output
+ fin.entry
+}
+
+FUNCTION {default.type} { misc }
+
+MACRO {jan} {"januari"}
+
+MACRO {feb} {"februari"}
+
+MACRO {mar} {"mars"}
+
+MACRO {apr} {"april"}
+
+MACRO {may} {"maj"}
+
+MACRO {jun} {"juni"}
+
+MACRO {jul} {"juli"}
+
+MACRO {aug} {"augusti"}
+
+MACRO {sep} {"september"}
+
+MACRO {oct} {"oktober"}
+
+MACRO {nov} {"november"}
+
+MACRO {dec} {"december"}
+
+MACRO {acmcs} {"ACM Computing Surveys"}
+
+MACRO {acta} {"Acta Informatica"}
+
+MACRO {cacm} {"Communications of the ACM"}
+
+MACRO {ibmjrd} {"IBM Journal of Research and Development"}
+
+MACRO {ibmsj} {"IBM Systems Journal"}
+
+MACRO {ieeese} {"IEEE Transactions on Software Engineering"}
+
+MACRO {ieeetc} {"IEEE Transactions on Computers"}
+
+MACRO {ieeetcad}
+ {"IEEE Transactions on Computer-Aided Design of Integrated Circuits"}
+
+MACRO {ipl} {"Information Processing Letters"}
+
+MACRO {jacm} {"Journal of the ACM"}
+
+MACRO {jcss} {"Journal of Computer and System Sciences"}
+
+MACRO {scp} {"Science of Computer Programming"}
+
+MACRO {sicomp} {"SIAM Journal on Computing"}
+
+MACRO {tocs} {"ACM Transactions on Computer Systems"}
+
+MACRO {tods} {"ACM Transactions on Database Systems"}
+
+MACRO {tog} {"ACM Transactions on Graphics"}
+
+MACRO {toms} {"ACM Transactions on Mathematical Software"}
+
+MACRO {toois} {"ACM Transactions on Office Information Systems"}
+
+MACRO {toplas} {"ACM Transactions on Programming Languages and Systems"}
+
+MACRO {tcs} {"Theoretical Computer Science"}
+
+READ
+
+FUNCTION {sortify}
+{ purify$
+ "l" change.case$
+}
+
+INTEGERS { len }
+
+FUNCTION {chop.word}
+{ 's :=
+ 'len :=
+ s #1 len substring$ =
+ { s len #1 + global.max$ substring$ }
+ 's
+ if$
+}
+
+FUNCTION {format.lab.names}
+{ 's :=
+ s #1 "{vv~}{ll}" format.name$
+ s num.names$ duplicate$
+ #2 >
+ { pop$ " m.fl." * }
+ { #2 <
+ 'skip$
+ { s #2 "{ff }{vv }{ll}{ jj}" format.name$ "others" =
+ { " m.fl." * }
+ { " och " * s #2 "{vv~}{ll}" format.name$ * }
+ if$
+ }
+ if$
+ }
+ if$
+}
+
+FUNCTION {author.key.label}
+{ author empty$
+ { key empty$
+ { cite$ #1 #3 substring$ }
+ 'key
+ if$
+ }
+ { author format.lab.names }
+ if$
+}
+
+FUNCTION {author.editor.key.label}
+{ author empty$
+ { editor empty$
+ { key empty$
+ { cite$ #1 #3 substring$ }
+ 'key
+ if$
+ }
+ { editor format.lab.names }
+ if$
+ }
+ { author format.lab.names }
+ if$
+}
+
+FUNCTION {author.key.organization.label}
+{ author empty$
+ { key empty$
+ { organization empty$
+ { cite$ #1 #3 substring$ }
+ { "The " #4 organization chop.word #3 text.prefix$ }
+ if$
+ }
+ 'key
+ if$
+ }
+ { author format.lab.names }
+ if$
+}
+
+FUNCTION {editor.key.organization.label}
+{ editor empty$
+ { key empty$
+ { organization empty$
+ { cite$ #1 #3 substring$ }
+ { "The " #4 organization chop.word #3 text.prefix$ }
+ if$
+ }
+ 'key
+ if$
+ }
+ { editor format.lab.names }
+ if$
+}
+
+FUNCTION {calc.short.authors}
+{ type$ "book" =
+ type$ "inbook" =
+ or
+ 'author.editor.key.label
+ { type$ "proceedings" =
+ 'editor.key.organization.label
+ { type$ "manual" =
+ 'author.key.organization.label
+ 'author.key.label
+ if$
+ }
+ if$
+ }
+ if$
+ 'short.list :=
+}
+
+FUNCTION {calc.label}
+{ calc.short.authors
+ short.list
+ "("
+ *
+ year duplicate$ empty$
+ short.list key field.or.null = or
+ { pop$ "" }
+ 'skip$
+ if$
+ *
+ 'label :=
+}
+
+FUNCTION {sort.format.names}
+{ 's :=
+ #1 'nameptr :=
+ ""
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ { nameptr #1 >
+ { " " * }
+ 'skip$
+ if$
+ s nameptr "{vv{ } }{ll{ }}{ ff{ }}{ jj{ }}" format.name$ 't :=
+ nameptr numnames = t "others" = and
+ { "m fl" * }
+ { t sortify * }
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+}
+
+FUNCTION {sort.format.title}
+{ 't :=
+ "A " #2
+ "An " #3
+ "The " #4 t chop.word
+ chop.word
+ chop.word
+ sortify
+ #1 global.max$ substring$
+}
+
+FUNCTION {author.sort}
+{ author empty$
+ { key empty$
+ { "to sort, need author or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { author sort.format.names }
+ if$
+}
+
+FUNCTION {author.editor.sort}
+{ author empty$
+ { editor empty$
+ { key empty$
+ { "to sort, need author, editor, or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { editor sort.format.names }
+ if$
+ }
+ { author sort.format.names }
+ if$
+}
+
+FUNCTION {author.organization.sort}
+{ author empty$
+ { organization empty$
+ { key empty$
+ { "to sort, need author, organization, or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { "The " #4 organization chop.word sortify }
+ if$
+ }
+ { author sort.format.names }
+ if$
+}
+
+FUNCTION {editor.organization.sort}
+{ editor empty$
+ { organization empty$
+ { key empty$
+ { "to sort, need editor, organization, or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { "The " #4 organization chop.word sortify }
+ if$
+ }
+ { editor sort.format.names }
+ if$
+}
+
+FUNCTION {presort}
+{ calc.label
+ label sortify
+ " "
+ *
+ type$ "book" =
+ type$ "inbook" =
+ or
+ 'author.editor.sort
+ { type$ "proceedings" =
+ 'editor.organization.sort
+ { type$ "manual" =
+ 'author.organization.sort
+ 'author.sort
+ if$
+ }
+ if$
+ }
+ if$
+ " "
+ *
+ year field.or.null sortify
+ *
+ " "
+ *
+ title field.or.null
+ sort.format.title
+ *
+ #1 entry.max$ substring$
+ 'sort.label :=
+ sort.label *
+ #1 entry.max$ substring$
+ 'sort.key$ :=
+}
+
+ITERATE {presort}
+
+SORT
+
+STRINGS { longest.label last.label next.extra }
+
+INTEGERS { longest.label.width last.extra.num number.label }
+
+FUNCTION {initialize.longest.label}
+{ "" 'longest.label :=
+ #0 int.to.chr$ 'last.label :=
+ "" 'next.extra :=
+ #0 'longest.label.width :=
+ #0 'last.extra.num :=
+ #0 'number.label :=
+}
+
+FUNCTION {forward.pass}
+{ last.label label =
+ { last.extra.num #1 + 'last.extra.num :=
+ last.extra.num int.to.chr$ 'extra.label :=
+ }
+ { "a" chr.to.int$ 'last.extra.num :=
+ "" 'extra.label :=
+ label 'last.label :=
+ }
+ if$
+ number.label #1 + 'number.label :=
+}
+
+FUNCTION {reverse.pass}
+{ next.extra "b" =
+ { "a" 'extra.label := }
+ 'skip$
+ if$
+ extra.label 'next.extra :=
+ extra.label
+ duplicate$ empty$
+ 'skip$
+ { "{\natexlab{" swap$ * "}}" * }
+ if$
+ 'extra.label :=
+ label extra.label * 'label :=
+}
+
+EXECUTE {initialize.longest.label}
+
+ITERATE {forward.pass}
+
+REVERSE {reverse.pass}
+
+FUNCTION {bib.sort.order}
+{ sort.label 'sort.key$ :=
+}
+
+ITERATE {bib.sort.order}
+
+SORT
+
+FUNCTION {begin.bib}
+{ preamble$ empty$
+ 'skip$
+ { preamble$ write$ newline$ }
+ if$
+ "\begin{thebibliography}{" number.label int.to.str$ * "}" *
+ write$ newline$
+ "\expandafter\ifx\csname natexlab\endcsname\relax\def\natexlab#1{#1}\fi"
+ write$ newline$
+ "\expandafter\ifx\csname url\endcsname\relax" write$ newline$
+ " \def\url#1{{\tt #1}}\fi" write$ newline$
+}
+
+EXECUTE {begin.bib}
+
+EXECUTE {init.state.consts}
+
+ITERATE {call.type$}
+
+FUNCTION {end.bib}
+{ newline$
+ "\end{thebibliography}" write$ newline$
+}
+
+EXECUTE {end.bib}
diff --git a/biblio/bibtex/contrib/swebib/sweunsrt.bst b/biblio/bibtex/contrib/swebib/sweunsrt.bst
new file mode 100644
index 0000000000..c4a86087d1
--- /dev/null
+++ b/biblio/bibtex/contrib/swebib/sweunsrt.bst
@@ -0,0 +1,952 @@
+%% sweunsrt.bst (Swedish version of BibTeX standard bibliography style `unsrt')
+%% Adapted by Jakob Knudsen from sweplain.bst by Lars Engebretsen,
+%% Copyright 2000
+%
+% This program may be distributed and/or modified under the
+% conditions of the LaTeX Project Public License, either version 1.2
+% of this license or (at your option) any later version.
+% The latest version of this license is in
+% http://www.latex-project.org/lppl.txt
+% and version 1.2 or later is part of all distributions of LaTeX
+% version 1999/12/01 or later.
+%
+% This program consists of the files sweabbrv.bst, swealpha.bst,
+% sweplain.bst, sweplnat.bst, and sweunsrt.bst
+
+ENTRY
+ { address
+ author
+ booktitle
+ chapter
+ edition
+ editor
+ howpublished
+ institution
+ journal
+ key
+ month
+ note
+ number
+ organization
+ pages
+ publisher
+ school
+ series
+ title
+ type
+ volume
+ year
+ }
+ {}
+ { label }
+
+INTEGERS { output.state before.all mid.sentence after.sentence after.block }
+
+FUNCTION {init.state.consts}
+{ #0 'before.all :=
+ #1 'mid.sentence :=
+ #2 'after.sentence :=
+ #3 'after.block :=
+}
+
+STRINGS { s t }
+
+FUNCTION {output.nonnull}
+{ 's :=
+ output.state mid.sentence =
+ { ", " * write$ }
+ { output.state after.block =
+ { add.period$ write$
+ newline$
+ "\newblock " write$
+ }
+ { output.state before.all =
+ 'write$
+ { add.period$ " " * write$ }
+ if$
+ }
+ if$
+ mid.sentence 'output.state :=
+ }
+ if$
+ s
+}
+
+FUNCTION {output}
+{ duplicate$ empty$
+ 'pop$
+ 'output.nonnull
+ if$
+}
+
+FUNCTION {output.check}
+{ 't :=
+ duplicate$ empty$
+ { pop$ "empty " t * " in " * cite$ * warning$ }
+ 'output.nonnull
+ if$
+}
+
+FUNCTION {output.bibitem}
+{ newline$
+ "\bibitem{" write$
+ cite$ write$
+ "}" write$
+ newline$
+ ""
+ before.all 'output.state :=
+}
+
+FUNCTION {fin.entry}
+{ add.period$
+ write$
+ newline$
+}
+
+FUNCTION {new.block}
+{ output.state before.all =
+ 'skip$
+ { after.block 'output.state := }
+ if$
+}
+
+FUNCTION {new.sentence}
+{ output.state after.block =
+ 'skip$
+ { output.state before.all =
+ 'skip$
+ { after.sentence 'output.state := }
+ if$
+ }
+ if$
+}
+
+FUNCTION {not}
+{ { #0 }
+ { #1 }
+ if$
+}
+
+FUNCTION {and}
+{ 'skip$
+ { pop$ #0 }
+ if$
+}
+
+FUNCTION {or}
+{ { pop$ #1 }
+ 'skip$
+ if$
+}
+
+FUNCTION {new.block.checka}
+{ empty$
+ 'skip$
+ 'new.block
+ if$
+}
+
+FUNCTION {new.block.checkb}
+{ empty$
+ swap$ empty$
+ and
+ 'skip$
+ 'new.block
+ if$
+}
+
+FUNCTION {new.sentence.checka}
+{ empty$
+ 'skip$
+ 'new.sentence
+ if$
+}
+
+FUNCTION {new.sentence.checkb}
+{ empty$
+ swap$ empty$
+ and
+ 'skip$
+ 'new.sentence
+ if$
+}
+
+FUNCTION {field.or.null}
+{ duplicate$ empty$
+ { pop$ "" }
+ 'skip$
+ if$
+}
+
+FUNCTION {emphasize}
+{ duplicate$ empty$
+ { pop$ "" }
+ { "{\em " swap$ * "}" * }
+ if$
+}
+
+INTEGERS { nameptr namesleft numnames }
+
+FUNCTION {format.names}
+{ 's :=
+ #1 'nameptr :=
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ { s nameptr "{ff~}{vv~}{ll}{, jj}" format.name$ 't :=
+ nameptr #1 >
+ { namesleft #1 >
+ { ", " * t * }
+ { t "others" =
+ { " m.fl." * }
+ { " och " * t * }
+ if$
+ }
+ if$
+ }
+ 't
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+}
+
+FUNCTION {format.authors}
+{ author empty$
+ { "" }
+ { author format.names }
+ if$
+}
+
+FUNCTION {format.editors}
+{ editor empty$
+ { "" }
+ { editor format.names
+ editor num.names$ #1 >
+ { ", redakt\" * quote$ * "orer" * }
+ { ", redakt\" * quote$ * "or" * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.title}
+{ title empty$
+ { "" }
+ { title "t" change.case$ }
+ if$
+}
+
+FUNCTION {n.dashify}
+{ 't :=
+ ""
+ { t empty$ not }
+ { t #1 #1 substring$ "-" =
+ { t #1 #2 substring$ "--" = not
+ { "--" *
+ t #2 global.max$ substring$ 't :=
+ }
+ { { t #1 #1 substring$ "-" = }
+ { "-" *
+ t #2 global.max$ substring$ 't :=
+ }
+ while$
+ }
+ if$
+ }
+ { t #1 #1 substring$ *
+ t #2 global.max$ substring$ 't :=
+ }
+ if$
+ }
+ while$
+}
+
+FUNCTION {format.date}
+{ year empty$
+ { month empty$
+ { "" }
+ { "there's a month but no year in " cite$ * warning$
+ month
+ }
+ if$
+ }
+ { month empty$
+ 'year
+ { month " " * year * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.btitle}
+{ title emphasize
+}
+
+FUNCTION {tie.or.space.connect}
+{ duplicate$ text.length$ #3 <
+ { "~" }
+ { " " }
+ if$
+ swap$ * *
+}
+
+FUNCTION {either.or.check}
+{ empty$
+ 'pop$
+ { "can't use both " swap$ * " fields in " * cite$ * warning$ }
+ if$
+}
+
+FUNCTION {format.bvolume}
+{ volume empty$
+ { "" }
+ { "band" volume tie.or.space.connect
+ series empty$
+ 'skip$
+ { " av " * series emphasize * }
+ if$
+ "volume and number" number either.or.check
+ }
+ if$
+}
+
+FUNCTION {format.number.series}
+{ volume empty$
+ { number empty$
+ { series field.or.null }
+ { output.state mid.sentence =
+ { "nummer" }
+ { "Nummer" }
+ if$
+ number tie.or.space.connect
+ series empty$
+ { "there's a number but no series in " cite$ * warning$ }
+ { " i " * series * }
+ if$
+ }
+ if$
+ }
+ { "" }
+ if$
+}
+
+FUNCTION {format.edition}
+{ edition empty$
+ { "" }
+ { output.state mid.sentence =
+ { edition "l" change.case$ " utg\aa van" * }
+ { edition "t" change.case$ " utg\aa van" * }
+ if$
+ }
+ if$
+}
+
+INTEGERS { multiresult }
+
+FUNCTION {multi.page.check}
+{ 't :=
+ #0 'multiresult :=
+ { multiresult not
+ t empty$ not
+ and
+ }
+ { t #1 #1 substring$
+ duplicate$ "-" =
+ swap$ duplicate$ "," =
+ swap$ "+" =
+ or or
+ { #1 'multiresult := }
+ { t #2 global.max$ substring$ 't := }
+ if$
+ }
+ while$
+ multiresult
+}
+
+FUNCTION {format.pages}
+{ pages empty$
+ { "" }
+ { pages multi.page.check
+ { "ss" pages n.dashify tie.or.space.connect }
+ { "s" pages tie.or.space.connect }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.vol.num.pages}
+{ volume field.or.null
+ number empty$
+ 'skip$
+ { "(" number * ")" * *
+ volume empty$
+ { "there's a number but no volume in " cite$ * warning$ }
+ 'skip$
+ if$
+ }
+ if$
+ pages empty$
+ 'skip$
+ { duplicate$ empty$
+ { pop$ format.pages }
+ { ":" * pages n.dashify * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.chapter.pages}
+{ chapter empty$
+ 'format.pages
+ { type empty$
+ { "kapitel" }
+ { type "l" change.case$ }
+ if$
+ chapter tie.or.space.connect
+ pages empty$
+ 'skip$
+ { ", " * format.pages * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.in.ed.booktitle}
+{ booktitle empty$
+ { "" }
+ { editor empty$
+ { "I: " booktitle emphasize * }
+ { "I: " format.editors * ", " * booktitle emphasize * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {empty.misc.check}
+{ author empty$ title empty$ howpublished empty$
+ month empty$ year empty$ note empty$
+ and and and and and
+ { "all relevant fields are empty in " cite$ * warning$ }
+ 'skip$
+ if$
+}
+
+FUNCTION {format.thesis.type}
+{ type empty$
+ 'skip$
+ { pop$
+ type "t" change.case$
+ }
+ if$
+}
+
+FUNCTION {format.tr.number}
+{ type empty$
+ { "Teknisk rapport" }
+ 'type
+ if$
+ number empty$
+ { "t" change.case$ }
+ { number tie.or.space.connect }
+ if$
+}
+
+FUNCTION {format.article.crossref}
+{ key empty$
+ { journal empty$
+ { "need key or journal for " cite$ * " to crossref " * crossref *
+ warning$
+ ""
+ }
+ { "I: {\em " journal * "\/}" * }
+ if$
+ }
+ { "I: " key * }
+ if$
+ " \cite{" * crossref * "}" *
+}
+
+FUNCTION {format.crossref.editor}
+{ editor #1 "{vv~}{ll}" format.name$
+ editor num.names$ duplicate$
+ #2 >
+ { pop$ " m.fl." * }
+ { #2 <
+ 'skip$
+ { editor #2 "{ff }{vv }{ll}{ jj}" format.name$ "others" =
+ { " m.fl." * }
+ { " och " * editor #2 "{vv~}{ll}" format.name$ * }
+ if$
+ }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.book.crossref}
+{ volume empty$
+ { "empty volume in " cite$ * "'s crossref of " * crossref * warning$
+ "I: "
+ }
+ { "Band" volume tie.or.space.connect
+ " av " *
+ }
+ if$
+ editor empty$
+ editor field.or.null author field.or.null =
+ or
+ { key empty$
+ { series empty$
+ { "need editor, key, or series for " cite$ * " to crossref " *
+ crossref * warning$
+ "" *
+ }
+ { "{\em " * series * "\/}" * }
+ if$
+ }
+ { key * }
+ if$
+ }
+ { format.crossref.editor * }
+ if$
+ " \cite{" * crossref * "}" *
+}
+
+FUNCTION {format.incoll.inproc.crossref}
+{ editor empty$
+ editor field.or.null author field.or.null =
+ or
+ { key empty$
+ { booktitle empty$
+ { "need editor, key, or booktitle for " cite$ * " to crossref " *
+ crossref * warning$
+ ""
+ }
+ { "I: {\em " booktitle * "\/}" * }
+ if$
+ }
+ { "I: " key * }
+ if$
+ }
+ { "I: " format.crossref.editor * }
+ if$
+ " \cite{" * crossref * "}" *
+}
+
+FUNCTION {article}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.title "title" output.check
+ new.block
+ crossref missing$
+ { journal emphasize "journal" output.check
+ format.vol.num.pages output
+ format.date "year" output.check
+ }
+ { format.article.crossref output.nonnull
+ format.pages output
+ }
+ if$
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {book}
+{ output.bibitem
+ author empty$
+ { format.editors "author and editor" output.check }
+ { format.authors output.nonnull
+ crossref missing$
+ { "author and editor" editor either.or.check }
+ 'skip$
+ if$
+ }
+ if$
+ new.block
+ format.btitle "title" output.check
+ crossref missing$
+ { format.bvolume output
+ new.block
+ format.number.series output
+ new.sentence
+ publisher "publisher" output.check
+ address output
+ }
+ { new.block
+ format.book.crossref output.nonnull
+ }
+ if$
+ format.edition output
+ format.date "year" output.check
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {booklet}
+{ output.bibitem
+ format.authors output
+ new.block
+ format.title "title" output.check
+ howpublished address new.block.checkb
+ howpublished output
+ address output
+ format.date output
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {inbook}
+{ output.bibitem
+ author empty$
+ { format.editors "author and editor" output.check }
+ { format.authors output.nonnull
+ crossref missing$
+ { "author and editor" editor either.or.check }
+ 'skip$
+ if$
+ }
+ if$
+ new.block
+ format.btitle "title" output.check
+ crossref missing$
+ { format.bvolume output
+ format.chapter.pages "chapter and pages" output.check
+ new.block
+ format.number.series output
+ new.sentence
+ publisher "publisher" output.check
+ address output
+ }
+ { format.chapter.pages "chapter and pages" output.check
+ new.block
+ format.book.crossref output.nonnull
+ }
+ if$
+ format.edition output
+ format.date "year" output.check
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {incollection}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.title "title" output.check
+ new.block
+ crossref missing$
+ { format.in.ed.booktitle "booktitle" output.check
+ format.bvolume output
+ format.number.series output
+ format.chapter.pages output
+ new.sentence
+ publisher "publisher" output.check
+ address output
+ format.edition output
+ format.date "year" output.check
+ }
+ { format.incoll.inproc.crossref output.nonnull
+ format.chapter.pages output
+ }
+ if$
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {inproceedings}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.title "title" output.check
+ new.block
+ crossref missing$
+ { format.in.ed.booktitle "booktitle" output.check
+ format.bvolume output
+ format.number.series output
+ format.pages output
+ address empty$
+ { organization publisher new.sentence.checkb
+ organization output
+ publisher output
+ format.date "year" output.check
+ }
+ { address output.nonnull
+ format.date "year" output.check
+ new.sentence
+ organization output
+ publisher output
+ }
+ if$
+ }
+ { format.incoll.inproc.crossref output.nonnull
+ format.pages output
+ }
+ if$
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {conference} { inproceedings }
+
+FUNCTION {manual}
+{ output.bibitem
+ author empty$
+ { organization empty$
+ 'skip$
+ { organization output.nonnull
+ address output
+ }
+ if$
+ }
+ { format.authors output.nonnull }
+ if$
+ new.block
+ format.btitle "title" output.check
+ author empty$
+ { organization empty$
+ { address new.block.checka
+ address output
+ }
+ 'skip$
+ if$
+ }
+ { organization address new.block.checkb
+ organization output
+ address output
+ }
+ if$
+ format.edition output
+ format.date output
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {mastersthesis}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.title "title" output.check
+ new.block
+ "Examensarbete" format.thesis.type output.nonnull
+ school "school" output.check
+ address output
+ format.date "year" output.check
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {misc}
+{ output.bibitem
+ format.authors output
+ title howpublished new.block.checkb
+ format.title output
+ howpublished new.block.checka
+ howpublished output
+ format.date output
+ new.block
+ note output
+ fin.entry
+ empty.misc.check
+}
+
+FUNCTION {phdthesis}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.btitle "title" output.check
+ new.block
+ "Doktorsavhandling" format.thesis.type output.nonnull
+ school "school" output.check
+ address output
+ format.date "year" output.check
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {proceedings}
+{ output.bibitem
+ editor empty$
+ { organization output }
+ { format.editors output.nonnull }
+ if$
+ new.block
+ format.btitle "title" output.check
+ format.bvolume output
+ format.number.series output
+ address empty$
+ { editor empty$
+ { publisher new.sentence.checka }
+ { organization publisher new.sentence.checkb
+ organization output
+ }
+ if$
+ publisher output
+ format.date "year" output.check
+ }
+ { address output.nonnull
+ format.date "year" output.check
+ new.sentence
+ editor empty$
+ 'skip$
+ { organization output }
+ if$
+ publisher output
+ }
+ if$
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {techreport}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.title "title" output.check
+ new.block
+ format.tr.number output.nonnull
+ institution "institution" output.check
+ address output
+ format.date "year" output.check
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {unpublished}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.title "title" output.check
+ new.block
+ note "note" output.check
+ format.date output
+ fin.entry
+}
+
+FUNCTION {default.type} { misc }
+
+MACRO {jan} {"januari"}
+
+MACRO {feb} {"februari"}
+
+MACRO {mar} {"mars"}
+
+MACRO {apr} {"april"}
+
+MACRO {may} {"maj"}
+
+MACRO {jun} {"juni"}
+
+MACRO {jul} {"juli"}
+
+MACRO {aug} {"augusti"}
+
+MACRO {sep} {"september"}
+
+MACRO {oct} {"oktober"}
+
+MACRO {nov} {"november"}
+
+MACRO {dec} {"december"}
+
+MACRO {acmcs} {"ACM Computing Surveys"}
+
+MACRO {acta} {"Acta Informatica"}
+
+MACRO {cacm} {"Communications of the ACM"}
+
+MACRO {ibmjrd} {"IBM Journal of Research and Development"}
+
+MACRO {ibmsj} {"IBM Systems Journal"}
+
+MACRO {ieeese} {"IEEE Transactions on Software Engineering"}
+
+MACRO {ieeetc} {"IEEE Transactions on Computers"}
+
+MACRO {ieeetcad}
+ {"IEEE Transactions on Computer-Aided Design of Integrated Circuits"}
+
+MACRO {ipl} {"Information Processing Letters"}
+
+MACRO {jacm} {"Journal of the ACM"}
+
+MACRO {jcss} {"Journal of Computer and System Sciences"}
+
+MACRO {scp} {"Science of Computer Programming"}
+
+MACRO {sicomp} {"SIAM Journal on Computing"}
+
+MACRO {tocs} {"ACM Transactions on Computer Systems"}
+
+MACRO {tods} {"ACM Transactions on Database Systems"}
+
+MACRO {tog} {"ACM Transactions on Graphics"}
+
+MACRO {toms} {"ACM Transactions on Mathematical Software"}
+
+MACRO {toois} {"ACM Transactions on Office Information Systems"}
+
+MACRO {toplas} {"ACM Transactions on Programming Languages and Systems"}
+
+MACRO {tcs} {"Theoretical Computer Science"}
+
+READ
+
+STRINGS { longest.label }
+
+INTEGERS { number.label longest.label.width }
+
+FUNCTION {initialize.longest.label}
+{ "" 'longest.label :=
+ #1 'number.label :=
+ #0 'longest.label.width :=
+}
+
+FUNCTION {longest.label.pass}
+{ number.label int.to.str$ 'label :=
+ number.label #1 + 'number.label :=
+ label width$ longest.label.width >
+ { label 'longest.label :=
+ label width$ 'longest.label.width :=
+ }
+ 'skip$
+ if$
+}
+
+EXECUTE {initialize.longest.label}
+
+ITERATE {longest.label.pass}
+
+FUNCTION {begin.bib}
+{ preamble$ empty$
+ 'skip$
+ { preamble$ write$ newline$ }
+ if$
+ "\begin{thebibliography}{" longest.label * "}" * write$ newline$
+}
+
+EXECUTE {begin.bib}
+
+EXECUTE {init.state.consts}
+
+ITERATE {call.type$}
+
+FUNCTION {end.bib}
+{ newline$
+ "\end{thebibliography}" write$ newline$
+}
+
+EXECUTE {end.bib}
diff --git a/biblio/bibtex/contrib/test/test-aaai-named.ltx b/biblio/bibtex/contrib/test/test-aaai-named.ltx
new file mode 100644
index 0000000000..56653f3bc7
--- /dev/null
+++ b/biblio/bibtex/contrib/test/test-aaai-named.ltx
@@ -0,0 +1,28 @@
+% -*-latex-*-
+% Document name: /usr/local/lib/tex/bibtex/test.ltx
+% Creator: Nelson H. F. Beebe [beebe@alfred.math.utah.edu]
+% Creation Date: Mon Jun 29 08:59:10 1992
+
+\documentstyle[authordate1-4]{article}
+
+\author{A. U. Thor}
+
+\date{}
+
+\title{Bibliography Style: {\tt {aaai-named}}}
+
+\pagestyle{myheadings}
+
+\markboth{Bibliography Style: {\tt {aaai-named}}}{Bibliography Style: {\tt {aaai-named}}}
+
+\begin{document}
+
+ \bibliographystyle{aaai-named}
+
+ \maketitle
+
+ \nocite{*}
+
+ \bibliography{test}
+
+\end{document}
diff --git a/biblio/bibtex/contrib/test/test-abbrv.ltx b/biblio/bibtex/contrib/test/test-abbrv.ltx
new file mode 100644
index 0000000000..1f2fa0f290
--- /dev/null
+++ b/biblio/bibtex/contrib/test/test-abbrv.ltx
@@ -0,0 +1,28 @@
+% -*-latex-*-
+% Document name: /usr/local/lib/tex/bibtex/test.ltx
+% Creator: Nelson H. F. Beebe [beebe@alfred.math.utah.edu]
+% Creation Date: Mon Jun 29 08:59:10 1992
+
+\documentstyle[]{article}
+
+\author{A. U. Thor}
+
+\date{}
+
+\title{Bibliography Style: {\tt {abbrv}}}
+
+\pagestyle{myheadings}
+
+\markboth{Bibliography Style: {\tt {abbrv}}}{Bibliography Style: {\tt {abbrv}}}
+
+\begin{document}
+
+ \bibliographystyle{abbrv}
+
+ \maketitle
+
+ \nocite{*}
+
+ \bibliography{test}
+
+\end{document}
diff --git a/biblio/bibtex/contrib/test/test-abstract.ltx b/biblio/bibtex/contrib/test/test-abstract.ltx
new file mode 100644
index 0000000000..54bfd2f70f
--- /dev/null
+++ b/biblio/bibtex/contrib/test/test-abstract.ltx
@@ -0,0 +1,28 @@
+% -*-latex-*-
+% Document name: /usr/local/lib/tex/bibtex/test.ltx
+% Creator: Nelson H. F. Beebe [beebe@alfred.math.utah.edu]
+% Creation Date: Mon Jun 29 08:59:10 1992
+
+\documentstyle[]{article}
+
+\author{A. U. Thor}
+
+\date{}
+
+\title{Bibliography Style: {\tt {abstract}}}
+
+\pagestyle{myheadings}
+
+\markboth{Bibliography Style: {\tt {abstract}}}{Bibliography Style: {\tt {abstract}}}
+
+\begin{document}
+
+ \bibliographystyle{abstract}
+
+ \maketitle
+
+ \nocite{*}
+
+ \bibliography{test}
+
+\end{document}
diff --git a/biblio/bibtex/contrib/test/test-acm.ltx b/biblio/bibtex/contrib/test/test-acm.ltx
new file mode 100644
index 0000000000..1144004417
--- /dev/null
+++ b/biblio/bibtex/contrib/test/test-acm.ltx
@@ -0,0 +1,28 @@
+% -*-latex-*-
+% Document name: /usr/local/lib/tex/bibtex/test.ltx
+% Creator: Nelson H. F. Beebe [beebe@alfred.math.utah.edu]
+% Creation Date: Mon Jun 29 08:59:10 1992
+
+\documentstyle[]{article}
+
+\author{A. U. Thor}
+
+\date{}
+
+\title{Bibliography Style: {\tt {acm}}}
+
+\pagestyle{myheadings}
+
+\markboth{Bibliography Style: {\tt {acm}}}{Bibliography Style: {\tt {acm}}}
+
+\begin{document}
+
+ \bibliographystyle{acm}
+
+ \maketitle
+
+ \nocite{*}
+
+ \bibliography{test}
+
+\end{document}
diff --git a/biblio/bibtex/contrib/test/test-agsm.ltx b/biblio/bibtex/contrib/test/test-agsm.ltx
new file mode 100644
index 0000000000..377b27e5cf
--- /dev/null
+++ b/biblio/bibtex/contrib/test/test-agsm.ltx
@@ -0,0 +1,28 @@
+% -*-latex-*-
+% Document name: /usr/local/lib/tex/bibtex/test.ltx
+% Creator: Nelson H. F. Beebe [beebe@alfred.math.utah.edu]
+% Creation Date: Mon Jun 29 08:59:10 1992
+
+\documentstyle[harvard]{article}
+
+\author{A. U. Thor}
+
+\date{}
+
+\title{Bibliography Style: {\tt {agsm}}}
+
+\pagestyle{myheadings}
+
+\markboth{Bibliography Style: {\tt {agsm}}}{Bibliography Style: {\tt {agsm}}}
+
+\begin{document}
+
+ \bibliographystyle{agsm}
+
+ \maketitle
+
+ \nocite{*}
+
+ \bibliography{test}
+
+\end{document}
diff --git a/biblio/bibtex/contrib/test/test-alpha.ltx b/biblio/bibtex/contrib/test/test-alpha.ltx
new file mode 100644
index 0000000000..368f1bfd8d
--- /dev/null
+++ b/biblio/bibtex/contrib/test/test-alpha.ltx
@@ -0,0 +1,28 @@
+% -*-latex-*-
+% Document name: /usr/local/lib/tex/bibtex/test.ltx
+% Creator: Nelson H. F. Beebe [beebe@alfred.math.utah.edu]
+% Creation Date: Mon Jun 29 08:59:10 1992
+
+\documentstyle[]{article}
+
+\author{A. U. Thor}
+
+\date{}
+
+\title{Bibliography Style: {\tt {alpha}}}
+
+\pagestyle{myheadings}
+
+\markboth{Bibliography Style: {\tt {alpha}}}{Bibliography Style: {\tt {alpha}}}
+
+\begin{document}
+
+ \bibliographystyle{alpha}
+
+ \maketitle
+
+ \nocite{*}
+
+ \bibliography{test}
+
+\end{document}
diff --git a/biblio/bibtex/contrib/test/test-amsalpha.ltx b/biblio/bibtex/contrib/test/test-amsalpha.ltx
new file mode 100644
index 0000000000..9a7596d1bd
--- /dev/null
+++ b/biblio/bibtex/contrib/test/test-amsalpha.ltx
@@ -0,0 +1,28 @@
+% -*-latex-*-
+% Document name: /usr/local/lib/tex/bibtex/test.ltx
+% Creator: Nelson H. F. Beebe [beebe@alfred.math.utah.edu]
+% Creation Date: Mon Jun 29 08:59:10 1992
+
+\documentstyle[]{article}
+
+\author{A. U. Thor}
+
+\date{}
+
+\title{Bibliography Style: {\tt {amsalpha}}}
+
+\pagestyle{myheadings}
+
+\markboth{Bibliography Style: {\tt {amsalpha}}}{Bibliography Style: {\tt {amsalpha}}}
+
+\begin{document}
+
+ \bibliographystyle{amsalpha}
+
+ \maketitle
+
+ \nocite{*}
+
+ \bibliography{test}
+
+\end{document}
diff --git a/biblio/bibtex/contrib/test/test-amsplain.ltx b/biblio/bibtex/contrib/test/test-amsplain.ltx
new file mode 100644
index 0000000000..7bd890be8b
--- /dev/null
+++ b/biblio/bibtex/contrib/test/test-amsplain.ltx
@@ -0,0 +1,28 @@
+% -*-latex-*-
+% Document name: /usr/local/lib/tex/bibtex/test.ltx
+% Creator: Nelson H. F. Beebe [beebe@alfred.math.utah.edu]
+% Creation Date: Mon Jun 29 08:59:10 1992
+
+\documentstyle[]{article}
+
+\author{A. U. Thor}
+
+\date{}
+
+\title{Bibliography Style: {\tt {amsplain}}}
+
+\pagestyle{myheadings}
+
+\markboth{Bibliography Style: {\tt {amsplain}}}{Bibliography Style: {\tt {amsplain}}}
+
+\begin{document}
+
+ \bibliographystyle{amsplain}
+
+ \maketitle
+
+ \nocite{*}
+
+ \bibliography{test}
+
+\end{document}
diff --git a/biblio/bibtex/contrib/test/test-annotate.ltx b/biblio/bibtex/contrib/test/test-annotate.ltx
new file mode 100644
index 0000000000..b3aaba026a
--- /dev/null
+++ b/biblio/bibtex/contrib/test/test-annotate.ltx
@@ -0,0 +1,28 @@
+% -*-latex-*-
+% Document name: /usr/local/lib/tex/bibtex/test.ltx
+% Creator: Nelson H. F. Beebe [beebe@alfred.math.utah.edu]
+% Creation Date: Mon Jun 29 08:59:10 1992
+
+\documentstyle[]{article}
+
+\author{A. U. Thor}
+
+\date{}
+
+\title{Bibliography Style: {\tt {annotate}}}
+
+\pagestyle{myheadings}
+
+\markboth{Bibliography Style: {\tt {annotate}}}{Bibliography Style: {\tt {annotate}}}
+
+\begin{document}
+
+ \bibliographystyle{annotate}
+
+ \maketitle
+
+ \nocite{*}
+
+ \bibliography{test}
+
+\end{document}
diff --git a/biblio/bibtex/contrib/test/test-annotation.ltx b/biblio/bibtex/contrib/test/test-annotation.ltx
new file mode 100644
index 0000000000..9672f49644
--- /dev/null
+++ b/biblio/bibtex/contrib/test/test-annotation.ltx
@@ -0,0 +1,28 @@
+% -*-latex-*-
+% Document name: /usr/local/lib/tex/bibtex/test.ltx
+% Creator: Nelson H. F. Beebe [beebe@alfred.math.utah.edu]
+% Creation Date: Mon Jun 29 08:59:10 1992
+
+\documentstyle[]{article}
+
+\author{A. U. Thor}
+
+\date{}
+
+\title{Bibliography Style: {\tt {annotation}}}
+
+\pagestyle{myheadings}
+
+\markboth{Bibliography Style: {\tt {annotation}}}{Bibliography Style: {\tt {annotation}}}
+
+\begin{document}
+
+ \bibliographystyle{annotation}
+
+ \maketitle
+
+ \nocite{*}
+
+ \bibliography{test}
+
+\end{document}
diff --git a/biblio/bibtex/contrib/test/test-apa.ltx b/biblio/bibtex/contrib/test/test-apa.ltx
new file mode 100644
index 0000000000..4a2e479c13
--- /dev/null
+++ b/biblio/bibtex/contrib/test/test-apa.ltx
@@ -0,0 +1,28 @@
+% -*-latex-*-
+% Document name: /usr/local/lib/tex/bibtex/test.ltx
+% Creator: Nelson H. F. Beebe [beebe@alfred.math.utah.edu]
+% Creation Date: Mon Jun 29 08:59:10 1992
+
+\documentstyle[astron]{article}
+
+\author{A. U. Thor}
+
+\date{}
+
+\title{Bibliography Style: {\tt {apa}}}
+
+\pagestyle{myheadings}
+
+\markboth{Bibliography Style: {\tt {apa}}}{Bibliography Style: {\tt {apa}}}
+
+\begin{document}
+
+ \bibliographystyle{apa}
+
+ \maketitle
+
+ \nocite{*}
+
+ \bibliography{test}
+
+\end{document}
diff --git a/biblio/bibtex/contrib/test/test-apalike.ltx b/biblio/bibtex/contrib/test/test-apalike.ltx
new file mode 100644
index 0000000000..022c011817
--- /dev/null
+++ b/biblio/bibtex/contrib/test/test-apalike.ltx
@@ -0,0 +1,28 @@
+% -*-latex-*-
+% Document name: /usr/local/lib/tex/bibtex/test.ltx
+% Creator: Nelson H. F. Beebe [beebe@alfred.math.utah.edu]
+% Creation Date: Mon Jun 29 08:59:10 1992
+
+\documentstyle[]{article}
+
+\author{A. U. Thor}
+
+\date{}
+
+\title{Bibliography Style: {\tt {apalike}}}
+
+\pagestyle{myheadings}
+
+\markboth{Bibliography Style: {\tt {apalike}}}{Bibliography Style: {\tt {apalike}}}
+
+\begin{document}
+
+ \bibliographystyle{apalike}
+
+ \maketitle
+
+ \nocite{*}
+
+ \bibliography{test}
+
+\end{document}
diff --git a/biblio/bibtex/contrib/test/test-apalike2.ltx b/biblio/bibtex/contrib/test/test-apalike2.ltx
new file mode 100644
index 0000000000..9c1e4133b1
--- /dev/null
+++ b/biblio/bibtex/contrib/test/test-apalike2.ltx
@@ -0,0 +1,28 @@
+% -*-latex-*-
+% Document name: /usr/local/lib/tex/bibtex/test.ltx
+% Creator: Nelson H. F. Beebe [beebe@alfred.math.utah.edu]
+% Creation Date: Mon Jun 29 08:59:10 1992
+
+\documentstyle[]{article}
+
+\author{A. U. Thor}
+
+\date{}
+
+\title{Bibliography Style: {\tt {apalike2}}}
+
+\pagestyle{myheadings}
+
+\markboth{Bibliography Style: {\tt {apalike2}}}{Bibliography Style: {\tt {apalike2}}}
+
+\begin{document}
+
+ \bibliographystyle{apalike2}
+
+ \maketitle
+
+ \nocite{*}
+
+ \bibliography{test}
+
+\end{document}
diff --git a/biblio/bibtex/contrib/test/test-astron.ltx b/biblio/bibtex/contrib/test/test-astron.ltx
new file mode 100644
index 0000000000..7d42442c77
--- /dev/null
+++ b/biblio/bibtex/contrib/test/test-astron.ltx
@@ -0,0 +1,28 @@
+% -*-latex-*-
+% Document name: /usr/local/lib/tex/bibtex/test.ltx
+% Creator: Nelson H. F. Beebe [beebe@alfred.math.utah.edu]
+% Creation Date: Mon Jun 29 08:59:10 1992
+
+\documentstyle[astron]{article}
+
+\author{A. U. Thor}
+
+\date{}
+
+\title{Bibliography Style: {\tt {astron}}}
+
+\pagestyle{myheadings}
+
+\markboth{Bibliography Style: {\tt {astron}}}{Bibliography Style: {\tt {astron}}}
+
+\begin{document}
+
+ \bibliographystyle{astron}
+
+ \maketitle
+
+ \nocite{*}
+
+ \bibliography{test}
+
+\end{document}
diff --git a/biblio/bibtex/contrib/test/test-authordate1.ltx b/biblio/bibtex/contrib/test/test-authordate1.ltx
new file mode 100644
index 0000000000..1c1569331f
--- /dev/null
+++ b/biblio/bibtex/contrib/test/test-authordate1.ltx
@@ -0,0 +1,28 @@
+% -*-latex-*-
+% Document name: /usr/local/lib/tex/bibtex/test.ltx
+% Creator: Nelson H. F. Beebe [beebe@alfred.math.utah.edu]
+% Creation Date: Mon Jun 29 08:59:10 1992
+
+\documentstyle[authordate1-4]{article}
+
+\author{A. U. Thor}
+
+\date{}
+
+\title{Bibliography Style: {\tt {authordate1}}}
+
+\pagestyle{myheadings}
+
+\markboth{Bibliography Style: {\tt {authordate1}}}{Bibliography Style: {\tt {authordate1}}}
+
+\begin{document}
+
+ \bibliographystyle{authordate1}
+
+ \maketitle
+
+ \nocite{*}
+
+ \bibliography{test}
+
+\end{document}
diff --git a/biblio/bibtex/contrib/test/test-authordate2.ltx b/biblio/bibtex/contrib/test/test-authordate2.ltx
new file mode 100644
index 0000000000..30e670eaee
--- /dev/null
+++ b/biblio/bibtex/contrib/test/test-authordate2.ltx
@@ -0,0 +1,28 @@
+% -*-latex-*-
+% Document name: /usr/local/lib/tex/bibtex/test.ltx
+% Creator: Nelson H. F. Beebe [beebe@alfred.math.utah.edu]
+% Creation Date: Mon Jun 29 08:59:10 1992
+
+\documentstyle[authordate1-4]{article}
+
+\author{A. U. Thor}
+
+\date{}
+
+\title{Bibliography Style: {\tt {authordate2}}}
+
+\pagestyle{myheadings}
+
+\markboth{Bibliography Style: {\tt {authordate2}}}{Bibliography Style: {\tt {authordate2}}}
+
+\begin{document}
+
+ \bibliographystyle{authordate2}
+
+ \maketitle
+
+ \nocite{*}
+
+ \bibliography{test}
+
+\end{document}
diff --git a/biblio/bibtex/contrib/test/test-authordate3.ltx b/biblio/bibtex/contrib/test/test-authordate3.ltx
new file mode 100644
index 0000000000..e7ef5ae5e8
--- /dev/null
+++ b/biblio/bibtex/contrib/test/test-authordate3.ltx
@@ -0,0 +1,28 @@
+% -*-latex-*-
+% Document name: /usr/local/lib/tex/bibtex/test.ltx
+% Creator: Nelson H. F. Beebe [beebe@alfred.math.utah.edu]
+% Creation Date: Mon Jun 29 08:59:10 1992
+
+\documentstyle[authordate1-4]{article}
+
+\author{A. U. Thor}
+
+\date{}
+
+\title{Bibliography Style: {\tt {authordate3}}}
+
+\pagestyle{myheadings}
+
+\markboth{Bibliography Style: {\tt {authordate3}}}{Bibliography Style: {\tt {authordate3}}}
+
+\begin{document}
+
+ \bibliographystyle{authordate3}
+
+ \maketitle
+
+ \nocite{*}
+
+ \bibliography{test}
+
+\end{document}
diff --git a/biblio/bibtex/contrib/test/test-authordate4.ltx b/biblio/bibtex/contrib/test/test-authordate4.ltx
new file mode 100644
index 0000000000..0f786d759f
--- /dev/null
+++ b/biblio/bibtex/contrib/test/test-authordate4.ltx
@@ -0,0 +1,28 @@
+% -*-latex-*-
+% Document name: /usr/local/lib/tex/bibtex/test.ltx
+% Creator: Nelson H. F. Beebe [beebe@alfred.math.utah.edu]
+% Creation Date: Mon Jun 29 08:59:10 1992
+
+\documentstyle[authordate1-4]{article}
+
+\author{A. U. Thor}
+
+\date{}
+
+\title{Bibliography Style: {\tt {authordate4}}}
+
+\pagestyle{myheadings}
+
+\markboth{Bibliography Style: {\tt {authordate4}}}{Bibliography Style: {\tt {authordate4}}}
+
+\begin{document}
+
+ \bibliographystyle{authordate4}
+
+ \maketitle
+
+ \nocite{*}
+
+ \bibliography{test}
+
+\end{document}
diff --git a/biblio/bibtex/contrib/test/test-bbs.ltx b/biblio/bibtex/contrib/test/test-bbs.ltx
new file mode 100644
index 0000000000..a1dc0245b2
--- /dev/null
+++ b/biblio/bibtex/contrib/test/test-bbs.ltx
@@ -0,0 +1,28 @@
+% -*-latex-*-
+% Document name: /usr/local/lib/tex/bibtex/test.ltx
+% Creator: Nelson H. F. Beebe [beebe@alfred.math.utah.edu]
+% Creation Date: Mon Jun 29 08:59:10 1992
+
+\documentstyle[astron]{article}
+
+\author{A. U. Thor}
+
+\date{}
+
+\title{Bibliography Style: {\tt {bbs}}}
+
+\pagestyle{myheadings}
+
+\markboth{Bibliography Style: {\tt {bbs}}}{Bibliography Style: {\tt {bbs}}}
+
+\begin{document}
+
+ \bibliographystyle{bbs}
+
+ \maketitle
+
+ \nocite{*}
+
+ \bibliography{test}
+
+\end{document}
diff --git a/biblio/bibtex/contrib/test/test-cbe.ltx b/biblio/bibtex/contrib/test/test-cbe.ltx
new file mode 100644
index 0000000000..9d15aec3b9
--- /dev/null
+++ b/biblio/bibtex/contrib/test/test-cbe.ltx
@@ -0,0 +1,28 @@
+% -*-latex-*-
+% Document name: /usr/local/lib/tex/bibtex/test.ltx
+% Creator: Nelson H. F. Beebe [beebe@alfred.math.utah.edu]
+% Creation Date: Mon Jun 29 08:59:10 1992
+
+\documentstyle[astron]{article}
+
+\author{A. U. Thor}
+
+\date{}
+
+\title{Bibliography Style: {\tt {cbe}}}
+
+\pagestyle{myheadings}
+
+\markboth{Bibliography Style: {\tt {cbe}}}{Bibliography Style: {\tt {cbe}}}
+
+\begin{document}
+
+ \bibliographystyle{cbe}
+
+ \maketitle
+
+ \nocite{*}
+
+ \bibliography{test}
+
+\end{document}
diff --git a/biblio/bibtex/contrib/test/test-cell.ltx b/biblio/bibtex/contrib/test/test-cell.ltx
new file mode 100644
index 0000000000..9b0c82caba
--- /dev/null
+++ b/biblio/bibtex/contrib/test/test-cell.ltx
@@ -0,0 +1,28 @@
+% -*-latex-*-
+% Document name: /usr/local/lib/tex/bibtex/test.ltx
+% Creator: Nelson H. F. Beebe [beebe@alfred.math.utah.edu]
+% Creation Date: Mon Jun 29 08:59:10 1992
+
+\documentstyle[]{article}
+
+\author{A. U. Thor}
+
+\date{}
+
+\title{Bibliography Style: {\tt {cell}}}
+
+\pagestyle{myheadings}
+
+\markboth{Bibliography Style: {\tt {cell}}}{Bibliography Style: {\tt {cell}}}
+
+\begin{document}
+
+ \bibliographystyle{cell}
+
+ \maketitle
+
+ \nocite{*}
+
+ \bibliography{test}
+
+\end{document}
diff --git a/biblio/bibtex/contrib/test/test-dcu.ltx b/biblio/bibtex/contrib/test/test-dcu.ltx
new file mode 100644
index 0000000000..4b09802f3f
--- /dev/null
+++ b/biblio/bibtex/contrib/test/test-dcu.ltx
@@ -0,0 +1,28 @@
+% -*-latex-*-
+% Document name: /usr/local/lib/tex/bibtex/test.ltx
+% Creator: Nelson H. F. Beebe [beebe@alfred.math.utah.edu]
+% Creation Date: Mon Jun 29 08:59:10 1992
+
+\documentstyle[harvard]{article}
+
+\author{A. U. Thor}
+
+\date{}
+
+\title{Bibliography Style: {\tt {dcu}}}
+
+\pagestyle{myheadings}
+
+\markboth{Bibliography Style: {\tt {dcu}}}{Bibliography Style: {\tt {dcu}}}
+
+\begin{document}
+
+ \bibliographystyle{dcu}
+
+ \maketitle
+
+ \nocite{*}
+
+ \bibliography{test}
+
+\end{document}
diff --git a/biblio/bibtex/contrib/test/test-humanbio.ltx b/biblio/bibtex/contrib/test/test-humanbio.ltx
new file mode 100644
index 0000000000..dfff47a77a
--- /dev/null
+++ b/biblio/bibtex/contrib/test/test-humanbio.ltx
@@ -0,0 +1,28 @@
+% -*-latex-*-
+% Document name: /usr/local/lib/tex/bibtex/test.ltx
+% Creator: Nelson H. F. Beebe [beebe@alfred.math.utah.edu]
+% Creation Date: Mon Jun 29 08:59:10 1992
+
+\documentstyle[astron]{article}
+
+\author{A. U. Thor}
+
+\date{}
+
+\title{Bibliography Style: {\tt {humanbio}}}
+
+\pagestyle{myheadings}
+
+\markboth{Bibliography Style: {\tt {humanbio}}}{Bibliography Style: {\tt {humanbio}}}
+
+\begin{document}
+
+ \bibliographystyle{humanbio}
+
+ \maketitle
+
+ \nocite{*}
+
+ \bibliography{test}
+
+\end{document}
diff --git a/biblio/bibtex/contrib/test/test-humannat.ltx b/biblio/bibtex/contrib/test/test-humannat.ltx
new file mode 100644
index 0000000000..7385eba6a6
--- /dev/null
+++ b/biblio/bibtex/contrib/test/test-humannat.ltx
@@ -0,0 +1,28 @@
+% -*-latex-*-
+% Document name: /usr/local/lib/tex/bibtex/test.ltx
+% Creator: Nelson H. F. Beebe [beebe@alfred.math.utah.edu]
+% Creation Date: Mon Jun 29 08:59:10 1992
+
+\documentstyle[astron]{article}
+
+\author{A. U. Thor}
+
+\date{}
+
+\title{Bibliography Style: {\tt {humannat}}}
+
+\pagestyle{myheadings}
+
+\markboth{Bibliography Style: {\tt {humannat}}}{Bibliography Style: {\tt {humannat}}}
+
+\begin{document}
+
+ \bibliographystyle{humannat}
+
+ \maketitle
+
+ \nocite{*}
+
+ \bibliography{test}
+
+\end{document}
diff --git a/biblio/bibtex/contrib/test/test-ieeetr.ltx b/biblio/bibtex/contrib/test/test-ieeetr.ltx
new file mode 100644
index 0000000000..7132693ec4
--- /dev/null
+++ b/biblio/bibtex/contrib/test/test-ieeetr.ltx
@@ -0,0 +1,28 @@
+% -*-latex-*-
+% Document name: /usr/local/lib/tex/bibtex/test.ltx
+% Creator: Nelson H. F. Beebe [beebe@alfred.math.utah.edu]
+% Creation Date: Mon Jun 29 08:59:10 1992
+
+\documentstyle[]{article}
+
+\author{A. U. Thor}
+
+\date{}
+
+\title{Bibliography Style: {\tt {ieeetr}}}
+
+\pagestyle{myheadings}
+
+\markboth{Bibliography Style: {\tt {ieeetr}}}{Bibliography Style: {\tt {ieeetr}}}
+
+\begin{document}
+
+ \bibliographystyle{ieeetr}
+
+ \maketitle
+
+ \nocite{*}
+
+ \bibliography{test}
+
+\end{document}
diff --git a/biblio/bibtex/contrib/test/test-is-abbrv.ltx b/biblio/bibtex/contrib/test/test-is-abbrv.ltx
new file mode 100644
index 0000000000..23a7ba845d
--- /dev/null
+++ b/biblio/bibtex/contrib/test/test-is-abbrv.ltx
@@ -0,0 +1,28 @@
+% -*-latex-*-
+% Document name: /usr/local/lib/tex/bibtex/test.ltx
+% Creator: Nelson H. F. Beebe [beebe@alfred.math.utah.edu]
+% Creation Date: Mon Jun 29 08:59:10 1992
+
+\documentstyle[]{article}
+
+\author{A. U. Thor}
+
+\date{}
+
+\title{Bibliography Style: {\tt {is-abbrv}}}
+
+\pagestyle{myheadings}
+
+\markboth{Bibliography Style: {\tt {is-abbrv}}}{Bibliography Style: {\tt {is-abbrv}}}
+
+\begin{document}
+
+ \bibliographystyle{is-abbrv}
+
+ \maketitle
+
+ \nocite{*}
+
+ \bibliography{test}
+
+\end{document}
diff --git a/biblio/bibtex/contrib/test/test-is-alpha.ltx b/biblio/bibtex/contrib/test/test-is-alpha.ltx
new file mode 100644
index 0000000000..c323f0e432
--- /dev/null
+++ b/biblio/bibtex/contrib/test/test-is-alpha.ltx
@@ -0,0 +1,28 @@
+% -*-latex-*-
+% Document name: /usr/local/lib/tex/bibtex/test.ltx
+% Creator: Nelson H. F. Beebe [beebe@alfred.math.utah.edu]
+% Creation Date: Mon Jun 29 08:59:10 1992
+
+\documentstyle[]{article}
+
+\author{A. U. Thor}
+
+\date{}
+
+\title{Bibliography Style: {\tt {is-alpha}}}
+
+\pagestyle{myheadings}
+
+\markboth{Bibliography Style: {\tt {is-alpha}}}{Bibliography Style: {\tt {is-alpha}}}
+
+\begin{document}
+
+ \bibliographystyle{is-alpha}
+
+ \maketitle
+
+ \nocite{*}
+
+ \bibliography{test}
+
+\end{document}
diff --git a/biblio/bibtex/contrib/test/test-is-plain.ltx b/biblio/bibtex/contrib/test/test-is-plain.ltx
new file mode 100644
index 0000000000..1dc522a1ee
--- /dev/null
+++ b/biblio/bibtex/contrib/test/test-is-plain.ltx
@@ -0,0 +1,28 @@
+% -*-latex-*-
+% Document name: /usr/local/lib/tex/bibtex/test.ltx
+% Creator: Nelson H. F. Beebe [beebe@alfred.math.utah.edu]
+% Creation Date: Mon Jun 29 08:59:10 1992
+
+\documentstyle[]{article}
+
+\author{A. U. Thor}
+
+\date{}
+
+\title{Bibliography Style: {\tt {is-plain}}}
+
+\pagestyle{myheadings}
+
+\markboth{Bibliography Style: {\tt {is-plain}}}{Bibliography Style: {\tt {is-plain}}}
+
+\begin{document}
+
+ \bibliographystyle{is-plain}
+
+ \maketitle
+
+ \nocite{*}
+
+ \bibliography{test}
+
+\end{document}
diff --git a/biblio/bibtex/contrib/test/test-is-unsrt.ltx b/biblio/bibtex/contrib/test/test-is-unsrt.ltx
new file mode 100644
index 0000000000..4b259a271b
--- /dev/null
+++ b/biblio/bibtex/contrib/test/test-is-unsrt.ltx
@@ -0,0 +1,28 @@
+% -*-latex-*-
+% Document name: /usr/local/lib/tex/bibtex/test.ltx
+% Creator: Nelson H. F. Beebe [beebe@alfred.math.utah.edu]
+% Creation Date: Mon Jun 29 08:59:10 1992
+
+\documentstyle[]{article}
+
+\author{A. U. Thor}
+
+\date{}
+
+\title{Bibliography Style: {\tt {is-unsrt}}}
+
+\pagestyle{myheadings}
+
+\markboth{Bibliography Style: {\tt {is-unsrt}}}{Bibliography Style: {\tt {is-unsrt}}}
+
+\begin{document}
+
+ \bibliographystyle{is-unsrt}
+
+ \maketitle
+
+ \nocite{*}
+
+ \bibliography{test}
+
+\end{document}
diff --git a/biblio/bibtex/contrib/test/test-jbact.ltx b/biblio/bibtex/contrib/test/test-jbact.ltx
new file mode 100644
index 0000000000..c0521dc9ef
--- /dev/null
+++ b/biblio/bibtex/contrib/test/test-jbact.ltx
@@ -0,0 +1,28 @@
+% -*-latex-*-
+% Document name: /usr/local/lib/tex/bibtex/test.ltx
+% Creator: Nelson H. F. Beebe [beebe@alfred.math.utah.edu]
+% Creation Date: Mon Jun 29 08:59:10 1992
+
+\documentstyle[]{article}
+
+\author{A. U. Thor}
+
+\date{}
+
+\title{Bibliography Style: {\tt {jbact}}}
+
+\pagestyle{myheadings}
+
+\markboth{Bibliography Style: {\tt {jbact}}}{Bibliography Style: {\tt {jbact}}}
+
+\begin{document}
+
+ \bibliographystyle{jbact}
+
+ \maketitle
+
+ \nocite{*}
+
+ \bibliography{test}
+
+\end{document}
diff --git a/biblio/bibtex/contrib/test/test-jmb.ltx b/biblio/bibtex/contrib/test/test-jmb.ltx
new file mode 100644
index 0000000000..7c0d564b6e
--- /dev/null
+++ b/biblio/bibtex/contrib/test/test-jmb.ltx
@@ -0,0 +1,28 @@
+% -*-latex-*-
+% Document name: /usr/local/lib/tex/bibtex/test.ltx
+% Creator: Nelson H. F. Beebe [beebe@alfred.math.utah.edu]
+% Creation Date: Mon Jun 29 08:59:10 1992
+
+\documentstyle[jmb]{article}
+
+\author{A. U. Thor}
+
+\date{}
+
+\title{Bibliography Style: {\tt {jmb}}}
+
+\pagestyle{myheadings}
+
+\markboth{Bibliography Style: {\tt {jmb}}}{Bibliography Style: {\tt {jmb}}}
+
+\begin{document}
+
+ \bibliographystyle{jmb}
+
+ \maketitle
+
+ \nocite{*}
+
+ \bibliography{test}
+
+\end{document}
diff --git a/biblio/bibtex/contrib/test/test-jtb.ltx b/biblio/bibtex/contrib/test/test-jtb.ltx
new file mode 100644
index 0000000000..d84934c7ec
--- /dev/null
+++ b/biblio/bibtex/contrib/test/test-jtb.ltx
@@ -0,0 +1,28 @@
+% -*-latex-*-
+% Document name: /usr/local/lib/tex/bibtex/test.ltx
+% Creator: Nelson H. F. Beebe [beebe@alfred.math.utah.edu]
+% Creation Date: Mon Jun 29 08:59:10 1992
+
+\documentstyle[astron]{article}
+
+\author{A. U. Thor}
+
+\date{}
+
+\title{Bibliography Style: {\tt {jtb}}}
+
+\pagestyle{myheadings}
+
+\markboth{Bibliography Style: {\tt {jtb}}}{Bibliography Style: {\tt {jtb}}}
+
+\begin{document}
+
+ \bibliographystyle{jtb}
+
+ \maketitle
+
+ \nocite{*}
+
+ \bibliography{test}
+
+\end{document}
diff --git a/biblio/bibtex/contrib/test/test-kluwer.ltx b/biblio/bibtex/contrib/test/test-kluwer.ltx
new file mode 100644
index 0000000000..6ca3a38c94
--- /dev/null
+++ b/biblio/bibtex/contrib/test/test-kluwer.ltx
@@ -0,0 +1,28 @@
+% -*-latex-*-
+% Document name: /usr/local/lib/tex/bibtex/test.ltx
+% Creator: Nelson H. F. Beebe [beebe@alfred.math.utah.edu]
+% Creation Date: Mon Jun 29 08:59:10 1992
+
+\documentstyle[harvard]{article}
+
+\author{A. U. Thor}
+
+\date{}
+
+\title{Bibliography Style: {\tt {kluwer}}}
+
+\pagestyle{myheadings}
+
+\markboth{Bibliography Style: {\tt {kluwer}}}{Bibliography Style: {\tt {kluwer}}}
+
+\begin{document}
+
+ \bibliographystyle{kluwer}
+
+ \maketitle
+
+ \nocite{*}
+
+ \bibliography{test}
+
+\end{document}
diff --git a/biblio/bibtex/contrib/test/test-named.ltx b/biblio/bibtex/contrib/test/test-named.ltx
new file mode 100644
index 0000000000..422138e5e3
--- /dev/null
+++ b/biblio/bibtex/contrib/test/test-named.ltx
@@ -0,0 +1,28 @@
+% -*-latex-*-
+% Document name: /usr/local/lib/tex/bibtex/test.ltx
+% Creator: Nelson H. F. Beebe [beebe@alfred.math.utah.edu]
+% Creation Date: Mon Jun 29 08:59:10 1992
+
+\documentstyle[named]{article}
+
+\author{A. U. Thor}
+
+\date{}
+
+\title{Bibliography Style: {\tt {named}}}
+
+\pagestyle{myheadings}
+
+\markboth{Bibliography Style: {\tt {named}}}{Bibliography Style: {\tt {named}}}
+
+\begin{document}
+
+ \bibliographystyle{named}
+
+ \maketitle
+
+ \nocite{*}
+
+ \bibliography{test}
+
+\end{document}
diff --git a/biblio/bibtex/contrib/test/test-namunsrt.ltx b/biblio/bibtex/contrib/test/test-namunsrt.ltx
new file mode 100644
index 0000000000..bf25a86bf1
--- /dev/null
+++ b/biblio/bibtex/contrib/test/test-namunsrt.ltx
@@ -0,0 +1,28 @@
+% -*-latex-*-
+% Document name: /usr/local/lib/tex/bibtex/test.ltx
+% Creator: Nelson H. F. Beebe [beebe@alfred.math.utah.edu]
+% Creation Date: Mon Jun 29 08:59:10 1992
+
+\documentstyle[]{article}
+
+\author{A. U. Thor}
+
+\date{}
+
+\title{Bibliography Style: {\tt {namunsrt}}}
+
+\pagestyle{myheadings}
+
+\markboth{Bibliography Style: {\tt {namunsrt}}}{Bibliography Style: {\tt {namunsrt}}}
+
+\begin{document}
+
+ \bibliographystyle{namunsrt}
+
+ \maketitle
+
+ \nocite{*}
+
+ \bibliography{test}
+
+\end{document}
diff --git a/biblio/bibtex/contrib/test/test-nar.ltx b/biblio/bibtex/contrib/test/test-nar.ltx
new file mode 100644
index 0000000000..d85b2b0adf
--- /dev/null
+++ b/biblio/bibtex/contrib/test/test-nar.ltx
@@ -0,0 +1,28 @@
+% -*-latex-*-
+% Document name: /usr/local/lib/tex/bibtex/test.ltx
+% Creator: Nelson H. F. Beebe [beebe@alfred.math.utah.edu]
+% Creation Date: Mon Jun 29 08:59:10 1992
+
+\documentstyle[nar]{article}
+
+\author{A. U. Thor}
+
+\date{}
+
+\title{Bibliography Style: {\tt {nar}}}
+
+\pagestyle{myheadings}
+
+\markboth{Bibliography Style: {\tt {nar}}}{Bibliography Style: {\tt {nar}}}
+
+\begin{document}
+
+ \bibliographystyle{nar}
+
+ \maketitle
+
+ \nocite{*}
+
+ \bibliography{test}
+
+\end{document}
diff --git a/biblio/bibtex/contrib/test/test-nature.ltx b/biblio/bibtex/contrib/test/test-nature.ltx
new file mode 100644
index 0000000000..2dd4681ca4
--- /dev/null
+++ b/biblio/bibtex/contrib/test/test-nature.ltx
@@ -0,0 +1,28 @@
+% -*-latex-*-
+% Document name: /usr/local/lib/tex/bibtex/test.ltx
+% Creator: Nelson H. F. Beebe [beebe@alfred.math.utah.edu]
+% Creation Date: Mon Jun 29 08:59:10 1992
+
+\documentstyle[]{article}
+
+\author{A. U. Thor}
+
+\date{}
+
+\title{Bibliography Style: {\tt {nature}}}
+
+\pagestyle{myheadings}
+
+\markboth{Bibliography Style: {\tt {nature}}}{Bibliography Style: {\tt {nature}}}
+
+\begin{document}
+
+ \bibliographystyle{nature}
+
+ \maketitle
+
+ \nocite{*}
+
+ \bibliography{test}
+
+\end{document}
diff --git a/biblio/bibtex/contrib/test/test-newapa.ltx b/biblio/bibtex/contrib/test/test-newapa.ltx
new file mode 100644
index 0000000000..1adc91f93d
--- /dev/null
+++ b/biblio/bibtex/contrib/test/test-newapa.ltx
@@ -0,0 +1,28 @@
+% -*-latex-*-
+% Document name: /usr/local/lib/tex/bibtex/test.ltx
+% Creator: Nelson H. F. Beebe [beebe@alfred.math.utah.edu]
+% Creation Date: Mon Jun 29 08:59:10 1992
+
+\documentstyle[apalike,newapa]{article}
+
+\author{A. U. Thor}
+
+\date{}
+
+\title{Bibliography Style: {\tt {newapa}}}
+
+\pagestyle{myheadings}
+
+\markboth{Bibliography Style: {\tt {newapa}}}{Bibliography Style: {\tt {newapa}}}
+
+\begin{document}
+
+ \bibliographystyle{newapa}
+
+ \maketitle
+
+ \nocite{*}
+
+ \bibliography{test}
+
+\end{document}
diff --git a/biblio/bibtex/contrib/test/test-phaip.ltx b/biblio/bibtex/contrib/test/test-phaip.ltx
new file mode 100644
index 0000000000..1e76048f85
--- /dev/null
+++ b/biblio/bibtex/contrib/test/test-phaip.ltx
@@ -0,0 +1,28 @@
+% -*-latex-*-
+% Document name: /usr/local/lib/tex/bibtex/test.ltx
+% Creator: Nelson H. F. Beebe [beebe@alfred.math.utah.edu]
+% Creation Date: Mon Jun 29 08:59:10 1992
+
+\documentstyle[]{article}
+
+\author{A. U. Thor}
+
+\date{}
+
+\title{Bibliography Style: {\tt {phaip}}}
+
+\pagestyle{myheadings}
+
+\markboth{Bibliography Style: {\tt {phaip}}}{Bibliography Style: {\tt {phaip}}}
+
+\begin{document}
+
+ \bibliographystyle{phaip}
+
+ \maketitle
+
+ \nocite{*}
+
+ \bibliography{test}
+
+\end{document}
diff --git a/biblio/bibtex/contrib/test/test-phapalik.ltx b/biblio/bibtex/contrib/test/test-phapalik.ltx
new file mode 100644
index 0000000000..f0c87fc34b
--- /dev/null
+++ b/biblio/bibtex/contrib/test/test-phapalik.ltx
@@ -0,0 +1,28 @@
+% -*-latex-*-
+% Document name: /usr/local/lib/tex/bibtex/test.ltx
+% Creator: Nelson H. F. Beebe [beebe@alfred.math.utah.edu]
+% Creation Date: Mon Jun 29 08:59:10 1992
+
+\documentstyle[]{article}
+
+\author{A. U. Thor}
+
+\date{}
+
+\title{Bibliography Style: {\tt {phapalik}}}
+
+\pagestyle{myheadings}
+
+\markboth{Bibliography Style: {\tt {phapalik}}}{Bibliography Style: {\tt {phapalik}}}
+
+\begin{document}
+
+ \bibliographystyle{phapalik}
+
+ \maketitle
+
+ \nocite{*}
+
+ \bibliography{test}
+
+\end{document}
diff --git a/biblio/bibtex/contrib/test/test-phcpc.ltx b/biblio/bibtex/contrib/test/test-phcpc.ltx
new file mode 100644
index 0000000000..6e5f0da97e
--- /dev/null
+++ b/biblio/bibtex/contrib/test/test-phcpc.ltx
@@ -0,0 +1,28 @@
+% -*-latex-*-
+% Document name: /usr/local/lib/tex/bibtex/test.ltx
+% Creator: Nelson H. F. Beebe [beebe@alfred.math.utah.edu]
+% Creation Date: Mon Jun 29 08:59:10 1992
+
+\documentstyle[]{article}
+
+\author{A. U. Thor}
+
+\date{}
+
+\title{Bibliography Style: {\tt {phcpc}}}
+
+\pagestyle{myheadings}
+
+\markboth{Bibliography Style: {\tt {phcpc}}}{Bibliography Style: {\tt {phcpc}}}
+
+\begin{document}
+
+ \bibliographystyle{phcpc}
+
+ \maketitle
+
+ \nocite{*}
+
+ \bibliography{test}
+
+\end{document}
diff --git a/biblio/bibtex/contrib/test/test-phiaea.ltx b/biblio/bibtex/contrib/test/test-phiaea.ltx
new file mode 100644
index 0000000000..1afeccb67f
--- /dev/null
+++ b/biblio/bibtex/contrib/test/test-phiaea.ltx
@@ -0,0 +1,28 @@
+% -*-latex-*-
+% Document name: /usr/local/lib/tex/bibtex/test.ltx
+% Creator: Nelson H. F. Beebe [beebe@alfred.math.utah.edu]
+% Creation Date: Mon Jun 29 08:59:10 1992
+
+\documentstyle[]{article}
+
+\author{A. U. Thor}
+
+\date{}
+
+\title{Bibliography Style: {\tt {phiaea}}}
+
+\pagestyle{myheadings}
+
+\markboth{Bibliography Style: {\tt {phiaea}}}{Bibliography Style: {\tt {phiaea}}}
+
+\begin{document}
+
+ \bibliographystyle{phiaea}
+
+ \maketitle
+
+ \nocite{*}
+
+ \bibliography{test}
+
+\end{document}
diff --git a/biblio/bibtex/contrib/test/test-phjcp.ltx b/biblio/bibtex/contrib/test/test-phjcp.ltx
new file mode 100644
index 0000000000..c97115efc6
--- /dev/null
+++ b/biblio/bibtex/contrib/test/test-phjcp.ltx
@@ -0,0 +1,28 @@
+% -*-latex-*-
+% Document name: /usr/local/lib/tex/bibtex/test.ltx
+% Creator: Nelson H. F. Beebe [beebe@alfred.math.utah.edu]
+% Creation Date: Mon Jun 29 08:59:10 1992
+
+\documentstyle[]{article}
+
+\author{A. U. Thor}
+
+\date{}
+
+\title{Bibliography Style: {\tt {phjcp}}}
+
+\pagestyle{myheadings}
+
+\markboth{Bibliography Style: {\tt {phjcp}}}{Bibliography Style: {\tt {phjcp}}}
+
+\begin{document}
+
+ \bibliographystyle{phjcp}
+
+ \maketitle
+
+ \nocite{*}
+
+ \bibliography{test}
+
+\end{document}
diff --git a/biblio/bibtex/contrib/test/test-phnf.ltx b/biblio/bibtex/contrib/test/test-phnf.ltx
new file mode 100644
index 0000000000..9e14991b3f
--- /dev/null
+++ b/biblio/bibtex/contrib/test/test-phnf.ltx
@@ -0,0 +1,28 @@
+% -*-latex-*-
+% Document name: /usr/local/lib/tex/bibtex/test.ltx
+% Creator: Nelson H. F. Beebe [beebe@alfred.math.utah.edu]
+% Creation Date: Mon Jun 29 08:59:10 1992
+
+\documentstyle[]{article}
+
+\author{A. U. Thor}
+
+\date{}
+
+\title{Bibliography Style: {\tt {phnf}}}
+
+\pagestyle{myheadings}
+
+\markboth{Bibliography Style: {\tt {phnf}}}{Bibliography Style: {\tt {phnf}}}
+
+\begin{document}
+
+ \bibliographystyle{phnf}
+
+ \maketitle
+
+ \nocite{*}
+
+ \bibliography{test}
+
+\end{document}
diff --git a/biblio/bibtex/contrib/test/test-phnflet.ltx b/biblio/bibtex/contrib/test/test-phnflet.ltx
new file mode 100644
index 0000000000..3f4f57588e
--- /dev/null
+++ b/biblio/bibtex/contrib/test/test-phnflet.ltx
@@ -0,0 +1,28 @@
+% -*-latex-*-
+% Document name: /usr/local/lib/tex/bibtex/test.ltx
+% Creator: Nelson H. F. Beebe [beebe@alfred.math.utah.edu]
+% Creation Date: Mon Jun 29 08:59:10 1992
+
+\documentstyle[]{article}
+
+\author{A. U. Thor}
+
+\date{}
+
+\title{Bibliography Style: {\tt {phnflet}}}
+
+\pagestyle{myheadings}
+
+\markboth{Bibliography Style: {\tt {phnflet}}}{Bibliography Style: {\tt {phnflet}}}
+
+\begin{document}
+
+ \bibliographystyle{phnflet}
+
+ \maketitle
+
+ \nocite{*}
+
+ \bibliography{test}
+
+\end{document}
diff --git a/biblio/bibtex/contrib/test/test-phpf.ltx b/biblio/bibtex/contrib/test/test-phpf.ltx
new file mode 100644
index 0000000000..6b74207147
--- /dev/null
+++ b/biblio/bibtex/contrib/test/test-phpf.ltx
@@ -0,0 +1,28 @@
+% -*-latex-*-
+% Document name: /usr/local/lib/tex/bibtex/test.ltx
+% Creator: Nelson H. F. Beebe [beebe@alfred.math.utah.edu]
+% Creation Date: Mon Jun 29 08:59:10 1992
+
+\documentstyle[]{article}
+
+\author{A. U. Thor}
+
+\date{}
+
+\title{Bibliography Style: {\tt {phpf}}}
+
+\pagestyle{myheadings}
+
+\markboth{Bibliography Style: {\tt {phpf}}}{Bibliography Style: {\tt {phpf}}}
+
+\begin{document}
+
+ \bibliographystyle{phpf}
+
+ \maketitle
+
+ \nocite{*}
+
+ \bibliography{test}
+
+\end{document}
diff --git a/biblio/bibtex/contrib/test/test-phppcf.ltx b/biblio/bibtex/contrib/test/test-phppcf.ltx
new file mode 100644
index 0000000000..8eb6f8161e
--- /dev/null
+++ b/biblio/bibtex/contrib/test/test-phppcf.ltx
@@ -0,0 +1,28 @@
+% -*-latex-*-
+% Document name: /usr/local/lib/tex/bibtex/test.ltx
+% Creator: Nelson H. F. Beebe [beebe@alfred.math.utah.edu]
+% Creation Date: Mon Jun 29 08:59:10 1992
+
+\documentstyle[]{article}
+
+\author{A. U. Thor}
+
+\date{}
+
+\title{Bibliography Style: {\tt {phppcf}}}
+
+\pagestyle{myheadings}
+
+\markboth{Bibliography Style: {\tt {phppcf}}}{Bibliography Style: {\tt {phppcf}}}
+
+\begin{document}
+
+ \bibliographystyle{phppcf}
+
+ \maketitle
+
+ \nocite{*}
+
+ \bibliography{test}
+
+\end{document}
diff --git a/biblio/bibtex/contrib/test/test-phreport.ltx b/biblio/bibtex/contrib/test/test-phreport.ltx
new file mode 100644
index 0000000000..809a6957c5
--- /dev/null
+++ b/biblio/bibtex/contrib/test/test-phreport.ltx
@@ -0,0 +1,28 @@
+% -*-latex-*-
+% Document name: /usr/local/lib/tex/bibtex/test.ltx
+% Creator: Nelson H. F. Beebe [beebe@alfred.math.utah.edu]
+% Creation Date: Mon Jun 29 08:59:10 1992
+
+\documentstyle[]{article}
+
+\author{A. U. Thor}
+
+\date{}
+
+\title{Bibliography Style: {\tt {phreport}}}
+
+\pagestyle{myheadings}
+
+\markboth{Bibliography Style: {\tt {phreport}}}{Bibliography Style: {\tt {phreport}}}
+
+\begin{document}
+
+ \bibliographystyle{phreport}
+
+ \maketitle
+
+ \nocite{*}
+
+ \bibliography{test}
+
+\end{document}
diff --git a/biblio/bibtex/contrib/test/test-phrmp.ltx b/biblio/bibtex/contrib/test/test-phrmp.ltx
new file mode 100644
index 0000000000..8c21535a26
--- /dev/null
+++ b/biblio/bibtex/contrib/test/test-phrmp.ltx
@@ -0,0 +1,28 @@
+% -*-latex-*-
+% Document name: /usr/local/lib/tex/bibtex/test.ltx
+% Creator: Nelson H. F. Beebe [beebe@alfred.math.utah.edu]
+% Creation Date: Mon Jun 29 08:59:10 1992
+
+\documentstyle[]{article}
+
+\author{A. U. Thor}
+
+\date{}
+
+\title{Bibliography Style: {\tt {phrmp}}}
+
+\pagestyle{myheadings}
+
+\markboth{Bibliography Style: {\tt {phrmp}}}{Bibliography Style: {\tt {phrmp}}}
+
+\begin{document}
+
+ \bibliographystyle{phrmp}
+
+ \maketitle
+
+ \nocite{*}
+
+ \bibliography{test}
+
+\end{document}
diff --git a/biblio/bibtex/contrib/test/test-plain.ltx b/biblio/bibtex/contrib/test/test-plain.ltx
new file mode 100644
index 0000000000..4d85f6e864
--- /dev/null
+++ b/biblio/bibtex/contrib/test/test-plain.ltx
@@ -0,0 +1,28 @@
+% -*-latex-*-
+% Document name: /usr/local/lib/tex/bibtex/test.ltx
+% Creator: Nelson H. F. Beebe [beebe@alfred.math.utah.edu]
+% Creation Date: Mon Jun 29 08:59:10 1992
+
+\documentstyle[]{article}
+
+\author{A. U. Thor}
+
+\date{}
+
+\title{Bibliography Style: {\tt {plain}}}
+
+\pagestyle{myheadings}
+
+\markboth{Bibliography Style: {\tt {plain}}}{Bibliography Style: {\tt {plain}}}
+
+\begin{document}
+
+ \bibliographystyle{plain}
+
+ \maketitle
+
+ \nocite{*}
+
+ \bibliography{test}
+
+\end{document}
diff --git a/biblio/bibtex/contrib/test/test-plainyr.ltx b/biblio/bibtex/contrib/test/test-plainyr.ltx
new file mode 100644
index 0000000000..08367480bb
--- /dev/null
+++ b/biblio/bibtex/contrib/test/test-plainyr.ltx
@@ -0,0 +1,28 @@
+% -*-latex-*-
+% Document name: /usr/local/lib/tex/bibtex/test.ltx
+% Creator: Nelson H. F. Beebe [beebe@alfred.math.utah.edu]
+% Creation Date: Mon Jun 29 08:59:10 1992
+
+\documentstyle[]{article}
+
+\author{A. U. Thor}
+
+\date{}
+
+\title{Bibliography Style: {\tt {plainyr}}}
+
+\pagestyle{myheadings}
+
+\markboth{Bibliography Style: {\tt {plainyr}}}{Bibliography Style: {\tt {plainyr}}}
+
+\begin{document}
+
+ \bibliographystyle{plainyr}
+
+ \maketitle
+
+ \nocite{*}
+
+ \bibliography{test}
+
+\end{document}
diff --git a/biblio/bibtex/contrib/test/test-siam.ltx b/biblio/bibtex/contrib/test/test-siam.ltx
new file mode 100644
index 0000000000..9cd67498b3
--- /dev/null
+++ b/biblio/bibtex/contrib/test/test-siam.ltx
@@ -0,0 +1,28 @@
+% -*-latex-*-
+% Document name: /usr/local/lib/tex/bibtex/test.ltx
+% Creator: Nelson H. F. Beebe [beebe@alfred.math.utah.edu]
+% Creation Date: Mon Jun 29 08:59:10 1992
+
+\documentstyle[]{article}
+
+\author{A. U. Thor}
+
+\date{}
+
+\title{Bibliography Style: {\tt {siam}}}
+
+\pagestyle{myheadings}
+
+\markboth{Bibliography Style: {\tt {siam}}}{Bibliography Style: {\tt {siam}}}
+
+\begin{document}
+
+ \bibliographystyle{siam}
+
+ \maketitle
+
+ \nocite{*}
+
+ \bibliography{test}
+
+\end{document}
diff --git a/biblio/bibtex/contrib/test/test-unsrt.ltx b/biblio/bibtex/contrib/test/test-unsrt.ltx
new file mode 100644
index 0000000000..0a85350c42
--- /dev/null
+++ b/biblio/bibtex/contrib/test/test-unsrt.ltx
@@ -0,0 +1,28 @@
+% -*-latex-*-
+% Document name: /usr/local/lib/tex/bibtex/test.ltx
+% Creator: Nelson H. F. Beebe [beebe@alfred.math.utah.edu]
+% Creation Date: Mon Jun 29 08:59:10 1992
+
+\documentstyle[]{article}
+
+\author{A. U. Thor}
+
+\date{}
+
+\title{Bibliography Style: {\tt {unsrt}}}
+
+\pagestyle{myheadings}
+
+\markboth{Bibliography Style: {\tt {unsrt}}}{Bibliography Style: {\tt {unsrt}}}
+
+\begin{document}
+
+ \bibliographystyle{unsrt}
+
+ \maketitle
+
+ \nocite{*}
+
+ \bibliography{test}
+
+\end{document}
diff --git a/biblio/bibtex/contrib/test/test.bib b/biblio/bibtex/contrib/test/test.bib
new file mode 100644
index 0000000000..d3b035bd43
--- /dev/null
+++ b/biblio/bibtex/contrib/test/test.bib
@@ -0,0 +1,839 @@
+%%% ====================================================================
+%%% BibTeX-file{
+%%% author = "David Rhead",
+%%% version = "1.00",
+%%% date = "17 Feb 1990",
+%%% time = "17:00 GMT",
+%%% filename = "test.bib",
+%%% address = "Cripps Computing Centre,
+%%% University of Nottingham,
+%%% University Park,
+%%% Nottingham,
+%%% NG7 2RD,
+%%% United Kingdom",
+%%% telephone = "+44 602 484848 Ext 2670",
+%%% FAX = "+44 602 588138",
+%%% checksum = "05151 839 2908 25082",
+%%% email = "David_Rhead at uk.ac.nott.vme (JANET)",
+%%% codetable = "ISO/ASCII",
+%%% keywords = "bibliography, citation, references",
+%%% supported = "no",
+%%% docstring = "This BibTeX database file contains entries
+%%% designed for testing whether a BibTeX style
+%%% file lays references out as recommended by
+%%% certain authorities. (Note, however, that
+%%% the BS 1629 examples are from the 1976
+%%% edition. The file needs updating to use
+%%% examples from the 1989 edition instead.)
+%%%
+%%% The checksum field above contains a CRC-16
+%%% checksum as the first value, followed by the
+%%% equivalent of the standard UNIX wc (word
+%%% count) utility output of lines, words, and
+%%% characters. This is produced by Robert
+%%% Solovay's checksum utility.",
+%%% }
+%%% ====================================================================
+
+
+%% @COMMENT{Some standard works describing conventions for citations
+%% and bibliographies}
+
+@Techreport{bs-1629,
+ author = "BSI",
+ title = "Bibliographic References",
+ institution = "British Standards Institution",
+ year = "1976",
+ type = "BS",
+ number = "1629",
+}
+
+@Techreport{bs-5605,
+ author = "BSI",
+ title = "Citing Publications by Bibliographic References",
+ institution = "British Standards Institution",
+ year = "1978",
+ type = "BS",
+ number = "5606",
+}
+
+@Techreport{bs-6371,
+ author = "BSI",
+ title = "Citation of unpublished documents",
+ institution = "British Standards Institution",
+ year = "1983",
+ type = "BS",
+ number = "6371",
+}
+
+@Book{butcher-81,
+ title = "Copy-editing",
+ author = "Judith Butcher",
+ publisher = "Cambridge University Press",
+ year = "1981",
+ edition = "2nd",
+}
+
+@Book{chicago-82,
+ title = "The {C}hicago Manual of Style",
+ author = "`Chicago'",
+ year = "1982",
+ publisher = "University of Chicago Press",
+ edition = "13th",
+}
+
+%% @COMMENT{Some examples taken from the document describing BS 5605}
+
+@Article{howells-51,
+ author = "W. W. Howells",
+ title = "Factors of Human Physique",
+ journal = "American Journal of Physical Anthropology",
+ volume = "9",
+ pages = "159--192",
+ year = "1951",
+}
+
+@Article{howells-66-pop,
+ author = "W. W. Howells",
+ title = "Population Distances: Biological, Linguistic,
+ Geographical and Environmental",
+ journal = "Current Anthropology",
+ volume = "7",
+ pages = "531--540",
+ year = "1966",
+}
+
+@Article{howells-66-var,
+ author = "W. W. Howells",
+ title = "Variability in Family Lines vs. Population
+ Variability",
+ journal = "Annals of the {New York Academy of Sciences}",
+ volume = "134",
+ pages = "624--631",
+ year = "1966",
+}
+
+@Article{johnson-74,
+ author = "G. B. Johnson",
+ title = "Enzyme Polymorphism",
+ journal = "Science",
+ volume = "184",
+ pages = "28--37",
+ year = "1974",
+}
+
+@Article{johnson-howells,
+ author = "G. B. Johnson and W. W. Howells",
+ title = "Title title title title title title title title title
+ title",
+ journal = "Journal journal journal",
+ year = "1974",
+}
+
+@Article{johnson-etc,
+ author = "G. B. Johnson and W. W. Howells and A. N. Other",
+ title = "Title title title title title title title title title
+ title",
+ journal = "Journal journal journal",
+ year = "1976",
+}
+
+@Manual{anon-67,
+ author = "Anon.",
+ title = "Title title title title title title title title title
+ title",
+ organization = "Organization organization organization",
+ year = "1967",
+}
+
+@Article{aslin-49,
+ author = "E. J. Aslin",
+ title = "Photostat recording in library work",
+ journal = "Aslib Proceedings",
+ year = "1949",
+ volume = "1",
+ pages = "49--52",
+}
+
+@Article{fletcher-hopkins,
+ author = "W. M. Fletcher and F. G. Hopkins",
+ title = "Lactic Acid in Amphibian Muscle",
+ journal = "J. Physiol.",
+ year = "1907",
+ volume = "35",
+ pages = "247--309",
+}
+
+@Incollection{hanson-67,
+ author = "C. W. Hanson",
+ title = "Subject inquiries and literature searching",
+ booktitle = "Handbook of special librarianship and information
+ work",
+ editor = "W. Ashworth",
+ year = "1967",
+ edition = "3rd",
+ pages = "414--452",
+}
+
+@Inbook{wright-63,
+ author = "R. C. Wright",
+ title = "Report Literature",
+ booktitle = "Special Materials in the Library",
+ editor = "J. Burkett and T. S. Morgan",
+ year = "1963",
+ pages = "46--59",
+}
+
+@Book{BCM-59,
+ author = "{Association of British Chemical Manufacturers}",
+ title = "British chemicals and their manufacturers",
+ year = "1959",
+}
+
+@Inbook{feigl-58,
+ author = "F. Feigl",
+ title = "Spot Tests in Organic Analysis",
+ year = "1958",
+ publisher = "Publisher publisher",
+ edition = "5th",
+ chapter = "6",
+}
+
+%% @COMMENT{Some examples taken from document describing BS 1629}
+
+@Book{hoel-71-whole,
+ author = "Paul Gerhard Hoel",
+ title = "Elementary Statistics",
+ publisher = "Wiley",
+ year = "1971",
+ series = "Wiley series in probability and mathematical
+ statistics",
+ address = "New York, Chichester",
+ edition = "3rd",
+ note = "ISBN 0~471~40300",
+}
+
+@Inbook{hoel-71-portion,
+ author = "Paul Gerhard Hoel",
+ title = "Elementary Statistics",
+ publisher = "Wiley",
+ year = "1971",
+ series = "Wiley series in probability and mathematical
+ statistics",
+ address = "New York, Chichester",
+ edition = "3rd",
+ note = "ISBN 0~471~40300",
+ pages = "19--33",
+}
+
+@Book{singer-whole,
+ year = "1954--58",
+ editor = "Charles Joseph Singer and E. J. Holmyard and A. R.
+ Hall",
+ title = "A history of technology",
+ address = "London",
+ publisher = "Oxford University Press",
+ note = "5 vol.",
+}
+
+@Incollection{singer-portion-chapter,
+ title = "The late nineteenth century",
+ year = "1954--58",
+ editor = "Charles Joseph Singer and E. J. Holmyard and A. R.
+ Hall",
+ booktitle = "A history of technology",
+ address = "London",
+ publisher = "Oxford University Press",
+ type = "Vol.",
+ chapter = "5",
+}
+
+@Incollection{singer-portion-volume,
+ title = "The late nineteenth century",
+ year = "1954--58",
+ editor = "Charles Joseph Singer and E. J. Holmyard and A. R.
+ Hall",
+ booktitle = "A history of technology",
+ address = "London",
+ publisher = "Oxford University Press",
+ volume = "5",
+}
+
+@Manual{bs-2570-manual,
+ author = "BSI",
+ title = "Natural Fibre Twines",
+ organization = "British Standards Institution",
+ address = "London",
+ edition = "3rd",
+ year = "1973",
+ note = "BS 2570",
+}
+
+@Techreport{bs-2570-techreport,
+ author = "BSI",
+ title = "Natural Fibre Twines",
+ institution = "British Standards Institution",
+ address = "London",
+ year = "1973",
+ type = "BS",
+ number = "2570",
+ note = "3rd. edn.",
+}
+
+@Inbook{bs-2570-inbook,
+ author = "BSI",
+ title = "{BS} 2570: Natural Fibre Twines",
+ publisher = "British Standards Institution",
+ address = "London",
+ year = "1973",
+ edition = "3rd",
+ chapter = "5",
+ type = "{Table}",
+}
+
+@Techreport{ellis-walton,
+ author = "B. Ellis and A. K. Walton",
+ title = "A Bibliography on Optical Modulators",
+ institution = "Royal Aircraft Establishment",
+ year = "1971",
+ number = "RAE-TR-71009",
+}
+
+@Article{godfrey-59,
+ author = "G. Bernard Godfrey",
+ title = "Joints in Tubular Structures",
+ journal = "Struct. Eng.",
+ year = "1959",
+ volume = "37",
+ number = "4",
+ pages = "126--135",
+}
+
+@Incollection{ramsbottom-31,
+ author = "John Ramsbottom",
+ title = "Fungi Pathogenic to Man",
+ booktitle = "A System of Bacteriology in relation to Medicine",
+ publisher = "HMSO, for Medical Research Council",
+ year = "1931",
+ volume = "8",
+ pages = "11--70",
+ address = "London",
+}
+
+@Article{hanlon-72,
+ author = "Joseph Hanlon",
+ title = "Designing Buildings by Computer",
+ journal = "New Scientist",
+ year = "1972",
+ month = "31~" # aug,
+ pages = "429--432",
+}
+
+@Techreport{winget-67,
+ author = "{Winget Ltd.}",
+ title = "Detachable Bulldozer Attachment for Dumper Vehicles",
+ year = "1967",
+ type = "GB Patent Specification",
+ number = "1060631",
+ month = "8~" # mar,
+}
+
+@Article{bry-afflerbach,
+ author = "I. Bry and L. Afflerbach",
+ title = "In search of an organizing principle for behavioural
+ science literature",
+ journal = "Community Mental Health",
+ year = "1968",
+ volume = "4",
+ number = "1",
+ pages = "75--84",
+}
+
+@Incollection{ranganathan-51,
+ author = "S. R. Ranganthan",
+ title = "Colon classification and its approach to
+ documentation",
+ booktitle = "Bibliographic Organization",
+ editor = "Jesse H. Shera and Margaret E. Egan",
+ year = "1951",
+ pages = "94--105",
+}
+
+@Book{mccolvin-nodate,
+ author = "L. R. McColvin",
+ title = "Libraries in {Britain}",
+ publisher = "{Longmans Green, for the British Council}",
+ address = "London",
+}
+
+%% @COMMENT{Some examples taken from document describing BS 6371}
+
+@Unpublished{exchequer-34-39,
+ author = "Exchequer",
+ year = "1634--1639",
+ title = "Act books",
+ note = "Edinburgh, Scottish Record Office, E.4/5",
+}
+
+@Unpublished{traquair-38,
+ author = "{Earl of} Traquair",
+ year = "1638",
+ title = "Letter to {Marquess of Hamilton, 28 Aug.}",
+ note = "Lennoxlove (E.~Lothian), Muniments of Duke of
+ Hamilton and Brandon, C.1, no. 963",
+}
+
+@Unpublished{pym-24,
+ author = "J. Pym",
+ year = "1624",
+ title = "Diary",
+ note = "Northampton, Northamptonshire Record Office,
+ Finch-Hatton 50",
+}
+
+@Phdthesis{croft-78,
+ author = "W. B. Croft",
+ year = "1978",
+ title = "Organizing and searching large files of document
+ descriptions",
+ school = "Cambridge University",
+}
+
+%% @COMMENT{Some examples taken from Chapter 10 of "Copy-editing"
+%% by Judith Butcher}
+
+@Book{darcy-20-amaz,
+ author = "Firstname D'Arcy",
+ title = "Title title title title title title title title title
+ title",
+ publisher = "Publisher publisher publisher",
+ year = "1920",
+}
+
+@Book{darcy-20-again,
+ author = "Firstname D'Arcy",
+ title = "Title title title title title title title title title
+ title",
+ publisher = "Publisher publisher publisher",
+ year = "1920",
+}
+
+@Article{jones-n-h-r,
+ author = "Firstname Jones and Firstname Norman and Firstname
+ Hazel and Firstname Robinson",
+ title = "Title title title title title title title title title
+ title",
+ year = "1962",
+ journal = "Journal journal journal",
+}
+
+@Article{jones-s-r,
+ author = "Firstname Jones and Firstname Smith and Firstname
+ Robinson",
+ title = "Title title title title title title title title title
+ title",
+ year = "1962",
+ journal = "Journal journal journal",
+}
+
+@Article{jones-65,
+ author = "Firstname Jones",
+ title = "Title title title title title title title title title
+ title",
+ year = "1965",
+ journal = "Journal journal journal",
+}
+
+@Article{jones-69,
+ author = "Firstname Jones",
+ title = "Title title title title title title title title title
+ title",
+ year = "1969",
+ journal = "Journal journal journal",
+}
+
+@Article{jones-abrams,
+ author = "Firstname Jones and Firstname Abrams",
+ title = "Title title title title title title title title title
+ title",
+ year = "1968",
+ journal = "Journal journal journal",
+}
+
+@Article{jones-smith,
+ author = "Firstname Jones and Firstname Smith",
+ title = "Title title title title title title title title title
+ title",
+ year = "1965",
+ journal = "Journal journal journal",
+}
+
+@Article{jones-a-s,
+ author = "Firstname Jones and Firstname Abrams and Firstname
+ Smith",
+ title = "Title title title title title title title title title
+ title",
+ year = "1966",
+ journal = "Journal journal journal",
+}
+
+@Article{bloggs-60,
+ author = "A. J. Bloggs",
+ title = "Title title title title title title title title title
+ title",
+ journal = "Journal journal journal",
+ year = "1960",
+}
+
+@Article{bloggs-61,
+ author = "A. J. Bloggs",
+ title = "Title title title title title title title title title
+ title",
+ journal = "Journal journal journal",
+ year = "1961",
+}
+
+@Article{bloggs-jones,
+ author = "A. J. Bloggs and X. Y. Jones",
+ title = "Title title title title title title title title title
+ title",
+ journal = "Journal journal journal",
+ year = "1959",
+}
+
+@Article{bloggs-s-j,
+ author = "A. J. Bloggs and R. S. Smith and X. Y. Jones",
+ title = "Title title title title title title title title title
+ title",
+ journal = "Journal journal journal",
+ year = "1955",
+}
+
+@Article{brown-f-s,
+ author = "H. W. Brown and A. S. Forbes and S. D. Smith",
+ title = "Title title title title title title title title title
+ title",
+ journal = "Journal journal journal",
+ year = "1900",
+}
+
+@Incollection{eckstein-zuckerman,
+ author = "P. Eckstein and S. Zuckermann",
+ title = "Morphology of the Reproductive Tract",
+ booktitle = "Marshall's Physiology of Reproduction",
+ publisher = "Longman",
+ year = "1960",
+ editor = "A. S. Parkes",
+ volume = "1",
+ pages = "43--154",
+ address = "London",
+}
+
+@Article{heller-lederis,
+ author = "H. Heller and K. Lederis",
+ title = "Paper chromatography of small amounts of vasopressin
+ and oxytocin",
+ year = "1958",
+ journal = "Nature",
+ address = "London",
+ volume = "182",
+ pages = "1231--2",
+}
+
+@Book{wood-61,
+ author = "R. H. Wood",
+ title = "Plastic and Elastic Design of Slabs and Plates",
+ publisher = "Thames \& Hudson",
+ address = "London",
+ year = "1961",
+}
+
+%% @COMMENT{Some examples taken from Chapter 15 of the Chicago Manual of Style}
+
+@Book{pratt-75,
+ author = "Firstname Pratt",
+ title = "Title title title title title title title title title
+ title",
+ publisher = "Publisher publisher publisher",
+ year = "1975",
+}
+
+@Article{light-72,
+ author = "Firstname Light",
+ title = "Title title title title title title title title title
+ title",
+ journal = "Journal journal journal",
+ year = "1972",
+}
+
+@Article{light-wong,
+ author = "Firstname Light and Firstname Wong",
+ title = "Title title title title title title title title title
+ title",
+ journal = "Journal journal journal",
+ year = "1975",
+}
+
+@Article{kingston-76,
+ author = "Firstname Kingston",
+ title = "Title title title title title title title title title
+ title",
+ journal = "Journal journal journal",
+ year = "1976",
+}
+
+@Article{kelley-96-spring,
+ author = "Firstname Kelley",
+ title = "Title title title title title title title title title
+ title",
+ journal = "Journal journal journal",
+ year = "1896",
+}
+
+@Article{kelley-96-autumn,
+ author = "Firstname Kelley",
+ title = "Title title title title title title title title title
+ title",
+ journal = "Journal journal journal",
+ year = "1896",
+}
+
+@Article{kelley-07,
+ author = "Firstname Kelley",
+ title = "Title title title title title title title title title
+ title",
+ journal = "Journal journal journal",
+ year = "1907",
+}
+
+@Book{strong-01,
+ author = "Firstname Strong",
+ title = "Title title title title title title title title title
+ title",
+ publisher = "Publisher publisher publisher",
+ year = "1901",
+}
+
+@Book{strong-02,
+ author = "Firstname Strong",
+ title = "Title title title title title title title title title
+ title",
+ publisher = "Publisher publisher publisher",
+ year = "1902",
+}
+
+@Book{shotwell-01,
+ author = "Firstname Shotwell",
+ title = "Title title title title title title title title title
+ title",
+ publisher = "Publisher publisher publisher",
+ year = "1901",
+}
+
+%% @COMMENT{Some examples taken from Chapter 16 of the Chicago Manual of Style}
+
+@Techreport{brunswick-85,
+ author = "`Brunswick'",
+ title = "The piper and the rats: A musical experiment",
+ institution = "Rodent Activities Termination Section (RATS), Pest
+ Control Division, Brunswick Public Welfare Department",
+ year = "1985",
+ number = "1984",
+ address = "Hamelin",
+}
+
+@Book{kendeigh-52,
+ author = "S. C. Kendeigh",
+ year = "1952",
+ title = "Parental care and its evolution in birds",
+ series = "Illinois Biological Monographs",
+ volume = "22",
+ number = "1--3",
+ address = "Champaign",
+ publisher = "Univ. of Illinois Press",
+}
+
+@Book{chapman-75,
+ author = "Jefferson Chapman",
+ year = "1975",
+ title = "The {Icehouse Bottom} Site---{40MR23}",
+ series = "University of Tennessee Department of Anthropology
+ Publication",
+ number = "23",
+ address = "Knoxville",
+ publisher = "Univ. of Tennessee Press",
+}
+
+@Book{hershkovitz-62,
+ author = "P. Hershkovitz",
+ year = "1962",
+ title = "Evolution of {Neotropical} cricetine rodents
+ ({Muridae}) with special reference to the phyllotine
+ group",
+ series = "Fieldiana: Zoology",
+ volume = "46",
+ address = "Chicago",
+ publisher = "Field Museum of Natural History",
+}
+
+@Book{wright-78-book,
+ title = "Evolution and the genetics of populations",
+ author = "Sewall Wright",
+ year = "1978",
+ address = "Chicago",
+ publisher = "Univ. of Chicago Press",
+ volume = "4",
+}
+
+@Incollection{wright-78-incollection,
+ title = "Variability within and among natural populations",
+ author = "Sewall Wright",
+ booktitle = "Evolution and the genetics of populations",
+ year = "1978",
+ address = "Chicago",
+ publisher = "Univ. of Chicago Press",
+ type = "Vol.",
+ chapter = "4",
+}
+
+@Incollection{ogilvy-65,
+ author = "David Ogilvy",
+ title = "The Creative Chef",
+ booktitle = "The Creative Organization",
+ year = "1965",
+ editor = "Gary A. Steiner",
+ address = "Chicago",
+ publisher = "University of Chicago Press",
+ pages = "199--213",
+}
+
+@Incollection{mcneill-63,
+ author = "William H. McNeill",
+ year = "1963",
+ title = "The Era of {Middle Eastern} Dominance to 500 {\sc
+ b.c.}",
+ booktitle = "The Rise of the {West}",
+ publisher = "{University of Chicago Press}",
+ address = "Chicago",
+ type = "Part",
+ chapter = "1",
+}
+
+@Incollection{thomson-71,
+ author = "Virgil Thomson",
+ title = "Cage and the Collage of Noises",
+ booktitle = "American Music since 1910",
+ address = "New York",
+ publisher = "Holt, Rinehart and Winston",
+ year = "1971",
+ chapter = "8",
+}
+
+@Incollection{gordon-75,
+ title = "The Tunes of {Chicken Little}",
+ author = "Robert Gordon",
+ year = "1975",
+ booktitle = "Playwrights for Tomorrow: A Collection of Plays",
+ editor = "Arthur H. Ballet",
+ volume = "13",
+ address = "Minneapolis",
+ publisher = "University of Minnesota Press",
+ note = "One of four plays included in vol. 13",
+}
+
+@Incollection{milton-24,
+ author = "John Milton",
+ title = "Paradise Lost",
+ booktitle = "The Complete Poetical Works of {John Milton}",
+ edition = "{Student's Cambridge}",
+ address = "Boston",
+ publisher = "Houghton Mifflin",
+ year = "1924",
+ editor = "William Vaughn Moody",
+}
+
+@Inproceedings{chomsky-73,
+ author = "N. Chomsky",
+ year = "1973",
+ title = "Conditions on Transformations",
+ booktitle = "A festschrift for {Morris Halle}",
+ editor = "S. R. Anderson and P. Kiparsky",
+ publisher = "Holt, Rinehart \& Winston",
+ address = "New York",
+}
+
+@Inproceedings{chave-64,
+ author = "K. E. Chave",
+ year = "1964",
+ title = "Skeletal durability and preservation",
+ booktitle = "Approaches to paleoecology",
+ editor = "J. Imbrie and N. Newel",
+ address = "New York",
+ publisher = "Wiley",
+ pages = "377--87",
+}
+
+@Book{smart-76,
+ author = "Ninian Smart",
+ year = "1976",
+ title = "The religious experience of mankind",
+ publisher = "Schribner",
+ address = "New York",
+ edition = "2nd",
+}
+
+@Article{jackson-79,
+ author = "Richard Jackson",
+ year = "1979",
+ title = "Running down the up-escalator: Regional inequality in
+ {Papua New Guinea}",
+ journal = "Australian Geographer",
+ volume = "14",
+ month = may,
+ pages = "175--84",
+}
+
+@Article{prufer-64,
+ author = "Olaf Prufer",
+ year = "1964",
+ title = "The {Hopewell} Cult",
+ journal = "Scientific {American}",
+ month = dec,
+ pages = "90--102",
+}
+
+@Phdthesis{mann-68,
+ author = "A. E. Mann",
+ year = "1968",
+ title = "The palaeodemography of {Australopithecus}",
+ type = "Ph.D. diss.",
+ school = "University of California, Berkeley",
+}
+
+@Phdthesis{maguire-76,
+ author = "J. Maguire",
+ year = "1976",
+ title = "A taxonomic and ecological study of the living and
+ fossil {Hystricidae} with particular reference to
+ southern {Africa}",
+ type = "Ph.D. diss.",
+ school = "Department of Geology, University of the
+ Witwatersrand",
+ address = "Johannesburg",
+}
+
+@Unpublished{downes-74,
+ title = "Systemic grammar and structural sentence relatedness",
+ author = "W. J. Downes",
+ year = "1974",
+ note = "London School of Economics. Mimeo.",
+}
+
+@Misc{hunt-76,
+ author = "Horace [pseud.] Hunt",
+ title = "Interview",
+ year = "1976",
+ howpublished = "Tape recording, Pennsylvania Historical and Museum
+ Commission, Harrisburg",
+ note = "Interview by {Ronald Schatz, 16 May 1976}",
+}
diff --git a/biblio/bibtex/contrib/test/test.ltx b/biblio/bibtex/contrib/test/test.ltx
new file mode 100644
index 0000000000..4d85f6e864
--- /dev/null
+++ b/biblio/bibtex/contrib/test/test.ltx
@@ -0,0 +1,28 @@
+% -*-latex-*-
+% Document name: /usr/local/lib/tex/bibtex/test.ltx
+% Creator: Nelson H. F. Beebe [beebe@alfred.math.utah.edu]
+% Creation Date: Mon Jun 29 08:59:10 1992
+
+\documentstyle[]{article}
+
+\author{A. U. Thor}
+
+\date{}
+
+\title{Bibliography Style: {\tt {plain}}}
+
+\pagestyle{myheadings}
+
+\markboth{Bibliography Style: {\tt {plain}}}{Bibliography Style: {\tt {plain}}}
+
+\begin{document}
+
+ \bibliographystyle{plain}
+
+ \maketitle
+
+ \nocite{*}
+
+ \bibliography{test}
+
+\end{document}
diff --git a/biblio/bibtex/contrib/urlbst/LICENCE-gpl-2.0.txt b/biblio/bibtex/contrib/urlbst/LICENCE-gpl-2.0.txt
new file mode 100644
index 0000000000..d159169d10
--- /dev/null
+++ b/biblio/bibtex/contrib/urlbst/LICENCE-gpl-2.0.txt
@@ -0,0 +1,339 @@
+ GNU GENERAL PUBLIC LICENSE
+ Version 2, June 1991
+
+ Copyright (C) 1989, 1991 Free Software Foundation, Inc.,
+ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+ Preamble
+
+ The licenses for most software are designed to take away your
+freedom to share and change it. By contrast, the GNU General Public
+License is intended to guarantee your freedom to share and change free
+software--to make sure the software is free for all its users. This
+General Public License applies to most of the Free Software
+Foundation's software and to any other program whose authors commit to
+using it. (Some other Free Software Foundation software is covered by
+the GNU Lesser General Public License instead.) You can apply it to
+your programs, too.
+
+ When we speak of free software, we are referring to freedom, not
+price. Our General Public Licenses are designed to make sure that you
+have the freedom to distribute copies of free software (and charge for
+this service if you wish), that you receive source code or can get it
+if you want it, that you can change the software or use pieces of it
+in new free programs; and that you know you can do these things.
+
+ To protect your rights, we need to make restrictions that forbid
+anyone to deny you these rights or to ask you to surrender the rights.
+These restrictions translate to certain responsibilities for you if you
+distribute copies of the software, or if you modify it.
+
+ For example, if you distribute copies of such a program, whether
+gratis or for a fee, you must give the recipients all the rights that
+you have. You must make sure that they, too, receive or can get the
+source code. And you must show them these terms so they know their
+rights.
+
+ We protect your rights with two steps: (1) copyright the software, and
+(2) offer you this license which gives you legal permission to copy,
+distribute and/or modify the software.
+
+ Also, for each author's protection and ours, we want to make certain
+that everyone understands that there is no warranty for this free
+software. If the software is modified by someone else and passed on, we
+want its recipients to know that what they have is not the original, so
+that any problems introduced by others will not reflect on the original
+authors' reputations.
+
+ Finally, any free program is threatened constantly by software
+patents. We wish to avoid the danger that redistributors of a free
+program will individually obtain patent licenses, in effect making the
+program proprietary. To prevent this, we have made it clear that any
+patent must be licensed for everyone's free use or not licensed at all.
+
+ The precise terms and conditions for copying, distribution and
+modification follow.
+
+ GNU GENERAL PUBLIC LICENSE
+ TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
+
+ 0. This License applies to any program or other work which contains
+a notice placed by the copyright holder saying it may be distributed
+under the terms of this General Public License. The "Program", below,
+refers to any such program or work, and a "work based on the Program"
+means either the Program or any derivative work under copyright law:
+that is to say, a work containing the Program or a portion of it,
+either verbatim or with modifications and/or translated into another
+language. (Hereinafter, translation is included without limitation in
+the term "modification".) Each licensee is addressed as "you".
+
+Activities other than copying, distribution and modification are not
+covered by this License; they are outside its scope. The act of
+running the Program is not restricted, and the output from the Program
+is covered only if its contents constitute a work based on the
+Program (independent of having been made by running the Program).
+Whether that is true depends on what the Program does.
+
+ 1. You may copy and distribute verbatim copies of the Program's
+source code as you receive it, in any medium, provided that you
+conspicuously and appropriately publish on each copy an appropriate
+copyright notice and disclaimer of warranty; keep intact all the
+notices that refer to this License and to the absence of any warranty;
+and give any other recipients of the Program a copy of this License
+along with the Program.
+
+You may charge a fee for the physical act of transferring a copy, and
+you may at your option offer warranty protection in exchange for a fee.
+
+ 2. You may modify your copy or copies of the Program or any portion
+of it, thus forming a work based on the Program, and copy and
+distribute such modifications or work under the terms of Section 1
+above, provided that you also meet all of these conditions:
+
+ a) You must cause the modified files to carry prominent notices
+ stating that you changed the files and the date of any change.
+
+ b) You must cause any work that you distribute or publish, that in
+ whole or in part contains or is derived from the Program or any
+ part thereof, to be licensed as a whole at no charge to all third
+ parties under the terms of this License.
+
+ c) If the modified program normally reads commands interactively
+ when run, you must cause it, when started running for such
+ interactive use in the most ordinary way, to print or display an
+ announcement including an appropriate copyright notice and a
+ notice that there is no warranty (or else, saying that you provide
+ a warranty) and that users may redistribute the program under
+ these conditions, and telling the user how to view a copy of this
+ License. (Exception: if the Program itself is interactive but
+ does not normally print such an announcement, your work based on
+ the Program is not required to print an announcement.)
+
+These requirements apply to the modified work as a whole. If
+identifiable sections of that work are not derived from the Program,
+and can be reasonably considered independent and separate works in
+themselves, then this License, and its terms, do not apply to those
+sections when you distribute them as separate works. But when you
+distribute the same sections as part of a whole which is a work based
+on the Program, the distribution of the whole must be on the terms of
+this License, whose permissions for other licensees extend to the
+entire whole, and thus to each and every part regardless of who wrote it.
+
+Thus, it is not the intent of this section to claim rights or contest
+your rights to work written entirely by you; rather, the intent is to
+exercise the right to control the distribution of derivative or
+collective works based on the Program.
+
+In addition, mere aggregation of another work not based on the Program
+with the Program (or with a work based on the Program) on a volume of
+a storage or distribution medium does not bring the other work under
+the scope of this License.
+
+ 3. You may copy and distribute the Program (or a work based on it,
+under Section 2) in object code or executable form under the terms of
+Sections 1 and 2 above provided that you also do one of the following:
+
+ a) Accompany it with the complete corresponding machine-readable
+ source code, which must be distributed under the terms of Sections
+ 1 and 2 above on a medium customarily used for software interchange; or,
+
+ b) Accompany it with a written offer, valid for at least three
+ years, to give any third party, for a charge no more than your
+ cost of physically performing source distribution, a complete
+ machine-readable copy of the corresponding source code, to be
+ distributed under the terms of Sections 1 and 2 above on a medium
+ customarily used for software interchange; or,
+
+ c) Accompany it with the information you received as to the offer
+ to distribute corresponding source code. (This alternative is
+ allowed only for noncommercial distribution and only if you
+ received the program in object code or executable form with such
+ an offer, in accord with Subsection b above.)
+
+The source code for a work means the preferred form of the work for
+making modifications to it. For an executable work, complete source
+code means all the source code for all modules it contains, plus any
+associated interface definition files, plus the scripts used to
+control compilation and installation of the executable. However, as a
+special exception, the source code distributed need not include
+anything that is normally distributed (in either source or binary
+form) with the major components (compiler, kernel, and so on) of the
+operating system on which the executable runs, unless that component
+itself accompanies the executable.
+
+If distribution of executable or object code is made by offering
+access to copy from a designated place, then offering equivalent
+access to copy the source code from the same place counts as
+distribution of the source code, even though third parties are not
+compelled to copy the source along with the object code.
+
+ 4. You may not copy, modify, sublicense, or distribute the Program
+except as expressly provided under this License. Any attempt
+otherwise to copy, modify, sublicense or distribute the Program is
+void, and will automatically terminate your rights under this License.
+However, parties who have received copies, or rights, from you under
+this License will not have their licenses terminated so long as such
+parties remain in full compliance.
+
+ 5. You are not required to accept this License, since you have not
+signed it. However, nothing else grants you permission to modify or
+distribute the Program or its derivative works. These actions are
+prohibited by law if you do not accept this License. Therefore, by
+modifying or distributing the Program (or any work based on the
+Program), you indicate your acceptance of this License to do so, and
+all its terms and conditions for copying, distributing or modifying
+the Program or works based on it.
+
+ 6. Each time you redistribute the Program (or any work based on the
+Program), the recipient automatically receives a license from the
+original licensor to copy, distribute or modify the Program subject to
+these terms and conditions. You may not impose any further
+restrictions on the recipients' exercise of the rights granted herein.
+You are not responsible for enforcing compliance by third parties to
+this License.
+
+ 7. If, as a consequence of a court judgment or allegation of patent
+infringement or for any other reason (not limited to patent issues),
+conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License. If you cannot
+distribute so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you
+may not distribute the Program at all. For example, if a patent
+license would not permit royalty-free redistribution of the Program by
+all those who receive copies directly or indirectly through you, then
+the only way you could satisfy both it and this License would be to
+refrain entirely from distribution of the Program.
+
+If any portion of this section is held invalid or unenforceable under
+any particular circumstance, the balance of the section is intended to
+apply and the section as a whole is intended to apply in other
+circumstances.
+
+It is not the purpose of this section to induce you to infringe any
+patents or other property right claims or to contest validity of any
+such claims; this section has the sole purpose of protecting the
+integrity of the free software distribution system, which is
+implemented by public license practices. Many people have made
+generous contributions to the wide range of software distributed
+through that system in reliance on consistent application of that
+system; it is up to the author/donor to decide if he or she is willing
+to distribute software through any other system and a licensee cannot
+impose that choice.
+
+This section is intended to make thoroughly clear what is believed to
+be a consequence of the rest of this License.
+
+ 8. If the distribution and/or use of the Program is restricted in
+certain countries either by patents or by copyrighted interfaces, the
+original copyright holder who places the Program under this License
+may add an explicit geographical distribution limitation excluding
+those countries, so that distribution is permitted only in or among
+countries not thus excluded. In such case, this License incorporates
+the limitation as if written in the body of this License.
+
+ 9. The Free Software Foundation may publish revised and/or new versions
+of the General Public License from time to time. Such new versions will
+be similar in spirit to the present version, but may differ in detail to
+address new problems or concerns.
+
+Each version is given a distinguishing version number. If the Program
+specifies a version number of this License which applies to it and "any
+later version", you have the option of following the terms and conditions
+either of that version or of any later version published by the Free
+Software Foundation. If the Program does not specify a version number of
+this License, you may choose any version ever published by the Free Software
+Foundation.
+
+ 10. If you wish to incorporate parts of the Program into other free
+programs whose distribution conditions are different, write to the author
+to ask for permission. For software which is copyrighted by the Free
+Software Foundation, write to the Free Software Foundation; we sometimes
+make exceptions for this. Our decision will be guided by the two goals
+of preserving the free status of all derivatives of our free software and
+of promoting the sharing and reuse of software generally.
+
+ NO WARRANTY
+
+ 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
+FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
+OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
+PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
+OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
+TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
+PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
+REPAIR OR CORRECTION.
+
+ 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
+WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
+REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
+INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
+OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
+TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
+YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
+PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
+POSSIBILITY OF SUCH DAMAGES.
+
+ END OF TERMS AND CONDITIONS
+
+ How to Apply These Terms to Your New Programs
+
+ If you develop a new program, and you want it to be of the greatest
+possible use to the public, the best way to achieve this is to make it
+free software which everyone can redistribute and change under these terms.
+
+ To do so, attach the following notices to the program. It is safest
+to attach them to the start of each source file to most effectively
+convey the exclusion of warranty; and each file should have at least
+the "copyright" line and a pointer to where the full notice is found.
+
+ <one line to give the program's name and a brief idea of what it does.>
+ Copyright (C) <year> <name of author>
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License along
+ with this program; if not, write to the Free Software Foundation, Inc.,
+ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+
+Also add information on how to contact you by electronic and paper mail.
+
+If the program is interactive, make it output a short notice like this
+when it starts in an interactive mode:
+
+ Gnomovision version 69, Copyright (C) year name of author
+ Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
+ This is free software, and you are welcome to redistribute it
+ under certain conditions; type `show c' for details.
+
+The hypothetical commands `show w' and `show c' should show the appropriate
+parts of the General Public License. Of course, the commands you use may
+be called something other than `show w' and `show c'; they could even be
+mouse-clicks or menu items--whatever suits your program.
+
+You should also get your employer (if you work as a programmer) or your
+school, if any, to sign a "copyright disclaimer" for the program, if
+necessary. Here is a sample; alter the names:
+
+ Yoyodyne, Inc., hereby disclaims all copyright interest in the program
+ `Gnomovision' (which makes passes at compilers) written by James Hacker.
+
+ <signature of Ty Coon>, 1 April 1989
+ Ty Coon, President of Vice
+
+This General Public License does not permit incorporating your program into
+proprietary programs. If your program is a subroutine library, you may
+consider it more useful to permit linking proprietary applications with the
+library. If this is what you want to do, use the GNU Lesser General
+Public License instead of this License.
diff --git a/biblio/bibtex/contrib/urlbst/LICENCE-lppl.txt b/biblio/bibtex/contrib/urlbst/LICENCE-lppl.txt
new file mode 100644
index 0000000000..2244313901
--- /dev/null
+++ b/biblio/bibtex/contrib/urlbst/LICENCE-lppl.txt
@@ -0,0 +1,416 @@
+The LaTeX Project Public License
+=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
+
+LPPL Version 1.3c 2008-05-04
+
+Copyright 1999 2002-2008 LaTeX3 Project
+ Everyone is allowed to distribute verbatim copies of this
+ license document, but modification of it is not allowed.
+
+
+PREAMBLE
+========
+
+The LaTeX Project Public License (LPPL) is the primary license under
+which the LaTeX kernel and the base LaTeX packages are distributed.
+
+You may use this license for any work of which you hold the copyright
+and which you wish to distribute. This license may be particularly
+suitable if your work is TeX-related (such as a LaTeX package), but
+it is written in such a way that you can use it even if your work is
+unrelated to TeX.
+
+The section `WHETHER AND HOW TO DISTRIBUTE WORKS UNDER THIS LICENSE',
+below, gives instructions, examples, and recommendations for authors
+who are considering distributing their works under this license.
+
+This license gives conditions under which a work may be distributed
+and modified, as well as conditions under which modified versions of
+that work may be distributed.
+
+We, the LaTeX3 Project, believe that the conditions below give you
+the freedom to make and distribute modified versions of your work
+that conform with whatever technical specifications you wish while
+maintaining the availability, integrity, and reliability of
+that work. If you do not see how to achieve your goal while
+meeting these conditions, then read the document `cfgguide.tex'
+and `modguide.tex' in the base LaTeX distribution for suggestions.
+
+
+DEFINITIONS
+===========
+
+In this license document the following terms are used:
+
+ `Work'
+ Any work being distributed under this License.
+
+ `Derived Work'
+ Any work that under any applicable law is derived from the Work.
+
+ `Modification'
+ Any procedure that produces a Derived Work under any applicable
+ law -- for example, the production of a file containing an
+ original file associated with the Work or a significant portion of
+ such a file, either verbatim or with modifications and/or
+ translated into another language.
+
+ `Modify'
+ To apply any procedure that produces a Derived Work under any
+ applicable law.
+
+ `Distribution'
+ Making copies of the Work available from one person to another, in
+ whole or in part. Distribution includes (but is not limited to)
+ making any electronic components of the Work accessible by
+ file transfer protocols such as FTP or HTTP or by shared file
+ systems such as Sun's Network File System (NFS).
+
+ `Compiled Work'
+ A version of the Work that has been processed into a form where it
+ is directly usable on a computer system. This processing may
+ include using installation facilities provided by the Work,
+ transformations of the Work, copying of components of the Work, or
+ other activities. Note that modification of any installation
+ facilities provided by the Work constitutes modification of the Work.
+
+ `Current Maintainer'
+ A person or persons nominated as such within the Work. If there is
+ no such explicit nomination then it is the `Copyright Holder' under
+ any applicable law.
+
+ `Base Interpreter'
+ A program or process that is normally needed for running or
+ interpreting a part or the whole of the Work.
+
+ A Base Interpreter may depend on external components but these
+ are not considered part of the Base Interpreter provided that each
+ external component clearly identifies itself whenever it is used
+ interactively. Unless explicitly specified when applying the
+ license to the Work, the only applicable Base Interpreter is a
+ `LaTeX-Format' or in the case of files belonging to the
+ `LaTeX-format' a program implementing the `TeX language'.
+
+
+
+CONDITIONS ON DISTRIBUTION AND MODIFICATION
+===========================================
+
+1. Activities other than distribution and/or modification of the Work
+are not covered by this license; they are outside its scope. In
+particular, the act of running the Work is not restricted and no
+requirements are made concerning any offers of support for the Work.
+
+2. You may distribute a complete, unmodified copy of the Work as you
+received it. Distribution of only part of the Work is considered
+modification of the Work, and no right to distribute such a Derived
+Work may be assumed under the terms of this clause.
+
+3. You may distribute a Compiled Work that has been generated from a
+complete, unmodified copy of the Work as distributed under Clause 2
+above, as long as that Compiled Work is distributed in such a way that
+the recipients may install the Compiled Work on their system exactly
+as it would have been installed if they generated a Compiled Work
+directly from the Work.
+
+4. If you are the Current Maintainer of the Work, you may, without
+restriction, modify the Work, thus creating a Derived Work. You may
+also distribute the Derived Work without restriction, including
+Compiled Works generated from the Derived Work. Derived Works
+distributed in this manner by the Current Maintainer are considered to
+be updated versions of the Work.
+
+5. If you are not the Current Maintainer of the Work, you may modify
+your copy of the Work, thus creating a Derived Work based on the Work,
+and compile this Derived Work, thus creating a Compiled Work based on
+the Derived Work.
+
+6. If you are not the Current Maintainer of the Work, you may
+distribute a Derived Work provided the following conditions are met
+for every component of the Work unless that component clearly states
+in the copyright notice that it is exempt from that condition. Only
+the Current Maintainer is allowed to add such statements of exemption
+to a component of the Work.
+
+ a. If a component of this Derived Work can be a direct replacement
+ for a component of the Work when that component is used with the
+ Base Interpreter, then, wherever this component of the Work
+ identifies itself to the user when used interactively with that
+ Base Interpreter, the replacement component of this Derived Work
+ clearly and unambiguously identifies itself as a modified version
+ of this component to the user when used interactively with that
+ Base Interpreter.
+
+ b. Every component of the Derived Work contains prominent notices
+ detailing the nature of the changes to that component, or a
+ prominent reference to another file that is distributed as part
+ of the Derived Work and that contains a complete and accurate log
+ of the changes.
+
+ c. No information in the Derived Work implies that any persons,
+ including (but not limited to) the authors of the original version
+ of the Work, provide any support, including (but not limited to)
+ the reporting and handling of errors, to recipients of the
+ Derived Work unless those persons have stated explicitly that
+ they do provide such support for the Derived Work.
+
+ d. You distribute at least one of the following with the Derived Work:
+
+ 1. A complete, unmodified copy of the Work;
+ if your distribution of a modified component is made by
+ offering access to copy the modified component from a
+ designated place, then offering equivalent access to copy
+ the Work from the same or some similar place meets this
+ condition, even though third parties are not compelled to
+ copy the Work along with the modified component;
+
+ 2. Information that is sufficient to obtain a complete,
+ unmodified copy of the Work.
+
+7. If you are not the Current Maintainer of the Work, you may
+distribute a Compiled Work generated from a Derived Work, as long as
+the Derived Work is distributed to all recipients of the Compiled
+Work, and as long as the conditions of Clause 6, above, are met with
+regard to the Derived Work.
+
+8. The conditions above are not intended to prohibit, and hence do not
+apply to, the modification, by any method, of any component so that it
+becomes identical to an updated version of that component of the Work as
+it is distributed by the Current Maintainer under Clause 4, above.
+
+9. Distribution of the Work or any Derived Work in an alternative
+format, where the Work or that Derived Work (in whole or in part) is
+then produced by applying some process to that format, does not relax or
+nullify any sections of this license as they pertain to the results of
+applying that process.
+
+10. a. A Derived Work may be distributed under a different license
+ provided that license itself honors the conditions listed in
+ Clause 6 above, in regard to the Work, though it does not have
+ to honor the rest of the conditions in this license.
+
+ b. If a Derived Work is distributed under a different license, that
+ Derived Work must provide sufficient documentation as part of
+ itself to allow each recipient of that Derived Work to honor the
+ restrictions in Clause 6 above, concerning changes from the Work.
+
+11. This license places no restrictions on works that are unrelated to
+the Work, nor does this license place any restrictions on aggregating
+such works with the Work by any means.
+
+12. Nothing in this license is intended to, or may be used to, prevent
+complete compliance by all parties with all applicable laws.
+
+
+NO WARRANTY
+===========
+
+There is no warranty for the Work. Except when otherwise stated in
+writing, the Copyright Holder provides the Work `as is', without
+warranty of any kind, either expressed or implied, including, but not
+limited to, the implied warranties of merchantability and fitness for a
+particular purpose. The entire risk as to the quality and performance
+of the Work is with you. Should the Work prove defective, you assume
+the cost of all necessary servicing, repair, or correction.
+
+In no event unless required by applicable law or agreed to in writing
+will The Copyright Holder, or any author named in the components of the
+Work, or any other party who may distribute and/or modify the Work as
+permitted above, be liable to you for damages, including any general,
+special, incidental or consequential damages arising out of any use of
+the Work or out of inability to use the Work (including, but not limited
+to, loss of data, data being rendered inaccurate, or losses sustained by
+anyone as a result of any failure of the Work to operate with any other
+programs), even if the Copyright Holder or said author or said other
+party has been advised of the possibility of such damages.
+
+
+MAINTENANCE OF THE WORK
+=======================
+
+The Work has the status `author-maintained' if the Copyright Holder
+explicitly and prominently states near the primary copyright notice in
+the Work that the Work can only be maintained by the Copyright Holder
+or simply that it is `author-maintained'.
+
+The Work has the status `maintained' if there is a Current Maintainer
+who has indicated in the Work that they are willing to receive error
+reports for the Work (for example, by supplying a valid e-mail
+address). It is not required for the Current Maintainer to acknowledge
+or act upon these error reports.
+
+The Work changes from status `maintained' to `unmaintained' if there
+is no Current Maintainer, or the person stated to be Current
+Maintainer of the work cannot be reached through the indicated means
+of communication for a period of six months, and there are no other
+significant signs of active maintenance.
+
+You can become the Current Maintainer of the Work by agreement with
+any existing Current Maintainer to take over this role.
+
+If the Work is unmaintained, you can become the Current Maintainer of
+the Work through the following steps:
+
+ 1. Make a reasonable attempt to trace the Current Maintainer (and
+ the Copyright Holder, if the two differ) through the means of
+ an Internet or similar search.
+
+ 2. If this search is successful, then enquire whether the Work
+ is still maintained.
+
+ a. If it is being maintained, then ask the Current Maintainer
+ to update their communication data within one month.
+
+ b. If the search is unsuccessful or no action to resume active
+ maintenance is taken by the Current Maintainer, then announce
+ within the pertinent community your intention to take over
+ maintenance. (If the Work is a LaTeX work, this could be
+ done, for example, by posting to comp.text.tex.)
+
+ 3a. If the Current Maintainer is reachable and agrees to pass
+ maintenance of the Work to you, then this takes effect
+ immediately upon announcement.
+
+ b. If the Current Maintainer is not reachable and the Copyright
+ Holder agrees that maintenance of the Work be passed to you,
+ then this takes effect immediately upon announcement.
+
+ 4. If you make an `intention announcement' as described in 2b. above
+ and after three months your intention is challenged neither by
+ the Current Maintainer nor by the Copyright Holder nor by other
+ people, then you may arrange for the Work to be changed so as
+ to name you as the (new) Current Maintainer.
+
+ 5. If the previously unreachable Current Maintainer becomes
+ reachable once more within three months of a change completed
+ under the terms of 3b) or 4), then that Current Maintainer must
+ become or remain the Current Maintainer upon request provided
+ they then update their communication data within one month.
+
+A change in the Current Maintainer does not, of itself, alter the fact
+that the Work is distributed under the LPPL license.
+
+If you become the Current Maintainer of the Work, you should
+immediately provide, within the Work, a prominent and unambiguous
+statement of your status as Current Maintainer. You should also
+announce your new status to the same pertinent community as
+in 2b) above.
+
+
+WHETHER AND HOW TO DISTRIBUTE WORKS UNDER THIS LICENSE
+======================================================
+
+This section contains important instructions, examples, and
+recommendations for authors who are considering distributing their
+works under this license. These authors are addressed as `you' in
+this section.
+
+Choosing This License or Another License
+----------------------------------------
+
+If for any part of your work you want or need to use *distribution*
+conditions that differ significantly from those in this license, then
+do not refer to this license anywhere in your work but, instead,
+distribute your work under a different license. You may use the text
+of this license as a model for your own license, but your license
+should not refer to the LPPL or otherwise give the impression that
+your work is distributed under the LPPL.
+
+The document `modguide.tex' in the base LaTeX distribution explains
+the motivation behind the conditions of this license. It explains,
+for example, why distributing LaTeX under the GNU General Public
+License (GPL) was considered inappropriate. Even if your work is
+unrelated to LaTeX, the discussion in `modguide.tex' may still be
+relevant, and authors intending to distribute their works under any
+license are encouraged to read it.
+
+A Recommendation on Modification Without Distribution
+-----------------------------------------------------
+
+It is wise never to modify a component of the Work, even for your own
+personal use, without also meeting the above conditions for
+distributing the modified component. While you might intend that such
+modifications will never be distributed, often this will happen by
+accident -- you may forget that you have modified that component; or
+it may not occur to you when allowing others to access the modified
+version that you are thus distributing it and violating the conditions
+of this license in ways that could have legal implications and, worse,
+cause problems for the community. It is therefore usually in your
+best interest to keep your copy of the Work identical with the public
+one. Many works provide ways to control the behavior of that work
+without altering any of its licensed components.
+
+How to Use This License
+-----------------------
+
+To use this license, place in each of the components of your work both
+an explicit copyright notice including your name and the year the work
+was authored and/or last substantially modified. Include also a
+statement that the distribution and/or modification of that
+component is constrained by the conditions in this license.
+
+Here is an example of such a notice and statement:
+
+ %% pig.dtx
+ %% Copyright 2005 M. Y. Name
+ %
+ % This work may be distributed and/or modified under the
+ % conditions of the LaTeX Project Public License, either version 1.3
+ % of this license or (at your option) any later version.
+ % The latest version of this license is in
+ % http://www.latex-project.org/lppl.txt
+ % and version 1.3 or later is part of all distributions of LaTeX
+ % version 2005/12/01 or later.
+ %
+ % This work has the LPPL maintenance status `maintained'.
+ %
+ % The Current Maintainer of this work is M. Y. Name.
+ %
+ % This work consists of the files pig.dtx and pig.ins
+ % and the derived file pig.sty.
+
+Given such a notice and statement in a file, the conditions
+given in this license document would apply, with the `Work' referring
+to the three files `pig.dtx', `pig.ins', and `pig.sty' (the last being
+generated from `pig.dtx' using `pig.ins'), the `Base Interpreter'
+referring to any `LaTeX-Format', and both `Copyright Holder' and
+`Current Maintainer' referring to the person `M. Y. Name'.
+
+If you do not want the Maintenance section of LPPL to apply to your
+Work, change `maintained' above into `author-maintained'.
+However, we recommend that you use `maintained', as the Maintenance
+section was added in order to ensure that your Work remains useful to
+the community even when you can no longer maintain and support it
+yourself.
+
+Derived Works That Are Not Replacements
+---------------------------------------
+
+Several clauses of the LPPL specify means to provide reliability and
+stability for the user community. They therefore concern themselves
+with the case that a Derived Work is intended to be used as a
+(compatible or incompatible) replacement of the original Work. If
+this is not the case (e.g., if a few lines of code are reused for a
+completely different task), then clauses 6b and 6d shall not apply.
+
+
+Important Recommendations
+-------------------------
+
+ Defining What Constitutes the Work
+
+ The LPPL requires that distributions of the Work contain all the
+ files of the Work. It is therefore important that you provide a
+ way for the licensee to determine which files constitute the Work.
+ This could, for example, be achieved by explicitly listing all the
+ files of the Work near the copyright notice of each file or by
+ using a line such as:
+
+ % This work consists of all files listed in manifest.txt.
+
+ in that place. In the absence of an unequivocal list it might be
+ impossible for the licensee to determine what is considered by you
+ to comprise the Work and, in such a case, the licensee would be
+ entitled to make reasonable conjectures as to which files comprise
+ the Work.
+
diff --git a/biblio/bibtex/contrib/urlbst/Makefile.in b/biblio/bibtex/contrib/urlbst/Makefile.in
new file mode 100644
index 0000000000..bfd2cb6582
--- /dev/null
+++ b/biblio/bibtex/contrib/urlbst/Makefile.in
@@ -0,0 +1,173 @@
+# Makefile for urlbst
+
+# BSTSTYLES are the standard styles that we distribute
+BSTSTYLES=plainurl.bst unsrturl.bst alphaurl.bst abbrvurl.bst
+# TESTSTYLES are a couple of extra ones that we explicitly test
+TESTSTYLES=mlaurl.bst amsalphaurl.bst
+
+MAINTAINER_FILES= Makefile configure
+GENERATED=urlbst urlbst.tex urlbst.pdf urlbst.html README VERSION $(BSTSTYLES)
+# distribute generated files
+# ...plus the configure files
+# ...plus the configured files
+DISTRIBS=$(GENERATED) \
+ configure configure.ac \
+ urlbst.in urlbst.bib Makefile.in \
+ LICENCE-gpl-2.0.txt LICENCE-lppl.txt
+
+
+prefix=@prefix@
+exec_prefix=@exec_prefix@
+bindir=@bindir@
+DIST=urlbst-@PACKAGE_VERSION@
+
+# On OS X, the following avoids extended attributes being included
+TAR=COPYFILE_DISABLE=1 tar
+#TAR=tar
+
+### Implicit rules
+
+# Don't include --inlinelinks when generating %url.bst here, as we
+# do want the links visible when generating the documentation, and it's
+# probably abetter default in any case.
+%url.bst: urlbst
+ export BSTINPUTS=test: ; \
+ if test -z "`kpsewhich ${@:url.bst=.bst}`"; then \
+ echo "Can't locate ${@:url.bst=.bst}"; \
+ else \
+ ./urlbst --eprint --doi --pubmed --hyperref `kpsewhich ${@:url.bst=.bst}` $@; \
+ fi
+
+# Incomplete TeX support
+%.ps: %.dvi
+ dvips -o $@ $<
+%.bbl: %.tex plainurl.bst
+ pdflatex $<
+ if ! test -f $@ || grep -q 'Citation.*undefined' ${<:.tex=.log}; then \
+ bibtex ${<:.tex=}; \
+ pdflatex $<; \
+ rm ${<:.tex=.pdf}; \
+ fi
+%.pdf: %.tex %.bbl
+ pdflatex $<
+%.dvi: %.tex %.bbl
+ latex $<
+%.gz: %
+ gzip --best -f $<
+
+.PRECIOUS: .bbl
+
+### Targets start here
+
+all: urlbst
+
+dist: $(DIST).tar.gz $(DIST).zip
+
+$(DIST).tar: $(DIST)/urlbst.in
+ $(TAR) cf $@ $(DIST)
+
+$(DIST).zip: $(DIST)/urlbst.in
+ zip -r $@ $(DIST)
+
+$(DIST)/urlbst.in: $(DISTRIBS)
+ if test -d $(DIST); then rm -Rf $(DIST); fi && mkdir $(DIST)
+ cp $(DISTRIBS) $(DIST)
+
+urlbst: urlbst.in config.status
+ ./config.status urlbst
+
+urlbst.tex: urlbst.tex.in hg.sed release-notes.tex
+ sed -f hg.sed -e '/include:release-notes/r release-notes.tex' urlbst.tex.in >$@
+
+urlbst.html: urlbst.html.in release-notes.html hg.sed
+ sed -f hg.sed -e '/include:release-notes/r release-notes.html' urlbst.html.in >$@
+
+Makefile: Makefile.in config.status
+ ./config.status Makefile
+
+README: README.md hg.sed
+ rm -f $@
+ sed -f hg.sed README.md >$@
+
+configure: configure.ac
+ autoconf
+
+config.status: configure
+ ./configure
+
+hg.sed: Makefile .hg
+ rm -f $@
+ { echo 's,@PACKAGE_VERSION\@,@PACKAGE_VERSION@,g'; \
+ echo 's,@RELEASEDATE\@,@RELEASEDATE@,g'; \
+ echo 's/@COPYRIGHTYEARS\@/@COPYRIGHTYEARS@/'; \
+ hg parent --template 's/@HGIDENT\@/{node|short} ({latesttag}+{latesttagdistance}), {date|isodate}/\n'; \
+ } >hg.sed
+
+release-notes.tex: release-notes.html
+ rm -f $@
+ xsltproc tools/release-notes-to-latex.xslt release-notes.html >$@.tmp && mv $@.tmp $@
+
+# Version stamp file, included in the distribution for convenience,
+# so it's easy to see which version it is has been unpacked at CTAN.
+VERSION: Makefile.in
+ echo $(DIST) >VERSION
+
+# Very simple install target -- hardly worth bothering, really....
+install: urlbst
+ cp urlbst $(bindir)
+
+# Very simple test target -- just check that we don't bomb converting
+# the standard styles
+check: $(BSTSTYLES) $(TESTSTYLES)
+ for f in $(BSTSTYLES) $(TESTSTYLES); do \
+ ROOT=`echo $$f|sed s/\.bst$$//`; \
+ printf '\\relax\n' > test-$$ROOT.aux; \
+ printf '\\citation{*}\n' >> test-$$ROOT.aux; \
+ printf '\\bibdata{urlbst}\n' >> test-$$ROOT.aux; \
+ printf '\\bibstyle{'"$$ROOT"'}\n' >> test-$$ROOT.aux; \
+ echo "*** testing $$f"; \
+ bibtex test-$$ROOT; \
+ done
+
+# Brute-force test target, which finds all the system .bst files,
+# converts them, and runs BibTeX on them. It doesn't test the results
+# in any way -- you have to do that by eye.
+#
+# No, this is a hopelessly blunderbus approach. And in any case the
+# 'locate *.bst' doesn't work. At least the following would find only things
+# on the .bst search path.
+# BSTPATH=`kpsepath bst`
+# for d in `IFS=:; echo $BSTPATH`; do
+# dd=`expr "$d" : '!*\(.*[^/]\)/*$'`
+# echo dd=$dd
+# test -d "$dd" && find $dd -name \*.bst
+# done
+check-all:
+ printf '\\relax\n'>check-all.mainaux
+ sed -n 's/^.*{\(test:.*\),/\\citation{\1}/p' urlbst.bib>>check-all.mainaux
+ for f in `locate '*.bst' | grep -v norman`; do T=`echo $$f|sed 's+.*/\(.*\)\.bst+\1url+'`;perl urlbst $$f $$T.bst; if test $$? = 0; then TF=test-$$T.aux; cp check-all.mainaux $$TF;printf '\\bibdata{urlbst}\n'>>$$TF; printf '\\bibstyle{$$T}\n'>>$$TF; else rm $$T.bst; fi done
+ for f in `ls test-*.aux|sed s+.aux++`;do bibtex $$f;done
+ rm check-all.mainaux
+
+# Tarball for unpacking in the webpage distribution directory
+webpage-tarball.tar: urlbst.pdf urlbst.html $(DIST).tar.gz $(DIST).zip
+ mkdir webpage-tarball
+ cp urlbst.pdf $(DIST).tar.gz $(DIST).zip webpage-tarball
+ cp urlbst.html webpage-tarball/index.html
+ cd webpage-tarball; $(TAR) cf ../webpage-tarball.tar *
+ rm -Rf webpage-tarball
+
+tidy:
+ rm -f webpage-tarball.tar
+ rm -f *~ test-*
+ rm -f *.aux *.bbl *.log *.blg *.dvi *.pdf
+ rm -Rf urlbst.app
+
+clean: tidy
+ rm -f *.bst
+ rm -Rf config.status autom4te.cache prepare-roff.sed
+ rm -Rf $(DIST).tar $(DIST).tar.gz $(DIST).zip $(DIST)
+ rm -f $(GENERATED)
+
+maintainer-clean: clean
+ rm -f $(MAINTAINER_FILES)
diff --git a/biblio/bibtex/contrib/urlbst/README b/biblio/bibtex/contrib/urlbst/README
new file mode 100644
index 0000000000..d9705a5840
--- /dev/null
+++ b/biblio/bibtex/contrib/urlbst/README
@@ -0,0 +1,53 @@
+urlbst -- add @webpage entry and url/doi/eprint/pubmed fields to BibTeX
+=======================================================================
+
+Version 0.8, 2019 July 1.
+
+The urlbst package consists of a Perl script which edits BibTeX style
+files (.bst) to add a `@webpage` entry type, and which adds a few new
+fields -- notably including 'url' -- to all other entry types. The
+distribution includes preconverted versions of the four standard
+BibTeX .bst style files.
+
+It has a different goal from Patrick Daly's 'custom-bib' package --
+that is intended to create a BibTeX style .bst file from scratch, and
+supports 'url' and 'eprint' fields. This package, on the other hand,
+is intended for the case where you already have a style file that
+works (or at least, which you cannot or will not change), and edits it
+to add the new `@webpage` entry type, plus the new fields.
+
+The added fields are:
+
+ * 'url' and 'lastchecked', to associate a URL with a reference,
+ along with the date at which the URL was last checked to exist;
+ * 'doi', for a reference's DOI (see https://doi.org);
+ * 'eprint', for an arXiv eprint reference (see http://arxiv.org); and
+ * 'pubmed' for a reference's PubMed identifier (PMID, see http://pubmed.gov).
+
+Licences
+--------
+
+The copyright and licence position for the modified `.bst` files seems
+slightly muddy to me. On the grounds that any licence is better than
+no licence, I therefore assert that the _modifications_ which the
+`urlbst` program makes to these files are copyright 2002-03, 2005-12, 2014, 2019,
+Norman Gray, and that these modifications are available for
+distribution under the terms of the LaTeX Project Public Licence.
+
+The original `.bst` files are copyright Howard Trickey and Oren
+Patashnik, with a set of permissions, in text at the top of the files,
+which state that "Unlimited copying and redistribution of this file
+are permitted as long as it is unmodified" (see the files for the
+complete text). The distribution terms above therefore appear to be
+compatible with -- in the sense of being morally equivalent to --
+these terms in the `.bst` file. If anyone disagrees with the logic
+here, I'd be very happy to discuss that.
+
+The `urlbst` script itself is distributed under the GPL, version 2.0.
+
+See the files `LICENCE-lppl.txt` and `LICENCE-gpl-2.0.txt` in the
+distribution, for the relevant licence text.
+
+
+Norman Gray
+http://nxg.me.uk
diff --git a/biblio/bibtex/contrib/urlbst/VERSION b/biblio/bibtex/contrib/urlbst/VERSION
new file mode 100644
index 0000000000..e2effdb080
--- /dev/null
+++ b/biblio/bibtex/contrib/urlbst/VERSION
@@ -0,0 +1 @@
+urlbst-0.8
diff --git a/biblio/bibtex/contrib/urlbst/abbrvurl.bst b/biblio/bibtex/contrib/urlbst/abbrvurl.bst
new file mode 100644
index 0000000000..c37f6fd063
--- /dev/null
+++ b/biblio/bibtex/contrib/urlbst/abbrvurl.bst
@@ -0,0 +1,1464 @@
+%%% Modification of BibTeX style file /usr/local/texlive/2019/texmf-dist/bibtex/bst/base/abbrv.bst
+%%% ... by urlbst, version 0.8 (marked with "% urlbst")
+%%% See <http://purl.org/nxg/dist/urlbst>
+%%% Modifications Copyright 2002-03, 2005-12, 2014, 2019, Norman Gray,
+%%% and distributed under the terms of the LPPL; see README for discussion.
+%%%
+%%% Added webpage entry type, and url and lastchecked fields.
+%%% Added eprint support.
+%%% Added DOI support.
+%%% Added PUBMED support.
+%%% Added hyperref support.
+%%% Original headers follow...
+
+% BibTeX standard bibliography style `abbrv'
+ % Version 0.99b (8-Dec-10 release) for BibTeX versions 0.99a or later.
+ % Copyright (C) 1984, 1985, 1988, 2010 Howard Trickey and Oren Patashnik.
+ % Unlimited copying and redistribution of this file are permitted as long as
+ % it is unmodified. Modifications (and redistribution of modified versions)
+ % are also permitted, but only if the resulting file is renamed to something
+ % besides btxbst.doc, plain.bst, unsrt.bst, alpha.bst, and abbrv.bst.
+ % This restriction helps ensure that all standard styles are identical.
+ % The file btxbst.doc has the documentation for this style.
+
+ENTRY
+ { address
+ author
+ booktitle
+ chapter
+ edition
+ editor
+ howpublished
+ institution
+ journal
+ key
+ month
+ note
+ number
+ organization
+ pages
+ publisher
+ school
+ series
+ title
+ type
+ volume
+ year
+ eprint % urlbst
+ doi % urlbst
+ pubmed % urlbst
+ url % urlbst
+ lastchecked % urlbst
+ }
+ {}
+ { label }
+
+INTEGERS { output.state before.all mid.sentence after.sentence after.block }
+
+% urlbst...
+% urlbst constants and state variables
+STRINGS { urlintro
+ eprinturl eprintprefix doiprefix doiurl pubmedprefix pubmedurl
+ citedstring onlinestring linktextstring
+ openinlinelink closeinlinelink }
+INTEGERS { hrefform inlinelinks makeinlinelink
+ addeprints adddoiresolver addpubmedresolver }
+FUNCTION {init.urlbst.variables}
+{
+ % The following constants may be adjusted by hand, if desired
+
+ % The first set allow you to enable or disable certain functionality.
+ #1 'addeprints := % 0=no eprints; 1=include eprints
+ #1 'adddoiresolver := % 0=no DOI resolver; 1=include it
+ #1 'addpubmedresolver := % 0=no PUBMED resolver; 1=include it
+ #2 'hrefform := % 0=no crossrefs; 1=hypertex xrefs; 2=hyperref refs
+ #0 'inlinelinks := % 0=URLs explicit; 1=URLs attached to titles
+
+ % String constants, which you _might_ want to tweak.
+ "URL: " 'urlintro := % prefix before URL; typically "Available from:" or "URL":
+ "online" 'onlinestring := % indication that resource is online; typically "online"
+ "cited " 'citedstring := % indicator of citation date; typically "cited "
+ "[link]" 'linktextstring := % dummy link text; typically "[link]"
+ "http://arxiv.org/abs/" 'eprinturl := % prefix to make URL from eprint ref
+ "arXiv:" 'eprintprefix := % text prefix printed before eprint ref; typically "arXiv:"
+ "https://doi.org/" 'doiurl := % prefix to make URL from DOI
+ "doi:" 'doiprefix := % text prefix printed before DOI ref; typically "doi:"
+ "http://www.ncbi.nlm.nih.gov/pubmed/" 'pubmedurl := % prefix to make URL from PUBMED
+ "PMID:" 'pubmedprefix := % text prefix printed before PUBMED ref; typically "PMID:"
+
+ % The following are internal state variables, not configuration constants,
+ % so they shouldn't be fiddled with.
+ #0 'makeinlinelink := % state variable managed by possibly.setup.inlinelink
+ "" 'openinlinelink := % ditto
+ "" 'closeinlinelink := % ditto
+}
+INTEGERS {
+ bracket.state
+ outside.brackets
+ open.brackets
+ within.brackets
+ close.brackets
+}
+% ...urlbst to here
+FUNCTION {init.state.consts}
+{ #0 'outside.brackets := % urlbst...
+ #1 'open.brackets :=
+ #2 'within.brackets :=
+ #3 'close.brackets := % ...urlbst to here
+
+ #0 'before.all :=
+ #1 'mid.sentence :=
+ #2 'after.sentence :=
+ #3 'after.block :=
+}
+
+STRINGS { s t }
+
+% urlbst
+FUNCTION {output.nonnull.original}
+{ 's :=
+ output.state mid.sentence =
+ { ", " * write$ }
+ { output.state after.block =
+ { add.period$ write$
+ newline$
+ "\newblock " write$
+ }
+ { output.state before.all =
+ 'write$
+ { add.period$ " " * write$ }
+ if$
+ }
+ if$
+ mid.sentence 'output.state :=
+ }
+ if$
+ s
+}
+
+% urlbst...
+% The following three functions are for handling inlinelink. They wrap
+% a block of text which is potentially output with write$ by multiple
+% other functions, so we don't know the content a priori.
+% They communicate between each other using the variables makeinlinelink
+% (which is true if a link should be made), and closeinlinelink (which holds
+% the string which should close any current link. They can be called
+% at any time, but start.inlinelink will be a no-op unless something has
+% previously set makeinlinelink true, and the two ...end.inlinelink functions
+% will only do their stuff if start.inlinelink has previously set
+% closeinlinelink to be non-empty.
+% (thanks to 'ijvm' for suggested code here)
+FUNCTION {uand}
+{ 'skip$ { pop$ #0 } if$ } % 'and' (which isn't defined at this point in the file)
+FUNCTION {possibly.setup.inlinelink}
+{ makeinlinelink hrefform #0 > uand
+ { doi empty$ adddoiresolver uand
+ { pubmed empty$ addpubmedresolver uand
+ { eprint empty$ addeprints uand
+ { url empty$
+ { "" }
+ { url }
+ if$ }
+ { eprinturl eprint * }
+ if$ }
+ { pubmedurl pubmed * }
+ if$ }
+ { doiurl doi * }
+ if$
+ % an appropriately-formatted URL is now on the stack
+ hrefform #1 = % hypertex
+ { "\special {html:<a href=" quote$ * swap$ * quote$ * "> }{" * 'openinlinelink :=
+ "\special {html:</a>}" 'closeinlinelink := }
+ { "\href {" swap$ * "} {" * 'openinlinelink := % hrefform=#2 -- hyperref
+ % the space between "} {" matters: a URL of just the right length can cause "\% newline em"
+ "}" 'closeinlinelink := }
+ if$
+ #0 'makeinlinelink :=
+ }
+ 'skip$
+ if$ % makeinlinelink
+}
+FUNCTION {add.inlinelink}
+{ openinlinelink empty$
+ 'skip$
+ { openinlinelink swap$ * closeinlinelink *
+ "" 'openinlinelink :=
+ }
+ if$
+}
+FUNCTION {output.nonnull}
+{ % Save the thing we've been asked to output
+ 's :=
+ % If the bracket-state is close.brackets, then add a close-bracket to
+ % what is currently at the top of the stack, and set bracket.state
+ % to outside.brackets
+ bracket.state close.brackets =
+ { "]" *
+ outside.brackets 'bracket.state :=
+ }
+ 'skip$
+ if$
+ bracket.state outside.brackets =
+ { % We're outside all brackets -- this is the normal situation.
+ % Write out what's currently at the top of the stack, using the
+ % original output.nonnull function.
+ s
+ add.inlinelink
+ output.nonnull.original % invoke the original output.nonnull
+ }
+ { % Still in brackets. Add open-bracket or (continuation) comma, add the
+ % new text (in s) to the top of the stack, and move to the close-brackets
+ % state, ready for next time (unless inbrackets resets it). If we come
+ % into this branch, then output.state is carefully undisturbed.
+ bracket.state open.brackets =
+ { " [" * }
+ { ", " * } % bracket.state will be within.brackets
+ if$
+ s *
+ close.brackets 'bracket.state :=
+ }
+ if$
+}
+
+% Call this function just before adding something which should be presented in
+% brackets. bracket.state is handled specially within output.nonnull.
+FUNCTION {inbrackets}
+{ bracket.state close.brackets =
+ { within.brackets 'bracket.state := } % reset the state: not open nor closed
+ { open.brackets 'bracket.state := }
+ if$
+}
+
+FUNCTION {format.lastchecked}
+{ lastchecked empty$
+ { "" }
+ { inbrackets citedstring lastchecked * }
+ if$
+}
+% ...urlbst to here
+
+FUNCTION {output}
+{ duplicate$ empty$
+ 'pop$
+ 'output.nonnull
+ if$
+}
+
+FUNCTION {output.check}
+{ 't :=
+ duplicate$ empty$
+ { pop$ "empty " t * " in " * cite$ * warning$ }
+ 'output.nonnull
+ if$
+}
+
+FUNCTION {output.bibitem.original} % urlbst (renamed from output.bibitem, so it can be wrapped below)
+{ newline$
+ "\bibitem{" write$
+ cite$ write$
+ "}" write$
+ newline$
+ ""
+ before.all 'output.state :=
+}
+
+FUNCTION {fin.entry.original} % urlbst (renamed from fin.entry, so it can be wrapped below)
+{ add.period$
+ write$
+ newline$
+}
+
+FUNCTION {new.block}
+{ output.state before.all =
+ 'skip$
+ { after.block 'output.state := }
+ if$
+}
+
+FUNCTION {new.sentence}
+{ output.state after.block =
+ 'skip$
+ { output.state before.all =
+ 'skip$
+ { after.sentence 'output.state := }
+ if$
+ }
+ if$
+}
+
+FUNCTION {not}
+{ { #0 }
+ { #1 }
+ if$
+}
+
+FUNCTION {and}
+{ 'skip$
+ { pop$ #0 }
+ if$
+}
+
+FUNCTION {or}
+{ { pop$ #1 }
+ 'skip$
+ if$
+}
+
+FUNCTION {new.block.checka}
+{ empty$
+ 'skip$
+ 'new.block
+ if$
+}
+
+FUNCTION {new.block.checkb}
+{ empty$
+ swap$ empty$
+ and
+ 'skip$
+ 'new.block
+ if$
+}
+
+FUNCTION {new.sentence.checka}
+{ empty$
+ 'skip$
+ 'new.sentence
+ if$
+}
+
+FUNCTION {new.sentence.checkb}
+{ empty$
+ swap$ empty$
+ and
+ 'skip$
+ 'new.sentence
+ if$
+}
+
+FUNCTION {field.or.null}
+{ duplicate$ empty$
+ { pop$ "" }
+ 'skip$
+ if$
+}
+
+FUNCTION {emphasize}
+{ duplicate$ empty$
+ { pop$ "" }
+ { "{\em " swap$ * "}" * }
+ if$
+}
+
+INTEGERS { nameptr namesleft numnames }
+
+FUNCTION {format.names}
+{ 's :=
+ #1 'nameptr :=
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ { s nameptr "{f.~}{vv~}{ll}{, jj}" format.name$ 't :=
+ nameptr #1 >
+ { namesleft #1 >
+ { ", " * t * }
+ { numnames #2 >
+ { "," * }
+ 'skip$
+ if$
+ t "others" =
+ { " et~al." * }
+ { " and " * t * }
+ if$
+ }
+ if$
+ }
+ 't
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+}
+
+FUNCTION {format.authors}
+{ author empty$
+ { "" }
+ { author format.names }
+ if$
+}
+
+FUNCTION {format.editors}
+{ editor empty$
+ { "" }
+ { editor format.names
+ editor num.names$ #1 >
+ { ", editors" * }
+ { ", editor" * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.title}
+{ title empty$
+ { "" }
+ { title "t" change.case$ }
+ if$
+}
+
+FUNCTION {n.dashify}
+{ 't :=
+ ""
+ { t empty$ not }
+ { t #1 #1 substring$ "-" =
+ { t #1 #2 substring$ "--" = not
+ { "--" *
+ t #2 global.max$ substring$ 't :=
+ }
+ { { t #1 #1 substring$ "-" = }
+ { "-" *
+ t #2 global.max$ substring$ 't :=
+ }
+ while$
+ }
+ if$
+ }
+ { t #1 #1 substring$ *
+ t #2 global.max$ substring$ 't :=
+ }
+ if$
+ }
+ while$
+}
+
+FUNCTION {format.date}
+{ year empty$
+ { month empty$
+ { "" }
+ { "there's a month but no year in " cite$ * warning$
+ month
+ }
+ if$
+ }
+ { month empty$
+ 'year
+ { month " " * year * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.btitle}
+{ title emphasize
+}
+
+FUNCTION {tie.or.space.connect}
+{ duplicate$ text.length$ #3 <
+ { "~" }
+ { " " }
+ if$
+ swap$ * *
+}
+
+FUNCTION {either.or.check}
+{ empty$
+ 'pop$
+ { "can't use both " swap$ * " fields in " * cite$ * warning$ }
+ if$
+}
+
+FUNCTION {format.bvolume}
+{ volume empty$
+ { "" }
+ { "volume" volume tie.or.space.connect
+ series empty$
+ 'skip$
+ { " of " * series emphasize * }
+ if$
+ "volume and number" number either.or.check
+ }
+ if$
+}
+
+FUNCTION {format.number.series}
+{ volume empty$
+ { number empty$
+ { series field.or.null }
+ { output.state mid.sentence =
+ { "number" }
+ { "Number" }
+ if$
+ number tie.or.space.connect
+ series empty$
+ { "there's a number but no series in " cite$ * warning$ }
+ { " in " * series * }
+ if$
+ }
+ if$
+ }
+ { "" }
+ if$
+}
+
+FUNCTION {format.edition}
+{ edition empty$
+ { "" }
+ { output.state mid.sentence =
+ { edition "l" change.case$ " edition" * }
+ { edition "t" change.case$ " edition" * }
+ if$
+ }
+ if$
+}
+
+INTEGERS { multiresult }
+
+FUNCTION {multi.page.check}
+{ 't :=
+ #0 'multiresult :=
+ { multiresult not
+ t empty$ not
+ and
+ }
+ { t #1 #1 substring$
+ duplicate$ "-" =
+ swap$ duplicate$ "," =
+ swap$ "+" =
+ or or
+ { #1 'multiresult := }
+ { t #2 global.max$ substring$ 't := }
+ if$
+ }
+ while$
+ multiresult
+}
+
+FUNCTION {format.pages}
+{ pages empty$
+ { "" }
+ { pages multi.page.check
+ { "pages" pages n.dashify tie.or.space.connect }
+ { "page" pages tie.or.space.connect }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.vol.num.pages}
+{ volume field.or.null
+ number empty$
+ 'skip$
+ { "(" number * ")" * *
+ volume empty$
+ { "there's a number but no volume in " cite$ * warning$ }
+ 'skip$
+ if$
+ }
+ if$
+ pages empty$
+ 'skip$
+ { duplicate$ empty$
+ { pop$ format.pages }
+ { ":" * pages n.dashify * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.chapter.pages}
+{ chapter empty$
+ 'format.pages
+ { type empty$
+ { "chapter" }
+ { type "l" change.case$ }
+ if$
+ chapter tie.or.space.connect
+ pages empty$
+ 'skip$
+ { ", " * format.pages * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.in.ed.booktitle}
+{ booktitle empty$
+ { "" }
+ { editor empty$
+ { "In " booktitle emphasize * }
+ { "In " format.editors * ", " * booktitle emphasize * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {empty.misc.check}
+{ author empty$ title empty$ howpublished empty$
+ month empty$ year empty$ note empty$
+ and and and and and
+ key empty$ not and
+ { "all relevant fields are empty in " cite$ * warning$ }
+ 'skip$
+ if$
+}
+
+FUNCTION {format.thesis.type}
+{ type empty$
+ 'skip$
+ { pop$
+ type "t" change.case$
+ }
+ if$
+}
+
+FUNCTION {format.tr.number}
+{ type empty$
+ { "Technical Report" }
+ 'type
+ if$
+ number empty$
+ { "t" change.case$ }
+ { number tie.or.space.connect }
+ if$
+}
+
+FUNCTION {format.article.crossref}
+{ key empty$
+ { journal empty$
+ { "need key or journal for " cite$ * " to crossref " * crossref *
+ warning$
+ ""
+ }
+ { "In {\em " journal * "\/}" * }
+ if$
+ }
+ { "In " key * }
+ if$
+ " \cite{" * crossref * "}" *
+}
+
+FUNCTION {format.crossref.editor}
+{ editor #1 "{vv~}{ll}" format.name$
+ editor num.names$ duplicate$
+ #2 >
+ { pop$ " et~al." * }
+ { #2 <
+ 'skip$
+ { editor #2 "{ff }{vv }{ll}{ jj}" format.name$ "others" =
+ { " et~al." * }
+ { " and " * editor #2 "{vv~}{ll}" format.name$ * }
+ if$
+ }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.book.crossref}
+{ volume empty$
+ { "empty volume in " cite$ * "'s crossref of " * crossref * warning$
+ "In "
+ }
+ { "Volume" volume tie.or.space.connect
+ " of " *
+ }
+ if$
+ editor empty$
+ editor field.or.null author field.or.null =
+ or
+ { key empty$
+ { series empty$
+ { "need editor, key, or series for " cite$ * " to crossref " *
+ crossref * warning$
+ "" *
+ }
+ { "{\em " * series * "\/}" * }
+ if$
+ }
+ { key * }
+ if$
+ }
+ { format.crossref.editor * }
+ if$
+ " \cite{" * crossref * "}" *
+}
+
+FUNCTION {format.incoll.inproc.crossref}
+{ editor empty$
+ editor field.or.null author field.or.null =
+ or
+ { key empty$
+ { booktitle empty$
+ { "need editor, key, or booktitle for " cite$ * " to crossref " *
+ crossref * warning$
+ ""
+ }
+ { "In {\em " booktitle * "\/}" * }
+ if$
+ }
+ { "In " key * }
+ if$
+ }
+ { "In " format.crossref.editor * }
+ if$
+ " \cite{" * crossref * "}" *
+}
+
+% urlbst...
+% Functions for making hypertext links.
+% In all cases, the stack has (link-text href-url)
+%
+% make 'null' specials
+FUNCTION {make.href.null}
+{
+ pop$
+}
+% make hypertex specials
+FUNCTION {make.href.hypertex}
+{
+ "\special {html:<a href=" quote$ *
+ swap$ * quote$ * "> }" * swap$ *
+ "\special {html:</a>}" *
+}
+% make hyperref specials
+FUNCTION {make.href.hyperref}
+{
+ "\href {" swap$ * "} {\path{" * swap$ * "}}" *
+}
+FUNCTION {make.href}
+{ hrefform #2 =
+ 'make.href.hyperref % hrefform = 2
+ { hrefform #1 =
+ 'make.href.hypertex % hrefform = 1
+ 'make.href.null % hrefform = 0 (or anything else)
+ if$
+ }
+ if$
+}
+
+% If inlinelinks is true, then format.url should be a no-op, since it's
+% (a) redundant, and (b) could end up as a link-within-a-link.
+FUNCTION {format.url}
+{ inlinelinks #1 = url empty$ or
+ { "" }
+ { hrefform #1 =
+ { % special case -- add HyperTeX specials
+ urlintro "\url{" url * "}" * url make.href.hypertex * }
+ { urlintro "\url{" * url * "}" * }
+ if$
+ }
+ if$
+}
+FUNCTION {format.eprint}
+{ eprint empty$
+ { "" }
+ { eprintprefix eprint * eprinturl eprint * make.href }
+ if$
+}
+
+FUNCTION {format.doi}
+{ doi empty$
+ { "" }
+ { doiprefix doi * doiurl doi * make.href }
+ if$
+}
+
+FUNCTION {format.pubmed}
+{ pubmed empty$
+ { "" }
+ { pubmedprefix pubmed * pubmedurl pubmed * make.href }
+ if$
+}
+
+% Output a URL. We can't use the more normal idiom (something like
+% `format.url output'), because the `inbrackets' within
+% format.lastchecked applies to everything between calls to `output',
+% so that `format.url format.lastchecked * output' ends up with both
+% the URL and the lastchecked in brackets.
+FUNCTION {output.url}
+{ url empty$
+ 'skip$
+ { new.block
+ format.url output
+ format.lastchecked output
+ }
+ if$
+}
+
+FUNCTION {output.web.refs}
+{
+ new.block
+ inlinelinks
+ 'skip$ % links were inline -- don't repeat them
+ { % If the generated DOI will be the same as the URL,
+ % then don't print the URL (thanks to Joseph Wright for this code,
+ % at http://tex.stackexchange.com/questions/5660)
+ adddoiresolver
+ doiurl doi empty$ { "X" } { doi } if$ * % DOI URL to be generated
+ url empty$ { "Y" } { url } if$ % the URL, or "Y" if empty
+ = % are the strings equal?
+ and
+ 'skip$
+ { output.url }
+ if$
+ addeprints eprint empty$ not and
+ { format.eprint output.nonnull }
+ 'skip$
+ if$
+ adddoiresolver doi empty$ not and
+ { format.doi output.nonnull }
+ 'skip$
+ if$
+ addpubmedresolver pubmed empty$ not and
+ { format.pubmed output.nonnull }
+ 'skip$
+ if$
+ }
+ if$
+}
+
+% Wrapper for output.bibitem.original.
+% If the URL field is not empty, set makeinlinelink to be true,
+% so that an inline link will be started at the next opportunity
+FUNCTION {output.bibitem}
+{ outside.brackets 'bracket.state :=
+ output.bibitem.original
+ inlinelinks url empty$ not doi empty$ not or pubmed empty$ not or eprint empty$ not or and
+ { #1 'makeinlinelink := }
+ { #0 'makeinlinelink := }
+ if$
+}
+
+% Wrapper for fin.entry.original
+FUNCTION {fin.entry}
+{ output.web.refs % urlbst
+ makeinlinelink % ooops, it appears we didn't have a title for inlinelink
+ { possibly.setup.inlinelink % add some artificial link text here, as a fallback
+ linktextstring output.nonnull }
+ 'skip$
+ if$
+ bracket.state close.brackets = % urlbst
+ { "]" * }
+ 'skip$
+ if$
+ fin.entry.original
+}
+
+% Webpage entry type.
+% Title and url fields required;
+% author, note, year, month, and lastchecked fields optional
+% See references
+% ISO 690-2 http://www.nlc-bnc.ca/iso/tc46sc9/standard/690-2e.htm
+% http://www.classroom.net/classroom/CitingNetResources.html
+% http://neal.ctstateu.edu/history/cite.html
+% http://www.cas.usf.edu/english/walker/mla.html
+% for citation formats for web pages.
+FUNCTION {webpage}
+{ output.bibitem
+ author empty$
+ { editor empty$
+ 'skip$ % author and editor both optional
+ { format.editors output.nonnull }
+ if$
+ }
+ { editor empty$
+ { format.authors output.nonnull }
+ { "can't use both author and editor fields in " cite$ * warning$ }
+ if$
+ }
+ if$
+ new.block
+ title empty$ 'skip$ 'possibly.setup.inlinelink if$
+ format.title "title" output.check
+ inbrackets onlinestring output
+ new.block
+ year empty$
+ 'skip$
+ { format.date "year" output.check }
+ if$
+ % We don't need to output the URL details ('lastchecked' and 'url'),
+ % because fin.entry does that for us, using output.web.refs. The only
+ % reason we would want to put them here is if we were to decide that
+ % they should go in front of the rather miscellaneous information in 'note'.
+ new.block
+ note output
+ fin.entry
+}
+% ...urlbst to here
+
+
+FUNCTION {article}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ title empty$ 'skip$ 'possibly.setup.inlinelink if$ % urlbst
+ format.title "title" output.check
+ new.block
+ crossref missing$
+ { journal emphasize "journal" output.check
+ possibly.setup.inlinelink format.vol.num.pages output% urlbst
+ format.date "year" output.check
+ }
+ { format.article.crossref output.nonnull
+ format.pages output
+ }
+ if$
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {book}
+{ output.bibitem
+ author empty$
+ { format.editors "author and editor" output.check }
+ { format.authors output.nonnull
+ crossref missing$
+ { "author and editor" editor either.or.check }
+ 'skip$
+ if$
+ }
+ if$
+ new.block
+ title empty$ 'skip$ 'possibly.setup.inlinelink if$ % urlbst
+ format.btitle "title" output.check
+ crossref missing$
+ { format.bvolume output
+ new.block
+ format.number.series output
+ new.sentence
+ publisher "publisher" output.check
+ address output
+ }
+ { new.block
+ format.book.crossref output.nonnull
+ }
+ if$
+ format.edition output
+ format.date "year" output.check
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {booklet}
+{ output.bibitem
+ format.authors output
+ new.block
+ title empty$ 'skip$ 'possibly.setup.inlinelink if$ % urlbst
+ format.title "title" output.check
+ howpublished address new.block.checkb
+ howpublished output
+ address output
+ format.date output
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {inbook}
+{ output.bibitem
+ author empty$
+ { format.editors "author and editor" output.check }
+ { format.authors output.nonnull
+ crossref missing$
+ { "author and editor" editor either.or.check }
+ 'skip$
+ if$
+ }
+ if$
+ new.block
+ title empty$ 'skip$ 'possibly.setup.inlinelink if$ % urlbst
+ format.btitle "title" output.check
+ crossref missing$
+ { format.bvolume output
+ format.chapter.pages "chapter and pages" output.check
+ new.block
+ format.number.series output
+ new.sentence
+ publisher "publisher" output.check
+ address output
+ }
+ { format.chapter.pages "chapter and pages" output.check
+ new.block
+ format.book.crossref output.nonnull
+ }
+ if$
+ format.edition output
+ format.date "year" output.check
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {incollection}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ title empty$ 'skip$ 'possibly.setup.inlinelink if$ % urlbst
+ format.title "title" output.check
+ new.block
+ crossref missing$
+ { format.in.ed.booktitle "booktitle" output.check
+ format.bvolume output
+ format.number.series output
+ format.chapter.pages output
+ new.sentence
+ publisher "publisher" output.check
+ address output
+ format.edition output
+ format.date "year" output.check
+ }
+ { format.incoll.inproc.crossref output.nonnull
+ format.chapter.pages output
+ }
+ if$
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {inproceedings}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ title empty$ 'skip$ 'possibly.setup.inlinelink if$ % urlbst
+ format.title "title" output.check
+ new.block
+ crossref missing$
+ { format.in.ed.booktitle "booktitle" output.check
+ format.bvolume output
+ format.number.series output
+ format.pages output
+ address empty$
+ { organization publisher new.sentence.checkb
+ organization output
+ publisher output
+ format.date "year" output.check
+ }
+ { address output.nonnull
+ format.date "year" output.check
+ new.sentence
+ organization output
+ publisher output
+ }
+ if$
+ }
+ { format.incoll.inproc.crossref output.nonnull
+ format.pages output
+ }
+ if$
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {conference} { inproceedings }
+
+FUNCTION {manual}
+{ output.bibitem
+ author empty$
+ { organization empty$
+ 'skip$
+ { organization output.nonnull
+ address output
+ }
+ if$
+ }
+ { format.authors output.nonnull }
+ if$
+ new.block
+ title empty$ 'skip$ 'possibly.setup.inlinelink if$ % urlbst
+ format.btitle "title" output.check
+ author empty$
+ { organization empty$
+ { address new.block.checka
+ address output
+ }
+ 'skip$
+ if$
+ }
+ { organization address new.block.checkb
+ organization output
+ address output
+ }
+ if$
+ format.edition output
+ format.date output
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {mastersthesis}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ title empty$ 'skip$ 'possibly.setup.inlinelink if$ % urlbst
+ format.title "title" output.check
+ new.block
+ "Master's thesis" format.thesis.type output.nonnull
+ school "school" output.check
+ address output
+ format.date "year" output.check
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {misc}
+{ output.bibitem
+ format.authors output
+ title howpublished new.block.checkb
+ title empty$ 'skip$ 'possibly.setup.inlinelink if$ % urlbst
+ format.title output
+ howpublished new.block.checka
+ howpublished output
+ format.date output
+ new.block
+ note output
+ fin.entry
+ empty.misc.check
+}
+
+FUNCTION {phdthesis}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ title empty$ 'skip$ 'possibly.setup.inlinelink if$ % urlbst
+ format.btitle "title" output.check
+ new.block
+ "PhD thesis" format.thesis.type output.nonnull
+ school "school" output.check
+ address output
+ format.date "year" output.check
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {proceedings}
+{ output.bibitem
+ editor empty$
+ { organization output }
+ { format.editors output.nonnull }
+ if$
+ new.block
+ title empty$ 'skip$ 'possibly.setup.inlinelink if$ % urlbst
+ format.btitle "title" output.check
+ format.bvolume output
+ format.number.series output
+ address empty$
+ { editor empty$
+ { publisher new.sentence.checka }
+ { organization publisher new.sentence.checkb
+ organization output
+ }
+ if$
+ publisher output
+ format.date "year" output.check
+ }
+ { address output.nonnull
+ format.date "year" output.check
+ new.sentence
+ editor empty$
+ 'skip$
+ { organization output }
+ if$
+ publisher output
+ }
+ if$
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {techreport}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ title empty$ 'skip$ 'possibly.setup.inlinelink if$ % urlbst
+ format.title "title" output.check
+ new.block
+ format.tr.number output.nonnull
+ institution "institution" output.check
+ address output
+ format.date "year" output.check
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {unpublished}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ title empty$ 'skip$ 'possibly.setup.inlinelink if$ % urlbst
+ format.title "title" output.check
+ new.block
+ note "note" output.check
+ format.date output
+ fin.entry
+}
+
+FUNCTION {default.type} { misc }
+
+MACRO {jan} {"Jan."}
+
+MACRO {feb} {"Feb."}
+
+MACRO {mar} {"Mar."}
+
+MACRO {apr} {"Apr."}
+
+MACRO {may} {"May"}
+
+MACRO {jun} {"June"}
+
+MACRO {jul} {"July"}
+
+MACRO {aug} {"Aug."}
+
+MACRO {sep} {"Sept."}
+
+MACRO {oct} {"Oct."}
+
+MACRO {nov} {"Nov."}
+
+MACRO {dec} {"Dec."}
+
+MACRO {acmcs} {"ACM Comput. Surv."}
+
+MACRO {acta} {"Acta Inf."}
+
+MACRO {cacm} {"Commun. ACM"}
+
+MACRO {ibmjrd} {"IBM J. Res. Dev."}
+
+MACRO {ibmsj} {"IBM Syst.~J."}
+
+MACRO {ieeese} {"IEEE Trans. Softw. Eng."}
+
+MACRO {ieeetc} {"IEEE Trans. Comput."}
+
+MACRO {ieeetcad}
+ {"IEEE Trans. Comput.-Aided Design Integrated Circuits"}
+
+MACRO {ipl} {"Inf. Process. Lett."}
+
+MACRO {jacm} {"J.~ACM"}
+
+MACRO {jcss} {"J.~Comput. Syst. Sci."}
+
+MACRO {scp} {"Sci. Comput. Programming"}
+
+MACRO {sicomp} {"SIAM J. Comput."}
+
+MACRO {tocs} {"ACM Trans. Comput. Syst."}
+
+MACRO {tods} {"ACM Trans. Database Syst."}
+
+MACRO {tog} {"ACM Trans. Gr."}
+
+MACRO {toms} {"ACM Trans. Math. Softw."}
+
+MACRO {toois} {"ACM Trans. Office Inf. Syst."}
+
+MACRO {toplas} {"ACM Trans. Prog. Lang. Syst."}
+
+MACRO {tcs} {"Theoretical Comput. Sci."}
+
+READ
+
+FUNCTION {sortify}
+{ purify$
+ "l" change.case$
+}
+
+INTEGERS { len }
+
+FUNCTION {chop.word}
+{ 's :=
+ 'len :=
+ s #1 len substring$ =
+ { s len #1 + global.max$ substring$ }
+ 's
+ if$
+}
+
+FUNCTION {sort.format.names}
+{ 's :=
+ #1 'nameptr :=
+ ""
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ { nameptr #1 >
+ { " " * }
+ 'skip$
+ if$
+ s nameptr "{vv{ } }{ll{ }}{ f{ }}{ jj{ }}" format.name$ 't :=
+ nameptr numnames = t "others" = and
+ { "et al" * }
+ { t sortify * }
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+}
+
+FUNCTION {sort.format.title}
+{ 't :=
+ "A " #2
+ "An " #3
+ "The " #4 t chop.word
+ chop.word
+ chop.word
+ sortify
+ #1 global.max$ substring$
+}
+
+FUNCTION {author.sort}
+{ author empty$
+ { key empty$
+ { "to sort, need author or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { author sort.format.names }
+ if$
+}
+
+FUNCTION {author.editor.sort}
+{ author empty$
+ { editor empty$
+ { key empty$
+ { "to sort, need author, editor, or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { editor sort.format.names }
+ if$
+ }
+ { author sort.format.names }
+ if$
+}
+
+FUNCTION {author.organization.sort}
+{ author empty$
+ { organization empty$
+ { key empty$
+ { "to sort, need author, organization, or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { "The " #4 organization chop.word sortify }
+ if$
+ }
+ { author sort.format.names }
+ if$
+}
+
+FUNCTION {editor.organization.sort}
+{ editor empty$
+ { organization empty$
+ { key empty$
+ { "to sort, need editor, organization, or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { "The " #4 organization chop.word sortify }
+ if$
+ }
+ { editor sort.format.names }
+ if$
+}
+
+FUNCTION {presort}
+{ type$ "book" =
+ type$ "inbook" =
+ or
+ 'author.editor.sort
+ { type$ "proceedings" =
+ 'editor.organization.sort
+ { type$ "manual" =
+ 'author.organization.sort
+ 'author.sort
+ if$
+ }
+ if$
+ }
+ if$
+ " "
+ *
+ year field.or.null sortify
+ *
+ " "
+ *
+ title field.or.null
+ sort.format.title
+ *
+ #1 entry.max$ substring$
+ 'sort.key$ :=
+}
+
+ITERATE {presort}
+
+SORT
+
+STRINGS { longest.label }
+
+INTEGERS { number.label longest.label.width }
+
+FUNCTION {initialize.longest.label}
+{ "" 'longest.label :=
+ #1 'number.label :=
+ #0 'longest.label.width :=
+}
+
+FUNCTION {longest.label.pass}
+{ number.label int.to.str$ 'label :=
+ number.label #1 + 'number.label :=
+ label width$ longest.label.width >
+ { label 'longest.label :=
+ label width$ 'longest.label.width :=
+ }
+ 'skip$
+ if$
+}
+
+EXECUTE {initialize.longest.label}
+
+ITERATE {longest.label.pass}
+
+FUNCTION {begin.bib}
+{ preamble$ empty$
+ 'skip$
+ { preamble$ write$ newline$ }
+ if$
+ "\begin{thebibliography}{" longest.label * "}" * write$ newline$
+}
+
+EXECUTE {begin.bib}
+
+EXECUTE {init.urlbst.variables} % urlbst
+EXECUTE {init.state.consts}
+
+ITERATE {call.type$}
+
+FUNCTION {end.bib}
+{ newline$
+ "\end{thebibliography}" write$ newline$
+}
+
+EXECUTE {end.bib}
diff --git a/biblio/bibtex/contrib/urlbst/alphaurl.bst b/biblio/bibtex/contrib/urlbst/alphaurl.bst
new file mode 100644
index 0000000000..d8907b9708
--- /dev/null
+++ b/biblio/bibtex/contrib/urlbst/alphaurl.bst
@@ -0,0 +1,1624 @@
+%%% Modification of BibTeX style file /usr/local/texlive/2019/texmf-dist/bibtex/bst/base/alpha.bst
+%%% ... by urlbst, version 0.8 (marked with "% urlbst")
+%%% See <http://purl.org/nxg/dist/urlbst>
+%%% Modifications Copyright 2002-03, 2005-12, 2014, 2019, Norman Gray,
+%%% and distributed under the terms of the LPPL; see README for discussion.
+%%%
+%%% Added webpage entry type, and url and lastchecked fields.
+%%% Added eprint support.
+%%% Added DOI support.
+%%% Added PUBMED support.
+%%% Added hyperref support.
+%%% Original headers follow...
+
+% BibTeX standard bibliography style `alpha'
+ % Version 0.99b (8-Dec-10 release) for BibTeX versions 0.99a or later.
+ % Copyright (C) 1984, 1985, 1988, 2010 Howard Trickey and Oren Patashnik.
+ % Unlimited copying and redistribution of this file are permitted as long as
+ % it is unmodified. Modifications (and redistribution of modified versions)
+ % are also permitted, but only if the resulting file is renamed to something
+ % besides btxbst.doc, plain.bst, unsrt.bst, alpha.bst, and abbrv.bst.
+ % This restriction helps ensure that all standard styles are identical.
+ % The file btxbst.doc has the documentation for this style.
+
+ENTRY
+ { address
+ author
+ booktitle
+ chapter
+ edition
+ editor
+ howpublished
+ institution
+ journal
+ key
+ month
+ note
+ number
+ organization
+ pages
+ publisher
+ school
+ series
+ title
+ type
+ volume
+ year
+ eprint % urlbst
+ doi % urlbst
+ pubmed % urlbst
+ url % urlbst
+ lastchecked % urlbst
+ }
+ {}
+ { label extra.label sort.label }
+
+INTEGERS { output.state before.all mid.sentence after.sentence after.block }
+
+% urlbst...
+% urlbst constants and state variables
+STRINGS { urlintro
+ eprinturl eprintprefix doiprefix doiurl pubmedprefix pubmedurl
+ citedstring onlinestring linktextstring
+ openinlinelink closeinlinelink }
+INTEGERS { hrefform inlinelinks makeinlinelink
+ addeprints adddoiresolver addpubmedresolver }
+FUNCTION {init.urlbst.variables}
+{
+ % The following constants may be adjusted by hand, if desired
+
+ % The first set allow you to enable or disable certain functionality.
+ #1 'addeprints := % 0=no eprints; 1=include eprints
+ #1 'adddoiresolver := % 0=no DOI resolver; 1=include it
+ #1 'addpubmedresolver := % 0=no PUBMED resolver; 1=include it
+ #2 'hrefform := % 0=no crossrefs; 1=hypertex xrefs; 2=hyperref refs
+ #0 'inlinelinks := % 0=URLs explicit; 1=URLs attached to titles
+
+ % String constants, which you _might_ want to tweak.
+ "URL: " 'urlintro := % prefix before URL; typically "Available from:" or "URL":
+ "online" 'onlinestring := % indication that resource is online; typically "online"
+ "cited " 'citedstring := % indicator of citation date; typically "cited "
+ "[link]" 'linktextstring := % dummy link text; typically "[link]"
+ "http://arxiv.org/abs/" 'eprinturl := % prefix to make URL from eprint ref
+ "arXiv:" 'eprintprefix := % text prefix printed before eprint ref; typically "arXiv:"
+ "https://doi.org/" 'doiurl := % prefix to make URL from DOI
+ "doi:" 'doiprefix := % text prefix printed before DOI ref; typically "doi:"
+ "http://www.ncbi.nlm.nih.gov/pubmed/" 'pubmedurl := % prefix to make URL from PUBMED
+ "PMID:" 'pubmedprefix := % text prefix printed before PUBMED ref; typically "PMID:"
+
+ % The following are internal state variables, not configuration constants,
+ % so they shouldn't be fiddled with.
+ #0 'makeinlinelink := % state variable managed by possibly.setup.inlinelink
+ "" 'openinlinelink := % ditto
+ "" 'closeinlinelink := % ditto
+}
+INTEGERS {
+ bracket.state
+ outside.brackets
+ open.brackets
+ within.brackets
+ close.brackets
+}
+% ...urlbst to here
+FUNCTION {init.state.consts}
+{ #0 'outside.brackets := % urlbst...
+ #1 'open.brackets :=
+ #2 'within.brackets :=
+ #3 'close.brackets := % ...urlbst to here
+
+ #0 'before.all :=
+ #1 'mid.sentence :=
+ #2 'after.sentence :=
+ #3 'after.block :=
+}
+
+STRINGS { s t }
+
+% urlbst
+FUNCTION {output.nonnull.original}
+{ 's :=
+ output.state mid.sentence =
+ { ", " * write$ }
+ { output.state after.block =
+ { add.period$ write$
+ newline$
+ "\newblock " write$
+ }
+ { output.state before.all =
+ 'write$
+ { add.period$ " " * write$ }
+ if$
+ }
+ if$
+ mid.sentence 'output.state :=
+ }
+ if$
+ s
+}
+
+% urlbst...
+% The following three functions are for handling inlinelink. They wrap
+% a block of text which is potentially output with write$ by multiple
+% other functions, so we don't know the content a priori.
+% They communicate between each other using the variables makeinlinelink
+% (which is true if a link should be made), and closeinlinelink (which holds
+% the string which should close any current link. They can be called
+% at any time, but start.inlinelink will be a no-op unless something has
+% previously set makeinlinelink true, and the two ...end.inlinelink functions
+% will only do their stuff if start.inlinelink has previously set
+% closeinlinelink to be non-empty.
+% (thanks to 'ijvm' for suggested code here)
+FUNCTION {uand}
+{ 'skip$ { pop$ #0 } if$ } % 'and' (which isn't defined at this point in the file)
+FUNCTION {possibly.setup.inlinelink}
+{ makeinlinelink hrefform #0 > uand
+ { doi empty$ adddoiresolver uand
+ { pubmed empty$ addpubmedresolver uand
+ { eprint empty$ addeprints uand
+ { url empty$
+ { "" }
+ { url }
+ if$ }
+ { eprinturl eprint * }
+ if$ }
+ { pubmedurl pubmed * }
+ if$ }
+ { doiurl doi * }
+ if$
+ % an appropriately-formatted URL is now on the stack
+ hrefform #1 = % hypertex
+ { "\special {html:<a href=" quote$ * swap$ * quote$ * "> }{" * 'openinlinelink :=
+ "\special {html:</a>}" 'closeinlinelink := }
+ { "\href {" swap$ * "} {" * 'openinlinelink := % hrefform=#2 -- hyperref
+ % the space between "} {" matters: a URL of just the right length can cause "\% newline em"
+ "}" 'closeinlinelink := }
+ if$
+ #0 'makeinlinelink :=
+ }
+ 'skip$
+ if$ % makeinlinelink
+}
+FUNCTION {add.inlinelink}
+{ openinlinelink empty$
+ 'skip$
+ { openinlinelink swap$ * closeinlinelink *
+ "" 'openinlinelink :=
+ }
+ if$
+}
+FUNCTION {output.nonnull}
+{ % Save the thing we've been asked to output
+ 's :=
+ % If the bracket-state is close.brackets, then add a close-bracket to
+ % what is currently at the top of the stack, and set bracket.state
+ % to outside.brackets
+ bracket.state close.brackets =
+ { "]" *
+ outside.brackets 'bracket.state :=
+ }
+ 'skip$
+ if$
+ bracket.state outside.brackets =
+ { % We're outside all brackets -- this is the normal situation.
+ % Write out what's currently at the top of the stack, using the
+ % original output.nonnull function.
+ s
+ add.inlinelink
+ output.nonnull.original % invoke the original output.nonnull
+ }
+ { % Still in brackets. Add open-bracket or (continuation) comma, add the
+ % new text (in s) to the top of the stack, and move to the close-brackets
+ % state, ready for next time (unless inbrackets resets it). If we come
+ % into this branch, then output.state is carefully undisturbed.
+ bracket.state open.brackets =
+ { " [" * }
+ { ", " * } % bracket.state will be within.brackets
+ if$
+ s *
+ close.brackets 'bracket.state :=
+ }
+ if$
+}
+
+% Call this function just before adding something which should be presented in
+% brackets. bracket.state is handled specially within output.nonnull.
+FUNCTION {inbrackets}
+{ bracket.state close.brackets =
+ { within.brackets 'bracket.state := } % reset the state: not open nor closed
+ { open.brackets 'bracket.state := }
+ if$
+}
+
+FUNCTION {format.lastchecked}
+{ lastchecked empty$
+ { "" }
+ { inbrackets citedstring lastchecked * }
+ if$
+}
+% ...urlbst to here
+
+FUNCTION {output}
+{ duplicate$ empty$
+ 'pop$
+ 'output.nonnull
+ if$
+}
+
+FUNCTION {output.check}
+{ 't :=
+ duplicate$ empty$
+ { pop$ "empty " t * " in " * cite$ * warning$ }
+ 'output.nonnull
+ if$
+}
+
+FUNCTION {output.bibitem.original} % urlbst (renamed from output.bibitem, so it can be wrapped below)
+{ newline$
+ "\bibitem[" write$
+ label write$
+ "]{" write$
+ cite$ write$
+ "}" write$
+ newline$
+ ""
+ before.all 'output.state :=
+}
+
+FUNCTION {fin.entry.original} % urlbst (renamed from fin.entry, so it can be wrapped below)
+{ add.period$
+ write$
+ newline$
+}
+
+FUNCTION {new.block}
+{ output.state before.all =
+ 'skip$
+ { after.block 'output.state := }
+ if$
+}
+
+FUNCTION {new.sentence}
+{ output.state after.block =
+ 'skip$
+ { output.state before.all =
+ 'skip$
+ { after.sentence 'output.state := }
+ if$
+ }
+ if$
+}
+
+FUNCTION {not}
+{ { #0 }
+ { #1 }
+ if$
+}
+
+FUNCTION {and}
+{ 'skip$
+ { pop$ #0 }
+ if$
+}
+
+FUNCTION {or}
+{ { pop$ #1 }
+ 'skip$
+ if$
+}
+
+FUNCTION {new.block.checka}
+{ empty$
+ 'skip$
+ 'new.block
+ if$
+}
+
+FUNCTION {new.block.checkb}
+{ empty$
+ swap$ empty$
+ and
+ 'skip$
+ 'new.block
+ if$
+}
+
+FUNCTION {new.sentence.checka}
+{ empty$
+ 'skip$
+ 'new.sentence
+ if$
+}
+
+FUNCTION {new.sentence.checkb}
+{ empty$
+ swap$ empty$
+ and
+ 'skip$
+ 'new.sentence
+ if$
+}
+
+FUNCTION {field.or.null}
+{ duplicate$ empty$
+ { pop$ "" }
+ 'skip$
+ if$
+}
+
+FUNCTION {emphasize}
+{ duplicate$ empty$
+ { pop$ "" }
+ { "{\em " swap$ * "}" * }
+ if$
+}
+
+INTEGERS { nameptr namesleft numnames }
+
+FUNCTION {format.names}
+{ 's :=
+ #1 'nameptr :=
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ { s nameptr "{ff~}{vv~}{ll}{, jj}" format.name$ 't :=
+ nameptr #1 >
+ { namesleft #1 >
+ { ", " * t * }
+ { numnames #2 >
+ { "," * }
+ 'skip$
+ if$
+ t "others" =
+ { " et~al." * }
+ { " and " * t * }
+ if$
+ }
+ if$
+ }
+ 't
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+}
+
+FUNCTION {format.authors}
+{ author empty$
+ { "" }
+ { author format.names }
+ if$
+}
+
+FUNCTION {format.editors}
+{ editor empty$
+ { "" }
+ { editor format.names
+ editor num.names$ #1 >
+ { ", editors" * }
+ { ", editor" * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.title}
+{ title empty$
+ { "" }
+ { title "t" change.case$ }
+ if$
+}
+
+FUNCTION {n.dashify}
+{ 't :=
+ ""
+ { t empty$ not }
+ { t #1 #1 substring$ "-" =
+ { t #1 #2 substring$ "--" = not
+ { "--" *
+ t #2 global.max$ substring$ 't :=
+ }
+ { { t #1 #1 substring$ "-" = }
+ { "-" *
+ t #2 global.max$ substring$ 't :=
+ }
+ while$
+ }
+ if$
+ }
+ { t #1 #1 substring$ *
+ t #2 global.max$ substring$ 't :=
+ }
+ if$
+ }
+ while$
+}
+
+FUNCTION {format.date}
+{ year empty$
+ { month empty$
+ { "" }
+ { "there's a month but no year in " cite$ * warning$
+ month
+ }
+ if$
+ }
+ { month empty$
+ 'year
+ { month " " * year * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.btitle}
+{ title emphasize
+}
+
+FUNCTION {tie.or.space.connect}
+{ duplicate$ text.length$ #3 <
+ { "~" }
+ { " " }
+ if$
+ swap$ * *
+}
+
+FUNCTION {either.or.check}
+{ empty$
+ 'pop$
+ { "can't use both " swap$ * " fields in " * cite$ * warning$ }
+ if$
+}
+
+FUNCTION {format.bvolume}
+{ volume empty$
+ { "" }
+ { "volume" volume tie.or.space.connect
+ series empty$
+ 'skip$
+ { " of " * series emphasize * }
+ if$
+ "volume and number" number either.or.check
+ }
+ if$
+}
+
+FUNCTION {format.number.series}
+{ volume empty$
+ { number empty$
+ { series field.or.null }
+ { output.state mid.sentence =
+ { "number" }
+ { "Number" }
+ if$
+ number tie.or.space.connect
+ series empty$
+ { "there's a number but no series in " cite$ * warning$ }
+ { " in " * series * }
+ if$
+ }
+ if$
+ }
+ { "" }
+ if$
+}
+
+FUNCTION {format.edition}
+{ edition empty$
+ { "" }
+ { output.state mid.sentence =
+ { edition "l" change.case$ " edition" * }
+ { edition "t" change.case$ " edition" * }
+ if$
+ }
+ if$
+}
+
+INTEGERS { multiresult }
+
+FUNCTION {multi.page.check}
+{ 't :=
+ #0 'multiresult :=
+ { multiresult not
+ t empty$ not
+ and
+ }
+ { t #1 #1 substring$
+ duplicate$ "-" =
+ swap$ duplicate$ "," =
+ swap$ "+" =
+ or or
+ { #1 'multiresult := }
+ { t #2 global.max$ substring$ 't := }
+ if$
+ }
+ while$
+ multiresult
+}
+
+FUNCTION {format.pages}
+{ pages empty$
+ { "" }
+ { pages multi.page.check
+ { "pages" pages n.dashify tie.or.space.connect }
+ { "page" pages tie.or.space.connect }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.vol.num.pages}
+{ volume field.or.null
+ number empty$
+ 'skip$
+ { "(" number * ")" * *
+ volume empty$
+ { "there's a number but no volume in " cite$ * warning$ }
+ 'skip$
+ if$
+ }
+ if$
+ pages empty$
+ 'skip$
+ { duplicate$ empty$
+ { pop$ format.pages }
+ { ":" * pages n.dashify * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.chapter.pages}
+{ chapter empty$
+ 'format.pages
+ { type empty$
+ { "chapter" }
+ { type "l" change.case$ }
+ if$
+ chapter tie.or.space.connect
+ pages empty$
+ 'skip$
+ { ", " * format.pages * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.in.ed.booktitle}
+{ booktitle empty$
+ { "" }
+ { editor empty$
+ { "In " booktitle emphasize * }
+ { "In " format.editors * ", " * booktitle emphasize * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {empty.misc.check}
+{ author empty$ title empty$ howpublished empty$
+ month empty$ year empty$ note empty$
+ and and and and and
+ key empty$ not and
+ { "all relevant fields are empty in " cite$ * warning$ }
+ 'skip$
+ if$
+}
+
+FUNCTION {format.thesis.type}
+{ type empty$
+ 'skip$
+ { pop$
+ type "t" change.case$
+ }
+ if$
+}
+
+FUNCTION {format.tr.number}
+{ type empty$
+ { "Technical Report" }
+ 'type
+ if$
+ number empty$
+ { "t" change.case$ }
+ { number tie.or.space.connect }
+ if$
+}
+
+FUNCTION {format.article.crossref}
+{ key empty$
+ { journal empty$
+ { "need key or journal for " cite$ * " to crossref " * crossref *
+ warning$
+ ""
+ }
+ { "In {\em " journal * "\/}" * }
+ if$
+ }
+ { "In " key * }
+ if$
+ " \cite{" * crossref * "}" *
+}
+
+FUNCTION {format.crossref.editor}
+{ editor #1 "{vv~}{ll}" format.name$
+ editor num.names$ duplicate$
+ #2 >
+ { pop$ " et~al." * }
+ { #2 <
+ 'skip$
+ { editor #2 "{ff }{vv }{ll}{ jj}" format.name$ "others" =
+ { " et~al." * }
+ { " and " * editor #2 "{vv~}{ll}" format.name$ * }
+ if$
+ }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.book.crossref}
+{ volume empty$
+ { "empty volume in " cite$ * "'s crossref of " * crossref * warning$
+ "In "
+ }
+ { "Volume" volume tie.or.space.connect
+ " of " *
+ }
+ if$
+ editor empty$
+ editor field.or.null author field.or.null =
+ or
+ { key empty$
+ { series empty$
+ { "need editor, key, or series for " cite$ * " to crossref " *
+ crossref * warning$
+ "" *
+ }
+ { "{\em " * series * "\/}" * }
+ if$
+ }
+ { key * }
+ if$
+ }
+ { format.crossref.editor * }
+ if$
+ " \cite{" * crossref * "}" *
+}
+
+FUNCTION {format.incoll.inproc.crossref}
+{ editor empty$
+ editor field.or.null author field.or.null =
+ or
+ { key empty$
+ { booktitle empty$
+ { "need editor, key, or booktitle for " cite$ * " to crossref " *
+ crossref * warning$
+ ""
+ }
+ { "In {\em " booktitle * "\/}" * }
+ if$
+ }
+ { "In " key * }
+ if$
+ }
+ { "In " format.crossref.editor * }
+ if$
+ " \cite{" * crossref * "}" *
+}
+
+% urlbst...
+% Functions for making hypertext links.
+% In all cases, the stack has (link-text href-url)
+%
+% make 'null' specials
+FUNCTION {make.href.null}
+{
+ pop$
+}
+% make hypertex specials
+FUNCTION {make.href.hypertex}
+{
+ "\special {html:<a href=" quote$ *
+ swap$ * quote$ * "> }" * swap$ *
+ "\special {html:</a>}" *
+}
+% make hyperref specials
+FUNCTION {make.href.hyperref}
+{
+ "\href {" swap$ * "} {\path{" * swap$ * "}}" *
+}
+FUNCTION {make.href}
+{ hrefform #2 =
+ 'make.href.hyperref % hrefform = 2
+ { hrefform #1 =
+ 'make.href.hypertex % hrefform = 1
+ 'make.href.null % hrefform = 0 (or anything else)
+ if$
+ }
+ if$
+}
+
+% If inlinelinks is true, then format.url should be a no-op, since it's
+% (a) redundant, and (b) could end up as a link-within-a-link.
+FUNCTION {format.url}
+{ inlinelinks #1 = url empty$ or
+ { "" }
+ { hrefform #1 =
+ { % special case -- add HyperTeX specials
+ urlintro "\url{" url * "}" * url make.href.hypertex * }
+ { urlintro "\url{" * url * "}" * }
+ if$
+ }
+ if$
+}
+FUNCTION {format.eprint}
+{ eprint empty$
+ { "" }
+ { eprintprefix eprint * eprinturl eprint * make.href }
+ if$
+}
+
+FUNCTION {format.doi}
+{ doi empty$
+ { "" }
+ { doiprefix doi * doiurl doi * make.href }
+ if$
+}
+
+FUNCTION {format.pubmed}
+{ pubmed empty$
+ { "" }
+ { pubmedprefix pubmed * pubmedurl pubmed * make.href }
+ if$
+}
+
+% Output a URL. We can't use the more normal idiom (something like
+% `format.url output'), because the `inbrackets' within
+% format.lastchecked applies to everything between calls to `output',
+% so that `format.url format.lastchecked * output' ends up with both
+% the URL and the lastchecked in brackets.
+FUNCTION {output.url}
+{ url empty$
+ 'skip$
+ { new.block
+ format.url output
+ format.lastchecked output
+ }
+ if$
+}
+
+FUNCTION {output.web.refs}
+{
+ new.block
+ inlinelinks
+ 'skip$ % links were inline -- don't repeat them
+ { % If the generated DOI will be the same as the URL,
+ % then don't print the URL (thanks to Joseph Wright for this code,
+ % at http://tex.stackexchange.com/questions/5660)
+ adddoiresolver
+ doiurl doi empty$ { "X" } { doi } if$ * % DOI URL to be generated
+ url empty$ { "Y" } { url } if$ % the URL, or "Y" if empty
+ = % are the strings equal?
+ and
+ 'skip$
+ { output.url }
+ if$
+ addeprints eprint empty$ not and
+ { format.eprint output.nonnull }
+ 'skip$
+ if$
+ adddoiresolver doi empty$ not and
+ { format.doi output.nonnull }
+ 'skip$
+ if$
+ addpubmedresolver pubmed empty$ not and
+ { format.pubmed output.nonnull }
+ 'skip$
+ if$
+ }
+ if$
+}
+
+% Wrapper for output.bibitem.original.
+% If the URL field is not empty, set makeinlinelink to be true,
+% so that an inline link will be started at the next opportunity
+FUNCTION {output.bibitem}
+{ outside.brackets 'bracket.state :=
+ output.bibitem.original
+ inlinelinks url empty$ not doi empty$ not or pubmed empty$ not or eprint empty$ not or and
+ { #1 'makeinlinelink := }
+ { #0 'makeinlinelink := }
+ if$
+}
+
+% Wrapper for fin.entry.original
+FUNCTION {fin.entry}
+{ output.web.refs % urlbst
+ makeinlinelink % ooops, it appears we didn't have a title for inlinelink
+ { possibly.setup.inlinelink % add some artificial link text here, as a fallback
+ linktextstring output.nonnull }
+ 'skip$
+ if$
+ bracket.state close.brackets = % urlbst
+ { "]" * }
+ 'skip$
+ if$
+ fin.entry.original
+}
+
+% Webpage entry type.
+% Title and url fields required;
+% author, note, year, month, and lastchecked fields optional
+% See references
+% ISO 690-2 http://www.nlc-bnc.ca/iso/tc46sc9/standard/690-2e.htm
+% http://www.classroom.net/classroom/CitingNetResources.html
+% http://neal.ctstateu.edu/history/cite.html
+% http://www.cas.usf.edu/english/walker/mla.html
+% for citation formats for web pages.
+FUNCTION {webpage}
+{ output.bibitem
+ author empty$
+ { editor empty$
+ 'skip$ % author and editor both optional
+ { format.editors output.nonnull }
+ if$
+ }
+ { editor empty$
+ { format.authors output.nonnull }
+ { "can't use both author and editor fields in " cite$ * warning$ }
+ if$
+ }
+ if$
+ new.block
+ title empty$ 'skip$ 'possibly.setup.inlinelink if$
+ format.title "title" output.check
+ inbrackets onlinestring output
+ new.block
+ year empty$
+ 'skip$
+ { format.date "year" output.check }
+ if$
+ % We don't need to output the URL details ('lastchecked' and 'url'),
+ % because fin.entry does that for us, using output.web.refs. The only
+ % reason we would want to put them here is if we were to decide that
+ % they should go in front of the rather miscellaneous information in 'note'.
+ new.block
+ note output
+ fin.entry
+}
+% ...urlbst to here
+
+
+FUNCTION {article}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ title empty$ 'skip$ 'possibly.setup.inlinelink if$ % urlbst
+ format.title "title" output.check
+ new.block
+ crossref missing$
+ { journal emphasize "journal" output.check
+ possibly.setup.inlinelink format.vol.num.pages output% urlbst
+ format.date "year" output.check
+ }
+ { format.article.crossref output.nonnull
+ format.pages output
+ }
+ if$
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {book}
+{ output.bibitem
+ author empty$
+ { format.editors "author and editor" output.check }
+ { format.authors output.nonnull
+ crossref missing$
+ { "author and editor" editor either.or.check }
+ 'skip$
+ if$
+ }
+ if$
+ new.block
+ title empty$ 'skip$ 'possibly.setup.inlinelink if$ % urlbst
+ format.btitle "title" output.check
+ crossref missing$
+ { format.bvolume output
+ new.block
+ format.number.series output
+ new.sentence
+ publisher "publisher" output.check
+ address output
+ }
+ { new.block
+ format.book.crossref output.nonnull
+ }
+ if$
+ format.edition output
+ format.date "year" output.check
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {booklet}
+{ output.bibitem
+ format.authors output
+ new.block
+ title empty$ 'skip$ 'possibly.setup.inlinelink if$ % urlbst
+ format.title "title" output.check
+ howpublished address new.block.checkb
+ howpublished output
+ address output
+ format.date output
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {inbook}
+{ output.bibitem
+ author empty$
+ { format.editors "author and editor" output.check }
+ { format.authors output.nonnull
+ crossref missing$
+ { "author and editor" editor either.or.check }
+ 'skip$
+ if$
+ }
+ if$
+ new.block
+ title empty$ 'skip$ 'possibly.setup.inlinelink if$ % urlbst
+ format.btitle "title" output.check
+ crossref missing$
+ { format.bvolume output
+ format.chapter.pages "chapter and pages" output.check
+ new.block
+ format.number.series output
+ new.sentence
+ publisher "publisher" output.check
+ address output
+ }
+ { format.chapter.pages "chapter and pages" output.check
+ new.block
+ format.book.crossref output.nonnull
+ }
+ if$
+ format.edition output
+ format.date "year" output.check
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {incollection}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ title empty$ 'skip$ 'possibly.setup.inlinelink if$ % urlbst
+ format.title "title" output.check
+ new.block
+ crossref missing$
+ { format.in.ed.booktitle "booktitle" output.check
+ format.bvolume output
+ format.number.series output
+ format.chapter.pages output
+ new.sentence
+ publisher "publisher" output.check
+ address output
+ format.edition output
+ format.date "year" output.check
+ }
+ { format.incoll.inproc.crossref output.nonnull
+ format.chapter.pages output
+ }
+ if$
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {inproceedings}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ title empty$ 'skip$ 'possibly.setup.inlinelink if$ % urlbst
+ format.title "title" output.check
+ new.block
+ crossref missing$
+ { format.in.ed.booktitle "booktitle" output.check
+ format.bvolume output
+ format.number.series output
+ format.pages output
+ address empty$
+ { organization publisher new.sentence.checkb
+ organization output
+ publisher output
+ format.date "year" output.check
+ }
+ { address output.nonnull
+ format.date "year" output.check
+ new.sentence
+ organization output
+ publisher output
+ }
+ if$
+ }
+ { format.incoll.inproc.crossref output.nonnull
+ format.pages output
+ }
+ if$
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {conference} { inproceedings }
+
+FUNCTION {manual}
+{ output.bibitem
+ author empty$
+ { organization empty$
+ 'skip$
+ { organization output.nonnull
+ address output
+ }
+ if$
+ }
+ { format.authors output.nonnull }
+ if$
+ new.block
+ title empty$ 'skip$ 'possibly.setup.inlinelink if$ % urlbst
+ format.btitle "title" output.check
+ author empty$
+ { organization empty$
+ { address new.block.checka
+ address output
+ }
+ 'skip$
+ if$
+ }
+ { organization address new.block.checkb
+ organization output
+ address output
+ }
+ if$
+ format.edition output
+ format.date output
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {mastersthesis}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ title empty$ 'skip$ 'possibly.setup.inlinelink if$ % urlbst
+ format.title "title" output.check
+ new.block
+ "Master's thesis" format.thesis.type output.nonnull
+ school "school" output.check
+ address output
+ format.date "year" output.check
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {misc}
+{ output.bibitem
+ format.authors output
+ title howpublished new.block.checkb
+ title empty$ 'skip$ 'possibly.setup.inlinelink if$ % urlbst
+ format.title output
+ howpublished new.block.checka
+ howpublished output
+ format.date output
+ new.block
+ note output
+ fin.entry
+ empty.misc.check
+}
+
+FUNCTION {phdthesis}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ title empty$ 'skip$ 'possibly.setup.inlinelink if$ % urlbst
+ format.btitle "title" output.check
+ new.block
+ "PhD thesis" format.thesis.type output.nonnull
+ school "school" output.check
+ address output
+ format.date "year" output.check
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {proceedings}
+{ output.bibitem
+ editor empty$
+ { organization output }
+ { format.editors output.nonnull }
+ if$
+ new.block
+ title empty$ 'skip$ 'possibly.setup.inlinelink if$ % urlbst
+ format.btitle "title" output.check
+ format.bvolume output
+ format.number.series output
+ address empty$
+ { editor empty$
+ { publisher new.sentence.checka }
+ { organization publisher new.sentence.checkb
+ organization output
+ }
+ if$
+ publisher output
+ format.date "year" output.check
+ }
+ { address output.nonnull
+ format.date "year" output.check
+ new.sentence
+ editor empty$
+ 'skip$
+ { organization output }
+ if$
+ publisher output
+ }
+ if$
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {techreport}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ title empty$ 'skip$ 'possibly.setup.inlinelink if$ % urlbst
+ format.title "title" output.check
+ new.block
+ format.tr.number output.nonnull
+ institution "institution" output.check
+ address output
+ format.date "year" output.check
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {unpublished}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ title empty$ 'skip$ 'possibly.setup.inlinelink if$ % urlbst
+ format.title "title" output.check
+ new.block
+ note "note" output.check
+ format.date output
+ fin.entry
+}
+
+FUNCTION {default.type} { misc }
+
+MACRO {jan} {"January"}
+
+MACRO {feb} {"February"}
+
+MACRO {mar} {"March"}
+
+MACRO {apr} {"April"}
+
+MACRO {may} {"May"}
+
+MACRO {jun} {"June"}
+
+MACRO {jul} {"July"}
+
+MACRO {aug} {"August"}
+
+MACRO {sep} {"September"}
+
+MACRO {oct} {"October"}
+
+MACRO {nov} {"November"}
+
+MACRO {dec} {"December"}
+
+MACRO {acmcs} {"ACM Computing Surveys"}
+
+MACRO {acta} {"Acta Informatica"}
+
+MACRO {cacm} {"Communications of the ACM"}
+
+MACRO {ibmjrd} {"IBM Journal of Research and Development"}
+
+MACRO {ibmsj} {"IBM Systems Journal"}
+
+MACRO {ieeese} {"IEEE Transactions on Software Engineering"}
+
+MACRO {ieeetc} {"IEEE Transactions on Computers"}
+
+MACRO {ieeetcad}
+ {"IEEE Transactions on Computer-Aided Design of Integrated Circuits"}
+
+MACRO {ipl} {"Information Processing Letters"}
+
+MACRO {jacm} {"Journal of the ACM"}
+
+MACRO {jcss} {"Journal of Computer and System Sciences"}
+
+MACRO {scp} {"Science of Computer Programming"}
+
+MACRO {sicomp} {"SIAM Journal on Computing"}
+
+MACRO {tocs} {"ACM Transactions on Computer Systems"}
+
+MACRO {tods} {"ACM Transactions on Database Systems"}
+
+MACRO {tog} {"ACM Transactions on Graphics"}
+
+MACRO {toms} {"ACM Transactions on Mathematical Software"}
+
+MACRO {toois} {"ACM Transactions on Office Information Systems"}
+
+MACRO {toplas} {"ACM Transactions on Programming Languages and Systems"}
+
+MACRO {tcs} {"Theoretical Computer Science"}
+
+READ
+
+FUNCTION {sortify}
+{ purify$
+ "l" change.case$
+}
+
+INTEGERS { len }
+
+FUNCTION {chop.word}
+{ 's :=
+ 'len :=
+ s #1 len substring$ =
+ { s len #1 + global.max$ substring$ }
+ 's
+ if$
+}
+
+INTEGERS { et.al.char.used }
+
+FUNCTION {initialize.et.al.char.used}
+{ #0 'et.al.char.used :=
+}
+
+EXECUTE {initialize.et.al.char.used}
+
+FUNCTION {format.lab.names}
+{ 's :=
+ s num.names$ 'numnames :=
+ numnames #1 >
+ { numnames #4 >
+ { #3 'namesleft := }
+ { numnames 'namesleft := }
+ if$
+ #1 'nameptr :=
+ ""
+ { namesleft #0 > }
+ { nameptr numnames =
+ { s nameptr "{ff }{vv }{ll}{ jj}" format.name$ "others" =
+ { "{\etalchar{+}}" *
+ #1 'et.al.char.used :=
+ }
+ { s nameptr "{v{}}{l{}}" format.name$ * }
+ if$
+ }
+ { s nameptr "{v{}}{l{}}" format.name$ * }
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+ numnames #4 >
+ { "{\etalchar{+}}" *
+ #1 'et.al.char.used :=
+ }
+ 'skip$
+ if$
+ }
+ { s #1 "{v{}}{l{}}" format.name$
+ duplicate$ text.length$ #2 <
+ { pop$ s #1 "{ll}" format.name$ #3 text.prefix$ }
+ 'skip$
+ if$
+ }
+ if$
+}
+
+FUNCTION {author.key.label}
+{ author empty$
+ { key empty$
+ { cite$ #1 #3 substring$ }
+ { key #3 text.prefix$ }
+ if$
+ }
+ { author format.lab.names }
+ if$
+}
+
+FUNCTION {author.editor.key.label}
+{ author empty$
+ { editor empty$
+ { key empty$
+ { cite$ #1 #3 substring$ }
+ { key #3 text.prefix$ }
+ if$
+ }
+ { editor format.lab.names }
+ if$
+ }
+ { author format.lab.names }
+ if$
+}
+
+FUNCTION {author.key.organization.label}
+{ author empty$
+ { key empty$
+ { organization empty$
+ { cite$ #1 #3 substring$ }
+ { "The " #4 organization chop.word #3 text.prefix$ }
+ if$
+ }
+ { key #3 text.prefix$ }
+ if$
+ }
+ { author format.lab.names }
+ if$
+}
+
+FUNCTION {editor.key.organization.label}
+{ editor empty$
+ { key empty$
+ { organization empty$
+ { cite$ #1 #3 substring$ }
+ { "The " #4 organization chop.word #3 text.prefix$ }
+ if$
+ }
+ { key #3 text.prefix$ }
+ if$
+ }
+ { editor format.lab.names }
+ if$
+}
+
+FUNCTION {calc.label}
+{ type$ "book" =
+ type$ "inbook" =
+ or
+ 'author.editor.key.label
+ { type$ "proceedings" =
+ 'editor.key.organization.label
+ { type$ "manual" =
+ 'author.key.organization.label
+ 'author.key.label
+ if$
+ }
+ if$
+ }
+ if$
+ duplicate$
+ year field.or.null purify$ #-1 #2 substring$
+ *
+ 'label :=
+ year field.or.null purify$ #-1 #4 substring$
+ *
+ sortify 'sort.label :=
+}
+
+FUNCTION {sort.format.names}
+{ 's :=
+ #1 'nameptr :=
+ ""
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ { nameptr #1 >
+ { " " * }
+ 'skip$
+ if$
+ s nameptr "{vv{ } }{ll{ }}{ ff{ }}{ jj{ }}" format.name$ 't :=
+ nameptr numnames = t "others" = and
+ { "et al" * }
+ { t sortify * }
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+}
+
+FUNCTION {sort.format.title}
+{ 't :=
+ "A " #2
+ "An " #3
+ "The " #4 t chop.word
+ chop.word
+ chop.word
+ sortify
+ #1 global.max$ substring$
+}
+
+FUNCTION {author.sort}
+{ author empty$
+ { key empty$
+ { "to sort, need author or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { author sort.format.names }
+ if$
+}
+
+FUNCTION {author.editor.sort}
+{ author empty$
+ { editor empty$
+ { key empty$
+ { "to sort, need author, editor, or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { editor sort.format.names }
+ if$
+ }
+ { author sort.format.names }
+ if$
+}
+
+FUNCTION {author.organization.sort}
+{ author empty$
+ { organization empty$
+ { key empty$
+ { "to sort, need author, organization, or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { "The " #4 organization chop.word sortify }
+ if$
+ }
+ { author sort.format.names }
+ if$
+}
+
+FUNCTION {editor.organization.sort}
+{ editor empty$
+ { organization empty$
+ { key empty$
+ { "to sort, need editor, organization, or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { "The " #4 organization chop.word sortify }
+ if$
+ }
+ { editor sort.format.names }
+ if$
+}
+
+FUNCTION {presort}
+{ calc.label
+ sort.label
+ " "
+ *
+ type$ "book" =
+ type$ "inbook" =
+ or
+ 'author.editor.sort
+ { type$ "proceedings" =
+ 'editor.organization.sort
+ { type$ "manual" =
+ 'author.organization.sort
+ 'author.sort
+ if$
+ }
+ if$
+ }
+ if$
+ *
+ " "
+ *
+ year field.or.null sortify
+ *
+ " "
+ *
+ title field.or.null
+ sort.format.title
+ *
+ #1 entry.max$ substring$
+ 'sort.key$ :=
+}
+
+ITERATE {presort}
+
+SORT
+
+STRINGS { longest.label last.sort.label next.extra }
+
+INTEGERS { longest.label.width last.extra.num }
+
+FUNCTION {initialize.longest.label}
+{ "" 'longest.label :=
+ #0 int.to.chr$ 'last.sort.label :=
+ "" 'next.extra :=
+ #0 'longest.label.width :=
+ #0 'last.extra.num :=
+}
+
+FUNCTION {forward.pass}
+{ last.sort.label sort.label =
+ { last.extra.num #1 + 'last.extra.num :=
+ last.extra.num int.to.chr$ 'extra.label :=
+ }
+ { "a" chr.to.int$ 'last.extra.num :=
+ "" 'extra.label :=
+ sort.label 'last.sort.label :=
+ }
+ if$
+}
+
+FUNCTION {reverse.pass}
+{ next.extra "b" =
+ { "a" 'extra.label := }
+ 'skip$
+ if$
+ label extra.label * 'label :=
+ label width$ longest.label.width >
+ { label 'longest.label :=
+ label width$ 'longest.label.width :=
+ }
+ 'skip$
+ if$
+ extra.label 'next.extra :=
+}
+
+EXECUTE {initialize.longest.label}
+
+ITERATE {forward.pass}
+
+REVERSE {reverse.pass}
+
+FUNCTION {begin.bib}
+{ et.al.char.used
+ { "\newcommand{\etalchar}[1]{$^{#1}$}" write$ newline$ }
+ 'skip$
+ if$
+ preamble$ empty$
+ 'skip$
+ { preamble$ write$ newline$ }
+ if$
+ "\begin{thebibliography}{" longest.label * "}" * write$ newline$
+}
+
+EXECUTE {begin.bib}
+
+EXECUTE {init.urlbst.variables} % urlbst
+EXECUTE {init.state.consts}
+
+ITERATE {call.type$}
+
+FUNCTION {end.bib}
+{ newline$
+ "\end{thebibliography}" write$ newline$
+}
+
+EXECUTE {end.bib}
diff --git a/biblio/bibtex/contrib/urlbst/configure b/biblio/bibtex/contrib/urlbst/configure
new file mode 100644
index 0000000000..f02879bc57
--- /dev/null
+++ b/biblio/bibtex/contrib/urlbst/configure
@@ -0,0 +1,2985 @@
+#! /bin/sh
+# From configure.ac @PACKAGE_VERSION@.
+# Guess values for system-dependent variables and create Makefiles.
+# Generated by GNU Autoconf 2.69 for urlbst 0.8.
+#
+# Report bugs to <norman@astro.gla.ac.uk>.
+#
+#
+# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
+#
+#
+# This configure script is free software; the Free Software Foundation
+# gives unlimited permission to copy, distribute and modify it.
+## -------------------- ##
+## M4sh Initialization. ##
+## -------------------- ##
+
+# Be more Bourne compatible
+DUALCASE=1; export DUALCASE # for MKS sh
+if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
+ emulate sh
+ NULLCMD=:
+ # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
+ # is contrary to our usage. Disable this feature.
+ alias -g '${1+"$@"}'='"$@"'
+ setopt NO_GLOB_SUBST
+else
+ case `(set -o) 2>/dev/null` in #(
+ *posix*) :
+ set -o posix ;; #(
+ *) :
+ ;;
+esac
+fi
+
+
+as_nl='
+'
+export as_nl
+# Printing a long string crashes Solaris 7 /usr/bin/printf.
+as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
+as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
+as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
+# Prefer a ksh shell builtin over an external printf program on Solaris,
+# but without wasting forks for bash or zsh.
+if test -z "$BASH_VERSION$ZSH_VERSION" \
+ && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
+ as_echo='print -r --'
+ as_echo_n='print -rn --'
+elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
+ as_echo='printf %s\n'
+ as_echo_n='printf %s'
+else
+ if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
+ as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
+ as_echo_n='/usr/ucb/echo -n'
+ else
+ as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
+ as_echo_n_body='eval
+ arg=$1;
+ case $arg in #(
+ *"$as_nl"*)
+ expr "X$arg" : "X\\(.*\\)$as_nl";
+ arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
+ esac;
+ expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
+ '
+ export as_echo_n_body
+ as_echo_n='sh -c $as_echo_n_body as_echo'
+ fi
+ export as_echo_body
+ as_echo='sh -c $as_echo_body as_echo'
+fi
+
+# The user is always right.
+if test "${PATH_SEPARATOR+set}" != set; then
+ PATH_SEPARATOR=:
+ (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
+ (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
+ PATH_SEPARATOR=';'
+ }
+fi
+
+
+# IFS
+# We need space, tab and new line, in precisely that order. Quoting is
+# there to prevent editors from complaining about space-tab.
+# (If _AS_PATH_WALK were called with IFS unset, it would disable word
+# splitting by setting IFS to empty value.)
+IFS=" "" $as_nl"
+
+# Find who we are. Look in the path if we contain no directory separator.
+as_myself=
+case $0 in #((
+ *[\\/]* ) as_myself=$0 ;;
+ *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
+ done
+IFS=$as_save_IFS
+
+ ;;
+esac
+# We did not find ourselves, most probably we were run as `sh COMMAND'
+# in which case we are not to be found in the path.
+if test "x$as_myself" = x; then
+ as_myself=$0
+fi
+if test ! -f "$as_myself"; then
+ $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
+ exit 1
+fi
+
+# Unset variables that we do not need and which cause bugs (e.g. in
+# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
+# suppresses any "Segmentation fault" message there. '((' could
+# trigger a bug in pdksh 5.2.14.
+for as_var in BASH_ENV ENV MAIL MAILPATH
+do eval test x\${$as_var+set} = xset \
+ && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
+done
+PS1='$ '
+PS2='> '
+PS4='+ '
+
+# NLS nuisances.
+LC_ALL=C
+export LC_ALL
+LANGUAGE=C
+export LANGUAGE
+
+# CDPATH.
+(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
+
+# Use a proper internal environment variable to ensure we don't fall
+ # into an infinite loop, continuously re-executing ourselves.
+ if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then
+ _as_can_reexec=no; export _as_can_reexec;
+ # We cannot yet assume a decent shell, so we have to provide a
+# neutralization value for shells without unset; and this also
+# works around shells that cannot unset nonexistent variables.
+# Preserve -v and -x to the replacement shell.
+BASH_ENV=/dev/null
+ENV=/dev/null
+(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
+case $- in # ((((
+ *v*x* | *x*v* ) as_opts=-vx ;;
+ *v* ) as_opts=-v ;;
+ *x* ) as_opts=-x ;;
+ * ) as_opts= ;;
+esac
+exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
+# Admittedly, this is quite paranoid, since all the known shells bail
+# out after a failed `exec'.
+$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
+as_fn_exit 255
+ fi
+ # We don't want this to propagate to other subprocesses.
+ { _as_can_reexec=; unset _as_can_reexec;}
+if test "x$CONFIG_SHELL" = x; then
+ as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
+ emulate sh
+ NULLCMD=:
+ # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
+ # is contrary to our usage. Disable this feature.
+ alias -g '\${1+\"\$@\"}'='\"\$@\"'
+ setopt NO_GLOB_SUBST
+else
+ case \`(set -o) 2>/dev/null\` in #(
+ *posix*) :
+ set -o posix ;; #(
+ *) :
+ ;;
+esac
+fi
+"
+ as_required="as_fn_return () { (exit \$1); }
+as_fn_success () { as_fn_return 0; }
+as_fn_failure () { as_fn_return 1; }
+as_fn_ret_success () { return 0; }
+as_fn_ret_failure () { return 1; }
+
+exitcode=0
+as_fn_success || { exitcode=1; echo as_fn_success failed.; }
+as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
+as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
+as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
+if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
+
+else
+ exitcode=1; echo positional parameters were not saved.
+fi
+test x\$exitcode = x0 || exit 1
+test -x / || exit 1"
+ as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
+ as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
+ eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
+ test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1"
+ if (eval "$as_required") 2>/dev/null; then :
+ as_have_required=yes
+else
+ as_have_required=no
+fi
+ if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
+
+else
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+as_found=false
+for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ as_found=:
+ case $as_dir in #(
+ /*)
+ for as_base in sh bash ksh sh5; do
+ # Try only shells that exist, to save several forks.
+ as_shell=$as_dir/$as_base
+ if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
+ { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
+ CONFIG_SHELL=$as_shell as_have_required=yes
+ if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
+ break 2
+fi
+fi
+ done;;
+ esac
+ as_found=false
+done
+$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
+ { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
+ CONFIG_SHELL=$SHELL as_have_required=yes
+fi; }
+IFS=$as_save_IFS
+
+
+ if test "x$CONFIG_SHELL" != x; then :
+ export CONFIG_SHELL
+ # We cannot yet assume a decent shell, so we have to provide a
+# neutralization value for shells without unset; and this also
+# works around shells that cannot unset nonexistent variables.
+# Preserve -v and -x to the replacement shell.
+BASH_ENV=/dev/null
+ENV=/dev/null
+(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
+case $- in # ((((
+ *v*x* | *x*v* ) as_opts=-vx ;;
+ *v* ) as_opts=-v ;;
+ *x* ) as_opts=-x ;;
+ * ) as_opts= ;;
+esac
+exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
+# Admittedly, this is quite paranoid, since all the known shells bail
+# out after a failed `exec'.
+$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
+exit 255
+fi
+
+ if test x$as_have_required = xno; then :
+ $as_echo "$0: This script requires a shell more modern than all"
+ $as_echo "$0: the shells that I found on your system."
+ if test x${ZSH_VERSION+set} = xset ; then
+ $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
+ $as_echo "$0: be upgraded to zsh 4.3.4 or later."
+ else
+ $as_echo "$0: Please tell bug-autoconf@gnu.org and
+$0: norman@astro.gla.ac.uk about your system, including any
+$0: error possibly output before this message. Then install
+$0: a modern shell, or manually run the script under such a
+$0: shell if you do have one."
+ fi
+ exit 1
+fi
+fi
+fi
+SHELL=${CONFIG_SHELL-/bin/sh}
+export SHELL
+# Unset more variables known to interfere with behavior of common tools.
+CLICOLOR_FORCE= GREP_OPTIONS=
+unset CLICOLOR_FORCE GREP_OPTIONS
+
+## --------------------- ##
+## M4sh Shell Functions. ##
+## --------------------- ##
+# as_fn_unset VAR
+# ---------------
+# Portably unset VAR.
+as_fn_unset ()
+{
+ { eval $1=; unset $1;}
+}
+as_unset=as_fn_unset
+
+# as_fn_set_status STATUS
+# -----------------------
+# Set $? to STATUS, without forking.
+as_fn_set_status ()
+{
+ return $1
+} # as_fn_set_status
+
+# as_fn_exit STATUS
+# -----------------
+# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
+as_fn_exit ()
+{
+ set +e
+ as_fn_set_status $1
+ exit $1
+} # as_fn_exit
+
+# as_fn_mkdir_p
+# -------------
+# Create "$as_dir" as a directory, including parents if necessary.
+as_fn_mkdir_p ()
+{
+
+ case $as_dir in #(
+ -*) as_dir=./$as_dir;;
+ esac
+ test -d "$as_dir" || eval $as_mkdir_p || {
+ as_dirs=
+ while :; do
+ case $as_dir in #(
+ *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
+ *) as_qdir=$as_dir;;
+ esac
+ as_dirs="'$as_qdir' $as_dirs"
+ as_dir=`$as_dirname -- "$as_dir" ||
+$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$as_dir" : 'X\(//\)[^/]' \| \
+ X"$as_dir" : 'X\(//\)$' \| \
+ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X"$as_dir" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)[^/].*/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'`
+ test -d "$as_dir" && break
+ done
+ test -z "$as_dirs" || eval "mkdir $as_dirs"
+ } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
+
+
+} # as_fn_mkdir_p
+
+# as_fn_executable_p FILE
+# -----------------------
+# Test if FILE is an executable regular file.
+as_fn_executable_p ()
+{
+ test -f "$1" && test -x "$1"
+} # as_fn_executable_p
+# as_fn_append VAR VALUE
+# ----------------------
+# Append the text in VALUE to the end of the definition contained in VAR. Take
+# advantage of any shell optimizations that allow amortized linear growth over
+# repeated appends, instead of the typical quadratic growth present in naive
+# implementations.
+if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
+ eval 'as_fn_append ()
+ {
+ eval $1+=\$2
+ }'
+else
+ as_fn_append ()
+ {
+ eval $1=\$$1\$2
+ }
+fi # as_fn_append
+
+# as_fn_arith ARG...
+# ------------------
+# Perform arithmetic evaluation on the ARGs, and store the result in the
+# global $as_val. Take advantage of shells that can avoid forks. The arguments
+# must be portable across $(()) and expr.
+if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
+ eval 'as_fn_arith ()
+ {
+ as_val=$(( $* ))
+ }'
+else
+ as_fn_arith ()
+ {
+ as_val=`expr "$@" || test $? -eq 1`
+ }
+fi # as_fn_arith
+
+
+# as_fn_error STATUS ERROR [LINENO LOG_FD]
+# ----------------------------------------
+# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
+# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
+# script with STATUS, using 1 if that was 0.
+as_fn_error ()
+{
+ as_status=$1; test $as_status -eq 0 && as_status=1
+ if test "$4"; then
+ as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+ $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
+ fi
+ $as_echo "$as_me: error: $2" >&2
+ as_fn_exit $as_status
+} # as_fn_error
+
+if expr a : '\(a\)' >/dev/null 2>&1 &&
+ test "X`expr 00001 : '.*\(...\)'`" = X001; then
+ as_expr=expr
+else
+ as_expr=false
+fi
+
+if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
+ as_basename=basename
+else
+ as_basename=false
+fi
+
+if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
+ as_dirname=dirname
+else
+ as_dirname=false
+fi
+
+as_me=`$as_basename -- "$0" ||
+$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
+ X"$0" : 'X\(//\)$' \| \
+ X"$0" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X/"$0" |
+ sed '/^.*\/\([^/][^/]*\)\/*$/{
+ s//\1/
+ q
+ }
+ /^X\/\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\/\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'`
+
+# Avoid depending upon Character Ranges.
+as_cr_letters='abcdefghijklmnopqrstuvwxyz'
+as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
+as_cr_Letters=$as_cr_letters$as_cr_LETTERS
+as_cr_digits='0123456789'
+as_cr_alnum=$as_cr_Letters$as_cr_digits
+
+
+ as_lineno_1=$LINENO as_lineno_1a=$LINENO
+ as_lineno_2=$LINENO as_lineno_2a=$LINENO
+ eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
+ test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
+ # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-)
+ sed -n '
+ p
+ /[$]LINENO/=
+ ' <$as_myself |
+ sed '
+ s/[$]LINENO.*/&-/
+ t lineno
+ b
+ :lineno
+ N
+ :loop
+ s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
+ t loop
+ s/-\n.*//
+ ' >$as_me.lineno &&
+ chmod +x "$as_me.lineno" ||
+ { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
+
+ # If we had to re-execute with $CONFIG_SHELL, we're ensured to have
+ # already done that, so ensure we don't try to do so again and fall
+ # in an infinite loop. This has already happened in practice.
+ _as_can_reexec=no; export _as_can_reexec
+ # Don't try to exec as it changes $[0], causing all sort of problems
+ # (the dirname of $[0] is not the place where we might find the
+ # original and so on. Autoconf is especially sensitive to this).
+ . "./$as_me.lineno"
+ # Exit status is that of the last command.
+ exit
+}
+
+ECHO_C= ECHO_N= ECHO_T=
+case `echo -n x` in #(((((
+-n*)
+ case `echo 'xy\c'` in
+ *c*) ECHO_T=' ';; # ECHO_T is single tab character.
+ xy) ECHO_C='\c';;
+ *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
+ ECHO_T=' ';;
+ esac;;
+*)
+ ECHO_N='-n';;
+esac
+
+rm -f conf$$ conf$$.exe conf$$.file
+if test -d conf$$.dir; then
+ rm -f conf$$.dir/conf$$.file
+else
+ rm -f conf$$.dir
+ mkdir conf$$.dir 2>/dev/null
+fi
+if (echo >conf$$.file) 2>/dev/null; then
+ if ln -s conf$$.file conf$$ 2>/dev/null; then
+ as_ln_s='ln -s'
+ # ... but there are two gotchas:
+ # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
+ # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
+ # In both cases, we have to default to `cp -pR'.
+ ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
+ as_ln_s='cp -pR'
+ elif ln conf$$.file conf$$ 2>/dev/null; then
+ as_ln_s=ln
+ else
+ as_ln_s='cp -pR'
+ fi
+else
+ as_ln_s='cp -pR'
+fi
+rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
+rmdir conf$$.dir 2>/dev/null
+
+if mkdir -p . 2>/dev/null; then
+ as_mkdir_p='mkdir -p "$as_dir"'
+else
+ test -d ./-p && rmdir ./-p
+ as_mkdir_p=false
+fi
+
+as_test_x='test -x'
+as_executable_p=as_fn_executable_p
+
+# Sed expression to map a string onto a valid CPP name.
+as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
+
+# Sed expression to map a string onto a valid variable name.
+as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
+
+
+test -n "$DJDIR" || exec 7<&0 </dev/null
+exec 6>&1
+
+# Name of the host.
+# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
+# so uname gets run too.
+ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
+
+#
+# Initializations.
+#
+ac_default_prefix=/usr/local
+ac_clean_files=
+ac_config_libobj_dir=.
+LIBOBJS=
+cross_compiling=no
+subdirs=
+MFLAGS=
+MAKEFLAGS=
+
+# Identity of this package.
+PACKAGE_NAME='urlbst'
+PACKAGE_TARNAME='urlbst'
+PACKAGE_VERSION='0.8'
+PACKAGE_STRING='urlbst 0.8'
+PACKAGE_BUGREPORT='norman@astro.gla.ac.uk'
+PACKAGE_URL=''
+
+ac_unique_file="urlbst.in"
+ac_subst_vars='LTLIBOBJS
+LIBOBJS
+WITHHREF
+PUBMEDURL
+WITHPUBMEDRESOLVER
+DOIURL
+WITHDOIRESOLVER
+EPRINTURL
+WITHEPRINTS
+PERL
+COPYRIGHTYEARS
+RELEASEDATE
+target_alias
+host_alias
+build_alias
+LIBS
+ECHO_T
+ECHO_N
+ECHO_C
+DEFS
+mandir
+localedir
+libdir
+psdir
+pdfdir
+dvidir
+htmldir
+infodir
+docdir
+oldincludedir
+includedir
+localstatedir
+sharedstatedir
+sysconfdir
+datadir
+datarootdir
+libexecdir
+sbindir
+bindir
+program_transform_name
+prefix
+exec_prefix
+PACKAGE_URL
+PACKAGE_BUGREPORT
+PACKAGE_STRING
+PACKAGE_VERSION
+PACKAGE_TARNAME
+PACKAGE_NAME
+PATH_SEPARATOR
+SHELL'
+ac_subst_files=''
+ac_user_opts='
+enable_option_checking
+with_eprints
+with_doi
+with_pubmed
+with_href
+'
+ ac_precious_vars='build_alias
+host_alias
+target_alias'
+
+
+# Initialize some variables set by options.
+ac_init_help=
+ac_init_version=false
+ac_unrecognized_opts=
+ac_unrecognized_sep=
+# The variables have the same names as the options, with
+# dashes changed to underlines.
+cache_file=/dev/null
+exec_prefix=NONE
+no_create=
+no_recursion=
+prefix=NONE
+program_prefix=NONE
+program_suffix=NONE
+program_transform_name=s,x,x,
+silent=
+site=
+srcdir=
+verbose=
+x_includes=NONE
+x_libraries=NONE
+
+# Installation directory options.
+# These are left unexpanded so users can "make install exec_prefix=/foo"
+# and all the variables that are supposed to be based on exec_prefix
+# by default will actually change.
+# Use braces instead of parens because sh, perl, etc. also accept them.
+# (The list follows the same order as the GNU Coding Standards.)
+bindir='${exec_prefix}/bin'
+sbindir='${exec_prefix}/sbin'
+libexecdir='${exec_prefix}/libexec'
+datarootdir='${prefix}/share'
+datadir='${datarootdir}'
+sysconfdir='${prefix}/etc'
+sharedstatedir='${prefix}/com'
+localstatedir='${prefix}/var'
+includedir='${prefix}/include'
+oldincludedir='/usr/include'
+docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
+infodir='${datarootdir}/info'
+htmldir='${docdir}'
+dvidir='${docdir}'
+pdfdir='${docdir}'
+psdir='${docdir}'
+libdir='${exec_prefix}/lib'
+localedir='${datarootdir}/locale'
+mandir='${datarootdir}/man'
+
+ac_prev=
+ac_dashdash=
+for ac_option
+do
+ # If the previous option needs an argument, assign it.
+ if test -n "$ac_prev"; then
+ eval $ac_prev=\$ac_option
+ ac_prev=
+ continue
+ fi
+
+ case $ac_option in
+ *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
+ *=) ac_optarg= ;;
+ *) ac_optarg=yes ;;
+ esac
+
+ # Accept the important Cygnus configure options, so we can diagnose typos.
+
+ case $ac_dashdash$ac_option in
+ --)
+ ac_dashdash=yes ;;
+
+ -bindir | --bindir | --bindi | --bind | --bin | --bi)
+ ac_prev=bindir ;;
+ -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
+ bindir=$ac_optarg ;;
+
+ -build | --build | --buil | --bui | --bu)
+ ac_prev=build_alias ;;
+ -build=* | --build=* | --buil=* | --bui=* | --bu=*)
+ build_alias=$ac_optarg ;;
+
+ -cache-file | --cache-file | --cache-fil | --cache-fi \
+ | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
+ ac_prev=cache_file ;;
+ -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
+ | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
+ cache_file=$ac_optarg ;;
+
+ --config-cache | -C)
+ cache_file=config.cache ;;
+
+ -datadir | --datadir | --datadi | --datad)
+ ac_prev=datadir ;;
+ -datadir=* | --datadir=* | --datadi=* | --datad=*)
+ datadir=$ac_optarg ;;
+
+ -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
+ | --dataroo | --dataro | --datar)
+ ac_prev=datarootdir ;;
+ -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
+ | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
+ datarootdir=$ac_optarg ;;
+
+ -disable-* | --disable-*)
+ ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
+ # Reject names that are not valid shell variable names.
+ expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
+ as_fn_error $? "invalid feature name: $ac_useropt"
+ ac_useropt_orig=$ac_useropt
+ ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
+ case $ac_user_opts in
+ *"
+"enable_$ac_useropt"
+"*) ;;
+ *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
+ ac_unrecognized_sep=', ';;
+ esac
+ eval enable_$ac_useropt=no ;;
+
+ -docdir | --docdir | --docdi | --doc | --do)
+ ac_prev=docdir ;;
+ -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
+ docdir=$ac_optarg ;;
+
+ -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
+ ac_prev=dvidir ;;
+ -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
+ dvidir=$ac_optarg ;;
+
+ -enable-* | --enable-*)
+ ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
+ # Reject names that are not valid shell variable names.
+ expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
+ as_fn_error $? "invalid feature name: $ac_useropt"
+ ac_useropt_orig=$ac_useropt
+ ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
+ case $ac_user_opts in
+ *"
+"enable_$ac_useropt"
+"*) ;;
+ *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
+ ac_unrecognized_sep=', ';;
+ esac
+ eval enable_$ac_useropt=\$ac_optarg ;;
+
+ -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
+ | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
+ | --exec | --exe | --ex)
+ ac_prev=exec_prefix ;;
+ -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
+ | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
+ | --exec=* | --exe=* | --ex=*)
+ exec_prefix=$ac_optarg ;;
+
+ -gas | --gas | --ga | --g)
+ # Obsolete; use --with-gas.
+ with_gas=yes ;;
+
+ -help | --help | --hel | --he | -h)
+ ac_init_help=long ;;
+ -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
+ ac_init_help=recursive ;;
+ -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
+ ac_init_help=short ;;
+
+ -host | --host | --hos | --ho)
+ ac_prev=host_alias ;;
+ -host=* | --host=* | --hos=* | --ho=*)
+ host_alias=$ac_optarg ;;
+
+ -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
+ ac_prev=htmldir ;;
+ -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
+ | --ht=*)
+ htmldir=$ac_optarg ;;
+
+ -includedir | --includedir | --includedi | --included | --include \
+ | --includ | --inclu | --incl | --inc)
+ ac_prev=includedir ;;
+ -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
+ | --includ=* | --inclu=* | --incl=* | --inc=*)
+ includedir=$ac_optarg ;;
+
+ -infodir | --infodir | --infodi | --infod | --info | --inf)
+ ac_prev=infodir ;;
+ -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
+ infodir=$ac_optarg ;;
+
+ -libdir | --libdir | --libdi | --libd)
+ ac_prev=libdir ;;
+ -libdir=* | --libdir=* | --libdi=* | --libd=*)
+ libdir=$ac_optarg ;;
+
+ -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
+ | --libexe | --libex | --libe)
+ ac_prev=libexecdir ;;
+ -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
+ | --libexe=* | --libex=* | --libe=*)
+ libexecdir=$ac_optarg ;;
+
+ -localedir | --localedir | --localedi | --localed | --locale)
+ ac_prev=localedir ;;
+ -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
+ localedir=$ac_optarg ;;
+
+ -localstatedir | --localstatedir | --localstatedi | --localstated \
+ | --localstate | --localstat | --localsta | --localst | --locals)
+ ac_prev=localstatedir ;;
+ -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
+ | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
+ localstatedir=$ac_optarg ;;
+
+ -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
+ ac_prev=mandir ;;
+ -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
+ mandir=$ac_optarg ;;
+
+ -nfp | --nfp | --nf)
+ # Obsolete; use --without-fp.
+ with_fp=no ;;
+
+ -no-create | --no-create | --no-creat | --no-crea | --no-cre \
+ | --no-cr | --no-c | -n)
+ no_create=yes ;;
+
+ -no-recursion | --no-recursion | --no-recursio | --no-recursi \
+ | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
+ no_recursion=yes ;;
+
+ -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
+ | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
+ | --oldin | --oldi | --old | --ol | --o)
+ ac_prev=oldincludedir ;;
+ -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
+ | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
+ | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
+ oldincludedir=$ac_optarg ;;
+
+ -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
+ ac_prev=prefix ;;
+ -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
+ prefix=$ac_optarg ;;
+
+ -program-prefix | --program-prefix | --program-prefi | --program-pref \
+ | --program-pre | --program-pr | --program-p)
+ ac_prev=program_prefix ;;
+ -program-prefix=* | --program-prefix=* | --program-prefi=* \
+ | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
+ program_prefix=$ac_optarg ;;
+
+ -program-suffix | --program-suffix | --program-suffi | --program-suff \
+ | --program-suf | --program-su | --program-s)
+ ac_prev=program_suffix ;;
+ -program-suffix=* | --program-suffix=* | --program-suffi=* \
+ | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
+ program_suffix=$ac_optarg ;;
+
+ -program-transform-name | --program-transform-name \
+ | --program-transform-nam | --program-transform-na \
+ | --program-transform-n | --program-transform- \
+ | --program-transform | --program-transfor \
+ | --program-transfo | --program-transf \
+ | --program-trans | --program-tran \
+ | --progr-tra | --program-tr | --program-t)
+ ac_prev=program_transform_name ;;
+ -program-transform-name=* | --program-transform-name=* \
+ | --program-transform-nam=* | --program-transform-na=* \
+ | --program-transform-n=* | --program-transform-=* \
+ | --program-transform=* | --program-transfor=* \
+ | --program-transfo=* | --program-transf=* \
+ | --program-trans=* | --program-tran=* \
+ | --progr-tra=* | --program-tr=* | --program-t=*)
+ program_transform_name=$ac_optarg ;;
+
+ -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
+ ac_prev=pdfdir ;;
+ -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
+ pdfdir=$ac_optarg ;;
+
+ -psdir | --psdir | --psdi | --psd | --ps)
+ ac_prev=psdir ;;
+ -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
+ psdir=$ac_optarg ;;
+
+ -q | -quiet | --quiet | --quie | --qui | --qu | --q \
+ | -silent | --silent | --silen | --sile | --sil)
+ silent=yes ;;
+
+ -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
+ ac_prev=sbindir ;;
+ -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
+ | --sbi=* | --sb=*)
+ sbindir=$ac_optarg ;;
+
+ -sharedstatedir | --sharedstatedir | --sharedstatedi \
+ | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
+ | --sharedst | --shareds | --shared | --share | --shar \
+ | --sha | --sh)
+ ac_prev=sharedstatedir ;;
+ -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
+ | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
+ | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
+ | --sha=* | --sh=*)
+ sharedstatedir=$ac_optarg ;;
+
+ -site | --site | --sit)
+ ac_prev=site ;;
+ -site=* | --site=* | --sit=*)
+ site=$ac_optarg ;;
+
+ -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
+ ac_prev=srcdir ;;
+ -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
+ srcdir=$ac_optarg ;;
+
+ -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
+ | --syscon | --sysco | --sysc | --sys | --sy)
+ ac_prev=sysconfdir ;;
+ -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
+ | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
+ sysconfdir=$ac_optarg ;;
+
+ -target | --target | --targe | --targ | --tar | --ta | --t)
+ ac_prev=target_alias ;;
+ -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
+ target_alias=$ac_optarg ;;
+
+ -v | -verbose | --verbose | --verbos | --verbo | --verb)
+ verbose=yes ;;
+
+ -version | --version | --versio | --versi | --vers | -V)
+ ac_init_version=: ;;
+
+ -with-* | --with-*)
+ ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
+ # Reject names that are not valid shell variable names.
+ expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
+ as_fn_error $? "invalid package name: $ac_useropt"
+ ac_useropt_orig=$ac_useropt
+ ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
+ case $ac_user_opts in
+ *"
+"with_$ac_useropt"
+"*) ;;
+ *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
+ ac_unrecognized_sep=', ';;
+ esac
+ eval with_$ac_useropt=\$ac_optarg ;;
+
+ -without-* | --without-*)
+ ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
+ # Reject names that are not valid shell variable names.
+ expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
+ as_fn_error $? "invalid package name: $ac_useropt"
+ ac_useropt_orig=$ac_useropt
+ ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
+ case $ac_user_opts in
+ *"
+"with_$ac_useropt"
+"*) ;;
+ *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
+ ac_unrecognized_sep=', ';;
+ esac
+ eval with_$ac_useropt=no ;;
+
+ --x)
+ # Obsolete; use --with-x.
+ with_x=yes ;;
+
+ -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
+ | --x-incl | --x-inc | --x-in | --x-i)
+ ac_prev=x_includes ;;
+ -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
+ | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
+ x_includes=$ac_optarg ;;
+
+ -x-libraries | --x-libraries | --x-librarie | --x-librari \
+ | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
+ ac_prev=x_libraries ;;
+ -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
+ | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
+ x_libraries=$ac_optarg ;;
+
+ -*) as_fn_error $? "unrecognized option: \`$ac_option'
+Try \`$0 --help' for more information"
+ ;;
+
+ *=*)
+ ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
+ # Reject names that are not valid shell variable names.
+ case $ac_envvar in #(
+ '' | [0-9]* | *[!_$as_cr_alnum]* )
+ as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
+ esac
+ eval $ac_envvar=\$ac_optarg
+ export $ac_envvar ;;
+
+ *)
+ # FIXME: should be removed in autoconf 3.0.
+ $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
+ expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
+ $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
+ : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
+ ;;
+
+ esac
+done
+
+if test -n "$ac_prev"; then
+ ac_option=--`echo $ac_prev | sed 's/_/-/g'`
+ as_fn_error $? "missing argument to $ac_option"
+fi
+
+if test -n "$ac_unrecognized_opts"; then
+ case $enable_option_checking in
+ no) ;;
+ fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
+ *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
+ esac
+fi
+
+# Check all directory arguments for consistency.
+for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
+ datadir sysconfdir sharedstatedir localstatedir includedir \
+ oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
+ libdir localedir mandir
+do
+ eval ac_val=\$$ac_var
+ # Remove trailing slashes.
+ case $ac_val in
+ */ )
+ ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
+ eval $ac_var=\$ac_val;;
+ esac
+ # Be sure to have absolute directory names.
+ case $ac_val in
+ [\\/$]* | ?:[\\/]* ) continue;;
+ NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
+ esac
+ as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
+done
+
+# There might be people who depend on the old broken behavior: `$host'
+# used to hold the argument of --host etc.
+# FIXME: To remove some day.
+build=$build_alias
+host=$host_alias
+target=$target_alias
+
+# FIXME: To remove some day.
+if test "x$host_alias" != x; then
+ if test "x$build_alias" = x; then
+ cross_compiling=maybe
+ elif test "x$build_alias" != "x$host_alias"; then
+ cross_compiling=yes
+ fi
+fi
+
+ac_tool_prefix=
+test -n "$host_alias" && ac_tool_prefix=$host_alias-
+
+test "$silent" = yes && exec 6>/dev/null
+
+
+ac_pwd=`pwd` && test -n "$ac_pwd" &&
+ac_ls_di=`ls -di .` &&
+ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
+ as_fn_error $? "working directory cannot be determined"
+test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
+ as_fn_error $? "pwd does not report name of working directory"
+
+
+# Find the source files, if location was not specified.
+if test -z "$srcdir"; then
+ ac_srcdir_defaulted=yes
+ # Try the directory containing this script, then the parent directory.
+ ac_confdir=`$as_dirname -- "$as_myself" ||
+$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$as_myself" : 'X\(//\)[^/]' \| \
+ X"$as_myself" : 'X\(//\)$' \| \
+ X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X"$as_myself" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)[^/].*/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'`
+ srcdir=$ac_confdir
+ if test ! -r "$srcdir/$ac_unique_file"; then
+ srcdir=..
+ fi
+else
+ ac_srcdir_defaulted=no
+fi
+if test ! -r "$srcdir/$ac_unique_file"; then
+ test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
+ as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
+fi
+ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
+ac_abs_confdir=`(
+ cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
+ pwd)`
+# When building in place, set srcdir=.
+if test "$ac_abs_confdir" = "$ac_pwd"; then
+ srcdir=.
+fi
+# Remove unnecessary trailing slashes from srcdir.
+# Double slashes in file names in object file debugging info
+# mess up M-x gdb in Emacs.
+case $srcdir in
+*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
+esac
+for ac_var in $ac_precious_vars; do
+ eval ac_env_${ac_var}_set=\${${ac_var}+set}
+ eval ac_env_${ac_var}_value=\$${ac_var}
+ eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
+ eval ac_cv_env_${ac_var}_value=\$${ac_var}
+done
+
+#
+# Report the --help message.
+#
+if test "$ac_init_help" = "long"; then
+ # Omit some internal or obsolete options to make the list less imposing.
+ # This message is too long to be a string in the A/UX 3.1 sh.
+ cat <<_ACEOF
+\`configure' configures urlbst 0.8 to adapt to many kinds of systems.
+
+Usage: $0 [OPTION]... [VAR=VALUE]...
+
+To assign environment variables (e.g., CC, CFLAGS...), specify them as
+VAR=VALUE. See below for descriptions of some of the useful variables.
+
+Defaults for the options are specified in brackets.
+
+Configuration:
+ -h, --help display this help and exit
+ --help=short display options specific to this package
+ --help=recursive display the short help of all the included packages
+ -V, --version display version information and exit
+ -q, --quiet, --silent do not print \`checking ...' messages
+ --cache-file=FILE cache test results in FILE [disabled]
+ -C, --config-cache alias for \`--cache-file=config.cache'
+ -n, --no-create do not create output files
+ --srcdir=DIR find the sources in DIR [configure dir or \`..']
+
+Installation directories:
+ --prefix=PREFIX install architecture-independent files in PREFIX
+ [$ac_default_prefix]
+ --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
+ [PREFIX]
+
+By default, \`make install' will install all the files in
+\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
+an installation prefix other than \`$ac_default_prefix' using \`--prefix',
+for instance \`--prefix=\$HOME'.
+
+For better control, use the options below.
+
+Fine tuning of the installation directories:
+ --bindir=DIR user executables [EPREFIX/bin]
+ --sbindir=DIR system admin executables [EPREFIX/sbin]
+ --libexecdir=DIR program executables [EPREFIX/libexec]
+ --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
+ --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
+ --localstatedir=DIR modifiable single-machine data [PREFIX/var]
+ --libdir=DIR object code libraries [EPREFIX/lib]
+ --includedir=DIR C header files [PREFIX/include]
+ --oldincludedir=DIR C header files for non-gcc [/usr/include]
+ --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
+ --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
+ --infodir=DIR info documentation [DATAROOTDIR/info]
+ --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
+ --mandir=DIR man documentation [DATAROOTDIR/man]
+ --docdir=DIR documentation root [DATAROOTDIR/doc/urlbst]
+ --htmldir=DIR html documentation [DOCDIR]
+ --dvidir=DIR dvi documentation [DOCDIR]
+ --pdfdir=DIR pdf documentation [DOCDIR]
+ --psdir=DIR ps documentation [DOCDIR]
+_ACEOF
+
+ cat <<\_ACEOF
+_ACEOF
+fi
+
+if test -n "$ac_init_help"; then
+ case $ac_init_help in
+ short | recursive ) echo "Configuration of urlbst 0.8:";;
+ esac
+ cat <<\_ACEOF
+
+Optional Packages:
+ --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
+ --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
+ --with-eprints[=url] Include eprint support by default, giving optional URL
+ --with-doi=[=url] Include support for a DOI resolver by default, giving optional URL
+ --with-pubmed=[=url] Include support for a PUBMED resolver by default, giving optional URL
+ --with-href[=int] Include eprint hyperlinks (0/1/2=none/hypertex/hyperref)
+
+Report bugs to <norman@astro.gla.ac.uk>.
+_ACEOF
+ac_status=$?
+fi
+
+if test "$ac_init_help" = "recursive"; then
+ # If there are subdirs, report their specific --help.
+ for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
+ test -d "$ac_dir" ||
+ { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
+ continue
+ ac_builddir=.
+
+case "$ac_dir" in
+.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
+*)
+ ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
+ # A ".." for each directory in $ac_dir_suffix.
+ ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
+ case $ac_top_builddir_sub in
+ "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
+ *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
+ esac ;;
+esac
+ac_abs_top_builddir=$ac_pwd
+ac_abs_builddir=$ac_pwd$ac_dir_suffix
+# for backward compatibility:
+ac_top_builddir=$ac_top_build_prefix
+
+case $srcdir in
+ .) # We are building in place.
+ ac_srcdir=.
+ ac_top_srcdir=$ac_top_builddir_sub
+ ac_abs_top_srcdir=$ac_pwd ;;
+ [\\/]* | ?:[\\/]* ) # Absolute name.
+ ac_srcdir=$srcdir$ac_dir_suffix;
+ ac_top_srcdir=$srcdir
+ ac_abs_top_srcdir=$srcdir ;;
+ *) # Relative name.
+ ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
+ ac_top_srcdir=$ac_top_build_prefix$srcdir
+ ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
+esac
+ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
+
+ cd "$ac_dir" || { ac_status=$?; continue; }
+ # Check for guested configure.
+ if test -f "$ac_srcdir/configure.gnu"; then
+ echo &&
+ $SHELL "$ac_srcdir/configure.gnu" --help=recursive
+ elif test -f "$ac_srcdir/configure"; then
+ echo &&
+ $SHELL "$ac_srcdir/configure" --help=recursive
+ else
+ $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
+ fi || ac_status=$?
+ cd "$ac_pwd" || { ac_status=$?; break; }
+ done
+fi
+
+test -n "$ac_init_help" && exit $ac_status
+if $ac_init_version; then
+ cat <<\_ACEOF
+urlbst configure 0.8
+generated by GNU Autoconf 2.69
+
+Copyright (C) 2012 Free Software Foundation, Inc.
+This configure script is free software; the Free Software Foundation
+gives unlimited permission to copy, distribute and modify it.
+_ACEOF
+ exit
+fi
+
+## ------------------------ ##
+## Autoconf initialization. ##
+## ------------------------ ##
+cat >config.log <<_ACEOF
+This file contains any messages produced by compilers while
+running configure, to aid debugging if configure makes a mistake.
+
+It was created by urlbst $as_me 0.8, which was
+generated by GNU Autoconf 2.69. Invocation command line was
+
+ $ $0 $@
+
+_ACEOF
+exec 5>>config.log
+{
+cat <<_ASUNAME
+## --------- ##
+## Platform. ##
+## --------- ##
+
+hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
+uname -m = `(uname -m) 2>/dev/null || echo unknown`
+uname -r = `(uname -r) 2>/dev/null || echo unknown`
+uname -s = `(uname -s) 2>/dev/null || echo unknown`
+uname -v = `(uname -v) 2>/dev/null || echo unknown`
+
+/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
+/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
+
+/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
+/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
+/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
+/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
+/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
+/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
+/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
+
+_ASUNAME
+
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ $as_echo "PATH: $as_dir"
+ done
+IFS=$as_save_IFS
+
+} >&5
+
+cat >&5 <<_ACEOF
+
+
+## ----------- ##
+## Core tests. ##
+## ----------- ##
+
+_ACEOF
+
+
+# Keep a trace of the command line.
+# Strip out --no-create and --no-recursion so they do not pile up.
+# Strip out --silent because we don't want to record it for future runs.
+# Also quote any args containing shell meta-characters.
+# Make two passes to allow for proper duplicate-argument suppression.
+ac_configure_args=
+ac_configure_args0=
+ac_configure_args1=
+ac_must_keep_next=false
+for ac_pass in 1 2
+do
+ for ac_arg
+ do
+ case $ac_arg in
+ -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
+ -q | -quiet | --quiet | --quie | --qui | --qu | --q \
+ | -silent | --silent | --silen | --sile | --sil)
+ continue ;;
+ *\'*)
+ ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
+ esac
+ case $ac_pass in
+ 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
+ 2)
+ as_fn_append ac_configure_args1 " '$ac_arg'"
+ if test $ac_must_keep_next = true; then
+ ac_must_keep_next=false # Got value, back to normal.
+ else
+ case $ac_arg in
+ *=* | --config-cache | -C | -disable-* | --disable-* \
+ | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
+ | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
+ | -with-* | --with-* | -without-* | --without-* | --x)
+ case "$ac_configure_args0 " in
+ "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
+ esac
+ ;;
+ -* ) ac_must_keep_next=true ;;
+ esac
+ fi
+ as_fn_append ac_configure_args " '$ac_arg'"
+ ;;
+ esac
+ done
+done
+{ ac_configure_args0=; unset ac_configure_args0;}
+{ ac_configure_args1=; unset ac_configure_args1;}
+
+# When interrupted or exit'd, cleanup temporary files, and complete
+# config.log. We remove comments because anyway the quotes in there
+# would cause problems or look ugly.
+# WARNING: Use '\'' to represent an apostrophe within the trap.
+# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
+trap 'exit_status=$?
+ # Save into config.log some information that might help in debugging.
+ {
+ echo
+
+ $as_echo "## ---------------- ##
+## Cache variables. ##
+## ---------------- ##"
+ echo
+ # The following way of writing the cache mishandles newlines in values,
+(
+ for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
+ eval ac_val=\$$ac_var
+ case $ac_val in #(
+ *${as_nl}*)
+ case $ac_var in #(
+ *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
+$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
+ esac
+ case $ac_var in #(
+ _ | IFS | as_nl) ;; #(
+ BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
+ *) { eval $ac_var=; unset $ac_var;} ;;
+ esac ;;
+ esac
+ done
+ (set) 2>&1 |
+ case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
+ *${as_nl}ac_space=\ *)
+ sed -n \
+ "s/'\''/'\''\\\\'\'''\''/g;
+ s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
+ ;; #(
+ *)
+ sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
+ ;;
+ esac |
+ sort
+)
+ echo
+
+ $as_echo "## ----------------- ##
+## Output variables. ##
+## ----------------- ##"
+ echo
+ for ac_var in $ac_subst_vars
+ do
+ eval ac_val=\$$ac_var
+ case $ac_val in
+ *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
+ esac
+ $as_echo "$ac_var='\''$ac_val'\''"
+ done | sort
+ echo
+
+ if test -n "$ac_subst_files"; then
+ $as_echo "## ------------------- ##
+## File substitutions. ##
+## ------------------- ##"
+ echo
+ for ac_var in $ac_subst_files
+ do
+ eval ac_val=\$$ac_var
+ case $ac_val in
+ *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
+ esac
+ $as_echo "$ac_var='\''$ac_val'\''"
+ done | sort
+ echo
+ fi
+
+ if test -s confdefs.h; then
+ $as_echo "## ----------- ##
+## confdefs.h. ##
+## ----------- ##"
+ echo
+ cat confdefs.h
+ echo
+ fi
+ test "$ac_signal" != 0 &&
+ $as_echo "$as_me: caught signal $ac_signal"
+ $as_echo "$as_me: exit $exit_status"
+ } >&5
+ rm -f core *.core core.conftest.* &&
+ rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
+ exit $exit_status
+' 0
+for ac_signal in 1 2 13 15; do
+ trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
+done
+ac_signal=0
+
+# confdefs.h avoids OS command line length limits that DEFS can exceed.
+rm -f -r conftest* confdefs.h
+
+$as_echo "/* confdefs.h */" > confdefs.h
+
+# Predefined preprocessor variables.
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_NAME "$PACKAGE_NAME"
+_ACEOF
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
+_ACEOF
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_VERSION "$PACKAGE_VERSION"
+_ACEOF
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_STRING "$PACKAGE_STRING"
+_ACEOF
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
+_ACEOF
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_URL "$PACKAGE_URL"
+_ACEOF
+
+
+# Let the site file select an alternate cache file if it wants to.
+# Prefer an explicitly selected file to automatically selected ones.
+ac_site_file1=NONE
+ac_site_file2=NONE
+if test -n "$CONFIG_SITE"; then
+ # We do not want a PATH search for config.site.
+ case $CONFIG_SITE in #((
+ -*) ac_site_file1=./$CONFIG_SITE;;
+ */*) ac_site_file1=$CONFIG_SITE;;
+ *) ac_site_file1=./$CONFIG_SITE;;
+ esac
+elif test "x$prefix" != xNONE; then
+ ac_site_file1=$prefix/share/config.site
+ ac_site_file2=$prefix/etc/config.site
+else
+ ac_site_file1=$ac_default_prefix/share/config.site
+ ac_site_file2=$ac_default_prefix/etc/config.site
+fi
+for ac_site_file in "$ac_site_file1" "$ac_site_file2"
+do
+ test "x$ac_site_file" = xNONE && continue
+ if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
+$as_echo "$as_me: loading site script $ac_site_file" >&6;}
+ sed 's/^/| /' "$ac_site_file" >&5
+ . "$ac_site_file" \
+ || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "failed to load site script $ac_site_file
+See \`config.log' for more details" "$LINENO" 5; }
+ fi
+done
+
+if test -r "$cache_file"; then
+ # Some versions of bash will fail to source /dev/null (special files
+ # actually), so we avoid doing that. DJGPP emulates it as a regular file.
+ if test /dev/null != "$cache_file" && test -f "$cache_file"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
+$as_echo "$as_me: loading cache $cache_file" >&6;}
+ case $cache_file in
+ [\\/]* | ?:[\\/]* ) . "$cache_file";;
+ *) . "./$cache_file";;
+ esac
+ fi
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
+$as_echo "$as_me: creating cache $cache_file" >&6;}
+ >$cache_file
+fi
+
+# Check that the precious variables saved in the cache have kept the same
+# value.
+ac_cache_corrupted=false
+for ac_var in $ac_precious_vars; do
+ eval ac_old_set=\$ac_cv_env_${ac_var}_set
+ eval ac_new_set=\$ac_env_${ac_var}_set
+ eval ac_old_val=\$ac_cv_env_${ac_var}_value
+ eval ac_new_val=\$ac_env_${ac_var}_value
+ case $ac_old_set,$ac_new_set in
+ set,)
+ { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
+$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
+ ac_cache_corrupted=: ;;
+ ,set)
+ { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
+$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
+ ac_cache_corrupted=: ;;
+ ,);;
+ *)
+ if test "x$ac_old_val" != "x$ac_new_val"; then
+ # differences in whitespace do not lead to failure.
+ ac_old_val_w=`echo x $ac_old_val`
+ ac_new_val_w=`echo x $ac_new_val`
+ if test "$ac_old_val_w" != "$ac_new_val_w"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
+$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
+ ac_cache_corrupted=:
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
+$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
+ eval $ac_var=\$ac_old_val
+ fi
+ { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
+$as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
+ { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
+$as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
+ fi;;
+ esac
+ # Pass precious variables to config.status.
+ if test "$ac_new_set" = set; then
+ case $ac_new_val in
+ *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
+ *) ac_arg=$ac_var=$ac_new_val ;;
+ esac
+ case " $ac_configure_args " in
+ *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
+ *) as_fn_append ac_configure_args " '$ac_arg'" ;;
+ esac
+ fi
+done
+if $ac_cache_corrupted; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+ { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
+$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
+ as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
+fi
+## -------------------- ##
+## Main body of script. ##
+## -------------------- ##
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+RELEASEDATE="2019 July 1"
+
+
+
+
+COPYRIGHTYEARS="2002-03, 2005-12, 2014, 2019"
+
+
+
+
+
+
+# Extract the first word of "perl", so it can be a program name with args.
+set dummy perl; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_path_PERL+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ case $PERL in
+ [\\/]* | ?:[\\/]*)
+ ac_cv_path_PERL="$PERL" # Let the user override the test with a path.
+ ;;
+ *)
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_path_PERL="$as_dir/$ac_word$ac_exec_ext"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+ ;;
+esac
+fi
+PERL=$ac_cv_path_PERL
+if test -n "$PERL"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PERL" >&5
+$as_echo "$PERL" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+
+
+WITHEPRINTS=1
+
+EPRINTURL=http://arxiv.org/abs/
+
+
+WITHDOIRESOLVER=1
+
+DOIURL=https://doi.org/
+
+
+WITHPUBMEDRESOLVER=1
+
+PUBMEDURL=http://www.ncbi.nlm.nih.gov/pubmed/
+
+
+
+# Check whether --with-eprints was given.
+if test "${with_eprints+set}" = set; then :
+ withval=$with_eprints; if test "$withval" = "yes"; then
+ WITHEPRINTS=1
+ elif test "$withval" = "no"; then
+ WITHEPRINTS=0
+ else
+ WITHEPRINTS=1
+ EPRINTURL=$withval
+ fi
+fi
+
+
+
+# Check whether --with-doi was given.
+if test "${with_doi+set}" = set; then :
+ withval=$with_doi; if test "$withval" = yes; then
+ WITHDOIRESOLVER=1
+ elif test "$withval" = no; then
+ WITHDOIRESOLVER=0
+ else
+ WITHDOIRESOLVER=1
+ DOIURL=$withval
+ fi
+fi
+
+
+
+# Check whether --with-pubmed was given.
+if test "${with_pubmed+set}" = set; then :
+ withval=$with_pubmed; if test "$withval" = yes; then
+ WITHPUBMEDRESOLVER=1
+ elif test "$withval" = no; then
+ WITHPUBMEDRESOLVER=0
+ else
+ WITHPUBMEDRESOLVER=1
+ PUBMEDURL=$withval
+ fi
+fi
+
+
+
+WITHHREF=0
+
+
+
+# Check whether --with-href was given.
+if test "${with_href+set}" = set; then :
+ withval=$with_href; if test "$withval" = yes; then
+ WITHHREF=2
+ elif test "$withval" = no; then
+ WITHHREF=0
+ else
+ WITHHREF=$withval
+ fi
+fi
+
+
+
+ac_config_files="$ac_config_files Makefile"
+
+ac_config_files="$ac_config_files urlbst"
+
+
+cat >confcache <<\_ACEOF
+# This file is a shell script that caches the results of configure
+# tests run on this system so they can be shared between configure
+# scripts and configure runs, see configure's option --config-cache.
+# It is not useful on other systems. If it contains results you don't
+# want to keep, you may remove or edit it.
+#
+# config.status only pays attention to the cache file if you give it
+# the --recheck option to rerun configure.
+#
+# `ac_cv_env_foo' variables (set or unset) will be overridden when
+# loading this file, other *unset* `ac_cv_foo' will be assigned the
+# following values.
+
+_ACEOF
+
+# The following way of writing the cache mishandles newlines in values,
+# but we know of no workaround that is simple, portable, and efficient.
+# So, we kill variables containing newlines.
+# Ultrix sh set writes to stderr and can't be redirected directly,
+# and sets the high bit in the cache file unless we assign to the vars.
+(
+ for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
+ eval ac_val=\$$ac_var
+ case $ac_val in #(
+ *${as_nl}*)
+ case $ac_var in #(
+ *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
+$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
+ esac
+ case $ac_var in #(
+ _ | IFS | as_nl) ;; #(
+ BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
+ *) { eval $ac_var=; unset $ac_var;} ;;
+ esac ;;
+ esac
+ done
+
+ (set) 2>&1 |
+ case $as_nl`(ac_space=' '; set) 2>&1` in #(
+ *${as_nl}ac_space=\ *)
+ # `set' does not quote correctly, so add quotes: double-quote
+ # substitution turns \\\\ into \\, and sed turns \\ into \.
+ sed -n \
+ "s/'/'\\\\''/g;
+ s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
+ ;; #(
+ *)
+ # `set' quotes correctly as required by POSIX, so do not add quotes.
+ sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
+ ;;
+ esac |
+ sort
+) |
+ sed '
+ /^ac_cv_env_/b end
+ t clear
+ :clear
+ s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
+ t end
+ s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
+ :end' >>confcache
+if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
+ if test -w "$cache_file"; then
+ if test "x$cache_file" != "x/dev/null"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
+$as_echo "$as_me: updating cache $cache_file" >&6;}
+ if test ! -f "$cache_file" || test -h "$cache_file"; then
+ cat confcache >"$cache_file"
+ else
+ case $cache_file in #(
+ */* | ?:*)
+ mv -f confcache "$cache_file"$$ &&
+ mv -f "$cache_file"$$ "$cache_file" ;; #(
+ *)
+ mv -f confcache "$cache_file" ;;
+ esac
+ fi
+ fi
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
+$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
+ fi
+fi
+rm -f confcache
+
+test "x$prefix" = xNONE && prefix=$ac_default_prefix
+# Let make expand exec_prefix.
+test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
+
+# Transform confdefs.h into DEFS.
+# Protect against shell expansion while executing Makefile rules.
+# Protect against Makefile macro expansion.
+#
+# If the first sed substitution is executed (which looks for macros that
+# take arguments), then branch to the quote section. Otherwise,
+# look for a macro that doesn't take arguments.
+ac_script='
+:mline
+/\\$/{
+ N
+ s,\\\n,,
+ b mline
+}
+t clear
+:clear
+s/^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*([^)]*)\)[ ]*\(.*\)/-D\1=\2/g
+t quote
+s/^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)/-D\1=\2/g
+t quote
+b any
+:quote
+s/[ `~#$^&*(){}\\|;'\''"<>?]/\\&/g
+s/\[/\\&/g
+s/\]/\\&/g
+s/\$/$$/g
+H
+:any
+${
+ g
+ s/^\n//
+ s/\n/ /g
+ p
+}
+'
+DEFS=`sed -n "$ac_script" confdefs.h`
+
+
+ac_libobjs=
+ac_ltlibobjs=
+U=
+for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
+ # 1. Remove the extension, and $U if already installed.
+ ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
+ ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
+ # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
+ # will be set to the directory where LIBOBJS objects are built.
+ as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
+ as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
+done
+LIBOBJS=$ac_libobjs
+
+LTLIBOBJS=$ac_ltlibobjs
+
+
+
+: "${CONFIG_STATUS=./config.status}"
+ac_write_fail=0
+ac_clean_files_save=$ac_clean_files
+ac_clean_files="$ac_clean_files $CONFIG_STATUS"
+{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
+$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
+as_write_fail=0
+cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
+#! $SHELL
+# Generated by $as_me.
+# Run this file to recreate the current configuration.
+# Compiler output produced by configure, useful for debugging
+# configure, is in config.log if it exists.
+
+debug=false
+ac_cs_recheck=false
+ac_cs_silent=false
+
+SHELL=\${CONFIG_SHELL-$SHELL}
+export SHELL
+_ASEOF
+cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
+## -------------------- ##
+## M4sh Initialization. ##
+## -------------------- ##
+
+# Be more Bourne compatible
+DUALCASE=1; export DUALCASE # for MKS sh
+if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
+ emulate sh
+ NULLCMD=:
+ # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
+ # is contrary to our usage. Disable this feature.
+ alias -g '${1+"$@"}'='"$@"'
+ setopt NO_GLOB_SUBST
+else
+ case `(set -o) 2>/dev/null` in #(
+ *posix*) :
+ set -o posix ;; #(
+ *) :
+ ;;
+esac
+fi
+
+
+as_nl='
+'
+export as_nl
+# Printing a long string crashes Solaris 7 /usr/bin/printf.
+as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
+as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
+as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
+# Prefer a ksh shell builtin over an external printf program on Solaris,
+# but without wasting forks for bash or zsh.
+if test -z "$BASH_VERSION$ZSH_VERSION" \
+ && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
+ as_echo='print -r --'
+ as_echo_n='print -rn --'
+elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
+ as_echo='printf %s\n'
+ as_echo_n='printf %s'
+else
+ if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
+ as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
+ as_echo_n='/usr/ucb/echo -n'
+ else
+ as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
+ as_echo_n_body='eval
+ arg=$1;
+ case $arg in #(
+ *"$as_nl"*)
+ expr "X$arg" : "X\\(.*\\)$as_nl";
+ arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
+ esac;
+ expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
+ '
+ export as_echo_n_body
+ as_echo_n='sh -c $as_echo_n_body as_echo'
+ fi
+ export as_echo_body
+ as_echo='sh -c $as_echo_body as_echo'
+fi
+
+# The user is always right.
+if test "${PATH_SEPARATOR+set}" != set; then
+ PATH_SEPARATOR=:
+ (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
+ (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
+ PATH_SEPARATOR=';'
+ }
+fi
+
+
+# IFS
+# We need space, tab and new line, in precisely that order. Quoting is
+# there to prevent editors from complaining about space-tab.
+# (If _AS_PATH_WALK were called with IFS unset, it would disable word
+# splitting by setting IFS to empty value.)
+IFS=" "" $as_nl"
+
+# Find who we are. Look in the path if we contain no directory separator.
+as_myself=
+case $0 in #((
+ *[\\/]* ) as_myself=$0 ;;
+ *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
+ done
+IFS=$as_save_IFS
+
+ ;;
+esac
+# We did not find ourselves, most probably we were run as `sh COMMAND'
+# in which case we are not to be found in the path.
+if test "x$as_myself" = x; then
+ as_myself=$0
+fi
+if test ! -f "$as_myself"; then
+ $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
+ exit 1
+fi
+
+# Unset variables that we do not need and which cause bugs (e.g. in
+# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
+# suppresses any "Segmentation fault" message there. '((' could
+# trigger a bug in pdksh 5.2.14.
+for as_var in BASH_ENV ENV MAIL MAILPATH
+do eval test x\${$as_var+set} = xset \
+ && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
+done
+PS1='$ '
+PS2='> '
+PS4='+ '
+
+# NLS nuisances.
+LC_ALL=C
+export LC_ALL
+LANGUAGE=C
+export LANGUAGE
+
+# CDPATH.
+(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
+
+
+# as_fn_error STATUS ERROR [LINENO LOG_FD]
+# ----------------------------------------
+# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
+# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
+# script with STATUS, using 1 if that was 0.
+as_fn_error ()
+{
+ as_status=$1; test $as_status -eq 0 && as_status=1
+ if test "$4"; then
+ as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+ $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
+ fi
+ $as_echo "$as_me: error: $2" >&2
+ as_fn_exit $as_status
+} # as_fn_error
+
+
+# as_fn_set_status STATUS
+# -----------------------
+# Set $? to STATUS, without forking.
+as_fn_set_status ()
+{
+ return $1
+} # as_fn_set_status
+
+# as_fn_exit STATUS
+# -----------------
+# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
+as_fn_exit ()
+{
+ set +e
+ as_fn_set_status $1
+ exit $1
+} # as_fn_exit
+
+# as_fn_unset VAR
+# ---------------
+# Portably unset VAR.
+as_fn_unset ()
+{
+ { eval $1=; unset $1;}
+}
+as_unset=as_fn_unset
+# as_fn_append VAR VALUE
+# ----------------------
+# Append the text in VALUE to the end of the definition contained in VAR. Take
+# advantage of any shell optimizations that allow amortized linear growth over
+# repeated appends, instead of the typical quadratic growth present in naive
+# implementations.
+if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
+ eval 'as_fn_append ()
+ {
+ eval $1+=\$2
+ }'
+else
+ as_fn_append ()
+ {
+ eval $1=\$$1\$2
+ }
+fi # as_fn_append
+
+# as_fn_arith ARG...
+# ------------------
+# Perform arithmetic evaluation on the ARGs, and store the result in the
+# global $as_val. Take advantage of shells that can avoid forks. The arguments
+# must be portable across $(()) and expr.
+if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
+ eval 'as_fn_arith ()
+ {
+ as_val=$(( $* ))
+ }'
+else
+ as_fn_arith ()
+ {
+ as_val=`expr "$@" || test $? -eq 1`
+ }
+fi # as_fn_arith
+
+
+if expr a : '\(a\)' >/dev/null 2>&1 &&
+ test "X`expr 00001 : '.*\(...\)'`" = X001; then
+ as_expr=expr
+else
+ as_expr=false
+fi
+
+if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
+ as_basename=basename
+else
+ as_basename=false
+fi
+
+if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
+ as_dirname=dirname
+else
+ as_dirname=false
+fi
+
+as_me=`$as_basename -- "$0" ||
+$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
+ X"$0" : 'X\(//\)$' \| \
+ X"$0" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X/"$0" |
+ sed '/^.*\/\([^/][^/]*\)\/*$/{
+ s//\1/
+ q
+ }
+ /^X\/\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\/\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'`
+
+# Avoid depending upon Character Ranges.
+as_cr_letters='abcdefghijklmnopqrstuvwxyz'
+as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
+as_cr_Letters=$as_cr_letters$as_cr_LETTERS
+as_cr_digits='0123456789'
+as_cr_alnum=$as_cr_Letters$as_cr_digits
+
+ECHO_C= ECHO_N= ECHO_T=
+case `echo -n x` in #(((((
+-n*)
+ case `echo 'xy\c'` in
+ *c*) ECHO_T=' ';; # ECHO_T is single tab character.
+ xy) ECHO_C='\c';;
+ *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
+ ECHO_T=' ';;
+ esac;;
+*)
+ ECHO_N='-n';;
+esac
+
+rm -f conf$$ conf$$.exe conf$$.file
+if test -d conf$$.dir; then
+ rm -f conf$$.dir/conf$$.file
+else
+ rm -f conf$$.dir
+ mkdir conf$$.dir 2>/dev/null
+fi
+if (echo >conf$$.file) 2>/dev/null; then
+ if ln -s conf$$.file conf$$ 2>/dev/null; then
+ as_ln_s='ln -s'
+ # ... but there are two gotchas:
+ # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
+ # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
+ # In both cases, we have to default to `cp -pR'.
+ ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
+ as_ln_s='cp -pR'
+ elif ln conf$$.file conf$$ 2>/dev/null; then
+ as_ln_s=ln
+ else
+ as_ln_s='cp -pR'
+ fi
+else
+ as_ln_s='cp -pR'
+fi
+rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
+rmdir conf$$.dir 2>/dev/null
+
+
+# as_fn_mkdir_p
+# -------------
+# Create "$as_dir" as a directory, including parents if necessary.
+as_fn_mkdir_p ()
+{
+
+ case $as_dir in #(
+ -*) as_dir=./$as_dir;;
+ esac
+ test -d "$as_dir" || eval $as_mkdir_p || {
+ as_dirs=
+ while :; do
+ case $as_dir in #(
+ *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
+ *) as_qdir=$as_dir;;
+ esac
+ as_dirs="'$as_qdir' $as_dirs"
+ as_dir=`$as_dirname -- "$as_dir" ||
+$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$as_dir" : 'X\(//\)[^/]' \| \
+ X"$as_dir" : 'X\(//\)$' \| \
+ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X"$as_dir" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)[^/].*/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'`
+ test -d "$as_dir" && break
+ done
+ test -z "$as_dirs" || eval "mkdir $as_dirs"
+ } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
+
+
+} # as_fn_mkdir_p
+if mkdir -p . 2>/dev/null; then
+ as_mkdir_p='mkdir -p "$as_dir"'
+else
+ test -d ./-p && rmdir ./-p
+ as_mkdir_p=false
+fi
+
+
+# as_fn_executable_p FILE
+# -----------------------
+# Test if FILE is an executable regular file.
+as_fn_executable_p ()
+{
+ test -f "$1" && test -x "$1"
+} # as_fn_executable_p
+as_test_x='test -x'
+as_executable_p=as_fn_executable_p
+
+# Sed expression to map a string onto a valid CPP name.
+as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
+
+# Sed expression to map a string onto a valid variable name.
+as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
+
+
+exec 6>&1
+## ----------------------------------- ##
+## Main body of $CONFIG_STATUS script. ##
+## ----------------------------------- ##
+_ASEOF
+test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
+
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+# Save the log message, to keep $0 and so on meaningful, and to
+# report actual input values of CONFIG_FILES etc. instead of their
+# values after options handling.
+ac_log="
+This file was extended by urlbst $as_me 0.8, which was
+generated by GNU Autoconf 2.69. Invocation command line was
+
+ CONFIG_FILES = $CONFIG_FILES
+ CONFIG_HEADERS = $CONFIG_HEADERS
+ CONFIG_LINKS = $CONFIG_LINKS
+ CONFIG_COMMANDS = $CONFIG_COMMANDS
+ $ $0 $@
+
+on `(hostname || uname -n) 2>/dev/null | sed 1q`
+"
+
+_ACEOF
+
+case $ac_config_files in *"
+"*) set x $ac_config_files; shift; ac_config_files=$*;;
+esac
+
+
+
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+# Files that config.status was made for.
+config_files="$ac_config_files"
+
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+ac_cs_usage="\
+\`$as_me' instantiates files and other configuration actions
+from templates according to the current configuration. Unless the files
+and actions are specified as TAGs, all are instantiated by default.
+
+Usage: $0 [OPTION]... [TAG]...
+
+ -h, --help print this help, then exit
+ -V, --version print version number and configuration settings, then exit
+ --config print configuration, then exit
+ -q, --quiet, --silent
+ do not print progress messages
+ -d, --debug don't remove temporary files
+ --recheck update $as_me by reconfiguring in the same conditions
+ --file=FILE[:TEMPLATE]
+ instantiate the configuration file FILE
+
+Configuration files:
+$config_files
+
+Report bugs to <norman@astro.gla.ac.uk>."
+
+_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
+ac_cs_version="\\
+urlbst config.status 0.8
+configured by $0, generated by GNU Autoconf 2.69,
+ with options \\"\$ac_cs_config\\"
+
+Copyright (C) 2012 Free Software Foundation, Inc.
+This config.status script is free software; the Free Software Foundation
+gives unlimited permission to copy, distribute and modify it."
+
+ac_pwd='$ac_pwd'
+srcdir='$srcdir'
+test -n "\$AWK" || AWK=awk
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+# The default lists apply if the user does not specify any file.
+ac_need_defaults=:
+while test $# != 0
+do
+ case $1 in
+ --*=?*)
+ ac_option=`expr "X$1" : 'X\([^=]*\)='`
+ ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
+ ac_shift=:
+ ;;
+ --*=)
+ ac_option=`expr "X$1" : 'X\([^=]*\)='`
+ ac_optarg=
+ ac_shift=:
+ ;;
+ *)
+ ac_option=$1
+ ac_optarg=$2
+ ac_shift=shift
+ ;;
+ esac
+
+ case $ac_option in
+ # Handling of the options.
+ -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
+ ac_cs_recheck=: ;;
+ --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
+ $as_echo "$ac_cs_version"; exit ;;
+ --config | --confi | --conf | --con | --co | --c )
+ $as_echo "$ac_cs_config"; exit ;;
+ --debug | --debu | --deb | --de | --d | -d )
+ debug=: ;;
+ --file | --fil | --fi | --f )
+ $ac_shift
+ case $ac_optarg in
+ *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
+ '') as_fn_error $? "missing file argument" ;;
+ esac
+ as_fn_append CONFIG_FILES " '$ac_optarg'"
+ ac_need_defaults=false;;
+ --he | --h | --help | --hel | -h )
+ $as_echo "$ac_cs_usage"; exit ;;
+ -q | -quiet | --quiet | --quie | --qui | --qu | --q \
+ | -silent | --silent | --silen | --sile | --sil | --si | --s)
+ ac_cs_silent=: ;;
+
+ # This is an error.
+ -*) as_fn_error $? "unrecognized option: \`$1'
+Try \`$0 --help' for more information." ;;
+
+ *) as_fn_append ac_config_targets " $1"
+ ac_need_defaults=false ;;
+
+ esac
+ shift
+done
+
+ac_configure_extra_args=
+
+if $ac_cs_silent; then
+ exec 6>/dev/null
+ ac_configure_extra_args="$ac_configure_extra_args --silent"
+fi
+
+_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+if \$ac_cs_recheck; then
+ set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
+ shift
+ \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
+ CONFIG_SHELL='$SHELL'
+ export CONFIG_SHELL
+ exec "\$@"
+fi
+
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+exec 5>>config.log
+{
+ echo
+ sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
+## Running $as_me. ##
+_ASBOX
+ $as_echo "$ac_log"
+} >&5
+
+_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+
+# Handling of arguments.
+for ac_config_target in $ac_config_targets
+do
+ case $ac_config_target in
+ "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
+ "urlbst") CONFIG_FILES="$CONFIG_FILES urlbst" ;;
+
+ *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
+ esac
+done
+
+
+# If the user did not use the arguments to specify the items to instantiate,
+# then the envvar interface is used. Set only those that are not.
+# We use the long form for the default assignment because of an extremely
+# bizarre bug on SunOS 4.1.3.
+if $ac_need_defaults; then
+ test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
+fi
+
+# Have a temporary directory for convenience. Make it in the build tree
+# simply because there is no reason against having it here, and in addition,
+# creating and moving files from /tmp can sometimes cause problems.
+# Hook for its removal unless debugging.
+# Note that there is a small window in which the directory will not be cleaned:
+# after its creation but before its name has been assigned to `$tmp'.
+$debug ||
+{
+ tmp= ac_tmp=
+ trap 'exit_status=$?
+ : "${ac_tmp:=$tmp}"
+ { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
+' 0
+ trap 'as_fn_exit 1' 1 2 13 15
+}
+# Create a (secure) tmp directory for tmp files.
+
+{
+ tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
+ test -d "$tmp"
+} ||
+{
+ tmp=./conf$$-$RANDOM
+ (umask 077 && mkdir "$tmp")
+} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
+ac_tmp=$tmp
+
+# Set up the scripts for CONFIG_FILES section.
+# No need to generate them if there are no CONFIG_FILES.
+# This happens for instance with `./config.status config.h'.
+if test -n "$CONFIG_FILES"; then
+
+
+ac_cr=`echo X | tr X '\015'`
+# On cygwin, bash can eat \r inside `` if the user requested igncr.
+# But we know of no other shell where ac_cr would be empty at this
+# point, so we can use a bashism as a fallback.
+if test "x$ac_cr" = x; then
+ eval ac_cr=\$\'\\r\'
+fi
+ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
+if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
+ ac_cs_awk_cr='\\r'
+else
+ ac_cs_awk_cr=$ac_cr
+fi
+
+echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
+_ACEOF
+
+
+{
+ echo "cat >conf$$subs.awk <<_ACEOF" &&
+ echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
+ echo "_ACEOF"
+} >conf$$subs.sh ||
+ as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
+ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
+ac_delim='%!_!# '
+for ac_last_try in false false false false false :; do
+ . ./conf$$subs.sh ||
+ as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
+
+ ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
+ if test $ac_delim_n = $ac_delim_num; then
+ break
+ elif $ac_last_try; then
+ as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
+ else
+ ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
+ fi
+done
+rm -f conf$$subs.sh
+
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
+_ACEOF
+sed -n '
+h
+s/^/S["/; s/!.*/"]=/
+p
+g
+s/^[^!]*!//
+:repl
+t repl
+s/'"$ac_delim"'$//
+t delim
+:nl
+h
+s/\(.\{148\}\)..*/\1/
+t more1
+s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
+p
+n
+b repl
+:more1
+s/["\\]/\\&/g; s/^/"/; s/$/"\\/
+p
+g
+s/.\{148\}//
+t nl
+:delim
+h
+s/\(.\{148\}\)..*/\1/
+t more2
+s/["\\]/\\&/g; s/^/"/; s/$/"/
+p
+b
+:more2
+s/["\\]/\\&/g; s/^/"/; s/$/"\\/
+p
+g
+s/.\{148\}//
+t delim
+' <conf$$subs.awk | sed '
+/^[^""]/{
+ N
+ s/\n//
+}
+' >>$CONFIG_STATUS || ac_write_fail=1
+rm -f conf$$subs.awk
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+_ACAWK
+cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
+ for (key in S) S_is_set[key] = 1
+ FS = ""
+
+}
+{
+ line = $ 0
+ nfields = split(line, field, "@")
+ substed = 0
+ len = length(field[1])
+ for (i = 2; i < nfields; i++) {
+ key = field[i]
+ keylen = length(key)
+ if (S_is_set[key]) {
+ value = S[key]
+ line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
+ len += length(value) + length(field[++i])
+ substed = 1
+ } else
+ len += 1 + keylen
+ }
+
+ print line
+}
+
+_ACAWK
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
+ sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
+else
+ cat
+fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
+ || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
+_ACEOF
+
+# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
+# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
+# trailing colons and then remove the whole line if VPATH becomes empty
+# (actually we leave an empty line to preserve line numbers).
+if test "x$srcdir" = x.; then
+ ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
+h
+s///
+s/^/:/
+s/[ ]*$/:/
+s/:\$(srcdir):/:/g
+s/:\${srcdir}:/:/g
+s/:@srcdir@:/:/g
+s/^:*//
+s/:*$//
+x
+s/\(=[ ]*\).*/\1/
+G
+s/\n//
+s/^[^=]*=[ ]*$//
+}'
+fi
+
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+fi # test -n "$CONFIG_FILES"
+
+
+eval set X " :F $CONFIG_FILES "
+shift
+for ac_tag
+do
+ case $ac_tag in
+ :[FHLC]) ac_mode=$ac_tag; continue;;
+ esac
+ case $ac_mode$ac_tag in
+ :[FHL]*:*);;
+ :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
+ :[FH]-) ac_tag=-:-;;
+ :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
+ esac
+ ac_save_IFS=$IFS
+ IFS=:
+ set x $ac_tag
+ IFS=$ac_save_IFS
+ shift
+ ac_file=$1
+ shift
+
+ case $ac_mode in
+ :L) ac_source=$1;;
+ :[FH])
+ ac_file_inputs=
+ for ac_f
+ do
+ case $ac_f in
+ -) ac_f="$ac_tmp/stdin";;
+ *) # Look for the file first in the build tree, then in the source tree
+ # (if the path is not absolute). The absolute path cannot be DOS-style,
+ # because $ac_f cannot contain `:'.
+ test -f "$ac_f" ||
+ case $ac_f in
+ [\\/$]*) false;;
+ *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
+ esac ||
+ as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
+ esac
+ case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
+ as_fn_append ac_file_inputs " '$ac_f'"
+ done
+
+ # Let's still pretend it is `configure' which instantiates (i.e., don't
+ # use $as_me), people would be surprised to read:
+ # /* config.h. Generated by config.status. */
+ configure_input='Generated from '`
+ $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
+ `' by configure.'
+ if test x"$ac_file" != x-; then
+ configure_input="$ac_file. $configure_input"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
+$as_echo "$as_me: creating $ac_file" >&6;}
+ fi
+ # Neutralize special characters interpreted by sed in replacement strings.
+ case $configure_input in #(
+ *\&* | *\|* | *\\* )
+ ac_sed_conf_input=`$as_echo "$configure_input" |
+ sed 's/[\\\\&|]/\\\\&/g'`;; #(
+ *) ac_sed_conf_input=$configure_input;;
+ esac
+
+ case $ac_tag in
+ *:-:* | *:-) cat >"$ac_tmp/stdin" \
+ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
+ esac
+ ;;
+ esac
+
+ ac_dir=`$as_dirname -- "$ac_file" ||
+$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$ac_file" : 'X\(//\)[^/]' \| \
+ X"$ac_file" : 'X\(//\)$' \| \
+ X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X"$ac_file" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)[^/].*/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'`
+ as_dir="$ac_dir"; as_fn_mkdir_p
+ ac_builddir=.
+
+case "$ac_dir" in
+.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
+*)
+ ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
+ # A ".." for each directory in $ac_dir_suffix.
+ ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
+ case $ac_top_builddir_sub in
+ "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
+ *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
+ esac ;;
+esac
+ac_abs_top_builddir=$ac_pwd
+ac_abs_builddir=$ac_pwd$ac_dir_suffix
+# for backward compatibility:
+ac_top_builddir=$ac_top_build_prefix
+
+case $srcdir in
+ .) # We are building in place.
+ ac_srcdir=.
+ ac_top_srcdir=$ac_top_builddir_sub
+ ac_abs_top_srcdir=$ac_pwd ;;
+ [\\/]* | ?:[\\/]* ) # Absolute name.
+ ac_srcdir=$srcdir$ac_dir_suffix;
+ ac_top_srcdir=$srcdir
+ ac_abs_top_srcdir=$srcdir ;;
+ *) # Relative name.
+ ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
+ ac_top_srcdir=$ac_top_build_prefix$srcdir
+ ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
+esac
+ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
+
+
+ case $ac_mode in
+ :F)
+ #
+ # CONFIG_FILE
+ #
+
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+# If the template does not know about datarootdir, expand it.
+# FIXME: This hack should be removed a few years after 2.60.
+ac_datarootdir_hack=; ac_datarootdir_seen=
+ac_sed_dataroot='
+/datarootdir/ {
+ p
+ q
+}
+/@datadir@/p
+/@docdir@/p
+/@infodir@/p
+/@localedir@/p
+/@mandir@/p'
+case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
+*datarootdir*) ac_datarootdir_seen=yes;;
+*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
+$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
+_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+ ac_datarootdir_hack='
+ s&@datadir@&$datadir&g
+ s&@docdir@&$docdir&g
+ s&@infodir@&$infodir&g
+ s&@localedir@&$localedir&g
+ s&@mandir@&$mandir&g
+ s&\\\${datarootdir}&$datarootdir&g' ;;
+esac
+_ACEOF
+
+# Neutralize VPATH when `$srcdir' = `.'.
+# Shell code in configure.ac might set extrasub.
+# FIXME: do we really want to maintain this feature?
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+ac_sed_extra="$ac_vpsub
+$extrasub
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+:t
+/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
+s|@configure_input@|$ac_sed_conf_input|;t t
+s&@top_builddir@&$ac_top_builddir_sub&;t t
+s&@top_build_prefix@&$ac_top_build_prefix&;t t
+s&@srcdir@&$ac_srcdir&;t t
+s&@abs_srcdir@&$ac_abs_srcdir&;t t
+s&@top_srcdir@&$ac_top_srcdir&;t t
+s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
+s&@builddir@&$ac_builddir&;t t
+s&@abs_builddir@&$ac_abs_builddir&;t t
+s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
+$ac_datarootdir_hack
+"
+eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
+ >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
+
+test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
+ { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
+ { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
+ "$ac_tmp/out"`; test -z "$ac_out"; } &&
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
+which seems to be undefined. Please make sure it is defined" >&5
+$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
+which seems to be undefined. Please make sure it is defined" >&2;}
+
+ rm -f "$ac_tmp/stdin"
+ case $ac_file in
+ -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
+ *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
+ esac \
+ || as_fn_error $? "could not create $ac_file" "$LINENO" 5
+ ;;
+
+
+
+ esac
+
+
+ case $ac_file$ac_mode in
+ "urlbst":F) chmod +x urlbst ;;
+
+ esac
+done # for ac_tag
+
+
+as_fn_exit 0
+_ACEOF
+ac_clean_files=$ac_clean_files_save
+
+test $ac_write_fail = 0 ||
+ as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
+
+
+# configure is writing to config.log, and then calls config.status.
+# config.status does its own redirection, appending to config.log.
+# Unfortunately, on DOS this fails, as config.log is still kept open
+# by configure, so config.status won't be able to write to it; its
+# output is simply discarded. So we exec the FD to /dev/null,
+# effectively closing config.log, so it can be properly (re)opened and
+# appended to by config.status. When coming back to configure, we
+# need to make the FD available again.
+if test "$no_create" != yes; then
+ ac_cs_success=:
+ ac_config_status_args=
+ test "$silent" = yes &&
+ ac_config_status_args="$ac_config_status_args --quiet"
+ exec 5>/dev/null
+ $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
+ exec 5>>config.log
+ # Use ||, not &&, to avoid exiting from the if with $? = 1, which
+ # would make configure fail if this is the last instruction.
+ $ac_cs_success || as_fn_exit 1
+fi
+if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
+$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
+fi
+
diff --git a/biblio/bibtex/contrib/urlbst/configure.ac b/biblio/bibtex/contrib/urlbst/configure.ac
new file mode 100644
index 0000000000..d071556cb6
--- /dev/null
+++ b/biblio/bibtex/contrib/urlbst/configure.ac
@@ -0,0 +1,89 @@
+dnl Process this file with autoconf to produce a configure script
+AC_INIT(urlbst, 0.8, norman@astro.gla.ac.uk)
+RELEASEDATE="2019 July 1"
+AC_SUBST(RELEASEDATE)
+
+AC_REVISION(@PACKAGE_VERSION@)
+
+COPYRIGHTYEARS="2002-03, 2005-12, 2014, 2019"
+AC_SUBST(COPYRIGHTYEARS)
+
+AC_PREREQ(2.50)
+
+AC_CONFIG_SRCDIR([urlbst.in])
+
+AC_PATH_PROG(PERL, perl)
+
+
+dnl Add --with-eprints: tune default support for eprints
+WITHEPRINTS=1
+AC_SUBST(WITHEPRINTS)
+EPRINTURL=http://arxiv.org/abs/
+AC_SUBST(EPRINTURL)
+
+dnl Add --with-doi: tune default support for DOI fields
+WITHDOIRESOLVER=1
+AC_SUBST(WITHDOIRESOLVER)
+DOIURL=https://doi.org/
+AC_SUBST(DOIURL)
+
+dnl Add --with-pubmed
+WITHPUBMEDRESOLVER=1
+AC_SUBST(WITHPUBMEDRESOLVER)
+PUBMEDURL=http://www.ncbi.nlm.nih.gov/pubmed/
+AC_SUBST(PUBMEDURL)
+
+AC_ARG_WITH(eprints,
+[ --with-eprints[[=url]] Include eprint support by default, giving optional URL],
+ if test "$withval" = "yes"; then
+ WITHEPRINTS=1
+ elif test "$withval" = "no"; then
+ WITHEPRINTS=0
+ else
+ WITHEPRINTS=1
+ EPRINTURL=$withval
+ fi)
+
+AC_ARG_WITH(doi,
+[ --with-doi=[[=url]] Include support for a DOI resolver by default, giving optional URL],
+ if test "$withval" = yes; then
+ WITHDOIRESOLVER=1
+ elif test "$withval" = no; then
+ WITHDOIRESOLVER=0
+ else
+ WITHDOIRESOLVER=1
+ DOIURL=$withval
+ fi)
+
+AC_ARG_WITH(pubmed,
+[ --with-pubmed=[[=url]] Include support for a PUBMED resolver by default, giving optional URL],
+ if test "$withval" = yes; then
+ WITHPUBMEDRESOLVER=1
+ elif test "$withval" = no; then
+ WITHPUBMEDRESOLVER=0
+ else
+ WITHPUBMEDRESOLVER=1
+ PUBMEDURL=$withval
+ fi)
+
+
+dnl Add --with-href: set default support for hyperlinks
+dnl Default is to have no hyperlinks
+WITHHREF=0
+AC_SUBST(WITHHREF)
+
+AC_ARG_WITH(href,
+[ --with-href[[=int]] Include eprint hyperlinks (0/1/2=none/hypertex/hyperref)],
+ if test "$withval" = yes; then
+ WITHHREF=2
+ elif test "$withval" = no; then
+ WITHHREF=0
+ else
+ WITHHREF=$withval
+ fi)
+
+
+AC_CONFIG_FILES(Makefile)
+AC_CONFIG_FILES(urlbst, [chmod +x urlbst])
+
+AC_OUTPUT
diff --git a/biblio/bibtex/contrib/urlbst/plainurl.bst b/biblio/bibtex/contrib/urlbst/plainurl.bst
new file mode 100644
index 0000000000..3f75fb2933
--- /dev/null
+++ b/biblio/bibtex/contrib/urlbst/plainurl.bst
@@ -0,0 +1,1464 @@
+%%% Modification of BibTeX style file /usr/local/texlive/2019/texmf-dist/bibtex/bst/base/plain.bst
+%%% ... by urlbst, version 0.8 (marked with "% urlbst")
+%%% See <http://purl.org/nxg/dist/urlbst>
+%%% Modifications Copyright 2002-03, 2005-12, 2014, 2019, Norman Gray,
+%%% and distributed under the terms of the LPPL; see README for discussion.
+%%%
+%%% Added webpage entry type, and url and lastchecked fields.
+%%% Added eprint support.
+%%% Added DOI support.
+%%% Added PUBMED support.
+%%% Added hyperref support.
+%%% Original headers follow...
+
+% BibTeX standard bibliography style `plain'
+ % Version 0.99b (8-Dec-10 release) for BibTeX versions 0.99a or later.
+ % Copyright (C) 1984, 1985, 1988, 2010 Howard Trickey and Oren Patashnik.
+ % Unlimited copying and redistribution of this file are permitted as long as
+ % it is unmodified. Modifications (and redistribution of modified versions)
+ % are also permitted, but only if the resulting file is renamed to something
+ % besides btxbst.doc, plain.bst, unsrt.bst, alpha.bst, and abbrv.bst.
+ % This restriction helps ensure that all standard styles are identical.
+ % The file btxbst.doc has the documentation for this style.
+
+ENTRY
+ { address
+ author
+ booktitle
+ chapter
+ edition
+ editor
+ howpublished
+ institution
+ journal
+ key
+ month
+ note
+ number
+ organization
+ pages
+ publisher
+ school
+ series
+ title
+ type
+ volume
+ year
+ eprint % urlbst
+ doi % urlbst
+ pubmed % urlbst
+ url % urlbst
+ lastchecked % urlbst
+ }
+ {}
+ { label }
+
+INTEGERS { output.state before.all mid.sentence after.sentence after.block }
+
+% urlbst...
+% urlbst constants and state variables
+STRINGS { urlintro
+ eprinturl eprintprefix doiprefix doiurl pubmedprefix pubmedurl
+ citedstring onlinestring linktextstring
+ openinlinelink closeinlinelink }
+INTEGERS { hrefform inlinelinks makeinlinelink
+ addeprints adddoiresolver addpubmedresolver }
+FUNCTION {init.urlbst.variables}
+{
+ % The following constants may be adjusted by hand, if desired
+
+ % The first set allow you to enable or disable certain functionality.
+ #1 'addeprints := % 0=no eprints; 1=include eprints
+ #1 'adddoiresolver := % 0=no DOI resolver; 1=include it
+ #1 'addpubmedresolver := % 0=no PUBMED resolver; 1=include it
+ #2 'hrefform := % 0=no crossrefs; 1=hypertex xrefs; 2=hyperref refs
+ #0 'inlinelinks := % 0=URLs explicit; 1=URLs attached to titles
+
+ % String constants, which you _might_ want to tweak.
+ "URL: " 'urlintro := % prefix before URL; typically "Available from:" or "URL":
+ "online" 'onlinestring := % indication that resource is online; typically "online"
+ "cited " 'citedstring := % indicator of citation date; typically "cited "
+ "[link]" 'linktextstring := % dummy link text; typically "[link]"
+ "http://arxiv.org/abs/" 'eprinturl := % prefix to make URL from eprint ref
+ "arXiv:" 'eprintprefix := % text prefix printed before eprint ref; typically "arXiv:"
+ "https://doi.org/" 'doiurl := % prefix to make URL from DOI
+ "doi:" 'doiprefix := % text prefix printed before DOI ref; typically "doi:"
+ "http://www.ncbi.nlm.nih.gov/pubmed/" 'pubmedurl := % prefix to make URL from PUBMED
+ "PMID:" 'pubmedprefix := % text prefix printed before PUBMED ref; typically "PMID:"
+
+ % The following are internal state variables, not configuration constants,
+ % so they shouldn't be fiddled with.
+ #0 'makeinlinelink := % state variable managed by possibly.setup.inlinelink
+ "" 'openinlinelink := % ditto
+ "" 'closeinlinelink := % ditto
+}
+INTEGERS {
+ bracket.state
+ outside.brackets
+ open.brackets
+ within.brackets
+ close.brackets
+}
+% ...urlbst to here
+FUNCTION {init.state.consts}
+{ #0 'outside.brackets := % urlbst...
+ #1 'open.brackets :=
+ #2 'within.brackets :=
+ #3 'close.brackets := % ...urlbst to here
+
+ #0 'before.all :=
+ #1 'mid.sentence :=
+ #2 'after.sentence :=
+ #3 'after.block :=
+}
+
+STRINGS { s t }
+
+% urlbst
+FUNCTION {output.nonnull.original}
+{ 's :=
+ output.state mid.sentence =
+ { ", " * write$ }
+ { output.state after.block =
+ { add.period$ write$
+ newline$
+ "\newblock " write$
+ }
+ { output.state before.all =
+ 'write$
+ { add.period$ " " * write$ }
+ if$
+ }
+ if$
+ mid.sentence 'output.state :=
+ }
+ if$
+ s
+}
+
+% urlbst...
+% The following three functions are for handling inlinelink. They wrap
+% a block of text which is potentially output with write$ by multiple
+% other functions, so we don't know the content a priori.
+% They communicate between each other using the variables makeinlinelink
+% (which is true if a link should be made), and closeinlinelink (which holds
+% the string which should close any current link. They can be called
+% at any time, but start.inlinelink will be a no-op unless something has
+% previously set makeinlinelink true, and the two ...end.inlinelink functions
+% will only do their stuff if start.inlinelink has previously set
+% closeinlinelink to be non-empty.
+% (thanks to 'ijvm' for suggested code here)
+FUNCTION {uand}
+{ 'skip$ { pop$ #0 } if$ } % 'and' (which isn't defined at this point in the file)
+FUNCTION {possibly.setup.inlinelink}
+{ makeinlinelink hrefform #0 > uand
+ { doi empty$ adddoiresolver uand
+ { pubmed empty$ addpubmedresolver uand
+ { eprint empty$ addeprints uand
+ { url empty$
+ { "" }
+ { url }
+ if$ }
+ { eprinturl eprint * }
+ if$ }
+ { pubmedurl pubmed * }
+ if$ }
+ { doiurl doi * }
+ if$
+ % an appropriately-formatted URL is now on the stack
+ hrefform #1 = % hypertex
+ { "\special {html:<a href=" quote$ * swap$ * quote$ * "> }{" * 'openinlinelink :=
+ "\special {html:</a>}" 'closeinlinelink := }
+ { "\href {" swap$ * "} {" * 'openinlinelink := % hrefform=#2 -- hyperref
+ % the space between "} {" matters: a URL of just the right length can cause "\% newline em"
+ "}" 'closeinlinelink := }
+ if$
+ #0 'makeinlinelink :=
+ }
+ 'skip$
+ if$ % makeinlinelink
+}
+FUNCTION {add.inlinelink}
+{ openinlinelink empty$
+ 'skip$
+ { openinlinelink swap$ * closeinlinelink *
+ "" 'openinlinelink :=
+ }
+ if$
+}
+FUNCTION {output.nonnull}
+{ % Save the thing we've been asked to output
+ 's :=
+ % If the bracket-state is close.brackets, then add a close-bracket to
+ % what is currently at the top of the stack, and set bracket.state
+ % to outside.brackets
+ bracket.state close.brackets =
+ { "]" *
+ outside.brackets 'bracket.state :=
+ }
+ 'skip$
+ if$
+ bracket.state outside.brackets =
+ { % We're outside all brackets -- this is the normal situation.
+ % Write out what's currently at the top of the stack, using the
+ % original output.nonnull function.
+ s
+ add.inlinelink
+ output.nonnull.original % invoke the original output.nonnull
+ }
+ { % Still in brackets. Add open-bracket or (continuation) comma, add the
+ % new text (in s) to the top of the stack, and move to the close-brackets
+ % state, ready for next time (unless inbrackets resets it). If we come
+ % into this branch, then output.state is carefully undisturbed.
+ bracket.state open.brackets =
+ { " [" * }
+ { ", " * } % bracket.state will be within.brackets
+ if$
+ s *
+ close.brackets 'bracket.state :=
+ }
+ if$
+}
+
+% Call this function just before adding something which should be presented in
+% brackets. bracket.state is handled specially within output.nonnull.
+FUNCTION {inbrackets}
+{ bracket.state close.brackets =
+ { within.brackets 'bracket.state := } % reset the state: not open nor closed
+ { open.brackets 'bracket.state := }
+ if$
+}
+
+FUNCTION {format.lastchecked}
+{ lastchecked empty$
+ { "" }
+ { inbrackets citedstring lastchecked * }
+ if$
+}
+% ...urlbst to here
+
+FUNCTION {output}
+{ duplicate$ empty$
+ 'pop$
+ 'output.nonnull
+ if$
+}
+
+FUNCTION {output.check}
+{ 't :=
+ duplicate$ empty$
+ { pop$ "empty " t * " in " * cite$ * warning$ }
+ 'output.nonnull
+ if$
+}
+
+FUNCTION {output.bibitem.original} % urlbst (renamed from output.bibitem, so it can be wrapped below)
+{ newline$
+ "\bibitem{" write$
+ cite$ write$
+ "}" write$
+ newline$
+ ""
+ before.all 'output.state :=
+}
+
+FUNCTION {fin.entry.original} % urlbst (renamed from fin.entry, so it can be wrapped below)
+{ add.period$
+ write$
+ newline$
+}
+
+FUNCTION {new.block}
+{ output.state before.all =
+ 'skip$
+ { after.block 'output.state := }
+ if$
+}
+
+FUNCTION {new.sentence}
+{ output.state after.block =
+ 'skip$
+ { output.state before.all =
+ 'skip$
+ { after.sentence 'output.state := }
+ if$
+ }
+ if$
+}
+
+FUNCTION {not}
+{ { #0 }
+ { #1 }
+ if$
+}
+
+FUNCTION {and}
+{ 'skip$
+ { pop$ #0 }
+ if$
+}
+
+FUNCTION {or}
+{ { pop$ #1 }
+ 'skip$
+ if$
+}
+
+FUNCTION {new.block.checka}
+{ empty$
+ 'skip$
+ 'new.block
+ if$
+}
+
+FUNCTION {new.block.checkb}
+{ empty$
+ swap$ empty$
+ and
+ 'skip$
+ 'new.block
+ if$
+}
+
+FUNCTION {new.sentence.checka}
+{ empty$
+ 'skip$
+ 'new.sentence
+ if$
+}
+
+FUNCTION {new.sentence.checkb}
+{ empty$
+ swap$ empty$
+ and
+ 'skip$
+ 'new.sentence
+ if$
+}
+
+FUNCTION {field.or.null}
+{ duplicate$ empty$
+ { pop$ "" }
+ 'skip$
+ if$
+}
+
+FUNCTION {emphasize}
+{ duplicate$ empty$
+ { pop$ "" }
+ { "{\em " swap$ * "}" * }
+ if$
+}
+
+INTEGERS { nameptr namesleft numnames }
+
+FUNCTION {format.names}
+{ 's :=
+ #1 'nameptr :=
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ { s nameptr "{ff~}{vv~}{ll}{, jj}" format.name$ 't :=
+ nameptr #1 >
+ { namesleft #1 >
+ { ", " * t * }
+ { numnames #2 >
+ { "," * }
+ 'skip$
+ if$
+ t "others" =
+ { " et~al." * }
+ { " and " * t * }
+ if$
+ }
+ if$
+ }
+ 't
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+}
+
+FUNCTION {format.authors}
+{ author empty$
+ { "" }
+ { author format.names }
+ if$
+}
+
+FUNCTION {format.editors}
+{ editor empty$
+ { "" }
+ { editor format.names
+ editor num.names$ #1 >
+ { ", editors" * }
+ { ", editor" * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.title}
+{ title empty$
+ { "" }
+ { title "t" change.case$ }
+ if$
+}
+
+FUNCTION {n.dashify}
+{ 't :=
+ ""
+ { t empty$ not }
+ { t #1 #1 substring$ "-" =
+ { t #1 #2 substring$ "--" = not
+ { "--" *
+ t #2 global.max$ substring$ 't :=
+ }
+ { { t #1 #1 substring$ "-" = }
+ { "-" *
+ t #2 global.max$ substring$ 't :=
+ }
+ while$
+ }
+ if$
+ }
+ { t #1 #1 substring$ *
+ t #2 global.max$ substring$ 't :=
+ }
+ if$
+ }
+ while$
+}
+
+FUNCTION {format.date}
+{ year empty$
+ { month empty$
+ { "" }
+ { "there's a month but no year in " cite$ * warning$
+ month
+ }
+ if$
+ }
+ { month empty$
+ 'year
+ { month " " * year * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.btitle}
+{ title emphasize
+}
+
+FUNCTION {tie.or.space.connect}
+{ duplicate$ text.length$ #3 <
+ { "~" }
+ { " " }
+ if$
+ swap$ * *
+}
+
+FUNCTION {either.or.check}
+{ empty$
+ 'pop$
+ { "can't use both " swap$ * " fields in " * cite$ * warning$ }
+ if$
+}
+
+FUNCTION {format.bvolume}
+{ volume empty$
+ { "" }
+ { "volume" volume tie.or.space.connect
+ series empty$
+ 'skip$
+ { " of " * series emphasize * }
+ if$
+ "volume and number" number either.or.check
+ }
+ if$
+}
+
+FUNCTION {format.number.series}
+{ volume empty$
+ { number empty$
+ { series field.or.null }
+ { output.state mid.sentence =
+ { "number" }
+ { "Number" }
+ if$
+ number tie.or.space.connect
+ series empty$
+ { "there's a number but no series in " cite$ * warning$ }
+ { " in " * series * }
+ if$
+ }
+ if$
+ }
+ { "" }
+ if$
+}
+
+FUNCTION {format.edition}
+{ edition empty$
+ { "" }
+ { output.state mid.sentence =
+ { edition "l" change.case$ " edition" * }
+ { edition "t" change.case$ " edition" * }
+ if$
+ }
+ if$
+}
+
+INTEGERS { multiresult }
+
+FUNCTION {multi.page.check}
+{ 't :=
+ #0 'multiresult :=
+ { multiresult not
+ t empty$ not
+ and
+ }
+ { t #1 #1 substring$
+ duplicate$ "-" =
+ swap$ duplicate$ "," =
+ swap$ "+" =
+ or or
+ { #1 'multiresult := }
+ { t #2 global.max$ substring$ 't := }
+ if$
+ }
+ while$
+ multiresult
+}
+
+FUNCTION {format.pages}
+{ pages empty$
+ { "" }
+ { pages multi.page.check
+ { "pages" pages n.dashify tie.or.space.connect }
+ { "page" pages tie.or.space.connect }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.vol.num.pages}
+{ volume field.or.null
+ number empty$
+ 'skip$
+ { "(" number * ")" * *
+ volume empty$
+ { "there's a number but no volume in " cite$ * warning$ }
+ 'skip$
+ if$
+ }
+ if$
+ pages empty$
+ 'skip$
+ { duplicate$ empty$
+ { pop$ format.pages }
+ { ":" * pages n.dashify * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.chapter.pages}
+{ chapter empty$
+ 'format.pages
+ { type empty$
+ { "chapter" }
+ { type "l" change.case$ }
+ if$
+ chapter tie.or.space.connect
+ pages empty$
+ 'skip$
+ { ", " * format.pages * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.in.ed.booktitle}
+{ booktitle empty$
+ { "" }
+ { editor empty$
+ { "In " booktitle emphasize * }
+ { "In " format.editors * ", " * booktitle emphasize * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {empty.misc.check}
+{ author empty$ title empty$ howpublished empty$
+ month empty$ year empty$ note empty$
+ and and and and and
+ key empty$ not and
+ { "all relevant fields are empty in " cite$ * warning$ }
+ 'skip$
+ if$
+}
+
+FUNCTION {format.thesis.type}
+{ type empty$
+ 'skip$
+ { pop$
+ type "t" change.case$
+ }
+ if$
+}
+
+FUNCTION {format.tr.number}
+{ type empty$
+ { "Technical Report" }
+ 'type
+ if$
+ number empty$
+ { "t" change.case$ }
+ { number tie.or.space.connect }
+ if$
+}
+
+FUNCTION {format.article.crossref}
+{ key empty$
+ { journal empty$
+ { "need key or journal for " cite$ * " to crossref " * crossref *
+ warning$
+ ""
+ }
+ { "In {\em " journal * "\/}" * }
+ if$
+ }
+ { "In " key * }
+ if$
+ " \cite{" * crossref * "}" *
+}
+
+FUNCTION {format.crossref.editor}
+{ editor #1 "{vv~}{ll}" format.name$
+ editor num.names$ duplicate$
+ #2 >
+ { pop$ " et~al." * }
+ { #2 <
+ 'skip$
+ { editor #2 "{ff }{vv }{ll}{ jj}" format.name$ "others" =
+ { " et~al." * }
+ { " and " * editor #2 "{vv~}{ll}" format.name$ * }
+ if$
+ }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.book.crossref}
+{ volume empty$
+ { "empty volume in " cite$ * "'s crossref of " * crossref * warning$
+ "In "
+ }
+ { "Volume" volume tie.or.space.connect
+ " of " *
+ }
+ if$
+ editor empty$
+ editor field.or.null author field.or.null =
+ or
+ { key empty$
+ { series empty$
+ { "need editor, key, or series for " cite$ * " to crossref " *
+ crossref * warning$
+ "" *
+ }
+ { "{\em " * series * "\/}" * }
+ if$
+ }
+ { key * }
+ if$
+ }
+ { format.crossref.editor * }
+ if$
+ " \cite{" * crossref * "}" *
+}
+
+FUNCTION {format.incoll.inproc.crossref}
+{ editor empty$
+ editor field.or.null author field.or.null =
+ or
+ { key empty$
+ { booktitle empty$
+ { "need editor, key, or booktitle for " cite$ * " to crossref " *
+ crossref * warning$
+ ""
+ }
+ { "In {\em " booktitle * "\/}" * }
+ if$
+ }
+ { "In " key * }
+ if$
+ }
+ { "In " format.crossref.editor * }
+ if$
+ " \cite{" * crossref * "}" *
+}
+
+% urlbst...
+% Functions for making hypertext links.
+% In all cases, the stack has (link-text href-url)
+%
+% make 'null' specials
+FUNCTION {make.href.null}
+{
+ pop$
+}
+% make hypertex specials
+FUNCTION {make.href.hypertex}
+{
+ "\special {html:<a href=" quote$ *
+ swap$ * quote$ * "> }" * swap$ *
+ "\special {html:</a>}" *
+}
+% make hyperref specials
+FUNCTION {make.href.hyperref}
+{
+ "\href {" swap$ * "} {\path{" * swap$ * "}}" *
+}
+FUNCTION {make.href}
+{ hrefform #2 =
+ 'make.href.hyperref % hrefform = 2
+ { hrefform #1 =
+ 'make.href.hypertex % hrefform = 1
+ 'make.href.null % hrefform = 0 (or anything else)
+ if$
+ }
+ if$
+}
+
+% If inlinelinks is true, then format.url should be a no-op, since it's
+% (a) redundant, and (b) could end up as a link-within-a-link.
+FUNCTION {format.url}
+{ inlinelinks #1 = url empty$ or
+ { "" }
+ { hrefform #1 =
+ { % special case -- add HyperTeX specials
+ urlintro "\url{" url * "}" * url make.href.hypertex * }
+ { urlintro "\url{" * url * "}" * }
+ if$
+ }
+ if$
+}
+FUNCTION {format.eprint}
+{ eprint empty$
+ { "" }
+ { eprintprefix eprint * eprinturl eprint * make.href }
+ if$
+}
+
+FUNCTION {format.doi}
+{ doi empty$
+ { "" }
+ { doiprefix doi * doiurl doi * make.href }
+ if$
+}
+
+FUNCTION {format.pubmed}
+{ pubmed empty$
+ { "" }
+ { pubmedprefix pubmed * pubmedurl pubmed * make.href }
+ if$
+}
+
+% Output a URL. We can't use the more normal idiom (something like
+% `format.url output'), because the `inbrackets' within
+% format.lastchecked applies to everything between calls to `output',
+% so that `format.url format.lastchecked * output' ends up with both
+% the URL and the lastchecked in brackets.
+FUNCTION {output.url}
+{ url empty$
+ 'skip$
+ { new.block
+ format.url output
+ format.lastchecked output
+ }
+ if$
+}
+
+FUNCTION {output.web.refs}
+{
+ new.block
+ inlinelinks
+ 'skip$ % links were inline -- don't repeat them
+ { % If the generated DOI will be the same as the URL,
+ % then don't print the URL (thanks to Joseph Wright for this code,
+ % at http://tex.stackexchange.com/questions/5660)
+ adddoiresolver
+ doiurl doi empty$ { "X" } { doi } if$ * % DOI URL to be generated
+ url empty$ { "Y" } { url } if$ % the URL, or "Y" if empty
+ = % are the strings equal?
+ and
+ 'skip$
+ { output.url }
+ if$
+ addeprints eprint empty$ not and
+ { format.eprint output.nonnull }
+ 'skip$
+ if$
+ adddoiresolver doi empty$ not and
+ { format.doi output.nonnull }
+ 'skip$
+ if$
+ addpubmedresolver pubmed empty$ not and
+ { format.pubmed output.nonnull }
+ 'skip$
+ if$
+ }
+ if$
+}
+
+% Wrapper for output.bibitem.original.
+% If the URL field is not empty, set makeinlinelink to be true,
+% so that an inline link will be started at the next opportunity
+FUNCTION {output.bibitem}
+{ outside.brackets 'bracket.state :=
+ output.bibitem.original
+ inlinelinks url empty$ not doi empty$ not or pubmed empty$ not or eprint empty$ not or and
+ { #1 'makeinlinelink := }
+ { #0 'makeinlinelink := }
+ if$
+}
+
+% Wrapper for fin.entry.original
+FUNCTION {fin.entry}
+{ output.web.refs % urlbst
+ makeinlinelink % ooops, it appears we didn't have a title for inlinelink
+ { possibly.setup.inlinelink % add some artificial link text here, as a fallback
+ linktextstring output.nonnull }
+ 'skip$
+ if$
+ bracket.state close.brackets = % urlbst
+ { "]" * }
+ 'skip$
+ if$
+ fin.entry.original
+}
+
+% Webpage entry type.
+% Title and url fields required;
+% author, note, year, month, and lastchecked fields optional
+% See references
+% ISO 690-2 http://www.nlc-bnc.ca/iso/tc46sc9/standard/690-2e.htm
+% http://www.classroom.net/classroom/CitingNetResources.html
+% http://neal.ctstateu.edu/history/cite.html
+% http://www.cas.usf.edu/english/walker/mla.html
+% for citation formats for web pages.
+FUNCTION {webpage}
+{ output.bibitem
+ author empty$
+ { editor empty$
+ 'skip$ % author and editor both optional
+ { format.editors output.nonnull }
+ if$
+ }
+ { editor empty$
+ { format.authors output.nonnull }
+ { "can't use both author and editor fields in " cite$ * warning$ }
+ if$
+ }
+ if$
+ new.block
+ title empty$ 'skip$ 'possibly.setup.inlinelink if$
+ format.title "title" output.check
+ inbrackets onlinestring output
+ new.block
+ year empty$
+ 'skip$
+ { format.date "year" output.check }
+ if$
+ % We don't need to output the URL details ('lastchecked' and 'url'),
+ % because fin.entry does that for us, using output.web.refs. The only
+ % reason we would want to put them here is if we were to decide that
+ % they should go in front of the rather miscellaneous information in 'note'.
+ new.block
+ note output
+ fin.entry
+}
+% ...urlbst to here
+
+
+FUNCTION {article}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ title empty$ 'skip$ 'possibly.setup.inlinelink if$ % urlbst
+ format.title "title" output.check
+ new.block
+ crossref missing$
+ { journal emphasize "journal" output.check
+ possibly.setup.inlinelink format.vol.num.pages output% urlbst
+ format.date "year" output.check
+ }
+ { format.article.crossref output.nonnull
+ format.pages output
+ }
+ if$
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {book}
+{ output.bibitem
+ author empty$
+ { format.editors "author and editor" output.check }
+ { format.authors output.nonnull
+ crossref missing$
+ { "author and editor" editor either.or.check }
+ 'skip$
+ if$
+ }
+ if$
+ new.block
+ title empty$ 'skip$ 'possibly.setup.inlinelink if$ % urlbst
+ format.btitle "title" output.check
+ crossref missing$
+ { format.bvolume output
+ new.block
+ format.number.series output
+ new.sentence
+ publisher "publisher" output.check
+ address output
+ }
+ { new.block
+ format.book.crossref output.nonnull
+ }
+ if$
+ format.edition output
+ format.date "year" output.check
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {booklet}
+{ output.bibitem
+ format.authors output
+ new.block
+ title empty$ 'skip$ 'possibly.setup.inlinelink if$ % urlbst
+ format.title "title" output.check
+ howpublished address new.block.checkb
+ howpublished output
+ address output
+ format.date output
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {inbook}
+{ output.bibitem
+ author empty$
+ { format.editors "author and editor" output.check }
+ { format.authors output.nonnull
+ crossref missing$
+ { "author and editor" editor either.or.check }
+ 'skip$
+ if$
+ }
+ if$
+ new.block
+ title empty$ 'skip$ 'possibly.setup.inlinelink if$ % urlbst
+ format.btitle "title" output.check
+ crossref missing$
+ { format.bvolume output
+ format.chapter.pages "chapter and pages" output.check
+ new.block
+ format.number.series output
+ new.sentence
+ publisher "publisher" output.check
+ address output
+ }
+ { format.chapter.pages "chapter and pages" output.check
+ new.block
+ format.book.crossref output.nonnull
+ }
+ if$
+ format.edition output
+ format.date "year" output.check
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {incollection}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ title empty$ 'skip$ 'possibly.setup.inlinelink if$ % urlbst
+ format.title "title" output.check
+ new.block
+ crossref missing$
+ { format.in.ed.booktitle "booktitle" output.check
+ format.bvolume output
+ format.number.series output
+ format.chapter.pages output
+ new.sentence
+ publisher "publisher" output.check
+ address output
+ format.edition output
+ format.date "year" output.check
+ }
+ { format.incoll.inproc.crossref output.nonnull
+ format.chapter.pages output
+ }
+ if$
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {inproceedings}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ title empty$ 'skip$ 'possibly.setup.inlinelink if$ % urlbst
+ format.title "title" output.check
+ new.block
+ crossref missing$
+ { format.in.ed.booktitle "booktitle" output.check
+ format.bvolume output
+ format.number.series output
+ format.pages output
+ address empty$
+ { organization publisher new.sentence.checkb
+ organization output
+ publisher output
+ format.date "year" output.check
+ }
+ { address output.nonnull
+ format.date "year" output.check
+ new.sentence
+ organization output
+ publisher output
+ }
+ if$
+ }
+ { format.incoll.inproc.crossref output.nonnull
+ format.pages output
+ }
+ if$
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {conference} { inproceedings }
+
+FUNCTION {manual}
+{ output.bibitem
+ author empty$
+ { organization empty$
+ 'skip$
+ { organization output.nonnull
+ address output
+ }
+ if$
+ }
+ { format.authors output.nonnull }
+ if$
+ new.block
+ title empty$ 'skip$ 'possibly.setup.inlinelink if$ % urlbst
+ format.btitle "title" output.check
+ author empty$
+ { organization empty$
+ { address new.block.checka
+ address output
+ }
+ 'skip$
+ if$
+ }
+ { organization address new.block.checkb
+ organization output
+ address output
+ }
+ if$
+ format.edition output
+ format.date output
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {mastersthesis}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ title empty$ 'skip$ 'possibly.setup.inlinelink if$ % urlbst
+ format.title "title" output.check
+ new.block
+ "Master's thesis" format.thesis.type output.nonnull
+ school "school" output.check
+ address output
+ format.date "year" output.check
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {misc}
+{ output.bibitem
+ format.authors output
+ title howpublished new.block.checkb
+ title empty$ 'skip$ 'possibly.setup.inlinelink if$ % urlbst
+ format.title output
+ howpublished new.block.checka
+ howpublished output
+ format.date output
+ new.block
+ note output
+ fin.entry
+ empty.misc.check
+}
+
+FUNCTION {phdthesis}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ title empty$ 'skip$ 'possibly.setup.inlinelink if$ % urlbst
+ format.btitle "title" output.check
+ new.block
+ "PhD thesis" format.thesis.type output.nonnull
+ school "school" output.check
+ address output
+ format.date "year" output.check
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {proceedings}
+{ output.bibitem
+ editor empty$
+ { organization output }
+ { format.editors output.nonnull }
+ if$
+ new.block
+ title empty$ 'skip$ 'possibly.setup.inlinelink if$ % urlbst
+ format.btitle "title" output.check
+ format.bvolume output
+ format.number.series output
+ address empty$
+ { editor empty$
+ { publisher new.sentence.checka }
+ { organization publisher new.sentence.checkb
+ organization output
+ }
+ if$
+ publisher output
+ format.date "year" output.check
+ }
+ { address output.nonnull
+ format.date "year" output.check
+ new.sentence
+ editor empty$
+ 'skip$
+ { organization output }
+ if$
+ publisher output
+ }
+ if$
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {techreport}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ title empty$ 'skip$ 'possibly.setup.inlinelink if$ % urlbst
+ format.title "title" output.check
+ new.block
+ format.tr.number output.nonnull
+ institution "institution" output.check
+ address output
+ format.date "year" output.check
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {unpublished}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ title empty$ 'skip$ 'possibly.setup.inlinelink if$ % urlbst
+ format.title "title" output.check
+ new.block
+ note "note" output.check
+ format.date output
+ fin.entry
+}
+
+FUNCTION {default.type} { misc }
+
+MACRO {jan} {"January"}
+
+MACRO {feb} {"February"}
+
+MACRO {mar} {"March"}
+
+MACRO {apr} {"April"}
+
+MACRO {may} {"May"}
+
+MACRO {jun} {"June"}
+
+MACRO {jul} {"July"}
+
+MACRO {aug} {"August"}
+
+MACRO {sep} {"September"}
+
+MACRO {oct} {"October"}
+
+MACRO {nov} {"November"}
+
+MACRO {dec} {"December"}
+
+MACRO {acmcs} {"ACM Computing Surveys"}
+
+MACRO {acta} {"Acta Informatica"}
+
+MACRO {cacm} {"Communications of the ACM"}
+
+MACRO {ibmjrd} {"IBM Journal of Research and Development"}
+
+MACRO {ibmsj} {"IBM Systems Journal"}
+
+MACRO {ieeese} {"IEEE Transactions on Software Engineering"}
+
+MACRO {ieeetc} {"IEEE Transactions on Computers"}
+
+MACRO {ieeetcad}
+ {"IEEE Transactions on Computer-Aided Design of Integrated Circuits"}
+
+MACRO {ipl} {"Information Processing Letters"}
+
+MACRO {jacm} {"Journal of the ACM"}
+
+MACRO {jcss} {"Journal of Computer and System Sciences"}
+
+MACRO {scp} {"Science of Computer Programming"}
+
+MACRO {sicomp} {"SIAM Journal on Computing"}
+
+MACRO {tocs} {"ACM Transactions on Computer Systems"}
+
+MACRO {tods} {"ACM Transactions on Database Systems"}
+
+MACRO {tog} {"ACM Transactions on Graphics"}
+
+MACRO {toms} {"ACM Transactions on Mathematical Software"}
+
+MACRO {toois} {"ACM Transactions on Office Information Systems"}
+
+MACRO {toplas} {"ACM Transactions on Programming Languages and Systems"}
+
+MACRO {tcs} {"Theoretical Computer Science"}
+
+READ
+
+FUNCTION {sortify}
+{ purify$
+ "l" change.case$
+}
+
+INTEGERS { len }
+
+FUNCTION {chop.word}
+{ 's :=
+ 'len :=
+ s #1 len substring$ =
+ { s len #1 + global.max$ substring$ }
+ 's
+ if$
+}
+
+FUNCTION {sort.format.names}
+{ 's :=
+ #1 'nameptr :=
+ ""
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ { nameptr #1 >
+ { " " * }
+ 'skip$
+ if$
+ s nameptr "{vv{ } }{ll{ }}{ ff{ }}{ jj{ }}" format.name$ 't :=
+ nameptr numnames = t "others" = and
+ { "et al" * }
+ { t sortify * }
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+}
+
+FUNCTION {sort.format.title}
+{ 't :=
+ "A " #2
+ "An " #3
+ "The " #4 t chop.word
+ chop.word
+ chop.word
+ sortify
+ #1 global.max$ substring$
+}
+
+FUNCTION {author.sort}
+{ author empty$
+ { key empty$
+ { "to sort, need author or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { author sort.format.names }
+ if$
+}
+
+FUNCTION {author.editor.sort}
+{ author empty$
+ { editor empty$
+ { key empty$
+ { "to sort, need author, editor, or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { editor sort.format.names }
+ if$
+ }
+ { author sort.format.names }
+ if$
+}
+
+FUNCTION {author.organization.sort}
+{ author empty$
+ { organization empty$
+ { key empty$
+ { "to sort, need author, organization, or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { "The " #4 organization chop.word sortify }
+ if$
+ }
+ { author sort.format.names }
+ if$
+}
+
+FUNCTION {editor.organization.sort}
+{ editor empty$
+ { organization empty$
+ { key empty$
+ { "to sort, need editor, organization, or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { "The " #4 organization chop.word sortify }
+ if$
+ }
+ { editor sort.format.names }
+ if$
+}
+
+FUNCTION {presort}
+{ type$ "book" =
+ type$ "inbook" =
+ or
+ 'author.editor.sort
+ { type$ "proceedings" =
+ 'editor.organization.sort
+ { type$ "manual" =
+ 'author.organization.sort
+ 'author.sort
+ if$
+ }
+ if$
+ }
+ if$
+ " "
+ *
+ year field.or.null sortify
+ *
+ " "
+ *
+ title field.or.null
+ sort.format.title
+ *
+ #1 entry.max$ substring$
+ 'sort.key$ :=
+}
+
+ITERATE {presort}
+
+SORT
+
+STRINGS { longest.label }
+
+INTEGERS { number.label longest.label.width }
+
+FUNCTION {initialize.longest.label}
+{ "" 'longest.label :=
+ #1 'number.label :=
+ #0 'longest.label.width :=
+}
+
+FUNCTION {longest.label.pass}
+{ number.label int.to.str$ 'label :=
+ number.label #1 + 'number.label :=
+ label width$ longest.label.width >
+ { label 'longest.label :=
+ label width$ 'longest.label.width :=
+ }
+ 'skip$
+ if$
+}
+
+EXECUTE {initialize.longest.label}
+
+ITERATE {longest.label.pass}
+
+FUNCTION {begin.bib}
+{ preamble$ empty$
+ 'skip$
+ { preamble$ write$ newline$ }
+ if$
+ "\begin{thebibliography}{" longest.label * "}" * write$ newline$
+}
+
+EXECUTE {begin.bib}
+
+EXECUTE {init.urlbst.variables} % urlbst
+EXECUTE {init.state.consts}
+
+ITERATE {call.type$}
+
+FUNCTION {end.bib}
+{ newline$
+ "\end{thebibliography}" write$ newline$
+}
+
+EXECUTE {end.bib}
diff --git a/biblio/bibtex/contrib/urlbst/unsrturl.bst b/biblio/bibtex/contrib/urlbst/unsrturl.bst
new file mode 100644
index 0000000000..cc067e6c87
--- /dev/null
+++ b/biblio/bibtex/contrib/urlbst/unsrturl.bst
@@ -0,0 +1,1318 @@
+%%% Modification of BibTeX style file /usr/local/texlive/2019/texmf-dist/bibtex/bst/base/unsrt.bst
+%%% ... by urlbst, version 0.8 (marked with "% urlbst")
+%%% See <http://purl.org/nxg/dist/urlbst>
+%%% Modifications Copyright 2002-03, 2005-12, 2014, 2019, Norman Gray,
+%%% and distributed under the terms of the LPPL; see README for discussion.
+%%%
+%%% Added webpage entry type, and url and lastchecked fields.
+%%% Added eprint support.
+%%% Added DOI support.
+%%% Added PUBMED support.
+%%% Added hyperref support.
+%%% Original headers follow...
+
+% BibTeX standard bibliography style `unsrt'
+ % Version 0.99b (8-Dec-10 release) for BibTeX versions 0.99a or later.
+ % Copyright (C) 1984, 1985, 1988, 2010 Howard Trickey and Oren Patashnik.
+ % Unlimited copying and redistribution of this file are permitted as long as
+ % it is unmodified. Modifications (and redistribution of modified versions)
+ % are also permitted, but only if the resulting file is renamed to something
+ % besides btxbst.doc, plain.bst, unsrt.bst, alpha.bst, and abbrv.bst.
+ % This restriction helps ensure that all standard styles are identical.
+ % The file btxbst.doc has the documentation for this style.
+
+ENTRY
+ { address
+ author
+ booktitle
+ chapter
+ edition
+ editor
+ howpublished
+ institution
+ journal
+ key
+ month
+ note
+ number
+ organization
+ pages
+ publisher
+ school
+ series
+ title
+ type
+ volume
+ year
+ eprint % urlbst
+ doi % urlbst
+ pubmed % urlbst
+ url % urlbst
+ lastchecked % urlbst
+ }
+ {}
+ { label }
+
+INTEGERS { output.state before.all mid.sentence after.sentence after.block }
+
+% urlbst...
+% urlbst constants and state variables
+STRINGS { urlintro
+ eprinturl eprintprefix doiprefix doiurl pubmedprefix pubmedurl
+ citedstring onlinestring linktextstring
+ openinlinelink closeinlinelink }
+INTEGERS { hrefform inlinelinks makeinlinelink
+ addeprints adddoiresolver addpubmedresolver }
+FUNCTION {init.urlbst.variables}
+{
+ % The following constants may be adjusted by hand, if desired
+
+ % The first set allow you to enable or disable certain functionality.
+ #1 'addeprints := % 0=no eprints; 1=include eprints
+ #1 'adddoiresolver := % 0=no DOI resolver; 1=include it
+ #1 'addpubmedresolver := % 0=no PUBMED resolver; 1=include it
+ #2 'hrefform := % 0=no crossrefs; 1=hypertex xrefs; 2=hyperref refs
+ #0 'inlinelinks := % 0=URLs explicit; 1=URLs attached to titles
+
+ % String constants, which you _might_ want to tweak.
+ "URL: " 'urlintro := % prefix before URL; typically "Available from:" or "URL":
+ "online" 'onlinestring := % indication that resource is online; typically "online"
+ "cited " 'citedstring := % indicator of citation date; typically "cited "
+ "[link]" 'linktextstring := % dummy link text; typically "[link]"
+ "http://arxiv.org/abs/" 'eprinturl := % prefix to make URL from eprint ref
+ "arXiv:" 'eprintprefix := % text prefix printed before eprint ref; typically "arXiv:"
+ "https://doi.org/" 'doiurl := % prefix to make URL from DOI
+ "doi:" 'doiprefix := % text prefix printed before DOI ref; typically "doi:"
+ "http://www.ncbi.nlm.nih.gov/pubmed/" 'pubmedurl := % prefix to make URL from PUBMED
+ "PMID:" 'pubmedprefix := % text prefix printed before PUBMED ref; typically "PMID:"
+
+ % The following are internal state variables, not configuration constants,
+ % so they shouldn't be fiddled with.
+ #0 'makeinlinelink := % state variable managed by possibly.setup.inlinelink
+ "" 'openinlinelink := % ditto
+ "" 'closeinlinelink := % ditto
+}
+INTEGERS {
+ bracket.state
+ outside.brackets
+ open.brackets
+ within.brackets
+ close.brackets
+}
+% ...urlbst to here
+FUNCTION {init.state.consts}
+{ #0 'outside.brackets := % urlbst...
+ #1 'open.brackets :=
+ #2 'within.brackets :=
+ #3 'close.brackets := % ...urlbst to here
+
+ #0 'before.all :=
+ #1 'mid.sentence :=
+ #2 'after.sentence :=
+ #3 'after.block :=
+}
+
+STRINGS { s t }
+
+% urlbst
+FUNCTION {output.nonnull.original}
+{ 's :=
+ output.state mid.sentence =
+ { ", " * write$ }
+ { output.state after.block =
+ { add.period$ write$
+ newline$
+ "\newblock " write$
+ }
+ { output.state before.all =
+ 'write$
+ { add.period$ " " * write$ }
+ if$
+ }
+ if$
+ mid.sentence 'output.state :=
+ }
+ if$
+ s
+}
+
+% urlbst...
+% The following three functions are for handling inlinelink. They wrap
+% a block of text which is potentially output with write$ by multiple
+% other functions, so we don't know the content a priori.
+% They communicate between each other using the variables makeinlinelink
+% (which is true if a link should be made), and closeinlinelink (which holds
+% the string which should close any current link. They can be called
+% at any time, but start.inlinelink will be a no-op unless something has
+% previously set makeinlinelink true, and the two ...end.inlinelink functions
+% will only do their stuff if start.inlinelink has previously set
+% closeinlinelink to be non-empty.
+% (thanks to 'ijvm' for suggested code here)
+FUNCTION {uand}
+{ 'skip$ { pop$ #0 } if$ } % 'and' (which isn't defined at this point in the file)
+FUNCTION {possibly.setup.inlinelink}
+{ makeinlinelink hrefform #0 > uand
+ { doi empty$ adddoiresolver uand
+ { pubmed empty$ addpubmedresolver uand
+ { eprint empty$ addeprints uand
+ { url empty$
+ { "" }
+ { url }
+ if$ }
+ { eprinturl eprint * }
+ if$ }
+ { pubmedurl pubmed * }
+ if$ }
+ { doiurl doi * }
+ if$
+ % an appropriately-formatted URL is now on the stack
+ hrefform #1 = % hypertex
+ { "\special {html:<a href=" quote$ * swap$ * quote$ * "> }{" * 'openinlinelink :=
+ "\special {html:</a>}" 'closeinlinelink := }
+ { "\href {" swap$ * "} {" * 'openinlinelink := % hrefform=#2 -- hyperref
+ % the space between "} {" matters: a URL of just the right length can cause "\% newline em"
+ "}" 'closeinlinelink := }
+ if$
+ #0 'makeinlinelink :=
+ }
+ 'skip$
+ if$ % makeinlinelink
+}
+FUNCTION {add.inlinelink}
+{ openinlinelink empty$
+ 'skip$
+ { openinlinelink swap$ * closeinlinelink *
+ "" 'openinlinelink :=
+ }
+ if$
+}
+FUNCTION {output.nonnull}
+{ % Save the thing we've been asked to output
+ 's :=
+ % If the bracket-state is close.brackets, then add a close-bracket to
+ % what is currently at the top of the stack, and set bracket.state
+ % to outside.brackets
+ bracket.state close.brackets =
+ { "]" *
+ outside.brackets 'bracket.state :=
+ }
+ 'skip$
+ if$
+ bracket.state outside.brackets =
+ { % We're outside all brackets -- this is the normal situation.
+ % Write out what's currently at the top of the stack, using the
+ % original output.nonnull function.
+ s
+ add.inlinelink
+ output.nonnull.original % invoke the original output.nonnull
+ }
+ { % Still in brackets. Add open-bracket or (continuation) comma, add the
+ % new text (in s) to the top of the stack, and move to the close-brackets
+ % state, ready for next time (unless inbrackets resets it). If we come
+ % into this branch, then output.state is carefully undisturbed.
+ bracket.state open.brackets =
+ { " [" * }
+ { ", " * } % bracket.state will be within.brackets
+ if$
+ s *
+ close.brackets 'bracket.state :=
+ }
+ if$
+}
+
+% Call this function just before adding something which should be presented in
+% brackets. bracket.state is handled specially within output.nonnull.
+FUNCTION {inbrackets}
+{ bracket.state close.brackets =
+ { within.brackets 'bracket.state := } % reset the state: not open nor closed
+ { open.brackets 'bracket.state := }
+ if$
+}
+
+FUNCTION {format.lastchecked}
+{ lastchecked empty$
+ { "" }
+ { inbrackets citedstring lastchecked * }
+ if$
+}
+% ...urlbst to here
+
+FUNCTION {output}
+{ duplicate$ empty$
+ 'pop$
+ 'output.nonnull
+ if$
+}
+
+FUNCTION {output.check}
+{ 't :=
+ duplicate$ empty$
+ { pop$ "empty " t * " in " * cite$ * warning$ }
+ 'output.nonnull
+ if$
+}
+
+FUNCTION {output.bibitem.original} % urlbst (renamed from output.bibitem, so it can be wrapped below)
+{ newline$
+ "\bibitem{" write$
+ cite$ write$
+ "}" write$
+ newline$
+ ""
+ before.all 'output.state :=
+}
+
+FUNCTION {fin.entry.original} % urlbst (renamed from fin.entry, so it can be wrapped below)
+{ add.period$
+ write$
+ newline$
+}
+
+FUNCTION {new.block}
+{ output.state before.all =
+ 'skip$
+ { after.block 'output.state := }
+ if$
+}
+
+FUNCTION {new.sentence}
+{ output.state after.block =
+ 'skip$
+ { output.state before.all =
+ 'skip$
+ { after.sentence 'output.state := }
+ if$
+ }
+ if$
+}
+
+FUNCTION {not}
+{ { #0 }
+ { #1 }
+ if$
+}
+
+FUNCTION {and}
+{ 'skip$
+ { pop$ #0 }
+ if$
+}
+
+FUNCTION {or}
+{ { pop$ #1 }
+ 'skip$
+ if$
+}
+
+FUNCTION {new.block.checka}
+{ empty$
+ 'skip$
+ 'new.block
+ if$
+}
+
+FUNCTION {new.block.checkb}
+{ empty$
+ swap$ empty$
+ and
+ 'skip$
+ 'new.block
+ if$
+}
+
+FUNCTION {new.sentence.checka}
+{ empty$
+ 'skip$
+ 'new.sentence
+ if$
+}
+
+FUNCTION {new.sentence.checkb}
+{ empty$
+ swap$ empty$
+ and
+ 'skip$
+ 'new.sentence
+ if$
+}
+
+FUNCTION {field.or.null}
+{ duplicate$ empty$
+ { pop$ "" }
+ 'skip$
+ if$
+}
+
+FUNCTION {emphasize}
+{ duplicate$ empty$
+ { pop$ "" }
+ { "{\em " swap$ * "}" * }
+ if$
+}
+
+INTEGERS { nameptr namesleft numnames }
+
+FUNCTION {format.names}
+{ 's :=
+ #1 'nameptr :=
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ { s nameptr "{ff~}{vv~}{ll}{, jj}" format.name$ 't :=
+ nameptr #1 >
+ { namesleft #1 >
+ { ", " * t * }
+ { numnames #2 >
+ { "," * }
+ 'skip$
+ if$
+ t "others" =
+ { " et~al." * }
+ { " and " * t * }
+ if$
+ }
+ if$
+ }
+ 't
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+}
+
+FUNCTION {format.authors}
+{ author empty$
+ { "" }
+ { author format.names }
+ if$
+}
+
+FUNCTION {format.editors}
+{ editor empty$
+ { "" }
+ { editor format.names
+ editor num.names$ #1 >
+ { ", editors" * }
+ { ", editor" * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.title}
+{ title empty$
+ { "" }
+ { title "t" change.case$ }
+ if$
+}
+
+FUNCTION {n.dashify}
+{ 't :=
+ ""
+ { t empty$ not }
+ { t #1 #1 substring$ "-" =
+ { t #1 #2 substring$ "--" = not
+ { "--" *
+ t #2 global.max$ substring$ 't :=
+ }
+ { { t #1 #1 substring$ "-" = }
+ { "-" *
+ t #2 global.max$ substring$ 't :=
+ }
+ while$
+ }
+ if$
+ }
+ { t #1 #1 substring$ *
+ t #2 global.max$ substring$ 't :=
+ }
+ if$
+ }
+ while$
+}
+
+FUNCTION {format.date}
+{ year empty$
+ { month empty$
+ { "" }
+ { "there's a month but no year in " cite$ * warning$
+ month
+ }
+ if$
+ }
+ { month empty$
+ 'year
+ { month " " * year * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.btitle}
+{ title emphasize
+}
+
+FUNCTION {tie.or.space.connect}
+{ duplicate$ text.length$ #3 <
+ { "~" }
+ { " " }
+ if$
+ swap$ * *
+}
+
+FUNCTION {either.or.check}
+{ empty$
+ 'pop$
+ { "can't use both " swap$ * " fields in " * cite$ * warning$ }
+ if$
+}
+
+FUNCTION {format.bvolume}
+{ volume empty$
+ { "" }
+ { "volume" volume tie.or.space.connect
+ series empty$
+ 'skip$
+ { " of " * series emphasize * }
+ if$
+ "volume and number" number either.or.check
+ }
+ if$
+}
+
+FUNCTION {format.number.series}
+{ volume empty$
+ { number empty$
+ { series field.or.null }
+ { output.state mid.sentence =
+ { "number" }
+ { "Number" }
+ if$
+ number tie.or.space.connect
+ series empty$
+ { "there's a number but no series in " cite$ * warning$ }
+ { " in " * series * }
+ if$
+ }
+ if$
+ }
+ { "" }
+ if$
+}
+
+FUNCTION {format.edition}
+{ edition empty$
+ { "" }
+ { output.state mid.sentence =
+ { edition "l" change.case$ " edition" * }
+ { edition "t" change.case$ " edition" * }
+ if$
+ }
+ if$
+}
+
+INTEGERS { multiresult }
+
+FUNCTION {multi.page.check}
+{ 't :=
+ #0 'multiresult :=
+ { multiresult not
+ t empty$ not
+ and
+ }
+ { t #1 #1 substring$
+ duplicate$ "-" =
+ swap$ duplicate$ "," =
+ swap$ "+" =
+ or or
+ { #1 'multiresult := }
+ { t #2 global.max$ substring$ 't := }
+ if$
+ }
+ while$
+ multiresult
+}
+
+FUNCTION {format.pages}
+{ pages empty$
+ { "" }
+ { pages multi.page.check
+ { "pages" pages n.dashify tie.or.space.connect }
+ { "page" pages tie.or.space.connect }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.vol.num.pages}
+{ volume field.or.null
+ number empty$
+ 'skip$
+ { "(" number * ")" * *
+ volume empty$
+ { "there's a number but no volume in " cite$ * warning$ }
+ 'skip$
+ if$
+ }
+ if$
+ pages empty$
+ 'skip$
+ { duplicate$ empty$
+ { pop$ format.pages }
+ { ":" * pages n.dashify * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.chapter.pages}
+{ chapter empty$
+ 'format.pages
+ { type empty$
+ { "chapter" }
+ { type "l" change.case$ }
+ if$
+ chapter tie.or.space.connect
+ pages empty$
+ 'skip$
+ { ", " * format.pages * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.in.ed.booktitle}
+{ booktitle empty$
+ { "" }
+ { editor empty$
+ { "In " booktitle emphasize * }
+ { "In " format.editors * ", " * booktitle emphasize * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {empty.misc.check}
+{ author empty$ title empty$ howpublished empty$
+ month empty$ year empty$ note empty$
+ and and and and and
+ { "all relevant fields are empty in " cite$ * warning$ }
+ 'skip$
+ if$
+}
+
+FUNCTION {format.thesis.type}
+{ type empty$
+ 'skip$
+ { pop$
+ type "t" change.case$
+ }
+ if$
+}
+
+FUNCTION {format.tr.number}
+{ type empty$
+ { "Technical Report" }
+ 'type
+ if$
+ number empty$
+ { "t" change.case$ }
+ { number tie.or.space.connect }
+ if$
+}
+
+FUNCTION {format.article.crossref}
+{ key empty$
+ { journal empty$
+ { "need key or journal for " cite$ * " to crossref " * crossref *
+ warning$
+ ""
+ }
+ { "In {\em " journal * "\/}" * }
+ if$
+ }
+ { "In " key * }
+ if$
+ " \cite{" * crossref * "}" *
+}
+
+FUNCTION {format.crossref.editor}
+{ editor #1 "{vv~}{ll}" format.name$
+ editor num.names$ duplicate$
+ #2 >
+ { pop$ " et~al." * }
+ { #2 <
+ 'skip$
+ { editor #2 "{ff }{vv }{ll}{ jj}" format.name$ "others" =
+ { " et~al." * }
+ { " and " * editor #2 "{vv~}{ll}" format.name$ * }
+ if$
+ }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.book.crossref}
+{ volume empty$
+ { "empty volume in " cite$ * "'s crossref of " * crossref * warning$
+ "In "
+ }
+ { "Volume" volume tie.or.space.connect
+ " of " *
+ }
+ if$
+ editor empty$
+ editor field.or.null author field.or.null =
+ or
+ { key empty$
+ { series empty$
+ { "need editor, key, or series for " cite$ * " to crossref " *
+ crossref * warning$
+ "" *
+ }
+ { "{\em " * series * "\/}" * }
+ if$
+ }
+ { key * }
+ if$
+ }
+ { format.crossref.editor * }
+ if$
+ " \cite{" * crossref * "}" *
+}
+
+FUNCTION {format.incoll.inproc.crossref}
+{ editor empty$
+ editor field.or.null author field.or.null =
+ or
+ { key empty$
+ { booktitle empty$
+ { "need editor, key, or booktitle for " cite$ * " to crossref " *
+ crossref * warning$
+ ""
+ }
+ { "In {\em " booktitle * "\/}" * }
+ if$
+ }
+ { "In " key * }
+ if$
+ }
+ { "In " format.crossref.editor * }
+ if$
+ " \cite{" * crossref * "}" *
+}
+
+% urlbst...
+% Functions for making hypertext links.
+% In all cases, the stack has (link-text href-url)
+%
+% make 'null' specials
+FUNCTION {make.href.null}
+{
+ pop$
+}
+% make hypertex specials
+FUNCTION {make.href.hypertex}
+{
+ "\special {html:<a href=" quote$ *
+ swap$ * quote$ * "> }" * swap$ *
+ "\special {html:</a>}" *
+}
+% make hyperref specials
+FUNCTION {make.href.hyperref}
+{
+ "\href {" swap$ * "} {\path{" * swap$ * "}}" *
+}
+FUNCTION {make.href}
+{ hrefform #2 =
+ 'make.href.hyperref % hrefform = 2
+ { hrefform #1 =
+ 'make.href.hypertex % hrefform = 1
+ 'make.href.null % hrefform = 0 (or anything else)
+ if$
+ }
+ if$
+}
+
+% If inlinelinks is true, then format.url should be a no-op, since it's
+% (a) redundant, and (b) could end up as a link-within-a-link.
+FUNCTION {format.url}
+{ inlinelinks #1 = url empty$ or
+ { "" }
+ { hrefform #1 =
+ { % special case -- add HyperTeX specials
+ urlintro "\url{" url * "}" * url make.href.hypertex * }
+ { urlintro "\url{" * url * "}" * }
+ if$
+ }
+ if$
+}
+FUNCTION {format.eprint}
+{ eprint empty$
+ { "" }
+ { eprintprefix eprint * eprinturl eprint * make.href }
+ if$
+}
+
+FUNCTION {format.doi}
+{ doi empty$
+ { "" }
+ { doiprefix doi * doiurl doi * make.href }
+ if$
+}
+
+FUNCTION {format.pubmed}
+{ pubmed empty$
+ { "" }
+ { pubmedprefix pubmed * pubmedurl pubmed * make.href }
+ if$
+}
+
+% Output a URL. We can't use the more normal idiom (something like
+% `format.url output'), because the `inbrackets' within
+% format.lastchecked applies to everything between calls to `output',
+% so that `format.url format.lastchecked * output' ends up with both
+% the URL and the lastchecked in brackets.
+FUNCTION {output.url}
+{ url empty$
+ 'skip$
+ { new.block
+ format.url output
+ format.lastchecked output
+ }
+ if$
+}
+
+FUNCTION {output.web.refs}
+{
+ new.block
+ inlinelinks
+ 'skip$ % links were inline -- don't repeat them
+ { % If the generated DOI will be the same as the URL,
+ % then don't print the URL (thanks to Joseph Wright for this code,
+ % at http://tex.stackexchange.com/questions/5660)
+ adddoiresolver
+ doiurl doi empty$ { "X" } { doi } if$ * % DOI URL to be generated
+ url empty$ { "Y" } { url } if$ % the URL, or "Y" if empty
+ = % are the strings equal?
+ and
+ 'skip$
+ { output.url }
+ if$
+ addeprints eprint empty$ not and
+ { format.eprint output.nonnull }
+ 'skip$
+ if$
+ adddoiresolver doi empty$ not and
+ { format.doi output.nonnull }
+ 'skip$
+ if$
+ addpubmedresolver pubmed empty$ not and
+ { format.pubmed output.nonnull }
+ 'skip$
+ if$
+ }
+ if$
+}
+
+% Wrapper for output.bibitem.original.
+% If the URL field is not empty, set makeinlinelink to be true,
+% so that an inline link will be started at the next opportunity
+FUNCTION {output.bibitem}
+{ outside.brackets 'bracket.state :=
+ output.bibitem.original
+ inlinelinks url empty$ not doi empty$ not or pubmed empty$ not or eprint empty$ not or and
+ { #1 'makeinlinelink := }
+ { #0 'makeinlinelink := }
+ if$
+}
+
+% Wrapper for fin.entry.original
+FUNCTION {fin.entry}
+{ output.web.refs % urlbst
+ makeinlinelink % ooops, it appears we didn't have a title for inlinelink
+ { possibly.setup.inlinelink % add some artificial link text here, as a fallback
+ linktextstring output.nonnull }
+ 'skip$
+ if$
+ bracket.state close.brackets = % urlbst
+ { "]" * }
+ 'skip$
+ if$
+ fin.entry.original
+}
+
+% Webpage entry type.
+% Title and url fields required;
+% author, note, year, month, and lastchecked fields optional
+% See references
+% ISO 690-2 http://www.nlc-bnc.ca/iso/tc46sc9/standard/690-2e.htm
+% http://www.classroom.net/classroom/CitingNetResources.html
+% http://neal.ctstateu.edu/history/cite.html
+% http://www.cas.usf.edu/english/walker/mla.html
+% for citation formats for web pages.
+FUNCTION {webpage}
+{ output.bibitem
+ author empty$
+ { editor empty$
+ 'skip$ % author and editor both optional
+ { format.editors output.nonnull }
+ if$
+ }
+ { editor empty$
+ { format.authors output.nonnull }
+ { "can't use both author and editor fields in " cite$ * warning$ }
+ if$
+ }
+ if$
+ new.block
+ title empty$ 'skip$ 'possibly.setup.inlinelink if$
+ format.title "title" output.check
+ inbrackets onlinestring output
+ new.block
+ year empty$
+ 'skip$
+ { format.date "year" output.check }
+ if$
+ % We don't need to output the URL details ('lastchecked' and 'url'),
+ % because fin.entry does that for us, using output.web.refs. The only
+ % reason we would want to put them here is if we were to decide that
+ % they should go in front of the rather miscellaneous information in 'note'.
+ new.block
+ note output
+ fin.entry
+}
+% ...urlbst to here
+
+
+FUNCTION {article}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ title empty$ 'skip$ 'possibly.setup.inlinelink if$ % urlbst
+ format.title "title" output.check
+ new.block
+ crossref missing$
+ { journal emphasize "journal" output.check
+ possibly.setup.inlinelink format.vol.num.pages output% urlbst
+ format.date "year" output.check
+ }
+ { format.article.crossref output.nonnull
+ format.pages output
+ }
+ if$
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {book}
+{ output.bibitem
+ author empty$
+ { format.editors "author and editor" output.check }
+ { format.authors output.nonnull
+ crossref missing$
+ { "author and editor" editor either.or.check }
+ 'skip$
+ if$
+ }
+ if$
+ new.block
+ title empty$ 'skip$ 'possibly.setup.inlinelink if$ % urlbst
+ format.btitle "title" output.check
+ crossref missing$
+ { format.bvolume output
+ new.block
+ format.number.series output
+ new.sentence
+ publisher "publisher" output.check
+ address output
+ }
+ { new.block
+ format.book.crossref output.nonnull
+ }
+ if$
+ format.edition output
+ format.date "year" output.check
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {booklet}
+{ output.bibitem
+ format.authors output
+ new.block
+ title empty$ 'skip$ 'possibly.setup.inlinelink if$ % urlbst
+ format.title "title" output.check
+ howpublished address new.block.checkb
+ howpublished output
+ address output
+ format.date output
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {inbook}
+{ output.bibitem
+ author empty$
+ { format.editors "author and editor" output.check }
+ { format.authors output.nonnull
+ crossref missing$
+ { "author and editor" editor either.or.check }
+ 'skip$
+ if$
+ }
+ if$
+ new.block
+ title empty$ 'skip$ 'possibly.setup.inlinelink if$ % urlbst
+ format.btitle "title" output.check
+ crossref missing$
+ { format.bvolume output
+ format.chapter.pages "chapter and pages" output.check
+ new.block
+ format.number.series output
+ new.sentence
+ publisher "publisher" output.check
+ address output
+ }
+ { format.chapter.pages "chapter and pages" output.check
+ new.block
+ format.book.crossref output.nonnull
+ }
+ if$
+ format.edition output
+ format.date "year" output.check
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {incollection}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ title empty$ 'skip$ 'possibly.setup.inlinelink if$ % urlbst
+ format.title "title" output.check
+ new.block
+ crossref missing$
+ { format.in.ed.booktitle "booktitle" output.check
+ format.bvolume output
+ format.number.series output
+ format.chapter.pages output
+ new.sentence
+ publisher "publisher" output.check
+ address output
+ format.edition output
+ format.date "year" output.check
+ }
+ { format.incoll.inproc.crossref output.nonnull
+ format.chapter.pages output
+ }
+ if$
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {inproceedings}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ title empty$ 'skip$ 'possibly.setup.inlinelink if$ % urlbst
+ format.title "title" output.check
+ new.block
+ crossref missing$
+ { format.in.ed.booktitle "booktitle" output.check
+ format.bvolume output
+ format.number.series output
+ format.pages output
+ address empty$
+ { organization publisher new.sentence.checkb
+ organization output
+ publisher output
+ format.date "year" output.check
+ }
+ { address output.nonnull
+ format.date "year" output.check
+ new.sentence
+ organization output
+ publisher output
+ }
+ if$
+ }
+ { format.incoll.inproc.crossref output.nonnull
+ format.pages output
+ }
+ if$
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {conference} { inproceedings }
+
+FUNCTION {manual}
+{ output.bibitem
+ author empty$
+ { organization empty$
+ 'skip$
+ { organization output.nonnull
+ address output
+ }
+ if$
+ }
+ { format.authors output.nonnull }
+ if$
+ new.block
+ title empty$ 'skip$ 'possibly.setup.inlinelink if$ % urlbst
+ format.btitle "title" output.check
+ author empty$
+ { organization empty$
+ { address new.block.checka
+ address output
+ }
+ 'skip$
+ if$
+ }
+ { organization address new.block.checkb
+ organization output
+ address output
+ }
+ if$
+ format.edition output
+ format.date output
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {mastersthesis}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ title empty$ 'skip$ 'possibly.setup.inlinelink if$ % urlbst
+ format.title "title" output.check
+ new.block
+ "Master's thesis" format.thesis.type output.nonnull
+ school "school" output.check
+ address output
+ format.date "year" output.check
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {misc}
+{ output.bibitem
+ format.authors output
+ title howpublished new.block.checkb
+ title empty$ 'skip$ 'possibly.setup.inlinelink if$ % urlbst
+ format.title output
+ howpublished new.block.checka
+ howpublished output
+ format.date output
+ new.block
+ note output
+ fin.entry
+ empty.misc.check
+}
+
+FUNCTION {phdthesis}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ title empty$ 'skip$ 'possibly.setup.inlinelink if$ % urlbst
+ format.btitle "title" output.check
+ new.block
+ "PhD thesis" format.thesis.type output.nonnull
+ school "school" output.check
+ address output
+ format.date "year" output.check
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {proceedings}
+{ output.bibitem
+ editor empty$
+ { organization output }
+ { format.editors output.nonnull }
+ if$
+ new.block
+ title empty$ 'skip$ 'possibly.setup.inlinelink if$ % urlbst
+ format.btitle "title" output.check
+ format.bvolume output
+ format.number.series output
+ address empty$
+ { editor empty$
+ { publisher new.sentence.checka }
+ { organization publisher new.sentence.checkb
+ organization output
+ }
+ if$
+ publisher output
+ format.date "year" output.check
+ }
+ { address output.nonnull
+ format.date "year" output.check
+ new.sentence
+ editor empty$
+ 'skip$
+ { organization output }
+ if$
+ publisher output
+ }
+ if$
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {techreport}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ title empty$ 'skip$ 'possibly.setup.inlinelink if$ % urlbst
+ format.title "title" output.check
+ new.block
+ format.tr.number output.nonnull
+ institution "institution" output.check
+ address output
+ format.date "year" output.check
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {unpublished}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ title empty$ 'skip$ 'possibly.setup.inlinelink if$ % urlbst
+ format.title "title" output.check
+ new.block
+ note "note" output.check
+ format.date output
+ fin.entry
+}
+
+FUNCTION {default.type} { misc }
+
+MACRO {jan} {"January"}
+
+MACRO {feb} {"February"}
+
+MACRO {mar} {"March"}
+
+MACRO {apr} {"April"}
+
+MACRO {may} {"May"}
+
+MACRO {jun} {"June"}
+
+MACRO {jul} {"July"}
+
+MACRO {aug} {"August"}
+
+MACRO {sep} {"September"}
+
+MACRO {oct} {"October"}
+
+MACRO {nov} {"November"}
+
+MACRO {dec} {"December"}
+
+MACRO {acmcs} {"ACM Computing Surveys"}
+
+MACRO {acta} {"Acta Informatica"}
+
+MACRO {cacm} {"Communications of the ACM"}
+
+MACRO {ibmjrd} {"IBM Journal of Research and Development"}
+
+MACRO {ibmsj} {"IBM Systems Journal"}
+
+MACRO {ieeese} {"IEEE Transactions on Software Engineering"}
+
+MACRO {ieeetc} {"IEEE Transactions on Computers"}
+
+MACRO {ieeetcad}
+ {"IEEE Transactions on Computer-Aided Design of Integrated Circuits"}
+
+MACRO {ipl} {"Information Processing Letters"}
+
+MACRO {jacm} {"Journal of the ACM"}
+
+MACRO {jcss} {"Journal of Computer and System Sciences"}
+
+MACRO {scp} {"Science of Computer Programming"}
+
+MACRO {sicomp} {"SIAM Journal on Computing"}
+
+MACRO {tocs} {"ACM Transactions on Computer Systems"}
+
+MACRO {tods} {"ACM Transactions on Database Systems"}
+
+MACRO {tog} {"ACM Transactions on Graphics"}
+
+MACRO {toms} {"ACM Transactions on Mathematical Software"}
+
+MACRO {toois} {"ACM Transactions on Office Information Systems"}
+
+MACRO {toplas} {"ACM Transactions on Programming Languages and Systems"}
+
+MACRO {tcs} {"Theoretical Computer Science"}
+
+READ
+
+STRINGS { longest.label }
+
+INTEGERS { number.label longest.label.width }
+
+FUNCTION {initialize.longest.label}
+{ "" 'longest.label :=
+ #1 'number.label :=
+ #0 'longest.label.width :=
+}
+
+FUNCTION {longest.label.pass}
+{ number.label int.to.str$ 'label :=
+ number.label #1 + 'number.label :=
+ label width$ longest.label.width >
+ { label 'longest.label :=
+ label width$ 'longest.label.width :=
+ }
+ 'skip$
+ if$
+}
+
+EXECUTE {initialize.longest.label}
+
+ITERATE {longest.label.pass}
+
+FUNCTION {begin.bib}
+{ preamble$ empty$
+ 'skip$
+ { preamble$ write$ newline$ }
+ if$
+ "\begin{thebibliography}{" longest.label * "}" * write$ newline$
+}
+
+EXECUTE {begin.bib}
+
+EXECUTE {init.urlbst.variables} % urlbst
+EXECUTE {init.state.consts}
+
+ITERATE {call.type$}
+
+FUNCTION {end.bib}
+{ newline$
+ "\end{thebibliography}" write$ newline$
+}
+
+EXECUTE {end.bib}
diff --git a/biblio/bibtex/contrib/urlbst/urlbst b/biblio/bibtex/contrib/urlbst/urlbst
new file mode 100644
index 0000000000..c917d02f1d
--- /dev/null
+++ b/biblio/bibtex/contrib/urlbst/urlbst
@@ -0,0 +1,889 @@
+#! /usr/bin/perl -w
+#
+# Usage: ./urlbst.pl [--eprint] [--doi] [--pubmed]
+# [--nohyperlinks] [--inlinelinks] [--hypertex] [--hyperref]
+# [input-file [output-file]]
+# If either input-file or output-file is omitted, they are replaced by
+# stdin or stdout respectively.
+#
+# See http://purl.org/nxg/dist/urlbst for documentation
+#
+# Copyright 2002-03, 2005-12, 2014, 2019, Norman Gray <http://nxg.me.uk>
+#
+# This program is distributed under the terms of the
+# GNU General Public Licence, v2.0.
+# The modifications to the input .bst files are asserted as Copyright 2002-03, 2005-12, 2014, 2019, Norman Gray,
+# and distributed under the terms of the LaTeX Project Public Licence.
+# See the package README for further dicussion of licences.
+
+$version = '0.8';
+($progname = $0) =~ s/.*\///;
+$mymarker = "% $progname";
+$mymarkerend = "% ...$progname to here";
+$myurl = 'http://purl.org/nxg/dist/urlbst';
+
+
+$infile = '-';
+$outfile = '-';
+
+$addeprints = 1; # if true (nonzero) we add support for eprints
+$literals{eprintprefix} = 'arXiv:'; # make these settable with --eprint? syntax?
+$eprinturl = 'http://arxiv.org/abs/';
+
+$adddoiresolver = 1;
+$literals{doiprefix} = 'doi:';
+$doiurl = 'https://doi.org/';
+
+$addpubmedresolver = 1;
+$literals{pubmedprefix} = 'PMID:';
+$pubmedurl = 'http://www.ncbi.nlm.nih.gov/pubmed/';
+
+$makehref = 0;
+$literals{urlintro} = "URL: ";
+$inlinelinks = 0;
+
+$literals{online} = "online";
+$literals{cited} = "cited ";
+$literals{linktext} = "[link]";
+
+$automatic_output_filename = 0;
+
+$Usage = "$progname [--eprint] [--doi] [--pubmed]\n [--nohyperlinks] [--[no]inlinelinks] [--hypertex] [--hyperref]\n [--literal key=value]\n [--help] [input-file [output-file]]";
+
+# Magic environment variable: if this is set, then we're being called from a Platypus wrapper
+# See http://www.sveinbjorn.org/platypus
+if ($ENV{"CALLED_FROM_PLATYPUS"}) {
+ $automatic_output_filename = 1;
+}
+
+while ($#ARGV >= 0) {
+ if ($ARGV[0] eq '--eprint') {
+ $addeprints = 1;
+ } elsif ($ARGV[0] eq '--noeprint') {
+ $addeprints = 0;
+ } elsif ($ARGV[0] eq '--doi') {
+ $adddoiresolver = 1;
+ } elsif ($ARGV[0] eq '--nodoi') {
+ $adddoiresolver = 0;
+ } elsif ($ARGV[0] eq '--pubmed') {
+ $addpubmedresolver = 1;
+ } elsif ($ARGV[0] eq '--nopubmed') {
+ $addpubmedresolver = 0;
+ } elsif ($ARGV[0] eq '--nohyperlinks') {
+ $makehref = 0;
+ } elsif ($ARGV[0] eq '--hypertex') {
+ $makehref = 1;
+ } elsif ($ARGV[0] eq '--hyperref') {
+ $makehref = 2;
+ } elsif ($ARGV[0] eq '--inlinelinks') {
+ $inlinelinks = 1;
+ } elsif ($ARGV[0] eq '--noinlinelinks') {
+ $inlinelinks = 0;
+ } elsif ($ARGV[0] eq '--automatic-output') {
+ $automatic_output_filename = 1;
+ } elsif ($ARGV[0] eq '--literal') {
+ shift;
+ my $showstrings = 0;
+ if ((($k, $v) = ($ARGV[0] =~ /^(\w+)=(.*)/)) && exists $literals{$k}) {
+ $literals{$k} = $v;
+ } elsif ($ARGV[0] eq 'help') {
+ $showstrings = 1;
+ } else {
+ print "No literal found in $ARGV[0]; ignoring that\n";
+ $showstrings = 1;
+ }
+ if ($showstrings) {
+ print " Possible literal strings (and defaults) are...\n";
+ while (($k, $v) = each (%literals)) {
+ print " $k ($v)\n";
+ }
+ exit(0);
+ }
+ } elsif ($ARGV[0] eq '--help') {
+ print <<EOD;
+urlbst version $version
+ Usage: $Usage
+ --[no]eprint include support for `eprint' fields
+ --[no]doi include support for `doi' field
+ --[no]pubmed include support for `pubmed' field
+ --nohyperlinks do not include active links anywhere
+ --[no]inlinelinks add hyperlinks to entry titles
+ --hypertex include HyperTeX-style hyperlink support
+ --hyperref include {hyperref}-style hyperlink support
+ (generally better)
+ --literal key=value set one of the literal strings
+ (see `--literal help' for possibilities)
+ --help print this help
+ Input and output files may be given as `-' (default) to indicate stdin/out.
+
+EOD
+ printf(" Defaults:\n");
+ printf(" eprint refs %s\n", ($addeprints ? "included" : "not included"));
+ printf(" DOIs %s\n", ($adddoiresolver ? "included" : "not included"));
+ printf(" PUBMED refs %s\n", ($addpubmedresolver ? "included" : "not included"));
+ printf(" hyperlinks %s\n", ($makehref==0 ? "none" : $makehref==1 ? "hypertex" : "hyperref"));
+ printf(" inline links %s\n", ($inlinelinks ? "included" : "not included"));
+ exit(0);
+ } elsif ($ARGV[0] =~ /^-/) {
+ die "Unrecognised option $ARGV[0]: Usage: $Usage\n";
+ } elsif ($infile eq '-') {
+ $infile = $ARGV[0];
+ } elsif ($outfile eq '-') {
+ $outfile = $ARGV[0];
+ } else {
+ die "Usage: $Usage\n";
+ }
+ shift(@ARGV);
+}
+
+if ($inlinelinks && $makehref == 0) {
+ print <<'EOD';
+Warning: --inlinelinks and --nohyperlinks were both specified (possibly
+ implicitly). That combination makes no sense, so I'll ignore
+ --nohyperlinks and use --hyperref instead
+EOD
+ $makehref = 2;
+}
+
+if ($automatic_output_filename) {
+ if ($infile eq '-') {
+ print "ERROR: No input filename given with --automatic-output\n";
+ }
+ $outfile = $infile;
+ @outparts = split /\./, $outfile;
+ $ext = pop(@outparts);
+ $outfile=join('.', @outparts);
+ if ($outfile eq '') {
+ $outfile = $ext . '-url';
+ } else {
+ $outfile = $outfile . '-url.' . $ext;
+ }
+}
+
+$exitstatus = 0; # success status
+
+open (IN, "<$infile") || die "Can't open $infile to read";
+open (OUT, ">$outfile") || die "Can't open $outfile to write";
+
+# We have to make certain assumptions about the source files, in order
+# to patch them at the correct places. Specifically, we assume that
+#
+# - there's a function init.state.consts
+#
+# - ...and an output.nonnull which does the actual outputting, which
+# has the `usual' interface.
+#
+# - we can replace
+# fin.entry
+# by
+# new.block
+# output.url % the function which formats and displays any URL
+# fin.entry
+#
+# - there is a function which handles the `article' entry type (this
+# will always be true)
+#
+# - there is a function output.bibitem which is called at the
+# beginning of each entry type
+# - ...and one called fin.entry which is called at the end
+#
+# If the functions format.date, format.title or new.block are not defined (the
+# former is not in apalike, for example, and the last is not in the
+# AMS styles), then replacements are included in the output.
+#
+# All these assumptions are true of the standard files and, since most
+# style files derive from them more or less directly, are true of most (?)
+# other style files, too.
+#
+# There's some rather ugly Perl down here. The parsing for
+# brace-matching could probably do with being rewritten in places, to
+# make it less ugly, and more robust.
+
+print OUT "%%% Modification of BibTeX style file ", ($infile eq '-' ? '<stdin>' : $infile), "\n";
+print OUT "%%% ... by $progname, version $version (marked with \"$mymarker\")\n%%% See <$myurl>\n";
+print OUT "%%% Modifications Copyright 2002-03, 2005-12, 2014, 2019, Norman Gray,\n";
+print OUT "%%% and distributed under the terms of the LPPL; see README for discussion.\n";
+print OUT "%%%\n";
+print OUT "%%% Added webpage entry type, and url and lastchecked fields.\n";
+print OUT "%%% Added eprint support.\n" if ($addeprints);
+print OUT "%%% Added DOI support.\n" if ($adddoiresolver);
+print OUT "%%% Added PUBMED support.\n" if ($addpubmedresolver);
+print OUT "%%% Added HyperTeX support.\n" if ($makehref == 1);
+print OUT "%%% Added hyperref support.\n" if ($makehref == 2);
+print OUT "%%% Original headers follow...\n\n";
+
+$found{initconsts} = 0;
+$found{outputnonnull} = 0;
+$found{article} = 0;
+$found{outputbibitem} = 0;
+$found{finentry} = 0;
+$found{formatdate} = 0;
+$found{formattitle} = 0;
+$found{newblock} = 0;
+# The following are initialised negative, which Perl treats as true,
+# so the simple test 'if ($found{formateprint}) ...' will be true.
+$found{formateprint} = -1;
+$found{formatdoi} = -1;
+$found{formatpubmed} = -1;
+
+while (<IN>) {
+ /^ *%/ && do {
+ # Pass commented lines unchanged
+ print OUT;
+ next;
+ };
+
+ /^ *ENTRY/ && do {
+ # Work through the list of entry types, finding what ones are there.
+ # If we find a URL entry there already, object, since these edits
+ # will mess things up.
+ $line = $_;
+ until ($line =~ /\{\s*(\w*)/) {
+ $line .= <IN>;
+ }
+ $bracematchtotal = 0; # reset
+ bracematcher($line);
+ $line =~ /\{\s*(\w*)/;
+ $found{'entry'.$1} = 1;
+ print OUT $line;
+ $line = <IN>;
+ until (bracematcher($line) == 0) {
+ # XXX deal with multiple entries on one line
+ ($line =~ /^\s*(\w*)/) && ($found{'entry'.$1} = 1);
+ print OUT $line;
+ $line = <IN>;
+ }
+ if (defined($found{entryurl})) {
+ print STDERR "$progname: style file $infile already has URL entry!\n";
+ # print out the rest of the file, and give up
+ print OUT $line;
+ while (<IN>) {
+ print OUT;
+ }
+ $exitstatus = 1;
+ last;
+ } else {
+ print OUT " eprint $mymarker\n doi $mymarker\n pubmed $mymarker\n url $mymarker\n lastchecked $mymarker\n";
+ }
+ print OUT $line;
+ next;
+ };
+
+ /^ *FUNCTION *\{init\.state\.consts\}/ && do {
+ # In the init.state.consts function, add an extra set of
+ # constants at the beginning. Also use this as the marker for
+ # the place to add the init strings function.
+ print OUT <<EOD;
+$mymarker...
+% urlbst constants and state variables
+STRINGS { urlintro
+ eprinturl eprintprefix doiprefix doiurl pubmedprefix pubmedurl
+ citedstring onlinestring linktextstring
+ openinlinelink closeinlinelink }
+INTEGERS { hrefform inlinelinks makeinlinelink
+ addeprints adddoiresolver addpubmedresolver }
+FUNCTION {init.urlbst.variables}
+{
+ % The following constants may be adjusted by hand, if desired
+
+ % The first set allow you to enable or disable certain functionality.
+ #$addeprints 'addeprints := % 0=no eprints; 1=include eprints
+ #$adddoiresolver 'adddoiresolver := % 0=no DOI resolver; 1=include it
+ #$addpubmedresolver 'addpubmedresolver := % 0=no PUBMED resolver; 1=include it
+ #$makehref 'hrefform := % 0=no crossrefs; 1=hypertex xrefs; 2=hyperref refs
+ #$inlinelinks 'inlinelinks := % 0=URLs explicit; 1=URLs attached to titles
+
+ % String constants, which you _might_ want to tweak.
+ "$literals{urlintro}" 'urlintro := % prefix before URL; typically "Available from:" or "URL":
+ "$literals{online}" 'onlinestring := % indication that resource is online; typically "online"
+ "$literals{cited}" 'citedstring := % indicator of citation date; typically "cited "
+ "$literals{linktext}" 'linktextstring := % dummy link text; typically "[link]"
+ "$eprinturl" 'eprinturl := % prefix to make URL from eprint ref
+ "$literals{eprintprefix}" 'eprintprefix := % text prefix printed before eprint ref; typically "arXiv:"
+ "$doiurl" 'doiurl := % prefix to make URL from DOI
+ "$literals{doiprefix}" 'doiprefix := % text prefix printed before DOI ref; typically "doi:"
+ "$pubmedurl" 'pubmedurl := % prefix to make URL from PUBMED
+ "$literals{pubmedprefix}" 'pubmedprefix := % text prefix printed before PUBMED ref; typically "PMID:"
+
+ % The following are internal state variables, not configuration constants,
+ % so they shouldn't be fiddled with.
+ #0 'makeinlinelink := % state variable managed by possibly.setup.inlinelink
+ "" 'openinlinelink := % ditto
+ "" 'closeinlinelink := % ditto
+}
+INTEGERS {
+ bracket.state
+ outside.brackets
+ open.brackets
+ within.brackets
+ close.brackets
+}
+$mymarkerend
+EOD
+ $line = $_;
+ until ($line =~ /\{.*\}.*\{/s) {
+ $line .= <IN>;
+ }
+ $line =~ s/(\{.*?\}.*?\{)/$1 #0 'outside.brackets := $mymarker...
+ #1 'open.brackets :=
+ #2 'within.brackets :=
+ #3 'close.brackets := $mymarkerend
+
+ /s;
+ print OUT $line;
+ $found{initconsts} = 1;
+ next;
+ };
+
+ /^ *EXECUTE *\{init\.state\.consts\}/ && do {
+ print OUT "EXECUTE {init.urlbst.variables} $mymarker\n";
+ print OUT;
+ next;
+ };
+
+ /^ *FUNCTION *\{new.block\}/ && do {
+ $found{newblock} = 1;
+ };
+
+ /^ *FUNCTION *\{format.doi\}/ && do {
+ #print STDERR "$progname: style file $infile already supports DOIs; urlbst format.doi disabled\n(see generated .bst style: you may need to make edits near \$adddoiresolver)\n";
+ $found{formatdoi} = 1;
+ $adddoiresolver = 0;
+ };
+
+ /^ *FUNCTION *\{format.eprint\}/ && do {
+ #print STDERR "$progname: style file $infile already supports eprints; urlbst format.eprint disabled\n(see generated .bst style: you may need to make edits near \$addeprints)\n";
+ $found{formateprint} = 1;
+ $addeprints = 0;
+ };
+
+ /^ *FUNCTION *\{format.pubmed\}/ && do {
+ #print STDERR "$progname: style file $infile already supports Pubmed; urlbst format.pubmed disabled\n(see generated .bst style: you may need to make edits near \$addpubmedresolver)\n";
+ $found{formatpubmed} = 1;
+ $addpubmedresolver = 0;
+ };
+
+ /^ *FUNCTION *{output\.nonnull}/ && do {
+ print OUT "$mymarker\n";
+ print OUT "FUNCTION {output.nonnull.original}\n";
+ copy_block();
+ print_output_functions();
+ $found{outputnonnull} = 1;
+ next;
+ };
+
+ /FUNCTION *\{fin.entry\}/ && do {
+ # Rename fin.entry to fin.entry.original (wrapped below)
+ s/fin.entry/fin.entry.original/;
+ s/$/ $mymarker (renamed from fin.entry, so it can be wrapped below)/;
+ $found{finentry} = 1;
+ print OUT;
+ next;
+ };
+
+ /^ *FUNCTION *{format\.date}/ && do {
+ $found{formatdate} = 1;
+ print OUT;
+ next;
+ };
+
+ /^ *FUNCTION *{format\.title}/ && do {
+ # record that we found this
+ $found{formattitle} = 1;
+ print OUT;
+ next;
+ };
+
+ /^ *format\.b?title/ && do {
+ # interpolate a call to possibly.setup.inlinelink
+ print OUT " title empty\$ 'skip\$ 'possibly.setup\.inlinelink if\$ $mymarker\n";
+ print OUT;
+ next;
+ };
+
+ /^ *format\.vol\.num\.pages/ && do {
+ # interpolate a call to possibly.setup.inlinelink
+ s/^( *)/$1possibly.setup.inlinelink /;
+ s/$/$mymarker/;
+ print OUT;
+ next;
+ };
+
+ /^ *FUNCTION *\{article\}/ && do {
+
+ print_missing_functions();
+ print_webpage_def();
+
+ print OUT;
+ $found{article} = 1;
+ next;
+ };
+
+ /FUNCTION *\{output.bibitem\}/ && do {
+ # Rename output.bibitem to output.bibitem.original (wrapped below)
+ s/{output.bibitem\}/\{output.bibitem.original\}/;
+ s/$/ $mymarker (renamed from output.bibitem, so it can be wrapped below)/;
+ $found{outputbibitem} = 1;
+ print OUT;
+ next;
+ };
+
+ print OUT;
+};
+
+if ($exitstatus == 0) {
+ # Skip this if we've already reported an error -- it'll only be confusing
+ foreach $k (keys %found) {
+ if ($found{$k} == 0) {
+ print STDERR "$progname: $infile: failed to find feature $k\n";
+ }
+ }
+}
+
+close (IN);
+close (OUT);
+
+exit $exitstatus;;
+
+
+
+
+
+
+sub print_output_functions {
+ print OUT "$mymarker...\n";
+
+ print OUT <<'EOD';
+% The following three functions are for handling inlinelink. They wrap
+% a block of text which is potentially output with write$ by multiple
+% other functions, so we don't know the content a priori.
+% They communicate between each other using the variables makeinlinelink
+% (which is true if a link should be made), and closeinlinelink (which holds
+% the string which should close any current link. They can be called
+% at any time, but start.inlinelink will be a no-op unless something has
+% previously set makeinlinelink true, and the two ...end.inlinelink functions
+% will only do their stuff if start.inlinelink has previously set
+% closeinlinelink to be non-empty.
+% (thanks to 'ijvm' for suggested code here)
+FUNCTION {uand}
+{ 'skip$ { pop$ #0 } if$ } % 'and' (which isn't defined at this point in the file)
+FUNCTION {possibly.setup.inlinelink}
+{ makeinlinelink hrefform #0 > uand
+ { doi empty$ adddoiresolver uand
+ { pubmed empty$ addpubmedresolver uand
+ { eprint empty$ addeprints uand
+ { url empty$
+ { "" }
+ { url }
+ if$ }
+ { eprinturl eprint * }
+ if$ }
+ { pubmedurl pubmed * }
+ if$ }
+ { doiurl doi * }
+ if$
+ % an appropriately-formatted URL is now on the stack
+ hrefform #1 = % hypertex
+ { "\special {html:<a href=" quote$ * swap$ * quote$ * "> }{" * 'openinlinelink :=
+ "\special {html:</a>}" 'closeinlinelink := }
+ { "\href {" swap$ * "} {" * 'openinlinelink := % hrefform=#2 -- hyperref
+ % the space between "} {" matters: a URL of just the right length can cause "\% newline em"
+ "}" 'closeinlinelink := }
+ if$
+ #0 'makeinlinelink :=
+ }
+ 'skip$
+ if$ % makeinlinelink
+}
+FUNCTION {add.inlinelink}
+{ openinlinelink empty$
+ 'skip$
+ { openinlinelink swap$ * closeinlinelink *
+ "" 'openinlinelink :=
+ }
+ if$
+}
+EOD
+
+ # new.block is defined elsewhere
+
+ print OUT <<'EOD';
+FUNCTION {output.nonnull}
+{ % Save the thing we've been asked to output
+ 's :=
+ % If the bracket-state is close.brackets, then add a close-bracket to
+ % what is currently at the top of the stack, and set bracket.state
+ % to outside.brackets
+ bracket.state close.brackets =
+ { "]" *
+ outside.brackets 'bracket.state :=
+ }
+ 'skip$
+ if$
+ bracket.state outside.brackets =
+ { % We're outside all brackets -- this is the normal situation.
+ % Write out what's currently at the top of the stack, using the
+ % original output.nonnull function.
+ s
+ add.inlinelink
+ output.nonnull.original % invoke the original output.nonnull
+ }
+ { % Still in brackets. Add open-bracket or (continuation) comma, add the
+ % new text (in s) to the top of the stack, and move to the close-brackets
+ % state, ready for next time (unless inbrackets resets it). If we come
+ % into this branch, then output.state is carefully undisturbed.
+ bracket.state open.brackets =
+ { " [" * }
+ { ", " * } % bracket.state will be within.brackets
+ if$
+ s *
+ close.brackets 'bracket.state :=
+ }
+ if$
+}
+
+% Call this function just before adding something which should be presented in
+% brackets. bracket.state is handled specially within output.nonnull.
+FUNCTION {inbrackets}
+{ bracket.state close.brackets =
+ { within.brackets 'bracket.state := } % reset the state: not open nor closed
+ { open.brackets 'bracket.state := }
+ if$
+}
+
+FUNCTION {format.lastchecked}
+{ lastchecked empty$
+ { "" }
+ { inbrackets citedstring lastchecked * }
+ if$
+}
+EOD
+ print OUT "$mymarkerend\n";
+}
+
+sub print_webpage_def {
+ print OUT "$mymarker...\n";
+
+ # Some of the functions below call new.block, so we need a dummy
+ # version, in the case where the style being edited doesn't supply
+ # that function.
+ if (! $found{newblock}) {
+ print OUT "FUNCTION {new.block} % dummy new.block function\n{\n % empty\n}\n\n";
+ $found{newblock} = 1;
+ }
+
+ print OUT <<'EOD';
+% Functions for making hypertext links.
+% In all cases, the stack has (link-text href-url)
+%
+% make 'null' specials
+FUNCTION {make.href.null}
+{
+ pop$
+}
+% make hypertex specials
+FUNCTION {make.href.hypertex}
+{
+ "\special {html:<a href=" quote$ *
+ swap$ * quote$ * "> }" * swap$ *
+ "\special {html:</a>}" *
+}
+% make hyperref specials
+FUNCTION {make.href.hyperref}
+{
+ "\href {" swap$ * "} {\path{" * swap$ * "}}" *
+}
+FUNCTION {make.href}
+{ hrefform #2 =
+ 'make.href.hyperref % hrefform = 2
+ { hrefform #1 =
+ 'make.href.hypertex % hrefform = 1
+ 'make.href.null % hrefform = 0 (or anything else)
+ if$
+ }
+ if$
+}
+
+% If inlinelinks is true, then format.url should be a no-op, since it's
+% (a) redundant, and (b) could end up as a link-within-a-link.
+FUNCTION {format.url}
+{ inlinelinks #1 = url empty$ or
+ { "" }
+ { hrefform #1 =
+ { % special case -- add HyperTeX specials
+ urlintro "\url{" url * "}" * url make.href.hypertex * }
+ { urlintro "\url{" * url * "}" * }
+ if$
+ }
+ if$
+}
+EOD
+
+ $formateprintfunction = <<'EOD';
+FUNCTION {format.eprint}
+{ eprint empty$
+ { "" }
+ { eprintprefix eprint * eprinturl eprint * make.href }
+ if$
+}
+EOD
+ output_replacement_function($found{formateprint},
+ 'format.eprint',
+ 'addeprints',
+ $formateprintfunction);
+
+ $formatdoifunction = <<'EOD';
+FUNCTION {format.doi}
+{ doi empty$
+ { "" }
+ { doiprefix doi * doiurl doi * make.href }
+ if$
+}
+EOD
+ output_replacement_function($found{formatdoi},
+ 'format.doi',
+ 'adddoiresolver',
+ $formatdoifunction);
+
+ $formatpubmedfunction = <<'EOD';
+FUNCTION {format.pubmed}
+{ pubmed empty$
+ { "" }
+ { pubmedprefix pubmed * pubmedurl pubmed * make.href }
+ if$
+}
+EOD
+ output_replacement_function($found{formatpubmed},
+ 'format.pubmed',
+ 'addpubmedresolver',
+ $formatpubmedfunction);
+
+ print OUT <<'EOD';
+% Output a URL. We can't use the more normal idiom (something like
+% `format.url output'), because the `inbrackets' within
+% format.lastchecked applies to everything between calls to `output',
+% so that `format.url format.lastchecked * output' ends up with both
+% the URL and the lastchecked in brackets.
+FUNCTION {output.url}
+{ url empty$
+ 'skip$
+ { new.block
+ format.url output
+ format.lastchecked output
+ }
+ if$
+}
+
+FUNCTION {output.web.refs}
+{
+ new.block
+ inlinelinks
+ 'skip$ % links were inline -- don't repeat them
+ { % If the generated DOI will be the same as the URL,
+ % then don't print the URL (thanks to Joseph Wright for this code,
+ % at http://tex.stackexchange.com/questions/5660)
+ adddoiresolver
+ doiurl doi empty$ { "X" } { doi } if$ * % DOI URL to be generated
+ url empty$ { "Y" } { url } if$ % the URL, or "Y" if empty
+ = % are the strings equal?
+ and
+ 'skip$
+ { output.url }
+ if$
+ addeprints eprint empty$ not and
+ { format.eprint output.nonnull }
+ 'skip$
+ if$
+ adddoiresolver doi empty$ not and
+ { format.doi output.nonnull }
+ 'skip$
+ if$
+ addpubmedresolver pubmed empty$ not and
+ { format.pubmed output.nonnull }
+ 'skip$
+ if$
+ }
+ if$
+}
+
+% Wrapper for output.bibitem.original.
+% If the URL field is not empty, set makeinlinelink to be true,
+% so that an inline link will be started at the next opportunity
+FUNCTION {output.bibitem}
+{ outside.brackets 'bracket.state :=
+ output.bibitem.original
+ inlinelinks url empty$ not doi empty$ not or pubmed empty$ not or eprint empty$ not or and
+ { #1 'makeinlinelink := }
+ { #0 'makeinlinelink := }
+ if$
+}
+
+% Wrapper for fin.entry.original
+FUNCTION {fin.entry}
+{ output.web.refs % urlbst
+ makeinlinelink % ooops, it appears we didn't have a title for inlinelink
+ { possibly.setup.inlinelink % add some artificial link text here, as a fallback
+ linktextstring output.nonnull }
+ 'skip$
+ if$
+ bracket.state close.brackets = % urlbst
+ { "]" * }
+ 'skip$
+ if$
+ fin.entry.original
+}
+
+% Webpage entry type.
+% Title and url fields required;
+% author, note, year, month, and lastchecked fields optional
+% See references
+% ISO 690-2 http://www.nlc-bnc.ca/iso/tc46sc9/standard/690-2e.htm
+% http://www.classroom.net/classroom/CitingNetResources.html
+% http://neal.ctstateu.edu/history/cite.html
+% http://www.cas.usf.edu/english/walker/mla.html
+% for citation formats for web pages.
+FUNCTION {webpage}
+{ output.bibitem
+ author empty$
+ { editor empty$
+ 'skip$ % author and editor both optional
+ { format.editors output.nonnull }
+ if$
+ }
+ { editor empty$
+ { format.authors output.nonnull }
+ { "can't use both author and editor fields in " cite$ * warning$ }
+ if$
+ }
+ if$
+ new.block
+ title empty$ 'skip$ 'possibly.setup.inlinelink if$
+ format.title "title" output.check
+ inbrackets onlinestring output
+ new.block
+ year empty$
+ 'skip$
+ { format.date "year" output.check }
+ if$
+ % We don't need to output the URL details ('lastchecked' and 'url'),
+ % because fin.entry does that for us, using output.web.refs. The only
+ % reason we would want to put them here is if we were to decide that
+ % they should go in front of the rather miscellaneous information in 'note'.
+ new.block
+ note output
+ fin.entry
+}
+EOD
+
+ print OUT "$mymarkerend\n\n\n";
+}
+
+
+sub output_replacement_function {
+ my $emit_function = $_[0];
+ my $function_name = $_[1];
+ my $disabling_variable = $_[2];
+ my $function_definition_string = $_[3];
+
+ if ($emit_function > 0) {
+ print OUT <<"EOD";
+%%% The style file $infile already supports $function_name,
+%%% but it might not do so in the same way as urlbst expects.
+%%% I've therefore left $infile 's function unchanged,
+%%% and disabled urlbst's version; proceed with some caution.
+EOD
+
+ print STDERR "$progname: WARNING: style file $infile already includes a $function_name function;\nyou may need to disable the urlbst version by setting \$$disabling_variable to zero.\nYou might want to edit the output file (search for $function_name).\n";
+
+ ($t = $function_definition_string) =~ s/\n/\n%%% /g;
+ print OUT "%%% " . $t . "$mymarker\n";
+ } else {
+ print OUT $function_definition_string;
+ }
+ print OUT "\n";
+}
+
+sub print_missing_functions {
+ # We've got to the bit of the file which handles the entry
+ # types, so write out the webpage entry handler. This uses
+ # the format.date function, which which many but not all
+ # bst files have (for example, apalike doesn't). So
+ # check that we either have found this function already, or
+ # add it.
+ if (! $found{formatdate}) {
+ if ($found{entrymonth}) {
+ print OUT <<'EOD';
+FUNCTION {format.date}
+{ year empty$
+ { month empty$
+ { "" }
+ { "there's a month but no year in " cite$ * warning$
+ month
+ }
+ if$
+ }
+ { month empty$
+ 'year
+ { month " " * year * }
+ if$
+ }
+ if$
+}
+EOD
+ } else {
+ print OUT <<'EOD';
+FUNCTION {format.date}
+{ year empty$
+ 'skip$
+ { %write$
+ "(" year * ")" *
+ }
+ if$
+}
+EOD
+ }
+ $found{formatdate} = 1;
+ }
+
+ # If the style file didn't supply a format.title function, then supply
+ # one here (the {webpage} function requires it).
+ if (! $found{formattitle}) {
+ print OUT <<'EOD';
+FUNCTION {format.title}
+{ title empty$
+ { "" }
+ { title "t" change.case$ }
+ if$
+}
+EOD
+ $found{formattitle} = 1;
+ }
+}
+
+# Utility function: Keep track of open and close braces in the string argument.
+# Keep state in $bracematchtotal, return the current value.
+sub bracematcher {
+ my $s = shift;
+ $s =~ s/[^\{\}]//g;
+ #print "s=$s\n";
+ foreach my $c (split (//, $s)) {
+ $bracematchtotal += ($c eq '{' ? 1 : -1);
+ }
+ return $bracematchtotal;
+}
+
+# Utility function: use bracematcher to copy the complete block which starts
+# on or after the current line.
+sub copy_block {
+ $bracematchtotal = 0;
+ # copy any leading lines which don't have braces (presumably comments)
+ while (defined ($line = <IN>) && ($line !~ /{/)) {
+ print OUT $line;
+ }
+ while (defined ($line) && bracematcher($line) > 0) {
+ print OUT $line;
+ $line = <IN>;
+ }
+ print OUT "$line\n"; # print out terminating \} (assumed
+ # alone on the line)
+}
diff --git a/biblio/bibtex/contrib/urlbst/urlbst.bib b/biblio/bibtex/contrib/urlbst/urlbst.bib
new file mode 100644
index 0000000000..c51ed5d222
--- /dev/null
+++ b/biblio/bibtex/contrib/urlbst/urlbst.bib
@@ -0,0 +1,221 @@
+% Webpage with lastchecked and date
+@webpage{url:weapas,
+ url = {http://www.beadsland.com/weapas/},
+ title = {Web Extension to {American Psychological Association} Style ({WEAPAS}) (Rev.2.0)},
+ author = {B Land},
+ year = 2001,
+ month = jul,
+ lastchecked = {17 March 2011}
+}
+
+@Manual{apastyle,
+ title = {Publication Manual of the American Psychological Association},
+ organization = {{American Psychological Association}},
+ key = "APA",
+ edition = {6th},
+ year = 2009,
+ lastchecked = {17 March 2011},
+ url = {http://www.apastyle.org/manual/index.aspx}
+}
+
+@webpage{url:iso690,
+ author = {{International Standards Organisation}},
+ title = {{ISO 690-2}},
+ url = {http://en.wikipedia.org/wiki/ISO_690},
+ lastchecked = {17 March 2011}
+}
+
+Webpage{emory95,
+ author = {{Goizueta Business Library}},
+ title = "Citation Formats",
+ date = {1997},
+ lastchecked = {9 August 2009},
+ url = {http://business.library.emory.edu/eresources/citing.html}
+}
+% The Emory clowns have changed the URL yet again, suggesting that
+% they really don't get the whole 'web' thing
+
+@Book{walker06,
+ author = {Janice R. Walker and Todd Taylor},
+ title = {The Columbia Guide to Online Style},
+ publisher = {Columbia University Press},
+ year = 2006,
+ edition = {2nd},
+ isbn = {978-0-231-13211-4},
+ url = {http://cup.columbia.edu/book/978-0-231-13210-7/},
+ lastchecked = {17 March 2011}
+}
+
+% this one appears to be dead
+@Webpage{walker-orig,
+ title = {{MLA}-Style Citations of Electronic Sources},
+ author = {Janice R. Walker},
+ url = {http://www.cas.usf.edu/english/walker/mla.html},
+ year = 1995,
+ lastchecked = {23 October 2002},
+ note = {Updated and superceded by \cite{walker}}
+}
+
+@Webpage{texfaq,
+ url = {http://www.tex.ac.uk/cgi-bin/texfaq2html?label=citeURL},
+ title = {{UK \TeX\ FAQ: URLs in BibTeX bibliographies}},
+ key = {UK TeX FAQ},
+ editor = {Robin Fairbairns},
+ year = 2002,
+ lastchecked = {17 March 2011}
+}
+
+
+
+@Webpage{url:daly,
+ url = {http://www.tex.ac.uk/tex-archive/macros/latex/contrib/custom-bib/},
+ title = {Index of custom-bib},
+ author = {Patrick W Daly},
+ year = 2003,
+ lastchecked = {17 March 2011}
+}
+
+% Following are test entries
+
+% Article with URL and lastchecked
+@article{test:towell,
+ title = {Presence in Text-Based Networked Virtual
+ Environments or `{MUDs}'},
+ author = {John Towell and Elizabeth Towell},
+ journal = {Presence},
+ volume = 6,
+ number = 5,
+ pages = {590-595},
+ year = 1997,
+ url = {http://www-unix.mcs.anl.gov/~towell/presence.html},
+ lastchecked = {13 February 2002}
+}
+
+% Book with URL, lastchecked, and note.
+@Book{test:raymond99,
+ author = {Eric S Raymond},
+ title = {The Cathedral and the Bazaar},
+ publisher = {O'Reilly},
+ year = 1999,
+ url = {http://www.tuxedo.org},
+ isbn = {1-56592-724-9},
+ lastchecked = {1 April 2002},
+ note = {The seminal book on the commercialisation of open-source}
+}
+
+% Plain book, no URLs at all
+@book{test:laurillard93,
+ author = {Diana Laurillard},
+ title = {Rethinking University Teaching},
+ publisher = {Routledge},
+ year = 1993
+}
+
+% Webpage with lastchecked but no date
+@webpage{test:iso690,
+ author = {{International Standards Organisation}},
+ title = {{ISO 690-2}},
+ url = {http://www.nlc-bnc.ca/iso/tc46sc9/standard/690-2e.htm},
+ lastchecked = {20 August 2001}
+}
+
+% Webpage with date but no lastchecked
+@Webpage{test:classroom96,
+ title = {Citing Internet Addresses: how students should
+ reference online sources in their bibliographies},
+ year = 1996,
+ month = mar,
+ key = {Classroom},
+ url = "http://www.classroom.net/classroom/CitingNetResources.html"
+}
+
+% Webpage with neither date nor lastchecked
+@Webpage{test:emory95,
+ author = "libsf@web.cc.emory.edu",
+ title = "Citation Formats",
+ url = "http://www.emory.edu/WHSCL/citation.formats.html"
+}
+
+% The same, but with no title either
+@Webpage{test:emory95x,
+ author = "libsf@web.cc.emory.edu",
+ url = "http://www.emory.edu/WHSCL/citation.formats.html"
+}
+
+% Article with eprint number
+@techreport{test:simkin,
+ author = {Mikhail Simkin and V. P. Roychowdhury},
+ title = {Read before you cite!},
+ year = 2002,
+ institution = {UCLA},
+ eprint = {cond-mat/0212043}
+}
+
+% Article with a DOI
+@article{test:gray00c,
+ author = "Norman Gray",
+ title = "Automatic Reduction of Elliptic Integrals using
+ {Carlson's} Relations",
+ journal = {Mathematics of Computation},
+ volume = 71,
+ pages = {311-318},
+ year = 2002,
+ doi = {10.1090/S0025-5718-01-01333-3}
+}
+
+% Article with a DOI and a URL which refers to the same resource as the DOI
+% (we shouldn't get both in the output)
+@Article{test:doi2,
+ author = {A N Other},
+ title = {Fun with {DOIs}},
+ journal = {Journal of Indirection},
+ year = 1999,
+ doi = {10.1234/5678},
+ url = {https://doi.org/10.1234/5678}
+}
+
+% Article with a PUBMED reference
+
+
+@Article{test:giffin03,
+ author = {M J Giffin and J C Stroud and D L Bates and von Koenig, K D and J Hardin and L Chen},
+ title = {Structure of {NFAT1} Bound as a Dimer to the {HIV-1 LTR} kappa {B} element},
+ journal = {Nature Structural Biology},
+ year = {2003},
+ volume = {10},
+ number = {10},
+ pages = {800-6},
+ month = oct,
+ pubmed = {12949493}
+}
+
+@ARTICLE{test:nastydoi,
+ author = {Zemla, Adam and Venclovas, Ceslovas and Moult, John and
+ Fidelis, Krzysztof},
+ title = {{P}rocessing and analysis of {CASP}3 protein structure predictions},
+ journal = {Proteins: Structure, Function, and Genetics},
+ year = {1999},
+ volume = {37},
+ pages = {22--29},
+ number = {S3},
+ month = jan,
+ comment = {Description of GDT measure.},
+ doi = {10.1002/(SICI)1097-0134(1999)37:3+<22::AID-PROT5>3.0.CO;2-W},
+ keywords = {CASP},
+ timestamp = {2007-03-13}
+}
+
+% Example from Jason Eisner, by mail (nothing special about the entry,
+% but he seemed to be having formatting problems with unsrturl and proceedings
+% entries.
+@InProceedings{test:eisner-sample,
+ author = {Damianos Karakos and Sanjeev Khudanpur and Jason
+ Eisner and Carey~E. Priebe},
+ title = {Iterative denoising using {J}ensen-{R}eny\'{\i}
+ divergences with an application to unsupervised
+ document categorization},
+ booktitle = {Proceedings of ICASSP},
+ year = 2007,
+ url = {http://cs.jhu.edu/~jason/papers/#icassp07}
+}
+
diff --git a/biblio/bibtex/contrib/urlbst/urlbst.html b/biblio/bibtex/contrib/urlbst/urlbst.html
new file mode 100644
index 0000000000..1edeadcf3a
--- /dev/null
+++ b/biblio/bibtex/contrib/urlbst/urlbst.html
@@ -0,0 +1,462 @@
+<?xml version="1.0"?>
+
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<title>Urlbst</title>
+<link href="http://nxg.me.uk/" rev="author"/>
+<link type="text/css" rel="stylesheet" href="/style/base.css"/>
+</head>
+
+<body>
+<h1>Urlbst</h1>
+<div class="abstract">
+<p>A script to add a <code>webpage</code> BibTeX entry type, and add
+support for general <code>url</code> and <code>lastchecked</code>
+fields, to (most) BibTeX <code>.bst</code> files. Optionally adds
+basic support for <code>eprint</code>, <code>doi</code> and <code>pubmed</code> fields, and
+hypertex/hyperref support.</p>
+
+<p>The Persistent URL for this page is
+<code>http://purl.org/nxg/dist/urlbst</code>.
+The code (and bugparade) is on
+<a href='https://bitbucket.org/nxg/urlbst/'>bitbucket.org</a>.</p>
+
+<p>Version 0.8, 2019 July 1.</p>
+</div>
+
+<p>Contents</p>
+<ul>
+<li><a href='#usage'>Usage</a></li>
+<li><a href='#example'>For example...</a></li>
+<li><a href='#download'>Download and installation</a></li>
+<li><a href='#licences'>Licences</a></li>
+<li><a href='#information'>Further Information</a></li>
+<li><a href='#history'>Version history, and release notes</a></li>
+</ul>
+
+<p>The standard BibTeX styles have no explicit support for the web, in
+that they include no `webpage' type, and have no support for adding
+URLs to references. There are rumours that such support might appear
+in BibTeX 1.0, but there is no estimate of when that is likely to arrive.</p>
+
+<p>The Perl script <code>urlbst</code> can be used to add this support to an
+arbitrary <code>.bst</code> file which has a reasonably `conventional'
+structure. The result is meant to be robust rather than pretty.</p>
+
+<p>It has a different goal from Patrick Daly's `custom-bib' package --
+that is intended to create a BibTeX style .bst file from scratch, and
+supports `url' and `eprint' fields. This package, on the other hand,
+is intended for the case where you already have a style file that
+works (or at least, which you cannot or will not change), and edits it
+to add the new webpage entry type, plus the url, lastchecked and
+eprint fields. Fuller details are in the <a href="urlbst.pdf"
+>manual</a>.</p>
+
+<h2><a name='usage'>Usage</a></h2>
+<pre>
+urlbst [--[no]eprint] [--[no]doi] [--[no]pubmed]
+ [--inlinelinks] [--nohyperlinks] [--hypertex] [--hyperref]
+ [--literal key=value]
+ [input-file [output-file]]
+</pre>
+<p>If either the input-file or the output-file is omitted, they
+default to stdin and stdout respectively. If the input file already
+has a URL entry type, then the script objects.
+By default (in the current version), the output
+includes support for eprint, doi and pubmed, but these can be disabled
+by <code>--noeprint</code>, <code>--nodoi</code> and
+<code>--nopubmed</code>, respectively.</p>
+
+<p>The added fields are:</p>
+<ul>
+<li><code>url</code> and <code>lastchecked</code>, to associate a URL with
+ a reference, along with the date at which the URL was last checked
+ to exist;</li>
+<li><code>doi</code>, for a reference's <a href='https://doi.org'>DOI</a>;</li>
+<li><code>eprint</code>, for an <a href='http://arxiv.org'>arXiv</a> eprint reference; and</li>
+<li><code>pubmed</code> for a reference's
+ <a href='http://pubmed.gov'>PubMed</a> identifier (PMID).</li>
+</ul>
+
+<p>If either of the <code>--hypertex</code> or <code>--hyperref</code>
+options is present, then the generated <code>.bst</code> file includes
+support for hyperlinks in the generated eprint entries in the
+bibliography, with the format being either HyperTeX (see <a
+href="http://arxiv.org/hypertex/#implementation" >arXiv, again</a>),
+supported by xdvi, dvips and others, or using the support available
+from the hyperref package. These options have no effect unless one of
+the <code>--eprint</code> or <code>--doi</code> options is given: when
+URLs are included in the bibliography, they are written out using the
+<code>\url{...}</code> command, and hyperref automatically processes
+that in the correct way to include a hyperlink.</p>
+
+<p>The <code>--inlinelinks</code> option tells urlbst not to write out
+the URL as text within the bibliography entry. Instead, urlbst will
+produce a more conventional-looking and compact bibliography entry,
+but the entry's title will now be a hyperlink to that URL. This
+hyperlink may be useful to anyone who reads your document online
+(this option can only be used with <code>--hyperref</code> or
+<code>--hypertex</code>). Any DOI or eprint text which would be
+produced as a result of the appropriate option will still appear in
+this mode.</p>
+
+<p>You may adjust various literal strings, either for the purposes of
+internationalisation, or simply because you prefer different text. To
+do this, give the <code>--literal</code> option, followed by a
+<code>key=value</code> pair, for example <code>--literal online="on
+th'intert00bs"</code>, to replace the default <code>URL:</code> text.
+The possible values, and their defaults, are below (say
+<code>--literal help</code> to get this list printed out):</p>
+<table>
+<tr><th>keyword</th><th>default</th><th>meaning</th></tr>
+<tr><td>cited</td><td>cited</td><td>indicator of citation, or "last checked", date</td></tr>
+<tr><td>doiprefix</td><td>doi:</td><td>text printed before DOI</td></tr>
+<tr><td>eprintprefix</td><td>arXiv:</td><td>text printed before eprint
+ref</td></tr>
+<tr><td>linktext</td><td>[link]</td><td>fallback link text</td></tr>
+<tr><td>pubmedprefix</td><td>PMID:</td><td>text printed before PUBMED reference</td></tr>
+<tr><td>online</td><td>online</td><td>indication that resource is online</td></tr>
+<tr><td>urlintro</td><td>URL:</td><td>location of online resource (an
+alternative is "Available from:")</td></tr>
+</table>
+
+<p>The distribution includes preconverted versions of the four
+standard BibTeX .bst style files.</p>
+
+<p>Only the style files which result from conversion of the standard
+styles are checked in the regression tests. Other style files which
+are known to work include</p>
+<blockquote>
+acm.bst, amsalpha.bst, amsplain.bst, apalike.bst, gerabbrv.bst,
+geralpha.bst, gerapali.bst, gerplain.bst, gerunsrt.bst, ieeetr.bst,
+siam.bst, mla.bst
+</blockquote>
+
+<p>Style files which are known to fail:</p>
+<ul>
+<li>Currently (as of at least v0.5), there exists a style <code>achicago.bst</code>
+which seems to fox <code>urlbst</code>; it turns out that there's a
+simpler but almost equivalent style <code>chicago.bst</code> which
+works.</li>
+
+<li>Some APA-like styles, including at least <code>apager.bst</code>,
+seem to be sufficiently different from the most common styles, that
+they confuse <code>urlbst</code> completely.</li>
+
+<li>The <em>koma-script</em> styles and the <em>refer</em> styles are
+not designed to produce conventional <code>.bbl</code> files, and
+<code>urlbst</code> does not aim to produce anything useful from these.</li>
+</ul>
+<p>This might be a good time for me to revisit the rather
+convoluted logic within the script, to make it a little more robust in
+the face of variants like these, but don't hold your breath. The
+logic within the script is pretty hideous (it essentially works by
+spotting patterns in the input style file, and replacing or extending
+bits of BibTeX style-file code. This is a fragile technique, and is
+probably at the limits of its usefulness, therefore I'd take some
+persuading to add significant extra functionality to the script.</p>
+
+<p>The natbib and revtex style files already have URL fields. If you have a
+BibTeX style file which you think ought to work, but with which the
+script fails, send it to me, and I'll try to work out what I've
+missed (no promises, though).</p>
+
+<p>Note that the command to invoke the script changed from `urlbst.pl'
+to plain `urlbst' between versions 0.3 and 0.4.</p>
+
+<h2><a name='example'>For example...</a></h2>
+<p>To add URL support to the standard <code>siam.bst</code> file, you
+can give the command</p>
+<pre>
+% urlbst /path/to/original/siam.bst siamurl.bst
+</pre>
+<p>Your TeX installation will likely have some way of helping you find where
+the original <code>.bst</code> files are. On teTeX-based systems, for
+example, the command <code>kpsewhich siam.bst</code> returns the full
+path of the <code>siam.bst</code> file which BibTeX would find.</p>
+
+<p>The distributed files <code>abbrvurl.bst</code>,
+<code>alphaurl.bst</code>, <code>plainurl.bst</code> and
+<code>unsrturl.bst</code> are versions of the standard style files
+which have been pre-converted.</p>
+
+<p>There is more general discussion of including URLs in
+bibliographies in the <a
+href="http://www.tex.ac.uk/cgi-bin/texfaq2html?label=citeURL" >UK TeX
+FAQ</a>.</p>
+
+<h2><a name='download'>Download and installation</a></h2>
+
+<p>Download the file as a
+<a href="urlbst-0.8.tar.gz" >tarball</a>
+or
+<a href="urlbst-0.8.zip" >zip file</a>
+and unpack it. Or you can clone the source repository at
+<a href='http://bitbucket.org/nxg/urlbst/'>bitbucket.org</a>.</p>
+
+<p>To install, you should simply copy the distributed
+<code>urlbst</code> script to someplace on the path (such as
+<code>/usr/local/bin</code>, or <code>~/local/bin</code>, depending on
+your privileges and tastes).</p>
+
+<p>If you (might) want to use the pre-converted standard
+<code>.bst</code> files, then you'll need to copy these to somewhere
+in the BibTeX search path. Type <kbd>kpsepath bst</kbd> on Unix to
+find out the list of places BibTeX searches, and pick either one of
+the user-local locations, or a system-wide one. If you're installing
+in a system-wide location, you'll need admin privileges, obviously,
+and you will probably need to use <code>texhash</code>,
+<code>mktexlsr</code> or its equivalent, to update LaTeX's filename
+cache. For further hints here, see
+the TeX FAQ entries on <a
+href='http://www.tex.ac.uk/cgi-bin/texfaq2html?label=instpackages'
+>installing a package</a> and <a
+href='http://www.tex.ac.uk/cgi-bin/texfaq2html?label=wherefiles'
+>where LaTeX puts files</a>.</p>
+
+<p>That should be all you have to do.</p>
+
+<p>The urlbst script is distributed with a path which should just work,
+as long as the Perl binary is in your path, but if you have problems
+here, then you might want to change the first line to something like</p>
+<pre>
+#! /usr/local/bin/perl
+</pre>
+<p>if that's where your Perl binary is.</p>
+
+<p>You can also use the conventional <code>./configure; make; make
+install</code> to configure and install the package (as root, or using
+<code>sudo</code> if you're installing it in a system location),
+though you still have to install the <code>.bst</code> files by hand.
+This is rather heavyweight for the trivial amount of configuration
+required, so it's almost always simpler just to do things by hand.</p>
+
+<p>If you need to change some of the <code>urlbst</code> defaults,
+however, or if your fingers type <code>./configure</code>
+spontaneously, then you can be reassured that the configure script
+supports the standard <code>--prefix</code> option, plus the following
+options setting defaults:</p>
+<dl>
+
+<dt><code>--with-eprints=url</code>, <code>--without-eprints</code></dt>
+
+<dd>This makes the <code>--eprints</code> option to urlbst available
+by default, and allows you to optionally specify a prefix for creating
+URLs from eprint numbers. The default for this URL is
+<code>http://arxiv.org/abs/</code> -- this is appropriate for arXiv,
+obviously, but there are now a variety of other preprint archives
+appearing, for which this might be inappropriate. If you have
+comments on this default, or alternatives, please let me know. This
+option is enabled by default; if you have some reason for disabling
+the <code>--eprints</code> option for urlbst, the give the configure
+option <code>--without-eprints</code></dd>
+
+<dt><code>--with-doi=url</code>, <code>--without-doi</code></dt>
+
+<dd>This makes available the <code>--doi</code> option to urlbst and,
+as with the <code>--with-eprints</code> option, allows you to
+customise the DOI resolver URL. The <code>--doi</code> option to
+urlbst is on by default.</dd>
+
+<dt><code>--with-href=0/1/2</code></dt>
+
+<dd>This allows you to specify the type of hyperlinks which are
+inserted in the bibliography. Values 0, 1 and 2, indicating no
+hyperlinks, hypertex-style links, and hyperref-style links,
+respectively. The default is <code>--with-href=0</code>. The
+<code>hyperref</code>-style option is intended to complement the
+increasingly standard <code>hyperref</code> package.</dd>
+
+</dl>
+
+<p>The first two options simply change defaults, and if you never use
+the new <code>eprints</code> or <code>doi</code> fields, then the
+defaults don't matter to you. </p>
+
+<p>Since the modified style generates URLs wrapped in the
+<code>\url{}</code> macro, it is useful to use the resulting
+bibliography style alongside the <code>url</code> package. Since this
+tends to work with <code>hyperref</code> anyway, where possible, you
+don't get any extra goodness by changing the <code>--with-href</code>
+default at configuration time.</p>
+
+<h3>Documentation</h3>
+
+<p>Basic documentation is in the file <code>urlbst.tex</code>. This
+is distributed as a PDF file, but if you want to regenerate it, use</p>
+<pre>
+% latex urlbst
+% bibtex urlbst
+% latex urlbst
+% latex urlbst
+</pre>
+
+<h2><a name='licences'>Licences</a></h2>
+
+<!-- this text copied from the README.md -->
+<p>The copyright and licence position for the modified <code>.bst</code> files seems
+slightly muddy to me. On the grounds that any licence is better than
+no licence, I therefore assert that the <em>modifications</em> which the
+<code>urlbst</code> program makes to these files are copyright 2002-03, 2005-12, 2014, 2019,
+Norman Gray, and that these modifications are available for
+distribution under the terms of the LaTeX Project Public Licence.</p>
+
+<p>The original <code>.bst</code> files are copyright Howard Trickey and Oren
+Patashnik, with a set of permissions, in text at the top of the files,
+which state that "Unlimited copying and redistribution of this file
+are permitted as long as it is unmodified" (see the files for the
+complete text). The distribution terms above therefore appear to be
+compatible with -- in the sense of being morally equivalent to --
+these terms in the <code>.bst</code> file. If anyone disagrees with
+the logic here, I'd be very happy to discuss that.</p>
+
+<p>The <code>urlbst</code> script itself is distributed under the GPL, version 2.0.</p>
+
+<p>See the files <code>LICENCE-lppl.txt</code> and <code>LICENCE-gpl-2.0.txt</code> in the
+distribution, for the relevant licence text.</p>
+
+
+<h2><a name='information'>Further Information and acknowledgements</a></h2>
+
+<p><code>urlbst</code> is archived <a
+href='https://ctan.org/pkg/urlbst'
+>on CTAN</a>, and discussed in the
+<a href="http://www.tex.ac.uk/cgi-bin/texfaq2html?label=citeURL" >TeX
+FAQ</a>.</p>
+
+<p>The source code for the package is maintained at
+<a href='http://bitbucket.org/nxg/urlbst/'>bitbucket.org</a>,
+which also includes an issue tracker, where you can report bugs (or
+just mail me).</p>
+
+<p>The <a href="http://purl.org/nxg/dist/urlbst"
+>home page of urlbst</a> might possibly have more recent versions than the
+one you're looking at now.</p>
+
+
+<h2><a name='history'>Acknowledgements, and release notes</a></h2>
+
+<!-- include:release-notes.html -->
+<div xmlns='http://www.w3.org/1999/xhtml'>
+
+<p>Thanks are due to many people for suggestions and requests:
+to Jason Eisner for suggesting the <code>--inlinelinks</code> option;
+to ‘ijvm’ for code contributions in the <code>urlbst</code> script;
+to Paweł Widera for the suggestion to use <code>\path</code> when formatting DOIs;
+to Michael Giffin for the suggestion to include PubMed URLs;
+to Katrin Leinweber for the pull request which fixed the format of DOI
+references.</p>
+
+<dl>
+<dt><strong>0.8, 2019 July 1</strong></dt>
+<dd><ul>
+<li>The presence of a preexisting <code>format.doi</code>,
+<code>format.eprint</code> or <code>format.pubmed</code> function is
+now detected, and warned about. The resulting <code>.bst</code> file
+might still require some manual editing.
+Resolves <a href='https://bitbucket.org/nxg/urlbst/issue/8'>issue 8</a>.</li>
+<li>Clarified licences (I hope).</li>
+<li>Adjust format of DOI resolver.
+Resolves <a href='https://bitbucket.org/nxg/urlbst/issue/11'>issue 11</a>,
+thanks to
+<a href='https://bitbucket.org/nxg/urlbst/pull-requests/1/'
+>code contributed by Katrin Leinweber</a>.</li>
+</ul>
+</dd>
+
+<dt>0.7, 2011 July 20</dt>
+<dd>Add <code>--nodoi</code>, <code>--noeprints</code> and <code>--nopubmed</code> options (which defaulted
+on, and couldn't otherwise be turned off)</dd>
+
+<dt>0.7b1, 2011 March 17</dt>
+<dd>Allow parameterisation of literal strings, with option <code>--literal</code>.</dd>
+
+<dt>0.6-5, 2011 March 8</dt>
+<dd>Adjust support for inline links (should now work for arXiv, DOI and Pubmed)</dd>
+
+<dt>0.6-4, 2009 April 28</dt>
+<dd>Work around BibTeX linebreaking bug (thanks to Andras Salamon for the bug report).</dd>
+
+<dt>0.6-3, 2009 April 19</dt>
+<dd>Fix inline link generation (thanks to Eric Chamberland for the bug report).</dd>
+
+<dt>0.6-2, 2008 November 17</dt>
+<dd>We now turn on inlinelinks when we spot format.vol.num.pages,
+which means we include links for those styles which don't include a
+title in the citation (common for articles in physical science styles,
+such as aip.sty).</dd>
+
+<dt>0.6-1, 2008 June 16</dt>
+<dd>Fixed some broken links to the various citation standards
+(I think in this context this should probably <em>not</em> be happening, yes?).
+The distributed <code>*url.bst</code> no longer have the
+<code>--inlinelinks</code> option turned on by default.</dd>
+
+<dt><strong>0.6, 2007 March 26</strong></dt>
+<dd><ul>
+<li>Added the option <code>--inlinelinks</code>, which adds inline hyperlinks
+to any bibliography entries which have URLs, but does so inline, rather
+than printing the URL explicitly in the bibliography. This is (primarily)
+useful if you're preparing a version of a document which will be read
+on-screen. Thanks to Jason Eisner for the suggestion, and much testing.</li>
+
+<li>Incorporate hyperref bugfixes from Paweł Widera.</li>
+
+<li>Further reworkings of the inlinelinks support, so that it's now
+fired by a <code>format.title</code> (or <code>format.btitle</code>) line, with a fallback in
+<code>fin.entry</code>. This should be more robust, and allows me to delete some
+of the previous version's gymnastics.</li>
+
+<li>Reworked <code>inlinelinks</code> support; should now be more
+robust. Incorporate hyperref bugfixes from Paweł Widera.</li>
+
+<li>Added the option <code>inlinelinks</code>, which adds inline hyperlinks
+to any bibliography entries which have URLs, but does so inline, rather
+than printing the URL explicitly in the bibliography. This is (only)
+useful if you're preparing a version of a document which will be read
+on-screen.</li>
+</ul>
+</dd>
+
+<dt>0.5.2, 2006 September 6</dt>
+<dd>Another set of documentation-only changes, hopefully clarifying
+installation.</dd>
+
+<dt>0.5.1, 2006 January 10</dt>
+<dd>No functionality changes. Documentation and webpage changes only,
+hopefully clarifying usage and configuration</dd>
+
+<dt><strong>0.5, 2005 June 3</strong></dt>
+<dd>Added support for Digital Object Identifiers (DOI) fields in
+bibliographies.</dd>
+
+<dt>0.4-1, 2005 April 12</dt>
+<dd>Documentation improvements -- there are now examples in the help text!</dd>
+
+<dt><strong>0.4, 2004 December 1</strong></dt>
+<dd>Bug fixes: now compatible with mla.bst and friends.
+Now uses <code>./configure</code> (optionally). Assorted reorganisation.</dd>
+
+<dt><strong>0.3, 2003 June 4</strong></dt>
+<dd>Added <code>--eprint</code>, <code>--hypertex</code> and <code>--hyperref</code> options.</dd>
+
+<dt><strong>0.2, 2002 October 23</strong></dt>
+<dd>The `editor' field is now supported in the webpage entry type. Basic
+documentation added.</dd>
+
+<dt><strong>0.1, 2002 April</strong></dt>
+<dd>Initial version</dd>
+</dl>
+</div>
+
+<p>Copyright 2002-03, 2005-12, 2014, 2019, Norman Gray. Released under the terms of the GNU
+General Public Licence.</p>
+
+<div class="signature">
+<a href="http://nxg.me.uk"
+ >Norman Gray</a><br/>
+2019 July 1
+</div>
+
+</body>
+</html>
diff --git a/biblio/bibtex/contrib/urlbst/urlbst.in b/biblio/bibtex/contrib/urlbst/urlbst.in
new file mode 100644
index 0000000000..1039dfb6c5
--- /dev/null
+++ b/biblio/bibtex/contrib/urlbst/urlbst.in
@@ -0,0 +1,889 @@
+#! @PERL@ -w
+#
+# Usage: ./urlbst.pl [--eprint] [--doi] [--pubmed]
+# [--nohyperlinks] [--inlinelinks] [--hypertex] [--hyperref]
+# [input-file [output-file]]
+# If either input-file or output-file is omitted, they are replaced by
+# stdin or stdout respectively.
+#
+# See http://purl.org/nxg/dist/urlbst for documentation
+#
+# Copyright @COPYRIGHTYEARS@, Norman Gray <http://nxg.me.uk>
+#
+# This program is distributed under the terms of the
+# GNU General Public Licence, v2.0.
+# The modifications to the input .bst files are asserted as Copyright @COPYRIGHTYEARS@, Norman Gray,
+# and distributed under the terms of the LaTeX Project Public Licence.
+# See the package README for further dicussion of licences.
+
+$version = '@PACKAGE_VERSION@';
+($progname = $0) =~ s/.*\///;
+$mymarker = "% $progname";
+$mymarkerend = "% ...$progname to here";
+$myurl = 'http://purl.org/nxg/dist/urlbst';
+
+
+$infile = '-';
+$outfile = '-';
+
+$addeprints = @WITHEPRINTS@; # if true (nonzero) we add support for eprints
+$literals{eprintprefix} = 'arXiv:'; # make these settable with --eprint? syntax?
+$eprinturl = '@EPRINTURL@';
+
+$adddoiresolver = @WITHDOIRESOLVER@;
+$literals{doiprefix} = 'doi:';
+$doiurl = '@DOIURL@';
+
+$addpubmedresolver = @WITHPUBMEDRESOLVER@;
+$literals{pubmedprefix} = 'PMID:';
+$pubmedurl = '@PUBMEDURL@';
+
+$makehref = @WITHHREF@;
+$literals{urlintro} = "URL: ";
+$inlinelinks = 0;
+
+$literals{online} = "online";
+$literals{cited} = "cited ";
+$literals{linktext} = "[link]";
+
+$automatic_output_filename = 0;
+
+$Usage = "$progname [--eprint] [--doi] [--pubmed]\n [--nohyperlinks] [--[no]inlinelinks] [--hypertex] [--hyperref]\n [--literal key=value]\n [--help] [input-file [output-file]]";
+
+# Magic environment variable: if this is set, then we're being called from a Platypus wrapper
+# See http://www.sveinbjorn.org/platypus
+if ($ENV{"CALLED_FROM_PLATYPUS"}) {
+ $automatic_output_filename = 1;
+}
+
+while ($#ARGV >= 0) {
+ if ($ARGV[0] eq '--eprint') {
+ $addeprints = 1;
+ } elsif ($ARGV[0] eq '--noeprint') {
+ $addeprints = 0;
+ } elsif ($ARGV[0] eq '--doi') {
+ $adddoiresolver = 1;
+ } elsif ($ARGV[0] eq '--nodoi') {
+ $adddoiresolver = 0;
+ } elsif ($ARGV[0] eq '--pubmed') {
+ $addpubmedresolver = 1;
+ } elsif ($ARGV[0] eq '--nopubmed') {
+ $addpubmedresolver = 0;
+ } elsif ($ARGV[0] eq '--nohyperlinks') {
+ $makehref = 0;
+ } elsif ($ARGV[0] eq '--hypertex') {
+ $makehref = 1;
+ } elsif ($ARGV[0] eq '--hyperref') {
+ $makehref = 2;
+ } elsif ($ARGV[0] eq '--inlinelinks') {
+ $inlinelinks = 1;
+ } elsif ($ARGV[0] eq '--noinlinelinks') {
+ $inlinelinks = 0;
+ } elsif ($ARGV[0] eq '--automatic-output') {
+ $automatic_output_filename = 1;
+ } elsif ($ARGV[0] eq '--literal') {
+ shift;
+ my $showstrings = 0;
+ if ((($k, $v) = ($ARGV[0] =~ /^(\w+)=(.*)/)) && exists $literals{$k}) {
+ $literals{$k} = $v;
+ } elsif ($ARGV[0] eq 'help') {
+ $showstrings = 1;
+ } else {
+ print "No literal found in $ARGV[0]; ignoring that\n";
+ $showstrings = 1;
+ }
+ if ($showstrings) {
+ print " Possible literal strings (and defaults) are...\n";
+ while (($k, $v) = each (%literals)) {
+ print " $k ($v)\n";
+ }
+ exit(0);
+ }
+ } elsif ($ARGV[0] eq '--help') {
+ print <<EOD;
+urlbst version $version
+ Usage: $Usage
+ --[no]eprint include support for `eprint' fields
+ --[no]doi include support for `doi' field
+ --[no]pubmed include support for `pubmed' field
+ --nohyperlinks do not include active links anywhere
+ --[no]inlinelinks add hyperlinks to entry titles
+ --hypertex include HyperTeX-style hyperlink support
+ --hyperref include {hyperref}-style hyperlink support
+ (generally better)
+ --literal key=value set one of the literal strings
+ (see `--literal help' for possibilities)
+ --help print this help
+ Input and output files may be given as `-' (default) to indicate stdin/out.
+
+EOD
+ printf(" Defaults:\n");
+ printf(" eprint refs %s\n", ($addeprints ? "included" : "not included"));
+ printf(" DOIs %s\n", ($adddoiresolver ? "included" : "not included"));
+ printf(" PUBMED refs %s\n", ($addpubmedresolver ? "included" : "not included"));
+ printf(" hyperlinks %s\n", ($makehref==0 ? "none" : $makehref==1 ? "hypertex" : "hyperref"));
+ printf(" inline links %s\n", ($inlinelinks ? "included" : "not included"));
+ exit(0);
+ } elsif ($ARGV[0] =~ /^-/) {
+ die "Unrecognised option $ARGV[0]: Usage: $Usage\n";
+ } elsif ($infile eq '-') {
+ $infile = $ARGV[0];
+ } elsif ($outfile eq '-') {
+ $outfile = $ARGV[0];
+ } else {
+ die "Usage: $Usage\n";
+ }
+ shift(@ARGV);
+}
+
+if ($inlinelinks && $makehref == 0) {
+ print <<'EOD';
+Warning: --inlinelinks and --nohyperlinks were both specified (possibly
+ implicitly). That combination makes no sense, so I'll ignore
+ --nohyperlinks and use --hyperref instead
+EOD
+ $makehref = 2;
+}
+
+if ($automatic_output_filename) {
+ if ($infile eq '-') {
+ print "ERROR: No input filename given with --automatic-output\n";
+ }
+ $outfile = $infile;
+ @outparts = split /\./, $outfile;
+ $ext = pop(@outparts);
+ $outfile=join('.', @outparts);
+ if ($outfile eq '') {
+ $outfile = $ext . '-url';
+ } else {
+ $outfile = $outfile . '-url.' . $ext;
+ }
+}
+
+$exitstatus = 0; # success status
+
+open (IN, "<$infile") || die "Can't open $infile to read";
+open (OUT, ">$outfile") || die "Can't open $outfile to write";
+
+# We have to make certain assumptions about the source files, in order
+# to patch them at the correct places. Specifically, we assume that
+#
+# - there's a function init.state.consts
+#
+# - ...and an output.nonnull which does the actual outputting, which
+# has the `usual' interface.
+#
+# - we can replace
+# fin.entry
+# by
+# new.block
+# output.url % the function which formats and displays any URL
+# fin.entry
+#
+# - there is a function which handles the `article' entry type (this
+# will always be true)
+#
+# - there is a function output.bibitem which is called at the
+# beginning of each entry type
+# - ...and one called fin.entry which is called at the end
+#
+# If the functions format.date, format.title or new.block are not defined (the
+# former is not in apalike, for example, and the last is not in the
+# AMS styles), then replacements are included in the output.
+#
+# All these assumptions are true of the standard files and, since most
+# style files derive from them more or less directly, are true of most (?)
+# other style files, too.
+#
+# There's some rather ugly Perl down here. The parsing for
+# brace-matching could probably do with being rewritten in places, to
+# make it less ugly, and more robust.
+
+print OUT "%%% Modification of BibTeX style file ", ($infile eq '-' ? '<stdin>' : $infile), "\n";
+print OUT "%%% ... by $progname, version $version (marked with \"$mymarker\")\n%%% See <$myurl>\n";
+print OUT "%%% Modifications Copyright @COPYRIGHTYEARS@, Norman Gray,\n";
+print OUT "%%% and distributed under the terms of the LPPL; see README for discussion.\n";
+print OUT "%%%\n";
+print OUT "%%% Added webpage entry type, and url and lastchecked fields.\n";
+print OUT "%%% Added eprint support.\n" if ($addeprints);
+print OUT "%%% Added DOI support.\n" if ($adddoiresolver);
+print OUT "%%% Added PUBMED support.\n" if ($addpubmedresolver);
+print OUT "%%% Added HyperTeX support.\n" if ($makehref == 1);
+print OUT "%%% Added hyperref support.\n" if ($makehref == 2);
+print OUT "%%% Original headers follow...\n\n";
+
+$found{initconsts} = 0;
+$found{outputnonnull} = 0;
+$found{article} = 0;
+$found{outputbibitem} = 0;
+$found{finentry} = 0;
+$found{formatdate} = 0;
+$found{formattitle} = 0;
+$found{newblock} = 0;
+# The following are initialised negative, which Perl treats as true,
+# so the simple test 'if ($found{formateprint}) ...' will be true.
+$found{formateprint} = -1;
+$found{formatdoi} = -1;
+$found{formatpubmed} = -1;
+
+while (<IN>) {
+ /^ *%/ && do {
+ # Pass commented lines unchanged
+ print OUT;
+ next;
+ };
+
+ /^ *ENTRY/ && do {
+ # Work through the list of entry types, finding what ones are there.
+ # If we find a URL entry there already, object, since these edits
+ # will mess things up.
+ $line = $_;
+ until ($line =~ /\{\s*(\w*)/) {
+ $line .= <IN>;
+ }
+ $bracematchtotal = 0; # reset
+ bracematcher($line);
+ $line =~ /\{\s*(\w*)/;
+ $found{'entry'.$1} = 1;
+ print OUT $line;
+ $line = <IN>;
+ until (bracematcher($line) == 0) {
+ # XXX deal with multiple entries on one line
+ ($line =~ /^\s*(\w*)/) && ($found{'entry'.$1} = 1);
+ print OUT $line;
+ $line = <IN>;
+ }
+ if (defined($found{entryurl})) {
+ print STDERR "$progname: style file $infile already has URL entry!\n";
+ # print out the rest of the file, and give up
+ print OUT $line;
+ while (<IN>) {
+ print OUT;
+ }
+ $exitstatus = 1;
+ last;
+ } else {
+ print OUT " eprint $mymarker\n doi $mymarker\n pubmed $mymarker\n url $mymarker\n lastchecked $mymarker\n";
+ }
+ print OUT $line;
+ next;
+ };
+
+ /^ *FUNCTION *\{init\.state\.consts\}/ && do {
+ # In the init.state.consts function, add an extra set of
+ # constants at the beginning. Also use this as the marker for
+ # the place to add the init strings function.
+ print OUT <<EOD;
+$mymarker...
+% urlbst constants and state variables
+STRINGS { urlintro
+ eprinturl eprintprefix doiprefix doiurl pubmedprefix pubmedurl
+ citedstring onlinestring linktextstring
+ openinlinelink closeinlinelink }
+INTEGERS { hrefform inlinelinks makeinlinelink
+ addeprints adddoiresolver addpubmedresolver }
+FUNCTION {init.urlbst.variables}
+{
+ % The following constants may be adjusted by hand, if desired
+
+ % The first set allow you to enable or disable certain functionality.
+ #$addeprints 'addeprints := % 0=no eprints; 1=include eprints
+ #$adddoiresolver 'adddoiresolver := % 0=no DOI resolver; 1=include it
+ #$addpubmedresolver 'addpubmedresolver := % 0=no PUBMED resolver; 1=include it
+ #$makehref 'hrefform := % 0=no crossrefs; 1=hypertex xrefs; 2=hyperref refs
+ #$inlinelinks 'inlinelinks := % 0=URLs explicit; 1=URLs attached to titles
+
+ % String constants, which you _might_ want to tweak.
+ "$literals{urlintro}" 'urlintro := % prefix before URL; typically "Available from:" or "URL":
+ "$literals{online}" 'onlinestring := % indication that resource is online; typically "online"
+ "$literals{cited}" 'citedstring := % indicator of citation date; typically "cited "
+ "$literals{linktext}" 'linktextstring := % dummy link text; typically "[link]"
+ "$eprinturl" 'eprinturl := % prefix to make URL from eprint ref
+ "$literals{eprintprefix}" 'eprintprefix := % text prefix printed before eprint ref; typically "arXiv:"
+ "$doiurl" 'doiurl := % prefix to make URL from DOI
+ "$literals{doiprefix}" 'doiprefix := % text prefix printed before DOI ref; typically "doi:"
+ "$pubmedurl" 'pubmedurl := % prefix to make URL from PUBMED
+ "$literals{pubmedprefix}" 'pubmedprefix := % text prefix printed before PUBMED ref; typically "PMID:"
+
+ % The following are internal state variables, not configuration constants,
+ % so they shouldn't be fiddled with.
+ #0 'makeinlinelink := % state variable managed by possibly.setup.inlinelink
+ "" 'openinlinelink := % ditto
+ "" 'closeinlinelink := % ditto
+}
+INTEGERS {
+ bracket.state
+ outside.brackets
+ open.brackets
+ within.brackets
+ close.brackets
+}
+$mymarkerend
+EOD
+ $line = $_;
+ until ($line =~ /\{.*\}.*\{/s) {
+ $line .= <IN>;
+ }
+ $line =~ s/(\{.*?\}.*?\{)/$1 #0 'outside.brackets := $mymarker...
+ #1 'open.brackets :=
+ #2 'within.brackets :=
+ #3 'close.brackets := $mymarkerend
+
+ /s;
+ print OUT $line;
+ $found{initconsts} = 1;
+ next;
+ };
+
+ /^ *EXECUTE *\{init\.state\.consts\}/ && do {
+ print OUT "EXECUTE {init.urlbst.variables} $mymarker\n";
+ print OUT;
+ next;
+ };
+
+ /^ *FUNCTION *\{new.block\}/ && do {
+ $found{newblock} = 1;
+ };
+
+ /^ *FUNCTION *\{format.doi\}/ && do {
+ #print STDERR "$progname: style file $infile already supports DOIs; urlbst format.doi disabled\n(see generated .bst style: you may need to make edits near \$adddoiresolver)\n";
+ $found{formatdoi} = 1;
+ $adddoiresolver = 0;
+ };
+
+ /^ *FUNCTION *\{format.eprint\}/ && do {
+ #print STDERR "$progname: style file $infile already supports eprints; urlbst format.eprint disabled\n(see generated .bst style: you may need to make edits near \$addeprints)\n";
+ $found{formateprint} = 1;
+ $addeprints = 0;
+ };
+
+ /^ *FUNCTION *\{format.pubmed\}/ && do {
+ #print STDERR "$progname: style file $infile already supports Pubmed; urlbst format.pubmed disabled\n(see generated .bst style: you may need to make edits near \$addpubmedresolver)\n";
+ $found{formatpubmed} = 1;
+ $addpubmedresolver = 0;
+ };
+
+ /^ *FUNCTION *{output\.nonnull}/ && do {
+ print OUT "$mymarker\n";
+ print OUT "FUNCTION {output.nonnull.original}\n";
+ copy_block();
+ print_output_functions();
+ $found{outputnonnull} = 1;
+ next;
+ };
+
+ /FUNCTION *\{fin.entry\}/ && do {
+ # Rename fin.entry to fin.entry.original (wrapped below)
+ s/fin.entry/fin.entry.original/;
+ s/$/ $mymarker (renamed from fin.entry, so it can be wrapped below)/;
+ $found{finentry} = 1;
+ print OUT;
+ next;
+ };
+
+ /^ *FUNCTION *{format\.date}/ && do {
+ $found{formatdate} = 1;
+ print OUT;
+ next;
+ };
+
+ /^ *FUNCTION *{format\.title}/ && do {
+ # record that we found this
+ $found{formattitle} = 1;
+ print OUT;
+ next;
+ };
+
+ /^ *format\.b?title/ && do {
+ # interpolate a call to possibly.setup.inlinelink
+ print OUT " title empty\$ 'skip\$ 'possibly.setup\.inlinelink if\$ $mymarker\n";
+ print OUT;
+ next;
+ };
+
+ /^ *format\.vol\.num\.pages/ && do {
+ # interpolate a call to possibly.setup.inlinelink
+ s/^( *)/$1possibly.setup.inlinelink /;
+ s/$/$mymarker/;
+ print OUT;
+ next;
+ };
+
+ /^ *FUNCTION *\{article\}/ && do {
+
+ print_missing_functions();
+ print_webpage_def();
+
+ print OUT;
+ $found{article} = 1;
+ next;
+ };
+
+ /FUNCTION *\{output.bibitem\}/ && do {
+ # Rename output.bibitem to output.bibitem.original (wrapped below)
+ s/{output.bibitem\}/\{output.bibitem.original\}/;
+ s/$/ $mymarker (renamed from output.bibitem, so it can be wrapped below)/;
+ $found{outputbibitem} = 1;
+ print OUT;
+ next;
+ };
+
+ print OUT;
+};
+
+if ($exitstatus == 0) {
+ # Skip this if we've already reported an error -- it'll only be confusing
+ foreach $k (keys %found) {
+ if ($found{$k} == 0) {
+ print STDERR "$progname: $infile: failed to find feature $k\n";
+ }
+ }
+}
+
+close (IN);
+close (OUT);
+
+exit $exitstatus;;
+
+
+
+
+
+
+sub print_output_functions {
+ print OUT "$mymarker...\n";
+
+ print OUT <<'EOD';
+% The following three functions are for handling inlinelink. They wrap
+% a block of text which is potentially output with write$ by multiple
+% other functions, so we don't know the content a priori.
+% They communicate between each other using the variables makeinlinelink
+% (which is true if a link should be made), and closeinlinelink (which holds
+% the string which should close any current link. They can be called
+% at any time, but start.inlinelink will be a no-op unless something has
+% previously set makeinlinelink true, and the two ...end.inlinelink functions
+% will only do their stuff if start.inlinelink has previously set
+% closeinlinelink to be non-empty.
+% (thanks to 'ijvm' for suggested code here)
+FUNCTION {uand}
+{ 'skip$ { pop$ #0 } if$ } % 'and' (which isn't defined at this point in the file)
+FUNCTION {possibly.setup.inlinelink}
+{ makeinlinelink hrefform #0 > uand
+ { doi empty$ adddoiresolver uand
+ { pubmed empty$ addpubmedresolver uand
+ { eprint empty$ addeprints uand
+ { url empty$
+ { "" }
+ { url }
+ if$ }
+ { eprinturl eprint * }
+ if$ }
+ { pubmedurl pubmed * }
+ if$ }
+ { doiurl doi * }
+ if$
+ % an appropriately-formatted URL is now on the stack
+ hrefform #1 = % hypertex
+ { "\special {html:<a href=" quote$ * swap$ * quote$ * "> }{" * 'openinlinelink :=
+ "\special {html:</a>}" 'closeinlinelink := }
+ { "\href {" swap$ * "} {" * 'openinlinelink := % hrefform=#2 -- hyperref
+ % the space between "} {" matters: a URL of just the right length can cause "\% newline em"
+ "}" 'closeinlinelink := }
+ if$
+ #0 'makeinlinelink :=
+ }
+ 'skip$
+ if$ % makeinlinelink
+}
+FUNCTION {add.inlinelink}
+{ openinlinelink empty$
+ 'skip$
+ { openinlinelink swap$ * closeinlinelink *
+ "" 'openinlinelink :=
+ }
+ if$
+}
+EOD
+
+ # new.block is defined elsewhere
+
+ print OUT <<'EOD';
+FUNCTION {output.nonnull}
+{ % Save the thing we've been asked to output
+ 's :=
+ % If the bracket-state is close.brackets, then add a close-bracket to
+ % what is currently at the top of the stack, and set bracket.state
+ % to outside.brackets
+ bracket.state close.brackets =
+ { "]" *
+ outside.brackets 'bracket.state :=
+ }
+ 'skip$
+ if$
+ bracket.state outside.brackets =
+ { % We're outside all brackets -- this is the normal situation.
+ % Write out what's currently at the top of the stack, using the
+ % original output.nonnull function.
+ s
+ add.inlinelink
+ output.nonnull.original % invoke the original output.nonnull
+ }
+ { % Still in brackets. Add open-bracket or (continuation) comma, add the
+ % new text (in s) to the top of the stack, and move to the close-brackets
+ % state, ready for next time (unless inbrackets resets it). If we come
+ % into this branch, then output.state is carefully undisturbed.
+ bracket.state open.brackets =
+ { " [" * }
+ { ", " * } % bracket.state will be within.brackets
+ if$
+ s *
+ close.brackets 'bracket.state :=
+ }
+ if$
+}
+
+% Call this function just before adding something which should be presented in
+% brackets. bracket.state is handled specially within output.nonnull.
+FUNCTION {inbrackets}
+{ bracket.state close.brackets =
+ { within.brackets 'bracket.state := } % reset the state: not open nor closed
+ { open.brackets 'bracket.state := }
+ if$
+}
+
+FUNCTION {format.lastchecked}
+{ lastchecked empty$
+ { "" }
+ { inbrackets citedstring lastchecked * }
+ if$
+}
+EOD
+ print OUT "$mymarkerend\n";
+}
+
+sub print_webpage_def {
+ print OUT "$mymarker...\n";
+
+ # Some of the functions below call new.block, so we need a dummy
+ # version, in the case where the style being edited doesn't supply
+ # that function.
+ if (! $found{newblock}) {
+ print OUT "FUNCTION {new.block} % dummy new.block function\n{\n % empty\n}\n\n";
+ $found{newblock} = 1;
+ }
+
+ print OUT <<'EOD';
+% Functions for making hypertext links.
+% In all cases, the stack has (link-text href-url)
+%
+% make 'null' specials
+FUNCTION {make.href.null}
+{
+ pop$
+}
+% make hypertex specials
+FUNCTION {make.href.hypertex}
+{
+ "\special {html:<a href=" quote$ *
+ swap$ * quote$ * "> }" * swap$ *
+ "\special {html:</a>}" *
+}
+% make hyperref specials
+FUNCTION {make.href.hyperref}
+{
+ "\href {" swap$ * "} {\path{" * swap$ * "}}" *
+}
+FUNCTION {make.href}
+{ hrefform #2 =
+ 'make.href.hyperref % hrefform = 2
+ { hrefform #1 =
+ 'make.href.hypertex % hrefform = 1
+ 'make.href.null % hrefform = 0 (or anything else)
+ if$
+ }
+ if$
+}
+
+% If inlinelinks is true, then format.url should be a no-op, since it's
+% (a) redundant, and (b) could end up as a link-within-a-link.
+FUNCTION {format.url}
+{ inlinelinks #1 = url empty$ or
+ { "" }
+ { hrefform #1 =
+ { % special case -- add HyperTeX specials
+ urlintro "\url{" url * "}" * url make.href.hypertex * }
+ { urlintro "\url{" * url * "}" * }
+ if$
+ }
+ if$
+}
+EOD
+
+ $formateprintfunction = <<'EOD';
+FUNCTION {format.eprint}
+{ eprint empty$
+ { "" }
+ { eprintprefix eprint * eprinturl eprint * make.href }
+ if$
+}
+EOD
+ output_replacement_function($found{formateprint},
+ 'format.eprint',
+ 'addeprints',
+ $formateprintfunction);
+
+ $formatdoifunction = <<'EOD';
+FUNCTION {format.doi}
+{ doi empty$
+ { "" }
+ { doiprefix doi * doiurl doi * make.href }
+ if$
+}
+EOD
+ output_replacement_function($found{formatdoi},
+ 'format.doi',
+ 'adddoiresolver',
+ $formatdoifunction);
+
+ $formatpubmedfunction = <<'EOD';
+FUNCTION {format.pubmed}
+{ pubmed empty$
+ { "" }
+ { pubmedprefix pubmed * pubmedurl pubmed * make.href }
+ if$
+}
+EOD
+ output_replacement_function($found{formatpubmed},
+ 'format.pubmed',
+ 'addpubmedresolver',
+ $formatpubmedfunction);
+
+ print OUT <<'EOD';
+% Output a URL. We can't use the more normal idiom (something like
+% `format.url output'), because the `inbrackets' within
+% format.lastchecked applies to everything between calls to `output',
+% so that `format.url format.lastchecked * output' ends up with both
+% the URL and the lastchecked in brackets.
+FUNCTION {output.url}
+{ url empty$
+ 'skip$
+ { new.block
+ format.url output
+ format.lastchecked output
+ }
+ if$
+}
+
+FUNCTION {output.web.refs}
+{
+ new.block
+ inlinelinks
+ 'skip$ % links were inline -- don't repeat them
+ { % If the generated DOI will be the same as the URL,
+ % then don't print the URL (thanks to Joseph Wright for this code,
+ % at http://tex.stackexchange.com/questions/5660)
+ adddoiresolver
+ doiurl doi empty$ { "X" } { doi } if$ * % DOI URL to be generated
+ url empty$ { "Y" } { url } if$ % the URL, or "Y" if empty
+ = % are the strings equal?
+ and
+ 'skip$
+ { output.url }
+ if$
+ addeprints eprint empty$ not and
+ { format.eprint output.nonnull }
+ 'skip$
+ if$
+ adddoiresolver doi empty$ not and
+ { format.doi output.nonnull }
+ 'skip$
+ if$
+ addpubmedresolver pubmed empty$ not and
+ { format.pubmed output.nonnull }
+ 'skip$
+ if$
+ }
+ if$
+}
+
+% Wrapper for output.bibitem.original.
+% If the URL field is not empty, set makeinlinelink to be true,
+% so that an inline link will be started at the next opportunity
+FUNCTION {output.bibitem}
+{ outside.brackets 'bracket.state :=
+ output.bibitem.original
+ inlinelinks url empty$ not doi empty$ not or pubmed empty$ not or eprint empty$ not or and
+ { #1 'makeinlinelink := }
+ { #0 'makeinlinelink := }
+ if$
+}
+
+% Wrapper for fin.entry.original
+FUNCTION {fin.entry}
+{ output.web.refs % urlbst
+ makeinlinelink % ooops, it appears we didn't have a title for inlinelink
+ { possibly.setup.inlinelink % add some artificial link text here, as a fallback
+ linktextstring output.nonnull }
+ 'skip$
+ if$
+ bracket.state close.brackets = % urlbst
+ { "]" * }
+ 'skip$
+ if$
+ fin.entry.original
+}
+
+% Webpage entry type.
+% Title and url fields required;
+% author, note, year, month, and lastchecked fields optional
+% See references
+% ISO 690-2 http://www.nlc-bnc.ca/iso/tc46sc9/standard/690-2e.htm
+% http://www.classroom.net/classroom/CitingNetResources.html
+% http://neal.ctstateu.edu/history/cite.html
+% http://www.cas.usf.edu/english/walker/mla.html
+% for citation formats for web pages.
+FUNCTION {webpage}
+{ output.bibitem
+ author empty$
+ { editor empty$
+ 'skip$ % author and editor both optional
+ { format.editors output.nonnull }
+ if$
+ }
+ { editor empty$
+ { format.authors output.nonnull }
+ { "can't use both author and editor fields in " cite$ * warning$ }
+ if$
+ }
+ if$
+ new.block
+ title empty$ 'skip$ 'possibly.setup.inlinelink if$
+ format.title "title" output.check
+ inbrackets onlinestring output
+ new.block
+ year empty$
+ 'skip$
+ { format.date "year" output.check }
+ if$
+ % We don't need to output the URL details ('lastchecked' and 'url'),
+ % because fin.entry does that for us, using output.web.refs. The only
+ % reason we would want to put them here is if we were to decide that
+ % they should go in front of the rather miscellaneous information in 'note'.
+ new.block
+ note output
+ fin.entry
+}
+EOD
+
+ print OUT "$mymarkerend\n\n\n";
+}
+
+
+sub output_replacement_function {
+ my $emit_function = $_[0];
+ my $function_name = $_[1];
+ my $disabling_variable = $_[2];
+ my $function_definition_string = $_[3];
+
+ if ($emit_function > 0) {
+ print OUT <<"EOD";
+%%% The style file $infile already supports $function_name,
+%%% but it might not do so in the same way as urlbst expects.
+%%% I've therefore left $infile 's function unchanged,
+%%% and disabled urlbst's version; proceed with some caution.
+EOD
+
+ print STDERR "$progname: WARNING: style file $infile already includes a $function_name function;\nyou may need to disable the urlbst version by setting \$$disabling_variable to zero.\nYou might want to edit the output file (search for $function_name).\n";
+
+ ($t = $function_definition_string) =~ s/\n/\n%%% /g;
+ print OUT "%%% " . $t . "$mymarker\n";
+ } else {
+ print OUT $function_definition_string;
+ }
+ print OUT "\n";
+}
+
+sub print_missing_functions {
+ # We've got to the bit of the file which handles the entry
+ # types, so write out the webpage entry handler. This uses
+ # the format.date function, which which many but not all
+ # bst files have (for example, apalike doesn't). So
+ # check that we either have found this function already, or
+ # add it.
+ if (! $found{formatdate}) {
+ if ($found{entrymonth}) {
+ print OUT <<'EOD';
+FUNCTION {format.date}
+{ year empty$
+ { month empty$
+ { "" }
+ { "there's a month but no year in " cite$ * warning$
+ month
+ }
+ if$
+ }
+ { month empty$
+ 'year
+ { month " " * year * }
+ if$
+ }
+ if$
+}
+EOD
+ } else {
+ print OUT <<'EOD';
+FUNCTION {format.date}
+{ year empty$
+ 'skip$
+ { %write$
+ "(" year * ")" *
+ }
+ if$
+}
+EOD
+ }
+ $found{formatdate} = 1;
+ }
+
+ # If the style file didn't supply a format.title function, then supply
+ # one here (the {webpage} function requires it).
+ if (! $found{formattitle}) {
+ print OUT <<'EOD';
+FUNCTION {format.title}
+{ title empty$
+ { "" }
+ { title "t" change.case$ }
+ if$
+}
+EOD
+ $found{formattitle} = 1;
+ }
+}
+
+# Utility function: Keep track of open and close braces in the string argument.
+# Keep state in $bracematchtotal, return the current value.
+sub bracematcher {
+ my $s = shift;
+ $s =~ s/[^\{\}]//g;
+ #print "s=$s\n";
+ foreach my $c (split (//, $s)) {
+ $bracematchtotal += ($c eq '{' ? 1 : -1);
+ }
+ return $bracematchtotal;
+}
+
+# Utility function: use bracematcher to copy the complete block which starts
+# on or after the current line.
+sub copy_block {
+ $bracematchtotal = 0;
+ # copy any leading lines which don't have braces (presumably comments)
+ while (defined ($line = <IN>) && ($line !~ /{/)) {
+ print OUT $line;
+ }
+ while (defined ($line) && bracematcher($line) > 0) {
+ print OUT $line;
+ $line = <IN>;
+ }
+ print OUT "$line\n"; # print out terminating \} (assumed
+ # alone on the line)
+}
diff --git a/biblio/bibtex/contrib/urlbst/urlbst.pdf b/biblio/bibtex/contrib/urlbst/urlbst.pdf
new file mode 100644
index 0000000000..d3955eef1f
--- /dev/null
+++ b/biblio/bibtex/contrib/urlbst/urlbst.pdf
Binary files differ
diff --git a/biblio/bibtex/contrib/urlbst/urlbst.tex b/biblio/bibtex/contrib/urlbst/urlbst.tex
new file mode 100644
index 0000000000..7743ce0564
--- /dev/null
+++ b/biblio/bibtex/contrib/urlbst/urlbst.tex
@@ -0,0 +1,398 @@
+\documentclass[a4paper]{article}
+
+\title{The \texttt{urlbst} package}
+\author{Norman Gray\\\texttt{<http://nxg.me.uk>}}
+\date{Version 0.8, 2019 July 1}
+
+%\usepackage{times}
+\usepackage{url}
+\usepackage{hyperref}
+
+% Not long enough to make it useful to number sections
+\setcounter{secnumdepth}{0}
+
+% Squeeze a bit more on to the page
+%\addtolength\textwidth{1cm}
+%\addtolength\oddsidemargin{-0.5cm}
+
+\makeatletter
+% Easy verbatim mode
+\catcode`\|=\active
+\def|{\begingroup \let\do\@makeother \dospecials \verbatim@font \doverb}
+\def\doverb#1|{#1\endgroup}
+
+\renewcommand{\verbatim@font}{\normalfont\small\ttfamily}
+\makeatother
+
+\newcommand{\ub}{\package{urlbst}}
+\newcommand{\BibTeX}{Bib\TeX}
+\newcommand{\package}[1]{\texttt{#1}}
+\newcommand{\btfield}[1]{\textsf{#1}}
+
+\begin{document}
+\maketitle
+
+The \ub\ package consists of a Perl script which edits \BibTeX\ style
+files (|.bst|) to add a \btfield{webpage} entry type, and which adds a
+few new fields -- notably including \btfield{url} --
+to all other entry types. The distribution includes preconverted
+versions of the four standard \BibTeX\ |.bst| style files.
+
+It has a different goal from Patrick Daly's \package{custom-bib}
+package~\cite{url:daly} -- that is intended to create a \BibTeX\ style
+|.bst| file from scratch, and supports \btfield{url} and
+\btfield{eprint} fields. This package, on the other hand, is intended
+for the case where you already have a style file that works (or at
+least, which you cannot or will not change), and edits it to add the
+new \btfield{webpage} entry type, plus the new fields.
+
+The added fields are:
+\begin{itemize}
+\item \btfield{url} and \btfield{lastchecked}, to associate a URL with
+ a reference, along with the date at which the URL was last checked
+ to exist;
+\item \btfield{doi}, for a reference's DOI
+ (see \url{https://doi.org});
+\item \btfield{eprint}, for an arXiv eprint reference
+ (see \url{http://arxiv.org}); and
+\item \btfield{pubmed} for a reference's PubMed identifier
+ (\textsc{PMID}, see \url{http://pubmed.gov}).
+\end{itemize}
+
+Usage is simple:
+\begin{verbatim}
+% urlbst [--eprint] [--doi] [--pubmed]
+ [--nohyperlinks] [--inlinelinks] [--hypertex] [--hyperref]
+ [input-file [output-file]]
+\end{verbatim}
+where the |input-file| is an existing |.bst| file, and
+the |output-file| is the name of the new style file to be
+created. If either file name is missing, the default is the
+standard input or standard output respectively.
+For example:
+\begin{verbatim}
+% urlbst --eprint bibstyle.bst
+\end{verbatim}
+would convert the style file \texttt{bibstyle.bst}, including support
+for e-prints, and sending the result to the standard output (ie, the
+screen, so it would more useful if you were to either redirect this to
+a file or supply the output-file argument).
+
+If the option |--eprint| is present, then we switch on support for
+\texttt{eprint} fields in the modified .bst file, with a citation
+format matching that recommended in
+\url{http://arxiv.org/help/faq/references}. If the option
+|--doi| is present, we include support for a |doi| field, referring
+to a Digital Object Identifier (DOI) as standardised by
+\url{http://www.doi.org/}. And if |--pubmed| is present, we include
+support for a |pubmed| field, referring to a PubMed identifier as
+supported at \url{http://www.pubmed.gov}.
+
+If either of the |--hypertex| or |--hyperref| options is present, then
+the generated .bst file includes support for hyperlinks in the
+generated eprint entries in the bibliography, with the format being
+either Hyper\TeX\ (see
+\url{http://arxiv.org/hypertex/#implementation}), supported by xdvi,
+dvips and others, or using the support available from the
+\package{hyperref} package. These options have no effect unless one
+of the |--eprint|, |--doi|, |--pubmed| or |--inlinelinks| options is given:
+when URLs are included
+in the bibliography, they are written out using the |\url{...}|
+command. The \package{hyperref} support is more generic, and more
+generally supported, and so you should choose this unless you have a
+particular need for the Hyper\TeX\ support. The |--nohyperlinks|
+option, which is present by default, suppresses all hyperlinking.
+
+By default, any URL field is displayed as part of the bibliography
+entry, linked to the corresponding URL via the mechanism managed by
+the |--hypertex| and |--hyperref| options. If the |--inlinelinks|
+option is present, however, then the URL is not displayed in the
+printed entry, but instead a hyperlink is created, linked to suitable
+text within the bibliography entry, such as the citation title. This
+option does not affect the display of eprints, DOI or PubMed fields. It makes
+no sense to specify |--inlinelinks| with |--nohyperlinks|, and the
+script warns you if you do that, for example by failing to specify one
+of the link-style options. This option is (primarily) useful if
+you're preparing a version of a document which will be read on-screen;
+the point of it is that the resulting bibliography is substantially
+more compact than it would otherwise be.
+
+The support for all the above behaviours is always included in the
+output file. The options instead control only whether the various
+behaviours are enabled or disabled, and if you need to alter these,
+you may do so by editing the generated |.bst| file and adjusting
+values in the |{init.urlbst.variables}| function, where indicated.
+
+The generated references have URLs inside |\url{...}|. The best
+way to format this this is with the \package{url} package
+(see~\cite{texfaq} for pointers), but as a poor alternative, you can
+try |\newcommand{\url}[1]{\texttt{#1}}|. The \package{hyperref}
+package automatically processes |\url{...}| in the correct way to
+include a hyperlink, and if you have selected \package{hyperref}
+output, then nothing more need be done. If you selected Hyper\TeX\
+output, however, then the script encloses the |\url| command in an
+appropriate Hyper\TeX\ special.
+
+When the style file generates a link for DOIs, it does so by
+prepending the string \texttt{https://doi.org/} to the DOI. This is
+generally reasonable, but some DOIs have characters in them which are
+illegal in URLs, with the result that the resulting
+\texttt{dx.doi.org} URL doesn't work. The only real way of resolving
+this is to write a URL-encoding function in the style-file
+implementation language, but while that would doubtless be feasible in
+principle, it would be hard and very, very, ugly. The only advice I
+can offer in this case is to rely on the fact that the DOI will still
+appear in the typeset bibliography, and that users who would want to
+take advantage of the DOI will frequently (or usually?) know how to
+resolve the DOI when then need to. As a workaround, you could include
+a URL-encoded DOI URL in the \btfield{url} field of the entry (thanks
+to Eric Chamberland for this suggestion).
+
+The \ub\ script works by spotting patterns and characteristic function
+names in the input |.bst| file. It works as-is in the case of the
+four standard \BibTeX\ style files |plain.bst|, |unsrt.bst|,
+|alpha.bst| and |abbrv.bst|. It also works straightforwardly for
+many other style files -- since many of these are derived from, or at
+least closely inspired by, the standard ones -- but it does not
+pretend that it can do so for all of them. In some cases, such as the
+style files for the \package{refer} or \package{koma-script} packages,
+the style files are not intended to be used for formatting; others are
+sufficiently different from the standard files that a meaningful edit
+becomes impossible. For the large remainder, however, the result of
+this script should need only relatively minor edits before being
+perfectly usable.
+
+\section{New \texttt{.bib} entry and field types}
+
+The new entry type \btfield{webpage} has required fields
+\btfield{title} and \btfield{url}, and optional fields
+\btfield{author}, \btfield{editor}, \btfield{note}, \btfield{year},
+\btfield{month} and \btfield{lastchecked}. The \btfield{url} and
+\btfield{lastchecked} fields are new, and are
+valid in other entry types as well: the first, obviously, is the URL
+which is being cited, or which is being quoted as an auxiliary source
+for an article perhaps; the second is the date when you last checked
+that the URL was there, in the state you quoted it; this is necessary
+since some people, heedless of the archival importance of preserving
+the validity of URLs, indulge in the vicious practice of reorganising
+web pages and destroying links. For the case of the \btfield{webpage} entry
+type, the \btfield{editor} field should be used for the `maintainer'
+of a web page.
+
+For example, in Figure~\ref{f:ex} we illustrate two potential |.bib|
+file entries. The \texttt{@webpage} entry type is the new type
+provided by this package, and provides reference information for a
+webpage; it includes the new \texttt{url} and \texttt{lastchecked}
+fields. There is also an example of the standard \texttt{@book} entry
+type, which now includes the \texttt{url} and \texttt{lastchecked}
+fields as well. The difference between the two references is that in
+the \texttt{@book} case it is the book being cited, so that the
+\texttt{url} provides extra information; in the \texttt{@webpage} case
+it is the page itself which is of interest. You use the new |eprint|,
+|doi| and |pubmed| fields similarly, if the bibliographic item in
+question has an e-print, DOI or PubMed reference.
+\begin{figure}
+\begin{verbatim}
+@Manual{w3chome,
+ url = {http://www.w3.org},
+ title = {The World Wide Web Consortium},
+ year = 2009,
+ lastchecked = {26 August 2009}}
+
+@Book{schutz,
+ author = {Bernard Schutz},
+ title = {Gravity from the GroundUp},
+ publisher = {Cambridge University Press},
+ year = {2003},
+ url = {http://www.gravityfromthegroundup.org/},
+ lastchecked = {2008 June 16}}
+\end{verbatim}
+\caption{\label{f:ex}The new \texttt{@webpage} entry type, and the \texttt{url}
+ field in action}
+\end{figure}
+
+How do you use this in a document? To use the the
+\texttt{alphaurl.bst} style -- which is a pre-converted version of the
+standard \texttt{alpha.bst} style, included in the \texttt{urlbst}
+distribution -- you simply make sure that \texttt{alphaurl.bst} is in
+your BibTeX search path (use the command \texttt{kpsepath bst} to find
+this path and \texttt{kpsewhich alphaurl.bst} to confirm that BibTeX
+can find it) and add |\bibliographystyle{alphaurl}| to your \LaTeX\ document.
+
+\section{Sources}
+
+There are various sources which suggest how to format references to
+web pages. I have followed none specifically, but fortunately they do
+not appear to materially disagree.
+
+ISO-690~\cite{url:iso690} is a formal standard for this stuff. Walker
+and Taylor's \emph{Columbia Guide to Online Style}~\cite{walker06}
+provides extensive coverage (but is only available on dead trees).
+There are two style guides associated with the APA, namely
+the published APA style
+guide~\cite{apastyle} (a paper-only publication, so should be
+ignored by all, if there's any justice in the world), and what appears
+to be the 1998 web-citation proposal for that~\cite{url:weapas}, which
+also includes some useful links.
+The TeX FAQ~\cite{texfaq} has both practical advice and pointers to other sources.%
+\footnote{Emory University's Goizueta Business Library once had a collection of
+useful links on this topic, but they've whimsically changed the URL at least twice
+since I first distributed \ub, and I've got fed up fixing their broken link.}
+
+\section{Hints}
+
+If you use Emacs' \BibTeX\ mode, you can insert the following in your
+|.emacs| file to add knowledge of the new \btfield{webpage} entry:
+\begin{verbatim}
+(defun my-bibtex-hook ()
+ (setq bibtex-mode-user-optional-fields '("location" "issn")) ; e.g.
+ (setq bibtex-entry-field-alist
+ (cons
+ '("Webpage"
+ ((("url" "The URL of the page")
+ ("title" "The title of the resource"))
+ (("author" "The author of the webpage")
+ ("editor" "The editor/maintainer of the webpage")
+ ("year" "Year of publication of the page")
+ ("month" "Month of publication of the page")
+ ("lastchecked" "Date when you last verified the page was there")
+ ("note" "Remarks to be put at the end of the entry"))))
+ bibtex-entry-field-alist)))
+(add-hook 'bibtex-mode-hook 'my-bibtex-hook)
+\end{verbatim}
+After that, you can add a \btfield{webpage} entry by typing |C-c C-b webpage|
+(or |M-x bibtex-entry|).
+
+It is a \emph{very} good idea to use the \package{url} package: it deals with
+the problem of line-breaking long URLs, and with the problem that
+\BibTeX{} creates, of occasionally inserting \%-signs into URLs in
+generated bibliographies.
+
+See also the URL entry in the UK \TeX\ FAQ~\cite{texfaq}, and
+references therein.
+
+%% \textbf{Acknowledgements:} Thanks
+%% to Jason Eisner for suggesting the |--inlinelinks| option;
+%% to `ijvm' for code contributions in the |urlbst| script;
+%% to Pawe\l{} Widera for the suggestion to use |\path| when formatting DOIs;
+%% to Michael Giffin for the suggestion to include PubMed URLs;
+%% to Katrin Leinweber for the pull request which fixed the format of DOI
+%% references.
+
+\section{Acknowledgements, and release notes}
+
+%%% include:release-notes.tex
+
+
+Thanks are due to many people for suggestions and requests:
+to Jason Eisner for suggesting the |--inlinelinks| option;
+to ‘ijvm’ for code contributions in the |urlbst| script;
+to Paweł Widera for the suggestion to use |\path| when formatting DOIs;
+to Michael Giffin for the suggestion to include PubMed URLs;
+to Katrin Leinweber for the pull request which fixed the format of DOI
+references.
+
+\begin{description}
+\item[\textbf{0.8, 2019 July 1}]\relax
+\begin{itemize}
+\item The presence of a preexisting |format.doi|,
+|format.eprint| or |format.pubmed| function is
+now detected, and warned about. The resulting |.bst| file
+might still require some manual editing.
+Resolves issue 8\footnote{\url{https://bitbucket.org/nxg/urlbst/issue/8}}.
+\item Clarified licences (I hope).
+\item Adjust format of DOI resolver.
+Resolves issue 11\footnote{\url{https://bitbucket.org/nxg/urlbst/issue/11}},
+thanks to
+code contributed by Katrin Leinweber\footnote{\url{https://bitbucket.org/nxg/urlbst/pull-requests/1/}}.
+\end{itemize}
+
+
+\item[0.7, 2011 July 20]\relax
+Add |--nodoi|, |--noeprints| and |--nopubmed| options (which defaulted
+on, and couldn't otherwise be turned off)
+
+\item[0.7b1, 2011 March 17]\relax
+Allow parameterisation of literal strings, with option |--literal|.
+
+\item[0.6-5, 2011 March 8]\relax
+Adjust support for inline links (should now work for arXiv, DOI and Pubmed)
+
+\item[0.6-4, 2009 April 28]\relax
+Work around BibTeX linebreaking bug (thanks to Andras Salamon for the bug report).
+
+\item[0.6-3, 2009 April 19]\relax
+Fix inline link generation (thanks to Eric Chamberland for the bug report).
+
+\item[0.6-2, 2008 November 17]\relax
+We now turn on inlinelinks when we spot format.vol.num.pages,
+which means we include links for those styles which don't include a
+title in the citation (common for articles in physical science styles,
+such as aip.sty).
+
+\item[0.6-1, 2008 June 16]\relax
+Fixed some broken links to the various citation standards
+(I think in this context this should probably \emph{not} be happening, yes?).
+The distributed |*url.bst| no longer have the
+|--inlinelinks| option turned on by default.
+
+\item[\textbf{0.6, 2007 March 26}]\relax
+\begin{itemize}
+\item Added the option |--inlinelinks|, which adds inline hyperlinks
+to any bibliography entries which have URLs, but does so inline, rather
+than printing the URL explicitly in the bibliography. This is (primarily)
+useful if you're preparing a version of a document which will be read
+on-screen. Thanks to Jason Eisner for the suggestion, and much testing.
+
+\item Incorporate hyperref bugfixes from Paweł Widera.
+
+\item Further reworkings of the inlinelinks support, so that it's now
+fired by a |format.title| (or |format.btitle|) line, with a fallback in
+|fin.entry|. This should be more robust, and allows me to delete some
+of the previous version's gymnastics.
+
+\item Reworked |inlinelinks| support; should now be more
+robust. Incorporate hyperref bugfixes from Paweł Widera.
+
+\item Added the option |inlinelinks|, which adds inline hyperlinks
+to any bibliography entries which have URLs, but does so inline, rather
+than printing the URL explicitly in the bibliography. This is (only)
+useful if you're preparing a version of a document which will be read
+on-screen.
+\end{itemize}
+
+
+\item[0.5.2, 2006 September 6]\relax
+Another set of documentation-only changes, hopefully clarifying
+installation.
+
+\item[0.5.1, 2006 January 10]\relax
+No functionality changes. Documentation and webpage changes only,
+hopefully clarifying usage and configuration
+
+\item[\textbf{0.5, 2005 June 3}]\relax
+Added support for Digital Object Identifiers (DOI) fields in
+bibliographies.
+
+\item[0.4-1, 2005 April 12]\relax
+Documentation improvements -- there are now examples in the help text!
+
+\item[\textbf{0.4, 2004 December 1}]\relax
+Bug fixes: now compatible with mla.bst and friends.
+Now uses |./configure| (optionally). Assorted reorganisation.
+
+\item[\textbf{0.3, 2003 June 4}]\relax
+Added |--eprint|, |--hypertex| and |--hyperref| options.
+
+\item[\textbf{0.2, 2002 October 23}]\relax
+The `editor' field is now supported in the webpage entry type. Basic
+documentation added.
+
+\item[\textbf{0.1, 2002 April}]\relax
+Initial version
+\end{description}
+
+\bibliography{urlbst}
+\bibliographystyle{plainurl}
+
+\end{document}
diff --git a/biblio/bibtex/contrib/vak/README b/biblio/bibtex/contrib/vak/README
new file mode 100644
index 0000000000..2da309bb06
--- /dev/null
+++ b/biblio/bibtex/contrib/vak/README
@@ -0,0 +1,25 @@
+%% This is the bibliography stylefile `vak.bst' by Vitaly Melnikov
+
+%% The file can be used to format the bibliographies of PhD thesys, books etc.
+%% according to the latest Russian standards: GOST 7.82 --- 2001 and GOST 7.1 --- 2003.
+%% It introduces the minimum number new entries and styles to cover all frequently used
+%% situations. The style file provides an easy way to perform a semiautomatic,
+%% or a completely manual sort of the list of the references.
+%% The file contains parts of the stylefile file 'gost780s.bst' (v.2005.08.12)
+
+%% This file may be distributed and/or modified under the
+%% conditions of the LaTeX Project Public License
+
+%% Requires 8-bit bibtex with switch -B and csf file supporting cyrillic.
+%% bibtex8 -B -c <encoding>.csf <your_document>
+
+
+%% Please, send any bug reports via e-mail:
+%% melnikov at mail dot ifmo dot ru
+
+%% See examples *.pdf, *.tex (in Russian)
+
+%% Acknowledgements:
+%% to Maksym Polyakov for his stylefile file 'gost780s.bst'
+%% to Aleksandr Kirilenko (our university's bibliographer) for his useful consultations
+
diff --git a/biblio/bibtex/contrib/vak/vak.bst b/biblio/bibtex/contrib/vak/vak.bst
new file mode 100644
index 0000000000..12a64150e6
--- /dev/null
+++ b/biblio/bibtex/contrib/vak/vak.bst
@@ -0,0 +1,1558 @@
+%% This is the bibliography stylefile `vak.bst' by Vitaly Melnikov
+
+%% The file can be used to format the bibliographies of PhD thesys, books etc.
+%% according to the latest Russian standarts: GOST 7.82 2001 and GOST 7.1 2003.
+%% It introduces the minimum number new entries and styles to cover all frequently used
+%% situations. The style file provides an easy way to perform a semiautomatic,
+%% or a completely manual sort of the list of the references.
+%% The file contains parts of the stylefile file 'gost780s.bst' (v.2005.08.12)
+
+%% This file may be distributed and/or modified under the
+%% conditions of the LaTeX Project Public License
+
+%% Requires 8-bit bibtex with switch -B and csf file supporting cyrillic.
+%% bibtex8 -B -c <encoding>.csf <your_document>
+
+
+%% Please, send any bug reports via e-mail:
+%% melnikov at mail dot ifmo dot ru
+
+%% See examples *.pdf, *.tex (in Russian)
+
+%% Acknowledgements:
+%% to Maksym Polyakov for his stylefile file 'gost780s.bst'
+%% to Aleksandr Kirilenko (our university's bibliographer) for his useful consultations
+
+
+
+ENTRY
+ { address
+ annote
+ author
+ booktitle
+ bookauthor
+ chapter
+ edition
+ editor
+ compiler %
+ comment % misk
+ howpublished
+ institution
+ journal
+ key
+ month
+ note
+ number
+ organization
+ pages
+ numpages
+ publisher
+ school
+ series
+ title
+ type
+ volume
+ year
+ language
+ booklanguage
+ url
+ vipusk
+ znumber
+ country %%
+ perevod %%
+ }
+ {}
+ { label }
+
+INTEGERS { output.state before.all mid.sentence after.sentence after.block
+after.dblslash after.slash after.column after.semicolumn}
+
+FUNCTION {init.state.consts}
+{ #0 'before.all :=
+ #1 'mid.sentence :=
+ #2 'after.sentence :=
+ #3 'after.block :=
+ #4 'after.dblslash :=
+ #5 'after.slash :=
+ #6 'after.column :=
+ #7 'after.semicolumn :=
+}
+
+STRINGS { s t }
+
+STRINGS { curlanguage }
+
+FUNCTION {change.language}
+{ booklanguage empty$
+ {""}
+ {booklanguage 'curlanguage :=
+ "\selectlanguageifdefined{"
+ curlanguage *
+ "}" *
+ }
+ if$
+}
+
+FUNCTION {output.nonnull}
+{ swap$
+ output.state mid.sentence =
+ { ", " * write$ }
+ { output.state after.block =
+ { add.period$ write$
+ "\, ---\, " write$
+ newline$
+ "\newblock " write$
+ }
+ { output.state before.all =
+ 'write$
+ { output.state after.dblslash =
+ { "~//" * change.language * " " * write$ }
+ { output.state after.slash =
+ { "~/ " * write$ }
+ { output.state after.column =
+ { "~: \," * write$ }
+ { output.state after.semicolumn =
+ { "~; \," * write$ }
+ { add.period$ " " * write$ }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+ mid.sentence 'output.state :=
+ }
+ if$
+}
+
+FUNCTION {output}
+{ duplicate$ empty$
+ 'pop$
+ 'output.nonnull
+ if$
+}
+
+FUNCTION {output.check}
+{ 't :=
+ duplicate$ empty$
+ { pop$ "empty " t * " in " * cite$ * warning$ }
+ 'output.nonnull
+ if$
+}
+
+FUNCTION {fin.entry}
+{ add.period$
+ write$
+ newline$
+}
+
+FUNCTION {new.block}
+{ output.state before.all =
+ 'skip$
+ { after.block 'output.state := }
+ if$
+}
+
+FUNCTION {new.dblslash}
+{ output.state before.all =
+ 'skip$
+ { after.dblslash 'output.state := }
+ if$
+}
+
+FUNCTION {new.slash}
+{ output.state before.all =
+ 'skip$
+ { after.slash 'output.state := }
+ if$
+}
+
+FUNCTION {new.column}
+{ output.state before.all =
+ 'skip$
+ { after.column 'output.state := }
+ if$
+}
+
+FUNCTION {new.semicolumn}
+{ output.state before.all =
+ 'skip$
+ { after.semicolumn 'output.state := }
+ if$
+}
+
+FUNCTION {new.sentence}
+{ output.state after.block =
+ 'skip$
+ { output.state before.all =
+ 'skip$
+ { after.sentence 'output.state := }
+ if$
+ }
+ if$
+}
+
+FUNCTION {add.blank}
+{ " " * before.all 'output.state :=
+}
+
+FUNCTION {not}
+{ { #0 }
+ { #1 }
+ if$
+}
+
+FUNCTION {and}
+{ 'skip$
+ { pop$ #0 }
+ if$
+}
+
+FUNCTION {or}
+{ { pop$ #1 }
+ 'skip$
+ if$
+}
+
+FUNCTION {non.stop}
+{ duplicate$
+ "}" * add.period$
+ #-1 #1 substring$ "." =
+}
+
+FUNCTION {new.block.checka}
+{ empty$
+ 'skip$
+ 'new.block
+ if$
+}
+
+FUNCTION {new.block.checkb}
+{ empty$
+ swap$ empty$
+ and
+ 'skip$
+ 'new.block
+ if$
+}
+
+FUNCTION {new.sentence.checka}
+{ empty$
+ 'skip$
+ 'new.sentence
+ if$
+}
+
+FUNCTION {new.sentence.checkb}
+{ empty$
+ swap$ empty$
+ and
+ 'skip$
+ 'new.sentence
+ if$
+}
+
+FUNCTION {field.or.null}
+{ duplicate$ empty$
+ { pop$ "" }
+ 'skip$
+ if$
+}
+
+FUNCTION {emphasize}
+{ duplicate$ empty$
+ { pop$ "" }
+ { "\BibEmph{" swap$ * "}" * }
+ if$
+}
+
+
+
+FUNCTION {space.word}
+{ " " swap$ * " " * }
+
+FUNCTION {bbl.edby} % { "\bbledby{}" }
+{ curlanguage "english" =
+ {"ed. by "}
+ { curlanguage "ukrainian" =
+ {"{\cyr\cyrp \cyrii\cyrd\ \cyrr\cyre\cyrd.\ }"}
+ { curlanguage "russian" =
+ {"{\cyr\cyrp\cyro\cyrd\ \cyrr\cyre\cyrd.\ }"}
+ {"language is not defined: " language "edited by" * * warning$ "edited by"}
+ if$}
+ if$}
+ if$
+}
+
+FUNCTION {bbl.cmplr}
+{ curlanguage "english" =
+ {"compiler "}
+ { curlanguage "ukrainian" =
+ {"{\cyr\cyru \cyrk\cyrl.\ }"}
+ { curlanguage "russian" =
+ {"{\cyr\cyrs \cyro\cyrs\cyrt.\ }"}
+ {"language is not defined: " language "compiler" * * warning$ "compiler"}
+ if$}
+ if$}
+ if$
+}
+
+FUNCTION {bbl.trnsl}
+{ curlanguage "english" =
+ {"transl. by "}
+ { curlanguage "ukrainian" =
+ {"{\cyr\cyrp\cyre\cyrr.\ }"}
+ { curlanguage "russian" =
+ {"{\cyr\cyrp\cyre\cyrr.\ }"}
+ {"language is not defined: " language "translater" * * warning$ "translater"}
+ if$}
+ if$}
+ if$
+}
+
+FUNCTION {bbl.edition} % { "\bbledition{}" }
+{ curlanguage "english" =
+ {"edition"}
+ { curlanguage "ukrainian" =
+ {"{\cyr\cyrv\cyri\cyrd.}"}
+ { curlanguage "russian" =
+ {"{\cyr\cyri\cyrz\cyrd.}"}
+ {"language is not defined: " language "edition" * * warning$ "edition"}
+ if$}
+ if$}
+ if$
+}
+
+FUNCTION {bbl.vvol} % { "\bblVol{}" }
+{ curlanguage "english" =
+ {"V."}
+ { curlanguage "ukrainian" = curlanguage "russian" = or
+ {"\CYRT."}
+ {"language is not defined: " language "V." * * warning$ "V."}
+ if$}
+ if$
+}
+
+FUNCTION {bbl.iiss} % { "\bblIss{}" }
+{ curlanguage "english" =
+ {"Iss."}
+ { curlanguage "ukrainian" =
+ {"\CYRV\cyri\cyrp."}
+ { curlanguage "russian" =
+ {"\CYRV\cyrery\cyrp."}
+ {"language is not defined: " language * warning$ "Issue"}
+ if$}
+ if$}
+ if$
+}
+
+FUNCTION {bbl.of} % { "\bblof{}" }
+{ curlanguage "english" =
+ {"of"}
+ { curlanguage "ukrainian" =
+ {"{\cyr\cyrii\cyrz}"}
+ { curlanguage "russian" =
+ {"{\cyr\cyri\cyrz}"}
+ {"language is not defined: " language "of" * * warning$ "of"}
+ if$}
+ if$}
+ if$
+}
+
+FUNCTION {bbl.etal} % { "\bblof{}" }
+{ curlanguage "english" =
+ {"et~al."}
+ { curlanguage "ukrainian" =
+ {"{\cyr\cyrt\cyra~\cyrii\cyrn.}"}
+ { curlanguage "russian" =
+ {"{\cyr\cyri~\cyrd\cyrr.}"}
+ {"language is not defined: " language "at al" * * warning$ "at al."}
+ if$}
+ if$}
+ if$
+}
+
+FUNCTION {bbl.nr} % { "\bblno{}" }
+{ curlanguage "english" =
+ {"$\No$"}
+ { curlanguage "ukrainian" = curlanguage "russian" = or
+ {"{\cyr\textnumero}"}
+ {"language is not defined: " language "$\No$" * * warning$ "$\No$"}
+ if$}
+ if$
+}
+
+FUNCTION {bbl.pages} % { "\bblpp." }
+{ curlanguage "english" =
+ {"P."}
+ { curlanguage "ukrainian" = curlanguage "russian" = or
+ {"{\cyr\cyrs.}"}
+ {"language is not defined: " language "P." * * warning$ "P."}
+ if$}
+ if$
+}
+
+FUNCTION {bbl.ppages}% { "\bblPp." }
+{ curlanguage "english" =
+ {"P."}
+ { curlanguage "ukrainian" = curlanguage "russian" = or
+ {"{\cyr\CYRS.}"}
+ {"language is not defined: " language "P." * * warning$ "P."}
+ if$}
+ if$
+}
+
+FUNCTION {bbl.ppage} % { "\bblP." }
+{ curlanguage "english" =
+ {"P."}
+ { curlanguage "ukrainian" = curlanguage "russian" = or
+ {"{\cyr\CYRS.}"}
+ {"language is not defined: " language "P." * * warning$ "P."}
+ if$}
+ if$
+}
+
+FUNCTION {bbl.mthesis} { "Master's thesis" }
+
+FUNCTION {bbl.phdthesis} { "Ph.D. thesis" }
+
+INTEGERS { nameptr namesleft numnames }
+
+
+FUNCTION {format.names}
+{
+ #1 "{vv~}{ll}{~jj}{,~f.}" format.name$
+}
+
+FUNCTION {format.names.rev}
+{ 's :=
+ #1 'nameptr :=
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ { s nameptr
+ "{f.}{~vv}{~ll}{, jj}"
+ format.name$ 't :=
+ nameptr #1 >
+ {
+ nameptr #4 =
+ numnames #4 > and
+ { "others" 't :=
+ #1 'namesleft := }
+ 'skip$
+ if$
+ namesleft #1 >
+ { ", " * t * }
+ {
+ t "others" =
+ t "~others" =
+ or
+ { " " * bbl.etal * }
+ { ", " * t * }
+ if$
+ }
+ if$
+ }
+ 't
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+}
+
+FUNCTION {myformat.names}
+{ 's :=
+ #1 'nameptr :=
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ { s nameptr
+ "{vv~}{ll}{~jj}{,~f.}"
+ format.name$ 't :=
+ nameptr #1 >
+ {
+ nameptr #4 =
+ numnames #4 > and
+ { "others" 't :=
+ #1 'namesleft := }
+ 'skip$
+ if$
+ namesleft #1 >
+ { ", " * t * }
+ {
+ t "others" =
+ t "~others" =
+ or
+ { " " * bbl.etal * }
+ { ", " * t * }
+ if$
+ }
+ if$
+ }
+ 't
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+}
+
+
+FUNCTION {format.authors}
+{ author empty$
+ { "" }
+ { author format.names emphasize}
+ if$
+}
+
+FUNCTION {format.bookauthors}
+{ bookauthor empty$
+ { "" }
+ { bookauthor format.names}
+ if$
+}
+
+FUNCTION {format.authors.after}
+{ author empty$
+ { "" }
+ { author format.names.rev}
+ if$
+}
+
+FUNCTION {myformat.authors.after}
+{ author empty$
+ { "" }
+ { author myformat.names}
+ if$
+}
+
+FUNCTION {format.bookauthors.after}
+{ bookauthor empty$
+ { "" }
+ { bookauthor format.names.rev}
+ if$
+}
+
+FUNCTION {format.editors.after}
+{ editor empty$
+ { "" }
+ { bbl.edby editor format.names.rev *
+ }
+ if$
+}
+
+FUNCTION {format.compiler.after}
+{ compiler empty$
+ { "" }
+ { bbl.cmplr compiler format.names.rev *
+ }
+ if$
+}
+
+FUNCTION {format.perevod}
+{ perevod empty$
+{ "" }
+{ bbl.trnsl perevod *
+}
+if$
+}
+
+FUNCTION {format.title}
+{ title empty$
+ { "" }
+ { title
+ }
+ if$
+}
+
+FUNCTION {format.date}
+{ year empty$
+ { month empty$
+ { "" }
+ { "there's a month but no year in " cite$ * warning$
+ month
+ }
+ if$
+ }
+ { month empty$
+ 'year
+ { year ". " quote$ "--- " month * * * * }
+ if$
+ }
+ if$
+}
+FUNCTION {tie.or.space.connect}
+{ duplicate$ text.length$ #3 <
+ { "~" }
+ { " " }
+ if$
+ swap$ * *
+}
+
+FUNCTION {output.address.publisher.date} {
+ address empty$
+ 'skip$
+ { address output
+ publisher empty$
+ 'skip$
+ { new.column
+ }
+ if$
+ }
+ if$
+ publisher output
+ format.date output
+}
+
+
+FUNCTION {output.bibitem}
+{ newline$
+ "\bibitem{" write$
+ cite$ write$
+ "}" write$
+ newline$
+ language empty$
+ {"english" 'curlanguage :=}
+ {language 'curlanguage :=}
+ if$
+ "\selectlanguageifdefined{" write$
+ curlanguage write$
+ "}" write$ newline$
+ ""
+ before.all 'output.state :=
+}
+
+FUNCTION {n.dashify}
+{ 't :=
+ ""
+ { t empty$ not }
+ { t #1 #1 substring$ "-" =
+ { t #1 #2 substring$ "--" = not
+ { "--" *
+ t #2 global.max$ substring$ 't :=
+ }
+ { { t #1 #1 substring$ "-" = }
+ { "-" *
+ t #2 global.max$ substring$ 't :=
+ }
+ while$
+ }
+ if$
+ }
+ { t #1 #1 substring$ *
+ t #2 global.max$ substring$ 't :=
+ }
+ if$
+ }
+ while$
+}
+
+FUNCTION {word.in}
+{ bbl.iin
+ " " * }
+
+FUNCTION {format.btitle}
+{ title
+}
+
+FUNCTION {tie.connect}
+ {"~"
+ swap$ * *
+ }
+
+FUNCTION {either.or.check}
+{ empty$
+ 'pop$
+ { "can't use both " swap$ * " fields in " * cite$ * warning$ }
+ if$
+}
+
+FUNCTION {format.bvolume}
+{ volume empty$
+ { "" }
+ { bbl.vvol volume tie.connect
+ series empty$
+ 'skip$
+ { bbl.of space.word * series emphasize * }
+ if$
+ "volume and number" number either.or.check
+ }
+ if$
+}
+
+FUNCTION {format.number.series}
+{ volume empty$
+ { number empty$
+ { series field.or.null }
+ { series empty$
+ { "there's a number but no series in " cite$ * warning$
+ bbl.nr }
+ {
+ %new.dblslash
+ new.sentence
+ series
+ bbl.nr
+ tie.or.space.connect}
+ if$
+ number tie.or.space.connect
+ }
+ if$
+ }
+ { "" }
+ if$
+}
+
+
+
+FUNCTION {is.num}
+{ chr.to.int$
+ duplicate$ "0" chr.to.int$ < not
+ swap$ "9" chr.to.int$ > not and
+}
+
+FUNCTION {extract.num}
+{ duplicate$ 't :=
+ "" 's :=
+ { t empty$ not }
+ { t #1 #1 substring$
+ t #2 global.max$ substring$ 't :=
+ duplicate$ is.num
+ { s swap$ * 's := }
+ { pop$ "" 't := }
+ if$
+ }
+ while$
+ s empty$
+ 'skip$
+ { pop$ s }
+ if$
+}
+
+
+FUNCTION {convert.edition}
+{ edition
+}
+
+FUNCTION {format.edition}
+{ edition empty$
+ { "" }
+ { output.state mid.sentence =
+ { convert.edition "l" change.case$ " " * bbl.edition * }
+ { convert.edition "t" change.case$ " " * bbl.edition * }
+ if$
+ }
+ if$
+}
+
+INTEGERS { multiresult }
+
+FUNCTION {multi.page.check}
+{ 't :=
+ #0 'multiresult :=
+ { multiresult not
+ t empty$ not
+ and
+ }
+ { t #1 #1 substring$
+ duplicate$ "-" =
+ swap$ duplicate$ "," =
+ swap$ "+" =
+ or or
+ { #1 'multiresult := }
+ { t #2 global.max$ substring$ 't := }
+ if$
+ }
+ while$
+ multiresult
+}
+
+FUNCTION {format.pages}
+{ pages empty$
+ { "" }
+ { pages multi.page.check
+ { bbl.ppages pages n.dashify tie.connect }
+ { bbl.ppage pages tie.connect }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.pages.page}
+{ pages empty$
+ { numpages empty$
+ { "" }
+ { numpages bbl.pages tie.connect }
+ if$}
+ { format.pages}
+ if$
+}
+
+FUNCTION {format.vol.num.pages}
+{ volume field.or.null
+ number empty$
+ 'skip$
+ {
+ ", $\No$" number tie.or.space.connect *
+ volume empty$
+ { "there's a number but no volume in " cite$ * warning$ }
+ 'skip$
+ if$
+ }
+ if$
+ pages empty$
+ 'skip$
+ { duplicate$ empty$
+ { pop$ format.pages }
+ { ": " * pages n.dashify * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.volume}
+{ volume empty$
+ { "" }
+ { bbl.vvol volume tie.or.space.connect }
+ if$
+}
+
+FUNCTION {format.number}
+{ number empty$
+ { "" }
+ { bbl.nr number tie.or.space.connect }
+ if$
+}
+
+FUNCTION {format.znumber}
+{ number empty$
+ { "" }
+ { bbl.nr znumber tie.or.space.connect }
+ if$
+}
+
+FUNCTION {format.vipusk}
+{ vipusk empty$
+ { "" }
+ { bbl.iiss vipusk tie.or.space.connect }
+ if$
+}
+
+
+
+
+
+
+
+FUNCTION {myformat.number}
+{ number empty$
+ { "" }
+ { " \CYRP\cyra\cyrt. " number country tie.or.space.connect }
+ if$
+}
+
+FUNCTION {myzformat.number}
+{ number empty$
+ { "" }
+ { " \CYRZ\cyra\cyrya\cyrv\cyrk\cyra\ " number country tie.or.space.connect }
+ if$
+}
+
+FUNCTION {empty.misc.check}
+{ author empty$ title empty$ howpublished empty$
+ month empty$ year empty$ note empty$
+ and and and and and
+ key empty$ not and
+ { "all relevant fields are empty in " cite$ * warning$ }
+ 'skip$
+ if$
+}
+
+FUNCTION {format.thesis.type}
+{ type empty$
+ 'skip$
+ { pop$
+ type %%"t" change.case$
+ }
+ if$
+}
+
+
+FUNCTION {author.before}
+{
+ author empty$
+ 'skip$
+ {author num.names$ #4 <
+ {format.authors output
+ new.sentence}
+ 'skip$
+ if$}
+ if$
+}
+
+FUNCTION {bookauthor.before}
+{
+ bookauthor empty$
+ 'skip$
+ {bookauthor num.names$ #4 <
+ {format.bookauthors output
+ new.sentence}
+ 'skip$
+ if$}
+ if$
+}
+
+
+FUNCTION {author.after}
+{
+ author empty$
+ 'skip$
+ {format.authors.after output
+ new.semicolumn }
+ if$
+}
+
+FUNCTION {myauthor.after}
+{
+ author empty$
+ 'skip$
+ {myformat.authors.after output
+ new.semicolumn }
+ if$
+}
+
+FUNCTION {bookauthor.after}
+{
+ bookauthor empty$
+ 'skip$
+ {format.bookauthors.after output
+ new.semicolumn }
+ if$
+}
+
+FUNCTION {editor.organization.after}
+{
+
+ compiler empty$
+ {}
+ { format.compiler.after output
+ new.semicolumn
+ }
+ if$
+ editor empty$
+ {}
+ { format.editors.after output
+ new.semicolumn
+ }
+ if$
+ perevod empty$
+ {}
+ { format.perevod output
+ new.semicolumn
+ }
+ if$
+ organization empty$
+ {}
+ {organization output
+ new.semicolumn
+ }
+ if$
+}
+
+FUNCTION {format.url}
+{ url empty$
+ { "" }
+ { curlanguage "english" =
+ { %%after.sentence 'output.state :=
+ "Mode of access\BibUrl{ " url * "}" *}
+ {%% after.sentence 'output.state :=
+ "\CYRR\cyre\cyrzh\cyri\cyrm\ \cyrd\cyro\cyrs\cyrt\cyru\cyrp\cyra:\ \BibUrl{ " url * "}" *}
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.annote}
+{ annote empty$
+ { "" }
+{ after.sentence 'output.state :=
+ "\BibAnnote{" annote add.period$ * "}" *
+}
+ if$
+}
+
+FUNCTION {article}
+{ output.bibitem
+ author.before
+ format.title "title" output.check
+ new.slash
+ author.after
+ new.dblslash
+ journal emphasize "journal" output.check
+ series emphasize "series" output.check
+ new.block
+ format.date output
+ new.block
+ format.volume output
+ format.number output
+ new.block
+ format.vipusk output
+ new.block
+ format.pages.page output
+ new.block
+ format.url output
+ new.sentence
+ note output
+ format.annote output
+ fin.entry
+}
+
+FUNCTION {book}
+{ output.bibitem
+ author.before
+ format.btitle "title" output.check
+ new.slash
+ author.after
+ editor.organization.after
+ new.sentence
+ format.number.series output
+ new.block
+ format.edition output
+ new.block
+ output.address.publisher.date
+ new.block
+ format.bvolume output
+ new.block
+ format.pages.page output
+ new.block
+ format.url output
+ new.sentence
+ note output
+ format.annote output
+ fin.entry
+}
+
+FUNCTION {patent}
+{ output.bibitem
+ myformat.number output
+ format.btitle "title" output.check
+ new.slash
+ myauthor.after
+ editor.organization.after
+ new.block
+ format.znumber output
+ new.semicolumn
+ note output
+ new.block
+ format.pages.page output
+ fin.entry
+}
+
+FUNCTION {zpatent}
+{ output.bibitem
+ myzformat.number output
+ format.btitle "title" output.check
+ new.slash
+ myauthor.after
+ editor.organization.after
+ new.block
+ format.znumber output
+ new.semicolumn
+ note output
+ new.block
+ format.pages.page output
+ fin.entry
+}
+
+FUNCTION {booklet}
+{ output.bibitem
+ author.before
+ format.title "title" output.check
+ new.slash
+ author.after
+ editor.organization.after
+ new.block
+ howpublished output
+ address output
+ format.date output
+ new.block
+ format.pages.page output
+ new.block
+ note output
+ new.sentence
+ format.url output
+ format.annote output
+ fin.entry
+}
+
+FUNCTION {inbook}
+{ output.bibitem
+ author.before
+ format.btitle "title" output.check
+ new.slash
+ author.after
+ new.dblslash
+ bookauthor.before
+ booktitle "booktitle" output.check
+ new.slash
+ bookauthor.after
+ editor.organization.after
+ new.block
+ format.edition output
+ new.block
+ format.number.series output
+ new.sentence
+ output.address.publisher.date
+ new.block
+ format.bvolume output
+ format.pages.page output
+ new.block
+ note output
+ new.sentence
+ format.url output
+ format.annote output
+ fin.entry
+}
+
+FUNCTION {incollection}
+{ output.bibitem
+ author.before
+ new.sentence
+ format.title "title" output.check
+ new.slash
+ author.after
+ new.dblslash
+ booktitle "booktitle" output.check
+ new.slash
+ editor.organization.after
+ new.block
+ output.address.publisher.date
+ new.block
+ format.bvolume output
+ format.number.series output
+ new.block
+ format.pages.page output
+ new.block
+ note output
+ new.sentence
+ format.url output
+ format.annote output
+ fin.entry
+}
+
+FUNCTION {inproceedings}
+{ output.bibitem
+ author.before
+ new.sentence
+ format.title "title" output.check
+ new.slash
+ author.after
+ new.dblslash
+ booktitle "booktitle" output.check
+ new.slash
+ editor.organization.after
+ new.block
+ format.bvolume output
+ format.number.series output
+ new.block
+ output.address.publisher.date
+ new.block
+ format.pages.page output
+ new.block
+ note output
+ new.sentence
+ format.url output
+ format.annote output
+ fin.entry
+}
+
+FUNCTION {conference} { inproceedings }
+
+FUNCTION {manual}
+{ output.bibitem
+ author empty$
+ { organization empty$
+ 'skip$
+ { organization output.nonnull
+ address output
+ }
+ if$
+ }
+ { format.authors output.nonnull }
+ if$
+ new.block
+ format.btitle "title" output.check
+ author empty$
+ { organization empty$
+ {
+ address new.block.checka
+ address output
+ }
+ 'skip$
+ if$
+ }
+ {
+ organization address new.block.checkb
+ organization output
+ address output
+ }
+ if$
+ format.edition output
+ format.date output
+ new.block
+ note output
+ new.sentence
+ format.url output
+ format.annote output
+ fin.entry
+}
+
+FUNCTION {mastersthesis}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.btitle "title" output.check
+ new.block
+ bbl.mthesis format.thesis.type output.nonnull
+ school "school" output.check
+ address output
+ format.date "year" output.check
+ new.block
+ note output
+ new.block
+ format.url output
+ format.annote output
+ fin.entry
+}
+
+FUNCTION {misc}
+{ output.bibitem
+ comment output
+ fin.entry
+}
+
+FUNCTION {phdthesis}
+{ output.bibitem
+ format.authors "author" output.check
+ new.sentence
+ format.btitle "title" output.check
+ new.column
+ bbl.phdthesis format.thesis.type output.nonnull
+ new.slash
+ school "school" output.check
+ new.block
+ output.address.publisher.date
+ new.block
+ format.pages.page output
+ note output
+ new.sentence
+ format.url output
+ format.annote output
+ fin.entry
+}
+
+FUNCTION {proceedings}
+{ output.bibitem
+ format.btitle "title" output.check
+ new.slash
+ editor.organization.after
+ new.block
+ format.bvolume output
+ format.number.series output
+ address empty$
+ { publisher output
+ format.date "year" output.check
+ }
+ { address output.nonnull
+ format.date "year" output.check
+ new.sentence
+ publisher output
+ }
+ if$
+ new.block
+ note output
+ new.sentence
+ format.url output
+ format.annote output
+ fin.entry
+}
+
+FUNCTION {techreport}
+{ output.bibitem
+ author.before
+ new.sentence
+ format.title "title" output.check
+ new.column
+ new.slash
+ institution "institution" output.check
+ new.column
+ author.after
+ new.block
+ editor.organization.after
+ new.block
+ note output
+ new.sentence
+ format.url output
+ format.annote output
+ output.address.publisher.date
+ new.block
+ format.pages.page output
+ fin.entry
+}
+
+FUNCTION {unpublished}
+{ output.bibitem
+ author.before
+ format.btitle "title" output.check
+ new.slash
+ author.after
+ editor.organization.after
+ new.block
+ note "note" output.check
+ new.sentence
+ format.url output
+ format.annote output
+ fin.entry
+}
+
+FUNCTION {default.type} { misc }
+
+MACRO {jan} {"\bbljan{}"}
+
+MACRO {feb} {"\bblfeb{}"}
+
+MACRO {mar} {"\bblmar{}"}
+
+MACRO {apr} {"\bblapr{}"}
+
+MACRO {may} {"\bblmay{}"}
+
+MACRO {jun} {"\bbljun{}"}
+
+MACRO {jul} {"\bbljul{}"}
+
+MACRO {aug} {"\bblaug{}"}
+
+MACRO {sep} {"\bblsep{}"}
+
+MACRO {oct} {"\bbloct{}"}
+
+MACRO {nov} {"\bblnov{}"}
+
+MACRO {dec} {"\bbldec{}"}
+
+MACRO {acmcs} {"ACM Computing Surveys"}
+
+MACRO {acta} {"Acta Informatica"}
+
+MACRO {cacm} {"Communications of the ACM"}
+
+MACRO {ibmjrd} {"IBM Journal of Research and Development"}
+
+MACRO {ibmsj} {"IBM Systems Journal"}
+
+MACRO {ieeese} {"IEEE Transactions on Software Engineering"}
+
+MACRO {ieeetc} {"IEEE Transactions on Computers"}
+
+MACRO {ieeetcad}
+ {"IEEE Transactions on Computer-Aided Design of Integrated Circuits"}
+
+MACRO {ipl} {"Information Processing Letters"}
+
+MACRO {jacm} {"Journal of the ACM"}
+
+MACRO {jcss} {"Journal of Computer and System Sciences"}
+
+MACRO {scp} {"Science of Computer Programming"}
+
+MACRO {sicomp} {"SIAM Journal on Computing"}
+
+MACRO {tocs} {"ACM Transactions on Computer Systems"}
+
+MACRO {tods} {"ACM Transactions on Database Systems"}
+
+MACRO {tog} {"ACM Transactions on Graphics"}
+
+MACRO {toms} {"ACM Transactions on Mathematical Software"}
+
+MACRO {toois} {"ACM Transactions on Office Information Systems"}
+
+MACRO {toplas} {"ACM Transactions on Programming Languages and Systems"}
+
+MACRO {tcs} {"Theoretical Computer Science"}
+
+READ
+
+
+FUNCTION {sortify}
+{ purify$
+ "l" change.case$
+}
+
+INTEGERS { len }
+
+FUNCTION {chop.word}
+{ 's :=
+ 'len :=
+ s #1 len substring$ =
+ { s len #1 + global.max$ substring$ }
+ 's
+ if$
+}
+
+FUNCTION {sort.format.names}
+{ 's :=
+ #1 'nameptr :=
+ ""
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ { nameptr #1 >
+ { " " * }
+ 'skip$
+ if$
+ s nameptr
+ "{vv{ } }{ll{ }}{ f{ }}{ jj{ }}"
+ format.name$ 't :=
+ nameptr numnames = t "others" = and
+ { "et al" * }
+ { t sortify * }
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+}
+
+FUNCTION {sort.format.title}
+{ 't :=
+ "A " #2
+ "An " #3
+ "The " #4 t chop.word
+ chop.word
+ chop.word
+ sortify
+ #1 global.max$ substring$
+}
+
+FUNCTION {author.sort}
+{ author empty$
+ { key empty$
+ { "to sort, need author or key in " cite$ * warning$
+ ""}
+ { key sortify }
+ if$
+ }
+ { author num.names$ #4 <
+ {author sort.format.names }
+ {title sort.format.title}
+ if$
+ }
+ if$
+}
+
+FUNCTION {author.title.sort}
+{ key empty$
+{ author empty$
+ { title empty$
+ { "to sort, need author, title, or key in " cite$ * warning$
+ ""
+ }
+ { title sort.format.title
+}
+ if$
+ }
+ {
+ author num.names$ #4 <
+ {author sort.format.names }
+ {title sort.format.title} %% 4
+ if$
+ }
+ if$
+ }
+{ key sortify }
+ if$
+ }
+
+FUNCTION {presort}
+{
+ author.title.sort
+ " "
+ *
+ year field.or.null sortify
+ *
+ " "
+ *
+ title field.or.null
+ sort.format.title
+ *
+ #1 entry.max$ substring$
+ 'sort.key$ :=
+}
+
+ITERATE {presort}
+
+SORT
+
+
+STRINGS { longest.label }
+
+INTEGERS { number.label longest.label.width }
+
+FUNCTION {initialize.longest.label}
+{ "" 'longest.label :=
+ #1 'number.label :=
+ #0 'longest.label.width :=
+}
+
+FUNCTION {longest.label.pass}
+{ number.label int.to.str$ 'label :=
+ number.label #1 + 'number.label :=
+ label width$ longest.label.width >
+ { label 'longest.label :=
+ label width$ 'longest.label.width :=
+ }
+ 'skip$
+ if$
+}
+
+EXECUTE {initialize.longest.label}
+
+ITERATE {longest.label.pass}
+
+FUNCTION {begin.bib}
+{ "\begin{thebibliography}{" longest.label * "}" * write$ newline$
+ "\def\selectlanguageifdefined#1{" write$ newline$
+ "\expandafter\ifx\csname date#1\endcsname\relax" write$ newline$
+ "\else\language\csname l@#1\endcsname\fi}" write$ newline$
+%% "\ifx\undefined\` \def\url#1{{\small #1}}\else\fi" write$ %%newline$
+"\ifx\undefined\url\def\url#1{{ #1}}\else\fi" write$ newline$
+
+
+ "\ifx\undefined\BibUrl\def\BibUrl#1{\url{#1}}\else\fi" write$ newline$
+ "\ifx\undefined\BibAnnote\long\def\BibAnnote#1{}\else\fi" write$ newline$
+ "\ifx\undefined\BibEmph\def\BibEmph#1{\emph{#1}}\else\fi" write$ newline$
+ preamble$ empty$
+ 'skip$
+ { preamble$ write$ newline$ }
+ if$
+}
+
+EXECUTE {begin.bib}
+
+EXECUTE {init.state.consts}
+
+ITERATE {call.type$}
+
+FUNCTION {end.bib}
+{ newline$
+ "\end{thebibliography}" write$ newline$
+}
+
+EXECUTE {end.bib}
diff --git a/biblio/bibtex/contrib/vancouver/FAQ b/biblio/bibtex/contrib/vancouver/FAQ
new file mode 100644
index 0000000000..37ad368011
--- /dev/null
+++ b/biblio/bibtex/contrib/vancouver/FAQ
@@ -0,0 +1,17 @@
+Question:
+Why can't MacTeX find my BibTeX file?
+Answer:
+The problem isn't a bug in the vancouver style file, but rather an issue with the way TeXShop/MacTeX handles bibliographies. TeX Live is slightly pickier about placement of these files. ".bib" files go in ~/Library/texmf/bibtex/bib or subfolders of this directory, and ".bst" files go in ~/Library/texmf/bibtex/bst or subfolders of this directory. It is a known issue of MacTex that is explained in this FAQ: http://tug.org/mactex/faq/#qm05.
+
+Question:
+The Digital Object Identifier (DOI®) included in the .bib file isn't displayed in the final pdf file latex generated
+Answer:
+The doi formatting is disabled by default. You can enable it by changing the following line in vancouver.bst from:
+#0 'adddoiresolver := % 0=no DOI resolver; 1=include it
+to:
+#1 'adddoiresolver := % 0=no DOI resolver; 1=include it
+
+Question:
+My bibliography is supposed to be sorted by author name instead of appearance for a better overview. Is there a way to order the bibliography alphabetically instead of by appearance?
+Answer:
+According to the requirements of the vancouver style, the reference list has to be unsorted, i.e. in order of appearance. The only way (I'm aware of) to make BibTeX sort the citations alphabetically instead of in order of appearance is to change the style file. That involves quite a drastic change with insertion of a few sorting functions and quite a lot of other changes. In short, it would mean the implementation of an entirely new style file.
diff --git a/biblio/bibtex/contrib/vancouver/README b/biblio/bibtex/contrib/vancouver/README
new file mode 100644
index 0000000000..0e296baa0f
--- /dev/null
+++ b/biblio/bibtex/contrib/vancouver/README
@@ -0,0 +1,41 @@
+This `vancouver.bst' bibliographic style file (for LaTeX/BibTeX) is generated with the docstrip utility and modified manually to meet the ``Uniform Requirements for Manuscripts Submitted to Biomedical Journals'' as published in N Engl J Med 1997;336:309-315. (also known as the Vancouver style)
+This specification may be found on the web page of the International Committe of Medical Journal Editors:
+
+http://www.icmje.org
+
+-------------------------------------------------------------------
+
+Copyright 2004 Folkert van der Beek
+
+This work may be distributed and/or modified under the conditions of the LaTeX Project Public License, either version 1.3 of this license or (at your option) any later version.
+The latest version of this license is in
+ http://www.latex-project.org/lppl.txt
+and version 1.3 or later is part of all distributions of LaTeX version 2005/12/01 or later.
+
+This work has the LPPL maintenance status `maintained'.
+
+The Current Maintainer of this work is Folkert van der Beek.
+
+Complaints, suggestions and comments may be sent to
+
+Folkert van der Beek <folkertvanderbeek at gmail dot com>
+
+-------------------------------------------------------------------
+This bibliography style file is intended for texts in ENGLISH
+This is a numerical citation style, and as such is standard LaTeX.
+It requires no extra package to interface to the main text.
+The form of the \bibitem entries is
+ \bibitem{key}...
+Usage of \cite is as follows:
+ \cite{key} ==>> [#]
+ \cite[chap. 2]{key} ==>> [#, chap. 2]
+where # is a number determined by the ordering in the reference list.
+The order in the reference list is that by which the works were originally
+ cited in the text, or that in the database.
+
+To change the reference numbering system from [1] to 1,
+put the following code in the preamble:
+\makeatletter % Reference list option change
+\renewcommand\@biblabel[1]{#1} % from [1] to 1
+\makeatother %
+---------------------------------------------------------------------
diff --git a/biblio/bibtex/contrib/vancouver/vancouver.bib b/biblio/bibtex/contrib/vancouver/vancouver.bib
new file mode 100644
index 0000000000..10ae51efbb
--- /dev/null
+++ b/biblio/bibtex/contrib/vancouver/vancouver.bib
@@ -0,0 +1,539 @@
+
+@Patent{ pagedas:flexible,
+ inventor = {Pagedas, A.C.},
+ assignee = {Ancel Surgical R\&D Inc.},
+ title = {Flexible endoscopic grasping and cutting device and positioning tool assembly},
+ numberi = {United States patent US 20020103498},
+ year = {2002 Aug 1}
+}
+
+@Map{ prat.flick.ea:biodiversity,
+ cartographer = {Pratt, B. and Flick, P. and Vynne, C.},
+ title = {Biodiversity hotspots},
+ type = {map},
+ address = {Washington},
+ publisher = {Conservation International},
+ year = {2000}
+}
+
+@Dictionary{ filamin,
+ title = {Filamin},
+ booktitle = {Dorland's illustrated medical dictionary},
+ edition = {29},
+ address = {Philadelphia},
+ publisher = {W.B. Saunders},
+ pages = {675},
+ year = {2000}
+}
+
+@Article{ 21st,
+ title = {21st century heart solution may have a sting in the
+ tail.},
+ journal = {BMJ},
+ volume = {325},
+ number = {7357},
+ pages = {184},
+ year = 2002
+}
+
+@Webpage{ american,
+ title = {American {M}edical {A}ssociation},
+ part = {AMA Office of Group Practice Liaison; [about 2 screens]},
+ address = {Chicago},
+ publisher = {The Association},
+ type = {homepage on the Internet},
+ year = {c1995-2002},
+ lastchecked = {2002 Aug 12},
+ updated = {2001 Aug 23},
+ url = {http://www.ama-assn.org/ama/pub/category/1736.html}
+}
+
+@Webpage{ bibliographic,
+ title = {Bibliographic {S}ervices {D}ivision},
+ address = {Bethesda (MD)},
+ publisher = {National Library of Medicine (US)},
+ type = {homepage on the Internet},
+ year = {c1993 -},
+ lastchecked = {2006 Mar 10},
+ updated = {2005 Sep 19},
+ url = {http://www.nlm.nih.gov/bsd/uniform_requirements.html}
+}
+
+@Webpage{ cancer-pain,
+ title = {Cancer-{P}ain.org},
+ publisher = {Association of Cancer Online Resources, Inc.},
+ address = {New York},
+ type = {homepage on the Internet},
+ year = {c2000-01},
+ lastchecked = {2002 Jul 9},
+ updated = {2002 May 16},
+ url = {http://www.cancer-pain.org/}
+}
+
+@Book{ compendium,
+ title = {Compendium of nursing research and practice development,
+ 1999-2000},
+ publisher = {Adelaide University},
+ address = {Adelaide (Australia)},
+ organization = {{Royal Adelaide Hospital} and {University of Adelaide,
+ Department of Clinical Nursing}},
+ year = 2001
+}
+
+@Article{ hypertension,
+ title = {Hypertension, insulin, and proinsulin in participants with
+ impaired glucose tolerance.},
+ journal = {Hypertension},
+ volume = {40},
+ number = {5},
+ pages = {679-86},
+ organization = {Diabetes Prevention Program Research Group},
+ year = 2002
+}
+
+@Webpage{ mesh,
+ title = {Me{SH} {B}rowser},
+ part = {Meta-analysis; unique ID: D015201},
+ address = {Bethesda (MD)},
+ pages = {about 3 p.},
+ publisher = {National Library of Medicine (US)},
+ type = {database on the Internet},
+ year = {2002 -},
+ lastchecked = {2003 Jun 10},
+ url = {http://www.nlm.nih.gov/mesh/MBrowser.html},
+}
+
+@Article{ outreach,
+ title = {Outreach: bringing {HIV}-positive individuals into care.},
+ journal = {HRSA Careaction},
+ pages = {1-6},
+ year = 2002
+}
+
+@Webpage{ whos,
+ title = {Who's {C}ertified},
+ address = {Evanston (IL)},
+ publisher = {The American Board of Medical Specialists},
+ type = {database on the Internet},
+ year = {c2000 -},
+ lastchecked = {2001 Mar 8},
+ url = {http://www.abms.org/newsearch.asp}
+}
+
+@Article{ abend.kulish:psychoanalytic,
+ author = {Abend, S.M. and Kulish, N.},
+ title = {The psychoanalytic method from an epistemological
+ viewpoint.},
+ journal = {Int J Psychoanal},
+ volume = {83},
+ number = {Pt 2},
+ pages = {491-5},
+ year = 2002
+}
+
+@Webpage{ abood:quality,
+ author = {Abood, S.},
+ title = {Quality improvement initiative in nursing homes: the {ANA}
+ acts in an advisory role},
+ journal = {Am J Nurs},
+ type = {serial on the Internet},
+ volume = {102},
+ number = {6},
+ pages = {about 3 p.},
+ month = {Jun},
+ year = {2002},
+ lastchecked = {2002 Aug 12},
+ url = {http://www.nursingworld.org/AJN/2002/june/Wawatch.htm}
+}
+
+@Article{ ahrar.madoff.ea:development,
+ author = {Ahrar, Kamran and Madoff, David C and Gupta, Sanjay and
+ Wallace, Michael J and Price, Roger E and Wright, Kenneth
+ C},
+ title = {Development of a large animal model for lung tumors.},
+ journal = {J Vasc Interv Radiol},
+ volume = {13},
+ number = {9 Pt 1},
+ pages = {923-8},
+ year = 2002
+}
+
+@Misc{ anderson.poulsen:andersons,
+ author = {Anderson, S.C. and Poulsen, K.B.},
+ title = {Anderson's electronic atlas of hematology},
+ address = {Philadelphia},
+ publisher = {Lippincott Williams \& Wilkins},
+ type = {CD-ROM},
+ year = 2002
+}
+
+@Article{ banit.kaufer.ea:intraoperative,
+ author = {Banit, D.M. and Kaufer, H. and Hartford, J.M.},
+ title = {Intraoperative frozen section analysis in revision total
+ joint arthroplasty.},
+ journal = {Clin Orthop Relat Res},
+ number = {401},
+ pages = {230-8},
+ year = 2002
+}
+
+@PhDThesis{ borkowski:infant,
+ author = {Borkowski, M.M.},
+ title = {Infant sleep and feeding: a telephone survey of {H}ispanic
+ {A}mericans},
+ school = {Central Michigan University},
+ type = {dissertation},
+ address = {Mount Pleasant (MI)},
+ year = 2002
+}
+
+@Book{ breedlove.schorfheide:adolescent,
+ author = {Breedlove, G.K. and Schorfheide, A.M.},
+ editor = {Wieczorek, R.R.},
+ title = {Adolescent pregnancy},
+ publisher = {March of Dimes Education Services},
+ address = {White Plains (NY)},
+ edition = {2},
+ year = 2001
+}
+
+@Article{ chadwick.schuklenk:politics,
+ author = {Chadwick, R. and Schuklenk, U.},
+ title = {The politics of ethical consensus finding.},
+ journal = {Bioethics},
+ volume = {16},
+ number = {2},
+ pages = {iii-v},
+ year = 2002
+}
+
+@Misc{ chason.sallustio:hospital,
+ author = {Chason, K.W. and Sallustio, S.},
+ title = {Hospital preparedness for bioterrorism},
+ address = {Secaucus (NJ)},
+ publisher = {Network for Continuing Medical Education},
+ type = {videocassette},
+ year = 2002
+}
+
+@InProceedings{ christensen.oppacher:analysis,
+ author = {Christensen, S. and Oppacher, F.},
+ title = {An analysis of {K}oza's computational effort statistic for
+ genetic programming},
+ booktitle = {Genetic programming. {E}uro{GP} 2002: {P}roceedings of the
+ 5th {E}uropean {C}onference on {G}enetic {P}rogramming;
+ 2002 {A}pr 3-5; {K}insdale, {I}reland},
+ editor = {Foster, J.A. and Lutton, E. and Miller, J. and Ryan, C.
+ and Tettamanzi, A.G.},
+ pages = {182-91},
+ address = {Berlin},
+ publisher = {Springer},
+ year = 2002
+}
+
+@Article{ ellingsen.wilhelmsen:sykdomsangst,
+ author = {Ellingsen, A.E. and Wilhelmsen, I.},
+ title = {Sykdomsangst blant medisin- og jusstudenter},
+ journal = {Tidsskr Nor Laegeforen},
+ volume = {122},
+ number = {8},
+ pages = {785-7},
+ year = 2002
+}
+
+@Article{ feifel.moutier.ea:safety,
+ author = {Feifel, D. and Moutier, C.Y. and Perry, W.},
+ title = {Safety and tolerability of a rapidly escalating
+ dose-loading regimen for risperidone.},
+ journal = {J Clin Psychiatry},
+ volume = {61},
+ number = {12},
+ pages = {909-11},
+ note = {Retraction in: Feifel D, Moutier CY, Perry W. J Clin
+ Psychiatry. 2002;63(2):169.},
+ year = 2000
+}
+
+@Article{ feifel.moutier.ea:safety*1,
+ author = {Feifel, D. and Moutier, C.Y. and Perry, W.},
+ title = {Safety and tolerability of a rapidly escalating
+ dose-loading regimen for risperidone.},
+ journal = {J Clin Psychiatry},
+ volume = {63},
+ number = {2},
+ pages = {169},
+ note = {Retraction of: Feifel D, Moutier CY, Perry W. J Clin
+ Psychiatry. 2000;61(12):909-11.},
+ year = 2002
+}
+
+@Webpage{ foley.gelband:improving,
+ title = {Improving palliative care for cancer},
+ address = {Washington},
+ editor = {Foley, K.M. and Gelband, H.},
+ publisher = {National Academy Press},
+ type = {monograph on the Internet},
+ year = {2001},
+ lastchecked = {2002 Jul 9},
+ url = {http://www.nap.edu/books/0309074029/html/}
+}
+
+@Article{ geraud.spierings.ea:tolerability,
+ author = {Geraud, G. and Spierings, E.L. and Keywood, C.},
+ title = {Tolerability and safety of frovatriptan with short- and
+ long-term use for treatment of migraine and in comparison
+ with sumatriptan.},
+ journal = {Headache},
+ volume = {42 Suppl 2},
+ pages = {S93-9},
+ year = 2002
+}
+
+@Book{ gilstrap.cunningham.ea:operative,
+ editor = {Gilstrap, 3rd, L.C. and Cunningham, F.G. and VanDorsten,
+ J.P.},
+ title = {Operative obstetrics},
+ publisher = {McGraw-Hill},
+ address = {New York},
+ edition = {2},
+ year = 2002
+}
+
+@Article{ glauser:integrating,
+ author = {Glauser, T.A.},
+ title = {Integrating clinical trial data into clinical practice.},
+ journal = {Neurology},
+ volume = {58},
+ number = {12 Suppl 7},
+ pages = {S6-12},
+ year = 2002
+}
+
+@Article{ halpern.ubel.ea:solid-organ,
+ author = {Halpern, S.D. and Ubel, P.A. and Caplan, A.L.},
+ title = {Solid-organ transplantation in {HIV}-infected patients.},
+ journal = {N Engl J Med},
+ volume = {347},
+ number = {4},
+ pages = {284-7},
+ year = 2002
+}
+
+@Article{ halpern.ubel.ea:solid-organ*1,
+ author = {Halpern, S.D. and Ubel, P.A. and Caplan, A.L.},
+ title = {Solid-organ transplantation in {HIV}-infected patients.},
+ journal = {N Engl J Med},
+ volume = {347},
+ number = {4},
+ pages = {284-7},
+ note = {Cited in PubMed; PMID 12140307.},
+ year = 2002
+}
+
+@Article{ halpern.ubel.ea:solid-organ*2,
+ author = {Halpern, S.D. and Ubel, P.A. and Caplan, A.L.},
+ title = {Solid-organ transplantation in {HIV}-infected patients.},
+ journal = {N Engl J Med},
+ volume = {347},
+ number = {4},
+ pages = {284-7},
+ month = {Jul 25},
+ year = 2002
+}
+
+@Proceedings{ harnden.joffe.ea:germ,
+ title = {Germ cell tumours {V}. {P}roceedings of the 5th {G}erm
+ {C}ell {T}umour {C}onference; 2001 {S}ep 13-15; {L}eeds,
+ {UK}},
+ editor = {Harnden, P. and Joffe, J.K. and Jones, W.G.},
+ address = {New York},
+ publisher = {Springer},
+ year = 2002
+}
+
+@Webpage{ jablonski:online,
+ author = {Jablonski, S.},
+ title = {Online {M}ultiple {C}ongential {A}nomaly/{M}ental
+ {R}etardation ({MCA}/{MR}) {S}yndromes},
+ address = {Bethesda (MD)},
+ publisher = {National Library of Medicine (US)},
+ type = {database on the Internet},
+ year = {c1999},
+ lastchecked = {2002 Aug 12},
+ updated = {2001 Nov 20},
+ url = {http://www.nlm.nih.gov/mesh/jablonski/syndrome\_title.html}
+}
+
+@Article{ lofwall.strain.ea:characteristics,
+ author = {Lofwall, M.R. and Strain, E.C. and Brooner, R.K. and
+ Kindbom, K.A. and Bigelow, G.E.},
+ title = {Characteristics of older methadone maintenance ({MM})
+ patients},
+ journal = {Drug Alcohol Depend},
+ volume = {66 Suppl 1},
+ pages = {S105},
+ type = {abstract},
+ year = 2002
+}
+
+@Article{ malinowski.bolesta:rosiglitazone,
+ author = {Malinowski, J.M. and Bolesta, S.},
+ title = {Rosiglitazone in the treatment of type 2 diabetes
+ mellitus: a critical review.},
+ journal = {Clin Ther},
+ volume = {22},
+ number = {10},
+ pages = {1151-68; discussion 1149-50},
+ note = {Erratum in: Clin Ther 2001;23(2):309.},
+ year = 2000
+}
+
+@Article{ mansharamani.chilton:reproductive,
+ author = {Mansharamani, M. and Chilton, B.S.},
+ title = {The reproductive importance of {P}-type {ATP}ases.},
+ journal = {Mol Cell Endocrinol},
+ volume = {188},
+ number = {1-2},
+ pages = {22-5},
+ note = {Corrected and republished from: Mol Cell Endocrinol.
+ 2001;183(1-2):123-6.},
+ year = 2002
+}
+
+@Article{ mansharamani.chilton:reproductive*1,
+ author = {Mansharamani, M. and Chilton, B.S.},
+ title = {The reproductive importance of {P}-type {ATP}ases.},
+ journal = {Mol Cell Endocrinol},
+ volume = {183},
+ number = {1-2},
+ pages = {123-6},
+ year = 2001
+}
+
+@InBook{ meltzer.kallioniemi.ea:genetic,
+ author = {Meltzer, P.S. and Kallioniemi, A. and Trent, J.M.},
+ editor = {Vogelstein, B. and Kinzler, K.W.},
+ title = {The genetic basis of human cancer},
+ chapter = {Chromosome alterations in human solid tumors},
+ pages = {93-113},
+ publisher = {McGraw-Hill},
+ address = {New York},
+ year = 2002
+}
+
+@Book{ murray.rosenthal.ea:medical,
+ author = {Murray, P.R. and Rosenthal, K.S. and Kobayashi, G.S. and
+ Pfaller, M.A.},
+ title = {Medical microbiology},
+ publisher = {Mosby},
+ address = {St. Louis},
+ edition = {4},
+ year = 2002
+}
+
+@Article{ rose.huerbin.ea:regulation,
+ author = {Rose, M.E. and Huerbin, M.B. and Melick, J. and Marion,
+ D.W. and Palmer, A.M. and Schiding, J.K. and Kochanek, P.M.
+ and Graham, S.H.},
+ title = {Regulation of interstitial excitatory amino acid
+ concentrations after cortical contusion injury.},
+ journal = {Brain Res},
+ volume = {935},
+ number = {1-2},
+ pages = {40-6},
+ year = 2002
+}
+
+@TechReport{ russell.goth-goldstein.ea:method,
+ author = {Russell, M.L. and Goth-Goldstein, R. and Apte, M.G. and
+ Fisk, W.J.},
+ title = {Method for measuring the size distribution of airborne
+ {R}hinovirus},
+ institution = {Lawrence Berkeley National Laboratory, Environmental
+ Energy Technologies Division},
+ number = {Report No.: LBNL49574. Contract No.: DEAC0376SF00098},
+ address = {Berkeley (CA)},
+ note = {Sponsored by the Department of Energy.},
+ month = jan,
+ year = 2002
+}
+
+@Unpublished{ tian.araki.ea:signature,
+ author = {Tian, D. and Araki, H. and Stahl, E. and Bergelson, J. and
+ Kreitman, M.},
+ title = {Signature of balancing selection in {A}rabidopsis},
+ note = {In press 2002.},
+ organization = {Proc Natl Acad Sci U S A},
+ year = 2002
+}
+
+@Article{ tor.turker:international,
+ author = {Tor, M. and Turker, H.},
+ title = {International approaches to the prescription of long-term
+ oxygen therapy},
+ journal = {Eur Respir J},
+ volume = {20},
+ number = {1},
+ pages = {242},
+ type = {letter},
+ year = 2002
+}
+
+@Article{ tynan:medical,
+ author = {Tynan, T.},
+ title = {Medical improvements lower homicide rate: study sees drop
+ in assault rate},
+ journal = {The Washington Post},
+ volume = {Sect. A},
+ pages = {2 (col. 4).},
+ month = {Aug 12},
+ year = 2002
+}
+
+@Webpage{ uniform,
+ title = {Uniform {R}equirements for {M}anuscripts {S}ubmitted to {B}iomedical {J}ournals: {W}riting and {E}diting for {B}iomedical {P}ublication},
+ publisher = {International Committee of Medical Journal Editors},
+ address = {Philadelphia (PA)},
+ type = {homepage on the Internet},
+ year = {2005},
+ lastchecked = {2002 Jul 9},
+ updated = {2006 Feb},
+ url = {http://www.icmje.org/}
+}
+
+@Article{ vallancien.emberton.ea:sexual,
+ author = {Vallancien, G. and Emberton, M. and Harving, N. and van
+ Moorselaar, R.J.},
+ title = {Sexual dysfunction in 1,274 {E}uropean men suffering from
+ lower urinary tract symptoms.},
+ journal = {J Urol},
+ volume = {169},
+ number = {6},
+ pages = {2257-61},
+ organization = {Alf-One Study Group},
+ year = 2003
+}
+
+@TechReport{ yen:health,
+ author = {Yen, G.G.},
+ title = {Health monitoring on vibration signatures. {F}inal
+ report},
+ institution = {Air Force Office of Scientific Research (US), Air Force
+ Research Laboratory},
+ number = {Report No.: AFRLSRBLTR020123. Contract No.:
+ F496209810049.},
+ address = {Arlington (VA)},
+ month = feb,
+ year = 2002
+}
+
+@Article{ yu.hawley.ea:immortalization,
+ author = {Yu, W.M. and Hawley, T.S. and Hawley, R.G. and Qu, C.K.},
+ title = {Immortalization of yolk sac-derived precursor cells.},
+ journal = {Blood},
+ volume = {100},
+ number = {10},
+ pages = {3828-31},
+ note = {Epub 2002 Jul 5.},
+ year = 2002
+}
diff --git a/biblio/bibtex/contrib/vancouver/vancouver.bst b/biblio/bibtex/contrib/vancouver/vancouver.bst
new file mode 100644
index 0000000000..bd7e340751
--- /dev/null
+++ b/biblio/bibtex/contrib/vancouver/vancouver.bst
@@ -0,0 +1,1873 @@
+%%
+%% This `vancouver.bst' bibliographic style file (for LaTeX/BibTeX) is
+%% generated with the docstrip utility and modified manually to meet the
+%% ``Uniform Requirements for Manuscripts Submitted to Biomedical Journals''
+%% as published in N Engl J Med 1997;336:309-315.
+%% (also known as the Vancouver style)
+%% This specification may be found on the web page of the
+%% International Committe of Medical Journal Editors:
+%%
+%% http://www.icmje.org
+%%
+%%-------------------------------------------------------------------
+%%
+%% Copyright 2004 Folkert van der Beek
+%%
+%% This work may be distributed and/or modified under the
+%% conditions of the LaTeX Project Public License, either version 1.3
+%% of this license or (at your option) any later version.
+%% The latest version of this license is in
+%% http://www.latex-project.org/lppl.txt
+%% and version 1.3 or later is part of all distributions of LaTeX
+%% version 2005/12/01 or later.
+%%
+%% This work has the LPPL maintenance status `maintained'.
+%%
+%% The Current Maintainer of this work is Folkert van der Beek.
+%%
+%% Complaints, suggestions and comments may be sent to
+%%
+%% Folkert van der Beek <folkertvanderbeek at gmail dot com>
+%%
+%%-------------------------------------------------------------------
+%%
+%% This bibliography style file is intended for texts in ENGLISH
+%% This is a numerical citation style, and as such is standard LaTeX.
+%% It requires no extra package to interface to the main text.
+%% The form of the \bibitem entries is
+%% \bibitem{key}...
+%% Usage of \cite is as follows:
+%% \cite{key} ==>> [#]
+%% \cite[chap. 2]{key} ==>> [#, chap. 2]
+%% where # is a number determined by the ordering in the reference list.
+%% The order in the reference list is that by which the works were originally
+%% cited in the text, or that in the database.
+ %
+%% To change the reference numbering system from [1] to 1,
+%% put the following code in the preamble:
+%% \makeatletter % Reference list option change
+%% \renewcommand\@biblabel[1]{#1} % from [1] to 1
+%% \makeatother %
+%%
+%%---------------------------------------------------------------------
+
+%% List of all possible fields
+ENTRY
+ { address
+ assignee % for patents
+ author
+ booktitle % for articles in books
+ chapter % for incollection, esp. internet documents
+ cartographer % for maps
+ day
+ edition
+ editor
+ howpublished
+ institution % for technical reports
+ inventor % for patents
+ journal
+ key
+ month
+ note
+ number
+ organization
+ pages
+ part
+ publisher
+ school
+ series
+ title
+ type
+ volume
+ word
+ year
+ eprint % urlbst
+ doi % urlbst
+ url % urlbst
+ lastchecked % urlbst
+ updated % urlbst
+ }
+ {}
+ { label }
+%% Declaration of integer variables
+INTEGERS { output.state before.all mid.sentence after.sentence after.block }
+STRINGS { urlintro eprinturl eprintprefix doiprefix doiurl } % urlbst...
+INTEGERS { hrefform addeprints adddoiresolver }
+% Following constants may be adjusted by hand, if desired
+FUNCTION {init.config.constants}
+{
+ "Available from: " 'urlintro := % prefix before URL
+ "http://arxiv.org/abs/" 'eprinturl := % prefix to make URL from eprint ref
+ "arXiv:" 'eprintprefix := % text prefix printed before eprint ref
+ "http://dx.doi.org/" 'doiurl := % prefix to make URL from DOI
+ "doi:" 'doiprefix := % text prefix printed before DOI ref
+ #0 'addeprints := % 0=no eprints; 1=include eprints
+ #0 'adddoiresolver := % 0=no DOI resolver; 1=include it
+ #0 'hrefform := % 0=no crossrefs; 1=hypertex xrefs; 2=hyperref refs
+}
+INTEGERS {
+ bracket.state
+ outside.brackets
+ open.brackets
+ within.brackets
+ close.brackets
+}
+% ...urlbst to here
+FUNCTION {init.state.consts}
+{ #0 'outside.brackets := % urlbst
+ #1 'open.brackets :=
+ #2 'within.brackets :=
+ #3 'close.brackets :=
+
+ #0 'before.all :=
+ #1 'mid.sentence :=
+ #2 'after.sentence :=
+ #3 'after.block :=
+}
+%% Declaration of string variables
+STRINGS { s t}
+
+% urlbst
+FUNCTION {output.nonnull.original}
+{ 's :=
+ output.state mid.sentence =
+ { ". " * write$ }
+ { output.state after.block =
+ { add.period$ write$
+ newline$
+ "\newblock " write$
+ }
+ { output.state before.all =
+ 'write$
+ { add.period$ " " * write$ }
+ if$
+ }
+ if$
+ mid.sentence 'output.state :=
+ }
+ if$
+ s
+}
+
+% urlbst...
+FUNCTION {output.nonnull}
+{ % Save the thing we've been asked to output
+ 's :=
+ % If the bracket-state is close.brackets, then add a close-bracket to
+ % what is currently at the top of the stack, and set bracket.state
+ % to outside.brackets
+ bracket.state close.brackets =
+ { "]" *
+ outside.brackets 'bracket.state :=
+ }
+ 'skip$
+ if$
+ bracket.state outside.brackets =
+ { % We're outside all brackets -- this is the normal situation.
+ % Write out what's currently at the top of the stack, using the
+ % original output.nonnull function.
+ s
+ output.nonnull.original
+ }
+ { % Still in brackets. Add open-bracket or (continuation) comma, add the
+ % new text (in s) to the top of the stack, and move to the close-brackets
+ % state, ready for next time (unless inbrackets resets it). If we come
+ % into this branch, then output.state is carefully undisturbed.
+ bracket.state open.brackets =
+ { " [" * }
+ { ", " * } % bracket.state will be within.brackets
+ if$
+ s *
+ close.brackets 'bracket.state :=
+ }
+ if$
+}
+
+% Call this function just before adding something which should be presented in
+% brackets. bracket.state is handled specially within output.nonnull.
+FUNCTION {inbrackets}
+{ bracket.state close.brackets =
+ { within.brackets 'bracket.state := } % reset the state: not open nor closed
+ { open.brackets 'bracket.state := }
+ if$
+}
+
+FUNCTION {format.lastchecked}
+{ lastchecked empty$
+ { "" }
+ { updated empty$
+ { inbrackets "cited " lastchecked * }
+ { inbrackets "updated " updated * "; cited " * lastchecked * }
+ if$
+ }
+ if$
+}
+% ...urlbst to here
+
+FUNCTION {output}
+{ duplicate$ empty$
+ 'pop$
+ 'output.nonnull
+ if$
+}
+
+FUNCTION {output.check}
+{ 't :=
+ duplicate$ empty$
+ { pop$ "empty " t * " in " * cite$ * warning$ }
+ 'output.nonnull
+ if$
+}
+
+FUNCTION {fin.entry}
+{
+ bracket.state close.brackets = % urlbst
+ { "]" * }
+ 'skip$
+ if$
+ add.period$
+ write$
+ newline$
+}
+
+FUNCTION {new.block}
+{ output.state before.all =
+ 'skip$
+ { after.block 'output.state := }
+ if$
+}
+
+FUNCTION {new.sentence}
+{ output.state after.block =
+ 'skip$
+ { output.state before.all =
+ 'skip$
+ { after.sentence 'output.state := }
+ if$
+ }
+ if$
+}
+
+FUNCTION {add.blank}
+{ " " * before.all 'output.state :=
+}
+
+FUNCTION {no.blank.or.punct}
+{ "" * before.all 'output.state :=
+}
+
+FUNCTION {add.semicolon}
+{
+ ";" *
+ no.blank.or.punct
+}
+
+FUNCTION {date.block}
+{
+ "." *
+ no.blank.or.punct
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% LOGICAL `NOT', `AND', AND `OR' %
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% Logical 'not':
+% If the first element on the stack is A then this function
+% does the following:
+% push { #0 }
+% push { #1 }
+% So now the first 3 elements of the stack are
+% { #1 } { #0 } A
+% The first 3 are popped and subjected to 'if':
+% If A > 0 then { #0 } is executed, else { #1 } is executed:
+% if A > 0
+% then 0
+% else 1
+% So consider integers as logicals, where 1 = true and 0 = false,
+% then this does
+% (if A then false else true)
+% which is a logical 'not'.
+
+FUNCTION {not}
+{ { #0 }
+ { #1 }
+ if$
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% Logical 'and':
+% If the first 2 elements on the stack are A B
+% then this function does the following:
+% push 'skip$
+% push { pop$ #0 }
+% So now first 4 elements are
+% { pop$ #0 } 'skip$ A B
+% The first 3 are popped and subjected to 'if' (B is on top of
+% the stack):
+% If A > 0 then 'skip$ is executed, else { pop$ #0 } is executed:
+% if A > 0
+% then (B stays on top of stack)
+% else (B is popped and #0 is pushed)
+% So consider integers as logicals, where 1 = true and 0 = false,
+% then this does
+% (if A then B else false)
+% which is a logical 'and'.
+
+FUNCTION {and}
+{ 'skip$
+ { pop$ #0 }
+ if$
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% Logical 'or':
+% If the first 2 elements on the stack are A B
+% then this function does the following:
+% push { pop$ #1 }
+% push 'skip$
+% So now first 4 elements are
+% 'skip$ { pop$ #1 } A B
+% The first 3 are popped and subjected to 'if' (B is on top of
+% the stack):
+% If A > 0 then { pop$ #1 } is executed, else 'skip$ is executed:
+% if A > 0
+% then (B is popped and #1 is pushed)
+% else (B stays on top of stack)
+% So consider integers as logicals, where 1 = true and 0 = false,
+% then this does
+% (if A then true else B)
+% which is a logical 'or'.
+
+FUNCTION {or}
+{ { pop$ #1 }
+ 'skip$
+ if$
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% GENERAL PURPOSE FUNCTIONS FOR FORMATTING %
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% issues warning if field is empty
+% call with
+% "field" field warning.if.empty
+% Note that the first field must be between quotes
+% because it is the fieldname for use in the warning message.
+%
+
+FUNCTION {warning.if.empty}
+{ empty$
+ { "No " swap$ * " in " * cite$ * warning$ }
+ { pop$ }
+ if$
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ %
+ % encloses string in pre- and postfix string
+ % call with
+ % prefix postfix S enclose.check
+ % delivers empty string if S empty
+ %
+FUNCTION {enclose.check}
+{ duplicate$ empty$
+ { pop$ pop$ pop$
+ ""
+ }
+ { swap$ * * }
+ if$
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%
+% emphasizes top of stack
+% call with
+% string" emphasize.check
+%
+
+FUNCTION {emphasize.check}
+{ "\Bem{" swap$
+ "}" swap$
+ enclose.check
+}
+
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ %
+ % brackets top of stack
+ % call with
+ % "string" bracket.check
+ %
+FUNCTION {bracket.check}
+{ "[" swap$
+ "]" swap$
+ enclose.check
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ %
+ % parenthesizes top of stack
+ % call with
+ % "string" parenthesize
+ %
+FUNCTION {parenthesize.check}
+{ "(" swap$
+ ")" swap$
+ enclose.check
+}
+
+STRINGS {z}
+
+FUNCTION {remove.dots}
+{ 'z := % expects string on top of the stack, pops the string and assigns it to variable z
+ "" % push empty string
+ { z empty$ not } % returns 0 if variable z is empty
+ { z #1 #1 substring$ % push the first character of variable z
+ z #2 global.max$ substring$ 'z := % assigns the 2nd to last character of variable z to variable z
+ duplicate$ "\" = % pushes 1 if the last character is "\", otherwise 0
+ { * % concatenates the last 2 literals
+ z #1 #1 substring$ % push the first character of variable z
+ z #2 global.max$ substring$ 'z := % assigns the 2nd to last character of variable z to variable z
+ * % concatenates the last 2 literals, i.e. every character, even a dot, following a "\" will be printed
+ }
+ { duplicate$ "." = % pushes 1 if the last character is ".", otherwise 0
+ 'pop$ % pushes the pop$ function
+ { * } % concatenates the last 2 literals
+ if$ % pops the last character if it is a dot, otherwise concatenates it with the string on top of the stack
+ }
+ if$
+ }
+ while$
+}
+
+INTEGERS {l}
+FUNCTION{string.length}
+{
+ #1 'l :=
+ { duplicate$ duplicate$ #1 l substring$ = not }
+ { l #1 + 'l := }
+ while$
+ pop$ l
+}
+
+STRINGS {replace find text}
+INTEGERS {find_length}
+FUNCTION {find.replace}
+{
+ 'replace :=
+ 'find :=
+ 'text :=
+ find string.length 'find_length :=
+ ""
+ { text empty$ not }
+ { text #1 find_length substring$ find =
+ {
+ replace *
+ text #1 find_length + global.max$ substring$ 'text :=
+ }
+ { text #1 #1 substring$ *
+ text #2 global.max$ substring$ 'text :=
+ }
+ if$
+ }
+ while$
+}
+
+FUNCTION {new.block.checka}
+{ empty$
+ 'skip$
+ 'new.block
+ if$
+}
+
+FUNCTION {new.block.checkb}
+{ empty$
+ swap$ empty$
+ and
+ 'skip$
+ 'new.block
+ if$
+}
+
+FUNCTION {new.sentence.checka}
+{ empty$
+ 'skip$
+ 'new.sentence
+ if$
+}
+
+FUNCTION {new.sentence.checkb}
+{ empty$
+ swap$ empty$
+ and
+ 'skip$
+ 'new.sentence
+ if$
+}
+
+FUNCTION {field.or.null}
+{ duplicate$ empty$
+ { pop$ "" }
+ 'skip$
+ if$
+}
+
+FUNCTION {emphasize}
+{ skip$ }
+
+FUNCTION {tie.or.space.prefix}
+{ duplicate$ text.length$ #3 <
+ { "~" }
+ { " " }
+ if$
+ swap$
+}
+
+FUNCTION {capitalize}
+{ "u" change.case$ "t" change.case$ }
+
+FUNCTION {space.word}
+{ " " swap$ * " " * }
+
+ % Here are the language-specific definitions for explicit words.
+ % Each function has a name bbl.xxx where xxx is the English word.
+ % The language selected here is ENGLISH
+
+FUNCTION {bbl.and}
+{ "and"}
+
+FUNCTION {bbl.etal}
+{ "et~al." }
+
+FUNCTION {bbl.editors}
+{ "editors" }
+
+FUNCTION {bbl.editor}
+{ "editor" }
+
+FUNCTION {bbl.cartographers}
+{ "cartographers" }
+
+FUNCTION {bbl.cartographer}
+{ "cartographer" }
+
+FUNCTION {bbl.inventors}
+{ "inventors" }
+
+FUNCTION {bbl.inventor}
+{ "inventor" }
+
+FUNCTION {bbl.assignees}
+{ "assignees" }
+
+FUNCTION {bbl.assignee}
+{ "assignee" }
+
+FUNCTION {bbl.edby}
+{ "edited by" }
+
+FUNCTION {bbl.edition}
+{ "ed." }
+
+FUNCTION {bbl.volume}
+{ "vol." }
+
+FUNCTION {bbl.of}
+{ "of" }
+
+FUNCTION {bbl.number}
+{ "no." }
+
+FUNCTION {bbl.nr}
+{ "no." }
+
+FUNCTION {bbl.in}
+{ "in" }
+
+FUNCTION {bbl.pages}
+{ "p." }
+
+FUNCTION {bbl.page}
+{ "p." }
+
+FUNCTION {bbl.chapter}
+{ "chap." }
+
+FUNCTION {bbl.techrep}
+{ "Tech. Rep." }
+
+FUNCTION {bbl.mthesis}
+{ "Master's thesis" }
+
+FUNCTION {bbl.phdthesis}
+{ "Ph.D. thesis" }
+
+FUNCTION {bbl.first}
+{ "1st" }
+
+FUNCTION {bbl.second}
+{ "2nd" }
+
+FUNCTION {bbl.third}
+{ "3rd" }
+
+FUNCTION {bbl.fourth}
+{ "4th" }
+
+FUNCTION {bbl.fifth}
+{ "5th" }
+
+FUNCTION {bbl.st}
+{ "st" }
+
+FUNCTION {bbl.nd}
+{ "nd" }
+
+FUNCTION {bbl.rd}
+{ "rd" }
+
+FUNCTION {bbl.th}
+{ "th" }
+
+MACRO {jan} {"Jan."}
+
+MACRO {feb} {"Feb."}
+
+MACRO {mar} {"Mar."}
+
+MACRO {apr} {"Apr."}
+
+MACRO {may} {"May"}
+
+MACRO {jun} {"Jun."}
+
+MACRO {jul} {"Jul."}
+
+MACRO {aug} {"Aug."}
+
+MACRO {sep} {"Sep."}
+
+MACRO {oct} {"Oct."}
+
+MACRO {nov} {"Nov."}
+
+MACRO {dec} {"Dec."}
+
+FUNCTION {eng.ord}
+{ duplicate$ "1" swap$ *
+ #-2 #1 substring$ "1" =
+ { bbl.th * }
+ { duplicate$ #-1 #1 substring$
+ duplicate$ "1" =
+ { pop$ bbl.st * }
+ { duplicate$ "2" =
+ { pop$ bbl.nd * }
+ { "3" =
+ { bbl.rd * }
+ { bbl.th * }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+}
+
+FUNCTION {bibinfo.check}
+{ swap$
+ duplicate$ missing$
+ {
+ pop$ pop$
+ ""
+ }
+ { duplicate$ empty$
+ {
+ swap$ pop$
+ }
+ { swap$
+ pop$
+ }
+ if$
+ }
+ if$
+}
+
+FUNCTION {bibinfo.warn}
+{ swap$
+ duplicate$ missing$
+ {
+ swap$ "missing " swap$ * " in " * cite$ * warning$ pop$
+ ""
+ }
+ { duplicate$ empty$
+ {
+ swap$ "empty " swap$ * " in " * cite$ * warning$
+ }
+ { swap$
+ pop$
+ }
+ if$
+ }
+ if$
+}
+
+STRINGS { bibinfo}
+INTEGERS { nameptr namesleft numnames }
+
+FUNCTION {format.names}
+{ 'bibinfo :=
+ duplicate$ empty$ 'skip$ {
+ "." ". " find.replace 's :=
+ "" 't :=
+ #1 'nameptr :=
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ { s nameptr
+ "{vv~}{ll}{ f{}}{ jj}"
+ format.name$
+ remove.dots
+ bibinfo bibinfo.check
+ 't :=
+ nameptr #1 >
+ {
+ nameptr #6
+ #1 + =
+ numnames #6
+ > and
+ { "others" 't :=
+ #1 'namesleft := }
+ 'skip$
+ if$
+ namesleft #1 >
+ { ", " * t * }
+ {
+ "," *
+ s nameptr "{ll}" format.name$ duplicate$ "others" =
+ { 't := }
+ { pop$ }
+ if$
+ t "others" =
+ {
+ " " * bbl.etal *
+ }
+ { " " * t * }
+ if$
+ }
+ if$
+ }
+ 't
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+ } if$
+}
+
+FUNCTION {format.names.org}
+{ 'bibinfo :=
+ duplicate$ empty$ 'skip$ {
+ 's :=
+ "" 't :=
+ #1 'nameptr :=
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ { s nameptr
+ "{ff~}{vv~}{ll}"
+ format.name$
+ bibinfo bibinfo.check
+ 't :=
+ nameptr #1 >
+ {
+ namesleft #1 >
+ { "; " * t * }
+ {
+ ";" *
+ s nameptr "{ll}" format.name$ duplicate$ "others" =
+ { 't := }
+ { pop$ }
+ if$
+ t "others" =
+ {
+ " " * bbl.etal *
+ }
+ { " " * t * }
+ if$
+ }
+ if$
+ }
+ 't
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+ } if$
+}
+
+FUNCTION {format.names.ed}
+{
+ format.names
+}
+
+FUNCTION {format.authors}
+{
+ author "author" format.names
+ %%"." " " "author" find.replace format.names
+}
+
+FUNCTION {format.organizations}
+{ organization "organization" format.names.org
+}
+
+FUNCTION {get.bbl.editor}
+{ editor num.names$ #1 > 'bbl.editors 'bbl.editor if$ }
+
+FUNCTION {get.bbl.cartographer}
+{ cartographer num.names$ #1 > 'bbl.cartographers 'bbl.cartographer if$ }
+
+FUNCTION {get.bbl.inventor}
+{ inventor num.names$ #1 > 'bbl.inventors 'bbl.inventor if$ }
+
+FUNCTION {get.bbl.assignee}
+{ assignee num.names$ #1 > 'bbl.assignees 'bbl.assignee if$ }
+
+FUNCTION {format.editors}
+{ editor "editor" format.names duplicate$ empty$ 'skip$
+ {
+ "," *
+ " " *
+ get.bbl.editor
+ *
+ }
+ if$
+}
+
+FUNCTION {format.assignees}
+{ assignee "assignee" format.names.org duplicate$ empty$ 'skip$
+ {
+ "," *
+ " " *
+ get.bbl.assignee
+ *
+ }
+ if$
+}
+
+FUNCTION {format.cartographers}
+{ cartographer "cartographer" format.names duplicate$ empty$ 'skip$
+ {
+ "," *
+ " " *
+ get.bbl.cartographer
+ *
+ }
+ if$
+}
+
+FUNCTION {format.inventors}
+{ inventor "inventor" format.names duplicate$ empty$ 'skip$
+ {
+ "," *
+ " " *
+ get.bbl.inventor
+ *
+ }
+ if$
+}
+
+FUNCTION {format.note}
+{
+ note empty$
+ { "" }
+ { note #1 #1 substring$
+ duplicate$ "{" =
+ 'skip$
+ { output.state mid.sentence =
+ { "l" }
+ { "u" }
+ if$
+ change.case$
+ }
+ if$
+ note #2 global.max$ substring$ * "note" bibinfo.check
+ }
+ if$
+}
+
+FUNCTION {format.title}
+{ title
+%%duplicate$ empty$ 'skip$
+%% { "t" change.case$ }
+%%if$
+ "title" bibinfo.check
+}
+
+FUNCTION {format.type}
+{ type empty$
+ 'skip$
+ { inbrackets type }
+ %%{ add.blank "[" type * "]" * }
+ if$
+}
+
+FUNCTION {output.bibitem}
+{ outside.brackets 'bracket.state := % urlbst
+ newline$
+ "\bibitem{" write$
+ cite$ write$
+ "}" write$
+ newline$
+ ""
+ before.all 'output.state :=
+}
+
+FUNCTION {n.dashify}
+{
+ 't :=
+ ""
+ { t empty$ not }
+ { t #1 #1 substring$ "-" =
+ { t #1 #2 substring$ "--" = not
+ { "--" *
+ t #2 global.max$ substring$ 't :=
+ }
+ { { t #1 #1 substring$ "-" = }
+ { "-" *
+ t #2 global.max$ substring$ 't :=
+ }
+ while$
+ }
+ if$
+ }
+ { t #1 #1 substring$ *
+ t #2 global.max$ substring$ 't :=
+ }
+ if$
+ }
+ while$
+}
+
+FUNCTION {word.in}
+{ bbl.in capitalize
+ ":" *
+ " " * }
+
+FUNCTION {format.journal.date}
+{
+ month "month" bibinfo.check
+ duplicate$ empty$
+ year "year" bibinfo.check duplicate$ empty$
+ {
+ swap$ 'skip$
+ { "there's a month but no year in " cite$ * warning$ }
+ if$
+ *
+ }
+ { swap$ 'skip$
+ {
+ " " * swap$
+ }
+ if$
+ *
+ remove.dots
+ }
+ if$
+ duplicate$ empty$
+ 'skip$
+ {
+ before.all 'output.state :=
+ after.sentence 'output.state :=
+ }
+ if$
+}
+
+FUNCTION {format.date}
+{
+ no.blank.or.punct
+ ";"
+ duplicate$ empty$
+ year "year" bibinfo.check duplicate$ empty$
+ { swap$ 'skip$
+ { "there's a month but no year in " cite$ * warning$ }
+ if$
+ *
+ }
+ { swap$ 'skip$
+ {
+ swap$
+ " " * swap$
+ }
+ if$
+ *
+ }
+ if$
+}
+
+FUNCTION {format.btitle}
+{ title "title" bibinfo.check
+ duplicate$ empty$ 'skip$
+ {
+ }
+ if$
+}
+
+FUNCTION {either.or.check}
+{ empty$
+ 'pop$
+ { "can't use both " swap$ * " fields in " * cite$ * warning$ }
+ if$
+}
+
+FUNCTION {format.bvolume}
+{ volume empty$
+ { "" }
+ { bbl.volume volume tie.or.space.prefix
+ "volume" bibinfo.check * *
+ series "series" bibinfo.check
+ duplicate$ empty$ 'pop$
+ { swap$ bbl.of space.word * swap$
+ emphasize * }
+ if$
+ "volume and number" number either.or.check
+ }
+ if$
+}
+
+FUNCTION {format.number.series}
+{ volume empty$
+ { number empty$
+ { series field.or.null }
+ { series empty$
+ { number "number" bibinfo.check }
+ { output.state mid.sentence =
+ { bbl.number }
+ { bbl.number capitalize }
+ if$
+ number tie.or.space.prefix "number" bibinfo.check * *
+ bbl.in space.word *
+ series "series" bibinfo.check *
+ }
+ if$
+ }
+ if$
+ }
+ { "" }
+ if$
+}
+
+FUNCTION {is.num}
+{ chr.to.int$
+ duplicate$ "0" chr.to.int$ < not
+ swap$ "9" chr.to.int$ > not and
+}
+
+FUNCTION {extract.num}
+{ duplicate$ 't :=
+ "" 's :=
+ { t empty$ not }
+ { t #1 #1 substring$
+ t #2 global.max$ substring$ 't :=
+ duplicate$ is.num
+ { s swap$ * 's := }
+ { pop$ "" 't := }
+ if$
+ }
+ while$
+ s empty$
+ 'skip$
+ { pop$ s }
+ if$
+}
+
+FUNCTION {convert.edition}
+{ extract.num "l" change.case$ 's :=
+ s "first" = s "1" = or
+ { bbl.first 't := }
+ { s "second" = s "2" = or
+ { bbl.second 't := }
+ { s "third" = s "3" = or
+ { bbl.third 't := }
+ { s "fourth" = s "4" = or
+ { bbl.fourth 't := }
+ { s "fifth" = s "5" = or
+ { bbl.fifth 't := }
+ { s #1 #1 substring$ is.num
+ { s eng.ord 't := }
+ { edition 't := }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+ t
+}
+
+FUNCTION {format.edition}
+{ edition duplicate$ empty$ 'skip$
+ {
+ convert.edition
+ output.state mid.sentence =
+ { "l" }
+ { "t" }
+ if$ change.case$
+ "edition" bibinfo.check
+ " " * bbl.edition *
+ }
+ if$
+}
+INTEGERS { multiresult }
+FUNCTION {multi.page.check}
+{ 't :=
+ #0 'multiresult :=
+ { multiresult not
+ t empty$ not
+ and
+ }
+ { t #1 #1 substring$
+ duplicate$ "-" =
+ swap$ duplicate$ "," =
+ swap$ "+" =
+ or or
+ { #1 'multiresult := }
+ { t #2 global.max$ substring$ 't := }
+ if$
+ }
+ while$
+ multiresult
+}
+
+FUNCTION {format.pages}
+{ pages duplicate$ empty$ 'skip$
+ { duplicate$ multi.page.check
+ {
+ bbl.pages swap$
+ n.dashify
+ }
+ {
+ bbl.page swap$
+ }
+ if$
+ tie.or.space.prefix
+ "pages" bibinfo.check
+ * *
+ }
+ if$
+}
+
+FUNCTION {format.journal.pages}
+{ pages duplicate$ empty$ 'pop$
+ { swap$ duplicate$ empty$
+ { pop$ pop$ format.pages }
+ {
+ ":" *
+ swap$
+ n.dashify
+ "pages" bibinfo.check
+ *
+ }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.vol.num}
+{ volume field.or.null
+ duplicate$ empty$ 'skip$
+ {
+ "volume" bibinfo.check
+ }
+ if$
+ number "number" bibinfo.check duplicate$ empty$ 'skip$
+ {
+ swap$ duplicate$ empty$
+ { "there's a number but no volume in " cite$ * warning$ }
+ 'skip$
+ if$
+ swap$
+ "(" swap$ * ")" *
+ }
+ if$ *
+}
+
+FUNCTION {format.vol.num.pages}
+{ volume field.or.null
+ duplicate$ empty$ 'skip$
+ {
+ "volume" bibinfo.check
+ }
+ if$
+ number "number" bibinfo.check duplicate$ empty$ 'skip$
+ {
+ swap$ duplicate$ empty$
+ { "there's a number but no volume in " cite$ * warning$ }
+ 'skip$
+ if$
+ swap$
+ "(" swap$ * ")" *
+ }
+ if$ *
+ format.journal.pages
+}
+
+FUNCTION {format.chapter.pages}
+{ chapter empty$
+ 'format.pages
+ { type empty$
+ { bbl.chapter }
+ { type "l" change.case$
+ "type" bibinfo.check
+ }
+ if$
+ chapter tie.or.space.prefix
+ "chapter" bibinfo.check
+ * *
+ pages empty$
+ 'skip$
+ { ", " * format.pages * }
+ if$
+ }
+ if$
+ }
+
+ FUNCTION {format.booktitle}
+ {
+ booktitle "booktitle" bibinfo.check
+ }
+
+ FUNCTION {format.in.ed.booktitle}
+ { format.booktitle duplicate$ empty$ 'skip$
+ {
+ editor "editor" format.names.ed duplicate$ empty$ 'pop$
+ {
+ "," *
+ " " *
+ get.bbl.editor
+ ". " *
+ * swap$
+ * }
+ if$
+ word.in swap$ *
+ }
+ if$
+ }
+
+ FUNCTION {format.in.ed.title}
+ { format.title duplicate$ empty$ 'skip$
+ {
+ editor "editor" format.names.ed duplicate$ empty$ 'pop$
+ {
+ "," *
+ " " *
+ get.bbl.editor
+ ". " *
+ * swap$
+ * }
+ if$
+ word.in swap$ *
+ }
+ if$
+ }
+
+ FUNCTION {empty.misc.check}
+ { author empty$ title empty$ howpublished empty$
+ month empty$ year empty$ note empty$
+ and and and and and
+ { "all relevant fields are empty in " cite$ * warning$ }
+ 'skip$
+ if$
+ }
+ FUNCTION {format.thesis.type}
+ { type duplicate$ empty$
+ 'pop$
+ { swap$ pop$
+ "t" change.case$ "type" bibinfo.check
+ }
+ if$
+}
+FUNCTION {format.tr.number}
+{
+ number "number" bibinfo.check
+ %%type duplicate$ empty$
+ %%{ pop$ bbl.techrep }
+ %%'skip$
+ %%if$
+ %%"type" bibinfo.check
+ %%swap$ duplicate$ empty$
+ %%{ pop$ "t" change.case$ }
+ %%{ tie.or.space.prefix * * }
+ %%if$
+}
+
+FUNCTION {format.org.or.pub}
+{ 't :=
+ ""
+ address empty$ t empty$ and
+ 'skip$
+ {
+ address "address" bibinfo.check *
+ t empty$
+ 'skip$
+ { address empty$
+ 'skip$
+ { ": " * }
+ if$
+ t *
+ }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.publisher.address}
+{ publisher "publisher" bibinfo.warn format.org.or.pub
+}
+
+FUNCTION {format.organization.address}
+{ organization "organization" bibinfo.check format.org.or.pub
+}
+
+FUNCTION {format.institution.address}
+{ institution "institution" bibinfo.check format.org.or.pub
+}
+
+
+% urlbst...
+% Functions for making hypertext links.
+% In all cases, the stack has (link-text href-url)
+%
+% make 'null' specials
+FUNCTION {make.href.null}
+{
+ pop$
+}
+% make hypertex specials
+FUNCTION {make.href.hypertex}
+{
+ "\special {html:<a href=" quote$ *
+ swap$ * quote$ * "> }" * swap$ *
+ "\special {html:</a>}" *
+}
+% make hyperref specials
+FUNCTION {make.href.hyperref}
+{
+ "\href {" swap$ * "} {" * swap$ * "}" *
+}
+FUNCTION {make.href}
+{ hrefform #2 =
+ 'make.href.hyperref % hrefform = 2
+ { hrefform #1 =
+ 'make.href.hypertex % hrefform = 1
+ 'make.href.null % hrefform = 0 (or anything else)
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.url}
+{ url empty$
+ { "" }
+ { hrefform #1 =
+ { % special case -- add HyperTeX specials
+ urlintro "\url{" url * "}" * url make.href.hypertex * }
+ { urlintro "\url{" * url * "}" * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.eprint}
+{ eprint empty$
+ { "" }
+ { eprintprefix eprint * eprinturl eprint * make.href }
+ if$
+}
+
+FUNCTION {format.doi}
+{ doi empty$
+ { "" }
+ { doiprefix doi * doiurl doi * make.href }
+ if$
+}
+
+% Output a URL. We can't use the more normal idiom (something like
+% `format.url output'), because the `inbrackets' within
+% format.lastchecked applies to everything between calls to `output',
+% so that `format.url format.lastchecked * output' ends up with both
+% the URL and the lastchecked in brackets.
+FUNCTION {output.url}
+{ url empty$
+ 'skip$
+ { new.block
+ format.url output
+ format.lastchecked output
+ }
+ if$
+}
+
+FUNCTION {output.web.refs}
+{
+ new.block
+ output.url
+ addeprints eprint empty$ not and
+ { format.eprint output.nonnull }
+ 'skip$
+ if$
+ adddoiresolver doi empty$ not and
+ { format.doi output.nonnull }
+ 'skip$
+ if$
+% addeprints
+% { eprint empty$
+% 'skip$
+% { format.eprint output.nonnull }
+% if$
+% }
+% 'skip$
+% if$
+}
+
+% Webpage entry type.
+% Title and url fields required;
+% author, note, year, month, and lastchecked fields optional
+STRINGS {database}
+FUNCTION {webpage}
+{ output.bibitem
+ author empty$
+ { editor empty$
+ 'skip$ % author and editor both optional
+ { format.editors output.nonnull }
+ if$
+ }
+ { editor empty$
+ { format.authors output.nonnull }
+ { "can't use both author and editor fields in " cite$ * warning$ }
+ if$
+ }
+ if$
+% author empty$
+% 'skip$
+% { format.authors output.nonnull }
+% if$
+ new.block
+ format.title "title" output.check
+ journal empty$
+ {
+ format.type "type" output.check
+ publisher empty$
+ 'skip$
+ { format.publisher.address output }
+ if$
+ "database on the Internet" 'database :=
+ type database =
+ { format.journal.date "year" output.check }
+ { format.date "year" output.check }
+ if$
+ lastchecked empty$
+ 'skip$
+ { format.lastchecked output }
+ if$
+ new.block
+ part empty$
+ 'skip$
+ { part output }
+ if$
+ pages empty$
+ 'skip$
+ { pages bracket.check output }
+ if$
+ }
+ { journal
+ remove.dots
+ "journal" bibinfo.check
+ "journal" output.check
+ format.type "type" output.check
+ format.journal.date "year" output.check
+ lastchecked empty$
+ 'skip$
+ { format.lastchecked output
+ ";" no.blank.or.punct output
+ }
+ if$
+ no.blank.or.punct format.vol.num output
+ pages empty$
+ 'skip$
+ { ":" no.blank.or.punct output
+ no.blank.or.punct pages bracket.check output
+ }
+ if$
+ new.block
+ }
+ if$
+ format.url "url" output.check
+ new.block
+ note output
+ fin.entry
+}
+% ...urlbst to here
+
+FUNCTION {misc}
+{ output.bibitem
+ format.authors "author" output.check
+ format.editors "author and editor" output.check
+ format.title "title" output.check
+ type missing$
+ { skip$ }
+ { format.type "type" output.check }
+ %%{ inbrackets type output }
+ if$
+ new.block
+ format.publisher.address output
+ format.date "year" output.check
+ new.block
+ format.note output
+ new.block
+ howpublished new.block.checka
+ howpublished "howpublished" bibinfo.check output
+ output.web.refs % urlbst
+ fin.entry
+ empty.misc.check
+}
+
+FUNCTION {article}
+{ output.bibitem
+ format.authors "author" output.check
+ organization empty$
+ 'skip$
+ { author empty$
+ {
+ format.organizations "organization" output.check
+ }
+ {
+ "; " *
+ no.blank.or.punct
+ format.organizations "organization" output.check
+ }
+ if$
+ }
+ if$
+ new.block
+ format.title "title" output.check
+ type missing$
+ { skip$ }
+ { format.type "type" output.check }
+ if$
+ new.block
+ journal
+ remove.dots
+ "journal" bibinfo.check
+ "journal" output.check
+ format.journal.date "year" output.check
+ add.semicolon
+ format.vol.num.pages output
+ new.block
+ format.note output
+ output.web.refs % urlbst
+ fin.entry
+}
+
+FUNCTION {book}
+{ output.bibitem
+ author empty$
+ { editor empty$
+ { format.organizations "organization" output.check }
+ { format.editors "author and editor" output.check }
+ if$
+ }
+ { format.authors output.nonnull
+ "author and editor" editor either.or.check
+ }
+ if$
+ new.block
+ format.btitle "title" output.check
+ format.bvolume output
+ new.block
+ format.edition output
+ new.sentence
+ author empty$ not
+ editor empty$ not
+ and
+ { format.editors "author and editor" output.check }
+ 'skip$
+ if$
+ format.number.series output
+ format.publisher.address output
+ format.date "year" output.check
+ new.block
+ format.note output
+ output.web.refs % urlbst
+ fin.entry
+}
+
+FUNCTION {booklet}
+{ misc }
+
+FUNCTION {dictionary}
+{ output.bibitem
+ format.booktitle "booktitle" output.check
+ format.bvolume output
+ new.block
+ format.edition output
+ new.sentence
+ format.publisher.address output
+ format.date "year" output.check
+ format.btitle "title" output.check
+ add.semicolon
+ add.blank
+ format.pages "pages" output.check
+ new.block
+ format.note output
+ output.web.refs % urlbst
+ fin.entry
+}
+
+FUNCTION {inbook}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ chapter "chapter" output.check
+ new.block
+ format.in.ed.title "title" output.check
+ format.bvolume output
+ format.edition output
+ new.sentence
+ format.number.series output
+ format.publisher.address output
+ format.date "year" output.check
+ date.block
+ add.blank
+ format.pages "pages" output.check
+ new.block
+ format.note output
+ output.web.refs % urlbst
+ fin.entry
+}
+
+FUNCTION {incollection}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.title "title" output.check
+ new.block
+ format.in.ed.booktitle "booktitle" output.check
+ format.bvolume output
+ format.edition output
+ new.sentence
+ format.number.series output
+ format.publisher.address output
+ format.date "year" output.check
+ date.block
+ add.blank
+ format.pages "pages" output.check
+ new.block
+ format.note output
+ output.web.refs % urlbst
+ fin.entry
+}
+
+FUNCTION {inproceedings}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.title "title" output.check
+ new.block
+ format.in.ed.booktitle "booktitle" output.check
+ format.bvolume output
+ new.sentence
+ format.number.series output
+ publisher empty$
+ { format.organization.address output }
+ { organization "organization" bibinfo.check output
+ format.publisher.address output
+ }
+ if$
+ format.date "year" output.check
+ date.block
+ add.blank
+ format.pages "pages" output.check
+ new.block
+ format.note output
+ output.web.refs % urlbst
+ fin.entry
+}
+
+FUNCTION {conference}
+{inproceedings}
+
+FUNCTION {manual}
+{misc}
+
+FUNCTION {phdthesis}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.btitle
+ "title" output.check
+ format.type "type" output.check
+ new.block
+ school "school" bibinfo.warn output
+ address "address" bibinfo.check output
+ format.date "year" output.check
+ new.block
+ format.note output
+ output.web.refs % urlbst
+ fin.entry
+}
+
+FUNCTION {mastersthesis}
+{phdthesis}
+
+FUNCTION {proceedings}
+{ output.bibitem
+ editor empty$
+ { organization "organization" bibinfo.check output
+ }
+ { format.editors output.nonnull }
+ if$
+ new.block
+ format.btitle "title" output.check
+ format.bvolume output
+ editor empty$
+ { publisher empty$
+ 'skip$
+ {
+ new.sentence
+ format.number.series output
+ format.publisher.address output
+ }
+ if$
+ }
+ { publisher empty$
+ {
+ new.sentence
+ format.organization.address output }
+ {
+ new.sentence
+ organization "organization" bibinfo.check output
+ format.publisher.address output
+ }
+ if$
+ }
+ if$
+ format.date "year" output.check
+ new.block
+ format.note output
+ output.web.refs % urlbst
+ fin.entry
+}
+
+FUNCTION {techreport}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.title
+ "title" output.check
+ new.block
+ format.institution.address output
+ format.date "year" output.check
+ format.tr.number output.nonnull
+ new.block
+ format.note output
+ output.web.refs % urlbst
+ fin.entry
+}
+
+FUNCTION {map}
+{ output.bibitem
+ format.cartographers "cartographer" output.check
+ new.block
+ format.title
+ "title" output.check
+ format.type "type" output.check
+ new.block
+ format.publisher.address output
+ format.date "year" output.check
+ new.block
+ format.note output
+ output.web.refs % urlbst
+ fin.entry
+}
+
+FUNCTION {patent}
+{ output.bibitem
+ format.inventors "inventor" output.check
+ "; " *
+ no.blank.or.punct
+ format.assignees "assignee" output.check
+ new.block
+ format.title
+ "title" output.check
+ new.block
+ format.tr.number output.nonnull
+ format.date "year" output.check
+ new.block
+ format.note output
+ output.web.refs % urlbst
+ fin.entry
+}
+
+FUNCTION {unpublished}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.title "title" output.check
+ format.date output
+ new.block
+ format.note "note" output.check
+ output.web.refs % urlbst
+ fin.entry
+}
+
+FUNCTION {default.type} { misc }
+READ
+STRINGS { longest.label }
+INTEGERS { number.label longest.label.width }
+FUNCTION {initialize.longest.label}
+{ "" 'longest.label :=
+ #1 'number.label :=
+ #0 'longest.label.width :=
+}
+FUNCTION {longest.label.pass}
+{ number.label int.to.str$ 'label :=
+ number.label #1 + 'number.label :=
+ label width$ longest.label.width >
+ { label 'longest.label :=
+ label width$ 'longest.label.width :=
+ }
+ 'skip$
+ if$
+}
+EXECUTE {initialize.longest.label}
+ITERATE {longest.label.pass}
+FUNCTION {begin.bib}
+{ preamble$ empty$
+ 'skip$
+ { preamble$ write$ newline$ }
+ if$
+ "\begin{thebibliography}{" longest.label * "}" *
+ write$ newline$
+}
+EXECUTE {begin.bib}
+EXECUTE {init.config.constants}
+EXECUTE {init.state.consts}
+ITERATE {call.type$}
+FUNCTION {end.bib}
+{ newline$
+ "\end{thebibliography}" write$ newline$
+}
+EXECUTE {end.bib}
+%% End of customized bst file
+%%
+%% End of file `vancouver.bst'.
diff --git a/biblio/bibtex/contrib/vancouver/vancouver.pdf b/biblio/bibtex/contrib/vancouver/vancouver.pdf
new file mode 100644
index 0000000000..41176c5652
--- /dev/null
+++ b/biblio/bibtex/contrib/vancouver/vancouver.pdf
Binary files differ
diff --git a/biblio/bibtex/contrib/vancouver/vancouver.tex b/biblio/bibtex/contrib/vancouver/vancouver.tex
new file mode 100644
index 0000000000..70a9d7a610
--- /dev/null
+++ b/biblio/bibtex/contrib/vancouver/vancouver.tex
@@ -0,0 +1,238 @@
+\documentclass[a4paper,10pt]{article}
+\usepackage[english]{babel}
+\usepackage[super,comma,sort&compress]{natbib}
+\usepackage{url}
+\urlstyle{rm} % typeset urls in roman instead of in typewriter style
+\makeatletter
+\renewcommand\@biblabel[1]{#1} %from [1] to 1
+\makeatother
+
+%opening
+\title{International Committee of Medical Journal Editors Uniform Requirements}
+
+\author{Folkert van der Beek}
+
+\begin{document}
+
+\maketitle
+The vancouver.bst bibliographic style file (for \LaTeX/Bib\TeX) is generated with the docstrip utility and modified manually to meet the ``Uniform Requirements for Manuscripts Submitted to Biomedical Journals'' as published in N Engl J Med 1997;336:309-315. (also known as the Vancouver style). This specification may be found on the web page of the International Committe of Medical Journal Editors.\cite{uniform}
+The following samples of reference citation formats were taken from the National Library of Medicine web site to show what works and what does not (yet).\cite{bibliographic}
+
+In order to meet all citation formats, several entry types {--} such as \textbf{@map}, \textbf{@patent}, \textbf{@dictionary} and \textbf{@webpage} {--} and fields {--} such as \textbf{inventor}, \textbf{assignee} (for patents), \textbf{cartographer} (for maps), \textbf{part}, \textbf{lastchecked}, and \textbf{updated} (for webpages). For proper use of these entries and fields I refer to the vancouver.bib file included with the package.
+
+\section{Articles in Journals}
+
+\subsection{Standard journal article}
+
+List the first six authors followed by et al. (Note: NLM now lists all authors.)
+\linebreak
+Halpern SD, Ubel PA, Caplan AL. Solid-organ transplantation in HIV-infected patients. N Engl J Med. 2002 Jul 25;347(4):284-7.\cite{halpern.ubel.ea:solid-organ*2}
+
+
+As an option, if a journal carries continuous pagination throughout a volume (as many medical journals do) the month and issue number may be omitted.
+\linebreak
+Halpern SD, Ubel PA, Caplan AL. Solid-organ transplantation in HIV-infected patients. N Engl J Med. 2002;347:284-7.\cite{halpern.ubel.ea:solid-organ}
+
+\subsubsection{Optional addition of a database's unique identifier for the citation:}
+
+Halpern SD, Ubel PA, Caplan AL. Solid-organ transplantation in HIV-infected patients. N Engl J Med. 2002 Jul 25;347(4):284-7. Cited in PubMed; PMID 12140307.\cite{halpern.ubel.ea:solid-organ*1}
+
+\subsubsection{More than six authors:}
+
+Rose ME, Huerbin MB, Melick J, Marion DW, Palmer AM, Schiding JK, et al. Regulation of interstitial excitatory amino acid concentrations after cortical contusion injury. Brain Res. 2002;935(1-2):40-6.\cite{rose.huerbin.ea:regulation}
+
+\subsection{Organization as author}
+
+Diabetes Prevention Program Research Group. Hypertension, insulin, and proinsulin in participants with impaired glucose tolerance. Hypertension. 2002;40(5):679-86.\cite{hypertension}
+
+\subsection{Both personal authors and an organization as author (This example does not conform to NISO standards.)}
+
+Vallancien G, Emberton M, Harving N, van Moorselaar RJ; Alf-One Study Group. Sexual dysfunction in 1,274 European men suffering from lower urinary tract symptoms. J Urol. 2003;169(6):2257-61.\cite{vallancien.emberton.ea:sexual}
+
+\subsection{No author given}
+
+21st century heart solution may have a sting in the tail. BMJ. 2002;325(7357):184.\cite{21st}
+
+\subsection{Article not in English}
+
+(Note: NLM translates the title into English, encloses the translation in square brackets, and adds an abbreviated language designator.)
+\linebreak
+Ellingsen AE, Wilhelmsen I. Sykdomsangst blant medisin- og jusstudenter. Tidsskr Nor Laegeforen. 2002;122(8):785-7.\cite{ellingsen.wilhelmsen:sykdomsangst}
+
+\subsection{Volume with supplement}
+
+Geraud G, Spierings EL, Keywood C. Tolerability and safety of frovatriptan with short- and long-term use for treatment of migraine and in comparison with sumatriptan. Headache. 2002;42 Suppl 2:S93-9.\cite{geraud.spierings.ea:tolerability}
+
+\subsection{Issue with supplement}
+
+Glauser TA. Integrating clinical trial data into clinical practice. Neurology. 2002;58(12 Suppl 7):S6-12.\cite{glauser:integrating}
+
+\subsection{Volume with part}
+
+Abend SM, Kulish N. The psychoanalytic method from an epistemological viewpoint. Int J Psychoanal. 2002;83(Pt 2):491-5.\cite{abend.kulish:psychoanalytic}
+
+\subsection{Issue with part}
+
+Ahrar K, Madoff DC, Gupta S, Wallace MJ, Price RE, Wright KC. Development of a large animal model for lung tumors. J Vasc Interv Radiol. 2002;13(9 Pt 1):923-8.\cite{ahrar.madoff.ea:development}
+
+\subsection{Issue with no volume}
+
+Banit DM, Kaufer H, Hartford JM. Intraoperative frozen section analysis in revision total joint arthroplasty. Clin Orthop. 2002;(401):230-8.\cite{banit.kaufer.ea:intraoperative}
+
+\subsection{No volume or issue}
+
+Outreach: bringing HIV-positive individuals into care. HRSA Careaction. 2002 Jun:1-6.\cite{outreach}
+
+\subsection{Pagination in roman numerals}
+
+Chadwick R, Schuklenk U. The politics of ethical consensus finding. Bioethics. 2002;16(2):iii-v.\cite{chadwick.schuklenk:politics}
+
+\subsection{Type of article indicated as needed}
+
+Tor M, Turker H. International approaches to the prescription of long-term oxygen therapy [letter]. Eur Respir J. 2002;20(1):242.\cite{tor.turker:international}
+\linebreak
+Lofwall MR, Strain EC, Brooner RK, Kindbom KA, Bigelow GE. Characteristics of older methadone maintenance (MM) patients [abstract]. Drug Alcohol Depend. 2002;66 Suppl 1:S105.\cite{lofwall.strain.ea:characteristics}
+
+\subsection{Article containing retraction}
+
+Feifel D, Moutier CY, Perry W. Safety and tolerability of a rapidly escalating dose-loading regimen for risperidone. J Clin Psychiatry. 2002;63(2):169. Retraction of: Feifel D, Moutier CY, Perry W. J Clin Psychiatry. 2000;61(12):909-11.\cite{feifel.moutier.ea:safety}
+
+\subsection{Article retracted}
+
+Feifel D, Moutier CY, Perry W. Safety and tolerability of a rapidly escalating dose-loading regimen for risperidone. J Clin Psychiatry. 2000;61(12):909-11. Retraction in: Feifel D, Moutier CY, Perry W. J Clin Psychiatry. 2002;63(2):169.\cite{feifel.moutier.ea:safety*1}
+
+\subsection{Article republished with corrections}
+
+Mansharamani M, Chilton BS. The reproductive importance of P-type ATPases. Mol Cell Endocrinol. 2002;188(1-2):22-5. Corrected and republished from: Mol Cell Endocrinol. 2001;183(1-2):123-6.\cite{mansharamani.chilton:reproductive}
+
+\subsection{Article with published erratum}
+
+Malinowski JM, Bolesta S. Rosiglitazone in the treatment of type 2 diabetes mellitus: a critical review. Clin Ther. 2000;22(10):1151-68; discussion 1149-50. Erratum in: Clin Ther 2001;23(2):309.\cite{malinowski.bolesta:rosiglitazone}
+
+\subsection{Article published electronically ahead of the print version}
+
+Yu WM, Hawley TS, Hawley RG, Qu CK. Immortalization of yolk sac-derived precursor cells. Blood. 2002 Nov 15;100(10):3828-31. Epub 2002 Jul 5.\cite{yu.hawley.ea:immortalization}
+
+\section{Books and Other Monographs}
+
+\subsection{Personal author(s)}
+
+Murray PR, Rosenthal KS, Kobayashi GS, Pfaller MA. Medical microbiology. 4th ed. St. Louis: Mosby; 2002.\cite{murray.rosenthal.ea:medical}
+
+\subsection{Editor(s), compiler(s) as author}
+
+Gilstrap LC 3rd, Cunningham FG, VanDorsten JP, editors. Operative obstetrics. 2nd ed. New York: McGraw-Hill; 2002.\cite{gilstrap.cunningham.ea:operative}
+
+\subsection{Author(s) and editor(s)}
+
+Breedlove GK, Schorfheide AM. Adolescent pregnancy. 2nd ed. Wieczorek RR, editor. White Plains (NY): March of Dimes Education Services; 2001.\cite{breedlove.schorfheide:adolescent}
+
+\subsection{Organization(s) as author}
+
+Royal Adelaide Hospital; University of Adelaide, Department of Clinical Nursing. Compendium of nursing research and practice development, 1999-2000. Adelaide (Australia): Adelaide University; 2001.\cite{compendium}
+
+\subsection{Chapter in a book}
+
+Meltzer PS, Kallioniemi A, Trent JM. Chromosome alterations in human solid tumors. In: Vogelstein B, Kinzler KW, editors. The genetic basis of human cancer. New York: McGraw-Hill; 2002. p. 93-113.\cite{meltzer.kallioniemi.ea:genetic}
+
+\subsection{Conference proceedings}
+
+Harnden P, Joffe JK, Jones WG, editors. Germ cell tumours V. Proceedings of the 5th Germ Cell Tumour Conference; 2001 Sep 13-15; Leeds, UK. New York: Springer; 2002.\cite{harnden.joffe.ea:germ}
+
+\subsection{Conference paper}
+
+Christensen S, Oppacher F. An analysis of Koza's computational effort statistic for genetic programming. In: Foster JA, Lutton E, Miller J, Ryan C, Tettamanzi AG, editors. Genetic programming. EuroGP 2002: Proceedings of the 5th European Conference on Genetic Programming; 2002 Apr 3-5; Kinsdale, Ireland. Berlin: Springer; 2002. p. 182-91.\cite{christensen.oppacher:analysis}
+
+\subsection{Scientific or technical report}
+
+\subsubsection{Issued by funding/sponsoring agency:}
+
+Yen GG (Oklahoma State University, School of Electrical and Computer Engineering, Stillwater, OK). Health monitoring on vibration signatures. Final report. Arlington (VA): Air Force Office of Scientific Research (US), Air Force Research Laboratory; 2002 Feb. Report No.: AFRLSRBLTR020123. Contract No.: F496209810049.\cite{yen:health}
+
+\subsubsection{Issued by performing agency:}
+
+Russell ML, Goth-Goldstein R, Apte MG, Fisk WJ. Method for measuring the size distribution of airborne Rhinovirus. Berkeley (CA): Lawrence Berkeley National Laboratory, Environmental Energy Technologies Division; 2002 Jan. Report No.: LBNL49574. Contract No.: DEAC0376SF00098. Sponsored by the Department of Energy.\cite{russell.goth-goldstein.ea:method}
+
+\subsection{Dissertation}
+
+Borkowski MM. Infant sleep and feeding: a telephone survey of Hispanic Americans [dissertation]. Mount Pleasant (MI): Central Michigan University; 2002.\cite{borkowski:infant}
+
+\subsection{Patent}
+
+Pagedas AC, inventor; Ancel Surgical R\&D Inc., assignee. Flexible endoscopic grasping and cutting device and positioning tool assembly. United States patent US 20020103498. 2002 Aug 1.\cite{pagedas:flexible}
+
+\section{Other Published Material}
+
+\subsection{Newspaper article}
+
+Tynan T. Medical improvements lower homicide rate: study sees drop in assault rate. The Washington Post. 2002 Aug 12;Sect. A:2 (col. 4).\cite{tynan:medical}
+
+\subsection{Audiovisual material}
+
+Chason KW, Sallustio S. Hospital preparedness for bioterrorism [videocassette]. Secaucus (NJ): Network for Continuing Medical Education; 2002.\cite{chason.sallustio:hospital}
+
+\subsection{Legal Material}
+
+\subsubsection{Public law:}
+Veterans Hearing Loss Compensation Act of 2002, Pub. L. No. 107-9, 115 Stat. 11 (May 24, 2001).
+
+\subsubsection{Unenacted bill:}
+Healthy Children Learn Act, S. 1012, 107th Cong., 1st Sess. (2001).
+
+\subsubsection{Code of Federal Regulations:}
+Cardiopulmonary Bypass Intracardiac Suction Control, 21 C.F.R. Sect. 870.4430 (2002).
+
+\subsubsection{Hearing:}
+Arsenic in Drinking Water: An Update on the Science, Benefits and Cost: Hearing Before the Subcomm. on Environment, Technology and Standards of the House Comm. on Science, 107th Cong., 1st Sess. (Oct. 4, 2001).
+
+\subsection{Map}
+
+Pratt B, Flick P, Vynne C, cartographers. Biodiversity hotspots [map]. Washington: Conservation International; 2000.\cite{prat.flick.ea:biodiversity}
+
+\subsection{Dictionary and similar references}
+
+Dorland's illustrated medical dictionary. 29th ed. Philadelphia: W.B. Saunders; 2000. Filamin; p. 675.\cite{filamin}
+
+\section{Unpublished Material}
+
+\subsection{In press}
+
+(Note: NLM prefers "forthcoming" because not all items will be printed.)
+\linebreak
+Tian D, Araki H, Stahl E, Bergelson J, Kreitman M. Signature of balancing selection in Arabidopsis. Proc Natl Acad Sci U S A. In press 2002.\cite{ tian.araki.ea:signature}
+
+\section{Electronic Material}
+
+\subsection{CD-ROM}
+
+Anderson SC, Poulsen KB. Anderson's electronic atlas of hematology [CD-ROM]. Philadelphia: Lippincott Williams \& Wilkins; 2002.\cite{anderson.poulsen:andersons}
+
+\subsection{Journal article on the Internet}
+
+Abood S. Quality improvement initiative in nursing homes: the ANA acts in an advisory role. Am J Nurs [serial on the Internet]. 2002 Jun [cited 2002 Aug 12];102(6):[about 3 p.]. Available from: http://www.nursingworld.org/AJN/2002/june/Wawatch.htm\cite{abood:quality}
+
+\subsection{Monograph on the Internet}
+
+Foley KM, Gelband H, editors. Improving palliative care for cancer [monograph on the Internet]. Washington: National Academy Press; 2001 [cited 2002 Jul 9]. Available from: http://www.nap.edu/books/0309074029/html/.\cite{foley.gelband:improving}
+
+\subsection{Homepage/Web site}
+
+Cancer-Pain.org [homepage on the Internet]. New York: Association of Cancer Online Resources, Inc.; c2000-01 [updated 2002 May 16; cited 2002 Jul 9]. Available from: http://www.cancer-pain.org/.\cite{cancer-pain}
+
+\subsection{Part of a homepage/Web site}
+
+American Medical Association [homepage on the Internet]. Chicago: The Association; c1995-2002 [updated 2001 Aug 23; cited 2002 Aug 12]. AMA Office of Group Practice Liaison; [about 2 screens]. Available from: http://www.ama-assn.org/ama/pub/category/1736.html\cite{american}
+
+\subsection{Database on the Internet}
+
+\subsubsection{Open database:}
+Who's Certified [database on the Internet]. Evanston (IL): The American Board of Medical Specialists. c2000 - [cited 2001 Mar 8]. Available from: http://www.abms.org/newsearch.asp\cite{whos}
+
+\subsubsection{Closed database:}
+Jablonski S. Online Multiple Congential Anomaly/Mental Retardation (MCA/MR) Syndromes [database on the Internet]. Bethesda (MD): National Library of Medicine (US). c1999 [updated 2001 Nov 20; cited 2002 Aug 12]. Available from: http://www.nlm.nih.gov/mesh/jablonski/syndrome\_title.html\cite{jablonski:online}
+
+\subsubsection{Part of a database on the Internet}
+MeSH Browser [database on the Internet]. Bethesda (MD): National Library of Medicine (US); 2002 - [cited 2003 Jun 10]. Meta-analysis; unique ID: D015201; [about 3 p.]. Available from: http://www.nlm.nih.gov/mesh/MBrowser.html\cite{mesh}
+\bibliography{vancouver}
+\bibliographystyle{/home/folkert/scripts/vancouver}
+\end{document}
diff --git a/biblio/bibtex/contrib/zootaxa-bst/CHANGES.md b/biblio/bibtex/contrib/zootaxa-bst/CHANGES.md
new file mode 100644
index 0000000000..b8391bb62b
--- /dev/null
+++ b/biblio/bibtex/contrib/zootaxa-bst/CHANGES.md
@@ -0,0 +1,7 @@
+Changelog
+===============
+
+
+## Ver. 1.0 (2019-03-25)
+
+* Initial version, a fork from apa.bst with own functions for managing some specific aspects of the literature cited required by zootaxa. Checked against the [instructions for authors](https://www.mapress.com/j/zt/pages/view/forauthors).
diff --git a/biblio/bibtex/contrib/zootaxa-bst/LICENSE b/biblio/bibtex/contrib/zootaxa-bst/LICENSE
new file mode 100644
index 0000000000..058caea9ce
--- /dev/null
+++ b/biblio/bibtex/contrib/zootaxa-bst/LICENSE
@@ -0,0 +1,415 @@
+The LaTeX Project Public License
+=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
+
+LPPL Version 1.3c 2008-05-04
+
+Copyright 1999 2002-2008 LaTeX3 Project
+ Everyone is allowed to distribute verbatim copies of this
+ license document, but modification of it is not allowed.
+
+
+PREAMBLE
+========
+
+The LaTeX Project Public License (LPPL) is the primary license under
+which the LaTeX kernel and the base LaTeX packages are distributed.
+
+You may use this license for any work of which you hold the copyright
+and which you wish to distribute. This license may be particularly
+suitable if your work is TeX-related (such as a LaTeX package), but
+it is written in such a way that you can use it even if your work is
+unrelated to TeX.
+
+The section `WHETHER AND HOW TO DISTRIBUTE WORKS UNDER THIS LICENSE',
+below, gives instructions, examples, and recommendations for authors
+who are considering distributing their works under this license.
+
+This license gives conditions under which a work may be distributed
+and modified, as well as conditions under which modified versions of
+that work may be distributed.
+
+We, the LaTeX3 Project, believe that the conditions below give you
+the freedom to make and distribute modified versions of your work
+that conform with whatever technical specifications you wish while
+maintaining the availability, integrity, and reliability of
+that work. If you do not see how to achieve your goal while
+meeting these conditions, then read the document `cfgguide.tex'
+and `modguide.tex' in the base LaTeX distribution for suggestions.
+
+
+DEFINITIONS
+===========
+
+In this license document the following terms are used:
+
+ `Work'
+ Any work being distributed under this License.
+
+ `Derived Work'
+ Any work that under any applicable law is derived from the Work.
+
+ `Modification'
+ Any procedure that produces a Derived Work under any applicable
+ law -- for example, the production of a file containing an
+ original file associated with the Work or a significant portion of
+ such a file, either verbatim or with modifications and/or
+ translated into another language.
+
+ `Modify'
+ To apply any procedure that produces a Derived Work under any
+ applicable law.
+
+ `Distribution'
+ Making copies of the Work available from one person to another, in
+ whole or in part. Distribution includes (but is not limited to)
+ making any electronic components of the Work accessible by
+ file transfer protocols such as FTP or HTTP or by shared file
+ systems such as Sun's Network File System (NFS).
+
+ `Compiled Work'
+ A version of the Work that has been processed into a form where it
+ is directly usable on a computer system. This processing may
+ include using installation facilities provided by the Work,
+ transformations of the Work, copying of components of the Work, or
+ other activities. Note that modification of any installation
+ facilities provided by the Work constitutes modification of the Work.
+
+ `Current Maintainer'
+ A person or persons nominated as such within the Work. If there is
+ no such explicit nomination then it is the `Copyright Holder' under
+ any applicable law.
+
+ `Base Interpreter'
+ A program or process that is normally needed for running or
+ interpreting a part or the whole of the Work.
+
+ A Base Interpreter may depend on external components but these
+ are not considered part of the Base Interpreter provided that each
+ external component clearly identifies itself whenever it is used
+ interactively. Unless explicitly specified when applying the
+ license to the Work, the only applicable Base Interpreter is a
+ `LaTeX-Format' or in the case of files belonging to the
+ `LaTeX-format' a program implementing the `TeX language'.
+
+
+
+CONDITIONS ON DISTRIBUTION AND MODIFICATION
+===========================================
+
+1. Activities other than distribution and/or modification of the Work
+are not covered by this license; they are outside its scope. In
+particular, the act of running the Work is not restricted and no
+requirements are made concerning any offers of support for the Work.
+
+2. You may distribute a complete, unmodified copy of the Work as you
+received it. Distribution of only part of the Work is considered
+modification of the Work, and no right to distribute such a Derived
+Work may be assumed under the terms of this clause.
+
+3. You may distribute a Compiled Work that has been generated from a
+complete, unmodified copy of the Work as distributed under Clause 2
+above, as long as that Compiled Work is distributed in such a way that
+the recipients may install the Compiled Work on their system exactly
+as it would have been installed if they generated a Compiled Work
+directly from the Work.
+
+4. If you are the Current Maintainer of the Work, you may, without
+restriction, modify the Work, thus creating a Derived Work. You may
+also distribute the Derived Work without restriction, including
+Compiled Works generated from the Derived Work. Derived Works
+distributed in this manner by the Current Maintainer are considered to
+be updated versions of the Work.
+
+5. If you are not the Current Maintainer of the Work, you may modify
+your copy of the Work, thus creating a Derived Work based on the Work,
+and compile this Derived Work, thus creating a Compiled Work based on
+the Derived Work.
+
+6. If you are not the Current Maintainer of the Work, you may
+distribute a Derived Work provided the following conditions are met
+for every component of the Work unless that component clearly states
+in the copyright notice that it is exempt from that condition. Only
+the Current Maintainer is allowed to add such statements of exemption
+to a component of the Work.
+
+ a. If a component of this Derived Work can be a direct replacement
+ for a component of the Work when that component is used with the
+ Base Interpreter, then, wherever this component of the Work
+ identifies itself to the user when used interactively with that
+ Base Interpreter, the replacement component of this Derived Work
+ clearly and unambiguously identifies itself as a modified version
+ of this component to the user when used interactively with that
+ Base Interpreter.
+
+ b. Every component of the Derived Work contains prominent notices
+ detailing the nature of the changes to that component, or a
+ prominent reference to another file that is distributed as part
+ of the Derived Work and that contains a complete and accurate log
+ of the changes.
+
+ c. No information in the Derived Work implies that any persons,
+ including (but not limited to) the authors of the original version
+ of the Work, provide any support, including (but not limited to)
+ the reporting and handling of errors, to recipients of the
+ Derived Work unless those persons have stated explicitly that
+ they do provide such support for the Derived Work.
+
+ d. You distribute at least one of the following with the Derived Work:
+
+ 1. A complete, unmodified copy of the Work;
+ if your distribution of a modified component is made by
+ offering access to copy the modified component from a
+ designated place, then offering equivalent access to copy
+ the Work from the same or some similar place meets this
+ condition, even though third parties are not compelled to
+ copy the Work along with the modified component;
+
+ 2. Information that is sufficient to obtain a complete,
+ unmodified copy of the Work.
+
+7. If you are not the Current Maintainer of the Work, you may
+distribute a Compiled Work generated from a Derived Work, as long as
+the Derived Work is distributed to all recipients of the Compiled
+Work, and as long as the conditions of Clause 6, above, are met with
+regard to the Derived Work.
+
+8. The conditions above are not intended to prohibit, and hence do not
+apply to, the modification, by any method, of any component so that it
+becomes identical to an updated version of that component of the Work as
+it is distributed by the Current Maintainer under Clause 4, above.
+
+9. Distribution of the Work or any Derived Work in an alternative
+format, where the Work or that Derived Work (in whole or in part) is
+then produced by applying some process to that format, does not relax or
+nullify any sections of this license as they pertain to the results of
+applying that process.
+
+10. a. A Derived Work may be distributed under a different license
+ provided that license itself honors the conditions listed in
+ Clause 6 above, in regard to the Work, though it does not have
+ to honor the rest of the conditions in this license.
+
+ b. If a Derived Work is distributed under a different license, that
+ Derived Work must provide sufficient documentation as part of
+ itself to allow each recipient of that Derived Work to honor the
+ restrictions in Clause 6 above, concerning changes from the Work.
+
+11. This license places no restrictions on works that are unrelated to
+the Work, nor does this license place any restrictions on aggregating
+such works with the Work by any means.
+
+12. Nothing in this license is intended to, or may be used to, prevent
+complete compliance by all parties with all applicable laws.
+
+
+NO WARRANTY
+===========
+
+There is no warranty for the Work. Except when otherwise stated in
+writing, the Copyright Holder provides the Work `as is', without
+warranty of any kind, either expressed or implied, including, but not
+limited to, the implied warranties of merchantability and fitness for a
+particular purpose. The entire risk as to the quality and performance
+of the Work is with you. Should the Work prove defective, you assume
+the cost of all necessary servicing, repair, or correction.
+
+In no event unless required by applicable law or agreed to in writing
+will The Copyright Holder, or any author named in the components of the
+Work, or any other party who may distribute and/or modify the Work as
+permitted above, be liable to you for damages, including any general,
+special, incidental or consequential damages arising out of any use of
+the Work or out of inability to use the Work (including, but not limited
+to, loss of data, data being rendered inaccurate, or losses sustained by
+anyone as a result of any failure of the Work to operate with any other
+programs), even if the Copyright Holder or said author or said other
+party has been advised of the possibility of such damages.
+
+
+MAINTENANCE OF THE WORK
+=======================
+
+The Work has the status `author-maintained' if the Copyright Holder
+explicitly and prominently states near the primary copyright notice in
+the Work that the Work can only be maintained by the Copyright Holder
+or simply that it is `author-maintained'.
+
+The Work has the status `maintained' if there is a Current Maintainer
+who has indicated in the Work that they are willing to receive error
+reports for the Work (for example, by supplying a valid e-mail
+address). It is not required for the Current Maintainer to acknowledge
+or act upon these error reports.
+
+The Work changes from status `maintained' to `unmaintained' if there
+is no Current Maintainer, or the person stated to be Current
+Maintainer of the work cannot be reached through the indicated means
+of communication for a period of six months, and there are no other
+significant signs of active maintenance.
+
+You can become the Current Maintainer of the Work by agreement with
+any existing Current Maintainer to take over this role.
+
+If the Work is unmaintained, you can become the Current Maintainer of
+the Work through the following steps:
+
+ 1. Make a reasonable attempt to trace the Current Maintainer (and
+ the Copyright Holder, if the two differ) through the means of
+ an Internet or similar search.
+
+ 2. If this search is successful, then enquire whether the Work
+ is still maintained.
+
+ a. If it is being maintained, then ask the Current Maintainer
+ to update their communication data within one month.
+
+ b. If the search is unsuccessful or no action to resume active
+ maintenance is taken by the Current Maintainer, then announce
+ within the pertinent community your intention to take over
+ maintenance. (If the Work is a LaTeX work, this could be
+ done, for example, by posting to comp.text.tex.)
+
+ 3a. If the Current Maintainer is reachable and agrees to pass
+ maintenance of the Work to you, then this takes effect
+ immediately upon announcement.
+
+ b. If the Current Maintainer is not reachable and the Copyright
+ Holder agrees that maintenance of the Work be passed to you,
+ then this takes effect immediately upon announcement.
+
+ 4. If you make an `intention announcement' as described in 2b. above
+ and after three months your intention is challenged neither by
+ the Current Maintainer nor by the Copyright Holder nor by other
+ people, then you may arrange for the Work to be changed so as
+ to name you as the (new) Current Maintainer.
+
+ 5. If the previously unreachable Current Maintainer becomes
+ reachable once more within three months of a change completed
+ under the terms of 3b) or 4), then that Current Maintainer must
+ become or remain the Current Maintainer upon request provided
+ they then update their communication data within one month.
+
+A change in the Current Maintainer does not, of itself, alter the fact
+that the Work is distributed under the LPPL license.
+
+If you become the Current Maintainer of the Work, you should
+immediately provide, within the Work, a prominent and unambiguous
+statement of your status as Current Maintainer. You should also
+announce your new status to the same pertinent community as
+in 2b) above.
+
+
+WHETHER AND HOW TO DISTRIBUTE WORKS UNDER THIS LICENSE
+======================================================
+
+This section contains important instructions, examples, and
+recommendations for authors who are considering distributing their
+works under this license. These authors are addressed as `you' in
+this section.
+
+Choosing This License or Another License
+----------------------------------------
+
+If for any part of your work you want or need to use *distribution*
+conditions that differ significantly from those in this license, then
+do not refer to this license anywhere in your work but, instead,
+distribute your work under a different license. You may use the text
+of this license as a model for your own license, but your license
+should not refer to the LPPL or otherwise give the impression that
+your work is distributed under the LPPL.
+
+The document `modguide.tex' in the base LaTeX distribution explains
+the motivation behind the conditions of this license. It explains,
+for example, why distributing LaTeX under the GNU General Public
+License (GPL) was considered inappropriate. Even if your work is
+unrelated to LaTeX, the discussion in `modguide.tex' may still be
+relevant, and authors intending to distribute their works under any
+license are encouraged to read it.
+
+A Recommendation on Modification Without Distribution
+-----------------------------------------------------
+
+It is wise never to modify a component of the Work, even for your own
+personal use, without also meeting the above conditions for
+distributing the modified component. While you might intend that such
+modifications will never be distributed, often this will happen by
+accident -- you may forget that you have modified that component; or
+it may not occur to you when allowing others to access the modified
+version that you are thus distributing it and violating the conditions
+of this license in ways that could have legal implications and, worse,
+cause problems for the community. It is therefore usually in your
+best interest to keep your copy of the Work identical with the public
+one. Many works provide ways to control the behavior of that work
+without altering any of its licensed components.
+
+How to Use This License
+-----------------------
+
+To use this license, place in each of the components of your work both
+an explicit copyright notice including your name and the year the work
+was authored and/or last substantially modified. Include also a
+statement that the distribution and/or modification of that
+component is constrained by the conditions in this license.
+
+Here is an example of such a notice and statement:
+
+ %% pig.dtx
+ %% Copyright 2005 M. Y. Name
+ %
+ % This work may be distributed and/or modified under the
+ % conditions of the LaTeX Project Public License, either version 1.3
+ % of this license or (at your option) any later version.
+ % The latest version of this license is in
+ % http://www.latex-project.org/lppl.txt
+ % and version 1.3 or later is part of all distributions of LaTeX
+ % version 2005/12/01 or later.
+ %
+ % This work has the LPPL maintenance status `maintained'.
+ %
+ % The Current Maintainer of this work is M. Y. Name.
+ %
+ % This work consists of the files pig.dtx and pig.ins
+ % and the derived file pig.sty.
+
+Given such a notice and statement in a file, the conditions
+given in this license document would apply, with the `Work' referring
+to the three files `pig.dtx', `pig.ins', and `pig.sty' (the last being
+generated from `pig.dtx' using `pig.ins'), the `Base Interpreter'
+referring to any `LaTeX-Format', and both `Copyright Holder' and
+`Current Maintainer' referring to the person `M. Y. Name'.
+
+If you do not want the Maintenance section of LPPL to apply to your
+Work, change `maintained' above into `author-maintained'.
+However, we recommend that you use `maintained', as the Maintenance
+section was added in order to ensure that your Work remains useful to
+the community even when you can no longer maintain and support it
+yourself.
+
+Derived Works That Are Not Replacements
+---------------------------------------
+
+Several clauses of the LPPL specify means to provide reliability and
+stability for the user community. They therefore concern themselves
+with the case that a Derived Work is intended to be used as a
+(compatible or incompatible) replacement of the original Work. If
+this is not the case (e.g., if a few lines of code are reused for a
+completely different task), then clauses 6b and 6d shall not apply.
+
+
+Important Recommendations
+-------------------------
+
+ Defining What Constitutes the Work
+
+ The LPPL requires that distributions of the Work contain all the
+ files of the Work. It is therefore important that you provide a
+ way for the licensee to determine which files constitute the Work.
+ This could, for example, be achieved by explicitly listing all the
+ files of the Work near the copyright notice of each file or by
+ using a line such as:
+
+ % This work consists of all files listed in manifest.txt.
+
+ in that place. In the absence of an unequivocal list it might be
+ impossible for the licensee to determine what is considered by you
+ to comprise the Work and, in such a case, the licensee would be
+ entitled to make reasonable conjectures as to which files comprise
+ the Work. \ No newline at end of file
diff --git a/biblio/bibtex/contrib/zootaxa-bst/README.md b/biblio/bibtex/contrib/zootaxa-bst/README.md
new file mode 100644
index 0000000000..7ca5fa7fd1
--- /dev/null
+++ b/biblio/bibtex/contrib/zootaxa-bst/README.md
@@ -0,0 +1,48 @@
+# zootaxa-bst
+A .bst reference style for LaTeX
+
+## Introduction
+
+This package provides a bst reference style file for the journal zootaxa that publishes contributions in zoology and classification. This is a fork of `apa.bst` as provided by texlive since this style file resembled the most Zootaxa's own style. Further modifications were made to the code in order to generate in-text citations and bibliography sections appropriately. Although I have not tested the style with tools other than the texlive distribution under linux, it is expected to work on any platform and distribution that the apa.bst file does. Please see below under 'Bug reports and contributing' if something is not behaving as expected.
+
+## Download
+
+This package is being submited to CTAN and will eventually be available there and probably bundled together with distributions such as texlive. In the meantime, it can be downloaded from github (https://github.com/gaballench/zootaxa-bst/) where we will also find the development version of the package.
+
+## Installation
+
+There are two ways:
+
+- Put the .bst file where latex can find it.
+- Put the .bst file in the same directory as your tex file so that it can be found during compilation. This method is preferred when you need the style file just for a single project and don't expect to needed later.
+
+## Usage
+
+Please note that three lines are necessary for compiling with this reference style:
+
+```
+\documentclass{article}
+
+\usepackage{natbib}
+...
+...
+...
+\bibliographystyle{zootaxa}
+\bibliography{example-refs}
+
+\end{document}
+```
+
+The command `usepackage` activates the `natbib` package necessary for managing references. The command `bibliographystyle` will tell the system to use `zootaxa.bst`. The command `bibliography` points the `.bib` file. Please note that the fact that we are not indicating paths indicates that 1) the files are in the path (in the case of the package if it was installed where the system can find it), or the in working directory where the remaining files are found (e.g., the bibliography file).
+
+## Author(s) and maintainer(s)
+
+Currently only Gustavo A. Ballen is involved in the development of this package.
+
+## Bug reports and contributing
+
+Please feel free to send a pull request through github for improving the package. Also, you can send bug reports and suggestions for improvement; please ensure that you provide a reproducible instance along with your bug report (e.g., both the .tex file and the .bib file that I can compile so that I can better understand what is going on).
+
+## License
+
+This package is released under the LaTeX Project Public License in order to follow the license of the apa package on CTAN. See https://ctan.org/license/lppl1.3c for details and the file `LICENSE` for details.
diff --git a/biblio/bibtex/contrib/zootaxa-bst/example-refs.bib b/biblio/bibtex/contrib/zootaxa-bst/example-refs.bib
new file mode 100644
index 0000000000..b8a5d1154f
--- /dev/null
+++ b/biblio/bibtex/contrib/zootaxa-bst/example-refs.bib
@@ -0,0 +1,961 @@
+@article{Arratia2018,
+author = {Arratia, Gloria and Gonz{\'{a}}lez-Rodr{\'{i}}guez, Katia A. and Hern{\'{a}}ndez-Guerrero, Citlalli},
+doi = {10.5194/fr-21-93-2018},
+issn = {21930074},
+journal = {Fossil Record},
+number = {1},
+pages = {93--107},
+title = {{A new Pachyrhizodontid Fish (Actinopterygii, Teleostei) from the Muhi Quarry (Albian-Cenomanian), Hidalgo, Mexico}},
+volume = {21},
+year = {2018}
+}
+@book{Agassiz1833II,
+author = {Agassiz, Louis},
+pages = {1--336},
+title = {{Recherches sur les Poissons Fossiles. Tome II}},
+year = {1833}
+}
+@article{Doiuchi2005,
+author = {Doiuchi, Ryu and Nakabo, Tetsuji},
+doi = {10.1007/s10228-004-0263-1},
+issn = {13418998},
+journal = {Ichthyological Research},
+keywords = {Sphyraena,Sphyraena iburiensis sp. nov.,Sphyraena obtusata group,Sphyraenidae},
+pages = {132--151},
+title = {{The \textit{Sphyraena obtusata} group (Perciformes: Sphyraenidae) with a description of a new species from southern Japan}},
+volume = {52},
+year = {2005}
+}
+@article{Mainwaring1978,
+author = {Mainwaring, A. J.},
+pages = {162},
+title = {{Anatomical and Systematic review of the Pachycormidae, a family of Mesozoic fossil fishes}},
+year = {1978}
+}
+@article{Sanchez-Villagra2004,
+author = {S{\'{a}}nchez-Villagra, Marcelo R and Asher, Robert J and Rinc{\'{o}}n, Ascanio D and Carlini, Alfredo A and Meylan, Peter A and Purdy, Robert W},
+journal = {Special Papers in Palaeontology},
+pages = {105--112},
+title = {{New faunal reports for the cerro La Cruz locality (Lower Miocene), north-eastern Venezuela}},
+volume = {71},
+year = {2004}
+}
+@article{Betancur2017,
+author = {Betancur-R, Ricardo and Wiley, Edward O and Arratia, Gloria and Acero, Arturo and Bailly, Nicolas and Miya, Masaki and Lecointre, Guillaume and Ort{\'{i}}, Guillermo},
+journal = {BMC Evolutionary Biology},
+number = {162},
+pages = {1--40},
+title = {{Phylogenetic classification of bony fishes}},
+volume = {17},
+year = {2017}
+}
+@article{Fowler1903,
+author = {Fowler, Henry W},
+journal = {Proceedings of the Academy of Natural Sciences of Philadelphia},
+number = {1903},
+pages = {743--752},
+title = {{New and little known Mugilidae and Sphyraenidae}},
+volume = {55},
+year = {1903}
+}
+@article{Brzobohaty2011a,
+author = {Brzobohat{\'{y}}, Rostislav and Nolf, Dirk},
+issn = {03746291},
+journal = {Bulletin de l'Institut Royal des Sciences Naturelles de Belqique, Sciences de la Terre},
+keywords = {Bartonian,Eocene,Otoliths,Spain,Teleosts},
+pages = {279--295},
+title = {{Fish otoliths from the middle Eocene (Bartonian) of Yebra de Basa, province of Huesca, Spain}},
+volume = {81},
+year = {2011}
+}
+@article{Cope1875,
+author = {Cope, Edward D},
+journal = {Proceedings of the American Philosophical Society},
+number = {94},
+pages = {361--364},
+title = {{Synopsis of the Vertebrata of the Miocene of Cumberland County , New Jersey}},
+volume = {14},
+year = {1875}
+}
+@article{Bryant1991,
+author = {Bryant, J Daniel},
+journal = {Journal of Vertebrate Paleontology},
+number = {4},
+pages = {472--489},
+title = {{New early Barstovian (Middle Miocene) vertebrates from the upper Torreya Formation, Eastern Florida Panhandle}},
+volume = {11},
+year = {1991}
+}
+@article{UGENE2012,
+author = {Okonechnikov, Konstantin and Golosova, Olga and Fursov, Mikhail and Varlamov, Alexey and Vaskin, Yuri and Efremov, Ivan and {German Grehov}, O. G. and Kandrov, Denis and Rasputin, Kirill and Syabro, Maxim and Tleukenov, Timur},
+doi = {10.1093/bioinformatics/bts091},
+isbn = {1367-4811 (Electronic)$\backslash$r1367-4803 (Linking)},
+issn = {13674803},
+journal = {Bioinformatics},
+pages = {1166--1167},
+pmid = {22368248},
+title = {{Unipro UGENE: A unified bioinformatics toolkit}},
+volume = {28},
+year = {2012}
+}
+@article{Arambourg1966,
+author = {Arambourg, Camille},
+journal = {Notes et M{\'{e}}moires sur le Moyen-Orient},
+pages = {1--210},
+title = {{Les poissons oligoc{\`{e}}nes de l'Iran}},
+volume = {3},
+year = {1966}
+}
+@article{Amalfitano2017,
+author = {Amalfitano, J. and Giusberti, L. and Fornaciari, E. and Carnevale, Giorgio},
+issn = {20394942},
+journal = {Rivista Italiana di Paleontologia e Stratigrafia},
+keywords = {Bony fishes,Historical collections,Pachycormiformes,Southern Europe},
+number = {3},
+pages = {475--485},
+title = {{A reappraisal of the Italian record of the cretaceous Pachycormid Fish \textit{Protosphyraena} Leidy, 1857}},
+volume = {123},
+year = {2017}
+}
+@article{Dollo1888,
+author = {Dollo, Louis and Storms, Raymond},
+journal = {Zoologischer Anzeiger},
+pages = {265--267},
+title = {{Sur les T{\'{e}}l{\'{e}}ost{\'{e}}ens du Rup{\'{e}}lien}},
+volume = {11},
+year = {1888}
+}
+@article{Ronquist2012,
+author = {Ronquist, Fredrik and Teslenko, Maxim and {Van Der Mark}, Paul and Ayres, Daniel L. and Darling, Aaron and H{\"{o}}hna, Sebastian and Larget, Bret and Liu, Liang and Suchard, Marc A. and Huelsenbeck, John P},
+doi = {10.1093/sysbio/sys029},
+isbn = {1076-836X (Electronic)$\backslash$n1063-5157 (Linking)},
+issn = {10635157},
+journal = {Systematic Biology},
+keywords = {Bayes factor,Bayesian inference,MCMC,model averaging,model choice},
+number = {3},
+pages = {539--542},
+pmid = {22357727},
+title = {{MrBayes 3.2: Efficient bayesian phylogenetic inference and model choice across a large model space}},
+volume = {61},
+year = {2012}
+}
+@misc{RCoreTeam2017,
+address = {Vienna},
+author = {{R Core Development Team}},
+publisher = {R Foundation for Statistical Computing},
+title = {{R: A language and environment for statistical computing}},
+url = {http://www.r-project.org/},
+year = {2017}
+}
+@book{Bannikov2010,
+address = {Moscow},
+author = {Bannikov, Alexandre F},
+pages = {92},
+publisher = {GEOS},
+title = {{Iskopaemye pozvonochnye Rossii i sopredel'nykh stran. Iskopaemye kolyucheperye ryby (Teleostei, Acanthopterigii)}},
+year = {2010}
+}
+@article{Leidy1856,
+author = {Leidy, Joseph},
+journal = {Proceedings of the Academy of Natural Sciences of Philadelphia},
+pages = {220--221},
+title = {{Notice of remains of extinct vertebrated animals of New-Jersey, collected by Prof. Cook of the State Geological Survey under the direction of Dr. W. Kitchell}},
+volume = {8},
+year = {1856}
+}
+@article{Weiler1938,
+author = {Weiler, Worms von Wilhelm},
+journal = {Geologica Hungarica. Series Palaeontologica},
+number = {1-30},
+title = {{Neue Untersuchungen an Mitteloligoz{\"{a}}nen Fischen Ungarns}},
+volume = {15},
+year = {1938}
+}
+@article{Bone1991,
+author = {Bone, David A and Todd, Jonathan A and Tracey, Steve},
+journal = {Tertiary Research},
+number = {3-4},
+pages = {131--137},
+title = {{Fossils from the Bracklesham Group exposed in the M27 Motorway excavations, Southampton, Hampshire}},
+volume = {12},
+year = {1991}
+}
+@incollection{FAO2005,
+address = {Rome},
+author = {FAO-FIGIS},
+booktitle = {A World Overview of Species of Interest to Fisheries},
+pages = {1--3},
+publisher = {FAO},
+title = {{\textit{Trachurus trachurus}}},
+year = {2005}
+}
+@article{Rana1990,
+author = {Rana, Rajendra Singh},
+journal = {Journal of the Palaeontological Society of India},
+pages = {105--120},
+title = {{Palaeontology and palaeoecology of the intertrappean (Cretaceous-Tertiary transition) beds of the Peninsular India}},
+volume = {35},
+year = {1990}
+}
+@article{Leidy1854,
+author = {Leidy, Joseph},
+journal = {Proeceedings of the Academy of Natural Sciencies of Philadelphia},
+pages = {395--397},
+title = {{Indications of twelve species of fossil Fishes}},
+volume = {7},
+year = {1855}
+}
+@article{Grubich2008,
+author = {Grubich, Justin R and Rice, Aaron N and Westneat, Mark W},
+doi = {10.1016/j.zool.2007.05.003},
+issn = {0944-2006},
+journal = {Zoology},
+keywords = {Animals,Biomechanics,Bite Force,Computer Simulation,Jaw,Jaw: anatomy {\&} histology,Jaw: physiology,Perciformes,Perciformes: anatomy {\&} histology,Perciformes: physiology,Predatory Behavior,Predatory Behavior: physiology,Video Recording},
+month = {jan},
+number = {1},
+pages = {16--29},
+pmid = {18082386},
+title = {{Functional morphology of bite mechanics in the Great Barracuda (\textit{Sphyraena barracuda})}},
+url = {http://www.ncbi.nlm.nih.gov/pubmed/18082386},
+volume = {111},
+year = {2008}
+}
+@article{Bardack1969,
+author = {Bardack, David},
+journal = {University of Kansas Paleontological Contributions},
+pages = {1--86},
+title = {{Anatomy and evolution of Chirocentrid fishes}},
+volume = {10},
+year = {1969}
+}
+@article{Casier1946,
+author = {Casier, Edgard},
+journal = {M{\'{e}}moires du Mus{\'{e}}e Royal d'Histoire Naturelle de Belgique},
+pages = {1--267},
+title = {{La faune ichthyologique de l'Ypr{\'{e}}sien de la Belgique}},
+volume = {104},
+year = {1946}
+}
+@article{Mateus2019,
+author = {Mateus, Oct{\'{a}}vio and Callapez, Pedro M. and Polcyn, Michael J. and Schulp, Anne S. and Gon{\c{c}}alves, Ant{\'{o}}nio Ol{\'{i}}mpio and Jacobs, Louis L.},
+doi = {10.1007/978-3-030-03083-4_4},
+isbn = {9783030030834},
+journal = {Biodiversity of Angola},
+pages = {53--76},
+title = {{The Fossil Record of Biodiversity in Angola Through Time: A Paleontological Perspective}},
+url = {http://link.springer.com/10.1007/978-3-030-03083-4{\_}4},
+year = {2019}
+}
+@article{Friedman2018a,
+author = {Friedman, Matt and Carnevale, Giorgio},
+doi = {10.1144/jgs2017-164},
+issn = {0016-7649},
+journal = {Journal of the Geological Society},
+number = {4},
+pages = {569--579},
+title = {{The Bolca Lagerst{\"{a}}tten: shallow marine life in the Eocene}},
+volume = {175},
+year = {2018}
+}
+@phdthesis{Anthony,
+author = {Monsch, Kenneth Anthony},
+title = {{The Phylogeny of the Scombroid Fishes}},
+year = {2000}
+}
+@article{Bannikov2008,
+author = {Bannikov, Alexandre F},
+journal = {Studie Ricerche sui Giacimenti Terziari di Bolca},
+pages = {65--76},
+title = {{Revision of the Atheriniform fish genera \textit{Rhamphognathus} Agassiz and \textit{Mesogaster} Agassiz (Teleostei) From the Eocene of Bolca, northern Italy}},
+volume = {9},
+year = {2008}
+}
+@book{Nelson2016,
+address = {New Jersey},
+author = {Nelson, J S and Grande, Terry and Wilson, Mark V H},
+edition = {5},
+isbn = {9781118342336},
+pages = {1--707},
+publisher = {John Wiley {\&} Sons},
+title = {{Fishes of the World}},
+year = {2016}
+}
+@article{Pastore2009,
+author = {Pastore, Michele A.},
+doi = {10.1017/S0025315409000575},
+issn = {00253154},
+journal = {Journal of the Marine Biological Association of the United Kingdom},
+keywords = {Gulf of Taranto,Mediterranean Sea,New species,Sphyraena intermedia,Sphyraenidae},
+number = {6},
+pages = {1299--1303},
+title = {{\textit{Sphyraena intermedia} sp. nov. (Pisces: Sphyraenidae): a potential new species of barracuda identified from the central Mediterranean Sea}},
+volume = {89},
+year = {2009}
+}
+@article{Forey1977,
+author = {Forey, Peter L},
+journal = {Bulletin of the British Museum (Natural History)},
+number = {2},
+pages = {123--204},
+title = {{The osteology of \textit{Notelops} Woodward, \textit{Rhacolepis} Agassiz and \textit{Pachyrhizodus} Dixon (Pisces: Teleostei)}},
+volume = {28},
+year = {1977}
+}
+@article{Mas2000a,
+author = {Mas, Guillem},
+issn = {0212260X},
+journal = {Bolleti de la Societat d'Historia Natural de les Balears},
+keywords = {Mallorca,Middle-upper pliocene,Palaeoecology,Pisces,Western Mediterranean},
+pages = {39--61},
+title = {{Ictiofauna del Plioc{\`{e}} mitj{\`{a}}-superior de la conca sediment{\`{a}}ria de Palma (Illes Balears, Mediterr{\`{a}}nia Occidental). Implicacions paleoambientals}},
+volume = {43},
+year = {2000}
+}
+@book{Nolf1985,
+author = {Nolf, Dirk},
+editor = {Schultze, Hans-Peter},
+isbn = {3437303996},
+pages = {1--145},
+publisher = {Gustav Fischer Verlag},
+title = {{Handbook of Paleoichthyology. Otolithi Piscium}},
+year = {1985}
+}
+@article{Hays1830,
+author = {Hays, Isaac},
+journal = {Transactions of the American Philosophical Society},
+pages = {471--477},
+title = {{Description of a fragment of the head of a new fossil animal, discovered in a Marl Pit, near Moorestown, New Jersey}},
+volume = {3},
+year = {1830}
+}
+@article{Carrillo-Briceno2018a,
+author = {Carrillo-Brice{\~{n}}o, Jorge D and Reyes-Cespedes, Andr{\'{e}}s E and Salas-Gismondi, Rodolfo and S{\'{a}}nchez, Rodolfo},
+doi = {10.1007/s13358-018-0180-y},
+isbn = {0123456789},
+issn = {16642384},
+journal = {Swiss Journal of Palaeontology},
+keywords = {Biogeography,Caujarao Formation,Miocene,Neogene,Orinoco River},
+title = {{A new vertebrate continental assemblage from the Tortonian of Venezuela}},
+volume = {0123456789},
+year = {2018}
+}
+@article{Fricke2011a,
+author = {Fricke, Ronald and Kulbick, Michel and Wantiez, Laurent},
+journal = {Stuttgarter Beitr{\"{a}}ge zur Naturkunde A, New Series},
+pages = {341--463},
+title = {{Checklist of the fishes of New Caledonia, and their distribution in the Southwest Pacific Ocean (Pisces)}},
+volume = {4},
+year = {2011}
+}
+@book{Woodward1895,
+address = {London},
+author = {Woodward, Arthur Smith},
+pages = {1--544},
+publisher = {Taylor {\&} Francis},
+title = {{Catalogue of the Fossil Fishes in the British Museum (Natural History). Part III}},
+year = {1895}
+}
+@book{Artedi1793,
+author = {Artedi, P},
+editor = {R{\"{o}}se, A F},
+pages = {1--140},
+title = {{Petri Artedi Angermannia--Sueci synonymia nominum piscium fere omnium;... Ichthyologiae pars IV. Editio II. Grypeswaldiae}},
+year = {1793}
+}
+@misc{EschmeyerWeb,
+author = {Fricke, R and Eschmeyer, W N and van der Laan, R},
+title = {{Eschmeyer's catalog of Fishes: Genera, species, references}},
+url = {http://researcharchive.calacademy.org/research/ichthyology/catalog/fishcatmain.asp},
+urldate = {2019-02-19},
+year = {2019}
+}
+@article{Fanti2016,
+author = {Fanti, Federico and Minelli, Daniela and Conte, Gabriele Larocca and Miyashita, Tetsuto},
+doi = {10.1186/s40851-016-0045-4},
+isbn = {4085101600454},
+issn = {2056-306X},
+journal = {Zoological Letters},
+keywords = {Bolca,Carcharhinuformes,Early eocene climatic optimum,Galeorhinus,Nursery habitat,Soft tissue,Sphyraena,Stomach content,Triakidae,von Bertalanffy},
+pages = {2--18},
+publisher = {Zoological Letters},
+title = {{An exceptionally preserved Eocene Shark and the rise of modern predator–prey interactions in the coral reef food web}},
+url = {http://dx.doi.org/10.1186/s40851-016-0045-4},
+volume = {2},
+year = {2016}
+}
+@article{DeSylva1963,
+author = {de Sylva, Donald P},
+journal = {Studies in Tropical Oceanography},
+pages = {1--179},
+title = {{Systematics and life history of the great barracuda \textit{Sphyraena barracuda} (Walbaum)}},
+volume = {1},
+year = {1963}
+}
+@article{Dames1883,
+author = {Dames, F T W},
+journal = {Sitzungsber . d . kgl . pr . Akad . d . Wiss. zu Berlin},
+pages = {129--135},
+title = {{{\"{U}}ber eine terti{\"{a}}re Wirbelthier-fauna von der westlichen Insel Birket-el-Qurun im Fajum (Aegypten).}},
+volume = {6},
+year = {1883}
+}
+@article{Paramo2001,
+author = {P{\'{a}}ramo-Fonseca, Mar{\'{i}}a Eur{\'{i}}dice},
+journal = {Bolte{\'{i}}n Geol{\'{o}}gico Ingeominas},
+pages = {47--83},
+title = {{Los peces de la familia Pachyrhizodontidae (Teleostei) del Turoniano del Valle Superior del Magdalena}},
+volume = {39},
+year = {2001}
+}
+@article{Whitley1947,
+author = {Whitley, G P},
+journal = {Australian Zoologist},
+number = {2},
+pages = {129--150},
+title = {{New sharks and fishes from Western Australia. Part 3}},
+volume = {11},
+year = {1947}
+}
+@incollection{Demere1984,
+address = {Baja California},
+author = {Dem{\'{e}}r{\'{e}}, Thomas A and Roeder, Mark A and Chandler, Robert M and Minch, John A},
+booktitle = {Miocene and Cretaceous Depositional Environments, Northwestern Baja California, Mexico},
+editor = {Minch, John A and Ashby, James R},
+pages = {47--56},
+publisher = {Pacific Section AAPG},
+title = {{Paleontology of the middle Miocene Los Indios Member of the Rosarito Formation, northwestern Baja California, Mexico}},
+year = {1984}
+}
+@incollection{Bourque2013,
+address = {Dodrecht},
+archivePrefix = {arXiv},
+arxivId = {arXiv:1011.1669v3},
+author = {Bourque, Jason R},
+booktitle = {Morphology and Evolution of Turtles},
+doi = {10.5860/choice.50-3263},
+eprint = {arXiv:1011.1669v3},
+isbn = {978-94-007-4308-3},
+issn = {0009-4978},
+pages = {459--475},
+pmid = {25246403},
+publisher = {Springer Sciences+Business Media},
+title = {{Fossil Kinosternidae from the Oligocene and Miocene of Florida, USA}},
+year = {2013}
+}
+@article{Santini2015,
+author = {Santini, F and Carnevale, G and Sorenson, L},
+doi = {10.1080/11250003.2014.962630},
+issn = {17485851},
+journal = {Italian Journal of Zoology},
+keywords = {Phylogeny,Sphyraenidae,coral reefs,fossils,molecular clock},
+number = {1},
+pages = {133--142},
+publisher = {Taylor {\&} Francis},
+title = {{First timetree of Sphyraenidae (Percomorpha) reveals a Middle Eocene crown age and an Oligo–Miocene radiation of Barracudas}},
+url = {http://dx.doi.org/10.1080/11250003.2014.962630},
+volume = {82},
+year = {2015}
+}
+@article{Darriba2012,
+archivePrefix = {arXiv},
+arxivId = {arXiv:1011.1669v3},
+author = {Darriba, Diego and Taboada, Guillermo L and Doallo, Ram{\'{o}}n and Posada, David},
+doi = {10.1038/nmeth.2109},
+eprint = {arXiv:1011.1669v3},
+isbn = {1548-7091},
+issn = {1548-7091},
+journal = {Nature Methods},
+language = {en},
+month = {aug},
+number = {8},
+pages = {772--772},
+pmid = {22847109},
+shorttitle = {jModelTest 2},
+title = {{jModelTest 2: more models, new heuristics and parallel computing}},
+url = {http://www.nature.com/nmeth/journal/v9/n8/full/nmeth.2109.html http://www.nature.com/doifinder/10.1038/nmeth.2109},
+volume = {9},
+year = {2012}
+}
+@article{Rapp1946,
+author = {Rapp, William F},
+journal = {Journal of Paleontology},
+number = {5},
+pages = {510--513},
+title = {{Check list of the fossil fishes of New Jersey}},
+volume = {20},
+year = {1946}
+}
+@article{Marsili2007,
+author = {Marsili, Stefano and Carnevale, Giorgio and Danese, Ermanno and Bianucci, Giovanni and Landini, Walter},
+doi = {10.1016/j.annpal.2007.01.001},
+issn = {07533969},
+journal = {Annales de Pal{\'{e}}ontologie},
+month = {jan},
+number = {1},
+pages = {27--66},
+title = {{Early Miocene vertebrates from Montagna della Maiella, Italy}},
+url = {http://linkinghub.elsevier.com/retrieve/pii/S075339690700002X},
+volume = {93},
+year = {2007}
+}
+@article{Casier1944b,
+author = {Casier, Edgard},
+journal = {Bulletin du Muse{\'{e}} Royal d'Histoire Naturelle de Belgique},
+number = {23},
+pages = {1--8},
+title = {{Contributions a l'etude des poissons fossiles de la Belgique. VII. Morphologie du dentaire de Sphyraenodus lerichei Casier}},
+volume = {20},
+year = {1944}
+}
+@article{Huyghebaert1979,
+author = {Huyghebaert, Beatrijs and Nolf, Dirk},
+journal = {Mededelingen van de Werkgroep voor Tertiaire en Kwartaire Geologie},
+number = {4},
+pages = {139--170},
+title = {on fish-otoliths, published since 1968},
+volume = {16},
+year = {1979}
+}
+@article{Bemis2005,
+author = {Bemis, William E. and Giuliano, Anne and McGuire, Betty},
+doi = {10.1016/j.zool.2005.09.004},
+issn = {09442006},
+journal = {Zoology},
+keywords = {Actinopterygians,Pomatomidae,Tooth replacement,Vertebrate dentition},
+number = {4},
+pages = {317--327},
+title = {{Structure, attachment, replacement and growth of teeth in bluefish, \textit{Pomatomus saltatrix} (Linnaeus, 1766), a teleost with deeply socketed teeth}},
+volume = {108},
+year = {2005}
+}
+@book{Nakamura1985,
+address = {Rome},
+author = {Nakamura, Izumi},
+isbn = {9251022321},
+number = {125},
+pages = {1--65},
+publisher = {FAO},
+title = {{FAO Species Catalogue. Volume 5. Billifishes of the World}},
+volume = {5},
+year = {1985}
+}
+@article{Newton1877,
+author = {Newton, E Tulley},
+journal = {Quarterly Journal of the Geological Society},
+number = {1-4},
+pages = {505--523},
+title = {{On the remains of \textit{Hypsodon}, \textit{Portheus}, and \textit{Ichthyodectes} from British Cretaceous strata, with descriptions of new species}},
+volume = {33},
+year = {1877}
+}
+@article{Bassani1889,
+author = {Bassani, Francesco},
+journal = {Atti della Reale Accademia delle Scienze Fisiche e Matematiche},
+number = {2},
+pages = {1--100},
+title = {{Ricerche sui pesci fossili di Chiavon (Strati di Sotzka - Miocene Inferiore)}},
+volume = {3},
+year = {1889}
+}
+@book{Woodward1901,
+address = {London},
+author = {Woodward, Arthur Smith},
+pages = {1--636},
+publisher = {Taylor {\&} Francis},
+title = {{Catalogue of the Fossil Fishes in the British Museum (Natural History). Part IV}},
+year = {1901}
+}
+@article{Leidy1877,
+author = {Leidy, Joseph},
+journal = {Journal of the Academy of Natural Sciences},
+number = {3},
+pages = {209--261},
+title = {{Description of vertebrate remains chiefly from the phosphate beds of South Carolina}},
+volume = {8},
+year = {1877}
+}
+@article{White1926,
+author = {White, Errol Ivor},
+journal = {Bulletin of the Geological Survey of Nigeria},
+pages = {1--82},
+title = {{Eocene Fishes from Nigeria}},
+volume = {10},
+year = {1926}
+}
+@article{Hendy2015,
+author = {Hendy, Austin J. W. and Jones, Douglas S. and Moreno, Federico and Zapata, Vladimir and Jaramillo, Carlos A},
+doi = {10.1007/s13358-015-0074-1},
+issn = {1664-2376},
+journal = {Swiss Journal of Palaeontology},
+keywords = {Castilletes Formation,Colombia,Guajira Peninsula,Jimol Formation,Mollusca,Ware Formation,a,colombia,formation {\'{a}},hendy et al,j,jimol formation {\'{a}} castilletes,w,ware formation {\'{a}} mollusca,{\'{a}} guajira peninsula {\'{a}}},
+pages = {1--31},
+publisher = {Springer Basel},
+title = {{Neogene molluscs, shallow marine paleoenvironments, and chronostratigraphy of the Guajira Peninsula, Colombia}},
+url = {http://link.springer.com/10.1007/s13358-015-0074-1},
+year = {2015}
+}
+@article{Katoh2013,
+author = {Katoh, Kazutaka and Standley, Daron M.},
+doi = {10.1093/molbev/mst010},
+isbn = {1537-1719 (Electronic)$\backslash$r0737-4038 (Linking)},
+issn = {07374038},
+journal = {Molecular Biology and Evolution},
+keywords = {metagemone,multiple sequence alignment,parallel processing,progressive alignment,protein structure},
+number = {4},
+pages = {772--780},
+pmid = {23329690},
+title = {{MAFFT multiple sequence alignment software version 7: Improvements in performance and usability}},
+volume = {30},
+year = {2013}
+}
+@article{Nolf1972,
+author = {Nolf, Dirk},
+journal = {Bulletin de la Societe Belge de Geologie, Paleontologie et Hydrologie},
+number = {1-2},
+pages = {95--109},
+title = {{Deuxi{\`{e}}me note sur les T{\'{e}}l{\'{e}}ost{\'{e}}ens des sabens de Lede ({\'{E}}oc{\`{e}}ne Belge)}},
+volume = {81},
+year = {1972}
+}
+@incollection{Senou2001,
+address = {Rome},
+author = {Senou, H},
+booktitle = {The Living Marine Resources of the Western Central Pacific. Volume 6},
+editor = {Carpenter, K E and Niem, V H},
+pages = {3685--3697},
+publisher = {FAO},
+title = {{Sphyraenidae}},
+year = {2001}
+}
+@article{Gillette1984,
+author = {Gillette, David D},
+journal = {Journal of Vertebrate Paleontology},
+number = {2},
+pages = {172--186},
+title = {{A marine ichthyofauna from the Miocene of Panama, and the Tertiary Caribbean Faunal Province}},
+volume = {4},
+year = {1984}
+}
+@book{Woodward1889,
+address = {London},
+author = {Woodward, Arthur Smith},
+pages = {1--474},
+publisher = {Taylor {\&} Francis},
+title = {{Catalogue of the Fossil Fishes in the British Museum (Natural History). Part I}},
+year = {1889}
+}
+@book{Agassiz,
+author = {Agassiz, Louis},
+pages = {1--69},
+title = {{Nomina Systematica Generum Piscium, tam Viventum Quam Fossilum}},
+year = {1846}
+}
+@book{Agassiz1833III,
+author = {Agassiz, Louis},
+pages = {1--390},
+title = {{Recherches sur les Poisson Fossiles. Tome III}},
+year = {1833}
+}
+@article{Ray1968,
+author = {Ray, Clayton E and Wetmore, Alexander and Dunkle, David H and Drez, Paul},
+journal = {Smithsonian Miscellaneous Collections},
+number = {3},
+pages = {1--25},
+title = {{Fossil vertebrates from the marine Pleistocene of southeastern Virginia}},
+volume = {153},
+year = {1968}
+}
+@article{Quillevere2018,
+author = {Quill{\'{e}}v{\'{e}}r{\'{e}}, Fr{\'{e}}d{\'{e}}ric and Koskeridou, Efterpi and Corn{\'{e}}e, Jean-Jacques and Moissette, Pierre and Girone, Angela and Agiadi, Konstantina},
+doi = {10.1016/j.quascirev.2018.07.037},
+issn = {02773791},
+journal = {Quaternary Science Reviews},
+pages = {80--99},
+title = {{Pleistocene marine fish invasions and paleoenvironmental reconstructions in the eastern Mediterranean}},
+volume = {196},
+year = {2018}
+}
+@article{Schultz2010,
+author = {Schultz, Ortwin and Brzobohat{\'{y}}, Rostislav and Kroupa, Oldrich},
+journal = {Annalen des Naturhistorischen Museums in Wien, Serie A},
+keywords = {badenian,central paratethys,chondrichthyes,osteichthyes,pisces},
+pages = {489--506},
+title = {{Fish teeth from the Middle Miocene of Kienberg at Mikulov, Czech Republic, Vienna Basin}},
+volume = {112},
+year = {2010}
+}
+@article{Diaz-Franco2009,
+author = {D{\'{i}}az-Franco, Stephen and Rojas-Consuegra, Reinaldo},
+journal = {Solenodon},
+keywords = {fossil,new record,perciformes,sphyraena,sphyraenidae,tertiary},
+pages = {124--129},
+title = {{Dientes f{\'{o}}siles de \textit{Sphyraena} (Perciformes: Sphyraenidae) en el Terciario de Cuba Occidental}},
+volume = {8},
+year = {2009}
+}
+@incollection{Bohm1924,
+address = {Berlin},
+author = {B{\"{o}}hm, J},
+booktitle = {Die Diamantenw{\"{u}}ste Sudwestafrikasfrikas. Vol II},
+editor = {Kaiser, E},
+pages = {55--87},
+title = {{Ueher terti{\^{a}}re Versteinerungen von den hogenfelser Diamantfeldern}},
+year = {1926}
+}
+@article{Westgate1984,
+author = {Westgate, James W},
+journal = {Journal of Vertebrate Paleontology},
+number = {4},
+pages = {536--546},
+title = {{Lower vertebrates from the late Eocene Crow Creek local fauna, St. Francis County, Arkansas}},
+volume = {4},
+year = {1984}
+}
+@article{Gottfried2017,
+author = {Gottfried, Michael D and Samonds, Karen E and Ostrowski, Summer A and Andrianavalona, Tsiory Harimalala and Ramihangihajason, Tolotra Niaina},
+doi = {10.1371/journal.pone.0176553},
+isbn = {1111111111},
+issn = {19326203},
+journal = {PLoS ONE},
+number = {5},
+pages = {1--9},
+pmid = {28542538},
+title = {{New evidence indicates the presence of Barracuda (Sphyraenidae) and supports a tropical marine environment in the Miocene of Madagascar}},
+volume = {12},
+year = {2017}
+}
+@book{ICZN1999,
+address = {London},
+author = {ICZN},
+edition = {4th},
+pages = {1--306},
+publisher = {The International Trust for Zoological Nomenclature},
+title = {{International Code of Zoological Nomenclature}},
+year = {1999}
+}
+@article{Harlan1824,
+author = {Harlan, R},
+doi = {10.1080/14786442408644630},
+issn = {1941-5796},
+journal = {Journal fo the Academy of Natural Sciences of Philadelphia},
+pages = {331--338},
+title = {{On a new fossil genus, of the order Enalio Sauri ( of Conybeare): and on a new species of Ichthyosaurus}},
+volume = {3},
+year = {1824}
+}
+@article{Casier1944a,
+author = {Casier, Edgard},
+journal = {Bulletin de l'Institut Royal des Sciences Naturelles de Belgique},
+number = {11},
+pages = {11--15},
+title = {{Contributions {\`{a}} l'{\'{e}}tude des Poissons fossiles de la Belgique. VI. Sur le Sphyraenodus de l'Eocene e sur la pr{\'{e}}sence d'un Sphyraenid{\'{e}} dans le Bruxellien (Lut{\'{e}}tien inf{\'{e}}rieur)}},
+volume = {20},
+year = {1944}
+}
+@book{Woodward1891,
+address = {London},
+author = {Woodward, Arthur Smith},
+pages = {1--567},
+publisher = {Taylor {\&} Francis},
+title = {{Catalogue of the Fossil Fishes in the British Museum (Natural History). Part II}},
+year = {1891}
+}
+@article{STRINGERGARYL.DepartmentofGe2003,
+author = {{STRINGER, GARY L., Department of Ge}},
+doi = {10.1306/8626cfaf-173b-11d7-8645000102c1865d},
+issn = {0149-1423},
+journal = {AAPG Bulletin},
+title = {{Paleoenvironmental Interpretations Based on Vertebrate Fossil Assemblages: An Example of their Utilization in the Gulf Coast}},
+volume = {85},
+year = {2003}
+}
+@article{Paramo1997,
+author = {P{\'{a}}ramo-Fonseca, Mar{\'{i}}a Eur{\'{i}}dice},
+doi = {10.1016/S1251-8050(97)83976-6},
+issn = {12518050},
+journal = {Comptes Rendus de l'Academie de Sciences - Serie IIa: Sciences de la Terre et des Planetes},
+keywords = {Colombia,New taxon,Tselfatioidei,Turonian},
+number = {2},
+pages = {147--150},
+title = {{\textit{Bachea huilensis} nov. gen., nov. sp., premier Tselfatioidei (Teleostei) de Colombie}},
+volume = {325},
+year = {1997}
+}
+@article{Chapman1935,
+author = {Chapman, Frederick},
+journal = {Transactions and Proceedings of the Royal Society of New Zealand},
+pages = {117--121},
+title = {{Descriptions of fossil fish from New Zealand}},
+volume = {64},
+year = {1935}
+}
+@incollection{DeSylva1986,
+address = {Johannesburg},
+author = {de Sylva, Donald P and Williams, F},
+booktitle = {Smiths' Sea Fishes},
+editor = {Smith, M M and Heemstra, P C},
+pages = {721--726},
+publisher = {Macmillan South Africa},
+title = {{Sphyraenidae}},
+year = {1986}
+}
+@book{Ray2001,
+address = {Washington DC},
+author = {Ray, Clayton E and Bohaska, David J},
+booktitle = {Smithsonian Contributions to Paleobiology},
+doi = {10.5479/si.00810266.90.1},
+edition = {Smithsonia},
+editor = {Ray, Clayton E. and Bohaska, David J.},
+issn = {00810266},
+number = {90},
+pages = {1--365},
+title = {{Geology and Paleontology of the Lee Creek Mine, North Carolina, III}},
+url = {http://si-pddr.si.edu/dspace/handle/10088/2006},
+year = {2001}
+}
+@article{Patterson1993,
+author = {Patterson, C.},
+issn = {00074977},
+journal = {Bulletin of Marine Science},
+number = {1},
+pages = {29--59},
+title = {{An overview of the early fossil record of Acanthomorphs}},
+volume = {52},
+year = {1993}
+}
+@article{BardackSprinkle1969,
+author = {Bardack, David and Sprinkle, G},
+journal = {Fieldiana Geology},
+pages = {297--340},
+title = {{Morphology and relationships of saurocephalid fishes}},
+volume = {16},
+year = {1969}
+}
+@article{Monsch2005,
+author = {Monsch, Kenneth A.},
+doi = {10.1017/S0263593300001164},
+isbn = {1755-6929},
+issn = {0263-5933},
+journal = {Transactions of the Royal Society of Edinburgh: Earth Sciences},
+keywords = {1990,and the,co-authors is outdated,fossils,g,has not seen,kemp et al,london clay formation,scombroidei,see e,sometimes,specimens,taxonomic revisions,which the present author},
+number = {November 2016},
+pages = {445--489},
+title = {{Revision of the scombroid fishes from the Cenozoic of England}},
+url = {http://www.journals.cambridge.org/abstract{\_}S0263593300001164},
+volume = {95},
+year = {2005}
+}
+@book{Agassiz1833IV,
+author = {Agassiz, Louis},
+pages = {1--296},
+title = {{Recherches sur les Poissons Fossiles. Tome IV}},
+year = {1833}
+}
+@article{Moreno2015,
+author = {Moreno, Federico and Hendy, A J W and Quiroz, Luis and Hoyos, Natalia and Jones, D S and Zapata, Vladimir and Zapata, S and Ballen, Gustavo A and Cadena, E and C{\'{a}}rdenas, A L and Carrillo-Brice{\~{n}}o, Jorge D and Carrillo, J D and Delgado-Sierra, D and Escobar, J and Mart{\'{i}}nez, J I and Mart{\'{i}}nez, C and Montes, Camilo and Moreno, J and P{\'{e}}rez, N and S{\'{a}}nchez, R. and Su{\'{a}}rez, C and Vallejo-Pareja, M C and Jaramillo, Carlos A},
+doi = {10.1007/s13358-015-0071-4},
+issn = {1664-2376},
+journal = {Swiss Journal of Palaeontology},
+pages = {5--43},
+title = {{Revised stratigraphy of Neogene strata in the Cocinetas Basin, La Guajira, Colombia}},
+volume = {134},
+year = {2015}
+}
+@misc{Agassiz1833I,
+author = {Agassiz, Louis},
+pages = {1--188},
+title = {{Recherches sur les Poissons Fossiles. Tome I}},
+year = {1833}
+}
+@article{VanderLaan2018,
+author = {{Van der Laan}, Richard},
+doi = {10.5852/ejt.2018.466},
+journal = {European Journal of Taxonomy},
+keywords = {1,10,167,2018,466,5852,agnatha,doi,ejt,european journal of taxonomy,family-group names of fossil,fi shes,gnathostomata,https,iczn,nomenclature,org,van der laan r,vertebrata},
+number = {466},
+pages = {1--167},
+title = {{Family-group names of fossil fishes}},
+year = {2018}
+}
+@article{Meek1884,
+author = {Meek, Seth E and Newland, Robert G},
+journal = {Proceedings of the Academy of Natural Sciences of Philadelphia},
+pages = {67--75},
+title = {{A review of the American species of the genus \textit{Sphyraena}}},
+volume = {36},
+year = {1884}
+}
+@article{Stringer2001,
+author = {Stringer, G L and Breard, S Q and Kontrovitz, M},
+journal = {Gulf Coast Association of Geological Societies Transactions},
+pages = {321--328},
+title = {{Biostratigraphy and Paleoecology of Diagnostic Invertebrates and Vertebrates from the Type Locality of the Oligocene Rosefiled Marl Beds, Louisiana}},
+volume = {LI},
+year = {2001}
+}
+@article{Cope1869,
+author = {Cope, E. D.},
+journal = {Transactions of the American Philosophical Society},
+pages = {1--252},
+title = {{Synopsis of the Batrachia and Reptilia of North America. Part I}},
+volume = {14},
+year = {1869}
+}
+@incollection{Switchenska1968,
+author = {Switchenska, Alexandra A},
+booktitle = {Ocherki po Filogenii i Sistematike Iskopaemykh Ryb I Beschelyustnykh},
+pages = {157--161},
+title = {{A new genus from the family Sphyraeniadae from the middle Miocene of Transcaucasia}},
+year = {1968}
+}
+@book{Agassiz1843,
+author = {Agassiz, Louis},
+pages = {1--160},
+title = {{Recherches sur les Poisson Fossiles. Tome V}},
+year = {1843}
+}
+@article{Vinola2017,
+author = {Vi{\~{n}}ola-L{\'{o}}pez, L{\'{a}}zaro William and Rojas-Consuegra, Reinaldo and Jim{\'{e}}nez-V{\'{a}}squez, Osvaldo},
+journal = {Novitates Caribaea},
+keywords = {cuba,dientes f{\'{o}}siles,for the,hispaniola,la espa{\~{n}}ola,mioceno,neogene of cuba and,new records of sphyraena,perciformes,sphyraena sp,sphyraenidae},
+pages = {89--94},
+title = {{Nuevos registros de \textit{Sphyraena} (Perciformes: Sphyraenidae) para el Ne{\'{o}}geno de Cuba y La Espa{\~{n}}ola}},
+volume = {11},
+year = {2017}
+}
+@book{NCBI2018,
+address = {Bethesta},
+author = {NCBI},
+number = {Md},
+publisher = {NCBI},
+title = {{Entrez Programming Utilities Help}},
+url = {http://www.ncbi.nlm.nih.gov/books/NBK25501/},
+year = {2018}
+}
+@article{Taverne2000,
+author = {Taverne, Louis and Chanet, Bruno},
+journal = {Geodiversitas},
+number = {1},
+pages = {23--34},
+title = {{\textit{Faugichthys loryi} n. gen., n. sp. (Teleostei, Ichthyodectiformes) de l'Albien terminal (Cr{\'{e}}tac{\'{e}} inf{\'{e}}rieur marin) du vallon de la Fauge (Is{\`{e}}re, France) et consid{\'{e}}rations sur la phylog{\'{e}}nie des Ichthyodectidae}},
+volume = {22},
+year = {2000}
+}
+@article{Smith1956,
+author = {Smith, J L B},
+journal = {Ichthyological Bulletin of the Department of Ichthyology of Rhodes University},
+pages = {37--46},
+title = {{The fishes of the family Sphyraenidae in the western Indian Ocean}},
+volume = {3},
+year = {1956}
+}
+@article{Tavora2010,
+author = {T{\'{a}}vora, Vladimir de Ara{\'{u}}jo and dos Santos, Andr{\'{e}} Augusto Rodrigues and Ara{\'{u}}jo, Raphael Neto},
+journal = {Boletim do Museu Paraense Emilio Goeldi Ciencias Naturais},
+keywords = {early miocene,fossiliferous localities,pirabas formation},
+number = {2},
+pages = {207--224},
+title = {{Localidades fossil{\'{i}}feras da Forma{\c{c}}{\~{a}}o Pirabas (Mioceno Inferior)}},
+volume = {5},
+year = {2010}
+}
diff --git a/biblio/bibtex/contrib/zootaxa-bst/example.pdf b/biblio/bibtex/contrib/zootaxa-bst/example.pdf
new file mode 100644
index 0000000000..464eea495a
--- /dev/null
+++ b/biblio/bibtex/contrib/zootaxa-bst/example.pdf
Binary files differ
diff --git a/biblio/bibtex/contrib/zootaxa-bst/example.tex b/biblio/bibtex/contrib/zootaxa-bst/example.tex
new file mode 100644
index 0000000000..52f2d0842c
--- /dev/null
+++ b/biblio/bibtex/contrib/zootaxa-bst/example.tex
@@ -0,0 +1,72 @@
+\documentclass{article}
+
+\usepackage{natbib}
+\usepackage{amsmath}
+\usepackage[USenglish]{babel}
+\usepackage[utf8]{inputenc}
+\usepackage[colorlinks=true,citecolor=blue]{hyperref}
+
+\author{Gustavo A. Ballen}
+\date{\today}
+\title{An example manuscript using the \texttt{zootaxa.bst} reference style for Bib\TeX}
+
+\begin{document}
+
+\maketitle
+
+This example uses \texttt{natbib} for handling taxonomic author citations, that behave a bit different from usual bibliographic citations. For details see this blog post: https://gaballench.wordpress.com/2019/03/22/referencing-zoological-name-authorships-in-latex/
+
+The usage is pretty simple: Just install \texttt{zootaxa.bst} in a place where \texttt{bibtex} can find it and the compile a couple times with bibtex before compiling with latex. Rinse and repeat if needed. Also, don't forget to create your \texttt{bibtex} \texttt{.bib} bibliography file. Please note that three lines are absolutely necessary for this:
+
+\begin{verbatim}
+\documentclass{article}
+
+\usepackage{natbib}
+...
+...
+...
+\bibliographystyle{zootaxa}
+\bibliography{example-refs}
+
+\end{document}
+\end{verbatim}
+
+The command \texttt{usepackage} activates the \texttt{natbib} package necessary for managing references. The command \texttt{bibliographystyle} will tell the system to use \texttt{zootaxa.bst}. The command \texttt{bibliography} points the \texttt{.bib} file. Please note that the fact that we are not indicating paths indicates that 1) the files are in the path (in the case of the package if it was installed where the system can find it), or the in working directory where the remaining files are found (e.g., the bibliography file).
+
+The Instructions for Authors on zootaxa's website indicate that:
+
+
+ A) Journal paper:
+ Smith, A. (1999) Title of the paper. Title of the journal in full, volume number, page range.
+
+ B) Book chapter:
+ Smith, A. \& Smith, B. (2000) Title of the Chapter. In: Smith, A, Smith, B. \& Smith, C. (Eds), Title of Book. Publisher name and location, pp. x–y.
+
+ C) Book:
+ Smith, A., Smith, B. \& Smith, C. (2001) Title of Book. Publisher name and location, xyz pp.
+
+ D) Internet resources
+ Author (2002) Title of website, database or other resources, Publisher name and location (if indicated), number of pages (if known). Available from: http://xxx.xxx.xxx/ (Date of access).
+
+Dissertations resulting from graduate studies and non-serial proceedings of conferences/symposia are to be treated as books and cited as such. Papers not cited must not be listed in the references.
+
+Also, the separator between authors should the the ampersand (\&), and the abbreviation \textit{et allii} should be italized (\textit{et al.})
+
+All of these aspects are handled automatically by \texttt{zootaxa.bst}. For instance, the following text will make use of several references that will be rendered into text according to rules of zootaxa, while generating the references also in the appropriate format.
+
+\section{Live example}
+
+Seven genus-group names based on extant taxa have been allocated to the Sphyraenidae: \textit{Agriosphyraena} \citealp{Fowler1903} (type \textit{Esox barracuda}), \textit{Australuzza} \citealp{Whitley1947} (type \textit{Sphyraena novaehollandiae}), \textit{Callosphyraena} \citealp{Smith1956} (type \textit{Sphyraema toxeuma}, junior synonym of \textit{Sphyraena forsteri}), \textit{Indosphyraena} \citealp{Smith1956} (type \textit{Sphyraena africana}), \textit{Sphyraenella} \citealp{Smith1956} (type \textit{Sphyraena flavicauda}), and \textit{Sphyraena} \citealp{Artedi1793} (type \textit{Esox sphyraena}). All of these genera are currently considered synonyms of \textit{Sphyraena}. \cite{Smith1956} elevated all the previous names to subgeneric rank, while \citet{DeSylva1963} deemed such actions unjustified, synonymizing all of these into \textit{Sphyraena} Röse (correct authorship is by Artedi instead).
+
+\citet{Santini2015} has presented an overview of six fossil species names associated with \textit{Sphyraena}; these authors mentioned \textit{Sphyraena fluctuosa} as a Sphyraenid species based on otolihts; however, such species was originally described by \citet{Nolf1972} in the genus \textit{Platycephalus} (Scorpaeniformes) and subsequently ratified in that genus \citep[e.g.,][]{Huyghebaert1979}. It is herein excluded from the Sphyraenid fossil species. \textit{Sphyraena intermedia} \citealp{Bassani1889} was mentioned also by Santini et al. without noting that another species of extant \textit{Sphyraena} was described with the same specific epithet \citep{Pastore2009}; therefore the latter species by Pastore is herein found to be primary homonym of \textit{Sphyraena intermedia} \citep{Bassani1889}, a fossil species known from the Oligocene of Italy and consequently the name by Pastore is deemed permanently invalid under Article 57.2 of the \citet{ICZN1999}.
+
+The style handles properly situations just like web pages through the \texttt{@misc} tag \citep[e.g., ][]{EschmeyerWeb} and book sections \citep{Switchenska1968,Bohm1924}.
+
+\section{Acknowledgements}
+
+First of all to the open source community for doing all this sharing and modification possible for newer and case-specific uses. I never thought there will be the day that one could prepare a manuscript for zootaxa entirely in \LaTeX and this is a step forward. This late-hours project was indirectly funded by FAPESP through a doctoral scholarship. Many thanks to the Stack Overflow community. This as much of the software projects are speeded up a lot by its existence.
+
+\bibliographystyle{zootaxa}
+\bibliography{example-refs}
+
+\end{document} \ No newline at end of file
diff --git a/biblio/bibtex/contrib/zootaxa-bst/zootaxa.bst b/biblio/bibtex/contrib/zootaxa-bst/zootaxa.bst
new file mode 100644
index 0000000000..4585c050e8
--- /dev/null
+++ b/biblio/bibtex/contrib/zootaxa-bst/zootaxa.bst
@@ -0,0 +1,1145 @@
+%% zootaxa.bst: BibTeX style file for the journal Zootaxa.
+%
+% Author: Gustavo A. Ballen
+% Maintainer: Gustavo A. Ballen
+% First-written: <2019-mar-25>
+% Version: 1.0
+% Keywords: TeX, BibTeX, bst, zootaxa
+% URL: https://github.com/gaballench/zootaxa-bst
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% The file zootaxa.bst file is a fork of apa.bst with further modification.
+% It is said to be further a modification of apalike.bst
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% BibTeX `apalike' bibliography style (24-Jan-88 version)
+% Adapted from the `alpha' style, version 0.99a; for BibTeX version 0.99a.
+% Copyright (C) 1988, all rights reserved.
+% Copying of this file is allowed, provided that if you make any changes at all
+% you name it something other than `apalike.bst'.
+% This restriction helps ensure that all copies are identical.
+% Differences between this style and `alpha' are generally heralded by a `%'.
+% The file btxbst.doc has the documentation for alpha.bst.
+%
+% This style should be used with the `apalike' LaTeX style (apalike.sty).
+% \cite's come out like "(Jones, 1986)" in the text but there are no labels
+% in the bibliography, and something like "(1986)" comes out immediately
+% after the author. Author (and editor) names appear as last name, comma,
+% initials. A `year' field is required for every entry, and so is either
+% an author (or in some cases, an editor) field or a key field.
+%
+% Editorial note:
+% Many journals require a style like `apalike', but I strongly, strongly,
+% strongly recommend that you not use it if you have a choice---use something
+% like `plain' instead. Mary-Claire van Leunen (A Handbook for Scholars,
+% Knopf, 1979) argues convincingly that a style like `plain' encourages better
+% writing than one like `apalike'. Furthermore the strongest arguments for
+% using an author-date style like `apalike'---that it's "the most practical"
+% (The Chicago Manual of Style, University of Chicago Press, thirteenth
+% edition, 1982, pages 400--401)---fall flat on their face with the new
+% computer-typesetting technology. For instance page 401 anachronistically
+% states "The chief disadvantage of [a style like `plain'] is that additions
+% or deletions cannot be made after the manuscript is typed without changing
+% numbers in both text references and list." LaTeX sidesteps the disadvantage.
+%
+% History:
+% 15-sep-86 (SK,OP) Original version, by Susan King and Oren Patashnik.
+% 10-nov-86 (OP) Truncated the sort.key$ string to the correct length
+% in bib.sort.order to eliminate error message.
+% 24-jan-88 (OP) Updated for BibTeX version 0.99a, from alpha.bst 0.99a;
+% apalike now sorts by author, then year, then title;
+% THIS `apalike' VERSION DOES NOT WORK WITH BIBTEX 0.98i.
+% 25-mar-19 (GAB) Forked from texlive's apa.bst for fitting to zootaxa
+% reference rules.
+
+ENTRY
+ { address
+ author
+ booktitle
+ chapter
+ edition
+ editor
+ howpublished
+ institution
+ journal
+ key
+ note
+ number
+ organization
+ pages
+ publisher
+ school
+ series
+ title
+ type
+ url
+ urldate
+ volume
+ year
+ }
+ {}
+ { label extra.label sort.label }
+
+INTEGERS { output.state before.all mid.sentence after.sentence after.block }
+
+FUNCTION {init.state.consts}
+{ #0 'before.all :=
+ #1 'mid.sentence :=
+ #2 'after.sentence :=
+ #3 'after.block :=
+}
+
+STRINGS { s t }
+
+FUNCTION {output.nonnull}
+{ 's :=
+ output.state mid.sentence =
+ { ", " * write$ }
+ { output.state after.block =
+ { add.period$ write$
+ newline$
+ "\newblock " write$
+ }
+ { output.state before.all =
+ 'write$
+ { add.period$ " " * write$ }
+ if$
+ }
+ if$
+ mid.sentence 'output.state :=
+ }
+ if$
+ s
+}
+
+FUNCTION {output}
+{ duplicate$ empty$
+ 'pop$
+ 'output.nonnull
+ if$
+}
+
+FUNCTION {output.check}
+{ 't :=
+ duplicate$ empty$
+ { pop$ "empty " t * " in " * cite$ * warning$ }
+ 'output.nonnull
+ if$
+}
+
+% apalike needs this function because
+% the year has special punctuation;
+% apalike ignores the month
+FUNCTION {output.year.check}
+{ year empty$
+ { "empty year in " cite$ * warning$ }
+ { write$
+ " (" year * extra.label * ")" *
+ mid.sentence 'output.state :=
+ }
+ if$
+}
+
+FUNCTION {output.url}
+{ year empty$
+ { "empty url in " cite$ * warning$ }
+ { write$
+ " \textit{Available from:} " url * extra.label *
+ mid.sentence 'output.state :=
+ }
+ if$
+}
+
+FUNCTION {output.urldate}
+{ year empty$
+ { "empty urldate in " cite$ * warning$ }
+ { write$
+ " (" urldate * extra.label * ")" *
+ mid.sentence 'output.state :=
+ }
+ if$
+}
+
+FUNCTION {output.bibitem}
+{ newline$
+ "\bibitem[" write$
+ label write$
+ "]{" write$
+ cite$ write$
+ "}" write$
+ newline$
+ ""
+ before.all 'output.state :=
+}
+
+FUNCTION {fin.entry}
+{ add.period$
+ write$
+ newline$
+}
+
+FUNCTION {new.block}
+{ output.state before.all =
+ 'skip$
+ { after.block 'output.state := }
+ if$
+}
+
+FUNCTION {add.blank} % added this one from linquire2.bst
+{ " " * before.all 'output.state :=
+}
+
+FUNCTION {new.sentence}
+{ output.state after.block =
+ 'skip$
+ { output.state before.all =
+ 'skip$
+ { after.sentence 'output.state := }
+ if$
+ }
+ if$
+}
+
+FUNCTION {not}
+{ { #0 }
+ { #1 }
+ if$
+}
+
+FUNCTION {and}
+{ 'skip$
+ { pop$ #0 }
+ if$
+}
+
+FUNCTION {or}
+{ { pop$ #1 }
+ 'skip$
+ if$
+}
+
+FUNCTION {new.block.checkb}
+{ empty$
+ swap$ empty$
+ and
+ 'skip$
+ 'new.block
+ if$
+}
+
+FUNCTION {field.or.null}
+{ duplicate$ empty$
+ { pop$ "" }
+ 'skip$
+ if$
+}
+
+FUNCTION {emphasize}
+{ duplicate$ empty$
+ { pop$ "" }
+ { "{\em " swap$ * "}" * }
+ if$
+}
+
+INTEGERS { nameptr namesleft numnames }
+
+FUNCTION {format.names}
+{ 's :=
+ #1 'nameptr :=
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ { s nameptr "{vv~}{ll}{, jj}{, f{.}.}" format.name$ 't := % {, f. separates lastname and initial}
+ nameptr #1 >
+ { namesleft #1 >
+ { ", " * t * }
+ { numnames #2 >
+ { "," * }
+ 'skip$
+ if$
+ t "others" =
+ { " \textit{et~al.}" * }
+ { " \& " * t * }
+ if$
+ }
+ if$
+ }
+ 't
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+}
+
+FUNCTION {format.authors}
+{ author empty$
+ { "" }
+ { author format.names }
+ if$
+}
+
+FUNCTION {format.key} % this function is just for apalike
+{ empty$
+ { key field.or.null }
+ { "" }
+ if$
+}
+
+FUNCTION {format.editors}
+{ editor empty$
+ { "" }
+ { editor format.names
+ editor num.names$ #1 >
+ { " (Eds)" * }
+ { " (Ed)" * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.title}
+{ title empty$
+ { "" }
+ { title "t" change.case$ }
+ if$
+}
+
+FUNCTION {n.dashify}
+{ 't :=
+ ""
+ { t empty$ not }
+ { t #1 #1 substring$ "-" =
+ { t #1 #2 substring$ "--" = not
+ { "--" *
+ t #2 global.max$ substring$ 't :=
+ }
+ { { t #1 #1 substring$ "-" = }
+ { "-" *
+ t #2 global.max$ substring$ 't :=
+ }
+ while$
+ }
+ if$
+ }
+ { t #1 #1 substring$ *
+ t #2 global.max$ substring$ 't :=
+ }
+ if$
+ }
+ while$
+}
+
+FUNCTION {format.btitle}
+{ title emphasize
+}
+
+FUNCTION {tie.or.space.connect}
+{ duplicate$ text.length$ #3 <
+ { "~" }
+ { " " }
+ if$
+ swap$ * *
+}
+
+FUNCTION {either.or.check}
+{ empty$
+ 'pop$
+ { "can't use both " swap$ * " fields in " * cite$ * warning$ }
+ if$
+}
+
+FUNCTION {format.bvolume}
+{ volume empty$
+ { "" }
+ { "volume" volume tie.or.space.connect
+ series empty$
+ 'skip$
+ { " of " * series emphasize * }
+ if$
+ "volume and number" number either.or.check
+ }
+ if$
+}
+
+FUNCTION {format.number.series}
+{ volume empty$
+ { number empty$
+ { series field.or.null }
+ { output.state mid.sentence =
+ { "number" }
+ { "Number" }
+ if$
+ number tie.or.space.connect
+ series empty$
+ { "there's a number but no series in " cite$ * warning$ }
+ { " in " * series * }
+ if$
+ }
+ if$
+ }
+ { "" }
+ if$
+}
+
+FUNCTION {format.edition}
+{ edition empty$
+ { "" }
+ { output.state mid.sentence =
+ { edition "l" change.case$ " edition" * }
+ { edition "t" change.case$ " edition" * }
+ if$
+ }
+ if$
+}
+
+INTEGERS { multiresult }
+
+FUNCTION {multi.page.check}
+{ 't :=
+ #0 'multiresult :=
+ { multiresult not
+ t empty$ not
+ and
+ }
+ { t #1 #1 substring$
+ duplicate$ "-" =
+ swap$ duplicate$ "," =
+ swap$ "+" =
+ or or
+ { #1 'multiresult := }
+ { t #2 global.max$ substring$ 't := }
+ if$
+ }
+ while$
+ multiresult
+}
+
+FUNCTION {format.pages}
+{ pages empty$
+ { "" }
+ { pages multi.page.check
+ { "pp." pages n.dashify tie.or.space.connect }
+ { "p." pages tie.or.space.connect }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.vol.num.pages}
+{ volume field.or.null
+ number empty$
+ 'skip$
+ { "(" number * ")" * *
+ volume empty$
+ { "there's a number but no volume in " cite$ * warning$ }
+ 'skip$
+ if$
+ }
+ if$
+ pages empty$
+ 'skip$
+ { duplicate$ empty$
+ { pop$ format.pages }
+ { ", " * pages n.dashify * } % change the comma to : back if needed
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.chapter.pages}
+{ chapter empty$
+ 'format.pages
+ { type empty$
+ { "chapter" }
+ { type "l" change.case$ }
+ if$
+ chapter tie.or.space.connect
+ pages empty$
+ 'skip$
+ { ", " * format.pages * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.in.ed.booktitle}
+{ booktitle empty$
+ { "" }
+ { editor empty$
+ { "\textit{In:} " booktitle emphasize * }
+ { "\textit{In:} " format.editors * ", " * booktitle emphasize * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.thesis.type}
+{ type empty$
+ 'skip$
+ { pop$
+ type "t" change.case$
+ }
+ if$
+}
+
+FUNCTION {format.tr.number}
+{ type empty$
+ { "Technical Report" }
+ 'type
+ if$
+ number empty$
+ { "t" change.case$ }
+ { number tie.or.space.connect }
+ if$
+}
+
+FUNCTION {format.article.crossref}
+{ "In" % this is for apalike
+ " \cite{" * crossref * "}" *
+}
+
+FUNCTION {format.book.crossref}
+{ volume empty$
+ { "empty volume in " cite$ * "'s crossref of " * crossref * warning$
+ "(\textit{In:}) "
+ }
+ { "Volume" volume tie.or.space.connect
+ " of " *
+ }
+ if$
+ "\cite{" * crossref * "}" * % this is for apalike
+}
+
+FUNCTION {format.incoll.inproc.crossref}
+{ "\textit{In:}" % this is for apalike
+ " \cite{" * crossref * "}" *
+}
+
+FUNCTION {article}
+{ output.bibitem
+ format.authors "author" output.check
+ author format.key output % special for
+ output.year.check % apalike
+ add.blank % was new.block originally
+ format.title "title" output.check
+ new.block
+ crossref missing$
+ { journal emphasize "journal" output.check
+ format.vol.num.pages output
+ }
+ { format.article.crossref output.nonnull
+ format.pages output
+ }
+ if$
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {book}
+{ output.bibitem
+ author empty$
+ { format.editors "author and editor" output.check
+ editor format.key output
+ }
+ { format.authors output.nonnull
+ crossref missing$
+ { "author and editor" editor either.or.check }
+ 'skip$
+ if$
+ }
+ if$
+ output.year.check % special for apalike
+ add.blank % was new.block originally
+ format.btitle "title" output.check
+ crossref missing$
+ { format.bvolume output
+ new.block
+ format.number.series output
+ new.sentence
+ publisher "publisher" output.check
+ address output
+ }
+ { new.block
+ format.book.crossref output.nonnull
+ }
+ if$
+ format.edition output
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {booklet}
+{ output.bibitem
+ format.authors output
+ author format.key output % special for
+ output.year.check % apalike
+ add.blank % was new.block originally
+ format.title "title" output.check
+ new.block
+ howpublished output
+ address output
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {inbook}
+{ output.bibitem
+ author empty$
+ { format.editors "author and editor" output.check
+ editor format.key output
+ }
+ { format.authors output.nonnull
+ crossref missing$
+ { "author and editor" editor either.or.check }
+ 'skip$
+ if$
+ }
+ if$
+ output.year.check % special for apalike
+ add.blank % was new.block originally
+ format.btitle "title" output.check
+ crossref missing$
+ { format.bvolume output
+ new.block
+ format.number.series output
+ new.sentence
+ publisher "publisher" output.check
+ address output
+ format.chapter.pages "chapter and pages" output.check
+ }
+ { new.block
+ format.book.crossref output.nonnull
+ format.chapter.pages "chapter and pages" output.check
+ }
+ if$
+ format.edition output
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {incollection}
+{ output.bibitem
+ format.authors "author" output.check
+ author format.key output % special for
+ output.year.check % apalike
+ add.blank % was new.block originally
+ format.title "title" output.check
+ new.block
+ crossref missing$
+ { format.in.ed.booktitle "booktitle" output.check
+ format.bvolume output
+ format.number.series output
+ new.sentence
+ publisher "publisher" output.check
+ address output
+ format.edition output
+ format.chapter.pages output
+ }
+ { format.incoll.inproc.crossref output.nonnull
+ format.chapter.pages output
+ }
+ if$
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {inproceedings}
+{ output.bibitem
+ format.authors "author" output.check
+ author format.key output % special for
+ output.year.check % apalike
+ add.blank % was new.block originally
+ format.title "title" output.check
+ new.block
+ crossref missing$
+ { format.in.ed.booktitle "booktitle" output.check
+ format.bvolume output
+ format.number.series output
+ address output % for apalike
+ new.sentence % there's no year
+ organization output % here so things
+ publisher output % are simpler
+ format.pages output
+ }
+ { format.incoll.inproc.crossref output.nonnull
+ format.pages output
+ }
+ if$
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {conference} { inproceedings }
+
+FUNCTION {manual}
+{ output.bibitem
+ format.authors output
+ author format.key output % special for
+ output.year.check % apalike
+ add.blank % was new.block originally
+ format.btitle "title" output.check
+ organization address new.block.checkb
+ organization output
+ address output
+ format.edition output
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {mastersthesis}
+{ output.bibitem
+ format.authors "author" output.check
+ author format.key output % special for
+ output.year.check % apalike
+ add.blank % was new.block originally
+ format.title "title" output.check
+ new.block
+ "Master's thesis" format.thesis.type output.nonnull
+ school "school" output.check
+ address output
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {misc}
+{ output.bibitem
+ format.authors output
+ author format.key output % special for
+ output.year.check % apalike
+ add.blank % was new.block originally
+ format.title output
+ new.block
+ howpublished output
+ new.block
+ output.url % this defines the url from the field in reference type misc
+ new.block
+ output.urldate
+ fin.entry
+}
+
+FUNCTION {phdthesis}
+{ output.bibitem
+ format.authors "author" output.check
+ author format.key output % special for
+ output.year.check % apalike
+ add.blank % was new.block originally
+ format.btitle "title" output.check
+ new.block
+ "PhD thesis" format.thesis.type output.nonnull
+ school "school" output.check
+ address output
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {proceedings}
+{ output.bibitem
+ format.editors output
+ editor format.key output % special for
+ output.year.check % apalike
+ add.blank % was new.block originally
+ format.btitle "title" output.check
+ format.bvolume output
+ format.number.series output
+ address output % for apalike
+ new.sentence % we always output
+ organization output % a nonempty organization
+ publisher output % here
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {techreport}
+{ output.bibitem
+ format.authors "author" output.check
+ author format.key output % special for
+ output.year.check % apalike
+ add.blank % was new.block originally
+ format.title "title" output.check
+ new.block
+ format.tr.number output.nonnull
+ institution "institution" output.check
+ address output
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {unpublished}
+{ output.bibitem
+ format.authors "author" output.check
+ author format.key output % special for
+ output.year.check % apalike
+ add.blank % was new.block originally
+ format.title "title" output.check
+ new.block
+ note "note" output.check
+ fin.entry
+}
+
+FUNCTION {default.type} { misc }
+
+MACRO {jan} {"January"}
+
+MACRO {feb} {"February"}
+
+MACRO {mar} {"March"}
+
+MACRO {apr} {"April"}
+
+MACRO {may} {"May"}
+
+MACRO {jun} {"June"}
+
+MACRO {jul} {"July"}
+
+MACRO {aug} {"August"}
+
+MACRO {sep} {"September"}
+
+MACRO {oct} {"October"}
+
+MACRO {nov} {"November"}
+
+MACRO {dec} {"December"}
+
+MACRO {acmcs} {"ACM Computing Surveys"}
+
+MACRO {acta} {"Acta Informatica"}
+
+MACRO {cacm} {"Communications of the ACM"}
+
+MACRO {ibmjrd} {"IBM Journal of Research and Development"}
+
+MACRO {ibmsj} {"IBM Systems Journal"}
+
+MACRO {ieeese} {"IEEE Transactions on Software Engineering"}
+
+MACRO {ieeetc} {"IEEE Transactions on Computers"}
+
+MACRO {ieeetcad}
+ {"IEEE Transactions on Computer-Aided Design of Integrated Circuits"}
+
+MACRO {ipl} {"Information Processing Letters"}
+
+MACRO {jacm} {"Journal of the ACM"}
+
+MACRO {jcss} {"Journal of Computer and System Sciences"}
+
+MACRO {scp} {"Science of Computer Programming"}
+
+MACRO {sicomp} {"SIAM Journal on Computing"}
+
+MACRO {tocs} {"ACM Transactions on Computer Systems"}
+
+MACRO {tods} {"ACM Transactions on Database Systems"}
+
+MACRO {tog} {"ACM Transactions on Graphics"}
+
+MACRO {toms} {"ACM Transactions on Mathematical Software"}
+
+MACRO {toois} {"ACM Transactions on Office Information Systems"}
+
+MACRO {toplas} {"ACM Transactions on Programming Languages and Systems"}
+
+MACRO {tcs} {"Theoretical Computer Science"}
+
+READ
+
+FUNCTION {sortify}
+{ purify$
+ "l" change.case$
+}
+
+INTEGERS { len }
+
+FUNCTION {chop.word}
+{ 's :=
+ 'len :=
+ s #1 len substring$ =
+ { s len #1 + global.max$ substring$ }
+ 's
+ if$
+}
+
+% There are three apalike cases: one person (Jones),
+% two (Jones and de~Bruijn), and more (Jones et~al.).
+% This function is much like format.crossref.editors.
+%
+FUNCTION {format.lab.names}
+{ 's :=
+ s #1 "{vv~}{ll}" format.name$
+ s num.names$ duplicate$
+ #2 >
+ { pop$ " \textit{et~al.}" * }
+ { #2 <
+ 'skip$
+ { s #2 "{ff }{vv }{ll}{ jj}" format.name$ "others" =
+ { " \textit{et~al.}" * }
+ { " \& " * s #2 "{vv~}{ll}" format.name$ * }
+ if$
+ }
+ if$
+ }
+ if$
+}
+
+FUNCTION {author.key.label}
+{ author empty$
+ { key empty$
+ { cite$ #1 #3 substring$ }
+ 'key % apalike uses the whole key
+ if$
+ }
+ { author format.lab.names }
+ if$
+}
+
+FUNCTION {author.editor.key.label}
+{ author empty$
+ { editor empty$
+ { key empty$
+ { cite$ #1 #3 substring$ }
+ 'key % apalike uses the whole key
+ if$
+ }
+ { editor format.lab.names }
+ if$
+ }
+ { author format.lab.names }
+ if$
+}
+
+FUNCTION {editor.key.label}
+{ editor empty$
+ { key empty$
+ { cite$ #1 #3 substring$ }
+ 'key % apalike uses the whole key, no organization
+ if$
+ }
+ { editor format.lab.names }
+ if$
+}
+
+FUNCTION {calc.label} % this function came from ASTRON.BST (ARR)
+{ type$ "book" =
+ type$ "inbook" =
+ or
+ 'author.editor.key.label
+ { type$ "proceedings" =
+ 'editor.key.label % apalike ignores organization
+ 'author.key.label % for labeling and sorting
+ if$
+ }
+ if$
+ "\protect\astroncite{" swap$ * "}{" % these three lines are
+ * % for apalike, which
+ year field.or.null purify$ #-1 #4 substring$ % uses all four digits
+ * % the mathing closing "}" comes in at the reverse.pass
+ 'label :=
+}
+
+FUNCTION {sort.format.names}
+{ 's :=
+ #1 'nameptr :=
+ ""
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ { nameptr #1 >
+ { " " * }
+ 'skip$
+ if$ % apalike uses initials
+ s nameptr "{vv{ } }{ll{ }}{ f{ }}{ jj{ }}" format.name$ 't := % <= here
+ nameptr numnames = t "others" = and
+ { "\textit{et al.}" * }
+ { t sortify * }
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+}
+
+FUNCTION {sort.format.title}
+{ 't :=
+ "A " #2
+ "An " #3
+ "The " #4 t chop.word
+ chop.word
+ chop.word
+ sortify
+ #1 global.max$ substring$
+}
+
+FUNCTION {author.sort}
+{ author empty$
+ { key empty$
+ { "to sort, need author or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { author sort.format.names }
+ if$
+}
+
+FUNCTION {author.editor.sort}
+{ author empty$
+ { editor empty$
+ { key empty$
+ { "to sort, need author, editor, or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { editor sort.format.names }
+ if$
+ }
+ { author sort.format.names }
+ if$
+}
+
+FUNCTION {editor.sort}
+{ editor empty$
+ { key empty$
+ { "to sort, need editor or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { editor sort.format.names }
+ if$
+}
+
+% apalike uses two sorting passes; the first one sets the
+% labels so that the `a's, `b's, etc. can be computed;
+% the second pass puts the references in "correct" order.
+% The presort function is for the first pass. It computes
+% label, sort.label, and title, and then concatenates.
+FUNCTION {presort}
+{ calc.label
+ label sortify
+ " "
+ *
+ type$ "book" =
+ type$ "inbook" =
+ or
+ 'author.editor.sort
+ { type$ "proceedings" =
+ 'editor.sort
+ 'author.sort
+ if$
+ }
+ if$
+ #1 entry.max$ substring$ % for
+ 'sort.label := % apalike
+ sort.label % style
+ *
+ " "
+ *
+ title field.or.null
+ sort.format.title
+ *
+ #1 entry.max$ substring$
+ 'sort.key$ :=
+}
+
+ITERATE {presort}
+
+SORT % by label, sort.label, title---for final label calculation
+
+STRINGS { last.label next.extra } % apalike labels are only for the text;
+
+INTEGERS { last.extra.num } % there are none in the bibliography
+
+FUNCTION {initialize.extra.label.stuff} % and hence there is no `longest.label'
+{ #0 int.to.chr$ 'last.label :=
+ "" 'next.extra :=
+ #0 'last.extra.num :=
+}
+
+FUNCTION {forward.pass}
+{ last.label label =
+ { last.extra.num #1 + 'last.extra.num :=
+ last.extra.num int.to.chr$ 'extra.label :=
+ }
+ { "a" chr.to.int$ 'last.extra.num :=
+ "" 'extra.label :=
+ label 'last.label :=
+ }
+ if$
+}
+
+FUNCTION {reverse.pass} % this function came from ASTRON.BST (ARR)
+{ next.extra "b" =
+ { "a" 'extra.label := }
+ 'skip$
+ if$
+ label extra.label * "}" * 'label :=
+ extra.label 'next.extra :=
+}
+
+EXECUTE {initialize.extra.label.stuff}
+
+ITERATE {forward.pass}
+
+REVERSE {reverse.pass}
+
+% Now that the label is right we sort for real,
+% on sort.label then year then title. This is
+% for the second sorting pass.
+FUNCTION {bib.sort.order}
+{ sort.label
+ " "
+ *
+ year field.or.null sortify
+ *
+ " "
+ *
+ title field.or.null
+ sort.format.title
+ *
+ #1 entry.max$ substring$
+ 'sort.key$ :=
+}
+
+ITERATE {bib.sort.order}
+
+SORT % by sort.label, year, title---giving final bibliography order
+
+FUNCTION {begin.bib}
+{ preamble$ empty$ % no \etalchar in apalike
+ 'skip$
+ { preamble$ write$ newline$ }
+ if$
+ "\begin{thebibliography}{}" write$ newline$ % no labels in apalike
+}
+
+EXECUTE {begin.bib}
+
+EXECUTE {init.state.consts}
+
+ITERATE {call.type$}
+
+FUNCTION {end.bib}
+{ newline$
+ "\end{thebibliography}" write$ newline$
+}
+
+EXECUTE {end.bib}